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 

Investigation on System

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



Joined: 11 Jul 2007
Posts: 178

PostPosted: Tue Oct 16, 2007 11:58 pm    Post subject: Investigation on System Reply with quote

I'm running some procedure to investigate behind the PSP System:

Thread list and info: it works fine.

Code:
void Thread_List()
{
   SceUID thid[100];
   int thcount;
   sceKernelGetThreadmanIdList(SCE_KERNEL_TMID_Thread, thid, 100, &thcount);
   char s[64];
   sprintf(s, "(%d)", thcount);
   SceKernelThreadInfo thinfo;
   int i;
   for(i = 0; i < thcount; i++)
   {
      memset(&thinfo, 0, sizeof(SceKernelThreadInfo));
      thinfo.size = sizeof(SceKernelThreadInfo);
      sceKernelReferThreadStatus(thid[i], &thinfo);
      printf("Thread : %s ",thinfo.name);
      printf("\n");
   }
}


Module List: it works as expected:

Code:
void module_List()
{
   SceUID modid[100];
   int modcount;
   sceKernelGetModuleIdList(modid, 100, &modcount);
   char s[64];
   sprintf(s, "(%d)", modcount);
   SceKernelModuleInfo minfo;
   int i;
   for(i = 0; i < modcount; i++)
   {
      memset(&minfo, 0, sizeof(SceKernelModuleInfo));
      minfo.size = sizeof(SceKernelModuleInfo);
      sceKernelQueryModuleInfo(modid[i], &minfo);
      printf("Module : %s ", minfo.name);
      printf("\n");
   }
}


Checking RAM: ERROR on start of homebrew if un-commented sceKernelQuerymemoryPartitionInfo...

Any help please? Thanks in advance

Code:
void check_RAM()
{
   int i;
   PspSysmemPartitionInfo pinfo;
   for(i = 0; i < 6; i++)
   {
      memset(&pinfo, 0, sizeof(pinfo));
      pinfo.size = sizeof(pinfo);
      sceKernelQueryMemoryPartitionInfo(i + 1, &pinfo);
//      sprintf( "%u  0x%08x  0x%08x  0x%08x 0x%08x 0x%x", i + 1, pinfo.memsize, pinfo.startaddr, sceKernelPartitionTotalFreeMemSize (i + 1), sceKernelPartitionMaxFreeMemSize (i + 1), pinfo.attr);
//      printf( "%u  0x%08x  0x%08x  0x%08x 0x%08x 0x%x", i + 1, pinfo.memsize, pinfo.startaddr, sceKernelPartitionTotalFreeMemSize (i + 1), sceKernelPartitionMaxFreeMemSize (i + 1), pinfo.attr);
   }
}
[/code]
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