1
0
Fork 0
mirror of https://github.com/notwa/mm synced 2024-05-06 00:53:22 -07:00
majora's mask scripts, and some ocarina stuff too
Go to file
2015-03-03 00:40:28 -08:00
boilerplate.lua convert EOL 2015-03-01 07:56:45 -08:00
chksum.py handle owl save sizes properly 2015-03-02 07:12:11 -08:00
MM addrs.lua convert EOL 2015-03-01 07:56:45 -08:00
MM movement tests.lua various updates 2015-03-01 07:56:21 -08:00
MM test chests.lua various updates 2015-03-01 07:56:21 -08:00
MM watch animations.lua animation ID monitoring script 2015-02-23 15:37:10 -08:00
mm-bitflags.txt readme 2015-02-19 11:25:44 -08:00
n64.py clean, refactor 2015-03-02 07:02:11 -08:00
README.md bump 2015-03-01 20:19:29 -08:00
util.py use debug ROM filenames, less verbose 2015-03-03 00:40:28 -08:00
Yaz0.py add ROM dumping utility 2015-03-01 07:58:42 -08:00
z64dump.py use debug ROM filenames, less verbose 2015-03-03 00:40:28 -08:00

Majora's Mask resources

i like to muck around in this game's memory.

spreadsheets

i put together some sheets to see if glitches could have desirable results.

  • Memory Addresses updates more frequently than MM addrs.lua.

  • Get Item Manipulation
    mzxrules did the original OoT one, i just jammed in MM's data for the item table and chest contents. spoilers: no desirable results besides light arrows, if it were even possible. potential crashes are not taken account for.

  • Entrance Data
    this is a huge laggy mess that brings google docs to its knees. enter an "exit value" in hex and it'll figure out exactly where it takes you. the three known wrong warps are in bold.

memory

link's struct begins at 801EF670 (US 1.0), and is some length long. i just pretend it's 0x4000 in size, since that's the most you can jam in a save file.

two regions of 0x960 bytes are allocated for all the scene flags in the game. the first (801EFAE0 US 1.0) is loaded from save files, the second (801F35D8 US 1.0) is used for in-game changes. basically, edit the first for save hacking, and the second for in-game hacking.

each area in the game uses 0x14 bytes of scene flags. this implies there's 0x78 possible areas: 0x78*0x14 = 0x960.

save files

save files are just memory dumps of link's struct. regular SoT saves are 0x2000 in size, owl saves are 0x4000. owls use the extra space primarily (exclusively?) to store the pictograph picture.

note that some values don't get copied when reading/writing save files, even owl saves.

the game checks a checksum, and for the text "ZELDA3". each slot has one backup copy of itself, though they don't seem to be used? if a slot is corrupted, it will show up as empty in the menu.

the checksum is a 16-bit sum of all bytes up to that point, allowing overflows. i've written a checksum-fixing program in python for bizhawk savefiles.

owl saves always have 0x24 added to their checksum for some reason.

save files are ordered as such, offset from the first:

  • 0x00000 - slot 1
  • 0x02000 - slot 1 backup
  • 0x04000 - slot 2
  • 0x06000 - slot 2 backup
  • 0x08000 - slot 1 (owl)
  • 0x0C000 - slot 1 backup (owl)
  • 0x10000 - slot 2 (owl)
  • 0x14000 - slot 2 backup (owl)

bizhawk save files, at the time of writing, have the first file offset to 0x20800. also, their byte order is wrong.

here's my usual process for hacking on save files:

alias revend='objcopy -I binary -O binary --reverse-bytes=4'
s="Legend of Zelda, The - Majora's Mask (USA).SaveRAM"
x=mm-save.xxd
revend "$s"
xxd "$s" > $x
$EDITOR $x
xxd -r $x > "$s"
./chksum.py $s
revend "$s"

save files (for download)

because no one likes first cycle.

sometime i'll bother checking what the bombers/lottery codes are for these.

bitfields

here's an incomplete document on some of link's bitfields for JP 1.0.