On 2020-02-11 23:25, Paul Koning wrote:


On Feb 11, 2020, at 3:15 PM, Henk Gooijen <henk.gooi...@hotmail.com> wrote:

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.

Neat.

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?

I only have some V2 sources.  The zero directory operation, which I think is what 
"format" uses, just grabs the device size and writes an empty directory.  So 
I'm puzzled by the reference to an invalid sector.

I would expect the INIT to write the empty directory. I would expect FORMAT to actually format the disk pack, meaning writing the sector header for each sector on the whole packet. A little surprised, though, that the formatting wouldn't know how many tracks there are, and continue until it hits an error.

The driver calls that a hard error (no retrying).

But why would you turn on the FAULT light on your RK05 for that?  Fault, on the 
RK05, means servo failure, in particular it means the servo grid light bulb has 
burned out.  References to invalid disk addresses don't light FAULT in an RK05. 
 The Peripherals handbook describes it as (a) that light bulb failed, or (b) 
write current is present without a write command, meaning your disk probably 
has been wiped by an electronic failure.

Sounds like simh does it wrong, then.

  Johnny

--
Johnny Billquist                  || "I'm on a bus
                                  ||  on a psychedelic trip
email: b...@softjar.se             ||  Reading murder books
pdp is alive!                     ||  tryin' to stay hip" - B. Idol
_______________________________________________
Simh mailing list
Simh@trailing-edge.com
http://mailman.trailing-edge.com/mailman/listinfo/simh

Reply via email to