rksys.dat
rksys.dat is the name of Mario Kart Wii's save data file. It is stored in /title/00010004/524d43**/data from the Wii's NAND, where ** is the hexadecimal value for the letter that corresponds to the game's region (either RMCP, RMCE, RMCJ or RMCK).
File Format
The file has a fixed size of 0x2BC000 (or 2867200 in decimal) bytes. Each section is also fixed to specific offsets and sizes.
Header
Offset | Type | Description |
---|---|---|
0x00 | String | File magic. RKSD in ASCII. |
0x04 | String | Unknown. Always 0006 in ASCII. Possibly a version number? |
0x08 | End of file header |
RKPD
The file can contain up to 4 RKPD sections. These sections contain profile data, and are created with each new license. Each RKPD is 0x8CC0 bytes long.
Offset | Description |
---|---|
0x04 | Top left license. |
0x8CC8 | Top right license. |
0x11988 | Bottom left license. |
0x1A648 | Bottom right license. |
Mii Data
Offset | Type | Description |
---|---|---|
0x00 | String | Section magic. RKPD in ASCII. |
0x04 | Byte[0x10] | Unknown. |
0x14 | String | Mii's UTF-16 encoded name. Always 0x14 bytes long. |
0x28 | Byte[4] | Mii's Avatar ID. |
0x2C | Byte[4] | Mii's Client ID. |
Completion flags
Offset | Type | Description |
---|---|---|
Cup completion | ||
0x30 | 1 bit | Mushroom Cup (50cc) |
0x30.1 | 1 bit | Lightning Cup (50cc) |
0x30.2 | 1 bit | Leaf Cup (Mirror) |
0x30.3 | 1 bit | Leaf Cup (150cc) |
0x30.4 | 1 bit | Leaf Cup (100cc) |
0x30.5 | 1 bit | Leaf Cup (50cc) |
0x30.6 | 1 bit | Banana Cup (Mirror) |
0x30.7 | 1 bit | Banana Cup (150cc) |
0x31 | 1 bit | Banana Cup (100cc) |
0x31.1 | 1 bit | Banana Cup (50cc) |
0x31.2 | 1 bit | Star Cup (Mirror) |
0x31.3 | 1 bit | Star Cup (150cc) |
0x31.4 | 1 bit | Star Cup (100cc) |
0x31.5 | 1 bit | Star Cup (50cc) |
0x31.6 | 1 bit | Flower Cup (Mirror) |
0x31.7 | 1 bit | Flower Cup (150cc) |
0x32 | 1 bit | Flower Cup (100cc) |
0x32.1 | 1 bit | Flower Cup (50cc) |
Character unlocks | ||
0x32.2 | 1 bit | Mii (Outfit B) |
0x32.3 | 1 bit | Mii (Outfit A) |
0x32.4 | 1 bit | Rosalina |
0x32.5 | 1 bit | Funky Kong |
0x32.6 | 1 bit | King Boo |
0x32.7 | 1 bit | Dry Bowser |
0x33 | 1 bit | Birdo |
0x33.1 | 1 bit | Daisy |
0x33.2 | 1 bit | Bowser Jr. |
0x33.3 | 1 bit | Diddy Kong |
0x33.4 | 1 bit | Baby Luigi |
0x33.5 | 1 bit | Baby Daisy |
0x33.6 | 1 bit | Toadette |
0x33.7 | 1 bit | Dry Bones |
Grand Prix engine class completion | ||
0x34 | 1 bit | Unused |
0x34.1 | 1 bit | Unused |
0x34.2 | 1 bit | Unused |
0x34.3 | 1 bit | Unused |
0x34.4 | 1 bit | Unused |
0x34.5 | 1 bit | Unused |
0x34.6 | 1 bit | 50cc |
0x34.7 | 1 bit | All engines |
0x35 | 1 bit | Unused |
0x35.1 | 1 bit | Unused |
0x35.2 | 1 bit | Unused |
0x35.3 | 1 bit | Mirror |
Vehicle unlocks | ||
0x35.4 | 1 bit | Phantom |
0x35.5 | 1 bit | Spear |
0x35.6 | 1 bit | Shooting Star |
0x35.7 | 1 bit | Dolphin Dasher |
0x36 | 1 bit | Sneakster |
0x36.1 | 1 bit | Zip Zip |
0x36.2 | 1 bit | Jet Bubble |
0x36.3 | 1 bit | Magikruiser |
0x36.4 | 1 bit | Quacker |
0x36.5 | 1 bit | Honeycoupe |
0x36.6 | 1 bit | Jetsetter |
0x36.7 | 1 bit | Piranha Prowler |
0x37 | 1 bit | Sprinter |
0x37.1 | 1 bit | Daytripper |
0x37.2 | 1 bit | Super Blooper |
0x37.3 | 1 bit | Blue Falcon |
0x37.4 | 1 bit | Tiny Titan |
0x37.5 | 1 bit | Cheep Charger |
0x37.6 | 1 bit | Unused |
0x37.7 | 1 bit | Unused |
0x38 | Byte[8] | Unknown. |
DWC User Data
Offset | Type | Description |
---|---|---|
0x40 | Int32 | Unknown. |
0x44 | Int32 | Unknown. |
0x48 | Int32 | Unknown. |
0x4C | Byte[4] | Unknown. |
0x50 | Int32 | Unknown. |
0x54 | Byte[4] | Unknown. |
0x58 | Byte[4] | Unknown. |
0x5C | UInt32 | Player's Profile ID. |
0x60 | Byte[4] | Unknown. |
0x64 | Char[4] | Game ID used for Friend Code calculation. Always RMCJ. |
0x68 | Byte[0x14] | Unknown. |
0x7C | Byte[4] | Unknown. |
Records
Offset | Type | Description |
---|---|---|
0x80 | Byte[4] | Unknown. Set to 0x50081000 when the license is created, never changed afterwards. |
0x84 | Byte[4] | Unknown. Set to 0x50081000 when the license is created, never changed afterwards. |
0x88 | Int32 | Wins (VS Race). The game reads the value at 0x98 instead to display in the Records screen. |
0x8C | Int32 | Losses (VS Race). The game reads the value at 0x9C instead to display in the Records screen. |
0x90 | Int32 | Wins (Battle). The game reads the value at 0xA0 instead to display in the Records screen. |
0x94 | Int32 | Losses (Battle). The game reads the value at 0xA4 instead to display in the Records screen. |
0x98 | Int32 | Wins (VS Race). |
0x9C | Int32 | Losses (VS Race). |
0xA0 | Int32 | Wins (Battle). |
0xA4 | Int32 | Losses (Battle). |
0xA8 | Int32 | Wins (Ghost Race). |
0xAC | Int32 | Losses (Ghost Race). |
0xB0 | UInt16 | Race Rating. |
0xB2 | UInt16 | Battle Rating. |
0xB4 | Int32 | Total Race Count. |
0xB8 | Int32 | Total Battle Count. |
0xBC | Int32 | Unknown. |
0xC0 | Int32 | Number of races and battles completed with the Wii Wheel. This number divided by the Total Race Count plus the Total Battle Count determines the Wii Wheel Usage Rate. |
0xC4 | Float | Distance Travelled. Rounded down in the Records screen. |
0xC8 | Int32 | Ghost Data Challenges Sent. |
0xCC | Int32 | Ghost Data Challenges Received. |
0xD0 | Int32 | Item Hits Delivered. |
0xD4 | Int32 | Item Hits Received. |
0xD8 | Int32 | Tricks Performed. |
0xDC | Int32 | Times 1st Place Achieved. |
0xE0 | Float | Distance travelled while in 1st place. |
0xE4 | Float | Distance travelled on VS Races. The game divides 0xE0 and this value and rounds it down to get the % Race Time in 1st Place. |
0xE8 | UInt16 | Competitions Entered. |
0xEA | UInt16 | Unknown. |
Favorite Character | ||
0xEC | UInt16 | Races completed with Mario. |
0xEE | UInt16 | Races completed with Baby Peach. |
0xF0 | UInt16 | Races completed with Waluigi. |
0xF2 | UInt16 | Races completed with Bowser. |
0xF4 | UInt16 | Races completed with Baby Daisy. |
0xF6 | UInt16 | Races completed with Dry Bones. |
0xF8 | UInt16 | Races completed with Baby Mario. |
0xFA | UInt16 | Races completed with Luigi. |
0xFC | UInt16 | Races completed with Toad. |
0xFE | UInt16 | Races completed with Donkey Kong. |
0x100 | UInt16 | Races completed with Yoshi. |
0x102 | UInt16 | Races completed with Wario. |
0x104 | UInt16 | Races completed with Baby Luigi. |
0x106 | UInt16 | Races completed with Toadette. |
0x108 | UInt16 | Races completed with Koopa Troopa. |
0x10A | UInt16 | Races completed with Daisy. |
0x10C | UInt16 | Races completed with Peach. |
0x10E | UInt16 | Races completed with Birdo. |
0x110 | UInt16 | Races completed with Diddy Kong. |
0x112 | UInt16 | Races completed with King Boo. |
0x114 | UInt16 | Races completed with Bowser Jr.. |
0x116 | UInt16 | Races completed with Dry Bowser. |
0x118 | UInt16 | Races completed with Funky Kong. |
0x11A | UInt16 | Races completed with Rosalina. |
0x11C | UInt16 | Races completed with Mii. |
Favorite Vehicle | ||
0x11E | UInt16 | Races completed with the Standard Kart S. |
0x120 | UInt16 | Races completed with the Standard Kart M. |
0x122 | UInt16 | Races completed with the Standard Kart L. |
0x124 | UInt16 | Races completed with the Booster Seat. |
0x126 | UInt16 | Races completed with the Classic Dragster. |
0x128 | UInt16 | Races completed with the Offroader. |
0x12A | UInt16 | Races completed with the Mini Beast. |
0x12C | UInt16 | Races completed with the Wild Wing. |
0x12E | UInt16 | Races completed with the Flame Flyer. |
0x130 | UInt16 | Races completed with the Cheep Charger. |
0x132 | UInt16 | Races completed with the Super Blooper. |
0x134 | UInt16 | Races completed with the Piranha Prowler. |
0x136 | UInt16 | Races completed with the Tiny Titan. |
0x138 | UInt16 | Races completed with the Daytripper. |
0x13A | UInt16 | Races completed with the Jetsetter. |
0x13C | UInt16 | Races completed with the Blue Falcon. |
0x13E | UInt16 | Races completed with the Sprinter. |
0x140 | UInt16 | Races completed with the Honeycoupe. |
0x142 | UInt16 | Races completed with the Standard Bike S. |
0x144 | UInt16 | Races completed with the Standard Bike M. |
0x146 | UInt16 | Races completed with the Standard Bike L. |
0x148 | UInt16 | Races completed with the Bullet Bike. |
0x14A | UInt16 | Races completed with the Mach Bike. |
0x14C | UInt16 | Races completed with the Flame Runner. |
0x14E | UInt16 | Races completed with the Bit Bike. |
0x150 | UInt16 | Races completed with the Sugarscoot. |
0x152 | UInt16 | Races completed with the Wario Bike. |
0x154 | UInt16 | Races completed with the Quacker. |
0x156 | UInt16 | Races completed with the Zip Zip. |
0x158 | UInt16 | Races completed with the Shooting Star. |
0x15A | UInt16 | Races completed with the Magikruiser. |
0x15C | UInt16 | Races completed with the Sneakster. |
0x15E | UInt16 | Races completed with the Spear. |
0x160 | UInt16 | Races completed with the Jet Bubble. |
0x162 | UInt16 | Races completed with the Dolphin Dasher. |
0x164 | UInt16 | Races completed with the Phantom. |
Favorite Course | ||
0x166 | UInt16 | Races completed on Mario Circuit. |
0x168 | UInt16 | Races completed on Moo Moo Meadows. |
0x16A | UInt16 | Races completed on Mushroom Gorge. |
0x16C | UInt16 | Races completed on Grumble Volcano. |
0x16E | UInt16 | Races completed on Toad's Factory. |
0x170 | UInt16 | Races completed on Coconut Mall. |
0x172 | UInt16 | Races completed on DK Summit. |
0x174 | UInt16 | Races completed on Wario's Gold Mine. |
0x176 | UInt16 | Races completed on Luigi Circuit. |
0x178 | UInt16 | Races completed on Daisy Circuit. |
0x17A | UInt16 | Races completed on Moonview Highway. |
0x17C | UInt16 | Races completed on Maple Treeway. |
0x17E | UInt16 | Races completed on Bowser's Castle. |
0x180 | UInt16 | Races completed on Rainbow Road. |
0x182 | UInt16 | Races completed on Dry Dry Ruins. |
0x184 | UInt16 | Races completed on Koopa Cape. |
0x186 | UInt16 | Races completed on GCN Peach Beach. |
0x188 | UInt16 | Races completed on GCN Mario Circuit. |
0x18A | UInt16 | Races completed on GCN Waluigi Stadium. |
0x18C | UInt16 | Races completed on GCN DK Mountain. |
0x18E | UInt16 | Races completed on DS Yoshi Falls. |
0x190 | UInt16 | Races completed on DS Desert Hills. |
0x192 | UInt16 | Races completed on DS Peach Gardens. |
0x194 | UInt16 | Races completed on DS Delfino Square. |
0x196 | UInt16 | Races completed on SNES Mario Circuit 3. |
0x198 | UInt16 | Races completed on SNES Ghost Valley 2. |
0x19A | UInt16 | Races completed on N64 Mario Raceway. |
0x19C | UInt16 | Races completed on N64 Sherbet Land. |
0x19E | UInt16 | Races completed on N64 Bowser's Castle. |
0x1A0 | UInt16 | Races completed on N64 DK's Jungle Parkway. |
0x1A2 | UInt16 | Races completed on GBA Bowser Castle 3. |
0x1A4 | UInt16 | Races completed on GBA Shy Guy Beach. |
Favorite Stage | ||
0x1A6 | UInt16 | Battles completed on Delfino Pier. |
0x1A8 | UInt16 | Battles completed on Block Plaza. |
0x1AA | UInt16 | Battles completed on Chain Chomp Wheel. |
0x1AC | UInt16 | Battles completed on Funky Stadium. |
0x1AE | UInt16 | Battles completed on Thwomp Desert. |
0x1B0 | UInt16 | Battles completed on GCN Cookie Land. |
0x1B2 | UInt16 | Battles completed on DS Twilight House. |
0x1B4 | UInt16 | Battles completed on SNES Battle Course 4. |
0x1B6 | UInt16 | Battles completed on GBA Battle Course 3. |
0x1B8 | UInt16 | Battles completed on N64 Skyscraper. |
0x1BA | Byte(6) | Padding. |
Cup Data
When completing a cup, you get a gold, silver or bronze trophy and a rank (3 stars, 2 stars, 1 star, A, B, C, D, E or F). For some reason, the game seems to store some residual string data of the path of the trophy model whenever setting a new rank after completing a GP.
Offset | Description |
---|---|
0x1C0 | Mushroom Cup (50cc) |
0x220 | Flower Cup (50cc) |
0x280 | Star Cup (50cc) |
0x2E0 | Special Cup (50cc) |
0x340 | Shell Cup (50cc) |
0x3A0 | Banana Cup (50cc) |
0x400 | Leaf Cup (50cc) |
0x460 | Lightning Cup (50cc) |
0x4C0 | Mushroom Cup (100cc) |
0x520 | Flower Cup (100cc) |
0x580 | Star Cup (100cc) |
0x5E0 | Special Cup (100cc) |
0x640 | Shell Cup (100cc) |
0x6A0 | Banana Cup (100cc) |
0x700 | Leaf Cup (100cc) |
0x760 | Lightning Cup (100cc) |
0x7C0 | Mushroom Cup (150cc) |
0x820 | Flower Cup (150cc) |
0x880 | Star Cup (150cc) |
0x8E0 | Special Cup (150cc) |
0x940 | Shell Cup (150cc) |
0x9A0 | Banana Cup (150cc) |
0xA00 | Leaf Cup (150cc) |
0xA60 | Lightning Cup (150cc) |
0xAC0 | Mushroom Cup (Mirror) |
0xB20 | Flower Cup (Mirror) |
0xB80 | Star Cup (Mirror) |
0xBE0 | Special Cup (Mirror) |
0xC40 | Shell Cup (Mirror) |
0xCA0 | Banana Cup (Mirror) |
0xD00 | Leaf Cup (Mirror) |
0xD60 | Lightning Cup (Mirror) |
Offset | Type | Description |
---|---|---|
0x0 | Byte[0x4F] | Unknown. |
0x4F | 2 bits | Cup:
|
0x4F.2 | 6 bits | Unknown. |
0x50 | Byte | Unknown. |
0x51 | 4 bits | Unknown. |
0x51.4 | 4 bits | Rank:
|
0x52 | 1 bit | Cup completion flag:
|
0x52.1 | 7 bits | Unknown. |
0x53 | Byte[0xD] | Unknown. |
Friend Data
Registered friends are stored in two blocks: the first one, the main data block, stores most of the data. The second one seems to store some flags and the PID of the friend (although this one is also stored in the main block). There are a total of 30 friend slots available.
Main Block Offset | Secondary Block Offset | Description |
---|---|---|
0x56D0 | 0x8B50 | Friend 1 |
0x5890 | 0x8B5C | Friend 2 |
0x5A50 | 0x8B68 | Friend 3 |
0x5C10 | 0x8B74 | Friend 4 |
0x5DD0 | 0x8B80 | Friend 5 |
0x5F90 | 0x8B8C | Friend 6 |
0x6150 | 0x8B98 | Friend 7 |
0x6310 | 0x8BA4 | Friend 8 |
0x64D0 | 0x8BB0 | Friend 9 |
0x6690 | 0x8BBC | Friend 10 |
0x6850 | 0x8BC8 | Friend 11 |
0x6A10 | 0x8BD4 | Friend 12 |
0x6BD0 | 0x8BE0 | Friend 13 |
0x6D90 | 0x8BEC | Friend 14 |
0x6F50 | 0x8BF8 | Friend 15 |
0x7110 | 0x8C04 | Friend 16 |
0x72D0 | 0x8C10 | Friend 17 |
0x7490 | 0x8C1C | Friend 18 |
0x7650 | 0x8C28 | Friend 19 |
0x7810 | 0x8C34 | Friend 20 |
0x79D0 | 0x8C40 | Friend 21 |
0x7B90 | 0x8C4C | Friend 22 |
0x7D50 | 0x8C58 | Friend 23 |
0x7F10 | 0x8C64 | Friend 24 |
0x80D0 | 0x8C70 | Friend 25 |
0x8290 | 0x8C7C | Friend 26 |
0x8450 | 0x8C88 | Friend 27 |
0x8610 | 0x8C94 | Friend 28 |
0x87D0 | 0x8CA0 | Friend 29 |
0x8990 | 0x8CAC | Friend 30 |
Offset | Type | Description |
---|---|---|
0x0 | Int32 | Unknown. |
0x4 | UInt32 | Profile ID of the friend. |
0x8 | Int32 | Unknown. |
0xC | Byte[4] | Unknown. |
0x10 | UInt16 | Unknown. Possibly a flag that indicates if the friend registered you (and does not appear as a "?" icon). |
0x12 | UInt16 | Losses against the friend. |
0x14 | UInt16 | Wins against the friend. |
0x16 | UInt16 | Race Rating of the friend. |
0x18 | UInt16 | Battle Rating of the friend. |
0x1A | Byte[0x4A] | Mii data of the friend. |
0x64 | Byte[4] | Unknown. |
0x68 | Byte | Country ID of the friend. |
0x69 | Byte | Region ID of the friend. |
0x6A | UInt16 | Unknown. |
0x6C | UInt16[2] | Globe coordinates of the friend. |
0x70 | Byte[0x150] | Unknown. |
Offset | Type | Description |
---|---|---|
0x0 | UInt16 | Unknown. Always 0? |
0x2 | Byte | Unknown. Always 0x38 if the friend exists? |
0x3 | Byte | Unknown. Always 0? |
0x4 | UInt32 | Profile ID of the friend. |
0x8 | Byte[4] | Unknown. Always 0? |
RKGD
TBD
Checksum
At offset 0x27FFC, there is a CRC-32 checksum of all the previous data.
Ghost Data
At the end of the file, there is the ghost data slots (stored as RKG files) for each course, divided in 4 sections, one for each license. Each ghost file is limited to 0x2800 bytes.
Offset | Description |
---|---|
0x28000 | Top left license |
0xCD000 | Top right license |
0x172000 | Bottom left license |
0x217000 | Bottom right license |
Offset | Description |
---|---|
0x0 | Luigi Circuit |
0x2800 | Moo Moo Meadows |
0x5000 | Mushroom Gorge |
0x7800 | Toad's Factory |
0xA000 | Mario Circuit |
0xC800 | Coconut Mall |
0xF000 | DK Summit |
0x11800 | Wario's Gold Mine |
0x14000 | Daisy Circuit |
0x16800 | Koopa Cape |
0x19000 | Maple Treeway |
0x1B800 | Grumble Volcano |
0x1E000 | Dry Dry Ruins |
0x20800 | Moonview Highway |
0x23000 | Bowser's Castle |
0x25800 | Rainbow Road |
0x28000 | GCN Peach Beach |
0x2A800 | DS Yoshi Falls |
0x2D000 | SNES Ghost Valley 2 |
0x2F800 | N64 Mario Raceway |
0x32000 | N64 Sherbet Land |
0x34800 | N64 Shy Guy Beach |
0x37000 | DS Delfino Square |
0x39800 | GCN Waluigi Stadium |
0x3C000 | DS Desert Hills |
0x3E800 | GBA Bowser Castle 3 |
0x41000 | N64 DK's Jungle Parkway |
0x43800 | GCN Mario Circuit |
0x46000 | SNES Mario Circuit 3 |
0x48800 | DS Peach Gardens |
0x4B000 | GCN DK Mountain |
0x4D800 | N64 Bowser's Castle |
0x50000 | Unknown |
0x52800 | Unknown |
0x55000 | Unknown |
0x57800 | Unknown |
0x5A000 | Unknown |
0x5C800 | Unknown |
0x5F000 | Unknown |
0x61800 | Unknown |
0x64000 | Unknown |
0x66800 | Unknown |
0x69000 | Unknown |
0x6B800 | Unknown |
0x6E000 | Unknown |
0x70800 | Unknown |
0x73000 | Unknown |
0x75800 | Unknown |
0x78000 | Unknown |
0x7A800 | Unknown |
0x7D000 | Unknown |
0x7F800 | Unknown |
0x82000 | Unknown |
0x84800 | Unknown |
0x87000 | Unknown |
0x89800 | Unknown |
0x8C000 | Unknown |
0x8E800 | Unknown |
0x91000 | Unknown |
0x93800 | Unknown |
0x96000 | Unknown |
0x98800 | Unknown |
0x9B000 | Unknown |
0x9D800 | Unknown |
0xA0000 | Last downloaded Ghost Race ghost. |
0xA2800 | Last compatible competition. Some competition types seem to save ghost data here. |
Tools
The following tools can handle RKG files: