Star Trek 25th DIR
From XentaxWiki
Contents
DIR + 001
- Format Type : Archive
- Endian Order : Little Endian
Format Specifications
// *.dir file
- // for each file
- byte {8} - Filename Prefix
- byte {3} - Filename Suffix
- byte {3} - File Offset
- byte {8} - Filename Prefix
// *.001 file
- // for each file
- uint16 {2} - Uncompressed Size
- uint16 {2} - Compressed Size
- byte {X} - Compressed File Data
- uint16 {2} - Uncompressed Size
Notes and Comments
- The .dir file contains the directory information, the .001 file contains the file data.
- Filename Prefix and Suffix are zero-terminated in case they are shorter than 8 resp. 3 bytes.
- Note that the File Offset is actually a 3 byte value!
- Each entry can in fact stand for up to 10 different files. If the highest bit of File Offset is set, the actual number of files is derived from the highest byte of File Offset while ignoring the signalling high bit. The position of the first file can be computed by adding 4 to the size of the last extracted file and its offset. The offsets of the following files can be computed the same way. Note that the following files are zero-padded to even offsets.
- In case of multiple files per entry, the Filename Prefix will end with the character "0". Increase this to "1", "2" etc. as you extract the trailing files.
- The file data within the .001 file has been compressed using the LZSS algorithm. The parameters needed for decompression are:
- History buffer size N = 0x1000, addressed from zero onwards
- Window size F = 0x10, addressed from zero onwards
- Initial history buffer writing position: 0
- Initial history buffer filling: 0x00
- Compression threshold: 3
- Buffer references are relative to the current buffer write position.
MultiEx BMS Script
Not yet written.
Compatible Programs
Unknown.