From: pete@q106fm.UUCP (pete cervasio)
Newsgroups: comp.os.linux
Subject: Microsoft Busmouse patch for 0.97pl4
Date: Wed, 09 Sep 92 19:12:18 CDT
Organization: WKBQ-FM Engineering Department

Hi, folks... I finally get to make some sort of contribution (after all
these months). :-) I took the Microsoft Busmouse patch posted by Derrick
Cole and folded it into the 0.97pl4 code.  The nice thing is you don't
have to recompile the kernel if you change from Logitech to Microsoft.
There's a new minor device number for MS mice - 2.  If you have a MS
mouse and it's currently /dev/mouse with major=10 and minor=0, just do a

    rm /dev/mouse
    mknod /dev/mouse c 10 2     (from memory...)

and you'll be set up to use this driver.  Tell X you have a busmouse.
That's the main reason I went to this trouble - X11. :-)

With this patch, the minor devices for bus mice are:

    0 - Logitech
    1 - PS/2 style mouse
    2 - Microsoft

It should be fairly easy to add support for other (different) bus mice
in the future.  I've managed to keep the MS mouse in the same fops[]
struct, though at first I had a separate one (with separate open()
read(), and release() functions).

Instructions:

Strip out the .uue file below to msmouse.uue.  My blabbering will
    probably confuse uudecode.  It's already confused me.
uudecode the file to msmouse.97p4.Z
uncompress msmouse.97p4
cd /usr/src              ( right above linux source tree )
patch -p0 < /wherever.it.is/msmouse.97p4
cd linux
make disk

A problem (maybe?):

The Logitech initialization code will detect a mouse when it's a
Microsoft, but the driver doesn't work.   The Microsoft init code
currently doesn't check to see if one is there.  So... you'll either get
two "mouse found" messages if you have either type, or one if you don't
have any busmouse.

What I don't know (yet) is how to ask the mouse if it's a Microsoft.
I'll play with mouse.com in Turbo Debugger tonight to see if I can find
out anything.  I also don't know what the MS mouse init code does to a
Logitech mouse... I don't have one to test it on.  Could someone with a
Logitech mouse please apply this patch and see if it trashes your mouse?
I'll see what I can do to fix it.

I've mailed this patch off to Linus, and maybe he'll use it in the next
release.  Thanks to Teemu Rantanen and Derrick Cole for doing the hard
parts.  <grin>  Hopefully this won't break anything.

Anyway, here's the uuencoded patch (yeah, I know it shows a later date
for the original code... I cp'ed it from another drive to get it into
the /src directory):

---------------------------------------------
beg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]<.!M_SD%B!+9K40.\:`.B+#S+DP/.\QAHBY)NQ.==6!4A(DBNV4;0
M3AI60$NBO3F=0N,3,S=C']UJN[?GL;E@#(YEH(%3)M?/0==8HS4?E#"TIGV*
MUV[OQCE?L@97\T$3LS-DG]^99P2YA-@@``51TBPY=ORBX;CGT;=(++B8^[E+
M3AA[XQYTG!]VO,CBHY%Q+;'FQXY5(*-5A.Q6<;)$EA\`H/5P9`V0`$XR`VC)
ME)4?N@EP(5>1A>&U%HQ'\AAE0<%X_+"TE>I&$'PS(]XK)I3`]8?M4.#ZD@(N
60><A.M<RP%S@"-,*0H3^;;'+Q:4R%Z4R
`
end
-----------


+----------------------------------------------------------------------+
| Pete Cervasio                | pete%q106fm.uucp@wupost.wustl.edu     |
| I fish, therefore I am.      | pete.cervasio@f1.n2250.z1.fidonet.org |
+----------------------------------------------------------------------+
|  If you think of C as a preprocessor for your assembler, it makes    |
|                   just as little sense as before.   (me)             |
+----------------------------------------------------------------------+
Newsgroups: comp.os.linux