ZuluSCSI_config.h 3.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. // Compile-time configuration parameters.
  2. // Other settings can be set by ini file at runtime.
  3. #pragma once
  4. #include <ZuluSCSI_platform.h>
  5. // Use variables for version number
  6. #define FW_VER_NUM "1.1.3"
  7. #define FW_VER_SUFFIX "release"
  8. #define ZULU_FW_VERSION FW_VER_NUM "-" FW_VER_SUFFIX
  9. // Configuration and log file paths
  10. #define CONFIGFILE "zuluscsi.ini"
  11. #define LOGFILE "zululog.txt"
  12. #define CRASHFILE "zuluerr.txt"
  13. // Log buffer size in bytes, must be a power of 2
  14. #ifndef LOGBUFSIZE
  15. #define LOGBUFSIZE 16384
  16. #endif
  17. #define LOG_SAVE_INTERVAL_MS 1000
  18. // Watchdog timeout
  19. // Watchdog will first issue a bus reset and if that does not help, crashdump.
  20. #define WATCHDOG_BUS_RESET_TIMEOUT 15000
  21. #define WATCHDOG_CRASH_TIMEOUT 30000
  22. // HDD image file format
  23. #define HDIMG_ID_POS 2 // Position to embed ID number
  24. #define HDIMG_LUN_POS 3 // Position to embed LUN numbers
  25. #define HDIMG_BLK_POS 5 // Position to embed block size numbers
  26. #define MAX_FILE_PATH 64 // Maximum file name length
  27. // SCSI config
  28. #define NUM_SCSIID 8 // Maximum number of supported SCSI-IDs (The minimum is 0)
  29. #define NUM_SCSILUN 1 // Maximum number of LUNs supported (Currently has to be 1)
  30. #define READ_PARITY_CHECK 0 // Perform read parity check (unverified)
  31. // SCSI raw fallback configuration when no image files are detected
  32. // Presents the whole SD card as an SCSI drive
  33. #define RAW_FALLBACK_ENABLE 1
  34. #define RAW_FALLBACK_SCSI_ID 1
  35. #define RAW_FALLBACK_BLOCKSIZE 512
  36. // Default SCSI drive information (can be overridden in INI file)
  37. // Selected based on device type (fixed, removable, optical, floppy, mag-optical, tape)
  38. // Each entry has {vendor, product, version, serial}
  39. // If serial number is left empty, SD card serial number is used.
  40. #define DRIVEINFO_FIXED {"ZULUSCSI", "HARDDRIVE", PLATFORM_REVISION, ""}
  41. #define DRIVEINFO_REMOVABLE {"ZULUSCSI", "REMOVABLE", PLATFORM_REVISION, ""}
  42. #define DRIVEINFO_OPTICAL {"ZULUSCSI", "CDROM", PLATFORM_REVISION, ""}
  43. #define DRIVEINFO_FLOPPY {"ZULUSCSI", "FLOPPY", PLATFORM_REVISION, ""}
  44. #define DRIVEINFO_MAGOPT {"ZULUSCSI", "MO_DRIVE", PLATFORM_REVISION, ""}
  45. #define DRIVEINFO_TAPE {"ZULUSCSI", "TAPE", PLATFORM_REVISION, ""}
  46. // Default SCSI drive information when Apple quirks are enabled
  47. #define APPLE_DRIVEINFO_FIXED {"CDC", "ZuluSCSI HDD", PLATFORM_REVISION, "1.0"}
  48. #define APPLE_DRIVEINFO_REMOVABLE {"IOMEGA", "BETA230", PLATFORM_REVISION, "2.02"}
  49. #define APPLE_DRIVEINFO_OPTICAL {"MATSHITA", "CD-ROM CR-8004A", PLATFORM_REVISION, "2.0a"}
  50. #define APPLE_DRIVEINFO_FLOPPY {"TEAC", "FD235HS", PLATFORM_REVISION, "1.44"}
  51. #define APPLE_DRIVEINFO_MAGOPT {"MOST", "RMD-5200", PLATFORM_REVISION, "1.0"}
  52. #define APPLE_DRIVEINFO_TAPE {"ZULUSCSI", "APPLE_TAPE", PLATFORM_REVISION, ""}
  53. // Default delay for SCSI phases.
  54. // Can be adjusted in ini file
  55. #define DEFAULT_SCSI_DELAY_US 10
  56. #define DEFAULT_REQ_TYPE_SETUP_NS 500
  57. // Use prefetch buffer in read requests
  58. #ifndef PREFETCH_BUFFER_SIZE
  59. #define PREFETCH_BUFFER_SIZE 8192
  60. #endif