System: Add "fast boot" option (skip boot logo)
This commit is contained in:
parent
30fd7a6683
commit
a47492382c
|
@ -45,6 +45,8 @@ void Settings::Load(const char* filename)
|
|||
display_linear_filtering = ini.GetBoolValue("Display", "LinearFiltering", true);
|
||||
|
||||
bios_path = ini.GetValue("BIOS", "Path", "scph1001.bin");
|
||||
bios_patch_tty_enable = ini.GetBoolValue("BIOS", "PatchTTYEnable", true);
|
||||
bios_patch_fast_boot = ini.GetBoolValue("BIOS", "PatchFastBoot", false);
|
||||
|
||||
memory_card_a_path = ini.GetValue("MemoryCard", "CardAPath", "memory_card_a.mcd");
|
||||
memory_card_b_path = ini.GetValue("MemoryCard", "CardBPath", "");
|
||||
|
@ -66,6 +68,8 @@ bool Settings::Save(const char* filename) const
|
|||
ini.SetBoolValue("Display", "LinearFiltering", display_linear_filtering);
|
||||
|
||||
ini.SetValue("BIOS", "Path", bios_path.c_str());
|
||||
ini.SetBoolValue("BIOS", "PatchTTYEnable", bios_patch_tty_enable);
|
||||
ini.SetBoolValue("BIOS", "PatchFastBoot", bios_patch_fast_boot);
|
||||
|
||||
if (!memory_card_a_path.empty())
|
||||
ini.SetValue("MemoryCard", "CardAPath", memory_card_a_path.c_str());
|
||||
|
|
|
@ -42,6 +42,9 @@ struct Settings
|
|||
// TODO: Controllers, memory cards, etc.
|
||||
|
||||
std::string bios_path;
|
||||
bool bios_patch_tty_enable = true;
|
||||
bool bios_patch_fast_boot = false;
|
||||
|
||||
std::string memory_card_a_path;
|
||||
std::string memory_card_b_path;
|
||||
|
||||
|
|
|
@ -155,14 +155,25 @@ bool System::LoadBIOS()
|
|||
bios_hash_string == BIOSHashes::SCPH_1002 || bios_hash_string == BIOSHashes::SCPH_5500 ||
|
||||
bios_hash_string == BIOSHashes::SCPH_5501 || bios_hash_string == BIOSHashes::SCPH_5502)
|
||||
{
|
||||
// Patch to enable TTY.
|
||||
Log_InfoPrintf("Patching BIOS to enable TTY/printf");
|
||||
m_bus->PatchBIOS(0x1FC06F0C, 0x24010001);
|
||||
m_bus->PatchBIOS(0x1FC06F14, 0xAF81A9C0);
|
||||
if (GetSettings().bios_patch_tty_enable)
|
||||
{
|
||||
Log_InfoPrintf("Patching BIOS to enable TTY/printf");
|
||||
m_bus->PatchBIOS(0x1FC06F0C, 0x24010001);
|
||||
m_bus->PatchBIOS(0x1FC06F14, 0xAF81A9C0);
|
||||
}
|
||||
|
||||
if (GetSettings().bios_patch_fast_boot)
|
||||
{
|
||||
Log_InfoPrintf("Patching BIOS for fast boot");
|
||||
|
||||
// Replace the shell entry point with a return back to the bootstrap.
|
||||
m_bus->PatchBIOS(0x1FC18000, 0x03E00008);
|
||||
m_bus->PatchBIOS(0x1FC18004, 0x00000000);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Log_WarningPrintf("Unknown BIOS version, not patching TTY/printf");
|
||||
Log_WarningPrintf("Unknown BIOS version, not applying patches");
|
||||
}
|
||||
|
||||
return true;
|
||||
|
|
|
@ -924,18 +924,31 @@ void SDLHostInterface::DrawSettingsWindow()
|
|||
|
||||
if (ImGui::BeginTabItem("General"))
|
||||
{
|
||||
ImGui::Text("Region:");
|
||||
ImGui::SameLine(indent);
|
||||
static int region = 0;
|
||||
ImGui::Combo("##region", ®ion, "NTSC-U (US)\0NTSC-J (Japan)\0PAL (Europe, Australia)");
|
||||
if (DrawSettingsSectionHeader("Behavior"))
|
||||
{
|
||||
settings_changed |= ImGui::Checkbox("Enable Speed Limiter", &m_settings.speed_limiter_enabled);
|
||||
settings_changed |= ImGui::Checkbox("Pause On Start", &m_settings.start_paused);
|
||||
}
|
||||
|
||||
ImGui::Text("BIOS Path:");
|
||||
ImGui::SameLine(indent);
|
||||
settings_changed |= DrawFileChooser("##bios_path", &m_settings.bios_path);
|
||||
ImGui::NewLine();
|
||||
if (DrawSettingsSectionHeader("Console"))
|
||||
{
|
||||
ImGui::Text("Region:");
|
||||
ImGui::SameLine(indent);
|
||||
static int region = 0;
|
||||
ImGui::Combo("##region", ®ion, "NTSC-U (US)\0NTSC-J (Japan)\0PAL (Europe, Australia)");
|
||||
}
|
||||
|
||||
ImGui::Checkbox("Enable Speed Limiter", &m_settings.speed_limiter_enabled);
|
||||
ImGui::NewLine();
|
||||
if (DrawSettingsSectionHeader("BIOS"))
|
||||
{
|
||||
ImGui::Text("ROM Path:");
|
||||
ImGui::SameLine(indent);
|
||||
settings_changed |= DrawFileChooser("##bios_path", &m_settings.bios_path);
|
||||
|
||||
ImGui::Checkbox("Pause On Start", &m_settings.start_paused);
|
||||
settings_changed |= ImGui::Checkbox("Enable TTY Output", &m_settings.bios_patch_tty_enable);
|
||||
settings_changed |= ImGui::Checkbox("Fast Boot", &m_settings.bios_patch_fast_boot);
|
||||
}
|
||||
|
||||
ImGui::EndTabItem();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue