mirror of
https://github.com/tildearrow/furnace.git
synced 2024-11-16 01:35:07 +00:00
YM2612: more DualPCM muting fixes
This commit is contained in:
parent
641648ca0f
commit
a550c4cb30
1 changed files with 15 additions and 11 deletions
|
@ -24,7 +24,7 @@
|
||||||
|
|
||||||
#include "genesisshared.h"
|
#include "genesisshared.h"
|
||||||
|
|
||||||
#define IS_REALLY_MUTED(x) (isMuted[x] && (x<5 || !softPCM || (isMuted[5] && isMuted[6]) || !chan[5].dacMode))
|
#define IS_REALLY_MUTED(x) (isMuted[x] && (x<5 || !softPCM || (isMuted[5] && isMuted[6])))
|
||||||
|
|
||||||
static unsigned char konOffs[6]={
|
static unsigned char konOffs[6]={
|
||||||
0, 1, 2, 4, 5, 6
|
0, 1, 2, 4, 5, 6
|
||||||
|
@ -563,7 +563,8 @@ void DivPlatformGenesis::tick(bool sysTick) {
|
||||||
|
|
||||||
void DivPlatformGenesis::muteChannel(int ch, bool mute) {
|
void DivPlatformGenesis::muteChannel(int ch, bool mute) {
|
||||||
isMuted[ch]=mute;
|
isMuted[ch]=mute;
|
||||||
if (ch>5) return;
|
if (ch>6) return;
|
||||||
|
if (ch<6) {
|
||||||
for (int j=0; j<4; j++) {
|
for (int j=0; j<4; j++) {
|
||||||
unsigned short baseAddr=chanOffs[ch]|opOffs[j];
|
unsigned short baseAddr=chanOffs[ch]|opOffs[j];
|
||||||
DivInstrumentFM::Operator& op=chan[ch].state.op[j];
|
DivInstrumentFM::Operator& op=chan[ch].state.op[j];
|
||||||
|
@ -577,6 +578,9 @@ void DivPlatformGenesis::muteChannel(int ch, bool mute) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
ch--;
|
||||||
|
}
|
||||||
rWrite(chanOffs[ch]+ADDR_LRAF,(IS_REALLY_MUTED(ch)?0:(chan[ch].pan<<6))|(chan[ch].state.fms&7)|((chan[ch].state.ams&3)<<4));
|
rWrite(chanOffs[ch]+ADDR_LRAF,(IS_REALLY_MUTED(ch)?0:(chan[ch].pan<<6))|(chan[ch].state.fms&7)|((chan[ch].state.ams&3)<<4));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue