..:: 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 510
@CaptnJack: been playing around with AC3, it looks like it is a "compatibility mode" type issue. Game checks XInput, if a controller is enabled it checks DInput to find if it is an official 360, if it isn't (or not found) XInput is not used.
I tried x360ce with the filter driver and couldn't get it to work in any of the compatibility modes.

I did find a work around though (needs a wired X360 controller)
1. Start up the Bluetooth server
2. Start your DS3
3. Drop XInput1_3.dll into the AC3 directory
4. Plugin the X360 controller
5. Start the game
6. Change "Options->Controls->Controller Type" to "XBOX 360 CONTROLLER"
7. Your DS3 will now be active as the controller. (Disconnect the X360 Controller if you want)
8. Load or Start a game.

[Same should work with any game that does any of that DInput checking]
Bluetooth Prototype 2 - (Read here for Prototype 1 - please read before continuing)

1. Added USB support.
2. Added automatic switching between USB & Bluetooth (short in-game delay with no input, then continue)
3. Enabled full rumble support (tuned for PCSX2, DS3 in Bluetooth mode just can't handle the update rate it pushes out - added flow-control and throttling)
4. Added support for the Server to run as a Service
5. Added automatic pairing when running as a Service.
6. Added a tray applet to allow monitoring of DS3 connections.
7. Added manual pairing when not running as a Service.
8. Removed command line pairing tool.

Install Dongle Driver
1) Plug in your dongle and let Windows detect it.
2) Install the driver in bin\System via Device Manager. Double click the dongle device, Driver->Update Driver->Browse my computer->Let me pick->Have Disk.
3) If you are asked to reboot do so. [see attachment 1]

Install DS3 Driver
1) Plug in your DS3 and let Windows detect it.
2) Install the driver in bin\System via Device Manager. Double click the DS3 device, Driver->Update Driver->Browse my computer->Let me pick->Have Disk.
3) If you are asked to reboot do so. [see attachment 2]
4) Unplug your DS3

Configuring to run as a Service
1. Make a directory where you want the Service to run from [I used C:\Program Files\Scarlet.Crush Productions]
2. Copy the contents of the archive bin directory to the directory you created
3. Open an elevated command prompt.
4. cd to the directory you created.
5. Run the InstallUtil command from your .Net 4 utility directory [see attachment 3] (InstallUtil /u ScpService.exe to uninstall)
6. Start the service with the command : net start "SCP DS3 Service"

Start the Monitor
1. Double click the ScpMonitor.exe
2. Move the dialog to where you want it.
3. Left click the Tray Icon to Hide/Show the dialog

Plug in your DS3
1. If the DS3 is not paired to your dongle, it will be auto-paired.
2. Monitor will show it connected on USB [see attachment 4]
3. Unplug the DS3 again, and it will connect via Bluetooth.
4. Monitor will show it connected on BTH [see attachment 5]
Yo, i haven't read much about this promising util/driver...

But what i like to know, does this xwrapper involves installing/using XBCD → 3rd party drivers for Xbox360 for windowzz?

If yes, then i'll pass this one !!

Wos an nightmare to get xbcd to work properly with my (wired noless) xbox controller back then !!
Install went smooth, but the tool to config the controllpad seemed broken to some degree on my system !!

cherriepoppers,
@Metagondria: no, it has nothing to do with XBCD. The filter driver and XInput wrapper (download from first post) provide a simple zero configuration solution for using the supported controllers as XInput devices. [mainly DS3 via USB]

The Bluetooth Prototype in post #102 is a work in progress, supplied as a preview for people who have an interest in USB/Bluetooth/C# development to give feedback.
(12-23-2012, 09:03 PM)Scarlet.Crush Wrote: [ -> ]@Metagondria: no, it has nothing to do with XBCD. The filter driver and XInput wrapper (download from first post) provide a simple zero configuration solution for using the supported controllers as XInput devices. [mainly DS3 via USB]

The Bluetooth Prototype in post #102 is a work in progress, supplied as a preview for people who have an interest in USB/Bluetooth/C# development to give feedback.

Ah yeah... Bluetooth (wireless) thing is what's holding me back to use it... no offense...Blush

Currently using Mjoy with succes so far, but iam considering to give this neat tool an try if and only IF it supports wireless DS3 whitout customizing to much to get it to work!!

Thanks,

cherriepoppers,
I can't wait for the new update.

I followed post #27 and the DS3 works great for pcsx2 and dolphin. For steam do I have to dump the XInput1_3.dll in the steam folder like for pcsx2? If I have to, do I dump XInput1_3.dll in the "steam" folder with the .exe or in the actual game data located in "steamapps"?
You would have to dump the file inside the gamefolder, alongside the game's executable file. Check x360ce's compatibility list as a reference in case it ain't working, cuz it might just not be compatible.
Tried the bluetooth prototype from #102 and got it working!
Had to add my bluetooth dongle (USB\VID_0A12&PID_0001&REV_5276) to the ini file myself but it has been working without a hitch now while i have been testing it.

I have some suggestions for when you bring it out of the prototype stage, that you were probably planning on adding anyway. Firstly, since you automatically pair the DS3 to the dongle adding a tool to manually reconfigure it would make it possible to pair the DS3 to a generic MAC adress, like a android phone, and not have it being overwritten. Also being able to re-order the xinput devices to change player/controller would be useful. It has also probably ocurred to you but if you wanted to extend the testing you could add all the dongles from the mij .ini and expect them to work just fine.
love the wrapper man Ninja works with alot of my programs with great success.. sensitivity feels way high though in latest version.

my bluetooth dongle cant find my ps3 controller though Sad

so i cant connect it through that.
Bluetooth Prototype 3 (Read here for Prototype 1, here for Prototype 2 - please read before continuing)

1. Added an installer.
2. FIX for Belkin & JSG dongles not disconnecting Bluetooth connection properly when switching from BTH -> USB.
3. Additional logging for above.

New Install
1. Connect your Dongle and DS3 via USB and let Windows install it's default drivers.
2. Unpack the archive.
3. Create a directory where you want the Service/Server to run from [I used C:\Program Files\Scarlet.Crush Productions - create from an elevated command prompt]
4. Copy bin\ScpDriver.exe to the directory you created.
5. Run ScpDriver.exe as Administrator. [This will unpack the binaries & drivers]
6. Click Install [if you don't want the Service installed uncheck Configure Service first] (see Attachment 1)
7. Click Exit.

Upgrade from Prototype 2
1. Unpack the archive.
2. Run bin\ScpDriver.exe to unpack the binaries & drivers.
3. Stop the Service [net stop "SCP DS3 Service" - from an elevated command prompt, or use SCM]
4. Close ScpMonitor.
5. Replace ScpControl.dll in your Service directory with the one unpacked in 2.
6. Start the Service [net Start "SCP DS3 Service" - from an elevated command prompt, or use SCM]

Architecture of the final solution is shown in Attachment 2. Green boxes are the areas which need to be functional before transitioning out of the Prototype phase.
The "Virtual X360 Controller Bus" will require the most work. I'm looking to base it on the Toaster Bus WDK sample. It's main purpose is to make up to four DS3s attached via USB/Bluetooth appear as Official X360 Controllers to the OS/Games so that the XInput Wrapper DLL is not required.

@Dracyr: yes, I'll be looking to add usability features and extending the supported dongles after the prototype phase is complete. Concentrating on base functionality at the moment.

Regarding pairing to a generic mac addr - although the DS3 will be paired to the mac, the other end of the connection has to be paired as well. DS3s don't support a "normal" pairing mechanism (main reason for writing the custom Bluetooth stack in this project) so it probably won't be able to connect.
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 510