PDA

View Full Version : General Questions about Emulation of specific Gamepads



mii
07-19-2012, 04:20 PM
Hello,

I have a general Question about emulating Gamepads.
In the MacAppStore there a lots of WINE-Based game-"conversions", which are quiet tricky to deal with (OSCulator).
Sometimes there is a limited (or complete lack of) controller-setup, so you have to do the complete Setup in OSCulator. This is mostly no problem for Keyboard-Setup, but sometimes (especially in 2-Player-COOP-Modes) the games require a special Controller (for instance a Logitech F310 in the Game "Brave" from Disney).
For this game I could only configure a limited setup with one Axis (instead of two) and a few Buttons (configured with trial-and-error). The second Axis of OSCulator didn't match with the second Axis in the Game and did produce button-presses.
So the Questions are:

Is it possible to read out the Mapping of a given Gamepad ?
If I had that data, would it be possible to configure OSCulator to emulate it?

I have very limited knowledge of HID-functions, so maybe my post is a little bit off the point.

Thanx
Christian

camille
07-20-2012, 05:27 AM
Hi Christian,

Unfortunately there is no easy answer to your question.
The game maker should provide a clear documentation about what HID features are mapped to what game actions, or alternatively give a way to 'learn' and map HID features to game actions. Without this, the only solution is — as you noted — trial and error. Luckily from game vendors use the same mappings throughout their different games...


Best,
Cam

mii
07-20-2012, 11:07 AM
Okay, i did some further investigations for myself.

I found the following program: http://alphaomega.software.free.fr/joystickandgamepadtester/Joystick%20And%20Gamepad%20Tester.html

I'm sure You have something similar and it is no new knowledge to You, but if i would use such a program and connect a - let's say - Logitech F310 (I don't have one), then i could see the buttons and axis of the gamepad, right?

I saw in the description of the program mentioned above, that some gamepads and joysticks present other axis (for instance z-rotation or slider).
Would it be possible for You, to implement additional buttons and axis in Osculator or would it be a too major rewrite?
It sounds like a nice idea to me, because - as i wrote earlier - many games for the mac (even in the appstore) are (quick and dirty) WINE-based ports and lack a sufficient controller-setup.

Thank You
Christian

camille
07-20-2012, 03:57 PM
Is there a specific axis or button that you need?

mii
07-21-2012, 09:43 AM
I don't know, because I don't own this specific Gamepad (F310), so I cannot read out any data.

I just know from the special Game (Brave from the Appstore), that the second analog axis must be something else (maybe slider ???) and I tried out all of the 20 Buttons of "OSCulator HID" and there were still functions left in the game, that didn't respond.

Would it be possible to just add all kind of possible axes in the OSCulator-programm? I have no clue, if this is a big or small task for You.

Thank You
Christian

mii
07-22-2012, 08:01 PM
Okay,

I did some research and I hope, I am more educated now ;)

There are HID-usages and I found several tables, for instance on: http://www.freebsddiary.org/APC/usb_hid_usages.php

I guess, that you use for the axes: 0x30 X,0x31 Y,0x33 Rx,0x34 Ry -- right?

Then there would be left: Z, Rz,Slider,Dial, Wheel, Hat Switch - or more?

Would it be easy for You to implement these HID-Usages or would it require a major code rewrite?

Thank You
Christian

camille
07-23-2012, 06:03 AM
It sounds like an interesting feature.
I will gladly study the question when I'm back from vacation.