Skip to content

CSB File Formats

Daniel Nylander edited this page Aug 26, 2026 · 2 revisions

Chaos Strikes Back File Formats

Chaos Strikes Back shares a DM1-era data lineage but had no original PC DOS release. Its native formats are Atari ST, Amiga and FM Towns forms; CSBWin's PC-shaped files are reverse-engineering evidence only and must never make a DOS route appear supported. Byte order is selected from the authenticated platform release rather than assumed globally.

DUNGEON.DAT — Dungeon Data

Same base format as DM1 DUNGEON.DAT with these differences:

Field Value
Max levels 12
Dungeon ID 12 (CSB Prison) or 13 (CSB Game)

CSB Extensions

  • Thing type 15: DSA (Dynamic Scripting Architecture) script things
  • DSA actuator binding: Type-47 DB3 actuator where selector = (DB3.word2 >> 7) & 0x1F, resolved through an imported source-level table
  • Extended creature type table beyond DM1's set
  • Custom background references per room

Compression

On-disc data is typically FTL-compressed (signature bytes 81 04). After decompression and byte swapping, the standard DM1 format applies.

Graphics containers

There is no universal CSB GRAPHICS.DAT decoder. Native Amiga media uses IMG1 nibble-RLE; Atari ST uses the DMCSB1 catalogue and Atari-LZW-wrapped, big-endian IMG1 records; FM Towns uses the 0x8001 envelope with IMG2 records. The matching decoder is chosen only after edition identification. The PC-shaped LZW layout described by CSBWin remains a compatibility/reference format, not evidence of a DOS release.

CSBgraphics.dat — Custom Graphics Override (Optional)

Field Value
Purpose Override specific graphics indices
Producer CSBGraffer / CSBWin Viewport Compiler

Format mirrors the DM/CSB GRAPHICS.DAT structure: count + parallel compressed-size and decompressed-size tables + concatenated LZW-compressed payloads.

  • Byte-order detection: 0x8001 little-endian sentinel marks a Windows-produced file
  • File identified by MD5 split across two uint32 signature words

Save File Format

Field Value
Magic 0x43534201 ("CSB\1")
Header size 512 bytes
Encryption key index 29

Extended Save Records

CSB saves include additional data beyond the DM1 save format:

Record Description
GAMEBLOCK2 Extended game state
CHARDESC Champion descriptions
ITEM16 16-bit item records
Timers Timer state
Game-info Game configuration
DSA action records Script execution state
Level-index data Level traversal history
Trace bitmap Optional debug trace

Champion Export Format

Field Value
Magic 0x43454454 ("CEDT")

Used for exporting individual champions between games.

AMG Sound Files (Amiga Utility Disk)

Field Value
Format SND2
Sample depth 8-bit signed mono
Header 2 bytes (big-endian sample count)

SND2 Format

Offset  Size  Description
0x00    2     Sample count (big-endian)
0x02    N     Signed 8-bit mono PCM data
N+2     0-3   Trailing padding bytes

Playback Rate

sample_rate = CPU_clock / (2 * period)
period = 72800 / playback_speed
Clock Rate
PAL 7,093,790 Hz
NTSC 7,159,090 Hz

Known AMG Files

File Description
TELE2.AMG Teleporter sound
SWIPE.AMG Swipe/attack sound
MAGEXPLO.AMG Magic explosion
EXPLOS1.AMG Explosion
DRAGON.AMG Dragon sound

Clone this wiki locally