home *** CD-ROM | disk | FTP | other *** search
/ Fresh Fish 4 / FreshFish_May-June1994.bin / bbs / cbm / nduk-v39.lha / V39 / include / resources / card.h < prev    next >
C/C++ Source or Header  |  1992-09-24  |  3KB  |  146 lines

  1. #ifndef    RESOURCES_CARD_H
  2. #define RESOURCES_CARD_H 1
  3.  
  4. /*
  5. **    $VER: card.h 1.9 (04.09.92)
  6. **    Includes Release 39.108
  7. **
  8. **    card.resource include file
  9. **
  10. **    (C) Copyright 1991-1992 Commodore-Amiga, Inc.
  11. **        All Rights Reserved
  12. **
  13. */
  14. #ifndef    EXEC_TYPES_H
  15. #include "exec/types.h"
  16. #endif
  17.  
  18. #ifndef    EXEC_NODES_H
  19. #include "exec/nodes.h"
  20. #endif
  21.  
  22. #ifndef    EXEC_INTERRUPTS_H
  23. #include "exec/interrupts.h"
  24. #endif
  25.  
  26. #define CARDRESNAME    "card.resource"
  27.  
  28. /* Structures used by the card.resource                */
  29.  
  30. struct    CardHandle {
  31.     struct Node cah_CardNode;
  32.     struct Interrupt *cah_CardRemoved;
  33.     struct Interrupt *cah_CardInserted;
  34.     struct Interrupt *cah_CardStatus;
  35.     UBYTE    cah_CardFlags;
  36. };
  37.  
  38. struct    DeviceTData {
  39.     ULONG    dtd_DTsize;    /* Size in bytes        */
  40.     ULONG    dtd_DTspeed;    /* Speed in nanoseconds        */
  41.     UBYTE    dtd_DTtype;    /* Type of card            */
  42.     UBYTE    dtd_DTflags;    /* Other flags            */
  43. };
  44.  
  45. struct    CardMemoryMap {
  46.     UBYTE    *cmm_CommonMemory;
  47.     UBYTE    *cmm_AttributeMemory;
  48.     UBYTE    *cmm_IOMemory;
  49. };
  50.  
  51. /* CardHandle.cah_CardFlags for OwnCard() function        */
  52.  
  53. #define    CARDB_RESETREMOVE    0
  54. #define CARDF_RESETREMOVE    (1<<CARDB_RESETREMOVE)
  55.  
  56. #define    CARDB_IFAVAILABLE    1
  57. #define    CARDF_IFAVAILABLE    (1<<CARDB_IFAVAILABLE)
  58.  
  59. #define CARDB_DELAYOWNERSHIP    2
  60. #define CARDF_DELAYOWNERSHIP    (1<<CARDB_DELAYOWNERSHIP)
  61.  
  62. /* ReleaseCreditCard() function flags                */
  63.  
  64. #define    CARDB_REMOVEHANDLE    0
  65. #define    CARDF_REMOVEHANDLE    (1<<CARDB_REMOVEHANDLE)
  66.  
  67. /* ReadStatus() return flags                    */
  68.  
  69. #define    CARD_STATUSB_CCDET        6
  70. #define CARD_STATUSF_CCDET        (1<<CARD_STATUSB_CCDET)
  71.  
  72. #define CARD_STATUSB_BVD1        5
  73. #define    CARD_STATUSF_BVD1        (1<<CARD_STATUSB_BVD1)
  74.  
  75. #define CARD_STATUSB_SC            5
  76. #define CARD_STATUSF_SC            (1<<CARD_STATUSB_SC)
  77.  
  78. #define CARD_STATUSB_BVD2        4
  79. #define    CARD_STATUSF_BVD2        (1<<CARD_STATUSB_BVD2)
  80.  
  81. #define CARD_STATUSB_DA            4
  82. #define CARD_STATUSF_DA            (1<<CARD_STATUSB_DA)
  83.  
  84. #define CARD_STATUSB_WR            3
  85. #define    CARD_STATUSF_WR            (1<<CARD_STATUSB_WR)
  86.  
  87. #define CARD_STATUSB_BSY        2
  88. #define CARD_STATUSF_BSY        (1<<CARD_STATUSB_BSY)
  89.  
  90. #define CARD_STATUSB_IRQ        2
  91. #define CARD_STATUSF_IRQ        (1<<CARD_STATUSB_IRQ)
  92.  
  93. /* CardProgramVoltage() defines */
  94.  
  95. #define CARD_VOLTAGE_0V        0    /* Set to default; may be the same as 5V */
  96. #define CARD_VOLTAGE_5V        1
  97. #define CARD_VOLTAGE_12V    2
  98.  
  99. /* CardMiscControl() defines */
  100.  
  101. #define    CARD_ENABLEB_DIGAUDIO    1
  102. #define    CARD_ENABLEF_DIGAUDIO    (1<<CARD_ENABLEB_DIGAUDIO)
  103.  
  104. #define    CARD_DISABLEB_WP    3
  105. #define    CARD_DISABLEF_WP    (1<<CARD_DISABLEB_WP)
  106.  
  107.  
  108. /* CardInterface() defines */
  109.  
  110. #define    CARD_INTERFACE_AMIGA_0    0
  111.  
  112. /*
  113.  * Tuple for Amiga execute-in-place software (e.g., games, or other
  114.  * such software which wants to use execute-in-place software stored
  115.  * on a credit-card, such as a ROM card).
  116.  *
  117.  * See documentatin for IfAmigaXIP().
  118.  */
  119.  
  120. #define    CISTPL_AMIGAXIP    0x91
  121.  
  122. struct    TP_AmigaXIP {
  123.     UBYTE    TPL_CODE;
  124.     UBYTE    TPL_LINK;
  125.     UBYTE    TP_XIPLOC[4];
  126.     UBYTE    TP_XIPFLAGS;
  127.     UBYTE    TP_XIPRESRV;
  128.     };
  129. /*
  130.  
  131.     ; The XIPFLAGB_AUTORUN bit means that you want the machine
  132.     ; to perform a reset if the execute-in-place card is inserted
  133.     ; after DOS has been started.  The machine will then reset,
  134.     ; and execute your execute-in-place code the next time around.
  135.     ;
  136.     ; NOTE -- this flag may be ignored on some machines, in which
  137.     ; case the user will have to manually reset the machine in the
  138.     ; usual way.
  139.  
  140. */
  141.  
  142. #define    XIPFLAGSB_AUTORUN    0
  143. #define XIPFLAGSF_AUTORUN    (1<<XIPFLAGSB_AUTORUN)
  144.  
  145. #endif    /* RESOURCES_CARD_H */
  146.