somewhere you've defined a list of modules to kill. It can be for example in game_freemem or something like that. Remember that the UID and what you defined are not the same thing. What you defined is where to find the UID in ram, so they will not be the same, you might need to add a few debug statements to see what module address gives you that UID
If you need US PSN Codes, this technique is what I recommend.
Looking for guest bloggers and news hunters here at wololo.net, PM me!
wololo wrote:somewhere you've defined a list of modules to kill. It can be for example in game_freemem or something like that. Remember that the UID and what you defined are not the same thing. What you defined is where to find the UID in ram, so they will not be the same, you might need to add a few debug statements to see what module address gives you that UID
#ifdef SUSPEND_THEN_DELETE_THREADS
// Delete module here before cleaning the threads,
// otherwise the main module cannot be unloaded
UnloadModules();
SuicideAllThreads();
UnloadModules();
#else
UnloadModules();
#endif
for (i = 0; i < (24 << 20); i += 0x400)
{
SceUID modid;
/* check if we've got a UID */
if ((modid = sceKernelGetModuleIdByAddress(MODULES_START_ADDRESS + i)) >= 0)
{
/* we do, make sure it's not just the same one */
/* Before*/
if (uids[cur_uid - ((cur_uid == 0) ? (0) : (1))] != modid)
{
/* okay add it */
uids[cur_uid++] = modid;
}
if (cur_uid == MAX_MODULES_TO_FREE)
{
LOGSTR0("\n->WARNING: Max number of modules to unload reached\n");
break;
}
}
}
/* shutdown the modules in usermode */
for (i = cur_uid - 1; (int)i >= 0; i--)
{
kill_module(uids[i]);
}
for (i = 0; i < (24 << 20); i += 0x400)
{
SceUID modid;
/* check if we've got a UID */
if ((modid = sceKernelGetModuleIdByAddress(MODULES_START_ADDRESS + i)) >= 0)
{
/* we do, make sure it's not just the same one */
/* After*/
if (uids[cur_uid - ((cur_uid == 0) ? (0) : (1))] != modid && modid != 0x03D35F6B)
{
/* okay add it */
uids[cur_uid++] = modid;
}
if (cur_uid == MAX_MODULES_TO_FREE)
{
LOGSTR0("\n->WARNING: Max number of modules to unload reached\n");
break;
}
}
}
/* shutdown the modules in usermode */
for (i = cur_uid - 1; (int)i >= 0; i--)
{
kill_module(uids[i]);
}