Return-Path: 800x600-request@yy.cs.keio.ac.jp 
Delivery-Date: Sun, 28 Jul 1996 04:43:32 +0900
Return-Path: 800x600-request@yy.cs.keio.ac.jp
Return-Path: 800x600-request@yy.cs.keio.ac.jp
Received: from kogwy.cc.keio.ac.jp (kogwy.cc.keio.ac.jp [131.113.1.1]) by ms.mc.st.keio.ac.jp (8.6.12+2.5W/3.2W-mc.st31/08/95) with ESMTP id EAA28836 for <sanpei@mc.st.keio.ac.jp>; Sun, 28 Jul 1996 04:43:31 +0900
Received: from chizuru.yy.cs.keio.ac.jp (yy-sync-relay.yy.cs.keio.ac.jp [131.113.73.5]) by kogwy.cc.keio.ac.jp (8.7.4+2.6Wbeta6/3.3Wb) with SMTP id EAA22474 for <sanpei@cc.keio.ac.jp>; Sun, 28 Jul 1996 04:43:30 +0900 (JST)
Received: from localhost (localhost [127.0.0.1]) by chizuru.yy.cs.keio.ac.jp (8.6.12+2.5W/3.1W-2.8compat) with SMTP id EAA04887; Sun, 28 Jul 1996 04:42:48 +0900
Message-Id: <199607271942.EAA04887@chizuru.yy.cs.keio.ac.jp>
Date: Sun, 28 Jul 96 04:42:46 JST
From: MIURA Kenji <kenji@asahi-net.or.jp>
Subject: 800x600 on ThinkPad535
To: 800x600@yy.cs.keio.ac.jp (800x600 Mailing list)
Reply-To: wf9k-mur@asahi-net.or.jp
Mime-Version: 1.0
Content-Type: Multipart/Mixed;
	boundary="--Next_Part(Sun_Jul_28_04:47:07_1996)--"
Posted: Sun, 28 Jul 1996 04:47:47 +0900
X-ML-Name: 800x600
X-Mail-Count: 00484
X-MLServer:  fml 1.5.4.0 current #rms / libsmtp 1.5.3.2 
Precedence: list
Lines: 169

----Next_Part(Sun_Jul_28_04:47:07_1996)--
Content-Type: Text/Plain; charset=iso-2022-jp

$B;01:$H?=$7$^$9!#(B

ThinkPad 535 & FreeBSD & XFree86 3.1.2E $B$G(B 800x600 256 $B?'I=<($K@.8y$7$^$7$?!#(B

$B$3$A$i$N(B ML $B$G(B beta test $B$r$d$C$F$$$k(B ThinkPad 560 $BMQ$N(B cy9382.c $B$r(B
$B>/$7JQ99$9$k$3$H$K$h$j<B8=$7$F$$$^$9!#(Bcy9382.c $B$KBP$9$k%Q%C%A$H(B
XF86Config $B$NNc$r$D$1$^$9$N$G;n$7$F8+$F$/$@$5$$!#(B

$B$d$j$+$?(B
1. cy9382.c $B$K%Q%C%A$r$"$F$k(B
	patch -p < $B%Q%C%A%U%!%$%k(B
2. cy9382.c $B$r%3%s%Q%$%k$9$k(B
	cc -o cy9320 cy9382.c
3. $B%$%s%9%H!<%k$9$k(B
	su (root $B$K$J$k(B)
	cp cy9320 /usr/local/bin
	chmod u+s /usr/local/bin/cy9320
4. X $B$r(B 800x600 $B$G5/F0$9$k(B ... .xinitrc $B$K!"(B
	/usr/local/bin/cy9320 -b
   $B$rDI2C$7$F$*$1$P$$$$$G$7$g$&!#(B

$B;01:7r;y(B MIURA Kenji <wf9k-mur@asahi-net.or.jp>


----Next_Part(Sun_Jul_28_04:47:07_1996)--
Content-Type: Text/Plain; charset=us-ascii

Section "Files"
    RgbPath	"/usr/X11R6/lib/X11/rgb"
    FontPath	"/usr/X11R6/lib/X11/fonts/misc/"
    FontPath	"/usr/X11R6/lib/X11/fonts/Type1/"
    FontPath	"/usr/X11R6/lib/X11/fonts/Speedo/"
    FontPath	"/usr/X11R6/lib/X11/fonts/75dpi/"
    FontPath	"/usr/X11R6/lib/X11/fonts/100dpi/"
EndSection

Section "ServerFlags"
EndSection

Section "Keyboard"
    Protocol	"Standard"
    AutoRepeat	500 5
EndSection


# **********************************************************************
# Pointer section
# **********************************************************************

Section "Pointer"
    Protocol    "PS/2"
    Device      "/dev/mouse"
    Emulate3Buttons
EndSection

Section "Monitor"
    Identifier  "ThinkPad535"
    VendorName  "IBM"
    ModelName   "10.4TFT"
    HorizSync   25 - 64
    VertRefresh 50-90
# 640x480 @ 72 Hz, 36.5 kHz hsync
Modeline "640x480"     31.5   640  680  720  864   480  488  491  521
# 800x600 @ 72 Hz, 48.0 kHz hsync
Modeline "800x600"     50     800  856  976 1040   600  637  643  666 +hsync +vsync
EndSection

Section "Device"
    Identifier  "tgui9320lcd-256"
    VendorName  "Trident"
    BoardName   "ThinkPad"
    Chipset	"tgui9680"
    Option	"med_dram"
EndSection

Section "Screen"
    Driver      "svga"
    Device      "tgui9320lcd-256"
    Monitor     "ThinkPad535"
    Subsection "Display"
        Depth       8
        Modes       "800x600"
        ViewPort    0 0
        Virtual     800 600
    EndSubsection
EndSection

----Next_Part(Sun_Jul_28_04:47:07_1996)--
Content-Type: Text/Plain; charset=us-ascii

--- cy9382.c	Sun Jul 28 04:02:35 1996
+++ cy9320.c	Sun Jul 28 03:57:35 1996
@@ -38,6 +38,13 @@
  * Linux hacks:  Valery Petrov <lera@chaos.ph.utexas.edu>
  */
 
+/*
+ * cy9320 - allow ThinkPad 535's (with Trident Cyber9320 chip)
+ * to run 800x600 on XFree86 3.1.2E.
+ *
+ * Patch for ThinkPad535: MIURA Kenji <wf9k-mur@asahi-net.or.jp>
+ */
+
 
 
 /*
@@ -264,24 +271,15 @@
 
 
 /*
- * are we running on a cyber 9382?
- *
- * (presumably, we could be more liberal, i.e., accept
- * more boards.  however, since i don't know the impact
- * of trying this on random boards, i am into being
- * as conservative as possible.)
+ * are we running on a cyber 9320?
  */
 
 int
 isitcyber(void)
 {
-	if (g_etx(0x3c5, 0xb) != 0xd3) {
+	if (g_etx(0x3c5, 0xb) != 0xa3) {
 		fprintf(stderr,
-			"does not appear to be a Trident 9660/80/9385/2\n");
-		return 0;
-	}
-	if (g_etx(0x3c5, 0x9) != 0x33) {
-		fprintf(stderr, "does not appear to be a 9382\n");
+			"does not appear to be a Trident 9320\n");
 		return 0;
 	}
 	return 1;		/* Yes! */
@@ -343,7 +341,7 @@
 
 #endif	/* defined(LINUX) */
 
-	/* make sure we are running on what we think we are running on (9382) */
+	/* make sure we are running on what we think we are running on (9320) */
 	if (!isitcyber()) {
 		exit(1);
 	}
@@ -377,16 +375,16 @@
 		}
 	}
 	if (bflag) {
-		ch = g_etx(0x3cf, 0x31)&0x8f;
+		ch = g_etx(0x3CF, 0x30);
 		tri_unlock();
-		p_utx(0x3cf, 0x31, ch|0x10);	/* 3fc.31[6:4] = 1 (600) */
+		p_utx(0x3CF, 0x30, ch|0x02);
 		tri_lock();
 		action++;
 	}
 	if (sflag) {
-		ch = g_etx(0x3cf, 0x31)&0x8f;
+		ch = g_etx(0x3CF, 0x30);
 		tri_unlock();
-		p_utx(0x3cf, 0x31, ch);		/* 3fc.31[6:4] = 0 (480) */
+		p_utx(0x3CF, 0x30, ch&0xFD);
 		tri_lock();
 		action++;
 	}

----Next_Part(Sun_Jul_28_04:47:07_1996)----
