u64 last_frame_interval_timestamp;
u32 gp2x_fps_debug = 0;
+void gp2x_init(void);
void gp2x_quit(void);
#else
u32 synchronize_flag = 1;
u32 update_backup_flag = 1;
+#ifdef GP2X_BUILD
+u32 clock_speed = 200;
+#else
u32 clock_speed = 333;
+#endif
u8 main_path[512];
void trigger_ext_event();
u8 load_filename[512];
u8 bios_filename[512];
-#ifdef GP2X_BUILD
- if(gp2x_load_mmuhack() == -1)
- delay_us(2500000);
-#endif
-
#ifdef PSP_BUILD
sceKernelRegisterSubIntrHandler(PSP_VBLANK_INT, 0,
vblank_interrupt_handler, NULL);
sceKernelEnableSubIntr(PSP_VBLANK_INT, 0);
-#else
+#elif !defined(GP2X_BUILD)
freopen("CON", "wb", stdout);
#endif
delay_us(2500000);
#endif
- init_video();
-
#ifdef GP2X_BUILD
// Overclocking GP2X and MMU patch goes here
- gp2x_overclock();
+ gp2x_init();
#endif
+ init_video();
+
#ifdef GP2X_BUILD
sprintf(bios_filename, "%s/%s", main_path, "gba_bios.bin");
if(load_bios(bios_filename) == -1)
current_savestate_filename);
load_state(current_savestate_filename); */
- debug_on();
+// debug_on();
if(argc > 2)
{
void delay_us(u32 us_count)
{
- usleep(us_count);
+ //usleep(us_count);
+ SDL_Delay(us_count / 1000);
}
void get_ticks_us(u64 *ticks_return)