| View previous topic :: View next topic |
| Author |
Message |
Vampire
Joined: 12 Apr 2005 Posts: 138
|
Posted: Wed Jun 15, 2005 8:34 am Post subject: Load ELF files with sceKernelLoadExec |
|
|
| Code: | | STUB_FUNC 0xBD2F1094 sceKernelLoadExec |
| Code: | | void sceKernelLoadExec(const char *file, int zero); |
| Code: | | sceKernelLoadExec("disc0:/PSP_GAME/SYSDIR/BOOT.BIN", 0); |
|
|
| Back to top |
|
 |
Lex
Joined: 11 May 2005 Posts: 27 Location: Germany
|
Posted: Wed Jun 15, 2005 8:47 am Post subject: |
|
|
Hi Vampire,
what do you think about booting from MS :-; with this:
0x27932388 sceKernelBootFrom |
|
| Back to top |
|
 |
chaos
Joined: 10 Apr 2005 Posts: 135
|
Posted: Wed Jun 15, 2005 4:37 pm Post subject: |
|
|
so i remember reading someone was able to call the thread sleep fucntion using an overflow in the browser.. what about calling this function instead? you'd have to get the variables on the stack first, i guess? _________________ Chaosmachine Studios: High Quality Homebrew. |
|
| Back to top |
|
 |
laichung
Joined: 06 May 2005 Posts: 123
|
Posted: Thu Jun 16, 2005 11:29 am Post subject: Re: Load ELF files with sceKernelLoadExec |
|
|
I think these functions have same features with secKernelLoadExec
| Code: |
sceKernelLoadModule(name, 0, NULL)
sceKernelStartModule(uid, 0, NULL, &res, NULL)
sceKernelQueryModuleInfo(uid, &info)
|
Load Module can load PRX and ELF. This may be useful for making a REAL Loader for 1.x firmware. But still have a long way to go ~
Thx |
|
| Back to top |
|
 |
Cpasjuste
Joined: 29 May 2005 Posts: 214
|
Posted: Thu Jun 16, 2005 12:50 pm Post subject: |
|
|
| Vampire did u try to load ms0:/PSP_GAME/SYSDIR/BOOT.BIN |
|
| Back to top |
|
 |
ooPo Site Admin
Joined: 17 Jan 2004 Posts: 2032 Location: Canada
|
Posted: Thu Jun 16, 2005 2:27 pm Post subject: |
|
|
Cpasjuste:
Let's stop trying to load games from the memorycard, shall we?
You know, before the rules state I kick some arses. |
|
| Back to top |
|
 |
chaos
Joined: 10 Apr 2005 Posts: 135
|
Posted: Thu Jun 16, 2005 3:05 pm Post subject: |
|
|
why not just delete the post if you're going to get rid of the example code? _________________ Chaosmachine Studios: High Quality Homebrew. |
|
| Back to top |
|
 |
ooPo Site Admin
Joined: 17 Jan 2004 Posts: 2032 Location: Canada
|
Posted: Thu Jun 16, 2005 3:17 pm Post subject: |
|
|
| Nothing was edited out. The post remains a virgin. |
|
| Back to top |
|
 |
chaos
Joined: 10 Apr 2005 Posts: 135
|
Posted: Thu Jun 16, 2005 3:25 pm Post subject: |
|
|
odd. i know there was more text when i read it this morning. _________________ Chaosmachine Studios: High Quality Homebrew. |
|
| Back to top |
|
 |
ooPo Site Admin
Joined: 17 Jan 2004 Posts: 2032 Location: Canada
|
Posted: Thu Jun 16, 2005 3:38 pm Post subject: |
|
|
Well, if there was... it wasn't me who removed it.
I can't say I notice anything missing, though. |
|
| Back to top |
|
 |
Cpasjuste
Joined: 29 May 2005 Posts: 214
|
Posted: Thu Jun 16, 2005 10:51 pm Post subject: |
|
|
Yes sorry my mistake ... will not happen again.
I dont know where i could ask this questions so i put them here .. i would like to ask if we already know the function to load and play a mp4 file from ms0 so i could call it in my little prog. If yes a sample code would be very apreciate, if no i would like to know why it cant be done actually.
Last edited by Cpasjuste on Fri Jun 17, 2005 12:26 am; edited 1 time in total |
|
| Back to top |
|
 |
subbie
Joined: 05 May 2005 Posts: 122
|
Posted: Thu Jun 16, 2005 11:37 pm Post subject: |
|
|
| I'm Currious. What do you think are the posibilitys of in an external program changing the clock speed to 333 then using this function to execute a game or a demo? Think it would stick or be reseted back to 222? |
|
| Back to top |
|
 |
santosdominic
Joined: 07 Jun 2005 Posts: 3
|
Posted: Fri Jun 17, 2005 1:44 am Post subject: |
|
|
| Reset I would say. Since the games are made with a function in them that automatically sets it at 222MHz instead of 333MHz. It's how sony capped the processor speed, by building into the dev-kit thingy. |
|
| Back to top |
|
 |
subbie
Joined: 05 May 2005 Posts: 122
|
Posted: Fri Jun 17, 2005 4:57 am Post subject: |
|
|
sorry if this sounds piracy wise but its in good meaning.
Does it fully work with letting you execute the boot bin on the umd? Like have you tested it and it work? I am currious if this could be used as a method to make a 1.51 game boot around. So people with a 1.0 can still play UMD games that require the 1.51 or 1.52 firmware (unless there ends up being too much modified via firmware for the 1.0 firmware to be able to handle it, as well if it really will alow it to bypass the 1.51 check the bios does when the game is inserted). |
|
| Back to top |
|
 |
Yoshihiro

Joined: 14 May 2005 Posts: 12
|
Posted: Fri Jun 17, 2005 10:54 pm Post subject: |
|
|
hi that work just your call with the void* it's wrong you cant run nothing with .
| Code: |
typedef struct LoadELF{
unsigned int size;
void *unknow;
}LoadELF;
int sceKernelLoadExec(const char *appzpath, LoadELF *unknow);
//you can use it like that
sceKernelLoadExec("ms0:/psp/game/test/my_exec.elf",0);
|
now you can add in your main :=)
| Code: |
ctrl_data_t mypad;
void ReturnToLauncher()
{
if((mypad.buttons & CTRL_LTRIGGER&&mypad.buttons & CTRL_RTRIGGER&&mypad.buttons & CTRL_START))
{
sceKernelLoadExec("ms0:/psp/game/test/my_exec.elf",0);
}
// for return under your launcher for load another ELF without reboot
}
|
..::Yoshihiro::.. _________________
.jpg) |
|
| Back to top |
|
 |
MrSiir[S]
Joined: 14 Sep 2004 Posts: 32
|
Posted: Sat Jun 18, 2005 12:38 am Post subject: |
|
|
| Yoshihiro wrote: | | Code: | //you can use it like that
sceKernelLoadExec("ms0:/psp/game/test/my_exec.elf",0); |
|
This don't work in 1.5 PSP, i get 80020146 error. |
|
| Back to top |
|
 |
Vampire
Joined: 12 Apr 2005 Posts: 138
|
Posted: Sat Jun 18, 2005 2:13 am Post subject: |
|
|
| Yoshihiro wrote: | | hi that work just your call with the void* it's wrong you cant run nothing with . |
sorry, but there is no difference... |
|
| Back to top |
|
 |
0xdeadface
Joined: 31 May 2005 Posts: 62
|
Posted: Sat Jun 18, 2005 2:31 am Post subject: |
|
|
Yoshihiro, did you actually test this from MS?
I've had more luck loading executable code from UMD (that's to say, without it returning an error code) than from MS.
0xdf |
|
| Back to top |
|
 |
mrbrown
Joined: 17 Jan 2004 Posts: 1536
|
Posted: Sat Jun 18, 2005 3:11 am Post subject: |
|
|
It won't work from the memory stick, that error code means "invalid device".
We had a similiar call on the PS2, that wouldn't work from memory cards, and we had to patch it to get it working for memory cards. |
|
| Back to top |
|
 |
steddy
Joined: 04 Apr 2005 Posts: 139
|
Posted: Sun Jun 19, 2005 4:01 am Post subject: |
|
|
Have you tried this from a thread running in kernel mode? It may behave diffrently then. After all, the VSH has to be able to load it this way from an EBOOT.PBP.
Steddy |
|
| Back to top |
|
 |
Warren
Joined: 24 Jan 2004 Posts: 173 Location: San Diego, CA
|
Posted: Sun Jun 19, 2005 7:27 am Post subject: |
|
|
So uhh where are you guys getting these error codes from?
If I missed a post about this can someone link me? |
|
| Back to top |
|
 |
gotxp
Joined: 19 Jun 2005 Posts: 11
|
Posted: Sun Jun 19, 2005 7:37 am Post subject: |
|
|
these error codes are listed in the kerror.h... (this is a header from the leaked SDK lib)... however, dont ask for the file b/c it is illegal _________________ See The Future... Feel The Future... |
|
| Back to top |
|
 |
TyRaNiD
Joined: 18 Jan 2004 Posts: 918
|
Posted: Sun Jun 19, 2005 7:45 am Post subject: |
|
|
| Then don't post them here as it could be construed as just as illegal. |
|
| Back to top |
|
 |
gotxp
Joined: 19 Jun 2005 Posts: 11
|
Posted: Sun Jun 19, 2005 7:49 am Post subject: |
|
|
the error codes wouldnt be considered illegal because they are more reference knowledge... It would be the same way as if you tested different things to learn how the errors work... _________________ See The Future... Feel The Future... |
|
| Back to top |
|
 |
0xdeadface
Joined: 31 May 2005 Posts: 62
|
Posted: Sun Jun 19, 2005 8:01 am Post subject: |
|
|
"the error codes wouldnt be considered illegal because they are more reference knowledge... It would be the same way as if you tested different things to learn how the errors work..."
They were obtained illegally, and reverse engineering the meaning of some error codes is nearly impossible (because they could be mapped to custom processor responses...say encryption modules).
Reconstructing the meaning of error messages by testing, given the quite impressive amount of error messages there is would be near insane, you'd be better off dumping and examining the code returning those error codes.
But don't say they're not illegal, they are, and if they indeed can be reconstructed as easy as you say then they don't need to be posted from leaked source.
Of course, the cat's out of the bag regardless so the pondering is pointless, but don't use flawed logic to justify something illegal.
Just my 2 cents.
0xdf |
|
| Back to top |
|
 |
TyRaNiD
Joined: 18 Jan 2004 Posts: 918
|
Posted: Sun Jun 19, 2005 8:04 am Post subject: |
|
|
| Knowing the error code values is one thing, knowing their real names is another. Now sometimes people embed them in executables such as in print statements so we can tell from that, however if they are just copy and pasted from the SDK docs then they are likely illegal. But then I am not a lawyer. |
|
| Back to top |
|
 |
Drakonite Site Admin

Joined: 17 Jan 2004 Posts: 989
|
Posted: Sun Jun 19, 2005 8:05 am Post subject: |
|
|
Error code posts taken from official SDK removed.
steddy, brad_irc, you two are on my watch list. If you give me ANY further reason I will not hesitate to ban either/both of you. _________________ Shoot Pixels Not People!
Makeshift Development |
|
| Back to top |
|
 |
gotxp
Joined: 19 Jun 2005 Posts: 11
|
Posted: Sun Jun 19, 2005 8:22 am Post subject: |
|
|
| TyRaNiD wrote: | | Knowing the error code values is one thing, knowing their real names is another. Now sometimes people embed them in executables such as in print statements so we can tell from that, however if they are just copy and pasted from the SDK docs then they are likely illegal. But then I am not a lawyer. |
yea, I agree. If they are just copy and pasted it would be illegal. However, saying: 'oh, that error code means invalid prx'. that would be different... _________________ See The Future... Feel The Future... |
|
| Back to top |
|
 |
mrbrown
Joined: 17 Jan 2004 Posts: 1536
|
Posted: Sun Jun 19, 2005 11:09 am Post subject: |
|
|
| gotxp wrote: | | yea, I agree. If they are just copy and pasted it would be illegal. However, saying: 'oh, that error code means invalid prx'. that would be different... |
Whatever - it's against the rules to provide any information you obtained from the SDK. We clearly state that, so we avoid any grey-area legal entanglements. We don't need to get into a whole legal thing, since this is part of the site rules. gotxp you haven't really contributed anything since you've been here. I think you would probably do better somewhere else.
I banned one person yesterday for blantantly disregarding the rules w.r.t the official SDK. Looks like I need to make more examples out of more folks. gotxp has been banned.
If anyone else wants to try posting information obtained from the official SDK, I will ban you outright. _________________ "He was warned..." |
|
| Back to top |
|
 |
djhuevo
Joined: 10 Mar 2005 Posts: 47
|
Posted: Tue Jun 21, 2005 4:39 pm Post subject: |
|
|
| MrSiir[S] wrote: | | Yoshihiro wrote: | //you can use it like that
sceKernelLoadExec("ms0:/psp/game/test/my_exec.elf",0); |
This don't work in 1.5 PSP, i get 80020146 error. |
to load executables from ms in 1.5 PSP you need to set the kernel mode flag in module info and run sceKernelLoadExec from a thread with flags 0x0000 (0x8000 don't work).
dunno if is the same in 1.0 PSP _________________ sobreviviendo en la tierra de los trolldev |
|
| Back to top |
|
 |
|