A fork/continuation of the original since the author has been away for a while. Supports kernels up to 6.15 with lots of other changes.

  • InvertedParallax@lemm.ee
    link
    fedilink
    English
    arrow-up
    0
    ·
    edit-2
    5 months ago

    Firstly, it’s not a real hub, it’s an emulated hub, and you can do that emulating everything as USB 2.0.

    Secondly you can have multiple hid interface endpoints on a single device.

    Thirdly, you wouldn’t be polling, these would be hid interrupt urbs, and you can storm them 1 per micropacket if you want, they just show up in the ehci buffers.

    Finally, no human is overflowing the hid interface like this, not even 8 of them.

    • kkj@lemmy.dbzer0.com
      link
      fedilink
      English
      arrow-up
      0
      ·
      5 months ago
      1. You’d presumably do it as 2.0, but I used 1.1 for the numbers just to demonstrate that you can definitely fit 8 controllers into a packet even if you go for unreasonable levels of backwards compatibility.
      2. Without a hub, I’m not aware of a way to exceed 8 axes per HID device (7 in Windows for some reason). Each Xbox controller has six, so even two controllers can’t be one device.
      3. As far as I can find, most USB 2 implementations can take up to 1000 packets per second per root hub, regardless of packet size. I was already assuming one controller poll per packet for the hub version, and that’s 125Hz per controller with all eight.
      4. You aren’t actually pressing buttons at 125Hz, no. However, if your input is barely too late for one 125Hz poll, you can get enough delay to be noticeable in fast-paced games. Most controllers and mice use 1kHz for this reason, with some even supporting up to 8kHz if your USB implementation supports it (which apparently is pretty common with xHCI, but Microsoft didn’t want to rely on that for obvious reasons).