Re: Interesting driver modification in win2k
Posted: 11-01-2004, 01:09 PM
more space if you move the mouse faster. It is not to be confused with
mouse sensitivity. Higher sensitivity setting will make the pointer go
further regardless of the speed at witch you move the mouse. Windows
currently employs a threshold based acceleration algorithm. This means
that when you move the mouse fast enough, the mouse rate (distance per
interrupt) reaches a predetermined threshold; acceleration kicks in and
adds extra speed to the pointer. So if you move your mouse slow, it
won't accelerate, if you move it a bit faster (cross the threshold) it
will go twice as fast. Move it even faster and it will go 4x further.
This fits the description of a two-threshold acceleration algorithm
that windows use. Now, the problem with this acceleration is that the
jump from no acceleration to 2x or 4x speed is sudden and unnatural.
Hence it is not suitable for applications that require precision, such
as graphic design and games. This modification introduces a mouse accel
that is much more natural since it is calculated dynamically for each
interrupt period using the distance mouse makes in that period.
Basically, it adds mouse rate value into the equation as opposed to
fixed value in the threshold algorithm. So acceleration kicks in
instantly as soon as you move the mouse. This allows more accuracy
while maintaining the speed and there's no hard speed jumps.
Transitioning from slow to fast is smooth because acceleration is a
function of the speed at which the mouse moves. It's gradual, unlike
default accel that has only 3 states (0,2,4). The algorithm below is
similar to that of games such as Doom and Quake 3 and it's currently
used in FuhQuake QuakeWorld port.
Values:
sensitivity - mouse sensitivity multiplier
mx,my - mouse input / mouse offset on x,y axis
mouserate - rate of mouse movement - distance that mouse has travelled
during an interrupt period
acceleration_value - accel multiplier (if 0 there's no acceleration)
mouse_x,mouse_y - driver output values - mouse position after
calculating sensitivity and accel
mouserate = sqrt(mx*mx+my*my);
mouse_x = mouse_x*(mouserate * accel_value + sensitivity);
mouse_y = mouse_x*(mouserate * accel_value + sensitivity);
Pretty simple isn't it? If you know the corresponding values in the
mouse driver this modification is a piece of cake. Now you can use the
sample drivers, filter drivers from DKK or whatever you prefer to do
this. I honesty don't care how you do it as long as it _works in
games_. The very reason I need this is to be able to have the same
mouse accel in all applications including games and desktop. I'm tired
of having to switch from accelerated mouse in one game to no accel in
another just because default windows accel is no good. I've tried many
mice and drivers and many applications that feature mouse acceleration
and have found the one in Quake 3 to be the best. Of course there
should be a simple interface for settings tuning, similar to that of
regular windows driver in control panel. It should be possible to enter
accel and sensitivity values numerically and those should have at least
3 decimals. That's it. If you decide to take this task I promise you
will have the gratitude of many mouse speed junkies.

James
P.S. Almost forgot, the driver should support a 5-button USB mouse ,
like Intellimouse Explorer.



Hybrid Mode


Posts: n/a