Index: [thread] [date] [subject] [author]
  From: Christoph Egger <Christoph_Egger@t-online.de>
  To  : Marcus Sundberg <mackan@stacken.kth.se>
  Date: Fri, 7 May 1999 12:24:18 +0200 (MEST)

Re: MouseMan protocoll optimisation

On Thu, 6 May 1999, Marcus Sundberg wrote:

> Christoph Egger wrote:
> > 
> > Hi!
> > 
> > I know, the damned MouseMan protocoll has 3/4 bytes packets. The extra
> > byte is only there if the middle button is active.
> > 
> > You can optimize the MouseMan protocoll like this:
> > 
> > Getting the extra byte as a packet with magic numbers in it.
> > And then switch to 4-byte mode.
> > 
> > The magic numbers are:
> > 
> > #define MOUSE_EXTRA_MAGIC_1 0xAA
> > #define MOUSE_EXTRA_MAGIC_2 0x55
> > 
> > An implementation could be:
> > 
> >         if (buf[1] == MOUSE_EXTRA_MAGIC_1 && buf[2] == MOUSE_EXTRA_MAGIC_2)
> >         {
> >                 /* got unexpected fourth byte => switch to 4-byte mode*/
> > 
> >         }
> >         else
> >         {
> >                 /* the normal 3-byte mode */
> > 
> >         } // if
> 
> Yes I've seen this code in the gpm sources, but neither SVGAlib or
> XFree use it, so I don't trust that it works on all MouseMans.
> 

I think, implement this and ask the folk if this works. If not, you could
go back to the old one.

Christoph Egger
E-Mail: Christoph_Egger@t-online.de


Index: [thread] [date] [subject] [author]