Main > Main Forum

Turbo Twist 2 & Trackball won't play nice!

<< < (5/7) > >>

u_rebelscum:
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. 

deano728:
This patch worked wonders on Tempest for me in version 125u1.  I tried to compile 125u4 and I got an error trying to use this patch.  Does it need to be modified for u4?  The error is "can't find a file to patch at input line 4".    Do I even need this patch in U4?  Did Mame developers fix the problem in a previous release?

u_rebelscum:

--- Quote from: deano728 on June 07, 2008, 12:50:04 am ---This patch worked wonders on Tempest for me in version 125u1.  I tried to compile 125u4 and I got an error trying to use this patch.  Does it need to be modified for u4?  The error is "can't find a file to patch at input line 4".    Do I even need this patch in U4?  Did Mame developers fix the problem in a previous release?

--- End quote ---

The patch works for me.  (patch -p1 < t2_zaxis.diff)
Did you apply the mame u# updates to a freash 0.125 source, or to your modified 0.125u1 (w/ tt2 hack)?

This has not been added to official mame and won't be since it makes all normal mouse scroll wheels stop working; mamedev will not break 99% of the users' hardware just for the tt2.

Havok:
I just tried out the patch, and it works for me as well. I initially got the same error, however I opened input.c and replaced the line myself. I even patched the hiscore.diff after that, and it compiled great. Due to a controller problem, I had to temporarily put my spinner on the Z axis, and this fixed the problem. Thanks u_rebelscum!

Gamester:
My TT2 is connected to the z-axis and is going crazy in MAME too.

Has anyone had success applying this fix to MAME v134?  After I applied it, any movement of the spinner caused MAME to crash with the following error:

-----------------------------------------------------
Exception at EIP=00A00EE1: ILLEGAL INSTRUCTION
-----------------------------------------------------
EAX=00000400 EBX=00000028 ECX=00000000 EDX=0001004F
ESI=0022E7AC EDI=04EDF4E0 EBP=0022F7C0 ESP=0022E778

I'm assuming something has changed in MAME's code that has broken this instruction, as it doesn't crash with the original, unmodified code.

I've seen that others have had success with the previous version (v133), but man, I'd sure rather not have to go through all the hassle of redoing my roms and recompiling all the patches, etc..

Just as another note, the diff file wouldn't apply to v134 at all, so I had to change the line manually.

Any tips are appreciated...

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version