EasyManua.ls Logo

Commodore Amiga - Telling the System How to Fetch and Display Data

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...
TELLING THE SYSTEM HOW
TO
FETCH
AND
DISPLAY
DATA
After defining the size and position of the display window, you need
to
give the system
the on-screen location for
data
fetched from memory.
To
do this, you describe the hor-
izontal positions where each line
starts
and stops and write these positions
to
the data-
fetch registers. The data-fetch registers have a four-pixel resolution (unlike the display
window registers, which have a one-pixel resolution). Each position specified
is
four pix-
els from the last one. Pixel 0
is
position
0;
pixel 4
is
position
1,
and so on.
The data-fetch
start
and display window starting positions interact with each other.
It
is recommended
that
data-fetch
start
values be restricted
to
a programming resolution of
16
pixels
(8
clocks in low-resolution mode, 4 clocks
in
high-resolution mode). The
hardware requires some time after the first
data
fetch before
it
can actually display the
data. As a result, there
is
a difference between the value of window
start
and data-fetch
start. In low-resolution mode the difference is
8.5
clocks;
in
high-resolution mode the
difference
is
4.5 clocks.
The
normal low-resolution DDFSTRT
is
($0038). The normal high-resolution
DDFSTRT
is
($003C). Recall
that
the hardware resolution of display window
start
and
stop
is
twice the hardware resolution of
data
fetch:
($81/2 - 8.5)
=
($38)
($81/2 - 4.5) = ($3C)
The relationship between data-fetch
start
and stop is
DDFSTRT
= DDFSTOP - (8*(word count -
1)
for
low
resolution
DDFSTRT
= DDFSTOP - (4*(word count -
2)
for high resolution
The normal low-resolution DDFSTOP
is
($OODO).
The normal high-resolution
DDFSTOP is ($00D4).
The following example sets data-fetch
start
to
$0038 and data-fetch stop to
$ooDO
for a
basic playfield.
DDFSTRT EQU
DDFSTOP EQU
MOVE.W
MOVE.W
$DFF092
$DFF094
#$0038,DDFSTRT
#$OODO,DDFSTOP
; Write to
DDFSTRT
; Write
to
DDFSTOP
Playfield Hardware
49

Table of Contents

Other manuals for Commodore Amiga

Related product manuals