This page is a mirror of Tepples' nesdev forum mirror (URL TBD).
Last updated on Oct-18-2019 Download

Trouble hacking code

Trouble hacking code
by on (#24150)
On super mario bros 3, there's a game genie code 'AOSUZI' which edits registry B5DA from FF to 10.

Now when I change the code through a hex editor, I get the exact same spot it was at too, but nothing changes. Mario doesn't pull blocks out from the background tiles.

Why is this?

by on (#24151)
You should know how the GameGenie works. Anyway, it patches the CPU address, not the ROM offset. So, it's the ROM bank loaded in the $A000-BFFF region.

by on (#24152)
Use fceuxd to see what rom file addresses are modified by a Game Genie code.

by on (#24153)
It's the exact same code I modded, I even checked the CPU and it changed after I changed the value.

by on (#24154)
Oh man this is so awesome.

Thank you Dwedit!
I can finally put in effects I always wanted now.

by on (#24155)
That is a 6-letter code. It will modify everything that gets mapped into address $B5DA. SMB3 constantly changes the bank that's mapped into $A000-BFFF (using the MMC3's bankswitching capabilities). As a result, that code will change multiple bytes of ROM data, not just one.

It is common for fan-made GG codes to be six letters, as they're easier to guess (you don't need to get the compare value right). Often, these codes do something really cool, but they can also carry unwanted side-effects (such as game freezes under certain circumstances). If this code only needs to modify one bank to get the desired effect, you'll probably want to convert it to an 8-letter code, to avoid side-effects as much as possible (8-letter codes have a compare value, so the ROM data is patched only if its original value matches the compare value - this technique doesn't guarantee that other banks won't get modified, but it's far better than having everything patched unconditionally).

by on (#24169)
Yeah as I was messing around I realized that.

This is what I wanted for such a long time, a tool that allows you to know what address is affecting the CPU bank.

Now I have effects like
go onto any space on the map, and you can enter any tile you're on, and skip the levels uncompleted.

pull blocks from background tiles, so you can carve your way through stuff, something I like to call "lego mode". and with the game genie decoder, I could put this in the rom, and not have that freezing side effect.

multi jumps

blocks that turn into empty blocks now turn into 1 coin boxes, but that means after you hit the 1 coin box, it turns into another, so you get inf coins.

debug mode

probably other stuff.

by on (#24170)
Take it to a Rom Hacking forum, like Acmlm's.

http://acmlm.no-ip.org/board/forum.php?id=19

by on (#24197)
I swore I saw a feature that allowed me to check the game's current memory, and when you right click it it had a feature that shows you what address in the rom's file was affecting the current state of that in the CPU memory.

I can't find it.

by on (#24198)
RockNES has this feature... oh well.

by on (#24199)
Then I'll check your emu out.

by on (#24232)
Oh it was because I was checking under $8000.

Why is that? It seems like alot of the main parts of the game are ran in registers below $8000.

by on (#24233)
CKY-2K/Clay Man wrote:
Oh it was because I was checking under $8000.

Why is that? It seems like alot of the main parts of the game are ran in registers below $8000.


Check out this document: http://nesdev.com/ndox200.zip

I use it often when I need to look up information about certain registers.