Prev: 64122 Up: Map Next: 64192
64159: Capture Sinclair joystick 1 input
Used by the routine at 64034.
Output
A Stored key-press (bits: 0=LEFT, 1=RIGHT, 2=UP, 3=DOWN, 4=FIRE)
64159 LD C,254 IN 61438 reads the half row O to 6
64161 LD B,239 ...
64163 IN A,(C) ...
64165 BIT 4,A If joystick moved left ("6" key pressed)...
64167 CALL Z,64192 ...store a LEFT input from control device
64170 BIT 3,A If joystick moved right ("7" key pressed)...
64172 CALL Z,64195 ...store a RIGHT input from control device
64175 BIT 2,A If joystick moved down ("8" key pressed)...
64177 CALL Z,64201 ...store a DOWN input from control device
64180 BIT 1,A If joystick moved down ("9" key pressed)...
64182 CALL Z,64198 ...store an UP input from control device
64185 BIT 0,A If fire button pressed ("0" key pressed)...
64187 CALL Z,64204 ...store a FIRE input from control device
64190 LD A,(HL) Return stored joystick movement in A
64191 RET Return
Prev: 64122 Up: Map Next: 64192