🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.os.msdos.programmer
Article #2383

Re: VGA palette "blues"

#2383
From: mr r vanschyndel
Date: Wed, 26 Sep 1990 13:22
26 lines
1603 bytes
bg0v+@andrew.cmu.edu (Brian M. Gottier) writes:

>What's wrong?... For example, I try to set color 14 to black.  I enter the
>value of 0x3f for each of rgb for color 14. (only the lower six bits are
>significant)  I then read the values of rgb for color 14 and, sure enough,
>they are all 0x3f.  However the areas of the screen that have values of 14
>are not black at all.  By the way, if I set the color by just setting color
>14 to 0 (with the setpalette function in Turbo C or the equivalent BIOS call)
>the areas which have color 14 do indeed display in black.

Your VGA values are being translated by the EGA palette -- so set them to
a one-to-one mapping (eg pal[1] = 1, pal[2] = 2, etc).

It was set up this way to maintain compatability (i think).

In short:

Pixel value -----> EGA XLAT ----> VGA DAC XLAT ---> RGB to monitor

ron

-- 
Ron van Schyndel                      rdt155r@monu6.cc.monash.edu.au
Physics Department, Monash University rdt155r%monu6.cc.monash.oz@uunet.UU.NET
CAULFIELD EAST, Victoria, AUSTRALIA   {hplabs,mcvax,uunet,ukc}!munnari!monu6..
Location: 37 52 38.8S  145 02 42.0E   Phone: +613-573-2567   Fax: +613-573-2748 
Technical Details
Message-ID: <1990Sep26.132234.15739@monu6.cc.monash.edu.au>
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!munnari.oz.au!goanna!minyos!monu6!rdt155r
References: <Yazhz3600WB78JnUMU@andrew.cmu.edu>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!munnari.oz.au!goanna!minyos!monu6!rdt155r
From: rdt155r@monu6.cc.monash.edu.au (mr  r    vanschyndel)
Newsgroups: comp.os.msdos.programmer
Subject: Re: VGA palette "blues"
Message-ID: <1990Sep26.132234.15739@monu6.cc.monash.edu.au>
Date: 26 Sep 90 13:22:34 GMT
References: <Yazhz3600WB78JnUMU@andrew.cmu.edu>
Organization: Caulfield Campus, Monash University, Melb., Australia.
Lines: 26