From 0cbacec16ad18c91218ebc5bc275c095b3b0cc3d Mon Sep 17 00:00:00 2001 From: Fabio Olimpieri Date: Sat, 27 May 2017 20:58:11 +0200 Subject: [PATCH] Default frame rate for gamecube to 50% --- src/emulator.c | 4 ++-- src/emulator.h | 6 ++++++ src/gui_sdl.c | 4 ++-- src/menus.c | 2 +- src/tape.c | 2 +- 5 files changed, 12 insertions(+), 6 deletions(-) diff --git a/src/emulator.c b/src/emulator.c index 516a37b..cf6f9b2 100644 --- a/src/emulator.c +++ b/src/emulator.c @@ -1365,7 +1365,7 @@ int main(int argc,char *argv[]) hwsurface=0; argumento=0; - jump_frames=0; + jump_frames=JUMP_FRAMES_DEFAULT; curr_frames=0; ordenador.dblscan=1; ordenador.bw=0; @@ -1832,7 +1832,7 @@ int main(int argc,char *argv[]) if ((ordenador.turbo_state != 1)&&(ordenador.turbo==1)) { update_frequency(0); //set machine frequency - jump_frames=0; + jump_frames=JUMP_FRAMES_DEFAULT; } if (ordenador.tape_stop ==1) fastload_block_tzx(ordenador.tap_file); } diff --git a/src/emulator.h b/src/emulator.h index 387a182..06f89a3 100644 --- a/src/emulator.h +++ b/src/emulator.h @@ -27,6 +27,12 @@ #define NUM_SNDBUF 2 #define MAX_PATH_LENGTH 256 +#ifdef HW_DOL + #define JUMP_FRAMES_DEFAULT 1 +#else + #define JUMP_FRAMES_DEFAULT 0 +#endif + extern char debug_var; extern SDL_Surface *screen; diff --git a/src/gui_sdl.c b/src/gui_sdl.c index 105e37c..b601716 100644 --- a/src/gui_sdl.c +++ b/src/gui_sdl.c @@ -716,7 +716,7 @@ static int emulation_settings(void) if (ordenador.precision) { update_frequency(0); - jump_frames=0; + jump_frames=JUMP_FRAMES_DEFAULT; if (ordenador.turbo!=1) { ordenador.turbo =0; @@ -762,7 +762,7 @@ static void tape_settings(void) //ordenador.precision =0; case 0: //off update_frequency(0); //set machine frequency - jump_frames=0; + jump_frames=JUMP_FRAMES_DEFAULT; ordenador.turbo_state=0; ordenador.precision = ordenador.precision_old; break; diff --git a/src/menus.c b/src/menus.c index 4499789..aca604a 100644 --- a/src/menus.c +++ b/src/menus.c @@ -306,7 +306,7 @@ void settings_menu() { case SDLK_t: curr_frames=0; update_frequency(0); //set deafult machine frequency - jump_frames=0; + jump_frames=JUMP_FRAMES_DEFAULT; ordenador.turbo_state = 0; if(ordenador.turbo){ ordenador.turbo = 0; diff --git a/src/tape.c b/src/tape.c index 4cc386a..cd2cd28 100644 --- a/src/tape.c +++ b/src/tape.c @@ -47,7 +47,7 @@ inline void tape_read(FILE *fichero, int tstados) { if ((ordenador.turbo_state != 0)&&(ordenador.turbo==1)) { update_frequency(0); //set machine frequency - jump_frames=0; + jump_frames=JUMP_FRAMES_DEFAULT; ordenador.turbo_state = 0; ordenador.precision=ordenador.precision_old; }