h6. [[Joystick]] h6(. » [[Joystick SWI Calls|SWI Calls]] h6((. » [[Joystick_Read]] h6(((. » Joystick_Read 1 h2. Joystick_Read 1 h5. (SWI &43F40) |_<^{width:4em}. Entry | | |<^. R0 |<^. 256 + stick number in bits 0-7 | |_<^{width:4em}. Exit | | |/3<^. R0 |<^. Position: | |<^. Bits 0-15: Unsigned Y value (0 down, 65535 up) | |<^. Bits 16-31: Unsigned X value (0 left, 65535 right) | |/3<^. R1 |<^. Bits 0-31: Buttons (such as the fire button)| h4. Use The purpose of this call is to read the latest 16 bit joystick value. h4. Notes Due calibration drift in analogue circuitry it is recommended to use the band &6000 to &A000 as an "at rest" region. Prior to a call to this SWI the joystick hardware may be disabled or powered down. As it is the buffered value that is returned, triggering a new conversion to be scheduled, the very first call to this SWI will return X=0 Y=0. Prior to 23-11-2021, R1 returned only 8 buttons with bits 8-31 being reserved. h4. See also * [[Joystick_Read 0]]