Skip to content

UDA50 — MSCP disk controller

The UDA50 is DEC’s MSCP disk controller: the host talks to it through two registers and a pair of command and response rings in its own memory, and the controller carries out each command against the drive it names. QUniLator implements the MSCP protocol in full on top of those two registers, in the manner of the third-party MSCP controllers of the time, and backs each drive with a disk image. It is listed as uda, of type UDA50, with eight drives uda0 to uda7 behind it.

2.11BSD on an MSCP disk, on the LAN and VMS on an emulated VAX-11/780 each build a machine around it.

RegistersIP at 772150 and SA at 772152 (17772150 and 17772152 on a QBone)
InterruptBR5, at the vector the host gives the controller when it initialises it
TransfersCommands, responses and data move by DMA to and from the host’s memory
DrivesEight units, 0 to 7. Each takes a drive type and an image; a unit without an image is reported as not available
Blocks512 bytes. The replacement and caching table each drive type carries is kept in memory, starts empty and is not saved: an image has no bad blocks to replace
IdentityController class 1, model 2 (UDA50). With type set to RQDX3, the fourth initialisation step reports the RQDX3’s microcode version

The drive types, with the block counts they announce when useimagesize is off:

TypeBlocksTypeBlocks
RX50800RA60400176
RX332400RA70547041
RD5121600RA81891072
RD3141560RA821216665
RC25, RC25F50902RA711367310
RD5260480RA721953300
RD3283236RA902376153
RD53138672RA922940951
RA80237212RA733920490
RD54311200

A new drive is an RA81. The RX50, RX33, RC25, RC25F and RA60 take removable media, and the drive reports that in its unit flags, which is how a boot ROM tells a floppy or cartridge from a fixed disk.

An image file with its write permission cleared (chmod 444) is a write-protected unit: the drive reports hardware write protect in its unit flags, and a Write or Erase to it ends with Write Protected before anything is written. An operating system that has to write to its system disk does not come up from one; VMS V3.5 stops with a bug check. Give a system disk mode 664.

  1. On the Configurations screen, enable uda. The defaults are right for a UDA50 at its standard address.
  2. Give each drive a type and an image, then enable it. Enabling the controller rebuilds the drives under it, so assign the images after the controller is on, and check that each drive shows a non-zero capacity.
  3. The host finds the drives when it initialises the controller. A boot ROM that knows MSCP boots unit 0 as DU0; the VAX console calls it RQ0.

A drive goes offline at every bus reset and power-up, and comes online when the host brings it online.

  • VMS V4.7 boots from the emulated UDA50 on the emulated VAX-11/780, over the UniBone’s bus, to a login prompt. The project’s hardware test runs that boot on a UniBone every night and before each release.
  • 2.11BSD runs multi-user from an RA81 on a real KDJ11-D (PDP-11/53) in a QBUS backplane, verified with QUniLator 1.16.0-1.
  • RSX-11M-PLUS V4.6 boots on a real PDP-11/73: the KDJ11 boot ROM finds DU0 over the emulated UDA50.
  • The MXV11-B2 bootstrap ROM runs separate boot passes for removable and fixed units and tells them apart by the removable-media flag alone; both find their units.

The UDA50 and the TQK50 share the MSCP port: the two registers, the initialisation handshake and the rings. What they have in common is listed here.

The host sets the interrupt vector during initialisation, as MSCP prescribes, so intr_vector reads 0 until it has and does not take a value of its own.

What a configuration stores and an operator sets.

ParameterShortValueDefaultWhat it is
22_bit_dmadma220 or 11 on a QBUS board, 0 on a UNIBUS boardEnable 22-bit DMA

It also carries the parameters under parameters every card on the bus has.

Whether the controller tells the host, at the first step of its initialisation, that it transfers to all 22 address bits of a QBUS: bit 9 of SA, the flag a Q22 MSCP controller sets there. A host that sees it hands the controller buffer addresses anywhere in the 4 MB space. On a UNIBUS board it stays 0, since UNIBUS addresses are 18 bits wide. The value is read each time the host initialises the controller, so a change takes effect at its next initialisation.

It has no parameters of its own.

It also carries the parameters under parameters every MSCP controller has.

On this device, base_addr can be set.

What a configuration stores and an operator sets.

ParameterShortValueDefaultWhat it is
useimagesizeuis0 or 11Determine unit size from image file instead of drive type

It also carries the parameters under parameters every drive has.

How many blocks the drive announces to the host. On, it is the size of the image in 512-byte blocks, so the host sees exactly what the image holds, whatever the drive type. Off, it is the block count of the drive type set in type (an RA81 has 891072): a larger image is cut at that count, and every block beyond it answers as lying past the end of the drive, which corrupts a file system laid out across them. Turn it off only for a guest that needs the drive type’s exact size. The geometry the drive reports (sectors per track, tracks per group) is the drive type’s either way.