mirror of
https://github.com/TomHarte/CLK.git
synced 2024-12-26 09:29:45 +00:00
Merge pull request #578 from TomHarte/SMSBIOSFallback
Attempts to carry on even if no BIOS is found.
This commit is contained in:
commit
4af0b74a42
@ -25,6 +25,7 @@
|
|||||||
#include "../../Analyser/Static/Sega/Target.hpp"
|
#include "../../Analyser/Static/Sega/Target.hpp"
|
||||||
|
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
|
#include <iostream>
|
||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
const int sn76489_divider = 2;
|
const int sn76489_divider = 2;
|
||||||
@ -132,12 +133,14 @@ class ConcreteMachine:
|
|||||||
if(has_bios()) {
|
if(has_bios()) {
|
||||||
const auto roms = rom_fetcher("MasterSystem", {"bios.sms"});
|
const auto roms = rom_fetcher("MasterSystem", {"bios.sms"});
|
||||||
if(!roms[0]) {
|
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);
|
roms[0]->resize(8*1024);
|
||||||
memcpy(&bios_, roms[0]->data(), roms[0]->size());
|
memcpy(&bios_, roms[0]->data(), roms[0]->size());
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Map RAM.
|
// Map RAM.
|
||||||
if(is_master_system(model_)) {
|
if(is_master_system(model_)) {
|
||||||
|
Loading…
Reference in New Issue
Block a user