..:: PCSX2 Forums ::..

Full Version: XInput Wrapper for DS3 and Play.com USB Dual DS2 Controller
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505
Note by Blyss Sarania: Scarlet.Crush hasn't logged on to the forum in 5 months, and there hasn't been an update to this project in a while. The wrapper works well enough as is, but there has been an unofficial continuation of the project here. Note that Scarlet.Crush is not involved in that, it's just a continuation of the project based on his source. You can either use Scarlet.Crush's version which is found here in this post, or you can use the updated version in the thread previously linked. Choose whatever suits your needs best. End note.

Updated : New version released 1.2.0.160. See post  #2505.

Updated : Update Available 1.2.1.165 - WinXP compatibility for ScpUser.exe/XInput1_3.dll, Service Channel Bypass feature added, Proof of Concept KBM mapping sample added. See Post #2574.

Updated : Update Available 1.2.2.175 - Includes all previous Updates. Added Fixup for 00:26:5C signature, Renamed ScpPad2Key -> GtaMapper, added DskMapper & D3Mapper samples. Refactored & moved common functionality into ScpControl.dll. See Post #2702.

Download latest version here. [1.2.0.160]

Download latest update here. [1.2.2.175]
Download latest source here. [1.2.2.175]

Requirements
1. Microsoft .NET 4.0
2. Visual C 2013 Runtime.
3. Latest DirectX Runtime.
4. Latest Xbox 360 Controller Drivers available.
5. Genuine Sony DualShock3 or DualShock4 or SixAxis Controller(s).
6. Minimum of Bluetooth 2.0 + EDR Dongle (if using Bluetooth).
7. Administrator rights on your PC.

Note : The Bluetooth Driver requires that you dedicate a Bluetooth Dongle to DS3/DS4 use. It will not be usable by other Bluetooth devices after the driver has been installed.

Important - make sure your Bluetooth dongle and DS3(s) are plugged in via USB before installing the drivers.

Xbox 360 Controller Drivers - these are available from Microsoft here.
Windows 7 - Run before installing the SCP Drivers. (Windows 7 shipped with outdated drivers which may cause stability issues)
Windows XP and Vista - Run after after installing the SCP Drivers.
Windows 8/8.1 not required.

New Install
1. Connect your Dongle and DS3 via USB and let Windows install it's default drivers.
2. Copy the archive to a temporary directory [eg C:\Temp].
3. Right click on the archive and select Properties.
4. Click the Unblock button if it is displayed on the General tab.
5. Unpack the archive.
6. Create a directory where you want the Service to run from. [Recommended - C:\Program Files\Scarlet.Crush Productions *]
7. Copy the contents of the ScpServer\bin to the directory you created.
8. Run ScpDriver.exe.
9. XP/Vista - check the Force Install option. Win 7/8 leave it unchecked.
10. Click Install. [see screenshot below]

[attachment=47326]

11. If you do not see the install summary as per screenshot and your dongle is in the directly supported list - click Uninstall, check the Force Install option, click Install.
12. Click Exit.

* create from an elevated command prompt if you have UAC enabled. The directory should not be created anywhere off your User directory (eg on your Desktop, or in your Downloads directory), it should also not be on a Network drive.

Upgrade from 1.1.0.139
1. Copy the archive to a temporary directory [eg C:\Temp].
2. Right click on the archive and select Properties.
3. Click the Unblock button if it is displayed on the General tab.
4. Unpack the archive.
5. Stop the Service [net stop "SCP DS3 Service" - from an elevated command prompt, or use Service Control Manager]
6. Close ScpMonitor if it is running. [Right-click on the icon in the Task bar and select Exit]
7. Copy the contents of the ScpServer\bin folder to your existing install folder. **
8. Start the Service [net Start "SCP DS3 Service" - from an elevated command prompt, or use Service Control Manager]

** The DS3, BTH and Bus drivers have not changed, so you do not need to re-run ScpDriver.exe.

Apply Update
1. Copy the archive to a temporary directory [eg C:\Temp].
2. Right click on the archive and select Properties.
3. Click the Unblock button if it is displayed on the General tab.
4. Unpack the archive.
5. Stop the Service [net stop "SCP DS3 Service" - from an elevated command prompt, or use Service Control Manager]
6. Close ScpMonitor if it is running. [Right-click on the icon in the Task bar and select Exit]
7. Copy the contents of the ScpServer\bin folder to your existing install folder.
8. Start the Service [net Start "SCP DS3 Service" - from an elevated command prompt, or use Service Control Manager]

Driver installation for DualShock 4 - See Post #1852.

Pairing a DS4 to your Bluetooth Dongle - plug in the DS4 to USB while the Service is running, the DS4 will be automatically paired if required.

Pairing a DS3 to your Bluetooth Dongle - plug in the DS3 to USB while the Service is running, the DS3 will be automatically paired if required.

Disconnecting a DS3 - Press and hold L1 + R1 + PS for 2 seconds.

The drivers support 4 DS3s connected by USB or via Bluetooth (one dongle can support 4 DS3 connections).

Supported OS - XP (x86), Vista (x86, amd64), Win 7 (x86, amd64), Win 8 (x86, amd64), Win 8.1 (x86, amd64)

See Post #1851 if your dongle is not on the list below.

Directly Supported Dongles
USB\VID_03F0&PID_231D
USB\VID_045E&PID_3500
USB\VID_0461&PID_4D75
USB\VID_046D&PID_C709
USB\VID_047D&PID_105E
USB\VID_0489&PID_E011
USB\VID_0489&PID_E042
USB\VID_0489&PID_E04E
USB\VID_04CA&PID_3006
USB\VID_050D&PID_016A
USB\VID_05AC&PID_821A
USB\VID_05AC&PID_821F
USB\VID_07D1&PID_F101
USB\VID_0930&PID_0215
USB\VID_0A12&PID_0001
USB\VID_0A5C&PID_200A
USB\VID_0A5C&PID_2101
USB\VID_0A5C&PID_2146
USB\VID_0A5C&PID_2148
USB\VID_0A5C&PID_2150
USB\VID_0A5C&PID_2153
USB\VID_0A5C&PID_217D
USB\VID_0A5C&PID_2198
USB\VID_0A5C&PID_21E1
USB\VID_0A5C&PID_21E8
USB\VID_0B05&PID_1715
USB\VID_0B05&PID_1783
USB\VID_0B05&PID_1785
USB\VID_0B05&PID_179C
USB\VID_0B05&PID_17B5
USB\VID_0B05&PID_B700
USB\VID_0C10&PID_0000
USB\VID_0CF3&PID_3002
USB\VID_0CF3&PID_3004
USB\VID_0CF3&PID_3005
USB\VID_0DB0&PID_3801
USB\VID_0DF6&PID_2200
USB\VID_0E5E&PID_6622
USB\VID_1131&PID_1001
USB\VID_1131&PID_1004
USB\VID_1286&PID_2044&MI_00
USB\VID_13D3&PID_3304
USB\VID_413C&PID_8126
USB\VID_8086&PID_0189
USB\VID_8087&PID_07DA
USB\VID_0930&PID_0214
USB\VID_0A5C&PID_2154
USB\VID_0489&PID_E04D
USB\VID_413C&PID_8197
USB\VID_0A5C&PID_2021
USB\VID_05AC&PID_8286
USB\VID_0A5C&PID_2100
USB\VID_0BDA&PID_8723
USB\VID_044E&PID_3010
USB\VID_0B05&PID_1788
USB\VID_0A5C&PID_2190
USB\VID_13D3&PID_3315
USB\VID_0489&PID_E027
USB\VID_05AC&PID_821D
USB\VID_0BDA&PID_0724
USB\VID_050D&PID_065A
USB\VID_0A5C&PID_21E3
USB\VID_05AC&PID_8216
USB\VID_0A5C&PID_21B4

Tools
ScpServer.exe : GUI based version of the Service.
ScpPair.exe : GUI tool to allow pairing a DS3 with an external device (eg Nexus Tablet).
Zadig.exe : GUI tool (libwdi) which allows installing WinUSB on DS4s and Bluetooth dongles which do not appear on the supported list.
___________________________________________________________________

The Filter Driver + Wrapper is no longer supported.

An updated XInput Wrapper is included as part of the Driver Package and maintains backward compatibility with :

- DS3 on SCP Filter Driver
- DS3 on libusb-win32 Filter Driver
- DS2 on Play.com USB Adapter
- SpeedLink Strike FX pad.
___________________________________________________________________
So in essence, all you have done is what x360ce has been doing way before you even thought about it.
I wrote a utility which solved a specific issue for me and shared it with the community. Personally I prefer to do things for myself if possible and learn a few things in the process. If anyone else can learn anything from the source code or make use of the utility so much the better.

Your problem with that is?
My problem is your opening post, shows a lack of understanding of what was wrong.

A device does not have to support xinput in the least to work on windows 7

Drivers on the other hand, of which most adapters can work just dandy with the native HID driver installed, can be the limitation on many cheap adapters.

So to bypass the issue of drivers, you are passing the raw device information as Xinput functions i take it?
I wrote what is essentially an Upper Filter for an HID Class device (specifically targeted at the Play.com device id - VID_0B43&PID_003). If this was installed as a Filter the Driver would have to be signed to install on Vista or 7 (barring the usual workarounds), so to bypass this requirement I wrote it as an XInput wrapper.

Yes it reads HIDClass reports and convert to an XInput (X360 specific)compatible form, that is what filters do.

By 'does not work correctly' I meant - it installs fine as a USB HID Device + HID-compliant game controller, but is no longer usable in any games.
The specific game I was playing at the time was FFXI, which would not recognize it any longer, and could not support X360 Triggers as buttons.

Yeah it sounds like the adapter fakes a HID just enough to get it to be detected as a HID device, and allow hid driver installation, but the information it sends is not compatible with the native HID input driver to accept button and axis data, same as the PS3 control.

I wasn't dismissing your work btw, just refuting the idea that the control wouldn't work because it lacks xinput.

Good idea overall.
As an aside - x360ce doesn't recognize the DS2 Gamepads connected via the Play.com USB adaptor ... (or I can't get it to anyway).
yeah x360ce is a api wrapper, xinput > dinput
Modified first post. Better ?
I don't see anything wrong with this topic. Good work!
Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505