Pages: 1 2 [3]   Go Down
Author Topic: Arduino 6502 emulator + BASIC interpreter  (Read 4686 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Sr. Member
****
Karma: 2
Posts: 371
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I did some tests and it seems that a 6502 enviroment is the most happy with 128byte cachepages.

This is because it can keep a loop of code in a single page and there will not be any misses.
It would even work better with 256byte pages because of the 6502 adressingmodes but there is no room in the Arduino for that.

Both EhBasic and CBM-systems work the best with large pages.

So I will work on optimize the caching functions for speed.
Logged

0
Offline Offline
Newbie
*
Karma: 1
Posts: 19
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Very cool !
Logged

Offline Offline
Sr. Member
****
Karma: 2
Posts: 371
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Very cool !

I will post the full emulator code here but due to copyright I cant post the roms.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 29
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

This is awesome, janost. Really looking forward to seeing your results!  smiley

EDIT: Ah, I see you started a thread!
Logged

Offline Offline
Sr. Member
****
Karma: 2
Posts: 371
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Yes, It runs on my VideoBlaster platform.
(Look at the last line)

An emulator on a chip smiley


* IMAG0165.jpg (112.48 KB, 762x541 - viewed 69 times.)
Logged

Offline Offline
Sr. Member
****
Karma: 2
Posts: 371
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I started it with a keyboard and it runs perfect.

Only problem is the 6502 is running at about 33KHz.
FOR I=0 TO 100:NEXT takes 3 seconds.

It needs a faster 6502 emulator.
Logged

Offline Offline
Sr. Member
****
Karma: 2
Posts: 371
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Isn't this what you wanted mike?
Its your emulator running on my VideoBlaster platform.

It runs beautifully in color on a single chip AVR smiley
 


* IMAG0166.jpg (127.45 KB, 1000x563 - viewed 53 times.)
« Last Edit: December 20, 2013, 07:12:56 pm by janost » Logged

Valencia, Spain
Offline Offline
Faraday Member
**
Karma: 118
Posts: 4554
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

It needs a faster 6502 emulator.

Even if it's twice as fast (doubtful) it still won't be very useful.
Logged

No, I don't answer questions sent in private messages...

Offline Offline
Sr. Member
****
Karma: 2
Posts: 371
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

It needs a faster 6502 emulator.

Even if it's twice as fast (doubtful) it still won't be very useful.


No, you are right.

But if you have looked at his cpu.c code it is written for GHz platforms and not very efficient.

20times the speed is possible with a 6502 emulator written in ASM.
Logged

Offline Offline
Sr. Member
****
Karma: 2
Posts: 371
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

SInce its Christmas, well, here is the complete code to run EhBasic on the Bambino/1284P platform.

In NTSC color with just 2 resistors.

Merry Christmas to you all smiley

* Retro.ino (20.59 KB - downloaded 32 times.)
* cpu.c (77.59 KB - downloaded 32 times.)
« Last Edit: December 23, 2013, 03:20:43 pm by janost » Logged

Offline Offline
Sr. Member
****
Karma: 2
Posts: 371
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I'll make a version with a TFT-display aswell.

That's for all of you not fond of TV's.
 
Logged

Atlanta, USA
Offline Offline
Edison Member
*
Karma: 34
Posts: 1459
AKA: Ray Burne
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
here is the complete code to run EhBasic on the Bambino/1284P platform.

Yes, Virginia, there is a Santa Claus

Thanks to the code elves!

Ray
Logged

Offline Offline
Sr. Member
****
Karma: 2
Posts: 371
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
here is the complete code to run EhBasic on the Bambino/1284P platform.

Yes, Virginia, there is a Santa Claus

Thanks to the code elves!

Ray

smiley
Logged

Pages: 1 2 [3]   Go Up
Jump to: