main.c#include pspkernel.h
#include string.h
#include stdio.h
#include kubridge.h
#include systemctrl.h
PSP_MODULE_INFO("auto_load", 0x1000, 1, 0);
PSP_MAIN_THREAD_ATTR(0);
int main_thread(SceSize args, void *argp)
{
char path[256];
sprintf(path, "ms0:/PSP/GAME/AB/EBOOT.PBP");
if(sceIoOpen(path, PSP_O_RDONLY, 777) > 0)
{
struct SceKernelLoadExecVSHParam param;
memset(¶m, 0, sizeof(param));
param.size = sizeof(param);
param.key = "updater";
param.args = strlen(path)+1;
param.argp = path;
sctrlKernelLoadExecVSHMs1(path, ¶m);
}
return 0;
}
int module_start(SceSize args, void *argp)
{
int thid = sceKernelCreateThread("ab_thread", main_thread, 0x30, 0x1000, 0, NULL);
if(thid >= 0)
sceKernelStartThread(thid, args, argp);
return 0;
}
makefile
TARGET = auto_load
OBJS = main.o
INCDIR =
CFLAGS = -Os -G0 -Wall
CXXFLAGS = $(CFLAGS) -fno-exceptions -fno-rtti
ASFLAGS = $(CFLAGS)
USE_KERNEL_LIBC = 1
USE_KERNEL_LIBS = 1
LIBS = -lpspkubridge -lpspsystemctrl_kernel
BUILD_PRX = 1
PSPSDK=$(shell psp-config --pspsdk-path)
include $(PSPSDK)/lib/build_prx.mak
Добавлено спустя 1 минуту 1 секунду:¶ знак &
Сообщение отредактировано 22 октября 2011 19:25. Редактировалось 1 раз(а)