Download Print this page

Atari 400 Technical Reference Manual page 453

Home computer system
Hide thumbs Also See for 400:

Advertisement

Light Pen:
A light pen is a device that can detect the electron beam
as it sweeps across the TV screen.
It is used to point directly at an image
on the TV display.
Applications include selecting menu items and drawing
lines. The ATARI 400/800 hardware was designed so that a light pen can be
plugged into any of the joystick controller ports (see end of section
III).
When anyone of the joystick trigger lines (pin 6) is pulled low, the
ANTIC chip takes the current
VCOUNT value and stores it in PENV.
The
horizontal color clock value (0-227 decimal) is stored in PENH.
The least
significant bit is inaccurate and should be ignored.
Since there are a
number of delays involved in displaying the data and changing the light
pen register, each system must be cal brated.
Software which uses the
light pen should contain a user-interactive calibration routine.
For
example, the user could point the light pen
at a crosshair in the center
of the screen and the program could compute the required horizontal offset.
PENH will wrap around from 227 to 0 near the right hand edge of a standard
width display because of the delay.
The pen will not work if it is pointed
at a black area of the screen, since the electron beam is turned off.
It is
a good idea to read two (or more) values and average them, since the user
will probably not hold the pen perfectly steady.
11.32

Hide quick links:

Advertisement

loading

This manual is also suitable for:

800