Razer USA : Sun 23:02 Blueprints : Mon 08:02 Razer Asia : Mon 15:02
Monday, 31 March 2008
News
About us
Forum
Tutorials
Reports
Gallery
Downloads
Shirt Shop
Mediadata
Contact
Forum Login






register | lost password?
enter/resend activation code
 
 
 
  My Mouse Driver
Home Help Search

Pages: [1]   Go Down
Print
Author Topic: My Mouse Driver  (Read 1268 times)
aion
*

Karma: 8
Offline Offline

Posts: 235


« on: October 07, 2007, 10:58:06 pm »

Hello,

I have written a filter driver for Windows 2000 and above to extend generic mouse functionality.

Currently, it features the following options:
- Button assignments
- Wheel assignments
- Mouse sensitivity
- Mouse acceleration
- Mouse smoothing
- Wheel sensitivity
- Wheel acceleration
- Alternative mouse settings

The driver is not feature-complete and the existing ones may be subject to change.

It does not include any configuration wizard, so usability is very poor.

Although I expect it to be stable, I did not perform extensive testing prior to release, so it should be regarded as a beta version.
The 64-bit build has not been tested at all.

The INF file does only support HID-compliant mouse devices at the moment.

Installation
0. If running Windows Vista "x64", enable test signing: Enabling Test Signing
1. Download the attached archive and extract its content to a local directory.
2. Open Device Manager and update the mouse device(s) you want to install the driver for.
(http://img222.imageshack.us/img222/7540/01le3.th.png)
3. Do not let Windows search for a new driver, but choose the aforementioned directory instead.
(http://img222.imageshack.us/img222/3086/02wy0.th.png)
4. If you have an SSE2-capable PC, you may choose an optimized build.
(http://img222.imageshack.us/img222/6796/03kk1.th.png)
The 64-bit build already uses SSE2 instructions.
5. Let the installation complete by confirming a possible warning message.

The driver should now be installed and the mouse should not feel any different.

Open Registry Editor and navigate to
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\moudrv\Parameters
to adjust the settings to your likings.
(http://img222.imageshack.us/img222/6449/04bg0.th.png)

Thanks to the following website, manually entering hexadecimal representations of floating-point values is not as difficult as it seems:
IEEE-754 Floating-Point Conversion
(http://img222.imageshack.us/img222/8448/05fi8.th.png)

Configuration
See public.h for definitions.

Button & Wheel Assignments
Code:
AssignmentButton1Down
AssignmentButton1Up
AssignmentButton2Down
AssignmentButton2Up
AssignmentButton3Down
AssignmentButton3Up
AssignmentButton4Down
AssignmentButton4Up
AssignmentButton5Down
AssignmentButton5Up
AssignmentWheelDown
AssignmentWheelUp
AssignmentWheelLeft
AssignmentWheelRight
Bit fields of bit flags of VALID_ASSIGNMENTS_BUTTON (buttons) and VALID_ASSIGNMENTS_WHEEL (wheel). Combinations are possible.

Support for horizontal (or tilt) wheel requires Windows Vista or above.

The driver does not support more than five buttons, because Windows does not support more than five buttons. Additional buttons are device-specific.

Mouse Sensitivity
Code:
MouseSensitivityX
MouseSensitivityY
Simple multiplication.

Default: 1.0
Allowed range: (> -Infinity) - (< +Infinity)

Mouse Acceleration
Code:
MouseAccelerationX
MouseAccelerationY
Quake 3's method, but mouse speed is calculated after sensitivities have been applied.

Default: 0.0 (off)
Allowed range: (> -Infinity) - (< +Infinity)

Mouse Smoothing
Code:
MouseSmoothingMaximumX,
MouseSmoothingMaximumY,
MouseSmoothingSensitivityX,
MouseSmoothingSensitivityY
Auto-adaptive exponentially-weighted moving average.
Smoothing is proportional to mouse speed.

MouseSmoothingMaximum? controls maximum strength.
Default: 0.0 (off)
Allowed range: 0.0 - 100.0 (not recommended)

MouseSmoothingSensitivity? controls strength gain.
Default: 0.0 (off)
Allowed range: 0.0 - (< +Infinity)

Wheel Sensitivity
Code:
WheelSensitivityX
WheelSensitivityY
See Mouse Sensitivity.

Wheel Acceleration
Code:
WheelAccelerationX
WheelAccelerationY
See Mouse Acceleration.

Alternative Mouse Settings
Code:
AltMouseSensitivityX
AltMouseSensitivityY
AltMouseAccelerationX
AltMouseAccelerationY
AltMouseSmoothingMaximumX
AltMouseSmoothingMaximumY
AltMouseSmoothingSensitivityX
AltMouseSmoothingSensitivityY
See resp. sections above.

To enable, disable or toggle alternative mouse settings, set MOUSE_ALT_SETTINGS_ENABLE, MOUSE_ALT_SETTINGS_DISABLE or MOUSE_ALT_SETTINGS_TOGGLE assignments.

Known Issues
The driver uses KeQueryPerformanceCounter for time measurement.
Depending on architecture and operating system, it may return unreliable results (KB274323, KB895980, KB896256, KB909944).
Attached files
* moudrv_20080201.7z (10.35 KB - downloaded 53 times.)
« Last Edit: February 01, 2008, 08:53:37 am by aion » Logged
LEXO5
Moderator
*

Karma: 49
Offline Offline

United States United States

Posts: 1671



« Reply #1 on: October 08, 2007, 05:00:22 am »

VERY COOL. I will definitely try this out sometime, probably when I moved to Vista (which may be soon). Thanks aion for making this :lol:
Logged

acid_gun
*

Karma: 1
Offline Offline

Germany Germany

Posts: 27


« Reply #2 on: October 08, 2007, 08:48:25 pm »

awesome, aion.  will try it out 2morrow
Logged
injx


Karma: 0
Offline Offline

United Kingdom United Kingdom

Posts: 1


« Reply #3 on: October 10, 2007, 11:18:59 pm »

this works great.

i would be interested to know how exactly the algorithm for q3 acceleration has been modified by "mouse speed is calculated after sensitivities have been applied".

Also is windows sensitivity scaling applied before or after moudrv does its thing?
Logged
aion
*

Karma: 8
Offline Offline

Posts: 235


« Reply #4 on: October 11, 2007, 07:30:39 am »

Quake 3:
Code:
rate = sqrt( mx * mx + my * my ) / (float)frame_msec;
accelSensitivity = cl_sensitivity->value + rate * cl_mouseAccel->value;

[...]

mx *= accelSensitivity;
my *= accelSensitivity;

MouDrv:
Code:
// Apply mouse sensitivity.
MouseX *= Settings.SensitivityMX[i];
MouseY *= Settings.SensitivityMY[i];

// Apply mouse acceleration.
Speed = SQRT_FLOAT(MouseX * MouseX + MouseY * MouseY) / TimeDelta;

MouseX += MouseX * Speed * Settings.AccelerationMX[i];
MouseY += MouseY * Speed * Settings.AccelerationMY[i];

Also is windows sensitivity scaling applied before or after moudrv does its thing?
MouDrv operates at a lower level, so cursor settings are applied afterwards.
MouDrv hooks into the drivers' report chain, so both cursor and interfaces like DirectInput are affected.
Logged
Exonerate
*

Karma: 0
Offline Offline

Posts: 23


« Reply #5 on: January 26, 2008, 12:44:54 pm »

I really do love this to death, but like the old mouaccel you released, using this crashes my HL-based games. If only this issue were resolved, I'd be able to use it Sad
Logged
aion
*

Karma: 8
Offline Offline

Posts: 235


« Reply #6 on: January 28, 2008, 05:06:19 pm »

I really do love this to death, but like the old mouaccel you released, using this crashes my HL-based games.
I have used Half-Life and Counter-Strike 1.6 to reproduce this problem, but it didn't occur even once during ~ 3 hours of both active and passive testing.
« Last Edit: January 28, 2008, 05:11:28 pm by aion » Logged
aion
*

Karma: 8
Offline Offline

Posts: 235


« Reply #7 on: February 01, 2008, 08:58:17 am »

Update 20080201
In addition to many negligible performance improvements, this driver should now automatically detect and apply changed registry settings. The executable mset.exe (and support thereof) has been removed as it is no longer needed.

No bugs have been fixed, because no confirmed/reproducible ones were found.
« Last Edit: February 01, 2008, 09:16:39 am by aion » Logged
hex


Karma: 0
Offline Offline

Finland Finland

Posts: 2


« Reply #8 on: February 07, 2008, 09:51:29 pm »

hi!

I've tried to change these
MouseAccelerationX
MouseAccelerationY
registry values to something else than 0 but i don't notice any kind of acceleration. maybe i'm missing something. I have your older accelfix that patches win32.sys does this affect in anyway?. Anyway good job aion. I'm looking forward for your future releases Smiley.
Logged
aion
*

Karma: 8
Offline Offline

Posts: 235


« Reply #9 on: February 08, 2008, 07:07:30 am »

Hello, hex.

This driver provides mouse acceleration regardless of any cursor acceleration patch.
Try setting MouseAccelerationX & MouseAccelerationY to something high, like 10.0 (0x41200000), so there is practically no chance to not notice it.

If it still doesn't work, set MouseSensitivityX to 0 (thereby disabling the x-axis) just to test if the driver applies changed registry settings at all.
Logged
hex


Karma: 0
Offline Offline

Finland Finland

Posts: 2


« Reply #10 on: February 08, 2008, 01:43:30 pm »

I see now everything works i didn't read so carefully about that Floating-Point Conversion
From Decimal Floating-Point Smiley. Now this driver only needs a small GUI then its perfect Smiley. I wrote simple GUI just to change those registry values but it's almost like using regedit Cheesy.
Logged
Pages: [1]   Go Up
Print
Razer Blueprints  >  English  >  Razer General  >  Topic: My Mouse Driver
Jump to:  

 
   

© Razer Blueprints - the razer community