mirror of
https://github.com/TomHarte/CLK.git
synced 2024-09-08 18:55:14 +00:00
Adds floppy drive activity indicators.
This commit is contained in:
parent
46ec3510be
commit
befe2c2929
@ -12,6 +12,7 @@
|
|||||||
#include "../KeyboardMachine.hpp"
|
#include "../KeyboardMachine.hpp"
|
||||||
#include "../MouseMachine.hpp"
|
#include "../MouseMachine.hpp"
|
||||||
#include "../MediaTarget.hpp"
|
#include "../MediaTarget.hpp"
|
||||||
|
#include "../../Activity/Source.hpp"
|
||||||
|
|
||||||
//#define LOG_TRACE
|
//#define LOG_TRACE
|
||||||
#include "../../Processors/68000/68000.hpp"
|
#include "../../Processors/68000/68000.hpp"
|
||||||
@ -49,6 +50,7 @@ class ConcreteMachine:
|
|||||||
public DMAController::Delegate,
|
public DMAController::Delegate,
|
||||||
public MouseMachine::Machine,
|
public MouseMachine::Machine,
|
||||||
public KeyboardMachine::MappedMachine,
|
public KeyboardMachine::MappedMachine,
|
||||||
|
public Activity::Source,
|
||||||
public MediaTarget::Machine,
|
public MediaTarget::Machine,
|
||||||
public GI::AY38910::PortHandler {
|
public GI::AY38910::PortHandler {
|
||||||
public:
|
public:
|
||||||
@ -533,6 +535,11 @@ class ConcreteMachine:
|
|||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// MARK: - Activity Source
|
||||||
|
void set_activity_observer(Activity::Observer *observer) override {
|
||||||
|
dma_->set_activity_observer(observer);
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -225,3 +225,8 @@ void DMAController::set_component_prefers_clocking(ClockingHint::Source *, Clock
|
|||||||
ClockingHint::Preference DMAController::preferred_clocking() {
|
ClockingHint::Preference DMAController::preferred_clocking() {
|
||||||
return (fdc_.preferred_clocking() == ClockingHint::Preference::None) ? ClockingHint::Preference::None : ClockingHint::Preference::RealTime;
|
return (fdc_.preferred_clocking() == ClockingHint::Preference::None) ? ClockingHint::Preference::None : ClockingHint::Preference::RealTime;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void DMAController::set_activity_observer(Activity::Observer *observer) {
|
||||||
|
fdc_.drives_[0]->set_activity_observer(observer, "Internal", true);
|
||||||
|
fdc_.drives_[1]->set_activity_observer(observer, "External", true);
|
||||||
|
}
|
||||||
|
@ -15,6 +15,7 @@
|
|||||||
#include "../../ClockReceiver/ClockReceiver.hpp"
|
#include "../../ClockReceiver/ClockReceiver.hpp"
|
||||||
#include "../../ClockReceiver/ClockingHintSource.hpp"
|
#include "../../ClockReceiver/ClockingHintSource.hpp"
|
||||||
#include "../../Components/1770/1770.hpp"
|
#include "../../Components/1770/1770.hpp"
|
||||||
|
#include "../../Activity/Source.hpp"
|
||||||
|
|
||||||
namespace Atari {
|
namespace Atari {
|
||||||
namespace ST {
|
namespace ST {
|
||||||
@ -46,6 +47,8 @@ class DMAController: public WD::WD1770::Delegate, public ClockingHint::Source, p
|
|||||||
};
|
};
|
||||||
void set_delegate(Delegate *delegate);
|
void set_delegate(Delegate *delegate);
|
||||||
|
|
||||||
|
void set_activity_observer(Activity::Observer *observer);
|
||||||
|
|
||||||
// ClockingHint::Source.
|
// ClockingHint::Source.
|
||||||
ClockingHint::Preference preferred_clocking() final;
|
ClockingHint::Preference preferred_clocking() final;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user