..:: 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.
@electrobrain: just to quantify the speed of the DeviceIO calls into ScpVBus - attached a solution which performs 100K calls into the bus. Uses Port #5 on the bus, run and click the Test button (Windows will install an X360 on Port #5 - wait till it has finished).

On my i7 2700K it takes 420ms to complete - 4.2us per call.

(Also demonstrates how to derive from the BusDevice class and use in an application).
@Scarlet.Crush when doing DS4 support in your tool did you run into BT inputReportSize being 500+ bytes? I think that is one of biggest slowdowns on bt vs usb in my tool.
(01-22-2014, 06:52 PM)InhexSTER Wrote: [ -> ]@Electrobrains i believe that freeze with controller turned off while scp is running happens only in cases when its in the middle of the read or write. Thats one of the reasons why i had timeouts for both.

Okay, the idle timeout watchdog should be accounting for that. I'll try to reproduce it. Should just be a matter of triggering the race condition, from your description. CancelIoEx should be the most reliable and lightweight way to accomplish what we want.
(01-22-2014, 07:48 PM)electrobrains Wrote: [ -> ]Okay, the idle timeout watchdog should be accounting for that. I'll try to reproduce it. Should just be a matter of triggering the race condition, from your description. CancelIoEx should be the most reliable and lightweight way to accomplish what we want.

Also, the reason i had 16ms timeout for BT vs 8ms on USB is because i found with lower values the reading would time out quite often for BT. That way we always expect the 1 read take no longer then 16ms, and i think as long as its 16 or below its acceptable (60fps). Output report should be sent asynchronously so the tool will not wait for status, (blocking the thread)
Another thing i believe is you are sending the report if the values are changing only? Does it go for leds only? because rumble can be a constant value and has to be sent periodically to keep motor at same speed
@InhexSTER: nope, never seen a Bluetooth report packet over 87bytes.
@InhexSTER When a new update will be released?
Damn, as I thought, I think its strange behaviour either of driver or methods that pull input report length. It takes a largest report size which is i believe is 547. And then it will be trying to read that much data

@andgtr08 I will try to release the update this weekend:
I will be adding "Hide Dualshock 4 Controller checkbox" (Exclusive/Shared control).
Some performance optimizations that i feel safe adding.
Touchpad support will be enhanced with tap support/two fingers (that one might take slightly longer)
For not no plans for gestures as it require extensive panning
USB Hot plug support (So far have only idea, have to verify it works)
(01-22-2014, 06:36 PM)electrobrains Wrote: [ -> ]I would make an ScpServer.bat, the only difference between starting a Windows program with output on the console, and output to a file, is suffixing the program execution with a greater than sign and then the filename.

Could you kindly translate that to English so an idiot like me can understand it? Laugh
@InhexSTER: sounds like multiple concatenated reports -

1 Byte Report Header [0x11]
7 * 78 Byte Report Data.


(BTH Packets also include an 8 byte BTH Header - hence the 87 bytes I'm receiving)
(01-22-2014, 08:37 PM)steakandcheese Wrote: [ -> ]Could you kindly translate that to English so an idiot like me can understand it? Laugh

create a file ScpServer.bat ( regular text file with different extension)
add this into it, put in same folder as the tool
ScpServer.exe > output.txt

(01-22-2014, 08:45 PM)Scarlet.Crush Wrote: [ -> ]@InhexSTER: sounds like multiple concatenated reports -

1 Byte Report Header [0x11]
7 * 78 Byte Report Data.


(BTH Packets also include an 8 byte BTH Header - hence the 87 bytes I'm receiving)

Yeah that's what i get trying to use HIDP_GetInputReport or have to pass in the array of that length into ReadFile it must be 547 bytes. I will have to check native methods for HID, maybe i can fix this
Yet using 78 for output size works fine