Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

Nyko GH3 Controller problem

Sofakid
2008-08-12
2013-05-23
  • Sofakid
    Sofakid
    2008-08-12

    Hi,

    I'm reading everywhere that people can use their Guitar Hero 3 Les Paul controller with Darwiin remote.

    I'm poor so I got the Nyko knock-off guitar... It works fine in GH3 for wii, but it doesn't work with darwiin-remote.

    What happens:

    1) in the events-log, the following message happens every second or so:

    === Expansion port changed status ===

    2) trying to open the classic controller menu, it opens about 1cm then turns around and slides away..

    3) Buttons on the wiimote work, buttons on the guitar do nothing.

    I realize it would be hard to fix this without a Nyko Frontman guitar, but I'm a C programmer, and I'd be happy to help fix this. Just point me to the right files..

     
    • Sofakid
      Sofakid
      2008-08-12

      update, examining my console logs:

      2008-08-06 20:56:11.532 DarwiinRemote[657] ** Expansion Port Disabled
      2008-08-06 20:56:11.832 DarwiinRemote[657] ** Expansion Port Disabled
      2008-08-06 20:56:11.961 DarwiinRemote[657] ** Expansion Port Disabled
      2008-08-06 20:56:12.083 DarwiinRemote[657] ** Expansion Port Disabled
      2008-08-06 20:56:12.206 DarwiinRemote[657] ** Expansion Port Disabled
      2008-08-06 20:56:12.350 DarwiinRemote[657] ** Expansion Port Disabled

      seems more frequent than every few seconds, more like a few every second.

      examining WiiRemote.m now..

       
    • Sofakid
      Sofakid
      2008-08-12

      btw, another reason i suspect it's a difference in the guitar is that the nyko frontman doesn't work with the Wii homebrew "GuitarFun" either...

      i think i've tracked it down to either of the following lines in WiiRemote.m:

      647: ret = [self writeData:(darr){0x00} at:(unsigned long)0x04A40040 length:1]; // Initialize the device

      or maybe

      656: IOReturn ret = [self readData:0x04A400F0 length:16]; // read expansion device type

      as both of these need to succeed in order to: _isExpansionPortAttached = (ret == kIOReturnSuccess);

      What are these doing (besides what it says in the comments)?
      Is it just checking?
      Can it be safely ignored?

      i'll turn debugging on and tinker with it at home tonight..

       

       
    • Sofakid
      Sofakid
      2008-08-13

      I had to add a case for 0xff in the switch in handleWriteResponse:

      switch (WII_DECRYPT(dp[21])) {
      case 0x00:
        NSLogDebug (@"Nunchuk connected.");
        ...
      case 0x01:
        NSLogDebug (@"Classic controller connected.");
        ...
      case 0xff:
        NSLogDebug (@"Nyko Frontman controller connected.");
        if (expType != WiiClassicController) {
          expType = WiiClassicController;
          [[NSNotificationCenter defaultCenter] postNotificationName:WiiRemoteExpansionPortChangedNotification object:self];                   
      }
      break;

      but it is still connecting and then disconnecting repeatedly.... some debugging output:

      2008-08-12 22:29:54.474 DarwiinRemote[6229] Updating Report Mode
      2008-08-12 22:29:54.490 DarwiinRemote[6229] Status Report (0x2)
      2008-08-12 22:29:54.490 DarwiinRemote[6229] Device Attached
      2008-08-12 22:29:54.507 DarwiinRemote[6229] Wrote init 0x01, ret == 0, should == 0
      2008-08-12 22:29:54.514 DarwiinRemote[6229] Expansion Device initialized
      2008-08-12 22:29:54.514 DarwiinRemote[6229] Status Report (0x2)
      2008-08-12 22:29:54.514 DarwiinRemote[6229] Device Attached
      2008-08-12 22:29:54.514 DarwiinRemote[6229] handleRAMData (0x21) addr=0x20
      2008-08-12 22:29:54.515 DarwiinRemote[6229] Read Wii calibration
      2008-08-12 22:29:54.515 DarwiinRemote[6229] Write data response: 0 0 12 0
      2008-08-12 22:29:54.546 DarwiinRemote[6229] Write data response: 0 0 16 0
      2008-08-12 22:29:54.546 DarwiinRemote[6229] handleRAMData (0x21) addr=0xf0
      2008-08-12 22:29:54.546 DarwiinRemote[6229] Expansion device connected.
      2008-08-12 22:29:54.546 DarwiinRemote[6229] Nyko Frontman controller connected.
      2008-08-12 22:29:54.547 DarwiinRemote[6229] Enabling expansion port.
      2008-08-12 22:29:54.620 DarwiinRemote[6229] ** Expansion Port Enabled
      2008-08-12 22:29:54.620 DarwiinRemote[6229] Updating Report Mode
      2008-08-12 22:29:54.636 DarwiinRemote[6229] Status Report (0x10)
      2008-08-12 22:29:54.638 DarwiinRemote[6229] Device Detached, dp[4] = 10
      2008-08-12 22:29:54.639 DarwiinRemote[6229] Disabling expansion port.
      2008-08-12 22:29:54.640 DarwiinRemote[6229] ** Expansion Port Disabled
      2008-08-12 22:29:54.640 DarwiinRemote[6229] Updating Report Mode
      2008-08-12 22:29:54.657 DarwiinRemote[6229] handleRAMData (0x21) addr=0x20
      2008-08-12 22:29:54.657 DarwiinRemote[6229] Status Report (0x12)
      2008-08-12 22:29:54.657 DarwiinRemote[6229] Device Attached
      2008-08-12 22:29:54.681 DarwiinRemote[6229] Wrote init 0x01, ret == 0, should == 0
      2008-08-12 22:29:54.688 DarwiinRemote[6229] Expansion Device initialized
      2008-08-12 22:29:54.688 DarwiinRemote[6229] Write data response: 0 0 12 0
      2008-08-12 22:29:54.688 DarwiinRemote[6229] Write data response: 0 0 12 0
      2008-08-12 22:29:54.689 DarwiinRemote[6229] Write data response: 0 0 16 0
      2008-08-12 22:29:54.715 DarwiinRemote[6229] handleRAMData (0x21) addr=0xf0
      2008-08-12 22:29:54.715 DarwiinRemote[6229] Expansion device connected.
      2008-08-12 22:29:54.715 DarwiinRemote[6229] Nyko Frontman controller connected.
      2008-08-12 22:29:54.715 DarwiinRemote[6229] Enabling expansion port.
      2008-08-12 22:29:54.732 DarwiinRemote[6229] ** Expansion Port Enabled
      2008-08-12 22:29:54.732 DarwiinRemote[6229] Updating Report Mode
      2008-08-12 22:29:54.749 DarwiinRemote[6229] Status Report (0x10)
      2008-08-12 22:29:54.749 DarwiinRemote[6229] Device Detached, dp[4] = 10
      2008-08-12 22:29:54.750 DarwiinRemote[6229] Disabling expansion port.
      2008-08-12 22:29:54.751 DarwiinRemote[6229] ** Expansion Port Disabled

      over and over and over....

      any ideas? how can i debug this?

       
    • Sofakid
      Sofakid
      2008-08-13

      a note about this line in the debug: Wrote init 0x01, ret == 0, should == 0

      i was experimenting with different init values, it should be 0x00, same behaviour with 0x00..

      i guess i'll try a bluetooth sniffer or something tonight..