BrudnopisMikeya

From Atariki

(Różnice między wersjami)
Jump to: navigation, search

Wersja z dnia 11:43, 15 sty 2013

Register summary for selected Western Digital floppy drive controllers

Unified format Greg Cook, 19/Aug/2005

Command register

Model WD2795/WD2797 x x x x . . . x x . . x . x WD2791/WD2793 x x x x . . x . x . x . . x WD1773 x x x x . x . . x . x . . x WD1770/WD1772 x x x x x . . . x x . . x .

Type Command b7 b6 b5 b4 b3 b2 b1 b0

  I    Restore          0   0   0   0   H X h h    V   r r r   r r
  I    Seek             0   0   0   1   H X h h    V   r r r   r r
  I    Step             0   0   1   u   H X h h    V   r r r   r r
  I    Step in          0   1   0   u   H X h h    V   r r r   r r
  I    Step out         0   1   1   u   H X h h    V   r r r   r r
 II    Read sector      1   0   0   m   H S S L    E   0 C U   0 0
 II    Write sector     1   0   1   m   H S S L    E   P C U   a a
III    Read address     1   1   0   0   H 0 0 0    E   0 0 U   0 0
III    Read track       1   1   1   0   H 0 0 0    E   0 0 U   0 0
III    Write track      1   1   1   1   H 0 0 0    E   P 0 U   0 0
 IV    Force interrupt  1   1   0   1   I I I I    I   X I I   X I

Parameters:

       0 = always 0
       1 = always 1
       X = not used (reset to 0)
       a = Data address mark
               0 = Data address mark
               1 = Deleted-data address mark
       C = Side compare
               0 = Disable side compare
               1 = Enable side compare
       E = Settling delay
               0 = No delay
               1 = Delay: 15 ms for WD279x at 2 MHz, and WD1772
                          30 ms for WD279x at 1 MHz, and WD1770/WD1773
       h = Head load
               0 = Unload head at beginning
               1 = Load head at beginning
       H = Motor On
               0 = Enable spin-up sequence
               1 = Disable spin-up sequence
       I = Interrupt
               I0 = Interrupt on not ready to ready transition
               I1 = Interrupt on ready to not ready transition
               I2 = Interrupt on index pulse
               I3 = Interrupt immediately
                       0 = No interrupt
                       1 = Raise interrupt on this condition
               I0..I3
                       all 0 = terminate current command without interrupt
       L = Interpretation of ID field
               The sector length in bytes is determined from the following
               table:
                  LSBs of sector length in ID field
                         00      01      10      11
               L
               0        256     512    1024     128
               1        128     256     512    1024
               WD177x and WD2791/3 operate with L = 1.
       m = Multiple sectors
               0 = Single sector
               1 = Multiple sectors
       P = Write precompensation
               0 = Enable write precompensation
               1 = Disable write precompensation
       r = Stepping rate
                           Model, clock frequency
                        WD1770  WD1772  WD279x  WD279x
                       /WD1773          @2 MHz  @1 MHz
               r1  r0
                0   0     6 ms    6 ms    3 ms    6 ms
                0   1    12 ms   12 ms    6 ms   12 ms
                1   0    20 ms    2 ms   10 ms   20 ms
                1   1    30 ms    3 ms   15 ms   30 ms
       S = Side comparand
               0 = Compare for side 0
               1 = Compare for side 1
       u = Update track (T in 279x datasheet)
               0 = No update
               1 = Update track register
       U = Update SSO (Side select)
               0 = Update SSO to 0
               1 = Update SSO to 1
       V = Verify on track
               0 = No verify
               1 = Verify on destination track

Status register

Model WD2795/WD2797 . x . x . . x . x . x x x x WD2791/WD2793 . x . x . . x . x . x x x x WD1773 . x . x . x . . x . x x x x WD1770/WD1772 x . x . x . . x . x . x x x

Type Command b7 b6 b5 b4 b3 b2 b1 b0

  I    (all type Is)   M n   X w   s h h   R R   c c   T   I   b
 II    Read sector     M n   X 0   a a a   R R   c c   d   q   b
 II    Write sector    M n   w w   a f 0   R R   c c   d   q   b
III    Read address    M n   X 0   a 0 0   R R   c c   d   q   b
III    Read track      M n   X 0   a 0 0   R 0   c 0   d   q   b
III    Write track     M n   w w   a f 0   R 0   c 0   d   q   b
 IV    Force interrupt
       -while busy     - -   - -   - - -   - -   - -   -   -   0
       -while idle     M n   X w   s h h   R R   c c   T   I   0
  -    Idle            M n   X w   s h h   R R   c c   T   I   b

Parameters:

       0 = always 0
       X = not defined
       - = retains previous value
       a = Data address mark
               0 = Data address mark
               1 = Deleted-data address mark
       b = Busy
               0 = controller idle
               1 = controller busy
       c = CRC error
               0 = CRC verified
               1 = CRC error
       d = Lost data (late register service)
               0 = no data lost
               1 = data lost
       f = Write fault
               0 = no write fault
               1 = write fault
       h = Head loaded
               0 = drive head not loaded
               1 = drive head loaded
       I = Index pulse
               0 = disc not at index mark (/IP = high)
               1 = disc at index mark (/IP = low)
       M = Motor on
               0 = drive motor off
               1 = drive motor on
       n = Not ready
               0 = drive ready
               1 = drive not ready
       q = Data request
               0 = Data register does not require service
               1 = Data register requires service
       R = Record not found
               0 = record found / verified on track
               1 = record not found / seek error
       s = Motor spin up sequence completed
               0 = spin up not completed
               1 = spin up completed
       T = Track 0
               0 = drive head not at track 0 (/TR00 = high)
               1 = drive head at track 0 (/TR00 = low)
       w = Write protect
               0 = disc write enabled
               1 = disc write protected

Notes:

The WD2791 and WD2795 have inverted data bus lines. As noted elsewhere, the Busy flag may be left set when the FDC is idle, if the FDC has been reset while a command was in progress. If the WD1773 or WD279x is idle, and n = 1, flags c,h,I,R,T and w may be invalid and contain 0. The WD1770/2 status register description is taken from the datasheet; some flags may have fixed values for certain commands, as with the other models.

References:

1770/2/3 Datasheet

       http://www.funet.fi/pub/cbm/documents/chipdata/wd177x/index.html

177x datasheet extracts and BBC disc hardware summary

       http://www.nvg.org/bbc/doc/wd1770.txt
       http://www.poppyfields.net/acorn/tech/1770.shtml

279x datasheet and application notes

       http://tcg.speccy.cz/zoom/files/wd2797.pdf

BBC Datasheets

       http://members.aon.at/~musher/bbc/datasheets.htm

Disclaimer:

The documentation in this file is for information only. For a more authoritative specification, refer to the manufacturer's original datasheets. The author does not guarantee the suitability of the hardware for use in any particular application, especially life support and/or critical systems; for authoritative information on suitability refer to the manufacturer. Whilst every effort has been made to maintain accuracy, this file may contain errors, inaccuracies or omissions which may or may not also be present in the datasheet(s). Specifications are subject to change without notice. This documentation is supplied without warranty, not even the implied warranties of merchantability or fitness for a particular purpose. In no event shall the author or his suppliers be liable for any loss, damage, injury or death, of any nature and howsoever caused, arising from the use of, or failure, inability or unwillingness to use, this documentation.

Greg Cook, [email address]

Personal tools