From owner-freebsd-current Wed Nov 27 05:31:50 1996 Return-Path: owner-current Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id FAA19690 for current-outgoing; Wed, 27 Nov 1996 05:31:50 -0800 (PST) Received: from whizzo.transsys.com (whizzo.TransSys.COM [144.202.42.10]) by freefall.freebsd.org (8.7.5/8.7.3) with ESMTP id FAA19685; Wed, 27 Nov 1996 05:31:47 -0800 (PST) Received: from localhost.transsys.com (localhost.transsys.com [127.0.0.1]) by whizzo.transsys.com (8.8.3/8.7.3) with SMTP id IAA01084; Wed, 27 Nov 1996 08:31:44 -0500 (EST) Message-Id: <199611271331.IAA01084@whizzo.transsys.com> X-Mailer: exmh version 1.6.9 8/22/96 To: sos@FreeBSD.org cc: jkh@time.cdrom.com (Jordan K. Hubbard), current@FreeBSD.org From: "Louis A. Mamakos" Subject: Re: FreeBSD-3.0-current PS/2 mouse driver change References: <199611270804.JAA00372@ravenock.cybercity.dk> In-reply-to: Your message of "Wed, 27 Nov 1996 09:04:00 +0100." <199611270804.JAA00372@ravenock.cybercity.dk> Mime-Version: 1.0 Content-Type: multipart/mixed ; boundary="===_0_Wed_Nov_27_08:30:42_EST_1996" Date: Wed, 27 Nov 1996 08:31:44 -0500 Sender: owner-current@FreeBSD.org X-Loop: FreeBSD.org Precedence: bulk This is a multipart MIME message. --===_0_Wed_Nov_27_08:30:42_EST_1996 Content-Type: text/plain; charset=us-ascii Thanks for your reply. I've enclosed the diffs below. Please note that right now, the new psm.c driver in the kernel renders this pointing device helpless to do it's nifty bits. The additional "smarts" in the kernel driver seems to mask off the bit which indicates a "tap" gesture on the pad. I've just upgraded to 3.0-current last night, and have only begun to look at the driver. The moused changes, on the other hand, I've been running on a couple of machines for about 3 weeks now, and it seems to work great. When I get the kernel driver working again, I'll send those changes in too... louie --===_0_Wed_Nov_27_08:30:42_EST_1996 Content-Type: application/octet-stream Content-Description: diff --- /usr/src/usr.sbin/moused/moused.c Thu Sep 26 23:38:48 1996 +++ moused.c Wed Oct 16 22:30:25 1996 @@ -72,6 +72,7 @@ #define R_LOGIMAN 6 #define R_PS_2 7 #define R_MMHITAB 8 +#define R_GLIDEPOINT 9 char *rnames[] = { "xxx", @@ -83,6 +84,7 @@ "mouseman", "ps/2", "mmhitab", + "glidepoint", NULL }; @@ -97,6 +99,7 @@ (CS7 | CREAD | CLOCAL | HUPCL ), /* MouseMan */ 0, /* PS/2 */ (CS8 | CREAD | CLOCAL | HUPCL ), /* MMHitTablet */ + 0, /* Glidepoint */ }; @@ -215,6 +218,7 @@ rodent.portname = "/dev/mse0"; break; case R_PS_2: + case R_GLIDEPOINT: if (!rodent.portname) rodent.portname = "/dev/psm0"; break; @@ -273,6 +277,8 @@ void usage(void) { + int i; + fprintf(stderr, " Usage is %s [options] -p -t \n" " Options are -s Select 9600 baud mouse.\n" @@ -283,15 +289,10 @@ " -D Lower DTR\n" " -S baud Select explicit baud (1200..9600).\n" " should be one of :\n" - " microsoft\n" - " mousesystems\n" - " mmseries\n" - " logitech\n" - " busmouse\n" - " mouseman\n" - " ps/2\n" - " mmhittab\n" ,progname); + + for (i = 1; rnames[i]; i++) + fprintf(stderr, " %s\n", rnames[i]); exit(1); } @@ -392,7 +393,8 @@ write(rodent.mfd, "*X", 2); setmousespeed(1200, rodent.baudrate, rodentcflags[R_LOGIMAN]); } else { - if ((rodent.rtype != R_BUSMOUSE) && (rodent.rtype != R_PS_2)) + if ((rodent.rtype != R_BUSMOUSE) && (rodent.rtype != R_PS_2) + && (rodent.rtype != R_GLIDEPOINT)) { /* try all likely settings */ setmousespeed(9600, rodent.baudrate, rodentcflags[rodent.rtype]); @@ -482,6 +484,7 @@ { 0x40, 0x40, 0x40, 0x00, 3 }, /* MouseMan */ { 0xc0, 0x00, 0x00, 0x00, 3 }, /* PS/2 mouse */ { 0xe0, 0x80, 0x80, 0x00, 3 }, /* MM_HitTablet */ + { 0xc0, 0x00, 0x00, 0x00, 3 }, /* glidepoint */ }; debug("received char 0x%x",(int)rBuf); @@ -603,6 +606,16 @@ act.buttons = (pBuf[0] & 0x04) >> 1 | /* Middle */ (pBuf[0] & 0x02) >> 1 | /* Right */ (pBuf[0] & 0x01) << 2; /* Left */ + act.dx = (pBuf[0] & 0x10) ? pBuf[1]-256 : pBuf[1]; + act.dy = (pBuf[0] & 0x20) ? -(pBuf[2]-256) : -pBuf[2]; + break; + + case R_GLIDEPOINT: /* Glidepoint */ + act.buttons = ((pBuf[0] & 0x04) ? MIDDLE_BUTTON : 0) | + ((pBuf[0] & 0x02) ? RIGHT_BUTTON : 0) | + (((pBuf[0] & 0x01) || + ((pBuf[0] & 0x08) == 0)) ? LEFT_BUTTON : 0); + act.dx = (pBuf[0] & 0x10) ? pBuf[1]-256 : pBuf[1]; act.dy = (pBuf[0] & 0x20) ? -(pBuf[2]-256) : -pBuf[2]; break; *** /usr/src/etc/sysconfig Thu Sep 26 23:16:37 1996 --- sysconfig Wed Oct 16 22:59:25 1996 *************** *** 47,53 **** saver=NO # Set to ! # {microsoft|mousesystems|mmseries|logitech|busmouse|mouseman|ps/2|mmhittab} # to activate system mouse cursor support (or NO for none) # Use 'vidcontrol -m on' command to activate it on particular screen mousedtype=NO --- 47,53 ---- saver=NO # Set to ! # {microsoft|mousesystems|mmseries|logitech|busmouse|mouseman|ps/2|mmhittab|glidepoint} # to activate system mouse cursor support (or NO for none) # Use 'vidcontrol -m on' command to activate it on particular screen mousedtype=NO --===_0_Wed_Nov_27_08:30:42_EST_1996--