I hope somebody can shed some light on this. I am fooling around with adhoc stuff and had previously been running in kernel mode and doing my own stubs and fixups for adhoc functions. This all works wonderful.
I would however like to use the adhoc lib instead, partly in the hopes that I could now run in user mode.
The following code, using the following makefile gives me a 0x80020001 error when I try and execute my elf or eboot file file.
Code: Select all
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <pspkernel.h>
PSP_MODULE_INFO("Simple Sample", 0, 1, 1);
PSP_MAIN_THREAD_ATTR(THREAD_ATTR_USER);
int sceNetAdhocInit(void);
void NetworkInit(void)
{
int ret=sceNetAdhocInit();
}
int main(void)
{
NetworkInit();
for(;;)
{
}
//Exit program
sceKernelExitGame();
return 0;
}
Code: Select all
PSPSDK = $(shell psp-config --pspsdk-path)
PSPLIBSDIR = $(PSPSDK)/..
TARGET = adhoc
EXTRA_TARGETS = EBOOT.PBP
OBJS = main.o
LIBS = -lpspnet_adhoc
CFLAGS = -O2 -G0 -Wall
CXXFLAGS = $(CFLAGS) -fno-exceptions -fno-rtti
ASFLAGS = $(CFLAGS)
include $(PSPSDK)/lib/build.mak
Code: Select all
int ret=sceNetAdhocInit();
Before you jump all over me here.. I know this code will do nothing sensible at all and would probably just crash. I just included the minimum code to replicate the unusable elf/eboot file.
I have the latest SDK, I just rebuild it as of today 07/17/06.
Does anybody have any idea why this would cause a 0x80020001 error?
Any help is greatly appreciated.
Thanks
- gr8dane
Code: Select all
Code: Select all