Difference between revisions of "AGSC (File Format)"

From Retro Modding Wiki
Jump to: navigation, search
Line 61: Line 61:
 
| '''Sound data chunk size'''.
 
| '''Sound data chunk size'''.
 
|}
 
|}
 
==== Header ====
 
 
 
  
 
[[Category:File Formats]]
 
[[Category:File Formats]]

Revision as of 06:35, 23 January 2015

AGSC is the sound effect format for Metroid Prime and Metroid Prime 2: Echoes. Each AGSC file contains a group of sound effects. According to the debug maps in Metroid Prime, there are references to various "classes", with one of them controlling audio in the map, known as AudioGroupSet. So presumably, AGSC is an abbreviation for Audio Group Set Class.

The audio codec used im AGSC is the standard GameCube DSP ADPCM codec, as described in the GameCube SDK.

Format

The AGSC format is split up into four distinct data chunks; two unknown chunks, one for sound metadata, and one for actual sound data. The format is very similar between Metroid Prime 1 and 2; the main difference is the header, and some slight changes in the way the four chunks are organized. In Metroid Prime, each chunk begins with its own size value; in Metroid Prime 2, every chunk instead has its size listed at the beginning of the file, at the end of the header. In addition, in Metroid Prime, the third chunk is sound data, and the fourth is sound metadata; in Metroid Prime 2, it's the other way around.

Header

Metroid Prime

Offset Size Description
0x0 D Audio Directory. Always "Audio/." Zero-terminated.
0x0 + D N Audio Group Name. Zero-terminated.
0x0 + D + N End of header

Metroid Prime 2

Offset Size Description
0x0 4 Unknown; always 1.
0x4 D Audio Group Name. This typically describes what sounds are in the file (for example, "Metroid" or "Weapons"). Zero-terminated.
0x4 + D 4 Chunk 1 size.
0x8 + D 4 Chunk 2 size.
0xC + D 4 Sound metadata chunk size.
0x10 + D 4 Sound data chunk size.