EasyManua.ls Logo

Commodore Amiga A2000 - Stopping the Copper

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...
initialize a location register. It is assumed that the user has already
created the correct Copper instruction list at location "mycoplist."
;
; Install the copper list
;
LEA CUSTOM,a1 ; a1 = address of custom chips
LEA MYCOPLIST(pc),a0 ; Address of our copper list
MOVE.L a0,COP1LC(a1) ; Write whole longword address
MOVE.W COPJMP1(a1),d0 ; Causes copper to load PC from COP1LC
;
; Then enable copper and raster dma
;
MOVE.W #(DMAF SETCLR!DMAF_COPPER!DMAF_RASTER!DMAF_MASTER),DMACON(a1)
;
Now, if the contents of COP1LC are not changed, every time vertical blanking occurs the
Copper will restart at the same location for each subsequent video screen. This forms a
repeatable loop which, if the list is correctly formulated, will cause the displayed screen to
be stable.
STOPPING THE COPPER
No stop instruction is provided for the Copper. To ensure that it will stop and do nothing
until the screen display ends and the program counter starts again at the top of the
instruction list, the last instruction should be to WAIT for an event that cannot occur. A
typical instruction is to WAIT for VP = $FF and HP = $FE. An HP of greater than $E2 is not
possible. When the screen display ends and vertical blanking starts, the Copper will
automatically be pointed to the top of its instruction list, and this final WAIT instruction
never finishes.
You can also stop the Copper by disabling its ability to use DMA for retrieving instructions
or placing data. The register called DMACON controls all of the DMA channels. Bit7,
COPEN, enables Copper DMA when set to 1.
For information about controlling the DMA, see Chapter 7, "System Control Hardware."
- 26 Coprocessor Hardware -

Table of Contents

Other manuals for Commodore Amiga A2000

Related product manuals