Address Length Description
5B60 450
Rex projectile configuration
Initialized at routine 9470
5D22 300
Enemy projectiles configuration for the current room
Initialized at routine 9470.
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 seed plant # Bit 7: subtype
0x0C For $07: Seed plant trajectory index - For $02: Number of laser type $06 to create
0x0D x-position for laser type $06
0x0E For projectile type $00 (laser): Laser duration counter - Destroy laser at $00
projectile type $07 (seed plant): Seed Plant index into address for trajectories at AA47
5E4E 24
Drones configuration for multiple weapon
Initialized at routine A793. 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 TRIANGLE movement
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
0x02 (DROP) - Drop state: $00 standing on ceil $01 hanging from ceil $02 free falling $03 impacting ground $04 on ground
0x03 (BRAIN) - Wound counter: $00 100% health
0x04 (PINE) - Movement direction: $00 Downwards $01 upwards
0x05 (PLANT) - PLANT state: $00 standing-by $01 opening $02 closing
0x09 (BULB) - State indicator $00 stand-by $01 expanding $02 retracting
0x0E (TRIANGLE) - State change counter
0xFE (BUBBLE) - Bubble duration counter
0x12 Enemy type:
0x00 (FOOTMAN): $00 walking - $01 crouched - $02 stand-by
0x02 (DROP) - State change counter
0x03 (BRAIN) - Recover counter
0x04 (PINE) - Animation state: $00 stand-by $02 expanding $03 retracting $04 holding
0x05 (PLANT) - State change counter
0x09 (BULB) - State change counter
0x0E (TRIANGLE) - Change movement direction: $00 no change $01 change direction
0xFE (BUBBLE) - MSB of address graphic data
0x13 0xFE (BUBBLE) LSB of address graphic data
0x04 (PINE) state change counter
0x14 Enemy health
0x15 Energy bubble $01 big / $00 small / $FF no bubble
0x16 - 0x17 Address pointer to graphic data for animated sprites
0x18 Teleporting status for FOOT MAN: $00 teleporting inactive $01 teleporting active
0x19 Teleporting index into table of mask teleporting data
0x1A Teleporting type: $00 Teleporting out of the room $01 teleporting into the room
5FE6 426
Stack (SP = $6190 at init game )
A0AD 75
Rex atoms data during teleporting
Three bytes for every atom. $00 y-delta $01 x-offset $02 y-position
A1AB 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
A1AC 1
Rex weapon in use
0-Basic Laser, 1-Double fire, 2-Laser, 3-Multiple, 4-Spray. Used to compute BOSS health
A1AD 1
Weapon energy level. Value on init $01
A1AE 2
Attribute file pointer to current weapon icon in HUD
A1B0 1
Tilt arrow tiles
$00 or $01 select distints graphic data
A1B1 1
Weapon energy quantity - Value $00 on init
Values from 0 to 120
A1B2 2
Address pointer into tile type buffer based on Rex position
A1B4 2
Address pointer into tile buffer of the tile under the entity
A1B6 1
Counter for tile drawn on room graphic buffer
A1B7 2
Pointer to the tile type buffer for the currently draw tile
A1B9 2
Addres pointer to static enemy definition for the current room
A1BB 6
Nou used
A1C1 1
Horizontal position for windows
A1C2 1
Vertical position for windows
A1C3 1
Length of the longest line for the windows
A1C4 1
Number of lines for the windows
A1C5 1
Enemy enters the room from left
$00 No / $FF Yes
A1C6 1
Enemy enters the room from right
$00 No / $FF Yes
A1C7 1
Enemy enters the room from top
$00 No / $FF Yes
A1C8 1
Max number of enemies to be destroyed when Destroy all enemies indicator active
A1C9 1
Destroy all enemies indicator
$00 Not destroy all - $01 Destroy all. Value $00 on init
A1CA 2
Address pointer into the enemy configuration buffer for the enemy to be destroyed when Destroy all enemies indicator is active
A1CC 1
Entity type
Used in routine B258
A1CD 2
Address for the graphic data of entity
Used in routine B258
A1D1 1
Initialized but never used
A1D2 2
Address pointer into attribute file/buffers for score points
A1D4 1
Loop counter for score points
From 9 to 0
A1D5 2
Score points value
A1D7 2
Score - Value $0000 on init
Real score = score * 100
A1D9 1
Rapid shots active - Value $00 on init
$00 inactive - $01 active
A1DA 1
Number of rapid shots
A1DB 1
HUD flash index - Value $FF on init
$FF inactive. Otherwise the value is the index into the table for flash commands at 99D1
A1DC 1
Counter for enemy enter the room (updated)
A1DD 1
Counter for enemy enter the room (original)
A1DE 1
Train is generating on current room. Used at routine C9E3
$00 train not generating $01 Generating train. Always $00 in Rex (Side B)
A1DF 2
Address into train definition buffer. Used at routine C9E3
Really not used because there are no trains in Rex (Side B)
A1E1 1
Counter for train appearance. Used at routine C9E3
Really not used because there are no trains in Rex (Side B)
A1E2 1
Shield power active - Value $00 on init
$00 not active $01 active
A1E5 1
Shield power key hold down
Variable used to prevent activate and inactivate of shield if DOWN key is hold down
A1E6 1
Shield power - Value $63 on init
A1E7 1
Shield loss counter - Value $02 on init
Shield decrement when counter reaches zero
A1E8 1
Machine gun weapon on inventory indicator
$00: Not available / $01: Available. Available on init
A1E9 1
Double Fire weapon on inventory indicator
$00: Not available / $01: Available. Not available on init
A1EA 1
Laser weapon on inventory indicator
$00: Not available / $01: Available. Not available on init
A1EB 1
Multiple weapon on inventory indicator
$00: Not available / $01: Available. Not available on init
A1EC 1
Spray weapon on inventory indicator
$00: Not available / $01: Available. Not available on init
A1ED 1
Projectile type of enemy
A1EE 1
Rex status - Value $00 on init
$00 Rex alive $01 Rex dead
A1EF 1
Rex explosion counter
A1F0 2
Address pointer into Rex explosion data buffer to compute explosion position
A1F2 1
x-position of last respawn saved - Value $A0 on init
A1F3 1
y-position of last respawn saved - Value $60 on init
A1F4 1
room number of last respawn saved - Value $00 on init
A1F5 1
Room configured - Value $00 on init
$00 room not configured $01 room configured
A1F6 1
Rex visibility
$00 invisible $01 visible
A1F7 1
Number of lines of Rex to hide (used in teleporting animation)
A1F8 1
Atoms flush during teleporting
$00 not atom flushing $01 atoms flushing
A1F9 1
Rex teleporting
$00 not teleporting $01 teleporting
A1FA 1
Teleporting counter
A1FB 1
Teleporting (begin game or dead)
$00 teleporting on game begin $01 teleporting after dead
A1FC 1
Number of lives
$04 on init
A1FD 1
Time bar update slot index - Value $00 on init
A1FE 1
Loop counter used for time bar in HUD
Initialized with value $05 for time bar: number of zig-zag to remove a timer slot
A1FF 1
Time bar update direction - Value $00 on init
$00 right $01 left
A200 1
Number of time slots availables
Timer bar: 12 slots of time
A201 1
Laser duration - Value $00 on init
Used as well for index into laser template graphic table at B9BE
A202 1
Respawn indicator index value - Value $00 on init
A203 1
Shield recharger index value - Value $00 on init
A204 1
Initialized but never used
A205 1
Number of smartbombs in the inventory
3 smartbombs on init
A207 1
Number of weapon that has energy
Every time that energy quantity in A018
A208 1
Bonus windows number
(0-speed up 1-shield loss 2-1000 bonus 3-energy loss 4-100 rapid shots)
A20A 1
Rex inmortal - Value $00 on init
$00 inmortal $01 mortal
A20B 1
Rex speed - Value $00 on init
$00 normal speed - $01 fast speed
A20C 1
Rex speed up duration - Value $00 on init
A20F 2
Lives Score - Value $0000 on init
Every 100 points increment a lives. Reset on every live awarded
A213 1
Rex on elevator
A214 1
Actor firing indicator
$01 enemy fired weapon / $00 Rex fired weapon
A215 1
Initialized but never used
A216 2
Bonus Windows Loop Counter
A221 1
Type of mobile enemy for the current room
A222 2
Bio Growths killed - Value $0000 on init
A224 2
Minimum score for the game - Value $000A on init
A226 1
Room connection - right room number
Value copied from Room connections and enemy configuration pointer at B1A7
A227 1
Room connection - top room number
Value copied from Room connections and enemy configuration pointer at B1A7
A228 1
Room connection - bottom room number
Value copied from Room connections and enemy configuration pointer at B1A7
A229 1
Room connection - left room number
Value copied from Room connections and enemy configuration pointer at B1A7
A22A 1
Speed of Rex - Value $00 on init
A22B 1
Max number of enemies in the current room
Value copied from the corresponding Enemy room configuration at AFC2
A22C 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, ...
A22E 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, ...
A230 2
Used in multiple routines as temporal variable
Vertical position of the windows. As tile color attribute and laser direction
A232 1
Used in multiple routines as temporal variable
Used as increment for laser y-position
A236 1
Charcode for the digit introduced in password code
A238 2
Multiple uses
As Color attribute for windows body (MSB) As Pointer to the address for the current input digit for the password
A23A 2
Seed for pseudo-random number generator.
Value $0313 on init. Used at routine A51D.
A23C 1
Seed status variable
Value $11 on init
A23D 7
Charcode buffer for number conversion
A244 2
Port used to read the key pressed
A246 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
A247 1
Input device type
$FF Kempston | $00 Cursor, Sinclair or Defined keys. $00 on init. Not used in game
A248 1
X-position of entity
As x-pixel-position of entity. As x-byte-position of debris
A249 1
Y-position of entity
As y-pixel-position of entity . As y-pixel-position of debris
A24A 1
Width of entity sprite (in bytes)
A24B 1
Height of entity sprite (in pixels)
A24C 1
Initialized in game, but not used
A24F 1
Rex x-position (in pixels) - Value $A0 on init
A250 1
Rex y-position (in pixels) - Value $60 on init
A251 1
Current room number
Value $00 on init
A252 2
Pointer to the address mapping table of tile graphics data and room graphics buffer
A254 1
Rex facing direction ($00 right / $01 left) - Value $00 on init
A255 1
Rex falling speed - Value $00 on init
$00 not falling / otherwise falling speed ($02 or $04)
A256 1
Rex is jumping - Value $00 on init
A259 2
Address pointer into table for Rex jumping y-offsets
A25B 1
List number of the room displayed on attract-mode
The list of rooms are stored into table at A986. Value $00 on init
A25C 1
Loop counter for run the displayed room on attract-mode
Value $C8 on init. Equals to 200 loops to run.
A25D 1
Tile type found checking the list of tile types (background or wall)
A25E 2
Address for the graphic data of entity to draw
A260 1
Number of digits entered in password
A261 2
Checksum code for password
A263 2
Score (LSB) and humans killed (MSB) from Rex (Side A)
A265 1
Shield power from Rex (Side A)
A266 1
Smartbombs from Rex (Side A)
A267 1
Number of lives from Rex (Side A)
A268 1
FINAL BOSS live status
$00 FINAL BOSS alive $01 FINAL BOSS dead
A269 1
FINAL BOSS explosion counter
A26A 2
FINAL BOSS addres pointer to table offset for compute explosions position
A399 6
Data buffer for the smartbomb icons in HUD
Used in routine A383
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
A3DB 6
Data buffer for the weapon icons in HUD
Used in routine A3BA
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
D5CA 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 )
D5ED 1
Sound data mixer
D5EF 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, $01, $10, $81, $95, $96, $C6 and $D6 are special tiles, not drawn. The routine C7AE fill this table and the data overwrites the main loop routine for the title screen (DAC0) and subsequent routines
DE13 5
Defined keys for Rex controls
Bytes Control
$00 Up
$01 Down
$02 Left
$03 Right
$04 Fire
E0CC 211
Tile count buffer (partial)
Initialized in routine C7AE but never used. Tile count buffer spans from $DE9F to $E19E
E1FF 672
Tile type buffer
Initialized at routine C7AE.