The CP/M filesystem continues to delight and terrify me.
The CP/M filesystem continues to delight and terrify me.
As I contemplate the CiderPress II implementation, two questions spring to mind:
(1) Did the CP/M v3.1 filesystem format extensions make it to the Apple II? Specifically, the "every 4th directory entry is actually a place to hold dates". I found "CPM3.1Z80_Softcard.zip" on asimov, but none of the disks seem to use this feature.
(2) Would it make sense to treat user numbers as directories? That seems like a natural way to handle them, but it does mean the tools would be referring to things as "0:FILE.TXT" instead of "FILE.TXT". I don't know
how other tools handle this, absent a "user" command to set the current state. Each disk gets 16 (or is it 31?) pre-defined directories that can hold files but can't be modified.
An alternative would be to make it an editable file attribute, and just let people struggle when more than one file has the same name. (Not an issue
in the GUI, problematic in the CLI.)
A better option would be to include it in the filename, but only when nonzero. So you have "FILE.TXT" and "1:FILE.TXT". Or maybe "1,FILE.TXT"
so it doesn't get confused as a directory name. Or "FILE.TXT,1".
(1) Did the CP/M v3.1 filesystem format extensions make it to the Apple II?Depends upon the vendor's implementation. CP/M-3.x timestamping was always an
optional feature that required initialization of the directory for those extra
entries and BIOS implementation to read/write them. A system that doesn't support them simply ignores the entries since they exist in an "impossible" user area.
Referring to user area locations with the N: prefix is quite standard in the enhanced CP/M world, e.g. Z-System. That's exactly how image manipulation utilities like cpmtools manage them. Only enhanced CP/M implementations support user areas > 15. Anything greater won't be damaged by file I/O, but simply won't be accessible by generic CP/M. Placing the CCP as 31:ccp.sys (lowercase) was commonplace among OEM implementations.
It would be helpful to provide a 'move' function to change user area for all extents of a given file or set of files.[...]
I would vote for always including the user prefix when listing a directory while inferring '0' when none is provided.
I'd strongly suggest taking a look at cpmtools for ideas and concepts about mapping between CP/M and current filesystems.
fadden wrote:
The CP/M filesystem continues to delight and terrify me.
If computer file systems had been designed by persons with secretarial experience, perhaps they'd be less brain-damaged.
Even now it's an arbitrary limitation against more than one file having the same file name in a directory, even when there are plenty of practical use cases for having multiple files with the same name in a directory with differing modification or creation dates.
Or... my favorite. Do you know what HFS allows? TRAILING WHITESPACE.
On 8/11/23 8:56 AM, D Finnigan wrote:
fadden wrote:
The CP/M filesystem continues to delight and terrify me.
If computer file systems had been designed by persons with secretarial
experience, perhaps they'd be less brain-damaged.
Even now it's an arbitrary limitation against more than one file having
the
same file name in a directory, even when there are plenty of practical
use
cases for having multiple files with the same name in a directory with
differing modification or creation dates.
Heh. What would happen is secretaries would have (root) directories
full of files that all have the same name but differ /only/ by the date.
Or... my favorite. Do you know what HFS allows? TRAILING WHITESPACE.
Do you know what's practically impossible to see? TRAILING WHITESPACE. Allowing arbitrary crap like spaces, backslashes, whitespace, or
whatever else the secretary barfed on the keyboard is great only if
there is a deterministic way to know a file by another (saner,
automatable, deterministic) handle. Lots of dedicated word processing systems did exactly that... you have a file with a slug and a date, and
you can barf all you want into the metadata section.
I found the 31:cp/m.sys and 31:cp/am.sys files on some of the disks from Asimov. They have allocation block numbers >= 128, on a disk that only has 128 blocks. For reasons I can't recall, CiderPress displays them and actually mods the block number, sothe file is readable.
What purpose does this entry serve? That wasn't clear to me.
A lot of what he have today is self-inflicted damage from choice of command-line user interface. The classic example being spaces in filenames when using a CLI with argument switches. The user interface could have been designed a lot differently.
On Sunday, August 13, 2023 at 9:23:15 AM UTC-7, fadden wrote:the file is readable.
I found the 31:cp/m.sys and 31:cp/am.sys files on some of the disks from Asimov. They have allocation block numbers >= 128, on a disk that only has 128 blocks. For reasons I can't recall, CiderPress displays them and actually mods the block number, so
What purpose does this entry serve? That wasn't clear to me.
I figured it out (data-only disk).
I figured it out (data-only disk).I'm guessing this was a Premium Softcard IIe "data" diskette?
On Sunday, August 13, 2023 at 7:06:52 PM UTC-7, Steven Hirsch wrote:
I figured it out (data-only disk).I'm guessing this was a Premium Softcard IIe "data" diskette?
CP/AM seems to follow the same approach. I'm going to assume that all
140KB disks wrap around, and use the directory contents to determine
whether or not the first 3 tracks are available.
The CiderPress II disk formatter takes a "make bootable" flag. For CP/M I think that'll mean whether or not to add the magic extent at the start of
the directory. I'm undecided on whether to output an OS image to make the disk actually bootable, the way I do for DOS 3.3, because every version of the OS is just a little different. Chapter 3 in the CP/AM manual explains how to put your choice of OS on a floppy disk or other device (four
different installers, "COPY /S" from an existing disk, etc.), so I don't think leaving the boot tracks blank will slow anybody down.
Seen in the boot block: "Update to Ver R5.1.1S by Steven Hirsch in 1986"
... anybody we know? :-)
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 488 |
Nodes: | 16 (2 / 14) |
Uptime: | 06:49:57 |
Calls: | 9,663 |
Calls today: | 5 |
Files: | 13,711 |
Messages: | 6,167,008 |
Posted today: | 2 |