all repos — mgba @ a93b21e88640848a0dac4a1319ffb4e3506040b6

mGBA Game Boy Advance Emulator

GBA Audio: Implement missing flags on SOUNDCNT_X register
Jeffrey Pfau jeffrey@endrift.com
Mon, 26 Oct 2015 20:31:22 -0700
commit

a93b21e88640848a0dac4a1319ffb4e3506040b6

parent

b8b7ec0b12cdfa3aab1da32e06e8868e76ed9dbb

3 files changed, 9 insertions(+), 0 deletions(-)

jump to
M CHANGESCHANGES

@@ -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.csrc/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.csrc/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);