DAT Format (Highway Hunter)
The Highway Hunter DAT Format is used by Highway Hunter for storing most of the game data files.
There is no signature, so the only known way of detecting whether a file is in this format or not is to carefully parse the header and FAT and ensure the values make sense, e.g. the FAT length is less than all the file offsets, no file offset goes past the end of the file, all filenames end with a terminating NULL, the last FAT entry is all NULLs, etc.
|Length of FAT, in bytes
As each FAT entry is 17 bytes long, dividing lenFAT by 17 will reveal the number of file entries in the archive. The last FAT entry is always empty, so remember to subtract one from this value to obtain the actual number of files.
The following structure is repeated once for each file entry.
|Offset of first byte of file data, relative to the start of the archive
|Filename in 8.3 format, all lowercase, padded with 0x00 bytes to 13 chars (last char is always 0x00)
The very last file entry is always empty (offset is zero and the filename is 13 nulls.)
The file data follows the FAT, at the offsets given. At each offset, the file data is stored as follows:
|Length of the file content, in bytes
|File data, length bytes long
The following tools are able to work with files in this format.
|Decompress on extract?
|Compress on insert?
|Access hidden data?
This file format was reverse engineered by Malvineous. If you find this information helpful in a project you're working on, please give credit where credit is due. (A link back to this wiki would be nice too!)