mirror of
https://git.eden-emu.dev/eden-emu/eden.git
synced 2026-10-07 06:18:23 +00:00
Port UMA part 5.3 (NCE EXT)
This commit is contained in:
+1
@@ -20,6 +20,7 @@ enum class BooleanSetting(override val key: String) : AbstractBooleanSetting {
|
|||||||
EMULATE_BGR565("emulate_bgr565"),
|
EMULATE_BGR565("emulate_bgr565"),
|
||||||
RESCALE_HACK("rescale_hack"),
|
RESCALE_HACK("rescale_hack"),
|
||||||
CPUOPT_UNSAFE_HOST_MMU("cpuopt_unsafe_host_mmu"),
|
CPUOPT_UNSAFE_HOST_MMU("cpuopt_unsafe_host_mmu"),
|
||||||
|
RELOCATE_36BIT_ADDRESS_SPACE("relocate_36bit_address_space"),
|
||||||
USE_DOCKED_MODE("use_docked_mode"),
|
USE_DOCKED_MODE("use_docked_mode"),
|
||||||
USE_AUTO_STUB("use_auto_stub"),
|
USE_AUTO_STUB("use_auto_stub"),
|
||||||
RENDERER_USE_DISK_SHADER_CACHE("use_disk_shader_cache"),
|
RENDERER_USE_DISK_SHADER_CACHE("use_disk_shader_cache"),
|
||||||
|
|||||||
+7
@@ -846,6 +846,13 @@ abstract class SettingsItem(
|
|||||||
descriptionId = R.string.cpuopt_unsafe_host_mmu_description
|
descriptionId = R.string.cpuopt_unsafe_host_mmu_description
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
put(
|
||||||
|
SwitchSetting(
|
||||||
|
BooleanSetting.RELOCATE_36BIT_ADDRESS_SPACE,
|
||||||
|
titleId = R.string.relocate_36bit_address_space,
|
||||||
|
descriptionId = R.string.relocate_36bit_address_space_description
|
||||||
|
)
|
||||||
|
)
|
||||||
put(
|
put(
|
||||||
SwitchSetting(
|
SwitchSetting(
|
||||||
BooleanSetting.RENDERER_REACTIVE_FLUSHING,
|
BooleanSetting.RENDERER_REACTIVE_FLUSHING,
|
||||||
|
|||||||
+1
@@ -1527,6 +1527,7 @@ class SettingsFragmentPresenter(
|
|||||||
add(HeaderSetting(R.string.cpu))
|
add(HeaderSetting(R.string.cpu))
|
||||||
|
|
||||||
add(IntSetting.CPU_BACKEND.key)
|
add(IntSetting.CPU_BACKEND.key)
|
||||||
|
add(BooleanSetting.RELOCATE_36BIT_ADDRESS_SPACE.key)
|
||||||
add(IntSetting.CPU_ACCURACY.key)
|
add(IntSetting.CPU_ACCURACY.key)
|
||||||
add(BooleanSetting.USE_AUTO_STUB.key)
|
add(BooleanSetting.USE_AUTO_STUB.key)
|
||||||
add(SettingsItem.FASTMEM_COMBINED)
|
add(SettingsItem.FASTMEM_COMBINED)
|
||||||
|
|||||||
@@ -105,6 +105,8 @@
|
|||||||
<string name="use_sync_core_description">Synchronize the core tick speed to the maximum speed percentage to improve performance without altering the game\'s actual speed.</string>
|
<string name="use_sync_core_description">Synchronize the core tick speed to the maximum speed percentage to improve performance without altering the game\'s actual speed.</string>
|
||||||
<string name="cpuopt_unsafe_host_mmu">Enable Host MMU Emulation</string>
|
<string name="cpuopt_unsafe_host_mmu">Enable Host MMU Emulation</string>
|
||||||
<string name="cpuopt_unsafe_host_mmu_description">This optimization speeds up memory accesses by the guest program. Enabling it causes guest memory reads/writes to be done directly into memory and make use of Host\'s MMU. Disabling this forces all memory accesses to use Software MMU Emulation.</string>
|
<string name="cpuopt_unsafe_host_mmu_description">This optimization speeds up memory accesses by the guest program. Enabling it causes guest memory reads/writes to be done directly into memory and make use of Host\'s MMU. Disabling this forces all memory accesses to use Software MMU Emulation.</string>
|
||||||
|
<string name="relocate_36bit_address_space">Run 36-bit games natively</string>
|
||||||
|
<string name="relocate_36bit_address_space_description">Gives games built for the 36-bit address space the 39-bit layout so they can run with NCE instead of the JIT. Experimental: a game that relies on 36-bit addresses can crash.</string>
|
||||||
<string name="debug_knobs">Debug knobs</string>
|
<string name="debug_knobs">Debug knobs</string>
|
||||||
<string name="debug_knobs_description">For development use only.</string>
|
<string name="debug_knobs_description">For development use only.</string>
|
||||||
<string name="debug_knobs_hint">0 to 65535</string>
|
<string name="debug_knobs_hint">0 to 65535</string>
|
||||||
|
|||||||
@@ -259,6 +259,8 @@ struct Values {
|
|||||||
Category::Cpu};
|
Category::Cpu};
|
||||||
SwitchableSetting<CpuAccuracy, true> cpu_accuracy{linkage, CpuAccuracy::Auto,
|
SwitchableSetting<CpuAccuracy, true> cpu_accuracy{linkage, CpuAccuracy::Auto,
|
||||||
"cpu_accuracy", Category::Cpu};
|
"cpu_accuracy", Category::Cpu};
|
||||||
|
SwitchableSetting<bool> relocate_36bit_address_space{
|
||||||
|
linkage, false, "relocate_36bit_address_space", Category::Cpu};
|
||||||
SwitchableSetting<CpuClock> cpu_clock{linkage,
|
SwitchableSetting<CpuClock> cpu_clock{linkage,
|
||||||
CpuClock::Normal,
|
CpuClock::Normal,
|
||||||
"fast_cpu_time",
|
"fast_cpu_time",
|
||||||
|
|||||||
@@ -147,6 +147,10 @@ ProgramAddressSpaceType ProgramMetadata::GetAddressSpaceType() const {
|
|||||||
return npdm_header.address_space_type;
|
return npdm_header.address_space_type;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void ProgramMetadata::SetAddressSpaceType(ProgramAddressSpaceType address_space) {
|
||||||
|
npdm_header.address_space_type.Assign(address_space);
|
||||||
|
}
|
||||||
|
|
||||||
u8 ProgramMetadata::GetMainThreadPriority() const {
|
u8 ProgramMetadata::GetMainThreadPriority() const {
|
||||||
return npdm_header.main_thread_priority;
|
return npdm_header.main_thread_priority;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,3 +1,6 @@
|
|||||||
|
// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
|
||||||
|
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
|
||||||
// SPDX-FileCopyrightText: Copyright 2018 yuzu Emulator Project
|
// SPDX-FileCopyrightText: Copyright 2018 yuzu Emulator Project
|
||||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||||
|
|
||||||
@@ -73,6 +76,7 @@ public:
|
|||||||
|
|
||||||
bool Is64BitProgram() const;
|
bool Is64BitProgram() const;
|
||||||
ProgramAddressSpaceType GetAddressSpaceType() const;
|
ProgramAddressSpaceType GetAddressSpaceType() const;
|
||||||
|
void SetAddressSpaceType(ProgramAddressSpaceType address_space);
|
||||||
u8 GetMainThreadPriority() const;
|
u8 GetMainThreadPriority() const;
|
||||||
u8 GetMainThreadCore() const;
|
u8 GetMainThreadCore() const;
|
||||||
u32 GetMainThreadStackSize() const;
|
u32 GetMainThreadStackSize() const;
|
||||||
|
|||||||
@@ -182,6 +182,12 @@ AppLoader_DeconstructedRomDirectory::LoadResult AppLoader_DeconstructedRomDirect
|
|||||||
}
|
}
|
||||||
metadata.Print();
|
metadata.Print();
|
||||||
|
|
||||||
|
if (Settings::values.relocate_36bit_address_space.GetValue() &&
|
||||||
|
Settings::values.cpu_backend.GetValue() == Settings::CpuBackend::Nce &&
|
||||||
|
metadata.GetAddressSpaceType() == FileSys::ProgramAddressSpaceType::Is36Bit) {
|
||||||
|
metadata.SetAddressSpaceType(FileSys::ProgramAddressSpaceType::Is39Bit);
|
||||||
|
}
|
||||||
|
|
||||||
// Enable NCE only for applications with 39-bit address space.
|
// Enable NCE only for applications with 39-bit address space.
|
||||||
const bool is_39bit =
|
const bool is_39bit =
|
||||||
metadata.GetAddressSpaceType() == FileSys::ProgramAddressSpaceType::Is39Bit;
|
metadata.GetAddressSpaceType() == FileSys::ProgramAddressSpaceType::Is39Bit;
|
||||||
|
|||||||
Reference in New Issue
Block a user