RockBand.com


View Full Version : Some interesting data from PS3 Guitar sniffing



lynx44
11-28-2007, 05:48 PM
Over the past couple of days I've started messing around with some code to sniff out the codes that the guitars (PS3 GH3 vs RB) give out on button presses. I've determined some interesting information so far.

First, frets are nearly identical, except it appears that the codes for the yellow and blue ones have been switched. Additionally, there appear to be some differences in the entire byte array in general. Guitar hero seems to have an extra byte in the third position. The rest is pretty simple and self explanatory when running the test program; there's a few bytes that control the whammy, a byte that indicates star power, and additional bytes that represent all the buttons.

My goal is to get a program where you can plug in the GH3 guitar into one USB port on your computer, then run a standard usb cable from your computer to your PS3, and let your computer translate your button presses on the Les Paul into Strat codes. So far I haven't attempted to interface to the PS3, which may or may not be a challenge (hopefully not, I don't see why it would be but I'm certainly not a pro at this stuff and USB can be pretty picky).

Attached is a datasheet which isn't particularly useful to most, although its fairly easy to see the slight differences in the button combinations, and why the Les Paul wouldn't work natively on Rock Band, although it should take very very little effort to get it to work natively in the Rock Band code. Its formatted horribly, but the information is there. Its in Excel and ODS format.

-Matt

HellishFiend
11-28-2007, 05:52 PM
Just from the info youve provided in that post I think we can safely say a patch could easily be made to interpret the communication from the les paul and have it work the way its supposed to. Why this hasnt been done yet is confusing.

Ventura
11-28-2007, 05:54 PM
Wow, nice idea.

If that could actually be possible, and you could write a program to handle the transferring of that information, I'd buy it.

You listening Harmonix?

Senkoy
11-28-2007, 06:03 PM
I'm sure they have to get legal stuff out of the way before they do the patch. As you've shown, the patch itself is probably not an issue. Just getting together with Activition to get all the legal stuff out of the way is what takes time. Hopefully Activition wont drag their feet and will be cooperative with Harmonix so they can get this problem fixed. For now though, i hope they work on a patch or adapter to make the GH2 PS2 guitar to work with RB.

beingmused
11-28-2007, 06:12 PM
Err, Senkoy, considering that

1) The 360 Les Paul works with Rock Band, and
B) Harmonix has every right to make their game open source to the point where it works with outside peripherals

There is 0% chance that "legal issues" are holding this up. Just an oversight by the developers, that I believe they have stated they are going to try and fix.

I'm pretty happy with my strat so it isn't a big deal, but I might pick up a Les Paul if a patch came, just to get my 2nd guitar.

lynx44
11-29-2007, 08:09 AM
I've read a little more into it and it looks like a conversion program may not be possible. The problem is that all USB ports on computers with Type-A (the type that Rock Band and the PS3 has) are "Host" ports, however in order to spoof a Rock Band guitar, the port would have to spoof a client device. I'm going to continue and see if I can get any further, perhaps there is some sort of work around but it looks unlikely.

I'd also just like to point out the datasheet once again. I just want to say that from what I saw, I don't think Red Octane went out of its way to make the Les Paul incompatible, the codes look very similar. Since there was no existing guitar on the PS3, it appears that they made a good effort to follow standard conventions. However, I haven't been able to sniff out the PS2 (I couldn't connect to the device through my USB adapter) or 360 guitars (because I don't have one), and examining those could lead to more evidence whether RO purposely created their guitar differently.

In the end, I think the responsibility lays on both parties simply because both were aware that they were working on guitar games at the same time, and neither contacted each other to make the Guitars compatible. Since the "open standards" aren't openly available from Harmonix, I certainly wouldn't put the blame solely on RO for not following them. In order to create a standard you need to discuss with the major players involved and come to an agreement, otherwise it just won't work.

-Matt

DesiredFX
11-29-2007, 08:16 AM
Matt, you're doing great work, and thanks for all the effort, but one thing to remember is that the issue is not that the signals going through are incorrect, but that, to Rock Band, the Les Paul appears to be a SIXAXIS. This happens as soon as you plug it in--you don't have to press a single key.

Whatever patch they come up with is first going to have to get Rock Band to recognize it as a guitar controller--that shouldn't be too hard, since GH3 makes that distinction itself. But until that happens, the actual effect of the key presses and strums don't mean diddley.

Ultrace
11-29-2007, 08:26 AM
There is 0% chance that "legal issues" are holding this up. Just an oversight by the developers, that I believe they have stated they are going to try and fix.
Unless you're a lawyer or have negotiated talks between the two companies, I don't think this is something you're qualified to state.

metz
11-29-2007, 08:28 AM
What tool are you using to see the output from the different controllers? If you let me know, I could try it out tonight with my RB and X-Plorer 360 controllers when I get home tonight, after the Cowboys-Packers game.

lynx44
11-29-2007, 08:35 AM
Matt, you're doing great work, and thanks for all the effort, but one thing to remember is that the issue is not that the signals going through are incorrect, but that, to Rock Band, the Les Paul appears to be a SIXAXIS. This happens as soon as you plug it in--you don't have to press a single key.

Whatever patch they come up with is first going to have to get Rock Band to recognize it as a guitar controller--that shouldn't be too hard, since GH3 makes that distinction itself. But until that happens, the actual effect of the key presses and strums don't mean diddley.

That may or may not be true, it really depends on how they have it set up. I should be able to intercept all of the packets coming through, I can fake it as if it is the Rock Band control, and block whatever is telling it (if anything) that it is a SIXAXIS. Like I said, it may be technically impossible to output as a client, but if so, I have a computer being the middle man so any sort of handshaking should be able to be faked.

Additionally, another poster mentioned in a different thread that the GH2 and GM guitars identify themselves by outputting button codes (for example, green is "held" down on startup), and if that is the case (which I haven't observed, but it may be true when plugged into the PS3), then a simple button translation would make the difference.

This is just a subset of the data that I could be manipulating, it isn't a complete output of everything that I could potentially spoof. Just a few differences I noticed right off of the bat.

-Matt

Nevermore
11-29-2007, 08:58 AM
If it helps, I remember reading that "left" on the d-pad was continuously held down on the GH 1 and 2 controllers to tell the game that it was a guitar. In fact, I saw a controller online which someone made for $1 that emulated a guitar, and they had to sodder the "left" direction on the d-pad for GH2 to recognize it. So, there's probably something similar going on here. It may be the weird byte that you are seeing in the third position.

Also, the smaller buttons at the base of the Strat must send codes differently somehow. Any idea what the difference in signals is from the "normal" fret buttons?

lynx44
11-29-2007, 09:04 AM
Yeah, I could easily check the smaller "shredding" buttons, maybe thats what the second byte is for actually. Its possible though that its still contained in the first byte, there aren't too many combinations to include in the first, so they may have just combined it, I know I mashed on them a little bit, but I don't remember at the moment.

By the way, the program I'm using is something I wrote; I could post it but the code is so sloppy and I have no clue if it would work on anyone else's system but my own. Its nothing special, I'm sure there are data sniffing USB programs out there that are already available. I'm currently running it in Linux under Fedora 7 using LibUSB. All it does is sit in a continuous loop, while reading and outputting the hex values for the buttons that are pressed. It should be portable to Windows, as there is a win32 version of LibUSB, I just haven't tried yet as its mostly useless at its current state.

Lareden
12-13-2007, 04:37 AM
My goal is to get a program where you can plug in the GH3 guitar into one USB port on your computer, then run a standard usb cable from your computer to your PS3, and let your computer translate your button presses on the Les Paul into Strat codes. So far I haven't attempted to interface to the PS3, which may or may not be a challenge (hopefully not, I don't see why it would be but I'm certainly not a pro at this stuff and USB can be pretty picky).

I've done this exact thing before with other devices. It was fairly easy to capture everything going in and mimick the same output, change the output, or drop the output.

So it seems the button mapping is slightly different but I don't think that's the biggest issue. As with most devices, communication is not one-way. It's likely that the game sends a request for a device descriptor that only the RB guitar will respond to. So, to do the best sniffing, you should capture and forward everything going through the PC while it's used as a pass-through from guitar to PS3.