Light Pens ...

From: Fred Cisin <cisin_at_xenosoft.com>
Date: Mon Jul 16 17:24:00 2001

On Mon, 16 Jul 2001, Sellam Ismail wrote:
> > > completely blind unless some pixel is lit up?
> Ok, my mind is still blown. How does a light-pen drawing program work
> then? (Or is a light-pen drawing program not possible?)

There are several ways.
What I did (with TRS-80) was that whenever the software saw the SWITCH
engaged, it would call the locate function. The locate function would
light pixels and then turn them back off.

Although you can scan the pixels one at a time (an XOR function is VERY
handy), you can also light all of the pixels in the top half of the
screen, and then restore them, to find which half of the screen it
is. Then light half of that and restore it, etc. You can identify which
character positions with less than a dozen writes. Then toggle the
"found" position a few times to confirm. The "extra" confirmation tests
won't bother the user - "the light pen produces a flashing dot on the
screen".

In a hardware assisted environment (such as CGA), you can just flash the
screen.


Note: MY TRS-80 software in BASIC was too slow for commercial
release. Others did better.

--
Grumpy Ol' Fred        cisin_at_xenosoft.com
Received on Mon Jul 16 2001 - 17:24:00 BST

This archive was generated by hypermail 2.3.0 : Fri Oct 10 2014 - 23:33:52 BST