diff --git a/Core/CmdLine.cpp b/Core/CmdLine.cpp index 25dee0f601..861bfc755f 100644 --- a/Core/CmdLine.cpp +++ b/Core/CmdLine.cpp @@ -199,6 +199,7 @@ static const CommandLineParam g_autoParams[] = { {POFF(compare), CmdParamType::Bool, "compare", 'c', "Enable comparison mode", CmdLineMode::Headless}, {POFF(bench), CmdParamType::Bool, "bench", 'b', "Enable benchmark mode", CmdLineMode::Headless}, {POFF(oldAtrac), CmdParamType::Bool, "old-atrac", '\0', "Use old ATRAC decoder"}, + {POFF(accurateVdot), CmdParamType::Bool, "accurate-vdot", '\0', "Compute VFPU dot products bit-exactly like the PSP (slower)"}, {POFF(memStickInserted), CmdParamType::BoolInverse, "no-memstick", '\0', "Run with the memory stick removed"}, {POFF(log), CmdParamType::String, "log", '\0', "Output log to FILE", CmdLineMode::Application}, {POFF(enableLogging), CmdParamType::Bool, "log", '\0', "Full log output, not just emulated printfs", CmdLineMode::Headless}, @@ -610,6 +611,10 @@ void CommandLineOptions::ApplyToConfig() const { g_Config.bUseOldAtrac = oldAtrac.value(); g_Config.DoNotSaveSetting(&g_Config.bUseOldAtrac); } + if (accurateVdot.has_value()) { + g_Config.bAccurateVdot = accurateVdot.value(); + g_Config.DoNotSaveSetting(&g_Config.bAccurateVdot); + } if (root.has_value()) { // No DoNotSaveSetting() here - mountRoot isn't an ordinary setting and never gets diff --git a/Core/CmdLine.h b/Core/CmdLine.h index c2a3814b22..66a0f9e9b4 100644 --- a/Core/CmdLine.h +++ b/Core/CmdLine.h @@ -166,6 +166,7 @@ struct CommandLineOptions { bool optionS = false; // a legacy option std::optional oldAtrac; + std::optional accurateVdot; // Headless options that may also be mildly useful in application mode std::optional resolutionScale; diff --git a/Core/Config.cpp b/Core/Config.cpp index b8e59fd76c..2b8cb2e513 100644 --- a/Core/Config.cpp +++ b/Core/Config.cpp @@ -436,6 +436,7 @@ static const ConfigSetting cpuSettings[] = { ConfigSetting("IOTimingMethod", SETTING(g_Config, iIOTimingMethod), IOTIMING_FAST, CfgFlag::PER_GAME | CfgFlag::REPORT), ConfigSetting("FastMemoryAccess", SETTING(g_Config, bFastMemory), true, CfgFlag::PER_GAME), ConfigSetting("FunctionReplacements", SETTING(g_Config, bFuncReplacements), true, CfgFlag::PER_GAME | CfgFlag::REPORT), + ConfigSetting("AccurateVdot", SETTING(g_Config, bAccurateVdot), false, CfgFlag::PER_GAME | CfgFlag::REPORT), ConfigSetting("HideSlowWarnings", SETTING(g_Config, bHideSlowWarnings), false, CfgFlag::DEFAULT), ConfigSetting("HideStateWarnings", SETTING(g_Config, bHideStateWarnings), false, CfgFlag::DEFAULT), ConfigSetting("JitDisableFlags", SETTING(g_Config, uJitDisableFlags), (uint32_t)0, CfgFlag::PER_GAME), diff --git a/Core/Config.h b/Core/Config.h index 9458f6274a..5a2bcd0d62 100644 --- a/Core/Config.h +++ b/Core/Config.h @@ -235,6 +235,8 @@ public: bool bWow64WarningDismissed; bool bForceLagSync; bool bFuncReplacements; + // Compute the VFPU's dot products (vdot, vmmul, vtfm and the rest) bit-exactly like the PSP. + bool bAccurateVdot; bool bHideSlowWarnings; bool bHideStateWarnings; uint32_t uJitDisableFlags;