Welcome! Log In Create A New Profile

Advanced

Distinguishing between Bongos and normal GC controllers

Posted by Botskiz 
Distinguishing between Bongos and normal GC controllers
November 19, 2008 04:56PM
I have a slightly annoying problem right now, that I can't seem to get rid of. Basically, I'd like to know how I can find out wether a controller connected to the GC ports is a standard controller or a DK Bongo. The reason for this is obviously to avoid button mapping problems. For example, I want to use the left bongo drum to navigate up and down, but I don't want a normal GC controller to navigate up and down by pressing the Y and B buttons, too, so I need to distinguish the two.

I have already taken a look at si.h and tried to figure out the difference between the two controller types by using SI_GetStatus(), SI_GetType(), etc., but I didn't have any success doing it that way. Checking for any unusual data returned by PAD_ButtonsDown(), etc. didn't help either.

Of course I could ask the user if he/she uses bongos or not, but I think it's less annoying for the user to let the program figure it out by itself, if that is even possible.
Re: Distinguishing between Bongos and normal GC controllers
November 21, 2008 04:57PM
According to YAGCD, the DKongas "work exactly like the standard controllers from the programmers point of view, and even have the same ID".

You may be out of luck.
Re: Distinguishing between Bongos and normal GC controllers
November 21, 2008 05:37PM
But games like Donkey Kong Jungle Beat have no problem to distinguish between Bongos and normal Gamecube controllers
Re: Distinguishing between Bongos and normal GC controllers
November 21, 2008 07:04PM
Thanks, marcan. I've found the same info yesterday, and the data received by SI_GetType() and SI_GetStatus() is indeed identical. But like daniel_c_w already said, Donkey Kong Jungle Beat definitely distinguishes between the two controller types. The button mapping on a standard controller differs from the button mapping of the bongos, and the game even shows an information screen if you don't have any bongos connected, so there must be a difference somewhere. I guess no one really bothered to find it, tough.
Re: Distinguishing between Bongos and normal GC controllers
November 21, 2008 07:06PM
Interesting. Maybe there's a special command to check for the Bongos. I don't have that game to check, but you could try disassembling it. Alternatively, you could use a GC pad emulator (hardware) to see if there's any special stuff from the game.
Re: Distinguishing between Bongos and normal GC controllers
November 21, 2008 08:10PM
what happens when you clap?
is the micro mapped to something? something analog?
Re: Distinguishing between Bongos and normal GC controllers
November 21, 2008 08:23PM
The microphone is mapped to the right analog trigger. So you can just use PAD_TriggerR() to find out if someone clapped or not.

Update: I feel like an idiot now. Somehow I managed to pass a wrong pointer to SI_GetResponse(), when I tried it last time. No wonder it gave me strange results. I figured it out now, though. In case anyone is interested, here's how I did it.

int i;
u32 inputBuffer[2];
	
// Check wether a GC controller is a bongo or not.
for ( i = 0; i < 3; i++ )
{
	if ( ( SI_GetType(i) & SI_GC_STANDARD ) && ( SI_GetResponse( i, &inputBuffer ) ) )
	{
		if ( inputBuffer[0] & 0x800000 )	// This is a standard GC controller.
			printf( "Standard GC Controller \n" );

		else		// This is a DK Bongo, or pretends to be one.
			printf( "Bongo Controller \n");
	}
}



Edited 1 time(s). Last edit at 11/21/2008 09:30PM by Botskiz.
Sorry, only registered users may post in this forum.

Click here to login