PDA

View Full Version : Home Menu Test



July 13th, 2008, 04:18
Implementation of Home Menu function in GRRLIB for game console Wii.

Download of source code just when completely over.

Video:

http://www.youtube.com/watch?v=_DaJRP96O1k"]http://www.youtube.com/watch?v=_DaJRP96O1k

http://www.youtube.com/v/_DaJRP96O1k

Dol:
http://wiihomemenu.googlecode.com/files/HomeMenuTest.rar

Example of how to use the function:

/*===========================================
Home Menu Example
Code : bmic
Template Code (Minimum Requirement)
============================================*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <malloc.h>
#include <math.h>
#include <ogcsys.h>
#include <unistd.h>
#include <gccore.h>
#include <wiiuse/wpad.h>
#include <fat.h>

#include "GRRLIB/GRRLIB.h"
#include "GRRLIB/fonts/GRRLIB_font1.h"
#include "gfx/p1Point.h"

u8 *tex_font1,
*tex_p1Point;

Mtx GXmodelView2D;

int main(){

int ypos = 0,
xpos = 0;

float angulo =0;

VIDEO_Init();
WPAD_Init();

GRRLIB_InitVideo();
GRRLIB_Start();

WPADData *wiimote;

WPAD_SetDataFormat(0, WPAD_FMT_BTNS_ACC_IR);

tex_font1=GRRLIB_LoadTexture(GRRLIB_font1);
tex_p1Point=GRRLIB_LoadTexture(p1Point);

while(1){
WPAD_ScanPads();
u32 wpaddown = WPAD_ButtonsDown(0);

GRRLIB_FillScreen(0xFF000000);

GRRLIB_Printf(100,100,tex_font1,0xFFFFFFFF,2,"Please, Press HOME Button. ");

wiimote = WPAD_Data(0);

ypos = wiimote->ir.y;
xpos = wiimote->ir.x;
angulo = wiimote->ir.angle / 180 * 3.1415;

if(wiimote->ir.valid)
GRRLIB_DrawImg( xpos, ypos, 96, 96,tex_p1Point, angulo,1,1,255 );

if (wpaddown & WPAD_BUTTON_HOME) GRRLIB_HomeMenu();

GRRLIB_Render();
}
return 0;
}

In bold text above the obrigatory lines you will have to put in your code.

tylerbgood
July 13th, 2008, 04:50
At this rate, emulation and homebrew on the wii is going to be more refined than any console's ever been in the past - if we're not already there. I can only imagine that this code is going to find its way into my favorite emulators before too much longer! Heartfelt thanks to the creator of this, and all other code which makes my wii do the great things it's not supposed to do.

AndrewArsonn
July 13th, 2008, 06:49
That's amazing, looks like when I get my ps3 I'll be still pulling out the little white beast for homebrew. And of course my chocobo's dungeon, also of course later on the crystal bearers. :D

(don't we all just love run on sentences?)

iofthestorm
July 13th, 2008, 07:21
Wow that's amazing. Wii homebrew is so polished now, I love it.

katoh1
July 13th, 2008, 08:42
Don't get too hyped. It's not the same Wii home menu, thats nearly impossible to load without the official SDK, this person just created a menu that looks like the Home menu. Really, the home menu you all know and love comes with the SDK and is included with the games themselves, I would say there isn't one in the firmware, but pressing Home on the start up screen or in the channels that are built into the firmware (Mii channel, Photo Channel, News Channel, Forecast Channel and Shop Channel) brings it up, so maybe at some point in the future someone will make a hack that loads the menu from one of these (and maybe tweaks it so that the homebrew games can have an operations guide on their own)

(Also, I don't see how having the home menu would make Wii homebrew more polished, it would be nice, but if anything the developer is still free to make a game or app that looks like it runs on DOS)

alkalinetb
July 13th, 2008, 08:51
I'm guessing the wiimote settings dont work? and the power indication?

looks great though, can we get back to the channel menu without restarting the wii yet?

____anders____
July 13th, 2008, 17:17
Damn that's cool!
awesome if it could be some sort of a standard for all homebrew in the near future:)

July 13th, 2008, 18:05
I'm guessing the wiimote settings dont work? and the power indication?

looks great though, can we get back to the channel menu without restarting the wii yet?

That's what i still have to make to complete:

- Audio (i just need to discover how to convert ogg to c, anyone ?)
- Wiimote setting (i gues itīs not too hard)
- Operations guide (partialy ready, want to make customizable, [dreaming on] maybe 3d aplication [/dreaming off] :D)
- Power indication (looks like piece of cake)

The list above it's my order of priority to end this thing.

Before anyone asks, a think i can end it in a couple of days.

As you have asked, the restart and the return to the homebrew channel is working, and should work too if ported into a regular wii chanel.

iofthestorm
July 13th, 2008, 19:47
Don't get too hyped. It's not the same Wii home menu, thats nearly impossible to load without the official SDK, this person just created a menu that looks like the Home menu. Really, the home menu you all know and love comes with the SDK and is included with the games themselves, I would say there isn't one in the firmware, but pressing Home on the start up screen or in the channels that are built into the firmware (Mii channel, Photo Channel, News Channel, Forecast Channel and Shop Channel) brings it up, so maybe at some point in the future someone will make a hack that loads the menu from one of these (and maybe tweaks it so that the homebrew games can have an operations guide on their own)

(Also, I don't see how having the home menu would make Wii homebrew more polished, it would be nice, but if anything the developer is still free to make a game or app that looks like it runs on DOS)
Of course it's not, I thought that was obvious. But really, if it functions the same and looks the same does it matter if it's not exactly the same code? I don't think so. It's also pretty obvious that the real home menu code is part of their SDK since all Wii games use the same one, and likely that's part of Nintendo's requirements. Similar to DS homebrew where the sleeping on close lid is not actually built into firmware but must be implemented by each program, it's just that all real games do it.

Having the Home menu is a lot nicer than just pressing Home and seeing an app freeze for a few seconds like they do now, I think that's added polish but I suppose your opinion may vary. Also, I would think that having such a nice looking Home menu would encourage developers to get the rest of their application to look on par with this.

masterchief929
July 13th, 2008, 20:23
i like the looks of that! i am hoping that all wii homebrew comes with a menu like that in the future. it would be really nice if this got tweaked a little bit so that it could use the operations guide and the wiimote settings also.

July 17th, 2008, 16:31
Update:

-Sound: OK:thumbup:
-Operations Guide Customizable: OK:thumbup:
-Wiimote Settings and Battery status: Need work, lot's of work into wiiuse or wpad library.:(

I will try to make those two work in another couplke of days, if i don't suceed, will release a beta version by saturday.


bmic