|
|
1.1 root 1: /* idcreg.h 6.1 83/07/29 */
2:
3: #define NRB02SECT 40 /* RB02 sectors/track */
4: #define NRB02TRK 2 /* RB02 tracks/cylinder */
5: #define NRB02CYL 512 /* RB02 cylinders/disk */
6: #define NRB80SECT 31 /* RB80 sectors/track */
7: #define NRB80TRK 14 /* RB80 tracks/cylinder */
8: #define NRB80CYL 559 /* RB80 cylinders/disk */
9:
10: struct idcdevice
11: {
12: int idccsr; /* control status register */
13: int idcbar; /* bus address register */
14: int idcbcr; /* byte count register */
15: int idcdar; /* disk address register */
16: int idcmpr; /* multi-purpose register */
17: int idceccpos; /* ecc position register */
18: int idceccpat; /* ecc pattern register */
19: int idcreset; /* master reset register */
20: };
21:
22: /* idccsr */
23: #define IDC_TOI 0x10000000 /* time out inhibit */
24: #define IDC_ASSI 0x08000000 /* automatic skip sector inhibit */
25: #define IDC_R80 0x04000000 /* selected disk is R80 */
26: #define IDC_MTN 0x02000000 /* maintenance */
27: #define IDC_IR 0x01000000 /* interrupt request */
28: #define IDC_SSE 0x00800000 /* R80 skip sector error */
29: #define IDC_SSEI 0x00400000 /* R80 skip sector error inhibit */
30: #define IDC_ECS 0x00300000 /* R80 ecc status */
31: #define IDC_ECS_NONE 0x00000000 /* no data error */
32: #define IDC_ECS_HARD 0x00200000 /* hard ecc error */
33: #define IDC_ECS_SOFT 0x00300000 /* soft ecc error */
34: #define IDC_ATTN 0x000f0000 /* attention bits */
35: #define IDC_ERR 0x00008000 /* composite error */
36: #define IDC_DE 0x00004000 /* drive error */
37: #define IDC_NXM 0x00002000 /* non-existant memory */
38: #define IDC_DLT 0x00001000 /* data late */
39: #define IDC_HNF IDC_DLT /* header not found */
40: #define IDC_DCK 0x00000800 /* data check */
41: #define IDC_OPI 0x00000400 /* operation incomplete */
42: #define IDC_DS 0x00000300 /* drive select bits */
43: #define IDC_CRDY 0x00000080 /* controller ready */
44: #define IDC_IE 0x00000040 /* interrupt enable */
45: #define IDC_FUNC 0x0000000e /* function code */
46: #define IDC_DRDY 0x00000001 /* drive ready */
47:
48: #define IDC_HARD (IDC_NXM|IDC_DE)
49:
50: #define IDCCSR_BITS \
51: "\20\35TOI\34ASSI\33R80\32MTN\31IR\30SSE\27SSEI\26ECS1\25ECS0\24ATN3\
52: \23ATN2\22ATN1\21ATN0\20ERR\17DE\16NXM\15DLT\14DCK\13OPI\12DS1\11DS0\
53: \10CRDY\7IE\4F2\3F1\2F0\1DRDY"
54:
55: /* function codes */
56: #define IDC_NOP 000 /* no operation */
57: #define IDC_WCHK 002 /* write check data */
58: #define IDC_GETSTAT 004 /* get status */
59: #define IDC_SEEK 006 /* seek */
60: #define IDC_RHDR 010 /* read header */
61: #define IDC_WRITE 012 /* write data */
62: #define IDC_READ 014 /* read data */
63: #define IDC_RNOHCHK 016 /* read data w/o header check */
64:
65: /* idcmpr for RL02 get status command */
66: #define IDCGS_RST 010 /* reset */
67: #define IDCGS_GS 002 /* get status, must be 1 */
68: #define IDCGS_M 001 /* mark, must be 1 */
69: #define IDCGS_GETSTAT (IDCGS_RST|IDCGS_GS|IDCGS_M)
70:
71: /* RL02 status word */
72: #define IDCDS_WDE 0100000 /* write data error */
73: #define IDCDS_HCE 0040000 /* head current error */
74: #define IDCDS_WL 0020000 /* write lock */
75: #define IDCDS_SKTO 0010000 /* seek timeout */
76: #define IDCDS_SPD 0004000 /* spindle error */
77: #define IDCDS_WGE 0002000 /* write gate error */
78: #define IDCDS_VC 0001000 /* volume check */
79: #define IDCDS_DSE 0000400 /* drive select error */
80: #define IDCDS_HS 0000100 /* head select */
81: #define IDCDS_CO 0000040 /* cover open */
82: #define IDCDS_HO 0000020 /* heads out */
83: #define IDCDS_BH 0000010 /* brush home */
84: #define IDCDS_STATE 0000007 /* drive state */
85:
86: #define IDCRB02DS_BITS \
87: "\10\20WDE\17HCE\16WL\15SKTO\14SPD\13WBE\12VC\11DSE\
88: \7HS\6CO\5HO\4BH\3STC\2STB\1STA"
89:
90: /* R80 status word */
91: #define IDCDS_WTP 0020000 /* write protect */
92: #define IDCDS_DRDY 0010000 /* driver ready */
93: #define IDCDS_ONCY 0004000 /* on cylinder */
94: #define IDCDS_SKE 0002000 /* seek error */
95: #define IDCDS_PLGV 0001000 /* plug valid */
96: #define IDCDS_FLT 0000400 /* fault */
97:
98: #define IDCRB80DS_BITS \
99: "\10\16WTP\15DRDY\14ONCY\13SKE\12PLGV\11FLT\5SEC4\4SEC3\3SEC2\2SEC1\1SEC0"
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.