|
Post by gtoal on Jul 25, 2018 16:55:34 GMT -5
If I start drawing an object, and the lightpen triggers while I'm drawing that object, then the lightpen must have been touching that object (or the light gun pointing at it from a distance). Is this correct? If so then adding light pen support to any shooter should just be a case of clearing the trigger register before drawing the object, and checking to see if it was triggered after drawing the object (assuming the triggering is latched rather than momentary)?
If this is how it works, it makes checking for light pen hits actually cheaper than checking for joystick x/y hits...
(My guess is that this is not how it works and that handling the light pen is much more complex...)
G
|
|
|
Post by Malban on Jul 26, 2018 2:44:33 GMT -5
In principple it IS that easy.
It gets more complicated if a) you want to "draw" something with your lightpen b) if you want to point to a location on an otherwise empty screen
You know ... Vide and its documentation is your friend :-)...
Regards Malban
|
|
|
Post by gtoal on Jul 26, 2018 13:11:43 GMT -5
In principple it IS that easy. It gets more complicated if a) you want to "draw" something with your lightpen b) if you want to point to a location on an otherwise empty screen You know ... Vide and its documentation is your friend :-)... Regards Malban
I wasn't sure if the hardware latched the detection of a light signal - your document clears that up - CA1 is latched. Actually I did know in principle how to do the arbitrary drawing part... *way* long ago when I was learning to program I had access to a PDP15 with a vector display and light pen, and have coded the scan lines in X and Y that were needed to find the pen! en.wikipedia.org/wiki/PDP-15#/media/File:PDP-15_graphics_terminal.agr.jpgThe only problem with Vide documentation is ... there's too damn much of it! Just yesterday I spent about an hour going through Vide stuff looking for example code on how to draw vectors without using the BIOS and could not find it. I'm sure it's there somewhere.
|
|
|
Post by D-Type on Jul 26, 2018 14:57:21 GMT -5
Just yesterday I spent about an hour going through Vide stuff looking for example code on how to draw vectors without using the BIOS and could not find it. I'm sure it's there somewhere. Copy/paste the BIOS code into your source code and tweak from there? :-)
|
|
|
Post by Malban on Jul 26, 2018 17:55:22 GMT -5
There are only a few "direct programming examples" in the documentation. More likely in the codelib.
Some you can find at:
and something "different":
and some explanation in the "old" docs:
It helps very much if you have written it :-) ...
Malban
|
|
|
Post by gtoal on Jul 26, 2018 23:30:23 GMT -5
|
|