<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
.MsoChpDefault
        {mso-style-type:export-only;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:70.85pt 70.85pt 70.85pt 70.85pt;}
div.WordSection1
        {page:WordSection1;}
--></style>
</head>
<body lang="NL" link="blue" vlink="#954F72">
<div class="WordSection1">
<p class="MsoNormal">I am building a replica RK05 disk drive with working switches and panel lamps.</p>
<p class="MsoNormal">This will be an add-on to the PiDP-11/70, giving the user even more the look</p>
<p class="MsoNormal">and feel of operating a PDP-11 system <span style="font-family:"Segoe UI Emoji",sans-serif">
😊</span>  The RK05 drive is constructed at the</p>
<p class="MsoNormal">same scale dimensions as Oscar's PiDP-11/70 and has a front door with lock</p>
<p class="MsoNormal">mechanism just like the real RK05. A real RK05 disk cartridge is 3D scanned</p>
<p class="MsoNormal">and will be (scaled) 3D printed. Inside that disk cartridge is a USB stick on</p>
<p class="MsoNormal">which 7 virtual RK05 "disk" container files can be stored. Jumper setting in</p>
<p class="MsoNormal">the cartridge selects which container file is actually "mounted" when the<br>
cartrdige is mounted in the drive.</p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">So far for the introduction <span style="font-family:"Segoe UI Emoji",sans-serif">
😊</span></p>
<p class="MsoNormal">To make this setup work I have made changes to scp.c, scp.h, pdp11_cpu.c,</p>
<p class="MsoNormal">pdp11_rk.c and the makefile, and added a few files (drive "behavior" and USB</p>
<p class="MsoNormal">stick handling).</p>
<p class="MsoNormal">All indicator lamps seem to behave as on the real RK05 drive ... however,</p>
<p class="MsoNormal">when I do .FORMAT RK0:  (I am using RT-11)  this command always ends with</p>
<p class="MsoNormal">turning on the FAULT indicator. I have added print statements to the original</p>
<p class="MsoNormal">SIMH distribution in pdp11_rk.c to show the problem (so no "rubbish of mine</p>
<p class="MsoNormal">interference").</p>
<p class="MsoNormal">This is what I see:</p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Courier New"">PDP-11 simulator V4.0-0 Current        git commit id: 0de9b628<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Courier New"">sim> set rl rl02<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Courier New"">sim> att rl0 rt-work.dsk<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Courier New"">RL0: 'rt-work.dsk' Contains RT11 partitions<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Courier New"">1 valid partition, Type: V05, Sectors On Disk: 10210<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Courier New"">sim> att rk0 rk.dsk<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Courier New"">RK: creating new file<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Courier New"">sim> boot rl0<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Courier New""><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Courier New"">RT-11FB  V5.03<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Courier New""><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Courier New"">.dir rk0:<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Courier New""><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Courier New"">?DIR-F-Invalid directory<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Courier New""><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Courier New"">.format rk0:<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Courier New"">RK0:/FORMAT-Are you sure? Y<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Courier New""><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Courier New"">            pdp11_rk.c :: in rk_go() cyl >= RK_NUMCY<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Courier New"">            pdp11_rk.c :: rk_set_done() called with error 64<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Courier New""><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Courier New"">?FORMAT-I-Formatting complete<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Courier New""><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Courier New"">.init rk0:<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Courier New"">RK0:/Initialzie; Are you sure? Y<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Courier New""><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Courier New"">.dir rk0:<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Courier New""><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Courier New""><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Courier New"">0 Files, 0 Blocks<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Courier New"">4762 Free blocks<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Courier New""><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Courier New"">.<o:p></o:p></span></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">As you can see from the printed debug statements, in the function rk_go()</p>
<p class="MsoNormal">the cylinder number goes higher than the maximum number of cylinders</p>
<p class="MsoNormal">possible on an RK05. Then, the function rk_set_done() is called with the</p>
<p class="MsoNormal">variable "error" holding RKER_NXC (64 decimal == 000100, octal == RKER_NXC)<br>
==> turns on the FAULT indicator.</p>
<p class="MsoNormal">SIMH does not generate an error, all is OK, as is on the real PDP-11 / RK05.</p>
<p class="MsoNormal">For now, I "solved" this by adding "if (error != RKER_NXC)", but that</p>
<p class="MsoNormal">will exclude all "non-existing cylinder" errors, not only the error that</p>
<p class="MsoNormal">is generated at the end of the FORMAT RK0:  command.</p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Is this incorrect behavior in SIMH, simulating the RK05?  I don't believe</p>
<p class="MsoNormal">that, so is the RKER_NXC handled in the RK.SYS driver or in RT11 in case of</p>
<p class="MsoNormal">the execution of the FORMAT command?</p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Thanks,</p>
<p class="MsoNormal">Henk</p>
<p class="MsoNormal"><a href="http://www.pdp-11.nl">www.pdp-11.nl</a> <o:p></o:p></p>
</div>
</body>
</html>