1
0
Fork 0
mirror of https://github.com/notwa/mm synced 2024-05-02 23:33:23 -07:00
majora's mask scripts, and some ocarina stuff too
Go to file
2016-01-02 02:00:05 -08:00
dump a dump folder for (gasp) dumps 2016-01-02 02:00:05 -08:00
Lua little tweaks 2015-12-30 02:35:58 -08:00
.gitattributes NEVER AGAIN. 2015-03-08 09:52:19 -07:00
.gitignore a dump folder for (gasp) dumps 2016-01-02 02:00:05 -08:00
chksum.py specifically use python 3 2015-11-29 06:13:42 -08:00
dumptext.py reorganize JP text commands and stuff 2015-11-29 16:06:22 -08:00
heuristics.py remove actor heuristics for now 2015-03-13 12:16:26 -07:00
mm-bitflags.txt readme 2015-02-19 11:25:44 -08:00
n64_fast.pyx rewrite functions in pyrex for performance 2015-03-04 07:21:18 -08:00
n64.py rewrite functions in pyrex for performance 2015-03-04 07:21:18 -08:00
README.md update main readme 2015-12-17 14:13:07 -08:00
util.py use debug ROM filenames, less verbose 2015-03-03 00:40:28 -08:00
Yaz0_fast.pyx rewrite functions in pyrex for performance 2015-03-04 07:21:18 -08:00
Yaz0.py rewrite functions in pyrex for performance 2015-03-04 07:21:18 -08:00
z64dump.py specifically use python 3 2015-11-29 06:13:42 -08:00

Miscellaneous Zelda 64 Resources

i like to muck around in the memory of these games.

those who are more interested in the ROM will find the binary template repo more resourceful.

Majora's Mask

for brevity, all addresses written here are given for the original US version. refer to the spreadsheets or Lua tables for their equivalent in other versions.

spreadsheets

some sheets have been put together to dump data in. some of them can be used to predict the result of glitches.

save files

save contents are mostly documented by the save file binary templates.

in the versions of the game with owl saves, regular saves are 0x100C in size, and owl saves are 0x3CA0. owls use the extra space primarily to store the pictograph picture.

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. i've also written an 010 Editor script and its OoT variant for properly formed save files, such as those made by nemu64.

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

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 (in bash) 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

scene flags

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

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

the current scene's flags are always copied into the same place in memory. they appear in a different order than in save files, however.

(four bytes each)
803E8978 corresponds to offset 0x4 in the save file.
803E897C corresponds to offset 0x8.
803E8988 corresponds to offset 0x0.
803E898C corresponds to offset 0xC.
803E8994 corresponds to offset 0x10.

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