Sunday, October 31, 2010

Build your own XIM1->PS3 adapter

Alright, here's the tutorial.

The first thing we'll go over is what you'll need. Of course, you'll need an original XIM. The XIM used one of two daughter cards, either the F330 or the F362. My XIM was made using an F330, but this should work with the F362 card, as well.

The second thing that you'll need is a Teensy 2.0 dev board. They're available directly from the manufacturer at PJRC.com or you can also buy one from adafruit.com. If you get it directly from PJRC, you can get it without pins and save a few dollars. I soldered pins onto the one that I bought because I'll most likely use it for other things as well. If you're interested in microcontrollers, the Teensy is a good platform to start with.

The third thing that you'll need is one of the USB cables that you charge your PS3 controllers with. You'll use this USB cable for connecting the adapter to the PS3 and also for programming the Teensy.

Lastly, you're going to need the Teensy loader software and the HEX file that we're going to program the Teensy with. The Teensy loader software can be downloaded from PJRC at this link -> Teensy Loader download. The HEX file can be downloaded from here -> USB HID Gamepad HEX file.

Now it's time for the fun stuff. The first thing you're going to need to do is figure out where to solder the wires to. The connections listed in the picture below are for the F330, so if you've got a F362 you may not be able to use this.



Once you've got all the solder connections done, connect the Teensy to your computer with the USB cable and run the Teensy loader app. In the file menu, click open HEX file and browser to the HEX file you downloaded earlier. Click the AUTO button in the menu and then press the button on the Teensy to load the HEX file onto it. In AUTO mode, the Teensy loader app will automatically program the chip and then reboot it. After being rebooted, it should show up in device manager as a HID gamepad.

The next step is to try it with the PS3. These are the steps that I have found to work best when getting the XIM/Teensy connected to the PS3. First, turn the PS3 on by pressing the power button on the face of the PS3. Next, connect the Teensy-side of the adapter to the PS3. The Teensy will power on at this point. Then you'll need to plug the other side of the XIM into the computer and run the XIM software. The number of updates should be showing somewhere around 125.

Right now there's no PS button emulation since generic HID devices "can't" have one. My initial goal with this project was to create something that could get around whatever restrictions that Sony has implemented, and I've done that without too much trouble. Now it's time to start working on the specific stuff. Also, there's always a possibility that I've managed to switch a few buttons when I'm translating the PSX into USB. If you find a problem, post in the comments and I'll get it fixed.

5 comments:

  1. So uhh, if this gets banned will you be able to update it and make it work again?

    Just want to know before I go ahead and purchase the stuff required, I don't even have a xim adapter right now so I need to buy everything from scratch and that's going to easily cost ~80.

    So just checking

    ReplyDelete
  2. The short answer is yes.

    The long answer:
    As long as there are working USB controllers (either official or 3rd party), there will be a way to update this to make it continue to work. The way that this adapter describes itself to the PS3 when it connects is as a very generic USB gamepad. Given that it's working right now despite the extra restrictions imposed by the 3.50 firmware, I don't think we'll soon be having to update again. However, my final goal will be to fully emulate an official PS3 controller so that the PS3 won't be able to tell the difference between this and an actual controller. Furthermore, I'll probably be releasing the source once I've got it cleaned up.

    ReplyDelete
  3. Also, FWIW, if you're worried about using this over another adapter, I recommend the TAC as a commercially available adapter that continues to work since the 3.50 udpate. I believe that the TAC is officially licensed so it shouldn't ever get blocked, but this adapter will provide more flexibility. If you know how to write code for AVRs, you could add your own buttons to turn rapid fire on and off for specific buttons and other neat things like that. I'm not advertising this as the _only_ working adapter out there, it's just the one that I use. This way I won't ever need another adapter; a quick code tweak should be enough to get it working again if it ever gets blocked.

    ReplyDelete
  4. Oh that's cool, I'm definately looking into buying this as it seems like the best one out there.

    If it isn't too much can you make a short video of your setup and you using the mouse and keyboard comparing it to the updates/sec of the xim 1? or maybe you can just make it with your adapter and I will find another video of the xim 1 to compare it to?

    I just want to see how its setup and how well its working if that's ok

    ReplyDelete
  5. There's a video in an older post here on my blog of it running with the original hardware, but I can post another with it running on the Teensy. I'll get it done tomorrow or the next day.

    ReplyDelete