Just for fun, I made a blinky robot with a PIC32 emulating a 6502. Pictures and description on
my blog.
Attachment:
blinky-robot-front.jpg [ 171.08 KiB | Viewed 4100 times ]
The PIC32 is running a 65C02 emulator I wrote in MIPS assembly. Partly to test the emulator, I got Tali Forth 2 running on it and now use QEMU for MIPS so I can have Tali Forth 2 in my Linux terminal (
blog post here). MIPS assembly is now my favorite assembly of all and a lot of fun to use.
The 65C02 program running inside the emulator is itself a 65C02 emulator (
GitHub link). On the code I tested, it emulates at about 1/20th the speed of the real thing. When this emulator starts, it points to its own program code so you get an emulator in an emulator. Each new emulator emulates another emulator until it's five levels deep. The fifth level of emulation runs a tight loop blinking the LED eyes on and off as fast as possible. All the layers of emulation combine to reduce the execution speed down to a few hertz so the blink rate is once every 2 seconds or so.
Emulator 1 (MIPS) -> Emulator 2 (65C02) -> Emulator 3 (65C02) -> Emulator 4 (65C02) -> Emulator 5 (65C02) -> Emulator 6 (65C02) -> Blinky (65C02)