How To Hack
Before we start, you'll need a hacking program. I highly recommend Hex Workshop for this. To find your savestate, check the name of your ROM (it should end in .smc or .fig). Your savestates will have the same name as the ROM, but end in .zst, .zs1, .zs2, etc. till .zs9. Open up the savestate in Hex Workshop. Now... before you jump in to the wonderful world of savestate hacking, you'll first have to introduce yourself to the hexadecimal number system. Sounds complicated, no? Just follow along and you'll be fine. 8-) I'm assuming you have basic knowledge of exponents in this explanation.
For starters, let's go back to grade 3 and rethink how our normal decimal system works. Let's take the number 4823. What does that actually represent?
4000 + 800 + 20 + 3.
But that's just a simplification of the following expression.
(4 x 1000) + (8 x 100) + (2 x 10) + (3 x 1).
Remember? Thousands column, hundreds column, tens column, ones column. But let's generalize that a bit, and here's what we get:
(4 x 103) + (8 x 102) + (2 x 101) + (3 x 100)
Remember that any number raised to the 0 is equal to 1 (so 100 = 1).
Now... as you can tell, this is all using a base 10, or decimal notation. We have ten symbols (0 through 9) which we use to represent a number. Once we get up to 9, we carry the 1 and restart at 0. Now... let's extend this to a new base: Base 16, or hexadecimal. Hexadecimal uses 16 symbols to represent numbers: the normal numbers 0 to 9, and the symbols A through F, representing the values 11 through 15, respectively (it doesn't go up to 16, remember, because the values include 0! To write 16 you'd need to write "10", just like in decimal, a base-10 system, you can't represent the value "10" in one character; you need to write "10".)
The number system works the same way using the above formula. If you see "123" in hex, that ends up being:
(1 x 162) + (2 x 161) + (3 x 160)
...or 291 in decimal. What about if you'd see "ABC" in hex? That's equal to...
(11 x 162) + (12 x 161) + (13 x 160)
... or 2,748 in decimal.
Some more terminology: Two characters (from 0 to F), each of which can store 16 possible values, and both of which together can store 162 = 256 possible values (from 00 to FF) is known as a byte. Now... your savestate is just a bunch of bytes that mostly look like gibberish. Your hex editor can look at each byte and display it in hexadecimal format. Of course it also has to remember where you are in the savestate. If you've used a word processor, you'll know that it keeps track of what line you're on, as well as what column (how far into the line) you are. In hex editing, this is called an offset. To see what I mean, let's open up Hex Workshop and demonstrate.
Yup, looks just like gibberish, don't it? As you can see, there are three parts to the screen: left, middle, and right. Ignore the far right, it makes no sense and you'll never have to pay attention to it. First take a look at the left. The values go up in increments of 10 (16 decimal) as you go farther into the savestate. These are your "lines". Now, count the bytes, or pairs of characters, in the middle part. There are (wowee!) 16 of them! (Yes, I know they're really divided into groups of *four* characters, not two, but that's just to make it look better or something. We're really only interested in pairs of characters.) So these are your "columns". So let's say, for example, we want to put the cursor where it is now, at offset 2F437. We'd go down to line 2F430, then go right seven times till we hit 2F437. Voila. To make sure you are where you are, look below the big window on the status bar and it'll tell you what offset you're currently at.
Note that you can only edit a pair of values at once. As I said, that's a byte, which is the basic amount that can hold a value.
Well, now you know what offsets are, all you need to know is that the values you enter into the offsets are known as digits - it's just a fancy way of saying "stuff you need to enter into the offset". There are really two types of digits. One is just a value. For example, if you want to change a character's Strength, you'd check the hacking list for the required offset, go there, then change the offset to the value you want. To quickly find the hex equivalent of a normal decimal number, use the handy-dandy Base Calculator included in Hex Workshop. Enter your number in the Decimal side and voila, it pops up in the Hex side! 8-)
One thing that's confusing is that if a value takes up more than one byte (for example, if it can take numbers over 255, like HP in most games) you have to enter the bytes BACKWARDS. For example, if you want to enter the number 9999, that's equal to 270F in hexadecimal. Separating the bytes, we get 27 0F. We now have to SWITCH them, and enter 0F 27 to get the right value. Annoying, but necessary. >_<
The second type of digit is even simpler; it's usually used in item lists and the like. Go to the offset mentioned in the hacking list (we'll mention a range of offsets, representing the entire item list), then take a look at the item list and enter the digit listed in the item list representing that item. One more thing: generally for item lists you have to enter *two* things: which item we want, and how much of it we want. Usually the item amount is stored a fixed distance (number of offsets) after the item itself.
Some easy to remember hex values:
That should do it! Go out and hack away! 8p