Commodore 128 Programmer's Reference Manual page 228

Hide thumbs Also See for 128:
Table of Contents

Advertisement

218
COMMODORE 128
U
In Figure 8-7, X is the hexadecimal equivalent of the decimal value X in the left
[J
column in Figure 8-6. The second and third instructions in each example in Figure
8-7 make sure not to upset the lower four bits of location 53272 or its shadow registers,
,- \
2604 ($0A2C) and 2605 ($0A2D), since they control the character data for text and bit
M
map modes.
COLOR RAM
1 I
UJ
C128 BASIC
Color RAM within the Commodore 128 is always stationary in memory. It occupies the
M
address range 55296 ($D800) through 56295 ($DBE7). In standard character mode,
J
screen RAM and color RAM correspond to one another on a one-to-one basis. Location
1024 gets color data from 55296, 1025 gets color from 55297 and so on. Multi-color
j~~j
character mode utilizes color RAM also, but in a different manner. Additional explana-
M
tions and examples are provided in the Standard Character Mode section of this chapter.
COLOR RAM BANKING
|
In C128 mode, the LORAM and HIRAM signal lines allow the graphics system to
^
make use of an additional Color RAM bank, which is not available in C64 mode. This
allows fast and clean switching of colors for the character or multi-color bit map screen.
J j
The LORAM signal line allows the 8502 microprocessor to access one color RAM
[J
bank, while the HIRAM control line allows the VIC chip to access either Color RAM
bank independently of the microprocessor. Bit 0 of location 1 controls the LORAM
: \
signal line. LORAM selects color RAM bank 0 or 1 as seen by the 8502 microprocessor
j
depending on the value of the bit. If the bit value is low, the color RAM bank 0 is
accessed by the 8502. If the value of the bit is high, the upper color RAM bank is
accessed by the 8502 microprocessor.
J I
Bit 1 of location 1 controls the HIRAM signal line. HIRAM selects color RAM
U
bank 0 or 1 as seen by the VIC chip, depending on the value of the bit. If the bit value is
low, the color RAM bank 0 is accessed by the VIC chip. If the value of the bit is high,
1 j
the upper color RAM bank 1 is accessed by the VIC chip.
LJ
These control lines add flexibility to the already powerful C128 graphics system.
This allows you to change colors of the multi-color bit map or character screen on the fly,
^ /
without any time delay. It allows you to swap color RAM banks instantly.
jj
In standard bit map mode, color information is obtained from the bit map
screen memory (the video matrix, $lC00 through $1FFF), not color memory. Bit
map mode interprets screen memory differently than character mode. Color RAM
is used in standard character mode, multi-color bit map mode, multi-color character
^
mode and the split-screen mode.
C64 BASIC
U
In standard character mode, color RAM is located in the same place as in C128 mode:
55296 ($D800) through 56295 ($DBE7).
j j
In bit map mode, C64 BASIC receives color information from screen memory (the
[]

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents