Subject: Re: various mouse results
To: None <mcmahill@alum.mit.edu>
From: Colin Wood <cwood@ichips.intel.com>
List: port-mac68k
Date: 03/04/1998 14:10:43
Dan McMahill wrote:
> 
> >> Info Performance Mouse, Model IPM2
> >> 	partially works under MRG code.  left button works
> >>	 middle is dead, right 
> >> 	sort of does a left click (maybe a double one).
> >
> >I've never heard of this one before.  I guess we'll have to add support
> >for it :-)
> ok.   its a cheapo mouse.  couldn't seem to locate another logitech
> or i would have just gotten another of those since I know it works.

Check out www.onsale.com.  They often have them available there fairly
cheaply (mine was about $22 including shipping, I think).

> >> Feb 25 21:45:09 dinah-moe /netbsd:^Hadb: extended keyboard at 2
> >> Feb 25 21:45:09 dinah-moe /netbsd: adb: extended mouse <LT01> 3-button 400 d
> >pi mouse at 3
> >> Feb 25 21:45:09 dinah-moe /netbsd: adb: 100 dpi mouse at 15
> >                                          ^^^^^^^^^^^^^^^^^^^
> >Is this real?  Do you have an actual 100-dpi mouse attached in addition to
> >the Logitech mouse?
> > 
> >> This is a LogiTech MouseMan M/N M-AH32, P/N 840015-01
> No, I only have the logitech.  I do however still have that Keystone
> PC keyboard adapter, but I don't think thats it.  Oh wait, the IIx
> without the keystone and with the logitech does not show the 100dpi at 15
> part.  So maybe it is the adapter.

Probably...how strange that it shows up as a mouse....

> >> now, same computer, same kernel, different mouse
> >> Feb 27 01:43:12 dinah-moe /netbsd: adb: bus subsystem
> >> Feb 27 01:43:12 dinah-moe /netbsd:^Hadb: extended keyboard at 2
> >> Feb 27 01:43:12 dinah-moe /netbsd: adb: 100 dpi mouse at 3
> >> Feb 27 01:43:12 dinah-moe /netbsd: adb: 100 dpi mouse at 15
> >> Info Performance Mouse, Model IPM2
> >> 
> >> Now, the left button works, middle is inactive, right acts pretty much like
> >> the left, but makes my fvwm2 popup menu stick!
> >
> >Sounds vaguely like my Mouse System's A^3 mouse before I added support for
> >it.  It did some screwy stuff.
> OK, if you point me in the right direction, I'll look into how this mouse
> works.

Sure, some directions below.

> >Yes, it is.  If you're willing to spend a little time with ADB Parser, we
> >can probably pretty easily figure out how your mouse works and add support
> >for it...
> 
> sure.  I have the ADB parser program, just don't know what to do with it :)
> I am still interested, although the pressure is somewhat off (lucille
> has been replaced with a decstation).

A question, does the IPM2 have an extension to enable it?  (I'd assume so
or otherwise it wouldn't work under MacOS ;-).  Boot with the extension
enabled and the 2nd and 3rd mouse buttons "working" under MacOS, and then
start up ADB Parser.

First, you'll want to figure out what handler id the mouse uses.  This
number is what tells the ADB Manager which set of routines to call to
handle information from the mouse.  To figure this out, you send a "talk
register 3" command to the mouse.  In ADB Parser, make sure that you
select your mouse in the list of ADB devices in the middle.  It's ADB
address (probably 3) will appear in the appropriate box on the left.  In
the column on the right, you'll probably see a list of information
including the "current handler id".  I've found this is usually wrong (and
usually set to 1 for mice), ignore it for now.  In the left-hand column,
make sure the register box contains the value "3".  Now, hit the "Send
Command" button (or whatever it's called) at the bottom.  You should get 4
hex digits back in the "bytes received box" towards the bottom.  The first
2 digits are more or less random noise (they're actually a defined
response which you can ignore).  However, the last 2 digits are the
handler id for the mouse.  Write it down.  It _should_ be something other
than 1, 2, 3, 4, or 5.  Those numbers correspond to the standard Apple
mouse, the newer ADB Mouse II, the Mouse Systems A^3 mouse, an Extended
Mouse Protocol mouse, and the MicroSpeed Mouse Deluxe, respectively
(actually, the MS Mouse Deluxe could be a 6...).  If your handler id is
one 3, 4, or 5 (maybe 6), this is going to get messy ;-)  Otherwise, it
shouldn't be too difficult.  If the id is 1 or 2, something isn't
initialized correctly since those are the standard 100-dpi/200-dpi,
1-button mouse handlers.

Now that you have the handler id for the mouse, you need to figure out
exactly what protocol it uses to indicate that it's sending the 2nd and
3rd buttons.  Usually, you can figure this out by watching what happens
when you press the buttons.  At the top of the left-hand column in ADB
Parser, there is a window which monitors data received from the bus.  If
you move the mouse around or type on the keyboard, you will probably see
the first 4 digits change (but it's unlikely that any of the others will
change).  Anyway, without moving the mouse, you need to look at the value
of those numbers.  Press 1 button at a time and hold it down without
moving the mouse.  Watch how the numbers change (i.e. write it down :-)
As you press each button, you will probably notice some kind of pattern to
how the numbers change.  Often, the default numbers are 80 80, and when
you press a button, it will change to something like 7F 7F (I'm kinda
guessing on that one).  If you think of each pair of digits as an 8-bit
mask, you'll notice that the bits are set to 1's when buttons aren't
pressed and 0's when buttons are pressed (at least that's the way that
most of the mice I've already seen are supported).  Write down this
behavior.

If you can describe how this works sufficiently, we can add support for
this mouse.  If any of the above is a little vague, I can probably
elaborate a little more on some of the points (it's been over a year since
I figured out how my MS A^3 mouse worked).  Please let me know how it
goes.

Later.

-- 
Colin Wood                                 cwood@ichips.intel.com
Component Design Engineer - MD6                 Intel Corporation
-----------------------------------------------------------------
I speak only on my own behalf, not for my employer.