GBA Audio: Implement missing flags on SOUNDCNT_X register
Jeffrey Pfau jeffrey@endrift.com
Mon, 26 Oct 2015 20:31:22 -0700
3 files changed,
9 insertions(+),
0 deletions(-)
M
CHANGES
→
CHANGES
@@ -20,6 +20,7 @@ - GBA Config: Add "override" layer for better one-time configuration
- SDL: Allow GBASDLAudio to be used without a thread context - All: Improved PowerPC support - All: Fix some undefined behavior warnings + - GBA Audio: Implement missing flags on SOUNDCNT_X register 0.3.1: (2015-10-24) Bugfixes:
M
src/gba/audio.c
→
src/gba/audio.c
@@ -283,6 +283,12 @@ audio->playingCh4 = 0;
} } } + + audio->p->memory.io[REG_SOUNDCNT_X >> 1] &= ~0x000F; + audio->p->memory.io[REG_SOUNDCNT_X >> 1] |= audio->playingCh1; + audio->p->memory.io[REG_SOUNDCNT_X >> 1] |= audio->playingCh2 << 1; + audio->p->memory.io[REG_SOUNDCNT_X >> 1] |= audio->playingCh3 << 2; + audio->p->memory.io[REG_SOUNDCNT_X >> 1] |= audio->playingCh4 << 2; } audio->nextSample -= audio->eventDiff;
M
src/gba/io.c
→
src/gba/io.c
@@ -351,6 +351,8 @@ GBAAudioWriteSOUNDCNT_HI(&gba->audio, value);
break; case REG_SOUNDCNT_X: GBAAudioWriteSOUNDCNT_X(&gba->audio, value); + value &= 0xFFFF; + value |= gba->memory.io[REG_SOUNDCNT_X >> 1] & 0xF; break; case REG_SOUNDBIAS: GBAAudioWriteSOUNDBIAS(&gba->audio, value);