mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-09-07 18:16:23 +00:00
Merge pull request #5465 from sepalani/gc-bios
Tools: Load GameCube BIOS added
This commit is contained in:
commit
f4190ab1c4
12 changed files with 78 additions and 16 deletions
|
@ -276,7 +276,10 @@ bool CBoot::BootUp()
|
|||
{
|
||||
SConfig& _StartupPara = SConfig::GetInstance();
|
||||
|
||||
NOTICE_LOG(BOOT, "Booting %s", _StartupPara.m_strFilename.c_str());
|
||||
if (_StartupPara.m_BootType == SConfig::BOOT_BS2)
|
||||
NOTICE_LOG(BOOT, "Booting %s", _StartupPara.m_strBootROM.c_str());
|
||||
else
|
||||
NOTICE_LOG(BOOT, "Booting %s", _StartupPara.m_strFilename.c_str());
|
||||
|
||||
g_symbolDB.Clear();
|
||||
|
||||
|
|
|
@ -218,13 +218,13 @@ static GPUDeterminismMode ParseGPUDeterminismMode(const std::string& mode)
|
|||
}
|
||||
|
||||
// Boot the ISO or file
|
||||
bool BootCore(const std::string& _rFilename)
|
||||
bool BootCore(const std::string& filename, SConfig::EBootBS2 type)
|
||||
{
|
||||
SConfig& StartUp = SConfig::GetInstance();
|
||||
|
||||
StartUp.m_BootType = SConfig::BOOT_ISO;
|
||||
StartUp.m_strFilename = _rFilename;
|
||||
StartUp.m_LastFilename = _rFilename;
|
||||
StartUp.m_strFilename = filename;
|
||||
StartUp.m_LastFilename = filename;
|
||||
StartUp.SaveSettings();
|
||||
StartUp.bRunCompareClient = false;
|
||||
StartUp.bRunCompareServer = false;
|
||||
|
@ -232,10 +232,11 @@ bool BootCore(const std::string& _rFilename)
|
|||
config_cache.SaveConfig(StartUp);
|
||||
|
||||
// If for example the ISO file is bad we return here
|
||||
if (!StartUp.AutoSetup(SConfig::BOOT_DEFAULT))
|
||||
if (!StartUp.AutoSetup(type))
|
||||
return false;
|
||||
|
||||
// Load game specific settings
|
||||
if (type == SConfig::BOOT_DEFAULT)
|
||||
{
|
||||
IniFile game_ini = StartUp.LoadGameIni();
|
||||
|
||||
|
|
|
@ -6,9 +6,11 @@
|
|||
|
||||
#include <string>
|
||||
|
||||
#include "Core/ConfigManager.h"
|
||||
|
||||
namespace BootManager
|
||||
{
|
||||
bool BootCore(const std::string& _rFilename);
|
||||
bool BootCore(const std::string& filename, SConfig::EBootBS2 type);
|
||||
|
||||
// Stop the emulation core and restore the configuration.
|
||||
void Stop();
|
||||
|
|
|
@ -870,6 +870,15 @@ const char* SConfig::GetDirectoryForRegion(DiscIO::Region region)
|
|||
}
|
||||
}
|
||||
|
||||
std::string SConfig::GetBootROMPath(const std::string& region_directory) const
|
||||
{
|
||||
const std::string path =
|
||||
File::GetUserPath(D_GCUSER_IDX) + DIR_SEP + region_directory + DIR_SEP GC_IPL;
|
||||
if (!File::Exists(path))
|
||||
return File::GetSysDirectory() + GC_SYS_DIR + DIR_SEP + region_directory + DIR_SEP GC_IPL;
|
||||
return path;
|
||||
}
|
||||
|
||||
// Sets m_region to the region parameter, or to PAL if the region parameter
|
||||
// is invalid. Set directory_name to the value returned by GetDirectoryForRegion
|
||||
// for m_region. Returns false if the region parameter is invalid.
|
||||
|
@ -991,16 +1000,19 @@ bool SConfig::AutoSetup(EBootBS2 _BootBS2)
|
|||
case BOOT_BS2_USA:
|
||||
SetRegion(DiscIO::Region::NTSC_U, &set_region_dir);
|
||||
m_strFilename.clear();
|
||||
m_BootType = SConfig::BOOT_BS2;
|
||||
break;
|
||||
|
||||
case BOOT_BS2_JAP:
|
||||
SetRegion(DiscIO::Region::NTSC_J, &set_region_dir);
|
||||
m_strFilename.clear();
|
||||
m_BootType = SConfig::BOOT_BS2;
|
||||
break;
|
||||
|
||||
case BOOT_BS2_EUR:
|
||||
SetRegion(DiscIO::Region::PAL, &set_region_dir);
|
||||
m_strFilename.clear();
|
||||
m_BootType = SConfig::BOOT_BS2;
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -1012,10 +1024,7 @@ bool SConfig::AutoSetup(EBootBS2 _BootBS2)
|
|||
{
|
||||
if (!bHLE_BS2)
|
||||
{
|
||||
m_strBootROM = File::GetUserPath(D_GCUSER_IDX) + DIR_SEP + set_region_dir + DIR_SEP GC_IPL;
|
||||
if (!File::Exists(m_strBootROM))
|
||||
m_strBootROM =
|
||||
File::GetSysDirectory() + GC_SYS_DIR + DIR_SEP + set_region_dir + DIR_SEP GC_IPL;
|
||||
m_strBootROM = GetBootROMPath(set_region_dir);
|
||||
|
||||
if (!File::Exists(m_strBootROM))
|
||||
{
|
||||
|
|
|
@ -231,6 +231,7 @@ struct SConfig : NonCopyable
|
|||
|
||||
void LoadDefaults();
|
||||
static const char* GetDirectoryForRegion(DiscIO::Region region);
|
||||
std::string GetBootROMPath(const std::string& region_directory) const;
|
||||
bool AutoSetup(EBootBS2 _BootBS2);
|
||||
void CheckMemcardPath(std::string& memcardPath, const std::string& gameRegion, bool isSlotA);
|
||||
DiscIO::Language GetCurrentLanguage(bool wii) const;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue