GBA Memory: Fix DMAs triggering two cycles early

This commit is contained in:
Jeffrey Pfau 2015-11-18 20:45:44 -08:00
parent 3d321bc0b9
commit 505157dca0
2 changed files with 3 additions and 2 deletions

View File

@ -33,6 +33,7 @@ Bugfixes:
- GBA BIOS: Fix misaligned RLUnCompReadNormalWrite* - GBA BIOS: Fix misaligned RLUnCompReadNormalWrite*
- Qt: Fix race condition with setting sample rate - Qt: Fix race condition with setting sample rate
- GBA Memory: Fix timing of DMAs - GBA Memory: Fix timing of DMAs
- GBA Memory: Fix DMAs triggering two cycles early
Misc: Misc:
- Qt: Window size command line options are now supported - Qt: Window size command line options are now supported
- Qt: Increase usability of key mapper - Qt: Increase usability of key mapper

View File

@ -1507,8 +1507,8 @@ void GBAMemoryScheduleDMA(struct GBA* gba, int number, struct GBADMA* info) {
struct ARMCore* cpu = gba->cpu; struct ARMCore* cpu = gba->cpu;
switch (GBADMARegisterGetTiming(info->reg)) { switch (GBADMARegisterGetTiming(info->reg)) {
case DMA_TIMING_NOW: case DMA_TIMING_NOW:
info->nextEvent = cpu->cycles; info->nextEvent = cpu->cycles + 2;
GBAMemoryUpdateDMAs(gba, 0); GBAMemoryUpdateDMAs(gba, -1);
break; break;
case DMA_TIMING_HBLANK: case DMA_TIMING_HBLANK:
// Handled implicitly // Handled implicitly