DAT Format (Mystic Towers)
The DAT Format is used by Mystic Towers for storing most of the game data.
There is no signature, but the file has certain fields that can be checked for validity. For example all the offsets could be read in the FAT to ensure none of the files appear to have data beyond the end of the archive file itself.
The very last two bytes in the file are a UINT16LE called numFiles. The FAT begins (offFAT) at the 2 + numFiles * 21 bytes from the end of the file.
At offFAT, the following structure is repeated numFiles times.
|UINT8||lenFilename||Length of valid chars in filename field|
|char||filename||Filename, padded to 12 chars with arbitrary values. Only first lenFilename chars are valid.|
|UINT32LE||offset||File offset, relative to start of file|
It's possible to "hide" data between the last file and the start of the FAT. This data wouldn't be accessible by filename but the game would load the other files as per normal.
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|
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!)