[Coco] colors

William Astle lost at l-w.ca
Tue Apr 1 22:37:23 EDT 2014


The absolute only possible way to choose between 16 colours for 
foreground and background is to be operating in a 16 colour graphics 
mode. This is a fact of the hardware. In a hardware text mode, you 
cannot have more than 8 different foreground colours on screen at any 
given time. The same goes for background colours. (The trick for 
displaying all 64 colours at once is not useful here because it uses 
100% of the CPU.)

If register 2 is changing the foreground colour, that means that either 
the register numbers do not refer to the hardware register numbers in 
the context you are in or you are actually in a graphics mode. This, 
too, is a fact of the hardware.


On 14-04-01 08:22 PM, Wayne Campbell wrote:
> Thanks, Bill. Unfortunately, I have already been doing this (in a slightly
> different way) with a routine I wrote named colortest. I am learning much.
> For example, you say the first eight are all background, but I know that
> they are not. Register 2 is window foreground. I've changed it enough times
> to know. Register 3 is window background. Changing register 11 does not
> change the background of the window. Changing register 10 does not affect
> the foreground color either. In fact, the only 2 registers I can count on
> 100% of the time to be the correct foreground and background registers are
> 2 and 3. The cursor also uses one of the back 8, but I can't recall ATM
> what that register number is. I can say it changes only the cursor color.
> Trying to use it as a window color does not work. It doesn't seem to matter
> what color I specify, I do not get the foreground or background color I
> want. The one thing your routine does do that mine doesn't is identify the
> color number of the default 8 colors. Other than black and white, I was not
> sure of any color. Thanks to you I now have the correct values of the
> default colors. This will help me much as I work to find the darker
> versions of those colors. Once found, then it will be a matter of figuring
> out how to make my program use them all.
>
> I found an article in the January, 1987 issue of the Rainbow named Color
> Chart for the CoCo 3. It contained images of both the composite and RGB
> sets of the 64 colors. It also contained the source code for the program
> they wrote that displays all 64 colors at once. It's written in SECB, and
> includes a assembly source listing for the routine that does the work,
> named CYCLE. I had to wrestle a copy from the article, as the OCR was not
> very accurate, but I got it all typed in and saved.
>
> Being a Basic09 guy, I went to the Basic09 Tour Guide to see if there was
> an alternative, and there was. I typed in the code and watched as VCC not
> only displayed the colors, but as the Log window recorded hitting something
> multiple times. I guess VCC got overworked? It worked tho.
>
> I don't have edtasm to compile the assembly code with, and trying to load
> the BASIC source (named COLOR3.BAS) results in an error. I am not very
> familiar with SECB, or COLOR BASIC at all really. I jumped right into OS-9,
> and never learned CB, ECB or SECB. The Complete Guide to OS-9 Level II
> contains listings for Bars and Palette procedures to display the colors in
> Basic09. Not the same as the one from the article, but gives me code for
> setting palette registers in Basic09. Still no help on how to setup and use
> a 16-color text palette that contains 8 dark colors and 8 light colors that
> can be used interchangeably as foreground and background colors. Setting
> the palette registers is the easy part. Getting the system to know that I
> want this register here and that register there, and be able to use all 16
> of them that way, is proving to be impossible. This may still not make
> sense, but it's difficult to make sense when you don't know what you need
> to know to ask an informed question.
>
> At any rate, I am still working at it. I hope I can solve this problem
> soon. Worrying about screen colors was not part of what unpack was supposed
> to do. But I can't give up on it. This needs to be answered, and I need to
> understand how to properly use the palette. So, I continue searching.
>
> Wayne
>




More information about the Coco mailing list