Prev: 57901 Up: Map Next: 58185
58123: Player Controls Kempston
Used by the routine at InitialiseGame.
PlayerControls_Kempston 58123 LD IX,62001 IX=TablePlayerAttributes.
58127 LD A,(23536) Jump to Check_PlayerControls_Kempston if *GameState is not set to "Demo Mode" (3).
58130 CP 3
58132 JR NZ,Check_PlayerControls_Kempston
58134 IN A,(31) Read from the Kempston joystick port.
58136 AND %00011111 Keep only bits 0-4.
58138 JP NZ,60815 Jump to 60815 if the result is not zero.
58141 RET Return.
The control is stored at *KempstonControl but does not appear to be referenced again outside of this routine.
Check_PlayerControls_Kempston 58142 IN A,(31) Read from the Kempston joystick port.
58144 LD (62274),A Write A to *KempstonControl.
Check for "fire".
58147 AND %00010000 Keep only bit 4.
58149 JP NZ,Handler_Doors Jump to Handler_Doors if the result is not zero.
Check for "right".
58152 LD A,(62274) A=*KempstonControl.
58155 AND %00000001 Keep only bit 0.
58157 JP NZ,PlayerMoveRight Jump to PlayerMoveRight if the result is not zero.
Check for "left".
58160 LD A,(62274) A=*KempstonControl.
58163 AND %00000010 Keep only bit 1.
58165 JP NZ,PlayerMoveLeft Jump to PlayerMoveLeft if the result is not zero.
Check for "down".
58168 LD A,(62274) A=*KempstonControl.
58171 AND %00000100 Keep only bit 2.
58173 JP NZ,Handler_LaddersDescending Jump to Handler_LaddersDescending if the result is not zero.
Check for "up".
58176 LD A,(62274) A=*KempstonControl.
58179 AND %00001000 Keep only bit 3.
58181 JP NZ,Handler_LaddersAscending Jump to Handler_LaddersAscending if the result is not zero.
No controls were pressed, just return.
58184 RET Return.
Prev: 57901 Up: Map Next: 58185