Prev: FBC8 Up: Map Next: FC29
FC14: Joystick-present detector for the control-select sub-screen
Samples the Kempston port ($1F) $14=20 times, servicing sound each iteration (run_title_tune), and bails out to the main poll loop (omd_service_and_read_keys) as soon as the port's value changes (i.e. a joystick is moving/present); otherwise falls through to run_title_tune_4 with A=1 (no joystick detected).
Used by the routine at options_menu_driver.
detect_kempston_joystick FC14 LD B,$14
FC16 IN A,($1F)
FC18 LD C,A
detect_kempston_joystick_0 FC19 IN A,($1F)
FC1B CP C
FC1C JR NZ,omd_service_and_read_keys
FC1E PUSH BC
FC1F CALL run_title_tune
FC22 POP BC
FC23 DJNZ detect_kempston_joystick_0
FC25 LD A,$01
FC27 JR run_title_tune_4
Prev: FBC8 Up: Map Next: FC29