diff --git a/Machines/ZX8081/ZX8081.cpp b/Machines/ZX8081/ZX8081.cpp index 184434791..3f772c133 100644 --- a/Machines/ZX8081/ZX8081.cpp +++ b/Machines/ZX8081/ZX8081.cpp @@ -21,7 +21,8 @@ Machine::Machine() : vsync_(false), hsync_(false), nmi_is_enabled_(false), - tape_player_(ZX8081ClockRate) { + tape_player_(ZX8081ClockRate), + use_fast_tape_hack_(false) { set_clock_rate(ZX8081ClockRate); tape_player_.set_motor_control(true); clear_all_keys(); @@ -118,7 +119,7 @@ int Machine::perform_machine_cycle(const CPU::Z80::PartialMachineCycle &cycle) { case CPU::Z80::PartialMachineCycle::ReadOpcodeStart: case CPU::Z80::PartialMachineCycle::ReadOpcodeWait: // Check for use of the fast tape hack. -/* if(address == tape_trap_address_) { // TODO: && fast_tape_hack_enabled_ + if(use_fast_tape_hack_ && address == tape_trap_address_) { int next_byte = parser_.get_next_byte(tape_player_.get_tape()); if(next_byte != -1) { uint16_t hl = get_value_of_register(CPU::Z80::Register::HL); @@ -127,7 +128,7 @@ int Machine::perform_machine_cycle(const CPU::Z80::PartialMachineCycle &cycle) { set_value_of_register(CPU::Z80::Register::ProgramCounter, tape_return_address_ - 1); return 0; } - }*/ + } is_opcode_read = true; case CPU::Z80::PartialMachineCycle::Read: diff --git a/Machines/ZX8081/ZX8081.hpp b/Machines/ZX8081/ZX8081.hpp index f44d7580d..9bd9044a5 100644 --- a/Machines/ZX8081/ZX8081.hpp +++ b/Machines/ZX8081/ZX8081.hpp @@ -62,6 +62,8 @@ class Machine: void set_key_state(uint16_t key, bool isPressed); void clear_all_keys(); + inline void set_use_fast_tape_hack(bool activate) { use_fast_tape_hack_ = activate; } + private: std::shared_ptr