.DKS2 LDA KTRAN+7,X \ Fetch either the joystick X value or joystick Y value \ from the key logger buffer, depending on the value of \ X (i.e. fetch either KTRAN+8 or KTRAN+0) EOR JSTE \ The high byte A is now EOR'd with the value in \ location JSTE, which contains &FF if both joystick \ channels are reversed and 0 otherwise (so A now \ contains the high byte but inverted, if that's what \ the current settings say) RTS \ Return from the subroutineName: DKS2 [Show more] Type: Subroutine Category: Keyboard Summary: Read the joystick positionContext: See this subroutine in context in the source code Variations: See code variations for this subroutine in the different versions References: This subroutine is called as follows: * DKJ1 calls DKS2
Return the value of ADC channel in X (used to read the joystick). The value will be inverted if the game has been configured to reverse both joystick channels (which can be done by pausing the game and pressing J).
Arguments: X The ADC channel to read: * 1 = joystick X * 2 = joystick Y
Returns: (A X) The 16-bit value read from channel X, with the value inverted if the game has been configured to reverse the joystick
[X]
Variable JSTE in workspace Parasite variables
Reverse both joystick channels configuration setting
[X]
Variable KTRAN (category: Keyboard)
The key logger buffer that gets updated by the OSWORD 240 command