Commodore 128 Programmer's Reference Manual page 329

Hide thumbs Also See for 128:
Table of Contents

Advertisement

PROGRAMMING THE 80-COLUMN (8563) CHIP
319
*
Here's where a major difference between the two video chips becomes important—
the way the bit map corresponds to the image on the screen. As you know, the VIC
■""j
screen stores eight rows of 8 pixels each to make up one character cell. Each row of the
I i
eight pixels in a character on the screen are stored consecutively in memory. For
example, the HOME character position is stored in default locations $2000 through
p
$2007 for the bit map. The next character position (as if the display was standard text)
j j
to the right of the HOME Position is stored between $2008 and $2015. So the first
character row is stored between $2000 and $2A00 ($2000 plus (8*8) * 40 = 2560). This
is represented graphically in the preceding section (Figure 10-5).
1 i
On the other hand, the 8563 stores a bit map across raster rows on the screen.
' s
Each set of eight pixels of a raster row is stored in a memory location in 8563 RAM
starting at $0000. For example, the first raster row is stored in locations $0000 through
p
$0050, one location for each group of eight pixels. The 8563 screen is 640 pixels across;
' I
therefore each row needs 80 bytes of storage in 8563 RAM.
Now you see how the two bit maps are addressed differently. To fully understand
P
how this program gets data from the VIC bit map and places it in the correct spot on the
/ j
8563 bit map, this algorithm is provided. The actual instructions to perform these steps
are added later. Here's the general scheme you need to follow:
p
j [
1.
Start at the beginning of both the VIC and 8563 bit map locations.
2.
Get a VIC bit map byte.
^
3.
Store it in the 8563 bit map.
; )
4.
Increment the VIC bit map pointer 8 times (the 8563 pointer increments itself
1 ]
after a write).
5.
Do steps 2, 3 and 4 thirty-nine times.
r-1
/ i
At this point, you have just transferred the first raster row of the VIC bit map onto
the 8563 bit map.
; 1
6.
After each raster row is transferred, subtract 311 from the VIC bit map pointer.
This is done 7 times. On the eighth time, the VIC bit map pointer is
fm,
incremented by 1 to get the to the start of the next VIC character cell.
j j
7.
Perform 40 blank write operations (write zeros to the 40 blank columns) to
' S
get to the beginning of an 8563 raster row. Remember, the 8563 bit map
pointer must be relative to the VIC screen bit map pointer.
j j
' i '
If the VIC column counter equals 39, increment the 8563 bit map pointer 41
times to place its relative position at the start of a new character row according to the
P
VIC bit map.
/ I
8.
Now repeat the process 25 times, once for each character row.
p

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents