home *** CD-ROM | disk | FTP | other *** search
/ Amiga ISO Collection / AmigaUtilCD2.iso / Programming / C / BC_DICE2.DMS / in.adf / INCLUDE / resources / disk.h < prev    next >
Encoding:
C/C++ Source or Header  |  1995-01-10  |  1.8 KB  |  106 lines

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