|Question:||What is "Hex"?|
|Answer:||Hex (short for hexadecimal) is another way to write numbers. Unlike the normal (decimal) system, hexadecimal has the numbers A, B, C, D, E and F between 9 and 10.|
In decimal, you count like this:
1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32...
In hexadecimal, you count like this:
1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 1A, 1B, 1C, 1D, 1E, 1F, 20...
10 in hexadecimal is the same as 16 in decimal, because it's the 16th number in the list.
20 in hexadecimal is the same as 32 in decimal, because it's the 32nd number in the list.
7F in hexadecimal is the same as 127 in decimal, because it would be the 127th number in the list.
FF in hexadecimal is the same as 255 in decimal, because it would be the 255th number in the list.
100 in hexadecimal is the same as 256 in decimal, because it would be the 256th number in the list.
...and so on.
To convert between decimal and hexadecimal, you can open the Microsoft Calculator and click on View -> Scientific.
To convert from decimal to hexadecimal, click on Dec, enter the number and click on Hex.
To convert from hexadecimal to decimal, click on Hex, enter the number and click on Dec.
|Question:||Wait a minute... What does this have to do with ROM hacking?|
|Answer:||Well... As you probably know, everything in a computer is stored as zeros and ones. This means that a ROM must also be stored as zeros and ones. If we change these zeros and ones in the ROM, we modify the game.|
However, if we want to edit the ROM this way, it would be really painful to see just tons of rows like "0101001111010100001010100100011110100100", right? Therefore, we convert these zeros and ones into something more readable. It's usually converted into hexadecimal.
To edit the ROM, we use a so-called "Hex editor", a program that reads a file's (or in this case, a ROM's) zeros and ones, converts them to hexadecimal and allows the user to read and edit them.
A more advanced editor, like Lunar Magic, works in the same way. It reads a file's zeros and ones, but instead of showing the hexadecimal numbers, it translates the zeros and ones into blocks, sprites and graphics to make it easier for the user to see and edit levels.
Move and add blocks like in Lunar Magic or enter tons and tons of hexadecimal numbers in a program? Of course you use Lunar Magic for level editing. However, there's a lot of things that Lunar Magic can't edit. Then you have to use other programs. However, not even these can edit everything. The only program that can edit absolutely everything in a ROM is... that's right... a hex editor.
|Question:||Okay... How do I use a hex editor?|
|Answer:||You can use this handy tutorial to learn how to use a hex editor to edit SMW.