| Page |
Byte |
Address |
Length |
Description |
| 128 |
0 |
32768 |
256 |
Room buffer
Initialised upon entry to a room by the routine at 35068.
|
| 129 |
0 |
33024 |
65 |
Entity buffer
Initialised by the routine at 35068, and used by the routines at 37056 and 37310. There are eight slots 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:
| Byte |
Contents |
| 0 |
Bit 7: direction (0=left, 1=right) |
| Bits 5-6: animation frame index |
| Bits 3-4: unused |
| Bits 0-2: entity type (001) |
| 1 |
Bits 5-7: animation frame index mask (see 37393) |
| Bit 4: unused |
| Bit 3: BRIGHT value |
| Bits 0-2: INK colour |
| 2 |
Bits 5-7: base sprite index |
| Bits 0-4: x-coordinate |
| 3 |
Pixel y-coordinate x2 (index into the table at 33280) |
| 4 |
Unused |
| 5 |
Page containing the sprite graphic data (see 43776) |
| 6 |
Minimum x-coordinate |
| 7 |
Maximum x-coordinate |
For a vertical guardian, the eight bytes are used as follows:
| Byte |
Contents |
| 0 |
Bit 7: unused |
| Bits 5-6: animation frame index |
| Bits 3-4: animation frame update flags (see 37247) |
| Bits 0-2: entity type (010) |
| 1 |
Bits 5-7: animation frame index mask (see 37393) |
| Bit 4: unused |
| Bit 3: BRIGHT value |
| Bits 0-2: INK colour |
| 2 |
Bits 5-7: base sprite index |
| Bits 0-4: x-coordinate |
| 3 |
Pixel y-coordinate x2 (index into the table at 33280) |
| 4 |
Pixel y-coordinate increment |
| 5 |
Page containing the sprite graphic data (see 43776) |
| 6 |
Minimum y-coordinate |
| 7 |
Maximum y-coordinate |
For an arrow, the eight bytes are used as follows:
| Byte |
Contents |
| 0 |
Bit 7: direction (0=left, 1=right) |
| Bits 3-6: unused |
| Bits 0-2: entity type (100) |
| 1 |
Unused |
| 2 |
Pixel y-coordinate x2 (index into the table at 33280) |
| 3 |
Unused |
| 4 |
x-coordinate |
| 5 |
Collision detection byte (0=off, 255=on) |
| 6 |
Top/bottom pixel row (drawn either side of the shaft) |
| 7 |
Unused |
The rope uses the second and fourth bytes of the following slot in addition to its own; these ten bytes are used as follows:
| Byte |
Contents |
| 0 |
Bit 7: direction (0=left, 1=right) |
| Bits 3-6: unused |
| Bits 0-2: entity type (011) |
| 1 |
Animation frame index |
| 2 |
x-coordinate of the top of the rope |
| 3 |
x-coordinate of the segment of rope being drawn |
| 4 |
Length (32) |
| 5 |
Segment drawing byte |
| 6 |
Unused |
| 7 |
Animation frame at which the rope changes direction (54) |
| 9 |
Index of the segment of rope being drawn (0-31) |
| 11 |
Bit 7: Willy is on the rope (set), or not (reset) |
| Bits 0-6: unused |
|
| 132 |
32 |
33824 |
1 |
Current room number
Initialised to 33 ( The Bathroom) by the routine at 34762, checked by the routines at 35068, 37310, 37841, 38196, 38276, 38298 and 38455, and updated by the routines at 35591, 38026, 38046, 38064 and 38098.
|
| 133 |
124 |
34172 |
3 |
Number of items collected
Initialised by the routine at 34762, printed by the routine at 35245, and updated by the routine at 37841.
|
| 133 |
127 |
34175 |
6 |
Current time
Initialised by the routine at 35068, and printed and updated by the routine at 35245.
|
| 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
Initialised to 7 by the routine at 34762, decremented by the routine at 35841, and used by the routines at 35211 (when drawing the remaining lives) and 35591 (to adjust the speed and pitch of the in-game music).
|
| 133 |
205 |
34253 |
1 |
Screen flash counter
Initialised to zero by the routine at 34762, but never used; the code at 35339 makes the screen flash in Manic Miner fashion if this address holds a non-zero value.
|
| 133 |
206 |
34254 |
1 |
Kempston joystick indicator
Initialised by the routine at 34762, and checked by the routines at 36564 and 38601. Holds 1 if a joystick is present, 0 otherwise.
|
| 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.
|
| 133 |
208 |
34256 |
1 |
Willy's direction and movement flags
| Bit(s) |
Meaning |
Used by |
| 0 |
Direction Willy is facing (reset=right, set=left) |
36564, 36796, 38455 |
| 1 |
Willy's movement flag (set=moving) |
36564, 36796, 37310 |
| 2-7 |
Unused (always reset) |
|
|
| 133 |
209 |
34257 |
1 |
Airborne status indicator
| Value |
Meaning |
| 0 |
Willy is neither falling nor jumping |
| 1 |
Willy is jumping (see 36765) |
| 2-11 |
Willy is falling, and can land safely |
| 12-15 |
Willy is falling, and has fallen too far to land safely (see 36574) |
| 255 |
Willy has collided with a nasty, an arrow, a guardian, or Maria (see 37046) |
|
| 133 |
210 |
34258 |
1 |
Willy's animation frame
|
| 133 |
211 |
34259 |
2 |
Address of Willy's location in the attribute buffer at 23552
Initialised by the routine at 34762, and used by the routines at 36307, 36796, 37310, 38026, 38046, 38064, 38098, 38196, 38276, 38344 and 38455.
|
| 133 |
213 |
34261 |
1 |
Jumping animation counter
|
| 133 |
214 |
34262 |
1 |
Rope status indicator
Initialised by the routine at 35068, checked by the routine at 36307, and checked and updated by the routines at 36564 and 37310. Possible values are:
| Value |
Meaning |
| 0 |
Willy is not on the rope |
| 12-32 |
Willy is on the rope at this distance from the top |
| 240-255 |
Willy has just jumped or fallen off the rope |
|
| 133 |
215 |
34263 |
7 |
Willy's state on entry to the room
|
| 133 |
222 |
34270 |
1 |
256 minus the number of items remaining
Initialised by the routine at 34762, and updated by the routine at 37841 when an item is collected.
|
| 133 |
223 |
34271 |
1 |
Game mode indicator
| Value |
Meaning |
| 0 |
Normal |
| 1 |
All items collected |
| 2 |
Willy is running to the toilet |
| 3 |
Willy's head is down the toilet |
|
| 133 |
224 |
34272 |
1 |
Inactivity timer
|
| 133 |
225 |
34273 |
1 |
In-game music note index
Initialised by the routine at 34762, used by the routine at 35211, and used and updated by the routine at 35591.
|
| 133 |
226 |
34274 |
1 |
Music flags
The keypress flag in bit 0 is initialised by the routine at 34762; bits 0 and 1 are checked and updated by the routine at 35591.
| Bit(s) |
Meaning |
| 0 |
Keypress flag (set=H-ENTER being pressed, reset=no key pressed) |
| 1 |
In-game music flag (set=music off, reset=music on) |
| 2-7 |
Unused |
|
| 133 |
227 |
34275 |
1 |
WRITETYPER key counter
Checked by the routine at 35245, and updated by the routine at 35591.
|
| 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.
|