Prev: 54608 Up: Map Next: 54649
54620: Controls: Kempston Joystick
Used by the routine at GoldfishGame_PlayerControls.
Controls_KempstonJoystick 54620 IN A,(31) Read from the Kempston joystick port.
54622 PUSH AF Stash the control on the stack.
54623 AND %00000010 Keep only bit 1.
54625 CALL NZ,GoldfishGame_PlayerMoveLeft Call GoldfishGame_PlayerMoveLeft if left has been pressed.
54628 POP AF Restore the current control but keep it on the stack.
54629 PUSH AF
54630 AND %00000100 Keep only bit 2.
54632 CALL NZ,GoldfishGame_PlayerMoveDown Call GoldfishGame_PlayerMoveDown if down has been pressed.
54635 POP AF Restore the current control but keep it on the stack.
54636 PUSH AF
54637 AND %00001000 Keep only bit 3.
54639 CALL NZ,GoldfishGame_PlayerMoveUp Call GoldfishGame_PlayerMoveUp if up has been pressed.
54642 POP AF Restore the current control from the stack.
54643 AND %00000001 Keep only bit 0.
54645 JP NZ,GoldfishGame_PlayerMoveRight Jump to GoldfishGame_PlayerMoveRight if right has been pressed.
54648 RET Return.
Prev: 54608 Up: Map Next: 54649