If reconnect nunchuck, it shows you as player 1 instead of the 4 lights on.
if(R32((u32)((u8*)buffer+8)) == 0xA4200000)
{
stat->controller = C_NUN;
dbgprintf("Connected Wired Nunchuck\n");
}
Good luck ! Even if I wouldn't use a nuchuck, let's hope you fix this for finaly have people happy.
nakata6790 is not the one responsible of providing the code patches, I am...nakata6790 do you know about programming? I dont know how but i looked at the code, and its weird thatthat+ is there http://www.4shared.com/photo/zZQQT5mqce/code.html
If i´m wrong just dont care about this
Just tested Nintendont Nunchuck Attempt MOD 3.dol.
Results:
I connect wiimote & NC, start Nintendont from HBC. No responce (except power button, see below*).
Only feedback is that when NC is connected, wiimote light #1 is on. When NC is disconnected, all wiimote lights are ON (so the mod recognizes that an attachment NC is on the wiimote, but that's it). If i reconnect NC, light #1 is on again.
*If i keep wiimote Power button pressed, all lights go off, so that is registered.
If i repeat the above with CC connected to the wiimote, i only get feedback from CC left analog stick. If i press any wiimote button (besides the power) simultaneously with CC left stick, i still get no button feedback, only left CC stick. Otherwise (lights & such) are exactly like NC with connect- disconnect attempts.
Try left shifting all your wiimote button offsets left 4. Note that minus is defined as 0x0010 normally, but in https://code.google.com/p/nintendon-t/source/browse/trunk/kernel/BT.h it's 0x0100
Button Plus has 0x1000, if I were to shift it it would be 0x10000 and that would be out of place, unless it is 0x0001.+#define WM_BUTTON_TWO 0x0001
+#define WM_BUTTON_ONE 0x0002
+#define WM_BUTTON_B 0x0004
+#define WM_BUTTON_A 0x0008
+#define WM_BUTTON_MINUS 0x0010
+#define WM_BUTTON_HOME 0x0080
+#define WM_BUTTON_LEFT 0x0100
+#define WM_BUTTON_RIGHT 0x0200
+#define WM_BUTTON_DOWN 0x0400
+#define WM_BUTTON_UP 0x0800
+#define WM_BUTTON_PLUS 0x1000
It doesn't make sense for Plus, but try it for the other buttons, and if it works Plus can be figured out later.You mean doing something like this:
0x0010 -> 0x0100
0x0020 -> 0x0200
And so on?
If that were the case, I will be missing the last button:
Button Plus has 0x1000, if I were to shift it it would be 0x10000 and that would be out of place, unless it is 0x0001.
Is this what you were refering to?
Or... ?
It doesn't make sense for Plus, but try it for the other buttons, and if it works Plus can be figured out later.
if(BTPad[chan].used & C_NUN)
{
//Pad[chan].triggerZ = BTPad[chan].triggerZ;
//if(BTPad[chan].button & 0x01)
// button |= PAD_TRIGGER_Z;
//Pad[chan].triggerC = BTPad[chan].triggerC;
//if(BTPad[chan].button & 0x02)
// button |= PAD_TRIGGER_R;
if(BTPad[chan].button & 0x01)
button |= PAD_TRIGGER_Z;
if(BTPad[chan].used & C_WM)
{ /* Define wiimote buttons */
if(BTPad[chan].button & WM_BUTTON_B)
button |= PAD_BUTTON_B;
if(BTPad[chan].button & WM_BUTTON_A)
button |= PAD_BUTTON_A;
if(BTPad[chan].button & WM_BUTTON_PLUS)
button |= PAD_BUTTON_START;
if(BTPad[chan].button & WM_BUTTON_HOME)
button |= PAD_BUTTON_MENU;
}
}