XInput Wrapper for DS3 and USB Dual DS2 Controller
Nice! That looks simple enough. Laugh

Though when I was thinking about an API, I was thinking in an alternative to XInput completely. Then having XInput for X360 controllers and your API for Sony controllers.

Now to put this in Pokopom...

#EDIT: Under what license is that source?
[Image: nbKSK.jpg]

Sponsored links

@KrossX: turned out it was just the simplest way to expose the functionality, since all the infrastructure was there to support it.

You are free to use any of the source as you see fit.
I made a quick attempt, if someone can test it (included nice padtest.elf) that would be nice. Cuz me haz no compatible devices for this filter.

I haven't checked the source properly, and I'm afraid I'm too sleepy to do so at the moment. I've assumed it still uses the XInput macros for return values and... my question: How does it deal with present X360 controllers? The main reason I was thinking of another API was to easily know what it's being used like calling XInput functions for index 0 and Scarlet functions for index 0 and know I'm dealing with the first X360 and DS3 controller respectively. And with that, also having a max of 8 pads as opposed to just 4 with XInput.

My that ended up rather long.... sorry. =S

Attached Files
.zip (Size: 115,58 KB / Downloads: 800)
[Image: nbKSK.jpg]
Tested on PCSX2 r5350 - looking good.


A few issues

1. DPAD Up & Down pressures seem to be swapped.


2. PCSX2 crashes if I enable Analog on PAD2.
3. Scroll Lock on my keyboard flashes.

[Using the padtest.elf with LilyPad-SCP doesn't have these issues]

If no DS3/Speedlink Strike FX/DS2 is found it runs in passthrough mode by loading the real XInput1_3.dll in Windows\System32.
Yeah, it was totally backwards. Fixed it and added the mask.

As for the analog, it would indeed seem to be stuck in digital mode from your screenshots but I cannot reproduce it. And why it would crash, no idea either. =S

I tried pluggin/unpluggin, changing port settings and all, and I couldn't get controller 2 to be digital. And since it gets set to analog and locked, the analog key is useless on my testing. >_<

-. So, if I have 1 X360 and 1 DS3, the DS3 takes index 1 or 0 ? If the latter, is the X360 redirected to index 1 ? So as to have both controllers available from XInput that is.
[Image: nbKSK.jpg]
Tested again this afternoon and I no longer get a crash.


If you have 1 DS3 and 1 X360 plugged in, DS3 would appear on Index 0 - X360 would not be usable.

If you unplug the DS3 and restart the application, the X360 would appear on Index 0.

DS3 or X360, not both.

I could look into always loading the passthrough, and enumerating X360s first (since I don't have control of the Led indicators) then looking for DS3s. Then you could have both.
Suggestion then!

How about with priority on the DS controllers, to use the remaining ports if any left for X360 controllers starting at index 0 (no matter the lights).

That way, you can have 4 player coop with 2 DS3 and 2 X360 controllers. Index 0 and 1 for DS3 and index 2 and 3 for X360 controllers. When the application calls for index 2 and 3, you simply redirect to the real XInput as index 0 and 1.
[Image: nbKSK.jpg]
if this is anything like x360ce, the order is determined by the order in which you install the devices drivers rather than the order in which you plug them in(after they are installed)
New version posted, see first post.

@KrossX: Added X360 support as suggested, screenshot Pad 1 DS3, Pad 2 X360


Played Onimusha 2 with this config, Rumble for Pad 1 was being sent to Pad 2.
Restarted with Pad 2 (X360) disconnected and Rumble goes correctly to Pad 1.

@Squall: Device enumeration is different from x360ce since I'm using HID Enumeration. Algorithm is -
Enumerate HID devices with Vid/Pid DS3 (vid_054c&pid_0268)
Enumerate HID devices with Vid/Pid SLS FX (vid_0e8f&pid_3075)
Enumerate HID devices with Vid/Pid DS2 (vid_0b43&pid_0003)
Enumerate XInput devices.

So I get to choose the order of class of device. Within each class of device I cant specify the order of devices presented. However they don't appear to be in order they were installed, looks more like USB bus/port order.

There is also some peculiar behaviour with the Speedlink Strike FX. Depending on the USB port I connect it to, it either gets detected as a Speedlink Strike FX or as a native DS3 (and behaves exactly like a DS3).

@Bositman: Is there an issue with adding attachments? They dont get listed in the order I added them. (see first post)
if only i could easily use some of the things found here to improve x360ce (since its a funny beast and rumble is barely working properly.....)

Users browsing this thread: 10 Guest(s)