EasyManua.ls Logo

Commodore Amiga A2000 - Blitter Key Points; EXAMPLE: Clearmem

Commodore Amiga A2000
380 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
BLITTER KEY POINTS
This is a list of some key points that should be remembered when programming the
blitter.
o Write BLTSIZE last; writing this register starts the blit.
o Modulos and pointers are in bytes; width is in words and height is in pixels. The least
significant bit of all pointers and modules is ignored.
o The order of operations in the blitter is masking, shifting, logical combination of sources,
area fill, and zero nag setting.
o In ascending mode, the blitter increments the pointers, adds the modules, and shifts to
the right.
o In descending mode, the blitter decrements the pointers, subtracts the modules, and
shifts to the left.
o Area fill only works correctly in descending mode.
o Check BLTDONE before writing blitter registers or using the results of a blit.
o Shifts are done on immediate data as soon as it is loaded.
EXAMPLE: ClearMem
;
; Blitter example - memory clear
;
include 'exec/types.i'
include 'hardware/custom.i'
include 'hardware/dmabits.i'
include 'hardware/blit.i'
include 'hardware/hw examples.i"
xref _custom
;
; Wait for previous blit to complete.
;
waitblit:
btst.b #DMAB_BLTDONE-8,DMACONR(a1)
waitblit2:
btst.b #DMAB_BLTDONE-8,DMACONR(a1)
bne waitblit2
rts
;
; This routine uses a side effect in the blitter. When each
- Blitter Hardware 195 -

Table of Contents

Other manuals for Commodore Amiga A2000

Related product manuals