Another computer

Ages ago, I decided to build a new computer from an Intel D410PT motherboard that I bought. I was (and still am) going to install it as a PDP-11 emulator. Anyway, I built the machine but never got round to installing an OS on it. Actually, I did try to see if it would run Windows 7 ... but Windows was not happy with being installed on a USB flash drive as a boot disk.

But, since recently I've gotten used to Debian, I thought that I'd try that. This is an OS that is very happy to boot from a USB flash drive. This is cool, since I can swap hard disks for the machine without even mucking about with screwdrivers. Here is the machine running Debian 6 off a small 4GB flash drive I bought in Tesco:

So... here are the things that I actually bought to build it:

  • Intel D410PT motherboard (with integrated Atom processor)
  • 1GB Kingston Technology 667MHz DDR2 memory
  • LinITX mini-ITX case inc wall mount and power supply CFI-ACD29CC

...all that stuff cost me £103.00 including the shipping costs. I only had to add the USB flash drive for storage (but I already had that lying around). It's not as pretty as a mac mini, but it's still quite a small little machine. All the software I've used is free, so I have Debian 6 (squeeze) coupled with Google Chrome and it quite happily streams TV channels through BBC iPlayer and other services like TV Catchup. So at the moment it's working as a nice cheap little media centre. The next step is to install SIMH and start emulating some old hardware...

Modula-2 and the PDP-11

When looking round a second-hand bookshop yesterday, I found this book on Modula-2:

front cover

I seemed to remember that there was some connection between the PDP-11 and the Modula-2 programming language, so I took a chance and bought the book for £1.  I spare no expense on my computer history collection :-) Anyway, now that I've had a chance to check, I found this "The first Modula-2 compiler was completed in 1979 and ran on the DEC PDP-11" (taken from here).  So it does seem like a worthwhile addition to my collection of PDP-11 related objects.  This pleases me.

...and for the sake of completeness, here is the back cover too (even showing the original price tag):

back cover

MicroPDP-11 installed inside the case

It was a rainy Sunday afternoon, so I decided to have a tidy up in my office/workshop/third bedroom. What actually happened was that I saw the grotty looking dusty case for my PDP-11 and decided to clean it (it was in pretty bad shape since I bought it). Having cleaned it I then decided to put the machine inside the actual case. So now the office looks just the same, except the PDP-11 looks much better. Some progress I suppose. Here are some photos of the end result:

In the case, image #1

In the case, image #2

Isn't she beautiful? During this process I have learned:

- the machine is much heavier than I remember
- I really need to find a front cover to finish it off
- the word "PDP-11" in english is apparently feminine

Now it's in one piece, I have even fired the machine up and can report that it still runs fine.  Phew!  I didn't break it.

Some maths functions for DECUS C

For some reason I decided to rewrite the "wave" program that I wrote in Basic-11, but using DECUS C.  I thought that it would be easy, but I didn't count on there not being a math.h.  This means that I had to work out how to calculate a sine and cosine for myself.  Well, actually I went off to google to see if somebody had already done the hard work for me.  Indeed they had, I found it here: www.bsdlover.cn/study/unixtree/V7/usr/src/libm/sin.c.html

That code was already in K&R syntax, but it used modf(), I think that I went off and found some source code for that somewhere else...  Anyway, when I had it working, I decided that I might want to use these bits of maths code somewhere else - so I extracted it out into my own library and made "maths.h".  So I can now use sin/cos wherever I want.

Anyway, since I went to all that trouble, I thought that I had better post the results.  You need to compile maths.c into maths.obj, like this:

.CC
CC> MATHS.C/A
RUN C:AS DK:MATHS.S/D

Then, you can #include "maths.h" and link to the maths.obj we created above, like this example:

LINK WAVE.OBJ,MATHS.OBJ,C:SUPORT.OBJ,C:CLIB.OBJ

I expect I'll add more to my maths library as I go, but this is a start.

PDP-11 Live CD running Zork

  Live CD image with Zork
Download


By popular demand, here is a PDP-11 Live CD that is configured to auto-run the 'Dungeon' game (aka Zork) in a PDP-11 emulator.  Well OK, when I say 'popular demand' I mean that a colleague of mine mentioned it in idle conversation...

I got the game files from here: http://www.dbit.com/pub/pdp11/rt11/games/

And if you don't know about the historic computer game of Zork, I suggest you have a read on wikipedia: http://en.wikipedia.org/wiki/Zork.

Yet another emulated PDP-11

I have discovered that the Ersatz-11 emulator will even work on Windows Mobile, if you use DOSBox.  Here is an HTC tytn II mobile phone pretending to be a PDP-11 and running RT-11.  Is this the smallest piece of hardware to ever run the RT-11 operating system?

RT-11 running on an HTC tytn II

But it is VERY slow.  It took about 30 minutes to draw my ASCII mandelbrot.  So it's not exactly practical.  As you can see there are also some screen rendering issues, although I could probably fiddle with more settings.  But I think that it's one of those things where you go "oh yeah" ... and then never try it again.

PDP-11 on DR-DOS/OpenDOS

I have been busy trying to get the Ersatz-11 emulator to run on DR-DOS, which seems to work OK (more about that another time).  Then I decided to try getting the whole thing to boot from CD.  This would give me a PDP-11 Live CD.  Anyway, whilst having a rummage round in my pile of old junk hardware I found a motherboard given to me by my friend James.  It has 32Mb RAM on board and a 200MHz AMD K6 processor.  I don't have any IDE hard disks, but I do have an old CD drive.  So I started wondering if I could turn this lot into a PDP-11.  This is the machine on the bench:

AMD K6 motherboard

So the next thing to do was to see if it boots, so I tried a linux CD I had lying around:

Booting linux on the AMD K6

...which works a charm.  So the next thing was to try my PDP-11 live CD.  Guess what?  It only works:

PDP-11 live CD in action

This is sooo cool.  You can see I'm running my ASCII mandelbrot program in celebration.  In fact, this is so cool that I've gone and bought a brand new Intel D410PT motherboard and I intend to rig it to run as a PDP-11.  I expect that will fly.  I will use a solid state disk and have old software running on new hardware.  In the meantime this AMD K6 based prototype easily outperforms my real PDP-11/53.

Two winchester drives

I thought that it's about time I posted another photo of my PDP-11.  Here are both my winchester disks hooked up:

Two winchester disks and my PDP-11

At the moment I'm in the process of copying the original install files onto the newest disk, so I will have the *full* set of RT-11 files on there.

Adding Basic-11 to RT-11 in SIMH

This post continues with my SIMH RT-11 tutorial... To add Basic-11 into the mix I've been using this image of the "Languages Master" RX50 floppy disk.

Download that disk image to the folder where you've saved pdp11.exe.  Next, we're going to add that floppy to SIMH.  We can do that by editing the ini file.  Just before the line that reads "boot rl0", we need to add this line:

attach rl1 languages.dsk

This will mean that in RT-11 the Languages Master disk will appear as "DK1:", whereas the boot disk is "DK0:", the RT-11 install disk.  Test it out by running pdp11.exe and typing DIR DK1: (and pressing enter) at the command prompt.  You should see the directory listing of the languages master disk.

Before we try and install Basic, we need to make sure that we're using the RT-11 extended monitor, so type in these commands into RT-11:

copy/boot dk0:rt11xm.sys dk0:
boot dk0:

This should restart RT-11 in the extended monitor (RT-11XM).  When this disk is booted in future it will remember this setting.  Now we can actually install Basic, enter these commands:

copy dk1:b*.* dk0:
copy dk1:*.bas dk0:


...you should see the files being copied to your boot disk.  Now we're ready to try Basic-11.  Try this command:

basic

You should see this:

BASIC-11/RT-11 V02-03
OPTIONAL FUNCTIONS (ALL, NONE, OR INDIVIDUAL)?

I normally respond by typing ALL (in capitals), in which case Basic responds with "READY".  We have Basic!

We can now type in Basic programs, try this one:

10 FOR I=0 TO 12.6 STEP .2
20 PRINT TAB(30+COS(I)*30);"HELLO WORLD"
30 FOR S=0 TO 1000 \ NEXT S
40 NEXT I
50 GOTO 10
RUN

Press <CTRL>+C quickly twice to stop the program when you've got bored.

To leave Basic-11 the easy way, just type BYE at the READY prompt.

[EDIT: if you're looking for some information on Basic-11, I've posted some documents here.]

[ANOTHER EDIT: the PDP11.co.uk website, where I originally got the image of the languages disk from seems to have been shut down. I have changed the link above to a cached version from the wayback machine. And if you want to see the complete software page from PDP11.co.uk then you can still see it here.]

Starting RT-11 in SIMH for the first time

This post continues my SIMH RT-11 tutorial... When you start RT-11 from the install disk the first time, you'll see some text like this:

Welcome to RT-11 V5.3

You have bootstrapped the RT-11 Distribution Disk.  Use this disk to
install your RT-11 system, then store it in a safe place.

RT-11  V5.3  provides an automatic installation procedure which will
back up your distribution disk and build a working system disk which
should  be  used for your work with RT-11.
This  working  system disk will only  contain  the  RT-11  operating
system.  After  the  RT-11  installation  is  complete,  follow  the
installation instructions  packaged  with  any optional languages or
utility software which you will be using.

Press the "RETURN" key when ready to continue.


I usually try to skip the automatic install procedure, since I'm more likely to learn stuff if I do all the setting up by hand.  So after pressing RETURN, and getting asked "Do you want to use the automatic installation procedure?" I type "NO".  After pressing RETURN a couple of times, we should be booted into RT-11.

Remember, if you ever mess up your boot disk and things go wrong, you can just re-copy a fresh version of rtv53_rl.dsk and we will get back to the start point above.