Save Format
From CloudModding MM Wiki
Contents
SRAM Layout
Japanese Releases
Start | End | Description |
---|---|---|
000000 | 004000 | File 1 |
004000 | 008000 | File 2 |
008000 | 00C000 | File 3 |
00C000 | 010000 | 128-byte settings |
010000 | 014000 | File 1 backup |
014000 | 018000 | File 2 backup |
018000 | 01C000 | File 3 backup |
01C000 | 020000 | 128-byte settings backup |
International Releases
Start | End | Description |
---|---|---|
000000 | 004000 | File 1 (truncated to 8 KiB + backup 8 KiB) |
004000 | 008000 | File 2 (truncated to 8 KiB + backup 8 KiB) |
008000 | 00C000 | File 1 owl buffer (+ 0x2000 for Pictograph Box color buffer) |
00C000 | 010000 | File 1 owl backup (+ 0x2000 for Pictograph Box color buffer) |
010000 | 014000 | File 2 owl buffer (+ 0x2000 for Pictograph Box color buffer) |
014000 | 018000 | File 2 owl backup (+ 0x2000 for Pictograph Box color buffer) |
018000 | 01C000 | 128-byte global settings |
01C000 | 020000 | reserved |
Save Context
The "Save Context" is a term used to reference the z_common_data structure, or the home address of the variables saved by the game. Since the save file is created by copying the 0x???? bytes from the start of the save context, it's possible to peek in ram to determine what each save variable does.
Location in Ram | |||||
---|---|---|---|---|---|
U 1.0 | 801EF670 |
Save Format (International)
Offset | Data Type | Usage | Additional Info |
---|---|---|---|
0x0000 | s32 | Entrance index | Stores the entrance Link starts/respawns at. Check the Entrance Table for a listing of all values. |
0x0004 | u8 | Equipped Mask | Currently equipped player mask |
0x0007 | u8 | Link Age | |
0x0008 | s32 | Cutscene Number | Used to trigger cutscenes. Values FFF0 - FFFF trigger cutscenes 0-F. |
0x000C | u16 | World Time | Sets the current time for the world clock |
0x000E | u16 | Owl Save Location | |
0x0010 | s32 | Night Flag | |
0x0018 | s32 | Current Day | Stores the current day (0-4) |
0x0020 | u8 | Player Form | 4 = Link, 3 = Deku, 2 = Zora, 1 = Goron, 0 = Fierce Deity |
0x0022 | u8 | Have Tatl | |
0x0023 | u8 | Is Owl Save | |
0x0024 | char[6] | Save Magic String | Contains the string "ZELDA3". If different, the save will be considered corrupt even if the checksum is valid |
0x0034 | s16 | Heart Containers | 0x10 is equivalent to 1 heart container |
0x0036 | s16 | Health | 0x10 is equivalent to 1 full heart |
0x0038 | s8 | Magic meter size | automatically sets itself to 0, 1 or 2 depending on your upgrades |
0x0039 | s8 | Current magic amount | 0x30 = half bar, 0x60 = full bar |
0x003A | s16 | Rupees | |
0x003C | u16 | Sword Health | Razor Sword hit count |
0x00D3 | byte | Double Defense Hearts | Sets how many hearts should be displayed as being "Double Defense" hearts. |
Structs
Scene Flags
There are two sets of scene flags in Majora's Mask, permanent and the cycle scene flags. Permanent scene flags start at Save Context + 0x00F8, and persist for the lifetime of the save, while cycle scene flags are located at Save Context + 0x42F4 in the Japanese version and Save Context + 0x3F68 in the international releases and persist until the end of the current 3 day cycle. Both share a similar structure:
0x00 Chest Flags 0x04 Switch Flags (0x00) 0x08 Switch Flags (0x20) 0x0C Room Clear Flags 0x10 Collectible Flags (0x00) ## 0x14 //size of the cycle scene flags ## 0x1C //size of the permanent scene flags