MSCP Emulator


MSCP Emulator for the PDP-11/Hack

The idea of an MSCP Emulator existed from the beginning of the PDP-11/Hack project. But I always thought that this would be a challenge and way more complicated than a RLV12 emulator. The reason was mainly because the description of the MSCP protocol is way larger than the technical specifications of the RLV12 controller. And even after the RLV12 emulator worked and has been ported to the real Q-Bus, I was for a short time thinking about rather emulating an RH70 on the Q-Bus, similar to the Emulex SC03 controller, than building an MSCP controller.

In addition the RLV12 emulator worked so well for RT-11 and RSX-11M+, the operating systems I use, the need for another disk emulator, especially a MSCP emulator was not very strong.

Then I started to build a universal disk controller card for my PDP-11/Hack that could replace my RLV12 emulator and serve as hardware for a MSCP emulator. Therefore the hardware itself is often referred to as Universal Disk Emulator.

RQDX3 Source Code

When the RQDX3 source code was made available, and I decided to really start with the MSCP Emulator project, at least for my PDP-11/Hack and the QBUS64. As a first step I manually translated the source code, written in MACRO-11 assembler and presumably in DECUS C, to AVR assembler code. In a thread at vcfed.org there was a discussion regarding compiling the RQDX3 source code. And with the help of the community I finally could build an evironment that was able to compile and assemble the source code and produce a ROM image. The source code is not really complete, as it lacks at least two modules. One is the formatting routine and one is the real power-up code. For both these modules only replacement source files exist that make it possible to compile the complete RQDX3 code but when compared to the ROM image it is clear that the real part of them is missing.

Once the source code was translated to AVR assembler source, I started to integrate the AVR sources into the RLV12 emulator source code. I did not want to start from scatch, because the RLV12 emulator not only consists of the module that emulates the Q-Bus interface and the RLV12 controller, but a lot of supporting functions, like the FAT library, the command line interface, the handling of disk images etc.

Initial Hardware

Looking at the source code it was interesting to see, that the author of the source code included some sort of real-time operating system with multiple jobs and pre-emptive scheduling. This got my very curious and I thought it would help to have such a real-time kernel for my AVR processors as well. Microchip at that time introduced a new set of microcontrollers with standardised IO modules, XMega core features and with a lot more IO blocks and GPIOs. In fact there was one feature that was in fact enabling the use of a real-time kernel and still be able to use my Q-Bridge CPLD design at the same time. One interrupt source could be selected to operate at a higher interrupt level than normal interrupts.

Therefore I designed a new Disk Emulator Hardware for my PDP-11/Hack.

First Universal Diskemulator

First I ported the RLV12 emulator software and then added the RT-OS to the emulator. The high-level interrupt was used for the Q-Bus IO. This worked surprisingly well. So it was decided to use this as the base of the MSCP emulator and use the same set of jobs as the RQDX3 source code implemented.

MSCP Emulator for the Q-BUS

For a long time the new hardware was primarily the test environment for new ideas, the RTOS, the Q-Bus interrupt logic. In December 2025 I decided to finally start with the MSCP Emulation. With some help and input from other users of the vcfed forum I was finally able to boot various operating systems.
After some further development I decided to create a new hardware for the MSCP Emulator. This time I wanted a solution that uses exactly the same firmware for both, the QBUS64 of my PDP-11/Hack and as well as the real Q-BUS version. Empty PCB This time I started with the Q-Bus MSCP Emulator project, which is described here.