Block event and record routines
Routines · Data · Address index
The step trigger, the script timers and the runner of level records. The routines page explains how the entries are written.
0x1b0c4 — Step trigger
- Role: Dispatches
BLOCK_EVENT_STEP_COUNTto block 0 and resets the step counter. SeeBlockEventMask. - Used by: Block events › Who sends each event, Level data (INF) › What it becomes in memory, Events that start scripts, Timed scripts › Step-triggered script, Script virtual machine › How a run starts
0x24ecb — Script timers
- Range:
0x24ecb–0x24f35 - Role: Compares each script timer deadline with the
shared counter, dispatches block event
0x80to the timer's block and schedules the next deadline. The test is an unsigned 32-bit "deadline below counter" (0x24ee9–0x24ef5); the next deadline is the counter plus the sign-extended 16-bit period (0x24f09–0x24f1d), so a period whose high bit is set is negative. - Used by: Block events › Who sends each event, Timed scripts › Timed block scripts, Script virtual machine › How a run starts, Level 4: reference tables › How often the timer fires, Level data (INF), Level 2: reference tables, Level 12: reference tables › Pits, Level 6: reference tables › The moving pit, Level 7: reference tables › The lightning floor, Level 8: reference tables › The singing mouth, Level 9: reference tables › Level data, Level 10: reference tables › Level data, Level 11: reference tables › The moving pit, Level 14: reference tables › Falling floors
0x25941 — Record runner
- Range:
0x25941–0x259e0 - Role: Dispatches record types 1–10 to handler cells 0–9 of the
handler cell table, gated by the
record gate mask. It copies the ten handler cells to
its stack (
0x25949–0x25959) and rejects wall special types that are zero (0x25978) or negative (0x259ac–0x259ad), but has no upper bound: the callcall far ss:[bp − 0x30 + 4 × type]at0x259c7takes, for a type of 11 to 127, a far pointer made of the routine's own stack words and those of its caller, which is not a handler (ANOMALY-136). - Used by: Interacting with walls › Decorations and interactions, Events that start scripts › Activating walls, Wall interaction types, Wall mapping flags › Bit 6, Values passed on to other routines › The routines, Level data (INF), Level 3: reference tables, Level 6: reference tables, Anomalies and bugs, Level 9: reference tables › Level data, Level 10: reference tables › Level data
0x259e1 — Run the front block's records
- Role: Runs the record runner for the block in front of the
party with gate
0x40. It is reached through the far pointer DS:0x47bc. - Used by: Block events › Wall activation and the 0xffff mask, Block events › Who sends each event, Events that start scripts › Activating walls, Wall mapping flags › Bit 6, The play screen › Click areas