 {
 	ds_pin_init();
 	map_init();
+	pinMode(CPAD_X_PIN, OUTPUT);
+	pinMode(CPAD_Y_PIN, OUTPUT);	
 	analogWrite(CPAD_X_PIN, 127);
 	analogWrite(CPAD_Y_PIN, 127);
 	lcd.clear();

{
	read_gc_controller();

	button_control(is_valid_index(GC_A_BUTTON), Gamecube.report.a);
	button_control(is_valid_index(GC_B_BUTTON), Gamecube.report.b);
	button_control(is_valid_index(GC_X_BUTTON), Gamecube.report.x);
	button_control(is_valid_index(GC_Y_BUTTON), Gamecube.report.y);
	button_control(is_valid_index(GC_L_TRIGGER), Gamecube.report.left > 127);
	button_control(is_valid_index(GC_R_TRIGGER), Gamecube.report.right > 127);
	button_control(is_valid_index(GC_L_BUTTON), Gamecube.report.l);
	button_control(is_valid_index(GC_R_BUTTON), Gamecube.report.r);
	button_control(is_valid_index(GC_START_BUTTON), Gamecube.report.start);

	// for 3ds circle pad
	if(ds_button_map[GC_MAIN_STICK] == DS_CIRCLE_PAD)

	TCCR0B = TCCR0B & 0b11111000 | 0x01;
}

char get_3ds_pin(char index)
{
	if(ds_button_map[index] >= 0 and ds_button_map[index] <= 7)
		return ds_pin_map[ds_button_map[index]];
