diff options
Diffstat (limited to 'source/nds')
-rw-r--r-- | source/nds/entry.cpp | 2 | ||||
-rw-r--r-- | source/nds/gui.c | 16 | ||||
-rw-r--r-- | source/nds/gui.h | 53 | ||||
-rw-r--r-- | source/nds/message.h | 5 |
4 files changed, 24 insertions, 52 deletions
diff --git a/source/nds/entry.cpp b/source/nds/entry.cpp index a5a98de..ca27249 100644 --- a/source/nds/entry.cpp +++ b/source/nds/entry.cpp @@ -390,7 +390,7 @@ void game_set_frameskip() } else { - Settings.SkipFrames = game_config.frameskip_value + 1 /* 1 -> 2 and so on */; + Settings.SkipFrames = game_config.frameskip_value - 1 /* 1 -> 0 and so on */; } } diff --git a/source/nds/gui.c b/source/nds/gui.c index 5d969a2..838b5b9 100644 --- a/source/nds/gui.c +++ b/source/nds/gui.c @@ -1667,10 +1667,8 @@ void GameFrequencyCPU() { u32 clock_speed_table[6] = {6, 9, 10, 11, 12, 13}; //240, 300, 336, 360, 384, 396 - if (game_config.clock_speed_number == 0) - ds2_setCPUclocklevel(clock_speed_table[AutoCPUFrequency]); - else if(game_config.clock_speed_number <= 6) - ds2_setCPUclocklevel(clock_speed_table[game_config.clock_speed_number - 1]); + if(game_config.clock_speed_number <= 5) + ds2_setCPUclocklevel(clock_speed_table[game_config.clock_speed_number]); } void savefast_int(void) @@ -2782,9 +2780,9 @@ u32 menu(u16 *screen, bool8 FirstInvocation) (char*)&msg[MSG_VIDEO_ASPECT_RATIO_3], (char*)&msg[MSG_VIDEO_ASPECT_RATIO_4]}; - char *frameskip_options[] = { (char*)&msg[MSG_VIDEO_FRAME_SKIPPING_AUTOMATIC], (char*)&msg[MSG_VIDEO_FRAME_SKIPPING_2], (char*)&msg[MSG_VIDEO_FRAME_SKIPPING_3], (char*)&msg[MSG_VIDEO_FRAME_SKIPPING_4], (char*)&msg[MSG_VIDEO_FRAME_SKIPPING_5], (char*)&msg[MSG_VIDEO_FRAME_SKIPPING_6], (char*)&msg[MSG_VIDEO_FRAME_SKIPPING_7], (char*)&msg[MSG_VIDEO_FRAME_SKIPPING_8], (char*)&msg[MSG_VIDEO_FRAME_SKIPPING_9], (char*)&msg[MSG_VIDEO_FRAME_SKIPPING_10] }; + char *frameskip_options[] = { (char*)&msg[MSG_VIDEO_FRAME_SKIPPING_AUTOMATIC], (char*)&msg[MSG_VIDEO_FRAME_SKIPPING_0], (char*)&msg[MSG_VIDEO_FRAME_SKIPPING_1], (char*)&msg[MSG_VIDEO_FRAME_SKIPPING_2], (char*)&msg[MSG_VIDEO_FRAME_SKIPPING_3], (char*)&msg[MSG_VIDEO_FRAME_SKIPPING_4], (char*)&msg[MSG_VIDEO_FRAME_SKIPPING_5], (char*)&msg[MSG_VIDEO_FRAME_SKIPPING_6], (char*)&msg[MSG_VIDEO_FRAME_SKIPPING_7], (char*)&msg[MSG_VIDEO_FRAME_SKIPPING_8], (char*)&msg[MSG_VIDEO_FRAME_SKIPPING_9], (char*)&msg[MSG_VIDEO_FRAME_SKIPPING_10] }; - char *cpu_frequency_options[] = { (char*)&msg[MSG_OPTIONS_CPU_FREQUENCY_AUTOMATIC], (char*)&msg[MSG_OPTIONS_CPU_FREQUENCY_0], (char*)&msg[MSG_OPTIONS_CPU_FREQUENCY_1], (char*)&msg[MSG_OPTIONS_CPU_FREQUENCY_2], (char*)&msg[MSG_OPTIONS_CPU_FREQUENCY_3], (char*)&msg[MSG_OPTIONS_CPU_FREQUENCY_4], (char*)&msg[MSG_OPTIONS_CPU_FREQUENCY_5] }; + char *cpu_frequency_options[] = { (char*)&msg[MSG_OPTIONS_CPU_FREQUENCY_0], (char*)&msg[MSG_OPTIONS_CPU_FREQUENCY_1], (char*)&msg[MSG_OPTIONS_CPU_FREQUENCY_2], (char*)&msg[MSG_OPTIONS_CPU_FREQUENCY_3], (char*)&msg[MSG_OPTIONS_CPU_FREQUENCY_4], (char*)&msg[MSG_OPTIONS_CPU_FREQUENCY_5] }; char *fluidity_options[] = { (char*)&msg[MSG_VIDEO_AUDIO_FLUIDITY_PREFER_VIDEO], (char*)&msg[MSG_VIDEO_AUDIO_FLUIDITY_PREFER_AUDIO] }; @@ -2816,7 +2814,7 @@ u32 menu(u16 *screen, bool8 FirstInvocation) &game_config.SoundSync, 2, NULL, ACTION_TYPE, 4), /* 05 */ STRING_SELECTION_OPTION(game_set_frameskip, NULL, &msg[FMT_VIDEO_FRAME_SKIPPING], frameskip_options, - &game_config.frameskip_value, 10 /* auto (0) and 2..10 (1..9) make 10 option values */, NULL, ACTION_TYPE, 5) + &game_config.frameskip_value, 12 /* auto (0) and 0..10 (1..11) make 12 option values */, NULL, ACTION_TYPE, 5) }; MAKE_MENU(graphics, NULL, NULL, NULL, NULL, 0, 0); @@ -2962,7 +2960,7 @@ u32 menu(u16 *screen, bool8 FirstInvocation) //CPU speed (string: shows MHz) /* 01 */ STRING_SELECTION_OPTION(NULL, NULL, &msg[FMT_OPTIONS_CPU_FREQUENCY], cpu_frequency_options, - &game_config.clock_speed_number, 7, NULL, PASSIVE_TYPE, 1), + &game_config.clock_speed_number, 6, NULL, PASSIVE_TYPE, 1), /* 02 */ STRING_SELECTION_OPTION(language_set, NULL, &msg[FMT_OPTIONS_LANGUAGE], language_options, &emu_config.language, sizeof(language_options) / sizeof(language_options[0]) /* number of possible languages */, NULL, ACTION_TYPE, 2), @@ -4215,7 +4213,7 @@ u32 load_font() --------------------------------------------------------*/ void init_game_config(void) { - game_config.clock_speed_number = 0; // "Auto" by default + game_config.clock_speed_number = 5; // 396 MHz by default game_config.graphic = 3; // By default, have a good-looking aspect ratio game_config.frameskip_value = 0; // Automatic frame skipping game_config.SoundSync = 0; // Prefer fluid images by default diff --git a/source/nds/gui.h b/source/nds/gui.h index df1bff9..6bb9ed8 100644 --- a/source/nds/gui.h +++ b/source/nds/gui.h @@ -48,44 +48,9 @@ struct _EMU_CONFIG struct _GAME_CONFIG { - /* - * PreviouslyUsed_20130205_2 was formerly known as - * 'clock_speed_number'; its values were in [0, 5]. [0, 5] were mapped - * to 240, 300, 336, 360, 384 and 394 MHz respectively. - * Version 1.29 changes the value range for 'clock_speed_number' to - * [0, 6], with 0 as an automatic CPU speed setting. - * Change rationale: The default value becomes 0 instead of 5. - * If this variable were to be used as is, the meaning of the default - * value would change. Games which had a configuration file before - * 1.29 would be using the older default of 5 (394 MHz), the meaning - * of which would become 384 MHz instead of "staying the default". - * Games which did not have a configuration file before 1.29 would be - * using the correct default. - * This would confuse users or cause undue hassle. - * THIS VALUE IS NOT GUARANTEED TO BE RESERVED AND SET TO 0. - * DO NOT USE THIS VALUE FOR ANY PURPOSE OTHER THAN EXACTLY THE ONE - * FOR WHICH IT WAS INTENDED. - */ - u32 PreviouslyUsed_20130205_2; + u32 clock_speed_number; u32 Reserved0; - /* - * PreviouslyUsed_20130205_1 was formerly known as 'frameskip_value'; - * its values were in [0, 10]. 0 was automatic frameskipping and - * [1, 10] were mapped to skip 0 to 9 frames respectively. - * Version 1.29 changes the value range for 'frameskip_value' to - * [0, 8], with 0 as automatic frameskipping and [1, 10] to skip 2 to - * 9 frames. - * Change rationale: Frame skip values under 2 cause too much - * communication between the DSTwo and the DS, therefore the DS cannot - * timely send controller information. - * If this variable were to be used as is, the meaning of the option - * would be changed for values in [1, 8], and values in [9, 10] would - * cause undefined behavior, including crashes. - * THIS VALUE IS NOT GUARANTEED TO BE RESERVED AND SET TO 0. - * DO NOT USE THIS VALUE FOR ANY PURPOSE OTHER THAN EXACTLY THE ONE - * FOR WHICH IT WAS INTENDED. - */ - u32 PreviouslyUsed_20130205_1; + u32 frameskip_value; u32 graphic; u32 enable_audio; u32 Reserved1; @@ -95,8 +60,18 @@ struct _GAME_CONFIG u32 HotkeyTemporaryFastForward; u32 HotkeyToggleSound; u32 SoundSync; - u32 frameskip_value; - u32 clock_speed_number; + /* + * PreviouslyUsed_20130206_1 was for a second meaning of + * frameskip_value that is now dropped. + * THIS VALUE IS NOT GUARANTEED TO BE RESERVED AND SET TO 0. + */ + u32 PreviouslyUsed_20130206_1; + /* + * PreviouslyUsed_20130206_2 was for a second meaning of + * clock_speed_number that is now dropped. + * THIS VALUE IS NOT GUARANTEED TO BE RESERVED AND SET TO 0. + */ + u32 PreviouslyUsed_20130206_2; u32 Reserved2[42]; }; diff --git a/source/nds/message.h b/source/nds/message.h index e58d7b8..64c3a6c 100644 --- a/source/nds/message.h +++ b/source/nds/message.h @@ -48,7 +48,6 @@ enum MSG MSG_TOOLS_GAME_HOTKEY_GENERAL, FMT_OPTIONS_LANGUAGE, FMT_OPTIONS_CPU_FREQUENCY, - MSG_OPTIONS_CPU_FREQUENCY_AUTOMATIC, MSG_OPTIONS_CPU_FREQUENCY_0, MSG_OPTIONS_CPU_FREQUENCY_1, MSG_OPTIONS_CPU_FREQUENCY_2, @@ -77,8 +76,8 @@ enum MSG MSG_VIDEO_ASPECT_RATIO_4, MSG_VIDEO_FRAME_SKIPPING_AUTOMATIC, - MSG_VIDEO_FRAME_SKIPPING_0 /* unused */, - MSG_VIDEO_FRAME_SKIPPING_1 /* unused */, + MSG_VIDEO_FRAME_SKIPPING_0, + MSG_VIDEO_FRAME_SKIPPING_1, MSG_VIDEO_FRAME_SKIPPING_2, MSG_VIDEO_FRAME_SKIPPING_3, MSG_VIDEO_FRAME_SKIPPING_4, |