DAT Format (Mystic Towers)
Format type | Archive |
---|---|
Max files | 65,535 |
File Allocation Table (FAT) | End |
Filenames? | Yes, 8.3 |
Metadata? | None |
Supports compression? | No |
Supports encryption? | No |
Supports subdirectories? | No |
Hidden data? | Yes |
Games |
The DAT Format is used by Mystic Towers for storing most of the game data.
File format
Signature
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.
Header
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.
File entry
At offFAT, the following structure is repeated numFiles times.
Data type | Name | Description |
---|---|---|
UINT8 | lenFilename | Length of valid chars in filename field |
char[12] | filename | Filename, padded to 12 chars with arbitrary values. Only first lenFilename chars are valid. |
UINT32LE | offset | File offset, relative to start of file |
UINT32LE | size | File size |
Hidden data
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.
Tools
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 |
---|---|---|---|---|---|---|---|---|---|
Camoto | Linux/Windows | Yes | N/A | Yes | Yes | N/A | No | N/A |
Credits
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!)