EvilEngine/Sound Format
This page contains information on how sounds and music are stored in the games.
Sounds are usually contained in SND and SNDS assets, with the SNDI asset containing information about them. Each HOP file (sometimes the HIP) contains multiple SND and SNDS assets and one single SNDI asset. There doesn't seem to be an internal difference between SND and SNDS other than being stored as different assets; sound effects are usually in SND and voice lines and music are usually in SNDS.
SND/SNDS Format
GameCube
In Scooby-Doo: Night of 100 Frights and Spongebob Squarepants: Battle For Bikini Bottom, SND and SNDS are a GameCube DSP audio file stripped of its 0x60 byte header: all of a level's sound headers are kept separate in the single SNDI asset.
In The Spongebob Squarepants Movie Game, The Incredibles and Rise of the Underminer, the SND and SNDS assets are empty, and instead, all of the sounds are contained entirely in the SNDI asset.
Xbox
The audio format on the Xbox version of all 5 games is either raw IMA ADPCM, or raw 16-bit Linear PCM stripped of its 0x2C byte header: all of a level's sound headers are kept separate in the single SNDI asset.
Playstation 2
The audio format on the PS2 version of all 5 games is a PS2 VAG sound file stripped of its 0x30 byte header: all of a level's sound headers are kept separate in the single SNDI asset.
SNDI Format
GameCube (Night of 100 Frights/Battle For Bikini Bottom)
The SNDI has a 0xC or 0x10 byte header:
Offset | Type | Variable | Description |
---|---|---|---|
0x00 | int | amount of SND | Amound of headers for SND assets. |
0x04 | byte[4] | null | Padding |
0x08 | int | amount of SNDS | Amound of headers for SNDS assets. |
0x0C | int | amount of cutscene SNDS | Amound of headers for SNDS assets used in cutscenes. BFBB only. |
After that, there are three consecutive arrays of SNDI entries: one for the SND, one for the SNDS and one for the cutscene SNDS. Each SNDI entry is 0x64 bytes long and follows this structure:
Offset | Type | Variable | Description |
---|---|---|---|
0x00 | byte[0x60] | Sound Header | Header of GameCube DSP sound file. |
0x60 | AssetID | Sound Asset ID | Asset ID of corresponding SND or SNDS asset. |
GameCube (Movie Game/Incredibles/Rise of the Underminer)
In those games, the SNDI contains not only the sound headers but also the entirety of the sound files themselves. It has a 0x20 byte header.
Xbox
The SNDI has a 0xC byte header:
Offset | Type | Variable | Description |
---|---|---|---|
0x00 | int | amount of SND | Amound of headers for SND assets. |
0x04 | int | amount of SNDS | Amound of headers for SNDS assets. |
0x08 | int | amount of cutscene SNDS | Amound of headers for SNDS assets used in cutscenes. |
After that, there are three consecutive arrays of SNDI entries: one for the SND, one for the SNDS and one for the cutscene SNDS. Each SNDI entry is 0x2C bytes long and follows this structure:
Offset | Type | Variable | Description |
---|---|---|---|
0x00 | short | fmtId | 0x69 if xbox adpcm, 0 if linear PCM |
0x02 | short | fmtChannels | |
0x04 | int | fmtSampleRate | Sampling rate |
0x08 | int | fmtBytesPerSecond | Used as an estimate, can be anything |
0x0C | short | fmtBlockAlignment | |
0x0E | short | fmtBitsPerSample | |
0x10 | short | fmtExtBytes | Equal to 0x0002 if adpcm, 0x0 if linear pcm |
0x12 | short | fmtExtData | Used to store adpcm nibbles per block; 0x40 if using xbox adpcm, 0 if linear pcm |
0x14 | int | dataSize | |
0x18 | AssetID | Sound Asset ID | Asset ID of corresponding SND or SNDS asset. |
0x1C | byte[16] | padding |
Playstation 2
The SNDI has a 0x8 byte header:
Offset | Type | Variable | Description |
---|---|---|---|
0x00 | int | amount of SND | Amound of headers for SND assets. |
0x08 | int | amount of SNDS | Amound of headers for SNDS assets. |
After that, there are two consecutive arrays of SNDI entries: one for the SND and one for the SNDS. Each SNDI entry is 0x30 bytes long and is a VAG header. The reserved space at 0x8 in the header contains the sound's Asset ID.