As you can see the gap sizes differ quite a bit from
the ones that you
have documented - with the 765, this is only one of several gaps, and
the controller does not provide complete access to the raw format like
a 179x controller would.
Yes, the 179x controllers have the Read Track and Write Track command.
I can remember that from the time I wrote my own "DOS" for the 6800-based
machine with a homebrew floppy controller based on the 1793 IIRC (1981).
You put *all* data in RAM (sector data, gap data, ID mark, sync fields
and what more, and then issue the Write Track command. That's how I got
my 5.25" floppies formatted. Make sure that you have slack (extra gap
bytes at the end ot the "track" in RAM, because depending on rotation
fluctuations the last gap is not a constant number of bytes.
I assume the gap sizes need to decrease for formats
which have an extra
sector (or two) over the NEC table, however I do not know by how much
... Any additional table entries, or information on how to calculate
his would be much appreciated.
If you do not have the 179x data sheet, aks me. Only then I will go up
to the attick and start searching for it. Otherwise, I will not go there
because, believe me, it *hot* there, afetr two weeks of more than 25"C!
Normally the last gap is filled from the end of the
last sector until
the physical index mark occurs. The 765 appears to do this automatically
as part of the "Format Track" command. For a controller like the 179x,
you need to keep providing filler bytes until the physical end of
track.
Correct :~)
I found out the hard way, after I "upgraded" the software from single
to double density ... I used polling software to see when DRQ is asserted
and then write the data byte. With double density, the max time allowed
before a data byte *must* be written, is too short for whatever clever
constructed polling loop (in assembler of course).
So I "improved" the hardware to generate an interrupt on DRQ and I could
format floppies in double density. But after some time when I tried to
format a floppy the whole system hung.
I got more interrupts than anticipated, and that was because of the
extra bytes wanted by the FDC. It works sometimes, but that is just
because of the tolerances of the rotation speed.
Now in the year 2005, I am probably going to desing a floppy controller
interface for the Core and I/O Board set, but that's an other story :~)
greetz,
- Henk, PA8PDP.