DM> A friend of mine that had a ZX Spectrum gave me his light pen but not
DM> thesoftware... I opened it to see what was inside.
DM> The diode go to a Amplified circuit then to the spectrum "Tape in".
DM> Nothingmore. And the spectrum uses a Z80 clocked at 3.25MHz...
DM> The resolution of the Spectrum pen was the pixel...
DM> But, for a gun, you can't use such an accuracy...
DM> ***|
DM> ******|screen
DM> Gun--*********|
DM> ******|
DM> ***|
DM> (It's easier to draw a simple figure than to describe it)
DM> The trigger is completely independent from the optical circuit...
DM> I hope this can help you...
DM> Write soon Andrew!
Well, the light pen works on the same or similar principle. I would have to
limit my number of items on the screen at one time to about 20 or so. Being
the max frame rate you could possibly get is about 72(i believe). I can pull
a trigger about 2 or 3 times a second(2 a sec on a real revolver). Therefore
to keep the program from detecting false hits, i keep the strobe frames to a
minimum. I would keep the diode operating at all times. if the light level
it recieves is half the required voltage, it is assumed it is still on
screen. If at full voltage, it is at a strobe area. If at 0 or less that a
given amount, it is assumed to be off screen. If the fire key is pressed at
one of these times, it is either reloaded, flash the screen to signify a
miss, or kill the person. The light pen does something similar. The
lightpen transmits and recieves at the same time. Then at black on a bar
code it transmits 0, if at a light bar it reflects light and xmits a 1.
Simple huh?
* SPITFIRE v3.51
--- Alexi/Mail 2.02b (#10000)
---------------
* Origin: KODIAK Den BBS 1-573-329-2866 FIDO Echo (1:284/211)
|