You also need to tell the system exactly which bytes in memory belong on each horizon-
tal line of the display,
To
do this, you specify the modulo value. Modulo refers
to
the
number of bytes in memory between the last word on one horizontal line and the begin-
ning of the first word on the next line. Thus, the modulo enables the system
to
convert
bit-plane
data
stored in linear form (each
data
byte
at
a sequentially increasing memory
address) into rectangular form (one "line" of sequential
data
followed by another line).
For the basic playfield, where the playfield
in
memory
is
the same size as the display
window, the modulo
is
zero because the memory area contains exactly the same number
of bytes as you want
to
display on the screen. Figures 3-10 and
3-11
show the basic
bit-plane layout in memory and
how
to
make sure the correct
data
is retrieved.
The bit-plane address pointers (BPLxPTH and BPLxPTL) are used by the system
to
fetch the
data
to
the screen. These pointers are dynamic; once the
data
fetch begins,
the pointers are continuously incremented
to
point to the next
word
to
be
fetched (data
is fetched two bytes
at
a time). When the end-of-line condition is reached (defined by
the data-fetch register, DDFSTOP) the modulo
is
added
to
the bit-plane pointers,
adjusting the pointer to the first word to
be
fetched for the next horizontal line.
Data for Line 1:
Location:
START
Leftmost
Display Word
START+2
Next Word
START+4
Next Word
Screen data fetch stops (DDFSTOP) for
each horizontal line after
the
last word
on
the
line has been fetched.
Figure
3-10:
Data
Fetched for the First Line When Modulo = 0
START+38
Last Display
T
After the first line
is
fetched, the bit-plane pointers BPLxPTH and BPLxPTL contain
the value START+40. The modulo (in this case,
0)
is
added
to
the current value of the
pointer, so when the pointer begins the
data
fetch for the next line,
it
fetches the
data
you want on
that
line. The
data
for the next line begins
at
memory location
START+40.
50 Playfield Hardware