Entry | |
---|---|
R0 | 0 + stick number in bits 0-7 |
Exit | |
---|---|
R0 | State: |
Bits 0-7: Signed Y value (-127 down, +127 up) | |
Bits 8-15: Signed X value (-127 left, +127 right) | |
Bits 16-23: Buttons (such as the fire button) | |
Bits 24-31: Reserved |
The purpose of this call is to read the latest 8 bit joystick value.
For digital joysticks, fixed values of ±64 will be returned when the switches are activated. Due calibration drift in analogue circuitry it is recommended to use the band -&20 to +&20 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.