all repos — mgba @ 52a4cbcb81fc9aff4c0588bd5e70653bc5042932

mGBA Game Boy Advance Emulator

GBA DMA: Fix invalid audio DMA parameters
Vicki Pfau vi@endrift.com
Sat, 15 Feb 2020 13:43:50 -0800
commit

52a4cbcb81fc9aff4c0588bd5e70653bc5042932

parent

f0ff8d5f825f77d726d09fd33b75659c84dff970

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

jump to
M CHANGESCHANGES

@@ -10,6 +10,7 @@ - GBA BIOS: Fix undefined instruction HLE behavior

- GBA BIOS: Implement dummy sound driver calls - GBA BIOS: Improve HLE BIOS timing - GBA DMA: Linger last DMA on bus (fixes mgba.io/i/301 and mgba.io/i/1320) + - GBA DMA: Fix invalid audio DMA parameters - GBA Memory: Misaligned SRAM writes are ignored - GBA Memory: Improve gamepak prefetch timing - GBA Serialize: Fix serializing DMA transfer register
M src/gba/audio.csrc/gba/audio.c

@@ -104,6 +104,8 @@ mCoreSyncConsumeAudio(audio->p->sync);

} void GBAAudioScheduleFifoDma(struct GBAAudio* audio, int number, struct GBADMA* info) { + info->reg = GBADMARegisterSetDestControl(info->reg, GBA_DMA_FIXED); + info->reg = GBADMARegisterSetWidth(info->reg, 1); switch (info->dest) { case BASE_IO | REG_FIFO_A_LO: audio->chA.dmaSource = number;

@@ -129,8 +131,6 @@ } else {

audio->externalMixing = false; } } - info->reg = GBADMARegisterSetDestControl(info->reg, GBA_DMA_FIXED); - info->reg = GBADMARegisterSetWidth(info->reg, 1); } void GBAAudioWriteSOUND1CNT_LO(struct GBAAudio* audio, uint16_t value) {