Skip to main content

Data outside the data segment

Data · Routines · Address index

Tables of the resident image that lie outside the data segment: sound driver state, button lists, party-transfer tables and other tables. The data page explains how the entries are written.

Some tables lie in the resident image but outside the data segment. They are located by their file offset, and their anchors start with p-.

Sound driver 1 keeps its variables in its own code segment, 0x1000: there, cs:x is analysis address 0x10000 + x and file offset x + 0x3200.

Physical 0x3450 — Music marker​

Physical 0x34c6 — Sound data buffer​

Physical 0x75fd — Sound request queue​

  • Layout: 16 bytes, analysis address 0x143fd (cs:0x43fd); read position word cs:0x43fb, write position word cs:0x43f9
  • Role: Program numbers waiting to start, written by queue a program and read on each tick by 0x148a6. Each number is written as a word, so the byte after the last slot, the first byte of channel 0's state, is also written (ANOMALY-97).
  • Used by: Anomalies and bugs

Physical 0x760d — Channel states​

  • Layout: 10 × 0x43 bytes from analysis address 0x1440d (cs:0x440d), one per channel; the table of their addresses is at cs:0x46ab
  • Role: The state of each driver channel: byte 0 a level offset set by commands 0xac and 0xad; 0x03 the command pointer; 0x05 the step counter; 0x06 the repeat counter; 0x07 the base octave; 0x08 the priority; 0x09 the call depth and 0x0a–0x11 the return addresses of command 0x85 (0x86 returns); 0x12 the base note; 0x13–0x16 the slide (rate, counter, step word); 0x17–0x1f the vibrato (step word, depth, half-period count and reload, delay reload, rate, counter, delay); 0x20 and 0x30 two more level offsets; 0x21 the note-off point; 0x24 the base frequency; 0x25 and 0x26 the tempo and its counter; 0x27 and 0x28 the last values written to registers 0xa0 and 0xb0; 0x29 and 0x2b the two effect slots; 0x2d the note-off fraction; 0x2e and 0x2f the operator levels and 0x31 the connection bit; 0x32–0x34 the velocity shifts and the last velocity; 0x35 the note spacing; 0x36 the duration randomness mask; 0x39–0x3f a register cycle (rate, counter, reload, index, register, table address); 0x40 the tempo reset; 0x41 the last note byte; 0x42 the pitch bend. Bytes 1, 2, 0x22, 0x23, 0x37 and 0x38 are never accessed. The call depth is not bounded: a fifth nested call overwrites byte 0x12; no original sound file uses command 0x85. Bytes 3 to 0x42 are cleared when a program starts on the channel.
  • Comparative source: REF-SCUMM-012, AdLibDriver::Channel.
  • Used by:

Physical 0x78c8, 0x73d4 — AdLib frequency and pitch bend tables​

  • Layout: 12 words; 14 words, then 14 × 32 bytes
  • Role: In the segment of sound driver 1 (cs:0x46c8 and cs:0x41d4). The first is the 10-bit frequency number of each semitone, from 0x134 to 0x246, read by the note routine. The second holds the driver offsets 0x41f0 to 0x4390 of fourteen 32-byte pitch bend tables (file 0x73f0 onwards), chosen by the note's low four bits (plus two for an upward bend) and indexed by the bend; nothing bounds either index (ANOMALY-124).
  • Used by: How an AdLib note sounds › How a note sounds

Physical 0x8a0e — ADL command table​

  • Layout: 74 words, analysis address 0x1580e (cs:0x580e), for commands 0x80 to 0xc9; the next word, at cs:0x58a2, begins another table
  • Role: Handler addresses of the ADL commands, used by run the channels. Twenty entries point to the stop handler 0x14b8b. The bound check accepts indices up to 0x70, so the words after the table also serve as handlers for bytes 0xca to 0xf0 (ANOMALY-99).
  • Comparative source: REF-SCUMM-012, AdLibDriver::_parserOpcodeTable.
  • Used by: AdLib music and sounds (ADL), Anomalies and bugs

Physical 0x27290 — Teleporter sparkle points​

  • Layout: 6 sets × 13 pairs of signed bytes; analysis address 0x34090 (segment reached through operand 0x250 of the overlay segment table)
  • Role: The 13 (x, y) points of each sparkle layer: sets 0–1 one step ahead, 2–3 two steps ahead, 4–5 three steps ahead, drawn by 0x3f311.
  • Comparative source: REF-SCUMM-016, _teleporterShapeCoords.
  • Used by:

File offsets 0x27330–0x27558 — Party creation buttons​

  • Layout: three tables reached through operands 0x258, 0x260 and 0x268 of the overlay segment table. 0x27330: 41 button definitions of 8 bytes (x in 8-pixel columns, y, width, height, key number, three zero bytes). 0x27480: 4-byte rectangles (column, y, width in columns, height) of button pictures in CHARGENB, normal then pressed. 0x274c0: 17 drawing records of 9 bytes (label column, y, width in columns and height in CHARGENB; label offset x, y; picture index; destination column, y)
  • Role: The buttons of the party creation screen. Definitions 0–3 are the four boxes (keys F1 to F4), 4 PLAY (key P), 5 OK, 6 DELETE, 7 BACK at the place of OK, 8–20 the thirteen menu lines, 21–22 the portrait arrows, 23–26 the four portraits, 27–30 REROLL, MODIFY, FACES and KEEP, 31–37 the fields of the modify screen and 38–40 +, − and OK. Build a button list reads the definitions; draw a button the rectangles and drawing records, whose labels are cut once from CHARGENB.
  • Comparative source: REF-SCUMM-017, initButtonsFromList and drawButton.
  • Used by:

File offsets 0x27560–0x275d9 — Starting armour records​

  • Layout: four lists at file offsets 0x27560, 0x27590, 0x275a0 and 0x275c0, reached through the far pointers of DS:0x0af2 (segments 0x2436–0x243c). Each starts with a count word, whose low byte is read, followed by 12-byte records of two (template item, value, inventory slot) word triples; an item of −1 ends a record early.
  • Role: One record is chosen at random for each new character by starting status and items: list 0 Plate Mail, Scale Mail with a Shield, or Chainmail with a Shield; list 1 a Robe; list 2 Scale Mail or Chainmail with a Shield; list 3 Leather armor with a Shield, in two records with different values.
  • Comparative source: REF-SCUMM-017, finish (itemList0–itemList3).
  • Used by:

File offset 0x275e0 — Camp menu buttons​

  • Layout: 10-byte records, reached through operand 0x290 of the overlay segment table: camp string of the label (byte), x (word), y, width, height (bytes), key number (word), flags (word: bit 0 draws a box, bit 1 lets the pointer highlight the button, bit 2 centres the label); 36 records read; the key of each definition, in order, is: R M P S none G E; L S D Q E; S B E; E, F1–F6; C E Space 1–6; Y N
  • Role: The buttons of the menu definitions, read by build and show a menu. For example records 32 and 33 are Yes (x 16, y 57, 32 × 14) and No (x 128) of the yes/no question. Record 31, a seventh spell-level tab, lies outside the range of the spell menu, which has six.
  • Comparative source: REF-SCUMM-014, GUI_EoB::initMenu (_menuButtonDefs).
  • Used by: Camp menus › The camp menu, Camp menu and spells › Menu tables

File offset 0x27820 — Protection answer words​

  • Layout: 50 zero-terminated lowercase words, one after the other, from 0x27820 to 0x2799c
  • Status: that these words are the answers of the protection check is inferred: the check reads records from segment 0x298, and the code that compares them was not traced further.
  • Role: A list of single words outside the data segment, inferred to be the expected answers to the protection question.
  • Used by: Texts

File offset 0x279a0 — Non-player character presets​

File offsets 0x281c0–0x281fd — Dream frames​

  • Layout: four tables reached through operands 0x2b0 to 0x2c8 of the overlay segment table: source columns (0, 20, 0, 20) at 0x281c0, source rows (0, 0, 96, 96) at 0x281d0 and waits in ticks (12, 7, 7, 12) at 0x281e0, one byte per frame; the frame order at 0x281f0, 1 2 3 2 1 0 1 2 3 3 2 1 0, ended by 0xff
  • Role: The animation of the dream sequence: each frame draws one 160 × 96 quarter of DREAM, then waits; the 13 frames last 116 ticks.
  • Used by:

File offset 0x28200 — Spell conversion table of a party transfer​

  • Layout: 64 bytes, analysis address 0x35000, reached through operand 0x2d0 of the overlay segment table (paragraph 0x2500)
  • Role: Maps a spell number of an Eye of the Beholder I party to a spell of this game, 0 for none. Entries 1–25 serve the known mage spells ( 0x4c216) and the value of mage scrolls; entries 26–49 the value of cleric scrolls plus 25 (convert an item). No index is checked.
  • Comparative source: REF-SCUMM-017, TransferPartyWiz::convertStats and convertItem (_convertTable).
  • Used by: Transfer: spells and items

File offset 0x28240 — Experience caps of a party transfer​

File offsets 0x2c927–0x2cad6 — Party transfer questions​

File offset 0x2cc60 — Initial spell-definition table​

File offset 0x2d370 — Horn sounds​