I wrote a 6502 CPU emulator for the Arduino! I originally wrote it a couple years ago for a NES emulator, then modified it a bit for this. One of the changes was to make cycle timing a little less accurate (doesn’t check for page boundary crosses on some opcodes) for a speed increase. If anybody wants that fixed for something, let me know.
To demonstrate it, I have the ROM for “Enhanced BASIC 6502” embedded in the code. Given the Uno’s tiny 2 KB RAM, I am only able to provide the CPU emulator with 1.5 KB, but it’s enough to minimally run EhBASIC! You can connect to the Arduino with any terminal program (like PuTTY) and play around in the BASIC interpreter. 8)
It makes for a fun little toy, even if not all that useful. With more memory on an Arduino, you could turn this into a simple Apple ][ emulator or something like that. I might look into that actually. If anybody actually uses this for a project let me know if you need help.
arduino_6502.zip (18.3 KB)