Xbox controller emulator for Atmel AVR microcontrollers

Discussion in 'Xbox (Original console)' started by ripdajacker, Feb 24, 2018.

  1. Elurin

    Elurin Member

    Joined:
    Jan 14, 2018
    Messages:
    17
    Likes Received:
    2
    You could maybe use the s-controller board, but not a pretty solution I guess :)
     
  2. ripdajacker

    ripdajacker Member

    Joined:
    Feb 24, 2018
    Messages:
    15
    Likes Received:
    13
    Update:
    I've made a successful SPI bus between a Raspberry PI host and the Arduino that's emulating the xbox controller. The use of SPI has improved speeds and accuracy greatly.

    There are now two separate github projects, one for the HID to SPI part on the raspberry and one for the actual XPAD emulation.

    Coming up:
    Latency measurements for those that are still skeptical.
     
    Anthony817 and nonosto like this.
  3. Elurin

    Elurin Member

    Joined:
    Jan 14, 2018
    Messages:
    17
    Likes Received:
    2
    Wow that is great!
     
  4. nonosto

    nonosto Intrepid Member

    Joined:
    Jan 5, 2012
    Messages:
    674
    Likes Received:
    52
    From this emulate too I/O board, basebord & mediaboard for make a chihiro consolised....
     
  5. GoTeamScotch

    GoTeamScotch Spirited Member

    Joined:
    Jul 14, 2016
    Messages:
    112
    Likes Received:
    55
    This is a very interesting project. Any plans on adding support Xbox One controllers? Also, I assume you would need one Pi per controller port if you want to use multiple controllers, is that right? What are the requirements for Pi devices / which ones work?

    Keep up the great work!
     
  6. bennydiamond

    bennydiamond Gutsy Member

    Joined:
    Aug 24, 2011
    Messages:
    475
    Likes Received:
    177
    This is great!

    I too have had this idea a while ago but never started working on it. I ordered what seems to be the same hardware as you did but by the time I received it, I had already moved back to XBlast OS. Arduino Leonardo (Atmega32u4) + USB host shield.

    I'll follow this one close. For now, I cannot really offer my help, my plate is full.
     
    Syclopse likes this.
  7. ripdajacker

    ripdajacker Member

    Joined:
    Feb 24, 2018
    Messages:
    15
    Likes Received:
    13
    Hardware requirements
    * ANY SPI-capable single board computer running linux, so all Raspberry Pi models and probably a whole bunch of OrangePi / BananaPi and the like. The only OS requirements is that the SPI bus is enabled in the kernel.
    * ANY ATMega32U4-based Arduino (Yes the $5 clones work)
    * Five jumper cables to connect the two boards.

    Controller support
    The linux computer acts as a host so this will support any controller you can plug in to a modern day linux kernel. I've tested with an OG xbox S controller, 360 controller, PS4 controller and chinese shitty SNES controller.
     
  8. Elurin

    Elurin Member

    Joined:
    Jan 14, 2018
    Messages:
    17
    Likes Received:
    2
    Interesting, how did you connect to the Xbox, directly to the board or did you use a USB to controller connector cable?
     
  9. ripdajacker

    ripdajacker Member

    Joined:
    Feb 24, 2018
    Messages:
    15
    Likes Received:
    13
    The arduino has a microusb port, I made a USB-to-Xbox cable from an old broken controller.
     
  10. Elurin

    Elurin Member

    Joined:
    Jan 14, 2018
    Messages:
    17
    Likes Received:
    2
    Hmm would be interesting to do an internal mod with a 360 controller. Any update on the latency
     
  11. ripdajacker

    ripdajacker Member

    Joined:
    Feb 24, 2018
    Messages:
    15
    Likes Received:
    13
    It supports wireless xbox controller dongles, so you can probably hide it well.

    No hard data on the latency yet, still ironing out corner cases in the code.
     
  12. Elurin

    Elurin Member

    Joined:
    Jan 14, 2018
    Messages:
    17
    Likes Received:
    2
    Just ordered the necessary components and eager to get this working. Do you have any updates ripdajacker?
     
  13. nonosto

    nonosto Intrepid Member

    Joined:
    Jan 5, 2012
    Messages:
    674
    Likes Received:
    52
    Racing wheel Fanatec XBOX 360 compatible? Arcade stick? So nice THX very much for this project.
     
  14. ripdajacker

    ripdajacker Member

    Joined:
    Feb 24, 2018
    Messages:
    15
    Likes Received:
    13
    Dunno, don't have a racing wheel, but the compatibility boils down to: If you can use it on linux, you can use it here.

    I just got a kid so my spare time took a significant hit. I'm still having some sync issues with the devices, usually happens after 10-15 minutes of playing.
     
  15. nonosto

    nonosto Intrepid Member

    Joined:
    Jan 5, 2012
    Messages:
    674
    Likes Received:
    52
    I am not sure if fanatec Linux driver exist....but if XBOX 360 controller compatible I assume that it's compatible. My Wheel is PC and PS3 compatible too. For gun this is Linux compatible:
    https://www.ultimarc.com/aimtrak.html
     
  16. Anthony817

    Anthony817 Resolute Member

    Joined:
    May 12, 2010
    Messages:
    948
    Likes Received:
    399
    Wow this is incredible! So what all will we need to have to get this working in the future? Just an Xbox 360 wireless PC dongle and controller? I happen to have a cheap Chinese one as well as an official Microsoft branded adapter, so if you need testing later on let me know. Will the arduino or Pi also have to be used as well since I reckon this has to emulate the hardware and then translate the 360 signals into the correct commands. Guess there is no real way to just make a driver for the Xbox is there?
     
  17. nonosto

    nonosto Intrepid Member

    Joined:
    Jan 5, 2012
    Messages:
    674
    Likes Received:
    52
    News please....input lag....I am so impatient....
     
  18. nonosto

    nonosto Intrepid Member

    Joined:
    Jan 5, 2012
    Messages:
    674
    Likes Received:
    52
    news?
     
  19. nonosto

    nonosto Intrepid Member

    Joined:
    Jan 5, 2012
    Messages:
    674
    Likes Received:
    52
  20. ripdajacker

    ripdajacker Member

    Joined:
    Feb 24, 2018
    Messages:
    15
    Likes Received:
    13
    Hey all, I finally found a couple of hours to immerse myself into this again.

    Update:
    * The current master branch works with both Xbox ONE and 360 controllers.
    * Requirements have been updated to be a RaspberryPI (any SPI-capable linux computer will work)
    * Arduino Pro Micro or equivalent (atmega32u4 based)
    * Five wires, wiring diagram can be found here: https://github.com/ripdajacker/xpad-avr/blob/master/xpad-avr-wiring.pdf

    To make the magic happen you need both the xpad-avr project and the hidjoy2spi.
    See https://github.com/ripdajacker/hidjoy2spi for details on how to get started.
     

Share This Page