Deathtrack Title Script Format
| Format type | Cutscene |
|---|---|
| Hardware | EGA |
| Resolution | 320×200 |
| Maximum length | Unknown |
| Games |
TITLE.TTM is the script that drives the title sequence: it loads the Dynamix logo, the city skyline and the title picture, sets up palettes and fonts, and then draws, fades and dissolves them with timed steps. The file is a single compressed TTM: leaf chunk of the resource chunk format. Decoded, it is 477 bytes long and consists of 88 commands in 13 parts.
File format
| Data type | Name | Description |
|---|---|---|
| char[4] | tag | TTM:
|
| UINT32LE | length | Payload length (bit 31 clear) |
| BYTE[length] | payload | Compression envelope followed by the encoded script |
Commands
The decoded script is a sequence of commands. Each begins with an opcode byte that is usually an ASCII character; operands follow immediately. A script is split into parts by the / command; the interpreter runs one part at a time.
There are three operand shapes:
- a NUL-terminated file name (resource commands),
- no operands,
- a fixed number (1, 2 or 4) of INT16LE words.
| Opcode | Name | Operands |
|---|---|---|
1 |
Load screen | NUL-terminated name, e.g. CITYPIC.SCR (Deathtrack Screen Format)
|
2 |
Load bitmap | NUL-terminated name, e.g. DYNAMIX.BMP (Deathtrack Bitmap Format)
|
4 |
Load font | NUL-terminated name (Dynamix Font Format v2-v3) |
7 |
Load palette | NUL-terminated name (Deathtrack Palette Format) |
8 |
Select bitmap slot | 1 word |
9 |
Select palette slot | 1 word |
` |
Select font slot | 1 word |
0x0B, 0x0C, 0x0D |
Free palette / bitmap / font | none |
* |
Activision logo | 2 words (the interpreter skips them and runs the logo routine, which loads the activisi file)
|
; |
Set frame delay | 1 word |
$ |
Set step delay | 1 word |
? |
Clip rectangle | 4 words |
@ |
Select frame | 1 word |
B |
Draw frame | 4 words |
C |
Circle outline | 4 words |
D |
Filled circle | 4 words |
L |
Line | 4 words |
R |
Fill rectangle | 4 words |
S |
Fill rectangle (solid) | 4 words |
G–Q |
Screen transitions | 4 words |
^ |
Set foreground/background colour | 2 words |
& |
Border colour | 1 word |
+ |
Present page | none |
# |
Dissolve screen | none |
- |
No-op | 1 word |
/ |
End of part | none |
The commands :, h and r take no operands. Any other opcode from B to \ takes four words and is treated as an indexed drawing opcode; the runtime may stop on opcodes that it does not implement.
The decoded TITLE.TTM references DYNAMIX.BMP, CITYLINE.BMP, TITLE.BMP and CITYPIC.SCR. All 477 bytes are consumed by the command sizes above.
Source code
From re-deathtrack, the open-source browser port:
src/viewer/decode.js–titleScript()disassemblersrc/game/seg2524.js– translated indexer (2524:0a7c) and interpreter (2524:0c66)docs/re/resources.md–loadTtm(2524:08de)
Credits
This file format was reverse engineered by VorticonCmdr. 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!)