From 270723ae7271e671a5087ca998afbd269276d3b6 Mon Sep 17 00:00:00 2001 From: Thomas Harte Date: Mon, 19 Feb 2018 19:54:42 -0500 Subject: [PATCH] Forces the MSX's perform_machine_cycle into the Z80. --- Machines/MSX/MSX.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Machines/MSX/MSX.cpp b/Machines/MSX/MSX.cpp index 050c0ed3f..a1e600b06 100644 --- a/Machines/MSX/MSX.cpp +++ b/Machines/MSX/MSX.cpp @@ -38,6 +38,7 @@ #include "../../Outputs/Speaker/Implementation/SampleSource.hpp" #include "../../Configurable/StandardOptions.hpp" +#include "../../ClockReceiver/ForceInline.hpp" namespace MSX { @@ -280,7 +281,7 @@ class ConcreteMachine: } // MARK: Z80::BusHandler - HalfCycles perform_machine_cycle(const CPU::Z80::PartialMachineCycle &cycle) { + forceinline HalfCycles perform_machine_cycle(const CPU::Z80::PartialMachineCycle &cycle) { if(time_until_interrupt_ > 0) { time_until_interrupt_ -= cycle.length; if(time_until_interrupt_ <= HalfCycles(0)) { @@ -573,6 +574,7 @@ class ConcreteMachine: // MARK: - Sleeper void set_component_is_sleeping(void *component, bool is_sleeping) override { tape_player_is_sleeping_ = tape_player_.is_sleeping(); + set_use_fast_tape(); } private: @@ -639,7 +641,7 @@ class ConcreteMachine: bool allow_fast_tape_ = false; bool use_fast_tape_ = false; void set_use_fast_tape() { - use_fast_tape_ = allow_fast_tape_ && tape_player_.has_tape(); + use_fast_tape_ = !tape_player_is_sleeping_ && allow_fast_tape_ && tape_player_.has_tape(); } i8255PortHandler i8255_port_handler_;