Difference between revisions of "CSMP (File Format)"
From Retro Modding Wiki
m (I hate my keyboard) |
m (Minor edits for grammar/consistency) |
||
Line 1: | Line 1: | ||
− | The '''. | + | 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 freeze differences ([[User:Parax0|Paraxade]] do you know anything?)}} | {{todo|Notate Tropical freeze differences ([[User:Parax0|Paraxade]] do you know anything?)}} | ||
+ | |||
__TOC__ | __TOC__ | ||
+ | == Header == | ||
− | + | This is the header structure found in Metroid Prime 3 and Donkey Kong Country Returns; Tropical Freeze's seems to be a bit different. The file can be read using a simple while loop; each chunk sets its own size. | |
− | + | ||
{{todo|We've had success getting audio out of Tropical Freeze, crediar mentioned ddspadpcm being used in Tropical Freeze. What is it? And can we find any information on it?}} | {{todo|We've had success getting audio out of Tropical Freeze, crediar mentioned ddspadpcm being used in Tropical Freeze. What is it? And can we find any information on it?}} | ||
Line 17: | Line 18: | ||
|0x0 | |0x0 | ||
|4 | |4 | ||
− | |''' | + | |'''"CSMP" magic''' fourCC |
|- | |- | ||
|0x4 | |0x4 | ||
|4 | |4 | ||
− | |'''Version'''; | + | |'''Version'''; always 1 |
|} | |} | ||
− | ==Chunk== | + | == Chunk == |
{|class="wikitable" | {|class="wikitable" | ||
Line 33: | Line 34: | ||
|0x0 | |0x0 | ||
|4 | |4 | ||
− | |''' | + | |'''Chunk type''' |
|- | |- | ||
|0x4 | |0x4 | ||
|4 | |4 | ||
− | |''' | + | |'''Chunk size (N)''' |
|- | |- | ||
|0x8+N | |0x8+N | ||
Line 43: | Line 44: | ||
|} | |} | ||
− | ==Chunk Types== | + | == Chunk Types == |
− | The | + | The structure for each chunk are as follows: |
+ | |||
+ | === NAME === | ||
+ | |||
+ | This chunk just has a null-terminated string; it's the name of the contained sound data. | ||
+ | |||
+ | === INFO === | ||
− | |||
− | |||
− | |||
{|class="wikitable" | {|class="wikitable" | ||
!Offset | !Offset | ||
Line 75: | Line 79: | ||
|'''Volume''' | |'''Volume''' | ||
|} | |} | ||
− | |||
− | |||
− | ===DATA=== | + | === PAD === |
+ | |||
+ | Padding; just skip this chunk using its size value. | ||
+ | |||
+ | === DATA === | ||
+ | |||
Refer to the [[DSP (File Format)|DSP]] page for details. | Refer to the [[DSP (File Format)|DSP]] page for details. | ||
+ | [[Category:File Formats]] | ||
[[Category:Audio]] | [[Category:Audio]] | ||
[[Category:Metroid Prime 3: Corruption]] | [[Category:Metroid Prime 3: Corruption]] | ||
[[Category:Donkey Kong Country Returns]] | [[Category:Donkey Kong Country Returns]] |
Revision as of 13:56, 25 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 (Paraxade do you know anything?) |
Header
This is the header structure found in Metroid Prime 3 and Donkey Kong Country Returns; Tropical Freeze's seems to be a bit different. The file can be read using a simple while loop; each chunk sets its own size.
To do: We've had success getting audio out of Tropical Freeze, crediar mentioned ddspadpcm being used in Tropical Freeze. What is it? And can we find any information on it? |
Offset | Size | Description |
---|---|---|
0x0 | 4 | "CSMP" magic fourCC |
0x4 | 4 | Version; always 1 |
Chunk
Offset | Size | Description |
---|---|---|
0x0 | 4 | Chunk type |
0x4 | 4 | Chunk size (N) |
0x8+N | End of chunk (usually, subtract 4 when the chunk type is equal to 0x44415441 ["DATA"]) |
Chunk Types
The structure for each chunk are as follows:
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
Padding; just skip this chunk using its size value.
DATA
Refer to the DSP page for details.