On Fri, 13 Apr 2012, Jules Richardson wrote:
Is there any kind of sensible maximum limit for the
number of directory
entries that a CP/M disk may contain? Or did every vendor just do their own
thing (probably!) and it's preferable to just keep parsing from the start
of the directory area until either the end of the media is reached, or a
location identified as file data by a previous entry is encountered?
Do you have access to a working machine?
STAT DSK:
will display that information.
If not, then look for sectors that are NOT DIRectory.
And, related to that, if the directory area of a CP/M
disk spans multiple
tracks, was there a standard for whether it iterated head-first (in the
event of media with multiple heads) or cylinder-first? Or does code have to
cope with both possibilities?
Yes, there were standards.
Standard 1: iterate head first, each side is a track (slightly faster)
Standard 2: iterate head first, but count both sides as one track (only
obviously different from #1 for some sequences of sectors)
Standard 3: iterate cylinder first, When you reach the last cylinder,
continue with the first cylinder on the second side
Standard 4: iterate cylinder first, When you reach the last cylinder,
continue with the first data cylinder on the second side (see "reserved
tracks")
Standard 5: iterate cylinder first, When you reach the last cylinder,
continue with the last cylinder on the second side, and count down
(saves a seek to 0 over #3 or #4) (Note that "last" may not match
physical last of the disk (see HP), just as "last sector" on a track may
not match the number that were formatted on the track)
Each person could have their own unique standard.
And then, there were a few "Non-standard" ones.
I'm just pulling some data off some QX-10 floppies
"Valdocs"?
(none of which seem to
take up more than a track for the directory area), but it seems like a good
idea to make it as generic as possible.
If you are dealing with multiple different formats (and QX-10 had
several), number-of-blocks of DIRectory is one of your variables.
Are you planning to make your code general for formats besides Epson QX10?
"Side Pattern" (see above "standards") and "sector sequence
within
track" are some that can NOT be determined from STAT DSK: display.
--
Grumpy Ol' Fred cisin at
xenosoft.com