diff --git a/rpcs3/Json/tooltips.json b/rpcs3/Json/tooltips.json index 45d683c7cb..6f63e38b23 100644 --- a/rpcs3/Json/tooltips.json +++ b/rpcs3/Json/tooltips.json @@ -1,4 +1,16 @@ { + "advanced": { + "debugConsoleMode": "Increases the amount of usable system memory to match a DECR console and more.\nCauses some software to behave differently than on retail hardware.", + "readColor": "Initializes render target memory using vm memory.", + "readDepth": "Initializes render target memory using vm memory.", + "dumpDepth": "Writes depth buffer values to vm memory.", + "disableOnDiskShaderCache": "Disables the loading and saving of shaders from and to the shader cache in the data directory.", + "maxSPURSThreads": "Limits the maximum number of SPURS threads in each thread group.\nMay improve performance in some cases, especially on systems with limited number of hardware threads.\nLimiting the number of threads is likely to cause crashes; it's recommended to keep this at default value.", + "sleepTimersAccuracy": "Changes the sleep period accuracy.\n'As Host' uses default accuracy of the underlying operating system, while 'All Timers' attempts to improve it.\n'Usleep Only' limits the adjustments to usleep syscall only.\nCan affect perfomance in unexpected ways.", + "vblankRate": "Adjusts the frequency of vertical blanking signals that the emulator sends.\nAffects timing of events which rely on these signals.", + "clocksScale": "Changes the scale of emulated system time.\nAffects software which uses system time to calculate things such as dynamic timesteps.", + "disabledFromGlobal": "Do not change this setting globally.\nRight-click the game in game list and choose \"Configure\" instead." + }, "audio": { "audioOutBox": "XAudio2 is the recommended option and should be used whenever possible.\nOpenAL uses a cross-platform approach and is the next best alternative.", "audioOutBox_Linux": "OpenAL uses a cross-platform approach and supports audio buffering, so it is the recommended option.\nPulseAudio uses the native Linux sound system, and is the next best alternative. If neither are available, ALSA can be used instead.", @@ -51,10 +63,6 @@ "accurateGETLLAR": "Never use this.", "accuratePUTLLUC": "Never use this.", "hookStFunc": "Allows to hook some functions like 'memcpy' replacing them with high-level implementations. May do nothing or break things. Experimental.", - "debugConsoleMode": "Increases the amount of usable system memory to match a DECR console and more.\nCauses some software to behave differently than on retail hardware.", - "readColor": "Never use this.", - "dumpDepth": "Never use this.", - "readDepth": "Never use this.", "glLegacyBuffers": "Enables use of classic OpenGL buffers which allows capturing tools to work with RPCS3 e.g RenderDoc.\nIf unsure, don't use this option.", "forceHighpZ": "Only useful when debugging differences in GPU hardware.\nNot necessary for average users.\nIf unsure, don't use this option.", "debugOutput": "Enables the selected API's inbuilt debugging functionality.\nWill cause severe performance degradation especially with Vulkan.\nOnly useful to developers.\nIf unsure, don't use this option.", @@ -62,12 +70,10 @@ "logProg": "Dump game shaders to file. Only useful to developers.\nIf unsure, don't use this option.", "disableOcclusionQueries": "Disables running occlusion queries. Minor to moderate performance boost.\nMight introduce issues with broken occlusion e.g missing geometry and extreme pop-in.", "forceCpuBlitEmulation": "Forces emulation of all blit and image manipulation operations on the CPU.\nRequires 'Write Color Buffers' option to also be enabled in most cases to avoid missing graphics.\nSignificantly degrades performance but is more accurate in some cases.\nThis setting overrides the 'GPU texture scaling' option.", - "disableOnDiskShaderCache": "Disables the loading and saving of shaders from and to the shader cache in the data directory.", "disableVulkanMemAllocator": "Disables the custom Vulkan memory allocator and reverts to direct calls to VkAllocateMemory/VkFreeMemory.", "disableFIFOReordering": "Disables RSX FIFO optimizations completely. Draws are processed as they are received by the DMA puller.", "gpuTextureScaling": "Force all texture transfer, scaling and conversion operations on the GPU.\nMay cause texture corruption in some cases.", - "strictTextureFlushing": "Forces texture flushing even in situations where it is not necessary/correct. Known to cause visual artifacts, but useful for debugging certain texture cache issues.", - "maxSPURSThreads": "Limits the maximum number of SPURS threads in each thread group.\nMay improve performance in some cases, especially on systems with limited number of hardware threads.\nLimiting the number of threads is likely to cause crashes; it's recommended to keep this at default value." + "strictTextureFlushing": "Forces texture flushing even in situations where it is not necessary/correct. Known to cause visual artifacts, but useful for debugging certain texture cache issues." }, "emulator": { "misc": { diff --git a/rpcs3/rpcs3qt/emu_settings.h b/rpcs3/rpcs3qt/emu_settings.h index b29fdf45ca..9c6002dfc1 100644 --- a/rpcs3/rpcs3qt/emu_settings.h +++ b/rpcs3/rpcs3qt/emu_settings.h @@ -47,6 +47,8 @@ public: SPUCache, DebugConsoleMode, MaxSPURSThreads, + SleepTimersAccuracy, + ClocksScale, // Graphics Renderer, @@ -81,6 +83,7 @@ public: DisableVulkanMemAllocator, DisableAsyncShaderCompiler, MultithreadedRSX, + VBlankRate, // Performance Overlay PerfOverlayEnabled, @@ -274,6 +277,8 @@ private: { SPUCache, { "Core", "SPU Cache"}}, { DebugConsoleMode, { "Core", "Debug Console Mode"}}, { MaxSPURSThreads, { "Core", "Max SPURS Threads"}}, + { SleepTimersAccuracy, { "Core", "Sleep Timers Accuracy"}}, + { ClocksScale, { "Core", "Clocks scale"}}, // Graphics Tab { Renderer, { "Video", "Renderer"}}, @@ -308,6 +313,7 @@ private: { MinimumScalableDimension, { "Video", "Minimum Scalable Dimension"}}, { D3D12Adapter, { "Video", "D3D12", "Adapter"}}, { VulkanAdapter, { "Video", "Vulkan", "Adapter"}}, + { VBlankRate, { "Video", "Vblank Rate"}}, // Performance Overlay { PerfOverlayEnabled, { "Video", "Performance Overlay", "Enabled" } }, diff --git a/rpcs3/rpcs3qt/settings_dialog.cpp b/rpcs3/rpcs3qt/settings_dialog.cpp index cd3b1b3dd0..6f9679ad85 100644 --- a/rpcs3/rpcs3qt/settings_dialog.cpp +++ b/rpcs3/rpcs3qt/settings_dialog.cpp @@ -45,11 +45,11 @@ settings_dialog::settings_dialog(std::shared_ptr guiSettings, std: xgui_settings->SetValue(gui::m_showDebugTab, showDebugTab); if (!showDebugTab) { - ui->tab_widget_settings->removeTab(8); + ui->tab_widget_settings->removeTab(9); } if (game) { - ui->tab_widget_settings->removeTab(7); + ui->tab_widget_settings->removeTab(8); } // Add description labels @@ -59,6 +59,7 @@ settings_dialog::settings_dialog(std::shared_ptr guiSettings, std: SubscribeDescription(ui->description_io); SubscribeDescription(ui->description_system); SubscribeDescription(ui->description_network); + SubscribeDescription(ui->description_advanced); SubscribeDescription(ui->description_emulator); if (!game) { @@ -89,6 +90,8 @@ settings_dialog::settings_dialog(std::shared_ptr guiSettings, std: QJsonObject json_sys = json_obj.value("system").toObject(); QJsonObject json_net = json_obj.value("network").toObject(); + QJsonObject json_advanced = json_obj.value("advanced").toObject(); + QJsonObject json_emu = json_obj.value("emulator").toObject(); QJsonObject json_emu_misc = json_emu.value("misc").toObject(); QJsonObject json_emu_overlay = json_emu.value("overlay").toObject(); @@ -1039,6 +1042,72 @@ settings_dialog::settings_dialog(std::shared_ptr guiSettings, std: xemu_settings->EnhanceComboBox(ui->netStatusBox, emu_settings::ConnectionStatus); SubscribeTooltip(ui->netStatusBox, json_net["netStatusBox"].toString()); + + // _ _ _______ _ + // /\ | | | | |__ __| | | + // / \ __| |_ ____ _ _ __ ___ ___ __| | | | __ _| |__ + // / /\ \ / _` \ \ / / _` | '_ \ / __/ _ \/ _` | | |/ _` | '_ \ + // / ____ \ (_| |\ V / (_| | | | | (_| __/ (_| | | | (_| | |_) | + // /_/ \_\__,_| \_/ \__,_|_| |_|\___\___|\__,_| |_|\__,_|_.__/ + + + // Checkboxes + + xemu_settings->EnhanceCheckBox(ui->debugConsoleMode, emu_settings::DebugConsoleMode); + SubscribeTooltip(ui->debugConsoleMode, json_advanced["debugConsoleMode"].toString()); + + xemu_settings->EnhanceCheckBox(ui->readColor, emu_settings::ReadColorBuffers); + SubscribeTooltip(ui->readColor, json_advanced["readColor"].toString()); + + xemu_settings->EnhanceCheckBox(ui->readDepth, emu_settings::ReadDepthBuffer); + SubscribeTooltip(ui->readDepth, json_advanced["readDepth"].toString()); + + xemu_settings->EnhanceCheckBox(ui->dumpDepth, emu_settings::WriteDepthBuffer); + SubscribeTooltip(ui->dumpDepth, json_advanced["dumpDepth"].toString()); + + xemu_settings->EnhanceCheckBox(ui->disableOnDiskShaderCache, emu_settings::DisableOnDiskShaderCache); + SubscribeTooltip(ui->disableOnDiskShaderCache, json_advanced["disableOnDiskShaderCache"].toString()); + + // Comboboxes + + xemu_settings->EnhanceComboBox(ui->maxSPURSThreads, emu_settings::MaxSPURSThreads, true); + ui->maxSPURSThreads->setItemText(ui->maxSPURSThreads->findData("6"), tr("Unlimited (Default)")); + SubscribeTooltip(ui->maxSPURSThreads, json_advanced["maxSPURSThreads"].toString()); + + xemu_settings->EnhanceComboBox(ui->sleepTimersAccuracy, emu_settings::SleepTimersAccuracy); + SubscribeTooltip(ui->sleepTimersAccuracy, json_advanced["sleepTimersAccuracy"].toString()); + + // Sliders + + EnhanceSlider(emu_settings::VBlankRate, ui->vblank, ui->vblankText, tr("%0 Hz")); + int vblankDef = stoi(xemu_settings->GetSettingDefault(emu_settings::VBlankRate)); + connect(ui->vblankReset, &QAbstractButton::clicked, [=]() + { + ui->vblank->setValue(vblankDef); + }); + + EnhanceSlider(emu_settings::ClocksScale, ui->clockScale, ui->clockScaleText, tr("%0 %")); + int clocksScaleDef = stoi(xemu_settings->GetSettingDefault(emu_settings::ResolutionScale)); + connect(ui->clockScaleReset, &QAbstractButton::clicked, [=]() + { + ui->clockScale->setValue(clocksScaleDef); + }); + + if (!game) // Prevent users from doing dumb things + { + ui->vblank->setDisabled(true); + ui->vblankReset->setDisabled(true); + SubscribeTooltip(ui->vblank, json_advanced["disabledFromGlobal"].toString()); + ui->clockScale->setDisabled(true); + ui->clockScaleReset->setDisabled(true); + SubscribeTooltip(ui->clockScale, json_advanced["disabledFromGlobal"].toString()); + } + else + { + SubscribeTooltip(ui->vblank, json_advanced["vblankRate"].toString()); + SubscribeTooltip(ui->clockScale, json_advanced["clocksScale"].toString()); + } + // ______ _ _ _______ _ // | ____| | | | | |__ __| | | // | |__ _ __ ___ _ _| | __ _| |_ ___ _ __ | | __ _| |__ @@ -1442,24 +1511,12 @@ settings_dialog::settings_dialog(std::shared_ptr guiSettings, std: xemu_settings->EnhanceCheckBox(ui->logProg, emu_settings::LogShaderPrograms); SubscribeTooltip(ui->logProg, json_debug["logProg"].toString()); - xemu_settings->EnhanceCheckBox(ui->readColor, emu_settings::ReadColorBuffers); - SubscribeTooltip(ui->readColor, json_debug["readColor"].toString()); - - xemu_settings->EnhanceCheckBox(ui->dumpDepth, emu_settings::WriteDepthBuffer); - SubscribeTooltip(ui->dumpDepth, json_debug["dumpDepth"].toString()); - - xemu_settings->EnhanceCheckBox(ui->readDepth, emu_settings::ReadDepthBuffer); - SubscribeTooltip(ui->readDepth, json_debug["readDepth"].toString()); - xemu_settings->EnhanceCheckBox(ui->disableHwOcclusionQueries, emu_settings::DisableOcclusionQueries); SubscribeTooltip(ui->disableHwOcclusionQueries, json_debug["disableOcclusionQueries"].toString()); xemu_settings->EnhanceCheckBox(ui->forceCpuBlitEmulation, emu_settings::ForceCPUBlitEmulation); SubscribeTooltip(ui->forceCpuBlitEmulation, json_debug["forceCpuBlitEmulation"].toString()); - xemu_settings->EnhanceCheckBox(ui->disableOnDiskShaderCache, emu_settings::DisableOnDiskShaderCache); - SubscribeTooltip(ui->disableOnDiskShaderCache, json_debug["disableOnDiskShaderCache"].toString()); - xemu_settings->EnhanceCheckBox(ui->disableVulkanMemAllocator, emu_settings::DisableVulkanMemAllocator); SubscribeTooltip(ui->disableVulkanMemAllocator, json_debug["disableVulkanMemAllocator"].toString()); @@ -1491,14 +1548,6 @@ settings_dialog::settings_dialog(std::shared_ptr guiSettings, std: xemu_settings->EnhanceCheckBox(ui->hookStFunc, emu_settings::HookStaticFuncs); SubscribeTooltip(ui->hookStFunc, json_debug["hookStFunc"].toString()); - xemu_settings->EnhanceCheckBox(ui->debugConsoleMode, emu_settings::DebugConsoleMode); - SubscribeTooltip(ui->debugConsoleMode, json_debug["debugConsoleMode"].toString()); - - // Comboboxes - xemu_settings->EnhanceComboBox(ui->maxSPURSThreads, emu_settings::MaxSPURSThreads, true); - ui->maxSPURSThreads->setItemText(ui->maxSPURSThreads->findData("6"), tr("Unlimited (Default)")); - SubscribeTooltip(ui->maxSPURSThreads, json_debug["maxSPURSThreads"].toString()); - // Layout fix for High Dpi layout()->setSizeConstraint(QLayout::SetFixedSize); } diff --git a/rpcs3/rpcs3qt/settings_dialog.ui b/rpcs3/rpcs3qt/settings_dialog.ui index 82536e4e68..c7e88cb5bc 100644 --- a/rpcs3/rpcs3qt/settings_dialog.ui +++ b/rpcs3/rpcs3qt/settings_dialog.ui @@ -1564,6 +1564,296 @@ + + + Advanced + + + + + + + + + + + 0 + 0 + + + + Core + + + + + + Debug Console Mode + + + + + + + + + + + 0 + 0 + + + + Sleep Timers Accuracy + + + + + + + + + + + + + 0 + 0 + + + + Maximum Number of SPURS Threads + + + + + + + + + + + + Qt::Vertical + + + + 0 + 0 + + + + + + + + + + + + + 0 + 0 + + + + GPU + + + + + + Read Depth Buffers + + + + + + + Write Depth Buffers + + + + + + + Read Color Buffers + + + + + + + Disable On-Disk Shader Cache + + + + + + + + + + Qt::Vertical + + + + 0 + 0 + + + + + + + + + + + + + 0 + 0 + + + + VBlank Frequency + + + + + + Qt::Horizontal + + + + + + + + + 60 Hz + + + Qt::AlignCenter + + + + + + + Reset + + + + + + + + + + + + + 0 + 0 + + + + Clocks Scale + + + + + + Qt::Horizontal + + + + + + + + + 100% + + + Qt::AlignCenter + + + + + + + Reset + + + + + + + + + + + + Qt::Vertical + + + + 0 + 0 + + + + + + + + + + + + Qt::Vertical + + + + 0 + 0 + + + + + + + + Description + + + + + + Point your mouse at an option to display a description in here. + + + + + + Qt::PlainText + + + Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop + + + true + + + + + + + + Emulator @@ -2370,27 +2660,6 @@ - - - - Write Depth Buffers - - - - - - - Read Depth Buffers - - - - - - - Read Color Buffers - - - @@ -2405,13 +2674,6 @@ - - - - Disable On-Disk Shader Cache - - - @@ -2491,13 +2753,6 @@ - - - - Debug Console Mode - - - @@ -2511,24 +2766,6 @@ - - - - - 0 - 0 - - - - Maximum Number of SPURS Threads - - - - - - - -