Subject: problem about USB gamepad with libusbhid again
To: None <port-i386@netbsd.org>
From: Rui-Xiang Guo <rxg@ms25.url.com.tw>
List: port-i386
Date: 02/07/2002 23:50:42
Hi, all
I do a deeper tracking about my gamepad's behavior with libusbhid.
(it's under -current.) My problem happen on directional control.
Here are some values:
Predefine:
d = hid_get_data();
pos = h->pos;
size = h->report_size;
About X axis:
logical_minimum = -128, logical_maximum = 127
physical_minimum = 0, physical_maximum=255
d = -128, pos = 8, size = 8
About Y axis:
logical_minimum = -128, logical_maximum = 127
physical_minimum = 0, physical_maximum=255
d = -128, pos = 0, size = 8
Hmm.., the pos are not the same and the d values are a bit strange.
Here is the directional control map.
0 -128
0 -128 -1 In ideal, it should be -128 0 127
-1 127
It seems the d value got problem when converted.
At initial, it will point to (0,0),
then if I press any key, it will point to (-128,-128). Is it normal?
I don't know if this gamepad does not follow the USB standard protocol.
But it works well with DirectX under win9x without adjusting. X-)
The gamepad is not MS product, the brand is 'topmax', pretty cheap one. :)
If this mail waste your time for downloading, sorry!
Regards,
-rxg