[Coco] Emulating RS-232 Pak?
tim lindner
tlindner at macmess.org
Wed Feb 14 19:53:46 EST 2018
On Tue, Feb 13, 2018 at 8:29 AM, Allen Huffman <alsplace at pobox.com> wrote:
> Do any CoCo emulators emulate the RS-232 Pak or Serial I/O port?
The MAME emulator does emulate the bit bangger port and the rs-232 serial pak.
I just did some experimenting about found some bugs. :)
On the command line you can attach a dumb terminal to the serial port like this:
mame64 coco3 -rs232 terminal
This will start MAME with two screens, the CoCo screen and a terminal
window. They both get the same keyboard input, at the same time. I
could not figure out how to direct the keyboard to either one or the
other. You have to use the MAME UI to set the speed and settings of
the serial port to match what BASIC will be sending down the pipe. If
you poke BASIC to go faster or slower you'll need to use the MAME UI
to reconfigure the port.
Also when I print #-2, from the CoCo it seems to wait for a response
from the terminal before printing the next character. I think this was
something Tandy printers did by default. There doesn't seem to be a
way for the terminal emulator to do this.
I next tried the pseudo terminal interface.
mame64 coco3 -rs232 pty
This will cause MAME (on unix machines) to create a bi-directional
pseudo terminal. You use the MAME UI to find out that name of the
pseudo terminal, on my system it was always /dev/ttys001. With this
setup you can use the unix Screen command to create a terminal
emulation in one window communicating with the CoCo emulation in
another:
screen /dev/ttys001
I was using Twilight terminal to test, and I could not get anything I
typed on the CoCo to correctly display characters on the terminal. I
always got UNICODE <?> missing characters. But whatever I typed on the
terminal side it did correctly show up in Twilight Terminal. So it was
half working.
You can also use the NetCat program to broadcast the pseudo terminal
on to the wider internet:
nc -l 6809 0<>/dev/ttys001 >&0
This will open a listening port on your computer (port number 6809).
If anyone connects it will pipe the information bi-directionally to
and from the CoCo emulation.
I also see a Deluxe RS-232 Program Pak being emulated. It is a slot
device that can be put into the CoCo's expansion port or the multi
pak:
mame63 coco3 -ext rs232
mame64 coco3 -ext multi -ext:multi:slot2 rs232
I expected a new slot to be created where you could specify an
emulated terminal or a psuedo terminal but nothing show up in the
-listslots command.
This deserves more study and bug fixes. I'll see what I can do.
--
--
tim lindner
"Proper User Policy apparently means Simon Says."
More information about the Coco
mailing list