[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Identifying standard disks ...



In article <3B4F6A56.B0FFC95F@ligo.caltech.edu>,
Edward Maros  <emaros@ligo.caltech.edu> wrote:
 
> I would like to write a small program to identify the disk type. The
> types that I would be interested in are: DOS 3.3, ProDOS, and CP/M
> disks. What I need are patterns on these disks that uniquely identify
> them.
 
For DOS 3.3 disks I would examine the VTOC at track $11 sector 0, and
also follow the catalog chain from there -- if it's intact the disk
is most likely a DOS 3.3 disk.
 
The same method could be used for ProDOS disks: see if its directory
appears to be intact.
 
For CP/M it's somewhat more difficult since it's directory isn't
marked as such on the disk -- it's assumed by CP/M to reside at a
particular place (or, more correctly, you tell CP/M where it is by
setting up an appropriate Disk Parameter Table).  There I would
instead examine the system tracks (the first 3 tracks on the disk)
and look for empty sectors, which on CP/M are filled with $E5.  If
such a sector can be found there, it's most likely a CP/M disk.
 
Finally you'll have to look out for dual-OS-disks: some Apple II
disks can be half ProDOS half DOS 3.3.  This is possible because the
ProDOS directory resides near the beginning of the disk, while the
DOS 3.3 directory resides near the middle of the disk.  Thus the
first half of the disk could hold ProDOS files, while the second half
of the disk could hold DOS 3.3 files.  The montly disks delivered
with Bob S-C's newsletter "Apple Assembly Line" back in the 1980'ies
were just like that: DOS 3.3 and ProDOS on the same disk.  Thus, if
your program determines the disk is a DOS 3.3 disk - don't stop
there, go on and check if it's also a ProDOS disk!
 
-- 
----------------------------------------------------------------
Paul Schlyter,  Swedish Amateur Astronomer's Society (SAAF)
Grev Turegatan 40,  S-114 38 Stockholm,  SWEDEN
e-mail:  pausch at saaf dot se   or    paul.schlyter at ausys dot se
WWW:     http://hotel04.ausys.se/pausch    http://welcome.to/pausch