libretro / RetroArch

Cross-platform, sophisticated frontend for the libretro API. Licensed GPLv3.
http://www.libretro.com
GNU General Public License v3.0
10.23k stars 1.82k forks source link

PS3 controller D-pad issues on Android #615

Closed mjfrancis closed 9 years ago

mjfrancis commented 10 years ago

The D-pad of PS3 controllers connected through USB doesn't appear to function correctly

Retroarch 1.0.0.2 2013 Nexus 7, stock Android 4.4.2 (not rooted)

The left button works correctly. Input debugging shows: (press left) Pad 0: 21, ac=0, src=1281 (release left) Pad 0: 21, ac=1, src=1281

The up/down/right buttons only work after pressing for a second or so. Input debugging shows: (press right) Pad 0: x 0.07, y:0.00, z:-0.00, rz:-0.04, src=12777332. (... after continuing to press for a second) Pad 0: 22, ac=0, src=1281

This occurs with both an original Japanese SIXAXIS (CECHZC1J) and a DUALSHOCK3 (CECHZC2J) that work without issue in other applications

The triangle/square/circle/X buttons also appear to be mapped oddly under PS1 emulation, although this is likely a separate issue

Please let me know if I can provide any further information

fredbcode commented 10 years ago

I confirm same problem, here Not directly related but I also can't found an exit button

ZeldaWW commented 10 years ago

I confirm the same problem, and this issue is kind of sad for an emulator, I bet many people use the cellphone with android and they actually use a PS3 controller with an USB otg cable. I had to go back to RetroArch 0.9.9.6 r22, which i think is actually better because of this. When you install sixaxis controller app the ps3 dualshock gets recognized by many other emulators on the playstore. But when you launch retroarch 1.0x the keys are wrong, you have to press DPAD right for 4 seconds for retroarch to actually respond. And also you can´t map the keys on a way you like...which is another bad thing, on other emulators you can swap and map the keys whatever you like, but on retroarch that is not even possible, such a simple thing to have is a nightmare

kamegami13 commented 10 years ago

I can also confirm this same issue on Nexus 7 and Galaxy S3 using OTG cable.

ZeldaWW commented 10 years ago

ok here is a workaround if you have any samsung phone:

too long waiting for the developer to fix this emulator properly in order to support gamepad key mapping properly, as it does not work at all. Devices like the samsung galaxy for example, galaxy s2, galaxy s4, come already with built in support for PS3 controllers that are connected using an OTG cable. so you dont even need the sixaxis app, samsung already gave you support for ps3 controllers that you connect via otg.

Many of us just buy a gameklip and connect our phones to the controller using the OTG cable, besides bluetooth is a waste of battery. so, samsung on their firmwares included a file with specific keys assigned for a ps3 controller, and you can edit them!, the problem is that they assigned the keys incorrectly, so the keys are all messed up.

1) make sure in retroarch you hace selected: SETTINGS, INPUT, configuration autodetection ENABLE doing this the controller is autodetected and you have NO issues with the Dpads, keys respond perfectly and fast.

2) then you need to be rooted and with a root file manager you need to modify this file located in:

system/usr/keylayout

edit file:

vendor_054c_product_0268.kl

modify these lines to look like this:

key 0x12f BUTTON_A key 0x12c BUTTON_B key 0x12e BUTTON_X key 0x12d BUTTON_Y

(just so you understand looking at a controller 0x12f is button SQUARE, 0x12c CIRCLE, 0x12e CROSS, 0x12d triangle ) that way you can modify whatever you want, for example in mario world snes whith this you run with square and jump with x, and mario 3 nes you run with X and jump with circle.

you dont need any sixaxis app, once you connect the controller to the cell phone and press the Playstation button you can even see that you can use the controller to select any icon in touchwiz.

i hope this helps, i love this emulator because its the best, other emulators sometimes give you slowdowns or stuttering but this is the best emulator so far for SNES and maybe NES too, those are the 2 things i play the most while im traveling, and being not able to select any key i wanted was a pain in the ass, but at least there is a workaround

Aergan commented 10 years ago

I'm having very similar issues on my Sony Xperia Z1 (Android 4.4.2) non-rooted. RetroArch version 1.0.0.2 Sony PlayStation 3 Dualshock 3 via either Bluetooth or USB wired. Massive delay / lag on D-Pad, analogue left/right (intermittently do not work), R2 & L2. R1, L1, Select, Start, Triangle, Circle, Cross & Square all respond correctly. PS button changes to Home on my phone / can't be mapped within RetroArch.

Cores tried: NEStopia, PCSX ReARMed [NEON], Genesis Plus GX, Picodrive & SNES9x Next.

Same lag issues present in RetroArch RGUI but no present in the RetoArch android GUI. Other games / applications work fine with D-pad etc.

3miliooo commented 9 years ago

Same issue on Galaxy S4 stock 4.3 using OTG cable, affects all emulators and all my ROMs.

3miliooo commented 9 years ago

Don't suppose I can beg the 0.9.9.6 r22 APK off anybody if that works, pleeze? :(

TheBeefiest commented 9 years ago

So was this fixed? The version on the android store is dated march 9 2014.

My ps3 controller (connected via usb) can dpad and select apps in the android operating system, but trying to set up anything in the input settings inside RetroArch doesn't work, and then the keyboard input stops working too so there is no way to get out of the menu that is trying to set input buttons.

GPDP2 commented 9 years ago

I remember having loads of issues with my DS3 on RetroArch as well, which put me off on the Android port for some time. I tried a recent nightly not too long ago, however, and it immediately picked it up and everything more or less just worked. So maybe the issue you had is gone now.

3miliooo commented 9 years ago

Thanks but still no luck, even on the nightly from Feb 19th. Seems to be an issue on pre-KitKat builds, Radius and hunterk have been looking at it, as per this discussion on the RA forums which I've been contributing to: http://libretro.com/forums/threads/1961-USB-SNES-Controller-Input-Problem-(D-Pad)/page3 Might help them if you could chime in and maybe advise what version of Android you were on at the time of your issues / are on now?

3miliooo commented 9 years ago

FIXED! :D

https/github.com/libretro/RetroArch/issues/1423

Nightly build 26.02.15 working on my JB S4.