• Our software update is now concluded. You will need to reset your password to log in. In order to do this, you will have to click "Log in" in the top right corner and then "Forgot your password?".
  • Welcome to PokéCommunity! Register now and join one of the best fan communities on the 'net to talk Pokémon and more! We are not affiliated with The Pokémon Company or Nintendo.

Modifying Colosseum/XD Saves

Low Lines

Graphical Artist/Programmer
14
Posts
15
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.

    Code:
    $00000-$00001  0x0101
    $0000C-$0000D  0xFEFF
    $00000-$01FFF  (set to 0x00, unless otherwise stated)
    $02000-$1DFFF  (set to 0xFF)
    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.

    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
     

    Sydian

    fake your death.
    33,379
    Posts
    16
    Years
  • Well, this looks like it's more about the way the system cards save rather than this thread is about the actual games. This can go in Other Games, seeing that it's more on that than Colosseum or XD.

    Moved;
     

    codemonkey85

    Software Developer
    22
    Posts
    15
    Years
  • Hello,

    Are you still working on this project? Feel free to PM me or E-Mail me at my username AT gmail, as I "know a guy".

    Plus there's the part where I spent over a year writing and distributing various programs for reading and writing Pokémon save files. :p
     
    Back
    Top