I'm having difficulty running an adhoc application under firmware 3.60 (ideally, I'd like to be able to run this application on any firmware revision >= 2.00).
Here are the relevant portions of my makefile:
Code: Select all
PSP_FW_VERSION=200
LIBS=-lmypsp -lpng -lpspgu -lpspwlan -lpsppower -lz -lm -lc -lpspaudio -lpsprtc -lpspnet_adhocmatching -lpspnet_adhocctl -lpspnet_adhoc
Code: Select all
#if (_PSP_FW_VERSION >= 200)
/* User mode */
PSP_MODULE_INFO(PSP_APP_NAME, 0, 1, 1);
PSP_MAIN_THREAD_ATTR(PSP_THREAD_ATTR_USER);
#else
/* Kernel mode */
PSP_MODULE_INFO(PSP_APP_NAME, 0x1000, 1, 1);
PSP_MAIN_THREAD_ATTR(0);
#endif
Code: Select all
int main(int argc, char *argv[])
{
int ret_val = 0;
strcpy(app_path, (char*)argv[0]);
#if (_PSP_FW_VERSION >= 200)
sceUtilityLoadNetModule(PSP_NET_MODULE_COMMON);
sceUtilityLoadNetModule(PSP_NET_MODULE_ADHOC);
ret_val = user_main();
#else
/* Compiled for 1.50 firmware; in kernel mode */
if (!pspAdhocLoadDrivers())
return 1;
/* Create user thread */
SceUID thid = sceKernelCreateThread("User Mode Thread", user_main,
0x11, // default priority
256 * 1024, // stack size (256KB is regular default)
PSP_THREAD_ATTR_USER, NULL);
/* Start user thread; wait for it to complete */
sceKernelStartThread(thid, 0, 0);
sceKernelWaitThreadEnd(thid, NULL);
#endif
return ret_val;
}
On a fw 1.50 PSP, everything works as expected (adhoc portions work). However, when run on a 3.60 PSP (compiled for 2.00), the program doesn't run, exiting with a 8002013C (library not found?) error.
Any ideas? Thanks for any help!