[net.micro.trs-80] TRSDOS disk format

ddl@harvard.ARPA (Dan Lanciani) (08/27/85)

	Can someone please tell me why TRSDOS (at least on a Mod. III)
insists on setting the DAM (Data Address Mark) to deleted data on all
sector writes except the directory (=track 17 which is written correctly)?
I spent many hours tracking down the (self-modifyong) code that does this
while attempting to transfer data to another computer (which will not
read deleted data...) and I'm really curious.

						Dan Lanciani
						ddl@harvard

mjg@ecsvax.UUCP (Michael Gingell) (08/28/85)

> 
> 	Can someone please tell me why TRSDOS (at least on a Mod. III)
> insists on setting the DAM (Data Address Mark) to deleted data on all
> sector writes except the directory (=track 17 which is written correctly)?
> I spent many hours tracking down the (self-modifyong) code that does this
> while attempting to transfer data to another computer (which will not
> read deleted data...) and I'm really curious.
> 
> 						Dan Lanciani
> 						ddl@harvard


It appears to go back to TRSDOS on the original Model I and to apply
to just about all the TRS80 DOSs. All sectors of all tracks use the
data mark FB except for the directory track which uses an F8. SInce
the directory does not occur on the same track for different DOSs
and for 35 vs 40 vs 80 track and single sided vs double sided it
gives some measure of security of the directory which is the single
most important piece of information on the disk. And since the
TRS80 uses a Western Digital FDC rather than that well known
pain in the neck from Intel/NEC it is easy to read and write to
different data marks so why not?

If you want to transfer files from TRS80 disks to PC or CP/M disks
there is a well known product for doing this already. Just read the
pages of 80 Micro.

Mike Gingell  ..decvax!mcnc!ecsvax!mjg

ddl@harvard.ARPA (Dan Lanciani) (08/31/85)

> It appears to go back to TRSDOS on the original Model I and to apply
> to just about all the TRS80 DOSs. All sectors of all tracks use the
> data mark FB except for the directory track which uses an F8. SInce
> the directory does not occur on the same track for different DOSs
> and for 35 vs 40 vs 80 track and single sided vs double sided it
> gives some measure of security of the directory which is the single
> most important piece of information on the disk. And since the
> TRS80 uses a Western Digital FDC rather than that well known
> pain in the neck from Intel/NEC it is easy to read and write to
> different data marks so why not?
> 
> If you want to transfer files from TRS80 disks to PC or CP/M disks
> there is a well known product for doing this already. Just read the
> pages of 80 Micro.
> 
> Mike Gingell  ..decvax!mcnc!ecsvax!mjg

	Yes, indeed, and FB is the deleted data DAM that I mentioned.
This is fully described in the documentation for my computer (not to
be confused with the trs-80 or the pc I mentioned before) which also
uses the WD FDC.  But this doesn't answer the question:  Note the
following:

1.  TRSDOS does not check the sector type when reading data.  (The WD FDC
	simply shows a status bit to indicated deleted data as opposed to
	requiring a different command to read it.)

2.  TRSDOS cannot check the sector type when writing unless it does
	a pre-read on every sector.

3.  All disks are formatted with normal DAM's, making any un-written sector
	look the same as a directory sector, at least as far as DAM's go.

	This all makes directory security fairly dubious.  And the fact
that it is easy to write (two) different DAM's doesn't seem to be a very
good reason to do so, even for Tandy...  By the way, the "well known
pain in the neck" can also read/write deleted DAM's, it just takes more
work.  So, can someone tell me what TRSDOS actually does with the
deleted DAM's (aside from writing them) and why?

	I also examined one popular multi-disk reading program for the
PC.  Aside from the high price, and the fact that I've done these things
myself too many times to want to spend any money on them (not to mention
the *fun*), I was amused to find that the program required you to obtain
a modified TRSDOS disk from the manufacturer.  This disk was to be used
to BACKUP any disk you wanted to copy so that the PC could read it.  I
wonder which two bytes they zeroed? :)