9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* [9fans] GeForece4 MX (Inno3D Tornedo)
@ 2003-04-15  7:25 okamoto
  2003-04-15  8:34 ` okamoto
  0 siblings, 1 reply; 6+ messages in thread
From: okamoto @ 2003-04-15  7:25 UTC (permalink / raw)
  To: 9fans

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------



^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2003-04-16  1:36 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-04-15  7:25 [9fans] GeForece4 MX (Inno3D Tornedo) okamoto
2003-04-15  8:34 ` okamoto
2003-04-15  9:59   ` okamoto
2003-04-15 15:23     ` Russ Cox
2003-04-16  0:50       ` okamoto
2003-04-16  1:36         ` okamoto

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).