Yet Another Gamecube Documentation

14  general File Formats


14.1  BNR (Banner file format)

this is the format of the file 'opening.bnr' (file size: always 6.496 bytes) found in the root directory of every Gamecube disc. This file is the little image that is displayed in the cube menu when inserting a disc into the gamecube, when in menu mode.

start end size Description
0x0000 0x0003 0x0004 Magic Word "BNR1" (US/JP) or 'BNR2' (EU)
0x0004 0x001f   padding zeroes
0x0020 0x181f 0x1800 Graphical Data (Pixel-format is RGB5A1)
0x1820 0x183f 0x0020 Gamename (*)
0x1840 0x185f 0x0020 Company/Developer (*)
0x1860 0x189f 0x0040 Full Game Title (*)
0x18a0 0x18df 0x0040 Company/Developer Full name, or description (*)
0x18e0 0x195f 0x0080 Game Description (*)

(*) All Text is all stored in either SHIFT-JIS or ASCII, depending on the region of the Game.

note: In the filesystem of european Games with multi-lingual text there may be several .bnr files (opening.bnr, openingUS.bnr, openingEU.bnr, openingJP.bnr). The opening.bnr is a BNR2 file, it is just like a regular BNR file, except that the metadata at the end repeats several times in different languages. 0x1820 through 0x1960 are the first, and it continues in blocks of 0x0140.

14.2  DOL (Gamecube Executable)

This is a custom GameCube program file format, which is directly booted by GameCubes' BIOS (to be exact, by the apploader on retail discs. a different apploader could well load a binary in whatever different format.).

start end size description
0x0000 0x001B   Text[0..6] sections File Positions
0x001C 0x0047   Data[0..10] sections File Positions
0x0048 0x0063   Text[0..6] sections Mem Address
0x0064 0x008F   Data[0..10] sections Mem Address
0x0090 0x00AB   Text[0..6] sections Sizes
0x00AC 0x00D7   Data[0..10] sections Sizes
0x00D8   0x04 BSS Mem address
0x00DC   0x04 BSS Size
0x00E0   0x04 Entry Point
0x00e4   0x1c unused
0x0100     Start of sections data (body)


14.3  ELF (Executable and linkable Format)

The ELF format is a standard, known format for debugging target specific code, etc. GCC targeted for the PPC 750 processor or even for the specialized Gekko processor has a final output of ELF format files. The exact GameCube ELF file format details are currently unknown, but they should be similar to the standard specification.

14.4  GCB (QOOB Flash Files)

start end size description
0x00 0x03 4 ID, indicates whats in the block
0x28432920 '(C) ' - qoob bios file
0x454c4600 'ELF0' - ELF File
0x42494e00 (not yet) 'BIN0'
0x444f4c00 (not yet) 'DOL0'
0x04 0xf7   description, will be shown in boot menu (by the qoob bios)
0xf8 0xfb 4 reserved
0xfc 0xff 4 size of block
0x100 ...   data

14.5  GCM (Gamecube Disc Image)

These files are always 1.4GB's exactly and each contains a complete binary image of a proprietary format GameCube DVD. This file format is used for the NR-Writer DVD writing software which writes special DVDs that can only be read by NR-Reader GameCubes. The GCM file format can probably be closely compared to the ISO file format for CDs in its purpose.

14.6  GCI (Gamecube Game Save)

Used by the EMS Memory Adapter.

64 byte header (equal to FST entry on memcard), followed by the file data (as on memory card)

14.7  GCP (Gamecube Memorycard Image)

Used by the EMS Memory Adapter.

this is a raw image of all blocks of a memory card.

14.8  TGC

a proprietary image format found on demo discs and eg the zelda n64 emu

note: there seem to be tgc files on european discs that follow a different layout (no header).

14.8.1  Header

start end size description
0x0000 0x0003 0x0004 TGC-Magic (0xae0f38a2)
0x0004 0x0007 0x0004 ? (=0x00000000)
0x0008 0x000b 0x0004 TGC-Header Size (=0x00008000)
0x000c 0x000f 0x0004 ? (=0x00100000)
0x0010 0x0013 0x0004 Offset to FST inside embedded GCM
0x0014 0x0017 0x0004 FST Size
0x0018 0x001b 0x0004 max FST Size
0x001c 0x001f 0x0004 Offset to Boot-DOL inside embedded GCM
0x0020 0x0023 0x0004 Boot-DOL Size
0x0024 0x0027 0x0004 ?
0x0028 0x002b 0x0004 ?
0x002c 0x002f 0x0004 Offset to Banner inside embedded GCM ?
0x0030 0x0033 0x0004 Banner Size ?
0x0034 0x0037 0x0004 ?


14.8.2  embedded GCM

usually starts at offset 0x00008000 (after the TGC Header) and follows exactly the same layout as a GCM file, with the following exceptions:

14.9  VGC (Viper Flash Files)

start end size description
0x00 0x03 4 Viper Magic ('VIPR')
0x04   1 Configuration Flags
bit(s) description
7 GC_FLASH_ACCESS - allows access to the flashrom
6 ?
5 ?
4 ?
3 COMMAND_MODE - enables modchip command mode (requires extended mode)
2 EXTENDED_MODE - allows reading of original IPL
1 COBRA_ENCRYPTION - enables additional encryption mode
0 DISABLE_CHIP - disables the modchip
0x05   1 Lid Sensor Status at Boot Time (*2)
0x06 0x0f 10 padding (zeros)
0x10 0x1f 16 BIOS Name in Ascii
0x20 ...   Encrypted (*1) BIOS, loaded to 0x81300000
(*1) encrypted with the IPL XOR-Stream (*2) original docs state that the default value is 0xff, however actually using this value seems to cause problems.