Drive assignment during CPM Boot #466
Replies: 14 comments 10 replies
-
Hi @kiwisincebirth, You have hit upon yet another area of RomWBW that I am also very dissatisfied with. The automatic drive assignment logic was created over time as RomWBW features increased. As a result, it is not really the result of a well thought out design process. So, this is a topic very worth of discussion. As you say, it seems like the process could be made much simpler. The big caveat here is that the current automatic drive assignment logic is very impactful to all users. Any changes to the logic will cause confusion. I am very willing to discuss this, but if any changes are made, I am going to want to go through a pretty complete process of soliciting feedback from the user community. If this is changed, I never want to change it again! 🙂 Your proposed assignment process is simpler (and therefore easier to explain). The original reason that I included all of the hard drives in the auto assignment was because people don't read the manual and I was getting a lot of questions like "where is my new drive?". Experienced users of RomWBW know that they just need to use Before trying to decide if your proposal is better than the current auto assignment, let me ask another question that I consider much more important. The current and proposed auto assignment will map some number of slices to drive letters starting from the first slice of the disk (aside from the boot slice). This has never actually made sense to me because that means you are normally mapping a bunch of drive letters that contain files tailored to different OSes than the one you are booting. Why would you want that? This seems soemwhere between useless and dangerous. I think you would want the boot drive of the OS to be A:, then some set of application/data drives, not other OS drives. I know I am opening a can of worms here, but if the auto drive assignment process is going to change, I want to make sure it is rock solid for the future. Eager to hear your thoughts. And the thoughts of any others! Thanks, Wayne |
Beta Was this translation helpful? Give feedback.
-
Fair Question: And one I addressed fairly early on, probably why raised this discussion. Fairly shortly after installing the combo image I saw the gap (you describe) in auto assignment. Main part of writing the CopySl.com application was to be able to just move slices at will. Once written I moved to a scheme like this.
And since I now have all drive letters assigned And I have now moved to the following scheme
So regardless of which OS I boot from the drive letters are always mapped to the same slices 0->D: thru to 12->P: and the boot frive is always A: I have been strategic about the order so drive letters can have symbolic meaning (since letters wont change)
As for your other points, yes need to ensure a seem-less experience for new and existing users. Ideally this could be easily configured, but Don't see an easy way to configure this. NVRam ? Mark PS. I did think of another advantage of my proposed approach (compared to using ASSIGN command) if you boot a media card in a different device then any scripted ASSIGN commands may be incorrect. Currently ASSIGN works to explicit devices
This could be overcome with a new ASSIGN command option, and would be a reasonable improvement in its own right
|
Beta Was this translation helpful? Give feedback.
-
I had another idea after investigating CBIOS (havent investigated boot.z80). CBIOS as well as doing initial drive assignment also sets up the (1) remove the extended drive assignment from CBIOS, it just does the necessary basics, ie. boot drive floppy, but NOT any extended 8 drive HD assignment (2) the extended logic for HDD assignment is moved into ASSIGN.com, but is parameter driven, e.g (2a) ASSIGN.com could also have other algorithms, i.e. the one I defined in first post e.g. (3) For existing user's (which have defined a (4) For newer users (which haven't created In summary : I guess the point is
Mark. |
Beta Was this translation helpful? Give feedback.
-
Hi @kiwisincebirth, These are some interesting ideas. Currently, power is out at my house and I am operating on cell phone (painful). May need a day or two to respond. Thanks, Wayne |
Beta Was this translation helpful? Give feedback.
-
Hi @kiwisincebirth, Had a little time to think about this while waiting for my power to be restored. I generally like the concept of simplifying the CBIOS drive mapping to a minimum and moving more of the work into ASSIGN. I agree that this positions CBIOS for a long-term solution. ASSIGN can be enhanced over time without impacting the OS code at all.
To clarify, I think this would just mean assign one CP/M drive to each disk device. For a hard disk, it would map the first slice unless the device was used to boot in which case it would map the selected slice.
Sounds good.
Right. Generally easy to extend ASSIGN.COM (compared to CBIOS). I am fine with ASSIGN just replacing assignments if run a second time.
Right.
If PROFILE.SUB is not run for any reason, the user would still get the basic 1 device / 1 drive mapping which may not be a big problem. I'm not sure we need to worry about a failsafe like this. It would only happen if the user messed up the disk image as distributed.
Couple of final thoughts:
Thanks, Wayne |
Beta Was this translation helpful? Give feedback.
-
I was thinking just assigning in CBIOS the boot drive (A:) as it is obviously required and any Non-High Capacity media (including floppy disks). this my examples from OP, CBIOS would assign the following. (and nothing else)
assigning first slice of HDD's would result these additional assignments
which don't align to either to Original (current) or my newer assignment strategy, D,E,F assignments are already unsuitable. Both strategies would would probably require, D:, E: and F: to latter be remapped (in assign.com).
This does add some complexity, since have to iterate and work out from what point the replacement should start. Effectively easiest way would be to replace everything starting at D: upwards based on the strategy defined in the assign command. Which in practice means replacements starts at the first high capacity drive (excluding A: of course). Can it just be this simple. Question: I am not sure about disk Unit ordering. Where do floppy disks appear in the list of Device Disk Units, does this create a problem if follow the above The point is if CBIOS doesn't assign HDD's then assign doesn't need to deal with replacement, unless a simple rule (above) can be applied. |
Beta Was this translation helpful? Give feedback.
-
OK, yes, I agree that mapping a slice from all of the available hard disk devices may not be useful. My reason for continuing to consider it are:
I accept that both of the above are not terribly good reasons for mapping CP/M drive letters to non-boot hard disk devices. Additionally, intelligent use of
My thought was that the auto mapping algorithms would leave A: alone, toss out all other mappings, then map everything according to the selected algorithm just like at boot. This would mean including the ROM/RAM and removable media devices such as floppy drives.
The inherent order of all disk devices is baked into the HBIOS. As the HBIOS iterates through each available driver, if a device is responsive, it is added to the device list. The order of the driver iteration is generally: 1) RAM/ROM disks, 2) Floppy Drives, 3) Hard Disk Drives. Changing the order of the driver iterations would require reordering the device initialization table. Not hard, but still a custom ROM build. Thanks, Wayne |
Beta Was this translation helpful? Give feedback.
-
I can live with this, and can see some advantages, just different to my initial thoughts 👍 In summary CBIOS will just map a single Slice regardless of the media type, following the existing conventions of, removable media, and boot drive with no duplication. It also means since I am free to replace drives other than A:, I can work on Assign.COM in isolation.
I have noticed when you boot an os from ROM (not disk) it seems to only assign A: and B:. What is the mechanism for this. Looking in CBIOS.asm I dont see how this happens, what am i missing ? |
Beta Was this translation helpful? Give feedback.
-
an update on assign.com - I am trying to keep it flexible.
a real example
basically in above it just process each letting in the /B option one at a time assigning starting at B:. One limitation is once you assign HDD's you cant really place anything after it, because it is likely to consume all remaining letters ie. |
Beta Was this translation helpful? Give feedback.
-
So these are the options I have got working this far
examples
|
Beta Was this translation helpful? Give feedback.
-
Looks like excellent progress. Congrats. -Wayne |
Beta Was this translation helpful? Give feedback.
-
I have provided a PR, which should be safe to merge, even if not perfect it doesn't impact existing users, and the existing code has not been altered (there was one code cleanup).
Also
|
Beta Was this translation helpful? Give feedback.
-
See PR #479 - Which shows the change. Three code impacts that I found (including assign.asm) - I think you can see how the masking is easier since ROM %0100 and FLASH %0110 are closer. turns out RAM %0101 and RAM-FLOP %0111 are also closer if detecting a RAM memory device (including RF) is ever needed. |
Beta Was this translation helpful? Give feedback.
-
@wwarthen - Added PR #481 for documentation ONE THING : Not sure but my algorithms don't consider available available RAM, they will just assign all drives (if given the chance). Thus when I assign all drives ZSDOS I get |
Beta Was this translation helpful? Give feedback.
-
The drive assignment performed during boot of a CPM operating system is complex, but in summary it tries to evenly split across all floppy, and hard drive media
Background :
I have a SC126 with 4 disk devices (2x SD Card, and 2x CF Card). I typically have 3 of these populated
After I boot, only 3 drives are typically useful (A,D,E), I have to remap F onwards
If I remove all but the primary drive, i get a very different mapping.
Idea :
Change the drive assignment to favour the boot hard drive, and to ignore other Hard drives. Thus after boot from the primary drive.
Note
Impact :
Code in cbios.asm and boot.z80, but it is not a big change. Unfortunately it appears that it cannot be conditionally configured based on Platform configuration.
Beta Was this translation helpful? Give feedback.
All reactions