Majora's Mask

ZC: Documentation

Save Data

The save data is a 256kb file named EEP_NSZE for USA and EEP_NSZJ for Japanese. It's contents are not laid out the exact same between the two versions. USA has only two files along with two owl statue saves while Japanese has three files and no owl statue saves. Not all of the space in the file is used. For the USA save data ~62.5% of the file isn't used while on Japanese ~56.25% isn't used.

Below is a table. This lists all the offsets of where the corresponding data appears in the file for each version.

Name
USA
Japanese
File 1
0x00000-0x01FFF
0x00000-0x03FFF
File 1 (copy)
0x02000-0x03FFF
0x10000-0x13FFF
File 2
0x04000-0x05FFF
0x04000-0x07FFF
File 2 (copy)
0x06000-0x07FFF
0x14000-0x17FFF
File 3
N/A
0x08000-0x0BFFF
File 3 (copy)
N/A
0x18000-0x1BFFF
Owl Save 1
0x08000-0x0BFFF
N/A
Owl Save 1 (copy)
0x0C000-0x0FFFF
N/A
Owl Save 2
0x10000-0x13FFF
N/A
Owl Save 2 (copy)
0x14000-0x17FFF
N/A
Unknown (usually 0xA51D)
0x18000-0x18001
0x1C000-0x1C001
Language
0x18002
0x1C002
Audio
0x18003
0x1C003
Unknown (usually 0x00)
0x18004
0x1C004
ZTarget
0x18005
0x1C005
Padding (all bytes are 0xAA)
0x18006-0x3FFFF
0x1C006-0x3FFFF

The padding section is completely unused. This is where all of ZC's contents are placed.

Despite it not being used it is still saved. This means that any changes that happen to this data, such as the state of the codes, will be saved via Song of Time in game.

ZC Data

ZC's data is placed into the unused padding section of the save data and begins at offset 0x1C080 on both versions. This makes it consistent across both versions even though it leaves extra unused space on the USA version.

Below is a table. This lists all the offsets of where the corresponding data appears in the file.

Name
Type
Offset
RAM Address
Codes State
flag
0x1C080
817393E0
Mem File State
flag
0x1C081
817393E1
Tatl Texts State
flag
0x1C082
817393E2
Lock Warp State
flag
0x1C083
817393E3
Tunic Edit State
flag
0x1C084
817393E4
Tunic Color Channel State
flag
0x1C085
817393E5
Rainbow Tunic State
flag
0x1C086
817393E6
Mem File Slot State
flag
0x1C087
817393E7
Tunic Color
rgba
0x1C088-0x1C08B
817393E8
Tunic Rainbow Color
rgba
0x1C08C-0x1C08F
817393EC
Item Inventory
Table (byte)
0x1C090-0x1C0A7
817393F0
Mask Inventory
Table (byte)
0x1C0A8-0x1C0BF
81739408
Camera Data
Table (mixed)
0x1C0C0-0x1C0DF
81739420
Warps
Table (half word)
0x1C0E0-0x1C1BB
81739440
Mem File 1
Table (mixed)
0x1C1E0-0x221DF
81739540
Mem File 2
Table (mixed)
0x221E0-0x281DF
8173F540
Mem File 3
Table (mixed)
0x281E0-0x2E1DF
81745540
Gecko Code List
Table (double word)
0x2E1E0-0x3FFFF
8174B540

State Flags

All State flags determines what color and icon to show over the HUD Rupee indicator at the bottom left of the screen.

Codes State

0x00 Off
0x01 On

Mem File State

0x00 Off
0x01 Slot Select
0x02 Save
0x03 Load

Tatl Texts State

0x00 Off
0x01 On

Lock Warp State

0x00 Off
0x01 On

Tunic Edit State

0x00 Off
0x01 On

Tunic Color Channel State

0x01 Red
0x02 Green
0x03 Blue

Rainbow Tunic State

0x00 Off
0x01 On

Mem File Slot State

0x00 Slot 1
0x01 Slot 2
0x02 Slot 3

Tunic Colors

These control what color Link's tunic currently is. The regular color is just static but can be edited to any rgb value. The rainbow color is constantly cycling the colors of the rainbow every frame.

Item and Mask Inventory

The inventories are a table of bytes for all the items in the inventory. The item and mask inventory codes get the slot that the pause cursor is currently on. Then it goes into the table for that item slot and gets the value then places it into that slot of the inventory.

Camera Data

The camera data is the stored location of where the camera was when the camera control code gets activated. This is then used to restore the camera's position and angle when camera control is then disabled.

Warps

The warps is a table of all the locations that can be warped to using the set warp code. Based on what the rupee count is the set warp code calculates which warp from the table to use.

Mem Files

The mem files store data relative to the current game state. This data can be stored and then loaded back. Each mem file is 0x6000 (24,576) bytes and consists of the following data.

Note that sub offsets are relative to the current data's offset. i.e. Link's Position offset is 0x0000, then the sub offset for Y is 0x0004. This means the offset into the mem file for Link's Y Position is then 0x0004 (0x0000 + 0x0004).

Name
Size (bytes)
Offset
Link's Position
X
Y
Z
0x000C
0x0004
0x0004
0x0004
0x0000
0x0000
0x0004
0x0008
Link's Y Rotation
0x0002
0x000C
Void Out Spawn Variable
0x0001
0x000E
Void Out Spawn Scene and Room
0x0004
0x0010
Magic Meter Size
0x0002
0x0014
Stored Song
0x0001
0x0016
Camera Mode
0x0001
0x0017
Camera's Data
X Target
Y Target
Z Target
X Position
Y Position
Z Position
0x0018
0x0004
0x0004
0x0004
0x0004
0x0004
0x0004
0x0018
0x0000
0x0004
0x0008
0x000C
0x0010
0x0014
B and C-Button Restrictions
0x0004
0x0030
HUD Transparency
0x000E
0x0034
Pause Menu State
0x0088
0x0042
Rock Sirloin
0x0001
0x00CA
Event Flags
0x0008
0x02E4
Save Context
0x1390
0x02EC
Scene Flags
0x0960
0x167C
Scene Flags (current loaded)
0x0024
0x1FDC
Icon Textures
B Button
C-Left Button
C-Down Button
C-Right Button
0x4000
0x1000
0x1000
0x1000
0x1000
0x2000
0x0000
0x1000
0x2000
0x3000

Gecko Code List

The code list is basically an array of all the lines of gecko code. The code list currently starts at 0x221E0 and can extend all the way to the end of the file. This means that currently there is space for 9,156 lines of gecko code. To view the current list of codes head over to the Code List.

The code list is currently up to date as of the 0.2 version of the Save Data. Something important to keep in mind is the order of the codes. All of the codes listed are in the exact order as they appear in the save data. The codehandler simply iterates over all the lines of gecko code and executes them. Many codes will start a condition that does not get immediately ended. Meaning any following codes are also under that condition until it is ended.