Saved games (SAV)
File formats · Field reference · Schema
In brief
A saved game, EOBDATA<n>.SAV for save slot n, is a direct copy of the
parts of the game's memory that make up an adventure in progress: the party,
the party and world variables, every item and one record for each dungeon
level. The game writes the same layout to FINAL.SAV when it saves with
slot −1, once, just before the ending; nothing in the game reads that file
back, and its first part is not a description (see
the end of the game). What the game does when it writes
and reads these files is
explained in saving and restoring.
The DOS game ships one saved game, EOBDATA0.SAV, described as
QUICK START PARTY. It places the party at [11:05] on level 4 (column 11,
row 5; block index = row × 32 + column). Its four characters are listed
with the characters of the game.
Organization
The file has no header and no signature. It is seven parts, one after the other:1
| Part | Offset | Size | Contents |
|---|---|---|---|
| 1 | 0x0000 | 20 | Slot description, zero-padded text. |
| 2 | 0x0014 | 6 × 345 | The six characters, with their timers as time remaining. |
| 3 | 0x082a | 92 | Party and world variables, including which levels have a record. |
| 4 | 0x0886 | 600 × 14 | The item table, in the layout of ITEM.DAT items. |
| 5 | 0x2956 | 17 × 2,130 | Level records, the same image as LEVELS.TMP. |
| 6 | 0xb6c8 | 3 | Tunes, sounds and bar-graph options. |
| 7 | 0xb6cb | 6 × 16 | Item types 51 to 56, in the layout of ITEMTYPE.DAT records. |
A complete file is 46,891 bytes. The game checks only that each part is complete.2
Each level record holds the level's walls, compressed with the type-4 method
of CPS containers, then its 30 monster slots and its five
temporary walls. A record counts only if its level's bit is set in part 3:
in the reference file only level 4 is marked, and the 16 other records hold
leftover data that the game ignores. Such data comes from LEVELS.TMP,
which saving copies whole and which a new game does not empty
(lifetime of the file).3
Writing and reading the file
Saving first settles the current level, packs it into its record and sets its bit, then writes the seven parts in order; the characters' timers are written as time remaining. The result of opening the file is not tested, the length of each write is.4
Loading reads the whole file and checks that each part is complete; a short
part restores nothing. Otherwise the game settles the current level and
restores the parts in order: the characters, the party and world variables,
the items, the level records, written over LEVELS.TMP,
the options and the six item types. The description is skipped. When the
game is under way, it then loads the saved level and sublevel. See
loading a saved game for
what the player sees and what can fail.5
What it becomes in memory
Each part is the image of a table of the game, copied without conversion apart from the characters' timers: the characters, the block of party and world variables that starts with the current level, the item table, the level records with their monster slots, the three option settings and types 51 to 56 of the item-type table. The four wall tables of the level are neither saved nor restored.45
Example
The first part and the start of part 3 of EOBDATA0.SAV:
offset bytes meaning
0000 51 55 49 43 4b 20 53 54 41 52 54 20 "QUICK START "
000c 50 41 52 54 59 00 00 00 "PARTY", zero padding
...
082a 04 00 00 00 level 4, sublevel 0
082e ab 00 02 00 party block 171 = [11:05], direction 2
0832 00 00 no held item
0834 08 00 00 00 record bits: level 4 only
Related pages
- Saving and restoring: when the game writes and reads these files and what it does with each part.
CharacterRuntime,ItemRuntime,ItemTypeRuntimeandMonsterRuntime: the memory structures copied into the file.
Sources
Locations refer to the game executable reference;
comparative sources are listed in the technical references
(REF-SCUMM-013, REF-SCUMM-015).
The reference file is listed
in the file inventory.