Address Length Description
5BFE 1
Stack
Top of the stack (so, pushes below this point).
5FA1 1
Screen Initialised Flag
Tracks whether the current screen has been fully initialised. Set to 01 after the HUD header is drawn, and cleared to 00 when a fresh screen setup is needed.
5FA2 1
Input State
Bitmask representing the current directional input. 1F means no input. Each bit represents a direction when reset:
Bit State
0 Fire
1 Up
2 Down
3 Right
4 Left
5FA4 1
Previous Input State
Stores the last directional input for animation and speed purposes.
5FA5 1
Percy Facing Direction
00=facing right, 01=facing left.
5FA6 1
Input Mode
Controls which input device is active:
Byte State
00 Not yet detected
1F Kempston joystick
80 Keyboard
5FA7 1
Falling State
Tracks whether Percy is falling:
Byte State
00 Not falling
FE Falling (active)
FF Falling (impact)
5FA8 1
Collision Flag
Set to 01 when Percy has collided with scenery and the move was rejected.
5FA9 1
Flag: Egg State
Set to FF when Percy is dropping an egg, and cleared to 00 when the egg routine is complete.
5FAA 1
Flag: Carrying A Worm
Set to FF when Percy is carrying a worm, and cleared to 00 when he's not.
5FAB 1
Energy Bar Delay Counter
A delay so Percy's energy bar doesn't deplete too quickly while he's flying.
5FAC 1
Flag: Worm Drop
Set to FF when a worm has been dropped. Cleared to 00 when there's no worm being processed.
5FAD 1
Flag: Landed On Platform Flag
Set to FF when Percy has landed on a platform. Cleared to 00 when no platform is beneath him.
5FAE 1
Movement Speed
Percy's current movement speed in pixels per frame. Ranges from 01 (minimum) to 04 (maximum). Accelerates while a direction is held, decelerates when input changes or is released.
5FAF 1
Percy Flap Counter
Animation frame counter for Percy's wing flap cycle. Increments each frame Percy moves horizontally, cycling from 01 to 04.
5FB0 1
Percy Animation Counter
Controls the animation frame cycle. Counts up from 01 to 04 (first half), then bit 7 is set and it counts back down (second half). Bits 0-2 hold the frame index, bit 7 indicates the second half.
5FB1 1
Current Level
The current level number. E.g. 01 for the first level.
5FB2 1
Worms Remaining
Number of worms Percy has remaining to collect for the current level.
5FB3 1
Lives Display Character
The ASCII character displayed on screen to represent the current lives count.
5FB4 1
Chick Animation States
A rotating bit pattern used to animate the nest chicks. Each bit controls the animation frame for one chick, rotated each frame so they animate independently.
5FB5 2
Room Object Data Pointer
Pointer to the current room's object data, calculated from the room number and the base at Room_Object_Data. Used to track the state of collectible worms and other interactive elements in the current room.
5FB7 2
Beep Pitch
Current pitch value used for sound effects (item collection, falling). Adjusted each frame during the sound.
5FB9 2
Room Drawing Position
The two-byte drawing position used by Draw_Room_Tile to track where the next tile should be placed.
The low byte is the column and the high byte is the row.
5FBB 1
Respawn Flag
Set to FF when entering a new room. Checked by hazard handlers to reset their positions and state when the room is repopulated.
5FBC 1
Pause Flag
00=not paused, FF=paused; set at Game_Initialise.
5FBD 1
Border Colour
5FBE 3
Lives Backup
Copy of LivesDisplayCharacter. Set when lives are initialised, cleared at end of each frame. When non-zero the main game handlers run; when zero the full sprite draw runs.
5FC1 2
Active Tile Set Pointer
Holds the pointer to the currently active tile set.
5FC3 2
Room Data Pointer
Points to the tile data for the current room.
5FC5 1
Current Room
The ID of the current Room (00-0B).
6825 7
Current Score
682C 6
Score Buffer
Workspace for scoring calculations.
689F 25
Table: Snapdragon Definition
6961 5
Table: Worm Collection Count
6CB2 1
Red Bird Direction Change Timer
Counts down each frame. When it reaches zero, the red bird picks a new random flight direction.
6CB3 1
Red Bird Traversal Direction
Controls which direction the red bird traverses across rooms. 00=moving left (entering from the right), 01=moving right (entering from the left). Toggled when the red bird wraps past the room boundary.
6CB4 1
Red Bird Stun Timer
When non-zero, the red bird is stunned. Counts down each frame until it reaches 01 then the stun ends and a short reappearance delay begins.
6CB5 1
Red Bird Stun Timer Copy
Copy of the initial stun timer value, stored when the red bird is first stunned.
6CB6 1
Red Bird Current Room
The room number the red bird is currently in.
6CB7 1
Red Bird Animation Seed
Seeded from the Memory Refresh Register when the red bird is initialised for each room.
6CB8 1
Red Bird Movement Direction
The red bird's current movement direction within a room (00-07), indexing into the direction jump table at Direction_Jump_Table. Changes randomly each time the direction change timer at RedBirdDirectionChangeTimer expires.
6CB9 1
Red Bird Flight Speed
The red bird's current flight speed, looked up from the per-level speed table at RedBirdSpeedTable based on the current level number.
6CBA 1
Red Bird Path Counter
Counts down to trigger a new flight path setup via HandleRedBird_SetupFlight.
6CBB 2
Pointer: Red Bird Flightpath Data
Pointer to the current room's flight path boundary data at Table_RedBirdFlightPath_01. Each boundary entry is 04 bytes: Y-min, Y-max, X-min, X-max.
6CBD 1
Red Bird Appearance Delay
Counts down each frame while the red bird is waiting to enter the current room. When it reaches zero, the red bird appears.
6CBE 5
Red Bird Speed Table
Flight speed for each level. Indexed by zero-based level number.
6CC3 1
Lives Display Previous
6CC4 1
Red Bird Wing Animation Counter
Cycles through 00-07 to animate the red bird's wings. Divided by 02 and added to the frame base of 18 to select the sprite frame.
6CC5 1
Butterfly Movement Boundary
Boundary data for the butterfly's movement, used by the direction jump table at Direction_Jump_Table.
6CC6 22
Butterfly Room Table
Table of room/level pairs where butterflies appear. Each entry is two bytes: the room number followed by the level number. Bit 7 of the level byte is set when the butterfly has been collected. The table is terminated by FF.
6CDC 1
Butterfly Wing Flap Toggle
Toggled each frame to alternate the butterfly's wing animation between two frames.
6CDD 1
Butterfly Movement Delay
Countdown timer for the butterfly's current movement direction. When it reaches zero, a new random direction and delay are generated.
6CDE 1
Butterfly Direction
Current movement direction for the butterfly, in the range 00-07.
71E9 3
Frog 1 State Data
71EC 3
Frog 2 State Data
71EF 25
Table: Frog Jump Height
Jump height lookup table. Each entry is the Y offset from ground level for one step of the frog's jump arc. The values rise to a peak of 22 at the midpoint then fall back to 00 forming a smooth parabolic arc over 18 steps.
7208 7
Car State Data
Crash animation timer. When non-zero, the car cycles through crash frames. Counts down to 01 then clears.
7507 1
Helicopter Movement Boundary
Single byte used as movement boundary data; read at Move_Helicopter.
7508 10
Helicopter State Data
State variables for the helicopter hazard. Two five-byte state blocks: Helicopter_State_Data_1 (first) and Helicopter_State_Data_2 (second).
Referenced by room handlers at Handler_Room01 and Handler_Room06.
7588 3
Cat Direction Data
Animation counter, direction flag and step size for the cat.
7597 3
Dog Direction Data
Animation counter, direction flag and step size for the dog.
7679 7
UFO State Data
State variables for the UFO hazard.
77AE 1
Bomb Explosion Counter
Countdown for the bomb explosion animation. When non-zero, the explosion frames are displayed on Percy.
77AF 4
Plane State Data
State variables for the plane hazard.
77B3 1
Plane Speed
The horizontal speed of the plane in pixels per frame.
7891 1
Balloon Direction Flag
Direction flag for the balloon. 00 = floating right, non-zero = floating left.
7892 1
Balloon Pop Counter
Counter for the balloon popping and respawn sequence. Values 01 to 03 show deflating frames, 04 to C7 are the respawn delay, and C8 triggers the respawn.
7924 4
Paratrooper Data
Animation counter, direction flag and boundary data for the walking paratrooper.
7928 8
Table: Paratrooper Walking Speed
Walking speed for the paratrooper, indexed by room number minus one. Only rooms 05, 06 and 08 have active paratrooper entries.
79D1 1
Spider Direction Flag
Direction flag for the spider. 00 = ascending, FF = descending.
7AC3 4
Parachute State Data
State variables for the parachute hazard.
7AC7 1
Random Seed
7AC8 32
Cat State Data
State variables for the cat hazard. Only rooms 02, 03, 05, 06, 07 and 08 have active entries.
7AE8 28
Dog State Data
State variables for the dog hazard. Only rooms 03 and 07 have active entries.
7B04 9
Table: Parachute Starting X Positions
Lookup table of starting X positions for the parachute, indexed by room number minus one. Only rooms 02, 08 and 09 have active paratrooper entries.
7B0D 32
Paratrooper State Data
State variables for the walking paratrooper hazard. Only rooms 05, 06 and 08 have active entries.
7B2E 22
Jump Table: Room Handlers
BE00 147
Table: Red Bird Flight Path Data
C000 6848
Room Buffer
DAC0 4
Percy States
DAC4 4
3-Wide Sprite 1 Data States
Used by the Red Bird.
DAC8 4
3-Wide Sprite 2 Data States
Used by Frog 1, Car Type 1.
DACC 4
3-Wide Sprite 3 Data States
Used by Frog 2.
DAD0 4
3-Wide Sprite 4 Data States
Used by Car Type 3, Cat.
DAD4 4
3-Wide Sprite 5 Data States
Used by Car Type 2, Dog, Plane.
DAD8 4
3-Wide Sprite 6 Data States
DADC 4
3-Wide Sprite 7 Data States
Used by Cat, UFO, Plane.
DAE0 4
Egg Sprite Data
DAE4 4
Butterfly Sprite Data
Sprite data for the butterfly collectible.
DAE8 4
2-Wide Sprite 1 Data States
DAEC 4
2-Wide Sprite 2 Data States
DAF0 4
2-Wide Sprite 3 Data States
DAF4 4
2-Wide Sprite 4 Data States
DAF8 4
2-Wide Sprite 5 Data States
DAFC 4
2-Wide Sprite 6 Data States
DB00 4
Backup: Percy
Backup of Percy_X_Position. First byte is Percy's X from previous frame (used for wing flap animation); written each frame by Draw_Sprites.
DB04 4
Backup: 3-Wide Sprite 1
Backup of Sprite01_3Wide_X_Position; written each frame by Draw_Sprites.
DB08 4
Backup: 3-Wide Sprite 2
Backup of Sprite02_3Wide_X_Position; written each frame by Draw_Sprites.
DB0C 4
Backup: 3-Wide Sprite 3
Backup of Sprite03_3Wide_X_Position; written each frame by Draw_Sprites.
DB10 4
Backup: 3-Wide Sprite 4
Backup of Sprite04_3Wide_X_Position; written each frame by Draw_Sprites.
DB14 4
Backup: 3-Wide Sprite 5
Backup of Sprite05_3Wide_X_Position; written each frame by Draw_Sprites.
DB18 4
Backup: 3-Wide Sprite 6
Backup of Sprite06_3Wide_X_Position; written each frame by Draw_Sprites.
DB1C 4
Backup: 3-Wide Sprite 7
Backup of Sprite07_3Wide_X_Position; written each frame by Draw_Sprites.
DB20 4
Backup: Egg
Backup of Egg_X_Position; written each frame by Draw_Sprites.
DB28 4
Backup: 2-Wide Sprite 1
Backup of Sprite01_2Wide_X_Position; written each frame by Draw_Sprites.
DB2C 4
Backup: 2-Wide Sprite 2
Backup of Sprite02_2Wide_X_Position; written each frame by Draw_Sprites.
DB30 4
Backup: 2-Wide Sprite 3
Backup of Sprite03_2Wide_X_Position; written each frame by Draw_Sprites.
DB34 4
Backup: 2-Wide Sprite 4
Backup of Sprite04_2Wide_X_Position; written each frame by Draw_Sprites.
DB38 4
Backup: 2-Wide Sprite 5
Backup of Sprite05_2Wide_X_Position; written each frame by Draw_Sprites.
DB3C 4
Backup: 2-Wide Sprite 6
Backup of Sprite06_2Wide_X_Position; written each frame by Draw_Sprites.
DE9E 354
Room Object Data
Buffer holding the state of interactive objects (worms, nest slots) for all rooms. Each byte can be:
Value Meaning
00 Empty / available
1E Worm collected by Percy
1F Worm delivered to nest
The buffer is 0160 bytes long, pointed to per-room by Room_Object_Data_Pointer.
E000 6144
Sprite Buffer
F800 705
Overlay Buffer
FCA6 690
High Score