Address Length Description
23359 2
Pointer: Game Entry Point
23500 1
Active Room: Key Colour
23501 1
Active Room: Closed Door Colour
23503 1
Active Room: Room Scaffolding Colour
23504 1
Active Border Colour
23505 1
Active Room: Paper Colour
See DrawRoom.
23506 1
Active Room: Ladder Colour
23507 1
Current Room: Room ID
23508 1
Temporary: Current Room ID
23510 2
Reference: Doors
Populated by PopulateRoomData. See DrawRoom and Handler_Doors for usage.
23512 2
Reference: Ladders
23514 2
Reference: Keys And Locked Doors
23516 2
Reference: Port Hole Reference
Populated by PopulateRoomData. See Handler_PortHole for usage.
23518 2
Reference: Pirate
Populated by PopulateRoomData. See Handler_Pirates for usage.
23520 2
Reference: Items
Populated by PopulateRoomData. See DrawRoom and Handler_Items for usage.
23522 2
Reference: Furniture
Populated by PopulateRoomData. See DrawRoom for usage.
23524 2
Reference: Lifts
Populated by PopulateRoomData. See Handler_LiftMasks and Handler_Lifts for usage.
23526 2
Reference: Disappearing Floors
Populated by PopulateRoomData. See Handler_DisappearingFloors for usage.
23528 2
Pointer: Current Room Buffer
Initialised at PopulateRoomData. Always set to BufferCurrentRoomData once populated by UnpackRoom. Used by the routine at DrawRoom.
23530 1
Control Method
Byte Control Method
12 Kempston Joystick
20 Cursor Joystick
28 Interface 2 Joystick
36 Keyboard
23531 5
User-Defined Keys
23536 1
Game State
Byte Meaning
1 Normal Game
2 Game Looped Mode
3 Demo Mode
23537 1
Player Lives
23538 2
Player Treasure
23540 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" (2) in which case the game begins with the previous games value continued (but all the booty is respawned).
23546 2
Golden Key Timer Frame Skip
Frames to skip before decreasing the golden key timer at TimerGoldenKey.
23548 1
Golden Key Room ID
23549 2
Golden Key Position
23551 1
Golden Key Timer
41196 31
Working Shift Buffer
Pixel-shift workspace. GoldfishGame_PrintShiftedSprite and PrintShiftedSprite copy the blank tiles from Graphics_MaskSprite here before shifting a sprite.
41412 800
Buffer: Room
42212 800
Buffer: Room Attributes
43990 3788
Default Room Data
47778 1
Draw Sprite ID
The sprite ID being written by WriteSpriteBuffer. Starts as one less than the real ID; the print loop increments it.
47779 2
Draw Sprite Width
The width of the sprite being written by WriteSpriteBuffer.
47781 2
Temporary Table Room Data Pointer
Used to assist with populating TableRoomData, as this table is blank when the game is first loaded.
47785 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.
47829 2
Buffer Pointer
See PopulateRoomBuffer for usage.
47831 500
Buffer: Room Data
PointerCurrentRoomBuffer will point here. Populated by UnpackRoom. Used by DrawRoom.
48331 51
Data: Room #21
Note; although this room is present in code, it's unreachable and fairly "broken". See Room #21.
48382 192
Data: Room #20
See Room #20.
48574 212
Data: Room #19
See Room #19.
48786 212
Data: Room #18
See Room #18.
48998 247
Data: Room #17
See Room #17.
49245 208
Data: Room #16
See Room #16.
49453 215
Data: Room #15
See Room #15.
49668 185
Data: Room #14
See Room #14.
49853 186
Data: Room #13
See Room #13.
50039 210
Data: Room #12
See Room #12.
50249 171
Data: Room #11
See Room #11.
50420 174
Data: Room #10
See Room #10.
50594 143
Data: Room #09
See Room #09.
50737 165
Data: Room #08
See Room #08.
50902 172
Data: Room #07
See Room #07.
51074 138
Data: Room #06
See Room #06.
51212 158
Data: Room #05
See Room #05.
51370 199
Data: Room #04
See Room #04.
51569 162
Data: Room #03
See Room #03.
51731 198
Data: Room #02
See Room #02.
51929 188
Data: Room #01
See Room #01.
53772 1
Current In-Focus User-Defined Key
Contains the currently in-focus key position; used for highlighting.
53804 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 5 equates to the "T" key.
54078 1
Goldfish Game: Oxygen Level
55613 1
Goldfish Game: Buoyancy Counter
This value is incremented every frame, and every 4th frame will cause the player to rise.
56118 2
Goldfish Game: Sprite Row Stride
Byte width of the source sprite, used when GoldfishGame_PrintShiftedSprite advances to the next pixel row.
56120 3
Goldfish Game: Sprite Shift Work
First holds the bit-rotate count while shifting, then the tile step when printing.
56123 1
Goldfish Game: Temporary Sprite Width
56124 1
Goldfish Game: Temporary Sprite ID
56130 1
Goldfish Game: Number Of Fish Caught
56132 1
Goldfish Game: Number Of Fish Needed
The number of fish needed to complete the game; see GoldfishGame_InitialiseFishNeeded.
56334 20
Goldfish Game: Player Attributes
56354 264
Buffer: Sand Animation (Goldfish Game)
Populated by PopulateSandBuffer.
56618 110
Data: Bubbles (Goldfish Game)
56728 2
Goldfish Game Creature Burst
58479 11
Table: Bomb
59424 1
Lift Collision Flag
Set to 2 when a lift overlaps the player. See Handler_Lifts and Handler_Player.
62001 20
Table: Player Attributes
62021 20
Table: Default Player Attributes
62041 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.
62171 30
Table: Bomb Sparks
Used by the routines at Handler_Bomb (for creation) and Handler_Explosion for animation.
Initial values are populated from TableDefaultBombSparks.
62201 30
Table: Default Bomb Sparks
Used by the routine at Handler_Bomb.
These default values are copied to TableBombSparks.
62231 5
Table: Animal Spawn Rows
Used by the routine at AnimalsEventTiming.
Five vertical character positions. AnimalsEventTiming picks a random index 0-3 uses that byte as the spawn row, and the next byte when matching a ReferenceKeysAndLockedDoors entry.
62236 16
Table: Animal Attributes
Used by the routines at AbortAnimalEvent, AnimalsEventTiming and Handler_Animals.
Live animal sprite slot. Cleared by AbortAnimalEvent; populated by AnimalsEventTiming.
62252 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.
62255 1
Player Walk Ready
Used by the routine at Handler_Player.
Set to 1 when a walk step is ready to reprint.
62256 2
Pointer: Room Buffer
Keeps track of the current position in the room buffer being processed.
62258 2
Sprite Pixel Shift
Working shift count used by PrintShiftedSprite when bit-rotating a sprite.
62260 1
Lifts/ Pirates Frame Skip
62261 1
Active Sprite Width
The width of the sprite actively being printed.
62262 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.
62266 2
Player Step Counter
Incremented while walking; Handler_Player treats a count higher than 8 as a fall.
62268 2
Sprite Shift Width
Pixel width working value used by PrintShiftedSprite.
62270 1
Sprite Shift Row
Working row offset used by PrintShiftedSprite.
62271 1
Player Fallen Flag
Set when the player has fallen; written to SoundFlag_PlayerCollision.
62272 1
Demo Mode Timer
Counts down while demo mode is active. Used by the routine at InitialiseGame.
62273 1
Bomb Frame Skip
62274 1
Kempston Control
62275 2
Random Number Seed
Used by the routine at GetRandomNumber. Not random at all!
65158 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.
65160 1
Interrupt Counter
Increments by one on every generated interrupt.
65527 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.
65528 1
Music: On/ Off
65529 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.
65531 1
Sound Flag: Lose Life
Set to 1 by LoseLife. SoundHandler_LoseLife plays when this and SoundFlag_PlayerCollision are both set.
65532 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.
65533 1
Sound Flag: Bomb
Byte Sound
0 Off
1 Fuse
2 Sparks
65534 1
Sound Flag: General
Byte Sound
0 Off
1 Touched By Animal
2 Caught By Pirate
3 Bomb Explosion
4 Collected Item
5 Unlocked Door
6 Collected Key
7 No sound
65535 1
Sound Flag: Animal
Byte Sound
0 Off
1 Rat
2 Bird