Modules/FDDv2 - VFS interface almost done, Caching added
[tpg/acess2.git] / Modules / Storage / FDDv2 / common.h
1 /*
2  * Acess2 82077AA FDC
3  * - By John Hodge (thePowersGang)
4  *
5  * common.h
6  * - Common definitions
7  */
8 #ifndef _FDC_COMMON_H_
9 #define _FDC_COMMON_H_
10
11 #include <mutex.h>
12
13 // === CONSTANTS ===
14 #define MAX_DISKS       8       // 4 per controller, 2 controllers
15 #define TRACKS_PER_DISK (1440*2/18)
16 #define BYTES_PER_TRACK (18*512)
17
18 // === TYPEDEFS ===
19 typedef struct sFDD_Drive       tDrive;
20
21 // === STRUCTURES ===
22 struct sFDD_Drive
23 {
24          int    bValid;
25          int    bInserted;
26          int    MotorState;
27          int    Timer;
28
29         tMutex  Mutex;
30         
31         void    *TrackData[TRACKS_PER_DISK];    // Whole tracks are read
32 };
33
34 // === FUNCTIONS ===
35 extern int      FDD_SetupIO(void);
36 extern int      FDD_int_ReadWriteTrack(int Disk, int Track, int bWrite, void *Buffer);
37
38 // === GLOBALS ===
39 extern tDrive   gaFDD_Disks[MAX_DISKS];
40
41 #endif
42

UCC git Repository :: git.ucc.asn.au