all repos — mgba @ 0557caad981eb95f012547f77f9f8ca52e8875a0

mGBA Game Boy Advance Emulator

GB Memory: Write back HDMA addresses when done
Jeffrey Pfau jeffrey@endrift.com
Fri, 19 Feb 2016 22:07:08 -0800
commit

0557caad981eb95f012547f77f9f8ca52e8875a0

parent

9d4ffb3e4337bcdb042666fa169662a6bc3ec4e1

1 files changed, 4 insertions(+), 0 deletions(-)

jump to
M src/gb/memory.csrc/gb/memory.c

@@ -347,6 +347,10 @@ gb->cpu->cycles += 2;

if (gb->memory.hdmaRemaining) { gb->memory.hdmaNext += 2; } else { + gb->memory.io[REG_HDMA1] = gb->memory.hdmaSource >> 8; + gb->memory.io[REG_HDMA2] = gb->memory.hdmaSource; + gb->memory.io[REG_HDMA3] = gb->memory.hdmaDest >> 8; + gb->memory.io[REG_HDMA4] = gb->memory.hdmaDest; if (gb->memory.isHdma) { --gb->memory.io[REG_HDMA5]; } else {