Newsgroups: comp.arch.embedded,comp.robotics
Path: cantaloupe.srv.cs.cmu.edu!europa.chnt.gtegsc.com!howland.reston.ans.net!ix.netcom.com!netcom.com!jonk
From: jonk@netcom.com (Jonathan Dale Kirwan)
Subject: Re: Serial Mouse Data Stream Format needed
Message-ID: <jonkDBCws9.A3n@netcom.com>
Followup-To: comp.arch.embedded,comp.robotics
Organization: New World Computing Services
X-Newsreader: TIN [version 1.2 PL1]
References: <1995Jul6.123817.1@stim.stim.tec.tn.us> <DBCMFx.C64@proteon.com>
Date: Fri, 7 Jul 1995 17:33:45 GMT
Lines: 37
Sender: jonk@netcom7.netcom.com
Xref: glinda.oz.cs.cmu.edu comp.arch.embedded:1949 comp.robotics:22259

Kevin Darling (kdarling@vkgs.com) wrote:
: If it's the one I use, it's 7-bits (your serial channel will have to be
: set for that instead of 8-bits)...
:  Bit  6  5  4  3  2  1  0
:      -- -- -- -- -- -- --
:       1 S1 S2 Y7 Y6 X7 X6   (bit 6 always = 1 as flag)
:       0 X5 X4 X3 X2 X1 X0   
:       0 Y5 Y4 Y3 Y2 Y1 Y0   
:  S1,S2 = buttons,  X and Y are relative movements

Thanks, Kevin.  I did already know this from documentation I found in
mouse implementation code in the Microchip application notes.  However,
I find that version 2.0A serial mice from Microsoft do not always send
all three bytes.  It appears, at first glance, that mouse drivers on the
PC must also time their receipt of characters in order to determine when
a transmission from the mouse has ended.  This additional information is
important.

You can see this effect by moving the 2.0A mouse right one mickey.  It 
transmits the byte, C0h, and does not transmit anything else.  A second 
move to the right will produce one such byte again.  A simple move of the 
mouse down one mickey will produce, C0h 80h, while a one mickey move up 
produces a predictable, CCh 80h BFh.  Hopefully, Microsoft will be forth-
coming on a more complete description that encloses all such behaviors.

John Woods (jfw@proteon.com) wrote:
: The X Window System source code should reveal the details of several
: different mouse protocols.

I'm hoping to save myself unnecessary effort.  Scanning through a large
set of source code, with which I am completely unfamiliar, is something
I will save until I have exhausted other avenues.  Perhaps you might
already know which particular routine within X would be appropriate?  I'm 
not averse to your suggestion, just not excited by the effort implied.

Jon

