Welcome, Guest. Please login or register.

Login with username, password and session length

 
Advanced search

1411704 Posts in 69399 Topics- by 58455 Members - Latest Member: roeyskatt

May 20, 2024, 01:07:53 AM

Need hosting? Check out Digital Ocean
(more details in this thread)
TIGSource ForumsDeveloperTechnical (Moderator: ThemsAllTook)Gamepad Bible - End the hunt for gamepad info!
Pages: [1]
Print
Author Topic: Gamepad Bible - End the hunt for gamepad info!  (Read 5963 times)
teknogames
Level 0
***



View Profile WWW
« on: September 18, 2012, 02:05:37 PM »

I wanted to start a comprehensive thread where people can share technical information about the game-pads they use.
This would be a great resource for people who do not own the same equipment but would still like to make their games auto-configure to other people's preferred devices.

I hear a lot of games only configure toward Xbox controllers, so I'm wondering if maybe we can expand the standard.

If you need a program to get joystick info, download this version of JoyTest I edited slightly.
(JoyTest is part of Evan Balster's wonderful Joystick dll for GameMaker).

Some good specific info would be:
  • Name
  • Computer-detected technical name
  • Labelled axis
  • Labelled buttons



Here's my contribution:

Logitech Dual Action
Technical name: Logitech Dual Action


Retrolink NES controller
Technical name: USB gamepad
« Last Edit: September 18, 2012, 03:29:27 PM by teknogames » Logged

ChevyRay
Level 2
**



View Profile
« Reply #1 on: September 18, 2012, 02:10:40 PM »

omg this is the best thread! I'll send around for more people.

I'd contribute, but you posted the 2 controllers that I have access to already Cheesy
Logged
torahhorse
Level 0
**



View Profile WWW
« Reply #2 on: September 18, 2012, 02:14:06 PM »

this would be super useful! what kind of information are you looking for specifically?
« Last Edit: September 18, 2012, 02:20:33 PM by hero twin » Logged

Ludophonic
Level 2
**


View Profile
« Reply #3 on: September 18, 2012, 02:31:42 PM »

I was working on getting all my various gamepads recognized on the weekend. Good timing. I'll take some photos and add to this thread when I get home.

I use RawInput under Windows for gamepads tho, so I'll need to double check that it gives the same values as DirectInput.
Logged
Rob Lach
Level 10
*****



View Profile WWW
« Reply #4 on: September 18, 2012, 02:32:12 PM »

I just found out the configuration of xbox 360 controllers is different between mac and pc. Will post the readouts when I have a chance.
Logged

Polly
Level 6
*



View Profile
« Reply #5 on: September 18, 2012, 02:37:56 PM »

I just found out the configuration of xbox 360 controllers is different between mac and pc.

Even on Windows there are differences depending whether you use XInput / DirectInput / MMSystem / RAW.
« Last Edit: September 18, 2012, 04:43:16 PM by Polly » Logged
Ludophonic
Level 2
**


View Profile
« Reply #6 on: September 18, 2012, 02:42:01 PM »

The Xbox 360 controller for Windows isn't USB HID compliant. Microsoft's driver partially maps it but not fully. It's deliberately just a bit broken.

You need to use XInput to support Xbox 360 controllers properly under Windows. On OS X most people will be using the Tattiebogle driver which maps it to the USB HID but in a different way than Microsoft's driver.
Logged
Raptor85
Level 5
*****



View Profile WWW
« Reply #7 on: September 18, 2012, 02:43:30 PM »

the whole "xbox controllers only" thing is a fairly new trend within the past 3-4 years, before that every game that supported gamepads after the midi ones used the standard USB HID interface ( http://en.wikipedia.org/wiki/USB_human_interface_device_class ) and did button and axes remapping (this was the standard for gamepads from the tail end of the 90's until the XNA, xbox indie thing kicked off and microsoft felt the need to reinvent the wheel, exactly the same except completely incompatable with existing wheels O_x), it's silly to make support specificly for each gamepad you want to use, it's not the early 90's anymore, we have high level api's that handle the hardware for us, so you really shouldn't be hardcoding controls.  Now, if you WANT to ship profiles for common devices on top of being able to re-map, just to make it easier for users, that's fine, but don't do this in place of allowing the user to remap their controls! (This goes for keyboard controls as well, nothing makes me stop playing a pc game faster than not being able to set the controls to something sane, but with all the console ports lately pc games without remappable controls are becoming unfortunately fairly common)

Here's the mappings for the ps3 controllers axes and buttons, it's not quite as popular as the 360's controller but it's still very widely used, iirc the ps2 controller has the same button mappings (don't quote me on that though, it may vary based on the adaptor used) but obviously not the axes mappings (ps3 controller every button is also an axis, whole controller is pressure sensitive) http://ps3.jim.sh/sixaxis/usb/
Logged

-Fuzzy Spider
Sos
Level 8
***


I make bad games


View Profile WWW
« Reply #8 on: September 18, 2012, 02:57:30 PM »

Here's my collection:



Esperanza Cheapo ChinaPad

Note: It has an anolog switch that changes right cap mode between button mode (Buttons 1/2/3/4) and Analog mode (Rotation and Z axes)



Trust Poor Man's Pro Choice

Note: Has turbo!



2-tech SnesPad Prefilthified Retro Gross Edition

Note: Weekly resoldering recommended
Logged

teknogames
Level 0
***



View Profile WWW
« Reply #9 on: September 18, 2012, 03:03:11 PM »

@hero twin:
Some good specific info would be:
  • Name
  • Computer-detected technical name
  • Labelled axis
  • Labelled buttons

For personal use, it'd be nice to make a check for the name, and then assign controls to that controller.

Here's hoping they're not all called "USB Gamepad"
« Last Edit: September 18, 2012, 03:22:31 PM by teknogames » Logged

Sos
Level 8
***


I make bad games


View Profile WWW
« Reply #10 on: September 18, 2012, 03:21:32 PM »

Could you guys make sure to include the technical names as well?
I'd like to make it so that I can make a check for the name, and then assign controls to that controller.

Here's hoping they're not all called "USB Gamepad"

I'm pretty sure mine don't have names and I'm too lazy to check Device ID.
Well, they might have had named on the packaging, but these are long gone now.
Logged

ThemsAllTook
Administrator
Level 10
******



View Profile WWW
« Reply #11 on: September 18, 2012, 03:24:26 PM »

Good stuff here! I have a bunch of gamepads, and I'll post details about them when I get a chance... This is actually a project I've been meaning to do for a while, but you beat me to it. It's pretty daunting, though, not only because of the sheer number of devices available, but also driver inconsistencies. In most cases, button and axis mappings are different between Windows, Mac OS X, and Linux; it's the exception rather than the norm for a device's drivers to report the same thing for all three. X and Y doesn't adequately describe the axis mappings, either...conceptually, there's an arbitrary number of them per device, just like buttons. Some controls (like the PS3's pressure sensitive buttons) are axes that aren't X or Y, but another type of data entirely.

Could you guys make sure to include the technical names as well?
I'd like to make it so that I can make a check for the name, and then assign controls to that controller.

Here's hoping they're not all called "USB Gamepad"

You'll want to go by the hexadecimal vendor and product IDs for identification if possible, not its reported human-readable name. The reported name is another thing that I've found inconsistent between platforms, and there's quite a lot of potential for name collisions (a lot of them name themselves "USB Gamepad", as you mentioned). For example, the wired Xbox 360 controller is vendor 0x45E, product 0x28E. This pair of values is unique for every individual device as far as I'm aware.
Logged

teknogames
Level 0
***



View Profile WWW
« Reply #12 on: September 18, 2012, 03:24:53 PM »

I'm pretty sure mine don't have names and I'm too lazy to check Device ID.
Well, they might have had named on the packaging, but these are long gone now.

You should be able to use JoyTest to get the device name

Quote
You'll want to go by the hexadecimal vendor and device IDs for identification if possible, not its reported human-readable name. The reported name is another thing that I've found inconsistent between platforms, and there's quite a lot of potential for name collisions (a lot of them name themselves "USB Gamepad", as you mentioned). For example, the wired Xbox 360 controller is vendor 0x45E, device 0x28E. This pair of values is unique for every individual device as far as I'm aware.

Oh lordy!
« Last Edit: September 18, 2012, 03:30:27 PM by teknogames » Logged

Raptor85
Level 5
*****



View Profile WWW
« Reply #13 on: September 18, 2012, 03:29:08 PM »

This pair of values is unique for every individual device as far as I'm aware.
It's supposed to be unique but the generic adaptors, particularly the multi-controller ones, can have different mappings per controller under the same id, so even these really you can't 100% trust to be uniqe to a single button mapping.
Logged

-Fuzzy Spider
Sos
Level 8
***


I make bad games


View Profile WWW
« Reply #14 on: September 18, 2012, 03:34:26 PM »

You should be able to use JoyTest to get the device name

But that takes away the fun of coming up with my own!
And as someone said, even for a single Device ID, you can have multiple mappings, so it's not reliable at all.
Logged

jacobalbano
Level 0
*


View Profile WWW
« Reply #15 on: September 18, 2012, 03:58:47 PM »

I don't have a camera, so I made an Inkscape picture for you guys.



Edit: Derp, 5 and 7 should be flipped.  Facepalm
« Last Edit: September 18, 2012, 04:18:18 PM by jacobalbano » Logged
whilefun
Level 1
*


Making games


View Profile WWW
« Reply #16 on: September 18, 2012, 07:14:19 PM »

I mainly use my XBox USB controller on Windows, but there's already some talk about that on the thread. I dusted off this old gem just for this thing here. It was a good gamepad back in the day, and it still works on Windows 7!

Name: Gravis Gamepad Pro (USB)
Computer-detected technical name: [Gamepad Pro USB]

Labelled axis and labelled buttons below:



Sort of related, but I made a small XBox controller thing in Game Maker a little while back. here's the link with the GM file if anyone happens to be interested in it: http://whilefun.com/games.php#xboxcontrollerexample. It should work with any joystick, I think.

Anyway, cool idea!  My Word!
Logged

Hedgehodg
Level 1
*


...


View Profile
« Reply #17 on: September 18, 2012, 10:47:43 PM »

This is a really great idea! Good luck with this  My Word!.
Logged

Previously known as "darestium"...
Oddball
Level 10
*****


David Williamson


View Profile WWW
« Reply #18 on: September 19, 2012, 01:29:13 AM »

It would be beneficial to have the +/- directions of each axis. The x axis will generally be in the same direction on all pads, but the others, especially z/r/u/v, may not be.
Logged

enthrallstudios
Level 0
***


View Profile
« Reply #19 on: September 19, 2012, 07:39:21 AM »

On the note of the +/- Axis. I know with my Xbox controller, for some reason - is to the right and up, and positive is down and left. If I remember correctly, it's not a real Microsoft controller, just a really good knock off. I'll get some pics and label when i get off work.
Logged
Pages: [1]
Print
Jump to:  

Theme orange-lt created by panic