1
0
mirror of https://github.com/TomHarte/CLK.git synced 2024-09-27 02:55:07 +00:00

Adds an appropriate ROM request.

This commit is contained in:
Thomas Harte 2021-06-14 21:17:09 -04:00
parent c5a86f0ef7
commit 196c4dcdd9
3 changed files with 18 additions and 1 deletions

View File

@ -24,10 +24,16 @@ class ConcreteMachine:
public MachineTypes::TimedMachine {
public:
ConcreteMachine(const Analyser::Static::Enterprise::Target &target, const ROMMachine::ROMFetcher &rom_fetcher) :
z80(*this) {
z80_(*this) {
// Request a clock of 4Mhz; this'll be mapped upwards for Nick and Dave elsewhere.
set_clock_rate(4'000'000);
const auto request = ROM::Request(ROM::Name::EnterpriseEXOS);
auto roms = rom_fetcher(request);
if(!request.validate(roms)) {
throw ROMMachine::Error::MissingROMs;
}
(void)target;
(void)rom_fetcher;
}
@ -35,6 +41,9 @@ class ConcreteMachine:
private:
CPU::Z80::Processor<ConcreteMachine, false, false> z80_;
std::array<uint8_t, 32 * 1024> exos_;
std::array<uint8_t, 256 * 1024> ram_;
// MARK: - Z80::BusHandler.
forceinline HalfCycles perform_machine_cycle(const CPU::Z80::PartialMachineCycle &cycle) {
(void)cycle;

View File

@ -404,6 +404,11 @@ Description::Description(Name name) {
*this = Description(name, "DiskII", "the Disk II 13-sector state machine ROM", "state-machine-13.rom", 256, 0x62e22620u);
break;
case Name::EnterpriseEXOS: {
const std::initializer_list<std::string> filenames = {"exos.bin", "Exos (198x)(Enterprise).bin"},
*this = Description(name, "Enterprise", "the Enterprise EXOS ROM", filenames, 32 * 1024, 0x30b26387u);
} break;
case Name::Macintosh128k: *this = Description(name, "Macintosh", "the Macintosh 128k ROM", "mac128k.rom", 64*1024, 0x6d0c8a28u); break;
case Name::Macintosh512k: *this = Description(name, "Macintosh", "the Macintosh 512k ROM", "mac512k.rom", 64*1024, 0xcf759e0d); break;
case Name::MacintoshPlus: {

View File

@ -71,6 +71,9 @@ enum Name {
DiskIIStateMachine13Sector,
DiskIIBoot13Sector,
// Enterprise.
EnterpriseEXOS,
// Macintosh.
Macintosh128k,
Macintosh512k,