Address Length Description
5B3F 2
Pointer: Game Entry Point
5BCC 1
Active Room: Key Colour
5BCD 1
Active Room: Closed Door Colour
5BCF 1
Active Room: Room Scaffolding Colour
5BD0 1
Active Border Colour
5BD1 1
Active Room: Paper Colour
See DrawRoom.
5BD2 1
Active Room: Ladder Colour
5BD3 1
Current Room: Room ID
5BD4 1
Temporary: Current Room ID
5BD6 2
Reference: Doors
Populated by PopulateRoomData. See DrawRoom and Handler_Doors for usage.
5BD8 2
Reference: Ladders
5BDA 2
Reference: Keys And Locked Doors
5BDC 2
Reference: Port Hole Reference
Populated by PopulateRoomData. See Handler_PortHole for usage.
5BDE 2
Reference: Pirate
Populated by PopulateRoomData. See Handler_Pirates for usage.
5BE0 2
Reference: Items
Populated by PopulateRoomData. See DrawRoom and Handler_Items for usage.
5BE2 2
Reference: Furniture
Populated by PopulateRoomData. See DrawRoom for usage.
5BE4 2
Reference: Lifts
Populated by PopulateRoomData. See Handler_LiftMasks and Handler_Lifts for usage.
5BE6 2
Reference: Disappearing Floors
Populated by PopulateRoomData. See Handler_DisappearingFloors for usage.
5BE8 2
Pointer: Current Room Buffer
Initialised at PopulateRoomData. Always set to BufferCurrentRoomData once populated by UnpackRoom. Used by the routine at DrawRoom.
5BEA 1
Control Method
Byte Control Method
0C Kempston Joystick
14 Cursor Joystick
1C Interface 2 Joystick
24 Keyboard
5BEB 5
User-Defined Keys
5BF0 1
Game State
Byte Meaning
01 Normal Game
02 Game Looped Mode
03 Demo Mode
5BF1 1
Player Lives
5BF2 2
Player Treasure
5BF4 2
Player Booty
The count of how much booty the player has collected in the current game.
Initialised to 0000 in InitialiseGame at the start of a new game, unless GameState is set to "Game Looped Mode" (02) in which case the game begins with the previous games value continued (but all the booty is respawned).
5BFA 2
Golden Key Timer Frame Skip
Frames to skip before decreasing the golden key timer at TimerGoldenKey.
5BFC 1
Golden Key Room ID
5BFD 2
Golden Key Position
5BFF 1
Golden Key Timer
A0EC 31
Working Shift Buffer
Pixel-shift workspace. GoldfishGame_PrintShiftedSprite and PrintShiftedSprite copy the blank tiles from Graphics_MaskSprite here before shifting a sprite.
A1C4 800
Buffer: Room
A4E4 800
Buffer: Room Attributes
ABD6 3788
Default Room Data
BAA2 1
Draw Sprite ID
The sprite ID being written by WriteSpriteBuffer. Starts as one less than the real ID; the print loop increments it.
BAA3 2
Draw Sprite Width
The width of the sprite being written by WriteSpriteBuffer.
BAA5 2
Temporary Table Room Data Pointer
Used to assist with populating TableRoomData, as this table is blank when the game is first loaded.
BAA9 44
Table: Room Data
Note that room ID 22 is never used, and hence is 0000. Room ID 21 is a valid reference (and does have data), but also is not used in the game.
BAD5 2
Buffer Pointer
See PopulateRoomBuffer for usage.
BAD7 500
Buffer: Room Data
PointerCurrentRoomBuffer will point here. Populated by UnpackRoom. Used by DrawRoom.
BCCB 51
Data: Room #21
Note; although this room is present in code, it's unreachable and fairly "broken". See Room #21.
BCFE 192
Data: Room #20
See Room #20.
BDBE 212
Data: Room #19
See Room #19.
BE92 212
Data: Room #18
See Room #18.
BF66 247
Data: Room #17
See Room #17.
C05D 208
Data: Room #16
See Room #16.
C12D 215
Data: Room #15
See Room #15.
C204 185
Data: Room #14
See Room #14.
C2BD 186
Data: Room #13
See Room #13.
C377 210
Data: Room #12
See Room #12.
C449 171
Data: Room #11
See Room #11.
C4F4 174
Data: Room #10
See Room #10.
C5A2 143
Data: Room #09
See Room #09.
C631 165
Data: Room #08
See Room #08.
C6D6 172
Data: Room #07
See Room #07.
C782 138
Data: Room #06
See Room #06.
C80C 158
Data: Room #05
See Room #05.
C8AA 199
Data: Room #04
See Room #04.
C971 162
Data: Room #03
See Room #03.
CA13 198
Data: Room #02
See Room #02.
CAD9 188
Data: Room #01
See Room #01.
D20C 1
Current In-Focus User-Defined Key
Contains the currently in-focus key position; used for highlighting.
D22C 39
Table: Key Map
See SetDefaultKeyboardInputs for an example of how this is used. Each key is stored as an offset. So a stored value of 05 equates to the "T" key.
D33E 1
Goldfish Game: Oxygen Level
D93D 1
Goldfish Game: Buoyancy Counter
This value is incremented every frame, and every 4th frame will cause the player to rise.
DB36 2
Goldfish Game: Sprite Row Stride
Byte width of the source sprite, used when GoldfishGame_PrintShiftedSprite advances to the next pixel row.
DB38 3
Goldfish Game: Sprite Shift Work
First holds the bit-rotate count while shifting, then the tile step when printing.
DB3B 1
Goldfish Game: Temporary Sprite Width
DB3C 1
Goldfish Game: Temporary Sprite ID
DB42 1
Goldfish Game: Number Of Fish Caught
DB44 1
Goldfish Game: Number Of Fish Needed
The number of fish needed to complete the game; see GoldfishGame_InitialiseFishNeeded.
DC0E 20
Goldfish Game: Player Attributes
DC22 264
Buffer: Sand Animation (Goldfish Game)
Populated by PopulateSandBuffer.
DD2A 110
Data: Bubbles (Goldfish Game)
DD98 2
Goldfish Game Creature Burst
E46F 11
Table: Bomb
E820 1
Lift Collision Flag
Set to 02 when a lift overlaps the player. See Handler_Lifts and Handler_Player.
F231 20
Table: Player Attributes
F245 20
Table: Default Player Attributes
F259 1
Port Hole Timer Frame Skip
This value is incremented every frame, and every 4th frame will animate the port holes (if there are any). See Handler_PortHole.
F2DB 30
Table: Bomb Sparks
Used by the routines at Handler_Bomb (for creation) and Handler_Explosion for animation.
Initial values are populated from TableDefaultBombSparks.
F2F9 30
Table: Default Bomb Sparks
Used by the routine at Handler_Bomb.
These default values are copied to TableBombSparks.
F317 5
Table: Animal Spawn Rows
Used by the routine at AnimalsEventTiming.
Five vertical character positions. AnimalsEventTiming picks a random index 00-03 uses that byte as the spawn row, and the next byte when matching a ReferenceKeysAndLockedDoors entry.
F31C 16
Table: Animal Attributes
Used by the routines at AbortAnimalEvent, AnimalsEventTiming and Handler_Animals.
Live animal sprite slot. Cleared by AbortAnimalEvent; populated by AnimalsEventTiming.
F32C 3
Player Collision Masks
Three screen-byte masks copied from WalkMaskSources / WalkMaskSources_Middle / WalkMaskSources_Right while the player is walking. Handler_Player ANDs these with the pixels under the player's feet.
F32F 1
Player Walk Ready
Used by the routine at Handler_Player.
Set to 01 when a walk step is ready to reprint.
F330 2
Pointer: Room Buffer
Keeps track of the current position in the room buffer being processed.
F332 2
Sprite Pixel Shift
Working shift count used by PrintShiftedSprite when bit-rotating a sprite.
F334 1
Lifts/ Pirates Frame Skip
F335 1
Active Sprite Width
The width of the sprite actively being printed.
F336 1
Active Sprite ID
The ID of the sprite actively being printed. Note; this starts off as -1 of the real value as it increments to the base sprite ID in the printing loop.
F33A 2
Player Step Counter
Incremented while walking; Handler_Player treats a count higher than 08 as a fall.
F33C 2
Sprite Shift Width
Pixel width working value used by PrintShiftedSprite.
F33E 1
Sprite Shift Row
Working row offset used by PrintShiftedSprite.
F33F 1
Player Fallen Flag
Set when the player has fallen; written to SoundFlag_PlayerCollision.
F340 1
Demo Mode Timer
Counts down while demo mode is active. Used by the routine at InitialiseGame.
F341 1
Bomb Frame Skip
F342 1
Kempston Control
F343 2
Random Number Seed
Used by the routine at GetRandomNumber. Not random at all!
FE86 2
Bomb Helper
Incremented address which points to ZX Spectrum ROM for the purposes of creating the screeching noice you hear when the bomb is counting down.
FE88 1
Interrupt Counter
Increments by one on every generated interrupt.
FFF7 1
Music: Theme Tune Mask
Used by the routines at GameEntryPoint and MusicThemeTune.
MusicThemeTune ANDs this with *InterruptCounter; the theme tune plays only when the result is zero.
FFF8 1
Music: On/ Off
FFF9 2
Music: Theme Tune Pointer
Keep track of the current position of the music data. This is important as the theme tune uses interrupts to play, so it needs to know where to resume playing from.
FFFB 1
Sound Flag: Lose Life
Set to 01 by LoseLife. SoundHandler_LoseLife plays when this and SoundFlag_PlayerCollision are both set.
FFFC 1
Sound Flag: Player Collision
Used by the routines at GameEntryPoint, Handler_Player and SoundHandler_LoseLife.
Written by Handler_Player. SoundHandler_LoseLife plays when this and SoundFlag_LoseLife are both set.
FFFD 1
Sound Flag: Bomb
Byte Sound
00 Off
01 Fuse
02 Sparks
FFFE 1
Sound Flag: General
Byte Sound
00 Off
01 Touched By Animal
02 Caught By Pirate
03 Bomb Explosion
04 Collected Item
05 Unlocked Door
06 Collected Key
07 No sound
FFFF 1
Sound Flag: Animal
Byte Sound
00 Off
01 Rat
02 Bird