Game Boy: fix Synchronize
This commit is contained in:
parent
bcc94fd459
commit
92d5525692
|
@ -206,6 +206,9 @@ bool DivEngine::loadDMF(unsigned char* file, size_t len) {
|
||||||
ds.tuning=433.2;
|
ds.tuning=433.2;
|
||||||
}*/
|
}*/
|
||||||
|
|
||||||
|
// Game Boy arp+soundLen screwery
|
||||||
|
ds.systemFlags[0].set("enoughAlready",true);
|
||||||
|
|
||||||
logI("reading module data...");
|
logI("reading module data...");
|
||||||
if (ds.version>0x0c) {
|
if (ds.version>0x0c) {
|
||||||
ds.subsong[0]->hilightA=reader.readC();
|
ds.subsong[0]->hilightA=reader.readC();
|
||||||
|
|
|
@ -313,6 +313,9 @@ void DivPlatformGB::tick(bool sysTick) {
|
||||||
rWrite(16+i*5+3,(2048-chan[i].freq)&0xff);
|
rWrite(16+i*5+3,(2048-chan[i].freq)&0xff);
|
||||||
rWrite(16+i*5+4,(((2048-chan[i].freq)>>8)&7)|((chan[i].keyOn||chan[i].keyOff)?0x80:0x00)|((chan[i].soundLen<63)<<6));
|
rWrite(16+i*5+4,(((2048-chan[i].freq)>>8)&7)|((chan[i].keyOn||chan[i].keyOff)?0x80:0x00)|((chan[i].soundLen<63)<<6));
|
||||||
}
|
}
|
||||||
|
if (enoughAlready) { // more compat garbage
|
||||||
|
rWrite(16+i*5+1,((chan[i].duty&3)<<6)|(63-(chan[i].soundLen&63)));
|
||||||
|
}
|
||||||
if (chan[i].keyOn) chan[i].keyOn=false;
|
if (chan[i].keyOn) chan[i].keyOn=false;
|
||||||
if (chan[i].keyOff) chan[i].keyOff=false;
|
if (chan[i].keyOff) chan[i].keyOff=false;
|
||||||
chan[i].freqChanged=false;
|
chan[i].freqChanged=false;
|
||||||
|
@ -645,6 +648,7 @@ void DivPlatformGB::setFlags(const DivConfig& flags) {
|
||||||
model=GB_MODEL_AGB;
|
model=GB_MODEL_AGB;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
enoughAlready=flags.getBool("enoughAlready",false);
|
||||||
}
|
}
|
||||||
|
|
||||||
int DivPlatformGB::init(DivEngine* p, int channels, int sugRate, const DivConfig& flags) {
|
int DivPlatformGB::init(DivEngine* p, int channels, int sugRate, const DivConfig& flags) {
|
||||||
|
|
|
@ -76,6 +76,7 @@ class DivPlatformGB: public DivDispatch {
|
||||||
DivDispatchOscBuffer* oscBuf[4];
|
DivDispatchOscBuffer* oscBuf[4];
|
||||||
bool isMuted[4];
|
bool isMuted[4];
|
||||||
bool antiClickEnabled;
|
bool antiClickEnabled;
|
||||||
|
bool enoughAlready;
|
||||||
unsigned char lastPan;
|
unsigned char lastPan;
|
||||||
DivWaveSynth ws;
|
DivWaveSynth ws;
|
||||||
struct QueuedWrite {
|
struct QueuedWrite {
|
||||||
|
|
|
@ -270,6 +270,7 @@ bool FurnaceGUI::drawSysConf(int chan, DivSystem type, DivConfig& flags, bool mo
|
||||||
case DIV_SYSTEM_GB: {
|
case DIV_SYSTEM_GB: {
|
||||||
int chipType=flags.getInt("chipType",0);
|
int chipType=flags.getInt("chipType",0);
|
||||||
bool noAntiClick=flags.getBool("noAntiClick",false);
|
bool noAntiClick=flags.getBool("noAntiClick",false);
|
||||||
|
bool enoughAlready=flags.getBool("enoughAlready",false);
|
||||||
|
|
||||||
if (ImGui::Checkbox("Disable anti-click",&noAntiClick)) {
|
if (ImGui::Checkbox("Disable anti-click",&noAntiClick)) {
|
||||||
altered=true;
|
altered=true;
|
||||||
|
@ -291,11 +292,15 @@ bool FurnaceGUI::drawSysConf(int chan, DivSystem type, DivConfig& flags, bool mo
|
||||||
chipType=3;
|
chipType=3;
|
||||||
altered=true;
|
altered=true;
|
||||||
}
|
}
|
||||||
|
if (ImGui::Checkbox("Pretty please one more compat flag when I use arpeggio and my sound length",&enoughAlready)) {
|
||||||
|
altered=true;
|
||||||
|
}
|
||||||
|
|
||||||
if (altered) {
|
if (altered) {
|
||||||
e->lockSave([&]() {
|
e->lockSave([&]() {
|
||||||
flags.set("chipType",chipType);
|
flags.set("chipType",chipType);
|
||||||
flags.set("noAntiClick",noAntiClick);
|
flags.set("noAntiClick",noAntiClick);
|
||||||
|
flags.set("enoughAlready",enoughAlready);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in a new issue