BIN Format (Chasm)
Format type | Archive |
---|---|
Max files | 65,535 ! test/confirm |
File Allocation Table (FAT) | Beginning |
Filenames? | Yes, 8.3 |
Metadata? | None |
Supports compression? | No |
Supports encryption? | No |
Supports subdirectories? | No |
Hidden data? | Yes |
Games |
(DOS) Archive header and TOC
Data type | Name | Description |
---|---|---|
char[4] | 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:
Data type | Name | Description |
---|---|---|
BYTE | length | File name length |
char[12] | name | File name (only length chars used) |
INT32LE | size | File size |
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?
(DOS) 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:
ADDON1\LEVEL02\SOUND\SWITCH5.WAV
ADDON1\LEVEL03\SOUND\SWITCH5.WAV
But inside the game archive this will be only one file - "SWITCH5.WAV".
(2022 Remaster) BIN file structure
Below is the BIN file structure used for the 2022 Remaster version of Chasm: The Rift. For modding purposes, your mod's .bin file should follow the same structure per the tree below. Any files that are missing will be taken from Chasm's main csm.bin file as required. Note that the 2022 Remaster uses uncompressed .tar archives which have been manually renamed to the .bin extension. This means that you can create/extract 2022 Remaster .bin files using popular archiving software such as 7Zip.
csm.bin > fonts > localization \----> Brazilian Portuguese |---> Chinese Simplified |---> Chinese Traditional |---> French |---> German |---> Italian |---> Japanese |---> Korean |---> Polish |---> Russian |---> Spanish |---> Ukranian > map > model > monster > music > sound > sound_new > sprite_effects > texture
Credits
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!)