GCM file

.GCM files, as used by Tt Games, are files containing stereo audio, encoded using Nintendo's DSP-ADPCM format. Not to be confused with the GameCube and Wii disc image format that uses the same extension, GCM likely stands for "GameCube Music" and is used for music and ambience by all Nu2 titles on the GameCube and Wii.

Technical Documentation
Two types of GCM files exist: headered, and headerless. Headerless GCM files contain raw DSP-ADPCM data. Headered GCM files contain an informational header with an IDSP FourCC.

IDSP header
The following code is used by VGMStream to read an IDSP header: /* IDSP - Traveller's Tales header + interleaved dsps [Lego Batman (Wii), Lego Dimensions (Wii U)] */ VGMSTREAM* init_vgmstream_idsp_tt(STREAMFILE* sf) { dsp_meta dspm = {0}; int version_main, version_sub;

/* checks */ /* .gcm: standard * .idsp: header id? * .wua: Lego Dimensions (Wii U) */ if (!check_extensions(sf, "gcm,idsp,wua")) goto fail;

if (read_32bitBE(0x00,sf) != 0x49445350) /* "IDSP" */ goto fail;

version_main = read_32bitBE(0x04, sf); version_sub = read_32bitBE(0x08, sf); /* extra check since there are other IDSPs */ if (version_main == 0x01 && version_sub == 0xc8) { /* Transformers: The Game (Wii) */ dspm.channels = 2; dspm.max_channels = 2; dspm.header_offset = 0x10; }   else if (version_main == 0x02 && version_sub == 0xd2) { /* Lego Batman (Wii) * The Chronicles of Narnia: Prince Caspian (Wii) * Lego Indiana Jones 2 (Wii) * Lego Star Wars: The Complete Saga (Wii) * Lego Pirates of the Caribbean (Wii) * Lego Harry Potter: Years 1-4 (Wii) */ dspm.channels = 2; dspm.max_channels = 2; dspm.header_offset = 0x20; /* 0x10+: null */ }   else if (version_main == 0x03 && version_sub == 0x12c) { /* Lego The Lord of the Rings (Wii) */ /* Lego Dimensions (Wii U) */ dspm.channels = read_32bitBE(0x10, sf); dspm.max_channels = 2; dspm.header_offset = 0x20; /* 0x14+: "I_AM_PADDING" */ }   else { goto fail; }

dspm.header_spacing = 0x60; dspm.start_offset = dspm.header_offset + 0x60 * dspm.channels; dspm.interleave = read_32bitBE(0x0c, sf);

dspm.meta_type = meta_IDSP_TT; return init_vgmstream_dsp_common(sf, &dspm); fail: return NULL; }

Useful tools

 * vgmstream - Can decode both headered and headerless GCM files