Merge pull request #5465 from sepalani/gc-bios
Tools: Load GameCube BIOS added
This commit is contained in:
@@ -17,6 +17,7 @@
|
||||
|
||||
#include "Common/CommonTypes.h"
|
||||
#include "Common/Event.h"
|
||||
#include "Core/ConfigManager.h"
|
||||
#include "DolphinWX/Globals.h"
|
||||
|
||||
#if defined(HAVE_X11) && HAVE_X11
|
||||
@@ -183,7 +184,7 @@ private:
|
||||
void InitializeTASDialogs();
|
||||
void InitializeCoreCallbacks();
|
||||
|
||||
void StartGame(const std::string& filename);
|
||||
void StartGame(const std::string& filename, SConfig::EBootBS2 type = SConfig::BOOT_DEFAULT);
|
||||
void SetDebuggerStartupParameters() const;
|
||||
|
||||
// Utility
|
||||
@@ -327,6 +328,10 @@ private:
|
||||
void OnImportSave(wxCommandEvent& event);
|
||||
void OnExportAllSaves(wxCommandEvent& event);
|
||||
|
||||
void OnLoadGameCubeBIOSJAP(wxCommandEvent& event);
|
||||
void OnLoadGameCubeBIOSUSA(wxCommandEvent& event);
|
||||
void OnLoadGameCubeBIOSEUR(wxCommandEvent& event);
|
||||
|
||||
void OnNetPlay(wxCommandEvent& event);
|
||||
|
||||
void OnShowCheatsWindow(wxCommandEvent& event);
|
||||
|
||||
@@ -23,6 +23,7 @@
|
||||
#include <wx/toplevel.h>
|
||||
|
||||
#include "Common/CDUtils.h"
|
||||
#include "Common/CommonPaths.h"
|
||||
#include "Common/CommonTypes.h"
|
||||
#include "Common/FileSearch.h"
|
||||
#include "Common/FileUtil.h"
|
||||
@@ -168,6 +169,9 @@ void CFrame::BindMenuBarEvents()
|
||||
Bind(wxEVT_MENU, &CFrame::OnMemcard, this, IDM_MEMCARD);
|
||||
Bind(wxEVT_MENU, &CFrame::OnImportSave, this, IDM_IMPORT_SAVE);
|
||||
Bind(wxEVT_MENU, &CFrame::OnExportAllSaves, this, IDM_EXPORT_ALL_SAVE);
|
||||
Bind(wxEVT_MENU, &CFrame::OnLoadGameCubeBIOSJAP, this, IDM_LOAD_GC_BIOS_JAP);
|
||||
Bind(wxEVT_MENU, &CFrame::OnLoadGameCubeBIOSUSA, this, IDM_LOAD_GC_BIOS_USA);
|
||||
Bind(wxEVT_MENU, &CFrame::OnLoadGameCubeBIOSEUR, this, IDM_LOAD_GC_BIOS_EUR);
|
||||
Bind(wxEVT_MENU, &CFrame::OnShowCheatsWindow, this, IDM_CHEATS);
|
||||
Bind(wxEVT_MENU, &CFrame::OnNetPlay, this, IDM_NETPLAY);
|
||||
Bind(wxEVT_MENU, &CFrame::OnInstallWAD, this, IDM_MENU_INSTALL_WAD);
|
||||
@@ -632,7 +636,7 @@ void CFrame::ToggleDisplayMode(bool bFullscreen)
|
||||
}
|
||||
|
||||
// Prepare the GUI to start the game.
|
||||
void CFrame::StartGame(const std::string& filename)
|
||||
void CFrame::StartGame(const std::string& filename, SConfig::EBootBS2 type)
|
||||
{
|
||||
if (m_is_game_loading)
|
||||
return;
|
||||
@@ -710,7 +714,7 @@ void CFrame::StartGame(const std::string& filename)
|
||||
|
||||
SetDebuggerStartupParameters();
|
||||
|
||||
if (!BootManager::BootCore(filename))
|
||||
if (!BootManager::BootCore(filename, type))
|
||||
{
|
||||
DoFullscreen(false);
|
||||
|
||||
@@ -1172,6 +1176,21 @@ void CFrame::OnMemcard(wxCommandEvent& WXUNUSED(event))
|
||||
HotkeyManagerEmu::Enable(true);
|
||||
}
|
||||
|
||||
void CFrame::OnLoadGameCubeBIOSJAP(wxCommandEvent&)
|
||||
{
|
||||
StartGame("", SConfig::BOOT_BS2_JAP);
|
||||
}
|
||||
|
||||
void CFrame::OnLoadGameCubeBIOSUSA(wxCommandEvent&)
|
||||
{
|
||||
StartGame("", SConfig::BOOT_BS2_USA);
|
||||
}
|
||||
|
||||
void CFrame::OnLoadGameCubeBIOSEUR(wxCommandEvent&)
|
||||
{
|
||||
StartGame("", SConfig::BOOT_BS2_EUR);
|
||||
}
|
||||
|
||||
void CFrame::OnExportAllSaves(wxCommandEvent& WXUNUSED(event))
|
||||
{
|
||||
CWiiSaveCrypted::ExportAllSaves();
|
||||
@@ -1478,6 +1497,15 @@ void CFrame::UpdateGUI()
|
||||
GetMenuBar()->FindItem(IDM_SAVE_STATE)->Enable(Initialized);
|
||||
// Misc
|
||||
GetMenuBar()->FindItem(IDM_CHANGE_DISC)->Enable(Initialized);
|
||||
GetMenuBar()
|
||||
->FindItem(IDM_LOAD_GC_BIOS_JAP)
|
||||
->Enable(!Initialized && File::Exists(SConfig::GetInstance().GetBootROMPath(JAP_DIR)));
|
||||
GetMenuBar()
|
||||
->FindItem(IDM_LOAD_GC_BIOS_USA)
|
||||
->Enable(!Initialized && File::Exists(SConfig::GetInstance().GetBootROMPath(USA_DIR)));
|
||||
GetMenuBar()
|
||||
->FindItem(IDM_LOAD_GC_BIOS_EUR)
|
||||
->Enable(!Initialized && File::Exists(SConfig::GetInstance().GetBootROMPath(EUR_DIR)));
|
||||
if (DiscIO::CNANDContentManager::Access()
|
||||
.GetNANDLoader(TITLEID_SYSMENU, Common::FROM_CONFIGURED_ROOT)
|
||||
.IsValid())
|
||||
|
||||
@@ -105,6 +105,9 @@ enum
|
||||
IDM_IMPORT_NAND,
|
||||
IDM_EXTRACT_CERTIFICATES,
|
||||
IDM_FIFOPLAYER,
|
||||
IDM_LOAD_GC_BIOS_JAP,
|
||||
IDM_LOAD_GC_BIOS_USA,
|
||||
IDM_LOAD_GC_BIOS_EUR,
|
||||
IDM_CONNECT_WIIMOTE1,
|
||||
IDM_CONNECT_WIIMOTE2,
|
||||
IDM_CONNECT_WIIMOTE3,
|
||||
|
||||
@@ -216,6 +216,16 @@ wxMenu* MainMenuBar::CreateToolsMenu() const
|
||||
tools_menu->Append(IDM_IMPORT_SAVE, _("Import Wii Save..."));
|
||||
tools_menu->Append(IDM_EXPORT_ALL_SAVE, _("Export All Wii Saves"));
|
||||
tools_menu->AppendSeparator();
|
||||
auto* const gc_bios_menu = new wxMenu;
|
||||
gc_bios_menu->Append(IDM_LOAD_GC_BIOS_JAP, _("NTSC-J"),
|
||||
_("Load NTSC-J GameCube BIOS from the JAP folder."));
|
||||
gc_bios_menu->Append(IDM_LOAD_GC_BIOS_USA, _("NTSC-U"),
|
||||
_("Load NTSC-U GameCube BIOS from the USA folder."));
|
||||
gc_bios_menu->Append(IDM_LOAD_GC_BIOS_EUR, _("PAL"),
|
||||
_("Load PAL GameCube BIOS from the EUR folder."));
|
||||
tools_menu->AppendSubMenu(gc_bios_menu, _("Load GameCube BIOS"),
|
||||
_("Load a GameCube BIOS located under Dolphin's GC folder."));
|
||||
tools_menu->AppendSeparator();
|
||||
tools_menu->Append(IDM_CHEATS, _("&Cheat Manager"));
|
||||
tools_menu->Append(IDM_NETPLAY, _("Start &NetPlay..."));
|
||||
tools_menu->Append(IDM_FIFOPLAYER, _("FIFO Player"));
|
||||
|
||||
Reference in New Issue
Block a user