2 Copyright © 1995-2007, The AROS Development Team. All rights reserved.
5 Desc: Internal defs for trackdisk
8 #ifndef TRACKDISK_DEVICE_H
9 #define TRACKDISK_DEVICE_H
11 #include <exec/types.h>
12 #include <exec/devices.h>
13 #include <exec/semaphores.h>
14 #include <exec/interrupts.h>
15 #include <exec/tasks.h>
17 #include <devices/trackdisk.h>
18 #include <resources/disk.h>
20 /* Stack size - 4096 longwords should be enough */
21 #define STACK_SIZE 16384
23 /* Maximum number of units */
27 #define TDUF_WRITE (1<<0)
29 #define TDU_NODISK 0x00
32 #define TDU_READONLY 0x01
33 #define TDU_WRITABLE 0x00
35 #define DT_UNDETECTED 0
41 struct TDU_PublicUnit pub
;
42 struct List tdu_Listeners
;
43 UBYTE tdu_UnitNum
; /* Unit number */
44 UBYTE tdu_DiskIn
; /* Disk in drive? */
45 UBYTE tdu_MotorOn
; /* Motor on? */
48 BOOL tdu_hddisk
; /* HD disk inserted */
49 BOOL tdu_broken
; /* recalibrate didn't find TRACK0, drive ignored */
50 UBYTE tdu_sectors
; /* number of sectors per track */
57 struct Device td_device
;
58 struct TaskData
*td_TaskData
;
59 struct TDU
*td_Units
[TD_NUMUNITS
];
60 struct timerequest
*td_TimerIO
;
61 struct timerequest
*td_TimerIO2
;
62 struct MsgPort
*td_TimerMP
;
63 struct MsgPort
*td_TimerMP2
;
64 struct DiskBase
*td_DiskBase
;
65 struct DiscResourceUnit td_dru
;
66 struct MsgPort td_druport
;
67 struct MsgPort td_Port
; // MessagePort
69 APTR td_DMABuffer
; /* Buffer for DMA accesses */
72 volatile struct Custom
*custom
;
73 volatile struct CIA
*ciaa
;
74 volatile struct CIA
*ciab
;
79 BYTE td_buffer_unit
; /* buffer contains this unit's track */
80 UBYTE td_lastdir
; /* last step direction */
82 UWORD
*crc_table16
; /* PCDOS checksum table */
85 #endif /* TRACKDISK_DEVICE_H */