Gamecube DSP format headers All multibyte values are stored big-endian. Offsets are in bytes for stereo files, nibbles for mono, and refer to the offset into the ADPCM stream (thus don't include the header). The file length (number of ADPCM nibbles) is the same way. --------- Metroid Prime (standard devkit format) 0x00-0x03: number of samples 0x04-0x07: number of ADPCM nibbles (including frame headers) 0x08-0x0b: sample rate (Hz) 0x0c-0x0d: loop flag (1=looped, 0=not looped) 0x0e-0x0f: format (0 for ADPCM) 0x10-0x13: loop start offset 0x14-0x17: loop end offset 0x18-0x1b: ca (always zero) 0x1c-0x3b: decode coefficients 0x3c-0x3d: gain (zero) 0x3e-0x3f: initial predictor/scale 0x40-0x41: initial sample history 1 0x42-0x43: initial sample history 2 0x44-0x45: loop predictor/scale 0x46-0x47: loop sample history 1 0x48-0x49: loop sample history 2 0x4a-0x5f: padding 0x60-?: ADPCM stream --------- Lego Star Wars (standard devkit format, stereo variant) channel 1 header 0x00-0x03: number of samples 0x04-0x07: number of ADPCM bytes (including frame headers) 0x08-0x0b: sample rate (Hz) 0x0c-0x0d: loop flag (1=looped, 0=not looped) 0x0e-0x0f: format (0 for ADPCM) 0x10-0x13: loop start offset 0x14-0x17: loop end offset 0x18-0x1b: ca (always zero) 0x1c-0x3b: decode coefficients 0x3c-0x3d: gain (zero) 0x3e-0x3f: initial predictor/scale 0x40-0x41: initial sample history 1 0x42-0x43: initial sample history 2 0x44-0x45: loop predictor/scale 0x46-0x47: loop sample history 1 0x48-0x49: loop sample history 2 0x4a-0x5f: padding channel 2 header 0x60-0x63: number of samples 0x64-0x67: number of ADPCM bytes (including frame headers) 0x68-0x6b: sample rate (Hz) 0x6c-0x6d: loop flag (1=looped, 0=not looped) 0x6e-0x6f: format (0 for ADPCM) 0x70-0x73: loop start offset 0x74-0x77: loop end offset 0x78-0x7b: ca (always zero) 0x7c-0x9b: decode coefficients 0x9c-0x9d: gain (zero) 0x9e-0x9f: initial predictor/scale 0xa0-0xa1: initial sample history 1 0xa2-0xa3: initial sample history 2 0xa4-0xa5: loop predictor/scale 0xa6-0xa7: loop sample history 1 0xa8-0xa9: loop sample history 2 0xaa-0xbf: padding 0xc0-?: ADPCM stream, 0x8000 byte stereo interleave --------- Star Fox Assault/Donkey Konga (extra header) 0x00-0x03: "Cstr" 0x04-0x1f: unknown (padding?) channel 1 header 0x20-0x23: number of samples 0x24-0x27: number of ADPCM bytes (including frame headers) 0x28-0x2b: sample rate (Hz) 0x2c-0x2d: loop flag (1=looped, 0=not looped) 0x2e-0x2f: format (zero for ADPCM) 0x30-0x33: loop start offset/2 0x34-0x37: loop end offset 0x38-0x3b: ca (always zero?) 0x3c-0x5b: decode coefficients 0x5c-0x5d: gain (zero) 0x5e-0x5f: initial predictor/scale 0x60-0x61: initial sample history 1 0x62-0x63: initial sample history 2 0x64-0x65: loop predictor/scale 0x66-0x67: loop sample history 1 0x68-0x69: loop sample history 2 0x6a-0x7f: padding channel 2 header 0x80-0x83: number of samples 0x84-0x87: number of ADPCM bytes (including frame headers) 0x88-0x8b: sample rate (Hz) 0x8c-0x8d: loop flag (1=looped, 0=not looped) 0x8e-0x8f: format (zero for ADPCM) 0x90-0x93: loop start offset/2 0x94-0x97: loop end offset 0x98-0x9b: ca (always zero?) 0x9c-0xbb: decode coefficients 0xbc-0xbd: gain (zero) 0xbe-0xbf: initial predictor/scale 0xc0-0xc1: initial sample history 1 0xc2-0xc3: initial sample history 2 0xc4-0xc5: loop predictor/scale 0xc6-0xc7: loop sample history 1 0xc8-0xc9: loop sample history 2 0xca-0xdf: padding 0xe0-? ADPCM stream, 0x800 byte stereo interleave --------- Metroid Prime 2 (compact dual decode coefficients) 0x00-0x03: "RS",0,3 0x04-0x07: unknown (2) 0x08-0x0b: number of samples 0x0c-0x0f: sample rate 0x10-0x13: number of ADPCM bytes (including frame headers)/2 0x14-0x15: loop flag (1=looped, 0=not looped) 0x16-0x17: format? 0x18-0x1b: loop start offset/2 (maybe, this still doesn't work perfectly) 0x1c-0x1f: loop end offset/2 (maybe, this still doesn't work perfectly) 0x20-0x3f: channel 1 decode coefficients 0x40-0x5f: channel 2 decode coefficients 0x60-?: ADPCM stream, 0x8f00 byte stereo interleave --------- Nov. 10 2005 by hcs