Next Generation Emulation banner

Rock Band for PS2

1 reading
24K views 124 replies 11 participants last post by  kurtsky  
#1 ·
As another poster said a couple months back, this game appears to run fast enough to be playable but you can't get past the main menu because it doesn't find an applicable controller.

Shouldn't it be possible to write a fairly simple patch to return "guitar" when the game "asks" what's plugged in? I would gladly be working on this, but I'm no programmer.

I realize Refraction said getting the game playable would require "changing a lot of bits" but... honestly, what else is preventing it from getting past the menu, aside from the failure to return the proper identification of the controller? If it's not as simple as I'm thinking I would appreciate at least a quick explanation of why apart from "it would be a lot of work" or "it doesn't work that way".
 
#2 ·
currently the way PCSX2 handles controllers, it always says there is a DualShock2 controller inserted.
and then the Pad Plugin takes it from there...

but what you're asking demands a rewrite on how PCSX2 handles input.
You'll also need to know what information the RockBand guitar sends to let the original PS2 acknowledge that it is a RB guitar.

Chickenliver, made a hack of his lilypad plugin that lets you play using an xBox360 guitar connected to your PC; thats cuz the game lets you play using a DualShock2 controller.
but RockBand dosn't let you play at all unless you have the RB guitar inserted, so the only way to be able to play the game is if the code for PCSX2 input is rewritten.
and its probably best that the devs work on other problems, since 99% of the time, games use the original DualShock2 controller.
 
#3 ·
Also, there's not a whole lot of info available on either Guitar. I'm not sure anyone even knows how exactly how either Guitar identifies itself. To get that information, you'd either need to read through a fair bit of PS2 assembly (Fun!) or write a homebrew PS2 thing to get that info from a real Guitar (Also fun!).

Don't see anyone without a Guitar wasting his time on the reading PS2 assembly option, so you basically need someone with a fair bit of knowledge, a guitar, and enough interest and time to figure everything out.
 
#6 ·
#7 ·
It's unlikely they identify themselves as dualshock 2's with the d-pad continuously pressed, unless they support dualshock 2 native mode and have two force feedback axes. Even if they do, it seems pretty unlikely to me that they send the exact same identification info as a dualshock 2.
there is a clue to it here, by diving in to the padlib driver found on ps2dev

Code:
/*
 * Connected pad type
 */
#define PAD_TYPE_NEJICON    0x2
#define PAD_TYPE_KONAMIGUN  0x3
#define PAD_TYPE_DIGITAL    0x4
#define PAD_TYPE_ANALOG        0x5
#define PAD_TYPE_NAMCOGUN   0x6
#define PAD_TYPE_DUALSHOCK    0x7

/*
 * Get pad info (digital (4), dualshock (7), etc..)
 * ID: 3 - KONAMI GUN
 *     4 - DIGITAL PAD
 *     5 - JOYSTICK
 *     6 - NAMCO GUN
 *     7 - DUAL SHOCK
 *
 * NOT SUPPORTED on module rom0:padman
 */
int
padInfoMode(int port, int slot, int infoMode, int index)
{

    struct pad_data *pdata;

    pdata = padGetDmaStr(port, slot);    

    if (pdata->ok != 1)
        return 0;
    if (pdata->reqState == PAD_RSTAT_BUSY)
        return 0;

#ifdef ROM_PADMAN
    return 0;  // Can't do anything useful here :(
#else
    switch(infoMode) {
    case PAD_MODECURID:
        if (pdata->modeCurId == 0xF3)
            return 0;
        else
            return (pdata->modeCurId >> 4);
        break;

    case PAD_MODECUREXID:
        if (pdata->modeOk == pdata->ok)
            return 0;
        return pdata->modeTable[pdata->modeCurOffs];
        break;

    case PAD_MODECUROFFS:
        if (pdata->modeOk != 0)
            return pdata->modeCurOffs;
        else
            return 0;
        break;

    case PAD_MODETABLE:
        if (pdata->modeOk != 0) {
            if(index == -1) {
                return pdata->nrOfModes;
            }
            else if (pdata->nrOfModes < index) {
                return pdata->modeTable[index];
            }
            else {
                return 0;
            }
        }
        else
            return 0;
        break;
    }
    return 0;
#endif
}


/*
 * mode = 1, -> Analog/dual shock enabled; mode = 0 -> Digital  
 * lock = 3 -> Mode not changeable by user
 */
int
padSetMainMode(int port, int slot, int mode, int lock)
{
    
    *(u32 *)(&buffer[0])=PAD_RPCCMD_SET_MMODE;
    *(u32 *)(&buffer[4])=port;
    *(u32 *)(&buffer[8])=slot;
    *(u32 *)(&buffer[12])=mode;
    *(u32 *)(&buffer[16])=lock;
        
    if (sif_call_rpc(&padsif[0], 1, 0, buffer, 128, buffer, 128, 0, 0) < 0)
        return 0;

    if (*(int *)(&buffer[20]) == 1) {
        padSetReqState(port, slot, PAD_RSTAT_BUSY);
    }
    return *(int *)(&buffer[20]);    
}
I suppose the only way to find out would be to plug a guitar in, fire some crap at the SIO and see what identifier we get back :p
 
#8 · (Edited)
Indeed. Would also need the response to a couple configuration mode queries: QUERY_MODEL (0x45), QUERY_COMB (0x47), and QUERY_MODE (0x4C) (If it's any different from a dualshock). Think that's all, unless it has to be initialized differently than a standard analog pad. If anyone ever gets me the info, I'd be happy to add support.

I'm also not sure if there are any differences between GH guitars and RB guitars. Think I read somewhere about one game adding support for the other's guitars, so I assume there's some difference, but I'm not sure.
 
#9 ·
I'm also not sure if there are any differences between GH guitars and RB guitars. Think I read somewhere about one game adding support for the other's guitars, so I assume there's some difference, but I'm not sure.
afaik the GH guitar can be used on RB. i mean after all, its all made by Harmonix ;p
 
#10 ·
#11 ·
The PS2 Guitar Hero guitars work with Rock Band in so far as I know. The Xbox 360 Guitar Hero guitars work with Rock Band as well, again, in so far as I know. The problem you linked to seems to be PS3 specific.

I'll be reading up on everything that'd be involved in getting you the info you need, ChickenLiver, but I am /very/ far from that goal at the moment... and I suspect it's going to require access to an actual PS2, with the actual PS2 guitar, correct? Unfortunately I have neither, so my only hope at this point (if I am correct) is that some other generous and better equipped soul will figure it out and send you the necessary info.

I would love to get this game working.
 
#12 ·
Guitar Compatibility Charts - Features at GameSpot
the link above says that the Guitar Hero controller for PS2, is compatible with Rock Band for PS2.

and that link that silent-circuit posted is very interesting. All the guy does is solder a the left d-pad so its always pressed (on a ps1 controller), and Guitar Hero recognizes it as a Guitar.
 
#13 · (Edited)
Very good info -- thanks for confirming with that chart. I should've done a search myself, not been so lazy. :)

I suspect this would be a lot easier if it worked properly with all the games when you used a PS2 controller, but as the guy that wrote the tutorial said, it is for some reason important to use a PS1 controller, or Guitar Hero II (and I suspect III and Rock Band as well, though the tutorial hasn't been updated since it was written to reflect this) won't recognize it as a guitar, so I imagine we will still run in to the "has to be identified differently" issue.
 
#14 · (Edited)
Ok, so all ps2 guitars seem to be compatible, which simplifies things a lot. If they weren't compatible, there'd have to be something else going on, which is why I thought I'd need more low-level info.

If it just identifies itself as a PS1 controller with the d-pad always down, as silent-circuit said, that shouldn't be too hard to manage. If someone provides me with a blockdump of Rock Band (Just up to some point past where it complains about no guitar being connected), I'll try that and see how it goes.

Edit: And yea, if I needed that low-level info, someone would have to have access to a guitar, a PS2, and a homebrew application to send the guitar messages and display its responses (Or some other way to monitor its responses). Or have to spend time digging through PS2 assembly (Which might be made easier through the use of PCSX2).
 
#16 ·
Just use Linuzappz CDVD plugin and enable block dump. Then run the game up until it complains (Oh yea...can't get past that part..Didn't realize that. Doesn't matter, though). Exit the emulator, and you'll have the dump. It's basically a partial disk image, only having the parts that were loaded while the emulator ran. *Very* handy for debugging.
 
#19 ·
Try this. It won't work as a normal pad (Well...will always has left down, at least). I'm not sure if it'll work, but the blockdump ends up in a funky loop after I get to the screen that says press start, just when it should be telling you what kind of controller you have plugged in.
i tried it with Guitar Hero II and i get really weird behaivior with that plugin.

no buttons work.
also, my mouse seems to be bounded inside the GSdx's window.
meaning i can't move my mouse outside of PCSX2.

are you sure u uploaded the correct plugin? :p
 
#20 · (Edited)
Not sure about the mouse thing - haven't touched anything that would cause that, but are you sure nothing works? Did you try the "frets"? Remember that guitars lack at least 2 buttons. Cross stopped working for me in the no-RB-save complaint menu in RB when I added the auto-hold-left-down thing, but one of the frets worked fine (Can't remember if only one worked or they all did).

Edit: On second thought... If you have mouse enabled, and don't have the GSDX + MTGS mouse hide hack, that's just the behavior you could get... I think...Or maybe mouse disabled and the hack enabled? Tell me your exact LilyPad mouse settings in the general tab and what GS plugin you're using. Also, if you tried using the guitar button, make sure you don't have the same button bound to "mouse" or something.
 
#21 · (Edited)
well i didn't change any of the mouse options,
all i did was load the plugin, set "G" key for Guitar mode, and then played the game.

should i have remaped all my keys? or maybe delete the old lilypad.ini

... as soon as i switched back to the old plugin, everything worked and my mouse wasn't bound to the screen.
and i have mouse disabled, and all hacks disabled as well...

i'll try again...




edit:

ok i deleted the .ini file and tried again.

i tried persona 3, and the buttons worked.
i tried guitar hero II, and none of the buttons worked.

so i guess guitar hero II is reading the controller as a guitar, but the normal keys don't work.

heres what i think...
in the link silent-circuit posted, the guy uses a PS1 controller to make the guitar. he said that the PS2 controllers have analog sensitivity on their buttons, and it won't work with Guitar Hero II; so thats why he uses a PS1 controller, since its digital keys...
but he does say that using a PS2 controller would work on Guitar Hero I, but i dont' have Guitar Hero I, so i can't try it out.

we'll so far, I can confirm that by pressing the left dpad, is how Guitar Hero identifies a guitar.


btw, i still have that weird problem with the mouse pointer. It is bound to the GSdx game window, but as soon as i switch back to the old plugin, it goes back to being normal...
i have mouse disabled, and lilypad hacks disabled. so its weird...
 
#22 · (Edited)
Mouse thing is due to a completely unrelated change I made a little while back. I removed some redundant mouse steal/release code to clean things up a little, but accidentally made it steal the mouse whenever "Don't start with mouse focus" wasn't checked, even when mouse was disabled. Try this version. That's the only change. Still want to have you try it, since even without the fix, I didn't have that issue. My cursor jumped to the PCSX2 window, but I could freely move it out.

Edit: Guitar Hero 2 is probably just coded to support dualshock 2 native mode, so it checks the model response to see if it's a dualshock 2. GH1, on the other hand, probably just sees d-pad left down, 2 analog axes, 2 modes, and is happy. Anyhow, if I get confirmation this works, I can probably remove the old guitar stuff (As the game presumably handles all the extra behaviors I coded in itself) and just make a single toggle for each pad.
 
#23 · (Edited)
I was just about to make a similar thread!

I have the 360 guitar and tried to play Rock Band today. I can't though, it says I need to plug in the mic to play. But I wanna play with the 360 guitar the guitar and bass part of the game. All your talking about axis and whatever confuses me. If you find a solution please write it in simple english ;)

I also tried to play Guitar Hero 2 today! But it strums as I press the frets. I read in a thread that you guys got it to work properly, but again, I didn't understand much of it!
Please provide me with screenshots of your keybindings! :)

Thanks!

EDIT: I just tried the plugin above and it detects my 360 guitar! I just need to change the buttons (the buttons aren't the same as GH2, circle is red fret and some other changes)


EDIT 2:

1st Fret: R2
2nd Fret: Circle
3rd Fret: Triangle
4th Fret: Cross
5th Fret: Square


How do I bind the tilt activation? I seem to have it bound on wrong button! (IN GH2 too! It's not RBs fault!)
 
#24 ·
I was just about to make a similar thread!

I have the 360 guitar and tried to play Rock Band today. I can't though, it says I need to plug in the mic to play. But I wanna play with the 360 guitar the guitar and bass part of the game. All your talking about axis and whatever confuses me. If you find a solution please write it in simple english ;)

I also tried to play Guitar Hero 2 today! But it strums as I press the frets. I read in a thread that you guys got it to work properly, but again, I didn't understand much of it!
Please provide me with screenshots of your keybindings! :)

Thanks!

EDIT: I just tried the plugin above and it detects my 360 guitar! I just need to change the buttons (the buttons aren't the same as GH2, circle is red fret and some other changes)


EDIT 2:

1st Fret: R2
2nd Fret: Circle
3rd Fret: Triangle
4th Fret: Cross
5th Fret: Square


How do I bind the tilt activation? I seem to have it bound on wrong button! (IN GH2 too! It's not RBs fault!)
If you do a search for "lilypad guitar" you will find a thread where coolcool34 or something like that was asking about Guitar Hero II and the 360 Guitar and ChickenLiver made a modified version of the plugin to make it work. I would suggest that if you want to play Guitar Hero you should find that thread and read the directions there. We haven't managed to get Rock Band to work right just yet.


Also, @ChickenLiver, would you like me to put the memcard I'm using with the rockband basic save data on it somewhere? That might let you get past the crash point, since the blockdump doesn't necessarily include the "if no save then write save" section and only the "if save then load and continue".
 
#26 · (Edited)
Umm.. Rock Band works for me. I just need help to get the tilt activation to work and I also need help with the calibrating (It's really hard to calibrate it! Small lags ruin it!)

I have played two career songs on expert.
...with the above plugin? Awesome! Not sure about the tilt activation thing, hopefully someone else can help there. Calibrating probably isn't going to fix the problem, unfortunately. If you use ZeroSPU2 you can go in to options and check the "sync box" -- I think its description includes something about DDR and Guitar Hero -- and try that. I think the main issue is going to be that the machine you're using isn't fast enough. What are your specs?