jackun / USBqemu-wheel

PCSX2 usb plugin for wheels and increasingly more stuff
The Unlicense
116 stars 21 forks source link

RealPlay #38

Closed Florin9doi closed 1 year ago

Florin9doi commented 4 years ago

USB Descriptors:

Bus 001 Device 018: ID 14b7:09b5  
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               2.00
  bDeviceClass            0 (Defined at Interface level)
  bDeviceSubClass         0 
  bDeviceProtocol         0 
  bMaxPacketSize0        64
  idVendor           0x14b7 
  idProduct          0x09b5 
  bcdDevice            1.00
  iManufacturer           1 In2Games
  iProduct                2 Real Play
  iSerial                 0 
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength           41
    bNumInterfaces          1
    bConfigurationValue     1
    iConfiguration          0 
    bmAttributes         0x80
      (Bus Powered)
    MaxPower              100mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           2
      bInterfaceClass         3 Human Interface Device
      bInterfaceSubClass      0 No Subclass
      bInterfaceProtocol      0 None
      iInterface              0 
        HID Device Descriptor:
          bLength                 9
          bDescriptorType        33
          bcdHID               1.11
          bCountryCode            0 Not supported
          bNumDescriptors         1
          bDescriptorType        34 Report
          wDescriptorLength     133
         Report Descriptors: 
           ** UNAVAILABLE **
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x02  EP 2 OUT
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0040  1x 64 bytes
        bInterval              10
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0040  1x 64 bytes
        bInterval              10
Device Status:     0x0000
  (Bus Powered)
0x12,        // bLength
0x01,        // bDescriptorType (Device)
0x00, 0x02,  // bcdUSB 2.00
0x00,        // bDeviceClass (Use class information in the Interface Descriptors)
0x00,        // bDeviceSubClass 
0x00,        // bDeviceProtocol 
0x40,        // bMaxPacketSize0 64
0xB7, 0x14,  // idVendor 0x14B7
0xB5, 0x09,  // idProduct 0x09B5
0x00, 0x01,  // bcdDevice 2.00
0x01,        // iManufacturer (String Index)
0x02,        // iProduct (String Index)
0x00,        // iSerialNumber (String Index)
0x01,        // bNumConfigurations 1

// 18 bytes
0x09,        // bLength
0x02,        // bDescriptorType (Configuration)
0x29, 0x00,  // wTotalLength 41
0x01,        // bNumInterfaces 1
0x01,        // bConfigurationValue
0x00,        // iConfiguration (String Index)
0x80,        // bmAttributes
0x32,        // bMaxPower 100mA

0x09,        // bLength
0x04,        // bDescriptorType (Interface)
0x00,        // bInterfaceNumber 0
0x00,        // bAlternateSetting
0x02,        // bNumEndpoints 2
0x03,        // bInterfaceClass
0x00,        // bInterfaceSubClass
0x00,        // bInterfaceProtocol
0x00,        // iInterface (String Index)

0x09,        // bLength
0x21,        // bDescriptorType (HID)
0x11, 0x01,  // bcdHID 1.11
0x00,        // bCountryCode
0x01,        // bNumDescriptors
0x22,        // bDescriptorType[0] (HID)
0x85, 0x00,  // wDescriptorLength[0] 133

0x07,        // bLength
0x05,        // bDescriptorType (Endpoint)
0x02,        // bEndpointAddress (OUT/H2D)
0x03,        // bmAttributes (Interrupt)
0x40, 0x00,  // wMaxPacketSize 64
0x0A,        // bInterval 10 (unit depends on device speed)

0x07,        // bLength
0x05,        // bDescriptorType (Endpoint)
0x81,        // bEndpointAddress (IN/D2H)
0x03,        // bmAttributes (Interrupt)
0x40, 0x00,  // wMaxPacketSize 64
0x0A,        // bInterval 10 (unit depends on device speed)

// 41 bytes
Florin9doi commented 4 years ago

HID descriptors:

05 01 09 05 A1 01 15 00 26 FF 0F 35 00 46 FF 0F
09 30 75 0C 95 01 81 02 75 01 95 04 81 03 09 31
75 0C 95 01 81 02 75 01 95 04 81 03 09 32 75 0C
95 01 81 02 75 01 95 04 81 03 06 00 FF 09 20 09
21 09 22 09 23 09 24 09 25 09 26 09 27 26 FF 00
46 FF 00 75 08 95 08 81 02 15 00 25 01 35 00 45
01 75 01 95 08 05 09 19 01 29 08 81 02 06 00 FF
09 28 09 29 09 2A 09 2B 26 FF 00 46 FF 00 75 08
95 04 81 02 C0
0x05, 0x01,        // Usage Page (Generic Desktop Ctrls)
0x09, 0x05,        // Usage (Game Pad)
0xA1, 0x01,        // Collection (Application)
0x15, 0x00,        //   Logical Minimum (0)
0x26, 0xFF, 0x0F,  //   Logical Maximum (4095)
0x35, 0x00,        //   Physical Minimum (0)
0x46, 0xFF, 0x0F,  //   Physical Maximum (4095)
0x09, 0x30,        //   Usage (X)
0x75, 0x0C,        //   Report Size (12)
0x95, 0x01,        //   Report Count (1)
0x81, 0x02,        //   Input (Data,Var,Abs,No Wrap,Linear,Preferred State,No Null Position)
0x75, 0x01,        //   Report Size (1)
0x95, 0x04,        //   Report Count (4)
0x81, 0x03,        //   Input (Const,Var,Abs,No Wrap,Linear,Preferred State,No Null Position)
0x09, 0x31,        //   Usage (Y)
0x75, 0x0C,        //   Report Size (12)
0x95, 0x01,        //   Report Count (1)
0x81, 0x02,        //   Input (Data,Var,Abs,No Wrap,Linear,Preferred State,No Null Position)
0x75, 0x01,        //   Report Size (1)
0x95, 0x04,        //   Report Count (4)
0x81, 0x03,        //   Input (Const,Var,Abs,No Wrap,Linear,Preferred State,No Null Position)
0x09, 0x32,        //   Usage (Z)
0x75, 0x0C,        //   Report Size (12)
0x95, 0x01,        //   Report Count (1)
0x81, 0x02,        //   Input (Data,Var,Abs,No Wrap,Linear,Preferred State,No Null Position)
0x75, 0x01,        //   Report Size (1)
0x95, 0x04,        //   Report Count (4)
0x81, 0x03,        //   Input (Const,Var,Abs,No Wrap,Linear,Preferred State,No Null Position)
0x06, 0x00, 0xFF,  //   Usage Page (Vendor Defined 0xFF00)
0x09, 0x20,        //   Usage (0x20)
0x09, 0x21,        //   Usage (0x21)
0x09, 0x22,        //   Usage (0x22)
0x09, 0x23,        //   Usage (0x23)
0x09, 0x24,        //   Usage (0x24)
0x09, 0x25,        //   Usage (0x25)
0x09, 0x26,        //   Usage (0x26)
0x09, 0x27,        //   Usage (0x27)
0x26, 0xFF, 0x00,  //   Logical Maximum (255)
0x46, 0xFF, 0x00,  //   Physical Maximum (255)
0x75, 0x08,        //   Report Size (8)
0x95, 0x08,        //   Report Count (8)
0x81, 0x02,        //   Input (Data,Var,Abs,No Wrap,Linear,Preferred State,No Null Position)
0x15, 0x00,        //   Logical Minimum (0)
0x25, 0x01,        //   Logical Maximum (1)
0x35, 0x00,        //   Physical Minimum (0)
0x45, 0x01,        //   Physical Maximum (1)
0x75, 0x01,        //   Report Size (1)
0x95, 0x08,        //   Report Count (8)
0x05, 0x09,        //   Usage Page (Button)
0x19, 0x01,        //   Usage Minimum (0x01)
0x29, 0x08,        //   Usage Maximum (0x08)
0x81, 0x02,        //   Input (Data,Var,Abs,No Wrap,Linear,Preferred State,No Null Position)
0x06, 0x00, 0xFF,  //   Usage Page (Vendor Defined 0xFF00)
0x09, 0x28,        //   Usage (0x28)
0x09, 0x29,        //   Usage (0x29)
0x09, 0x2A,        //   Usage (0x2A)
0x09, 0x2B,        //   Usage (0x2B)
0x26, 0xFF, 0x00,  //   Logical Maximum (255)
0x46, 0xFF, 0x00,  //   Physical Maximum (255)
0x75, 0x08,        //   Report Size (8)
0x95, 0x04,        //   Report Count (4)
0x81, 0x02,        //   Input (Data,Var,Abs,No Wrap,Linear,Preferred State,No Null Position)
0xC0,              // End Collection

// 133 bytes
Florin9doi commented 4 years ago

Packet format: Screenshot_2020-06-02_13-19-15

jackun commented 4 years ago

google images have...interesting results

Florin9doi commented 4 years ago

Buttons layout:

Btn1: Up
Btn2: Down
Btn3: Left
Btn4: Right
Btn5: Red
Btn6: Green
Florin9doi commented 4 years ago

dmesg:

[14427.733457] usb 1-2.4: new full-speed USB device number 18 using xhci_hcd
[14432.914696] usb 1-2.4: New USB device found, idVendor=14b7, idProduct=09b5, bcdDevice= 1.00
[14432.914709] usb 1-2.4: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[14432.914717] usb 1-2.4: Product: Real Play
[14432.914723] usb 1-2.4: Manufacturer: In2Games
[14432.926081] input: In2Games Real Play as /devices/pci0000:00/0000:00:14.0/usb1/1-2/1-2.4/1-2.4:1.0/0003:14B7:09B5.000A/input/input41
[14432.985642] hid-generic 0003:14B7:09B5.000A: input,hidraw6: USB HID v1.11 Gamepad [In2Games Real Play] on usb-0000:00:14.0-2.4/input0
Florin9doi commented 4 years ago

There are 3 other games, but they are probably similar: RealPlay Pool, RealPlay Puzzlesphere and RealPlay Racing (2 more buttons).

Florin9doi commented 3 years ago

USB Product IDs: RealPlay Racing - 0x09B2 RealPlay Sphere - 0x09B3 RealPlay Golf - 0x09B5 RealPlay Pool - 0x09B6

Florin9doi commented 1 year ago

Fixed by : https://github.com/PCSX2/pcsx2/pull/5032