Previous Thread
Next Thread
Print Thread
#65107 10/18/10 02:53 AM
Joined: Feb 2000
Posts: 212
T
Senior Member
OP Offline
Senior Member
T
Joined: Feb 2000
Posts: 212
After finishing with the last rounds of bug fixes I wanted to try to see if I could get some sort of bidirectional serial support in SLDMESS.

I took a look at the bitbanger implementation the CoCo uses and quickly discovered it was unidirectional. So I had to add bidirectional support to it and hook all the new bits into the CoCo. I did loose the neat auto baud detection it had, I could not get it to work above 2400 baud. Now there is some UI to select the baud.

I don't have many real serial devices here to test with so took a short cut. I decided to add psuedo terminal support to the Mac OS X version of SDLMESS. I added a test in sdlfile.c for '/dev/pty*'. This non existing device triggers a call to openpty(). I also set a flag to read and write using read(2) and write(2), not pread and pwrite. The man page suggested pread/pwrite would work with a psuedo terminal, but in actuality it doesn't. I think it is an OS bug.

I made a movie to show it all off: PsuedoTerminalSDLMESS.mp4

So far the fastest i've tested the new bitbanger port is at 9600. But I know a real CoCo 3 (in double speed mode) is capable of 115,200 baud (using a special block I/O scheme). I plan to test that soon. Also I'll implement full I/O on the Deluxe RS-232 pak, and the Direct Connect modem pak. Thoes are UART based devices. It will be much nicer dealing with whole bytes.

I'd like to talk about getting this integrated into the official SDLMESS.

Here is the patch: pttysdlmess.patch.zip


tim lindner
tlindner@macmess.org
Joined: Mar 2001
Posts: 16,757
Likes: 29
R
Very Senior Member
Online Content
Very Senior Member
R
Joined: Mar 2001
Posts: 16,757
Likes: 29
That's pretty cool. I'll definitely take a look at the patch.

Joined: Feb 2000
Posts: 212
T
Senior Member
OP Offline
Senior Member
T
Joined: Feb 2000
Posts: 212
Thanks!

BTW: there is a patch here sdlmess-coco-dwsck-ffe0.patch
This patch opens a socket (inet) connection and hooks it directly to the address bus of the CoCo. Obviously something that would never make mainline.

I'm told the implementation works on Mac, Linux and WIndows. Maybe this could also be fit into sdlfile.c. Either in addition to the pseudo terminal, or as a replacement to the pseudo terminal.


tim lindner
tlindner@macmess.org
Joined: Feb 2008
Posts: 326
M
Senior Member
Offline
Senior Member
M
Joined: Feb 2008
Posts: 326
This looks quite nice and as general thing it can replace pseudo terminal (main reason why it is added was that we missed things like this).

Good thing is that by this we can make two MESS drivers actually talk to each other.

Joined: Feb 2000
Posts: 212
T
Senior Member
OP Offline
Senior Member
T
Joined: Feb 2000
Posts: 212
For those of you who watched the movie, I just solved my little netcat problem:

nc -l 6809 0<>/dev/ttys001 >&0

I have to use <> to open the device for reading and writing. Previously I was opening the device only for reading.


tim lindner
tlindner@macmess.org

Link Copied to Clipboard
Who's Online Now
1 members (R. Belmont), 21 guests, and 3 robots.
Key: Admin, Global Mod, Mod
ShoutChat
Comment Guidelines: Do post respectful and insightful comments. Don't flame, hate, spam.
Forum Statistics
Forums9
Topics8,943
Posts117,564
Members4,994
Most Online890
Jan 17th, 2020
Forum Host
These forums are hosted by www.retrogamesformac.com
Forum hosted by www.retrogamesformac.com