Help, how to launch a UMD

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

Moderators: cheriff, TyRaNiD

Post Reply
valen_9
Posts: 8
Joined: Sun Dec 28, 2008 1:39 am

Help, how to launch a UMD

Post by valen_9 »

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
ne0h
Posts: 386
Joined: Thu Feb 21, 2008 2:15 am

Post by ne0h »

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

Code: Select all

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);
krosk
Posts: 21
Joined: Sun Aug 24, 2008 8:54 pm

Post by krosk »

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
valen_9
Posts: 8
Joined: Sun Dec 28, 2008 1:39 am

Post by valen_9 »

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

Code: Select all

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: Select all

#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&#40;"ReadUMD", 0, 1, 1&#41;;
PSP_MAIN_THREAD_ATTR&#40;THREAD_ATTR_USER&#41;;

int main&#40;int argc, char* argv&#91;&#93;&#41;
&#123;
    pspDebugScreenInit&#40;&#41;;
    pspDebugScreenPrintf&#40;"Presiona triangulo\n"&#41;;
    SceCtrlData pad;
    sceCtrlSetSamplingCycle&#40;0&#41;;
    sceCtrlSetSamplingMode&#40;0&#41;;
    while &#40;1&#41;
    &#123;
        sceCtrlReadBufferPositive&#40;&pad, 1&#41;;
        if &#40;pad.Buttons & PSP_CTRL_TRIANGLE&#41;
        &#123;
            struct SceKernelLoadExecVSHParam param; 
            int apitype = 0; 
            char *program = NULL; 
            char *mode = NULL; 

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

            memset&#40;&param, 0, sizeof&#40;param&#41;&#41;; 
            param.size = sizeof&#40;param&#41;; 
            param.args = strlen&#40;program&#41; + 1; 
            param.argp = program; 
            param.key = mode; 
            sctrlKernelLoadExecVSHWithApitype&#40;apitype, program, &param&#41;; 
            
        &#125;
                if &#40;pad.Buttons & PSP_CTRL_CROSS&#41;
        &#123;
            sceKernelExitGame&#40;&#41;;
            
        &#125;
        sceKernelDelayThread&#40;200*1000&#41;;
    &#125;

    return 0;
&#125;
ne0h
Posts: 386
Joined: Thu Feb 21, 2008 2:15 am

Post by ne0h »

Add lpspsystemctrl_user to your makefile, and post the compilation log...
Last edited by ne0h on Sun Dec 28, 2008 11:51 pm, edited 1 time in total.
BigProMaN
Posts: 16
Joined: Fri Aug 29, 2008 9:37 pm

Post by BigProMaN »

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.
valen_9
Posts: 8
Joined: Sun Dec 28, 2008 1:39 am

Post by valen_9 »

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

Code: Select all

                              Compilando... espere...

psp-gcc -I. -IC&#58;/PSPDev/psp/sdk/include -O2 -G0 -Wall -D_PSP_FW_VERSION=150  -L.
 -LC&#58;/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&#58;\pspdev\bin\..\lib\gcc\psp\4.1.0\..\..\..\..\psp\bin\ld.exe&#58; cannot find -lpsp
systemctrl_user
collect2&#58; ld returned 1 exit status
make&#58; *** &#91;ReadUMD.elf&#93; Error 1

                                      Terminado
It gives me this error when compiling. Thanks for the help you are giving me
ne0h
Posts: 386
Joined: Thu Feb 21, 2008 2:15 am

Post by ne0h »

Have a look in the 4.01 M33, there's a SDK folder! ;)
valen_9
Posts: 8
Joined: Sun Dec 28, 2008 1:39 am

Post by valen_9 »

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"
NoEffex
Posts: 106
Joined: Thu Nov 27, 2008 6:48 am

Post by NoEffex »

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
valen_9
Posts: 8
Joined: Sun Dec 28, 2008 1:39 am

Post by valen_9 »

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!!!!
Post Reply