From 8d06323a8d061b1a0ea2bb0db7cbfcb13b87e3d6 Mon Sep 17 00:00:00 2001 From: pineappleEA Date: Sat, 13 Mar 2021 07:50:11 +0100 Subject: [PATCH] early-access version 1518 --- README.md | 2 +- src/core/hle/service/service.cpp | 6 ++++++ src/core/settings.h | 1 + src/video_core/rasterizer_accelerated.cpp | 3 ++- src/yuzu/configuration/config.cpp | 1 + src/yuzu/configuration/configure_debug.cpp | 2 ++ src/yuzu/configuration/configure_debug.ui | 22 ++++++++++++++++++++++ 7 files changed, 35 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 08f30995b..198a6d6bb 100755 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ yuzu emulator early access ============= -This is the source code for early-access 1517. +This is the source code for early-access 1518. ## Legal Notice diff --git a/src/core/hle/service/service.cpp b/src/core/hle/service/service.cpp index 1da56bc27..aec399076 100755 --- a/src/core/hle/service/service.cpp +++ b/src/core/hle/service/service.cpp @@ -70,6 +70,7 @@ #include "core/hle/service/vi/vi.h" #include "core/hle/service/wlan/wlan.h" #include "core/reporter.h" +#include "core/settings.h" namespace Service { @@ -146,6 +147,11 @@ void ServiceFrameworkBase::ReportUnimplementedFunction(Kernel::HLERequestContext system.GetReporter().SaveUnimplementedFunctionReport(ctx, ctx.GetCommand(), function_name, service_name); UNIMPLEMENTED_MSG("Unknown / unimplemented {}", fmt::to_string(buf)); + if (Settings::values.use_auto_stub) { + LOG_WARNING(Service, "Using auto stub fallback!"); + IPC::ResponseBuilder rb{ctx, 2}; + rb.Push(RESULT_SUCCESS); + } } void ServiceFrameworkBase::InvokeRequest(Kernel::HLERequestContext& ctx) { diff --git a/src/core/settings.h b/src/core/settings.h index d849dded3..a81016b23 100755 --- a/src/core/settings.h +++ b/src/core/settings.h @@ -222,6 +222,7 @@ struct Values { bool quest_flag; bool disable_macro_jit; bool extended_logging; + bool use_auto_stub; // Miscellaneous std::string log_filter; diff --git a/src/video_core/rasterizer_accelerated.cpp b/src/video_core/rasterizer_accelerated.cpp index 4fd57d7c7..62d84c0f8 100755 --- a/src/video_core/rasterizer_accelerated.cpp +++ b/src/video_core/rasterizer_accelerated.cpp @@ -28,7 +28,8 @@ void RasterizerAccelerated::UpdatePagesCachedCount(VAddr addr, u64 size, int del ASSERT_MSG(true, "Delta must be non-zero!"); } - count += static_cast(delta); + // Adds or subtracts 1, as count is a unsigned 8-bit value + count += static_cast(delta); // Assume delta is either -1 or 1 if (count == 0) { diff --git a/src/yuzu/configuration/config.cpp b/src/yuzu/configuration/config.cpp index 1bac57bb2..1d6155999 100755 --- a/src/yuzu/configuration/config.cpp +++ b/src/yuzu/configuration/config.cpp @@ -641,6 +641,7 @@ void Config::ReadDebuggingValues() { ReadSetting(QStringLiteral("disable_macro_jit"), false).toBool(); Settings::values.extended_logging = ReadSetting(QStringLiteral("extended_logging"), false).toBool(); + Settings::values.use_auto_stub = ReadSetting(QStringLiteral("use_auto_stub"), false).toBool(); qt_config->endGroup(); } diff --git a/src/yuzu/configuration/configure_debug.cpp b/src/yuzu/configuration/configure_debug.cpp index 121873f95..2a5b3f5e7 100755 --- a/src/yuzu/configuration/configure_debug.cpp +++ b/src/yuzu/configuration/configure_debug.cpp @@ -34,6 +34,7 @@ void ConfigureDebug::SetConfiguration() { ui->homebrew_args_edit->setText(QString::fromStdString(Settings::values.program_args)); ui->reporting_services->setChecked(Settings::values.reporting_services); ui->quest_flag->setChecked(Settings::values.quest_flag); + ui->use_auto_stub->setChecked(Settings::values.use_auto_stub); ui->enable_graphics_debugging->setEnabled(!Core::System::GetInstance().IsPoweredOn()); ui->enable_graphics_debugging->setChecked(Settings::values.renderer_debug); ui->disable_macro_jit->setEnabled(!Core::System::GetInstance().IsPoweredOn()); @@ -47,6 +48,7 @@ void ConfigureDebug::ApplyConfiguration() { Settings::values.program_args = ui->homebrew_args_edit->text().toStdString(); Settings::values.reporting_services = ui->reporting_services->isChecked(); Settings::values.quest_flag = ui->quest_flag->isChecked(); + Settings::values.use_auto_stub = ui->use_auto_stub->isChecked(); Settings::values.renderer_debug = ui->enable_graphics_debugging->isChecked(); Settings::values.disable_macro_jit = ui->disable_macro_jit->isChecked(); Settings::values.extended_logging = ui->extended_logging->isChecked(); diff --git a/src/yuzu/configuration/configure_debug.ui b/src/yuzu/configuration/configure_debug.ui index 9186aa732..ae48b728c 100755 --- a/src/yuzu/configuration/configure_debug.ui +++ b/src/yuzu/configuration/configure_debug.ui @@ -185,6 +185,28 @@ + + + + Enable Auto-Stub + + + + + + + + true + + + + This will be reset automatically when yuzu closes. + + + 20 + + +