Running

Running operating systems
This page gives some pointers on how to start with the operating system software that you can run on a PDP-11, which models will work with it and how to get it running. A lot of operating systems were made for the PDP-11, and most of those are still to be found – however, the copyright and licensing is not in all cases clear and simple; in other words, you may not be allowed to run everything you find. Probably the only OSes that are you are really free to use are the original Unix versions and 2.11BSD.
The historic operating systems are in most ways quite different of what we are used to today – for instance, most operating systems will not directly run on any system, but will need to be configured to run on a specific system model – or may be limited in functionality until such configuration (called ‘sysgen’) has been completed. The Unix versions are probably the easiest to start with if you do not have a PDP-11 history – but even there, there are considerable differences between today’s Linux and V7 or even 2.11BSD. Luckily, lots of documentation is still available – for everything DEC, Bitsavers is the place to start; for the Unix variants, find TUHS or PUPS.


Disk images
Before trying to boot an image, you need to understand what type of bootable disk image you have, and which disk controllers are present in the VHDL you are using in your FPGA. Each disk controller needs its own sd card to read and write the disk images on – but, the RK and RL controllers can use multiple disk images on the same card. The disk formats are not interchangeable – you cannot use an RL controller to read an RK disk, etc. The RH controller is by default set up for a RP06 disk image, but it can also deal with RP04, RP05, RM05, RP07, and synthetic disk types with 256 heads and 128 or 256 tracks. The RK supports RK05 images, and the RL deals with RL02 images – other variants will also work, but require caution when using multiple disk images on the same card.

The size of the image file is a good clue of what image type you’re looking at:

  • 2.5Mb is RK05
  • 10Mb is RL02 – 0r 20Mb if the image has been sdfmt’ed
  • 170Mb is RP06

although some variations of these sizes can occur, because the bad block track may not have been included in the image, or the OS you’re using may report the actual size on it’s disk – and include any deduplication it’s doing. If you’re not sure what an image is, make a copy and just try it – either with the PDP2011 or with simh.

Booting
Booting starts with a reset signal to the cpu (which is generated by power-up, ideally, but on most boards the most obvious button will also cause a reset). After the cpu has initialised itself, it will start execution at the address (octal) 165020 – which corresponds to the location of one of the m9312 boot roms. There are three versions of the code for the boot roms; see the source files named m9312l*.mac and m9312h*.mac in the vhdl source directory. Only one version will be active, depending on the bootrom parameter to the unibus component in the top.vhdl; by default this is the pdp2011 version. This version contains my own bootstrap code, which will list the addresses in the I/O space and then boot from the first available controller – in the order RK, RL, RH, and from the first disk associated with that controller. This is the easiest option for simple configurations (eg. with one controller and one disk). If you need more flexibility, you can use the odt bootroms; these are based on the original DEC M9312 and are maybe a bit less friendly – don’t make typo’s – but can deal with booting from all configured controllers in the system, and also from all disks, and will give you a very basic ODT to examine or change memory. There’s documentation about the M9312 roms to be found on Bitsavers that describe how things work in detail. The ODT even works with PDP11GUI.

Unix V5
Unix V5 works when the cpu model is configured as 11/45, and it needs an rk controller. No other disk controllers or fancy stuff should be on the bus – I noticed that it will crash if the DEUNA is configured. The disk image to boot from can be found from many sources; I use the one from the simh website.
When booting, Univ V5 will give a single ‘@’ character as prompt – which may be very confusing if you’re using the M9312 bootstrap, since that also uses ‘@’. At the unix prompt, you should type name of the executable to load – it is named ‘unix’. Then it will boot and give you a login prompt.

Unix V6
Unix V6 works on 11/45, and needs 4 rk disk images – to be found from simh. You can create the sd card from the source disk images as follows:


dd if=unix0_v6_rk.dsk of=/dev/sdc
dd seek=6144 if=unix1_v6_rk.dsk of=/dev/sdc
dd seek=12288 if=unix2_v6_rk.dsk of=/dev/sdc
dd seek=18432 if=unix3_v6_rk.dsk of=/dev/sdc

obviously substituting /dev/sdc with whatever your card reader/writer might be (*take care*). Note the seek parameter; it puts each of the rk images into its place on the sd card image.


Unix V7
Unix V7 works on 11/45 or 11/70 – if you configured for 11/70, make sure that no more than 2Mbytes of memory is available, or Unix will crash; the 11/70 bitstreams I distribute have 4Mbytes, and thus will not work – either use the 11/45, or configure your own system (you’ll need to edit the top vhdl to change the memory size). There are several disk images you can start with; the easiest are probably the rl disk images from simh. See the howto remarks on rl disk images for formatting the sd card.
Upon boot, you should get a single ‘@’ as prompt – if not, it is a sign that the disk image is not usable or maybe something else is wrong. At the ‘@’ prompt, you should enter exactly ‘boot’ – no typos, no second chance; if you do something wrong, just reset the board and try again. If all goes well, you’ll get the text: ‘New Boot, known devices are hp ht rk rl rp tm vt’, and another prompt – this time ‘:’. This time, you must reply with ‘rl(0,0)rl2unix’. Again exactly that, and no typos. As follows:


Hello, world [t44]: cpu 11/45
boot from rl:
@boot
New Boot, known devices are hp ht rk rl rp tm vt
: rl(0,0)rl2unix


A more complete Unix V7 is possible if you start from the original v7 source distribution tape and build a rp06 image from it, using simh, because pdp2011 does not have anything resembling a tape drive. The tape image is easily found on the net, as are instructions to install it to a large disk – look for the original documentation on how to do this. After you’ve finished creating the rp06 image, you can copy it to an sd card directly, the same as with the rk disk images; just a one to one copy. But, before going this length, I recommend playing with the rl images first, just to get a feel of what you’ll get, and to remember that v7 is really a very basic version of Unix as we know it today.


2.11BSD
2.11BSD probably demands the most of all operating systems, using kernel, supervisor and user states and separate instruction and data space for all three of those. The best choice is obviously an 11/70, but other models capable of 22 bit and supervisor state will work too – J11 or 11/44, for instance. You can choose to save on FPGA resources and use the floating point simulator software embedded in 2.11BSD, but make sure you are running at or beyond patch #445 – below that, the floating point simulator is broken.

I’ve recently rebuilt the RP06 image that I use from scratch (and made a write-up of it too!). Look for it on my howto pages.


XXDP22/25
The XXDP packs have been very useful in verifying the functions of the CPU, FPU and MMU in the early stages of development, and I still often use these for regression testing after I’ve made changes – so much in fact that I’ve physically worn out a couple of sd cards. Almost all of the CPU, MMU and FPU tests pass flawlessly – the exceptions are mainly caused by differences in the autoincrement and autodecrement timing that shows when instructions are aborted. Nowadays the listings are available for almost all tests – and this was of great help to me in finding out why some tests did not pass, the code is in some cases so tricky that it can take ages to figure out what it does if the listing is not available or if the crucial page is missing.
There is something very gratifying about being able to run 40-year old test code designed for the original systems against my VHDL, and see that it works exactly according to the test. But also, some of the tests are just nice – for instance, ZQMC causes a nice pattern on the address line blinkenlights.
The tests that I regularly use are:
for 11/34: FKAA, FKAB, FKAC, FKTH, FFPA, FFPB, FFPC
for 11/44: KKAA, KKAB, KKTA, KKTB, KKUA, KFPA, KFPB, KFPC
for 11/84 and 11/94: ZKDJ, ZKDK, ZKDL
for MINC: VMNA through VMNF, and ZVTN for the vt105


RT-11
Most earlier RT-11 images are RK05, and will work fine on one of the 11/45 bitstreams. If you configure your own system, 11/20 and 11/34 are also good choices. One of the nicest setups to play around with in my opinion is a multi-terminal MUBAS setup – the image to start with can be found on bitsavers; other interesting things are Dungeon, and loads of BASIC games that can be found on the net – many in the form of RK05 images. RT-11 can handle weird setups – for instance, I once played with an 11/20 configured with an FP-11.
Later versions of RT-11 (v5.3 particularly) may not work from the RL distribution media – this is one of the few remaining bugs in PDP2011. However, if you copy the distribution to RK, it will work – at least, it did for me.


RSTS
Some V7 images that I found may not work with the 11/45 bitstreams; for instance, the simh images are RL01 ie. half the size of the RL02. The controller can report RL01 disk types, but this requires changing the RL11.vhd to set the bit that indicates the disk type – and if there’s a mismatch, I’m not sure if things will work correctly. If you have multiple RL01 images, make sure that they start at the RL02 boundary locations – that is where the controller will expect to find them.
V10 images I found on the net will work on the 11/70 bitstreams, and Decnet will work with the DEUNA. However, I’ve only found older Decnet versions for RSTS.


RSX
Most images I found will probably work with the 11/45 bitstreams, depending on the distribution media. RSX used to be a nice testcase in the earlier development of PDP2011, for instance to see if the model detection code in the sysgen would detect the system type I had configured (mostly it did :). Recently, I’ve not tried to run RSX.


RSX11-MPlus
The images I’ve tried so far (mainly V4.6) work on the 11/70 bitstreams, and will run both Decnet and Johnny Billquist’s BQTCP – since the August 2014 fixes for the DEUNA, because BQTCP is the only software that appears to use the DEUNA buffer chaining. Several PDP2011 systems have been used to join HECNET.


Ultrix-11
The images from the simh website will work on the 11/45-rl bitstreams. The later versions can be sysgenned to run on 11/70 or later models, and will (in theory) support TCPIP with the DEUNA; however, as I understand, this was never quite finished and will also not work well on a real PDP.

MINC
There are several dedicated build directories for MINC and the VT105 terminal that has the special graphics hardware required by the MINC BASIC. You’ll need one of those setups, and you’ll also need to generate a disk image to boot from – the original software distribution for MINC was on RX02 diskettes, and those are currently not supported. There’s a walkthrough on how to create an RK05 image from the distribution disks on a dedicated page.