How to export functions in an eboot.pbp, to loaded PRX?
-
- Posts: 12
- Joined: Tue Sep 15, 2009 6:31 pm
- Location: Spain
How to export functions in an eboot.pbp, to loaded PRX?
Hello everybody,
I am making a new application for the PSP, a window environment where the threads can create windows, write in them... etc
Now, I have a problem.
In all the examples that I have seen, there is an EBOOT.PBP that loads a PRX and then, some function in the PRX can be used by the EBOOT.PBP.
But I need just the opposite.
I have an EBOOT.PBP with lots of functions, and I need to export them to all the PRX that this EBOOT loads.
I have tried mixing the PRX export commands and the .S libraries in the EBOO.PBP, but it is not working.
I am able to run my program, but when I load the PRX, it just freezes.
I have also tried to compile my program as a PRX, and load it trough an EBOOT, but it shows nothing in the screen.
I have asked this only in the ps2dev.org forum because I know that someone will solve my problem :-)
Thanks a lot :-D
I am making a new application for the PSP, a window environment where the threads can create windows, write in them... etc
Now, I have a problem.
In all the examples that I have seen, there is an EBOOT.PBP that loads a PRX and then, some function in the PRX can be used by the EBOOT.PBP.
But I need just the opposite.
I have an EBOOT.PBP with lots of functions, and I need to export them to all the PRX that this EBOOT loads.
I have tried mixing the PRX export commands and the .S libraries in the EBOO.PBP, but it is not working.
I am able to run my program, but when I load the PRX, it just freezes.
I have also tried to compile my program as a PRX, and load it trough an EBOOT, but it shows nothing in the screen.
I have asked this only in the ps2dev.org forum because I know that someone will solve my problem :-)
Thanks a lot :-D
-
- Posts: 12
- Joined: Tue Sep 15, 2009 6:31 pm
- Location: Spain
Hmm I did that, but when I tried to run the eboot it returned to the XMB and shown an error.Torch wrote:Just use BUILD_PRX=1 in the makefile. Your EBOOT will contain a PRX. Export functions normally from it. Any other PRX can import the functions of your EBOOT's PRX.
Thanks
Edit: The error is "800200D9" (failed to allocate the memory block)
Edit again:
OK I fixed a few lines in the code and now it compiles and run the EBOOT with the PRX and it exports the functions.
Now, the problem is when I load the PRX that tries to use those functions. The PSP just freezes. I have tried with other PRX (music.prx) and it works, so the problem is not loading the PRX, but the PRX itself.
Thanks for your help :-)
Last edited by usertestprueba on Tue Sep 15, 2009 11:34 pm, edited 2 times in total.
-
- Posts: 12
- Joined: Tue Sep 15, 2009 6:31 pm
- Location: Spain
Here is the EBOOT.PBP's Makefile:
And the exports.exp:
And this is the "multiTasKingLib.S" that I include in the PRX: (generated with prxtools)
And also the exports.exp of the PRX:
And the PRX's makefile:
Thanks again for your help :-)
Edit: I have added the ones that I have now.
The problem is that the PSP freezes when I start the PRX that is suposed to use the functions in "multiTasKingLib"
Code: Select all
PSPSDK = $(shell psp-config --pspsdk-path)
PSPLIBSDIR = $(PSPSDK)/..
TARGET = multiTasKing
OBJS = main.o graphics.o framebuffer.o
BUILD_PRX = 1
PRX_EXPORTS = exports.exp
CFLAGS = -O2 -G0 -Wall
CXXFLAGS = $(CFLAGS) -fno-exceptions -fno-rtti
ASFLAGS = $(CFLAGS)
LIBDIR =
LIBS = -lpspgu -lpsppower -lpng -lz -lm
LDFLAGS =
EXTRA_TARGETS = EBOOT.PBP
PSP_EBOOT_TITLE = multiTasKing
#PSP_EBOOT_ICON = ICON0.png
include $(PSPSDK)/lib/build.mak
Code: Select all
# Define the exports for the prx
PSP_BEGIN_EXPORTS
# Export our functions
PSP_EXPORT_START(multiTasKingLib, 0, 0x0001)
PSP_EXPORT_FUNC(delay)
PSP_EXPORT_FUNC(redondear)
PSP_EXPORT_FUNC(limpiarVentana)
PSP_EXPORT_FUNC(numeroDeVentanasAbiertas)
PSP_EXPORT_FUNC(crearNuevaVentana)
PSP_EXPORT_FUNC(eliminarVentana)
PSP_EXPORT_FUNC(ventanaPasaAPrimerPlano)
PSP_EXPORT_FUNC(existeVentana)
PSP_EXPORT_FUNC(printTextImage)
PSP_EXPORT_FUNC(fillImageRect)
PSP_EXPORT_END
PSP_END_EXPORTS
Code: Select all
.set noreorder
#include "pspimport.s"
IMPORT_START "multiTasKingLib",0x00090000
IMPORT_FUNC "multiTasKingLib",0x024F46AB,delay
IMPORT_FUNC "multiTasKingLib",0x843B7EAC,redondear
IMPORT_FUNC "multiTasKingLib",0x33A23BA9,limpiarVentana
IMPORT_FUNC "multiTasKingLib",0x93952B2A,numeroDeVentanasAbiertas
IMPORT_FUNC "multiTasKingLib",0xD4467F17,crearNuevaVentana
IMPORT_FUNC "multiTasKingLib",0x907F84B4,eliminarVentana
IMPORT_FUNC "multiTasKingLib",0x90435DD8,ventanaPasaAPrimerPlano
IMPORT_FUNC "multiTasKingLib",0x7EEEDC14,existeVentana
IMPORT_FUNC "multiTasKingLib",0x630D6778,printTextImage
IMPORT_FUNC "multiTasKingLib",0x04C6A497,fillImageRect
Code: Select all
# 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_END_EXPORTS
Code: Select all
release: all
TARGET = aplicacion
OBJS = main.o multiTasKingLib.o
INCDIR =
CFLAGS = -O2 -G0 -Wall
CXXFLAGS = $(CFLAGS) -fno-exceptions -fno-rtti
ASFLAGS = $(CFLAGS)
LIBDIR =
LDFLAGS =
LIBS =
USE_KERNEL_LIBC = 1
USE_KERNEL_LIBS = 1
BUILD_PRX = 1
PRX_EXPORTS = exports.exp
PSPSDK=$(shell psp-config --pspsdk-path)
include $(PSPSDK)/lib/build_prx.mak
Edit: I have added the ones that I have now.
The problem is that the PSP freezes when I start the PRX that is suposed to use the functions in "multiTasKingLib"
-
- Posts: 12
- Joined: Tue Sep 15, 2009 6:31 pm
- Location: Spain
I have managed to make it work
Lots of searching examples, but finally, it works!!!
I have made a window environment capable of giving each PRX a window where write
Thanks a lot for your help Torch (not much, but I know you would have helped me until I make it work xDD)
Now I have to start programming PRX for my app :-P
Let see where it gets ;-)
Cheers,
Carlos
PD: For the curious: http://psp.scenebeta.com/node/38280
Lots of searching examples, but finally, it works!!!
I have made a window environment capable of giving each PRX a window where write
Thanks a lot for your help Torch (not much, but I know you would have helped me until I make it work xDD)
Now I have to start programming PRX for my app :-P
Let see where it gets ;-)
Cheers,
Carlos
PD: For the curious: http://psp.scenebeta.com/node/38280
wow!!!usertestprueba wrote: PD: For the curious: http://psp.scenebeta.com/node/38280
great!!
let me try to do something with MyTouchscreen.....
-
- Posts: 12
- Joined: Tue Sep 15, 2009 6:31 pm
- Location: Spain
Thank you :-Dmypspdev wrote:wow!!!usertestprueba wrote: PD: For the curious: http://psp.scenebeta.com/node/38280
great!!
let me try to do something with MyTouchscreen.....
Sorry, I don't understand the "let me try to do something with MyTouchscreen....." xD
¿What do you mean?
Thanks again :-)
PD: If you are not registered at psp.scenebeta.com, here it is the program:
http://server.carlosgs.es/PSPhomebrew/m ... 70_PDC.rar
-
- Posts: 12
- Joined: Tue Sep 15, 2009 6:31 pm
- Location: Spain
-
- Posts: 12
- Joined: Tue Sep 15, 2009 6:31 pm
- Location: Spain
Cool
I hadn't seen that app before, thanks for the advise ;-)pegasus2000 wrote:A Nanodesktop SDK clone ?
But I think it is not the same.
That is an SDK, this is only for managing .prx, so you need to use the PSPSDK.
(are you the author?)
Thanks again ;-)
-
- Posts: 160
- Joined: Wed Jul 12, 2006 7:09 am
Re: Cool
Oh, yes. The project is mine.usertestprueba wrote:I hadn't seen that app before, thanks for the advise ;-)pegasus2000 wrote:A Nanodesktop SDK clone ?
But I think it is not the same.
That is an SDK, this is only for managing .prx, so you need to use the PSPSDK.
(are you the author?)
Thanks again ;-)
-
- Posts: 12
- Joined: Tue Sep 15, 2009 6:31 pm
- Location: Spain
Re: Cool
Cool, congratulations ;-)pegasus2000 wrote:Oh, yes. The project is mine.usertestprueba wrote:I hadn't seen that app before, thanks for the advise ;-)pegasus2000 wrote:A Nanodesktop SDK clone ?
But I think it is not the same.
That is an SDK, this is only for managing .prx, so you need to use the PSPSDK.
(are you the author?)
Thanks again ;-)
You are right, this really sounds like a clone xD
Trust me, it is not.
I'm trying to make multiTasKing as simple as possible, I don't plan to make an SDK for the PSP. Just want to make the coders able to make simple games and apps and have them all in a single EBOOT.PBP.
My first idea was to make only a window environment that uses threads, now I have managed to make .prx to run in it ;-)
And everything in a week ;-) (begun the 9/9/09 :-P)
Your proyect is different, easier to use, but this is lighter, and with less functions.
-
- Posts: 160
- Joined: Wed Jul 12, 2006 7:09 am
Re: Cool
Yes, I understood.usertestprueba wrote:Cool, congratulations ;-)pegasus2000 wrote:Oh, yes. The project is mine.usertestprueba wrote: I hadn't seen that app before, thanks for the advise ;-)
But I think it is not the same.
That is an SDK, this is only for managing .prx, so you need to use the PSPSDK.
(are you the author?)
Thanks again ;-)
You are right, this really sounds like a clone xD
Trust me, it is not.
I'm trying to make multiTasKing as simple as possible, I don't plan to make an SDK for the PSP. Just want to make the coders able to make simple games and apps and have them all in a single EBOOT.PBP.
My first idea was to make only a window environment that uses threads, now I have managed to make .prx to run in it ;-)
And everything in a week ;-) (begun the 9/9/09 :-P)
Your proyect is different, easier to use, but this is lighter, and with less functions.
-
- Posts: 12
- Joined: Tue Sep 15, 2009 6:31 pm
- Location: Spain