Wiimote: Show the decrypted Nunchuck calibration values in the log when a real Wiimote and Nunchuck is used. Fixed an earlier bug that made the neutral emulated nunchuck accelerometer values zero, now they are back to 0x80,0x80,0xb3.

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@2104 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
John Peterson
2009-02-04 06:40:05 +00:00
parent 701d4146b6
commit cf303e70e9
11 changed files with 222 additions and 167 deletions

View File

@ -265,10 +265,10 @@ void wiimote_gen_key(wiimote_key *key, u8 *keydata)
Console::Print("rand: %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x\n", rand[0], rand[1], rand[2], rand[3], rand[4], rand[5], rand[6], rand[7], rand[8], rand[9]);
Console::Print("key: %02x %02x %02x %02x %02x %02x\n", skey[0], skey[1], skey[2], skey[3], skey[4], skey[5]);
for(idx=0;idx<7;idx++)
for(idx = 0; idx < 7; idx++)
{
genkey(rand, idx, testkey);
if(!memcmp(testkey,skey,6))
if(!memcmp(testkey, skey, 6))
break;
}
// default case is idx = 7 which is valid (homebrew uses it for the 0x17 case)