Atari ST series Technical Reference Manual page 349

Hide thumbs Also See for ST series:
Table of Contents

Advertisement

The Intelligent Keyboard Controller
mode, mouse position changes are translated into the equiva­
lent cursor key strokes (up arrow, right arrow, and so on).
The user may set a scale factor that determines how far the
mouse must move before a cursor keycode is generated. A
right mouse button press is reported as keycode $74, while a
left mouse button press is reported as keycode $75. For both
mouse movement and button events, break codes are sent
immediately after the make codes.
Joystick Functions
The IKBD provides support for four separate modes of oper­
ating the joystick. TOS, however, does not provide any sup­
port for reading joysticks. One possible reason for this is a
partial conflict between use of the joysticks and the mouse.
The mouse and joystick 0 share a single port, and the right
mouse button and the fire button on joystick 1 have to share
one hardware line, making it impossible to read both at
once.
After any joystick command, the IKBD reads both ports
as if they have joysticks attached, with one of the buttons as­
signed to each. After any mouse command (except mouse
disable, command $12), the IKBD scans port 0 as if a mouse
were attached, and "steals" the joystick 1 fire button line for
use in reading the right mouse button. In this condition, the
only way to read the fire button on joystick 1 is to temporar­
ily disable the mouse with command $12. Then, the fire but­
ton on joystick 1 can be read until the mouse is enabled
again.
Without direct TOS support, using joysticks in your pro­
gram can be a little complicated. In order to enable the joys­
ticks, you must give the IKBD the proper command to set
the mode. In order to read the data packets that the IKBD
returns, you must install your own interrupt handler routine.
Details on this procedure are supplied in the section on com­
munications between the IKBD and ST, below.
Three of the joystick modes that the IKBD supports cor­
respond roughly to the three mouse modes. The first is event
reporting mode, in which the IKBD sends a joystick informa­
tion packet whenever the stick position or button status
changes. Information is only sent for the stick that changes.
Another mode of joystick operation is interrogation mode.
341

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents