mirror of
https://github.com/TomHarte/CLK.git
synced 2024-11-28 21:49:27 +00:00
Whether the BIOS is available in hardware is now decided entirely based on whether it is on disk.
This commit is contained in:
parent
3f2fb1fa58
commit
8596a9826f
@ -133,8 +133,8 @@ class ConcreteMachine:
|
|||||||
paging_registers_[2] = 0;
|
paging_registers_[2] = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Load the BIOS if relevant.
|
// Load the BIOS if available.
|
||||||
if(has_bios()) {
|
//
|
||||||
// TODO: there's probably a million other versions of the Master System BIOS; try to build a
|
// TODO: there's probably a million other versions of the Master System BIOS; try to build a
|
||||||
// CRC32 catalogue of those. So far:
|
// CRC32 catalogue of those. So far:
|
||||||
//
|
//
|
||||||
@ -151,13 +151,14 @@ class ConcreteMachine:
|
|||||||
);
|
);
|
||||||
if(!roms[0]) {
|
if(!roms[0]) {
|
||||||
// No BIOS found; attempt to boot as though it has already disabled itself.
|
// No BIOS found; attempt to boot as though it has already disabled itself.
|
||||||
|
has_bios_ = false;
|
||||||
memory_control_ |= 0x08;
|
memory_control_ |= 0x08;
|
||||||
std::cerr << "No BIOS found; attempting to start cartridge directly" << std::endl;
|
std::cerr << "No BIOS found; attempting to start cartridge directly" << std::endl;
|
||||||
} else {
|
} else {
|
||||||
|
has_bios_ = true;
|
||||||
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());
|
||||||
}
|
}
|
||||||
}
|
|
||||||
page_cartridge();
|
page_cartridge();
|
||||||
|
|
||||||
// Map RAM.
|
// Map RAM.
|
||||||
@ -486,9 +487,9 @@ class ConcreteMachine:
|
|||||||
}
|
}
|
||||||
|
|
||||||
using Target = Analyser::Static::Sega::Target;
|
using Target = Analyser::Static::Sega::Target;
|
||||||
Target::Model model_;
|
const Target::Model model_;
|
||||||
Target::Region region_;
|
const Target::Region region_;
|
||||||
Target::PagingScheme paging_scheme_;
|
const Target::PagingScheme paging_scheme_;
|
||||||
CPU::Z80::Processor<ConcreteMachine, false, false> z80_;
|
CPU::Z80::Processor<ConcreteMachine, false, false> z80_;
|
||||||
JustInTimeActor<TI::TMS::TMS9918> vdp_;
|
JustInTimeActor<TI::TMS::TMS9918> vdp_;
|
||||||
|
|
||||||
@ -550,13 +551,11 @@ class ConcreteMachine:
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Throw the BIOS on top if this machine has one and it isn't disabled.
|
// Throw the BIOS on top if this machine has one and it isn't disabled.
|
||||||
if(has_bios() && !(memory_control_ & 0x08)) {
|
if(has_bios_ && !(memory_control_ & 0x08)) {
|
||||||
map(read_pointers_, bios_, 8*1024, 0);
|
map(read_pointers_, bios_, 8*1024, 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
bool has_bios() {
|
bool has_bios_ = true;
|
||||||
return is_master_system(model_) && region_ != Target::Region::Japan;
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user