mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-21 05:09:34 -06:00
Stage1: Introducing MotionPlus as emulated extension, allowing us to boot games that require the MotionPlus itself.
I also already implemented most of the needed data structures and datareport handling for the motionplus-nunchuk passthrough mode, which I'll add up next as well. Wii Sports Resort is now bootable by just using an emulated wiimote (only working under the old wiimote plugin atm, I asked billiard to port my commit into his plugin since he knows his plugin better than me and its less work for him than for me, I kept most parts of my code in modules to simplify that task). Upcoming stage2: Faking the motionplus on the fly on real wiimotes, that means you will be able to play, e.g. Redsteel2 with a real wiimote and nunchuk or wii sports resort with just your real wiimote. and nunchuk, but w/o the need of having a real motionpluscontroller connected. The new Zelda 2010 will benefit by that, since it will require a motionplus controller. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5438 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
@ -196,7 +196,7 @@ void SendReportCoreAccelExt16(u16 _channelID)
|
||||
FillReportAcc(pReport->a);
|
||||
#endif
|
||||
|
||||
if(WiiMapping[g_ID].iExtensionConnected == EXT_NUNCHUCK)
|
||||
if(WiiMapping[g_ID].iExtensionConnected == EXT_NUNCHUK)
|
||||
{
|
||||
#if defined(HAVE_WX) && HAVE_WX
|
||||
FillReportExtension(pReport->ext);
|
||||
@ -233,38 +233,53 @@ void SendReportCoreAccelIr10Ext(u16 _channelID)
|
||||
memset(pReport, 0, sizeof(wm_report_core_accel_ir10_ext6));
|
||||
|
||||
// Make a classic extension struct
|
||||
wm_classic_extension _ext;
|
||||
wm_GH3_extension _GH3_ext;
|
||||
memset(&_ext, 0, sizeof(wm_classic_extension));
|
||||
memset(&_GH3_ext, 0, sizeof(wm_GH3_extension));
|
||||
|
||||
|
||||
#if defined(HAVE_WX) && HAVE_WX
|
||||
FillReportInfo(pReport->c);
|
||||
FillReportAcc(pReport->a);
|
||||
FillReportIRBasic(pReport->ir[0], pReport->ir[1]);
|
||||
#endif
|
||||
if(WiiMapping[g_ID].iExtensionConnected == EXT_NUNCHUCK)
|
||||
if ((WiiMapping[g_ID].bMotionPlusConnected) && (( WiiMapping[g_ID].iExtensionConnected == EXT_NUNCHUK ) || (WiiMapping[g_ID].iExtensionConnected == EXT_NONE)) )
|
||||
{
|
||||
#if defined(HAVE_WX) && HAVE_WX
|
||||
FillReportExtension(pReport->ext);
|
||||
#endif
|
||||
}
|
||||
else if(WiiMapping[g_ID].iExtensionConnected == EXT_CLASSIC_CONTROLLER)
|
||||
{
|
||||
#if defined(HAVE_WX) && HAVE_WX
|
||||
FillReportClassicExtension(_ext);
|
||||
#endif
|
||||
// Copy _ext to pReport->ext
|
||||
memcpy(&pReport->ext, &_ext, sizeof(_ext));
|
||||
}
|
||||
else if(WiiMapping[g_ID].iExtensionConnected == EXT_GUITARHERO)
|
||||
{
|
||||
#if defined(HAVE_WX) && HAVE_WX
|
||||
FillReportGuitarHero3Extension(_GH3_ext);
|
||||
#endif
|
||||
memcpy(&pReport->ext, &_GH3_ext, sizeof(_GH3_ext));
|
||||
}
|
||||
if(WiiMapping[g_ID].iExtensionConnected == EXT_NUNCHUK)
|
||||
{
|
||||
FillReportMotionPlus(pReport->ext, true);
|
||||
|
||||
}
|
||||
else if (WiiMapping[g_ID].iExtensionConnected == EXT_NONE)
|
||||
{
|
||||
FillReportMotionPlus(pReport->ext, false);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
else {
|
||||
if(WiiMapping[g_ID].iExtensionConnected == EXT_NUNCHUK)
|
||||
{
|
||||
FillReportExtension(pReport->ext);
|
||||
}
|
||||
else if(WiiMapping[g_ID].iExtensionConnected == EXT_CLASSIC_CONTROLLER)
|
||||
{
|
||||
wm_classic_extension _ext;
|
||||
memset(&_ext, 0, sizeof(wm_classic_extension));
|
||||
|
||||
FillReportClassicExtension(_ext);
|
||||
|
||||
// Copy _ext to pReport->ext
|
||||
memcpy(&pReport->ext, &_ext, sizeof(_ext));
|
||||
}
|
||||
else if(WiiMapping[g_ID].iExtensionConnected == EXT_GUITARHERO)
|
||||
{
|
||||
|
||||
wm_GH3_extension _GH3_ext;
|
||||
memset(&_GH3_ext, 0, sizeof(wm_GH3_extension));
|
||||
FillReportGuitarHero3Extension(_GH3_ext);
|
||||
|
||||
memcpy(&pReport->ext, &_GH3_ext, sizeof(_GH3_ext));
|
||||
}
|
||||
|
||||
}
|
||||
#endif
|
||||
INFO_LOG(WIIMOTE, " SendReportCoreAccelIr10Ext(0x37)");
|
||||
DEBUG_LOG(WIIMOTE, " Channel: %04x", _channelID);
|
||||
DEBUG_LOG(WIIMOTE, " Size: %08x", Offset);
|
||||
|
Reference in New Issue
Block a user