From 52d9ddf9e59014e561a73faac2782b0abc3801ee Mon Sep 17 00:00:00 2001 From: Thomas Harte Date: Wed, 21 Jun 2017 22:13:24 -0400 Subject: [PATCH] =?UTF-8?q?Gave=20the=20binary=20tape=20player=20a=20more?= =?UTF-8?q?=20logical=20assignment=20of=20wave=20level=20to=20output=20lev?= =?UTF-8?q?el.=20Which=20miraculously=20appears=20to=20have=20been=20the?= =?UTF-8?q?=20issue=20with=20the=20ZX80/81=20tape=20loading=20=E2=80=94=20?= =?UTF-8?q?the=20inconsistency=20of=20silences=20seems=20to=20have=20been?= =?UTF-8?q?=20the=20issue.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Machines/Commodore/Vic-20/Vic20.cpp | 2 +- Machines/Oric/Oric.cpp | 2 +- Machines/ZX8081/ZX8081.cpp | 6 +++--- Storage/Tape/Tape.cpp | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Machines/Commodore/Vic-20/Vic20.cpp b/Machines/Commodore/Vic-20/Vic20.cpp index 612934804..871610a42 100644 --- a/Machines/Commodore/Vic-20/Vic20.cpp +++ b/Machines/Commodore/Vic-20/Vic20.cpp @@ -307,7 +307,7 @@ void Machine::configure_as_target(const StaticAnalyser::Target &target) { } void Machine::tape_did_change_input(Storage::Tape::BinaryTapePlayer *tape) { - keyboard_via_->set_control_line_input(KeyboardVIA::Port::A, KeyboardVIA::Line::One, tape->get_input()); + keyboard_via_->set_control_line_input(KeyboardVIA::Port::A, KeyboardVIA::Line::One, !tape->get_input()); } #pragma mark - Disc diff --git a/Machines/Oric/Oric.cpp b/Machines/Oric/Oric.cpp index 8fbc8c98b..3310cc319 100644 --- a/Machines/Oric/Oric.cpp +++ b/Machines/Oric/Oric.cpp @@ -187,7 +187,7 @@ void Machine::set_output_device(Outputs::CRT::OutputDevice output_device) { void Machine::tape_did_change_input(Storage::Tape::BinaryTapePlayer *tape_player) { // set CB1 - via_.set_control_line_input(VIA::Port::B, VIA::Line::One, tape_player->get_input()); + via_.set_control_line_input(VIA::Port::B, VIA::Line::One, !tape_player->get_input()); } std::shared_ptr Machine::get_crt() { diff --git a/Machines/ZX8081/ZX8081.cpp b/Machines/ZX8081/ZX8081.cpp index 26f01a9e1..4af76c948 100644 --- a/Machines/ZX8081/ZX8081.cpp +++ b/Machines/ZX8081/ZX8081.cpp @@ -54,7 +54,7 @@ int Machine::perform_machine_cycle(const CPU::Z80::PartialMachineCycle &cycle) { } if(is_zx81_) horizontal_counter_ %= 207; -// tape_player_.run_for_cycles(cycle.length); + tape_player_.run_for_cycles(cycle.length); if(!cycle.is_terminal()) { return 0; @@ -117,7 +117,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(address == tape_trap_address_) { // TODO: && fast_tape_hack_enabled_ 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); @@ -126,7 +126,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/Storage/Tape/Tape.cpp b/Storage/Tape/Tape.cpp index acefab917..b5907a078 100644 --- a/Storage/Tape/Tape.cpp +++ b/Storage/Tape/Tape.cpp @@ -109,7 +109,7 @@ void BinaryTapePlayer::set_delegate(Delegate *delegate) { } void BinaryTapePlayer::process_input_pulse(Storage::Tape::Tape::Pulse pulse) { - bool new_input_level = pulse.type == Tape::Pulse::Low; + bool new_input_level = pulse.type == Tape::Pulse::High; if(input_level_ != new_input_level) { input_level_ = new_input_level; if(delegate_) delegate_->tape_did_change_input(this);