| Chase H.Q. | Routines |
| Prev: FE7F | Up: Map | Next: FF0C |
|
Prints the title/prompt text and the 8 control-name labels (FC29: gear, accelerate, brake, left, right, quit, pause, turbo) via print_string, then for each of the 8 controls in turn (BC=$0801 at FEBE) waits for a fresh keypress (read_new_key_definition) and stores the chosen key, redrawing its name on screen.
Hidden test-mode unlock ($FEE2-$FEF1): compares the 8 keys just chosen against a fixed 8-byte reference sequence at $FFEF (in the same scan-key-code encoding documented at read_new_key_definition). Decoding those 8 bytes through that encoding spells S, H, O, C, K, E, D, ENTER -- i.e. this is a hidden cheat code: redefining the 8 controls to spell "SHOCKED" followed by ENTER. On any mismatch the loop's RET NZ returns immediately (the ordinary case -- the new key mapping is simply kept and control returns to the caller, options_menu_driver). On an exact match it falls through, sets the test-mode/cheat flag at $8000 (see 84C2 in the main skool), shows a "TEST ... CHASE H.Q. TEST MODE" confirmation ($FCF0 text) and waits for fire, then loops back to $FEA9 to redisplay the redefine-keys screen (there is no path back to the caller once the secret code has been entered other than through this routine itself).
Used by the routine at options_menu_driver.
|
||||
| redefine_keys_screen | FEA9 | CALL clear_options_screen | ||
| FEAC | LD HL,$FC9B | |||
| FEAF | CALL print_string | |||
| FEB2 | CALL run_title_tune | |||
| FEB5 | LD HL,$FCC9 | |||
| FEB8 | CALL print_string | |||
| FEBB | LD DE,$48D6 | |||
| FEBE | LD BC,$0801 | |||
| redefine_keys_screen_0 | FEC1 | PUSH HL | ||
| FEC2 | PUSH DE | |||
| FEC3 | PUSH BC | |||
| FEC4 | CALL run_title_tune | |||
| FEC7 | POP BC | |||
| FEC8 | POP DE | |||
| FEC9 | POP HL | |||
| FECA | XOR A | |||
| FECB | IN A,($FE) | |||
| FECD | CPL | |||
| FECE | AND $1F | |||
| FED0 | JR NZ,redefine_keys_screen_0 | |||
| FED2 | CALL read_new_key_definition | |||
| FED5 | INC C | |||
| FED6 | INC HL | |||
| FED7 | DJNZ redefine_keys_screen_0 | |||
| FED9 | LD B,$14 | |||
| redefine_keys_screen_1 | FEDB | PUSH BC | ||
| FEDC | CALL run_title_tune | |||
| FEDF | POP BC | |||
| FEE0 | DJNZ redefine_keys_screen_1 | |||
| FEE2 | LD B,$08 | "SHOCKED"+ENTER secret-code check (see block header) | ||
| FEE4 | LD DE,$FFEF | DE -> fixed reference key sequence | ||
| FEE7 | LD HL,$FFF7 | HL -> the 8 keys just chosen | ||
| redefine_keys_screen_2 | FEEA | LD A,(DE) | ||
| FEEB | CP (HL) | |||
| FEEC | INC HL | |||
| FEED | INC DE | |||
| FEEE | RET NZ | Mismatch -> ordinary case, return to caller | ||
| FEEF | DJNZ redefine_keys_screen_2 | |||
| FEF1 | LD A,$01 | All 8 matched -> enable test mode | ||
| FEF3 | LD ($8000),A | |||
| FEF6 | CALL clear_options_screen | |||
| FEF9 | LD HL,$FCF0 | |||
| FEFC | CALL print_string | |||
| redefine_keys_screen_3 | FEFF | CALL run_title_tune | ||
| FF02 | XOR A | |||
| FF03 | IN A,($FE) | |||
| FF05 | CPL | |||
| FF06 | AND $1F | |||
| FF08 | JR Z,redefine_keys_screen_3 | |||
| FF0A | JR redefine_keys_screen | |||
| Prev: FE7F | Up: Map | Next: FF0C |