home *** CD-ROM | disk | FTP | other *** search
/ Aminet 10 / aminetcdnumber101996.iso / Aminet / dev / misc / ReCop39_12.lha / recop39_12 / copmacros.i next >
Text File  |  1995-05-27  |  2KB  |  130 lines

  1.     IFND    COPMACROS_I
  2. COPMACROS_I    SET    1
  3.  
  4. ; $VER: copmacros.i 3.5 (9.5.95)
  5. ; by Bruce M. Simpson
  6.  
  7. ;---------------------------------------------------------------------------
  8.  
  9. bpl1pth    EQU   $0E0
  10. bpl1ptl    EQU   $0E2
  11. bpl2pth    EQU   $0E4
  12. bpl2ptl    EQU   $0E6
  13. bpl3pth    EQU   $0E8
  14. bpl3ptl    EQU   $0EA
  15. bpl4pth    EQU   $0EC
  16. bpl4ptl    EQU   $0EE
  17. bpl5pth    EQU   $0F0
  18. bpl5ptl    EQU   $0F2
  19. bpl6pth    EQU   $0F4
  20. bpl6ptl    EQU   $0F6
  21.  
  22.     IFND    _PHXASS_
  23. alignlong    MACRO
  24.     CNOP    0,4
  25.     ENDM
  26.     ENDC
  27.  
  28. align64        MACRO
  29.     CNOP    0,8
  30.     ENDM
  31.  
  32. ;---------------------------------------------------------------------------
  33.  
  34. ;Copperlist Macros
  35.  
  36. ;---------------------------------------------------------------------------
  37.  
  38. cmove    macro    value,register        ; reverse order from how it occurs in RAM
  39.     IFNE    NARG-2                    ; -makes it look like a real opcode ;)
  40.     FAIL    !!!
  41.     MEXIT
  42.     ENDC
  43.     dc.w    \2,\1
  44.     endm
  45.  
  46. ;---------------------------------------------------------------------------
  47.  
  48. ;0<=x<=127, 0<=y<=255, 0<=ycmp<=255, 0<=xcmp<=63, bfd (if present)
  49.  
  50. cwait    macro    y,x,ycmp,xcmp,bfd
  51.     IFEQ    NARG-5
  52.     dc.w    (\1<<8)!(\2<<1)!1,(\3<<7)!(\4<<1)&($7FFE)
  53.     MEXIT
  54.     ENDC
  55.     IFEQ    NARG-4
  56.     dc.w    (\1<<8)!(\2<<1)!1,(1<<15)!(\3<<7)!(\4<<1)&($FFFE)
  57.     MEXIT
  58.     ENDC
  59.     IFEQ    NARG-2
  60.     dc.w    (\1<<8)!(\2<<1)!1,$FFFE
  61.     MEXIT
  62.     ENDC
  63.     FAIL    'error in CWAIT macro call'
  64.     ENDM
  65.  
  66.  
  67. ;0<=x<=127, 0<=y<=255, 0<=ycmp<=255, 0<=xcmp<=63, bfd (if present)
  68.  
  69. cskip    macro    y,x,ycmp,xcmp,bfd
  70.     IFEQ    NARG-5
  71.     dc.w    (\1<<8)!(\2<<1)!1,((\3<<7)!(\4<<1)!1)&($7FFF)
  72.     MEXIT
  73.     ENDC
  74.     ENDC
  75.     IFEQ    NARG-4
  76.     dc.w    (\1<<8)!(\2<<1)!1,(1<<15)!(\3<<7)!(\4<<1)!1
  77.     MEXIT
  78.     ENDC
  79.     IFEQ    NARG-2
  80.     dc.w    (\1<<8)!(\2<<1)!1,$FFFF
  81.     MEXIT
  82.     FAIL    'error in CSKIP macro call'
  83.     ENDM
  84.  
  85. ;---------------------------------------------------------------------------
  86.  
  87. cend    macro
  88.     dc.w    $FFFF,$FFFE
  89.     endm
  90.  
  91. ;---------------------------------------------------------------------------
  92. ; copper color register equates
  93.  
  94. color0    EQU    $180
  95. color1    EQU    $182
  96. color2    EQU    $184
  97. color3    EQU    $186
  98. color4    EQU    $188
  99. color5    EQU    $18A
  100. color6    EQU    $18C
  101. color7    EQU    $18E
  102. color8    EQU    $190
  103. color9    EQU    $192
  104. color10    EQU    $194
  105. color11    EQU    $196
  106. color12    EQU    $198
  107. color13    EQU    $19A
  108. color14    EQU    $19C
  109. color15    EQU    $19E
  110. color16    EQU    $1A0
  111. color17    EQU    $1A2
  112. color18    EQU    $1A4
  113. color19    EQU    $1A6
  114. color20    EQU    $1A8
  115. color21    EQU    $1AA
  116. color22    EQU    $1AC
  117. color23    EQU    $1AE
  118. color24    EQU    $1B0
  119. color25    EQU    $1B2
  120. color26    EQU    $1B4
  121. color27    EQU    $1B6
  122. color28    EQU    $1B8
  123. color29    EQU    $1BA
  124. color30    EQU    $1BC
  125. color31    EQU    $1BE
  126.  
  127. ;---------------------------------------------------------------------------
  128.  
  129.     ENDC    !MYMACROS_I
  130.