Tuesday 13 October 2009

NES Game Disassembly and the 2A03 Processor

I’m starting my second year on the Computer Games Programming course at Derby University and am going to use this blog as the main space to write about and show the work that I am doing. My first post being for ‘Console Dev’, one of my three main modules for this term.

The NES uses a customised version of the 6502 processor; this made it slightly hard to find a disassembler that worked correctly for NES ROMS. After searching through various Google search results I found various NES emulators, ROMS of major games and eventually found a good disasembler for the NES’s 2A03 processor. Although there are plenty of good emulators out there I found the best to be the fceux (link below) which has a built in HEX editor, PPU viewer and code/data logger. The disassembler from zolphar.net was easy to use and the results for various games are shown below.


Mario Bros


Final Fantasy


Metal Gear


The instruction set for the 6502 architecture can be seen by visiting the link just below. I have looked through the instruction set and found various instructions in the games such as incrementing and decrementing memory. The instructions in all of the games I have looked at are spread out at various memory registers making it hard to understand.

http://www.masswerk.at/6502/6502_instruction_set.html

Other Links
Emulators
http://fceux.com/web/htdocs/index.php

Disassembler
http://www.zophar.net/utilities/nesdev/6502d-disassembler.html