First off, I want to apologise to anyone who thinks I should have added this to one of the current threads for loading 3.XX, but I decided to make my own instead of dragging up an old thread.
I'm having a problem loading a 3.XX .prx file, whenever I try and load it I get the 0x8002013C error, which is the library cannot be found, but I can assure you its definatly there. I'm not actually sure of the problem, and I've looked through some of the 3.XX examples, but I've found nothing thats helpful.
# Define the exports for the prx
PSP_BEGIN_EXPORTS
# These four lines are mandatory (although you can add other functions like module_stop)
# syslib is a psynonym for the single mandatory export.
PSP_EXPORT_START(syslib, 0, 0x8000)
PSP_EXPORT_FUNC_HASH(module_start)
PSP_EXPORT_VAR_HASH(module_info)
PSP_EXPORT_END
PSP_EXPORT_START(KMode, 0, 0x4001)
PSP_EXPORT_FUNC(unload_mod)
PSP_EXPORT_END
PSP_END_EXPORTS
When the app boots up, it prints the error, and then loads the fatalerror function and I have no idea why, can anyone see anything immediately incorrect that may help?
Thanks.
-Aura
Last edited by Aura on Tue Oct 23, 2007 4:20 am, edited 1 time in total.
For 3.xx/Slim programs, you should be using PSP_MODULE_USER. Most folks just use 0 or 0x1000 instead of the symbols. The 0x1006 is fine for the kernel prx.
Ok, I've now changed it to user mode, and removed the EBOOT stuff (I didn't actually need any of it anyway, as its meant to be a .prx), but I'm still having the same problem as before, the module appears to load into memory, but doesn't start.
Also, I've been told that you can't unload modules in user, I was wondering if that was true, and if there was another way around it that didn't involve loading a kmode app?
The only times I've gotten 8002013C is when it REALLY can't find the lib. Both times this happened, the path wasn't right, or the cwd wasn't set. At a guess, I'd say host: isn't assign when you run this. You could test this by changing it to something like ms0: and putting the prx there and see if it gets further.
I had that thought also, so I placed it in the root of the memstick and called it with ms0:/kmodeplugin.prx but to no avail, I mean you can see its there plain as day, and its being loaded into memory, because when I used "ml" on PSPLink I find the module loaded, but it appears to just not be starting correctly.
Another thing about the makefile is you specify the firmware as "2.50". Firmwares aren't specified with a decimal place. If you check, you'll find things like "150", "303", and most new stuff uses "371". Maybe that's conflicting with your trying to use pspkubridge. Since you ARE trying to use kubridge, you really should make that "371".
Ok, I changed that, same old problem, but I remembered an odd problem I was having previously with the main app not loading due to a single function, so I decided to remove all the functions leaving just the module_start and module_stop, and it now loads, so does this mean my problem is infact the way I've done each function, or not?
Aura wrote:Ok, I changed that, same old problem, but I remembered an odd problem I was having previously with the main app not loading due to a single function, so I decided to remove all the functions leaving just the module_start and module_stop, and it now loads, so does this mean my problem is infact the way I've done each function, or not?
Thanks for being patient with me!
-Aura
It's likely the libs being included based on dependencies from the code. For example, some of the libs are user mode and some are kernel. Like psppower vs psppower_driver. If I were to guess, I'd say you're using a user lib instead of a kernel lib. Kernel prx's cannot call user libs in 3.xx.
Well what do you know, it worked, I changed a couple of the libraries and it now loads, I'm now getting the 0x8002013A error, which is the library not yet linked error, I was just wondering what I need to do in order to link it.
I do not know if I understood your problem, and I'm not an expert at all.
I had a suggestion by someone when I experienced problems with libraries and their order in the makefile list: using --start-group
--end-group to group libraries and independently resolve linker issues.
It worked, but I do not know if you are having similar problems.
I tried to answer.
I'm not sure, I think you are thinking of it as a linker error when compiling, the error actually occurs in the app itself (it compiles fine). It only happens when I try and load a function from the kmodeplugin...
I've declared the function in the main app, I've compiled with the stub file, and I've loaded and started the plugin, am I overlooking anything?
Ok, I'm still having my error when trying to run the function from the plugin, I've edited the first post to show the ammended source codes, makefiles and exports, so it may be more helpful for you to help.
When I run the program, it loads the module and starts it fine, but bugs out when trying to run the unload_mod(); function, and gives me the error 0x8002013A.
I've found nothing helpful for this, except to say that I get the exact same error when I don't load the module, so I'm wondering if its still having issues loading it and starting it, or accessing it in memory?