..:: 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
Ah, I was actually going to request spreading the word of your driver. I visit various forums and a couple actually have people interested in getting rid of motioninjoy. Glad I waited lol. So I guess it's safe to assume that once you do enter beta with this, it will be ok to inform many others? Smile I think I could bring a decent amount of beta testing traffic lol.

Scarlett, I don't have a USB 3.0 hub, but I am using a 2.0 hub and your drivers work great for me! Also, I did have your drivers installed when I first started testing them with my pc on my motherboards 3.0 ports, and it worked fine then as well. Smile

I also have a question, is the home button mimicking the Xbox guide button? I understand it doesn't work the same as most buttons, but I could have swore with your older drivers it was working with steam and another program I was using, but now its not? :-/ I know motioninjoy does this. EDIT: nvm, was the "run as administrator" thing again.

Oh, and as a suggestion, this is far from important, but perhaps there could be a way to have the Bluetooth drivers target a specific adapter? If there's anyone else like my setup, I use two Bluetooth adapters, both of which I had you add to your supported drivers. But now when I install, it installs the drivers on both adapters. Not a big deal, as I can either unplug an adapter, or go in device manager and temporarily disable the adapter I don't want drivers installed too, but was just an idea. I currently have my adapters plugged into a USB hub, which is installed internally in my pc, to give it a wireless look. So I would have to open my case to unplug the adapter. Smile t
(01-20-2013, 12:54 AM)Scarlet.Crush Wrote: [ -> ]@Gevaerd: I have created a custom build of ScpControl.dll for you for Bluetooth support. Install as above, stop the Service then replace ScpControl.dll with the one from the archive below, start the service.
The PSM Service Channel code is bypassed, it works on my SixAxis and original DS3s, let me know if it fixes your issues when connecting and using via Bluetooth.

I installed the 0.5.0.90. First tried without the custom ScpControl.dll and the behavior was the same as in 0.4, with the same output.

Then I put the custom ScpControl.dll, the behavior looks like the same (there is some output, the controller still blinks for a while and then it turns off), but with the following differences in the ScpServer display (image attached):
1) On top Pad 1 now shows something. Before it was just Disconnected.
2) On the output there is one line less.

If I may make a guess... maybe it is just missing the "Start Command" to the controller? (or the command was sent but did not work as expected)


If you are going to launch a public beta, I would suggest for it to implement the removal of the SCP DS3 Service during the uninstall operation, since many people do not like uninstalls that do not completely remove everything installed.
@unvaluablespace: yes, once it goes beta is ok. Currently there may be manual steps involved to work around issues which I wouldn't want to force on non-techies.

Yes, the PS button mimics the Guide button, and I haven't changed the behaviour since it was added. It's working fine on my games system with XBox 360 Accessories, Steam and GFWL games.
1. XBox 360 Accessories - short tap, when no game is running fullscreen, to show the interface. Short tap again to close it.
2. Steam (with focus) - short tap to enter "Big Picture" mode.
3. Steam (without focus) - press and hold for ~5secs to enter "Big Picture" mode.
4. GFWL - short tap to show the "Games for Windows Live" menu bar, short tap again to close it.

If your second Bluetooth dongle has Windows (or Manufacturer) drivers installed before running ScpDriver, you can just go into Driver Manager and perform a Roll Back driver on its Driver property page to restore them.


@Gevaerd: the "Start Command" is being sent (just no debug line for it), as I said my SixAxis connects with it, and it has the most relaxed firmware.

The Installer does uninstall the service, however it assumes that it will be started. This would typically be a "fix before RTM" type defect.

I really think your controller is not a genuine Sony DS3. I would return it and buy from a reputable retailer. [ask them to demonstrate it on a PS3 (firmware 3.50+) using Bluetooth]
I've tested the alpha with the provided Lilypad for DS3 native mode.
Everything seems to be working fine but I had issues because of using the x64 xinput.dll instead of the x86 one.
This can be a bit confusing for people I guess.
Also there seems to be an issue with rumble. It looks like it only works sporadically and it's pretty weak.
@Scarlet.Crush: Chiming in again after a test of the Bluetooth Alpha 1. Did an upgrade from Prototype 4.1 ala the instructions, went smooth and everything installed fine. Everything is connecting and running like it should (via USB and BT.)

Tested the Suspend and Resume buttons in SCP DS3 Server while connected over BT. Looks like:
-Suspend disables (unpair) the controller
-Resume (re-pair) is supposed to repair the controller.
From my testing, Suspend does indeed disable the controller and Windows gives the chime of disconnect. But the LED on the controller still shows connection (1) and it remains powered on. At this point, hitting Resume doesn't auto re-pair the controller (even after 10s), but seems to re-enable the ability to re-pair. I then just need to power-off the controller and then power it back on to re-pair.
@rama: yes, if you have an original DS3, rumble is much weaker on Bluetooth than USB (also noticable on a PS3) and can seem somewhat sporadic. Using a Rev A1 DS3, rumble is almost the same on Bluetooth and USB.

Seems to be 2 factors involved.
1. PCSX2 pushes out rumble request every ~20ms when a rumble effect is on. On Bluetooth the DS3 can only handle rumble requests every ~125ms (push them out any faster the controller locks up). Not an issue on USB.
2. Spin up of the motors seems to be somewhat slower/delayed on an original DS3 than a Rev A1. This can lead to short effects being missed and seemingly ignored by the controller.

I tried to compensate for this in software, may need to look at it again.


@thebrain2u:
- Suspend (Sleep or Hibernate) sends out a "Disconnect" to all controllers connected on Bluetooth, then sends a "Reset" command to the Dongle. This should turn off the DS3, if it doesn't the DS3 should automatically turn off after ~15secs.
- Resume (Wake) restarts the Dongle and any DS3s connected by USB. DS3s can be then reconnected on Bluetooth by pressing the PS button.

The Suspend / Resume functionality is intended to be used by ScpService for Sleep / Hibernate / Wake support. The buttons on ScpServer were added only to debug the messaging involved. Should have been more explicit in the feature description.
@Scarlet.Crush: Thanks for the explanation! Just tried again testing it via BT with Sleep, computer does sleep and the controller did turn off after ~15secs. Upon waking the computer back up, I turned on the controller via the PS button and it reconnected after a few secs. Great work as always, can't wait to see (and test) what else you include in the next update.
(10-15-2012, 01:30 AM)Scarlet.Crush Wrote: [ -> ]New version posted, see first post.

@KrossX: was a bug in the changes for disabling rumble in XInputEnable.

Why do both pads get rumble though? Popped Onimusha 1 in to a PS2 with 2 pads attached, rumble only goes to first pad during gameplay (same as LilyPad behaviour).

Finally fixed that bug! It was some static evilness. Tongue
@KrossX: nice.

Bluetooth Alpha 2

1. ScpService - Added logging support. (logs to <install dir>\ScpService.log)
2. ScpService - changed logon account to "Local System".
3. ScpControl - Added Idle Disconnect (DS3s connected by BTH are disconnected after 10mins of inactivity)
4. ScpControl - Added Low Battery Indication (DS3s connected by BTH will flash their LED when battery is low)
5. ScpControl - Tweaked Rumble Timer (Rumble effects improved for non-Rev DS3s * connected by BTH)
6. ScpDriver - Service always Uninstalled (Removed "must be running" requirement)

Important - make sure your Bluetooth dongle and DS3(s) are plugged in via USB before running ScpDriver.exe. Make sure you have the latest DirectX redist installed and the latest X360 drivers available.

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 the contents of the ScpServer\bin to the directory you created.
5. Run ScpDriver.exe as Administrator.
6. Click Install [if you don't want the Service installed uncheck Configure Service first]
7. Click Exit.

Upgrade from Alpha 1
1. Ensure the Service is running.
2. Run <install dir>\ScpDriver.exe as Administrator.
3. Ensure Configure Service is checked, then click Uninstall.
4. Unpack the archive.
5. Close ScpMonitor.
6. Copy the contents of the ScpServer\bin to the directory you created.
7. Run ScpDriver.exe as Administrator.
8. Click Install.

* Rumble is much improved on original DS3s, almost as good as an A1 rev. My test games for PCSX2 - SSX Tricky, Onimusha 2.

This will be the last release before Beta, for which I intend to do a code tidy-up and work on an Install/Troubleshooting doc.
updated and verified it works! Laugh thanks for the timeout to save battery. havent gotten a chance to check low batt indicator, as controller isnt even halfway dead yet lol. nice to see the logging support, and having the installer/uninstaller remove the service if needed. Smile rumble on my original controller seems to work fine, for some reason right motor isnt working though, but im pretty sure it has nothing to do with your drivers, as even via usb it wont spin. Ill have to check the controller topverify. its an older, repaired one so that probably explains that lol. my A1 works fine of course. Thanks scarlett!

are there any plans to fix xinput in some programs so we wont have to "run as administrator" all the time? I am the administrator of my account, and it gets annoying sometimes lol. is there any reasoning for changing the service to local system?

Oh yeah, and heads up but it seems your about to get a bit more traffic pretty soon. a quick google search for "pcsx2 ds3 wrapper" shows links to other forums where people have pointed out your project, along with a link to it. :-\ Hopefully this doesn't hinder your progress. The xinput ds3 wrapper is coming along great!
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