| Chase H.Q. | Routines |
| Prev: F414 | Up: Map | Next: F491 |
|
Lives at $820F when relocated.
Runs the bouncy logo in bank 3, sets up the attract stage, then loops a frame at a time over drive_attract_demo and transition. Each frame flashes either "ENTER FOR OPTIONS" or "PRESS GEAR" -- whichever depends on whether the controls have been chosen yet -- four frames on and four off, driven by the rotating byte at F457. ENTER re-enters bank 3 at the input selection menu; FIRE leaves for play_start_noise and the game.
A countdown in the operand at F469 paces the overlays. It starts at 2 and drops by one each time transition_control falls back to zero: 1 shows the credits at F4B9, 0 shows the best officers table at $F51B, and -1 starts a forward transition -- after which the next pass restarts the whole sequence from the bouncy logo.
|
||||
| attract_mode_128k | F41B | LD HL,$C000 | Entry point for title animations | |
| attract_mode_128k_0 | F41E | CALL $81AA | Call relocated call_bank_3_128k | |
| F421 | AND A | Return if A is zero | ||
| F422 | RET Z | |||
| F423 | LD HL,$5D2B | HL -> attract_data | ||
| F426 | CALL set_up_stage | Call set_up_stage | ||
| F429 | LD A,$02 | Set the overlay countdown at F469 to 2 | ||
| F42B | LD ($825E),A | |||
| F42E | LD HL,$0190 | Set speed to $190 | ||
| F431 | LD ($A24A),HL | |||
| am1_loop | F434 | CALL drive_attract_demo | Call drive_attract_demo | |
| F437 | LD A,($8001) | Load controls_selected | ||
| F43A | AND A | Set flags | ||
| F43B | LD DE,$8296 | -> enter_for_options_messages | ||
| F43E | JR Z,am1_check_enter | Jump to f44b_key_check | ||
| F440 | CALL keyscan | Call keyscan | ||
| F443 | AND $10 | Was FIRE pressed? | ||
| F445 | JP NZ,play_start_noise | Jump to play_start_noise if so | ||
| F448 | LD DE,$8285 | -> press_gear_messages | ||
| am1_check_enter | F44B | LD A,$BF | Read keyboard port $BFFE: ENTER, L, K, J, H | |
| F44D | IN A,($FE) | |||
| F44F | CPL | Complement value so it's active-high | ||
| F450 | RRA | Shift ENTER's flag out to carry | ||
| F451 | LD HL,$C009 | Load entry point for keyboard/joystick selection menu | ||
| F454 | JR C,attract_mode_128k_0 | Jump if ENTER was pressed | ||
| F456 | EX DE,HL | HL -> messages | ||
| F457 | LD A,$F0 | Rotate the blink pattern and self modify F457 with it -- $F0 gives four frames on, four off | ||
| F459 | RRCA | |||
| F45A | LD ($824C),A | |||
| F45D | JR NC,f463_128k | Skip the message on the blank half of the blink | ||
| F45F | LD A,(HL) | |||
| F460 | CALL print_message | Call print_message | ||
| f463_128k | F463 | LD A,($A231) | If transition_control != 0 jump | |
| F466 | AND A | |||
| F467 | JR NZ,f488_128k | |||
| F469 | LD A,$00 | Overlay countdown. Self modified by F42B above and F470 below | ||
| F46B | AND A | Set flags | ||
| F46C | JP M,$820F | Restart attract mode once the countdown has gone negative | ||
| F46F | DEC A | A-- | ||
| F470 | LD ($825E),A | Self modify F469 above | ||
| F473 | JP P,attract_mode_48k_1 | Jump to f47d_128k while the countdown is not negative | ||
| F476 | LD A,$08 | Forward transition | ||
| F478 | CALL setup_transition | Call setup_transition | ||
| F47B | JR f488_128k | Jump to f488_128k | ||
| f47d_128k | F47D | LD HL,$82AD | -> credits messages at F4B9 | |
| F480 | JR NZ,f485_128k | Jump to f485_128k unless the countdown reached zero | ||
| F482 | LD HL,$830F | -> best officers table at $F51B | ||
| f485_128k | F485 | CALL setup_overlay_messages | Call setup_overlay_messages | |
| f488_128k | F488 | CALL transition | Call transition | |
| F48B | CALL send_playfield | Call send_playfield | ||
| F48E | JP $8228 | Loop to attract_mode_128k_loop | ||
| Prev: F414 | Up: Map | Next: F491 |