IPU: Flush DMA if BCLR called without stopping DMA

* Set VDEC Picture type to I-Picture if none selected in IPU_CTRL
This commit is contained in:
refractionpcsx2 2021-02-20 02:35:26 +00:00
parent 40d9e13334
commit e703a7b5b7
1 changed files with 9 additions and 1 deletions

View File

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