all repos — mgba @ 505157dca00d7b916b00410632eb282f8f7535be

mGBA Game Boy Advance Emulator

GBA Memory: Fix DMAs triggering two cycles early
Jeffrey Pfau jeffrey@endrift.com
Wed, 18 Nov 2015 20:45:44 -0800
commit

505157dca00d7b916b00410632eb282f8f7535be

parent

3d321bc0b94959d21b6063039d67057c05890c33

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

jump to
M CHANGESCHANGES

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