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

Tools

 * mkdd memcard editor by tarsa129 - main .gci files
 * MKDD Ghost Info by SwareJonge - ghost .gci files
 * Dolphin Emulator - both