 |
forums.ps2dev.org Homebrew PS2, PSP & PS3 Development Discussions
|
| View previous topic :: View next topic |
| Author |
Message |
Turulo
Joined: 18 Jan 2008 Posts: 2
|
Posted: Fri Jan 18, 2008 3:48 am Post subject: [SOLVED] sctrlKernelLoadExecVSHMs4() usage? |
|
|
Hi,
I'm trying to load some POPs from a hombrew without success. I keep getting 8002014E error...
This is the code which im using.
main.c:
| Code: | #include <stdio.h>
#include "systemctrl.h"
PSP_MODULE_INFO("usbpops", 0x1000, 1, 1);
int test_thread(SceSize args, void *argp)
{
char file[256];
strcpy(file, "ms0:/psp/game/sles01760/eboot.pbp");
struct SceKernelLoadExecVSHParam param;
memset(¶m, 0, sizeof(param));
param.key = "game";
param.size = sizeof(param);
param.args = strlen(file)+1;
param.argp = file;
sctrlKernelLoadExecVSHMs4(file, ¶m);
//sctrlKernelLoadExecVSHMs4(file, NULL);
sceKernelExitDeleteThread(0);
return 0;
}
int module_start(SceSize args, void *argp)
{
int thid = sceKernelCreateThread("loadExecVSHMs4Thread", test_thread, 14, 0x3000, 0, NULL);
if(thid >= 0) sceKernelStartThread(thid, args, argp);
sceKernelExitDeleteThread(0);
return 0;
} |
Makefile:
| Code: | TARGET = usbpops
OBJS = main.o
# Define to build this as a prx (instead of a static elf)
#PRX_EXPORTS=exports.exp
BUILD_PRX=1
#PSP_FW_VERSION = 371
# Define the name of our custom exports (minus the .exp extension)
USE_KERNEL_LIBC=1
USE_KERNEL_LIBS=1
CFLAGS = -Os -G0 -Wall -fno-strict-aliasing -fno-builtin-printf
CXXFLAGS = $(CFLAGS) -fno-exceptions -fno-rtti
ASFLAGS = $(CFLAGS)
INCDIR = include
LIBDIR = lib
LDFLAGS = -mno-crt0 -nostartfiles
LIBS = -lpspsystemctrl_kernel
EXTRA_TARGETS = EBOOT.PBP
PSP_EBOOT_TITLE = usbpops
PSPSDK=$(shell psp-config --pspsdk-path)
include $(PSPSDK)/lib/build.mak |
I don't know what I'm doing wrong, as the sctrlKernelLoadExecVSHMs4 isn't documented anywhere...
Using that code, if i call sctrlKernelLoadExecVSHMs2() to load a standard homebrew works fine, but not for a PSX EBOOT using sctrlKernelLoadExecVSHMs4().
Any hints? |
|
| Back to top |
|
 |
Turulo
Joined: 18 Jan 2008 Posts: 2
|
Posted: Fri Jan 18, 2008 9:16 pm Post subject: |
|
|
After looking strings from some others people .prx to load pops i found they use the key "pops" for SceKernelLoadExecVSHParam structure.
Also there is a strange behavior white the filename string... the "eboot.pbp" string must be uppercase, otherwise it wont load...
Here is a working code
| Code: |
#include <stdio.h>
#include "systemctrl.h"
PSP_MODULE_INFO("usbpops", 0x1000, 1, 1);
int test_thread(SceSize args, void *argp)
{
char file[256];
strcpy(file, "ms0:/psp/game/sles01760/EBOOT.PBP");
struct SceKernelLoadExecVSHParam param;
memset(¶m, 0, sizeof(param));
param.key = "pops";
param.size = sizeof(param);
param.args = strlen(file)+1;
param.argp = file;
sctrlKernelLoadExecVSHMs4(file, ¶m);
//sctrlKernelLoadExecVSHMs4(file, NULL);
sceKernelExitDeleteThread(0);
return 0;
}
int module_start(SceSize args, void *argp)
{
int thid = sceKernelCreateThread("loadExecVSHMs4Thread", test_thread, 14, 0x3000, 0, NULL);
if(thid >= 0) sceKernelStartThread(thid, args, argp);
sceKernelExitDeleteThread(0);
return 0;
}
|
|
|
| Back to top |
|
 |
FreePlay
Joined: 04 Jan 2006 Posts: 71 Location: Schenectady, New York, USA
|
Posted: Sat Jan 19, 2008 7:30 pm Post subject: |
|
|
| Yeah, I'm pretty sure discussion of this sort of thing isn't exactly kosher here. |
|
| Back to top |
|
 |
|
|
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
|