..:: 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
Hey Scarlet, just got a genuine PS3 controller, and a new ASUS Bluetooth 4.0 adapter. Can you add this one to the list please? Thanks

USB\VID_0B05&PID_17CB
Hello! First, let me say how much I appreciate the work that went into making it possible for me to connect my PS3 controller to PC. That's awesome. Thank you.

Now, I've managed to get this thing working! Well, kind of. I get it so that the DS3 Monitor shows the Host Address, the connected controller (Pad 1) with and without bluetooth, but it doesn't seem to be useable in any games.

Can someone please tell me what I'm doing wrong? I've been scouring around trying to figure out how I can get it to work inside of Battlefield 4 (I like using it to fly) but I can't seem to get any of the buttons to work in the game.

Any ideas on what I need to do here?

EDIT: I got it to work! All I had to do was redownload the XBox drivers and reinstall them! It works in game now! Hooray! Now, I have a new problem. While it does work with Bluetooth on, it often only stays connected for a few seconds before the controller shuts off and then reconnects. Any ideas?
The games that I am playing are stuttering, both video and audio (Spelunky, Castle Crashers, etc.). Is this a known issue for this app?

P.s. By stuttering, I mean the sound and video are randomly buzzing and skipping. Buzzing and skipping can be minor to annoying. Occurs mostly when I am running xinput wrapper on full screen. However, when I'm running full screen without xinput wrapper on, no stuttering. Will do more test, but just wanted to know if this was something others are experiencing.

Here is my pc specs;

intel i5 core 2.8Ghz
intel hd graphics 2000
8Gb ram
Quick question... Any chance to add auto-fire support on the driver? There are some situations where this would be useful, if possible.

Thanks and great work!
On some games I play, it seems the controller momentarily disconnects and makes that device found sound in windows7, e.g. in DmC whenever I use a heavy attack it makes that sound and the game locks up for a second, but if I try the same heavy attack with the keyboard and mouse it doesn't lock up, any ideas on what could be the problem?
Hey, could you add support for this device please?

USB\VID_148F&PID_3000

Will be very grateful Smile
Unfortunately I don't have time to work on my "non-genuine-fix" (still have problems with lag) and some people were interested in tweaks i've made to successfully connect them by BTH. Maybe someone will have more time to make it work in 100%. So, here are my changes (based on v1.0.0.103)

The clue is to modify some bytes in "m_Report" for fake controllers. I recognize fake controller by MAC staring with 00:26:5C:xx:xx:xx

BthDevice.cs
Code:
...
case HCI.Event.HCI_Connection_Complete_EV:

    bd = String.Format("{0:X2}:{1:X2}:{2:X2}:{3:X2}:{4:X2}:{5:X2}", Buffer[10], Buffer[9], Buffer[8], Buffer[7], Buffer[6], Buffer[5]);

    BthDs3 Connection = Add(Buffer[3], (Byte)(Buffer[4] | 0x20), NameList[bd]);
    if (Buffer[10] == 0x00 && Buffer[9] == 0x26 && Buffer[8] == 0x5c)
    {
        Connection.Fake = true;
        LogDebug("-- Fake DualShock3 founded. Workaround applied");
    }
    else
    {
        Connection.Fake = false;
        LogDebug("-- Genuine Sony DualShock3 founded.");
    }

    Connection.Remote_Name = NameList[bd]; NameList.Remove(bd);
    Connection.BD_Address  = new Byte[] { Buffer[5], Buffer[6], Buffer[7], Buffer[8], Buffer[9], Buffer[10] };

    LogDebug(String.Format(">> {0} [{1:X2}]", Event, Buffer[0]));
    break;
...

BthDevice.cs
Code:
...
case L2CAP.Code.L2CAP_Configuration_Response:

    LogDebug(String.Format(">> {0} [{1:X2}]", Event, Buffer[8]));

    if (Connection.CanStartSvc)
    {
        UInt16 DCID = BthConnection.DCID++;
        L2_DCID = new Byte[2] { (Byte)((DCID >> 0) & 0xFF), (Byte)((DCID >> 8) & 0xFF) };

        if (!Connection.Fake)
        {
            L2CAP_Connection_Request(Connection.HCI_Handle.Bytes, m_Id++, L2_DCID, L2CAP.PSM.HID_Service);
            LogDebug(String.Format("<< {0} [{1:X2}] PSM [{2:X2}]", L2CAP.Code.L2CAP_Connection_Request, (Byte)L2CAP.Code.L2CAP_Connection_Request, (Byte)L2CAP.PSM.HID_Service));
        }
        else
        {
            Connection.CanStartSvc = false;
            OnInitialised(Connection);
        }
    }
    break;
...

BthDs3.cs
Code:
namespace ScpControl
{
    public partial class BthDs3 : BthConnection, IDs3Device
    {
        protected Boolean m_Fake = true;
            
        protected ReportEventArgs m_ReportArgs = new ReportEventArgs();
        ...

BthDs3.cs
Code:
...
protected Byte[] m_Leds   = { 0x02, 0x04, 0x08, 0x10, };
protected Byte[] m_Enable = { 0x53, 0xF4, 0x42, 0x03, 0x00, 0x00, };

public DeviceState State
{
    get { return m_State; }
}

public Boolean Fake
{
    get { return (Boolean) m_Fake; }
    set { m_Fake = (Boolean)value; }
}

public Ds3PadId PadId
...

BthDs3.cs
Code:
...
if (Global.DisableLED) m_Report[11] = 0;

if (m_Fake)
{
    m_Report[0] = 0xA2;
    m_Report[3] = 0x00;
    m_Report[5] = 0x00;
}

if (!m_Blocked && m_Queued > 0)
{
    if ((Now - m_Last).TotalMilliseconds >= 125)
    ...

Good luck!
Thanks for spending the time to give it a go, maybe someone else with coding experience can find the time to work on it too.
thanks for the contribution
Hi,
I have been using PS3 pad with Bluetooth in my Windows 8 PC without any problems, just as x360 pad - thank you!

I also have a question - is it possible to add support for this virtual pad: Droidmote
http://forum.xda-developers.com/showthre...?t=1292627
http://www.videomap.it/

It can be configured to map all PS3 buttons in DirectInput but would love to use it as XInput device, as setting x360ce for each game is painfull...
Would be grateful for answer. Once again, thanks.
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