home *** CD-ROM | disk | FTP | other *** search
- #ifndef __INC_POS_DEVICE_TRACKDISK_H
- #define __INC_POS_DEVICE_TRACKDISK_H
- /*******************************************************************
- Includes Release 24
- (C) Copyright 1995-1997 proDAD
- All Rights Reserved
-
- $AUT Holger Burkarth
- $DAT >>Trackdisk.h<< 23 Dec 1996 13:25:52 - (C) ProDAD
- *******************************************************************/
- #ifndef __INC_POS_PEXEC_DEVICE_H
- #include <pExec/Device.h>
- #endif
-
-
- /*----------------------------------
- -----------------------------------*/
- struct pOS_TrackdiskIO
- {
- /* struct pOS_IOStdReq */
-
- struct pOS_Message tdio_Message;
- struct pOS_Device *tdio_Device; /* device node pointer */
- struct pOS_Unit *tdio_Unit; /* unit (driver private)*/
- UWORD tdio_Command; /* (enum pOS_IOReqCommands) */
- UBYTE tdio_Flags; /* (enum pOS_IOReqFlags) */
- SBYTE tdio_Error; /* (enum pOS_IOReqErrors) */
- ULONG tdio_Actual; /* actual number of bytes transferred */
- ULONG tdio_Length; /* requested number bytes transferred */
- APTR tdio_Data; /* points to data area */
- ULONG tdio_HOffset; /* High - Offset */
- ULONG tdio_LOffset; /* Low - Offset */
- UBYTE tdio_Pad[8];
- ULONG tdio_Count; /* Diskchange counter */
- ULONG tdio_SecLabel;
-
- UBYTE tdio_Reserved[32];
- };
-
-
- enum pOS_TrackdiskIOReqCommands
- {
- TDCMDF_ExtCom = 0x8000,
-
- TDCMD_Motor=CMD_NONSTD,
- TDCMD_Seek,
- TDCMD_Format,
- TDCMD_Notify, /* Notify: Replyed by diskchange */
- TDCMD_ChangeNum,
- TDCMD_ChangeState,
- TDCMD_ProtStatus,
- TDCMD_RawRead,
- TDCMD_RawWrite,
- TDCMD_GetDriveType,
- TDCMD_GetNumTracks,
-
- TDCMD_AddChangeInt, /* (struct pOS_Interrupt*) */
- TDCMD_RemChangeInt, /* NOT AMIGA COMPATIBLE */
-
- TDCMD_GetGeometry,
- TDCMD_Eject,
- TDCMD_LastComm,
-
- TDCMDE_Write = TDCMDF_ExtCom | CMD_WRITE,
- TDCMDE_Read = TDCMDF_ExtCom | CMD_READ,
- TDCMDE_Motor = TDCMDF_ExtCom | TDCMD_Motor,
- TDCMDE_Seek = TDCMDF_ExtCom | TDCMD_Seek,
- TDCMDE_Format = TDCMDF_ExtCom | TDCMD_Format,
- TDCMDE_Update = TDCMDF_ExtCom | CMD_UPDATE,
- TDCMDE_Clear = TDCMDF_ExtCom | CMD_CLEAR,
- TDCMDE_RawRead = TDCMDF_ExtCom | TDCMD_RawRead,
- TDCMDE_RawWrite = TDCMDF_ExtCom | TDCMD_RawWrite,
-
- };
-
-
- enum pOS_TrackdiskIOReqErrors
- {
- TDIOERR_NotSpecified= 20, /* general catchall */
- TDIOERR_NoSecHdr= 21, /* couldn't even find a sector */
- TDIOERR_BadSecPreamble= 22, /* sector looked wrong */
- TDIOERR_BadSecID= 23, /* ditto */
- TDIOERR_BadHdrSum= 24, /* header had incorrect checksum */
- TDIOERR_BadSecSum= 25, /* data had incorrect checksum */
- TDIOERR_TooFewSecs= 26, /* couldn't find enough sectors */
- TDIOERR_BadSecHdr= 27, /* another "sector looked wrong" */
- TDIOERR_WriteProt= 28, /* can't write to a protected disk */
- TDIOERR_DiskChanged= 29, /* no disk in the drive */
- TDIOERR_SeekError= 30, /* couldn't find track 0 */
- TDIOERR_NoMem= 31, /* ran out of memory */
- TDIOERR_BadUnitNum= 32, /* asked for a unit > NUMUNITS */
- TDIOERR_BadDriveType= 33, /* not a drive that trackdisk groks */
- TDIOERR_DriveInUse= 34, /* someone else allocated the drive */
- TDIOERR_PostReset= 35, /* user hit reset; awaiting doom */
- };
-
-
-
-
-
-
- struct pOS_DriveGeometry
- {
- ULONG dg_SectorSize; /* in bytes */
- ULONG dg_TotalSectors; /* total # of sectors on drive */
- ULONG dg_Cylinders; /* number of cylinders */
- ULONG dg_CylSectors; /* number of sectors/cylinder */
- ULONG dg_Heads; /* number of surfaces */
- ULONG dg_TrackSectors; /* number of sectors/track */
- ULONG dg_BufMemType; /* preferred buffer memory type */
- /* (usually MEMF_PUBLIC) */
- UBYTE dg_DeviceType; /* (enum pOS_DriveGeometryType) */
- UBYTE dg_Flags; /* (enum pOS_DriveGeometryType) */
- ULONG dg_Reserved[16];
- };
-
-
-
- enum pOS_DriveGeometryType /** dg_DeviceType **/
- {
- DGEOTYP_DirectAccess = 0,
- DGEOTYP_SequentialAccess,
- DGEOTYP_Printer,
- DGEOTYP_Processor,
- DGEOTYP_Worm,
- DGEOTYP_CDRom,
- DGEOTYP_Scanner,
- DGEOTYP_OpticalDisk,
- DGEOTYP_MediumChanger,
- DGEOTYP_Communication,
-
- DGEOTYP_Unknown = 31
- };
-
-
- enum pOS_DriveGeometryFlags /** dg_Flags **/
- {
- DGEOB_Removable = 0,
-
- DGEOF_Removable = 1,
- };
-
-
- #endif
-