forums.ps2dev.org Forum Index forums.ps2dev.org
Homebrew PS2, PSP & PS3 Development Discussions
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

VLF Library problem

 
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Development
View previous topic :: View next topic  
Author Message
blu_eye4



Joined: 26 Oct 2008
Posts: 37

PostPosted: Tue Nov 04, 2008 3:05 am    Post subject: VLF Library problem Reply with quote

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:
[...]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 :)
Back to top
View user's profile Send private message
Zer01ne



Joined: 08 Sep 2008
Posts: 29

PostPosted: Tue Nov 04, 2008 3:44 am    Post subject: Reply with quote

if you speak french goto
http://www.pc-psp.powa.fr/fichiers/Docvlfgui.rar
Back to top
View user's profile Send private message
Pirata Nervo



Joined: 09 Oct 2007
Posts: 409

PostPosted: Tue Nov 04, 2008 3:56 am    Post subject: Reply with quote

this 0x8002013C whether means you are doing kernel calls or library not found
_________________

Upgrade your PSP
Back to top
View user's profile Send private message
blu_eye4



Joined: 26 Oct 2008
Posts: 37

PostPosted: Tue Nov 04, 2008 5:12 am    Post subject: Reply with quote

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 :)
Back to top
View user's profile Send private message
Pirata Nervo



Joined: 09 Oct 2007
Posts: 409

PostPosted: Tue Nov 04, 2008 5:47 am    Post subject: Reply with quote

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
Back to top
View user's profile Send private message
blu_eye4



Joined: 26 Oct 2008
Posts: 37

PostPosted: Tue Nov 04, 2008 6:10 am    Post subject: Reply with quote

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
Back to top
View user's profile Send private message
Pirata Nervo



Joined: 09 Oct 2007
Posts: 409

PostPosted: Tue Nov 04, 2008 6:54 am    Post subject: Reply with quote

try this:
-lvlflibc -lvlfutils -lvlfgu -lvlfgui -lpng -lz -lm -lpspkubridge
instead of your LIBS
_________________

Upgrade your PSP
Back to top
View user's profile Send private message
blu_eye4



Joined: 26 Oct 2008
Posts: 37

PostPosted: Tue Nov 04, 2008 7:00 am    Post subject: Reply with quote

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...
Back to top
View user's profile Send private message
Pirata Nervo



Joined: 09 Oct 2007
Posts: 409

PostPosted: Tue Nov 04, 2008 7:23 am    Post subject: Reply with quote

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
Back to top
View user's profile Send private message
Super Sheep



Joined: 23 Mar 2008
Posts: 31

PostPosted: Tue Nov 04, 2008 8:16 am    Post subject: Reply with quote

Try and use the VLF handlers for the controller input.
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Torch



Joined: 28 May 2008
Posts: 842

PostPosted: Wed Nov 05, 2008 5:14 am    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
blu_eye4



Joined: 26 Oct 2008
Posts: 37

PostPosted: Wed Nov 05, 2008 6:07 am    Post subject: Reply with quote

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
Back to top
View user's profile Send private message
Pirata Nervo



Joined: 09 Oct 2007
Posts: 409

PostPosted: Wed Nov 05, 2008 6:32 am    Post subject: Reply with quote

Make a kernel prx with the control functions and export them into your app :)
_________________

Upgrade your PSP
Back to top
View user's profile Send private message
blu_eye4



Joined: 26 Oct 2008
Posts: 37

PostPosted: Wed Nov 05, 2008 7:01 am    Post subject: Reply with quote

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 :)
Back to top
View user's profile Send private message
Pirata Nervo



Joined: 09 Oct 2007
Posts: 409

PostPosted: Wed Nov 05, 2008 7:44 am    Post subject: Reply with quote

Do you know how to export functions?
_________________

Upgrade your PSP
Back to top
View user's profile Send private message
blu_eye4



Joined: 26 Oct 2008
Posts: 37

PostPosted: Thu Nov 06, 2008 12:33 am    Post subject: Reply with quote

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 :(
Back to top
View user's profile Send private message
Pirata Nervo



Joined: 09 Oct 2007
Posts: 409

PostPosted: Thu Nov 06, 2008 1:31 am    Post subject: Reply with quote

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
Back to top
View user's profile Send private message
blu_eye4



Joined: 26 Oct 2008
Posts: 37

PostPosted: Thu Nov 06, 2008 1:33 am    Post subject: Reply with quote

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 :)
Back to top
View user's profile Send private message
Pirata Nervo



Joined: 09 Oct 2007
Posts: 409

PostPosted: Thu Nov 06, 2008 2:26 am    Post subject: Reply with quote

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
Back to top
View user's profile Send private message
blu_eye4



Joined: 26 Oct 2008
Posts: 37

PostPosted: Thu Nov 06, 2008 5:23 am    Post subject: Reply with quote

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 :)
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Development All times are GMT + 10 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group