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 

dc v6 graphics
Goto page Previous  1, 2, 3, 4, 5, 6, 7, 8, 9  Next
 
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Development
View previous topic :: View next topic  
Author Message
phobox



Joined: 24 Mar 2008
Posts: 140

PostPosted: Sat Aug 23, 2008 12:16 am    Post subject: Reply with quote

about the page control....
what is the value of param "page" passed to the handle function?

thans
_________________
Ciao! from Italy
Back to top
View user's profile Send private message
moonlight



Joined: 26 Oct 2005
Posts: 567

PostPosted: Sat Aug 23, 2008 6:44 am    Post subject: Reply with quote

phobox wrote:
about the page control....
what is the value of param "page" passed to the handle function?

thans


It is the number of the page. When no page control is present is reset to zero. In first page is zero, in next page 1, etc... You can see in idstools.c how according to the value of page, it does a different thing in the handler.
Back to top
View user's profile Send private message
phobox



Joined: 24 Mar 2008
Posts: 140

PostPosted: Sat Aug 23, 2008 5:37 pm    Post subject: Reply with quote

moonlight wrote:
phobox wrote:
about the page control....
what is the value of param "page" passed to the handle function?

thans


It is the number of the page. When no page control is present is reset to zero. In first page is zero, in next page 1, etc... You can see in idstools.c how according to the value of page, it does a different thing in the handler.


ok thanks, i was looking into flashformat.c (or somethinglike that) that has only 2 pages...
_________________
Ciao! from Italy
Back to top
View user's profile Send private message
Torch



Joined: 28 May 2008
Posts: 842

PostPosted: Sat Aug 23, 2008 7:04 pm    Post subject: Reply with quote

This is great. I've converted my password app to fully use VLF including the pages and stuff.

Now the only problem is it can't be unloaded :P after correct password without crashing.
Back to top
View user's profile Send private message
phobox



Joined: 24 Mar 2008
Posts: 140

PostPosted: Sat Aug 23, 2008 9:58 pm    Post subject: Reply with quote

@Torch looking forward to see your program working.

@moonlight, please can you add png image format support? png images are used inside the psp: both in eboots and umds.
_________________
Ciao! from Italy
Back to top
View user's profile Send private message
Torch



Joined: 28 May 2008
Posts: 842

PostPosted: Sat Aug 23, 2008 10:03 pm    Post subject: Reply with quote

phobox wrote:
@Torch looking forward to see your program working.

@moonlight, please can you add png image format support? png images are used inside the psp: both in eboots and umds.


moonlight has to complete VLF first. Its unable to be unloaded in its current state.

Can you add support for loading from PNG data in memory (Like if the file is already read into an array)?
Back to top
View user's profile Send private message
krosk



Joined: 24 Aug 2008
Posts: 21

PostPosted: Sun Aug 24, 2008 10:02 pm    Post subject: Reply with quote

bug:
vlfguinetconfdialog doesn't work for me... I'm calling it with something like that:
if(vlfGuiNetConfDialog() < 0)
{
vlfGuiMessageDialog("Connection error.", VLF_MD_TYPE_ERROR | VLF_MD_BUTTONS_NONE);
}
else
{
RegisterDialog(1);
}

It doesn't show the Net Dialog, but shows the register dialog :S

also, a input text and implementation of the osk plugin will be so cool...
that's my suggestion of what to do now :)
(osk plugin loaded by psputility_osk.h doesn't work, crash the vlf...)

sorry for my bad english ;)
Back to top
View user's profile Send private message
phobox



Joined: 24 Mar 2008
Posts: 140

PostPosted: Sun Aug 24, 2008 11:47 pm    Post subject: Reply with quote

is this the proper way to remove a fade?
Code:
vlfGuiSetPictureFade(picFocus, NULL, NULL, 0);
vlfGuiSetPictureVisibility(picFocus, 0);

(in this case for pics).
_________________
Ciao! from Italy
Back to top
View user's profile Send private message
moonlight



Joined: 26 Oct 2005
Posts: 567

PostPosted: Mon Aug 25, 2008 2:05 am    Post subject: Reply with quote

I didn't provide a way to remove fade, as fade would normally be used without repeat flag and would eventually end, but I will probably add a function to cancel it.
Back to top
View user's profile Send private message
krosk



Joined: 24 Aug 2008
Posts: 21

PostPosted: Mon Sep 01, 2008 1:47 am    Post subject: Reply with quote

vlfGuiLoadResources don't work:
Code:
   char *names[2];
   void *datas[2];
   int types[2], sizes[2];

   names[0] = "tex_game";
   names[1] = "tex_sdwn_game";
   types[0] = types[1] = RCO_GRAPHIC;

   int res = vlfGuiLoadResources("flash0:/vsh/resource/topmenu_plugin.rco", 2, names, types, datas, sizes, NULL);
   if (res != 2)
   {   
      char buffer [50];
      int n;
      n = sprintf(buffer, "Error 1: %d", res);
      error1_text = vlfGuiAddText(354, 190, buffer);
      if (res > 0)
      {
         error2_text = vlfGuiAddText(354, 190, "Error 2");
         if (datas[0])
            free(datas[0]);
         if (datas[1])
            free(datas[1]);
      }
   }
   else
   {
      void *gme;
      vlfGuiAddShadowedPicture(&gme, datas[0], sizes[0], datas[1], sizes[1], 441, 4, 1, 1, 1);
      free(datas[0]);
      free(datas[1]);
   }


the result of res is 0
Back to top
View user's profile Send private message
moonlight



Joined: 26 Oct 2005
Posts: 567

PostPosted: Mon Sep 01, 2008 5:03 am    Post subject: Reply with quote

krosk wrote:
vlfGuiLoadResources don't work:
Code:
   char *names[2];
   void *datas[2];
   int types[2], sizes[2];

   names[0] = "tex_game";
   names[1] = "tex_sdwn_game";
   types[0] = types[1] = RCO_GRAPHIC;

   int res = vlfGuiLoadResources("flash0:/vsh/resource/topmenu_plugin.rco", 2, names, types, datas, sizes, NULL);
   if (res != 2)
   {   
      char buffer [50];
      int n;
      n = sprintf(buffer, "Error 1: %d", res);
      error1_text = vlfGuiAddText(354, 190, buffer);
      if (res > 0)
      {
         error2_text = vlfGuiAddText(354, 190, "Error 2");
         if (datas[0])
            free(datas[0]);
         if (datas[1])
            free(datas[1]);
      }
   }
   else
   {
      void *gme;
      vlfGuiAddShadowedPicture(&gme, datas[0], sizes[0], datas[1], sizes[1], 441, 4, 1, 1, 1);
      free(datas[0]);
      free(datas[1]);
   }


the result of res is 0


Since 3.71, topmenu_plugin doesn't contain that icon, but "topmenu_icon" instead. Also it is "tex_sdwf_game", not ""tex_sdwn_game"
Anb btw, using vlfGuiAddShadowedPictureResource directly is easier :p
Back to top
View user's profile Send private message
krosk



Joined: 24 Aug 2008
Posts: 21

PostPosted: Thu Sep 04, 2008 1:54 am    Post subject: Reply with quote

Moonlight, I'm using vlf and dvemgr, but when I connect the slim tv cable, I see on the tv a image like this:




Any way to fix it?
(I'm using components cable)
Back to top
View user's profile Send private message
Gh0st-UPMS



Joined: 17 Feb 2008
Posts: 23

PostPosted: Sat Sep 13, 2008 10:05 pm    Post subject: Reply with quote

Hi moonlight, just want to ask how do we use this function and what exactly does it do.

vlfGuiAddIntegerSpinControl

Thanks
Back to top
View user's profile Send private message
phobox



Joined: 24 Mar 2008
Posts: 140

PostPosted: Mon Sep 15, 2008 4:55 am    Post subject: Reply with quote

have a look into dc 7 source....
_________________
Ciao! from Italy
Back to top
View user's profile Send private message
Gh0st-UPMS



Joined: 17 Feb 2008
Posts: 23

PostPosted: Mon Sep 15, 2008 8:02 am    Post subject: Reply with quote

Already looked in the source and no mention of that function in there.



EDIT:
Found the spin stuff in the DC source, missed it first of all.


Last edited by Gh0st-UPMS on Tue Sep 16, 2008 4:22 am; edited 1 time in total
Back to top
View user's profile Send private message
Torch



Joined: 28 May 2008
Posts: 842

PostPosted: Mon Sep 15, 2008 12:30 pm    Post subject: Reply with quote

Any newer version which can be unloaded without crashing yet?
Back to top
View user's profile Send private message
moonlight



Joined: 26 Oct 2005
Posts: 567

PostPosted: Tue Sep 16, 2008 3:32 am    Post subject: Reply with quote

I will release this week a version with the unload problem fixed.
Back to top
View user's profile Send private message
phobox



Joined: 24 Mar 2008
Posts: 140

PostPosted: Mon Sep 22, 2008 12:04 am    Post subject: Reply with quote

it seems not to be possible to debug a vlf app with psplink..
am i right?

trying doing that, i see on the screen strange waves (black and white), a strange effect on the battery icon and the "psplink bootstrp.. etc ect" flashing on the screen...

how to solve that?

EDIT: here the screenshot
Back to top
View user's profile Send private message
a_noob



Joined: 17 Sep 2006
Posts: 97
Location: _start: jr 0xDEADBEEF

PostPosted: Tue Sep 23, 2008 12:02 am    Post subject: Reply with quote

looks like you arent clearing the screen to me.
_________________
Code:
.øOº'ºOø.
'ºOo.oOº'
Back to top
View user's profile Send private message AIM Address MSN Messenger
cory1492



Joined: 10 Dec 2004
Posts: 216

PostPosted: Tue Sep 23, 2008 1:42 pm    Post subject: Reply with quote

moonlight: is it possible to exitVsh back to pspbtdnf*.bin?
Back to top
View user's profile Send private message
Gh0st-UPMS



Joined: 17 Feb 2008
Posts: 23

PostPosted: Tue Sep 23, 2008 2:41 pm    Post subject: Reply with quote

phobox wrote:
it seems not to be possible to debug a vlf app with psplink..
am i right?

trying doing that, i see on the screen strange waves (black and white), a strange effect on the battery icon and the "psplink bootstrp.. etc ect" flashing on the screen...

how to solve that?

EDIT: here the screenshot


Looks like your trying to load a background image along with ReadFileAllocEx function. Might be wrong though as PSPlink works fine with VLF.
Back to top
View user's profile Send private message
moonlight



Joined: 26 Oct 2005
Posts: 567

PostPosted: Tue Sep 23, 2008 11:36 pm    Post subject: Reply with quote

cory1492 wrote:
moonlight: is it possible to exitVsh back to pspbtdnf*.bin?


No. That file is only loaded by the special ipl of DC7.
Back to top
View user's profile Send private message
cory1492



Joined: 10 Dec 2004
Posts: 216

PostPosted: Wed Sep 24, 2008 5:42 am    Post subject: Reply with quote

moonlight wrote:
cory1492 wrote:
moonlight: is it possible to exitVsh back to pspbtdnf*.bin?


No. That file is only loaded by the special ipl of DC7.

Figured as much. So the btcnf param is now discarded? :/ Thanks for the quick answer moonlight.
Back to top
View user's profile Send private message
moonlight



Joined: 26 Oct 2005
Posts: 567

PostPosted: Tue Sep 30, 2008 5:57 am    Post subject: Reply with quote

http://www.sendspace.com/file/br9qxh

Sorry for delay, here is the version with support for termination, additionally i have included some defined types to make the prototypes more readable, and fixed a very critical bug that leaked memory each time something was loaded from a resource; also negative heaps other than -1 can now be specified.

Note: to terminate vlf, you need to stop the vlf.prx module from other thread. Because it seems that system needs some memory for that, when specifying a negative heap, don't specify -1, specify at least (mmm well is negative, so at most :p) -640.

There is included a vshmain replace sample which simply does stupid things with the waves on button presses, and exit with start. To make it work: put vlf.prx, intrafont.prx (get it from other release), and vsh_load.prx in ms0:/seplugins; change the name of real vshmain to vshmain_real.prx, and copy the vshmain.prx replacement to flash0:/vsh/module

Note for those that want to make vshmain.prx replacements: it seems that heaparea1.prx and heaparea2.prx have allocated lot of memory and leaving very small amount of memory (after vlf load, and specifying -640, you have 2 MB only, more or less). If you really need more memory, replace those modules with dummys, and load/start the real ones before loading/starting the real vshmain.prx.

Next release will be the first official one. I'll try to add the most important things that are missing: checkboxes, ip spin control, scrollbar, lateral menu, inputbox, osk (atm using utility), png support, fix the custom background code, and document everything (probably I'm missing some control :p)
Back to top
View user's profile Send private message
Torch



Joined: 28 May 2008
Posts: 842

PostPosted: Tue Sep 30, 2008 7:10 pm    Post subject: Reply with quote

Thanks. Time to start coding.

mod = sceKernelLoadModule("flash0:/vsh/module/vshmain_real.prx", 0, NULL); doesn't work in a 0x800 mode module. In your sample the loader is 0x1000 mode where the above works.

Can you give some additional info on the heaparea?.prx ? At which point is it loaded? Is it safe to unload them in the replacement vshmain.prx?
Back to top
View user's profile Send private message
phobox



Joined: 24 Mar 2008
Posts: 140

PostPosted: Wed Oct 01, 2008 1:21 am    Post subject: Reply with quote

thanks very much, for both this and the future release...

i think that now we'll se new xmb replacement projects and so on.

a question for you, you talked about you may have lost some controls, is the content browser, let's say of music, a menu?

btw good work, keep on going!!
Back to top
View user's profile Send private message
krosk



Joined: 24 Aug 2008
Posts: 21

PostPosted: Wed Oct 01, 2008 5:23 am    Post subject: Reply with quote

This is a example of what can be done with that library:






At the moment is a really bad shell, but I think that I will do a good job :)

The developement thread:
http://www.elotrolado.net/hilo_alpha-release-xmb-shell_1085541
Back to top
View user's profile Send private message
phobox



Joined: 24 Mar 2008
Posts: 140

PostPosted: Wed Oct 01, 2008 6:10 am    Post subject: Reply with quote

since you haven't used iop.prx in your sample, is it still needed?
_________________
Ciao! from Italy
Back to top
View user's profile Send private message
moonlight



Joined: 26 Oct 2005
Posts: 567

PostPosted: Wed Oct 01, 2008 8:35 am    Post subject: Reply with quote

phobox wrote:
since you haven't used iop.prx in your sample, is it still needed?


mmm, yes, I just forgot. Maybe this last sample won't work in a normal 4.01 M33, but in one installed from DC (wher all files are written with 0777 permissions).
Back to top
View user's profile Send private message
Torch



Joined: 28 May 2008
Posts: 842

PostPosted: Wed Oct 01, 2008 2:32 pm    Post subject: Reply with quote

Are all these libs required for just the wave background??
-lpsppower -lpsprtc -lvlfgui -lvlfgu -lvlfutils -lvlflibc -lpspreg -lpspsystemctrl_user -lpspkubridge -lpspwlan

And is this still required or is the path set automatically now?

Code:
   char *path = (char *)argp;
   int last_trail = -1;
   int i;

   if (path)
   {
      for (i = 0; path[i]; i++)
      {
         if (path[i] == '/')
            last_trail = i;
      }
   }

   if (last_trail >= 0)
      path[last_trail] = 0;

   sceIoChdir(path);
   path[last_trail] = '/';


In the unload thread can't I just directly load vshmain_real.prx using kuKernelLoadModule or is there some problem with that?

EDIT: OK..Just understood that your freeing all the user memory and loading vshmain_real.prx from a kernel prx so that all memory is available to vshmain on startup.

Code:
static int end_thread(SceSize args, void *argp)
{
   sceKernelStopModule(vlf_mod, 0, NULL, NULL, NULL);
   sceKernelUnloadModule(vlf_mod);
   
   sceKernelStopModule(if_mod, 0, NULL, NULL, NULL);
   sceKernelUnloadModule(if_mod);

   // From here, you cannot use LIBC!

   SceUID mod = sceKernelLoadModule("ms0:/seplugins/vsh_loader.prx", 0, NULL);
   sceKernelStartModule(mod, MODNAME_LENGTH+1, MODNAME, NULL, NULL);
   
   return sceKernelExitDeleteThread(0);
}


I am detecting button presses using the sceCtrl functions in another thread. It works, but should that be avoided and should I use the VLF event handlers instead?

And I still don't understand what is LIBC T_T


Last edited by Torch on Wed Oct 01, 2008 2:59 pm; edited 1 time in total
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
Goto page Previous  1, 2, 3, 4, 5, 6, 7, 8, 9  Next
Page 4 of 9

 
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