Simh is not as fast or complete as E11 as far as fidelity to the PDP-11
hardware, but this is still the real winner.
This page was originally written around 2003. Some of the information below
is obsoleted by later improvements to Simh. The newer versions of simh solve these problems in a more elegant
Simh comes with source, and you have
to compile it yourself. It also includes simulators for a bunch of other antique
computers. Here are the VisualC project files to compile the PDP-11 version.
Simh with 2.9BSD
Using simh, I have been able to boot and configure 2.9BSD, and I am now using
it to do development work, just like a real PDP-11. Here is the ini file for
2.9BSD: bsd.ini. The disks I have configured are:
|/dev/rl0 (simh rl0): an RL02 containing the disk image
rl02_2.9BSDroot.dsk, which you can obtain from the
PUPS archive. Simh will boot
from this image. You need to type: rl(0,0)rlunix. to get it to boot.|
|/dev/rl1 (simh rl1): an RL02 mounted as /users. This is where I put user
account files. To create this disk, I made a copy of the root image, then used
mkfs to clear it.|
|/dev/rl2 (simh rl2): another RL02 image, used as the swap space.
Initialized like rl1.|
|/dev/xp0h (simh rp0): this is an rp06 mounted as /usr. This is the
destination of the usr.tar file which comes on the UNIX distribution "tape".|
|/dev/xp1h (simh rp1). I could not get any virtual tape to work with
2.9BSD, so I mount things like usr.tar on simh's rp6 in the bsd.ini file. Once
in UNIX, I can say "tar xvf /dev/xp1h" to fetch data off the tar file.|
I had to create /dev/rl2, /dev/xp1h, etc. The "h" in /dev/xp1h means that the
disk is viewed as a single, unpartioned sequential file.
Simh with 2.11BSD
I have 2.11BSD running under simh, but the current setup is extremely clumsy.
I hear the latest version of simh has support for MSCP drives. After I convert
to the new version, I'll document how to setup for 2.11BSD.
Because 2.11BSD expects disks to be partitioned using disklabel, you cannot
use a disk as a virtual tape. The virtual tape device does work with 2.11BSD.
The virtual tape format has markers in it to simulate tape records, so you have
to use a translation utility on the DOS side to convert from files to tape
format and back.
I wrote quick-and-dirty utilities to do this: tapify and
dtapify. They are short on error checking, so don't make any mistakes.
Telnet interface for simh
One of the brilliant new concepts in Windows Millennium is that they have
eliminated all the support problems that arose from the use of DOSish features
such as TSRs and ansi.sys by deleting these features. One result is that
Millennium users no longer have a way to run programs that assume that the
terminal is a VT100 (such as some compiles of MicroEMACS).
This also affects simh. Therefore, I have added a section to scp-tty.c that
implements the console terminal as a TELNET server. After running simh, you can
telnet to "localhost", and you are connected to the console of the PDP-11. Since
most telnet clients emulate VT-100, the Millennium problem should be solved.
This may not be entirely debugged yet, but it seems to work.
I added an output buffering mechanism that uses the time since the last
sim_putchar to flush the output buffer. It's a bit clumsy, and could probably be
done better, but it seems to work. It results in a slight delay to echoed
characters that is not too annoying.
I thought that by buffering the output I could speed up the console output from
2.9BSD under simh. I was assuming that the slowness of console output (compared
to E11) was due to doing I/O a single character at a time. This assumption was
evidently incorrect -- the console output rate is about the same. (Extremely
slow output from 2.9BSD can be fixed by a stty setting).
Here is the modified scp_tty.c, and the
executable. In addition you need to #define USE_SOCKETS and add wsock32.lib
to the linker command. This is for simh 2.6.
I was hoping that vi would now come up in VT100 full screen mode, but it doesn't
(yet). I "set term=vt100" and "tset" according to one VI
tutorial, but that didn't help. Maybe this will work better with a up-to-date
version of simh.