sceMp3InitResource() returns 0x8002013A

Discuss the development of new homebrew software, tools and libraries.

Moderators: cheriff, TyRaNiD

Post Reply
hallo007
Posts: 36
Joined: Sat May 13, 2006 6:15 pm

sceMp3InitResource() returns 0x8002013A

Post by hallo007 »

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&#40; status < 0 &#41;
    &#123;
         pspDebugScreenClear&#40;&#41;;
         pspDebugScreenPrintf&#40;"Error &#58; kuKernelLoadModule returns 0x%08X" , status &#41;;
         sceKernelSleepThread&#40;&#41;;
         &#125;
    sceKernelStartModule&#40;status, 0, 0, NULL, NULL&#41;;
    
    status = kuKernelLoadModule&#40;"flash0&#58;/kd/libmp3.prx" , 0 , NULL&#41;;
    if&#40; status < 0 &#41;
    &#123;
         pspDebugScreenClear&#40;&#41;;
         pspDebugScreenPrintf&#40;"Error &#58; kuKernelLoadModule returns 0x%08X" , status &#41;;
         sceKernelSleepThread&#40;&#41;;
         &#125;
    sceKernelStartModule&#40;status, 0, 0, NULL, NULL&#41;;
    
    status = sceMp3InitResource&#40;&#41;;
    if&#40; status < 0 &#41;
    &#123;
         pspDebugScreenClear&#40;&#41;;
         pspDebugScreenPrintf&#40;"error sceMp3InitResource returns 0x%08X" , status&#41;;
         sceKernelSleepThread&#40;&#41;;
         &#125;
BigProMaN
Posts: 16
Joined: Fri Aug 29, 2008 9:37 pm

Post by BigProMaN »

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 »

You have probably to load some othres modules
BigProMaN
Posts: 16
Joined: Fri Aug 29, 2008 9:37 pm

Post by BigProMaN »

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 »

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 »

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 »

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&#40;SceSize args, void *argp&#41;
&#123;
    pspDebugScreenInit&#40;&#41;;
    pspAudioInit&#40;&#41;;
    pspMp3Init&#40;&#41;;
....
int module_start&#40;SceSize args, void *argp&#41;
&#123;
    SceUID th = sceKernelCreateThread&#40;"main_thread", main_thread,  0x20, 0x10000, 0, NULL&#41;;

    if &#40;th >= 0&#41;
         sceKernelStartThread&#40;th, args, argp&#41;;
    
    return 0;
    &#125;
In my first post , you can see the function pspMp3Init();
Dariusc123456
Posts: 388
Joined: Tue Aug 12, 2008 12:46 am

Post by Dariusc123456 »

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 »

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
User avatar
Torch
Posts: 825
Joined: Wed May 28, 2008 2:50 am

Post by Torch »

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 »

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 »

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 »

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.
Post Reply