

const
   __TEST_UNIT_READY = $00;
   __REZERO_UNIT = $01;
   __REQUEST_SENSE = $03;
   __FORMAT_UNIT = $04;
   __READ_BLOCK_LIMITS = $05;
   __REASSIGN_BLOCKS = $07;
   __READ_6 = $08;
   __WRITE_6 = $0a;
   __SEEK_6 = $0b;
   __READ_REVERSE = $0f;
   __WRITE_FILEMARKS = $10;
   __SPACE = $11;
   __INQUIRY = $12;
   __RECOVER_BUFFERED_DATA = $14;
   __MODE_SELECT = $15;
   __RESERVE = $16;
   __RELEASE = $17;
   __COPY = $18;
   __ERASE = $19;
   __MODE_SENSE = $1a;
   __START_STOP = $1b;
   __RECEIVE_DIAGNOSTIC = $1c;
   __SEND_DIAGNOSTIC = $1d;
   __ALLOW_MEDIUM_REMOVAL = $1e;
   __SET_WINDOW = $24;
   __READ_CAPACITY = $25;
   __READ_10 = $28;
   __WRITE_10 = $2a;
   __SEEK_10 = $2b;
   __WRITE_VERIFY = $2e;
   __VERIFY = $2f;
   __SEARCH_HIGH = $30;
   __SEARCH_EQUAL = $31;
   __SEARCH_LOW = $32;
   __SET_LIMITS = $33;
   __PRE_FETCH = $34;
   __READ_POSITION = $34;
   __SYNCHRONIZE_CACHE = $35;
   __LOCK_UNLOCK_CACHE = $36;
   __READ_DEFECT_DATA = $37;
   __MEDIUM_SCAN = $38;
   __COMPARE = $39;
   __COPY_VERIFY = $3a;
   __WRITE_BUFFER = $3b;
   __READ_BUFFER = $3c;
   __UPDATE_BLOCK = $3d;
   __READ_LONG = $3e;
   __WRITE_LONG = $3f;
   __CHANGE_DEFINITION = $40;
   __WRITE_SAME = $41;
   __READ_TOC = $43;
   __LOG_SELECT = $4c;
   __LOG_SENSE = $4d;
   __MODE_SELECT_10 = $55;
   __RESERVE_10 = $56;
   __RELEASE_10 = $57;
   __MODE_SENSE_10 = $5a;
   __PERSISTENT_RESERVE_IN = $5e;
   __PERSISTENT_RESERVE_OUT = $5f;
   __MOVE_MEDIUM = $a5;
   __READ_12 = $a8;
   __WRITE_12 = $aa;
   __WRITE_VERIFY_12 = $ae;
   __SEARCH_HIGH_12 = $b0;
   __SEARCH_EQUAL_12 = $b1;
   __SEARCH_LOW_12 = $b2;
   __READ_ELEMENT_STATUS = $b8;
   __SEND_VOLUME_TAG = $b6;
   __WRITE_LONG_2 = $ea;

   GOOD = $00;
   CHECK_CONDITION = $01;
   CONDITION_GOOD = $02;
   BUSY = $04;
   INTERMEDIATE_GOOD = $08;
   INTERMEDIATE_C_GOOD = $0a;
   RESERVATION_CONFLICT = $0c;
   COMMAND_TERMINATED = $11;
   QUEUE_FULL = $14;
   STATUS_MASK = $3e;
   NO_SENSE = $00;
   RECOVERED_ERROR = $01;
   NOT_READY = $02;
   MEDIUM_ERROR = $03;
   HARDWARE_ERROR = $04;
   ILLEGAL_REQUEST = $05;
   UNIT_ATTENTION = $06;
   DATA_PROTECT = $07;
   BLANK_CHECK = $08;
   COPY_ABORTED = $0a;
   ABORTED_COMMAND = $0b;
   VOLUME_OVERFLOW = $0d;
   MISCOMPARE = $0e;
   TYPE_DISK = $00;
   TYPE_TAPE = $01;
   TYPE_PROCESSOR = $03;
   TYPE_WORM = $04;
   TYPE_ROM = $05;
   TYPE_SCANNER = $06;
   TYPE_MOD = $07;
   TYPE_MEDIUM_CHANGER = $08;
   TYPE_ENCLOSURE = $0d;
   TYPE_NO_LUN = $7f;

type
   Pccs_modesel_head = ^ccs_modesel_head;
   ccs_modesel_head = record
        _r1 : byte;
        medium : byte;
        _r2 : byte;
        block_desc_length : byte;
        density : byte;
        number_blocks_hi : byte;
        number_blocks_med : byte;
        number_blocks_lo : byte;
        _r3 : byte;
        block_length_hi : byte;
        block_length_med : byte;
        block_length_lo : byte;
     end;


const
   COMMAND_COMPLETE = $00;
   EXTENDED_MESSAGE = $01;
   EXTENDED_MODIFY_DATA_POINTER = $00;
   EXTENDED_SDTR = $01;
   EXTENDED_EXTENDED_IDENTIFY = $02;
   EXTENDED_WDTR = $03;
   SAVE_POINTERS = $02;
   RESTORE_POINTERS = $03;
   DISCONNECT = $04;
   INITIATOR_ERROR = $05;
   ABORT = $06;
   MESSAGE_REJECT = $07;
   NOP = $08;
   MSG_PARITY_ERROR = $09;
   LINKED_CMD_COMPLETE = $0a;
   LINKED_FLG_CMD_COMPLETE = $0b;
   BUS_DEVICE_RESET = $0c;
   INITIATE_RECOVERY = $0f;
   RELEASE_RECOVERY = $10;
   SIMPLE_QUEUE_TAG = $20;
   HEAD_OF_QUEUE_TAG = $21;
   ORDERED_QUEUE_TAG = $22;
   SCSI_IOCTL_GET_IDLUN = $5382;
   SCSI_IOCTL_TAGGED_ENABLE = $5383;
   SCSI_IOCTL_TAGGED_DISABLE = $5384;
   SCSI_IOCTL_PROBE_HOST = $5385;
   SCSI_IOCTL_GET_BUS_NUMBER = $5386;

{ ---------------------------------------------------------------------
    Borland compatibility types
  ---------------------------------------------------------------------}

// Type
