GAME PORT INTERFACE TO DIGITAL JOYSTICKS A joystick is a device with four normally opened switches arranged 90 degree apart. The JOY[0/1]DAT registers become encoded switch input port as follows: Forward: bit9 xor bit#8 Left: bit9 Back: bit1 xor bit0 Right: bit1 Data is encoded to facilitate the mouse/trackball operating mode. NOTE: The right and left direction inputs are also designed to be right and left buttons, respectively, for use with proportional input. In this case, the forward and back inputs are not used, while right and left become button inputs rather than joystick inputs. The JOY[0/1]DAT registers are always valid and may be read at any time.
CONNECTOR PIN USAGE FOR DIGITAL JOYSTICK INPUTS PIN MNEMONIC DESCRIPTION HARDWARE REGISTER/NOTES --- -------- ----------- ----------------------- 1 FORWARD* Forward joystick switch JOY[0/1]DAT 2 BACK* Back joystick switch JOY[0/1]DAT(1 xor 0> 3 LEFT* Left joystick switch JOY[0/1]DAT 4 RIGHT* Right joystick switch JOY[0/1]DAT 5 Unused 6 FIRE* Left mouse button See Fire Button. 7 +5V 125ma max, 200ma surge Total both ports. 8 Ground 9 Unused GAME PORT INTERFACE TO FIRE BUTTONS The fire button are normally opened switches routed to the 8520 adapter PRA0 a follow:
PRA0 bit 7 - Fire* left controller port PRA0 bit 6 - Fire* right controller port Before reading this register, the corresponding bits of the data direction register must be cleared to define input mode: DDRA0 cleared as appropriate NOTE: Do not disturb the settings of other bits in DDRA0 (Use of ROM kernel call is recommended). Fire buttons are always valid and may be read at any time. - Appendix E 307 -