[comp.lang.pascal] colors on Turbo Pascal

wcwang@iuvax.cs.indiana.edu (Bill Wang) (01/24/91)

This is a question about Turbo Pascal.

I just found out that SetRGBpalette() function couldn't change the 
RGB values for 6, 8-15 slots in VGA color palette although I still could
use 1-5 and 7.  Does anyone have simular experience or some hints of
what is going on?  Thanks in advance!

-- 
Bill Wang
US Mail = Psychology Department, Indiana University, Bloomington, IN 47405
UUCP  = {rutgers, att, ames}!iuvax!wcwang
Internet = wcwang@iuvax.cs.indiana.edu

dave@tygra.UUCP (David Conrad) (01/28/91)

>From: Bill Wang <wcwang@iuvax.cs.indiana.edu>
>Subject: colors on Turbo Pascal (PC)
>Message-ID: <1991Jan23.170634.2492@news.cs.indiana.edu>
>Date: Wed, 23 Jan 91 17:06:08 -0500

   I just found out that SetRGBpalette() function couldn't change the
   RGB values for 6, 8-15 slots in VGA color palette although I still could
   use 1-5 and 7.  Does anyone have simular experience or some hints of
   what is going on?  Thanks in advance!
   --
   Bill Wang

Well, I'm clueless!  I just wrote a program that played with all 256 color
palette registers, and they all work!  What kind of VGA do you have?  I
have a Paradise card and I'm using the svga256 driver in 640x480x256 mode.
--
David Conrad   |   K9 hits the mountain nymph.--More--
dave@ddmi.com  |   The mountain nymph steals a cursed +0 chain mail.
-- 
=  CAT-TALK Conferencing Network, Computer Conferencing and File Archive  =
-  1-313-343-0800, 300/1200/2400/9600 baud, 8/N/1. New users use 'new'    - 
=  as a login id.  AVAILABLE VIA PC-PURSUIT!!! (City code "MIDET")        =
   E-MAIL Address: dave@DDMI.COM

eli@smectos.gang.umass.edu (Eli Brandt) (02/02/91)

In article <1991Jan28.085700.4548@tygra.UUCP> dave@tygra.UUCP (David Conrad) writes:
>>From: Bill Wang <wcwang@iuvax.cs.indiana.edu>
>>Subject: colors on Turbo Pascal (PC)
>>Message-ID: <1991Jan23.170634.2492@news.cs.indiana.edu>
>>Date: Wed, 23 Jan 91 17:06:08 -0500
>
>   I just found out that SetRGBpalette() function couldn't change the
>   RGB values for 6, 8-15 slots in VGA color palette although I still could
>   use 1-5 and 7.  Does anyone have simular experience or some hints of
>   what is going on?  Thanks in advance!
>   --
>   Bill Wang
>
>Well, I'm clueless!  I just wrote a program that played with all 256 color
>palette registers, and they all work!  What kind of VGA do you have?  I
>have a Paradise card and I'm using the svga256 driver in 640x480x256 mode.

I think the mode makes the difference.  Note that the colors mentioned as 
working properly in the original post are those whose default 16-64 
mapping don't have the high bit.  I had a similar problem at one point and 
solved it by simply setting the 16-64 map to map to straight 0 through 15
and then doing the 64-2^18 remapping.

>--
>David Conrad   |   K9 hits the mountain nymph.--More--
>dave@ddmi.com  |   The mountain nymph steals a cursed +0 chain mail.
>-- 
>=  CAT-TALK Conferencing Network, Computer Conferencing and File Archive  =
>-  1-313-343-0800, 300/1200/2400/9600 baud, 8/N/1. New users use 'new'    - 
>=  as a login id.  AVAILABLE VIA PC-PURSUIT!!! (City code "MIDET")        =
>   E-MAIL Address: dave@DDMI.COM

Hope this helps...

   Eli