Go Down

Topic: Arduino 6502 emulator + BASIC interpreter (Read 47035 times) previous topic - next topic

janost

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.


janost


Very cool !


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

miker00lz

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

EDIT: Ah, I see you started a thread!

janost

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

An emulator on a chip :)

janost

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.

janost

#36
Dec 21, 2013, 01:05 am Last Edit: Dec 21, 2013, 01:12 am by janost Reason: 1
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 :)

fungus


It needs a faster 6502 emulator.


Even if it's twice as fast (doubtful) it still won't be very useful.
No, I don't answer questions sent in private messages (but I do accept thank-you notes...)

janost



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.

janost

#39
Dec 23, 2013, 09:18 pm Last Edit: Dec 23, 2013, 09:20 pm by janost Reason: 1
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 :)

janost

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

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

mrburnette

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

janost


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


:)

oscarv

Hi,

Thanks for this very nice project! I used it to emulate the classic Microchess from the KIM-I on the Arduino.

I've been fascinated by Microchess for a long time: 924 bytes of 6502 code for a chess playing program - and one of the best pieces of programming ever IMHO. Last month, I joked about porting it to the Arduino. But with your code, it took me a few hours. Cheers, and I hope my re-use of your code is OK!

Microchess makes the Arduino play a very decent game. For the few that are niche enough to care, the code is here: http://obsolescenceguaranteed.blogspot.ch/2014/06/6502-microchess-on-arduino.html.

Regards,

Oscar.

oscarv

Hi,

Just to let you know that after some more fun with the 6502 core, I made a KIM-1 emulator with it. It runs on a basic Arduino Uno, and can either be used through the serial port or with a small keyboard/LED display shield. It's a lot less useful then ehBasic, admittedly, but if it can be done it must be done  :)

A description and sources are here:
http://obsolescenceguaranteed.blogspot.ch/2014/06/kim-uno-kim-i-emulator-on-arduino-uno.html

Regards,

Oscar.

Go Up