[Simh] something strange with simulated RK05 drive ?

Henk Gooijen henk.gooijen at hotmail.com
Tue Feb 11 15:15:43 EST 2020


I am building a replica RK05 disk drive with working switches and panel lamps.
This will be an add-on to the PiDP-11/70, giving the user even more the look
and feel of operating a PDP-11 system 😊  The RK05 drive is constructed at the
same scale dimensions as Oscar's PiDP-11/70 and has a front door with lock
mechanism just like the real RK05. A real RK05 disk cartridge is 3D scanned
and will be (scaled) 3D printed. Inside that disk cartridge is a USB stick on
which 7 virtual RK05 "disk" container files can be stored. Jumper setting in
the cartridge selects which container file is actually "mounted" when the
cartrdige is mounted in the drive.

So far for the introduction 😊
To make this setup work I have made changes to scp.c, scp.h, pdp11_cpu.c,
pdp11_rk.c and the makefile, and added a few files (drive "behavior" and USB
stick handling).
All indicator lamps seem to behave as on the real RK05 drive ... however,
when I do .FORMAT RK0:  (I am using RT-11)  this command always ends with
turning on the FAULT indicator. I have added print statements to the original
SIMH distribution in pdp11_rk.c to show the problem (so no "rubbish of mine
interference").
This is what I see:

PDP-11 simulator V4.0-0 Current        git commit id: 0de9b628
sim> set rl rl02
sim> att rl0 rt-work.dsk
RL0: 'rt-work.dsk' Contains RT11 partitions
1 valid partition, Type: V05, Sectors On Disk: 10210
sim> att rk0 rk.dsk
RK: creating new file
sim> boot rl0

RT-11FB  V5.03

.dir rk0:

?DIR-F-Invalid directory

.format rk0:
RK0:/FORMAT-Are you sure? Y

            pdp11_rk.c :: in rk_go() cyl >= RK_NUMCY
            pdp11_rk.c :: rk_set_done() called with error 64

?FORMAT-I-Formatting complete

.init rk0:
RK0:/Initialzie; Are you sure? Y

.dir rk0:


0 Files, 0 Blocks
4762 Free blocks

.

As you can see from the printed debug statements, in the function rk_go()
the cylinder number goes higher than the maximum number of cylinders
possible on an RK05. Then, the function rk_set_done() is called with the
variable "error" holding RKER_NXC (64 decimal == 000100, octal == RKER_NXC)
==> turns on the FAULT indicator.
SIMH does not generate an error, all is OK, as is on the real PDP-11 / RK05.
For now, I "solved" this by adding "if (error != RKER_NXC)", but that
will exclude all "non-existing cylinder" errors, not only the error that
is generated at the end of the FORMAT RK0:  command.

Is this incorrect behavior in SIMH, simulating the RK05?  I don't believe
that, so is the RKER_NXC handled in the RK.SYS driver or in RT11 in case of
the execution of the FORMAT command?

Thanks,
Henk
www.pdp-11.nl<http://www.pdp-11.nl>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.trailing-edge.com/pipermail/simh/attachments/20200211/7fef1b16/attachment.html>


More information about the Simh mailing list