From 20704fca3da12cd280c7865ed5717f9fd8cb509d Mon Sep 17 00:00:00 2001 From: skidau Date: Fri, 20 Aug 2010 14:57:26 +0000 Subject: [PATCH] Low level emulate the GC IPL (BIOS screen). The GC BIOS now correctly launches the game. JIT the IPL instead of interpreting it. Made LLE BIOS the default (which silently fails to HLE). Relabelled the "HLE the IPL" option to "Skip GC BIOS". git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6113 8ced0084-cf51-0410-be5f-012b33b47a6e --- Source/Core/Core/Src/Boot/Boot.cpp | 11 +++++------ Source/Core/Core/Src/ConfigManager.cpp | 2 +- Source/Core/Core/Src/PowerPC/PowerPC.cpp | 2 +- Source/Core/DolphinWX/Src/ConfigMain.cpp | 2 +- 4 files changed, 8 insertions(+), 9 deletions(-) diff --git a/Source/Core/Core/Src/Boot/Boot.cpp b/Source/Core/Core/Src/Boot/Boot.cpp index 8be1c3611b..60ad7e5c10 100644 --- a/Source/Core/Core/Src/Boot/Boot.cpp +++ b/Source/Core/Core/Src/Boot/Boot.cpp @@ -135,9 +135,9 @@ bool CBoot::LoadMapFromFilename(const std::string &_rFilename, const char *_game return success; } -// This function does *some* of what BS1 does: loading IPL(BS2) and jumping to it -// It does not initialize the hardware or anything else like BS1 does -// We should eventually just load BS1 and let it take care of everything :) +// If ipl.bin is not found, this function does *some* of what BS1 does: +// loading IPL(BS2) and jumping to it. +// It does not initialize the hardware or anything else like BS1 does. bool CBoot::Load_BS2(const std::string& _rBootROMFilename) { // Load the whole ROM dump @@ -148,10 +148,9 @@ bool CBoot::Load_BS2(const std::string& _rBootROMFilename) // Run the descrambler over the encrypted section containing BS1/BS2 CEXIIPL::Descrambler((u8*)data.data()+0x100, 0x1AFE00); - //File::WriteStringToFile(false, data, "decrypted_bs1_bs2.bin"); - //Memory::WriteBigEData((const u8*)data.data() + 0x100, 0x81200000, 0x700); + Memory::WriteBigEData((const u8*)data.data() + 0x100, 0x81200000, 0x700); Memory::WriteBigEData((const u8*)data.data() + 0x820, 0x81300000, 0x1AFE00); - PC = 0x81300000; + PC = 0x81200000; return true; } diff --git a/Source/Core/Core/Src/ConfigManager.cpp b/Source/Core/Core/Src/ConfigManager.cpp index 7bffdbc2f5..5b4eac0565 100644 --- a/Source/Core/Core/Src/ConfigManager.cpp +++ b/Source/Core/Core/Src/ConfigManager.cpp @@ -262,7 +262,7 @@ void SConfig::LoadSettings() ini.Get("GameList", "ListUnknown", &m_ListUnknown, true); // Core - ini.Get("Core", "HLE_BS2", &m_LocalCoreStartupParameter.bHLE_BS2, true); + ini.Get("Core", "HLE_BS2", &m_LocalCoreStartupParameter.bHLE_BS2, false); ini.Get("Core", "EnableOpenCL", &m_LocalCoreStartupParameter.bEnableOpenCL, false); ini.Get("Core", "CPUCore", &m_LocalCoreStartupParameter.iCPUCore, 1); ini.Get("Core", "DSPThread", &m_LocalCoreStartupParameter.bDSPThread, false); diff --git a/Source/Core/Core/Src/PowerPC/PowerPC.cpp b/Source/Core/Core/Src/PowerPC/PowerPC.cpp index 911fe122fc..bc958e16f8 100644 --- a/Source/Core/Core/Src/PowerPC/PowerPC.cpp +++ b/Source/Core/Core/Src/PowerPC/PowerPC.cpp @@ -148,7 +148,7 @@ void Init(int cpu_core) jit = new JitIL; jit->Init(); // ... but start as interpreter by default. - mode = MODE_INTERPRETER; + mode = MODE_JIT; state = CPU_STEPPING; ppcState.iCache.Reset(); diff --git a/Source/Core/DolphinWX/Src/ConfigMain.cpp b/Source/Core/DolphinWX/Src/ConfigMain.cpp index 9677da51c4..39d6723054 100644 --- a/Source/Core/DolphinWX/Src/ConfigMain.cpp +++ b/Source/Core/DolphinWX/Src/ConfigMain.cpp @@ -412,7 +412,7 @@ void CConfigMain::CreateGUIControls() // Core Settings - Advanced sbAdvanced = new wxStaticBoxSizer(wxVERTICAL, GeneralPage, wxT("Advanced Settings")); - AlwaysHLE_BS2 = new wxCheckBox(GeneralPage, ID_ALWAYS_HLE_BS2, wxT("HLE the IPL (recommended)"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator); + AlwaysHLE_BS2 = new wxCheckBox(GeneralPage, ID_ALWAYS_HLE_BS2, wxT("Skip GC BIOS"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator); #if defined(HAVE_OPENCL) && HAVE_OPENCL EnableOpenCL = new wxCheckBox(GeneralPage, ID_ENABLE_OPENCL, wxT("Enable OpenCL"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator); #endif