RPCS3 / rpcs3

PS3 emulator/debugger
https://rpcs3.net/
GNU General Public License v2.0
14.7k stars 1.86k forks source link

Support for non-sony PS4 controllers on Mac-M1 #11485

Closed adrgumula closed 1 year ago

adrgumula commented 2 years ago

Quick summary

Support for non-sony PS4 controllers on Mac (M1 max)

Details

  1. Pad is connected via BT
  2. Start the RPCS3
  3. Click the "Pad" Configure controls icon
  4. Got the console log (attached below)
  5. PAD is not detected in the PAD-Preferences window (scr shot attached)
  6. NOTE: this controller works without issues with the PCSX2 on that machine

Console log

[Controller contacted via BT] E DS4: GetCalibrationData: hid_get_feature_report 0x05 for bluetooth controller failed! result=-1, error=0000000002907250 E DS4: check_add_device: GetCalibrationData failed!

[Controller contacted via USB] E DS4: GetCalibrationData: hid_get_feature_report 0x05 for bluetooth controller failed! result=0, error=0000000002907250 E DS4: check_add_device: GetCalibrationData failed! E DS4: GetCalibrationData: hid_get_feature_report 0x05 for bluetooth controller failed! result=0, error=0000000002907250 E DS4: check_add_device: GetCalibrationData failed!

System Info

Controller Info

CUH-ZCT1U FCC ID: ZAYRM-NS009 212020B00141268

[BLUETOOTH] DUALSHOCK 4 Wireless Controller: Address: A0:5A:5C:DF:42:83 Connected: Yes Vendor ID: 0x054C Product ID: 0x05C4 Firmware Version: 1.0.0 Minor Type: Gamepad Services: 0x800020 < HID ACL >

[USB] Wireless Controller: Product ID: 0x09cc Vendor ID: 0x054c (Sony Corporation) Version: 1.00 Speed: Up to 12 Mb/s Manufacturer: Sony Interactive Entertainment Location ID: 0x01110000 / 4 Current Available (mA): 500 Current Required (mA): 500 Extra Operating Current (mA): 0

![Uploading RPCS3-NonSonyPad-recognition.problem.png…]()

nastys commented 2 years ago

Legit PS4 controllers via BT do not work reliably on macOS at the moment, let alone clones.

adrgumula commented 2 years ago

@nastys the same controller works pretty well with the PS2 emu both BT & cable

nastys commented 2 years ago

I mean with RPCS3

adrgumula commented 2 years ago

guys, I've added USB device info for further investigation.

mrkaspa commented 2 years ago

I was trying to setup my 8bitdo controller but did not work

adrgumula commented 2 years ago

@mrkaspa did you try with PCSX2 emulator as well?

mrkaspa commented 2 years ago

No because the game I want to emulate is only on ps3

oresttokovenko commented 2 years ago

xbox x controller doesn't work either

adrgumula commented 2 years ago

@oresttokovenko the thing is I trying PS2 emulator PCSX2 and my controller works pretty well both cable & BT. It shouldn't be a big deal to port this. Did you try it?

emmetmorris commented 2 years ago

Desperately need controller support for Mac

33masterman33 commented 2 years ago

I've been using Joystick Mapper to convert my Xbox series controller to keyboard inputs and it works just fine on m1 mac.

adrgumula commented 2 years ago

An official MacOs release: rpcs3-v0.0.22-13669-bda52a51_macos SH1: ED26155B591F1CFCCC294C1BFA87633608761DFB88051438A1A81E16CFD95437 fixed that issue. It works flawless via usb & wireless.

S HID: DualShock 4 Controllers found: 1 x2

image
oresttokovenko commented 2 years ago

what about xbox controllers?

MSuih commented 2 years ago

Those are tracked in https://github.com/RPCS3/rpcs3/issues/11458

vadimszzz commented 2 years ago

Looking at the PCSX2 source it seems that they use SDL2 to make 'other' controllers work on Win/Linux/Mac.

C++ Headers: https://github.com/PCSX2/pcsx2/blob/master/pcsx2/Frontend/SDLInputSource.h C++ Code: https://github.com/PCSX2/pcsx2/blob/master/pcsx2/Frontend/SDLInputSource.cpp

Then all that RPCS3 users would need to do is map their controllers to the ENV var using a tool like "SDL2 Gamepad Tool by General Arcade" ( https://generalarcade.com/gamepadtool/ ) for example.

If I was proficient at CPP I would give it a crack in creating a PR but unfortunately is not my forte.

miguelcobain commented 1 year ago

Tried the latest available mac build today with an 8BitDo SN30 pro+ controller. Still getting the GetCalibrationData failed error.

jcchikikomori commented 1 year ago

Tried the latest available mac build today with an 8BitDo SN30 pro+ controller. Still getting the GetCalibrationData failed error.

What mode are you using on 8BitDo? It should be working with PS4/DualShock Mode (Start + A buttons)

miguelcobain commented 1 year ago

@jcchikikomori I turned on the controller with Start + A button. Only the first LED is green, which tells me it should be on the correct mode. The bluetooth name is "DUALSHOCK 4 Wireless Controller" and connects normally. I still get these errors:

image

image

The same controller in the same mode works perfectly on PCSX2, for example, or on other mac games where gamepad is supported.

miguelcobain commented 1 year ago

@adrgumula I think this issue should be reopened, right? Otherwise people might get the impression that non-sony controllers should work on their macs. Or was this ticket specifically targeted for M1 macs?

adrgumula commented 1 year ago

@adrgumula I think this issue should be reopened, right? Otherwise people might get the impression that non-sony controllers should work on their macs. Or was this ticket specifically targeted for M1 macs?

I've tested on only on M1 mac (latest build form the https://rpcs3.net/) and it still works with my non-orgnial ps4 pad.

jcchikikomori commented 1 year ago

Maybe is there regressions or got misunderstood? Sorry, i don't have the M1 Mac anymore

oresttokovenko commented 1 year ago

Any update on Xbox controllers?

MSuih commented 1 year ago

Addition of SDL handler in https://github.com/RPCS3/rpcs3/pull/12822 should hopefully get many other controller types supported for mac. The PR is currently work-in-progress but the mac version does seem to at least compile so more adventurous persons could try it.

oresttokovenko commented 1 year ago

Addition of SDL handler in #12822 should hopefully get many other controller types supported for mac. The PR is currently work-in-progress but the mac version does seem to at least compile so more adventurous persons could try it.

Thank you, I'll watch that PR!

Megamouse commented 1 year ago

This should work now with SDL

miguelcobain commented 1 year ago

This still does not work with my bluetooth 8BitDo SN30 pro+ controller. The controller seems to be detected when on SDL mode, but it doesn't register any key presses, either in game or when re-mapping buttons.

Apparently other people are having similar problems https://github.com/RPCS3/rpcs3/issues/13089 ?

ilovesafaristand commented 1 year ago

EasySMX ESM-9110 USB wireless Bluetooth and cable not working on Intel Mac Nothing detected under SDL

rpcs3-v0.0.25-14517-310fa712_macos