All usual disclaimers apply. No warranty of any kind provided. follow these advices at your own risk and expense.
This is a project to remedie the fact that the guitars for Guitar Hero 3 (GH3) and Rock Band (RB) an Playstation 3 (PS3) are not compatible between games. I for one is not happy about buying four guitars when I need only two - and allready have two - one with each game. This DIY project will propose an USB adapter that you can plug in between the PS3 and the wireless receiver, with the result that the game/PS3 will see an Harmonix guitar as an Activision guitar and visa versa.
Plugging the wireless receiver into a PC reveals that the guitar looks like a simple USB HID joystick. Comparing the RB and GH3 guitar shows only a few differences to what button does what. The RB guitar is implemented has a compound device with a usb HUB. As I like AVR's I'll use two ATmega USB devices for this plug: one upstream to ps3 acting as the device. one downstream to the guitar adapter acting as a PS3. Now there is a problem with the downstream side and RB's hub thing. the USB port on AVR is not capable of driving a hub (according to specs).. we'll see a about that in a moment...
For prototyping the Atmel USB key is great. I have just duct-taped two of them together and strapped a few wires across: Vcc, Gnd and SPI signals.
The design is pretty simple. The large (128k flash) avr takes care of the host usb tasks interfacing the guitar adapter. On the PS3 side things are much simpler. We don't need the otg capabilities, and the usb device code is also small.
For communication between the two mcu's I've used the serial interface (spi). It's simple and more than fast enough. It's a master - client interface, but roles can be switched if needed. Typically guitar side will stream controller status to the ps3 side and up to the ps3 - eg the guitar side will be master. If for example, we want to be able to upgrade the firmware on a pc we can signal a role switch and push firmware for the guitar side mcu down through the ps3/pc faced mcu.
In the end I got a few boards manufactured:
USB-AVR driving a hub
Peace of cake actually.. To some extent. The AVR has 7 pipes available, but one can not alter the packet sequence bit, nor send the low speed preamble.
The first limitation is not a problem here.. Each pipe holds its own sequence bit and we'll only need one pipe for the hub (control), and two for the guitar (interrupt in, interrupt out). It may also be possible to trick the software to always leave the connection in sequence "0", (by sending a dummy packet if sequence stops at '1') but that will be for some other time - it's not an issue for the problem at hand!
The last one is a bit harder. Without the preamble there is no way to access a low speed device behind a full speed hub (they all are).. Fortunately that's no problem for this project, as the compound device is always full speed.
Theory of operation
Use one AVR as a PS3 double ("host side"), initialize the guitar adapter as the PS3 would. At connect we communicate to the other AVR ("client side") whatever we have a RB or GH3 controller connected. When the initialization is complete, we continuously prosess HID reports (button presses from the controller) and forward the information in a compressed form over the SPI bus.
Once the client side knows the type of guitar connected, it will signal it's ready state to the PS3 and lie about it identity - if a RB guitar is connected, it claims to be a GH3 guitar etc. Every time the PS3 asks for a new HID report the client mcu will look up in its store if we have received new information from the host mcu. It will reformat the information to handle differences between the two guitars and build an authentic hid report for the selected guitar and pass this on to the PS3 and the game.Code
Works great, Activision/Harmonix can just keep on blaming each other, I'll just keep playing Rock Band with my GH3 guitar !
The RB guitar feels a lot cheaper than the GH3 counter part. Also tilt sensing is "on-off" for RB, while analog for GH3, suggesting cheaper hardware inside.