GB: Ending HDMAs should clear isHdma bit

This commit is contained in:
Jeffrey Pfau 2016-02-21 02:48:34 -08:00
parent dd39a0add4
commit cf27d88696
1 changed files with 3 additions and 0 deletions

View File

@ -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;
}