| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,108 @@ | ||
| // Copyright 2017 Dolphin Emulator Project | ||
| // Licensed under GPLv2+ | ||
| // Refer to the license.txt file included. | ||
|
|
||
| #include "Core/Config/MainSettings.h" | ||
|
|
||
| #include "AudioCommon/AudioCommon.h" | ||
| #include "Common/Config/Config.h" | ||
| #include "Common/StringUtil.h" | ||
| #include "Core/HW/EXI/EXI_Device.h" | ||
| #include "Core/HW/SI/SI_Device.h" | ||
| #include "Core/PowerPC/PowerPC.h" | ||
|
|
||
| namespace Config | ||
| { | ||
| // Main.Core | ||
|
|
||
| const ConfigInfo<bool> MAIN_SKIP_IPL{{System::Main, "Core", "SkipIPL"}, true}; | ||
| const ConfigInfo<int> MAIN_CPU_CORE{{System::Main, "Core", "CPUCore"}, PowerPC::DefaultCPUCore()}; | ||
| const ConfigInfo<bool> MAIN_FASTMEM{{System::Main, "Core", "Fastmem"}, true}; | ||
| const ConfigInfo<bool> MAIN_DSP_HLE{{System::Main, "Core", "DSPHLE"}, true}; | ||
| const ConfigInfo<int> MAIN_TIMING_VARIANCE{{System::Main, "Core", "TimingVariance"}, 40}; | ||
| const ConfigInfo<bool> MAIN_CPU_THREAD{{System::Main, "Core", "CPUThread"}, true}; | ||
| const ConfigInfo<bool> MAIN_SYNC_ON_SKIP_IDLE{{System::Main, "Core", "SyncOnSkipIdle"}, true}; | ||
| const ConfigInfo<std::string> MAIN_DEFAULT_ISO{{System::Main, "Core", "DefaultISO"}, ""}; | ||
| const ConfigInfo<bool> MAIN_ENABLE_CHEATS{{System::Main, "Core", "EnableCheats"}, false}; | ||
| const ConfigInfo<int> MAIN_GC_LANGUAGE{{System::Main, "Core", "SelectedLanguage"}, 0}; | ||
| const ConfigInfo<bool> MAIN_OVERRIDE_GC_LANGUAGE{{System::Main, "Core", "OverrideGCLang"}, false}; | ||
| const ConfigInfo<bool> MAIN_DPL2_DECODER{{System::Main, "Core", "DPL2Decoder"}, false}; | ||
| const ConfigInfo<int> MAIN_AUDIO_LATENCY{{System::Main, "Core", "AudioLatency"}, 20}; | ||
| const ConfigInfo<bool> MAIN_AUDIO_STRETCH{{System::Main, "Core", "AudioStretch"}, false}; | ||
| const ConfigInfo<int> MAIN_AUDIO_STRETCH_LATENCY{{System::Main, "Core", "AudioStretchMaxLatency"}, | ||
| 80}; | ||
| const ConfigInfo<std::string> MAIN_MEMCARD_A_PATH{{System::Main, "Core", "MemcardAPath"}, ""}; | ||
| const ConfigInfo<std::string> MAIN_MEMCARD_B_PATH{{System::Main, "Core", "MemcardBPath"}, ""}; | ||
| const ConfigInfo<std::string> MAIN_AGP_CART_A_PATH{{System::Main, "Core", "AgpCartAPath"}, ""}; | ||
| const ConfigInfo<std::string> MAIN_AGP_CART_B_PATH{{System::Main, "Core", "AgpCartBPath"}, ""}; | ||
| const ConfigInfo<int> MAIN_SLOT_A{{System::Main, "Core", "SlotA"}, | ||
| ExpansionInterface::EXIDEVICE_MEMORYCARDFOLDER}; | ||
| const ConfigInfo<int> MAIN_SLOT_B{{System::Main, "Core", "SlotB"}, | ||
| ExpansionInterface::EXIDEVICE_NONE}; | ||
| const ConfigInfo<int> MAIN_SERIAL_PORT_1{{System::Main, "Core", "SerialPort1"}, | ||
| ExpansionInterface::EXIDEVICE_NONE}; | ||
| const ConfigInfo<std::string> MAIN_BBA_MAC{{System::Main, "Core", "BBA_MAC"}, ""}; | ||
|
|
||
| ConfigInfo<u32> GetInfoForSIDevice(u32 channel) | ||
| { | ||
| return {{System::Main, "Core", StringFromFormat("SIDevice%u", channel)}, | ||
| static_cast<u32>(channel == 0 ? SerialInterface::SIDEVICE_GC_CONTROLLER : | ||
| SerialInterface::SIDEVICE_NONE)}; | ||
| } | ||
|
|
||
| ConfigInfo<bool> GetInfoForAdapterRumble(u32 channel) | ||
| { | ||
| return {{System::Main, "Core", StringFromFormat("AdapterRumble%u", channel)}, true}; | ||
| } | ||
|
|
||
| ConfigInfo<bool> GetInfoForSimulateKonga(u32 channel) | ||
| { | ||
| return {{System::Main, "Core", StringFromFormat("SimulateKonga%u", channel)}, false}; | ||
| } | ||
|
|
||
| const ConfigInfo<bool> MAIN_WII_SD_CARD{{System::Main, "Core", "WiiSDCard"}, false}; | ||
| const ConfigInfo<bool> MAIN_WII_KEYBOARD{{System::Main, "Core", "WiiKeyboard"}, false}; | ||
| const ConfigInfo<bool> MAIN_WIIMOTE_CONTINUOUS_SCANNING{ | ||
| {System::Main, "Core", "WiimoteContinuousScanning"}, false}; | ||
| const ConfigInfo<bool> MAIN_WIIMOTE_ENABLE_SPEAKER{{System::Main, "Core", "WiimoteEnableSpeaker"}, | ||
| false}; | ||
| const ConfigInfo<bool> MAIN_RUN_COMPARE_SERVER{{System::Main, "Core", "RunCompareServer"}, false}; | ||
| const ConfigInfo<bool> MAIN_RUN_COMPARE_CLIENT{{System::Main, "Core", "RunCompareClient"}, false}; | ||
| const ConfigInfo<bool> MAIN_MMU{{System::Main, "Core", "MMU"}, false}; | ||
| const ConfigInfo<int> MAIN_BB_DUMP_PORT{{System::Main, "Core", "BBDumpPort"}, -1}; | ||
| const ConfigInfo<bool> MAIN_SYNC_GPU{{System::Main, "Core", "SyncGPU"}, false}; | ||
| const ConfigInfo<int> MAIN_SYNC_GPU_MAX_DISTANCE{{System::Main, "Core", "SyncGpuMaxDistance"}, | ||
| 200000}; | ||
| const ConfigInfo<int> MAIN_SYNC_GPU_MIN_DISTANCE{{System::Main, "Core", "SyncGpuMinDistance"}, | ||
| -200000}; | ||
| const ConfigInfo<float> MAIN_SYNC_GPU_OVERCLOCK{{System::Main, "Core", "SyncGpuOverclock"}, 1.0f}; | ||
| const ConfigInfo<bool> MAIN_FAST_DISC_SPEED{{System::Main, "Core", "FastDiscSpeed"}, false}; | ||
| const ConfigInfo<bool> MAIN_DCBZ{{System::Main, "Core", "DCBZ"}, false}; | ||
| const ConfigInfo<bool> MAIN_LOW_DCBZ_HACK{{System::Main, "Core", "LowDCBZHack"}, false}; | ||
| const ConfigInfo<bool> MAIN_FPRF{{System::Main, "Core", "FPRF"}, false}; | ||
| const ConfigInfo<bool> MAIN_ACCURATE_NANS{{System::Main, "Core", "AccurateNaNs"}, false}; | ||
| const ConfigInfo<float> MAIN_EMULATION_SPEED{{System::Main, "Core", "EmulationSpeed"}, 1.0f}; | ||
| const ConfigInfo<float> MAIN_OVERCLOCK{{System::Main, "Core", "Overclock"}, 1.0f}; | ||
| const ConfigInfo<bool> MAIN_OVERCLOCK_ENABLE{{System::Main, "Core", "OverclockEnable"}, false}; | ||
| const ConfigInfo<std::string> MAIN_GFX_BACKEND{{System::Main, "Core", "GFXBackend"}, ""}; | ||
| const ConfigInfo<std::string> MAIN_GPU_DETERMINISM_MODE{ | ||
| {System::Main, "Core", "GPUDeterminismMode"}, "auto"}; | ||
| const ConfigInfo<std::string> MAIN_PERF_MAP_DIR{{System::Main, "Core", "PerfMapDir"}, ""}; | ||
| const ConfigInfo<bool> MAIN_CUSTOM_RTC_ENABLE{{System::Main, "Core", "EnableCustomRTC"}, false}; | ||
| // Default to seconds between 1.1.1970 and 1.1.2000 | ||
| const ConfigInfo<u32> MAIN_CUSTOM_RTC_VALUE{{System::Main, "Core", "CustomRTCValue"}, 946684800}; | ||
| const ConfigInfo<bool> MAIN_ENABLE_SIGNATURE_CHECKS{{System::Main, "Core", "EnableSignatureChecks"}, | ||
| true}; | ||
|
|
||
| // Main.DSP | ||
|
|
||
| const ConfigInfo<bool> MAIN_DSP_CAPTURE_LOG{{System::Main, "DSP", "CaptureLog"}, false}; | ||
| const ConfigInfo<bool> MAIN_DSP_JIT{{System::Main, "DSP", "EnableJIT"}, true}; | ||
| const ConfigInfo<bool> MAIN_DUMP_AUDIO{{System::Main, "DSP", "DumpAudio"}, false}; | ||
| const ConfigInfo<bool> MAIN_DUMP_AUDIO_SILENT{{System::Main, "DSP", "DumpAudioSilent"}, false}; | ||
| const ConfigInfo<bool> MAIN_DUMP_UCODE{{System::Main, "DSP", "DumpUCode"}, false}; | ||
| const ConfigInfo<std::string> MAIN_AUDIO_BACKEND{{System::Main, "DSP", "Backend"}, | ||
| AudioCommon::GetDefaultSoundBackend()}; | ||
| const ConfigInfo<int> MAIN_AUDIO_VOLUME{{System::Main, "DSP", "Volume"}, 100}; | ||
|
|
||
| } // namespace Config |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,80 @@ | ||
| // Copyright 2017 Dolphin Emulator Project | ||
| // Licensed under GPLv2+ | ||
| // Refer to the license.txt file included. | ||
|
|
||
| #pragma once | ||
|
|
||
| #include <string> | ||
|
|
||
| #include "Common/Config/Config.h" | ||
|
|
||
| namespace Config | ||
| { | ||
| // Main.Core | ||
|
|
||
| extern const ConfigInfo<bool> MAIN_SKIP_IPL; | ||
| extern const ConfigInfo<int> MAIN_CPU_CORE; | ||
| extern const ConfigInfo<bool> MAIN_FASTMEM; | ||
| // Should really be in the DSP section, but we're kind of stuck with bad decisions made in the past. | ||
| extern const ConfigInfo<bool> MAIN_DSP_HLE; | ||
| extern const ConfigInfo<int> MAIN_TIMING_VARIANCE; | ||
| extern const ConfigInfo<bool> MAIN_CPU_THREAD; | ||
| extern const ConfigInfo<bool> MAIN_SYNC_ON_SKIP_IDLE; | ||
| extern const ConfigInfo<std::string> MAIN_DEFAULT_ISO; | ||
| extern const ConfigInfo<bool> MAIN_ENABLE_CHEATS; | ||
| extern const ConfigInfo<int> MAIN_GC_LANGUAGE; | ||
| extern const ConfigInfo<bool> MAIN_OVERRIDE_GC_LANGUAGE; | ||
| extern const ConfigInfo<bool> MAIN_DPL2_DECODER; | ||
| extern const ConfigInfo<int> MAIN_AUDIO_LATENCY; | ||
| extern const ConfigInfo<bool> MAIN_AUDIO_STRETCH; | ||
| extern const ConfigInfo<int> MAIN_AUDIO_STRETCH_LATENCY; | ||
| extern const ConfigInfo<std::string> MAIN_MEMCARD_A_PATH; | ||
| extern const ConfigInfo<std::string> MAIN_MEMCARD_B_PATH; | ||
| extern const ConfigInfo<std::string> MAIN_AGP_CART_A_PATH; | ||
| extern const ConfigInfo<std::string> MAIN_AGP_CART_B_PATH; | ||
| extern const ConfigInfo<int> MAIN_SLOT_A; | ||
| extern const ConfigInfo<int> MAIN_SLOT_B; | ||
| extern const ConfigInfo<int> MAIN_SERIAL_PORT_1; | ||
| extern const ConfigInfo<std::string> MAIN_BBA_MAC; | ||
| ConfigInfo<u32> GetInfoForSIDevice(u32 channel); | ||
| ConfigInfo<bool> GetInfoForAdapterRumble(u32 channel); | ||
| ConfigInfo<bool> GetInfoForSimulateKonga(u32 channel); | ||
| extern const ConfigInfo<bool> MAIN_WII_SD_CARD; | ||
| extern const ConfigInfo<bool> MAIN_WII_KEYBOARD; | ||
| extern const ConfigInfo<bool> MAIN_WIIMOTE_CONTINUOUS_SCANNING; | ||
| extern const ConfigInfo<bool> MAIN_WIIMOTE_ENABLE_SPEAKER; | ||
| extern const ConfigInfo<bool> MAIN_RUN_COMPARE_SERVER; | ||
| extern const ConfigInfo<bool> MAIN_RUN_COMPARE_CLIENT; | ||
| extern const ConfigInfo<bool> MAIN_MMU; | ||
| extern const ConfigInfo<int> MAIN_BB_DUMP_PORT; | ||
| extern const ConfigInfo<bool> MAIN_SYNC_GPU; | ||
| extern const ConfigInfo<int> MAIN_SYNC_GPU_MAX_DISTANCE; | ||
| extern const ConfigInfo<int> MAIN_SYNC_GPU_MIN_DISTANCE; | ||
| extern const ConfigInfo<float> MAIN_SYNC_GPU_OVERCLOCK; | ||
| extern const ConfigInfo<bool> MAIN_FAST_DISC_SPEED; | ||
| extern const ConfigInfo<bool> MAIN_DCBZ; | ||
| extern const ConfigInfo<bool> MAIN_LOW_DCBZ_HACK; | ||
| extern const ConfigInfo<bool> MAIN_FPRF; | ||
| extern const ConfigInfo<bool> MAIN_ACCURATE_NANS; | ||
| extern const ConfigInfo<float> MAIN_EMULATION_SPEED; | ||
| extern const ConfigInfo<float> MAIN_OVERCLOCK; | ||
| extern const ConfigInfo<bool> MAIN_OVERCLOCK_ENABLE; | ||
| // Should really be part of System::GFX, but again, we're stuck with past mistakes. | ||
| extern const ConfigInfo<std::string> MAIN_GFX_BACKEND; | ||
| extern const ConfigInfo<std::string> MAIN_GPU_DETERMINISM_MODE; | ||
| extern const ConfigInfo<std::string> MAIN_PERF_MAP_DIR; | ||
| extern const ConfigInfo<bool> MAIN_CUSTOM_RTC_ENABLE; | ||
| extern const ConfigInfo<u32> MAIN_CUSTOM_RTC_VALUE; | ||
| extern const ConfigInfo<bool> MAIN_ENABLE_SIGNATURE_CHECKS; | ||
|
|
||
| // Main.DSP | ||
|
|
||
| extern const ConfigInfo<bool> MAIN_DSP_CAPTURE_LOG; | ||
| extern const ConfigInfo<bool> MAIN_DSP_JIT; | ||
| extern const ConfigInfo<bool> MAIN_DUMP_AUDIO; | ||
| extern const ConfigInfo<bool> MAIN_DUMP_AUDIO_SILENT; | ||
| extern const ConfigInfo<bool> MAIN_DUMP_UCODE; | ||
| extern const ConfigInfo<std::string> MAIN_AUDIO_BACKEND; | ||
| extern const ConfigInfo<int> MAIN_AUDIO_VOLUME; | ||
|
|
||
| } // namespace Config |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,34 @@ | ||
| // Copyright 2017 Dolphin Emulator Project | ||
| // Licensed under GPLv2+ | ||
| // Refer to the license.txt file included. | ||
|
|
||
| #include "Core/Config/SYSCONFSettings.h" | ||
|
|
||
| namespace Config | ||
| { | ||
| // SYSCONF.IPL | ||
|
|
||
| const ConfigInfo<bool> SYSCONF_SCREENSAVER{{System::SYSCONF, "IPL", "SSV"}, false}; | ||
| const ConfigInfo<u32> SYSCONF_LANGUAGE{{System::SYSCONF, "IPL", "LNG"}, 0x01}; | ||
| const ConfigInfo<bool> SYSCONF_WIDESCREEN{{System::SYSCONF, "IPL", "AR"}, true}; | ||
| const ConfigInfo<bool> SYSCONF_PROGRESSIVE_SCAN{{System::SYSCONF, "IPL", "PGS"}, true}; | ||
| const ConfigInfo<bool> SYSCONF_PAL60{{System::SYSCONF, "IPL", "E60"}, 0x01}; | ||
|
|
||
| // SYSCONF.BT | ||
|
|
||
| const ConfigInfo<u32> SYSCONF_SENSOR_BAR_POSITION{{System::SYSCONF, "BT", "BAR"}, 0x01}; | ||
| const ConfigInfo<u32> SYSCONF_SENSOR_BAR_SENSITIVITY{{System::SYSCONF, "BT", "SENS"}, 0x03}; | ||
| const ConfigInfo<u32> SYSCONF_SPEAKER_VOLUME{{System::SYSCONF, "BT", "SPKV"}, 0x58}; | ||
| const ConfigInfo<bool> SYSCONF_WIIMOTE_MOTOR{{System::SYSCONF, "BT", "MOT"}, true}; | ||
|
|
||
| const std::array<SYSCONFSetting, 9> SYSCONF_SETTINGS{ | ||
| {{SYSCONF_SCREENSAVER, SysConf::Entry::Type::Byte}, | ||
| {SYSCONF_LANGUAGE, SysConf::Entry::Type::Byte}, | ||
| {SYSCONF_WIDESCREEN, SysConf::Entry::Type::Byte}, | ||
| {SYSCONF_PROGRESSIVE_SCAN, SysConf::Entry::Type::Byte}, | ||
| {SYSCONF_PAL60, SysConf::Entry::Type::Byte}, | ||
| {SYSCONF_SENSOR_BAR_POSITION, SysConf::Entry::Type::Byte}, | ||
| {SYSCONF_SENSOR_BAR_SENSITIVITY, SysConf::Entry::Type::Long}, | ||
| {SYSCONF_SPEAKER_VOLUME, SysConf::Entry::Type::Byte}, | ||
| {SYSCONF_WIIMOTE_MOTOR, SysConf::Entry::Type::Byte}}}; | ||
| } // namespace Config |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,40 @@ | ||
| // Copyright 2017 Dolphin Emulator Project | ||
| // Licensed under GPLv2+ | ||
| // Refer to the license.txt file included. | ||
|
|
||
| #pragma once | ||
|
|
||
| #include <array> | ||
| #include <variant> | ||
|
|
||
| #include "Common/Config/Config.h" | ||
| #include "Common/SysConf.h" | ||
|
|
||
| namespace Config | ||
| { | ||
| // Note: some settings are actually u8s, but stored as u32 in the layer because of limitations. | ||
|
|
||
| // SYSCONF.IPL | ||
|
|
||
| extern const ConfigInfo<bool> SYSCONF_SCREENSAVER; | ||
| extern const ConfigInfo<u32> SYSCONF_LANGUAGE; | ||
| extern const ConfigInfo<bool> SYSCONF_WIDESCREEN; | ||
| extern const ConfigInfo<bool> SYSCONF_PROGRESSIVE_SCAN; | ||
| extern const ConfigInfo<bool> SYSCONF_PAL60; | ||
|
|
||
| // SYSCONF.BT | ||
|
|
||
| extern const ConfigInfo<u32> SYSCONF_SENSOR_BAR_POSITION; | ||
| extern const ConfigInfo<u32> SYSCONF_SENSOR_BAR_SENSITIVITY; | ||
| extern const ConfigInfo<u32> SYSCONF_SPEAKER_VOLUME; | ||
| extern const ConfigInfo<bool> SYSCONF_WIIMOTE_MOTOR; | ||
|
|
||
| struct SYSCONFSetting | ||
| { | ||
| std::variant<ConfigInfo<u32>, ConfigInfo<bool>> config_info; | ||
| SysConf::Entry::Type type; | ||
| }; | ||
|
|
||
| extern const std::array<SYSCONFSetting, 9> SYSCONF_SETTINGS; | ||
|
|
||
| } // namespace Config |