pcsx2:tlb:goemon: allocation can be called from 2 places

* game is working :)

Note1: I dissassemble the main exe to search all call of the allocation (unlikely to have more calls)
Note2: it is easier to use the return of the function so allocation is done in the tlb[array] cache
This commit is contained in:
Gregory Hainaut 2014-12-07 19:25:14 +01:00
parent e6de35f5ac
commit cb73ed4737
2 changed files with 5 additions and 4 deletions

View File

@ -460,9 +460,10 @@ void BGEZALL() // Branch if Rs >= 0 and link
*********************************************************/
void JR()
{
// 0x33ad48 is the return address of the function that populate the TLB cache
// 0x33ad48 and 0x35060c are the return address of the function (0x356250) that populate the TLB cache
if (EmuConfig.Gamefixes.GoemonTlbHack) {
if (cpuRegs.GPR.r[_Rs_].UL[0] == 0x33ad48)
u32 add = cpuRegs.GPR.r[_Rs_].UL[0];
if (add == 0x33ad48 || add == 0x35060c)
GoemonPreloadTlb();
}
doBranch(cpuRegs.GPR.r[_Rs_].UL[0]);

View File

@ -1740,8 +1740,8 @@ static void __fastcall recRecompile( const u32 startpc )
}
if (EmuConfig.Gamefixes.GoemonTlbHack) {
if (pc == 0x33ad48) {
// 0x33ad48 is the return address of the function that populate the TLB cache
if (pc == 0x33ad48 || pc == 0x35060c) {
// 0x33ad48 and 0x35060c are the return address of the function (0x356250) 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