[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: DSK format specification
In comp.sys.apple2 Paul Schlyter <pausch@saaf.se> wrote:
>> CiderPress looks for DOS, ProDOS, Pascal, CP/M, and RDOS filesystems in
>> "DOS", "ProDOS", and "physical" sector ordering every time you open a
>> disk image.
> Then how do you determine the sector interleaving on a blank Apple CP/M
> disk images (no files ever written to the disk, no CP/M system on the
> system tracks)? Such a disk will have all bytes in each and every
> sector set to hex E5. Perhaps in such a case you just assume DOS 3
> sector order, since that's what works best with those Apple II emulators
> which also emulates a Z80 ?
I scan the volume directory and look for weirdness. If the disk were
completely empty there'd be nothing to scan and I'd get the wrong answer,
but since CP treats CP/M as read-only it's not like you'll miss out on
anything. :-)
I would have preferred to examine blocks in the boot area (the first 3
tracks), but it looks like AE and Microsoft had different implementations.
The saving grace with CP/M is that it does allocations in 1K blocks,
it appears to start allocating from the front, and it doesn't fill the
entire "catalog track". This means that the first file you create will
have data on the catalog track itself. So if you load the entire catalog
into memory, scan it, and find anything other than valid entries and 0xe5
values, you know you have the order wrong. (If the files stored in the
catalog track happen to be filled with 0xe5 or look like valid catalog
entries, then you're in trouble. In that case, having the correct label
on the disk image is essential, or you're going to have to use "query
image format" to override the automatic detection.)
Overall the CP/M code in CiderPress is the weakest of the filesystems,
since nobody ever wrote a "Beneath Apple CP/M". (Oddly enough, there is
the equivalent of a "Beneath SSI RDOS".) There are some bit fields in
the catalog entries that I still don't understand. Fortunately I was
able to find some large text files and compare the output on an Apple II
to the output from CP to verify that all was well.
--
Send mail to fadden@fadden.com (Andy McFadden) - http://www.fadden.com/
CD-Recordable FAQ - http://www.cdrfaq.org/
CiderPress Apple II archive utility for Windows - http://www.faddensoft.com/
Fight Internet Spam - http://spam.abuse.net/spam/ & http://spamcop.net/