Discuss the development of new homebrew software, tools and libraries.
Moderators: cheriff , TyRaNiD
blu_eye4
Posts: 37 Joined: Sun Oct 26, 2008 8:41 pm
Post
by blu_eye4 » Tue Nov 04, 2008 3:05 am
Hi guys
Well, I've a problem: I've begun programming with vlf library so, I've made a little homebrew to test them. The homebrew works very well, but when I want to insert pspctrl.h library in the homebrew and make
Code: Select all
[...]if(latch.uiMake != 0){
if(latch.uiMake & PSP_CTRL_CROSS){
vlfGuiAddText(5, 210, "Hai premuto il tasto X\n");
}
}
if(latch.uiMake & PSP_CTRL_CIRCLE){
vlfGuiAddText(5, 210, "Hai premuto il tasto O\n");
}[...]
the homebrew doesn't work, and the psp give me the following error: 0x8002013C. How can I resolve? Please help me, I'm a noob in c programming language :)
Pirata Nervo
Posts: 409 Joined: Tue Oct 09, 2007 4:22 am
Post
by Pirata Nervo » Tue Nov 04, 2008 3:56 am
this 0x8002013C whether means you are doing kernel calls or library not found
Upgrade your
PSP
blu_eye4
Posts: 37 Joined: Sun Oct 26, 2008 8:41 pm
Post
by blu_eye4 » Tue Nov 04, 2008 5:12 am
Pirata Nervo wrote: this 0x8002013C whether means you are doing kernel calls or library not found
and how must i do? I've only include pspctrl.h... please help me :)
Pirata Nervo
Posts: 409 Joined: Tue Oct 09, 2007 4:22 am
Post
by Pirata Nervo » Tue Nov 04, 2008 5:47 am
Can you post your makefile please?
Also make sure if you are not doing any kernel calls (this means not using kernel functions)
Upgrade your
PSP
blu_eye4
Posts: 37 Joined: Sun Oct 26, 2008 8:41 pm
Post
by blu_eye4 » Tue Nov 04, 2008 6:10 am
TARGET = vlftest
OBJS = crt0.o main.o graphics.o
INCDIR = ./include
CFLAGS = -O2 -G0 -Wall -fshort-wchar -fno-pic -mno-check-zero-division
CXXFLAGS = $(CFLAGS) -fno-exceptions -fno-rtti
ASFLAGS = $(CFLAGS) -c
LIBDIR = ./lib
LDFLAGS = -mno-crt0 -nostdlib -nodefaultlibs
LIBS = -lvlfgui -lvlfgu -lvlfutils -lpng -lz -lm -lvlflibc -lpspkubridge
PSP_FW_VERSION = 150
BUILD_PRX = 1
EXTRA_TARGETS = EBOOT.PBP
PSP_EBOOT_TITLE = VLF Test
#PSP_EBOOT_ICON="icon0.png"
#PSP_EBOOT_PIC1="pic1.png"
#PSP_EBOOT_SND0="snd0.at3"
PSPSDK=$(shell psp-config --pspsdk-path)
include ./build.mak
Pirata Nervo
Posts: 409 Joined: Tue Oct 09, 2007 4:22 am
Post
by Pirata Nervo » Tue Nov 04, 2008 6:54 am
try this:
-lvlflibc -lvlfutils -lvlfgu -lvlfgui -lpng -lz -lm -lpspkubridge
instead of your LIBS
Upgrade your
PSP
blu_eye4
Posts: 37 Joined: Sun Oct 26, 2008 8:41 pm
Post
by blu_eye4 » Tue Nov 04, 2008 7:00 am
Pirata Nervo wrote: try this:
-lvlflibc -lvlfutils -lvlfgu -lvlfgui -lpng -lz -lm -lpspkubridge
instead of your LIBS
nothing, with your libs order is a mess of error...
Pirata Nervo
Posts: 409 Joined: Tue Oct 09, 2007 4:22 am
Post
by Pirata Nervo » Tue Nov 04, 2008 7:23 am
Well I don't know the dependency tree of the vlf library so I just guessed by the name.
Just check if you are doing any kernel calls
Upgrade your
PSP
Super Sheep
Posts: 31 Joined: Sun Mar 23, 2008 2:16 am
Contact:
Post
by Super Sheep » Tue Nov 04, 2008 8:16 am
Try and use the VLF handlers for the controller input.
Torch
Posts: 825 Joined: Wed May 28, 2008 2:50 am
Post
by Torch » Wed Nov 05, 2008 5:14 am
im using latch functions from a separate thread, with same makefile,libs and includes folder from the vlf sample. try working up from the sample.
blu_eye4
Posts: 37 Joined: Sun Oct 26, 2008 8:41 pm
Post
by blu_eye4 » Wed Nov 05, 2008 6:07 am
Torch wrote: im using latch functions from a separate thread, with same makefile,libs and includes folder from the vlf sample. try working up from the sample.
Thanks, but I think this is a library problem: I've tried many times and I discovered that when I include pspctrl.h library in the homebrew, the programm doesn't work, giving the error that i said before. I've tried also to include the library in the makefile but the homebrew doesn't work too! I don't know what it is the problem and I don't think that using latch function in a separate thread I will resolve the problem
Pirata Nervo
Posts: 409 Joined: Tue Oct 09, 2007 4:22 am
Post
by Pirata Nervo » Wed Nov 05, 2008 6:32 am
Make a kernel prx with the control functions and export them into your app :)
Upgrade your
PSP
blu_eye4
Posts: 37 Joined: Sun Oct 26, 2008 8:41 pm
Post
by blu_eye4 » Wed Nov 05, 2008 7:01 am
Pirata Nervo wrote: Make a kernel prx with the control functions and export them into your app :)
i don't know how i have to do, can you tell me it? thanks a lot :)
blu_eye4
Posts: 37 Joined: Sun Oct 26, 2008 8:41 pm
Post
by blu_eye4 » Thu Nov 06, 2008 12:33 am
Pirata Nervo wrote: Do you know how to export functions?
yes and no: i know taht i have to create a .exp file, but i don't know how get functions :(
Pirata Nervo
Posts: 409 Joined: Tue Oct 09, 2007 4:22 am
Post
by Pirata Nervo » Thu Nov 06, 2008 1:31 am
Load the prx file / link the library which exports the functions.
Build a stub out of exports.exp by hitting this command:
psp-build-exports -s exports.exp
in your terminal window (make sure the current dir is the prx source dir)
Upgrade your
PSP
blu_eye4
Posts: 37 Joined: Sun Oct 26, 2008 8:41 pm
Post
by blu_eye4 » Thu Nov 06, 2008 1:33 am
Pirata Nervo wrote: Load the prx file / link the library which exports the functions.
Build a stub out of exports.exp by hitting this command:
psp-build-exports -s exports.exp
in your terminal window (make sure the current dir is the prx source dir)
thanks, but the prx i must reload from flash0 or i must create? you don't have a tutorial to link me? thank a lot :)
Pirata Nervo
Posts: 409 Joined: Tue Oct 09, 2007 4:22 am
Post
by Pirata Nervo » Thu Nov 06, 2008 2:26 am
If you do some search over the forums you will find a few quick tutorials or samples.
You must create the prx to export your functions from there and then load that prx from your app and use its functions
Upgrade your
PSP
blu_eye4
Posts: 37 Joined: Sun Oct 26, 2008 8:41 pm
Post
by blu_eye4 » Thu Nov 06, 2008 5:23 am
oh guys, i've resolved my problems: i've made a .s file where i've include the library pspctrl.h. Now the homebrew works very well :)
If you want i'll post here how I've resolved, maybe it can be useful for a noob :)