Subject: Re: USB joystick can't work with xmame-0.56.2 correctly
To: Krister Walfridsson <cato@df.lth.se>
From: Rui-Xiang Guo <rxg@ms25.url.com.tw>
List: tech-pkg
Date: 01/06/2002 19:15:11
> Xmame uses the heuristics that you need to move the joystick > half the
> distance between center and max/min for it to detect it as a move event.
> Center is taken as the value of the joystick when xmame starts (HID devices
> do tell their center value in the descriptor, but this is not always
> correct, especially for joystick -> USB adapters, so we cannot rely
> on it.)

In fact, I use the USB gamepad. Is it's behavior different from joystick?

> So I cannot see how you get this behavior (provided that the joystick is
> reasonable positioned when you start xmame...) It might be that your
> joystick reports something that confuses the code. I'll take a look at
> the code to see if I can find any strangness...

I do not touch the gamepad before run xmame. :)
After I start xmame, no matter what I do, like pushing a button,
the guy in the xmame screen still will go to left automatically.
I have tried to change the 'joy_data[i].axis[axis].center' value to be negative.
It can got to right, but can't go back to left. X-)
I also tried to calculate the 'physical center' value with
physical_minimum and physical_maximum, and it is '127'.
What does this value mean?

Thanks for your reply!

Regards
-rxg