Super Mario 64 saves progress using a 4K EEPROM save chip within the cartridge, allowing for 512 bytes of data storage.
The game divides this storage space into four main sections for save slots (112 bytes each), followed by an additional section for global data (64 bytes). Each section actually contains a duplicate copy of the data, used as a backup. So there's only really 56 bytes per game save slot, and 32 bytes for the global data.
All official versions of Super Mario 64 follow the memory structure described in this document. However, the European version has an additional field in global data for saving the selected language.
EEPROM structure (512 bytes) | |||
---|---|---|---|
First offset | Last offset | Size | Description |
0x0000 | 0x0037 | 56 | Game data, [Mario A] |
0x0038 | 0x006F | 56 | Game data, [Mario A – Backup] |
0x0070 | 0x00A7 | 56 | Game data, [Mario B] |
0x00A8 | 0x00DF | 56 | Game data, [Mario B – Backup] |
0x00E0 | 0x0117 | 56 | Game data, [Mario C] |
0x0118 | 0x014F | 56 | Game data, [Mario C – Backup] |
0x0150 | 0x0187 | 56 | Game data, [Mario D] |
0x0188 | 0x01BF | 56 | Game data, [Mario D – Backup] |
0x01C0 | 0x01DF | 32 | Global data |
0x01E0 | 0x01FF | 32 | Global data, [Backup] |
Game data, overall structure (56 bytes) | |||
---|---|---|---|
First offset | Last offset | Size | Description |
0x0000 | 0x0007 | 8 | Coordinates of Mario's lost cap |
0x0008 | 0x0024 | 29 | Boolean flags (Level flags and misc flags - stars, cannons and others) |
0x0025 | 0x0033 | 15 | Coin high scores |
0x0034 | 0x0035 | 2 | Magic number (0x4441 , ASCII 'DA ')
|
0x0036 | 0x0037 | 2 |
16-bit checksum The sum of all previous bytes in the section, stored as a 16-bit int (big endian) |
Coordinates of Mario's lost cap | |||
---|---|---|---|
Note: This coordinate system seems to be a remnant of a removed feature for Mario's cap location. The Course ID specified is used for misc flag |
|||
Offset | Size | Type | Description |
0x00 | 1 | 8-bit int |
Course ID specifier (Only used for flag 0x09:0 ):
0x08: Shifting Sand Land
|
0x01 | 1 | 8-bit int | Area ID specifier (always set to 0x01 ) |
0x02 | 2 | signed 16-bit int | x coordinate |
0x04 | 2 | signed 16-bit int | y coordinate |
0x06 | 2 | signed 16-bit int | z coordinate |
Misc flags | ||
---|---|---|
Note: The misc flag bytes are listed in reverse (0x0B to 0x09), to highlight the order of bits. The description text would be assuming the bit is ON.
Lost cap: Bit flag | ||
Offset | Bit | Description |
0x0B | 0 |
File is occupied on main menu, showing star amount Generally marks a file as "in use". Can be used to skip intro with 0 stars! |
1 | Wing Cap is activated | |
2 | Metal Cap is activated | |
3 | Vanish Cap is activated | |
4 | Have key - Basement | |
5 | Have key - 2nd Floor | |
6 | Key door is unlocked - Basement | |
7 | Key door is unlocked - 2nd Floor | |
0x0A | 0 |
Portal is moved back (Dire Dire Docks entrance) Saved when collecting Star 1: Board Bowser's Sub to allow entry into Bowser in the Fire Sea. |
1 | Castle moat is drained | |
2 | Star door animation seen (1 star, Princess's Secret Slide) | |
3 | Star door animation seen (1 star, Whomp's Fortress) | |
4 | Star door animation seen (3 stars, Cool, Cool Mountain) | |
5 | Star door animation seen (3 stars, Jolly Roger Bay) | |
6 | Star door animation seen (8 stars, Bowser in the Dark World) | |
7 | Star door animation seen (30 stars, Bowser in the Fire Sea) | |
0x09 | 0 | Lost cap - Mario's cap is lost in: Level ID (Depends on coordinate level ID) |
1 | Lost cap - Mario's cap is lost in: Shifting Sand Land | |
2 | Lost cap - Mario's cap is lost in: Tall, Tall Mountain | |
3 | Lost cap - Mario's cap is lost in: Snowman's Land | |
4 | Star door animation seen (50 stars, 3rd Floor/Tick Tock Clock) | |
5 | unused or unknown | |
6 | unused or unknown | |
7 | unused or unknown |
Level flags | |||
---|---|---|---|
Note: There are only 120 stars in the game, but the data format allows for up to 182 stars (7*26). This is made possible because each level is assigned a byte that can store up to 7 individual stars, but not all levels use them all. The last byte does not store any stars normally, however some ROM hacks like Star Road can use it.
Strangely, bit 7 doesn't affect the level that the byte references like the stars do. Instead it affects the previous level in the list. For example, if bit 7 bit is set on the "Whomp's Fortress" byte, the cannon is then activated in Bob-omb Battlefield. It is possible to activate cannons on levels that originally had no cannon. The cannon object can be added through a ROM hack, however not all levels can have a cannon hacked in. Specifically it is not possible in The Secret Aquarium, and anywhere inside the interior castle or the Bowser boss battle maps. I have no clue about the "The End" screen with a cake painting. I do know that a working cannon can be activated on the outside of the castle (courtyard included). |
|||
Offset | Description | ||
0x08 | Castle | ||
0x0C | 1 Bob-omb Battlefield | ||
0x0D | 2 Whomp's Fortress | ||
0x0E | 3 Jolly Roger Bay | ||
0x0F | 4 Cool, Cool Mountain | ||
0x10 | 5 Big Boo's Haunt | ||
0x11 | 6 Hazy Maze Cave | ||
0x12 | 7 Lethal Lava Land | ||
0x13 | 8 Shifting Sand Land | ||
0x14 | 9 Dire, Dire Docks | ||
0x15 | 10 Snowman's Land | ||
0x16 | 11 Wet-Dry World | ||
0x17 | 12 Tall, Tall Mountain | ||
0x18 | 13 Tiny-Huge Island | ||
0x19 | 14 Tick Tock Clock | ||
0x1A | 15 Rainbow Ride | ||
0x1B | Bowser in the Dark World | ||
0x1C | Bowser in the Fire Sea | ||
0x1D | Bowser in the Sky | ||
0x1E | The Princess's Secret Slide | ||
0x1F | Cavern of the Metal Cap | ||
0x20 | Tower of the Wing Cap | ||
0x21 | Vanish Cap Under the Moat | ||
0x22 | Wing Mario Over the Rainbow | ||
0x23 | The Secret Aquarium | ||
0x24 | Unused level: "The End" screen (Cake picture after credits) |
Level high scores (Coins) | |||
---|---|---|---|
The high scores are simply unsigned 8-bit integers (0-255). | |||
Offset | Size | Type | Description |
0x25 | 1 | 8-bit int | Bob-omb Battlefield |
0x26 | 1 | 8-bit int | Whomp's Fortress |
0x27 | 1 | 8-bit int | Jolly Roger Bay |
0x28 | 1 | 8-bit int | Cool, Cool Mountain |
0x29 | 1 | 8-bit int | Big Boo's Haunt |
0x2A | 1 | 8-bit int | Hazy Maze Cave |
0x2B | 1 | 8-bit int | Lethal Lava Land |
0x2C | 1 | 8-bit int | Shifting Sand Land |
0x2D | 1 | 8-bit int | Dire, Dire Docks |
0x2E | 1 | 8-bit int | Snowman's Land |
0x2F | 1 | 8-bit int | Wet-Dry World |
0x30 | 1 | 8-bit int | Tall, Tall Mountain |
0x31 | 1 | 8-bit int | Tiny-Huge Island |
0x32 | 1 | 8-bit int | Tick Tock Clock |
0x33 | 1 | 8-bit int | Rainbow Ride |
Global data structure (32 bytes) | |||
---|---|---|---|
First offset | Last offset | Size | Description |
0x0000 | 0x000F | 16 | Coin highscore tiebreaker When two slots have the same coin score, the most recently saved score wins. 3: Newest ... 2 ... 1 ... 0: Oldest |
0x0010 | 0x0011 | 2 |
Sound setting
0x00: Stereo
|
0x0012 | 0x0013 | 2 |
Language setting (PAL version only)
0x00: English
|
0x0014 | 0x001B | 8 | unused |
0x001C | 0x001D | 2 | Magic number (0x4849 , ASCII 'HI ') |
0x001E | 0x001F | 2 |
16-bit checksum The sum of all previous bytes in the section, stored as a 16-bit int (big endian) |