mirror of
https://git.eden-emu.dev/eden-emu/eden.git
synced 2026-10-06 14:09:58 +00:00
Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| e1d54f599d |
+1
-6
@@ -79,7 +79,7 @@
|
|||||||
"name": "ffmpeg",
|
"name": "ffmpeg",
|
||||||
"package": "FFmpeg",
|
"package": "FFmpeg",
|
||||||
"repo": "crueter-ci/FFmpeg",
|
"repo": "crueter-ci/FFmpeg",
|
||||||
"version": "9.0.2-1790726865-946fcce07b"
|
"version": "9.0.1-1788120736-bf1b838f2a"
|
||||||
},
|
},
|
||||||
"fmt": {
|
"fmt": {
|
||||||
"hash": "f0da82c545b01692e9fd30fdfb613dbb8dd9716983dcd0ff19ac2a8d36f74beb5540ef38072fdecc1e34191b3682a8542ecbf3a61ef287dbba0a2679d4e023f2",
|
"hash": "f0da82c545b01692e9fd30fdfb613dbb8dd9716983dcd0ff19ac2a8d36f74beb5540ef38072fdecc1e34191b3682a8542ecbf3a61ef287dbba0a2679d4e023f2",
|
||||||
@@ -333,11 +333,6 @@
|
|||||||
"repo": "herumi/xbyak",
|
"repo": "herumi/xbyak",
|
||||||
"version": "v7.40.1"
|
"version": "v7.40.1"
|
||||||
},
|
},
|
||||||
"zbic": {
|
|
||||||
"hash": "fbe2f37986377d7f0d96ae3224c80b5971df6e8b6961f68061f1975ebb2e8cb78f07b90f014b007be4023dbf5513581504e7f7d61a5237cb2a8a7a61ae11e482",
|
|
||||||
"repo": "kinnay/zbic",
|
|
||||||
"version": "11b08f2712264bbed731545085cbd9702096ceb7"
|
|
||||||
},
|
|
||||||
"zlib": {
|
"zlib": {
|
||||||
"hash": "16fea4df307a68cf0035858abe2fd550250618a97590e202037acd18a666f57afc10f8836cbbd472d54a0e76539d0e558cb26f059d53de52ff90634bbf4f47d4",
|
"hash": "16fea4df307a68cf0035858abe2fd550250618a97590e202037acd18a666f57afc10f8836cbbd472d54a0e76539d0e558cb26f059d53de52ff90634bbf4f47d4",
|
||||||
"min_version": "1.2",
|
"min_version": "1.2",
|
||||||
|
|||||||
Vendored
+646
-662
File diff suppressed because it is too large
Load Diff
Vendored
+531
-549
File diff suppressed because it is too large
Load Diff
Vendored
+531
-549
File diff suppressed because it is too large
Load Diff
Vendored
+531
-549
File diff suppressed because it is too large
Load Diff
Vendored
+536
-547
File diff suppressed because it is too large
Load Diff
Vendored
+535
-553
File diff suppressed because it is too large
Load Diff
Vendored
+530
-547
File diff suppressed because it is too large
Load Diff
Vendored
+541
-559
File diff suppressed because it is too large
Load Diff
Vendored
+529
-546
File diff suppressed because it is too large
Load Diff
Vendored
+531
-549
File diff suppressed because it is too large
Load Diff
Vendored
+531
-549
File diff suppressed because it is too large
Load Diff
Vendored
+529
-546
File diff suppressed because it is too large
Load Diff
Vendored
+528
-546
File diff suppressed because it is too large
Load Diff
Vendored
+536
-547
File diff suppressed because it is too large
Load Diff
Vendored
+528
-546
File diff suppressed because it is too large
Load Diff
Vendored
+531
-549
File diff suppressed because it is too large
Load Diff
Vendored
+529
-546
File diff suppressed because it is too large
Load Diff
Vendored
+529
-546
File diff suppressed because it is too large
Load Diff
Vendored
+531
-549
File diff suppressed because it is too large
Load Diff
Vendored
+536
-547
File diff suppressed because it is too large
Load Diff
Vendored
+539
-551
File diff suppressed because it is too large
Load Diff
Vendored
+528
-546
File diff suppressed because it is too large
Load Diff
Vendored
+531
-549
File diff suppressed because it is too large
Load Diff
Vendored
+531
-549
File diff suppressed because it is too large
Load Diff
Vendored
+531
-549
File diff suppressed because it is too large
Load Diff
Vendored
+561
-573
File diff suppressed because it is too large
Load Diff
Vendored
+531
-549
File diff suppressed because it is too large
Load Diff
+21
-33
@@ -1,44 +1,32 @@
|
|||||||
# User Handbook - Command Line
|
# User Handbook - Command Line
|
||||||
|
|
||||||
There are two main applications, an SDL-based app (`eden-cli`) and a Qt based app (`eden`); both accept the same command line arguments.
|
There are two main applications, an SDL-based app (`eden-cli`) and a Qt based app (`eden`); both accept command line arguments.
|
||||||
|
|
||||||
|
## eden
|
||||||
|
|
||||||
- `./eden <path>`: Running with a single argument and nothing else, will make the emulator look for the given file and load it, this behavior is similar to `eden-cli`; allows dragging and dropping games into the application.
|
- `./eden <path>`: Running with a single argument and nothing else, will make the emulator look for the given file and load it, this behavior is similar to `eden-cli`; allows dragging and dropping games into the application.
|
||||||
- `--debug/-d`: Enter debug mode, allow gdb stub at port `1234`
|
- `-g <path>`: Alternate way to specify what to load, overrides. However let it be noted that arguments that use `-` will be treated as options/ignored, if your game, for some reason, starts with `-`, in order to safely handle it you may need to specify it as an argument.
|
||||||
- `--config/-c`: Specify alternate configuration file.
|
- `-f`: Use fullscreen.
|
||||||
- `--fullscreen/-f`: Use fullscreen.
|
- `-u <number>`: Select the index of the user to load as.
|
||||||
- `--help/-h`: Display help.
|
- `-input-profile <name>`: Specifies input profile name to use (for player #0 only).
|
||||||
- `--game/-g <path>`: Alternate way to specify what to load, overrides. However let it be noted that arguments that use `-` will be treated as options/ignored, if your game, for some reason, starts with `-`, in order to safely handle it you may need to specify it as an argument.
|
|
||||||
- `--multiplayer/-m`: Specify multiplayer options.
|
|
||||||
- `--program/-p`: Specify the program arguments to pass (optional).
|
|
||||||
- `--user/-u <number>`: Specify the user index.
|
|
||||||
- `--version/-v`: Display version and quit.
|
|
||||||
- `--input-profile/-i <name>`: Specifies input profile name to use (for player #0 only).
|
|
||||||
- `--null-render/-n`: Forces the usage of the "Null" render backend irrespective of settings.
|
|
||||||
- `--filter/-x`: Sets the debug log filter irrespective of settings.
|
|
||||||
- `--singlecore/-s`: Forces single-core regardless of settings.
|
|
||||||
|
|
||||||
Only the Qt frontend supports the following arguments:
|
|
||||||
|
|
||||||
- `-qlaunch`: Launch QLaunch.
|
- `-qlaunch`: Launch QLaunch.
|
||||||
- `-hlaunch`: Launch homebrew launcher `nx-hbloader`.
|
- `-hlaunch`: Launch homebrew launcher `nx-hbloader`.
|
||||||
- Requires a copy of Atmosphere to be extracted onto `sdmc`.
|
- Requires a copy of Atmosphere to be extracted onto `sdmc`.
|
||||||
- This is a shorthand for `<eden folder>/sdmc/atmosphere/hbl.nsp`.
|
- This is a shorthand for `<eden folder>/sdmc/atmosphere/hbl.nsp`.
|
||||||
- `-setup`: Launch setup applet.
|
- `-setup`: Launch setup applet.
|
||||||
|
|
||||||
`eden` (provided with `--room`), and `eden-room` supports the following options as well:
|
## eden-cli
|
||||||
|
|
||||||
- `-n/--room-name`: The name of the room.
|
- `--debug/-d`: Enter debug mode, allow gdb stub at port `1234`
|
||||||
- `-d/--room-description`: The room description.
|
- `--config/-c`: Specify alternate configuration file.
|
||||||
- `-s/--bind-address`: The bind address for the room.
|
- `--fullscreen/-f`: Set fullscreen.
|
||||||
- `-p/--port`: The port used for the room.
|
- `--help/-h`: Display help.
|
||||||
- `-m/--max-members`: The maximum number of players for this room.
|
- `--game/-g`: Specify the game to run.
|
||||||
- `-w/--password`: The password for the room.
|
- `--multiplayer/-m`: Specify multiplayer options.
|
||||||
- `-g/--preferred-game`: The preferred game for this room.
|
- `--program/-p`: Specify the program arguments to pass (optional).
|
||||||
- `-i/--preferred-game-id`: The preferred game-id for this room.
|
- `--user/-u`: Specify the user index.
|
||||||
- `-u/--username`: The username used for announce.
|
- `--version/-v`: Display version and quit.
|
||||||
- `-t/--token`: The token used for announce.
|
- `--input-profile/-i`: Specifies input profile name to use (for player #0 only).
|
||||||
- `-a/--web-api-url`: yuzu Web API url.
|
- `--null-render/-n`: Forces the usage of the "Null" render backend irrespective of settings.
|
||||||
- `-b/--ban-list-file`: The file for storing the room ban list.
|
- `--filter/-x`: Sets the debug log filter irrespective of settings.
|
||||||
- `-l/--log-file`: The file for storing the room log.
|
- `--singlecore/-s`: Forces single-core regardless of settings.
|
||||||
- `-h/--help`: Display this help and exit.
|
|
||||||
- `-v/--version`: Output version information and exit.
|
|
||||||
|
|||||||
Vendored
-5
@@ -48,11 +48,6 @@ if (NOT TARGET stb::headers)
|
|||||||
add_library(stb::headers ALIAS stb)
|
add_library(stb::headers ALIAS stb)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
AddJsonPackage(NAME zbic DOWNLOAD_ONLY)
|
|
||||||
set(ZBIC_INCLUDE_DIR
|
|
||||||
"${zbic_SOURCE_DIR}/src"
|
|
||||||
PARENT_SCOPE)
|
|
||||||
|
|
||||||
# ItaniumDemangle (Windows only)
|
# ItaniumDemangle (Windows only)
|
||||||
if (WIN32 AND NOT TARGET LLVM::Demangle)
|
if (WIN32 AND NOT TARGET LLVM::Demangle)
|
||||||
add_library(demangle demangle/ItaniumDemangle.cpp)
|
add_library(demangle demangle/ItaniumDemangle.cpp)
|
||||||
|
|||||||
+1
-2
@@ -16,8 +16,6 @@ enum class BooleanSetting(override val key: String) : AbstractBooleanSetting {
|
|||||||
RENDERER_USE_SPEED_LIMIT("use_speed_limit"),
|
RENDERER_USE_SPEED_LIMIT("use_speed_limit"),
|
||||||
USE_CUSTOM_CPU_TICKS("use_custom_cpu_ticks"),
|
USE_CUSTOM_CPU_TICKS("use_custom_cpu_ticks"),
|
||||||
SKIP_CPU_INNER_INVALIDATION("skip_cpu_inner_invalidation"),
|
SKIP_CPU_INNER_INVALIDATION("skip_cpu_inner_invalidation"),
|
||||||
NCE_INVALIDATION_GPU_READBACK("nce_invalidation_gpu_readback"),
|
|
||||||
NCE_RUNTIME_NRO_PATCH("nce_runtime_nro_patch"),
|
|
||||||
FIX_BLOOM_EFFECTS("fix_bloom_effects"),
|
FIX_BLOOM_EFFECTS("fix_bloom_effects"),
|
||||||
EMULATE_BGR565("emulate_bgr565"),
|
EMULATE_BGR565("emulate_bgr565"),
|
||||||
RESCALE_HACK("rescale_hack"),
|
RESCALE_HACK("rescale_hack"),
|
||||||
@@ -32,6 +30,7 @@ enum class BooleanSetting(override val key: String) : AbstractBooleanSetting {
|
|||||||
RENDERER_REACTIVE_FLUSHING("use_reactive_flushing"),
|
RENDERER_REACTIVE_FLUSHING("use_reactive_flushing"),
|
||||||
ENABLE_BUFFER_HISTORY("enable_buffer_history"),
|
ENABLE_BUFFER_HISTORY("enable_buffer_history"),
|
||||||
USE_OPTIMIZED_VERTEX_BUFFERS("use_optimized_vertex_buffers"),
|
USE_OPTIMIZED_VERTEX_BUFFERS("use_optimized_vertex_buffers"),
|
||||||
|
ENABLE_GPU_BUFFER_READBACK("enable_gpu_buffer_readback"),
|
||||||
SYNC_MEMORY_OPERATIONS("sync_memory_operations"),
|
SYNC_MEMORY_OPERATIONS("sync_memory_operations"),
|
||||||
BUFFER_REORDER_DISABLE("disable_buffer_reorder"),
|
BUFFER_REORDER_DISABLE("disable_buffer_reorder"),
|
||||||
RENDERER_DEBUG("debug"),
|
RENDERER_DEBUG("debug"),
|
||||||
|
|||||||
+7
-14
@@ -866,20 +866,6 @@ abstract class SettingsItem(
|
|||||||
descriptionId = R.string.skip_cpu_inner_invalidation_description
|
descriptionId = R.string.skip_cpu_inner_invalidation_description
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
put(
|
|
||||||
SwitchSetting(
|
|
||||||
BooleanSetting.NCE_INVALIDATION_GPU_READBACK,
|
|
||||||
titleId = R.string.nce_invalidation_gpu_readback,
|
|
||||||
descriptionId = R.string.nce_invalidation_gpu_readback_description
|
|
||||||
)
|
|
||||||
)
|
|
||||||
put(
|
|
||||||
SwitchSetting(
|
|
||||||
BooleanSetting.NCE_RUNTIME_NRO_PATCH,
|
|
||||||
titleId = R.string.nce_runtime_nro_patch,
|
|
||||||
descriptionId = R.string.nce_runtime_nro_patch_description
|
|
||||||
)
|
|
||||||
)
|
|
||||||
put(
|
put(
|
||||||
SwitchSetting(
|
SwitchSetting(
|
||||||
BooleanSetting.FIX_BLOOM_EFFECTS,
|
BooleanSetting.FIX_BLOOM_EFFECTS,
|
||||||
@@ -922,6 +908,13 @@ abstract class SettingsItem(
|
|||||||
descriptionId = R.string.enable_buffer_history_description
|
descriptionId = R.string.enable_buffer_history_description
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
put(
|
||||||
|
SwitchSetting(
|
||||||
|
BooleanSetting.ENABLE_GPU_BUFFER_READBACK,
|
||||||
|
titleId = R.string.enable_gpu_buffer_readback,
|
||||||
|
descriptionId = R.string.enable_gpu_buffer_readback_description
|
||||||
|
)
|
||||||
|
)
|
||||||
put(
|
put(
|
||||||
SwitchSetting(
|
SwitchSetting(
|
||||||
BooleanSetting.USE_OPTIMIZED_VERTEX_BUFFERS,
|
BooleanSetting.USE_OPTIMIZED_VERTEX_BUFFERS,
|
||||||
|
|||||||
+1
-2
@@ -549,13 +549,12 @@ class SettingsFragmentPresenter(
|
|||||||
add(BooleanSetting.RENDERER_FORCE_MAX_CLOCK.key)
|
add(BooleanSetting.RENDERER_FORCE_MAX_CLOCK.key)
|
||||||
add(BooleanSetting.RENDERER_REACTIVE_FLUSHING.key)
|
add(BooleanSetting.RENDERER_REACTIVE_FLUSHING.key)
|
||||||
add(BooleanSetting.ENABLE_BUFFER_HISTORY.key)
|
add(BooleanSetting.ENABLE_BUFFER_HISTORY.key)
|
||||||
|
add(BooleanSetting.ENABLE_GPU_BUFFER_READBACK.key)
|
||||||
add(BooleanSetting.USE_OPTIMIZED_VERTEX_BUFFERS.key)
|
add(BooleanSetting.USE_OPTIMIZED_VERTEX_BUFFERS.key)
|
||||||
|
|
||||||
add(HeaderSetting(R.string.hacks))
|
add(HeaderSetting(R.string.hacks))
|
||||||
|
|
||||||
add(BooleanSetting.SKIP_CPU_INNER_INVALIDATION.key)
|
add(BooleanSetting.SKIP_CPU_INNER_INVALIDATION.key)
|
||||||
add(BooleanSetting.NCE_INVALIDATION_GPU_READBACK.key)
|
|
||||||
add(BooleanSetting.NCE_RUNTIME_NRO_PATCH.key)
|
|
||||||
add(BooleanSetting.FIX_BLOOM_EFFECTS.key)
|
add(BooleanSetting.FIX_BLOOM_EFFECTS.key)
|
||||||
add(BooleanSetting.EMULATE_BGR565.key)
|
add(BooleanSetting.EMULATE_BGR565.key)
|
||||||
add(BooleanSetting.RENDERER_ASYNCHRONOUS_SHADERS.key)
|
add(BooleanSetting.RENDERER_ASYNCHRONOUS_SHADERS.key)
|
||||||
|
|||||||
@@ -23,7 +23,6 @@ import org.yuzu.yuzu_emu.model.Driver.Companion.toDriver
|
|||||||
import org.yuzu.yuzu_emu.utils.GpuDriverHelper
|
import org.yuzu.yuzu_emu.utils.GpuDriverHelper
|
||||||
import org.yuzu.yuzu_emu.NativeLibrary
|
import org.yuzu.yuzu_emu.NativeLibrary
|
||||||
import org.yuzu.yuzu_emu.utils.GpuDriverMetadata
|
import org.yuzu.yuzu_emu.utils.GpuDriverMetadata
|
||||||
import org.yuzu.yuzu_emu.utils.DirectoryInitialization
|
|
||||||
import org.yuzu.yuzu_emu.utils.NativeConfig
|
import org.yuzu.yuzu_emu.utils.NativeConfig
|
||||||
import java.io.File
|
import java.io.File
|
||||||
|
|
||||||
@@ -147,11 +146,11 @@ class DriverViewModel : ViewModel() {
|
|||||||
private fun wipeGameShaders(game: Game) {
|
private fun wipeGameShaders(game: Game) {
|
||||||
viewModelScope.launch {
|
viewModelScope.launch {
|
||||||
withContext(Dispatchers.IO) {
|
withContext(Dispatchers.IO) {
|
||||||
val userDirectory = DirectoryInitialization.userDirectory
|
val externalFilesDir = YuzuApplication.appContext.getExternalFilesDir(null)
|
||||||
?: return@withContext
|
?: return@withContext
|
||||||
val shaderDir = File(
|
val shaderDir = File(
|
||||||
userDirectory +
|
externalFilesDir.absolutePath +
|
||||||
"/cache/shader/" + game.settingsName.lowercase()
|
"/shader/" + game.settingsName.lowercase()
|
||||||
)
|
)
|
||||||
if (shaderDir.exists()) {
|
if (shaderDir.exists()) {
|
||||||
shaderDir.deleteRecursively()
|
shaderDir.deleteRecursively()
|
||||||
|
|||||||
@@ -788,7 +788,7 @@ int Java_org_yuzu_yuzu_1emu_NativeLibrary_installFileToNand(JNIEnv* env, jobject
|
|||||||
jboolean Java_org_yuzu_yuzu_1emu_NativeLibrary_doesUpdateMatchProgram(JNIEnv* env, jobject jobj,
|
jboolean Java_org_yuzu_yuzu_1emu_NativeLibrary_doesUpdateMatchProgram(JNIEnv* env, jobject jobj,
|
||||||
jstring jprogramId,
|
jstring jprogramId,
|
||||||
jstring jupdatePath) {
|
jstring jupdatePath) {
|
||||||
const u64 program_id = FileSys::GetBaseTitleID(EmulationSession::GetProgramId(env, jprogramId));
|
u64 program_id = EmulationSession::GetProgramId(env, jprogramId);
|
||||||
std::string updatePath = Common::Android::GetJString(env, jupdatePath);
|
std::string updatePath = Common::Android::GetJString(env, jupdatePath);
|
||||||
std::shared_ptr<FileSys::NSP> nsp = std::make_shared<FileSys::NSP>(
|
std::shared_ptr<FileSys::NSP> nsp = std::make_shared<FileSys::NSP>(
|
||||||
EmulationSession::GetInstance().System().GetFilesystem()->OpenFile(
|
EmulationSession::GetInstance().System().GetFilesystem()->OpenFile(
|
||||||
@@ -796,7 +796,7 @@ jboolean Java_org_yuzu_yuzu_1emu_NativeLibrary_doesUpdateMatchProgram(JNIEnv* en
|
|||||||
for (const auto& item : nsp->GetNCAs()) {
|
for (const auto& item : nsp->GetNCAs()) {
|
||||||
for (const auto& nca_details : item.second) {
|
for (const auto& nca_details : item.second) {
|
||||||
if (nca_details.second->GetName().ends_with(".cnmt.nca")) {
|
if (nca_details.second->GetName().ends_with(".cnmt.nca")) {
|
||||||
const auto update_id = FileSys::GetBaseTitleID(nca_details.second->GetTitleId());
|
auto update_id = nca_details.second->GetTitleId() & ~0xFFFULL;
|
||||||
if (update_id == program_id) {
|
if (update_id == program_id) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -28,7 +28,7 @@
|
|||||||
<string name="input_overlay_behavior">السلوك</string>
|
<string name="input_overlay_behavior">السلوك</string>
|
||||||
<string name="overlay_auto_hide">إخفاء الطبقة تلقائيًا</string>
|
<string name="overlay_auto_hide">إخفاء الطبقة تلقائيًا</string>
|
||||||
<string name="overlay_auto_hide_description">إخفاء طبقة ذراع التحكم باللمس تلقائيًا بعد مرور الوقت المحدد من عدم النشاط.</string>
|
<string name="overlay_auto_hide_description">إخفاء طبقة ذراع التحكم باللمس تلقائيًا بعد مرور الوقت المحدد من عدم النشاط.</string>
|
||||||
<string name="enable_input_overlay_auto_hide">تفعيل إخفاء الطبقة تلقائيًا</string>
|
<string name="enable_input_overlay_auto_hide">تمكين إخفاء الطبقة تلقائيًا</string>
|
||||||
<string name="hide_overlay_on_controller_input">إخفاء الطبقة عند إدخال ذراع التحكم</string>
|
<string name="hide_overlay_on_controller_input">إخفاء الطبقة عند إدخال ذراع التحكم</string>
|
||||||
<string name="hide_overlay_on_controller_input_description">إخفاء تلقائي لطبقة عناصر التحكم باللمس عند استخدام ذراع تحكم فعلية. تظهر الطبقة مرة أخرى عند فصل ذراع التحكم.</string>
|
<string name="hide_overlay_on_controller_input_description">إخفاء تلقائي لطبقة عناصر التحكم باللمس عند استخدام ذراع تحكم فعلية. تظهر الطبقة مرة أخرى عند فصل ذراع التحكم.</string>
|
||||||
<string name="invert_confirm_back_controller_buttons">عكس أزرار التأكيد/الرجوع في وحدة التحكم</string>
|
<string name="invert_confirm_back_controller_buttons">عكس أزرار التأكيد/الرجوع في وحدة التحكم</string>
|
||||||
@@ -51,7 +51,7 @@
|
|||||||
<string name="stats_overlay_customization">التخصيص</string>
|
<string name="stats_overlay_customization">التخصيص</string>
|
||||||
<string name="stats_overlay_items">الرؤية</string>
|
<string name="stats_overlay_items">الرؤية</string>
|
||||||
<string name="stats_overlay_options">طبقة الأداء</string>
|
<string name="stats_overlay_options">طبقة الأداء</string>
|
||||||
<string name="enable_stats_overlay_">تفعيل طبقة إحصائيات الأداء</string>
|
<string name="enable_stats_overlay_">تمكين طبقة إحصائيات الأداء</string>
|
||||||
<string name="stats_overlay_options_description">ضبط المعلومات التي يتم عرضها في طبقة إحصائيات الأداء</string>
|
<string name="stats_overlay_options_description">ضبط المعلومات التي يتم عرضها في طبقة إحصائيات الأداء</string>
|
||||||
<string name="show_fps">عرض معدل الإطارات</string>
|
<string name="show_fps">عرض معدل الإطارات</string>
|
||||||
<string name="show_fps_description">عرض معدل الإطارات الحالي</string>
|
<string name="show_fps_description">عرض معدل الإطارات الحالي</string>
|
||||||
@@ -81,7 +81,7 @@
|
|||||||
|
|
||||||
<!-- Device Overlay settings -->
|
<!-- Device Overlay settings -->
|
||||||
<string name="show_soc_overlay">عرض طبقة معلومات الجهاز</string>
|
<string name="show_soc_overlay">عرض طبقة معلومات الجهاز</string>
|
||||||
<string name="enable_soc_overlay">تفعيل طبقة الجهاز</string>
|
<string name="enable_soc_overlay">تمكين طبقة الجهاز</string>
|
||||||
<string name="soc_overlay_options">طبقة الجهاز</string>
|
<string name="soc_overlay_options">طبقة الجهاز</string>
|
||||||
<string name="soc_overlay_options_description">ضبط المعلومات التي يتم عرضها في طبقة الجهاز</string>
|
<string name="soc_overlay_options_description">ضبط المعلومات التي يتم عرضها في طبقة الجهاز</string>
|
||||||
|
|
||||||
@@ -98,8 +98,8 @@
|
|||||||
|
|
||||||
<string name="use_sync_core">مزامنة سرعة النواة</string>
|
<string name="use_sync_core">مزامنة سرعة النواة</string>
|
||||||
<string name="use_sync_core_description">قم بمزامنة سرعة النواة مع النسبة المئوية للسرعة القصوى لتحسين الأداء دون تغيير السرعة الفعلية للعبة.</string>
|
<string name="use_sync_core_description">قم بمزامنة سرعة النواة مع النسبة المئوية للسرعة القصوى لتحسين الأداء دون تغيير السرعة الفعلية للعبة.</string>
|
||||||
<string name="cpuopt_unsafe_host_mmu">تفعيل محاكاة MMU المضيف</string>
|
<string name="cpuopt_unsafe_host_mmu">تمكين محاكاة MMU المضيف</string>
|
||||||
<string name="cpuopt_unsafe_host_mmu_description">يعمل هذا التحسين على تسريع وصول الذاكرة بواسطة البرنامج الضيف. يؤدي تفعيله إلى إجراء عمليات قراءة/كتابة ذاكرة الضيف مباشرة في الذاكرة والاستفادة من MMU المضيف. يؤدي تعطيل هذا إلى إجبار جميع عمليات الوصول إلى الذاكرة على استخدام محاكاة MMU البرمجية.</string>
|
<string name="cpuopt_unsafe_host_mmu_description">يعمل هذا التحسين على تسريع وصول الذاكرة بواسطة البرنامج الضيف. يؤدي تمكينه إلى إجراء عمليات قراءة/كتابة ذاكرة الضيف مباشرة في الذاكرة والاستفادة من MMU المضيف. يؤدي تعطيل هذا إلى إجبار جميع عمليات الوصول إلى الذاكرة على استخدام محاكاة MMU البرمجية.</string>
|
||||||
<string name="debug_knobs">مقابض تصحيح الأخطاء</string>
|
<string name="debug_knobs">مقابض تصحيح الأخطاء</string>
|
||||||
<string name="debug_knobs_description">للإستخدام في التطوير فقط.</string>
|
<string name="debug_knobs_description">للإستخدام في التطوير فقط.</string>
|
||||||
<string name="debug_knobs_hint">0 إلى 65535</string>
|
<string name="debug_knobs_hint">0 إلى 65535</string>
|
||||||
@@ -342,7 +342,7 @@
|
|||||||
<string name="frame_gen_flow_scale_description">دقة مسار التدفق البصري، كجزء من الناتج. ويُعد خفض هذه القيمة أرخص طريقة لاستعادة الأداء.</string>
|
<string name="frame_gen_flow_scale_description">دقة مسار التدفق البصري، كجزء من الناتج. ويُعد خفض هذه القيمة أرخص طريقة لاستعادة الأداء.</string>
|
||||||
<string name="frame_gen_unsupported">توليد الإطار غير متاح</string>
|
<string name="frame_gen_unsupported">توليد الإطار غير متاح</string>
|
||||||
<string name="frame_gen_unsupported_description">يفتقر برنامج تشغيل وحدة معالجة الرسومات هذا إلى نموذج ذاكرة Vulkan أو دعم الدقة النصفية (float16) التي تتطلبها برامج التظليل الخاصة بـ «Lossless Scaling».</string>
|
<string name="frame_gen_unsupported_description">يفتقر برنامج تشغيل وحدة معالجة الرسومات هذا إلى نموذج ذاكرة Vulkan أو دعم الدقة النصفية (float16) التي تتطلبها برامج التظليل الخاصة بـ «Lossless Scaling».</string>
|
||||||
<string name="lossless_scaling_setup_description">اختياري. قم بتوفير ملف Lossless.dll الخاص بك لتفعيل إنشاء الإطارات لاحقًا</string>
|
<string name="lossless_scaling_setup_description">اختياري. قم بتوفير ملف Lossless.dll الخاص بك لتمكين إنشاء الإطارات لاحقًا</string>
|
||||||
<string name="lossless_scaling_install">تثبيت ملف Lossless.dll</string>
|
<string name="lossless_scaling_install">تثبيت ملف Lossless.dll</string>
|
||||||
<string name="lossless_scaling_install_description">يتطلب إنشاء الإطارات أن تكون لديك نسخة قانونية خاصة بك من ملف Lossless.dll المأخوذ من برنامج Lossless Scaling</string>
|
<string name="lossless_scaling_install_description">يتطلب إنشاء الإطارات أن تكون لديك نسخة قانونية خاصة بك من ملف Lossless.dll المأخوذ من برنامج Lossless Scaling</string>
|
||||||
<string name="lossless_scaling_replace_description">اختر نسخة أخرى من ملف Lossless.dll</string>
|
<string name="lossless_scaling_replace_description">اختر نسخة أخرى من ملف Lossless.dll</string>
|
||||||
@@ -350,7 +350,7 @@
|
|||||||
<string name="frame_generation_supported">مدعوم</string>
|
<string name="frame_generation_supported">مدعوم</string>
|
||||||
<string name="frame_generation_unsupported">غير مدعوم (لا يتوفر نموذج ذاكرة Vulkan أو float16)</string>
|
<string name="frame_generation_unsupported">غير مدعوم (لا يتوفر نموذج ذاكرة Vulkan أو float16)</string>
|
||||||
<string name="lossless_scaling">Lossless Scaling</string>
|
<string name="lossless_scaling">Lossless Scaling</string>
|
||||||
<string name="lossless_scaling_description">قم بتوفير نسختك الخاصة من ملف Lossless.dll لتفعيل توليد الإطارات</string>
|
<string name="lossless_scaling_description">قم بتوفير نسختك الخاصة من ملف Lossless.dll لتمكين توليد الإطارات</string>
|
||||||
<string name="lossless_scaling_installed">مثبت</string>
|
<string name="lossless_scaling_installed">مثبت</string>
|
||||||
<string name="lossless_scaling_not_installed">غير مثبت</string>
|
<string name="lossless_scaling_not_installed">غير مثبت</string>
|
||||||
<string name="lossless_scaling_replace">استبدل</string>
|
<string name="lossless_scaling_replace">استبدل</string>
|
||||||
@@ -502,9 +502,9 @@
|
|||||||
<string name="frame_limit_slider">نسبة الحد الأقصى للسرعة</string>
|
<string name="frame_limit_slider">نسبة الحد الأقصى للسرعة</string>
|
||||||
<string name="frame_limit_slider_description">يحدد النسبة المئوية للحد من سرعة المحاكاة. %100 هي السرعة الطبيعية. القيم الأعلى أو الأقل ستزيد أو تقلل من الحد الأقصى للسرعة.</string>
|
<string name="frame_limit_slider_description">يحدد النسبة المئوية للحد من سرعة المحاكاة. %100 هي السرعة الطبيعية. القيم الأعلى أو الأقل ستزيد أو تقلل من الحد الأقصى للسرعة.</string>
|
||||||
<string name="turbo_speed_limit">سرعة تيربو</string>
|
<string name="turbo_speed_limit">سرعة تيربو</string>
|
||||||
<string name="turbo_speed_limit_description">عند تفعيل وضع التيربو، سيتم تشغيل المحاكاة بهذه السرعة.</string>
|
<string name="turbo_speed_limit_description">عند تمكين وضع التيربو، سيتم تشغيل المحاكاة بهذه السرعة.</string>
|
||||||
<string name="slow_speed_limit">سرعة بطيئة</string>
|
<string name="slow_speed_limit">سرعة بطيئة</string>
|
||||||
<string name="slow_speed_limit_description">عند تفعيل الوضع البطيء، سيتم تشغيل المحاكاة بهذه السرعة.</string>
|
<string name="slow_speed_limit_description">عند تمكين الوضع البطيء، سيتم تشغيل المحاكاة بهذه السرعة.</string>
|
||||||
<string name="cpu_backend">خلفية وحدة المعالجة المركزية</string>
|
<string name="cpu_backend">خلفية وحدة المعالجة المركزية</string>
|
||||||
<string name="cpu_accuracy">دقة وحدة المعالجة المركزية</string>
|
<string name="cpu_accuracy">دقة وحدة المعالجة المركزية</string>
|
||||||
<string name="value_with_units">%1$s%2$s</string>
|
<string name="value_with_units">%1$s%2$s</string>
|
||||||
@@ -578,8 +578,10 @@
|
|||||||
<string name="renderer_async_presentation_description">يمكن لهذه الحيلة أن تزيد من الأداء عن طريق نقل عملية العرض إلى خيط معالجة منفصل على حساب مشاكل الرسوميات.</string>
|
<string name="renderer_async_presentation_description">يمكن لهذه الحيلة أن تزيد من الأداء عن طريق نقل عملية العرض إلى خيط معالجة منفصل على حساب مشاكل الرسوميات.</string>
|
||||||
<string name="renderer_reactive_flushing">استخدم التنظيف التفاعلي</string>
|
<string name="renderer_reactive_flushing">استخدم التنظيف التفاعلي</string>
|
||||||
<string name="renderer_reactive_flushing_description">يحسن دقة العرض في بعض الألعاب على حساب الأداء.</string>
|
<string name="renderer_reactive_flushing_description">يحسن دقة العرض في بعض الألعاب على حساب الأداء.</string>
|
||||||
<string name="enable_buffer_history">تفعيل سجل التخزين المؤقت</string>
|
<string name="enable_buffer_history">تمكين سجل التخزين المؤقت</string>
|
||||||
<string name="enable_buffer_history_description">يُتيح هذا الخيار الوصول إلى حالات التخزين المؤقت السابقة. وقد يُحسّن جودة العرض وثبات الأداء في بعض الألعاب.</string>
|
<string name="enable_buffer_history_description">يُتيح هذا الخيار الوصول إلى حالات التخزين المؤقت السابقة. وقد يُحسّن جودة العرض وثبات الأداء في بعض الألعاب.</string>
|
||||||
|
<string name="enable_gpu_buffer_readback">تفعيل قراءة مخزن وحدة معالجة الرسومات</string>
|
||||||
|
<string name="enable_gpu_buffer_readback_description">يحافظ هذا النظام على بيانات المخزن المؤقت المُعدّلة بواسطة وحدة معالجة الرسومات عن طريق قراءتها مرة أخرى قبل التحميل. تتطلب بعض الألعاب ذلك لعرض بعض التأثيرات بشكل صحيح. قد يُسبب ذلك مشاكل إذا لم يتمكن الجهاز من التعامل مع عبء العمل الإضافي.</string>
|
||||||
<string name="use_optimized_vertex_buffers">مخازن الرؤوس المُحسّنة</string>
|
<string name="use_optimized_vertex_buffers">مخازن الرؤوس المُحسّنة</string>
|
||||||
<string name="use_optimized_vertex_buffers_description">يُتيح ربطًا مُحسَّنًا لمخازن الرؤوس لتحسين الأداء. يتطلب برامج تشغيل Mesa 26.0+ Turnip/ برامج تشغيل QCOM. قد يتعطل على برامج تشغيل Turnip القديمة (25.3 وما دون).</string>
|
<string name="use_optimized_vertex_buffers_description">يُتيح ربطًا مُحسَّنًا لمخازن الرؤوس لتحسين الأداء. يتطلب برامج تشغيل Mesa 26.0+ Turnip/ برامج تشغيل QCOM. قد يتعطل على برامج تشغيل Turnip القديمة (25.3 وما دون).</string>
|
||||||
|
|
||||||
@@ -616,7 +618,7 @@
|
|||||||
<string name="dyna_state_description">يتحكم هذا الخيار في عدد الميزات التي يمكن استخدامها في ExtendedDynamicState (EDS). كلما زادت القيمة، قلّ عدد عمليات تجميع خط الأنابيب بناءً على الحالة الديناميكية التي يدعمها برنامج التشغيل.</string>
|
<string name="dyna_state_description">يتحكم هذا الخيار في عدد الميزات التي يمكن استخدامها في ExtendedDynamicState (EDS). كلما زادت القيمة، قلّ عدد عمليات تجميع خط الأنابيب بناءً على الحالة الديناميكية التي يدعمها برنامج التشغيل.</string>
|
||||||
<string name="disabled">معطل</string>
|
<string name="disabled">معطل</string>
|
||||||
<string name="vertex_input_dynamic_state">حالة ديناميكية لإدخال الرأس</string>
|
<string name="vertex_input_dynamic_state">حالة ديناميكية لإدخال الرأس</string>
|
||||||
<string name="vertex_input_dynamic_state_description">يتيح تفعيل هذه الميزة معالجة أكثر مرونة لمدخلات الرؤوس، مما قد يقلل من وقت تجميع خط الأنابيب في vertex/buffer.</string>
|
<string name="vertex_input_dynamic_state_description">يتيح تمكين هذه الميزة معالجة أكثر مرونة لمدخلات الرؤوس، مما قد يقلل من وقت تجميع خط الأنابيب في vertex/buffer.</string>
|
||||||
<string name="sample_shading_fraction">تظليل العينة</string>
|
<string name="sample_shading_fraction">تظليل العينة</string>
|
||||||
<string name="sample_shading_fraction_description">يسمح هذا الخيار بتنفيذ مُظلل الأجزاء لكل عينة في جزء متعدد العينات بدلاً من تنفيذه مرة واحدة لكل جزء. يُحسّن هذا من جودة الرسومات على حساب بعض الأداء.</string>
|
<string name="sample_shading_fraction_description">يسمح هذا الخيار بتنفيذ مُظلل الأجزاء لكل عينة في جزء متعدد العينات بدلاً من تنفيذه مرة واحدة لكل جزء. يُحسّن هذا من جودة الرسومات على حساب بعض الأداء.</string>
|
||||||
|
|
||||||
@@ -825,9 +827,9 @@
|
|||||||
<string name="preferences_system">النظام</string>
|
<string name="preferences_system">النظام</string>
|
||||||
<string name="preferences_system_description">وضع الإرساء، المنطقة، اللغة</string>
|
<string name="preferences_system_description">وضع الإرساء، المنطقة، اللغة</string>
|
||||||
<string name="preferences_graphics">الرسومات</string>
|
<string name="preferences_graphics">الرسومات</string>
|
||||||
<string name="preferences_graphics_description">مستوى دقة المحاكاة، الدقة، ذاكرة التخزين المؤقتة للتظليل</string>
|
<string name="preferences_graphics_description">مستوى الدقة، الدقة، ذاكرة التخزين المؤقتة للتظليل</string>
|
||||||
<string name="quick_settings">الإعدادات السريعة</string>
|
<string name="quick_settings">الإعدادات السريعة</string>
|
||||||
<string name="enable_quick_settings">تفعيل الإعدادات السريعة</string>
|
<string name="enable_quick_settings">تمكين الإعدادات السريعة</string>
|
||||||
<string name="enable_quick_settings_description">السماح بالوصول إلى قائمة الإعدادات السريعة عن طريق التمرير و زر القائمة</string>
|
<string name="enable_quick_settings_description">السماح بالوصول إلى قائمة الإعدادات السريعة عن طريق التمرير و زر القائمة</string>
|
||||||
<string name="preferences_audio">الصوت</string>
|
<string name="preferences_audio">الصوت</string>
|
||||||
<string name="preferences_audio_description">محرك الإخراج، مستوى الصوت</string>
|
<string name="preferences_audio_description">محرك الإخراج، مستوى الصوت</string>
|
||||||
@@ -1097,6 +1099,7 @@
|
|||||||
<string name="gpu_fence_behavior_immediate">فوري</string>
|
<string name="gpu_fence_behavior_immediate">فوري</string>
|
||||||
<string name="gpu_fence_behavior_balanced">متوازن</string>
|
<string name="gpu_fence_behavior_balanced">متوازن</string>
|
||||||
<string name="gpu_fence_behavior_accurate">دقيق</string>
|
<string name="gpu_fence_behavior_accurate">دقيق</string>
|
||||||
|
<string name="gpu_fence_behavior_strict">صارم</string>
|
||||||
|
|
||||||
<string name="vram_usage_conservative">محافظ</string>
|
<string name="vram_usage_conservative">محافظ</string>
|
||||||
<string name="vram_usage_aggressive">عدواني</string>
|
<string name="vram_usage_aggressive">عدواني</string>
|
||||||
@@ -1223,8 +1226,8 @@
|
|||||||
<string name="airplane_mode">وضع الطيران</string>
|
<string name="airplane_mode">وضع الطيران</string>
|
||||||
<string name="airplane_mode_description">يمرر وضع الطيران إلى نظام تشغيل Switch</string>
|
<string name="airplane_mode_description">يمرر وضع الطيران إلى نظام تشغيل Switch</string>
|
||||||
|
|
||||||
<string name="enable_overlay">تفعيل التطبيق الصغير للطبقة</string>
|
<string name="enable_overlay">تمكين التطبيق الصغير للطبقة</string>
|
||||||
<string name="enable_overlay_description">تفعيل التطبيق الصغير المدمج في Horizon. اضغط مع الاستمرار على زر الشاشة الرئيسية لمدة 1 ثانية لإظهاره.</string>
|
<string name="enable_overlay_description">تمكين التطبيق الصغير المدمج في Horizon. اضغط مع الاستمرار على زر الشاشة الرئيسية لمدة 1 ثانية لإظهاره.</string>
|
||||||
|
|
||||||
<!-- Profile Management -->
|
<!-- Profile Management -->
|
||||||
<string name="profile_manager">إدارة ملف التعريف</string>
|
<string name="profile_manager">إدارة ملف التعريف</string>
|
||||||
|
|||||||
@@ -967,6 +967,7 @@ Wirklich fortfahren?</string>
|
|||||||
<string name="gpu_fence_behavior_immediate">Direkt</string>
|
<string name="gpu_fence_behavior_immediate">Direkt</string>
|
||||||
<string name="gpu_fence_behavior_balanced">Ausgewogen</string>
|
<string name="gpu_fence_behavior_balanced">Ausgewogen</string>
|
||||||
<string name="gpu_fence_behavior_accurate">Genau</string>
|
<string name="gpu_fence_behavior_accurate">Genau</string>
|
||||||
|
<string name="gpu_fence_behavior_strict">Strikt</string>
|
||||||
|
|
||||||
<string name="vram_usage_conservative">Konservativ</string>
|
<string name="vram_usage_conservative">Konservativ</string>
|
||||||
<string name="vram_usage_aggressive">Aggressiv</string>
|
<string name="vram_usage_aggressive">Aggressiv</string>
|
||||||
|
|||||||
@@ -289,7 +289,6 @@
|
|||||||
<string name="gpu_driver_fetcher">Obtenedor de controladores de la GPU</string>
|
<string name="gpu_driver_fetcher">Obtenedor de controladores de la GPU</string>
|
||||||
<string name="gpu_driver_manager">Gestor de controladores de la GPU</string>
|
<string name="gpu_driver_manager">Gestor de controladores de la GPU</string>
|
||||||
<string name="install_gpu_driver_description">Instale los controladores alternativos para obtener un posible mejor rendimiento o precisión</string>
|
<string name="install_gpu_driver_description">Instale los controladores alternativos para obtener un posible mejor rendimiento o precisión</string>
|
||||||
<string name="post_processing_add">Añadir efecto</string>
|
|
||||||
<string name="post_processing_open_list">Abrir lista</string>
|
<string name="post_processing_open_list">Abrir lista</string>
|
||||||
<string name="post_processing_close_list">Cerrar lista</string>
|
<string name="post_processing_close_list">Cerrar lista</string>
|
||||||
<string name="post_processing_reset">Restablecer a predeterminado</string>
|
<string name="post_processing_reset">Restablecer a predeterminado</string>
|
||||||
@@ -524,6 +523,8 @@
|
|||||||
<string name="renderer_reactive_flushing_description">Mejora la precisión de renderizado en algunos juegos, pero reduce el rendimiento.</string>
|
<string name="renderer_reactive_flushing_description">Mejora la precisión de renderizado en algunos juegos, pero reduce el rendimiento.</string>
|
||||||
<string name="enable_buffer_history">Activar el historial del búfer</string>
|
<string name="enable_buffer_history">Activar el historial del búfer</string>
|
||||||
<string name="enable_buffer_history_description">Permite el acceso al estado del búfer anterior. Esta opción puede mejorar la calidad de renderizado y la consistencia en el rendimiento de algunos juegos.</string>
|
<string name="enable_buffer_history_description">Permite el acceso al estado del búfer anterior. Esta opción puede mejorar la calidad de renderizado y la consistencia en el rendimiento de algunos juegos.</string>
|
||||||
|
<string name="enable_gpu_buffer_readback">Activar la lectura del buffer de la GPU</string>
|
||||||
|
<string name="enable_gpu_buffer_readback_description">Conserva los datos del búfer modificados por la GPU leyéndolos antes de subirlos.\nAlgunos juegos requieren esto para renderizar correctamente ciertos efectos.\nPuede causar problemas si el hardware no puede soportar la carga de trabajo adicional.</string>
|
||||||
<string name="use_optimized_vertex_buffers">Búferes de vértices optimizados</string>
|
<string name="use_optimized_vertex_buffers">Búferes de vértices optimizados</string>
|
||||||
<string name="use_optimized_vertex_buffers_description">Permite la optimización del enlace del búfer de vértices para un mejor rendimiento. Requiere controladores Mesa 26.0+ Turnip/ controladores QCOM. Fallará con controladores Turnip más antiguos (versión 25.3 o inferior).</string>
|
<string name="use_optimized_vertex_buffers_description">Permite la optimización del enlace del búfer de vértices para un mejor rendimiento. Requiere controladores Mesa 26.0+ Turnip/ controladores QCOM. Fallará con controladores Turnip más antiguos (versión 25.3 o inferior).</string>
|
||||||
|
|
||||||
@@ -1036,6 +1037,7 @@
|
|||||||
<string name="gpu_fence_behavior_immediate">Inmediato</string>
|
<string name="gpu_fence_behavior_immediate">Inmediato</string>
|
||||||
<string name="gpu_fence_behavior_balanced">Equilibrado</string>
|
<string name="gpu_fence_behavior_balanced">Equilibrado</string>
|
||||||
<string name="gpu_fence_behavior_accurate">Preciso</string>
|
<string name="gpu_fence_behavior_accurate">Preciso</string>
|
||||||
|
<string name="gpu_fence_behavior_strict">Estricto</string>
|
||||||
|
|
||||||
<string name="vram_usage_conservative">Conservador</string>
|
<string name="vram_usage_conservative">Conservador</string>
|
||||||
<string name="vram_usage_aggressive">Agresivo</string>
|
<string name="vram_usage_aggressive">Agresivo</string>
|
||||||
|
|||||||
@@ -318,13 +318,6 @@
|
|||||||
<string name="frame_gen_target_rate">Целевая частота кадров</string>
|
<string name="frame_gen_target_rate">Целевая частота кадров</string>
|
||||||
<string name="frame_gen_target_rate_description">Выберите значение под ваш дисплей. Множитель подстроится сам, чтобы его держать, и откатит изменения, если игра начнёт тормозить.</string>
|
<string name="frame_gen_target_rate_description">Выберите значение под ваш дисплей. Множитель подстроится сам, чтобы его держать, и откатит изменения, если игра начнёт тормозить.</string>
|
||||||
<string name="frame_gen_target_rate_off">Использовать фиксированный множитель</string>
|
<string name="frame_gen_target_rate_off">Использовать фиксированный множитель</string>
|
||||||
<string name="frame_gen_on">Вкл.</string>
|
|
||||||
<string name="frame_gen_off">Выкл.</string>
|
|
||||||
<string name="frame_gen_fixed">Фикс.</string>
|
|
||||||
<string name="frame_gen_flow_auto">Авто</string>
|
|
||||||
<string name="frame_gen_quick_description">Включите или выключите генерацию кадров и выберите множитель кадров.</string>
|
|
||||||
<string name="frame_gen_target_rate_quick_description">Генерация кадров с заданной частотой кадров. Множитель регулируется автоматически.</string>
|
|
||||||
<string name="frame_gen_flow_scale_quick_description">Разрешение, используемое для оценки движения между кадрами. Меньшие значения экономят время ГПУ.</string>
|
|
||||||
<string name="frame_gen_queue_target">Целевой размер очереди кадров</string>
|
<string name="frame_gen_queue_target">Целевой размер очереди кадров</string>
|
||||||
<string name="frame_gen_queue_target_description">Сколько готовых кадров может ожидать перед выводом на экран. Более длинные очереди сглаживают скачки ГПУ ценой задержки ввода.</string>
|
<string name="frame_gen_queue_target_description">Сколько готовых кадров может ожидать перед выводом на экран. Более длинные очереди сглаживают скачки ГПУ ценой задержки ввода.</string>
|
||||||
<string name="frame_gen_queue_target_0">Минимальная задержка (Без буферизации)</string>
|
<string name="frame_gen_queue_target_0">Минимальная задержка (Без буферизации)</string>
|
||||||
@@ -335,14 +328,12 @@
|
|||||||
<string name="frame_gen_flow_scale">Разрешение оценки движения</string>
|
<string name="frame_gen_flow_scale">Разрешение оценки движения</string>
|
||||||
<string name="frame_gen_flow_scale_description">Разрешение прохода оптического потока в долях от выходного разрешения. Его понижение — самый дешёвый способ вернуть производительность.</string>
|
<string name="frame_gen_flow_scale_description">Разрешение прохода оптического потока в долях от выходного разрешения. Его понижение — самый дешёвый способ вернуть производительность.</string>
|
||||||
<string name="frame_gen_unsupported">Генерация кадров недоступна</string>
|
<string name="frame_gen_unsupported">Генерация кадров недоступна</string>
|
||||||
<string name="frame_gen_unsupported_description">В этом ГПУ драйвере отсутствует поддержка модели памяти Vulkan или половинной точности (float16), которая требуется шейдерам Lossless Scaling.</string>
|
|
||||||
<string name="lossless_scaling_setup_description">Опционально. Укажите свой Lossless.dll для включения генерации кадров позже.</string>
|
<string name="lossless_scaling_setup_description">Опционально. Укажите свой Lossless.dll для включения генерации кадров позже.</string>
|
||||||
<string name="lossless_scaling_install">Установить Lossless.dll</string>
|
<string name="lossless_scaling_install">Установить Lossless.dll</string>
|
||||||
<string name="lossless_scaling_install_description">Для генерации кадров требуется ваша собственная легальная копия Lossless.dll из Lossless Scaling</string>
|
<string name="lossless_scaling_install_description">Для генерации кадров требуется ваша собственная легальная копия Lossless.dll из Lossless Scaling</string>
|
||||||
<string name="lossless_scaling_replace_description">Выбрать другой файл Lossless.dll</string>
|
<string name="lossless_scaling_replace_description">Выбрать другой файл Lossless.dll</string>
|
||||||
<string name="frame_generation_support">Генерация кадров</string>
|
<string name="frame_generation_support">Генерация кадров</string>
|
||||||
<string name="frame_generation_supported">Поддерживается</string>
|
<string name="frame_generation_supported">Поддерживается</string>
|
||||||
<string name="frame_generation_unsupported">Не поддерживается (нет модели памяти Vulkan или float16)</string>
|
|
||||||
<string name="lossless_scaling_description">Предоставьте свою копию Lossless.dll для включения генерации кадров</string>
|
<string name="lossless_scaling_description">Предоставьте свою копию Lossless.dll для включения генерации кадров</string>
|
||||||
<string name="lossless_scaling_installed">Установлена</string>
|
<string name="lossless_scaling_installed">Установлена</string>
|
||||||
<string name="lossless_scaling_not_installed">Не установлена</string>
|
<string name="lossless_scaling_not_installed">Не установлена</string>
|
||||||
@@ -569,6 +560,8 @@
|
|||||||
<string name="renderer_reactive_flushing_description">Повышение точности рендеринга в некоторых играх за счет снижения производительности.</string>
|
<string name="renderer_reactive_flushing_description">Повышение точности рендеринга в некоторых играх за счет снижения производительности.</string>
|
||||||
<string name="enable_buffer_history">Включить историю буфера</string>
|
<string name="enable_buffer_history">Включить историю буфера</string>
|
||||||
<string name="enable_buffer_history_description">Позволяет обращаться к предыдущим состояниям буфера. Эта опция может повысить качество рендеринга и стабильность производительности в некоторых играх.</string>
|
<string name="enable_buffer_history_description">Позволяет обращаться к предыдущим состояниям буфера. Эта опция может повысить качество рендеринга и стабильность производительности в некоторых играх.</string>
|
||||||
|
<string name="enable_gpu_buffer_readback">Включить обратное чтение буфера ГПУ</string>
|
||||||
|
<string name="enable_gpu_buffer_readback_description">Сохраняет измененные ГПУ данные буфера путем чтения их обратно перед выгрузками. Некоторые игры требуют этого, чтобы рендерить определенные эффекты правильно. Может вызывать проблемы если оборудование не может обработать дополнительную рабочую нагрузку.</string>
|
||||||
<string name="use_optimized_vertex_buffers">Оптимизированные вершинные буферы</string>
|
<string name="use_optimized_vertex_buffers">Оптимизированные вершинные буферы</string>
|
||||||
<string name="use_optimized_vertex_buffers_description">Включает оптимизированную привязку вершинного буфера для повышения производительности. Требует Mesa Turnip 26.0+ / QCOM. Приводит к вылету на старых версиях драйверов Turnip (25.3 и ниже).</string>
|
<string name="use_optimized_vertex_buffers_description">Включает оптимизированную привязку вершинного буфера для повышения производительности. Требует Mesa Turnip 26.0+ / QCOM. Приводит к вылету на старых версиях драйверов Turnip (25.3 и ниже).</string>
|
||||||
|
|
||||||
@@ -1086,6 +1079,7 @@
|
|||||||
<string name="gpu_fence_behavior_immediate">Мгновенный</string>
|
<string name="gpu_fence_behavior_immediate">Мгновенный</string>
|
||||||
<string name="gpu_fence_behavior_balanced">Сбалансированный</string>
|
<string name="gpu_fence_behavior_balanced">Сбалансированный</string>
|
||||||
<string name="gpu_fence_behavior_accurate">Точный</string>
|
<string name="gpu_fence_behavior_accurate">Точный</string>
|
||||||
|
<string name="gpu_fence_behavior_strict">Строгий</string>
|
||||||
|
|
||||||
<string name="vram_usage_conservative">Консервативный</string>
|
<string name="vram_usage_conservative">Консервативный</string>
|
||||||
<string name="vram_usage_aggressive">Агрессивный</string>
|
<string name="vram_usage_aggressive">Агрессивный</string>
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<resources xmlns:tools="http://schemas.android.com/tools" tools:ignore="MissingTranslation">
|
<resources xmlns:tools="http://schemas.android.com/tools" tools:ignore="MissingTranslation">
|
||||||
|
|
||||||
<string name="app_disclaimer">本软件可以运行用于 Nintendo Switch 游戏机的游戏。不包含任何游戏或密钥。<br /><br />在您开始之前, 请定位您设备存储上的 <![CDATA[<b> prod.keys </b>]]> 文件。<br /><br /><![CDATA[<a href=\"https://git.eden-emu.dev/eden-emu/eden/src/branch/master/docs/user/QuickStart.md\">了解更多</a>]]></string>
|
|
||||||
<string name="notice_notification_channel_name">错误与注意事项</string>
|
<string name="notice_notification_channel_name">错误与注意事项</string>
|
||||||
<string name="notice_notification_channel_description">当发生错误时显示通知。</string>
|
<string name="notice_notification_channel_description">当发生错误时显示通知。</string>
|
||||||
<string name="notification_permission_not_granted">未授予通知权限!</string>
|
<string name="notification_permission_not_granted">未授予通知权限!</string>
|
||||||
@@ -291,25 +290,6 @@
|
|||||||
<string name="gpu_driver_fetcher">GPU驱动获取器</string>
|
<string name="gpu_driver_fetcher">GPU驱动获取器</string>
|
||||||
<string name="gpu_driver_manager">GPU 驱动管理器</string>
|
<string name="gpu_driver_manager">GPU 驱动管理器</string>
|
||||||
<string name="install_gpu_driver_description">安装替代的驱动程序以获得更好的性能和精度</string>
|
<string name="install_gpu_driver_description">安装替代的驱动程序以获得更好的性能和精度</string>
|
||||||
<string name="post_processing">后处理效果</string>
|
|
||||||
<string name="post_processing_description">在渲染完成后应用 ReShade FX 效果</string>
|
|
||||||
<string name="post_processing_per_game_description">配置此游戏的效果链</string>
|
|
||||||
<string name="post_processing_add">添加效果</string>
|
|
||||||
<string name="post_processing_remove">移除</string>
|
|
||||||
<string name="post_processing_open_list">打开列表</string>
|
|
||||||
<string name="post_processing_close_list">关闭列表</string>
|
|
||||||
<string name="post_processing_remove_all">移除效果</string>
|
|
||||||
<string name="post_processing_preset_locked">预设已激活。在开始游戏前可以在后处理效果中编辑它。</string>
|
|
||||||
<string name="post_processing_preset_modified">数值已从原始预设被更改。</string>
|
|
||||||
<string name="post_processing_presets">预设</string>
|
|
||||||
<string name="post_processing_preset_new">新建预设</string>
|
|
||||||
<string name="post_processing_preset_new_description">把您加载的效果及当前数值保存为一个预设,以便今后选用。</string>
|
|
||||||
<string name="post_processing_preset_name_invalid">请给预设起一个不含等号的名称。</string>
|
|
||||||
<string name="post_processing_preset_none">无预设</string>
|
|
||||||
<string name="post_processing_preset_delete">删除预设</string>
|
|
||||||
<string name="post_processing_preset_reset">重置预设值</string>
|
|
||||||
<string name="post_processing_reset">重置为默认值</string>
|
|
||||||
<string name="post_processing_empty">找不到效果。请在此文件中放置 .fx 文件:</string>
|
|
||||||
<string name="frame_gen">帧生成</string>
|
<string name="frame_gen">帧生成</string>
|
||||||
<string name="frame_gen_per_game_description">配置针对此游戏的帧生成设定</string>
|
<string name="frame_gen_per_game_description">配置针对此游戏的帧生成设定</string>
|
||||||
<string name="frame_gen_description">设定要在使用无损缩放渲染的帧之间应用的插帧。启用后强制采用FIFO呈现模式 。</string>
|
<string name="frame_gen_description">设定要在使用无损缩放渲染的帧之间应用的插帧。启用后强制采用FIFO呈现模式 。</string>
|
||||||
@@ -324,13 +304,6 @@
|
|||||||
<string name="frame_gen_target_rate_60">60 FPS</string>
|
<string name="frame_gen_target_rate_60">60 FPS</string>
|
||||||
<string name="frame_gen_target_rate_90">90 FPS</string>
|
<string name="frame_gen_target_rate_90">90 FPS</string>
|
||||||
<string name="frame_gen_target_rate_120">120 FPS</string>
|
<string name="frame_gen_target_rate_120">120 FPS</string>
|
||||||
<string name="frame_gen_on">开</string>
|
|
||||||
<string name="frame_gen_off">关</string>
|
|
||||||
<string name="frame_gen_fixed">固定</string>
|
|
||||||
<string name="frame_gen_flow_auto">自动</string>
|
|
||||||
<string name="frame_gen_quick_description">打开或关闭帧生成并选择帧生成倍数。</string>
|
|
||||||
<string name="frame_gen_target_rate_quick_description">生成帧到目标帧率。倍率会自动调整。</string>
|
|
||||||
<string name="frame_gen_flow_scale_quick_description">用来估算帧间运动的分辨率。较低的值可以节省 GPU 时间。</string>
|
|
||||||
<string name="frame_gen_queue_target">帧队列目标</string>
|
<string name="frame_gen_queue_target">帧队列目标</string>
|
||||||
<string name="frame_gen_queue_target_description">在显示之前有多少已完成渲染的帧正在等待。较大的队列可以缓解 GPU 突发的压力,但会增加输入延迟。</string>
|
<string name="frame_gen_queue_target_description">在显示之前有多少已完成渲染的帧正在等待。较大的队列可以缓解 GPU 突发的压力,但会增加输入延迟。</string>
|
||||||
<string name="frame_gen_queue_target_0">最低延迟 (无缓冲)</string>
|
<string name="frame_gen_queue_target_0">最低延迟 (无缓冲)</string>
|
||||||
@@ -341,14 +314,12 @@
|
|||||||
<string name="frame_gen_flow_scale">运动预估分辨率</string>
|
<string name="frame_gen_flow_scale">运动预估分辨率</string>
|
||||||
<string name="frame_gen_flow_scale_description">光流通道的分辨率,以输出的比例表示。降低它是提升性能最经济的做法。</string>
|
<string name="frame_gen_flow_scale_description">光流通道的分辨率,以输出的比例表示。降低它是提升性能最经济的做法。</string>
|
||||||
<string name="frame_gen_unsupported">帧生成不可用</string>
|
<string name="frame_gen_unsupported">帧生成不可用</string>
|
||||||
<string name="frame_gen_unsupported_description">这个 GPU 驱动缺少 Lossless Scaling 着色器所需的 Vulkan 内存模型或半精度 (float16) 支持。</string>
|
|
||||||
<string name="lossless_scaling_setup_description">作为可选项。请提供您自己的 Lossless.dll 以便在之后可以启用帧生成。</string>
|
<string name="lossless_scaling_setup_description">作为可选项。请提供您自己的 Lossless.dll 以便在之后可以启用帧生成。</string>
|
||||||
<string name="lossless_scaling_install">安装 Lossless.dll</string>
|
<string name="lossless_scaling_install">安装 Lossless.dll</string>
|
||||||
<string name="lossless_scaling_install_description">帧生成需要您自己从 Lossless Scaling 获得合法的 Lossless.dll 副本</string>
|
<string name="lossless_scaling_install_description">帧生成需要您自己从 Lossless Scaling 获得合法的 Lossless.dll 副本</string>
|
||||||
<string name="lossless_scaling_replace_description">选择其它 Lossless.dll 副本</string>
|
<string name="lossless_scaling_replace_description">选择其它 Lossless.dll 副本</string>
|
||||||
<string name="frame_generation_support">帧生成</string>
|
<string name="frame_generation_support">帧生成</string>
|
||||||
<string name="frame_generation_supported">支持</string>
|
<string name="frame_generation_supported">支持</string>
|
||||||
<string name="frame_generation_unsupported">不支持 (无 Vulkan 内存模型或 float16)</string>
|
|
||||||
<string name="lossless_scaling">无损缩放</string>
|
<string name="lossless_scaling">无损缩放</string>
|
||||||
<string name="lossless_scaling_description">提供您自己的 Lossless.dll 文件以启用帧生成</string>
|
<string name="lossless_scaling_description">提供您自己的 Lossless.dll 文件以启用帧生成</string>
|
||||||
<string name="lossless_scaling_installed">已安装</string>
|
<string name="lossless_scaling_installed">已安装</string>
|
||||||
@@ -570,6 +541,8 @@
|
|||||||
<string name="renderer_reactive_flushing_description">通过牺牲性能来提升某些游戏的渲染精度。</string>
|
<string name="renderer_reactive_flushing_description">通过牺牲性能来提升某些游戏的渲染精度。</string>
|
||||||
<string name="enable_buffer_history">启用缓冲区历史</string>
|
<string name="enable_buffer_history">启用缓冲区历史</string>
|
||||||
<string name="enable_buffer_history_description">启用对先前缓冲区状态的访问。此选项可在某些游戏中提升渲染质量并保持性能的一致性。</string>
|
<string name="enable_buffer_history_description">启用对先前缓冲区状态的访问。此选项可在某些游戏中提升渲染质量并保持性能的一致性。</string>
|
||||||
|
<string name="enable_gpu_buffer_readback">启用 GPU 缓冲区回读</string>
|
||||||
|
<string name="enable_gpu_buffer_readback_description">在上传前回读经由 GPU 修改过的缓冲区数据,以将其保留。一些游戏会用到这项设定以正确渲染某些效果。如果硬件无法处理额外的工作负载,则可能会导致问题。</string>
|
||||||
<string name="use_optimized_vertex_buffers">优化顶点缓冲区</string>
|
<string name="use_optimized_vertex_buffers">优化顶点缓冲区</string>
|
||||||
<string name="use_optimized_vertex_buffers_description">启用经过优化的顶点缓冲区绑定以提升性能。需要 Mesa 26.0 及以上版本的 Turnip 或 QCOM 驱动程序。若使用较旧版本的 Turnip 驱动 (25.3 及以下版本) 则会导致崩溃。</string>
|
<string name="use_optimized_vertex_buffers_description">启用经过优化的顶点缓冲区绑定以提升性能。需要 Mesa 26.0 及以上版本的 Turnip 或 QCOM 驱动程序。若使用较旧版本的 Turnip 驱动 (25.3 及以下版本) 则会导致崩溃。</string>
|
||||||
|
|
||||||
@@ -638,11 +611,6 @@
|
|||||||
<string name="log">日志记录</string>
|
<string name="log">日志记录</string>
|
||||||
<string name="flush_by_line">按行刷新调试日志</string>
|
<string name="flush_by_line">按行刷新调试日志</string>
|
||||||
<string name="flush_by_line_description">在每行写入时刷新调试日志,使在崩溃或冻结时调试更容易。</string>
|
<string name="flush_by_line_description">在每行写入时刷新调试日志,使在崩溃或冻结时调试更容易。</string>
|
||||||
<string name="extended_logging">开启扩展日志</string>
|
|
||||||
<string name="extended_logging_description">将最大日志文件大小从 100 MiB 提升至 1GiB。</string>
|
|
||||||
<string name="log_filter">日志筛选器</string>
|
|
||||||
<string name="log_filter_description">控制 Eden 的日志类别。例如: *:Info Service.LM:Debug</string>
|
|
||||||
|
|
||||||
<!-- GPU Logging strings -->
|
<!-- GPU Logging strings -->
|
||||||
<string name="gpu_logging_header">GPU 日志</string>
|
<string name="gpu_logging_header">GPU 日志</string>
|
||||||
<string name="gpu_log_level">日志等级</string>
|
<string name="gpu_log_level">日志等级</string>
|
||||||
@@ -926,8 +894,6 @@
|
|||||||
<string name="loader_error_file_not_found">ROM 文件不存在</string>
|
<string name="loader_error_file_not_found">ROM 文件不存在</string>
|
||||||
|
|
||||||
<string name="loader_requires_firmware">游戏需要固件</string>
|
<string name="loader_requires_firmware">游戏需要固件</string>
|
||||||
<string name="loader_requires_firmware_description"><![CDATA[这个游戏可能需要固件才能正常运行,但您还没有安装任何固件。请在启动前安装固件,或者按 “确定” 继续启动。]]></string>
|
|
||||||
|
|
||||||
<!-- Intent Launch strings -->
|
<!-- Intent Launch strings -->
|
||||||
<string name="searching_for_game">正在搜索游戏...</string>
|
<string name="searching_for_game">正在搜索游戏...</string>
|
||||||
<string name="game_not_found_for_title_id">未找到标题ID的游戏: %1$s</string>
|
<string name="game_not_found_for_title_id">未找到标题ID的游戏: %1$s</string>
|
||||||
@@ -1087,6 +1053,7 @@
|
|||||||
<string name="gpu_fence_behavior_immediate">即时</string>
|
<string name="gpu_fence_behavior_immediate">即时</string>
|
||||||
<string name="gpu_fence_behavior_balanced">均衡</string>
|
<string name="gpu_fence_behavior_balanced">均衡</string>
|
||||||
<string name="gpu_fence_behavior_accurate">精确</string>
|
<string name="gpu_fence_behavior_accurate">精确</string>
|
||||||
|
<string name="gpu_fence_behavior_strict">严格</string>
|
||||||
|
|
||||||
<string name="vram_usage_conservative">保守式</string>
|
<string name="vram_usage_conservative">保守式</string>
|
||||||
<string name="vram_usage_aggressive">主动式</string>
|
<string name="vram_usage_aggressive">主动式</string>
|
||||||
|
|||||||
@@ -16,7 +16,7 @@
|
|||||||
<string name="value_too_high">範圍最大必須為%1$d</string>
|
<string name="value_too_high">範圍最大必須為%1$d</string>
|
||||||
<string name="invalid_value">無效的範圍</string>
|
<string name="invalid_value">無效的範圍</string>
|
||||||
|
|
||||||
<string name="using_per_game_config">使用個別遊戲設定中</string>
|
<string name="using_per_game_config">使用個別設定中</string>
|
||||||
|
|
||||||
<!-- Input Overlay -->
|
<!-- Input Overlay -->
|
||||||
<string name="show_input_overlay">顯示虛擬按鍵</string>
|
<string name="show_input_overlay">顯示虛擬按鍵</string>
|
||||||
@@ -67,7 +67,7 @@
|
|||||||
<string name="show_shaders_building">當著色器在編譯時顯示</string>
|
<string name="show_shaders_building">當著色器在編譯時顯示</string>
|
||||||
<string name="show_shaders_building_description">顯示正在編譯的著色器數量</string>
|
<string name="show_shaders_building_description">顯示正在編譯的著色器數量</string>
|
||||||
<string name="pipeline_worker_cores">管線工作執行緒</string>
|
<string name="pipeline_worker_cores">管線工作執行緒</string>
|
||||||
<string name="pipeline_worker_cores_description">設定用於建置Vulkan管線的CPU核心數量,設定的數值越大效能越好,但溫度也會上升更快</string>
|
<string name="pipeline_worker_cores_description">設定用於建置 Vulkan 管線的 CPU 核心數量,設定的數值越大效能越好,但溫度也會上升更快</string>
|
||||||
<string name="overlay_position">疊加層位置</string>
|
<string name="overlay_position">疊加層位置</string>
|
||||||
<string name="overlay_position_description">選擇疊加層在畫面上的顯示位置</string>
|
<string name="overlay_position_description">選擇疊加層在畫面上的顯示位置</string>
|
||||||
<string name="overlay_position_top_left">左上</string>
|
<string name="overlay_position_top_left">左上</string>
|
||||||
@@ -98,15 +98,15 @@
|
|||||||
|
|
||||||
<string name="use_sync_core">同步核心速度</string>
|
<string name="use_sync_core">同步核心速度</string>
|
||||||
<string name="use_sync_core_description">將核心速度與最大速度百分比同步,在不改變遊戲實際速度的情況下提高效能</string>
|
<string name="use_sync_core_description">將核心速度與最大速度百分比同步,在不改變遊戲實際速度的情況下提高效能</string>
|
||||||
<string name="cpuopt_unsafe_host_mmu">啟用主機MMU模擬</string>
|
<string name="cpuopt_unsafe_host_mmu">啟用主機 MMU 模擬</string>
|
||||||
<string name="cpuopt_unsafe_host_mmu_description">此最佳化可加速客體程式的記憶體存取。啟用後,客體記憶體讀取/寫入將直接在記憶體中執行並利用主機的MMU。停用此功能將強制所有記憶體存取使用軟體MMU模擬</string>
|
<string name="cpuopt_unsafe_host_mmu_description">此最佳化可加速客體程式的記憶體存取。啟用後,客體記憶體讀取/寫入將直接在記憶體中執行並利用主機的 MMU。停用此功能將強制所有記憶體存取使用軟體 MMU 模擬。</string>
|
||||||
<string name="debug_knobs">偵錯開關</string>
|
<string name="debug_knobs">偵錯開關</string>
|
||||||
<string name="debug_knobs_description">僅限開發用途</string>
|
<string name="debug_knobs_description">僅限開發用途</string>
|
||||||
<string name="debug_knobs_hint">0到65535</string>
|
<string name="debug_knobs_hint">0到65535</string>
|
||||||
|
|
||||||
<!-- NVDEC Emulation -->
|
<!-- NVDEC Emulation -->
|
||||||
<string name="nvdec_emulation">NVDEC模擬</string>
|
<string name="nvdec_emulation">NVDEC模擬</string>
|
||||||
<string name="nvdec_emulation_description">若在過場動畫中當機請切換成CPU</string>
|
<string name="nvdec_emulation_description">若在過場動畫中當機請切換成 CPU</string>
|
||||||
<string name="nvdec_emulation_none">無</string>
|
<string name="nvdec_emulation_none">無</string>
|
||||||
|
|
||||||
<!-- Optimize SPIRV output -->
|
<!-- Optimize SPIRV output -->
|
||||||
@@ -151,7 +151,7 @@
|
|||||||
<string name="multiplayer_member_leave">%1$s 離開</string>
|
<string name="multiplayer_member_leave">%1$s 離開</string>
|
||||||
<string name="multiplayer_member_kicked">%1$s 被踢出</string>
|
<string name="multiplayer_member_kicked">%1$s 被踢出</string>
|
||||||
<string name="multiplayer_member_banned">%1$s 被封鎖</string>
|
<string name="multiplayer_member_banned">%1$s 被封鎖</string>
|
||||||
<string name="multiplayer_address_unbanned">IP位址已解封</string>
|
<string name="multiplayer_address_unbanned">位址已解封</string>
|
||||||
<string name="multiplayer_kick_member">踢出成員</string>
|
<string name="multiplayer_kick_member">踢出成員</string>
|
||||||
<string name="multiplayer_password">密碼</string>
|
<string name="multiplayer_password">密碼</string>
|
||||||
<string name="multiplayer_joining">正在加入…</string>
|
<string name="multiplayer_joining">正在加入…</string>
|
||||||
@@ -173,7 +173,7 @@
|
|||||||
<string name="multiplayer_ban">封鎖使用者</string>
|
<string name="multiplayer_ban">封鎖使用者</string>
|
||||||
<string name="multiplayer_room_browser">公開房間</string>
|
<string name="multiplayer_room_browser">公開房間</string>
|
||||||
<string name="multiplayer_no_rooms_found">未找到公開房間</string>
|
<string name="multiplayer_no_rooms_found">未找到公開房間</string>
|
||||||
<string name="multiplayer_password_required">請輸入密碼</string>
|
<string name="multiplayer_password_required">需要輸入密碼</string>
|
||||||
<string name="multiplayer_player_count">:%1$d/%2$d</string>
|
<string name="multiplayer_player_count">:%1$d/%2$d</string>
|
||||||
<string name="multiplayer_game">遊戲</string>
|
<string name="multiplayer_game">遊戲</string>
|
||||||
<string name="multiplayer_no_game_info">任意遊戲</string>
|
<string name="multiplayer_no_game_info">任意遊戲</string>
|
||||||
@@ -189,7 +189,7 @@
|
|||||||
<string name="multiplayer_token_required">需要Web令牌,請前往進階設定 -> 系統 -> 網路</string>
|
<string name="multiplayer_token_required">需要Web令牌,請前往進階設定 -> 系統 -> 網路</string>
|
||||||
<string name="multiplayer_ip_error">IP格式無效</string>
|
<string name="multiplayer_ip_error">IP格式無效</string>
|
||||||
<string name="multiplayer_username_error">必須介於4-20個字元之間,並且僅能使用英文字母、數字、句點、破折號、底線和空格(標點符號須為英文格式)</string>
|
<string name="multiplayer_username_error">必須介於4-20個字元之間,並且僅能使用英文字母、數字、句點、破折號、底線和空格(標點符號須為英文格式)</string>
|
||||||
<string name="multiplayer_nickname_invalid">使用者名稱無效,請在系統 -> 網路中檢查設定</string>
|
<string name="multiplayer_nickname_invalid">使用者名稱無效,請在系統→網路中檢查設定</string>
|
||||||
<string name="multiplayer_token_error">必須為48個字元,且僅包含小寫字母a-z</string>
|
<string name="multiplayer_token_error">必須為48個字元,且僅包含小寫字母a-z</string>
|
||||||
<string name="multiplayer_port_error">埠號需為1-65535</string>
|
<string name="multiplayer_port_error">埠號需為1-65535</string>
|
||||||
<string name="cancel">取消</string>
|
<string name="cancel">取消</string>
|
||||||
@@ -201,16 +201,16 @@
|
|||||||
|
|
||||||
<!-- Setup strings -->
|
<!-- Setup strings -->
|
||||||
<string name="welcome">歡迎!</string>
|
<string name="welcome">歡迎!</string>
|
||||||
<string name="welcome_description">瞭解如何設定 <b>Eden</b> 並開始模擬</string>
|
<string name="welcome_description">瞭解如何設定 <b>Eden</b> 並開始模擬。</string>
|
||||||
<string name="get_started">開始使用</string>
|
<string name="get_started">開始使用</string>
|
||||||
<string name="keys">金鑰</string>
|
<string name="keys">金鑰</string>
|
||||||
<string name="keys_description">使用下方的按鈕安裝您的 <b>prod.keys</b> 檔案</string>
|
<string name="keys_description">使用下方的按鈕安裝您的 <b>prod.keys</b> 檔案。</string>
|
||||||
<string name="firmware">韌體</string>
|
<string name="firmware">韌體</string>
|
||||||
<string name="firmware_description">使用下方的按鈕安裝您的<b>firmware.zip</b>檔案</string>
|
<string name="firmware_description">使用下方的按鈕安裝您的<b>firmware.zip</b>檔案</string>
|
||||||
<string name="games">遊戲資料夾</string>
|
<string name="games">遊戲資料夾</string>
|
||||||
<string name="games_description">使用下方的按鈕選擇您的<b>遊戲</b>資料夾。</string>
|
<string name="games_description">使用下方的按鈕選擇您的<b>遊戲</b>資料夾。</string>
|
||||||
<string name="done">完成</string>
|
<string name="done">完成</string>
|
||||||
<string name="done_description">您已準備就緒\n盡情遊玩您的遊戲!</string>
|
<string name="done_description">您已準備就緒。\n盡情遊玩您的遊戲!</string>
|
||||||
<string name="next">下一步</string>
|
<string name="next">下一步</string>
|
||||||
<string name="back">上一步</string>
|
<string name="back">上一步</string>
|
||||||
<string name="add_games">新增遊戲</string>
|
<string name="add_games">新增遊戲</string>
|
||||||
@@ -229,7 +229,7 @@
|
|||||||
<string name="add_directory_success">遊戲目錄新增成功</string>
|
<string name="add_directory_success">遊戲目錄新增成功</string>
|
||||||
<string name="enable_update_checks">檢查更新</string>
|
<string name="enable_update_checks">檢查更新</string>
|
||||||
<string name="enable_update_checks_description">在Eden啟動時檢查有無新版本並選擇是否要下載與安裝更新</string>
|
<string name="enable_update_checks_description">在Eden啟動時檢查有無新版本並選擇是否要下載與安裝更新</string>
|
||||||
<string name="update_available">發現新版本</string>
|
<string name="update_available">偵測到新版本</string>
|
||||||
<string name="update_available_description">有更新可供安裝:%1$s\n\n您要進行更新嗎?</string>
|
<string name="update_available_description">有更新可供安裝:%1$s\n\n您要進行更新嗎?</string>
|
||||||
<string name="downloading_update">下載更新中</string>
|
<string name="downloading_update">下載更新中</string>
|
||||||
<string name="update_download_failed">更新下載失敗</string>
|
<string name="update_download_failed">更新下載失敗</string>
|
||||||
@@ -237,7 +237,7 @@
|
|||||||
<string name="update_install_failed">更新安裝失敗:%1$s</string>
|
<string name="update_install_failed">更新安裝失敗:%1$s</string>
|
||||||
<string name="home_search">搜尋</string>
|
<string name="home_search">搜尋</string>
|
||||||
<string name="home_settings">設定</string>
|
<string name="home_settings">設定</string>
|
||||||
<string name="empty_gamelist">找不到遊戲檔案,或者尚未選取遊戲目錄</string>
|
<string name="empty_gamelist">找不到檔案,或者尚未選取遊戲目錄</string>
|
||||||
<string name="manage_game_folders">管理遊戲資料夾</string>
|
<string name="manage_game_folders">管理遊戲資料夾</string>
|
||||||
<string name="select_games_folder_description">允許 Eden 尋找您的遊戲檔案</string>
|
<string name="select_games_folder_description">允許 Eden 尋找您的遊戲檔案</string>
|
||||||
<string name="add_games_warning">跳過選擇遊戲資料夾?</string>
|
<string name="add_games_warning">跳過選擇遊戲資料夾?</string>
|
||||||
@@ -287,9 +287,9 @@
|
|||||||
<string name="warning_skip">跳過</string>
|
<string name="warning_skip">跳過</string>
|
||||||
<string name="warning_cancel">取消</string>
|
<string name="warning_cancel">取消</string>
|
||||||
<string name="install_amiibo_keys">安裝 Amiibo 金鑰</string>
|
<string name="install_amiibo_keys">安裝 Amiibo 金鑰</string>
|
||||||
<string name="install_amiibo_keys_description">需要先安裝才能在遊戲中使用Amiibo</string>
|
<string name="install_amiibo_keys_description">若要在遊戲中使用 Amiibo 得先安裝</string>
|
||||||
<string name="gpu_driver_fetcher">GPU驅動程式下載器</string>
|
<string name="gpu_driver_fetcher">GPU驅動程式下載器</string>
|
||||||
<string name="gpu_driver_manager">GPU驅動程式管理員</string>
|
<string name="gpu_driver_manager">GPU 驅動程式管理員</string>
|
||||||
<string name="install_gpu_driver_description">安裝替代驅動程式以取得潛在的更佳效能或準確度</string>
|
<string name="install_gpu_driver_description">安裝替代驅動程式以取得潛在的更佳效能或準確度</string>
|
||||||
<string name="post_processing">後製處理效果</string>
|
<string name="post_processing">後製處理效果</string>
|
||||||
<string name="post_processing_description">在渲染完成後套用 ReShade FX 效果</string>
|
<string name="post_processing_description">在渲染完成後套用 ReShade FX 效果</string>
|
||||||
@@ -299,7 +299,7 @@
|
|||||||
<string name="post_processing_open_list">開啟清單</string>
|
<string name="post_processing_open_list">開啟清單</string>
|
||||||
<string name="post_processing_close_list">收起清單</string>
|
<string name="post_processing_close_list">收起清單</string>
|
||||||
<string name="post_processing_remove_all">移除效果</string>
|
<string name="post_processing_remove_all">移除效果</string>
|
||||||
<string name="post_processing_preset_locked">濾鏡已啟用。請在開啟遊戲前於\"後製處理效果\"中調整</string>
|
<string name="post_processing_preset_locked">濾鏡已啟用。請在開啟遊戲前於 後製處理效果 中調整</string>
|
||||||
<string name="post_processing_preset_modified">數值已變更,與原始濾鏡設定不同</string>
|
<string name="post_processing_preset_modified">數值已變更,與原始濾鏡設定不同</string>
|
||||||
<string name="post_processing_presets">濾鏡</string>
|
<string name="post_processing_presets">濾鏡</string>
|
||||||
<string name="post_processing_preset_new">新增濾鏡</string>
|
<string name="post_processing_preset_new">新增濾鏡</string>
|
||||||
@@ -312,102 +312,93 @@
|
|||||||
<string name="post_processing_empty">找不到設定檔。請將濾鏡效果的 .fx 檔案放置於此資料夾:</string>
|
<string name="post_processing_empty">找不到設定檔。請將濾鏡效果的 .fx 檔案放置於此資料夾:</string>
|
||||||
<string name="frame_gen">影格生成</string>
|
<string name="frame_gen">影格生成</string>
|
||||||
<string name="frame_gen_per_game_description">調整此遊戲的影格生成設定</string>
|
<string name="frame_gen_per_game_description">調整此遊戲的影格生成設定</string>
|
||||||
<string name="frame_gen_description">使用Lossless Scaling在已渲染的影格之間插入補間影格。啟用此功能時,會強制採用FIFO垂直同步</string>
|
<string name="frame_gen_description">使用 Lossless Scaling 在已渲染的影格之間插入補間影格。啟用此功能時,會強制採用 FIFO 垂直同步</string>
|
||||||
<string name="frame_gen_multiplier">影格倍率</string>
|
<string name="frame_gen_multiplier">影格倍率</string>
|
||||||
<string name="frame_gen_multiplier_description">設定在每個已渲染的影格中要顯示的影格數,數值越高所需的GPU運算時間也會按比例增加。若要求的影格數超過裝置顯示器能呈現的數量將會降低模擬速度</string>
|
<string name="frame_gen_multiplier_description">設定在每個已渲染的影格中要顯示的影格數。數值越高所需的 GPU 運算時間也會按比例增加。若要求的影格數超過裝置顯示器能呈現的數量將會降低模擬速度</string>
|
||||||
<string name="frame_gen_multiplier_2x">2x</string>
|
<string name="frame_gen_multiplier_2x">2x</string>
|
||||||
<string name="frame_gen_multiplier_3x">3x</string>
|
<string name="frame_gen_multiplier_3x">3x</string>
|
||||||
<string name="frame_gen_multiplier_4x">4x</string>
|
<string name="frame_gen_multiplier_4x">4x</string>
|
||||||
<string name="frame_gen_target_rate">目標影格率</string>
|
<string name="frame_gen_target_rate">目標影格率</string>
|
||||||
<string name="frame_gen_target_rate_description">選擇裝置顯示器能實際呈現的影格率,之後倍率器會自動升高或降低以維持影格率。如果某個調整導致遊戲本身運作變慢,則會自動復原該設定</string>
|
<string name="frame_gen_target_rate_description">選擇裝置顯示器能實際呈現的影格率。之後倍率器會自動升高或降低以維持影格率。如果某個調整導致遊戲本身運作變慢,則會自動復原該設定</string>
|
||||||
<string name="frame_gen_target_rate_off">使用固定倍率</string>
|
<string name="frame_gen_target_rate_off">使用固定倍率</string>
|
||||||
<string name="frame_gen_target_rate_60">60 FPS</string>
|
<string name="frame_gen_target_rate_60">60 FPS</string>
|
||||||
<string name="frame_gen_target_rate_90">90 FPS</string>
|
<string name="frame_gen_target_rate_90">90 FPS</string>
|
||||||
<string name="frame_gen_target_rate_120">120 FPS</string>
|
<string name="frame_gen_target_rate_120">120 FPS</string>
|
||||||
<string name="frame_gen_on">開啟</string>
|
|
||||||
<string name="frame_gen_off">關閉</string>
|
|
||||||
<string name="frame_gen_fixed">固定</string>
|
|
||||||
<string name="frame_gen_flow_auto">自動</string>
|
|
||||||
<string name="frame_gen_quick_description">開啟或關閉影格生成後選擇影格倍率</string>
|
|
||||||
<string name="frame_gen_target_rate_quick_description">選擇要生成的目標影格率,倍率器會自動調整</string>
|
|
||||||
<string name="frame_gen_flow_scale_quick_description">用來預測影格之間動態的解析度,較低的數值可以減少GPU運算時間</string>
|
|
||||||
<string name="frame_gen_queue_target">影格佇列目標</string>
|
<string name="frame_gen_queue_target">影格佇列目標</string>
|
||||||
<string name="frame_gen_queue_target_description">最多允許多少個已完成的影格在顯示器前等待,較大的佇列可以吸收 GPU 突發負載,但會增加輸入延遲</string>
|
<string name="frame_gen_queue_target_description">最多允許多少個已完成的影格在顯示器前等待,較大的佇列可以吸收 GPU 突發負載,但會增加輸入延遲</string>
|
||||||
<string name="frame_gen_queue_target_0">最低延遲(無緩衝)</string>
|
<string name="frame_gen_queue_target_0">最低延遲(無緩衝)</string>
|
||||||
<string name="frame_gen_queue_target_1">平衡(1影格)</string>
|
<string name="frame_gen_queue_target_1">平衡(1影格)</string>
|
||||||
<string name="frame_gen_queue_target_2">最流暢(2影格)</string>
|
<string name="frame_gen_queue_target_2">最流暢(2影格)</string>
|
||||||
<string name="frame_gen_flow_scale_auto">配合遊戲調整運動預測</string>
|
<string name="frame_gen_flow_scale_auto">配合遊戲調整運動預測</string>
|
||||||
<string name="frame_gen_flow_scale_auto_description">以遊戲實際渲染的解析度而非升頻後的輸出進行運動預測,由於升頻後不會增加任何動態細節,因此不會影響準確度</string>
|
<string name="frame_gen_flow_scale_auto_description">以遊戲實際渲染的解析度而非升頻後的輸出進行運動預測。由於升頻後不會增加任何動態細節,因此不會影響準確度</string>
|
||||||
<string name="frame_gen_flow_scale">運動預測解析度</string>
|
<string name="frame_gen_flow_scale">運動預測解析度</string>
|
||||||
<string name="frame_gen_flow_scale_description">光流處理的解析度,以輸出解析度的比例表示,降低此設定值是減少效能負載最有效的方法</string>
|
<string name="frame_gen_flow_scale_description">光流處理的解析度,以輸出解析度的比例表示。降低此設定值是減少效能負載最有效的方法</string>
|
||||||
<string name="frame_gen_unsupported">無法使用影格生成</string>
|
<string name="frame_gen_unsupported">無法使用影格生成</string>
|
||||||
<string name="frame_gen_unsupported_description">此GPU驅動程式缺少Lossless Scaling著色器所需的Vulkan記憶體模型或半精度浮點數(float16)支援</string>
|
|
||||||
<string name="lossless_scaling_setup_description">可選擇安裝自己擁有的 Lossless.dll 以在之後啟用影格生成功能</string>
|
<string name="lossless_scaling_setup_description">可選擇安裝自己擁有的 Lossless.dll 以在之後啟用影格生成功能</string>
|
||||||
<string name="lossless_scaling_install">安裝 Lossless.dll</string>
|
<string name="lossless_scaling_install">安裝 Lossless.dll</string>
|
||||||
<string name="lossless_scaling_install_description">您需要擁有從合法管道獲得的 Lossless Scaling 並從該軟體的資料夾中取得 Lossless.dll 檔案才能使用影格生成功能</string>
|
<string name="lossless_scaling_install_description">您需要擁有從合法管道獲得的 Lossless Scaling 並從該軟體的資料夾中取得 Lossless.dll 檔案才能使用影格生成功能</string>
|
||||||
<string name="lossless_scaling_replace_description">安裝不同的 Lossless.dll 檔案</string>
|
<string name="lossless_scaling_replace_description">安裝不同的 Lossless.dll 檔案</string>
|
||||||
<string name="frame_generation_support">影格生成</string>
|
<string name="frame_generation_support">影格生成</string>
|
||||||
<string name="frame_generation_supported">支援</string>
|
<string name="frame_generation_supported">支援</string>
|
||||||
<string name="frame_generation_unsupported">不支援(無Vulkan記憶體模型或float16)</string>
|
|
||||||
<string name="lossless_scaling">Lossless Scaling</string>
|
<string name="lossless_scaling">Lossless Scaling</string>
|
||||||
<string name="lossless_scaling_description">安裝您擁有的Lossless.dll檔案以使用影格生成</string>
|
<string name="lossless_scaling_description">安裝您擁有的 Lossless.dll 檔案以使用影格生成</string>
|
||||||
<string name="lossless_scaling_installed">已安裝</string>
|
<string name="lossless_scaling_installed">已安裝</string>
|
||||||
<string name="lossless_scaling_not_installed">未安裝</string>
|
<string name="lossless_scaling_not_installed">未安裝</string>
|
||||||
<string name="lossless_scaling_replace">更換</string>
|
<string name="lossless_scaling_replace">替換</string>
|
||||||
<string name="lossless_scaling_remove">刪除</string>
|
<string name="lossless_scaling_remove">刪除</string>
|
||||||
<string name="lossless_scaling_remove_description">刪除已安裝的Lossless.dll及預先編譯的著色器</string>
|
<string name="lossless_scaling_remove_description">刪除已安裝的 Lossless.dll 及預先編譯的著色器</string>
|
||||||
<string name="lossless_scaling_remove_confirmation">影格生成功能會停止運作直到您重新安裝Lossless.dll,您的Lossless.dll原始檔不會被 Eden 修改</string>
|
<string name="lossless_scaling_remove_confirmation">影格生成功能會停止運作直到您重新安裝 Lossless.dll 。您的 Lossless.dll 原始檔並不會被 Eden 修改</string>
|
||||||
<string name="lossless_scaling_missing">Lossless.dll 未安裝</string>
|
<string name="lossless_scaling_missing">Lossless.dll 未安裝</string>
|
||||||
<string name="lossless_scaling_missing_description">前往 設定 -> Lossless Scaling 安裝以使用影格生成功能</string>
|
<string name="lossless_scaling_missing_description">前往 設定 -> Lossless Scaling 安裝以使用影格生成功能</string>
|
||||||
<string name="lossless_scaling_locked">請先關閉遊戲</string>
|
<string name="lossless_scaling_locked">請先關閉遊戲</string>
|
||||||
<string name="lossless_scaling_locked_description">Lossless.dll無法在遊戲執行時進行更換</string>
|
<string name="lossless_scaling_locked_description">Lossless.dll 無法在遊戲執行時進行更換</string>
|
||||||
<string name="lossless_scaling_remove_unavailable">沒有東西可以刪除</string>
|
<string name="lossless_scaling_remove_unavailable">沒有東西可以刪除</string>
|
||||||
<string name="lossless_scaling_remove_unavailable_description">尚未安裝Lossless.dll</string>
|
<string name="lossless_scaling_remove_unavailable_description">尚未安裝 Lossless.dll</string>
|
||||||
<string name="lossless_scaling_installing">準備影格生成著色器中...</string>
|
<string name="lossless_scaling_installing">準備影格生成著色器中...</string>
|
||||||
<string name="lossless_scaling_install_success">成功安裝Lossless.dll</string>
|
<string name="lossless_scaling_install_success">成功安裝 Lossless.dll</string>
|
||||||
<string name="lossless_scaling_install_failed">無法安裝Lossless.dll</string>
|
<string name="lossless_scaling_install_failed">無法安裝 Lossless.dll</string>
|
||||||
<string name="error_lossless_copy_failed">無法複製選取的檔案</string>
|
<string name="error_lossless_copy_failed">無法複製選取的檔案</string>
|
||||||
<string name="error_lossless_unreadable">無法讀取選取的檔案</string>
|
<string name="error_lossless_unreadable">無法讀取選取的檔案</string>
|
||||||
<string name="error_lossless_not_pe">選取的檔案並不是Windows程式庫。請在Lossless Scaling的安裝位置(資料夾)中選擇Lossless.dll</string>
|
<string name="error_lossless_not_pe">選取的檔案並不是 Windows 程式庫。請在 Lossless Scaling 的安裝位置(資料夾)中選擇 Lossless.dll</string>
|
||||||
<string name="error_lossless_missing_shaders">這個Lossless.dll的副本並未包含影格生成著色器。請更新Lossless Scaling後重試</string>
|
<string name="error_lossless_missing_shaders">這個 Lossless.dll 的副本並未包含影格生成著色器。請更新 Lossless Scaling 後再試一次</string>
|
||||||
<string name="error_lossless_translation_failed">無法轉譯影格生成著色器,尚不支援此Lossless Scaling版本</string>
|
<string name="error_lossless_translation_failed">無法轉譯影格生成著色器。尚不支援此 Lossless Scaling 版本</string>
|
||||||
<string name="error_lossless_cache_failed">轉譯的著色器無法寫入到儲存空間,請確認手機容量是否充足</string>
|
<string name="error_lossless_cache_failed">轉譯的著色器無法寫入到儲存空間。請確認手機容量是否充足</string>
|
||||||
<string name="advanced_settings">進階設定</string>
|
<string name="advanced_settings">進階設定</string>
|
||||||
<string name="settings_description">調整模擬器設定</string>
|
<string name="settings_description">調整模擬器設定</string>
|
||||||
<string name="search_recently_played">最近遊玩</string>
|
<string name="search_recently_played">最近遊玩</string>
|
||||||
<string name="search_recently_added">最近新增</string>
|
<string name="search_recently_added">最近新增</string>
|
||||||
<string name="open_user_folder">開啟Eden資料夾</string>
|
<string name="open_user_folder">開啟 Eden 資料夾</string>
|
||||||
<string name="open_user_folder_description">管理Eden的內部檔案</string>
|
<string name="open_user_folder_description">管理 Eden 的內部檔案</string>
|
||||||
<string name="app_settings_description">自訂Eden的主題與介面</string>
|
<string name="app_settings_description">自訂Eden的主題與介面</string>
|
||||||
<string name="no_file_manager">找不到檔案管理員</string>
|
<string name="no_file_manager">找不到檔案管理員</string>
|
||||||
<string name="notification_no_directory_link">無法開啟Eden目錄</string>
|
<string name="notification_no_directory_link">無法開啟 Eden 目錄</string>
|
||||||
<string name="notification_no_directory_link_description">請使用檔案管理員的側邊面板手動定位到使用者資料夾</string>
|
<string name="notification_no_directory_link_description">請使用檔案管理員的側邊面板手動定位到使用者資料夾</string>
|
||||||
<string name="manage_save_data">管理儲存資料</string>
|
<string name="manage_save_data">管理儲存資料</string>
|
||||||
<string name="manage_save_data_description">導入/導出遊戲的儲存資料\n壓縮檔必須為.zip格式\n壓縮檔中首個子資料夾名稱必須為遊戲ID</string>
|
<string name="manage_save_data_description">導入/導出遊戲的儲存資料\n壓縮檔必須為.zip格式\n壓縮檔中首個子資料夾名稱必須為遊戲 ID</string>
|
||||||
<string name="import_save_warning">導入儲存資料</string>
|
<string name="import_save_warning">導入儲存資料</string>
|
||||||
<string name="import_save_warning_description">這將會以提供的檔案覆寫現有的該遊戲儲存資料,您確定要繼續嗎?</string>
|
<string name="import_save_warning_description">這將會以提供的檔案覆寫現有的該遊戲儲存資料,您確定要繼續嗎?</string>
|
||||||
<string name="save_files_importing">正在導入儲存資料…</string>
|
<string name="save_files_importing">正在導入儲存資料…</string>
|
||||||
<string name="save_files_exporting">正在導出儲存資料…</string>
|
<string name="save_files_exporting">正在導出儲存資料…</string>
|
||||||
<string name="save_file_imported_success">已成功導入</string>
|
<string name="save_file_imported_success">已成功導入</string>
|
||||||
<string name="save_file_invalid_zip_structure">無效的儲存目錄結構</string>
|
<string name="save_file_invalid_zip_structure">無效的儲存目錄結構</string>
|
||||||
<string name="save_file_invalid_zip_structure_description">首個子資料夾名稱必須為遊戲ID</string>
|
<string name="save_file_invalid_zip_structure_description">首個子資料夾名稱必須為遊戲 ID</string>
|
||||||
<string name="install_firmware">安裝韌體</string>
|
<string name="install_firmware">安裝韌體</string>
|
||||||
<string name="install_firmware_description">韌體必須為ZIP壓縮檔,將會用於部分遊戲的啟動</string>
|
<string name="install_firmware_description">韌體必須為 ZIP 壓縮檔,將會用於部分遊戲的啟動</string>
|
||||||
<string name="firmware_installing">正在安裝韌體</string>
|
<string name="firmware_installing">正在安裝韌體</string>
|
||||||
<string name="firmware_installed_failure">韌體安裝失敗</string>
|
<string name="firmware_installed_failure">韌體安裝失敗</string>
|
||||||
<string name="firmware_installed_failure_description">請確保韌體nca檔案位於zip壓縮檔的根目錄後再試一次</string>
|
<string name="firmware_installed_failure_description">請確保韌體 nca 檔案位於 zip 壓縮檔的根目錄,然後再試一次。</string>
|
||||||
<string name="firmware_uninstalled_failure">韌體解除安裝失敗</string>
|
<string name="firmware_uninstalled_failure">韌體解除安裝失敗</string>
|
||||||
<string name="share_log">分享偵錯記錄</string>
|
<string name="share_log">分享偵錯記錄</string>
|
||||||
<string name="share_log_description">分享Eden的記錄檔以便對相關問題進行偵錯</string>
|
<string name="share_log_description">分享 Eden 的記錄檔以便對相關問題進行偵錯</string>
|
||||||
<string name="share_log_missing">找不到日誌檔案</string>
|
<string name="share_log_missing">找不到日誌檔案</string>
|
||||||
<string name="share_gpu_log">分享GPU日誌</string>
|
<string name="share_gpu_log">分享 GPU 日誌</string>
|
||||||
<string name="share_gpu_log_description">分享Eden的GPU日誌以對圖形問題進行偵錯</string>
|
<string name="share_gpu_log_description">分享 Eden 的 GPU 日誌以對圖形問題進行偵錯</string>
|
||||||
<string name="share_gpu_log_missing">找不到GPU日誌檔案</string>
|
<string name="share_gpu_log_missing">找不到 GPU 日誌檔案</string>
|
||||||
<string name="install_game_content">安裝遊戲內容</string>
|
<string name="install_game_content">安裝遊戲內容</string>
|
||||||
<string name="install_game_content_description">安裝遊戲更新或DLC</string>
|
<string name="install_game_content_description">安裝遊戲更新或 DLC</string>
|
||||||
<string name="installing_game_content">正在安裝內容…</string>
|
<string name="installing_game_content">正在安裝內容…</string>
|
||||||
<string name="install_game_content_failure">安裝檔案至NAND時發生錯誤</string>
|
<string name="install_game_content_failure">安裝檔案至 NAND 時發生錯誤</string>
|
||||||
<string name="install_game_content_failure_description">請確保內容有效並且prod.keys檔案已安裝</string>
|
<string name="install_game_content_failure_description">請確保內容有效並且 prod.keys 檔案已安裝</string>
|
||||||
<string name="install_game_content_failure_base">為避免產生衝突,無法直接安裝遊戲本體</string>
|
<string name="install_game_content_failure_base">為避免產生衝突,無法直接安裝遊戲本體</string>
|
||||||
<string name="install_game_content_failed_count">%1$d 安裝錯誤</string>
|
<string name="install_game_content_failed_count">%1$d 安裝錯誤</string>
|
||||||
<string name="install_game_content_success">遊戲內容已成功安裝</string>
|
<string name="install_game_content_success">遊戲內容已成功安裝</string>
|
||||||
@@ -415,8 +406,8 @@
|
|||||||
<string name="install_game_content_success_overwrite">%1$d 覆寫成功</string>
|
<string name="install_game_content_success_overwrite">%1$d 覆寫成功</string>
|
||||||
<string name="install_game_content_help_link">https://yuzu-mirror.github.io/help/quickstart/#dumping-installed-updates</string>
|
<string name="install_game_content_help_link">https://yuzu-mirror.github.io/help/quickstart/#dumping-installed-updates</string>
|
||||||
<string name="custom_driver_not_supported">您的裝置不支援自訂驅動程式</string>
|
<string name="custom_driver_not_supported">您的裝置不支援自訂驅動程式</string>
|
||||||
<string name="custom_driver_not_supported_description">此裝置不支援注入自訂驅動程式\n請以後再來查看是否已新增支援!</string>
|
<string name="custom_driver_not_supported_description">此裝置不支援注入自訂驅動程式。\n請以後再來查看是否已新增支援!</string>
|
||||||
<string name="manage_yuzu_data">管理Eden資料</string>
|
<string name="manage_yuzu_data">管理 Eden 資料</string>
|
||||||
<string name="manage_yuzu_data_description">安裝韌體、金鑰,導入/導出使用者資料及安裝其它項目!</string>
|
<string name="manage_yuzu_data_description">安裝韌體、金鑰,導入/導出使用者資料及安裝其它項目!</string>
|
||||||
<string name="game_folders">遊戲資料夾</string>
|
<string name="game_folders">遊戲資料夾</string>
|
||||||
<string name="deep_scan">深度掃描</string>
|
<string name="deep_scan">深度掃描</string>
|
||||||
@@ -433,7 +424,7 @@
|
|||||||
<string name="verify_installed_content">驗證已安裝內容的完整性</string>
|
<string name="verify_installed_content">驗證已安裝內容的完整性</string>
|
||||||
<string name="verify_installed_content_description">檢查所有已安裝的內容是否有損壞</string>
|
<string name="verify_installed_content_description">檢查所有已安裝的內容是否有損壞</string>
|
||||||
|
|
||||||
<string name="keys_missing">缺少prod.keys</string>
|
<string name="keys_missing">缺少 prod.keys</string>
|
||||||
<string name="keys_missing_description">無法解密韌體和零售遊戲</string>
|
<string name="keys_missing_description">無法解密韌體和零售遊戲</string>
|
||||||
<string name="keys_missing_help">https://yuzu-mirror.github.io/help/quickstart/#dumping-decryption-keys</string>
|
<string name="keys_missing_help">https://yuzu-mirror.github.io/help/quickstart/#dumping-decryption-keys</string>
|
||||||
|
|
||||||
@@ -446,8 +437,8 @@
|
|||||||
<string name="keys_failed">金鑰安裝失敗</string>
|
<string name="keys_failed">金鑰安裝失敗</string>
|
||||||
<string name="keys_install_success">金鑰安裝成功</string>
|
<string name="keys_install_success">金鑰安裝成功</string>
|
||||||
<string name="error_keys_copy_failed">一個或多個金鑰安裝失敗</string>
|
<string name="error_keys_copy_failed">一個或多個金鑰安裝失敗</string>
|
||||||
<string name="error_keys_invalid_filename">請確保金鑰檔案具有.keys副檔名後重試</string>
|
<string name="error_keys_invalid_filename">請確保金鑰檔案具有.keys副檔名後重試。</string>
|
||||||
<string name="error_keys_failed_init">金鑰初始化失敗,請檢查您的轉儲工具是否為最新版本並重新轉儲金鑰</string>
|
<string name="error_keys_failed_init">金鑰初始化失敗。請檢查您的轉儲工具是否為最新版本並重新轉儲金鑰。</string>
|
||||||
|
|
||||||
<!-- Applet launcher strings -->
|
<!-- Applet launcher strings -->
|
||||||
<string name="qlaunch_applet">Qlaunch</string>
|
<string name="qlaunch_applet">Qlaunch</string>
|
||||||
@@ -459,48 +450,48 @@
|
|||||||
<string name="applets_error_description"><![CDATA[請確定您的<a href=\"https://yuzu-mirror.github.io/help/quickstart/#dumping-prodkeys-and-titlekeys\">prod.keys</a>檔案和<a href=\"https://yuzu-mirror.github.io/help/quickstart/#dumping-system-firmware\">韌體</a>已安裝並重試]]></string>
|
<string name="applets_error_description"><![CDATA[請確定您的<a href=\"https://yuzu-mirror.github.io/help/quickstart/#dumping-prodkeys-and-titlekeys\">prod.keys</a>檔案和<a href=\"https://yuzu-mirror.github.io/help/quickstart/#dumping-system-firmware\">韌體</a>已安裝並重試]]></string>
|
||||||
<string name="album_applet">相簿</string>
|
<string name="album_applet">相簿</string>
|
||||||
<string name="album_applet_description">使用系統相片檢視器查看儲存在使用者螢幕截圖資料夾中的影像</string>
|
<string name="album_applet_description">使用系統相片檢視器查看儲存在使用者螢幕截圖資料夾中的影像</string>
|
||||||
<string name="mii_edit_applet">Mii編輯</string>
|
<string name="mii_edit_applet">Mii 編輯</string>
|
||||||
<string name="mii_edit_applet_description">使用系統編輯器來檢視並編輯Mii</string>
|
<string name="mii_edit_applet_description">使用系統編輯器來檢視並編輯 Mii</string>
|
||||||
<string name="cabinet_applet">Cabinet</string>
|
<string name="cabinet_applet">Cabinet</string>
|
||||||
<string name="cabinet_applet_description">編輯、刪除儲存在amiibo上的資料</string>
|
<string name="cabinet_applet_description">編輯、刪除儲存在 amiibo 上的資料</string>
|
||||||
<string name="cabinet_launcher">Cabinet啟動器</string>
|
<string name="cabinet_launcher">Cabinet 啟動器</string>
|
||||||
<string name="cabinet_nickname_and_owner">暱稱和擁有者設定</string>
|
<string name="cabinet_nickname_and_owner">暱稱和擁有者設定</string>
|
||||||
<string name="cabinet_game_data_eraser">刪除遊戲資料</string>
|
<string name="cabinet_game_data_eraser">刪除遊戲資料</string>
|
||||||
<string name="cabinet_restorer">還原程式</string>
|
<string name="cabinet_restorer">還原程式</string>
|
||||||
<string name="cabinet_formatter">格式化程式</string>
|
<string name="cabinet_formatter">格式化程式</string>
|
||||||
|
|
||||||
<!-- About screen strings -->
|
<!-- About screen strings -->
|
||||||
<string name="gaia_is_not_real">Gaia不存在</string>
|
<string name="gaia_is_not_real">Gaia 不存在</string>
|
||||||
<string name="copied_to_clipboard">已複製到剪貼簿</string>
|
<string name="copied_to_clipboard">已複製到剪貼簿</string>
|
||||||
<string name="about_app_description">一個開放原始碼的Switch模擬器</string>
|
<string name="about_app_description">一個開放原始碼的 Switch 模擬器</string>
|
||||||
<string name="contributors">參與者</string>
|
<string name="contributors">參與者</string>
|
||||||
<string name="contributors_description">這些人讓Eden Android版成為可能</string>
|
<string name="contributors_description">這些人讓 Eden Android 版成為可能</string>
|
||||||
<string name="licenses_description">這些專案使Eden Android版成為可能</string>
|
<string name="licenses_description">這些專案使 Eden Android 版成為可能</string>
|
||||||
<string name="build">組建版本</string>
|
<string name="build">組建版本</string>
|
||||||
<string name="user_data">使用者資料</string>
|
<string name="user_data">使用者資料</string>
|
||||||
<string name="user_data_description">導入/導出所有應用程式資料\n\n導入使用者資料時,現有的使用者資料將被取代!\n\n直接從 Citron 導入使用者資料可能會出現問題,建議手動導入所有所需資料</string>
|
<string name="user_data_description">導入/導出所有應用程式資料。\n\n導入使用者資料時,現有的使用者資料將被取代!\n\n直接從 Citron 導入使用者資料可能會出現問題,建議手動導入所有所需資料。</string>
|
||||||
<string name="exporting_user_data">正在導出使用者資料…</string>
|
<string name="exporting_user_data">正在導出使用者資料…</string>
|
||||||
<string name="importing_user_data">正在導入使用者資料…</string>
|
<string name="importing_user_data">正在導入使用者資料…</string>
|
||||||
<string name="invalid_yuzu_backup">無效的Eden備份</string>
|
<string name="invalid_yuzu_backup">無效的 Eden 備份</string>
|
||||||
<string name="user_data_export_success">使用者資料導出成功</string>
|
<string name="user_data_export_success">使用者資料導出成功</string>
|
||||||
<string name="user_data_import_success">使用者資料導入成功</string>
|
<string name="user_data_import_success">使用者資料導入成功</string>
|
||||||
<string name="user_data_export_cancelled">導出已取消</string>
|
<string name="user_data_export_cancelled">導出已取消</string>
|
||||||
<string name="user_data_import_failed_description">請確保使用者資料夾位於zip壓縮檔的根目錄,並在 config/config.ini 路徑中包含組態檔案後重試</string>
|
<string name="user_data_import_failed_description">請確保使用者資料夾位於 zip 壓縮檔的根目錄,並在 config/config.ini 路徑中包含組態檔案,並再試一次</string>
|
||||||
<!-- General settings strings -->
|
<!-- General settings strings -->
|
||||||
<string name="frame_limit_enable">限制模擬速度</string>
|
<string name="frame_limit_enable">限制模擬速度</string>
|
||||||
<string name="frame_limit_enable_description">將模擬速度限制在標準速度的指定百分比</string>
|
<string name="frame_limit_enable_description">將模擬速度限制在標準速度的指定百分比</string>
|
||||||
<string name="frame_limit_slider">限制速度百分比</string>
|
<string name="frame_limit_slider">限制速度百分比</string>
|
||||||
<string name="frame_limit_slider_description">指定模擬速度的百分比,100%為標準速度,更高或更低的值將會減少或增加速度限制</string>
|
<string name="frame_limit_slider_description">指定模擬速度的百分比。100% 為標準速度,更高或更低的值將會減少或增加速度限制</string>
|
||||||
<string name="turbo_speed_limit">加速模式</string>
|
<string name="turbo_speed_limit">加速模式</string>
|
||||||
<string name="turbo_speed_limit_description">當開啟加速模式時,模擬器將以此速度執行</string>
|
<string name="turbo_speed_limit_description">當開啟加速模式時,模擬器將以此速度執行</string>
|
||||||
<string name="slow_speed_limit">慢速模式</string>
|
<string name="slow_speed_limit">慢速模式</string>
|
||||||
<string name="slow_speed_limit_description">當慢速模式開啟時,模擬器將會以此速度執行</string>
|
<string name="slow_speed_limit_description">當慢速模式開啟時,模擬器將會以此速度執行</string>
|
||||||
<string name="cpu_backend">CPU後端</string>
|
<string name="cpu_backend">CPU 後端</string>
|
||||||
<string name="cpu_accuracy">CPU準確度</string>
|
<string name="cpu_accuracy">CPU 準確度</string>
|
||||||
<string name="value_with_units">%1$s%2$s</string>
|
<string name="value_with_units">%1$s%2$s</string>
|
||||||
|
|
||||||
<string name="program_args">Homebrew參數</string>
|
<string name="program_args">Homebrew 參數</string>
|
||||||
<string name="program_args_description">在啟動時傳遞給Homebrew的命令列參數(例如:-noglsl)</string>
|
<string name="program_args_description">在啟動時傳遞給 Homebrew 的命令列參數(例如:-noglsl)</string>
|
||||||
|
|
||||||
<!-- System settings strings -->
|
<!-- System settings strings -->
|
||||||
<string name="device_name">裝置名稱</string>
|
<string name="device_name">裝置名稱</string>
|
||||||
@@ -508,26 +499,26 @@
|
|||||||
<string name="use_docked_mode_description">提高解析度,降低效能。停用後將會使用手提模式,會降低解析度並提高效能</string>
|
<string name="use_docked_mode_description">提高解析度,降低效能。停用後將會使用手提模式,會降低解析度並提高效能</string>
|
||||||
<string name="emulated_region">模擬區域</string>
|
<string name="emulated_region">模擬區域</string>
|
||||||
<string name="emulated_language">模擬語言</string>
|
<string name="emulated_language">模擬語言</string>
|
||||||
<string name="select_rtc_date">選擇RTC日期</string>
|
<string name="select_rtc_date">選擇 RTC 日期</string>
|
||||||
<string name="select_rtc_time">選擇RTC時間</string>
|
<string name="select_rtc_time">選擇 RTC 時間</string>
|
||||||
<string name="use_custom_rtc">自訂RTC</string>
|
<string name="use_custom_rtc">自訂 RTC</string>
|
||||||
<string name="use_custom_rtc_description">允許您設定與您的目前系統時間相互獨立的自訂時間</string>
|
<string name="use_custom_rtc_description">允許您設定與您的目前系統時間相互獨立的自訂時間</string>
|
||||||
<string name="set_custom_rtc">設定自訂RTC</string>
|
<string name="set_custom_rtc">設定自訂 RTC</string>
|
||||||
|
|
||||||
<!-- CPU -->
|
<!-- CPU -->
|
||||||
<string name="fast_cpu_time">CPU時脈</string>
|
<string name="fast_cpu_time">CPU 時脈</string>
|
||||||
<string name="fast_cpu_time_description">提高模擬CPU回報的時脈,可以減少某些FPS限制。較弱的CPU可能會出現效能下降的情況,部分遊戲可能會出現異常</string>
|
<string name="fast_cpu_time_description">提高模擬 CPU 回報的時脈,可以減少某些 FPS 限制。較弱的 CPU 可能會出現效能下降的情況,部分遊戲可能會出現異常</string>
|
||||||
<string name="custom_cpu_ticks">自訂CPU時脈</string>
|
<string name="custom_cpu_ticks">自訂CPU時脈</string>
|
||||||
<string name="custom_cpu_ticks_description">自訂CPU時脈,更高的值可能提高效能,但也可能導致遊戲卡死。建議範圍為77-21000</string>
|
<string name="custom_cpu_ticks_description">自訂CPU時脈。更高的值可能提高效能,但也可能導致遊戲卡死。建議範圍為77-21000。</string>
|
||||||
<string name="cpu_ticks">時脈</string>
|
<string name="cpu_ticks">時脈</string>
|
||||||
<string name="memory_layout">記憶體布局</string>
|
<string name="memory_layout">記憶體佈局</string>
|
||||||
<string name="memory_layout_description">(實驗性)更改模擬記憶體布局,此設定不會提高效能,但可能有助於使用模組來提高解析度的遊戲的載入。不要在RAM為8GB或更少的手機上使用。若遊戲崩潰請將進階設定裡偵錯選項中的CPU後端改為Dynarmic (JIT)</string>
|
<string name="memory_layout_description">(實驗性)更改模擬記憶體佈局。此設定不會提高效能,但可能有助於使用模組來提高解析度的遊戲的載入。不要在 RAM 為 8GB 或更少的手機上使用。若遊戲崩潰請將進階設定裡偵錯選項中的CPU後端改為 Dynarmic (JIT)</string>
|
||||||
|
|
||||||
<string name="generate">生成</string>
|
<string name="generate">生成</string>
|
||||||
|
|
||||||
<!-- Network settings strings -->
|
<!-- Network settings strings -->
|
||||||
<string name="web_token">網路令牌</string>
|
<string name="web_token">網路令牌</string>
|
||||||
<string name="web_token_description">用於建立公開大廳的網路令牌,由48個小寫字母a-z組成</string>
|
<string name="web_token_description">用於建立公開大廳的網路令牌。由48個小寫字母a-z組成</string>
|
||||||
<string name="web_username">網路使用者名稱</string>
|
<string name="web_username">網路使用者名稱</string>
|
||||||
<string name="web_username_description">多人遊戲房間中顯示的使用者名稱。必須為4-20個字元,僅能使用英文字母、數字、句點、破折號、底線和空格(標點符號須為英文格式)</string>
|
<string name="web_username_description">多人遊戲房間中顯示的使用者名稱。必須為4-20個字元,僅能使用英文字母、數字、句點、破折號、底線和空格(標點符號須為英文格式)</string>
|
||||||
<string name="network">網路</string>
|
<string name="network">網路</string>
|
||||||
@@ -536,19 +527,19 @@
|
|||||||
<string name="renderer_resolution">解析度 (手提/底座)</string>
|
<string name="renderer_resolution">解析度 (手提/底座)</string>
|
||||||
<string name="renderer_vsync">垂直同步</string>
|
<string name="renderer_vsync">垂直同步</string>
|
||||||
<string name="renderer_scaling_filter">視窗自適應濾波器</string>
|
<string name="renderer_scaling_filter">視窗自適應濾波器</string>
|
||||||
<string name="fsr_sharpness">FSR/SGSR銳化度</string>
|
<string name="fsr_sharpness">FSR/SGSR 銳化度</string>
|
||||||
<string name="fsr_sharpness_description">使用FSR/SGSR時圖片的銳化程度</string>
|
<string name="fsr_sharpness_description">使用 FSR/SGSR 時圖片的銳化程度</string>
|
||||||
<string name="renderer_anti_aliasing">抗鋸齒</string>
|
<string name="renderer_anti_aliasing">抗鋸齒</string>
|
||||||
|
|
||||||
|
|
||||||
<string name="advanced">進階</string>
|
<string name="advanced">進階</string>
|
||||||
|
|
||||||
<string name="renderer_accuracy">GPU模式</string>
|
<string name="renderer_accuracy">GPU 模式</string>
|
||||||
<string name="renderer_accuracy_description">設定GPU模擬的準確度,大多數遊戲在設定為快速時即可正常渲染,但有些需要渲染粒子的遊戲仍需設為準確來避免圖形錯誤</string>
|
<string name="renderer_accuracy_description">設定 GPU 模擬的準確度。大多數遊戲在設定為快速時即可正常渲染,但有些需要渲染粒子的遊戲仍需設為準確來避免圖形錯誤</string>
|
||||||
<string name="dma_accuracy">DMA準確度</string>
|
<string name="dma_accuracy">DMA 準確度</string>
|
||||||
<string name="dma_accuracy_description">控制DMA準確度,將準確度設為穩定可以修復某些遊戲中的問題,但在某些情況下也可能影響效能。如果不確定,請保留為預設</string>
|
<string name="dma_accuracy_description">控制 DMA 準確度。將準確度設為穩定可以修復某些遊戲中的問題,但在某些情況下也可能影響效能。如果不確定,請保留為預設</string>
|
||||||
<string name="gpu_fence_behavior">GPU 同步柵欄模式</string>
|
<string name="gpu_fence_behavior">GPU 同步柵欄模式</string>
|
||||||
<string name="gpu_fence_behavior_description">控制 GPU 同步柵欄模式,即時是速度最快的選項,但可能會導致一些問題;使用平衡可以提供更好的相容性並修復某些遊戲中的錯誤;準確則是在犧牲部分效能的情況下進一步提升相容性;嚴格是最慢的選項,但可以修復那些對同步要求更嚴格的遊戲中的問題;預設則會依照 GPU 準確度設定</string>
|
<string name="gpu_fence_behavior_description">控制 GPU 同步柵欄模式。即時是速度最快的選項,但可能會導致一些問題。使用平衡可以提供更好的相容性並修復某些遊戲中的錯誤。準確則是在犧牲部分效能的情況下進一步提升相容性。嚴格是最慢的選項,但可以修復那些對同步要求更嚴格的遊戲中的問題。預設則會依照 GPU 準確度設定</string>
|
||||||
<string name="anisotropic_filtering">各向異性過濾</string>
|
<string name="anisotropic_filtering">各向異性過濾</string>
|
||||||
<string name="anisotropic_filtering_description">改善斜角檢視時的紋理品質</string>
|
<string name="anisotropic_filtering_description">改善斜角檢視時的紋理品質</string>
|
||||||
<string name="vram_usage_mode">VRAM使用模式</string>
|
<string name="vram_usage_mode">VRAM使用模式</string>
|
||||||
@@ -557,53 +548,55 @@
|
|||||||
<string name="accelerate_astc_description">選擇ASTC壓縮紋理的解碼方式:CPU(慢速、穩定)、GPU(快速、推薦)或CPU非同步(無卡頓,可能導致問題)</string>
|
<string name="accelerate_astc_description">選擇ASTC壓縮紋理的解碼方式:CPU(慢速、穩定)、GPU(快速、推薦)或CPU非同步(無卡頓,可能導致問題)</string>
|
||||||
|
|
||||||
<string name="sync_memory_operations">同步記憶體操作</string>
|
<string name="sync_memory_operations">同步記憶體操作</string>
|
||||||
<string name="sync_memory_operations_description">確保計算和記憶體操作之間的資料一致性,此選項應能修復某些遊戲中的問題,但在某些情況下可能會降低效能。使用Unreal Engine 4的遊戲似乎受影響最大</string>
|
<string name="sync_memory_operations_description">確保計算和記憶體操作之間的資料一致性。 此選項應能修復某些遊戲中的問題,但在某些情況下可能會降低效能。 使用Unreal Engine 4的遊戲似乎受影響最大</string>
|
||||||
<string name="use_disk_shader_cache">磁碟著色器快取</string>
|
<string name="use_disk_shader_cache">磁碟著色器快取</string>
|
||||||
<string name="use_disk_shader_cache_description">將產生的著色器快取儲存至硬碟以減少中斷</string>
|
<string name="use_disk_shader_cache_description">將產生的著色器快取儲存至硬碟以減少中斷</string>
|
||||||
<string name="renderer_force_max_clock">強制使用最大時脈(僅限Adreno)</string>
|
<string name="renderer_force_max_clock">強制使用最大時脈 (僅限Adreno)</string>
|
||||||
<string name="renderer_force_max_clock_description">強制GPU以可能的最大時脈運作(熱溫限制仍會被套用)</string>
|
<string name="renderer_force_max_clock_description">強制 GPU 以可能的最大時脈執行 (熱溫限制仍會被套用)</string>
|
||||||
<string name="renderer_asynchronous_gpu_emulation">GPU非同步模擬</string>
|
<string name="renderer_asynchronous_gpu_emulation">GPU 非同步模擬</string>
|
||||||
<string name="renderer_asynchronous_gpu_emulation_description">此修改可透過使用GPU非同步模擬來提升性能,不過可能會導致圖形問題且會提高在進行時序相關操作時當機的機率</string>
|
<string name="renderer_asynchronous_gpu_emulation_description">此修改可透過使用 GPU 非同步模擬來提升性能,不過可能會導致圖形問題且會提高在進行時序相關操作時當機的機率</string>
|
||||||
<string name="renderer_async_presentation">非同步呈現</string>
|
<string name="renderer_async_presentation">非同步呈現</string>
|
||||||
<string name="renderer_async_presentation_description">此修改可以透過將渲染移至單獨的CPU執行緒來提升性能,但可能會導致圖形問題</string>
|
<string name="renderer_async_presentation_description">此修改可以透過將渲染移至單獨的 CPU 執行緒來提升性能,但可能會導致圖形問題</string>
|
||||||
<string name="renderer_reactive_flushing">使用重新啟用排清</string>
|
<string name="renderer_reactive_flushing">使用重新啟用排清</string>
|
||||||
<string name="renderer_reactive_flushing_description">犧牲效能以改善部分遊戲的轉譯準確度</string>
|
<string name="renderer_reactive_flushing_description">犧牲效能,以改善部分遊戲的轉譯準確度</string>
|
||||||
<string name="enable_buffer_history">啟用緩衝區歷史</string>
|
<string name="enable_buffer_history">啟用緩衝區歷史</string>
|
||||||
<string name="enable_buffer_history_description">允許存取先前的緩衝區狀態,此選項可能會改善部分遊戲的渲染品質與效能穩定性</string>
|
<string name="enable_buffer_history_description">允許存取先前的緩衝區狀態。此選項可能會改善部分遊戲的渲染品質與效能穩定性</string>
|
||||||
|
<string name="enable_gpu_buffer_readback">啟用 GPU 緩衝區讀回</string>
|
||||||
|
<string name="enable_gpu_buffer_readback_description">透過在上傳之前先將 GPU 修改過的緩衝區資料讀回來保存資料,部分遊戲需要啟用此功能才能正常渲染遊戲特效。如果硬體無法負荷可能會導致錯誤</string>
|
||||||
<string name="use_optimized_vertex_buffers">最佳化頂點緩衝區</string>
|
<string name="use_optimized_vertex_buffers">最佳化頂點緩衝區</string>
|
||||||
<string name="use_optimized_vertex_buffers_description">啟用最佳化的頂點緩衝區綁定,需要安裝 Mesa 26.0+ Turnip drivers/Qualcomm drivers。使用舊版 Turnip drivers 會導致當機(25.3版和更低的版本)</string>
|
<string name="use_optimized_vertex_buffers_description">啟用最佳化的頂點緩衝區綁定。需要安裝 Mesa 26.0+ Turnip drivers/Qualcomm drivers。使用舊版 Turnip drivers 會導致當機 (25.3版和更低的版本)</string>
|
||||||
|
|
||||||
<string name="hacks">修改</string>
|
<string name="hacks">修改</string>
|
||||||
|
|
||||||
<string name="fast_gpu_time">GPU時脈</string>
|
<string name="fast_gpu_time">GPU 時脈</string>
|
||||||
<string name="fast_gpu_time_description">讓遊戲誤以為GPU工作能更快完成,避免遊戲為了配合Switch的時脈而降低解析度與渲染距離</string>
|
<string name="fast_gpu_time_description">讓遊戲誤以為 GPU 工作能更快完成,避免遊戲為了配合 Switch 的時脈而降低解析度與渲染距離</string>
|
||||||
<string name="skip_cpu_inner_invalidation">跳過CPU內部失效處理</string>
|
<string name="skip_cpu_inner_invalidation">跳過CPU內部失效處理</string>
|
||||||
<string name="skip_cpu_inner_invalidation_description">在記憶體更新期間跳過某些CPU端快取的失效處理,減少CPU使用率並提高其性能。可能會導致某些遊戲出現故障或當機</string>
|
<string name="skip_cpu_inner_invalidation_description">在記憶體更新期間跳過某些CPU端快取的失效處理,減少CPU使用率並提高其性能。可能會導致某些遊戲出現故障或當機</string>
|
||||||
<string name="fix_bloom_effects">修正光暈特效</string>
|
<string name="fix_bloom_effects">修正光暈特效</string>
|
||||||
<string name="fix_bloom_effects_description">在 \"薩爾達傳說:織夢島\" 和 \"薩爾達傳說:智慧的再現\" 中減少光暈模糊的問題並移除 \"橫衝直撞:狂飆樂園重製版\" 中的光暈效果(適用於Adreno A6XX - A7XX/ Turnip)。警告:可能會在其它遊戲中導致圖形異常</string>
|
<string name="fix_bloom_effects_description">在 薩爾達傳說:織夢島 和 薩爾達傳說:智慧的再現 中 減少光暈模糊的問題並移除 橫衝直撞:狂飆樂園重製版 中的光暈效果 (Adreno A6XX - A7XX/ Turnip)。警告:可能會在其它遊戲中導致圖形異常</string>
|
||||||
<string name="emulate_bgr565">模擬BGR565</string>
|
<string name="emulate_bgr565">模擬 BGR565</string>
|
||||||
<string name="emulate_bgr565_description">修正遊戲中出現的色彩反轉、圖形異常或陰影異常</string>
|
<string name="emulate_bgr565_description">修正遊戲中出現的顏色反轉、圖形異常或陰影異常</string>
|
||||||
<string name="rescale_hack">啟用舊版重新縮放處理</string>
|
<string name="rescale_hack">啟用舊版重新縮放處理</string>
|
||||||
<string name="rescale_hack_description">透過快速重新縮放處理來啟用遊戲重新縮放設定階段的舊版處理方式</string>
|
<string name="rescale_hack_description">透過快速重新縮放處理來啟用遊戲重新縮放設定階段的舊版處理方式</string>
|
||||||
<string name="renderer_asynchronous_shaders">使用非同步著色器</string>
|
<string name="renderer_asynchronous_shaders">使用非同步著色器</string>
|
||||||
<string name="renderer_asynchronous_shaders_description">使用非同步編譯著色器,這可能會減少卡頓,但也可能導致圖形錯誤</string>
|
<string name="renderer_asynchronous_shaders_description">使用非同步編譯著色器。這可能會減少卡頓,但也可能導致圖形錯誤。</string>
|
||||||
<string name="gpu_unswizzle_settings">GPU Unswizzle設定</string>
|
<string name="gpu_unswizzle_settings">GPU Unswizzle 設定</string>
|
||||||
<string name="gpu_unswizzle_settings_description">設定基於GPU的Unswizzling參數或完全停用此功能,調整此設定以在性能與紋理載入品質中取得平衡</string>
|
<string name="gpu_unswizzle_settings_description">設定基於 GPU 的 Unswizzling 參數或完全停用此功能。調整此設定以在性能與紋理載入品質中取得平衡</string>
|
||||||
<string name="gpu_unswizzle_enable">啟用GPU Unswizzle</string>
|
<string name="gpu_unswizzle_enable">啟用 GPU Unswizzle</string>
|
||||||
<string name="gpu_unswizzle_disabled">停用</string>
|
<string name="gpu_unswizzle_disabled">停用</string>
|
||||||
<string name="gpu_unswizzle_texture_size">GPU Unswizzle最大紋理尺寸</string>
|
<string name="gpu_unswizzle_texture_size">GPU Unswizzle 最大紋理尺寸</string>
|
||||||
<string name="gpu_unswizzle_texture_size_description">設定 GPU 紋理 Unswizzling 的最大值(MB),雖然 GPU 處理中型和大型紋理的速度較快,但 CPU 處理非常小的紋理可能更有效率。調整此設定以在GPU加速與CPU負載之間取得平衡</string>
|
<string name="gpu_unswizzle_texture_size_description">設定 GPU 紋理 Unswizzling 的最大值 (MB)。雖然 GPU 處理中型和大型紋理的速度較快,但 CPU 處理非常小的紋理可能更有效率。整此設定以在 GPU 加速與 CPU 負載之間取得平衡</string>
|
||||||
<string name="gpu_unswizzle_stream_size">GPU Unswizzle Stream大小</string>
|
<string name="gpu_unswizzle_stream_size">GPU Unswizzle 流大小</string>
|
||||||
<string name="gpu_unswizzle_stream_size_description">設定每個影格處理大型紋理Unswizzling的資料上限,數值越高載入紋理的速度越快,但會增加畫面延遲;數值較低則能降低 GPU 負載,不過有可能導致至紋理載入不完全甚至突然出現</string>
|
<string name="gpu_unswizzle_stream_size_description">設定每個影格處理大型紋理 Unswizzling 的資料上限。數值越高載入紋理的速度越快,但會增加畫面延遲;數值較低則能降低 GPU 負載,不過有可能導致至紋理載入不完全甚至突然出現</string>
|
||||||
<string name="gpu_unswizzle_chunk_size">GPU Unswizzle Chunk大小</string>
|
<string name="gpu_unswizzle_chunk_size">GPU Unswizzle 塊大小</string>
|
||||||
<string name="gpu_unswizzle_chunk_size_description">設定 3D 紋理每批次處理的深度切片數量,增加此數值可提升規格較佳GPU的處理效率,但在較低規格的硬體上可能導致卡頓或驅動程式逾時</string>
|
<string name="gpu_unswizzle_chunk_size_description">設定 3D 紋理每批次處理的深度切片數量。增加此數值可提升規格較佳 GPU 的處理效率,但在較低規格的硬體上可能導致卡頓或驅動程式逾時</string>
|
||||||
<string name="gpu_unswizzle_default_button">預設</string>
|
<string name="gpu_unswizzle_default_button">預設</string>
|
||||||
|
|
||||||
|
|
||||||
<string name="extensions">擴充功能</string>
|
<string name="extensions">擴充功能</string>
|
||||||
|
|
||||||
<string name="dyna_state">擴展動態狀態</string>
|
<string name="dyna_state">擴展動態狀態</string>
|
||||||
<string name="dyna_state_description">控制擴展動態狀態中可使用的功能數量,較高的數值可根據驅動程式支援的動態狀態減少管線編譯的次數</string>
|
<string name="dyna_state_description">控制擴展動態狀態中可使用的功能數量。較高的數值可根據驅動程式支援的動態狀態減少管線編譯的次數。</string>
|
||||||
<string name="disabled">停用</string>
|
<string name="disabled">停用</string>
|
||||||
<string name="vertex_input_dynamic_state">頂點輸入動態狀態</string>
|
<string name="vertex_input_dynamic_state">頂點輸入動態狀態</string>
|
||||||
<string name="vertex_input_dynamic_state_description">啟用此功能可提供更彈性的頂點輸入處理方式,並可能減少頂點/緩衝區的管線編譯時間</string>
|
<string name="vertex_input_dynamic_state_description">啟用此功能可提供更彈性的頂點輸入處理方式,並可能減少頂點/緩衝區的管線編譯時間</string>
|
||||||
@@ -625,43 +618,43 @@
|
|||||||
<string name="cpu">CPU</string>
|
<string name="cpu">CPU</string>
|
||||||
<string name="clocks">時脈</string>
|
<string name="clocks">時脈</string>
|
||||||
<string name="use_auto_stub">使用自動存根</string>
|
<string name="use_auto_stub">使用自動存根</string>
|
||||||
<string name="use_auto_stub_description">自動補上缺少的服務和功能,可提高相容性但可能導致當機和穩定性問題</string>
|
<string name="use_auto_stub_description">自動補上缺少的服務和功能。可提高相容性但可能導致當機和穩定性問題。</string>
|
||||||
|
|
||||||
<string name="gpu">GPU</string>
|
<string name="gpu">GPU</string>
|
||||||
<string name="renderer_api">API</string>
|
<string name="renderer_api">API</string>
|
||||||
<string name="renderer_debug">圖形偵錯</string>
|
<string name="renderer_debug">圖形偵錯</string>
|
||||||
<string name="renderer_debug_description">將圖形API設為慢速偵錯模式</string>
|
<string name="renderer_debug_description">將圖形 API 設為慢速偵錯模式</string>
|
||||||
<string name="patch_old_qcom_drivers">BCn區塊壓縮紋理修補</string>
|
<string name="patch_old_qcom_drivers">BCn 區塊壓縮紋理修補</string>
|
||||||
<string name="patch_old_qcom_drivers_description">覆寫Adreno GPU的BCn紋理格式自動偵測。通常會根據Android版本自動偵測(會在API 28以上的裝置自動啟用)</string>
|
<string name="patch_old_qcom_drivers_description">覆寫 Adreno GPU 的 BCn 紋理格式自動偵測。通常會根據 Android 版本自動偵測(會在API 28 以上自動啟用)</string>
|
||||||
<string name="fastmem">Fastmem</string>
|
<string name="fastmem">Fastmem</string>
|
||||||
|
|
||||||
<string name="log">日誌</string>
|
<string name="log">日誌</string>
|
||||||
<string name="flush_by_line">按行寫入偵錯日誌</string>
|
<string name="flush_by_line">按行寫入偵錯日誌</string>
|
||||||
<string name="flush_by_line_description">在寫入一行日誌就立刻更新偵錯記錄,讓程式在當機或閃退時更容易偵錯</string>
|
<string name="flush_by_line_description">在每行寫入時重新整理偵錯日誌,讓程式在當機或閃退時更容易偵錯。</string>
|
||||||
<string name="extended_logging">啟用更詳細的日誌記錄</string>
|
<string name="extended_logging">啟用更詳細的日誌記錄</string>
|
||||||
<string name="extended_logging_description">將日誌檔的最大檔案限制從100MB提高到1GB</string>
|
<string name="extended_logging_description">將日誌檔的最大檔案限制從 100MB 提高到 1GB</string>
|
||||||
<string name="log_filter">日誌過濾器</string>
|
<string name="log_filter">日誌過濾器</string>
|
||||||
<string name="log_filter_description">控制 Eden 日誌的紀錄類別。例如: *:Info Service.LM:Debug</string>
|
<string name="log_filter_description">控制 Eden 日誌的紀錄類別。例如: *:Info Service.LM:Debug</string>
|
||||||
|
|
||||||
<!-- GPU Logging strings -->
|
<!-- GPU Logging strings -->
|
||||||
<string name="gpu_logging_header">GPU日誌</string>
|
<string name="gpu_logging_header">GPU 日誌</string>
|
||||||
<string name="gpu_log_level">記錄層級</string>
|
<string name="gpu_log_level">記錄層級</string>
|
||||||
<string name="gpu_log_level_description">GPU日誌的詳細層級(越高日誌越詳細,不過會更容易過熱)</string>
|
<string name="gpu_log_level_description">GPU 日誌的詳細層級 (越高日誌越詳細,不過會更容易過熱)</string>
|
||||||
<string name="gpu_log_vulkan_calls">記錄Vulkan API呼叫</string>
|
<string name="gpu_log_vulkan_calls">記錄 Vulkan API 呼叫</string>
|
||||||
<string name="gpu_log_vulkan_calls_description">在環形緩衝區中記錄所有Vulkan API呼叫</string>
|
<string name="gpu_log_vulkan_calls_description">在環形緩衝區中記錄所有 Vulkan API 呼叫</string>
|
||||||
<string name="gpu_log_shader_dumps">傾印SPIR-V著色器</string>
|
<string name="gpu_log_shader_dumps">傾印 SPIR-V 著色器</string>
|
||||||
<string name="gpu_log_shader_dumps_description">將重新編譯後的SPIR-V二進位檔案(.spv)儲存至Eden資料夾裡的dump資料夾中。可使用 spirv-dis/spirv-cross/spirv-val 進行檢查</string>
|
<string name="gpu_log_shader_dumps_description">將重新編譯後的 SPIR-V 二進位檔案 (.spv) 儲存至 Eden 資料夾裡的 dump 資料夾中。可使用 spirv-dis/spirv-cross/spirv-val 進行檢查</string>
|
||||||
<string name="dump_guest_shaders">傾印客體(Maxwell)著色器</string>
|
<string name="dump_guest_shaders">傾印客體(Maxwell)著色器</string>
|
||||||
<string name="dump_guest_shaders_description">將Maxwell客體著色器位元組碼檔案(.ash)儲存至Eden資料夾裡的dump資料夾中。可使用 nvdisasm 進行檢查</string>
|
<string name="dump_guest_shaders_description">將 Maxwell 客體著色器位元組碼檔案 (.ash) 儲存至 Eden 資料夾裡的 dump 資料夾中。可使用 nvdisasm 進行檢查</string>
|
||||||
<string name="dump_macros">傾印Maxwell巨集</string>
|
<string name="dump_macros">傾印 Maxwell 巨集</string>
|
||||||
<string name="dump_macros_description">將Maxwell巨集程式檔案(.macro)儲存至Eden資料夾裡的dump資料夾中。可使用 envydis 進行檢查</string>
|
<string name="dump_macros_description">將 Maxwell 巨集程式檔案 (.macro) 儲存至 Eden 資料夾裡的 dump 資料夾中。可使用 envydis 進行檢查</string>
|
||||||
<string name="gpu_log_memory_tracking">追蹤GPU記憶體</string>
|
<string name="gpu_log_memory_tracking">追蹤 GPU 記憶體</string>
|
||||||
<string name="gpu_log_memory_tracking_description">監控GPU記憶體的分配和釋放</string>
|
<string name="gpu_log_memory_tracking_description">監控 GPU 記憶體的分配和釋放</string>
|
||||||
<string name="gpu_log_driver_debug">驅動程式偵錯資料</string>
|
<string name="gpu_log_driver_debug">驅動程式偵錯資料</string>
|
||||||
<string name="gpu_log_driver_debug_description">擷取驅動程式的特定偵錯資料(例如 Turnip breadcrumbs)</string>
|
<string name="gpu_log_driver_debug_description">擷取驅動程式的特定偵錯資料(例如 Turnip breadcrumbs)</string>
|
||||||
<string name="gpu_log_ring_buffer_size">環形緩衝區大小</string>
|
<string name="gpu_log_ring_buffer_size">環形緩衝區大小</string>
|
||||||
<string name="gpu_log_ring_buffer_size_description">追蹤的近期Vulkan呼叫數量(預設為512)</string>
|
<string name="gpu_log_ring_buffer_size_description">追蹤的近期 Vulkan 呼叫數量(預設為 512 )</string>
|
||||||
<string name="gpu_log_ring_buffer_size_hint">64至4096個項目</string>
|
<string name="gpu_log_ring_buffer_size_hint">64 至 4096 個項目</string>
|
||||||
|
|
||||||
<string name="general">一般</string>
|
<string name="general">一般</string>
|
||||||
|
|
||||||
@@ -685,17 +678,17 @@
|
|||||||
<string name="left_stick">左搖桿</string>
|
<string name="left_stick">左搖桿</string>
|
||||||
<string name="control_stick">控制搖桿</string>
|
<string name="control_stick">控制搖桿</string>
|
||||||
<string name="right_stick">右搖桿</string>
|
<string name="right_stick">右搖桿</string>
|
||||||
<string name="c_stick">C搖桿</string>
|
<string name="c_stick">C 搖桿</string>
|
||||||
<string name="pressed">按壓</string>
|
<string name="pressed">按壓</string>
|
||||||
<string name="range">靈敏度</string>
|
<string name="range">靈敏度</string>
|
||||||
<string name="deadzone">無感帶</string>
|
<string name="deadzone">無感帶</string>
|
||||||
<string name="modifier">用按鈕、按鍵來模擬搖桿</string>
|
<string name="modifier">用按鈕、按鍵來模擬搖桿</string>
|
||||||
<string name="modifier_range">修改按鈕模擬左/右搖桿的值,視遊戲不同而有所差異\n(模擬左搖桿時,若將此數值設為50,則按下按鈕時遊戲裡的人物可能只會走動而不是奔跑;模擬右搖桿時所使用的值則是會影響到轉視角的速度,數值越高代表使用的模擬值越大)</string>
|
<string name="modifier_range">修改按鈕模擬左/右搖桿的值,視遊戲不同而有所差異\n(模擬左搖桿時,若將此數值設為50,則按下按鈕時遊戲裡的人物可能只會走動而不是奔跑;模擬右搖桿時所使用的值則是會影響到轉視角的速度,數值越高代表使用的模擬值越大)</string>
|
||||||
<string name="triggers">肩部按鍵</string>
|
<string name="triggers">肩部按鍵</string>
|
||||||
<string name="button_sl_left">左SL</string>
|
<string name="button_sl_left">左 SL</string>
|
||||||
<string name="button_sr_left">左SR</string>
|
<string name="button_sr_left">左 SR</string>
|
||||||
<string name="button_sl_right">右SL</string>
|
<string name="button_sl_right">右 SL</string>
|
||||||
<string name="button_sr_right">右SR</string>
|
<string name="button_sr_right">右 SR</string>
|
||||||
<string name="invalid">無效</string>
|
<string name="invalid">無效</string>
|
||||||
<string name="not_set">無</string>
|
<string name="not_set">無</string>
|
||||||
<string name="unknown">未知</string>
|
<string name="unknown">未知</string>
|
||||||
@@ -710,12 +703,12 @@
|
|||||||
<string name="auto_map_description">選擇一個控制器以嘗試自動配對按鈕、搖桿</string>
|
<string name="auto_map_description">選擇一個控制器以嘗試自動配對按鈕、搖桿</string>
|
||||||
<string name="attempted_auto_map">嘗試為 %1$s 自動配對</string>
|
<string name="attempted_auto_map">嘗試為 %1$s 自動配對</string>
|
||||||
<string name="controller_type">控制器類型</string>
|
<string name="controller_type">控制器類型</string>
|
||||||
<string name="pro_controller">Pro手把</string>
|
<string name="pro_controller">Pro 手把</string>
|
||||||
<string name="handheld">掌機模式</string>
|
<string name="handheld">掌機模式</string>
|
||||||
<string name="dual_joycons">雙Joycon手把</string>
|
<string name="dual_joycons">雙 Joycon 手把</string>
|
||||||
<string name="left_joycon">左Joycon手把</string>
|
<string name="left_joycon">左 Joycon 手把</string>
|
||||||
<string name="right_joycon">右Joycon手把</string>
|
<string name="right_joycon">右 Joycon 手把</string>
|
||||||
<string name="gamecube_controller">GameCube手把</string>
|
<string name="gamecube_controller">GameCube 手把</string>
|
||||||
<string name="invert_axis">方向反轉</string>
|
<string name="invert_axis">方向反轉</string>
|
||||||
<string name="invert_button">反轉按鈕</string>
|
<string name="invert_button">反轉按鈕</string>
|
||||||
<string name="toggle_button">切換按鍵</string>
|
<string name="toggle_button">切換按鍵</string>
|
||||||
@@ -808,7 +801,7 @@
|
|||||||
<string name="recommended_driver">推薦驅動程式:</string>
|
<string name="recommended_driver">推薦驅動程式:</string>
|
||||||
<string name="gpu_model">GPU型號</string>
|
<string name="gpu_model">GPU型號</string>
|
||||||
<string name="unsupported_gpu">不支援的GPU</string>
|
<string name="unsupported_gpu">不支援的GPU</string>
|
||||||
<string name="unsupported_gpu_warning">您的GPU不支援驅動程式注入,不建議嘗試設定自訂驅動程式</string>
|
<string name="unsupported_gpu_warning">您的GPU不支援驅動程式注入。不建議嘗試設定自訂驅動程式。</string>
|
||||||
|
|
||||||
<!-- Preferences Screen -->
|
<!-- Preferences Screen -->
|
||||||
<string name="preferences_settings">設定</string>
|
<string name="preferences_settings">設定</string>
|
||||||
@@ -1027,40 +1020,9 @@
|
|||||||
<string name="memory_6gb">6GB (不穩定)</string>
|
<string name="memory_6gb">6GB (不穩定)</string>
|
||||||
<string name="memory_8gb">8GB (不穩定)</string>
|
<string name="memory_8gb">8GB (不穩定)</string>
|
||||||
|
|
||||||
<!-- CPU clock levels -->
|
|
||||||
<string name="clock_normal">正常</string>
|
|
||||||
<string name="clock_boost">加速</string>
|
|
||||||
<string name="clock_fast">超頻</string>
|
|
||||||
|
|
||||||
<!-- GPU clock levels -->
|
|
||||||
<string name="fast_gpu_normal">正常</string>
|
|
||||||
<string name="fast_gpu_medium">加速</string>
|
|
||||||
<string name="fast_gpu_high">超頻</string>
|
|
||||||
|
|
||||||
<!-- GPU swizzle texture size -->
|
|
||||||
<string name="gpu_texturesizeswizzle_verysmall">極小 (16MB)</string>
|
|
||||||
<string name="gpu_texturesizeswizzle_small">小(32MB)</string>
|
|
||||||
<string name="gpu_texturesizeswizzle_normal">正常(128MB)</string>
|
|
||||||
<string name="gpu_texturesizeswizzle_large">大(256MB)</string>
|
|
||||||
<string name="gpu_texturesizeswizzle_verylarge">極大(512MB)</string>
|
|
||||||
|
|
||||||
<!-- GPU swizzle streams -->
|
|
||||||
<string name="gpu_swizzle_verylow">極小(4MB)</string>
|
|
||||||
<string name="gpu_swizzle_low">小(8MB)</string>
|
|
||||||
<string name="gpu_swizzle_normal">正常(16MB)</string>
|
|
||||||
<string name="gpu_swizzle_medium">中(32MB)</string>
|
|
||||||
<string name="gpu_swizzle_high">大(64MB)</string>
|
|
||||||
|
|
||||||
<!-- GPU swizzle chunks -->
|
|
||||||
<string name="gpu_swizzlechunk_verylow">極小(32)</string>
|
|
||||||
<string name="gpu_swizzlechunk_low">小(64)</string>
|
|
||||||
<string name="gpu_swizzlechunk_normal">正常(128)</string>
|
|
||||||
<string name="gpu_swizzlechunk_medium">中(256)</string>
|
|
||||||
<string name="gpu_swizzlechunk_high">大(512)</string>
|
|
||||||
|
|
||||||
<!-- Temperature Units -->
|
<!-- Temperature Units -->
|
||||||
<string name="temperature_celsius">攝氏</string>
|
<string name="temperature_celsius">攝氏度</string>
|
||||||
<string name="temperature_fahrenheit">華氏</string>
|
<string name="temperature_fahrenheit">華氏度</string>
|
||||||
|
|
||||||
<!-- Memory Sizes -->
|
<!-- Memory Sizes -->
|
||||||
<string name="memory_byte_shorthand">B</string>
|
<string name="memory_byte_shorthand">B</string>
|
||||||
@@ -1073,8 +1035,6 @@
|
|||||||
|
|
||||||
<string name="renderer_none">無</string>
|
<string name="renderer_none">無</string>
|
||||||
|
|
||||||
<!-- Renderer Accuracy -->
|
|
||||||
<string name="renderer_accuracy_low">效能</string>
|
|
||||||
<string name="renderer_accuracy_high">準確</string>
|
<string name="renderer_accuracy_high">準確</string>
|
||||||
|
|
||||||
<!-- DMA Accuracy -->
|
<!-- DMA Accuracy -->
|
||||||
|
|||||||
@@ -558,6 +558,7 @@
|
|||||||
<item>@string/gpu_fence_behavior_immediate</item>
|
<item>@string/gpu_fence_behavior_immediate</item>
|
||||||
<item>@string/gpu_fence_behavior_balanced</item>
|
<item>@string/gpu_fence_behavior_balanced</item>
|
||||||
<item>@string/gpu_fence_behavior_accurate</item>
|
<item>@string/gpu_fence_behavior_accurate</item>
|
||||||
|
<item>@string/gpu_fence_behavior_strict</item>
|
||||||
</string-array>
|
</string-array>
|
||||||
<integer-array name="gpuFenceBehaviorValues">
|
<integer-array name="gpuFenceBehaviorValues">
|
||||||
<item>0</item>
|
<item>0</item>
|
||||||
|
|||||||
@@ -586,6 +586,8 @@
|
|||||||
<string name="renderer_reactive_flushing_description">Improves rendering accuracy in some games at the cost of performance.</string>
|
<string name="renderer_reactive_flushing_description">Improves rendering accuracy in some games at the cost of performance.</string>
|
||||||
<string name="enable_buffer_history">Enable buffer history</string>
|
<string name="enable_buffer_history">Enable buffer history</string>
|
||||||
<string name="enable_buffer_history_description">Enables access to previous buffer states. This option may improve rendering quality and performance consistency in some games.</string>
|
<string name="enable_buffer_history_description">Enables access to previous buffer states. This option may improve rendering quality and performance consistency in some games.</string>
|
||||||
|
<string name="enable_gpu_buffer_readback">Enable GPU Buffer Readback</string>
|
||||||
|
<string name="enable_gpu_buffer_readback_description">Preserves GPU-modified buffer data by reading it back before uploads. Some games require this to render certain effects properly. May cause issues if the hardware cannot handle the additional workload.</string>
|
||||||
<string name="use_optimized_vertex_buffers">Optimized Vertex Buffers</string>
|
<string name="use_optimized_vertex_buffers">Optimized Vertex Buffers</string>
|
||||||
<string name="use_optimized_vertex_buffers_description">Enables optimized vertex buffer binding for improved performance. Requires Mesa 26.0+ Turnip drivers/ QCOM drivers. Will crash on older Turnip drivers (25.3 and below).</string>
|
<string name="use_optimized_vertex_buffers_description">Enables optimized vertex buffer binding for improved performance. Requires Mesa 26.0+ Turnip drivers/ QCOM drivers. Will crash on older Turnip drivers (25.3 and below).</string>
|
||||||
|
|
||||||
@@ -595,10 +597,6 @@
|
|||||||
<string name="fast_gpu_time_description">Makes the game believe GPU work finishes faster than it does, so it stops lowering resolution and render distance to fit the Switch\'s clocks.</string>
|
<string name="fast_gpu_time_description">Makes the game believe GPU work finishes faster than it does, so it stops lowering resolution and render distance to fit the Switch\'s clocks.</string>
|
||||||
<string name="skip_cpu_inner_invalidation">Skip CPU Inner Invalidation</string>
|
<string name="skip_cpu_inner_invalidation">Skip CPU Inner Invalidation</string>
|
||||||
<string name="skip_cpu_inner_invalidation_description">Skips certain CPU-side cache invalidations during memory updates, reducing CPU usage and improving it\'s performance. This may cause glitches or crashes on some games.</string>
|
<string name="skip_cpu_inner_invalidation_description">Skips certain CPU-side cache invalidations during memory updates, reducing CPU usage and improving it\'s performance. This may cause glitches or crashes on some games.</string>
|
||||||
<string name="nce_invalidation_gpu_readback">GPU Readback Before NCE Invalidation</string>
|
|
||||||
<string name="nce_invalidation_gpu_readback_description">Temporary. Fix Ender Magnolia (and other UE titles) crashes. May reduce performance. Improvement in progress.</string>
|
|
||||||
<string name="nce_runtime_nro_patch">Patch Runtime NROs for NCE</string>
|
|
||||||
<string name="nce_runtime_nro_patch_description">Temporary. Fix Biomutant boot. May impact performance. Improvement in progress.</string>
|
|
||||||
<string name="fix_bloom_effects">Fix Bloom Effects</string>
|
<string name="fix_bloom_effects">Fix Bloom Effects</string>
|
||||||
<string name="fix_bloom_effects_description">Reduces bloom blur in LA/EOW (Adreno A6XX - A7XX/ Turnip), removes bloom in Burnout. Warning: may cause graphical artifacts in other games.</string>
|
<string name="fix_bloom_effects_description">Reduces bloom blur in LA/EOW (Adreno A6XX - A7XX/ Turnip), removes bloom in Burnout. Warning: may cause graphical artifacts in other games.</string>
|
||||||
<string name="emulate_bgr565">Emulate BGR565</string>
|
<string name="emulate_bgr565">Emulate BGR565</string>
|
||||||
@@ -1140,6 +1138,7 @@
|
|||||||
<string name="gpu_fence_behavior_immediate">Immediate</string>
|
<string name="gpu_fence_behavior_immediate">Immediate</string>
|
||||||
<string name="gpu_fence_behavior_balanced">Balanced</string>
|
<string name="gpu_fence_behavior_balanced">Balanced</string>
|
||||||
<string name="gpu_fence_behavior_accurate">Accurate</string>
|
<string name="gpu_fence_behavior_accurate">Accurate</string>
|
||||||
|
<string name="gpu_fence_behavior_strict">Strict</string>
|
||||||
|
|
||||||
<!-- ASTC Decoding Method Choices -->
|
<!-- ASTC Decoding Method Choices -->
|
||||||
<string name="accelerate_astc_cpu" translatable="false">CPU</string>
|
<string name="accelerate_astc_cpu" translatable="false">CPU</string>
|
||||||
|
|||||||
@@ -76,6 +76,7 @@ add_library(
|
|||||||
logging.h
|
logging.h
|
||||||
lz4_compression.cpp
|
lz4_compression.cpp
|
||||||
lz4_compression.h
|
lz4_compression.h
|
||||||
|
make_unique_for_overwrite.h
|
||||||
math_util.h
|
math_util.h
|
||||||
memory_detect.cpp
|
memory_detect.cpp
|
||||||
memory_detect.h
|
memory_detect.h
|
||||||
@@ -107,8 +108,7 @@ add_library(
|
|||||||
settings_setting.h
|
settings_setting.h
|
||||||
slot_vector.h
|
slot_vector.h
|
||||||
socket_types.h
|
socket_types.h
|
||||||
sparse_large_vector.cpp
|
spin_lock.h
|
||||||
sparse_large_vector.h
|
|
||||||
stb.cpp
|
stb.cpp
|
||||||
stb.h
|
stb.h
|
||||||
steady_clock.cpp
|
steady_clock.cpp
|
||||||
@@ -137,8 +137,8 @@ add_library(
|
|||||||
uuid.cpp
|
uuid.cpp
|
||||||
uuid.h
|
uuid.h
|
||||||
vector_math.h
|
vector_math.h
|
||||||
zbic_compression.cpp
|
virtual_buffer.cpp
|
||||||
zbic_compression.h
|
virtual_buffer.h
|
||||||
zstd_compression.cpp
|
zstd_compression.cpp
|
||||||
zstd_compression.h
|
zstd_compression.h
|
||||||
fs/ryujinx_compat.h fs/ryujinx_compat.cpp
|
fs/ryujinx_compat.h fs/ryujinx_compat.cpp
|
||||||
@@ -149,10 +149,6 @@ add_library(
|
|||||||
net/net.h net/net.cpp
|
net/net.h net/net.cpp
|
||||||
container/unordered_map.h container/unordered_set.h)
|
container/unordered_map.h container/unordered_set.h)
|
||||||
|
|
||||||
set_source_files_properties(zbic_compression.cpp PROPERTIES
|
|
||||||
INCLUDE_DIRECTORIES "${ZBIC_INCLUDE_DIR}"
|
|
||||||
COMPILE_OPTIONS "$<$<CXX_COMPILER_ID:Clang,GNU>:-Wno-unused-function;-Wno-missing-declarations;-Wno-shadow>")
|
|
||||||
|
|
||||||
if(WIN32)
|
if(WIN32)
|
||||||
target_sources(common PRIVATE windows/timer_resolution.cpp
|
target_sources(common PRIVATE windows/timer_resolution.cpp
|
||||||
windows/timer_resolution.h)
|
windows/timer_resolution.h)
|
||||||
|
|||||||
@@ -9,6 +9,7 @@
|
|||||||
|
|
||||||
#include "common/assert.h"
|
#include "common/assert.h"
|
||||||
#include "common/fiber.h"
|
#include "common/fiber.h"
|
||||||
|
#include "common/virtual_buffer.h"
|
||||||
|
|
||||||
#include <boost/context/detail/fcontext.hpp>
|
#include <boost/context/detail/fcontext.hpp>
|
||||||
|
|
||||||
|
|||||||
+13
-41
@@ -178,14 +178,6 @@ public:
|
|||||||
Release();
|
Release();
|
||||||
}
|
}
|
||||||
|
|
||||||
void* Allocate(size_t size) {
|
|
||||||
auto* ptr = VirtualAlloc(nullptr, size, MEM_RESERVE | MEM_COMMIT, PAGE_READWRITE);
|
|
||||||
if (ptr == nullptr) {
|
|
||||||
LOG_CRITICAL(HW_Memory, "Failed to allocate fallback buffer with size {:#x}, error {}", size, GetLastError());
|
|
||||||
}
|
|
||||||
return ptr;
|
|
||||||
}
|
|
||||||
|
|
||||||
void Map(size_t virtual_offset, size_t host_offset, size_t length, MemoryPermission perms) {
|
void Map(size_t virtual_offset, size_t host_offset, size_t length, MemoryPermission perms) {
|
||||||
std::unique_lock lock{placeholder_mutex};
|
std::unique_lock lock{placeholder_mutex};
|
||||||
if (!IsNiechePlaceholder(virtual_offset, length)) {
|
if (!IsNiechePlaceholder(virtual_offset, length)) {
|
||||||
@@ -406,10 +398,6 @@ private:
|
|||||||
// For managarm: see https://github.com/managarm/managarm/issues/1370
|
// For managarm: see https://github.com/managarm/managarm/issues/1370
|
||||||
#else // ^^^ Windows ^^^ vvv POSIX vvv
|
#else // ^^^ Windows ^^^ vvv POSIX vvv
|
||||||
|
|
||||||
#ifndef MAP_NOCORE
|
|
||||||
#define MAP_NOCORE 0
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef ARCHITECTURE_arm64
|
#ifdef ARCHITECTURE_arm64
|
||||||
|
|
||||||
static void* ChooseVirtualBase(size_t virtual_size) {
|
static void* ChooseVirtualBase(size_t virtual_size) {
|
||||||
@@ -434,7 +422,7 @@ static void* ChooseVirtualBase(size_t virtual_size) {
|
|||||||
// Note: we may be able to take advantage of MAP_FIXED_NOREPLACE here.
|
// Note: we may be able to take advantage of MAP_FIXED_NOREPLACE here.
|
||||||
void* map_pointer =
|
void* map_pointer =
|
||||||
mmap(reinterpret_cast<void*>(hint_address), virtual_size, PROT_READ | PROT_WRITE,
|
mmap(reinterpret_cast<void*>(hint_address), virtual_size, PROT_READ | PROT_WRITE,
|
||||||
MAP_PRIVATE | MAP_ANONYMOUS | MAP_NORESERVE | MAP_NOCORE, -1, 0);
|
MAP_PRIVATE | MAP_ANONYMOUS | MAP_NORESERVE, -1, 0);
|
||||||
|
|
||||||
// If we successfully mapped, we're done.
|
// If we successfully mapped, we're done.
|
||||||
if (reinterpret_cast<uintptr_t>(map_pointer) == hint_address) {
|
if (reinterpret_cast<uintptr_t>(map_pointer) == hint_address) {
|
||||||
@@ -454,11 +442,11 @@ static void* ChooseVirtualBase(size_t virtual_size) {
|
|||||||
|
|
||||||
static void* ChooseVirtualBase(size_t virtual_size) {
|
static void* ChooseVirtualBase(size_t virtual_size) {
|
||||||
#if defined(__FreeBSD__) || defined(__DragonFly__) || defined(__OpenBSD__) || defined(__sun__) || defined(__HAIKU__) || defined(__managarm__) || defined(__AIX__)
|
#if defined(__FreeBSD__) || defined(__DragonFly__) || defined(__OpenBSD__) || defined(__sun__) || defined(__HAIKU__) || defined(__managarm__) || defined(__AIX__)
|
||||||
void* virtual_base = mmap(nullptr, virtual_size, PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANONYMOUS | MAP_NORESERVE | MAP_ALIGNED_SUPER | MAP_NOCORE, -1, 0);
|
void* virtual_base = mmap(nullptr, virtual_size, PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANONYMOUS | MAP_NORESERVE | MAP_ALIGNED_SUPER, -1, 0);
|
||||||
if (virtual_base != MAP_FAILED)
|
if (virtual_base != MAP_FAILED)
|
||||||
return virtual_base;
|
return virtual_base;
|
||||||
#endif
|
#endif
|
||||||
return mmap(nullptr, virtual_size, PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANONYMOUS | MAP_NORESERVE | MAP_NOCORE, -1, 0);
|
return mmap(nullptr, virtual_size, PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANONYMOUS | MAP_NORESERVE, -1, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
@@ -552,13 +540,13 @@ public:
|
|||||||
}
|
}
|
||||||
if (use_anon) {
|
if (use_anon) {
|
||||||
LOG_WARNING(Common_Memory, "Using private mappings instead of shared ones");
|
LOG_WARNING(Common_Memory, "Using private mappings instead of shared ones");
|
||||||
backing_base = static_cast<u8*>(mmap(nullptr, backing_size, PROT_READ | PROT_WRITE, MAP_ANONYMOUS | MAP_PRIVATE | MAP_NOCORE, -1, 0));
|
backing_base = static_cast<u8*>(mmap(nullptr, backing_size, PROT_READ | PROT_WRITE, MAP_ANONYMOUS | MAP_PRIVATE, -1, 0));
|
||||||
if (fd > 0) {
|
if (fd > 0) {
|
||||||
fd = -1;
|
fd = -1;
|
||||||
close(fd);
|
close(fd);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
backing_base = static_cast<u8*>(mmap(nullptr, backing_size, PROT_READ | PROT_WRITE, MAP_SHARED | MAP_NOCORE, fd, 0));
|
backing_base = static_cast<u8*>(mmap(nullptr, backing_size, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0));
|
||||||
}
|
}
|
||||||
if (backing_base == MAP_FAILED) {
|
if (backing_base == MAP_FAILED) {
|
||||||
LOG_CRITICAL(HW_Memory, "mmap failed: {}", strerror(errno));
|
LOG_CRITICAL(HW_Memory, "mmap failed: {}", strerror(errno));
|
||||||
@@ -582,14 +570,6 @@ public:
|
|||||||
Release();
|
Release();
|
||||||
}
|
}
|
||||||
|
|
||||||
void* Allocate(size_t size) {
|
|
||||||
auto* ptr = mmap(nullptr, size, PROT_READ | PROT_WRITE, MAP_ANONYMOUS | MAP_PRIVATE, -1, 0);
|
|
||||||
if (ptr == MAP_FAILED) {
|
|
||||||
LOG_CRITICAL(HW_Memory, "Failed to allocate fallback buffer with size {:#x}, {}", size, strerror(errno));
|
|
||||||
}
|
|
||||||
return ptr;
|
|
||||||
}
|
|
||||||
|
|
||||||
void Map(size_t virtual_offset, size_t host_offset, size_t length, MemoryPermission perms) {
|
void Map(size_t virtual_offset, size_t host_offset, size_t length, MemoryPermission perms) {
|
||||||
// Intersect the range with our address space.
|
// Intersect the range with our address space.
|
||||||
AdjustMap(&virtual_offset, &length);
|
AdjustMap(&virtual_offset, &length);
|
||||||
@@ -710,10 +690,12 @@ HostMemory::HostMemory(size_t backing_size_, size_t virtual_size_)
|
|||||||
{
|
{
|
||||||
#if defined(__OPENORBIS__) || defined(__managarm__)
|
#if defined(__OPENORBIS__) || defined(__managarm__)
|
||||||
LOG_WARNING(HW_Memory, "Platform doesn't support fastmem");
|
LOG_WARNING(HW_Memory, "Platform doesn't support fastmem");
|
||||||
backing_base = static_cast<u8*>(mmap(nullptr, backing_size, PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANONYMOUS, -1, 0));
|
fallback_buffer.emplace(backing_size);
|
||||||
|
backing_base = fallback_buffer->data();
|
||||||
virtual_base = nullptr;
|
virtual_base = nullptr;
|
||||||
#else
|
#else
|
||||||
// Try to allocate a fastmem arena.
|
// Try to allocate a fastmem arena.
|
||||||
|
// The implementation will fail with std::bad_alloc on errors.
|
||||||
impl = std::make_unique<HostMemory::Impl>(AlignUp(backing_size, PageAlignment), AlignUp(virtual_size, PageAlignment) + HugePageSize);
|
impl = std::make_unique<HostMemory::Impl>(AlignUp(backing_size, PageAlignment), AlignUp(virtual_size, PageAlignment) + HugePageSize);
|
||||||
if (impl->Init()) {
|
if (impl->Init()) {
|
||||||
backing_base = impl->backing_base;
|
backing_base = impl->backing_base;
|
||||||
@@ -724,26 +706,16 @@ HostMemory::HostMemory(size_t backing_size_, size_t virtual_size_)
|
|||||||
virtual_base_offset = virtual_base - impl->virtual_base;
|
virtual_base_offset = virtual_base - impl->virtual_base;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
LOG_WARNING(HW_Memory, "Platform can support fastmem, but can't create it");
|
|
||||||
fallback_buffer = true;
|
|
||||||
backing_base = static_cast<u8*>(impl->Allocate(backing_size));
|
|
||||||
virtual_base = nullptr;
|
|
||||||
impl.reset();
|
impl.reset();
|
||||||
|
LOG_WARNING(HW_Memory, "Platform can support fastmem, but can't create it");
|
||||||
|
fallback_buffer.emplace(backing_size);
|
||||||
|
backing_base = fallback_buffer->data();
|
||||||
|
virtual_base = nullptr;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
HostMemory::~HostMemory() {
|
HostMemory::~HostMemory() = default;
|
||||||
#ifdef _WIN32
|
|
||||||
if (fallback_buffer) {
|
|
||||||
VirtualFree(backing_base, backing_size, MEM_RELEASE);
|
|
||||||
}
|
|
||||||
#else
|
|
||||||
if (fallback_buffer) {
|
|
||||||
munmap(backing_base, backing_size);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
HostMemory::HostMemory(HostMemory&&) noexcept = default;
|
HostMemory::HostMemory(HostMemory&&) noexcept = default;
|
||||||
|
|
||||||
|
|||||||
@@ -10,6 +10,7 @@
|
|||||||
#include <optional>
|
#include <optional>
|
||||||
#include "common/common_funcs.h"
|
#include "common/common_funcs.h"
|
||||||
#include "common/common_types.h"
|
#include "common/common_types.h"
|
||||||
|
#include "common/virtual_buffer.h"
|
||||||
|
|
||||||
namespace Common {
|
namespace Common {
|
||||||
|
|
||||||
@@ -85,7 +86,7 @@ private:
|
|||||||
u8* virtual_base{};
|
u8* virtual_base{};
|
||||||
size_t virtual_base_offset{};
|
size_t virtual_base_offset{};
|
||||||
// Windows requires it for kernels whom lack proper support for some functions!
|
// Windows requires it for kernels whom lack proper support for some functions!
|
||||||
bool fallback_buffer{false};
|
std::optional<Common::VirtualBuffer<u8>> fallback_buffer;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace Common
|
} // namespace Common
|
||||||
|
|||||||
@@ -0,0 +1,27 @@
|
|||||||
|
// SPDX-FileCopyrightText: Copyright 2022 yuzu Emulator Project
|
||||||
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include <memory>
|
||||||
|
#include <type_traits>
|
||||||
|
|
||||||
|
namespace Common {
|
||||||
|
|
||||||
|
template <class T>
|
||||||
|
requires(!std::is_array_v<T>)
|
||||||
|
std::unique_ptr<T> make_unique_for_overwrite() {
|
||||||
|
return std::unique_ptr<T>(new T);
|
||||||
|
}
|
||||||
|
|
||||||
|
template <class T>
|
||||||
|
requires std::is_unbounded_array_v<T>
|
||||||
|
std::unique_ptr<T> make_unique_for_overwrite(std::size_t n) {
|
||||||
|
return std::unique_ptr<T>(new std::remove_extent_t<T>[n]);
|
||||||
|
}
|
||||||
|
|
||||||
|
template <class T, class... Args>
|
||||||
|
requires std::is_bounded_array_v<T>
|
||||||
|
void make_unique_for_overwrite(Args&&...) = delete;
|
||||||
|
|
||||||
|
} // namespace Common
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
|
// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
|
||||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
|
||||||
// SPDX-FileCopyrightText: Copyright 2019 yuzu Emulator Project
|
// SPDX-FileCopyrightText: Copyright 2019 yuzu Emulator Project
|
||||||
@@ -13,11 +13,39 @@ PageTable::PageTable() = default;
|
|||||||
|
|
||||||
PageTable::~PageTable() noexcept = default;
|
PageTable::~PageTable() noexcept = default;
|
||||||
|
|
||||||
void PageTable::Resize(std::size_t address_space_width_in_bits, std::size_t page_bits) {
|
bool PageTable::BeginTraversal(TraversalEntry* out_entry, TraversalContext* out_context,
|
||||||
auto const num_page_table_entries = 1ULL << (address_space_width_in_bits - page_bits);
|
Common::ProcessAddress address) const {
|
||||||
entries.ResizeAndClear(num_page_table_entries);
|
out_context->next_offset = GetInteger(address);
|
||||||
|
out_context->next_page = address / page_size;
|
||||||
|
|
||||||
|
return this->ContinueTraversal(out_entry, out_context);
|
||||||
|
}
|
||||||
|
|
||||||
|
bool PageTable::ContinueTraversal(TraversalEntry* out_entry, TraversalContext* context) const {
|
||||||
|
// Setup invalid defaults.
|
||||||
|
out_entry->phys_addr = 0;
|
||||||
|
out_entry->block_size = page_size;
|
||||||
|
// Validate that we can read the actual entry.
|
||||||
|
if (auto const page = context->next_page; page < entries.size()) {
|
||||||
|
// Validate that the entry is mapped.
|
||||||
|
if (auto const paddr = entries[page].addr; paddr != 0) {
|
||||||
|
// Populate the results.
|
||||||
|
out_entry->phys_addr = paddr + context->next_offset;
|
||||||
|
context->next_page += 1;
|
||||||
|
context->next_offset += page_size;
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
context->next_page += 1;
|
||||||
|
context->next_offset += page_size;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
void PageTable::Resize(std::size_t address_space_width_in_bits, std::size_t page_size_in_bits) {
|
||||||
|
auto const num_page_table_entries = 1ULL << (address_space_width_in_bits - page_size_in_bits);
|
||||||
|
entries.resize(num_page_table_entries);
|
||||||
current_address_space_width_in_bits = address_space_width_in_bits;
|
current_address_space_width_in_bits = address_space_width_in_bits;
|
||||||
current_page_bits = page_bits;
|
page_size = 1ULL << page_size_in_bits;
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace Common
|
} // namespace Common
|
||||||
|
|||||||
+56
-64
@@ -9,22 +9,22 @@
|
|||||||
#include <atomic>
|
#include <atomic>
|
||||||
|
|
||||||
#include "common/common_types.h"
|
#include "common/common_types.h"
|
||||||
#include "common/sparse_large_vector.h"
|
|
||||||
#include "common/typed_address.h"
|
#include "common/typed_address.h"
|
||||||
|
#include "common/virtual_buffer.h"
|
||||||
|
|
||||||
namespace Common {
|
namespace Common {
|
||||||
|
|
||||||
enum class PageType : u8 {
|
enum class PageType : u8 {
|
||||||
/// Page is unmapped and should cause an access error.
|
/// Page is unmapped and should cause an access error.
|
||||||
Unmapped = 0b00,
|
Unmapped,
|
||||||
/// Page is mapped to regular memory. This is the only type you can get pointers to.
|
/// Page is mapped to regular memory. This is the only type you can get pointers to.
|
||||||
Memory = 0b01,
|
Memory,
|
||||||
/// Page is mapped to regular memory, but inaccessible from CPU fastmem and must use
|
/// Page is mapped to regular memory, but inaccessible from CPU fastmem and must use
|
||||||
/// the callbacks.
|
/// the callbacks.
|
||||||
DebugMemory = 0b10,
|
DebugMemory,
|
||||||
/// Page is mapped to regular memory, but also needs to check for rasterizer cache flushing and
|
/// Page is mapped to regular memory, but also needs to check for rasterizer cache flushing and
|
||||||
/// invalidation
|
/// invalidation
|
||||||
RasterizerCachedMemory = 0b11,
|
RasterizerCachedMemory,
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -42,86 +42,57 @@ struct PageTable {
|
|||||||
u64 next_offset{};
|
u64 next_offset{};
|
||||||
};
|
};
|
||||||
|
|
||||||
/// Masks out bits reserved for attribute tagging.
|
/// Number of bits reserved for attribute tagging.
|
||||||
static constexpr u64 ATTRIBUTE_MASK = ((1ULL << 44) - 1) << 12;
|
/// This can be at most the guaranteed alignment of the pointers in the page table.
|
||||||
|
static constexpr int ATTRIBUTE_BITS = 2;
|
||||||
/// Specifies sign bit for page table entries.
|
|
||||||
static constexpr u64 SIGN_BIT = 45 + 12; // 44 bits of data + page offset
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Atomic tuple of host pointer, page type, and block id.
|
* Pair of host pointer and page type attribute.
|
||||||
* This uses the lower bits of a given pointer to store the attributes.
|
* This uses the lower bits of a given pointer to store the attribute tag.
|
||||||
* Writing and reading the pointer attribute pair is guaranteed to be atomic for the same method
|
* Writing and reading the pointer attribute pair is guaranteed to be atomic for the same method
|
||||||
* call. In other words, they are guaranteed to be synchronized at all times.
|
* call. In other words, they are guaranteed to be synchronized at all times.
|
||||||
*/
|
*/
|
||||||
class PageEntryData {
|
class PageInfo {
|
||||||
public:
|
public:
|
||||||
struct Data {
|
|
||||||
Data(bool marked_, PageType type_, u16 block_, u64 page_)
|
|
||||||
: marked(static_cast<u64>(marked_) & 0b1)
|
|
||||||
, type(static_cast<u64>(type_) & ((1ULL << 2) - 1))
|
|
||||||
, block(static_cast<u64>(block_) & ((1ULL << 9) - 1))
|
|
||||||
, page((page_ >> 12) & ((1ULL << 45) - 1))
|
|
||||||
, block2((static_cast<u64>(block_) >> 9) & ((1ULL << 7) - 1)) {}
|
|
||||||
u64 marked : 1;
|
|
||||||
u64 type : 2;
|
|
||||||
u64 block : 9;
|
|
||||||
u64 page : 45; // 44 bits of actual data (64 - page offset (12) - reserved (8)) + a sign bit
|
|
||||||
u64 block2 : 7;
|
|
||||||
};
|
|
||||||
|
|
||||||
[[nodiscard]] Data Raw() const noexcept {
|
|
||||||
return std::bit_cast<Data>(data_raw.load(std::memory_order_relaxed));
|
|
||||||
}
|
|
||||||
|
|
||||||
/// Returns the page pointer
|
/// Returns the page pointer
|
||||||
[[nodiscard]] uintptr_t Pointer(bool ignored_marked = false) const noexcept {
|
[[nodiscard]] uintptr_t Pointer() const noexcept {
|
||||||
return ExtractPointer(std::bit_cast<Data>(data_raw.load(std::memory_order_relaxed)), ignored_marked);
|
return ExtractPointer(raw.load(std::memory_order_relaxed));
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Returns the page type attribute
|
/// Returns the page type attribute
|
||||||
[[nodiscard]] PageType Type() const noexcept {
|
[[nodiscard]] PageType Type() const noexcept {
|
||||||
return static_cast<PageType>(std::bit_cast<Data>(data_raw.load(std::memory_order_relaxed)).type);
|
return ExtractType(raw.load(std::memory_order_relaxed));
|
||||||
}
|
|
||||||
|
|
||||||
/// Returns the block identifier.
|
|
||||||
[[nodiscard]] u16 Block() const noexcept {
|
|
||||||
return ExtractBlock(std::bit_cast<Data>(data_raw.load(std::memory_order_relaxed)));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Returns the page pointer and attribute pair, extracted from the same atomic read
|
/// Returns the page pointer and attribute pair, extracted from the same atomic read
|
||||||
[[nodiscard]] std::tuple<uintptr_t, PageType, u16> PointerTypeBlock(bool ignore_marked = false) const noexcept {
|
[[nodiscard]] std::pair<uintptr_t, PageType> PointerType() const noexcept {
|
||||||
const auto non_atomic_raw = std::bit_cast<Data>(data_raw.load(std::memory_order_relaxed));
|
const uintptr_t non_atomic_raw = raw.load(std::memory_order_relaxed);
|
||||||
return {ExtractPointer(non_atomic_raw, ignore_marked), static_cast<PageType>(non_atomic_raw.type), ExtractBlock(non_atomic_raw)};
|
return {ExtractPointer(non_atomic_raw), ExtractType(non_atomic_raw)};
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Write page info atomically
|
/// Returns the raw representation of the page information.
|
||||||
inline void Store(bool marked, PageType type, u16 block, uintptr_t pointer) noexcept {
|
/// Use ExtractPointer and ExtractType to unpack the value.
|
||||||
data_raw.store(std::bit_cast<u64>(Data{marked, type, block, pointer}));
|
[[nodiscard]] uintptr_t Raw() const noexcept {
|
||||||
|
return raw.load(std::memory_order_relaxed);
|
||||||
}
|
}
|
||||||
|
|
||||||
inline void MarkRasterizerCached() noexcept {
|
/// Write a page pointer and type pair atomically
|
||||||
data_raw.fetch_or(0b111);
|
void Store(uintptr_t pointer, PageType type) noexcept {
|
||||||
}
|
raw.store(pointer | uintptr_t(type));
|
||||||
|
|
||||||
inline void MarkDebug(u64 ptr, u16 block) noexcept {
|
|
||||||
Store(true, PageType::DebugMemory, block, ptr);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Unpack a pointer from a page info raw representation
|
/// Unpack a pointer from a page info raw representation
|
||||||
[[nodiscard]] static uintptr_t ExtractPointer(Data raw, bool ignore_marked = false) noexcept {
|
[[nodiscard]] static uintptr_t ExtractPointer(uintptr_t raw) noexcept {
|
||||||
return raw.marked && !ignore_marked ? 0
|
return raw & (~uintptr_t{0} << ATTRIBUTE_BITS);
|
||||||
// shift raw.page's fake sign bit to the actual sign bit, then sign extend
|
|
||||||
: ((s64)(raw.page << (64 - 44))) >> (64 - 44 - 12);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
[[nodiscard]] static u16 ExtractBlock(Data raw) noexcept {
|
/// Unpack a page type from a page info raw representation
|
||||||
return static_cast<u16>(raw.block | (raw.block2 << 9));
|
[[nodiscard]] static PageType ExtractType(uintptr_t raw) noexcept {
|
||||||
|
return static_cast<PageType>(raw & ((uintptr_t{1} << ATTRIBUTE_BITS) - 1));
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
std::atomic<u64> data_raw;
|
std::atomic<uintptr_t> raw;
|
||||||
static_assert(sizeof(Data) == sizeof(std::atomic<u64>));
|
|
||||||
};
|
};
|
||||||
|
|
||||||
PageTable();
|
PageTable();
|
||||||
@@ -129,8 +100,13 @@ struct PageTable {
|
|||||||
|
|
||||||
PageTable(const PageTable&) = delete;
|
PageTable(const PageTable&) = delete;
|
||||||
PageTable& operator=(const PageTable&) = delete;
|
PageTable& operator=(const PageTable&) = delete;
|
||||||
PageTable(PageTable&&) noexcept = delete;
|
|
||||||
PageTable& operator=(PageTable&&) noexcept = delete;
|
PageTable(PageTable&&) noexcept = default;
|
||||||
|
PageTable& operator=(PageTable&&) noexcept = default;
|
||||||
|
|
||||||
|
bool BeginTraversal(TraversalEntry* out_entry, TraversalContext* out_context,
|
||||||
|
Common::ProcessAddress address) const;
|
||||||
|
bool ContinueTraversal(TraversalEntry* out_entry, TraversalContext* context) const;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Resizes the page table to be able to accommodate enough pages within
|
* Resizes the page table to be able to accommodate enough pages within
|
||||||
@@ -145,14 +121,30 @@ struct PageTable {
|
|||||||
return current_address_space_width_in_bits;
|
return current_address_space_width_in_bits;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool GetPhysicalAddress(Common::PhysicalAddress* out_phys_addr,
|
||||||
|
Common::ProcessAddress virt_addr) const {
|
||||||
|
if (virt_addr > (1ULL << this->GetAddressSpaceBits())) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
*out_phys_addr = entries[virt_addr / page_size].addr + GetInteger(virt_addr);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
/// Vector of memory pointers backing each page. An entry can only be non-null if the
|
/// Vector of memory pointers backing each page. An entry can only be non-null if the
|
||||||
/// corresponding attribute element is of type `Memory`.
|
/// corresponding attribute element is of type `Memory`.
|
||||||
SparseLargeVector<PageEntryData> entries;
|
struct PageEntryData {
|
||||||
static_assert(sizeof(PageEntryData) == 8);
|
PageInfo ptr;
|
||||||
|
u64 block;
|
||||||
|
u64 addr;
|
||||||
|
u64 padding;
|
||||||
|
};
|
||||||
|
VirtualBuffer<PageEntryData> entries;
|
||||||
|
static_assert(sizeof(PageEntryData) == 32);
|
||||||
|
|
||||||
u8* fastmem_arena{};
|
u8* fastmem_arena{};
|
||||||
std::size_t current_address_space_width_in_bits{};
|
std::size_t current_address_space_width_in_bits{};
|
||||||
std::size_t current_page_bits{};
|
std::size_t page_size{};
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace Common
|
} // namespace Common
|
||||||
|
|||||||
@@ -8,7 +8,8 @@
|
|||||||
|
|
||||||
#include <iterator>
|
#include <iterator>
|
||||||
#include <cstring>
|
#include <cstring>
|
||||||
#include <memory>
|
|
||||||
|
#include "common/make_unique_for_overwrite.h"
|
||||||
|
|
||||||
namespace Common {
|
namespace Common {
|
||||||
|
|
||||||
@@ -37,9 +38,8 @@ public:
|
|||||||
ScratchBuffer() = default;
|
ScratchBuffer() = default;
|
||||||
|
|
||||||
explicit ScratchBuffer(size_type initial_capacity)
|
explicit ScratchBuffer(size_type initial_capacity)
|
||||||
: last_requested_size{initial_capacity}
|
: last_requested_size{initial_capacity}, buffer_capacity{initial_capacity},
|
||||||
, buffer_capacity{initial_capacity}
|
buffer{Common::make_unique_for_overwrite<T[]>(initial_capacity)} {}
|
||||||
, buffer{std::make_unique_for_overwrite<T[]>(initial_capacity)} {}
|
|
||||||
|
|
||||||
~ScratchBuffer() = default;
|
~ScratchBuffer() = default;
|
||||||
ScratchBuffer(const ScratchBuffer&) = delete;
|
ScratchBuffer(const ScratchBuffer&) = delete;
|
||||||
@@ -64,7 +64,7 @@ public:
|
|||||||
/// The previously held data will remain intact.
|
/// The previously held data will remain intact.
|
||||||
void resize(size_type size) {
|
void resize(size_type size) {
|
||||||
if (size > buffer_capacity) {
|
if (size > buffer_capacity) {
|
||||||
auto new_buffer = std::make_unique_for_overwrite<T[]>(size);
|
auto new_buffer = Common::make_unique_for_overwrite<T[]>(size);
|
||||||
std::memcpy(new_buffer.get(), buffer.get(), buffer_capacity * sizeof(T));
|
std::memcpy(new_buffer.get(), buffer.get(), buffer_capacity * sizeof(T));
|
||||||
buffer = std::move(new_buffer);
|
buffer = std::move(new_buffer);
|
||||||
buffer_capacity = size;
|
buffer_capacity = size;
|
||||||
@@ -77,7 +77,7 @@ public:
|
|||||||
void resize_destructive(size_type size) {
|
void resize_destructive(size_type size) {
|
||||||
if (size > buffer_capacity) {
|
if (size > buffer_capacity) {
|
||||||
buffer_capacity = size;
|
buffer_capacity = size;
|
||||||
buffer = std::make_unique_for_overwrite<T[]>(buffer_capacity);
|
buffer = Common::make_unique_for_overwrite<T[]>(buffer_capacity);
|
||||||
}
|
}
|
||||||
last_requested_size = size;
|
last_requested_size = size;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -178,6 +178,10 @@ bool IsGPUFenceBehaviorAccurate() {
|
|||||||
return values.gpu_fence_behavior.GetValue() == GpuFenceBehavior::Accurate;
|
return values.gpu_fence_behavior.GetValue() == GpuFenceBehavior::Accurate;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool IsGPUFenceBehaviorStrict() {
|
||||||
|
return values.gpu_fence_behavior.GetValue() == GpuFenceBehavior::Strict;
|
||||||
|
}
|
||||||
|
|
||||||
bool IsFastmemEnabled() {
|
bool IsFastmemEnabled() {
|
||||||
if (values.cpu_accuracy.GetValue() == Settings::CpuAccuracy::Debugging)
|
if (values.cpu_accuracy.GetValue() == Settings::CpuAccuracy::Debugging)
|
||||||
return bool(values.cpuopt_fastmem);
|
return bool(values.cpuopt_fastmem);
|
||||||
|
|||||||
@@ -525,7 +525,7 @@ struct Values {
|
|||||||
SwitchableSetting<GpuFenceBehavior, true> gpu_fence_behavior{linkage,
|
SwitchableSetting<GpuFenceBehavior, true> gpu_fence_behavior{linkage,
|
||||||
GpuFenceBehavior::Default,
|
GpuFenceBehavior::Default,
|
||||||
GpuFenceBehavior::Default,
|
GpuFenceBehavior::Default,
|
||||||
GpuFenceBehavior::Accurate,
|
GpuFenceBehavior::Strict,
|
||||||
"gpu_fence_behavior",
|
"gpu_fence_behavior",
|
||||||
Category::RendererAdvanced,
|
Category::RendererAdvanced,
|
||||||
Specialization::Default,
|
Specialization::Default,
|
||||||
@@ -639,10 +639,6 @@ struct Values {
|
|||||||
Specialization::Default,
|
Specialization::Default,
|
||||||
true,
|
true,
|
||||||
true};
|
true};
|
||||||
SwitchableSetting<bool> nce_invalidation_gpu_readback{
|
|
||||||
linkage, false, "nce_invalidation_gpu_readback", Category::RendererHacks};
|
|
||||||
SwitchableSetting<bool> nce_runtime_nro_patch{
|
|
||||||
linkage, false, "nce_runtime_nro_patch", Category::RendererHacks};
|
|
||||||
SwitchableSetting<bool> async_presentation{linkage,
|
SwitchableSetting<bool> async_presentation{linkage,
|
||||||
#ifdef __ANDROID__
|
#ifdef __ANDROID__
|
||||||
false,
|
false,
|
||||||
@@ -659,6 +655,13 @@ struct Values {
|
|||||||
|
|
||||||
SwitchableSetting<bool> rescale_hack{linkage, false, "rescale_hack",
|
SwitchableSetting<bool> rescale_hack{linkage, false, "rescale_hack",
|
||||||
Category::RendererHacks};
|
Category::RendererHacks};
|
||||||
|
SwitchableSetting<bool> enable_gpu_buffer_readback{linkage,
|
||||||
|
false,
|
||||||
|
"enable_gpu_buffer_readback",
|
||||||
|
Category::RendererAdvanced,
|
||||||
|
Specialization::Default,
|
||||||
|
true,
|
||||||
|
true};
|
||||||
|
|
||||||
SwitchableSetting<bool> use_asynchronous_shaders{linkage, false, "use_asynchronous_shaders",
|
SwitchableSetting<bool> use_asynchronous_shaders{linkage, false, "use_asynchronous_shaders",
|
||||||
Category::RendererHacks};
|
Category::RendererHacks};
|
||||||
@@ -976,6 +979,7 @@ bool IsDMALevelSafe();
|
|||||||
bool IsGPUFenceBehaviorDefault();
|
bool IsGPUFenceBehaviorDefault();
|
||||||
bool IsGPUFenceBehaviorBalanced();
|
bool IsGPUFenceBehaviorBalanced();
|
||||||
bool IsGPUFenceBehaviorAccurate();
|
bool IsGPUFenceBehaviorAccurate();
|
||||||
|
bool IsGPUFenceBehaviorStrict();
|
||||||
|
|
||||||
bool IsFastmemEnabled();
|
bool IsFastmemEnabled();
|
||||||
void SetNceEnabled(bool is_64bit);
|
void SetNceEnabled(bool is_64bit);
|
||||||
|
|||||||
@@ -137,7 +137,7 @@ ENUM(VramUsageMode, Conservative, Aggressive);
|
|||||||
ENUM(RendererBackend, OpenGL_GLSL, Vulkan, Null, OpenGL_GLASM, OpenGL_SPIRV);
|
ENUM(RendererBackend, OpenGL_GLSL, Vulkan, Null, OpenGL_GLASM, OpenGL_SPIRV);
|
||||||
ENUM(GpuAccuracy, Low, High);
|
ENUM(GpuAccuracy, Low, High);
|
||||||
ENUM(DmaAccuracy, Default, Unsafe, Safe);
|
ENUM(DmaAccuracy, Default, Unsafe, Safe);
|
||||||
ENUM(GpuFenceBehavior, Default, Immediate, Balanced, Accurate);
|
ENUM(GpuFenceBehavior, Default, Immediate, Balanced, Accurate, Strict);
|
||||||
ENUM(CpuBackend, Dynarmic, Nce);
|
ENUM(CpuBackend, Dynarmic, Nce);
|
||||||
ENUM(CpuAccuracy, Auto, Accurate, Unsafe, Paranoid, Debugging);
|
ENUM(CpuAccuracy, Auto, Accurate, Unsafe, Paranoid, Debugging);
|
||||||
ENUM(CpuClock, Normal, Boost, Overclock)
|
ENUM(CpuClock, Normal, Boost, Overclock)
|
||||||
@@ -150,7 +150,7 @@ ENUM(ScalingFilter, NearestNeighbor, Bilinear, Bicubic, Gaussian, Lanczos, Scale
|
|||||||
ENUM(AntiAliasing, None, Fxaa, Smaa);
|
ENUM(AntiAliasing, None, Fxaa, Smaa);
|
||||||
ENUM(AspectRatio, R16_9, R4_3, R21_9, R16_10, Stretch);
|
ENUM(AspectRatio, R16_9, R4_3, R21_9, R16_10, Stretch);
|
||||||
ENUM(ConsoleMode, Handheld, Docked);
|
ENUM(ConsoleMode, Handheld, Docked);
|
||||||
ENUM(AppletMode, HLE, LLE, Disabled);
|
ENUM(AppletMode, HLE, LLE);
|
||||||
ENUM(SpirvOptimizeMode, Never, OnLoad, Always);
|
ENUM(SpirvOptimizeMode, Never, OnLoad, Always);
|
||||||
ENUM(GpuClock, Normal, Boost, Overclock)
|
ENUM(GpuClock, Normal, Boost, Overclock)
|
||||||
ENUM(GpuUnswizzleSize, VerySmall, Small, Normal, Large, VeryLarge)
|
ENUM(GpuUnswizzleSize, VerySmall, Small, Normal, Large, VeryLarge)
|
||||||
|
|||||||
@@ -1,174 +0,0 @@
|
|||||||
// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
|
|
||||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
|
||||||
|
|
||||||
/* virtual_buffer.cpp */
|
|
||||||
// SPDX-FileCopyrightText: Copyright 2020 yuzu Emulator Project
|
|
||||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
|
||||||
|
|
||||||
#ifdef _WIN32
|
|
||||||
#include <algorithm>
|
|
||||||
#include <windows.h>
|
|
||||||
#include <mutex>
|
|
||||||
#else
|
|
||||||
#include <sys/mman.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include "common/alignment.h"
|
|
||||||
#include "common/assert.h"
|
|
||||||
#include "common/sparse_large_vector.h"
|
|
||||||
|
|
||||||
namespace Common {
|
|
||||||
|
|
||||||
#ifdef _WIN32
|
|
||||||
static std::vector<std::pair<u64, u64>> vector_regions {};
|
|
||||||
static std::mutex vector_regions_mutex {};
|
|
||||||
|
|
||||||
// Workaround for handling non-commited memory accessed by Dynarmic; usually result of an error
|
|
||||||
static LONG WINAPI FakePageFaultHandler(PEXCEPTION_POINTERS info) {
|
|
||||||
DWORD code = info->ExceptionRecord->ExceptionCode;
|
|
||||||
u64 exception_addr = reinterpret_cast<u64>(info->ExceptionRecord->ExceptionInformation[1]);
|
|
||||||
|
|
||||||
if (code != EXCEPTION_ACCESS_VIOLATION || info->ExceptionRecord->ExceptionInformation[0] == 1) {
|
|
||||||
// Not our problem
|
|
||||||
return EXCEPTION_CONTINUE_SEARCH;
|
|
||||||
}
|
|
||||||
|
|
||||||
u64 addr = 0, addr2 = 0;
|
|
||||||
|
|
||||||
{
|
|
||||||
std::lock_guard lock(vector_regions_mutex);
|
|
||||||
for (auto region: vector_regions) {
|
|
||||||
auto addr_shifted = exception_addr >> HostPageBits;
|
|
||||||
if (region.first <= addr_shifted && addr_shifted <= region.second) {
|
|
||||||
addr = addr_shifted;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Page-boundary accesses
|
|
||||||
if (auto addr_ = (exception_addr + 0x40) >> HostPageBits; addr_ != addr_shifted && region.first <= addr_ && addr_ <= region.second) {
|
|
||||||
addr2 = addr_;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (addr != 0 || addr2 != 0) {
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (addr == 0 && addr2 == 0) {
|
|
||||||
// Not our problem
|
|
||||||
return EXCEPTION_CONTINUE_SEARCH;
|
|
||||||
}
|
|
||||||
|
|
||||||
LOG_ERROR(HW_Memory, "Accessing an unallocated region of a SparseLargeVector at {:#x}; this shouldn't happen and is likely a Dynarmic error!", exception_addr);
|
|
||||||
|
|
||||||
// Commit this region
|
|
||||||
if (addr != 0) {
|
|
||||||
if (!CommitVectorPage(addr << HostPageBits, false)) {
|
|
||||||
return EXCEPTION_CONTINUE_SEARCH;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
// Commit next region if needed
|
|
||||||
if (addr2 != 0) {
|
|
||||||
if (!CommitVectorPage(addr2 << HostPageBits, false)) {
|
|
||||||
return EXCEPTION_CONTINUE_SEARCH;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return EXCEPTION_CONTINUE_EXECUTION;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool CommitVectorPage(uintptr_t addr, bool write) noexcept {
|
|
||||||
MEMORY_BASIC_INFORMATION info {};
|
|
||||||
auto res = VirtualQuery(reinterpret_cast<void*>(addr), &info, sizeof(info));
|
|
||||||
if (res == 0) {
|
|
||||||
LOG_CRITICAL(HW_Memory, "Failed to query large buffer region at {:#x} with error {}, will try committing anyway", addr, GetLastError());
|
|
||||||
} else if (info.State == MEM_COMMIT) {
|
|
||||||
DWORD old_protect {};
|
|
||||||
auto perm = write ? PAGE_READWRITE : PAGE_READONLY;
|
|
||||||
if (!VirtualProtect(reinterpret_cast<void*>(addr), HostPageSize, perm, &old_protect)) {
|
|
||||||
LOG_ERROR(HW_Memory, "Failed to change permissions of large buffer region at {:#x}, error {}", addr, GetLastError());
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
} else if (info.State != MEM_RESERVE) {
|
|
||||||
LOG_ERROR(HW_Memory, "Tried to commit an unreserved large buffer region at {:#x} that is not mapped (state {:#x})", addr, info.State);
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
auto perm = write ? PAGE_READWRITE : PAGE_READONLY;
|
|
||||||
void* res2 = VirtualAlloc(reinterpret_cast<LPVOID>(addr), HostPageSize, MEM_COMMIT, perm);
|
|
||||||
if (res2 == nullptr) {
|
|
||||||
LOG_ERROR(HW_Memory, "Failed to commit large buffer region at {:#x}, error {}", addr, GetLastError());
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef MAP_NOCORE
|
|
||||||
#define MAP_NOCORE 0
|
|
||||||
#endif
|
|
||||||
#ifndef MADV_FREE
|
|
||||||
#define MADV_FREE MADV_DONTNEED
|
|
||||||
#endif
|
|
||||||
|
|
||||||
void DecommitVectorPage(uintptr_t base) noexcept {
|
|
||||||
#if defined(_WIN32)
|
|
||||||
VirtualFree(reinterpret_cast<LPVOID>(base), HostPageSize, MEM_DECOMMIT);
|
|
||||||
#elif defined(__linux__)
|
|
||||||
// Linux's MADV_DONTNEED zeros out pages for us
|
|
||||||
madvise(reinterpret_cast<void*>(base), HostPageSize, MADV_DONTNEED);
|
|
||||||
#else
|
|
||||||
madvise(reinterpret_cast<void*>(base), HostPageSize, MADV_FREE);
|
|
||||||
std::memset(reinterpret_cast<void*>(base), 0, HostPageSize);
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
void* AllocateMemoryPages(std::size_t size) noexcept {
|
|
||||||
if (auto page = HostPageSize; size % page != 0) {
|
|
||||||
LOG_WARNING(HW_Memory, "Allocating unaligned large vector with size {:#x}; aligning to {} page size", size, page);
|
|
||||||
size = AlignUp(size, page);
|
|
||||||
}
|
|
||||||
|
|
||||||
#ifdef _WIN32
|
|
||||||
// We will never use this memory entirely so instead of committing it up front let's just reserve it and commit each page individually
|
|
||||||
void* base = VirtualAlloc(nullptr, size, MEM_RESERVE, PAGE_READWRITE);
|
|
||||||
|
|
||||||
if (base != nullptr) {
|
|
||||||
std::lock_guard lock(vector_regions_mutex);
|
|
||||||
vector_regions.emplace_back(reinterpret_cast<u64>(base) >> HostPageBits, (reinterpret_cast<u64>(base) + size) >> HostPageBits);
|
|
||||||
|
|
||||||
static std::once_flag flag;
|
|
||||||
std::call_once(flag, []() { AddVectoredExceptionHandler(1, FakePageFaultHandler); });
|
|
||||||
} else {
|
|
||||||
// Try committing everything instead??
|
|
||||||
LOG_WARNING(HW_Memory, "Failed to reserve large vector region with error {}, trying to commit instead..", GetLastError());
|
|
||||||
base = VirtualAlloc(nullptr, size, MEM_COMMIT, PAGE_READWRITE);
|
|
||||||
}
|
|
||||||
ASSERT_MSG(base, "Failed to reserve {:#x} sized region with error {}", size, GetLastError());
|
|
||||||
#else
|
|
||||||
void* base = mmap(nullptr, size, PROT_READ, MAP_ANON | MAP_PRIVATE | MAP_NOCORE, -1, 0);
|
|
||||||
if (base == MAP_FAILED)
|
|
||||||
base = nullptr;
|
|
||||||
ASSERT_MSG(base, "Failed to allocate {:#x} sized region with error {}", size, strerror(errno));
|
|
||||||
#endif
|
|
||||||
return base;
|
|
||||||
}
|
|
||||||
|
|
||||||
void FreeMemoryPages(void* base, [[maybe_unused]] std::size_t size) noexcept {
|
|
||||||
if (auto page = HostPageSize; size % page != 0) {
|
|
||||||
size = AlignUp(size, page);
|
|
||||||
}
|
|
||||||
if (!base)
|
|
||||||
return;
|
|
||||||
#ifdef _WIN32
|
|
||||||
std::lock_guard lock(vector_regions_mutex);
|
|
||||||
std::erase_if(vector_regions, [base](const auto& r) {return r.first == reinterpret_cast<u64>(base); });
|
|
||||||
ASSERT(VirtualFree(base, 0, MEM_RELEASE));
|
|
||||||
#else
|
|
||||||
ASSERT(munmap(base, size) == 0);
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
} // namespace Common
|
|
||||||
@@ -1,214 +0,0 @@
|
|||||||
// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
|
|
||||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
|
||||||
|
|
||||||
/* virtual_buffer.h */
|
|
||||||
// SPDX-FileCopyrightText: Copyright 2020 yuzu Emulator Project
|
|
||||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
|
||||||
|
|
||||||
#pragma once
|
|
||||||
|
|
||||||
#include <atomic>
|
|
||||||
#include <bit>
|
|
||||||
#include <utility>
|
|
||||||
#include <vector>
|
|
||||||
|
|
||||||
#ifndef _WIN32
|
|
||||||
#include <unistd.h>
|
|
||||||
#include <sys/mman.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include "common/alignment.h"
|
|
||||||
#include "common/assert.h"
|
|
||||||
|
|
||||||
namespace Common {
|
|
||||||
|
|
||||||
#ifdef _WIN32
|
|
||||||
constexpr u64 HostPageSize = 0x1000;
|
|
||||||
constexpr u64 HostPageBits = 12;
|
|
||||||
constexpr u64 HostPageMask = ~(HostPageSize - 1);
|
|
||||||
bool CommitVectorPage(uintptr_t addr, bool write) noexcept;
|
|
||||||
#else
|
|
||||||
inline const u64 HostPageSize = sysconf(_SC_PAGESIZE);
|
|
||||||
inline const u64 HostPageBits = std::countr_zero(HostPageSize);
|
|
||||||
inline const u64 HostPageMask = ~(HostPageSize - 1);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
void* AllocateMemoryPages(std::size_t size) noexcept;
|
|
||||||
void FreeMemoryPages(void* base, std::size_t size) noexcept;
|
|
||||||
void DecommitVectorPage(uintptr_t base) noexcept;
|
|
||||||
|
|
||||||
/// A large page-aligned buffer that has optimized memory usage for zero-writes.
|
|
||||||
template <typename T>
|
|
||||||
// MSVC doesn't regard structs with atomics as trivially copyable
|
|
||||||
// requires std::is_trivially_copyable_v<T>
|
|
||||||
class SparseLargeVector final {
|
|
||||||
public:
|
|
||||||
constexpr SparseLargeVector() = default;
|
|
||||||
|
|
||||||
explicit SparseLargeVector(std::size_t count) noexcept
|
|
||||||
: alloc_size{count * sizeof(T)}
|
|
||||||
{
|
|
||||||
base_ptr = static_cast<T*>(AllocateMemoryPages(alloc_size));
|
|
||||||
|
|
||||||
// each item in vector holds information for 64 pages
|
|
||||||
auto denom = HostPageSize * 64;
|
|
||||||
committed_pages = std::vector<std::atomic<u64>>((alloc_size + denom - 1) / denom);
|
|
||||||
}
|
|
||||||
|
|
||||||
~SparseLargeVector() noexcept {
|
|
||||||
FreeMemoryPages(base_ptr, alloc_size);
|
|
||||||
}
|
|
||||||
|
|
||||||
SparseLargeVector(const SparseLargeVector&) = delete;
|
|
||||||
SparseLargeVector& operator=(const SparseLargeVector&) = delete;
|
|
||||||
SparseLargeVector(SparseLargeVector&& other) = delete;
|
|
||||||
SparseLargeVector& operator=(SparseLargeVector&& other) = delete;
|
|
||||||
|
|
||||||
void ResizeAndClear(std::size_t count) noexcept {
|
|
||||||
if (auto const new_size = count * sizeof(T); new_size != alloc_size) {
|
|
||||||
FreeMemoryPages(base_ptr, alloc_size);
|
|
||||||
alloc_size = new_size;
|
|
||||||
base_ptr = static_cast<T*>(AllocateMemoryPages(alloc_size));
|
|
||||||
|
|
||||||
auto denom = HostPageSize * 64;
|
|
||||||
committed_pages = std::vector<std::atomic<u64>>((alloc_size + denom - 1) / denom);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// Returns a reference to the value of the requested index and allocates memory if needed.
|
|
||||||
T& GetAndFault(std::size_t index) noexcept {
|
|
||||||
if (index > alloc_size / sizeof(T)) {
|
|
||||||
UNREACHABLE_MSG("Out of bounds RW access on SparseLargeVector @ {}", index);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!IsCommittedPage(index) && !CommitPage(index)) {
|
|
||||||
UNREACHABLE_MSG("Cannot access SparseLargeVector index {} with RW permission", index);
|
|
||||||
}
|
|
||||||
return base_ptr[index];
|
|
||||||
}
|
|
||||||
|
|
||||||
/// Returns a reference to the value of the requested index if initialized, or will otherwise return a zero-initialized object.
|
|
||||||
const T& GetOrDefault(std::size_t index) const {
|
|
||||||
#ifdef _WIN32
|
|
||||||
if (!IsCommittedPage(index)) {
|
|
||||||
return *reinterpret_cast<const T*>(&default_val);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
// On non-Windows, OS page table should optimize this by pointing to a zero page if unallocated.
|
|
||||||
return base_ptr[index];
|
|
||||||
}
|
|
||||||
|
|
||||||
void Set(std::size_t index, const T& value) noexcept {
|
|
||||||
if (index > alloc_size / sizeof(T)) {
|
|
||||||
LOG_CRITICAL(Common_Memory, "Out of bounds write on SparseLargeVector @ {}", index);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (IsCommittedPage(index) || CommitPage(index))
|
|
||||||
base_ptr[index] = value;
|
|
||||||
}
|
|
||||||
|
|
||||||
void ZeroRegion(std::size_t start, std::size_t end_) noexcept {
|
|
||||||
u64 base = reinterpret_cast<u64>(&base_ptr[start]);
|
|
||||||
const u64 end = reinterpret_cast<u64>(&base_ptr[end_]);
|
|
||||||
|
|
||||||
const u64 end_page = AlignUp(base, HostPageSize);
|
|
||||||
const u64 first_size = (std::min)(end_page, end) - base;
|
|
||||||
|
|
||||||
if (IsCommittedPage(start)) {
|
|
||||||
std::memset(reinterpret_cast<void*>(base), 0, first_size);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (end <= end_page)
|
|
||||||
return;
|
|
||||||
|
|
||||||
base = end_page;
|
|
||||||
|
|
||||||
for (u64 page = base; page < end; page += HostPageSize) {
|
|
||||||
auto index = (page - reinterpret_cast<u64>(base_ptr)) / sizeof(T);
|
|
||||||
if (!IsCommittedPage(index)) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (end - page >= HostPageSize) {
|
|
||||||
DecommitPage(index);
|
|
||||||
} else {
|
|
||||||
std::memset(reinterpret_cast<void*>(page), 0, end - page);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
constexpr void CommitRegion(size_t index, size_t end_) {
|
|
||||||
const u64 base = static_cast<u64>(index) * sizeof(T);
|
|
||||||
const u64 end = static_cast<u64>(end_) * sizeof(T);
|
|
||||||
|
|
||||||
for (u64 page = AlignDown(base, HostPageSize); page < end; page += HostPageSize) {
|
|
||||||
if (!IsCommittedPage(page / sizeof(T))) {
|
|
||||||
CommitPage(page / sizeof(T));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
constexpr T& GetUnchecked(size_t index) {
|
|
||||||
return base_ptr[index];
|
|
||||||
}
|
|
||||||
|
|
||||||
[[nodiscard]] constexpr const T& operator[](std::size_t index) const noexcept {
|
|
||||||
return GetOrDefault(index);
|
|
||||||
}
|
|
||||||
|
|
||||||
[[nodiscard]] constexpr const T* data() const noexcept {
|
|
||||||
return base_ptr;
|
|
||||||
}
|
|
||||||
|
|
||||||
[[nodiscard]] constexpr std::size_t size() const noexcept {
|
|
||||||
return alloc_size / sizeof(T);
|
|
||||||
}
|
|
||||||
|
|
||||||
private:
|
|
||||||
[[nodiscard]] constexpr bool IsCommittedPage(std::size_t index) const noexcept {
|
|
||||||
if (index > alloc_size / sizeof(T)) {
|
|
||||||
LOG_CRITICAL(Common_Memory, "Out of bounds access on large vector @ {}", index);
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
auto page = (index * sizeof(T)) >> HostPageBits;
|
|
||||||
auto val = committed_pages[page >> 6].load(std::memory_order_acquire);
|
|
||||||
return (val >> (page & 63)) & 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
constexpr bool CommitPage(std::size_t index) noexcept {
|
|
||||||
auto page_index = (index * sizeof(T)) >> HostPageBits;
|
|
||||||
auto page = reinterpret_cast<uintptr_t>(base_ptr + index) & HostPageMask;
|
|
||||||
#if defined(_WIN32)
|
|
||||||
if (!CommitVectorPage(page, true)) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
#else
|
|
||||||
if (mprotect(reinterpret_cast<void*>(page), HostPageSize, PROT_READ | PROT_WRITE) != 0) {
|
|
||||||
LOG_ERROR(Common_Memory, "Failed to commit large buffer region at index {}, error {}", index, strerror(errno));
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
committed_pages[page_index >> 6].fetch_or(1ULL << (page_index & 63), std::memory_order_release);
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
constexpr void DecommitPage(std::size_t index) noexcept {
|
|
||||||
auto page_index = (index * sizeof(T)) >> HostPageBits;
|
|
||||||
auto page = reinterpret_cast<uintptr_t>(base_ptr + index) & HostPageMask;
|
|
||||||
|
|
||||||
committed_pages[page_index >> 6].fetch_and(~(1ULL << (page_index & 63)), std::memory_order_release);
|
|
||||||
DecommitVectorPage(page);
|
|
||||||
}
|
|
||||||
|
|
||||||
std::size_t alloc_size{};
|
|
||||||
T* base_ptr{};
|
|
||||||
|
|
||||||
std::vector<std::atomic<u64>> committed_pages{};
|
|
||||||
#ifdef _WIN32
|
|
||||||
const std::array<u8, sizeof(T)> default_val{};
|
|
||||||
#endif
|
|
||||||
};
|
|
||||||
|
|
||||||
} // namespace Common
|
|
||||||
@@ -0,0 +1,44 @@
|
|||||||
|
// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
|
||||||
|
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
|
||||||
|
// SPDX-FileCopyrightText: Copyright 2020 yuzu Emulator Project
|
||||||
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||||
|
|
||||||
|
#ifdef _WIN32
|
||||||
|
#include <windows.h>
|
||||||
|
#else
|
||||||
|
#include <sys/mman.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include "common/assert.h"
|
||||||
|
#include "common/virtual_buffer.h"
|
||||||
|
|
||||||
|
namespace Common {
|
||||||
|
|
||||||
|
void* AllocateMemoryPages(std::size_t size) noexcept {
|
||||||
|
#ifdef _WIN32
|
||||||
|
void* base = VirtualAlloc(nullptr, size, MEM_COMMIT | MEM_RESERVE, PAGE_READWRITE);
|
||||||
|
if (base == nullptr) {
|
||||||
|
// Probably failing to reserve is less likely than failing to commit
|
||||||
|
base = VirtualAlloc(nullptr, size, MEM_COMMIT, PAGE_READWRITE);
|
||||||
|
}
|
||||||
|
#else
|
||||||
|
void* base = mmap(nullptr, size, PROT_READ | PROT_WRITE, MAP_ANON | MAP_PRIVATE, -1, 0);
|
||||||
|
if (base == MAP_FAILED)
|
||||||
|
base = nullptr;
|
||||||
|
#endif
|
||||||
|
ASSERT(base);
|
||||||
|
return base;
|
||||||
|
}
|
||||||
|
|
||||||
|
void FreeMemoryPages(void* base, [[maybe_unused]] std::size_t size) noexcept {
|
||||||
|
if (!base)
|
||||||
|
return;
|
||||||
|
#ifdef _WIN32
|
||||||
|
ASSERT(VirtualFree(base, 0, MEM_RELEASE));
|
||||||
|
#else
|
||||||
|
ASSERT(munmap(base, size) == 0);
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
} // namespace Common
|
||||||
@@ -0,0 +1,84 @@
|
|||||||
|
// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
|
||||||
|
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
|
||||||
|
// SPDX-FileCopyrightText: Copyright 2020 yuzu Emulator Project
|
||||||
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include <utility>
|
||||||
|
|
||||||
|
namespace Common {
|
||||||
|
|
||||||
|
void* AllocateMemoryPages(std::size_t size) noexcept;
|
||||||
|
void FreeMemoryPages(void* base, std::size_t size) noexcept;
|
||||||
|
|
||||||
|
template <typename T>
|
||||||
|
class VirtualBuffer final {
|
||||||
|
public:
|
||||||
|
// TODO: Uncomment this and change Common::PageTable::PageInfo to be trivially constructible
|
||||||
|
// using std::atomic_ref once libc++ has support for it
|
||||||
|
// static_assert(
|
||||||
|
// std::is_trivially_constructible_v<T>,
|
||||||
|
// "T must be trivially constructible, as non-trivial constructors will not be executed "
|
||||||
|
// "with the current allocator");
|
||||||
|
|
||||||
|
constexpr VirtualBuffer() = default;
|
||||||
|
explicit VirtualBuffer(std::size_t count) noexcept
|
||||||
|
: alloc_size{count * sizeof(T)}
|
||||||
|
{
|
||||||
|
base_ptr = reinterpret_cast<T*>(AllocateMemoryPages(alloc_size));
|
||||||
|
}
|
||||||
|
|
||||||
|
~VirtualBuffer() noexcept {
|
||||||
|
FreeMemoryPages(base_ptr, alloc_size);
|
||||||
|
}
|
||||||
|
|
||||||
|
VirtualBuffer(const VirtualBuffer&) = delete;
|
||||||
|
VirtualBuffer& operator=(const VirtualBuffer&) = delete;
|
||||||
|
|
||||||
|
VirtualBuffer(VirtualBuffer&& other) noexcept
|
||||||
|
: alloc_size{std::exchange(other.alloc_size, 0)}
|
||||||
|
, base_ptr{std::exchange(other.base_ptr, nullptr)}
|
||||||
|
{}
|
||||||
|
|
||||||
|
VirtualBuffer& operator=(VirtualBuffer&& other) noexcept {
|
||||||
|
alloc_size = std::exchange(other.alloc_size, 0);
|
||||||
|
base_ptr = std::exchange(other.base_ptr, nullptr);
|
||||||
|
return *this;
|
||||||
|
}
|
||||||
|
|
||||||
|
void resize(std::size_t count) noexcept {
|
||||||
|
if (auto const new_size = count * sizeof(T); new_size != alloc_size) {
|
||||||
|
FreeMemoryPages(base_ptr, alloc_size);
|
||||||
|
alloc_size = new_size;
|
||||||
|
base_ptr = reinterpret_cast<T*>(AllocateMemoryPages(alloc_size));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
[[nodiscard]] constexpr const T& operator[](std::size_t index) const noexcept {
|
||||||
|
return base_ptr[index];
|
||||||
|
}
|
||||||
|
|
||||||
|
[[nodiscard]] constexpr T& operator[](std::size_t index) noexcept {
|
||||||
|
return base_ptr[index];
|
||||||
|
}
|
||||||
|
|
||||||
|
[[nodiscard]] constexpr T* data() noexcept {
|
||||||
|
return base_ptr;
|
||||||
|
}
|
||||||
|
|
||||||
|
[[nodiscard]] constexpr const T* data() const noexcept {
|
||||||
|
return base_ptr;
|
||||||
|
}
|
||||||
|
|
||||||
|
[[nodiscard]] constexpr std::size_t size() const noexcept {
|
||||||
|
return alloc_size / sizeof(T);
|
||||||
|
}
|
||||||
|
|
||||||
|
private:
|
||||||
|
std::size_t alloc_size{};
|
||||||
|
T* base_ptr{};
|
||||||
|
};
|
||||||
|
|
||||||
|
} // namespace Common
|
||||||
@@ -1,46 +0,0 @@
|
|||||||
// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
|
|
||||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
|
||||||
|
|
||||||
#include <cstring>
|
|
||||||
|
|
||||||
#include "common/zbic_compression.h"
|
|
||||||
|
|
||||||
#define ZSTD_ZBIC_SUPPORT 1
|
|
||||||
#define ZSTDLIB_VISIBLE static
|
|
||||||
#define ZSTDLIB_HIDDEN static
|
|
||||||
#define ZSTDERRORLIB_VISIBLE static
|
|
||||||
#define ZSTDERRORLIB_HIDDEN static
|
|
||||||
#undef ZSTD_MULTITHREAD
|
|
||||||
|
|
||||||
#if defined(__ANDROID__)
|
|
||||||
#undef _GNU_SOURCE
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include "zstd.h"
|
|
||||||
#define g_ZSTD_threading_useless_symbol g_ZSTD_zbic_threading_useless_symbol
|
|
||||||
#include "zstd.c"
|
|
||||||
#undef g_ZSTD_threading_useless_symbol
|
|
||||||
|
|
||||||
namespace Common::Compression {
|
|
||||||
|
|
||||||
bool IsZBIC(std::span<const u8> src) {
|
|
||||||
if (src.size() < sizeof(u32)) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
u32 magic = 0;
|
|
||||||
std::memcpy(&magic, src.data(), sizeof(u32));
|
|
||||||
return magic == ZSTD_MAGICNUMBER; // 0x4349425A ("ZBIC")
|
|
||||||
}
|
|
||||||
|
|
||||||
int DecompressDataZBIC(std::span<u8> dst, std::span<const u8> src) {
|
|
||||||
if (dst.empty() || src.empty()) {
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
const size_t res = ZSTD_decompress(dst.data(), dst.size(), src.data(), src.size());
|
|
||||||
if (ZSTD_isError(res)) {
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
return static_cast<int>(res);
|
|
||||||
}
|
|
||||||
|
|
||||||
} // namespace Common::Compression
|
|
||||||
@@ -1,15 +0,0 @@
|
|||||||
// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
|
|
||||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
|
||||||
|
|
||||||
#pragma once
|
|
||||||
|
|
||||||
#include <span>
|
|
||||||
#include "common/common_types.h"
|
|
||||||
|
|
||||||
namespace Common::Compression {
|
|
||||||
|
|
||||||
[[nodiscard]] bool IsZBIC(std::span<const u8> src);
|
|
||||||
|
|
||||||
[[nodiscard]] int DecompressDataZBIC(std::span<u8> dst, std::span<const u8> src);
|
|
||||||
|
|
||||||
} // namespace Common::Compression
|
|
||||||
@@ -23,8 +23,6 @@ add_library(core STATIC
|
|||||||
core_timing.h
|
core_timing.h
|
||||||
cpu_manager.cpp
|
cpu_manager.cpp
|
||||||
cpu_manager.h
|
cpu_manager.h
|
||||||
launch_params.cpp
|
|
||||||
launch_params.h
|
|
||||||
crypto/aes_util.cpp
|
crypto/aes_util.cpp
|
||||||
crypto/aes_util.h
|
crypto/aes_util.h
|
||||||
crypto/ctr_encryption_layer.cpp
|
crypto/ctr_encryption_layer.cpp
|
||||||
@@ -1205,9 +1203,6 @@ endif()
|
|||||||
|
|
||||||
target_include_directories(core PRIVATE ${OPUS_INCLUDE_DIRS})
|
target_include_directories(core PRIVATE ${OPUS_INCLUDE_DIRS})
|
||||||
target_link_libraries(core PUBLIC common PRIVATE audio_core hid_core network video_core nx_tzdb tz)
|
target_link_libraries(core PUBLIC common PRIVATE audio_core hid_core network video_core nx_tzdb tz)
|
||||||
if (MSVC)
|
|
||||||
target_link_libraries(core PRIVATE getopt)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if (BOOST_NO_HEADERS)
|
if (BOOST_NO_HEADERS)
|
||||||
target_link_libraries(core PUBLIC Boost::container Boost::heap Boost::asio Boost::process Boost::crc)
|
target_link_libraries(core PUBLIC Boost::container Boost::heap Boost::asio Boost::process Boost::crc)
|
||||||
|
|||||||
@@ -156,12 +156,12 @@ void ArmDynarmic32::MakeJit(Common::PageTable* page_table) {
|
|||||||
if (page_table) {
|
if (page_table) {
|
||||||
constexpr size_t PageBits = 12;
|
constexpr size_t PageBits = 12;
|
||||||
constexpr size_t NumPageTableEntries = 1 << (32 - PageBits);
|
constexpr size_t NumPageTableEntries = 1 << (32 - PageBits);
|
||||||
|
constexpr size_t PageLog2Stride = 5;
|
||||||
|
static_assert(1 << PageLog2Stride == sizeof(Common::PageTable::PageEntryData));
|
||||||
|
|
||||||
// Dynarmic will not write to the page table, const_cast is safe here
|
config.page_table = reinterpret_cast<std::array<std::uint8_t*, NumPageTableEntries>*>(page_table->entries.data());
|
||||||
config.page_table = reinterpret_cast<std::array<std::uint8_t*, NumPageTableEntries>*>(
|
config.page_table_pointer_mask_bits = Common::PageTable::ATTRIBUTE_BITS;
|
||||||
const_cast<Common::PageTable::PageEntryData*>(page_table->entries.data()));
|
config.page_table_log2_stride = PageLog2Stride;
|
||||||
config.page_table_pointer_mask = Common::PageTable::ATTRIBUTE_MASK;
|
|
||||||
config.page_table_marked_bit = uint8_t(0);
|
|
||||||
config.absolute_offset_page_table = true;
|
config.absolute_offset_page_table = true;
|
||||||
config.detect_misaligned_access_via_page_table = 16 | 32 | 64 | 128;
|
config.detect_misaligned_access_via_page_table = 16 | 32 | 64 | 128;
|
||||||
config.only_detect_misalignment_via_page_table_on_page_boundary = true;
|
config.only_detect_misalignment_via_page_table_on_page_boundary = true;
|
||||||
@@ -172,13 +172,6 @@ void ArmDynarmic32::MakeJit(Common::PageTable* page_table) {
|
|||||||
|
|
||||||
config.fastmem_exclusive_access = config.fastmem_pointer != std::nullopt;
|
config.fastmem_exclusive_access = config.fastmem_pointer != std::nullopt;
|
||||||
config.recompile_on_exclusive_fastmem_failure = true;
|
config.recompile_on_exclusive_fastmem_failure = true;
|
||||||
|
|
||||||
if (reinterpret_cast<u64>(m_system.DeviceMemory().buffer.BackingBasePointer() +
|
|
||||||
Kernel::Board::Nintendo::Nx::KSystemControl::Init::GetIntendedMemorySize()) < (1ULL << 39)) {
|
|
||||||
// Systems like FreeBSD allocate memory really low by default, and since we pack our page table entries,
|
|
||||||
// we have to manually sign extend when our actual pointer is negative.
|
|
||||||
config.page_table_sign_extension = std::uint8_t(Common::PageTable::SIGN_BIT);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Multi-process state
|
// Multi-process state
|
||||||
@@ -411,7 +404,6 @@ void ArmDynarmic32::SignalInterrupt(Kernel::KThread* thread) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void ArmDynarmic32::ClearInstructionCache() {
|
void ArmDynarmic32::ClearInstructionCache() {
|
||||||
m_cb->last_code_addr = u64(-1);
|
|
||||||
m_jit->ClearCache();
|
m_jit->ClearCache();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -197,12 +197,13 @@ void ArmDynarmic64::MakeJit(Common::PageTable* page_table, std::size_t address_s
|
|||||||
|
|
||||||
// Memory
|
// Memory
|
||||||
if (page_table) {
|
if (page_table) {
|
||||||
// Dynarmic will not write to the page table, const_cast is safe here
|
constexpr size_t PageLog2Stride = 5;
|
||||||
config.page_table = reinterpret_cast<void**>(
|
static_assert(1 << PageLog2Stride == sizeof(Common::PageTable::PageEntryData));
|
||||||
const_cast<Common::PageTable::PageEntryData*>(page_table->entries.data()));
|
|
||||||
|
config.page_table = reinterpret_cast<void**>(page_table->entries.data());
|
||||||
config.page_table_address_space_bits = std::uint32_t(address_space_bits);
|
config.page_table_address_space_bits = std::uint32_t(address_space_bits);
|
||||||
config.page_table_pointer_mask = Common::PageTable::ATTRIBUTE_MASK;
|
config.page_table_pointer_mask_bits = Common::PageTable::ATTRIBUTE_BITS;
|
||||||
config.page_table_marked_bit = uint8_t(0);
|
config.page_table_log2_stride = PageLog2Stride;
|
||||||
config.silently_mirror_page_table = false;
|
config.silently_mirror_page_table = false;
|
||||||
config.absolute_offset_page_table = true;
|
config.absolute_offset_page_table = true;
|
||||||
config.detect_misaligned_access_via_page_table = 16 | 32 | 64 | 128;
|
config.detect_misaligned_access_via_page_table = 16 | 32 | 64 | 128;
|
||||||
@@ -216,13 +217,6 @@ void ArmDynarmic64::MakeJit(Common::PageTable* page_table, std::size_t address_s
|
|||||||
|
|
||||||
config.fastmem_exclusive_access = config.fastmem_pointer != std::nullopt;
|
config.fastmem_exclusive_access = config.fastmem_pointer != std::nullopt;
|
||||||
config.recompile_on_exclusive_fastmem_failure = true;
|
config.recompile_on_exclusive_fastmem_failure = true;
|
||||||
|
|
||||||
if (reinterpret_cast<u64>(m_system.DeviceMemory().buffer.BackingBasePointer() +
|
|
||||||
Kernel::Board::Nintendo::Nx::KSystemControl::Init::GetIntendedMemorySize()) < (1ULL << 39)) {
|
|
||||||
// Systems like FreeBSD allocate memory really low by default, and since we pack our page table entries,
|
|
||||||
// we have to manually sign extend when our actual pointer is negative.
|
|
||||||
config.page_table_sign_extension = std::uint8_t(Common::PageTable::SIGN_BIT);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Multi-process state
|
// Multi-process state
|
||||||
@@ -439,7 +433,6 @@ void ArmDynarmic64::SignalInterrupt(Kernel::KThread* thread) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void ArmDynarmic64::ClearInstructionCache() {
|
void ArmDynarmic64::ClearInstructionCache() {
|
||||||
m_cb->last_code_addr = u64(-1);
|
|
||||||
m_jit->ClearCache();
|
m_jit->ClearCache();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,3 @@
|
|||||||
// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
|
|
||||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
|
||||||
|
|
||||||
// SPDX-FileCopyrightText: Copyright 2020 yuzu Emulator Project
|
// SPDX-FileCopyrightText: Copyright 2020 yuzu Emulator Project
|
||||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||||
|
|
||||||
@@ -29,11 +26,8 @@ public:
|
|||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
Common::PhysicalAddress GetPhysicalAddr(const T* ptr) const {
|
Common::PhysicalAddress GetPhysicalAddr(const T* ptr) const {
|
||||||
return GetPhysicalAddr(reinterpret_cast<uintptr_t>(ptr));
|
return (reinterpret_cast<uintptr_t>(ptr) -
|
||||||
}
|
reinterpret_cast<uintptr_t>(buffer.BackingBasePointer())) +
|
||||||
|
|
||||||
Common::PhysicalAddress GetPhysicalAddr(uintptr_t ptr) const {
|
|
||||||
return (ptr - reinterpret_cast<uintptr_t>(buffer.BackingBasePointer())) +
|
|
||||||
DramMemoryMap::Base;
|
DramMemoryMap::Base;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -18,7 +18,7 @@
|
|||||||
#include "common/common_types.h"
|
#include "common/common_types.h"
|
||||||
#include "common/range_mutex.h"
|
#include "common/range_mutex.h"
|
||||||
#include "common/scratch_buffer.h"
|
#include "common/scratch_buffer.h"
|
||||||
#include "common/sparse_large_vector.h"
|
#include "common/virtual_buffer.h"
|
||||||
|
|
||||||
namespace Core {
|
namespace Core {
|
||||||
|
|
||||||
@@ -178,8 +178,8 @@ private:
|
|||||||
u32 continuity_tracker;
|
u32 continuity_tracker;
|
||||||
u32 compressed_physical_ptr;
|
u32 compressed_physical_ptr;
|
||||||
};
|
};
|
||||||
Common::SparseLargeVector<u32> compressed_device_addr;
|
Common::VirtualBuffer<u32> compressed_device_addr;
|
||||||
Common::SparseLargeVector<TrackedEntry> tracked_entries;
|
Common::VirtualBuffer<TrackedEntry> tracked_entries;
|
||||||
|
|
||||||
// Process memory interfaces
|
// Process memory interfaces
|
||||||
|
|
||||||
@@ -200,8 +200,8 @@ private:
|
|||||||
return std::make_pair(asid, address);
|
return std::make_pair(asid, address);
|
||||||
}
|
}
|
||||||
|
|
||||||
constexpr void InsertCPUBacking(size_t page_index, VAddr address, Asid asid) {
|
void InsertCPUBacking(size_t page_index, VAddr address, Asid asid) {
|
||||||
tracked_entries.GetUnchecked(page_index).cpu_backing_address = address | (asid.id << asid_start_bit);
|
tracked_entries[page_index].cpu_backing_address = address | (asid.id << asid_start_bit);
|
||||||
}
|
}
|
||||||
|
|
||||||
std::array<TranslationEntry, 4> t_slot{};
|
std::array<TranslationEntry, 4> t_slot{};
|
||||||
|
|||||||
@@ -177,6 +177,17 @@ DeviceMemoryManager<Traits>::DeviceMemoryManager(const DeviceMemory& device_memo
|
|||||||
{
|
{
|
||||||
impl = std::make_unique<DeviceMemoryManagerAllocator<Traits>>();
|
impl = std::make_unique<DeviceMemoryManagerAllocator<Traits>>();
|
||||||
cached_pages = std::make_unique<CachedPages>();
|
cached_pages = std::make_unique<CachedPages>();
|
||||||
|
|
||||||
|
const size_t total_virtual = device_as_size >> Memory::YUZU_PAGEBITS;
|
||||||
|
for (size_t i = 0; i < total_virtual; i++) {
|
||||||
|
tracked_entries[i].compressed_physical_ptr = 0;
|
||||||
|
tracked_entries[i].continuity_tracker = 1;
|
||||||
|
tracked_entries[i].cpu_backing_address = 0;
|
||||||
|
}
|
||||||
|
const size_t total_phys = 1ULL << ((Settings::values.memory_layout_mode.GetValue() == Settings::MemoryLayout::Memory_4Gb ? physical_min_bits : physical_max_bits) - Memory::YUZU_PAGEBITS);
|
||||||
|
for (size_t i = 0; i < total_phys; i++) {
|
||||||
|
compressed_device_addr[i] = 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename Traits>
|
template <typename Traits>
|
||||||
@@ -209,28 +220,26 @@ void DeviceMemoryManager<Traits>::Map(DAddr address, VAddr virtual_address, size
|
|||||||
size_t start_page_d = address >> Memory::YUZU_PAGEBITS;
|
size_t start_page_d = address >> Memory::YUZU_PAGEBITS;
|
||||||
size_t num_pages = Common::AlignUp(size, Memory::YUZU_PAGESIZE) >> Memory::YUZU_PAGEBITS;
|
size_t num_pages = Common::AlignUp(size, Memory::YUZU_PAGESIZE) >> Memory::YUZU_PAGEBITS;
|
||||||
std::scoped_lock lk(mapping_guard);
|
std::scoped_lock lk(mapping_guard);
|
||||||
|
|
||||||
tracked_entries.CommitRegion(start_page_d, start_page_d + num_pages);
|
|
||||||
for (size_t i = 0; i < num_pages; i++) {
|
for (size_t i = 0; i < num_pages; i++) {
|
||||||
const VAddr new_vaddress = virtual_address + i * Memory::YUZU_PAGESIZE;
|
const VAddr new_vaddress = virtual_address + i * Memory::YUZU_PAGESIZE;
|
||||||
auto* ptr = process_memory->GetPointerSilent(Common::ProcessAddress(new_vaddress));
|
auto* ptr = process_memory->GetPointerSilent(Common::ProcessAddress(new_vaddress));
|
||||||
if (ptr == nullptr) [[unlikely]] {
|
if (ptr == nullptr) [[unlikely]] {
|
||||||
tracked_entries.GetUnchecked(start_page_d + i).compressed_physical_ptr = 0;
|
tracked_entries[start_page_d + i].compressed_physical_ptr = 0;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
auto phys_addr = static_cast<u32>(GetRawPhysicalAddr(ptr) >> Memory::YUZU_PAGEBITS) + 1U;
|
auto phys_addr = static_cast<u32>(GetRawPhysicalAddr(ptr) >> Memory::YUZU_PAGEBITS) + 1U;
|
||||||
tracked_entries.GetUnchecked(start_page_d + i).compressed_physical_ptr = phys_addr;
|
tracked_entries[start_page_d + i].compressed_physical_ptr = phys_addr;
|
||||||
InsertCPUBacking(start_page_d + i, new_vaddress, asid);
|
InsertCPUBacking(start_page_d + i, new_vaddress, asid);
|
||||||
const u32 base_dev = compressed_device_addr[phys_addr - 1U];
|
const u32 base_dev = compressed_device_addr[phys_addr - 1U];
|
||||||
const u32 new_dev = static_cast<u32>(start_page_d + i);
|
const u32 new_dev = static_cast<u32>(start_page_d + i);
|
||||||
if (base_dev == 0) [[likely]] {
|
if (base_dev == 0) [[likely]] {
|
||||||
compressed_device_addr.GetAndFault(phys_addr - 1U) = new_dev;
|
compressed_device_addr[phys_addr - 1U] = new_dev;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
u32 start_id = base_dev & MULTI_MASK;
|
u32 start_id = base_dev & MULTI_MASK;
|
||||||
if ((base_dev >> MULTI_FLAG_BITS) == 0) {
|
if ((base_dev >> MULTI_FLAG_BITS) == 0) {
|
||||||
start_id = impl->multi_dev_address.Register(base_dev);
|
start_id = impl->multi_dev_address.Register(base_dev);
|
||||||
compressed_device_addr.GetAndFault(phys_addr - 1U) = MULTI_FLAG | start_id;
|
compressed_device_addr[phys_addr - 1U] = MULTI_FLAG | start_id;
|
||||||
}
|
}
|
||||||
impl->multi_dev_address.Register(new_dev, start_id);
|
impl->multi_dev_address.Register(new_dev, start_id);
|
||||||
}
|
}
|
||||||
@@ -246,26 +255,24 @@ void DeviceMemoryManager<Traits>::Unmap(DAddr address, size_t size) {
|
|||||||
size_t num_pages = Common::AlignUp(size, Memory::YUZU_PAGESIZE) >> Memory::YUZU_PAGEBITS;
|
size_t num_pages = Common::AlignUp(size, Memory::YUZU_PAGESIZE) >> Memory::YUZU_PAGEBITS;
|
||||||
device_inter->InvalidateRegion(address, size);
|
device_inter->InvalidateRegion(address, size);
|
||||||
std::scoped_lock lk(mapping_guard);
|
std::scoped_lock lk(mapping_guard);
|
||||||
|
|
||||||
tracked_entries.CommitRegion(start_page_d, start_page_d + num_pages); // should already be committed, but just in case
|
|
||||||
for (size_t i = 0; i < num_pages; i++) {
|
for (size_t i = 0; i < num_pages; i++) {
|
||||||
auto& entry = tracked_entries.GetUnchecked(start_page_d + i);
|
auto phys_addr = tracked_entries[start_page_d + i].compressed_physical_ptr;
|
||||||
auto phys_addr = entry.compressed_physical_ptr;
|
tracked_entries[start_page_d + i].compressed_physical_ptr = 0;
|
||||||
entry.compressed_physical_ptr = 0;
|
tracked_entries[start_page_d + i].cpu_backing_address = 0;
|
||||||
entry.cpu_backing_address = 0;
|
|
||||||
if (phys_addr != 0) [[likely]] {
|
if (phys_addr != 0) [[likely]] {
|
||||||
u32& base_dev = compressed_device_addr.GetAndFault(phys_addr - 1U);
|
const u32 base_dev = compressed_device_addr[phys_addr - 1U];
|
||||||
if ((base_dev >> MULTI_FLAG_BITS) == 0) [[likely]] {
|
if ((base_dev >> MULTI_FLAG_BITS) == 0) [[likely]] {
|
||||||
base_dev = 0;
|
compressed_device_addr[phys_addr - 1] = 0;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
const auto [more_entries, new_start] = impl->multi_dev_address.Unregister(
|
const auto [more_entries, new_start] = impl->multi_dev_address.Unregister(
|
||||||
static_cast<u32>(start_page_d + i), base_dev & MULTI_MASK);
|
static_cast<u32>(start_page_d + i), base_dev & MULTI_MASK);
|
||||||
if (!more_entries) {
|
if (!more_entries) {
|
||||||
base_dev = impl->multi_dev_address.ReleaseEntry(new_start);
|
compressed_device_addr[phys_addr - 1] =
|
||||||
|
impl->multi_dev_address.ReleaseEntry(new_start);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
base_dev = new_start | MULTI_FLAG;
|
compressed_device_addr[phys_addr - 1] = new_start | MULTI_FLAG;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
t_slot = {};
|
t_slot = {};
|
||||||
@@ -278,8 +285,6 @@ void DeviceMemoryManager<Traits>::TrackContinuityImpl(DAddr address, VAddr virtu
|
|||||||
size_t num_pages = Common::AlignUp(size, Memory::YUZU_PAGESIZE) >> Memory::YUZU_PAGEBITS;
|
size_t num_pages = Common::AlignUp(size, Memory::YUZU_PAGESIZE) >> Memory::YUZU_PAGEBITS;
|
||||||
uintptr_t last_ptr = 0;
|
uintptr_t last_ptr = 0;
|
||||||
size_t page_count = 1;
|
size_t page_count = 1;
|
||||||
|
|
||||||
tracked_entries.CommitRegion(start_page_d, start_page_d + num_pages);
|
|
||||||
for (size_t i = num_pages; i > 0; i--) {
|
for (size_t i = num_pages; i > 0; i--) {
|
||||||
size_t index = i - 1;
|
size_t index = i - 1;
|
||||||
const VAddr new_vaddress = virtual_address + index * Memory::YUZU_PAGESIZE;
|
const VAddr new_vaddress = virtual_address + index * Memory::YUZU_PAGESIZE;
|
||||||
@@ -291,14 +296,14 @@ void DeviceMemoryManager<Traits>::TrackContinuityImpl(DAddr address, VAddr virtu
|
|||||||
page_count = 1;
|
page_count = 1;
|
||||||
}
|
}
|
||||||
last_ptr = new_ptr;
|
last_ptr = new_ptr;
|
||||||
tracked_entries.GetUnchecked(start_page_d + index).continuity_tracker = static_cast<u32>(page_count) - 1;
|
tracked_entries[start_page_d + index].continuity_tracker = static_cast<u32>(page_count);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
template <typename Traits>
|
template <typename Traits>
|
||||||
u8* DeviceMemoryManager<Traits>::GetSpan(const DAddr src_addr, const std::size_t size) {
|
u8* DeviceMemoryManager<Traits>::GetSpan(const DAddr src_addr, const std::size_t size) {
|
||||||
size_t page_index = src_addr >> page_bits;
|
size_t page_index = src_addr >> page_bits;
|
||||||
size_t subbits = src_addr & page_mask;
|
size_t subbits = src_addr & page_mask;
|
||||||
if ((static_cast<size_t>(tracked_entries[page_index].continuity_tracker+1) << page_bits) >= size + subbits) {
|
if ((static_cast<size_t>(tracked_entries[page_index].continuity_tracker) << page_bits) >= size + subbits) {
|
||||||
return GetPointer<u8>(src_addr);
|
return GetPointer<u8>(src_addr);
|
||||||
}
|
}
|
||||||
return nullptr;
|
return nullptr;
|
||||||
@@ -308,7 +313,7 @@ template <typename Traits>
|
|||||||
const u8* DeviceMemoryManager<Traits>::GetSpan(const DAddr src_addr, const std::size_t size) const {
|
const u8* DeviceMemoryManager<Traits>::GetSpan(const DAddr src_addr, const std::size_t size) const {
|
||||||
size_t page_index = src_addr >> page_bits;
|
size_t page_index = src_addr >> page_bits;
|
||||||
size_t subbits = src_addr & page_mask;
|
size_t subbits = src_addr & page_mask;
|
||||||
if ((static_cast<size_t>(tracked_entries[page_index].continuity_tracker+1) << page_bits) >= size + subbits) {
|
if ((static_cast<size_t>(tracked_entries[page_index].continuity_tracker) << page_bits) >= size + subbits) {
|
||||||
return GetPointer<u8>(src_addr);
|
return GetPointer<u8>(src_addr);
|
||||||
}
|
}
|
||||||
return nullptr;
|
return nullptr;
|
||||||
@@ -378,7 +383,7 @@ void DeviceMemoryManager<Traits>::WalkBlock(DAddr addr, std::size_t size, auto o
|
|||||||
std::size_t page_index = addr >> Memory::YUZU_PAGEBITS;
|
std::size_t page_index = addr >> Memory::YUZU_PAGEBITS;
|
||||||
std::size_t page_offset = addr & Memory::YUZU_PAGEMASK;
|
std::size_t page_offset = addr & Memory::YUZU_PAGEMASK;
|
||||||
while (remaining_size) {
|
while (remaining_size) {
|
||||||
const size_t next_pages = std::size_t(tracked_entries[page_index].continuity_tracker+1);
|
const size_t next_pages = std::size_t(tracked_entries[page_index].continuity_tracker);
|
||||||
const std::size_t copy_amount = (std::min)((next_pages << Memory::YUZU_PAGEBITS) - page_offset, remaining_size);
|
const std::size_t copy_amount = (std::min)((next_pages << Memory::YUZU_PAGEBITS) - page_offset, remaining_size);
|
||||||
const auto current_vaddr = u64((page_index << Memory::YUZU_PAGEBITS) + page_offset);
|
const auto current_vaddr = u64((page_index << Memory::YUZU_PAGEBITS) + page_offset);
|
||||||
SCOPE_EXIT{
|
SCOPE_EXIT{
|
||||||
|
|||||||
@@ -35,20 +35,17 @@ static IPSFileType IdentifyMagic(std::span<const u8> magic) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
static bool IsEOF(IPSFileType type, std::span<const u8> magic) {
|
static bool IsEOF(IPSFileType type, std::span<const u8> magic) {
|
||||||
return (type == IPSFileType::IPS && magic.size() >= 3 && std::memcmp(magic.data(), "EOF", 3) == 0)
|
return (type == IPSFileType::IPS && magic.size() > 3 && std::memcmp(magic.data(), "EOF", 3) == 0)
|
||||||
|| (type == IPSFileType::IPS32 && magic.size() >= 4 && std::memcmp(magic.data(), "EEOF", 4) == 0);
|
|| (type == IPSFileType::IPS32 && magic.size() > 4 && std::memcmp(magic.data(), "EEOF", 4) == 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
VirtualFile PatchIPS(const VirtualFile& in, const VirtualFile& ips) {
|
VirtualFile PatchIPS(const VirtualFile& in, const VirtualFile& ips) {
|
||||||
if (in == nullptr || ips == nullptr)
|
if (in == nullptr || ips == nullptr)
|
||||||
return nullptr;
|
return nullptr;
|
||||||
|
|
||||||
const auto type = IdentifyMagic(ips->ReadBytes(0x5));
|
|
||||||
if (type == IPSFileType::Error)
|
|
||||||
return nullptr;
|
|
||||||
|
|
||||||
auto in_data = in->ReadAllBytes();
|
auto in_data = in->ReadAllBytes();
|
||||||
if (in_data.size() == 0)
|
auto const type = IdentifyMagic(in_data);
|
||||||
|
if (type == IPSFileType::Error)
|
||||||
return nullptr;
|
return nullptr;
|
||||||
|
|
||||||
std::vector<u8> temp(type == IPSFileType::IPS ? 3 : 4);
|
std::vector<u8> temp(type == IPSFileType::IPS ? 3 : 4);
|
||||||
|
|||||||
@@ -109,7 +109,8 @@ VirtualFile RealVfsFilesystem::OpenFileFromEntry(std::string_view path_, std::op
|
|||||||
auto reference = std::make_unique<FileReference>();
|
auto reference = std::make_unique<FileReference>();
|
||||||
this->InsertReferenceIntoListLocked(*reference);
|
this->InsertReferenceIntoListLocked(*reference);
|
||||||
|
|
||||||
auto file = std::make_shared<RealVfsFile>(*this, std::move(reference), path, perms, size, std::move(parent_path));
|
auto file = std::shared_ptr<RealVfsFile>(
|
||||||
|
new RealVfsFile(*this, std::move(reference), path, perms, size, std::move(parent_path)));
|
||||||
cache[path] = file;
|
cache[path] = file;
|
||||||
|
|
||||||
return file;
|
return file;
|
||||||
@@ -176,7 +177,7 @@ bool RealVfsFilesystem::DeleteFile(std::string_view path_) {
|
|||||||
|
|
||||||
VirtualDir RealVfsFilesystem::OpenDirectory(std::string_view path_, OpenMode perms) {
|
VirtualDir RealVfsFilesystem::OpenDirectory(std::string_view path_, OpenMode perms) {
|
||||||
const auto path = FS::SanitizePath(path_, FS::DirectorySeparator::PlatformDefault);
|
const auto path = FS::SanitizePath(path_, FS::DirectorySeparator::PlatformDefault);
|
||||||
return std::make_shared<RealVfsDirectory>(*this, path, perms);
|
return std::shared_ptr<RealVfsDirectory>(new RealVfsDirectory(*this, path, perms));
|
||||||
}
|
}
|
||||||
|
|
||||||
VirtualDir RealVfsFilesystem::CreateDirectory(std::string_view path_, OpenMode perms) {
|
VirtualDir RealVfsFilesystem::CreateDirectory(std::string_view path_, OpenMode perms) {
|
||||||
@@ -184,7 +185,7 @@ VirtualDir RealVfsFilesystem::CreateDirectory(std::string_view path_, OpenMode p
|
|||||||
if (!FS::CreateDirs(path)) {
|
if (!FS::CreateDirs(path)) {
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
return std::make_shared<RealVfsDirectory>(*this, path, perms);
|
return std::shared_ptr<RealVfsDirectory>(new RealVfsDirectory(*this, path, perms));
|
||||||
}
|
}
|
||||||
|
|
||||||
VirtualDir RealVfsFilesystem::CopyDirectory(std::string_view old_path_,
|
VirtualDir RealVfsFilesystem::CopyDirectory(std::string_view old_path_,
|
||||||
|
|||||||
@@ -82,9 +82,6 @@ class RealVfsFile : public VfsFile {
|
|||||||
friend class RealVfsFilesystem;
|
friend class RealVfsFilesystem;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
RealVfsFile(RealVfsFilesystem& base, std::unique_ptr<FileReference> reference,
|
|
||||||
const std::string& path, OpenMode perms = OpenMode::Read,
|
|
||||||
std::optional<u64> size = {}, std::optional<std::string> parent_path = {});
|
|
||||||
~RealVfsFile() override;
|
~RealVfsFile() override;
|
||||||
|
|
||||||
std::string GetName() const override;
|
std::string GetName() const override;
|
||||||
@@ -98,6 +95,9 @@ public:
|
|||||||
bool Rename(std::string_view name) override;
|
bool Rename(std::string_view name) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
RealVfsFile(RealVfsFilesystem& base, std::unique_ptr<FileReference> reference,
|
||||||
|
const std::string& path, OpenMode perms = OpenMode::Read,
|
||||||
|
std::optional<u64> size = {}, std::optional<std::string> parent_path = {});
|
||||||
|
|
||||||
RealVfsFilesystem& base;
|
RealVfsFilesystem& base;
|
||||||
std::unique_ptr<FileReference> reference;
|
std::unique_ptr<FileReference> reference;
|
||||||
@@ -113,8 +113,6 @@ class RealVfsDirectory : public VfsDirectory {
|
|||||||
friend class RealVfsFilesystem;
|
friend class RealVfsFilesystem;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
RealVfsDirectory(RealVfsFilesystem& base, const std::string& path,
|
|
||||||
OpenMode perms = OpenMode::Read);
|
|
||||||
~RealVfsDirectory() override;
|
~RealVfsDirectory() override;
|
||||||
|
|
||||||
VirtualFile GetFileRelative(std::string_view relative_path) const override;
|
VirtualFile GetFileRelative(std::string_view relative_path) const override;
|
||||||
@@ -140,6 +138,9 @@ public:
|
|||||||
std::map<std::string, VfsEntryType, std::less<>> GetEntries() const override;
|
std::map<std::string, VfsEntryType, std::less<>> GetEntries() const override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
RealVfsDirectory(RealVfsFilesystem& base, const std::string& path,
|
||||||
|
OpenMode perms = OpenMode::Read);
|
||||||
|
|
||||||
template <typename T, typename R>
|
template <typename T, typename R>
|
||||||
std::vector<std::shared_ptr<R>> IterateEntries() const;
|
std::vector<std::shared_ptr<R>> IterateEntries() const;
|
||||||
|
|
||||||
|
|||||||
@@ -635,36 +635,6 @@ Result KPageTableBase::CheckMemoryState(const KMemoryInfo& info, KMemoryState st
|
|||||||
R_SUCCEED();
|
R_SUCCEED();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool KPageTableBase::BeginTraversal(const Common::PageTable &impl, TraversalEntry *out_entry, TraversalContext *out_context,
|
|
||||||
Common::ProcessAddress address) const {
|
|
||||||
out_context->next_offset = GetInteger(address);
|
|
||||||
out_context->next_page = GetInteger(address) >> PageBits;
|
|
||||||
|
|
||||||
return ContinueTraversal(impl, out_entry, out_context);
|
|
||||||
}
|
|
||||||
|
|
||||||
bool KPageTableBase::ContinueTraversal(const Common::PageTable &impl, TraversalEntry *out_entry,
|
|
||||||
TraversalContext *context) const {
|
|
||||||
// Setup invalid defaults.
|
|
||||||
out_entry->phys_addr = 0;
|
|
||||||
out_entry->block_size = PageSize;
|
|
||||||
// Validate that we can read the actual entry.
|
|
||||||
if (auto const page = context->next_page; page < impl.entries.size()) {
|
|
||||||
// Validate that the entry is mapped.
|
|
||||||
if (auto const paddr = impl.entries[page].Pointer(true); paddr != 0) {
|
|
||||||
// Populate the results and return true
|
|
||||||
out_entry->phys_addr = GetInteger(m_system.DeviceMemory().GetPhysicalAddr(paddr + context->next_offset));
|
|
||||||
context->next_page += 1;
|
|
||||||
context->next_offset += PageSize;
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
context->next_page += 1;
|
|
||||||
context->next_offset += PageSize;
|
|
||||||
// Otherwise return false
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
Result KPageTableBase::CheckMemoryStateContiguous(size_t* out_blocks_needed, KProcessAddress addr,
|
Result KPageTableBase::CheckMemoryStateContiguous(size_t* out_blocks_needed, KProcessAddress addr,
|
||||||
size_t size, KMemoryState state_mask,
|
size_t size, KMemoryState state_mask,
|
||||||
KMemoryState state, KMemoryPermission perm_mask,
|
KMemoryState state, KMemoryPermission perm_mask,
|
||||||
@@ -970,7 +940,7 @@ Result KPageTableBase::QueryMappingImpl(KProcessAddress* out, KPhysicalAddress a
|
|||||||
size_t tot_size = 0;
|
size_t tot_size = 0;
|
||||||
|
|
||||||
next_valid =
|
next_valid =
|
||||||
BeginTraversal(impl, std::addressof(next_entry), std::addressof(context), region_start);
|
impl.BeginTraversal(std::addressof(next_entry), std::addressof(context), region_start);
|
||||||
next_entry.block_size =
|
next_entry.block_size =
|
||||||
(next_entry.block_size - (GetInteger(region_start) & (next_entry.block_size - 1)));
|
(next_entry.block_size - (GetInteger(region_start) & (next_entry.block_size - 1)));
|
||||||
|
|
||||||
@@ -1006,7 +976,7 @@ Result KPageTableBase::QueryMappingImpl(KProcessAddress* out, KPhysicalAddress a
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
next_valid = ContinueTraversal(impl, std::addressof(next_entry), std::addressof(context));
|
next_valid = impl.ContinueTraversal(std::addressof(next_entry), std::addressof(context));
|
||||||
}
|
}
|
||||||
|
|
||||||
// Check the last entry.
|
// Check the last entry.
|
||||||
@@ -1784,7 +1754,7 @@ Result KPageTableBase::MakePageGroup(KPageGroup& pg, KProcessAddress addr, size_
|
|||||||
// Begin traversal.
|
// Begin traversal.
|
||||||
TraversalContext context;
|
TraversalContext context;
|
||||||
TraversalEntry next_entry;
|
TraversalEntry next_entry;
|
||||||
R_UNLESS(BeginTraversal(impl, std::addressof(next_entry), std::addressof(context), addr),
|
R_UNLESS(impl.BeginTraversal(std::addressof(next_entry), std::addressof(context), addr),
|
||||||
ResultInvalidCurrentMemory);
|
ResultInvalidCurrentMemory);
|
||||||
|
|
||||||
// Prepare tracking variables.
|
// Prepare tracking variables.
|
||||||
@@ -1794,7 +1764,7 @@ Result KPageTableBase::MakePageGroup(KPageGroup& pg, KProcessAddress addr, size_
|
|||||||
|
|
||||||
// Iterate, adding to group as we go.
|
// Iterate, adding to group as we go.
|
||||||
while (tot_size < size) {
|
while (tot_size < size) {
|
||||||
R_UNLESS(ContinueTraversal(impl, std::addressof(next_entry), std::addressof(context)),
|
R_UNLESS(impl.ContinueTraversal(std::addressof(next_entry), std::addressof(context)),
|
||||||
ResultInvalidCurrentMemory);
|
ResultInvalidCurrentMemory);
|
||||||
|
|
||||||
if (next_entry.phys_addr != (cur_addr + cur_size)) {
|
if (next_entry.phys_addr != (cur_addr + cur_size)) {
|
||||||
@@ -1858,7 +1828,7 @@ bool KPageTableBase::IsValidPageGroup(const KPageGroup& pg, KProcessAddress addr
|
|||||||
// Begin traversal.
|
// Begin traversal.
|
||||||
TraversalContext context;
|
TraversalContext context;
|
||||||
TraversalEntry next_entry;
|
TraversalEntry next_entry;
|
||||||
if (!BeginTraversal(impl, std::addressof(next_entry), std::addressof(context), addr)) {
|
if (!impl.BeginTraversal(std::addressof(next_entry), std::addressof(context), addr)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1869,7 +1839,7 @@ bool KPageTableBase::IsValidPageGroup(const KPageGroup& pg, KProcessAddress addr
|
|||||||
|
|
||||||
// Iterate, comparing expected to actual.
|
// Iterate, comparing expected to actual.
|
||||||
while (tot_size < size) {
|
while (tot_size < size) {
|
||||||
if (!ContinueTraversal(impl, std::addressof(next_entry), std::addressof(context))) {
|
if (!impl.ContinueTraversal(std::addressof(next_entry), std::addressof(context))) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1926,7 +1896,7 @@ Result KPageTableBase::GetContiguousMemoryRangeWithState(
|
|||||||
// Begin a traversal.
|
// Begin a traversal.
|
||||||
TraversalContext context;
|
TraversalContext context;
|
||||||
TraversalEntry cur_entry = {.phys_addr = 0, .block_size = 0};
|
TraversalEntry cur_entry = {.phys_addr = 0, .block_size = 0};
|
||||||
R_UNLESS(BeginTraversal(impl, std::addressof(cur_entry), std::addressof(context), address),
|
R_UNLESS(impl.BeginTraversal(std::addressof(cur_entry), std::addressof(context), address),
|
||||||
ResultInvalidCurrentMemory);
|
ResultInvalidCurrentMemory);
|
||||||
|
|
||||||
// Traverse until we have enough size or we aren't contiguous any more.
|
// Traverse until we have enough size or we aren't contiguous any more.
|
||||||
@@ -1935,7 +1905,7 @@ Result KPageTableBase::GetContiguousMemoryRangeWithState(
|
|||||||
for (contig_size =
|
for (contig_size =
|
||||||
cur_entry.block_size - (GetInteger(phys_address) & (cur_entry.block_size - 1));
|
cur_entry.block_size - (GetInteger(phys_address) & (cur_entry.block_size - 1));
|
||||||
contig_size < size; contig_size += cur_entry.block_size) {
|
contig_size < size; contig_size += cur_entry.block_size) {
|
||||||
if (!ContinueTraversal(impl, std::addressof(cur_entry), std::addressof(context))) {
|
if (!impl.ContinueTraversal(std::addressof(cur_entry), std::addressof(context))) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (cur_entry.phys_addr != phys_address + contig_size) {
|
if (cur_entry.phys_addr != phys_address + contig_size) {
|
||||||
@@ -2364,7 +2334,7 @@ Result KPageTableBase::QueryPhysicalAddress(Svc::lp64::PhysicalMemoryInfo* out,
|
|||||||
TraversalContext context;
|
TraversalContext context;
|
||||||
TraversalEntry next_entry;
|
TraversalEntry next_entry;
|
||||||
bool traverse_valid =
|
bool traverse_valid =
|
||||||
BeginTraversal(m_impl, std::addressof(next_entry), std::addressof(context), virt_addr);
|
m_impl.BeginTraversal(std::addressof(next_entry), std::addressof(context), virt_addr);
|
||||||
R_UNLESS(traverse_valid, ResultInvalidCurrentMemory);
|
R_UNLESS(traverse_valid, ResultInvalidCurrentMemory);
|
||||||
|
|
||||||
// Set tracking variables.
|
// Set tracking variables.
|
||||||
@@ -2375,7 +2345,7 @@ Result KPageTableBase::QueryPhysicalAddress(Svc::lp64::PhysicalMemoryInfo* out,
|
|||||||
while (true) {
|
while (true) {
|
||||||
// Continue the traversal.
|
// Continue the traversal.
|
||||||
traverse_valid =
|
traverse_valid =
|
||||||
ContinueTraversal(m_impl, std::addressof(next_entry), std::addressof(context));
|
m_impl.ContinueTraversal(std::addressof(next_entry), std::addressof(context));
|
||||||
if (!traverse_valid) {
|
if (!traverse_valid) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -2597,7 +2567,7 @@ Result KPageTableBase::UnmapIoRegion(KProcessAddress dst_address, KPhysicalAddre
|
|||||||
TraversalContext context;
|
TraversalContext context;
|
||||||
TraversalEntry next_entry;
|
TraversalEntry next_entry;
|
||||||
ASSERT(
|
ASSERT(
|
||||||
BeginTraversal(impl, std::addressof(next_entry), std::addressof(context), dst_address));
|
impl.BeginTraversal(std::addressof(next_entry), std::addressof(context), dst_address));
|
||||||
|
|
||||||
// Check that the physical region matches.
|
// Check that the physical region matches.
|
||||||
R_UNLESS(next_entry.phys_addr == phys_addr, ResultInvalidMemoryRegion);
|
R_UNLESS(next_entry.phys_addr == phys_addr, ResultInvalidMemoryRegion);
|
||||||
@@ -2607,7 +2577,7 @@ Result KPageTableBase::UnmapIoRegion(KProcessAddress dst_address, KPhysicalAddre
|
|||||||
next_entry.block_size - (GetInteger(phys_addr) & (next_entry.block_size - 1));
|
next_entry.block_size - (GetInteger(phys_addr) & (next_entry.block_size - 1));
|
||||||
checked_size < size; checked_size += next_entry.block_size) {
|
checked_size < size; checked_size += next_entry.block_size) {
|
||||||
// Continue the traversal.
|
// Continue the traversal.
|
||||||
ASSERT(ContinueTraversal(impl, std::addressof(next_entry), std::addressof(context)));
|
ASSERT(impl.ContinueTraversal(std::addressof(next_entry), std::addressof(context)));
|
||||||
|
|
||||||
// Check that the physical region matches.
|
// Check that the physical region matches.
|
||||||
R_UNLESS(next_entry.phys_addr == phys_addr + checked_size, ResultInvalidMemoryRegion);
|
R_UNLESS(next_entry.phys_addr == phys_addr + checked_size, ResultInvalidMemoryRegion);
|
||||||
@@ -3059,7 +3029,7 @@ Result KPageTableBase::InvalidateProcessDataCache(KProcessAddress address, size_
|
|||||||
TraversalContext context;
|
TraversalContext context;
|
||||||
TraversalEntry next_entry;
|
TraversalEntry next_entry;
|
||||||
bool traverse_valid =
|
bool traverse_valid =
|
||||||
BeginTraversal(impl, std::addressof(next_entry), std::addressof(context), address);
|
impl.BeginTraversal(std::addressof(next_entry), std::addressof(context), address);
|
||||||
R_UNLESS(traverse_valid, ResultInvalidCurrentMemory);
|
R_UNLESS(traverse_valid, ResultInvalidCurrentMemory);
|
||||||
|
|
||||||
// Prepare tracking variables.
|
// Prepare tracking variables.
|
||||||
@@ -3071,7 +3041,7 @@ Result KPageTableBase::InvalidateProcessDataCache(KProcessAddress address, size_
|
|||||||
while (tot_size < size) {
|
while (tot_size < size) {
|
||||||
// Continue the traversal.
|
// Continue the traversal.
|
||||||
traverse_valid =
|
traverse_valid =
|
||||||
ContinueTraversal(impl, std::addressof(next_entry), std::addressof(context));
|
impl.ContinueTraversal(std::addressof(next_entry), std::addressof(context));
|
||||||
R_UNLESS(traverse_valid, ResultInvalidCurrentMemory);
|
R_UNLESS(traverse_valid, ResultInvalidCurrentMemory);
|
||||||
|
|
||||||
if (next_entry.phys_addr != (cur_addr + cur_size)) {
|
if (next_entry.phys_addr != (cur_addr + cur_size)) {
|
||||||
@@ -3159,7 +3129,7 @@ Result KPageTableBase::ReadDebugMemory(KProcessAddress dst_address, KProcessAddr
|
|||||||
TraversalContext context;
|
TraversalContext context;
|
||||||
TraversalEntry next_entry;
|
TraversalEntry next_entry;
|
||||||
bool traverse_valid =
|
bool traverse_valid =
|
||||||
BeginTraversal(impl, std::addressof(next_entry), std::addressof(context), src_address);
|
impl.BeginTraversal(std::addressof(next_entry), std::addressof(context), src_address);
|
||||||
R_UNLESS(traverse_valid, ResultInvalidCurrentMemory);
|
R_UNLESS(traverse_valid, ResultInvalidCurrentMemory);
|
||||||
|
|
||||||
// Prepare tracking variables.
|
// Prepare tracking variables.
|
||||||
@@ -3197,7 +3167,7 @@ Result KPageTableBase::ReadDebugMemory(KProcessAddress dst_address, KProcessAddr
|
|||||||
while (tot_size < size) {
|
while (tot_size < size) {
|
||||||
// Continue the traversal.
|
// Continue the traversal.
|
||||||
traverse_valid =
|
traverse_valid =
|
||||||
ContinueTraversal(impl, std::addressof(next_entry), std::addressof(context));
|
impl.ContinueTraversal(std::addressof(next_entry), std::addressof(context));
|
||||||
ASSERT(traverse_valid);
|
ASSERT(traverse_valid);
|
||||||
|
|
||||||
if (next_entry.phys_addr != (cur_addr + cur_size)) {
|
if (next_entry.phys_addr != (cur_addr + cur_size)) {
|
||||||
@@ -3255,7 +3225,7 @@ Result KPageTableBase::WriteDebugMemory(KProcessAddress dst_address, KProcessAdd
|
|||||||
TraversalContext context;
|
TraversalContext context;
|
||||||
TraversalEntry next_entry;
|
TraversalEntry next_entry;
|
||||||
bool traverse_valid =
|
bool traverse_valid =
|
||||||
BeginTraversal(impl, std::addressof(next_entry), std::addressof(context), dst_address);
|
impl.BeginTraversal(std::addressof(next_entry), std::addressof(context), dst_address);
|
||||||
R_UNLESS(traverse_valid, ResultInvalidCurrentMemory);
|
R_UNLESS(traverse_valid, ResultInvalidCurrentMemory);
|
||||||
|
|
||||||
// Prepare tracking variables.
|
// Prepare tracking variables.
|
||||||
@@ -3297,7 +3267,7 @@ Result KPageTableBase::WriteDebugMemory(KProcessAddress dst_address, KProcessAdd
|
|||||||
while (tot_size < size) {
|
while (tot_size < size) {
|
||||||
// Continue the traversal.
|
// Continue the traversal.
|
||||||
traverse_valid =
|
traverse_valid =
|
||||||
ContinueTraversal(impl, std::addressof(next_entry), std::addressof(context));
|
impl.ContinueTraversal(std::addressof(next_entry), std::addressof(context));
|
||||||
ASSERT(traverse_valid);
|
ASSERT(traverse_valid);
|
||||||
|
|
||||||
if (next_entry.phys_addr != (cur_addr + cur_size)) {
|
if (next_entry.phys_addr != (cur_addr + cur_size)) {
|
||||||
@@ -3758,7 +3728,7 @@ Result KPageTableBase::CopyMemoryFromLinearToUser(
|
|||||||
TraversalContext context;
|
TraversalContext context;
|
||||||
TraversalEntry next_entry;
|
TraversalEntry next_entry;
|
||||||
bool traverse_valid =
|
bool traverse_valid =
|
||||||
BeginTraversal(impl, std::addressof(next_entry), std::addressof(context), src_addr);
|
impl.BeginTraversal(std::addressof(next_entry), std::addressof(context), src_addr);
|
||||||
ASSERT(traverse_valid);
|
ASSERT(traverse_valid);
|
||||||
|
|
||||||
// Prepare tracking variables.
|
// Prepare tracking variables.
|
||||||
@@ -3798,7 +3768,7 @@ Result KPageTableBase::CopyMemoryFromLinearToUser(
|
|||||||
while (tot_size < size) {
|
while (tot_size < size) {
|
||||||
// Continue the traversal.
|
// Continue the traversal.
|
||||||
traverse_valid =
|
traverse_valid =
|
||||||
ContinueTraversal(impl, std::addressof(next_entry), std::addressof(context));
|
impl.ContinueTraversal(std::addressof(next_entry), std::addressof(context));
|
||||||
ASSERT(traverse_valid);
|
ASSERT(traverse_valid);
|
||||||
|
|
||||||
if (next_entry.phys_addr != (cur_addr + cur_size)) {
|
if (next_entry.phys_addr != (cur_addr + cur_size)) {
|
||||||
@@ -3852,7 +3822,7 @@ Result KPageTableBase::CopyMemoryFromLinearToKernel(
|
|||||||
TraversalContext context;
|
TraversalContext context;
|
||||||
TraversalEntry next_entry;
|
TraversalEntry next_entry;
|
||||||
bool traverse_valid =
|
bool traverse_valid =
|
||||||
BeginTraversal(impl, std::addressof(next_entry), std::addressof(context), src_addr);
|
impl.BeginTraversal(std::addressof(next_entry), std::addressof(context), src_addr);
|
||||||
ASSERT(traverse_valid);
|
ASSERT(traverse_valid);
|
||||||
|
|
||||||
// Prepare tracking variables.
|
// Prepare tracking variables.
|
||||||
@@ -3875,7 +3845,7 @@ Result KPageTableBase::CopyMemoryFromLinearToKernel(
|
|||||||
while (tot_size < size) {
|
while (tot_size < size) {
|
||||||
// Continue the traversal.
|
// Continue the traversal.
|
||||||
traverse_valid =
|
traverse_valid =
|
||||||
ContinueTraversal(impl, std::addressof(next_entry), std::addressof(context));
|
impl.ContinueTraversal(std::addressof(next_entry), std::addressof(context));
|
||||||
ASSERT(traverse_valid);
|
ASSERT(traverse_valid);
|
||||||
|
|
||||||
if (next_entry.phys_addr != (cur_addr + cur_size)) {
|
if (next_entry.phys_addr != (cur_addr + cur_size)) {
|
||||||
@@ -3932,7 +3902,7 @@ Result KPageTableBase::CopyMemoryFromUserToLinear(
|
|||||||
TraversalContext context;
|
TraversalContext context;
|
||||||
TraversalEntry next_entry;
|
TraversalEntry next_entry;
|
||||||
bool traverse_valid =
|
bool traverse_valid =
|
||||||
BeginTraversal(impl, std::addressof(next_entry), std::addressof(context), dst_addr);
|
impl.BeginTraversal(std::addressof(next_entry), std::addressof(context), dst_addr);
|
||||||
ASSERT(traverse_valid);
|
ASSERT(traverse_valid);
|
||||||
|
|
||||||
// Prepare tracking variables.
|
// Prepare tracking variables.
|
||||||
@@ -3971,7 +3941,7 @@ Result KPageTableBase::CopyMemoryFromUserToLinear(
|
|||||||
while (tot_size < size) {
|
while (tot_size < size) {
|
||||||
// Continue the traversal.
|
// Continue the traversal.
|
||||||
traverse_valid =
|
traverse_valid =
|
||||||
ContinueTraversal(impl, std::addressof(next_entry), std::addressof(context));
|
impl.ContinueTraversal(std::addressof(next_entry), std::addressof(context));
|
||||||
ASSERT(traverse_valid);
|
ASSERT(traverse_valid);
|
||||||
|
|
||||||
if (next_entry.phys_addr != (cur_addr + cur_size)) {
|
if (next_entry.phys_addr != (cur_addr + cur_size)) {
|
||||||
@@ -4027,7 +3997,7 @@ Result KPageTableBase::CopyMemoryFromKernelToLinear(KProcessAddress dst_addr, si
|
|||||||
TraversalContext context;
|
TraversalContext context;
|
||||||
TraversalEntry next_entry;
|
TraversalEntry next_entry;
|
||||||
bool traverse_valid =
|
bool traverse_valid =
|
||||||
BeginTraversal(impl, std::addressof(next_entry), std::addressof(context), dst_addr);
|
impl.BeginTraversal(std::addressof(next_entry), std::addressof(context), dst_addr);
|
||||||
ASSERT(traverse_valid);
|
ASSERT(traverse_valid);
|
||||||
|
|
||||||
// Prepare tracking variables.
|
// Prepare tracking variables.
|
||||||
@@ -4050,7 +4020,7 @@ Result KPageTableBase::CopyMemoryFromKernelToLinear(KProcessAddress dst_addr, si
|
|||||||
while (tot_size < size) {
|
while (tot_size < size) {
|
||||||
// Continue the traversal.
|
// Continue the traversal.
|
||||||
traverse_valid =
|
traverse_valid =
|
||||||
ContinueTraversal(impl, std::addressof(next_entry), std::addressof(context));
|
impl.ContinueTraversal(std::addressof(next_entry), std::addressof(context));
|
||||||
ASSERT(traverse_valid);
|
ASSERT(traverse_valid);
|
||||||
|
|
||||||
if (next_entry.phys_addr != (cur_addr + cur_size)) {
|
if (next_entry.phys_addr != (cur_addr + cur_size)) {
|
||||||
@@ -4119,10 +4089,10 @@ Result KPageTableBase::CopyMemoryFromHeapToHeap(
|
|||||||
bool traverse_valid;
|
bool traverse_valid;
|
||||||
|
|
||||||
// Begin traversal.
|
// Begin traversal.
|
||||||
traverse_valid = BeginTraversal(src_impl, std::addressof(src_next_entry),
|
traverse_valid = src_impl.BeginTraversal(std::addressof(src_next_entry),
|
||||||
std::addressof(src_context), src_addr);
|
std::addressof(src_context), src_addr);
|
||||||
ASSERT(traverse_valid);
|
ASSERT(traverse_valid);
|
||||||
traverse_valid = BeginTraversal(dst_impl, std::addressof(dst_next_entry),
|
traverse_valid = dst_impl.BeginTraversal(std::addressof(dst_next_entry),
|
||||||
std::addressof(dst_context), dst_addr);
|
std::addressof(dst_context), dst_addr);
|
||||||
ASSERT(traverse_valid);
|
ASSERT(traverse_valid);
|
||||||
|
|
||||||
@@ -4157,7 +4127,7 @@ Result KPageTableBase::CopyMemoryFromHeapToHeap(
|
|||||||
if (ofs + cur_copy_size != size) {
|
if (ofs + cur_copy_size != size) {
|
||||||
if (cur_src_addr + cur_min_size == cur_src_block_addr + cur_src_size) {
|
if (cur_src_addr + cur_min_size == cur_src_block_addr + cur_src_size) {
|
||||||
// Continue the src traversal.
|
// Continue the src traversal.
|
||||||
traverse_valid = ContinueTraversal(src_impl, std::addressof(src_next_entry),
|
traverse_valid = src_impl.ContinueTraversal(std::addressof(src_next_entry),
|
||||||
std::addressof(src_context));
|
std::addressof(src_context));
|
||||||
ASSERT(traverse_valid);
|
ASSERT(traverse_valid);
|
||||||
|
|
||||||
@@ -4168,7 +4138,7 @@ Result KPageTableBase::CopyMemoryFromHeapToHeap(
|
|||||||
if (cur_dst_addr + cur_min_size ==
|
if (cur_dst_addr + cur_min_size ==
|
||||||
dst_next_entry.phys_addr + dst_next_entry.block_size) {
|
dst_next_entry.phys_addr + dst_next_entry.block_size) {
|
||||||
// Continue the dst traversal.
|
// Continue the dst traversal.
|
||||||
traverse_valid = ContinueTraversal(dst_impl, std::addressof(dst_next_entry),
|
traverse_valid = dst_impl.ContinueTraversal(std::addressof(dst_next_entry),
|
||||||
std::addressof(dst_context));
|
std::addressof(dst_context));
|
||||||
ASSERT(traverse_valid);
|
ASSERT(traverse_valid);
|
||||||
|
|
||||||
@@ -4253,10 +4223,10 @@ Result KPageTableBase::CopyMemoryFromHeapToHeapWithoutCheckDestination(
|
|||||||
bool traverse_valid;
|
bool traverse_valid;
|
||||||
|
|
||||||
// Begin traversal.
|
// Begin traversal.
|
||||||
traverse_valid = BeginTraversal(src_impl, std::addressof(src_next_entry),
|
traverse_valid = src_impl.BeginTraversal(std::addressof(src_next_entry),
|
||||||
std::addressof(src_context), src_addr);
|
std::addressof(src_context), src_addr);
|
||||||
ASSERT(traverse_valid);
|
ASSERT(traverse_valid);
|
||||||
traverse_valid = BeginTraversal(dst_impl, std::addressof(dst_next_entry),
|
traverse_valid = dst_impl.BeginTraversal(std::addressof(dst_next_entry),
|
||||||
std::addressof(dst_context), dst_addr);
|
std::addressof(dst_context), dst_addr);
|
||||||
ASSERT(traverse_valid);
|
ASSERT(traverse_valid);
|
||||||
|
|
||||||
@@ -4291,7 +4261,7 @@ Result KPageTableBase::CopyMemoryFromHeapToHeapWithoutCheckDestination(
|
|||||||
if (ofs + cur_copy_size != size) {
|
if (ofs + cur_copy_size != size) {
|
||||||
if (cur_src_addr + cur_min_size == cur_src_block_addr + cur_src_size) {
|
if (cur_src_addr + cur_min_size == cur_src_block_addr + cur_src_size) {
|
||||||
// Continue the src traversal.
|
// Continue the src traversal.
|
||||||
traverse_valid = ContinueTraversal(src_impl, std::addressof(src_next_entry),
|
traverse_valid = src_impl.ContinueTraversal(std::addressof(src_next_entry),
|
||||||
std::addressof(src_context));
|
std::addressof(src_context));
|
||||||
ASSERT(traverse_valid);
|
ASSERT(traverse_valid);
|
||||||
|
|
||||||
@@ -4302,7 +4272,7 @@ Result KPageTableBase::CopyMemoryFromHeapToHeapWithoutCheckDestination(
|
|||||||
if (cur_dst_addr + cur_min_size ==
|
if (cur_dst_addr + cur_min_size ==
|
||||||
dst_next_entry.phys_addr + dst_next_entry.block_size) {
|
dst_next_entry.phys_addr + dst_next_entry.block_size) {
|
||||||
// Continue the dst traversal.
|
// Continue the dst traversal.
|
||||||
traverse_valid = ContinueTraversal(dst_impl, std::addressof(dst_next_entry),
|
traverse_valid = dst_impl.ContinueTraversal(std::addressof(dst_next_entry),
|
||||||
std::addressof(dst_context));
|
std::addressof(dst_context));
|
||||||
ASSERT(traverse_valid);
|
ASSERT(traverse_valid);
|
||||||
|
|
||||||
@@ -4577,7 +4547,7 @@ Result KPageTableBase::SetupForIpcServer(KProcessAddress* out_addr, size_t size,
|
|||||||
// Begin traversal.
|
// Begin traversal.
|
||||||
TraversalContext context;
|
TraversalContext context;
|
||||||
TraversalEntry next_entry;
|
TraversalEntry next_entry;
|
||||||
bool traverse_valid = BeginTraversal(src_impl, std::addressof(next_entry),
|
bool traverse_valid = src_impl.BeginTraversal(std::addressof(next_entry),
|
||||||
std::addressof(context), aligned_src_start);
|
std::addressof(context), aligned_src_start);
|
||||||
ASSERT(traverse_valid);
|
ASSERT(traverse_valid);
|
||||||
|
|
||||||
@@ -4627,7 +4597,7 @@ Result KPageTableBase::SetupForIpcServer(KProcessAddress* out_addr, size_t size,
|
|||||||
// If the block's size was one page, we may need to continue traversal.
|
// If the block's size was one page, we may need to continue traversal.
|
||||||
if (cur_block_size == 0 && aligned_src_size > PageSize) {
|
if (cur_block_size == 0 && aligned_src_size > PageSize) {
|
||||||
traverse_valid =
|
traverse_valid =
|
||||||
ContinueTraversal(src_impl, std::addressof(next_entry), std::addressof(context));
|
src_impl.ContinueTraversal(std::addressof(next_entry), std::addressof(context));
|
||||||
ASSERT(traverse_valid);
|
ASSERT(traverse_valid);
|
||||||
|
|
||||||
cur_block_addr = next_entry.phys_addr;
|
cur_block_addr = next_entry.phys_addr;
|
||||||
@@ -4640,7 +4610,7 @@ Result KPageTableBase::SetupForIpcServer(KProcessAddress* out_addr, size_t size,
|
|||||||
while (aligned_src_start + tot_block_size < mapping_src_end) {
|
while (aligned_src_start + tot_block_size < mapping_src_end) {
|
||||||
// Continue the traversal.
|
// Continue the traversal.
|
||||||
traverse_valid =
|
traverse_valid =
|
||||||
ContinueTraversal(src_impl, std::addressof(next_entry), std::addressof(context));
|
src_impl.ContinueTraversal(std::addressof(next_entry), std::addressof(context));
|
||||||
ASSERT(traverse_valid);
|
ASSERT(traverse_valid);
|
||||||
|
|
||||||
// Process the block.
|
// Process the block.
|
||||||
@@ -4683,7 +4653,7 @@ Result KPageTableBase::SetupForIpcServer(KProcessAddress* out_addr, size_t size,
|
|||||||
if (mapped_block_end + cur_block_size < aligned_src_end &&
|
if (mapped_block_end + cur_block_size < aligned_src_end &&
|
||||||
cur_block_size == last_block_size) {
|
cur_block_size == last_block_size) {
|
||||||
traverse_valid =
|
traverse_valid =
|
||||||
ContinueTraversal(src_impl, std::addressof(next_entry), std::addressof(context));
|
src_impl.ContinueTraversal(std::addressof(next_entry), std::addressof(context));
|
||||||
ASSERT(traverse_valid);
|
ASSERT(traverse_valid);
|
||||||
|
|
||||||
cur_block_addr = next_entry.phys_addr;
|
cur_block_addr = next_entry.phys_addr;
|
||||||
@@ -5631,7 +5601,7 @@ Result KPageTableBase::UnmapProcessMemory(KProcessAddress dst_address, size_t si
|
|||||||
ContiguousRangeInfo(KPageTableBase& pt, KProcessAddress address, size_t size)
|
ContiguousRangeInfo(KPageTableBase& pt, KProcessAddress address, size_t size)
|
||||||
: m_pt(pt), m_remaining_size(size) {
|
: m_pt(pt), m_remaining_size(size) {
|
||||||
// Begin a traversal.
|
// Begin a traversal.
|
||||||
ASSERT(m_pt.BeginTraversal(m_pt.GetImpl(), std::addressof(m_entry),
|
ASSERT(m_pt.GetImpl().BeginTraversal(std::addressof(m_entry),
|
||||||
std::addressof(m_context), address));
|
std::addressof(m_context), address));
|
||||||
|
|
||||||
// Setup tracking fields.
|
// Setup tracking fields.
|
||||||
@@ -5662,7 +5632,7 @@ Result KPageTableBase::UnmapProcessMemory(KProcessAddress dst_address, size_t si
|
|||||||
void DetermineContiguousBlockExtents() {
|
void DetermineContiguousBlockExtents() {
|
||||||
// Continue traversing until we're not contiguous, or we have enough.
|
// Continue traversing until we're not contiguous, or we have enough.
|
||||||
while (m_cur_size < m_remaining_size) {
|
while (m_cur_size < m_remaining_size) {
|
||||||
ASSERT(m_pt.ContinueTraversal(m_pt.GetImpl(), std::addressof(m_entry),
|
ASSERT(m_pt.GetImpl().ContinueTraversal(std::addressof(m_entry),
|
||||||
std::addressof(m_context)));
|
std::addressof(m_context)));
|
||||||
|
|
||||||
// If we're not contiguous, we're done.
|
// If we're not contiguous, we're done.
|
||||||
|
|||||||
@@ -370,10 +370,6 @@ private:
|
|||||||
size_t num_pages, size_t alignment, size_t offset,
|
size_t num_pages, size_t alignment, size_t offset,
|
||||||
size_t guard_pages) const;
|
size_t guard_pages) const;
|
||||||
|
|
||||||
bool BeginTraversal(const Common::PageTable& impl, TraversalEntry* out_entry, TraversalContext* out_context,
|
|
||||||
Common::ProcessAddress address) const;
|
|
||||||
bool ContinueTraversal(const Common::PageTable& impl, TraversalEntry* out_entry, TraversalContext* context) const;
|
|
||||||
|
|
||||||
Result CheckMemoryStateContiguous(size_t* out_blocks_needed, KProcessAddress addr, size_t size,
|
Result CheckMemoryStateContiguous(size_t* out_blocks_needed, KProcessAddress addr, size_t size,
|
||||||
KMemoryState state_mask, KMemoryState state,
|
KMemoryState state_mask, KMemoryState state,
|
||||||
KMemoryPermission perm_mask, KMemoryPermission perm,
|
KMemoryPermission perm_mask, KMemoryPermission perm,
|
||||||
@@ -478,14 +474,7 @@ private:
|
|||||||
// Validate pre-conditions.
|
// Validate pre-conditions.
|
||||||
ASSERT(this->IsLockedByCurrentThread());
|
ASSERT(this->IsLockedByCurrentThread());
|
||||||
|
|
||||||
if (virt_addr > (1ULL << m_address_space_width)) {
|
return this->GetImpl().GetPhysicalAddress(out, virt_addr);
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
*out = m_system.DeviceMemory().GetPhysicalAddr(
|
|
||||||
this->GetImpl().entries[GetInteger(virt_addr) >> PageBits].Pointer(true) + GetInteger(virt_addr));
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|||||||
@@ -250,10 +250,9 @@ std::shared_ptr<FrontendApplet> FrontendAppletHolder::GetApplet(std::shared_ptr<
|
|||||||
return std::make_shared<PhotoViewer>(system, applet, mode, *frontend.photo_viewer);
|
return std::make_shared<PhotoViewer>(system, applet, mode, *frontend.photo_viewer);
|
||||||
case AppletId::NetConnect:
|
case AppletId::NetConnect:
|
||||||
return std::make_shared<NetConnect>(system, applet, mode, *frontend.net_connect);
|
return std::make_shared<NetConnect>(system, applet, mode, *frontend.net_connect);
|
||||||
case AppletId::None:
|
|
||||||
return nullptr;
|
|
||||||
default:
|
default:
|
||||||
UNIMPLEMENTED_MSG("No frontend implementation exists for applet_id={:02X} program_id={:016X}! Using stub applet.", static_cast<u8>(id), applet->program_id);
|
LOG_ERROR(Service_AM, "No backend implementation exists for applet_id={:02X} program_id={:016X}"
|
||||||
|
"Falling back to stub applet", static_cast<u8>(id), applet->program_id);
|
||||||
return std::make_shared<StubApplet>(system, applet, id, mode);
|
return std::make_shared<StubApplet>(system, applet, id, mode);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -517,7 +517,7 @@ void WindowSystem::UpdateAppletStateLocked(Applet* applet, bool is_foreground, b
|
|||||||
// Layer ordering. Composition sorts back-to-front. Now with enums for calrity.
|
// Layer ordering. Composition sorts back-to-front. Now with enums for calrity.
|
||||||
s32 z_index = Background;
|
s32 z_index = Background;
|
||||||
if (is_overlay) {
|
if (is_overlay) {
|
||||||
z_index = this->IsOverlayOpenLocked(*applet) ? Overlay : Background;
|
z_index = Overlay;
|
||||||
} else if (inherited_foreground) {
|
} else if (inherited_foreground) {
|
||||||
z_index = is_obscured ? Foreground : ForegroundVisible;
|
z_index = is_obscured ? Foreground : ForegroundVisible;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -191,7 +191,7 @@ void LoopProcess(Core::System& system) {
|
|||||||
server_manager->RegisterNamedService("audout:d", std::make_shared<IAudioOutManagerForDebugger>(system), 30);
|
server_manager->RegisterNamedService("audout:d", std::make_shared<IAudioOutManagerForDebugger>(system), 30);
|
||||||
server_manager->RegisterNamedService("audin:d", std::make_shared<IAudioInManagerForDebugger>(system), 30);
|
server_manager->RegisterNamedService("audin:d", std::make_shared<IAudioInManagerForDebugger>(system), 30);
|
||||||
server_manager->RegisterNamedService("audrec:d", std::make_shared<IFinalOutputRecorderManagerForDebugger>(system), 30);
|
server_manager->RegisterNamedService("audrec:d", std::make_shared<IFinalOutputRecorderManagerForDebugger>(system), 30);
|
||||||
server_manager->RegisterNamedService("audren:d", std::make_shared<IAudioRendererManagerForDebugger>(system), 30);
|
server_manager->RegisterNamedService("audren:d", std::make_shared<IAudioInManager>(system), 30);
|
||||||
|
|
||||||
server_manager->RegisterNamedService("audin:u", std::make_shared<IAudioInManager>(system), 30);
|
server_manager->RegisterNamedService("audin:u", std::make_shared<IAudioInManager>(system), 30);
|
||||||
server_manager->RegisterNamedService("audin:a", std::make_shared<IAudioInManagerForApplet>(system), 30);
|
server_manager->RegisterNamedService("audin:a", std::make_shared<IAudioInManagerForApplet>(system), 30);
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
|
// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
|
||||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
|
||||||
// SPDX-FileCopyrightText: Copyright 2024 yuzu Emulator Project
|
// SPDX-FileCopyrightText: Copyright 2024 yuzu Emulator Project
|
||||||
@@ -24,7 +24,7 @@ IReceiverService::~IReceiverService() = default;
|
|||||||
|
|
||||||
Result IReceiverService::OpenReceiver(Out<SharedPointer<IReceiver>> out_receiver) {
|
Result IReceiverService::OpenReceiver(Out<SharedPointer<IReceiver>> out_receiver) {
|
||||||
LOG_DEBUG(Service_PSC, "called");
|
LOG_DEBUG(Service_PSC, "called");
|
||||||
*out_receiver = std::make_shared<IReceiver>(system);
|
*out_receiver = std::shared_ptr<IReceiver>(new IReceiver(system));
|
||||||
R_SUCCEED();
|
R_SUCCEED();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -16,10 +16,6 @@
|
|||||||
#include "core/hle/service/ro/ro_types.h"
|
#include "core/hle/service/ro/ro_types.h"
|
||||||
#include "core/hle/service/server_manager.h"
|
#include "core/hle/service/server_manager.h"
|
||||||
#include "core/hle/service/service.h"
|
#include "core/hle/service/service.h"
|
||||||
#ifdef HAS_NCE
|
|
||||||
#include "core/arm/nce/patcher.h"
|
|
||||||
#include "core/hle/kernel/k_shared_memory.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
namespace Service::RO {
|
namespace Service::RO {
|
||||||
|
|
||||||
@@ -390,7 +386,7 @@ public:
|
|||||||
R_SUCCEED();
|
R_SUCCEED();
|
||||||
}
|
}
|
||||||
|
|
||||||
Result MapManualLoadModuleMemory(Kernel::KernelCore& kernel, u64* out_address, size_t context_id, u64 nro_address,
|
Result MapManualLoadModuleMemory(u64* out_address, size_t context_id, u64 nro_address,
|
||||||
u64 nro_size, u64 bss_address, u64 bss_size) {
|
u64 nro_size, u64 bss_address, u64 bss_size) {
|
||||||
// Get context.
|
// Get context.
|
||||||
ProcessContext* context = this->GetContextById(context_id);
|
ProcessContext* context = this->GetContextById(context_id);
|
||||||
@@ -425,33 +421,7 @@ public:
|
|||||||
R_TRY(context->ValidateNro(std::addressof(nro_info->module_id), std::addressof(rx_size),
|
R_TRY(context->ValidateNro(std::addressof(nro_info->module_id), std::addressof(rx_size),
|
||||||
std::addressof(ro_size), std::addressof(rw_size),
|
std::addressof(ro_size), std::addressof(rw_size),
|
||||||
nro_info->base_address, nro_size, bss_size));
|
nro_info->base_address, nro_size, bss_size));
|
||||||
#ifdef HAS_NCE
|
|
||||||
if (Settings::values.nce_runtime_nro_patch.GetValue()) {
|
|
||||||
if (Settings::IsNceEnabled()) {
|
|
||||||
auto* process = context->GetProcess();
|
|
||||||
auto& memory = process->GetMemory();
|
|
||||||
|
|
||||||
std::vector<u8> image(total_size);
|
|
||||||
memory.ReadBlock(nro_info->base_address, image.data(), rx_size);
|
|
||||||
|
|
||||||
Kernel::CodeSet::Segment code{.size = static_cast<u32>(rx_size)};
|
|
||||||
Core::NCE::Patcher patch;
|
|
||||||
patch.PatchText(image, code);
|
|
||||||
patch.RelocateAndCopy(nro_info->base_address, code, image, nullptr);
|
|
||||||
|
|
||||||
const u64 patch_address = nro_info->base_address + total_size;
|
|
||||||
const size_t patch_size = patch.GetSectionSize();
|
|
||||||
constexpr auto permission = Kernel::Svc::MemoryPermission::ReadExecute;
|
|
||||||
|
|
||||||
auto* patch_memory = Kernel::KSharedMemory::Create(kernel);
|
|
||||||
R_TRY(patch_memory->Initialize(kernel, kernel.System().DeviceMemory(), process, permission, permission, patch_size));
|
|
||||||
std::memcpy(patch_memory->GetPointer(), image.data() + total_size, patch_size);
|
|
||||||
R_TRY(process->AddSharedMemory(kernel, patch_memory, patch_address, patch_size));
|
|
||||||
R_TRY(patch_memory->Map(*process, patch_address, patch_size, permission));
|
|
||||||
memory.WriteBlock(nro_info->base_address, image.data(), rx_size);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
// Set NRO perms.
|
// Set NRO perms.
|
||||||
R_TRY(SetNroPerms(context->GetProcess(), nro_info->base_address, rx_size, ro_size,
|
R_TRY(SetNroPerms(context->GetProcess(), nro_info->base_address, rx_size, ro_size,
|
||||||
rw_size + bss_size));
|
rw_size + bss_size));
|
||||||
@@ -561,7 +531,7 @@ public:
|
|||||||
Result MapManualLoadModuleMemory(Out<u64> out_load_address, ClientProcessId client_pid,
|
Result MapManualLoadModuleMemory(Out<u64> out_load_address, ClientProcessId client_pid,
|
||||||
u64 nro_address, u64 nro_size, u64 bss_address, u64 bss_size) {
|
u64 nro_address, u64 nro_size, u64 bss_address, u64 bss_size) {
|
||||||
R_TRY(m_ro->ValidateProcess(m_context_id, *client_pid));
|
R_TRY(m_ro->ValidateProcess(m_context_id, *client_pid));
|
||||||
R_RETURN(m_ro->MapManualLoadModuleMemory(system.Kernel(), out_load_address.Get(), m_context_id, nro_address,
|
R_RETURN(m_ro->MapManualLoadModuleMemory(out_load_address.Get(), m_context_id, nro_address,
|
||||||
nro_size, bss_address, bss_size));
|
nro_size, bss_address, bss_size));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,205 +0,0 @@
|
|||||||
// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
|
|
||||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
|
||||||
|
|
||||||
#include <regex>
|
|
||||||
#include <cctype>
|
|
||||||
|
|
||||||
#include "common/assert.h"
|
|
||||||
#include "common/logging.h"
|
|
||||||
#include "common/settings.h"
|
|
||||||
#include "common/string_util.h"
|
|
||||||
#include "common/scm_rev.h"
|
|
||||||
#include "core/core.h"
|
|
||||||
#include "core/hle/service/acc/profile_manager.h"
|
|
||||||
#include "core/launch_params.h"
|
|
||||||
|
|
||||||
#undef _UNICODE
|
|
||||||
#include <getopt.h>
|
|
||||||
#ifndef _MSC_VER
|
|
||||||
#include <unistd.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
namespace Core {
|
|
||||||
LaunchParams ParseLaunchParams(Core::System& system, int argc, char *argv[], wchar_t *argv_w[]) noexcept {
|
|
||||||
LaunchParams p{};
|
|
||||||
|
|
||||||
int option_index = 0;
|
|
||||||
static struct option long_options[] = {
|
|
||||||
// clang-format off
|
|
||||||
{"debug", no_argument, 0, 'd'},
|
|
||||||
{"config", required_argument, 0, 'c'},
|
|
||||||
{"fullscreen", no_argument, 0, 'f'},
|
|
||||||
{"help", no_argument, 0, 'h'},
|
|
||||||
{"game", required_argument, 0, 'g'},
|
|
||||||
{"multiplayer", required_argument, 0, 'm'},
|
|
||||||
{"program", optional_argument, 0, 'p'},
|
|
||||||
{"user", required_argument, 0, 'u'},
|
|
||||||
{"version", no_argument, 0, 'v'},
|
|
||||||
{"input-profile", no_argument, 0, 'i'},
|
|
||||||
{"null-render", no_argument, 0, 'n'},
|
|
||||||
{"singlecore", no_argument, 0, 's'},
|
|
||||||
{"filter", no_argument, 0, 'x'},
|
|
||||||
{0, 0, 0, 0},
|
|
||||||
// clang-format on
|
|
||||||
};
|
|
||||||
|
|
||||||
while (optind < argc) {
|
|
||||||
if (int arg = getopt_long(argc, argv, "dc:fhg:m:p:u:vinsx", long_options, &option_index); arg != -1) {
|
|
||||||
switch (char(arg)) {
|
|
||||||
case 'd':
|
|
||||||
p.override_gdb_port = uint16_t(atoi(optarg));
|
|
||||||
break;
|
|
||||||
case 'c':
|
|
||||||
p.config_path = optarg;
|
|
||||||
break;
|
|
||||||
case 'f':
|
|
||||||
p.fullscreen = true;
|
|
||||||
LOG_INFO(Frontend, "Starting in fullscreen mode...");
|
|
||||||
break;
|
|
||||||
case 'h':
|
|
||||||
p.print_help = true;
|
|
||||||
break;
|
|
||||||
case 'g':
|
|
||||||
p.filepath = std::string(optarg);
|
|
||||||
break;
|
|
||||||
case 'i': {
|
|
||||||
p.input_profile = std::string(optarg);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case 'm': {
|
|
||||||
p.use_multiplayer = true;
|
|
||||||
const std::string str_arg(optarg);
|
|
||||||
// regex to check if the format is nickname:password@ip:port
|
|
||||||
// with optional :password
|
|
||||||
const std::regex re("^([^:]+)(?::(.+))?@([^:]+)(?::([0-9]+))?$");
|
|
||||||
if (std::regex_match(str_arg, re)) {
|
|
||||||
std::smatch match;
|
|
||||||
std::regex_search(str_arg, match, re);
|
|
||||||
ASSERT(match.size() == 5);
|
|
||||||
p.nickname = match[1];
|
|
||||||
p.password = match[2];
|
|
||||||
p.address = match[3];
|
|
||||||
if (!match[4].str().empty()) {
|
|
||||||
p.port = u16(std::strtoul(match[4].str().c_str(), nullptr, 0));
|
|
||||||
}
|
|
||||||
std::regex nickname_re("^[a-zA-Z0-9._\\- ]+$");
|
|
||||||
ASSERT(std::regex_match(p.nickname, nickname_re) && "Nickname is not valid. Must be 4 to 20 alphanumeric characters");
|
|
||||||
ASSERT(!p.address.empty() && "Address is empty");
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case 'p':
|
|
||||||
p.program_args = argv[optind];
|
|
||||||
++optind;
|
|
||||||
break;
|
|
||||||
case 'u': {
|
|
||||||
// Launch game with a specific user
|
|
||||||
bool argument_ok = isdigit(optarg[0]);
|
|
||||||
p.selected_user = atoi(optarg);
|
|
||||||
if (!argument_ok) {
|
|
||||||
// try to look it up by username, only finds the first username that matches.
|
|
||||||
auto const user_idx = system.GetProfileManager().GetUserIndex(optarg);
|
|
||||||
if (user_idx != std::nullopt) {
|
|
||||||
p.selected_user = user_idx.value();
|
|
||||||
} else {
|
|
||||||
LOG_ERROR(Frontend, "Invalid user argument '{}'", optarg);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (system.GetProfileManager().UserExistsIndex(*p.selected_user)) {
|
|
||||||
Settings::values.current_user = s32(*p.selected_user);
|
|
||||||
} else {
|
|
||||||
LOG_ERROR(Frontend, "Selected user {} doesn't exist", *p.selected_user);
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case 'v':
|
|
||||||
p.print_version = true;
|
|
||||||
break;
|
|
||||||
case 'n':
|
|
||||||
p.force_null_render = true;
|
|
||||||
break;
|
|
||||||
case 's':
|
|
||||||
p.force_single_core = true;
|
|
||||||
break;
|
|
||||||
case 'x':
|
|
||||||
p.log_filter = argv[optind];
|
|
||||||
++optind;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
// only kept due to shortcuts made by Qt frontend which use "-qlaunch"
|
|
||||||
if (strcmp(argv[optind], "-hlaunch") == 0) {
|
|
||||||
p.launch_hlaunch = true;
|
|
||||||
} else if (strcmp(argv[optind], "-qlaunch") == 0) {
|
|
||||||
p.launch_qlaunch = true;
|
|
||||||
} else if (strcmp(argv[optind], "-setup") == 0) {
|
|
||||||
p.launch_setup = true;
|
|
||||||
} else {
|
|
||||||
// qt feeds utf8 data, sdl frontend feeds raw utf16 data
|
|
||||||
#ifdef _WIN32
|
|
||||||
p.filepath = argv_w != nullptr
|
|
||||||
? Common::UTF16ToUTF8(argv_w[optind])
|
|
||||||
: argv[optind];
|
|
||||||
#else
|
|
||||||
p.filepath = argv[optind];
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
optind++;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
p.argv0 = argv[0];
|
|
||||||
return p;
|
|
||||||
}
|
|
||||||
|
|
||||||
void ApplyLaunchParams(LaunchParams const& lp) noexcept {
|
|
||||||
// apply the log_filter setting
|
|
||||||
// the logger was initialized before and doesn't pick up the filter on its own
|
|
||||||
Common::Log::Filter filter{};
|
|
||||||
filter.ParseFilterString(lp.log_filter.value_or(Settings::values.log_filter.GetValue()));
|
|
||||||
Common::Log::SetGlobalFilter(filter);
|
|
||||||
|
|
||||||
if (!lp.program_args.empty()) {
|
|
||||||
Settings::values.program_args = lp.program_args;
|
|
||||||
}
|
|
||||||
if (!lp.input_profile.empty()) {
|
|
||||||
auto& players = Settings::values.players.GetValue();
|
|
||||||
players[0].profile_name = lp.input_profile;
|
|
||||||
}
|
|
||||||
if (lp.selected_user.has_value()) {
|
|
||||||
Settings::values.current_user = std::clamp(*lp.selected_user, 0, 7);
|
|
||||||
}
|
|
||||||
if (lp.override_gdb_port.has_value()) {
|
|
||||||
Settings::values.use_gdbstub = true;
|
|
||||||
Settings::values.gdbstub_port = *lp.override_gdb_port;
|
|
||||||
}
|
|
||||||
if (lp.force_single_core) {
|
|
||||||
Settings::values.use_multi_core = false;
|
|
||||||
}
|
|
||||||
if (lp.force_null_render) {
|
|
||||||
Settings::values.renderer_backend = Settings::RendererBackend::Null;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (lp.print_version) {
|
|
||||||
LOG_INFO(Frontend, "Eden {} {}", Common::g_scm_branch, Common::g_scm_desc);
|
|
||||||
}
|
|
||||||
if (lp.print_help) {
|
|
||||||
LOG_INFO(Frontend,
|
|
||||||
"Usage: {}"
|
|
||||||
" [options] <filename>\n"
|
|
||||||
"-c, --config Load the specified configuration file\n"
|
|
||||||
"-f, --fullscreen Start in fullscreen mode\n"
|
|
||||||
"-g, --game File path of the game to load\n"
|
|
||||||
"-h, --help Display this help and exit\n"
|
|
||||||
"-m, --multiplayer=nick:password@address:port"
|
|
||||||
" Nickname, password, address and port for multiplayer\n"
|
|
||||||
"-p, --program Pass following string as arguments to executable\n"
|
|
||||||
"-u, --user Select a specific user profile from 0 to 7\n"
|
|
||||||
"-d, --debug Run the GDB stub on a port from 1 to 65535\n"
|
|
||||||
"-v, --version Output version information and exit\n",
|
|
||||||
lp.argv0
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,43 +0,0 @@
|
|||||||
// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
|
|
||||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
|
||||||
|
|
||||||
#pragma once
|
|
||||||
|
|
||||||
#include <string>
|
|
||||||
#include <optional>
|
|
||||||
#include "common/common_types.h"
|
|
||||||
#include "network/room.h"
|
|
||||||
|
|
||||||
namespace Core {
|
|
||||||
|
|
||||||
class System;
|
|
||||||
struct LaunchParams {
|
|
||||||
std::string argv0{};
|
|
||||||
std::string filepath{};
|
|
||||||
std::string nickname{};
|
|
||||||
std::string password{};
|
|
||||||
std::string address{};
|
|
||||||
std::string input_profile{};
|
|
||||||
std::string program_args{};
|
|
||||||
std::optional<std::string> config_path{};
|
|
||||||
std::optional<int> selected_user{};
|
|
||||||
std::optional<u16> override_gdb_port{};
|
|
||||||
std::optional<std::string> log_filter{};
|
|
||||||
u16 port = Network::DefaultRoomPort;
|
|
||||||
bool use_multiplayer = false;
|
|
||||||
bool fullscreen = false;
|
|
||||||
bool force_null_render = false;
|
|
||||||
bool force_single_core = false;
|
|
||||||
// print
|
|
||||||
bool print_version = false;
|
|
||||||
bool print_help = false;
|
|
||||||
// qt
|
|
||||||
bool launch_hlaunch = false;
|
|
||||||
bool launch_qlaunch = false;
|
|
||||||
bool launch_setup = false;
|
|
||||||
};
|
|
||||||
|
|
||||||
LaunchParams ParseLaunchParams(Core::System& system, int argc, char *argv[], wchar_t *argv_w[]) noexcept;
|
|
||||||
void ApplyLaunchParams(LaunchParams const& lp) noexcept;
|
|
||||||
|
|
||||||
}
|
|
||||||
+4
-31
@@ -7,14 +7,12 @@
|
|||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
#include <cinttypes>
|
#include <cinttypes>
|
||||||
#include <cstring>
|
#include <cstring>
|
||||||
#include <span>
|
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
#include "common/common_funcs.h"
|
#include "common/common_funcs.h"
|
||||||
#include "common/hex_util.h"
|
#include "common/hex_util.h"
|
||||||
#include "common/logging.h"
|
#include "common/logging.h"
|
||||||
#include "common/lz4_compression.h"
|
#include "common/lz4_compression.h"
|
||||||
#include "common/zbic_compression.h"
|
|
||||||
#include "common/settings.h"
|
#include "common/settings.h"
|
||||||
#include "common/swap.h"
|
#include "common/swap.h"
|
||||||
#include "core/core.h"
|
#include "core/core.h"
|
||||||
@@ -106,36 +104,11 @@ std::optional<VAddr> AppLoader_NSO::LoadModule(Kernel::KProcess& process, Core::
|
|||||||
for (std::size_t i = 0; i < nso_header.segments.size(); ++i) {
|
for (std::size_t i = 0; i < nso_header.segments.size(); ++i) {
|
||||||
nso_file.Read(compressed_data.data(), nso_header.segments_compressed_size[i], nso_header.segments[i].offset);
|
nso_file.Read(compressed_data.data(), nso_header.segments_compressed_size[i], nso_header.segments[i].offset);
|
||||||
if (nso_header.IsSegmentCompressed(i)) {
|
if (nso_header.IsSegmentCompressed(i)) {
|
||||||
if (nso_header.IsZBICCompressed()) {
|
int r = Common::Compression::DecompressDataLZ4(decompressed_size.data(), nso_header.segments[i].size, compressed_data.data(), nso_header.segments_compressed_size[i]);
|
||||||
// ZBIC compression
|
ASSERT(r == int(nso_header.segments[i].size));
|
||||||
const int r = Common::Compression::DecompressDataZBIC(
|
std::memcpy(codeset.memory.data() + module_start + nso_header.segments[i].location, decompressed_size.data(), nso_header.segments[i].size);
|
||||||
std::span<u8>{decompressed_size}.first(nso_header.segments[i].size),
|
|
||||||
std::span<const u8>{compressed_data}.first(nso_header.segments_compressed_size[i])
|
|
||||||
);
|
|
||||||
ASSERT(r > 0);
|
|
||||||
} else {
|
|
||||||
// LZ4 compression
|
|
||||||
int r = Common::Compression::DecompressDataLZ4(
|
|
||||||
decompressed_size.data(),
|
|
||||||
nso_header.segments[i].size,
|
|
||||||
compressed_data.data(),
|
|
||||||
nso_header.segments_compressed_size[i]
|
|
||||||
);
|
|
||||||
ASSERT(r == int(nso_header.segments[i].size));
|
|
||||||
}
|
|
||||||
|
|
||||||
std::memcpy(
|
|
||||||
codeset.memory.data() + module_start + nso_header.segments[i].location,
|
|
||||||
decompressed_size.data(),
|
|
||||||
nso_header.segments[i].size
|
|
||||||
);
|
|
||||||
} else {
|
} else {
|
||||||
// Not compressed
|
std::memcpy(codeset.memory.data() + module_start + nso_header.segments[i].location, compressed_data.data(), nso_header.segments[i].size);
|
||||||
std::memcpy(
|
|
||||||
codeset.memory.data() + module_start + nso_header.segments[i].location,
|
|
||||||
compressed_data.data(),
|
|
||||||
nso_header.segments[i].size
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
codeset.segments[i].addr = module_start + nso_header.segments[i].location;
|
codeset.segments[i].addr = module_start + nso_header.segments[i].location;
|
||||||
codeset.segments[i].offset = module_start + nso_header.segments[i].location;
|
codeset.segments[i].offset = module_start + nso_header.segments[i].location;
|
||||||
|
|||||||
@@ -1,6 +1,3 @@
|
|||||||
// 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
|
||||||
|
|
||||||
@@ -61,9 +58,6 @@ struct NSOHeader {
|
|||||||
std::array<SHA256Hash, 3> segment_hashes;
|
std::array<SHA256Hash, 3> segment_hashes;
|
||||||
|
|
||||||
bool IsSegmentCompressed(size_t segment_num) const;
|
bool IsSegmentCompressed(size_t segment_num) const;
|
||||||
bool IsZBICCompressed() const {
|
|
||||||
return ((flags >> 7) & 1) != 0;
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
static_assert(sizeof(NSOHeader) == 0x100, "NSOHeader has incorrect size.");
|
static_assert(sizeof(NSOHeader) == 0x100, "NSOHeader has incorrect size.");
|
||||||
static_assert(std::is_trivially_copyable_v<NSOHeader>, "NSOHeader must be trivially copyable.");
|
static_assert(std::is_trivially_copyable_v<NSOHeader>, "NSOHeader must be trivially copyable.");
|
||||||
|
|||||||
+40
-43
@@ -101,10 +101,8 @@ struct Memory::Impl {
|
|||||||
}
|
}
|
||||||
|
|
||||||
u64 protect_bytes = 0, protect_begin = 0;
|
u64 protect_bytes = 0, protect_begin = 0;
|
||||||
|
|
||||||
current_page_table->entries.CommitRegion(vaddr >> YUZU_PAGEBITS, (vaddr + size) >> YUZU_PAGEBITS);
|
|
||||||
for (u64 addr = vaddr; addr < vaddr + size; addr += YUZU_PAGESIZE) {
|
for (u64 addr = vaddr; addr < vaddr + size; addr += YUZU_PAGESIZE) {
|
||||||
const Common::PageType page_type = current_page_table->entries.GetUnchecked(addr >> YUZU_PAGEBITS).Type();
|
const Common::PageType page_type = current_page_table->entries[addr >> YUZU_PAGEBITS].ptr.Type();
|
||||||
switch (page_type) {
|
switch (page_type) {
|
||||||
case Common::PageType::RasterizerCachedMemory:
|
case Common::PageType::RasterizerCachedMemory:
|
||||||
if (protect_bytes > 0) {
|
if (protect_bytes > 0) {
|
||||||
@@ -125,14 +123,16 @@ struct Memory::Impl {
|
|||||||
}
|
}
|
||||||
|
|
||||||
[[nodiscard]] u8* GetPointerFromRasterizerCachedMemory(u64 vaddr) const {
|
[[nodiscard]] u8* GetPointerFromRasterizerCachedMemory(u64 vaddr) const {
|
||||||
if (u64 paddr = current_page_table->entries[vaddr >> YUZU_PAGEBITS].Pointer(true); paddr)
|
Common::PhysicalAddress const paddr = current_page_table->entries[vaddr >> YUZU_PAGEBITS].addr;
|
||||||
return reinterpret_cast<u8*>(paddr) + vaddr;
|
if (paddr)
|
||||||
|
return system.DeviceMemory().GetPointer<u8>(paddr + vaddr);
|
||||||
return {};
|
return {};
|
||||||
}
|
}
|
||||||
|
|
||||||
[[nodiscard]] u8* GetPointerFromDebugMemory(u64 vaddr) const {
|
[[nodiscard]] u8* GetPointerFromDebugMemory(u64 vaddr) const {
|
||||||
if (u64 paddr = current_page_table->entries[vaddr >> YUZU_PAGEBITS].Pointer(true); paddr)
|
const Common::PhysicalAddress paddr = current_page_table->entries[vaddr >> YUZU_PAGEBITS].addr;
|
||||||
return reinterpret_cast<u8*>(paddr) + vaddr;
|
if (paddr != 0)
|
||||||
|
return system.DeviceMemory().GetPointer<u8>(paddr + vaddr);
|
||||||
return {};
|
return {};
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -243,12 +243,10 @@ struct Memory::Impl {
|
|||||||
std::size_t page_index = addr >> YUZU_PAGEBITS;
|
std::size_t page_index = addr >> YUZU_PAGEBITS;
|
||||||
std::size_t page_offset = addr & YUZU_PAGEMASK;
|
std::size_t page_offset = addr & YUZU_PAGEMASK;
|
||||||
bool user_accessible = true;
|
bool user_accessible = true;
|
||||||
|
|
||||||
current_page_table->entries.CommitRegion(page_index, page_index + (size >> YUZU_PAGEBITS) + 1);
|
|
||||||
while (remaining_size != 0) {
|
while (remaining_size != 0) {
|
||||||
const std::size_t copy_amount = (std::min)(std::size_t(YUZU_PAGESIZE) - page_offset, remaining_size);
|
const std::size_t copy_amount = (std::min)(std::size_t(YUZU_PAGESIZE) - page_offset, remaining_size);
|
||||||
const auto current_vaddr = u64((page_index << YUZU_PAGEBITS) + page_offset);
|
const auto current_vaddr = u64((page_index << YUZU_PAGEBITS) + page_offset);
|
||||||
const auto [pointer, type, _] = current_page_table->entries.GetUnchecked(page_index).PointerTypeBlock();
|
const auto [pointer, type] = current_page_table->entries[page_index].ptr.PointerType();
|
||||||
switch (type) {
|
switch (type) {
|
||||||
case Common::PageType::Unmapped: {
|
case Common::PageType::Unmapped: {
|
||||||
user_accessible = false;
|
user_accessible = false;
|
||||||
@@ -299,10 +297,10 @@ struct Memory::Impl {
|
|||||||
}
|
}
|
||||||
|
|
||||||
[[nodiscard]] inline const u8* GetSpan(const VAddr addr, const std::size_t size) const noexcept {
|
[[nodiscard]] inline const u8* GetSpan(const VAddr addr, const std::size_t size) const noexcept {
|
||||||
return (current_page_table->entries[addr >> YUZU_PAGEBITS].Block() == current_page_table->entries[(addr + size) >> YUZU_PAGEBITS].Block()) ? GetPointerSilent(addr) : nullptr;
|
return (current_page_table->entries[addr >> YUZU_PAGEBITS].block == current_page_table->entries[(addr + size) >> YUZU_PAGEBITS].block) ? GetPointerSilent(addr) : nullptr;
|
||||||
}
|
}
|
||||||
[[nodiscard]] inline u8* GetSpan(const VAddr addr, const std::size_t size) noexcept {
|
[[nodiscard]] inline u8* GetSpan(const VAddr addr, const std::size_t size) noexcept {
|
||||||
return (current_page_table->entries[addr >> YUZU_PAGEBITS].Block() == current_page_table->entries[(addr + size) >> YUZU_PAGEBITS].Block()) ? GetPointerSilent(addr) : nullptr;
|
return (current_page_table->entries[addr >> YUZU_PAGEBITS].block == current_page_table->entries[(addr + size) >> YUZU_PAGEBITS].block) ? GetPointerSilent(addr) : nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool WriteBlockImpl(const Common::ProcessAddress addr, const void* buffer, const std::size_t size, bool unsafe) {
|
bool WriteBlockImpl(const Common::ProcessAddress addr, const void* buffer, const std::size_t size, bool unsafe) {
|
||||||
@@ -406,14 +404,11 @@ struct Memory::Impl {
|
|||||||
// The region is at a granularity of CPU pages.
|
// The region is at a granularity of CPU pages.
|
||||||
|
|
||||||
const u64 num_pages = ((vaddr + size - 1) >> YUZU_PAGEBITS) - (vaddr >> YUZU_PAGEBITS) + 1;
|
const u64 num_pages = ((vaddr + size - 1) >> YUZU_PAGEBITS) - (vaddr >> YUZU_PAGEBITS) + 1;
|
||||||
|
|
||||||
current_page_table->entries.CommitRegion(vaddr >> YUZU_PAGEBITS, (vaddr >> YUZU_PAGEBITS) + num_pages);
|
|
||||||
for (u64 i = 0; i < num_pages; ++i, vaddr += YUZU_PAGESIZE) {
|
for (u64 i = 0; i < num_pages; ++i, vaddr += YUZU_PAGESIZE) {
|
||||||
auto& entry = current_page_table->entries.GetUnchecked(vaddr >> YUZU_PAGEBITS);
|
const Common::PageType page_type = current_page_table->entries[vaddr >> YUZU_PAGEBITS].ptr.Type();
|
||||||
const auto [pointer, type, block] = entry.PointerTypeBlock(true);
|
|
||||||
if (debug) {
|
if (debug) {
|
||||||
// Switch page type to debug if now debug
|
// Switch page type to debug if now debug
|
||||||
switch (type) {
|
switch (page_type) {
|
||||||
case Common::PageType::Unmapped:
|
case Common::PageType::Unmapped:
|
||||||
ASSERT(false && "Attempted to mark unmapped pages as debug");
|
ASSERT(false && "Attempted to mark unmapped pages as debug");
|
||||||
break;
|
break;
|
||||||
@@ -422,14 +417,14 @@ struct Memory::Impl {
|
|||||||
// Page is already marked.
|
// Page is already marked.
|
||||||
break;
|
break;
|
||||||
case Common::PageType::Memory:
|
case Common::PageType::Memory:
|
||||||
entry.MarkDebug(pointer, block);
|
current_page_table->entries[vaddr >> YUZU_PAGEBITS].ptr.Store(0, Common::PageType::DebugMemory);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
UNREACHABLE();
|
UNREACHABLE();
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// Switch page type to non-debug if now non-debug
|
// Switch page type to non-debug if now non-debug
|
||||||
switch (type) {
|
switch (page_type) {
|
||||||
case Common::PageType::Unmapped:
|
case Common::PageType::Unmapped:
|
||||||
ASSERT(false && "Attempted to mark unmapped pages as non-debug");
|
ASSERT(false && "Attempted to mark unmapped pages as non-debug");
|
||||||
break;
|
break;
|
||||||
@@ -438,7 +433,8 @@ struct Memory::Impl {
|
|||||||
// Don't mess with already non-debug or rasterizer memory.
|
// Don't mess with already non-debug or rasterizer memory.
|
||||||
break;
|
break;
|
||||||
case Common::PageType::DebugMemory: {
|
case Common::PageType::DebugMemory: {
|
||||||
entry.Store(false, Common::PageType::Memory, block, pointer);
|
u8* const pointer = GetPointerFromDebugMemory(vaddr & ~YUZU_PAGEMASK);
|
||||||
|
current_page_table->entries[vaddr >> YUZU_PAGEBITS].ptr.Store(uintptr_t(pointer) - (vaddr & ~YUZU_PAGEMASK), Common::PageType::Memory);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
default:
|
default:
|
||||||
@@ -470,10 +466,8 @@ struct Memory::Impl {
|
|||||||
// is different). This assumes the specified GPU address region is contiguous as well.
|
// is different). This assumes the specified GPU address region is contiguous as well.
|
||||||
|
|
||||||
const u64 num_pages = ((vaddr + size - 1) >> YUZU_PAGEBITS) - (vaddr >> YUZU_PAGEBITS) + 1;
|
const u64 num_pages = ((vaddr + size - 1) >> YUZU_PAGEBITS) - (vaddr >> YUZU_PAGEBITS) + 1;
|
||||||
current_page_table->entries.CommitRegion(vaddr >> YUZU_PAGEBITS, (vaddr >> YUZU_PAGEBITS) + num_pages);
|
|
||||||
for (u64 i = 0; i < num_pages; ++i, vaddr += YUZU_PAGESIZE) {
|
for (u64 i = 0; i < num_pages; ++i, vaddr += YUZU_PAGESIZE) {
|
||||||
auto& entry = current_page_table->entries.GetUnchecked(vaddr >> YUZU_PAGEBITS);
|
const Common::PageType page_type= current_page_table->entries[vaddr >> YUZU_PAGEBITS].ptr.Type();
|
||||||
const Common::PageType page_type = entry.Type();
|
|
||||||
if (cached) {
|
if (cached) {
|
||||||
// Switch page type to cached if now cached
|
// Switch page type to cached if now cached
|
||||||
switch (page_type) {
|
switch (page_type) {
|
||||||
@@ -483,7 +477,7 @@ struct Memory::Impl {
|
|||||||
break;
|
break;
|
||||||
case Common::PageType::DebugMemory:
|
case Common::PageType::DebugMemory:
|
||||||
case Common::PageType::Memory:
|
case Common::PageType::Memory:
|
||||||
entry.MarkRasterizerCached();
|
current_page_table->entries[vaddr >> YUZU_PAGEBITS].ptr.Store(0, Common::PageType::RasterizerCachedMemory);
|
||||||
break;
|
break;
|
||||||
case Common::PageType::RasterizerCachedMemory:
|
case Common::PageType::RasterizerCachedMemory:
|
||||||
// There can be more than one GPU region mapped per CPU region, so it's common
|
// There can be more than one GPU region mapped per CPU region, so it's common
|
||||||
@@ -505,13 +499,13 @@ struct Memory::Impl {
|
|||||||
// that this area is already unmarked as cached.
|
// that this area is already unmarked as cached.
|
||||||
break;
|
break;
|
||||||
case Common::PageType::RasterizerCachedMemory: {
|
case Common::PageType::RasterizerCachedMemory: {
|
||||||
if (auto [ptr, _, block] = entry.PointerTypeBlock(true); ptr == 0) {
|
if (u8* const pointer = GetPointerFromRasterizerCachedMemory(vaddr & ~YUZU_PAGEMASK); pointer == nullptr) {
|
||||||
// It's possible that this function has been called while updating the
|
// It's possible that this function has been called while updating the
|
||||||
// pagetable after unmapping a VMA. In that case the underlying VMA will no
|
// pagetable after unmapping a VMA. In that case the underlying VMA will no
|
||||||
// longer exist, and we should just leave the pagetable entry blank.
|
// longer exist, and we should just leave the pagetable entry blank.
|
||||||
entry.Store(false, Common::PageType::Unmapped, block, 0);
|
current_page_table->entries[vaddr >> YUZU_PAGEBITS].ptr.Store(0, Common::PageType::Unmapped);
|
||||||
} else {
|
} else {
|
||||||
entry.Store(false, Common::PageType::Memory, block, ptr);
|
current_page_table->entries[vaddr >> YUZU_PAGEBITS].ptr.Store(uintptr_t(pointer) - (vaddr & ~YUZU_PAGEMASK), Common::PageType::Memory);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -545,18 +539,22 @@ struct Memory::Impl {
|
|||||||
ASSERT_MSG(type != Common::PageType::Memory,
|
ASSERT_MSG(type != Common::PageType::Memory,
|
||||||
"Mapping memory page without a pointer @ {:016x}", base * YUZU_PAGESIZE);
|
"Mapping memory page without a pointer @ {:016x}", base * YUZU_PAGESIZE);
|
||||||
|
|
||||||
page_table.entries.ZeroRegion(base, end);
|
|
||||||
} else {
|
|
||||||
auto current_block = block_count.fetch_add(1, std::memory_order_relaxed);
|
|
||||||
ASSERT(current_block != 65535);
|
|
||||||
|
|
||||||
page_table.entries.CommitRegion(base, end);
|
|
||||||
while (base != end) {
|
while (base != end) {
|
||||||
auto host_ptr = reinterpret_cast<u64>(system.DeviceMemory().GetPointer<u8>(target)) - (base << YUZU_PAGEBITS);;
|
page_table.entries[base].ptr.Store(0, type);
|
||||||
auto& entry = page_table.entries.GetUnchecked(base);
|
page_table.entries[base].addr = 0;
|
||||||
|
page_table.entries[base].block = 0;
|
||||||
|
base += 1;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
auto orig_base = base;
|
||||||
|
while (base != end) {
|
||||||
|
auto host_ptr = uintptr_t(system.DeviceMemory().GetPointer<u8>(target)) - (base << YUZU_PAGEBITS);
|
||||||
|
auto backing = GetInteger(target) - (base << YUZU_PAGEBITS);
|
||||||
|
page_table.entries[base].ptr.Store(host_ptr, type);
|
||||||
|
page_table.entries[base].addr = backing;
|
||||||
|
page_table.entries[base].block = orig_base << YUZU_PAGEBITS;
|
||||||
|
|
||||||
entry.Store(false, type, current_block, host_ptr);
|
ASSERT_MSG(page_table.entries[base].ptr.Pointer(),
|
||||||
ASSERT_MSG(page_table.entries[base].Pointer(),
|
|
||||||
"memory mapping base yield a nullptr within the table");
|
"memory mapping base yield a nullptr within the table");
|
||||||
|
|
||||||
base += 1;
|
base += 1;
|
||||||
@@ -571,11 +569,11 @@ struct Memory::Impl {
|
|||||||
vaddr &= 0xffffffffffffULL;
|
vaddr &= 0xffffffffffffULL;
|
||||||
if (AddressSpaceContains(*current_page_table, vaddr, 1)) [[likely]] {
|
if (AddressSpaceContains(*current_page_table, vaddr, 1)) [[likely]] {
|
||||||
// Avoid adding any extra logic to this fast-path block
|
// Avoid adding any extra logic to this fast-path block
|
||||||
const auto raw = current_page_table->entries[vaddr >> YUZU_PAGEBITS].Raw();
|
const uintptr_t raw_pointer = current_page_table->entries[vaddr >> YUZU_PAGEBITS].ptr.Raw();
|
||||||
if (auto pointer = Common::PageTable::PageEntryData::ExtractPointer(raw); pointer) [[likely]] {
|
if (const uintptr_t pointer = Common::PageTable::PageInfo::ExtractPointer(raw_pointer)) [[likely]] {
|
||||||
return reinterpret_cast<u8*>(pointer + vaddr);
|
return reinterpret_cast<u8*>(pointer + vaddr);
|
||||||
} else {
|
} else {
|
||||||
switch (static_cast<Common::PageType>(raw.type)) {
|
switch (Common::PageTable::PageInfo::ExtractType(raw_pointer)) {
|
||||||
case Common::PageType::Memory:
|
case Common::PageType::Memory:
|
||||||
ASSERT_MSG(false, "Mapped memory page without a pointer @ {:#016x}", vaddr);
|
ASSERT_MSG(false, "Mapped memory page without a pointer @ {:#016x}", vaddr);
|
||||||
return nullptr;
|
return nullptr;
|
||||||
@@ -757,7 +755,7 @@ struct Memory::Impl {
|
|||||||
};
|
};
|
||||||
auto& gpu = system.GPU();
|
auto& gpu = system.GPU();
|
||||||
gpu_device_memory->ApplyOpOnPointer(
|
gpu_device_memory->ApplyOpOnPointer(
|
||||||
p, scratch_buffers[core], [&](DAddr address) { gpu.InvalidateRegion(address, size, true); });
|
p, scratch_buffers[core], [&](DAddr address) { gpu.InvalidateRegion(address, size); });
|
||||||
}
|
}
|
||||||
|
|
||||||
Core::System& system;
|
Core::System& system;
|
||||||
@@ -775,7 +773,6 @@ struct Memory::Impl {
|
|||||||
#else
|
#else
|
||||||
Common::HostMemory* host_buffer{};
|
Common::HostMemory* host_buffer{};
|
||||||
#endif
|
#endif
|
||||||
std::atomic<u16> block_count = 0;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
Memory::Memory(Core::System& system_) : system{system_} {
|
Memory::Memory(Core::System& system_) : system{system_} {
|
||||||
@@ -814,7 +811,7 @@ bool Memory::IsValidVirtualAddress(const Common::ProcessAddress vaddr) const {
|
|||||||
if (page >= page_table.entries.size()) {
|
if (page >= page_table.entries.size()) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
const auto [pointer, type, _] = page_table.entries[page].PointerTypeBlock();
|
const auto [pointer, type] = page_table.entries[page].ptr.PointerType();
|
||||||
return pointer != 0 || type == Common::PageType::RasterizerCachedMemory ||
|
return pointer != 0 || type == Common::PageType::RasterizerCachedMemory ||
|
||||||
type == Common::PageType::DebugMemory;
|
type == Common::PageType::DebugMemory;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -407,10 +407,8 @@ EmitConfig A32AddressSpace::GetEmitConfig() {
|
|||||||
|
|
||||||
.page_table_pointer = std::bit_cast<u64>(conf.page_table),
|
.page_table_pointer = std::bit_cast<u64>(conf.page_table),
|
||||||
.page_table_address_space_bits = 32,
|
.page_table_address_space_bits = 32,
|
||||||
.page_table_pointer_mask = conf.page_table_pointer_mask,
|
.page_table_pointer_mask_bits = conf.page_table_pointer_mask_bits,
|
||||||
.page_table_log2_stride = conf.page_table_log2_stride,
|
.page_table_log2_stride = conf.page_table_log2_stride,
|
||||||
.page_table_marked_bit = conf.page_table_marked_bit,
|
|
||||||
.page_table_sign_extension = conf.page_table_sign_extension,
|
|
||||||
.silently_mirror_page_table = true,
|
.silently_mirror_page_table = true,
|
||||||
.absolute_offset_page_table = conf.absolute_offset_page_table,
|
.absolute_offset_page_table = conf.absolute_offset_page_table,
|
||||||
.detect_misaligned_access_via_page_table = conf.detect_misaligned_access_via_page_table,
|
.detect_misaligned_access_via_page_table = conf.detect_misaligned_access_via_page_table,
|
||||||
|
|||||||
@@ -579,10 +579,8 @@ EmitConfig A64AddressSpace::GetEmitConfig() {
|
|||||||
|
|
||||||
.page_table_pointer = std::bit_cast<u64>(conf.page_table),
|
.page_table_pointer = std::bit_cast<u64>(conf.page_table),
|
||||||
.page_table_address_space_bits = conf.page_table_address_space_bits,
|
.page_table_address_space_bits = conf.page_table_address_space_bits,
|
||||||
.page_table_pointer_mask = conf.page_table_pointer_mask,
|
.page_table_pointer_mask_bits = conf.page_table_pointer_mask_bits,
|
||||||
.page_table_log2_stride = conf.page_table_log2_stride,
|
.page_table_log2_stride = conf.page_table_log2_stride,
|
||||||
.page_table_marked_bit = conf.page_table_marked_bit,
|
|
||||||
.page_table_sign_extension = conf.page_table_sign_extension,
|
|
||||||
.silently_mirror_page_table = conf.silently_mirror_page_table,
|
.silently_mirror_page_table = conf.silently_mirror_page_table,
|
||||||
.absolute_offset_page_table = conf.absolute_offset_page_table,
|
.absolute_offset_page_table = conf.absolute_offset_page_table,
|
||||||
.detect_misaligned_access_via_page_table = conf.detect_misaligned_access_via_page_table,
|
.detect_misaligned_access_via_page_table = conf.detect_misaligned_access_via_page_table,
|
||||||
|
|||||||
@@ -128,10 +128,8 @@ struct EmitConfig {
|
|||||||
// Page table
|
// Page table
|
||||||
u64 page_table_pointer;
|
u64 page_table_pointer;
|
||||||
std::size_t page_table_address_space_bits;
|
std::size_t page_table_address_space_bits;
|
||||||
u64 page_table_pointer_mask;
|
int page_table_pointer_mask_bits;
|
||||||
std::size_t page_table_log2_stride;
|
std::size_t page_table_log2_stride;
|
||||||
std::optional<std::uint8_t> page_table_marked_bit;
|
|
||||||
std::optional<std::uint8_t> page_table_sign_extension;
|
|
||||||
bool silently_mirror_page_table;
|
bool silently_mirror_page_table;
|
||||||
bool absolute_offset_page_table;
|
bool absolute_offset_page_table;
|
||||||
u8 detect_misaligned_access_via_page_table;
|
u8 detect_misaligned_access_via_page_table;
|
||||||
|
|||||||
@@ -273,18 +273,9 @@ std::pair<oaknut::XReg, oaknut::XReg> InlinePageTableEmitVAddrLookup(oaknut::Cod
|
|||||||
// load x0 = *<(u8*)pagetable + index>
|
// load x0 = *<(u8*)pagetable + index>
|
||||||
code.LDR(Xscratch0, Xpagetable, Xscratch0);
|
code.LDR(Xscratch0, Xpagetable, Xscratch0);
|
||||||
|
|
||||||
if (ctx.conf.page_table_marked_bit) {
|
if (ctx.conf.page_table_pointer_mask_bits != 0) {
|
||||||
code.TST(Xscratch0, 1ULL << *ctx.conf.page_table_marked_bit);
|
const u64 mask = u64(~u64(0)) << ctx.conf.page_table_pointer_mask_bits;
|
||||||
code.B(NE, *fallback);
|
code.AND(Xscratch0, Xscratch0, mask);
|
||||||
}
|
|
||||||
|
|
||||||
if (ctx.conf.page_table_pointer_mask != 0) {
|
|
||||||
code.AND(Xscratch0, Xscratch0, ctx.conf.page_table_pointer_mask);
|
|
||||||
}
|
|
||||||
|
|
||||||
// TODO: combine this with page_table_pointer_mask
|
|
||||||
if (ctx.conf.page_table_sign_extension) {
|
|
||||||
code.SBFM(Xscratch0, Xscratch0, 0, *ctx.conf.page_table_sign_extension);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
code.CBZ(Xscratch0, *fallback);
|
code.CBZ(Xscratch0, *fallback);
|
||||||
|
|||||||
@@ -9,7 +9,6 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <bit>
|
#include <bit>
|
||||||
#include <utility>
|
|
||||||
#include "dynarmic/backend/x64/xbyak.h"
|
#include "dynarmic/backend/x64/xbyak.h"
|
||||||
|
|
||||||
#include "dynarmic/backend/x64/a32_emit_x64.h"
|
#include "dynarmic/backend/x64/a32_emit_x64.h"
|
||||||
@@ -79,46 +78,27 @@ Xbyak::RegExp EmitVAddrLookup(BlockOfCode& code, EmitContext& ctx, size_t bitsiz
|
|||||||
template<>
|
template<>
|
||||||
[[maybe_unused]] Xbyak::RegExp EmitVAddrLookup<A32EmitContext>(BlockOfCode& code, A32EmitContext& ctx, size_t bitsize, Xbyak::Label& abort, Xbyak::Reg64 vaddr) {
|
[[maybe_unused]] Xbyak::RegExp EmitVAddrLookup<A32EmitContext>(BlockOfCode& code, A32EmitContext& ctx, size_t bitsize, Xbyak::Label& abort, Xbyak::Reg64 vaddr) {
|
||||||
const Xbyak::Reg64 page = ctx.reg_alloc.ScratchGpr(code);
|
const Xbyak::Reg64 page = ctx.reg_alloc.ScratchGpr(code);
|
||||||
const Xbyak::Reg64 tmp = ctx.conf.absolute_offset_page_table && ctx.conf.page_table_pointer_mask == 0 ? page : ctx.reg_alloc.ScratchGpr(code);
|
const Xbyak::Reg32 tmp = ctx.conf.absolute_offset_page_table ? page.cvt32() : ctx.reg_alloc.ScratchGpr(code).cvt32();
|
||||||
|
|
||||||
EmitDetectMisalignedVAddr(code, ctx, bitsize, abort, vaddr, tmp);
|
EmitDetectMisalignedVAddr(code, ctx, bitsize, abort, vaddr, tmp.cvt64());
|
||||||
|
|
||||||
code.mov(tmp, vaddr);
|
// TODO: This code assumes vaddr has been zext from 32-bits to 64-bits.
|
||||||
|
|
||||||
|
code.mov(tmp, vaddr.cvt32());
|
||||||
code.shr(tmp, int(page_table_const_bits));
|
code.shr(tmp, int(page_table_const_bits));
|
||||||
|
code.shl(tmp, int(ctx.conf.page_table_log2_stride));
|
||||||
if (ctx.conf.page_table_log2_stride > 3) {
|
code.mov(page, qword[r14 + tmp.cvt64()]);
|
||||||
code.shl(tmp, int(ctx.conf.page_table_log2_stride));
|
if (ctx.conf.page_table_pointer_mask_bits == 0) {
|
||||||
code.mov(page, qword[r14 + tmp.cvt64()]);
|
|
||||||
} else {
|
|
||||||
code.mov(page, qword[r14 + tmp.cvt64() * int(1 << ctx.conf.page_table_log2_stride)]);
|
|
||||||
}
|
|
||||||
|
|
||||||
// check for marked bit, use as unmapped if marked
|
|
||||||
if (ctx.conf.page_table_marked_bit) {
|
|
||||||
code.bt(page, *ctx.conf.page_table_marked_bit);
|
|
||||||
code.jc(abort, code.T_NEAR);
|
|
||||||
}
|
|
||||||
// mask away attributes
|
|
||||||
if (ctx.conf.page_table_pointer_mask == 0) {
|
|
||||||
code.test(page, page);
|
code.test(page, page);
|
||||||
} else if (std::in_range<s32>(ctx.conf.page_table_pointer_mask)) {
|
|
||||||
code.and_(page, ctx.conf.page_table_pointer_mask);
|
|
||||||
} else {
|
} else {
|
||||||
code.mov(tmp, ctx.conf.page_table_pointer_mask);
|
code.and_(page, ~u32(0) << ctx.conf.page_table_pointer_mask_bits);
|
||||||
code.and_(page, tmp);
|
|
||||||
}
|
}
|
||||||
// check for sign bit, apply sign extension as needed
|
|
||||||
if (ctx.conf.page_table_sign_extension) {
|
|
||||||
code.shl(page, 63 - int(*ctx.conf.page_table_sign_extension));
|
|
||||||
code.sar(page, 63 - int(*ctx.conf.page_table_sign_extension));
|
|
||||||
}
|
|
||||||
|
|
||||||
code.jz(abort, code.T_NEAR);
|
code.jz(abort, code.T_NEAR);
|
||||||
if (ctx.conf.absolute_offset_page_table) {
|
if (ctx.conf.absolute_offset_page_table) {
|
||||||
return page + vaddr;
|
return page + vaddr;
|
||||||
}
|
}
|
||||||
code.mov(tmp, vaddr);
|
code.mov(tmp, vaddr.cvt32());
|
||||||
code.and_(tmp, u32(page_table_const_mask));
|
code.and_(tmp, static_cast<u32>(page_table_const_mask));
|
||||||
return page + tmp.cvt64();
|
return page + tmp.cvt64();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -128,7 +108,7 @@ template<>
|
|||||||
const size_t unused_top_bits = 64 - ctx.conf.page_table_address_space_bits;
|
const size_t unused_top_bits = 64 - ctx.conf.page_table_address_space_bits;
|
||||||
|
|
||||||
const Xbyak::Reg64 page = ctx.reg_alloc.ScratchGpr(code);
|
const Xbyak::Reg64 page = ctx.reg_alloc.ScratchGpr(code);
|
||||||
const Xbyak::Reg64 tmp = ctx.conf.absolute_offset_page_table && ctx.conf.page_table_pointer_mask == 0 ? page : ctx.reg_alloc.ScratchGpr(code);
|
const Xbyak::Reg64 tmp = ctx.conf.absolute_offset_page_table ? page : ctx.reg_alloc.ScratchGpr(code);
|
||||||
|
|
||||||
EmitDetectMisalignedVAddr(code, ctx, bitsize, abort, vaddr, tmp);
|
EmitDetectMisalignedVAddr(code, ctx, bitsize, abort, vaddr, tmp);
|
||||||
|
|
||||||
@@ -161,33 +141,13 @@ template<>
|
|||||||
code.jnz(abort, code.T_NEAR);
|
code.jnz(abort, code.T_NEAR);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ctx.conf.page_table_log2_stride > 3) {
|
code.shl(tmp, int(ctx.conf.page_table_log2_stride));
|
||||||
code.shl(tmp, int(ctx.conf.page_table_log2_stride));
|
code.mov(page, qword[r14 + tmp]);
|
||||||
code.mov(page, qword[r14 + tmp.cvt64()]);
|
if (ctx.conf.page_table_pointer_mask_bits == 0) {
|
||||||
} else {
|
|
||||||
code.mov(page, qword[r14 + tmp.cvt64() * int(1 << ctx.conf.page_table_log2_stride)]);
|
|
||||||
}
|
|
||||||
|
|
||||||
// check for marked bit, use as unmapped if marked
|
|
||||||
if (ctx.conf.page_table_marked_bit) {
|
|
||||||
code.bt(page, *ctx.conf.page_table_marked_bit);
|
|
||||||
code.jc(abort, code.T_NEAR);
|
|
||||||
}
|
|
||||||
// mask away attributes
|
|
||||||
if (ctx.conf.page_table_pointer_mask == 0) {
|
|
||||||
code.test(page, page);
|
code.test(page, page);
|
||||||
} else if (std::in_range<s32>(ctx.conf.page_table_pointer_mask)) {
|
|
||||||
code.and_(page, ctx.conf.page_table_pointer_mask);
|
|
||||||
} else {
|
} else {
|
||||||
code.mov(tmp, ctx.conf.page_table_pointer_mask);
|
code.and_(page, ~u32(0) << ctx.conf.page_table_pointer_mask_bits);
|
||||||
code.and_(page, tmp);
|
|
||||||
}
|
}
|
||||||
// check for sign bit, apply sign extension as needed
|
|
||||||
if (ctx.conf.page_table_sign_extension) {
|
|
||||||
code.shl(page, *ctx.conf.page_table_sign_extension);
|
|
||||||
code.sar(page, *ctx.conf.page_table_sign_extension);
|
|
||||||
}
|
|
||||||
|
|
||||||
code.jz(abort, code.T_NEAR);
|
code.jz(abort, code.T_NEAR);
|
||||||
if (ctx.conf.absolute_offset_page_table) {
|
if (ctx.conf.absolute_offset_page_table) {
|
||||||
return page + vaddr;
|
return page + vaddr;
|
||||||
|
|||||||
@@ -155,23 +155,14 @@ struct UserConfig {
|
|||||||
/// Maximum size is limited by the maximum length of a x86_64 / arm64 jump.
|
/// Maximum size is limited by the maximum length of a x86_64 / arm64 jump.
|
||||||
std::uint32_t code_cache_size = 128 * 1024 * 1024; // bytes
|
std::uint32_t code_cache_size = 128 * 1024 * 1024; // bytes
|
||||||
|
|
||||||
/// Applies a bit mask to the bits in host pointers from the page table.
|
/// Masks out the first N bits in host pointers from the page table.
|
||||||
/// The intention behind this is to allow users of Dynarmic to pack attributes in the
|
/// The intention behind this is to allow users of Dynarmic to pack attributes in the
|
||||||
/// same integer and update the pointer attribute pair atomically.
|
/// same integer and update the pointer attribute pair atomically.
|
||||||
/// If the configured value is ~(0b111ULL), all pointers will be forcefully aligned to 8 bytes.
|
/// If the configured value is 3, all pointers will be forcefully aligned to 8 bytes.
|
||||||
std::uint64_t page_table_pointer_mask = 0;
|
std::int32_t page_table_pointer_mask_bits = 0;
|
||||||
|
|
||||||
/// Log2 of the size per page entry, value should be either 3 or 4
|
// Log2 of the size per page entry, value should be either 3 or 4
|
||||||
std::uint32_t page_table_log2_stride = 3;
|
std::size_t page_table_log2_stride = 3;
|
||||||
|
|
||||||
/// Setting this value has Dynarmic check the specified bit of the page pointer provided by page table.
|
|
||||||
/// If the bit is set to 1, Dynarmic will treat it as unmapped.
|
|
||||||
/// This bit should be included as part of `page_table_pointer_mask_bits`.
|
|
||||||
std::optional<std::uint8_t> page_table_marked_bit = std::nullopt;
|
|
||||||
|
|
||||||
/// If this value is set, Dynarmic will sign extend the page table pointer by this bit.
|
|
||||||
/// Useful for compacting bits into the page table and should be used as part of `page_table_pointer_mask`.
|
|
||||||
std::optional<std::uint8_t> page_table_sign_extension = std::nullopt;
|
|
||||||
|
|
||||||
/// Select the architecture version to use.
|
/// Select the architecture version to use.
|
||||||
/// There are minor behavioural differences between versions.
|
/// There are minor behavioural differences between versions.
|
||||||
|
|||||||
@@ -169,23 +169,14 @@ struct UserConfig {
|
|||||||
/// This is only used if page_table is not nullptr.
|
/// This is only used if page_table is not nullptr.
|
||||||
std::uint32_t page_table_address_space_bits = 36;
|
std::uint32_t page_table_address_space_bits = 36;
|
||||||
|
|
||||||
/// Applies a bit mask to the bits in host pointers from the page table.
|
/// Masks out the first N bits in host pointers from the page table.
|
||||||
/// The intention behind this is to allow users of Dynarmic to pack attributes in the
|
/// The intention behind this is to allow users of Dynarmic to pack attributes in the
|
||||||
/// same integer and update the pointer attribute pair atomically.
|
/// same integer and update the pointer attribute pair atomically.
|
||||||
/// If the configured value is ~(0b111ULL), all pointers will be forcefully aligned to 8 bytes.
|
/// If the configured value is 3, all pointers will be forcefully aligned to 8 bytes.
|
||||||
std::uint64_t page_table_pointer_mask = 0;
|
std::int32_t page_table_pointer_mask_bits = 0;
|
||||||
|
|
||||||
/// Log2 of the size per page entry, value should be either 3 or 4
|
// Log2 of the size per page entry, value should be either 3 or 4
|
||||||
std::uint32_t page_table_log2_stride = 3;
|
std::size_t page_table_log2_stride = 3;
|
||||||
|
|
||||||
/// Setting this value has Dynarmic check the specified bit of the page pointer provided by page table.
|
|
||||||
/// If the bit is set to 1, Dynarmic will treat it as unmapped.
|
|
||||||
/// This bit should be included as part of `page_table_pointer_mask`.
|
|
||||||
std::optional<std::uint8_t> page_table_marked_bit = std::nullopt;
|
|
||||||
|
|
||||||
/// If this value is set, Dynarmic will sign extend the page table pointer by this bit.
|
|
||||||
/// Useful for compacting bits into the page table and should be used as part of `page_table_pointer_mask`.
|
|
||||||
std::optional<std::uint8_t> page_table_sign_extension = std::nullopt;
|
|
||||||
|
|
||||||
/// Counter-timer frequency register. The value of the register is not interpreted by
|
/// Counter-timer frequency register. The value of the register is not interpreted by
|
||||||
/// dynarmic.
|
/// dynarmic.
|
||||||
|
|||||||
@@ -761,6 +761,9 @@ void EmulatedController::StartMotionCalibration() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void EmulatedController::SetButton(const Common::Input::CallbackStatus& callback, std::size_t index, Common::UUID uuid) {
|
void EmulatedController::SetButton(const Common::Input::CallbackStatus& callback, std::size_t index, Common::UUID uuid) {
|
||||||
|
const auto player_index = Service::HID::NpadIdTypeToIndex(npad_id_type);
|
||||||
|
const auto& player = Settings::values.players.GetValue()[player_index];
|
||||||
|
|
||||||
if (index >= controller.button_values.size()) {
|
if (index >= controller.button_values.size()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -913,10 +916,21 @@ void EmulatedController::SetButton(const Common::Input::CallbackStatus& callback
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
const auto player_index = Service::HID::NpadIdTypeToIndex(npad_id_type);
|
if (!is_connected) {
|
||||||
const auto& player = Settings::values.players.GetValue()[player_index];
|
if (npad_type == NpadStyleIndex::Handheld) {
|
||||||
if (player.connected) {
|
if (npad_id_type == NpadIdType::Handheld) {
|
||||||
Connect();
|
Connect();
|
||||||
|
controller_connected[player_index] = true;
|
||||||
|
}
|
||||||
|
} else if (npad_type != NpadStyleIndex::Handheld) {
|
||||||
|
if (npad_id_type == NpadIdType::Player1) {
|
||||||
|
Connect();
|
||||||
|
controller_connected[player_index] = true;
|
||||||
|
} else if (player.connected && !controller_connected[player_index]) {
|
||||||
|
Connect();
|
||||||
|
controller_connected[player_index] = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
TriggerOnChange(ControllerTriggerType::Button, true);
|
TriggerOnChange(ControllerTriggerType::Button, true);
|
||||||
|
|||||||
@@ -22,6 +22,7 @@
|
|||||||
#include "common/settings.h"
|
#include "common/settings.h"
|
||||||
#include "common/vector_math.h"
|
#include "common/vector_math.h"
|
||||||
#include "hid_core/frontend/motion_input.h"
|
#include "hid_core/frontend/motion_input.h"
|
||||||
|
#include "hid_core/hid_core.h"
|
||||||
#include "hid_core/hid_types.h"
|
#include "hid_core/hid_types.h"
|
||||||
#include "hid_core/irsensor/irs_types.h"
|
#include "hid_core/irsensor/irs_types.h"
|
||||||
|
|
||||||
@@ -584,6 +585,7 @@ private:
|
|||||||
std::array<VibrationValue, 2> last_vibration_value{DEFAULT_VIBRATION_VALUE,
|
std::array<VibrationValue, 2> last_vibration_value{DEFAULT_VIBRATION_VALUE,
|
||||||
DEFAULT_VIBRATION_VALUE};
|
DEFAULT_VIBRATION_VALUE};
|
||||||
std::array<std::chrono::steady_clock::time_point, 2> last_vibration_timepoint{};
|
std::array<std::chrono::steady_clock::time_point, 2> last_vibration_timepoint{};
|
||||||
|
std::array<bool, HIDCore::available_controllers> controller_connected{};
|
||||||
|
|
||||||
// Atomically synched values
|
// Atomically synched values
|
||||||
std::atomic<HID::NpadStyleIndex> npad_type{HID::NpadStyleIndex::None};
|
std::atomic<HID::NpadStyleIndex> npad_type{HID::NpadStyleIndex::None};
|
||||||
|
|||||||
@@ -45,19 +45,6 @@ NPad::NPad(Core::HID::HIDCore& hid_core_, KernelHelpers::ServiceContext& service
|
|||||||
AbstractPad{hid_core_.kernel},
|
AbstractPad{hid_core_.kernel},
|
||||||
}}
|
}}
|
||||||
{
|
{
|
||||||
for (std::size_t aruid_index = 0; aruid_index < AruidIndexMax; ++aruid_index) {
|
|
||||||
for (std::size_t i = 0; i < controller_data[aruid_index].size(); ++i) {
|
|
||||||
auto& controller = controller_data[aruid_index][i];
|
|
||||||
controller.device = hid_core.GetEmulatedControllerByIndex(i);
|
|
||||||
Core::HID::ControllerUpdateCallback engine_callback{
|
|
||||||
.on_change = [this, i, kernel = &hid_core.kernel](Core::HID::ControllerTriggerType type) {
|
|
||||||
ControllerUpdate(*kernel, type, i);
|
|
||||||
},
|
|
||||||
.is_npad_service = true,
|
|
||||||
};
|
|
||||||
controller.callback_key = controller.device->SetCallback(engine_callback);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
for (std::size_t i = 0; i < abstracted_pads.size(); ++i) {
|
for (std::size_t i = 0; i < abstracted_pads.size(); ++i) {
|
||||||
abstracted_pads[i].SetNpadId(IndexToNpadIdType(i));
|
abstracted_pads[i].SetNpadId(IndexToNpadIdType(i));
|
||||||
}
|
}
|
||||||
@@ -106,6 +93,16 @@ Result NPad::Activate(u64 aruid) {
|
|||||||
for (std::size_t i = 0; i < controller_data[aruid_index].size(); ++i) {
|
for (std::size_t i = 0; i < controller_data[aruid_index].size(); ++i) {
|
||||||
auto& controller = controller_data[aruid_index][i];
|
auto& controller = controller_data[aruid_index][i];
|
||||||
controller.shared_memory = &data->shared_memory_format->npad.npad_entry[i].internal_state;
|
controller.shared_memory = &data->shared_memory_format->npad.npad_entry[i].internal_state;
|
||||||
|
controller.device = hid_core.GetEmulatedControllerByIndex(i);
|
||||||
|
if (!controller.callback_key) {
|
||||||
|
Core::HID::ControllerUpdateCallback engine_callback{
|
||||||
|
.on_change = [this, i](Core::HID::ControllerTriggerType type) {
|
||||||
|
ControllerUpdate(hid_core.kernel, type, i);
|
||||||
|
},
|
||||||
|
.is_npad_service = true,
|
||||||
|
};
|
||||||
|
controller.callback_key = controller.device->SetCallback(engine_callback);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Prefill controller buffers
|
// Prefill controller buffers
|
||||||
|
|||||||
@@ -194,14 +194,6 @@ std::unique_ptr<TranslationMap> InitializeTranslations(QObject* parent) {
|
|||||||
INSERT(Settings, skip_cpu_inner_invalidation, tr("Skip CPU Inner Invalidation"),
|
INSERT(Settings, skip_cpu_inner_invalidation, tr("Skip CPU Inner Invalidation"),
|
||||||
tr("Skips certain cache invalidations during memory updates, reducing CPU usage and "
|
tr("Skips certain cache invalidations during memory updates, reducing CPU usage and "
|
||||||
"improving latency. This may cause soft-crashes."));
|
"improving latency. This may cause soft-crashes."));
|
||||||
INSERT(Settings, nce_invalidation_gpu_readback,
|
|
||||||
tr("GPU Readback Before NCE Invalidation"),
|
|
||||||
tr("Flushes GPU buffer data back to guest memory before NCE invalidates the whole "
|
|
||||||
"guest page, preserving it while the CPU store proceeds."));
|
|
||||||
INSERT(Settings, nce_runtime_nro_patch,
|
|
||||||
tr("Patch Runtime NROs for NCE"),
|
|
||||||
tr("Applies NCE code patches to runtime-loaded NRO modules."
|
|
||||||
"This is required for some games to run correctly."));
|
|
||||||
INSERT(Settings, vsync_mode, tr("VSync Mode:"),
|
INSERT(Settings, vsync_mode, tr("VSync Mode:"),
|
||||||
tr("FIFO (VSync) does not drop frames or exhibit tearing but is limited by the screen "
|
tr("FIFO (VSync) does not drop frames or exhibit tearing but is limited by the screen "
|
||||||
"refresh rate.\nFIFO Relaxed allows tearing as it recovers from a slow down.\n"
|
"refresh rate.\nFIFO Relaxed allows tearing as it recovers from a slow down.\n"
|
||||||
@@ -234,7 +226,9 @@ std::unique_ptr<TranslationMap> InitializeTranslations(QObject* parent) {
|
|||||||
INSERT(Settings, dma_accuracy, tr("DMA Accuracy:"),
|
INSERT(Settings, dma_accuracy, tr("DMA Accuracy:"),
|
||||||
tr("Controls the DMA read mode.\nUnsafe is faster, while Safe is more stable and can fix issues in some games.\nDefault follows the GPU Accuracy setting."));
|
tr("Controls the DMA read mode.\nUnsafe is faster, while Safe is more stable and can fix issues in some games.\nDefault follows the GPU Accuracy setting."));
|
||||||
INSERT(Settings, gpu_fence_behavior, tr("GPU Fence Behavior:"),
|
INSERT(Settings, gpu_fence_behavior, tr("GPU Fence Behavior:"),
|
||||||
tr("Controls the GPU fence synchronization behavior.\nImmediate is the fastest option, but can introduce some issues.\nBalanced offers better compatibility and may fix issues in some games.\nAccurate further improves compatibility at the cost of some performance.\nDefault follows the GPU Mode setting."));
|
tr("Controls the GPU fence synchronization behavior.\nImmediate is the fastest option, but can introduce some issues.\nBalanced offers better compatibility and may fix issues in some games.\nAccurate further improves compatibility at the cost of some performance.\nStrict is the slowest option, but can fix issues that require stricter synchronization.\nDefault follows the GPU Accuracy setting."));
|
||||||
|
INSERT(Settings, enable_gpu_buffer_readback, tr("Enable GPU buffer readback"),
|
||||||
|
tr("Preserves GPU-modified data by reading it back before uploading.\nSome games require this to render certain effects properly."));
|
||||||
INSERT(Settings, use_asynchronous_shaders, tr("Enable asynchronous shader compilation"),
|
INSERT(Settings, use_asynchronous_shaders, tr("Enable asynchronous shader compilation"),
|
||||||
tr("May reduce shader stutter."));
|
tr("May reduce shader stutter."));
|
||||||
INSERT(Settings, gpu_clock, tr("GPU Clocks"),
|
INSERT(Settings, gpu_clock, tr("GPU Clocks"),
|
||||||
@@ -350,6 +344,9 @@ std::unique_ptr<TranslationMap> InitializeTranslations(QObject* parent) {
|
|||||||
"it bypasses such prompts and directly exits the emulation."));
|
"it bypasses such prompts and directly exits the emulation."));
|
||||||
INSERT(UISettings, hide_mouse, tr("Hide mouse on inactivity"),
|
INSERT(UISettings, hide_mouse, tr("Hide mouse on inactivity"),
|
||||||
tr("Hides the mouse after 2.5s of inactivity."));
|
tr("Hides the mouse after 2.5s of inactivity."));
|
||||||
|
INSERT(UISettings, controller_applet_disabled, tr("Disable controller applet"),
|
||||||
|
tr("Forcibly disables the use of the controller applet in emulated programs.\n"
|
||||||
|
"When a program attempts to open the controller applet, it is immediately closed."));
|
||||||
INSERT(UISettings, check_for_updates, tr("Check for updates"),
|
INSERT(UISettings, check_for_updates, tr("Check for updates"),
|
||||||
tr("Whether or not to check for updates upon startup."));
|
tr("Whether or not to check for updates upon startup."));
|
||||||
|
|
||||||
@@ -385,7 +382,6 @@ std::unique_ptr<ComboboxTranslationMap> ComboboxEnumeration(QObject* parent) {
|
|||||||
{
|
{
|
||||||
PAIR(AppletMode, HLE, tr("Custom frontend")),
|
PAIR(AppletMode, HLE, tr("Custom frontend")),
|
||||||
PAIR(AppletMode, LLE, tr("Real applet")),
|
PAIR(AppletMode, LLE, tr("Real applet")),
|
||||||
PAIR(AppletMode, Disabled, tr("Disabled")),
|
|
||||||
}});
|
}});
|
||||||
|
|
||||||
translations->insert({Settings::EnumMetadata<Settings::SpirvOptimizeMode>::Index(),
|
translations->insert({Settings::EnumMetadata<Settings::SpirvOptimizeMode>::Index(),
|
||||||
@@ -446,6 +442,7 @@ std::unique_ptr<ComboboxTranslationMap> ComboboxEnumeration(QObject* parent) {
|
|||||||
PAIR(GpuFenceBehavior, Immediate, tr("Immediate")),
|
PAIR(GpuFenceBehavior, Immediate, tr("Immediate")),
|
||||||
PAIR(GpuFenceBehavior, Balanced, tr("Balanced")),
|
PAIR(GpuFenceBehavior, Balanced, tr("Balanced")),
|
||||||
PAIR(GpuFenceBehavior, Accurate, tr("Accurate")),
|
PAIR(GpuFenceBehavior, Accurate, tr("Accurate")),
|
||||||
|
PAIR(GpuFenceBehavior, Strict, tr("Strict")),
|
||||||
}});
|
}});
|
||||||
translations->insert(
|
translations->insert(
|
||||||
{Settings::EnumMetadata<Settings::CpuAccuracy>::Index(),
|
{Settings::EnumMetadata<Settings::CpuAccuracy>::Index(),
|
||||||
|
|||||||
@@ -127,6 +127,8 @@ struct Values {
|
|||||||
Setting<bool> hide_mouse{
|
Setting<bool> hide_mouse{
|
||||||
linkage, true, "hideInactiveMouse", Category::UiGeneral, Settings::Specialization::Default,
|
linkage, true, "hideInactiveMouse", Category::UiGeneral, Settings::Specialization::Default,
|
||||||
true, true};
|
true, true};
|
||||||
|
Setting<bool> controller_applet_disabled{linkage, false, "disableControllerApplet",
|
||||||
|
Category::UiGeneral};
|
||||||
// Set when Vulkan is known to crash the application
|
// Set when Vulkan is known to crash the application
|
||||||
bool has_broken_vulkan = false;
|
bool has_broken_vulkan = false;
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,3 @@
|
|||||||
// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
|
|
||||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
|
||||||
|
|
||||||
// SPDX-FileCopyrightText: Copyright 2021 yuzu Emulator Project
|
// SPDX-FileCopyrightText: Copyright 2021 yuzu Emulator Project
|
||||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||||
|
|
||||||
@@ -31,6 +28,11 @@ struct FuncTraits<ReturnType_ (*)(Args...)> {
|
|||||||
using ArgType = std::tuple_element_t<I, std::tuple<Args...>>;
|
using ArgType = std::tuple_element_t<I, std::tuple<Args...>>;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
template <auto func, typename... Args>
|
||||||
|
void SetDefinition(EmitContext& ctx, IR::Inst* inst, Args... args) {
|
||||||
|
inst->SetDefinition<Id>(func(ctx, std::forward<Args>(args)...));
|
||||||
|
}
|
||||||
|
|
||||||
template <typename ArgType>
|
template <typename ArgType>
|
||||||
auto Arg(EmitContext& ctx, const IR::Value& arg) {
|
auto Arg(EmitContext& ctx, const IR::Value& arg) {
|
||||||
if constexpr (std::is_same_v<ArgType, std::string_view>) {
|
if constexpr (std::is_same_v<ArgType, std::string_view>) {
|
||||||
@@ -51,10 +53,21 @@ auto Arg(EmitContext& ctx, const IR::Value& arg) {
|
|||||||
template <auto func, bool is_first_arg_inst, size_t... I>
|
template <auto func, bool is_first_arg_inst, size_t... I>
|
||||||
void Invoke(EmitContext& ctx, IR::Inst* inst, std::index_sequence<I...>) {
|
void Invoke(EmitContext& ctx, IR::Inst* inst, std::index_sequence<I...>) {
|
||||||
using Traits = FuncTraits<decltype(func)>;
|
using Traits = FuncTraits<decltype(func)>;
|
||||||
if constexpr (is_first_arg_inst) {
|
if constexpr (std::is_same_v<typename Traits::ReturnType, Id>) {
|
||||||
func(ctx, *inst, Arg<typename Traits::template ArgType<I + 2>>(ctx, inst->Arg(I))...);
|
if constexpr (is_first_arg_inst) {
|
||||||
|
SetDefinition<func>(
|
||||||
|
ctx, inst, *inst,
|
||||||
|
Arg<typename Traits::template ArgType<I + 2>>(ctx, inst->Arg(I))...);
|
||||||
|
} else {
|
||||||
|
SetDefinition<func>(
|
||||||
|
ctx, inst, Arg<typename Traits::template ArgType<I + 1>>(ctx, inst->Arg(I))...);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
func(ctx, Arg<typename Traits::template ArgType<I + 1>>(ctx, inst->Arg(I))...);
|
if constexpr (is_first_arg_inst) {
|
||||||
|
func(ctx, *inst, Arg<typename Traits::template ArgType<I + 2>>(ctx, inst->Arg(I))...);
|
||||||
|
} else {
|
||||||
|
func(ctx, Arg<typename Traits::template ArgType<I + 1>>(ctx, inst->Arg(I))...);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -121,7 +121,7 @@ void BufferCache<P>::UnmapGPUMemory(size_t as_id, GPUVAddr gpu_addr, size_t size
|
|||||||
|
|
||||||
template <class P>
|
template <class P>
|
||||||
void BufferCache<P>::WriteMemory(DAddr device_addr, u64 size) {
|
void BufferCache<P>::WriteMemory(DAddr device_addr, u64 size) {
|
||||||
if (IsRegionGpuModified(device_addr, size)) {
|
if (memory_tracker.IsRegionGpuModified(device_addr, size)) {
|
||||||
ClearDownload(device_addr, size);
|
ClearDownload(device_addr, size);
|
||||||
gpu_modified_ranges.Subtract(device_addr, size);
|
gpu_modified_ranges.Subtract(device_addr, size);
|
||||||
}
|
}
|
||||||
@@ -249,10 +249,6 @@ bool BufferCache<P>::DMACopy(GPUVAddr src_address, GPUVAddr dest_address, u64 am
|
|||||||
runtime.CopyBuffer(dest_buffer, src_buffer, copies, true);
|
runtime.CopyBuffer(dest_buffer, src_buffer, copies, true);
|
||||||
if (has_new_downloads) {
|
if (has_new_downloads) {
|
||||||
memory_tracker.MarkRegionAsGpuModified(*cpu_dest_address, amount);
|
memory_tracker.MarkRegionAsGpuModified(*cpu_dest_address, amount);
|
||||||
const bool should_sync = Settings::IsGPUFenceBehaviorBalanced() || Settings::IsGPUFenceBehaviorAccurate();
|
|
||||||
if (should_sync) {
|
|
||||||
runtime.Finish();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Tegra::Memory::DeviceGuestMemoryScoped<u8, Tegra::Memory::GuestMemoryFlags::UnsafeReadWrite>
|
Tegra::Memory::DeviceGuestMemoryScoped<u8, Tegra::Memory::GuestMemoryFlags::UnsafeReadWrite>
|
||||||
@@ -315,8 +311,11 @@ std::pair<typename P::Buffer*, u32> BufferCache<P>::ObtainCPUBuffer(
|
|||||||
MarkWrittenBuffer(buffer_id, device_addr, size);
|
MarkWrittenBuffer(buffer_id, device_addr, size);
|
||||||
break;
|
break;
|
||||||
case ObtainBufferOperation::DiscardWrite: {
|
case ObtainBufferOperation::DiscardWrite: {
|
||||||
ClearDownload(device_addr, size);
|
const DAddr device_addr_start = Common::AlignDown(device_addr, 64);
|
||||||
gpu_modified_ranges.Subtract(device_addr, size);
|
const DAddr device_addr_end = Common::AlignUp(device_addr + size, 64);
|
||||||
|
const size_t new_size = device_addr_end - device_addr_start;
|
||||||
|
ClearDownload(device_addr_start, new_size);
|
||||||
|
gpu_modified_ranges.Subtract(device_addr_start, new_size);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
default:
|
default:
|
||||||
@@ -1234,7 +1233,7 @@ void BufferCache<P>::BindHostComputeStorageBuffers() {
|
|||||||
buffer.MarkUsage(offset, size);
|
buffer.MarkUsage(offset, size);
|
||||||
|
|
||||||
if (is_written) {
|
if (is_written) {
|
||||||
MarkWrittenBuffer(binding.buffer_id, binding.device_addr, size, true);
|
MarkWrittenBuffer(binding.buffer_id, binding.device_addr, size);
|
||||||
}
|
}
|
||||||
|
|
||||||
if constexpr (NEEDS_BIND_STORAGE_INDEX) {
|
if constexpr (NEEDS_BIND_STORAGE_INDEX) {
|
||||||
@@ -1520,12 +1519,10 @@ void BufferCache<P>::UpdateComputeTextureBuffers() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
template <class P>
|
template <class P>
|
||||||
void BufferCache<P>::MarkWrittenBuffer(BufferId buffer_id, DAddr device_addr, u32 size, bool needs_sync) {
|
void BufferCache<P>::MarkWrittenBuffer(BufferId buffer_id, DAddr device_addr, u32 size) {
|
||||||
if constexpr (!IS_OPENGL) {
|
if constexpr (!IS_OPENGL) {
|
||||||
if (needs_sync) {
|
Buffer& buffer = slot_buffers[buffer_id];
|
||||||
Buffer& buffer = slot_buffers[buffer_id];
|
buffer.setWriteTick(runtime.CurrentTick());
|
||||||
buffer.setWriteTick(runtime.CurrentTick());
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
memory_tracker.MarkRegionAsGpuModified(device_addr, size);
|
memory_tracker.MarkRegionAsGpuModified(device_addr, size);
|
||||||
gpu_modified_ranges.Add(device_addr, size);
|
gpu_modified_ranges.Add(device_addr, size);
|
||||||
@@ -1541,11 +1538,8 @@ BufferId BufferCache<P>::FindBuffer(DAddr device_addr, u32 size, bool sparse_com
|
|||||||
const BufferId buffer_id = page_table[page];
|
const BufferId buffer_id = page_table[page];
|
||||||
if (buffer_id) {
|
if (buffer_id) {
|
||||||
Buffer& buffer = slot_buffers[buffer_id];
|
Buffer& buffer = slot_buffers[buffer_id];
|
||||||
|
WaitForGpuFenceIfNeeded(buffer);
|
||||||
if (buffer.IsInBounds(device_addr, size)) {
|
if (buffer.IsInBounds(device_addr, size)) {
|
||||||
const bool should_sync = Settings::IsGPUFenceBehaviorAccurate();
|
|
||||||
if (should_sync) {
|
|
||||||
SynchronizeBufferWrites(buffer);
|
|
||||||
}
|
|
||||||
bool usable = true;
|
bool usable = true;
|
||||||
if constexpr (requires { buffer.IsSparseCompatible(); }) {
|
if constexpr (requires { buffer.IsSparseCompatible(); }) {
|
||||||
if (sparse_compatible && !buffer.IsSparseCompatible()) {
|
if (sparse_compatible && !buffer.IsSparseCompatible()) {
|
||||||
@@ -1561,11 +1555,17 @@ BufferId BufferCache<P>::FindBuffer(DAddr device_addr, u32 size, bool sparse_com
|
|||||||
}
|
}
|
||||||
|
|
||||||
template <class P>
|
template <class P>
|
||||||
void BufferCache<P>::SynchronizeBufferWrites(Buffer& buffer) {
|
void BufferCache<P>::WaitForGpuFenceIfNeeded(Buffer& buffer) {
|
||||||
if constexpr (!IS_OPENGL) {
|
if constexpr (!IS_OPENGL) {
|
||||||
const u64 buffer_tick = buffer.getWriteTick();
|
const bool gpu_fence_accurate = Settings::IsGPUFenceBehaviorAccurate();
|
||||||
if (!runtime.IsFree(buffer_tick)) {
|
const bool gpu_fence_strict = Settings::IsGPUFenceBehaviorStrict();
|
||||||
runtime.Wait(buffer_tick);
|
if (gpu_fence_accurate || gpu_fence_strict) {
|
||||||
|
const u64 gpu_tick_delay = gpu_fence_strict ? 0 : 3;
|
||||||
|
const u64 buffer_tick = buffer.getWriteTick();
|
||||||
|
const u64 gpu_tick = runtime.KnownGpuTick();
|
||||||
|
if (buffer_tick > gpu_tick + gpu_tick_delay) {
|
||||||
|
runtime.Wait(buffer_tick);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1742,24 +1742,14 @@ bool BufferCache<P>::SynchronizeBuffer(Buffer& buffer, DAddr device_addr, u32 si
|
|||||||
u64 total_size_bytes = 0;
|
u64 total_size_bytes = 0;
|
||||||
u64 largest_copy = 0;
|
u64 largest_copy = 0;
|
||||||
const DAddr buffer_start = buffer.cpu_addr_cached;
|
const DAddr buffer_start = buffer.cpu_addr_cached;
|
||||||
const auto add_upload = [&](DAddr start, DAddr end) {
|
memory_tracker.ForEachUploadRange(device_addr, size, [&](u64 device_addr_out, u64 range_size) {
|
||||||
if (start == end) return;
|
|
||||||
const u64 range_size = end - start;
|
|
||||||
upload_copies.push_back(BufferCopy{
|
upload_copies.push_back(BufferCopy{
|
||||||
.src_offset = total_size_bytes,
|
.src_offset = total_size_bytes,
|
||||||
.dst_offset = start - buffer_start,
|
.dst_offset = device_addr_out - buffer_start,
|
||||||
.size = range_size,
|
.size = range_size,
|
||||||
});
|
});
|
||||||
total_size_bytes += range_size;
|
total_size_bytes += range_size;
|
||||||
largest_copy = (std::max)(largest_copy, range_size);
|
largest_copy = (std::max)(largest_copy, range_size);
|
||||||
};
|
|
||||||
memory_tracker.ForEachUploadRange(device_addr, size, [&](u64 device_addr_out, u64 range_size) {
|
|
||||||
DAddr upload_start = device_addr_out;
|
|
||||||
gpu_modified_ranges.ForEachInRange(device_addr_out, range_size, [&](DAddr gpu_start, DAddr gpu_end) {
|
|
||||||
add_upload(upload_start, gpu_start);
|
|
||||||
upload_start = gpu_end;
|
|
||||||
});
|
|
||||||
add_upload(upload_start, device_addr_out + range_size);
|
|
||||||
});
|
});
|
||||||
if (total_size_bytes == 0) {
|
if (total_size_bytes == 0) {
|
||||||
return true;
|
return true;
|
||||||
@@ -1798,6 +1788,9 @@ void BufferCache<P>::ImmediateUploadMemory([[maybe_unused]] Buffer& buffer,
|
|||||||
if (immediate_buffer.empty()) {
|
if (immediate_buffer.empty()) {
|
||||||
immediate_buffer = ImmediateBuffer(largest_copy);
|
immediate_buffer = ImmediateBuffer(largest_copy);
|
||||||
}
|
}
|
||||||
|
if (Settings::values.enable_gpu_buffer_readback.GetValue()) {
|
||||||
|
DownloadBufferMemory(buffer, device_addr, copy.size);
|
||||||
|
}
|
||||||
device_memory.ReadBlockUnsafe(device_addr, immediate_buffer.data(), copy.size);
|
device_memory.ReadBlockUnsafe(device_addr, immediate_buffer.data(), copy.size);
|
||||||
upload_span = immediate_buffer.subspan(0, copy.size);
|
upload_span = immediate_buffer.subspan(0, copy.size);
|
||||||
}
|
}
|
||||||
@@ -1816,6 +1809,9 @@ void BufferCache<P>::MappedUploadMemory([[maybe_unused]] Buffer& buffer,
|
|||||||
for (BufferCopy& copy : copies) {
|
for (BufferCopy& copy : copies) {
|
||||||
u8* const src_pointer = staging_pointer.data() + copy.src_offset;
|
u8* const src_pointer = staging_pointer.data() + copy.src_offset;
|
||||||
const DAddr device_addr = buffer.CpuAddr() + copy.dst_offset;
|
const DAddr device_addr = buffer.CpuAddr() + copy.dst_offset;
|
||||||
|
if (Settings::values.enable_gpu_buffer_readback.GetValue()) {
|
||||||
|
DownloadBufferMemory(buffer, device_addr, copy.size);
|
||||||
|
}
|
||||||
device_memory.ReadBlockUnsafe(device_addr, src_pointer, copy.size);
|
device_memory.ReadBlockUnsafe(device_addr, src_pointer, copy.size);
|
||||||
// Apply the staging offset
|
// Apply the staging offset
|
||||||
copy.src_offset += upload_staging.offset;
|
copy.src_offset += upload_staging.offset;
|
||||||
|
|||||||
@@ -430,11 +430,11 @@ private:
|
|||||||
|
|
||||||
void UpdateComputeTextureBuffers();
|
void UpdateComputeTextureBuffers();
|
||||||
|
|
||||||
void MarkWrittenBuffer(BufferId buffer_id, DAddr device_addr, u32 size, bool needs_sync = false);
|
void MarkWrittenBuffer(BufferId buffer_id, DAddr device_addr, u32 size);
|
||||||
|
|
||||||
[[nodiscard]] BufferId FindBuffer(DAddr device_addr, u32 size, bool sparse_compatible);
|
[[nodiscard]] BufferId FindBuffer(DAddr device_addr, u32 size, bool sparse_compatible);
|
||||||
|
|
||||||
void SynchronizeBufferWrites(Buffer& buffer);
|
void WaitForGpuFenceIfNeeded(Buffer& buffer);
|
||||||
|
|
||||||
[[nodiscard]] OverlapResult ResolveOverlaps(DAddr device_addr, u32 wanted_size);
|
[[nodiscard]] OverlapResult ResolveOverlaps(DAddr device_addr, u32 wanted_size);
|
||||||
|
|
||||||
|
|||||||
@@ -16,7 +16,7 @@
|
|||||||
namespace Tegra {
|
namespace Tegra {
|
||||||
|
|
||||||
constexpr u32 MacroRegistersStart = 0xE00;
|
constexpr u32 MacroRegistersStart = 0xE00;
|
||||||
constexpr u32 ComputeInline = 0x6D;
|
[[maybe_unused]] constexpr u32 ComputeInline = 0x6D;
|
||||||
|
|
||||||
DmaPusher::DmaPusher(Core::System& system_, MemoryManager& memory_manager_, Control::ChannelState& channel_state_)
|
DmaPusher::DmaPusher(Core::System& system_, MemoryManager& memory_manager_, Control::ChannelState& channel_state_)
|
||||||
: system{system_}
|
: system{system_}
|
||||||
@@ -73,16 +73,11 @@ bool DmaPusher::Step() {
|
|||||||
synced = false;
|
synced = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (header.size > 0 && dma_state.method >= MacroRegistersStart && subchannels[dma_state.subchannel]) {
|
||||||
|
subchannels[dma_state.subchannel]->current_dirty = memory_manager.IsMemoryDirty(dma_state.dma_get, header.size * sizeof(u32));
|
||||||
|
}
|
||||||
|
|
||||||
if (header.size > 0) {
|
if (header.size > 0) {
|
||||||
if (subchannels[dma_state.subchannel] && dma_state.method_count) {
|
|
||||||
const auto engine = subchannel_type[dma_state.subchannel];
|
|
||||||
const bool kepler_payload = engine == Engines::EngineTypes::KeplerCompute && dma_state.method == ComputeInline && dma_state.non_incrementing;
|
|
||||||
const bool macro_payload = engine == Engines::EngineTypes::Maxwell3D && dma_state.method >= MacroRegistersStart;
|
|
||||||
if (kepler_payload || macro_payload) {
|
|
||||||
const size_t words = std::min<size_t>(dma_state.method_count, header.size);
|
|
||||||
subchannels[dma_state.subchannel]->current_dirty = memory_manager.IsMemoryDirty(dma_state.dma_get, words * sizeof(u32));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
const bool use_safe = Settings::IsDMALevelDefault() ? Settings::IsGPULevelHigh() : Settings::IsDMALevelSafe();
|
const bool use_safe = Settings::IsDMALevelDefault() ? Settings::IsGPULevelHigh() : Settings::IsDMALevelSafe();
|
||||||
if (use_safe) {
|
if (use_safe) {
|
||||||
Tegra::Memory::GpuGuestMemory<Tegra::CommandHeader, Tegra::Memory::GuestMemoryFlags::SafeRead>headers(memory_manager, dma_state.dma_get, header.size, &command_headers);
|
Tegra::Memory::GpuGuestMemory<Tegra::CommandHeader, Tegra::Memory::GuestMemoryFlags::SafeRead>headers(memory_manager, dma_state.dma_get, header.size, &command_headers);
|
||||||
|
|||||||
@@ -49,16 +49,13 @@ void KeplerCompute::CallMethod(Core::System& system, u32 method, u32 method_argu
|
|||||||
case KEPLER_COMPUTE_REG_INDEX(exec_upload): {
|
case KEPLER_COMPUTE_REG_INDEX(exec_upload): {
|
||||||
UploadInfo info{.upload_address = upload_address,
|
UploadInfo info{.upload_address = upload_address,
|
||||||
.exec_address = upload_state.ExecTargetAddress(),
|
.exec_address = upload_state.ExecTargetAddress(),
|
||||||
.copy_size = upload_state.GetUploadSize(),
|
.copy_size = upload_state.GetUploadSize()};
|
||||||
.was_dirty = upload_dirty};
|
|
||||||
uploads.push_back(info);
|
uploads.push_back(info);
|
||||||
upload_state.ProcessExec(regs.exec_upload.linear != 0);
|
upload_state.ProcessExec(regs.exec_upload.linear != 0);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case KEPLER_COMPUTE_REG_INDEX(data_upload): {
|
case KEPLER_COMPUTE_REG_INDEX(data_upload): {
|
||||||
upload_address = current_dma_segment;
|
upload_address = current_dma_segment;
|
||||||
upload_dirty = current_dirty;
|
|
||||||
current_dirty = false;
|
|
||||||
upload_state.ProcessData(method_argument, is_last_call);
|
upload_state.ProcessData(method_argument, is_last_call);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -67,11 +64,9 @@ void KeplerCompute::CallMethod(Core::System& system, u32 method, u32 method_argu
|
|||||||
|
|
||||||
for (auto& data : uploads) {
|
for (auto& data : uploads) {
|
||||||
const GPUVAddr offset = data.exec_address - launch_desc_loc;
|
const GPUVAddr offset = data.exec_address - launch_desc_loc;
|
||||||
if (offset / sizeof(u32) == LAUNCH_REG_INDEX(grid_dim_x)) {
|
if (offset / sizeof(u32) == LAUNCH_REG_INDEX(grid_dim_x) &&
|
||||||
const bool source_dirty = memory_manager.IsMemoryDirty(data.upload_address, data.copy_size);
|
memory_manager.IsMemoryDirty(data.upload_address, data.copy_size)) {
|
||||||
if (data.was_dirty || source_dirty) {
|
indirect_compute = {data.upload_address};
|
||||||
indirect_compute = {data.upload_address};
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
uploads.clear();
|
uploads.clear();
|
||||||
@@ -88,8 +83,6 @@ void KeplerCompute::CallMultiMethod(Core::System& system, u32 method, const u32*
|
|||||||
switch (method) {
|
switch (method) {
|
||||||
case KEPLER_COMPUTE_REG_INDEX(data_upload):
|
case KEPLER_COMPUTE_REG_INDEX(data_upload):
|
||||||
upload_address = current_dma_segment;
|
upload_address = current_dma_segment;
|
||||||
upload_dirty = current_dirty;
|
|
||||||
current_dirty = false;
|
|
||||||
upload_state.ProcessData(base_start, amount);
|
upload_state.ProcessData(base_start, amount);
|
||||||
return;
|
return;
|
||||||
default:
|
default:
|
||||||
|
|||||||
@@ -226,13 +226,11 @@ private:
|
|||||||
VideoCore::RasterizerInterface* rasterizer = nullptr;
|
VideoCore::RasterizerInterface* rasterizer = nullptr;
|
||||||
Upload::State upload_state;
|
Upload::State upload_state;
|
||||||
GPUVAddr upload_address;
|
GPUVAddr upload_address;
|
||||||
bool upload_dirty{};
|
|
||||||
|
|
||||||
struct UploadInfo {
|
struct UploadInfo {
|
||||||
GPUVAddr upload_address;
|
GPUVAddr upload_address;
|
||||||
GPUVAddr exec_address;
|
GPUVAddr exec_address;
|
||||||
u32 copy_size;
|
u32 copy_size;
|
||||||
bool was_dirty;
|
|
||||||
};
|
};
|
||||||
std::vector<UploadInfo> uploads;
|
std::vector<UploadInfo> uploads;
|
||||||
std::optional<GPUVAddr> indirect_compute{};
|
std::optional<GPUVAddr> indirect_compute{};
|
||||||
|
|||||||
@@ -72,7 +72,7 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
void SignalFence(std::function<void()>&& func) {
|
void SignalFence(std::function<void()>&& func) {
|
||||||
const bool delay_fence = Settings::IsGPUFenceBehaviorDefault() ? Settings::IsGPULevelHigh() : Settings::IsGPUFenceBehaviorBalanced() || Settings::IsGPUFenceBehaviorAccurate();
|
const bool delay_fence = Settings::IsGPUFenceBehaviorDefault() ? Settings::IsGPULevelHigh() : Settings::IsGPUFenceBehaviorBalanced() || Settings::IsGPUFenceBehaviorAccurate() || Settings::IsGPUFenceBehaviorStrict();
|
||||||
const bool should_flush = ShouldFlush();
|
const bool should_flush = ShouldFlush();
|
||||||
if constexpr (!can_async_check) {
|
if constexpr (!can_async_check) {
|
||||||
TryReleasePendingFences<false>();
|
TryReleasePendingFences<false>();
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user