Difference between revisions of "Pikmin 2 save file"
m |
m (4 revisions imported) |
Revision as of 05:19, 5 April 2018
Data about the Pikmin 2 save file format. The following info was taken from the PAL version of Pikmin 2 based on a .gci save taken from Dolphin.
To do: Figure out how to decrypt save files for the NPC version
To do: Check if this info applies to the US/J version of Pikmin 2 on GC
The save file contains save data for each of the 3 save slot used in-game. The data of such a save slot starts with the 8 byte string PlVa0003
and is 0xC000 bytes (49152 bytes in decimal) long. Directly after the string follows a byte which has the slot number of the save (0x00
for first slot, 0x01
for second, 0x02
for third). The last 4 bytes of the slot data contain the checksum calculated for the preceding slot data. The checksum is calculated according to this method: http://hitmen.c02.at/files/yagcd/yagcd/chap12.html#sec12.5
Addresses of interest relative to the start of the string:
Address | Size | Description |
---|---|---|
0x14 |
4 bytes | Integer representing the day count shown on the file select screen (might not be permanent, i.e. overwritten when you end a day normally.) |
The following Python script (requires Python >3.4) assists with calculating the checksum for the data in a save slot: https://gist.github.com/RenolY2/e0d93dde832b63f9197ef60861f22d89 Not recalculating and fixing the checksum results in the game detecting the modified save slot as being corrupted (but if you have any unmodified save slots, those will still work fine).
Very careful editing might allow you to fool the corruption detection without having to recalculate the value: Due to the checksum being an additive one, if you increase one value by 1 and decrease a different value by 1, the checksum should still remain valid.[unsure]