..:: 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 506 507 508 509
I manually added my BT adapter (manufactured by Cambridge Silicon Radio Ltd.):

VID_0A12&PID_0001&REV_3164

to try out the ScpServer-0.4.0.80 and the updated ScpControl-0.4.0.81. It's working great so far. It even works perfectly with Dead Rising 2, which that awful Motioninjoy never did. Biggrin
Okay, i got the driver to install fine now (had the DS3 unplugged, oops).
Now after a reboot and with the DS3 unplugged I can press the PS button and get a Windows
notification sound for "device connected". XInput Controller tester also says one pad is connected
but I cannot get it to register any button presses.
All I can do in that app is test vibration and that actually works, lol.
Any idea why button presses don't work?
@rama : the main aim of 0.4.x is to get native XInput working via the Virtual bus, so first thing to do is verify that.

1. Run ScpMonitor.exe, connect your DS3 via Bluetooth, verify that your controller is shown as connected on BTH and that the counter is incrementing (this is the number of report packets processed).
2. Open Devices & Printers, verify that an "Xbox 360 Controller for Windows" is displayed. Right click on it and select Properties, verify that it is located on the Virtual Bus. (see attachment 1)
3. Close Properties, right click again and select Game controller settings. Select the controller and click properties, verify button presses and axis changes *. (see attachment 2) [DInput].
4. Open explorer and navigate to <install_dir>\Win32. Rename XInput1_3.dll to _XInput1_3.dll. Run ScpUser.exe as Administrator. Verify button presses and axis changes. (see attachment 3) [Native XInput]
5. Close ScpUser, rename _XInput1_3.dll to XInput1_3.dll. Run ScpUser.exe as Administrator again. Verify button presses, axis changes and extensions **. (see attachment 4) [Native DS3]

* Z Axis (Triggers) is not displaying properly in Game controller settings in Win 8, displays correctly in Win 7. Does not appear to be an issue in XInput. If you are getting flickering of buttons/axis, install the ScpControl.dll from Post #119. DS3 seems to fluctuate around it's stick centres a lot more than an X360, the thresholding added alleviates this.

** Have only 1 instance of ScpUser running when using Native DS3 mode. The Service (or Server) pumps out the DS3 reports on a localhost UDP socket (26761), the supplied XInput1_3.dll listens on this port for the reports, only one instance can have this port open. The Service (or Server) listens on localhost UDP socket (26760) for Status & Rumble requests.

I think the above is the reason you weren't seeing button presses, another minimised ScpUser was running. You were able to see the controller as being connected and send rumble commands since the two streams are isolated. I used UDP in this fashion for the Prototype for the reason that it is incredibly easy to get up and running, will likely switch to maintaining a list of TCP socket connections later in the development cycle.

@unvaluablespace: added your hardware id to the inf/cat.

@ Ba'al:
@ Tsusai:
Many thanks for taking the time to test, updated the inf/cat to include/exclude those hardware ids.
as usual you rock, scarlett! Smile

rocketfish RF-MRBTAD bluetooth adapter is working with your driver. Was able to succesfully pair with my old ps3 controllers. As expected though, would not pair with the newer revision DS3 controller.

Thanks so much. I even got my second adapter running by installing your driver with 1 adapter first, then plugged in second adapter and voila! Now have a dedicated bluetooth adapter for DS3 controllers, and a standard bluetooth adapter for my regular bluetooth devices! ^_^ thanks!

another thing I figured i'd point out with the new controller revision. The monitor shows when i press the PS button that it does in fact connect to the controller. the mac address shows, followed by "BTH" then the numbers that usually go up just sit at 00000000 and never go up, with "none" right next to it. Smile hope that helps some. I attached a pic with the log from start to finish for the bluetooth connection. Hope it helps. Smile
Bluetooth Prototype 4 - Update 2

1. Added DS3 A1 Rev support *.

Updating Prototype 4
1. Unpack the archive.
2. Stop the Service [net stop "SCP DS3 Service" - from an elevated command prompt, or use SCM]
3. Close ScpMonitor.
4. Copy ScpControl.dll (unpacked from the archive) to your install directory.
5. Start the Service [net Start "SCP DS3 Service" - from an elevated command prompt, or use SCM]

* Should also work with B1 Rev, but I don't have one to test with.
Confirming A1 revision support. Smile works great on my pc. Thanks so much Scarlett!

By the way, I don't know anything about all this xinput/dinput stuff, but I noticed a couple of programs that worked fine before with a regular Xbox 360 controller, don't work with your drivers, where as motioninjoy worked in Xbox 360 emulation mode. Bsnes, the snes emulator, worked fine, but after switching to your drivers, had to change the input driver to directinput. Obviously not a big deal lol. Battlefield 3 however, doesn't work at all with the ds3. Is it a compatibility thing? Just curious Smile thanks again you Rock! I got my old ds3 controllers working again because of your wrapper Laugh
Scarlet.Crush:
Thanks for the big troubleshoot list Tongue2
Unfortunately I don't pass the first check. My DS3 is connected via Bluetooth but I don't get any packets.
It says BTH 00000000 None.

I do see a XBOX 360 controller in devices and printers and it is on the SCP virtual bus #1.
I noticed that an install of the driver adds 2 virtual buses though.
Also I have one "Bluetooth DS3 device" shown in devices and printers.

I made sure to have no extra ScpUser.exe running.
This is my install log for pre-install and install:
Code:
SUCCESS - Virtual Bus Created
INFO    - ENTER:  DriverPackageInstallW
INFO    - Looking for Model Section [SCProductions.NTamd64]...
INFO    - Installing INF file 'G:\DS3driver\ScpServer\bin\System\ScpVBus.inf' (Plug and Play).
INFO    - Looking for Model Section [SCProductions.NTamd64]...
INFO    - Installing devices with Id "root\ScpVBus" using INF "C:\Windows\System32\DriverStore\FileRepository\scpvbus.inf_amd64_b88b71215862a778\ScpVBus.inf".
INFO    - ENTER UpdateDriverForPlugAndPlayDevices...
SUCCESS - RETURN UpdateDriverForPlugAndPlayDevices.
INFO    - Installation was successful.
SUCCESS - Install completed
INFO    - RETURN: DriverPackageInstallW  (0x0)
INFO    - ENTER:  DriverPackagePreinstallW
SUCCESS - .\System\BthWinUsb.inf is preinstalled.
INFO    - RETURN: DriverPackagePreinstallW  (0x0)
INFO    - ENTER:  DriverPackagePreinstallW
SUCCESS - .\System\Ds3WinUsb.inf is preinstalled.
INFO    - RETURN: DriverPackagePreinstallW  (0x0)

Pre-Install Succeeded.

SUCCESS - Virtual Bus Created
INFO    - ENTER:  DriverPackageInstallW
INFO    - Looking for Model Section [SCProductions.NTamd64]...
INFO    - Installing INF file 'G:\DS3driver\ScpServer\bin\System\ScpVBus.inf' (Plug and Play).
INFO    - Looking for Model Section [SCProductions.NTamd64]...
INFO    - Installing devices with Id "root\ScpVBus" using INF "C:\Windows\System32\DriverStore\FileRepository\scpvbus.inf_amd64_b88b71215862a778\scpvbus.inf".
INFO    - Will force install because driver is not better and force flag is set.
INFO    - ENTER UpdateDriverForPlugAndPlayDevices...
SUCCESS - RETURN UpdateDriverForPlugAndPlayDevices.
INFO    - Installation was successful.
SUCCESS - Install completed
INFO    - RETURN: DriverPackageInstallW  (0x0)
INFO    - ENTER:  DriverPackageInstallW
INFO    - Looking for Model Section [SCProductions.NTamd64]...
INFO    - RETURN: DriverPackageInstallW  (0xE000020B)
INFO    - ENTER:  DriverPackageInstallW
INFO    - Looking for Model Section [SCProductions.NTamd64]...
INFO    - Installing INF file 'G:\DS3driver\ScpServer\bin\System\Ds3WinUsb.inf' (Plug and Play).
INFO    - Looking for Model Section [SCProductions.NTamd64]...
INFO    - Installing devices with Id "USB\VID_054C&PID_0268&REV_0100" using INF "C:\Windows\System32\DriverStore\FileRepository\ds3winusb.inf_amd64_dc3326598b5cbe61\ds3winusb.inf".
INFO    - ENTER UpdateDriverForPlugAndPlayDevices...
SUCCESS - RETURN UpdateDriverForPlugAndPlayDevices.
INFO    - Installation was successful.
INFO    - Marked Phantom Device with Hardware/Compatible Id 'USB\VID_054C&PID_0268&REV_0100' for reinstall on next plug-in.
SUCCESS - Install completed
INFO    - RETURN: DriverPackageInstallW  (0x0)

Install Succeeded.
I have a problem using multiple controllers with applications using DInput, namely all actions gets passed to one virtual x360 pad.

At first i noticed that everything was very jittery and checking the gamepad panel in windows the first two x360 pads were not reacting to any input on any controller
and the third seemed to be getting all the commands, making the axis bars stutter and jitter all over the place. The problem appears over both bluetooth and wired, and when turning all but one
off everything seems normal. I also tried ScpUser and everything was working fine there, the respective inputs were passed to the right controller.

Making it seem like a bug in either DInput handling or the virtual bus.
@rama: ok, so the packet counter not incrementing looks to be the A1/B1 rev of the DS3 issue, check the model no on the back of the controller. It should be something like CECHZC2E for an original DS3, later models have A1 (or B1) in very small letters after.

I added an update for these controller revs, see Post #155.

Looks like the Installer is not detecting that the Virtual Bus device already exists in Win 8. the service only connects to the first one it finds you can delete the other one.
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 506 507 508 509