DAT Format (Wacky Wheels)
|File Allocation Table (FAT)||Embedded|
The DAT format is used to store most of the data for Wacky Wheels. Unfortunately the format has no signature and a generic filename extension (.dat) so automatic detection of these files is difficult.
In Wacky Wheels 1.0 (a pre-release version of Wacky Wheels), this file was named WACKY.LID.
Wacky Wheels does not check the current directory for files before falling back to the DAT file, so any changed files must be merged into the DAT file before the game will see them.
There is no signature for this format. One method to identify files is to read in the file entries (failing if the end of the file is reached early) and confirm that each filename only consists of ASCII characters or nulls, and each file offset plus its size is less than the total size of the DAT file. It is extremely unlikely that this method would incorrectly identify a file.
The file starts with a single field indicating the number of files present.
|UINT16LE numFiles||File count|
After the two-byte header, the following structure is repeated numFiles times. As each entry includes both an offset and a size, it is possible (in theory) for two different files to share the same data, and to insert “hidden” data between files.
|BYTE filename||Filename (8.3, 12 chars including dot, null padded to 14 chars)|
|UINT32LE size||File size|
|UINT32LE offset||File offset (see below)|
The file offsets don’t include the two-byte file count in the header, so an offset of 10 means the file actually starts at 12 bytes from the beginning of the DAT file.
The following tools are able to work with files in this format.
|Name||Platform||Extract files?||Decompress on extract?||Create new?||Modify?||Compress on insert?||Access hidden data?||Edit metadata?||Notes|