Skip to content

Commit

Permalink
add fix for wwe 2k11 when using overclock
Browse files Browse the repository at this point in the history
  • Loading branch information
JoseAaronLopezGarcia committed Oct 10, 2024
1 parent 9d553a4 commit 2602400
Showing 1 changed file with 24 additions and 2 deletions.
26 changes: 24 additions & 2 deletions core/stargate/gamefix.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,33 @@
#include <functions.h>


int (*utilityGetParam)(int, int*) = NULL;
int getParamFixed_ULJM05221(int param, int* value){
static int (*utilityGetParam)(int, int*) = NULL;
static int getParamFixed_ULJM05221(int param, int* value){
int res = utilityGetParam(param, value);
if (param == PSP_SYSTEMPARAM_ID_INT_LANGUAGE && *value > 1){
*value = 0;
}
return res;
}

static STMOD_HANDLER wwe_previous;
static void wweModuleOnStart(SceModule2 * mod)
{

// Boot Complete Action not done yet
if (strcmp(mod->modname, "mainPSP") == 0)
{
hookImportByNID(mod, "scePower", 0x34F9C463, 222); // scePowerGetPllClockFrequencyInt
hookImportByNID(mod, "scePower", 0x843FBF43, 0); // scePowerSetCpuClockFrequency
hookImportByNID(mod, "scePower", 0xFDB5BFE9, 222); // scePowerGetCpuClockFrequencyInt
hookImportByNID(mod, "scePower", 0xBD681969, 111); // scePowerGetBusClockFrequencyInt
}

// Call Previous Module Start Handler
if(wwe_previous) wwe_previous(mod);

}

void applyFixesByModule(SceModule2* mod){

// fix black screen in Tekken 6
Expand Down Expand Up @@ -55,4 +73,8 @@ void applyFixesByGameId(){
utilityGetParam = sctrlHENFindFunction("sceUtility_Driver", "sceUtility", 0xA5DA2406);
sctrlHENPatchSyscall(utilityGetParam, getParamFixed_ULJM05221);
}

else if (strcasecmp("ULES01472", gameid) == 0 || strcasecmp("ULUS10543", gameid) == 0){
wwe_previous = sctrlHENSetStartModuleHandler(wweModuleOnStart);
}
}

0 comments on commit 2602400

Please sign in to comment.