home *** CD-ROM | disk | FTP | other *** search
- /*
- File: SCSI.h
-
- Copyright: © 1984-1993 by Apple Computer, Inc., all rights reserved.
-
- WARNING
- This file was auto generated by the interfacer tool. Modifications
- must be made to the master file.
-
- */
-
- #ifndef __SCSI__
- #define __SCSI__
-
- #ifndef __TYPES__
- #include <Types.h>
- /* #include <ConditionalMacros.h> */
- /* #include <MixedMode.h> */
- /* #include <Traps.h> */
- #endif
-
- enum {
- scInc = 1,
- scNoInc = 2,
- scAdd = 3,
- scMove = 4,
- scLoop = 5,
- scNop = 6,
- scStop = 7,
- scComp = 8,
- scCommErr = 2, /*communications error, operation timeout*/
- scArbNBErr = 3, /*arbitration timeout waiting for not BSY*/
- scBadParmsErr = 4, /*bad parameter or TIB opcode*/
- scPhaseErr = 5, /*SCSI bus not in correct phase for attempted operation*/
- scCompareErr = 6, /*data compare error*/
- scMgrBusyErr = 7, /*SCSI Manager busy */
- scSequenceErr = 8, /*attempted operation is out of sequence*/
- scBusTOErr = 9, /*CPU bus timeout*/
- scComplPhaseErr = 10, /*SCSI bus wasn't in Status phase*/
- sbSIGWord = 0x4552,
- pMapSIG = 0x504D
- };
-
- #if defined(powerc) || defined (__powerc)
- #pragma options align=mac68k
- #endif
- struct Block0 {
- unsigned short sbSig; /*unique value for SCSI block 0*/
- unsigned short sbBlkSize; /*block size of device*/
- unsigned long sbBlkCount; /*number of blocks on device*/
- unsigned short sbDevType; /*device type*/
- unsigned short sbDevId; /*device id*/
- unsigned long sbData; /*not used*/
- unsigned short sbDrvrCount; /*driver descriptor count*/
- unsigned long ddBlock; /*1st driver's starting block*/
- unsigned short ddSize; /*size of 1st driver (512-byte blks)*/
- unsigned short ddType; /*system type (1 for Mac+)*/
- unsigned short ddPad[243]; /*ARRAY[0..242] OF INTEGER; not used*/
- };
- #if defined(powerc) || defined(__powerc)
- #pragma options align=reset
- #endif
-
- typedef struct Block0 Block0;
-
- #if defined(powerc) || defined (__powerc)
- #pragma options align=mac68k
- #endif
- struct Partition {
- unsigned short pmSig; /*unique value for map entry blk*/
- unsigned short pmSigPad; /*currently unused*/
- unsigned long pmMapBlkCnt; /*# of blks in partition map*/
- unsigned long pmPyPartStart; /*physical start blk of partition*/
- unsigned long pmPartBlkCnt; /*# of blks in this partition*/
- unsigned char pmPartName[32]; /*ASCII partition name*/
- unsigned char pmParType[32]; /*ASCII partition type*/
- unsigned long pmLgDataStart; /*log. # of partition's 1st data blk*/
- unsigned long pmDataCnt; /*# of blks in partition's data area*/
- unsigned long pmPartStatus; /*bit field for partition status*/
- unsigned long pmLgBootStart; /*log. blk of partition's boot code*/
- unsigned long pmBootSize; /*number of bytes in boot code*/
- unsigned long pmBootAddr; /*memory load address of boot code*/
- unsigned long pmBootAddr2; /*currently unused*/
- unsigned long pmBootEntry; /*entry point of boot code*/
- unsigned long pmBootEntry2; /*currently unused*/
- unsigned long pmBootCksum; /*checksum of boot code*/
- unsigned char pmProcessor[16]; /*ASCII for the processor type*/
- unsigned short pmPad[188]; /*512 bytes long currently unused*/
- };
- #if defined(powerc) || defined(__powerc)
- #pragma options align=reset
- #endif
-
- typedef struct Partition Partition;
-
- #if defined(powerc) || defined (__powerc)
- #pragma options align=mac68k
- #endif
- struct SCSIInstr {
- unsigned short scOpcode;
- unsigned long scParam1;
- unsigned long scParam2;
- };
- #if defined(powerc) || defined(__powerc)
- #pragma options align=reset
- #endif
-
- typedef struct SCSIInstr SCSIInstr;
-
- #ifdef __cplusplus
- extern "C" {
- #endif
-
- extern pascal OSErr SCSIReset(void)
- TWOWORDINLINE(0x4267, 0xA815);
- extern pascal OSErr SCSIGet(void)
- THREEWORDINLINE(0x3F3C, 0x0001, 0xA815);
- extern pascal OSErr SCSISelect(short targetID)
- THREEWORDINLINE(0x3F3C, 0x0002, 0xA815);
- extern pascal OSErr SCSICmd(Ptr buffer, short count)
- THREEWORDINLINE(0x3F3C, 0x0003, 0xA815);
- extern pascal OSErr SCSIRead(Ptr tibPtr)
- THREEWORDINLINE(0x3F3C, 0x0005, 0xA815);
- extern pascal OSErr SCSIRBlind(Ptr tibPtr)
- THREEWORDINLINE(0x3F3C, 0x0008, 0xA815);
- extern pascal OSErr SCSIWrite(Ptr tibPtr)
- THREEWORDINLINE(0x3F3C, 0x0006, 0xA815);
- extern pascal OSErr SCSIWBlind(Ptr tibPtr)
- THREEWORDINLINE(0x3F3C, 0x0009, 0xA815);
- extern pascal OSErr SCSIComplete(short *stat, short *message, unsigned long wait)
- THREEWORDINLINE(0x3F3C, 0x0004, 0xA815);
- extern pascal short SCSIStat(void)
- THREEWORDINLINE(0x3F3C, 0x000A, 0xA815);
- extern pascal OSErr SCSISelAtn(short targetID)
- THREEWORDINLINE(0x3F3C, 0x000B, 0xA815);
- extern pascal OSErr SCSIMsgIn(short *message)
- THREEWORDINLINE(0x3F3C, 0x000C, 0xA815);
- extern pascal OSErr SCSIMsgOut(short message)
- THREEWORDINLINE(0x3F3C, 0x000D, 0xA815);
- #ifdef __cplusplus
- }
- #endif
-
- #endif
-
-