EasyManua.ls Logo

Commodore Amiga - Page 30

Commodore Amiga
321 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...
during a full display frame. You can change sprite colors mid-screen with a Copper
instruction list
that
waits until the last line of the first use of the sprite processor and
changes the colors before the first line of the next use of the same sprite processor:
WAIT for first line of display
MOVE first color 1 to COLOR17
MOVE firstcolor2
to
COLOR18
MOVE firstcolor3 to COLOR19
WAIT for last line
+1
of sprite's first use
MOVE secondcolor1 to COLOR17
MOVE secondcolor2 to COLOR18
MOVE secondcolor3
to
COLOR19
and so on
As you create Copper instruction lists, note
that
the final list must be
in
th~
same order
as
that
in which the video beam creates the display. The video beam traverses the
screen from position (0,0) in the upper left hand corner of the screen to the end of the
display (226,263) in the lower right hand corner.
The
first °
in
(0,0) represents the x
position.
The
second ° represents the y position. For example, an instruction
that
does
something
at
position (0,100) should come after an instruction
that
affects the display
at
position (0,60).
Note
that
because of the form of the WAIT instruction, you can sometimes get away
with not sorting the list in strict video beam order.
The
WAIT instruction causes the
Copper
to
wait until the value in the beam counter is equal
to
or greater than the value
in the instruction. This means, for example, if you have instructions following each
other like this:
WAIT for position (64,64)
MOVE
data
WAIT for position (60,60)
MOVE
data
the Copper will perform both moves, even though the instructions are
out
of sequence.
The
"greater
than"
specification prevents the Copper from locking up
if
the beam has
already passed the specified position. A side effect is
that
the second MOVE below will
be performed:
16
Coprocessor Hardware

Table of Contents

Other manuals for Commodore Amiga

Related product manuals