From b9321f66f7a8a04d3db6256289a47ae4913c78b7 Mon Sep 17 00:00:00 2001 From: Sour Date: Sun, 3 Mar 2019 13:53:00 -0500 Subject: [PATCH] DMA: Reset DoTransfer flag when initializing HDMA channels --- Core/DmaController.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Core/DmaController.cpp b/Core/DmaController.cpp index f7f6994..529576c 100644 --- a/Core/DmaController.cpp +++ b/Core/DmaController.cpp @@ -49,7 +49,11 @@ void DmaController::InitHdmaChannels() _memoryManager->IncrementMasterClockValue<18>(); for(int i = 0; i < 8; i++) { DmaChannelConfig &ch = _channel[i]; + + //Reset internal flags on every frame ch.HdmaFinished = false; + ch.DoTransfer = false; //not resetting this causes graphical glitches in some games (Aladdin, Super Ghouls and Ghosts) + if(_hdmaChannels & (1 << i)) { //"1. Copy AAddress into Address." ch.HdmaTableAddress = ch.SrcAddress;