From: "Michael Krause" Newsgroups: comp.os.msdos.djgpp Subject: Re: problem with setting the palette Date: 27 Jul 1997 20:41:48 GMT Organization: TDS Telecom - Madison, WI Lines: 16 Message-ID: <01bc9acd$50ab2d60$e94c89d0@default> References: <5r9ghs$5e8$2 AT grissom DOT powerup DOT com DOT au> NNTP-Posting-Host: mimi3-a08.mill.tds.net To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk David Orme wrote in article <5r9ghs$5e8$2 AT grissom DOT powerup DOT com DOT au>... > I'm displaying PCX files to the screen in VESA mode 0x101 (640x480x256). The > problem is that the palette either: > a) isn't being loaded correctly, or > b) isn't being set correctly. The PCX file stores the palette with all bytes shifted left two bits. So include the following after you load the file: for (int i = 0; i < 768; i++) pal[i] >>= 2; Hope this helps.