From 5542fa9e7cdb96c3a6c29a4c9bded9c7b84b663c Mon Sep 17 00:00:00 2001 From: Uwe Seimet <48174652+uweseimet@users.noreply.github.com> Date: Wed, 8 Nov 2023 13:27:49 +0100 Subject: [PATCH] Re-add CONNECT_TYPE_CONNECT_TYPE_AIBOM and CONNECT_TYPE_GAMERNIUM (#1315) (#1317) * Re-add CONNECT_TYPE_CONNECT_TYPE_AIBOM and CONNECT_TYPE_GAMERNIUM --- .github/workflows/build_code.yml | 10 ++++ cpp/hal/connection_type/connection_aibom.h | 56 +++++++++++++++++++ .../connection_type/connection_gamernium.h | 56 +++++++++++++++++++ cpp/hal/data_sample_raspberry.h | 6 +- cpp/hal/gpiobus.h | 6 ++ cpp/scsiloop/scsiloop_gpio.cpp | 4 ++ 6 files changed, 137 insertions(+), 1 deletion(-) create mode 100644 cpp/hal/connection_type/connection_aibom.h create mode 100644 cpp/hal/connection_type/connection_gamernium.h diff --git a/.github/workflows/build_code.yml b/.github/workflows/build_code.yml index a17b01ba..e0c38852 100644 --- a/.github/workflows/build_code.yml +++ b/.github/workflows/build_code.yml @@ -32,6 +32,16 @@ jobs: with: connect-type: "STANDARD" + aibom: + uses: PiSCSI/piscsi/.github/workflows/arm_cross_compile.yml@develop + with: + connect-type: "AIBOM" + + gamernium: + uses: PiSCSI/piscsi/.github/workflows/arm_cross_compile.yml@develop + with: + connect-type: "GAMERNIUM" + # The fullspec connection board is the most common debug-fullspec: uses: PiSCSI/piscsi/.github/workflows/arm_cross_compile.yml@develop diff --git a/cpp/hal/connection_type/connection_aibom.h b/cpp/hal/connection_type/connection_aibom.h new file mode 100644 index 00000000..1328f5bc --- /dev/null +++ b/cpp/hal/connection_type/connection_aibom.h @@ -0,0 +1,56 @@ +//--------------------------------------------------------------------------- +// +// SCSI Target Emulator PiSCSI +// for Raspberry Pi +// +// Powered by XM6 TypeG Technology. +// Copyright (C) 2016-2020 GIMONS +// +//--------------------------------------------------------------------------- + +#pragma once + +#include + +// +// RaSCSI Adapter Aibom version +// + +const std::string CONNECT_DESC = "AIBOM PRODUCTS version"; // Startup message + +// Select signal control mode +const static int SIGNAL_CONTROL_MODE = 2; // SCSI positive logic specification + +// Control signal output logic +#define ACT_ON ON // ACTIVE SIGNAL ON +#define ENB_ON ON // ENABLE SIGNAL ON +#define IND_IN OFF // INITIATOR SIGNAL INPUT +#define TAD_IN OFF // TARGET SIGNAL INPUT +#define DTD_IN OFF // DATA SIGNAL INPUT + +// Control signal pin assignment (-1 means no control) +const static int PIN_ACT = 4; // ACTIVE +const static int PIN_ENB = 17; // ENABLE +const static int PIN_IND = 27; // INITIATOR CTRL DIRECTION +const static int PIN_TAD = -1; // TARGET CTRL DIRECTION +const static int PIN_DTD = 18; // DATA DIRECTION + +// SCSI signal pin assignment +const static int PIN_DT0 = 6; // Data 0 +const static int PIN_DT1 = 12; // Data 1 +const static int PIN_DT2 = 13; // Data 2 +const static int PIN_DT3 = 16; // Data 3 +const static int PIN_DT4 = 19; // Data 4 +const static int PIN_DT5 = 20; // Data 5 +const static int PIN_DT6 = 26; // Data 6 +const static int PIN_DT7 = 21; // Data 7 +const static int PIN_DP = 5; // Data parity +const static int PIN_ATN = 22; // ATN +const static int PIN_RST = 25; // RST +const static int PIN_ACK = 10; // ACK +const static int PIN_REQ = 7; // REQ +const static int PIN_MSG = 9; // MSG +const static int PIN_CD = 11; // CD +const static int PIN_IO = 23; // IO +const static int PIN_BSY = 24; // BSY +const static int PIN_SEL = 8; // SEL diff --git a/cpp/hal/connection_type/connection_gamernium.h b/cpp/hal/connection_type/connection_gamernium.h new file mode 100644 index 00000000..70751560 --- /dev/null +++ b/cpp/hal/connection_type/connection_gamernium.h @@ -0,0 +1,56 @@ +//--------------------------------------------------------------------------- +// +// SCSI Target Emulator PiSCSI +// for Raspberry Pi +// +// Powered by XM6 TypeG Technology. +// Copyright (C) 2016-2020 GIMONS +// +//--------------------------------------------------------------------------- + +#pragma once + +#include + +// +// RaSCSI Adapter GAMERnium.com version +// + +const std::string CONNECT_DESC = "GAMERnium.com version"; // Startup message + +// Select signal control mode +const static int SIGNAL_CONTROL_MODE = 0; // SCSI logical specification + +// Control signal output logic +#define ACT_ON ON // ACTIVE SIGNAL ON +#define ENB_ON ON // ENABLE SIGNAL ON +#define IND_IN OFF // INITIATOR SIGNAL INPUT +#define TAD_IN OFF // TARGET SIGNAL INPUT +#define DTD_IN ON // DATA SIGNAL INPUT + +// Control signal pin assignment (-1 means no control) +const static int PIN_ACT = 14; // ACTIVE +const static int PIN_ENB = 6; // ENABLE +const static int PIN_IND = 7; // INITIATOR CTRL DIRECTION +const static int PIN_TAD = 8; // TARGET CTRL DIRECTION +const static int PIN_DTD = 5; // DATA DIRECTION + +// SCSI signal pin assignment +const static int PIN_DT0 = 21; // Data 0 +const static int PIN_DT1 = 26; // Data 1 +const static int PIN_DT2 = 20; // Data 2 +const static int PIN_DT3 = 19; // Data 3 +const static int PIN_DT4 = 16; // Data 4 +const static int PIN_DT5 = 13; // Data 5 +const static int PIN_DT6 = 12; // Data 6 +const static int PIN_DT7 = 11; // Data 7 +const static int PIN_DP = 25; // Data parity +const static int PIN_ATN = 10; // ATN +const static int PIN_RST = 22; // RST +const static int PIN_ACK = 24; // ACK +const static int PIN_REQ = 15; // REQ +const static int PIN_MSG = 17; // MSG +const static int PIN_CD = 18; // CD +const static int PIN_IO = 4; // IO +const static int PIN_BSY = 27; // BSY +const static int PIN_SEL = 23; // SEL diff --git a/cpp/hal/data_sample_raspberry.h b/cpp/hal/data_sample_raspberry.h index 9951d661..a0b5e1e7 100644 --- a/cpp/hal/data_sample_raspberry.h +++ b/cpp/hal/data_sample_raspberry.h @@ -18,6 +18,10 @@ #include "hal/connection_type/connection_standard.h" #elif defined CONNECT_TYPE_FULLSPEC #include "hal/connection_type/connection_fullspec.h" +#elif defined CONNECT_TYPE_AIBOM +#include "hal/connection_type/connection_aibom.h" +#elif defined CONNECT_TYPE_GAMERNIUM +#include "hal/connection_type/connection_gamernium.h" #else #error Invalid connection type or none specified #endif @@ -102,4 +106,4 @@ class DataSample_Raspberry final : public DataSample private: uint32_t data = 0; -}; +}; \ No newline at end of file diff --git a/cpp/hal/gpiobus.h b/cpp/hal/gpiobus.h index 7dbff55c..fe774115 100644 --- a/cpp/hal/gpiobus.h +++ b/cpp/hal/gpiobus.h @@ -26,11 +26,17 @@ //--------------------------------------------------------------------------- //#define CONNECT_TYPE_STANDARD // Standard (SCSI logic, standard pin assignment) //#define CONNECT_TYPE_FULLSPEC // Full spec (SCSI logic, standard pin assignment) +//#define CONNECT_TYPE_AIBOM // AIBOM version (positive logic, unique pin assignment) +//#define CONNECT_TYPE_GAMERNIUM // GAMERnium.com version (standard logic, unique pin assignment) #if defined CONNECT_TYPE_STANDARD #include "hal/connection_type/connection_standard.h" #elif defined CONNECT_TYPE_FULLSPEC #include "hal/connection_type/connection_fullspec.h" +#elif defined CONNECT_TYPE_AIBOM +#include "hal/connection_type/connection_aibom.h" +#elif defined CONNECT_TYPE_GAMERNIUM +#include "hal/connection_type/connection_gamernium.h" #else #error Invalid connection type or none specified #endif diff --git a/cpp/scsiloop/scsiloop_gpio.cpp b/cpp/scsiloop/scsiloop_gpio.cpp index 97d53192..9a803ce2 100644 --- a/cpp/scsiloop/scsiloop_gpio.cpp +++ b/cpp/scsiloop/scsiloop_gpio.cpp @@ -18,6 +18,10 @@ #include "hal/connection_type/connection_standard.h" #elif defined CONNECT_TYPE_FULLSPEC #include "hal/connection_type/connection_fullspec.h" +#elif defined CONNECT_TYPE_AIBOM +#include "hal/connection_type/connection_aibom.h" +#elif defined CONNECT_TYPE_GAMERNIUM +#include "hal/connection_type/connection_gamernium.h" #else #error Invalid connection type or none specified #endif