Address Description
61A7
JP (HL) trampoline
61A8
Initialize the object free list: chain B 24-byte records starting at DE (each record's first word points to the next)
61C1
Routine at 61C1
61E3
Routine at 61E3
6254
Set object position (IX+5/+6) from grid index A (cell centre: row*8+4, col*8+4)
6269
Set current room to A: locate its description record and build the room
62F9
Test whether the current room is this level's Plug Room (via the per-level table at $7287); returns Z if so, with HL pointing at the entry's state byte
630D
Routine at 630D
6329
Build the door/exit bitfield at $612B from the room description's byte1
6344
Draw single-piece doors, for $612B bits 0 and 3
6377
Draw three-piece doors, for $612B bits 1 and 2
63D0
Clear shadow screen
642F
Draw the fixed wall/decoration layout selected by $6129
6470
Routine at 6470
64BB
Routine at 64BB
64F3
Routine at 64F3
6503
Routine ?? Oil
6543
Routine at 6543
655E
Routine at 655E
6580
Routine at 6580
6593
Routine at 6593
65DB
Draw message window: room/creature title line + rotating clue/joke message line
6622
Use an oil can (kind $6E pickup, see 8AFB): resets rust timer, decrements oil-can count, plays sound
663B
Routine at 663B
6653
Prepare room with color 0
6657
Get room color from room description and store to 6175
6663
Spawn the room's creature (dynamic object)
6692
Routine at 6692
66CE
Routine at 66CE
6728
Routine at 6728
6743
Routine at 6743
676D
Draw current room
67F1
Attempt to move to an adjacent room (horizontal, via a door) in the direction given by ($8DC1)
6880
Routine at 6880
6895
HUD: draw the currently-held item's icon, and its ammo count if it's a weapon
68C1
Consume one shot of ammo; auto-drop the weapon when empty
69AC
Prepare the Room ??
6AAA
Routine at 6AAA
6AE7
Routine at 6AE7
6AF1
Routine at 6AF1
6AF8
Routine at 6AF8
6AFB
Routine at 6AFB
6AFC
Routine at 6AFC
6B05
Routine at 6B05
6B71
Routine at 6B71
7CEC
Print engine entry point
7CF9
Print char routine (default mode)
7D32
Print engine mode: set inverse video flag
7D3F
Print engine mode: dispatch control code $16
7D48
Print engine mode: set cursor row
7D57
Print engine mode: set cursor column
7D68
Print string routine
7DC7
Routine at 7DC7
7E4F
Flip sprite horizontally
7EA9
Routine at 7EA9
7EBE
Read input: normalize the active control method into the 5-bit mask at 6186
7F8E
Routine at 7F8E
7F9B
Routine at 7F9B
7FC0
Routine at 7FC0
7FCD
Routine at 7FCD
8011
Routine at 8011
809D
Routine at 809D
8107
Routine at 8107
8128
Draw sprite C with its mask at screen position DE (mask sprite number from the table at 6C06; A bit 7 = mirror flag)
8230
Routine at 8230
82A6
Routine at 82A6
82DB
Routine at 82DB
82F0
Routine at 82F0
8315
Routine at 8315
835E
Routine at 835E
8445
Routine at 8445
848E
Request sound effect A (queued at $61A2, gated by the $61A0/$61A1 flags)
84AE
Dynamic object allocator
84ED
Load a sprite's A5DC record into the "current sprite" scratch variables at 618D, ready for 8128 to draw it
8501
Print string at HL until terminator byte $5E or $2B
850E
Print an inline string embedded right after the caller's CALL instruction
8513
Routine at 8513
8523
Print a BCD number: B bytes from (HL), two digits per byte, leading zeros as spaces; DE = per-digit print routine (self-modifies 854C's JP)
854C
Print one digit (JP target self-modified by 8523)
854F
Print BCD byte A as two digits, high digit blanked to a space if zero
8596
Routine at 8596
85A1
Main menu screen: title, entry list A-D, controls menu; loops until a selection starts the game
86CC
Draw the end-game stats screen
885A
HUD: redraw the score display (last 4 BCD digits of 611B via 8523)
8879
Add a 5-digit BCD value at 8874 to the score (611B)
888E
Add a bonus (HL, 5-digit BCD) to the score, then redraw the score display
8894
Subtract a 5-digit BCD value at 8874 from the score (611B); if the score can't cover it, resets $611B-$611F from a fixed 5-byte block at $5C92 instead
88B9
Routine at 88B9
88D7
Routine at 88D7
88DD
Routine at 88DD
88E3
Search the buffer at $7C83 for byte A (CPIR, length from $7C88)
8968
PLAYER per-frame behaviour handler
8A87
Attempt to move to an adjacent room (vertical, via whirlpool/bubble)
8ABB
Apply the object's facing direction to its position (IX+5/+6), returning the OLD position in BC
8AD9
Take one walk step: apply the facing delta, then check for a room-edge/door transition and a collision, reverting the position if blocked
8AFB
Fire/pick-up button handler: attack with the held weapon, or pick up/drop an item
8C35
Routine at 8C35
8CDF
Routine at 8CDF
8D11
Alternate PLAYER behaviour handler (swapped into $8DB9 by 9564; see 8968 and 8DB6)
8D8D
Attack: fire the held weapon (reached from 8AFB when a weapon is held)
8E3F
Special grid-value spawn routine (value $68) -- rearing snake
8E6E
Routine at 8E6E
8EA7
Special grid-value spawn routine (values $66/$6A) -- bubble source ($6A full-strength, $66 weak; see 9602)
8EF2
Special grid-value spawn routine (value $67) -- plant/coral
8F1E
Special grid-value spawn routine (value $69) -- whirlpool
8F4C
Special grid-value spawn routine (value $6B) -- plug
8F82
Re-initialize the state blocks of the two fixed object records at $8DCF and $8DEF (22 bytes each from $5C92 to $8DD1/$8DF1 -- see 8DB6)
9021
Routine at 9021
9085
Routine at 9085
90A8
Routine at 90A8
91A6
Routine at 91A6
9208
Routine at 9208
9232
Routine at 9232
923E
Save continuation: set the object's handler (+3/+4) to the address just after the caller's CALL, then jump there (the object resumes at that point next frame)
925C
Routine at 925C
9341
Room-creature per-frame behaviour handler (installed by the creature spawn at 6663) -- dual purpose: item-delivery detector in Plug Rooms, settle/float physics + hit detection elsewhere
9401
Creature hit/defeat sequence, called from 9341 when the "just hit" flag (bit 2 of +0x0D) is set
9471
Behaviour handler of the fixed object record at $8E0F (object identity not yet known)
949E
Behaviour handler of the fixed object record at $8E27 (object identity not yet known)
94CA
Routine at 94CA
94EE
Per-frame behaviour handler for value-$67 objects -- plant/coral
94F4
Per-frame behaviour handler for value-$6B objects -- plug. WIN-CONDITION TRIGGER: polls every frame for full item delivery, then pops and increments the "Plugs Pulled" counter.
952D
Per-frame behaviour handler for value-$69 objects -- whirlpool
957C
Per-frame behaviour handler for value-$66/$6A objects -- bubble source
9602
Per-frame behaviour handler for the individual rising-bubble particle spawned by 957C
9684
Per-frame behaviour handler for value-$68 objects -- rearing snake
9745
Routine at 9745
97BA
Draw an object's sprite: convert record position (+5/+6) to screen coordinates and draw sprite (+8) with its mask via 8128
97FC
Change current room to A = new room number
9808
Per-frame main loop entry: saves SP to $60E9 (restored by 97FC on room change); restores the message-window title when the $618A timer expires
983C
Per-frame dynamic object dispatcher (walks the active object list from the head at 610E)
9900
Draw all queued objects: walk the record-pointer list at $60EC (count at $60EB), drawing each via 97BA
9923
Spawn the weapon projectile object (thrown from the player's position, facing $8DC1), handler 9963
9963
Weapon projectile per-frame handler: move (double step) and detect a hit on collision
99A1
Direction-indexed sprite-animation stepper: pick one of 4 per-direction tables via (IX+$0B), then run 99D5's stepper on it
99D1
NEG / not NEG
99D5
Sprite-animation stepper: read next entry from a per-object sprite-number table, advancing a phase counter
9A49
Routine at 9A49
9A60
Dynamic object finalizer (called at the end of every spawn routine's object setup)
9AAB
Search the (key,data) pair table at $74CE for key A; returns Z with HL pointing at the matched pair's data byte
9ABC
Terrain collision test for one screen point (B,C): convert to a grid cell and check its content
9AFD
Routine at 9AFD
9B5A
Collision/overlap scan: walk the active object list looking for another same-room object whose bounding box (+$10..+$13) overlaps IX's; DE = the object found
9BD4
Routine at 9BD4
9BF0
Collision test: check the object's 4 bounding-box corners against the room grid, then check for overlap with other objects
9C35
Routine at 9C35
FB90
Menu tune + key-wait driver
FBB4
Melody-index table reader/advancer, used by FBD7
FBC1
Melody-index to period lookup, used by FBD7
FBCF
Continuation of FBB4
FBD7
Play one note / check key selection
FC34
Tone generator loop (continued)
FC46
Plain delay loop (no sound)