mirror of
https://github.com/TomHarte/CLK.git
synced 2024-12-27 01:31:42 +00:00
Makes CPC an activity source.
This commit is contained in:
parent
0cb5362c6f
commit
39d779edf0
@ -20,6 +20,7 @@
|
|||||||
#include "../Utility/MemoryFuzzer.hpp"
|
#include "../Utility/MemoryFuzzer.hpp"
|
||||||
#include "../Utility/Typer.hpp"
|
#include "../Utility/Typer.hpp"
|
||||||
|
|
||||||
|
#include "../../Activity/Source.hpp"
|
||||||
#include "../ConfigurationTarget.hpp"
|
#include "../ConfigurationTarget.hpp"
|
||||||
#include "../CRTMachine.hpp"
|
#include "../CRTMachine.hpp"
|
||||||
#include "../KeyboardMachine.hpp"
|
#include "../KeyboardMachine.hpp"
|
||||||
@ -607,6 +608,10 @@ class FDC: public Intel::i8272::i8272 {
|
|||||||
void set_disk(std::shared_ptr<Storage::Disk::Disk> disk, int drive) {
|
void set_disk(std::shared_ptr<Storage::Disk::Disk> disk, int drive) {
|
||||||
drive_->set_disk(disk);
|
drive_->set_disk(disk);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void set_activity_observer(Activity::Observer *observer) {
|
||||||
|
drive_->set_activity_observer(observer, "Drive 1", true);
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
@ -690,7 +695,8 @@ class ConcreteMachine:
|
|||||||
public Utility::TypeRecipient,
|
public Utility::TypeRecipient,
|
||||||
public CPU::Z80::BusHandler,
|
public CPU::Z80::BusHandler,
|
||||||
public Sleeper::SleepObserver,
|
public Sleeper::SleepObserver,
|
||||||
public Machine {
|
public Machine,
|
||||||
|
public Activity::Source {
|
||||||
public:
|
public:
|
||||||
ConcreteMachine() :
|
ConcreteMachine() :
|
||||||
z80_(*this),
|
z80_(*this),
|
||||||
@ -995,6 +1001,12 @@ class ConcreteMachine:
|
|||||||
return &keyboard_mapper_;
|
return &keyboard_mapper_;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// MARK: - Activity Source
|
||||||
|
void set_activity_observer(Activity::Observer *observer) override {
|
||||||
|
if(has_fdc_) fdc_.set_activity_observer(observer);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
inline void write_to_gate_array(uint8_t value) {
|
inline void write_to_gate_array(uint8_t value) {
|
||||||
switch(value >> 6) {
|
switch(value >> 6) {
|
||||||
|
Loading…
Reference in New Issue
Block a user