Teaching granny to suck eggs:
STAT DSK: on a running CP/M machine gives some information, including the
number of reserve tracks, and the records per block, which is useful when
parsing the DIRectory entries. The "sectors per track" is actually 128
byte records, not the physical sectors. Although if it has an odd number
of physical sectors per track, that could help.
On Mon, 9 Dec 2024, Tony Duell via cctalk wrote:
Unofortunately that doesn't go far enough. It
doesn't give the number
of sectors/track or their size (I think it's 16 sectors, each of 256
bytes)
For bytes per sector, and sectors per track, write some trivial code.
Or, on the PC, you could use the 765 "read ID" command.
or, on a machine with WD controller, try a track read.
OR write some trivial code with Int1Eh and Int13h to read a 256 byte
sector. (NOT one of the ones in the reserve tracks; those sometimes have
a different format)
It also doesn't give the 'skew. Under CP/M the
sectors may not be used
in numerical order, maybe it uses every third one until all are used
then goes on to the next track. This is something that is very hard to
determine by lookng at the disk but is obviously essential to know to
make use of the diak image.
Statements found on the web can be misleading, or even wrong. I have seen
"skew of 3" used to mean every third sector, skip three sectors between
one and the next, or that the track is broken into three passes.
If you have the WD "track read", you can look at it, looking for text,
source code, or other recognizable content that extends past the end of a
sector, and look for which sector it continues in.
Otherwise, you need to write, or find, a sector editor that can be patched
for different sector sizes. For example, I patched Roxton Baaker's
"TRAKCESS" on the TRS80. And the first function that I
implemented/completed in the never completed XenoXap was displaying
sectors of various sizes.
I kept adding extravagant new functions, and never finished more than I
needed at the time of the functions (cf Randy Cook's "TRS-DOS" and
"VTOS")
Use sectors past the reserved tracks, as some formats have a different
format on the reservec tracks.
Then you can look for the "half a worm", to try to find what sequence the
sectors are.
Watch out for any "deleted files" whose content is still on the disk.
They could work, or they could tend to be misleading. ("Which of these two
almost identical sectors is the real next one, and which is residual
content from previous edits")
Disks that have been used in one format, and then re-formatted in
another format can be misleading. (a disk with 256 byte sectors on the
first side and 512 byte sectors on the second side, is probably a re-used
disk)
Text, even the messages in a program, and/or source code work well.
If you really know your machine language, you can look for the first
byte(s) of a multi-byte instruction. I never got skilled at that.
For double sided disks, ANOTHER issue that will require looking at some
sectors is how the disk handles using the second side. You will need a
disk that is over half full. Over half full, but not completely full is
by far the easiest.
Some formats fill the first side, and then start at track 0 of the second
side going up.
Some formats fill the first side, and then start after the reserve
tracks of the second side, and go up.
Some formats fill the first side, and then start at track 79, 39, or 34 of
the second side going down.
Some formats fill the first track of the first side, and then have a track
on the second side.
Some formats treat both track of each cylinder as if it were one large
track. Skew can bridge both sides of the cylinder.
Some formats will come up with even weirder approaches.
--
Grumpy Ol' Fred cisin(a)xenosoft.com