• Please review our updated Terms and Rules here

VT220 with pidp11

vldmrrr

Experienced Member
Joined
Aug 20, 2016
Messages
167
Location
IA, USA
I connected vt220 to pidp11 via serial console. When I press help key in ked under rt11 the graphic characters are not shown, here is screenshot:
Code:
                       KED V01.27
                 Lower Function is GOLD

   lqqqqqqqqqqqwqqqqqqqqqqqwqqqqqqqqqqqwqqqqqqqqqqqk
   x           x           x FINDNEXT  x  DELLINE  x  DELETE    Erase char left
   x   GOLD    x   HELP    x           x           x  LINEFEED  Erase word left
   x        PF1x        PF2x   FIND PF3x UNDELLINE x  CTRL/U    Erase line left
   tqqqqqqqqqqqnqqqqqqqqqqqnqqqqqqqqqqqnqqqqqqqqqqqu  CTRL/C    Cancel
   x   PAGE    x  SECTION  x  APPEND   x  DELWORD  x  CTRL/Z    Cancel
   x           x           x           x           x  CTRL/R    Restore screen
   x  COMMAND 7x   FILL   8x  REPLACE 9x UNDELWORD x            and keypad
   tqqqqqqqqqqqnqqqqqqqqqqqnqqqqqqqqqqqnqqqqqqqqqqqu  CTRL/W    Restore screen
   x  ADVANCE  x   BACKUP  x    CUT    x  DELCHAR  x            and keypad
   x           x           x           x           x
   x  BOTTOM  4x    TOP   5x   PASTE  6x UNDELCHAR x  <GOLD>nnn    Repeat
   tqqqqqqqqqqqnqqqqqqqqqqqnqqqqqqqqqqqnqqqqqqqqqqqu  <GOLD>DEL    UNDELCHAR
   x   WORD    x   EOL     x    CHAR   x           x  <GOLD>LF     UNDELWORD
   x           x           x           x           x  <GOLD>CTRL/U UNDELLINE
   x CHNGCASE 1x  DELEOL  2x  SPECINS 3x   ENTER   x
   tqqqqqqqqqqqvqqqqqqqqqqqnqqqqqqqqqqqu           x  To return to display,
   x        BLINE          x   SELECT  x           x  press ENTER or use any
   x                       x           x           x  function.
   x       OPENLINE        x   RESET   x   SUBS    x
   mqqqqqqqqqqqqqqqqqqqqqqqvqqqqqqqqqqqvqqqqqqqqqqqj
I've seen this topic on pidp forum for similar problem. But solution offered there (adding 'set tto 7b' to boot.ini) did not work for me.
On vt220 the $TERM is set approriately to value 'vt220'. When I use ssh to pidp from linux the $TERM is 'xterm-256color', and ked help still do not show graphics.

Another problem is outside emulation and outside even GNU screen (the terminal multiplexer that hosts simh emulating pdp11). If I try to run midnight commander from vt220 after exiting screen, I also get letters instead of graphics. Also the program responds erratically to keyboard input. But vim works as expected.

If anyone has this setup that works in similar condition please share any necessary tweaks.
Thanks
 
You might check VT220 User's Guide pages 3,4 and make sure it is configured for vt200 mode and not vt100 (or vt52).

Also, verify you /etc/termcap has vt220 listed (it should, but might not)

CW
I played with all combinations of config on the terminal without any luck.

My system does not have /etc/termcap, only /etc/terminfo, which is empty, but in /lib/terminfo it has it:
Bash:
pi@raspberrypi:~ $ ls /lib/terminfo/v/vt*
/lib/terminfo/v/vt100  /lib/terminfo/v/vt102  /lib/terminfo/v/vt220  /lib/terminfo/v/vt52
 
I suspect your problem may be due to a mismatch in character set translation between the terminal and the Pi. The Pi is likely set to "en_US.UTF-8" (which can be confirmed by executing the "locale" command), but Unicode wasn't created until 1991, almost a decade after the VT220 was released. You may want to try adjusting the default character set translation on the Pi. While not addressing your exact problem, these references may be helpful:

Terminal Special Characters
"Americanizing" the Raspberry Pi
 
I added en_US.ISO-8859-1 locale and changed default to en_US from en_US.UTF-8. Now midnight commander is shown fine with pseudo graphics lines on the vt-220 screen, as well as arrow and function keys are working as expected. Thanks for that!

But KED help screen still shows letters instead of graphics, as seen on screenshot in the first message. I confirmed that simh which emulates pdp11 is running under under en_US locale by running `!locale` from simh prompt.
 
So, a few more thoughts. The fact that Midnight Commander now works as expected seems to confirm that character set translation on the Pi is no longer an issue. If KED is still misbehaving, then I think you need to look more closely at SIMH.

VT100 terminals can operate in 7-bit ASCII mode or Special Graphics mode. In 7-bit ASCII mode, the normal character set is displayed, but when switched to Special Graphics mode, the same ASCII codes will be rendered as graphic symbols so, for example, the code for the letter “k” will instead be displayed as the upper right corner of a box. The character mapping tables can be seen here:

VT100 Programming Reference Card

To switch to Special Graphics mode, you send the terminal “ESC ( 0” and to return to 7-bit ASCII mode “ESC ( B”. Midnight Commander has shown that the VT220 appears to be working correctly, and we can probably assume that KED is sending the proper escape sequence for Special Graphics mode. That suggests that the escape sequence to switch to graphics mode is getting lost somewhere and, if I understood your description correctly, the only thing between RT-11 and the Pi operating system is SIMH.

Do you have more details about how the SIMH console is configured?
 
Thanks, @KM11 , that was very logical analysis. So I started to look at simh console setting, which I had as follow:
Code:
sim> show cons
WRU = 5
BRK = 0
DEL = 177
pchar mask = 1000023640 {ESC,CR(^M),LF(^J),HT(^I),BS(^H),BEL(^G),ENQ(^E)}
No Logging
Connected to console window
Debugging disabled
Unbuffered
Console Expect processing:
  Match Rules:
Console Send processing:
CONSOLE
  No Pending Input Data
  Minimum of 0 instructions between characters
  Default delay before first character input is 1000 instructions
  Default delay between character input is 1000 instructions
Which looked fine to me. But after some googling I found this article. Following its suggestion I issued the command set console pchar=01000023600, and that indeed fixed the problem and ked was displaying as expected. I added the command to my boot.ini, and the issue is permanently fixed.

Thank you for you help.
 
Last edited:
Back
Top