On Wed, 16 Oct 2002, Fred Cisin (XenoSoft) wrote:
> It has
some good information, some errors, and some good and bad guesses
> (such as saying that it is probably possible to read hard sectored disks
> with PC hardware)
On Wed, 16 Oct 2002, Patrick Finnegan wrote:
If you're refering to 'fixed format
devices', they seem to be referring to
OS device nodes - such as "/dev/fd0h360", not physical (hard-sectored)
devices/disks.
NO. For example,
In "Interesting Formats", (as quoted in the next paragraph) they seem to
be implying that the original PC diskettes are FM (not MFM), which is
FALSE.
Then they list "CP/M, Apple II, TRS-80, etc."
Then they explicitly mention hard sectored, with the wrong guess that they
would be readable on standard FDCs.
Then they say that the 160K/180K formats were double sided; which is
WRONG.
Ahh, I must have skipped over that part of it. You and I know that
they're wrong, that's good enough, right? Maybe if I get some free time
I'll submit a list of problems to the creator of that doc.
There are numerous such errors on that page, although
overall the content
is good.
I was only paying attention to the parts that showed how to use the
commands, I wasn't really paying attention to it in that much detail, I
guess.
To me, it
looks like the hardest part will be attempting to determine what
format the disk is in, automatically. Any ideas? My best guess is to do
a guess-and-check method, of course this would be tough to verify every
possibility, such as varied sector sizes (although it would be possible).
I'm guessing that I'll have to use a raw floppy ioctl to make that work.
Fully automatic determination is NOT possible. But you CAN eliminate most
other possibilities, and reduce it to something that can probably handle
all of the different formats that you have. SOME parameters, such as
Granted. I was just speaking of the type of 'automatic determination'
that Teledisk does - my primary goal would be to create a replacement for
Teledisk that runs on linux (and *BSD, eventually).
sector sequence (aka interleave) are trivial to
determine manually, but
hell to do automatically. Likewise, but actually a little easier, "which
track has the DIRectory?"
I'm not trying to make a miracle data-transfer agent like XenoCopy (I mean
that as a complement), just something to let me make images to transfer
over a network or store as files on a hard drive somewhere.
If you are willing to program the FDC directly, you
can try to read the
sector headers.
If you are NOT willing to go down to that level, then:
1) try to read, oh say, 512 byte sector #1 Track #4, from track 4, side A,
<snip>
2) Once you know the bytes per sector, and sectors per
track, then try
reading from side B. Since side A and side B are normally the same
<snip>
3) confirm the maximum track (usually 40 and 80, but
sometimes 35 and 77!
4) once you have determined the physical format, you can duplicate disks,
but not retrieve data from them in a reliable way until you determine the
logical parameters:
<snip>
That's similar to what I was thinking about, but probably a better way of
doing it (I'm lacking a few years of experience.....). As I said earlier,
I don't want to even think about writing a data conversion program right
now..
BUT, ...
whatever you do, somebody can screw it up! For example, some formats use
8 sectors per track, but FORMAT 9!
Sometimes somebody takes a previously used DS disk, and reformats, and
uses a SS format on it. The extraneous stuff on side B can completely
confuse an automatic selection algorithm.
I think I'm the somebody that you're talking about. If I had a bulk
eraser lying around, that'd probably be helpful.
I estimate that there are about 2500 mutually
incompatible floppy disk
formats. I've analyzed about a quarter of them, and implemented about 2/3
of those.
Thanks for the help, I'm thinking I'll try to just play around with a
manual selection of disk format (chose from a list or enter the parameters
manually) for now. I'd just like to get something to play with first.
And of course, it'd be nice to have something that'll convert/read
teledisk format files, so I don't have any reason to worry about having to
use this DOS box sitting next to be to write out disks anymore.
Pat
--
"This fucking university has shown time and time again that it is
completely fucking incompetent when it comes to employing technology"
-- Anonymous
http://dilbert.com/comics/dilbert/archive/images/dilbert2040637020924.gif