[resolved] reboot psp in 2.71?

Discuss the development of new homebrew software, tools and libraries.

Moderators: cheriff, TyRaNiD

Post Reply
TheBuzzer
Posts: 49
Joined: Mon Feb 06, 2006 10:02 am

[resolved] reboot psp in 2.71?

Post by TheBuzzer »

woot it works.

the stub method works!

it was using that
scePower_driver_0442D852 still to reboot.

thx for the help.
Last edited by TheBuzzer on Wed Aug 09, 2006 10:40 am, edited 2 times in total.
jas0nuk
Posts: 137
Joined: Thu Apr 27, 2006 8:00 am

Post by jas0nuk »

static u32 FindProc(const char* szMod, const char* szLib, u32 nid)
{
SceModule* modP = sceKernelFindModuleByName(szMod);
if (modP == NULL)
{
printf("Failed to find mod '%s'\n", szMod);
return 0;
}
SceLibraryEntryTable* entP = (SceLibraryEntryTable*)modP->ent_top;
while ((u32)entP < ((u32)modP->ent_top + modP->ent_size))
{
if (entP->libname != NULL && strcmp(entP->libname, szLib) == 0)
{
// found lib
int i;
int count = entP->stubcount + entP->vstubcount;
u32* nidtable = (u32*)entP->entrytable;
for (i = 0; i < count; i++)
{
if (nidtable == nid)
{
u32 procAddr = nidtable[count+i];
// printf("entry found: '%s' '%s' = $%x\n", szMod, szLib, (int)procAddr);
return procAddr;
}
}
printf("Found mod '%s' and lib '%s' but not nid=$%x\n", szMod, szLib, nid);
return 0;
}
entP++;
}
printf("Found mod '%s' but not lib '%s'\n", szMod, szLib);
return 0;
}

static void doreboot(void)
{
int (* reboot) (int);
reboot = (void *)FindProc("scePower_Service", "scePower_driver", 0x79DB9421);
reboot();
}

Then call with doreboot();

There is a better way of doing this, that is by adding the stub file with the function to your code. See this topic.
TheBuzzer
Posts: 49
Joined: Mon Feb 06, 2006 10:02 am

Post by TheBuzzer »

i tried that already but it does not reboot

also that had a error i tried

static void doreboot(void)
{
int (* reboot) (int);
reboot = (void *)FindProc("scePower_Service", "scePower_driver", 0x79DB9421);
reboot(0);
}

also

static void doreboot(void)
{
void (* reboot) (void);
reboot = (void *)FindProc("scePower_Service", "scePower_driver", 0x79DB9421);
reboot(0);
}

static void doreboot(int)
{
int (* reboot) (int);
reboot = (void *)FindProc("scePower_Service", "scePower_driver", 0x79DB9421);
reboot(0);
}


all did nothing :/

my psp crashes when i try to use this
Last edited by TheBuzzer on Wed Aug 09, 2006 9:21 am, edited 1 time in total.
TheBuzzer
Posts: 49
Joined: Mon Feb 06, 2006 10:02 am

Post by TheBuzzer »

btw for the .s file

i dont get where the numbers come from for the
STUB_START "sceUtility_netparam_internal",0x40010000,0x00040005

i understand the other numbers but not the first 2
TheBuzzer
Posts: 49
Joined: Mon Feb 06, 2006 10:02 am

Post by TheBuzzer »

woot it works.

the stub method works!

it was using that
scePower_driver_0442D852 still to reboot.

thx for the help.
Post Reply