MousewheelGreg from DIY has some tips on mouse modding “…there may be some interest in modding a mouse, so it is important to understand how they work. You may want to control the cursor for some sort of a project. A rollerball mouse has has a ball that rolls on the desktop when you move the mouse. This movement turns a wheel that has small spokes in it. There are two different infrared LEDs, and two different infrared detectors per wheel, and there are two wheels per mouse. One wheel controls up and down, and the other one controls left and right.” Link.