On 19/10/2011, at 8:44 AM, Eric Smith wrote:
There's no obvious way to do such a thing as a
(somewhat-) compatible extension of the standard formats. The ID field of a sector
contains a "physical record length" byte, and the FDC uses the value there to
determine how many data bytes to transfer before the CRC. The values IBM defined are:
00 - 128 bytes (FM only)
01 - 256 bytes
02 - 512 bytes
03 - 1024 bytes (MFM only)
There are non-IBM formats using the obvious extension:
04 - 2048 bytes
05 - 4096 bytes
I wouldn't be the least bit surprised if some FDC chips didn't work properly with
those. In particular, I would expect some FDCs to use only the low two bits of the byte,
and interpret 04 and 05 as meaning 128 and 256 bytes, respectively. However, I have not
tried this.
It's all very messy for interoperability. You can't tell from the ID field how
long the sector is because of the different encodings used for the sector length. In some
Western Digital FDCs, bit 3 of the Read Sector / Write Sector command specified which
encoding to use, which means the only way you can really figure this out is to do a Read
Track and analyse the bytes, or better still, read the raw bits from the drive.
eg.
WD1771: (FM only)
b=0: Read Command = 1 0 0 x 0 x 0 0
01 - 16 bytes
02 - 32 bytes
03 - 48 bytes
04 - 64 bytes
.. ..
FF - 4080 bytes
00 - 4096 bytes
b=1: Read Command = 1 0 0 x 1 x 0 0 "IBM Format"
00 - 128 bytes
01 - 256 bytes
02 - 512 bytes
03 - 1024 bytes
WD1791,1792,1793,1794
Read Command = 1 0 0 x x x x 0 "IBM Format"
00 - 128 bytes
01 - 256 bytes
02 - 512 bytes
03 - 1024 bytes
WD1795,1797
b=0: Read Command = 1 0 0 x 0 x x 0
00 - 256 bytes
01 - 512 bytes
02 - 1024 bytes
03 - 128 bytes
b=1: Read Command = 1 0 0 x 1 x x 0 "IBM Format"
00 - 128 bytes
01 - 256 bytes
02 - 512 bytes
03 - 1024 bytes
Scott.