[SOLVED] VLF menu interface within MyApplication

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

Moderators: cheriff, TyRaNiD

Post Reply
mypspdev
Posts: 178
Joined: Wed Jul 11, 2007 10:30 pm

[SOLVED] VLF menu interface within MyApplication

Post by mypspdev »

Hi all,
I'm back with some new developments on PSP-2000_to_3000 (embedded microphone!).
My purpose is to use wonderful VLF 1.0 library lateral menu into MyApplication, reading back the selected menu option and doing something different according to what selected.
Well... working with VLF lib1.0 example (we all have not enough thanks to the glorius author...)
I'm using crt0.c as it is, main.c with just a modification for my Lateral Menu, because I'm using 10 menu options:

Code: Select all

	vlfGuiLateralMenu(10, items, 0, my_menu_sel, 10);
With Makefile as it is in the VLF1.0 example I make my EBOOT and it works fine.

Now, I'd like to have MyApplication calling the Lateral Menu, receiving back the user selection: a number between 0 and 10 in order to do whatever I want.
No way to run this way, as from my unsuccessful Solutions:
- I cannot link crt0.c and main.c into my application because VLF is using its own libc and if I merge all together errors are rised. Conclusion: VLF interface should remain isolated.
- I created crt0.c & main.c as a PRX, using

Code: Select all

PSP_MODULE_INFO("MyVLF", 0x800, 2, 0);
PSP_MAIN_THREAD_ATTR(0);
leaving all other elements as they are, included Makefile, I am generating a MyVLF.prx.
Than I tried to build up my EBOOT in order to be the MyVLF.prx loader: just a main.c with

Code: Select all

PSP_MODULE_INFO("MYVLFPRXLOADER", 1, 1, 0);
PSP_MAIN_THREAD_ATTR(0);
but I cannot load and look with satisfaction at execution of MyVLF.prx as expected.
All my attempts raised errors loading the prx and no execution at all is visible:

Code: Select all

pspSdkLoadStartModule("./prx/MyVLF.prx", PSP_MEMORY_PARTITION_KERNEL) 
pspSdkLoadStartModule("./prx/MyVLF.prx", PSP_MEMORY_PARTITION_USER)
sceKernelLoadModule("./prx/MyVLF.prx", 0,NULL)
May be my un-expert (stupid) programming state is the reason, or something impossible to do was desired or, and that's why I'm writing my question here, something is wrong somewhere in my code or assumptions...

I've investigated also on some other VLF applications: resurrection.prx within unbricker is using VLF and it has been generated as a prx, but I cannnot see how it is loaded by the application EBOOT. Examples as "modular", prx generation tutorial etc... are not helping me.
I'm thinking that something is wrong in calling, loading, starting and executing MyVLF.prx, displaying the expected lateral menu and providing back the user selection.

Thanks for any help...

my best regards
Last edited by mypspdev on Sat Sep 19, 2009 10:42 pm, edited 1 time in total.
User avatar
Torch
Posts: 825
Joined: Wed May 28, 2008 2:50 am

Post by Torch »

I don't understand what you're trying to do but it looks like you want to display only the VLF lateral menu on top of your existing application. Not gonna happen (easily). There will be graphical corruption. Unless you modify your VLF based PRX to check with your main executable before each rendering loop and manage them accordingly.

Presently its designed to be launched as the main executable in an application and it should be doing all the rendering. There shouldn't be any problem loading it as a PRX provided you're not already doing anything that interferes obviously.
mypspdev
Posts: 178
Joined: Wed Jul 11, 2007 10:30 pm

Post by mypspdev »

Just for better understanding, here is zip as example of my [crazy] purpose.
....... please, some parts of code are not yet complete, first step is to run VLF menu, further step is to manage menu selection, by the way not yet complete....
It's containing the
- VLFmenu.prx package with my lateral menu selection
- EBOOT for loading VLFmenu.prx in order to get back menu selection

Within my EBOOT package, main.c is providing (stupid approach!?)different ways I know to Load and Start a prx in order to check errors, just to show my unsuccessful tests.

No way to Load it and Start it to drawing and running VLF Lateral menu, receiving back selected option.

This way up to me could be the best GUI interface for our homebrews, fully pspsdk compatible, easy standard look and feel.

Thanks for suggestion about where I'm wrong and how to correct it.

Thanks and best regards
Post Reply