Which was the
cause of a bug in the RS232 driver of the original IBM
5150 BIOS... However, I as going to be more charitable in the case of
the FDC chip and wonder if it was duw to the fact that IIRC the
origianl IBM 3740 format used a sector as the equivalent of a punched
card, so only the first 80 chracters were used.
Your charity might be misplaced. The 765 works just fine with 128
byte sectors in FM mode.
So Chuck ... do you know exactly how this works (as opposed to how it
is documented)?
128 bytes/sector is a special case in the 765 (at least it is documented
as such).
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).
A few questions which are not clearly answered by the docs:
under "READ DATA"
"When N=0, then DTL defines the data length which the FDC must treat as
a sector. If DTL is smaller than the actual data length in a sector, the
data beyond DTL in the sector is not sent to the data bus. The FDC reads
(internally) the complete Sector performing the CRC check, and depending
upon the manner of the command termination, may perform a multi-sector
read operatiohn. When 'N' is non-zero, then DTL has no meaning and should
be set to FF hexidecimal"
under "WRITE DATA" there is mention of N=0 or DTL ... but DTL is shown
as a part of the write commands, and generally described as "DTL - Data
Length - when N is defined as 00, DTL stands for the data length which
users are going to read out or write into the sector".
The read description seems to imply that the FDC "knows" the actual
length of a sector, and only reads the number of bytes specified, while
calculating the CRC over the whole sector.
- How does it "know" the sector size ... the 'n' field in the ID header
is the only place in the sector data that defines the size.
- Does it assume the sector is 128 bytes?
- or Does it actually read (and check CRC) on a smaller sector?
-What is the actual behaviour during write?
- Does it fill the remainder of a 128 byte sector with some value?
- or Does it actually write a smaller sector?
under "FORMAT TRACK" (in the chart notes)
"(3) In MFM mode the FDC cannot perform a read/write/format operation
with 128 bytes/sector (N = 00)"
This implies that 128/MFM simply doesn't work - not even for format
(which you indicated earlier actually does work). Is this a fairly
reliable assumption?
Does DTL have any effect on 128/MFM reads or writes?
You mentioned that 80 bytes get transferred instead of 128. Does
changing DTL make a difference? Or is it always 80 bytes?
Dave
--
dave12 (at) Dave Dunfield
dunfield Firmware development services & tools:
www.dunfield.com
(dot) com Classic computers:
http://www.classiccmp.org/dunfield/