SNES Hacking for Absolute Beginners
Gameplay Variables
Understanding Hex:
Before we proceed, you only need a very basic understanding of hex values. I will try to explain how values work as simply as I can. Take a glance at TechTerms’ chart, and read below.
As you can see, 00 represents 0, 01 represents 1, 09 represents 9 and so on. However, this chart does not increment the number of columns for every 10 values. Instead, it is every 16. This is because 0A represents 10 and 0F represents 15. An easy way to remember the rule for hex values is that they go from 0-9 and then the first 6 letters of the alphabet are used.
To illustrate this, I will use a few examples that involve altering gameplay data.
Changing Gameplay Variables:
If you are unsure of how to locate things such as lives counts or HP variables in video games, that’s alright. It’s not exactly as simple as searching “3” in a ROM if you begin with 3 lives, after all. And besides, a huge portion of the SNES library has been documented thanks to sites like GameHacking and Data Crystal. Some games also have full-on disassemblies. Since this guide is for absolute beginners, I’ll share how to adjust a few easy variables.
Before we move on, download and open Lunar Address.
Let’s start small and give Mega Man X a super jump. Prepare your Mega Man X ROM (I’m using Rev 1/NA 1.1 but the following codes should be fine regardless) and let’s get to work. For this example, I’ll be looking at this GameHacking page and working with the “Mega-jump” code. Note that the steps below only work with Game Genie/ROM write codes, not RAM write codes.
To patch this code into the ROM, let’s open up Mega Man X in HxD. Keep in mind we can’t simply jump to 0x86B9C6 since it is a lunar address. So first, let’s open up the Lunar Address program, select LoROM – PC, input 86BC96 in the bottom right of the program, and presumably disable the “Include $200 Copier Header” option. The last part is important since your ROMs are more than likely unheadered these days. If in doubt, download TUSH and check your ROM. I advise removing the header if it’s present before moving on.
If you did everything correctly, your Lunar Address will read as follows. The $03:39C6 (0x39C6) is the important part here.
Alright, let’s press CTRL+G in HxD and look for 339C6. Take note the default value is 5, and the Game Genie code uses 9 as its replacement value.
Let’s say we want to make a hack where moderately high jumps are required to progress. How does this moon jump look?
Perhaps that’s a bit overkill for our purposes! Try replacing the jump value with 07 instead of 09 since it’s in the middle of the default value and moon jump value.
And there you have it, a much more reasonable jump height.
Want to test your knowledge? Try setting the starting lives count to 4, with the hint 1 life is counted as 00 here.
Another fun trick with Mega Man X involves changing the damage values of each weapon. Let’s try making the buster absurdly powerful. For this, we’ll download PowerPanda’s boss damage disassembly file and open it in Notepad or a similar program. CTRL+F and look for Chill Penguin’s values.
As you can see, a level 2 buster shot does 3 unit of damage. Let’s try swapping it to be closer to 20 damage. Remember, the Hadouken does 32 units of damage since we have to account for A-F in hex. So, let’s set the level 2 buster’s value to 16 and see what happens. Once again, open your Mega Man X ROM in HxD, and let’s search Hex-values (not Text-string) for Chill Penguin’s table. Going off the values above, we’ll search for 01 02 03 03 20 02 02 01 01 01 03 or 0102030320020201010103. Replace the 2nd 03 value with 16.
Reach Chill Penguin, hit him with a level 2 charged shot, and check what happens.
Not quite as powerful as the Hadouken, but still very broken. Beautiful.
The possibilities are endless. Changing the starting lives count in a game, modifying the score system, increasing or decreasing a character’s starting level in an RPG, etc. As with all things in life, I advise starting small before making your way up.