..:: PCSX2 Forums ::..

Full Version: DS4 To XInput Wrapper
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
(01-17-2014, 07:06 PM)electrobrains Wrote: [ -> ]Go back from this page just a little and you'll find the 1.1 version that I puit out. Give that a shot, it works flawlessly for me with Final Fantasy.


Actually I already tried it before I posted my problem.

The problem for me is that no controllers are shown in the ScpServer tool. I do not have xbox360 controllers configured for my computer, I have never used them and I can't install the driver and therefore I only see this "Wireless controller" in my Game Controllers list, but no XBOX 360 controller entry.

Can this be a reason if I have started and installed the ScpDriver multiple times?

Or maybe some other requirements which are not fulfilled?
Microsoft .NET 4.0 (I have 4.5 .NET. is it okay or does it have to be 4.0?)
Visual C 2010 Runtime. (not sure if i have this, I have VS2012 installed and c++ 2010 x86 redistributable and VS 2010 tools for office runtime for example)
Latest DirectX Runtime. (not sure about this one also, but I presume it exists as I have FIFA 14 installed)
Latest Official Microsoft Xbox 360 Controller Drivers available. (and this is the one I definitely do not have)
Minimum of Bluetooth 2.1 + EDR Dongle (if using Bluetooth). (don't need it)
Administrator rights on your PC. (have it)


So I guess the problem is first and foremost with the xbox controller driver, not these driver versions I have tried from this forum.
Hi guys,

as I didn't really have much of a delay or connection conflicts issues, I am just waiting to see any "touchpad enabled without mouse buttons" build before downloading (or at least, using other buttons instead of the shoulder ones to emulate mouse).

As far as I've read, no build has made any changes in that aspect. Or has it?
Just checked v1.1.1 using USB connection.
Hot plugging isn't working, need to Stop/Start every time when DS4 is unplugged and plugged in by USB. Not critical issue though.
100-200 msec input latency with "Open native devices for exclusive access" flag (tested in MK9)
No latency, ideal response with no "Open native devices for exclusive access" flag, but i've spotted double input issue, just pressed dpad up and down in main menu and it often moves twice. But I can't cause that issue again now. Im going to test it more.
(01-17-2014, 09:16 PM)InhexSTER Wrote: [ -> ]First the reason for asynchronous I/O. Since we sending report to controller LED/Rumble and it's happening after each input iteration it's not important to wait for success status, because there is around 8ms delay for sending/receiving the signal in best conditions i witnessed. When signal worsens the input/output delay becomes longer. Therefore, Read/Write will wait longer to return the status.
FileSteam has ability to do ReadAsync which is implemented only in .NET 4.5
So task where used which is a way async jobs work in 4.5

ReadFile will wait indefinitely for correct input to be present.

Second point to arrive at this conclusion i spent few weeks testing multiple controllers/dongles/OS's using different methods, (in game, usb sniffer and bt sniffer).

Also, usage of FileStream provided me with better results, more responsive input (analog stick sensitivity and so on). I believe it's due to large size of input report with BT (i think hid report size is incorrectly detected by default driver, because majority of BT report is "0')

Also i've been using DS4 with PS4 and i can say that the input sticking and signal issues exist there too.

You don't need any kind of ReadAsync, this is the API we should use if we want cancellable I/O:
http://msdn.microsoft.com/en-us/library/...s.85).aspx
This can be combined with making the GUI thread also perform watchdog functionality and have very little performance cost versus using a Task, which requires memory allocation each time.

Can you show me how you measured latency? I don't know that sending the data should actually pause waiting for a response. Now, I didn't actually modify the transmission timeout for USB at all, that's still there, and I don't really intend to try that hard to improve USB support because that's just simply not Sony's normally-supported method of controller connection. I expect there will be random USB-only bugs that are not present on the canonical Bluetooth interface.

I do intend to fix the dual-detection bug where you get both a USB and a Bluetooth instance at once. What tools have you found to do Bluetooth sniffing?

Check out this page btw, first paragraph:
http://msdn.microsoft.com/en-us/library/...s.85).aspx

(01-17-2014, 11:45 PM)Rocquito Wrote: [ -> ]Hi guys,

as I didn't really have much of a delay or connection conflicts issues, I am just waiting to see any "touchpad enabled without mouse buttons" build before downloading (or at least, using other buttons instead of the shoulder ones to emulate mouse).

As far as I've read, no build has made any changes in that aspect. Or has it?

I'll add pad-click support soon, and remove shoulder button click support, in my branch of the DS4 Xinput Mapper, and just have a pad enable/disable setting. I don't know of any games or applications where you'd want to use controller support and still use right-clicks. My priority is making the latency issues disappear first.

(01-17-2014, 11:17 PM)nismo44 Wrote: [ -> ]Actually I already tried it before I posted my problem.

The problem for me is that no controllers are shown in the ScpServer tool. I do not have xbox360 controllers configured for my computer, I have never used them and I can't install the driver and therefore I only see this "Wireless controller" in my Game Controllers list, but no XBOX 360 controller entry.

Can this be a reason if I have started and installed the ScpDriver multiple times?

Yes, install the XBox 360 controller drivers, then install the SCP virtual bus drivers.
(01-18-2014, 12:22 AM)delite Wrote: [ -> ]Just checked v1.1.1 using USB connection.
Hot plugging isn't working, need to Stop/Start every time when DS4 is unplugged and plugged in by USB. Not critical issue though.
100-200 msec input latency with "Open native devices for exclusive access" flag (tested in MK9)
No latency, ideal response with no "Open native devices for exclusive access" flag, but i've spotted double input issue, just pressed dpad up and down in main menu and it often moves twice. But I can't cause that issue again now. Im going to test it more.

This doesn't really sound like double-input. You absolutely need to confirm the game is attaching two devices if you want to say it's double-input and not stutter, and that's not necessarily easy. It does sound like it's USB that has weird timeout-related issues, not Bluetooth. I'll take a look at USB-related issues eventually, but it will be my absolute last priority. USB is not a manufacturer-supported interface for the DualShock 4 /except/ for charging.

BTW thank you very much for testing.
(01-18-2014, 01:10 AM)electrobrains Wrote: [ -> ]This doesn't really sound like double-input.
It does. Just launched MK9 again and hold down "Down" button in menu - cursor moves twice. Then I go "Practice" for example, and MK9 asks to press any button on the controller that I would like to use. I press any button on DS4, it shows me a picture of xbox360 controller and the game starts. There's no double input after that action until exit to main menu, so I think that any double input issues = multiple controllers visible by Windows, not software issue.
To prove it, I've launched XInputTest from x360ce and yeah, Controller1 and Controller2 are present and each one works.
Then i've launched x360ce and there 2 controllers. First one is "Controller (XBOX 360 For Windows)", the second one is "Wireless Controller". Bluetooth adapter is disabled in Device Manager though.
Something causes double controllers, I'll check it. I think everyone with "double input" issue has the same.

And yeah, i've played MK9 and still spotted "sticky buttons bug". But it's not a clean test because there are two virtual controllers and maybe something wrong with it that causes sticky input.
I've got a new version for testing. The only difference is that I've removed the redundant retransmission of the output state (LED, rumble, etc.) when it has not changed, rather than transmitting it after every single input received over USB/Bluetooth. I've tested it with both USB and Bluetooth and I don't see any problem. By the way, the touchpad jitter problems seem to be entirely gone now that I've (presumably) fixed the fastpath.
(01-18-2014, 01:05 AM)electrobrains Wrote: [ -> ]Yes, install the XBox 360 controller drivers, then install the SCP virtual bus drivers.

As I said in the first post, the problem with these was that the install threw an error every time. Fortunately, after completing a pending chkdsk it somehow worked.

So i got the XBox360 drivers installed, got the scpserver program working and the DS4 is fully responsive from Windows.

But I see both 'Wireless controller' and the XBox 360 controller in the Game Controllers interface in Windows and there is the dual input problem in FIFA14.
I am using the DS4 with Micro USB and although I have noticed that this is a common problem, I haven't found a correct solution to this. And I can't try bluetooth because I don't have the possibility for that Laugh

Anyway, I've added a screenshot (actually a photo Laugh) as an attachment from FIFA about the double input. I have only 1 controller connected of course.

[attachment=48240]
(01-18-2014, 02:39 AM)nismo44 Wrote: [ -> ]But I see both 'Wireless controller' and the XBox 360 controller in the Game Controllers interface in Windows and there is the dual input problem
Yeah, I've just disconnected DS4 USB and turned it off, but XBOX Controller is still available in the system and responds to x360ce (packet counter)
It's kinda normal because it uses SCP Bus and reacts as virtual controller, registers input from the real one called "Wireless controller". But the game thinks there 2 real controllers
Guys I added the exclusive/shared mode switch. If you're getting double input over Bluetooth then check the box so you get the same exclusive behavior as 1.1 Beta 3.