Prev: 37959 Up: Map Next: 38027
37990: Capture cursor 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)
37990 LD C,254 IN 63486 reads the half row 1 to 5...
37992 LD B,247 ...
37994 IN A,(C) Read keyboard/joystick
37996 BIT 4,A If joystick moved left ("5" key pressed)...
37998 CALL Z,38060 ...store a LEFT input from control device
38001 LD B,239 IN 61438 reads the half row O to 6
38003 IN A,(C) Read keyboard/joystick
38005 BIT 2,A If joystick moved right ("8" key pressed)...
38007 CALL Z,38063 ...store a RIGHT input from control device
38010 BIT 4,A If joystick moved down ("6" key pressed)...
38012 CALL Z,38069 ...store a DOWN input from control device
38015 BIT 3,A If joystick moved up ("7" key pressed)...
38017 CALL Z,38066 ...store an UP input from control device
38020 BIT 0,A If fire button pressed ("0" key pressed)...
38022 CALL Z,38072 ...store a FIRE input from control device
38025 LD A,(HL) Return stored joystick movement in A
38026 RET Return
Prev: 37959 Up: Map Next: 38027