Wed Nov 17 15:44:23 CET 1999

Copyright (c)1994-1999 Begemot Computer Associates. All rights reserved.
See the file COPYRIGHT for details of redistribution and use.

	p11-2.4
	-------

This is my pdp-11 emulator. It currently runs under FreeBSD 4.0 (and
should probably on 3.X and 2.X), Sparc-Solaris 2.[5678] and Redhat Linux.
It has previously run also under BSD/OS, SunOS 4.1 
and OSF1 (alpha) systems. To compile it you need gcc 2.x and a
non-bsd make (GNU-make will do it) and the Begemot-library (available at the
same place as the emulator).

This release has been tested with egcs version 2.91 and GNU make 3.77.

P11 currently emulates the following configuration:
	- a KDJ11A processor (including fpp)
	- one or more RL-controllers (RLV12) with up to 4 RL02 each
	- one or more RHV?? controllers with up to 8 RP06 each
	- an RK11-controller with 22-bit addressing (hey ever saw one?)
	- a MRV12 option (boot-rom/maintenance and display register)
	- one or more KL11A controllers with up to 4 serial lines each
	- a standard printer interface
	- a read only TM11 tape
	- a DEQNA ethernet adapter (under FreeBSD/Linux)

On a 450MHz Pentium under FreeBSD 4.0 a 'make world install' of 2.11BSD
takes around 6 hours - this is several times faster than a real KDJ11A.
Floating point speed is in the order of 10 times the original.

P11 successfully runs RSX11M-PLUS, UN*X Version 4/5/6/7, 2.11BSD and RT-4.

Because I don't have any processor diagnostics there may be emulation bugs
left. Some of the decisions to emulate a specific command in a specific way
where made by writing a test program and run it on a real machine. This is
especially true for the fpp commands. (btw., the fpp documentation is _very_
bad. The documentation bugs once made in the very early versions are
simply copied up to the KDJ11A documentation). If you have processor diags and
could manage it to run them on p11, please let me know about the results.

1. Getting started
------------------

Get, build and install libbegemot-1.6 or higher.

Make sure you have at least 15 MBytes of free disk space (excluding disk
images). If you have a binary distribution read section 2 below. If you have
the source distribution unpack the tar file.

The source tree is organized as follows:

p11-2.4/	- emulator source
p11-2.4/Utils	- support programs
p11-2.4/IOProgs	- satellite programs for TTY and LP support
p11-2.4/Misc	- real misc, look there
p11-2.4/Tests	- sources for various test programs
p11-2.4/libutil	- utility library, used by other programs
p11-2.4/Boot	- boot PROM sources and binary


2. Installing a binary distribution
-----------------------------------

Unpack the tar file change into p11-2.4 and say

	./install-sh [PREFIX]

Note, that /usr/local is compiled-in as default prefix for libdir and
iodir. If you use another prefix, you have to use the -S option, when
starting.

Say 'p11 [-Siodir=PREFIX/libexec/p11 -Slibdir=PREFIX/share/p11 ',
start telnet from another screen
'telnet localhost 10000' and say 'p' to p11. Telnet should show you a list
of instruction mnemonics and 'fpp test ok'. For more see section 'Running'.


3. Compilation
--------------

Well this is easy:

	./configure [--with-begemot=DIR] [--with-as11=PATH_TO_AS11]

other options are available. You should specify --with-float=qlib on
sparcs if you need correct behaviour of the MODF instruction for big
integers.

	gmake
	gmake install # if everything wents ok.

In order to use the QNA adapter on Linux or FreeBSD you need either bpf
(Berkley Packet Filter), an IP tunnel driver or an Ethernet tunnel driver.
Bpf let's you share the real ethernet interface between the host and the
emulator, but puts you interface in promiscous mode (unless you have a spare
ethernet adaptor in your machine). Under FreeBSD the tunnel driver is part of
the kernel source and you simply have to configure it (after starting the
emulator):

	ifconfig tun0 <host-ip> <emulator-ip> up

The ethernet tunnel driver can be found at the same location as the emulator -
the offical site is http://vtun.netpedia.net. After building and installing it
(note, that you have to copy the header files to /usr/include/net),
configuration is done by (the emulator must run):

	ifconfig tap0 <host-ip> up

Tunnel drivers for linux are also avalaible on the p11-site - the official
site is again: http://vtun.netpedia.net.

The entries in /dev must exist at configuration time in order for the configure
script to enable the build of the drivers.

4. Running
----------

It is possible to run p11 not installed with:

	./p11 -Siodir=IOProgs -Slibdir=.

To tailor p11 to your environment make a local copy of PREFIX/share/p11/p11conf
and edit it to mount the right disk images. (You can also change the default
one, but the next install will clobber it).

The subdirectory test contains a lot of test programs which can be started with:

	p11 prog.11
	@0g

In order to use the QNA interface you will need a ROM image of the onboard
ROM. If you don't have one, create just a file with at least 4k bytes and
use that. In this case you can't run the good citizenship test and can't
use MOPR/MOPDL to boot over the QNA (do you really want to do this? :-).

Enjoy.


5. Wishes
---------

This is a unsorted list that comes into mind at the time of this writing.

1. It would be nice to have processor/controller/device/... diagnostics

2. if you have a great idea how to speed up the memory system, try it. I
   think it eats up most of the time.

3. wouldn't it be nice to have rx01/02 emulated?

4. a tunnel driver for Solaris.


6. License restrictions
-----------------------

Please look at the file COPYRIGHT or feel free to contact me if you have any
questions regarding reusage of the source. Note, that with this version I
move to a BSDish copyright instead of the old COPYLEFT.

7. Acknowledgements
-------------------

I would like to thank Bob Supnik for giving me insight into the internals
of the KDJ11A.

8. How to contact me
---------------------

Please send suggestions, bugs, bug-fixes, code, OS-sources, flying saucers to:

	'brandt@fokus.gmd.de'


harti brandt
