The Centurion Defender of Rome data file format

Discuss game modding
Post Reply
petersw79
Less than a nibble
Posts: 1
Joined: June 14th, 2022, 4:59 am

The Centurion Defender of Rome data file format

Post by petersw79 »

Centurion Defender of Rome is a late 80's/early 90's game which (at least the DOS version) appears to use *.dir and *.dat files to store *.bin/.cmb/.lzw sub-files. The *.dir files appear to be structures as follows:

for each listed sub-file a 20 byte record:
uint32: offset
uint16: length
13 bytes: null padded 8.3 filename with terminating null
byte: sub-file type

The above reflects my understanding of the *.dir files. Each data file has the same names as the *.dir files except for the .dat extension.

Attached to this post is vb.net code file containing the data file extractor I wrote. While it appears to work I am not entirely certain. Could someone verify this?
You do not have the required permissions to view the files attached to this post.
Malvineous
8-bit mega nerd
Posts: 292
Joined: March 17th, 2007, 6:40 pm
Location: Brisbane, Australia
Contact:

Re: The Centurion Defender of Rome data file format

Post by Malvineous »

Yes, this looks correct to me. The subfile byte could also be eight bit-flags, however there aren't enough files to confirm this. I can only see three different values - 0x00 for .BIN, 0x80 for .LZW and 0xC0 for .CBM.

Possibly the most significant bit (0x80) is a compression flag, but that would suggest the .CBM files are compressed with the same algorithm, and they have a second flag set (0x40) which indicates something else.

Hopefully you'll consider adding the game and this format over at the ModdingWiki!
Post Reply