|Game status buffer|
The cavern name is copied here and then used by the routine at 8684.
The cavern tiles are copied here by the routine at 8684 and then used to draw the cavern by the routine at 8A75.
The extra tile at 805F behaves like a floor tile, and is used as such in The Endorian Forest, Attack of the Mutant Telephones, Ore Refinery, Skylab Landing Bay and The Bank. It is also used in The Menagerie as spider silk, and in Miner Willy meets the Kong Beast and Return of the Alien Kong Beast as a switch.
Willy's pixel y-coordinate (x2)
Willy's animation frame
Willy's direction and movement flags
Airborne status indicator
Initialised by the routine at 8684, and used by the routines at 870E, 8ABB, 8BDD and 8D05. Possible values are:
Address of Willy's location in the attribute buffer at 5C00
Jumping animation counter
The conveyor definition is copied here by the routine at 8684.
Attribute of the last item drawn
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:
The portal definition is copied here by the routine at 8684.
Remaining air supply
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.
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.
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:
Eugene's direction or the Kong Beast's status
Eugene's or the Kong Beast's pixel y-coordinate
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).
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:
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.
Guardian graphic data
Current cavern number
Screen flash counter
Kempston joystick indicator
Game mode indicator
In-game music note index
6031769 key counter