Doofus Game Data Format
The Doofus Game Data Format is used by Doofus to store much of the game's data.
There is no signature, but since some file entries begin with the letters "GB", this could be used to identify files, by checking to see whether these characters appear at the expected locations. The music files also start with "TBSA0.01".
The File Allocation Table (FAT) is stored in doofus.exe.
|EXE version||FAT offset||Identification method|
|1.0||0x15372||0xFB10 contains text "The Bone Shaker Architect", after reversing PKLite compression|
The FAT consists of the following structure, repeated 65 times. There are another four 0x00 bytes following this, but it is unknown whether these belong to the FAT (as a final terminator) or whether they belong to the data following the FAT.
|UINT16LE||length||Length of file data, in bytes|
The first file begins at offset 0 in gamedata.g-d. To calculate the offsets of subsequent files, the length fields must be totalled.
The type field appears to contain a code representing the type of data stored at that file's location. Known types are:
|0x59EE||TBSA Music Format|
The first file contains configuration data.
|UINT8||option1||0=70Hz videomode, 1=55Hz videomode|
|UINT8||option4||bitfield: 0x80=turbo mode, 0x08=samples, 0x04=music, 0x03=always set. Turbo mode only allowed with samples on.|
|char||playerName||Player's name, padded with spaces and not null-terminated|
|char||password||Level password, padded with spaces and not null-terminated|
#1: High scores
|UINT32LE||score||Score for each of the seven high-score entries|
|char||highName||Name for each of the seven high-score entries (20 chars each, not null-terminated)|
Each high score entry begins with a space, a number and a full-stop, and is padded with dashes and a final space, e.g. " 1.example ------ ". The dashes are replaced with the actual score when displayed in-game.
These files all start with a particular header.
|UINT16LE||length||Length of data in file|
|BYTE||padding||Bring total structure up to 55 bytes|
|BYTE[length]||content||Actual data for this file|
The music files start with the characters "TBSA0.01". This probably stands for "The Bone Shaker Architect", the name of the music player library. They are in TBSA Music Format.
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!)