From 19f3ed11c76d27b44f3121f99f00074553e96d20 Mon Sep 17 00:00:00 2001 From: Shawn Hoffman Date: Mon, 14 Dec 2009 19:24:55 +0000 Subject: [PATCH] Small fix for loading wii dol/elfs with no disc present. Now EmulatedBS2() returns true only if apploader has run (since if it hasn't, we need to load the code ourselves) git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4695 8ced0084-cf51-0410-be5f-012b33b47a6e --- Source/Core/Core/Src/Boot/Boot_BS2Emu.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Source/Core/Core/Src/Boot/Boot_BS2Emu.cpp b/Source/Core/Core/Src/Boot/Boot_BS2Emu.cpp index 86301af929..0f40728728 100644 --- a/Source/Core/Core/Src/Boot/Boot_BS2Emu.cpp +++ b/Source/Core/Core/Src/Boot/Boot_BS2Emu.cpp @@ -308,6 +308,7 @@ bool CBoot::EmulatedBS2_Wii() VolumeHandler::ReadToPtr(Memory::GetPointer(0x3180), 0, 4); // Execute the apploader + bool apploaderRan = false; if (VolumeHandler::IsValid() && VolumeHandler::IsWii()) { UReg_MSR& m_MSR = ((UReg_MSR&)PowerPC::ppcState.msr); @@ -376,6 +377,8 @@ bool CBoot::EmulatedBS2_Wii() DEBUG_LOG(BOOT, "Run iAppLoaderClose"); RunFunction(iAppLoaderClose); + apploaderRan = true; + // Pass the "#002 check" // Apploader writes the IOS version and revision here, we copy it // Fake IOSv9 r2.4 if no version is found (elf loading) @@ -392,10 +395,11 @@ bool CBoot::EmulatedBS2_Wii() PowerPC::ppcState.DebugCount = 0; - return true; + return apploaderRan; } +// Returns true if apploader has run successfully bool CBoot::EmulatedBS2(bool _bIsWii) { return _bIsWii ? EmulatedBS2_Wii() : EmulatedBS2_GC(); -} \ No newline at end of file +}