diff --git a/Source/Plugins/Plugin_Wiimote/Src/EmuDefinitions.h b/Source/Plugins/Plugin_Wiimote/Src/EmuDefinitions.h index c12514dfa0..a6b2594de2 100644 --- a/Source/Plugins/Plugin_Wiimote/Src/EmuDefinitions.h +++ b/Source/Plugins/Plugin_Wiimote/Src/EmuDefinitions.h @@ -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[] = { diff --git a/Source/Plugins/Plugin_Wiimote/Src/EmuMain.cpp b/Source/Plugins/Plugin_Wiimote/Src/EmuMain.cpp index af8171096a..4adc9d46a7 100644 --- a/Source/Plugins/Plugin_Wiimote/Src/EmuMain.cpp +++ b/Source/Plugins/Plugin_Wiimote/Src/EmuMain.cpp @@ -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)); diff --git a/Source/Plugins/Plugin_WiimoteNew/Src/WiimoteEmu/Attachment/Nunchuk.cpp b/Source/Plugins/Plugin_WiimoteNew/Src/WiimoteEmu/Attachment/Nunchuk.cpp index fa3548dbb0..b8db3ee6d2 100644 --- a/Source/Plugins/Plugin_WiimoteNew/Src/WiimoteEmu/Attachment/Nunchuk.cpp +++ b/Source/Plugins/Plugin_WiimoteNew/Src/WiimoteEmu/Attachment/Nunchuk.cpp @@ -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