diff --git a/Machines/ZX8081/ZX8081.cpp b/Machines/ZX8081/ZX8081.cpp index cf3c24ed0..d716cd303 100644 --- a/Machines/ZX8081/ZX8081.cpp +++ b/Machines/ZX8081/ZX8081.cpp @@ -55,7 +55,7 @@ int Machine::perform_machine_cycle(const CPU::Z80::PartialMachineCycle &cycle) { if(is_zx81_) horizontal_counter_ %= 207; if(!tape_advance_delay_) { - tape_player_.run_for_cycles(cycle.length); + if(tape_is_automatically_playing_ || tape_is_playing_) tape_player_.run_for_cycles(cycle.length); } else { tape_advance_delay_ = std::max(tape_advance_delay_ - cycle.length, 0); } diff --git a/Machines/ZX8081/ZX8081.hpp b/Machines/ZX8081/ZX8081.hpp index d07ed461a..95b96635d 100644 --- a/Machines/ZX8081/ZX8081.hpp +++ b/Machines/ZX8081/ZX8081.hpp @@ -63,6 +63,11 @@ class Machine: void clear_all_keys(); inline void set_use_fast_tape_hack(bool activate) { use_fast_tape_hack_ = activate; } + inline void set_use_automatic_tape_motor_control(bool enabled) { + use_automatic_tape_motor_control_ = enabled; + if(!enabled) tape_is_automatically_playing_ = false; + } + inline void set_tape_is_playing(bool is_playing) { tape_is_playing_ = is_playing; } private: std::shared_ptr