Oh no! Where's the JavaScript?
Your Web browser does not have JavaScript enabled or does not support JavaScript. Please enable JavaScript on your Web browser to properly view this Web site, or upgrade to a Web browser that does support JavaScript.

USB game controllers

Last updated on 6 years ago
nikosnikosDistro Maintainer
Posted 6 years ago
No Wireless XBox controllers at the moment. I have one arcade stick wireless that works fine, but that is hid controller.
DizzyOfCRNDizzyOfCRNAROS Dev
Posted 6 years ago
My wireless and wired controllers both work at this moment.

There is a 2.4GHz dongle for xbox controller pc use. It's luckily not bluetooth so it might even work.

Not sure if the bit showing controller as wireless is always at the same location, needs testing.

Do you have wireless controller?

I will be putting out new test for the arosx, showing if the wireless check works and getting some more needed info for the xinput descriptor parser.
nikosnikosDistro Maintainer
Posted 6 years ago
BlueTooth is not supported in AROS. I know some XBox controllers use that protocol, but others might use IR or maybe WiFi?

Guess to be safe, cable is the way to go. I guess wireless XBox controller also can be connected with USB cable?
DizzyOfCRNDizzyOfCRNAROS Dev
Posted 6 years ago
I think I found how to get the bitmask for all the inputs on XInput gamepads and that there even is such a bitmask...
Haven't seen that mentioned in anywhere :)

I didn't put any buttons on that settings window that tests the inputs as I didn't know how many buttons each controller has

I think we even now know if the controller is wired or wireless! Important, as we need to inform the controller api about it.
Edited by DizzyOfCRN on 29-09-2018 13:28, 6 years ago
nikosnikosDistro Maintainer
Posted 6 years ago
Thank sounds perfect Dizzy :)
Thanks for doing this.
DizzyOfCRNDizzyOfCRNAROS Dev
Posted 6 years ago
My Wireless F710 has worse thumb sticks than on it's counterpart the F310.
F710 doesn't always return the value to center, but the F310 does.

It brutally shows how bad the sticks have gone.

Some kind of calibration would be nice, I will look into that too. At least it could be good to find the dead band around the center. Maybe some routine that asks to push fully on one direction and then let go. Timer would start from zero every time a new message arrives and lets say if 100mS has elapsed from the last message then the code would look where the stick has last left it markings and do that many times and we should be able to find the dead band.
DizzyOfCRNDizzyOfCRNAROS Dev
Posted 6 years ago
So the rumble even works? :)

My Logitech outputs somewhere 0 at the center so it doesn't shake very much at that position, but the original controller has a different zero position (well, it actually looks the same when your thumb sticks are centered...). It was just a test to see if the rumble works other than my controller. Thank you very much!
nikosnikosDistro Maintainer
Posted 6 years ago
Yes, it open :)

https://m.youtube..._IA9sI5mek

Maybe needs calibration?

edit: with the rumble update my controller rumble all the time like crazy. Little less if I move the left stick upwards. Calibration :)
Edited by nikos on 28-09-2018 11:57, 6 years ago
DizzyOfCRNDizzyOfCRNAROS Dev
Posted 6 years ago
I've enabled some rumble effects on the code. The intensity should vary according to the left thumb stick.

https://www.dropbox.com/s/rl119qmc5uinl4o/arosx.class?dl=1

Works for Logitech F710 at least, not sure if the class even shows any output on other XInput gamepads...

https://youtu.be/NilG2XIYygM
DizzyOfCRNDizzyOfCRNAROS Dev
Posted 6 years ago
Does the "settings" window open?
DizzyOfCRNDizzyOfCRNAROS Dev
Posted 6 years ago

Quote

nikos wrote:

I tried the new class. As you mentioned it is now no debug from the controller. Nothing happen pressing buttons or directions.
When I insert it in usb port it say play it again "controller"
Does that seam ok?

Sounds about right, there is no automatic popup for the testing window, need to go there manually. There's two ways of opening the window:

https://youtu.be/QoAXisrRg50
nikosnikosDistro Maintainer
Posted 6 years ago
I tried the new class. As you mentioned it is now no debug from the controller. Nothing happen pressing buttons or directions.
When I insert it in usb port it say play it again "controller"
Does that seam ok?
DizzyOfCRNDizzyOfCRNAROS Dev
Posted 6 years ago
Updated the linked arosx.class with some fixes, the same link should still work

If not then it's this one:
https://www.dropbox.com/s/rl119qmc5uinl4o/arosx.class?dl=1

I will need some advice on how to proceed, maybe those who have actually ported/coded some apps for AROS could shed some light on me on what to do. I have no experience on that field...
nikosnikosDistro Maintainer
Posted 6 years ago
If only xinput devices would work with the new library I don't have problem with that, but it should be compatible with lowlevel, or classic input.
I know the classic stuff is stupid to configure for multible controllers, but I guess it could be fine that only 1 controller is supported that always go for port 1 anyway.

I guess mapping classic with the new lib to different ports might be difficult?

I tried lot's of hid devices and it seams to always be problems unless you are only out for classic 2-3 button joystick and even with classic controllers it is sometimes not possible to configure the buttons and some controllers does not even take me to the config window. They are simply not recoginzed by the hid interface as a controller and it does not help to try to force the class.

All this said it is better to be fully compatilbe with one controller that is easy to find like the xbox controller than making some mess out of lot's not working and others half way working etc.

For my distro "AspireOS" I simply would put in the hardware page that xbox controllers is what is working and others not recommended.
DizzyOfCRNDizzyOfCRNAROS Dev
Posted 6 years ago

Quote

nikos wrote:

Yes Dizzy, the values do change.

Thank for the video. That looks good :)

If lets say Janus-UAE is going to use your class does it need to be compiled again or is it a matter of changing the Janus-UAE configuration file?


This class should really connect to some sort gamepad library of some sort. If I'd make this class expose a library interface then only xinput gamepads could be used by the library, but if this thing connects to some external gamepad API then everything that connects to that API can be used.

There is no interface yeat to get any output, but I'd imagine that a new compile of said software is needed in order to connect to that something, which we don't have.

EDIT:

Does the new class show gauges moving? Remove all previous xinput.classes if you have them in the class directory or they will fight on the ownership of the usb interface.

There's also some serial debug stuff going on the background, this will hinder the MUI performance as the code prints it's debug. Slowdown if more than one controller is checked in the settings window
nikosnikosDistro Maintainer
Posted 6 years ago
Yes Dizzy, the values do change.

Thank for the video. That looks good :)

If lets say Janus-UAE is going to use your class does it need to be compiled again or is it a matter of changing the Janus-UAE configuration file?
DizzyOfCRNDizzyOfCRNAROS Dev
Posted 6 years ago
Just commited the code. I've not enabled the build for it though, so it won't show up on nightlies

Link for the class is below, it's build for AROS AbiV1.i386

https://www.dropbox.com/s/rl119qmc5uinl4o/arosx.class?dl=1

And here's a video...

https://youtu.be/SoKrllLuAM4
Edited by DizzyOfCRN on 27-09-2018 04:37, 6 years ago
DizzyOfCRNDizzyOfCRNAROS Dev
Posted 6 years ago
Did the values change in any sane way? I think I'll commit tonight the code so far as arosx.class

It doesn't do much, but it has MUI gauges showing the thumb stick movements on devices settings window

At the moment it has no limit on the number of controllers that can be plugged in (should it? We don't even have an API to read the controller to)

On my Logitech controller there are buttons that do not map for XInput, like the mode button(maps dpad as left thumb stick and vice versa) and vibration level button. We can read those too if we like

My Logitech Wireless F710 gamepad goes to sleep if left alone, but it wakes up on a button press of the controller
Edited by DizzyOfCRN on 27-09-2018 03:22, 6 years ago
nikosnikosDistro Maintainer
Posted 6 years ago
Dizzy: yes, just like you say :) Tested with original X-Box controller pad.

Lots of stuff like this:


11:20 pm| 0-arosx.class: Msg: 00 14 00 00 00 00 09 0E BF 35 C8 EE 63 06 00 00 00 00 00 00

11:20 pm| 0-arosx.class: Msg: 00 14 00 00 00 00 09 0E 9A 49 C8 EE F2 05 00 00 00 00 00 00

11:20 pm| 0-arosx.class: Msg: 00 14 00 00 00 00 09 0E 7B 60 C8 EE 63 06 00 00 00 00 00 00

11:20 pm| 0-arosx.class: Msg: 00 14 00 00 00 00 9E 0D A2 75 C8 EE F2 05 00 00 00 00 00 00

11:20 pm| 0-arosx.class: Msg: 00 14 00 00 00 00 9E 0D FF 7F C8 EE F2 05 00 00 00 00 00 00

11:20 pm| 0-arosx.class: Msg: 00 14 00 00 00 00 E0 0E FF 7F C8 EE F2 05 00 00 00 00 00 00

11:20 pm| 0-arosx.class: Msg: 00 14 00 00 00 00 A5 12 FF 7F C8 EE F2 05 00 00 00 00 00 00

11:20 pm| 0-arosx.class: Msg: 00 14 00 00 00 00 59 19 FF 7F C8 EE 63 06 00 00 00 00 00 00

11:20 pm| 0-arosx.class: Msg: 00 14 00 00 00 00 BA 21 FF 7F C8 EE F2 05 00 00 00 00 00 00

11:20 pm| 0-arosx.class: Msg: 00 14 00 00 00 00 DA 28 FF 7F C8 EE 63 06 00 00 00 00 00 00

11:20 pm| 0-arosx.class: Msg: 00 14 00 00 00 00 34 2C FF 7F C8 EE F2 05 00 00 00 00 00 00

11:20 pm| 0-arosx.class: Msg: 00 14 00 00 00 00 22 2F 90 7F C8 EE 63 06 00 00 00 00 00 00

11:20 pm| 0-arosx.class: Msg: 00 14 00 00 00 00 F9 2F AD 7B C8 EE F2 05 00 00 00 00 00 00

11:20 pm| 0-arosx.class: Msg: 00 14 00 00 00 00 F9 2F 39 78 C8 EE F2 05 00 00 00 00 00 00

11:20 pm| 0-arosx.class: Msg: 00 14 00 00 00 00 F9 2F E8 73 C8 EE 63 06 00 00 00 00 00 00

11:20 pm| 0-arosx.class: Msg: 00 14 00 00 00 00 F9 2F 97 6F C8 EE F2 05 00 00 00 00 00 00

11:20 pm| 0-arosx.class: Msg: 00 14 00 00 00 00 F9 2F 63 67 C8 EE F2 05 00 00 00 00 00 00

11:20 pm| 0-arosx.class: Msg: 00 14 00 00 00 00 F2 2A FD 43 C8 EE F2 05 00 00 00 00 00 00

11:20 pm| 0-arosx.class: Msg: 00 14 00 00 00 00 17 18 DD 1E C8 EE F2 05 00 00 00 00 00 00

11:20 pm| 0-arosx.class: Msg: 00 14 00 00 00 00 90 03 E6 FB C8 EE F2 05 00 00 00 00 00 00

11:20 pm| 0-arosx.class: Msg: 00 14 00 00 00 00 FB 03 32 FD C8 EE 63 06 00 00 00 00 00 00

11:20 pm| 0-arosx.class: Msg: 00 14 00 00 00 00 FB 03 E6 FB C8 EE F2 05 00 00 00 00 00 00

11:20 pm| 0-arosx.class: Msg: 00 14 00 00 00 00 90 03 BD F9 C8 EE 63 06 00 00 00 00 00 00

11:20 pm| 0-arosx.class: Msg: 00 14 00 00 00 00 FB 03 DB F5 C8 EE 63 06 00 00 00 00 00 00

11:20 pm| 0-arosx.class: Msg: 00 14 00 00 00 00 90 03 ED EB C8 EE F2 05 00 00 00 00 00 00

11:20 pm| 0-arosx.class: Msg: 00 14 00 00 00 00 FB 03 F4 DB C8 EE F2 05 00 00 00 00 00 00

11:20 pm| 0-arosx.class: Msg: 00 14 00 00 00 00 90 03 CD C6 C8 EE 63 06 00 00 00 00 00 00
Edited by nikos on 26-09-2018 17:25, 6 years ago
DizzyOfCRNDizzyOfCRNAROS Dev
Posted 6 years ago

Quote

nikos wrote:

Cool :D
I can test my controllers if you give me the class :)
You can send to nik-tom(at)online.no

I've send you the class, compiled for AbiV1.i386 :) How is it working there?

If you press on the analog stick then there will be a lot of debug messages and at least here the Trident can't really keep up showing them, but it's just because it prints so much.

There is no wakeup code to the gamepad, that is if it is on somekind of sleep state then it will remain so and no output appears at the Trident log
Edited by DizzyOfCRN on 26-09-2018 14:09, 6 years ago
You can view all discussion threads in this forum.
You cannot start a new discussion thread in this forum.
You cannot reply in this discussion thread.
You cannot start on a poll in this forum.
You cannot upload attachments in this forum.
You can download attachments in this forum.
Moderator: Administrator
Users who participated in discussion: cavemann, DizzyOfCRN, nikos
Sign In
Not a member yet? Click here to register.
Forgot Password?
Users Online Now
Guests Online 5
Members Online 0

Total Members: 223
Newest Member: Broad2020
Member Polls
Should AROSWorld continue with AROS-Exec files (SMF based)?
Yes44 %
44% [12 Votes]
No26 %
26% [7 Votes]
Not sure30 %
30% [8 Votes]