1
0
mirror of https://github.com/TomHarte/CLK.git synced 2024-12-01 11:49:58 +00:00

Adds ZX Spectrum activity indicators.

This commit is contained in:
Thomas Harte 2021-03-23 10:32:22 -04:00
parent 584a5ad7fb
commit 4e8f82a39c

View File

@ -12,6 +12,7 @@
#define LOG_PREFIX "[Spectrum] " #define LOG_PREFIX "[Spectrum] "
#include "../../../Activity/Source.hpp"
#include "../../MachineTypes.hpp" #include "../../MachineTypes.hpp"
#include "../../../Processors/Z80/Z80.hpp" #include "../../../Processors/Z80/Z80.hpp"
@ -46,6 +47,7 @@ namespace ZXSpectrum {
using Model = Analyser::Static::ZXSpectrum::Target::Model; using Model = Analyser::Static::ZXSpectrum::Target::Model;
template<Model model> class ConcreteMachine: template<Model model> class ConcreteMachine:
public Activity::Source,
public Configurable::Device, public Configurable::Device,
public Machine, public Machine,
public MachineTypes::AudioProducer, public MachineTypes::AudioProducer,
@ -447,6 +449,12 @@ template<Model model> class ConcreteMachine:
return &speaker_; return &speaker_;
} }
// MARK: - Activity Source
void set_activity_observer(Activity::Observer *observer) override {
if constexpr (model == Model::Plus3) fdc_->set_activity_observer(observer);
tape_player_.set_activity_observer(observer);
}
private: private:
CPU::Z80::Processor<ConcreteMachine, false, false> z80_; CPU::Z80::Processor<ConcreteMachine, false, false> z80_;