VLF Library problem

Discuss the development of new homebrew software, tools and libraries.

Moderators: cheriff, TyRaNiD

Post Reply
blu_eye4
Posts: 37
Joined: Sun Oct 26, 2008 8:41 pm

VLF Library problem

Post by blu_eye4 »

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 :)
Zer01ne
Posts: 28
Joined: Mon Sep 08, 2008 7:15 am

Post by Zer01ne »

Pirata Nervo
Posts: 409
Joined: Tue Oct 09, 2007 4:22 am

Post by Pirata Nervo »

this 0x8002013C whether means you are doing kernel calls or library not found
Image
Upgrade your PSP
blu_eye4
Posts: 37
Joined: Sun Oct 26, 2008 8:41 pm

Post by blu_eye4 »

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 »

Can you post your makefile please?
Also make sure if you are not doing any kernel calls (this means not using kernel functions)
Image
Upgrade your PSP
blu_eye4
Posts: 37
Joined: Sun Oct 26, 2008 8:41 pm

Post by blu_eye4 »

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 »

try this:
-lvlflibc -lvlfutils -lvlfgu -lvlfgui -lpng -lz -lm -lpspkubridge
instead of your LIBS
Image
Upgrade your PSP
blu_eye4
Posts: 37
Joined: Sun Oct 26, 2008 8:41 pm

Post by blu_eye4 »

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 »

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
Image
Upgrade your PSP
Super Sheep
Posts: 31
Joined: Sun Mar 23, 2008 2:16 am
Contact:

Post by Super Sheep »

Try and use the VLF handlers for the controller input.
User avatar
Torch
Posts: 825
Joined: Wed May 28, 2008 2:50 am

Post by Torch »

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 »

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 »

Make a kernel prx with the control functions and export them into your app :)
Image
Upgrade your PSP
blu_eye4
Posts: 37
Joined: Sun Oct 26, 2008 8:41 pm

Post by blu_eye4 »

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 :)
Pirata Nervo
Posts: 409
Joined: Tue Oct 09, 2007 4:22 am

Post by Pirata Nervo »

Do you know how to export functions?
Image
Upgrade your PSP
blu_eye4
Posts: 37
Joined: Sun Oct 26, 2008 8:41 pm

Post by blu_eye4 »

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 »

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)
Image
Upgrade your PSP
blu_eye4
Posts: 37
Joined: Sun Oct 26, 2008 8:41 pm

Post by blu_eye4 »

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 »

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
Image
Upgrade your PSP
blu_eye4
Posts: 37
Joined: Sun Oct 26, 2008 8:41 pm

Post by blu_eye4 »

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 :)
Post Reply