
; MOVE.W INTREQR(a0),d6 ; Read interrupt request word
; AND.W #$0020,d6 ; Mask off all but vertical blank bit
; BEQ VLOOP ; Loop until bit is a 1
; MOVE.W #$0020,INTREQ(a0) ; Vertical bit is on, so reset it
;Please note that this will only work if you have turned OFF the Vertical
;blanking interrupt enable (not recommended for long periods).
ADD.B d4,d2 ; Increment horizontal value
SUBQ.B #1,d0 ; Decrement horizontal counter
BNE L1
MOVE.B #151,d0 ; Count exhausted, reset to 151
EOR.B #$FE,d4 ; Negate the increment value
L1:
MOVE.B d2,$25001 ; Write new HSTART value to sprite
ADD.B d5,d3 ; Increment vertical value
SBQ.B #1,d1 ; Decrement vertical counter
BNE L2
MOVE.B #194,d1 ; Count exhausted, reset to 194
EOR.B #$FE,d5 ; Negate the increment value
L2:
MOVE.B d3,$25000 ; Write new VSTART value to sprite
MOVE.B d3,d6 ; Must now calculate new VSTOP
ADD.B #6,d6 ; VSTOP always 6 for spaceship
MOVE.B d6,$25002 ; Write new VSTOP to sprite
BRA VLOOP ; Loop forever
CREATING ADDITIONAL SPRITES
To use additional sprites, you must create a data structure for each one and arrange the
display as shown in the previous section, naming the pointers SPR1PTH and SPR1PTL for
sprite DMA channel 1, SPR2PTH and SPR2PTL for sprite DMA channel 2, and so on.
NOTE
When you enable sprite DMA for one sprite, you enable DMA for all the sprites and place
them all in automatic mode. Thus, you do not need to repeat this step when using
additional sprite DMA channels.
Once the sprite DMA channels are enabled, all eight sprite pointers must be initialized to
either a real sprite or a safe null sprite. An uninitialized sprite could cause spurious sprite
video to appear.
Remember that some sprites can become unusable when additional DMA cycles are
allocated to displaying the screen, for example when an extra wide display or horizontal
scrolling is enabled (see Figure 6-9: DMA Time Slot Allocation).
Also, recall that each pair of sprites takes its color from different color registers, as shown
in Table 4-3.
- Sprite hardware 111 -
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...