dev125 - prepare for ExtCh FM macros
This commit is contained in:
parent
06ddf07d48
commit
8d8bdfd1f7
|
@ -47,8 +47,8 @@
|
|||
#define BUSY_BEGIN_SOFT softLocked=true; isBusy.lock();
|
||||
#define BUSY_END isBusy.unlock(); softLocked=false;
|
||||
|
||||
#define DIV_VERSION "dev124"
|
||||
#define DIV_ENGINE_VERSION 124
|
||||
#define DIV_VERSION "dev125"
|
||||
#define DIV_ENGINE_VERSION 125
|
||||
// for imports
|
||||
#define DIV_VERSION_MOD 0xff01
|
||||
#define DIV_VERSION_FC 0xff02
|
||||
|
|
|
@ -2616,6 +2616,21 @@ bool DivEngine::loadFur(unsigned char* file, size_t len) {
|
|||
}
|
||||
}
|
||||
|
||||
// ExtCh compat flag
|
||||
if (ds.version<125) {
|
||||
for (int i=0; i<ds.systemLen; i++) {
|
||||
if (ds.system[i]==DIV_SYSTEM_YM2612_EXT ||
|
||||
ds.system[i]==DIV_SYSTEM_YM2612_FRAC_EXT ||
|
||||
ds.system[i]==DIV_SYSTEM_YM2610_EXT ||
|
||||
ds.system[i]==DIV_SYSTEM_YM2610_FULL_EXT ||
|
||||
ds.system[i]==DIV_SYSTEM_YM2610B_EXT ||
|
||||
ds.system[i]==DIV_SYSTEM_OPN_EXT ||
|
||||
ds.system[i]==DIV_SYSTEM_PC98_EXT) {
|
||||
ds.systemFlags[i].set("noExtMacros",true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (active) quitDispatch();
|
||||
BUSY_BEGIN_SOFT;
|
||||
saveLock.lock();
|
||||
|
|
|
@ -1219,6 +1219,7 @@ void DivPlatformGenesis::setFlags(const DivConfig& flags) {
|
|||
break;
|
||||
}
|
||||
ladder=flags.getBool("ladderEffect",false);
|
||||
noExtMacros=flags.getBool("noExtMacros",false);
|
||||
OPN2_SetChipType(ladder?ym3438_mode_ym2612:0);
|
||||
if (useYMFM) {
|
||||
if (fm_ymfm!=NULL) delete fm_ymfm;
|
||||
|
|
|
@ -111,7 +111,7 @@ class DivPlatformGenesis: public DivPlatformOPN {
|
|||
|
||||
int softPCMTimer;
|
||||
|
||||
bool extMode, softPCM, useYMFM;
|
||||
bool extMode, softPCM, noExtMacros, useYMFM;
|
||||
bool ladder;
|
||||
|
||||
unsigned char dacVolTable[128];
|
||||
|
|
|
@ -952,6 +952,7 @@ void DivPlatformYM2203::setFlags(const DivConfig& flags) {
|
|||
ayDiv=16;
|
||||
break;
|
||||
}
|
||||
noExtMacros=flags.getBool("noExtMacros",false);
|
||||
rate=fm->sample_rate(chipClock);
|
||||
for (int i=0; i<6; i++) {
|
||||
oscBuf[i]->rate=rate;
|
||||
|
|
|
@ -91,7 +91,7 @@ class DivPlatformYM2203: public DivPlatformOPN {
|
|||
DivPlatformAY8910* ay;
|
||||
unsigned char sampleBank;
|
||||
|
||||
bool extMode;
|
||||
bool extMode, noExtMacros;
|
||||
unsigned char prescale;
|
||||
|
||||
friend void putDispatchChip(void*,int);
|
||||
|
|
|
@ -1394,6 +1394,7 @@ void DivPlatformYM2608::setFlags(const DivConfig& flags) {
|
|||
ayDiv=32;
|
||||
break;
|
||||
}
|
||||
noExtMacros=flags.getBool("noExtMacros",false);
|
||||
rate=fm->sample_rate(chipClock);
|
||||
for (int i=0; i<16; i++) {
|
||||
oscBuf[i]->rate=rate;
|
||||
|
|
|
@ -106,7 +106,7 @@ class DivPlatformYM2608: public DivPlatformOPN {
|
|||
unsigned char writeRSSOff, writeRSSOn;
|
||||
int globalRSSVolume;
|
||||
|
||||
bool extMode;
|
||||
bool extMode, noExtMacros;
|
||||
unsigned char prescale;
|
||||
|
||||
double NOTE_OPNB(int ch, int note);
|
||||
|
|
|
@ -141,7 +141,7 @@ template<int ChanNum> class DivPlatformYM2610Base: public DivPlatformOPN {
|
|||
|
||||
unsigned char sampleBank;
|
||||
|
||||
bool extMode;
|
||||
bool extMode, noExtMacros;
|
||||
|
||||
unsigned char writeADPCMAOff, writeADPCMAOn;
|
||||
int globalADPCMAVolume;
|
||||
|
@ -269,6 +269,7 @@ template<int ChanNum> class DivPlatformYM2610Base: public DivPlatformOPN {
|
|||
chipClock=8000000.0;
|
||||
break;
|
||||
}
|
||||
noExtMacros=flags.getBool("noExtMacros",false);
|
||||
rate=chipClock/16;
|
||||
for (int i=0; i<ChanNum; i++) {
|
||||
oscBuf[i]->rate=rate;
|
||||
|
|
|
@ -32,6 +32,7 @@ bool FurnaceGUI::drawSysConf(int chan, DivSystem type, DivConfig& flags, bool mo
|
|||
case DIV_SYSTEM_YM2612_FRAC_EXT: {
|
||||
int clockSel=flags.getInt("clockSel",0);
|
||||
bool ladder=flags.getBool("ladderEffect",0);
|
||||
bool noExtMacros=flags.getBool("noExtMacros",false);
|
||||
|
||||
if (ImGui::RadioButton("NTSC (7.67MHz)",clockSel==0)) {
|
||||
clockSel=0;
|
||||
|
@ -56,11 +57,17 @@ bool FurnaceGUI::drawSysConf(int chan, DivSystem type, DivConfig& flags, bool mo
|
|||
if (ImGui::Checkbox("Enable DAC distortion",&ladder)) {
|
||||
altered=true;
|
||||
}
|
||||
if (type==DIV_SYSTEM_YM2612_EXT || type==DIV_SYSTEM_YM2612_FRAC_EXT) {
|
||||
if (ImGui::Checkbox("Disable ExtCh FM macros (compatibility)",&noExtMacros)) {
|
||||
altered=true;
|
||||
}
|
||||
}
|
||||
|
||||
if (altered) {
|
||||
e->lockSave([&]() {
|
||||
flags.set("clockSel",clockSel);
|
||||
flags.set("ladderEffect",ladder);
|
||||
flags.set("noExtMacros",noExtMacros);
|
||||
});
|
||||
}
|
||||
break;
|
||||
|
@ -439,6 +446,7 @@ bool FurnaceGUI::drawSysConf(int chan, DivSystem type, DivConfig& flags, bool mo
|
|||
case DIV_SYSTEM_YM2610B:
|
||||
case DIV_SYSTEM_YM2610B_EXT: {
|
||||
int clockSel=flags.getInt("clockSel",0);
|
||||
bool noExtMacros=flags.getBool("noExtMacros",false);
|
||||
|
||||
if (ImGui::RadioButton("8MHz (Neo Geo MVS)",clockSel==0)) {
|
||||
clockSel=0;
|
||||
|
@ -449,9 +457,16 @@ bool FurnaceGUI::drawSysConf(int chan, DivSystem type, DivConfig& flags, bool mo
|
|||
altered=true;
|
||||
}
|
||||
|
||||
if (type==DIV_SYSTEM_YM2610_EXT || type==DIV_SYSTEM_YM2610_FULL_EXT || type==DIV_SYSTEM_YM2610B_EXT) {
|
||||
if (ImGui::Checkbox("Disable ExtCh FM macros (compatibility)",&noExtMacros)) {
|
||||
altered=true;
|
||||
}
|
||||
}
|
||||
|
||||
if (altered) {
|
||||
e->lockSave([&]() {
|
||||
flags.set("clockSel",clockSel);
|
||||
flags.set("noExtMacros",noExtMacros);
|
||||
});
|
||||
}
|
||||
break;
|
||||
|
@ -789,6 +804,7 @@ bool FurnaceGUI::drawSysConf(int chan, DivSystem type, DivConfig& flags, bool mo
|
|||
case DIV_SYSTEM_OPN_EXT: {
|
||||
int clockSel=flags.getInt("clockSel",0);
|
||||
int prescale=flags.getInt("prescale",0);
|
||||
bool noExtMacros=flags.getBool("noExtMacros",false);
|
||||
|
||||
ImGui::Text("Clock rate:");
|
||||
if (ImGui::RadioButton("3.58MHz (NTSC)",clockSel==0)) {
|
||||
|
@ -829,10 +845,17 @@ bool FurnaceGUI::drawSysConf(int chan, DivSystem type, DivConfig& flags, bool mo
|
|||
altered=true;
|
||||
}
|
||||
|
||||
if (type==DIV_SYSTEM_OPN_EXT) {
|
||||
if (ImGui::Checkbox("Disable ExtCh FM macros (compatibility)",&noExtMacros)) {
|
||||
altered=true;
|
||||
}
|
||||
}
|
||||
|
||||
if (altered) {
|
||||
e->lockSave([&]() {
|
||||
flags.set("clockSel",clockSel);
|
||||
flags.set("prescale",prescale);
|
||||
flags.set("noExtMacros",noExtMacros);
|
||||
});
|
||||
}
|
||||
break;
|
||||
|
@ -841,6 +864,7 @@ bool FurnaceGUI::drawSysConf(int chan, DivSystem type, DivConfig& flags, bool mo
|
|||
case DIV_SYSTEM_PC98_EXT: {
|
||||
int clockSel=flags.getInt("clockSel",0);
|
||||
int prescale=flags.getInt("prescale",0);
|
||||
bool noExtMacros=flags.getBool("noExtMacros",false);
|
||||
|
||||
ImGui::Text("Clock rate:");
|
||||
if (ImGui::RadioButton("8MHz (Arcade)",clockSel==0)) {
|
||||
|
@ -865,10 +889,17 @@ bool FurnaceGUI::drawSysConf(int chan, DivSystem type, DivConfig& flags, bool mo
|
|||
altered=true;
|
||||
}
|
||||
|
||||
if (type==DIV_SYSTEM_PC98_EXT) {
|
||||
if (ImGui::Checkbox("Disable ExtCh FM macros (compatibility)",&noExtMacros)) {
|
||||
altered=true;
|
||||
}
|
||||
}
|
||||
|
||||
if (altered) {
|
||||
e->lockSave([&]() {
|
||||
flags.set("clockSel",clockSel);
|
||||
flags.set("prescale",prescale);
|
||||
flags.set("noExtMacros",noExtMacros);
|
||||
});
|
||||
}
|
||||
break;
|
||||
|
|
Loading…
Reference in New Issue