home *** CD-ROM | disk | FTP | other *** search
/ Amiga Developer CD v1.2 / amidev_cd_12.iso / reference_library / hardware / hard_examples / hw_examples.i < prev    next >
Text File  |  1992-08-20  |  11KB  |  317 lines

  1. ;
  2. ; hw_examples.i
  3. ;
  4. ; This appendix contains an include file that maps the hardware
  5. ; register names, given in Appendix A and Appendix B, to names that can
  6. ; be resolved by the standard include files. Use of these names in code
  7. ; sections of this manual places the emphasis on what the code is
  8. ; doing, rather than getting bogged down in include file names.
  9. ;
  10. ; All code examples in this manual reference the names given in this
  11. ; file.
  12. ;
  13.                         IFND    HARDWARE_HW_EXAMPLES_I
  14. HARDWARE_HW_EXAMPLES_I  SET     1
  15. **
  16. **       Filename: hardware/hw_examples.i
  17. **      $Release: 1.3 $
  18. **
  19. **      (C) Copyright 1985,1986,1987,1988,1989 Commodore-Amiga, Inc.
  20. **          All Rights Reserved
  21. **
  22. *******************************************************************************
  23.  
  24.         IFND    HARDWARE_CUSTOM_I
  25.         INCLUDE "hardware/custom.i"
  26.         ENDC
  27.  
  28. *******************************************************************************
  29. *
  30. *  This include file is designed to be used in conjunction with the hardware
  31. *  manual examples.  This file defines the register names based on the
  32. *  hardware/custom.i definition file.  There is no C-Language version of this
  33. *  file.
  34. *
  35. *******************************************************************************
  36. *
  37. * This instruction for the copper will cause it to wait forever since
  38. * the wait command described in it will never happen.
  39. *
  40. COPPER_HALT     equ     $FFFFFFFE
  41. *
  42. *******************************************************************************
  43. *
  44. * This is the offset in the 680x0 address space to the custom chip registers
  45. * It is the same as  _custom  when linking with AMIGA.lib
  46. *
  47. CUSTOM          equ     $DFF000
  48. *
  49. * Various control registers
  50. *
  51. DMACONR         equ     dmaconr         ; Just capitalization...
  52. VPOSR           equ     vposr           ;  "         "
  53. VHPOSR          equ     vhposr          ;  "         "
  54. JOY0DAT         equ     joy0dat         ;  "         "
  55. JOY1DAT         equ     joy1dat         ;  "         "
  56. CLXDAT          equ     clxdat          ;  "         "
  57. ADKCONR         equ     adkconr         ;  "         "
  58. POT0DAT         equ     pot0dat         ;  "         "
  59. POT1DAT         equ     pot1dat         ;  "         "
  60. POTINP          equ     potinp          ;  "         "
  61. SERDATR         equ     serdatr         ;  "         "
  62. INTENAR         equ     intenar         ;  "         "
  63. INTREQR         equ     intreqr         ;  "         "
  64. REFPTR          equ     refptr          ;  "         "
  65. VPOSW           equ     vposw           ;  "         "
  66. VHPOSW          equ     vhposw          ;  "         "
  67. SERDAT          equ     serdat          ;  "         "
  68. SERPER          equ     serper          ;  "         "
  69. POTGO           equ     potgo           ;  "         "
  70. JOYTEST         equ     joytest         ;  "         "
  71. STREQU          equ     strequ          ;  "         "
  72. STRVBL          equ     strvbl          ;  "         "
  73. STRHOR          equ     strhor          ;  "         "
  74. STRLONG         equ     strlong         ;  "         "
  75. DIWSTRT         equ     diwstrt         ;  "         "
  76. DIWSTOP         equ     diwstop         ;  "         "
  77. DDFSTRT         equ     ddfstrt         ;  "         "
  78. DDFSTOP         equ     ddfstop         ;  "         "
  79. DMACON          equ     dmacon          ;  "         "
  80. INTENA          equ     intena          ;  "         "
  81. INTREQ          equ     intreq          ;  "         "
  82. *
  83. * Disk control registers
  84. *
  85. DSKBYTR         equ     dskbytr         ; Just capitalization...
  86. DSKPT           equ     dskpt           ;  "         "
  87. DSKPTH          equ     dskpt
  88. DSKPTL          equ     dskpt+$02
  89. DSKLEN          equ     dsklen          ;  "         "
  90. DSKDAT          equ     dskdat          ;  "         "
  91. DSKSYNC         equ     dsksync         ;  "         "
  92. *
  93. * Blitter registers
  94. *
  95. BLTCON0         equ     bltcon0         ; Just capitalization...
  96. BLTCON1         equ     bltcon1         ;  "         "
  97. BLTAFWM         equ     bltafwm         ;  "         "
  98. BLTALWM         equ     bltalwm         ;  "         "
  99. BLTCPT          equ     bltcpt          ;  "         "
  100. BLTCPTH         equ     bltcpt
  101. BLTCPTL         equ     bltcpt+$02
  102. BLTBPT          equ     bltbpt          ;  "         "
  103. BLTBPTH         equ     bltbpt
  104. BLTBPTL         equ     bltbpt+$02
  105. BLTAPT          equ     bltapt          ;  "         "
  106. BLTAPTH         equ     bltapt
  107. BLTAPTL         equ     bltapt+$02
  108. BLTDPT          equ     bltdpt          ;  "         "
  109. BLTDPTH         equ     bltdpt
  110. BLTDPTL         equ     bltdpt+$02
  111. BLTSIZE         equ     bltsize         ;  "         "
  112. BLTCMOD         equ     bltcmod         ;  "         "
  113. BLTBMOD         equ     bltbmod         ;  "         "
  114. BLTAMOD         equ     bltamod         ;  "         "
  115. BLTDMOD         equ     bltdmod         ;  "         "
  116. BLTCDAT         equ     bltcdat         ;  "         "
  117. BLTBDAT         equ     bltbdat         ;  "         "
  118. BLTADAT         equ     bltadat         ;  "         "
  119. BLTDDAT         equ     bltddat         ;  "         "
  120. *
  121. * Copper control registers
  122. *
  123. COPCON          equ     copcon          ; Just capitalization...
  124. COPINS          equ     copins          ;  "         "
  125. COPJMP1         equ     copjmp1         ;  "         "
  126. COPJMP2         equ     copjmp2         ;  "         "
  127. COP1LC          equ     cop1lc          ;  "         "
  128. COP1LCH         equ     cop1lc
  129. COP1LCL         equ     cop1lc+$02
  130. COP2LC          equ     cop2lc          ;  "         "
  131. COP2LCH         equ     cop2lc
  132. COP2LCL         equ     cop2lc+$02
  133. *
  134. *
  135. * Audio channel registers
  136. *
  137. ADKCON          equ     adkcon          ; Just capitalization...
  138.  
  139. AUD0LC          equ     aud0
  140. AUD0LCH         equ     aud0
  141. AUD0LCL         equ     aud0+$02
  142. AUD0LEN         equ     aud0+$04
  143. AUD0PER         equ     aud0+$06
  144. AUD0VOL         equ     aud0+$08
  145. AUD0DAT         equ     aud0+$0A
  146.  
  147. AUD1LC          equ     aud1
  148. AUD1LCH         equ     aud1
  149. AUD1LCL         equ     aud1+$02
  150. AUD1LEN         equ     aud1+$04
  151. AUD1PER         equ     aud1+$06
  152. AUD1VOL         equ     aud1+$08
  153. AUD1DAT         equ     aud1+$0A
  154.  
  155. AUD2LC          equ     aud2
  156. AUD2LCH         equ     aud2
  157. AUD2LCL         equ     aud2+$02
  158. AUD2LEN         equ     aud2+$04
  159. AUD2PER         equ     aud2+$06
  160. AUD2VOL         equ     aud2+$08
  161. AUD2DAT         equ     aud2+$0A
  162.  
  163. AUD3LC          equ     aud3
  164. AUD3LCH         equ     aud3
  165. AUD3LCL         equ     aud3+$02
  166. AUD3LEN         equ     aud3+$04
  167. AUD3PER         equ     aud3+$06
  168. AUD3VOL         equ     aud3+$08
  169. AUD3DAT         equ     aud3+$0A
  170. *
  171. *
  172. *  The bitplane registers
  173. *
  174. BPL1PT          equ     bplpt+$00
  175. BPL1PTH         equ     bplpt+$00
  176. BPL1PTL         equ     bplpt+$02
  177. BPL2PT          equ     bplpt+$04
  178. BPL2PTH         equ     bplpt+$04
  179. BPL2PTL         equ     bplpt+$06
  180. BPL3PT          equ     bplpt+$08
  181. BPL3PTH         equ     bplpt+$08
  182. BPL3PTL         equ     bplpt+$0A
  183. BPL4PT          equ     bplpt+$0C
  184. BPL4PTH         equ     bplpt+$0C
  185. BPL4PTL         equ     bplpt+$0E
  186. BPL5PT          equ     bplpt+$10
  187. BPL5PTH         equ     bplpt+$10
  188. BPL5PTL         equ     bplpt+$12
  189. BPL6PT          equ     bplpt+$14
  190. BPL6PTH         equ     bplpt+$14
  191. BPL6PTL         equ     bplpt+$16
  192.  
  193. BPLCON0         equ     bplcon0         ; Just capitalization...
  194. BPLCON1         equ     bplcon1         ;  "         "
  195. BPLCON2         equ     bplcon2         ;  "         "
  196. BPL1MOD         equ     bpl1mod         ;  "         "
  197. BPL2MOD         equ     bpl2mod         ;  "         "
  198.  
  199. DPL1DATA        equ     bpldat+$00
  200. DPL2DATA        equ     bpldat+$02
  201. DPL3DATA        equ     bpldat+$04
  202. DPL4DATA        equ     bpldat+$06
  203. DPL5DATA        equ     bpldat+$08
  204. DPL6DATA        equ     bpldat+$0A
  205. *
  206. *
  207. * Sprite control registers
  208. *
  209. SPR0PT          equ     sprpt+$00
  210. SPR0PTH         equ     SPR0PT+$00
  211. SPR0PTL         equ     SPR0PT+$02
  212. SPR1PT          equ     sprpt+$04
  213. SPR1PTH         equ     SPR1PT+$00
  214. SPR1PTL         equ     SPR1PT+$02
  215. SPR2PT          equ     sprpt+$08
  216. SPR2PTH         equ     SPR2PT+$00
  217. SPR2PTL         equ     SPR2PT+$02
  218. SPR3PT          equ     sprpt+$0C
  219. SPR3PTH         equ     SPR3PT+$00
  220. SPR3PTL         equ     SPR3PT+$02
  221. SPR4PT          equ     sprpt+$10
  222. SPR4PTH         equ     SPR4PT+$00
  223. SPR4PTL         equ     SPR4PT+$02
  224. SPR5PT          equ     sprpt+$14
  225. SPR5PTH         equ     SPR5PT+$00
  226. SPR5PTL         equ     SPR5PT+$02
  227. SPR6PT          equ     sprpt+$18
  228. SPR6PTH         equ     SPR6PT+$00
  229. SPR6PTL         equ     SPR6PT+$02
  230. SPR7PT          equ     sprpt+$1C
  231. SPR7PTH         equ     SPR7PT+$00
  232. SPR7PTL         equ     SPR7PT+$02
  233. ;
  234. ; Note:  SPRxDATB is defined as being +$06 from SPRxPOS.
  235. ; sd_datab should be defined as $06, however, in the 1.3 assembler
  236. ; include file hardware/custom.i it is incorrectly defined as $08.
  237. ;
  238. SPR0POS         equ     spr+$00
  239. SPR0CTL         equ     SPR0POS+sd_ctl
  240. SPR0DATA        equ     SPR0POS+sd_dataa
  241. SPR0DATB        equ     SPR0POS+$06     ; should use sd_datab ...
  242.  
  243. SPR1POS         equ     spr+$08
  244. SPR1CTL         equ     SPR1POS+sd_ctl
  245. SPR1DATA        equ     SPR1POS+sd_dataa
  246. SPR1DATB        equ     SPR1POS+$06     ; should use sd_datab ...
  247.  
  248. SPR2POS         equ     spr+$10
  249. SPR2CTL         equ     SPR2POS+sd_ctl
  250. SPR2DATA        equ     SPR2POS+sd_dataa
  251. SPR2DATB        equ     SPR2POS+$06     ; should use sd_datab ...
  252.  
  253. SPR3POS         equ     spr+$18
  254. SPR3CTL         equ     SPR3POS+sd_ctl
  255. SPR3DATA        equ     SPR3POS+sd_dataa
  256. SPR3DATB        equ     SPR3POS+$06     ; should use sd_datab ...
  257.  
  258. SPR4POS         equ     spr+$20
  259. SPR4CTL         equ     SPR4POS+sd_ctl
  260. SPR4DATA        equ     SPR4POS+sd_dataa
  261. SPR4DATB        equ     SPR4POS+$06     ; should use sd_datab ...
  262.  
  263. SPR5POS         equ     spr+$28
  264. SPR5CTL         equ     SPR5POS+sd_ctl
  265. SPR5DATA        equ     SPR5POS+sd_dataa
  266. SPR5DATB        equ     SPR5POS+$06     ; should use sd_datab ...
  267.  
  268. SPR6POS         equ     spr+$30
  269. SPR6CTL         equ     SPR6POS+sd_ctl
  270. SPR6DATA        equ     SPR6POS+sd_dataa
  271. SPR6DATB        equ     SPR6POS+$06     ; should use sd_datab ...
  272.  
  273. SPR7POS         equ     spr+$38
  274. SPR7CTL         equ     SPR7POS+sd_ctl
  275. SPR7DATA        equ     SPR7POS+sd_dataa
  276. SPR7DATB        equ     SPR7POS+$06     ; should use sd_datab ...
  277. *
  278. * Color registers...
  279. *
  280. COLOR00         equ     color+$00
  281. COLOR01         equ     color+$02
  282. COLOR02         equ     color+$04
  283. COLOR03         equ     color+$06
  284. COLOR04         equ     color+$08
  285. COLOR05         equ     color+$0A
  286. COLOR06         equ     color+$0C
  287. COLOR07         equ     color+$0E
  288. COLOR08         equ     color+$10
  289. COLOR09         equ     color+$12
  290. COLOR10         equ     color+$14
  291. COLOR11         equ     color+$16
  292. COLOR12         equ     color+$18
  293. COLOR13         equ     color+$1A
  294. COLOR14         equ     color+$1C
  295. COLOR15         equ     color+$1E
  296. COLOR16         equ     color+$20
  297. COLOR17         equ     color+$22
  298. COLOR18         equ     color+$24
  299. COLOR19         equ     color+$26
  300. COLOR20         equ     color+$28
  301. COLOR21         equ     color+$2A
  302. COLOR22         equ     color+$2C
  303. COLOR23         equ     color+$2E
  304. COLOR24         equ     color+$30
  305. COLOR25         equ     color+$32
  306. COLOR26         equ     color+$34
  307. COLOR27         equ     color+$36
  308. COLOR28         equ     color+$38
  309. COLOR29         equ     color+$3A
  310. COLOR30         equ     color+$3C
  311. COLOR31         equ     color+$3E
  312.  
  313. *******************************************************************************
  314. **
  315. **
  316.                         ENDC    ; HARDWARE_HW_EXAMPLES_I
  317.