File names and buffers
Data · Routines · Address index
The names of item, level, saved-game, dialogue and transfer files, file slots, shared buffers and file-error messages. The data page explains how the entries are written.
DS:0x1b1e–DS:0x1cc0 — Ending tables
- Layout:
0x1b1eword;0x1b20word;0x1b2221 far pointers to animation lists of 11-byte records;0x1b7613 far pointers to shape definitions, one per scene (null for scenes without shapes);0x1baa13 far pointers to the picture names that follow,DRAGON1.CPS(0x1bfc) toTHANKS.CPS;0x1bdefar pointer and0x1be2word;0x1be4six (x, y) word pairs - Role: The tables of the ending.
0x1b1eis the skip flag: the ending clears it at six places and every step tests it, but no instruction stores a nonzero value in it, so it stays 0 (poll during a wait).0x1b20is set to 0 at the start and to 1 before the credits and never read.0x1bdeand0x1be2are the target palette and rate of the delayed palette fade.0x1be4gives the positions of the six portraits on the last picture: (80, 80), (208, 80), (80, 144), (208, 144), (144, 80), (144, 144). - Comparative source: REF-SCUMM-012,
DarkMoonEngine::seq_playFinale. - Used by: Images, palettes and fonts, Decoration, door and monster images, Dungeon graphics, Scenes and sequence pictures
DS:0x1016, DS:0x101f — Item file names
- Layout: strings
- Role:
ITEM.DATandITEMTYPE.DAT. - Used by: Item entry › In brief
DS:0x12e6 — DCR file name format
- Layout: string
- Role:
%s.dcr, used by the DCR loader. - Used by: Monster decorations (DCR) › In brief
DS:0x131d, DS:0x1325, DS:0x132b — INF file name parts
- Layout: strings
- Role:
%s%d.%s,LEVELandINF, combined intoLEVEL<n>.INFby the INF level loader. - Used by: —
DS:0x139c–DS:0x1404 — Saved-game and level-record file names
- Layout: strings
- Role:
LEVELS.TMP(at0x139c,0x13a7,0x13c1,0x13f9and0x1404, one copy per use),EOBDATA%d.SAV(0x13ccand0x13eb) andFINAL.SAV(0x13da). The save writer formatsEOBDATA%d.SAVwith the slot number, or usesFINAL.SAVfor slot −1; the save reader uses the same format. The level-record routines openLEVELS.TMP. - Used by: Saving and restoring › What a saved game holds, Saved games (SAV) › Organization, Loading, failures and the end of the game › The end of the game
DS:0x158a, DS:0x162e, DS:0x1646, DS:0x1667, DS:0x166f — Dialogue and sequence file names
- Layout: strings
- Role:
TEXT.DAT(0x158a),OUTTAKE(0x162e),BORDER(0x1646),PORTALA(0x1667) andPORTALB(0x166f). - Used by: Dialogue screen › Opening and closing the screen, Images, palettes and fonts, Decoration, door and monster images, Dungeon graphics, Scenes and sequence pictures
DS:0x1758, DS:0x1764, DS:0x1770 — Party transfer file names
- Layout: strings
- Role:
EOBDATA.SAVtwice, the file looked for and then opened by readEOBDATA.SAV, andCHARGENA, the portraits of the converted characters. - Used by: Transferring a party from Eye of the Beholder I › Transferring a party from Eye of the Beholder I
DS:0xd0ac — Shared buffer
- Layout: far buffer
- Role: Holds the decoded INF data while a level loads, and
TEXT.DATduring a dialogue; the container decoder writes to it. - Used by: Dialogue screen › Opening and closing the screen, Dialogue screen › Edge cases and unknowns, Dialogue texts (TEXT.DAT), Transferring a party from Eye of the Beholder I
DS:0xf02c — File slots
- Layout: 10 words;
0x3fffmarks a free slot - Role: The files the game has open.
0x2ea8dfrees them all at the start. - Used by: Resident files
DS:0xf16e — Runtime file name
- Layout: string buffer
- Role: File name built at run time by each of its users:
LEVEL<n>.INFin the INF level loader,EOBDATA<n>.SAVorFINAL.SAVin the save writer and reader, and the VCN name in0x4811e. - Used by: —
DS:0x6d44 — Stored VCN name
- Layout: string
- Role: Name of the last VCN file loaded,
copied there at
0x48318; the loader uses it when called without a name (0x1edd3,0x27a83). Its only caller with a name is the INF loader (0x48f28). - Comparative source: REF-SCUMM-012,
loadVcnData. - Used by: Run a special event › Reload the wall graphics (event 6)
DS:0x5e3a — File-error messages
- Layout: 19 far pointers to zero-terminated strings (
DS:0x5e8e–0x6111), then the disk request atDS:0x6118 - Role: Messages of the file helpers, numbered by the kind argument of
the disk prompt and the
fatal file error: 0 could not create a file, 1
illegal open mode, 2 could not find a file, 3 too many files open, 4–7 a
close, read, write or seek on an unopened file, 8 an illegal seek origin,
9 a write to a resident file, 10 an unknown resident file, 11 exiting with
open files, 12 the fatal disk error, 13–17 errors of the resident-file
table, which lists no file.
DS:0x6118is "Insert the disk containing '%s' in any drive.", added for kinds 0 and 2. - Used by: From files to the game › When a file is missing, Texts
DS:0x61f4 — Drive-search switch
- Layout: byte, 1 in the executable image
- Role: While it is nonzero, the file search looks
for a missing file on the other drives. Only the
slot-list refresh changes it: it clears
it around its scan of the save files through
0x2f2cc(store at0x2f2cf) and sets it again through0x2f2d6(store at0x2f2d9). - Used by:
DS:0xf042 — Last drive
- Layout: byte
- Role: Number of the last drive, set at start-up from DOS (INT 21h
functions
19hand0Eh,0x32632–0x3265f); the file search walks the drives from it down toA:. - Used by: