Save File

From MK7
Jump to navigation Jump to search

systemX.dat is the name of Mario Kart 7's save data file. It is stored inside the cartdrige or in the SD card, depending where the game is booted from. Usually, two of these files are stored in the save filesystem: systemX.dat and systemX+1.dat, where "X" = a number from 0 to 9. systemX+1.dat appears to be a backup of systemX.dat. Most of the time, the number will change after the game writes to the save. It's unknown if the X value the game writes has any meaning, or if it's randomly generated.

The class that controls this file in the code is System::SystemSaveData

File Format

The file has a fixed size of 0x50D4 bytes.

Offset Size Description
0x00 4 File magic. SSDC in ASCII (CDSS in big endian). CTR Dash System Save
0x04 2 Unknown. Always 5?
0x06 1 Unknown. Related to System::PlayerData?
0x07 1 Unknown.
0x08 0x60 Driver's Mii data. The exact format of this Mii data is CFSD, as it contains a 2-byte checksum at the end of the data. Note that all ghosts save the Mii data, but, aside of the name, said data cannot be seen in-game unless the player has raced as a Mii.
0x68 0x10 Unknown. Related to System::PlayerID
0x78 0x20 CecComment. Player's comment from the Mario Kart Channel stats, encoded in UTF-16.
0x98 2 Unknown.
0x9A 0x4E Unknown.
0xE8 4 Unknown.
0xEC 4 Unknown.
0xF0 4 Unknown.
0xF4 4 Unknown.
0xF8 4 Unknown.
0xFC 4 Unknown.
0x100 4 Unknown.
0x104 4 Unknown.
0x108 4 Unknown.
0x10C 0x600 RankingSaveData
0x70C 0x20 GrandPrixData
0x72C 4 Unknown.
0x730 0x41A0 OpponentList
0x48D0 0x800 PlayerFlagSaveData
0x50D0 4 CRC-32 of the entire file up to that point, in little endian.

RankingSaveData

GrandPrixData

GrandPrixData contains a list of 32 bytes, one for every cup and every engine class. It stores different settings, such as the trophy obtained and the star ranking. Each bit is formatted as follows:

TTTS SSSC

where:

  • TTT = Trophy type
  • SSSS = Rank (RaceSys::EGrandPrixRecord)
  • C = Completed flag. 0 = not completed, 1 = completed.

Trophy type

ID Description
0x00 No trophy
0x01 Bronze
0x02 Silver
0x03 Gold

Rank (RaceSys::EGrandPrixRecord)

ID Description
0x00 No rank
0x01 Unused
0x02 Unused
0x03 Unused
0x04 1 star
0x05 2 stars
0x06 3 stars

OpponentList

OpponentList consists of a list of 100 OpponentData entries, each representing an opponent found online. This is the list of Miis seen in the Friend / Opponents list from the Online menu.

OpponentData

Each entry corresponds to an opponent found online. It is 0xA8 bytes long.

Offset Size Description
0x00 8 Unknown.
0x08 4 VR
0x0C 4 Number of wins from the opponent's Mario Kart Channel stats.
0x10 4 Number of losses from the opponent's Mario Kart Channel stats.
0x14 4 Number of losses against the opponent.
0x18 4 Number of wins against the opponent.
0x1C 0x20 Unknown.
0x3C 2 Country code.
0x3E 2 Globe coordinates (latitude). The latitude of the physical coordinates on the Wi-Fi / Mario Kart Channel globe the Mii appears on.
0x40 2 Globe coordinates (longitude). The longitude of the physical coordinates on the Wi-Fi / Mario Kart Channel globe the Mii appears on.
0x42 1 Unknown.
0x43 1 Unknown.
0x44 0x60 Driver's Mii data. The exact format of this Mii data is CFSD, as it contains a 2-byte checksum at the end of the data. Note that all ghosts save the Mii data, but, aside of the name, said data cannot be seen in-game unless the player has raced as a Mii.
0xA4 4 Unknown.

PlayerFlagSaveData

Tools

The following tools can handle systemX.dat files: