all repos — mgba @ 7266186f4a564858cfcfd9045811f4f7f8805f6c

mGBA Game Boy Advance Emulator

GBA DMA: Fix DMA start/end timing
Vicki Pfau vi@endrift.com
Fri, 22 Feb 2019 18:49:23 -0800
commit

7266186f4a564858cfcfd9045811f4f7f8805f6c

parent

17660077b06699e221bc0dba6d972238d84668df

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

jump to
M CHANGESCHANGES

@@ -13,6 +13,7 @@ - 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 + - GBA DMA: Fix DMA start/end timing Misc: - GBA Video: Improve sprite cycle counting (fixes mgba.io/i/1274)
M src/gba/dma.csrc/gba/dma.c

@@ -237,9 +237,6 @@ int32_t cycles = 2;

gba->cpuBlocked = true; if (info->count == info->nextCount) { - if (sourceRegion < REGION_CART0 || destRegion < REGION_CART0) { - cycles += 2; - } if (width == 4) { cycles += memory->waitstatesNonseq32[sourceRegion] + memory->waitstatesNonseq32[destRegion]; } else {

@@ -306,6 +303,9 @@ info->nextSource = source;

info->nextDest = dest; if (!wordsRemaining) { info->nextCount |= 0x80000000; + if (sourceRegion < REGION_CART0 || destRegion < REGION_CART0) { + info->when += 2; + } } GBADMAUpdate(gba); }