Core: If SMM_PIDMA, clear physical memory code before doing the dma

This commit is contained in:
zilmar 2022-05-16 15:33:36 +09:30
parent 1617e63b84
commit 487ed8b54d
1 changed files with 5 additions and 4 deletions

View File

@ -302,6 +302,11 @@ void CDMA::PI_DMA_WRITE()
if (PI_CART_ADDR_REG >= 0x10000000 && PI_CART_ADDR_REG <= 0x1FFFFFFF) if (PI_CART_ADDR_REG >= 0x10000000 && PI_CART_ADDR_REG <= 0x1FFFFFFF)
{ {
if (g_Recompiler && g_System->bSMM_PIDMA())
{
g_Recompiler->ClearRecompCode_Phys(g_Reg->PI_DRAM_ADDR_REG, g_Reg->PI_WR_LEN_REG, CRecompiler::Remove_DMA);
}
uint32_t i; uint32_t i;
uint8_t * ROM = g_Rom->GetRomAddress(); uint8_t * ROM = g_Rom->GetRomAddress();
@ -400,10 +405,6 @@ void CDMA::PI_DMA_WRITE()
g_System->SetDmaUsed(true); g_System->SetDmaUsed(true);
OnFirstDMA(); OnFirstDMA();
} }
if (g_Recompiler && g_System->bSMM_PIDMA())
{
g_Recompiler->ClearRecompCode_Phys(g_Reg->PI_DRAM_ADDR_REG, g_Reg->PI_WR_LEN_REG, CRecompiler::Remove_DMA);
}
if(g_System->bRandomizeSIPIInterrupts()) if(g_System->bRandomizeSIPIInterrupts())
{ {