How does the Macintosh do mouse tracking (C:D ratio)?


From: pg@sanitas.stortek.com (Paul Gilmartin)
Date: Fri, 25 Jun 1993 05:22:10 GMT

>From:   mac@snowhite.cis.uoguelph.ca
> OK, I was asking if you know what the mouse speed settings in the
> Macintosh's control panel "mean".  I'm trying to find out the actual
> control-display function used.  If they were linear I could just measure
> them with a ruler; but the mappings are 2nd order (also called velocity
> control), so it's pretty well impossible to figure it out.  The faster you
> move the mouse, the faster the cursor moves.
> Anyway this information should exist somewhere, but it beats me where.

I found it in:
	ResEdit Complete
	Peter Alley & Carolyn Strange
	Addison Wesley, 1991

Essentially, it's a table lookup to get a multiplier which is the C/D ratio.
The table(s) (actually their inverses) are stored as "mcky" !-) resources
in the System file.

From: ramer@nrc-iris.nrc.uab.edu (Kevin W. Ramer)
Date: Thu, 24 Jun 1993 09:55:43 -0400

Here we go:
The mouse control panel uses resources of type 'mcky'.    My System has 6
settings for mouse speed.  ID 0 is for the tablet setting, while ID 5 is
for the fastest. The format of the 'mcky' resource is a sequence of 8 bytes 
interpreted as integers.  The following table is from "ResEdit Complete"
1st Ed.  
Mouse Moves    Threshold Value    Threshold Used    Pointer Moves

1                      1                 1               1
2-4                    4                 2        2 X distance moved
5-7                    7                 3        3 X distance moved
8-10                  10                 4        4 X distance moved
11-13                 13                 5        5 X distance moved
14-15                 15                 6        6 X distance moved
16                    16                16        7 X distance moved
>16                  255               255        8 X distance moved

The 'mcky'  values are used as follows:
(T is an abbreviation for Threshold)

"Each 60th second the system checks the location of the mouse. The distance
it has moved is compared to the values in the [active] 'mcky' resource. 
T1 is checked first followed by T2, up to T8.  

When a T value is found that is greater than the distance moved ( in
pixel-equivalents), the distance is multiplied by the T number (1-8) 
to determine how far the pointer moves." -- ResEdit Complete (p278).

The following is a brief discussion of examples:

"The tablet setting has all threshold values set to 255. This effectively
eliminates any acceleration because {it is assumed} that you could never 
move the mouse that far in 1/60th second so there's never any multiplication 
factor.  The fastest mouse you could accurately position would use T values 
like 1,2,3,3,3,3,3,3
(the absolute fastest would use threshold values of 0,0,0,0,0,0,0,1 and
would cause every mouse movement to be multiplied by 8)."  --ResEdit
Complete p279).

comp.human-factors faq WWW page: