On 20 Mar 2012 at 8:27, Dave Dunfield wrote:
According to the NEC documents, for the sector read
and write
commands, if you give it a value of 0 for 'n' (6th byte of the
command = Number of bytes/sector), the actual number of bytes
read/written is determined by the 9th byte written 'DTL' (DaTa
Length).
The docs don't go into much detail, and I haven't fooled with it
much - I just set DTL to 128 when I am reading or writing 128 byte
sectors (n=0).
I recall that I spent too much time with MFM 128-byte sectors with
the 765 to determine that it was simply broken. Setting DTL to all
256 possible values did not result in any improvement. This was a
shame, because there are formats using 128 byte MFM sectors. We left
them out of 22DISK to spare everyone grief, but we have them tucked
away somewhere for those who have the NS versions of the FDC.
As far as I can determine, the DTL thing was intended for some sort
of 3740 compliance--take a look at a factory-formatted floppy and
you'll see that the first 80 bytes of a sector are preset to 40h
(EBCIDIC bspace) and the rest is the background format pattern.
This is not to be confused with the WD17xx controllers which can, in
"non IBM mode" format/read/write sectors smaller than 128 bytes. I
can't say that I've ever run into any 64-byte sectors, but the WD
feature does operate as advertised.
--Chuck