Relay PIN equivalent on a motherboard of a PC computer...?

Comments, problems, suggestions about Oric emulators (Euphoric, Mess, Amoric, etc...) it's the right place to ask. And don't hesitate to give your tips and tricks that help using these emulations in the best possible way on your favorite operating system.
User avatar
Chema
Game master
Posts: 3014
Joined: Tue Jan 17, 2006 10:55 am
Location: Gijón, SPAIN
Contact:

Post by Chema »

Hi Symoon...

I just google'd for your website and it gave me that url... Mainly because I remembered you have info about the light pen, but did not remember it was so complete :)
User avatar
Dbug
Site Admin
Posts: 4444
Joined: Fri Jan 06, 2006 10:00 pm
Location: Oslo, Norway
Contact:

Post by Dbug »

Symoon: Geocities is dead:
http://help.yahoo.com/l/us/yahoo/geocities/close/

Reocities is just an attempt at savig what was there:
http://www.reocities.com/newhome/faq.html

:)
User avatar
Symoon
Archivist
Posts: 2307
Joined: Sat Jan 14, 2006 12:44 am
Location: Paris, France

Post by Symoon »

Dbug: yes, sure I knew Geocities died ;-)
I thought that was not so bad as I had to re-work most of my pages for years now, and never found time to. I was just surprised (and unhappy) that someone copied the content of my site, and put it online without me being warned and being able to update it. Anyway, since I don't have time to care about it, so be it for the moment!

Chema: about the light pen, Fabrice Francès, IIRC, made a much smarter programming with "Rush Hour" (there's a version using the light pen). The only flaw was that he used the red color for the player's car, color which was almost not detected by the pen.
Brana
Flying Officer
Posts: 169
Joined: Fri Nov 30, 2007 8:30 pm
Contact:

Re: Coordinate system for LightPen

Post by Brana »

Unusual coordinat system for Lightpen;
The center (zero coordinates) is around PRINT@ 6,24 in TEXT/Lores mode.
And here it is in detail - screen coordinates (Txt mode) and LightPen equivalent (derived from PEEK (992) and (993))
Example: at PRINT@ 6,0 PEEK (992) would be around 255 and PEEK (993) would be around value 64.

NOTICE:
You must copy and paste this into a NotePad, and then turn OFF the WordWrap feature in order to see this correctly.

This chart has been made with usage of Iskra2000 :)

Please ignore the `` sign, that is just a double space. It is needed on the forum to synchronize the lines of the text more correctly!

Begin

````` 0`` |````1`` |````2`` |````3`` |````4`` |````5`` |````6`` |````7`` |````8`` |````9`` |````10``|````11``|````12``|````13``|````14``|````15``|````16``|````17``|````18``|````19``|`` 20`` |`` 21`` |`` 22`` |`` 23`` |`` 24`` |`` 25`` |`` 26`` |`` 27`` |`` 28`` |`` 29`` |`` 30`` |`` 31`` |`` 32`` |`` 33`` |`` 34`` |`` 35`` |`` 36`` |`` 37`` |`` 38`` |`` 39`` |
0``219, 64| 225, 64| 231, 64| 237, 64| 243, 64| 249, 64| 255, 64|`` 5, 64|``11, 64|``17, 64|``23, 64|``29, 64|``35, 64|``41, 64|``47, 64|``53, 64|``59, 64|``65, 64|``71, 64|``77, 64|``84, 64|``89, 64|``95, 64| 102, 64| 107, 64| 113, 64| 119, 64| 125, 64| 131, 64| 137, 64| 143, 64| 150, 64| 155, 64| 161, 64| 167, 64| 173, 64| 179, 64| 185, 64| 192, 64| 198, 64|
1``219, 72| 225, 72| 231, 72| 237, 72| 243, 72| 249, 72| 255, 72|`` 5, 72|``11, 72|``17, 72|``23, 72|``29, 72|``35, 72|``41, 72|``47, 72|``53, 72|``59, 72|``65, 72|``71, 72|``77, 72|``84, 72|``89, 72|``95, 72| 102, 72| 107, 72| 113, 72| 119, 72| 125, 72| 131, 72| 137, 72| 143, 72| 150, 72| 155, 72| 161, 72| 167, 72| 173, 72| 179, 72| 185, 72| 192, 72| 198, 72|
2``219, 80| 225, 80| 231, 80| 237, 80| 243, 80| 249, 80| 255, 80|`` 5, 80|``11, 80|``17, 80|``23, 80|``29, 80|``35, 80|``41, 80|``47, 80|``53, 80|``59, 80|``65, 80|``71, 80|``77, 80|``84, 80|``89, 80|``95, 80| 102, 80| 107, 80| 113, 80| 119, 80| 125, 80| 131, 80| 137, 80| 143, 80| 150, 80| 155, 80| 161, 80| 167, 80| 173, 80| 179, 80| 185, 80| 192, 80| 198, 80|
3``219, 88| 225, 88| 231, 88| 237, 88| 243, 88| 249, 88| 255, 88|`` 5, 88|``11, 88|``17, 88|``23, 88|``29, 88|``35, 88|``41, 88|``47, 88|``53, 88|``59, 88|``65, 88|``71, 88|``77, 88|``84, 88|``89, 88|``95, 88| 102, 88| 107, 88| 113, 88| 119, 88| 125, 88| 131, 88| 137, 88| 143, 88| 150, 88| 155, 88| 161, 88| 167, 88| 173, 88| 179, 88| 185, 88| 192, 88| 198, 88|
4``219, 96| 225, 96| 231, 96| 237, 96| 243, 96| 249, 96| 255, 96|`` 5, 96|``11, 96|``17, 96|``23, 96|``29, 96|``35, 96|``41, 96|``47, 96|``53, 96|``59, 96|``65, 96|``71, 96|``77, 96|``84, 96|``89, 96|``95,96 | 102, 96| 107, 96| 113, 96| 119, 96| 125, 96| 131, 96| 137, 96| 143, 96| 150, 96| 155, 96| 161, 96| 167, 96| 173, 96| 179, 96| 185, 96| 192, 96| 198, 96|
5``219,104| 225,104| 231,104| 237,104| 243,104| 249,104| 255,104|`` 5,104|``11,104|``17,104|``23,104|``29,104|``35,104|``41,104|``47,104|``53,104|``59,104|``65,104|``71,104|``77,104|``84,104|``89,104|``95,104| 102,104| 107,104| 113,104| 119,104| 125,104| 131,104| 137,104| 143,104| 150,104| 155,104| 161,104| 167,104| 173,104| 179,104| 185,104| 192,104| 198,104|
6``219,112| 225,112| 231,112| 237,112| 243,112| 249,112| 255,112|`` 5,112|``11,112|``17,112|``23,112|``29,112|``35,112|``41,112|``47,112|``53,112|``59,112|``65,112|``71,112|``77,112|``84,112|``89,112|``95,112| 102,112| 107,112| 113,112| 119,112| 125,112| 131,112| 137,112| 143,112| 150,112| 155,112| 161,112| 167,112| 173,112| 179,112| 185,112| 192,112| 198,112|
7``219,120| 225,120| 231,120| 237,120| 243,120| 249,120| 255,120|`` 5,120|``11,120|``17,120|``23,120|``29,120|``35,120|``41,120|``47,120|``53,120|``59,120|``65,120|``71,120|``77,120|``84,120|``89,120|``95,120| 102,120| 107,120| 113,120| 119,120| 125,120| 131,120| 137,120| 143,120| 150,120| 155,120| 161,120| 167,120| 173,120| 179,120| 185,120| 192,120| 198,120|
8``219,128| 225,128| 231,128| 237,128| 243,128| 249,128| 255,128|`` 5,128|``11,128|``17,128|``23,128|``29,128|``35,128|``41,128|``47,128|``53,128|``59,128|``65,128|``71,128|``77,128|``84,128|``89,128|``95,128| 102,128| 107,128| 113,128| 119,128| 125,128| 131,128| 137,128| 143,128| 150,128| 155,128| 161,128| 167,128| 173,128| 179,128| 185,128| 192,128| 198,128|
9``219,136| 225,136| 231,136| 237,136| 243,136| 249,136| 255,136|`` 5,136|``11,136|``17,136|``23,136|``29,136|``35,136|``41,136|``47,136|``53,136|``59,136|``65,136|``71,136|``77,136|``84,136|``89,136|``95,136| 102,136| 107,136| 113,136| 119,136| 125,136| 131,136| 137,136| 143,136| 150,136| 155,136| 161,136| 167,136| 173,136| 179,136| 185,136| 192,136| 198,136|
10`219,144| 225,144| 231,144| 237,144| 243,144| 249,144| 255,144|`` 5,144|``11,144|``17,144|``23,144|``29,144|``35,144|``41,144|``47,144|``53,144|``59,144|``65,144|``71,144|``77,144|``84,144|``89,144|``95,144| 102,144| 107,144| 113,144| 119,144| 125,144| 131,144| 137,144| 143,144| 150,144| 155,144| 161,144| 167,144| 173,144| 179,144| 185,144| 192,144| 198,144|
11`219,152| 225,152| 231,152| 237,152| 243,152| 249,152| 255,152|`` 5,152|``11,152|``17,152|``23,152|``29,152|``35,152|``41,152|``47,152|``53,152|``59,152|``65,152|``71,152|``77,152|``84,152|``89,152|``95,152| 102,152| 107,152| 113,152| 119,152| 125,152| 131,152| 137,152| 143,152| 150,152| 155,152| 161,152| 167,152| 173,152| 179,152| 185,152| 192,152| 198,152|
12`219,160| 225,160| 231,160| 237,160| 243,160| 249,160| 255,160|`` 5,160|``11,160|``17,160|``23,160|``29,160|``35,160|``41,160|``47,160|``53,160|``59,160|``65,160|``71,160|``77,160|``84,160|``89,160|``95,160| 102,160| 107,160| 113,160| 119,160| 125,160| 131,160| 137,160| 143,160| 150,160| 155,160| 161,160| 167,160| 173,160| 179,160| 185,160| 192,160| 198,160|
13`219,168| 225,168| 231,168| 237,168| 243,168| 249,168| 255,168|`` 5,168|``11,168|``17,168|``23,168|``29,168|``35,168|``41,168|``47,168|``53,168|``59,168|``65,168|``71,168|``77,168|``84,168|``89,168|``95,168| 102,168| 107,168| 113,168| 119,168| 125,168| 131,168| 137,168| 143,168| 150,168| 155,168| 161,168| 167,168| 173,168| 179,168| 185,168| 192,168| 198,168|
14`219,176| 225,176| 231,176| 237,176| 243,176| 249,176| 255,176|`` 5,176|``11,176|``17,176|``23,176|``29,176|``35,176|``41,176|``47,176|``53,176|``59,176|``65,176|``71,176|``77,176|``84,176|``89,176|``95,176| 102,176| 107,176| 113,176| 119,176| 125,176| 131,176| 137,176| 143,176| 150,176| 155,176| 161,176| 167,176| 173,176| 179,176| 185,176| 192,176| 198,176|
15`219,184| 225,184| 231,184| 237,184| 243,184| 249,184| 255,184|`` 5,184|``11,184|``17,184|``23,184|``29,184|``35,184|``41,184|``47,184|``53,184|``59,184|``65,184|``71,184|``77,184|``84,184|``89,184|``95,184| 102,184| 107,184| 113,184| 119,184| 125,184| 131,184| 137,184| 143,184| 150,184| 155,184| 161,184| 167,184| 173,184| 179,184| 185,184| 192,184| 198,184|
16`219,192| 225,192| 231,192| 237,192| 243,192| 249,192| 255,192|`` 5,192|``11,192|``17,192|``23,192|``29,192|``35,192|``41,192|``47,192|``53,192|``59,192|``65,192|``71,192|``77,192|``84,192|``89,192|``95,192| 102,192| 107,192| 113,192| 119,192| 125,192| 131,192| 137,192| 143,192| 150,192| 155,192| 161,192| 167,192| 173,192| 179,192| 185,192| 192,192| 198,192|
17`219,200| 225,200| 231,200| 237,200| 243,200| 249,200| 255,200|`` 5,200|``11,200|``17,200|``23,200|``29,200|``35,200|``41,200|``47,200|``53,200|``59,200|``65,200|``71,200|``77,200|``84,200|``89,200|``95,200| 102,200| 107,200| 113,200| 119,200| 125,200| 131,200| 137,200| 143,200| 150,200| 155,200| 161,200| 167,200| 173,200| 179,200| 185,200| 192,200| 198,200|
18`219,208| 225,208| 231,208| 237,208| 243,208| 249,208| 255,208|`` 5,208|``11,208|``17,208|``23,208|``29,208|``35,208|``41,208|``47,208|``53,208|``59,208|``65,208|``71,208|``77,208|``84,208|``89,208|``95,208| 102,208| 107,208| 113,208| 119,208| 125,208| 131,208| 137,208| 143,208| 150,208| 155,208| 161,208| 167,208| 173,208| 179,208| 185,208| 192,208| 198,208|
19`219,216| 225,216| 231,216| 237,216| 243,216| 249,216| 25?,216|`` 5,216|``11,216|``17,216|``23,216|``29,216|``35,216|``41,216|``47,216|``53,216|``59,216|``65,216|``71,216|``77,216|``84,216|``89,216|``95,216| 102,216| 107,216| 113,216| 119,216| 125,216| 131,216| 137,216| 143,216| 150,216| 155,216| 161,216| 167,216| 173,216| 179,216| 185,216| 192,216| 198,216|
20`219,224| 225,224| 231,224| 237,224| 243,224| 249,224| 255,224|`` 5,224|``11,224|``17,224|``23,224|``29,224|``35,224|``41,224|``47,224|``53,224|``59,224|``65,224|``71,224|``77,224|``84,224|``89,224|``95,224| 102,224| 107,224| 113,224| 119,224| 125,224| 131,224| 137,224| 143,224| 150,224| 155,224| 161,224| 167,224| 173,224| 179,224| 185,224| 192,224| 198,224|
21`219,232| 225,232| 231,232| 237,232| 243,232| 249,232| 255,232|`` 5,232|``11,232|``17,232|``23,232|``29,232|``35,232|``41,232|``47,232|``53,232|``59,232|``65,232|``71,232|``77,232|``84,232|``89,232|``95,232| 102,232| 107,232| 113,232| 119,232| 125,232| 131,232| 137,232| 143,232| 150,232| 155,232| 161,232| 167,232| 173,232| 179,232| 185,232| 192,232| 198,232|
22`219,240| 225,240| 231,240| 237,240| 243,240| 249,240| 255,240|`` 5,240|``11,240|``17,240|``23,240|``29,240|``35,240|``41,240|``47,240|``53,240|``59,240|``65,240|``71,240|``77,240|``84,240|``89,240|``95,240| 102,240| 107,240| 113,240| 119,240| 125,240| 131,240| 137,240| 143,240| 150,240| 155,240| 161,240| 167,240| 173,240| 179,240| 185,240| 192,240| 198,240|
23`219,248| 225,248| 231,248| 237,248| 243,248| 249,248| 255,248|`` 5,248|``11,248|``17,248|``23,248|``29,248|``35,248|``41,248|``47,248|``53,248|``59,248|``65,248|``71,248|``77,248|``84,248|``89,248|``95,248| 102,248| 107,248| 113,248| 119,248| 125,248| 131,248| 137,248| 143,248| 150,248| 155,248| 161,248| 167,248| 173,248| 179,248| 185,248| 192,248| 198,248|
24`219,``0| 225,``0| 231,``0| 237,``0| 243,``0| 249,``0| 255,``0|`` 5,``0|``11,``0|``17,``0|``23,``0|``29,``0|``35,``0|``41,``0|``47,``0|``53,``0|``59,``0|``65,``0|``71,``0|``77,``0|``84,``0|``89,``0|``95,``0| 102,``0| 107,``0| 113,``0| 119,``0| 125,``0| 131,``0| 137,``0| 143,``0| 150,``0| 155,``0| 161,``0| 167,``0| 173,``0| 179,``0| 185,``0| 192,``0| 198,``0|

End
Brana
Flying Officer
Posts: 169
Joined: Fri Nov 30, 2007 8:30 pm
Contact:

Post by Brana »

Only problem for lightpen is that it expects NEW coordinate at each "click" in order to "register" that new click!

Example: I "click" the mouse at some coordinates on the screen, then I do the PEEK, and I get the screen coordinates... That is OK!

But, now, I can NOT click AGAIN - before I move the mouse (lightpen) a little bit on the screen! I MUST move it to some new position on the screen or else PEEK would not work...

In another words, this lightpen system is designed to derive screen coordinates of the screen pointer, but NOT the actual TIME when the mouse (lightpen) was CLICK-ed!

Only way to use this method (mouse/lighhtpen) as the Start / Stop for a chronometer is to move a screen pointer on the screen a little bit in between the clicks! And this would require a user (human) "input", so it can NOT be 100% automatic! :((

So - back to my "drawingboard"! Looks like I'll have to dissasamble a PS2 keyboard and use the "Shift" or some other key to solve photo optic on it...

-----------------
P.S. I got my hands on a LCD-touch screen monitor!
I wonder could Euphoric detect OnScreenTouch via LightPen method on this monitor??? I am currently searching for the DOS-based drivers (if any exist!) for this Lcd-Touch-Screen! :)
User avatar
Symoon
Archivist
Posts: 2307
Joined: Sat Jan 14, 2006 12:44 am
Location: Paris, France

Post by Symoon »

Brana wrote:Only problem for lightpen is that it expects NEW coordinate at each "click" in order to "register" that new click!

Example: I "click" the mouse at some coordinates on the screen, then I do the PEEK, and I get the screen coordinates... That is OK!

But, now, I can NOT click AGAIN - before I move the mouse (lightpen) a little bit on the screen! I MUST move it to some new position on the screen or else PEEK would not work...
a few things:
- on a real screen, it's extremely rare to point to the same coordinates. Only with Euphoric and its perfect behaviour is it possible to click on the exact same values
- the values also change on a real screen, from one screen to another. If you plan to use this on a real machine, you should include some calibration system
- I forgot the initial goal so forgive me if that's a stupid idea, but couldn't you poke zero values in 992 and 993 once you have read the coordinates ? So if you "click" again at the same location, you can detect there has been a new click
User avatar
Chema
Game master
Posts: 3014
Joined: Tue Jan 17, 2006 10:55 am
Location: Gijón, SPAIN
Contact:

Post by Chema »

I was about to suggest the same thing, really.

If you only want to detect when a click happens, no need for calibration or anything. Poke values which do not correspond to screen positions (are there any?) or simply zeros after reading and you could detect clicks that way.
Brana
Flying Officer
Posts: 169
Joined: Fri Nov 30, 2007 8:30 pm
Contact:

Post by Brana »

Sorry for the delay :)

What should I POKE to?

Do I Poke (992) and (993)? If so, then with what (with zero?)

I have tried to poke 992 and 993, and it did not change a thing :(
Or - perhaps I did something wrong...?

Example, if I do the "mouse click", then PEEK (992) would have the value of, example 249, and PEEK (993) would have the value of 80.

Then I do the POKE (992) with, example 0 (zero), and also POKE (993) with 0 (zero).

But, after that, when I do the PEEK (992) I still get old value of 249, and for PEEK (993) -> 80.

Am I poking the wrong address, or it can not be done by simple "poke"-ing?
User avatar
Symoon
Archivist
Posts: 2307
Joined: Sat Jan 14, 2006 12:44 am
Location: Paris, France

Post by Symoon »

Just tested it on Euphoric, you're right, tried to poke in 992, or #3E0, the value doesn't change.
I'm no expert with input/output behaviour of plugged hardware... Does that seem strange to anyone around? I will test this on a real Oric to see how it behaves (don't expect it before July though :( )
User avatar
Chema
Game master
Posts: 3014
Joined: Tue Jan 17, 2006 10:55 am
Location: Gijón, SPAIN
Contact:

Post by Chema »

Oops... I just realized that that address is in I/O space, so it seems normal that you can't poke on it as it is no physical memory.

We should study how the lightpen hardware works. I guess it updates the values of some registers (namely #3E0-#3E1) whenever you press the pen?

In that case you can't tell the difference from two presses on the same screen area.. I think we need more information about the lightpen hardware (I miss you Fabrice).
User avatar
Symoon
Archivist
Posts: 2307
Joined: Sat Jan 14, 2006 12:44 am
Location: Paris, France

Post by Symoon »

Chema, with the real hardware, the register values change as soon as you move the pen and a light is detected.

From a user point of view on a real hardware (and from very old memories):
- the pen doesn't react on black screen, and hardly (if not at all) on red color
- the pen reacts on all other colors, sometimes starting to detect them at 1cm from the screen if they are very bright. Hence, it is almost impossible to point the exact same place twice without values changing in the meantime: even if you manage to point the same place, it's very likely that the values will change a little when you remove the pen, and when you approach it again.

All this makes different working conditions from Euphoric - but I can't see how Fabrice could have done better.

BTW, never tested the light pen on a LCD screen, not sure it would work?
Brana
Flying Officer
Posts: 169
Joined: Fri Nov 30, 2007 8:30 pm
Contact:

Post by Brana »

What happend with Fabrice? He is not "around"/here?
Post Reply