User:Eientei/The Dame is Loaded

From ScummVM :: Wiki
Revision as of 00:27, 16 June 2022 by Eientei (talk | contribs)
Jump to navigation Jump to search

Movies and images are in a custom "SIFF" format (IFF-based, big endian).

GOB files

GOB files on the CDs have a TOC at the end of the file. Last 4 bytes are the number of entries in the table, each entry is 20 bytes in size, little endian:

0-12  filename null padded
13-16 offset
17-20 size

Python script to print out the TOC

from struct import unpack
from sys import argv

f = open(argv[1], 'rb')
f.seek(-4, 2)
num_entries, = unpack('<I', f.read(4))
f.seek((num_entries * -0x14) - 4, 1)
for _ in range(num_entries):
	fname, off, flen = unpack('<12sII', f.read(0x14))
	pos = f.tell()
	fname = fname.decode("ascii").strip("\0")
	print(f'{off:08x}\t{flen:08x}\t{fname}')
	_ = f.seek(pos)

Files

File extensions and their internal type:

1-49    HOTB
FCP     FCPK
PAN/PIM PXAN
SON     SOUN
SPR     PXAN

NTPD.ENC is "encrypted" using Caesar shift -5 (excluding \n !"#$&'(),-./?)

File listings of CD1.GOB and CD1MOV.GOB.