diff --git a/src/engine/engine.h b/src/engine/engine.h index 63250acce..8d8588d12 100644 --- a/src/engine/engine.h +++ b/src/engine/engine.h @@ -52,10 +52,10 @@ class DivWorkPool; #define EXTERN_BUSY_BEGIN_SOFT e->softLocked=true; e->isBusy.lock(); #define EXTERN_BUSY_END e->isBusy.unlock(); e->softLocked=false; -//#define DIV_UNSTABLE +#define DIV_UNSTABLE -#define DIV_VERSION "0.6.8.1" -#define DIV_ENGINE_VERSION 228 +#define DIV_VERSION "dev229" +#define DIV_ENGINE_VERSION 229 // for imports #define DIV_VERSION_MOD 0xff01 #define DIV_VERSION_FC 0xff02 diff --git a/src/engine/fileOps/fur.cpp b/src/engine/fileOps/fur.cpp index 47e2c5d38..c8ace42c9 100644 --- a/src/engine/fileOps/fur.cpp +++ b/src/engine/fileOps/fur.cpp @@ -2100,6 +2100,12 @@ bool DivEngine::loadFur(unsigned char* file, size_t len, int variantID) { ds.systemFlags[i].set("chipType",1); } } + } else if (ds.version<229) { + for (int i=0; ichipType >= 1) && (!ch->left && !ch->right)) { new_phase = 0; } - if ((ch->phase & 0x10000) != (new_phase & 0x10000)) { + if ((psg->chipType < 3) ? (ch->phase & 0x10000) != (new_phase & 0x10000) : (ch->phase & 0x10000) && !(new_phase & 0x10000)) { ch->noiseval = (psg->chipType < 1) ? psg->noiseOut : (psg->noiseState >> 1) & 0x3f; } ch->phase = new_phase; diff --git a/src/engine/platform/vera.cpp b/src/engine/platform/vera.cpp index 9a7692039..29f6df07d 100644 --- a/src/engine/platform/vera.cpp +++ b/src/engine/platform/vera.cpp @@ -543,7 +543,7 @@ void DivPlatformVERA::poke(std::vector& wlist) { } void DivPlatformVERA::setFlags(const DivConfig& flags) { - psg->chipType=flags.getInt("chipType",2); + psg->chipType=flags.getInt("chipType",3); chipClock=25000000; CHECK_CUSTOM_CLOCK; rate=chipClock/512; diff --git a/src/gui/sysConf.cpp b/src/gui/sysConf.cpp index df9ee8e37..6243e4021 100644 --- a/src/gui/sysConf.cpp +++ b/src/gui/sysConf.cpp @@ -2552,7 +2552,7 @@ bool FurnaceGUI::drawSysConf(int chan, int sysPos, DivSystem type, DivConfig& fl break; } case DIV_SYSTEM_VERA: { - int chipType=flags.getInt("chipType",2); + int chipType=flags.getInt("chipType",3); ImGui::Text(_("Chip revision:")); ImGui::Indent(); @@ -2568,6 +2568,10 @@ bool FurnaceGUI::drawSysConf(int chan, int sysPos, DivSystem type, DivConfig& fl chipType=2; altered=true; } + if (ImGui::RadioButton(_("X16 Emu R49 (Noise freq fix)"),chipType==3)) { + chipType=3; + altered=true; + } ImGui::Unindent(); if (altered) {