Merge pull request #7605 from zackhow/jitarmconfigs

Android: Add Jit debug options to menu.
This commit is contained in:
Anthony 2019-01-07 13:50:57 -08:00 committed by GitHub
commit 3da06970d9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 117 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>

View File

@ -92,6 +92,7 @@ void SConfig::SaveSettings()
SaveBluetoothPassthroughSettings(ini);
SaveUSBPassthroughSettings(ini);
SaveAutoUpdateSettings(ini);
SaveJitDebugSettings(ini);
ini.Save(File::GetUserPath(F_DOLPHINCONFIG_IDX));
@ -352,6 +353,21 @@ void SConfig::SaveAutoUpdateSettings(IniFile& ini)
section->Set("HashOverride", m_auto_update_hash_override);
}
void SConfig::SaveJitDebugSettings(IniFile& ini)
{
IniFile::Section* section = ini.GetOrCreateSection("Debug");
section->Set("JitOff", bJITOff);
section->Set("JitLoadStoreOff", bJITLoadStoreOff);
section->Set("JitLoadStoreFloatingOff", bJITLoadStoreFloatingOff);
section->Set("JitLoadStorePairedOff", bJITLoadStorePairedOff);
section->Set("JitFloatingPointOff", bJITFloatingPointOff);
section->Set("JitIntegerOff", bJITIntegerOff);
section->Set("JitPairedOff", bJITPairedOff);
section->Set("JitSystemRegistersOff", bJITSystemRegistersOff);
section->Set("JitBranchOff", bJITBranchOff);
}
void SConfig::LoadSettings()
{
Config::Load();
@ -374,6 +390,7 @@ void SConfig::LoadSettings()
LoadBluetoothPassthroughSettings(ini);
LoadUSBPassthroughSettings(ini);
LoadAutoUpdateSettings(ini);
LoadJitDebugSettings(ini);
}
void SConfig::LoadGeneralSettings(IniFile& ini)
@ -647,6 +664,20 @@ void SConfig::LoadAutoUpdateSettings(IniFile& ini)
section->Get("HashOverride", &m_auto_update_hash_override, "");
}
void SConfig::LoadJitDebugSettings(IniFile& ini)
{
IniFile::Section* section = ini.GetOrCreateSection("Debug");
section->Get("JitOff", &bJITOff, false);
section->Get("JitLoadStoreOff", &bJITLoadStoreOff, false);
section->Get("JitLoadStoreFloatingOff", &bJITLoadStoreFloatingOff, false);
section->Get("JitLoadStorePairedOff", &bJITLoadStorePairedOff, false);
section->Get("JitFloatingPointOff", &bJITFloatingPointOff, false);
section->Get("JitIntegerOff", &bJITIntegerOff, false);
section->Get("JitPairedOff", &bJITPairedOff, false);
section->Get("JitSystemRegistersOff", &bJITSystemRegistersOff, false);
section->Get("JitBranchOff", &bJITBranchOff, false);
}
void SConfig::ResetRunningGameMetadata()
{
SetRunningGameMetadata("00000000", 0, 0, Core::TitleDatabase::TitleType::Other);

View File

@ -349,6 +349,7 @@ private:
void SaveBluetoothPassthroughSettings(IniFile& ini);
void SaveUSBPassthroughSettings(IniFile& ini);
void SaveAutoUpdateSettings(IniFile& ini);
void SaveJitDebugSettings(IniFile& ini);
void LoadGeneralSettings(IniFile& ini);
void LoadInterfaceSettings(IniFile& ini);
@ -364,6 +365,7 @@ private:
void LoadBluetoothPassthroughSettings(IniFile& ini);
void LoadUSBPassthroughSettings(IniFile& ini);
void LoadAutoUpdateSettings(IniFile& ini);
void LoadJitDebugSettings(IniFile& ini);
void SetRunningGameMetadata(const std::string& game_id, u64 title_id, u16 revision,
Core::TitleDatabase::TitleType type);