changing background colors in 80 column mode.

Started by Stephane Richard, October 04, 2006, 08:29 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Stephane Richard

I know I can change the text color with codes in print statements, for example...that works fine.  

but what about background colors?  can I do that in 80 column? if so, how?
When God created light, so too was born, the first Shadow!

MystikShadows

Blacklord

Here ya go (from the 128 System Guide) :

Color Code  Color           Color Code  Color

    1       Black               9       Dark Purple
    2       White               10      Brown
    3       Dark Red            11      Light Red
    4       Light Cyan          12      Dark Cyan
    5       Light Purple        13      Medium Gray
    6       Dark Green          14      Light Green
    7       Dark Blue           15      Light Blue
    8       Light Yellow        16      Light Gray

             Figure 6-3. Color Numbers in 80-Column Format.


6.2.2 Types of Screen Display

Your C128 has several different ways of displaying information on the
screen; the parameter "source" in the COLOR command pertains to different
modes of screen display. The types of video display fall into three cate-
gories.

The first one is text display, which displays only characters, such as let-
ters, numbers, special symbols and the graphics characters on the front
faces of most C128 keys. The C128 can display text in both 40-column and
80-column screen formats.

The second category of display mode is used for highly detailed graphics,
such as pictures and intricate drawings. This type of display mode includes
standard bit map mode and multicolor bit map mode. Bit map modes allow you
to control each and every individual screen dot or pixel (picture element).
This allows considerable detail in drawing pictures and other computer art.
The 80 column display is intended to display text.

The difference between text and bit map lies in the way in which each
screen addresses and stores information. The text screen can only manipu-
late entire characters, each of which covers an area of 8 by 8 pixels on
your screen. The more powerful bit map mode exercises control over each and
every pixel on your screen.

The third type of screen display, split screen, is a mixture of the first
two types. The split screen display outputs part of the screen as text and
part in bit map mode (either standard or multicolor). The C128 is capable
of this because it uses two seperate and different parts of the computer's
memory to store the two screens: one part for the text, and the other for
the graphics screen.

Type the following short program:

     10 COLOR 0,1:REM TEXT BACKGROUND COLOR = BLACK
     20 COLOR 1,3:REM FOREGROUND COLOR FOR BIT MAP SCREEN = RED
     30 COLOR 4,1:REM BORDER COLOR = BLACK

This example colors the background black, the foreground red and the border
black.

Stephane Richard

Thanks for the Excerpt :-).

this doesn't change the colors in 80 columns mode...atleast not on my WinVice emulator this technique does work on the 40 column display however. :-).

So in 80 column mode, is there a trivial way to change background colors?  I know that the text color (or foreground color) can change fine if I put the color code (commodore-2 for white for example), that works great, but the background color doesn't change. :-)

I know it can be done, the paperback planner, writer and filer 128 all have different backgrounds, are they in graphics mode?  I know it can be done, just not sure if BASIC 7.0 accomodates it :-)
When God created light, so too was born, the first Shadow!

MystikShadows

istvan

The COLOR parameters for 80-column mode are 5 and 6, so use COLOR 5,x for the 80-col foreground color and COLOR 6,x for the 80-col background color.  The VDC doesn't have a separate border color like the VIC, so the background color setting applies to the entire display (i.e., background and border).

I just tried changing the background color in WinVice 1.17 and it doesn't seem to be implemented quite right.  Vice only changes the background color as each character cell is updated, and even after all the cells have been changed the "border" remains black.  On genuine hardware the entire background changes color as soon as the command is given.

Stephane Richard

on WinVICE 1.20 (latest as of today) when I do a color 6,x the whole background color changes, but not the border...according to most refs, this is normal, vdc doesn't have a border per se.  atleast to memory, but since you have a physical C-128 I might not want to challenge you on it ;-). hehe

Nonetheless, here, all that interested me was to change the color of the character area (the 80x25) and that color 6,x took care of that :-).  So Thank you ;-).
When God created light, so too was born, the first Shadow!

MystikShadows