NES Emulator for the SEGA Megadrive

Back in 2009, when I was 16, I read an article somewhere online that stated that Yuji Naka (lead programmer for Sonic the Hedgehog) had written a Nintendo Entertainment System emulator for the SEGA Megadrive, running Super Mario Bros. at full speed.
I was impressed by this, yet remained skeptical about it; but I thought, it wouldn't harm to try, right?
So I began developing just that, a NES emulator for the SEGA Megadrive.
And I did it. Thus I proved to myself that it was possible.
And while the fact that the Naka's emulator ran at full speed is most probably just that, a legend, it is perfectly possible to do a NES emulator for the Megadrive, albeit tolerating its slowness.
After all the Megadrive has a 68000 processor running at 7Mhz and 64 kilobytes of RAM...

My emulator was really slow, incomplete and incompatible, but could show the title of Nintendo Pinball and of a few other games.
It was developed in C by using Stephane Dallongeville's SGDK and used a CPU core I wrote myself in C.
Still, not a bad result for an inexperienced programmer, whom I was in 2009.
Obviously now I would do many things differently...
Unfortunately I have lost the source code to it, but you can download the emulator ROM here.

The Megadrive ROM includes the emulator, and the Nintendo Pinball ROM (just for demonstration purposes).
You can change the ROM by replacing the data after 512kb in the ROM, that's because the emulator program is stored in the first 512 kilobytes, and the NES ROM in the subsequent 512 kilobytes.
That made changing game simple, as concatenating the emulator image and a NES ROM would yield an emulator image ready to run the NES game.
Only Mapper 0 NES games with CHR-ROM were supported, and you had to see if even those managed to run.
The red writings in the top-left corner of the screen contain the current program counter for the emulated NES CPU.
A tip: if you use an emulator that supports Fast-Forward, use it! As I said before, it's really just too slow!

- nextvolume, <>

Last updated: January 27th, 2014
Go back