Document Body Page Navigation Panel

Pages 1--95 from e11.dvi


Page 1 2
ERSATZ-11
PDP-11 EMULATOR
DEMO VERSION 3.0

FOR 30-DAY COMMERCIAL
EVALUATION ONLY

Copyright c 1994{2000 by Digby's Bitpile, Inc.
All rights reserved.

Release date: 01-Oct-2000




 




 


D Bit 11 Bank Street  Troy, NY  12180  USA  www.dbit.com 1
1 Page 2 3



 




 
 Digby's Bitpile, Inc. DBA D Bit
11 Bank Street
Troy, NY 12180
USA

+1 (518) 271-6824
+1 (518) 272-3853 FAX
e11@dbit.com
www.dbit.com

Copyright c 1994{2000 by Digby's Bitpile, Inc. All rights reserved.
The following are trademarks of Digby's Bitpile, Inc.:







 

D Bit E11 Ersatz

The following are trademarks or registered trademarks of Digital Equipment Corporation:
DEC DECnet DECtape DECwriter DIGITAL
IAS MASSBUS PDP PDT P/OS
Q-BUS RSTS RSX RT-11 ULTRIX
UNIBUS VT

The following are trademarks or registered trademarks of S&H Computer Systems, Inc.:
TSX TSX-Plus
Other product, service, and company names that appear in this document are used for identi cation purposes only,
and may be trademarks and/or service marks of their respective owners. 2
2 Page 3 4
Contents
1 Introduction 1
1.1 Emulatedblockdevicetypes.. . .. . . .. . .. . . .. . .. . . .. . .. . . .. . .. . . .. . .. . 2
1.2 Emulatedsequentialdevicetypes.. . . .. . .. . . .. . .. . . .. . .. . . .. . .. . . .. . .. . 3
1.3 Emulatedserialdevicetypes.. . .. . . .. . .. . . .. . .. . . .. . .. . . .. . .. . . .. . .. . 3
1.4 Emulatednetworkdevicetypes... . . .. . .. . . .. . .. . . .. . .. . . .. . .. . . .. . .. . 3
1.5 PChardwaresupport . . . .. . .. . . .. . .. . . .. . .. . . .. . .. . . .. . .. . . .. . .. . 3
1.6 Devicenames. .. . .. . . .. . .. . . .. . .. . . .. . .. . . .. . .. . . .. . .. . . .. . .. . 5
1.7 Filenames. . . .. . .. . . .. . .. . . .. . .. . . .. . .. . . .. . .. . . .. . .. . . .. . .. . 6
1.8 Notes . .. . . .. . .. . . .. . .. . . .. . .. . . .. . .. . . .. . .. . . .. . .. . . .. . .. . 7
1.8.1 Interrupts. . .. . . .. . .. . . .. . .. . . .. . .. . . .. . .. . . .. . .. . . .. . .. . 7
1.8.2 Hostsystems .. . . .. . .. . . .. . .. . . .. . .. . . .. . .. . . .. . .. . . .. . .. . 7
1.8.3 Copyrightandlicensing . .. . . .. . .. . . .. . .. . . .. . .. . . .. . .. . . .. . .. . 8
1.9 Acknowledgments. . .. . . .. . .. . . .. . .. . . .. . .. . . .. . .. . . .. . .. . . .. . .. . 8
1.10History .. . . .. . .. . . .. . .. . . .. . .. . . .. . .. . . .. . .. . . .. . .. . . .. . .. . 9

2 Installation and Con guration 10
2.1 Systemrequirements.. . . .. . .. . . .. . .. . . .. . .. . . .. . .. . . .. . .. . . .. . .. . 10
2.2 Installation . . .. . .. . . .. . .. . . .. . .. . . .. . .. . . .. . .. . . .. . .. . . .. . .. . 11
2.3 Con guration... . .. . . .. . .. . . .. . .. . . .. . .. . . .. . .. . . .. . .. . . .. . .. . 12 3
3 Page 4 5
3 Transferring the PDP-11 Operating System to the PC 15
3.1 SCSIdisks. . . .. . .. . . .. . .. . . .. . .. . . .. . .. . . .. . .. . . .. . .. . . .. . .. . 15
3.2 SCSItapes . . .. . .. . . .. . .. . . .. . .. . . .. . .. . . .. . .. . . .. . .. . . .. . .. . 16
3.3 Kermit... . . .. . .. . . .. . .. . . .. . .. . . .. . .. . . .. . .. . . .. . .. . . .. . .. . 16
3.4 Ethernet.. . . .. . .. . . .. . .. . . .. . .. . . .. . .. . . .. . .. . . .. . .. . . .. . .. . 17
3.5 ASCIIserialdump... . . .. . .. . . .. . .. . . .. . .. . . .. . .. . . .. . .. . . .. . .. . 17
3.6 System-speci cnotes.. . . .. . .. . . .. . .. . . .. . .. . . .. . .. . . .. . .. . . .. . .. . 18
3.7 Utilities . . . . .. . .. . . .. . .. . . .. . .. . . .. . .. . . .. . .. . . .. . .. . . .. . .. . 19

4 Disk Devices 20
4.1 PCdiskdevices.. . .. . . .. . .. . . .. . .. . . .. . .. . . .. . .. . . .. . .. . . .. . .. . 21
4.1.1 Diskimage les. . . .. . .. . . .. . .. . . .. . .. . . .. . .. . . .. . .. . . .. . .. . 21
4.1.2 Raw oppydiskdrives. . .. . . .. . .. . . .. . .. . . .. . .. . . .. . .. . . .. . .. . 23
4.1.3 RawCD-ROMdrives . . .. . . .. . .. . . .. . .. . . .. . .. . . .. . .. . . .. . .. . 24
4.2 EmulatedPDP-11diskdevices . .. . . .. . .. . . .. . .. . . .. . .. . . .. . .. . . .. . .. . 26
4.2.1 DC: | RC11/RS64 . . . . . . . .. . .. . . .. . .. . . .. . .. . . .. . .. . . .. . .. . 26
4.2.2 DF: | RF11/RS11, DDC DMS-11X/SSDM 100 (called RF: in RT-11) . . . . . . . .. . .. . 27
4.2.3 DK:|RK02,RK03,RK05DECpack(calledRK:inRT-11) . .. . . .. . .. . . .. . .. . 27
4.2.4 DL:|RL01,RL02 .. . .. . . .. . .. . . .. . .. . . .. . .. . . .. . .. . . .. . .. . 28
4.2.5 DM:|RK06,RK07.. . .. . . .. . .. . . .. . .. . . .. . .. . . .. . .. . . .. . .. . 28
4.2.6 DP:|RP02,RP03.. . .. . . .. . .. . . .. . .. . . .. . .. . . .. . .. . . .. . .. . 29
4.2.7 DS:|RS03,RS04. .. . .. . . .. . .. . . .. . .. . . .. . .. . . .. . .. . . .. . .. . 29
4.2.8 DT:|TU55,TU56DECtape ... . .. . . .. . .. . . .. . .. . . .. . .. . . .. . .. . 30
4.2.9 DU:|MSCPdisks .. . .. . . .. . .. . . .. . .. . . .. . .. . . .. . .. . . .. . .. . 30
4.2.10DX:|RX01.. . . .. . .. . . .. . .. . . .. . .. . . .. . .. . . .. . .. . . .. . .. . 31
4.2.11DY:|RX02,\RX03". . .. . . .. . .. . . .. . .. . . .. . .. . . .. . .. . . .. . .. . 32 4
4 Page 5 6
4.2.12HD:|Hypotheticaldisk.. . . .. . .. . . .. . .. . . .. . .. . . .. . .. . . .. . .. . 32
4.2.13 PD: | PDT-11/150 RX01 . . . .. . .. . . .. . .. . . .. . .. . . .. . .. . . .. . .. . 33

5 Tape Devices 34
5.1 PCtapedevices.. . .. . . .. . .. . . .. . .. . . .. . .. . . .. . .. . . .. . .. . . .. . .. . 34
5.1.1 Tapeimage les . . .. . .. . . .. . .. . . .. . .. . . .. . .. . . .. . .. . . .. . .. . 34
5.2 EmulatedPDP-11tapedevices. .. . . .. . .. . . .. . .. . . .. . .. . . .. . .. . . .. . .. . 35
5.2.1 CT:|TU60DECcassette . . . .. . .. . . .. . .. . . .. . .. . . .. . .. . . .. . .. . 35
5.2.2 MM: | TE16/TU16, TU45, TU77 . . . . . . .. . .. . . .. . .. . . .. . .. . . .. . .. . 36
5.2.3 MS:|TK25,TS04,TS05,TU80 . . .. . . .. . .. . . .. . .. . . .. . .. . . .. . .. . 36
5.2.4 MT:|TS03,TU10.. . .. . . .. . .. . . .. . .. . . .. . .. . . .. . .. . . .. . .. . 37
5.2.5 MU:|TMSCPtapes. . .. . . .. . .. . . .. . .. . . .. . .. . . .. . .. . . .. . .. . 38

6 Serial Lines 39
6.1 PCserialdevices. . .. . . .. . .. . . .. . .. . . .. . .. . . .. . .. . . .. . .. . . .. . .. . 40
6.1.1 Serialoptionscommontoalldevices. .. . . .. . .. . . .. . .. . . .. . .. . . .. . .. . 40
6.1.2 Videoconsoles . . . .. . .. . . .. . .. . . .. . .. . . .. . .. . . .. . .. . . .. . .. . 41
6.1.3 COMports... . . .. . .. . . .. . .. . . .. . .. . . .. . .. . . .. . .. . . .. . .. . 42
6.1.4 PClineprinterport .. . .. . . .. . .. . . .. . .. . . .. . .. . . .. . .. . . .. . .. . 43
6.1.5 SoundBlasterMIDIport .. . . .. . .. . . .. . .. . . .. . .. . . .. . .. . . .. . .. . 44
6.2 EmulatedPDP-11serialdevices. .. . . .. . .. . . .. . .. . . .. . .. . . .. . .. . . .. . .. . 46
6.2.1 LP:|LP11,LPV11lineprinterports.. . . .. . .. . . .. . .. . . .. . .. . . .. . .. . 46
6.2.2 TT:|DL11,DLV11singleseriallineunits. .. . .. . . .. . .. . . .. . .. . . .. . .. . 46

7 Network Devices 47
7.1 PCnetworkdevices. .. . . .. . .. . . .. . .. . . .. . .. . . .. . .. . . .. . .. . . .. . .. . 47
7.1.1 NE2000: | NE2000 and compatibles . . . . . .. . .. . . .. . .. . . .. . .. . . .. . .. . 47 5
5 Page 6 7
7.1.2 PKTD:|Packetdrivers .. . . .. . .. . . .. . .. . . .. . .. . . .. . .. . . .. . .. . 48
7.2 EmulatedPDP-11networkdevices. . . .. . .. . . .. . .. . . .. . .. . . .. . .. . . .. . .. . 50
7.2.1 NI: | Interlan NI1010A, NI2010A Ethernet ports . . . . .. . .. . . .. . .. . . .. . .. . 50
7.2.2 XE:|DELUAEthernetport . .. . .. . . .. . .. . . .. . .. . . .. . .. . . .. . .. . 50

8 Miscellaneous Devices 51
8.1 ROMdevices . .. . .. . . .. . .. . . .. . .. . . .. . .. . . .. . .. . . .. . .. . . .. . .. . 51
8.2 DO: | PC le access pseudo-device . . . . . . . . . .. . .. . . .. . .. . . .. . .. . . .. . .. . 52
8.3 PP: | PC04 paper tape punch . . . . . .. . .. . . .. . .. . . .. . .. . . .. . .. . . .. . .. . 53
8.4 PR:|PC04papertapereader. .. . . .. . .. . . .. . .. . . .. . .. . . .. . .. . . .. . .. . 53
8.5 VT:|VT11vectorgraphicsdisplayprocessor . . . .. . .. . . .. . .. . . .. . .. . . .. . .. . 54

9 Commands 55
A Keyboard Script Language 71
A.1 Defaultkeyboardlayout. . .. . .. . . .. . .. . . .. . .. . . .. . .. . . .. . .. . . .. . .. . 71
A.2 Keyboardscriptstatementdescriptions .. . .. . . .. . .. . . .. . .. . . .. . .. . . .. . .. . 72
A.3 Keynames . . .. . .. . . .. . .. . . .. . .. . . .. . .. . . .. . .. . . .. . .. . . .. . .. . 76
A.4 Flags. . .. . . .. . .. . . .. . .. . . .. . .. . . .. . .. . . .. . .. . . .. . .. . . .. . .. . 78
A.4.1 Read/write ags . . .. . .. . . .. . .. . . .. . .. . . .. . .. . . .. . .. . . .. . .. . 78
A.4.2 Read-only ags. . . .. . .. . . .. . .. . . .. . .. . . .. . .. . . .. . .. . . .. . .. . 79

B Debugging Features 80
B.1 Displayingandmodifyingmemory . . . .. . .. . . .. . .. . . .. . .. . . .. . .. . . .. . .. . 81
B.2 Assemblyanddisassembly. .. . .. . . .. . .. . . .. . .. . . .. . .. . . .. . .. . . .. . .. . 82
B.3 Registers.. . . .. . .. . . .. . .. . . .. . .. . . .. . .. . . .. . .. . . .. . .. . . .. . .. . 82
B.4 Breakpointsandsingle-stepping. .. . . .. . .. . . .. . .. . . .. . .. . . .. . .. . . .. . .. . 82
B.5 Memorymapping. . .. . . .. . .. . . .. . .. . . .. . .. . . .. . .. . . .. . .. . . .. . .. . 83 6
6 Page 7 8
B.6 Device logging . . . . . . . .. . .. . . .. . .. . . .. . .. . . .. . .. . . .. . .. . . .. . .. . 83
B.7 Loadinganddumpingmemory . .. . . .. . .. . . .. . .. . . .. . .. . . .. . .. . . .. . .. . 83
B.8 Switchanddisplayregisters.. . .. . . .. . .. . . .. . .. . . .. . .. . . .. . .. . . .. . .. . 84

C Dates and Times 85
C.1 Booting .. . . .. . .. . . .. . .. . . .. . .. . . .. . .. . . .. . .. . . .. . .. . . .. . .. . 85
C.2 PCclock.. . . .. . .. . . .. . .. . . .. . .. . . .. . .. . . .. . .. . . .. . .. . . .. . .. . 86
C.3 Year 2000 issues . . . . . . .. . .. . . .. . .. . . .. . .. . . .. . .. . . .. . .. . . .. . .. . 86
C.3.1 KDJ11ETOYclock .. . .. . . .. . .. . . .. . .. . . .. . .. . . .. . .. . . .. . .. . 86
C.3.2 DatesinRT-11andTSX-Plus . .. . .. . . .. . .. . . .. . .. . . .. . .. . . .. . .. . 86
C.3.3 DatesinRSX.. . . .. . .. . . .. . .. . . .. . .. . . .. . .. . . .. . .. . . .. . .. . 87
C.3.4 DatesinRSTS/E. . .. . .. . . .. . .. . . .. . .. . . .. . .. . . .. . .. . . .. . .. . 87
C.3.5 DatesinFuzzball. . .. . .. . . .. . .. . . .. . .. . . .. . .. . . .. . .. . . .. . .. . 87
C.3.6 DatesinUnix.. . . .. . .. . . .. . .. . . .. . .. . . .. . .. . . .. . .. . . .. . .. . 87 7
7 Page 8 9
8
8 Page 9 10
Chapter 1
Introduction
Ersatz-11 is a software replacement for PDP-11 minicomputer systems. When running on typical PC hardware, it
substantially outperforms any PDP-11 model ever produced by DEC, outpaces all known aftermarket clone CPUs,
and is the fastest PC-to-PDP-11 software emulator available at any price. Yet it is the most inexpensive PDP-11
replacement product on the market.

The achievable performance continues to increase as new 80x86 compatible CPUs are released, so future upgrades
are possible without requiring that a new PDP-11 CPU board be purchased. The emulated system is con gured
using simple commands, allowing the exibility to duplicate almost any existing system easily. The con guration
of the emulated system can be changed at any time, even while the system is running. Wherever possible, E11
provides useful defaults, to simplify the con guration process. It will choose between Q-bus and Unibus controller
models depending on the emulated CPU type, and will auto-compute \ oating" CSR and vector addresses, for
devices that use them. It also chooses the default interrupt priority level according to the CPU type, since in many
cases the Q-bus version of a peripheral interrupts on level 4 even though the original Unibus version uses level 5.
In all cases these defaults can be overridden with SET commands.

Ersatz-11 emulates the entire PDP-11 system in software, including most standard disks, tapes, serial devices, and
network interfaces. E11 is intended to boot and run any PDP-11 operating system. It has been tested with
RT-11 (all avors), RSX-11M, RSX-11M-PLUS, RSTS/E, IAS, TSX-Plus, 2.9BSD and 2.11BSD UNIX, DSM-11,
DOS/BATCH, Fuzzball (BOS), and XXDP+.

Emulated con guration
 PDP-11/20, PDP-11/23, PDP-11/24, PDP-11/34a, PDP-11/40, PDP-11/44, PDP-11/45, PDP-11/53, PDP-
11/70, PDP-11/73, PDP-11/83, PDP-11/84, PDP-11/93, or PDP-11/94 CPU with individually selectable
features

 FP11/FPF11/FPJ11 (etc.) oating point processor, FIS oating instruction set option, KE11 extended arith-
metic element (EAE)

 248 KB{350 KB main memory (approx.)
 Many di erent models of disks, tapes, serial and network devices (see tables below).

1 9
9 Page 10 11
2 Introduction
1.1 Emulated block device types
dev name controller type(s) drive type(s)
DC: RC11 RS64 xed-head disks

DF:/RF: RF11, DMS-11X RS11 xed-head disks, DDC SSDM 100 RAM disks
DK:/RK: RK11D RK02, RK05 front-loading cartridge drives
DL: RL11 1 , RLV11, RL01, RL02 top-loading cartridge drives
RLV12

DM: RK611 2 RK06, RK07 top-loading cartridge drives
DO: (virtual) Ersatz-11 interface to host le system (for DO.SYS/DOS.TSK)
DP: RP11C RP02, RP03 pack drives
DS: RH11, RH70 RS03/RS04 xed-head disks
DT: TC11 TU55/TU56 DECtape
DU: UDA50, KDA50, RA60, RA70{73, RA80{82, RA90/92, RC25, RD31{32, RD50{54,
RQDX3, RQZX1 RX33/RX50 MSCP disks

DX: RX11, RXV11 RX01 8" SS SD oppy
DY: RX211, RXV21 RX02 8" SS DD (or DS DD) oppy
HD: (virtual) Ersatz-11 hypothetical disk with simpli ed interface (for HD.SYS)
PD: RXT11 RX01 8" SS SD oppy (PDT-11/150 microcomputer)
1 \RL211" was used as a marketing name in systems with RL02 drives, but is the identical controller to the RL11.
2 \RK711" was used as a marketing name in systems with RK07 drives, but is the identical controller to the RK611. 10
10 Page 11 12
Introduction 3
1.2 Emulated sequential device types
dev name controller type(s) drive type(s)
CT: TA11 TU60 DECassette dual cassette tape

MM: RH11/RH70 + TM03 TE16, TU45, TU77 Massbus magtape drives
MS: TS11, TSU05/TSV05, TS04, TS05, TU80 magtape drives,
M7454, TQK25 TK25 cartridge tape drive

MT: TM11 TS03, TU10 magtape drives
MU: KLESI, TQK50, TQK70 TU81, TK50, TK70 TMSCP tapes
PR:/PC: PC11 PC04 high speed paper tape reader/punch

1.3 Emulated serial device types
dev name port type(s) description
LP: LP11, LPV11 Line printer interfaces

TT: DL11, DLV11 Single serial line units

1.4 Emulated network device types
dev name port type(s) description
NI: NI1010A, NI2010A Interlan Unibus/Q-bus Ethernet interfaces

XE: DELUA Unibus Ethernet interfaces

1.5 PC hardware support
 Block devices: disk image les, raw oppy drives, raw CD-ROM drives
 Tape devices: tape image les
 Character devices: Emulated VT100 on SVGA (can ip between up to 12 virtual screens), COM, LPT, Sound
Blaster MIDI ports

 Network devices: NE2000 clones, packet drivers 11
11 Page 12 13
4 Introduction
This is a stripped-down demonstration version of Ersatz-11, which when used for commercial purposes may only be
installed for an evaluation period limited to 30 days. After this time, commercial users must either buy E11 (either
the \Lite" or full version), or delete all copies of the demo version in their possession. There is no limitation on
hobby/personal use of this demo package. Commercial use is de ned as anything having to do with the operation of
a for-pro t business. Older versions of Ersatz-11 (V1.1A and earlier) had no such limitation on use, so this notice
does not apply to them, however they are no longer supported by D Bit.

This demo version of Ersatz-11 is available by anonymous FTP from ftp.dbit.com. The directory is pub/e11.
The emulator speed depends on the application and the host system. In general E11 on any speed Pentium II,
Pentium III, or Athlon runs on the order of ve to ten times the speed of a PDP-11/93. In real mode versions of
E11, writing MMU registers is an expensive operation which slows down multiuser OSes, compared to RT-11FB for
example. This is far less of a factor in the full version of E11, which has an entirely di erent MMU implementation
due to running in protected mode. Meanwhile, E11's disk I/O is much faster than that of real PDP-11s, especially
when run under an operating system which provides good disk caching.

The FP11 oating point processor emulation currently requires a math coprocessor. If the PC has none, then
the emulated PDP-11 will have no FPP either. Intel Pentium CPUs that have the oating point divider bug are
detected and a workaround is used to get correct results at a slight speed penalty (for DIVF/DIVD only). The FIS
emulation does not require a math coprocessor, but does require an 80386 or later CPU.

The system has been tested under the XXDP+ diagnostic monitor. It passes the KD11EA diagnostics DFKAA,
DFKAB, and DFKAC, and the FP11A diagnostics DFFPA, DFFPB, and DFFPC. It does not work with MMU
diagnostics due to the absence of the maintenance mode. It has been found that passing or failing DEC diagnostics
does not bear much relation to actual operation with real-world software and operating systems, because the
diagnostics are designed mainly to detect known failure modes of real DEC hardware, and not to verify new
implementations. 12
12 Page 13 14
Device names 5
1.6 Device names
With the exception of PC les, just about every I/O device used by Ersatz-11 has a device name ending in a colon
(\:"). This applies to both emulated PDP-11 devices and real PC hardware devices. Each device (disk unit, serial
line, etc.) has a name that normally conforms to the following prototype:

dev[c][u]:

dev Alphabetic device name identifying the device type: always two letters for emulated PDP-11 devices,
variable for PC hardware devices.

c Optional letter (A{Z) identifying which of the (potentially) multiple controllers of the same type is control-
ling this particular device. Speci ed only with controllers that can support multiple devices. A reasonable
default is used if it is omitted, generally the rst or only controller of that type. The controller letter is
always displayed in output from the SHOW command for devices where it is meaningful, so the name given
by SHOW will have the letter even if you didn't specify one. In the demo version of E11, the RH11/RH70
Massbus controllers, TC11 DECtape controllers, and HD: pseudo disks are the only controller types of
which there may be more than one. All other types will always use controller A so the default is always the
only choice.

u Optional unit number identifying the device; default is the rst unit on the controller. The unit number
should be omitted when referring to the controller as a whole (e.g. SET commands).

The two-letter device names for emulated PDP-11 devices are taken from the names used by the popular PDP-11
operating systems. Where possible, synonyms are available to ensure that the device names will be familiar to
users of each operating system. For example, DELUA ports may be referred to using either the RSTS/RSX name
(\XE:"), or the RT-11 name (\NU:"), and similarly, RK05 disk units may be called \DK:" or\RK:".

However E11 uses a more consistant naming system than these operating systems do, since the rst two letters of
a PDP-11devicenamealways depend on the controller type.

In some cases this leads to di erences, for example \TTu:" (or\KBu:", which is a synonym) refers speci cally to a
DL11/DLV11 serial port, while in RSX and RSTS, all terminal ports are mapped to one of these names regardless
of the port type. But in E11, a serial port located on a DZ11/DZV11 is always \YZcu:". As a result, the device
names used by E11's command language may not necessarily be identical to those used by the operating system
for the same devices.

The device names for PC hardware are the same as those used by DOS for those devices that actually have names
in DOS. So CON: refers to the rst video session, COM1:{COM4: are serial ports (AUX: is a synonym for COM1:), and
LPT1:{LPT4: are parallel ports (PRN: is a synonym for LPT1:). For other devices a short mnemonic name is used,
with an optional letter identifying the controller for devices like multi-port serial interfaces where a port number
alone isn't enough to uniquely identify the device. Note that PDP-11 unit numbers always start at 0 (TT0:, DU0:,
MU0: etc.) while PC unit numbers generally start at 1 (COM1, LPT1).

For a very few devices (both real and emulated), identifying the controller and unit isn't enough since there
may be multiple slaves attached to the same master unit. In this case the device name is expanded to look like
\dev[c][u][ s]:", where s is the optional slave number within unit u. This form is rarely used since it only makes
sense on emulated Massbus tape drives with multiple slaves attached to the same formatter, or on SCSI devices
with multiple LUNs within the same target such as the old Adaptec ACB-4000A SCSI/MFM bridge boards. In
any case if s is omitted (as well as the preceding underscore) a reasonable default is used. 13
13 Page 14 15
6 Filenames
1.7 Filenames
A few rules apply to PC les referenced using E11 commands. When a reference is made to an existing le, without
a drive name or directory path in the le speci cation, E11 searches for it rst in the current directory, then in
the directory where the E11 executable le is located(under DOS V3.0 and later), then in the directories listed
in the PATH environment variable. A lename may be enclosed in single (') or double (") quotes to allow lower
case or special characters in the name, however this is only useful when running on a system that supports the
\long lenames" extended DOS calls. Path elements must be separated by \n" characters, except when the le
speci cation is enclosed in single or double quotes in which case either forward slashes or backslashes may be used.
Each command that takes a lename has a default extension which is added when none is supplied by the user.

Typical default extensions are:

.ext type of le relevant command
.CMD command le @[d:pathn] lename
.DSK disk image le MOUNT
.INI init le /INITFILE switch
.LOG log le LOG
.PAP paper tape image le MOUNT PR:/PP:
.PDP binary memory image LOAD, DUMP
.TAP tape image le MOUNT 14
14 Page 15 16
Notes 7
1.8 Notes
1.8.1 Interrupts
The interrupt system is somewhat complicated, mainly due to some assumptions in DEC OSes (particularly RSX
and RT-11 SJ) about how many instructions are guaranteed to be executed after writing a command to a device
CSR, before the device will complete the operation and interrupt. Since MS-DOS doesn't support asynchronous
I/O (unless you go to extremes which wouldn't have made sense in a CPU-bound program like an instruction set
simulator), it's natural to have most emulated device I/O appear to the PDP-11 to be instantaneous (although this
is an illusion, the PC takes time between emulated PDP-11 instructions to do the transfer), with the completion
interrupt occurring before the instruction following the one that started the transfer. Unfortunately this causes
trouble with some drivers that assume that they are guaranteed the time to execute a certain number of instructions
before the completion interrupt occurs.

This is not actually a bug if it works on all real PDP-11 models, but it leads to incorrect operation if the emulated
hardware appears to be fast enough to complete an operation before the expected minimum number of instructions
is executed. Under testing, RSX appeared to issue WAIT instructions for TTY output which was assumed not to
have completed yet a few dozen instructions after writing a character to a DL11 (thus hanging the system), and
similarly the RT-11 SJ (but not FB/XM) keyboard interrupt service routine runs with interrupts enabled on the
assumption that another keyboard interrupt couldn't possibly happen before the current ISR nishes. When this
does happen the ISR recurses and the characters are put in the bu er in reverse order, which was happening with
VT100 keypad keys in E11.

The solution to these problems is to use a queueing system, so that the interrupt (and in most cases the transfer
itself ) doesn't occur until a pre-set number of instruction fetches after the instruction that started the transfer. The
default delays are intended to be adequate for most users. However when troubleshooting with custom operating
systems, this is a good place to experiment if E11 appears to work with your application using certain emulated
devices, but not others. Much less trouble has been experienced with disks and tapes, so by default most of them
are set to execute all functions in one instruction time. The RSX MSCP initialization sequence is an exception,
so the default delays are tuned appropriately. The RK11 handler in DOS/BATCH requires an unusually slow
disk controller, so in order to use that you must rst issue a command like SET DELAY RK11D *=8000 to make all
RK11D disk commands take 8000 instruction fetches to complete. For reasons given above, the character-at-a-time
devices have larger default delay counts. RK05/06/07 seek completion attentions may be delayed still further
beyond acknowledging the seek command, so as not to confuse overlapped seek drivers. However you'll get faster
results using a non-overlapped driver if one is supplied with your OS. Since all your emulated disks will typically
be on one physical PC disk with only one head carriage, there's nothing to overlap anyway.

1.8.2 Host systems
D Bit occasionally receives inquiries from users who want Ersatz-11 to be ported to architectures other than the
80x86, and/or operating systems other than Linux and DOS. Currently there are no plans to do this. Besides the
expense and diculty of moving software between radically di erent host systems, D Bit is considers its ability
to provide adequate customer support to be of primary importance, and this would not be possible if there were
many di erent versions of E11. Also, some popular operating systems are simply not designed to be responsive or
reliable enough for trouble-free use in typical PDP-11 applications.

Rather than produce poorly supported versions of E11 for a myriad of host systems which provide more hindrance
than help to the task of emulating a PDP-11 system, D Bit has chosen to focus its e orts on the 80x86 architecture 15
15 Page 16 17
8 Notes
under Linux and DOS. This hardware has the best price:performance ratio of anything currently available, it's
what the vast majority of E11 customers are already running anyway, and its programming architecture lends itself
well to ecient PDP-11 emulation. The two supported operating systems are inexpensive and easy to install, they
provide a good set of helpful services to E11 but also allow easy access to hardware so that Ersatz-11 has the
control it needs, adequate DOS emulation is available in a variety of other operating systems, so that again, most
users already have a system which is capable of running E11.

1.8.3 Copyright and licensing
Ersatz-11 is Copyright c 1994{2000 by Digby's Bitpile, Inc. All rights reserved. Distribution of this document
and/or the INSTALL.EXE auto-installing executable le (demo version only) in unmodi ed form, without charge,
is allowed pursuant to the usage restrictions given at the beginning of this document. Anything else is strictly
forbidden.

1.9 Acknowledgments
D Bit would like to thank the many people who provided technical help and debugging input. Bob Supnik,
formerly of DEC, and Alan Sieving of QED provided valuable details of poorly documented PDP-11 instruction
set semantics. Many people have helped debug Ersatz-11 with their con gurations. Frank Borger's (U. Chicago)
work with RT-11SJ and IAS has been particularly impressive, as have Paul Koning's (Xedia) insights into RSTS
and Eduard Vopicka's (Prague University of Economics) and John Shilling's (JSA) help with RSX. Chip Charlot
(formerly of Mentec), and Dave Carroll of Mentec have provided invaluable technical help and encouragement. 16
16 Page 17 18
History 9
1.10 History
31-Oct-1993; development started.
V0.8 BETA, 29-Mar-1994; initial release.
V0.9 BETA, 05-Jul-1994; many bug xes (mainly trap handling, MMU emulation, DIV instruction, and VT100
reverse video), added RX211 emulation, multiple DL11s, and 50 Hz KW11L mode.

V1.0 BETA, 14-Nov-1994; more bug xes, added FP11A, RK611/RK06{07, LP11, D-space, and supervisor mode
emulation. Also CALCULATE, HELP, INITIALIZE, LOG, SET/SHOW CPU, SET DR LPTn:, SET SCROLL, SHOW MMU com-
mands, VT100 graphics/underline, changed to .EXE le (ran out of space in uni ed code/data segment in .COM
le).

V1.1 BETA, 22-Mar-1995; still more bug xes (IAS nally works), DELUA Ethernet emulation, disk LOGging,
indirect command les, workaround for Pentium FDIV bug, help text moved to le, Russian HD: device (and RT-11
driver), PC11, display general registers on parallel port LED board.

V2.0 DEMO, 20-Jul-1997; many bug xes as usual, limited 22-bit MMU with and without Unibus map. MMU
SR1 mechanized, TOY clock, CPU emulation extended to include 11/24, 11/44, 11/45, 11/70, 11/94. Added
RXT11/RX01, RK02/RK05, RS03/RS04, TU56, TU10, TU60, TE16/TU45/TU77 device emulation. De nable
keyboard. Loadable ROM/EEPROM. Many new oppy types, which may now be used with any disk controller
type.

(Many intermediate V2.0x full versions were released throughout 1997 and 1998.)
V2.1 Full version, 01-Apr-1999; runs in protected mode with full 22-bit MMU. MSCP, TMSCP, RMxx/RPxx,
TS11, DZ11/DZV11, DHU11/DHV11, DEQNA device emulation. Support for Q/Unibus bridges. Boca, Chase
PCI-FAST, Digi, RocketPort/PCI, SBMIDI serial drivers. NE2000 Ethernet driver. Physical port drivers for SCSI
disk/tape drives, RAM disks/tapes. FLOATING address calculation, DEFAULT controller types. PDP-11/23, 53,
73, 83, 84, 93 CPU types added. Demo/Lite versions have a subset of these features.

V2.1A, 01-Oct-1999; concatenated image les to form one large disk, CDROMx: driver, other minor improvements
and bug xes.

V2.2, 01-Apr-2000; DH11, DM11BB, DR11C, VT11, Interlan NI1010A/NI2010A emulation, FIS instruction set,
KE11 EAE, mini-assembler. Hardware drivers added or extended for DCI-1300 digital I/O boards, SVGA graphics,
ISA RocketPorts, BCI-2004/BCI-2104 bus adapters, multiple physical serial devices. SCSI disk partitioning added.
Most disk \write headers" commands perform low-level format. Documentation overhauled.

V3.0, 01-Oct-2000; Linux version released. DMS-11X RAMdisk, SET THROTTLE, Data Products printer support,
PCI LPT cards, con gurable interrupt priorities. Additional SET CPU options to support early CPU models. 17
17 Page 18 19
Chapter 2
Installation and Con guration

2.1 System requirements
Installation of Ersatz-11 requires the following:
 Intel 80x86-compatible PC with 80186 or later CPU (80386 required to emulate FIS option)
 At least 640 KB of available system memory.
 1 MB of available disk space for Ersatz-11 itself, plus space for all disk image les (equivalent to the size of
the disk drives they replace).

 Microsoft MS-DOS, IBM PC-DOS, Caldera DR-DOS, or a DOS session in Windows, OS/2, or Linux.

Running Ersatz-11 under plain DOS gives better response time to external events, and better access to non-standard
PC hardware. However running in a DOS session under another operating system typically gives a dramatic increase
in disk speed due to the improved disk caching. So the decision of which host operating system to use should be
based on the exact needs of the PDP-11 system.

Issues to consider when selecting the host operating system:

 DOS itself has essentially no disk caching, and the add-on disk caches that are available typically do not work
well with large disks and don't take advantage of the large amounts of RAM found on modern PCs. However
DOS allows E11 unlimited access to special hardware (such as bus adapters), and it's generally very stable,
inexpensive, and easy to install. And it's small enough that in some cases, an entire E11 system can boot
and run from a single oppy disk.

 Windows 95/98 has good disk caching, and doesn't interfere much with hardware access, but it has a very poor
task scheduler. It signi cantly reduces the amount of CPU time that E11 gets when it is not the foreground
(or full-screen) window, and often fails to deliver clock interrupts to E11, so the PDP-11's clock can appear to
stop. Even if E11 is in the foreground window, Windows will occasionally suspend E11's execution for several
seconds to perform housekeeping functions, which degrades response time and causes the PDP-11 clock to
lose time.

10 18
18 Page 19 20
Installation and Con guration 11
 Windows NT has good disk caching and a true pre-emptive scheduler, but it has very bad DOS emulation.
All accesses to hardware are intercepted and virtualized by the operating system, not accesses just to devices
that are being shared with other programs. As a result, there's no way to access Ethernet ports or raw SCSI
disk/tape drives or bus adapters, or anything else besides the basic core PC peripherals (screen, keyboard,
display, COM/LPT ports etc.). Also, Windows NT isn't very reliable about delivering clock interrupts to
E11, so the PDP-11 clock loses time.

 OS/2 has excellent disk caching (for native partition types), a true pre-emptive scheduler, good DOS emu-
lation, and allows E11's built-in device drivers free access to hardware. Disadvantages of OS/2 are that it's
dicult to obtain, not well supported, and has poor caching of FAT partitions.

2.2 Installation
Installation is very straightforward. Simply insert the distribution disk into a oppy drive and type:
C:n>a:install
If the oppy drive is not drive A:,substitute the actual drive name in the above command. The installation program
will prompt for a directory into which to install, and will then extract all the E11 les from the distribution disk.
The les are as follows:

le contents
E11.EXE executable
E11.HLP \HELP" data le
E11.PDF this document, readable with Adobe Acrobat
HD*.* source and binaries for RT-11 HD: driver
DO*.* source and binaries for RT-11 DO: driver
KED.CMD keyscripts for using cursor keys with KED/EDT

E11's home directory is also a sensible place to put disk image les (*.DSK) and the E11.INI initialization le (see
below), since E11 will look there if these les aren't found in the current working directory.

Drivers for most of the PC hardware that E11 controls are built into E11 itself, so there is often no need to load
any external drivers or TSR programs. However there are some exceptions. These are listed below, along with
the device emulations or drivers that may require them, and examples of typical lines that would be added to
the CONFIG.SYS and/or AUTOEXEC.BAT les to load the drivers. The drivers themselves are supplied by the
hardware vendor and/or the operating system.

driver needed by typical command line
Packet Driver DEQNA/ PCIPKT 0x60 (in AUTOEXEC.BAT)
DELUA
Mouse VT11 DEVICE=C:nMOUSEnMOUSE.SYS (in CONFIG.SYS)
or C:nMOUSEnMOUSE (in AUTOEXEC.BAT)
CD-ROM CDROM: DEVICE=C:nSBCDnSBIDE.SYS /D:MSCD001 /V (in CONFIG.SYS)
and C:nDOSnMSCDEX /D:MSCD001 (in AUTOEXEC.BAT) 19
19 Page 20 21
12 Installation and Con guration
Whether or not the above drivers will be needed depends on the con guration of the emulated system. Most
common con gurations don't require any of them. If needed, these drivers are installed by adding lines similar to
the above examples to the CONFIG.SYS and/or AUTOEXEC.BAT les, using a text editor.

2.3 Con guration
Ersatz-11 is con gured using a text le named \E11.INI," which is normally kept in E11's home directory. This
le may be created using any text editor. It contains a series of commands which are read and processed in order
every time E11 starts up. Lines which start with a \;" or\!" character are treated as comments, and ignored.
Each individual serial line or emulated disk or tape unit is created with a one-line command. Typically there will
also be additional commands to de ne the emulated CPU model, set any non-standard device addresses or device
types, and nally the initialization le usually ends with a BOOT command which boots the emulated PDP-11's
operating system. The table below summarizes which command is used to add each device type to the system.
The syntax of each speci c command is described in chapter 9.

device type command to create
CPU SET CPU
disk drive MOUNT
tape transport MOUNT
TTY line ASSIGN
line printer ASSIGN
network port ASSIGN

Below is a typical E11.INI le. This le is read by Ersatz-11 every time it starts up, and the commands are
executed in sequence, as if they were typed at the keyboard.

;
; Set PDP-11/44 CPU model
;
set cpu 44
;
; Mount disk and tape units
;
mount du0: rsx11m.dsk
mount du1: ra81.dsk
mount mm0: dump.tap
;
; Add extra DL11 terminal lines and LP11 printer port
;
assign tt1: con2:
assign tt2: con3:
assign lp0: lpt1:
;
; Define DELUA Ethernet port using RealTek PCI NE2000 clone
;
assign xe0: ne2000a: 20
20 Page 21 22
Installation and Con guration 13
;
; Boot MSCP disk unit 0 (and switch keyboard to PDP-11 console)
;
boot du0:
;
; Control returns to the next line when the user presses Shift-Enter
; or the system halts on its own (e.g. SHUTUP.TSK)
;
quit

The \boot" command starts the PDP-11 operating system and directs keyboard input to the PDP-11 system
console. The user can press Shift-Enter at any time to pop up an E11 command prompt where additional commands
may be entered interactively. If there are unread lines remaining in \E11.INI" (i.e. following the \boot" command),
they will be read at that time. In this example, the program will exit immediately when Shift-Enter is pressed
because it causes the \quit" command to be read.

There are a few more basic options which are entered as switches on the E11 startup command line, rather than
being contained in the \E11.INI" initialization le:

/HELP (syn. /?) Display a simple list of switches and their meanings, and exit without starting E11.
/INITFILE: le[.INI] Read the speci ed initialization command le instead of E11.INI.
/MEMORY:nnnn Set the maximum possible emulated memory size of the PDP-11 to nnnn (decimal)
kilobytes. By default this maximum is 248 KB. The reason this switch exists is so that
you can enlarge PDP-11 memory past the default in real mode versions, (how much
depends on what device drivers and TSRs you have loaded), or reduce it if memory is
so tight that ASSIGN, LOG, orMOUNT commands fail for lack of it (they will give error
messages if this is the case), or in any case if you want to emulate a PDP-11 with less
memory than E11's default.

/NOINITFILE Do not process the E11.INI initialization command le.

When con guring the system for the rst time, it is best to exactly duplicate the system which is being replaced.
There may be a strong temptation to expand the system, now that PDP-11 peripherals are e ectively \free" for
the asking. But such changes can cause con icts with existing software, which may contain hard-coded device
names or other hidden assumptions about the system con guration. These problems may be avoidable, if system
expansion is postponed until after the existing system is brought up as-is.

Note that some operating systems do little or no autosizing and may have problems if the hardware being emulated
by E11 di ers from the one for which the operating system was generated. In particular you may run into trouble
if your OS depends on any static memory allocation (if E11 is emulating a di erent amount of memory than what
the system expects), or if it is built for Q22 I/O and E11 is emulating a PDP-11/44 with Unibus map registers, or
anything like that. Also, the routine in RSX-11M-PLUS that counts the number of registers in an RH70 depends on
PDP-11/70 autoincrement semantics, and will get the wrong answer if you set the CPU type to PDP-11/44. This
normally causes no problems, since real PDP-11/44s can't have RH70s, but this and other \impossible" situations
can be easily created in E11.

One thing to watch out for, is that some software has hard-coded assumptions about how fast the hardware operates
in relation to the CPU. See section 1.8.1 for a discussion of interrupt timing. This can lead to strange behavior, 21
21 Page 22 23
14 Installation and Con guration
such as devices that simply hang, or supposedly I/O bound tasks that consume 100% of the CPU. These problems
can generally be solved by experimenting on the relevant emulated devices with the SET DELAY command. If the
system doesn't operate correctly with the default delay counts, but springs to life when they're increased to large
numbers, then it's just a simple matter of tuning the numbers to get delays which are long enough that the system
works reliably, but still give good performance. Ideally the PDP-11 device drivers should be updated so that they
will operate correctly with \in nitely" fast hardware, since this will allow it to get the best possible performance
out of any fast PDP-11 replacement, but the SET DELAY command allows the user to work around these problems
without having to touch the PDP-11 software. 22
22 Page 23 24
Chapter 3
Transferring the PDP-11
Operating System to the PC

In order to run an exact copy of a real PDP-11 system, the contents of the PDP-11's disk(s) must be accessible
to Ersatz-11 to be used as emulated disks. In most cases, this means importing a byte-by-byte copy of each entire
disk into a large \image" le which is the same size as the entire PDP-11 disk. Note that this is very di erent from
importing the individual les from the PDP-11 disk. In some cases the les can be reassembled into a disk image,
but if possible it's better to download the disk(s) as a single large image. The fewer transformations the data go
through, the fewer opportunities for mistakes that could lead to le damage.

Getting a snapshot of a bootable disk from an existing PDP-11 into a PC le can be tricky, there are many ways
to do it and which choice is the best one depends on what software and hardware are available, and what media
or protocols the PDP-11 and PC have in common. D Bit can help with some forms of media translation, call or
send email for information. DEC, Mentec, and S&H are all now willing to sell PDP-11 OS licenses to emulator
users, there doesn't seem to be an issue about the lack of a CPU serial number. So ordering the latest OS version
is straightforward, and with the right peripherals the installation kits can be booted directly by E11 and installed
on emulated disk(s).

Disk images have been successfully loaded from real PDP-11s using Kermit, or Process Software TCP/IP, or
DECnet and Pathworks, or (as a last resort) an OS-supplied DUMP command on the PDP-11 with the output
captured with a PC terminal program and then massaged back into binary with a simple utility program. Also,
PUTR (available from ftp.dbit.com, see below) can build bootable RT-11 image les using a oppy disk distribution
kit, without the need for booting a real PDP-11.

3.1 SCSI disks
The easiest way of all to move any PDP-11 OS to the PC is using a SCSI disk drive. If you were already using
a PDP-11 SCSI controller, you should be able to move the disk directly over to a PC SCSI controller, and either
read it into an image le (using PUTR.COM) or use it directly (using the SCSI disk support in the full version
of E11). Iomega Zip and Jaz drives, and Fujitsu DynaMO 3.5" magneto-optical drives, are inexpensive and work
very well with both Ersatz-11 and PUTR.COM, and they provide a cheap, fast, easy way to transfer les or whole

15 23
23 Page 24 25
16 Transferring the PDP-11 Operating System to the PC
disks between real PDP-11s and E11.
Even if the PDP-11 didn't already have a SCSI controller, it might be worth obtaining a used one if a non-trivial
amount of data must be transferred, unless the PDP-11 operating system is too old to support SCSI MSCP devices.
Adding support for it to the operating system might require a SYSGEN in some cases, but for RSX, BRUSYS will
support a DU: controller regardless of whether your usual monitor is built with the DU: driver. Older versions of
RSTS can both backup and restore without ever booting a monitor at all, and the backups are self-booting and
include a copy of the backup utility, so restoring them on the target system is easy. New versions of RSTS require
that the backups be made under timesharing, but they can still be restored in INIT.SYS.

3.2 SCSI tapes
Magnetic tape can be a convenient way to import PDP-11 data to the PC, as long as a PC tape drive can be
found which will read the PDP-11 media. The DEC TZ30 and TK50Z-GA SCSI drives use TK50 tapes, and a
variety of companies still make SCSI 9-track tape drives. Images of these tapes may be taken using D Bit's DOS
SCSI tape utility (available from ftp://ftp.dbit.com/pub/ibmpc/util/st.exe) and the resulting .TAP les may be
mounted under E11.

3.3 Kermit
Kermit is a protocol for transferring les over serial lines. It provides very good reliability, and requires no special
hardware, but it can be slow. At 9600 baud with the default Kermit protocol parameters (no long packets or sliding
windows), binary le transfers can take almost an hour per megabyte. This may be acceptable if the system has
small disks or the transfer can be performed over a weekend or during some other time when the PDP-11 is not
busy with other work. Kermit protocol support is included in most terminal programs, and Kermit software is
available at little or no cost for most computers and operating systems, including the following PDP-11 versions:

 KSERVE | D Bit's server-only Kermit for RT-11, available from
http://www.dbit.com/pub/pdp11/rt11/kserve.mac

 K11 |Columbia's ocial PDP-11 Kermit program, supports all major DEC/Mentec/S&H operating systems,
see http://www.columbia.edu/kermit/pdp11.html

 KRT | Billy Youdelman's version of K11, enhanced for RT-11 and TSX-Plus, also at
http://www.columbia.edu/kermit/pdp11.html

It's very important to issue SET FILE TYPE BINARY commands to the Kermit programs at both ends before
beginning a Kermit transfer of a PDP-11 disk. The other settable Kermit parameters are less critical, as they mainly
a ect the speed with which the transfer will proceed. Of the above Kermits, only KSERVE is able to download an
entire raw disk. The others can download les but not entire raw disks. In some cases it may be possible to get
around this limitation by using PDP-11 system utilites (such as RT-11's COPY/FILE/DEV command) to copy an
entire raw disk into a le on another, larger disk, and then use Kermit to download that le. Or, if no larger disk
is available, it may be possible to break the disk into several pieces (each small enough to t into the free space on
another disk) and copy them to les one at a time, sending each to the PC via Kermit and then deleting it. 24
24 Page 25 26
Transferring the PDP-11 Operating System to the PC 17
3.4 Ethernet
Ethernet can be a very e ective way to transfer PDP-11 data to a PC. Unfortunately Ethernet hardware is not
nearly as common on PDP-11s as it is on PCs, but used Q-bus/Unibus Ethernet boards are available very cheaply
from used equipment dealers. So if the PDP-11 has software support for an Ethernet board, it may be worth buying
one just to transfer the disks.

The main problem with using Ethernet on PDP-11s is the availability of compatible protocols. If a PDP-11 operating
system supports Ethernet, it usually uses DECnet, while PCs are more likely to support TCP/IP. However software
to support either protocol is available on both PCs and PDP-11s, it's just a matter of getting it.

 Alan Baldwin's excellent free TCP/IP packages for RT-11 and TSX-Plus are available via FTP from
shop-pdp.kent.edu.

 Megan Gentry's \RTEFTP" RT-11 Ethernet le transfer program is available from
ftp://ftp.std.com/pub/mbg/pdp11/rt11/tools/rteftp/. It uses its own private protocol and can com-
municate only with other computers running RTEFTP, however it's fast, very easy to set up, and can transfer
raw disks.

 JSA Stackware, a commercial TCP/IP package for RSX, is available from JSA. It provides Telnet and FTP
access in both directions.

 Process Software's TCP/IP package for the PDP-11 is also a commercial product, available from Process
Software (www.process.com).

 DECnet/DOS and Pathworks for DOS are no longer available, but they were able to connect to DECnet
hosts. So if you already have it, it may be useful for transferring disks.

Some of the above programs are not able to transfer entire raw disks over the Ethernet. In this case the same
workarounds as used with Kermit transfers may be applied, to copy raw disks to les and then transfer the les.

3.5 ASCII serial dump
Most DEC operating systems provide a utility (typically named DUMP or DMP) which can dump a le or device
out to the terminal in octal or hexadecimal. If this program is used to dump out the entire disk, a PC terminal
program can be used to capture the output, and it can be translated back to a binary disk image on the PC. This
should only be used as a last resort because there's no error checking or correction, and the transfer is very slow
because of the inecient encoding and extra header/trailer/address information that's normally displayed with
each block.

If possible the transfer should be done using hexadecimal rather than octal, the transfer will go faster since each
word is displayed as only four characters instead of six. On an RSX system, this can be done with the following
commands:

>INS $DMP
>DMO ddu:/DEV/LOCK=V (if ddu: is the system disk)
>MOU ddu:/FOR (if ddu: is not the system disk) 25
25 Page 26 27
18 Transferring the PDP-11 Operating System to the PC
>DMP TI:=ddu:/BL:0/WD

The le produced by capturing the output from the above command can be translated back into a binary disk image
using the \HEX2DSK" program, available from ftp://ftp.dbit.com/pub/ibmpc/util/. Source code is included
so the program can be modi ed for other dump display formats if needed. RT-11 has a DUMP/TERMINAL
command, which is similar to RSX's DMP command but gives a di erent output format.

Since there is no error detection at all, disks transferred in this manner should be downloaded twice, and the
resulting les should be compared, as a test to make sure the dump wasn't corrupted by line errors or bu er
overruns.

3.6 System-speci c notes
RT-11 is the easiest operating system to transplant. For one thing, an RT-11 Kermit server is available (at
ftp://ftp.dbit.com/pub/pdp11/rt11/kserve.mac) which is able to download an entire raw disk image over a serial
line. This can take a long time but it just about guarantees that the con guration will be duplicated exactly,
just don't forget to type SET FILE TYPE BINARY and REMOTE SET FILE TYPE BINARY to make sure
both participating Kermits agree not to try to treat the binary data as text. Failing that, you can use KSERVE,
or any of several other le transfer methods, to download the individual les (still in binary mode) into a DOS
directory. Then use D Bit's \PUTR" program (available at ftp://ftp.dbit.com/pub/putr/) to build a blank RT-11
disk image, copy the les into it (be sure to use PUTR's COPY/B command to copy in binary mode), and make
the disk bootable with PUTR's BOOT command.

Note

The RT-11 DL: and DM: device handlers expect to nd a bad block replacement table in block 1 of a
disk. If something else is there (like the pack label in Files-11 and RDS 1.1 and later, or the master
le directory in RDS 0.0), they will replace blocks at random and you'll get a corrupted disk image. So
either modify your Kermit (etc.) to use the appropriate .SPFUN instead of .READ, or don't use RT-11
programs to read non-RT-11 disks.

RSTS images can be assembled from individual les using Paul Koning's freely available \ x" program, see below.
All you need to build a bootable pack are the les from SY:[0,1], x knows how to do the HOOK operation and
make the pack bootable.

RSX is more dicult to move since currently there is no DOS software that knows how to build a bootable disk from
its component les. If you don't have an easy way to take a raw snapshot of the whole disk (K11.TSK currently
can't do it), the best bet is to dump the disk to tape and then restore the tape on the PC, assuming you have
suitable tape drives on both. Stand-alone BRU (a.k.a. BRUSYS) is the easiest way to do this. After copying the
entire disk to tape, build a bootable BRUSYS tape for E11 (HELP BRU STAND under RSX will tell you how).
Then use PUTR.COM to build a blank disk image le of the appropriate type, and boot E11 from the BRUSYS
tape, with the empty disk image le mounted. Once BRUSYS has started, you can physically switch tapes, or else
pop up an E11 prompt and MOUNT the ( rst) backup tape if you're using tape image les. Then run FMT (if
needed) and BAD on the blank disk, and nally run BRU to restore the tape. If you want to use tape image les
instead of using a real tape drive (required on E11 Demo and E11 Lite, since they don't support SCSI tapes), you
can use D Bit's DOS SCSI tape utility (available from ftp://ftp.dbit.com/pub/ibmpc/util/st.exe) to copy between
real tapes and E11 tape image les. 26
26 Page 27 28
Transferring the PDP-11 Operating System to the PC 19
3.7 Utilities
PUTR.COM, a companion program to E11, is available from ftp://ftp.dbit.com/pub/putr/, and knows how to
read and write RT-11 and OS/8 format volumes on a variety of media, as well as how to read RSTS/E volumes. It
can write blank container les with the serial numbers and (empty) bad block data lled in correctly, and format
many types of DEC oppies, and SCSI disks too, which can be useful with any OS. It can also read and write
TU58 DECtape II tapes, if the drive is connected to a PC COM port. Assembly language source is included.

Paul Koning (former RSTS/E developer) has written a very complete program named \flx" for manipulating les
in RSTS disk images. Among other things it can build a bootable disk given the les from [0,1]. It's available from
ftp://ftp.dbit.com/pub/flx/ and is written in portable C, so it can be used with any emulator (or with real
disk packs on a VAX). A DOS executable is included with the sources. 27
27 Page 28 29
Chapter 4
Disk Devices
Ersatz-11 emulates a wide variety of disk drive and controller models. These are created using one MOUNT command
(see page 60) for each drive unit needed. Generally each emulated disk unit must be connected to an emulated
disk device (e.g. a large le on the PC's disk) which is at least as large as the disk it emulates. The connection is
device-independent, any emulated disk can be connected to any of the physical disk device types that E11 supports.
The controller itself is created implicitly when its rst drive is mounted, and can be deleted by dismounting all of
its drives. The controller type (RL11, UDA50 etc.) is implied by the device name used in the MOUNT command,
and the same device name syntax is the same as most DEC operating systems.

E11 has sensible defaults for all disk parameters, so in most cases a MOUNT command for each unit is all that is
needed. If necessary, the default drive parameters can be overridden using MOUNT switches, and the default controller
parameters can be overridden using a separate SET command, which may be given before or after the drives are
mounted. The defaults are as follows:

parameter default how to override
controller model based on SET CPU QBUS setting SET ddc: model (e.g. SET DUA: RQDX3)

controller
CSR/vector
DEC default addresses
\ oating" addresses are calculated auto-
matically if appropriate

SET ddc: CSR=xxxxxx VECTOR=yyy

interrupt
priority
DEC default values, SET CPU QBUS set-
ting
SET ddc: PRIORITY=n

drive model based on sizeofcontainer le MSCP/TMSCP drives:
/TYPE:type switch (e.g. /TYPE:RD54)
non-MSCP/TMSCP drives:
/type switch (e.g. /RK06)

write protection disabled /WP or /RO switch

After a drive is mounted, a SHOW ddcu: command (e.g. SHOW DUA0:) will display the actual drive parameters for
that unit, as well as the controller parameters for the controller to which it is attached. The controller CSR, vector,

20 28
28 Page 29 30
PC disk devices 21
interrupt priority, and type (i.e. controller model) can be changed explicitly at any time with a SET command. If
these parameters are defaulted, their actual values can also be changed implicitly at any time, by a change in the
SET CPU setting (which can make a defaulted controller type switch between the Unibus and Q-bus models of that
controller), and by changes in the con guration of other devices that use \ oating" CSRs and/or vectors (if this
controller is set to be a oating device, as DUB: and DYB: normally are for example).

4.1 PC disk devices
The MOUNT command establishes a connection between an emulated PDP-11 disk drive unit, and a PC le or device
which will be used to hold the actual disk data. Generally this le or device must be at least as large as the
PDP-11 disk unit that is being emulated. E11 supports several di erent forms of physical media to be used for
emulating disks. The connections are made on a per-unit basis so it is possible to mix units attached to di erent
types of physical media within the same emulated PDP-11 disk controller. The supported types of physical media
are described below, along with the syntax of the MOUNT command for each type. The /RONLY (syn. /WPROTECT
switch may be speci ed on any MOUNT command, to lock the disk against writes.

4.1.1 Disk image les
Command syntax:
MOUNT ddcu: [d:pathn] lename[.DSK] [switches]
Special switches: none
A disk image le contains a byte-by-byte image of a PDP-11 disk, presumably loaded from a real PDP-11 using
Kermit or DECnet or some equivalent, or built using PUTR.COM or FLX.EXE or RT11.EXE or a similar utility (see
chapter 3). The le is the same size as the total capacity of the PDP-11 disk drive it replaces. The le is located
using E11's usual search rules, see section 1.7 for details.

There are two types of image les, \block" and \sector" images. \Block" images contain the disk data as it would
be read in sequential block order, which for most PDP-11 disks is the same as the raw device order. This is the
most common format and is normally used by default. \Sector" images apply to oppy disks only. RX01, RX02,
and RX50 disks are organized using a soft interleave layout to increase their speed when used with controllers
that have only one sector bu er. The PDP-11 device handlers (and/or controllers) for these disks handle the soft
interleave so it is normally invisible to the PDP-11 user program, so images made of these disks using something
like the RT-11 \COPY/FILE/DEV" command will be normal block images. When a block image le is accessed as a
virtual PDP-11 oppy disk, Ersatz-11 does the inverse of the soft interleave so that when the PDP-11 driver does
the interleave,the blocks come outinthe correctorder.

However if the image is taken using special software (such as the COPFLP.MAC program available from ftp.dbit-
.com), or on a non-DEC computer, it may be more natural for the image le to be in raw sector order, i.e. starting
with track 0 sector 1, then track 0 sector 2, track 0 sector 3 etc. In this case Ersatz-11 should not alter the
interleave, and in fact it should do the interleave itself if the le is mounted as something other than a virtual
oppy drive (since PDP-11 drivers for other devices don't do the oppy-style interleave).

By default, Ersatz-11 guesses whether a le is a block or a sector image based on the le size: 29
29 Page 30 31
22 Disk image les
size (bytes) type
256,256 RX01 sector image
512,512 RX02 sector image
1,025,024 \RX03" (DS RX02) sector image
(anything else) block image

Block images of RX01/02/03 disks are slightly smaller because the interleave scheme leaves out track 0, so they
can be distinguished by size alone, unless padding was added during transfer or something else altered the le size.
RX50 image les are the same size either way, since the RX50 soft interleave scheme uses all sectors of the disk. So
by default they are assumed to be block images. The defaults may be overridden with the \/BLOCK" and\/SECTOR"
switches on the MOUNT command.

Since DEC's 8" oppy interleave scheme doesn't use track 0, data from this track do not normally appear in a
block image le. However some non-standard software may need to use track 0, so the RX11, RX211, and RXT11
emulations relocate it beyond the end of the block image, if the le is enlarged by the size of one cylinder to be
the same size as the equivalent sector image le. Use \/BLOCK" to specify that it's still a block image, in spite of
being the size of a sector image. In this case it may be more natural to use a sector image, but E11 supports either
scheme.

type base size (bytes) extra size (bytes)
RX01 252,928 3,328
RX02 505,856 6,656
\RX03" 1,011,712 13,312

If the base le sizes are used, these les work as regular block images and track 0 does not exist. Any attempt to
write track 0 is a no op, and any attempt to read track 0 returns hex E5 in every data byte, as if the disk were
freshly formatted.

Note

The Demo and Lite versions of E11 limit the combined size of all image les to 32 MB. E11 versions
prior to 2.0 did not have this restriction, but they are no longer supported by D Bit.

Disk caching done by the host system
Ersatz-11 has no control over any caching of disk writes that the host operating system may do, so
it is important that you QUIT out of the simulator to make sure all the pseudo-disk les get closed
properly, rather than simply switching the computer o , after shutting down your PDP-11 operating
system. Otherwise there is the possibility that a write-back disk cache might not have written all of
the PDP-11's data to disk. In practice no problems have been observed, but trouble is theoretically
possible so care should be taken. The oppy disk support controls the hardware directly so as long as
the PDP-11 is done with the disk it's OK to take it out of the drive.

Also, the emulator has no control over \Green PC" BIOSes which spin down hard drives after a speci ed
period of inactivity (this is especially common on laptops). When E11 accesses the drive after it's been
shut down, the BIOS will pause several seconds while it spins the drive back up. During this period
E11 is not running, so the simulated PDP-11 may drop incoming characters (but not necessarily, E11 30
30 Page 31 32
Raw oppy disk drives 23
maintains a small FIFO bu er on each line at interrupt level) and its clock will lose a few seconds. If
this is a problem you may have to disable this BIOS feature.

4.1.2 Raw oppy disk drives
Command syntax:
SET d: type (if needed)
MOUNT ddcu: d: [switches]

Special switches: drive type, one of the following:
switch drive type size in blocks disk types
/RX01 5.25" or 8" SS SD 494 RX01
/RX02 5.25" or 8" SS DD 988 RX01, RX02
/RX03 5.25" or 8" DS DD 1,976 RX01, RX02, RX03
/RX23 3.5" 1.44 MB 2,880 RX23, RX24
/RX24 3.5" 720 KB 1,440 RX24
/RX26 3.5" 2.88 MB 5,760 RX23, RX24, RX26
/RX33 5.25" 1.2 MB 2,400 RX33, RX50, \RX52"
/RX50 5.25" SS DD 800 RX50
/RX52 5.25" DS DD 1,600 RX50, \RX52"
/MY 5.25" DS DD 1,600 MY: (Russian PDP-11 clones)

Floppy disk drives may be used to emulate any block-replaceable device supported by E11. \d:" is the drive letter,
i.e. A: or B: for the rst or second oppy drive.

A command switch speci es the drive type, the default type is RX23, RX24, RX26, or RX33 depending on the
type set for that drive in the PC's BIOS setup. The default for each drive may be changed using a SET command,
so that future MOUNT commands using that drive won't need a switch to set the oppy drive type.

For exampl e, SET B: RX01 overrides the value in the BIOS setup, so that future MOUNTddcu: B:commands will
access the drive as an 8" SS SD drive. This command is normally just a convenience, however a real DEC RX50
drive (or some other quad density drive, like a Tandon TM100-4) attached to the PC oppy controller is a special
case, which requires e.g. a SET A: RX50 command before use. This is because the /RX50 switch on the MOUNT
command assumes the RX50 disk is mounted in a 1.2 MB drive, which turns at a di erent speed from a true RX50
or QD drive and thus requires a di erent data rate to access the same data.

As shown in the table above, most drive types support one or two smaller disk formats in addition to their own.
This means that any disk type supported by a given drive type may be inserted at any time with no need to
re-MOUNT the drive. E11 will automatically detect the format of the new disk and adjust to the new geometry.
Capacity changes are passed along to emulated PDP-11 controllers that understand them, i.e. the DU:, DY:, and
HD: controllers.

Note that confusion is possible if a oppy disk has a di erent total number of blocks than the device being emulated.
The PDP-11 OS may try to access areas o the end of the disk, which results in a controller-speci c I/O error,
or may not use all of the disk. In particular writing a blank le system (with an OS-speci c \initialize volume"
command) will result in a directory structure that doesn't match the actual volume size. Care should be exercised
to avoid trouble. Like disk types are of course not a problem, so for example \MOUNT DX0: B: /RX01" will mount 31
31 Page 32 33
24 Raw CD-ROM drives
arealRX01disktobeused asan emulated RX01disk.TheHD: device works with any size device, so all oppy
types may be mounted on HD: if you have the \HD.SYS" device handler (under RT-11).

If the disk already has a correct directory structure to match its actual size, and is mounted to emulate a device
of at least that size, most operating systems (that use device-independent le system formats) will be able to read
and write the disk correctly. For example, if you initialize an RX23 oppy with RT-11 directory structure using the
PUTR utility under DOS, and then \MOUNT DL0: A: /RX23" in E11 (using the 1.44 MB RX23 disk to emulate a 5
MB RL01 pack), RT-11 will be able to access all les on the disk, and can write new les without data corruption.
Only the RT-11 INITIALIZE and SQUEEZE commands need to be avoided in this case.

Most of the oppy disk formats supported by E11 are exact equivalents to PC formats. Not all of them were
ever supported by DEC for use on PDP-11s in particular, but some were supported by aftermarket controllers.
The RX01/02/03 formats use 1.2 MB disks, specially formatted (by E11 or the PUTR utility) to have the exact
same geometry as their 8" counterparts. The RX01 format is in fact identical to the IBM 3740 format used on
DEC's 8" disks, so if a Shugart style 8" drive is attached to the PC oppy disk controller using a special cable
(or D Bit's \FDADAP" oppy disk adapter board, see http://www.dbit.com/fdadap.html), it will be possible to
read/write/format real RX01 disks. DEC uses a modi ed MFM format for RX02 disks, which the PC hardware is
incapable of using, so E11 substitutes the IBM System/34 compatible format for the RX02/RX03 workalike disks.

The RX01 format is not guaranteed to work (on either 5.25" or 8" drives) because most current PC oppy controllers
don't have a working single density mode (the PC BIOS is hard-coded for double density so manufacturers have
dropped support for \unneeded" features). However some oppy controller chips made by SMC, Goldstar, and
Western Digital are known to work with single density mode. These chips usually contain \37C65" in the part
number and use a 16/32 MHz clock plus a 9.6 MHz clock rather than the single 24 MHz clock used by many other
controllers, so it may be useful to shop for a oppy controller board that has two crystals on it instead of one,
in the absence of better information. The \CompatiCard IV" controller formerly made by Micro Solutions, Inc.
works with single density disks and is supported by E11.

In addition to the PC formats and 8" workalike formats, E11 also supports several 5.25" formats. RX50 disks are
supported using a 1.2 MB drive. \RX52" is E11's name for double-sided RX50 disks, which were never sold by
DEC, but may have been planned (for the Professional series at least). \MY" is the device name for the DS DD
5.25" disks used on the Russian DVK-x PDP-11 clones. The low-level format is the same as the \RX52" but there
is no software sector interleave. \MX" disks are not able to be supported by the PC disk controller so E11 can't
use them.

E11 can format all the disk types that it supports. Usually the easiest way to get at this feature is using the \set
density" command of the RX211 controller, which can be executed by running FORMAT.SAV under RT-11 (using
commands like \FORMAT DY0:" or\FORMAT DY0:/SINGLE"), or the SPEC%() function under RSTS. E11 chooses
which of the formats (supported by a given oppy drive type) to use based on the size of the emulated disk, it uses
whichever format is the same size as the emulated volume being formatted, or the next larger format if there's no
exact match.

Ersatz-11 also supports the \format oppy disk" commands of the RQDX3 and RQZX1 controllers, so utilities that
would work with those controllers will work with E11.

4.1.3 Raw CD-ROM drives
Command syntax: 32
32 Page 33 34
Raw CD-ROM drives 25
MOUNT ddcu: CDROMd:
Special switches: none
The CD-ROM drive whose DOS drive letter is speci ed by \d" is accessed using the DOS MSCDEX.EXE (or
DR-DOS NWCDEX.EXE) driver. Note that this is a synchronous interface so PDP-11 emulation is stalled while
reading from a CD. More importantly, the Windows 9x version of the MSCDEX interface refuses to access the rst
sixteen sectors of the disk, which are unused on ISO-9660 disks, but are needed on disks written in a PDP-11 disk
format. The workaround is to use real DOS. 33
33 Page 34 35
26 Emulated PDP-11 disk devices
4.2 Emulated PDP-11 disk devices
This section describes each PDP-11 disk drive type that Ersatz-11 emulates, and de nes the device-speci c MOUNT
command switches that apply to each emulated disk type.

name units controller drive/volume switches
DC: 0{3 RC11 (none, always RS64)
DF: 0{7 RF11 (none, based on controller type)
(syn. RF:)
DK: 0{7 RK11D /RK02, /RK05 (syn. /RK03)
(syn. RK:)
DL: 0{3 RL11 /RL01, /RL02
DM: 0{7 RK611 /RK06, /RK07
DP: 0{7 RP11C /RP02, /RP03, geometry switches
DS: 0{7 RH11/RH70 /RS03, /RS04
DT: 0{7 TC11 (none, always TU55/TU56 DECtape)
DU: 0{65535 MSCP /TYPE:xxxyy
DX: 0{1 RX11 (none, always RX01)
DY: 0{1 RX211 /RX01, /RX02, /SS, /DS
HD: 0{15 virtual (none, le size is all that matters)
PD: 0{1 RXT11 (none, always RX01)

The \geometry switches" for DP: refer to /CYLINDERS:n, /HEADS:n, and/SECTORS:n, which may be used to specify
non-standard drive dimensions. This allows compatibility with some clone controllers, which allowed extended drive
sizes and/or untranslated SMD drive geometry to be used instead of the standard DEC geometry. In some cases
the PDP-11 drivers may have been patched to use the non-standard geometry. These switches allow duplicating
that hardware con guration so that the patched drivers will run unchanged under E11.

4.2.1 DC: | RC11/RS64
This emulation is included for completeness, it is not expected that anyone has a practical use for it. It is an early
drive, with a xed platter and xed heads yielding very low capacity (128 KB). There are few if any surviving units
today, and no current PDP-11 operating system version is known to support it. Since there is only one possible
drive type, no switches are required to select it.

MOUNT DC: drive switches:
/WPROTECT enable write protection (syn. /RONLY)

SET DC: controller parameters:
CSR=nnnnnn set CSR address to nnnnnn octal
PRIORITY=n set interrupt priority to n (4{7)
PRIORITY=DEFAULT set interrupt priority to default (BR5 for Unibus, BIRQ4 for Q-bus)
VECTOR=nnn set vector address to nnn octal 34
34 Page 35 36
Emulated PDP-11 disk devices 27
4.2.2 DF: | RF11/RS11, DDC DMS-11X/SSDM 100 (called RF: in RT-11)
The RS11 is another xed-head disk, and is a PDP-11 version of the RS08 disk for the PDP-8. It was word-
addressable and more popular than the RS64, as it was larger (512 KB) and more reliable. Due to their high speed
for the time, RS11s were commonly used for swapping, so it may make sense to use a RAM disk to emulate an
RS11. E11 allows write protecting the entire unit (with the /WPROT or /RO switch), but it does not emulate the
RS11's switch panel which allowed write-protecting the disk in individual 32 KB segments.

The Digital Development Corporation DMS-11X controller is an extended replacement for the RF11/RS11, which
uses a DDC \SSDM 100" RAM drive to hold up to 8 MB of data. It uses slightly di erent disk addressing from the
RF11, and uses the unit select bits as additional track address bits, so only DF0: is useful. Non-zero unit numbers
will not be accessible when emulating a DMS-11X controller. A full 8 MB RAM disk may be created as follows:

SET DF: DMS11X
MOUNT DF0: RAM: /SIZE:8388608

MOUNT DF: drive switches:
/WPROTECT enable write protection (syn. /RONLY)

SET DF: controller parameters:
CSR=nnnnnn set CSR address to nnnnnn octal
DMS11X set controller type to DDC DMS-11X
PRIORITY=n set interrupt priority to n (4{7)
PRIORITY=DEFAULT set interrupt priority to default (BR5 for Unibus, BIRQ4 for Q-bus)
RF11 set controller type to RF11
VECTOR=nnn set vector address to nnn octal

4.2.3 DK: | RK02, RK03, RK05 DECpack (called RK: in RT-11)
These front-loading cartridge drives were very popular in the 1970s thanks to their low cost and small size (a 10.5"
rack-mount box). The disks are similar to the IBM 2315, and many other minicomputer manufacturers used a
similar form factor. The RK02 holds 1.2 MB, while the RK03 and RK05 hold 2.5 MB. E11 does not distinguish
between the RK03 and RK05 because they have identical geometries. The RK02 is no longer supported by current
versions of PDP-11 operating systems. It is unusual in that it stores 256 bytes per sector (the RK03 and RK05
use 512-byte sectors). Be careful when using odd image le sizes with the DK: emulation, if you intend a disk to
be used as an RK05 but it's not quite 4800 blocks long, E11 will auto-detect it as an RK02, which probably isn't
what you want. Use an /RK05 switch to be sure.

MOUNT DK: drive switches:
/RK02 set drive type to RK02 (1.2 MB cartridge drive)
/RK03 set drive type to RK03 (2.5 MB cartridge drive)
/RK05 set drive type to RK05 (2.5 MB cartridge drive)
/WPROTECT enable write protection (syn. /RONLY) 35
35 Page 36 37
28 Emulated PDP-11 disk devices
SET DK: controller parameters:
CSR=nnnnnn set CSR address to nnnnnn octal
PRIORITY=n set interrupt priority to n (4{7)
PRIORITY=DEFAULT set interrupt priority to default (BR5 for Unibus, BIRQ4 for Q-bus)
VECTOR=nnn set vector address to nnn octal

4.2.4 DL: | RL01, RL02
The RL01 and RL02 are top-loading cartridge drives which hold 5 and 10 MB, respectively. DEC marketed them
successfully as a replacement for the RK05, and they were extremely popular in the 1980s, due to their reliability,
small size (a 10.5" rack-mount box) and the relatively low price of the drives (however the cartridges were very
expensive). New RL01 and RL02 cartridges come with a bad block table written by the manufacturer in the last
track, which the PDP-11s are careful never to overwrite. Some utilities check for this table and will complain if
it is not present, so be sure to get the whole disk when making image les. The PUTR utility (available from
ftp.dbit.com) knows how to write a null bad block track when creating an empty image le (using its FORMAT . . .
/RL0x command).

MOUNT DL: drive switches:
/RL01 set drive type to RL01 (5 MB cartridge drive)
/RL02 set drive type to RL02 (10 MB cartridge drive)
/WPROTECT enable write protection (syn. /RONLY)

SET DL: controller parameters:
CSR=nnnnnn set CSR address to nnnnnn octal
CSR=FLOATING set CSR address to be auto-con gured
PRIORITY=n set interrupt priority to n (4{7)
PRIORITY=DEFAULT set interrupt priority to default (BR5 for Unibus, BIRQ4 for Q-bus)
DEFAULT set controller type to default (RL11 for Unibus, RLV12 for Q-bus)
RL11 set controller type to RL11 (Unibus)
RLV11 set controller type to RLV11 (Q18)
RLV12 set controller type to RLV12 (Q22 with BAE register)
VECTOR=nnn set vector address to nnn octal
VECTOR=FLOATING set vector address to be auto-con gured

4.2.5 DM: | RK06, RK07
The RK06 and RK07 are top-loading twin-platter cartridge drives with capacities of about 13 and 27 MB, re-
spectively. They were mounted on free-standing low-boy cabinets and were sort of a poor man's Massbus drive,
even the geometry and register layouts are similar but there are only two platters (one timing surface, three data
surfaces), the disks turn at only 2400 RPM, and the control bus is serial rather than parallel. The drives could be
dual-ported but this con guration was rare.

MOUNT DM: drive switches:
/RK06 set drive type to RK06 (13 MB cartridge drive)
/RK07 set drive type to RK07 (27 MB cartridge drive)
/WPROTECT enable write protection (syn. /RONLY) 36
36 Page 37 38
Emulated PDP-11 disk devices 29
SET DM: controller parameters:
CSR=nnnnnn set CSR address to nnnnnn octal
PRIORITY=n set interrupt priority to n (4{7)
PRIORITY=DEFAULT set interrupt priority to default (BR5 for Unibus, BIRQ4 for Q-bus)
VECTOR=nnn set vector address to nnn octal

4.2.6 DP: | RP02, RP03
These are top-loading 12-platter pack drives originally designed to be used with the PDP-10 series, but adapted
for the PDP-11. The RP02 holds 20 MB per pack, while the RP03 holds 40 MB. RT-11 can't use a whole RP03 at
once due to the RT-11 le structure's limit of 32 MB per volume, so it makes an RP03 look like two 20 MB disks.
Although these were fairly early drives and weren't very widely used, the programming model is straightforward
and as a result, aftermarket controllers that emulate them using SMD drives are common. Some of these controllers
supported special drive geometries to give extended capacity and/or use the untranslated SMD sector addressing.
In order to emulate these con gurations, E11 supports the /CYLINDERS:n, /HEADS:n, and/SECTORS:n switches so
that the user may specify custom disk dimensions.

MOUNT DP: drive switches:
/CYLINDERS:n set non-standard number of cylinders
/HEADS:n set non-standard number of heads
/RP02 set drive type to RP02 (20 MB 12-platter pack drive)
/RP03 set drive type to RP03 (40 MB 12-platter pack drive)
/SECTORS:n set non-standard number of sectors
/SERIAL:nnnn set drive serial number (4 decimal digits)
/WPROTECT enable write protection (syn. /RONLY)

SET DP: controller parameters:
CSR=nnnnnn set CSR address to nnnnnn octal
PRIORITY=n set interrupt priority to n (4{7)
PRIORITY=DEFAULT set interrupt priority to default (BR5 for Unibus, BIRQ4 for Q-bus)
VECTOR=nnn set vector address to nnn octal

4.2.7 DS: | RS03, RS04
The RS03 and RS04 are xed-head Massbus disks that hold 512 KB and 1024 KB, respectively. As with the RS11,
these were used for swapping and other cases where speed is critical, so mounting them as RAM disks would work
well.

MOUNT DS: drive switches:
/RS03 set drive type to RS03 (512 KB xed-head disk)
/RS04 set drive type to RS04 (1024 KB xed-head disk)
/WPROTECT enable write protection (syn. /RONLY) 37
37 Page 38 39
30 Emulated PDP-11 disk devices
SET DS: controller parameters:
CSR=nnnnnn set CSR address to nnnnnn octal
PRIORITY=n set interrupt priority to n (4{7)
PRIORITY=DEFAULT set interrupt priority to default (BR5 for Unibus, BIRQ4 for Q-bus)
RH11 set controller type to RH11
RH70 set controller type to RH70
VECTOR=nnn set vector address to nnn octal

4.2.8 DT: | TU55, TU56 DECtape
Although it's actually 3=4" magnetic tape, DECtape is block-replaceable and uses a xed number of xed-size
blocks, so really it behaves more like disks do than tapes. It puts 578 512-byte blocks on a 260' tape, and was very
popular for o -line storage in the early 1970s when hard disk space was expensive, and oppy disks were not yet
widely available. The TU55 is a single-transport drive, while the TU56 has two independent transports, so it takes
two MOUNT DTn: commands to de ne a TU56. That di erence is invisible to the PDP-11 so there's no switch to
tell them apart.

MOUNT DT: drive switches:
/WPROTECT enable write protection (syn. /RONLY)

SET DT: controller parameters:
CSR=nnnnnn set CSR address to nnnnnn octal
PRIORITY=n set interrupt priority to n (4{7)
PRIORITY=DEFAULT set interrupt priority to default (BR6 for Unibus, BIRQ4 for Q-bus)
VECTOR=nnn set vector address to nnn octal

4.2.9 DU: | MSCP disks
MSCP (the Mass Storage Control Protocol) is a exible, device-independent protocol which allows any disk device
(up to 2 TB) to connect to any of DEC's later computers. It was used in all of DEC's PDP-11 disk controllers from
the mid-1980s on. DEC imposed an arti cial limit of four drives per controller, upon which some versions of some
PDP-11 operating systems depend. Also, DEC wants unit numbers to be unique within a system (i.e. if there's
a unit 0 on one controller there should be no unit 0 on any other controller), and the maximum allowable unit
number varies from one device type to another, depending on the method used to assign a unit number to a drive
(unit select cap for the \ready" light, DIP switches, etc.). Unlike many of DEC's own drives, E11 implements the
full 16-bit unit numbers speci ed by MSCP, so the amount of available memory is the only limit on unit numbers
or the number of drives per controller. Even so, care should be taken to observe the limitations that the PDP-11
operating system imposes on MSCP con guration.

MSCP provides a way for the PDP-11 to nd out the model name of each drive, which can be one to three letters
followed by two decimal digits. This is largely a cosmetic feature, since MSCP already has ways for the PDP-11 to
nd out a disk's size and whether it's xed or removable, so most of the time the name is meaningless. But all the
same, the drive type can be set to any appropriate string using the \/TYPE:name" switchontheMOUNT command.
The default drive type string is \RA81" for image les, or the actual drive type (\RX50" etc.) for oppies.

In some cases the drive type is important, for example some of the programs that format oppy disks on RQDX3
and RQZX1 controllers will refuse to go ahead unless they believe that the drive is an RX33, so you should use 38
38 Page 39 40
Emulated PDP-11 disk devices 31
\/TYPE:RX33" when mounting a oppy drive which is to be formatted using standard software.
MSCP requires that each volume (except for oppy disks) contain a relocation control table (RCT) at the end of
the disk, with a minimum length of one block. This table is used for remapping bad blocks and making the volume
appear to be error-free. Since all current PC disk media (except oppy disks) provide some form of invisible bad
block remapping of their own, they are already error-free, so there is no real need for this feature. Some aftermarket
SCSI controllers provided a one-block RCT anyway, by deducting one block from the reported size of the volume.
E11 can be set to do the same thing using the /RCT switch.

MOUNT DU: drive switches:
/NORCT don't deduct one block for relocation control table
/RCT deduct one block for relocation control table
/TYPE:xxxyy set drive type to xxxyy (1{3 letters, 2 digits)
/WPROTECT enable write protection (syn. /RONLY)

SET DU: controller parameters:
CSR=nnnnnn set CSR address to nnnnnn octal
CSR=FLOATING set CSR address to be auto-con gured
DEFAULT set controller type to default (UDA50A for Unibus, RQDX3 for Q-bus)
KDA50 set controller type to KDA50
PRIORITY=n set interrupt priority to n (4{7)
PRIORITY=DEFAULT set interrupt priority to default (BR5 for Unibus, BIRQ4 for Q-bus)
RQDX3 set controller type to RQDX3
RQZX1 set controller type to RQZX1
UDA50 set controller type to UDA50
UDA50A set controller type to UDA50A

4.2.10 DX: | RX01
The RX01 is a single sided, single density oppy disk drive which uses 8" disks with the standard IBM 3740 format,
the same as was commonly used in CP/M systems. The RX01 is a dual-drive system. If only one of the two units
is MOUNTed, the other one will still appear to be there, since the RX11/RXV11 controller has no way of reporting
whether a drive is present or not, but any attempts to do I/O to the missing drive will return error status.

E11 can read and write actual RX01 oppy disks, using an 8" drive attached to a PC oppy controller (with an
adapter such as D Bit's FDADAP board) which supports single density.

MOUNT DX: drive switches:
/WPROTECT enable write protection (syn. /RONLY)

SET DX: controller parameters:
CSR=nnnnnn set CSR address to nnnnnn octal
CSR=FLOATING set CSR address to be auto-con gured
PRIORITY=n set interrupt priority to n (4{7)
PRIORITY=DEFAULT set interrupt priority to default (BR5 for Unibus, BIRQ4 for Q-bus)
VECTOR=nnn set vector address to nnn octal
VECTOR=FLOATING set vector address to be auto-con gured 39
39 Page 40 41
32 Emulated PDP-11 disk devices
4.2.11 DY: | RX02, \RX03"
The RX02 is a double-density follow-on product to the RX01. It holds twice as much data per disk, and also uses
DMA instead of programmed I/O to copy between PDP-11 memory and the on-board sector bu er, so there's less
CPU overhead. DEC apparently planned a double-sided upgrade, which became commonly know as the \RX03"
but was never actually released. However there are connectors for the extra heads on the drive's controller board
(most of the \brains" of the RX01 and RX02 systems are actually in the drive), and DEC even documented the
register elds that have to do with using double-sided disks, and the RT-11 V4.0 DY.MAC driver includes support
(disabled under conditionals) for double-sided disks, but it was removed in later versions.

E11 includes the double-sided support in its emulation. The /SS and /DS switches can be used when mounting
the drive to set the number of sides, and SET DYu: SS(or DS) can be issued at any time to change it. This may
be necessary when swapping disks in a real oppy drive, because unlike 8" drives, 5.25" drives have no way of
distinguishing single-from double-sided disks, so it can't be done automatically.

RSTS/E uses the names DX: and DY: interchangeably to refer to an 8" oppy drive, which may be either an RX01
or RX02. Early versions of E11 did the same thing and used a SET command to set the actual controller type, but
it was decided that it would be better to be consistant and have the device name always re ect the device type.
This may mean that the device name needed to emulate an existing drive under E11 is di erent from the name
that had been used to refer to the same drive under RSTS/E.

MOUNT DY: drive switches:
/DS double-sided disk
/RX01 single-density disk
/RX02 double-density disk
/SS single-sided disk
/WPROTECT enable write protection (syn. /RONLY)

SET DY: controller parameters:
CSR=nnnnnn set CSR address to nnnnnn octal
CSR=FLOATING set CSR address to be auto-con gured
DS 1 disk in drive is double-sided
PRIORITY=n set interrupt priority to n (4{7)
PRIORITY=DEFAULT set interrupt priority to default (BR5 for Unibus, BIRQ4 for Q-bus)
SS 1 disk in drive is single-sided
VECTOR=nnn set vector address to nnn octal
VECTOR=FLOATING set vector address to be auto-con gured 1

Really a drive option | unit must be mounted before this option is set

4.2.12 HD: | Hypothetical disk
This is a hypothetical disk device which exists only in Ersatz-11. Its original de nition was based on reverse-
engineering the HD SYS.EXE device emulation that came with the so-called \Russian" LSI-11/2 emulator which
used to be oating around the Internet, so that E11 would be able to boot disk images intended for that emulator.
However that emulation was not very useful, since it (apparently) had no provision for interrupts or memory beyond
64 KB or drives bigger than 32 MB. The current emulation has been extended to support 22-bit addressing, up to
16 drives of up to 2 TB each, and it uses interrupts to signal completion so the system doesn't have to stall during
I/O. The main reason it's interesting is that it supports variably sized devices like MSCP does, but with a much 40
40 Page 41 42
Emulated PDP-11 disk devices 33
simpler programming model so that PDP-11 drivers can be written which require far less memory than MSCP
drivers. An RT-11 driver (HD.MAC) is included with E11, and one for Fuzzball is available from ftp.dbit.com.

MOUNT HD: drive switches:
/WPROTECT enable write protection (syn. /RONLY)

SET HD: controller parameters:
CSR=nnnnnn set CSR address to nnnnnn octal
PRIORITY=n set interrupt priority to n (4{7)
PRIORITY=DEFAULT set interrupt priority to default (BR5 for Unibus, BIRQ4 for Q-bus)
VECTOR=nnn set vector address to nnn octal

4.2.13 PD: | PDT-11/150 RX01
The PDT-11/150 was a microcomputer based on the LSI-11 chipset. It had no expansion bus, and used a pair of
8085A processors to simulate the approximate equivalent of a small PDP-11/03 con guration, but it could be built
more cheaply, and sold as a \smart" terminal system for data entry etc. It used RX01 drives but instead of an
RXV11 controller (which would have required a Q-bus), it used a WD1771 oppy controller chip, which one of the
8085As used to simulate an almost-RXV11-like interface, which was called the RXT11. It's just di erent enough
from the RXV11 to be incompatible with regular RX01 software, so E11 provides it as a separate emulation.

MOUNT PD: drive switches:
/WPROTECT enable write protection (syn. /RONLY)

SET PD: controller parameters:
CSR=nnnnnn set CSR address to nnnnnn octal
PRIORITY=n set interrupt priority to n (4{7)
PRIORITY=DEFAULT set interrupt priority to default (BR5 for Unibus, BIRQ4 for Q-bus)
VECTOR=nnn set vector address to nnn octal 41
41 Page 42 43
Chapter 5
Tape Devices
The full range of standard PDP-11 magtape drives and controllers can be emulated under Ersatz-11. Tape drives
are con gured in the same way as disks, with a MOUNT command to set up each emulated tape unit. The defaults for
controller and drive parameters also work the same way as disks, with the controller model based on the emulated
CPU type and the CSR and vector computed according to \ oating" address rules if necessary. However the default
tape drive models are essentially chosen arbitrarily, since unlike disks, there's no point in trying to guess the drive
model based on the size of the PC le or device that's being used to emulate a tape drive, because the amount of
data on a tape is variable anyway. In any case, the default drive and controller parameters can be overridden with
MOUNT switches and SET commands, the same way they can with disks. The /RONLY (syn. /WPROTECT switch may
be speci ed on any MOUNT command, to lock the tape against writes.

5.1 PC tape devices
As with disks, E11 uses a device-independent interface to connect any emulated tape drive to any real tape device.
This connection is made with a MOUNT command, and the current con guration of an emulated tape can be displayed
with a SHOW command.

5.1.1 Tape image les
Command syntax:
MOUNT ddcu: [d:pathn] lename[.TAP] [switches]
Special switches: /MAXRECORD:n
A tape image le contains a byte-by-byte image of tape data, with headers and trailers on each record to maintain
the blocking data from the real tape. Each record looks like this:

.LONG LEN ;32-bit record length, LSB first, byte-aligned

34 42
42 Page 43 44
Emulated PDP-11 tape devices 35
.BLKB LEN ;LEN bytes of data
.LONG LEN ;the length again, for backspacing

A tape mark appears as a single 32-bit 0. The MOUNT command for an image le may include a /MAXRECORD:n
switch, which sets the maximum possible record length that can be read or written on that unit. The default is
16384 bytes. E11's memory usage may be decreased slightly by using a smaller number, but data will be lost if
the PDP-11 attempts to read or write records larger than the speci ed maximum. Both ANSI and DOS-11 labeled
tapes normally have a maximum record length of 512 bytes, but BRU tapes and UNIX \tar" tapes use longer
records. As with disks, there are also /RONLY (syn. /WPROTECT), and /RW switches, to optionally write lock a tape
drive. The le is located using E11's usual rules, see section 1.7 for details. If the le does not exist, it is created
as a zero-length le in the current working directory.

5.2 Emulated PDP-11 tape devices
This section describes the emulated PDP-11 tape drive models, and de nes the device-speci c MOUNT command
switches that apply to each.

name units controller drive/volume switches
CT: 0{1 TA11 (none, always TU60 DECassette)
MM: 0{7 RH11/RH70, TM03 /TE16, /TU45, /TU77, /SERIAL:nnnn
MS: 0{7 TS11 etc. (none, always matches controller)
MT: 0{7 TM11 (none, software can't tell)
MU: 0{65535 TMSCP /TYPE:xxxyy

5.2.1 CT: | TU60 DECcassette
The TU60 was designed to provide cheap o -line storage using ordinary audio cassette tapes. Under the CAPS-11
cassette programming system, it could be used as the system's only mass storage device. It uses programmed I/O
rather than DMA, so tape data bytes are transferred one at a time. Unlike other tape devices, the TU60 requires
the PDP-11 to know the record length ahead of time when reading a record, and gives an error if the PDP-11
attempts to read more or less than the correct number of bytes. The \LOG CTn:" command may be used to nd
out whether a PDP-11 program is trying to read the wrong record size.

The TA11/TU60 cassette tape system requires a mandatory load point gap (i.e. tape mark) on all tapes. E11
simulates this internally so that the load point gap does not appear on the physical medium. This allows the
emulated TU60 general access to tapes that may have been created using some other device (or emulated device),
where an extra tape mark at BOT would violate the labeling standards.

MOUNT CT: drive switches:
/WPROTECT enable write protection (syn. /RONLY)

SET CT: controller parameters:
CSR=nnnnnn set CSR address to nnnnnn octal
PRIORITY=n set interrupt priority to n (4{7)
PRIORITY=DEFAULT set interrupt priority to default (BR6 for Unibus, BIRQ4 for Q-bus)
VECTOR=nnn set vector address to nnn octal 43
43 Page 44 45
36 Emulated PDP-11 tape devices
5.2.2 MM: | TE16/TU16, TU45, TU77
These tapes all use the TM02 or TM03 Massbus tape formatter to control up to eight slaves. The formatter
itself uses one of the eight possible Massbus unit numbers (typically 0), and the resulting two-level unit selection
scheme slightly complicates the device naming, since it appears nowhere else. As a result, the most common naming
convention for \MMn:" device names uses the unit number n to refer to the slave number within the single formatter,
rather than the Massbus unit number (which is what referred to by the unit number with all Massbus disks), and
the formatter is Massbus unit 0.

E11 uses an extended MM: device name syntax similar to that used by RSX, where each slave's device name looks
like \MMcu s:". c is a letter indicating which RH11/RH70 controller connects to the TM03 formatter. The default
in this version of E11 is \C", the letter may change in future versions but in any case it refers to the default tape
Massbus adapter at (17)772040. u is the Massbus unit number of the formatter, which defaults to 0 and is in the
range 0{7. s is the slave number (within a TM03 formatter) of the tape transport, which also defaults to 0 and is in
the range 0{7. If a number is present but no \ ", that number is the slave number, not the Massbus unit number.

The e ect is that if the controller letter and Massbus unit number are omitted leaving a device name like \MM3:",
this name has the same meaning as the usual RT-11 or RSTS name, which is: default tape RH11 (the one at
(17)772040), default formatter (0), slave 3. Meanwhile additional elds may be supplied to identify any of the
64 possible slaves on any of the (currently 3) possible Massbusses, so \MMA2 5:" refers to the rst RH11, TM03
formatter 2, slave 5. This same name format may also be used in any other E11 command (e.g. BOOT, LOG) that
takes a device name.

The MOUNT MM: command has switches to identify the drive model, but their only e ect is to set the value of the
\drive type" register. From a PDP-11 software point of view, all drives attached to a TM03 formatter look the
same, the only di erence is speed. There is also a /SERIAL:nnnn switch, which sets the value of the \drive serial
number" register.

MOUNT MM: drive switches:
/SERIAL:nnnn set drive serial number (4 decimal digits)
/TE16 set drive type to TE16 (45 IPS NRZI/PE)
/TU45 set drive type to TU45 (75 IPS NRZI/PE)
/TU77 set drive type to TU77 (125 IPS NRZI/PE)
/WPROTECT enable write protection (syn. /RONLY)

SET MM: controller parameters:
CSR=nnnnnn set CSR address to nnnnnn octal
PRIORITY=n set interrupt priority to n (4{7)
PRIORITY=DEFAULT set interrupt priority to default (BR5 for Unibus, BIRQ4 for Q-bus)
RH11 set controller type to RH11
RH70 set controller type to RH70
VECTOR=nnn set vector address to nnn octal

5.2.3 MS: | TK25, TS04, TS05, TU80
These drives are microcomputer-controlled and have a programming model which is like a simpli ed version of
TMSCP. There are no drive type switches because each controller model supports only one drive type anyway, so
the drive type can be controlled implicitly by changing the controller type with a SET command. The TK25 is a 44
44 Page 45 46
Emulated PDP-11 tape devices 37
cartridge tape, while the others are 9-track magtapes, but they all look similar from the PDP-11 operating system's
point of view.

DEC's earlier controllers support only one drive per controller so PDP-11 operating systems normally use the unit
number to distinguish between separate controllers. Like later controllers, E11 allows up to 8 units per controller, so
E11 uses the controller letter to distinguish between multiple controllers, the same as with most other device types.
This means that when emulating a typical DEC system with one unit per controller, drives that the operating
system calls MS0:, MS1:, and MS2:, will be called MSA0:, MSB0:, and MSC0: by E11, since they're the rst and
only slaves on three separate controllers. This only comes up with there is more than one MS: style tape drive,
which is rare.

MOUNT MS: drive switches:
/WPROTECT enable write protection (syn. /RONLY)

SET MS: controller parameters:
CSR=nnnnnn set CSR address to nnnnnn octal
DEFAULT set controller type to default (TU80 for Unibus, TSV05 for Q-bus)
EXTFEAT enable extended features
NOEXTFEAT disable extended features
PRIORITY=n set interrupt priority to n (4{7)
PRIORITY=DEFAULT set interrupt priority to default (BR5 for Unibus, BIRQ4 for Q-bus)
TQK25 set controller type to TQK25 (Q22 TK25 controller)
TS11 set controller type to TS11 (Unibus TS04 controller)
TSU05 set controller type to TSU05 (Unibus TS05 controller)
TSV05 set controller type to TSV05 (Q22 TS05 controller)
TU80 set controller type to TU80 (Unibus TU80 controller, M7454 module)
VECTOR=nnn set vector address to nnn octal
VECTOR=FLOATING set vector address to be auto-con gured

5.2.4 MT: | TS03, TU10
The TU10 is a vacuum column tape drive which interfaces to the PDP-11 through a classic Unibus interface,
made up of a number of ip chip modules on a wire wrap backplane. The TS03 is a very small tension arm drive
which uses up just 10.5" of rack space, and uses a physically smaller controller made with higher density modules.
However they both look the same to software, so there are no drive type switches to distinguish them. The 7-track
version of the TU10 is not supported.

MOUNT MT: drive switches:
/WPROTECT enable write protection (syn. /RONLY)

SET MT: controller parameters:
CSR=nnnnnn set CSR address to nnnnnn octal
PRIORITY=n set interrupt priority to n (4{7)
PRIORITY=DEFAULT set interrupt priority to default (BR5 for Unibus, BIRQ4 for Q-bus)
VECTOR=nnn set vector address to nnn octal 45
45 Page 46 47
38 Emulated PDP-11 tape devices
5.2.5 MU: | TMSCP tapes
TMSCP (the Tape Mass Storage Control Protocol) is a device-independent protocol for connecting arbitrary tape
drives to any of DEC's later computers. It doesn't particularly reduce the amount of implementation-speci c quirks
that must be dealt with (tapes never had anywhere near the amount of device-speci c details as disks do to begin
with), but it provides symmetry with the MSCP protocol for disks, and some systems are able to capitalize on
this by sharing code between the disk and tape drivers. DEC generally didn't have more than one tape drive per
TMSCP controller, but as with MSCP disks, E11 has no such arti cial limits. However this means it may be
possible to con gure a system which is incompatible with the PDP-11 operating system's TMSCP driver, so it is
best to de ne a separate controller for each drive anyway.

As with MSCP disks, the /TYPE:xxxyy switch sets the unit type name, which may be up to three letters and up to
two decimal digits. The default is TU81.

MOUNT MU: drive switches:
/TYPE:xxxyy set drive type to xxxyy (1{3 letters, 2 digits)
/WPROTECT enable write protection (syn. /RONLY)

SET MU: controller parameters:
CSR=nnnnnn set CSR address to nnnnnn octal
CSR=FLOATING set CSR address to be auto-con gured
DEFAULT set controller type to default (KLESI for Unibus, TQK50 for Q-bus)
KLESI set controller type to KLESI (Unibus TU81 controller)
PRIORITY=n set interrupt priority to n (4{7)
PRIORITY=DEFAULT set interrupt priority to default (BR5 for Unibus, BIRQ4 for Q-bus)
TQK50 set controller type to TQK50 (Q22 TK50 controller)
TQK70 set controller type to TQK70 (Q22 TK70 controller)
TUK50 set controller type to TUK50 (Unibus TK50 controller) 46
46 Page 47 48
Chapter 6
Serial Lines
E11 has exible support for serial and line printer devices. As with disks and tapes, any supported PC serial device
may be used to emulate any emulated PDP-11 character device, and once again E11 chooses sensible defaults for
the controller types and CSR/vector addresses based on the emulated CPU type and the con guration of \ oating"
devices, so in many cases no SET commands will be needed.

Each serial line is created with an ASSIGN command. TT0:, the system console, is connected to CON1: (the rst
emulated VT100 session, displayed on the PC video display) when E11 starts up, but it can be reassigned to any
other screen or serial port with an ASSIGN TT0: command. If it is assigned to an RS232 serial port, the E11 prompt
can no longer be popped up using Shift-Enter, because this key combination does not correspond to any ASCII
character that could be sent over a serial line. So by default, a BREAK condition on the console serial port will
bring up the \E11>" prompt. If this is inconvenient, the SET BREAK command can be used to de ne one ASCII
character which will cause the prompt to pop up. For example, putting a SET BREAK 20 command in the E11.INI
initialization le will make the prompt pop up whenever CTRL/P is typed on the console terminal.

Output to any serial or printer device can be captured to a PC le using E11's LOG command. For example, LOG
TT0: FOO will cause all data displayed on the console terminal to be saved in FOO.LOG, until logging is turned
o with a LOG TT0: command (with no lename).

An ASSIGN command will fail if the speci ed PC port doesn't exist, or if the device's currently SET IRQ is already
in use and not SHAREed, or if the new ASSIGN command would steal TT0:'s device for some other port. There must
always be something attached to TT0: since that's E11's console terminal.

Note that Ersatz-11 does not ag an error if the ASSIGN command assigns a TT: port to a printer, or ASSIGN an LP:
port to a screen, even though these are usually not likely to be useful combinations. The reason both port types
use the same pool of devices is so that they can both access COM ports, since serial terminals and serial printers
are both reasonable devices. LP: ports attached to serial ports or video screens respond to XON/XOFF ow control.
One good reason to ASSIGN an LP: port to a VT100 session is that a LOG command will capture the output to a

39 47
47 Page 48 49
40 Serial options common to all devices
le, and there's no need to actually pop up that session and see it on the screen.

6.1 PC serial devices
name units type switches
CONu: 1{12 video console (none)
COMu: 1{4 PC COM port /FIFO[:n], /NOFIFO, serial options
LPTu: 1{8 PC LPT port
SBMIDI: none Sound Blaster MIDI port

6.1.1 Serial options common to all devices
E11 has a set of \serial options" which are common to all serial device types, and are used to set communications
parameters. These options may be used as either a switch (with a preceding \/" character) on the ASSIGN command
when the port is created, or as a separate SET command any time thereafter. For example:

ASSIGN TT1: COM2: /MODE:1200,N,8,1
SET TT1: MODE=2400,E,7,1

The rst command will create TT1: and attach it to COM2. The line parameters are set to 1200 baud, no parity,
8 data bits, and one stop bit. The second command will change the existing TT1: port to use 2400 baud, even
parity, 7 data bits, and one stop bit. The option name may be separated from its parameters by either a \:" or
\=" character.

Note that some emulated port types allow the communications parameters to be set by the PDP-11 operating
system. E11 allows this by default, but in some cases the user may want to override the PDP-11's parameters, for
example to set a port to a higher baud rate than the PDP-11 equivalent supports. In this case the /LOCK switch
will be useful when creating the port (usually in combination with a /MODE switch). The SET ddcu: LOCK and SET
ddcu: UNLOCK commands can be used to lock and unlock the port's communications parameters after the port has
already been created.

The device-independent serial ASSIGN switches are as follows:

/DTR:value Sets the state of the DTR (data terminal ready) modem control signal. value may be
ON or OFF to force DTR to be permanently asserted or deasserted, regardless of the
value selected through the emulated PDP-11 port. Or, value may be DTR (which is the
default setting), to make the real DTR pin track the value of the emulated DTR signal
from the emulated PDP-11 port.

/LOCK Locks communication mode parameters (baud rate, data bits etc.) against being
changed by the PDP-11 port. This is useful for setting a port that has programmable
parameters (e.g. a DZ11 line) to a non-standard speed without having the PDP-11 op-
erating system set it back to a lower speed when initializing the emulated side of the
port.

/MODE: bps,par,dbits,sbits Sets communication mode parameters to the values speci ed. Bps is the number of bits
per second (range of allowable values depends on the speci c serial hardware). Par is
the parity speci ed as one letter: Even, Odd, None, Mark, Space (not all serial hardware 48
48 Page 49 50
Video consoles 41
supports all types). Dbits is the number of data bits, generally 5{8 although some PC
port types can only do 7{8. Sbits is the number of stop bits, 1{2 (on most ports, \2"
actually means 1.5 if dbits is 5).
If no /MODE switch is speci ed, newly ASSIGNed ports are initialized by default to 9600
baud, no parity, 8 data bits, 1 stop bit, i.e. /MODE:9600,N,8,1.

/RTS:value Sets the state of the RTS (request to send) modem control signal. value may be ON
or OFF to force RTS to be permanently asserted or deasserted, regardless of the value
selected through the emulated PDP-11 port. Or, value may be RTS (which is the default
setting), to make the real RTS pin track the value of the emulated RTS signal from the
emulated PDP-11 port.
Some newer modems use the RTS signal incorrectly to mean \ready to receive," and if it
is not asserted they will refuse to send data to the PC. The /RTS:ON switch circumvents
this problem. Other possible solutions include using a specially wired modem cable
to hold RTS asserted, or using the AT&R1 modem command to change the modem's
behavior.

/STD:value This switch is included for completeness only. It works like the /DTR and /RTS switches,
but it controls the secondary transmit data pin, which is pin 11 on a Bell 202 modem.
Since none of the supported PC serial devices drives this pin, the switch has no visible
e ect.

/TXMAX:n This switch sets the maximum number of transmitted characters that will be bu ered
for transmission by that port. Once the port has accepted this number of characters
from the PDP-11, it waits for all of them to be transmitted before accepting more char-
acters. This value should be set low enough to get acceptable response to XON/XOFF
characters (it may take up to n characters for the PDP-11 to react and suspend out-
put), but high enough to get adequate throughput. The default value is 16. LA120
teleprinters are particularly sensitive to XON/XOFF response time, so they require a
low /TXMAX value.
TXMAX:n is available only as an ASSIGN switch.It maynot appear in aSET command.

/UNLOCK The opposite of the /LOCK switch, unlocks the port's /MODE parameters so that they
may be altered by the PDP-11 port (on port types where this is possible such as the
DZ11 and DHU11). This is the default so there's normally no reason to use it as an
ASSIGN switch, however it may be useful as a SET keyword once the port has been
assigned.

The sections that follow describe each physical PC serial (or serial-like) device that E11 supports, along with the
command syntax needed to use them as emulated PDP-11 serial ports. As with disk and tape units, the ports are
created on a line-by-line basis so there is no need to use the same kind of physical port for all emulated ports of a
given type.

6.1.2 Video consoles
Command syntax:
ASSIGN ddcu: CONn: [switches]
Special switches: /NOREPLY 49
49 Page 50 51
42 COM ports
The speci ed PDP-11 terminal port is connected to one of twelve simulated VT100s that can normally be put up
on the screen by pressing Alt and the function key corresponding to the screen number (F1{F12). Note that the
screens assigned to F11 and F12 are not accessible on the old 84-key AT keyboard, unless other keys are rede ned
to reach them. When one screen is being displayed on the PC screen, the others (up to 11) are maintained invisibly
in memory, so they will be up to date whenever another Alt/Fn keypress switches the screen to display one of the
hidden sessions.

This is only the default behavior of the function keys, if they are rede ned using DEFINE KEYPRESS commands
then other keys will need to be de ned to switch displays, using the \PRIMARY n" and\SECONDARY n" keyscript
commands.

If there are two video adapters on the PC (e.g., an SVGA and a Hercules monochrome card), then one VT100
session may be displayed on each. Using the default keyscripts, the Alt-function keys choose which of the 12
possible screens is displayed on the primary monitor, and the Ctrl-function keys choose which is on the secondary
monitor. Note that it is not possible to display the same session on both monitors at once. If this is attempted
then whichever monitor was previously showing that session, switches to displaying the lowest-numbered available
screen which is not already being displayed.

The /NOREPLY switch means that this emulated VT100 should not transmit any automatic replies to control
sequences sent by the PDP-11. This can be handy if you're using the \multiple physical ports" feature and want
to make sure that only one of the ports answers when you something like \SET TERM/INQUIRE".

CONn: is the only device that may be used with the \VT:" VT11 vector graphics display processor emulation.
Rather than running as an emulated VT100 in text mode the way true serial devices do, VT11 sessions run in
graphics mode and require an SVGA card with at least 1 MB of memory. See section 8.5 for details.

6.1.3 COM ports
Command syntax:
SET COMn: PORT=nnnn IRQn (if needed)
ASSIGN ddcu: COMn: [switches]

Special switches: /NOFIFO, /FIFO, /FIFO:n
The PDP-11 port is connected to the speci ed PC COM port. Any changes to the default I/O port address and IRQ
settings must be made with a SET COMn: PORT=nnnn IRQn command before assigning a PDP-11 port to the COM
port. The baud rate, number of data bits, etc. for a COM port may be set with a /MODE switch, see section 6.1.1
for more information. These parameters may also be changed using a SET command once the port is assigned to
a PDP-11 device.

The \/NOFIFO," \/FIFO," and \/FIFO:n" switches control usage of the receive FIFOs on the 16550A (etc.) UART
chips used in almost all current PC COM ports. These FIFOs greatly reduce interrupt trac and enabling
them normally increases the maximum throughput of the system, however they can make input appear \bursty,"
especially at low baud rates. \/NOFIFO" disables the receive FIFOs, \/FIFO" enables them, and \/FIFO:n" enables
them only when the baud rate is at least n. The setting is \/FIFO:4800" by default for ports that have FIFOs,
ports that don't are always set to \/NOFIFO" regardless of the switch given. 50
50 Page 51 52
PC line printer port 43
SET COMn: controller parameters (must be issued before the ASSIGN that uses this port):
IRQn set IRQ number (0{15)
PORT=nnnn set I/O port address to nnnn hex
SHARE enable ISA IRQ sharing (must come after IRQn)

The default IRQ for COM ports is IRQ4 if the I/O port address is 300 (hex) or more, or IRQ3 for 2FF (hex) or
less. These defaults have been traditional since IBM XTs were the standard, and most multi I/O boards will be
set up this way. However it's not uncommon with newer boards for COM3 to use IRQ5 and COM4 to use IRQ2
(or IRQ9 really, which is e ectively the same on an AT) by default.

6.1.4 PC line printer port
Command syntax:
SET LPTn: [PORT=nnnn] [IRQn] [NOIRQ] [[NO]BIOS] [DATAPRODUCTS] (if needed)
ASSIGN ddcu: LPTn: [switches]

Special switches: none
The PDP-11 port is connected to the speci ed PC LPT port. The default port addresses for the LPT ports,
including PCI printer interface boards, are obtained from the BIOS when E11 starts up. Any changes to these
default I/O port address and IRQ settings must be made with a SET LPTn: PORT=nnnn IRQn command before
assigning a PDP-11 port to the LPT port. Some LPT ports do not work well with interrupts. For example, if there
are multiple ISA LPT ports they may all try to drive IRQ7 at once, or it's possible that a printer may not generate
the ACK signal correctly. In many cases this problem can be circumvented by using the SET LPTn: NOIRQ command
before assigning the port. This tells E11 to use timers and polled I/O for printer output, which works well with
most late model printers. However some older printers with less bu ering may experience very poor performance
with this setting, printing only one or two dozen characters per second. With these printers it is best to resolve
the IRQ problem and use interrupts.

Printers may also be accessed using the PC BIOS, by issuing a SET LPTn: BIOS command before assigning the
port. This is mainly useful for remote printing using network software that captures BIOS output and forwards it
to a network print server. For a locally attached printer it's better to use the default NOBIOS setting.

The SET LPTn: DATAPRODUCTS command supports line printers which use the Data Products parallel interface,
typically using a special cable which connects the LPT port to a 50-pin Winchester connector. When this command
is in e ect, E11 implements the Data Products signal polarities and protocol using software polled I/O. The very
rst line printed may contain a junk character, since the DATA STROBE signal is held asserted by the PC BIOS
until E11 takes over.

The special cable should connect the data lines straight through, the Centronics STROBE signal is connected to DATA
STROBE, and the Centronics BUSY signal is connected to DATA REQUEST. You can make the cable yourself, or you
can buy a model EYN328 cable from Black Box Corporation, and connect it to the end of a regular PC printer
cable by using a gender changer which has two 36-pin female Centronics connectors.

Connector pinouts for SET LPTn: DATAPRODUCTS: 51
51 Page 52 53
44 Sound Blaster MIDI port
signal DB25 Centronics Winchester M/50
DATA STROBE 1 1/19 j/m
DATA0 (LSB) 2 2/20 B/D
DATA1 3 3/21 F/J
DATA2 4 4/22 L/N
DATA3 5 5/23 R/T
DATA4 6 6/24 V/X
DATA5 7 7/25 Z/b
DATA6 8 8/26 n/k
DATA7 (MSB) 9 9/27 u/w
DATA REQUEST 11 11/29 E/C

Paired pins are signal/return. The DB25 connector doesn't have enough ground pins to have one for each signal
pin, so you should connect all of DB25 pins 18{25 to the return signals from the other connector.

Regardless of the access method, LPT output is passed transparently, so you'll need to make sure that your OS
and printer agree on whether lines end in <CRLF> or just <LF>, and on whose responsibility it is to expand tabs
and form feeds.

SET LPTn: controller parameters (must be issued before the ASSIGN that uses this port):
BIOS use BIOS calls for I/O instead of driving hardware directly
DATAPRODUCTS use Data Products protocol instead of Centronics
IRQn set IRQ number (0{15)
NOBIOS use E11's internal driver for I/O instead of BIOS calls
NOIRQ use polled I/O instead of interrupts
PORT=nnnn set I/O port address to nnnn hex
SHARE enable ISA IRQ sharing (must come after IRQn)

6.1.5 Sound