Address Length Description
5B60 450
Rex projectile configuration
Initialised at routine A89D
5D22 300
Enemy projectiles configuration for the current room
Initialised at routine A89D.
Byte Meaning
0x00 x-position (in pixels)
0x01 y-position (in pixels)
0x02 - 0x03 Address of the location into the room graphic buffer
0x04 x-delta (in pixels)
0x05 y-delta (in pixels)
0x06 Projectile status: $00 Destroyed - $01 Flying - $02 Impact 1 - $03 Impact 2
0x07 - 0x08 Precomputed offset to add to address pointer into room graphic buffer every frame
0x0B Projectile type: $00-$01 basic laser , $02 laser, $03 multiple, $04 spray, $07 missile # Bit 7: subtype
0x0C For $07: Missile trajectory index - For $02: Number of laser type $06 to create
0x0D x-position for laser type $06
0x0E Laser duration counter - Destroy laser at $00
5E4E 24
Drones configuration for multiple weapon
Initialised at routine A628. Three bytes for every drone. 8 drones max. Byte $00 - x-position of drone Byte $01 - y-position of drone Byte $02 - index into the offset position table for the drone
5E66 384
Data buffer for the state of every enemy on screen
Bytes Meaning
0x00 X position
0x01 Y position
0x02 Bit 0: reverse sprite if set - Enemy direction $00 left $01 right
0x03 $00 FOOT MAN not jumping - $01 FOOT MAN jumping ; For Enemy type $FF (EXPLOSION) debris expansion counter
0x04 - 0x05 Address pointer to graphic data for static (non-animated) sprites - y-offset address pointer for FOOT MAN jumping - x-delta and y-delta for MINE and BLOB} { 0x06 FOOT MAN Falling speed? $00 Not falling - $02 - $04
0x07 $00 Not used
0x08 $00 Not used
0x09 Bit 7: 1 - graphic data for fixed (non animated) sprite. Computed by: address at 0x04-0x05
0 - graphic data from animated sprite. Computed by: base graphic data address at 0x0A-0x0B + offset of animation from base address at 0x16-0x17
Bit 6-0: enemy type -> $00 FOOT MAN , $FF Explosion, $FE Bubble, $FD Smartbomb, $FC Question
0x0A - 0x0B Address pointer to animation offset table
0x0C Enemy status $00 dead / $01 alive
0x0D Explosion counter (decrement))
0x0E Width of the sprite (in bytes)
0x0F Height of the sprite (in pixels)
0x10 Enemy speed velocity ($00 stopped). For Bubble: bubble y-position counter offset
0x11 Enemy type:
0x00 (FOOTMAN) - Counter for state change duration: $C8 fixed crouched
0x08 (SCANNER) - SCANNER movement direction - $00 horizontal (direction based on byte 0x02) - $01 moving down - $02 moving up - $03 bump/fire
0x10 (BOSS) - Boos direction $00 Up - $01 Down
0x0B - 0x0A (LAUNCHER/SHOOTER) - Counter desc . From shot frequency to 0. Shots when counter equals zero
0x0C - 0x0D (POD/MINE LAYER) - Move direction ($00 up )
0x09 (SWING GUN) - Gun orientation if fixed (0 - left, 1 - left bottom, 2 - bottom, 3 - right bottom, 4 - right)
0x0E-0x0F (BLOB/MINE) State change counter
0xFE (BUBBLE) Bubble duration counter
0x12 Enemy type:
0x00 (FOOTMAN): $00 walking - $01 crouched - $02 stand-by
0x08 (SCANNER): state change counter
0x10 (BOOS): Boss speed $02 healed $01 wounded
0x0B - 0x0A (LAUNCHER/SHOTTER) - Shot frequency
0x0C - 0x0D (POD/MINE LAYER) - speed
0x09 (SWING GUN) - $00 mobile - $01 fixed
0x0E (MINE) - Mine state $00 Continue with same x/y-delta $01 Change x/y-delta to chase Rex
0xFE (BUBBLE) - MSB of address graphic data
0x13 0xFE (BUBBLE) LSB of address graphic data
0x10 (BOSS) Boss status $00 Good health $01 Wounded $02 Escape pod
0x14 Enemy health
0x15 Energy bubble $01 big / $00 small / $FF no bubble
0x16 - 0x17 Address pointer to graphic data for animated sprites
5FE6 26
Stack (SP = $6000 at init game )
9F14 75
Rex atoms data during teleporting
Three bytes for every atom. $00 y-delta $01 x-offset $02 y-position
A012 1
FIRE key hold down
Variable used to prevent multiple shots while FIRE key is hold down. FIRE key hold down is only available when rapid shots bonus is active
A013 1
Rex weapon in use
0-Basic Laser, 1-Double fire, 2-Laser, 3-Multiple, 4-Spray. Used to compute BOSS health
A014 1
Weapon energy level. Value on init $01
A015 2
Attribute file pointer to current weapon icon in HUD
A017 1
Tilt arrow tiles
$00 or $01 select distints graphic data
A018 1
Weapon energy quantity - Value $00 on init
Values from 0 to 120
A019 2
Address pointer into tile type buffer based on Rex position
A01B 2
Address pointer into tile buffer of the tile under the entity
A01D 1
Counter for tile drawn on room graphic buffer
A01E 2
Pointer to the tile type buffer for the currently draw tile
A020 2
Addres pointer to static enemy definition for the current room
A022 1
BOSS health
A023 5
Nou used
A028 1
Horizontal position for windows
A029 1
Vertical position for windows
A02A 1
Length of the longest line for the windows
A02B 1
Number of lines for the windows
A02C 1
Enemy enters the room from left
$00 No / $FF Yes
A02D 1
Enemy enters the room from right
$00 No / $FF Yes
A02E 1
Enemy enters the room from top
$00 No / $FF Yes
A02F 1
Max number of enemies to be destroyed when Destroy all enemies indicator active
A030 1
Destroy all enemies indicator
$00 Not destroy all - $01 Destroy all. Value $00 on init
A031 2
Address pointer into the enemy configuration buffer for the enemy to be destroyed when Destroy all enemies indicator is active
A033 1
Entity type
Used in routine B258
A034 2
Address for the graphic data of entity
Used in routine B258
A038 1
Initialised but never used
A039 2
Address pointer into attribute file/buffers for score points
A03B 1
Loop counter for score points
From 9 to 0
A03C 2
Score points value
A03E 2
Score - Value $0000 on init
Real score = score * 100
A040 1
Rapid shots active - Value $00 on init
$00 inactive - $01 active
A041 1
Number of rapid shots
A042 1
HUD flash index - Value $FF on init
$FF inactive. Otherwise the value is the index into the table for flash commands at 9AB3
A043 1
Counter for enemy enter the room (updated)
A044 1
Counter for enemy enter the room (original)
A045 1
Train is generating on current room. Used at routine A89D
$00 train not generating $01 Generating train
A046 2
Address into train definition buffer. Used at routine A89D
A048 1
Counter for train appearance. Used at routine A89D
A049 1
Shield power active - Value $00 on init
$00 not active $01 active
A04C 1
Shield power key hold down
Variable used to prevent activate and inactivate of shield if DOWN key is hold down
A04D 1
Shield power - Value $63 on init
A04E 1
Shield loss counter - Value $02 on init
Shield decrement when counter reaches zero
A04F 1
Machine gun weapon on inventory indicator
$00: Not available / $01: Available. Available on init
A050 1
Double Fire weapon on inventory indicator
$00: Not available / $01: Available. Not available on init
A051 1
Laser weapon on inventory indicator
$00: Not available / $01: Available. Not available on init
A052 1
Multiple weapon on inventory indicator
$00: Not available / $01: Available. Not available on init
A053 1
Spray weapon on inventory indicator
$00: Not available / $01: Available. Not available on init
A054 1
Projectile type of enemy
A055 1
Rex status - Value $00 on init
$00 Rex alive $01 Rex dead
A056 1
Rex explosion counter
A057 2
Address pointer into Rex explosion data buffer to compute explosion position
A059 1
x-position of last respawn saved - Value $A0 on init
A05A 1
y-position of last respawn saved - Value $60 on init
A05B 1
room number of last respawn saved - Value $00 on init
A05C 1
Room configured - Value $00 on init
$00 room not configured $01 room configured
A05D 1
Rex visibility
$00 invisible $01 visible
A05E 1
Number of lines of Rex to hide (used in teleporting animation)
A05F 1
Atoms flush during teleporting
$00 not atom flushing $01 atoms flushing
A060 1
Rex teleporting
$00 not teleporting $01 teleporting
A061 1
Teleporting counter
A062 1
Teleporting (begin game or dead)
$00 teleporting on game begin $01 teleporting after dead
A063 1
Number of lives
$04 on init
A064 1
Time bar update slot index - Value $00 on init
A065 1
Loop counter used for title screen main loop and time bar in HUD
Initialised with value $32 for title screen main loop Initialised with value $05 for time bar: number of zig-zag to remove a timer slot
A066 1
Time bar update direction - Value $00 on init
$00 right $01 left
A067 1
Number of time slots availables
Timer bar: 12 slots of time
A068 1
Laser duration - Value $00 on init
Used as well for index into laser template graphic table at B943
A069 1
Respawn indicator index value - Value $00 on init
A06A 1
Shield recharger index value - Value $00 on init
A06B 1
Respawn fire index value - Value $00 on init
A06C 1
Number of smartbombs in the inventory
3 smartbombs on init
A06E 1
Number of weapon that has energy
Every time that energy quantity in A018
A06F 1
Bonus windows number
(0-speed up 1-shield loss 2-1000 bonus 3-energy loss 4-100 rapid shots)
A071 1
Rex inmortal - Value $00 on init
$00 inmortal $01 mortal
A072 1
Rex speed - Value $00 on init
$00 normal speed - $01 fast speed
A073 1
Rex speed up duration - Value $00 on init
A076 2
Lives Score - Value $0000 on init
Every 100 points increment a lives. Reset on every live awarded
A07A 1
Rex on elevator
A07B 1
Actor firing indicator
$01 enemy fired weapon / $00 Rex fired weapon
A07C 1
Water effect index value - Value $00 on init
A07D 2
Bonus Windows Loop Counter
A07F 1
Animation frame number of the enemy showed in the tile screen
Value $00 on init
A081 2
Point address for animation definition of every enemy displayed in the tile screen
Used in routines E00B an E04F
A083 2
Point address for the base animation definition of the enemies displayed in the tile screen
Initialised with value of $E05B on init, although the base address of the table is $E067. Every animation definition spans $0C bytes and in the first the value $0C is added to the initial address. Used in routine 947A
A085 1
Enemy windows on tile screen visible or hidden
Hidden on init. $00 Hidden / $01 Visible
A086 2
Address pointer for the next windows data to show on tile screen
Value DC26 on init so initially this points to the FOOT MAN windows.
A088 1
Type of mobile enemy for the current room
A089 2
Humans killed - Value $0000 on init
A08B 2
Minimum score for the game - Value $000A on init
A08D 1
Room connection - right room number
Value copied from Room connections and enemy configuration pointer at B133
A08E 1
Room connection - top room number
Value copied from Room connections and enemy configuration pointer at B133
A08F 1
Room connection - bottom room number
Value copied from Room connections and enemy configuration pointer at B133
A090 1
Room connection - left room number
Value copied from Room connections and enemy configuration pointer at B133
A091 1
Speed of Rex - Value $00 on init
A092 1
Max number of enemies in the current room
Value copied from the corresponding Enemy room configuration at AECD
A093 2
Used in multiple routines as temporal variable
Used as: length of the current processing line for windows setup, color attribute for windows border, color attribute for text content of the windows, ... Used in routine A13E. As x-position of the tile at routine C745. As stack pointer at routine B205 and A28A. As destructible tile type and laser x-position at routine B645. As position into offset table for debris expansion at routine BF66
A095 2
Used in multiple routines as temporal variable
Used as: max length of the lines processed for windows setup, number of columns of the windows, horizontal position of the windows, ... Used in routine A13E. As tile number in C745. As stack pointer at routine R$B33E. As address into mapping table of tile graphics/room graphics and laser y-position at routine B645
A097 2
Used in multiple routines as temporal variable
Vertical position of the windows Used in routine A13E. As tile color attribute and laser direction at B645
A099 1
Used in multiple routines as temporal variable
Used as increment for laser y-position at routine B645
A09F 1
Color attribute for windows body
A0A1 2
Seed for pseudo-random number generator.
Value $0313 on init. Used at routines A375 and A388.
A0A3 1
Seed status variable
Value $11 on init
A0A4 7
Charcode buffer for number conversion
A0AB 2
Port used to read the key pressed
A0AD 1
Opcode of the corresponent BIT operation to check key presses
Is used to configure the routines at A46A to check for key presses of the defined keys
A0AE 1
Input device type
$FF Kempston | $00 Cursor, Sinclair or Defined keys. $00 on init. Not used in game
A0AF 1
X-position of entity
As x-pixel-position of entity in routine B258. As x-byte-position of debris in routine BF66
A0B0 1
Y-position of entity
As y-pixel-position of entity in routine B258. As y-pixel-position of debris in routine BF66
A0B1 1
Width of entity sprite (in bytes)
Used in routine B258
A0B2 1
Height of entity sprite (in pixels)
A0B3 1
Initialised in game, but not used
A0B6 1
Rex x-position (in pixels) - Value $A0 on init
A0B7 1
Rex y-position (in pixels) - Value $60 on init
A0B8 1
Current room number
Value $00 on init
A0B9 2
Pointer to the address mapping table of tile graphics data and room graphics buffer
A0BB 1
Rex facing direction ($00 right / $01 left) - Value $00 on init
A0BC 1
Rex falling speed - Value $00 on init
$00 not falling / otherwise falling speed ($02 or $04)
A0BD 1
Rex is jumping - Value $00 on init
A0C0 2
Address pointer into table for Rex jumping y-offsets
A0C2 1
List number of the room displayed on attract-mode
The list of rooms are stored into table at A90C. Value $00 on init
A0C3 1
Loop counter for run the displayed room on attract-mode
Value $C8 on init. Equals to 200 loops to run.
A1F1 6
Data buffer for the smartbomb icons in HUD
Used in routine A1DB
Bytes Meaning
0x00-0x01 Address pointer to sprite graphics data
0x02 Horitzontal position of sprite
0x03 Vertical position of sprite. Always $00
0x04 Width of sprite (in bytes). Always $02
0x05 Height of sprite (in pixels). Always $10
A233 6
Data buffer for the weapon icons in HUD
Used in routine A212
Bytes Meaning
0x00-0x01 Address pointer to sprite graphics data
0x02 Horitzontal position of sprite
0x03 Vertical position of sprite. Always $00
0x04 Width of sprite (in bytes). Always $02
0x05 Height of sprite (in pixels). Always $10
D832 24
Channel data buffer por playing sound
Byte Meaning
$00 number of tones
$01 variation counter
$02 - $03 Address pointer to sound data
$04 fine pitch / noise pitch
$05 coarse pitch
$06 Noise/tone 0 - Tone 1 - Noise
$07 Volume (bits 7-4 )
D855 1
Sound data mixer
D857 1
Channel volumne number (1-3)
D962 350
Mapping table for tile graphic and room graphic buffer
Contains two words for every tile drawn on screen. First word: address of the tile location into the room graphics buffer Second word: address of the tile graphics $FF is an end marker Tiles $00, $10, $71, $81 and $91 are special tiles, not drawn The routine C745 fill this table and the data overwrites the main loop routine for the title screen (DAC0) and subsequent routines
DD4E 5
Defined keys for Rex controls
Bytes Control
$00 Up
$01 Down
$02 Left
$03 Right
$04 Fire
E049 6
Data buffer for the enemy sprite on title screen
Data copied from the corresponding animation definition at E067
Bytes Meaning
0x00-0x01 Address pointer to sprite graphics data
0x02 Horitzontal position of sprite. Always $03
0x03 Vertical position of sprite. Always $10
0x04 Width of sprite (in bytes)
0x05 Height of sprite (in pixels)