| View previous topic :: View next topic |
| Author |
Message |
Stewie87
Joined: 03 Apr 2008 Posts: 39
|
Posted: Wed May 28, 2008 7:24 am Post subject: Launch ISO/CSO using C code... |
|
|
Hi guys, sorry for the disturb (and my very bad english!) :P
I need your help (again :P) ^__^
I want to launch an ISO/CSO from my program.
I used this code but PSP freeze and then crash:
| Code: |
void loadingUMD()
{
sceKernelDelayThread(1000);
struct SceKernelLoadExecVSHParam param;
sceUmdActivate(1, "disc0:");
sceUmdWaitDriveStat(UMD_WAITFORINIT);
memset(¶m, 0, sizeof(param));
param.key = "game";
param.size = sizeof(param);
nkThreadResume(sceKernelGetThreadId());
strcpy(file, "disc0:/PSP_GAME/SYSDIR/EBOOT.BIN");
sctrlKernelLoadExecVSHDisc(file, NULL);
sceKernelExitDeleteThread(0);
}
void loadingISOfile()
{
sctrlSEUmountUmd();
sctrlSESetDiscOut(1);
sctrlSESetDiscType(0x10);
sctrlSEMountUmdFromFile("ms0:/ISO/Spinout.iso",1,1);
//sctrlSESetUmdFile(bpath);
loadingUMD();
} |
Any idea or suggestion?
I hope in your help, please :)
Bye and thank to all who answer me ;) |
|
| Back to top |
|
 |
jas0nuk
Joined: 27 Apr 2006 Posts: 137
|
Posted: Wed May 28, 2008 7:43 am Post subject: |
|
|
strcpy(file, "disc0:/PSP_GAME/SYSDIR/EBOOT.BIN");
This could cause an issue... how big is "file"? |
|
| Back to top |
|
 |
Stewie87
Joined: 03 Apr 2008 Posts: 39
|
Posted: Wed May 28, 2008 7:52 am Post subject: |
|
|
| jas0nuk wrote: | strcpy(file, "disc0:/PSP_GAME/SYSDIR/EBOOT.BIN");
This could cause an issue... how big is "file"? |
But i tried also with:
| Code: | | sctrlKernelLoadExecVSHDisc("disc0:/PSP_GAME/SYSDIR/EBOOT.BIN", NULL); |
And always crash :'( |
|
| Back to top |
|
 |
Stewie87
Joined: 03 Apr 2008 Posts: 39
|
Posted: Wed May 28, 2008 8:37 am Post subject: |
|
|
I solve the freeze and crash with this new code:
| Code: | void load_UMD()
{
sceKernelDelayThread(500000);
struct SceKernelLoadExecVSHParam param;
const char target[33] = "disc0:/PSP_GAME/SYSDIR/EBOOT.BIN";
if(sceUmdCheckMedium(0)!=0)
{
sceUmdActivate(1, "disc0:");
sceUmdWaitDriveStat(UMD_WAITFORINIT);
memset(¶m, 0, sizeof(param));
param.key = "game";
param.size = sizeof(param);
param.args = strlen(target)+1;
param.argp = target;
sctrlKernelLoadExecVSHDisc(target, ¶m);
sceKernelExitDeleteThread(0);
}
}
void load_ISO()
{
sctrlSEUmountUmd();
sctrlSESetDiscOut(1);
sctrlSESetDiscType(0x10);
sctrlSEMountUmdFromFile("ms0:/ISO/Spinout.iso",1,1);
load_UMD();
} |
But now PSP return to dashboard in few seconds :(
Where I wrong? |
|
| Back to top |
|
 |
kid101skater
Joined: 20 Jun 2007 Posts: 26
|
Posted: Wed May 28, 2008 5:55 pm Post subject: |
|
|
| Stewie87 wrote: | I solve the freeze and crash with this new code:
| Code: | void load_UMD()
{
sceKernelDelayThread(500000);
struct SceKernelLoadExecVSHParam param;
const char target[33] = "disc0:/PSP_GAME/SYSDIR/EBOOT.BIN";
if(sceUmdCheckMedium(0)!=0)
{
sceUmdActivate(1, "disc0:");
sceUmdWaitDriveStat(UMD_WAITFORINIT);
memset(¶m, 0, sizeof(param));
param.key = "game";
param.size = sizeof(param);
param.args = strlen(target)+1;
param.argp = target;
sctrlKernelLoadExecVSHDisc(target, ¶m);
sceKernelExitDeleteThread(0);
}
}
void load_ISO()
{
sctrlSEUmountUmd();
sctrlSESetDiscOut(1);
sctrlSESetDiscType(0x10);
sctrlSEMountUmdFromFile("ms0:/ISO/Spinout.iso",1,1);
load_UMD();
} |
But now PSP return to dashboard in few seconds :(
Where I wrong? |
umm i think it would have to be because right at the end of loadumd you have scekernelexit... basicly causing a deletion of the thread forcing a return to the xmb... try it without sceKernelExitDeleteThread |
|
| Back to top |
|
 |
adrahil
Joined: 16 Mar 2006 Posts: 277
|
|
| Back to top |
|
 |
Stewie87
Joined: 03 Apr 2008 Posts: 39
|
Posted: Wed May 28, 2008 9:08 pm Post subject: |
|
|
I use my ISOs, taken from my UMDs, so I don't think that there is a copyright violation, no? :S
If also in this case there is a copyright violation I'm sorry :( |
|
| Back to top |
|
 |
kid101skater
Joined: 20 Jun 2007 Posts: 26
|
Posted: Thu May 29, 2008 11:05 am Post subject: |
|
|
| Hey man... did my advice helpz? |
|
| Back to top |
|
 |
Stewie87
Joined: 03 Apr 2008 Posts: 39
|
Posted: Thu May 29, 2008 11:18 am Post subject: |
|
|
| kid101skater wrote: | | Hey man... did my advice helpz? |
I tried your suggestion but it does not work yet...
But how the creators of all alternative shells do?! uff :( |
|
| Back to top |
|
 |
adrahil
Joined: 16 Mar 2006 Posts: 277
|
Posted: Fri May 30, 2008 5:31 pm Post subject: |
|
|
Well, although I heavily doubt what you're saying, I'll leave you the benefit of the doubt...
It is a copyright violation to make *backup* copies of them - in most countries. Unless you live in russia or some lost archipel such as Tokelau, you should have read the EULA more carefully :) |
|
| Back to top |
|
 |
|