Skip to main content

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.

When the game reads its files. At start-up: EOSPREFS.DAT, PALETTE.COL, the two fonts, the introduction with its pictures, palettes and FADING.DAT, and the start menu picture. At each level load: the level’s INF file, its MAZ map, the VCN, VMP and PAL files of its dungeon style, its decoration images and DEC file, its door and monster images with their DCR files, its ADL or SND file, and its record in LEVELS.TMP. When needed: TEXT.DAT for dialogues and parchments, the dialogue and scene pictures, the saved games, and at the end FINAL.SAV, the ending and CREDITS.TXT.
Most files are read when a level is loaded; a few at start-up, the rest when they are needed.

Kinds of files​

FilesCountWhat they areDocumentation
*.INF16Level data: resources, monsters, wall mappings, scripts and cell bindings, in a compressed container.Level data (INF), CPS container
*.MAZ15Level wall grids.Level maps (MAZ); What the map files hold
*.VCN5Dungeon tile sets, one per dungeon style, in a compressed container.Dungeon tiles (VCN); Images, palettes and fonts
*.VMP5Wall layouts for the dungeon view, one per dungeon style.Wall layouts (VMP); Images, palettes and fonts
*.DEC6Wall decorations: rectangles and placements.Wall decorations (DEC); Images, palettes and fonts
*.DCR9Decorations layered over monster images, each beside a .CPS image of the same name.Monster decorations (DCR); Images, palettes and fonts
*.CPS116Images 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.DAT1Initial item records and item names.Initial items (ITEM.DAT)
ITEMTYPE.DAT1Properties shared by all items of a type.Item types (ITEMTYPE.DAT)
TEXT.DAT1Dialogue texts, loaded by the dialogue instruction.Dialogue texts (TEXT.DAT); Texts
*.PAL, *.COL19 + 1Palettes 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
*.EGA8Palettes 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
*.FNT2Fonts 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, *.SND10 + 10Audio, 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
*.SAV1EOBDATA0.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.TMP1Level 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.DAT2EOSPREFS.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)
*.OVL2Display drivers MGA.OVL and XGA.OVL, loaded for display modes 3 and 5.Display drivers, MGA.OVL, XGA.OVL
*.EXE2START.EXE, the game, and SETUP.EXE.The game executable
*.TXT, *.CONF1 + 1CREDITS.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​

FamilyFilesPages
Containers.CPSCPS
Level data.INF, .MAZLevel data, INF, MAZ
Dungeon graphics.VCN, .VMP, .DEC, .DCR, door and monster imagesDungeon graphics, decoration, door and monster images, VCN, VMP, DEC, DCR
Images, palettes and fonts.CPS pictures, .PAL, .EGA, FADING.DAT, .FNTImages, palettes and fonts, scenes and sequences, PAL, FADING.DAT, FNT
Item dataITEM.DAT, ITEMTYPE.DATITEM.DAT, ITEMTYPE.DAT
TextsTEXT.DAT, level messages, stringsTexts, TEXT.DAT
Sound and music.ADL, .SNDMusic files, sounds of the game, ADL, SND
Saves and settings.SAV, LEVELS.TMP, EOSPREFS.DATSAV, 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.