예제 #1
0
파일: main.cpp 프로젝트: CypherXG/UAE4Droid
/* Okay, this stuff looks strange, but it is here to encourage people who
 * port UAE to re-use as much of this code as possible. Functions that you
 * should be using are do_start_program() and do_leave_program(), as well
 * as real_main(). Some OSes don't call main() (which is braindamaged IMHO,
 * but unfortunately very common), so you need to call real_main() from
 * whatever entry point you have. You may want to write your own versions
 * of start_program() and leave_program() if you need to do anything special.
 * Add #ifdefs around these as appropriate.
 */
void do_start_program (void)
{
    __android_log_print(ANDROID_LOG_INFO, "UAE", "do_start_program");
	quit_program = 2;
	reset_frameskip();
	m68k_go (1);
}
예제 #2
0
/* Okay, this stuff looks strange, but it is here to encourage people who
 * port UAE to re-use as much of this code as possible. Functions that you
 * should be using are do_start_program() and do_leave_program(), as well
 * as real_main(). Some OSes don't call main() (which is braindamaged IMHO,
 * but unfortunately very common), so you need to call real_main() from
 * whatever entry point you have. You may want to write your own versions
 * of start_program() and leave_program() if you need to do anything special.
 * Add #ifdefs around these as appropriate.
 */
void do_start_program (void)
{
	quit_program = 2;
	reset_frameskip();
	m68k_go (1);
}
예제 #3
0
파일: gui.cpp 프로젝트: kerheol/uae4all
int gui_init (void)
{

//Se ejecuta justo despues del MAIN

    if (prSDLScreen==NULL)
#ifdef DREAMCAST
	prSDLScreen=SDL_SetVideoMode(320,240,16,VIDEO_FLAGS);
#else

#ifdef PANDORA
	if(hwScaled)
		prSDLScreen = SDL_SetVideoMode(320, gfxHeight, 16, VIDEO_FLAGS);
	else
	{
		prSDLScreen = SDL_CreateRGBSurface(SDL_SWSURFACE,320,240,16,0,0,0,0);
		prSDLScaleScreen = SDL_SetVideoMode(640, 480, 16, VIDEO_FLAGS);
	}
#else
	prSDLScreen=SDL_SetVideoMode(320,240,16,VIDEO_FLAGS);
#endif

#endif
    SDL_ShowCursor(SDL_DISABLE);
    SDL_JoystickEventState(SDL_ENABLE);
    SDL_JoystickOpen(0);
    if (prSDLScreen!=NULL)
    {
	emulating=0;

#if !defined(DEBUG_UAE4ALL) && !defined(PROFILER_UAE4ALL) && !defined(AUTO_RUN) && !defined(AUTO_FRAMERATE)
	//uae4all_image_file[0]=0;
	//uae4all_image_file2[0]=0;
#else
	//strcpy(uae4all_image_file,"prueba.adz");
	//strcpy(uae4all_image_file2,"prueba2.adz");
#endif
	init_text(1);
	if (!uae4all_image_file0[0])
		run_mainMenu();
	quit_text();
	vkbd_init();

#ifdef GP2X
	inputmode_init();
#if !defined(PANDORA) && !defined(GCW0)
	volumecontrol_init();
#endif
#endif
printf("4\n");
#if defined (PSP) || defined (GIZMONDO)
	inputmode_init();
#endif

	uae4all_pause_music();
printf("5\n");
	emulating=1;
	getChanges();
printf("6\n");
	check_all_prefs();
printf("7\n");
	reset_frameskip();
printf("8\n");
#ifdef DEBUG_FRAMERATE
	uae4all_update_time();
#endif
#ifdef PROFILER_UAE4ALL
	uae4all_prof_init();
	uae4all_prof_add("M68K");			// 0
	uae4all_prof_add("EVENTS");			// 1
	uae4all_prof_add("HSync");			// 2
	uae4all_prof_add("Copper");			// 3
	uae4all_prof_add("Audio");			// 4
	uae4all_prof_add("CIA");			// 5
	uae4all_prof_add("Blitter");			// 6
	uae4all_prof_add("Vsync");			// 7
	uae4all_prof_add("update_fetch");		// 8
	uae4all_prof_add("linetoscr");			// 9
	uae4all_prof_add("do_long_fetch");		// 10
	uae4all_prof_add("pfield_doline");		// 11
	uae4all_prof_add("draw_sprites_ecs");		// 12
	uae4all_prof_add("flush_block");		// 13
	uae4all_prof_add("SET_INTERRUPT");		// 14
/*
	uae4all_prof_add("15");		// 15
	uae4all_prof_add("16");		// 16
	uae4all_prof_add("17");		// 17
	uae4all_prof_add("18");		// 18
	uae4all_prof_add("19");		// 19
	uae4all_prof_add("20");		// 20
	uae4all_prof_add("21");		// 21
	uae4all_prof_add("22");		// 22
*/
#endif
#ifdef DREAMCAST
	SDL_DC_EmulateKeyboard(SDL_FALSE);
#endif

	/*int test = pnd_evdev_open(pnd_evdev_nub1);
	printf("nub1 open: %d\n", test);
	test = pnd_evdev_open(pnd_evdev_nub2);
	printf("nub2 open: %d\n", test);*/

	return 0;
    }
    return -1;
}