PCSX2 / pcsx2

PCSX2 - The Playstation 2 Emulator
https://pcsx2.net
GNU General Public License v3.0
11.55k stars 1.6k forks source link

OnePad: PS3 controller clone not recognized. #2258

Closed s0kan closed 6 years ago

s0kan commented 6 years ago

PCSX2 version: development build v1.5.0-dev-2247-g29ef856f9

Plugins used: OnePAD 20180109203614 2.0.0 [libonepad] and OnePAD 20180109203614 1.3.0 [libonepad-legacy]

Description of the issue: I get no gamepad detected when I try to configure my controller. System and other emulators recognize it normally.

Last known version to work: PCSX2 stable 1.4.0

PC specifications: Operating System = Linux 4.13.11-gentoo x86_64 Physical RAM = 3933 MB CPU name = Intel(R) Core(TM) i5 CPU 760 @ 2.80GHz Vendor/Model = GenuineIntel (stepping 05) CPU speed = 2.797 ghz (4 logical threads) PS3 gamepad clone USB conenction

Edit: I did read this but I've no clue how to find my controllers GUID and name via PCSX2 console.

gregory38 commented 6 years ago

PCSX2 will print a message on the console if it fails to detect it. You should use the onepad plugin (not legacy). Just try to configure the plugin and the message should be printed. If console is closed, you can check the emulog file (either $HOME/.config/PCSX2 or in local bin depends on your install`)

s0kan commented 6 years ago

emulog and console output

Savestate version: 0x9a0d0000

Host Machine Init:
    Operating System =  Linux 4.13.11-gentoo x86_64
    Physical RAM     =  3933 MB
    CPU name         =  Intel(R) Core(TM) i5 CPU         760  @ 2.80GHz
    Vendor/Model     =  GenuineIntel (stepping 05)
    CPU speed        =  2.797 ghz (4 logical threads)
    x86PType         =  Standard OEM
    x86Flags         =  bfebfbff 0098e3fd
    x86EFlags        =  28100000

x86 Features Detected:
    SSE2.. SSE3.. SSSE3.. SSE4.1.. SSE4.2

Installing POSIX SIGSEGV handler...
Reserving memory for recompilers...

Loading plugins from /usr/lib32/pcsx2...
    Bound   GS: libGSdx.so [GSdx (GCC 6.4.0 SSE4.1/SSE41) 1.1.0]
    Bound  PAD: libonepad.so [OnePAD 20180112132843 2.0.0]
    Bound SPU2: libspu2x-2.0.0.so [SPU2-X 2.0.0]
    Bound CDVD: libCDVDnull.so [CDVDnull Driver 20180112132843 0.6.0]
    Bound  USB: libUSBnull-0.7.0.so [USBnull Driver 20180112132843 0.7.0]
    Bound   FW: libFWnull-0.7.0.so [FWnull Driver 20180112132843 0.7.0]
    Bound DEV9: libdev9null-0.5.0.so [DEV9null Driver 20180112132843 0.5.0]
Plugins loaded successfully.

(GameDB) 9714 games on record (loaded in 216ms)

I don't see any changes nor when I try to activate the gamepad, nor when I assign new keys to it.

The logs are indeed saved under .config/PCSX2/logs. The logs I currently have there are:

dev9null.log  emuLog.txt  FWnull.log  padLog.txt  USBnull.log

Out of which only emuLog.txt and padLog.txt are not empty. The latter contains only the word: PADinit

gregory38 commented 6 years ago

Note: you can't assign any key on gamepad by the GUI. It is done automatically by SDL.

Gamepad detection is based on SDL2, it is strange than nothing is reported.

s0kan commented 6 years ago

Since I've downloaded PCSX2-git as is from the main distro repo, could it be that I'm missing some sort of libsdl2 or/and SDL2 pagkage?

Update: I do have libsdl2 installed and working with joysticks as well. Also evdev sees my gamepad. I've no clue what is going on or how to check more specifically about SDL2 and my gamepad.

gregory38 commented 6 years ago

Check 32 bits stuff. Often people got everything working on 64 bits but they miss some 32 bits parts.

s0kan commented 6 years ago

32bit installed alongside 64bit. I run another application that maps gamepads based on SDL2 and it doesn't find my gamepad either. But it gives:

No gamepads found
Environment variable "SDL_GAMECONTROLLERCONFIG" is not defined

So I think the issue lies directly with SDL2 not recognising my gamepad at all. Will need to search more on how can I change that as it seems.

s0kan commented 6 years ago

I think I have found my gamepad's GUID. Found a ruby script that finds it based on /dev/input/eventx. On which part of the OnePAD2.ini do I add the line:

SDL2 = <GUID>,<NAME>,Joystick,platform:Linux,x:b3,a:b2,b:b1,y:b0,back:b8,start:b9,leftshoulder:b6,lefttrigger:b4,rightshoulder:b7,righttrigger:b5,leftx:a0,lefty:a1

And do I need to comment anything else out? Current file is like this:

log = 0
options = 0
mouse_sensibility = 500
ff_intensity = 32767
uid[0] = 1
uid[1] = 0
PAD 0:KEYSYM 0x1 = 0
PAD 0:KEYSYM 0x3 = 20
PAD 0:KEYSYM 0x3b = 1
PAD 0:KEYSYM 0x64 = 14
PAD 0:KEYSYM 0x66 = 13
PAD 0:KEYSYM 0x69 = 4
PAD 0:KEYSYM 0x6a = 7
PAD 0:KEYSYM 0x6b = 6
PAD 0:KEYSYM 0x6c = 5
PAD 0:KEYSYM 0x6e = 11
PAD 0:KEYSYM 0x70 = 3
PAD 0:KEYSYM 0x71 = 2
PAD 0:KEYSYM 0x73 = 15
PAD 0:KEYSYM 0x76 = 8
gregory38 commented 6 years ago

Add sdl2 at the end of file. You don't need to touch anything on the ini.

I'm not sure that it will work. Onepad should report 1 not-supported gamepad. Whereas it seems you have 0 gamepad detected.

s0kan commented 6 years ago

Problem solved. You can close the issue. Many thanks for the replies gregory38.

Solution for those who might have same problem After all it was an issue with permissions. My user didn't have access to /dev/input/event*, which my gamepad was using. These events belonged to the group input. I added my user to that group. Assigned keys via antimicro and run PCSX2 which now recognized my gamepad and has buttons asigned jsut fine as well.

CyberManifest commented 5 years ago

I'm having this issue too, but I'm using an ACTUAL PS3 controller and setting my user to input group didn't resolve the issue. https://imgur.com/AGAf7AG This is also discussed here: https://forums.pcsx2.net/Thread-ps3-controller-works-with-everything-BUT-pcsx2