From 15331c2a6007656171275fcbb41f912c1297c358 Mon Sep 17 00:00:00 2001 From: GPUCode Date: Fri, 17 Nov 2023 22:03:42 +0200 Subject: settings: Add cpu backend setting --- src/common/settings.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/common/settings.cpp') diff --git a/src/common/settings.cpp b/src/common/settings.cpp index a10131eb2..19dfe08da 100644 --- a/src/common/settings.cpp +++ b/src/common/settings.cpp @@ -41,6 +41,7 @@ SWITCHABLE(AspectRatio, true); SWITCHABLE(AstcDecodeMode, true); SWITCHABLE(AstcRecompression, true); SWITCHABLE(AudioMode, true); +SWITCHABLE(CpuBackend, true); SWITCHABLE(CpuAccuracy, true); SWITCHABLE(FullscreenMode, true); SWITCHABLE(GpuAccuracy, true); @@ -155,6 +156,10 @@ bool IsFastmemEnabled() { return true; } +bool IsNceEnabled(bool is_64bit) { + return values.cpu_backend.GetValue() == CpuBackend::Nce && is_64bit; +} + bool IsDockedMode() { return values.use_docked_mode.GetValue() == Settings::ConsoleMode::Docked; } -- cgit v1.2.3 From 48388376206aaa7d887b41030019035a06203867 Mon Sep 17 00:00:00 2001 From: GPUCode Date: Fri, 17 Nov 2023 22:23:48 +0200 Subject: device_memory: Enable direct mapped addresses for nce --- src/common/settings.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'src/common/settings.cpp') diff --git a/src/common/settings.cpp b/src/common/settings.cpp index 19dfe08da..167e984a6 100644 --- a/src/common/settings.cpp +++ b/src/common/settings.cpp @@ -156,8 +156,14 @@ bool IsFastmemEnabled() { return true; } -bool IsNceEnabled(bool is_64bit) { - return values.cpu_backend.GetValue() == CpuBackend::Nce && is_64bit; +static bool is_nce_enabled = false; + +void SetNceEnabled(bool is_64bit) { + is_nce_enabled = values.cpu_backend.GetValue() == CpuBackend::Nce && is_64bit; +} + +bool IsNceEnabled() { + return is_nce_enabled; } bool IsDockedMode() { -- cgit v1.2.3 From 9f91ba1f7357c61dd2c7c3b437ea203d467fd400 Mon Sep 17 00:00:00 2001 From: Liam Date: Fri, 17 Nov 2023 23:44:53 +0200 Subject: arm: Implement native code execution backend --- src/common/settings.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/common/settings.cpp') diff --git a/src/common/settings.cpp b/src/common/settings.cpp index 167e984a6..81a036ef0 100644 --- a/src/common/settings.cpp +++ b/src/common/settings.cpp @@ -158,8 +158,8 @@ bool IsFastmemEnabled() { static bool is_nce_enabled = false; -void SetNceEnabled(bool is_64bit) { - is_nce_enabled = values.cpu_backend.GetValue() == CpuBackend::Nce && is_64bit; +void SetNceEnabled(bool is_39bit) { + is_nce_enabled = values.cpu_backend.GetValue() == CpuBackend::Nce && is_39bit; } bool IsNceEnabled() { -- cgit v1.2.3 From 8fab363237083a8130a7b2a023cd9c5dd83f8f4f Mon Sep 17 00:00:00 2001 From: GPUCode Date: Sat, 18 Nov 2023 16:10:39 +0200 Subject: android: Add cpu bakend gui toggle --- src/common/settings.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'src/common/settings.cpp') diff --git a/src/common/settings.cpp b/src/common/settings.cpp index 81a036ef0..90e7475d7 100644 --- a/src/common/settings.cpp +++ b/src/common/settings.cpp @@ -159,7 +159,13 @@ bool IsFastmemEnabled() { static bool is_nce_enabled = false; void SetNceEnabled(bool is_39bit) { - is_nce_enabled = values.cpu_backend.GetValue() == CpuBackend::Nce && is_39bit; + const bool is_nce_selected = values.cpu_backend.GetValue() == CpuBackend::Nce; + is_nce_enabled = is_nce_selected && is_39bit; + if (is_nce_selected && !is_nce_enabled) { + LOG_WARNING( + Common, + "Program does not utilize 39-bit address space, unable to natively execute code"); + } } bool IsNceEnabled() { -- cgit v1.2.3 From c37b5f431fcbffac173fb70ef0a0d7fb6cde7f2d Mon Sep 17 00:00:00 2001 From: GPUCode Date: Mon, 20 Nov 2023 15:33:44 +0200 Subject: common: Enforce fastmem for nce usage --- src/common/settings.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/common/settings.cpp') diff --git a/src/common/settings.cpp b/src/common/settings.cpp index 90e7475d7..16c2feeab 100644 --- a/src/common/settings.cpp +++ b/src/common/settings.cpp @@ -160,7 +160,7 @@ static bool is_nce_enabled = false; void SetNceEnabled(bool is_39bit) { const bool is_nce_selected = values.cpu_backend.GetValue() == CpuBackend::Nce; - is_nce_enabled = is_nce_selected && is_39bit; + is_nce_enabled = IsFastmemEnabled() && is_nce_selected && is_39bit; if (is_nce_selected && !is_nce_enabled) { LOG_WARNING( Common, -- cgit v1.2.3