implement KVS on the rest of FM chips

This commit is contained in:
tildearrow 2022-09-22 01:30:51 -05:00
parent 89916de067
commit b053d31a6d
13 changed files with 71 additions and 65 deletions

View file

@ -442,7 +442,7 @@ void DivPlatformYM2608Ext::forceIns() {
if (i==2) { // extended channel
if (isOpMuted[j]) {
rWrite(baseAddr+0x40,127);
} else if (isOutput[chan[i].state.alg][j]) {
} else if (KVS(i,j)) {
rWrite(baseAddr+0x40,127-VOL_SCALE_LOG(127-op.tl,opChan[j].vol&0x7f,127));
} else {
rWrite(baseAddr+0x40,op.tl);
@ -451,7 +451,7 @@ void DivPlatformYM2608Ext::forceIns() {
if (isMuted[i]) {
rWrite(baseAddr+ADDR_TL,127);
} else {
if (isOutput[chan[i].state.alg][j]) {
if (KVS(i,j)) {
rWrite(baseAddr+ADDR_TL,127-VOL_SCALE_LOG(127-op.tl,chan[i].outVol&0x7f,127));
} else {
rWrite(baseAddr+ADDR_TL,op.tl);