Kaynağa Gözat

ZuluSCSI. Now with More Cowbell, and less drama

Alex Perez 3 yıl önce
ebeveyn
işleme
276ac22e3e

+ 3 - 3
lib/ZuluSCSI_platform_template/AzulSCSI_platform.cpp

@@ -1,6 +1,6 @@
-#include "AzulSCSI_platform.h"
-#include "AzulSCSI_log.h"
-#include "AzulSCSI_config.h"
+#include "ZuluSCSI_platform.h"
+#include "ZuluSCSI_log.h"
+#include "ZuluSCSI_config.h"
 #include <SdFat.h>
 #include <scsi.h>
 #include <assert.h>

+ 2 - 2
lib/ZuluSCSI_platform_template/AzulSCSI_platform.h

@@ -1,4 +1,4 @@
-// Platform-specific definitions for AzulSCSI.
+// Platform-specific definitions for ZuluSCSI.
 //
 // This file is example platform definition that can easily be
 // customized for a different board / CPU.
@@ -8,7 +8,7 @@
 /* Add any platform-specific includes you need here */
 #include <stdint.h>
 #include <Arduino.h>
-#include "AzulSCSI_platform_gpio.h"
+#include "ZuluSCSI_platform_gpio.h"
 
 #ifdef __cplusplus
 extern "C" {

+ 1 - 1
lib/ZuluSCSI_platform_template/AzulSCSI_platform_gpio.h

@@ -1,4 +1,4 @@
-// Example GPIO definitions for AzulSCSI platform
+// Example GPIO definitions for ZuluSCSI platform
 
 #pragma once
 

+ 8 - 8
lib/ZuluSCSI_platform_template/README.md

@@ -1,7 +1,7 @@
-Porting AzulSCSI firmware to new platforms
+Porting ZuluSCSI firmware to new platforms
 ==========================================
 
-The AzulSCSI firmware is designed to be portable to a wide variety of platforms.
+The ZuluSCSI firmware is designed to be portable to a wide variety of platforms.
 This directory contains an example platform definition that can serve as a base for
 porting efforts.
 
@@ -10,16 +10,16 @@ Creating a new platform definition
 
 The bare minimum to support a new platform is to:
 
-1. Make a copy of the `AzulSCSI_platform_template` folder to a new name, e.g. `AzulSCSI_platform_MyCustomHardware`
+1. Make a copy of the `ZuluSCSI_platform_template` folder to a new name, e.g. `ZuluSCSI_platform_MyCustomHardware`
 2. Make a copy of the `[env:template]` section to a new name, e.g. `[env:MyCustomHardware]`
-3. Edit `AzulSCSI_platform_gpio.h` to match the pinout of your platform.
-4. Edit `AzulSCSI_platform.h` for the hardware access functions implemented in your platform.
+3. Edit `ZuluSCSI_platform_gpio.h` to match the pinout of your platform.
+4. Edit `ZuluSCSI_platform.h` for the hardware access functions implemented in your platform.
 5. Edit `scsiPhy.cpp` to enable the `RST` and `BSY` interrupts.
 
 Required IO capabilities
 ------------------------
 
-The minimum IO capabilities for AzulSCSI firmware are:
+The minimum IO capabilities for ZuluSCSI firmware are:
 
 * Bidirectional access to SCSI data bus: `DB0`-`DB7`, `DBP`
 * Bidirectional access to SCSI signal `BSY`, with rising edge interrupt.
@@ -31,7 +31,7 @@ The minimum IO capabilities for AzulSCSI firmware are:
 RAM usage
 ---------
 
-By default the AzulSCSI firmware uses large buffers for best performance.
+By default the ZuluSCSI firmware uses large buffers for best performance.
 The total RAM usage in default configuration is about 100 kB.
 Minimum possible RAM usage is about 10 kB.
 
@@ -53,5 +53,5 @@ The SCSI handshake mechanism is harder to implement using DMA.
 To implement parallelism with SD card DMA, implement `azplatform_set_sd_callback(func, buffer)`.
 It sets a callback function which should be called by the SD card driver to report how many bytes have
 been transferred to/from `buffer` so far. The SD card driver should call this function in a loop while
-it is waiting for SD card transfer to finish. The code in `AzulSCSI_disk.cpp` will implement the callback
+it is waiting for SD card transfer to finish. The code in `ZuluSCSI_disk.cpp` will implement the callback
 that will transfer the data to SCSI bus during the wait.

+ 1 - 1
lib/ZuluSCSI_platform_template/scsi2sd_time.h

@@ -4,7 +4,7 @@
 #pragma once
 
 #include <stdint.h>
-#include "AzulSCSI_platform.h"
+#include "ZuluSCSI_platform.h"
 
 #define s2s_getTime_ms() millis()
 #define s2s_elapsedTime_ms(since) ((uint32_t)(millis() - (since)))

+ 4 - 4
lib/ZuluSCSI_platform_template/scsiPhy.cpp

@@ -2,10 +2,10 @@
 // Partially derived from scsiPhy.c from SCSI2SD-V6
 
 #include "scsiPhy.h"
-#include "AzulSCSI_platform.h"
-#include "AzulSCSI_log.h"
-#include "AzulSCSI_log_trace.h"
-#include "AzulSCSI_config.h"
+#include "ZuluSCSI_platform.h"
+#include "ZuluSCSI_log.h"
+#include "ZuluSCSI_log_trace.h"
+#include "ZuluSCSI_config.h"
 
 #include <scsi2sd.h>
 extern "C" {

+ 7 - 7
src/ZuluSCSI.cpp

@@ -1,5 +1,5 @@
 /*  
- *  AzulSCSI
+ *  ZuluSCSI
  *  Copyright (c) 2022 Rabbit Hole Computing
  * 
  * This project is based on BlueSCSI:
@@ -44,11 +44,11 @@
 #include <minIni.h>
 #include <string.h>
 #include <ctype.h>
-#include "AzulSCSI_config.h"
-#include "AzulSCSI_platform.h"
-#include "AzulSCSI_log.h"
-#include "AzulSCSI_log_trace.h"
-#include "AzulSCSI_disk.h"
+#include "ZuluSCSI_config.h"
+#include "ZuluSCSI_platform.h"
+#include "ZuluSCSI_log.h"
+#include "ZuluSCSI_log_trace.h"
+#include "ZuluSCSI_disk.h"
 
 SdFs SD;
 FsFile g_logfile;
@@ -362,7 +362,7 @@ static void reinitSCSI()
   
 }
 
-extern "C" int azulscsi_main(void)
+extern "C" int zuluscsi_main(void)
 {
   azplatform_init();
   azplatform_late_init();

+ 4 - 4
src/ZuluSCSI_bootloader.cpp

@@ -1,7 +1,7 @@
 // Simple bootloader that loads new firmware from SD card.
 
-#include <AzulSCSI_platform.h>
-#include "AzulSCSI_log.h"
+#include <ZuluSCSI_platform.h>
+#include "ZuluSCSI_log.h"
 #include <SdFat.h>
 #include <string.h>
 
@@ -22,7 +22,7 @@ bool find_firmware_image(FsFile &file, char name[MAX_FILE_PATH + 1])
         int namelen = file.getName(name, MAX_FILE_PATH);
 
         if (namelen >= 11 &&
-            strncasecmp(name, "azulscsi", 8) == 0 &&
+            strncasecmp(name, "zuluscsi", 8) == 0 &&
             strncasecmp(name + namelen - 3, "bin", 3) == 0)
         {
             root.close();
@@ -120,4 +120,4 @@ int bootloader_main(void)
     return 0;
 }
 
-#endif
+#endif

+ 9 - 9
src/ZuluSCSI_config.h

@@ -4,9 +4,9 @@
 #pragma once
 
 // Configuration and log file paths
-#define CONFIGFILE  "azulscsi.ini"
-#define LOGFILE     "azullog.txt"
-#define CRASHFILE   "azulerr.txt"
+#define CONFIGFILE  "zuluscsi.ini"
+#define LOGFILE     "zululog.txt"
+#define CRASHFILE   "zuluerr.txt"
 
 // Log buffer size in bytes, must be a power of 2
 #ifndef LOGBUFSIZE
@@ -34,12 +34,12 @@
 // Selected based on device type (fixed, removable, optical, floppy, mag-optical, tape)
 // Each entry has {vendor, product, version, serial}
 // If serial number is left empty, SD card serial number is used.
-#define DRIVEINFO_FIXED     {"AZULSCSI", "HARDDRIVE", PLATFORM_REVISION, ""}
-#define DRIVEINFO_REMOVABLE {"AZULSCSI", "REMOVABLE", PLATFORM_REVISION, ""}
-#define DRIVEINFO_OPTICAL   {"AZULSCSI", "CDROM",     PLATFORM_REVISION, ""}
-#define DRIVEINFO_FLOPPY    {"AZULSCSI", "FLOPPY",    PLATFORM_REVISION, ""}
-#define DRIVEINFO_MAGOPT    {"AZULSCSI", "MO_DRIVE",  PLATFORM_REVISION, ""}
-#define DRIVEINFO_TAPE      {"AZULSCSI", "TAPE",      PLATFORM_REVISION, ""}
+#define DRIVEINFO_FIXED     {"ZULUSCSI", "HARDDRIVE", PLATFORM_REVISION, ""}
+#define DRIVEINFO_REMOVABLE {"ZULUSCSI", "REMOVABLE", PLATFORM_REVISION, ""}
+#define DRIVEINFO_OPTICAL   {"ZULUSCSI", "CDROM",     PLATFORM_REVISION, ""}
+#define DRIVEINFO_FLOPPY    {"ZULUSCSI", "FLOPPY",    PLATFORM_REVISION, ""}
+#define DRIVEINFO_MAGOPT    {"ZULUSCSI", "MO_DRIVE",  PLATFORM_REVISION, ""}
+#define DRIVEINFO_TAPE      {"ZULUSCSI", "TAPE",      PLATFORM_REVISION, ""}
 
 // Default delay for SCSI phases.
 // Can be adjusted in ini file

+ 3 - 3
src/ZuluSCSI_disk.cpp

@@ -6,9 +6,9 @@
 //    Copyright (C) 2014 Doug Brown <doug@downtowndougbrown.com>
 //    Copyright (C) 2022 Rabbit Hole Computing
 
-#include "AzulSCSI_disk.h"
-#include "AzulSCSI_log.h"
-#include "AzulSCSI_config.h"
+#include "ZuluSCSI_disk.h"
+#include "ZuluSCSI_log.h"
+#include "ZuluSCSI_config.h"
 #include <minIni.h>
 #include <string.h>
 #include <SdFat.h>

+ 4 - 4
src/ZuluSCSI_log.cpp

@@ -1,11 +1,11 @@
-#include "AzulSCSI_log.h"
-#include "AzulSCSI_config.h"
-#include "AzulSCSI_platform.h"
+#include "ZuluSCSI_log.h"
+#include "ZuluSCSI_config.h"
+#include "ZuluSCSI_platform.h"
 
 const char *g_azlog_firmwareversion = "1.0.1" " " __DATE__ " " __TIME__;
 bool g_azlog_debug = true;
 
-// This memory buffer can be read by debugger and is also saved to azullog.txt
+// This memory buffer can be read by debugger and is also saved to zululog.txt
 #define LOGBUFMASK (LOGBUFSIZE - 1)
 
 // The log buffer is in special uninitialized RAM section so that it is not reset

+ 3 - 3
src/ZuluSCSI_log_trace.cpp

@@ -1,7 +1,7 @@
 // SCSI trace logging
 
-#include "AzulSCSI_log_trace.h"
-#include "AzulSCSI_log.h"
+#include "ZuluSCSI_log_trace.h"
+#include "ZuluSCSI_log.h"
 #include <scsi2sd.h>
 
 extern "C" {
@@ -180,4 +180,4 @@ void scsiLogDataOut(const uint8_t *buf, uint32_t length)
     }
 
     g_OutByteCount += length;
-}
+}

+ 4 - 4
src/ZuluSCSI_main.cpp

@@ -1,7 +1,7 @@
 // Simple wrapper file that diverts boot from main program to bootloader
 // when building the bootloader image by build_bootloader.py.
 
-#ifdef AZULSCSI_BOOTLOADER_MAIN
+#ifdef ZULUSCSI_BOOTLOADER_MAIN
 
 extern "C" int bootloader_main(void);
 
@@ -12,11 +12,11 @@ int main(void)
 
 #else
 
-extern "C" int azulscsi_main(void);
+extern "C" int zuluscsi_main(void);
 
 int main(void)
 {
-    return azulscsi_main();
+    return zuluscsi_main();
 }
 
-#endif
+#endif