NES Emulation begginer, where to start

Discuss emulation of the Nintendo Entertainment System and Famicom.

Moderator: Moderators

Post Reply
Coldberg
Posts: 34
Joined: Fri Jul 18, 2008 9:12 am

NES Emulation begginer, where to start

Post by Coldberg » Fri Jul 18, 2008 9:20 am

Hello everyone , I'm new here , i hope i won't upset anyone by asking... but
Where does one start when writing a NES emulator ?
And don't tell me at the beginning :P
Anyway I have a very good background in programming in C, C++ and x86 Assembly (at least 6 years worth), so i got that covered.
And i do have my ideas on how i could do it, but then again i only found very limited information on the NES architecture.
I'd like to hear from experienced emu writers where is the beginning.
One of my approaches would be to take a minimal ROM , load it and hack away at the cpu code till i reach a point where it needs to interface other hardware and so on.
But i don't know if this is a good way to do so.
Long story short ... what could you recomend ? DOC's, approache strategies so on...

mic_
Posts: 922
Joined: Thu Oct 05, 2006 6:29 am

Post by mic_ » Fri Jul 18, 2008 9:57 am

I'd say start by emulating the CPU and memory access. Then write some simple test sequences in hardcoded 6502 machine code and have your CPU emulator run them and check that the result is what you'd expect (you can output the CPU's status to a text console or whatever).
Then fix your memory access routines to handle the basic memory layout of the NES and try to run some really basic demo ROM, like ColourBars.
After that you can start adding some graphical output, joypad input etc.

Coldberg
Posts: 34
Joined: Fri Jul 18, 2008 9:12 am

Post by Coldberg » Fri Jul 18, 2008 10:03 am

what about actually taking a simple game like donkey kong ?

mic_
Posts: 922
Joined: Thu Oct 05, 2006 6:29 am

Post by mic_ » Fri Jul 18, 2008 10:31 am

That's still far more complicated than some of the simplest homemade test ROMs. If you want an easy game to try to run, this one isn't that hard to get to work.

Coldberg
Posts: 34
Joined: Fri Jul 18, 2008 9:12 am

Post by Coldberg » Fri Jul 18, 2008 12:29 pm

thanks :)

aphex
Posts: 25
Joined: Thu Apr 22, 2010 1:35 pm
Location: England

Post by aphex » Thu Apr 22, 2010 5:37 pm

Sorry for necroposting, but this will be helpfull to get people started.

This link
http://www.codeslinger.co.uk/index.php
helped me get started with emulation, I successfully wrote a chip8 and gameboy emulator with this blog (also has detailed walthough on the master system)

Good luck

Post Reply