Testing RSX on the ENC28J60

One of the things that has been on my list of things to do is to refresh my RSX-11M-Plus image. Time to catch up and test if the new ENC28J60 works as well with RSX as with 2.11BSD!

The previous image that I was using up to now – the one that’s in the setup walkthrough in the sessions pages – I’m not quite sure when I created that. Some time early 2014 from looking at when the page was published, but it might have been even earlier – I remember doing a lot of work on the page text.

High time for a new setup, and where else to start than with Johnny Billquist’s image. Get it from ftp://ftp.dfupdate.se/pub/pdp11/rsx/pidp/ and read the documentation http://mim.softjar.se/pidp.htm.

There’s one thing though: Johnny’s image is for an MSCP type disk, and PDP2011 doesn’t do those. So we’ll have to copy it to an RP06 – RP07 would’ve been nicer, but RSX doesn’t do those.

Here’s how. Begin by downloading the disk image, and gunzip it, then copy it to a file named work.dsk Then put this in a simh.ini file:

set cpu 11/70 4m
set rq0 rauser=1024
att rq0 work.dsk
set rp0 rp06
att rp0 rsxrp06.dsk

and start simh, as

pdp11 simh.ini

You’ll get a question ‘Overwrite last track? [N]’, that’s the rp06 image being initialized. Answer Y.

Then boot Johnny’s image:

boot rq0

You’ll get lots and lots of questions about setting up networking. Answer them for the target system – the one you’ll be running on your PDP2011 FPGA.

Yes, you do want the DECnet protocols enabled – that’s the whole point. Think up a node number (I usually use something like 1.20, but if you want to connect to HECnet maybe you should choose more wisely). And you also want TCP/IP – even more strongly, that’s the point of this image.

If you don’t know what to answer, the defaults are usually ok. I’ve skipped the Multinet questions so far – that’s only relevant if you want your node to join HECnet.

After the networking question-and-answer, you’ll set the time (yay, y2k!) and the system will come up. Log in (‘hello system’, three guesses for the password) and do the following:

>mou/for db0:
>run $bad
BAD>db0:
BAD -- DB0: Total bad blocks= 0.
BAD>^Z
>run $bru
BRU>/init/mou du: db0:
BRU - Completed

BRU>^Z
>

Then shut down (‘run $shutup’), copy the rsxrp06.dsk image to an sd card, and boot that on your FPGA.

Have fun!

Oh. Wait. There’s just one thing.

I haven’t published the ENC28J60 support yet. And while working on that, I found a tiny little bug in the ENC28J60 microcode that prevents the initialization of the DEUNA – and that same bug is also present in the ENC424J600 version.

It’s about the card driver in RSX trying to load ‘new and improved’ microcode into the DEUNA by function code 21 ‘load internal memory’ – which goes ok if we just tell it that we did so by setting up for a DNI interrupt. But then it logically tries function code 1 ‘start microaddress’ to which my old microcode truthfully answers with a PCEI interrupt – somewhat like saying ‘sorry I can’t do that’. It’s a simple fix: change the PCEI to a DNI ‘sure I did what you asked’ and everything works as it should.

If you’re impatient, it’s easy enough to do. Go and look for the xubr.mac file, about line 428, and change

         bis    #40000,@#174510           ; pcei - this function is not implemented

into

         bis    #4000,@#174510            ; dni

That’s all. Well, you’ll have to run make (ie, compile the mac source into the binary form in xubr.vhd) and then run Quartus on your project.

Or else wait for a bit, a week or two maybe. I ‘just’ have a couple tiny things to finish up before I publish the new version.

Leave a Reply