Discuss the development of new homebrew software, tools and libraries.
Moderators: cheriff , TyRaNiD
hallo007
Posts: 36 Joined: Sat May 13, 2006 6:15 pm
Post
by hallo007 » Sun Jan 04, 2009 9:54 pm
0x8002013a = LIBRARY_NOT_YET_LINKED
What's going wrong? It seems like sceKernelStartModule isn't working at all , or did I forget to load a module?
Code: Select all
int status = kuKernelLoadModule("flash0:/kd/avcodec.prx" , 0 , NULL);
if( status < 0 )
{
pspDebugScreenClear();
pspDebugScreenPrintf("Error : kuKernelLoadModule returns 0x%08X" , status );
sceKernelSleepThread();
}
sceKernelStartModule(status, 0, 0, NULL, NULL);
status = kuKernelLoadModule("flash0:/kd/libmp3.prx" , 0 , NULL);
if( status < 0 )
{
pspDebugScreenClear();
pspDebugScreenPrintf("Error : kuKernelLoadModule returns 0x%08X" , status );
sceKernelSleepThread();
}
sceKernelStartModule(status, 0, 0, NULL, NULL);
status = sceMp3InitResource();
if( status < 0 )
{
pspDebugScreenClear();
pspDebugScreenPrintf("error sceMp3InitResource returns 0x%08X" , status);
sceKernelSleepThread();
}
BigProMaN
Posts: 16 Joined: Fri Aug 29, 2008 9:37 pm
Post
by BigProMaN » Mon Jan 05, 2009 12:10 am
I'm not sure, but try with pspSdkLoadStartModule() instead of kuKernelLoadModule and sceKernelStartModule.
Excuse me for my English, I'm French.
ne0h
Posts: 386 Joined: Thu Feb 21, 2008 2:15 am
Post
by ne0h » Mon Jan 05, 2009 2:44 am
You have probably to load some othres modules
BigProMaN
Posts: 16 Joined: Fri Aug 29, 2008 9:37 pm
Post
by BigProMaN » Mon Jan 05, 2009 2:51 am
Did you try to load the modules with "sceUtilityLoadModule(PSP_MODULE_AV_AVCODEC);" and "sceUtilityLoadModule(PSP_MODULE_AV_MP3);" ?
Excuse me for my English, I'm French.
hallo007
Posts: 36 Joined: Sat May 13, 2006 6:15 pm
Post
by hallo007 » Mon Jan 05, 2009 3:43 am
BigProMaN wrote: Did you try to load the modules with "sceUtilityLoadModule(PSP_MODULE_AV_AVCODEC);" and "sceUtilityLoadModule(PSP_MODULE_AV_MP3);" ?
yes , returns 0x80020143 , module manager is busy , that's why i use kubridge
TyRaNiD
Posts: 907 Joined: Sun Jan 18, 2004 12:23 am
Post
by TyRaNiD » Mon Jan 05, 2009 5:58 am
Where exactly are you trying to load these modules then? If I recall the only reason you would get that error is if you are in the middle of the main entry point to a module rather than a thread.
hallo007
Posts: 36 Joined: Sat May 13, 2006 6:15 pm
Post
by hallo007 » Mon Jan 05, 2009 6:59 am
TyRaNiD wrote: Where exactly are you trying to load these modules then? If I recall the only reason you would get that error is if you are in the middle of the main entry point to a module rather than a thread.
wow , srry my english isnt verry good , but if I understand you right :
I'm loading the modules from a kernel thread :
Code: Select all
int main_thread(SceSize args, void *argp)
{
pspDebugScreenInit();
pspAudioInit();
pspMp3Init();
....
int module_start(SceSize args, void *argp)
{
SceUID th = sceKernelCreateThread("main_thread", main_thread, 0x20, 0x10000, 0, NULL);
if (th >= 0)
sceKernelStartThread(th, args, argp);
return 0;
}
In my first post , you can see the function pspMp3Init();
Dariusc123456
Posts: 388 Joined: Tue Aug 12, 2008 12:46 am
Post
by Dariusc123456 » Mon Jan 05, 2009 7:23 am
Make sure you runing in usermode with PSP_MODULE_INFO("MOD.Name",0,1,1). It seem you are trying to run in usermode to me from the thread commands.
hallo007
Posts: 36 Joined: Sat May 13, 2006 6:15 pm
Post
by hallo007 » Tue Jan 06, 2009 7:14 am
Dariusc123456 wrote: Make sure you runing in usermode with PSP_MODULE_INFO("MOD.Name",0,1,1). It seem you are trying to run in usermode to me from the thread commands.
I'm starting a kernel thread , and I'm running in kernelmode
Torch
Posts: 825 Joined: Wed May 28, 2008 2:50 am
Post
by Torch » Tue Jan 06, 2009 2:21 pm
If you are in kernel mode then why use kubridge? sceKernelLoadModule should work the same.
hallo007
Posts: 36 Joined: Sat May 13, 2006 6:15 pm
Post
by hallo007 » Fri Jan 09, 2009 4:01 am
Torch wrote: If you are in kernel mode then why use kubridge? sceKernelLoadModule should work the same.
but it doesnt work , it returns 0X80020143 module manager busy
NoEffex
Posts: 106 Joined: Thu Nov 27, 2008 6:48 am
Post
by NoEffex » Fri Jan 09, 2009 9:06 am
uhh, I think the kernel isn't loaded completely. Do something like
sceKernelDelayThread(15000000);
while(!sceKernelFindModuleByName("sceKernelLibrary")) sceKernelDelayThread(100000);
Programming with:
Geany + Latest PSPSDK from svn
Insert_witty_name
Posts: 376 Joined: Wed May 10, 2006 11:31 pm
Post
by Insert_witty_name » Fri Jan 09, 2009 9:58 am
Run the code that comes in the sample under the 3.71 M33 kernel or later.
If that still doesn't work then there's something you're not telling us.