From f5f0823867e57c1221fa2b5fc624b330dae68bdb Mon Sep 17 00:00:00 2001 From: Shawn Hoffman Date: Mon, 19 Oct 2009 15:09:22 +0000 Subject: [PATCH] apply patches in the gamecube's bs2 hle, good for things that need to have patches applied very early. misc cleanup git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4436 8ced0084-cf51-0410-be5f-012b33b47a6e --- Source/Core/Core/Src/Boot/Boot_BS2Emu.cpp | 3 +++ Source/Core/Core/Src/HW/ProcessorInterface.cpp | 12 ++++++------ Source/Core/Core/Src/PluginManager.cpp | 4 ++-- 3 files changed, 11 insertions(+), 8 deletions(-) diff --git a/Source/Core/Core/Src/Boot/Boot_BS2Emu.cpp b/Source/Core/Core/Src/Boot/Boot_BS2Emu.cpp index f8a312f758..b509d58d86 100644 --- a/Source/Core/Core/Src/Boot/Boot_BS2Emu.cpp +++ b/Source/Core/Core/Src/Boot/Boot_BS2Emu.cpp @@ -158,6 +158,9 @@ void CBoot::EmulatedBS2(bool _bDebug) PatchEngine::LoadPatches(gameID.c_str()); PowerPC::ppcState.DebugCount = 0; + + // If we have any patches that need to be applied very early, here's a good place + PatchEngine::ApplyFramePatches(); } diff --git a/Source/Core/Core/Src/HW/ProcessorInterface.cpp b/Source/Core/Core/Src/HW/ProcessorInterface.cpp index 51c021a18d..985878f138 100644 --- a/Source/Core/Core/Src/HW/ProcessorInterface.cpp +++ b/Source/Core/Core/Src/HW/ProcessorInterface.cpp @@ -232,20 +232,20 @@ void SetInterrupt(u32 _causemask, bool _bSet) if (_bSet && !(m_InterruptCause & _causemask)) { - DEBUG_LOG(PROCESSORINTERFACE, "Setting Interrupt %s (%s)",Debug_GetInterruptName(_causemask), "set"); + DEBUG_LOG(PROCESSORINTERFACE, "Setting Interrupt %s (%s)", Debug_GetInterruptName(_causemask), "set"); } - if (!_bSet && (m_InterruptCause & _causemask)) + if (!_bSet && (m_InterruptCause & _causemask)) { - DEBUG_LOG(PROCESSORINTERFACE, "Setting Interrupt %s (%s)",Debug_GetInterruptName(_causemask), "clear"); + DEBUG_LOG(PROCESSORINTERFACE, "Setting Interrupt %s (%s)", Debug_GetInterruptName(_causemask), "clear"); } if (_bSet) m_InterruptCause |= _causemask; else - m_InterruptCause &= ~_causemask; // is there any reason to have this possibility? - // F|RES: i think the hw devices reset the interrupt in the PI to 0 - // if the interrupt cause is eliminated. that isnt done by software (afaik) + m_InterruptCause &= ~_causemask;// is there any reason to have this possibility? + // F|RES: i think the hw devices reset the interrupt in the PI to 0 + // if the interrupt cause is eliminated. that isnt done by software (afaik) UpdateException(); } diff --git a/Source/Core/Core/Src/PluginManager.cpp b/Source/Core/Core/Src/PluginManager.cpp index 9f11132db3..0c5ed2d6f7 100644 --- a/Source/Core/Core/Src/PluginManager.cpp +++ b/Source/Core/Core/Src/PluginManager.cpp @@ -389,10 +389,10 @@ Common::PluginPAD *CPluginManager::GetPad(int controller) // Else do this if (OkayToInitPlugin(controller) == -1) { m_pad[controller] = (Common::PluginPAD*)LoadPlugin(m_params->m_strPadPlugin[controller].c_str(), controller); - INFO_LOG(CONSOLE, "LoadPlugin: %i\n", controller); + INFO_LOG(CONSOLE, "LoadPlugin: %i", controller); } else { - INFO_LOG(CONSOLE, "Pointed: %i to %i\n", controller, OkayToInitPlugin(controller)); + INFO_LOG(CONSOLE, "Pointed: %i to %i", controller, OkayToInitPlugin(controller)); m_pad[controller] = m_pad[OkayToInitPlugin(controller)]; } return m_pad[controller];