Changes
765 FDC
,/* Accessing the FDC 765 */
== Accessing the FDC 765 ==
The Data Main Status Register (Port FB7Fh) signalizes when the FDC is used ready to write Commands and Parameters, to readsend/write data bytes, and to receive result bytes. These three operations are called Command-, Execution-, and Result-Phase :* Command Phase :A command consists of a command the next byte (eventually including through the MF, MK, SK bits), and up to 8 parameter bytesData Register.
=== Execution Phase === During this phase, the actual data is transferred (if any). Usually that are the data bytes for the read/written sector(s), except for the Format Track Command, in that case 4 bytes for each sector are transferred. During data transfers between the FDC and the processor, the FDC must me serviced every 26us (for MFM mode with CPC timings) or the FDC sets the Overrun flag in Status Register 1 and terminates the FDC command. === Result Phase === Returns up to 7 result bytes (depending on the command) that are containing status information. The Recalibrate and Seek Track commands do not return result bytes directly, instead the program must wait until the Main Status Register signalizes when that the FDC is ready to command has been completed, and then it must (!) senda Sense Interrupt State command to 'terminate' the Seek/receive Recalibrate command. During the next byte through result phase, all the Data Registerresult bytes must be read. The FDC will not accept a new command until all the result bytes are read.
<br>