The Power Behind Commodore 128 Graphics - Commodore 128 Programmer's Reference Manual

Hide thumbs Also See for 128:
Table of Contents

Advertisement

n
1 \
THE POWER BEHIND COMMODORE 128 GRAPHICS
217
where X is a value in Figure 8-6. Location 2605 is also a shadow register for 53272, but
only for bit map mode. When you move the video matrix you must ensure that it does
not overlap the bit map (data). In addition, be sure to add an offset of $4000 to the start
address of the video matrix and the bit map for each video bank above zero.
C64 BASIC
In C64 mode, the text screen defaults to locations 1024 ($0400) through 2023
($07E7). In bit map mode, the video matrix (screen memory) also defaults to this range
though the screen memory is interpreted differently in either mode. Commodore 64
BASIC allows you to move the location of the video matrix to any one of the sixteen
locations specified in Figure 8-6. The upper four bits of location 53272 ($D018) control
the location of the screen memory. To change the location of screen memory, use the
following command:
POKE 53272, (PEEK(53272) AND 15) OR X
where X is equal to one of the values in Figure 8-6
NOTE: The following paragraph pertains to both C128 and C64 modes.
n
j j
Bits zero and one of location 56576 ($DD00) control which of the four video
banks is selected. The default bank is 0. If you change to another video bank (from 0 to
^
1, for example), then for each bank higher than bank zero, you must add an offset of
j (
$4000 to the starting video matrix (screen memory) address in Figure 8-6. This yields
! \
the actual address of the video matrix. For example, if you're changing from bank 0 to
bank 1, add $4000. If you are going to bank 2, add $8000; if you are changing to bank
H
3, add $C000. Remember, this is true for both C128 and C64 modes.
il
MACHINE LANGUAGE
r*
In machine language, use the commands listed under A in Figure 8-7 to move the C128
j [
(VIC) text screen. Use the commands under B to move the C128 bit map screen memory
(video matrix). Use the commands under C to move the C64 text or bit map screen
memory (video matrix).
(A)
(B)
(C)
MOVE C64
MOVE C128
MOVE C128
TEXT OR BIT MAP
TEXT SCREEN
BIT MAP SCREEN
SCREEN MEMORY
LDA $0A2C
LDA $0A2D
LDA $D018
AND #$0F
AND #$0F
AND #$0F
ORA#$X
ORA #$X
ORA #$X
STA $0A2C
STA $0A2D
STA $D018
Figure 8-7. Moving Screen Memory in Machine Language

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents