*BSD News Article 14414


Return to BSD News archive

Xref: sserve comp.windows.x.i386unix:1156 comp.os.386bsd.apps:143
Path: sserve!newshost.anu.edu.au!munnari.oz.au!news.Hawaii.Edu!ames!saimiri.primate.wisc.edu!caen!nigel.msen.com!math.fu-berlin.de!irz401!sax!not-for-mail
From: joerg@sax.sax.de (Joerg Wunsch)
Newsgroups: comp.windows.x.i386unix,comp.os.386bsd.apps
Subject: XFree86 ``downgraded'' to Trident 8800
Followup-To: comp.windows.x.i386unix
Date: 13 Apr 1993 18:20:59 +0200
Organization: SaxNet, Dresden, Germany
Lines: 190
Distribution: world
Message-ID: <1qep9b$9t8@sax.sax.de>
NNTP-Posting-Host: sax.sax.de
Summary: XFree86 Trident driver has been adapted to TVGA 8800

Hi all,

since i have been too unpacient to wait starting XFree86 experiments
till i've bought a better video board, i've ``downgraded'' the existing
Trident driver to support the 8800 chipset. Of course, this is a crock.
It's slow and uncomfortable. But maybe, there are further people who
just wanna play with XFree86 and happen to have this card, so it makes
sense. I've gotta board with 512 K RAM and 3 clocks (25.2, 28.3, 40 MHz),
the chipset is a TVGA 8800 CS (someone noted the `CS' might be important).
I've been testing this along with a 386BSD, either with the stock pccons
driver, and with a (patched) pcvt driver.

I've been using much of the existing Trident code. Obviously, most of
the strategies are consistent with newer boards. Unfortunately, it app-
ears that in 256-color mode, the dot clock is halved (for RAM timing
reasons, i guess), so the scan rates are very slow (but this complies
with 640*{400,480} DOS modi for that card). To get a 60 Hz vertical rate,
only about 640 * 400 are applicable, and the monitor must sync down to
about 25 kHz horizontally. Virtual resolution of 800 * 600 works fine.
In monochrome mode, the situation is better. Up to 40 MHz dot clock
may be used, so one might take 640 * 480 at 67 Hz scan (using the 28 MHz
crystal), or 800 * 600 with 60 Hz scan (but near 40 kHz horizontally).
Virtual resolution here reaches to 1100 * 825.

Sorry, i've forgotten to append my Xconfig examples. If someone's inter-
ested, mail me to <joerg_wunsch@uriah.sax.de>.

The diff's below relate to .../mit/server/ddx/x386/vga256/trident/driver.c,
of the patched distribution patched to XFree86-1.2; since i ain't use
the server linkkit, i can't tell what to do to include it into the linkkit.
Sorry. But hopefully, a XFree wizard could include it if considered useful.
If requested, i were willing to put the driver.o files somewhere to a
publically accessible server.

	all the best
	J"org <joerg_wunsch@uriah.sax.de>

*** driver.c.orig	Wed Mar 31 00:11:18 1993
--- driver.c	Tue Apr 13 09:18:45 1993
***************
*** 110,118 ****
       int n;
  {
  #ifdef MONOVGA
!   static char *chipsets[] = {"tvga8900c", "tvga9000", "tvga8900b"};
  #else
!   static char *chipsets[] = {"tvga8900c", "tvga9000"};
  #endif
  
    if (n + 1 > sizeof(chipsets) / sizeof(char *))
--- 110,118 ----
       int n;
  {
  #ifdef MONOVGA
!   static char *chipsets[] = {"tvga8900c", "tvga9000", "tvga8900b", "tvga8800"};
  #else
!   static char *chipsets[] = {"tvga8900c", "tvga9000", "tvga8800"};
  #endif
  
    if (n + 1 > sizeof(chipsets) / sizeof(char *))
***************
*** 183,188 ****
--- 183,193 ----
  #ifdef MONOVGA
  		else if (!strcmp(vga256InfoRec.chipset, TVGA8900Ident(2)))
  			TVGAchipset = TVGA8900B;
+ 		else if (!strcmp(vga256InfoRec.chipset, TVGA8900Ident(3)))
+ 			TVGAchipset = TVGA8800;
+ #else
+ 		else if (!strcmp(vga256InfoRec.chipset, TVGA8900Ident(2)))
+ 			TVGAchipset = TVGA8800;
  #endif
  		else
  			return(FALSE);
***************
*** 245,251 ****
        		if ((TVGAchipset != TVGA8900C1)
                      && (TVGAchipset != TVGA8900C2)
                      && (TVGAchipset != TVGA9000)
! 		    && (TVGAchipset != TVGA8900B))
  		{
    			TVGA8900EnterLeave(LEAVE);
  			return(FALSE);
--- 250,257 ----
        		if ((TVGAchipset != TVGA8900C1)
                      && (TVGAchipset != TVGA8900C2)
                      && (TVGAchipset != TVGA9000)
! 		    && (TVGAchipset != TVGA8900B)
! 		    && (TVGAchipset != TVGA8800))
  		{
    			TVGA8900EnterLeave(LEAVE);
  			return(FALSE);
***************
*** 253,262 ****
  #else
        		if ((TVGAchipset != TVGA8900C1)
                      && (TVGAchipset != TVGA8900C2)
!                     && (TVGAchipset != TVGA9000))
  		{
  			ErrorF(
! 			  "%s: Trident driver only supports TVGA8900C/9000\n",
  			  vga256InfoRec.name);
  	  		TVGA8900EnterLeave(LEAVE);
  	  		return(FALSE);
--- 259,269 ----
  #else
        		if ((TVGAchipset != TVGA8900C1)
                      && (TVGAchipset != TVGA8900C2)
!                     && (TVGAchipset != TVGA9000)
! 		    && (TVGAchipset != TVGA8800))
  		{
  			ErrorF(
! 			  "%s: Trident driver only supports TVGA8800/8900C/9000\n",
  			  vga256InfoRec.name);
  	  		TVGA8900EnterLeave(LEAVE);
  	  		return(FALSE);
***************
*** 286,296 ****
  		vga256InfoRec.bankedMono = TRUE;
  		vga256InfoRec.chipset = TVGA8900Ident(1);
  		break;
  	}
  	/*
  	 * TVGA8900C supports 8 clocks, TVGA9000 supports 16 clocks
  	 */
!     	numClocks = (TVGAchipset == TVGA9000) ? 16 : 8;
  
   	/* 
  	 * How much Video Ram have we got?
--- 293,313 ----
  		vga256InfoRec.bankedMono = TRUE;
  		vga256InfoRec.chipset = TVGA8900Ident(1);
  		break;
+ 	case TVGA8800:
+ 		vga256InfoRec.bankedMono = TRUE;
+ #ifdef MONOVGA
+ 		vga256InfoRec.chipset = TVGA8900Ident(3);
+ #else
+ 		vga256InfoRec.chipset = TVGA8900Ident(2);
+ #endif
+ 		break;
  	}
  	/*
  	 * TVGA8900C supports 8 clocks, TVGA9000 supports 16 clocks
+ 	 * TVGA8800 supports 4 (?) clocks
  	 */
!     	numClocks = (TVGAchipset == TVGA9000) ? 16 :
! 	  (TVGAchipset == TVGA8800? 4: 8);
  
   	/* 
  	 * How much Video Ram have we got?
***************
*** 500,506 ****
      	DisplayModePtr mode;
  {
  #ifndef MONOVGA
! 	if ( TVGAchipset == TVGA9000 ) {
  		/*
  		 * Initialize generic VGA Registers
  		 */
--- 517,523 ----
      	DisplayModePtr mode;
  {
  #ifndef MONOVGA
! 	if ( TVGAchipset == TVGA9000 || TVGAchipset == TVGA8800 ) {
  		/*
  		 * Initialize generic VGA Registers
  		 */
***************
*** 573,579 ****
  	int base;
  
  #ifndef MONOVGA
! 	if (TVGAchipset == TVGA9000)
  		base = (y * vga256InfoRec.virtualX + x) >> 2;
  	else
  #endif
--- 590,596 ----
  	int base;
  
  #ifndef MONOVGA
! 	if (TVGAchipset == TVGA9000 || TVGAchipset == TVGA8800)
  		base = (y * vga256InfoRec.virtualX + x) >> 2;
  	else
  #endif
-- 
J"org Wunsch, ham: dl8dtl    : joerg_wunsch@uriah.sax.de
If anything can go wrong...  :   ...or:
     .o .o                   : joerg@sax.de,wutcd@hadrian.hrz.tu-chemnitz.de,
       <_      ... IT WILL!  : joerg_wunsch@tcd-dresden.de