Commit | Line | Data |
---|---|---|
430726d9 | 1 | /* rxreg.h 4.2 83/02/21 */ |
87828982 SL |
2 | |
3 | /* | |
4 | * RX02 registers | |
5 | */ | |
6 | struct rxdevice { | |
7 | short rxcs; /* control/status register */ | |
8 | short rxdb; /* data buffer register */ | |
9 | }; | |
10 | ||
11 | /* | |
12 | * RX211 Command and Status Register (RX2CS) | |
13 | */ | |
14 | #define RX_DRV0 0x0000 /* select drive 0 */ | |
15 | #define RX_DRV1 0x0010 /* select drive 1 */ | |
16 | #define RX_DONE 0x0020 /* function complete */ | |
17 | #define RX_INTR 0x0040 /* interrupt enable */ | |
18 | #define RX_TREQ 0x0080 /* transfer request (data only) */ | |
19 | #define RX_SDEN 0x0000 /* single density */ | |
20 | #define RX_DDEN 0x0100 /* double density */ | |
21 | #define RX_EXT 0x3000 /* extended address bits */ | |
22 | #define RX_INIT 0x4000 /* initialize RX211 interface */ | |
23 | #define RX_ERR 0x8000 /* general error bit */ | |
24 | ||
25 | /* | |
26 | * RX211 control function bits (0-3 of RX2CS) | |
27 | */ | |
28 | #define RX_FILL 0x0001 /* fill the buffer */ | |
29 | #define RX_EMPTY 0x0003 /* empty the buffer */ | |
30 | #define RX_WRITE 0x0005 /* write the buffer to disk */ | |
31 | #define RX_READ 0x0007 /* read a disk sector to the buffer */ | |
32 | #define RX_FORMAT 0x0009 /* set the media density (format) */ | |
33 | #define RX_RDSTAT 0x000b /* read the disk status */ | |
34 | #define RX_WDDS 0x000d /* write a deleted-data sector */ | |
35 | #define RX_RDERR 0x000f /* read the error registers */ | |
36 | ||
37 | #define RXCS_BITS \ | |
38 | "\20\20RX_ERR\17RX_INIT\11RX_DDEN\10RX_TREQ\7RX_IE\6RX_DONE\5RX_DRV1" | |
39 | ||
40 | /* | |
41 | * RX211 Error and Status Register (RX2ES) -- | |
42 | * information is located in RX2DB after completion of function. | |
43 | * The READY bit's value is available only after a "read status". | |
44 | */ | |
45 | #define RXES_CRCERR 0x0001 /* CRC error (data read error) */ | |
46 | #define RXES_IDONE 0x0004 /* reinitialization complete */ | |
47 | #define RXES_DENERR 0x0010 /* density error (mismatch) */ | |
48 | #define RXES_DDMARK 0x0040 /* deleted-data mark */ | |
49 | #define RXES_READY 0x0080 /* drive is ready */ | |
50 | ||
51 | #define RXES_BITS \ | |
52 | "\20\14RXES_NXM\13RXES_WCOF\11RXES_DRV1\10RXES_RDY\7RXES_DDMK\6RXES_DDEN\5\ | |
53 | RXES_DNER\4RXES_ACLO\3RXES_ID\1RXES_CRC" | |
54 | ||
430726d9 | 55 | #ifdef RXDEFERR |
87828982 SL |
56 | /* |
57 | * Table of values for definitive error code (rxxt[0] & 0xff) | |
58 | */ | |
59 | struct rxdeferr { | |
60 | short errval; | |
61 | char *errmsg; | |
62 | } rxdeferr[] = { | |
63 | { 0010, "Can't find home on drive 0" }, | |
64 | { 0020, "Can't find home on drive 1" }, | |
65 | { 0040, "Bad track number requested" }, | |
66 | { 0050, "Home found too soon" }, | |
67 | { 0070, "Can't find desired sector" }, | |
68 | { 0110, "No SEP clock seen" }, | |
69 | { 0120, "No preamble found" }, | |
70 | { 0130, "Preamble, but no ID mark" }, | |
71 | { 0150, "Track addr wrong in header" }, | |
72 | { 0160, "Too many tries for ID AM" }, | |
73 | { 0170, "No data AM found" }, | |
74 | { 0200, "CRC error" }, | |
75 | { 0220, "Maintenance test failure" }, | |
76 | { 0230, "Word count overflow" }, | |
77 | { 0240, "Density error" }, | |
78 | { 0250, "Set-density protocol bad" }, | |
79 | { 0, "Undefined error code" } | |
80 | }; | |
430726d9 | 81 | #endif |