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