Address |
Length |
Description |
8000 |
32 |
The cavern name is copied here and then used by the routine at 8684.
|
8020 |
72 |
The cavern tiles are copied here by the routine at 8684 and then used to draw the cavern by the routine at 8A75.
|
8068 |
1 |
Initialised by the routine at 8684, and used by the routines at 8ABB, 8BDD, 923A and 927F. Holds the LSB of the address of the entry in the screen buffer address lookup table at 8300 that corresponds to Willy's pixel y-coordinate; in practice, this LSB is twice Willy's actual pixel y-coordinate.
|
8069 |
1 |
Initialised upon entry to a cavern or after losing a life by the routine at 8684, used by the routine at 927F, and updated by the routine at 8BDD. Possible values are 0, 1, 2 and 3.
|
806A |
1 |
Initialised by the routine at 8684.
Bit(s) |
Meaning |
Used by |
0 |
Direction Willy is facing (reset=right, set=left) |
8BDD, 927F |
1 |
Willy's movement flag (set=moving) |
8ABB, 8BDD |
2-7 |
Unused (always reset) |
|
|
806B |
1 |
Initialised by the routine at 8684, and used by the routines at 870E, 8ABB, 8BDD and 8D05. Possible values are:
Value |
Meaning |
0x00 |
Willy is neither falling nor jumping |
0x01 |
Willy is jumping |
0x02-0x0B |
Willy is falling, and can land safely |
0x0C+ |
Willy is falling, and has fallen too far to land safely (see 8BDD) |
0xFF |
Willy has collided with a nasty or a guardian (see 8D05) |
|
806C |
2 |
|
806E |
1 |
Initialised by the routine at 8684, and used by the routines at 8ABB and 8BDD.
|
806F |
4 |
The conveyor definition is copied here by the routine at 8684.
|
8073 |
1 |
Initialised and used by the routine at 8684, and also used by the routines at 870E, 8ABB and 9135.
|
8074 |
1 |
Used by the routines at 8DF8 and 8F63. Holds the attribute byte of the last item drawn, or 0x00 if all the items have been collected.
|
8075 |
26 |
The item definitions are copied here by the routine at 8684, and then used by the routine at 8F63. An item definition contains the following information:
Byte(s) |
Contents |
0 |
Current attribute |
1,2 |
Address of the item's location in the attribute buffer at 5C00 |
3 |
MSB of the address of the item's location in the screen buffer at 6000 |
4 |
Unused (always 0xFF) |
|
808F |
37 |
The portal definition is copied here by the routine at 8684.
|
80B4 |
8 |
The item graphic is copied here by the routine at 8684, and then used by the routine at 8F63.
|
80BC |
1 |
Initialised (always to 0x3F in practice) and used by the routine at 8684, updated by the routine at 8A3C, and also used by the routine at 9028. Its value ranges from 0x24 to 0x3F and is actually the LSB of the display file address for the cell at the right end of the air bar. The amount of air to draw in this cell is determined by the value of the game clock at 80BD.
|
80BD |
1 |
Initialised by the routine at 8684, updated on every pass through the main loop by the routine at 8A3C, and used for timing purposes by the routines at 8D0F, 8DF8 and 9135. Its value (which is always a multiple of 4) is also used by the routine at 8A3C to compute the amount of air to draw in the cell at the right end of the air bar.
|
80BE |
29 |
The horizontal guardian definitions are copied here by the routine at 8684, and then used by the routines at 8D0F and 8DAA. There are four slots, each one seven bytes long, used to hold the state of the horizontal guardians in the current cavern.
For each horizontal guardian, the seven bytes are used as follows:
Byte |
Contents |
0 |
Bit 7: animation speed (0=normal, 1=slow) |
Bits 0-6: attribute (BRIGHT, PAPER and INK) |
1,2 |
Address of the guardian's location in the attribute buffer at 5C00 |
3 |
MSB of the address of the guardian's location in the screen buffer at 6000 |
4 |
Animation frame |
5 |
LSB of the address of the leftmost point of the guardian's path in the attribute buffer |
6 |
LSB of the address of the rightmost point of the guardian's path in the attribute buffer |
|
80DB |
1 |
Initialised by the routine at 8684, and used by the routines at 8DF8 (to hold Eugene's direction: 0=down, 1=up) and 9135 (to hold the Kong Beast's status: 0=on the ledge, 1=falling, 2=dead).
|
80DC |
1 |
Initialised by the routine at 8684, and used by the routines at 85CC (to hold the index into the message scrolled across the screen after the theme tune has finished playing), 8944 (to hold the distance of the boot from the top of the screen as it descends onto Willy), 8DF8 (to hold Eugene's pixel y-coordinate) and 9135 (to hold the Kong Beast's pixel y-coordinate).
|
80DD |
35 |
The vertical guardian definitions are copied here by the routine at 8684, and then used by the routines at 8E75 and 8EF1. There are four slots, each one seven bytes long, used to hold the state of the vertical guardians in the current cavern.
For each vertical guardian, the seven bytes are used as follows:
Byte |
Contents |
0 |
Attribute |
1 |
Animation frame |
2 |
Pixel y-coordinate |
3 |
x-coordinate |
4 |
Pixel y-coordinate increment |
5 |
Minimum pixel y-coordinate |
6 |
Maximum pixel y-coordinate |
In most of the caverns that do not have vertical guardians, this area is overwritten by unused bytes from the cavern definition. The exception is Eugene's Lair: the routine at 8684 copies the graphic data for the Eugene sprite into the last 32 bytes of this area, where it is then used by the routine at 8DF8.
|
8100 |
256 |
The guardian graphic data is copied here by the routine at 8684, and then used by the routines at 8DAA, 8E75, 8EF1 and 9135.
|
8407 |
1 |
Initialised by the routine at 85CC, used by the routines at 8684, 870E, 8A75 and 8DAA, and updated by the routine at 9028.
|
841F |
6 |
Used by the routine at 870E and updated by the routine at 8944.
|
8425 |
10 |
|
8457 |
1 |
Initialised to 2 by the routine at 85CC, and used and updated by the routines at 870E and 90EA.
|
8458 |
1 |
Initialised by the routine at 85CC, and used by the routines at 870E and 90EA.
|
8459 |
1 |
Initialised by the routine at 85CC, and used by the routines at 870E, 8BDD and 9337. Holds 1 if a joystick is present, 0 otherwise.
|
845A |
1 |
Initialised by the routine at 85CC, and used by the routines at 8684, 870E and 9028. Holds 0x00 when a game is in progress, or a value from 0x01 to 0x40 when in demo mode.
|
845B |
1 |
Initialised by the routine at 85CC, and used and updated by the routine at 870E.
|
845C |
1 |
The keypress flag in bit 0 is initialised by the routine at 85CC; bits 0 and 1 are checked and updated by the routine at 870E.
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 |
|
845D |
1 |
|