Skip to main content

Display data

Data · Routines · Address index

Pages and text windows, the tile layers, the drawing tables of the view, the compass, monster shapes and colours, and the display drivers. The data page explains how the entries are written.

DS:0x636f, DS:0x1cfc — Active text window​

  • Layout: 0x636f: word; 0x1cfc: 16-byte entries, at least 19: x and width in 8-pixel columns, y and height in pixels, text colour, background colour, cursor column and cursor line
  • Role: The number of the active text window, written only by select a text window, and the table it reads. Window 7, (1, 180, 34, 18), is the message area at the bottom of the screen, selected at the game start, after a level load, at the end of a rest and after a dialogue; the camp menus, the start menu, character creation and the introduction and ending use others. The held-item setter prints " taken." only while it is 7. Window 9, (1, 125, 38, 64), is the dialogue text window; its entry also gives the text colour 15 (+8) and the background (+10, replaced by the dialogue window setup). Words +12 and +14 hold the cursor column and line, written back after each print. Set a text window's bounds rewrites +0 to +6. Other windows of the file image: 5, (0, 0, 22, 120), the dungeon view, whose columns the object pass narrows to each block; 10, (0, 0, 22, 144), the camp menu area, view and strip below it; 11, (1, 20, 20, 56), the box of the camp messages and questions, which the slot menus move to their own position; 17, (1, 150, 38, 49), the text area below the picture of the introduction and the ending; 18, (1, 8, 38, 128), their 304 × 128 picture area. The camp sets the background of windows 10 and 11 from the interface colour DS:0xe606 before use.
  • Used by: The inventory › Moving and equipping items, Dialogue screen › Text window and pages, Dialogue screen › Edge cases and unknowns, Set a text window's bounds

DS:0x62a5 — Current page​

DS:0x62e7 — Page sizes​

DS:0x0b98 — Menu definitions​

DS:0x6367, DS:0x62a0, DS:0x6502 — Page waits​

  • Layout: 0x6367: far pointer; 0x62a0: byte; 0x6502: word
  • Role: 0x6367 is the routine the text output calls to wait between pages and for control byte 0x01. Its initial value is 0x21b0:0x6 (0x31b06, the default page wait: it prints <MORE> against the right edge of the window on the cursor line, in the window's background colour on its text colour, waits for any key or mouse press and erases it); the only writer is the dialogue window setup, which stores the dialogue wait prompt, and nothing resets it. 0x62a0 is the page-wait switch, tested by the page wait and the line output but not by control byte 0x01, so the default routine runs only for control byte 0x01 printed before the first dialogue; no original message contains that byte. 0x6502 counts the lines output since the last wait.
  • Used by: Dialogue screen › Text window and pages

DS:0x987e — Tile layers​

DS:0x23ec, DS:0x2352, DS:0x2330 — Object spots​

  • Layout: 0x23ec: 18 × 5 pairs of signed words; 0x2352: 4 × 4 bytes, described with the quarter table; 0x2330: 18 bytes
  • Role: 0x23ec gives, for each visible block and each of its five spots (far left, far right, near left, near right, centre), the offset added to (88, 124) for items, (88, 127) for monsters and (88, ·) for flying objects; its centre column also shifts some decorations. 0x2352 turns a position in a block into a spot for each facing. 0x2330 gives the depth class of each visible block: 0 three steps ahead to 3 for the party's row.
  • Comparative source: REF-SCUMM-016, _dscShapeCoords, _dscItemPosIndex, _dscDimMap.
  • Used by: Spots and wall decorations › The five spots of a block, Spots and wall decorations › Where objects are drawn

DS:0x0478, DS:0x0466, DS:0x0488, DS:0x048e, DS:0x230c — Item tables​

  • Layout: 0x478: 4 × 4 signed bytes; 0x466: 18 signed bytes; 0x488: 4 words; 0x48e: 8 words; 0x230c: 18 words
  • Role: Item scale steps by depth class and spot (−1: not drawn); the visible block whose bounds clip far items in a door block (−1: none); niche y by depth class (37, 49, 56, 0); the spread of items by item number (0, −2, 1, −1, 2, 0, 1, −1); niche x by visible block.
  • Comparative source: REF-SCUMM-016, _dscItemScaleIndex, _dscItemTileIndex, itemPosYNiche, itemPosFin, _dscItemShpX.
  • Used by: Spots and wall decorations › Where objects are drawn

DS:0x050b, DS:0x059b, DS:0x05bf, DS:0xd1cc, DS:0xdf50 — Decoration tables​

DS:0x04ae–DS:0x050a — Monster drawing tables​

  • Layout: 0x4ae: 3 bytes; 0x4b1 and 0x4d1: 32 signed bytes each; 0x4f1: 4 × 5 bytes; 0x505: 6 bytes
  • Role: Scale steps by depth class (2, 1, 0); the alternate and normal frame tables, indexed by animation step × 16 + party facing × 4 + monster facing (negative: mirrored); the drawing slot of each monster position for each facing; the vertical adjustments (20, 12, 4 at the centre; 4, 2, 0 elsewhere) used by monster types whose byte +0x1e is 1.
  • Comparative source: REF-SCUMM-016, drawMonsters, _monsterFrmOffsTable1, _monsterFrmOffsTable2, _drawObjPosIndex.
  • Used by: Monsters in the view › Drawing a monster, Spots and wall decorations › Where objects are drawn

DS:0x0667, DS:0x06af — Flying-object tables​

  • Layout: 0x667: 18 × 4 signed bytes; 0x6af: 4 × 5 bytes
  • Role: Scale steps of a flying object by visible block and spot (−1: not drawn); the drawing slot of each position for each facing, identical to the monster slots.
  • Comparative source: REF-SCUMM-016, _flightObjSclIndex.
  • Used by: Spots and wall decorations › Where objects are drawn

DS:0x045e, DS:0x0462, DS:0x05e3–DS:0x0666, DS:0x931e, DS:0x9366, DS:0xee34, DS:0xef06 — Door tables​

  • Layout: bytes, words and far pointers; see the role. The per-level tables are zero in the executable's data and filled from the level's INF door records by the door records loader.
  • Role: By depth class: door frame rows (0x45e: 30, 24, 16, 0; 0x462: 59, 71, 86, 120), door bottom (0x5e3: 59, 71, 86), top of a parting door (0x5e7: 31, 24, 15), raise per opening step (0x655: 8, 12, 18) and part per step (0x65d: 5, 8, 12). By wall reference 0–52: the first reference of its door group (0x5eb) and its door graphic, −1 for none (0x620). By door shape: the lift of a door being forced (0x661). Per level, by door graphic 0 or 1: its DoorKind (0x9366, words) and its "no switch" flag (0xee34, words); by door shape, door graphic × 3 + 0, 1 or 2 for one, two or three steps ahead: the door shapes (0xef06, six far pointers) and the switch records of 6 bytes (0x931e: far pointer, x byte, y byte), the third of each graphic left empty. The "second shape" of a kind is read 12 bytes, three shapes, after the first. The door shape loader fills the shapes and switches; the release routine frees and clears them before each level's records are read.
  • Comparative source: REF-SCUMM-016, drawDoorIntern (_dscDoorY1, _dscDoorY2, _dscDoorScaleOffs, _dscDoorShpIndex, _dscDoorScaleMult1, _dscDoorScaleMult3, _dscDoorType5Offs, _doorType, _doorSwitches, _noDoorSwitch), initLevelData and loadDoorShapes.
  • Used by: How a door graphic moves, Level data (INF)

DS:0x06d3–DS:0x0708, DS:0x6d7e, DS:0xcc40, DS:0xe54e — Teleporter and temporary-wall tables​

  • Layout: bytes and words; far-pointer shape tables
  • Role: Teleporter offsets by distance (0x6d3: 40, 28, 18; 0x6d6: 13, 21, 26); temporary-wall start x by visible block (0x6d9, 15 words used), rows (0x6fd: 2, 6, 9), shapes per row (0x700: 1, 2, 3), start y (0x703: 32, 24, 16) and first shape (0x706: 4, 2, 0) by depth class; the animation pulse (0x6d7e), flipped by the wall-animation timed update; the temporary-wall shapes (0xcc40) and sparkle shapes (0xe54e), six far pointers each, cut from DECORATE.CPS at the rectangles below.
  • Comparative source: REF-SCUMM-016, drawTeleporter, drawWallOfForce, _teleporterPulse.
  • Used by:

DS:0x0092, DS:0x01d6 — Clipping tables​

  • Layout: 0x92: 18 × 18 signed bytes; 0x1d6: 18 × 18 pairs of signed bytes
  • Role: For each pair (block whose objects are drawn, visible block whose front face is examined): the column limit set by a wall face (positive: right limit, negative: left limit, −40: none, −41: hidden), and the left and right limits set by a door face. Used by 0x3d77c. The entry of a block with itself in DS:0x92 is −40, except for blocks 0, 6, 7 and 11, whose rows are −41 everywhere but at index 16, which is −40.
  • Comparative source: REF-SCUMM-016, _dscDim1, _dscDim2.
  • Used by: Monsters in the view › Drawing a monster

DS:0x0711 — Object drawing order​

  • Layout: 18 bytes
  • Role: The order in which the object pass visits the visible blocks: 0, 6, 1, 5, 2, 4, 3, then 7, 11, 8, 10, 9, then 12, 14, 13, then 15, 17, 16 — far rows first, outer blocks before inner ones.
  • Used by: Faces and drawing order › Drawing order

DS:0x0723, DS:0x0729, DS:0x072f — Compass position​

  • Layout: 3 words x, 3 words y, 1 word
  • Role: Screen coordinates of the three compass parts, (114, 131), (79, 158) and (151, 158), and the direction last drawn by the compass routine.
  • Used by:

DS:0x0fb8, DS:0x0fbb — Compass part sizes​

  • Layout: 3 bytes of height, 3 bytes of source row
  • Role: Heights (17, 10, 10) and rows in DECORATE.CPS (120, 137, 147) of the three compass parts grabbed by 0x46c27; each part is three 8-pixel columns wide, and direction d starts at column 3 d.
  • Used by:

DS:0x92a8 — Compass shapes​

  • Layout: 12 far pointers, index 4 × part + direction
  • Role: The compass shapes grabbed by 0x46c27 and drawn by the compass routine. The main part of directions 0 to 3 shows N, E, S and W.
  • Used by:

DS:0x0709 — Shape drawing routines​

DS:0x636d — Text colour​

  • Layout: word
  • Role: Colour of printed text, temporarily replaced by the message colour.
  • Used by: —

DS:0x658e — Shape encoder​

DS:0x6522–DS:0x65f9 — Driver function table​

DS:0x628a — Display mode​

DS:0x63af — Display driver names​

DS:0x0fbe, DS:0x0fd6 — Sparkle and temporary-wall rectangles​

  • Layout: 0xfbe: 6 × 4 bytes; 0xfd6: 6 × 6 bytes, of which the first 4 are used
  • Role: Where the decoration shape loader cuts the six sparkle shapes (0xfbe) and the six temporary-wall shapes (0xfd6) in DECORATE.CPS, as column, row, width in columns and height: sparkles (12, 88, 2, 14), (12, 103, 1, 7), (12, 111, 1, 7), (12, 119, 1, 5), (12, 125, 1, 5), (12, 131, 1, 3); temporary walls (0, 0, 4, 8), (0, 8, 4, 8), (4, 0, 4, 8), (4, 8, 4, 8), (8, 0, 5, 16), (12, 0, 5, 16).
  • Used by: Spots and wall decorations › Where objects are drawn

DS:0x936c — Monster decoration table​

DS:0xa2d0 — Monster shapes​

DS:0x9318 — Monster colour variant tables​

DS:0x23a8, DS:0x23b8 — Flash and stone colour tables​

  • Layout: two 16-byte colour tables: 0x23a8 is 0 then fifteen 15s, 0x23b8 is 0 then fifteen 13s (file image)
  • Role: Installed through driver slot 11 by draw a monster shape: 0x23a8 for a monster with MONSTER_RUNTIME_REVEALED, 0x23b8 for one with MONSTER_RUNTIME_TURNED_TO_STONE. Every nonzero colour becomes 15 or 13; colour 0, transparent, is kept.
  • Used by: Monsters in the view › Drawing a monster

DS:0x125a — Monster image loaders​

DS:0x110a, DS:0x119a, DS:0x122a — Monster shape layouts​

DS:0xdedc — Records of the visible blocks​

DS:0x5d62–DS:0x5d95, DS:0x5d60 — Portrait layout​

  • Layout: byte tables; those by column are indexed by slot & 1, those by row by slot / 2
  • Role: Where the parts of the six portraits go. 0x5d62: colours of the hit-point bar, 3, 5, 8; 0x5d6f: those of the food bar, 3, 5, 8. Column and row positions: 0x5d65 8 80 and 0x5d67 2 54 106 for the frame of active spells; 0x5d6a 23 95 and 0x5d6c 46 98 150 for hit points; 0x5d72 8 80 and 0x5d74 11 63 115 for the face; 0x5d77 40 112 and 0x5d79 11 27 63 79 115 131 (row and hand) for the hands; 0x5d91 1 10, 0x5d93 23 32 and 0x5d95 2 54 106 for the copies to the screen. 0x5d7f–0x5d8e give three lines of the character sheet. The word 0x5d60 is 1 and nothing writes it: it lets a menu's highlight follow the pointer.
  • Used by: Character portrait and sheet, Menus

DS:0x55dc–DS:0x5692 — Spell animation tables​

  • Layout: 0x55dc, 8 bytes, and 0x55e4, 0x55e8, 4 bytes each; 0x55ec, 8 bytes; 0x55f4, 6 words; 0x5600, 6 bytes; 0x5606 and 0x5632, double words; 0x5672, 0x5682 and 0x5692, 16 bytes each
  • Role: 0x55dc–0x5600 drive the steps over the portraits: the shape of each of four spots by step, their offsets, and each slot's position. 0x5606–0x5692 drive the sixteen pieces over the view: a mask of 2 bits per piece (0x5632) picks the piece's shape in each step's double word (0x5606), shifted by 0x5672, and 0x5682, 0x5692 give its x and y.
  • Used by: Spell animations

DS:0x56a5–DS:0x56b4 — Spell book layout​

  • Layout: bytes: 0x56a5 and 0x56aa, offsets of the page arrows; 0x56b0, x of four shapes, 68, 98, 128, 144; 0x56b4, y of three rows, 130, 146, 152
  • Role: Used to draw the page arrows and the grid that covers the lines.
  • Used by: Draw the spell-book page

DS:0x56c9–DS:0x5709 — Explosion tables​

  • Layout: 0x56c9 and 0x56d7, 14 bytes each; 0x56fd, far pointers; 0x5709, words
  • Status: the exact meaning of the values is unknown; the images are not examined.
  • Role: Read by the explosion routine (0x22d41, 0x22d50, 0x22e49, 0x22f4f) to choose among its three parameter sets.
  • Used by: Explosion and vortex animations

DS:0xded4 — Lightning column shape​

DS:0xe566, DS:0xeef6 — VCN colour maps​

DS:0xcb72 — VCN block buffer​

DS:0x6389 — Button list rebuilt​

  • Layout: byte
  • Role: Process the button list keeps the address of the last list it was given (DS:0x6264, DS:0x6266) and skips its set-up of the list when it gets the same address again while this byte is 0 (0x2fa17–0x2fa30); after the set-up it clears the byte (0x2fac9). The party creation screens set it after building a list in the same records (0x3fd1a), and build and show a menu after building one (0x43d76), so that the rebuilt list is taken again.
  • Used by: Overlay 245 › Button lists

DS:0x58b6–DS:0x58d1, DS:0x58d2 — Cone of Cold block offsets​

  • Layout: four rows of seven signed bytes; four far pointers to the rows

  • Role: The blocks that Cone of Cold strikes, as offsets from the party's block in block-index units (32 per row), one row per direction taken through DS:0x58d2[direction] (0x2425f–0x2426b):

    DirectionOffsets
    North−32, −64, −63, −65, −96, −97, −95
    East1, 2, −30, 34, 3, −29, 35
    South32, 64, 63, 65, 96, 95, 97
    West−1, −2, 30, −34, −3, 29, −35

    That is one block ahead, two ahead, two ahead and one to each side, three ahead, three ahead and one to each side. Each offset is added to the party's block and the sum kept within 0–1023 (and 0x3ff, 0x2428c), so near an edge of the map the cone continues on the other side of the map or on the next row. No wall is tested.

  • Used by: Attack spells › Notation

DS:0xd1c4 — Start-up place of the first portrait​

  • Layout: far pointer
  • Role: The address that the start-up gives to the first character's portrait pointer (+0x35 of the character record), 62,788 bytes into the page 7 buffer (0x18bfd–0x18c0e). Written once; its only reader is the ending's preparation (0x4f2d8–0x4f2de), which moves the portrait that is still there before the ending loads a picture over page 7.
  • Used by: The ending

DS:0xcbc4 — Work buffer​

  • Layout: far pointer
  • Role: A shared work area. The start-up sets it to the sound data buffer plus 11,000 bytes (0x18c24–0x18c30), that is offset 0x2dbe of the segment of the embedded music driver, the program's first code segment. From there the area runs 5,120 bytes, up to the music driver's own variables at offset 0x41be; it overlaps the last 4,120 bytes of the 15,120 the sound loader may fill, which no level's sound file reaches (the largest, AZURE.ADL, has 10,423 bytes of data). Its users write at most 4,096 bytes: the save's packing of the wall map (4,096), 16 saved 16 × 16 rectangles (0x2144e–0x2148a, 256 bytes apart), the explosion and lightning animations (seven or eight lists of 300 bytes), a saved 32 × 120 rectangle (0x278b8–0x278cf), the pixel dissolve, the decoration rectangles of a .DCR file, the EGA block-colour table (2,000 bytes, 0x47fcb) and the shape reduction, whose first step from the largest monster picture (10 columns, 88 rows) gives about 1,700 bytes with the VGA driver, unless it is handed the null shape of ANOMALY-88. The ending replaces the pointer with a block of its own of 2,400 bytes (0x5046c–0x50472) before it loads FINALE2, whose 13,229 bytes of data would reach the area; the old pointer needs no release, since it points into the sound buffer rather than to an allocated block. Written only at those two places.
  • Used by: MGA.OVL › Scale a shape by one step, Display modes, MGA.OVL › Game call sites

DS:0xf090 — Current font​

DS:0x64ec, DS:0x64ee–DS:0x64ff — BIOS video modes​

  • Layout: word; nine words

  • Role: DS:0x64ec keeps the BIOS video mode found at start-up (0x316d7–0x316dc), 0 in the file image. DS:0x64ee gives the BIOS mode that each display mode 0–8 sets, as the value of AX for the BIOS call that sets a mode:

    Display mode012345678
    BIOS mode0x040x090x0d0x130x130x0e0x090x070x02

    The word after the table, DS:0x6500, is 0 and is never written; the mode setter reads it in place of a tenth entry (ANOMALY-121).

  • Used by: Display modes

DS:0xcd12 — Distance colour table​

  • Layout: far pointer to 256 bytes
  • Role: The colour table that darkens distant shapes, built by the level palette loader with colour 12 and weight 85 and left installed in the display driver. The far pointers DS:0xeee4, DS:0xeee8, DS:0xee30 and DS:0xcc26 hold the four other tables built at the same time; the portrait drawing (0x29661–0x29733) and an item picture drawing (0x1ea4b–0x1ea9d) install one of them, draw with level 1, then reinstall DS:0xcd12 with level 0.
  • Used by: Clipping, scaling and darkening › Darkening with distance