Prev: 37928 Up: Map Next: 37990
37959: Capture Fuller joystick input
Used by the routine at 37876.
Input
HL 23485 (store for currently active keyboard press / joystick action)
Output
A Stored key-press (bits: 0=LEFT, 1=RIGHT, 2=UP, 3=DOWN, 4=FIRE)
37959 LD C,127 Load 127 (Fuller port number) into C
37961 IN A,(C) Read byte from port 127 (i.e. read state of joystick)
37963 BIT 2,A If joystick moved left...
37965 CALL Z,38060 ...store a LEFT input from control device
37968 BIT 3,A If joystick moved right...
37970 CALL Z,38063 ...store a RIGHT input from control device
37973 BIT 1,A If joystick moved down...
37975 CALL Z,38069 ...store a DOWN input from control device
37978 BIT 0,A If joystick moved up...
37980 CALL Z,38066 ...store an UP input from control device
37983 BIT 7,A If fire button pressed...
37985 CALL Z,38072 ...store a FIRE input from control device
37988 LD A,(HL) Return stored joystick movement in A
37989 RET Return
Prev: 37928 Up: Map Next: 37990