CSMP (File Format): Difference between revisions
Restructuring a little and adding some info
>Aruki m (Minor edits for grammar/consistency) |
>Aruki (Restructuring a little and adding some info) |
||
Line 5: | Line 5: | ||
__TOC__ | __TOC__ | ||
== | == Format == | ||
This is the header structure found in Metroid Prime 3 and Donkey Kong Country Returns; Tropical Freeze's | 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. | |||
{{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 25: | Line 29: | ||
|} | |} | ||
== Chunk == | === Chunk Header === | ||
Every chunk begins with this header; it contains a brief data type identifier and a size. | |||
{|class="wikitable" | {|class="wikitable" | ||
Line 41: | Line 47: | ||
|- | |- | ||
|0x8+N | |0x8+N | ||
|colspan=2|End of chunk | |colspan=2|End of chunk | ||
|} | |} | ||
=== NAME === | === NAME === | ||
Line 82: | Line 84: | ||
=== PAD === | === PAD === | ||
This chunk is just padded with 0xFF; usually contains 0x14 bytes. | |||
=== DATA === | === DATA === | ||
Refer to the [[DSP (File Format)|DSP]] page for details. | 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]] |