..:: 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.
(02-12-2014, 07:40 PM)HecticSeptic Wrote: [ -> ]Hi guys, seems the way keys are handled don't quite emulate the keyboard just right yet. I will need to experiment on a few games, but this appears to be the case at the moment: When a mapped key is pressed this does a key down event for windows, however releasing it does not trigger a key up event (usually it doesn't need to).

Would have to see how easily I can perform the right key up events without taking up unnecessary memory or adding any latency - if I cannot, I suppose I could add an option, either per control or per controller, whether it should trigger on both the start and end of a press or only on the start.

Will see if I can take a look tonight still.

Hi there,

I have implemented a key up event for each emulated key press. Please see if you still encounter any issues in games that expect to see this event. I also increased performance a bit and fixed the odd transparent border around the DS4 images.

Other things I'll look at later: (remind me if I missed something?)
- Make sure real-time color setting changes are consistent.
- Change X-Y axis mapping to direction based mapping
- Sixaxis custom mapping
- Click DS4 image to select mapping drop down lists
- Custom thresholds for Axis-type custom mapping
- Include right click and middle click custom button options*
- Turn off controller button & 'after x minutes of no activity' setting
- Make settings per actual controller and not per order turned on
- Allow more than one controller to use the touch pad
- Touch pad pinch zoom (not high priority)
- Store the Custom Color collection in the Color Chooser

*Note: If anyone feels confident manually editing the custom mapping XML, you can use middle click and right click now already with:
<cb[controlName]>[a number]</cb[controlName]>
- right click is 2 and middle click is 4
(02-13-2014, 04:36 PM)Kugelblitz Wrote: [ -> ]Edit: After completing DS and quitting the SCP app, when I decided to return, the controller was no longer recognised in hidden form, meaning I'm back to trying to fix it.
Seems like it was merely a temporary fix.

Edit 2: Got it working again, and this time I've presented an image:
[Image: hp9hnfat1]

If you're referring to the status messages in your image, then yes, the application restarts the controller when you change 'Hide DS4 Controller'.

What would be more helpful is to see your Game Controller window (search for Setup USB game controllers in your
Start menu) when Hide DS4 Controller is checked and unchecked. What it should do is hide the generic DS4 controller and only show the virtual XInput controller.

Fortunately this functionality is possible through Windows' kernel API. All that checkbox does is determine what kind of 'share' mode we ask for. If 'Hide DS4 Controller' is not checked, we ask to share with the original HID Device. Otherwise we do not ask to share - which conveniently hides the old controller.

TLDR: Here's the interesting part. Version 1.1 Beta 2 (which works for DS) enforces Hide DS4 Controller (does not give you the option). So if your 'Hide DS4 Controller' checkbox is checked, then it does the same as Beta 2 did.
The Dark Souls is quite buggy port from consoles. So don't expect it to work flawlessly.
Before starting Dark Souls make sure:
xinput*.dll is not present in your game folder (having X360ce will break things)
You have started the tool with Hide DS4 Controller on
In Devices and Printers from Control Panel (Game Controllers menu) make sure that X360 Controller is only one visible)
At this moment we do not support running DS3 and DS4 simultaneously, so make sure only DS4 is connected

The X360 Controller supports both Xinput and DirectInput so its up to game which one to use

I am 100% positive that everything works if you do everything correctly.

Please, before asking read 1st post carefully, it has info/link that explains everything you need to know about Hide DS4 Controller checkbox.
I am tired of seeing people asking same question about dual input over and over.
(02-13-2014, 05:18 PM)HecticSeptic Wrote: [ -> ]If you're referring to the status messages in your image, then yes, the application restarts the controller when you change 'Hide DS4 Controller'.

What would be more helpful is to see your Game Controller window (search for Setup USB game controllers in your
Start menu) when Hide DS4 Controller is checked and unchecked. What it should do is hide the generic DS4 controller and only show the virtual XInput controller.

Fortunately this functionality is possible through Windows' kernel API. All that checkbox does is determine what kind of 'share' mode we ask for. If 'Hide DS4 Controller' is not checked, we ask to share with the original HID Device. Otherwise we do not ask to share - which conveniently hides the old controller.

TLDR: Here's the interesting part. Version 1.1 Beta 2 (which works for DS) enforces Hide DS4 Controller (does not give you the option). So if your 'Hide DS4 Controller' checkbox is checked, then it does the same as Beta 2 did.

Ah, allow me to explain myself...

I thought the image was significant because I thought it conflicts with the intention of the developer.
When I saw the developer's explanation of what hiding the DS4 controller does, I immediately raised an eyebrow, for he stated "This makes it disappear from the list of controllers."
Now, unless I have misunderstood it, my image demonstrates that may not be case. I merely thought that it might be an interesting point to raise.

And as for requests, (with the recent things I've done) it works basically as you had expected. When hidden is selected, only the 360 controller shows.

But I'll let you know how things are when the controllers decides to act strange again.
(02-13-2014, 05:54 PM)Kugelblitz Wrote: [ -> ]When I saw the developer's explanation of what hiding the DS4 controller does, I immediately raised an eyebrow, for he stated "This makes it disappear from the list of controllers."
Now, unless I have misunderstood it, my image demonstrates that may not be case. I merely thought that it might be an interesting point to raise.

Hi Kugelblitz,

The 'list of controllers' looks like this:
[Image: Microsoft-Windows-7-Game-Controllers.jpg]

This window, which you find by searching "Set up USB game controllers", is not shown in your image. So yes, I believe you misunderstood the description. Does it make sense now?
Hello,

I searched for a while but couldn't find what I need help with. I followed all of the directions up until I got to the point where I have to click on "scpserver" and nothing happens. I tried several different versions of the download (1.1 beta1 / 1.1 beta 2 / 1.2 etc) and nothing seems to work. I opened task manager to see if scpserver was attempting to launch, and it does, but then disappears from services tab under task manager. The program itself never opens. I am running Win7 64bit. Any help would be great. I have seen throughout the forum where ppl have stated that "it doesn't work for me" or "program won't launch" but I don't see solutions to the issue. TIA for your time...

***Edit could the scpserver app be conflicting with something else I may have running on my PC? Anyone have any ideas?
(02-13-2014, 06:16 PM)HecticSeptic Wrote: [ -> ]Hi Kugelblitz,

The 'list of controllers' looks like this:
[Image: Microsoft-Windows-7-Game-Controllers.jpg]

This window, which you find by searching "Set up USB game controllers", is not shown in your image. So yes, I believe you misunderstood the description. Does it make sense now?

Ah, I thought he meant the list from the SCPserver (in the upper left on the program), because when I chose to hide my DS4 it would also disappear from the SCPserver list of connected controllers (when it was acting strange).

My mistake.

As I've stated earlier, it behaves on that list (the one you've mentioned) exactly as you had expected.
(02-13-2014, 06:26 PM)Sorcoan Wrote: [ -> ]Hello,

I searched for a while but couldn't find what I need help with. I followed all of the directions up until I got to the point where I have to click on "scpserver" and nothing happens. I tried several different versions of the download (1.1 beta1 / 1.1 beta 2 / 1.2 etc) and nothing seems to work. I opened task manager to see if scpserver was attempting to launch, and it does, but then disappears from services tab under task manager. The program itself never opens. I am running Win7 64bit. Any help would be great. I have seen throughout the forum where ppl have stated that "it doesn't work for me" or "program won't launch" but I don't see solutions to the issue. TIA for your time...

***Edit could the scpserver app be conflicting with something else I may have running on my PC? Anyone have any ideas?

Could be something missing in your system, a library or something
Make sure Windows is up to date
.NET 4.0 is installed
X360 drivers from MS site
lates DirectX
Scp virtual bus driver installed

With this i was able to get this working on Win XP. So if it's still not working then it something wrong with your windows installation
(02-13-2014, 06:16 PM)HecticSeptic Wrote: [ -> ]Hi Kugelblitz,

The 'list of controllers' looks like this:
[Image: Microsoft-Windows-7-Game-Controllers.jpg]

This window, which you find by searching "Set up USB game controllers", is not shown in your image. So yes, I believe you misunderstood the description. Does it make sense now?

Hey Hectic,

It is me...again. Forgive me for being a pain, but I now possess images of when the program is acting strange for me.

[img][Image: Image.jpg]
screen capture[/img]

Notice how the controller is completely not recognised on the manager when hidden? While it was last time (that image is on the previous page)

Even when the controller is not hidden, no 360 pad appears on the list.


[img][Image: Image2.jpg][/img]

A reinstall is likely to fix it, as it has done so many times, but any idea what suddenly makes the controller no longer recognisable after a certain amount of time? Is it possible Dark souls is having a negative effect in any way?

It's not too much of an inconvenience, for overall the software is great.
(02-13-2014, 08:47 PM)Kugelblitz Wrote: [ -> ]Hey Hectic,

It is me...again. Forgive me for being a pain, but I now possess images of when the program is acting strange for me.

...

Notice how the controller is completely not recognised on the manager when hidden? While it was last time (that image is on the previous page)

...

Hi again,

Have you tried to turn off the steam client, then restart the app to try again? I mean properly turn steam off (check task manager).

I remember InhexSTER mentioning on the first post that some applications (like Steam, TS3 (I've seen this personally)) only allow sharing access to the controller. So you have to turn the XInput version of the controller on before turning on those programs.