• Please review our updated Terms and Rules here

MSCP Controller with SD-Card, need some help

Mine stopped after the first READ :rolleyes:, like something between the MSCP Server and the Host is out of sync so I decided to add a manual "poll" command to my MSCP emulator and now I get a little further

Code:
126130
@165600g
072520
@165600g
73Boot from ra(0,0,0) at 0172150
Press <CR> to boot, or any other key to abort: 0
: ra(0,0,0)unix
Boot: bootdev=02400 bootcsr=0172150

2.11 BSD UNIX #21: Fri Mar 28 07:58:13 PDT 2025
    root@pdp11:/usr/src/sys/PIDP11

ra0: Ver 1 mod 4
ra0: RA80  size=1954104
attaching lo0

phys mem  = 2097152
avail mem = 1716544
user mem  = 307200

May 15 07:46:03 init: configure system

dz ? csr 160100 vector 310 skipped:  No CSR.
lp ? csr 177514 vector 200 skipped:  No CSR.
ra 0 csr 172150 vector 154 vectorset attached
rx ? csr 177170 vector 264 skipped:  No CSR.
tms ? csr 174500 vector 260 skipped:  No CSR.
cn 1 csr 176500 vector 300 attached
Automatic reboot in progress...
Fri May 15 07:47:53 PDT 2026
 
and after many, many, many, many, many (felt like 500 times I had to enter poll manually, good that I have a command recall buffer) I get the login prompt
Code:
@165600g
73Boot from ra(0,0,0) at 0172150
Press <CR> to boot, or any other key to abort: 0
: ra(0,0,0)unix
Boot: bootdev=02400 bootcsr=0172150

2.11 BSD UNIX #21: Fri Mar 28 07:58:13 PDT 2025
    root@pdp11:/usr/src/sys/PIDP11

ra0: Ver 1 mod 4
ra0: RA80  size=1954104
attaching lo0

phys mem  = 2097152
avail mem = 1716544
user mem  = 307200

May 15 07:46:03 init: configure system

dz ? csr 160100 vector 310 skipped:  No CSR.
lp ? csr 177514 vector 200 skipped:  No CSR.
ra 0 csr 172150 vector 154 vectorset attached
rx ? csr 177170 vector 264 skipped:  No CSR.
tms ? csr 174500 vector 260 skipped:  No CSR.
cn 1 csr 176500 vector 300 attached
Automatic reboot in progress...
Fri May 15 07:47:53 PDT 2026

/dev/ra0a: file system is clean; not checking
/dev/rra0h: file system is clean; not checking
/dev/rra0g: file system is clean; not checking
Fri May 15 07:51:09 PDT 2026
checking quotas: done.
Assuming NETWORKING system ...
ifconfig: ioctl (SIOCGIFFLAGS): no such interface
add host pdp11.home.lan: gateway 127.0.0.1
add net default: gateway 10.0.5.1: Network is unreachable
starting system logger
checking for core dump...
May 15 07:54:31 pdp11 unix: ra0: Ver 1 mod 4
May 15 07:54:31 pdp11 unix: ra0: RA80  size=1954104
preserving editor files
clearing /tmp
standard daemons: update cron accounting.
starting network daemons: inetd rwhod printer.
starting local daemons: sendmail ntpd.
May 15 07:55:46 pdp11 ntpd[98]: pool.ntp.org: unknown host
Fri May 15 07:55:49 PDT 2026
May 15 07:55:54 pdp11 init: kernel security level changed from 0 to 1
May 15 07:56:07 pdp11 getty: /dev/tty07: Device not configured
May 15 07:56:07 pdp11 getty: /dev/tty03: Device not configured
May 15 07:56:07 pdp11 getty: /dev/tty04: Device not configured
May 15 07:56:07 pdp11 getty: /dev/tty05: Device not configured
May 15 07:56:06 pdp11 getty: /dev/tty01: Device not configured
May 15 07:56:03 pdp11 getty: /dev/tty02: Device not configured
May 15 07:56:02 pdp11 getty: /dev/tty06: Device not configured


2.11 BSD UNIX (pdp11) (console)

login:

So that's the reason to assume, that BSD does something special regarding posting messages and receiving responses which I so far did not anticipate, because it seems that my MSCP server regularly get's stalled. But appart from the manual poll comands, it seems BDS works as well on may hardware. Therefore I would like to see myself in the bootloader up to the first SCC command (where my MSCP emulator hangs the first time) to find the cause of this issue.
 
Yes, I saw that - hence grabbing a log of the MSCP activity in case it helps...

Robin
I first thought like you. But now I suspect the problem is not at the message layer but on the lower layer, because my manual POLL interacts with the message passing logic and as soon I go and kick my MSCP emulator BSD gets one step further and as you can see is happy with everything he receives
 
You can keep polling after processing all the commands, which seems to work (early version of my code!) - but there's a scenario where you should RESTART polling after sending a response

If you are doing this, maybe you are completing and stopping again too quickly?

Robin
 
Not quite sure, I think I have just found another clue. It's not that I stop polling. There is a state mismatch between the INIT process and the POLL process in my MSCP emulator. Perhaps some sort of race condition. I need to add, or rather re-activate, some low-level logging.
 
One step further regarding BSD 2.11, not perfect but still promising
Code:
@165600g
73Boot from ra(0,0,0) at 0172150
Press <CR> to boot, or any other key to abort: 3
: ra(0,0,0)unix
Boot: bootdev=02400 bootcsr=0172150

2.11 BSD UNIX #21: Fri Mar 28 07:58:13 PDT 2025
    root@pdp11:/usr/src/sys/PIDP11

ra0: Ver 7 mod 13
ra0: RA80  size=1954001
attaching lo0

phys mem  = 2097152
avail mem = 1716544
user mem  = 307200

May 15 08:03:57 init: configure system

dz ? csr 160100 vector 310 skipped:  No CSR.
lp ? csr 177514 vector 200 skipped:  No CSR.
ra 0 csr 172150 vector 154 vectorset attached
rx ? csr 177170 vector 264 skipped:  No CSR.
tms ? csr 174500 vector 260 skipped:  No CSR.
cn 1 csr 176500 vector 300 attached
Automatic reboot in progress...
Fri May 15 08:04:08 PDT 2026
/dev/ra0a: UNREF FILE  I=683  OWNER=root MODE=100600
/dev/ra0a: SIZE=0 MTIME=May 15 08:04 2026  (CLEARED)
/dev/ra0a: UNREF FILE  I=686  OWNER=root MODE=100600
/dev/ra0a: SIZE=0 MTIME=May 15 08:04 2026  (CLEARED)
/dev/ra0a: BLK(S) MISSING (SALVAGED)
/dev/ra0a: 590 files, 3169 used, 4647 free
/dev/ra0a: Marking file system clean

73Boot from ra(0,0,0) at 0172150
Press <CR> to boot, or any other key to abort: 0
: ra(0,0,0)unix
Boot: bootdev=02400 bootcsr=0172150

2.11 BSD UNIX #21: Fri Mar 28 07:58:13 PDT 2025
    root@pdp11:/usr/src/sys/PIDP11

ra0: Ver 7 mod 13
ra0: RA80  size=1954001
attaching lo0

phys mem  = 2097152
avail mem = 1716544
user mem  = 307200

May 15 08:04:16 init: configure system

dz ? csr 160100 vector 310 skipped:  No CSR.
lp ? csr 177514 vector 200 skipped:  No CSR.
ra 0 csr 172150 vector 154 vectorset attached
rx ? csr 177170 vector 264 skipped:  No CSR.
tms ? csr 174500 vector 260 skipped:  No CSR.
cn 1 csr 176500 vector 300 attached
Automatic reboot in progress...
Fri May 15 08:04:27 PDT 2026
/dev/ra0a: file system is clean; not checking

then it does something strange re-initialising the MSCP controller and hangs.
 
The re-init issue was in fact a hardware flaw on my CPU card making the MSCP Emulator think there was a write access to the IP register. Fixed that but still no login prompt. However, the trace on the bus shows that BSD is now continuously trying to access a device on the Q-Bus, but at least the MSCP status stays "controller online". Not sure what BSD is trying to access. Unfortunately I don't have an LA with 32 inputs, so difficult to say what address it is. But before I will spend too much time, I also have to mention, that this test has been done on my PDP-11/Hack CPU on my QBUS64 and therefore there is no guarantee, that BSD will see all things it expects to see on a real PDP-11. In any case, the test with BSD has resulted in many improvements of the MSCP firmware and I'm now confident to start the real Q-Bus Version and then backport this one to the QBUS64. The Q-Bus version is next because I already have a (albeit ugly) QBUS64 version running everything I wanted at the beginning of the development. But the Q-Bus version will have a real time debug port included, so I can later better debug any issue with the MSCP Emulator as well as the issue with BSD. And this is not the only thing I missed on my QBUS64 version of the MSCP Emulator. But that is another story. And of course to equip the last real Q-Bus machine I have with an MSCP controller.

Peter
 
Good news, BSD 2.11 boots

Code:
@165600g
73Boot from ra(0,0,0) at 0172150
Press <CR> to boot, or any other key to abort: 4
: ra(0,0,0)unix
Boot: bootdev=02400 bootcsr=0172150

2.11 BSD UNIX #21: Fri Mar 28 07:58:13 PDT 2025
    root@pdp11:/usr/src/sys/PIDP11

ra0: Ver 7 mod 13
ra0: RA80  size=1954001
attaching lo0

phys mem  = 2097152
avail mem = 1716544
user mem  = 307200

May 15 07:46:03 init: configure system

dz ? csr 160100 vector 310 skipped:  No CSR.
lp ? csr 177514 vector 200 skipped:  No CSR.
ra 0 csr 172150 vector 154 vectorset attached
rx ? csr 177170 vector 264 skipped:  No CSR.
tms ? csr 174500 vector 260 skipped:  No CSR.
cn 1 csr 176500 vector 300 attached
Automatic reboot in progress...
Fri May 15 07:46:14 PDT 2026
/dev/ra0a: file system is clean; not checking
/dev/rra0h: file system is clean; not checking
/dev/rra0g: file system is clean; not checking
Fri May 15 07:46:23 PDT 2026
checking quotas: done.
Assuming NETWORKING system ...
ifconfig: ioctl (SIOCGIFFLAGS): no such interface
add host pdp11.home.lan: gateway 127.0.0.1
add net default: gateway 10.0.5.1: Network is unreachable
starting system logger
checking for core dump...
May 15 07:46:36 pdp11 unix: ra0: Ver 7 mod 13
May 15 07:46:36 pdp11 unix: ra0: RA80  size=1954001
preserving editor files
clearing /tmp
standard daemons: update cron accounting.
starting network daemons: inetd rwhod printer.
starting local daemons: sendmail ntpd.
May 15 07:46:47 pdp11 ntpd[98]: pool.ntp.org: unknown host
Fri May 15 07:46:48 PDT 2026
May 15 07:46:49 pdp11 init: kernel security level changed from 0 to 1
May 15 07:46:52 pdp11 getty: /dev/tty04: Device not configured
May 15 07:46:52 pdp11 getty: /dev/tty06: Device not configured
May 15 07:46:52 pdp11 getty: /dev/tty00: Device not configured
May 15 07:46:52 pdp11 getty: /dev/tty01: Device not configured
May 15 07:46:52 pdp11 getty: /dev/tty05: Device not configured


2.11 BSD UNIX (pdp11) (console)

login: May 15 07:46:52 pdp11 getty: /dev/tty03: Device not configured
May 15 07:46:52 pdp11 getty: /dev/tty07: Device not configured
root
May 15 07:47:48 pdp11 login: ROOT LOGIN ON console
erase, kill ^U, intr ^C
# ls
.cshrc      .mailrc     bin         lib         ounix       usr
.exrc       .profile    boot        lost+found  sbin        var
.history    .rhosts     dev         mdec        sys
.hushlogin  .tiprc      disklabel   mnt         tmp
.kermrc     README      etc         netnix      toyset
.login      VERSION     home        onetnix     unix
#
 
Fantastic news! - I have been looking at adding I&D space to my emulator and upgrading it to a fast 11/73, rather than a very fast 11/23 - lol.. Not sure what different O/S are going to make of an 11/73 with the never actually shipped CIS option though - but it's an option in any case!

Robin
 
Fantastic news! - I have been looking at adding I&D space to my emulator and upgrading it to a fast 11/73, rather than a very fast 11/23 - lol.. Not sure what different O/S are going to make of an 11/73 with the never actually shipped CIS option though - but it's an option in any case!
With a little tweak to Open-SIMH, I created an 11/70 with CIS and RSTS/E will boot, but fail to start:
Code:
sim> show cpu
CPU     11/70, FPP, CIS, RH70, autoconfiguration enabled, idle enabled
        4088KB
sim> b rp0
RSTS V10.1-L RSTS10 (DR0) INIT V10.1-0L


Today's date? 21-MAY-26
Current time? 00:23

Start timesharing? <Yes> HA LI

  Name  Address Vector  Comments
  TT0:   177560   060   
  RL0:   174400   160   Units: 0(RL02) 1(RL02)
  RR0:   176700   254   BAE=+050, Units: 0(RP07) 1(RP07)
  RU0:   172150  P310   UDA50A  Units: 0(RA92) 1(RA92)
  MU0:   174500  P314   TU81    Units: 0(TU81)
  TU0:   172440   224   BAE=+034, Units: 0(TU77 @TM03 #0) 1(TU77 @TM03 #0) 
  PR0:   177550   070
  PP0:   177554   074
  LP0:   177514   200
  VH0:   160440   300   Sub-lines: 16
  XE0:   174510   120   DELUA Address: 08-00-2B-00-F8-A5

  KW11L  177546   100
  SR     177570
  DR     177570

  Hertz = 60.

  Other: FPU, SL, CIS, 22-Bit, Data space, Cache w/address, System ID = 4660

Option: <Start>

Red stack trap, PC: 034140 (BIT @135666,@77105)
 
And as always, I made some mistakes in the PCB design😡. Even worse, it's not that I didn't know but I forgot to double check the interface between the MCU and the SD-Card. Something I have done so many times and took it for granted that I wouldn't goof it. Which of course required some nasty engineering changes. However after this was fixed I could start to debug the new CPLD design, I decided to split the functions between the CPLDs differently to the solution I have used on my RLV12 emulator, of course this required some fine-tuning.

Finally today I had some big success and I'm able to boot into RT-11 5.7 and BSD 2.11 (thanks for the hint to try it, now I have more options to test) from this MSCP controller on the Q-BUS. Sadly RSX-11M+ is not willing to cooperate.

Here is my little Q-BUS Test Machine

IMG_0564.jpeg

And a picture of the Q-BUS card taken during the build with the SD-Card Interface already "fixed" :oops:

IMG_0563.jpeg


Cheers

Peter
 
It's always the simple things we get wrong. I guess we just don't think about them
Excellent progress on your project. Well done.
 
Thanks!

In the meantime I got some steps further in analyzing the RSX-11M+ problem, it seems RSX-11M+ is very picky what a read from SA returns. And so it was constantly trying to get the unit only because it thought there was an error. Here I did not pay enough attention what I return as default value. Still no successful boot, but at least a normal crash and not a busy loop for some unknown reason :). Perhaps the disk image on the SD-Card got corrupt after the many failures.

Also I did a "du" as user root when at the root of the filesystem to check if the controller is stable as a "du" does a lot of reads to all directory entries, and it seems this is no issue for my controller. It survived. I was actually surprised to see the many things that come with BSD 2.11.
 
Good news, RSX-11M+ boots as well. Bad news I need a new memory card. While RT-11 and BSD 2.11 did not complain, something of my 2Mbyte Memory board does not go well with RSX-11M+. Swapping the 2Mbyte card with the spare 1Mbyte card solved the issue. So in other words I have now a fully functional MSCP controller for the Q-Bus using an SD-Card to store diskimages :cool:.

Thanks for your help and suggestions

Peter

P.S. also checked with my 4Mbyte memory card and this one works as well. Definitively something wrong with the 2Mbyte memory, it causes actually a bus time out.
 
Last edited:
I am really eager to order a set of boards from JLCPCB for my MicroPDP-11, and my two lab qbus machines and use my Viking SCSI cards with my VAXstation and MicroVAX II. Do you plan to make the production files, schematic and equations available?

It also would be interesting to see how much work it would be to adapt it to Unibus. Since it is separate address and data buses I assume more pins are required on the CPLD but I need to see the equations.

Can anyone elaborate what this "purge" thing do and possibly also what these subtle differences between UDA50 and RQDX3 consists of?
 
I am really eager to order a set of boards from JLCPCB for my MicroPDP-11, and my two lab qbus machines and use my Viking SCSI cards with my VAXstation and MicroVAX II. Do you plan to make the production files, schematic and equations available?
I would also be interested in purchasing one of these.

To @cbscpe - have you tested it with RSTS/E V10,1? If not, I can make a ready-to-run SIMH disk image available to you.
 
First thanks. And yes I'm going to publish all the files, I actually am in the process of fixing the PCB errors and started to write the web pages for my web site describing the project. As for the PCB I'm going to publish the KiCAD project which includes the BOM and would make it possible to even order an assembled board from JLCPCB. I personally prefer to solder things myself as some sort of entertainment :). The same goes for the source code, the JEDEC and HEX files. The trick will be to own the necessary programming tools, especially for the CPLD as the official one is approx 90U$. Sometimes you can find cheap clones on ebay. However I'm not going to take orders or sell them. Out from Switzerland it is too much a hassle to ship things internationally.

I never worked with an Unibus machine. Perhaps I should go and have a look to the Unibone project to fully answer your question. My solution works primarily with unidirectional pins on the CPLD, due to the way my bus driver and receiver solution works. In other words I did not make very economical use of the available pins of the CPLDs. And still there are some unused pins. Perhaps with a clever solution for the Unibus driver and receiver section you can start using bidirectional pins. And the fact that the Unibus has only 18 address lines already saves again some pins. I'm confident that the main CPLD has enough pins. The 2nd CPLD, the DMA controller, still has one third of its pins unused.

And to @Terri - no I did not test it with RSTS/E if you can prepare a disk image then I will give it y try. I'm a total beginner to RSTS/E though, never used it.
 
Back
Top