all repos — mgba @ cf27d88696eb3b889e0cb40709e572a7c4036283

mGBA Game Boy Advance Emulator

GB: Ending HDMAs should clear isHdma bit
Jeffrey Pfau jeffrey@endrift.com
Sun, 21 Feb 2016 02:48:34 -0800
commit

cf27d88696eb3b889e0cb40709e572a7c4036283

parent

dd39a0add47226109f9789d4834ab969bda0e38f

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

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

@@ -366,6 +366,9 @@ 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]; + if (gb->memory.io[REG_HDMA5] == 0xFF) { + gb->memory.isHdma = false; + } } else { gb->memory.io[REG_HDMA5] |= 0x80; }