Small change to my last commit, thanks for Billiard passing me the proper checksum for the old used calibration data. cheers!

I changed the checksum in the new wiimote plugin as well.

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5523 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
snzgoo 2010-05-28 03:13:33 +00:00
parent 58d64625f9
commit 99d9aa0613
3 changed files with 5 additions and 16 deletions

View File

@ -147,20 +147,9 @@ static const u8 nunchuck_calibration[] =
0xb3,0xb3,0xb3,0x00, // x, y, z g-force values
0xff, 0x00, 0x80, 0xff, // 0xff max, 0x00 min, 0x80 = analog stick x and y axis center
0x00, 0x80, 0xee, 0x43 // checksum on the last two bytes
// In fact, this checksum is invalid. Games that validate this checksum will write 0x01
// to register 0xA400F3 when invalid) snzgoo
// However, as long the game doesn't care about the checksum(98% doesn't, RedSteel2/Wii SportsResort does tho., probably most MotionPlus games), it won't matter.
0x00, 0x80, 0xec, 0x41 // checksum on the last two bytes
};
//This is real calibration data with a proper valid checksum.
static const u8 nunchuck_calibration_valid[] =
{
0x7d, 0x80, 0x80, 0x1a,
0xb1, 0xb2, 0xb4, 0x08,
0xe5, 0x1c, 0x80, 0xde,
0x21, 0x7c, 0x07, 0x5c
};
static const u8 wireless_nunchuck_calibration[] =
{

View File

@ -519,10 +519,10 @@ void UpdateExtRegisterBlocks(int Slot)
memset(g_RegMotionPlus[Slot],0,sizeof(g_RegExt[0]));
memcpy(g_RegMotionPlus[Slot], motionplus_register, sizeof(motionplus_register));
memcpy(g_RegMotionPlus[Slot] + 0x20, motion_plus_calibration, sizeof(motion_plus_calibration)); //reg 32bytes 0x20-3f;
memcpy(g_RegMotionPlus[Slot] + 0x40, nunchuck_calibration_valid, sizeof(nunchuck_calibration_valid));
memcpy(g_RegMotionPlus[Slot] + 0x40, nunchuck_calibration, sizeof(nunchuck_calibration));
memcpy(g_RegMotionPlus[Slot] + 0xfa, motionplusnunchuk_id, sizeof(motionplusnunchuk_id));
memcpy(g_RegExt[Slot] + 0x20, nunchuck_calibration_valid, sizeof(nunchuck_calibration_valid));
memcpy(g_RegExt[Slot] + 0x30, nunchuck_calibration_valid, sizeof(nunchuck_calibration_valid));
memcpy(g_RegExt[Slot] + 0x20, nunchuck_calibration, sizeof(nunchuck_calibration));
memcpy(g_RegExt[Slot] + 0x30, nunchuck_calibration, sizeof(nunchuck_calibration));
memcpy(g_RegExt[Slot] + 0xfa, nunchuck_id, sizeof(nunchuck_id));

View File

@ -16,7 +16,7 @@ static const u8 nunchuck_calibration[] =
// 0x80 = analog stick x and y axis center
0xff, 0x00, 0x80,
0xff, 0x00, 0x80,
0xee, 0x43 // checksum on the last two bytes
0xec, 0x41 // checksum on the last two bytes
};
// nunchuk buttons