| View previous topic :: View next topic |
| Author |
Message |
gr8dane
Joined: 18 Aug 2005 Posts: 16
|
Posted: Tue Jul 18, 2006 11:47 am Post subject: libpspnet_adhoc.a broken ??? |
|
|
Hi all,
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: |
#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;
}
|
with this makefile
| Code: |
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
|
When the line:
| Code: |
int ret=sceNetAdhocInit();
|
is removed from the source the elf file does not give the 0x80020001 error!
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 |
|
| Back to top |
|
 |
TyRaNiD
Joined: 18 Jan 2004 Posts: 918
|
Posted: Tue Jul 18, 2006 3:29 pm Post subject: |
|
|
| Yes well it is a bug in pspsdk of sorts, the adhoc libs were not set to late binding so it would fail to load the module. Fixed it now. |
|
| Back to top |
|
 |
gr8dane
Joined: 18 Aug 2005 Posts: 16
|
Posted: Tue Jul 18, 2006 7:56 pm Post subject: |
|
|
| Thank you TyRaNiD for the quick fix. Works like a charm! |
|
| Back to top |
|
 |
|