Ok, some more testing this weekend. My other accelerated Z axis mouse (logitech MX revolution + its driver) is totally different than the ms mouse, and gives values 120, 240, 360, 480, and then in the 1000's to 3000's (and backspins/backscrolls on many win apps). I tried mixing/matching mouse and driver, but then the Z axis acts like normal Z axis, whether it's an accel Z mouse or normal mouse. (All testing on winXP.) Multiple mice enabled acted the same as the default disabled.
With all the different (non-120 multiplied & non-accelerated) cpr numbers between 24 and 1200 and different scaling (and not) on the Z axis numbers, it's not going to be easy one-fix-all solution.
For those with TT2 on Z axis and the TT2 is the only mouse Z axis used in mame, there is a one line fix. However, this ruins normal mice's Z axis use. Use attached diff file, or change src/osd/windows/input.c, line 2039 from:
devinfo->mouse.raw_z += (INT16)data->usButtonData * INPUT_RELATIVE_PER_PIXEL;to:
devinfo->mouse.raw_z += (INT)((INT16)data->usButtonData * 4.267);FWIW, INPUT_RELATIVE_PER_PIXEL = 512, and 512 / 120 = ~4.266666667
I know almost nothing about writing mouse drivers, but the ms mouse shows that (somehow) the Z axis can have steps not a multiple of 120. It's still unclear about being able to go below 120 is legit to windows. I wonder if someone could write a high res Z axis rawinput compatible special driver for TT2?
A
maybe possibly mameDev acceptable solution is to change mame's sensitivity from an 8 bit int (1% to 255%) to 16 bit int (0.01% to 665.35%), (or 32 bit int, or real) and "just" have TT2 Z axis users change the sensitivity to 1/120 of the default on axes that use the TT2 Z axis. Of course, this isn't easy for TT2 Z axis users, and would mess up all existing cfg/cfg files for games with analog inputs.
FWIW, this is beginning to sound
very familiar to me, with IIRC one rare exception missing: directInput multiple mice (which only works in win9x anyway) Z axis step of 1 in some but not all cases.