Emulating an RS-232 line with the Oberon emulator
Does anyone know how one can link TWO emulated Oberon instances? The idea would be to start two Oberon instances with the Oberon emulator on a host system (e.g., Mac, Linux, Windows) and then “link” them with a mechanism that e.g. behaves like an RS-232 line: "Oberon instance A” <---> “Link that emulates an RS-232 link” <—--> “Oberon instance B” From the source code of the Oberon emulator at www.github.com/charlesap/io I see that the two file transfer commands “pcsend.sh" and “pcreceive.sh" are realized via a file interface (the files PCLink.REC and PCLink.SND are written by these two commands, and the emulator then reads from or writes to them if the program PCLink1 running inside the emulator reads from or writes to the memory addresses -56 and -52, i.e. the addresses which map the RS-232 line, see RS232.Mod). So it *should* be possible to extend this mechanism such that the two ends are permanently “connected" together. On Mac or Linux, the pipe mechanism might be used to accomplish this. -AP
the emulator then reads from or writes to them if the program PCLink1 running inside the emulator reads from or writes to the memory addresses -56 and -52, i.e. the addresses which map the RS-232 line, see RS232.Mod).
So it *should* be possible to extend this mechanism such that the two ends are permanently âconnected" together. On Mac or Linux, the pipe mechanism might be used to accomplish this.
The way PCLink1.Mod is written, the send or receive is always initiated from the "other" machine, so you would have a chicken-and-egg problem at present I think. But the emulator could check for e.g. the presence of a named pipe and use that for RS232 I/O, set on the command line for the first or both invocations, and falling back to looking for the presence of those trigger files. Then you'd just extend PCLink1 to be able to initiate the conversation. Don't forget to take into account the zero-length final packet, some idiot forgot that ;-) Cheers, Paul
This is now possible with my emulator, https://github.com/pdewacht/oberon You can set it up like this: mkfifo pipe1 pipe2 risc --serial-in pipe1 --serial-out pipe2 ob1.dsk & risc --serial-in pipe2 --serial-out pipe1 ob2.dsk & This works on Linux, I'm not sure how portable the code is. Some notes: * If you use this feature, the built-in PCLink1 handling is disabled. * Don't use the same disk image for multiple instances of the emulator. * You can use /dev/fd/n if you want to connect to a file descriptor instead of a file * Transfer speed might be rather poor, as the emulator pauses when it detects that Oberon is busy-waiting on I/O. On Tue, Oct 24, 2017 at 8:08 PM, Andreas Pirklbauer <andreas_pirklbauer@yahoo.com> wrote:
Does anyone know how one can link TWO emulated Oberon instances? The idea would be to start two Oberon instances with the Oberon emulator on a host system (e.g., Mac, Linux, Windows) and then “link” them with a mechanism that e.g. behaves like an RS-232 line:
"Oberon instance A” <---> “Link that emulates an RS-232 link” <—--> “Oberon instance B”
From the source code of the Oberon emulator at www.github.com/charlesap/io I see that the two file transfer commands “pcsend.sh" and “pcreceive.sh" are realized via a file interface (the files PCLink.REC and PCLink.SND are written by these two commands, and the emulator then reads from or writes to them if the program PCLink1 running inside the emulator reads from or writes to the memory addresses -56 and -52, i.e. the addresses which map the RS-232 line, see RS232.Mod).
So it *should* be possible to extend this mechanism such that the two ends are permanently “connected" together. On Mac or Linux, the pipe mechanism might be used to accomplish this.
-AP
-- Oberon@lists.inf.ethz.ch mailing list for ETH Oberon and related systems https://lists.inf.ethz.ch/mailman/listinfo/oberon
And I got the link wrong... https://github.com/pdewacht/oberon-risc-emu On Tue, Oct 24, 2017 at 10:17 PM, Peter De Wachter <pdewacht@gmail.com> wrote:
This is now possible with my emulator, https://github.com/pdewacht/oberon You can set it up like this:
mkfifo pipe1 pipe2 risc --serial-in pipe1 --serial-out pipe2 ob1.dsk & risc --serial-in pipe2 --serial-out pipe1 ob2.dsk &
This works on Linux, I'm not sure how portable the code is.
Some notes: * If you use this feature, the built-in PCLink1 handling is disabled. * Don't use the same disk image for multiple instances of the emulator. * You can use /dev/fd/n if you want to connect to a file descriptor instead of a file * Transfer speed might be rather poor, as the emulator pauses when it detects that Oberon is busy-waiting on I/O.
On Tue, Oct 24, 2017 at 8:08 PM, Andreas Pirklbauer <andreas_pirklbauer@yahoo.com> wrote:
Does anyone know how one can link TWO emulated Oberon instances? The idea would be to start two Oberon instances with the Oberon emulator on a host system (e.g., Mac, Linux, Windows) and then “link” them with a mechanism that e.g. behaves like an RS-232 line:
"Oberon instance A” <---> “Link that emulates an RS-232 link” <—--> “Oberon instance B”
From the source code of the Oberon emulator at www.github.com/charlesap/io I see that the two file transfer commands “pcsend.sh" and “pcreceive.sh" are realized via a file interface (the files PCLink.REC and PCLink.SND are written by these two commands, and the emulator then reads from or writes to them if the program PCLink1 running inside the emulator reads from or writes to the memory addresses -56 and -52, i.e. the addresses which map the RS-232 line, see RS232.Mod).
So it *should* be possible to extend this mechanism such that the two ends are permanently “connected" together. On Mac or Linux, the pipe mechanism might be used to accomplish this.
-AP
-- Oberon@lists.inf.ethz.ch mailing list for ETH Oberon and related systems https://lists.inf.ethz.ch/mailman/listinfo/oberon
participants (3)
-
Andreas Pirklbauer -
Paul Reed -
Peter De Wachter