![]() |
Game status buffer |
Page | Byte | Address | Length | Description | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
128 | 0 | 32768 | 128 |
Room layout
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
128 | 128 | 32896 | 32 |
Room name
Initialised upon entry to a room and then used by the routine at 35090.
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
128 | 160 | 32928 | 54 |
Room tiles
Initialised upon entry to a room by the routine at 35090.
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
128 | 214 | 32982 | 4 |
Conveyor definition
Initialised upon entry to a room by the routine at 35090.
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
128 | 218 | 32986 | 4 |
Ramp definition
Initialised upon entry to a room by the routine at 35090.
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
128 | 222 | 32990 | 1 |
Border colour
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
128 | 225 | 32993 | 8 |
Item graphic
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
128 | 233 | 33001 | 4 |
Room exits
Initialised upon entry to a room by the routine at 35090.
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
128 | 240 | 33008 | 16 |
Entity specifications
Initialised upon entry to a room and then used by the routine at 35090.
There are eight pairs of bytes here that hold the entity specifications for the current room. The first byte in each pair identifies one of the entity definitions at 40960. The meaning of the second byte depends on the entity type: it determines the base sprite index and x-coordinate of a guardian, the y-coordinate of an arrow, or the x-coordinate of the top of a rope.
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
129 | 0 | 33024 | 65 |
Entity buffers
Initialised by the routine at 35090, and used by the routines at 37056 and 37310. There are eight buffers here, each one eight bytes long, used to hold the state of the entities (rope, arrows and guardians) in the current room.
For a horizontal guardian, the eight bytes are used as follows:
For a vertical guardian, the eight bytes are used as follows:
For an arrow, the eight bytes are used as follows:
The rope uses the second and fourth bytes of the following buffer in addition to its own; these ten bytes are used as follows:
Note that if a rope were the eighth entity specified in a room, its buffer would use the first and third bytes in the otherwise unused area at 33089.
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
132 | 32 | 33824 | 1 |
Current room number
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
133 | 124 | 34172 | 3 |
Number of items collected
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
133 | 127 | 34175 | 6 |
Current time
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
133 | 203 | 34251 | 1 |
Minute counter
Initialised by the routine at 34762; incremented on each pass through the main loop by the routine at 35245 (which moves the game clock forward by a minute when the counter reaches 0); reset to zero by the routine at 38276 when Willy sticks his head down the toilet; and used by the routines at 37841 (to cycle the colours of the items in the room), 38196 (to determine Maria's animation frame in Master Bedroom) and 38298 (to determine the animation frame for the toilet in The Bathroom).
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
133 | 204 | 34252 | 1 |
Lives remaining
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
133 | 205 | 34253 | 1 |
Screen flash counter
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
133 | 206 | 34254 | 1 |
Kempston joystick indicator
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
133 | 207 | 34255 | 1 |
Willy's pixel y-coordinate (x2)
Initialised to 208 by the routine at 34762, and used by the routines at 35245, 35591, 36307, 36564, 36796, 37310, 38064, 38098, 38196, 38344 and 38455. Holds the LSB of the address of the entry in the screen buffer address lookup table at 33280 that corresponds to Willy's pixel y-coordinate; in practice, this is twice Willy's actual pixel y-coordinate. Note that when Willy is standing on a ramp, this holds his pixel y-coordinate rounded down to the nearest value of 16 (8x2).
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
133 | 208 | 34256 | 1 |
Willy's direction and movement flags
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
133 | 209 | 34257 | 1 |
Airborne status indicator
Initialised by the routine at 34762, checked by the routines at 35591, 36796 and 38344, updated by the routines at 37046, 37310 and 38064, and checked and updated by the routines at 36307, 36564 and 38098. Possible values are:
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
133 | 210 | 34258 | 1 |
Willy's animation frame
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
133 | 211 | 34259 | 2 |
Address of Willy's location in the attribute buffer at 23552
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
133 | 213 | 34261 | 1 |
Jumping animation counter
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
133 | 214 | 34262 | 1 |
Rope status indicator
Initialised by the routine at 35090, checked by the routines at 36307 and 36796, and checked and updated by the routines at 36564 and 37310. Possible values are:
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
133 | 215 | 34263 | 7 |
Willy's state on entry to the room
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
133 | 222 | 34270 | 1 |
256 minus the number of items remaining
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
133 | 223 | 34271 | 1 |
Game mode indicator
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
133 | 224 | 34272 | 1 |
Inactivity timer
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
133 | 225 | 34273 | 1 |
In-game music note index
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
133 | 226 | 34274 | 1 |
Music flags
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
133 | 227 | 34275 | 1 |
WRITETYPER key counter
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
133 | 228 | 34276 | 1 |
Temporary variable
Used by the routines at 34499 and 34620 to hold the entry code, by the routine at 34762 to hold the index into the message scrolled across the screen after the theme tune has finished playing, and by the routine at 35914 to hold the distance of the foot from the top of the screen as it descends onto Willy.
|