Need help with GlovePIE

Discussion in 'Wii - Hacking' started by TheRevolution1, Mar 7, 2009.

Mar 7, 2009

Need help with GlovePIE by TheRevolution1 at 3:18 PM (2,469 Views / 0 Likes) 2 replies

  1. TheRevolution1
    OP

    Newcomer TheRevolution1 Newbie

    Joined:
    Mar 7, 2009
    Messages:
    6
    Country:
    Brazil
    Using the wii remote to control the mouse and everything has worked perfectly.


    This is script I'm trying to use(it's the only one that I found that worked with the GH WT guitar)

    CODE/*
    // FoFiX GH Wiitar script 2.0
    // Version 2.1 by Death_au
    // Now supports the GH:WT guitar
    // Now initializes the WT guitar only once
    */

    //GH4 guitar wakeup code:

    if(!var.init)
    WiimotePoke(1, 0x4A400F0, 0x55) // Decrypt
    wait 100ms
    WiimotePoke(1, 0x4A400FB, 0) // Unknown
    //wait 100ms
    //WiimoteDumpBytes(1, 0x4A400F0, 16) // view type
    //wait 100ms
    //WiimotePoke(1, 0x4A400F0, 0xAA) // Encrypt again
    //wait 100ms
    //WiimoteDumpBytes(1, 0x4A40020, 32) // view calibration
    wait 100ms
    WiimotePoke(1, 0x4A40040, 0)
    wait 100ms
    WiimoteSend(1, 0x17, 0x04, 0xA4, 0x00, 0xF0, 0, 16) // get type
    var.init = true
    end if

    var.found = "";
    if WiiGuitar.Exists then var.found += "Guitar@Wiimote";

    if var.found == "" then {
    var.found = "No Guitar found - ";
    }

    var.found += (" - Battery: " + WiiMote.Battery) + "% - ";

    // Debug
    var.dummy = Wiimote.RawForceX
    if WiiGuitar.Green then var.G = "Green" else var.G = ""
    if WiiGuitar.Red then var.R = "Red" else var.R = ""
    if WiiGuitar.Yellow then var.Y = "Yellow" else var.Y = ""
    if WiiGuitar.Blue then var.B = "Blue" else var.B = ""
    if WiiGuitar.Orange then var.O = "Orange" else var.O= ""
    if WiiGuitar.Minus then var.Minus = "-" else var.Minus = ""
    if WiiGuitar.Plus then var.Plus = "+" else var.Plus = ""
    if WiiGuitar.StrumUp then var.Strum = "StrumUp" elseif WiiGuitar.StrumDown then var.Strum = "StrumDown" else var.Strum = ""
    debug = var.found+"Frets: "+var.G+var.R+var.Y+var.B+var.O+var.Minus+var.Plus+"; Strum: "+var.Strum+"; Whammy:"+Wiimote.Classic.R+var.RF+"; Tilt=" + Wiimote.RawForceZ+"; Joystick: X = "+Wiimote.Classic.Joy1X+", Y = "+Wiimote.Classic.Joy1Y;
    //debug = var.wakeup+";" +wiimote.ExpString

    /*---BUTTON MAPPING to Keyboard and PPJoy--*/
    //Configuration:
    //
    //Green - F1
    //Red - F2
    //Yellow - F3
    //Blue - F4
    //Orange - F5
    //Strum Up - enter
    //Strum Down - Right Shift
    //Minus - Page Down
    //Plus - Escape
    //Tilt - Page Down
    //Whammy - Page Up OR PPJoy Analog 0 change in script below
    //NOTE: Joystick doesn't work yet on the GH:WT guitar
    //Joystick Up - Up
    //Joystick Down - Down
    //Joystick Right - Right
    //Joystick Left - Left



    // Guitar Joystick
    Key.Left = (-1.2 < WiiGuitar.JoyX < -0.5) // Joystick moving Left = minus X axis
    Key.Right = (0.5 < WiiGuitar.JoyX < 1.2) // Joystick moving Right = positive X axis
    Key.Up = (-1.2 < WiiGuitar.JoyY < -0.5) // Joystick moving Up = negative Y axis
    Key.Down = (0.5 < WiiGuitar.JoyY < 1.2) // Joystick moving Down = positive Y axis


    // Fret Buttons
    Key.F1 = WiiGuitar.Green //Green
    Key.F2 = WiiGuitar.Red //Red
    Key.F3 = WiiGuitar.Yellow //Yellow
    Key.F4 = WiiGuitar.Blue //Blue
    Key.F5 = WiiGuitar.Orange //Orange


    // Plus and Minus Buttons
    Key.Escape = WiiGuitar.Plus //Menu / Pause


    // Strum Bar
    Key.F12 = WiiGuitar.StrumUp
    Key.RightShift = WiiGuitar.StrumDown

    //Whammy/Killswitch
    Key.Minus = WiiGuitar.Minus
    Key.PageUp = (0.75 < WiiGuitar.WhammyBar < 0.9)
    //ppjoy.Analog0 = WiiGuitar.WhammyBar
    //debug = ppjoy.Analog0

    // Star Power
    //debug = Wiimote.RawForceZ
    if(18 < Wiimote.RawForceZ < 100)
    Key.PageDown = true;
    //Wiimote.Rumble = true;
    else
    Key.PageDown = false;
    //Wiimote.Rumble = false;
    endif

    //END OF FILE


    When I run it GlovePIE gives me a "function or keyname expected, instead of"WiiGuitar.Exists"

    it gives me a ton of those errors for each "WiiGuitar" ex "WiiGuitar.Blue", "WiiGuitar.Green"

    pretty much it finds every one of those as an error.


    Anyone have any suggestions on how to fix this?
     
  2. DvdBos

    Newcomer DvdBos Newbie

    Joined:
    Feb 6, 2009
    Messages:
    6
    Country:
    Italy
    It seems to me (i have the same problem) that wiiguitar is not recognised.
    How to fix this?

    Edit: the strangest thing is that it goes red in "wiiguitar.green", yellow and orange, and strumdown but not in red or blue or strumup.. WTF?
     
  3. DvdBos

    Newcomer DvdBos Newbie

    Joined:
    Feb 6, 2009
    Messages:
    6
    Country:
    Italy
    I found (it seems).
    V. 0.29 does NOT support WiiGuitar
     

Share This Page