Motivation
The standard way to use a hardware serial terminal with the PiDP-8/I is to modify the PiDP-8/I and Raspberry Pi PCBs to switch some of the GPIO pins around so that the RS-232 UART on the Pi is available to the Linux kernel for use as a console. With this done, you can then get into the PiDP-8/I console with the pidp8i
command at the Linux command prompt, which attaches to the GNU screen
instance attached to the SIMH console.
This scheme is rather complicated, since it means you must either drill down through Linux's security to get access to your PiDP-8/I's console or you must discard the Linux security to get something more faithful to the PDP-8 console experience.
This article gives you a third (and fourth!) option, making use of some features common to all SIMH simulators, giving PDP-8 console access while neither disabling nor drilling through through the Linux layers.
Separate Serial PDP-8 Console
SIMH has a command language that we use in the PiDP-8/I project to configure the simulator for use with the various binary medium images we ship, such as the default OS/8 RK05 disk image. These scripts are very simple and make use of only a tiny subset of the features available in the SIMH command language. One of the many features we do not use in the stock scripts is the console
setting:
set console serial=/dev/ttyUSB0;1200-7e1
That particular formulation, due to David Richards on the mailing list, tells SIMH to open /dev/ttyUSB0
, the most common name for a serial-to-USB adapter and make the PiDP-8/I console available on it. The given serial port configuration values are suitable for use with OS/8, though 1200 bps is typical of an early glass terminal, which did not become widespread until well after the introduction of the PDP-8/I. You might want to lower it to 110 bps to simulate a Teletype Model 33 ASR, the most common terminal type for PDP-8/I computers.
Beware, enabling this feature disables the normal pty console accessed via the pidp8i
command. I don't see a way in SIMH to have both consoles running at the same time, short of configuring multiple terminals, which then restricts you to one of the multi-user PDP-8 operating systems.
PDP-8 Console via Telnet
If you'd rather have remote network access to your PiDP-8/I console without going through SSH, you can reformulate the configuration above so:
set console telnet=1968
set console telnet=buffered
The first line tells SIMH to listen on TCP port 1968 for a Telnet connection. When established, your remote networked computer becomes the PiDP-8/I console.
The second line is important: without it, the simulator will pause on startup until the Telnet client connects. What we want instead is for the PDP-8 simulator to run in the background without waiting for the console to appear, just like a real PDP-8 would. Then when the network connection is established, the simulator quickly dumps all of the text that's been sent to the console since either startup or the last TCP connection so that no text is lost. Buffered mode does this.
This feature does not allow access to the SIMH command prompt: pressing Ctrl-E on a serial or telnet console has no effect. However, you may still access it via the pidp8i
Linux command, then hit Ctrl-E there. That is, you use either an HDMI monitor + keyboard or SSH for the Linux console, then use serial or Telnet for the PDP-8 console.
All of this is covered in sections 3.14 and 3.15 in the SIMH manual.
The SIMH init scripts are installed to /opt/pidp8i/share/boot/*.script
by default. They are writable by the installation user, and changes to these files normally persist across upgrades. (You must go out of your way to overwrite them during an upgrade.) Therefore, you can simply add commands such as those above to any one of these scripts where you want the feature.
Separate SIMH Command Console
It is possible to make the SIMH command console accessible in a similar way:
set remote telnet=1969
SIMH's command processor disables some of its features when accessed via this interface, but we suspect there are ways to harm the Linux host's security through it anyway. SIMH is, after all, not security-focused software, and interpreters are notorious for having multiple surprising security holes. As such, we recommend that you avoid using this feature if you care about the security of your PiDP-8/I.
License
Copyright © 2018 by Warren Young. This document is licensed under the terms of the SIMH license.