dev186 - C64: update env on 1Exy
This commit is contained in:
parent
9ca7d529eb
commit
aad3557693
|
@ -54,8 +54,8 @@ class DivWorkPool;
|
||||||
|
|
||||||
#define DIV_UNSTABLE
|
#define DIV_UNSTABLE
|
||||||
|
|
||||||
#define DIV_VERSION "dev185"
|
#define DIV_VERSION "dev186"
|
||||||
#define DIV_ENGINE_VERSION 185
|
#define DIV_ENGINE_VERSION 186
|
||||||
// for imports
|
// for imports
|
||||||
#define DIV_VERSION_MOD 0xff01
|
#define DIV_VERSION_MOD 0xff01
|
||||||
#define DIV_VERSION_FC 0xff02
|
#define DIV_VERSION_FC 0xff02
|
||||||
|
|
|
@ -3008,6 +3008,15 @@ bool DivEngine::loadFur(unsigned char* file, size_t len) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// C64 1Exy compat
|
||||||
|
if (ds.version<186) {
|
||||||
|
for (int i=0; i<ds.systemLen; i++) {
|
||||||
|
if (ds.system[i]==DIV_SYSTEM_C64_8580 || ds.system[i]==DIV_SYSTEM_C64_6581) {
|
||||||
|
ds.systemFlags[i].set("no1EUpdate",true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (active) quitDispatch();
|
if (active) quitDispatch();
|
||||||
BUSY_BEGIN_SOFT;
|
BUSY_BEGIN_SOFT;
|
||||||
saveLock.lock();
|
saveLock.lock();
|
||||||
|
|
|
@ -457,15 +457,27 @@ int DivPlatformC64::dispatch(DivCommand c) {
|
||||||
switch (c.value>>4) {
|
switch (c.value>>4) {
|
||||||
case 0:
|
case 0:
|
||||||
chan[c.chan].attack=c.value&15;
|
chan[c.chan].attack=c.value&15;
|
||||||
|
if (!no1EUpdate) {
|
||||||
|
rWrite(c.chan*7+5,(chan[c.chan].attack<<4)|(chan[c.chan].decay));
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
chan[c.chan].decay=c.value&15;
|
chan[c.chan].decay=c.value&15;
|
||||||
|
if (!no1EUpdate) {
|
||||||
|
rWrite(c.chan*7+5,(chan[c.chan].attack<<4)|(chan[c.chan].decay));
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
chan[c.chan].sustain=c.value&15;
|
chan[c.chan].sustain=c.value&15;
|
||||||
|
if (!no1EUpdate) {
|
||||||
|
rWrite(c.chan*7+6,(chan[c.chan].sustain<<4)|(chan[c.chan].release));
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
chan[c.chan].release=c.value&15;
|
chan[c.chan].release=c.value&15;
|
||||||
|
if (!no1EUpdate) {
|
||||||
|
rWrite(c.chan*7+6,(chan[c.chan].sustain<<4)|(chan[c.chan].release));
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case 4:
|
case 4:
|
||||||
chan[c.chan].ring=c.value;
|
chan[c.chan].ring=c.value;
|
||||||
|
@ -652,6 +664,7 @@ void DivPlatformC64::setFlags(const DivConfig& flags) {
|
||||||
if (sidCore==1) sid_fp->setSamplingParameters(chipClock,reSIDfp::DECIMATE,rate,0);
|
if (sidCore==1) sid_fp->setSamplingParameters(chipClock,reSIDfp::DECIMATE,rate,0);
|
||||||
}
|
}
|
||||||
keyPriority=flags.getBool("keyPriority",true);
|
keyPriority=flags.getBool("keyPriority",true);
|
||||||
|
no1EUpdate=flags.getBool("no1EUpdate",false);
|
||||||
testAD=((flags.getInt("testAttack",0)&15)<<4)|(flags.getInt("testDecay",0)&15);
|
testAD=((flags.getInt("testAttack",0)&15)<<4)|(flags.getInt("testDecay",0)&15);
|
||||||
testSR=((flags.getInt("testSustain",0)&15)<<4)|(flags.getInt("testRelease",0)&15);
|
testSR=((flags.getInt("testSustain",0)&15)<<4)|(flags.getInt("testRelease",0)&15);
|
||||||
|
|
||||||
|
|
|
@ -72,7 +72,7 @@ class DivPlatformC64: public DivDispatch {
|
||||||
unsigned char sidCore;
|
unsigned char sidCore;
|
||||||
int filtCut, resetTime;
|
int filtCut, resetTime;
|
||||||
|
|
||||||
bool keyPriority, sidIs6581, needInitTables;
|
bool keyPriority, sidIs6581, needInitTables, no1EUpdate;
|
||||||
unsigned char chanOrder[3];
|
unsigned char chanOrder[3];
|
||||||
unsigned char testAD, testSR;
|
unsigned char testAD, testSR;
|
||||||
|
|
||||||
|
|
|
@ -586,6 +586,7 @@ bool FurnaceGUI::drawSysConf(int chan, int sysPos, DivSystem type, DivConfig& fl
|
||||||
case DIV_SYSTEM_C64_6581: {
|
case DIV_SYSTEM_C64_6581: {
|
||||||
int clockSel=flags.getInt("clockSel",0);
|
int clockSel=flags.getInt("clockSel",0);
|
||||||
bool keyPriority=flags.getBool("keyPriority",true);
|
bool keyPriority=flags.getBool("keyPriority",true);
|
||||||
|
bool no1EUpdate=flags.getBool("no1EUpdate",false);
|
||||||
int testAttack=flags.getInt("testAttack",0);
|
int testAttack=flags.getInt("testAttack",0);
|
||||||
int testDecay=flags.getInt("testDecay",0);
|
int testDecay=flags.getInt("testDecay",0);
|
||||||
int testSustain=flags.getInt("testSustain",0);
|
int testSustain=flags.getInt("testSustain",0);
|
||||||
|
@ -644,10 +645,15 @@ bool FurnaceGUI::drawSysConf(int chan, int sysPos, DivSystem type, DivConfig& fl
|
||||||
altered=true;
|
altered=true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (ImGui::Checkbox("Disable 1Exy env ipdate (compatibility)",&no1EUpdate)) {
|
||||||
|
altered=true;
|
||||||
|
}
|
||||||
|
|
||||||
if (altered) {
|
if (altered) {
|
||||||
e->lockSave([&]() {
|
e->lockSave([&]() {
|
||||||
flags.set("clockSel",clockSel);
|
flags.set("clockSel",clockSel);
|
||||||
flags.set("keyPriority",keyPriority);
|
flags.set("keyPriority",keyPriority);
|
||||||
|
flags.set("no1EUpdate",no1EUpdate);
|
||||||
flags.set("testAttack",testAttack);
|
flags.set("testAttack",testAttack);
|
||||||
flags.set("testDecay",testDecay);
|
flags.set("testDecay",testDecay);
|
||||||
flags.set("testSustain",testSustain);
|
flags.set("testSustain",testSustain);
|
||||||
|
|
Loading…
Reference in a new issue