Welcome! Log In Create A New Profile

Advanced

General question about the APP posted at wiibrew.

Posted by datalogger 
General question about the APP posted at wiibrew.
February 08, 2010 12:50AM
I'm trying my hand at C programming my wii using devkitpro and came here to WiiBrew to look at example APPs.

I found the perfect starting platform to use, but I cannot get it to compile.
I have tried every verison of libogc, going back to 2006, but no-go.

I can compile many other Homebrew apps from WiiBrew, but not this one.

Is there a way that will tell me what versions of devkitpro, libogc and what ever else it needs to compile?
I've read through the sources, but it seems they are asking about files that I can't locate and the comments are in a lanuguge I can't read.


I've tried contacting the poster/creator, but no response yet.

Can someone please help me out here and at least tell me they can't compile it either so I know it's not just me?

It's posted here on WiiBrew, called WiiMenu.
Here is a link to the source I'm having trouble with.
[wiibrew.org]
Re: General question about the APP posted at wiibrew.
February 08, 2010 05:05AM
You need GRRLIB installed.

Edit: On an unrelated note, please check your private messages regarding an issue you're having with the forum (you posted this hours after I PM'd you so I'm assuming you've unintentionally neglected to look at my message).



Edited 2 time(s). Last edit at 02/08/2010 05:08AM by Arikado.
Re: General question about the APP posted at wiibrew.
February 08, 2010 05:21AM
opening the rar says the folder inside it was last modified 19 april 2008. so obviously he was using libogc and devkit made before that date. also the readme says he is using grrlib 2.0. so that is a clue to how his build environment was set up.


anyways, i tried to compile with the latest devkit and i see some shit that needs changed
the error about vector and all the cam stuff in grrlib.c can be fixed by just putting #define Vector guVector at the top of that file.

he was using a libsdcard, hence the "-lsdcard" in the makefile and "#include sdcard.h" in grrlib. either you need this lib, or you need to change the screenshot function to the one in grrlib 3.X that used libfat since you already have that. or just comment out that function completely.

much of this project is already part of devkit now. look at libwiiuse. you can substitute the files in this project for the newer -lwiiuse if you want. in main() there is lines 79 and 80. the 2 lines that start with "bte_". both of those are not in the currunt devkit. i just got rid of that whole block of code and threw in a WPAD_Init() and then in the while() i WPAD_Scans() and it works fine.
Re: General question about the APP posted at wiibrew.
February 08, 2010 06:26AM
Quote
giantpune
opening the rar says the folder inside it was last modified 19 april 2008. so obviously he was using libogc and devkit made before that date. also the readme says he is using grrlib 2.0. so that is a clue to how his build environment was set up.


anyways, i tried to compile with the latest devkit and i see some shit that needs changed
the error about vector and all the cam stuff in grrlib.c can be fixed by just putting #define Vector guVector at the top of that file.

he was using a libsdcard, hence the "-lsdcard" in the makefile and "#include sdcard.h" in grrlib. either you need this lib, or you need to change the screenshot function to the one in grrlib 3.X that used libfat since you already have that. or just comment out that function completely.


I change the GRRLIB.c
// #include sdcard.h 
#define Vector guVector 
...
...
...
/*
void GRRLIB_ScrShot(char* file){
    SDCARD_Init();
    sd_file *handle;
    handle = SDCARD_OpenFile(file, "w");
    SDCARD_WriteFile(handle, (u16*)GRRLIB_buffer, 640*480*2);
    SDCARD_CloseFile(handle);
}
*/


Then I changed the Makefile:
LIBS	:=	-lbte -logc -lm -lwiiuse

Quote

much of this project is already part of devkit now. look at libwiiuse. you can substitute the files in this project for the newer -lwiiuse if you want. in main() there is lines 79 and 80. the 2 lines that start with "bte_". both of those are not in the currunt devkit. i just got rid of that whole block of code and threw in a WPAD_Init() and then in the while() i WPAD_Scans() and it works fine.

This part is where I'm having a problem.
I'm sure I'm doing this wrong...
I did this:

	*((u32*)0xcd0000c0) |= 0x100;
//Esto es lo que debe de sincronizar tu wiimote

WPAD_Init();
  
  /*
	bte_init();
	bte_start();
	wiimotes =  wiiuse_init(MAX_WIIMOTES, wiimote_event);
	wiiuse_find(wiimotes, MAX_WIIMOTES, 5);
	wiiuse_connect(wiimotes, MAX_WIIMOTES);
	wiiuse_set_leds(wiimotes[0], WIIMOTE_LED_1);//Enchufa el Led 1 del wiimote
	wiiuse_rumble(wiimotes[0], 1);//Enchufa el vibrador
	usleep(200000); //Hace una pausa de 200ms 
	wiiuse_rumble(wiimotes[0], 0);//Apaga el vibrador
	wiiuse_set_ir(wiimotes[0], 0);
	usleep(200000); //Hace una pausa de 200ms 
	wiiuse_motion_sensing(wiimotes[0], 1);
	GRRLIB_FillScreen(0x0000);//Pone negra la pantalla
 */


	while(1){//Se repite hasta el fin del programa
		
		/*
		GRRLIB_DrawImg(0,0,menu_width,menu_high,menu_img,0,1);//Dibuja el menu del fondo
		GRRLIB_DrawImg(irx,iry,mano_width,mano_high,mano_img,0,1);//Dibuja nuestra querida mano
		if(buttonB==1) reload ();//Si se pulsa el boton B se reiinicia el loader
		if(buttonA==1){//Si se pulsa el boton A hace que vibre el mando durante 200ms
		wiiuse_rumble(wiimotes[0], 1);
		usleep(200000);
		wiiuse_rumble(wiimotes[0], 0);
		}
		GRRLIB_Render();//Renderiza
		VIDEO_WaitVSync();
		*/
		
WPAD_Scans();
}

return(0);

}

but I get ton's of compiling errors.

By the way, Thanks for trying to help a newb to the Wii!
Re: General question about the APP posted at wiibrew.
February 08, 2010 06:48AM
I think I'm heading down the wrong tracks here.

Even if this worked it would defeat the purpose of what I'm trying to learn about.
This will disable all of the wiiuse funtions I want to learn about and figure out how they work.

What I'm trying to do is see how the wm structure works and how to use it.
I'm trying to figure out a way to get the Bluetooth address from the attached remote so I can display it on the screen.

I know wiiuse can do it, but I just cant figure out how to get to it.

Can someone please suggest a better source to read and understand how to do this?
Re: General question about the APP posted at wiibrew.
March 03, 2010 02:23AM
I'd think that looking through the wiiuse headers in devkitpro/libogc would probably be wise.
Sorry, only registered users may post in this forum.

Click here to login