diff --git a/src/engine/engine.h b/src/engine/engine.h index e187ba7b..ab028aca 100644 --- a/src/engine/engine.h +++ b/src/engine/engine.h @@ -47,8 +47,8 @@ #define BUSY_BEGIN_SOFT softLocked=true; isBusy.lock(); #define BUSY_END isBusy.unlock(); softLocked=false; -#define DIV_VERSION "dev127" -#define DIV_ENGINE_VERSION 127 +#define DIV_VERSION "dev128" +#define DIV_ENGINE_VERSION 128 // for imports #define DIV_VERSION_MOD 0xff01 #define DIV_VERSION_FC 0xff02 diff --git a/src/engine/fileOps.cpp b/src/engine/fileOps.cpp index d37028af..e01a5710 100644 --- a/src/engine/fileOps.cpp +++ b/src/engine/fileOps.cpp @@ -208,7 +208,9 @@ bool DivEngine::loadDMF(unsigned char* file, size_t len) { }*/ // Game Boy arp+soundLen screwery - ds.systemFlags[0].set("enoughAlready",true); + if (ds.system[0]==DIV_SYSTEM_GB) { + ds.systemFlags[0].set("enoughAlready",true); + } logI("reading module data..."); if (ds.version>0x0c) { @@ -966,6 +968,11 @@ bool DivEngine::loadDMF(unsigned char* file, size_t len) { ds.system[1]=DIV_SYSTEM_FDS; } + // SMS noise freq + if (ds.system[0]==DIV_SYSTEM_SMS) { + ds.systemFlags[0].set("noEasyNoise",true); + } + ds.systemName=getSongSystemLegacyName(ds,!getConfInt("noMultiSystem",0)); if (active) quitDispatch(); @@ -2513,6 +2520,16 @@ bool DivEngine::loadFur(unsigned char* file, size_t len) { } } + // SN noise compat + if (ds.version<128) { + for (int i=0; irate=rate; } + easyNoise=!flags.getBool("noEasyNoise",false); if (t6w!=NULL) { delete t6w; diff --git a/src/engine/platform/t6w28.h b/src/engine/platform/t6w28.h index 5b5f1fc8..c95850d0 100644 --- a/src/engine/platform/t6w28.h +++ b/src/engine/platform/t6w28.h @@ -60,6 +60,7 @@ class DivPlatformT6W28: public DivDispatch { DivDispatchOscBuffer* oscBuf[4]; bool isMuted[4]; bool antiClickEnabled; + bool easyNoise; struct QueuedWrite { unsigned char addr; unsigned char val; diff --git a/src/gui/fileDialog.cpp b/src/gui/fileDialog.cpp index c5103019..9b13fff0 100644 --- a/src/gui/fileDialog.cpp +++ b/src/gui/fileDialog.cpp @@ -80,6 +80,14 @@ bool FurnaceGUIFileDialog::openLoad(String header, std::vector filter, c if (opened) return false; saving=false; curPath=path; + + // strip excess directory separators + while (!curPath.empty()) { + if (curPath[curPath.size()-1]!=DIR_SEPARATOR) break; + curPath.erase(curPath.size()-1); + } + curPath+=DIR_SEPARATOR; + logD("opening load file dialog with curPath %s",curPath.c_str()); if (sysDialog) { #ifdef USE_NFD @@ -145,6 +153,14 @@ bool FurnaceGUIFileDialog::openSave(String header, std::vector filter, c if (opened) return false; saving=true; curPath=path; + + // strip excess directory separators + while (!curPath.empty()) { + if (curPath[curPath.size()-1]!=DIR_SEPARATOR) break; + curPath.erase(curPath.size()-1); + } + curPath+=DIR_SEPARATOR; + logD("opening save file dialog with curPath %s",curPath.c_str()); if (sysDialog) { #ifdef USE_NFD