Page 1 of 1

PCjr as VT100 dumb terminal to Linux...

Posted: Tue Apr 26, 2022 3:39 pm
by bminear
Hi. I'm struggling to get my PCjr to work as a simple vt100 dumb terminal to Linux. It's really close, the normal welcome and login prompt from Linux is transmitted and displayed about 50% intact, with the other 50% being random characters interspersed, and then an endless stream of more random characters while it waits for me to put in my Linux username/password. I've been working on this for a while so I thought it was time to throw it out to people smarter than me. I've scoured the forums looking for past threads on the topic and I think I've tried/followed everything, but my apologies if I missed something. My setup:

736KB via 128KB onboard and jr-IDE for remainder
MS-DOS 3.3 (booting from SD card on jr-IDE if it matters)
IBM branded PCjr Serial Adapter connected to null modem cable connected to linux machine serial port
Parallel Port sidecar
Procomm 2.1 and 2.4.3 (both result in same behavior)

To eliminate possible issues with cable, procomm configuration, linux configuration, etc I connected it up to an IBM PC 5150, and XT 5160 and it worked perfectly using the same linux machine, the same null modem cable, same procomm configuration, same versions of DOS, etc.

I also ran the advanced PCjr diagnostics with the serial dongle (ctrl-alt-ins then ran the RS-232 test) and it worked fine ("*" result).

Per the maintenance manual I also did a continuity test of the pins of the serial adapter, all good.

What I've tried:

- COMSWAP (with and without) just in case procomm wasn't doing the right thing. I have NO internal modem in the PCjr.
- 9600, 2400 and 1200 baud rates (COM2:8,1,N) based on lots of threads saying 9600 is a longshot.
- PC-DOS 3.0, MS-DOS 3.3
- Tried just using "TERM" from Cartridge Basic and a completely stripped down stock PCjr, but if the serial cable was connected to the linux machine the TERM program would not progress past "(TERM) Terminal Emulator" and just hang. If I unplugged the cable from the linux machine (but the other end still plugged into PCjr) then it would display the "1 Line Bit Rate..." etc options. I don't know if that gives a hint, but wanted to mention that behavior.

Mike mentioned in an unrelated post to disable handshaking stuff (CTS/DTR...), but I honestly couldn't figure out how to do that in procomm and my procomm configuraton and linux configuration works fine on PC, XT...

I also stripped down the PCjr to no sidecars, but then I didn't have enough memory for Procomm :)

It's almost like there is noise, or generally stray bits getting into the stream, or an address/int conflict, or something.

config.sys:

stacks=0,0
files=40
buffers=40
device=jrconfig.sys /C /L /V32 /E3
device=lowrd.sys

autoexec.bat:

echo off
path=c:\;c:\dos;c:\util
prompt $p$g
rtc /D
ver

Any ideas of what I could try? Again, I know the linux config is good, and I know the cables are good, and I know the procomm config is good (or at least it's happy on a PC or PC XT), and I see lots of posts where people have done this without any issue. What am I missing????

Thanks.

Brian

Re: PCjr as VT100 dumb terminal to Linux...

Posted: Tue Apr 26, 2022 3:57 pm
by Brutman
I loved Procomm 2.4.3 and I used it a lot. It's still my go-to terminal emulator for DOS, but I wish I had a version that supported 43 or 50 line screens.

Anyway, to your question ...

Procomm does not know about the PCjr so it doesn't program the baud rate divisor on the UART correctly. This is generally not a problem at the lower speeds, and serial comms is asynchronously clocked away so there is plenty of room for slop. 1200 and 2400 BPS should be fine. 4800 is supported by the BIOS, and should be fine too, but more error creeps in. 9600 is going to result in a lot of dropped characters, especially as the screen refreshes. And you absolutely can not use the keyboard while bytes are being received because they will be dropped.

JrIDE should not be a problem for any of this, so don't bother removing that from the system.

The corruption that you speak of does not seem like a baud rate mismatch or characters being dropped. You might have a physical problem, like an intermittent connection on the serial cable.

When you are using the stripped down machine and the TERM program, it might be hanging because of CTS/DTR, ... It should not actually be a hang - it should be a timeout - how long did you wait? Also, you can always hot-plug serial, so you can get TERM setup at 1200,N,8,1 with no hand shaking and then connect the cable to the Linux box.

Your config files look fine. You should not need to use Comswap; I don't think Procomm uses interrupts so it just needs the I/O port address to work correctly. (Comswap is useful where there is a mismatch on the PCjr because the IRQ doesn't line up with the usual com port I/O address.)

Do you have an RS-232 breakout box? It would be nice to see the signaling between the two machines ...

Re: PCjr as VT100 dumb terminal to Linux...

Posted: Fri Apr 29, 2022 1:01 pm
by bminear
OK, it's solved, well sorta. I wanted to follow-up on a few behaviors I saw and ultimately what ended up working.

First, using TERM. Per Mike's suggestion I stripped jr down to the minimum, including no internal 64K card and ran TERM from the basic cartridge. If the serial cable is plugged in when TERM is launched then it just sits at the TERM greeting forever...ok, I gave up after about 10 minutes which I figured would be longer than any timeout. So I then unplugged the cable, rebooted, ran TERM and the configuration menu then comes up immediately, change to 1200,n,8,1, then plug cable back in and it then hangs. After pressing a handful of some keyboard keys jr just starts beeping at each keypress. If after jr/term appears to be hung i unplug the cable then it becomes responsive again, but if I then plug it back in TERM says FILE OPEN ERROR. So TERM is definitely not happy with the serial cable connected.

Back to Procomm 2.4.3. I then rebuilt jr back to normal operating mode (side cars, memory, etc) and booted DOS, ran Procomm to make sure I was back to original problem (lots of junk characters interspersed in attempted communication from Linux machine). Yes, everything was back to original symptoms. Then, even though the same linux machine and cables are fine when using IBM PC or PC XT w/ Procomm as dumb terminal I decided to try a different server. I hooked up a Sun workstation w/ SunOS instead of Linux running on a Pi AND IT WORKED PERFECTLY. Perhaps the difference being that when using the Sun I can use a DB25 to DB25 null modem cable directly between the Sun and the JR serial adapter. But when I was using Linux on a Pi I the serial cable had to be connected to a USB-to-Serial adapter.

So now I'm at least partially satisfied that jr can be a dumb terminal, but doesn't seem to like whatever is coming over the serial cable after passing through the USB-to-serial adapter. Or maybe it's Linux, but doubtful. I will do some more testing loater to isolate whether it's Linux, or the USB-to-serial adapter. I suspect the adapter is putting some noise or other bits on the line that jr doesn't like but pc and pcxt are fine with.

I do not have an rs-232 breakout box, but I see they're cheap, so as a new project I might dive in there...