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 

Help, how to launch a UMD

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



Joined: 28 Dec 2008
Posts: 8

PostPosted: Sun Dec 28, 2008 1:44 am    Post subject: Help, how to launch a UMD Reply with quote

Hello good, forgiveness for my English esque español.Estoy'm doing a program. A shell and not as a launching UMD I tried anyway, but nothing. Please give me a code to be able to launch the UMD
Back to top
View user's profile Send private message
ne0h



Joined: 21 Feb 2008
Posts: 386

PostPosted: Sun Dec 28, 2008 2:59 am    Post subject: Reply with quote

You have to launch EBOOT.BIN.
Here is an example, here I'm using sctrlKernelLoadExecVSHWithApitype but there's some others ways...
Code:

struct SceKernelLoadExecVSHParam param;
int apitype = 0;
char *program = NULL;
char *mode = NULL;

apitype = 0x120;
program = "disc0:/PSP_GAME/SYSDIR/EBOOT.BIN";
mode = "game";

memset(&param, 0, sizeof(param));
param.size = sizeof(param);
param.args = strlen(program) + 1;
param.argp = program;
param.key = mode;

sctrlKernelLoadExecVSHWithApitype(apitype, program, &param);

_________________
Get Xplora!
Back to top
View user's profile Send private message
krosk



Joined: 24 Aug 2008
Posts: 21

PostPosted: Sun Dec 28, 2008 7:01 am    Post subject: Reply with quote

Quote:
Hello good, forgiveness for my English esque español.Estoy'm doing a program. A shell and not as a launching UMD I tried anyway, but nothing. Please give me a code to be able to launch the UMD

This is a english forum, anyway you can ask in spanish HERE

Esto es un foro inglés, de todas formas puedes preguntar en castellano AQUI
Back to top
View user's profile Send private message
valen_9



Joined: 28 Dec 2008
Posts: 8

PostPosted: Sun Dec 28, 2008 9:52 pm    Post subject: Reply with quote

ne0h wrote:
You have to launch EBOOT.BIN.
Here is an example, here I'm using sctrlKernelLoadExecVSHWithApitype but there's some others ways...
Code:

struct SceKernelLoadExecVSHParam param;
int apitype = 0;
char *program = NULL;
char *mode = NULL;

apitype = 0x120;
program = "disc0:/PSP_GAME/SYSDIR/EBOOT.BIN";
mode = "game";

memset(&param, 0, sizeof(param));
param.size = sizeof(param);
param.args = strlen(program) + 1;
param.argp = program;
param.key = mode;

sctrlKernelLoadExecVSHWithApitype(apitype, program, &param);



Thank you very much and what you provare story. Many thanks

Editorial: Do not get me compile. I have to add something in the makefile? I leave with you my main and tell me if I have something wrong Thanks

Code:
#include <pspkernel.h>
#include <pspdisplay.h>
#include <pspdebug.h>
#include <pspctrl.h>
#include <pspumd.h>

#include <string.h>
#include <psploadexec.h>
#include <psploadexec_kernel.h>


PSP_MODULE_INFO("ReadUMD", 0, 1, 1);
PSP_MAIN_THREAD_ATTR(THREAD_ATTR_USER);

int main(int argc, char* argv[])
{
    pspDebugScreenInit();
    pspDebugScreenPrintf("Presiona triangulo\n");
    SceCtrlData pad;
    sceCtrlSetSamplingCycle(0);
    sceCtrlSetSamplingMode(0);
    while (1)
    {
        sceCtrlReadBufferPositive(&pad, 1);
        if (pad.Buttons & PSP_CTRL_TRIANGLE)
        {
            struct SceKernelLoadExecVSHParam param;
            int apitype = 0;
            char *program = NULL;
            char *mode = NULL;

            apitype = 0x120;
            program = "disc0:/PSP_GAME/SYSDIR/EBOOT.BIN";
            mode = "game";

            memset(&param, 0, sizeof(param));
            param.size = sizeof(param);
            param.args = strlen(program) + 1;
            param.argp = program;
            param.key = mode;
            sctrlKernelLoadExecVSHWithApitype(apitype, program, &param);
           
        }
                if (pad.Buttons & PSP_CTRL_CROSS)
        {
            sceKernelExitGame();
           
        }
        sceKernelDelayThread(200*1000);
    }

    return 0;
}
Back to top
View user's profile Send private message
ne0h



Joined: 21 Feb 2008
Posts: 386

PostPosted: Sun Dec 28, 2008 11:28 pm    Post subject: Reply with quote

Add lpspsystemctrl_user to your makefile, and post the compilation log...
_________________
Get Xplora!


Last edited by ne0h on Sun Dec 28, 2008 11:51 pm; edited 1 time in total
Back to top
View user's profile Send private message
BigProMaN



Joined: 29 Aug 2008
Posts: 16

PostPosted: Sun Dec 28, 2008 11:31 pm    Post subject: Reply with quote

What error did you get ?
You must link-lpspsystemctrl_user to the makefile, or lpspsystemctrl_kernel if you are in Kernel Mode.

EDIT : ne0h answered before me ^^
_________________
Excuse me for my English, I'm French.
Back to top
View user's profile Send private message
valen_9



Joined: 28 Dec 2008
Posts: 8

PostPosted: Mon Dec 29, 2008 12:30 am    Post subject: Reply with quote

ne0h wrote:
Add lpspsystemctrl_user to your makefile, and post the compilation log...


Code:

                              Compilando... espere...

psp-gcc -I. -IC:/PSPDev/psp/sdk/include -O2 -G0 -Wall -D_PSP_FW_VERSION=150  -L.
 -LC:/PSPDev/psp/sdk/lib   main.o -lpspumd -lpspsystemctrl_user  -lpspdebug -lps
pdisplay -lpspge -lpspctrl -lpspsdk -lc -lpspnet -lpspnet_inet -lpspnet_apctl -l
pspnet_resolver -lpsputility -lpspuser -lpspkernel -o ReadUMD.elf
c:\pspdev\bin\..\lib\gcc\psp\4.1.0\..\..\..\..\psp\bin\ld.exe: cannot find -lpsp
systemctrl_user
collect2: ld returned 1 exit status
make: *** [ReadUMD.elf] Error 1

                                      Terminado


It gives me this error when compiling. Thanks for the help you are giving me
Back to top
View user's profile Send private message
ne0h



Joined: 21 Feb 2008
Posts: 386

PostPosted: Mon Dec 29, 2008 3:41 am    Post subject: Reply with quote

Have a look in the 4.01 M33, there's a SDK folder! ;)
_________________
Get Xplora!
Back to top
View user's profile Send private message
valen_9



Joined: 28 Dec 2008
Posts: 8

PostPosted: Mon Dec 29, 2008 5:56 am    Post subject: Reply with quote

ne0h wrote:
Have a look in the 4.01 M33, there's a SDK folder! ;)

Do not understand. You mean I need a library? Thanks for your patience and understanding

Editorial: Sorry, you already know what you mean, but they put the folder "SDK"
Back to top
View user's profile Send private message
NoEffex



Joined: 27 Nov 2008
Posts: 108

PostPosted: Mon Dec 29, 2008 6:40 am    Post subject: Reply with quote

Download 4.01 m33. Check in the SDK folder. Open up a terminal(or window if you're using cygwin) in the SDK folder, and

cp -rf lib $PSPDEV/psp/sdk && cp -rf include $PSPDEV/psp/sdk

and overwrite all of them.

Then, if you want you can install psp-packer by going into the psp-packer directory, then the src directory, and

make && cp psp-packer $PSPDEV/bin

or on windows, just copy psp-packer.exe in the bin directory in the psp-packer directory to $PSPDEV/bin.


EDIT: You edited after I typed this :(
_________________
Programming with:
Geany + Latest PSPSDK from svn
Back to top
View user's profile Send private message
valen_9



Joined: 28 Dec 2008
Posts: 8

PostPosted: Mon Dec 29, 2008 8:19 pm    Post subject: Reply with quote

NoEffex wrote:
Download 4.01 m33. Check in the SDK folder. Open up a terminal(or window if you're using cygwin) in the SDK folder, and

cp -rf lib $PSPDEV/psp/sdk && cp -rf include $PSPDEV/psp/sdk

and overwrite all of them.

Then, if you want you can install psp-packer by going into the psp-packer directory, then the src directory, and

make && cp psp-packer $PSPDEV/bin

or on windows, just copy psp-packer.exe in the bin directory in the psp-packer directory to $PSPDEV/bin.


EDIT: You edited after I typed this :(


I compile a thousand thanks to all of you!!!

thanks!!! thanks!!!!
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