Path: 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: Organization: Caulfield Campus, Monash University, Melb., Australia. Lines: 26 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