CSMP (File Format): Difference between revisions
imported>Antidote No edit summary |
imported>Antidote |
||
Line 1: | Line 1: | ||
The '''.CSMP file format''' is an audio format seen in Retro Studios games starting in Metroid Prime 3. It's very similar in use to [[AGSC (File Format)|AGSC]] and usually contains sound affects. Where CSMP differs is the fact that it only contains one sound and is broken up into obvious data chunks with easily identifiable sizes. | The '''.CSMP file format''' is an audio format seen in Retro Studios games starting in Metroid Prime 3. It's very similar in use to [[AGSC (File Format)|AGSC]] and usually contains sound affects. Where CSMP differs is the fact that it only contains one sound and is broken up into obvious data chunks with easily identifiable sizes. | ||
{{todo|Notate Tropical | {{todo|Notate Tropical Freeze differences.}} | ||
__TOC__ | __TOC__ | ||
Line 12: | Line 12: | ||
This is the header structure found in Metroid Prime 3 and Donkey Kong Country Returns; Tropical Freeze's is a bit different. | This is the header structure found in Metroid Prime 3 and Donkey Kong Country Returns; Tropical Freeze's is a bit different. | ||
{|class="wikitable" | {|class="wikitable" | ||
Line 40: | Line 38: | ||
|0x0 | |0x0 | ||
|4 | |4 | ||
|'''Chunk type''' | |'''Chunk type''' fourCC | ||
|- | |- | ||
|0x4 | |0x4 | ||
Line 88: | Line 86: | ||
=== DATA === | === DATA === | ||
The DATA section essentially just embeds a standard DSP, including the full header and ADPCM audio data. Refer to the [[DSP (File Format)|DSP]] page for details. Note that for some reason, the DATA chunk is | The DATA section essentially just embeds a standard DSP, including the full header and ADPCM audio data. Refer to the [[DSP (File Format)|DSP]] page for details. Note that for some reason, the DATA chunk is often 4 bytes smaller than its size indicates. | ||
[[Category:File Formats]] | [[Category:File Formats]] |
Revision as of 02:19, 26 January 2015
The .CSMP file format is an audio format seen in Retro Studios games starting in Metroid Prime 3. It's very similar in use to AGSC and usually contains sound affects. Where CSMP differs is the fact that it only contains one sound and is broken up into obvious data chunks with easily identifiable sizes.
To do: Notate Tropical Freeze differences. |
Format
CSMP files are made up of a number of data chunks. Since not every file always has every chunk, the best way to read a CSMP file is to use a while loop to check the chunk headers and parse their contents until you reach the end of the file.
Header
This is the header structure found in Metroid Prime 3 and Donkey Kong Country Returns; Tropical Freeze's is a bit different.
Offset | Size | Description |
---|---|---|
0x0 | 4 | "CSMP" magic fourCC |
0x4 | 4 | Version; always 1 |
Chunk Header
Every chunk begins with this header; it contains a brief data type identifier and a size.
Offset | Size | Description |
---|---|---|
0x0 | 4 | Chunk type fourCC |
0x4 | 4 | Chunk size (N) |
0x8+N | End of chunk |
NAME
This chunk just has a null-terminated string; it's the name of the contained sound data.
INFO
Offset | Size | Description |
---|---|---|
0x0 | 1 | Unknown |
0x1 | 1 | Loop Flag |
0x2 | 4 | Unknown |
0x6 | 2 | Unknown |
0x8 | 4 | Volume |
PAD
This chunk is just padded with 0xFF; usually contains 0x14 bytes.
DATA
The DATA section essentially just embeds a standard DSP, including the full header and ADPCM audio data. Refer to the DSP page for details. Note that for some reason, the DATA chunk is often 4 bytes smaller than its size indicates.