EasyManua.ls Logo

Atari ST series - Page 48

Atari ST series
420 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
CHAPTER 3
Byte Vector
Offset
Name
12
statvec
16
mousevec
20 clockvec
24
joyvec
28 midisys
32
ikbdsys
Table 3-5. Vector Table Structure Pointed to by vecbase (continued)
Routine Called
IKBD status packet handler
IKBD mouse packet handler
IKBD clock packet handler
IKBD joystick packet handler
System MIDI ACIA handler
System IKBD ACIA handler
The MIDI port and Intelligent Keyboard Controller
(IKBD) hardware are connected to the ST system through an
ACIA (Asynchronous Communications Interface Adapter)
chip. When a byte has been input from either the MIDI port
or the IKBD, the ACIA chip causes an interrupt to occur on
the 68901 MFP chip. The interrupt handler then determines
whether the interrupt was caused by the MIDI ACIA chip or
the IKBD ACIA chip. If it was the MIDI chip, the midisys
routine is called. This determines whether the interrupt oc
curred because a byte of data was received, or because of an
overrun error. If a byte of data was the cause, the midivec
routine is called to store the data (which is contained in the
low eight bits of DO) in the MIDI buffer. If an error occurred,
the vmiderr routine is called to handle the error.
If the source of the interrupt was the IKBD ACIA, the
ikbdsys routine is called. It checks to see if the interrupt was
caused by data received or by an error. If it was an error,
vkbderr is called to handle it. If a data byte was received, the
byte is checked to see if it was a keycode or an IKBD packet
header. If the former is true, the keypress is handled. If the
byte was a packet header, however, execution is directed
through statvec, mousevec, clockvec, or joyvec, depending
on what kind of packet is waiting. Of these four, the mous
evec and clockvec vectors are used by the system, and
should generally be left alone (particularly if you want sys
tem support for the mouse and clock functions to continue).
The statvec and joyvec vectors are not used by the sys
tem, however, and you may want to install you own han
dlers for these functions. For example, in order to use joys
ticks with your program, you must send a command to the
IKBD to begin sending joystick information packets, and in
stall your own joystick packet handler to process these pack
ets. If you do install your own handler, remember at the
40

Related product manuals