From 25956bd90fd8d798c8f6105eb12c5197f8817571 Mon Sep 17 00:00:00 2001 From: Thomas Harte Date: Mon, 26 Aug 2019 22:35:11 -0400 Subject: [PATCH] Mildly improves temporary logging. A deckchair shuffle, at best. --- Storage/MassStorage/SCSI/SCSI.cpp | 14 +++++++++++++- Storage/MassStorage/SCSI/TargetImplementation.hpp | 1 - 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/Storage/MassStorage/SCSI/SCSI.cpp b/Storage/MassStorage/SCSI/SCSI.cpp index a6ba9a0a0..ab858c009 100644 --- a/Storage/MassStorage/SCSI/SCSI.cpp +++ b/Storage/MassStorage/SCSI/SCSI.cpp @@ -27,7 +27,19 @@ void Bus::set_device_output(size_t device, BusState output) { } if(state_ == previous_state) return; - printf("SCSI bus: %08x\n", state_); + printf("SCSI bus: %02x %c%c%c%c%c%c%c%c%c%c\n", + state_ & 0xff, + (state_ & Line::Parity) ? 'p' : '-', + (state_ & Line::SelectTarget) ? 's' : '-', + (state_ & Line::Attention) ? 'a' : '-', + (state_ & Line::Control) ? 'c' : '-', + (state_ & Line::Busy) ? 'b' : '-', + (state_ & Line::Acknowledge) ? 'a' : '-', + (state_ & Line::Reset) ? 'r' : '-', + (state_ & Line::Input) ? 'i' : '-', + (state_ & Line::Message) ? 'm' : '-', + (state_ & Line::Request) ? 'q' : '-' + ); for(auto &observer: observers_) { observer->scsi_bus_did_change(this, state_); diff --git a/Storage/MassStorage/SCSI/TargetImplementation.hpp b/Storage/MassStorage/SCSI/TargetImplementation.hpp index e61ce9b82..d5faa359c 100644 --- a/Storage/MassStorage/SCSI/TargetImplementation.hpp +++ b/Storage/MassStorage/SCSI/TargetImplementation.hpp @@ -125,7 +125,6 @@ template void Target::scsi_bus_did_change(Bus *, B case 0: bus_state_ |= Line::Request; bus_state_ = (bus_state_ & ~0xff) | data_[data_pointer_]; - printf("Lower bus: %02x\n", bus_state_ & 0xff); break; } bus_.set_device_output(scsi_bus_device_id_, bus_state_);