forums.ps2dev.org Forum Index forums.ps2dev.org
Homebrew PS2, PSP & PS3 Development Discussions
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Precision regarding sctrlHENFindFunction

 
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Development
View previous topic :: View next topic  
Author Message
sauron_le_noir



Joined: 05 Jul 2008
Posts: 229

PostPosted: Mon Apr 13, 2009 1:56 am    Post subject: Precision regarding sctrlHENFindFunction Reply with quote

When hooking a kernel function in the samples that i have seen programmers
use sctrHENFindFunction like this sample got from iop.prx:

orgaddr[0]=sctrlHENFindFunction("sceIOFileManager", "IoFileMgrForUser", 0x06A70004);

this function get the address of the nid 0x06A7004 aka sceIoMkdir
i have found the nid from http://silverspring.lan.st/

My question Is this code firmware independant even if sony change is nids ?
Does M33 firmware do all the job ?

Another question what does this function do ?
int level = sctrlKernelSetUserLevel(8);

it save the userlevel into the var level but what is the userlevel ?
Back to top
View user's profile Send private message Send e-mail MSN Messenger
Torch



Joined: 28 May 2008
Posts: 842

PostPosted: Mon Apr 13, 2009 2:53 am    Post subject: Reply with quote

You only need to search for the 3.52 NIDs. The M33 NIDs resolver will handle the random NIDs even in this function.

Userlevel is required for some privileged operations. In the case of iop.prx all the functions are syscalls, so they will be executed in the context of the thread that called the function, i.e. a user mode thread. By setting the userlever=8, the level of the calling user mode thread will be 8 and it can access the restricted functions like assigning flash0:/ for read/write etc.
Back to top
View user's profile Send private message
sauron_le_noir



Joined: 05 Jul 2008
Posts: 229

PostPosted: Mon Apr 13, 2009 3:12 am    Post subject: Reply with quote

thx torch for the reply as you have see the sample is taken from your iop.prx.

where do you find all this information ? is there a site regrouping system resources or just talking to guys like moonlight , tyranid etc .....
Back to top
View user's profile Send private message Send e-mail MSN Messenger
Torch



Joined: 28 May 2008
Posts: 842

PostPosted: Mon Apr 13, 2009 3:15 am    Post subject: Reply with quote

I asked moonlight. The iop.prx is his not mine, I just added the code in module_stop to undo the patches on unloading the module, otherwise it broke the M33 patches in the XMB.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Development All times are GMT + 10 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group