GCI (File Format)

This page describes the .gci format, as found in memory cards. .gci is used for all GameCube save files, but this article will go over their Mario Kart: Double Dash!! implementations. There are two types of .gci files - ghost and main. Ghost .gci files hold inputs for ghosts, and main .gci files hold personal records, settings, and unlockables.

File Format

Both types of files start with a 0x40 byte long section that contains the game id and other information.
Then, there are blocks for the banner / image for the .gci. The size of this block is 0x1400 bytes for a ghost .gci and 0x2000 bytes for a main .gci. The image format is .bti

Ghost

  • Images for each track can be found in Filesystem/SceneData/English/ghostdata.arc/bnr. The header of each .bti is omitted.
  • After the image, the actual inputs are given. There is a 0x40 header section that gives the game title and the ghost's time.
  • Then, inputs are given in a format identical to .ght files.
  • Filler takes up the rest of the block until the final 4 bytes.
  • The final 4 bytes are a checksum generated by the crc32 algorithm using the first 0x9ffc bytes starting at the 0x40 offset.

Main

  • The image data has its a 0x2000 byte long block for image data. The image data takes up 0x1ff0 bytes, with the final 0x10 bytes being reversed for an encryption key (possibly unused), tick data, and a crc32 checksum
  • The two additional blocks are identical in format. They store the last two saves in some order that is can be determined.
  • The format of these blocks is described below
Offsets Description Additional Information
0x0 - 0x40 Game name and date of save Game name is copied from a string in the .dol.
0x40 - 0xE0C Actual save data Encrypted via a short key stored at 0x1ff0 in the block.
0xE10 - 0x1FF0 Filler Algorithmically generated
0x1FF0 Key Used to encrypt and decrypt the actual save data
0x1FF2 Always 0x00C3
0x1FF4 Time the data in this block was saved, in ticks
0x1FFC crc32 checksum Generated using all previous values in the block

Tools