_____  ______          _____    _______ _    _ _____  _____ 
 |  __ \|  ____|   /\   |  __ \  |__   __| |  | |_   _|/ ____|
 | |__) | |__     /  \  | |  | |    | |  | |__| | | | | (___  
 |  _  /|  __|   / /\ \ | |  | |    | |  |  __  | | |  \___ \ 
 | | \ \| |____ / ____ \| |__| |    | |  | |  | |_| |_ ____) |
 |_|  \_\______/_/    \_\_____/     |_|  |_|  |_|_____|_____/ 
==27th of September, 2015==
This is the last forseeable release of this driver. Windows 10 now requires an EV Code Signing certificate to even think about
loading kernel mode drivers, which costs around $450 USD a year. I have no intention of paying for or soliciting this cost.
I have not even used mouse acceleration in my gaming for some years now, but I realise it is still valuable to many people.

This special (and super unsupported) release is based on the current version of the windows/driver SDK (v10) which should allow it
to remain useful for a while. The source code is also included, which was built using Microsoft Visual Studio Community 2015 (which is free).

Also since the name of the file is now qlfilter, not moufiltr, so the previously existing GUI applications (eg: stafu or kovaak's) will
not function correctly with this release until updated. lmao swag

--> Beta8 + Source DOWNLOAD <--

Since I can't be bothered re-writing the readme and nothing has changed, the rest of this file is the previous versions documentation.

cheers guyz
 __          ________          __  _   _ _____ _____ ______    ____  _   _ ______ 
 \ \        / / __ \ \        / / | \ | |_   _/ ____|  ____|  / __ \| \ | |  ____|
  \ \  /\  / / |  | \ \  /\  / /  |  \| | | || |    | |__    | |  | |  \| | |__   
   \ \/  \/ /| |  | |\ \/  \/ /   | . ` | | || |    |  __|   | |  | | . ` |  __|  
    \  /\  / | |__| | \  /\  /    | |\  |_| || |____| |____  | |__| | |\  | |____ 
     \/  \/   \____/   \/  \/     |_| \_|_____\_____|______|  \____/|_| \_|______|


--> DOWNLOAD <--

Moufiltr with QL Accel - Beta 7
11th of December, 2014
web: http://accel.drok-radnik.com
irc: pvh on gamesurge, povohat on quakenet
quake live: povohat
steam: povohat
email: pov@drok-radnik.com
Source Code
I used Microsoft Visual Studio 2012 with
Windows Driver Kit 8. I am not a real
programmer so I cannot troubleshoot any
issues you may have in compiling this.

inspired by aions moudrv (http://www.funender.com/quake/files/misc/moudrv.html)
based on microsofts moufiltr example code (http://code.msdn.microsoft.com/windowshardware/Moufiltr-WDF-Version-fb57f5de)
some code ideas stolen from aions mouaccel_20070106 source (calculating frametime and using device extension to store things)
thanks to web.archive.org for saving aions mouaccel_20070106 source
some math and c help from stafu, fake, bladez and google
ql accel code based on injx's fixed version of my glovepie script which was based on the work of sk4ut and injx (http://www.esreality.com/?a=post&id=1944158)
old settings app by stafu
!!new settings app by KovaaK!!
oh yeah and whoever put this stuff into quake live in the first place
also big thanks to my tester buddies and fellow mouse accel enthusiasts: stafu, happychef, phantom, tommy, bear, paymh, magic, eko and DarkSlayer

** System Requirements **
Windows Vista and up (i built it with WDK 8.0, sorry XP users :< RIP)
A mouse

This driver will replace any manufacturers drivers. If their software requires the driver to identify the mouse, it will not recognise it
until this is removed. Mice with onboard memory or hardware switches for CPI/Hz/whatver should still work correctly. Some things
(macros and button remapping) may not work, even if the mouse has onboard memory, as a lot of mice still rely on software for these.

If you wish to continue using your manufacturers driver, there is an alternate installation method that applies the driver to ALL
devices that identify as mice. Read more here - http://ozfortress.com/showpost.php?p=885224&postcount=181

64BIT INSTALL - watch from start
32BIT INSTALL - watch from 1:22

extract the contents of the .zip file somewhere. eg: z:\moufiltr

64bit users do this first
1. disable UAC
2. enable test mode using DSEO (windows 8 users, try this, thanks Kond3P)
3. reboot
4. use DSEO's 'sign a system file' to sign moufiltr.sys AND moufiltr.cat (*new in b7)
 - for example, in the 'insert filename' dialog, input z:\moufiltr\moufiltr_b4_64bit\moufiltr.sys
 - verify signing by right clicking a signed file and selecting properties, digital signatures tab, select NGO signature and hit details
 - it should say "This digital signature is OK."
5. continue onto the 32bit steps from here

32bit users start here
1. open device manager
2. under "mice and other pointing devices", right click your mouse device (eg: "HID-compliant mouse")
3. select update driver software
4. browse my computer for driver software
5. let me pick from a list of device drivers on my computer
6. have disk
7. locate moufiltr.inf
8. select HID Mouse (moufiltr) and press next
9. continue past any warnings about unsigned drivers and/or compatibility
10. the OS may prompt you to reboot, and you should do so if required

But acceleration is currently set to zero. read on...

How to use
easy: use povomousesettings.exe
- inside this archive is another archive called povomousesettings-2.02.zip, by KovaaK
- it is a GUI for the registry values that the driver reads
- type numbers in and press 'Save Settings' to update the driver
- read GUIreadme.txt for detailed info on this application

nightmare skill: use regedit
- accel parameters are stored in registry at HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\moufiltr\Parameters
- they are stored in a DWORD at x10,000 decimal value to allow 'decimal places'
   eg: a value of 1.23 would be 12300 (a cheap hack, but makes your life easier, registry nerd)
- the 'Offset' parameter supports negative values, and this is done using overflow. Subtract your x10,000 value from 4294967296 (2^32).
   eg: a value of -5 would be 4294917296 (based on 4294967296 - 50000)
- the 'Angle' parameter supports negative values via overflow, and is stored unscaled as I have yet to require less than 1 degree of adjustment.
- the 'Enabled' parameter is stored simply as 0 or 1 to disable or enable accel code respectively.

Sensitivity (default 1):
if your intention is to replicate your existing QL mouse settings, set this value to your in-game sensitivity
and continue to use this sensitivity value in-game.

Acceleration (default 0):
Values >0 will amplify mouse movement proportional to velocity. Small values have great effect. A lot of good
players use around the 0.1-0.2 mark, but this depends on your mouse CPI and Hz.

Power (default 2):
Values 1 or below are dumb.
2 is linear and the default. 99% of players use this.
Above 2 begins to amplify exponentially and you will get more acceleration at higher velocities. Great if you
want low accel for slow movements, and high accel for fast movements. Good in combination with a sensitivity cap.

Sensitivity Cap (default 0):
Sets an upper limit on the amplified mouse movement. Great for tuning acceleration around lower velocities
while still remaining in control of fast motion such as flicking.

Offset (default 0):
Acceleration will not be applied until the mouse movement exceeds this velocity. 
Negative values are supported, which has the effect of causing higher rates of
acceleration to happen at lower velocities

Pre-Scale X & Y (default 1):
Multiplier for your raw mouse counts on input (X being horizontal, Y being vertical). Anything above 1 will result
in some 'pixel skipping', like windows pointer speed settings greater than 6/11. Using a high CPI and scaling it
down on input will give you slightly more accurate acceleration calculations, compared to starting with a low CPI.
Make sure your mouse doesnt suck at high CPI values before trying it.

Post-Scale X & Y (default 1):
Multiplier for the post-accel speed prior to output. Same caveat regarding pixel skipping applies here, unless you applied
the same or greater downward scaling at pre-scale.
X and Y can be set seperately to emulate the function of m_pitch and m_yaw in quake engine games.
eg: if you wish to emulate m_yaw 0.018, set post-scale X to 0.8182 (0.018 divided by the default value of 0.022)

Angle (default 0):
Applies a clockwise rotation in degrees to mouse input prior to pre-scale. Negative values will rotate anti-clockwise.
Hold your mouse comfortably and move the cursor from side to side. If there is a consistent angle to the cursor movement,
you may choose to correct this. I personally find a value of +5 corrects my 3 finger grip on the Abyssus.
This option is probably terrible for mice that have obvious prediction/drift control/whatever they call it this week.

Angle Snapping (default 0):
Conforms mouse movements to the closest horizontal or vertical line. Value is set in degrees.
eg: if angle snap is set to 10 degrees, any mouse movement within a single polling period that is less than 10 degrees
from being a straight line will be conformed to the nearest straight line, with magnitude preserved.
The effect will be almost non-existent at slow speeds/low CPI and significantly stronger at faster speeds and higher CPI values.
Set it to 45 and try to draw circles in mspaint for the ultimate etch-a-sketch simulation.

Speed Cap (default 0):
Sets an upper limit for the maximum speed of the mouse, in counts per polling period. You can use this to emulate
the effect of 'negative acceleration' that exists in some mice.

note: mouse CPI and Hz will affect the strength of some parameters

The driver computes mouse output in the following sequence

angle correction
angle snapping
pre-scale x/y
sens multiply
sens divide
postscale x/y


You must be in test mode

No one knows how to get test mode working when you are dual booting via GRUB Be sure to sign the driver files, and ensure that the signing worked correctly using the steps above. If you do not sign the drivers, your cursor will lock in place, device manager will give you a code 37 and you will have to be good at keyboard navigation, or try a new usb port. hope you dont run out of them before you figure it out! If the installation fails, perform the uninstallation instructions (including 5-8) and reboot before trying again. Rebooting is important. Disabling some services may result in an error code 52 when installing. I don't know which ones. This may apply to people who run those l33t Wind0Ze 0pt1miZaR programs that giv3 u m0ar fPs and sk!ll. Start menu->run->msconfig. Select normal startup. Reboot. If you want to stop quicktime or bonzi buddy launching on startup, remove them properly. Submit any useful additional troubleshooting information to me Uninstallation -------------- 1. open device manager 2. under "mice and other pointing devices", right click "HID Mouse (moufiltr)" 3. select uninstall (delete driver software if you want) 4. re-plug mouse 5. optionally delete moufiltr.sys from c:\windows\system32\drivers 6. optionally delete the registry key if you have OCD 7. if you have megaOCD, use pnputil to remove any potential traces of the driver package from the local driver store 8. reboot Update Notes ------------ A1 - initial alpha release A2 - corrected rounding code that was resulting in jitter on straight horizontal and vertical lines B1 - i changed nothing but the version number B2 - fixed the way rounding was being carried to be more accurate. added pre/post scaling options, default to 1x B3 - attempted to fix a problem where the driver would no longer respond to registry changes until a re-plug B4 - added angle correction and bundled an updated settings app B5 - replaced Pre-Scale with seperate X and Y pre-scale options B6 - fixed a pretty nasty bluescreen rofl sorry B7 - added angle snapping and speed cap options. Replaced Post-scale with seperate X and Y options. KovaaK's GUI is now bundled. Also added cat files to maybe help some people