
; 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 -
Содержание Amiga A1000
Страница 1: ...AMIGA HARDWARE REFERENCE MANUAL 1992 Commodore Business Machines Amiga 1200 PAL...
Страница 20: ...Figure 1 1 Block Diagram for the Amiga Computer Family Introduction 11...
Страница 21: ...12 Introduction...
Страница 72: ...Figure 3 12 A dual Playfield display Playfield Hardware 63...
Страница 87: ...Figure 3 24 Horizontal Scrolling 78 playfield hardware...
Страница 101: ...92 Playfield Hardware...
Страница 199: ...Figure 6 9 DMA time slot allocation 190 Blitter hardware...
Страница 203: ...Figure 6 13 Blitter Block Diagram 194 Blitter Hardware...
Страница 229: ...220 System Control Hardware...
Страница 246: ...Figure 8 8 Chinon Timing diagram cont Interface Hardware 237...
Страница 265: ...256 Interface Hardware...
Страница 289: ...280 Appendix A...
Страница 297: ...288 Appendix B...
Страница 298: ...APPENDIX C CUSTOM CHIP PIN ALLOCATION LIST NOTE Means an active low signal Appendix C 289...
Страница 302: ...APPENDIX D SYSTEM MEMORY MAP Appendix D 293...
Страница 343: ...334 Appendix F...
Страница 351: ...342 Appendix G...
Страница 361: ...352 Appendix H...
Страница 367: ...358 Appendix I...