mirror of https://github.com/PCSX2/pcsx2.git
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:
parent
e6de35f5ac
commit
cb73ed4737
|
@ -460,9 +460,10 @@ void BGEZALL() // Branch if Rs >= 0 and link
|
||||||
*********************************************************/
|
*********************************************************/
|
||||||
void JR()
|
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 (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();
|
GoemonPreloadTlb();
|
||||||
}
|
}
|
||||||
doBranch(cpuRegs.GPR.r[_Rs_].UL[0]);
|
doBranch(cpuRegs.GPR.r[_Rs_].UL[0]);
|
||||||
|
|
|
@ -1740,8 +1740,8 @@ static void __fastcall recRecompile( const u32 startpc )
|
||||||
}
|
}
|
||||||
|
|
||||||
if (EmuConfig.Gamefixes.GoemonTlbHack) {
|
if (EmuConfig.Gamefixes.GoemonTlbHack) {
|
||||||
if (pc == 0x33ad48) {
|
if (pc == 0x33ad48 || pc == 0x35060c) {
|
||||||
// 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
|
||||||
xCALL(GoemonPreloadTlb);
|
xCALL(GoemonPreloadTlb);
|
||||||
} else if (pc == 0x3563b8) {
|
} else if (pc == 0x3563b8) {
|
||||||
// 0x3563b8 is the start address of the function that invalidate entry in TLB cache
|
// 0x3563b8 is the start address of the function that invalidate entry in TLB cache
|
||||||
|
|
Loading…
Reference in New Issue