Welcome! Log In Create A New Profile

Advanced

Load HBC when my homebrew is launched by a forwarder

Posted by RiderFx3 
Load HBC when my homebrew is launched by a forwarder
December 09, 2010 08:39PM
Hello !

I have allready the fonction "Press HOME to reboot" and it works fine.

I want to add the fonction "Launch HBC" when I press the 2 button.

With this code in sys.c:
void GoToHBC(void)
{
	u32 *stub = (u32 *)0x80001800;

	/* Go to Homebrew Channel */
	if (*stub)
		exit(0);
}

and this code in main.c:
/* 2 button */
		if (buttons & WPAD_BUTTON_2)
			GoToHBC();

but with this code, I can return to HBC if my homebrew is launched with HBC, but if I launch my homebrew with a forwarder (made with customizemii), the wii reboot when I press 2. So this fonction is for "return" to HBC, and not "Launch" HBC.

Anyone can help me to Launch HBC with the 2 button?

Sorry for my bad english.

Thanks :)



Edited 1 time(s). Last edit at 12/09/2010 09:12PM by RiderFx3.
Re: Load HBC when wad manager MOD is launched by a forwarder
December 09, 2010 08:52PM
I don't think we support WAD manager here.

And if you want to launch HBC, just launch the correct title ID.

(And what's with this silly french obsession to translate everything?)
Re: Load HBC when wad manager MOD is launched by a forwarder
December 09, 2010 09:11PM
Thanks, but how get the title ID of HBC 1.0.8 ???

I must launch the title with Wii_LaunchTitle(); ?

Thanks for helping me ;)
Re: Load HBC when wad manager MOD is launched by a forwarder
December 09, 2010 11:20PM
Quote
Daid
(And what's with this silly french obsession to translate everything?)
I've been wondering this too...

Anyways, the HBC title ID is "af1bf516" in hex, I don't know you use it but I think that's what you need.
Re: Load HBC when my homebrew is launched by a forwarder
December 09, 2010 11:50PM
actually, the HBC Id is 0x00010001AF1BF516. I believe you use it in the Wii_LaunchTitle() function, but I'm not sure.
Re: Load HBC when my homebrew is launched by a forwarder
December 10, 2010 07:03PM
Hello,

Thanks for helping!

I try this:
#define TITLE_ID(x,y)		(((u64)(x) << 32) | (y))
#define TITLE_HIGH(x)		((u32)((x) >> 32))
#define TITLE_LOW(x)		((u32)(x))

With this:
void GoToHBC(void)
{
	/* Go to Homebrew Channel */
	WII_Initialize();
	(WII_LaunchTitle(HBC_108)<0);
		if(WII_LaunchTitle(HBC_HAXX)<0);
			if(WII_LaunchTitle(HBC_JODI)<0);			
}


But i've got this errors:
sys.c
c:/homebrew/ISWAD/iswad/source/sys.c: In function 'GoToHBC':
c:/homebrew/ISWAD/iswad/source/sys.c:80: error: 'HBC_108' undeclared (first use in this function)
c:/homebrew/ISWAD/iswad/source/sys.c:80: error: (Each undeclared identifier is reported only once
c:/homebrew/ISWAD/iswad/source/sys.c:80: error: for each function it appears in.)
c:/homebrew/ISWAD/iswad/source/sys.c:81: error: 'HBC_HAXX' undeclared (first use in this function)
c:/homebrew/ISWAD/iswad/source/sys.c:82: error: 'HBC_JODI' undeclared (first use in this function)

I have read this topic: [forum.wiibrew.org]

But it not seems to work. What's wrong with my code ?

I should replace the title ID "HBC_HAXX" by the hex title ID ?



Edited 1 time(s). Last edit at 12/10/2010 07:27PM by RiderFx3.
Re: Load HBC when my homebrew is launched by a forwarder
December 10, 2010 07:45PM
It's OKAY i fix it !!!! :D I'm Happy !


in SYS.C:
#define TITLE_ID(x,y)		(((u64)(x) << 32) | (y))
#define TITLE_HIGH(x)		((u32)((x) >> 32))
#define TITLE_LOW(x)		((u32)(x))
void GoToHBC(void)
{
	/* Go to Homebrew Channel */
	WII_Initialize();
	WII_LaunchTitle(TITLE_ID(0x00010001,0xAF1BF516));
		if(WII_LaunchTitle(TITLE_ID(0x00010001,0x48415858)));
			if(WII_LaunchTitle(TITLE_ID(0x00010001,0x4A4F4449)));
				SYS_ResetSystem(SYS_RETURNTOMENU, 0, 0);
}


and in main.c:

/* 2 button */
		if (buttons & WPAD_BUTTON_2)
			GoToHBC();


Thanks all !!!
Sorry, only registered users may post in this forum.

Click here to login