Welcome! Log In Create A New Profile

Advanced

my dol loader just hangs...

Posted by Cypri 
my dol loader just hangs...
August 17, 2010 03:45AM
Drat, I deleted my OP. Anyway, it hangs at relocateDol().

// normal includes
#include 
#include 

#include 
#include 
#include  
#include 


#include 
#include 
#include 
#include  
#include 
#include 

#include 
#include 
#include 
 
// SDL includes
#include 
#include 
#include 
#include 

#define maxTextSections 7
#define maxDataSections 11

u32 relocateDol (u8 *buffer);

typedef struct _dolheader 
{
	u32 textoff [maxTextSections];
	u32 dataoff [maxDataSections];
	u32 textmem [maxTextSections];
	u32 datamem [maxDataSections];
	u32 textsize[maxTextSections];
	u32 datasize[maxDataSections];
	u32 bssmem;
	u32 bsssize;
	u32 entry;
} dolheader;

static void *xfb = NULL;
static GXRModeObj *rmode = NULL;

u32 relocateDol (u8 *buffer)
{
		printf("int loop;\n");
        int loop;
		printf("int loop;\n");
        dolheader *hdr = (dolheader *)buffer;
		printf("hdr->bsssize %i\n", hdr->bsssize);
        memset((void *)hdr->bssmem, 0, hdr->bsssize); //stops here
		
		printf("BSS @ %08x (%08x)\n", hdr->bssmem, hdr->bsssize);
		
		sleep(3);
		
        for (loop = 0; loop < maxTextSections; loop++)
        {
			if (hdr->textsize[loop])
			{	
				printf("Text @ %08x (%08x)\n", hdr->textmem[loop], hdr->textsize[loop]);
                memcpy((void *)hdr->textmem[loop], buffer + hdr->textoff[loop], hdr->textsize[loop]);
				DCFlushRange((void *)hdr->textmem[loop], hdr->textsize[loop]);
				ICInvalidateRange((void *)hdr->textmem[loop], hdr->textsize[loop]);
			}
        }
        for (loop = 0; loop < maxDataSections; loop++)
        {
			if (hdr->datasize[loop])
			{
				printf("Data @ %08x (%08x)\n", hdr->datamem[loop], hdr->datasize[loop]);
                memcpy((void *)hdr->datamem[loop], buffer + hdr->dataoff[loop], hdr->datasize[loop]);
				DCFlushRange((void *)hdr->datamem[loop], hdr->datasize[loop]);
			}
        }
		printf("entry %08x\n", hdr->entry);
        return hdr->entry;
}  

  
void cleanup ()
{
	/* Unmount the FAT device... */
	fatUnmount("sd");
	/* and send the shutdown command. */
	__io_wiisd.startup();
	__io_usbstorage.shutdown();
	__io_wiidvd.shutdown();
	__io_gcsda.shutdown();
	__io_gcsdb.shutdown();

	/* We dont need WPAD anymore */
	WPAD_Shutdown();
	/* Reload an ios */
	//reloadIOS();
	/* Then g'bye libOGC. */
	SYS_ResetSystem(SYS_SHUTDOWN, 0, 0);
	/* Disable exceptions */
  //  __exception_closeall();
}

int validateHeader(u8 *buffer)
{
    if (buffer[0] == 0x0 &&
        buffer[1] == 0x0 &&
        buffer[2] == 0x1)
    {
        return 1337;
    }
	
	return 0;
}
 
int main(int argc, char** argv){
	// main function. Always starts first
 
 
	// Initialise the video system
	VIDEO_Init();
	
	// This function initialises the attached controllers
	WPAD_Init();
	
	// Obtain the preferred video mode from the system
	// This will correspond to the settings in the Wii menu
	rmode = VIDEO_GetPreferredMode(NULL);

	// Allocate memory for the display in the uncached region
	xfb = MEM_K0_TO_K1(SYS_AllocateFramebuffer(rmode));
	
	// Initialise the console, required for printf
	console_init(xfb,20,20,rmode->fbWidth,rmode->xfbHeight,rmode->fbWidth*VI_DISPLAY_PIX_SZ);
	
	// Set up the video registers with the chosen mode
	VIDEO_Configure(rmode);
	
	// Tell the video hardware where our display memory is
	VIDEO_SetNextFramebuffer(xfb);
	
	// Make the display visible
	VIDEO_SetBlack(FALSE);

	// Flush the video register changes to the hardware
	VIDEO_Flush();

	// Wait for Video setup to complete
	VIDEO_WaitVSync();
	if(rmode->viTVMode&VI_NON_INTERLACE) VIDEO_WaitVSync();
 
	printf("\x1b[2;0H");
 
	printf("start\n");
	sleep(1);
 
	fatInitDefault();
	
	
	u8 *bufPtr = (u8 *) 0x92000000;
	

	int size_of_file;
	
	printf("open dol\n");
	sleep(1);
	
	int filedes = open("sd:/apps/pngmove/boot.dol",O_RDWR);
	if(filedes < 0){
		printf("null dol\n");
		sleep(1);
		return 0;
	}
	
	printf("get size\n");
	sleep(1);
	
	size_of_file = lseek(filedes, 0, SEEK_END); 
	lseek(filedes, 0, SEEK_SET);
	
	printf("read bufptr %i\n", size_of_file);
	sleep(3);
	
	read(filedes, bufPtr, size_of_file);
	close(filedes);
	
	printf("valid? %i\n", validateHeader(bufPtr));
	
	printf("typedef void (*Entry)()\n");
	sleep(1);
	
	void (*entry)();
	
	printf("entry = (void (*)())relocateDol(bufPtr);\n");
	sleep(1);
	
	entry = (void (*)())relocateDol(bufPtr);

	printf("IOS_ReloadIOS(36);\n");
	sleep(1);
	
	IOS_ReloadIOS(36);
	
	//Do clean up stuff, like deallocating memory
	/* Set CPU/BUS clock as Nintendo SDK apps require so. */
	*(vu32*)0x800000F8 = 0x0E7BE2C0;
	*(vu32*)0x800000FC = 0x2B73A840;
	__lwp_thread_stopmultitasking(entry);
	
	printf("entry();\n");
	sleep(1);
	
	entry();
 
    return 0;
}



Edited 2 time(s). Last edit at 08/20/2010 07:32AM by Cypri.
Re: my dol loader just hangs...
August 17, 2010 07:55AM
I understand technically this is a different issues but please next time continue the chat in the original thread (the one below). Thanks, it helps keep this place clean.

I'll leave it for now but if another mod/admin may merge it with the previous post.
Re: my dol loader just hangs...
August 17, 2010 09:02AM
Most likely, your loader is compiled to be executed from the same memory address as the dol you are trying to load, the result is that the relocate function, which copy the .dol into memory, will overwrite the currently executing code, resulting in application crash.

You need to modify your makefile, adding

--section-start,.init=0x81200000

to LD_FLAGS should work. You can adapt this address to fit your own need but beware that higher address are used by the HBC to run.

Also, you shouldn't allocate memory, using fixed memory pointer should be fine but doing

u8 *bufPtr = (u8 *) 0x92000000;

is generally better than doing

u8 *bufPtr = (u8) 0x92000000;

I am not sure how the compiler would handle the cast but I don't think good things can happen if you cast a 32-bit address into an 8-bit value.



Edited 1 time(s). Last edit at 08/17/2010 09:12AM by ekeeke.
Re: my dol loader just hangs...
August 17, 2010 08:51PM
@ekeeke Okay, I changed the line to
u8 *bufPtr = (u8 *) 0x92000000;
and added
--section-start,.init=0x81200000
to the make file.

It still hangs though, and it doesn't even give me a code dump. it just hangs. I don't even know if I would call it a crash.

@scanff well the problem with that is that if I'm making say a app where you click on a png to load a dol (hey, that sounds like a nice exercise) and I ask "how do I load a png" than later need to know how to load a dol the topic still says "how do I load a png" so only those looking to help with pngs will look and not those who will look with a dol.

In this case if I change the topic title than anyone else looking to load a png won't know to look there. So IMO the best thing to do is make a new thread.
Re: my dol loader just hangs...
August 17, 2010 11:27PM
I was actually referring to this thread [forum.wiibrew.org] (Code dump on my dol loader app)
Re: my dol loader just hangs...
August 18, 2010 01:19AM
Whoops. You're right, scanff. Those are really close together. Don't know why I thought you were talking about the png one LoL. Sorry. Anyway, yeah, I guess this should be merged with the other one. You're a mod right? think you could merge this one with the other one for me?
Re: my dol loader just hangs...
August 18, 2010 04:41AM
Try moving:
free(bufPtr);
To just before your return statement. In other words, try making it the last line of code executed before the return.
Re: my dol loader just hangs...
August 18, 2010 07:12AM
I don't think that'll do anything. I mean it's not even reaching those statements. It's going into a inf loop or something on this line:
memset((void *)hdr->bssmem, 0, hdr->bsssize); 
Re: my dol loader just hangs...
August 18, 2010 09:07AM
Sounds like the data in the hdr struct is not what you think ... hdr->bsssize may not be correct and infact some incredibility massive value.
Re: my dol loader just hangs...
August 18, 2010 10:03AM
1/ don't allocate and don't free bufptr, just make it point in MEM2 like you are doing, this is fine
2/ don't use a fixed size when reading your .dol file, revert into using fseek + ftell, this works and this is what it is for
3/ I/O read are now unbuffered in devkitppc/libogc, this means that reading too big chunk of data with fread can fail: use the read function or make a loop that read smaller chunk of data (~4096 bytes are fine) into bufptr

The fact it hangs when reading the DOL section addresses in the header seems to indicate you didn't read the file correctly into memory.

As a general coding rule, you should ALWAYS verify that the return of fopen is not NULL before continuing, in case the file could not be opened or SD device could not be accessed, you have no idea if what you are reading is valid data. Lastly, close your file once you are done with reading.

Another possibility is that the DOL you are loading still has some sections located in the same area as your loader, this is very unlikely but to be sure, run doltool on your dol (doltool.exe -i boot.dol).



Edited 3 time(s). Last edit at 08/18/2010 10:24AM by ekeeke.
Re: my dol loader just hangs...
August 18, 2010 09:32PM
Okay, I have opted to use read() and not fread(), but now I get a code dump on this line

read(0x92000000, bufPtr, size_of_file);

I have updated the full source (yes, I also stopped allocating memory and freeing bufptr) on the first post, and I will add validate header, and main (since those are the only changes) to this one.

int validateHeader(u8 *buffer)
{
    if (buffer[0] == 0x0 &&
        buffer[1] == 0x0 &&
        buffer[2] == 0x1)
    {
        return 1337;
    }
	
	return 0;
}
 
int main(int argc, char** argv){
	// main function. Always starts first
 
 
	// Initialise the video system
	VIDEO_Init();
	
	// This function initialises the attached controllers
	WPAD_Init();
	
	// Obtain the preferred video mode from the system
	// This will correspond to the settings in the Wii menu
	rmode = VIDEO_GetPreferredMode(NULL);

	// Allocate memory for the display in the uncached region
	xfb = MEM_K0_TO_K1(SYS_AllocateFramebuffer(rmode));
	
	// Initialise the console, required for printf
	console_init(xfb,20,20,rmode->fbWidth,rmode->xfbHeight,rmode->fbWidth*VI_DISPLAY_PIX_SZ);
	
	// Set up the video registers with the chosen mode
	VIDEO_Configure(rmode);
	
	// Tell the video hardware where our display memory is
	VIDEO_SetNextFramebuffer(xfb);
	
	// Make the display visible
	VIDEO_SetBlack(FALSE);

	// Flush the video register changes to the hardware
	VIDEO_Flush();

	// Wait for Video setup to complete
	VIDEO_WaitVSync();
	if(rmode->viTVMode&VI_NON_INTERLACE) VIDEO_WaitVSync();
 
	printf("\x1b[2;0H");
 
	printf("start\n");
	sleep(1);
 
	fatInitDefault();
	
	
	u8 *bufPtr = (u8 *) 0x92000000;
	

	int size_of_file;
	
	printf("open dol\n");
	sleep(1);
	
	FILE *fp = fopen("sd:/apps/pngmove/boot.dol","rb");
	
	printf("get size\n");
	sleep(1);
	
	fseek(fp, 0, SEEK_END); 
	size_of_file = ftell(fp);
	fseek(fp, 0, SEEK_SET); 
	
	printf("read bufptr %i\n", size_of_file);
	sleep(3);
	
	read(0x92000000, bufPtr, size_of_file);
	
	printf("valid? %i\n", validateHeader(bufPtr));
	
	printf("typedef void (*Entry)()\n");
	sleep(1);
	
	void (*entry)();
	
	printf("entry = (void (*)())relocateDol(bufPtr);\n");
	sleep(1);
	
	entry = (void (*)())relocateDol(bufPtr);

	printf("IOS_ReloadIOS(36);\n");
	sleep(1);
	
	IOS_ReloadIOS(36);

	/* Set CPU/BUS clock as Nintendo SDK apps require so. */
	*(vu32*)0x800000F8 = 0x0E7BE2C0;
	*(vu32*)0x800000FC = 0x2B73A840;
	__lwp_thread_stopmultitasking(entry);
	
	printf("entry();\n");
	sleep(1);
	
	entry();
 
    return 0;
}
Re: my dol loader just hangs...
August 19, 2010 10:02AM
Have a better look on how to use the "read" function, your code actually makes no sense at all. But anyway, the best way to handle this is, as I told you, to call multiple fread on smaller data chunks, in a loop.

And you are still not checking the result of "fopen" before continuing, you should REALLY do it.

I don't want to be mean but honestly, I think you should first be fine with C programming before attempting to code such an application, you can't just copy some code , modify it randomly and expect it works ;-)



Edited 1 time(s). Last edit at 08/19/2010 10:43AM by ekeeke.
Re: my dol loader just hangs...
August 20, 2010 07:37AM
Okay, so I have taken a better look at read and found out that I was very wrong with how I used it. I have fixed the errors, but now I am back where I started with it hanging at relocateDol. I did a little bit more debugging and figured out that the bsssize variable is about twice the size of the size_of_file variable. I am also checking if the dol is null after open and checking if the header is valid. My pngmove dol is getting past both the tests (and runs fine from hbc) so I don't think it has anything to do with the error. Anyway, I updated the first post with full source, and here is the new main.

int main(int argc, char** argv){
	// main function. Always starts first
 
 
	// Initialise the video system
	VIDEO_Init();
	
	// This function initialises the attached controllers
	WPAD_Init();
	
	// Obtain the preferred video mode from the system
	// This will correspond to the settings in the Wii menu
	rmode = VIDEO_GetPreferredMode(NULL);

	// Allocate memory for the display in the uncached region
	xfb = MEM_K0_TO_K1(SYS_AllocateFramebuffer(rmode));
	
	// Initialise the console, required for printf
	console_init(xfb,20,20,rmode->fbWidth,rmode->xfbHeight,rmode->fbWidth*VI_DISPLAY_PIX_SZ);
	
	// Set up the video registers with the chosen mode
	VIDEO_Configure(rmode);
	
	// Tell the video hardware where our display memory is
	VIDEO_SetNextFramebuffer(xfb);
	
	// Make the display visible
	VIDEO_SetBlack(FALSE);

	// Flush the video register changes to the hardware
	VIDEO_Flush();

	// Wait for Video setup to complete
	VIDEO_WaitVSync();
	if(rmode->viTVMode&VI_NON_INTERLACE) VIDEO_WaitVSync();
 
	printf("\x1b[2;0H");
 
	printf("start\n");
	sleep(1);
 
	fatInitDefault();
	
	
	u8 *bufPtr = (u8 *) 0x92000000;
	

	int size_of_file;
	
	printf("open dol\n");
	sleep(1);
	
	int filedes = open("sd:/apps/pngmove/boot.dol",O_RDWR);
	if(filedes < 0){
		printf("null dol\n");
		sleep(1);
		return 0;
	}
	
	printf("get size\n");
	sleep(1);
	
	size_of_file = lseek(filedes, 0, SEEK_END); 
	lseek(filedes, 0, SEEK_SET);
	
	printf("read bufptr %i\n", size_of_file);
	sleep(3);
	
	read(filedes, bufPtr, size_of_file);
	close(filedes);
	
	printf("valid? %i\n", validateHeader(bufPtr));
	
	printf("typedef void (*Entry)()\n");
	sleep(1);
	
	void (*entry)();
	
	printf("entry = (void (*)())relocateDol(bufPtr);\n");
	sleep(1);
	
	entry = (void (*)())relocateDol(bufPtr);

	printf("IOS_ReloadIOS(36);\n");
	sleep(1);
	
	IOS_ReloadIOS(36);
	
	//Do clean up stuff, like deallocating memory
	/* Set CPU/BUS clock as Nintendo SDK apps require so. */
	*(vu32*)0x800000F8 = 0x0E7BE2C0;
	*(vu32*)0x800000FC = 0x2B73A840;
	__lwp_thread_stopmultitasking(entry);
	
	printf("entry();\n");
	sleep(1);
	
	entry();
 
    return 0;
}
Re: my dol loader just hangs...
August 20, 2010 09:55AM
well, I'm not really sure if using read works, in theory it should but I never tried it.
again, you should really use a loop to read file in smaller data chunks; like this:

    /* Open file */
    FILE *fp = fopen("sd:/apps/pngmove/boot.dol", "rb");
    if (!fp)
    {
      printf("null dol\n");
      sleep(1);
      return 0;
    }

    /* Read size */
    fseek(fp, 0, SEEK_END);
    size_of_file = ftell(fp);
    fseek(fp, 0, SEEK_SET);

    /* Read into buffer (4k blocks) */
    int done = 0;
    while (filesize > 4096)
    {
      fread(bufPtr + done, 4096, 1, fp);
      done += 4096;
      filesize -= 4096;
    }

    /* Read remaining bytes */
    if (filesize)
    {
      fread(bufPtr + done, filesize, 1, fp);
    }

    /* Close file */
    fclose(fp);


Quote

I did a little bit more debugging and figured out that the bsssize variable is about twice the size of the size_of_file variable

That's perfectly normal, .bss section holds uninitialized data, it is NOT included in the binary but is reserved in memory and filled with zero on startup.
The .dol file only includes code (.text section) and initialized static or const data (.data sections)

Please report .BSS start address and size



Edited 2 time(s). Last edit at 08/20/2010 10:10AM by ekeeke.
Re: my dol loader just hangs...
August 20, 2010 07:18PM
Okay, so I changed it to the fread loop (and changed filesize to size_of_file so it would compile) and it still hung at the same place.

Here is the info from doltool -i

BSS Address:      80165F60
BSS Size:         00378680

Entry Point:      80004000

Text Section  0:  Offset=00000100  Address=80004000  Size=00125460

Data Section  0:  Offset=00125580  Address=80129460  Size=0003CB00
Re: my dol loader just hangs...
August 20, 2010 08:38PM
I am out of ideas, sorry.
maybe post infos from doltool for your loader .dol
Re: my dol loader just hangs...
August 20, 2010 08:59PM
BSS Address:      80065F40
BSS Size:         000BF3A0

Entry Point:      80004000

Text Section  0:  Offset=00000100  Address=80004000  Size=00055140

Data Section  0:  Offset=00055240  Address=80059140  Size=0000CE00
Hmm, they're really close together for their address. And their entry point is the same, but I added
--section-start,.init=0x81200000
to my make file for the loader.
Re: my dol loader just hangs...
August 20, 2010 11:13PM
yes, this is the cause of the problem, your loader should be running from 0x81200000 and it isn't

it must be a problem with your makefile, it should have this line:
LDFLAGS = $(MACHDEP) -Wl,-Map,$(notdir $@).map -Wl,--section-start,.init=0x81200000
Re: my dol loader just hangs...
August 20, 2010 11:55PM
Yeah, I kinda didn't put the , before --section-start (Why did it still compile? @_@) My bad.

Anyway, I managed to get it running with the fread loop, than I tried it with the normal read and it worked too. I had a little problem of my loader crashing when I hit the power button on an app it loaded but I fixed that by adding free(bufPtr); (Like ekeeke said before).

Anyway it works now without a hitch, and here is the source for anyone who wants it! ^_^

A big thank you to ekeeke!

// normal includes
#include 
#include 

#include 
#include 
#include  
#include 


#include 
#include 
#include 
#include  
#include 
#include 

#include 
#include 
#include 
 
// SDL includes
#include 
#include 
#include 
#include 

#define maxTextSections 7
#define maxDataSections 11

u32 relocateDol (u8 *buffer);

typedef struct _dolheader 
{
	u32 textoff [maxTextSections];
	u32 dataoff [maxDataSections];
	u32 textmem [maxTextSections];
	u32 datamem [maxDataSections];
	u32 textsize[maxTextSections];
	u32 datasize[maxDataSections];
	u32 bssmem;
	u32 bsssize;
	u32 entry;
} dolheader;

static void *xfb = NULL;
static GXRModeObj *rmode = NULL;

u32 relocateDol (u8 *buffer)
{
        int loop;
		printf("int loop;\n");
        dolheader *hdr = (dolheader *)buffer;
		printf("hdr->bsssize %i\n", hdr->bsssize);
        memset((void *)hdr->bssmem, 0, hdr->bsssize); //stops here
		
		printf("BSS @ %08x (%08x)\n", hdr->bssmem, hdr->bsssize);
		
        for (loop = 0; loop < maxTextSections; loop++)
        {
			if (hdr->textsize[loop])
			{	
				printf("Text @ %08x (%08x)\n", hdr->textmem[loop], hdr->textsize[loop]);
                memcpy((void *)hdr->textmem[loop], buffer + hdr->textoff[loop], hdr->textsize[loop]);
				DCFlushRange((void *)hdr->textmem[loop], hdr->textsize[loop]);
				ICInvalidateRange((void *)hdr->textmem[loop], hdr->textsize[loop]);
			}
        }
        for (loop = 0; loop < maxDataSections; loop++)
        {
			if (hdr->datasize[loop])
			{
				printf("Data @ %08x (%08x)\n", hdr->datamem[loop], hdr->datasize[loop]);
                memcpy((void *)hdr->datamem[loop], buffer + hdr->dataoff[loop], hdr->datasize[loop]);
				DCFlushRange((void *)hdr->datamem[loop], hdr->datasize[loop]);
			}
        }
		
		printf("entry %08x\n", hdr->entry);
        return hdr->entry;
}  

int validateHeader(u8 *buffer)
{
    if (buffer[0] == 0x0 &&
        buffer[1] == 0x0 &&
        buffer[2] == 0x1)
    {
        return 1337;
    }
	
	return 0;
}
 
int main(int argc, char** argv){
	// main function. Always starts first
 
 
	// Initialise the video system
	VIDEO_Init();
	
	// This function initialises the attached controllers
	WPAD_Init();
	
	// Obtain the preferred video mode from the system
	// This will correspond to the settings in the Wii menu
	rmode = VIDEO_GetPreferredMode(NULL);

	// Allocate memory for the display in the uncached region
	xfb = MEM_K0_TO_K1(SYS_AllocateFramebuffer(rmode));
	
	// Initialise the console, required for printf
	console_init(xfb,20,20,rmode->fbWidth,rmode->xfbHeight,rmode->fbWidth*VI_DISPLAY_PIX_SZ);
	
	// Set up the video registers with the chosen mode
	VIDEO_Configure(rmode);
	
	// Tell the video hardware where our display memory is
	VIDEO_SetNextFramebuffer(xfb);
	
	// Make the display visible
	VIDEO_SetBlack(FALSE);

	// Flush the video register changes to the hardware
	VIDEO_Flush();

	// Wait for Video setup to complete
	VIDEO_WaitVSync();
	if(rmode->viTVMode&VI_NON_INTERLACE) VIDEO_WaitVSync();
 
	printf("\x1b[2;0H");
 
	printf("start\n");
 
	fatInitDefault();
	
	u8 *bufPtr = (u8 *) 0x92000000;

	int size_of_file;
	
	printf("open dol\n");
	
	int filedes = open("sd:/apps/pngmove/boot.dol",O_RDWR);
	if(filedes < 0){
		printf("null dol\n");
		sleep(1);
		return 0;
	}
	
	printf("get size\n");
	
	size_of_file = lseek(filedes, 0, SEEK_END); 
	lseek(filedes, 0, SEEK_SET);
	
	printf("read bufptr %i\n", size_of_file);
	
	read(filedes, bufPtr, size_of_file);
	close(filedes);
	
	printf("valid? %i\n", validateHeader(bufPtr));
	
	printf("typedef void (*Entry)()\n");
	
	void (*entry)();
	
	printf("entry = (void (*)())relocateDol(bufPtr);\n");
	
	entry = (void (*)())relocateDol(bufPtr);

	printf("IOS_ReloadIOS(36);\n");
	
	IOS_ReloadIOS(36);
	
	/* Set CPU/BUS clock as Nintendo SDK apps require so. */
	*(vu32*)0x800000F8 = 0x0E7BE2C0;
	*(vu32*)0x800000FC = 0x2B73A840;
	__lwp_thread_stopmultitasking(entry);
	
	printf("entry();\n");
	
	entry();
 
	free(bufPtr);
    return 0;
}
Sorry, only registered users may post in this forum.

Click here to login