| Chase H.Q. | Routines |
| Prev: FA72 | Up: Map | Next: FBC8 |
|
Reached from the title screen's "PRESS ENTER FOR OPTIONS" prompt (see the text block at CC50). Boots interrupts and tune 0, then loops: draws the control-select screen text (FC29 via print_string -- "ENTER OPTION" / P1. SINCLAIR JOYSTICK / P2. CURSOR JOYSTICK / P3. KEMPSTON JOYSTICK / P4. KEYBOARD / P5. DEFINE KEYS) and polls the keyboard (port $FE, keys 1-5 read as a 5-bit mask) to dispatch into one of the five listed choices.
Keys are read from half-row $F7FE (keys "1"-"5"), which is exactly the "P1"-"P5" option-select row shown by the FC29 "ENTER OPTION" text. FBB2-$FBB3 inverts and masks to a 5-bit "pressed" mask (bit 0 = key "1" .. bit 4 = key "5"); no key pressed loops back to poll again. FBB7-$FBC1 then shifts that mask right one bit at a time via RRA, testing each bit's carry in turn: key "1" -> run_title_tune_0 (Sinclair joystick, control-key list A), "2" -> run_title_tune_1 (Cursor joystick, list B, shares the copy loop at run_title_tune_2), "3" -> detect_kempston_joystick (Kempston joystick detect), "4" -> run_title_tune_3 (keyboard, handled inline). Key "5" falls through the whole RRA chain unbranched, so it is the default action: redefine_keys_screen, the "DEFINE KEYS" key-redefinition screen.
Used by the routine at C000.
|
||||
| options_menu_driver | FB99 | CALL setup_im2_interrupt_table | ||
| FB9C | XOR A | |||
| FB9D | CALL titlescr_start_tune | |||
| FBA0 | EI | |||
| FBA1 | HALT | |||
|
This entry point is used by the routine at run_title_screen.
|
||||
| omd_redraw_and_poll | FBA2 | CALL clear_options_screen | ||
| FBA5 | LD HL,$FC29 | |||
| FBA8 | CALL print_string | |||
|
This entry point is used by the routine at detect_kempston_joystick.
|
||||
| omd_service_and_read_keys | FBAB | CALL run_title_tune | Service sound/music while polling | |
| FBAE | LD A,$F7 | Read keyboard half-row $F7FE (keys "1"-"5") | ||
| FBB0 | IN A,($FE) | |||
| FBB2 | CPL | |||
| FBB3 | AND $1F | |||
| FBB5 | JR Z,omd_service_and_read_keys | No key -> poll again | ||
| FBB7 | RRA | Key "1" | ||
| FBB8 | JR C,run_title_tune_0 | |||
| FBBA | RRA | Key "2" | ||
| FBBB | JR C,run_title_tune_1 | |||
| FBBD | RRA | Key "3" | ||
| FBBE | JR C,detect_kempston_joystick | |||
| FBC0 | RRA | Key "4" | ||
| FBC1 | JR C,run_title_tune_3 | |||
| FBC3 | CALL redefine_keys_screen | Key "5" (default): "DEFINE KEYS" screen | ||
| FBC6 | JR omd_redraw_and_poll | |||
| Prev: FA72 | Up: Map | Next: FBC8 |