Reading The Controller Port - Commodore Amiga Hardware Reference Manual

Hide thumbs Also See for Amiga:
Table of Contents

Advertisement

READING THE CONTROLLER PORT
Mouse controllers, joysticks, proportional controllers, and light pens use the same con-
nector, but they sometimes have considerably different functions. Therefore, the pins
function differently depending on the type of controller used.
Mouse/Trackball Controllers
The inputs for the mouse or trackball are the same as those for the joystick switches in
these ways:
o
The joystick "right" and "back" switches are the same as the pins used for
mouse or trackball horizontal motion detection.
o
The joystick "left" and "forward" switches are the same as the pins used for
mouse or trackball vertical motion detection.
Pulses enter these inputs from the mouse or trackball and are converted into an up
count or a down count when motion occurs. In the following discussion only the mouse
action is described; the trackball activity is identical.
Direction of Motion versus Count
Imagine that the mouse is being moved on the table over an exact image of the screen
itself. The movements of the on-screen object controlled. by the mouse correspond
exactly to the movements the user makes with the mouse itself (all directions of move-
ment are exactly the same).
The counter counts up when the mouse is moved to the right or "down" (toward you).
The counter counts down when the mouse
is
moved to the left or "up" (away from you).
The coordinates X,Y indicate the controlled object's position on the screen. The coordi-
nates X=O, y=o are at the upper left-hand corner of the screen, and the coordinates
X=Xmax, Y=Ymax are at the lower right-hand corner.
Interface Hardware 217

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents