GB Audio: Fix wrong register being updated with playing state
Jeffrey Pfau jeffrey@endrift.com
Fri, 05 Feb 2016 03:24:17 -0800
1 files changed,
5 insertions(+),
5 deletions(-)
jump to
M
src/gb/audio.c
→
src/gb/audio.c
@@ -398,11 +398,11 @@ }
} if (audio->p) { - audio->p->memory.io[REG_NR51] &= ~0x000F; - audio->p->memory.io[REG_NR51] |= audio->playingCh1; - audio->p->memory.io[REG_NR51] |= audio->playingCh2 << 1; - audio->p->memory.io[REG_NR51] |= audio->playingCh3 << 2; - audio->p->memory.io[REG_NR51] |= audio->playingCh4 << 3; + audio->p->memory.io[REG_NR52] &= ~0x000F; + audio->p->memory.io[REG_NR52] |= audio->playingCh1; + audio->p->memory.io[REG_NR52] |= audio->playingCh2 << 1; + audio->p->memory.io[REG_NR52] |= audio->playingCh3 << 2; + audio->p->memory.io[REG_NR52] |= audio->playingCh4 << 3; audio->nextSample -= audio->eventDiff; if (audio->nextSample <= 0) { _sample(audio, audio->sampleInterval);