1
0
mirror of https://github.com/TomHarte/CLK.git synced 2026-01-26 06:16:22 +00:00

Permit granular specification of what to flush.

This commit is contained in:
Thomas Harte
2022-07-08 15:38:29 -04:00
parent 5c3084c37c
commit b03d91d5dd
4 changed files with 18 additions and 9 deletions

View File

@@ -210,10 +210,14 @@ class ConcreteMachine:
z80_.run_for(cycles);
}
void flush_output() final {
vdp_.flush();
update_audio();
audio_queue_.perform();
void flush_output(Output output) final {
if(int(output) & int(Output::Video)) {
vdp_.flush();
}
if(int(output) & int(Output::Audio)) {
update_audio();
audio_queue_.perform();
}
}
forceinline HalfCycles perform_machine_cycle(const CPU::Z80::PartialMachineCycle &cycle) {