Jump to content

Welcome to MSFN Forum
Register now to gain access to all of our features. Once registered and logged in, you will be able to create topics, post replies to existing threads, give reputation to your fellow members, get your own private messenger, post status updates, manage your profile and so much more. This message will be removed once you have signed in.
Login to Account Create an Account



Photo

Any way to cannibalize the Windows 2000 mouse driver?

- - - - -

  • Please log in to reply
57 replies to this topic

#51
jaclaz

jaclaz

    The Finder

  • Developer
  • 14,652 posts
  • Joined 23-July 04
  • OS:none specified
  • Country: Country Flag

When EPP is ON, the scaling is MouseSensitivityFactor is =INT(MouseSensitivity*65536/10), which is a strictly linear function of MouseSensitivity.

When EPP is OFF, scaling is a piecewise function:

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

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

I.e. is the attachment correct? :unsure:

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

jaclaz

Attached Files




How to remove advertisement from MSFN

#52
MarktheC

MarktheC

    Newbie

  • Member
  • 16 posts
  • Joined 04-April 12
  • OS:none specified
  • Country: Country Flag

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? :unsure:

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.


#53
jaclaz

jaclaz

    The Finder

  • Developer
  • 14,652 posts
  • Joined 23-July 04
  • OS:none specified
  • Country: Country Flag

No ... and yes...

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

I'tll try to correct the spreadsheet/implement the "EXACT" formulas, thanks. :)


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?

My bad :(, I gave as acquired that the issue I had in linearorcurve.xls about re-creating the "family of curves" graph was clear.
In the article the graph has 4 curves, and I only seem to find 3 of them (the 4th "cyan" one being "off by something").
It is possible that the graph was plotted with EP ON (whilst I only tried with EP OFF) :ph34r:.
Now that I have more clear the "levels" I will try again and see if I get a senceful result :).

As always, I need some time to understand the implications of your post, at first sight I am confused but the references you make to the way the number is stored, whch to me seems like marginal/irrelevant, in my view:
If a number is stored in "xy.16" it is multiplied by 65536.
If a number is stored in "wz.8" it is multiplied by 256.
This happens IMHO "outside" of the formula and in the "conversion/storing".

And, given all the horrors implied or derived or caused by the implementation, I feel allowed to add that in this context where almost everything is either rounded or queerly converted or just plain wrong, if and when I get 0.99998 I would call it a "good enough" approximation of 1 ;).

Apple and oranges :w00t: (YES, they can be compared :angel ):
http://improbable.co...1-3-apples.html

jaclaz

#54
jaclaz

jaclaz

    The Finder

  • Developer
  • 14,652 posts
  • Joined 23-July 04
  • OS:none specified
  • Country: Country Flag
For NO apparent reason :w00t:, and possibly of NO use whatever :ph34r:, a simple spreadsheet with common display resolutions and screen sizes (and consequent physical density in dpi).

jaclaz

Attached Files



#55
jaclaz

jaclaz

    The Finder

  • Developer
  • 14,652 posts
  • Joined 23-July 04
  • OS:none specified
  • Country: Country Flag
For even less apparent reasons :ph34r: , a set of batch files to test some of the "queer" behaviour of the mouse.
At the moment just a very rough, experiemental assembly of half-@§§ed batches.

You will need a couple external apps:
Nircmdc, part of Nircmd from Nirsoft:
http://www.nirsoft.n...ils/nircmd.html

(greetings and thanks to MarkTheC for pointing me to the sendmouse move capabilities of the above.


MAT (Mouse Acceleration Toggler):
http://skwire.dcmemb...oftware/mat.php

Put the batches in the same directory nircmdc and MouseAccelToggler.exe, open a command prompt and navigate to that folder.
Read the quick instructions that appear when you run any of them.

jaclaz

Attached Files



#56
MarktheC

MarktheC

    Newbie

  • Member
  • 16 posts
  • Joined 04-April 12
  • OS:none specified
  • Country: Country Flag
I have built some .REG mouse fixes that make XP/Vista/7 emulate Windows 2000 & Windows 9X mouse acceleration.

I need some beta testers to test the Windows 2000 Medium and Windows 2000 High accel fixes, just to be 100% sure they are safe.

If you can help test the fixes, please send me a Private Message, by clicking on the 'PM this member' envelope icon below my name at the top left of this post.

@ownage11 : This includes you. If you can test the fixes, please send me a PM.

A normal CPL or Cheese or MarkC mouse fix is 100% safe to use.
The W2K Medium and High fixes are not normal.
There is a very small chance that they might not be safe.
I have tested them (on 3 different PCs) and they work for me, but I need more testers to be 100% sure they are safe.

To test them you will need one of:

- A Windows logon user account that is separate from your normal login. You login to Windows using that separate account, and test the fix.

OR

- Your PC boots to the Welcome screen or Logon dialog, and you already have a second logon user account that you can use if needed. You know that that second account is enabled and can be used to login. You login to Windows using your main account, and test the fix.

OR

- You have a Virtual Machine you can test the fix in.
You take a Snapshot of the VM, and test the fix in the VM.

#57
ownage11

ownage11

    Newbie

  • Member
  • 13 posts
  • Joined 02-December 11
  • OS:Windows 7 x64
  • Country: Country Flag
Hello hello,
surely i'm going to help you in everything needed, just tell me exactly the parts you want me to check out, since I know most of the old feels in win2000 + XP include in gaming tested my self for hours.

As I said before, I am running on my machine at the moment multiple operation systems. XP , 7 (64bit), 2000pro(virtual machine)
I am a risky guy anyway will try everything over there,

Thanks again Mark, I'm waiting for it.
Will also send you a private message right now!

Edited by ownage11, 21 June 2012 - 07:45 AM.


#58
jaclaz

jaclaz

    The Finder

  • Developer
  • 14,652 posts
  • Joined 23-July 04
  • OS:none specified
  • Country: Country Flag
A better set of test batches, dosquares.cmd and doHlines.cmd + results of first test.

Provided that the nircmdc actually sends what it is supposed to to the mouse buffer (or whatever), it seems that there is in reality a not-so-trifling difference between what should happen and what really happens.
It is not a "timing" problem, I did a few more experiments and the timing is almost "right", it may possibly account for max 5% difference, but I have measured around 20% differences AND they are not "linear".
Tests have been made with a system using a (I assume 400 dpi) PS/2 Mouse polling at 100 Hz.
It is possible that the issues are related to the actual bus, and that a system with a USB mouse behaves differerently, but it would be "queer".

To measure length of lines I found this old version of Caliper very handy:
http://web.archive.o...co.com/caliper/

(thanks to tinyapps.org for the pointer :thumbup ):
http://tinyapps.org/graphics.html



jaclaz

Attached Files






1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users