1 #ifndef DEVICES_TRACKDISK_H
2 #define DEVICES_TRACKDISK_H
5 Copyright © 1995-2001, The AROS Development Team. All rights reserved.
8 Desc: Definitions for trackdisk.device
13 # include <exec/devices.h>
19 #define TD_NAME "trackdisk.device"
21 /* OpenDevice() Flags */
22 #define TDB_ALLOW_NON_3_5 0
23 #define TDF_ALLOW_NON_3_5 (1<<0)
27 struct IOStdReq iotd_Req
;
33 #define IOTDB_INDEXSYNC 4
34 #define IOTDF_INDEXSYNC (1<<4)
35 #define IOTDB_WORDSYNC 5
36 #define IOTDF_WORDSYNC (1<<5)
38 /* trackdisk.device specific commands */
39 #define TD_MOTOR (CMD_NONSTD + 0)
40 #define TD_SEEK (CMD_NONSTD + 1)
41 #define TD_FORMAT (CMD_NONSTD + 2)
42 #define TD_REMOVE (CMD_NONSTD + 3)
43 #define TD_CHANGENUM (CMD_NONSTD + 4)
44 #define TD_CHANGESTATE (CMD_NONSTD + 5)
45 #define TD_PROTSTATUS (CMD_NONSTD + 6)
46 #define TD_RAWREAD (CMD_NONSTD + 7)
47 #define TD_RAWWRITE (CMD_NONSTD + 8)
48 #define TD_GETDRIVETYPE (CMD_NONSTD + 9) /* see below */
49 #define TD_GETNUMTRACKS (CMD_NONSTD + 10)
50 #define TD_ADDCHANGEINT (CMD_NONSTD + 11)
51 #define TD_REMCHANGEINT (CMD_NONSTD + 12)
52 #define TD_GETGEOMETRY (CMD_NONSTD + 13) /* returns (DriveGeometry *) */
53 #define TD_EJECT (CMD_NONSTD + 14)
54 #define TD_LASTCOMM (CMD_NONSTD + 15)
57 #define TD_READ64 (CMD_NONSTD + 15)
58 #define TD_WRITE64 (CMD_NONSTD + 16)
59 #define TD_SEEK64 (CMD_NONSTD + 17)
60 #define TD_FORMAT64 (CMD_NONSTD + 18)
62 /* extended commands */
63 #define TDF_EXTCOM (1<<15)
64 #define ETD_READ (CMD_READ | TDF_EXTCOM)
65 #define ETD_WRITE (CMD_WRITE | TDF_EXTCOM)
66 #define ETD_UPDATE (CMD_UPDATE | TDF_EXTCOM)
67 #define ETD_CLEAR (CMD_CLEAR | TDF_EXTCOM)
68 #define ETD_MOTOR (TD_MOTOR | TDF_EXTCOM)
69 #define ETD_SEEK (TD_SEEK | TDF_EXTCOM)
70 #define ETD_FORMAT (TD_FORMAT | TDF_EXTCOM)
71 #define ETD_RAWREAD (TD_RAWREAD | TDF_EXTCOM)
72 #define ETD_RAWWRITE (TD_RAWWRITE | TDF_EXTCOM)
77 #define DRIVE3_5_150RPM 3
82 ULONG dg_TotalSectors
;
86 ULONG dg_TrackSectors
;
88 UBYTE dg_DeviceType
; /* see below */
89 UBYTE dg_Flags
; /* see below */
94 #define DG_DIRECT_ACCESS 0
95 #define DG_SEQUENTIAL_ACCESS 1
97 #define DG_PROCESSOR 3
101 #define DG_OPTICAL_DISK 7
102 #define DG_MEDIUM_CHANGER 8
103 #define DG_COMMUNICATION 9
104 #define DG_UNKNOWN 31
107 #define DGB_REMOVABLE 0
108 #define DGF_REMOVABLE (1<<0)
110 struct TDU_PublicUnit
112 struct Unit tdu_Unit
;
114 UWORD tdu_Comp01Track
;
115 UWORD tdu_Comp10Track
;
116 UWORD tdu_Comp11Track
;
118 ULONG tdu_SettleDelay
;
120 UBYTE tdu_PubFlags
; /* see below */
122 ULONG tdu_CalibrateDelay
;
127 #define TDPB_NOCLICK 0
128 #define TDPF_NOCLICK (1L<<0)
130 #define TD_LABELSIZE 16
131 #define TD_SECTOR 512
132 #define TD_SECSHIFT 9
134 #define TDERR_NotSpecified 20
135 #define TDERR_NoSecHdr 21
136 #define TDERR_BadSecPreamble 22
137 #define TDERR_BadSecID 23
138 #define TDERR_BadHdrSum 24
139 #define TDERR_BadSecSum 25
140 #define TDERR_TooFewSecs 26
141 #define TDERR_BadSecHdr 27
142 #define TDERR_WriteProt 28
143 #define TDERR_DiskChanged 29
144 #define TDERR_SeekError 30
145 #define TDERR_NoMem 31
146 #define TDERR_BadUnitNum 32
147 #define TDERR_BadDriveType 33
148 #define TDERR_DriveInUse 34
149 #define TDERR_PostReset 35
151 #endif /* DEVICES_TRACKDISK_H */