Pages: 1 2 [3] 4 5 ... 10   Go Down
Author Topic: Arduino 6502 emulator + BASIC interpreter  (Read 35101 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
God Member
*****
Karma: 6
Posts: 524
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
God Member
*****
Karma: 6
Posts: 524
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
God Member
*****
Karma: 6
Posts: 524
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 255 times.)
Logged

Offline Offline
God Member
*****
Karma: 6
Posts: 524
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
God Member
*****
Karma: 6
Posts: 524
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 218 times.)
« Last Edit: December 20, 2013, 07:12:56 pm by janost » Logged

Valencia, Spain
Offline Offline
Faraday Member
**
Karma: 150
Posts: 5744
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 (but I do accept thank-you notes...)

Offline Offline
God Member
*****
Karma: 6
Posts: 524
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
God Member
*****
Karma: 6
Posts: 524
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 115 times.)
* cpu.c (77.59 KB - downloaded 97 times.)
« Last Edit: December 23, 2013, 03:20:43 pm by janost » Logged

Offline Offline
God Member
*****
Karma: 6
Posts: 524
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: 56
Posts: 1848
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
God Member
*****
Karma: 6
Posts: 524
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

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

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.
Logged

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

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  smiley

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

Regards,

Oscar.
Logged

Pages: 1 2 [3] 4 5 ... 10   Go Up
Jump to: