DrPetter's homepage

NES Emulator

This is an emulator for the Nintendo Entertainment System that I wrote during 8 intense days in early 2002.

5 games work "perfectly" (with JNes as reference).
They are:
- Balloon Fight
- Baltron
- Adventure Island
- Amagon
- Donkey Kong JR

About 7 others are playable and look generally ok, but have some problems.
They include:
- Megaman 1 (has problems with horizontal scrolling)
- Popeye (I think there is a collision problem in there, you die inexplicably sometimes)
- Mario Bros (Definitely collision problems, you get killed every now and then)
- Kung Fu (background color not implemented (black), some sprite glitches)
- Cybernoid (I think there are some collision issues, and menu gfx is messed up)
- Joust (everything seems ok, except that the background is scrolled up about 16 pixels...)

Not really playable, but kind of working:
- Gunsmoke (hangs after a while, and uses some 8x16 sprites (unimplemented))
- Super Mario Bros (Seems to work ok, but doesn't react on joypad input)
- Pinball (everything ok, but launch spring doesn't react on input, so it isn't playable)


- 6502 CPU (all official instructions + bugs)
- PPU (no 8x16 sprites, scrolling might have problems)
- Mappers 0, 2, 3

- Joypad support
- Keyboard support
- Uses Tiny PTC for graphics

Everything is quite slow, it barely keeps realtime speed on my 1.1GHz CPU. It could definitely use some optimizations here and there, although I tried to make everything as fast as possible from the start.
My C optimization knowledge wasn't superb at the time either (not that it is great now, but I do know a bit more than I did back then).


Back to all projects

Page updated on March 25   2010