Low Lines
Graphical Artist/Programmer
- 14
- Posts
- 16
- Years
- Seen Jan 15, 2011
Okay I've been examining the contents of the GC game saves, trying to figure out how data is stored in them. Unfortunately the actual game data is encrypted and I don't know how to read it. I was wondering if anyone has made any attempts to decrypt the save files before me? I've attempted searching the forums but I haven't gotten anything specific to what I'm trying to do.
I'll post what I've found out about the save data. I'll note I've been mostly looking at the PAL version of Colosseum.
Quick bit of info...a GCI file is basically made up of two parts, a header, and a data section. The header is 0x40 (64 bytes) and all offsets mentioned are based on the assumption that data starts after the header (ie offset 0x40 in the file is zero).
The save data is broken up into 3 save files, each being 15 blocks (or 0x1E000 bytes) in size. When you save your game, it saves the newest version to the next spot giving it a version number. I assume that this is meant to help recover from a corrupted save but if you try to change any of the save files, the game will treat the entire save data as corrupted and refuse to load it.
When you create a fresh save data on your Memory Card, it fills out all 3 save files in the following manner.
After tinkering around with a fresh save. You can modify anything after the first 0x20 bytes without "corrupting" the save file. But as soon as you change anything in those first 0x20 bytes you will run into problems.
Looking at a save file with some story mode data on it, the first 0x20 bytes tells a little bit more about the file...Note that values mention do seem to differ on save data taken from other memory cards and versions of the game.
Unlike a fresh save file, changing any data beyond the first 0x20 bytes will cause the save data to become "corrupt", so I figure that there must be at least one checksum present in the header.
The two constants stay the same even after creating a fresh save file, and I believe they have some kind of relationship with the actual memory card itself, because GCMM states that protected saves apparently use the memory card's unique ID to encrypt data.
If anyone can share a little more light on the subject, it would be great. Since I'm pretty much at a dead end with this, I thought I'd just share my findings in case it proves useful to someone else :p
I'll post what I've found out about the save data. I'll note I've been mostly looking at the PAL version of Colosseum.
Quick bit of info...a GCI file is basically made up of two parts, a header, and a data section. The header is 0x40 (64 bytes) and all offsets mentioned are based on the assumption that data starts after the header (ie offset 0x40 in the file is zero).
The save data is broken up into 3 save files, each being 15 blocks (or 0x1E000 bytes) in size. When you save your game, it saves the newest version to the next spot giving it a version number. I assume that this is meant to help recover from a corrupted save but if you try to change any of the save files, the game will treat the entire save data as corrupted and refuse to load it.
When you create a fresh save data on your Memory Card, it fills out all 3 save files in the following manner.
Code:
$00000-$00001 0x0101
$0000C-$0000D 0xFEFF
$00000-$01FFF (set to 0x00, unless otherwise stated)
$02000-$1DFFF (set to 0xFF)
Looking at a save file with some story mode data on it, the first 0x20 bytes tells a little bit more about the file...Note that values mention do seem to differ on save data taken from other memory cards and versions of the game.
Code:
$0000-$0006 Constant 1 (Always 0x01010000000000 for me)
$0007------ Save Counter/Version #
$0008-$000B Constant 2 (Always 0x0B030302 for me)
$000C-$000F Changes every save
$0010-$0017 Constant 3 (Always 0x4E0BC732A7A9826A for me)
$0018-$001F Changes every save
Unlike a fresh save file, changing any data beyond the first 0x20 bytes will cause the save data to become "corrupt", so I figure that there must be at least one checksum present in the header.
The two constants stay the same even after creating a fresh save file, and I believe they have some kind of relationship with the actual memory card itself, because GCMM states that protected saves apparently use the memory card's unique ID to encrypt data.
If anyone can share a little more light on the subject, it would be great. Since I'm pretty much at a dead end with this, I thought I'd just share my findings in case it proves useful to someone else :p