From: Tim Rowley <tor@cs.brown.edu>
To: axp-list@redhat.com
Subject: Re: red and blue swapped on Alpha?
Date: Tue, 7 Jul 1998 01:56:38 -0400 (EDT) [thread overview]
Message-ID: <199807070556.BAA02414@boojum.cs.brown.edu> (raw)
In-Reply-To: <Pine.LNX.3.96.980706193135.22983A-100000@earth.terran.org> from "B. James Phillippe" at "Jul 6, 98 07:34:48 pm"
B. James Phillippe wrote:
> > > But, to retrack the original topic: anyone here using a ZLXp-E2 on
> > > RedHat-5.1 Linux text console in 640x480 have their red and blue colors
> > > swapped?
Ok, it appears to be a bug in the tga console code for 24-plane
cards in 2.1.[<=106]. I'm guessing that it has been fixed in the
great console rewrite, but for now you can patch the old-style
tga driver as follows (also fixes the off-by-one cursor problem):
--- /tmp/linux/drivers/char/tga.c Thu Apr 9 16:10:15 1998
+++ linux/drivers/char/tga.c Tue Jul 7 01:41:06 1998
@@ -222,7 +222,7 @@
}
} else {
BT463_LOAD_ADDR(0x0000);
- TGA_WRITE_REG((BT463_PALETTE<<2), TGA_RAMDAC_REG);
+ TGA_WRITE_REG((BT463_PALETTE<<2), TGA_RAMDAC_SETUP_REG);
for (i = 0; i < 16; i++) {
j = color_table[i];
@@ -293,7 +293,7 @@
} else {
- xt = col * TGA_F_WIDTH + 144;
+ xt = (col-1) * TGA_F_WIDTH + 144;
yt = row * TGA_F_HEIGHT_PADDED + 35;
TGA_WRITE_REG(0x05, TGA_VALID_REG); /* SCANNING and CURSOR */
@@ -684,7 +684,7 @@
* fill the palette
*/
BT463_LOAD_ADDR(0x0000);
- TGA_WRITE_REG((BT463_PALETTE<<2), TGA_RAMDAC_REG);
+ TGA_WRITE_REG((BT463_PALETTE<<2), TGA_RAMDAC_SETUP_REG);
for (i = 0; i < 16; i++) {
j = color_table[i];
@@ -876,12 +876,12 @@
}
} else { /* 24-plane */
- fgmask = (default_red[fgmask] << 16) |
- (default_grn[fgmask] << 8) |
- (default_blu[fgmask] << 0);
- bgmask = (default_red[bgmask] << 16) |
- (default_grn[bgmask] << 8) |
- (default_blu[bgmask] << 0);
+ fgmask = (default_red[color_table[fgmask]] << 16) |
+ (default_grn[color_table[fgmask]] << 8) |
+ (default_blu[color_table[fgmask]] << 0);
+ bgmask = (default_red[color_table[bgmask]] << 16) |
+ (default_grn[color_table[bgmask]] << 8) |
+ (default_blu[color_table[bgmask]] << 0);
for ( i = 0; i < TGA_F_HEIGHT_PADDED; i++ ) {
if (i < TGA_F_HEIGHT) {
next prev parent reply other threads:[~1998-07-07 5:57 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
1998-07-02 20:04 red and blue swapped on Alpha? B. James Phillippe
1998-07-06 16:59 ` Jim Paradis
1998-07-06 18:09 ` B. James Phillippe
1998-07-06 22:03 ` Paul Tomblin
1998-07-06 23:41 ` B. James Phillippe
1998-07-07 1:20 ` Tim Rowley
1998-07-07 2:34 ` B. James Phillippe
1998-07-07 5:56 ` Tim Rowley [this message]
1998-07-07 7:28 ` B. James Phillippe
1998-07-07 6:04 ` Jay.Estabrook
1998-07-07 15:22 ` Tim Rowley
1998-07-07 15:49 ` Tim Rowley
1998-07-07 12:28 ` Scott Serr
1998-07-07 15:20 ` Jim Paradis
1998-07-08 1:12 ` Bryan W. Headley
-- strict thread matches above, loose matches on Subject: below --
1998-07-07 17:37 Tibbetts, Richard
read-only archive
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox