From a033451863738b30acfa617f91c3f3f7354af145 Mon Sep 17 00:00:00 2001 From: akuker Date: Sun, 19 Jul 2020 14:59:40 -0500 Subject: [PATCH] Un-do extraneous changes before merging back into source branch --- src/raspberrypi/convert_data.py | 65 --------------------------------- src/raspberrypi/disk.cpp | 51 +++++++------------------- src/raspberrypi/gpiobus.h | 41 ++++++++++----------- src/raspberrypi/log.h | 3 ++ src/raspberrypi/rascsi.cpp | 1 - 5 files changed, 36 insertions(+), 125 deletions(-) delete mode 100644 src/raspberrypi/convert_data.py diff --git a/src/raspberrypi/convert_data.py b/src/raspberrypi/convert_data.py deleted file mode 100644 index a57d1a5..0000000 --- a/src/raspberrypi/convert_data.py +++ /dev/null @@ -1,65 +0,0 @@ -#!/usr/bin/python - -import sys - -outfile = open('data.json', 'w') -infile = open('timing_drawer.txt','r') - -print("{signal: [", file=outfile) -firstline = infile.readline() - -num_columns = len(firstline.split(";")) - -# Skip the time field -field_num = 1 - -while (field_num < num_columns): - var = firstline.split(";") - var2 = var[field_num].split("=") - field_name = var2[0] - infile.seek(0) - print(" {name: '" + field_name + "', wave: '", file=outfile, end='') - prev_val = '' - if (field_name == "DATA"): - for line in infile: - value_pair = line.split(";")[field_num] - z = value_pair.split("=")[1].strip().replace(".","") - if(z == prev_val): - out = '.' - prev_val = z - elif (z == '00'): - out = '0' - else: - out = '2' - print(out, file=outfile, end='') - prev_val = z - print("', data: [", file=outfile, end='') - infile.seek(0) - for line in infile: - value_pair = line.split(";")[field_num] - z = value_pair.split("=")[1].strip().replace(".","") - if(z == prev_val): - continue - print("'" + z + "', ", file=outfile, end='') - prev_val = z - print("]},", file=outfile) - else: - for line in infile: - value_pair = line.split(";")[field_num] - z = value_pair.split("=")[1] - if(z == prev_val): - z = '.' - else: - prev_val = z - print(z, file=outfile, end='') - - print("'},", file=outfile) - - field_num = field_num + 1 - -print("]}", file=outfile) - - -outfile.close() - - diff --git a/src/raspberrypi/disk.cpp b/src/raspberrypi/disk.cpp index cda94ef..06ac18b 100644 --- a/src/raspberrypi/disk.cpp +++ b/src/raspberrypi/disk.cpp @@ -43,14 +43,6 @@ // Disk // //=========================================================================== -#ifndef DISK_LOG -#define DISK_LOG -#endif // DISK_LOG -#ifndef RASCSI -#define RASCSI -#endif // RASCSI - - #ifdef RASCSI #define BENDER_SIGNATURE "RaSCSI" @@ -6447,16 +6439,14 @@ void FASTCALL SASIDEV::Selection() return; } - // Wait for this monitor target to assert the selection - // before moving on to the selection phase. - if(ctrl.bus->GetBSY()) - { - // Phase change - ctrl.phase = BUS::selection; - spdlog::trace( - "[ID %d] Selection Phase (with device)", ctrl.id); - } + spdlog::trace( + "Selection Phase ID=%d (with device)", ctrl.id); + // Phase change + ctrl.phase = BUS::selection; + + // Raise BSY and respond + ctrl.bus->SetBSY(TRUE); return; } @@ -6495,14 +6485,6 @@ void FASTCALL SASIDEV::Command() ctrl.bus->SetCD(TRUE); ctrl.bus->SetIO(FALSE); - // Wait until target sets the following condition: - // MSG = FALSE - // CD = TRUE - // IO = FALSE - if (ctrl.bus->GetMSG() || !ctrl.bus->GetCD() || ctrl.bus->GetIO()) { - return; - } - // Data transfer is 6 bytes x 1 block ctrl.offset = 0; ctrl.length = 6; @@ -8037,7 +8019,6 @@ BUS::phase_t FASTCALL SCSIDEV::Process() return ctrl.phase; } -// spdlog::trace("ID {} in phase {}",ctrl.id,ctrl.phase); // Phase processing switch (ctrl.phase) { // Bus free phase @@ -8162,20 +8143,14 @@ void FASTCALL SCSIDEV::Selection() return; } + spdlog::trace( + "Selection Phase ID={} (with device)", ctrl.id); + + // Phase setting ctrl.phase = BUS::selection; - // Wait for this monitor target to assert the selection - // before moving on to the selection phase. - if(ctrl.bus->GetBSY()) - { - // Phase change - spdlog::trace( - "[ID {} Selection Phase (with device)", ctrl.id); - } - else{ - spdlog::trace("[ID {}] Selection phase", ctrl.id); - } - + // Raise BSY and respond + ctrl.bus->SetBSY(TRUE); return; } diff --git a/src/raspberrypi/gpiobus.h b/src/raspberrypi/gpiobus.h index 3e1b844..9d269e1 100644 --- a/src/raspberrypi/gpiobus.h +++ b/src/raspberrypi/gpiobus.h @@ -141,25 +141,6 @@ #define PIN_BSY 26 // BSY #define PIN_SEL 27 // SEL -#define ALL_SCSI_PINS \ - ((1<