custom.i 6.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261
  1. AMIGA = 1
  2. AMIGADOS = 1
  3. OS_LEGAL = 1
  4. ;HARDWARE_REL = 1
  5. *****************************************************************************
  6. * SCREEN CONSTANTS *
  7. *****************************************************************************
  8. IFD AMIGA
  9. SCREEN_WIDTH = 40
  10. SCREEN_HEIGHT = 200
  11. NO_PLANES = 4
  12. NO_SCREENS = 2
  13. PLANE_SIZE = SCREEN_WIDTH*SCREEN_HEIGHT
  14. ELSEIF
  15. SCREEN_WIDTH = 40 160
  16. SCREEN_HEIGHT = 200
  17. NO_PLANES = 4
  18. NO_SCREENS = 2
  19. ENDC
  20. *****************************************************************************
  21. * HARDWARE *
  22. *****************************************************************************
  23. IFD AMIGADOS
  24. IFD HARDWARE_REL
  25. HARDWARE_REGS = $dff000
  26. BLTDDAT EQU $000
  27. DMACONR EQU $002
  28. VPOSR EQU $004
  29. VHPOSR EQU $006
  30. DSKDATR EQU $008
  31. JOY0DAT EQU $00A
  32. JOY1DAT EQU $00C
  33. CLXDAT EQU $00E
  34. ADKCONR EQU $010
  35. POT0DAT EQU $012
  36. POT1DAT EQU $014
  37. POTINP EQU $016
  38. SERDATR EQU $018
  39. DSKBYTR EQU $01A
  40. INTENAR EQU $01C
  41. INTREQR EQU $01E
  42. DSKPT EQU $020
  43. DSKLEN EQU $024
  44. DSKDAT EQU $026
  45. REFPTR EQU $028
  46. VPOSW EQU $02A
  47. VHPOSW EQU $02C
  48. COPCON EQU $02E
  49. SERDAT EQU $030
  50. SERPER EQU $032
  51. POTGO EQU $034
  52. JOYTEST EQU $036
  53. STREQU EQU $038
  54. STRVBL EQU $03A
  55. STRHOR EQU $03C
  56. STRLONG EQU $03E
  57. BLTCON0 EQU $040
  58. BLTCON1 EQU $042
  59. BLTAFWM EQU $044
  60. BLTALWM EQU $046
  61. BLTCPT EQU $048
  62. BLTBPT EQU $04C
  63. BLTAPT EQU $050
  64. BLTDPT EQU $054
  65. BLTSIZE EQU $058
  66. BLTCMOD EQU $060
  67. BLTBMOD EQU $062
  68. BLTAMOD EQU $064
  69. BLTDMOD EQU $066
  70. BLTCDAT EQU $070
  71. BLTBDAT EQU $072
  72. BLTADAT EQU $074
  73. DSKSYNC EQU $07E
  74. COP1LC EQU $080
  75. COP2LC EQU $084
  76. COPJMP1 EQU $088
  77. COPJMP2 EQU $08A
  78. COPINS EQU $08C
  79. DIWSTRT EQU $08E
  80. DIWSTOP EQU $090
  81. DDFSTRT EQU $092
  82. DDFSTOP EQU $094
  83. DMACON EQU $096
  84. CLXCON EQU $098
  85. INTENA EQU $09A
  86. INTREQ EQU $09C
  87. ADKCON EQU $09E
  88. AUD EQU $0A0
  89. AUD0 EQU $0A0
  90. AUD1 EQU $0B0
  91. AUD2 EQU $0C0
  92. AUD3 EQU $0D0
  93. AC_PTR EQU $00
  94. AC_LEN EQU $04
  95. AC_PER EQU $06
  96. AC_VOL EQU $08
  97. AC_DAT EQU $0A
  98. AC_SIZEOF EQU $10
  99. BPLPT EQU $0E0
  100. BPLCON0 EQU $100
  101. BPLCON1 EQU $102
  102. BPLCON2 EQU $104
  103. BPL1MOD EQU $108
  104. BPL2MOD EQU $10A
  105. BPLDAT EQU $110
  106. SPRPT EQU $120
  107. SPR0PT EQU $120
  108. SPR1PT EQU $124
  109. SPR2PT EQU $128
  110. SPR3PT EQU $12c
  111. SPR4PT EQU $130
  112. SPR5PT EQU $134
  113. SPR6PT EQU $138
  114. SPR7PT EQU $13c
  115. SPR EQU $140
  116. SD_POS EQU $00
  117. SD_CTL EQU $02
  118. SD_DATAA EQU $04
  119. SD_DATAB EQU $08
  120. COLOR EQU $180
  121. ELSEIF
  122. BLTDDAT EQU $dff000
  123. DMACONR EQU $dff002
  124. VPOSR EQU $dff004
  125. VHPOSR EQU $dff006
  126. DSKDATR EQU $dff008
  127. JOY0DAT EQU $dff00A
  128. JOY1DAT EQU $dff00C
  129. CLXDAT EQU $dff00E
  130. ADKCONR EQU $dff010
  131. POT0DAT EQU $dff012
  132. POT1DAT EQU $dff014
  133. POTINP EQU $dff016
  134. SERDATR EQU $dff018
  135. DSKBYTR EQU $dff01A
  136. INTENAR EQU $dff01C
  137. INTREQR EQU $dff01E
  138. DSKPT EQU $dff020
  139. DSKLEN EQU $dff024
  140. DSKDAT EQU $dff026
  141. REFPTR EQU $dff028
  142. VPOSW EQU $dff02A
  143. VHPOSW EQU $dff02C
  144. COPCON EQU $dff02E
  145. SERDAT EQU $dff030
  146. SERPER EQU $dff032
  147. POTGO EQU $dff034
  148. JOYTEST EQU $dff036
  149. STREQU EQU $dff038
  150. STRVBL EQU $dff03A
  151. STRHOR EQU $dff03C
  152. STRLONG EQU $dff03E
  153. BLTCON0 EQU $dff040
  154. BLTCON1 EQU $dff042
  155. BLTAFWM EQU $dff044
  156. BLTALWM EQU $dff046
  157. BLTCPT EQU $dff048
  158. BLTBPT EQU $dff04C
  159. BLTAPT EQU $dff050
  160. BLTDPT EQU $dff054
  161. BLTSIZE EQU $dff058
  162. BLTCMOD EQU $dff060
  163. BLTBMOD EQU $dff062
  164. BLTAMOD EQU $dff064
  165. BLTDMOD EQU $dff066
  166. BLTCDAT EQU $dff070
  167. BLTBDAT EQU $dff072
  168. BLTADAT EQU $dff074
  169. DSKSYNC EQU $dff07E
  170. COP1LC EQU $dff080
  171. COP2LC EQU $dff084
  172. COPJMP1 EQU $dff088
  173. COPJMP2 EQU $dff08A
  174. COPINS EQU $dff08C
  175. DIWSTRT EQU $dff08E
  176. DIWSTOP EQU $dff090
  177. DDFSTRT EQU $dff092
  178. DDFSTOP EQU $dff094
  179. DMACON EQU $dff096
  180. CLXCON EQU $dff098
  181. INTENA EQU $dff09A
  182. INTREQ EQU $dff09C
  183. ADKCON EQU $dff09E
  184. AUD EQU $dff0A0
  185. AUD0 EQU $dff0A0
  186. AUD1 EQU $dff0B0
  187. AUD2 EQU $dff0C0
  188. AUD3 EQU $dff0D0
  189. AC_PTR EQU $dff00
  190. AC_LEN EQU $dff04
  191. AC_PER EQU $dff06
  192. AC_VOL EQU $dff08
  193. AC_DAT EQU $dff0A
  194. AC_SIZEOF EQU $dff10
  195. BPLPT EQU $dff0E0
  196. BPLCON0 EQU $dff100
  197. BPLCON1 EQU $dff102
  198. BPLCON2 EQU $dff104
  199. BPL1MOD EQU $dff108
  200. BPL2MOD EQU $dff10A
  201. BPLDAT EQU $dff110
  202. SPRPT EQU $dff120
  203. SPR0PT EQU $dff120
  204. SPR1PT EQU $dff124
  205. SPR2PT EQU $dff128
  206. SPR3PT EQU $dff12c
  207. SPR4PT EQU $dff130
  208. SPR5PT EQU $dff134
  209. SPR6PT EQU $dff138
  210. SPR7PT EQU $dff13c
  211. SPR EQU $dff140
  212. SD_POS EQU $dff00
  213. SD_CTL EQU $dff02
  214. SD_DATAA EQU $dff04
  215. SD_DATAB EQU $dff08
  216. COLOR EQU $dff180
  217. ENDC
  218. ELSEIF
  219. fail 'ST HARDWARE ADDRESSES NOT IN YET'
  220. ENDC
  221. *****************************************************************************
  222. * MACHINE SPECIFIC OS FUNCTION NAMES *
  223. *****************************************************************************
  224. IFD AMIGADOS
  225. OwnBlitter = -456
  226. DisOwnBlitter = -462
  227. ELSEIF
  228. ENDC
  229. *****************************************************************************
  230. * MACHINE SPECIFIC MACROS *
  231. *****************************************************************************
  232. IFD AMIGADOS
  233. wait_blit macro
  234. .\@
  235. btst #6,DMACONR
  236. bne .\@
  237. endm
  238. own_blit macro ; takes a parameter = an address reg
  239. IFD OS_LEGAL
  240. move.l _GFXBase,\1 if !OS_LEGAL macro expands to nothing
  241. jsr OwnBlitter(\1)
  242. ENDC
  243. endm
  244. disown_blit macro ; takes a parameter = an address reg
  245. IFD OS_LEGAL
  246. move.l _GFXBase,\1 if !OS_LEGAL macro expands to nothing
  247. jsr DisOwnBlitter(\1)
  248. ENDC
  249. endm
  250. ELSEIF
  251. ENDC