EEVblog Electronics Community Forum

Products => Computers => Programming => Topic started by: 741 on April 02, 2020, 08:10:06 am

Title: How can I customise a mouse driver?
Post by: 741 on April 02, 2020, 08:10:06 am
Whilst I do not expect to get something through WHQL, it would be nice to have a go at this. For example I saw someone had captured the camera image from a mouse.

I seem to recall there is something privileged about mouse & keybaord drivers, this could be because breaking one of these drivers would make the PC hard to use.
Title: Re: How can I customise a mouse driver?
Post by: TomS_ on April 11, 2020, 11:52:06 pm
I dont think its anything to do with making the computer hard to use (although that could certainly be a side effect), but the fact that talking to hardware usually means poking at memory, which has security implications and is probably the bigger concern.

As for capturing the image from an optical mouse sensor, I doubt youre going to achieve that with a stock standard mouse. A mouse isnt designed to work as a camera in the traditional sense, so probably doesnt contain the ability to ship its images off to the PC, just information about movements.
Title: Re: How can I customise a mouse driver?
Post by: I wanted a rude username on April 12, 2020, 12:14:36 am
Yeah, I remember seeing images like that in the early 2000s, but they were probably captured by an engineer interfacing directly with the image sensor. Following the never-ending trend towards tighter integration, you'd expect that today the sensor has processing logic built in and just outputs a motion vector.
Title: Re: How can I customise a mouse driver?
Post by: Doctorandus_P on May 11, 2020, 09:48:21 pm
Following the never-ending trend towards tighter integration, you'd expect that today the sensor has processing logic built in and just outputs a motion vector.

Yes they do. They already did back then too, as these mice work via generic and standardized HID interfaces.
But some have the option to output the raw image data too for debug purposes.

For stuff like this you're usually best of with some Linux Distribution.
Also, it took me about 2 minutes to find such pictures (and websites with more info).