..:: 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.
(03-21-2014, 12:07 PM)electrobrains Wrote: [ -> ]Edit: In regards to your in-Edit-proposal, I'm thinking I'd really just want the ability to overlay some lines indicating the touchpad zones and the borders between them. I'd want to move those lines around to indicate a different number of zones if a person wanted to use only 1 hotkey on the touchpad-push-gesture, as opposed to 2, 3, 4, 5, 6, 9, 12... What exactly did you have in mind?

I was only thinking of a very simple way for users to use their own DS4 pictures since not everyone has the same taste - I wouldn't want it to be some huge feature, just a quick <10min throw together since its not so difficult to do if its simple. Merely letting them pick the picture wouldn't be enough since the clicking of it to select each button is mapped out - they would need to be able to remap the locations of the buttons. Technically you could include touchpad zones in this if you wanted, the code would just have to account for it if you do. On that note, adding touchpad zones in any case would call for quite a few additions in the code, wouldn't it?

Edit: Apologies for the triple post, can't seem to delete.
(03-22-2014, 08:01 AM)HecticSeptic Wrote: [ -> ]As far as I can tell this is a design flaw. Sometimes the DS4 will incorrectly report that there is movement on one of the thumb sticks. This happens very rarely for me and the difference is negligible since it only happens when I'm not touching it and once I do it stops. It'll only be the very smallest amount it can go, and it won't stay one direction so it will look like jitter. One thing we can do is to implement a deadzone, which we can allow to be zero like it is now by default, and you can increase it if you're unlucky and got a bad controller.

Most games implement dead-zones. It's very, very strange that this extremely high-profile one doesn't.... But yes, it is jitter i.e. fluctuation at the quantum through microscopic levels. As there are four different independent thumbstick axes -- see http://www.techinsights.com/uploadedImag...ller-6.jpg -- we should have an ellipse-style jitter compensation level for each X1 Y2 X2 Y2, as each may be calibrated differently. I would smooth it out more by using a portion of the previous frame's value corresponding to the delta between the previous frame's sensor reading value and now (if it's a tiny change, it is more likely to be mostly jitter than if it is a big change); this would introduce minimal lag, and you could of course make the portion of the previous frame's value used be nothing after a certain point.

Once we have basic jitter-compensation algorithms in place for the extremely-sensitive thumbsticks, I could write us an automatic calibration procedure. Any of this should really wait for the new GUI so that its settings can be integrated sensibly... But I think it's very strange Titanfall doesn't let you change controller sensitivity!
(03-22-2014, 09:16 AM)HecticSeptic Wrote: [ -> ]Exclusive access (hiding the DS4 DirectInput) can only be obtained if nothing else is using it. Forcing Steam to let go of it (off the top of my head, as far as I know) would entail dodgy unsafe manipulation of its memory space (I don't believe its allowed either). Unfortunately the only way we can get exclusive access is to do so before Steam takes hold of it, unless Steam is kind enough to implement an option not to open all (or any) game controller devices.
That's a shame, unfortunately Valve is entirely unwilling to make steam more user friendly when it comes to big picture and controller support so that's not an option sadly. The biggest problem is having to restart a game to do anything involving turning on/off the controller.

Quote:DS4 Tool doesn't install any devices, it only emulates the XInput of an X360 Controller through the ScpVBus. The driver installed - the ScpVBus - is what is used to achieve the XInput emulation.
Where would ScpVBus be categorized? What are these peripheral devices that keep trying to install themselves when I connect the controller?

Quote:Sony did not make the most user friendly (or perhaps even reliable) BT connectivity with the DS4 through pairing. What you are aiming for is a 'Wireless Controller' in devices which has an available service in properties which you should enable. I mentioned a youtube link ages ago in this thread which helped me to pair it, see if you can find it as I think it might help you as well.
I did exactly that yeah! It seems to have done the trick, although all the tutorials tell you about using a "pairing" option in windows that just doesn't exist for me. Had to figure it out of my own.

Quote:I have not personally seen any evidence of memory leaks, despite running the wrapper overnight myself. While .NET provides us with Garbage Collection, preventing traditional memory leaks, there is still a risk of inefficient memory management which if serious can result in an Out of Memory exception (but I'm guessing you mean memory leak in purely the 'keeping something you're not using' sense). Since we do have some unmanaged platform invoking that would be one area where a real memory leak could happen. We would have to actually use Scitech's MemProfiler or similar (which I personally don't own) to really see, but could you elaborate on what circumstances this occurs? How often does it happen, if not so often then there should be something specific that triggers it?
Well if nothing happens it will probably not trigger the "leak", sorry for potentially having misused it there. I have a memory dump of the program (270 mb) if that's any help (I'm not even sure if it would pose a risk for me to give that out, maybe you could clarify?). I can't establish what the cause is myself so far, as I'll try to keep task manager up and see when it starts happening. I've - Oh wait.

I tried toggling the hide DS4 controller option on/off repeatedly and it's now increasing by about 1.5 megabytes per second. I'm sure the size of the log is related to the size of the increase per second. It doesn't stop when I clear the log, it doesn't stop when I stop the service. Closing the program doesn't end the process immediately when this is happening (took 20 seconds). I hope this can help you finding the issue, I'll keep monitoring the thread.

Edit: Tried the same thing, toggling on/off, doesn't seem to trigger it per se but related. Went into options to adjust some LED options and it was leaking by the time I saved and exited that. Still no actual trigger found, might be after reaching x memory, might be something with the options window, might be something with the hide DS4 controller option.

Edit 2: Was messing in the options window - noticed the Sixaxis Gyro/Accel Data meters going haywire. Leaking started happening again shortly after. Still not sure what the direct cause was. See gif: incredibly jittery and inaccurate, halfway through I twist and turn the controller and after that I start making circles with it.

Edit 3: Trigger seems to be... losing window focus? I can't make up any reason for this, but it started right at that point. The whole interface is lagging quite hard too and as seen in the image in my previous post, eats a whole CPU core. Unlike other programs DS4Tool.exe is steadily increasing memory over time, not like a tick per second.
(03-22-2014, 10:51 AM)cupcake420 Wrote: [ -> ]That's a shame, unfortunately Valve is entirely unwilling to make steam more user friendly when it comes to big picture and controller support so that's not an option sadly. The biggest problem is having to restart a game to do anything involving turning on/off the controller.

Where would ScpVBus be categorized? What are these peripheral devices that keep trying to install themselves when I connect the controller?

I did exactly that yeah! It seems to have done the trick, although all the tutorials tell you about using a "pairing" option in windows that just doesn't exist for me. Had to figure it out of my own.

Well if nothing happens it will probably not trigger the "leak", sorry for potentially having misused it there. I have a memory dump of the program (270 mb) if that's any help (I'm not even sure if it would pose a risk for me to give that out, maybe you could clarify?). I can't establish what the cause is myself so far, as I'll try to keep task manager up and see when it starts happening. I've - Oh wait.

I tried toggling the hide DS4 controller option on/off repeatedly and it's now increasing by about 1.5 megabytes per second. I'm sure the size of the log is related to the size of the increase per second. It doesn't stop when I clear the log, it doesn't stop when I stop the service. Closing the program doesn't end the process immediately when this is happening (took 20 seconds). I hope this can help you finding the issue, I'll keep monitoring the thread.

Edit: Tried the same thing, toggling on/off, doesn't seem to trigger it per se but related. Went into options to adjust some LED options and it was leaking by the time I saved and exited that. Still no actual trigger found, might be after reaching x memory, might be something with the options window, might be something with the hide DS4 controller option.

Edit 2: Was messing in the options window - noticed the Sixaxis Gyro/Accel Data meters going haywire. Leaking started happening again shortly after. Still not sure what the direct cause was. See gif: incredibly jittery and inaccurate, halfway through I twist and turn the controller and after that I start making circles with it.

Edit 3: Trigger seems to be... losing window focus? I can't make up any reason for this, but it started right at that point. The whole interface is lagging quite hard too and as seen in the image in my previous post, eats a whole CPU core. Unlike other programs DS4Tool.exe is steadily increasing memory over time, not like a tick per second.

Interesting. I wonder what would happen if you had a version with a change like this one integrated. The UI update scheme in DS4Tool is performing refreshes far too often, and that's why the cursor never disappears when you are in VLC. Sounds like there might be a leak (failure to unlink dead data from live data) during the UI update.

https://code.google.com/r/brianfundakows...4&name=1.3#

The sixaxis data readout was broken after 1.2. It has a very simple fix.
https://code.google.com/r/brianfundakows...8&name=1.3#
(03-22-2014, 09:24 AM)HecticSeptic Wrote: [ -> ]Technically you could include touchpad zones in this if you wanted, the code would just have to account for it if you do. On that note, adding touchpad zones in any case would call for quite a few additions in the code, wouldn't it?

Nah, it wasn't that hard to implement basic dual-zone support. Supporting more is just more of the same. I've planned this feature for two months; I am just not finishing implementing it yet because I don't feel like having options-related merge conflicts to contend with. There are still plenty of bugs to fix, like the disappearing UI one where it doesn't show up in the Task Bar proper or in the System Tray.
(03-22-2014, 08:01 AM)HecticSeptic Wrote: [ -> ]As far as I can tell this is a design flaw. Sometimes the DS4 will incorrectly report that there is movement on one of the thumb sticks. This happens very rarely for me and the difference is negligible since it only happens when I'm not touching it and once I do it stops. It'll only be the very smallest amount it can go, and it won't stay one direction so it will look like jitter. One thing we can do is to implement a deadzone, which we can allow to be zero like it is now by default, and you can increase it if you're unlucky and got a bad controller.

appreciate the response. my situation is a little diff as it happens when I'm using the sticks and doesn't correct itself automatically. it's as if the controller is moving itself and i feel like i'm losing control. any option I can check out to help? I see something called jitter compensation checked. would that help if it was unchecked?

This also happens for game OTHER then titan fall and I believe it's not related to deadzones.
(03-22-2014, 02:11 PM)delt31 Wrote: [ -> ]appreciate the response. my situation is a little diff as it happens when I'm using the sticks and doesn't correct itself automatically. it's as if the controller is moving itself and i feel like i'm losing control. any option I can check out to help? I see something called jitter compensation checked. would that help if it was unchecked?

This also happens for game OTHER then titan fall and I believe it's not related to deadzones.
That setting is only related to touchpad motion of the mouse cursor. You should run a program like the Xinput tester that InhexSTER posted in the original post of the thread, and tell us what ranges of values you actually get for your thumbsticks. If it does it in the games, it is going to do it here, too. If you are not using Hide DS4 Controller mode, it may be trying to use both the original HID and the Xinput controls at the same time. Try starting fresh without DS4Tool and see what it does with the controls, if anything.
(03-22-2014, 02:44 PM)electrobrains Wrote: [ -> ]That setting is only related to touchpad motion of the mouse cursor. You should run a program like the Xinput tester that InhexSTER posted in the original post of the thread, and tell us what ranges of values you actually get for your thumbsticks. If it does it in the games, it is going to do it here, too. If you are not using Hide DS4 Controller mode, it may be trying to use both the original HID and the Xinput controls at the same time. Try starting fresh without DS4Tool and see what it does with the controls, if anything.

I don't believe I've checked the hide ds4 controller so I can try that although when I check those settings they never stay once I open and close the app. I will try it out thought to see if it at least works. thanks!
(03-22-2014, 01:36 PM)electrobrains Wrote: [ -> ]Interesting. I wonder what would happen if you had a version with a change like this one integrated. The UI update scheme in DS4Tool is performing refreshes far too often, and that's why the cursor never disappears when you are in VLC. Sounds like there might be a leak (failure to unlink dead data from live data) during the UI update.

https://code.google.com/r/brianfundakows...4&name=1.3#

The sixaxis data readout was broken after 1.2. It has a very simple fix.
https://code.google.com/r/brianfundakows...8&name=1.3#

Nice, I love that. Although I've never actually used ds4tool and VLC at the same time so I didn't notice that problem; but I'm wondering if this problem is related because there is a specific trigger that causes it to happen (I'm too inexperienced in C# to be able to read the changes properly)
Is there a solution when the PC totally freeze and crash (and you need to hard reboot) just after starting ScpServer ?

That was working perfectly until today, I can't even start ScpServer, everything freezing and I need to hard reboot.

The only thing I did before the first crash is some modifications with the administrators rights, but I tried to adjust the administrators settings like before but it's still crashing when I start DS4 tool...

Someone know how to solve this issue ?

Im using DS4 Tool 1.3 RC3 and im on Windows 7 64 bits.

Btw it works better when you re-pair the controller by Bluetooth but its still crashing sometimes. For example when I try to check "Hide DS4 controller" while the controller is connected or some random times when I just start the soft...