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)
56 /* extended commands */
57 #define TDF_EXTCOM (1<<15)
58 #define ETD_READ (CMD_READ | TDF_EXTCOM)
59 #define ETD_WRITE (CMD_WRITE | TDF_EXTCOM)
60 #define ETD_UPDATE (CMD_UPDATE | TDF_EXTCOM)
61 #define ETD_CLEAR (CMD_CLEAR | TDF_EXTCOM)
62 #define ETD_MOTOR (TD_MOTOR | TDF_EXTCOM)
63 #define ETD_SEEK (TD_SEEK | TDF_EXTCOM)
64 #define ETD_FORMAT (TD_FORMAT | TDF_EXTCOM)
65 #define ETD_RAWREAD (TD_RAWREAD | TDF_EXTCOM)
66 #define ETD_RAWWRITE (TD_RAWWRITE | TDF_EXTCOM)
71 #define DRIVE3_5_150RPM 3
76 ULONG dg_TotalSectors
;
80 ULONG dg_TrackSectors
;
82 UBYTE dg_DeviceType
; /* see below */
83 UBYTE dg_Flags
; /* see below */
88 #define DG_DIRECT_ACCESS 0
89 #define DG_SEQUENTIAL_ACCESS 1
91 #define DG_PROCESSOR 3
95 #define DG_OPTICAL_DISK 7
96 #define DG_MEDIUM_CHANGER 8
97 #define DG_COMMUNICATION 9
101 #define DGB_REMOVABLE 0
102 #define DGF_REMOVABLE (1<<0)
104 struct TDU_PublicUnit
106 struct Unit tdu_Unit
;
108 UWORD tdu_Comp01Track
;
109 UWORD tdu_Comp10Track
;
110 UWORD tdu_Comp11Track
;
112 ULONG tdu_SettleDelay
;
113 UBYTE tdu_RetryCount
;
114 UBYTE tdu_PubFlags
; /* see below */
116 ULONG tdu_CalibrateDelay
;
121 #define TDPB_NOCLICK 0
122 #define TDPF_NOCLICK (1L<<0)
124 #define TD_LABELSIZE 16
125 #define TD_SECTOR 512
126 #define TD_SECSHIFT 9
128 #define TDERR_NotSpecified 20
129 #define TDERR_NoSecHdr 21
130 #define TDERR_BadSecPreamble 22
131 #define TDERR_BadSecID 23
132 #define TDERR_BadHdrSum 24
133 #define TDERR_BadSecSum 25
134 #define TDERR_TooFewSecs 26
135 #define TDERR_BadSecHdr 27
136 #define TDERR_WriteProt 28
137 #define TDERR_DiskChanged 29
138 #define TDERR_SeekError 30
139 #define TDERR_NoMem 31
140 #define TDERR_BadUnitNum 32
141 #define TDERR_BadDriveType 33
142 #define TDERR_DriveInUse 34
143 #define TDERR_PostReset 35
145 #endif /* DEVICES_TRACKDISK_H */