Jump to content
Setting up an AI agent? ReverseEngineering.wiki skill (works from the command line, no configuration): https://reverseengineering.wiki/skill/rewiki/SKILL.md · setup for every client, including MCP: https://reverseengineering.wiki/llms.txt · REWiki:Connect

Format:GCM disc image (GameCube and Wii)

From ReverseEngineering.wiki
Format
On this wiki Facts · Code · Notes · Topics

Disc layout shared by Nintendo GameCube and Wii discs (.gcm, .iso): a 0x440-byte boot.bin header with game id and a disc magic, bi2.bin, an apploader at 0x2440, a DOL and an FST addressed from the header; Wii discs add a partition table at 0x40000 with hashed 0x8000-byte clusters.

Overview

A GameCube mini-DVD and a Wii DVD share one header layout. Raw images are called .iso or .gcm. Offsets below are from Dolphin's DiscIO code (dolphin-emu/dolphin, GPL-2.0-or-later: Source/Core/DiscIO/DiscUtils.h, DiscUtils.cpp, FileSystemGCWii.cpp, VolumeWii.cpp, VolumeDisc.cpp). Values are big endian.

Header (boot.bin) and bi2.bin

  • 0x00: game id; byte 3 of it gives the country, the maker id is read at 0x04, the revision at 0x07 and the disc number at 0x06 (VolumeDisc.cpp).
  • 0x18: Wii disc magic 0x5D1C9EA3; 0x1C: GameCube disc magic 0xC2339F3D. Dolphin tests these two words to tell the platforms apart (FileSystemGCWii.cpp).
  • 0x20: the internal game name, 0x60 bytes decoded as text (VolumeDisc.cpp GetInternalName, lines 150-163, commit 41460454e9). The apploader build date is the 16 bytes at 0x2440 (GetApploaderDate). An NKit-shrunk image carries the bytes NKIT at 0x200 (IsNKit).
  • The GameCube banner file opening.bnr starts with BNR1 (one language) or BNR2 (six languages) and holds an RGB5A3 image; see Fact:GCM disc image (GameCube and Wii)/magic/opening.bnr BNR1 and BNR2.
  • The header proper (DISCHEADER_SIZE) is 0x440 bytes.
  • 0x420: offset of the main executable (Format:DOL executable); 0x424: FST offset; 0x428: FST size. On Wii discs these values are stored shifted right by 2 (Dolphin's GetOffsetShift); on GameCube they are plain byte offsets.
  • 0x440 (BI2_ADDRESS): bi2.bin, the second information block; Dolphin reads the u32 at 0x444 as the simulated memory size.
  • 0x458: region code word of a GameCube disc; Wii discs keep theirs at 0x4E000.
  • 0x2440 (APPLOADER_ADDRESS): the apploader, a 0x20-byte header whose u32 at +0x14 is the apploader size and at +0x18 the trailer size, then the code.

File system table (FST)

The FST is an array of 12-byte entries followed by a name table of NUL-terminated strings (Dolphin converts them from Shift-JIS). Entry 0 is the root. Per entry: u32 whose top byte is 1 for a directory and whose low 24 bits are the name offset in the name table; u32 file offset (for a directory the index of its parent); u32 file size (for a directory the index of the first entry after it). On Wii the file offset is shifted left by 2.

Wii discs

  • Byte 0x60 equal to 0 means the partitions carry hashes; byte 0x61 equal to 0 means they are encrypted (VolumeWii.cpp).
  • 0x40000: four partition groups of (u32 partition count, u32 table offset >> 2); each partition entry is (u32 offset >> 2, u32 type).
  • Type 0 is the game partition: Dolphin sets the game partition to the first table entry whose type is 0 (VolumeWii.cpp lines 66-78). Unverified: type 1 is the update partition and type 2 the channel installer partition.
  • At the partition start: the ticket at +0; TMD size at +0x2A4 and offset at +0x2A8; certificate chain size at +0x2AC and offset at +0x2B0; H3 table offset at +0x2B4; data offset (shifted by 2) at +0x2B8. Inside the data area the 0x420/0x424/0x428 pointers are relative to the partition's decrypted data.
  • Partition data is stored in clusters of 0x8000 bytes: 0x400 bytes of hashes and 0x7C00 bytes of data (VolumeWii.h BLOCK_HEADER_SIZE, BLOCK_DATA_SIZE). Dolphin builds an AES decryption context from the title key of the partition's ticket to read the data (VolumeWii.cpp lines 134-138); no keys are given here.

Related

Platform:Nintendo GameCube, Platform:Nintendo Wii, Format:DOL executable, Format:U8 archive, Format:RARC archive, Format:Yaz0, Format:WBFS disc container, Format:WIA and RVZ (compressed containers of the whole disc), Format:TPL texture palette, Format:BMG message file, Format:BRRES resource archive, Format:GameCube DSP ADPCM.

Disc containers read by Dolphin

A disc is often not stored as a raw image. Dolphin picks the container from the first u32 of the file (Fact:GCM disc image (GameCube and Wii)/identification/Dolphin container detection): Format:GCZ (zlib blocks), Format:Wii CISO (Dolphin) (sparse blocks with a byte map), Format:WBFS disc container, Format:WIA and RVZ, plus TGC and NFS readers (not read for this wiki), and otherwise a plain .iso/.gcm image or a directory. Unverified: a compressed container hides the disc header magics at 0x18 and 0x1C; read the decompressed bytes (or header 2's copy of the first 0x80 bytes in WIA/RVZ) to apply the checks above.

Code & repositories

  • https://github.com/dolphin-emu/dolphin @ 41460454e9600f909950fddf0abd13a138430162 · license: GPL-2.0-or-later (declared by the contributor; GitHub's detector did not recognize COPYING)
    Dolphin emulator; Source/Core/DiscIO holds the GameCube/Wii disc header, FST and Wii partition readers (DiscUtils.h, FileSystemGCWii.cpp, VolumeWii.cpp), plus WBFS, CISO, WIA, RVZ, NFS and TGC containers
    Tested on: source read, not run: source read, not run · checked 2026-10-18; last activity 2026-10-18