Skip to content

Catalog Files (*.CAT)

Darklands stores game assets in catalog files - simple archive containers, each holding a set of related files. There is no single monolithic pack file; assets are split across multiple named catalogs.

Extension
*.CAT — also extensionless: BC, LCASTLE, MSGFILES
Location
Game root
Byte order
Little-endian (16/32-bit)
Size
Variable — 24-byte directory entries + raw payloads
Compression
None — payloads embed their own formats (DRLE, PIC, etc.)
Magic
None
Status
Documented
Source
Wendigo — X.cat.xml

Canonical source: X.cat.xml (Wendigo’s Darklands repo)

Known Catalog Files

FilenameContents
A00C.CATBattle sprites for a tall, thin alchemist (“Hans” from the default party)
C00C.CATBattle sprites for a short, wide cleric (“Ebhard” from the default party)
E00C.CATBattle sprites for human enemies
F01C.CATBattle sprites for a male fighter (“Gunther” from the default party)
F60C.CATBattle sprites for a female fighter (“Gretchen” from the default party)
M00C.CATBattle sprites for non-human enemies
EINFO.CATEnemy info display images (PIC files)
IMAPS.CATMap tile graphics
BCCombat tile art - 65 entries, seven tile families, battle environment graphics (see below)
LCASTLE(extensionless catalog - slightly corrupt, last entry is zero-length)
MSGFILESAll text option menus and situation descriptions (.msg files)
EDITOR.CATCharacter editor images (not present in version 1.07)

Battle sprite catalogs contain three animation types, identified by the 4th-5th letters of the filename:

SuffixDescription
CBCombat animations (many weapon variants)
WKWalking animations
DYDying / dead animations

File Format

Each catalog is a flat directory followed by file data.

Top-Level Layout

Offset 0x00:  word         num_entries  - number of files in this catalog
Offset 0x02:  entry[0..n]  entries      - array of 24-byte directory entries
              ... (file data at offsets specified in entries)

Directory Entry (24 bytes)

OffsetSizeFieldDescription
+0x0012filename8.3 DOS filename, null-padded to 12 bytes
+0x0c4entry_metadataNative 24-byte catalog-entry metadata field; often timestamp-like, but not yet proven universal
+0x104lengthLength of file data in bytes
+0x144offsetByte offset from start of catalog to file data

Metadata notes: In most ordinary CAT-family archives (A00C.CAT, BC, C00C.CAT, E00C.CAT, EINFO.CAT, F01C.CAT, F60C.CAT, IMAPS.CAT, LCASTLE, M00C.CAT), this field decodes cleanly as a plausible clustered DOS-style date/time value. MSGFILES is the main exception: it keeps the same structural field, but the values span a wider range, cluster by filename family, and collide across unrelated message families.

The generic executable resource-open/read path uses the filename, size, and payload offset fields, but does not currently appear to consume the 0x0C dword directly. So the safest interpretation is:

  • it is native archive metadata in the 24-byte entry layout
  • timestamp remains a useful working interpretation for many CAT-family archives
  • its exact semantics may vary by catalog family and should not yet be treated as universally proven

BC Archive - Combat Tile Art

BC is an extensionless catalog with 65 entries and a total uncompressed payload of 189,815 bytes. It contains all the tile art for combat encounters, organised into seven families:

SuffixCountContent
FLC9Floor tiles, lit (combat)
FFC9Floor tiles, far (ceiling / distance)
NWC9Near-wall tiles
NFC9Far-wall tiles
WWC9Wide-wall tiles
WFC9Wide-far-wall tiles
FRC9Filler / trim tiles

Seven families x 9 variants = 63 tile entries. The remaining 2 entries are structural (index header and null entry).

The 9 variants per family cover the five combat environment types plus special cases:

EnvironmentTile set name pattern
Outdoor (Wild)OUT.*
MineMINE.*
CityCIT* / URB*
FortFORTMONS.*
Tomb / CaveKEEP.* and CAVEDRAG.*

All five environment bundles are confirmed - their filenames appear in the archive directory and have been extracted and matched to their contexts. The environment selection string bank lives in section 138 of DARKLAND.EXE at flat offset 0x17F670.

IMAPS - Encounter Grid

Also used by the combat system is the IMAPS.CAT catalog, which contains the encounter map grid data:

  • 1,109 records of 12 bytes each, plus a 20-byte header
  • Total: 20 + 1109 x 12 = 13,328 bytes
  • The records encode a 33 x 33 tile grid (1,089 cells), with the remaining 20 records used for supplementary lookup data
  • Each 12-byte cell describes tile type, height, wall flags, and passability for one grid position

The IMAPS grid is a static lookup table, not procedurally generated. Every combat map in Darklands is built from IMAPS cell data combined with BC tile art.


Streaming Read Pipeline

For large assets, the engine can read resource data incrementally from a catalog instead of loading the entire payload at once:

resource_init_reader
    -> stores catalog file handle in 0x8e30
    -> installs resource_read_chunk as callback at 0xeeb8

resource_read_chunk  (called when buffer empty)
    -> reads next chunk from catalog
    -> fills buffer at 0xeffc
    -> updates stream read pointer at 0xf1fc

This appears to be a generic streamed resource-input path used by the engine. It should not be confused with the compression format of .CAT itself.

Important: .CAT files are not compressed containers. They are flat archives holding raw file payloads. Compression, when present, belongs to the embedded file format:

  • .IMC uses Darklands DRLE
  • .PIC uses its own image compression pipeline
  • .MSG files are structured text data, not compressed by the catalog