• Please review our updated Terms and Rules here

Termcaps for VT100

The issue with the random characters still pops up.. so maybe it is an issue with the VT100 terminal type. I have tried various terminal types in the past with other issues..
The terminal stuff in UNIX is notoriously complex, with many layers interacting.

What would be ideal is to maybe dump the ROM from the Altos 3 terminal somehow and build a terminal type based on that ROM?
That's not ideal at all. I would try to see how far you can get with an extremely simple terminal, such as a VT-52. If I remember correctly, HyperTerminal should be able to support it (Windows 3.1 "Terminal" supports TTY, VT-100/ANSI and VT-52).

You can also try SyncTerm, which is designed for BBS systems. It's therefore more likely to handle the terminal emulation better; BBS software tends to stress those parts more.
 
This is the glitch I am really trying to get rid of. If I am in a document within the Uniplex word processor program and I use arrow down to scroll down as I said sometimes miscellaneous characters appear (See photo). I'm just thinking maybe there is a configuration somewhere where I could add a delay to the arrow down and up keys.. I just recall seeing in the termcaps a section about the delay factor in milliseconds or something to that nature that perhaps would tweak this.
I think that what you're thinking of there is along the lines of Vim's timeout and ttimout options: how long the program should wait after receiving characters that start an escape sequence before it decides that no more characters are coming for that sequence and it should process whatever it's got.

If the issues you're seeing always come up only when using keys that generate multiple-character sequences, such as arrow and function keys, this might be a setting to look for. I don't recall how these are handled in programs that use termcap, or in the curses library; this may also be a setting (perhaps hardcoded) in the program itself, in which case your only real option may be to try a faster terminal connection. But honestly, this doesn't seem to me a likely cause; I can't imagine what would cause a terminal arrow/function key sequence to be slow except for a seriously broken terminal program.

But from the nature of the photos you posted, I'm actually suspecting noise on the serial line. (Any noise that affects a terminal control code sequence or multi-character sequence from an arrow/function/etc. key or would produce particularly dramatic results.) You could try hooking up your PC to the cable/port being used by the Altos terminal to see if it's the cabling or serial port on the Xenix machine, and also slowing down the bps rate will usually result in less interference from noise, if that's the problem.
 
I think that what you're thinking of there is along the lines of Vim's timeout and ttimout options: how long the program should wait after receiving characters that start an escape sequence before it decides that no more characters are coming for that sequence and it should process whatever it's got.

If the issues you're seeing always come up only when using keys that generate multiple-character sequences, such as arrow and function keys, this might be a setting to look for. I don't recall how these are handled in programs that use termcap, or in the curses library; this may also be a setting (perhaps hardcoded) in the program itself, in which case your only real option may be to try a faster terminal connection. But honestly, this doesn't seem to me a likely cause; I can't imagine what would cause a terminal arrow/function key sequence to be slow except for a seriously broken terminal program.

But from the nature of the photos you posted, I'm actually suspecting noise on the serial line. (Any noise that affects a terminal control code sequence or multi-character sequence from an arrow/function/etc. key or would produce particularly dramatic results.) You could try hooking up your PC to the cable/port being used by the Altos terminal to see if it's the cabling or serial port on the Xenix machine, and also slowing down the bps rate will usually result in less interference from noise, if that's the problem.
Great Idea! I will try a local USB to serial connection with the terminal program and see how that fairs... of course this does not happen on the standard Altos III terminal what so ever. I'll let you know.. And yes you are thinking exactly along the lines I am about the timeout when pressing the arrow keys (or any key too fast). It's just so odd... I do have it at 19.2 and I think I tried 9600 as well.. I'll tinker with speeds and a local cable to weed out the serial to IP module device.
 
The terminal stuff in UNIX is notoriously complex, with many layers interacting.


That's not ideal at all. I would try to see how far you can get with an extremely simple terminal, such as a VT-52. If I remember correctly, HyperTerminal should be able to support it (Windows 3.1 "Terminal" supports TTY, VT-100/ANSI and VT-52).

You can also try SyncTerm, which is designed for BBS systems. It's therefore more likely to handle the terminal emulation better; BBS software tends to stress those parts more.
Svenska I will give SyncTerm a look now :) I will give it a shot and report back :) Thank you for all of your help as always.
 
#2. The second photo show's the stty -a which is setup on a remote connection on a laptop via IP as a vt100 in pconfig.
Oh, I'd missed this bit! Yes, running it over IP could be the entire issue there; the packetisation might be breaking up the control sequences.
 
Ok so after all that!!! It seems to be my serial to IP module... Connecting it locally doesn't cause any misc characters in a document.. even at 19.2 baud

Any recommendations on a reliable serial to IP converter module? I am using a Hexin Device Server right now.. but I do also have a USR branded one.. I just have to figure out the pinout on the USR one... The Hexin has a male connection on it and the USR has a female connector.. It's been so long since I've tinkered with the pinouts on these things. Is there a better one out there? At work I use DigiPort 16 port ones and they are wonderful.. but I don't need a 16 port one. Suggestions??? The interface for these are difficult as the English to Chinese grammar is not easy sometimes... :p

Here is what I have currently.. I just have to spend some time working on the pinout of the wires to the RJ45
 

Attachments

  • serialtoip.jpg
    serialtoip.jpg
    70.6 KB · Views: 3
Oh, I'd missed this bit! Yes, running it over IP could be the entire issue there; the packetisation might be breaking up the control sequences.
You were correct! Either way I did learn a lot on the termcaps and the parameters and also that there are multiple termcap files in different application folders.
 
Any recommendations on a reliable serial to IP converter module?
I am not clear on how you have these set up. Are you using a serial port on your PC and then a pair of these back to back, or do you have no (physical) serial port at all on your PC and you're using telnet or some similar protocol to connect to the module that's acting as a terminal server? If the former, you could try the latter mode to see if that helps.

If your two machines are within about 15 m of each other, you might want just to run a serial cable. You can even re-use existing Ethernet cable for that purpose with a couple of DB-25 and/or DE-9 to 8P8C adapters, perhaps the very same cable you're already using. You could extend that considerably further with an active USB extension cable between a USB RS-232 adapter and your computer.
 
Yeah its a Serial -> IP converter... coming off of a serial port on a Xenix box (only one unit). So I can telnet to the serial port over the wifi on my laptop. It's just more convenient than sitting at an old CRT terminal.. I did think about doing the cat 5 ethernet cable with the serial to USB now as last resort.. if that's what I gotta do then that's what I gotta do. Hmmmm maybe I can tweak something on my wireless on my laptop that could potentially be interfering... I'm sure I can figure a way now that I know what's doing it. Perhaps it's this cheap unit that I have.. I'll just say it's not the best quality.
 
Well I think I found the best terminal emulator.. good ole Procomm Plus V4.8 from back in the day. Very configurable and flexible for these old systems... It will emulate a bunch of old terminals such as the Wyse line and so on.. that have the function keys and whatnot that I need. I can also map the keyboard commands through the program!!! After trying about 20 different ones this one I have to say is the best yet!!!

I remember using Procomm Plus way back on a Comdial phone system... I had forgotten about it.
 
I still have the issue with the serial to IP but I think I will just get a DigiPort TS 16 which I love or alternatively wire up a cat 5 to my room with a serial to usb adapter I have to avoid those random characters while scrolling. But I do have to say the Procomm Plus is not bad.
 
  • Like
Reactions: cjs
Just in case anyone does have too much money and wants to go down that road, be warned that if your link is relatively short, you might need to get some optical attenuators, based on what little experience I have with long haul networking gear :LOL:
Lol.. I live in a relatively small one bedroom apartment. Should be less than 50 meters.. I'm going to hold off though until I get these termcaps all situated... I've made progress but it's been a royal PIA.
 
Ok all I have made significant progress with the termcap's.. So there is a termcap file for the menu system and mostly each of the applications.. So I had to go searching for them all. I have been able to pretty much clear up any issues with most applciations except Uniplex. This is the Termcap for the VT100 and the VT220. I am using the VT220 to be able to use the function keys 1-10.. So now I have the opposite issue of what I had originally. I could use the function keys from F1 - F4... Now I can only use F5 - F10.. Perhaps someone might be able to suggest a solution? When I do depress the FN key followed by F1, F2, F3, F4 I get text in the document letters P, Q, R, S... I just need to figure out what characters I have to program in those spots as you can see below in the VT220 they are programmed EOP, EOQ, EOS. I have also put a few notes down below these termcaps that I found in a termcap file.. maybe that could be helpful.. any ideas would be greatly appreciated :)

d1|vt100|DEC VT100:\
:up=\E[1A:do=\E[1B:nd=\E[1C:bc=\E[1D:cm=\E[%i%d;%dH:ho=\E[H:\
:co#80:li#24:am:cl=50\E[;H\E[2J:bs:cm=5\E[%i%2;%2H:nd=\E[C:up=\E[A:\
:ce=3\E[K:cd=50\E[J:so=\E[7m:se=\E[m:us=\E[4m:ue=\E[m:\
:is=\E>\E[?3l\E[?4l\E[?5l\E[?7h\E[?8h:ks=\E[?1h\E=:ke=\E[?1l\E>:\
:if=/usr/lib/tabset/vt100:ku=\EOA:kd=\EOB:kr=\EOC:kl=\EOD:\
:kh=\E[H:k1=\EOP:k2=\EOQ:k3=\EOR:k4=\EOS: pt:sr=5\EM:
:am:le=^H:bs:li#24:co#80:cm=\EY%+ %+ :cd=\Ek:ce=\EK:nd=^F:\
:up=^Z:cl=^L:ll=^A:kl=^U:kr=^F:kd=^J:ku=^Z:kh=^A:\
:so=^N:se=^O:us=^N:ue=^O:is=^O\E0`:vs=^O\E0P:ve=^O\E0`:

d3|vt220|DEC VT220 in vt100 emulation mode:\
:ae=4\E(B:al=\E[L:am:as=2\E(<:\
:bl=^G:bs:\
:cd=50\E[J:ce=3\E[K:cl=50\E[;H\E[2J:cm=10\E[%i%d;%dH:\
:co#80:cr=^M:cs=\E[%i%d;%dr:\
:dc=\E[P:dl=\E[M:do=\E[B:ei=\E[4l:ho=\E[H:\
:if=/usr/lib/tabset/vt100:im=\E[4h:is=\E[1;24r\E[24;1H:\
:ke=\E>:ks=\E=:\
:k1=\EOP:k2=\EOQ:k3=\EOR:k4=\EOS:k5=\E[17~:\
:k6=\E[18~:k7=\E[19~:k8=\E[20~:k9=\E[21~:k0=\E[29~:\
:kb=^?:kd=\E[B:kl=\E[D:kr=\E[C:ku=\E[A:\
:le=^H:li#24:\
:mb=2\E[5m:md=2\E[1m:me=2\E[m:mi:mr=2\E[7m:\
:nd=\E[C:nl=^J: pt:\
:rc=\E8:rf=/usr/lib/tabset/vt100:\
:rs=\E>\E[?3l\E[?4l\E[?5l\E[?7h\E[?8h:\
:sc=\E7:se=\E[m:sf=\ED:so=\E[7m:sr=\EM:\
:ta=^I:ue=\E[m:up=\E[A:us=\E[4m:vt#3:xn:\
:GS=\E(0:GE=\E(B:\
:G1=k:G2=l:G3=m:G4=j:GV=x:GH=q:\
:GU=v:GD=w:GC=n:GL=u:GR=t:

These are other entries I found in another termcap file mentioning Fkeys 1-4

# vt220:
# This vt220 description maps F5--F9 to the second block of function keys
# at the top of the keyboard. The "DO" key is used as F10 to avoid conflict
# with the key marked (ESC) on the vt220. See vt220d for an alternate mapping.
# PF1--PF4 are used as F1--F4.
#
de|vt220|DEC VT220 in vt100 emulation mode:\
:ae=4\E(B:al=\E[L:am:as=2\E(<:\
:bl=^G:bs:\
:cd=50\E[J:ce=3\E[K:cl=50\E[;H\E[2J:cm=10\E[%i%d;%dH:\
:co#80:cr=^M:cs=\E[%i%d;%dr:\
:dc=\E[P:dl=\E[M:do=\E[B:ei=\E[4l:ho=\E[H:\
:if=/usr/lib/tabset/vt100:im=\E[4h:is=\E[1;24r\E[24;1H:\
:ke=\E>:ks=\E=:\
:k1=\EOP:k2=\EOQ:k3=\EOR:k4=\EOS:k5=\E[17~:\
:k6=\E[18~:k7=\E[19~:k8=\E[20~:k9=\E[21~:k0=\E[29~:\
:kb=^?:kd=\E[B:kl=\E[D:kr=\E[C:ku=\E[A:\
:le=^H:li#24:\
:mb=2\E[5m:md=2\E[1m:me=2\E[m:mi:mr=2\E[7m:\
:nd=\E[C:nl=^J: pt:\
:rc=\E8:rf=/usr/lib/tabset/vt100:\
:rs=\E>\E[?3l\E[?4l\E[?5l\E[?7h\E[?8h:\
:sc=\E7:se=\E[m:sf=\ED:so=\E[7m:sr=\EM:\
:ta=^I:ue=\E[m:up=\E[A:us=\E[4m:vt#3:xn:\
:GS=\E(0:GE=\E(B:\
:G1=k:G2=l:G3=m:G4=j:GV=x:GH=q:\
:GU=v:GD=w:GC=n:GL=u:GR=t:
de|vt220nam|DEC VT220 with no automargins:\
:am@:tc=vt220:
# vt220d:
# This vt220 description regards F6--F10 as the second block of function keys
# at the top of the keyboard. This mapping follows the description given
# in the VT220 Programmer Reference Manual and agrees with the labeling
# on some terminals that emulate the vt220. There is no support for an F5.
# k0 is mapped to F10 as a common convention. PF1--PF4 are used for F1--F4.
# See vt220 for an alternate mapping.
#
dd|vt220d|DEC VT220 in vt100 mode with DEC function key labeling:\
:k1=\EOP:k2=\EOQ:k3=\EOR:k4=\EOS:k5@:\
:k6=\E[17~:k7=\E[18~:k8=\E[19~:k9=\E[20~:k0=\E[21~:\
:tc=vt220:
 
I managed to figure out the termcap values for Function Keys F2, F3, and F4. I just need to figure out F1 & F5... but all the other function keys are working as they should.. this is really a challenge... what was a bit crazy is that the values were different than what is above..

K2=\EOR
K3=\EOS
K4=\EOT

I've been going through the alphabet to try others.. but on the mapping above it shows EOP, EOQ, EOR, EOS and they were not mapped correctly..
 
Someone else might have an exact answer for you regarding that - they might be able to give you a fish as per the saying - whereas perhaps I can "teach you to fish": do you have a program that will echo back what you entered, but with escape characters converted into something printable? On Linux I use showkey --ascii, but I assume that's not something you'd have access to on your machine since I think you said you're using XENIX. I tried using od -c which I think you'd probably have access to - the -c option on Linux means "printable characters or backslash escapes" and hopefully you have that too. When I hit F1 in my rxvt-unicode terminal and then hit Ctrl-D twice to end the input, I saw:

Code:
$ od -c
^[OP0000000 033   O   P
0000003

^[OP is what appeared as soon as I hit the key and it's the undecoded echo back; after the offset 0000000 though, we can see 033 which is octal 33 = decimal 27 = escape = \E in termcap syntax, then literal O and P characters, so I'd set the entry for F1 to \EOP. Maybe you can figure out what to use that way? Hopefully XENIX behaves similarly to Linux in this regard. If XENIX doesn't support any options to od then you might just have to convert all the characters from octal.
 
Yes \EOP should work.. I do not know why it's not :( I'm almost at the finish line with this code.. Below is the only function keys not working.. Originally the code for K2, K3, and K4 was supposed to be EOQ, EOR, EOS but the letters shifted.. I was able to match them up now. Again the only ones here below not working are K1, and K5. I've tried a whole ton of EO and then different letters to no avail. And then I tried perhaps like \E[16~

The ones in bold are not working.. and those are the values I have in there now. Again I did try a ton of other letters and what not and they did not work..

d3|vt220|DEC VT220 in vt100 emulation mode:\
:ae=4\E(B:al=\E[L:am:as=2\E(<:\
:bl=^G:bs:\
:cd=50\E[J:ce=3\E[K:cl=50\E[;H\E[2J:cm=10\E[%i%d;%dH:\
:co#80:cr=^M:cs=\E[%i%d;%dr:\
:dc=\E[P:dl=\E[M:do=\E[B:ei=\E[4l:ho=\E[H:\
:if=/usr/lib/tabset/vt100:im=\E[4h:is=\E[1;24r\E[24;1H:\
:ke=\E>:ks=\E=:\
:k1=\EOP:k2=\EOR:k3=\EOS:k4=\EOT:k5=\E[17~:\
:k6=\E[18~:k7=\E[19~:k8=\E[20~:k9=\E[21~:k0=\E[29~:\
:kb=^?:kd=\E[B:kl=\E[D:kr=\E[C:ku=\E[A:\
:le=^H:li#24:\
:mb=2\E[5m:md=2\E[1m:me=2\E[m:mi:mr=2\E[7m:\
:nd=\E[C:nl=^J: pt:\
:rc=\E8:rf=/usr/lib/tabset/vt100:\
:rs=\E>\E[?3l\E[?4l\E[?5l\E[?7h\E[?8h:\
:sc=\E7:se=\E[m:sf=\ED:so=\E[7m:sr=\EM:\
:ta=^I:ue=\E[m:up=\E[A:us=\E[4m:vt#3:xn:\
:GS=\E(0:GE=\E(B:\
:G1=k:G2=l:G3=m:G4=j:GV=x:GH=q:\
:GU=v:GD=w:GC=n:GL=u:GR=t:
 
Yes \EOP should work.. I do not know why it's not :(
Just to be clear, that wasn't the point of my message - I was testing with xterm, I wouldn't assume it generates the same escape sequence as your terminal does.

Why do you think it should be \EOP for your terminal - did you do something to find out what it generates?

I think you could probably try the od -c thing I suggested in my last message, because I tried it with https://www.pcjs.org/software/pcx86/sys/unix/sco/xenix/086/2.1.3/ and while obviously in that case it's showing the escape sequences generated by the system console rather than whatever terminal you're using, it did show something (with a \0 on the end, which I assume is generated from hitting Ctrl-D to send End-Of-File).

I could be wrong but I'm pretty sure you shouldn't have to use trial-and-error to figure this out - you should be able to do something like I suggested to find out what it's actually generating.
 
Just to be clear, that wasn't the point of my message - I was testing with xterm, I wouldn't assume it generates the same escape sequence as your terminal does
Why do you think it should be \EOP for your terminal - did you do something to find out what it generates?
My apologies... when I was tinkering with this it was at the very early morning hours for me... and I wasn't thinking real clearly.. lol

This is the output I just tried out and got. Funny enough pressing the F5 key did not generate anything. It has to be in the main "pconfig" setup main termcap file. There are varient vt100 definitions I found that say different things. I'll paste that below the keyboard output.

$
^[OP: not found
$
^[OQ: not found
$ O
^[OR: not found
$ O
^[OS: not found
$
^[[17~: not found
$
^[[18~: not found
$
^[[19~: not found
$
^[[20~: not found
$
^[[21~: not found

# vt220:
# This vt220 description maps F5--F9 to the second block of function keys
# at the top of the keyboard. The "DO" key is used as F10 to avoid conflict
# with the key marked (ESC) on the vt220. See vt220d for an alternate mapping.
# PF1--PF4 are used as F1--F4.
#
de|vt220|DEC VT220 in vt100 emulation mode:\ <-CURRENTLY SETUP AS
:ae=4\E(B:al=\E[L:am:as=2\E(<:\
:bl=^G:bs:\
:cd=50\E[J:ce=3\E[K:cl=50\E[;H\E[2J:cm=10\E[%i%d;%dH:\
:co#80:cr=^M:cs=\E[%i%d;%dr:\
:dc=\E[P:dl=\E[M:do=\E[B:ei=\E[4l:ho=\E[H:\
:if=/usr/lib/tabset/vt100:im=\E[4h:is=\E[1;24r\E[24;1H:\
:ke=\E>:ks=\E=:\
:k1=\EOP:k2=\EOQ:k3=\EOR:k4=\EOS:k5=\E[17~:\
:k6=\E[18~:k7=\E[19~:k8=\E[20~:k9=\E[21~:k0=\E[29~:\
:kb=^?:kd=\E[B:kl=\E[D:kr=\E[C:ku=\E[A:\
:le=^H:li#24:\
:mb=2\E[5m:md=2\E[1m:me=2\E[m:mi:mr=2\E[7m:\
:nd=\E[C:nl=^J: pt:\
:rc=\E8:rf=/usr/lib/tabset/vt100:\
:rs=\E>\E[?3l\E[?4l\E[?5l\E[?7h\E[?8h:\
:sc=\E7:se=\E[m:sf=\ED:so=\E[7m:sr=\EM:\
:ta=^I:ue=\E[m:up=\E[A:us=\E[4m:vt#3:xn:\
:GS=\E(0:GE=\E(B:\
:G1=k:G2=l:G3=m:G4=j:GV=x:GH=q:\
:GU=v:GD=w:GC=n:GL=u:GR=t:
de|vt220nam|DEC VT220 with no automargins:\ <-SHOULD I TRY THIS? HAVEN'T TRIED YET
:am@:tc=vt220:
# vt220d:
# This vt220 description regards F6--F10 as the second block of function keys
# at the top of the keyboard. This mapping follows the description given
# in the VT220 Programmer Reference Manual and agrees with the labeling
# on some terminals that emulate the vt220. There is no support for an F5.
# k0 is mapped to F10 as a common convention. PF1--PF4 are used for F1--F4.
# See vt220 for an alternate mapping.
#
dd|vt220d|DEC VT220 in vt100 mode with DEC function key labeling:\ <-OR THIS SHOULD I TRY THIS? HAVEN'T TRIED YET
:k1=\EOP:k2=\EOQ:k3=\EOR:k4=\EOS:k5@:\
:k6=\E[17~:k7=\E[18~:k8=\E[19~:k9=\E[20~:k0=\E[21~:\
:tc=vt220:

I think you could probably try the od -c thing I suggested in my last message, because I tried it with https://www.pcjs.org/software/pcx86/sys/unix/sco/xenix/086/2.1.3/ and while obviously in that case it's showing the escape sequences generated by the system console rather than whatever terminal you're using, it did show something (with a \0 on the end, which I assume is generated from hitting Ctrl-D to send End-Of-File).

I could be wrong but I'm pretty sure you shouldn't have to use trial-and-error to figure this out - you should be able to do something like I suggested to find out what it's actually generating.
 
Back
Top