Z80 Engine Disassembly Trace (0x8DD3 – Move Willy & 0x91B6 – Arrow Bug)
PC: 0x8DD3
8DD3
3A CF 85
LD A, (85CFh)
; Check AIRBORNE state (0=Ground, 1=Jumping, 2..12=Falling)
8DF7
3A D1 85 D6 08
LD A,(85D1h) : SUB 8
; Load JUMP_COUNTER (0..17) and subtract 8 (-8..+9)
8DFC
CB 2F
SRA A
; Arithmetic shift right: dy = (JUMP_COUNTER - 8) >> 1
8EBC
3A D0 85
LD A, (85D0h)
; Bits 0-1: Sub-cell frame (0..3 = 2px step), Bit 7: Direction
8F8C
3A DA 80
LD A, (RAMP_DIR)
; Adjust WILLY_Y by ±2px per frame when walking on 45° ramp
91B6
DD 7E 01
LD A, (IX+01h)
; Attic Arrow Y-coord: if out of screen range, corrupts Room RAM!
Z80 Game Variables (0x85CF – 0x85D6)
Tick #0 (14 Hz)
AIRBORNE0x85CF
0x00 (0)
0 = Grounded on platform
DIR / FRAME0x85D0
0x00
Facing RIGHT · Frame 0 (+0px)
JUMP_COUNTER0x85D1
0x00 (0/18)
dy = ((0 - 8) >> 1) = 0 px
WILLY_Y (2×Px)0x85D2
0xD0 (Y=104px)
Cell Aligned (2×2 cells)
WILLY_X (Col)0x85D3
0x19 (Col 25)
Pixel X = 200 px
CURRENT_ROOM0x8420
0x21 (Rm 33)
Page 0xE100–0xE1FF
18-TICK Z80 JUMP PARABOLA:
dy = (JUMP_COUNTER - 8) >> 1
Idle (Grounded)
Live 256-Byte Room Page (0xE100 – 0xE1FF)
RAM Integrity: OK
00–7F: 2-Bit Tile Map (128B)
80–9F: ASCII Room Name (32B)
A0–D5: 6×9B Tile Graphics (54B)
D6–DC: Conveyor & Ramp (7B)
EA–ED: Exits L/R/U/D (4B)
F0–FF: Guardians (16B)