home *** CD-ROM | disk | FTP | other *** search
/ Fresh Fish 4 / FreshFish_May-June1994.bin / bbs / cbm / nduk-v39.lha / V39 / include / resources / card.i < prev    next >
Text File  |  1992-09-24  |  5KB  |  190 lines

  1.     IFND    RESOURCES_CARD_I
  2. RESOURCES_CARD_I    SET    1
  3.  
  4. **
  5. **    $VER: card.i 1.7 (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. **
  15.  
  16.     IFND    EXEC_TYPES_I
  17.     INCLUDE    "exec/types.i"
  18.     ENDC
  19.  
  20.  
  21.     IFND    EXEC_NODES_I
  22.     INCLUDE    "exec/nodes.i"
  23.     ENDC
  24.  
  25.  
  26. * Macro - card resource name
  27.  
  28. CARDRESNAME    MACRO
  29.         dc.b    'card.resource',0
  30.         ds.w    0
  31.         ENDM
  32.  
  33. * Structures used by the card.resource
  34.  
  35.  STRUCTURE    CardHandle,0
  36.     STRUCT    cah_CardNode,LN_SIZE
  37.     APTR    cah_CardRemoved
  38.     APTR    cah_CardInserted
  39.     APTR    cah_CardStatus
  40.     UBYTE    cah_CardFlags
  41.     ALIGNWORD
  42.     LABEL    CardHandle_SIZEOF
  43.  
  44.  STRUCTURE    DeviceTData,0
  45.     ULONG    dtd_DTsize            ;Size of card (bytes)
  46.     ULONG    dtd_DTspeed            ;Speed of card in nanoseconds
  47.     UBYTE    dtd_DTtype            ;Type of card
  48.     UBYTE    dtd_DTflags            ;other flags
  49.     ALIGNWORD
  50.     LABEL    DeviceTData_SIZEOF
  51.  
  52.  
  53.  STRUCTURE    CardMemoryMap,0
  54.     APTR    cmm_CommonMemory
  55.     APTR    cmm_AttributeMemory
  56.     APTR    cmm_IOMemory
  57.     LABEL    CardMemoryMap_SIZEOF
  58.  
  59. * CardHandle.cah_CardFlags for OwnCard() function
  60.  
  61.     ; The CARDB_RESETREMOVE flag means you want the machine to
  62.     ; perform a HARDWARE RESET if the card in the credit-card slot is
  63.     ; removed while you own the CardSemaphore.
  64.  
  65.     BITDEF    CARD,RESETREMOVE,0    ;Hardware reset on card remove
  66.  
  67.     ; The CARDB_IFAVAILABLE flag means you only want your CardHandle
  68.     ; structure enqueued IF the credit card can be owned immediately.
  69.  
  70.     BITDEF    CARD,IFAVAILABLE,1
  71.  
  72.     ; The CARDB_DELAYOWNERSHIP flag means you never want a successful
  73.     ; return from OwnCard() even if the credit-card is available.  Rather
  74.     ; you will be notified of ownership via your cah_CardInserted
  75.     ; interrupt vector.
  76.  
  77.     BITDEF    CARD,DELAYOWNERSHIP,2
  78.  
  79. * ReleaseCard() function flags
  80.  
  81.     ; The CARDB_REMOVEHANDLE flag means you want to remove your
  82.     ; CardHandle structure from the list of CardHandle structures
  83.     ; whether or not you own the credit-card in the slot.
  84.  
  85.     BITDEF    CARD,REMOVEHANDLE,0
  86.  
  87. * ReadStatus() return flags
  88.  
  89.     BITDEF    CARD_STATUS,CCDET,6    ; Credit CARD_STATUS detect (1 == detected)
  90.     BITDEF    CARD_STATUS,BVD1,5    ; Battery Voltage Detect 1
  91.     BITDEF    CARD_STATUS,SC,5    ; Credit-CARD_STATUS (internal) status change
  92.     BITDEF    CARD_STATUS,BVD2,4    ; Battery Voltage Detect 2
  93.     BITDEF    CARD_STATUS,DA,4    ; Digital audio
  94.     BITDEF    CARD_STATUS,WR,3    ; Write enable (1 == enabled)
  95.     BITDEF    CARD_STATUS,BSY,2    ; Credit CARD_STATUS Busy
  96.     BITDEF    CARD_STATUS,IRQ,2    ; Interrupt request
  97.  
  98. * CardProgramVoltage() defines
  99.  
  100. CARD_VOLTAGE_0V        EQU    0    ; Set to default; maybe the same as 5V
  101. CARD_VOLTAGE_5V        EQU    1
  102. CARD_VOLTAGE_12V    EQU    2
  103.  
  104. * CardMiscControl() defines
  105.  
  106.     BITDEF    CARD_ENABLE,DIGAUDIO,1
  107.     BITDEF    CARD_DISABLE,WP,3
  108.  
  109. * CardInterface() defines
  110.  
  111. CARD_INTERFACE_AMIGA_0    EQU    0
  112.  
  113. * Tuple for Amiga execute-in-place software (e.g., games, or other
  114. * such software which want to use execute-in-place software stored
  115. * on a credit-card, such as a ROM card).
  116. *
  117. * See documentation for IfAmigaXIP().
  118.  
  119. CISTPL_AMIGAXIP    EQU    $91    ;Tuple code
  120.  
  121.  STRUCTURE    TP_AmigaXIP,0
  122.     STRUCT    tp_AmigaXIP,2
  123.     STRUCT    TP_XIPLOC,4
  124.     STRUCT    TP_XIPFLAGS,1
  125.     STRUCT    TP_XIPRESRV,1
  126.  
  127.     LABEL    TP_AmigaXIP_SIZEOF
  128.  
  129. *------ TP_BOOTFLAGS --------------------------------------------
  130.  
  131.     ; The XIPFLAGF_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.     BITDEF    XIPFLAG,AUTORUN,0
  141.  
  142. *------- For assembly modules to use if amiga.lib has not been updated
  143.  
  144.     IFD    CARD_INTERNAL_LVOS
  145.  
  146. *
  147. * Resource Vector Offsets
  148. *
  149.  
  150. RES_RESERVED    EQU    0
  151. RES_USERDEF    EQU    LIB_BASE-(RES_RESERVED*LIB_VECTSIZE)
  152. RES_NONSTD    EQU    RES_USERDEF
  153.  
  154. RESINIT        MACRO    ; [baseOffset ]
  155.         IFC    '\1',''
  156. COUNT_RES    SET    RES_USERDEF
  157.         ENDC
  158.         IFNC    '\1',''
  159. COUNT_RES    SET    \1
  160.         ENDC
  161.         ENDM
  162.  
  163.  
  164. RESDEF        MACRO    ; library Function Symbol
  165. \1        EQU    COUNT_RES
  166. COUNT_RES    SET    COUNT_RES-LIB_VECTSIZE
  167.         ENDM
  168.  
  169.     RESINIT
  170.     RESDEF    _LVOOwnCard
  171.     RESDEF    _LVOReleaseCard
  172.     RESDEF    _LVOGetCardMap
  173.     RESDEF    _LVOBeginCardAccess
  174.     RESDEF    _LVOEndCardAccess
  175.     RESDEF    _LVOReadCardStatus
  176.     RESDEF    _LVOCardResetRemove
  177.     RESDEF    _LVOCardMiscControl
  178.     RESDEF    _LVOCardAccessSpeed
  179.     RESDEF    _LVOCardProgramVoltage
  180.     RESDEF    _LVOCardResetCard
  181.     RESDEF    _LVOCopyTuple
  182.     RESDEF    _LVODeviceTuple
  183.     RESDEF    _LVOIfAmigaXIP
  184.     RESDEF    _LVOCardForceChange
  185.     RESDEF    _LVOCardChangeCount
  186.     RESDEF    _LVOCardInterface
  187.  
  188.     ENDC    ; CARD_INTERNAL_LVOS
  189.     ENDC    ; RESOURCES_CARD_I
  190.