scripts: prepare new configuration for x86_64 on vault13 server using pre build cross...
[AROS.git] / compiler / include / devices / trackdisk.h
blob3e1aef7866718c26ba8f5602dce250345f5c0cbe
1 #ifndef DEVICES_TRACKDISK_H
2 #define DEVICES_TRACKDISK_H
4 /*
5 Copyright © 1995-2001, The AROS Development Team. All rights reserved.
6 $Id$
8 Desc: Definitions for trackdisk.device
9 Lang: english
12 #ifndef EXEC_DEVICE_H
13 # include <exec/devices.h>
14 #endif
15 #ifndef EXEC_IO_H
16 # include <exec/io.h>
17 #endif
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)
25 struct IOExtTD
27 struct IOStdReq iotd_Req;
28 ULONG iotd_Count;
29 ULONG iotd_SecLabel;
32 /* io_Flags */
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 /* TD64 commands */
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)
74 /* TD_GETDRIVETYPE */
75 #define DRIVE3_5 1
76 #define DRIVE3_25 2
77 #define DRIVE3_5_150RPM 3
79 struct DriveGeometry
81 ULONG dg_SectorSize;
82 ULONG dg_TotalSectors;
83 ULONG dg_Cylinders;
84 ULONG dg_CylSectors;
85 ULONG dg_Heads;
86 ULONG dg_TrackSectors;
87 ULONG dg_BufMemType;
88 UBYTE dg_DeviceType; /* see below */
89 UBYTE dg_Flags; /* see below */
90 UWORD dg_Reserved;
93 /* dg_DeviceType */
94 #define DG_DIRECT_ACCESS 0
95 #define DG_SEQUENTIAL_ACCESS 1
96 #define DG_PRINTER 2
97 #define DG_PROCESSOR 3
98 #define DG_WORM 4
99 #define DG_CDROM 5
100 #define DG_SCANNER 6
101 #define DG_OPTICAL_DISK 7
102 #define DG_MEDIUM_CHANGER 8
103 #define DG_COMMUNICATION 9
104 #define DG_UNKNOWN 31
106 /* dg_Flags */
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;
117 ULONG tdu_StepDelay;
118 ULONG tdu_SettleDelay;
119 UBYTE tdu_RetryCnt;
120 UBYTE tdu_PubFlags; /* see below */
121 UWORD tdu_CurrTrk;
122 ULONG tdu_CalibrateDelay;
123 ULONG tdu_Counter;
126 /* tdu_PubFlags */
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 */