Decoding Wii Save Data

How I created the Wii Sports Resort decoder that can retrieve high scores, dates of recieved stamps, and the last 25 plays from the save file for Wii Sports Resort.

Aaron Feleke
6 min readOct 4, 2021
Hexadecimal, ASCII and my annotations.

The Wii was my first gaming console and continues to be the only gaming console I own. I got it as a gift from Dad in 2009 and it is still somehow functioning over a decade later. Wii Sports Resort, my favorite Wii game, was an obvious target for decoding its data file.

If you pull the save data from Wii Sports Resort, put it on an SD Card, insert the SD Card in your laptop, and go to private > title > RZTE > data.bin, we are at the save data — usually called a data file. For the record, every Wii game gets a code/ID and RZTE is Nintendo’s code/ID for Wii Sports Resort. As the image shows below, the data.bin file contains random unreadable text. At first, I assumed this was Japanese, the language of the country Nintendo is based in, but on closer inspection there are characters from the Korean, Chinese, and Slovak languages and a bunch of language agnostic shapes.

Well, Nintendo uses Advanced Encryption Standard (AES) for all games on the Wii.

AES is a symmetric, also known as secret key, cipher that uses the same key for encrypting and decrypting. Therefore, the sender and the receiver must both know and use the same secret key.

If the key was to become cracked or public, then decryption would be a breathe. Specifically, the sd-key, sd-iv, and md5-blanker values are the same across all Wiis. Respectively, there hexadecimal values are ab01b9d8e1622b08afbad84dbfc2a55d, 216712e6aa1f689f95c5a22324dc6a98, 0e65378199be4517ab06ec22451a5793.

A tool called tachtig, part of Segher Wii Tools, leverages this weakness to decrypt the save data into binary. Below is a list of tools from Segher Wii Tools, compiled by Wii Brew.

* negentig -- decode and unpack a disc image
* tachtig -- decode and unpack a saved data wad (data.bin)
* zeventig -- decode and unpack an installer wad
* twintig -- pack and encode a saved data wad
* zestig -- decode and unpack Wii flash images

Tachtig produces a file called 00010000525a5445/Sports2.dat The file looks like this and still looks like complete gibberish. Well, this is binary (all 0 and 1’s) but the computer is trying to read it as ASCII or the Unicode encoding. Well, let us try to try to see those 0 and 1’s in a file or for easier reading, in hexadecimal.

Sports2.dat file

Using a tool called xxd, I was able to generate a hexadecimal readout of the binary data with ASCII text to the right. For reference, to do this have the hexadecimal in FILE1 and type this command in the terminal: xxd -r -p FILE1 FILE1

Then, I pasted that into a Word Document. On the Word Document, I erased lines that were all 0’s so it would be easier to find patterns. In the end, I printed out a 30-page document of hexadecimal. I annotated and looked for patterns on the printout shown in the title image.

xxd readout on a Word Document

Now that I had the save data, I had to be able to find patterns. Obviously, this includes looking for dates, high scores, and names was the way to go. Even then, I still had to manually record the high scores, skill level, Superstar or Pro Class, and stamps of each player in each of the 50+ games on Wii Sports Resorts. Sometimes playing a single game and recording the changes in the save file was the way I spotted patterns and data points.

Collecting stamps, skill level, and high scores for each player in each game.

Here are some examples of how data is kept in the save data.

Date

YYYYYYYYYYYY MMMM DDDDD hhhhh mmmmm

  • Year = 12 bits
  • Month (0–11) = 4 bits
  • Day of month = 5 bits
  • Hour (0–23) = 5 bits
  • Minute = 6 bits

Hexadecimal in Data File: 7e51 a564

Binary Split: 0111 1110 0101 // 0001 // 1010 0 // 101 01 // 10 0100

2021 // 1 (Feb) // 20 // 21 (9P) // 36 → February 20, 2021 9:36pm

Cycling Scores

  • Game Played = 1 hex (8 = played, 0 = not played)
  • Place = 2 hex
  • Seconds = 3 hex
  • Hundredths of Seconds = 2 hex

Hexadecimal in Data File: 8010 39ab

Hexadecimal Split: 8 // 01 // 0 39 // ab

Played // 1st Place // 147 seconds // 63 hundredths → 1st 2:27.63

Negative Scores — Golf, Frisbee Golf

If you have never seen two’s complement, seeing fffd as the high score on the data sheet might be confusing. No worries.

To get the two’s complement negative notation of an integer, 1) you write out the number in binary. You 2) then invert the digits, and 3) add one to the result.

Cornell University

0) Hexadecimal from Data sheet: fffe

1) Convert to binary: 1111 1111 1111 1101

2) Invert the digits (0 → 1, 1 → 0): 0000 0000 0000 0010

3) Add One: 2 (binary -> decimal from Step 2) + 1 = 3

So the negative of 0xFFFD is 3. So 0xFFFD is -3. That is a great score!

Games With Scores in Tenths or Hundredths

For 3 Point Content and Power Cruising, scores are kept to the tenths and divide the decimal score in the save data by 10. For canoeing, scores are kept by the hundredths and divide the decimal score by 100. Cycling uses a different system outlined already.

Canoeing Hexadecimal in Data Sheet: 60ad

Decimal: 24749 → Divide by 100 -> 247.49

Data Sheet Table of Contents

Noting that I skip lines that are all 0’s, here are the table of contents of my decode sheet:

  • Page 1–8: Wii Records
  • Page 8: Number of Plays Per Game
  • Page 9–22: 25 Most Recent Plays
  • Page 23–30 Player Information (Personal Records, Stamps, Skill Level)

Mii Information

There is a great website that lays out the data files for all Miis that show up in any Nintendo Game. The most important part of the Mii Information for our purposes is getting the name and not confusing it with the owner/creator of the Mii.

Guest B according to Mii Library on Wii. 0’s after 0x30 are cut.

In Conclusion

wii-inspect printout

I hope you enjoyed this small glimpse at how I decoded the Wii Sports Resort Save File. While I doubt that I am the first to decode the game, I am the first to publicly post my findings and create a decoder. In a future article, I hope to reflect on programs or software that would have made this journey easier and quicker. Please comment on any experiences you may have had on decoding save files on any game!

Check out the repository at www.github.com/Aaron98990/wii-inspect

--

--