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 

sceMp3InitResource() returns 0x8002013A

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



Joined: 13 May 2006
Posts: 36

PostPosted: Sun Jan 04, 2009 9:54 pm    Post subject: sceMp3InitResource() returns 0x8002013A Reply with quote

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:

    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();
         }
Back to top
View user's profile Send private message
BigProMaN



Joined: 29 Aug 2008
Posts: 16

PostPosted: Mon Jan 05, 2009 12:10 am    Post subject: Reply with quote

I'm not sure, but try with pspSdkLoadStartModule() instead of kuKernelLoadModule and sceKernelStartModule.
_________________
Excuse me for my English, I'm French.
Back to top
View user's profile Send private message
ne0h



Joined: 21 Feb 2008
Posts: 386

PostPosted: Mon Jan 05, 2009 2:44 am    Post subject: Reply with quote

You have probably to load some othres modules
_________________
Get Xplora!
Back to top
View user's profile Send private message
BigProMaN



Joined: 29 Aug 2008
Posts: 16

PostPosted: Mon Jan 05, 2009 2:51 am    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
hallo007



Joined: 13 May 2006
Posts: 36

PostPosted: Mon Jan 05, 2009 3:43 am    Post subject: Reply with quote

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
Back to top
View user's profile Send private message
TyRaNiD



Joined: 18 Jan 2004
Posts: 918

PostPosted: Mon Jan 05, 2009 5:58 am    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
hallo007



Joined: 13 May 2006
Posts: 36

PostPosted: Mon Jan 05, 2009 6:59 am    Post subject: Reply with quote

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:

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();
Back to top
View user's profile Send private message
Dariusc123456



Joined: 12 Aug 2008
Posts: 394

PostPosted: Mon Jan 05, 2009 7:23 am    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message AIM Address
hallo007



Joined: 13 May 2006
Posts: 36

PostPosted: Tue Jan 06, 2009 7:14 am    Post subject: Reply with quote

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
Back to top
View user's profile Send private message
Torch



Joined: 28 May 2008
Posts: 842

PostPosted: Tue Jan 06, 2009 2:21 pm    Post subject: Reply with quote

If you are in kernel mode then why use kubridge? sceKernelLoadModule should work the same.
Back to top
View user's profile Send private message
hallo007



Joined: 13 May 2006
Posts: 36

PostPosted: Fri Jan 09, 2009 4:01 am    Post subject: Reply with quote

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
Back to top
View user's profile Send private message
NoEffex



Joined: 27 Nov 2008
Posts: 108

PostPosted: Fri Jan 09, 2009 9:06 am    Post subject: Reply with quote

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
Back to top
View user's profile Send private message
Insert_witty_name



Joined: 10 May 2006
Posts: 376

PostPosted: Fri Jan 09, 2009 9:58 am    Post subject: Reply with quote

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