Esempio n. 1
0
void patch_sceUSB_Driver(u32 text_addr)
{
    sceUsbStartOrig = (void*)sctrlHENFindFunction("sceUSB_Driver", "sceUsb", 0xAE5DE6AF);
    sctrlHENPatchSyscall(sceUsbStartOrig, &_sceUsbStart);

    sceUsbStopOrig = (void*)sctrlHENFindFunction("sceUSB_Driver", "sceUsb", 0xC2464FA0);
    sctrlHENPatchSyscall(sceUsbStopOrig, &_sceUsbStop);
}
Esempio n. 2
0
int module_start( SceSize args, void *argp )
{
	SceUID file = sceIoOpen("ms0:/seplugins/language.bin", PSP_O_RDONLY, 0777);
	if (!file)
	{
		return 0;
	}
	sceIoRead(file, &languagePatch, 1);
	sceIoClose(file);
	if ((languagePatch < 0) || (languagePatch > 11))
	{
		return 0;
	}
	
	u32 functionAddress = sctrlHENFindFunction("sceUtility_Driver", "sceUtility", 0xA5DA2406);
	sceUtilityGetSystemParamInt = (void *)functionAddress;
	
	sctrlHENPatchSyscall(functionAddress, sceUtilityGetSystemParamInt_patched);
	
	sceKernelDcacheWritebackAll();
	sceKernelIcacheClearAll();

	return 0;
}