Super Mario 64 saves game progress internally in the cartridge itself, at a time when most games used memory cards. There were four common save types: EEPROM 4K, EEPROM 16K (DK64), SRAM (Ocarina of Time) and FlashRAM (Pokemon Snap). Super Mario 64 uses the EEPROM 4K save type which only stores 512 bytes of data.
The 512-byte EEPROM is divided into four sections for save files, with an additional section for global data (4*112 + 64). Each section contains two identical copies of the save data: the second is a duplicate backup copy, kept in case of data corruption.
All regional 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) | |||
---|---|---|---|
Start offset | End offset | Size | Short 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) | |||
---|---|---|---|
Start offset | End offset | Size | Short 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, 'DA' )
|
0x0036 | 0x0037 | 2 |
16-bit checksum This is simply 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 | Short description |
0x00 | 1 | 8-bit int |
Course ID specifier (Only the values below are valid 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 short description text would be assuming the bit is ON.
Lost cap: bit | ||
Offset | Bit pos | Short 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 | Short 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 | Short 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) | |||
---|---|---|---|
Start offset | End offset | Size | Short description |
0x0000 | 0x000F | 16 | Coin highscore tiebreaker (When two files have the same score for a course, 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 | unknown or unused |
0x001C | 0x001D | 2 | Magic number ( 0x4849, 'HI' ) |
0x001E | 0x001F | 2 |
16-bit checksum This is simply the sum of all previous bytes in the section, stored as a 16-bit int (big endian) |