ROM Hack Help

Discuss technical or other issues relating to programming the Nintendo Entertainment System, Famicom, or compatible systems.

Moderator: Moderators

Post Reply
Posts: 1
Joined: Wed May 08, 2019 4:20 pm

ROM Hack Help

Post by Clamison21 » Wed May 08, 2019 4:37 pm

I am currently working on a Donkey Kong ROM Hack and having difficulties with hexadecimals, PPUs, etc. I will post any troubles I have here and feel free to do the same. I hope that the fine users of NesDev will be kind enough to assist the new programmers with their dreams.

I am making an edit in the PPU and when I press Save Rom As. When I try to load the ROM again, My changes are gone. Please help!

User avatar
Posts: 437
Joined: Thu Aug 13, 2015 4:40 pm
Location: Rio de Janeiro - Brazil

Re: ROM Hack Help

Post by nesrocks » Wed May 08, 2019 4:43 pm

The hex editor will only save changes made to the ROM. You're editing the PPU memory in that view, which is volatile and is only held while the NES is powered on, so that's no good for your use. You need to reverse engineer the game's code to understand how that specific byte you want to edit has acquired that value. It will require you a good understanding of how the NES works and also how the emulator's debugging features work. <- Follow me on twitter! Thanks!

User avatar
Posts: 4216
Joined: Sun Sep 19, 2004 9:28 pm
Location: A world gone mad

Re: ROM Hack Help

Post by koitsu » Wed May 08, 2019 4:44 pm

You need to understand the PPU RAM memory layout:

Donkey Kong is a mapper 0 CHR-ROM game, which means the CHR data (graphics, not nametable (screen layout) data) in the last 8KB of ROM. Those graphics end up in PPU RAM $0000-1FFF.

Your FCEUX hex editor session shows you're within PPU RAM $2220-23B0, which is the nametable region. That's RAM, not ROM. The nametable gets populated/updated by actual 6502 code running in real-time, and that data is stored within PRG somewhere.

You have to reverse-engineer the game by understanding the 6502 code, via a debugger, to figure out where the nametable data is coming from (in PRG) (which may or may not involve compression/decompression as well, I haven't looked). This is something that has to be done on a per-game basis; there is no standard.

I'd suggest you pose your question over at the forum which is dedicated to people wanting to do romhacking.

Post Reply