..:: 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-07-2014, 06:24 AM)ElPoep Wrote: [ -> ]have you tried configuring Project 64?

Yup it works fine for me. I am assuming since a 360 controller isn't showing up for you in the Devices and Printers section that it also isn't showing up P64's drop-down menu for controllers?
(02-07-2014, 06:27 AM)BravoGangUS Wrote: [ -> ]Yup it works fine for me. I am assuming since a 360 controller isn't showing up for you in the Devices and Printers section that it also isn't showing up P64's drop-down menu for controllers?

I went to Gamestop and bought a used 360 controller (wired and yes, I kept the receipt). I pugged it in and it appears it took the drivers.

I DELETED the Xinput1_3, connected to controller via bluetooth (no dongle) and it worked!

Thanks for the feed back guys!
(02-06-2014, 09:19 PM)Scarlet.Crush Wrote: [ -> ]@InhexSTER:
@electrobrains:

Are you aware that introducing a virtual mouse/touchpad/keyboard driver, which allows bypassing of UAC / Ctrl+Alt+Del physical device presence via software, would severely compromise security?

--

IntPtr pDevicePathName = new IntPtr(IntPtr.Size == 4 ? detailDataBuffer.ToInt32() + 4: detailDataBuffer.ToInt64() + 4);

can be replaced with -

IntPtr pDevicePathName = detailDataBuffer + 4;

Err... no, allowing the user to use an input device is not compromising security. Pairing does not happen automatically without user feedback. I don't understand what attack vector you are proposing, but allowing a user to use a DS4 as a mouse is no more inherently dangerous than allowing a user to use a Bluetooth mouse. What are you talking about?

BTW, I have very broad security experience, including performing privilege-separation via IPC boundaries, use of least-privilege in each compartment, etc. Here's one for you: did you realize that if you expose the motion sensors as HID axes, browsers may be able to read them in real-time with such high granularity that, if the DS4 is set next to your keyboard, they could perform keylogging through pure MEMS data and nothing else? ECMAScript interpreters generally allow you to access any tilt sensor data without prompting you for permission. There is a lot more complexity here than I think you realize. Windows API and drivers are not the half of it.

Oh, and from our discussions the other night, we're making DS4 Mapper 2.0 always run as Administrator. No standard-permission program will be modifying it to get to the UAC. It won't be accepting network connections, merely reading XML files -- using the system XML parsing libraries, not something hand-rolled and buggy. The only remaining thing I can think of account for is making sure the directory for DS4 Mapper requires Administrator permission to write to, so no one sticks modules in there if they aren't already capable of pwning the system.
I have a suggestion, maybe someone can implement it. Can we have this run as a service?
I love being able to use Scarlet's program, and resuming from sleep and just pressing the psbutton and have it connect. and if i want to disconnect i can, and reconnect an infinite number of times. it just works, like how it would on the ps4. No program to run always, it runs in the backround. Has a program called scpmonitor to configure settings, but is not required to be run.
@electrobrains: attack vector -

The "physical device" presence requirement is not met because the DS4 does not need to be connected in order to use your virtual mouse/touchpad/keyboard driver - this should be evident to anybody who knows anything about security.

1. Malicious software runs on users machine.
2. Software attaches to the virtual mouse/touchpad/keyboard driver your software has installed.
3. Launches any software they want.
4. Bypasses UAC by sending a mouse click via your driver to the UAC dialog.
5. Sends any keystrokes required to accomplish what they want.

Let's say for instance they installed a service, then created a new user with admin privileges and created a firewall rule to allow remote access to the service they created.

=> your machine completely compromised.

Very simple scenario for even a moderate hacker to accomplish.
Hey, I have a suggestion for your program.

Have profiles for fullscreen games, and colours for the lightbar. Like it would be cool if when I launched fallout the lightbar turned green, or if I launched bf3 it turned blue. Something like that. Thanks for the program and your work otherwise!
(02-07-2014, 09:19 AM)Scarlet.Crush Wrote: [ -> ]@electrobrains: attack vector -

The "physical device" presence requirement is not met because the DS4 does not need to be connected in order to use your virtual mouse/touchpad/keyboard driver - this should be evident to anybody who knows anything about security.

1. Malicious software runs on users machine.
2. Software attaches to the virtual mouse/touchpad/keyboard driver your software has installed.
3. Launches any software they want.
4. Bypasses UAC by sending a mouse click via your driver to the UAC dialog.
5. Sends any keystrokes required to accomplish what they want.

Let's say for instance they installed a service, then created a new user with admin privileges and created a firewall rule to allow remote access to the service they created.

=> your machine completely compromised.

Very simple scenario for even a moderate hacker to accomplish.

You truly did not read what I wrote. We're not doing network IPC. Flat XML files will communicate state and desired state changes. It is completely possible to make secure software given a proper design from the start. Why in the world would I install a virtual input driver for HID keyboards/mice/etc. that allows a non-Administrator permission? How much of a novice do you take me for? Jesus.
(02-07-2014, 01:54 AM)raptor1138 Wrote: [ -> ]Hey HepticSeptic, I tried your new version and it can find my controller now and everything's working great, except that it doesn't register when the touchpad is released, and so when I click it thinks I'm still holding it. Love your modification so far though.

Also custom colors are not saved.
(02-07-2014, 12:58 AM)nb623107 Wrote: [ -> ]I like the extra options, although I am having a few issues with your custom version. First, I assume this is built off of the v1.2 from InHexSTER? On your custom build I cannot click with the trackpad. For me, using Bluetooth, it appears to click down on an object, but does not recognize the lift off. Like it is stuck on click & drag. Right-click seems to work though.

My only other complaint though is that the two-finger scrolling is a bit harder to do compared to the regular v1.2. On yours my fingers must be RIGHT next to each other, basically touching. On InHexSTER's version, as long as there are two fingers present the spacing doesn't seem to matter. I think it is a little more natural feeling.

I do love the color wheel option though, makes finding a custom color very easy to find. I'm going with an orange color currently because it is more subtle, and easier on the eyes. Then I Imake it darker - almost barely lit.

Hi there, thanks for trying it out. I actually noticed the click issue last night and fixed it then, but didn't bother to upload it Smile

The two fingers being close to each other is on purpose, as it will soon need to differentiate between scroll and zoom (pinch). I did increase it a bit so that they do not have to be Right next to each other, and will later add a setting to let it be personalised.

Here it is.

Edit:
I can save the custom colors, although the practice we're using for settings is quite atomic, so adding it might be a bit cluttery - I could just begin using the built-in application settings which I think we should eventually anyway.
Again just for clarity, with the two-finger scroll, when it is customizable you will be able to turn pinch zoom off completely (setting it at 0) which will make the two-finger scroll work no matter how far apart your fingers are. You could also hypothetically turn off two-finger scroll to make zoom work for smaller values. For these to work together there does need to be a balance, but I believe that balance should be user customizable.
@electrobrains:

Quote:Additionally, the output side will have 1-4 Xinput devices, that we already know. But I will be adding support for REAL virtual input devices, rather than the synthetic events system that is very limiting. So we need one or more devices represented other than just the Xinput devices, that will act as keyboards/mice/touchpads/tablets.

Quote:Please don't put too much work into this. Windows is going to handle the mouse clicking and tapping and dragging and zooming and everything soon, we'll just expose a native virtual touchpad device. For what would be useful in the time being:

Quote:Why in the world would I install a virtual input driver for HID keyboards/mice/etc. that allows a non-Administrator permission? How much of a novice do you take me for? Jesus.

So any software that uses the input from your virtual input devices has to run elevated, is that what your saying? [ie the users shell, any game which uses hardware mouse]

I don't know you from Adam, I asked a question and tbh am not convinced by your responses.
(02-07-2014, 06:04 AM)gdome Wrote: [ -> ]I'm having an issue where holding down a button registers it as a normal press rather than long press. Anyone else encountering this?

Could you elaborate on what kind of long press you are expecting? Each of the buttons which are mapped to the XInput device (the Xbox 360 Controller) are either pressed or not pressed, and for the axis (L2/R2/LeftStick/RightStick) has a value showing how pressed it is. If you're referring to one of these then you'll likely encounter the same issue on an actual Xbox 360 Controller?

For clicking on the trackpad, there is no long press as such, just the start of a click, and the end of a click. Right click starts and ends immediately no matter how long you hold it. This is mostly since there's rarely any need for a long held right click, and adding it in would add another layer of potentially useless complexity.