From files to the game
Home · Reference file inventory · File schemas
In brief
The game is a program, START.EXE, and about 270 data files: level data and
maps, dungeon graphics, pictures, palettes and fonts, item tables, texts,
music and sounds, saved games and settings. This part follows each kind of
file from its bytes to what the game makes of it: when it is read, how it is
unpacked and transformed, where it ends in memory and which systems use it.
The exact layout of each format, field by field, is in its
schema and the field reference generated from it.
Some files are read once, at start-up; most are read when a level is loaded; the rest when they are needed, for a dialogue, a parchment, a sequence or a saved game. All findings refer to the files of the DOS release listed in the reference file inventory.
Kinds of files
| Files | Count | What they are | Documentation |
|---|---|---|---|
*.INF | 16 | Level data: resources, monsters, wall mappings, scripts and cell bindings, in a compressed container. | Level data (INF), CPS container |
*.MAZ | 15 | Level wall grids. | Level maps (MAZ); What the map files hold |
*.VCN | 5 | Dungeon tile sets, one per dungeon style, in a compressed container. | Dungeon tiles (VCN); Images, palettes and fonts |
*.VMP | 5 | Wall layouts for the dungeon view, one per dungeon style. | Wall layouts (VMP); Images, palettes and fonts |
*.DEC | 6 | Wall decorations: rectangles and placements. | Wall decorations (DEC); Images, palettes and fonts |
*.DCR | 9 | Decorations layered over monster images, each beside a .CPS image of the same name. | Monster decorations (DCR); Images, palettes and fonts |
*.CPS | 116 | Images of 320 × 200 pixels, one byte per pixel, in a compressed container; all 116 have been read. Four are named nowhere; see Scenes and sequence pictures. | CPS container; Images, palettes and fonts |
ITEM.DAT | 1 | Initial item records and item names. | Initial items (ITEM.DAT) |
ITEMTYPE.DAT | 1 | Properties shared by all items of a type. | Item types (ITEMTYPE.DAT) |
TEXT.DAT | 1 | Dialogue texts, loaded by the dialogue instruction. | Dialogue texts (TEXT.DAT); Texts |
*.PAL, *.COL | 19 + 1 | Palettes of 256 colours: one per dungeon style, five for the introduction, eight for the ending, and PALETTE.COL, read at start-up, identical to FOREST.PAL. | Palettes (PAL, EGA, COL); Images, palettes and fonts |
*.EGA | 8 | Palettes of 256 colours like the .PAL files, loaded instead of them in the EGA display mode (FOREST.EGA for FOREST.PAL, MENU.EGA, INTRO.EGA). | Palettes (PAL, EGA, COL); display modes; Images, palettes and fonts |
*.FNT | 2 | Fonts of 128 characters, FONT6.FNT (6 × 6, the play screen) and FONT8.FNT (8 × 8, the start menu, questions and ending). | Fonts (FNT); Images, palettes and fonts |
*.ADL, *.SND | 10 + 10 | Audio, by name, in pairs named by the INF files (for example CATACOMB.ADL and CATACOMB.SND); the first 120 bytes are the sound-effect table. | AdLib music and sounds (ADL); PC speaker and Tandy sounds (SND); Sound and music |
*.SAV | 1 | EOBDATA0.SAV, a saved game described as QUICK START PARTY, on level 4. Who made it is unknown. | Saved games (SAV), schema, Saving and restoring |
LEVELS.TMP | 1 | Level records written and read back by the game on level changes. This file is byte-identical to the level records of EOBDATA0.SAV, as loading that game would leave it. | Level records (LEVELS.TMP), schema |
FADING.DAT, EOSPREFS.DAT | 2 | EOSPREFS.DAT: settings written by SETUP.EXE, three words: the display mode, the sound driver and whether to use the mouse. FADING.DAT: seven 256-byte colour tables that the introduction reads in the VGA mode, or computes and saves when the file is missing. | Fading tables (FADING.DAT); settings (EOSPREFS.DAT) |
*.OVL | 2 | Display drivers MGA.OVL and XGA.OVL, loaded for display modes 3 and 5. | Display drivers, MGA.OVL, XGA.OVL |
*.EXE | 2 | START.EXE, the game, and SETUP.EXE. | The game executable |
*.TXT, *.CONF | 1 + 1 | CREDITS.TXT is written by the ending from the credits text built into the executable; the reference file is byte-identical to what it writes, 2,316 bytes with the terminating zero. The game never reads it. dosbox.conf is not game data. | The ending; Texts |
Descriptions marked "by name" or "comparative" rely on file names or on
comparative sources; see the
technical references for their scope. No standalone Westwood
PAK archive (REF-MW-007) is present; LCW compression (
REF-MW-008) is used
inside the CPS container.
When a file is missing
When the game cannot find a file it needs, it first looks for it in the
current directory of every other drive, from the last drive down to A:,
and continues from the drive where it finds it. If the file is still
missing it shows "Could not find file 'NAME'." and "Insert the disk
containing 'NAME' in any drive." Any key tries again; Escape shows "A
fatal disk error has occurred. Now returning to DOS.", waits for a key and
ends the program. A file that cannot be created gives the same prompt with
"Could not create file 'NAME' on disk." The drive in use when the program
started is selected again when it ends.
Sources: open a file, file test, drive search, disk prompt, fatal file error and the file-error messages.
The families of files
| Family | Files | Pages |
|---|---|---|
| Containers | .CPS | CPS |
| Level data | .INF, .MAZ | Level data, INF, MAZ |
| Dungeon graphics | .VCN, .VMP, .DEC, .DCR, door and monster images | Dungeon graphics, decoration, door and monster images, VCN, VMP, DEC, DCR |
| Images, palettes and fonts | .CPS pictures, .PAL, .EGA, FADING.DAT, .FNT | Images, palettes and fonts, scenes and sequences, PAL, FADING.DAT, FNT |
| Item data | ITEM.DAT, ITEMTYPE.DAT | ITEM.DAT, ITEMTYPE.DAT |
| Texts | TEXT.DAT, level messages, strings | Texts, TEXT.DAT |
| Sound and music | .ADL, .SND | Music files, sounds of the game, ADL, SND |
| Saves and settings | .SAV, LEVELS.TMP, EOSPREFS.DAT | SAV, LEVELS.TMP, EOSPREFS.DAT |
Sources
The hashes are those of the reference copy described above; how a file is found and the messages when it is missing come from the routines linked in that section. Comparative sources are listed in the technical references.