[Boards: 3 / a / aco / adv / an / asp / b / biz / c / cgl / ck / cm / co / d / diy / e / fa / fit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mu / n / news / o / out / p / po / pol / qa / r / r9k / s / s4s / sci / soc / sp / t / tg / toy / trash / trv / tv / u / v / vg / vp / vr / w / wg / wsg / wsr / x / y ] [Home]
4chanarchives logo
Modifying xpad
Images are sometimes not shown due to bandwidth/network limitations. Refreshing the page usually helps.

You are currently reading a thread in /g/ - Technology

Thread replies: 12
Thread images: 1
File: Game_maker_logo.png (27 KB, 250x250) Image search: [Google]
Game_maker_logo.png
27 KB, 250x250
Hey everyone, I'm currently on a mission to modify the SteamOS xpad driver to fix the wireless Xbox360 controller support. I'm hoping some of you can help point me in the right direction regarding tools I can use to gather the data I need to make the modifications to the xpad driver.

The issue is that games made in GameMaker Studio (Risk of Rain, Nuclear Throne, Hero Siege, BLACKHOLE, Sky Mercenaries, etc...) do not work with official Microsoft Xbox360 wireless controllers. I filed a bug report with YoYo Games but they are unwilling to acknowledge that this is a problem with their product. From my perspective, this is clearly it's an issue with GameMaker Studio since this issue only occurs with games made using GameMaker and they work fine for all other games. I own a wired Rock Candy Xbox360 wired controller that works with GameMaker games, but obviously that is not the controller I would prefer to use.

The workaround: My wireless controllers work just fine in GameMaker games using xboxdrv with the --mimic-xpad option (kind of ironic imo). However, this actually causes strange problems using my controllers with some other games.

I believe I have the coding skills necessary to modify xpad.c such that my wireless controllers are detected properly in GameMaker Studio games. However, I'm not sure exactly what needs to change. What tools/commands are present on GNU/Linux operating systems which will enable me to gather the data I need to make this change? What should I be looking at? I'm sick of having to switch back and forth between xpad and xboxdrv depending on which game I want to play.
>>
>>51742425
>Hi anon,
>Controller Support for Linux depends on how developers code their applications. There are essentially two methods of doing:
>
>Hard coding 0 for player 1 as the gamepad index
>Using the Async System Event to detect which port the gamepad is connected too
>
>Most developers use the first method which doesn't always provide the expected results. We have a tech blog which shows how to do the second method providing the expected results. This is not something we can force on developers as you might expect since both methods work if done correctly.
>
>As this should answer your question I'll close this ticket.

This doesn't even explain why my controllers are not detected. I fucking hate lazy devs who refuse to acknowledge obvious bugs.
>>
Game maker studio has support for xbox360 controllers, if it's not defined as a controller it's defined as a joystick and you'd be using those functions instead.

Please do not post videogames+xpadder+gamemaker+programming help in /G. It's a mistake.
>>
>>51742471
>Game maker studio has support for xbox360 controllers, if it's not defined as a controller it's defined as a joystick and you'd be using those functions instead.
The issue here is that wireless controllers are not detected at all

>Please do not post videogames+xpadder+gamemaker+programming help
I'm not. I'm asking for help regarding GNU/Linux tools to gather data about joysticks connected to my computer. I can do the programming on my own. I just need to understand better how these controllers are detected and interpreted by my system
>>
>>51742511
Sorry, I just skimmed it and took an assumption based off the thumbnail. As those who use game maker and are publicly willing to talk about it are under aged and use only the drag and drop function.

Personally I don't port to anything other than windows and android because of all the bugs game maker has. (And the consistent file corruptions with the latest update). However it's too difficult to drop game maker due to its efficiency that is far superior to other engines.
>>
>>51742581
>However it's too difficult to drop game maker due to its efficiency that is far superior to other engines.
Have you tried Unity3D? You can do quite a lot in the editor with a very minimal amount of code.
>>
To clarify further what I'm asking for here:

I basically want to see what the actual difference is between how my controller is recognized with the xpad driver compared to the xboxdrv driver. The relevant difference may even be something as simple as the name of the controller reported to the system. How can I gather information about my connected wireless controllers so that I can compare and see what is being reported differently with the xboxdrv driver compared to xpad?
>>
>>51742661
Yet when I was using it, I felt like I was re inventing the wheel a bit more than with gamemaker.
>>
Using the command `udevadm info -an /dev/input/js0` here is what I have discovered.

xboxdrv: ATTRS{name}=="Microsoft X-Box 360 pad"
xpad: ATTRS{name}=="Xbox 360 Wireless Receiver"

Then I found the following line in xpad.c
{ 0x045e, 0x0719, "Xbox 360 Wireless Receiver", MAP_DPAD_TO_BUTTONS, XTYPE_XBOX360W },

I changed it to
{ 0x045e, 0x0719, "Microsoft X-Box 360 pad", MAP_DPAD_TO_BUTTONS, XTYPE_XBOX360W },

rmmod steamos_xpad
install the modified driver
modprobe steamos_xpad

I may upload PKGBUILD to the AUR for this, but don't count on it as I'm fucking lazy and have a lot of gaming to do.

/thread
>>
Next time check out
https://github.com/gabomdq/SDL_GameControllerDB/blob/master/gamecontrollerdb.txt

Most hardware ID's are in documented
>>
>>51743437
>https://github.com/gabomdq/SDL_GameControllerDB/blob/master/gamecontrollerdb.txt
Interesting. So who should this issue be escalated to? The maintainers of steamos_xpad, SDL devs, or GameMaker devs?
>>
>>51743306
Just in case anyone here cares, I had to make one further change to get this working properly.

The final code should be
{ 0x045e, 0x0719, "Microsoft X-Box 360 pad", 0, XTYPE_XBOX360W },

The previous version had the dpad mapped to buttons, which caused issues (particularly during menus)
Thread replies: 12
Thread images: 1

banner
banner
[Boards: 3 / a / aco / adv / an / asp / b / biz / c / cgl / ck / cm / co / d / diy / e / fa / fit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mu / n / news / o / out / p / po / pol / qa / r / r9k / s / s4s / sci / soc / sp / t / tg / toy / trash / trv / tv / u / v / vg / vp / vr / w / wg / wsg / wsr / x / y] [Home]

All trademarks and copyrights on this page are owned by their respective parties. Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
If a post contains personal/copyrighted/illegal content you can contact me at [email protected] with that post and thread number and it will be removed as soon as possible.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com, send takedown notices to them.
This is a 4chan archive - all of the content originated from them. If you need IP information for a Poster - you need to contact them. This website shows only archived content.