Android: Add jit debug menu options

This commit is contained in:
zackhow 2018-12-03 00:13:27 -05:00
parent 233b00fb7e
commit 7b2629717b
5 changed files with 84 additions and 1 deletions

View File

@ -21,6 +21,8 @@ public class Settings
public static final String SECTION_GFX_ENHANCEMENTS = "Enhancements";
public static final String SECTION_GFX_HACKS = "Hacks";
public static final String SECTION_DEBUG = "Debug";
public static final String SECTION_STEREOSCOPY = "Stereoscopy";
public static final String SECTION_WIIMOTE = "Wiimote";
@ -39,7 +41,7 @@ public class Settings
{
configFileSectionsMap.put(SettingsFile.FILE_NAME_DOLPHIN,
Arrays.asList(SECTION_INI_CORE, SECTION_INI_INTERFACE, SECTION_BINDINGS,
SECTION_ANALYTICS));
SECTION_ANALYTICS, SECTION_DEBUG));
configFileSectionsMap.put(SettingsFile.FILE_NAME_GFX,
Arrays.asList(SECTION_GFX_SETTINGS, SECTION_GFX_ENHANCEMENTS, SECTION_GFX_HACKS,
SECTION_STEREOSCOPY));

View File

@ -12,6 +12,7 @@ public enum MenuTag
GCPAD_TYPE("gc_pad_type"),
GRAPHICS("graphics"),
HACKS("hacks"),
DEBUG("debug"),
ENHANCEMENTS("enhancements"),
STEREOSCOPY("stereoscopy"),
GCPAD_1("gcpad", 0),

View File

@ -161,6 +161,10 @@ public final class SettingsFragmentPresenter
addHackSettings(sl);
break;
case DEBUG:
addDebugSettings(sl);
break;
case GCPAD_1:
case GCPAD_2:
case GCPAD_3:
@ -202,6 +206,7 @@ public final class SettingsFragmentPresenter
sl.add(new SubmenuSetting(null, null, R.string.gamecube_submenu, 0, MenuTag.CONFIG_GAME_CUBE));
sl.add(new SubmenuSetting(null, null, R.string.wii_submenu, 0, MenuTag.CONFIG_WII));
sl.add(new SubmenuSetting(null, null, R.string.debug_submenu, 0, MenuTag.DEBUG));
sl.add(new HeaderSetting(null, null, R.string.gametdb_thanks, 0));
}
@ -606,6 +611,57 @@ public final class SettingsFragmentPresenter
fastDepth));
}
private void addDebugSettings(ArrayList<SettingsItem> sl)
{
SettingSection debugSection = mSettings.getSection(Settings.SECTION_DEBUG);
Setting jitOff = debugSection.getSetting(SettingsFile.KEY_DEBUG_JITOFF);
Setting jitLoadStoreOff = debugSection.getSetting(SettingsFile.KEY_DEBUG_JITLOADSTOREOFF);
Setting jitLoadStoreFloatingPointOff =
debugSection.getSetting(SettingsFile.KEY_DEBUG_JITLOADSTOREFLOATINGPOINTOFF);
Setting jitLoadStorePairedOff =
debugSection.getSetting(SettingsFile.KEY_DEBUG_JITLOADSTOREPAIREDOFF);
Setting jitFloatingPointOff =
debugSection.getSetting(SettingsFile.KEY_DEBUG_JITFLOATINGPOINTOFF);
Setting jitIntegerOff = debugSection.getSetting(SettingsFile.KEY_DEBUG_JITINTEGEROFF);
Setting jitPairedOff = debugSection.getSetting(SettingsFile.KEY_DEBUG_JITPAIREDOFF);
Setting jitSystemRegistersOff =
debugSection.getSetting(SettingsFile.KEY_DEBUG_JITSYSTEMREGISTEROFF);
Setting jitBranchOff = debugSection.getSetting(SettingsFile.KEY_DEBUG_JITBRANCHOFF);
sl.add(new HeaderSetting(null, null, R.string.debug_warning, 0));
sl.add(new HeaderSetting(null, null, R.string.debug_jit_header, 0));
sl.add(new CheckBoxSetting(SettingsFile.KEY_DEBUG_JITOFF, Settings.SECTION_DEBUG,
R.string.debug_jitoff, 0, false,
jitOff));
sl.add(new CheckBoxSetting(SettingsFile.KEY_DEBUG_JITLOADSTOREOFF, Settings.SECTION_DEBUG,
R.string.debug_jitloadstoreoff, 0, false,
jitLoadStoreOff));
sl.add(new CheckBoxSetting(SettingsFile.KEY_DEBUG_JITLOADSTOREFLOATINGPOINTOFF,
Settings.SECTION_DEBUG,
R.string.debug_jitloadstorefloatingoff, 0, false,
jitLoadStoreFloatingPointOff));
sl.add(new CheckBoxSetting(SettingsFile.KEY_DEBUG_JITLOADSTOREPAIREDOFF, Settings.SECTION_DEBUG,
R.string.debug_jitloadstorepairedoff, 0, false,
jitLoadStorePairedOff));
sl.add(new CheckBoxSetting(SettingsFile.KEY_DEBUG_JITFLOATINGPOINTOFF, Settings.SECTION_DEBUG,
R.string.debug_jitfloatingpointoff, 0, false,
jitFloatingPointOff));
sl.add(new CheckBoxSetting(SettingsFile.KEY_DEBUG_JITINTEGEROFF, Settings.SECTION_DEBUG,
R.string.debug_jitintegeroff, 0, false,
jitIntegerOff));
sl.add(new CheckBoxSetting(SettingsFile.KEY_DEBUG_JITPAIREDOFF, Settings.SECTION_DEBUG,
R.string.debug_jitpairedoff, 0, false,
jitPairedOff));
sl.add(new CheckBoxSetting(SettingsFile.KEY_DEBUG_JITSYSTEMREGISTEROFF, Settings.SECTION_DEBUG,
R.string.debug_jitsystemregistersoffr, 0, false,
jitSystemRegistersOff));
sl.add(new CheckBoxSetting(SettingsFile.KEY_DEBUG_JITBRANCHOFF, Settings.SECTION_DEBUG,
R.string.debug_jitbranchoff, 0, false,
jitBranchOff));
}
private void addStereoSettings(ArrayList<SettingsItem> sl)
{
SettingSection stereoScopySection = mSettings.getSection(Settings.SECTION_STEREOSCOPY);

View File

@ -90,6 +90,16 @@ public final class SettingsFile
public static final String KEY_SHADER_COMPILATION_MODE = "ShaderCompilationMode";
public static final String KEY_WAIT_FOR_SHADERS = "WaitForShadersBeforeStarting";
public static final String KEY_DEBUG_JITOFF = "JitOff";
public static final String KEY_DEBUG_JITLOADSTOREOFF = "JitLoadStoreOff";
public static final String KEY_DEBUG_JITLOADSTOREFLOATINGPOINTOFF = "JitLoadStoreFloatingOff";
public static final String KEY_DEBUG_JITLOADSTOREPAIREDOFF = "JitLoadStorePairedOff";
public static final String KEY_DEBUG_JITFLOATINGPOINTOFF = "JitFloatingPointOff";
public static final String KEY_DEBUG_JITINTEGEROFF = "JitIntegerOff";
public static final String KEY_DEBUG_JITPAIREDOFF = "JitPairedOff";
public static final String KEY_DEBUG_JITSYSTEMREGISTEROFF = "JitSystemRegistersOff";
public static final String KEY_DEBUG_JITBRANCHOFF = "JitBranchOff";
public static final String KEY_GCPAD_TYPE = "SIDevice";
public static final String KEY_GCPAD_G_TYPE = "PadType";

View File

@ -230,6 +230,20 @@
<string name="wait_for_shaders">Compile Shaders Before Starting</string>
<string name="wait_for_shaders_description">This causes a delay when launching games, but will reduce stuttering early on.</string>
<!-- Debug -->
<string name="debug_submenu">Debug</string>
<string name="debug_warning">Warning: These settings will slow emulation</string>
<string name="debug_jit_header">Jit</string>
<string name="debug_jitoff">Jit Disabled</string>
<string name="debug_jitloadstoreoff">Jit Load Store Disabled</string>
<string name="debug_jitloadstorefloatingoff">Jit Load Store Floating Point Disabled</string>
<string name="debug_jitloadstorepairedoff">Jit Load Store Paired Disabled</string>
<string name="debug_jitfloatingpointoff">Jit Floating Point Disabled</string>
<string name="debug_jitintegeroff">Jit Integer Disabled</string>
<string name="debug_jitpairedoff">Jit Paired Disabled</string>
<string name="debug_jitsystemregistersoffr">Jit System Registers Disabled</string>
<string name="debug_jitbranchoff">Jit Branch Disabled</string>
<!-- Miscellaneous -->
<string name="yes">Yes</string>
<string name="no">No</string>