Xbox 360 wireless controller - can't make it working correctly

Report issues and bugs here.
User avatar
Avecezar
Posts: 44
Joined: Fri May 08, 2020 7:28 am

Xbox 360 wireless controller - can't make it working correctly

Unread post by Avecezar » Fri May 08, 2020 2:33 pm

Hi,

I'm using the latest Android RVGL (20.0430a).
Everything works like a charm on my phone Xiaomi mi 5s plus except I can't make Xbox 360 wireless controller working. Microsoft original receiver is connected to the phone through OTG cable. Phone Android version is 6.0.1 MXB48T.

Same is with rvgl controller map application. When started I get the message: Mapping, Configure controller 0: "Xbox 360 Wireless Receiver"? During mapping procedure there is no response from the app on any button except B and BACK buttons both exit the app and go to the desktop. Additionally I tested reactions in various apps and there is response to different buttons. For example when writing a note I can move cursor in all directions with left knob, Y makes space, X acts as backspace. Main Xbox button usually acts as overview button showing all open apps.

In RVGL, configure controller option I get the following controllers to choose from:
- keyboard/touch
- [1] Xbox 360 Wireless Receiv...
- [2] Xbox 360 Wireless Receiv...
- [3] Xbox 360 Wireless Receiv...
- [4] Xbox 360 Wireless Receiv...
- Android Accelerometer

In menu, A button acts as enter, B and BACK as go back to previous menu.
In configure controller the only button which registers is A button - as return.
In race B and BACK buttons bring in-game menu options, A acts as enter, all other pad controls do nothing.

gamecontroller_log.txt content:

Code: Select all

There are 5 joysticks attached
Joystick 0: Xbox 360 Wireless Receiver
       axes: 6
      balls: 0
       hats: 0
    buttons: 36
instance id: 0
       guid: 30396232393162346330326334636566
    VID/PID: 0x0000/0x0000
Joystick 1: Xbox 360 Wireless Receiver
       axes: 6
      balls: 0
       hats: 0
    buttons: 36
instance id: 1
       guid: 65353331386662343338643939643636
    VID/PID: 0x0000/0x0000
Joystick 2: Xbox 360 Wireless Receiver
       axes: 6
      balls: 0
       hats: 0
    buttons: 36
instance id: 2
       guid: 65613532386633373963616462363038
    VID/PID: 0x0000/0x0000
Joystick 3: Xbox 360 Wireless Receiver
       axes: 6
      balls: 0
       hats: 0
    buttons: 36
instance id: 3
       guid: 38313038323730383864666463383533
    VID/PID: 0x0000/0x0000
Joystick 4: Android Accelerometer
       axes: 3
      balls: 0
       hats: 0
    buttons: 0
instance id: 4
       guid: 416e64726f696420416363656c65726f
    VID/PID: 0x0000/0x0000
Watching joystick 0: (Xbox 360 Wireless Receiver)
Joystick has 6 axes, 0 hats, 0 balls, and 36 buttons


    ====================================================================================
    Press the buttons on your controller when indicated
    (Your controller may look different than the picture)
    If you want to correct a mistake, press backspace or the back button on your device
    To skip a button, press SPACE or click/touch the screen
    To exit, press ESC
    ====================================================================================
Please help
User avatar
Huki
Developer
Posts: 345
Joined: Wed Dec 06, 2017 5:54 am
Discord: Huki#1668

Re: Xbox 360 wireless controller - can't make it working correctly

Unread post by Huki » Mon Jun 29, 2020 6:14 am

The controller support on Android can be a bit broken, and I suspect this to be due to bugs / limitations in the SDL2 version that the game is built with. Recent SDL2 updates bring much needed improvements to the Android controller support, so wait for the next RVGL release. I can also post a test build here when it's ready.
7wells
Posts: 78
Joined: Tue Aug 25, 2020 5:18 pm

Re: Xbox 360 wireless controller - can't make it working correctly

Unread post by 7wells » Wed Aug 26, 2020 12:20 pm

Hello, is the source with updated SDL2 support available somewhere? I could not find it, but could build and test myself. Below is my original post (in another thread) that describes my problems with gamepads:
Hello, is there a way to amend the (seemingly?) broken SDL2 on Android? I have 2 XBox-compatible wireless gamepads that work flawlessly on other Android & Amazon Fire TV devices. With the RVGL Controller Map app ( https://rvgl.re-volt.io/downloads/rvgl_ ... er_map.apk ), I cannot assign the "home" button in the middle (nothing happens - well, this button seems to be seserved to switch controller modes). This itself is not a problem, as I would not use this button. But since there is no way to skip a button, I cannot complete the settings in the Controller Map app. Furthermore, when I then run RVGL and go to the controller settings, I see both gamepads there, but can change keys only for 1; and sometimes RVGL freezes, so I have to force-close it. I used the similar Controller Map tool under WIndows 10 ( https://generalarcade.com/gamepadtool ), where it is possible to skip buttons. So bottom line is: How can I properly assign all (except that reserved button) gamepad buttons under Android? Thanks for your help. And please accept my apologies if my post here is in the wrong place.
PS:
The gamepads allow to switch the gamepad mode (Xbox compatible and 2 other modes). Under certain circumstances (I have not found out the details yet), RVGL hangs in the gampad settings menu, so I have to force-close the game. Whether this is related to "wrong" gamepad modes, to missing support in general, or to the fact that both gamepads are of the same manufacturer and model* (i.e. same GUID, I assume), I do not know. BTW, force feedback (vibration) does not work, despite it is switched on in the settings and these gamepads are told to have this feature.

*EasySMX PC Gamepad, Wireless Controller, gaming Controller für PS3/PC(Windows XP/7/8/8.1/10)/Android TV-Box, Vista

I hope it is ok to post these links here (if not, please feel free to delete them):
Manufacturer:
https://www.easysmx.com/collections/gam ... 4580397169
Manual:
https://gzhls.at/blob/ldb/9/e/1/1/4379c ... f5b7fa.pdf
7wells
Posts: 78
Joined: Tue Aug 25, 2020 5:18 pm

Re: Xbox 360 wireless controller - can't make it working correctly

Unread post by 7wells » Wed Aug 26, 2020 2:24 pm

Sorry, another PS:

The values under [controller] in profile.ini are different for [Controller1] through [Controller4], but when going into the controller settings of RVGL, they all look the same:
-Axis LeftX
+Axis LeftX
-Axis LeftY
+Axis LeftY
Button A
Button B
Button X
Button Guide
Button Back
F1
Button Y

Why? Shouldn't these settings show different values that reflect what's in profile.ini?
;==========================================================
; RVGL Settings File
;==========================================================

[Game]
Pickups = 1
NCars = 8
NLaps = 1
PlayMode = 3
Language = "english"
LevelDir = "nhood1"
PlayerName1 = "PLAYER"
CarDir1 = "rc"
PlayerName2 = "Player 2"
CarDir2 = "rc"
PlayerName3 = "Player 3"
CarDir3 = "rc"
PlayerName4 = "Player 4"
CarDir4 = "rc"
SpeedUnits = 4
LocalCamera = 2
DrawRearView = 0
AnimateRearView = 1
GhostType = 0
ShowGhost = 1
CatchUp = 1
CupDC = 0
Difficulty = 0
BattleTagTime = 2
NumberOfPlayers = 2
MultiPlayerCPU = 1
FinalLapMsg = 1
FinalCam = 1
WeaponCam = 0
RandomSkins = 1

[Controller1]
Joystick = 4
ForceFeedback = 0
NonLinearSteering = 1
SteeringDeadzone = 10
SteeringRange = 90
ButtonOpacity = 0
KeyLeft = 0x02000000
KeyRight = 0x03000000
KeyFwd = 0x02000001
KeyBack = 0x03000001
KeyFire = 0x01000000
KeyReset = 0x01000001
KeyReposition = 0x01000002
KeyHonka = 0x01000005
KeyChangeCamera = 0x0000003a
KeyRearView = 0x01000004
KeyPause = 0x01000003

[Controller2]
Joystick = -1
ForceFeedback = 0
NonLinearSteering = 1
SteeringDeadzone = 10
SteeringRange = 90
ButtonOpacity = 50
KeyLeft = 0x0000005c
KeyRight = 0x0000005e
KeyFwd = 0x00000060
KeyBack = 0x0000005d
KeyFire = 0x00000062
KeyReset = 0x0000005f
KeyReposition = 0x00000057
KeyHonka = 0x00000058
KeyChangeCamera = 0x00000061
KeyRearView = 0x0000005a
KeyPause = 0x00000056

[Controller3]
Joystick = -1
ForceFeedback = 0
NonLinearSteering = 1
SteeringDeadzone = 10
SteeringRange = 90
ButtonOpacity = 50
KeyLeft = 0xffffffff
KeyRight = 0xffffffff
KeyFwd = 0xffffffff
KeyBack = 0xffffffff
KeyFire = 0xffffffff
KeyReset = 0xffffffff
KeyReposition = 0xffffffff
KeyHonka = 0xffffffff
KeyChangeCamera = 0xffffffff
KeyRearView = 0xffffffff
KeyPause = 0xffffffff

[Controller4]
Joystick = -1
ForceFeedback = 0
NonLinearSteering = 1
SteeringDeadzone = 10
SteeringRange = 90
ButtonOpacity = 50
KeyLeft = 0xffffffff
KeyRight = 0xffffffff
KeyFwd = 0xffffffff
KeyBack = 0xffffffff
KeyFire = 0xffffffff
KeyReset = 0xffffffff
KeyReposition = 0xffffffff
KeyHonka = 0xffffffff
KeyChangeCamera = 0xffffffff
KeyRearView = 0xffffffff
KeyPause = 0xffffffff
Besides, I do not understand the concept of profile.ini. Why are different controllers set up for one player/one profile? Should a player not only have one controller? Hmm, sorry that I seem to be dumb. ;)
User avatar
Huki
Developer
Posts: 345
Joined: Wed Dec 06, 2017 5:54 am
Discord: Huki#1668

Re: Xbox 360 wireless controller - can't make it working correctly

Unread post by Huki » Sat Aug 29, 2020 6:38 pm

7wells wrote:
Wed Aug 26, 2020 12:20 pm
Hello, is the source with updated SDL2 support available somewhere? I could not find it, but could build and test myself.
Not yet. I'll link you to an updated android build when it's ready. Hopefully it shouldn't be more than a few days.
The values under [controller] in profile.ini are different for [Controller1] through [Controller4], but when going into the controller settings of RVGL, they all look the same
Controller[2-4] get keyboard mappings by default (you can see they are assigned "Joystick = -1").
Besides, I do not understand the concept of profile.ini. Why are different controllers set up for one player/one profile? Should a player not only have one controller?
Controller[2-4] are additional player slots for split-screen mode.
7wells
Posts: 78
Joined: Tue Aug 25, 2020 5:18 pm

Re: Xbox 360 wireless controller - can't make it working correctly

Unread post by 7wells » Sun Aug 30, 2020 4:36 pm

Thank you so much! I can test this also on Amazon's Fire TV with 4 controllers (from 2 different makes, each), connected via Y-cable. Until now, splitscreen is not yet available for Android. Will it be possible with 4 players? Or is it possible that 2 players play on splitscreen on one device vs. 2 other players on splitscreen on another device via local LAN? (Android or other OS)
7wells
Posts: 78
Joined: Tue Aug 25, 2020 5:18 pm

Re: Xbox 360 wireless controller - can't make it working correctly

Unread post by 7wells » Mon Aug 31, 2020 7:44 am

PS @Huki
Besides builds, I am most interested in the full source code. Where can I find it? (to learn and to build myself)
User avatar
Huki
Developer
Posts: 345
Joined: Wed Dec 06, 2017 5:54 am
Discord: Huki#1668

Re: Xbox 360 wireless controller - can't make it working correctly

Unread post by Huki » Mon Aug 31, 2020 1:49 pm

7wells wrote:
Sun Aug 30, 2020 4:36 pm
Thank you so much! I can test this also on Amazon's Fire TV with 4 controllers (from 2 different makes, each), connected via Y-cable. Until now, splitscreen is not yet available for Android. Will it be possible with 4 players? Or is it possible that 2 players play on splitscreen on one device vs. 2 other players on splitscreen on another device via local LAN? (Android or other OS)
Split-screen will be enabled on Android eventually. This part of the code has never been tested on Android, so not sure how it works (text scaling and so on). LAN cross-play is already possible, but not LAN + split-screen (which is also planned eventually). But 4-player split on Android shouldn't be a problem as long as the device is powerful enough.
7wells wrote:
Mon Aug 31, 2020 7:44 am
PS @Huki
Besides builds, I am most interested in the full source code. Where can I find it? (to learn and to build myself)
I'll elaborate in the main thread where it's already answered...
User avatar
Huki
Developer
Posts: 345
Joined: Wed Dec 06, 2017 5:54 am
Discord: Huki#1668

Re: Xbox 360 wireless controller - can't make it working correctly

Unread post by Huki » Wed Sep 02, 2020 6:25 pm

Ok, here's a test build with SDL upgraded to 2.0.12, and several other fixes.
rvgl_20.0902a_test_android.apk

There is a similarly updated controllermap:
rvgl_20.0902a_controllermap_test.apk

Note: Superseded by the 20.0905a release.
7wells
Posts: 78
Joined: Tue Aug 25, 2020 5:18 pm

Re: Xbox 360 wireless controller - can't make it working correctly

Unread post by 7wells » Sun Sep 06, 2020 5:58 am

Is the updated (test) controllermap under this link? (or is this the old one?)
https://rvgl.re-volt.io/downloads/rvgl_ ... lermap.apk
User avatar
Huki
Developer
Posts: 345
Joined: Wed Dec 06, 2017 5:54 am
Discord: Huki#1668

Re: Xbox 360 wireless controller - can't make it working correctly

Unread post by Huki » Sun Sep 06, 2020 8:35 am

7wells wrote:
Sun Sep 06, 2020 5:58 am
Is the updated (test) controllermap under this link? (or is this the old one?)
https://rvgl.re-volt.io/downloads/rvgl_ ... lermap.apk
That is the latest one. If in doubt, you can check the app's version number (new one should say 20.0905a).
7wells
Posts: 78
Joined: Tue Aug 25, 2020 5:18 pm

Re: Xbox 360 wireless controller - can't make it working correctly

Unread post by 7wells » Sun Sep 06, 2020 8:39 am

And what does this app need full network access for? I would like to have RVGL and the controllermap apps completely offline for the kids. Is that possible or will there be undesired side effects when being offline? Is there a way to have internet/WAN traffic blocked on the device, while retaining local LAN network (to play in the house)?

Another question about the controllermap app: I still miss the option to skip certain buttons. Would you be able to add such a function? Reason: I use a gamepad controller with a button (with LED indicators) in the middle that is Xbox 360 compatible, but can also be configured to be compatible with other popular controllers by pressing that button. The 4 LEDs show the different compatibility settings, but thus this button cannot be used in-game. Every time I come to the configuration of that button in the controllermap app, I cannot skip it, so I press the start button right of it, which is the last remaining button on my gamepad. However, then the controllermap app asks for the last remaining button, which is then exactly that start button, but I have no unmapped button left on my gamepad and cannot complete the configuration in that app. What can I do about it? Thanks once more for your patience with me and for your help! :thumbsup:
User avatar
Huki
Developer
Posts: 345
Joined: Wed Dec 06, 2017 5:54 am
Discord: Huki#1668

Re: Xbox 360 wireless controller - can't make it working correctly

Unread post by Huki » Sun Sep 06, 2020 8:54 am

7wells wrote:
Sun Sep 06, 2020 8:39 am
And what does this app need full network access for? I would like to have RVGL and the controllermap apps completely offline for the kids. Is that possible or will there be undesired side effects?
RVGL requires network permissions for hosting and joining games. I think this is necessary even if you're hosting a LAN game, but I'm not sure. Is it possible for you to deny a specific permission and still run the game? If so, you can try it for yourself and see what happens. Outside of hosting and joining, the network is not accessed for anything else.

The controllermap copies the same set of permissions from RVGL for convenience sake, even though it doesn't use network functionality at all currently.
Another question about the controllermap app: I still miss the option to skip certain buttons. Would you be able to add such a function?
You can skip a mapping by tapping on the device. Does that work? Or does your TV / device not support touch? Once you've configured the A and B buttons, you can try using them to navigate forward and backward. Does that work?

Also, it's possible you don't need a custom mapping anymore with the latest RVGL. So I suggest you to try the controller in-game first. Plug in the controller, launch the game (new version) and get me the log file (profiles/re-volt_log.txt) from the run.

Of course, it'd be nice to solve the controllermap button skipping issue too, so let me know also whether the above solutions work.
7wells
Posts: 78
Joined: Tue Aug 25, 2020 5:18 pm

Re: Xbox 360 wireless controller - can't make it working correctly

Unread post by 7wells » Sun Sep 06, 2020 9:59 am

I cannot tap the device, as it is an Amazon Fire TV that is attached (via HDMI cable) to my TV. ;) I will try without specifically using the controllermap app and simply use the gamepad settings within RVGL. And thanks for your explanations!

PS: Worth to note is that the controllermap app works perfectly on a tappable device like a phone or tablet. Sorry that I did not mention that right in the beginning. :blush:
User avatar
Avecezar
Posts: 44
Joined: Fri May 08, 2020 7:28 am

Re: Xbox 360 wireless controller - can't make it working correctly

Unread post by Avecezar » Sun Sep 06, 2020 5:07 pm

With the latest update 20.0905 my xbox 360 wireless controller has been properly recognized and I was able to configure controller settings from within game menu. Tested briefly on a track and everything works flawlessly. Good job! :grimacingmarv:
7wells
Posts: 78
Joined: Tue Aug 25, 2020 5:18 pm

Re: Xbox 360 wireless controller - can't make it working correctly

Unread post by 7wells » Sun Sep 06, 2020 5:22 pm

Yep, same here - works very nicely both on Windows 10 and on an old Amazon Fire TV stick with 2 wireless controllers - and without the need of any controllermap apps. :thumbsup:

And surprisingly, the frame rate is great for flawless gaming even with the highest gfx settings on the old Fire TV - really impressive and great fun on this cheap device. :D
7wells
Posts: 78
Joined: Tue Aug 25, 2020 5:18 pm

Re: Xbox 360 wireless controller - can't make it working correctly

Unread post by 7wells » Sun Sep 06, 2020 5:36 pm

PS @Huki
It is possible to deny an Amazon Fire TV box access to the internet but still preserving local LAN playability. :)
The latest version has no multiplayer splitscreen yet on Android, right?
Post Reply