Is it possible that you missed a 65536 in the latter?

No ... and yes...

There are 2 ways of writing the formulas: One way more EASY easily readable and understandable by us humans, so we can understand the rough calculations, and another way showing the EXACT internal calculations done, if we need to be sure that the internal rounding is OK and remainders are being handled as we want them to be.

I've given the EPP=ON EXACT formula, but the EPP=OFF EASY formula, which is why it looks like a 65536 is missing.

Here is the EASY formula for EPP ON:

If:

- Smooth_X is the delta SmoothX value of the segment (SmoothMouseXCurve[i] - SmoothMouseXCurve[i-1])

(1.0 = 0x10000)

- Smooth_Y is the delta SmoothY value of the segment (SmoothMouseYCurve[i] - SmoothMouseYCurve[i-1])

- DPI is 96 (or whatever)

- MouseSensitivity is "MouseSensitivity" from the registry

- MouseSensitivityFactor is =MouseSensitivity/10 (1.0 for the 6/11, "10" position)

Then the final sensitivity (Windows 7) is:

Scaling=(Smooth_Y*((DPI/150)*MouseSensitivityFactor))/(Smooth_X*3.5))

(BTW, this is a simplified formula that only applies when the segment starts at 0,0, so it can be used for 1:1 fixes and the like...)

If we want to understand how the 'Enhance pointer precision' accel works, we can use the EASY formula.

But the EASY calculation, if done on your desk calculator, or if done by Excel, does not exactly represent what Windows does.

If we want to make sure that a curve we build has EXACTLY a 1.0 scaling (rather than a 65535/65536 = 0.99998 scaling), then we need the EXACT formula.

(The EPP=ON exact formula is on page 2 of this thread.)

When EPP is ON, the EASY formula and the EXACT formula sometimes give different results.

Here is the EASY formula for EPP OFF:

if (MouseSensitivity <= 2)
MouseSensitivityFactor = MouseSensitivity / 32
else if (MouseSensitivity <= 10)
MouseSensitivityFactor = (MouseSensitivity-2) / 8
else
MouseSensitivityFactor = (MouseSensitivity-6) / 4
Scaling = MouseSensitivityFactor

For creating a graph comparing EPP=ON versus EPP=OFF, I would use the EASY formulas for both. Neither of which have a 65536 in them.

Here is the EXACT formula for EPP OFF:

(The scaling factor is stored in fixed point 24.8)

if (MouseSensitivity <= 2)
MouseSensitivityFactor = INT(MouseSensitivity * 256 / 32)
else if (MouseSensitivity <= 10)
MouseSensitivityFactor = INT((MouseSensitivity-2) * 256 / 8)
else
MouseSensitivityFactor = INT((MouseSensitivity-6) * 256 / 4)
Scaling = MouseSensitivityFactor

BUT... If the EPP=OFF EASY calculation is done on your desk calculator, or done by Excel, it gives the SAME result as the EXACT calculation, so there is no point in using the exact calculation, which one reason I didn't include any 65536 or 256 in the EPP=OFF formula.

I.e. is the attachment correct?

Yes, the attachment is correct, although I suggest dividing the X-axis by 65536 so it runs 0 thru 3.5

Any idea why exactly the "cyanide" curve doesn't match levles 5, 6 or 7?

Eh? Sorry, I'm not sure what you are asking here.

The cyan coloured curve doesn't match what?

**Edited by MarktheC, 13 June 2012 - 11:32 PM.**