description of HDD ports [2/3]
ZXNet echo conference «real.speccy»
From Valerij Kozhevnikov (500:95/162. → To All 7 April 1998
Hello, Roman!
Error register #F6AF (in) determines the state of the HDD after
the operation. The status of this register is valid:
- after executing a command, if the "Error" bit in the
status register is set.
- after executing a "diagnostics" command or after executing
internal HDD diagnostics on a system reset.
In diagnostic mode, the error register codes determine
the following:
#01 no error
#02 microcontroller error
#03 buffer RAM error
#04 ECC hardware error
#05 microprocessor error
#8x prepare the coffin, dig a fucking grave.
Error register bit values after execution commands:
┌───────┬───────┬──────┬───
│ 7 │ 6 │ 5 │ 4 │ 3 │ 2 │ 1 │ 0 │
├───────┼───────┼──────┼────── ─┼──────┼───────┼──────┼──────┤
│ BBK │ UNC │ 0 │ IDNF │ 0 │ ABRT │ T0NF │ AMNF │
└───────┴───────┴──────┴─────
bit 0 - Data Adress Mark Not Found
- is set during the execution of the "read sector" command, if the sector data address marker is not found after correctly finding the identifier of this sector.
bit 1 - Track 0 Not Found
- is set only in the "recalibration" command, ifafter
2048 steps, track 0 was not detected.
bit 2 - Aborted Command
- set when receiving the status "Write fa-
ult", "Not seek complete", "Drive not ready" from the HDD or when an invalid command was
loaded. The cause of the error can be
determined from the status and error registers.
bit 3 - not used (=0)
bit 4 - ID Not Found
- the required cylinder, head, sector could not be found
or an ECC error occurred in the ID field.
bit 5 - not used (=0)
bit 6 - Uncorrect Data
- ECC error in the data field. Set in case of an uncorrectable error.
bit 7 - Bad Mark Block
- a bad sector mark was detected in the identifier.
The precompensation register #F6AF (out) was used to indicate the number of the cylinder from which precompensation must be performed. In modern models, precompensation is controlled by the
drive itself, so this register can be used for
other purposes.
The #EEAF sector counter register contains the number of sectors for read/write operations. The value of this register
is decremented by 1 as each sector is processed. The transfer of 1 sector occurs with a value of 1, with a value of 0 - 256 sectors. If, while performing a multi-sector transfer, an
error occurred in writing or reading the next sector,then the transfer stops, and the sector counter register contains the number of sectors that remained after the error was detected. Upon successful
completion of the command, it contains 0.
The sector number register #E6AF contains the starting sector number for read-write operations. After processing each sector, the contents are incremented. After completion of the command, it contains the number of the last processed sector or the number of the sector in which the error occurred.
The registers of the low #DEAF and high #D6AF bytes of the cylinder number determine the cylinder for which the given command will be executed.
The drive/head register #CEAF (in/out) has view:
┌───────┬───────┬──────┬─────
│ 7 │ 6 │ 5 │ 4 │ 3 │ 2 │ 1 │ 0 │
├───────┼───────┼──────┼────── ─┼──────┼───────┼──────┼──────┤
│ 1 │ 0 │ 1 │ DRV │ HS3 │ HS2 │ HS1 │ HS0 │
└───────┴───────┴──────┴─────
bit 0-3 - binary code of the selected head
bit 4 - HDD selection, 0 - drive 0
1 - drive 1
bit 5,6 - sector size:
00 reserve
01 reserve
10,512 bytes/sector.
11 reserve
bit 7 - reserve
Jason.
Powered by ScorpionZS256turbo+/SMUC/HDD'IDE130Mb/FDD'800/
/CMOS/Covox/ATkbd/Mouse/CDOS...