EasyManua.ls Logo

Commodore Amiga - Enable

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...
The notes about horizontal and vertical beam position found
in
the discussion of the
WAIT instruction apply also
to
the SKIP instruction.
The following example SKIP instruction skips the instruction following it if VP (vertical
beam position)
is
greater than
or
equal to
100
($64).
DC.W $6401,$FFOI
;If
VP
>=
100, skip next instruction (ignore
HPJ
COPPER
LOOPS
AND
BRANCHES
AND
COMPARISON
ENABLE
You can change the value
in
the location registers
at
any time and use this value to con-
struct loops in the instruction list. Before the next vertical blanking time, however,
the
COPILC registers must
be
repointed
to
the beginning of the appropriate Copper list.
The value
in
the COPILC location registers will
be
restored to the Copper's program
counter
at
the
start
of the vertical blanking period.
Bits
14-1
of instruction word 2
in
the WAIT and SKIP instructions specify which bits of
the horizontal and vertical position are
to
be
used for the beam counter comparison.
The position in instruction word 1 and the compare enable bits in instruction word 2 are
tested against the actual beam counters before any further action is taken. A position
bit in instruction word 1 is used
in
comparing the positions with the actual beam
counters
if and only
if
the corresponding enable bit in instruction word 2
is
set
to
1.
If
the corresponding enable bit
is
0,
the comparison is always true. For instance, if you
care only about the value in the last four bits of the vertical position, you set only the
last four compare enable bits, bits (11-8) in instruction word
2.
As another example, suppose you want
to
issue an interrupt each time a total of
16
vertical scan lines has occurred. In addition, you want the interrupts only between lines
80 and
160.
The Copper instruction sequence below would do this. The enable "masks"
are specified with the instructions.
Before the Copper
is
told to begin this set of instructions, you would use the
68000
to
write the address of LOOP to COP2LC.
Coprocessor Hardware
21

Table of Contents

Other manuals for Commodore Amiga

Related product manuals