diff --git a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/features/settings/model/BooleanSetting.java b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/features/settings/model/BooleanSetting.java
index b5adf8829b..b473831adc 100644
--- a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/features/settings/model/BooleanSetting.java
+++ b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/features/settings/model/BooleanSetting.java
@@ -42,6 +42,8 @@ public enum BooleanSetting implements AbstractBooleanSetting
false),
MAIN_SYNC_GPU(Settings.FILE_DOLPHIN, Settings.SECTION_INI_CORE, "SyncGPU", false),
MAIN_OVERCLOCK_ENABLE(Settings.FILE_DOLPHIN, Settings.SECTION_INI_CORE, "OverclockEnable", false),
+ MAIN_RAM_OVERRIDE_ENABLE(Settings.FILE_DOLPHIN, Settings.SECTION_INI_CORE, "RAMOverrideEnable",
+ false),
MAIN_AUTO_DISC_CHANGE(Settings.FILE_DOLPHIN, Settings.SECTION_INI_CORE, "AutoDiscChange", false),
MAIN_ALLOW_SD_WRITES(Settings.FILE_DOLPHIN, Settings.SECTION_INI_CORE, "WiiSDCardAllowWrites",
true),
@@ -264,6 +266,7 @@ public enum BooleanSetting implements AbstractBooleanSetting
MAIN_MMU,
MAIN_PAUSE_ON_PANIC,
MAIN_ACCURATE_CPU_CACHE,
+ MAIN_RAM_OVERRIDE_ENABLE,
MAIN_DSP_JIT,
};
diff --git a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/features/settings/model/IntSetting.java b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/features/settings/model/IntSetting.java
index 17eee510bb..52d8507658 100644
--- a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/features/settings/model/IntSetting.java
+++ b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/features/settings/model/IntSetting.java
@@ -18,6 +18,8 @@ public enum IntSetting implements AbstractIntSetting
MAIN_CPU_CORE(Settings.FILE_DOLPHIN, Settings.SECTION_INI_CORE, "CPUCore",
NativeLibrary.DefaultCPUCore()),
MAIN_GC_LANGUAGE(Settings.FILE_DOLPHIN, Settings.SECTION_INI_CORE, "SelectedLanguage", 0),
+ MAIN_MEM1_SIZE(Settings.FILE_DOLPHIN, Settings.SECTION_INI_CORE, "MEM1Size", 0x01800000),
+ MAIN_MEM2_SIZE(Settings.FILE_DOLPHIN, Settings.SECTION_INI_CORE, "MEM2Size", 0x04000000),
MAIN_SLOT_A(Settings.FILE_DOLPHIN, Settings.SECTION_INI_CORE, "SlotA", 8),
MAIN_SLOT_B(Settings.FILE_DOLPHIN, Settings.SECTION_INI_CORE, "SlotB", 255),
MAIN_SERIAL_PORT_1(Settings.FILE_DOLPHIN, Settings.SECTION_INI_CORE, "SerialPort1", 255),
@@ -83,6 +85,8 @@ public enum IntSetting implements AbstractIntSetting
private static final IntSetting[] NOT_RUNTIME_EDITABLE_ARRAY = new IntSetting[]{
MAIN_CPU_CORE,
MAIN_GC_LANGUAGE,
+ MAIN_MEM1_SIZE,
+ MAIN_MEM2_SIZE,
MAIN_SLOT_A, // Can actually be changed, but specific code is required
MAIN_SLOT_B, // Can actually be changed, but specific code is required
MAIN_SERIAL_PORT_1,
diff --git a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/features/settings/ui/SettingsFragmentPresenter.java b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/features/settings/ui/SettingsFragmentPresenter.java
index 46beddcd78..457d056497 100644
--- a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/features/settings/ui/SettingsFragmentPresenter.java
+++ b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/features/settings/ui/SettingsFragmentPresenter.java
@@ -729,6 +729,78 @@ public final class SettingsFragmentPresenter
R.string.overclock_enable, R.string.overclock_enable_description));
sl.add(new PercentSliderSetting(mContext, FloatSetting.MAIN_OVERCLOCK, R.string.overclock_title,
R.string.overclock_title_description, 0, 400, "%"));
+
+ AbstractIntSetting mem1Setting = new AbstractIntSetting()
+ {
+ @Override
+ public int getInt(Settings settings)
+ {
+ return IntSetting.MAIN_MEM1_SIZE.getInt(settings) / 1024 / 1024;
+ }
+
+ @Override
+ public void setInt(Settings settings, int newValue)
+ {
+ IntSetting.MAIN_MEM1_SIZE.setInt(settings, newValue * 1024 * 1024);
+ }
+
+ @Override
+ public boolean isOverridden(Settings settings)
+ {
+ return IntSetting.MAIN_MEM1_SIZE.isOverridden(settings);
+ }
+
+ @Override
+ public boolean isRuntimeEditable()
+ {
+ return IntSetting.MAIN_MEM1_SIZE.isRuntimeEditable();
+ }
+
+ @Override
+ public boolean delete(Settings settings)
+ {
+ return IntSetting.MAIN_MEM1_SIZE.delete(settings);
+ }
+ };
+ AbstractIntSetting mem2Setting = new AbstractIntSetting()
+ {
+ @Override
+ public int getInt(Settings settings)
+ {
+ return IntSetting.MAIN_MEM2_SIZE.getInt(settings) / 1024 / 1024;
+ }
+
+ @Override
+ public void setInt(Settings settings, int newValue)
+ {
+ IntSetting.MAIN_MEM2_SIZE.setInt(settings, newValue * 1024 * 1024);
+ }
+
+ @Override
+ public boolean isOverridden(Settings settings)
+ {
+ return IntSetting.MAIN_MEM2_SIZE.isOverridden(settings);
+ }
+
+ @Override
+ public boolean isRuntimeEditable()
+ {
+ return IntSetting.MAIN_MEM2_SIZE.isRuntimeEditable();
+ }
+
+ @Override
+ public boolean delete(Settings settings)
+ {
+ return IntSetting.MAIN_MEM2_SIZE.delete(settings);
+ }
+ };
+ sl.add(new HeaderSetting(mContext, R.string.memory_override, 0));
+ sl.add(new SwitchSetting(mContext, BooleanSetting.MAIN_RAM_OVERRIDE_ENABLE,
+ R.string.enable_memory_size_override,
+ R.string.enable_memory_size_override_description));
+ sl.add(new IntSliderSetting(mContext, mem1Setting, R.string.main_mem1_size, 0, 24, 64, "MB"));
+ sl.add(new IntSliderSetting(mContext, mem2Setting, R.string.main_mem2_size, 0, 64, 128, "MB"));
+
sl.add(new SingleChoiceSetting(mContext, synchronizeGpuThread, R.string.synchronize_gpu_thread,
R.string.synchronize_gpu_thread_description, R.array.synchronizeGpuThreadEntries,
R.array.synchronizeGpuThreadValues));
diff --git a/Source/Android/app/src/main/res/values/strings.xml b/Source/Android/app/src/main/res/values/strings.xml
index 4665046fa5..ed5631a3dc 100644
--- a/Source/Android/app/src/main/res/values/strings.xml
+++ b/Source/Android/app/src/main/res/values/strings.xml
@@ -392,6 +392,11 @@
Higher values can make variable-framerate games run at a higher framerate, requiring a powerful device. Lower values make games run at a lower framerate, increasing emulation speed, but reducing the emulated console\'s performance.
Emulated CPU Clock Speed
Adjusts the emulated CPU\'s clock rate if \"Override Emulated CPU Clock Speed\" is enabled.
+ Memory Override
+ Enable Emulated Memory Size Override
+ Adjusts the amount of RAM in the emulated console.\n\nWARNING: Enabling this will completely break many games. Only a small number of games can benefit from this.
+ MEM1 Size
+ MEM2 Size
Synchronize GPU Thread
Synchronizing the GPU thread reduces the risk of games crashing or becoming unstable with dual core enabled, but can also reduce the performance gain of dual core. If unsure, select \"On Idle Skipping\". Selecting \"Never\" is risky and not recommended!