PSP Pro GamerZ
Would you like to react to this message? Create an account in a few clicks or log in to continue.

PSP Pro GamerZ

For all your PSP Needs
AKA Team Unknown Forum
 
HomeLatest imagesRegisterLog in
---- Welcome to Team Unknown's official Forum, Don't forget to Register on the forum. Be sure to check out all of our projects such as uo DSONPSP and DigiPSP Also Check out our PSP Programming Tutorials Very Happy ----

 

 KaZ help me in vlf Please.

Go down 
2 posters
AuthorMessage
punker69




Posts : 3
Points : 5
Join date : 2011-04-15

KaZ help me in vlf Please. Empty
PostSubject: KaZ help me in vlf Please.   KaZ help me in vlf Please. EmptyFri Apr 15, 2011 7:57 am

in your Recovery Menu 0.2

if i press "CPU Speed" there will be another Menu apear



because i wanna make example.

char= items

6.XX OFW
5.XX OFW
4.XX OFW
3.XX OFW

so if i press 6.XX OFW

there will be a new menu appeared.

6.39
6.38
6.37
6.36
6.35
Back to top Go down
KaZ
Admin
KaZ


Posts : 131
Points : 204
Join date : 2010-09-20
Location : In The Sky

KaZ help me in vlf Please. Empty
PostSubject: Re: KaZ help me in vlf Please.   KaZ help me in vlf Please. EmptyThu Apr 21, 2011 4:30 am

Well Post your FULL CODE, i will HELP you fix it, i will not fix it but help you to fix it.
Back to top Go down
punker69




Posts : 3
Points : 5
Join date : 2011-04-15

KaZ help me in vlf Please. Empty
PostSubject: Re: KaZ help me in vlf Please.   KaZ help me in vlf Please. EmptyThu Apr 21, 2011 7:42 pm

Dont laugh at me Ok. I know its easy to change version.txt .I wanna Make more Cool





main.C



Code:
#include <pspsdk.h>
#include <pspkernel.h>
#include <pspdebug.h>
#include <pspctrl.h>
#include <psprtc.h>
#include <pspgu.h>
#include <pspgum.h>
#include <stdlib.h>
#include <stdio.h>
#include <vlf.h>



PSP_MODULE_INFO("Installer", 0x800, 1, 2);   
PSP_MAIN_THREAD_ATTR(0);

int MainMenu();


int Exit()
{
   sceKernelExitGame();
   return VLF_EV_RET_NOTHING;
}

int copyFile(char * src, char * dst) {
   SceUID srcID = sceIoOpen(src, PSP_O_RDONLY, 0777);
   SceUID dstID = sceIoOpen(dst, PSP_O_CREAT | PSP_O_WRONLY, 0777);

   char buffer[128 * 1024];
   int read_bytes = 0;

   if (srcID && dstID) {
      while ((read_bytes = sceIoRead(srcID, buffer, sizeof(buffer)))) {
         sceIoWrite(dstID, buffer, read_bytes);
      }
      sceIoClose(srcID);
      sceIoClose(dstID);
      return 0;
   } else {
      return -1;
   }
   return 0;
}

void Reassign() {  // Assign flashs
     
     
      sceIoUnassign("flash0:");
     
      sceIoAssign("flash0:", "lflash0:0,0", "flashfat0:", IOASSIGN_RDWR, NULL, 0);
     
     
  }
 
int OnMainMenuSelect(int sel)
{
   switch (sel)
   {
      case 0:
         {   
           
            vlfGuiCancelCentralMenu();
            vlfGuiAddText( 100, 110 ,"Install...\nPlease Wait...");  // Print
         sceKernelDelayThread(500);
         copyFile("639/version.txt", "ms0:/seplugins/version.txt");                   
            sceKernelDelayThread(5000);
            vlfGuiAddText( 100, 160 ,"Finished ! Exit with O");
         vlfGuiCustomBottomDialog("Exit", NULL, 1, 0, VLF_DEFAULT, Exit);
            return VLF_EV_RET_NOTHING;
         }
      break;
      
      case 1:
         {   
           
            vlfGuiCancelCentralMenu();
            vlfGuiAddText( 100, 110 ,"Install...\nPlease Wait...");  // Print
         sceKernelDelayThread(500);
         copyFile("638/version.txt", "ms0:/seplugins/version.txt");                   
            sceKernelDelayThread(5000);
            vlfGuiAddText( 100, 160 ,"Finished ! Exit with O");
         vlfGuiCustomBottomDialog("Exit", NULL, 1, 0, VLF_DEFAULT, Exit);
            return VLF_EV_RET_NOTHING;
         }
      break;

      case 2:
         {
            vlfGuiCancelCentralMenu();
            vlfGuiAddText( 100, 110 ,"Install...\nPlease Wait...");  // Print
         sceKernelDelayThread(500);
            copyFile("637/version.txt", "ms0:/seplugins/version.txt"); 
         vlfGuiCustomBottomDialog("Exit", NULL, 1, 0, VLF_DEFAULT, Exit);
            while (1)
            {
               vlfGuiDrawFrame();
            }
            return VLF_EV_RET_NOTHING;
         }
      break;
   
   
      case 3:
         {
            vlfGuiCancelCentralMenu();
            vlfGuiAddText( 100, 110 ,"Install...\nPlease Wait...");  // Print
         sceKernelDelayThread(500);
            copyFile("636/version.txt", "ms0:/seplugins/version.txt");
            vlfGuiCustomBottomDialog("Exit", NULL, 1, 0, VLF_DEFAULT, Exit);
         return VLF_EV_RET_NOTHING;
         }
      break;
      
      case 4:
         {
            vlfGuiCancelCentralMenu();
            vlfGuiAddText( 100, 110 ,"Install...\nPlease Wait...");  // Print
         sceKernelDelayThread(500);
            copyFile("635/version.txt", "ms0:/seplugins/version.txt");
            vlfGuiCustomBottomDialog("Exit", NULL, 1, 0, VLF_DEFAULT, Exit);
         return VLF_EV_RET_NOTHING;
         }
      break;
      
      case 5:
         {
            vlfGuiCancelCentralMenu();
            vlfGuiAddText( 100, 110 ,"Install...\nPlease Wait...");  // Print
         sceKernelDelayThread(500);
            copyFile("620/version.txt", "ms0:/seplugins/version.txt");
            vlfGuiCustomBottomDialog("Exit", NULL, 1, 0, VLF_DEFAULT, Exit);
         return VLF_EV_RET_NOTHING;
         }
      break;
      
      case 6:
         {
            vlfGuiCancelCentralMenu();
            vlfGuiAddText( 100, 110 ,"Install...\nPlease Wait...");  // Print
         sceKernelDelayThread(500);
            copyFile("610/version.txt", "ms0:/seplugins/version.txt");
            vlfGuiCustomBottomDialog("Exit", NULL, 1, 0, VLF_DEFAULT, Exit);
         return VLF_EV_RET_NOTHING;
         }
      break;
      
      

   }   
   
   return VLF_EV_RET_REMOVE_OBJECTS | VLF_EV_RET_REMOVE_HANDLERS;
}
int MainMenu(int sel)
{
   char *items[] =
   {
      "6.39 Version.txt",
       "6.38 Version.txt",
      "6.37 Version.txt",
      "6.36 Version.txt",
      "6.35 Version.txt",
      "6.20 Version.txt",
      "6.10 Version.txt",
      "5.XX Version.txt",
   };
          
   vlfGuiCentralMenu(7, items, sel, OnMainMenuSelect, 0, 0);
   vlfGuiSetPageControlEnable(1);
   vlfGuiSetRectangleVisibility( 0, 230, 480, 5, 0);
   return VLF_EV_RET_NOTHING;

}



int Title()
{
   vlfGuiSetModelSystem();
   vlfGuiSetBackgroundSystem(1);
   vlfGuiSetTitleBar(vlfGuiAddText( 0, 0 ,"Punker69 Easy Version.txt Changer"), NULL, 1, 1);
   vlfGuiAddBatteryIconSystem(10*1000*1000);
   vlfGuiAddClock();
   vlfGuiSetPageControlEnable(0);
   MainMenu(0);
   
   while (1)
   {
      vlfGuiDrawFrame();
   }
return VLF_EV_RET_NOTHING;
}


IF You can see There a 5.XX but i dont know how to add another Menu.
Back to top Go down
KaZ
Admin
KaZ


Posts : 131
Points : 204
Join date : 2010-09-20
Location : In The Sky

KaZ help me in vlf Please. Empty
PostSubject: Re: KaZ help me in vlf Please.   KaZ help me in vlf Please. EmptyFri Apr 22, 2011 9:11 am

Your submenu and Menu are not connected. Please Correct it Smile
Also Post the Makefile
Back to top Go down
punker69




Posts : 3
Points : 5
Join date : 2011-04-15

KaZ help me in vlf Please. Empty
PostSubject: Re: KaZ help me in vlf Please.   KaZ help me in vlf Please. EmptySat Apr 23, 2011 9:27 pm

Makefile

Code:
TARGET = sample
OBJS = crt0.o main.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 -lvlflibc

PSP_FW_VERSION = 271

EXTRA_TARGETS = EBOOT.PBP
PSP_EBOOT_TITLE = Easy Version.txt Changer

BUILD_PRX = 1
PSP_LARGE_MEMORY = 1

PSPSDK=$(shell psp-config --pspsdk-path)
include ./build.mak


So if i click 5.XX version.txt there will be another menu

it should be " 5.50"
5.03"
"5.00"
etc....
Back to top Go down
Sponsored content





KaZ help me in vlf Please. Empty
PostSubject: Re: KaZ help me in vlf Please.   KaZ help me in vlf Please. Empty

Back to top Go down
 
KaZ help me in vlf Please.
Back to top 
Page 1 of 1

Permissions in this forum:You cannot reply to topics in this forum
PSP Pro GamerZ :: PSP :: C++ Tutorials/OSLIB/MIPS/Programming-
Jump to: