From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (qmail 15096 invoked from network); 7 Jul 1998 05:57:19 -0000 Received: from cs.cs.brown.edu (HELO cs.brown.edu) (128.148.32.2) by mail2.redhat.com with SMTP; 7 Jul 1998 05:57:19 -0000 Received: from boojum.cs.brown.edu (boojum.cs.brown.edu [128.148.38.166]) by cs.brown.edu (8.8.5/8.7.1) with ESMTP id BAA05665 for ; Tue, 7 Jul 1998 01:56:38 -0400 (EDT) From: Tim Rowley Received: (from tor@localhost) by boojum.cs.brown.edu (8.9.0/8.9.0) id BAA02414 for axp-list@redhat.com; Tue, 7 Jul 1998 01:56:38 -0400 (EDT) Message-Id: <199807070556.BAA02414@boojum.cs.brown.edu> Subject: Re: red and blue swapped on Alpha? In-Reply-To: from "B. James Phillippe" at "Jul 6, 98 07:34:48 pm" To: axp-list@redhat.com Date: Tue, 7 Jul 1998 01:56:38 -0400 (EDT) X-Mailer: ELM [version 2.4ME+ PL37 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit 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) {