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 

3 NIDs - what is this doing?

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



Joined: 17 Oct 2009
Posts: 55

PostPosted: Wed Nov 04, 2009 6:41 am    Post subject: 3 NIDs - what is this doing? Reply with quote

All I know is:

char* path = SystemCtrlForKernel_AC56B90B(); //returning a string (i'm sure)
SysMemForKernel_C7E57B9C (0x00000E30); //returning nothing or nothing important

unk = SystemCtrlForKernel_F9584CAD (0x00000800); //this is compared with zero in next line
if (!(unk != 0x00000000))

0x00000800 - maybe vsh mode, so it's maybe something like sceKernelCheckModuleAttr(u32 attr)?

Anyone knows what is this? Thanks for help.
Back to top
View user's profile Send private message
a_noob



Joined: 17 Sep 2006
Posts: 97
Location: _start: jr 0xDEADBEEF

PostPosted: Wed Nov 04, 2009 6:54 am    Post subject: Reply with quote

Well it says SystemCtrl meaning input, so I assume PSP_CTRL_START = 0x000008 and the function to be int sceCtrl_driver_5E77BC8A (unsigned int mask) which gets the given mask, so this essentially is saying

if PSP_CTRL_START is masked

But I could most certainly be mistaken
_________________
Code:
.øOº'ºOø.
'ºOo.oOº'
Back to top
View user's profile Send private message AIM Address MSN Messenger
Draan



Joined: 17 Oct 2009
Posts: 55

PostPosted: Wed Nov 04, 2009 7:02 am    Post subject: Reply with quote

Well, thanks for reply, but I think you're wrong. It's from galaxy.prx, so it's not doing anything with buttons.
Back to top
View user's profile Send private message
Davee



Joined: 22 Jun 2009
Posts: 59

PostPosted: Wed Nov 04, 2009 9:56 am    Post subject: Reply with quote

That sysmem function is "sceKernelSetQTGP3".

void *SystemCtrlForKernel_F9584CAD(u32 size);
This allocs memory from systemctrl's special heap. Errors when return 0.
Back to top
View user's profile Send private message
victorprosa



Joined: 14 Jan 2009
Posts: 38

PostPosted: Wed Nov 04, 2009 10:06 am    Post subject: Reply with quote

I don't know very much about NIDs (i am a beginner at this part), but i tried to search it for you, the only reference I found is here at PS2DEV, i think that it might help you...

http://forums.ps2dev.org/viewtopic.php?p=60140&sid=0f8de97de636d32b75c6543d436655a6
Back to top
View user's profile Send private message Send e-mail
Draan



Joined: 17 Oct 2009
Posts: 55

PostPosted: Thu Nov 05, 2009 1:29 am    Post subject: Reply with quote

Thanks Davee!
Ok, I've created the stubs file for me, and I'll try what's doing the last needed function...

How to find how many and which arguments does the function need?

(I'm noob in reverse engineering, I'm using PSPDecompiler and trying to make something useful with output)
reversed subroutine 0x0000032C (module_start)
Code:

int module_start(SceSize args, void *argp)
{
  u32* mod = sceKernelFindModuleByName("sceThreadManager");
  u32 text_addr = *(mod+27);
  _sw(sceKernelCreateThread_fake, text_addr+0x17DEC);
  _sw(sceKernelStartThread_fake, text_addr+0x17F88);
  clearCache();
  while(1){
    char* path = SystemCtrlForKernel_AC56B90B(); //here is our function, i'm not sure it's with no arguments
    SceUID file = sceIoOpen(path, PSP_O_RDONLY, NULL);
    if (file >= 0) break;
    sceKernelDelayThread(10000);
  }
  sceIoClose (file);
  return 0;
}
Back to top
View user's profile Send private message
Draan



Joined: 17 Oct 2009
Posts: 55

PostPosted: Mon Nov 09, 2009 3:56 am    Post subject: Reply with quote

I found it!

from hostcore by poison:

getUmdFile = ( void * )findProc( "SystemControl", "SystemCtrlForKernel", 0xAC56B90B );

This is it!
But it isn't sctrlGetUmdFile, nor sctrlSEGetUmdFile, nor getUmdFile...
(cracking nids for dax's functions - yeach)
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