Skip to main content

Input data

Data · Routines · Address index

Mouse, pointer and button state, the active button lists, floor buttons, the selected character and input recording. The data page explains how the entries are written.

DS:0x351c — Floor position table​

  • Layout: 4 × 4 bytes, indexed by direction and floor zone
  • Role: Turns a floor zone of the view (0 near left, 1 near right, 2 far left, 3 far right) into a position in a block (0 north-west, 1 north-east, 2 south-west, 3 south-east) for each direction: 0 1 2 3, 1 3 0 2, 3 2 1 0, 2 0 3 1. Used by the floor routine.
  • Used by: Blocks, directions and positions › Floor positions

DS:0x3b50 — Floor buttons​

  • Layout: 4 button records at DS:0x3b20, 0x3b5c, 0x3b98 and 0x3bd4 (entries 8–11 of the main button list); callbacks at DS:0x3b50, 0x3b8c, 0x3bc8 and 0x3c04, zone at +0x38
  • Role: The four floor zones of the view, each calling the floor routine with its zone number: (0, 102) and (89, 102), 88 wide and 18 high, for the near half; (0, 72) and (89, 72), 88 wide and 29 high, for the far half (screen coordinates; the view is 176 wide).
  • Used by: Blocks, directions and positions › Floor positions

DS:0x47bc — Front-block action pointer​

DS:0x6654, DS:0x6655 — Mouse and control state​

DS:0x9317 — Selected character​

DS:0xf0fe — Button trigger​

DS:0x352c — Keyboard moves between inventory slots​

  • Layout: 27 rows of 4 bytes, indexed by slot and by W, S, Z, A
  • Role: The slot reached from each inventory slot. Slots 0 to 26: 18 1 25 11, 21 23 21 0, 14 3 4 3, 15 2 5 2, 2 5 6 19, 3 16 7 4, 4 7 8 20, 5 17 9 6, 6 9 10 22, 7 18 11 8, 8 11 12 23, 9 0 13 10, 10 13 14 24, 11 25 15 12, 12 15 2 15, 13 14 3 14, 25 19 17 5, 16 20 18 7, 17 22 0 9, 24 4 20 16, 19 6 22 17, 1 24 1 26, 20 8 23 18, 22 10 24 1, 23 12 19 21, 0 26 16 13, 0 21 16 25.
  • Used by: Keyboard character and hand selection, The play screen › Keyboard commands

DS:0x6600 — Input recording mode​

  • Layout: byte; handle at 0x6601, event and time at 0x6603, 0x6605, position at 0x6607, 0x6609, end flag at 0x660b
  • Status: that it stays 0 is inferred: no instruction found writes it.
  • Role: 0 plays normally, 1 records the input to a file, 2 replays it.
  • Used by: Record and replay input

DS:0x6616 — Changed mouse buttons​

DS:0x6622, DS:0x663a — Click and pointer positions​

  • Layout: two pairs of words (x, y): 0x6622, 0x6624; 0x663a, 0x663c
  • Role: 0x6622 is the position stored with the last mouse event taken from the input queue (0x32eb7, 0x32ed3). 0x663a is the position at which the pointer was last drawn (0x339cc, 0x339dc).
  • Used by: Test a position against a rectangle

DS:0x6636, DS:0x664c — Pointer hot spot and shape​

  • Layout: two words (x, y) at DS:0x6636, DS:0x6638; far pointer at DS:0x664c
  • Role: Stored by set the pointer shape (0x337fc–0x3380f). The pointer drawing subtracts the hot spot from the pointer position (0x338d9, 0x338e3, 0x339cf, 0x339df, 0x33aff, 0x33b1f) and passes the shape to driver slot 18 (0x33aa0–0x33aac).
  • Used by: Mouse pointer

DS:0x5424, DS:0x5440 — Character-choice buttons​

DS:0xcb76 — Unused selection mode​

DS:0xe5a4 — Selected hand slot​

DS:0xee3a — Character panel state​

DS:0xeee0 — Active button list​

  • Layout: far pointer (offset 0xeee0, segment 0xeee2)

  • Role: List passed by the key reader to the button processing; rebuilt by the routines from 0x1dff7 onward, among them 0x1e02f, which links the entries of the far-pointer array DS:0x5038 (38 entries, no spell book open) or DS:0x50d0 (54 entries, a book open) in array order. In DS:0x5038, after the front-block action, come the six character boxes, then the floor zones, faces, hands, name strips, movement and throw buttons. Each entry is a 0x3c-byte record: next pointer at +0, identifier +4, two key codes +6 and +8, position and size from +0x1e, callback +0x30, argument +0x38. The records of the file image, in array order (keys are the key numbers, Shift adding 0x100; positions in screen pixels):

    DS:0x5038RecordsArea (x, y, w × h)KeysCallback, argument
    00x478cThe view, (24, 8, 128 × 96)—Run the front block's records, 1
    1–60x39f4, 0x3a30, 0x3a6c, 0x3aa8, 0x4f0c, 0x4f48Character boxes, 63 × 50 at x 184/256, y 2/54/106F1–F6Select a character, 0–5
    70x3ae4Camp button, (289, 177, 31 × 21)C, EscCamp menu, through the overlay 247 stub 0x2ad2:0x20
    8–110x3b20–0x3bd4Floor zones (0, 102, 88 × 18), (89, 102, 88 × 18), (0, 72, 88 × 29), (89, 72, 88 × 29)—Drop or pick up an item on the floor, 0–3
    12–170x3c10–0x3cc4, 0x4c3c, 0x4c78Faces, 33 × 33I for the firstInventory buttons (0x1bb6d), 0–5
    18–230x3d00–0x3db4, 0x4cb4, 0x4cf0Hands, 31 × 33—Inventory buttons (0x1befa), 0–5
    24–290x3df0–0x3ea4, 0x4d2c, 0x4d68Name strips, 63 × 8Shift+F1–F6Swap two characters, 0–5
    30–350x4570–0x469cArrows, 21 × 16: forward (24, 128), back (24, 144), left (3, 144), right (45, 144), turn left (3, 128), turn right (45, 128)keypad 8 or Shift+keypad 8; 2 or 5; 4 or Shift+4; 6 or Shift+6; 7; 9Movement buttons, 25
    36, 370x4714, 0x4750Throw zones (0, 8, 88 × 48) and (88, 8, 88 × 48)—Throw the held item, 0 and 1

    DS:0x50d0, used while a spell book is open, starts with the same entry 0, then the book's records — the six tabs (keys 1–6), the page arrows, the six spell lines, two off-screen entries for the keys ,, . and Space, and ABORT SPELL (Esc), all handled by the spell-book buttons — and ends with entries 1 to 37 of DS:0x5038.

    The character panel uses four more arrays of the same kind, chosen by the panel state: DS:0x51a8 (47 entries, inventory page) and DS:0x5264 (19 entries, character sheet) with no book open, DS:0x52b0 (60 entries) and DS:0x53a0 (33 entries) with a book open. The two arrays that combine the panel and the book have no record for the page arrows (0x4ffc) nor for ,, . and Space (0x4bc4, 0x4c00), which only DS:0x50d0 holds. The areas and keys of these records are listed in the interface.

  • Comparative source: REF-SCUMM-014, runLoop (_activeButtons).

  • Used by: How input works › The active button list, The play screen, Choosing a spell in the book