Atari ST series Technical Reference Manual page 75

Hide thumbs Also See for ST series:
Table of Contents

Advertisement

XBIOS Graphics and Sound Functions
where palette is a pointer to an array that holds 16 words of
data, each of which contains the color settings for one of the
registers.
Since there are 512 possible color combinations, it's im­
possible to describe each one, or to explain exactly how to
find a particular shade. In general, however, the higher the
color level, the brighter the color will be, and the lower the
level, the darker it will be. Whether the color displayed by a
register tends toward red, green, or blue depends on which
value has the highest brightness level. If all three values are
equal, the color will be black, white, or a shade of gray.
Thus, if red, green, and blue contain all Os, the pen will be
set to black, while a setting of straight 7s will make the regis­
ter color white. You can lighten a shade by increasing the
value of the two other colors in equal proportions. A setting
of $700 selects bright red as the pen color, while $733 sets a
much paler red. To darken the original red color, you could
lower the red setting to 5 while keeping the two others at 0.
When you're unsure of what colors to mix, it may help
to start with the nearest primary color mixture and experi­
ment from there. The red, green, and blue values for these
mixtures are
Table 4-2. Primary Colors
Color
Red
Black
0
Blue
0
Green
0
Cyan
0
Red
7
Purple
7
Yellow
7
7
White
Unlike some computers, screen memory for the ST series
is not fixed in any one particular place. To find the starting
address of screen display memory, you may use the XBIOS
function physbase():
long scraddr;
scraddr = Physbase();
where scraddr is a pointer to the beginning of the 32K mem­
ory block currently displayed. In addition to the physical dis­
play address, TOS also keeps track of a logical screen ad-
Green
Blue
0
0
0
7
7
0
7
7
0
0
0
7
7
0
7
7
67

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents