How does one modify an old school NES game?

23.2k views Asked by At

I sometimes see modified NES games, and I'd like to try my hand. What tools are used to accomplish this? Is there some magic repository of source code sitting around somewhere that I don't know about? My question is, what is step one to modifying any arbitrary NES game? (If step one is something like 'get your head on straight', then please give me steps one through three.)

Thank you

4

There are 4 answers

3
Jeff Watkins On BEST ANSWER

You'll need the ROM image and a disassembler or just a good old hex editor. It will be HARD unless you know the target architecture well. Many a time on these old systems they coded around corners to make things fit in the tiny amount of storage available. This will lead to some very odd "side effecty" code which you could find tricky to understand.

My advice, create a game from scratch as a "cover version" in a modern language using modern hardware, you won't have to worry about only having 4kb RAM!

1
ravuya On

It's the same as modifying any other compiled program; at a high level you'd need to:

  1. Disassemble the existing game's ROM image from binary into a higher level language (such as assembly)
  2. Modify the assembly
  3. Reassemble the changed assembly language source into a Nintendo ROM

As Jeff Watkins says in his answer, you could also modify the ROM directly using a hex editor without having to disassemble it first, but the task is roughly equivalent, just with you doing it instead of the computer.

There are a lot of lower level concerns about extracting data blocks (sprites, etc) and understanding the actual program flow. It's definitely not going to give you a large dump of code that's easy to follow and has comments.

Take a look at this other question about disassembling and modifying 16-bit games.

0
Agustin Meriles On

And you must know the hardware very well. There are internet resources that provides quite well documentation like this wiki

Good luck!

0
BenW On

What you're talking about is called "ROM hacking."

Now you'll want to be careful here because there are serious legal issues (note, I am not a lawyer): For one, to hack a game, you need to find a ROM image of the game you're trying to hack. There are sites that provide downloads for these, but I will not link to one. You're on your own here. The other issue is that a hacked game would count as an infringing derivative work. In practice, however, the game companies mostly ignore the ROM hacking scene.

Legal issues aside, these are the essentials for ROM hacking:

  • A ROM image of the game you want to hack (see the warning above).
  • An emulator. In theory you could write your hack to a cartridge and play it on an NES, but that assumes you still have an NES, so emulators are the next best thing. Note that emulators are perfectly legal (it's the ROMs that aren't); for NES ROM hacking and homebrew development, I would recommend FCEUX. It has a built-in memory viewer and an excellent debugger.
  • A hex editor. I recommend HexEdit. As of now, it's freeware. Sorry, it's for Windows only.
  • A tile editor, for editing graphics. I recommend YY-CHR. Again, it's Windows only.

Romhacking.net hosts other useful tools as well.