INSTRUCTIONS FOR ADDING THIS MOD TO OTHER HACKS

First count the number of levels you want for the mod. In the ASM code, look for addiu t0, t0, $ffe4.

We are going to change the hex value of $FFE4 to display the correct level of options in the menu. 

Take 0x1000 - the number of levels you want. You can use the windows calculator in programmer mode to find this value. Just make sure you choose HEX. 

If we want 6 levels, then we do 0x1000 - 0x06 and get 0xFFA. Add another F to the front and you have 0xFFFA. 

The line changes to: addiu t0, t0, $fffa. 

In a hex editor, go to 0x120F000. This is where the table of levels goes and where things get a little tricky. Open up LEVELTABLE.txt. By default you can see every level is used, but some hacks might not use them all. So with our example that only has 6, we will only want 6 level slots in the menu. Here's how the hex is laid out for SM64 Sapphire:

4D4D0000 00000000 C0400000 F109010A 
50500000 00000000 C0C00000 F118010A 
4C4C0000 00000000 B2400000 F10C010A 
54540000 00000000 B2C00000 F105010A 
536C6964 65000000 A4400000 F11B010A 
426F7773 65720000 A4C00000 F115010A

The first 8 bits are raw text. So this is where you would put the level name. You are limited to 8 characters. In HxD, if you have decoded text turn on, you can type into that area.

The next 2 bits are the coordinates of the text. The left bit is the Y coordinate, and the right bit is the X coordinate. 0,0 is at the bottom left corner of the screen. The next two bits are just zeroes and can be ignored.

The last 4 bits contains the warp information itself. The first bit is F1. The second bit is the level ID number. These are constant and will not change. The next bit is the area ID number (generally 0x01 but not always). The last bit is the warp ID number (generally 0x0A, but not always). You can find these values by using Quad64.

Basically, each line is:
[AA AA AA AA AA AA AA AA] [YY YY] [XX XX] [00 00] [F1] [BB] [CC] [DD]

AA = level name
YY = y coordinate, where 0 = bottom of screen
XX = x coordinate, where x = left of screen
BB = level ID number
CC = area ID number (usually 0x01)
DD = warp ID number (usually 0x0A)

At 0x120F1D0, write 0x2A000000 00000000 00000000 00000000. For all the other slots that were not used BEFORE this, fill in with zeroes.

Extract cajeasm.zip and open the program. Apply the ASM to your edited ROM. Drag the ROM onto checksum.exe. You are done!

Troubleshooting: 
* "In a permanent loop that cannot be exited" - Drag the ROM onto checksum.exe and try again.
* "I get an error about 0x120C000" - you did not properly apply the ASM patch. try changing all instances of $ to 0x. If your ASM patcher is not working, see ASMHEX.txt.
* "My level warp is not working" - double check your level table at 0x120F000.
* "The cursor on my menu is not visible/in a weird spot" - Make sure you edited the line addiu t0, t0, $FFE4. 