SMS: Require BIOS to load ROMs

Requires BIOS to be present and enables it by default.
This commit is contained in:
alyosha-tas 2017-06-22 16:40:18 -04:00 committed by GitHub
parent a0a84173e5
commit 23345eb7d3
2 changed files with 14 additions and 7 deletions

View File

@ -62,7 +62,7 @@ namespace BizHawk.Emulation.Cores.Sega.MasterSystem
{
public bool EnableFM = true;
public bool AllowOverlock = false;
public bool UseBIOS = false;
public bool UseBIOS = true;
public string ConsoleRegion = "Export";
public string DisplayType = "NTSC";

View File

@ -143,13 +143,20 @@ namespace BizHawk.Emulation.Cores.Sega.MasterSystem
else if (game.System == "SMS")
{
BiosRom = comm.CoreFileProvider.GetFirmware("SMS", RegionStr, false);
if (BiosRom != null && (game["RequireBios"] || SyncSettings.UseBIOS))
Port3E = 0xF7;
if (BiosRom == null && game["RequireBios"])
throw new MissingFirmwareException("BIOS image not available. This game requires BIOS to function.");
if (SyncSettings.UseBIOS && BiosRom == null)
CoreComm.Notify("BIOS was selected, but rom image not available. BIOS not enabled.");
if (BiosRom == null)
{
throw new MissingFirmwareException("No BIOS found");
}
else if (!game["RequireBios"] && !SyncSettings.UseBIOS)
{
// we are skipping the BIOS
// but only if it won't break the game
}
else
{
Port3E = 0xF7;
}
}
if (game["SRAM"])