Jump to content
  • Advertisement
Sign in to follow this  
digital_phantom

Custom Mouse Driver Help

This topic is 4437 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I have a question that has to do with device drivers. I plan on modifying a spare mouse I have laying around to act a little different, and to do this I need to be able to make my own device driver for the mouse (it's a usb mouse), by any chance does anyone know anything about creating device drivers, and more helpful, mouse drivers All I need is a generic usb mouse driver source code or know how to do so, and then I can modify it from there. Thanks in advance.

Share this post


Link to post
Share on other sites
Advertisement
If you're doing it on windows, you'll need to purchase either the Driver Development Kit(being phased out) or the Windows Driver Kit(the DDK replacement).

To put it simply, driver development is probably the messiest, most hackish coding you'll ever see. It's not really the kind of thing you do for fun unless you have a _LOT_ of spare time to read up on everything and even more time to repeatedly bluescreen your PC (or a secondary machine, if you're lucky enough to have one). As long as you make sure you only temporarily install your test drivers (meaning you cause them to run now, but not on every restart), you should be fine, but the far better way to do it would be to get an MSDN subscription so you can get a checked version of windows, which has extra support for debugging and kernel-mode development (consider it the debug build).

You can find several examples of drivers in the DDK (and presumably the WDK), but most of them require understanding of most of the DDK and driver development, so don't expect to be able to copy/paste/modify without understanding the whole system because you're not likely to get it to work that way.

Finally, know that making drivers is not easy. There is a reason that just about every single company gets it wrong, and it's not (entirely) incompetence.

Share this post


Link to post
Share on other sites
Quote:
Original post by Extrarius
If you're doing it on windows, you'll need to purchase either the Driver Development Kit(being phased out) or the Windows Driver Kit(the DDK replacement).

To put it simply, driver development is some of the messiest, hackish coding you'll probably ever see. It's not really the kind of thing you do for fun unless you have a _LOT_ of spare time to read up on everything and even more time to bluescreen your PC (or a secondary machine, if you're lucky enough to have one). As long as you make sure you only temporarily install your test drivers (meaning you cause them to run now, but not on every restart), you should be fine, but the far better way to do it would be to get an MSDN subscription so you can get a checked version of windows, which has extra support for debugging and kernel-mode development.

Finally, know that making drivers is not easy. There is a reason that just about every single company gets it wrong, and it's not (entirely) incompetence.


It is not that messy - if you have the correct tools. The WDK or the DDK are C interfaces, and they are quite painfull (a minimum driver using the DDK is way too long to implement - something like 1000 lines of code IIRC). But some companies are selling very interesting products (such as Numega's DriverStudio (3000$)).

Note that you'll still have to understand key concepts of windows device driver development (what an IRQL is, how to handle an interruption and so on). This is not easy - I experienced this during three years, and I really had problems to get a correct grasp on everything, including the difficult memory handling scheme).

Regards,

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
i don't really know a whole lot about writing drivers on windows.. but the user mode driver framework (UMDF)looks like it's lifting quite a bit of work off of the driver writer's shoulders.
http://www.microsoft.com/whdc/driver/wdf/UMDF.mspx

i think that you only have a chance at writing a custom mouse driver with some kind of framework like that. microsoft is developing a framework for both user-mode and kernel-mode (KMDF) drivers right now... i suppose you should be jumping on the umdf train.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!