Kjetil's Information Center: A Blog About My Projects

ASCII Express VT52 Emulation to Linux

There is a serial terminal emulator program for the Apple II called ASCII Express which can run in 80 columns text mode. Also interesting is that it can emulate several real terminals including the DEC VT52.

I wanted to communicate to a Linux host but I found that several things needed to be configured for everything to work. On the Linux a local serial line is setup like follows in /etc/inittab:

s3:12345:respawn:/sbin/agetty -L ttyS2 4800 vt52
          


In addition Bash needs to behave differently with VT52 (compared to the usual XTerm usage) so something like the following was added to the ~/.bashrc configuration file:

if [ "$TERM" = "vt52" ]; then
  unset PROMPT_COMMAND
  alias ls="ls --color=none -F --quoting-style=literal"
  bind 'set enable-bracketed-paste off'
fi
          

This makes sure that no unwanted XTerm escape codes are sent.

On the Apple II side ASCII Express needs to be configured, which is done by using Control+Q to be able to enter configuration commands. The baud rate needs to be set to 4800, "Emulation" needs to be turned ON and "Show control characters" needs to be turned OFF. But the most important thing is configuring the actual emulation, which is done in the macro sub menus. The input terminal should be set to "DEC VT-52" and the output terminal to "Datamedia". This is still not enough! For some reason the backspace key is missing in the mapping, so this must be added manually by mapping incoming "C4" to outgoing "08". The mapping should look like this when fully configured:

  Function        Incoming            Outgoing

A  XY coord offst    20                  20
B  XY Xmit order     YX                  XY
C  Lead-in           1B                  00
D  Clear screen      0C                  0C
E  Clear to EOS      CA                  0B
F  Clear to EOL      CB                  1D
G  Hi lite           00                  0E
H  Lo lite           00                  0F
I  Home cursor       C8                  19
J  Address cursor    D9                  1E
K  Cursor up         C1                  1F
L  Cursor forward    C3                  1C
M  Cursor down       C2                  0A
N  Extra             C4                  08
O  Extra             00                  00
P  Printer on        00                  00
Q  Printer off       00                  00
          


The "C4" represents the Escape-D sent to VT52 terminals perform a backspace or cursor backwards movement. The "08" represents a ASCII backspace character.

Topic: Configuration, by Kjetil @ 06/11-2025, Article Link