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
The file has a fixed size of 0x50D4 bytes.
|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?|
|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.|
|0x50D0||4||CRC-32 of the entire file up to that point, in little endian.|
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:
- TTT = Trophy type
- SSSS = Rank (RaceSys::EGrandPrixRecord)
- C = Completed flag. 0 = not completed, 1 = completed.
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.
Each entry corresponds to an opponent found online. It is 0xA8 bytes long.
|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.|
|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.|
|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.|
The following tools can handle systemX.dat files: