From 7e001c1d03830daf3090bb3195ad392e14b73f07 Mon Sep 17 00:00:00 2001 From: Thomas Harte Date: Sat, 17 Aug 2019 21:30:59 -0400 Subject: [PATCH] Corrects data line loading. Also adds some extra temporary logging. Outstanding question: why is ATN not being signalled? Is SEL enough? --- Components/5380/SCSI.cpp | 1 + Components/5380/ncr5380.cpp | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Components/5380/SCSI.cpp b/Components/5380/SCSI.cpp index 796a0d7f0..1ae837b05 100644 --- a/Components/5380/SCSI.cpp +++ b/Components/5380/SCSI.cpp @@ -17,6 +17,7 @@ size_t Bus::add_device() { } void Bus::set_device_output(size_t device, BusState output) { + printf("%08x output\n", output); device_states_[device] = output; state_is_valid_ = false; } diff --git a/Components/5380/ncr5380.cpp b/Components/5380/ncr5380.cpp index ec794085a..82fcbe75e 100644 --- a/Components/5380/ncr5380.cpp +++ b/Components/5380/ncr5380.cpp @@ -97,9 +97,9 @@ void NCR5380::write(int address, uint8_t value) { // Data is output only if the data bus is asserted. if(assert_data_bus_) { - bus_output_ &= data_bus_; + bus_output_ |= data_bus_; } else { - bus_output_ |= SCSI::Line::Data; + bus_output_ &= ~SCSI::Line::Data; } // In test mode, still nothing is output. Otherwise throw out