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 perp_halt_counter | ||
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 | ||
Usually 1. Oscillates 0/1 when the road forks. Adjusts horizontal position of the untaken road.
|
||||
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) | |
perp_halt_counter | A173 | DEFB $00 | A counter decremented while slowing down the caught perp. This is set to 20 by #$87ED then decremented by 8BC6. | |
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 (byte) is $FF if this hazard is used, $00 otherwise
+1 (byte) is the low byte of the distance from 'camera'. increments when the perp is getting further away, decrements otherwise.
+2 (byte) is horizontal position
+3 (byte) TBD
+4 (byte) TBD
+5 (byte) is horizontal position
+6 (byte) TBD
+7 (byte) TBD used by hazard_hit, used in plotting
+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. but if it's the perp we seem to use it as a byte.
+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,coarse=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? | ||
dont_draw_screen_attrs | A220 | DEFB $00 | If this is non-zero then draw_screen_attributes won't run. | |
Affects collision detection on the left hand side.
|
||||
inhibit_collision_detection | A221 | DEFB $00 | ABCE, sub_ad0d reads | |
n_hazards | A222 | DEFB $00 | Seems to be a count of visible cars+hazards. | |
displayed_stage | A223 | DEFB $00 | Stage number as shown on the scoreboard. Stored as ASCII. | |
0 => no helicopter 1 => moves to left 2 => bobs around in the air 3/4 => moves from left 5 => bobs around in the air
|
||||
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, drive_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). | |
cherry_light | A228 | DEFB $00 | Shows the flashing cherry light on top of the car (0 => off, else on). | |
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 | |
car_y | A22A | DEFB $00 | Car Y offset. Used when the car pulls in after catching a perp. Used by draw_part 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. | |
hand_flag | A22F | DEFB $00 | Set to 1 by perp_sighted. This starts the anim where the cherry light is put on the roof. Set to 2 by fully_smashed. This shows the "stop" hand. | |
perp_caught_phase | 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. Inhibits car spawning. | |
transition_control | A231 | DEFB $00 | Transition/fade 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_level | 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 and helicopter blades. | |
counter_B | A235 | DEFB $00 | Cycles 0-1 as the game runs (used to 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_index | A237 | DEFB $00 | Current sound effect index | |
sfx_priority | A238 | DEFB $00 | Current sound effect priority | |
siren_enabled | A239 | DEFB $00 | Enables siren. Used by F265 [128K] | |
turbo_sfx_enabled | A23A | DEFB $00 | Copy of noise pitch. Used by F2F6 [128K] | |
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 cc_a3fa, 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_fork_set, cc_not_fork_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 url_read_road_height, 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] | |
on_dirt_track | A248 | DEFB $00 | Set to 1 when on dirt track. [choose_dirt_and_stones reads C457,dr_c526 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 lr_check_correct_fork_taken,BC2C writes] | |
speed | A24A | DEFW $0000 | Speed (0..511). Max when in low gear =~ $E6 (230), high gear =~ $168 (360), turbo =~ $1FF (511). In practice I see maximums of 188 / 295 / 419 (82% of original value...) | |
inclined | A24C | DEFB $00 | Counts 3/2/1/0 when the hero car is ascending or descending. mhc_speed_set reads mhc_set_inclined writes | |
cornering | A24D | DEFB $00 | Likely a cornering force flag. Used to trigger smoke. B3B4, B432 reads mhc_set_cornering, B314, ahc_crashed 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 => straight/turn/turn hard) ignoring direction | |
flip_car | A251 | DEFB $00 | 1 => Horizontally flip the hero car, 0 => Don't | |
gear_lockout | A252 | DEFB $00 | Locks out repeated gear changes. Counts down 3-2-1-0 | |
gear | A253 | DEFB $00 | 0 => Low gear, 1 => High gear | |
allow_spawning | A254 | DEFB $00 | If non-zero this permits cars, hazards and dust/stones to spawn. It can be 0, 1 or 2, depending on the hero car's speed. Returns to zero when the hero car is stopped. | |
distance_bcd | A255 | DEFB $00,$00 | Distance as BCD (2 bytes / 4 digits, little endian) | |
var_a257 | A257 | DEFB $00 | Unused | |
incline | A258 | DEFB $00 | Road incline $FF/$FE/$FD if the road is climbing, $00 if level, $01/$02/$03 if the road is descending | |
var_a259 | A259 | DEFB $00 | Used by B92B | |
var_a25a | A25A | DEFB $00 | Changes often? when the backdrop Y changes. (0/1/2?) | |
var_a25b | A25B | DEFB $00 | Changes often? when the backdrop Y changes. ($00/$55/$7F/$AA/?) | |
current_curvature | A25C | DEFB $00 | This holds the road curvature byte at the position of the hero car. -ve when curving left or +ve when curving right. $FA..$06 in multiples of two. | |
horizon_a25d | A25D | DEFB $00 | Seems to be added to the index for the horizon_table. Saw: 8/16/24. | |
horizon_a25e | A25E | DEFB $00 | Seems to cycle 4-3-2-1 / 3-2-1 / 2-1 when the roads are curving. Must be the horizon scroll/shift/roll value. | |
horizontal_adjust | A25F | DEFW $0000 | Repeatedly set to zero in mhc_straight_road. If altered this changes the car's position on the road. It's mainly zero but occasionally gets set to one. +ve shifts the hero car left, -ve shifts it right. | |
var_a261 | A261 | DEFB $00 | Used by B297 -- horizon scroll related e.g. 0 if no motion /$3F/$BD/$7F | |
var_a262 | A262 | DEFB $00 | Used by B284 -- horizon scroll related e.g. 0 if no motion /1/2/3 | |
right_turn | A263 | DEFB $00 | Right turning force (0..36) | |
left_turn | A264 | DEFB $00 | Left turning force (0..36) | |
fork_visible | A265 | DEFB $00 | Used by BC2C -- set to $60 when the forked road becomes visible, zero otherwise | |
fork_countdown | A266 | DEFB $00 | Used by A3A6 -- counts down (from 16?) when the forked road approaches, zero when the fork actually starts | |
fork_distance | A267 | DEFW $0000 | Counts 0..255 during road forks | |
fork_in_progress | A269 | DEFB $00 | Used by BC29. Set to 1 while the road forks. | |
quit_state | A26A | DEFB $00 | 0 if not quitting, or 1/2 depending on quit state | |
start_speech | A26B | DEFB $00 | Index of speech sample to play preceded by N zero bits and a one bit. | |
road_pos | A26C | DEFW $0000 | Road position of car. Left..Right = $1E2...$03A. ~$109 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 |