From: Michael McMaster Date: Sat, 29 Apr 2017 05:38:49 +0000 (+1000) Subject: Add "turbo" speed mode. X-Git-Tag: v6.1.1~2 X-Git-Url: http://git.codesrc.com/gitweb.cgi?a=commitdiff_plain;h=b51a2ca345c1228134a7a8b711cc7e530154674a;p=SCSI2SD-V6.git Add "turbo" speed mode. --- diff --git a/CHANGELOG b/CHANGELOG index 3c17ec20..1a82b9d2 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,9 @@ +20170429 6.1.1 + - Add new "turbo" speed mode to get faster async transfers. + - Fix scsi2sd-util6 size and sector-size inputs + - Fix crash when configured scsi disk starting sector is less than + SD card size + 20170329 6.1.0 - Enable synchronous transfers on SCSI1 hosts - Support 4MB/s sync transfers for Amiga A590 (WD33C93) diff --git a/include/scsi2sd.h b/include/scsi2sd.h index 6048e55f..44eec495 100755 --- a/include/scsi2sd.h +++ b/include/scsi2sd.h @@ -90,7 +90,8 @@ typedef enum S2S_CFG_SPEED_ASYNC_33, S2S_CFG_SPEED_ASYNC_50, S2S_CFG_SPEED_SYNC_5, - S2S_CFG_SPEED_SYNC_10 + S2S_CFG_SPEED_SYNC_10, + S2S_CFG_SPEED_TURBO } S2S_CFG_SPEED; typedef struct __attribute__((packed)) diff --git a/src/firmware/config.c b/src/firmware/config.c index edb4be06..e5451ec1 100755 --- a/src/firmware/config.c +++ b/src/firmware/config.c @@ -38,7 +38,7 @@ #include -static const uint16_t FIRMWARE_VERSION = 0x0610; +static const uint16_t FIRMWARE_VERSION = 0x0611; // 1 flash row static const uint8_t DEFAULT_CONFIG[128] = diff --git a/src/firmware/scsiPhy.c b/src/firmware/scsiPhy.c index c0f8cdb0..488c33c6 100755 --- a/src/firmware/scsiPhy.c +++ b/src/firmware/scsiPhy.c @@ -33,12 +33,16 @@ static uint8_t asyncTimings[][4] = /* Speed, Assert, Deskew, Hold, Glitch */ {/*1.5MB/s*/ 28, 18, 13, 13}, {/*3.3MB/s*/ 13, 6, 6, 13}, -{/*5MB/s*/ 9, 6, 6, 6} // 80ns +{/*5MB/s*/ 9, 6, 6, 6}, // 80ns +{/*safe*/ 3, 6, 6, 6}, // Probably safe +{/*turbo*/ 3, 3, 3, 2} }; #define SCSI_ASYNC_15 0 #define SCSI_ASYNC_33 1 #define SCSI_ASYNC_50 2 +#define SCSI_ASYNC_SAFE 3 +#define SCSI_ASYNC_TURBO 4 // 5MB/s synchronous timing #define SCSI_FAST5_DESKEW 6 // 55ns @@ -463,7 +467,7 @@ scsiSetTiming( static void scsiSetDefaultTiming() { - const uint8_t* asyncTiming = asyncTimings[3]; + const uint8_t* asyncTiming = asyncTimings[0]; scsiSetTiming( asyncTiming[0], asyncTiming[1], @@ -521,9 +525,16 @@ void scsiEnterPhase(int phase) *SCSI_CTRL_SYNC_OFFSET = 0; const uint8_t* asyncTiming; - if (scsiDev.boardCfg.scsiSpeed == S2S_CFG_SPEED_NoLimit || - scsiDev.boardCfg.scsiSpeed >= S2S_CFG_SPEED_ASYNC_50) { - + if (scsiDev.boardCfg.scsiSpeed == S2S_CFG_SPEED_NoLimit) + { + asyncTiming = asyncTimings[SCSI_ASYNC_SAFE]; + } + else if (scsiDev.boardCfg.scsiSpeed >= S2S_CFG_SPEED_TURBO) + { + asyncTiming = asyncTimings[SCSI_ASYNC_TURBO]; + } + else if (scsiDev.boardCfg.scsiSpeed >= S2S_CFG_SPEED_ASYNC_50) + { asyncTiming = asyncTimings[SCSI_ASYNC_50]; } else if (scsiDev.boardCfg.scsiSpeed >= S2S_CFG_SPEED_ASYNC_33) { diff --git a/src/scsi2sd-util6/BoardPanel.cc b/src/scsi2sd-util6/BoardPanel.cc index 157435b1..e7a3b190 100644 --- a/src/scsi2sd-util6/BoardPanel.cc +++ b/src/scsi2sd-util6/BoardPanel.cc @@ -66,11 +66,13 @@ BoardPanel::BoardPanel(wxWindow* parent, const S2S_BoardCfg& initialConfig) : fgs->Add(new wxStaticText(this, wxID_ANY, _("SCSI Speed Limit"))); wxString speeds[] = { - wxT("No limit"), + wxT("No limit (safe)"), wxT("Async, 1.5MB/s"), wxT("Async, 3.3MB/s"), wxT("Async, 5 MB/s"), - wxT("Sync, 5 MB/s")}; + wxT("Sync, 5 MB/s"), + wxT("Sync, 10 MB/s"), + wxT("Turbo (less reliable)")}; myScsiSpeedCtrl = new wxChoice(