[comp.sys.amiga.programmer] How do I get 16-color text from console device?

chuckh@hpindwa.cup.hp.com (Chuck Hacala) (02/05/91)

I am posting this for a friend who does not have Usenet access, so forgive
me if my paraphrasing of his question contains an error...

My friend has opened a custom 4-bitplane screen and has attached a console
device to it.  He wants to output text in 16 colors, but the ASCII sequences
only allow him to chose 8 of the colors.  He would like to know how to get
the text to come out in all 16 colors.  He thought of changing the cu_fgpen
and the cu_bgpen of the "conunit" structure, but the Autodocs say that to
write to these variables, they must be protected.  Does this mean he has to
set a semaphore?  Any other ideas on how to get 16 color text?

Thanks in advance,
Chuck Hacala

darren@cbmvax.commodore.com (Darren Greenwald) (02/26/91)

In article <70580001@hpindwa.cup.hp.com> chuckh@hpindwa.cup.hp.com (Chuck Hacala) writes:
>I am posting this for a friend who does not have Usenet access, so forgive
>me if my paraphrasing of his question contains an error...
>
>My friend has opened a custom 4-bitplane screen and has attached a console
>device to it.  He wants to output text in 16 colors, but the ASCII sequences
>only allow him to chose 8 of the colors.  He would like to know how to get
>the text to come out in all 16 colors.  He thought of changing the cu_fgpen
>and the cu_bgpen of the "conunit" structure, but the Autodocs say that to
>write to these variables, they must be protected.  Does this mean he has to
>set a semaphore?  Any other ideas on how to get 16 color text?
>
>Thanks in advance,
>Chuck Hacala

	Please don't fiddle with the values in the console unit structure.
While your friend might get it working by some fiddling with the
pens, minterms, drawmode, I strongly suggest not doing this.  I'm
willing to accept an enhancement request for a non-ANSI sequence to set
pen/cell colors greater than 0-7 (no telling when I'll get around to it,
but it would be a reasonable request).

	Because the include files have historically indicated that it
might be possible to fiddle with some of the values in the console unit
structure, I've left it alone (to support anyone who might be doing this
now), but I don't want to recommend it.

	Its really best to deal with the console.device as a terminal.
Hmmm, it seems to me that I just heard this same question on GEnie.

.
--------------------------------------------------------------
Darren M. Greenwald | Commodore-Amiga Software Engineering   
                    | USENET: uunet!cbmvax!darren                       
--------------------------------------------------------------
Quote: "It would be impossible to discuss the subject without
        a common frame of reference." - Spock