Error 80020190 on loading Usermodule

Discuss the development of new homebrew software, tools and libraries.

Moderators: cheriff, TyRaNiD

Post Reply
User avatar
Coldbird
Posts: 97
Joined: Thu Feb 08, 2007 7:22 am

Error 80020190 on loading Usermodule

Post by Coldbird »

I wanted to do it like TyRaNiD and load a little usermodule to circumvent some user / kernel limitations and import some of my kernel module exports...

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
Starting the module results in sceKernelStartModule returning 80020190 which means "no memory" if that error list i checked is right.

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
main.c

Code: Select all

#include <pspkernel.h>
#include <pspsdk.h>
#include "debug.h"

PSP_MODULE_INFO&#40;"onliner_user", PSP_MODULE_USER, 1, 1&#41;;
PSP_MAIN_THREAD_PARAMS&#40;0x20, 64, PSP_THREAD_ATTR_USER&#41;;
PSP_MAIN_THREAD_NAME&#40;"onliner_user"&#41;;

//module start
int module_start&#40;int args, void *argp&#41;
&#123;
	//result
  int result = 0;

  //debuglog
  debuglog&#40;"User Module is alive!\n"&#41;;

  //return result
  return result;
&#125;

//module stop
int module_stop&#40;int args, void *argp&#41;
&#123;
  //result
  int result = 0;

  //return result
  return result;
&#125;
debug.S

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
debug.h

Code: Select all

#ifndef _DEBUG_H_
#define _DEBUG_H_

//Debuglog
int debuglog&#40;const char * format, ...&#41;;

//Write Buffer to File
int writeBufferToFile&#40;const char * path, void * buffer, int buflen&#41;;

//Append Buffer to File
int appendBufferToFile&#40;const char * path, void * buffer, int buflen&#41;;

#endif 
exports.exp

Code: Select all

PSP_BEGIN_EXPORTS
PSP_EXPORT_START&#40;syslib, 0, 0x8000&#41;
PSP_EXPORT_FUNC&#40;module_start&#41;
PSP_EXPORT_FUNC&#40;module_stop&#41;
PSP_EXPORT_VAR&#40;module_info&#41;
PSP_EXPORT_END
PSP_END_EXPORTS
I beg you guys help me out with this one.
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.
Been gone for some time. Now I'm back. Someone mind getting me up-2-date?
User avatar
Coldbird
Posts: 97
Joined: Thu Feb 08, 2007 7:22 am

Post by Coldbird »

1. Problem solved. For those having the same problem, try to be fast, give your kernel loader a high priority and sneak the module into memory before libc has a chance to allocate the rest of memory for its own heap / stack.

2. Problem arises...

Code: Select all

Kernel Loader Start
ms0&#58;/seplugins/onliner/onliner_user.prx loaded just fine.
ms0&#58;/seplugins/onliner/onliner_user.prx Start&#58; 03C39B15 - Status&#58; 0
Module Loader patched. Adhoc -> Infra.
Kernel Loader End
Module starts fine now... but where in gods sake is the debug output of module_start? "User Module is alive!" is nowhere to be seen in the debug output...
Been gone for some time. Now I'm back. Someone mind getting me up-2-date?
Chinaphoro
Posts: 47
Joined: Mon Jan 03, 2022 10:15 am
Location: http://product-of-china.cf/
Contact:

-

Post by Chinaphoro »

Hello Dainel,

When I import ImageSensorInterface.cyfx to GPIF 2 Designer, it shows" ImageSensorInterface.cyfx load failed. Error occurred while loading project documents." I noticed that you build the code based on the template of UVC Cypress. I guess the reason maybe you didn't upload the corresponding projectfiles, which I can find in UVC codes cyfxuvc_an75779fx3_uvc.cydsnprojectfiles.So I'm wondering to know can you upload these files?

Many thanks
Dechuan
Post Reply