MSCP Emulator - Introduction


General Description

Introduction

The following web pages will give a description of the MSCP Emulator, a controller interface for the Q-BUS. The information will explain the function and features of this interface card.

Functional Description

The MSCP Emulator is a Q-BUS disk controller card that connects any DEC LSI-11 seriesmicrocomputer with an SD-Card.

The MSCP Emulator contains a Q-BUS interface, using standard and available components to comply with the Q-BUS interface specifications, to avoid any difficulties in getting obsolete circuits no longer produced, which are decreasingly available.

The Q-BUS interface connects to the CPLDs that implement all the control logic required to smoothly interact with Q-BUS transactions. The CPLDs als implement a register interface that allows an external processor to control the Q-BUS transactions or to initiate an interrupt or DMA on the Q-BUS.

A small microcontroller builds the bridge between the register interface of the CPLDs and the SD-Card. Due to limitations regarding usage of SD-Card interfaces the microcontroller uses the standard SPI interface to exchange commands and data with the SD-Card.

The firmware of the microcontroller implements a MSCP server to talk to the operating system. The MSCP server implements all functions used by the standard PDP-11 operating systems like RT-11, RSX-11Mplus and BSD 2.11. The firmware emulates a normal MSCP disk controller with up to four units, aka disks, attached to it. Read and write operations are translated to read and write operations to the SD-Card.

The SD-Card needs to be formatted as an MBR disk. There are two options to implement disk images on the SD-Card. The first option is to create partitions on the SD-Card. You can have as many partitions on the SD-Card as needed. When the SD-Card is inserted into the MSCP Emulator the firmware will scan all partitions and look for partitions of type HFS+, FAT-12 or Linux and build an internal list of partitions. These partitions can then be individually mapped to one of the four units. Note that you can in fact only map partitions of type Linux to units. The reason HFS+ and FAT-12 partitions are scanned is because only Linux systems can create Linux partitions without external tools. FAT-12 was first used as it was available on my MacOS as partition type using diskutils and RL02 only have 10Mbyte which FAT-12 supports. Later I added HFS+ as a valid partition type in order to support larger disk images. Before you can use them as the partition for diskimages in the MSCP emulator you will have to activate them using the MSCP emulator, this actually just overwrites the partition type byte with the partition type for linux partitions. The other option is to store disk image files in a FAT-32 formatted partition on the SD-Card. The MSCP Emulator will mount the first FAT-32 partition as the source for disk image files. Files can then be mapped to the units. Both options are supported in parallel. If such a FAT-32 formatted partition exists the firmware will also scan the root directory for a file named RLV12.INI (or later MSCP.INI) which can automatically map partitions or files to the units during power-on or when the SD-Card is inserted. If no FAT-32 partition is found or if no startup configuration file exists the firmware will automatically map the units to the partitions of type Linux. Up to four partitions will be automatically mapped. Further partitions can be used later using the command line interface.

The MSCP Emulator also provides a serial interface to control the functions. A command line interface is implemented that allows the user to manually map partitions to disk images, display the status, retrieve logging and debugging information or restart the controller. The serial interface is implemented as a USB serial interface using a standard USB-C connector. To avoid any ground loops the serial interface is galvanically isolated to the microcontroller using a ADUM1201. Note that this does not provide isolation towards mains. Still both sides, the LSI-11 system and the device connected to the USB-C interface need to be properly isolated from mains.

The communication speed of the serial interface is 115'200baud and the character format is 8 data bits without parity bit, 1 start bit and 1 stop bit. No handshaking is configured. When pasting commands to the command line interface make sure that you set some intercharacter delay else the interface may miss some characters.

The MSCP Emulator occupies one dual height slot (8" x 5") in any Q-Bus backplane and requires +5 volt power. It generates it’s own 3.3 volt power for the SD-Card and components used by the Q-Bus interface.

Device Options

The generic interface created by the CPLDs is programmed to support two sets of device registers, a MSCP port compatible set of device registers at the standard MSCP controller address 172150/28 and a RLV12 compatible set of device registers at the standard RLV12 controller address 1744008. The microcontroller can switch between the two sets. Therefore it is possible to load an alternative firmware to the MSCP Emulator to emulate a standard RLV12 controller with up to four RL01/RL02 attached to it.

The Q-Bus device registers are only word addressable and do not support byte writes. This has no impact on the MSCP and RLV12 emulation as these devices did as well not implement byte writeable control and status registers.

The emulator also comes with the support to emulate a power-on startup of the PDP-11 by emulating a Boot ROM at the standard startup address 1730008.

If you wish to implement other device register addresses you need to reprogram the CPLDs with the appropriate addresses.

Specifications

SD-Card interface supporting standard and extended capacity SD-Cards up to 64Gbyte. The SD-Card slot is a push-push standard sized SD-Card connector.

The MSCP Emulator has also two programming connectors for the microcontroller and the CPLDs. The programming of the microcontroller is done via a standard 6-pin UPDI header for AVR microcontrollers from Microchip. You can either use a standard UPDI programmer from Microchip or use one of the simple programmers built using a standard USB-Serial TTL interface and a single resistor. The microcontroller operates at +5 volts and therefore the adapter should also provide +5 volts and have +5 volts compatible receive and transmit signals. The CPLDs are programmed using a standard Microchip 10-pin JTAG programming header for ATF150x CPLDs. The easiest way to program these CPLDs is using a Microchip programmer ATDH1150USB. It is also possible to use an Altera Byte Blaster or any of the cheap clones available on the internet. For more information about the programming of the components see the appropriate web page.

The controller has also an activity LED which indicates access to the SD-Card.

All these interfaces sit on the edge of the Q-Bus card.

The MSCP Emulator requires approximatively 150mA at +5 volts. During insertion of SD-Cards the current might increase for a short moment (sub-seconds). The SD-Card association allows up to 120mA. Although the power rail for the SD-Card is heavily buffered you should consider a load of up to approx 250mA at +5 volts.

The card presents one standard load to the Q-Bus.

The module is a normal sized dual height Q-Bus card, 5.2" x 8.9".

The card supports only 22-bit addressing. To make it compatible with 18-bit backplanes that use the signals for BDAL18..21 otherwise you must not equip the controller with U13. However the firmware is not aware that there are only 18 address bits. Depending on the OS this might or might not be an issue.