
; of the blits is finished, the pointer in the blitter is pointing
; to the next word to be blitted.
;
; When this routine returns, the last blit is started and might
; not be finished, so be sure to call waitblit above before
; assuming the data is clear.
;
; a0 pointer to first word to clear
; d0 - number of bytes to clear (must be even)
;
xdef clearmem
clearmem:
lea custom,a1 ; Get pointer to chip registers
bsr waitblit ; Make sure previous blit is done
move.l a0,BLTDPT(a1) ; Set up the D pointer to the region to
; clear
clr.w BLTDMOD(a1) ; Clear the D modulo (don't skip no bytes)
asr.l #1,d0 ; Get number of words from number of bytes
clr.w BLTCON1(a1) ; No special modes
move.w #DEST,BLTCON0(a1); only enable destination
;
; First we deal with the smaller blits
;
moveq #$3f,d1 ; Mask out mod 64 words
and.w d0,d1
beq dorest ; none? good, do one blit
sub.l d1,d0 ; otherwise remove remainder
or.l #$40,d1 ; set the height to 1, width to n
move.w d1,BLTSIZE(a1) ; trigger the blit
;
; Here we do the rest of the words, as chunks of 128k
;
dorest:
move.w #$ffc0,d1 ; look at some more upper bits
and.w d0,d1 ; extract 10 more bits
beq dorest2 ; any to do?
sub.l d1,d0 ; pull of the ones we're doing here
bsr waitblit ; wait for prev blit to complete
move.w d0,BLTSIZE(a1) ; do another blit
dorest2:
swap d0 ; more?
beq done ; nope.
clr.w d1 ; do a 1024x64 word blit (128K)
keepon:
bsr waitblit ; finish up this blit
move.w d1,BLTSIZE(a1) ; and again, blit
subq.w #1,d0 ; still more?
bne keepon ; keep on going.
done:
rts ; finished. Blit still in progress.
end
- 196 Blitter 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...