1 #ifndef RESOURCES_DISK_H 2 #define RESOURCES_DISK_H 3 4 /* 5 disk.resource include 6 7 Copyright © 2002 The MorphOS Development Team, All Rights Reserved. 8 */ 9 10 #ifndef EXEC_TYPES_H 11 # include <exec/types.h> 12 #endif 13 14 #ifndef EXEC_LISTS_H 15 # include <exec/lists.h> 16 #endif 17 18 #ifndef EXEC_PORTS_H 19 # include <exec/ports.h> 20 #endif 21 22 #ifndef EXEC_INTERRUPTS_H 23 # include <exec/interrupts.h> 24 #endif 25 26 #ifndef EXEC_LIBRARIES_H 27 # include <exec/libraries.h> 28 #endif 29 30 #pragma pack(2) 31 32 33 struct DiscResourceUnit 34 { 35 struct Message dru_Message; 36 struct Interrupt dru_DiscBlock; 37 struct Interrupt dru_DiscSync; 38 struct Interrupt dru_Index; 39 }; 40 41 struct DiscResource 42 { 43 struct Library dr_Library; 44 struct DiscResourceUnit *dr_Current; 45 UBYTE dr_Flags; 46 UBYTE dr_pad; 47 struct Library *dr_SysLib; 48 struct Library *dr_CiaResource; 49 ULONG dr_UnitID[4]; 50 struct List dr_Waiting; 51 struct Interrupt dr_DiscBlock; 52 struct Interrupt dr_DiscSync; 53 struct Interrupt dr_Index; 54 struct Task *dr_CurrTask; 55 }; 56 57 58 #define DRB_ALLOC0 0 59 #define DRB_ALLOC1 1 60 #define DRB_ALLOC2 2 61 #define DRB_ALLOC3 3 62 #define DRB_ACTIVE 7 63 64 #define DRF_ALLOC0 (1<<DRB_ALLOC0) 65 #define DRF_ALLOC1 (1<<DRB_ALLOC1) 66 #define DRF_ALLOC2 (1<<DRB_ALLOC2) 67 #define DRF_ALLOC3 (1<<DRB_ALLOC3) 68 #define DRF_ACTIVE (1<<DRB_ACTIVE) 69 70 71 #define DSKDMAOFF 0x4000 72 73 74 #define DISKNAME "disk.resource" 75 76 77 #define DR_ALLOCUNIT ((LIB_BASE - 0) * LIB_VECTSIZE) 78 #define DR_FREEUNIT ((LIB_BASE - 1) * LIB_VECTSIZE) 79 #define DR_GETUNIT ((LIB_BASE - 2) * LIB_VECTSIZE) 80 #define DR_GIVEUNIT ((LIB_BASE - 3) * LIB_VECTSIZE) 81 #define DR_GETUNITID ((LIB_BASE - 4) * LIB_VECTSIZE) 82 #define DR_READUNITID ((LIB_BASE - 5) * LIB_VECTSIZE) 83 84 #define DR_LASTCOMM (DR_READUNITID) 85 86 87 #define DRT_AMIGA (0x00000000) 88 #define DRT_37422D2S (0x55555555) 89 #define DRT_EMPTY (0xFFFFFFFF) 90 #define DRT_150RPM (0xAAAAAAAA) 91 92 93 #pragma pack() 94 95 #endif /* RESOURCES_DISK_H */