OpenTPW

The CD autorun launcher#

October 10, 2026. The original CD opens a 640x480 launcher window (AUTORUN.INF runs Autorun\Autorun.exe) with the buttons Play, Install, Uninstall, Re-Install, Tech Support, View Read-me and Exit. OpenTPW reproduces it as an optional start screen ([EXT:autorun]). Everything below was found by static analysis of the CD files and Autorun.exe (never executed); no original data is stored in the repository.

Files#

Autorun\ on the CD: Autorun.exe (Origin Systems "Gateway" 2.24, a scripted launcher), autorun.tre (the script), general.tre (shared art), one <Language>.tre per language (English, Dutch, Italian, Polish on the Benelux CD; English, Danish, French, German, Swedish on the European CD), si.img / woi.img (the installer stubs the Play and Install buttons start). All .tre files are TREE archives.

TREE format#

Little endian. Header, 8 x u32: magic TREE, version (1; the launcher accepts <= 1), entry count, descriptor offset, hash node count N (15), hash table offset (0x20), collision list size (0 in every file), collision list offset (equals the descriptor offset in practice).

Entries: general.tre holds .\general\backgrnd.bmp (640x480, the language picker's backdrop without labels) and nine 224x40 language buttons (english, francais, deutsch, italiano, espanol, svenska, nederlands, dansk, polski). A language archive holds .\autorun\back.bmp (640x480 with the labels baked in, dim brown), play, install, uninst, reinst, readme, tech, quit (224x40, or 408x40 for the languages with a wider black column: Polish, Danish, French, German) and sometimes register (English) or song (German, a leftover "Dungeon Keeper Song" button). All are 8-bit uncompressed BMPs with one shared palette; index 255 is black. autorun.tre holds one RefPack entry, autorun.cfg (a DK2-era script: defines, objects, button actions).

Layout and behaviour (from autorun.cfg and Autorun.exe)#

In OpenTPW#

The application-owned desktop edition starter appears before game assets are loaded on ordinary interactive startup when autorun is enabled. It offers TPW and the explicitly experimental TPI world route without executing either original autorun executable. The TPW CD artwork screen below remains optional after a TPW choice; TPI launches the selected world directly and does not enter that TPW screen.

AutorunAssets (art, script rows, read-me lookup), AutorunView (CPU composite, focus, clicks, no GPU), AutorunScreen (GPU: the 640x480 image point-sampled at the largest integer scale that fits the window, centred on black), AutorunLauncher (when to show it) in source/OpenTPW/Client/Autorun; TreArchive and TreCompression in OpenTPW.Files.

Not verified against a capture of the original: the focus rectangle's dot phase ([EXT:autorun-focus-rect], platform emulation) and that bright buttons keep their pure-black background rectangle (the launcher copies it as it is; the backdrop's black is (4,4,4)).

Tests: TreArchiveTests (synthetic archives, RefPack command forms, the PKWARE reference vector, hashes of the original names; private CD files with OPENTPW_GAME_PATH), AutorunTests.

Source: docs/AUTORUN.md in the project repository.