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.
Brana
Flying Officer
Posts: 169
Joined: Fri Nov 30, 2007 8:30 pm
Contact:

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

Post by Brana »

At the rear side of Oric Atmos, on a DIN connector that is used for tape recorder there was a PIN that enabled/disabled a tape motor.

I think it was called something like a "Relay PIN" or something similar (?)

I wonder can I use that pin now on a PC computer for something else, example, for turning a LED diode ON or OFF, or maybe for registering the existence of external current (in range of a couple of volts) via Euphoric.

The idea is to:
- Enable Euphoric to triger something external (in range of a couple of volts), example to turn ON or OFF a small light bulb, and/or
- Enable Euphoric to "know" about something external, example - now the current is ON, now the current is OFF (again - in range of a couple of Volts).

Is this possible with Euphoric today?

if Yes - then:

-What is the PIN equivalent (at the rear of average PC), is it via RS232 port or something else, and
- How do I address it under Euphoric (what address to PEEK/POKE?)

Best regards
Brana
User avatar
Chema
Game master
Posts: 3014
Joined: Tue Jan 17, 2006 10:55 am
Location: Gijón, SPAIN
Contact:

Post by Chema »

I doubt it does.

At most Euphoric would use the tape on/off internaly to deal with tape images, but not for interfacing the PC with external things...

But what Euphoric does is mapping the serial port (when present, as in the Telestrat) into a PC's port (check euphoric.ini), but I don't know the functionality this option gives for controlling the real port (maybe just write/read chars?)

Maybe that could be of use to you?

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

Re:

Post by Brana »

What I really would like - would be something like this small program:

1 GET A$
2 IF A$="" THEN 1
3 IF ASC(A$)=27 THEN END
4 IF A$="A" THEN {DO/TRIGER SOMETHING...}
5 GOTO 1


Now, instead of pressing letter "A" on the keyboard - Euphoric should "get" the external "input signal" via "relay" pin (if possible)?

4 IF PEEK (???) = (???) then {DO/TRIGER SOMETHING...}

If not possible, then - what about LPT1 (printer) port?

Pins for "Acknowledge" (ACK) and "Strobe" (STR) signal(s) on the LPT1 port at the back of the PC computer should be readable under Euphoric (?)
... Or not?
User avatar
Dbug
Site Admin
Posts: 4444
Joined: Fri Jan 06, 2006 10:00 pm
Location: Oslo, Norway
Contact:

Post by Dbug »

If you really want to do that, you could just get the source code of Oricutron, and do the modification.

You could also ask Xeron to do it, but I'm not sure he would be enthusiastic about implementing a feature that would really be usable by only you :)
User avatar
Chema
Game master
Posts: 3014
Joined: Tue Jan 17, 2006 10:55 am
Location: Gijón, SPAIN
Contact:

Post by Chema »

The printer port is not (afaik) connected to any external hardware. That is why printing anything on Euphoric generates a txt file (as well as in oricutron), not to the printer...

I still think you should give the serial port a go, as it is mapped to a COM port in your PC, but I have no idea about how it is managed inbetween euphoric and the PC... I think it is there to be able to connect a PC joystick or mouse (the mouse worked I think).

There are lines in the serial port that, if mapped, could be used for that, but you should ask the Euphoric masters out there or dig by yourself.

I can't help there.
Brana
Flying Officer
Posts: 169
Joined: Fri Nov 30, 2007 8:30 pm
Contact:

Re:

Post by Brana »

In Euphoric.INI file, if line stands like this:

PrinterOutput=printer.out

then Euphoric prints to hard disk file, but if edited like this:

PrinterOutput=LPT1

then it prints directly to LPT1 port (this I know - I use it on my Epson LX 300+, as well as on some POS printers at work shop (yea, just imagine it, Euphoric used for bill-printing today!!!)

So, in theory, if PrinterOutput is set to LPT1, then Euphoric reads directly from (and to) LPT1 port. So, can I "play-arround" with ACK / STR pins on LPT1 port at the back of the PC?

I know that, when sometimes I forget to turn the Epson printer ON, and I issue the "Print" command from within Euphoric, emulator then "hangs" until the printer (Epson) is swiched ON. This let's me think that I might be able to use ACK signal via LPT1 port for this purpose (???)

On the other hand, if you suggest to use serial port, then I do not know how to use it - except maybe to use mouse-click? Or, am I wrong here?

Example, to attach a (real) mouse at the RS232 port and to get Euphoric to detect let's say - left mouse click (?)
User avatar
Chema
Game master
Posts: 3014
Joined: Tue Jan 17, 2006 10:55 am
Location: Gijón, SPAIN
Contact:

Post by Chema »

Well yes, you are right there. Sorry for the confusion, but that should not change the fact that I think you cannot control the individual lines of the printer port. It is the same as typing the file to LPT1.

With the serial controller it could be different, as I recall I have seen a small dot moving in the Oric screen when I moved the mouse, but I am not sure how that worked and I might be wrong.

IF the serial port is somehow mapped into the oric's, then it MAY be possible that you could somehow get the status of some lines (RTS CTS for instance), but I am speculating here...

Anybody with deeper understanding could help?

EDIT: I was wrong. It was the lightpen extension what I saw.
Brana
Flying Officer
Posts: 169
Joined: Fri Nov 30, 2007 8:30 pm
Contact:

Re:

Post by Brana »

Maybe I am bringing this from the wrong angle? Maybe I am being too technical here? So,let me try it one more time, but this time from whole different perspective!

Please consider this web site:

http://www.brshobbies.com/catalog.php/B ... hronometer

On it, you will find a "SCX Digital #25040 Chronometer" which is a toy, and I want to use Euphoric instead of it!


So, what I whant is - simple - to build a small timer-program in Euphoric BASIC, and to let know the Emulator when the vehicle (toy) run's by it's sensor!

In order to accomplish this - I need two things:

1) - Photo sensor (Photo-optic) attached to the computer, and
2) - Euphoric capable to be "triggered out" by it's external sensor (photo optic)

I am thinking to solve it by using one of the following methods:

Method #01: To disassemble a MOUSE and to solver a photo optic sensor to left mouse key, and to program Euphoric to detect a Mouse-Click (?)

---or:---

Method #02: To attach a photo optics to a STR / ACK pins on computer's LPT1 port (still figuring out this one...?)

---or:---

Method #03: To disassemble a PS2 keyboard and to solve a photo optic to a, let's say left-shift key, and then to program Euphoric to detect left shift key pressed (ON/OFF)?

Any suggestion "culler" or "better" than mine - would be appreciated! :)

P.S: Sorry, Oricutron is NOT an option, for it MUST be "real Euphoric"!
In addition to it - it MUST be able to work on Win98 too :)
User avatar
Dbug
Site Admin
Posts: 4444
Joined: Fri Jan 06, 2006 10:00 pm
Location: Oslo, Norway
Contact:

Re:

Post by Dbug »

Brana wrote:P.S: Sorry, Oricutron is NOT an option, for it MUST be "real Euphoric"!
Why?
User avatar
Twilighte
Game master
Posts: 819
Joined: Sat Jan 07, 2006 12:07 am
Location: Luton, UK
Contact:

Post by Twilighte »

I agree with Dbug, in many ways Oricutron is more accurate than Euphoric, although for stability (here at least) and ease of use (primarily because i am very familiar with the controls) i prefer Euphoric.

Oricutron emulates elements of the 6522 that Euphoric never did.
It is also more accurate at some sound elements.

Euphorics handling of Printer output is dubious, dumping to the last selected disk directory. But its handling of disks and tapes excels Oricutron atm.

I find it is much easier to develop software on euphoric than Oricutron but possibly that will change as i understand better ways of telling Oricutron what tape and disk to look at. :P

And more important than anything else Euphoric is a closed project but Oricutron is still work in progress.
User avatar
carlsson
Pilot Officer
Posts: 127
Joined: Thu Jan 12, 2006 11:26 pm
Location: Västerås, Sweden

Post by carlsson »

Perhaps Brana wants to run it on an older PC with MS-DOS, while Oricutron runs in newer Windows?
Anders Carlsson
User avatar
Chema
Game master
Posts: 3014
Joined: Tue Jan 17, 2006 10:55 am
Location: Gijón, SPAIN
Contact:

Post by Chema »

Yep, I think that might be the reason. Brana is doing applications which are used today, but run on Euphoric :)

Sorry for not being able to help you more in this field. This problem needs understanding of Euphoric which is beyond my knowledge.

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

Re:

Post by Brana »

Of course - I have nothing against any new emulator other than Euphoric, but there are some (private, and specific - maybe only to me) reasons why I must insist to keep using the >>>Euphoric<<< emulator.

And these reasons are:

1) Host operating system issues:

I still have two (old) computers at home , one of them is running on Win98 but the other one (486) is at Win95!!!
And since new emulator cannot be launched on host system earlier than WinXP (I think?) - therefore I have to use the Euphoric.


2) CLOAD (and RECALL) difference:

I have developed approximately around two Megabytes of my wery own TAP files! :) These are BASIC-written programms intended for my own need, and I know how Euphoric CLOAD's them.
On the new emulator it's a bit different... This "CLOAD-difference" might impact in major change to most of my programs... So again -- I have to use Euphoric. :)


3) Launching Euphoric from Autoexec.bat file:

Due to my rather-specific program named "Boot Logger", which purpose is to evident the each computer power-on (or restart) and is executed trought the Euphoric via AUTOEXEC.BAT file of the Windows, I added the following lines to my Autoexec.bat file like this:

copy C:\Ilog\boot\reg.tap c:\Ilog\reg.tap
CD Ilog
euphoric.exe -d oricdos.dsk


This is something that I wouldn't know how to accomplish with some other kind of emulator (?)


4) Familiar interface:

On Euphoric I know "my way" around "F" (Function) keys, and this emulator can be used fully without a computer-mouse. In addition to it, I sometimes use screen-output from the Euphoric and combine it with some other graphic elements via PhotoShop or AdobePremiere. Again - this is something that I wouldn't know how to do with some other emulator?


5) Full screen mode:

Euphoric is in full screen mode. although some new LCD monitors and Windows Wista does NOT support this screen mode, I like it, and prefer to have (my) program running "in full screen", that is to say "DOS-oriented".

-------------------------------------------------------
-------------------------------------------------------
P.S. It looks like Chema was right, for I spent last weekend on testing my "LPT1 idea", and it appears that Euphoric does NOT address the LPT port directly after all! :(

Example:

I launch Euphoric, turn ON the "Virtual printer", and issue a simple LPRINT command.
(Ofcourse, Euphoric.INI is set to print directly to LPT port, and I have my Epson LX+ printer attached to it).

So, after issuing the LPRINT "Test" command, Euphoric would always answer with "Ready" in the line below, no matter on the state of the real printer (Turned ON/OFF)!

In another word - if the real printer (my Epson) was turned ON - then Euphoric would successfully print "TEST" on it...
But, when my real printer was turned OFF - Euphoric would still transfer the LPRINT command to the LPT port of the host computer (ignoring current absence of ACKNOWLEDGE signal!!!) and, as a result, couple of seconds later - Win98 would pop-up with the following message:

"There was an error sending your document to the printer..."

So, this proves that I can NOT use the LPT port for this idea... Darn! :)

-------------------------------------------------------
Can someone tell me the BASIC command to detect Left-Mouse-Click on Telestrat, please?
Last edited by Brana on Wed Apr 28, 2010 6:33 pm, edited 1 time in total.
User avatar
Chema
Game master
Posts: 3014
Joined: Tue Jan 17, 2006 10:55 am
Location: Gijón, SPAIN
Contact:

Post by Chema »

Ok, this might or might not be useful in your case, but have you taken a look at the lightpen emulation? I would be like adding a mouse (with just one button) to the Oric (the lightpen is really controlled with the computer mouse, no need of extra hardware).

You have a lot of information in Symoon's pages here:

http://reocities.com/paris/7150/optiqe.htm

Can't see how to actually map this to any external signal, but who knows...
User avatar
Symoon
Archivist
Posts: 2307
Joined: Sat Jan 14, 2006 12:44 am
Location: Paris, France

Post by Symoon »

Hey, what is that, "reocities" ?
How did they copy the content of my website ?
How am I supposed to manage it ?
:?

(edit: sorry for being off-topic, just read the FAQ, seems like I can ask the content to be removed... We'll see, in the meantime I don't have time to set up my old website anywhere else, so...)
Post Reply