From 37f640ece28307331b80e845b901a0f9871bb19a Mon Sep 17 00:00:00 2001 From: refractionpcsx2 Date: Sat, 4 Jun 2022 13:30:48 +0100 Subject: [PATCH] IPU: Always process command if busy on DMA run --- pcsx2/IPU/IPU_Fifo.cpp | 7 +++++-- pcsx2/IPU/IPUdma.cpp | 10 ++++++---- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/pcsx2/IPU/IPU_Fifo.cpp b/pcsx2/IPU/IPU_Fifo.cpp index 1c81164e51..c29e39dd50 100644 --- a/pcsx2/IPU/IPU_Fifo.cpp +++ b/pcsx2/IPU/IPU_Fifo.cpp @@ -178,7 +178,10 @@ void WriteFIFO_IPUin(const mem128_t* value) //committing every 16 bytes if( ipu_fifo.in.write((u32*)value, 1) == 0 ) { - CommandExecuteQueued = true; - CPU_INT(IPU_PROCESS, 1 * BIAS); + if (ipuRegs.ctrl.BUSY && !CommandExecuteQueued) + { + CommandExecuteQueued = true; + CPU_INT(IPU_PROCESS, 1 * BIAS); + } } } diff --git a/pcsx2/IPU/IPUdma.cpp b/pcsx2/IPU/IPUdma.cpp index d2221a43f1..92e6f2daf3 100644 --- a/pcsx2/IPU/IPUdma.cpp +++ b/pcsx2/IPU/IPUdma.cpp @@ -140,9 +140,11 @@ void IPU1dma() } } - - CommandExecuteQueued = true; - CPU_INT(IPU_PROCESS, totalqwc * BIAS); + if (ipuRegs.ctrl.BUSY && !CommandExecuteQueued) + { + CommandExecuteQueued = true; + CPU_INT(IPU_PROCESS, totalqwc * BIAS); + } IPU_LOG("Completed Call IPU1 DMA QWC Remaining %x Finished %d In Progress %d tadr %x", ipu1ch.qwc, IPU1Status.DMAFinished, IPU1Status.InProgress, ipu1ch.tadr); } @@ -188,7 +190,7 @@ void IPU0dma() IPU_INT_FROM( readsize * BIAS ); - if (ipu0ch.qwc > 0 && !CommandExecuteQueued) + if (ipuRegs.ctrl.BUSY && !CommandExecuteQueued) { CommandExecuteQueued = true; CPU_INT(IPU_PROCESS, 4);