Download Print this page

Atari 400 Technical Reference Manual page 231

Home computer system
Hide thumbs Also See for 400:

Advertisement

XPOS
:=
LPENH + 227
ELSE
{ no adJustment to left of rollover point}
XPOS :
=
LPENH;
XPOS
:=
XPOS - 67;
{adJust for left edge offset}
IF XPOS
<
0 THEN XPOS
:=
0;
IF XPOS ) 159 THEN XPOS
:=
159;
~6
LPENV (0235,
lJ -- Light pen vertical position code
LPENV contains the vertical position code for the light pen; the
algorithm below (written in Pascal) shows the conversion from position
code to screen coordinate (screen mode 7):
YPOS
:=
LPENV - 16;
{adJust for upper edge offset}
IF YPOS
<
0 THEN YPOS
:= OJ
IF YPOS ) 95 THEN YPOS
:=
95;
~7
STICKO - STICK3 (0278, 4J
Light pen button sense
The light pen button sense is encoded in one of STICKO - STICK3
(depending upon the actual controller port used) as shown
below:
7
o
+-+-+-+-+-+-+-+-+
1010:01TI
+-+-+-+-+-+-+-+-+
where: T
=
0 indicates the light pen button is pressed.
Driving Controllers
The driving controller has no position stops and thus allows unlimited
rotation in either direction; the output of the controller is a 2-bit
Gray code which can be used to determine the direction of rotation.
The controller is sensed using the same internal hardware as the
Joystick,
thus the same data base variables are used for both.
OPERATING SYSTEM C016555 -- Appendix L
246

Hide quick links:

Advertisement

loading

This manual is also suitable for:

800