Date: Tue, 5 Feb 2002 12:50:18 -0500 From: Jerry A! <jerry@thehutt.org> To: Akira Funahashi <funa@funa.org> Cc: freebsd-mobile@freebsd.org Subject: Re: vaio's jogdial & moused Message-ID: <20020205175018.GA327@nomad.thehutt.org> In-Reply-To: <20020205.202905.71116296.funa@funa.org> References: <20020114223408.GA4272@aviaport.ru> <20020205.202905.71116296.funa@funa.org>
next in thread | previous in thread | raw e-mail | index | archive | help
[-- Attachment #1 --]
On Tue, Feb 05, 2002 at 08:29:05PM +0900, Akira Funahashi wrote:
: Hi,
:
: Juriy Goloveshkin <j@gu.ru> wrote:
: > I made a little hack for moused to use jogdial like a wheel.
: > maybe it will be useful for somebody who use /dev/sysmouse in X.
: > to use it, run "moused -t jogdial -p /dev/jogdial"
[unneeded content snipped]
: How to use on -stable:
:
: 1. # cd /sys/i386/isa
: 2. # tar xvzf $somewhere/spic.4-stable.tar.gz
: 3. Add following line in /sys/conf/files.i386
: i386/isa/spic.c optional spic
: 4. Add following line in your kernel config file.
: device spic0 at isa? irq 0 port 0x10a0
: 5. Make your new kernel and reboot.
: 6. # cd /dev
: 7. # mknod -mode=600 jogdial c 160 0
: 8. # moused -t jogdial -z 4 -p /dev/jogdial
I've got this up and running on my Picturebook C1VP. There are a few
changes that need to be made to get this to work under -stable.
First, mouse.h is located in sys/i386/include (different location from
-current). I've modified Juriy's original patch to work under -stable.
I'm attaching said patch to this message.
Second, a "make includes" needs to be done in order to install the
modified mouse.h in /usr/include/machine *before* compiling moused.
Yeah, it seems so obvious, but I'm hoping I'm not the only one stoopid
enough to get bit by this. 8)
Third, -stable's mknod doesn't support "-mode". You'll need to do the
following to create the jogdial device:
cd /dev
mknod jogdial c 160 0
chmod 600 jogdial
Misc Notes:
* my picturebook doesn't need the "-z" option added to moused
* capture from /usr/ports/graphics/picturebook no longer works
(no biggie for me as I need the jogdial more than I need the
camera)
* event codes 0c, 18 & 70 should probably be added to spic.c as
NOPs. I have no idea what they do, but dmesg and
/var/log/messages are getting quite cramped with the error output
of unknown events.
Anyway, thanks for getting this working. I hope this information is
useful to other -stable users with VAIOs.
--Jerry
Open-Source software isn't a matter of life or death...
...It's much more important than that!
[-- Attachment #2 --]
--- sys/i386/include/mouse.h.orig Tue Feb 5 11:16:26 2002
+++ sys/i386/include/mouse.h Tue Feb 5 11:17:31 2002
@@ -158,6 +158,7 @@
#define MOUSE_PROTO_X10MOUSEREM 13 /* X10 MouseRemote, 3 bytes */
#define MOUSE_PROTO_KIDSPAD 14 /* Genius Kidspad */
#define MOUSE_PROTO_VERSAPAD 15 /* Interlink VersaPad, 6 bytes */
+#define MOUSE_PROTO_JOGDIAL 16 /* Vaio's JogDial */
#define MOUSE_RES_UNKNOWN (-1)
#define MOUSE_RES_DEFAULT 0
--- usr.sbin/moused/moused.c.orig Sat Sep 22 16:11:23 2001
+++ usr.sbin/moused/moused.c Tue Feb 5 11:18:40 2002
@@ -202,6 +202,8 @@
"sysmouse",
"x10mouseremote",
"kidspad",
+ "foo", // hmmm...
+ "jogdial",
#if notyet
"mariqua",
#endif
@@ -364,6 +366,7 @@
(CS7 | CREAD | CLOCAL | HUPCL ), /* X10 MouseRemote */
(CS8 | PARENB | PARODD | CREAD | CLOCAL | HUPCL ), /* kidspad etc. */
(CS8 | CREAD | CLOCAL | HUPCL ), /* VersaPad */
+ 0, /* JogDial */
#if notyet
(CS8 | CSTOPB | CREAD | CLOCAL | HUPCL ), /* Mariqua */
#endif
@@ -1084,6 +1087,7 @@
{ 0x40, 0x40, 0x40, 0x00, 3, ~0x23, 0x00 }, /* X10 MouseRem */
{ 0x80, 0x80, 0x00, 0x00, 5, 0x00, 0xff }, /* KIDSPAD */
{ 0xc3, 0xc0, 0x00, 0x00, 6, 0x00, 0xff }, /* VersaPad */
+ { 0x00, 0x00, 0x00, 0x00, 1, 0x00, 0xff }, /* JogDial */
#if notyet
{ 0xf8, 0x80, 0x00, 0x00, 5, ~0x2f, 0x10 }, /* Mariqua */
#endif
@@ -1363,6 +1367,8 @@
}
break;
+ case MOUSE_PROTO_JOGDIAL:
+ break;
case MOUSE_PROTO_MSC:
setmousespeed(1200, rodent.baudrate, rodentcflags[rodent.rtype]);
if (rodent.flags & ClearDTR) {
@@ -1620,6 +1626,8 @@
*/
break;
#endif /* notyet */
+ case MOUSE_PROTO_JOGDIAL:
+ break;
/*
* IntelliMouse, NetMouse (including NetMouse Pro) and Mie Mouse
@@ -1718,7 +1726,18 @@
act->dx = (char)(pBuf[1]) + (char)(pBuf[3]);
act->dy = - ((char)(pBuf[2]) + (char)(pBuf[4]));
break;
-
+
+ case MOUSE_PROTO_JOGDIAL: /* JogDial */
+ if (rBuf == 0x6c)
+ act->dz=-1;
+ if (rBuf == 0x72)
+ act->dz=1;
+ if (rBuf == 0x64)
+ act->button = MOUSE_BUTTON1DOWN;
+ if (rBuf == 0x75)
+ act->button = 0;
+ break;
+
case MOUSE_PROTO_HITTAB: /* MM HitTablet */
act->button = butmaphit[pBuf[0] & 0x07];
act->dx = (pBuf[0] & MOUSE_MM_XPOSITIVE) ? pBuf[1] : - pBuf[1];
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020205175018.GA327>
