Address Length Description
48042 2
Random Seed
The seed of the random number generator, which is updated by RandomNumber. The two bytes are also used one at a time as two random numbers. It is kept when a new game is started after a game over (see StartGame_KeepSettings).
48044 2
Font Pointer
The address that is used for the graphics of the characters that are printed by PrintScreen: the graphic of a character is at this address plus eight times the code of the character. It is kept when a new game is started after a game over (see StartGame_KeepSettings).
48046 2
Saved Stack Pointer
Holds the stack pointer while a routine uses the stack to move data around quickly (for example CopyPixelsToScreen). It is kept when a new game is started after a game over (see StartGame_KeepSettings).
48048 1
Game Options
The options that are chosen on the game selection menu (see GameMenu). It is kept when a new game is started after a game over (see StartGame_KeepSettings).
Bits Option
0 Keyboard (bits 1 and 2)
2 Kempston joystick (bits 1 and 2)
4 Cursor joystick (bits 1 and 2)
6 Sinclair joystick (bits 1 and 2)
Bit 3 Directional control, when set
48049 1
Previous Game Options
The options as they were before the last key was read by the game selection menu, so that the tune can be played when an option has changed. It is kept when a new game is started after a game over (see StartGame_KeepSettings).
48050 2
Frame Counter
Counts the frames of the game. It starts from the low word of the system variable FRAMES, and is also used to make random numbers (see IncrementFrameCounter and RandomNumber). It is kept when a new game is started after a game over (see StartGame_KeepSettings).
48052 1
Cell Column
The column of the map of the cell that is being drawn, which GetMapCell keeps for ProjectCell.
48053 1
Cell Row
The row of the map of the cell that is being drawn, which GetMapCell keeps for ProjectCell.
48054 2
Screen X Position
The position along the X axis of the screen of the corner of the cell or of the object that ProjectCell or ProjectObject last worked out.
48056 2
Screen Y Position
The position along the Y axis of the screen of the corner of the cell or of the object that ProjectCell or ProjectObject last worked out.
48058 1
View Rotated Flag
Holds 1 when the view has been turned round, and 0 when it has not (see CheckRotateKey).
48059 2
Drawn Columns
A bit for each of the sixteen columns of the view, which is set when the column has been drawn with strips of wall, or is outside the view. DrawView stops drawing the view when all of the bits are set.
48061 1
Key Held Flag
Holds 1 while the key that turns the view is being held down (see CheckRotateKey). The game selection menu also uses it for the key that changes directional control (see GameMenu).
48062 1
Maximum Speed
The speed that the player works up to when moving forward. It is 10, and it is 18 while a speed bonus lasts (see UpdateSpeedBonus).
48063 1
Menu Frame Drawn Flag
Holds 1 when the frame of the game selection menu has been drawn (see DisplayMenu).
48064 1
Wall Tile
The tile of the cell with walls that is being drawn, which decides the colour of its walls (see DrawCellWithWalls).
48065 1
Tune Played Flag
Has bit 0 set when PlayMusicOnce has played a tune, so that it plays it only once.
48066 1
Characters To Draw
The number of characters in each row of the sprite that DrawSprite is drawing, which is the width of the sprite, and one more when the sprite has to be shifted.
48067 1
Rows To Draw
The number of rows of the sprite that DrawSprite is drawing.
48068 2
Chosen Object Position
The position in the list of objects at ObjectList of the object that DrawObjectsInList has chosen to draw next.
48070 2
Compared Object Position
The position in the list of objects at ObjectList of the object that DrawObjectsInList is comparing with the chosen object.
48072 1
Throw Timer
The number of frames that are left before another item can be thrown (see ThrowItem).
48073 4
Score
The score, as three bytes of BCD with the highest first, which are followed by a fourth byte that is always zero. The score is printed with those two zeroes at the end, so it is in hundreds (see AddToScore and PrintScore).
48077 1
Lives
The number of lives that are left after the one that is being played. It is 6 when the game starts, and it goes down by one as each life starts (see StartNewLife).
48078 36
Items Left
The number of items that are left to be found on each kind of tile, for the tiles 0 to 35. An item appears in the village when the player stands on a tile that has some left (see SpawnItem), and it is added back when the item is lost again (see UpdateVillageItem).
48114 1
Mirror Flag
Holds 1 when the strips that are being drawn are to be mirrored, and 0 when they are not (see DrawStripsLeftToRight).
48115 1
Health
The health of the player, which is 3 when a life starts or the health is made full. The life ends when it reaches zero (see 52927).
48116 1
Last Shot Used
Which of the two shots was used last, as 0 or 16 (see ThrowItem).
48117 1
Speed Bonus Timer
The number of frames that the speed bonus has left, which is set to 255 when the player collects a speed bonus (see UpdateSpeedBonus).
48118 2
Last Cell Visited
The last cell of the village that was visited, with the column in the first byte and the row in the second (see MarkCellVisited).
48120 1
Step Counter
Counts the steps of the player, which is used to make the sound of the player walking (see PlayMovementSound).
48121 1
Note Counter
The number of notes of the sound effect that are left to be played (see PlaySoundEffect). A sound effect is started by setting the note counter and the sound number together.
48122 1
Sound Number
The number of the sound effect that is playing, which is an index into the table at SoundEffectTable.
48123 1
Flash Colour
The paper colour (in bits 3 to 5) that the playing area is flashed with on this frame, which is set by UpdateDestroyedMonster when a monster has been destroyed. It is cleared at the end of every frame (see 48861).
48124 1
Previous Flash Colour
A copy of the flash colour from the last frame, which is added to the attributes that are made on this frame.
48125 1
Percentage Hundreds
The hundreds digit of the percentage of the game that has been completed (see CalculatePercentage).
48126 1
Percentage Tens And Units
The tens and units digits of the percentage of the game that has been completed, as BCD (see CalculatePercentage).
48127 1
Game Finished Flag
Holds 1 when the game has been finished.
48128 1
Ending Attribute
The attribute that the piece of the title graphic or the ghost is drawn with at the end of the game (see UpdateLogoPiece and UpdateEndingGhost).
48129 1
Controls
The controls that are being used, as read by ReadControls.
Bit Control
0 Left
1 Right
2 Forward
3 Fire
4 Down
5 Turn the view
48130 1
Materialise Timer
The timer for the player appearing at the start of a life, which is set to 40 (see StartNewLife) and is made larger by two on each frame until it reaches 112 (see UpdatePlayerLegs).
48131 11
Inventory
The eleven places in the inventory tube. A place holds the number of the item that is in it, or zero if there is nothing there (see PickUpItem).
48142 128
Visited Cells
A bit for each of the cells of the village, which is set once the player has visited the cell (see MarkCellVisited). There are four bytes for each row.
48270 368
Object Table
The table of objects, which holds everything that moves in the village. There are 23 objects of 16 bytes each, and MainLoop updates them in turn.
The type of an object chooses the routine that updates it (see ObjectHandlerTable) and the sprite that draws it (see SpriteTable). An object of type 0 is not in use.
Byte Contents
0 Type
1 Position along the X axis within the cell
2 Column of the cell
3 Position along the Y axis within the cell
4 Row of the cell
5 Speed (or the kind of tile, for an item)
6 Direction (bits 6 and 7) and timer (bits 0 to 5)
7 Flags
8 Half of the width
9 Half of the depth
10 Velocity along the X axis
11 Velocity along the Y axis
12 Offset of the sprite along the X axis
13 Offset of the sprite along the Y axis
14 Screen position of the sprite, low byte
15 Screen position of the sprite, high byte
The flags are bit 0 (the object has hit something), bit 1 (the object has been drawn), bit 5 (the object chases the player) and bits 6 and 7 (the sprite is to be turned round and upside down, see FlipSprite).