Address Length Description
5C78 1
Interrupt counter. Incremented by the interrupt handler.
5D43 1
Game status buffer entry at 5D43
5EEE 1
Terrain fragment render counter (0-7). Tracks which of the 8 terrain fragments to render next. Incremented after each fragment, wraps at 8.
5EEF 1
Frame tick (0-255). Incremented each game frame for animation timing. Bit 0 alternates every frame, bits 0-1 cycle every 4 frames, etc.
5EF0 1
Current bridge number (0-47).
5EF1 1
Raw input port value from last keyboard/joystick read. Format depends on input interface type.
5EF2 1
Road tank center flag ($00 = inactive, $01 = road tank is at center X=$80).
5EF3 1
Player missile Y coordinate in pixels (0-255). $00 when no missile active.
5EF4 1
Player missile X coordinate in pixels (0-255).
5EF5 1
Collision detection mode for current render pass. Determines which collision handler to invoke on pixel overlap.
5EF6 1
Y coordinate where collision was detected, in pixels.
5EF7 2
Pointer to current plane sprite data. Points into all_ff sprite bank, offset by speed for animation frame selection.
5EF9 1
Island rendering line counter. Tracks current scanline during island terrain rendering (0-23).
5EFA 1
Island terrain profile index (0-7). Selects which of 8 island shapes from data_terrain_profiles to render.
5EFB 1
Island definition byte 2. Second byte from island data at data_islands, controls island width/shape.
5EFC 1
Island definition byte 3. Third byte from island data at data_islands, controls island rendering parameters.
5EFD 1
Island starting line index. Screen line (0-23) where island rendering begins. Initialized to $10 (16).
5F00 46
Viewport slots array (15 slots for active game objects).
Each slot is a 3-byte entry that can hold one game object (enemy, fuel depot, etc.). Iterated by operate_viewport_slots (operate) and check_missile_vs_objects (collision). New objects added via add_object_to_set. See Glossary for terminology.
Byte Contents
0 X position (0-255 pixels), or slot marker
1 Y position (0-255 pixels, increases as object scrolls down)
2 Object definition byte (type, orientation, activation)
Marker Value Meaning
SET_MARKER_EMPTY_SLOT $00 Unused slot (skip during iteration)
SET_MARKER_END_OF_SET $FF End of active slots (reset iterator)
5F2E 49
Explosion animation fragments array.
Array of up to 16 explosion fragments. Each entry is 3 bytes. Animated by render_explosions. New explosions added via add_object_to_set.
Byte Contents
0 X position (0-255 pixels)
1 Y offset (relative position, adjusted during scroll)
2 Frame counter: bits 0-6 = frame (1-6), bit 7 = erase flag
Explosion frames: 1,5=sprite_explosion_f1 (small), 2,4=sprite_explosion_f2 (medium), 3=sprite_explosion_f3 (large), 6=sprite_erasure (erase).
5F5F 1
Object activation interval bitmask
Controls when newly spawned objects become active (start moving/shooting). Objects spawn inactive (bit 7 clear in slot definition) and activate when (interrupt_counter AND mask) == 0. Checked in operate_viewport_slots.
Value Meaning When Set
$1F Every 32 frames Normal gameplay
$0F Every 16 frames After bridge destruction
5F60 2
Current slot pointer. Iterator for traversing viewport_slots during object processing.
5F62 2
Pointer to a slot from exploding_fragments
5F64 1
Current scroll speed in pixels per frame.
Speed Value Terrain scroll
SLOW $01 1 pixel/frame
NORMAL $02 2 pixels/frame
FAST $04 4 pixels/frame
Also determines sprite animation frame and number of terrain fragments rendered per frame. Horizontal movement is fixed at 2 pixels per input regardless of scroll speed.
5F65 1
Low fuel warning sound period (0-127). Used as delay loop iteration count for speaker ON/OFF phases. Lower values = higher pitch. Decremented each frame, creating a rising-then-resetting warble effect.
5F66 1
Fuel level (0-255). $FF=full tank, $00=empty.
Mechanic Rate Formula
Consumption 1 unit every 2 frames ~25 units/sec at 50fps
Refueling 4 units per frame ~200 units/sec at 50fps
Full tank duration ~10 seconds 255 / 25 = 10.2 sec
Full refuel time ~1.3 seconds 255 / 200 = 1.3 sec
Consumption rate does NOT depend on scroll speed. Low fuel warning triggers when <$40 (top 2 bits clear). Refueling only occurs when plane is centered over depot (not banking left/right).
5F67 1
Input interface type ($00=Keyboard, $01=Sinclair, $02=Kempston, $03=Cursor).
5F68 1
Current gameplay mode
Controls what actions are allowed and how rendering/collision works.
Mode Value Description
NORMAL $00 Full player control, collision active
SCROLL_IN $01 Terrain preview at game start, no input
OVERVIEW $02 Attract mode demo
REFUEL $06 Over fuel depot, adding fuel
During SCROLL_IN and OVERVIEW, player input is ignored and no collision occurs. During REFUEL, fuel is added each frame and collisions use plane position instead of missile position.
5F69 1
Plane sprite bank offset. $00=centered, $04=banked left/right. Reset to $00 at the start of each frame, then set to $04 by restore_plane_state_after_render after the banked sprite is rendered. Read by add_fuel, but always $00 at that call site — the check is dead code.
5F6A 1
Player 1's current bridge number (0-47). Saved when switching players in 2-player mode.
5F6B 1
Player 2's current bridge number (0-47). Saved when switching players in 2-player mode.
5F6C 1
Bridge section indicator. $00=normal terrain, $02=bridge terrain section. Set when plane enters bridge area.
5F6D 1
Bridge destruction flag ($00 = intact, $01 = destroyed).
5F6E 1
Y-position of destroyed bridge in pixels. Updated during scroll to track bridge debris position on screen.
5F6F 1
Unused.
5F70 2
Vertical scroll offset (16-bit, little-endian). Accumulated distance traveled in pixels. Used to calculate level slot index and bridge position.
5F72 1
Player plane X coordinate in pixels (0-255). $78 (120) is horizontal center. Changes by 2 pixels per left/right input.
5F73 2
Pointer to helicopter missile coordinates in viewport_slots array. Updated when advanced helicopter fires.
5F75 1
Helicopter missile state. Bit 7 set when missile active. Lower bits track missile animation/position.
5F76 1
Current level terrain array index (1-255). Points to current element in level definition at level_terrains. Incremented as terrain scrolls.
5F78 2
Cached terrain element data (2 bytes). Stores bytes 2-3 of current level element for object spawning.
5F7A 1
Terrain extras byte. Additional terrain rendering flags from level data.
5F7B 2
Current screen memory pointer. Points to pixel address being rendered during terrain drawing.
5F7D 1
Terrain sub-position (0-3). Index within current terrain element. Incremented every 4 scroll units, triggers new terrain load at 0.
5F7E 2
Pointer to the text to be displayed in the scroller.
5F81 1
Overview mode frame counter. Counts scroll iterations during attract mode. Game starts after 5 increments or key press.
5F83 2
Saved stack pointer. Captured at init, restored when starting new life to unwind any nested calls.
5F85 2
Saved HL register during collision detection. Preserved across collision handler calls.
5F87 2
Saved DE register during collision detection. Preserved across collision handler calls.
5F89 2
Saved BC register during collision detection. Preserved across collision handler calls.
5F8B 2
Collision coordinates (Y in high byte, X in low byte). Set by collision detection when overlap found.
5F8D 2
Saved object coordinates during rendering. Backup of object position for multi-pass rendering.
5F8F 2
Backup of plane missile coordinates. Saved before movement, used for collision detection and erasure.
673C 1
Missile animation pass selector. $01=first pass (erase at old position), $00=second pass (draw at new position). Two-pass rendering prevents flicker.
6BB0 1
Control state bitmask. Bit 0=FIRE, 1=SPEED_DECREASED, 2=SPEED_ALTERED, 3=LOW_FUEL, 4=BONUS_LIFE, 5=EXPLODING.
6C30 1
Bonus life sound progress counter (0-64). Incremented each interrupt during jingle. Sound completes when reaching $40 (64).
6C7A 1
Explosion sound tick counter. Counts down from $18 (24) to 0. Value also controls pitch - higher values = lower frequency.
7383 1
Tank shell state flags and speed
Controls tank shell behavior during flight and explosion.
Bit(s) Meaning
0-2 Speed (1-4): horizontal pixels per frame
5 TANK_SHELL_BIT_EXPLODING: explosion animation active
6 Orientation (same as SLOT_BIT_ORIENTATION)
7 TANK_SHELL_BIT_FLYING: shell in flight
Speed is pseudo-random (1-4), set when shell is fired at tank_fire_shell_entry.
7384 1
Tank shell trajectory step (0-7)
Current step in the shell's parabolic arc. Incremented each frame while flying. At step 8, shell explodes via render_tank_shell_explosion.
Higher steps produce lower-pitched whistle sounds (BEEPER with HL = step × 256).
7385 2
Tank shell position (BC format: C=X, B=Y)
Current screen position of the flying shell. Updated each frame based on speed and orientation. Cleared to $0000 when shell is removed.
8B08 2
Pointer to collision handler routine at collision_dispatcher. Called when sprite rendering detects pixel overlap.
8B0A 2
Previous object coordinates (Y high, X low). Position before movement, used for sprite erasure.
8B0C 2
Current object coordinates (Y high, X low). Position after movement, used for sprite drawing.
8B0E 2
Pointer to current sprite frame data. Set before calling render routines.
8B10 2
Pointer to sprite data for erasure. Points to previous frame or erase pattern.
8B12 2
Screen memory address for drawing new sprite position. Calculated from object_coordinates.
8B14 2
Screen memory address for erasing old sprite position. Calculated from previous_object_coordinates.
8B16 2
Output sprite pointer after rendering. Advanced by frame size during render loop.
8B1A 1
Sprite width in tiles (1-3). Used by render loop to process correct number of bytes per row.
923B 1
Player 1 lives remaining (0-3). Initialized to LIVES_INITIAL (4) at new game, then immediately decremented to 3 at the end of the first scroll-in (play). Decremented again at the end of each subsequent scroll-in after a death. Game over is triggered when 0 at the time of the player's next death.
923C 1
Player 2 lives remaining (0-3). Initialized to LIVES_INITIAL (4) at new game, then immediately decremented to 3 at the end of the first scroll-in (play). Decremented again at the end of each subsequent scroll-in after a death. Game over is triggered when 0 at the time of the player's next death.
9283 2
Pointer to state_controls at state_controls. Allows indirect access to control state bitmask.
9285 2
Saved BC register during attribute setting. Preserved across attribute routine calls.
9287 2
Saved DE register during attribute setting. Preserved across attribute routine calls.
9289 2
Saved HL register during attribute setting. Preserved across attribute routine calls.
928B 2
Sprite width in tiles for attribute routine. Determines how many attribute cells to update.