aboutsummaryrefslogtreecommitdiff
path: root/source/nds/gui.h
diff options
context:
space:
mode:
authorNebuleon Fumika2013-02-06 00:34:01 -0500
committerNebuleon Fumika2013-02-06 00:34:01 -0500
commit9e87a7a2b2659785bc05266fbb3292b60aecdf27 (patch)
tree11236b0ac0ac764bea2ff973499ff2ef11448158 /source/nds/gui.h
parentf2adea7bb2250876df3d1b6e076a6b5380c6b13e (diff)
downloadsnesemu-9e87a7a2b2659785bc05266fbb3292b60aecdf27.tar.gz
snesemu-9e87a7a2b2659785bc05266fbb3292b60aecdf27.tar.bz2
snesemu-9e87a7a2b2659785bc05266fbb3292b60aecdf27.zip
Implement automatic CPU frequency switching, which improves battery life if playing games that don't use all of the MIPS CPU. If all of it is indeed needed, then the game will constantly play at 396 MHz.
Diffstat (limited to 'source/nds/gui.h')
-rw-r--r--source/nds/gui.h23
1 files changed, 21 insertions, 2 deletions
diff --git a/source/nds/gui.h b/source/nds/gui.h
index b390b69..df1bff9 100644
--- a/source/nds/gui.h
+++ b/source/nds/gui.h
@@ -48,7 +48,25 @@ struct _EMU_CONFIG
struct _GAME_CONFIG
{
- u32 clock_speed_number;
+ /*
+ * 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 Reserved0;
/*
* PreviouslyUsed_20130205_1 was formerly known as 'frameskip_value';
@@ -78,7 +96,8 @@ struct _GAME_CONFIG
u32 HotkeyToggleSound;
u32 SoundSync;
u32 frameskip_value;
- u32 Reserved2[43];
+ u32 clock_speed_number;
+ u32 Reserved2[42];
};
typedef enum