Another winchester drive

So I bought a second Seagate ST-225 "winchester" disk off ebay.  I got it for the starting bid, nobody else made a bid!  Result.  I have connected it to my PDP-11 and used my "XXDP booting from ODT" trick to format it.  Here are the results:

Second disk formatted

This is good news, the drive seems to be in good shape.  Since then I have copied some RT-11 files to it and made it bootable.  So I have a spare.

Faster XXDP booting from ODT

I managed to find another Seagate ST-225 for sale on ebay, so I realised that I'm gonna have to boot into XXDP again.  I decided that it might be worth improving the procedure I worked out here.  So all I've done is remove leading zeros from the values being input.  But it means that I can boot into the disk XXDP formatter in about one hour.  The revised (smaller) file to send in ODT mode is here.  So let's see if that second winchester disk works...

XXDP booting via ODT

So I needed to format the Winchester Disk in my PDP, and since RT-11 cannot format these types of fixed disk I needed to use the disk formatting program in XXDP.  XXDP is a small operating system made by DEC for diagnostics.

There is a good tutorial on how to make an RX50 XXDP boot disk here.  That is what I've used anyway.  However, I found that the resulting disk image was bootable in the SIMH emulator, but a real disk would not boot in my uPDP-11/53.  I don't know why yet, the disk starts the boot process, but then the machine halts.

An alternative is to boot the machine from a tape image and use the vtsever program on another machine to pretend it is a tape over a serial line.  Unfortunately, I have not managed to get vtserver to work at all.  Maybe it doesn't like Windows 7.  I'll come back to vtserver another time...

Still, this page got me to thinking there may be another way.  Maybe I could boot my working disk image of XXDP in SIMH and then dump the memory to disk.  Perhaps, this memory dump could be restored to a real PDP and then I could use XXDP from there...

Indeed you can... if you want the file I created, it's here.  But here are some notes about how to do it yourself:

- Boot an XXDP disk image in SIMH
- When the OS is running, type "R ZRQCH0" at the command prompt
- You should now see something like this:

RQDX3 Disk Formatter Utility
UNIT IS Formattable Winchester (RDnn) or Floppy (RX33) Drives
RSTRT ADR 145702

- We'll need the RSTRT ADR (restart address).  Make a note of it, for me it was 145702
- Press <CTRL>+E, to halt the simulator, you should then get a "sim>" prompt
- Enter this command: "ex @dump.txt 0-157777"
- That will save the first 56k of memory to the file called dump.txt (in the folder where SIMH was running from)
- Close SIMH, we've got what we needed
- The memory dump now needs to be converted, so that it can be loaded via ODT
- Here is a quick and dirty C# program that will convert the file to ODT format:

static void Main(string[] args)
    StreamReader sr = new StreamReader("dump.txt");
    StreamWriter sw = new StreamWriter("odt.txt");

    string line;
    char[] sep = { ':' };
    for (; ; )
        line = sr.ReadLine();
        string[] split = line.Split(sep);
        sw.Write(split[1].TrimStart() + (char)10);
        if (sr.EndOfStream) break;


- Use the above program, after that you should now have a converted file called "odt.txt"
- Boot the real PDP and go into ODT.  Send "odt.txt" over the console serial line
  NOTE: to be safe, I used Tera Term Pro to send the file and set some delays:
     100ms delay after each line
     25ms delay after each character
- Be patient.  It took me about 1.5 hours to send this file via ODT!
- When the whole file has been sent, enter the Restart Address followed by 'G', eg:
- You should now be in XXDP, with the disk formatter loaded.  You should see a DR> prompt.
- Now just use the ZRQCH0 program.  I followed the formatting procedure here.

There are many improvements that I could make to this, but it worked first time; so I'm leaving it alone.

PDP-11/53: Hello World

So, I managed to find a proper "Hello World" program for my PDP-11 on the internet. It can be typed into ODT without too much effort. This is what happened when I typed it into my machine:

1000/XXXXXX 042510
1002/XXXXXX 046114
1004/XXXXXX 020117
1006/XXXXXX 047527
1010/XXXXXX 046122
1012/XXXXXX 020504
1014/XXXXXX 005015
1016/XXXXXX 000000
1020/XXXXXX 012701
1022/XXXXXX 001000
1024/XXXXXX 112100
1026/XXXXXX 001406
1030/XXXXXX 105737
1032/XXXXXX 177564
1034/XXXXXX 100375
1036/XXXXXX 110037
1040/XXXXXX 177566
1042/XXXXXX 000770
1044/XXXXXX 000000


As you can see, I'm using this to disable interrupts and start it:


It's a useful little test. I now know that my machine is capable of running programs, which is good.

So my next step is to try an RT11 boot disk so that I can attempt to run an operating system.  The ultimate goal is to run Unix rather than RT11, but you've got to start somewhere...

Do nothing. Do nothing. Do nothing. Stop.

So if I wanted to best describe the first program that ran on my DEC PDP-11/53 ... then it would have to be:

"Do nothing.  Do nothing.  Do nothing.  Stop."

But at least it worked.  I entered those commands as machine instructions in ODT (Octal Debugging Technique) and it ran.  Not much of a "Hello World" program though is it?

Here are the details of the instructions:

001000/240<lf>  ; NOP
001002/240<lf>  ; NOP
001004/240<lf>  ; NOP
R6/1000<cr>  ; set to start code at 1000
R7/1000<cr>  ; set PC to start address so we can use P and not clr PS
RS/340<cr>  ; set PS to disable interrupts
P<cr>  ; start program

That program was a hacked version of something I found here.  Now I need to make it do something better.