X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?p=gpsp.git;a=blobdiff_plain;f=main.c;h=c0841819108a162b0ec0577731c0665e3a5f13ad;hp=ecd529a27fe756960be865f3847e2a8d41ecdb00;hb=HEAD;hpb=d40aa461c5267826ec092f80b9e4db6cc38466b1 diff --git a/main.c b/main.c index ecd529a..c084181 100644 --- a/main.c +++ b/main.c @@ -38,8 +38,14 @@ debug_state current_debug_state = RUN; //u32 breakpoint_value = 0; +#ifdef RPI_BUILD +frameskip_type current_frameskip_type = manual_frameskip; //manual; //auto_frameskip; +u32 global_cycles_per_instruction = 1; +#else frameskip_type current_frameskip_type = auto_frameskip; u32 global_cycles_per_instruction = 1; +#endif + u32 random_skip = 0; u32 fps_debug = 0; @@ -133,7 +139,7 @@ void trigger_ext_event(); static const char *file_ext[] = { ".gba", ".bin", ".zip", NULL }; -#ifdef PSP_BUILD +#ifndef PSP_BUILD static void ChangeWorkingDirectory(char *exe) { #ifndef _WIN32_WCE @@ -170,7 +176,6 @@ static void switch_to_romdir(void) static void save_romdir(void) { char buff[512]; - int r = -1; snprintf(buff, sizeof(buff), "%s" PATH_SEPARATOR "romdir.txt", main_path); file_open(romdir_file, buff, write); @@ -261,6 +266,7 @@ int main(int argc, char *argv[]) gui_action_type gui_action = CURSOR_NONE; debug_screen_start(); + debug_screen_printl(" "); debug_screen_printl("Sorry, but gpSP requires a Gameboy Advance BIOS "); debug_screen_printl("image to run correctly. Make sure to get an "); debug_screen_printl("authentic one, it'll be exactly 16384 bytes large "); @@ -270,7 +276,7 @@ int main(int argc, char *argv[]) debug_screen_printl(" "); debug_screen_printl("When you do get it name it gba_bios.bin and put it"); #ifdef PND_BUILD - debug_screen_printl("in /pandora/appdata/gpsp/ . "); + debug_screen_printl("in /pandora/appdata/gpsp/ . "); #else debug_screen_printl("in the same directory as gpSP. "); #endif @@ -315,7 +321,7 @@ int main(int argc, char *argv[]) } init_main(); - init_sound(); + init_sound(1); init_input(); @@ -323,7 +329,6 @@ int main(int argc, char *argv[]) if(argc > 1) { - switch_to_romdir(); if(load_gamepak(argv[1]) == -1) { #ifndef PSP_BUILD @@ -341,6 +346,7 @@ int main(int argc, char *argv[]) else { char load_filename[512]; + switch_to_romdir(); if(load_file(file_ext, load_filename) == -1) { menu(copy_screen()); @@ -821,7 +827,7 @@ void synchronize() } else if (synchronize_flag) { -#if defined(PND_BUILD) +#if defined(PND_BUILD) || defined(RPI_BUILD) fb_wait_vsync(); #elif !defined(GP2X_BUILD) // sleeping on GP2X is a bad idea delay_us((u64)virtual_frame_count * 50000 / 3 - new_ticks + 2); @@ -867,7 +873,7 @@ void synchronize() interval_skipped_frames += skip_next_frame; -#if !defined(GP2X_BUILD) && !defined(PND_BUILD) +#if !defined(GP2X_BUILD) && !defined(PND_BUILD) && !defined(RPI_BUILD) char char_buffer[64]; sprintf(char_buffer, "gpSP: %2d (%2d) fps", fps, frames_drawn); SDL_WM_SetCaption(char_buffer, "gpSP");