aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNebuleon Fumika2012-12-19 01:30:30 -0500
committerNebuleon Fumika2012-12-19 01:30:30 -0500
commit65b56543ab4bab2307fe3b29a15f43caaa88dfa1 (patch)
tree519cf9b424822c8b34116fbff0adfbdb50c89bea
parent6bab708c22e3c310d10a8f110161bf1691d01240 (diff)
downloadsnesemu-65b56543ab4bab2307fe3b29a15f43caaa88dfa1.tar.gz
snesemu-65b56543ab4bab2307fe3b29a15f43caaa88dfa1.tar.bz2
snesemu-65b56543ab4bab2307fe3b29a15f43caaa88dfa1.zip
Raise the CPU's clock speed to 396 MHz while loading ROMs.
Also raise the CPU's clock speed to 396 MHz by default, instead of 360 MHz, when emulating a ROM.
-rw-r--r--Makefile6
-rw-r--r--source/nds/gui.c30
2 files changed, 25 insertions, 11 deletions
diff --git a/Makefile b/Makefile
index 590b482..e4c6e45 100644
--- a/Makefile
+++ b/Makefile
@@ -62,9 +62,11 @@ OBJECTS = $(C_OBJECTS) $(CPP_OBJECTS)
# - - - Compilation flags - - -
CFLAGS := -mips32 -Os -mno-abicalls -fno-pic -fno-builtin \
- -fno-exceptions -fno-function-sections -mlong-calls \
+ -fno-exceptions -ffunction-sections -mlong-calls \
-fomit-frame-pointer -msoft-float -G 4 \
- -fno-inline -fno-early-inlining
+ -fno-inline -fno-early-inlining \
+ -fgcse-sm -fgcse-las -fgcse-after-reload \
+ -fsched-spec-load -fsched-stalled-insns=0 -fweb
DEFS := -DSPC700_C -DEXECUTE_SUPERFX_PER_LINE -DSDD1_DECOMP \
-DVAR_CYCLES -DCPU_SHUTDOWN -DSPC700_SHUTDOWN \
diff --git a/source/nds/gui.c b/source/nds/gui.c
index 99ea7b0..07f59d0 100644
--- a/source/nds/gui.c
+++ b/source/nds/gui.c
@@ -1721,7 +1721,7 @@ u32 menu(u16 *screen)
game_config.clock_speed_number = clock_speed_number;
reorder_latest_file();
- //S9xAutoSaveSRAM ();
+ S9xAutoSaveSRAM ();
save_game_config_file();
}
save_emu_config_file();
@@ -1734,7 +1734,7 @@ u32 menu(u16 *screen)
if(gamepak_name[0] != 0)
{
- //S9xAutoSaveSRAM ();
+ S9xAutoSaveSRAM ();
save_game_config_file();
}
@@ -1748,7 +1748,10 @@ u32 menu(u16 *screen)
draw_string_vcenter(down_screen_addr, 36, 100, 190, COLOR_MSSG, msg[MSG_LOADING_GAME]);
ds2_flipScreen(DOWN_SCREEN, 2);
- if(load_gamepak(line_buffer) == -1)
+ ds2_setCPUclocklevel(13);
+ int load_result = load_gamepak(&line_buffer);
+ ds2_setCPUclocklevel(0);
+ if(load_result == -1)
{
first_load = 1;
gamepak_name[0] = '\0';
@@ -1812,8 +1815,12 @@ u32 menu(u16 *screen)
draw_message(down_screen_addr, bg_screenp, 28, 31, 227, 165, bg_screenp_color);
draw_string_vcenter(down_screen_addr, 36, 100, 190, COLOR_MSSG, msg[MSG_LOADING_GAME]);
ds2_flipScreen(DOWN_SCREEN, 2);
-
- if(load_gamepak(args[1]) == -1)
+
+ ds2_setCPUclocklevel(13);
+ int load_result = load_gamepak(args[1]);
+ ds2_setCPUclocklevel(0);
+
+ if(load_result == -1)
{
first_load = 1;
gamepak_name[0] = '\0';
@@ -3495,7 +3502,7 @@ u32 menu(u16 *screen)
if(gamepak_name[0] != 0)
{
- //S9xAutoSaveSRAM ();
+ S9xAutoSaveSRAM ();
save_game_config_file();
}
@@ -3511,7 +3518,12 @@ u32 menu(u16 *screen)
*ext_pos= '/';
ext_pos = emu_config.latest_file[current_option_num -1];
- if(load_gamepak(ext_pos) == -1) {
+
+ ds2_setCPUclocklevel(13);
+ int load_result = load_gamepak(ext_pos);
+ ds2_setCPUclocklevel(0);
+
+ if(load_result == -1) {
first_load = 1;
return;
}
@@ -4129,7 +4141,7 @@ u32 menu(u16 *screen)
game_config.clock_speed_number = clock_speed_number;
reorder_latest_file();
- //S9xAutoSaveSRAM ();
+ S9xAutoSaveSRAM ();
save_game_config_file();
}
save_emu_config_file();
@@ -4308,7 +4320,7 @@ void init_game_config(void)
{
u32 i;
- game_config.clock_speed_number = 2; //360MHz
+ game_config.clock_speed_number = 5; // 396 MHz by default
clock_speed_number = 2;
game_config.graphic = 0;