Install a bootstrap and return to application... how?
Pirata Nervo, (maybe) I've a solution for you!
I've passed 4 args to prx and for that I've used only a string!
Use strtok to divide the string!
This is a example:
And in the prx use strtok to divide the string on '{';
The only problem that I've encoured is that you cannot (I think) pass a very long string, but is only a possible problem of one of my function not a limitation of LoadModule funct!
I've passed 4 args to prx and for that I've used only a string!
Use strtok to divide the string!
This is a example:
Code: Select all
char* arguments = (char*)malloc( strlen(path) + strlen(target) +1);
sprintf("%s{%s", path, target);
sceKernelStartModule(mod, strlen(arguments), arguments, NULL, NULL);
The only problem that I've encoured is that you cannot (I think) pass a very long string, but is only a possible problem of one of my function not a limitation of LoadModule funct!
-
- Posts: 409
- Joined: Tue Oct 09, 2007 4:22 am
-
- Posts: 409
- Joined: Tue Oct 09, 2007 4:22 am
-
- Posts: 409
- Joined: Tue Oct 09, 2007 4:22 am
-
- Posts: 409
- Joined: Tue Oct 09, 2007 4:22 am
-
- Posts: 409
- Joined: Tue Oct 09, 2007 4:22 am
-
- Posts: 409
- Joined: Tue Oct 09, 2007 4:22 am
-
- Posts: 409
- Joined: Tue Oct 09, 2007 4:22 am
-
- Posts: 409
- Joined: Tue Oct 09, 2007 4:22 am
I tried the follow code , it's ok.
but when I change the code to :
it won't work.
I want to hook the controller function. but It seems not work. i don't know why.
Code: Select all
int main_thread(SceSize args, void *argp)
{
sceKernelDelayThread(10*100000);
// Hook exit game function
SceModule *mod;
mod = sceKernelFindModuleByName("sceLoadExec");
if(mod) apiHookByName(mod->modid, "LoadExecForUser","sceKernelExitGame", exit_to_mypspmenu);
sceKernelExitDeleteThread(0);
return 0;
}
Code: Select all
int main_thread(SceSize args, void *argp)
{
// Hook exit game function
sceKernelDelayThread(10*100000);
SceModule *mod;
mod = sceKernelFindModuleByName("sceController_Service");
if(mod){
apiHookByName(mod->modid, "sceCtrl","sceCtrlReadBufferPositive", sceCtrlReadBufferPositiveFake);
}
sceKernelExitDeleteThread(0);
return 0;
}
int sceCtrlReadBufferPositiveFake(SceCtrlData *pad_data, int count)
{
return 0; // return 0, do nothing when key pressed.
}
I want to hook the controller function. but It seems not work. i don't know why.
Try to use this funct:
( Are you sure about sceController_Service? Where I can fine the name of all the modules? )
( Are you sure about sceController_Service? Where I can fine the name of all the modules? )
Code: Select all
u32 orig_funcs;
int FunctPatched(void)
{
return 0;
}
orig_funcs = sctrlHENFindFunction("sceController_Service", "sceCtrl", 0x1F803938);
sctrlHENPatchSyscall(orig_funcs, FunctPatched);
-
- Posts: 409
- Joined: Tue Oct 09, 2007 4:22 am
yes sceController_Service exists.
you can check the libraries names here http://silverspring.lan.st
NID: 0x1F803938
@ldqmoon, your "fake" function only returns 0. it does nothing.
you can check the libraries names here http://silverspring.lan.st
NID: 0x1F803938
@ldqmoon, your "fake" function only returns 0. it does nothing.
-
- Posts: 31
- Joined: Sun Mar 23, 2008 2:16 am
- Contact:
@ldqmoon
Use the functions from the M33 SDK.
Use the functions from the M33 SDK.
Code: Select all
int sceCtrlReadBufferPositivePatched(SceCtrlData* pad, int count)
{
//code
}
u32 OriginalFunction;
OriginalFunction = FindProc("sceController_Service", "sceCtrl_driver", 0x1F803938);
sctrlHENPatchSyscall(OriginalFunction, sceCtrlReadBufferPositivePatched);
-
- Posts: 31
- Joined: Sun Mar 23, 2008 2:16 am
- Contact: