pcsx2:tlb: enable GoemonUnloadTlb on recompiler

This commit is contained in:
Gregory Hainaut 2014-12-07 17:50:38 +01:00
parent a8ad598153
commit e6de35f5ac
1 changed files with 9 additions and 3 deletions

View File

@ -1739,9 +1739,15 @@ static void __fastcall recRecompile( const u32 startpc )
xCALL(PreBlockCheck);
}
// 0x33ad48 is the return address of the function that populate the TLB cache
if (pc == 0x33ad48 && EmuConfig.Gamefixes.GoemonTlbHack) {
xCALL(GoemonPreloadTlb);
if (EmuConfig.Gamefixes.GoemonTlbHack) {
if (pc == 0x33ad48) {
// 0x33ad48 is the return address of the function that populate the TLB cache
xCALL(GoemonPreloadTlb);
} else if (pc == 0x3563b8) {
// 0x3563b8 is the start address of the function that invalidate entry in TLB cache
MOV32MtoR(ECX, (int)&cpuRegs.GPR.n.a0.UL[ 0 ] );
xCALL(GoemonUnloadTlb);
}
}
// go until the next branch