forums.ps2dev.org Forum Index forums.ps2dev.org
Homebrew PS2, PSP & PS3 Development Discussions
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

libpspnet_adhoc.a broken ???

 
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Development
View previous topic :: View next topic  
Author Message
gr8dane



Joined: 18 Aug 2005
Posts: 16

PostPosted: Tue Jul 18, 2006 11:47 am    Post subject: libpspnet_adhoc.a broken ??? Reply with quote

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
Code:
Code:
Back to top
View user's profile Send private message
TyRaNiD



Joined: 18 Jan 2004
Posts: 918

PostPosted: Tue Jul 18, 2006 3:29 pm    Post subject: Reply with quote

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
View user's profile Send private message
gr8dane



Joined: 18 Aug 2005
Posts: 16

PostPosted: Tue Jul 18, 2006 7:56 pm    Post subject: Reply with quote

Thank you TyRaNiD for the quick fix. Works like a charm!
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Development All times are GMT + 10 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group