1
0
mirror of https://github.com/TomHarte/CLK.git synced 2024-07-05 10:28:58 +00:00

Mildly improves temporary logging.

A deckchair shuffle, at best.
This commit is contained in:
Thomas Harte 2019-08-26 22:35:11 -04:00
parent 1a60ced61b
commit 25956bd90f
2 changed files with 13 additions and 2 deletions

View File

@ -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_);

View File

@ -125,7 +125,6 @@ template <typename Executor> void Target<Executor>::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_);