Page 1 of 1

Hack Wii save files

Posted: Sun Feb 23, 2014 11:47 pm
by BenoitRen
Is there some documentation about the Wii's save files or an application that can process them? I'd like to edit the save file of one of the Wii games I have, but from the limited documentation I found, it's encrypted. But seeing as Dolphin knows how to create them, surely someone knows about the file format in detail?

Re: Hack Wii save files

Posted: Mon Feb 24, 2014 1:33 am
by BenoitRen
Apparently this tool called "tachtig" (80 in Dutch, what the heck?) does also decrypt them. But you have to compile it yourself, along with "twintig" (20 in Dutch). What a pain.

Re: Hack Wii save files

Posted: Mon Feb 24, 2014 1:51 am
by emu_kidid
Yes, these are the standard tools of the trade so to speak. I'm sure there are compiled versions floating around on the internet, or perhaps even tools to dump decrypted saves and then tools to put them back on to the Wii.

Re: Hack Wii save files

Posted: Mon Feb 24, 2014 2:57 pm
by BenoitRen
There is a tool to dump non-encrypted saves from your Wii and put them back in, but they require a cIOS...

At any rate, I just found FE100 and will give it a try.

Re: Hack Wii save files

Posted: Mon Feb 24, 2014 4:32 pm
by BenoitRen
It seems like these days "Windows port" really means "we packed it in a .NET project". AARGH

Re: Hack Wii save files

Posted: Mon Feb 24, 2014 4:36 pm
by iamdablasta
BenoitRen wrote:There is a tool to dump non-encrypted saves from your Wii and put them back in, but they require a cIOS...

At any rate, I just found FE100 and will give it a try.
Having many cIOS for various purposes isn't a bad thing you know, I've got plenty for different backup enabling (dvd, usb, sd, cMIOS etc) and are very pleased with them.
Of course, not everyone is comfortable with changing system files and I'll respect that.

Re: Hack Wii save files

Posted: Mon Feb 24, 2014 4:46 pm
by BenoitRen
BenoitRen wrote:It seems like these days "Windows port" really means "we packed it in a .NET project". AARGH
Actually, to be fair, it's the updated version of the port made by WiiCrazy that .NET-ified it.
iamdablasta wrote:Having many cIOS for various purposes isn't a bad thing you know
They're frequently linked to piracy, and there has been no need for them for a long time, now. I did try using one once, but that didn't work out.

So yeah, I'd rather not touch my system files.

Re: Hack Wii save files

Posted: Mon Feb 24, 2014 9:02 pm
by BenoitRen
Anyone have any tips for reverse engineering save files? All kinds of values change even after having bought an item. Some of it is obviously position data.

What I'm trying to find is the value that identifies a save file as being loaded with bonuses awarded after the game finds a clear save of the previous game in the series.

Re: Hack Wii save files

Posted: Tue Feb 25, 2014 12:49 am
by BenoitRen
What puzzles me most right now are the first eight bytes. Here is a binary comparison between two save files taken between 7 seconds of each other:
Image
I think the first four bytes are some kind of checksum, and the next four bytes some kind of date (based on seeing the value always getting a little higher in each save file I make, and the difference becoming larger the more time has passed).

The only other change in the file is a 01 becoming a 02, because it's the second time the game was saved.

Re: Hack Wii save files

Posted: Tue Feb 25, 2014 4:19 am
by tueidj
The second set of 8 bytes (00 60 62 8d d6 69 07 68 in the first file) is the time the file was saved, in CPU ticks; divide it by 60750000 and it should give the number of seconds since 1 Jan 2000.
The four bytes after that (00 00 00 C8) might be the recorded play time in seconds? Just a guess based on how it changed.

Re: Hack Wii save files

Posted: Tue Feb 25, 2014 11:34 am
by BenoitRen
tueidj wrote:The second set of 8 bytes (00 60 62 8d d6 69 07 68 in the first file) is the time the file was saved, in CPU ticks; divide it by 60750000 and it should give the number of seconds since 1 Jan 2000.
Whoops, those are eight bytes, not four bytes; my mistake. At any rate, thanks for clearing that up.
The four bytes after that (00 00 00 C8) might be the recorded play time in seconds?
That's what I think, too. All the other comparisons support that.

Re: Hack Wii save files

Posted: Tue Feb 25, 2014 7:26 pm
by BenoitRen
Still no idea how to figure out the checksum. I've ran some checksum algorithms on the file using HxD, but none of them match. One option would be to use Dolphin in tandem with a debugger, but my computer isn't powerful enough for that.

Re: Hack Wii save files

Posted: Tue Feb 25, 2014 7:57 pm
by novenary
You could also check out the Dolphin source but I'm not sure it would help.

Re: Hack Wii save files

Posted: Tue Feb 25, 2014 10:22 pm
by BenoitRen
Someone on another board suggested the same thing. It wouldn't help, though. This isn't something that's shared with all Wii save files; it's game-specific.

At any rate, I'm not going to bother putting more effort into this. The reason I bothered in the first place is that I thought the clear save detection was required to unlock a bonus story event. However, this is not the case; all it does is add some extra items and money at the start of the game. This explains why I didn't find a flag.

Re: Hack Wii save files

Posted: Tue Feb 25, 2014 10:33 pm
by emu_kidid
You should have mentioned what game it was, maybe someone else would've seen something about that game save format before.

Re: Hack Wii save files

Posted: Tue Feb 25, 2014 11:37 pm
by BenoitRen
I didn't mention the game to keep discussion focused on the topic. Most people don't like the game much.

Re: Hack Wii save files

Posted: Sun Mar 16, 2014 6:27 pm
by barcapedro
tueidj wrote:The second set of 8 bytes (00 60 62 8d d6 69 07 68 in the first file) is the time the file was saved, in CPU ticks; divide it by 60750000 and it should give the number of seconds since 1 Jan 2000.
The four bytes after that (00 00 00 C8) might be the recorded play time in seconds? Just a guess based on how it changed.
That's interesting...