Virtual Boy: fix mod/sweep effects

This commit is contained in:
tildearrow 2022-10-10 22:51:43 -05:00
parent 4ec5ee20e8
commit e25913d458
1 changed files with 3 additions and 1 deletions

View File

@ -312,6 +312,7 @@ int DivPlatformVB::dispatch(DivCommand c) {
modType=true;
chWrite(4,0x07,modulation);
if (modulation!=0) {
chan[c.chan].envHigh&=~0x70;
chan[c.chan].envHigh|=0x70;
} else {
chan[c.chan].envHigh&=~0x70;
@ -324,9 +325,10 @@ int DivPlatformVB::dispatch(DivCommand c) {
modType=false;
chWrite(4,0x07,modulation);
if (modulation!=0) {
chan[c.chan].envHigh&=~0x70;
chan[c.chan].envHigh|=0x10;
} else {
chan[c.chan].envHigh&=~0x10;
chan[c.chan].envHigh&=~0x70;
}
writeEnv(4);
break;