AT3P Help!! - Problem fixed

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

Moderators: cheriff, TyRaNiD

Post Reply
subbie
Posts: 122
Joined: Thu May 05, 2005 4:14 am

AT3P Help!! - Problem fixed

Post by subbie »

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: Select all

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&#40; uidAudioCodecPrx < 0 &#41;
		printf&#40; "audiocodec failed &#40;0x%08x&#41;!\n", uidAudioCodecPrx &#41;;
		
	if&#40; uidAtrac3PlusPrx < 0 &#41;
		printf&#40; "libatrac3plus failed &#40;0x%08x&#41;!\n", uidAtrac3PlusPrx &#41;;

	sceKernelExitThread&#40;0&#41;;

	return 0;
&#125;
To launch my play thread (which I call the command that errors) I do this

Code: Select all

uidThreadHandle = sceKernelCreateThread&#40; "AudioAtrac3PlusPlay", AudioAtrac3PlusPlay, 0x12, 0x10000, PSP_THREAD_ATTR_USER, NULL &#41;;
Last edited by subbie on Tue Aug 08, 2006 5:49 am, edited 1 time in total.
TyRaNiD
Posts: 907
Joined: Sun Jan 18, 2004 12:23 am

Post by TyRaNiD »

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.
subbie
Posts: 122
Joined: Thu May 05, 2005 4:14 am

Post by subbie »

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.
TyRaNiD
Posts: 907
Joined: Sun Jan 18, 2004 12:23 am

Post by TyRaNiD »

no idea then :) Perhaps the libs off the UMD aren't the same as the ones we have stubs for.
subbie
Posts: 122
Joined: Thu May 05, 2005 4:14 am

Post by subbie »

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?
subbie
Posts: 122
Joined: Thu May 05, 2005 4:14 am

Post by subbie »

* 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).
Warren
Posts: 175
Joined: Sat Jan 24, 2004 8:26 am
Location: San Diego, CA

Post by Warren »

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