From d1fc39d6e5ec3184d6eb0d37a60f55ab6dc711cf Mon Sep 17 00:00:00 2001 From: Thomas Harte Date: Fri, 26 Oct 2018 21:19:16 -0400 Subject: [PATCH] Attempts to carry on even if no BIOS is found. --- Machines/MasterSystem/MasterSystem.cpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/Machines/MasterSystem/MasterSystem.cpp b/Machines/MasterSystem/MasterSystem.cpp index 6eaf28446..e49689cb0 100644 --- a/Machines/MasterSystem/MasterSystem.cpp +++ b/Machines/MasterSystem/MasterSystem.cpp @@ -25,6 +25,7 @@ #include "../../Analyser/Static/Sega/Target.hpp" #include +#include namespace { const int sn76489_divider = 2; @@ -132,11 +133,13 @@ class ConcreteMachine: if(has_bios()) { const auto roms = rom_fetcher("MasterSystem", {"bios.sms"}); if(!roms[0]) { - throw ROMMachine::Error::MissingROMs; + // No BIOS found; attempt to boot as though it has already disabled itself. + memory_control_ |= 0x08; + std::cerr << "No BIOS found; attempting to start cartridge directly" << std::endl; + } else { + roms[0]->resize(8*1024); + memcpy(&bios_, roms[0]->data(), roms[0]->size()); } - - roms[0]->resize(8*1024); - memcpy(&bios_, roms[0]->data(), roms[0]->size()); } // Map RAM.