
SPRITE DISPLAY EXAMPLE
This example displays the spaceship sprite at location V = 65, H = 128. Remember to
include the file "hw_examples.i", located in Appendix J.
; First, we set up a single bit-plane.
;
LEA CUSTOM,a0 ; Point a0 at custom chips
MOVE.W #$1200,BPLCON0(a0) ; 1 bit-plane color is on
MOVE.W #$0000,BPL1MOD(a0) ; Modulo = 0
MOVE.W #$0000,BPLCON1(a0) ; Horizontal scroll value = 0
MOVE.W #$0024,BPLCON2(a0) ; Sprites have priority over playfields
MOVE.W #$0038,DDFSTRT(a0) ; Set data-fetch alert
MOVE.W #$00D0,DDFSTOP(a0) ; Set data-fetch stop
; Display window definitions.
MOVE.W #$2C81,DIWSTRT(a0) ; Set display window start
; Vertical start in high byte.
; Horizontal start * 2 in low byte.
MOVE.W #$F4C1,DIWSTOP(a0) ; Set display window stop
; Vertical stop in high byte.
; Horizontal stop * 2 in low byte.
;
; Set up color registers.
;
MOVE.W #$0008,COLOR00(a0) ; Background color = dark blue
MOVE.W #$0000,COLOR01(a0) ; Foreground color = black
MOVE.W #$0FF0,COLOR17(a0) ; Color 17 = yellow
MOVE.W #$00FF,COLOR18(a0) ; Color 18 = cyan
MOVE.W #$0FOF,COLORl9(a0) ; Color 19 = magenta
;
; Move Copper list to $20000.
;
MOVE.L #$20000,a1 ; Point A1 at Copper list destination
LEA COPPERL(pc),a2 ; Point A2 at Copper list source
CLOOP:
MOVE.L (a2),(a1)+ ; Move a long word
CMP.L #$FFFFFFFE,(a2)+ ; Check for end of list
BNE CLOOP ; Loop until entire list is moved
;
; Move sprite to $25000.
;
MOVE.L #$25000,a1 ; Point A1 at sprite destination
LEA SPRITE(pc),a2 ; Point A2 at sprite source
SPRLOOP:
MOVE.L (a2),(a1)+ ; Move a long word
CMP.L #$00000000,(a2)+ ; Check for end of sprite
BNE SPRLOOP ; Loop until entire sprite is moved
;
; Now we write a dummy sprite to $30000, since all eight sprites are
; activated
; at the same time and we're only going to use one. The remaining sprites
; will point to this dummy sprite data.
;
MOVE.L #$00000000,$30000 ; Write it
;
; Point Copper at Copper list.
- 108 Sprite Hardware -
Summary of Contents for Amiga A1000
Page 1: ...AMIGA HARDWARE REFERENCE MANUAL 1992 Commodore Business Machines Amiga 1200 PAL...
Page 20: ...Figure 1 1 Block Diagram for the Amiga Computer Family Introduction 11...
Page 21: ...12 Introduction...
Page 72: ...Figure 3 12 A dual Playfield display Playfield Hardware 63...
Page 87: ...Figure 3 24 Horizontal Scrolling 78 playfield hardware...
Page 101: ...92 Playfield Hardware...
Page 199: ...Figure 6 9 DMA time slot allocation 190 Blitter hardware...
Page 203: ...Figure 6 13 Blitter Block Diagram 194 Blitter Hardware...
Page 229: ...220 System Control Hardware...
Page 246: ...Figure 8 8 Chinon Timing diagram cont Interface Hardware 237...
Page 265: ...256 Interface Hardware...
Page 289: ...280 Appendix A...
Page 297: ...288 Appendix B...
Page 298: ...APPENDIX C CUSTOM CHIP PIN ALLOCATION LIST NOTE Means an active low signal Appendix C 289...
Page 302: ...APPENDIX D SYSTEM MEMORY MAP Appendix D 293...
Page 343: ...334 Appendix F...
Page 351: ...342 Appendix G...
Page 361: ...352 Appendix H...
Page 367: ...358 Appendix I...