all repos — mgba @ e7bd5f9ade967c2bea151633b9336144b246576b

mGBA Game Boy Advance Emulator

Remove loop in DMA to find a value we already know
Jeffrey Pfau jeffrey@endrift.com
Sun, 19 Oct 2014 23:30:10 -0700
commit

e7bd5f9ade967c2bea151633b9336144b246576b

parent

d44bf73a81ba8c84021b201c50f378f19513542f

1 files changed, 2 insertions(+), 5 deletions(-)

jump to
M src/gba/gba-memory.csrc/gba/gba-memory.c

@@ -852,11 +852,8 @@ info->nextCount = wordsRemaining;

} info->nextSource = source; - int i; - for (i = 0; i < 4; ++i) { - if (memory->dma[i].nextEvent != INT_MAX) { - memory->dma[i].nextEvent += cycles; - } + if (info->nextEvent != INT_MAX) { + info->nextEvent += cycles; } cpu->cycles += cycles; }