Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add PS4 controller input driver. #60

Closed
benvanik opened this issue Jan 10, 2014 · 14 comments
Closed

Add PS4 controller input driver. #60

benvanik opened this issue Jan 10, 2014 · 14 comments

Comments

@benvanik
Copy link
Collaborator

Not sure what this requires, but it'd be nice to support them. Going forward they may be easier to support than 360 pads as (in theory) in OSX 10.9 they just work.

@DerekTurtleRoe
Copy link

DS4 Tool is open-source and has like a million forks, you could use that. You wouldn't have access to the touchpad (I'm working on that), but everything else would be good. Doesn't the 360 controller work on OS X? I have friends who use it for Steam and emulators and such, but do you need special software or something?

Also, how does OS X interact with input devices? Is it like Windows with DirectInput and XInput and then generic HID stuff? I'm use to just making emulators support DirectInput and XInput and calling it a day. LOL.

@DerekTurtleRoe
Copy link

Actually, now that I have dug through the source, you do have access to the touchpad, LED, and even some of the motion features.

@benvanik
Copy link
Collaborator Author

IIRC (but it's been a year or two) there is a HID-like API on OSX, but it's pretty gnarly and finding good sources of documentation are hard (most are poorly written and only work with specific devices). Someone may have a good solution out there now and I'd love to reuse it and check this off the list :)

@benvanik
Copy link
Collaborator Author

OSX support being deemphasized for now; but Windows/Linux PS4 pad access would be nice.

@DerekTurtleRoe
Copy link

I figured, Mac support these days is a real pain. Even for somebody who has done it before! I remember trying to compile my NES emulator for Mac. That was the worst week and a half of my life!

@benvanik
Copy link
Collaborator Author

benvanik commented Jan 2, 2015

Yeah - Apple hasn't been keeping up with graphics tech, and we need crazy new stuff. If they ever decide to give some love to OSX it shouldn't be too hard to port whatever works on Linux over. You know, if I ever get around to that ;P

@DerekTurtleRoe
Copy link

It's funny that they have a 5K iMac, but no good GPU tech support. LOL.

I have some Linux experience (a whole hell of a lot more than Mac support, that's for sure!), so I may be able to help with the port if you need anything. The only problem is my CPU is not an AVX2 compatible chip, so I can't test anything I write, I would have to rely on others. I just spent a crap ton of money upgrading my PC too. 😭

@neil-dot-ca
Copy link

@vgturtle127: Can't you use this ? never tested it but worth trying may be, even if it's software emulation, https://software.intel.com/en-us/articles/intel-software-development-emulator/

@DerekTurtleRoe
Copy link

@sasukedotca Huh, I had never heard of such a thing. I suppose I could try it, but I'm not sure how it works or how it would affect things like performance or my current setup. I will look into it, but I don't have an extremely fast PC, so it may not even work in the long run anyway.

@hlide
Copy link
Contributor

hlide commented Oct 6, 2015

Intel SDE is built upon the Pin dynamic binary instrumentation system and the XED encoder decoder. Pin controls the execution of an application. Pin examines each static instruction in the application approximately once, as it builds traces for execution. During this process, which is called instrumentation, for each instruction encountered Pin asks Intel SDE if this instruction should be emulated or not. If the instruction is to be emulated, then Intel SDE tells Pin to skip over that instruction and instead branch to the appropriate emulation routine. It also tells Pin how to invoke that emulation function, what arguments to pass, etc.

As you can see, it is more and less like a just-in-time partial dynamic recompilation. So the more your cpu is recent, the less instructions are emulated. So if your cpu has AVX but no AVX2, it only needs to emulate AVX2 instructions. The only drawback is it needs to instrument the instructions when first encountered (slow process).

@DerekTurtleRoe
Copy link

Alright, that makes sense. I wonder if Intel has ever considered a sort of Dolphin-esque cached recompiler? Maybe that would speed it up? I will give it a try when I finish upgrading to Windows 10 and updating all my dev tools and what not.

@mirh
Copy link

mirh commented Feb 9, 2016

You'll need to support DirectInput under Windows then
In linux it should be just about plain joystick api
as for osx.. I believe you have to pass through IOHID.

@DerekTurtleRoe
Copy link

@benvanik I am doing some research on the DS4 here:

Jays2Kings/DS4Windows#17

Just in case you are interested...

@Margen67
Copy link
Member

Margen67 commented Mar 5, 2020

Fixed by #1493.

@Margen67 Margen67 closed this as completed Mar 5, 2020
halotroop2288 pushed a commit to halotroop2288/ainex that referenced this issue Jan 24, 2021
Changed the line to reference issue xenia-project#1333 instead.
gibbed pushed a commit that referenced this issue Feb 1, 2021
Changed the line to reference issue #1333 instead.
mkwong98 pushed a commit to mkwong98/xenia that referenced this issue Jan 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants
@hlide @benvanik @DerekTurtleRoe @Margen67 @mirh @neil-dot-ca and others