|
|
1.1 ! root 1: /*++ ! 2: ! 3: Copyright (c) 1993 - Colorado Memory Systems, Inc. ! 4: All Rights Reserved ! 5: ! 6: Module Name: ! 7: ! 8: mt1strc.h ! 9: ! 10: Abstract: ! 11: ! 12: Revision History: ! 13: ! 14: ! 15: --*/ ! 16: ! 17: #pragma pack(1) ! 18: ! 19: // ! 20: // Tape Drive Status ! 21: // returned from Report Drive Status command. ! 22: // ! 23: ! 24: struct DriveStatus { ! 25: UBYTE Ready:1; // drive ready ! 26: UBYTE Error:1; // error detected ! 27: UBYTE CartPresent:1; // cartridge present ! 28: UBYTE WriteProtect:1; // cartridge write protected ! 29: UBYTE NewCart:1; // new cartridge ! 30: UBYTE Referenced:1; // cartridge referenced ! 31: UBYTE BOT:1; // at physical beginning of tape ! 32: UBYTE EOT:1; // at physical end of tape ! 33: }; ! 34: ! 35: ! 36: // ! 37: // CMS Status ! 38: // returned from Report CMS Status command. ! 39: // ! 40: ! 41: struct CmsStatus { ! 42: UBYTE NoBurst:1; // no burst seek if 1 ! 43: UBYTE CmsMode:1; // cms mode if 1 ! 44: UBYTE Threshold:1; // Threshold load if 1 ! 45: UBYTE DriveType:1; // qic40=1, qic80=0 ! 46: UBYTE BurstOnly:1; // Burst only gain set if 1 ! 47: UBYTE Pegasus:1; // If Pegasus tape 1, else 0 ! 48: UBYTE Eagle:1; // Eagle ! 49: UBYTE Reserved2:1; // not defined ! 50: }; ! 51: ! 52: // ! 53: // Tape Drive Configuration ! 54: // returned from Report Drive Configuration command. ! 55: // ! 56: ! 57: struct DriveConfiguration { ! 58: UBYTE Reserved:3; // reserved (response = 0) ! 59: UBYTE XferRate:2; // Transfer Rate = 00 250 Kbps ! 60: // 01 Reserved ! 61: // 10 500 Kbps ! 62: // 11 Reserved ! 63: UBYTE Reserved1:1; ! 64: UBYTE XL_Tape:1; // extra length tape detected ! 65: UBYTE QIC80:1; // QIC-80 mode ! 66: }; ! 67: ! 68: ! 69: // ! 70: // Tape Drive Error Status ! 71: // returned from Report Error Code command. ! 72: // ! 73: ! 74: struct DriveError { ! 75: UWORD Error:8; // error code ! 76: UWORD Command:8; // associated command ! 77: }; ! 78: ! 79: struct TapeFormatLgth { ! 80: UWORD Format:4; /* Format of the tape */ ! 81: UWORD Length:4; /* Length of the tape */ ! 82: }; ! 83: ! 84: ! 85: // ! 86: // Tape Drive Parameters ! 87: // ! 88: ! 89: struct DriveParameters { ! 90: UCHAR Flavor; // CMS or ALIEN ! 91: UCHAR Version; // Firmware Version ! 92: UCHAR DriveType; // QIC-40 or QIC-80 ! 93: UCHAR SeekMode; // seek mode supported by the drive ! 94: SHORT DriveSelect; // current drive identifier ! 95: CHAR Mode; // drive mode (Primary, Format, Verify) ! 96: USHORT ArchiveNativeMode; // Archive Native Mode Data ! 97: struct DriveStatus Status; // last read tape drive status byte ! 98: }; ! 99: ! 100: typedef struct DriveParameters DRIVE_PARAMETERS; ! 101: ! 102: // ! 103: // Tape Parameters ! 104: // ! 105: ! 106: struct TapeParameters { ! 107: CHAR TapeType; // QIC40/QIC80 SHORT/LONG ! 108: SHORT FsectSeg; // floppy sectors per segment ! 109: SHORT SegFtrack; // segments per floppy track ! 110: UWORD FsectFtrack; // floppy sectors per floppy track ! 111: UWORD RwGapLength; // write gap length ! 112: USHORT NumTtrack; // number of tape tracks ! 113: SHORT FtrackFside; // floppy tracks per floppy side ! 114: USHORT SegTtrack; // segments per tape track ! 115: ULONG FsectFside; // floppy sectors per floppy side ! 116: ULONG LogSectors; // number of logical sectors on a tape ! 117: ULONG FsectTtrack; // floppy sectors per tape track ! 118: USHORT TapeFormatCode; // the tape format code ! 119: USHORT FormattableSegs; // the number of formattable segments ! 120: QIC_TIME TimeOut[3]; // time_out for the QIC-117 commands ! 121: // time_out[0] = logical_slow, time_out[1] = logical_fast, ! 122: // time[2] = physical. ! 123: }; ! 124: ! 125: typedef struct TapeParameters TAPE_PARAMETERS; ! 126: ! 127: // ! 128: // Drive Select Parameters ! 129: // These are select/deselect bytes used to select and deselect the tape ! 130: // drive. ! 131: // ! 132: ! 133: struct DriveSelect { ! 134: CHAR Selected; // drive selected flag. ! 135: UBYTE DeselectByte; // bits to make drive select line inactive ! 136: UBYTE SelectByte; // bits to make drive select line active ! 137: }; ! 138: ! 139: typedef struct DriveSelect DRIVE_SELECT; ! 140: ! 141: // ! 142: // Transfer Rate Parameters ! 143: // ! 144: ! 145: struct TransferRate { ! 146: UBYTE XferRate; // current transfer rate (SLOW or FAST) ! 147: UBYTE MaxRate; // maximum transfer rate (SLOW or FAST) ! 148: UBYTE TapeSlow; // Program tape drive slow (250 or 500 Kbps) ! 149: UBYTE TapeFast; // Program tape drive fast (500 or 1000 Kbps) ! 150: UBYTE FDC_Slow; // Program FDC slow (250 or 500 Kbps) ! 151: UBYTE FDC_Fast; // Program FDC fast (500 or 1000 Kbps) ! 152: UBYTE SRT_Slow; // FDC step rate for slow xfer rate ! 153: UBYTE SRT_Fast; // FDC step rate for fast xfer rate ! 154: }; ! 155: ! 156: typedef struct TransferRate TRANSFER_RATE; ! 157: ! 158: // ! 159: // Tape Position Parameters ! 160: // ! 161: ! 162: struct TapePosition { ! 163: CHAR LogFwd; // indicates that the driver thinks that ! 164: // the tape is going logical forward ! 165: SHORT C_Segment; // current tape block, (floppy track) ! 166: SHORT C_Track; // current physical track ! 167: SHORT D_Segment; // desired tape segment, (floppy track) ! 168: SHORT D_Track; // desired physical tape track ! 169: }; ! 170: ! 171: typedef struct TapePosition TAPE_POSITION; ! 172: ! 173: ! 174: // ! 175: // Commands to the Floppy Controller. FDC commands and the corresponding ! 176: // driver structures are listed below. ! 177: // ! 178: // FDC Command Command Struct Response Struct ! 179: // ----------- -------------- --------------- ! 180: // Read Data rdv_command stat ! 181: // Read Deleted Data N/A N/A ! 182: // Write Data rdv_command stat ! 183: // Write Deleted Data rdv_command stat ! 184: // Read a Track N/A N/A ! 185: // Verify (82077) N/A N/A ! 186: // Version (82077) version_cmd N/A ! 187: // Read ID read_id_cmd stat ! 188: // Format a Track format_cmd stat ! 189: // Scan Equal (765) N/A N/A ! 190: // Scan Low or Equal (765) N/A N/A ! 191: // Scan High or Equal (765) N/A N/A ! 192: // Recalibrate N/A N/A ! 193: // Sense Interrupt Status sns_int_cmd fdc_result ! 194: // Specify specify_cmd N/A ! 195: // Sense Drive Status sns_stat_cmd stat ! 196: // Seek seek_cmd N/A ! 197: // Configure (82077) config_cmd N/A ! 198: // Relative Seek (82077) N/A N/A ! 199: // Dump Registers (82077) N/A N/A ! 200: // Perpendicular Mode (82077) N/A N/A ! 201: // Invalid invalid_cmd N/A ! 202: // ! 203: ! 204: ! 205: struct rdv_command { ! 206: UBYTE command; // command UBYTE ! 207: UBYTE drive; // drive specifier ! 208: UBYTE C; // cylinder number ! 209: UBYTE H; // head address ! 210: UBYTE R; // record (sector number) ! 211: UBYTE N; // number of UBYTEs per sector ! 212: UBYTE EOT; // end of track ! 213: UBYTE GPL; // gap length ! 214: UBYTE DTL; // data length ! 215: }; ! 216: ! 217: typedef struct rdv_command RDV_COMMAND; ! 218: ! 219: struct read_id_cmd { ! 220: UBYTE command; // command byte ! 221: UBYTE drive; // drive specifier ! 222: }; ! 223: ! 224: struct format_cmd { ! 225: UBYTE command; // command byte ! 226: UBYTE drive; // drive specifier ! 227: UBYTE N; // number of bytes per sector ! 228: UBYTE SC; // sectors per track (segment) ! 229: UBYTE GPL; // gap length ! 230: UBYTE D; // format filler byte ! 231: }; ! 232: ! 233: typedef struct format_cmd FORMAT_CMD; ! 234: ! 235: struct sns_int_cmd { ! 236: UBYTE command; // command byte ! 237: }; ! 238: ! 239: struct version_cmd { ! 240: UBYTE command; // command byte ! 241: }; ! 242: ! 243: struct national_cmd { ! 244: UBYTE command; // command byte ! 245: }; ! 246: ! 247: struct specify_cmd { ! 248: UBYTE command; // command byte ! 249: UBYTE SRT_HUT; // step rate time (bits 7-4) ! 250: // head unload time bits (3-0) ! 251: UBYTE HLT_ND; // head load time (bits 7-1) ! 252: // non-DMA mode flag (bit 0) ! 253: }; ! 254: ! 255: struct sns_stat_cmd { ! 256: UBYTE command; // command byte ! 257: UBYTE drive; // drive specifier ! 258: }; ! 259: ! 260: struct recalibrate_cmd { ! 261: UBYTE command; // command byte ! 262: UBYTE drive; // drive specifier ! 263: }; ! 264: ! 265: struct seek_cmd { ! 266: UBYTE cmd; // command byte ! 267: UBYTE drive; // drive specifier ! 268: UBYTE NCN; // new cylinder number ! 269: }; ! 270: ! 271: struct config_cmd { ! 272: UBYTE cmd; // command byte ! 273: UBYTE czero; // null byte ! 274: UWORD FIFOTHR:4; // FIFO threshold ! 275: UWORD POLL:1; // Disable polling of drives ! 276: UWORD EFIFO:1; // Enable FIFO ! 277: UWORD EIS:1; // Enable implied seek ! 278: UWORD reserved:1; // reserved ! 279: UWORD PRETRK:8; // Pre-compensation start track number ! 280: }; ! 281: ! 282: struct invalid_cmd { ! 283: UBYTE command; // command byte ! 284: }; ! 285: ! 286: struct _FDC_STATUS { ! 287: UBYTE ST0; // status register 0 ! 288: UBYTE ST1; // status register 1 ! 289: UBYTE ST2; // status register 2 ! 290: UBYTE C; // cylinder number ! 291: UBYTE H; // head address ! 292: UBYTE R; // record (sector number) ! 293: UBYTE N; // number of bytes per sector ! 294: }; ! 295: ! 296: typedef struct _FDC_STATUS FDC_STATUS; ! 297: ! 298: ! 299: struct fdc_result { ! 300: UBYTE ST0; // status register 0 ! 301: UBYTE PCN; // present cylinder number ! 302: }; ! 303: ! 304: // ! 305: // FDC Sector Header Data used for formatting ! 306: // ! 307: ! 308: union format_header { ! 309: struct { ! 310: UBYTE C; // cylinder number ! 311: UBYTE H; // head address ! 312: UBYTE R; // record (sector number) ! 313: UBYTE N; // bytes per sector ! 314: } hdr_struct; ! 315: ULONG hdr_all; ! 316: }; ! 317: ! 318: // This command is only valid on the 82078 Enhanced controller ! 319: ! 320: struct part_id_cmd { ! 321: UBYTE command; ! 322: }; ! 323: ! 324: union drvspec { ! 325: struct { ! 326: UBYTE drive_density:2; ! 327: UBYTE data_rate_table:2; ! 328: UBYTE precomp:1; ! 329: UBYTE floppy_select:2; ! 330: UBYTE reserved:1; ! 331: } spec; ! 332: struct { ! 333: UBYTE reserved:6; ! 334: UBYTE no_report:1; ! 335: UBYTE cmd_done:1; ! 336: } spec_end; ! 337: UBYTE spec_all; ! 338: }; ! 339: ! 340: typedef union drvspec DrvSpec; ! 341: ! 342: // This command is only valid on the 82078 Enhanced controller ! 343: ! 344: struct drive_specification { ! 345: UBYTE command; ! 346: DrvSpec drive[5]; ! 347: }; ! 348: ! 349: struct drive_specification_status { ! 350: DrvSpec drive[4]; ! 351: }; ! 352: ! 353: typedef struct drive_specification_status DrvSpecStatus; ! 354: ! 355: struct PerpMode { ! 356: UBYTE command; ! 357: UBYTE wgate:1; ! 358: UBYTE gap:1; ! 359: UBYTE drive_select:4; ! 360: UBYTE reserved:1; ! 361: UBYTE over_write:1; ! 362: }; ! 363: ! 364: // This command is only valid on the 82078 64 pin Enhanced controller ! 365: ! 366: struct SaveCmd { ! 367: UBYTE command; ! 368: }; ! 369: ! 370: struct SaveResult { ! 371: UBYTE reserved1:7; ! 372: UBYTE clk48:1; ! 373: UBYTE reserved2; ! 374: UBYTE reserved3; ! 375: UBYTE reserved4; ! 376: UBYTE reserved5; ! 377: UBYTE reserved6; ! 378: UBYTE reserved7; ! 379: UBYTE reserved8; ! 380: UBYTE reserved9; ! 381: UBYTE reserved10; ! 382: UBYTE reserved11; ! 383: UBYTE reserved12; ! 384: UBYTE reserved13; ! 385: UBYTE reserved14; ! 386: UBYTE reserved15; ! 387: UBYTE reserved16; ! 388: }; ! 389: ! 390: ! 391: struct FormatParameters { ! 392: SHORT Segments; // tape track segment counter ! 393: UCHAR Cylinder; // floppy cylinder number ! 394: UCHAR Head; // floppy head number ! 395: UCHAR Sector; // floppy sector number ! 396: PMDL MdlAddress; // Memory desciptor list for format data ! 397: UBYTE NCN; // new cylinder number ! 398: ULONG *HdrPtr; // pointer to sector id data for format ! 399: STATUS retval; // Format status ! 400: }; ! 401: ! 402: typedef struct FormatParameters FMT_PARAMETERS; ! 403: ! 404: #pragma pack() ! 405: ! 406: ! 407: ! 408: // ! 409: // Structure for the miscellaneous drive information ! 410: // ! 411: ! 412: struct MiscDriveInfo { ! 413: CHAR DriveType; // Drive_type: QIC40 or QIC80 ! 414: UCHAR ROM_Version; // ROM Version of the drive's firmware ! 415: CHAR InfoExists; // Indicates the existance of the drive train info ! 416: UCHAR SerialNumber[4]; // Four byte array used for the drive serial number ! 417: UCHAR ManDate[2]; // Two byte field used for the date of manufacture ! 418: CHAR Oem[20]; // Twenty byte field used for the OEM name ! 419: }; ! 420: ! 421: typedef struct MiscDriveInfo MISC_DRIVE_INFO; ! 422:
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.