Skip to content

RK611 — RK06/RK07 disk controller

The RK611 is DEC’s UNIBUS controller for the RK06 and RK07 cartridge disks: up to eight drives on one controller, each holding a removable pack of 13.9 MB (RK06) or 27.6 MB (RK07). It was a system disk on PDP-11s and on the VAX-11/780 before MSCP disks, and early VMS releases boot from it. QUniLator emulates the controller and its eight drives. The controller is listed as hk, the drives as hk0 to hk7, and each drive’s pack is an image file on the board.

RegistersRKCS1, RKWC, RKBA, RKDA, RKCS2, RKDS, RKER, RKAS/OF, RKDC at the base address and the eight words above it, an unused word at base + 22, then RKDB, RKMR1, RKECPS, RKECPT, RKMR2 and RKMR3
DrivesEight drive slots, units 0 to 7. Each enabled drive is an RK06 (411 cylinders, 13,888,512 bytes) or an RK07 (815 cylinders, 27,540,480 bytes), set by its type
Disk format3 tracks of 22 sectors of 512 bytes a cylinder. Read Header returns the header a standard format gives each sector, or the one a Write Header put there
CommandsSelect Drive, Pack Acknowledge, Drive Clear, Unload, Start Spindle, Recalibrate, Offset, Seek, Read Data, Write Data, Read Header, Write Header and Write Check
Drive statusRKDS and RKER are latched from the status messages a drive returns, and RKMR2/RKMR3 show the message pair a Select Drive asks for with RKMR1
InterruptsOn Ready after a command, on a drive’s Attention while the controller is ready, and on an error, each only while IE is set; a write of IE and RDY together forces one
Timing2400 rpm, so a sector passes the heads every 1.14 ms. A seek takes from 8 ms for one cylinder to 75 ms across an RK06, and from 6.5 ms to 71 ms across an RK07; a recalibrate takes the full-stroke time, and a seek, a recalibrate and an offset end with the drive’s Attention

Commands behave as chapter 7 of the RK06/RK07 Disk Drive User’s Guide (EK-RK067-UG-001) describes them. Drive Type must agree with the drive before a command other than Select Drive executes; a Seek to a drive without Volume Valid ends with a Nonexecutable Function; a register written while GO is set is a Programming Error; Write Check stops at the first word that does not compare. A data transfer that runs past the last sector of the pack ends with Cylinder Overflow, and one that reaches no memory with Nonexistent Memory.

A sector whose header has a Good Sector flag cleared ends a transfer with Bad Sector Error, and a header whose check word does not match with Header VRC Error. Headers a Write Header puts on a track are held while the pack stays in the drive; the image itself holds only the data.

The disk turns by the clock, so a transfer waits for its sector to come round. A command issued within two revolutions of the last one on the same drive finds the disk where a real processor would have found it, a few tens of microseconds on: an emulated processor takes longer than a real one to take an interrupt and issue the next command, and a disk turning by the wall clock alone would show it a sector or more further on each time.

Write Data and Write Check fill the 66-word silo from memory ahead of the disk, so RKWC and RKBA run up to 66 words ahead of the sector being written, also when a header search then ends the command. A write stopped by a controller clear before its sector has passed the heads leaves that sector without its ECC, and reading it ends with Data Check and ECC Hard.

A pack comes formatted 22 sectors of 16-bit words. With RKCS1 CFMT set the controller works in 20 sectors of 18-bit words: Write Header formats a track that way, and its 20 sectors take the first 20 sector positions of the track in the image, 256 words each. On the UNIBUS the two bits an 18-bit word has beyond the memory word are the bus parity lines, so the image holds the data in full. A 20-sector search on a 22-sector track ends with Operation Incomplete.

Diagnostic mode (RKMR1 DMD) disconnects the drives. A command started in it exchanges its message pair with itself, the two shift registers feeding each other, as the program steps the maintenance clock. Clocked through the whole exchange, it completes inside diagnostic mode, where the comparisons are inhibited; taken out of diagnostic mode before then, it completes as DMD is cleared and is checked on its own messages, which a Unit Field Error and a Drive Type Error can show. A read ends with Drive Timing Error as DMD is cleared, and a write’s Write Gate then reaches the drive. The bit-serial data path the maintenance clock steps - simulated sector and index pulses, read data, ECC - is not simulated, and the clock count that completes an exchange is the one DEC’s CZR6K diagnostic gives it.

  1. Add hk on the Configurations screen, with a drive — hk0 — whose image names a pack.
  2. Enabling a drive switches it on, and a drive holding an image with its runstop switch in RUN loads the heads and comes ready, raising Attention as a real drive does when its heads load. The drive’s lamps are among its status parameters.
  3. The program then gives Pack Acknowledge before it reads or writes; operating systems and boot ROMs do that themselves.

A drive is an RK07 unless its type is set to RK06. An image is the pack’s sectors in order, cylinder by cylinder, track 0 to 2: the layout SimH’s HK device uses, so its images work as they are.

A pack carries a bad sector file on its last track, written at the factory, which DEC’s drive diagnostics read. A new, blank image has none; give a scratch pack one before running them (UG 2.5.6: every sector of the last track holding the cartridge serial number, three zero words, and ones after that).

On a PDP-11 the M9312’s DM boot ROM (23-752A9) boots the RK611. On the emulated VAX-11/780, bootdevice HK0 to HK7 on cpuvax boots from the drive with that unit: VMB reads the boot block from the pack over the bus.

On the UniBone’s emulated PDP-11/34, with two RK07 scratch packs:

  • CZR6K (ZR6KG0), DEC’s RK611 functional controller diagnostic, runs through all its tests on both drives. Three tests report errors every pass: test 74 expects an interrupt from IE written alone after a subsystem clear, and test 75 the same before a write on the first drive; test 75 expects Seek Incomplete on a write that follows a seek sent with bad parity and a subsystem clear; and test 103 expects Drive Off Track and Drive Unsafe after a Write Header taken out of diagnostic mode mid-sector. None of these follows from the manual, which forces an interrupt only when IE and RDY are written together. Tests 77 and 100, which race the processor against the disk’s timing, fail now and then on later passes.
  • CZR6H (ZR6HF0), the first drive test, needs spinupdelay 1, since it watches the drive start; its timing tests are bypassed for want of a line or programmable clock, and its waits are program loops calibrated for a real 11/34, which run out before some of the drive’s real-time motions end.
  • RT-11 V5.5 initializes DM0:, copies its whole system volume to it (209 files, 6442 blocks) with binary compares showing no differences, makes it bootable with COPY/BOOT, and boots from it with BOOT DM0: and cold, through the M9312’s DM boot ROM (23-752A9).
  • VAX/VMS V4.7 on the emulated VAX-11/780 configures the controller as DMA0:, initializes and mounts a pack, copies 225 files (12,375 blocks) to it with DIFFERENCES showing none, and ANALYZE/DISK_STRUCTURE finds it clean. bootdevice HK0 starts VMB on the pack over the bus; a pack without a system on it ends in %BOOT-F-Unable to locate BOOT file.
  • VAX/VMS V3.0 boots from an RK07 system pack with bootdevice HK0 through its startup to Username:.

The RK611 diskless diagnostics (CZR6A to CZR6E) exercise the bit-serial data path in diagnostic mode, which is not simulated.

It has no parameters of its own.

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

What a configuration stores and an operator sets.

ParameterShortValueDefaultWhat it is
runstoprs0 or 11RUN/STOP switch: 1 = RUN
writeprotectwp0 or 10WRITE PROT switch
spinupdelaysud0 or 101 = model the drive’s spin-up/spin-down delay; 0 = ready at once

What the device reports as it runs. A configuration does not store these.

ParameterShortValueWhat it is
readylamprl0 or 1State of READY lamp
faultlampfl0 or 1State of FAULT lamp
writeprotectlampwpl0 or 1State of WRITE PROT lamp
cylindercylnumberCylinder the heads are over

It also carries the parameters under parameters every drive has.

runstop, writeprotect, readylamp, faultlamp, writeprotectlamp

Section titled “runstop, writeprotect, readylamp, faultlamp, writeprotectlamp”

The drive’s front panel. runstop is the RUN/STOP switch: in RUN, a drive holding a cartridge spins up, loads its heads and comes READY; in STOP it unloads them and spins down. An Unload command takes the drive off line as STOP does, and Start Spindle brings it back while the switch is in RUN. Setting image on a drive in RUN loads the new pack the same way.

writeprotect is the WRITE PROT switch. A protected drive refuses every write with a Write Lock Error, and an image the board can only read is protected the same way.

The lamps follow the drive: READY with the heads loaded and on a cylinder, FAULT while the drive holds an error, WRITE PROT while the pack is protected.

With 1, the drive takes the 30 seconds a real one does to spin up, run its brush cycle and load the heads. With 0, it is ready as soon as it is loaded. Seek, offset and rotation times are modelled either way.

The cylinder the heads are over.