mirror of
https://github.com/tildearrow/furnace.git
synced 2025-01-03 22:21:09 +00:00
Game Boy: fix sweep in non-sweep channel
This commit is contained in:
parent
585efbec13
commit
f376e919ff
1 changed files with 2 additions and 0 deletions
|
@ -358,6 +358,7 @@ int DivPlatformGB::dispatch(DivCommand c) {
|
||||||
chan[c.chan].inPorta=c.value;
|
chan[c.chan].inPorta=c.value;
|
||||||
break;
|
break;
|
||||||
case DIV_CMD_GB_SWEEP_DIR:
|
case DIV_CMD_GB_SWEEP_DIR:
|
||||||
|
if (c.chan>0) break;
|
||||||
chan[c.chan].sweep&=0xf7;
|
chan[c.chan].sweep&=0xf7;
|
||||||
if (c.value&1) {
|
if (c.value&1) {
|
||||||
chan[c.chan].sweep|=8;
|
chan[c.chan].sweep|=8;
|
||||||
|
@ -365,6 +366,7 @@ int DivPlatformGB::dispatch(DivCommand c) {
|
||||||
chan[c.chan].sweepChanged=true;
|
chan[c.chan].sweepChanged=true;
|
||||||
break;
|
break;
|
||||||
case DIV_CMD_GB_SWEEP_TIME:
|
case DIV_CMD_GB_SWEEP_TIME:
|
||||||
|
if (c.chan>0) break;
|
||||||
chan[c.chan].sweep&=8;
|
chan[c.chan].sweep&=8;
|
||||||
chan[c.chan].sweep|=c.value&0x77;
|
chan[c.chan].sweep|=c.value&0x77;
|
||||||
chan[c.chan].sweepChanged=true;
|
chan[c.chan].sweepChanged=true;
|
||||||
|
|
Loading…
Reference in a new issue