Don't call ReadArgs() if started from WB.
[tangerine.git] / compiler / include / devices / trackdisk.h
blobbca22c5b2cbddddd45e934ce9d982ce53c874648
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 /* 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)
68 /* TD_GETDRIVETYPE */
69 #define DRIVE3_5 1
70 #define DRIVE3_25 2
71 #define DRIVE3_5_150RPM 3
73 struct DriveGeometry
75 ULONG dg_SectorSize;
76 ULONG dg_TotalSectors;
77 ULONG dg_Cylinders;
78 ULONG dg_CylSectors;
79 ULONG dg_Heads;
80 ULONG dg_TrackSectors;
81 ULONG dg_BufMemType;
82 UBYTE dg_DeviceType; /* see below */
83 UBYTE dg_Flags; /* see below */
84 UWORD dg_Reserved;
87 /* dg_DeviceType */
88 #define DG_DIRECT_ACCESS 0
89 #define DG_SEQUENTIAL_ACCESS 1
90 #define DG_PRINTER 2
91 #define DG_PROCESSOR 3
92 #define DG_WORM 4
93 #define DG_CDROM 5
94 #define DG_SCANNER 6
95 #define DG_OPTICAL_DISK 7
96 #define DG_MEDIUM_CHANGER 8
97 #define DG_COMMUNICATION 9
98 #define DG_UNKNOWN 31
100 /* dg_Flags */
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;
111 ULONG tdu_StepDelay;
112 ULONG tdu_SettleDelay;
113 UBYTE tdu_RetryCount;
114 UBYTE tdu_PubFlags; /* see below */
115 UWORD tdu_CurrTrk;
116 ULONG tdu_CalibrateDelay;
117 ULONG tdu_Counter;
120 /* tdu_PubFlags */
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 */