BIN Format (Chasm)
Chasm: The Rift archive format.
Archive header and TOC
|char||id||Archive ID string. Must be "CSid" string (not null-terminated)|
|INT16LE||count||Number of files in the archive|
Immediately after the header is count records of the TOC data:
|BYTE||length||File name length|
|char||name||File name (only length chars used)|
|INT32LE||offs||File offset (absolute)|
Note that TOC actually larger (filled with zeros) and has room for the 2048 records. Also note that length+name - it's string type for Borland Pascal (Chasm is written in it). Is TOC somehow limited to 2048 items in total?
Notes and comments
Archive TOC contains only filenames. Because of that you can extract files from "CSM.BIN" to "CHASMDAT" folder and move out, rename or delete "CSM.BIN" (this forces game to use extracted files), but you MUST restore appropriate original path. For example file "LOADING.CEL" from the "CSM.BIN" must be saved as "CHASMDAT\COMMON\LOADING.CEL" in the game folder. See the file structure from the game addon folder.
Please note that this archive structure (since every different files in the game has it's uniquie name) allow to eleminate duplicates - for example in the game addon there are two exactly the same files:
But inside the game archive this will be only one file - "SWITCH5.WAV".
If you find this information helpful in a project you're working on, please give credit where credit is due. (A link back to this wiki would be nice too!)