mirror of
https://github.com/TomHarte/CLK.git
synced 2025-01-26 00:30:29 +00:00
Ensures no DMA clocking whatsoever when asleep.
This commit is contained in:
parent
3cb6bbf771
commit
91a3d42919
@ -441,6 +441,7 @@ class ConcreteMachine:
|
|||||||
// Advance the relevant counters.
|
// Advance the relevant counters.
|
||||||
cycles_since_audio_update_ += length;
|
cycles_since_audio_update_ += length;
|
||||||
mfp_ += length;
|
mfp_ += length;
|
||||||
|
if(dma_clocking_preference_ != ClockingHint::Preference::None)
|
||||||
dma_ += length;
|
dma_ += length;
|
||||||
keyboard_acia_ += length;
|
keyboard_acia_ += length;
|
||||||
midi_acia_ += length;
|
midi_acia_ += length;
|
||||||
@ -462,7 +463,7 @@ class ConcreteMachine:
|
|||||||
mfp_.flush();
|
mfp_.flush();
|
||||||
}
|
}
|
||||||
|
|
||||||
if(dma_is_realtime_) {
|
if(dma_clocking_preference_ == ClockingHint::Preference::RealTime) {
|
||||||
dma_.flush();
|
dma_.flush();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -531,7 +532,7 @@ class ConcreteMachine:
|
|||||||
bool may_defer_acias_ = true;
|
bool may_defer_acias_ = true;
|
||||||
bool keyboard_needs_clock_ = false;
|
bool keyboard_needs_clock_ = false;
|
||||||
bool mfp_is_realtime_ = false;
|
bool mfp_is_realtime_ = false;
|
||||||
bool dma_is_realtime_ = false;
|
ClockingHint::Preference dma_clocking_preference_ = ClockingHint::Preference::None;
|
||||||
void set_component_prefers_clocking(ClockingHint::Source *component, ClockingHint::Preference clocking) final {
|
void set_component_prefers_clocking(ClockingHint::Source *component, ClockingHint::Preference clocking) final {
|
||||||
// This is being called by one of the components; avoid any time flushing here as that's
|
// This is being called by one of the components; avoid any time flushing here as that's
|
||||||
// already dealt with (and, just to be absolutely sure, to avoid recursive mania).
|
// already dealt with (and, just to be absolutely sure, to avoid recursive mania).
|
||||||
@ -540,7 +541,7 @@ class ConcreteMachine:
|
|||||||
(midi_acia_.last_valid()->preferred_clocking() != ClockingHint::Preference::RealTime);
|
(midi_acia_.last_valid()->preferred_clocking() != ClockingHint::Preference::RealTime);
|
||||||
keyboard_needs_clock_ = ikbd_.preferred_clocking() != ClockingHint::Preference::None;
|
keyboard_needs_clock_ = ikbd_.preferred_clocking() != ClockingHint::Preference::None;
|
||||||
mfp_is_realtime_ = mfp_.last_valid()->preferred_clocking() == ClockingHint::Preference::RealTime;
|
mfp_is_realtime_ = mfp_.last_valid()->preferred_clocking() == ClockingHint::Preference::RealTime;
|
||||||
dma_is_realtime_ = dma_.last_valid()->preferred_clocking() == ClockingHint::Preference::RealTime;
|
dma_clocking_preference_ = dma_.last_valid()->preferred_clocking();
|
||||||
}
|
}
|
||||||
|
|
||||||
// MARK: - GPIP input.
|
// MARK: - GPIP input.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user