Prev: D5CB Up: Map Next: D602
D5CF: Menu Keypress
Used by the routine at TitleScreen.
Use FRAMES as a timer.
MenuKeypress D5CF LD BC,$0000 Reset *FRAMES to 0000.
D5D2 LD ($5C78),BC
This entry point is used by the routine at ToggleMusic.
MenuKeypress_Loop D5D6 LD BC,($5C78) BC=*FRAMES.
D5DA LD A,B Jump to DemoMode if the timer held by FRAMES is up.
D5DB CP $04
D5DD JP Z,DemoMode
D5E0 CALL SmallPause Call SmallPause (presumably to debounce).
Fetch the players pressed key (if any) and handle it.
No keys being pressed returns a FF response.
D5E3 CALL $028E Call KEY_SCAN.
D5E6 LD A,E Jump to ToggleMusic if the fire button has been pressed.
D5E7 CP $10
D5E9 JP Z,ToggleMusic
D5EC CP $FF Return if any button has been pressed.
D5EE RET NZ
D5EF LD A,($5BEA) Jump to MenuKeypress_Kempston if *ControlMethod is set to Kempston joystick (0C).
D5F2 CP $0C
D5F4 JP Z,MenuKeypress_Kempston
D5F7 JR MenuKeypress_Loop Jump to MenuKeypress_Loop.
Handle checking if the player has pressed fire on their Kempston joystick.
MenuKeypress_Kempston D5F9 IN A,($1F) Read from the Kempston joystick port.
D5FB AND %00010000 Jump to MenuKeypress_Loop if fire has not been pressed.
D5FD JR Z,MenuKeypress_Loop
D5FF LD A,$23 A=23.
D601 RET Return.
Prev: D5CB Up: Map Next: D602