Chase H.Q. | Game status buffer |
Prev: A0CC | Up: Map | Next: A27A |
|
||||
mode_128k | A139 | DEFB $00 | 0/1 => 48K/128K mode | |
current_stage_number | A13A | DEFB $01 | Current stage number | |
start_speech_cycle | A13B | DEFB $04 | Used by 8424 -- seems to start at 4 then cycle 3/2/1 with each restart of the game, another random factor? | |
overtake_bonus | A13C | DEFB $00 | Overtake combo bonus counter. BCD. This increases by 2 for each overtake and is reset on a crash. | |
credits | A13D | DEFB $00 | Number of credits remaining (2 for a new game) | |
Data copied to $A16D+.
|
||||
saved_game_state | A13E | DEFB $01 | Copied to var_a16d | |
A13F | DEFB $64 | Copied to idle_timer | ||
A140 | DEFB $FF | Copied to user_input_mask | ||
A141 | DEFB $03 | Copied to turbos | ||
A142 | DEFW $0054 | Copied to horizon_level | ||
A144 | DEFB $14 | Copied to var_A173 | ||
A145 | DEFB $FF | Copied to displayed_gear | ||
A146 | DEFB $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF | Copied to score_digits | ||
A14E | DEFB $0F | Copied to time_sixteenths | ||
A14F | DEFB $60 | Copied to time_digits | ||
A150 | DEFB $FF | |||
A151 | DEFB $FF,$FF,$FF,$FF | Copied to distance_digits | ||
A155 | DEFB $FF | |||
A156 | DEFB $01 | Copied to no_objects_counter | ||
A157 | DEFW $59BF | Copied to horizon_attribute | ||
A159 | DEFB $00 | Copied to hazards[0].0 | ||
A15A | DEFB $64 | Copied to hazards[0].1 | ||
A15B | DEFB $00 | Copied to hazards[0].2 | ||
A15C | DEFB $00 | Copied to hazards[0].3 | ||
A15D | DEFB $00 | Copied to hazards[0].4 | ||
A15E | DEFB $47 | Copied to hazards[0].5 | ||
A15F | DEFB $00 | Copied to hazards[0].6 | ||
A160 | DEFB $00 | Copied to hazards[0].7 | ||
A161 | DEFB $2C | Copied to hazards[0].8 | ||
A162 | DEFW $0000 | Copied to hazards[0].9 (car LOD) | ||
A164 | DEFW smash_handler | Copied to hazards[0].11 (== smash_handler) | ||
A166 | DEFW $003C | Copied to hazards[0].13 (horz pos) | ||
A168 | DEFB $FF | Copied to hazards[0].15 | ||
A169 | DEFB $00 | Copied to hazards[0].16 | ||
A16A | DEFB $03 | Copied to hazards[0].17 | ||
A16B | DEFB $02 | Copied to hazards[0].18 | ||
A16C | DEFB $00 | Copied to hazards[0].19 | ||
var_a16d | A16D | DEFB $00 | Used by BC36 | |
idle_timer | A16E | DEFB $00 | Idle timer. Counts down from 100. Recommences whenever the hero car is stopped. When it hits zero Raymond will say "LET'S GET MOVIN' MAN!" and it will be reset to 100. | |
user_input_mask | A16F | DEFB $00 | User input mask, set to $C0 (Quit+Pause) when perp is fully smashed, or $FF otherwise | |
turbos | A170 | DEFB $00 | Number of turbo boosts remaining (3 for a new game) | |
horizon_level | A171 | DEFW $0000 | seems to be the horizon level, possibly relative (used during attract mode) | |
var_A173 | A173 | DEFB $00 | This is decremented by 8BC6 but nothing else seems to read it. | |
displayed_gear | A174 | DEFB $00 | Low/high gear flag. | |
score_digits | A175 | DEFB $00,$00,$00,$00,$00,$00,$00,$00 | Score digits. One digit per byte, least significant first. This seems to be recording what's on screen so digit plotting can be bypassed. | |
time_sixteenths | A17D | DEFB $00 | Seems to be a 1/16ths second counter. Counts from $F to $0. time_bcd is decremented when it hits zero. | |
time_bcd | A17E | DEFB $00 | Time remaining. Stored as BCD. | |
time_digits | A17F | DEFB $00,$00 | Time remaining as displayed. Stored as one digit per byte. | |
distance_digits | A181 | DEFB $00,$00,$00,$00 | Distance as displayed. Stored as one digit per byte. | |
no_objects_counter | A185 | DEFB $00 | If set causes no objects or hazards to be emitted. | |
horizon_attribute | A186 | DEFW $0000 | Attribute address of horizon. Points to last attribute on the line which shows the ground. (e.g. $59DF) | |
Table of spawned vehicles and/or objects
Each entry is 20 bytes long. The first entry is the perp.
Hazard structure layout:
+0 is $FF if this hazard is used, $00 otherwise
+1 looks distance related
+2 TBD
+3 TBD
+4 TBD
+5 TBD
+6 TBD
+7 byte TBD used by hazard_hit
+8 byte gets copied from the hazards table
+9 word address of LOD
+11 word address of routine
+13 word horizontal position, e.g. $190
+15 byte TBD used by hazard_hit, counter which gets set to 2 then reduced
+16 byte TBD
+17 byte TBD used by hazard_hit, indexes table table_acdb
+18 byte TBD used by hazard_hit
+19 byte TBD used by hazard_hit
|
||||
hazard_0 | A188 | DEFS $14 | ||
hazard_1 | A19C | DEFS $14 | ||
hazard_2 | A1B0 | DEFS $14 | ||
hazard_3 | A1C4 | DEFS $14 | ||
hazard_4 | A1D8 | DEFS $14 | ||
hazard_5 | A1EC | DEFS $14 | ||
Unknown - not enough space for another hazard
|
||||
A200 | DEFS $13 | |||
AY registers 0..11 [128K]
|
||||
ay_chan_a_pitch | A213 | DEFW $0000 | 0,1: Channel A pitch (fine,course=lo,hi) | |
ay_chan_b_pitch | A215 | DEFW $0000 | 2,3: Channel B pitch | |
ay_chan_c_pitch | A217 | DEFW $0000 | 4,5: Channel C pitch - used for engine tone? | |
ay_noise_pitch | A219 | DEFB $00 | 6: Noise pitch | |
ay_mixer | A21A | DEFB $00 | 7: Mixer | |
ay_chan_a_vol | A21B | DEFB $00 | 8: Channel A volume | |
ay_chan_b_vol | A21C | DEFB $00 | 9: Channel B volume | |
ay_chan_c_vol | A21D | DEFB $00 | 10: Channel C volume | |
ay_env_fine | A21E | DEFB $00 | 11: Envelope fine duration | |
End of AY registers
|
||||
A21F | DEFB $00 | Unused? | ||
var_a220 | A220 | DEFB $00 | load_stage sets this to the level number that it's going to load [but I don't see it using it again]. run_pregame_screen sets it to $F8. draw_screen uses it to avoid some work. | |
Affects collision detection on the left hand side.
|
||||
inhibit_collision_detection | A221 | DEFB $00 | ABCE, sub_ad0d reads | |
var_a222 | A222 | DEFB $00 | 8F9A reads draw_hazards, AE83, AF41 writes | |
displayed_stage | A223 | DEFB $00 | Stage number as shown on the scoreboard. Stored as ASCII. | |
helicopter_control | A224 | DEFB $00 | Set to 1 -> helicopter moves out to the left, gets set to zero. Set to 3/4 -> Helicopter moves in from left, gets set to five. move_helicopter, helicopter reads AB96, C013 writes | |
stop_car_spawning | A225 | DEFB $00 | Inhibits cars from spawning. | |
correct_fork | A226 | DEFB $00 | Holds the correct direction to take at forks (1 => left, 2 => right). | |
floating_arrow | A227 | DEFB $00 | Shows the floating left/right arrow (0 => off, 1 => left, 2 => right). | |
var_a228 | A228 | DEFB $00 | B421 reads B4C8 writes | |
time_up_state | A229 | DEFB $00 | 1 => out of time, 2 => "TIME UP" message is printed; 3 => "CONTINUE THIS MISSION" message is printed and a countdown runs 4 => countdown elapsed; 0 otherwise | |
var_a22a | A22A | DEFB $00 | Used by sub_b67c_3 and others | |
allow_overtake_bonus | A22B | DEFB $00 | Enables overtake bonus. Used by calc_overtake_bonus and others. | |
trigger_bonus_flag | A22C | DEFB $00 | Bonus flag (1 triggers the effect) | |
bonus_counter | A22D | DEFB $00 | Counter for bonus flash effect (counts 8..0) | |
sighted_flag | A22E | DEFB $00 | Set to 1 when the perp has been sighted. Enables flashing lights and the smash bar. | |
var_a22f | A22F | DEFB $00 | Set to 2 by fully_smashed | |
perp_caught_stage | A230 | DEFB $00 | Set to > 0 by fully_smashed when the perp has been caught. handle_perp_caught progresses this through stages 1..6 until the cars are slowed to a halt and the bonuses are printed. Used by draw_screen. Seems to inhibit car spawning too. | |
transition_control | A231 | DEFB $00 | Transition control/counter. Set to zero when fill_attributes has run. Set to 4 while transitioning. Also 2 sometimes. Set to 1 when the perp has been caught and we're drawing mugshots. | |
smash_factor | A232 | DEFB $00 | Set to 0..6 if (0..3, 4..6, 7..10, 11..13, 14..16, 17+) smashes | |
smash_counter | A233 | DEFB $00 | Smash counter (0..20) | |
counter_A | A234 | DEFB $00 | Cycles 0-1-2-3 as the game runs (used to animate turbo smoke CHECK) | |
counter_B | A235 | DEFB $00 | Cycles 0-1 as the game runs (used to toggle flash the red/blue lights) | |
counter_C | A236 | DEFB $00 | Cycles 0-1-2-3 as the game runs - at half rate | |
These seem to get altered even when no sound is being produced.
|
||||
sfx_0 | A237 | DEFB $00 | Used by start_sfx | |
sfx_1 | A238 | DEFB $00 | Used by start_sfx | |
var_a239 | A239 | DEFB $00 | Used by F265 [128K] Siren related. | |
var_a23a | A23A | DEFB $00 | Used by F2F6 [128K] Copy of noise pitch. | |
tunnel_sfx | A23B | DEFB $00 | Set to 5 when we're in a tunnel. Used to modulate sfx. | |
var_a23c | A23C | DEFB $00 | 8909, BE28 reads check_collisions_2, BDFF, BE2C writes | |
var_a23d | A23D | DEFB $00 | BE33 reads 890F, A3D2, BDFC, BE37 writes | |
off_road | A23E | DEFB $00 | 0 => Fully on-road, 1 => One wheel off-road, 2 => Both wheels off-road [samples: B104, B40C reads cc_split_set, cc_not_split_set, B07D, B322, B404, B443 writes] | |
fast_counter | A23F | DEFB $00 | This is a very fast counter related to level position. Typically the top three bits are masked off and used to index other tables. | |
road_buffer_offset | A240 | DEFW $0000 | Current offset (in bytes) into the road buffer at $EE00..$EEFF. Much of the code treats this as a byte. Used by sub_b8d2_2, BBF7, 87E0. | |
curvature_byte | A242 | DEFB $00 | Current curvature byte (minus 16) [BE3E reads BC17,rm_save_curvature_byte writes] | |
height_byte | A243 | DEFB $00 | Current height byte (minus 16) [BE90 reads BC1A,rm_save_height_byte writes] | |
leftside_byte | A244 | DEFB $00 | [BF9E reads BC1D,rm_leftside_count_resume writes] | |
rightside_byte | A245 | DEFB $00 | Current rightside byte [rm_rightside reads BC20,rm_rightside_count_resume writes] | |
hazards_byte | A246 | DEFB $00 | Current hazards byte (minus one) [BFE7 reads BC23,rm_no_hazards writes] | |
lanes_counter_byte | A247 | DEFB $00 | [BEDB reads BC26,BF15,rm_lanes_count_resume writes] | |
var_a248 | A248 | DEFB $00 | [main_loop_18 reads C457,main_loop_13_8 writes] | |
fork_taken | A249 | DEFB $00 | Set to 0 if no fork, or the left fork was taken, or 1 if the right fork was taken. [$A539,$B988,$BAE0,$BB6E reads main_loop_12_5,BC2C writes] | |
speed | A24A | DEFW $0000 | Speed (0..511). Max when in lo gear =~ $E6, hi gear =~ $168, turbo =~ $1FF. | |
var_a24c | A24C | DEFB $00 | move_hero_car_14 reads move_hero_car_17 writes | |
cornering | A24D | DEFB $00 | Likely a cornering force flag. Used to trigger smoke. B3B4, B432 reads move_hero_car_38, B314, B32A writes | |
boost | A24E | DEFB $00 | Turbo boost time remaining (60..0) | |
smoke | A24F | DEFB $00 | Smoke time remaining. This is set to 4 on low-to-high gear changes and to 3 when the hero car lands after a jump. This isn't set for turbo boosts however. | |
turn_speed | A250 | DEFB $00 | Turn speed (0/1/2) ignoring direction | |
flip | A251 | DEFB $00 | 1 => Horizontally flip the hero car, 0 => Don't | |
var_a252 | A252 | DEFB $00 | ||
gear | A253 | DEFB $00 | 0 => Low gear, 1 => High gear | |
another_spawning_flag | A254 | DEFB $00 | Cleared by 884B suspected spawning flag (different to flag stop_car_spawning) | |
distance_bcd | A255 | DEFB $00,$00 | Distance as BCD (2 bytes / 4 digits, little endian) | |
var_a257 | A257 | DEFB $00 | Unused | |
var_a258 | A258 | DEFB $00 | Used by B8D8 | |
var_a259 | A259 | DEFB $00 | Used by B92B | |
var_a25a | A25A | DEFB $00 | Used by sub_b8d2 | |
var_a25b | A25B | DEFB $00 | ||
Horizon horizontal scrolling (+ve for left, -ve for right). Seems to be multiples of two. Values seen: FA FC FE 00 02 04 06
|
||||
horizon_scroll | A25C | DEFB $00 | Used by B84E | |
var_a25d | A25D | DEFB $00 | Used by B85D | |
var_a25e | A25E | DEFB $00 | ||
var_a25f | A25F | DEFW $0000 | Used by move_hero_car_32 | |
var_a261 | A261 | DEFB $00 | Used by B297 | |
var_a262 | A262 | DEFB $00 | ||
var_a263 | A263 | DEFB $00 | Used by B2AE | |
var_a264 | A264 | DEFB $00 | Used by B2B2 -- together might be a 16-bit qty | |
split_road | A265 | DEFB $00 | Used by BC2C -- set to $60 when the split road becomes visible, zero otherwise | |
split_road_countdown | A266 | DEFB $00 | Used by A3A6 -- counts down (from 16?) when the split road approaches, zero when the split actually starts | |
var_a267 | A267 | DEFW $0000 | Used by BC39 -- as 16-bit. Part used by road_handling_setup - skips routine if not set | |
var_a269 | A269 | DEFB $00 | Used by BC29 | |
quit_state | A26A | DEFB $00 | 0 if not quitting, or 1/2 depending on quit state | |
start_speech | A26B | DEFB $00 | Used by 8432 - index of speech sample to play | |
road_pos | A26C | DEFW $0000 | Road position of car. Left..Right = $1E2...$03A, $105 is centre. | |
road_curvature_ptr | A26E | DEFW $0000 | Address of the previous curvature data byte | |
road_height_ptr | A270 | DEFW $0000 | Address of the previous height data byte | |
road_lanes_ptr | A272 | DEFW $0000 | Address of the previous lane data byte | |
road_rightside_ptr | A274 | DEFW $0000 | Address of the previous right object data byte | |
road_leftside_ptr | A276 | DEFW $0000 | Address of the previous left object data byte | |
road_hazard_ptr | A278 | DEFW $0000 | Address of the previous hazard object data byte |
Prev: A0CC | Up: Map | Next: A27A |