Prev: 54731 Up: Map Next: 54786
54735: Menu Keypress
Used by the routine at TitleScreen.
Use FRAMES as a timer.
MenuKeypress 54735 LD BC,0 Reset *FRAMES to 0000.
54738 LD (23672),BC
This entry point is used by the routine at ToggleMusic.
MenuKeypress_Loop 54742 LD BC,(23672) BC=*FRAMES.
54746 LD A,B Jump to DemoMode if the timer held by FRAMES is up.
54747 CP 4
54749 JP Z,DemoMode
54752 CALL SmallPause Call SmallPause (presumably to debounce).
Fetch the players pressed key (if any) and handle it.
No keys being pressed returns a 255 response.
54755 CALL 654 Call KEY_SCAN.
54758 LD A,E Jump to ToggleMusic if the fire button has been pressed.
54759 CP 16
54761 JP Z,ToggleMusic
54764 CP 255 Return if any button has been pressed.
54766 RET NZ
54767 LD A,(23530) Jump to MenuKeypress_Kempston if *ControlMethod is set to Kempston joystick (12).
54770 CP 12
54772 JP Z,MenuKeypress_Kempston
54775 JR MenuKeypress_Loop Jump to MenuKeypress_Loop.
Handle checking if the player has pressed fire on their Kempston joystick.
MenuKeypress_Kempston 54777 IN A,(31) Read from the Kempston joystick port.
54779 AND %00010000 Jump to MenuKeypress_Loop if fire has not been pressed.
54781 JR Z,MenuKeypress_Loop
54783 LD A,35 A=35.
54785 RET Return.
Prev: 54731 Up: Map Next: 54786