-
Notifications
You must be signed in to change notification settings - Fork 93
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PDP11: RP11-C (RP02/03) disk implementation #244
Conversation
I haven't looked at everything closely yet, but so far I have four comments:
|
Anthony, |
|
What is stored in the repo is NOT a consequence of the client or all of the source code in the simh codebase would look like it has LF line endings. There is only one source file in the whole project that has LF line endings, As I pointed out this is pdp11_rr.c. The simh standard for some 20 years has been that source code has CRLF line endings. This goes back to at least the simh 2.x timeframe and way before I had anything to do with managing anything to do with the project.
All of the commits that add a particular feature to the repo should be squashed. What you may have done along the way during your development process can be anything you want, but the interesting contribution of the PR is the totality of the polished results (after accommodating input like this).
Nice.
It is indeed a standard C, but that is not the point. Laugh all you want, but please change these to ASSURE or provide precise detailed measurements that the use of assert provides a distinct performance gain. Additionally, I pointed out that the various things you were validating with assert were data values provided from what ever is running within the simulator. You only have control of the data you happen to be using during your personal debugging. If it is ever important to validate values such as these it is more important to always do it since you don't otherwise have control of the source of the input data that is being validated.
At least one of the commits that should be squashed also had PR in its subject. Squashing should fix this.
Fantastic. |
If you look closely, all of the source files you have checked out absolutely have LF in them. Except for the one you created with bare LF in it, the rest all have CRLF in them. LF is a proper subset of CRLF. |
BTW, commit squashing is a function of simh-repo -- you can absolutely squash all my commits in this PR into a single commit for open-simh... I don't have to redo the whole thing for this only reason. But all in all, the amount of nitpicking in this thread is becoming increasingly annoying. I am coding in C for my entire professional life, for a very sizeable company with a large team of developers, so the resistance I am facing on here makes me re-think my any future efforts, TBH. That including the line endings. Even MSVC is totally groking the bare LFs for at least a decade now (MS$ finally realized that just as well), so what's the deal with simh? |
It is an option which the person doing the merge may or may not remember to do. This PR certainly is a candidate for the requester (you) to do since it has already been mentioned multiple times and the list of details I enumerated was specifically requested of you.
This sounds like you're thinking this is a ridiculously manual process. The ability to squash a set of commits is innately part of git. You squash it locally and then do a forced push to your github repo into the branch you've already been working in (rp11), and that's it. A little Googling will help you learn the details. |
By the way, since you're adding a new file to the PDP11 build, you should update the descrip.mms file as well. |
Duh, what a timely reminder! From the quick glance, however, I see that |
I think the multiple libraries relates to a line length limitation... |
which is ... ? I don't have any such system to build simh on to check that. So either you add the file to one of the libraries, or please let me know where should it go to... Besides, |
While technically it's a good idea for descrip.mms to be kept up, it doesn't work right now anyway so I suggest ignoring that. Let's get it fixed as a separate effort. |
Before deeply considering the squash subject, don't forget the assert subject. Getting back to the detail of that, since you are using assert to validate some of the data you get directly from within the running simulator, please explain why it is a good idea for someone running a simulator compiled with or without debug will get different data dependent results. |
If you were following this PR, I already did the squashing, which included the line endings converted to CRLFs, and all other "suggestions" that I received (even though changing However, I am not going to change |
Ok, I see the squash, thanks. |
@pkoning2 there is no "coding style" in I use
so it documents that, in this particular case, the drive parameters ( Or this one:
Guards the subtraction to prevent an overflow. Again, it's only necessary in debugging (verifying your math, basically, but once that checks out -- it again becomes a comment). GCC's |
Besides declaring that assert() is a C standard, you haven't explained why ASSURE wouldn't equally serve your purpose. |
You haven't been reading carefully, because yes I did. |
Can I ask what is exactly the problem with this PR getting merged in? It's been sitting here for almost 3 months now. |
I'll check. I thought there were open questions. |
@pkoning2 did you find anything? From my end, Bob Supnik, in a private conversation over email, only stated:
So I am not sure what's holding this up... Please re-state your suggestions, if any left. This PR has been in limbo for unreasonably long now. TY |
I just did a test build and tried to run RSTS/E. It doesn't work, because RSTS/E expects an RP11-C, with the extra 4 unused registers preceding the first real one. So the base address has to be (by default) 17776700. I looked at the code to see how to do that but the answer wasn't immediately obvious. |
I tested it with DOS extensively and it all worked without a hitch. For RSTS/E you don't need to change anything -- the fact that the actual base is at 17776710 by default means that 17776700 should be given to RSTS/E, as the base for the range for RP11C. RSTS/E wants 16-word-aligned ranges (and this device only has 12 words). They want the "aligned" range. For that RSX was doing better as they only wanted to know where the CSR was (and it's at 17776714). To remove the conflict with RHA, you just disable it (by disabling the RP device that it auto-configures for), or move it to some other address. Or you can move RP11C to some other address, alternatively. That is only if you want to have both the Massbus disk and RP11C together in the same config.
|
Yes, I can move RHA to another address, but it doesn't want to be disabled: |
Thanks for the feedback, I have adjusted the controller code for RP11C to actually respond on the address range beginning 17776700 (by default) instead of x710. (I guess neither DOS nor RSX cared as long as CSR was properly responding to bus accesses.) Now I also checked with RSTS/E V6C that I could find. You mentioned V6B -- where can I get it to try that too please?
In the above I specifically changed the type of DP1: to RP02 (with
Which was correct as well.
I just disabled the "RP" device. Note that if your configuration is using the first Massbus controller (which is reserved for disks, IIRC), or use any other Massbus controller (RHB, RHC), then RHA will remain enabled (and there's no way to disable it). This is "auto" configuration, which is rather weird (in the sense that RHA remains enabled just because RHB is in use, and conversely, RHB remains enabled even if unused, but RHC is in use).
|
Great! |
Exactly, the second Massbus controller is for the tapes.
Well, there's no way to manipulate the Massbus controllers (other than changing their I/O assignments): they are enabled and disabled by the simulator automatically depending on the actual devices that they are associated with (and higher controllers require the lower controllers to remain active in the hardware configuration even if they are not actually used for any devices themselves)... I don't think (TBH) there's an easy way to change that simulator behavior, as it's coded very deep down the Massbus logic -- that's from what I understood going through the code, as obviously RHA was in the way for RP11-C...
Yeah, I was asking because I don't think V6B survived at all (from what I read online) -- so your mentioning it sounded intriguing :-) I have V10 too but I am not exactly sure if it was sysgenned to use RP11... |
We've had some discussion about the RH setup. To match what the hardware does, there should be up to four RH controllers, each one with a configurable set of devices on it. While there are conventions that two are for RP/RM, one is for RS, and one is for TU, the hardware doesn't require that and some OS are more flexible as well. (RSTS isn't, though, other than that it can cope with multiple TU formatters.) In any case, even with the current restrictive setup, the fact that RHA can be disabled only if RHB is disabled is obviously wrong. Oh well, I can work around that. |
Found another issue: as coded, if the unit is RP02 but not attached, RSTS doesn't see it. The reason is that setting the other status flags (locked, seeking, ready) is dependent on it being attached. It should not be; those status bits are valid even if there is no pack in the drive. I changed my test copy to remove the { } after the test for UNIT_ATT and with that RSTS recognizes both RP03 and RP02. |
I'm sorry but I'm not sure what you are saying. I showed you earlier in this thread that RSTS/E correctly detects RP02's (no attachment to a file was necessary).
The type bit is always valid (unless the device is disabled); other bits are dependent on whether the unit is actually ready.
Again, I'm not sure what your change was, and why was it necessary. RSTS/E HA LIST works like this: Table 3.8 (page 3-25) in http://www.bitsavers.org/pdf/dec/pdp11/rsts_e/V06/AA-2669D-TC_V6Csysgen_Jul78.pdf |
I checked in all the changes, please apply them all "squashed" -- I wasn't able to properly do it myself (if you know how to, please let me know), because the repo went ahead too far since I opened this PR. |
In V10.1, it lists RP11 disks this way:
That's with the change I mentioned. With your code, unit 1 (RP02) is not shown, matching the text you quoted. But the issue is that it isn't shown because RSTS treats it as nonexistent, so subsequent attempts to use it fail. This happens because as written I get RPDS == 0 and that is handled as "no drive here". Any non-zero value is ok, then the RP03 bit distinguishes the types. With the change I mentioned the Ready bit is set. Separate issue: I see this:
but I can boot it just fine from within RSTS, so it isn't the execution of the code in the boot block that is at issue. |
The
Indeed it is not, because the boot command is a-la ROM. Software boot (which you are referring to) is different.
That's weird because when the disk pack is not installed, RPDS == 0 is exactly what it should read (if it's RP02) -- according to the documentation. The "ready" bit means the drive is ready for the command, and which is not the case when there's no pack -- so it def cannot be RDY (aka SU RDY). Maybe it can be ONLN (aka SU OL) in this case because the manual reads "the selected drive ENABLE/DISABLE switch is set to ENABLE". I'll try to address that... |
I see your point about "ready" that it should not be set without an attach ("pack loaded"). But "online" should indeed be set. We don't really have the equivalent of the RP "disable" switch, but the closest would be the enable/disable commands. So an enabled unit should appear "online". The maintenance manual says that "disable" is basically a quick way to get the equivalent of the drive cabling being removed, so for a disabled drive to appear nonexistent makes sense. Hm, I wonder if an disabled drive will still provide the RP03 signal. The maintenance manual isn't clear (in the bits I have read); perhaps the schematics would say. |
@pkoning2 : I just pushed an update that should address the PR02 type disks, which are not attached, as discussed previously; Although, I do not have a system RP02/03 disk so I was using an RSTS/E data disk that printed this message for me:
which basically proves the concept for me that the bootstrap is getting loaded properly (I also checked with different unit numbers and different bus address, and it worked in all those cases). Please let me know if you are able to boot the actual system (RSTS/E, I presume). P.S. BTW I checked the schematics for RP11-C / RP02 / RP03.... From what I could see (and I am not that keen in reading schematics, TBH), since RP02 and RP03 are actually two different drives, a powered-on RP03 would still post the RP03 bit on in the controller, even if the drive switch in the DISABLED position. RP02 won't post that bit, regardless. Since you mentioned that a non-zero RPDS value was all that was required for RSTS/E v10 to "decide" whether a drive was present or not, that logic is not exactly correct, as it would detect RP03 as always present (since they post the type bit) -- irrespective of their actual ONLN bit; yet it wouldn't detect RP02s as present if they were in DISABLED (as RDPS would be 0 for them, in that case). So I left the logic in place that in simh a drive posts the type bit only if it's enabled (which means that the ONLN bit is also set) -- this way, the detection by the OS would be more consistent, IMO. |
Looks good. I don't have a RSTS/E monitor built with RP support included, but I can boot INIT on both an RP03 and RP02, and it sees the device types correctly , and handles disabled units as you intended. |
BTW, I was able to sysgen RSTS/E V6C for RP03 and it boots and works. While I was playing with it, I noticed the following:
Namely, the Obviously they are not at all the RP11-related stuff (which RSTS/E calls as an Should |
In RSTS, RP11 disks are called "DP". And it uses "DB" and "DR" for the RP/RM series disks. Two names because it supports two Massbus controllers for those; originally, you had to have either RP or RM disks on a given Massbus but not a mix. In late releases that restriction was removed, but there were still two names and two separate (identical) device drivers, just as a hack to handle the two controller addresses. The "DR" code was used because it was available; DM was not because that was chosen earlier to refer to the RK06/07 disks. |
What repo are you looking at? I'm looking at the PR, which is in the SIMH repo. You may not have the latest opensimh/simh "master" branch in your fork, and if so you might indeed see different status. |
I understand why they were disabled, I was just pointing out a potential naming confusion. Since there are many more already, I am closing this question after seeing that.
Bob explained that it was "next gen" RK, and this HK abbreviation was used in Unix, so it came from there -- it wasn't random.
Yeah, that is what it boils down to -- there are too many devices and only a handful of abbreviations |
I updated my branch to be up to speed with opensimh (a few days ago). And this is what it shows for me right now: The green message shows on my PR -- which is in the opensimh repo -- and that's where the merge is going to be go. This is the URL: And the all-green is given under this very input box that I'm typing in right now. |
I don't know why github is giving me this error message. I can merge it just fine in the command line interface. |
Ok, done, but I got a warning message explaining the issue. |
Thanks for merging and closing! If you get a chance, please take a look at #297 -- it's a single-line patch that was long ago confirmed / approved by Bob |
Will do. Github does a bunch of things wrong, but it's close enough to be tolerable. On the merge, the issue is the way updates from the source repository are applied to a fork; this is done by a merge and that's what is wrong. It is clearly possible to avoid that by doing a rebase, but I don't know if the Github UI has a way to ask for that. It can clearly be done in a shell, I'll see about documenting that. |
Re-do of PR#127...