If you appreciate the work done within the wiki, please consider supporting The Cutting Room Floor on Patreon. Thanks for all your support!

Help:Contents/Finding Content/Memory editing guide

From The Cutting Room Floor
Jump to navigation Jump to search
Hmmm...
To do:
This page will probably need to be revised by someone but at least it is a start.

Using a memory editor is pretty straight forward. A lot of emulators have them and they can be a useful tool because they allow us to see/modify data in-game.

The Hexadecimal System

First off, the numbering system that every editor uses is hexadecimal, or hex for short. What makes hexadecimal different from the decimal system is that it has a base of 16 instead of a base of 10. In plain English, base means the range of numbers that can occupy a single digit. For example, you know that for the decimal system, any number from 0 through 9 can occupy a single digit. These ten numbers are a part of the base. So we can count

0, 1, 2, 3, 4, 5, 6, 7, 8, 9

Here we run into a slight problem... what happens when we want to count higher than 9? The answer is obvious (I hope). When we go through the whole base of numbers for the system, we increase the digit to the left and set the current digit to zero. So after 9 is 10 then 11 and 12 and so forth. Hexadecimal follows the exact rule except that we have a base of 16, not of 10. So instead of just going from 0 to 9 we need six more numbers to represent a base of 16. This is done by using the letters A through F. So the first 16 numbers in the hexadecimal system are

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F

These sixteen numbers are part of the base for hex. So now the question is, what comes after F? Using the rule we used for the decimal system, the next number would be 10. This should be read as One Zero not ten! Writing down 10 in hex is completely different from writing down 10 in decimal! Converting the numbers, 10 in hex is 16 in decimal. It is important to state which number system you are using when you record numbers because the numbers in one system don't necessarily mean the same numbers in the other. If you ever want to see what a hex number is in decimal, you can easily google a hex to decimal converter. A common notation used to express a hex number is 0x(THE HEX NUMBER). So instead of saying 10 in hex, it is more convenient to say 0x10.

Like the decimal number system, you can use hex to perform math although doing something like this is almost never required for memory editing. It is only represented here to give a better feel for the hex system.

7 + 9 = 10, E - 3 = B, A * B = 6E, 14 / A = 2

You might be wondering why hex is used instead of the decimal system. Why bother having to learn a new numbering system to edit memory? The reason is because it allows for an easier representation of data.

How Memory Editors Look

The picture below is how most memory editors look. You can see that in the memory editor, there is a table divided into three separate columns. The left column is the address column. You can see that every row that follows the previous increases by 0x10(16 in decimal) . The middle column is where the actual data is being stored and where you can make edits. As you can see, there are 16 pairs of zeros per row. Each pair of zeros(it doesn’t have to be zeros but in this case it is) is one byte worth of data. A particular byte in a row is defined by how far it is from the first pair in hex. So the first byte is a row is byte zero. The sixth byte is byte five. The last byte is byte F. It is important to note that not all memory editors will display the middle column in this fashion. Some might cram all the bytes and leave no spaces. Regardless, a byte of data is still two digits no matter how the middle is set up. The right column is the ASCII conversion of the middle table. This can be useful for finding text/strings in memory but you don’t usually edit memory from this column.

A Basic Memory Editor.png

Putting It All Together

It is very typical that memory addresses of interest are expressed in hex. This site is has many pages that give specific addresses that can have their bytes altered in order to find unused content. For example, if you look at the Oracle of Seasons page, it describes how to edit your item inventory to find unused items by going to address 0xC682 and changing the value. To locate this address in the memory viewer, you would search the left column for 0xC680. Once that row is reached, you would count over by 2 bytes starting from the 0th byte. Editing memory is usually straight forward. In involves clicking what byte you want to edit and then typing whatever (hex) number you want it changed to. The difficult part is trying to find out what bytes to change and what to change them to in order to find unused content. Changing bytes at random doesn’t guarantee anything. You might get lucky and stumble onto something unused. However, more often than not, either nothing will happen or you will just crash the game. A more effective way to find possible unused content is to play the game and notice some patterns within the memory viewer. This is how unused items were discovered in Oracle of Seasons. This was done by switching items constantly and seeing where in the memory data was being changed while items were being switched.