Loops And Branohes; Starting And Stopping The Copper; Starting The Oopper After Reset; Stopping The Oopper - Commodore Amiga Hardware Reference Manual

Hide thumbs Also See for Amiga:
Table of Contents

Advertisement

LOOPS AND BRANCHES
Loops and branches in Copper lists are covered in the "Advanced Topics" section below.
Starting and Stopping the Copper
STARTING THE COPPER AFTER RESET
At power-on or reset time, you must initialize one of the Copper location registers
(COP1LC or COP2LC) and write to its strobe address before Copper DMA is turned on.
This ensures a known start address and known state. Usually, COP1LC is used because
this particular register is reused during each vertical blanking time. The following
sequence of instructions shows how to initialize a location register. It is assumed that
the user has already created the correct Copper instruction list at location "mycoplist."
MOVE.L
MOVE.L
MOVE.W
MOVE.W
MOVE.W
MYCOPLIST, aO
AO, COP1LCH
COPJMP1, DO
; Write both COP1LCH and COP1LCL
;Any access to this location
; forces load from COP1LC to
; Copper program counter
#SETBIT
+
COPPERDMA, DO
DO, DMACONW
;Enable Copper DMA
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 noth-
ing 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.
Coprocessor Hardware 19

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents