ZSM: exclude keydown events on loop lookahead

This commit is contained in:
MooingLemur 2024-08-31 11:05:34 -07:00 committed by tildearrow
parent 11935fb525
commit caa6f3091d

View file

@ -674,7 +674,10 @@ void DivExportZSM::run() {
if (writes.size()>0) if (writes.size()>0)
logD("zsmOps: Writing %d messages to chip %d",writes.size(),i); logD("zsmOps: Writing %d messages to chip %d",writes.size(),i);
for (DivRegWrite& write: writes) { for (DivRegWrite& write: writes) {
if (i==YM) zsm.writeYM(write.addr&0xff,write.val); if (i==YM) {
if (done && write.addr==0x08 && (write.val&0x78)>0) continue; // don't process keydown on lookahead
zsm.writeYM(write.addr&0xff,write.val);
}
if (i==VERA) { if (i==VERA) {
if (done && write.addr>=64) continue; // don't process any PCM or sync events on the loop lookahead if (done && write.addr>=64) continue; // don't process any PCM or sync events on the loop lookahead
zsm.writePSG(write.addr&0xff,write.val); zsm.writePSG(write.addr&0xff,write.val);