GBA Memory: Fix DMAs triggering two cycles early
Jeffrey Pfau jeffrey@endrift.com
Wed, 18 Nov 2015 20:45:44 -0800
2 files changed,
3 insertions(+),
2 deletions(-)
M
CHANGES
→
CHANGES
@@ -33,6 +33,7 @@ - GBA BIOS: Fix Sqrt sign
- GBA BIOS: Fix misaligned RLUnCompReadNormalWrite* - Qt: Fix race condition with setting sample rate - GBA Memory: Fix timing of DMAs + - GBA Memory: Fix DMAs triggering two cycles early Misc: - Qt: Window size command line options are now supported - Qt: Increase usability of key mapper
M
src/gba/memory.c
→
src/gba/memory.c
@@ -1507,8 +1507,8 @@ void GBAMemoryScheduleDMA(struct GBA* gba, int number, struct GBADMA* info) {
struct ARMCore* cpu = gba->cpu; switch (GBADMARegisterGetTiming(info->reg)) { case DMA_TIMING_NOW: - info->nextEvent = cpu->cycles; - GBAMemoryUpdateDMAs(gba, 0); + info->nextEvent = cpu->cycles + 2; + GBAMemoryUpdateDMAs(gba, -1); break; case DMA_TIMING_HBLANK: // Handled implicitly