Editing RAM

From OoT Randomizer Wiki
Revision as of 18:51, 12 July 2021 by ETR BTF (talk | contribs) (started work on the section for how to find the right address and value)

This page is still a work in progress

Bizhawk

With your ROM loaded, head to ToolsHex Editor. A new window should pop up. Next, go to OptionsMemory Domains and select System Bus. Also go to OptionsData Size and select 1 Byte. Navigate to the relevant address (e.g. 8011A644) by hitting CTRL + G or going to OptionsGo to Address.... To make changes to the RAM, right-click the relevant byte and select Poke Address. In the new window enter the value you want to change the byte to and hit Poke to confirm. Your changes should be reflected in the game immediately.

Project64

To enable the debugger, go to OptionsSettings...Advanced and check Enable debugger. Click Apply.

Close the settings window and go to DebuggerView memory.... A new window should pop up. Right-click any of the bytes in this window and go to Byte group size1. Navigate to the relevant address (e.g. 8011A644) by entering the address in the field in the top left corner of the window. To make your changes, simply select the location where you want to make your change and type in the value. Your changes should be reflected in the game immediately.

Finding the Correct Address and Value

In everyday life we use a "base 10 numeral system", which means that we use 10 different symbols for denoting numbers: "0-9". When we add one more to 9, we loop back to 0 but prefix it with a 1 to indicate that we've looped back once and we get the number "10". The hex editor/debugger uses a "base 16 numeral system" instead, which means it uses 16 different symbols for denoting numbers: "0-9" (for the numbers 0 to 9) and "A-F" (for the numbers 10-15). "Decimal numbers" are what we call the symbols of the first system and "hex numbers" are what we call symbols of the second system. To properly use the hex editor/debugger you will need to count in hex numbers. Fortunately, most calculators and many tools online can convert numbers between both numeral systems for you.

Item Select Screen

The locations of your items on the item select screen (i.e. items you can put on C buttons) start at address 8011A644 and last for 24 bytes (i.e. 24 double digit hex numbers) as seen in the image below.

The value of the first byte determines what item is in the first slot, the value of the second byte determines what item is in the second slot, etc. The ordering for the slots follows the "logical" western reading order, that is it starts in the top left corner and goes left-to-right and top-to-bottom. Below is a table that tells you which hex numbers correspond to which items. Keep in mind that this table is only true for these 24 bytes in the RAM.

If you want to test if you understood everything so far correctly, then try to work out the inventory of the RAM in the first image of this section. The answer is: Deku Nuts in the Deku Nuts slot, Din's Fire in the Din's Fire slot, Ocarina of Time in the Ocarina slot, and Megaton Hammer in the Farore's Wind slot (whoops!).

To be continued

Equipment Screen

Quest Status Screen