From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: To: 9fans@cse.psu.edu From: okamoto@granite.cias.osakafu-u.ac.jp MIME-Version: 1.0 Mime-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Subject: [9fans] GeForece4 MX (Inno3D Tornedo) Date: Tue, 15 Apr 2003 16:25:05 +0900 Topicbox-Message-UUID: 8feaa99e-eacb-11e9-9e20-41e7f4b1d025 Hi, I'm trying to use a GeForce 4 MX 440 (did=0x171) card, and have problem. New vgabvidia.c detects this GeForece 4 card successfully, and run rio etc in a sence. When I run it, my display (1376x1024x32, mf5421) shows a smaller two separate window horizontally. Vertically, it's normal. I think I'm using wrong horizontal timing, however, how I can fix this? Itried to tune the display's control panel, but it's beyond the control range. Below is a small fix to /sys/src/9/pc/vganvidia.c to avoid strange cursor shape for this card. I'd be happy if it could be included in the source tree. Kenji ------------cut here----------- static void nvidiacurload(VGAscr* scr, Cursor* curs) { ulong* p; int i,j; ushort c,s; ulong tmp; Pcidev *pd; /* K.Okamoto for Geforece4 MX */ if(scr->io == 0) return; vgaxo(Crtx, 0x31, vgaxi(Crtx, 0x31) & ~0x01); p = KADDR(scr->io + hwCurImage); for(i=0; i<16; i++) { pd = nvidiapci(); if(pd->did == 0x171) { /* for Geforece4 MX bug, K.Okamoto */ c = (curs->clr[2 * i+1] << 8) | curs->clr[2 * i]; s = (curs->set[2 * i+1] << 8) | curs->set[2 * i]; } else { c = (curs->clr[2 * i] << 8) | curs->clr[2 * i+1]; s = (curs->set[2 * i] << 8) | curs->set[2 * i+1]; } tmp = 0; for (j=0; j<16; j++){ if(s&0x8000) tmp |= 0x80000000; else if(c&0x8000) tmp |= 0xFFFF0000; if (j&0x1){ *p++ = tmp; tmp = 0; } else { tmp>>=16; } c<<=1; s<<=1; } for (j=0; j<8; j++) *p++ = 0; } for (i=0; i<256; i++) *p++ = 0; scr->offset = curs->offset; vgaxo(Crtx, 0x31, vgaxi(Crtx, 0x31) | 0x01); return; } ------cut here------