I would like to get working Playstation Classic controller (with usb). I tried following and doing
CWeiske tutorials. Controller works partially, in some games better than others, without OUYA homebuton I have to hard reset. https://cweiske.de/tagebuch/ouya-stadia-ctrl.htm https://cweiske.de/tagebuch/ouya-usb-joysticks.htm
Controller is something gpio-keys/input0
and my so far keylayout is:
# Playstation Classic Controller SCPH 1000R via USB
# PSC controller mapping
# idVendor=0001, idProduct=0001
# /\ triangle = O(OUYA) OK
# O circle = A(OUYA) Back
# [] square = U(OUYA) launch
# L2 button = Y(OUYA) system menu
# X cross
key 258 BUTTON_A
# O circle
key 257 BUTTON_B
# [] square
key 259 BUTTON_X
# /\ triangle
key 256 BUTTON_Y
key 262 BUTTON_L1
key 260 BUTTON_L2
key 263 BUTTON_R1
key 261 BUTTON_R2
key 264 BUTTON_SELECT
key 265 BUTTON_START
key 298 BUTTON_THUMBL
key 299 BUTTON_THUMBR
axis 0x00 X
axis 0x01 Y
axis 0x02 HAT_X
axis 0x03 HAT_Y
axis 0x04 RZ
axis 0x05 Z
Hello I got new info. I try to keep it short and informative. OUYA itself has issue with 3rd party controllers. OUYA has keylayout files for popular 3rd party controllers Xbox 360, PS3, etc.
These work in OUYA main menu because OUYA itself honors and uses keylayout mappings in main menu.
It is very different with each OUYA game. Even launch titles by-pass keylayout mappings and do not honor and use ADB (Android Debug Bridge) virtual key presses (button presses). In my three days investigation I verified with trial and error which ADB commands work, for example same command works in one OUYA game, but does not work in another game, etc.
I post for here my findings because for starters it is such a mess to even understand basics (is it my controller? is it OUYA game? is it OUYA main menu that fails, is it ADB itself).
Everybody can post messages, where should I post my research and how to fix it? Or just post here to see forum is alive somewhat. Everybody are welcome to share ideas small or bigger.
My setup is OUYA connected to power and laptop Win10Pro with tiny USB cable and ADB installed. I use PSC controller and ADB commands to move around OUYA and shutdown games if no input works (from controller and ADB commands).
I should say that hex2dec converts Hexadecimal to Decimal numbers, for example ADB sendevent uses only decimal numbers an all keylayout numbers are hexadecimal. We are using Andoroid 4,1 JB (Jellybeen) here:
#button O on OUYA
input keyevent BUTTON_A
#button A on OUYA
input keyevent BUTTON_B
#button U on OUYA
input keyevent BUTTON_X
#button Y on OUYA
input keyevent BUTTON_Y
# exit game
# find PID proccess ID and kill it to exit OUYA main menu
ps
#usually starts with com. in middle game name in the end _OUYA
kill <PID>
# LONGPRESS HOME button
input keyevent HOME ; input keyevent HOME ; input keyevent HOME
#OUYA O button
#OUYA main menu ignores, but accepts input keyevent BUTTON_A
sendevent /dev/input/event0 1 304 1 # Hex: 0001 0130 00000001
#OUYA A button
sendevent /dev/input/event0 1 307 1 # Hex: 0001 0133 00000001
#Key down HOME ALT
adb shell su 0 sendevent /dev/input/event0 1 319 1 # Hex: 0001 013f 00000001
adb shell su 0 sendevent /dev/input/event0 0 0 0 # Hex: 0000 0000 00000000
#Key up HOME ALT
adb shell su 0 sendevent /dev/input/event0 1 319 0 # Hex: 0001 013f 00000000
adb shell su 0 sendevent /dev/input/event0 0 0 0 # Hex: 0000 0000 00000000
Hey, I miss-looked at first (I looked these gpio values as physical controller values).
Actually physical controller has unique vendor and product ids and they are even in your Stadia
controller tutorial (PSC/PSX mode on Stadia controller).
# Playstation Classic Controller SCPH 1000R via USB
# PSC controller mapping
# idVendor=054c, idProduct=0cda
This, Playstation classic controller, is from year 2018. It has wired usb connection. Playstation classic uses ARM chipset and runs custom Sony PSXreARMed emulator. Controller uses xInput. Full description here:
Commented out lines can all be deleted. Only axis is d-pad (directional pad, up-down, left-right). No physical thumb-sticks.
All buttons work. RetroArch detects it correctly. Issue is with Ouya custom games. Every game does its own button detection.
I want to write it that for Ouya pulling usb-wire out and reconnect usb makes Ouya “see” controller. With usb-wire connected and powering Ouya on most times Ouya does not understand controller is connected.
With this controller ouya-system menu in-game does not work. It fails to bring up system-menu in-game. I have mapped select and start buttons to Home and Home Alt. It does nothing in-game.
In RetroArch select+start is detected correctly and I use it to bring up RetroArch menu to exit Playstation iso games like Gran Turismo 1.
Even in ouya menu (play, discover, make, etc). Y button is mapped to L2.
In keylayout file all looks good, but in Ouya things get wacky.
Wierd is that in Ouya game Crono Time Demo ‘press any key’ does not detect any controller buttons. When I use 8bitDo SN30 pro+ controller in xbox360 wired mode Crono Time Demo ‘press any key’ detects button presses.
From my understanding both Playstation and 8BitDo xbox360 wired mode are in x-input.
Why Ouya is like that…
Edit 13.01.2025
I removed all comments and left only required fields.
# Playstation Classic Controller SCPH 1000R via USB
# PSC controller mapping
# idVendor=054c, idProduct=0cda
# wrong - L2 button = Y(OUYA) system menu
# O circle = A(OUYA) Back
# [] square = U(OUYA) launch
# /\ triangle = Y(OUYA) system menu
# X cross
key 0x132 BUTTON_A
# O circle
key 0x131 BUTTON_B
# [] square
key 0x133 BUTTON_X
# /\ triangle
key 0x130 BUTTON_Y
#L1
key 0x136 BUTTON_L2
#L2
key 0x134 LTRIGGER
#R1
key 0x137 BUTTON_R2
#R2
key 0x135 RTRIGGER
#SELECT
key 0x138 HOME ALT
#START
key 0x139 HOME
#D-pad
#left-right
axis 0x00 HAT_X
#up-down
axis 0x01 HAT_Y