Sounds nice in theory, that's what happens when I try to turn it into reality.
Code: Select all
Kernel Loader Start
Module Loader patched. Adhoc -> Infra.
ms0:/seplugins/onliner/onliner_user.prx loaded just fine.
ms0:/seplugins/onliner/onliner_user.prx Start: 80020190 - Status: 0
Kernel Loader End
But how can a usermodule that has a - pretty empty - module_start and no module_stop and is only 1.1 Kilobyte in size to produce such a error?
I'm pasting the sourcecode of the files in here so you guys have a easier time helping me figure this out.
Makefile
Code: Select all
TARGET = onliner_user
OBJS = main.o debug.o
BUILD_PRX=1
PRX_EXPORTS=exports.exp
INCDIR =
CFLAGS = -O2 -G0 -Wall
CXXFLAGS = $(CFLAGS) -fno-exceptions -fno-rtti
LDFLAGS= -mno-crt0 -nostartfiles
ASFLAGS = $(CFLAGS)
LIBDIR =
LIBS =
PSPSDK=$(shell psp-config --pspsdk-path)
include $(PSPSDK)/lib/build.mak
Code: Select all
#include <pspkernel.h>
#include <pspsdk.h>
#include "debug.h"
PSP_MODULE_INFO("onliner_user", PSP_MODULE_USER, 1, 1);
PSP_MAIN_THREAD_PARAMS(0x20, 64, PSP_THREAD_ATTR_USER);
PSP_MAIN_THREAD_NAME("onliner_user");
//module start
int module_start(int args, void *argp)
{
//result
int result = 0;
//debuglog
debuglog("User Module is alive!\n");
//return result
return result;
}
//module stop
int module_stop(int args, void *argp)
{
//result
int result = 0;
//return result
return result;
}
Code: Select all
.set noreorder
#include "pspstub.s"
STUB_START "debug",0x40090000,0x00030005
STUB_FUNC 0xAA692D9D,debuglog
STUB_FUNC 0x74C12D64,writeBufferToFile
STUB_FUNC 0x539D6184,appendBufferToFile
STUB_END
Code: Select all
#ifndef _DEBUG_H_
#define _DEBUG_H_
//Debuglog
int debuglog(const char * format, ...);
//Write Buffer to File
int writeBufferToFile(const char * path, void * buffer, int buflen);
//Append Buffer to File
int appendBufferToFile(const char * path, void * buffer, int buflen);
#endif
Code: Select all
PSP_BEGIN_EXPORTS
PSP_EXPORT_START(syslib, 0, 0x8000)
PSP_EXPORT_FUNC(module_start)
PSP_EXPORT_FUNC(module_stop)
PSP_EXPORT_VAR(module_info)
PSP_EXPORT_END
PSP_END_EXPORTS
To give some more information, I'm loading the kernel module just fine using game.txt in custom firmware 5.50 GEN-D3, the kernel module in turn loads this user module and starts it but fails with the error mentioned above.
I've tested this with several umds, including (but not limited to just):
Warriors Orochi 2, Dungeon Siege - Throne of Agony, and Final Fantasy Dissidia.