all repos — mgba @ 841a0909b94716aab68acc8d08e00fd863cc2631

mGBA Game Boy Advance Emulator

GBA Audio: Implement audio reset for channels A/B
Jeffrey Pfau jeffrey@endrift.com
Mon, 29 Jun 2015 00:24:52 -0700
commit

841a0909b94716aab68acc8d08e00fd863cc2631

parent

735d7642e0073cb58a3b1c1f54e5c9b67cb6c670

3 files changed, 7 insertions(+), 2 deletions(-)

jump to
M CHANGESCHANGES

@@ -86,6 +86,7 @@ - GBA: More accurate cycle estimation for ROM prefetch and flash save chips

- ARM7: Reduce the size of the Thumb instruction table - GBA: Don't include GBACLIDebugger struct unless needed - SDL: Clean up GL context + - GBA Audio: Implement audio reset for channels A/B 0.2.1: (2015-05-13) Bugfixes:
M README.mdREADME.md

@@ -104,7 +104,6 @@

- OBJ window for modes 3, 4 and 5 ([Bug #5](http://mgba.io/b/5)) - Mosaic for transformed OBJs ([Bug #9](http://mgba.io/b/9)) - BIOS call RegisterRamReset is partially stubbed out ([Bug #141](http://mgba.io/b/141)) -- Audio channel reset flags ([Bug #142](http://mgba.io/b/142)) - Game Pak prefetch ([Bug #195](http://mgba.io/b/195)) - BIOS call Stop, for entering sleep mode ([Bug #199](http://mgba.io/b/199))
M src/gba/audio.csrc/gba/audio.c

@@ -456,7 +456,12 @@ audio->chATimer = GBARegisterSOUNDCNT_HIGetChATimer(value);

audio->chBRight = GBARegisterSOUNDCNT_HIGetChBRight(value); audio->chBLeft = GBARegisterSOUNDCNT_HIGetChBLeft(value); audio->chBTimer = GBARegisterSOUNDCNT_HIGetChBTimer(value); - // TODO: Implement channel reset + if (GBARegisterSOUNDCNT_HIIsChAReset(value)) { + CircleBufferClear(&audio->chA.fifo); + } + if (GBARegisterSOUNDCNT_HIIsChBReset(value)) { + CircleBufferClear(&audio->chB.fifo); + } } void GBAAudioWriteSOUNDCNT_X(struct GBAAudio* audio, uint16_t value) {