----- Original Message -----
From: "Tony Duell" <ard(a)p850ug1.demon.co.uk>
To: <classiccmp(a)classiccmp.org>
Sent: Tuesday, July 17, 2001 3:45 PM
Subject: Re: Light Pens ...
>
> The light pen on the CDC system had a button that had to be pressed when one
> wanted its attention. Likewise, the MOT system that I mentioned earlier had
a
> button also. Consequently, I'd conclude that
one normally pressed the
button
> when it was in contact with the face of the tube
and released it when it was
> still there, so ambient light was not so big an issue. With a switch, of
> course, the response time issues you mentioned before became very real,
since
> switch bounce can be quite long, and, more than
one scan line might go by
while
the switch is
debounced.
The contact bounce time is irrelevant.
Yeah ... I thought about that, and the only real purpose the button would serve,
aside from gating the lightpen input, perhaps in the manner you suggest, is to
tell the system to flash the screen for one frame so it can find the pen.
When you press the switch you tell the system to start looking for light
pen events. This might just be a signal to the software to accept
interrupts from the video system that indicate that the light pen has
detected something. The light pen connects to the video hardware as
usual, and latches the video address so that the software can read it.
If it does work that way, then ambient light becomes a factor, doesn't it? I
was thinking the button would gate the lightpen input. Apparently that's not
necessary.
The video hardware can latch that address every time the light pen
outputs a signal, no matter what the switch is doing. OK, it may not mean
anything, particularly if the light pen is not pointing at the screen,
but then the software will only read out that latch when the switch is
pressed, so it doesn't matter.
seems reasonable ...
On most micros that I am familiar with, the light pen switch signal
doesn't go anywhere near the video circuitry (6845, etc). It goes to a
general input port. The software reads that port and starts checking the
6845's registers if the switch is pressed.
-tony