Darklands catalog files

Files with this format: "*.cat"; "bc"; "lcastle"; "msgfiles".

Catalog files are basically a filesystem; each one contains a large set of (usually related) files.

Table of Contents

Offsets

starting at 0x00
starting at entry[0].offset

Structures

entry

Offsets

Offset: starting at 0x00

0x00: num_entries: word
Number of file entries.
0x02: entries: array[ num_entries ] of struct entry (each size 0x18)
File entries.

Offset: starting at entry[0].offset

[next]: contents: array[ num_entries ] of unknown (entry[idx].length bytes)
Contents of the files.

Structures

Structure: entry

Size 0x18.

0x00: filename: string(12)
Name of the file.
  • Always in 8.3 format.
  • Padded with nulls if the filename is shorter.
0x0c: timestamp: dword
Timestamp of when the file was added to the archive.
  • This might be something else, but all the values in a single cat file are very close together. a00c.cat has a timestamp about a minute before e00c.cat, and this field is about 0x40 (64) higher in e00c.cat. That would imply it's a number of seconds since an epoch. Additionally, einfo.cat (timestamped half a year earlier) has numbers much smaller.
  • Epoch seems to be around 3/1/1979, although I could be mistaken. 1/1/1980 would make more sense.
0x10: length: dword
Length of the contents.
0x14: offset: dword
Offset to the contents.