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 

AT3P Help!! - Problem fixed

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



Joined: 05 May 2005
Posts: 122

PostPosted: Tue Aug 08, 2006 3:46 am    Post subject: AT3P Help!! - Problem fixed Reply with quote

I am in need of some help.

I get the prx files to load (Audio & at3p) but when I call sceAtracSetDataAndGetID after loading a at3 file into a buffer, it errors out with 8002013a. A friend told me its a libs not linked yet.

So any idea what I might be doing wrong?

I launch a thread to execute this
Code:
int AudioAtrac3PlusLoadPrxlibrary( SceSize args, void *argp )
{
   //* Load & Start Prx
   if(sceUmdCheckMedium(0) == 0)
   {
      uidAudioCodecPrx = pspSdkLoadStartModule("flash0:/kd/audiocodec.prx", PSP_MEMORY_PARTITION_KERNEL);
      uidAtrac3PlusPrx = pspSdkLoadStartModule("flash0:/kd/libatrac3plus.prx", PSP_MEMORY_PARTITION_USER);
   }
   else
   {
      sceUmdActivate(1, "disc0:");
      sceUmdWaitDriveStat(UMD_WAITFORINIT);      

      uidAudioCodecPrx = pspSdkLoadStartModule("disc0:/PSP_GAME/USRDIR/kmodule/audiocodec.prx", PSP_MEMORY_PARTITION_KERNEL);
      uidAtrac3PlusPrx = pspSdkLoadStartModule("disc0:/PSP_GAME/USRDIR/module/libatrac3plus.prx", PSP_MEMORY_PARTITION_USER);
   }


   //* Error Checking
   if( uidAudioCodecPrx < 0 )
      printf( "audiocodec failed (0x%08x)!\n", uidAudioCodecPrx );
      
   if( uidAtrac3PlusPrx < 0 )
      printf( "libatrac3plus failed (0x%08x)!\n", uidAtrac3PlusPrx );

   sceKernelExitThread(0);

   return 0;
}


To launch my play thread (which I call the command that errors) I do this

Code:
uidThreadHandle = sceKernelCreateThread( "AudioAtrac3PlusPlay", AudioAtrac3PlusPlay, 0x12, 0x10000, PSP_THREAD_ATTR_USER, NULL );


Last edited by subbie on Tue Aug 08, 2006 5:49 am; edited 1 time in total
Back to top
View user's profile Send private message
TyRaNiD



Joined: 18 Jan 2004
Posts: 918

PostPosted: Tue Aug 08, 2006 4:00 am    Post subject: Reply with quote

very simple, your application is a kernel mode one, if you just load off umd you should be able to get away with just using a user module instead which will allow the libraries to link. To get around this you can either manually fix up the libraries or use something like psp-packer which will patch out any checks for you so you can write your code as a user application.
Back to top
View user's profile Send private message
subbie



Joined: 05 May 2005
Posts: 122

PostPosted: Tue Aug 08, 2006 4:07 am    Post subject: Reply with quote

TyRaNiD wrote:
very simple, your application is a kernel mode one, if you just load off umd you should be able to get away with just using a user module instead which will allow the libraries to link. To get around this you can either manually fix up the libraries or use something like psp-packer which will patch out any checks for you so you can write your code as a user application.


But my app is in user mode.

PSP_MODULE_INFO("KohKae Sample", 0, 1, 1);
PSP_MAIN_THREAD_ATTR(THREAD_ATTR_USER|PSP_THREAD_ATTR_VFPU);

--edit--
Also atm I am loading off the umd.
Back to top
View user's profile Send private message
TyRaNiD



Joined: 18 Jan 2004
Posts: 918

PostPosted: Tue Aug 08, 2006 4:43 am    Post subject: Reply with quote

no idea then :) Perhaps the libs off the UMD aren't the same as the ones we have stubs for.
Back to top
View user's profile Send private message
subbie



Joined: 05 May 2005
Posts: 122

PostPosted: Tue Aug 08, 2006 4:47 am    Post subject: Reply with quote

TyRaNiD wrote:
no idea then :) Perhaps the libs off the UMD aren't the same as the ones we have stubs for.


Actualy I found out the thread was not delaying till the prx were loaded.
Maybe its because the game is 2.5 but it crashes when trying to load prx off umd. (gotta find a different disc and prx location to try again on a 1.0 or 1.5 game).

If I set the app into kernal and have it load the prx its sucessful but then I get the same error.

How can I patch the modules to work?
Back to top
View user's profile Send private message
subbie



Joined: 05 May 2005
Posts: 122

PostPosted: Tue Aug 08, 2006 5:33 am    Post subject: Reply with quote

* does a few backflips*

It works now. Its just for some reason it would crash on trying to load up the prx modules off Exit umd (uses ferm 2.5).

Yet now using Tony Hawk Underground insted (1.0). Its all dandy. :D

Now to code a prx look up (so not fixed to just 1 umd).
Back to top
View user's profile Send private message
Warren



Joined: 24 Jan 2004
Posts: 173
Location: San Diego, CA

PostPosted: Tue Aug 08, 2006 1:29 pm    Post subject: Reply with quote

The modules on the UMD were likely encrypted and since it was for a newer firmware, the firmware you were running your app on didn't have the keys to decrypt it.
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