mirror of
https://github.com/TomHarte/CLK.git
synced 2024-09-08 03:54:27 +00:00
Adds the absolute basics to include a 6522 in the Macintosh.
Not yet wired to anything.
This commit is contained in:
parent
417a3e1540
commit
6d6a4e79c9
@ -27,7 +27,8 @@ class ConcreteMachine:
|
|||||||
public:
|
public:
|
||||||
ConcreteMachine(const ROMMachine::ROMFetcher &rom_fetcher) :
|
ConcreteMachine(const ROMMachine::ROMFetcher &rom_fetcher) :
|
||||||
mc68000_(*this),
|
mc68000_(*this),
|
||||||
video_(ram_) {
|
video_(ram_),
|
||||||
|
via_(via_port_handler_) {
|
||||||
|
|
||||||
// Grab a copy of the ROM and convert it into big-endian data.
|
// Grab a copy of the ROM and convert it into big-endian data.
|
||||||
const auto roms = rom_fetcher("Macintosh", { "mac128k.rom" });
|
const auto roms = rom_fetcher("Macintosh", { "mac128k.rom" });
|
||||||
@ -53,9 +54,30 @@ class ConcreteMachine:
|
|||||||
mc68000_.run_for(cycles);
|
mc68000_.run_for(cycles);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
HalfCycles perform_bus_operation(const CPU::MC68000::Microcycle &cycle, int is_supervisor) {
|
||||||
|
via_.run_for(cycle.length);
|
||||||
|
|
||||||
|
// TODO: the entirety of dealing with this cycle.
|
||||||
|
|
||||||
|
return HalfCycles(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
Notes to self: accesses to the VIA are via the 68000's
|
||||||
|
synchronous bus.
|
||||||
|
*/
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
class VIAPortHandler: public MOS::MOS6522::PortHandler {
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
CPU::MC68000::Processor<ConcreteMachine, true> mc68000_;
|
CPU::MC68000::Processor<ConcreteMachine, true> mc68000_;
|
||||||
Video video_;
|
Video video_;
|
||||||
|
|
||||||
|
MOS::MOS6522::MOS6522<VIAPortHandler> via_;
|
||||||
|
VIAPortHandler via_port_handler_;
|
||||||
|
|
||||||
uint16_t rom_[32*1024];
|
uint16_t rom_[32*1024];
|
||||||
uint16_t ram_[64*1024];
|
uint16_t ram_[64*1024];
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user