YM2612: fix a CSM issue with key off

This commit is contained in:
tildearrow 2022-07-12 18:45:54 -05:00
parent 8104b717cd
commit 15ab8cc49b

View file

@ -418,6 +418,16 @@ void DivPlatformGenesisExt::tick(bool sysTick) {
}
}
if (writeSomething) {
if (chan[7].active) { // CSM
writeMask^=0xf0;
}
/*printf(
"Mask: %c %c %c %c\n",
(writeMask&0x10)?'1':'-',
(writeMask&0x20)?'2':'-',
(writeMask&0x40)?'3':'-',
(writeMask&0x80)?'4':'-'
);*/
immWrite(0x28,writeMask);
}
}
@ -478,6 +488,13 @@ void DivPlatformGenesisExt::tick(bool sysTick) {
if (chan[7].active) { // CSM
writeMask^=0xf0;
}
/*printf(
"Mask: %c %c %c %c\n",
(writeMask&0x10)?'1':'-',
(writeMask&0x20)?'2':'-',
(writeMask&0x40)?'3':'-',
(writeMask&0x80)?'4':'-'
);*/
immWrite(0x28,writeMask);
}