| View previous topic :: View next topic |
| Author |
Message |
daniel.franzini
Joined: 01 Sep 2009 Posts: 6 Location: São Paulo/SP (Brasil)
|
Posted: Thu Feb 11, 2010 10:47 pm Post subject: PRX sample in PSPSDK |
|
|
Hi all
I'm trying the PRX example in pspsdk but I can't get it to work.
I can build both the prx-loader and the example prx and i copy the .prx file to the root of MS. I'm using Windows Vista.
But when I launch the Sample PRX Loader the app starts and exits out without printing anything to the screen.
I have a PSP-3000 with ChickHEN/CF 5.03GEN-B. Is it possible that it is not compatible with the sample? If so, is there any other way to use PRX? |
|
| Back to top |
|
 |
unsigned int
Joined: 13 Aug 2009 Posts: 22
|
Posted: Thu Feb 11, 2010 11:34 pm Post subject: |
|
|
The sample only works on 1.50 kernel because the eboot uses some kernel functions to load the prx and display informations about it.
Nice writeups on creating and using a PRX on 3.x+ firmwares are here (from the sticky of this subforum):
|
|
| Back to top |
|
 |
TyRaNiD
Joined: 18 Jan 2004 Posts: 918
|
Posted: Fri Feb 12, 2010 2:43 am Post subject: |
|
|
| Those samples really are legacy now, what you want is the prx_template or kprx_template in the samples/template directory. They should work out of the box. |
|
| Back to top |
|
 |
daniel.franzini
Joined: 01 Sep 2009 Posts: 6 Location: São Paulo/SP (Brasil)
|
Posted: Fri Feb 12, 2010 5:10 am Post subject: pRX |
|
|
Thanks for the answers
unsigned int: thank you but some of these information seems to be outdated as well as those samples
TyRaNiD: thanks, but i have studied those examples and i don't seem to understand how a prx gets loaded and unloaded and how does one export any routines from a prx? |
|
| Back to top |
|
 |
unsigned int
Joined: 13 Aug 2009 Posts: 22
|
Posted: Fri Feb 12, 2010 6:06 am Post subject: Re: pRX |
|
|
| daniel.franzini wrote: | | i don't seem to understand how a prx gets loaded and unloaded and how does one export any routines from a prx? |
The second link I posted describes exactly these steps (hint: pspSdkLoadStartModule() and creating an .exp-file).
Those informations are still relevant, the methods of creating and loading a prx have not changed since 3.00. |
|
| Back to top |
|
 |
daniel.franzini
Joined: 01 Sep 2009 Posts: 6 Location: São Paulo/SP (Brasil)
|
Posted: Fri Feb 12, 2010 8:16 am Post subject: prx - try #1 |
|
|
Hi
Thank you for the explanations. I found this link with a detailed tutorial on PRX.
I read it and tried to apply the info in it. Unfortunately, it did not work.
Here is the example I'm trying to run.
myprx.c
| Code: |
#include <pspkernel.h>
PSP_MODULE_INFO( "MyPRX", PSP_MODULE_USER, 0 , 0 );
PSP_NO_CREATE_MAIN_THREAD();
int func(void)
{
return 0;
}
int module_start(SceSize argc, void* argp)
{
return 0;
}
int module_stop(SceSize args, void* argp)
{
return 0;
}
|
myprx_exp.exp
| Code: |
PSP_BEGIN_EXPORTS
PSP_EXPORT_START(syslib, 0, 0x8000)
PSP_EXPORT_FUNC(module_start)
PSP_EXPORT_VAR(module_info)
PSP_EXPORT_END
PSP_EXPORT_START(myprx, 0, 0x0001)
PSP_EXPORT_FUNC(func)
PSP_EXPORT_END
PSP_END_EXPORTS
|
Makefile
| Code: |
TARGET=myprx
$(shell psp-build-exports -k $(TARGET)_exp.exp)
$(shell psp-build-exports -s -k $(TARGET)_exp.exp)
OBJS = $(TARGET).o $(TARGET)_exp.o
BUILD_PRX=1
PRX_EXPORTS=myprx_exp.exp
INCDIR =
CFLAGS = -O2 -G0 -Wall
CXXFLAGS = $(CFLAGS) -fno-exceptions -fno-rtti
ASFLAGS = $(CFLAGS)
LIBDIR =
LDFLAGS += -mno-crt0 -nostartfiles
PSPSDK=$(shell psp-config --pspsdk-path)
include $(PSPSDK)/lib/build.mak
|
Altough compilation and linking goes fine (an ELF is generated) psp-fixup-imports.exe gives me this error message:
| Code: | | Error, no .lib.stub section found |
Thank you.
Than |
|
| Back to top |
|
 |
Davee
Joined: 22 Jun 2009 Posts: 59
|
Posted: Fri Feb 12, 2010 10:53 am Post subject: |
|
|
| It's a bug in the toolchain. You can safely type "make" again after you get that error, or you can import a function and never use it. |
|
| Back to top |
|
 |
victorprosa
Joined: 14 Jan 2009 Posts: 38
|
Posted: Fri Feb 12, 2010 10:53 am Post subject: |
|
|
An effort should be started in order to port 1.50 SDK stuff to newer kernels...
When necessary to use it for projects, it gives a lot of headaches... |
|
| Back to top |
|
 |
|