From e703a7b5b7451e0ffc69803e3563bdc3d1406e51 Mon Sep 17 00:00:00 2001 From: refractionpcsx2 Date: Sat, 20 Feb 2021 02:35:26 +0000 Subject: [PATCH] IPU: Flush DMA if BCLR called without stopping DMA * Set VDEC Picture type to I-Picture if none selected in IPU_CTRL --- pcsx2/IPU/IPU.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/pcsx2/IPU/IPU.cpp b/pcsx2/IPU/IPU.cpp index c304ed373a..899ed5407e 100644 --- a/pcsx2/IPU/IPU.cpp +++ b/pcsx2/IPU/IPU.cpp @@ -366,6 +366,14 @@ __fi bool ipuWrite64(u32 mem, u64 value) static void ipuBCLR(u32 val) { + // The Input FIFO shouldn't be cleared when the DMA is running, however if it is the DMA should drain + // as it is constantly fighting it.... + while(ipu1ch.chcr.STR) + { + ipu_fifo.in.clear(); + ipu1Interrupt(); + } + ipu_fifo.in.clear(); memzero(g_BP); @@ -452,7 +460,7 @@ static __fi bool ipuVDEC(u32 val) case 1://Macroblock Type decoder.frame_pred_frame_dct = 1; - decoder.coding_type = ipuRegs.ctrl.PCT; + decoder.coding_type = ipuRegs.ctrl.PCT > 0 ? ipuRegs.ctrl.PCT : 1; // Kaiketsu Zorro Mezase doesn't set a Picture type, seems happy with I ipuRegs.cmd.DATA = get_macroblock_modes(); break;