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;
|
||||
}*/
|
||||
|
||||
// Game Boy arp+soundLen screwery
|
||||
ds.systemFlags[0].set("enoughAlready",true);
|
||||
|
||||
logI("reading module data...");
|
||||
if (ds.version>0x0c) {
|
||||
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+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].keyOff) chan[i].keyOff=false;
|
||||
chan[i].freqChanged=false;
|
||||
|
@ -645,6 +648,7 @@ void DivPlatformGB::setFlags(const DivConfig& flags) {
|
|||
model=GB_MODEL_AGB;
|
||||
break;
|
||||
}
|
||||
enoughAlready=flags.getBool("enoughAlready",false);
|
||||
}
|
||||
|
||||
int DivPlatformGB::init(DivEngine* p, int channels, int sugRate, const DivConfig& flags) {
|
||||
|
|
|
@ -76,6 +76,7 @@ class DivPlatformGB: public DivDispatch {
|
|||
DivDispatchOscBuffer* oscBuf[4];
|
||||
bool isMuted[4];
|
||||
bool antiClickEnabled;
|
||||
bool enoughAlready;
|
||||
unsigned char lastPan;
|
||||
DivWaveSynth ws;
|
||||
struct QueuedWrite {
|
||||
|
|
|
@ -270,6 +270,7 @@ bool FurnaceGUI::drawSysConf(int chan, DivSystem type, DivConfig& flags, bool mo
|
|||
case DIV_SYSTEM_GB: {
|
||||
int chipType=flags.getInt("chipType",0);
|
||||
bool noAntiClick=flags.getBool("noAntiClick",false);
|
||||
bool enoughAlready=flags.getBool("enoughAlready",false);
|
||||
|
||||
if (ImGui::Checkbox("Disable anti-click",&noAntiClick)) {
|
||||
altered=true;
|
||||
|
@ -291,11 +292,15 @@ bool FurnaceGUI::drawSysConf(int chan, DivSystem type, DivConfig& flags, bool mo
|
|||
chipType=3;
|
||||
altered=true;
|
||||
}
|
||||
if (ImGui::Checkbox("Pretty please one more compat flag when I use arpeggio and my sound length",&enoughAlready)) {
|
||||
altered=true;
|
||||
}
|
||||
|
||||
if (altered) {
|
||||
e->lockSave([&]() {
|
||||
flags.set("chipType",chipType);
|
||||
flags.set("noAntiClick",noAntiClick);
|
||||
flags.set("enoughAlready",enoughAlready);
|
||||
});
|
||||
}
|
||||
break;
|
||||
|
|
Loading…
Reference in New Issue