diff --git a/src/gb/memory.c b/src/gb/memory.c index a11d982d5..cddd8fa63 100644 --- a/src/gb/memory.c +++ b/src/gb/memory.c @@ -366,6 +366,9 @@ void _GBMemoryHDMAService(struct GB* gb) { 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; }