GB Memory: Write back HDMA addresses when done
Jeffrey Pfau jeffrey@endrift.com
Fri, 19 Feb 2016 22:07:08 -0800
1 files changed,
4 insertions(+),
0 deletions(-)
jump to
M
src/gb/memory.c
→
src/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 {