Close
0%
0%

Steel Battalion Controller Teensy Adapter

A hardware adapter allowing a Steel Battalion Controller to appear as an Xinput device.

Public Chat
Similar projects worth following
Steel Battalion Controller Teensy 3.6 Adapter

An adapter allowing hardware level USB parsing and Xinput device emulation using a Teensy 3.6  

I also wrote and published an Arduino library found here:
https://github.com/SantiagoSaldana/SBC

This leads to very low latency.

It also means that the controller is now operating system agonistic and will work on any device that supports an Xinput device, including Quest and Quest 2.

I wrote extensive installation instructions from the viewpoint of never having used Arduino before.

But for experts it boils down to this.

  1. Solder pin headers onto USB pins on Teensy 3.6 and connect USB adapter, be careful of polarity
  2. Test device to make sure you have header on properly before connecting SBC
  3. Install Arduino and Teensyduino  and make sure you install USBHost_t36 go on and install the SBC library
  4. Select the Serial + Keyboard + Mouse + Joystick as the USB type.
  5. Upload the HIDJoystick example from the SBC library.
  6. Test out SBC joystick in your joystick program of choice
  7. To emulate an XInput device, install XInput hardware files https://github.com/dmadison/ArduinoXInput_Teensy
  8. Install Xinput library in Arduino
  9. Select Xinput as the USB type
  10. Upload XInputMachinae file and enjoy.

  • Project History

    SantiagoSaldana11/29/2021 at 07:38 0 comments

    I'm going to provide some background on this as I've worked on this on and off in some state for a decade.  I will later make a post dedicated to instructions.

    The journey for this piece of hardware / software started almost a decade ago.  I got the Steel Battalion Controller from my brother.  I'm not sure where he found it as he didn't have an Xbox nor the original game, but I borrowed it from him and set out to make it work on Windows.

    People had gotten the controller to work before in Windows XP, however the drivers would not work for any 64-bit version of Windows.  So I set out to write something.  I got a good start on this process using the SteeBattalion.net project.  

    https://github.com/jcoutch/steel-battalion-net

    The original release of his code was in 2010, so quite a bit of time has transpired.  It was originally hosted on codeplex if anyone remembers that.  In the original video

    It was only used for podcasting but he created a library and listed out most of the code necessary to access the rest of the device.

    He made use of libusb.net to take care of the usb side of things and wrote the software in C#.  I stuck with the same format due to my love of the language and difficulties trying to properly compile a driver for Windows.

    I wrote my first version of the software in 2012 and played Mechwarrior 3 with it.

    I would go on to revise the software once or twice a year for several years and several people used it to play.  The problem with this approach was Windows Driver Signing.  Basically unless you paid a lot of money to Microsoft you had to put Windows into Test Mode to allow PPJoy to work.  PPJoy was an intermediary software I used to emulate an HID device or xbox controller in windows.  Eventually PPJoy raised enough money for driver certification but there were still at least 3 pieces of software involved.

    Since then other people have gotten the controller to work in Windows using a proper driver.

    This was recently hosted on Hackaday as well.

    https://hackaday.com/2019/09/13/steel-battalion-controller-grows-up-and-gets-a-job/

    And it was an impressive feat, however taking that approach makes it difficult to make use of the lights appropriately.  You could probably send light commands within the driver, but it would lack flexibility.  It also runs into the issues I ran into before of Windows signing.

    What I realized was that I could emulate an Xbox controller and intercept the rumble commands and make the lights of the controller work in response.

    I did this using my Steel Battalion 64 software in 2018

    However my approach suffered from lag and my lighting approach was not sophisticated  I just blinked all the lights.  I had also done as much as I wanted to with the original software and I took a break.  A new VR game, Iron Rebellion initially announced they would have HID support and it renewed my interest in providing hardware level support for the Steel Battalion Controller.  This also allows it to be used on a standalone headset such as the Quest 2, as they support standard Xinput devices.  I had used a Teensy Microcontroller in the past supporting another old joystick, the Microsoft Sidewinder ForceFeedBack Pro and knew it was capable.  A work project had me look back at the Teensy line and I saw that the new Teensy 4.0/4.1 supported both usb host and device at the same time.  I knew it was now possible to build a hardware level adapter.

    That led me to my newest revision using a Teensy 3.6.  Theoretically works with 4.0/4.1 but the Xinput library was written for 3.6 and I made minimal progress after a week of trying to port the code.  Here is the latest revision.

View project log

  • 1
    Making Connections

    The hardware part of this project is fairly straightforward.

    The hardest part is probably tracking down a Steel Battalion Controller.  Ebay prices as of 2021 show them running north of $300.  Admittedly this is probably not a problem as people interested in this project probably already own one.

    You'll only need to solder 5 pins to the Teensy 3.6 to make this work.  The project contains a full list of parts that you will need.

    If you purchase the cable listed, yellow and black point away from the micro usb port and red is closest to it, with red matching 5V.

    Looking at the pinout, reversing this cable MAY DESTROY your Steel Battalion Controller.  Often times when power is involved you'll find that positive and negative are not opposite from each other, so that polarities won't line up when the cable is reversed.  That is unfortunately NOT the case here.  What we'll do is use a cheap keyboard or mouse to make sure things are working properly before connecting the SBC.

    The USB adapter is actually a 5x2 cable with one row empty.  Make sure the empty row points out.

    That is about it.  The hardware part of this project is simple.  A few small notes.  I had some issues running this off of an unpowered USB hub.  It ran fine when connected directly to my PC.  This may have been a localized issue, but it's best to try this connected DIRECTLY to a pc first.

    Other things to note. I listed a fairly short 0.7 ft xbox -> usb cable adapter.  The MAXIMUM these can run is 2 feet before you may run into issues.  This may not be as big a problem now as it was 10 years ago, but there were plenty of very long adapters which DID NOT work with the SBC.  The SBC already runs a cable close to max USB spec and the long adapters put the length above the maximum.

  • 2
    Installing Arduino

    If you are visiting Hackaday or have done any diy project in the last 10 years you have heard of arduino. 

    I am using the latest release as of November 2021, 1.8.16.  This may or may not work, but as far as I can tell you can simply modify the number to get a specific version.  For example for Windows, to get 1.8.16 you go to.

    https://downloads.arduino.cc/arduino-1.8.16-windows.exe

    However 

    https://downloads.arduino.cc/arduino-1.8.7-windows.exe

    Also works and that is from 2018.

    Here are the linux and mac links:

    https://downloads.arduino.cc/arduino-1.8.16-linux64.tar.xz

    https://downloads.arduino.cc/arduino-1.8.16-macosx.zip

    It's a standard installation, so you should have no problems.

  • 3
    Installing Teensyduino

    Support for Teensy doesn't come standard with Arduino so you have to add it.  I'm using Teensy Version 1.55

    I'm trying to be specific about versions because I've seen things change over time, but I'm not too concerned about long term support as PJRC has supported the Teensy project for more than a decade.

    Here is a link to their site showing how to install:

    https://www.pjrc.com/teensy/td_download.html

    Again, like Arduino this is a fairly straightforward process.  Only catch is to make sure to either select ALL libraries on install or at least check off the USBHost_t36 library to enable USB Host support

View all 7 instructions

Enjoy this project?

Share

Discussions

E.A. Hendrix wrote 12/05/2021 at 02:28 point

Would a teensy 4.0/4.1 work?

  Are you sure? yes | no

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates