From 17660077b06699e221bc0dba6d972238d84668df Mon Sep 17 00:00:00 2001 From: Vicki Pfau Date: Fri, 22 Feb 2019 18:48:41 -0800 Subject: [PATCH] GBA DMA: Fix Display Start DMAs --- CHANGES | 1 + src/gba/dma.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGES b/CHANGES index 374703aad..2eb29fe71 100644 --- a/CHANGES +++ b/CHANGES @@ -12,6 +12,7 @@ Bugfixes: - GB: Fix crash when accessing SRAM if no save loaded and cartridge has no SRAM - Python: Fix crash when deleting files owned by library - Python: Make sure GB link object isn't GC'd before GB object + - GBA DMA: Fix Display Start DMAs Misc: - GBA Video: Improve sprite cycle counting (fixes mgba.io/i/1274) diff --git a/src/gba/dma.c b/src/gba/dma.c index 2eded798d..e6e96bc8d 100644 --- a/src/gba/dma.c +++ b/src/gba/dma.c @@ -182,7 +182,7 @@ void _dmaEvent(struct mTiming* timing, void* context, uint32_t cyclesLate) { dma->nextCount = 0; bool noRepeat = !GBADMARegisterIsRepeat(dma->reg); noRepeat |= GBADMARegisterGetTiming(dma->reg) == GBA_DMA_TIMING_NOW; - noRepeat |= memory->activeDMA == 3 && GBADMARegisterGetTiming(dma->reg) == GBA_DMA_TIMING_CUSTOM; + noRepeat |= memory->activeDMA == 3 && GBADMARegisterGetTiming(dma->reg) == GBA_DMA_TIMING_CUSTOM && gba->video.vcount == VIDEO_VERTICAL_PIXELS + 1; if (noRepeat) { dma->reg = GBADMARegisterClearEnable(dma->reg);