From 3062a35eb1297067446156c43e9d0df2f684edff Mon Sep 17 00:00:00 2001 From: boludoz Date: Sun, 15 Oct 2023 02:02:22 -0300 Subject: [PATCH 001/154] Improved shortcut: add games in applist for Windows, question for start game at fullscreen & better unicode support for some Windows path funcs. --- src/common/fs/fs_util.cpp | 59 +++++ src/common/fs/fs_util.h | 22 +- src/common/fs/path_util.cpp | 87 ++++++- src/common/fs/path_util.h | 15 +- src/yuzu/game_list.cpp | 4 - src/yuzu/main.cpp | 504 ++++++++++++++++++++++-------------- src/yuzu/main.h | 22 +- src/yuzu/util/util.cpp | 17 +- src/yuzu/util/util.h | 14 +- 9 files changed, 522 insertions(+), 222 deletions(-) diff --git a/src/common/fs/fs_util.cpp b/src/common/fs/fs_util.cpp index 813a713c3b..442f637281 100644 --- a/src/common/fs/fs_util.cpp +++ b/src/common/fs/fs_util.cpp @@ -36,4 +36,63 @@ std::string PathToUTF8String(const std::filesystem::path& path) { return ToUTF8String(path.u8string()); } +std::u8string U8FilenameSantizer(const std::u8string_view u8filename) { + std::u8string u8path_santized{u8filename.begin(), u8filename.end()}; + size_t eSizeSanitized = u8path_santized.size(); + + // Special case for ":", for example: 'Pepe: La secuela' --> 'Pepe - La + // secuela' or 'Pepe : La secuela' --> 'Pepe - La secuela' + for (size_t i = 0; i < eSizeSanitized; i++) { + switch (u8path_santized[i]) { + case u8':': + if (i == 0 || i == eSizeSanitized - 1) { + u8path_santized.replace(i, 1, u8"_"); + } else if (u8path_santized[i - 1] == u8' ') { + u8path_santized.replace(i, 1, u8"-"); + } else { + u8path_santized.replace(i, 1, u8" -"); + eSizeSanitized++; + } + break; + case u8'\\': + case u8'/': + case u8'*': + case u8'?': + case u8'\"': + case u8'<': + case u8'>': + case u8'|': + case u8'\0': + u8path_santized.replace(i, 1, u8"_"); + break; + default: + break; + } + } + + // Delete duplicated spaces || Delete duplicated dots (MacOS i think) + for (size_t i = 0; i < eSizeSanitized - 1; i++) { + if ((u8path_santized[i] == u8' ' && u8path_santized[i + 1] == u8' ') || + (u8path_santized[i] == u8'.' && u8path_santized[i + 1] == u8'.')) { + u8path_santized.erase(i, 1); + i--; + } + } + + // Delete all spaces and dots at the end (Windows almost) + while (u8path_santized.back() == u8' ' || u8path_santized.back() == u8'.') { + u8path_santized.pop_back(); + } + + if (u8path_santized.empty()) { + return u8""; + } + + return u8path_santized; +} + +std::string UTF8FilenameSantizer(const std::string_view filename) { + return ToUTF8String(U8FilenameSantizer(ToU8String(filename))); +} + } // namespace Common::FS diff --git a/src/common/fs/fs_util.h b/src/common/fs/fs_util.h index 2492a9f942..dbb4f5a9a1 100644 --- a/src/common/fs/fs_util.h +++ b/src/common/fs/fs_util.h @@ -82,4 +82,24 @@ concept IsChar = std::same_as; */ [[nodiscard]] std::string PathToUTF8String(const std::filesystem::path& path); -} // namespace Common::FS +/** + * Fix filename (remove invalid characters) + * + * @param u8_string dirty encoded filename string + * + * @returns utf8_string santized filename string + * + */ +[[nodiscard]] std::u8string U8FilenameSantizer(const std::u8string_view u8filename); + +/** + * Fix filename (remove invalid characters) + * + * @param utf8_string dirty encoded filename string + * + * @returns utf8_string santized filename string + * + */ +[[nodiscard]] std::string UTF8FilenameSantizer(const std::string_view filename); + +} // namespace Common::FS \ No newline at end of file diff --git a/src/common/fs/path_util.cpp b/src/common/fs/path_util.cpp index 0abd81a45e..a461161ede 100644 --- a/src/common/fs/path_util.cpp +++ b/src/common/fs/path_util.cpp @@ -6,6 +6,7 @@ #include #include "common/fs/fs.h" +#include "common/string_util.h" #ifdef ANDROID #include "common/fs/fs_android.h" #endif @@ -14,7 +15,7 @@ #include "common/logging/log.h" #ifdef _WIN32 -#include // Used in GetExeDirectory() +#include // Used in GetExeDirectory() and GetWindowsDesktop() #else #include // Used in Get(Home/Data)Directory() #include // Used in GetHomeDirectory() @@ -250,30 +251,39 @@ void SetYuzuPath(YuzuPath yuzu_path, const fs::path& new_path) { #ifdef _WIN32 fs::path GetExeDirectory() { - wchar_t exe_path[MAX_PATH]; + WCHAR exe_path[MAX_PATH]; - if (GetModuleFileNameW(nullptr, exe_path, MAX_PATH) == 0) { + if (SUCCEEDED(GetModuleFileNameW(nullptr, exe_path, MAX_PATH))) { + std::wstring wideExePath(exe_path); + + // UTF-16 filesystem lib to UTF-8 is broken, so we need to convert to UTF-8 with the with + // the Windows library (Filesystem converts the strings literally). + return fs::path{Common::UTF16ToUTF8(wideExePath)}.parent_path(); + } else { LOG_ERROR(Common_Filesystem, - "Failed to get the path to the executable of the current process"); + "[GetExeDirectory] Failed to get the path to the executable of the current " + "process"); } - return fs::path{exe_path}.parent_path(); + return fs::path{}; } fs::path GetAppDataRoamingDirectory() { PWSTR appdata_roaming_path = nullptr; - SHGetKnownFolderPath(FOLDERID_RoamingAppData, 0, nullptr, &appdata_roaming_path); + if (SUCCEEDED(SHGetKnownFolderPath(FOLDERID_RoamingAppData, 0, NULL, &appdata_roaming_path))) { + std::wstring wideAppdataRoamingPath(appdata_roaming_path); + CoTaskMemFree(appdata_roaming_path); - auto fs_appdata_roaming_path = fs::path{appdata_roaming_path}; - - CoTaskMemFree(appdata_roaming_path); - - if (fs_appdata_roaming_path.empty()) { - LOG_ERROR(Common_Filesystem, "Failed to get the path to the %APPDATA% directory"); + // UTF-16 filesystem lib to UTF-8 is broken, so we need to convert to UTF-8 with the with + // the Windows library (Filesystem converts the strings literally). + return fs::path{Common::UTF16ToUTF8(wideAppdataRoamingPath)}; + } else { + LOG_ERROR(Common_Filesystem, + "[GetAppDataRoamingDirectory] Failed to get the path to the %APPDATA% directory"); } - return fs_appdata_roaming_path; + return fs::path{}; } #else @@ -338,6 +348,57 @@ fs::path GetBundleDirectory() { #endif +fs::path GetDesktopPath() { +#if defined(_WIN32) + PWSTR DesktopPath = nullptr; + + if (SUCCEEDED(SHGetKnownFolderPath(FOLDERID_Desktop, 0, NULL, &DesktopPath))) { + std::wstring wideDesktopPath(DesktopPath); + CoTaskMemFree(DesktopPath); + + // UTF-16 filesystem lib to UTF-8 is broken, so we need to convert to UTF-8 with the with + // the Windows library (Filesystem converts the strings literally). + return fs::path{Common::UTF16ToUTF8(wideDesktopPath)}; + } else { + LOG_ERROR(Common_Filesystem, + "[GetDesktopPath] Failed to get the path to the desktop directory"); + } +#else + fs::path shortcut_path = GetHomeDirectory() / "Desktop"; + if (fs::exists(shortcut_path)) { + return shortcut_path; + } +#endif + return fs::path{}; +} + +fs::path GetAppsShortcutsPath() { +#if defined(_WIN32) + PWSTR AppShortcutsPath = nullptr; + + if (SUCCEEDED(SHGetKnownFolderPath(FOLDERID_CommonPrograms, 0, NULL, &AppShortcutsPath))) { + std::wstring wideAppShortcutsPath(AppShortcutsPath); + CoTaskMemFree(AppShortcutsPath); + + // UTF-16 filesystem lib to UTF-8 is broken, so we need to convert to UTF-8 with the with + // the Windows library (Filesystem converts the strings literally). + return fs::path{Common::UTF16ToUTF8(wideAppShortcutsPath)}; + } else { + LOG_ERROR(Common_Filesystem, + "[GetAppsShortcutsPath] Failed to get the path to the App Shortcuts directory"); + } +#else + fs::path shortcut_path = GetHomeDirectory() / ".local/share/applications"; + if (!fs::exists(shortcut_path)) { + shortcut_path = std::filesystem::path("/usr/share/applications"); + return shortcut_path; + } else { + return shortcut_path; + } +#endif + return fs::path{}; +} + // vvvvvvvvvv Deprecated vvvvvvvvvv // std::string_view RemoveTrailingSlash(std::string_view path) { diff --git a/src/common/fs/path_util.h b/src/common/fs/path_util.h index 63801c924b..b88a388d19 100644 --- a/src/common/fs/path_util.h +++ b/src/common/fs/path_util.h @@ -244,7 +244,6 @@ void SetYuzuPath(YuzuPath yuzu_path, const Path& new_path) { * @returns The path of the current user's %APPDATA% directory. */ [[nodiscard]] std::filesystem::path GetAppDataRoamingDirectory(); - #else /** @@ -275,6 +274,20 @@ void SetYuzuPath(YuzuPath yuzu_path, const Path& new_path) { #endif +/** + * Gets the path of the current user's desktop directory. + * + * @returns The path of the current user's desktop directory. + */ +[[nodiscard]] std::filesystem::path GetDesktopPath(); + +/** + * Gets the path of the current user's apps directory. + * + * @returns The path of the current user's apps directory. + */ +[[nodiscard]] std::filesystem::path GetAppsShortcutsPath(); + // vvvvvvvvvv Deprecated vvvvvvvvvv // // Removes the final '/' or '\' if one exists diff --git a/src/yuzu/game_list.cpp b/src/yuzu/game_list.cpp index 2bb1a0239b..fbe0996612 100644 --- a/src/yuzu/game_list.cpp +++ b/src/yuzu/game_list.cpp @@ -566,10 +566,8 @@ void GameList::AddGamePopup(QMenu& context_menu, u64 program_id, const std::stri QAction* navigate_to_gamedb_entry = context_menu.addAction(tr("Navigate to GameDB entry")); QMenu* shortcut_menu = context_menu.addMenu(tr("Create Shortcut")); QAction* create_desktop_shortcut = shortcut_menu->addAction(tr("Add to Desktop")); -#ifndef WIN32 QAction* create_applications_menu_shortcut = shortcut_menu->addAction(tr("Add to Applications Menu")); -#endif context_menu.addSeparator(); QAction* properties = context_menu.addAction(tr("Properties")); @@ -647,11 +645,9 @@ void GameList::AddGamePopup(QMenu& context_menu, u64 program_id, const std::stri connect(create_desktop_shortcut, &QAction::triggered, [this, program_id, path]() { emit CreateShortcut(program_id, path, GameListShortcutTarget::Desktop); }); -#ifndef WIN32 connect(create_applications_menu_shortcut, &QAction::triggered, [this, program_id, path]() { emit CreateShortcut(program_id, path, GameListShortcutTarget::Applications); }); -#endif connect(properties, &QAction::triggered, [this, path]() { emit OpenPerGameGeneralRequested(path); }); }; diff --git a/src/yuzu/main.cpp b/src/yuzu/main.cpp index 1431cf2fee..e4dc717ed3 100644 --- a/src/yuzu/main.cpp +++ b/src/yuzu/main.cpp @@ -2840,8 +2840,236 @@ void GMainWindow::OnGameListNavigateToGamedbEntry(u64 program_id, QDesktopServices::openUrl(QUrl(QStringLiteral("https://yuzu-emu.org/game/") + directory)); } +bool GMainWindow::CreateShortcutLink(const std::filesystem::path& shortcut_path, + const std::string& comment, + const std::filesystem::path& icon_path, + const std::filesystem::path& command, + const std::string& arguments, const std::string& categories, + const std::string& keywords, const std::string& name) { + + bool shortcut_succeeded = false; + + // Replace characters that are illegal in Windows filenames + std::filesystem::path shortcut_path_full = + shortcut_path / Common::FS::UTF8FilenameSantizer(name); + +#if defined(__linux__) || defined(__FreeBSD__) + shortcut_path_full += ".desktop"; +#elif defined(_WIN32) + shortcut_path_full += ".lnk"; +#endif + + LOG_INFO(Common, "[GMainWindow::CreateShortcutLink] Create shortcut path: {}", + shortcut_path_full.string()); + +#if defined(__linux__) || defined(__FreeBSD__) + // This desktop file template was writing referencing + // https://specifications.freedesktop.org/desktop-entry-spec/desktop-entry-spec-1.0.html + try { + + // Plus 'Type' is required + if (name.empty()) { + LOG_ERROR(Common, "[GMainWindow::CreateShortcutLink] Name is empty"); + shortcut_succeeded = false; + return shortcut_succeeded; + } + std::ofstream shortcut_stream(shortcut_path_full, std::ios::binary | std::ios::trunc); + + if (shortcut_stream.is_open()) { + + fmt::print(shortcut_stream, "[Desktop Entry]\n"); + fmt::print(shortcut_stream, "Type=Application\n"); + fmt::print(shortcut_stream, "Version=1.0\n"); + fmt::print(shortcut_stream, "Name={}\n", name); + + if (!comment.empty()) { + fmt::print(shortcut_stream, "Comment={}\n", comment); + } + + if (std::filesystem::is_regular_file(icon_path)) { + fmt::print(shortcut_stream, "Icon={}\n", icon_path.string()); + } + + fmt::print(shortcut_stream, "TryExec={}\n", command.string()); + fmt::print(shortcut_stream, "Exec={}", command.string()); + + if (!arguments.empty()) { + fmt::print(shortcut_stream, " {}", arguments); + } + + fmt::print(shortcut_stream, "\n"); + + if (!categories.empty()) { + fmt::print(shortcut_stream, "Categories={}\n", categories); + } + + if (!keywords.empty()) { + fmt::print(shortcut_stream, "Keywords={}\n", keywords); + } + + shortcut_stream.close(); + return true; + + } else { + LOG_ERROR(Common, "[GMainWindow::CreateShortcutLink] Failed to create shortcut"); + return false; + } + + shortcut_stream.close(); + } catch (const std::exception& e) { + LOG_ERROR(Common, "[GMainWindow::CreateShortcutLink] Failed to create shortcut: {}", + e.what()); + } +#elif defined(_WIN32) + // Initialize COM + auto hr = CoInitialize(NULL); + if (FAILED(hr)) { + return shortcut_succeeded; + } + + IShellLinkW* ps1; + + auto hres = CoCreateInstance(CLSID_ShellLink, NULL, CLSCTX_INPROC_SERVER, IID_IShellLinkW, + (void**)&ps1); + + // The UTF-16 / UTF-8 conversion is broken in C++, it is necessary to perform these steps and + // resort to the native Windows function. + std::wstring wshortcut_path_full = Common::UTF8ToUTF16W(shortcut_path_full.string()); + std::wstring wicon_path = Common::UTF8ToUTF16W(icon_path.string()); + std::wstring wcommand = Common::UTF8ToUTF16W(command.string()); + std::wstring warguments = Common::UTF8ToUTF16W(arguments); + std::wstring wcomment = Common::UTF8ToUTF16W(comment); + + if (SUCCEEDED(hres)) { + if (std::filesystem::is_regular_file(command)) + hres = ps1->SetPath(wcommand.data()); + + if (SUCCEEDED(hres) && !arguments.empty()) + hres = ps1->SetArguments(warguments.data()); + + if (SUCCEEDED(hres) && !comment.empty()) + hres = ps1->SetDescription(wcomment.data()); + + if (SUCCEEDED(hres) && std::filesystem::is_regular_file(icon_path)) + hres = ps1->SetIconLocation(wicon_path.data(), 0); + + IPersistFile* pPersistFile = nullptr; + + if (SUCCEEDED(hres)) { + hres = ps1->QueryInterface(IID_IPersistFile, (void**)&pPersistFile); + + if (SUCCEEDED(hres) && pPersistFile != nullptr) { + hres = pPersistFile->Save(wshortcut_path_full.data(), TRUE); + if (SUCCEEDED(hres)) { + shortcut_succeeded = true; + } + } + } + + if (pPersistFile != nullptr) { + pPersistFile->Release(); + } + } else { + LOG_ERROR(Common, "[GMainWindow::CreateShortcutLink] Failed to create IShellLinkWinstance"); + } + + ps1->Release(); + CoUninitialize(); +#endif + + if (shortcut_succeeded && std::filesystem::is_regular_file(shortcut_path_full)) { + LOG_INFO(Common, "[GMainWindow::CreateShortcutLink] Shortcut created"); + } else { + LOG_ERROR(Common, "[GMainWindow::CreateShortcutLink] Shortcut error, failed to create it"); + shortcut_succeeded = false; + } + + return shortcut_succeeded; +} + +// Messages in pre-defined message boxes for less code spaghetti +bool GMainWindow::CreateShortcutMessagesGUI(QWidget* parent, const int& imsg, + const std::string title) { + QMessageBox::StandardButtons buttons; + int result = 0; + + switch (imsg) { + + case GMainWindow::CREATE_SHORTCUT_MSGBOX_FULLSCREEN_YES: + buttons = QMessageBox::Yes | QMessageBox::No; + + result = + QMessageBox::information(parent, tr("Create Shortcut"), + tr("Do you want to launch the game in fullscreen?"), buttons); + + LOG_INFO(Frontend, "Shortcut will launch in fullscreen"); + return (result == QMessageBox::No) ? false : true; + + case GMainWindow::CREATE_SHORTCUT_MSGBOX_SUCCESS: + QMessageBox::information( + parent, tr("Create Shortcut"), + tr("Successfully created a shortcut to %1").arg(QString::fromStdString(title))); + LOG_INFO(Frontend, "Successfully created a shortcut to {}", title); + return true; + + case GMainWindow::CREATE_SHORTCUT_MSGBOX_APPVOLATILE_WARNING: + result = QMessageBox::warning( + this, tr("Create Shortcut"), + tr("This will create a shortcut to the current AppImage. This may " + "not work well if you update. Continue?"), + QMessageBox::StandardButton::Ok | QMessageBox::StandardButton::Cancel); + return (result == QMessageBox::StandardButton::Cancel) ? true : false; + case GMainWindow::CREATE_SHORTCUT_MSGBOX_ADMIN: + buttons = QMessageBox::Ok; + QMessageBox::critical(parent, tr("Create Shortcut"), + tr("Cannot create shortcut in Apps. Restart yuzu as administrator."), + buttons); + LOG_ERROR(Frontend, "Cannot create shortcut in Apps. Restart yuzu as administrator."); + return true; + default: + buttons = QMessageBox::Ok; + QMessageBox::critical( + parent, tr("Create Shortcut"), + tr("Failed to create a shortcut to %1").arg(QString::fromStdString(title)), buttons); + LOG_ERROR(Frontend, "Failed to create a shortcut to {}", title); + return true; + } + + return true; +} + +bool GMainWindow::MakeShortcutIcoPath(const u64 program_id, const std::string_view game_file_name, + std::filesystem::path& icons_path) { + + // Get path to Yuzu icons directory & icon extension + std::string ico_extension = "png"; +#if defined(_WIN32) + icons_path = Common::FS::GetYuzuPath(Common::FS::YuzuPath::ConfigDir) / "icons"; + ico_extension = "ico"; +#elif defined(__linux__) || defined(__FreeBSD__) + icons_path = GetDataDirectory("XDG_DATA_HOME") / "icons/hicolor/256x256"; +#endif + + // Create icons directory if it doesn't exist + if (!Common::FS::CreateDirs(icons_path)) { + QMessageBox::critical( + this, tr("Create Icon"), + tr("Cannot create icon file. Path \"%1\" does not exist and cannot be created.") + .arg(QString::fromStdString(icons_path.string())), + QMessageBox::StandardButton::Ok); + icons_path = ""; // Reset path + return false; + } + + // Create icon file path + icons_path /= (program_id == 0 ? fmt::format("yuzu-{}.{}", game_file_name, ico_extension) + : fmt::format("yuzu-{:016X}.{}", program_id, ico_extension)); + return true; +} + void GMainWindow::OnGameListCreateShortcut(u64 program_id, const std::string& game_path, GameListShortcutTarget target) { + // Get path to yuzu executable const QStringList args = QApplication::arguments(); std::filesystem::path yuzu_command = args[0].toStdString(); @@ -2851,159 +3079,111 @@ void GMainWindow::OnGameListCreateShortcut(u64 program_id, const std::string& ga yuzu_command = Common::FS::GetCurrentDir() / yuzu_command; } + // Shortcut path + std::filesystem::path shortcut_path{}; + if (target == GameListShortcutTarget::Desktop) { + shortcut_path = Common::FS::GetDesktopPath(); + if (!std::filesystem::exists(shortcut_path)) { + shortcut_path = + QStandardPaths::writableLocation(QStandardPaths::DesktopLocation).toStdString(); + } + } else if (target == GameListShortcutTarget::Applications) { + +#if defined(_WIN32) + HANDLE hProcess = GetCurrentProcess(); + if (!IsUserAnAdmin()) { + GMainWindow::CreateShortcutMessagesGUI(this, GMainWindow::CREATE_SHORTCUT_MSGBOX_ADMIN, + ""); + return; + } + CloseHandle(hProcess); +#endif // _WIN32 + + shortcut_path = Common::FS::GetAppsShortcutsPath(); + if (!std::filesystem::exists(shortcut_path)) { + shortcut_path = QStandardPaths::writableLocation(QStandardPaths::ApplicationsLocation) + .toStdString(); + } + } + + // Icon path and title + std::string title; + std::filesystem::path icons_path; + if (std::filesystem::exists(shortcut_path)) { + + // Get title from game file + const FileSys::PatchManager pm{program_id, system->GetFileSystemController(), + system->GetContentProvider()}; + const auto control = pm.GetControlMetadata(); + const auto loader = + Loader::GetLoader(*system, vfs->OpenFile(game_path, FileSys::Mode::Read)); + + title = fmt::format("{:016X}", program_id); + + if (control.first != nullptr) { + title = control.first->GetApplicationName(); + } else { + loader->ReadTitle(title); + } + + // Get icon from game file + std::vector icon_image_file{}; + if (control.second != nullptr) { + icon_image_file = control.second->ReadAllBytes(); + } else if (loader->ReadIcon(icon_image_file) != Loader::ResultStatus::Success) { + LOG_WARNING(Frontend, "Could not read icon from {:s}", game_path); + } + + QImage icon_data = + QImage::fromData(icon_image_file.data(), static_cast(icon_image_file.size())); + + if (GMainWindow::MakeShortcutIcoPath(program_id, title, icons_path)) { + if (!SaveIconToFile(icon_data, icons_path)) { + LOG_ERROR(Frontend, "Could not write icon to file"); + } + } + + } else { + GMainWindow::CreateShortcutMessagesGUI(this, GMainWindow::CREATE_SHORTCUT_MSGBOX_ERROR, + title); + LOG_ERROR(Frontend, "[GMainWindow::OnGameListCreateShortcut] Invalid shortcut target"); + return; + } + +// Special case for AppImages #if defined(__linux__) // Warn once if we are making a shortcut to a volatile AppImage const std::string appimage_ending = std::string(Common::g_scm_rev).substr(0, 9).append(".AppImage"); if (yuzu_command.string().ends_with(appimage_ending) && !UISettings::values.shortcut_already_warned) { - if (QMessageBox::warning(this, tr("Create Shortcut"), - tr("This will create a shortcut to the current AppImage. This may " - "not work well if you update. Continue?"), - QMessageBox::StandardButton::Ok | - QMessageBox::StandardButton::Cancel) == - QMessageBox::StandardButton::Cancel) { + if (GMainWindow::CreateShortcutMessagesGUI( + this, GMainWindow::CREATE_SHORTCUT_MSGBOX_APPVOLATILE_WARNING, title)) { return; } UISettings::values.shortcut_already_warned = true; } #endif // __linux__ - std::filesystem::path target_directory{}; - - switch (target) { - case GameListShortcutTarget::Desktop: { - const QString desktop_path = - QStandardPaths::writableLocation(QStandardPaths::DesktopLocation); - target_directory = desktop_path.toUtf8().toStdString(); - break; + // Create shortcut + std::string arguments = fmt::format("-g \"{:s}\"", game_path); + if (GMainWindow::CreateShortcutMessagesGUI( + this, GMainWindow::CREATE_SHORTCUT_MSGBOX_FULLSCREEN_YES, title)) { + arguments = "-f " + arguments; } - case GameListShortcutTarget::Applications: { - const QString applications_path = - QStandardPaths::writableLocation(QStandardPaths::ApplicationsLocation); - if (applications_path.isEmpty()) { - const char* home = std::getenv("HOME"); - if (home != nullptr) { - target_directory = std::filesystem::path(home) / ".local/share/applications"; - } - } else { - target_directory = applications_path.toUtf8().toStdString(); - } - break; - } - default: - return; - } - - const QDir dir(QString::fromStdString(target_directory.generic_string())); - if (!dir.exists()) { - QMessageBox::critical(this, tr("Create Shortcut"), - tr("Cannot create shortcut. Path \"%1\" does not exist.") - .arg(QString::fromStdString(target_directory.generic_string())), - QMessageBox::StandardButton::Ok); - return; - } - - const std::string game_file_name = std::filesystem::path(game_path).filename().string(); - // Determine full paths for icon and shortcut -#if defined(__linux__) || defined(__FreeBSD__) - const char* home = std::getenv("HOME"); - const std::filesystem::path home_path = (home == nullptr ? "~" : home); - const char* xdg_data_home = std::getenv("XDG_DATA_HOME"); - - std::filesystem::path system_icons_path = - (xdg_data_home == nullptr ? home_path / ".local/share/" - : std::filesystem::path(xdg_data_home)) / - "icons/hicolor/256x256"; - if (!Common::FS::CreateDirs(system_icons_path)) { - QMessageBox::critical( - this, tr("Create Icon"), - tr("Cannot create icon file. Path \"%1\" does not exist and cannot be created.") - .arg(QString::fromStdString(system_icons_path)), - QMessageBox::StandardButton::Ok); - return; - } - std::filesystem::path icon_path = - system_icons_path / (program_id == 0 ? fmt::format("yuzu-{}.png", game_file_name) - : fmt::format("yuzu-{:016X}.png", program_id)); - const std::filesystem::path shortcut_path = - target_directory / (program_id == 0 ? fmt::format("yuzu-{}.desktop", game_file_name) - : fmt::format("yuzu-{:016X}.desktop", program_id)); -#elif defined(WIN32) - std::filesystem::path icons_path = - Common::FS::GetYuzuPathString(Common::FS::YuzuPath::IconsDir); - std::filesystem::path icon_path = - icons_path / ((program_id == 0 ? fmt::format("yuzu-{}.ico", game_file_name) - : fmt::format("yuzu-{:016X}.ico", program_id))); -#else - std::string icon_extension; -#endif - - // Get title from game file - const FileSys::PatchManager pm{program_id, system->GetFileSystemController(), - system->GetContentProvider()}; - const auto control = pm.GetControlMetadata(); - const auto loader = Loader::GetLoader(*system, vfs->OpenFile(game_path, FileSys::Mode::Read)); - - std::string title{fmt::format("{:016X}", program_id)}; - - if (control.first != nullptr) { - title = control.first->GetApplicationName(); - } else { - loader->ReadTitle(title); - } - - // Get icon from game file - std::vector icon_image_file{}; - if (control.second != nullptr) { - icon_image_file = control.second->ReadAllBytes(); - } else if (loader->ReadIcon(icon_image_file) != Loader::ResultStatus::Success) { - LOG_WARNING(Frontend, "Could not read icon from {:s}", game_path); - } - - QImage icon_data = - QImage::fromData(icon_image_file.data(), static_cast(icon_image_file.size())); -#if defined(__linux__) || defined(__FreeBSD__) - // Convert and write the icon as a PNG - if (!icon_data.save(QString::fromStdString(icon_path.string()))) { - LOG_ERROR(Frontend, "Could not write icon as PNG to file"); - } else { - LOG_INFO(Frontend, "Wrote an icon to {}", icon_path.string()); - } -#elif defined(WIN32) - if (!SaveIconToFile(icon_path.string(), icon_data)) { - LOG_ERROR(Frontend, "Could not write icon to file"); - return; - } -#endif // __linux__ - -#ifdef _WIN32 - // Replace characters that are illegal in Windows filenames by a dash - const std::string illegal_chars = "<>:\"/\\|?*"; - for (char c : illegal_chars) { - std::replace(title.begin(), title.end(), c, '_'); - } - const std::filesystem::path shortcut_path = target_directory / (title + ".lnk").c_str(); -#endif - const std::string comment = tr("Start %1 with the yuzu Emulator").arg(QString::fromStdString(title)).toStdString(); - const std::string arguments = fmt::format("-g \"{:s}\"", game_path); const std::string categories = "Game;Emulator;Qt;"; const std::string keywords = "Switch;Nintendo;"; - if (!CreateShortcut(shortcut_path.string(), title, comment, icon_path.string(), - yuzu_command.string(), arguments, categories, keywords)) { - QMessageBox::critical(this, tr("Create Shortcut"), - tr("Failed to create a shortcut at %1") - .arg(QString::fromStdString(shortcut_path.string()))); + if (GMainWindow::CreateShortcutLink(shortcut_path, comment, icons_path, yuzu_command, arguments, + categories, keywords, title)) { + GMainWindow::CreateShortcutMessagesGUI(this, GMainWindow::CREATE_SHORTCUT_MSGBOX_SUCCESS, + title); return; } - LOG_INFO(Frontend, "Wrote a shortcut to {}", shortcut_path.string()); - QMessageBox::information( - this, tr("Create Shortcut"), - tr("Successfully created a shortcut to %1").arg(QString::fromStdString(title))); + GMainWindow::CreateShortcutMessagesGUI(this, GMainWindow::CREATE_SHORTCUT_MSGBOX_ERROR, title); } void GMainWindow::OnGameListOpenDirectory(const QString& directory) { @@ -3998,66 +4178,6 @@ void GMainWindow::OpenPerGameConfiguration(u64 title_id, const std::string& file } } -bool GMainWindow::CreateShortcut(const std::string& shortcut_path, const std::string& title, - const std::string& comment, const std::string& icon_path, - const std::string& command, const std::string& arguments, - const std::string& categories, const std::string& keywords) { -#if defined(__linux__) || defined(__FreeBSD__) - // This desktop file template was writing referencing - // https://specifications.freedesktop.org/desktop-entry-spec/desktop-entry-spec-1.0.html - std::string shortcut_contents{}; - shortcut_contents.append("[Desktop Entry]\n"); - shortcut_contents.append("Type=Application\n"); - shortcut_contents.append("Version=1.0\n"); - shortcut_contents.append(fmt::format("Name={:s}\n", title)); - shortcut_contents.append(fmt::format("Comment={:s}\n", comment)); - shortcut_contents.append(fmt::format("Icon={:s}\n", icon_path)); - shortcut_contents.append(fmt::format("TryExec={:s}\n", command)); - shortcut_contents.append(fmt::format("Exec={:s} {:s}\n", command, arguments)); - shortcut_contents.append(fmt::format("Categories={:s}\n", categories)); - shortcut_contents.append(fmt::format("Keywords={:s}\n", keywords)); - - std::ofstream shortcut_stream(shortcut_path); - if (!shortcut_stream.is_open()) { - LOG_WARNING(Common, "Failed to create file {:s}", shortcut_path); - return false; - } - shortcut_stream << shortcut_contents; - shortcut_stream.close(); - - return true; -#elif defined(WIN32) - IShellLinkW* shell_link; - auto hres = CoCreateInstance(CLSID_ShellLink, NULL, CLSCTX_INPROC_SERVER, IID_IShellLinkW, - (void**)&shell_link); - if (FAILED(hres)) { - return false; - } - shell_link->SetPath( - Common::UTF8ToUTF16W(command).data()); // Path to the object we are referring to - shell_link->SetArguments(Common::UTF8ToUTF16W(arguments).data()); - shell_link->SetDescription(Common::UTF8ToUTF16W(comment).data()); - shell_link->SetIconLocation(Common::UTF8ToUTF16W(icon_path).data(), 0); - - IPersistFile* persist_file; - hres = shell_link->QueryInterface(IID_IPersistFile, (void**)&persist_file); - if (FAILED(hres)) { - return false; - } - - hres = persist_file->Save(Common::UTF8ToUTF16W(shortcut_path).data(), TRUE); - if (FAILED(hres)) { - return false; - } - - persist_file->Release(); - shell_link->Release(); - - return true; -#endif - return false; -} - void GMainWindow::OnLoadAmiibo() { if (emu_thread == nullptr || !emu_thread->IsRunning()) { return; diff --git a/src/yuzu/main.h b/src/yuzu/main.h index 270a40c5f9..bf6756b486 100644 --- a/src/yuzu/main.h +++ b/src/yuzu/main.h @@ -6,6 +6,7 @@ #include #include +#include #include #include #include @@ -151,6 +152,14 @@ class GMainWindow : public QMainWindow { UI_EMU_STOPPING, }; + const enum { + CREATE_SHORTCUT_MSGBOX_FULLSCREEN_YES, + CREATE_SHORTCUT_MSGBOX_SUCCESS, + CREATE_SHORTCUT_MSGBOX_ERROR, + CREATE_SHORTCUT_MSGBOX_APPVOLATILE_WARNING, + CREATE_SHORTCUT_MSGBOX_ADMIN, + }; + public: void filterBarSetChecked(bool state); void UpdateUITheme(); @@ -433,11 +442,14 @@ private: bool ConfirmShutdownGame(); QString GetTasStateDescription() const; - bool CreateShortcut(const std::string& shortcut_path, const std::string& title, - const std::string& comment, const std::string& icon_path, - const std::string& command, const std::string& arguments, - const std::string& categories, const std::string& keywords); - + bool CreateShortcutMessagesGUI(QWidget* parent, const int& imsg, const std::string title); + bool MakeShortcutIcoPath(const u64 program_id, const std::string_view game_file_name, + std::filesystem::path& icons_path); + bool CreateShortcutLink(const std::filesystem::path& shortcut_path, const std::string& comment, + const std::filesystem::path& icon_path, + const std::filesystem::path& command, const std::string& arguments, + const std::string& categories, const std::string& keywords, + const std::string& name); /** * Mimic the behavior of QMessageBox::question but link controller navigation to the dialog * The only difference is that it returns a boolean. diff --git a/src/yuzu/util/util.cpp b/src/yuzu/util/util.cpp index f2854c8ec3..4d199ebd16 100644 --- a/src/yuzu/util/util.cpp +++ b/src/yuzu/util/util.cpp @@ -42,7 +42,7 @@ QPixmap CreateCirclePixmapFromColor(const QColor& color) { return circle_pixmap; } -bool SaveIconToFile(const std::string_view path, const QImage& image) { +bool SaveIconToFile(const QImage& image, const std::filesystem::path& icon_path) { #if defined(WIN32) #pragma pack(push, 2) struct IconDir { @@ -73,7 +73,7 @@ bool SaveIconToFile(const std::string_view path, const QImage& image) { .id_count = static_cast(scale_sizes.size()), }; - Common::FS::IOFile icon_file(path, Common::FS::FileAccessMode::Write, + Common::FS::IOFile icon_file(icon_path.string(), Common::FS::FileAccessMode::Write, Common::FS::FileType::BinaryFile); if (!icon_file.IsOpen()) { return false; @@ -135,7 +135,16 @@ bool SaveIconToFile(const std::string_view path, const QImage& image) { icon_file.Close(); return true; -#else - return false; +#elif defined(__linux__) || defined(__FreeBSD__) + // Convert and write the icon as a PNG + if (!image.save(QString::fromStdString(icon_path.string()))) { + LOG_ERROR(Frontend, "Could not write icon as PNG to file"); + } else { + LOG_INFO(Frontend, "Wrote an icon to {}", icon_path.string()); + } + + return true; #endif + + return false; } diff --git a/src/yuzu/util/util.h b/src/yuzu/util/util.h index 09c14ce3fc..8839e160ae 100644 --- a/src/yuzu/util/util.h +++ b/src/yuzu/util/util.h @@ -3,26 +3,36 @@ #pragma once +#include #include #include /// Returns a QFont object appropriate to use as a monospace font for debugging widgets, etc. + [[nodiscard]] QFont GetMonospaceFont(); /// Convert a size in bytes into a readable format (KiB, MiB, etc.) + [[nodiscard]] QString ReadableByteSize(qulonglong size); /** * Creates a circle pixmap from a specified color + * * @param color The color the pixmap shall have + * * @return QPixmap circle pixmap */ + [[nodiscard]] QPixmap CreateCirclePixmapFromColor(const QColor& color); /** * Saves a windows icon to a file - * @param path The icons path + * * @param image The image to save + * + * @param path The icons path + * * @return bool If the operation succeeded */ -[[nodiscard]] bool SaveIconToFile(const std::string_view path, const QImage& image); + +[[nodiscard]] bool SaveIconToFile(const QImage& image, const std::filesystem::path& icon_path); From 0a75519ab590e250c94dc04b3f6072a69ef7e96b Mon Sep 17 00:00:00 2001 From: boludoz Date: Sun, 15 Oct 2023 03:16:29 -0300 Subject: [PATCH 002/154] Fixes and improvements --- src/common/fs/path_util.cpp | 39 +++++++++++++++++++++++++++---------- src/yuzu/main.h | 2 +- src/yuzu/util/util.cpp | 4 ++-- 3 files changed, 32 insertions(+), 13 deletions(-) diff --git a/src/common/fs/path_util.cpp b/src/common/fs/path_util.cpp index a461161ede..f030939ce0 100644 --- a/src/common/fs/path_util.cpp +++ b/src/common/fs/path_util.cpp @@ -363,13 +363,28 @@ fs::path GetDesktopPath() { LOG_ERROR(Common_Filesystem, "[GetDesktopPath] Failed to get the path to the desktop directory"); } -#else - fs::path shortcut_path = GetHomeDirectory() / "Desktop"; - if (fs::exists(shortcut_path)) { - return shortcut_path; - } -#endif return fs::path{}; +#else + fs::path shortcut_path{}; + + // Array of possible desktop + std::vector desktop_paths = { + "Desktop", "Escritorio", "Bureau", "Skrivebord", "Plocha", + "Skrivbord", "Desktop", "Рабочий стол", "Pulpit", "Área de Trabalho", + "Робочий стіл", "Bureaublad", "デスクトップ", "桌面", "Pöytä", + "바탕 화면", "바탕 화면", "سطح المكتب", "دسکتاپ", "שולחן עבודה"}; + + for (auto& path : desktop_paths) { + if (fs::exists(GetHomeDirectory() / path)) { + return path; + } + } + + LOG_ERROR(Common_Filesystem, + "[GetDesktopPath] Failed to get the path to the desktop directory"); + + return shortcut_path; +#endif } fs::path GetAppsShortcutsPath() { @@ -387,16 +402,20 @@ fs::path GetAppsShortcutsPath() { LOG_ERROR(Common_Filesystem, "[GetAppsShortcutsPath] Failed to get the path to the App Shortcuts directory"); } + + return fs::path{}; #else fs::path shortcut_path = GetHomeDirectory() / ".local/share/applications"; if (!fs::exists(shortcut_path)) { shortcut_path = std::filesystem::path("/usr/share/applications"); - return shortcut_path; - } else { - return shortcut_path; + if (!fs::exists(shortcut_path)) { + LOG_ERROR(Common_Filesystem, + "[GetAppsShortcutsPath] Failed to get the path to the App Shortcuts " + "directory"); + } } -#endif return fs::path{}; +#endif } // vvvvvvvvvv Deprecated vvvvvvvvvv // diff --git a/src/yuzu/main.h b/src/yuzu/main.h index bf6756b486..d7426607f7 100644 --- a/src/yuzu/main.h +++ b/src/yuzu/main.h @@ -152,7 +152,7 @@ class GMainWindow : public QMainWindow { UI_EMU_STOPPING, }; - const enum { + enum { CREATE_SHORTCUT_MSGBOX_FULLSCREEN_YES, CREATE_SHORTCUT_MSGBOX_SUCCESS, CREATE_SHORTCUT_MSGBOX_ERROR, diff --git a/src/yuzu/util/util.cpp b/src/yuzu/util/util.cpp index 4d199ebd16..9755004ad7 100644 --- a/src/yuzu/util/util.cpp +++ b/src/yuzu/util/util.cpp @@ -144,7 +144,7 @@ bool SaveIconToFile(const QImage& image, const std::filesystem::path& icon_path) } return true; -#endif - +#else return false; +#endif } From 4d4fe69223bd6cd053cbd2088e5925fb653a12d3 Mon Sep 17 00:00:00 2001 From: boludoz Date: Sun, 15 Oct 2023 14:44:23 -0300 Subject: [PATCH 003/154] Unnecessary feature removed --- src/common/fs/path_util.cpp | 70 ------------------------------------- src/common/fs/path_util.h | 15 +------- src/yuzu/main.cpp | 16 +++------ src/yuzu/util/util.h | 3 -- 4 files changed, 5 insertions(+), 99 deletions(-) diff --git a/src/common/fs/path_util.cpp b/src/common/fs/path_util.cpp index f030939ce0..bccf953e41 100644 --- a/src/common/fs/path_util.cpp +++ b/src/common/fs/path_util.cpp @@ -348,76 +348,6 @@ fs::path GetBundleDirectory() { #endif -fs::path GetDesktopPath() { -#if defined(_WIN32) - PWSTR DesktopPath = nullptr; - - if (SUCCEEDED(SHGetKnownFolderPath(FOLDERID_Desktop, 0, NULL, &DesktopPath))) { - std::wstring wideDesktopPath(DesktopPath); - CoTaskMemFree(DesktopPath); - - // UTF-16 filesystem lib to UTF-8 is broken, so we need to convert to UTF-8 with the with - // the Windows library (Filesystem converts the strings literally). - return fs::path{Common::UTF16ToUTF8(wideDesktopPath)}; - } else { - LOG_ERROR(Common_Filesystem, - "[GetDesktopPath] Failed to get the path to the desktop directory"); - } - return fs::path{}; -#else - fs::path shortcut_path{}; - - // Array of possible desktop - std::vector desktop_paths = { - "Desktop", "Escritorio", "Bureau", "Skrivebord", "Plocha", - "Skrivbord", "Desktop", "Рабочий стол", "Pulpit", "Área de Trabalho", - "Робочий стіл", "Bureaublad", "デスクトップ", "桌面", "Pöytä", - "바탕 화면", "바탕 화면", "سطح المكتب", "دسکتاپ", "שולחן עבודה"}; - - for (auto& path : desktop_paths) { - if (fs::exists(GetHomeDirectory() / path)) { - return path; - } - } - - LOG_ERROR(Common_Filesystem, - "[GetDesktopPath] Failed to get the path to the desktop directory"); - - return shortcut_path; -#endif -} - -fs::path GetAppsShortcutsPath() { -#if defined(_WIN32) - PWSTR AppShortcutsPath = nullptr; - - if (SUCCEEDED(SHGetKnownFolderPath(FOLDERID_CommonPrograms, 0, NULL, &AppShortcutsPath))) { - std::wstring wideAppShortcutsPath(AppShortcutsPath); - CoTaskMemFree(AppShortcutsPath); - - // UTF-16 filesystem lib to UTF-8 is broken, so we need to convert to UTF-8 with the with - // the Windows library (Filesystem converts the strings literally). - return fs::path{Common::UTF16ToUTF8(wideAppShortcutsPath)}; - } else { - LOG_ERROR(Common_Filesystem, - "[GetAppsShortcutsPath] Failed to get the path to the App Shortcuts directory"); - } - - return fs::path{}; -#else - fs::path shortcut_path = GetHomeDirectory() / ".local/share/applications"; - if (!fs::exists(shortcut_path)) { - shortcut_path = std::filesystem::path("/usr/share/applications"); - if (!fs::exists(shortcut_path)) { - LOG_ERROR(Common_Filesystem, - "[GetAppsShortcutsPath] Failed to get the path to the App Shortcuts " - "directory"); - } - } - return fs::path{}; -#endif -} - // vvvvvvvvvv Deprecated vvvvvvvvvv // std::string_view RemoveTrailingSlash(std::string_view path) { diff --git a/src/common/fs/path_util.h b/src/common/fs/path_util.h index b88a388d19..63801c924b 100644 --- a/src/common/fs/path_util.h +++ b/src/common/fs/path_util.h @@ -244,6 +244,7 @@ void SetYuzuPath(YuzuPath yuzu_path, const Path& new_path) { * @returns The path of the current user's %APPDATA% directory. */ [[nodiscard]] std::filesystem::path GetAppDataRoamingDirectory(); + #else /** @@ -274,20 +275,6 @@ void SetYuzuPath(YuzuPath yuzu_path, const Path& new_path) { #endif -/** - * Gets the path of the current user's desktop directory. - * - * @returns The path of the current user's desktop directory. - */ -[[nodiscard]] std::filesystem::path GetDesktopPath(); - -/** - * Gets the path of the current user's apps directory. - * - * @returns The path of the current user's apps directory. - */ -[[nodiscard]] std::filesystem::path GetAppsShortcutsPath(); - // vvvvvvvvvv Deprecated vvvvvvvvvv // // Removes the final '/' or '\' if one exists diff --git a/src/yuzu/main.cpp b/src/yuzu/main.cpp index e4dc717ed3..fd68ac9b64 100644 --- a/src/yuzu/main.cpp +++ b/src/yuzu/main.cpp @@ -3082,13 +3082,9 @@ void GMainWindow::OnGameListCreateShortcut(u64 program_id, const std::string& ga // Shortcut path std::filesystem::path shortcut_path{}; if (target == GameListShortcutTarget::Desktop) { - shortcut_path = Common::FS::GetDesktopPath(); - if (!std::filesystem::exists(shortcut_path)) { - shortcut_path = - QStandardPaths::writableLocation(QStandardPaths::DesktopLocation).toStdString(); - } + shortcut_path = + QStandardPaths::writableLocation(QStandardPaths::DesktopLocation).toStdString(); } else if (target == GameListShortcutTarget::Applications) { - #if defined(_WIN32) HANDLE hProcess = GetCurrentProcess(); if (!IsUserAnAdmin()) { @@ -3098,12 +3094,8 @@ void GMainWindow::OnGameListCreateShortcut(u64 program_id, const std::string& ga } CloseHandle(hProcess); #endif // _WIN32 - - shortcut_path = Common::FS::GetAppsShortcutsPath(); - if (!std::filesystem::exists(shortcut_path)) { - shortcut_path = QStandardPaths::writableLocation(QStandardPaths::ApplicationsLocation) - .toStdString(); - } + shortcut_path = + QStandardPaths::writableLocation(QStandardPaths::ApplicationsLocation).toStdString(); } // Icon path and title diff --git a/src/yuzu/util/util.h b/src/yuzu/util/util.h index 8839e160ae..31e82ff67d 100644 --- a/src/yuzu/util/util.h +++ b/src/yuzu/util/util.h @@ -8,11 +8,9 @@ #include /// Returns a QFont object appropriate to use as a monospace font for debugging widgets, etc. - [[nodiscard]] QFont GetMonospaceFont(); /// Convert a size in bytes into a readable format (KiB, MiB, etc.) - [[nodiscard]] QString ReadableByteSize(qulonglong size); /** @@ -34,5 +32,4 @@ * * @return bool If the operation succeeded */ - [[nodiscard]] bool SaveIconToFile(const QImage& image, const std::filesystem::path& icon_path); From 9ffa1801c75073afb851351ecdd1a8b40e33cc5c Mon Sep 17 00:00:00 2001 From: boludoz Date: Sun, 15 Oct 2023 20:57:06 -0300 Subject: [PATCH 004/154] Typing and formatting errors fixed. --- src/common/fs/fs_util.cpp | 44 ++++++++++++++++++------------------- src/common/fs/fs_util.h | 8 +++---- src/common/fs/path_util.cpp | 8 +++---- src/yuzu/main.cpp | 24 ++++++++++---------- src/yuzu/util/util.cpp | 3 +-- src/yuzu/util/util.h | 10 ++------- 6 files changed, 43 insertions(+), 54 deletions(-) diff --git a/src/common/fs/fs_util.cpp b/src/common/fs/fs_util.cpp index 442f637281..e77958224b 100644 --- a/src/common/fs/fs_util.cpp +++ b/src/common/fs/fs_util.cpp @@ -36,21 +36,21 @@ std::string PathToUTF8String(const std::filesystem::path& path) { return ToUTF8String(path.u8string()); } -std::u8string U8FilenameSantizer(const std::u8string_view u8filename) { - std::u8string u8path_santized{u8filename.begin(), u8filename.end()}; - size_t eSizeSanitized = u8path_santized.size(); +std::u8string U8FilenameSanitizer(const std::u8string_view u8filename) { + std::u8string u8path_sanitized{u8filename.begin(), u8filename.end()}; + size_t eSizeSanitized = u8path_sanitized.size(); - // Special case for ":", for example: 'Pepe: La secuela' --> 'Pepe - La - // secuela' or 'Pepe : La secuela' --> 'Pepe - La secuela' + // The name is improved to make it look more beautiful and prohibited characters and shapes are + // removed. Switch is used since it is better with many conditions. for (size_t i = 0; i < eSizeSanitized; i++) { - switch (u8path_santized[i]) { + switch (u8path_sanitized[i]) { case u8':': if (i == 0 || i == eSizeSanitized - 1) { - u8path_santized.replace(i, 1, u8"_"); - } else if (u8path_santized[i - 1] == u8' ') { - u8path_santized.replace(i, 1, u8"-"); + u8path_sanitized.replace(i, 1, u8"_"); + } else if (u8path_sanitized[i - 1] == u8' ') { + u8path_sanitized.replace(i, 1, u8"-"); } else { - u8path_santized.replace(i, 1, u8" -"); + u8path_sanitized.replace(i, 1, u8" -"); eSizeSanitized++; } break; @@ -63,36 +63,36 @@ std::u8string U8FilenameSantizer(const std::u8string_view u8filename) { case u8'>': case u8'|': case u8'\0': - u8path_santized.replace(i, 1, u8"_"); + u8path_sanitized.replace(i, 1, u8"_"); break; default: break; } } - // Delete duplicated spaces || Delete duplicated dots (MacOS i think) + // Delete duplicated spaces and dots for (size_t i = 0; i < eSizeSanitized - 1; i++) { - if ((u8path_santized[i] == u8' ' && u8path_santized[i + 1] == u8' ') || - (u8path_santized[i] == u8'.' && u8path_santized[i + 1] == u8'.')) { - u8path_santized.erase(i, 1); + if ((u8path_sanitized[i] == u8' ' && u8path_sanitized[i + 1] == u8' ') || + (u8path_sanitized[i] == u8'.' && u8path_sanitized[i + 1] == u8'.')) { + u8path_sanitized.erase(i, 1); i--; } } - // Delete all spaces and dots at the end (Windows almost) - while (u8path_santized.back() == u8' ' || u8path_santized.back() == u8'.') { - u8path_santized.pop_back(); + // Delete all spaces and dots at the end of the name + while (u8path_sanitized.back() == u8' ' || u8path_sanitized.back() == u8'.') { + u8path_sanitized.pop_back(); } - if (u8path_santized.empty()) { + if (u8path_sanitized.empty()) { return u8""; } - return u8path_santized; + return u8path_sanitized; } -std::string UTF8FilenameSantizer(const std::string_view filename) { - return ToUTF8String(U8FilenameSantizer(ToU8String(filename))); +std::string UTF8FilenameSanitizer(const std::string_view filename) { + return ToUTF8String(U8FilenameSanitizer(ToU8String(filename))); } } // namespace Common::FS diff --git a/src/common/fs/fs_util.h b/src/common/fs/fs_util.h index dbb4f5a9a1..daec1f8cbc 100644 --- a/src/common/fs/fs_util.h +++ b/src/common/fs/fs_util.h @@ -87,19 +87,19 @@ concept IsChar = std::same_as; * * @param u8_string dirty encoded filename string * - * @returns utf8_string santized filename string + * @returns utf8_string sanitized filename string * */ -[[nodiscard]] std::u8string U8FilenameSantizer(const std::u8string_view u8filename); +[[nodiscard]] std::u8string U8FilenameSanitizer(const std::u8string_view u8filename); /** * Fix filename (remove invalid characters) * * @param utf8_string dirty encoded filename string * - * @returns utf8_string santized filename string + * @returns utf8_string sanitized filename string * */ -[[nodiscard]] std::string UTF8FilenameSantizer(const std::string_view filename); +[[nodiscard]] std::string UTF8FilenameSanitizer(const std::string_view filename); } // namespace Common::FS \ No newline at end of file diff --git a/src/common/fs/path_util.cpp b/src/common/fs/path_util.cpp index bccf953e41..3d88fcf4fc 100644 --- a/src/common/fs/path_util.cpp +++ b/src/common/fs/path_util.cpp @@ -260,9 +260,8 @@ fs::path GetExeDirectory() { // the Windows library (Filesystem converts the strings literally). return fs::path{Common::UTF16ToUTF8(wideExePath)}.parent_path(); } else { - LOG_ERROR(Common_Filesystem, - "[GetExeDirectory] Failed to get the path to the executable of the current " - "process"); + LOG_ERROR(Common_Filesystem, "Failed to get the path to the executable of the current " + "process"); } return fs::path{}; @@ -279,8 +278,7 @@ fs::path GetAppDataRoamingDirectory() { // the Windows library (Filesystem converts the strings literally). return fs::path{Common::UTF16ToUTF8(wideAppdataRoamingPath)}; } else { - LOG_ERROR(Common_Filesystem, - "[GetAppDataRoamingDirectory] Failed to get the path to the %APPDATA% directory"); + LOG_ERROR(Common_Filesystem, "Failed to get the path to the %APPDATA% directory"); } return fs::path{}; diff --git a/src/yuzu/main.cpp b/src/yuzu/main.cpp index fd68ac9b64..c3c12eeec4 100644 --- a/src/yuzu/main.cpp +++ b/src/yuzu/main.cpp @@ -2851,7 +2851,7 @@ bool GMainWindow::CreateShortcutLink(const std::filesystem::path& shortcut_path, // Replace characters that are illegal in Windows filenames std::filesystem::path shortcut_path_full = - shortcut_path / Common::FS::UTF8FilenameSantizer(name); + shortcut_path / Common::FS::UTF8FilenameSanitizer(name); #if defined(__linux__) || defined(__FreeBSD__) shortcut_path_full += ".desktop"; @@ -2859,8 +2859,7 @@ bool GMainWindow::CreateShortcutLink(const std::filesystem::path& shortcut_path, shortcut_path_full += ".lnk"; #endif - LOG_INFO(Common, "[GMainWindow::CreateShortcutLink] Create shortcut path: {}", - shortcut_path_full.string()); + LOG_ERROR(Frontend, "Create shortcut path: {}", shortcut_path_full.string()); #if defined(__linux__) || defined(__FreeBSD__) // This desktop file template was writing referencing @@ -2869,7 +2868,7 @@ bool GMainWindow::CreateShortcutLink(const std::filesystem::path& shortcut_path, // Plus 'Type' is required if (name.empty()) { - LOG_ERROR(Common, "[GMainWindow::CreateShortcutLink] Name is empty"); + LOG_ERROR(Frontend, "Name is empty"); shortcut_succeeded = false; return shortcut_succeeded; } @@ -2911,14 +2910,13 @@ bool GMainWindow::CreateShortcutLink(const std::filesystem::path& shortcut_path, return true; } else { - LOG_ERROR(Common, "[GMainWindow::CreateShortcutLink] Failed to create shortcut"); + LOG_ERROR(Frontend, "Failed to create shortcut"); return false; } shortcut_stream.close(); } catch (const std::exception& e) { - LOG_ERROR(Common, "[GMainWindow::CreateShortcutLink] Failed to create shortcut: {}", - e.what()); + LOG_ERROR(Frontend, "Failed to create shortcut: {}", e.what()); } #elif defined(_WIN32) // Initialize COM @@ -2970,7 +2968,7 @@ bool GMainWindow::CreateShortcutLink(const std::filesystem::path& shortcut_path, pPersistFile->Release(); } } else { - LOG_ERROR(Common, "[GMainWindow::CreateShortcutLink] Failed to create IShellLinkWinstance"); + LOG_ERROR(Frontend, "Failed to create IShellLinkWinstance"); } ps1->Release(); @@ -2978,9 +2976,9 @@ bool GMainWindow::CreateShortcutLink(const std::filesystem::path& shortcut_path, #endif if (shortcut_succeeded && std::filesystem::is_regular_file(shortcut_path_full)) { - LOG_INFO(Common, "[GMainWindow::CreateShortcutLink] Shortcut created"); + LOG_ERROR(Frontend, "Shortcut created"); } else { - LOG_ERROR(Common, "[GMainWindow::CreateShortcutLink] Shortcut error, failed to create it"); + LOG_ERROR(Frontend, "Shortcut error, failed to create it"); shortcut_succeeded = false; } @@ -3047,7 +3045,7 @@ bool GMainWindow::MakeShortcutIcoPath(const u64 program_id, const std::string_vi icons_path = Common::FS::GetYuzuPath(Common::FS::YuzuPath::ConfigDir) / "icons"; ico_extension = "ico"; #elif defined(__linux__) || defined(__FreeBSD__) - icons_path = GetDataDirectory("XDG_DATA_HOME") / "icons/hicolor/256x256"; + icons_path = Common::FS::GetDataDirectory("XDG_DATA_HOME") / "icons/hicolor/256x256"; #endif // Create icons directory if it doesn't exist @@ -3130,7 +3128,7 @@ void GMainWindow::OnGameListCreateShortcut(u64 program_id, const std::string& ga QImage::fromData(icon_image_file.data(), static_cast(icon_image_file.size())); if (GMainWindow::MakeShortcutIcoPath(program_id, title, icons_path)) { - if (!SaveIconToFile(icon_data, icons_path)) { + if (!SaveIconToFile(icons_path, icon_data)) { LOG_ERROR(Frontend, "Could not write icon to file"); } } @@ -3138,7 +3136,7 @@ void GMainWindow::OnGameListCreateShortcut(u64 program_id, const std::string& ga } else { GMainWindow::CreateShortcutMessagesGUI(this, GMainWindow::CREATE_SHORTCUT_MSGBOX_ERROR, title); - LOG_ERROR(Frontend, "[GMainWindow::OnGameListCreateShortcut] Invalid shortcut target"); + LOG_ERROR(Frontend, "Invalid shortcut target"); return; } diff --git a/src/yuzu/util/util.cpp b/src/yuzu/util/util.cpp index 9755004ad7..7b2a474966 100644 --- a/src/yuzu/util/util.cpp +++ b/src/yuzu/util/util.cpp @@ -42,7 +42,7 @@ QPixmap CreateCirclePixmapFromColor(const QColor& color) { return circle_pixmap; } -bool SaveIconToFile(const QImage& image, const std::filesystem::path& icon_path) { +bool SaveIconToFile(const std::filesystem::path& icon_path, const QImage& image) { #if defined(WIN32) #pragma pack(push, 2) struct IconDir { @@ -142,7 +142,6 @@ bool SaveIconToFile(const QImage& image, const std::filesystem::path& icon_path) } else { LOG_INFO(Frontend, "Wrote an icon to {}", icon_path.string()); } - return true; #else return false; diff --git a/src/yuzu/util/util.h b/src/yuzu/util/util.h index 31e82ff67d..4094cf6c2b 100644 --- a/src/yuzu/util/util.h +++ b/src/yuzu/util/util.h @@ -15,21 +15,15 @@ /** * Creates a circle pixmap from a specified color - * * @param color The color the pixmap shall have - * * @return QPixmap circle pixmap */ - [[nodiscard]] QPixmap CreateCirclePixmapFromColor(const QColor& color); /** * Saves a windows icon to a file - * - * @param image The image to save - * * @param path The icons path - * + * @param image The image to save * @return bool If the operation succeeded */ -[[nodiscard]] bool SaveIconToFile(const QImage& image, const std::filesystem::path& icon_path); +[[nodiscard]] bool SaveIconToFile(const std::filesystem::path& icon_path, const QImage& image); From 74961d4dfb394c098da494f6beacdd994c089566 Mon Sep 17 00:00:00 2001 From: boludoz Date: Sun, 15 Oct 2023 21:40:10 -0300 Subject: [PATCH 005/154] Less code, simpler, better. --- src/common/fs/fs_util.cpp | 59 --------------------------------------- src/common/fs/fs_util.h | 22 +-------------- src/yuzu/main.cpp | 16 +++++++++-- 3 files changed, 15 insertions(+), 82 deletions(-) diff --git a/src/common/fs/fs_util.cpp b/src/common/fs/fs_util.cpp index e77958224b..813a713c3b 100644 --- a/src/common/fs/fs_util.cpp +++ b/src/common/fs/fs_util.cpp @@ -36,63 +36,4 @@ std::string PathToUTF8String(const std::filesystem::path& path) { return ToUTF8String(path.u8string()); } -std::u8string U8FilenameSanitizer(const std::u8string_view u8filename) { - std::u8string u8path_sanitized{u8filename.begin(), u8filename.end()}; - size_t eSizeSanitized = u8path_sanitized.size(); - - // The name is improved to make it look more beautiful and prohibited characters and shapes are - // removed. Switch is used since it is better with many conditions. - for (size_t i = 0; i < eSizeSanitized; i++) { - switch (u8path_sanitized[i]) { - case u8':': - if (i == 0 || i == eSizeSanitized - 1) { - u8path_sanitized.replace(i, 1, u8"_"); - } else if (u8path_sanitized[i - 1] == u8' ') { - u8path_sanitized.replace(i, 1, u8"-"); - } else { - u8path_sanitized.replace(i, 1, u8" -"); - eSizeSanitized++; - } - break; - case u8'\\': - case u8'/': - case u8'*': - case u8'?': - case u8'\"': - case u8'<': - case u8'>': - case u8'|': - case u8'\0': - u8path_sanitized.replace(i, 1, u8"_"); - break; - default: - break; - } - } - - // Delete duplicated spaces and dots - for (size_t i = 0; i < eSizeSanitized - 1; i++) { - if ((u8path_sanitized[i] == u8' ' && u8path_sanitized[i + 1] == u8' ') || - (u8path_sanitized[i] == u8'.' && u8path_sanitized[i + 1] == u8'.')) { - u8path_sanitized.erase(i, 1); - i--; - } - } - - // Delete all spaces and dots at the end of the name - while (u8path_sanitized.back() == u8' ' || u8path_sanitized.back() == u8'.') { - u8path_sanitized.pop_back(); - } - - if (u8path_sanitized.empty()) { - return u8""; - } - - return u8path_sanitized; -} - -std::string UTF8FilenameSanitizer(const std::string_view filename) { - return ToUTF8String(U8FilenameSanitizer(ToU8String(filename))); -} - } // namespace Common::FS diff --git a/src/common/fs/fs_util.h b/src/common/fs/fs_util.h index daec1f8cbc..2492a9f942 100644 --- a/src/common/fs/fs_util.h +++ b/src/common/fs/fs_util.h @@ -82,24 +82,4 @@ concept IsChar = std::same_as; */ [[nodiscard]] std::string PathToUTF8String(const std::filesystem::path& path); -/** - * Fix filename (remove invalid characters) - * - * @param u8_string dirty encoded filename string - * - * @returns utf8_string sanitized filename string - * - */ -[[nodiscard]] std::u8string U8FilenameSanitizer(const std::u8string_view u8filename); - -/** - * Fix filename (remove invalid characters) - * - * @param utf8_string dirty encoded filename string - * - * @returns utf8_string sanitized filename string - * - */ -[[nodiscard]] std::string UTF8FilenameSanitizer(const std::string_view filename); - -} // namespace Common::FS \ No newline at end of file +} // namespace Common::FS diff --git a/src/yuzu/main.cpp b/src/yuzu/main.cpp index c3c12eeec4..f2b91a7f35 100644 --- a/src/yuzu/main.cpp +++ b/src/yuzu/main.cpp @@ -2849,9 +2849,21 @@ bool GMainWindow::CreateShortcutLink(const std::filesystem::path& shortcut_path, bool shortcut_succeeded = false; + // Copy characters if they are not illegal in Windows filenames + std::string filename = ""; + const std::string illegal_chars = "<>:\"/\\|?*"; + filename.reserve(name.size()); + std::copy_if(name.begin(), name.end(), std::back_inserter(filename), + [&illegal_chars](char c) { return illegal_chars.find(c) == std::string::npos; }); + + if (filename.empty()) { + LOG_ERROR(Frontend, "Filename is empty"); + shortcut_succeeded = false; + return shortcut_succeeded; + } + // Replace characters that are illegal in Windows filenames - std::filesystem::path shortcut_path_full = - shortcut_path / Common::FS::UTF8FilenameSanitizer(name); + std::filesystem::path shortcut_path_full = shortcut_path / filename; #if defined(__linux__) || defined(__FreeBSD__) shortcut_path_full += ".desktop"; From 26417da5d36ea5aae4410a5c35405e27f39661d2 Mon Sep 17 00:00:00 2001 From: boludoz Date: Mon, 16 Oct 2023 03:26:40 -0300 Subject: [PATCH 006/154] Some improvements (suggestions) --- src/common/fs/path_util.cpp | 10 +-- src/yuzu/main.cpp | 162 +++++++++++++++++------------------- src/yuzu/main.h | 2 +- 3 files changed, 81 insertions(+), 93 deletions(-) diff --git a/src/common/fs/path_util.cpp b/src/common/fs/path_util.cpp index 3d88fcf4fc..bcd64156e9 100644 --- a/src/common/fs/path_util.cpp +++ b/src/common/fs/path_util.cpp @@ -254,11 +254,8 @@ fs::path GetExeDirectory() { WCHAR exe_path[MAX_PATH]; if (SUCCEEDED(GetModuleFileNameW(nullptr, exe_path, MAX_PATH))) { - std::wstring wideExePath(exe_path); - - // UTF-16 filesystem lib to UTF-8 is broken, so we need to convert to UTF-8 with the with - // the Windows library (Filesystem converts the strings literally). - return fs::path{Common::UTF16ToUTF8(wideExePath)}.parent_path(); + std::wstring wide_exe_path(exe_path); + return fs::path{Common::UTF16ToUTF8(wide_exe_path)}.parent_path(); } else { LOG_ERROR(Common_Filesystem, "Failed to get the path to the executable of the current " "process"); @@ -273,9 +270,6 @@ fs::path GetAppDataRoamingDirectory() { if (SUCCEEDED(SHGetKnownFolderPath(FOLDERID_RoamingAppData, 0, NULL, &appdata_roaming_path))) { std::wstring wideAppdataRoamingPath(appdata_roaming_path); CoTaskMemFree(appdata_roaming_path); - - // UTF-16 filesystem lib to UTF-8 is broken, so we need to convert to UTF-8 with the with - // the Windows library (Filesystem converts the strings literally). return fs::path{Common::UTF16ToUTF8(wideAppdataRoamingPath)}; } else { LOG_ERROR(Common_Filesystem, "Failed to get the path to the %APPDATA% directory"); diff --git a/src/yuzu/main.cpp b/src/yuzu/main.cpp index f2b91a7f35..36f9551a13 100644 --- a/src/yuzu/main.cpp +++ b/src/yuzu/main.cpp @@ -2847,8 +2847,6 @@ bool GMainWindow::CreateShortcutLink(const std::filesystem::path& shortcut_path, const std::string& arguments, const std::string& categories, const std::string& keywords, const std::string& name) { - bool shortcut_succeeded = false; - // Copy characters if they are not illegal in Windows filenames std::string filename = ""; const std::string illegal_chars = "<>:\"/\\|?*"; @@ -2858,22 +2856,13 @@ bool GMainWindow::CreateShortcutLink(const std::filesystem::path& shortcut_path, if (filename.empty()) { LOG_ERROR(Frontend, "Filename is empty"); - shortcut_succeeded = false; - return shortcut_succeeded; + return false; } - // Replace characters that are illegal in Windows filenames + // Append .desktop or .lnk extension std::filesystem::path shortcut_path_full = shortcut_path / filename; -#if defined(__linux__) || defined(__FreeBSD__) - shortcut_path_full += ".desktop"; -#elif defined(_WIN32) - shortcut_path_full += ".lnk"; -#endif - - LOG_ERROR(Frontend, "Create shortcut path: {}", shortcut_path_full.string()); - -#if defined(__linux__) || defined(__FreeBSD__) +#if defined(__linux__) || defined(__FreeBSD__) // Linux and FreeBSD // This desktop file template was writing referencing // https://specifications.freedesktop.org/desktop-entry-spec/desktop-entry-spec-1.0.html try { @@ -2881,9 +2870,13 @@ bool GMainWindow::CreateShortcutLink(const std::filesystem::path& shortcut_path, // Plus 'Type' is required if (name.empty()) { LOG_ERROR(Frontend, "Name is empty"); - shortcut_succeeded = false; - return shortcut_succeeded; + return false; } + + // Append .desktop extension + shortcut_path_full += ".desktop"; + + // Create shortcut file std::ofstream shortcut_stream(shortcut_path_full, std::ios::binary | std::ios::trunc); if (shortcut_stream.is_open()) { @@ -2923,78 +2916,82 @@ bool GMainWindow::CreateShortcutLink(const std::filesystem::path& shortcut_path, } else { LOG_ERROR(Frontend, "Failed to create shortcut"); - return false; } shortcut_stream.close(); } catch (const std::exception& e) { LOG_ERROR(Frontend, "Failed to create shortcut: {}", e.what()); } -#elif defined(_WIN32) - // Initialize COM - auto hr = CoInitialize(NULL); - if (FAILED(hr)) { - return shortcut_succeeded; - } + return false; +#elif defined(_WIN32) // Windows + HRESULT hr = CoInitialize(NULL); + if (SUCCEEDED(hr)) { - IShellLinkW* ps1; + IShellLinkW* ps1 = nullptr; + IPersistFile* persist_file = nullptr; - auto hres = CoCreateInstance(CLSID_ShellLink, NULL, CLSCTX_INPROC_SERVER, IID_IShellLinkW, - (void**)&ps1); + SCOPE_EXIT({ + if (persist_file != nullptr) { + persist_file->Release(); + } + if (ps1 != nullptr) { + ps1->Release(); + } - // The UTF-16 / UTF-8 conversion is broken in C++, it is necessary to perform these steps and - // resort to the native Windows function. - std::wstring wshortcut_path_full = Common::UTF8ToUTF16W(shortcut_path_full.string()); - std::wstring wicon_path = Common::UTF8ToUTF16W(icon_path.string()); - std::wstring wcommand = Common::UTF8ToUTF16W(command.string()); - std::wstring warguments = Common::UTF8ToUTF16W(arguments); - std::wstring wcomment = Common::UTF8ToUTF16W(comment); + CoUninitialize(); + }); - if (SUCCEEDED(hres)) { - if (std::filesystem::is_regular_file(command)) - hres = ps1->SetPath(wcommand.data()); + HRESULT hres = CoCreateInstance(CLSID_ShellLink, NULL, CLSCTX_INPROC_SERVER, + IID_IShellLinkW, (void**)&ps1); - if (SUCCEEDED(hres) && !arguments.empty()) - hres = ps1->SetArguments(warguments.data()); - - if (SUCCEEDED(hres) && !comment.empty()) - hres = ps1->SetDescription(wcomment.data()); - - if (SUCCEEDED(hres) && std::filesystem::is_regular_file(icon_path)) - hres = ps1->SetIconLocation(wicon_path.data(), 0); - - IPersistFile* pPersistFile = nullptr; + std::wstring wshortcut_path_full = Common::UTF8ToUTF16W(shortcut_path_full.string()); + std::wstring wicon_path = Common::UTF8ToUTF16W(icon_path.string()); + std::wstring wcommand = Common::UTF8ToUTF16W(command.string()); + std::wstring warguments = Common::UTF8ToUTF16W(arguments); + std::wstring wcomment = Common::UTF8ToUTF16W(comment); if (SUCCEEDED(hres)) { - hres = ps1->QueryInterface(IID_IPersistFile, (void**)&pPersistFile); + if (std::filesystem::is_regular_file(command)) { + hres = ps1->SetPath(wcommand.data()); + } else { + LOG_ERROR(Frontend, "Command is not a regular file"); + return false; + } - if (SUCCEEDED(hres) && pPersistFile != nullptr) { - hres = pPersistFile->Save(wshortcut_path_full.data(), TRUE); + if (SUCCEEDED(hres) && !arguments.empty()) { + hres = ps1->SetArguments(warguments.data()); + } + + if (SUCCEEDED(hres) && !comment.empty()) { + hres = ps1->SetDescription(wcomment.data()); + } + + if (SUCCEEDED(hres) && std::filesystem::is_regular_file(icon_path)) { + hres = ps1->SetIconLocation(wicon_path.data(), 0); + } + + if (SUCCEEDED(hres)) { + hres = ps1->QueryInterface(IID_IPersistFile, (void**)&persist_file); + } + + if (SUCCEEDED(hres) && persist_file != nullptr) { + // Append .lnk extension and save shortcut + shortcut_path_full += ".lnk"; + hres = persist_file->Save(wshortcut_path_full.data(), TRUE); if (SUCCEEDED(hres)) { - shortcut_succeeded = true; + return true; + } else { + LOG_ERROR(Frontend, "Failed to create shortcut"); } } + } else { + LOG_ERROR(Frontend, "Failed to create CoCreateInstance"); } - - if (pPersistFile != nullptr) { - pPersistFile->Release(); - } - } else { - LOG_ERROR(Frontend, "Failed to create IShellLinkWinstance"); } - - ps1->Release(); - CoUninitialize(); + return false; +#else // Unsupported platform + return false; #endif - - if (shortcut_succeeded && std::filesystem::is_regular_file(shortcut_path_full)) { - LOG_ERROR(Frontend, "Shortcut created"); - } else { - LOG_ERROR(Frontend, "Shortcut error, failed to create it"); - shortcut_succeeded = false; - } - - return shortcut_succeeded; } // Messages in pre-defined message boxes for less code spaghetti @@ -3049,31 +3046,31 @@ bool GMainWindow::CreateShortcutMessagesGUI(QWidget* parent, const int& imsg, } bool GMainWindow::MakeShortcutIcoPath(const u64 program_id, const std::string_view game_file_name, - std::filesystem::path& icons_path) { + std::filesystem::path& out_icon_path) { // Get path to Yuzu icons directory & icon extension std::string ico_extension = "png"; #if defined(_WIN32) - icons_path = Common::FS::GetYuzuPath(Common::FS::YuzuPath::ConfigDir) / "icons"; + out_icon_path = Common::FS::GetYuzuPath(Common::FS::YuzuPath::ConfigDir) / "icons"; ico_extension = "ico"; #elif defined(__linux__) || defined(__FreeBSD__) - icons_path = Common::FS::GetDataDirectory("XDG_DATA_HOME") / "icons/hicolor/256x256"; + out_icon_path = Common::FS::GetDataDirectory("XDG_DATA_HOME") / "icons/hicolor/256x256"; #endif // Create icons directory if it doesn't exist - if (!Common::FS::CreateDirs(icons_path)) { + if (!Common::FS::CreateDirs(out_icon_path)) { QMessageBox::critical( this, tr("Create Icon"), tr("Cannot create icon file. Path \"%1\" does not exist and cannot be created.") - .arg(QString::fromStdString(icons_path.string())), + .arg(QString::fromStdString(out_icon_path.string())), QMessageBox::StandardButton::Ok); - icons_path = ""; // Reset path + out_icon_path = ""; // Reset path return false; } // Create icon file path - icons_path /= (program_id == 0 ? fmt::format("yuzu-{}.{}", game_file_name, ico_extension) - : fmt::format("yuzu-{:016X}.{}", program_id, ico_extension)); + out_icon_path /= (program_id == 0 ? fmt::format("yuzu-{}.{}", game_file_name, ico_extension) + : fmt::format("yuzu-{:016X}.{}", program_id, ico_extension)); return true; } @@ -3096,13 +3093,11 @@ void GMainWindow::OnGameListCreateShortcut(u64 program_id, const std::string& ga QStandardPaths::writableLocation(QStandardPaths::DesktopLocation).toStdString(); } else if (target == GameListShortcutTarget::Applications) { #if defined(_WIN32) - HANDLE hProcess = GetCurrentProcess(); if (!IsUserAnAdmin()) { GMainWindow::CreateShortcutMessagesGUI(this, GMainWindow::CREATE_SHORTCUT_MSGBOX_ADMIN, ""); return; } - CloseHandle(hProcess); #endif // _WIN32 shortcut_path = QStandardPaths::writableLocation(QStandardPaths::ApplicationsLocation).toStdString(); @@ -3110,9 +3105,8 @@ void GMainWindow::OnGameListCreateShortcut(u64 program_id, const std::string& ga // Icon path and title std::string title; - std::filesystem::path icons_path; + std::filesystem::path out_icon_path; if (std::filesystem::exists(shortcut_path)) { - // Get title from game file const FileSys::PatchManager pm{program_id, system->GetFileSystemController(), system->GetContentProvider()}; @@ -3139,8 +3133,8 @@ void GMainWindow::OnGameListCreateShortcut(u64 program_id, const std::string& ga QImage icon_data = QImage::fromData(icon_image_file.data(), static_cast(icon_image_file.size())); - if (GMainWindow::MakeShortcutIcoPath(program_id, title, icons_path)) { - if (!SaveIconToFile(icons_path, icon_data)) { + if (GMainWindow::MakeShortcutIcoPath(program_id, title, out_icon_path)) { + if (!SaveIconToFile(out_icon_path, icon_data)) { LOG_ERROR(Frontend, "Could not write icon to file"); } } @@ -3178,8 +3172,8 @@ void GMainWindow::OnGameListCreateShortcut(u64 program_id, const std::string& ga const std::string categories = "Game;Emulator;Qt;"; const std::string keywords = "Switch;Nintendo;"; - if (GMainWindow::CreateShortcutLink(shortcut_path, comment, icons_path, yuzu_command, arguments, - categories, keywords, title)) { + if (GMainWindow::CreateShortcutLink(shortcut_path, comment, out_icon_path, yuzu_command, + arguments, categories, keywords, title)) { GMainWindow::CreateShortcutMessagesGUI(this, GMainWindow::CREATE_SHORTCUT_MSGBOX_SUCCESS, title); return; diff --git a/src/yuzu/main.h b/src/yuzu/main.h index d7426607f7..d3a1bf5b98 100644 --- a/src/yuzu/main.h +++ b/src/yuzu/main.h @@ -444,7 +444,7 @@ private: QString GetTasStateDescription() const; bool CreateShortcutMessagesGUI(QWidget* parent, const int& imsg, const std::string title); bool MakeShortcutIcoPath(const u64 program_id, const std::string_view game_file_name, - std::filesystem::path& icons_path); + std::filesystem::path& out_icon_path); bool CreateShortcutLink(const std::filesystem::path& shortcut_path, const std::string& comment, const std::filesystem::path& icon_path, const std::filesystem::path& command, const std::string& arguments, From 89d3e81be8b923711a548b0973276353392449a6 Mon Sep 17 00:00:00 2001 From: boludoz Date: Mon, 16 Oct 2023 16:01:46 -0300 Subject: [PATCH 007/154] Sugestions and fixes. --- src/common/fs/path_util.cpp | 4 +- src/yuzu/main.cpp | 104 ++++++++++++++++++------------------ src/yuzu/main.h | 2 +- 3 files changed, 56 insertions(+), 54 deletions(-) diff --git a/src/common/fs/path_util.cpp b/src/common/fs/path_util.cpp index bcd64156e9..60c5e477e3 100644 --- a/src/common/fs/path_util.cpp +++ b/src/common/fs/path_util.cpp @@ -268,9 +268,9 @@ fs::path GetAppDataRoamingDirectory() { PWSTR appdata_roaming_path = nullptr; if (SUCCEEDED(SHGetKnownFolderPath(FOLDERID_RoamingAppData, 0, NULL, &appdata_roaming_path))) { - std::wstring wideAppdataRoamingPath(appdata_roaming_path); + std::wstring wide_appdata_roaming_path(appdata_roaming_path); CoTaskMemFree(appdata_roaming_path); - return fs::path{Common::UTF16ToUTF8(wideAppdataRoamingPath)}; + return fs::path{Common::UTF16ToUTF8(wide_appdata_roaming_path)}; } else { LOG_ERROR(Common_Filesystem, "Failed to get the path to the %APPDATA% directory"); } diff --git a/src/yuzu/main.cpp b/src/yuzu/main.cpp index 36f9551a13..feb455763d 100644 --- a/src/yuzu/main.cpp +++ b/src/yuzu/main.cpp @@ -2859,11 +2859,15 @@ bool GMainWindow::CreateShortcutLink(const std::filesystem::path& shortcut_path, return false; } - // Append .desktop or .lnk extension + if (!std::filesystem::is_regular_file(command)) { + LOG_ERROR(Frontend, "Command is not a regular file"); + return false; + } + std::filesystem::path shortcut_path_full = shortcut_path / filename; #if defined(__linux__) || defined(__FreeBSD__) // Linux and FreeBSD - // This desktop file template was writing referencing + // Reference for the desktop file template: // https://specifications.freedesktop.org/desktop-entry-spec/desktop-entry-spec-1.0.html try { @@ -2911,17 +2915,17 @@ bool GMainWindow::CreateShortcutLink(const std::filesystem::path& shortcut_path, fmt::print(shortcut_stream, "Keywords={}\n", keywords); } + // Flush and close file + shortcut_stream.flush(); shortcut_stream.close(); return true; - } else { LOG_ERROR(Frontend, "Failed to create shortcut"); } - - shortcut_stream.close(); } catch (const std::exception& e) { LOG_ERROR(Frontend, "Failed to create shortcut: {}", e.what()); } + shortcut_stream.close(); return false; #elif defined(_WIN32) // Windows HRESULT hr = CoInitialize(NULL); @@ -2944,19 +2948,15 @@ bool GMainWindow::CreateShortcutLink(const std::filesystem::path& shortcut_path, HRESULT hres = CoCreateInstance(CLSID_ShellLink, NULL, CLSCTX_INPROC_SERVER, IID_IShellLinkW, (void**)&ps1); - std::wstring wshortcut_path_full = Common::UTF8ToUTF16W(shortcut_path_full.string()); + std::wstring wshortcut_path_full = + Common::UTF8ToUTF16W((shortcut_path_full).string() + ".lnk"); std::wstring wicon_path = Common::UTF8ToUTF16W(icon_path.string()); std::wstring wcommand = Common::UTF8ToUTF16W(command.string()); std::wstring warguments = Common::UTF8ToUTF16W(arguments); std::wstring wcomment = Common::UTF8ToUTF16W(comment); if (SUCCEEDED(hres)) { - if (std::filesystem::is_regular_file(command)) { - hres = ps1->SetPath(wcommand.data()); - } else { - LOG_ERROR(Frontend, "Command is not a regular file"); - return false; - } + hres = ps1->SetPath(wcommand.data()); if (SUCCEEDED(hres) && !arguments.empty()) { hres = ps1->SetArguments(warguments.data()); @@ -2975,8 +2975,6 @@ bool GMainWindow::CreateShortcutLink(const std::filesystem::path& shortcut_path, } if (SUCCEEDED(hres) && persist_file != nullptr) { - // Append .lnk extension and save shortcut - shortcut_path_full += ".lnk"; hres = persist_file->Save(wshortcut_path_full.data(), TRUE); if (SUCCEEDED(hres)) { return true; @@ -2995,9 +2993,10 @@ bool GMainWindow::CreateShortcutLink(const std::filesystem::path& shortcut_path, } // Messages in pre-defined message boxes for less code spaghetti -bool GMainWindow::CreateShortcutMessagesGUI(QWidget* parent, const int& imsg, - const std::string title) { +bool GMainWindow::CreateShortcutMessagesGUI(QWidget* parent, int imsg, const QString& game_title) { QMessageBox::StandardButtons buttons; + std::string_view game_title_sv = game_title.toStdString(); + int result = 0; switch (imsg) { @@ -3013,18 +3012,18 @@ bool GMainWindow::CreateShortcutMessagesGUI(QWidget* parent, const int& imsg, return (result == QMessageBox::No) ? false : true; case GMainWindow::CREATE_SHORTCUT_MSGBOX_SUCCESS: - QMessageBox::information( - parent, tr("Create Shortcut"), - tr("Successfully created a shortcut to %1").arg(QString::fromStdString(title))); - LOG_INFO(Frontend, "Successfully created a shortcut to {}", title); + QMessageBox::information(parent, tr("Create Shortcut"), + tr("Successfully created a shortcut to %1").arg(game_title)); + LOG_INFO(Frontend, "Successfully created a shortcut to {}", game_title_sv); return true; case GMainWindow::CREATE_SHORTCUT_MSGBOX_APPVOLATILE_WARNING: - result = QMessageBox::warning( - this, tr("Create Shortcut"), - tr("This will create a shortcut to the current AppImage. This may " - "not work well if you update. Continue?"), - QMessageBox::StandardButton::Ok | QMessageBox::StandardButton::Cancel); + buttons = QMessageBox::StandardButton::Ok | QMessageBox::StandardButton::Cancel; + result = + QMessageBox::warning(this, tr("Create Shortcut"), + tr("This will create a shortcut to the current AppImage. This may " + "not work well if you update. Continue?"), + buttons); return (result == QMessageBox::StandardButton::Cancel) ? true : false; case GMainWindow::CREATE_SHORTCUT_MSGBOX_ADMIN: buttons = QMessageBox::Ok; @@ -3035,10 +3034,9 @@ bool GMainWindow::CreateShortcutMessagesGUI(QWidget* parent, const int& imsg, return true; default: buttons = QMessageBox::Ok; - QMessageBox::critical( - parent, tr("Create Shortcut"), - tr("Failed to create a shortcut to %1").arg(QString::fromStdString(title)), buttons); - LOG_ERROR(Frontend, "Failed to create a shortcut to {}", title); + QMessageBox::critical(parent, tr("Create Shortcut"), + tr("Failed to create a shortcut to %1").arg(game_title), buttons); + LOG_ERROR(Frontend, "Failed to create a shortcut to {}", game_title_sv); return true; } @@ -3077,6 +3075,10 @@ bool GMainWindow::MakeShortcutIcoPath(const u64 program_id, const std::string_vi void GMainWindow::OnGameListCreateShortcut(u64 program_id, const std::string& game_path, GameListShortcutTarget target) { + std::string game_title; + QString qt_game_title; + std::filesystem::path out_icon_path; + // Get path to yuzu executable const QStringList args = QApplication::arguments(); std::filesystem::path yuzu_command = args[0].toStdString(); @@ -3092,20 +3094,11 @@ void GMainWindow::OnGameListCreateShortcut(u64 program_id, const std::string& ga shortcut_path = QStandardPaths::writableLocation(QStandardPaths::DesktopLocation).toStdString(); } else if (target == GameListShortcutTarget::Applications) { -#if defined(_WIN32) - if (!IsUserAnAdmin()) { - GMainWindow::CreateShortcutMessagesGUI(this, GMainWindow::CREATE_SHORTCUT_MSGBOX_ADMIN, - ""); - return; - } -#endif // _WIN32 shortcut_path = QStandardPaths::writableLocation(QStandardPaths::ApplicationsLocation).toStdString(); } // Icon path and title - std::string title; - std::filesystem::path out_icon_path; if (std::filesystem::exists(shortcut_path)) { // Get title from game file const FileSys::PatchManager pm{program_id, system->GetFileSystemController(), @@ -3114,14 +3107,16 @@ void GMainWindow::OnGameListCreateShortcut(u64 program_id, const std::string& ga const auto loader = Loader::GetLoader(*system, vfs->OpenFile(game_path, FileSys::Mode::Read)); - title = fmt::format("{:016X}", program_id); + game_title = fmt::format("{:016X}", program_id); if (control.first != nullptr) { - title = control.first->GetApplicationName(); + game_title = control.first->GetApplicationName(); } else { - loader->ReadTitle(title); + loader->ReadTitle(game_title); } + qt_game_title = QString::fromStdString(game_title); + // Get icon from game file std::vector icon_image_file{}; if (control.second != nullptr) { @@ -3133,7 +3128,7 @@ void GMainWindow::OnGameListCreateShortcut(u64 program_id, const std::string& ga QImage icon_data = QImage::fromData(icon_image_file.data(), static_cast(icon_image_file.size())); - if (GMainWindow::MakeShortcutIcoPath(program_id, title, out_icon_path)) { + if (GMainWindow::MakeShortcutIcoPath(program_id, game_title, out_icon_path)) { if (!SaveIconToFile(out_icon_path, icon_data)) { LOG_ERROR(Frontend, "Could not write icon to file"); } @@ -3141,20 +3136,26 @@ void GMainWindow::OnGameListCreateShortcut(u64 program_id, const std::string& ga } else { GMainWindow::CreateShortcutMessagesGUI(this, GMainWindow::CREATE_SHORTCUT_MSGBOX_ERROR, - title); + qt_game_title); LOG_ERROR(Frontend, "Invalid shortcut target"); return; } -// Special case for AppImages -#if defined(__linux__) +#if defined(_WIN32) + if (!IsUserAnAdmin() && target == GameListShortcutTarget::Applications) { + GMainWindow::CreateShortcutMessagesGUI(this, GMainWindow::CREATE_SHORTCUT_MSGBOX_ADMIN, + qt_game_title); + return; + } +#elif defined(__linux__) + // Special case for AppImages // Warn once if we are making a shortcut to a volatile AppImage const std::string appimage_ending = std::string(Common::g_scm_rev).substr(0, 9).append(".AppImage"); if (yuzu_command.string().ends_with(appimage_ending) && !UISettings::values.shortcut_already_warned) { if (GMainWindow::CreateShortcutMessagesGUI( - this, GMainWindow::CREATE_SHORTCUT_MSGBOX_APPVOLATILE_WARNING, title)) { + this, GMainWindow::CREATE_SHORTCUT_MSGBOX_APPVOLATILE_WARNING, qt_game_title)) { return; } UISettings::values.shortcut_already_warned = true; @@ -3164,22 +3165,23 @@ void GMainWindow::OnGameListCreateShortcut(u64 program_id, const std::string& ga // Create shortcut std::string arguments = fmt::format("-g \"{:s}\"", game_path); if (GMainWindow::CreateShortcutMessagesGUI( - this, GMainWindow::CREATE_SHORTCUT_MSGBOX_FULLSCREEN_YES, title)) { + this, GMainWindow::CREATE_SHORTCUT_MSGBOX_FULLSCREEN_YES, qt_game_title)) { arguments = "-f " + arguments; } const std::string comment = - tr("Start %1 with the yuzu Emulator").arg(QString::fromStdString(title)).toStdString(); + tr("Start %1 with the yuzu Emulator").arg(QString::fromStdString(game_title)).toStdString(); const std::string categories = "Game;Emulator;Qt;"; const std::string keywords = "Switch;Nintendo;"; if (GMainWindow::CreateShortcutLink(shortcut_path, comment, out_icon_path, yuzu_command, - arguments, categories, keywords, title)) { + arguments, categories, keywords, game_title)) { GMainWindow::CreateShortcutMessagesGUI(this, GMainWindow::CREATE_SHORTCUT_MSGBOX_SUCCESS, - title); + qt_game_title); return; } - GMainWindow::CreateShortcutMessagesGUI(this, GMainWindow::CREATE_SHORTCUT_MSGBOX_ERROR, title); + GMainWindow::CreateShortcutMessagesGUI(this, GMainWindow::CREATE_SHORTCUT_MSGBOX_ERROR, + qt_game_title); } void GMainWindow::OnGameListOpenDirectory(const QString& directory) { diff --git a/src/yuzu/main.h b/src/yuzu/main.h index d3a1bf5b98..41902cc8da 100644 --- a/src/yuzu/main.h +++ b/src/yuzu/main.h @@ -442,7 +442,7 @@ private: bool ConfirmShutdownGame(); QString GetTasStateDescription() const; - bool CreateShortcutMessagesGUI(QWidget* parent, const int& imsg, const std::string title); + bool CreateShortcutMessagesGUI(QWidget* parent, int imsg, const QString& game_title); bool MakeShortcutIcoPath(const u64 program_id, const std::string_view game_file_name, std::filesystem::path& out_icon_path); bool CreateShortcutLink(const std::filesystem::path& shortcut_path, const std::string& comment, From d759de9f96faa8f530b3724b79ccc04ab0d01a09 Mon Sep 17 00:00:00 2001 From: boludoz Date: Mon, 16 Oct 2023 16:11:24 -0300 Subject: [PATCH 008/154] More missed suggestions --- src/yuzu/main.cpp | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/yuzu/main.cpp b/src/yuzu/main.cpp index feb455763d..90bb61c152 100644 --- a/src/yuzu/main.cpp +++ b/src/yuzu/main.cpp @@ -2995,12 +2995,10 @@ bool GMainWindow::CreateShortcutLink(const std::filesystem::path& shortcut_path, // Messages in pre-defined message boxes for less code spaghetti bool GMainWindow::CreateShortcutMessagesGUI(QWidget* parent, int imsg, const QString& game_title) { QMessageBox::StandardButtons buttons; - std::string_view game_title_sv = game_title.toStdString(); int result = 0; switch (imsg) { - case GMainWindow::CREATE_SHORTCUT_MSGBOX_FULLSCREEN_YES: buttons = QMessageBox::Yes | QMessageBox::No; @@ -3009,12 +3007,11 @@ bool GMainWindow::CreateShortcutMessagesGUI(QWidget* parent, int imsg, const QSt tr("Do you want to launch the game in fullscreen?"), buttons); LOG_INFO(Frontend, "Shortcut will launch in fullscreen"); - return (result == QMessageBox::No) ? false : true; + return result == QMessageBox::Yes; case GMainWindow::CREATE_SHORTCUT_MSGBOX_SUCCESS: QMessageBox::information(parent, tr("Create Shortcut"), tr("Successfully created a shortcut to %1").arg(game_title)); - LOG_INFO(Frontend, "Successfully created a shortcut to {}", game_title_sv); return true; case GMainWindow::CREATE_SHORTCUT_MSGBOX_APPVOLATILE_WARNING: @@ -3024,7 +3021,7 @@ bool GMainWindow::CreateShortcutMessagesGUI(QWidget* parent, int imsg, const QSt tr("This will create a shortcut to the current AppImage. This may " "not work well if you update. Continue?"), buttons); - return (result == QMessageBox::StandardButton::Cancel) ? true : false; + return result == QMessageBox::StandardButton::Ok; case GMainWindow::CREATE_SHORTCUT_MSGBOX_ADMIN: buttons = QMessageBox::Ok; QMessageBox::critical(parent, tr("Create Shortcut"), @@ -3036,7 +3033,6 @@ bool GMainWindow::CreateShortcutMessagesGUI(QWidget* parent, int imsg, const QSt buttons = QMessageBox::Ok; QMessageBox::critical(parent, tr("Create Shortcut"), tr("Failed to create a shortcut to %1").arg(game_title), buttons); - LOG_ERROR(Frontend, "Failed to create a shortcut to {}", game_title_sv); return true; } From ae88d01d8dfc9c39206d3fb37938e44a3480c70f Mon Sep 17 00:00:00 2001 From: boludoz Date: Mon, 16 Oct 2023 16:47:21 -0300 Subject: [PATCH 009/154] .clear() instead = ""; and switch improved. --- src/yuzu/main.cpp | 24 ++++++++---------------- 1 file changed, 8 insertions(+), 16 deletions(-) diff --git a/src/yuzu/main.cpp b/src/yuzu/main.cpp index 90bb61c152..82b38fc07b 100644 --- a/src/yuzu/main.cpp +++ b/src/yuzu/main.cpp @@ -2997,23 +2997,17 @@ bool GMainWindow::CreateShortcutMessagesGUI(QWidget* parent, int imsg, const QSt QMessageBox::StandardButtons buttons; int result = 0; - switch (imsg) { case GMainWindow::CREATE_SHORTCUT_MSGBOX_FULLSCREEN_YES: buttons = QMessageBox::Yes | QMessageBox::No; - result = QMessageBox::information(parent, tr("Create Shortcut"), tr("Do you want to launch the game in fullscreen?"), buttons); - - LOG_INFO(Frontend, "Shortcut will launch in fullscreen"); - return result == QMessageBox::Yes; - + return (result == QMessageBox::Yes); case GMainWindow::CREATE_SHORTCUT_MSGBOX_SUCCESS: QMessageBox::information(parent, tr("Create Shortcut"), tr("Successfully created a shortcut to %1").arg(game_title)); - return true; - + break; case GMainWindow::CREATE_SHORTCUT_MSGBOX_APPVOLATILE_WARNING: buttons = QMessageBox::StandardButton::Ok | QMessageBox::StandardButton::Cancel; result = @@ -3021,22 +3015,20 @@ bool GMainWindow::CreateShortcutMessagesGUI(QWidget* parent, int imsg, const QSt tr("This will create a shortcut to the current AppImage. This may " "not work well if you update. Continue?"), buttons); - return result == QMessageBox::StandardButton::Ok; + return (result == QMessageBox::Ok); case GMainWindow::CREATE_SHORTCUT_MSGBOX_ADMIN: buttons = QMessageBox::Ok; QMessageBox::critical(parent, tr("Create Shortcut"), tr("Cannot create shortcut in Apps. Restart yuzu as administrator."), buttons); - LOG_ERROR(Frontend, "Cannot create shortcut in Apps. Restart yuzu as administrator."); - return true; + break; default: buttons = QMessageBox::Ok; QMessageBox::critical(parent, tr("Create Shortcut"), tr("Failed to create a shortcut to %1").arg(game_title), buttons); - return true; + break; } - - return true; + return false; } bool GMainWindow::MakeShortcutIcoPath(const u64 program_id, const std::string_view game_file_name, @@ -3058,7 +3050,7 @@ bool GMainWindow::MakeShortcutIcoPath(const u64 program_id, const std::string_vi tr("Cannot create icon file. Path \"%1\" does not exist and cannot be created.") .arg(QString::fromStdString(out_icon_path.string())), QMessageBox::StandardButton::Ok); - out_icon_path = ""; // Reset path + out_icon_path.clear(); return false; } @@ -3165,7 +3157,7 @@ void GMainWindow::OnGameListCreateShortcut(u64 program_id, const std::string& ga arguments = "-f " + arguments; } const std::string comment = - tr("Start %1 with the yuzu Emulator").arg(QString::fromStdString(game_title)).toStdString(); + tr("Start %1 with the yuzu Emulator").arg(qt_game_title).toStdString(); const std::string categories = "Game;Emulator;Qt;"; const std::string keywords = "Switch;Nintendo;"; From de0b35b97456313498785facccad5980cea737f7 Mon Sep 17 00:00:00 2001 From: boludoz Date: Mon, 16 Oct 2023 16:54:51 -0300 Subject: [PATCH 010/154] Comment using fmt instead qt. --- src/yuzu/main.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/yuzu/main.cpp b/src/yuzu/main.cpp index 82b38fc07b..54b36552d4 100644 --- a/src/yuzu/main.cpp +++ b/src/yuzu/main.cpp @@ -3156,8 +3156,7 @@ void GMainWindow::OnGameListCreateShortcut(u64 program_id, const std::string& ga this, GMainWindow::CREATE_SHORTCUT_MSGBOX_FULLSCREEN_YES, qt_game_title)) { arguments = "-f " + arguments; } - const std::string comment = - tr("Start %1 with the yuzu Emulator").arg(qt_game_title).toStdString(); + const std::string comment = fmt::format("Start {:s} with the yuzu Emulator", game_title); const std::string categories = "Game;Emulator;Qt;"; const std::string keywords = "Switch;Nintendo;"; From 1ae0f0f3f64446b3128da0f1b1151d95739c9a6e Mon Sep 17 00:00:00 2001 From: boludoz Date: Mon, 16 Oct 2023 18:59:21 -0300 Subject: [PATCH 011/154] shortcut_stream.close(); fixed --- src/yuzu/main.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/yuzu/main.cpp b/src/yuzu/main.cpp index 54b36552d4..e49de921cf 100644 --- a/src/yuzu/main.cpp +++ b/src/yuzu/main.cpp @@ -2922,10 +2922,10 @@ bool GMainWindow::CreateShortcutLink(const std::filesystem::path& shortcut_path, } else { LOG_ERROR(Frontend, "Failed to create shortcut"); } + shortcut_stream.close(); } catch (const std::exception& e) { LOG_ERROR(Frontend, "Failed to create shortcut: {}", e.what()); } - shortcut_stream.close(); return false; #elif defined(_WIN32) // Windows HRESULT hr = CoInitialize(NULL); From 1afe6d51eed4a420bb7289955333a2bb10c06b99 Mon Sep 17 00:00:00 2001 From: boludoz Date: Mon, 16 Oct 2023 23:42:45 -0300 Subject: [PATCH 012/154] More @liamwhite suggestions applied. --- src/common/fs/path_util.cpp | 12 +- src/yuzu/main.cpp | 216 ++++++++++++++++-------------------- 2 files changed, 98 insertions(+), 130 deletions(-) diff --git a/src/common/fs/path_util.cpp b/src/common/fs/path_util.cpp index 60c5e477e3..732c1559fa 100644 --- a/src/common/fs/path_util.cpp +++ b/src/common/fs/path_util.cpp @@ -252,29 +252,23 @@ void SetYuzuPath(YuzuPath yuzu_path, const fs::path& new_path) { fs::path GetExeDirectory() { WCHAR exe_path[MAX_PATH]; - if (SUCCEEDED(GetModuleFileNameW(nullptr, exe_path, MAX_PATH))) { std::wstring wide_exe_path(exe_path); return fs::path{Common::UTF16ToUTF8(wide_exe_path)}.parent_path(); - } else { - LOG_ERROR(Common_Filesystem, "Failed to get the path to the executable of the current " - "process"); } - + LOG_ERROR(Common_Filesystem, "Failed to get the path to the executable of the current " + "process"); return fs::path{}; } fs::path GetAppDataRoamingDirectory() { PWSTR appdata_roaming_path = nullptr; - if (SUCCEEDED(SHGetKnownFolderPath(FOLDERID_RoamingAppData, 0, NULL, &appdata_roaming_path))) { std::wstring wide_appdata_roaming_path(appdata_roaming_path); CoTaskMemFree(appdata_roaming_path); return fs::path{Common::UTF16ToUTF8(wide_appdata_roaming_path)}; - } else { - LOG_ERROR(Common_Filesystem, "Failed to get the path to the %APPDATA% directory"); } - + LOG_ERROR(Common_Filesystem, "Failed to get the path to the %APPDATA% directory"); return fs::path{}; } diff --git a/src/yuzu/main.cpp b/src/yuzu/main.cpp index e49de921cf..75fbd042ae 100644 --- a/src/yuzu/main.cpp +++ b/src/yuzu/main.cpp @@ -2845,7 +2845,7 @@ bool GMainWindow::CreateShortcutLink(const std::filesystem::path& shortcut_path, const std::filesystem::path& icon_path, const std::filesystem::path& command, const std::string& arguments, const std::string& categories, - const std::string& keywords, const std::string& name) { + const std::string& keywords, const std::string& name) try { // Copy characters if they are not illegal in Windows filenames std::string filename = ""; @@ -2869,145 +2869,120 @@ bool GMainWindow::CreateShortcutLink(const std::filesystem::path& shortcut_path, #if defined(__linux__) || defined(__FreeBSD__) // Linux and FreeBSD // Reference for the desktop file template: // https://specifications.freedesktop.org/desktop-entry-spec/desktop-entry-spec-1.0.html - try { - // Plus 'Type' is required - if (name.empty()) { - LOG_ERROR(Frontend, "Name is empty"); - return false; - } - - // Append .desktop extension - shortcut_path_full += ".desktop"; - - // Create shortcut file - std::ofstream shortcut_stream(shortcut_path_full, std::ios::binary | std::ios::trunc); - - if (shortcut_stream.is_open()) { - - fmt::print(shortcut_stream, "[Desktop Entry]\n"); - fmt::print(shortcut_stream, "Type=Application\n"); - fmt::print(shortcut_stream, "Version=1.0\n"); - fmt::print(shortcut_stream, "Name={}\n", name); - - if (!comment.empty()) { - fmt::print(shortcut_stream, "Comment={}\n", comment); - } - - if (std::filesystem::is_regular_file(icon_path)) { - fmt::print(shortcut_stream, "Icon={}\n", icon_path.string()); - } - - fmt::print(shortcut_stream, "TryExec={}\n", command.string()); - fmt::print(shortcut_stream, "Exec={}", command.string()); - - if (!arguments.empty()) { - fmt::print(shortcut_stream, " {}", arguments); - } - - fmt::print(shortcut_stream, "\n"); - - if (!categories.empty()) { - fmt::print(shortcut_stream, "Categories={}\n", categories); - } - - if (!keywords.empty()) { - fmt::print(shortcut_stream, "Keywords={}\n", keywords); - } - - // Flush and close file - shortcut_stream.flush(); - shortcut_stream.close(); - return true; - } else { - LOG_ERROR(Frontend, "Failed to create shortcut"); - } - shortcut_stream.close(); - } catch (const std::exception& e) { - LOG_ERROR(Frontend, "Failed to create shortcut: {}", e.what()); + // Plus 'Type' is required + if (name.empty()) { + LOG_ERROR(Frontend, "Name is empty"); + return false; } - return false; + + // Append .desktop extension + shortcut_path_full += ".desktop"; + + // Create shortcut file + std::ofstream shortcut_stream(shortcut_path_full, std::ios::binary | std::ios::trunc); + if (!shortcut_stream.is_open()) { + LOG_ERROR(Frontend, "Failed to create shortcut"); + return false; + } + + fmt::print(shortcut_stream, "[Desktop Entry]\n"); + fmt::print(shortcut_stream, "Type=Application\n"); + fmt::print(shortcut_stream, "Version=1.0\n"); + fmt::print(shortcut_stream, "Name={}\n", name); + if (!comment.empty()) { + fmt::print(shortcut_stream, "Comment={}\n", comment); + } + if (std::filesystem::is_regular_file(icon_path)) { + fmt::print(shortcut_stream, "Icon={}\n", icon_path.string()); + } + fmt::print(shortcut_stream, "TryExec={}\n", command.string()); + fmt::print(shortcut_stream, "Exec={}", command.string()); + if (!arguments.empty()) { + fmt::print(shortcut_stream, " {}", arguments); + } + fmt::print(shortcut_stream, "\n"); + if (!categories.empty()) { + fmt::print(shortcut_stream, "Categories={}\n", categories); + } + if (!keywords.empty()) { + fmt::print(shortcut_stream, "Keywords={}\n", keywords); + } + return true; #elif defined(_WIN32) // Windows HRESULT hr = CoInitialize(NULL); - if (SUCCEEDED(hr)) { - - IShellLinkW* ps1 = nullptr; - IPersistFile* persist_file = nullptr; - - SCOPE_EXIT({ - if (persist_file != nullptr) { - persist_file->Release(); - } - if (ps1 != nullptr) { - ps1->Release(); - } - - CoUninitialize(); - }); - - HRESULT hres = CoCreateInstance(CLSID_ShellLink, NULL, CLSCTX_INPROC_SERVER, - IID_IShellLinkW, (void**)&ps1); - - std::wstring wshortcut_path_full = - Common::UTF8ToUTF16W((shortcut_path_full).string() + ".lnk"); - std::wstring wicon_path = Common::UTF8ToUTF16W(icon_path.string()); - std::wstring wcommand = Common::UTF8ToUTF16W(command.string()); - std::wstring warguments = Common::UTF8ToUTF16W(arguments); - std::wstring wcomment = Common::UTF8ToUTF16W(comment); - - if (SUCCEEDED(hres)) { - hres = ps1->SetPath(wcommand.data()); - - if (SUCCEEDED(hres) && !arguments.empty()) { - hres = ps1->SetArguments(warguments.data()); - } - - if (SUCCEEDED(hres) && !comment.empty()) { - hres = ps1->SetDescription(wcomment.data()); - } - - if (SUCCEEDED(hres) && std::filesystem::is_regular_file(icon_path)) { - hres = ps1->SetIconLocation(wicon_path.data(), 0); - } - - if (SUCCEEDED(hres)) { - hres = ps1->QueryInterface(IID_IPersistFile, (void**)&persist_file); - } - - if (SUCCEEDED(hres) && persist_file != nullptr) { - hres = persist_file->Save(wshortcut_path_full.data(), TRUE); - if (SUCCEEDED(hres)) { - return true; - } else { - LOG_ERROR(Frontend, "Failed to create shortcut"); - } - } - } else { - LOG_ERROR(Frontend, "Failed to create CoCreateInstance"); - } + if (FAILED(hr)) { + LOG_ERROR(Frontend, "CoInitialize failed"); + return false; } + + IShellLinkW* ps1 = nullptr; + IPersistFile* persist_file = nullptr; + + SCOPE_EXIT({ + if (persist_file != nullptr) { + persist_file->Release(); + } + if (ps1 != nullptr) { + ps1->Release(); + } + + CoUninitialize(); + }); + + HRESULT hres = CoCreateInstance(CLSID_ShellLink, NULL, CLSCTX_INPROC_SERVER, IID_IShellLinkW, + (void**)&ps1); + + if (SUCCEEDED(hres)) { + hres = ps1->SetPath(Common::UTF8ToUTF16W(command.string()).data()); + } else { + LOG_ERROR(Frontend, "Failed to create CoCreateInstance"); + return false; + } + if (SUCCEEDED(hres) && !arguments.empty()) { + hres = ps1->SetArguments(Common::UTF8ToUTF16W(arguments).data()); + } + if (SUCCEEDED(hres) && !comment.empty()) { + hres = ps1->SetDescription(Common::UTF8ToUTF16W(comment).data()); + } + if (SUCCEEDED(hres) && std::filesystem::is_regular_file(icon_path)) { + hres = ps1->SetIconLocation(Common::UTF8ToUTF16W(icon_path.string()).data(), 0); + } + if (SUCCEEDED(hres)) { + hres = ps1->QueryInterface(IID_IPersistFile, (void**)&persist_file); + } + if (SUCCEEDED(hres) && persist_file != nullptr) { + hres = persist_file->Save( + Common::UTF8ToUTF16W((shortcut_path_full).string() + ".lnk").data(), TRUE); + } + if (SUCCEEDED(hres)) { + return true; + } + LOG_ERROR(Frontend, "Failed to create shortcut"); return false; #else // Unsupported platform return false; #endif +} catch (const std::exception& e) { + LOG_ERROR(Frontend, "Failed to create shortcut: {}", e.what()); + return false; } // Messages in pre-defined message boxes for less code spaghetti bool GMainWindow::CreateShortcutMessagesGUI(QWidget* parent, int imsg, const QString& game_title) { - QMessageBox::StandardButtons buttons; - int result = 0; + QMessageBox::StandardButtons buttons; switch (imsg) { case GMainWindow::CREATE_SHORTCUT_MSGBOX_FULLSCREEN_YES: buttons = QMessageBox::Yes | QMessageBox::No; result = QMessageBox::information(parent, tr("Create Shortcut"), tr("Do you want to launch the game in fullscreen?"), buttons); - return (result == QMessageBox::Yes); + return result == QMessageBox::Yes; case GMainWindow::CREATE_SHORTCUT_MSGBOX_SUCCESS: QMessageBox::information(parent, tr("Create Shortcut"), tr("Successfully created a shortcut to %1").arg(game_title)); - break; + return false; case GMainWindow::CREATE_SHORTCUT_MSGBOX_APPVOLATILE_WARNING: buttons = QMessageBox::StandardButton::Ok | QMessageBox::StandardButton::Cancel; result = @@ -3015,20 +2990,19 @@ bool GMainWindow::CreateShortcutMessagesGUI(QWidget* parent, int imsg, const QSt tr("This will create a shortcut to the current AppImage. This may " "not work well if you update. Continue?"), buttons); - return (result == QMessageBox::Ok); + return result == QMessageBox::Ok; case GMainWindow::CREATE_SHORTCUT_MSGBOX_ADMIN: buttons = QMessageBox::Ok; QMessageBox::critical(parent, tr("Create Shortcut"), tr("Cannot create shortcut in Apps. Restart yuzu as administrator."), buttons); - break; + return false; default: buttons = QMessageBox::Ok; QMessageBox::critical(parent, tr("Create Shortcut"), tr("Failed to create a shortcut to %1").arg(game_title), buttons); - break; + return false; } - return false; } bool GMainWindow::MakeShortcutIcoPath(const u64 program_id, const std::string_view game_file_name, From fc4b45ebd344a3e3d571b8516e73cd9afe824a9b Mon Sep 17 00:00:00 2001 From: boludoz Date: Mon, 16 Oct 2023 23:50:09 -0300 Subject: [PATCH 013/154] Moved check. --- src/yuzu/main.cpp | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/src/yuzu/main.cpp b/src/yuzu/main.cpp index 75fbd042ae..0e0d7ef0eb 100644 --- a/src/yuzu/main.cpp +++ b/src/yuzu/main.cpp @@ -2847,6 +2847,13 @@ bool GMainWindow::CreateShortcutLink(const std::filesystem::path& shortcut_path, const std::string& arguments, const std::string& categories, const std::string& keywords, const std::string& name) try { +#if defined(__linux__) || defined(__FreeBSD__) || defined(_WIN32) // Linux, FreeBSD and Windows + // Plus 'name' is required + if (name.empty()) { + LOG_ERROR(Frontend, "Name is empty"); + return false; + } + // Copy characters if they are not illegal in Windows filenames std::string filename = ""; const std::string illegal_chars = "<>:\"/\\|?*"; @@ -2865,17 +2872,12 @@ bool GMainWindow::CreateShortcutLink(const std::filesystem::path& shortcut_path, } std::filesystem::path shortcut_path_full = shortcut_path / filename; +#endif #if defined(__linux__) || defined(__FreeBSD__) // Linux and FreeBSD // Reference for the desktop file template: // https://specifications.freedesktop.org/desktop-entry-spec/desktop-entry-spec-1.0.html - // Plus 'Type' is required - if (name.empty()) { - LOG_ERROR(Frontend, "Name is empty"); - return false; - } - // Append .desktop extension shortcut_path_full += ".desktop"; From 9908434c14d68faa7fde933258aafd7da15b3b3b Mon Sep 17 00:00:00 2001 From: boludoz Date: Tue, 17 Oct 2023 02:57:35 -0300 Subject: [PATCH 014/154] Final refactorization --- src/yuzu/main.cpp | 131 ++++++++++++++++------------------------------ 1 file changed, 45 insertions(+), 86 deletions(-) diff --git a/src/yuzu/main.cpp b/src/yuzu/main.cpp index 0e0d7ef0eb..01b64e1654 100644 --- a/src/yuzu/main.cpp +++ b/src/yuzu/main.cpp @@ -2846,48 +2846,13 @@ bool GMainWindow::CreateShortcutLink(const std::filesystem::path& shortcut_path, const std::filesystem::path& command, const std::string& arguments, const std::string& categories, const std::string& keywords, const std::string& name) try { - -#if defined(__linux__) || defined(__FreeBSD__) || defined(_WIN32) // Linux, FreeBSD and Windows - // Plus 'name' is required - if (name.empty()) { - LOG_ERROR(Frontend, "Name is empty"); - return false; - } - - // Copy characters if they are not illegal in Windows filenames - std::string filename = ""; - const std::string illegal_chars = "<>:\"/\\|?*"; - filename.reserve(name.size()); - std::copy_if(name.begin(), name.end(), std::back_inserter(filename), - [&illegal_chars](char c) { return illegal_chars.find(c) == std::string::npos; }); - - if (filename.empty()) { - LOG_ERROR(Frontend, "Filename is empty"); - return false; - } - - if (!std::filesystem::is_regular_file(command)) { - LOG_ERROR(Frontend, "Command is not a regular file"); - return false; - } - - std::filesystem::path shortcut_path_full = shortcut_path / filename; -#endif - #if defined(__linux__) || defined(__FreeBSD__) // Linux and FreeBSD - // Reference for the desktop file template: - // https://specifications.freedesktop.org/desktop-entry-spec/desktop-entry-spec-1.0.html - - // Append .desktop extension - shortcut_path_full += ".desktop"; - - // Create shortcut file + std::filesystem::path shortcut_path_full = shortcut_path / (name + ".desktop"); std::ofstream shortcut_stream(shortcut_path_full, std::ios::binary | std::ios::trunc); if (!shortcut_stream.is_open()) { LOG_ERROR(Frontend, "Failed to create shortcut"); return false; } - fmt::print(shortcut_stream, "[Desktop Entry]\n"); fmt::print(shortcut_stream, "Type=Application\n"); fmt::print(shortcut_stream, "Version=1.0\n"); @@ -2899,11 +2864,7 @@ bool GMainWindow::CreateShortcutLink(const std::filesystem::path& shortcut_path, fmt::print(shortcut_stream, "Icon={}\n", icon_path.string()); } fmt::print(shortcut_stream, "TryExec={}\n", command.string()); - fmt::print(shortcut_stream, "Exec={}", command.string()); - if (!arguments.empty()) { - fmt::print(shortcut_stream, " {}", arguments); - } - fmt::print(shortcut_stream, "\n"); + fmt::print(shortcut_stream, "Exec={} {}\n", command.string(), arguments); if (!categories.empty()) { fmt::print(shortcut_stream, "Categories={}\n", categories); } @@ -2912,15 +2873,14 @@ bool GMainWindow::CreateShortcutLink(const std::filesystem::path& shortcut_path, } return true; #elif defined(_WIN32) // Windows - HRESULT hr = CoInitialize(NULL); + HRESULT hr = CoInitialize(nullptr); if (FAILED(hr)) { LOG_ERROR(Frontend, "CoInitialize failed"); return false; } - + SCOPE_EXIT({ CoUninitialize(); }); IShellLinkW* ps1 = nullptr; IPersistFile* persist_file = nullptr; - SCOPE_EXIT({ if (persist_file != nullptr) { persist_file->Release(); @@ -2928,40 +2888,50 @@ bool GMainWindow::CreateShortcutLink(const std::filesystem::path& shortcut_path, if (ps1 != nullptr) { ps1->Release(); } - - CoUninitialize(); }); - - HRESULT hres = CoCreateInstance(CLSID_ShellLink, NULL, CLSCTX_INPROC_SERVER, IID_IShellLinkW, - (void**)&ps1); - - if (SUCCEEDED(hres)) { - hres = ps1->SetPath(Common::UTF8ToUTF16W(command.string()).data()); - } else { - LOG_ERROR(Frontend, "Failed to create CoCreateInstance"); + HRESULT hres = CoCreateInstance(CLSID_ShellLink, nullptr, CLSCTX_INPROC_SERVER, IID_IShellLinkW, + reinterpret_cast(&ps1)); + if (FAILED(hres)) { + LOG_ERROR(Frontend, "Failed to create IShellLinkW instance"); return false; } - if (SUCCEEDED(hres) && !arguments.empty()) { + hres = ps1->SetPath(command.c_str()); + if (FAILED(hres)) { + LOG_ERROR(Frontend, "Failed to set path"); + return false; + } + if (!arguments.empty()) { hres = ps1->SetArguments(Common::UTF8ToUTF16W(arguments).data()); + if (FAILED(hres)) { + LOG_ERROR(Frontend, "Failed to set arguments"); + return false; + } } - if (SUCCEEDED(hres) && !comment.empty()) { + if (!comment.empty()) { hres = ps1->SetDescription(Common::UTF8ToUTF16W(comment).data()); + if (FAILED(hres)) { + LOG_ERROR(Frontend, "Failed to set description"); + return false; + } } - if (SUCCEEDED(hres) && std::filesystem::is_regular_file(icon_path)) { - hres = ps1->SetIconLocation(Common::UTF8ToUTF16W(icon_path.string()).data(), 0); + if (std::filesystem::is_regular_file(icon_path)) { + hres = ps1->SetIconLocation(icon_path.c_str(), 0); + if (FAILED(hres)) { + LOG_ERROR(Frontend, "Failed to set icon location"); + return false; + } } - if (SUCCEEDED(hres)) { - hres = ps1->QueryInterface(IID_IPersistFile, (void**)&persist_file); + hres = ps1->QueryInterface(IID_IPersistFile, reinterpret_cast(&persist_file)); + if (FAILED(hres)) { + LOG_ERROR(Frontend, "Failed to get IPersistFile interface"); + return false; } - if (SUCCEEDED(hres) && persist_file != nullptr) { - hres = persist_file->Save( - Common::UTF8ToUTF16W((shortcut_path_full).string() + ".lnk").data(), TRUE); + hres = persist_file->Save(std::filesystem::path{shortcut_path / (name + ".lnk")}.c_str(), TRUE); + if (FAILED(hres)) { + LOG_ERROR(Frontend, "Failed to save shortcut"); + return false; } - if (SUCCEEDED(hres)) { - return true; - } - LOG_ERROR(Frontend, "Failed to create shortcut"); - return false; + return true; #else // Unsupported platform return false; #endif @@ -2969,7 +2939,6 @@ bool GMainWindow::CreateShortcutLink(const std::filesystem::path& shortcut_path, LOG_ERROR(Frontend, "Failed to create shortcut: {}", e.what()); return false; } - // Messages in pre-defined message boxes for less code spaghetti bool GMainWindow::CreateShortcutMessagesGUI(QWidget* parent, int imsg, const QString& game_title) { int result = 0; @@ -3009,7 +2978,6 @@ bool GMainWindow::CreateShortcutMessagesGUI(QWidget* parent, int imsg, const QSt bool GMainWindow::MakeShortcutIcoPath(const u64 program_id, const std::string_view game_file_name, std::filesystem::path& out_icon_path) { - // Get path to Yuzu icons directory & icon extension std::string ico_extension = "png"; #if defined(_WIN32) @@ -3038,20 +3006,16 @@ bool GMainWindow::MakeShortcutIcoPath(const u64 program_id, const std::string_vi void GMainWindow::OnGameListCreateShortcut(u64 program_id, const std::string& game_path, GameListShortcutTarget target) { - std::string game_title; QString qt_game_title; std::filesystem::path out_icon_path; - // Get path to yuzu executable const QStringList args = QApplication::arguments(); std::filesystem::path yuzu_command = args[0].toStdString(); - // If relative path, make it an absolute path if (yuzu_command.c_str()[0] == '.') { yuzu_command = Common::FS::GetCurrentDir() / yuzu_command; } - // Shortcut path std::filesystem::path shortcut_path{}; if (target == GameListShortcutTarget::Desktop) { @@ -3061,7 +3025,6 @@ void GMainWindow::OnGameListCreateShortcut(u64 program_id, const std::string& ga shortcut_path = QStandardPaths::writableLocation(QStandardPaths::ApplicationsLocation).toStdString(); } - // Icon path and title if (std::filesystem::exists(shortcut_path)) { // Get title from game file @@ -3070,17 +3033,20 @@ void GMainWindow::OnGameListCreateShortcut(u64 program_id, const std::string& ga const auto control = pm.GetControlMetadata(); const auto loader = Loader::GetLoader(*system, vfs->OpenFile(game_path, FileSys::Mode::Read)); - game_title = fmt::format("{:016X}", program_id); - if (control.first != nullptr) { game_title = control.first->GetApplicationName(); } else { loader->ReadTitle(game_title); } - + // Delete illegal characters from title + const std::string illegal_chars = "<>:\"/\\|?*."; + for (auto it = game_title.rbegin(); it != game_title.rend(); ++it) { + if (illegal_chars.find(*it) != std::string::npos) { + game_title.erase(it.base() - 1); + } + } qt_game_title = QString::fromStdString(game_title); - // Get icon from game file std::vector icon_image_file{}; if (control.second != nullptr) { @@ -3088,23 +3054,19 @@ void GMainWindow::OnGameListCreateShortcut(u64 program_id, const std::string& ga } else if (loader->ReadIcon(icon_image_file) != Loader::ResultStatus::Success) { LOG_WARNING(Frontend, "Could not read icon from {:s}", game_path); } - QImage icon_data = QImage::fromData(icon_image_file.data(), static_cast(icon_image_file.size())); - if (GMainWindow::MakeShortcutIcoPath(program_id, game_title, out_icon_path)) { if (!SaveIconToFile(out_icon_path, icon_data)) { LOG_ERROR(Frontend, "Could not write icon to file"); } } - } else { GMainWindow::CreateShortcutMessagesGUI(this, GMainWindow::CREATE_SHORTCUT_MSGBOX_ERROR, qt_game_title); LOG_ERROR(Frontend, "Invalid shortcut target"); return; } - #if defined(_WIN32) if (!IsUserAnAdmin() && target == GameListShortcutTarget::Applications) { GMainWindow::CreateShortcutMessagesGUI(this, GMainWindow::CREATE_SHORTCUT_MSGBOX_ADMIN, @@ -3125,7 +3087,6 @@ void GMainWindow::OnGameListCreateShortcut(u64 program_id, const std::string& ga UISettings::values.shortcut_already_warned = true; } #endif // __linux__ - // Create shortcut std::string arguments = fmt::format("-g \"{:s}\"", game_path); if (GMainWindow::CreateShortcutMessagesGUI( @@ -3142,7 +3103,6 @@ void GMainWindow::OnGameListCreateShortcut(u64 program_id, const std::string& ga qt_game_title); return; } - GMainWindow::CreateShortcutMessagesGUI(this, GMainWindow::CREATE_SHORTCUT_MSGBOX_ERROR, qt_game_title); } @@ -4177,7 +4137,6 @@ void GMainWindow::OnLoadAmiibo() { bool GMainWindow::question(QWidget* parent, const QString& title, const QString& text, QMessageBox::StandardButtons buttons, QMessageBox::StandardButton defaultButton) { - QMessageBox* box_dialog = new QMessageBox(parent); box_dialog->setWindowTitle(title); box_dialog->setText(text); From 2a7edda70ac7bfcce6a830c814a6b8cd559b8c03 Mon Sep 17 00:00:00 2001 From: boludoz Date: Wed, 18 Oct 2023 01:20:46 -0300 Subject: [PATCH 015/154] Deleted admin requisite (maybe it was another mistake). --- src/yuzu/main.cpp | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/src/yuzu/main.cpp b/src/yuzu/main.cpp index 01b64e1654..37f1c0bc4d 100644 --- a/src/yuzu/main.cpp +++ b/src/yuzu/main.cpp @@ -3067,13 +3067,7 @@ void GMainWindow::OnGameListCreateShortcut(u64 program_id, const std::string& ga LOG_ERROR(Frontend, "Invalid shortcut target"); return; } -#if defined(_WIN32) - if (!IsUserAnAdmin() && target == GameListShortcutTarget::Applications) { - GMainWindow::CreateShortcutMessagesGUI(this, GMainWindow::CREATE_SHORTCUT_MSGBOX_ADMIN, - qt_game_title); - return; - } -#elif defined(__linux__) +#if defined(__linux__) // Special case for AppImages // Warn once if we are making a shortcut to a volatile AppImage const std::string appimage_ending = From 4051bbbed7f0160a6565212affbbb24553a9b510 Mon Sep 17 00:00:00 2001 From: boludoz Date: Wed, 18 Oct 2023 01:26:50 -0300 Subject: [PATCH 016/154] Useless code removed related to admin privileges, if it is not an error we can add it later, that is what git is for. --- src/yuzu/main.cpp | 6 ------ src/yuzu/main.h | 1 - 2 files changed, 7 deletions(-) diff --git a/src/yuzu/main.cpp b/src/yuzu/main.cpp index 37f1c0bc4d..73cd064782 100644 --- a/src/yuzu/main.cpp +++ b/src/yuzu/main.cpp @@ -2962,12 +2962,6 @@ bool GMainWindow::CreateShortcutMessagesGUI(QWidget* parent, int imsg, const QSt "not work well if you update. Continue?"), buttons); return result == QMessageBox::Ok; - case GMainWindow::CREATE_SHORTCUT_MSGBOX_ADMIN: - buttons = QMessageBox::Ok; - QMessageBox::critical(parent, tr("Create Shortcut"), - tr("Cannot create shortcut in Apps. Restart yuzu as administrator."), - buttons); - return false; default: buttons = QMessageBox::Ok; QMessageBox::critical(parent, tr("Create Shortcut"), diff --git a/src/yuzu/main.h b/src/yuzu/main.h index 41902cc8da..d203e5301c 100644 --- a/src/yuzu/main.h +++ b/src/yuzu/main.h @@ -157,7 +157,6 @@ class GMainWindow : public QMainWindow { CREATE_SHORTCUT_MSGBOX_SUCCESS, CREATE_SHORTCUT_MSGBOX_ERROR, CREATE_SHORTCUT_MSGBOX_APPVOLATILE_WARNING, - CREATE_SHORTCUT_MSGBOX_ADMIN, }; public: From ac6290bea76e9719ef7806dab7f92ab53fdd27d0 Mon Sep 17 00:00:00 2001 From: boludoz Date: Wed, 18 Oct 2023 02:35:23 -0300 Subject: [PATCH 017/154] TODO: Implement shortcut creation for Apple. --- src/yuzu/game_list.cpp | 6 ++++++ src/yuzu/main.cpp | 8 ++++++-- src/yuzu/main.h | 3 +++ 3 files changed, 15 insertions(+), 2 deletions(-) diff --git a/src/yuzu/game_list.cpp b/src/yuzu/game_list.cpp index fbe0996612..90433e2454 100644 --- a/src/yuzu/game_list.cpp +++ b/src/yuzu/game_list.cpp @@ -564,10 +564,13 @@ void GameList::AddGamePopup(QMenu& context_menu, u64 program_id, const std::stri QAction* verify_integrity = context_menu.addAction(tr("Verify Integrity")); QAction* copy_tid = context_menu.addAction(tr("Copy Title ID to Clipboard")); QAction* navigate_to_gamedb_entry = context_menu.addAction(tr("Navigate to GameDB entry")); +// TODO: Implement shortcut creation for macOS +#if !defined(__APPLE__) QMenu* shortcut_menu = context_menu.addMenu(tr("Create Shortcut")); QAction* create_desktop_shortcut = shortcut_menu->addAction(tr("Add to Desktop")); QAction* create_applications_menu_shortcut = shortcut_menu->addAction(tr("Add to Applications Menu")); +#endif context_menu.addSeparator(); QAction* properties = context_menu.addAction(tr("Properties")); @@ -642,12 +645,15 @@ void GameList::AddGamePopup(QMenu& context_menu, u64 program_id, const std::stri connect(navigate_to_gamedb_entry, &QAction::triggered, [this, program_id]() { emit NavigateToGamedbEntryRequested(program_id, compatibility_list); }); +// TODO: Implement shortcut creation for macOS +#if !defined(__APPLE__) connect(create_desktop_shortcut, &QAction::triggered, [this, program_id, path]() { emit CreateShortcut(program_id, path, GameListShortcutTarget::Desktop); }); connect(create_applications_menu_shortcut, &QAction::triggered, [this, program_id, path]() { emit CreateShortcut(program_id, path, GameListShortcutTarget::Applications); }); +#endif connect(properties, &QAction::triggered, [this, path]() { emit OpenPerGameGeneralRequested(path); }); }; diff --git a/src/yuzu/main.cpp b/src/yuzu/main.cpp index 73cd064782..ec3eb7536b 100644 --- a/src/yuzu/main.cpp +++ b/src/yuzu/main.cpp @@ -2839,7 +2839,8 @@ void GMainWindow::OnGameListNavigateToGamedbEntry(u64 program_id, QDesktopServices::openUrl(QUrl(QStringLiteral("https://yuzu-emu.org/game/") + directory)); } - +// TODO: Implement shortcut creation for macOS +#if !defined(__APPLE__) bool GMainWindow::CreateShortcutLink(const std::filesystem::path& shortcut_path, const std::string& comment, const std::filesystem::path& icon_path, @@ -2997,9 +2998,11 @@ bool GMainWindow::MakeShortcutIcoPath(const u64 program_id, const std::string_vi : fmt::format("yuzu-{:016X}.{}", program_id, ico_extension)); return true; } - +#endif // !defined(__APPLE__) void GMainWindow::OnGameListCreateShortcut(u64 program_id, const std::string& game_path, GameListShortcutTarget target) { +// TODO: Implement shortcut creation for macOS +#if !defined(__APPLE__) std::string game_title; QString qt_game_title; std::filesystem::path out_icon_path; @@ -3093,6 +3096,7 @@ void GMainWindow::OnGameListCreateShortcut(u64 program_id, const std::string& ga } GMainWindow::CreateShortcutMessagesGUI(this, GMainWindow::CREATE_SHORTCUT_MSGBOX_ERROR, qt_game_title); +#endif } void GMainWindow::OnGameListOpenDirectory(const QString& directory) { diff --git a/src/yuzu/main.h b/src/yuzu/main.h index d203e5301c..7a1a97f33a 100644 --- a/src/yuzu/main.h +++ b/src/yuzu/main.h @@ -441,6 +441,8 @@ private: bool ConfirmShutdownGame(); QString GetTasStateDescription() const; +// TODO: Implement shortcut creation for macOS +#if !defined(__APPLE__) bool CreateShortcutMessagesGUI(QWidget* parent, int imsg, const QString& game_title); bool MakeShortcutIcoPath(const u64 program_id, const std::string_view game_file_name, std::filesystem::path& out_icon_path); @@ -449,6 +451,7 @@ private: const std::filesystem::path& command, const std::string& arguments, const std::string& categories, const std::string& keywords, const std::string& name); +#endif /** * Mimic the behavior of QMessageBox::question but link controller navigation to the dialog * The only difference is that it returns a boolean. From ae2130470effa72c3ea1ffc045e9b6b2a77b23d3 Mon Sep 17 00:00:00 2001 From: boludoz Date: Wed, 18 Oct 2023 19:30:21 -0300 Subject: [PATCH 018/154] Reverted dirty code in main. --- src/yuzu/main.cpp | 8 ++------ src/yuzu/main.h | 3 --- 2 files changed, 2 insertions(+), 9 deletions(-) diff --git a/src/yuzu/main.cpp b/src/yuzu/main.cpp index ec3eb7536b..73cd064782 100644 --- a/src/yuzu/main.cpp +++ b/src/yuzu/main.cpp @@ -2839,8 +2839,7 @@ void GMainWindow::OnGameListNavigateToGamedbEntry(u64 program_id, QDesktopServices::openUrl(QUrl(QStringLiteral("https://yuzu-emu.org/game/") + directory)); } -// TODO: Implement shortcut creation for macOS -#if !defined(__APPLE__) + bool GMainWindow::CreateShortcutLink(const std::filesystem::path& shortcut_path, const std::string& comment, const std::filesystem::path& icon_path, @@ -2998,11 +2997,9 @@ bool GMainWindow::MakeShortcutIcoPath(const u64 program_id, const std::string_vi : fmt::format("yuzu-{:016X}.{}", program_id, ico_extension)); return true; } -#endif // !defined(__APPLE__) + void GMainWindow::OnGameListCreateShortcut(u64 program_id, const std::string& game_path, GameListShortcutTarget target) { -// TODO: Implement shortcut creation for macOS -#if !defined(__APPLE__) std::string game_title; QString qt_game_title; std::filesystem::path out_icon_path; @@ -3096,7 +3093,6 @@ void GMainWindow::OnGameListCreateShortcut(u64 program_id, const std::string& ga } GMainWindow::CreateShortcutMessagesGUI(this, GMainWindow::CREATE_SHORTCUT_MSGBOX_ERROR, qt_game_title); -#endif } void GMainWindow::OnGameListOpenDirectory(const QString& directory) { diff --git a/src/yuzu/main.h b/src/yuzu/main.h index 7a1a97f33a..d203e5301c 100644 --- a/src/yuzu/main.h +++ b/src/yuzu/main.h @@ -441,8 +441,6 @@ private: bool ConfirmShutdownGame(); QString GetTasStateDescription() const; -// TODO: Implement shortcut creation for macOS -#if !defined(__APPLE__) bool CreateShortcutMessagesGUI(QWidget* parent, int imsg, const QString& game_title); bool MakeShortcutIcoPath(const u64 program_id, const std::string_view game_file_name, std::filesystem::path& out_icon_path); @@ -451,7 +449,6 @@ private: const std::filesystem::path& command, const std::string& arguments, const std::string& categories, const std::string& keywords, const std::string& name); -#endif /** * Mimic the behavior of QMessageBox::question but link controller navigation to the dialog * The only difference is that it returns a boolean. From 6256e3ca8e74d7f97e4dabc3e9b24de1a0d8df3c Mon Sep 17 00:00:00 2001 From: Liam Date: Tue, 24 Oct 2023 10:28:03 -0400 Subject: [PATCH 019/154] nvdrv: add ioctl command serialization, convert nvhost_as_gpu --- .../nvdrv/devices/ioctl_serialization.h | 107 ++++++++++++++++++ src/core/hle/service/nvdrv/devices/nvdevice.h | 12 ++ .../service/nvdrv/devices/nvhost_as_gpu.cpp | 78 ++++--------- .../hle/service/nvdrv/devices/nvhost_as_gpu.h | 20 ++-- .../hle/service/nvdrv/devices/nvhost_gpu.cpp | 6 +- 5 files changed, 152 insertions(+), 71 deletions(-) create mode 100644 src/core/hle/service/nvdrv/devices/ioctl_serialization.h diff --git a/src/core/hle/service/nvdrv/devices/ioctl_serialization.h b/src/core/hle/service/nvdrv/devices/ioctl_serialization.h new file mode 100644 index 0000000000..c560974f1c --- /dev/null +++ b/src/core/hle/service/nvdrv/devices/ioctl_serialization.h @@ -0,0 +1,107 @@ +// SPDX-FileCopyrightText: Copyright 2023 yuzu Emulator Project +// SPDX-License-Identifier: GPL-2.0-or-later + +#pragma once + +#include +#include + +#include "common/concepts.h" +#include "core/hle/service/nvdrv/devices/nvdevice.h" + +namespace Service::Nvidia::Devices { + +struct Ioctl1Traits { + template + static T GetClassImpl(R (T::*)(A)); + + template + static A GetArgImpl(R (T::*)(A)); +}; + +struct Ioctl23Traits { + template + static T GetClassImpl(R (T::*)(A, B)); + + template + static A GetArgImpl(R (T::*)(A, B)); +}; + +template +struct ContainerType { + using ValueType = T; +}; + +template +struct ContainerType { + using ValueType = T::value_type; +}; + +template +NvResult Wrap(std::span input, std::span output, Self* self, F&& callable, + Rest&&... rest) { + using Arg = ContainerType::ValueType; + constexpr bool ArgumentIsContainer = Common::IsContiguousContainer; + + // Verify that the input and output sizes are valid. + const size_t in_params = input.size() / sizeof(Arg); + const size_t out_params = output.size() / sizeof(Arg); + if (in_params * sizeof(Arg) != input.size()) { + return NvResult::InvalidSize; + } + if (out_params * sizeof(Arg) != output.size()) { + return NvResult::InvalidSize; + } + if (in_params == 0 && out_params == 0 && !ArgumentIsContainer) { + return NvResult::InvalidSize; + } + + // Copy inputs, if needed. + std::vector params(std::max(in_params, out_params)); + if (in_params > 0) { + std::memcpy(params.data(), input.data(), input.size()); + } + + // Perform the call. + NvResult result; + if constexpr (ArgumentIsContainer) { + result = (self->*callable)(params, std::forward(rest)...); + } else { + result = (self->*callable)(params.front(), std::forward(rest)...); + } + + // Copy outputs, if needed. + if (out_params > 0) { + std::memcpy(output.data(), params.data(), output.size()); + } + + return result; +} + +template +NvResult nvdevice::Wrap1(F&& callable, std::span input, std::span output) { + using Self = decltype(Ioctl1Traits::GetClassImpl(callable)); + using InnerArg = std::remove_reference_t; + + return Wrap(input, output, static_cast(this), callable); +} + +template +NvResult nvdevice::Wrap2(F&& callable, std::span input, std::span inline_input, + std::span output) { + using Self = decltype(Ioctl23Traits::GetClassImpl(callable)); + using InnerArg = std::remove_reference_t; + + return Wrap(input, output, static_cast(this), callable, inline_input); +} + +template +NvResult nvdevice::Wrap3(F&& callable, std::span input, std::span output, + std::span inline_output) { + using Self = decltype(Ioctl23Traits::GetClassImpl(callable)); + using InnerArg = std::remove_reference_t; + + return Wrap(input, output, static_cast(this), callable, inline_output); +} + +} // namespace Service::Nvidia::Devices diff --git a/src/core/hle/service/nvdrv/devices/nvdevice.h b/src/core/hle/service/nvdrv/devices/nvdevice.h index a04538d5d0..af766f320d 100644 --- a/src/core/hle/service/nvdrv/devices/nvdevice.h +++ b/src/core/hle/service/nvdrv/devices/nvdevice.h @@ -74,6 +74,18 @@ public: return nullptr; } +protected: + template + NvResult Wrap1(F&& callable, std::span input, std::span output); + + template + NvResult Wrap2(F&& callable, std::span input, std::span inline_input, + std::span output); + + template + NvResult Wrap3(F&& callable, std::span input, std::span output, + std::span inline_output); + protected: Core::System& system; }; diff --git a/src/core/hle/service/nvdrv/devices/nvhost_as_gpu.cpp b/src/core/hle/service/nvdrv/devices/nvhost_as_gpu.cpp index 7d7bb8687c..4840010713 100644 --- a/src/core/hle/service/nvdrv/devices/nvhost_as_gpu.cpp +++ b/src/core/hle/service/nvdrv/devices/nvhost_as_gpu.cpp @@ -11,6 +11,7 @@ #include "core/core.h" #include "core/hle/service/nvdrv/core/container.h" #include "core/hle/service/nvdrv/core/nvmap.h" +#include "core/hle/service/nvdrv/devices/ioctl_serialization.h" #include "core/hle/service/nvdrv/devices/nvhost_as_gpu.h" #include "core/hle/service/nvdrv/devices/nvhost_gpu.h" #include "core/hle/service/nvdrv/nvdrv.h" @@ -33,21 +34,21 @@ NvResult nvhost_as_gpu::Ioctl1(DeviceFD fd, Ioctl command, std::span i case 'A': switch (command.cmd) { case 0x1: - return BindChannel(input, output); + return Wrap1(&nvhost_as_gpu::BindChannel, input, output); case 0x2: - return AllocateSpace(input, output); + return Wrap1(&nvhost_as_gpu::AllocateSpace, input, output); case 0x3: - return FreeSpace(input, output); + return Wrap1(&nvhost_as_gpu::FreeSpace, input, output); case 0x5: - return UnmapBuffer(input, output); + return Wrap1(&nvhost_as_gpu::UnmapBuffer, input, output); case 0x6: - return MapBufferEx(input, output); + return Wrap1(&nvhost_as_gpu::MapBufferEx, input, output); case 0x8: - return GetVARegions(input, output); + return Wrap1(&nvhost_as_gpu::GetVARegions1, input, output); case 0x9: - return AllocAsEx(input, output); + return Wrap1(&nvhost_as_gpu::AllocAsEx, input, output); case 0x14: - return Remap(input, output); + return Wrap1(&nvhost_as_gpu::Remap, input, output); default: break; } @@ -72,7 +73,7 @@ NvResult nvhost_as_gpu::Ioctl3(DeviceFD fd, Ioctl command, std::span i case 'A': switch (command.cmd) { case 0x8: - return GetVARegions(input, output, inline_output); + return Wrap3(&nvhost_as_gpu::GetVARegions3, input, output, inline_output); default: break; } @@ -87,10 +88,7 @@ NvResult nvhost_as_gpu::Ioctl3(DeviceFD fd, Ioctl command, std::span i void nvhost_as_gpu::OnOpen(DeviceFD fd) {} void nvhost_as_gpu::OnClose(DeviceFD fd) {} -NvResult nvhost_as_gpu::AllocAsEx(std::span input, std::span output) { - IoctlAllocAsEx params{}; - std::memcpy(¶ms, input.data(), input.size()); - +NvResult nvhost_as_gpu::AllocAsEx(IoctlAllocAsEx& params) { LOG_DEBUG(Service_NVDRV, "called, big_page_size=0x{:X}", params.big_page_size); std::scoped_lock lock(mutex); @@ -141,10 +139,7 @@ NvResult nvhost_as_gpu::AllocAsEx(std::span input, std::span outpu return NvResult::Success; } -NvResult nvhost_as_gpu::AllocateSpace(std::span input, std::span output) { - IoctlAllocSpace params{}; - std::memcpy(¶ms, input.data(), input.size()); - +NvResult nvhost_as_gpu::AllocateSpace(IoctlAllocSpace& params) { LOG_DEBUG(Service_NVDRV, "called, pages={:X}, page_size={:X}, flags={:X}", params.pages, params.page_size, params.flags); @@ -194,7 +189,6 @@ NvResult nvhost_as_gpu::AllocateSpace(std::span input, std::span o .big_pages = params.page_size != VM::YUZU_PAGESIZE, }; - std::memcpy(output.data(), ¶ms, output.size()); return NvResult::Success; } @@ -222,10 +216,7 @@ void nvhost_as_gpu::FreeMappingLocked(u64 offset) { mapping_map.erase(offset); } -NvResult nvhost_as_gpu::FreeSpace(std::span input, std::span output) { - IoctlFreeSpace params{}; - std::memcpy(¶ms, input.data(), input.size()); - +NvResult nvhost_as_gpu::FreeSpace(IoctlFreeSpace& params) { LOG_DEBUG(Service_NVDRV, "called, offset={:X}, pages={:X}, page_size={:X}", params.offset, params.pages, params.page_size); @@ -264,18 +255,11 @@ NvResult nvhost_as_gpu::FreeSpace(std::span input, std::span outpu return NvResult::BadValue; } - std::memcpy(output.data(), ¶ms, output.size()); return NvResult::Success; } -NvResult nvhost_as_gpu::Remap(std::span input, std::span output) { - const auto num_entries = input.size() / sizeof(IoctlRemapEntry); - - LOG_DEBUG(Service_NVDRV, "called, num_entries=0x{:X}", num_entries); - - std::scoped_lock lock(mutex); - entries.resize_destructive(num_entries); - std::memcpy(entries.data(), input.data(), input.size()); +NvResult nvhost_as_gpu::Remap(std::span entries) { + LOG_DEBUG(Service_NVDRV, "called, num_entries=0x{:X}", entries.size()); if (!vm.initialised) { return NvResult::BadValue; @@ -317,14 +301,10 @@ NvResult nvhost_as_gpu::Remap(std::span input, std::span output) { } } - std::memcpy(output.data(), entries.data(), output.size()); return NvResult::Success; } -NvResult nvhost_as_gpu::MapBufferEx(std::span input, std::span output) { - IoctlMapBufferEx params{}; - std::memcpy(¶ms, input.data(), input.size()); - +NvResult nvhost_as_gpu::MapBufferEx(IoctlMapBufferEx& params) { LOG_DEBUG(Service_NVDRV, "called, flags={:X}, nvmap_handle={:X}, buffer_offset={}, mapping_size={}" ", offset={}", @@ -421,14 +401,10 @@ NvResult nvhost_as_gpu::MapBufferEx(std::span input, std::span out mapping_map[params.offset] = mapping; } - std::memcpy(output.data(), ¶ms, output.size()); return NvResult::Success; } -NvResult nvhost_as_gpu::UnmapBuffer(std::span input, std::span output) { - IoctlUnmapBuffer params{}; - std::memcpy(¶ms, input.data(), input.size()); - +NvResult nvhost_as_gpu::UnmapBuffer(IoctlUnmapBuffer& params) { LOG_DEBUG(Service_NVDRV, "called, offset=0x{:X}", params.offset); std::scoped_lock lock(mutex); @@ -464,9 +440,7 @@ NvResult nvhost_as_gpu::UnmapBuffer(std::span input, std::span out return NvResult::Success; } -NvResult nvhost_as_gpu::BindChannel(std::span input, std::span output) { - IoctlBindChannel params{}; - std::memcpy(¶ms, input.data(), input.size()); +NvResult nvhost_as_gpu::BindChannel(IoctlBindChannel& params) { LOG_DEBUG(Service_NVDRV, "called, fd={:X}", params.fd); auto gpu_channel_device = module.GetDevice(params.fd); @@ -493,10 +467,7 @@ void nvhost_as_gpu::GetVARegionsImpl(IoctlGetVaRegions& params) { }; } -NvResult nvhost_as_gpu::GetVARegions(std::span input, std::span output) { - IoctlGetVaRegions params{}; - std::memcpy(¶ms, input.data(), input.size()); - +NvResult nvhost_as_gpu::GetVARegions1(IoctlGetVaRegions& params) { LOG_DEBUG(Service_NVDRV, "called, buf_addr={:X}, buf_size={:X}", params.buf_addr, params.buf_size); @@ -508,15 +479,10 @@ NvResult nvhost_as_gpu::GetVARegions(std::span input, std::span ou GetVARegionsImpl(params); - std::memcpy(output.data(), ¶ms, output.size()); return NvResult::Success; } -NvResult nvhost_as_gpu::GetVARegions(std::span input, std::span output, - std::span inline_output) { - IoctlGetVaRegions params{}; - std::memcpy(¶ms, input.data(), input.size()); - +NvResult nvhost_as_gpu::GetVARegions3(IoctlGetVaRegions& params, std::span inline_output) { LOG_DEBUG(Service_NVDRV, "called, buf_addr={:X}, buf_size={:X}", params.buf_addr, params.buf_size); @@ -528,9 +494,7 @@ NvResult nvhost_as_gpu::GetVARegions(std::span input, std::span ou GetVARegionsImpl(params); - std::memcpy(output.data(), ¶ms, output.size()); - std::memcpy(inline_output.data(), ¶ms.regions[0], sizeof(VaRegion)); - std::memcpy(inline_output.data() + sizeof(VaRegion), ¶ms.regions[1], sizeof(VaRegion)); + std::memcpy(inline_output.data(), params.regions.data(), 2 * sizeof(VaRegion)); return NvResult::Success; } diff --git a/src/core/hle/service/nvdrv/devices/nvhost_as_gpu.h b/src/core/hle/service/nvdrv/devices/nvhost_as_gpu.h index 2af3e1260a..bc041f2156 100644 --- a/src/core/hle/service/nvdrv/devices/nvhost_as_gpu.h +++ b/src/core/hle/service/nvdrv/devices/nvhost_as_gpu.h @@ -139,18 +139,17 @@ private: static_assert(sizeof(IoctlGetVaRegions) == 16 + sizeof(VaRegion) * 2, "IoctlGetVaRegions is incorrect size"); - NvResult AllocAsEx(std::span input, std::span output); - NvResult AllocateSpace(std::span input, std::span output); - NvResult Remap(std::span input, std::span output); - NvResult MapBufferEx(std::span input, std::span output); - NvResult UnmapBuffer(std::span input, std::span output); - NvResult FreeSpace(std::span input, std::span output); - NvResult BindChannel(std::span input, std::span output); + NvResult AllocAsEx(IoctlAllocAsEx& params); + NvResult AllocateSpace(IoctlAllocSpace& params); + NvResult Remap(std::span params); + NvResult MapBufferEx(IoctlMapBufferEx& params); + NvResult UnmapBuffer(IoctlUnmapBuffer& params); + NvResult FreeSpace(IoctlFreeSpace& params); + NvResult BindChannel(IoctlBindChannel& params); void GetVARegionsImpl(IoctlGetVaRegions& params); - NvResult GetVARegions(std::span input, std::span output); - NvResult GetVARegions(std::span input, std::span output, - std::span inline_output); + NvResult GetVARegions1(IoctlGetVaRegions& params); + NvResult GetVARegions3(IoctlGetVaRegions& params, std::span inline_output); void FreeMappingLocked(u64 offset); @@ -213,7 +212,6 @@ private: bool initialised{}; } vm; std::shared_ptr gmmu; - Common::ScratchBuffer entries; // s32 channel{}; // u32 big_page_size{VM::DEFAULT_BIG_PAGE_SIZE}; diff --git a/src/core/hle/service/nvdrv/devices/nvhost_gpu.cpp b/src/core/hle/service/nvdrv/devices/nvhost_gpu.cpp index 46a25fcaba..804157ce3c 100644 --- a/src/core/hle/service/nvdrv/devices/nvhost_gpu.cpp +++ b/src/core/hle/service/nvdrv/devices/nvhost_gpu.cpp @@ -134,7 +134,7 @@ NvResult nvhost_gpu::SetClientData(std::span input, std::span outp LOG_DEBUG(Service_NVDRV, "called"); IoctlClientData params{}; - std::memcpy(¶ms, input.data(), input.size()); + std::memcpy(¶ms, input.data(), std::min(sizeof(IoctlClientData), input.size())); user_data = params.data; return NvResult::Success; } @@ -143,9 +143,9 @@ NvResult nvhost_gpu::GetClientData(std::span input, std::span outp LOG_DEBUG(Service_NVDRV, "called"); IoctlClientData params{}; - std::memcpy(¶ms, input.data(), input.size()); + std::memcpy(¶ms, input.data(), std::min(sizeof(IoctlClientData), input.size())); params.data = user_data; - std::memcpy(output.data(), ¶ms, output.size()); + std::memcpy(output.data(), ¶ms, std::min(sizeof(IoctlClientData), output.size())); return NvResult::Success; } From 4df063209bebeb8737cbefd47a8958977aff9c2d Mon Sep 17 00:00:00 2001 From: Liam Date: Tue, 24 Oct 2023 12:53:53 -0400 Subject: [PATCH 020/154] nvdrv: convert nvhost_ctrl_gpu --- .../service/nvdrv/devices/nvhost_ctrl_gpu.cpp | 112 +++++------------- .../service/nvdrv/devices/nvhost_ctrl_gpu.h | 24 ++-- 2 files changed, 41 insertions(+), 95 deletions(-) diff --git a/src/core/hle/service/nvdrv/devices/nvhost_ctrl_gpu.cpp b/src/core/hle/service/nvdrv/devices/nvhost_ctrl_gpu.cpp index 6081d92e97..92e677b3dc 100644 --- a/src/core/hle/service/nvdrv/devices/nvhost_ctrl_gpu.cpp +++ b/src/core/hle/service/nvdrv/devices/nvhost_ctrl_gpu.cpp @@ -6,6 +6,7 @@ #include "common/logging/log.h" #include "core/core.h" #include "core/core_timing.h" +#include "core/hle/service/nvdrv/devices/ioctl_serialization.h" #include "core/hle/service/nvdrv/devices/nvhost_ctrl_gpu.h" #include "core/hle/service/nvdrv/nvdrv.h" @@ -27,23 +28,23 @@ NvResult nvhost_ctrl_gpu::Ioctl1(DeviceFD fd, Ioctl command, std::span case 'G': switch (command.cmd) { case 0x1: - return ZCullGetCtxSize(input, output); + return Wrap1(&nvhost_ctrl_gpu::ZCullGetCtxSize, input, output); case 0x2: - return ZCullGetInfo(input, output); + return Wrap1(&nvhost_ctrl_gpu::ZCullGetInfo, input, output); case 0x3: - return ZBCSetTable(input, output); + return Wrap1(&nvhost_ctrl_gpu::ZBCSetTable, input, output); case 0x4: - return ZBCQueryTable(input, output); + return Wrap1(&nvhost_ctrl_gpu::ZBCQueryTable, input, output); case 0x5: - return GetCharacteristics(input, output); + return Wrap1(&nvhost_ctrl_gpu::GetCharacteristics1, input, output); case 0x6: - return GetTPCMasks(input, output); + return Wrap1(&nvhost_ctrl_gpu::GetTPCMasks1, input, output); case 0x7: - return FlushL2(input, output); + return Wrap1(&nvhost_ctrl_gpu::FlushL2, input, output); case 0x14: - return GetActiveSlotMask(input, output); + return Wrap1(&nvhost_ctrl_gpu::GetActiveSlotMask, input, output); case 0x1c: - return GetGpuTime(input, output); + return Wrap1(&nvhost_ctrl_gpu::GetGpuTime, input, output); default: break; } @@ -65,9 +66,9 @@ NvResult nvhost_ctrl_gpu::Ioctl3(DeviceFD fd, Ioctl command, std::span case 'G': switch (command.cmd) { case 0x5: - return GetCharacteristics(input, output, inline_output); + return Wrap3(&nvhost_ctrl_gpu::GetCharacteristics3, input, output, inline_output); case 0x6: - return GetTPCMasks(input, output, inline_output); + return Wrap3(&nvhost_ctrl_gpu::GetTPCMasks3, input, output, inline_output); default: break; } @@ -82,10 +83,8 @@ NvResult nvhost_ctrl_gpu::Ioctl3(DeviceFD fd, Ioctl command, std::span void nvhost_ctrl_gpu::OnOpen(DeviceFD fd) {} void nvhost_ctrl_gpu::OnClose(DeviceFD fd) {} -NvResult nvhost_ctrl_gpu::GetCharacteristics(std::span input, std::span output) { +NvResult nvhost_ctrl_gpu::GetCharacteristics1(IoctlCharacteristics& params) { LOG_DEBUG(Service_NVDRV, "called"); - IoctlCharacteristics params{}; - std::memcpy(¶ms, input.data(), input.size()); params.gc.arch = 0x120; params.gc.impl = 0xb; params.gc.rev = 0xa1; @@ -123,15 +122,13 @@ NvResult nvhost_ctrl_gpu::GetCharacteristics(std::span input, std::spa params.gc.gr_compbit_store_base_hw = 0x0; params.gpu_characteristics_buf_size = 0xA0; params.gpu_characteristics_buf_addr = 0xdeadbeef; // Cannot be 0 (UNUSED) - std::memcpy(output.data(), ¶ms, output.size()); return NvResult::Success; } -NvResult nvhost_ctrl_gpu::GetCharacteristics(std::span input, std::span output, - std::span inline_output) { +NvResult nvhost_ctrl_gpu::GetCharacteristics3(IoctlCharacteristics& params, + std::span inline_output) { LOG_DEBUG(Service_NVDRV, "called"); - IoctlCharacteristics params{}; - std::memcpy(¶ms, input.data(), input.size()); + params.gc.arch = 0x120; params.gc.impl = 0xb; params.gc.rev = 0xa1; @@ -169,70 +166,46 @@ NvResult nvhost_ctrl_gpu::GetCharacteristics(std::span input, std::spa params.gc.gr_compbit_store_base_hw = 0x0; params.gpu_characteristics_buf_size = 0xA0; params.gpu_characteristics_buf_addr = 0xdeadbeef; // Cannot be 0 (UNUSED) - - std::memcpy(output.data(), ¶ms, output.size()); - std::memcpy(inline_output.data(), ¶ms.gc, inline_output.size()); + std::memcpy(inline_output.data(), ¶ms.gc, + std::min(sizeof(params.gc), inline_output.size())); return NvResult::Success; } -NvResult nvhost_ctrl_gpu::GetTPCMasks(std::span input, std::span output) { - IoctlGpuGetTpcMasksArgs params{}; - std::memcpy(¶ms, input.data(), input.size()); +NvResult nvhost_ctrl_gpu::GetTPCMasks1(IoctlGpuGetTpcMasksArgs& params) { LOG_DEBUG(Service_NVDRV, "called, mask_buffer_size=0x{:X}", params.mask_buffer_size); if (params.mask_buffer_size != 0) { params.tcp_mask = 3; } - std::memcpy(output.data(), ¶ms, output.size()); return NvResult::Success; } -NvResult nvhost_ctrl_gpu::GetTPCMasks(std::span input, std::span output, - std::span inline_output) { - IoctlGpuGetTpcMasksArgs params{}; - std::memcpy(¶ms, input.data(), input.size()); +NvResult nvhost_ctrl_gpu::GetTPCMasks3(IoctlGpuGetTpcMasksArgs& params, + std::span inline_output) { LOG_DEBUG(Service_NVDRV, "called, mask_buffer_size=0x{:X}", params.mask_buffer_size); if (params.mask_buffer_size != 0) { params.tcp_mask = 3; } - std::memcpy(output.data(), ¶ms, output.size()); - std::memcpy(inline_output.data(), ¶ms.tcp_mask, inline_output.size()); + std::memcpy(inline_output.data(), ¶ms.tcp_mask, + std::min(sizeof(params.tcp_mask), inline_output.size())); return NvResult::Success; } -NvResult nvhost_ctrl_gpu::GetActiveSlotMask(std::span input, std::span output) { +NvResult nvhost_ctrl_gpu::GetActiveSlotMask(IoctlActiveSlotMask& params) { LOG_DEBUG(Service_NVDRV, "called"); - IoctlActiveSlotMask params{}; - if (input.size() > 0) { - std::memcpy(¶ms, input.data(), input.size()); - } params.slot = 0x07; params.mask = 0x01; - std::memcpy(output.data(), ¶ms, output.size()); return NvResult::Success; } -NvResult nvhost_ctrl_gpu::ZCullGetCtxSize(std::span input, std::span output) { +NvResult nvhost_ctrl_gpu::ZCullGetCtxSize(IoctlZcullGetCtxSize& params) { LOG_DEBUG(Service_NVDRV, "called"); - - IoctlZcullGetCtxSize params{}; - if (input.size() > 0) { - std::memcpy(¶ms, input.data(), input.size()); - } params.size = 0x1; - std::memcpy(output.data(), ¶ms, output.size()); return NvResult::Success; } -NvResult nvhost_ctrl_gpu::ZCullGetInfo(std::span input, std::span output) { +NvResult nvhost_ctrl_gpu::ZCullGetInfo(IoctlNvgpuGpuZcullGetInfoArgs& params) { LOG_DEBUG(Service_NVDRV, "called"); - - IoctlNvgpuGpuZcullGetInfoArgs params{}; - - if (input.size() > 0) { - std::memcpy(¶ms, input.data(), input.size()); - } - params.width_align_pixels = 0x20; params.height_align_pixels = 0x20; params.pixel_squares_by_aliquots = 0x400; @@ -243,53 +216,28 @@ NvResult nvhost_ctrl_gpu::ZCullGetInfo(std::span input, std::span params.subregion_width_align_pixels = 0x20; params.subregion_height_align_pixels = 0x40; params.subregion_count = 0x10; - std::memcpy(output.data(), ¶ms, output.size()); return NvResult::Success; } -NvResult nvhost_ctrl_gpu::ZBCSetTable(std::span input, std::span output) { +NvResult nvhost_ctrl_gpu::ZBCSetTable(IoctlZbcSetTable& params) { LOG_WARNING(Service_NVDRV, "(STUBBED) called"); - - IoctlZbcSetTable params{}; - std::memcpy(¶ms, input.data(), input.size()); // TODO(ogniK): What does this even actually do? - - // Prevent null pointer being passed as arg 1 - if (output.empty()) { - LOG_WARNING(Service_NVDRV, "Avoiding passing null pointer to memcpy"); - } else { - std::memcpy(output.data(), ¶ms, output.size()); - } return NvResult::Success; } -NvResult nvhost_ctrl_gpu::ZBCQueryTable(std::span input, std::span output) { +NvResult nvhost_ctrl_gpu::ZBCQueryTable(IoctlZbcQueryTable& params) { LOG_WARNING(Service_NVDRV, "(STUBBED) called"); - - IoctlZbcQueryTable params{}; - std::memcpy(¶ms, input.data(), input.size()); - // TODO : To implement properly - std::memcpy(output.data(), ¶ms, output.size()); return NvResult::Success; } -NvResult nvhost_ctrl_gpu::FlushL2(std::span input, std::span output) { +NvResult nvhost_ctrl_gpu::FlushL2(IoctlFlushL2& params) { LOG_WARNING(Service_NVDRV, "(STUBBED) called"); - - IoctlFlushL2 params{}; - std::memcpy(¶ms, input.data(), input.size()); - // TODO : To implement properly - std::memcpy(output.data(), ¶ms, output.size()); return NvResult::Success; } -NvResult nvhost_ctrl_gpu::GetGpuTime(std::span input, std::span output) { +NvResult nvhost_ctrl_gpu::GetGpuTime(IoctlGetGpuTime& params) { LOG_DEBUG(Service_NVDRV, "called"); - - IoctlGetGpuTime params{}; - std::memcpy(¶ms, input.data(), input.size()); params.gpu_time = static_cast(system.CoreTiming().GetGlobalTimeNs().count()); - std::memcpy(output.data(), ¶ms, output.size()); return NvResult::Success; } diff --git a/src/core/hle/service/nvdrv/devices/nvhost_ctrl_gpu.h b/src/core/hle/service/nvdrv/devices/nvhost_ctrl_gpu.h index 97995551cc..e1977a6b52 100644 --- a/src/core/hle/service/nvdrv/devices/nvhost_ctrl_gpu.h +++ b/src/core/hle/service/nvdrv/devices/nvhost_ctrl_gpu.h @@ -151,21 +151,19 @@ private: }; static_assert(sizeof(IoctlGetGpuTime) == 0x10, "IoctlGetGpuTime is incorrect size"); - NvResult GetCharacteristics(std::span input, std::span output); - NvResult GetCharacteristics(std::span input, std::span output, - std::span inline_output); + NvResult GetCharacteristics1(IoctlCharacteristics& params); + NvResult GetCharacteristics3(IoctlCharacteristics& params, std::span inline_output); - NvResult GetTPCMasks(std::span input, std::span output); - NvResult GetTPCMasks(std::span input, std::span output, - std::span inline_output); + NvResult GetTPCMasks1(IoctlGpuGetTpcMasksArgs& params); + NvResult GetTPCMasks3(IoctlGpuGetTpcMasksArgs& params, std::span inline_output); - NvResult GetActiveSlotMask(std::span input, std::span output); - NvResult ZCullGetCtxSize(std::span input, std::span output); - NvResult ZCullGetInfo(std::span input, std::span output); - NvResult ZBCSetTable(std::span input, std::span output); - NvResult ZBCQueryTable(std::span input, std::span output); - NvResult FlushL2(std::span input, std::span output); - NvResult GetGpuTime(std::span input, std::span output); + NvResult GetActiveSlotMask(IoctlActiveSlotMask& params); + NvResult ZCullGetCtxSize(IoctlZcullGetCtxSize& params); + NvResult ZCullGetInfo(IoctlNvgpuGpuZcullGetInfoArgs& params); + NvResult ZBCSetTable(IoctlZbcSetTable& params); + NvResult ZBCQueryTable(IoctlZbcQueryTable& params); + NvResult FlushL2(IoctlFlushL2& params); + NvResult GetGpuTime(IoctlGetGpuTime& params); EventInterface& events_interface; From 789d9c8af931490efd8647f286e136faaf062989 Mon Sep 17 00:00:00 2001 From: Liam Date: Tue, 24 Oct 2023 13:03:46 -0400 Subject: [PATCH 021/154] nvdrv: convert nvhost_ctrl --- .../hle/service/nvdrv/devices/nvhost_ctrl.cpp | 42 +++++++------------ .../hle/service/nvdrv/devices/nvhost_ctrl.h | 21 +++++++--- 2 files changed, 29 insertions(+), 34 deletions(-) diff --git a/src/core/hle/service/nvdrv/devices/nvhost_ctrl.cpp b/src/core/hle/service/nvdrv/devices/nvhost_ctrl.cpp index 4d55554b4e..8cefff6d11 100644 --- a/src/core/hle/service/nvdrv/devices/nvhost_ctrl.cpp +++ b/src/core/hle/service/nvdrv/devices/nvhost_ctrl.cpp @@ -14,6 +14,7 @@ #include "core/hle/kernel/k_event.h" #include "core/hle/service/nvdrv/core/container.h" #include "core/hle/service/nvdrv/core/syncpoint_manager.h" +#include "core/hle/service/nvdrv/devices/ioctl_serialization.h" #include "core/hle/service/nvdrv/devices/nvhost_ctrl.h" #include "video_core/gpu.h" #include "video_core/host1x/host1x.h" @@ -40,19 +41,19 @@ NvResult nvhost_ctrl::Ioctl1(DeviceFD fd, Ioctl command, std::span inp case 0x0: switch (command.cmd) { case 0x1b: - return NvOsGetConfigU32(input, output); + return Wrap1(&nvhost_ctrl::NvOsGetConfigU32, input, output); case 0x1c: - return IocCtrlClearEventWait(input, output); + return Wrap1(&nvhost_ctrl::IocCtrlClearEventWait, input, output); case 0x1d: - return IocCtrlEventWait(input, output, true); + return Wrap1(&nvhost_ctrl::IocCtrlEventWaitWithAllocation, input, output); case 0x1e: - return IocCtrlEventWait(input, output, false); + return Wrap1(&nvhost_ctrl::IocCtrlEventWaitNotAllocation, input, output); case 0x1f: - return IocCtrlEventRegister(input, output); + return Wrap1(&nvhost_ctrl::IocCtrlEventRegister, input, output); case 0x20: - return IocCtrlEventUnregister(input, output); + return Wrap1(&nvhost_ctrl::IocCtrlEventUnregister, input, output); case 0x21: - return IocCtrlEventUnregisterBatch(input, output); + return Wrap1(&nvhost_ctrl::IocCtrlEventUnregisterBatch, input, output); } break; default: @@ -79,25 +80,19 @@ void nvhost_ctrl::OnOpen(DeviceFD fd) {} void nvhost_ctrl::OnClose(DeviceFD fd) {} -NvResult nvhost_ctrl::NvOsGetConfigU32(std::span input, std::span output) { - IocGetConfigParams params{}; - std::memcpy(¶ms, input.data(), sizeof(params)); +NvResult nvhost_ctrl::NvOsGetConfigU32(IocGetConfigParams& params) { LOG_TRACE(Service_NVDRV, "called, setting={}!{}", params.domain_str.data(), params.param_str.data()); return NvResult::ConfigVarNotFound; // Returns error on production mode } -NvResult nvhost_ctrl::IocCtrlEventWait(std::span input, std::span output, - bool is_allocation) { - IocCtrlEventWaitParams params{}; - std::memcpy(¶ms, input.data(), sizeof(params)); +NvResult nvhost_ctrl::IocCtrlEventWaitImpl(IocCtrlEventWaitParams& params, bool is_allocation) { LOG_DEBUG(Service_NVDRV, "syncpt_id={}, threshold={}, timeout={}, is_allocation={}", params.fence.id, params.fence.value, params.timeout, is_allocation); bool must_unmark_fail = !is_allocation; const u32 event_id = params.value.raw; SCOPE_EXIT({ - std::memcpy(output.data(), ¶ms, sizeof(params)); if (must_unmark_fail) { events[event_id].fails = 0; } @@ -231,9 +226,7 @@ NvResult nvhost_ctrl::FreeEvent(u32 slot) { return NvResult::Success; } -NvResult nvhost_ctrl::IocCtrlEventRegister(std::span input, std::span output) { - IocCtrlEventRegisterParams params{}; - std::memcpy(¶ms, input.data(), sizeof(params)); +NvResult nvhost_ctrl::IocCtrlEventRegister(IocCtrlEventRegisterParams& params) { const u32 event_id = params.user_event_id; LOG_DEBUG(Service_NVDRV, " called, user_event_id: {:X}", event_id); if (event_id >= MaxNvEvents) { @@ -252,9 +245,7 @@ NvResult nvhost_ctrl::IocCtrlEventRegister(std::span input, std::span< return NvResult::Success; } -NvResult nvhost_ctrl::IocCtrlEventUnregister(std::span input, std::span output) { - IocCtrlEventUnregisterParams params{}; - std::memcpy(¶ms, input.data(), sizeof(params)); +NvResult nvhost_ctrl::IocCtrlEventUnregister(IocCtrlEventUnregisterParams& params) { const u32 event_id = params.user_event_id & 0x00FF; LOG_DEBUG(Service_NVDRV, " called, user_event_id: {:X}", event_id); @@ -262,9 +253,7 @@ NvResult nvhost_ctrl::IocCtrlEventUnregister(std::span input, std::spa return FreeEvent(event_id); } -NvResult nvhost_ctrl::IocCtrlEventUnregisterBatch(std::span input, std::span output) { - IocCtrlEventUnregisterBatchParams params{}; - std::memcpy(¶ms, input.data(), sizeof(params)); +NvResult nvhost_ctrl::IocCtrlEventUnregisterBatch(IocCtrlEventUnregisterBatchParams& params) { u64 event_mask = params.user_events; LOG_DEBUG(Service_NVDRV, " called, event_mask: {:X}", event_mask); @@ -280,10 +269,7 @@ NvResult nvhost_ctrl::IocCtrlEventUnregisterBatch(std::span input, std return NvResult::Success; } -NvResult nvhost_ctrl::IocCtrlClearEventWait(std::span input, std::span output) { - IocCtrlEventClearParams params{}; - std::memcpy(¶ms, input.data(), sizeof(params)); - +NvResult nvhost_ctrl::IocCtrlClearEventWait(IocCtrlEventClearParams& params) { u32 event_id = params.event_id.slot; LOG_DEBUG(Service_NVDRV, "called, event_id: {:X}", event_id); diff --git a/src/core/hle/service/nvdrv/devices/nvhost_ctrl.h b/src/core/hle/service/nvdrv/devices/nvhost_ctrl.h index 2efed4862d..6913c61acc 100644 --- a/src/core/hle/service/nvdrv/devices/nvhost_ctrl.h +++ b/src/core/hle/service/nvdrv/devices/nvhost_ctrl.h @@ -186,15 +186,24 @@ private: static_assert(sizeof(IocCtrlEventUnregisterBatchParams) == 8, "IocCtrlEventKill is incorrect size"); - NvResult NvOsGetConfigU32(std::span input, std::span output); - NvResult IocCtrlEventWait(std::span input, std::span output, bool is_allocation); - NvResult IocCtrlEventRegister(std::span input, std::span output); - NvResult IocCtrlEventUnregister(std::span input, std::span output); - NvResult IocCtrlEventUnregisterBatch(std::span input, std::span output); - NvResult IocCtrlClearEventWait(std::span input, std::span output); + NvResult NvOsGetConfigU32(IocGetConfigParams& params); + NvResult IocCtrlEventRegister(IocCtrlEventRegisterParams& params); + NvResult IocCtrlEventUnregister(IocCtrlEventUnregisterParams& params); + NvResult IocCtrlEventUnregisterBatch(IocCtrlEventUnregisterBatchParams& params); + NvResult IocCtrlClearEventWait(IocCtrlEventClearParams& params); NvResult FreeEvent(u32 slot); + // TODO: these are not the correct names + NvResult IocCtrlEventWaitNotAllocation(IocCtrlEventWaitParams& params) { + return this->IocCtrlEventWaitImpl(params, false); + } + NvResult IocCtrlEventWaitWithAllocation(IocCtrlEventWaitParams& params) { + return this->IocCtrlEventWaitImpl(params, true); + } + + NvResult IocCtrlEventWaitImpl(IocCtrlEventWaitParams& params, bool is_allocation); + EventInterface& events_interface; NvCore::Container& core; NvCore::SyncpointManager& syncpoint_manager; From 7a84a1a9748d01961e91ad612ed338abf9ec844c Mon Sep 17 00:00:00 2001 From: Liam Date: Tue, 24 Oct 2023 13:19:54 -0400 Subject: [PATCH 022/154] nvdrv: convert nvhost_gpu --- .../hle/service/nvdrv/devices/nvhost_gpu.cpp | 93 +++++++------------ .../hle/service/nvdrv/devices/nvhost_gpu.h | 32 ++++--- 2 files changed, 49 insertions(+), 76 deletions(-) diff --git a/src/core/hle/service/nvdrv/devices/nvhost_gpu.cpp b/src/core/hle/service/nvdrv/devices/nvhost_gpu.cpp index 804157ce3c..3abba25de7 100644 --- a/src/core/hle/service/nvdrv/devices/nvhost_gpu.cpp +++ b/src/core/hle/service/nvdrv/devices/nvhost_gpu.cpp @@ -8,6 +8,7 @@ #include "core/hle/service/nvdrv/core/container.h" #include "core/hle/service/nvdrv/core/nvmap.h" #include "core/hle/service/nvdrv/core/syncpoint_manager.h" +#include "core/hle/service/nvdrv/devices/ioctl_serialization.h" #include "core/hle/service/nvdrv/devices/nvhost_gpu.h" #include "core/hle/service/nvdrv/nvdrv.h" #include "core/memory.h" @@ -52,7 +53,7 @@ NvResult nvhost_gpu::Ioctl1(DeviceFD fd, Ioctl command, std::span inpu case 0x0: switch (command.cmd) { case 0x3: - return GetWaitbase(input, output); + return Wrap1(&nvhost_gpu::GetWaitbase, input, output); default: break; } @@ -60,25 +61,25 @@ NvResult nvhost_gpu::Ioctl1(DeviceFD fd, Ioctl command, std::span inpu case 'H': switch (command.cmd) { case 0x1: - return SetNVMAPfd(input, output); + return Wrap1(&nvhost_gpu::SetNVMAPfd, input, output); case 0x3: - return ChannelSetTimeout(input, output); + return Wrap1(&nvhost_gpu::ChannelSetTimeout, input, output); case 0x8: - return SubmitGPFIFOBase(input, output, false); + return SubmitGPFIFOBase1(input, output, false); case 0x9: - return AllocateObjectContext(input, output); + return Wrap1(&nvhost_gpu::AllocateObjectContext, input, output); case 0xb: - return ZCullBind(input, output); + return Wrap1(&nvhost_gpu::ZCullBind, input, output); case 0xc: - return SetErrorNotifier(input, output); + return Wrap1(&nvhost_gpu::SetErrorNotifier, input, output); case 0xd: - return SetChannelPriority(input, output); + return Wrap1(&nvhost_gpu::SetChannelPriority, input, output); case 0x1a: - return AllocGPFIFOEx2(input, output); + return Wrap1(&nvhost_gpu::AllocGPFIFOEx2, input, output); case 0x1b: - return SubmitGPFIFOBase(input, output, true); + return SubmitGPFIFOBase1(input, output, true); case 0x1d: - return ChannelSetTimeslice(input, output); + return Wrap1(&nvhost_gpu::ChannelSetTimeslice, input, output); default: break; } @@ -86,9 +87,9 @@ NvResult nvhost_gpu::Ioctl1(DeviceFD fd, Ioctl command, std::span inpu case 'G': switch (command.cmd) { case 0x14: - return SetClientData(input, output); + return Wrap1(&nvhost_gpu::SetClientData, input, output); case 0x15: - return GetClientData(input, output); + return Wrap1(&nvhost_gpu::GetClientData, input, output); default: break; } @@ -104,7 +105,7 @@ NvResult nvhost_gpu::Ioctl2(DeviceFD fd, Ioctl command, std::span inpu case 'H': switch (command.cmd) { case 0x1b: - return SubmitGPFIFOBase(input, inline_input, output); + return SubmitGPFIFOBase2(input, inline_input, output); } break; } @@ -121,63 +122,45 @@ NvResult nvhost_gpu::Ioctl3(DeviceFD fd, Ioctl command, std::span inpu void nvhost_gpu::OnOpen(DeviceFD fd) {} void nvhost_gpu::OnClose(DeviceFD fd) {} -NvResult nvhost_gpu::SetNVMAPfd(std::span input, std::span output) { - IoctlSetNvmapFD params{}; - std::memcpy(¶ms, input.data(), input.size()); +NvResult nvhost_gpu::SetNVMAPfd(IoctlSetNvmapFD& params) { LOG_DEBUG(Service_NVDRV, "called, fd={}", params.nvmap_fd); nvmap_fd = params.nvmap_fd; return NvResult::Success; } -NvResult nvhost_gpu::SetClientData(std::span input, std::span output) { +NvResult nvhost_gpu::SetClientData(IoctlClientData& params) { LOG_DEBUG(Service_NVDRV, "called"); - - IoctlClientData params{}; - std::memcpy(¶ms, input.data(), std::min(sizeof(IoctlClientData), input.size())); user_data = params.data; return NvResult::Success; } -NvResult nvhost_gpu::GetClientData(std::span input, std::span output) { +NvResult nvhost_gpu::GetClientData(IoctlClientData& params) { LOG_DEBUG(Service_NVDRV, "called"); - - IoctlClientData params{}; - std::memcpy(¶ms, input.data(), std::min(sizeof(IoctlClientData), input.size())); params.data = user_data; - std::memcpy(output.data(), ¶ms, std::min(sizeof(IoctlClientData), output.size())); return NvResult::Success; } -NvResult nvhost_gpu::ZCullBind(std::span input, std::span output) { - std::memcpy(&zcull_params, input.data(), input.size()); +NvResult nvhost_gpu::ZCullBind(IoctlZCullBind& params) { + zcull_params = params; LOG_DEBUG(Service_NVDRV, "called, gpu_va={:X}, mode={:X}", zcull_params.gpu_va, zcull_params.mode); - - std::memcpy(output.data(), &zcull_params, output.size()); return NvResult::Success; } -NvResult nvhost_gpu::SetErrorNotifier(std::span input, std::span output) { - IoctlSetErrorNotifier params{}; - std::memcpy(¶ms, input.data(), input.size()); +NvResult nvhost_gpu::SetErrorNotifier(IoctlSetErrorNotifier& params) { LOG_WARNING(Service_NVDRV, "(STUBBED) called, offset={:X}, size={:X}, mem={:X}", params.offset, params.size, params.mem); - - std::memcpy(output.data(), ¶ms, output.size()); return NvResult::Success; } -NvResult nvhost_gpu::SetChannelPriority(std::span input, std::span output) { - std::memcpy(&channel_priority, input.data(), input.size()); +NvResult nvhost_gpu::SetChannelPriority(IoctlChannelSetPriority& params) { + channel_priority = params.priority; LOG_DEBUG(Service_NVDRV, "(STUBBED) called, priority={:X}", channel_priority); - return NvResult::Success; } -NvResult nvhost_gpu::AllocGPFIFOEx2(std::span input, std::span output) { - IoctlAllocGpfifoEx2 params{}; - std::memcpy(¶ms, input.data(), input.size()); +NvResult nvhost_gpu::AllocGPFIFOEx2(IoctlAllocGpfifoEx2& params) { LOG_WARNING(Service_NVDRV, "(STUBBED) called, num_entries={:X}, flags={:X}, unk0={:X}, " "unk1={:X}, unk2={:X}, unk3={:X}", @@ -193,18 +176,14 @@ NvResult nvhost_gpu::AllocGPFIFOEx2(std::span input, std::span out params.fence_out = syncpoint_manager.GetSyncpointFence(channel_syncpoint); - std::memcpy(output.data(), ¶ms, output.size()); return NvResult::Success; } -NvResult nvhost_gpu::AllocateObjectContext(std::span input, std::span output) { - IoctlAllocObjCtx params{}; - std::memcpy(¶ms, input.data(), input.size()); +NvResult nvhost_gpu::AllocateObjectContext(IoctlAllocObjCtx& params) { LOG_WARNING(Service_NVDRV, "(STUBBED) called, class_num={:X}, flags={:X}", params.class_num, params.flags); params.obj_id = 0x0; - std::memcpy(output.data(), ¶ms, output.size()); return NvResult::Success; } @@ -290,12 +269,11 @@ NvResult nvhost_gpu::SubmitGPFIFOImpl(IoctlSubmitGpfifo& params, std::span o flags.raw = 0; - std::memcpy(output.data(), ¶ms, sizeof(IoctlSubmitGpfifo)); return NvResult::Success; } -NvResult nvhost_gpu::SubmitGPFIFOBase(std::span input, std::span output, - bool kickoff) { +NvResult nvhost_gpu::SubmitGPFIFOBase1(std::span input, std::span output, + bool kickoff) { if (input.size() < sizeof(IoctlSubmitGpfifo)) { UNIMPLEMENTED(); return NvResult::InvalidSize; @@ -315,8 +293,8 @@ NvResult nvhost_gpu::SubmitGPFIFOBase(std::span input, std::span o return SubmitGPFIFOImpl(params, output, std::move(entries)); } -NvResult nvhost_gpu::SubmitGPFIFOBase(std::span input, std::span input_inline, - std::span output) { +NvResult nvhost_gpu::SubmitGPFIFOBase2(std::span input, std::span input_inline, + std::span output) { if (input.size() < sizeof(IoctlSubmitGpfifo)) { UNIMPLEMENTED(); return NvResult::InvalidSize; @@ -328,27 +306,20 @@ NvResult nvhost_gpu::SubmitGPFIFOBase(std::span input, std::span input, std::span output) { - IoctlGetWaitbase params{}; - std::memcpy(¶ms, input.data(), sizeof(IoctlGetWaitbase)); +NvResult nvhost_gpu::GetWaitbase(IoctlGetWaitbase& params) { LOG_INFO(Service_NVDRV, "called, unknown=0x{:X}", params.unknown); params.value = 0; // Seems to be hard coded at 0 - std::memcpy(output.data(), ¶ms, output.size()); return NvResult::Success; } -NvResult nvhost_gpu::ChannelSetTimeout(std::span input, std::span output) { - IoctlChannelSetTimeout params{}; - std::memcpy(¶ms, input.data(), sizeof(IoctlChannelSetTimeout)); +NvResult nvhost_gpu::ChannelSetTimeout(IoctlChannelSetTimeout& params) { LOG_INFO(Service_NVDRV, "called, timeout=0x{:X}", params.timeout); return NvResult::Success; } -NvResult nvhost_gpu::ChannelSetTimeslice(std::span input, std::span output) { - IoctlSetTimeslice params{}; - std::memcpy(¶ms, input.data(), sizeof(IoctlSetTimeslice)); +NvResult nvhost_gpu::ChannelSetTimeslice(IoctlSetTimeslice& params) { LOG_INFO(Service_NVDRV, "called, timeslice=0x{:X}", params.timeslice); channel_timeslice = params.timeslice; diff --git a/src/core/hle/service/nvdrv/devices/nvhost_gpu.h b/src/core/hle/service/nvdrv/devices/nvhost_gpu.h index 529c20526a..fba4232c48 100644 --- a/src/core/hle/service/nvdrv/devices/nvhost_gpu.h +++ b/src/core/hle/service/nvdrv/devices/nvhost_gpu.h @@ -186,23 +186,25 @@ private: u32_le channel_priority{}; u32_le channel_timeslice{}; - NvResult SetNVMAPfd(std::span input, std::span output); - NvResult SetClientData(std::span input, std::span output); - NvResult GetClientData(std::span input, std::span output); - NvResult ZCullBind(std::span input, std::span output); - NvResult SetErrorNotifier(std::span input, std::span output); - NvResult SetChannelPriority(std::span input, std::span output); - NvResult AllocGPFIFOEx2(std::span input, std::span output); - NvResult AllocateObjectContext(std::span input, std::span output); + NvResult SetNVMAPfd(IoctlSetNvmapFD& params); + NvResult SetClientData(IoctlClientData& params); + NvResult GetClientData(IoctlClientData& params); + NvResult ZCullBind(IoctlZCullBind& params); + NvResult SetErrorNotifier(IoctlSetErrorNotifier& params); + NvResult SetChannelPriority(IoctlChannelSetPriority& params); + NvResult AllocGPFIFOEx2(IoctlAllocGpfifoEx2& params); + NvResult AllocateObjectContext(IoctlAllocObjCtx& params); + NvResult SubmitGPFIFOImpl(IoctlSubmitGpfifo& params, std::span output, Tegra::CommandList&& entries); - NvResult SubmitGPFIFOBase(std::span input, std::span output, - bool kickoff = false); - NvResult SubmitGPFIFOBase(std::span input, std::span input_inline, - std::span output); - NvResult GetWaitbase(std::span input, std::span output); - NvResult ChannelSetTimeout(std::span input, std::span output); - NvResult ChannelSetTimeslice(std::span input, std::span output); + NvResult SubmitGPFIFOBase1(std::span input, std::span output, + bool kickoff = false); + NvResult SubmitGPFIFOBase2(std::span input, std::span input_inline, + std::span output); + + NvResult GetWaitbase(IoctlGetWaitbase& params); + NvResult ChannelSetTimeout(IoctlChannelSetTimeout& params); + NvResult ChannelSetTimeslice(IoctlSetTimeslice& params); EventInterface& events_interface; NvCore::Container& core; From efdb2e8f3dfc1106ee601a2e0cc479c35aa83698 Mon Sep 17 00:00:00 2001 From: Liam Date: Tue, 24 Oct 2023 13:30:35 -0400 Subject: [PATCH 023/154] nvdrv: convert codec devices --- .../service/nvdrv/devices/nvhost_nvdec.cpp | 9 +++--- .../nvdrv/devices/nvhost_nvdec_common.cpp | 30 ++++++++----------- .../nvdrv/devices/nvhost_nvdec_common.h | 8 ++--- .../service/nvdrv/devices/nvhost_nvjpg.cpp | 7 ++--- .../hle/service/nvdrv/devices/nvhost_nvjpg.h | 2 +- .../hle/service/nvdrv/devices/nvhost_vic.cpp | 7 +++-- 6 files changed, 29 insertions(+), 34 deletions(-) diff --git a/src/core/hle/service/nvdrv/devices/nvhost_nvdec.cpp b/src/core/hle/service/nvdrv/devices/nvhost_nvdec.cpp index a174442a6c..74790a7d8a 100644 --- a/src/core/hle/service/nvdrv/devices/nvhost_nvdec.cpp +++ b/src/core/hle/service/nvdrv/devices/nvhost_nvdec.cpp @@ -6,6 +6,7 @@ #include "common/logging/log.h" #include "core/core.h" #include "core/hle/service/nvdrv/core/container.h" +#include "core/hle/service/nvdrv/devices/ioctl_serialization.h" #include "core/hle/service/nvdrv/devices/nvhost_nvdec.h" #include "video_core/renderer_base.h" @@ -28,11 +29,11 @@ NvResult nvhost_nvdec::Ioctl1(DeviceFD fd, Ioctl command, std::span in return Submit(fd, input, output); } case 0x2: - return GetSyncpoint(input, output); + return Wrap1(&nvhost_nvdec::GetSyncpoint, input, output); case 0x3: - return GetWaitbase(input, output); + return Wrap1(&nvhost_nvdec::GetWaitbase, input, output); case 0x7: - return SetSubmitTimeout(input, output); + return Wrap1(&nvhost_nvdec::SetSubmitTimeout, input, output); case 0x9: return MapBuffer(input, output); case 0xa: @@ -44,7 +45,7 @@ NvResult nvhost_nvdec::Ioctl1(DeviceFD fd, Ioctl command, std::span in case 'H': switch (command.cmd) { case 0x1: - return SetNVMAPfd(input); + return Wrap1(&nvhost_nvdec::SetNVMAPfd, input, output); default: break; } diff --git a/src/core/hle/service/nvdrv/devices/nvhost_nvdec_common.cpp b/src/core/hle/service/nvdrv/devices/nvhost_nvdec_common.cpp index 61649aa4a0..51659934b7 100644 --- a/src/core/hle/service/nvdrv/devices/nvhost_nvdec_common.cpp +++ b/src/core/hle/service/nvdrv/devices/nvhost_nvdec_common.cpp @@ -63,9 +63,7 @@ nvhost_nvdec_common::~nvhost_nvdec_common() { core.Host1xDeviceFile().syncpts_accumulated.push_back(channel_syncpoint); } -NvResult nvhost_nvdec_common::SetNVMAPfd(std::span input) { - IoctlSetNvmapFD params{}; - std::memcpy(¶ms, input.data(), sizeof(IoctlSetNvmapFD)); +NvResult nvhost_nvdec_common::SetNVMAPfd(IoctlSetNvmapFD& params) { LOG_DEBUG(Service_NVDRV, "called, fd={}", params.nvmap_fd); nvmap_fd = params.nvmap_fd; @@ -74,7 +72,7 @@ NvResult nvhost_nvdec_common::SetNVMAPfd(std::span input) { NvResult nvhost_nvdec_common::Submit(DeviceFD fd, std::span input, std::span output) { IoctlSubmit params{}; - std::memcpy(¶ms, input.data(), sizeof(IoctlSubmit)); + std::memcpy(¶ms, input.data(), std::min(input.size(), sizeof(IoctlSubmit))); LOG_DEBUG(Service_NVDRV, "called NVDEC Submit, cmd_buffer_count={}", params.cmd_buffer_count); // Instantiate param buffers @@ -120,24 +118,15 @@ NvResult nvhost_nvdec_common::Submit(DeviceFD fd, std::span input, std return NvResult::Success; } -NvResult nvhost_nvdec_common::GetSyncpoint(std::span input, std::span output) { - IoctlGetSyncpoint params{}; - std::memcpy(¶ms, input.data(), sizeof(IoctlGetSyncpoint)); +NvResult nvhost_nvdec_common::GetSyncpoint(IoctlGetSyncpoint& params) { LOG_DEBUG(Service_NVDRV, "called GetSyncpoint, id={}", params.param); - - // const u32 id{NvCore::SyncpointManager::channel_syncpoints[static_cast(channel_type)]}; params.value = channel_syncpoint; - std::memcpy(output.data(), ¶ms, sizeof(IoctlGetSyncpoint)); - return NvResult::Success; } -NvResult nvhost_nvdec_common::GetWaitbase(std::span input, std::span output) { - IoctlGetWaitbase params{}; +NvResult nvhost_nvdec_common::GetWaitbase(IoctlGetWaitbase& params) { LOG_CRITICAL(Service_NVDRV, "called WAITBASE"); - std::memcpy(¶ms, input.data(), sizeof(IoctlGetWaitbase)); params.value = 0; // Seems to be hard coded at 0 - std::memcpy(output.data(), ¶ms, sizeof(IoctlGetWaitbase)); return NvResult::Success; } @@ -151,6 +140,12 @@ NvResult nvhost_nvdec_common::MapBuffer(std::span input, std::span for (auto& cmd_buffer : cmd_buffer_handles) { cmd_buffer.map_address = nvmap.PinHandle(cmd_buffer.map_handle); } + + if (output.size() < + sizeof(IoctlMapBuffer) + cmd_buffer_handles.size() * sizeof(MapBufferEntry)) { + return NvResult::InvalidSize; + } + std::memcpy(output.data(), ¶ms, sizeof(IoctlMapBuffer)); std::memcpy(output.data() + sizeof(IoctlMapBuffer), cmd_buffer_handles.data(), cmd_buffer_handles.size() * sizeof(MapBufferEntry)); @@ -160,7 +155,7 @@ NvResult nvhost_nvdec_common::MapBuffer(std::span input, std::span NvResult nvhost_nvdec_common::UnmapBuffer(std::span input, std::span output) { IoctlMapBuffer params{}; - std::memcpy(¶ms, input.data(), sizeof(IoctlMapBuffer)); + std::memcpy(¶ms, input.data(), std::min(input.size(), sizeof(IoctlMapBuffer))); std::vector cmd_buffer_handles(params.num_entries); SliceVectors(input, cmd_buffer_handles, params.num_entries, sizeof(IoctlMapBuffer)); @@ -172,8 +167,7 @@ NvResult nvhost_nvdec_common::UnmapBuffer(std::span input, std::span input, std::span output) { - std::memcpy(&submit_timeout, input.data(), input.size()); +NvResult nvhost_nvdec_common::SetSubmitTimeout(u32 timeout) { LOG_WARNING(Service_NVDRV, "(STUBBED) called"); return NvResult::Success; } diff --git a/src/core/hle/service/nvdrv/devices/nvhost_nvdec_common.h b/src/core/hle/service/nvdrv/devices/nvhost_nvdec_common.h index 9bb573bfee..cc988b897e 100644 --- a/src/core/hle/service/nvdrv/devices/nvhost_nvdec_common.h +++ b/src/core/hle/service/nvdrv/devices/nvhost_nvdec_common.h @@ -107,13 +107,13 @@ protected: static_assert(sizeof(IoctlMapBuffer) == 0x0C, "IoctlMapBuffer is incorrect size"); /// Ioctl command implementations - NvResult SetNVMAPfd(std::span input); + NvResult SetNVMAPfd(IoctlSetNvmapFD&); NvResult Submit(DeviceFD fd, std::span input, std::span output); - NvResult GetSyncpoint(std::span input, std::span output); - NvResult GetWaitbase(std::span input, std::span output); + NvResult GetSyncpoint(IoctlGetSyncpoint& params); + NvResult GetWaitbase(IoctlGetWaitbase& params); NvResult MapBuffer(std::span input, std::span output); NvResult UnmapBuffer(std::span input, std::span output); - NvResult SetSubmitTimeout(std::span input, std::span output); + NvResult SetSubmitTimeout(u32 timeout); Kernel::KEvent* QueryEvent(u32 event_id) override; diff --git a/src/core/hle/service/nvdrv/devices/nvhost_nvjpg.cpp b/src/core/hle/service/nvdrv/devices/nvhost_nvjpg.cpp index a05c8cdaef..23a57c4d5c 100644 --- a/src/core/hle/service/nvdrv/devices/nvhost_nvjpg.cpp +++ b/src/core/hle/service/nvdrv/devices/nvhost_nvjpg.cpp @@ -5,6 +5,7 @@ #include "common/assert.h" #include "common/logging/log.h" +#include "core/hle/service/nvdrv/devices/ioctl_serialization.h" #include "core/hle/service/nvdrv/devices/nvhost_nvjpg.h" namespace Service::Nvidia::Devices { @@ -18,7 +19,7 @@ NvResult nvhost_nvjpg::Ioctl1(DeviceFD fd, Ioctl command, std::span in case 'H': switch (command.cmd) { case 0x1: - return SetNVMAPfd(input, output); + return Wrap1(&nvhost_nvjpg::SetNVMAPfd, input, output); default: break; } @@ -46,9 +47,7 @@ NvResult nvhost_nvjpg::Ioctl3(DeviceFD fd, Ioctl command, std::span in void nvhost_nvjpg::OnOpen(DeviceFD fd) {} void nvhost_nvjpg::OnClose(DeviceFD fd) {} -NvResult nvhost_nvjpg::SetNVMAPfd(std::span input, std::span output) { - IoctlSetNvmapFD params{}; - std::memcpy(¶ms, input.data(), input.size()); +NvResult nvhost_nvjpg::SetNVMAPfd(IoctlSetNvmapFD& params) { LOG_DEBUG(Service_NVDRV, "called, fd={}", params.nvmap_fd); nvmap_fd = params.nvmap_fd; diff --git a/src/core/hle/service/nvdrv/devices/nvhost_nvjpg.h b/src/core/hle/service/nvdrv/devices/nvhost_nvjpg.h index 5623e0d473..790c97f6aa 100644 --- a/src/core/hle/service/nvdrv/devices/nvhost_nvjpg.h +++ b/src/core/hle/service/nvdrv/devices/nvhost_nvjpg.h @@ -33,7 +33,7 @@ private: s32_le nvmap_fd{}; - NvResult SetNVMAPfd(std::span input, std::span output); + NvResult SetNVMAPfd(IoctlSetNvmapFD& params); }; } // namespace Service::Nvidia::Devices diff --git a/src/core/hle/service/nvdrv/devices/nvhost_vic.cpp b/src/core/hle/service/nvdrv/devices/nvhost_vic.cpp index c0b8684c38..20af758727 100644 --- a/src/core/hle/service/nvdrv/devices/nvhost_vic.cpp +++ b/src/core/hle/service/nvdrv/devices/nvhost_vic.cpp @@ -5,6 +5,7 @@ #include "common/logging/log.h" #include "core/core.h" #include "core/hle/service/nvdrv/core/container.h" +#include "core/hle/service/nvdrv/devices/ioctl_serialization.h" #include "core/hle/service/nvdrv/devices/nvhost_vic.h" #include "video_core/renderer_base.h" @@ -28,9 +29,9 @@ NvResult nvhost_vic::Ioctl1(DeviceFD fd, Ioctl command, std::span inpu return Submit(fd, input, output); } case 0x2: - return GetSyncpoint(input, output); + return Wrap1(&nvhost_vic::GetSyncpoint, input, output); case 0x3: - return GetWaitbase(input, output); + return Wrap1(&nvhost_vic::GetWaitbase, input, output); case 0x9: return MapBuffer(input, output); case 0xa: @@ -42,7 +43,7 @@ NvResult nvhost_vic::Ioctl1(DeviceFD fd, Ioctl command, std::span inpu case 'H': switch (command.cmd) { case 0x1: - return SetNVMAPfd(input); + return Wrap1(&nvhost_vic::SetNVMAPfd, input, output); default: break; } From 18450ebd7877d1832307545ee7b9225bb00e7884 Mon Sep 17 00:00:00 2001 From: Liam Date: Tue, 24 Oct 2023 13:36:57 -0400 Subject: [PATCH 024/154] nvdrv: convert nvmap --- src/core/hle/service/nvdrv/devices/nvmap.cpp | 47 +++++-------------- src/core/hle/service/nvdrv/devices/nvmap.h | 12 ++--- .../nvnflinger/fb_share_buffer_manager.cpp | 27 +++-------- 3 files changed, 26 insertions(+), 60 deletions(-) diff --git a/src/core/hle/service/nvdrv/devices/nvmap.cpp b/src/core/hle/service/nvdrv/devices/nvmap.cpp index 968eaa1755..94286e295c 100644 --- a/src/core/hle/service/nvdrv/devices/nvmap.cpp +++ b/src/core/hle/service/nvdrv/devices/nvmap.cpp @@ -13,6 +13,7 @@ #include "core/hle/kernel/k_process.h" #include "core/hle/service/nvdrv/core/container.h" #include "core/hle/service/nvdrv/core/nvmap.h" +#include "core/hle/service/nvdrv/devices/ioctl_serialization.h" #include "core/hle/service/nvdrv/devices/nvmap.h" #include "core/memory.h" @@ -31,17 +32,17 @@ NvResult nvmap::Ioctl1(DeviceFD fd, Ioctl command, std::span input, case 0x1: switch (command.cmd) { case 0x1: - return IocCreate(input, output); + return Wrap1(&nvmap::IocCreate, input, output); case 0x3: - return IocFromId(input, output); + return Wrap1(&nvmap::IocFromId, input, output); case 0x4: - return IocAlloc(input, output); + return Wrap1(&nvmap::IocAlloc, input, output); case 0x5: - return IocFree(input, output); + return Wrap1(&nvmap::IocFree, input, output); case 0x9: - return IocParam(input, output); + return Wrap1(&nvmap::IocParam, input, output); case 0xe: - return IocGetId(input, output); + return Wrap1(&nvmap::IocGetId, input, output); default: break; } @@ -69,9 +70,7 @@ NvResult nvmap::Ioctl3(DeviceFD fd, Ioctl command, std::span input, st void nvmap::OnOpen(DeviceFD fd) {} void nvmap::OnClose(DeviceFD fd) {} -NvResult nvmap::IocCreate(std::span input, std::span output) { - IocCreateParams params; - std::memcpy(¶ms, input.data(), sizeof(params)); +NvResult nvmap::IocCreate(IocCreateParams& params) { LOG_DEBUG(Service_NVDRV, "called, size=0x{:08X}", params.size); std::shared_ptr handle_description{}; @@ -85,13 +84,10 @@ NvResult nvmap::IocCreate(std::span input, std::span output) { params.handle = handle_description->id; LOG_DEBUG(Service_NVDRV, "handle: {}, size: 0x{:X}", handle_description->id, params.size); - std::memcpy(output.data(), ¶ms, sizeof(params)); return NvResult::Success; } -NvResult nvmap::IocAlloc(std::span input, std::span output) { - IocAllocParams params; - std::memcpy(¶ms, input.data(), sizeof(params)); +NvResult nvmap::IocAlloc(IocAllocParams& params) { LOG_DEBUG(Service_NVDRV, "called, addr={:X}", params.address); if (!params.handle) { @@ -133,14 +129,10 @@ NvResult nvmap::IocAlloc(std::span input, std::span output) { handle_description->size, Kernel::KMemoryPermission::None, true, false) .IsSuccess()); - std::memcpy(output.data(), ¶ms, sizeof(params)); return result; } -NvResult nvmap::IocGetId(std::span input, std::span output) { - IocGetIdParams params; - std::memcpy(¶ms, input.data(), sizeof(params)); - +NvResult nvmap::IocGetId(IocGetIdParams& params) { LOG_DEBUG(Service_NVDRV, "called"); // See the comment in FromId for extra info on this function @@ -157,14 +149,10 @@ NvResult nvmap::IocGetId(std::span input, std::span output) { } params.id = handle_description->id; - std::memcpy(output.data(), ¶ms, sizeof(params)); return NvResult::Success; } -NvResult nvmap::IocFromId(std::span input, std::span output) { - IocFromIdParams params; - std::memcpy(¶ms, input.data(), sizeof(params)); - +NvResult nvmap::IocFromId(IocFromIdParams& params) { LOG_DEBUG(Service_NVDRV, "called, id:{}", params.id); // Handles and IDs are always the same value in nvmap however IDs can be used globally given the @@ -188,16 +176,12 @@ NvResult nvmap::IocFromId(std::span input, std::span output) { return result; } params.handle = handle_description->id; - std::memcpy(output.data(), ¶ms, sizeof(params)); return NvResult::Success; } -NvResult nvmap::IocParam(std::span input, std::span output) { +NvResult nvmap::IocParam(IocParamParams& params) { enum class ParamTypes { Size = 1, Alignment = 2, Base = 3, Heap = 4, Kind = 5, Compr = 6 }; - IocParamParams params; - std::memcpy(¶ms, input.data(), sizeof(params)); - LOG_DEBUG(Service_NVDRV, "called type={}", params.param); if (!params.handle) { @@ -237,14 +221,10 @@ NvResult nvmap::IocParam(std::span input, std::span output) { return NvResult::BadValue; } - std::memcpy(output.data(), ¶ms, sizeof(params)); return NvResult::Success; } -NvResult nvmap::IocFree(std::span input, std::span output) { - IocFreeParams params; - std::memcpy(¶ms, input.data(), sizeof(params)); - +NvResult nvmap::IocFree(IocFreeParams& params) { LOG_DEBUG(Service_NVDRV, "called"); if (!params.handle) { @@ -267,7 +247,6 @@ NvResult nvmap::IocFree(std::span input, std::span output) { // This is possible when there's internal dups or other duplicates. } - std::memcpy(output.data(), ¶ms, sizeof(params)); return NvResult::Success; } diff --git a/src/core/hle/service/nvdrv/devices/nvmap.h b/src/core/hle/service/nvdrv/devices/nvmap.h index 4c0cc71cd2..049c110284 100644 --- a/src/core/hle/service/nvdrv/devices/nvmap.h +++ b/src/core/hle/service/nvdrv/devices/nvmap.h @@ -99,12 +99,12 @@ public: }; static_assert(sizeof(IocGetIdParams) == 8, "IocGetIdParams has wrong size"); - NvResult IocCreate(std::span input, std::span output); - NvResult IocAlloc(std::span input, std::span output); - NvResult IocGetId(std::span input, std::span output); - NvResult IocFromId(std::span input, std::span output); - NvResult IocParam(std::span input, std::span output); - NvResult IocFree(std::span input, std::span output); + NvResult IocCreate(IocCreateParams& params); + NvResult IocAlloc(IocAllocParams& params); + NvResult IocGetId(IocGetIdParams& params); + NvResult IocFromId(IocFromIdParams& params); + NvResult IocParam(IocParamParams& params); + NvResult IocFree(IocFreeParams& params); private: /// Id to use for the next handle that is created. diff --git a/src/core/hle/service/nvnflinger/fb_share_buffer_manager.cpp b/src/core/hle/service/nvnflinger/fb_share_buffer_manager.cpp index 2e29bc8487..6dc327b8be 100644 --- a/src/core/hle/service/nvnflinger/fb_share_buffer_manager.cpp +++ b/src/core/hle/service/nvnflinger/fb_share_buffer_manager.cpp @@ -71,24 +71,17 @@ Result AllocateIoForProcessAddressSpace(Common::ProcessAddress* out_map_address, R_SUCCEED(); } -template -std::span SerializeIoc(T& params) { - return std::span(reinterpret_cast(std::addressof(params)), sizeof(T)); -} - Result CreateNvMapHandle(u32* out_nv_map_handle, Nvidia::Devices::nvmap& nvmap, u32 size) { // Create a handle. - Nvidia::Devices::nvmap::IocCreateParams create_in_params{ + Nvidia::Devices::nvmap::IocCreateParams create_params{ .size = size, .handle = 0, }; - Nvidia::Devices::nvmap::IocCreateParams create_out_params{}; - R_UNLESS(nvmap.IocCreate(SerializeIoc(create_in_params), SerializeIoc(create_out_params)) == - Nvidia::NvResult::Success, + R_UNLESS(nvmap.IocCreate(create_params) == Nvidia::NvResult::Success, VI::ResultOperationFailed); // Assign the output handle. - *out_nv_map_handle = create_out_params.handle; + *out_nv_map_handle = create_params.handle; // We succeeded. R_SUCCEED(); @@ -96,13 +89,10 @@ Result CreateNvMapHandle(u32* out_nv_map_handle, Nvidia::Devices::nvmap& nvmap, Result FreeNvMapHandle(Nvidia::Devices::nvmap& nvmap, u32 handle) { // Free the handle. - Nvidia::Devices::nvmap::IocFreeParams free_in_params{ + Nvidia::Devices::nvmap::IocFreeParams free_params{ .handle = handle, }; - Nvidia::Devices::nvmap::IocFreeParams free_out_params{}; - R_UNLESS(nvmap.IocFree(SerializeIoc(free_in_params), SerializeIoc(free_out_params)) == - Nvidia::NvResult::Success, - VI::ResultOperationFailed); + R_UNLESS(nvmap.IocFree(free_params) == Nvidia::NvResult::Success, VI::ResultOperationFailed); // We succeeded. R_SUCCEED(); @@ -111,7 +101,7 @@ Result FreeNvMapHandle(Nvidia::Devices::nvmap& nvmap, u32 handle) { Result AllocNvMapHandle(Nvidia::Devices::nvmap& nvmap, u32 handle, Common::ProcessAddress buffer, u32 size) { // Assign the allocated memory to the handle. - Nvidia::Devices::nvmap::IocAllocParams alloc_in_params{ + Nvidia::Devices::nvmap::IocAllocParams alloc_params{ .handle = handle, .heap_mask = 0, .flags = {}, @@ -119,10 +109,7 @@ Result AllocNvMapHandle(Nvidia::Devices::nvmap& nvmap, u32 handle, Common::Proce .kind = 0, .address = GetInteger(buffer), }; - Nvidia::Devices::nvmap::IocAllocParams alloc_out_params{}; - R_UNLESS(nvmap.IocAlloc(SerializeIoc(alloc_in_params), SerializeIoc(alloc_out_params)) == - Nvidia::NvResult::Success, - VI::ResultOperationFailed); + R_UNLESS(nvmap.IocAlloc(alloc_params) == Nvidia::NvResult::Success, VI::ResultOperationFailed); // We succeeded. R_SUCCEED(); From 94b7ac50bb5283caf20989341e27d77ec2c57bef Mon Sep 17 00:00:00 2001 From: Liam Date: Tue, 24 Oct 2023 13:41:48 -0400 Subject: [PATCH 025/154] nvdrv: fix up remaining copy calls --- .../hle/service/nvdrv/devices/nvhost_gpu.cpp | 20 +++++++++---------- .../hle/service/nvdrv/devices/nvhost_gpu.h | 9 +++------ .../nvdrv/devices/nvhost_nvdec_common.cpp | 10 ++++++++++ 3 files changed, 22 insertions(+), 17 deletions(-) diff --git a/src/core/hle/service/nvdrv/devices/nvhost_gpu.cpp b/src/core/hle/service/nvdrv/devices/nvhost_gpu.cpp index 3abba25de7..2d67acc6ad 100644 --- a/src/core/hle/service/nvdrv/devices/nvhost_gpu.cpp +++ b/src/core/hle/service/nvdrv/devices/nvhost_gpu.cpp @@ -65,7 +65,7 @@ NvResult nvhost_gpu::Ioctl1(DeviceFD fd, Ioctl command, std::span inpu case 0x3: return Wrap1(&nvhost_gpu::ChannelSetTimeout, input, output); case 0x8: - return SubmitGPFIFOBase1(input, output, false); + return SubmitGPFIFOBase1(input, false); case 0x9: return Wrap1(&nvhost_gpu::AllocateObjectContext, input, output); case 0xb: @@ -77,7 +77,7 @@ NvResult nvhost_gpu::Ioctl1(DeviceFD fd, Ioctl command, std::span inpu case 0x1a: return Wrap1(&nvhost_gpu::AllocGPFIFOEx2, input, output); case 0x1b: - return SubmitGPFIFOBase1(input, output, true); + return SubmitGPFIFOBase1(input, true); case 0x1d: return Wrap1(&nvhost_gpu::ChannelSetTimeslice, input, output); default: @@ -105,7 +105,7 @@ NvResult nvhost_gpu::Ioctl2(DeviceFD fd, Ioctl command, std::span inpu case 'H': switch (command.cmd) { case 0x1b: - return SubmitGPFIFOBase2(input, inline_input, output); + return SubmitGPFIFOBase2(input, inline_input); } break; } @@ -227,8 +227,7 @@ static boost::container::small_vector BuildIncrementW return result; } -NvResult nvhost_gpu::SubmitGPFIFOImpl(IoctlSubmitGpfifo& params, std::span output, - Tegra::CommandList&& entries) { +NvResult nvhost_gpu::SubmitGPFIFOImpl(IoctlSubmitGpfifo& params, Tegra::CommandList&& entries) { LOG_TRACE(Service_NVDRV, "called, gpfifo={:X}, num_entries={:X}, flags={:X}", params.address, params.num_entries, params.flags.raw); @@ -272,8 +271,7 @@ NvResult nvhost_gpu::SubmitGPFIFOImpl(IoctlSubmitGpfifo& params, std::span o return NvResult::Success; } -NvResult nvhost_gpu::SubmitGPFIFOBase1(std::span input, std::span output, - bool kickoff) { +NvResult nvhost_gpu::SubmitGPFIFOBase1(std::span input, bool kickoff) { if (input.size() < sizeof(IoctlSubmitGpfifo)) { UNIMPLEMENTED(); return NvResult::InvalidSize; @@ -290,11 +288,11 @@ NvResult nvhost_gpu::SubmitGPFIFOBase1(std::span input, std::span params.num_entries * sizeof(Tegra::CommandListHeader)); } - return SubmitGPFIFOImpl(params, output, std::move(entries)); + return SubmitGPFIFOImpl(params, std::move(entries)); } -NvResult nvhost_gpu::SubmitGPFIFOBase2(std::span input, std::span input_inline, - std::span output) { +NvResult nvhost_gpu::SubmitGPFIFOBase2(std::span input, + std::span input_inline) { if (input.size() < sizeof(IoctlSubmitGpfifo)) { UNIMPLEMENTED(); return NvResult::InvalidSize; @@ -303,7 +301,7 @@ NvResult nvhost_gpu::SubmitGPFIFOBase2(std::span input, std::span output, - Tegra::CommandList&& entries); - NvResult SubmitGPFIFOBase1(std::span input, std::span output, - bool kickoff = false); - NvResult SubmitGPFIFOBase2(std::span input, std::span input_inline, - std::span output); + NvResult SubmitGPFIFOImpl(IoctlSubmitGpfifo& params, Tegra::CommandList&& entries); + NvResult SubmitGPFIFOBase1(std::span input, bool kickoff = false); + NvResult SubmitGPFIFOBase2(std::span input, std::span input_inline); NvResult GetWaitbase(IoctlGetWaitbase& params); NvResult ChannelSetTimeout(IoctlChannelSetTimeout& params); diff --git a/src/core/hle/service/nvdrv/devices/nvhost_nvdec_common.cpp b/src/core/hle/service/nvdrv/devices/nvhost_nvdec_common.cpp index 51659934b7..3fdf383f0e 100644 --- a/src/core/hle/service/nvdrv/devices/nvhost_nvdec_common.cpp +++ b/src/core/hle/service/nvdrv/devices/nvhost_nvdec_common.cpp @@ -29,6 +29,9 @@ std::size_t SliceVectors(std::span input, std::vector& dst, std::si return 0; } const size_t bytes_copied = count * sizeof(T); + if (input.size() < offset + bytes_copied) { + return 0; + } std::memcpy(dst.data(), input.data() + offset, bytes_copied); return bytes_copied; } @@ -41,6 +44,9 @@ std::size_t WriteVectors(std::span dst, const std::vector& src, std::size return 0; } const size_t bytes_copied = src.size() * sizeof(T); + if (dst.size() < offset + bytes_copied) { + return 0; + } std::memcpy(dst.data() + offset, src.data(), bytes_copied); return bytes_copied; } @@ -71,6 +77,10 @@ NvResult nvhost_nvdec_common::SetNVMAPfd(IoctlSetNvmapFD& params) { } NvResult nvhost_nvdec_common::Submit(DeviceFD fd, std::span input, std::span output) { + if (input.size() < sizeof(IoctlSubmit) || output.size() < sizeof(IoctlSubmit)) { + UNIMPLEMENTED(); + return NvResult::InvalidSize; + } IoctlSubmit params{}; std::memcpy(¶ms, input.data(), std::min(input.size(), sizeof(IoctlSubmit))); LOG_DEBUG(Service_NVDRV, "called NVDEC Submit, cmd_buffer_count={}", params.cmd_buffer_count); From 723df0f3685f01ce5a0330d567932136a9de7a8f Mon Sep 17 00:00:00 2001 From: Liam Date: Wed, 25 Oct 2023 00:34:40 -0400 Subject: [PATCH 026/154] nvdrv: rework to remove memcpy --- .../nvdrv/devices/ioctl_serialization.h | 180 +++++++++++------- src/core/hle/service/nvdrv/devices/nvdevice.h | 12 -- .../service/nvdrv/devices/nvhost_as_gpu.cpp | 26 +-- .../hle/service/nvdrv/devices/nvhost_as_gpu.h | 2 +- .../hle/service/nvdrv/devices/nvhost_ctrl.cpp | 16 +- .../hle/service/nvdrv/devices/nvhost_ctrl.h | 11 +- .../service/nvdrv/devices/nvhost_ctrl_gpu.cpp | 41 ++-- .../service/nvdrv/devices/nvhost_ctrl_gpu.h | 5 +- .../hle/service/nvdrv/devices/nvhost_gpu.cpp | 52 ++--- .../hle/service/nvdrv/devices/nvhost_gpu.h | 6 +- .../service/nvdrv/devices/nvhost_nvdec.cpp | 14 +- .../nvdrv/devices/nvhost_nvdec_common.cpp | 71 +++---- .../nvdrv/devices/nvhost_nvdec_common.h | 6 +- .../service/nvdrv/devices/nvhost_nvjpg.cpp | 2 +- .../hle/service/nvdrv/devices/nvhost_vic.cpp | 12 +- src/core/hle/service/nvdrv/devices/nvmap.cpp | 12 +- 16 files changed, 243 insertions(+), 225 deletions(-) diff --git a/src/core/hle/service/nvdrv/devices/ioctl_serialization.h b/src/core/hle/service/nvdrv/devices/ioctl_serialization.h index c560974f1c..b12bcd1384 100644 --- a/src/core/hle/service/nvdrv/devices/ioctl_serialization.h +++ b/src/core/hle/service/nvdrv/devices/ioctl_serialization.h @@ -11,97 +11,149 @@ namespace Service::Nvidia::Devices { -struct Ioctl1Traits { - template - static T GetClassImpl(R (T::*)(A)); - - template - static A GetArgImpl(R (T::*)(A)); +struct IoctlOneArgTraits { + template + static A GetFirstArgImpl(R (T::*)(A, B...)); }; -struct Ioctl23Traits { - template - static T GetClassImpl(R (T::*)(A, B)); +struct IoctlTwoArgTraits { + template + static A GetFirstArgImpl(R (T::*)(A, B, C...)); - template - static A GetArgImpl(R (T::*)(A, B)); + template + static B GetSecondArgImpl(R (T::*)(A, B, C...)); }; -template -struct ContainerType { - using ValueType = T; -}; +struct Null {}; -template -struct ContainerType { - using ValueType = T::value_type; -}; +// clang-format off -template -NvResult Wrap(std::span input, std::span output, Self* self, F&& callable, - Rest&&... rest) { - using Arg = ContainerType::ValueType; - constexpr bool ArgumentIsContainer = Common::IsContiguousContainer; +template +NvResult WrapGeneric(F&& callable, std::span input, std::span inline_input, std::span output, std::span inline_output) { + constexpr bool HasFixedArg = !std::is_same_v; + constexpr bool HasVarArg = !std::is_same_v; + constexpr bool HasInlInVarArg = !std::is_same_v; + constexpr bool HasInlOutVarArg = !std::is_same_v; - // Verify that the input and output sizes are valid. - const size_t in_params = input.size() / sizeof(Arg); - const size_t out_params = output.size() / sizeof(Arg); - if (in_params * sizeof(Arg) != input.size()) { - return NvResult::InvalidSize; - } - if (out_params * sizeof(Arg) != output.size()) { - return NvResult::InvalidSize; - } - if (in_params == 0 && out_params == 0 && !ArgumentIsContainer) { - return NvResult::InvalidSize; + // Declare the fixed-size input value. + FixedArg fixed{}; + size_t var_offset = 0; + + if constexpr (HasFixedArg) { + // Read the fixed-size input value. + var_offset = std::min(sizeof(FixedArg), input.size()); + if (var_offset > 0) { + std::memcpy(&fixed, input.data(), var_offset); + } } - // Copy inputs, if needed. - std::vector params(std::max(in_params, out_params)); - if (in_params > 0) { - std::memcpy(params.data(), input.data(), input.size()); + // Read the variable-sized inputs. + const size_t num_var_args = HasVarArg ? ((input.size() - var_offset) / sizeof(VarArg)) : 0; + std::vector var_args(num_var_args); + if constexpr (HasVarArg) { + if (num_var_args > 0) { + std::memcpy(var_args.data(), input.data() + var_offset, num_var_args * sizeof(VarArg)); + } } + const size_t num_inl_in_var_args = HasInlInVarArg ? (inline_input.size() / sizeof(InlInVarArg)) : 0; + std::vector inl_in_var_args(num_inl_in_var_args); + if constexpr (HasInlInVarArg) { + if (num_inl_in_var_args > 0) { + std::memcpy(inl_in_var_args.data(), inline_input.data(), num_inl_in_var_args * sizeof(InlInVarArg)); + } + } + + // Construct inline output data. + const size_t num_inl_out_var_args = HasInlOutVarArg ? (inline_output.size() / sizeof(InlOutVarArg)) : 0; + std::vector inl_out_var_args(num_inl_out_var_args); + // Perform the call. - NvResult result; - if constexpr (ArgumentIsContainer) { - result = (self->*callable)(params, std::forward(rest)...); - } else { - result = (self->*callable)(params.front(), std::forward(rest)...); + NvResult result = callable(fixed, var_args, inl_in_var_args, inl_out_var_args); + + // Copy outputs. + if constexpr (HasFixedArg) { + if (output.size() > 0) { + std::memcpy(output.data(), &fixed, std::min(output.size(), sizeof(FixedArg))); + } } - // Copy outputs, if needed. - if (out_params > 0) { - std::memcpy(output.data(), params.data(), output.size()); + if constexpr (HasVarArg) { + if (num_var_args > 0 && output.size() > var_offset) { + const size_t max_var_size = output.size() - var_offset; + std::memcpy(output.data() + var_offset, var_args.data(), std::min(max_var_size, num_var_args * sizeof(VarArg))); + } } + // Copy inline outputs. + if constexpr (HasInlOutVarArg) { + if (num_inl_out_var_args > 0) { + std::memcpy(inline_output.data(), inl_out_var_args.data(), num_inl_out_var_args * sizeof(InlOutVarArg)); + } + } + + // We're done. return result; } -template -NvResult nvdevice::Wrap1(F&& callable, std::span input, std::span output) { - using Self = decltype(Ioctl1Traits::GetClassImpl(callable)); - using InnerArg = std::remove_reference_t; +template +NvResult WrapFixed(Self* self, F&& callable, std::span input, std::span output, Rest&&... rest) { + using FixedArg = typename std::remove_reference_t; - return Wrap(input, output, static_cast(this), callable); + const auto Callable = [&](auto& fixed, auto& var, auto& inl_in, auto& inl_out) -> NvResult { + return (self->*callable)(fixed, std::forward(rest)...); + }; + + return WrapGeneric(std::move(Callable), input, {}, output, {}); } -template -NvResult nvdevice::Wrap2(F&& callable, std::span input, std::span inline_input, - std::span output) { - using Self = decltype(Ioctl23Traits::GetClassImpl(callable)); - using InnerArg = std::remove_reference_t; +template +NvResult WrapFixedInlOut(Self* self, F&& callable, std::span input, std::span output, std::span inline_output, Rest&&... rest) { + using FixedArg = typename std::remove_reference_t; + using InlOutVarArg = typename std::remove_reference_t::value_type; - return Wrap(input, output, static_cast(this), callable, inline_input); + const auto Callable = [&](auto& fixed, auto& var, auto& inl_in, auto& inl_out) -> NvResult { + return (self->*callable)(fixed, inl_out, std::forward(rest)...); + }; + + return WrapGeneric(std::move(Callable), input, {}, output, inline_output); } -template -NvResult nvdevice::Wrap3(F&& callable, std::span input, std::span output, - std::span inline_output) { - using Self = decltype(Ioctl23Traits::GetClassImpl(callable)); - using InnerArg = std::remove_reference_t; +template +NvResult WrapVariable(Self* self, F&& callable, std::span input, std::span output, Rest&&... rest) { + using VarArg = typename std::remove_reference_t::value_type; - return Wrap(input, output, static_cast(this), callable, inline_output); + const auto Callable = [&](auto& fixed, auto& var, auto& inl_in, auto& inl_out) -> NvResult { + return (self->*callable)(var, std::forward(rest)...); + }; + + return WrapGeneric(std::move(Callable), input, {}, output, {}); } +template +NvResult WrapFixedVariable(Self* self, F&& callable, std::span input, std::span output, Rest&&... rest) { + using FixedArg = typename std::remove_reference_t; + using VarArg = typename std::remove_reference_t::value_type; + + const auto Callable = [&](auto& fixed, auto& var, auto& inl_in, auto& inl_out) -> NvResult { + return (self->*callable)(fixed, var, std::forward(rest)...); + }; + + return WrapGeneric(std::move(Callable), input, {}, output, {}); +} + +template +NvResult WrapFixedInlIn(Self* self, F&& callable, std::span input, std::span inline_input, std::span output, Rest&&... rest) { + using FixedArg = typename std::remove_reference_t; + using InlInVarArg = typename std::remove_reference_t::value_type; + + const auto Callable = [&](auto& fixed, auto& var, auto& inl_in, auto& inl_out) -> NvResult { + return (self->*callable)(fixed, inl_in, std::forward(rest)...); + }; + + return WrapGeneric(std::move(Callable), input, inline_input, output, {}); +} + +// clang-format on + } // namespace Service::Nvidia::Devices diff --git a/src/core/hle/service/nvdrv/devices/nvdevice.h b/src/core/hle/service/nvdrv/devices/nvdevice.h index af766f320d..a04538d5d0 100644 --- a/src/core/hle/service/nvdrv/devices/nvdevice.h +++ b/src/core/hle/service/nvdrv/devices/nvdevice.h @@ -74,18 +74,6 @@ public: return nullptr; } -protected: - template - NvResult Wrap1(F&& callable, std::span input, std::span output); - - template - NvResult Wrap2(F&& callable, std::span input, std::span inline_input, - std::span output); - - template - NvResult Wrap3(F&& callable, std::span input, std::span output, - std::span inline_output); - protected: Core::System& system; }; diff --git a/src/core/hle/service/nvdrv/devices/nvhost_as_gpu.cpp b/src/core/hle/service/nvdrv/devices/nvhost_as_gpu.cpp index 4840010713..6b36390087 100644 --- a/src/core/hle/service/nvdrv/devices/nvhost_as_gpu.cpp +++ b/src/core/hle/service/nvdrv/devices/nvhost_as_gpu.cpp @@ -34,21 +34,21 @@ NvResult nvhost_as_gpu::Ioctl1(DeviceFD fd, Ioctl command, std::span i case 'A': switch (command.cmd) { case 0x1: - return Wrap1(&nvhost_as_gpu::BindChannel, input, output); + return WrapFixed(this, &nvhost_as_gpu::BindChannel, input, output); case 0x2: - return Wrap1(&nvhost_as_gpu::AllocateSpace, input, output); + return WrapFixed(this, &nvhost_as_gpu::AllocateSpace, input, output); case 0x3: - return Wrap1(&nvhost_as_gpu::FreeSpace, input, output); + return WrapFixed(this, &nvhost_as_gpu::FreeSpace, input, output); case 0x5: - return Wrap1(&nvhost_as_gpu::UnmapBuffer, input, output); + return WrapFixed(this, &nvhost_as_gpu::UnmapBuffer, input, output); case 0x6: - return Wrap1(&nvhost_as_gpu::MapBufferEx, input, output); + return WrapFixed(this, &nvhost_as_gpu::MapBufferEx, input, output); case 0x8: - return Wrap1(&nvhost_as_gpu::GetVARegions1, input, output); + return WrapFixed(this, &nvhost_as_gpu::GetVARegions1, input, output); case 0x9: - return Wrap1(&nvhost_as_gpu::AllocAsEx, input, output); + return WrapFixed(this, &nvhost_as_gpu::AllocAsEx, input, output); case 0x14: - return Wrap1(&nvhost_as_gpu::Remap, input, output); + return WrapVariable(this, &nvhost_as_gpu::Remap, input, output); default: break; } @@ -73,7 +73,8 @@ NvResult nvhost_as_gpu::Ioctl3(DeviceFD fd, Ioctl command, std::span i case 'A': switch (command.cmd) { case 0x8: - return Wrap3(&nvhost_as_gpu::GetVARegions3, input, output, inline_output); + return WrapFixedInlOut(this, &nvhost_as_gpu::GetVARegions3, input, output, + inline_output); default: break; } @@ -482,7 +483,7 @@ NvResult nvhost_as_gpu::GetVARegions1(IoctlGetVaRegions& params) { return NvResult::Success; } -NvResult nvhost_as_gpu::GetVARegions3(IoctlGetVaRegions& params, std::span inline_output) { +NvResult nvhost_as_gpu::GetVARegions3(IoctlGetVaRegions& params, std::span regions) { LOG_DEBUG(Service_NVDRV, "called, buf_addr={:X}, buf_size={:X}", params.buf_addr, params.buf_size); @@ -494,7 +495,10 @@ NvResult nvhost_as_gpu::GetVARegions3(IoctlGetVaRegions& params, std::span i GetVARegionsImpl(params); - std::memcpy(inline_output.data(), params.regions.data(), 2 * sizeof(VaRegion)); + const size_t num_regions = std::min(params.regions.size(), regions.size()); + for (size_t i = 0; i < num_regions; i++) { + regions[i] = params.regions[i]; + } return NvResult::Success; } diff --git a/src/core/hle/service/nvdrv/devices/nvhost_as_gpu.h b/src/core/hle/service/nvdrv/devices/nvhost_as_gpu.h index bc041f2156..932997e75f 100644 --- a/src/core/hle/service/nvdrv/devices/nvhost_as_gpu.h +++ b/src/core/hle/service/nvdrv/devices/nvhost_as_gpu.h @@ -149,7 +149,7 @@ private: void GetVARegionsImpl(IoctlGetVaRegions& params); NvResult GetVARegions1(IoctlGetVaRegions& params); - NvResult GetVARegions3(IoctlGetVaRegions& params, std::span inline_output); + NvResult GetVARegions3(IoctlGetVaRegions& params, std::span regions); void FreeMappingLocked(u64 offset); diff --git a/src/core/hle/service/nvdrv/devices/nvhost_ctrl.cpp b/src/core/hle/service/nvdrv/devices/nvhost_ctrl.cpp index 8cefff6d11..b8dd34e24f 100644 --- a/src/core/hle/service/nvdrv/devices/nvhost_ctrl.cpp +++ b/src/core/hle/service/nvdrv/devices/nvhost_ctrl.cpp @@ -41,19 +41,19 @@ NvResult nvhost_ctrl::Ioctl1(DeviceFD fd, Ioctl command, std::span inp case 0x0: switch (command.cmd) { case 0x1b: - return Wrap1(&nvhost_ctrl::NvOsGetConfigU32, input, output); + return WrapFixed(this, &nvhost_ctrl::NvOsGetConfigU32, input, output); case 0x1c: - return Wrap1(&nvhost_ctrl::IocCtrlClearEventWait, input, output); + return WrapFixed(this, &nvhost_ctrl::IocCtrlClearEventWait, input, output); case 0x1d: - return Wrap1(&nvhost_ctrl::IocCtrlEventWaitWithAllocation, input, output); + return WrapFixed(this, &nvhost_ctrl::IocCtrlEventWait, input, output, true); case 0x1e: - return Wrap1(&nvhost_ctrl::IocCtrlEventWaitNotAllocation, input, output); + return WrapFixed(this, &nvhost_ctrl::IocCtrlEventWait, input, output, false); case 0x1f: - return Wrap1(&nvhost_ctrl::IocCtrlEventRegister, input, output); + return WrapFixed(this, &nvhost_ctrl::IocCtrlEventRegister, input, output); case 0x20: - return Wrap1(&nvhost_ctrl::IocCtrlEventUnregister, input, output); + return WrapFixed(this, &nvhost_ctrl::IocCtrlEventUnregister, input, output); case 0x21: - return Wrap1(&nvhost_ctrl::IocCtrlEventUnregisterBatch, input, output); + return WrapFixed(this, &nvhost_ctrl::IocCtrlEventUnregisterBatch, input, output); } break; default: @@ -86,7 +86,7 @@ NvResult nvhost_ctrl::NvOsGetConfigU32(IocGetConfigParams& params) { return NvResult::ConfigVarNotFound; // Returns error on production mode } -NvResult nvhost_ctrl::IocCtrlEventWaitImpl(IocCtrlEventWaitParams& params, bool is_allocation) { +NvResult nvhost_ctrl::IocCtrlEventWait(IocCtrlEventWaitParams& params, bool is_allocation) { LOG_DEBUG(Service_NVDRV, "syncpt_id={}, threshold={}, timeout={}, is_allocation={}", params.fence.id, params.fence.value, params.timeout, is_allocation); diff --git a/src/core/hle/service/nvdrv/devices/nvhost_ctrl.h b/src/core/hle/service/nvdrv/devices/nvhost_ctrl.h index 6913c61acc..992124b600 100644 --- a/src/core/hle/service/nvdrv/devices/nvhost_ctrl.h +++ b/src/core/hle/service/nvdrv/devices/nvhost_ctrl.h @@ -190,20 +190,11 @@ private: NvResult IocCtrlEventRegister(IocCtrlEventRegisterParams& params); NvResult IocCtrlEventUnregister(IocCtrlEventUnregisterParams& params); NvResult IocCtrlEventUnregisterBatch(IocCtrlEventUnregisterBatchParams& params); + NvResult IocCtrlEventWait(IocCtrlEventWaitParams& params, bool is_allocation); NvResult IocCtrlClearEventWait(IocCtrlEventClearParams& params); NvResult FreeEvent(u32 slot); - // TODO: these are not the correct names - NvResult IocCtrlEventWaitNotAllocation(IocCtrlEventWaitParams& params) { - return this->IocCtrlEventWaitImpl(params, false); - } - NvResult IocCtrlEventWaitWithAllocation(IocCtrlEventWaitParams& params) { - return this->IocCtrlEventWaitImpl(params, true); - } - - NvResult IocCtrlEventWaitImpl(IocCtrlEventWaitParams& params, bool is_allocation); - EventInterface& events_interface; NvCore::Container& core; NvCore::SyncpointManager& syncpoint_manager; diff --git a/src/core/hle/service/nvdrv/devices/nvhost_ctrl_gpu.cpp b/src/core/hle/service/nvdrv/devices/nvhost_ctrl_gpu.cpp index 92e677b3dc..61a2df1216 100644 --- a/src/core/hle/service/nvdrv/devices/nvhost_ctrl_gpu.cpp +++ b/src/core/hle/service/nvdrv/devices/nvhost_ctrl_gpu.cpp @@ -28,23 +28,23 @@ NvResult nvhost_ctrl_gpu::Ioctl1(DeviceFD fd, Ioctl command, std::span case 'G': switch (command.cmd) { case 0x1: - return Wrap1(&nvhost_ctrl_gpu::ZCullGetCtxSize, input, output); + return WrapFixed(this, &nvhost_ctrl_gpu::ZCullGetCtxSize, input, output); case 0x2: - return Wrap1(&nvhost_ctrl_gpu::ZCullGetInfo, input, output); + return WrapFixed(this, &nvhost_ctrl_gpu::ZCullGetInfo, input, output); case 0x3: - return Wrap1(&nvhost_ctrl_gpu::ZBCSetTable, input, output); + return WrapFixed(this, &nvhost_ctrl_gpu::ZBCSetTable, input, output); case 0x4: - return Wrap1(&nvhost_ctrl_gpu::ZBCQueryTable, input, output); + return WrapFixed(this, &nvhost_ctrl_gpu::ZBCQueryTable, input, output); case 0x5: - return Wrap1(&nvhost_ctrl_gpu::GetCharacteristics1, input, output); + return WrapFixed(this, &nvhost_ctrl_gpu::GetCharacteristics1, input, output); case 0x6: - return Wrap1(&nvhost_ctrl_gpu::GetTPCMasks1, input, output); + return WrapFixed(this, &nvhost_ctrl_gpu::GetTPCMasks1, input, output); case 0x7: - return Wrap1(&nvhost_ctrl_gpu::FlushL2, input, output); + return WrapFixed(this, &nvhost_ctrl_gpu::FlushL2, input, output); case 0x14: - return Wrap1(&nvhost_ctrl_gpu::GetActiveSlotMask, input, output); + return WrapFixed(this, &nvhost_ctrl_gpu::GetActiveSlotMask, input, output); case 0x1c: - return Wrap1(&nvhost_ctrl_gpu::GetGpuTime, input, output); + return WrapFixed(this, &nvhost_ctrl_gpu::GetGpuTime, input, output); default: break; } @@ -66,9 +66,11 @@ NvResult nvhost_ctrl_gpu::Ioctl3(DeviceFD fd, Ioctl command, std::span case 'G': switch (command.cmd) { case 0x5: - return Wrap3(&nvhost_ctrl_gpu::GetCharacteristics3, input, output, inline_output); + return WrapFixedInlOut(this, &nvhost_ctrl_gpu::GetCharacteristics3, input, output, + inline_output); case 0x6: - return Wrap3(&nvhost_ctrl_gpu::GetTPCMasks3, input, output, inline_output); + return WrapFixedInlOut(this, &nvhost_ctrl_gpu::GetTPCMasks3, input, output, + inline_output); default: break; } @@ -125,8 +127,8 @@ NvResult nvhost_ctrl_gpu::GetCharacteristics1(IoctlCharacteristics& params) { return NvResult::Success; } -NvResult nvhost_ctrl_gpu::GetCharacteristics3(IoctlCharacteristics& params, - std::span inline_output) { +NvResult nvhost_ctrl_gpu::GetCharacteristics3( + IoctlCharacteristics& params, std::span gpu_characteristics) { LOG_DEBUG(Service_NVDRV, "called"); params.gc.arch = 0x120; @@ -166,8 +168,9 @@ NvResult nvhost_ctrl_gpu::GetCharacteristics3(IoctlCharacteristics& params, params.gc.gr_compbit_store_base_hw = 0x0; params.gpu_characteristics_buf_size = 0xA0; params.gpu_characteristics_buf_addr = 0xdeadbeef; // Cannot be 0 (UNUSED) - std::memcpy(inline_output.data(), ¶ms.gc, - std::min(sizeof(params.gc), inline_output.size())); + if (!gpu_characteristics.empty()) { + gpu_characteristics.front() = params.gc; + } return NvResult::Success; } @@ -179,14 +182,14 @@ NvResult nvhost_ctrl_gpu::GetTPCMasks1(IoctlGpuGetTpcMasksArgs& params) { return NvResult::Success; } -NvResult nvhost_ctrl_gpu::GetTPCMasks3(IoctlGpuGetTpcMasksArgs& params, - std::span inline_output) { +NvResult nvhost_ctrl_gpu::GetTPCMasks3(IoctlGpuGetTpcMasksArgs& params, std::span tpc_mask) { LOG_DEBUG(Service_NVDRV, "called, mask_buffer_size=0x{:X}", params.mask_buffer_size); if (params.mask_buffer_size != 0) { params.tcp_mask = 3; } - std::memcpy(inline_output.data(), ¶ms.tcp_mask, - std::min(sizeof(params.tcp_mask), inline_output.size())); + if (!tpc_mask.empty()) { + tpc_mask.front() = params.tcp_mask; + } return NvResult::Success; } diff --git a/src/core/hle/service/nvdrv/devices/nvhost_ctrl_gpu.h b/src/core/hle/service/nvdrv/devices/nvhost_ctrl_gpu.h index e1977a6b52..d170299bdc 100644 --- a/src/core/hle/service/nvdrv/devices/nvhost_ctrl_gpu.h +++ b/src/core/hle/service/nvdrv/devices/nvhost_ctrl_gpu.h @@ -152,10 +152,11 @@ private: static_assert(sizeof(IoctlGetGpuTime) == 0x10, "IoctlGetGpuTime is incorrect size"); NvResult GetCharacteristics1(IoctlCharacteristics& params); - NvResult GetCharacteristics3(IoctlCharacteristics& params, std::span inline_output); + NvResult GetCharacteristics3(IoctlCharacteristics& params, + std::span gpu_characteristics); NvResult GetTPCMasks1(IoctlGpuGetTpcMasksArgs& params); - NvResult GetTPCMasks3(IoctlGpuGetTpcMasksArgs& params, std::span inline_output); + NvResult GetTPCMasks3(IoctlGpuGetTpcMasksArgs& params, std::span tpc_mask); NvResult GetActiveSlotMask(IoctlActiveSlotMask& params); NvResult ZCullGetCtxSize(IoctlZcullGetCtxSize& params); diff --git a/src/core/hle/service/nvdrv/devices/nvhost_gpu.cpp b/src/core/hle/service/nvdrv/devices/nvhost_gpu.cpp index 2d67acc6ad..b0395c2f02 100644 --- a/src/core/hle/service/nvdrv/devices/nvhost_gpu.cpp +++ b/src/core/hle/service/nvdrv/devices/nvhost_gpu.cpp @@ -53,7 +53,7 @@ NvResult nvhost_gpu::Ioctl1(DeviceFD fd, Ioctl command, std::span inpu case 0x0: switch (command.cmd) { case 0x3: - return Wrap1(&nvhost_gpu::GetWaitbase, input, output); + return WrapFixed(this, &nvhost_gpu::GetWaitbase, input, output); default: break; } @@ -61,25 +61,25 @@ NvResult nvhost_gpu::Ioctl1(DeviceFD fd, Ioctl command, std::span inpu case 'H': switch (command.cmd) { case 0x1: - return Wrap1(&nvhost_gpu::SetNVMAPfd, input, output); + return WrapFixed(this, &nvhost_gpu::SetNVMAPfd, input, output); case 0x3: - return Wrap1(&nvhost_gpu::ChannelSetTimeout, input, output); + return WrapFixed(this, &nvhost_gpu::ChannelSetTimeout, input, output); case 0x8: - return SubmitGPFIFOBase1(input, false); + return WrapFixedVariable(this, &nvhost_gpu::SubmitGPFIFOBase1, input, output, false); case 0x9: - return Wrap1(&nvhost_gpu::AllocateObjectContext, input, output); + return WrapFixed(this, &nvhost_gpu::AllocateObjectContext, input, output); case 0xb: - return Wrap1(&nvhost_gpu::ZCullBind, input, output); + return WrapFixed(this, &nvhost_gpu::ZCullBind, input, output); case 0xc: - return Wrap1(&nvhost_gpu::SetErrorNotifier, input, output); + return WrapFixed(this, &nvhost_gpu::SetErrorNotifier, input, output); case 0xd: - return Wrap1(&nvhost_gpu::SetChannelPriority, input, output); + return WrapFixed(this, &nvhost_gpu::SetChannelPriority, input, output); case 0x1a: - return Wrap1(&nvhost_gpu::AllocGPFIFOEx2, input, output); + return WrapFixed(this, &nvhost_gpu::AllocGPFIFOEx2, input, output); case 0x1b: - return SubmitGPFIFOBase1(input, true); + return WrapFixedVariable(this, &nvhost_gpu::SubmitGPFIFOBase1, input, output, true); case 0x1d: - return Wrap1(&nvhost_gpu::ChannelSetTimeslice, input, output); + return WrapFixed(this, &nvhost_gpu::ChannelSetTimeslice, input, output); default: break; } @@ -87,9 +87,9 @@ NvResult nvhost_gpu::Ioctl1(DeviceFD fd, Ioctl command, std::span inpu case 'G': switch (command.cmd) { case 0x14: - return Wrap1(&nvhost_gpu::SetClientData, input, output); + return WrapFixed(this, &nvhost_gpu::SetClientData, input, output); case 0x15: - return Wrap1(&nvhost_gpu::GetClientData, input, output); + return WrapFixed(this, &nvhost_gpu::GetClientData, input, output); default: break; } @@ -105,7 +105,8 @@ NvResult nvhost_gpu::Ioctl2(DeviceFD fd, Ioctl command, std::span inpu case 'H': switch (command.cmd) { case 0x1b: - return SubmitGPFIFOBase2(input, inline_input); + return WrapFixedInlIn(this, &nvhost_gpu::SubmitGPFIFOBase2, input, inline_input, + output); } break; } @@ -271,36 +272,35 @@ NvResult nvhost_gpu::SubmitGPFIFOImpl(IoctlSubmitGpfifo& params, Tegra::CommandL return NvResult::Success; } -NvResult nvhost_gpu::SubmitGPFIFOBase1(std::span input, bool kickoff) { - if (input.size() < sizeof(IoctlSubmitGpfifo)) { +NvResult nvhost_gpu::SubmitGPFIFOBase1(IoctlSubmitGpfifo& params, + std::span commands, bool kickoff) { + if (params.num_entries > commands.size()) { UNIMPLEMENTED(); return NvResult::InvalidSize; } - IoctlSubmitGpfifo params{}; - std::memcpy(¶ms, input.data(), sizeof(IoctlSubmitGpfifo)); - Tegra::CommandList entries(params.num_entries); + Tegra::CommandList entries(params.num_entries); if (kickoff) { system.ApplicationMemory().ReadBlock(params.address, entries.command_lists.data(), params.num_entries * sizeof(Tegra::CommandListHeader)); } else { - std::memcpy(entries.command_lists.data(), &input[sizeof(IoctlSubmitGpfifo)], + std::memcpy(entries.command_lists.data(), commands.data(), params.num_entries * sizeof(Tegra::CommandListHeader)); } return SubmitGPFIFOImpl(params, std::move(entries)); } -NvResult nvhost_gpu::SubmitGPFIFOBase2(std::span input, - std::span input_inline) { - if (input.size() < sizeof(IoctlSubmitGpfifo)) { +NvResult nvhost_gpu::SubmitGPFIFOBase2(IoctlSubmitGpfifo& params, + std::span commands) { + if (params.num_entries > commands.size()) { UNIMPLEMENTED(); return NvResult::InvalidSize; } - IoctlSubmitGpfifo params{}; - std::memcpy(¶ms, input.data(), sizeof(IoctlSubmitGpfifo)); + Tegra::CommandList entries(params.num_entries); - std::memcpy(entries.command_lists.data(), input_inline.data(), input_inline.size()); + std::memcpy(entries.command_lists.data(), commands.data(), + params.num_entries * sizeof(Tegra::CommandListHeader)); return SubmitGPFIFOImpl(params, std::move(entries)); } diff --git a/src/core/hle/service/nvdrv/devices/nvhost_gpu.h b/src/core/hle/service/nvdrv/devices/nvhost_gpu.h index 703079a54c..88fd228ffe 100644 --- a/src/core/hle/service/nvdrv/devices/nvhost_gpu.h +++ b/src/core/hle/service/nvdrv/devices/nvhost_gpu.h @@ -196,8 +196,10 @@ private: NvResult AllocateObjectContext(IoctlAllocObjCtx& params); NvResult SubmitGPFIFOImpl(IoctlSubmitGpfifo& params, Tegra::CommandList&& entries); - NvResult SubmitGPFIFOBase1(std::span input, bool kickoff = false); - NvResult SubmitGPFIFOBase2(std::span input, std::span input_inline); + NvResult SubmitGPFIFOBase1(IoctlSubmitGpfifo& params, + std::span commands, bool kickoff = false); + NvResult SubmitGPFIFOBase2(IoctlSubmitGpfifo& params, + std::span commands); NvResult GetWaitbase(IoctlGetWaitbase& params); NvResult ChannelSetTimeout(IoctlChannelSetTimeout& params); diff --git a/src/core/hle/service/nvdrv/devices/nvhost_nvdec.cpp b/src/core/hle/service/nvdrv/devices/nvhost_nvdec.cpp index 74790a7d8a..f43914e1b6 100644 --- a/src/core/hle/service/nvdrv/devices/nvhost_nvdec.cpp +++ b/src/core/hle/service/nvdrv/devices/nvhost_nvdec.cpp @@ -26,18 +26,18 @@ NvResult nvhost_nvdec::Ioctl1(DeviceFD fd, Ioctl command, std::span in if (!host1x_file.fd_to_id.contains(fd)) { host1x_file.fd_to_id[fd] = host1x_file.nvdec_next_id++; } - return Submit(fd, input, output); + return WrapFixedVariable(this, &nvhost_nvdec::Submit, input, output, fd); } case 0x2: - return Wrap1(&nvhost_nvdec::GetSyncpoint, input, output); + return WrapFixed(this, &nvhost_nvdec::GetSyncpoint, input, output); case 0x3: - return Wrap1(&nvhost_nvdec::GetWaitbase, input, output); + return WrapFixed(this, &nvhost_nvdec::GetWaitbase, input, output); case 0x7: - return Wrap1(&nvhost_nvdec::SetSubmitTimeout, input, output); + return WrapFixed(this, &nvhost_nvdec::SetSubmitTimeout, input, output); case 0x9: - return MapBuffer(input, output); + return WrapFixedVariable(this, &nvhost_nvdec::MapBuffer, input, output); case 0xa: - return UnmapBuffer(input, output); + return WrapFixedVariable(this, &nvhost_nvdec::UnmapBuffer, input, output); default: break; } @@ -45,7 +45,7 @@ NvResult nvhost_nvdec::Ioctl1(DeviceFD fd, Ioctl command, std::span in case 'H': switch (command.cmd) { case 0x1: - return Wrap1(&nvhost_nvdec::SetNVMAPfd, input, output); + return WrapFixed(this, &nvhost_nvdec::SetNVMAPfd, input, output); default: break; } diff --git a/src/core/hle/service/nvdrv/devices/nvhost_nvdec_common.cpp b/src/core/hle/service/nvdrv/devices/nvhost_nvdec_common.cpp index 3fdf383f0e..74c701b957 100644 --- a/src/core/hle/service/nvdrv/devices/nvhost_nvdec_common.cpp +++ b/src/core/hle/service/nvdrv/devices/nvhost_nvdec_common.cpp @@ -76,13 +76,7 @@ NvResult nvhost_nvdec_common::SetNVMAPfd(IoctlSetNvmapFD& params) { return NvResult::Success; } -NvResult nvhost_nvdec_common::Submit(DeviceFD fd, std::span input, std::span output) { - if (input.size() < sizeof(IoctlSubmit) || output.size() < sizeof(IoctlSubmit)) { - UNIMPLEMENTED(); - return NvResult::InvalidSize; - } - IoctlSubmit params{}; - std::memcpy(¶ms, input.data(), std::min(input.size(), sizeof(IoctlSubmit))); +NvResult nvhost_nvdec_common::Submit(IoctlSubmit& params, std::span data, DeviceFD fd) { LOG_DEBUG(Service_NVDRV, "called NVDEC Submit, cmd_buffer_count={}", params.cmd_buffer_count); // Instantiate param buffers @@ -93,12 +87,12 @@ NvResult nvhost_nvdec_common::Submit(DeviceFD fd, std::span input, std std::vector fence_thresholds(params.fence_count); // Slice input into their respective buffers - std::size_t offset = sizeof(IoctlSubmit); - offset += SliceVectors(input, command_buffers, params.cmd_buffer_count, offset); - offset += SliceVectors(input, relocs, params.relocation_count, offset); - offset += SliceVectors(input, reloc_shifts, params.relocation_count, offset); - offset += SliceVectors(input, syncpt_increments, params.syncpoint_count, offset); - offset += SliceVectors(input, fence_thresholds, params.fence_count, offset); + std::size_t offset = 0; + offset += SliceVectors(data, command_buffers, params.cmd_buffer_count, offset); + offset += SliceVectors(data, relocs, params.relocation_count, offset); + offset += SliceVectors(data, reloc_shifts, params.relocation_count, offset); + offset += SliceVectors(data, syncpt_increments, params.syncpoint_count, offset); + offset += SliceVectors(data, fence_thresholds, params.fence_count, offset); auto& gpu = system.GPU(); if (gpu.UseNvdec()) { @@ -116,14 +110,13 @@ NvResult nvhost_nvdec_common::Submit(DeviceFD fd, std::span input, std cmdlist.size() * sizeof(u32)); gpu.PushCommandBuffer(core.Host1xDeviceFile().fd_to_id[fd], cmdlist); } - std::memcpy(output.data(), ¶ms, sizeof(IoctlSubmit)); // Some games expect command_buffers to be written back - offset = sizeof(IoctlSubmit); - offset += WriteVectors(output, command_buffers, offset); - offset += WriteVectors(output, relocs, offset); - offset += WriteVectors(output, reloc_shifts, offset); - offset += WriteVectors(output, syncpt_increments, offset); - offset += WriteVectors(output, fence_thresholds, offset); + offset = 0; + offset += WriteVectors(data, command_buffers, offset); + offset += WriteVectors(data, relocs, offset); + offset += WriteVectors(data, reloc_shifts, offset); + offset += WriteVectors(data, syncpt_increments, offset); + offset += WriteVectors(data, fence_thresholds, offset); return NvResult::Success; } @@ -140,40 +133,24 @@ NvResult nvhost_nvdec_common::GetWaitbase(IoctlGetWaitbase& params) { return NvResult::Success; } -NvResult nvhost_nvdec_common::MapBuffer(std::span input, std::span output) { - IoctlMapBuffer params{}; - std::memcpy(¶ms, input.data(), sizeof(IoctlMapBuffer)); - std::vector cmd_buffer_handles(params.num_entries); - - SliceVectors(input, cmd_buffer_handles, params.num_entries, sizeof(IoctlMapBuffer)); - - for (auto& cmd_buffer : cmd_buffer_handles) { - cmd_buffer.map_address = nvmap.PinHandle(cmd_buffer.map_handle); +NvResult nvhost_nvdec_common::MapBuffer(IoctlMapBuffer& params, std::span entries) { + const size_t num_entries = std::min(params.num_entries, static_cast(entries.size())); + for (size_t i = 0; i < num_entries; i++) { + entries[i].map_address = nvmap.PinHandle(entries[i].map_handle); } - if (output.size() < - sizeof(IoctlMapBuffer) + cmd_buffer_handles.size() * sizeof(MapBufferEntry)) { - return NvResult::InvalidSize; - } - - std::memcpy(output.data(), ¶ms, sizeof(IoctlMapBuffer)); - std::memcpy(output.data() + sizeof(IoctlMapBuffer), cmd_buffer_handles.data(), - cmd_buffer_handles.size() * sizeof(MapBufferEntry)); - return NvResult::Success; } -NvResult nvhost_nvdec_common::UnmapBuffer(std::span input, std::span output) { - IoctlMapBuffer params{}; - std::memcpy(¶ms, input.data(), std::min(input.size(), sizeof(IoctlMapBuffer))); - std::vector cmd_buffer_handles(params.num_entries); - - SliceVectors(input, cmd_buffer_handles, params.num_entries, sizeof(IoctlMapBuffer)); - for (auto& cmd_buffer : cmd_buffer_handles) { - nvmap.UnpinHandle(cmd_buffer.map_handle); +NvResult nvhost_nvdec_common::UnmapBuffer(IoctlMapBuffer& params, + std::span entries) { + const size_t num_entries = std::min(params.num_entries, static_cast(entries.size())); + for (size_t i = 0; i < num_entries; i++) { + nvmap.UnpinHandle(entries[i].map_handle); + entries[i] = {}; } - std::memset(output.data(), 0, output.size()); + params = {}; return NvResult::Success; } diff --git a/src/core/hle/service/nvdrv/devices/nvhost_nvdec_common.h b/src/core/hle/service/nvdrv/devices/nvhost_nvdec_common.h index cc988b897e..7ce748e18b 100644 --- a/src/core/hle/service/nvdrv/devices/nvhost_nvdec_common.h +++ b/src/core/hle/service/nvdrv/devices/nvhost_nvdec_common.h @@ -108,11 +108,11 @@ protected: /// Ioctl command implementations NvResult SetNVMAPfd(IoctlSetNvmapFD&); - NvResult Submit(DeviceFD fd, std::span input, std::span output); + NvResult Submit(IoctlSubmit& params, std::span input, DeviceFD fd); NvResult GetSyncpoint(IoctlGetSyncpoint& params); NvResult GetWaitbase(IoctlGetWaitbase& params); - NvResult MapBuffer(std::span input, std::span output); - NvResult UnmapBuffer(std::span input, std::span output); + NvResult MapBuffer(IoctlMapBuffer& params, std::span entries); + NvResult UnmapBuffer(IoctlMapBuffer& params, std::span entries); NvResult SetSubmitTimeout(u32 timeout); Kernel::KEvent* QueryEvent(u32 event_id) override; diff --git a/src/core/hle/service/nvdrv/devices/nvhost_nvjpg.cpp b/src/core/hle/service/nvdrv/devices/nvhost_nvjpg.cpp index 23a57c4d5c..9e6b864580 100644 --- a/src/core/hle/service/nvdrv/devices/nvhost_nvjpg.cpp +++ b/src/core/hle/service/nvdrv/devices/nvhost_nvjpg.cpp @@ -19,7 +19,7 @@ NvResult nvhost_nvjpg::Ioctl1(DeviceFD fd, Ioctl command, std::span in case 'H': switch (command.cmd) { case 0x1: - return Wrap1(&nvhost_nvjpg::SetNVMAPfd, input, output); + return WrapFixed(this, &nvhost_nvjpg::SetNVMAPfd, input, output); default: break; } diff --git a/src/core/hle/service/nvdrv/devices/nvhost_vic.cpp b/src/core/hle/service/nvdrv/devices/nvhost_vic.cpp index 20af758727..87f8d7c221 100644 --- a/src/core/hle/service/nvdrv/devices/nvhost_vic.cpp +++ b/src/core/hle/service/nvdrv/devices/nvhost_vic.cpp @@ -26,16 +26,16 @@ NvResult nvhost_vic::Ioctl1(DeviceFD fd, Ioctl command, std::span inpu if (!host1x_file.fd_to_id.contains(fd)) { host1x_file.fd_to_id[fd] = host1x_file.vic_next_id++; } - return Submit(fd, input, output); + return WrapFixedVariable(this, &nvhost_vic::Submit, input, output, fd); } case 0x2: - return Wrap1(&nvhost_vic::GetSyncpoint, input, output); + return WrapFixed(this, &nvhost_vic::GetSyncpoint, input, output); case 0x3: - return Wrap1(&nvhost_vic::GetWaitbase, input, output); + return WrapFixed(this, &nvhost_vic::GetWaitbase, input, output); case 0x9: - return MapBuffer(input, output); + return WrapFixedVariable(this, &nvhost_vic::MapBuffer, input, output); case 0xa: - return UnmapBuffer(input, output); + return WrapFixedVariable(this, &nvhost_vic::UnmapBuffer, input, output); default: break; } @@ -43,7 +43,7 @@ NvResult nvhost_vic::Ioctl1(DeviceFD fd, Ioctl command, std::span inpu case 'H': switch (command.cmd) { case 0x1: - return Wrap1(&nvhost_vic::SetNVMAPfd, input, output); + return WrapFixed(this, &nvhost_vic::SetNVMAPfd, input, output); default: break; } diff --git a/src/core/hle/service/nvdrv/devices/nvmap.cpp b/src/core/hle/service/nvdrv/devices/nvmap.cpp index 94286e295c..71b2e62ecb 100644 --- a/src/core/hle/service/nvdrv/devices/nvmap.cpp +++ b/src/core/hle/service/nvdrv/devices/nvmap.cpp @@ -32,17 +32,17 @@ NvResult nvmap::Ioctl1(DeviceFD fd, Ioctl command, std::span input, case 0x1: switch (command.cmd) { case 0x1: - return Wrap1(&nvmap::IocCreate, input, output); + return WrapFixed(this, &nvmap::IocCreate, input, output); case 0x3: - return Wrap1(&nvmap::IocFromId, input, output); + return WrapFixed(this, &nvmap::IocFromId, input, output); case 0x4: - return Wrap1(&nvmap::IocAlloc, input, output); + return WrapFixed(this, &nvmap::IocAlloc, input, output); case 0x5: - return Wrap1(&nvmap::IocFree, input, output); + return WrapFixed(this, &nvmap::IocFree, input, output); case 0x9: - return Wrap1(&nvmap::IocParam, input, output); + return WrapFixed(this, &nvmap::IocParam, input, output); case 0xe: - return Wrap1(&nvmap::IocGetId, input, output); + return WrapFixed(this, &nvmap::IocGetId, input, output); default: break; } From ca75c58f4391fcd20d325333c802f9e225ff9c47 Mon Sep 17 00:00:00 2001 From: Liam Date: Wed, 25 Oct 2023 12:59:11 -0400 Subject: [PATCH 027/154] sockets: use safe access helpers --- src/core/hle/service/sockets/bsd.cpp | 77 +++++++++++++--------------- src/core/hle/service/sockets/bsd.h | 2 +- 2 files changed, 38 insertions(+), 41 deletions(-) diff --git a/src/core/hle/service/sockets/bsd.cpp b/src/core/hle/service/sockets/bsd.cpp index 85849d5f37..dd652ca421 100644 --- a/src/core/hle/service/sockets/bsd.cpp +++ b/src/core/hle/service/sockets/bsd.cpp @@ -39,6 +39,18 @@ bool IsConnectionBased(Type type) { } } +template +T GetValue(std::span buffer) { + T t{}; + std::memcpy(&t, buffer.data(), std::min(sizeof(T), buffer.size())); + return t; +} + +template +void PutValue(std::span buffer, const T& t) { + std::memcpy(buffer.data(), &t, std::min(sizeof(T), buffer.size())); +} + } // Anonymous namespace void BSD::PollWork::Execute(BSD* bsd) { @@ -316,22 +328,12 @@ void BSD::SetSockOpt(HLERequestContext& ctx) { const s32 fd = rp.Pop(); const u32 level = rp.Pop(); const OptName optname = static_cast(rp.Pop()); - - const auto buffer = ctx.ReadBuffer(); - const u8* optval = buffer.empty() ? nullptr : buffer.data(); - size_t optlen = buffer.size(); - - std::array values; - if ((optname == OptName::SNDTIMEO || optname == OptName::RCVTIMEO) && buffer.size() == 8) { - std::memcpy(values.data(), buffer.data(), sizeof(values)); - optlen = sizeof(values); - optval = reinterpret_cast(values.data()); - } + const auto optval = ctx.ReadBuffer(); LOG_DEBUG(Service, "called. fd={} level={} optname=0x{:x} optlen={}", fd, level, - static_cast(optname), optlen); + static_cast(optname), optval.size()); - BuildErrnoResponse(ctx, SetSockOptImpl(fd, level, optname, optlen, optval)); + BuildErrnoResponse(ctx, SetSockOptImpl(fd, level, optname, optval)); } void BSD::Shutdown(HLERequestContext& ctx) { @@ -521,18 +523,19 @@ std::pair BSD::SocketImpl(Domain domain, Type type, Protocol protoco std::pair BSD::PollImpl(std::vector& write_buffer, std::span read_buffer, s32 nfds, s32 timeout) { + if (nfds <= 0) { + // When no entries are provided, -1 is returned with errno zero + return {-1, Errno::SUCCESS}; + } + if (read_buffer.size() < nfds * sizeof(PollFD)) { + return {-1, Errno::INVAL}; + } if (write_buffer.size() < nfds * sizeof(PollFD)) { return {-1, Errno::INVAL}; } - if (nfds == 0) { - // When no entries are provided, -1 is returned with errno zero - return {-1, Errno::SUCCESS}; - } - - const size_t length = std::min(read_buffer.size(), write_buffer.size()); std::vector fds(nfds); - std::memcpy(fds.data(), read_buffer.data(), length); + std::memcpy(fds.data(), read_buffer.data(), nfds * sizeof(PollFD)); if (timeout >= 0) { const s64 seconds = timeout / 1000; @@ -580,7 +583,7 @@ std::pair BSD::PollImpl(std::vector& write_buffer, std::span BSD::AcceptImpl(s32 fd, std::vector& write_buffer) { new_descriptor.is_connection_based = descriptor.is_connection_based; const SockAddrIn guest_addr_in = Translate(result.sockaddr_in); - const size_t length = std::min(sizeof(guest_addr_in), write_buffer.size()); - std::memcpy(write_buffer.data(), &guest_addr_in, length); + PutValue(write_buffer, guest_addr_in); return {new_fd, Errno::SUCCESS}; } @@ -619,8 +621,7 @@ Errno BSD::BindImpl(s32 fd, std::span addr) { return Errno::BADF; } ASSERT(addr.size() == sizeof(SockAddrIn)); - SockAddrIn addr_in; - std::memcpy(&addr_in, addr.data(), sizeof(addr_in)); + auto addr_in = GetValue(addr); return Translate(file_descriptors[fd]->socket->Bind(Translate(addr_in))); } @@ -631,8 +632,7 @@ Errno BSD::ConnectImpl(s32 fd, std::span addr) { } UNIMPLEMENTED_IF(addr.size() != sizeof(SockAddrIn)); - SockAddrIn addr_in; - std::memcpy(&addr_in, addr.data(), sizeof(addr_in)); + auto addr_in = GetValue(addr); return Translate(file_descriptors[fd]->socket->Connect(Translate(addr_in))); } @@ -650,7 +650,7 @@ Errno BSD::GetPeerNameImpl(s32 fd, std::vector& write_buffer) { ASSERT(write_buffer.size() >= sizeof(guest_addrin)); write_buffer.resize(sizeof(guest_addrin)); - std::memcpy(write_buffer.data(), &guest_addrin, sizeof(guest_addrin)); + PutValue(write_buffer, guest_addrin); return Translate(bsd_errno); } @@ -667,7 +667,7 @@ Errno BSD::GetSockNameImpl(s32 fd, std::vector& write_buffer) { ASSERT(write_buffer.size() >= sizeof(guest_addrin)); write_buffer.resize(sizeof(guest_addrin)); - std::memcpy(write_buffer.data(), &guest_addrin, sizeof(guest_addrin)); + PutValue(write_buffer, guest_addrin); return Translate(bsd_errno); } @@ -725,7 +725,7 @@ Errno BSD::GetSockOptImpl(s32 fd, u32 level, OptName optname, std::vector& o optval.size() == sizeof(Errno), { return Errno::INVAL; }, "Incorrect getsockopt option size"); optval.resize(sizeof(Errno)); - memcpy(optval.data(), &translated_pending_err, sizeof(Errno)); + PutValue(optval, translated_pending_err); } return Translate(getsockopt_err); } @@ -735,7 +735,7 @@ Errno BSD::GetSockOptImpl(s32 fd, u32 level, OptName optname, std::vector& o } } -Errno BSD::SetSockOptImpl(s32 fd, u32 level, OptName optname, size_t optlen, const void* optval) { +Errno BSD::SetSockOptImpl(s32 fd, u32 level, OptName optname, std::span optval) { if (!IsFileDescriptorValid(fd)) { return Errno::BADF; } @@ -748,17 +748,15 @@ Errno BSD::SetSockOptImpl(s32 fd, u32 level, OptName optname, size_t optlen, con Network::SocketBase* const socket = file_descriptors[fd]->socket.get(); if (optname == OptName::LINGER) { - ASSERT(optlen == sizeof(Linger)); - Linger linger; - std::memcpy(&linger, optval, sizeof(linger)); + ASSERT(optval.size() == sizeof(Linger)); + auto linger = GetValue(optval); ASSERT(linger.onoff == 0 || linger.onoff == 1); return Translate(socket->SetLinger(linger.onoff != 0, linger.linger)); } - ASSERT(optlen == sizeof(u32)); - u32 value; - std::memcpy(&value, optval, sizeof(value)); + ASSERT(optval.size() == sizeof(u32)); + auto value = GetValue(optval); switch (optname) { case OptName::REUSEADDR: @@ -862,7 +860,7 @@ std::pair BSD::RecvFromImpl(s32 fd, u32 flags, std::vector& mess } else { ASSERT(addr.size() == sizeof(SockAddrIn)); const SockAddrIn result = Translate(addr_in); - std::memcpy(addr.data(), &result, sizeof(result)); + PutValue(addr, result); } } @@ -886,8 +884,7 @@ std::pair BSD::SendToImpl(s32 fd, u32 flags, std::span mes Network::SockAddrIn* p_addr_in = nullptr; if (!addr.empty()) { ASSERT(addr.size() == sizeof(SockAddrIn)); - SockAddrIn guest_addr_in; - std::memcpy(&guest_addr_in, addr.data(), sizeof(guest_addr_in)); + auto guest_addr_in = GetValue(addr); addr_in = Translate(guest_addr_in); p_addr_in = &addr_in; } diff --git a/src/core/hle/service/sockets/bsd.h b/src/core/hle/service/sockets/bsd.h index 161f22b9b1..4f69d382c9 100644 --- a/src/core/hle/service/sockets/bsd.h +++ b/src/core/hle/service/sockets/bsd.h @@ -163,7 +163,7 @@ private: Errno ListenImpl(s32 fd, s32 backlog); std::pair FcntlImpl(s32 fd, FcntlCmd cmd, s32 arg); Errno GetSockOptImpl(s32 fd, u32 level, OptName optname, std::vector& optval); - Errno SetSockOptImpl(s32 fd, u32 level, OptName optname, size_t optlen, const void* optval); + Errno SetSockOptImpl(s32 fd, u32 level, OptName optname, std::span optval); Errno ShutdownImpl(s32 fd, s32 how); std::pair RecvImpl(s32 fd, u32 flags, std::vector& message); std::pair RecvFromImpl(s32 fd, u32 flags, std::vector& message, From 7f62a48ab507d3874378c10944662d5b841c6c2e Mon Sep 17 00:00:00 2001 From: boludoz Date: Fri, 27 Oct 2023 00:30:35 -0300 Subject: [PATCH 028/154] We dont need that --- src/common/fs/path_util.cpp | 34 +++++++++++++++++++--------------- 1 file changed, 19 insertions(+), 15 deletions(-) diff --git a/src/common/fs/path_util.cpp b/src/common/fs/path_util.cpp index 732c1559fa..0abd81a45e 100644 --- a/src/common/fs/path_util.cpp +++ b/src/common/fs/path_util.cpp @@ -6,7 +6,6 @@ #include #include "common/fs/fs.h" -#include "common/string_util.h" #ifdef ANDROID #include "common/fs/fs_android.h" #endif @@ -15,7 +14,7 @@ #include "common/logging/log.h" #ifdef _WIN32 -#include // Used in GetExeDirectory() and GetWindowsDesktop() +#include // Used in GetExeDirectory() #else #include // Used in Get(Home/Data)Directory() #include // Used in GetHomeDirectory() @@ -251,25 +250,30 @@ void SetYuzuPath(YuzuPath yuzu_path, const fs::path& new_path) { #ifdef _WIN32 fs::path GetExeDirectory() { - WCHAR exe_path[MAX_PATH]; - if (SUCCEEDED(GetModuleFileNameW(nullptr, exe_path, MAX_PATH))) { - std::wstring wide_exe_path(exe_path); - return fs::path{Common::UTF16ToUTF8(wide_exe_path)}.parent_path(); + wchar_t exe_path[MAX_PATH]; + + if (GetModuleFileNameW(nullptr, exe_path, MAX_PATH) == 0) { + LOG_ERROR(Common_Filesystem, + "Failed to get the path to the executable of the current process"); } - LOG_ERROR(Common_Filesystem, "Failed to get the path to the executable of the current " - "process"); - return fs::path{}; + + return fs::path{exe_path}.parent_path(); } fs::path GetAppDataRoamingDirectory() { PWSTR appdata_roaming_path = nullptr; - if (SUCCEEDED(SHGetKnownFolderPath(FOLDERID_RoamingAppData, 0, NULL, &appdata_roaming_path))) { - std::wstring wide_appdata_roaming_path(appdata_roaming_path); - CoTaskMemFree(appdata_roaming_path); - return fs::path{Common::UTF16ToUTF8(wide_appdata_roaming_path)}; + + SHGetKnownFolderPath(FOLDERID_RoamingAppData, 0, nullptr, &appdata_roaming_path); + + auto fs_appdata_roaming_path = fs::path{appdata_roaming_path}; + + CoTaskMemFree(appdata_roaming_path); + + if (fs_appdata_roaming_path.empty()) { + LOG_ERROR(Common_Filesystem, "Failed to get the path to the %APPDATA% directory"); } - LOG_ERROR(Common_Filesystem, "Failed to get the path to the %APPDATA% directory"); - return fs::path{}; + + return fs_appdata_roaming_path; } #else From 65d4a16afd7d84742751d3f9b3b0976738cac136 Mon Sep 17 00:00:00 2001 From: Liam Date: Fri, 27 Oct 2023 23:48:55 -0400 Subject: [PATCH 029/154] renderer_vulkan: fix cropping for presentation --- .../nvnflinger/buffer_transform_flags.h | 2 + .../renderer_vulkan/vk_blit_screen.cpp | 97 ++++++++++--------- 2 files changed, 55 insertions(+), 44 deletions(-) diff --git a/src/core/hle/service/nvnflinger/buffer_transform_flags.h b/src/core/hle/service/nvnflinger/buffer_transform_flags.h index 67aa5dad63..ffe579718f 100644 --- a/src/core/hle/service/nvnflinger/buffer_transform_flags.h +++ b/src/core/hle/service/nvnflinger/buffer_transform_flags.h @@ -3,6 +3,7 @@ #pragma once +#include "common/common_funcs.h" #include "common/common_types.h" namespace Service::android { @@ -21,5 +22,6 @@ enum class BufferTransformFlags : u32 { /// Rotate source image 270 degrees clockwise Rotate270 = 0x07, }; +DECLARE_ENUM_FLAG_OPERATORS(BufferTransformFlags); } // namespace Service::android diff --git a/src/video_core/renderer_vulkan/vk_blit_screen.cpp b/src/video_core/renderer_vulkan/vk_blit_screen.cpp index 52fc142d19..459ab32c24 100644 --- a/src/video_core/renderer_vulkan/vk_blit_screen.cpp +++ b/src/video_core/renderer_vulkan/vk_blit_screen.cpp @@ -1395,63 +1395,72 @@ void BlitScreen::SetUniformData(BufferData& data, const Layout::FramebufferLayou MakeOrthographicMatrix(static_cast(layout.width), static_cast(layout.height)); } -void BlitScreen::SetVertexData(BufferData& data, const Tegra::FramebufferConfig& framebuffer, - const Layout::FramebufferLayout layout) const { - const auto& framebuffer_transform_flags = framebuffer.transform_flags; - const auto& framebuffer_crop_rect = framebuffer.crop_rect; +static Common::Rectangle NormalizeCrop(Common::Rectangle crop, + const Tegra::FramebufferConfig& framebuffer) { + f32 left, top, right, bottom; - static constexpr Common::Rectangle texcoords{0.f, 0.f, 1.f, 1.f}; - auto left = texcoords.left; - auto right = texcoords.right; + if (!crop.IsEmpty()) { + // If crop rectangle is not empty, apply properties from rectangle. + left = static_cast(crop.left); + top = static_cast(crop.top); + right = static_cast(crop.right); + bottom = static_cast(crop.bottom); + } else { + // Otherwise, fall back to framebuffer dimensions. + left = 0; + top = 0; + right = static_cast(framebuffer.width); + bottom = static_cast(framebuffer.height); + } - switch (framebuffer_transform_flags) { - case Service::android::BufferTransformFlags::Unset: - break; - case Service::android::BufferTransformFlags::FlipV: - // Flip the framebuffer vertically - left = texcoords.right; - right = texcoords.left; - break; - default: + // Apply transformation flags. + auto framebuffer_transform_flags = framebuffer.transform_flags; + + if (True(framebuffer_transform_flags & Service::android::BufferTransformFlags::FlipH)) { + // Switch left and right. + std::swap(left, right); + } + if (True(framebuffer_transform_flags & Service::android::BufferTransformFlags::FlipV)) { + // Switch top and bottom. + std::swap(top, bottom); + } + + framebuffer_transform_flags &= ~Service::android::BufferTransformFlags::FlipH; + framebuffer_transform_flags &= ~Service::android::BufferTransformFlags::FlipV; + if (True(framebuffer_transform_flags)) { UNIMPLEMENTED_MSG("Unsupported framebuffer_transform_flags={}", static_cast(framebuffer_transform_flags)); - break; } - UNIMPLEMENTED_IF(framebuffer_crop_rect.left != 0); + return Common::Rectangle(left, top, right, bottom); +} - f32 left_start{}; - if (framebuffer_crop_rect.Top() > 0) { - left_start = static_cast(framebuffer_crop_rect.Top()) / - static_cast(framebuffer_crop_rect.Bottom()); - } - f32 scale_u = static_cast(framebuffer.width) / static_cast(screen_info.width); - f32 scale_v = static_cast(framebuffer.height) / static_cast(screen_info.height); - // Scale the output by the crop width/height. This is commonly used with 1280x720 rendering - // (e.g. handheld mode) on a 1920x1080 framebuffer. - if (!fsr) { - if (framebuffer_crop_rect.GetWidth() > 0) { - scale_u = static_cast(framebuffer_crop_rect.GetWidth()) / - static_cast(screen_info.width); - } - if (framebuffer_crop_rect.GetHeight() > 0) { - scale_v = static_cast(framebuffer_crop_rect.GetHeight()) / - static_cast(screen_info.height); - } - } +void BlitScreen::SetVertexData(BufferData& data, const Tegra::FramebufferConfig& framebuffer, + const Layout::FramebufferLayout layout) const { + // Get the normalized crop rectangle. + const auto crop = NormalizeCrop(framebuffer.crop_rect, framebuffer); + // Get the screen properties. + const f32 screen_width = static_cast(screen_info.width); + const f32 screen_height = static_cast(screen_info.height); + + // Apply the crop. + const f32 left = crop.left / screen_width; + const f32 top = crop.top / screen_height; + const f32 right = crop.right / screen_width; + const f32 bottom = crop.bottom / screen_height; + + // Map the coordinates to the screen. const auto& screen = layout.screen; const auto x = static_cast(screen.left); const auto y = static_cast(screen.top); const auto w = static_cast(screen.GetWidth()); const auto h = static_cast(screen.GetHeight()); - data.vertices[0] = ScreenRectVertex(x, y, texcoords.top * scale_u, left_start + left * scale_v); - data.vertices[1] = - ScreenRectVertex(x + w, y, texcoords.bottom * scale_u, left_start + left * scale_v); - data.vertices[2] = - ScreenRectVertex(x, y + h, texcoords.top * scale_u, left_start + right * scale_v); - data.vertices[3] = - ScreenRectVertex(x + w, y + h, texcoords.bottom * scale_u, left_start + right * scale_v); + + data.vertices[0] = ScreenRectVertex(x, y, left, top); + data.vertices[1] = ScreenRectVertex(x + w, y, right, top); + data.vertices[2] = ScreenRectVertex(x, y + h, left, bottom); + data.vertices[3] = ScreenRectVertex(x + w, y + h, right, bottom); } void BlitScreen::CreateSMAA(VkExtent2D smaa_size) { From 6513a356f07e64aacd66e792cf88e4cedc62cbcb Mon Sep 17 00:00:00 2001 From: Liam Date: Sat, 28 Oct 2023 11:40:02 -0400 Subject: [PATCH 030/154] renderer_vulkan: fix FSR cropping --- .../renderer_vulkan/vk_blit_screen.cpp | 132 ++++++++++-------- src/video_core/renderer_vulkan/vk_fsr.cpp | 24 ++-- src/video_core/renderer_vulkan/vk_fsr.h | 2 +- 3 files changed, 87 insertions(+), 71 deletions(-) diff --git a/src/video_core/renderer_vulkan/vk_blit_screen.cpp b/src/video_core/renderer_vulkan/vk_blit_screen.cpp index 459ab32c24..66483a9009 100644 --- a/src/video_core/renderer_vulkan/vk_blit_screen.cpp +++ b/src/video_core/renderer_vulkan/vk_blit_screen.cpp @@ -137,6 +137,56 @@ BlitScreen::BlitScreen(Core::Memory::Memory& cpu_memory_, Core::Frontend::EmuWin BlitScreen::~BlitScreen() = default; +static Common::Rectangle NormalizeCrop(const Tegra::FramebufferConfig& framebuffer, + const ScreenInfo& screen_info) { + f32 left, top, right, bottom; + + if (!framebuffer.crop_rect.IsEmpty()) { + // If crop rectangle is not empty, apply properties from rectangle. + left = static_cast(framebuffer.crop_rect.left); + top = static_cast(framebuffer.crop_rect.top); + right = static_cast(framebuffer.crop_rect.right); + bottom = static_cast(framebuffer.crop_rect.bottom); + } else { + // Otherwise, fall back to framebuffer dimensions. + left = 0; + top = 0; + right = static_cast(framebuffer.width); + bottom = static_cast(framebuffer.height); + } + + // Apply transformation flags. + auto framebuffer_transform_flags = framebuffer.transform_flags; + + if (True(framebuffer_transform_flags & Service::android::BufferTransformFlags::FlipH)) { + // Switch left and right. + std::swap(left, right); + } + if (True(framebuffer_transform_flags & Service::android::BufferTransformFlags::FlipV)) { + // Switch top and bottom. + std::swap(top, bottom); + } + + framebuffer_transform_flags &= ~Service::android::BufferTransformFlags::FlipH; + framebuffer_transform_flags &= ~Service::android::BufferTransformFlags::FlipV; + if (True(framebuffer_transform_flags)) { + UNIMPLEMENTED_MSG("Unsupported framebuffer_transform_flags={}", + static_cast(framebuffer_transform_flags)); + } + + // Get the screen properties. + const f32 screen_width = static_cast(screen_info.width); + const f32 screen_height = static_cast(screen_info.height); + + // Normalize coordinate space. + left /= screen_width; + top /= screen_height; + right /= screen_width; + bottom /= screen_height; + + return Common::Rectangle(left, top, right, bottom); +} + void BlitScreen::Recreate() { present_manager.WaitPresent(); scheduler.Finish(); @@ -354,17 +404,10 @@ void BlitScreen::Draw(const Tegra::FramebufferConfig& framebuffer, source_image_view = smaa->Draw(scheduler, image_index, source_image, source_image_view); } if (fsr) { - auto crop_rect = framebuffer.crop_rect; - if (crop_rect.GetWidth() == 0) { - crop_rect.right = framebuffer.width; - } - if (crop_rect.GetHeight() == 0) { - crop_rect.bottom = framebuffer.height; - } - crop_rect = crop_rect.Scale(Settings::values.resolution_info.up_factor); - VkExtent2D fsr_input_size{ - .width = Settings::values.resolution_info.ScaleUp(framebuffer.width), - .height = Settings::values.resolution_info.ScaleUp(framebuffer.height), + const auto crop_rect = NormalizeCrop(framebuffer, screen_info); + const VkExtent2D fsr_input_size{ + .width = Settings::values.resolution_info.ScaleUp(screen_info.width), + .height = Settings::values.resolution_info.ScaleUp(screen_info.height), }; VkImageView fsr_image_view = fsr->Draw(scheduler, image_index, source_image_view, fsr_input_size, crop_rect); @@ -1395,60 +1438,27 @@ void BlitScreen::SetUniformData(BufferData& data, const Layout::FramebufferLayou MakeOrthographicMatrix(static_cast(layout.width), static_cast(layout.height)); } -static Common::Rectangle NormalizeCrop(Common::Rectangle crop, - const Tegra::FramebufferConfig& framebuffer) { - f32 left, top, right, bottom; - - if (!crop.IsEmpty()) { - // If crop rectangle is not empty, apply properties from rectangle. - left = static_cast(crop.left); - top = static_cast(crop.top); - right = static_cast(crop.right); - bottom = static_cast(crop.bottom); - } else { - // Otherwise, fall back to framebuffer dimensions. - left = 0; - top = 0; - right = static_cast(framebuffer.width); - bottom = static_cast(framebuffer.height); - } - - // Apply transformation flags. - auto framebuffer_transform_flags = framebuffer.transform_flags; - - if (True(framebuffer_transform_flags & Service::android::BufferTransformFlags::FlipH)) { - // Switch left and right. - std::swap(left, right); - } - if (True(framebuffer_transform_flags & Service::android::BufferTransformFlags::FlipV)) { - // Switch top and bottom. - std::swap(top, bottom); - } - - framebuffer_transform_flags &= ~Service::android::BufferTransformFlags::FlipH; - framebuffer_transform_flags &= ~Service::android::BufferTransformFlags::FlipV; - if (True(framebuffer_transform_flags)) { - UNIMPLEMENTED_MSG("Unsupported framebuffer_transform_flags={}", - static_cast(framebuffer_transform_flags)); - } - - return Common::Rectangle(left, top, right, bottom); -} - void BlitScreen::SetVertexData(BufferData& data, const Tegra::FramebufferConfig& framebuffer, const Layout::FramebufferLayout layout) const { - // Get the normalized crop rectangle. - const auto crop = NormalizeCrop(framebuffer.crop_rect, framebuffer); + f32 left, top, right, bottom; - // Get the screen properties. - const f32 screen_width = static_cast(screen_info.width); - const f32 screen_height = static_cast(screen_info.height); + if (fsr) { + // FSR has already applied the crop, so we just want to render the image + // it has produced. + left = 0; + top = 0; + right = 1; + bottom = 1; + } else { + // Get the normalized crop rectangle. + const auto crop = NormalizeCrop(framebuffer, screen_info); - // Apply the crop. - const f32 left = crop.left / screen_width; - const f32 top = crop.top / screen_height; - const f32 right = crop.right / screen_width; - const f32 bottom = crop.bottom / screen_height; + // Apply the crop. + left = crop.left; + top = crop.top; + right = crop.right; + bottom = crop.bottom; + } // Map the coordinates to the screen. const auto& screen = layout.screen; diff --git a/src/video_core/renderer_vulkan/vk_fsr.cpp b/src/video_core/renderer_vulkan/vk_fsr.cpp index ce8f3f3c2a..f7a05fbc0d 100644 --- a/src/video_core/renderer_vulkan/vk_fsr.cpp +++ b/src/video_core/renderer_vulkan/vk_fsr.cpp @@ -34,7 +34,7 @@ FSR::FSR(const Device& device_, MemoryAllocator& memory_allocator_, size_t image } VkImageView FSR::Draw(Scheduler& scheduler, size_t image_index, VkImageView image_view, - VkExtent2D input_image_extent, const Common::Rectangle& crop_rect) { + VkExtent2D input_image_extent, const Common::Rectangle& crop_rect) { UpdateDescriptorSet(image_index, image_view); @@ -61,15 +61,21 @@ VkImageView FSR::Draw(Scheduler& scheduler, size_t image_index, VkImageView imag cmdbuf.BindPipeline(VK_PIPELINE_BIND_POINT_COMPUTE, *easu_pipeline); - std::array push_constants; - FsrEasuConOffset( - push_constants.data() + 0, push_constants.data() + 4, push_constants.data() + 8, - push_constants.data() + 12, + const f32 input_image_width = static_cast(input_image_extent.width); + const f32 input_image_height = static_cast(input_image_extent.height); + const f32 output_image_width = static_cast(output_size.width); + const f32 output_image_height = static_cast(output_size.height); + const f32 viewport_width = (crop_rect.right - crop_rect.left) * input_image_width; + const f32 viewport_x = crop_rect.left * input_image_width; + const f32 viewport_height = (crop_rect.bottom - crop_rect.top) * input_image_height; + const f32 viewport_y = crop_rect.top * input_image_height; - static_cast(crop_rect.GetWidth()), static_cast(crop_rect.GetHeight()), - static_cast(input_image_extent.width), static_cast(input_image_extent.height), - static_cast(output_size.width), static_cast(output_size.height), - static_cast(crop_rect.left), static_cast(crop_rect.top)); + std::array push_constants; + FsrEasuConOffset(push_constants.data() + 0, push_constants.data() + 4, + push_constants.data() + 8, push_constants.data() + 12, + + viewport_width, viewport_height, input_image_width, input_image_height, + output_image_width, output_image_height, viewport_x, viewport_y); cmdbuf.PushConstants(*pipeline_layout, VK_SHADER_STAGE_COMPUTE_BIT, push_constants); { diff --git a/src/video_core/renderer_vulkan/vk_fsr.h b/src/video_core/renderer_vulkan/vk_fsr.h index 8bb9fc23ac..3505c14164 100644 --- a/src/video_core/renderer_vulkan/vk_fsr.h +++ b/src/video_core/renderer_vulkan/vk_fsr.h @@ -17,7 +17,7 @@ public: explicit FSR(const Device& device, MemoryAllocator& memory_allocator, size_t image_count, VkExtent2D output_size); VkImageView Draw(Scheduler& scheduler, size_t image_index, VkImageView image_view, - VkExtent2D input_image_extent, const Common::Rectangle& crop_rect); + VkExtent2D input_image_extent, const Common::Rectangle& crop_rect); private: void CreateDescriptorPool(); From 79e7d7f4ba3ed4f395e6b30eea218a34348726a2 Mon Sep 17 00:00:00 2001 From: Liam Date: Sun, 29 Oct 2023 16:37:11 -0400 Subject: [PATCH 031/154] nvnflinger: use graphic buffer lifetime for map handle --- src/core/CMakeLists.txt | 1 + src/core/hle/service/nvnflinger/buffer_item.h | 2 +- .../nvnflinger/buffer_queue_consumer.cpp | 8 ++--- .../nvnflinger/buffer_queue_consumer.h | 8 +---- .../nvnflinger/buffer_queue_producer.cpp | 19 +++-------- .../nvnflinger/buffer_queue_producer.h | 3 +- src/core/hle/service/nvnflinger/buffer_slot.h | 2 +- .../nvnflinger/fb_share_buffer_manager.cpp | 2 +- src/core/hle/service/nvnflinger/status.h | 2 +- .../service/nvnflinger/ui/graphic_buffer.cpp | 34 +++++++++++++++++++ .../service/nvnflinger/ui/graphic_buffer.h | 25 +++++++++++--- .../hle/service/vi/display/vi_display.cpp | 2 +- 12 files changed, 71 insertions(+), 37 deletions(-) create mode 100644 src/core/hle/service/nvnflinger/ui/graphic_buffer.cpp diff --git a/src/core/CMakeLists.txt b/src/core/CMakeLists.txt index e4f499135a..873839ecd7 100644 --- a/src/core/CMakeLists.txt +++ b/src/core/CMakeLists.txt @@ -715,6 +715,7 @@ add_library(core STATIC hle/service/nvnflinger/producer_listener.h hle/service/nvnflinger/status.h hle/service/nvnflinger/ui/fence.h + hle/service/nvnflinger/ui/graphic_buffer.cpp hle/service/nvnflinger/ui/graphic_buffer.h hle/service/nvnflinger/window.h hle/service/olsc/olsc.cpp diff --git a/src/core/hle/service/nvnflinger/buffer_item.h b/src/core/hle/service/nvnflinger/buffer_item.h index 3da8cc3aa1..7fd808f546 100644 --- a/src/core/hle/service/nvnflinger/buffer_item.h +++ b/src/core/hle/service/nvnflinger/buffer_item.h @@ -15,7 +15,7 @@ namespace Service::android { -struct GraphicBuffer; +class GraphicBuffer; class BufferItem final { public: diff --git a/src/core/hle/service/nvnflinger/buffer_queue_consumer.cpp b/src/core/hle/service/nvnflinger/buffer_queue_consumer.cpp index 51291539d9..1179ab6a6f 100644 --- a/src/core/hle/service/nvnflinger/buffer_queue_consumer.cpp +++ b/src/core/hle/service/nvnflinger/buffer_queue_consumer.cpp @@ -5,7 +5,6 @@ // https://cs.android.com/android/platform/superproject/+/android-5.1.1_r38:frameworks/native/libs/gui/BufferQueueConsumer.cpp #include "common/logging/log.h" -#include "core/hle/service/nvdrv/core/nvmap.h" #include "core/hle/service/nvnflinger/buffer_item.h" #include "core/hle/service/nvnflinger/buffer_queue_consumer.h" #include "core/hle/service/nvnflinger/buffer_queue_core.h" @@ -14,9 +13,8 @@ namespace Service::android { -BufferQueueConsumer::BufferQueueConsumer(std::shared_ptr core_, - Service::Nvidia::NvCore::NvMap& nvmap_) - : core{std::move(core_)}, slots{core->slots}, nvmap(nvmap_) {} +BufferQueueConsumer::BufferQueueConsumer(std::shared_ptr core_) + : core{std::move(core_)}, slots{core->slots} {} BufferQueueConsumer::~BufferQueueConsumer() = default; @@ -136,8 +134,6 @@ Status BufferQueueConsumer::ReleaseBuffer(s32 slot, u64 frame_number, const Fenc slots[slot].buffer_state = BufferState::Free; - nvmap.FreeHandle(slots[slot].graphic_buffer->BufferId(), true); - listener = core->connected_producer_listener; LOG_DEBUG(Service_Nvnflinger, "releasing slot {}", slot); diff --git a/src/core/hle/service/nvnflinger/buffer_queue_consumer.h b/src/core/hle/service/nvnflinger/buffer_queue_consumer.h index 50ed0bb5fb..b90f70c9a1 100644 --- a/src/core/hle/service/nvnflinger/buffer_queue_consumer.h +++ b/src/core/hle/service/nvnflinger/buffer_queue_consumer.h @@ -13,10 +13,6 @@ #include "core/hle/service/nvnflinger/buffer_queue_defs.h" #include "core/hle/service/nvnflinger/status.h" -namespace Service::Nvidia::NvCore { -class NvMap; -} // namespace Service::Nvidia::NvCore - namespace Service::android { class BufferItem; @@ -25,8 +21,7 @@ class IConsumerListener; class BufferQueueConsumer final { public: - explicit BufferQueueConsumer(std::shared_ptr core_, - Service::Nvidia::NvCore::NvMap& nvmap_); + explicit BufferQueueConsumer(std::shared_ptr core_); ~BufferQueueConsumer(); Status AcquireBuffer(BufferItem* out_buffer, std::chrono::nanoseconds expected_present); @@ -37,7 +32,6 @@ public: private: std::shared_ptr core; BufferQueueDefs::SlotsType& slots; - Service::Nvidia::NvCore::NvMap& nvmap; }; } // namespace Service::android diff --git a/src/core/hle/service/nvnflinger/buffer_queue_producer.cpp b/src/core/hle/service/nvnflinger/buffer_queue_producer.cpp index 6e7a496589..5d8762d253 100644 --- a/src/core/hle/service/nvnflinger/buffer_queue_producer.cpp +++ b/src/core/hle/service/nvnflinger/buffer_queue_producer.cpp @@ -13,7 +13,6 @@ #include "core/hle/kernel/kernel.h" #include "core/hle/service/hle_ipc.h" #include "core/hle/service/kernel_helpers.h" -#include "core/hle/service/nvdrv/core/nvmap.h" #include "core/hle/service/nvnflinger/buffer_queue_core.h" #include "core/hle/service/nvnflinger/buffer_queue_producer.h" #include "core/hle/service/nvnflinger/consumer_listener.h" @@ -533,8 +532,6 @@ Status BufferQueueProducer::QueueBuffer(s32 slot, const QueueBufferInput& input, item.is_droppable = core->dequeue_buffer_cannot_block || async; item.swap_interval = swap_interval; - nvmap.DuplicateHandle(item.graphic_buffer->BufferId(), true); - sticky_transform = sticky_transform_; if (core->queue.empty()) { @@ -744,19 +741,13 @@ Status BufferQueueProducer::Disconnect(NativeWindowApi api) { return Status::NoError; } - // HACK: We are not Android. Remove handle for items in queue, and clear queue. - // Allows synchronous destruction of nvmap handles. - for (auto& item : core->queue) { - nvmap.FreeHandle(item.graphic_buffer->BufferId(), true); - } - core->queue.clear(); - switch (api) { case NativeWindowApi::Egl: case NativeWindowApi::Cpu: case NativeWindowApi::Media: case NativeWindowApi::Camera: if (core->connected_api == api) { + core->queue.clear(); core->FreeAllBuffersLocked(); core->connected_producer_listener = nullptr; core->connected_api = NativeWindowApi::NoConnectedApi; @@ -785,7 +776,7 @@ Status BufferQueueProducer::Disconnect(NativeWindowApi api) { } Status BufferQueueProducer::SetPreallocatedBuffer(s32 slot, - const std::shared_ptr& buffer) { + const std::shared_ptr& buffer) { LOG_DEBUG(Service_Nvnflinger, "slot {}", slot); if (slot < 0 || slot >= BufferQueueDefs::NUM_BUFFER_SLOTS) { @@ -796,7 +787,7 @@ Status BufferQueueProducer::SetPreallocatedBuffer(s32 slot, slots[slot] = {}; slots[slot].fence = Fence::NoFence(); - slots[slot].graphic_buffer = buffer; + slots[slot].graphic_buffer = std::make_shared(nvmap, buffer); slots[slot].frame_number = 0; // Most games preallocate a buffer and pass a valid buffer here. However, it is possible for @@ -839,7 +830,7 @@ void BufferQueueProducer::Transact(HLERequestContext& ctx, TransactionId code, u } case TransactionId::SetPreallocatedBuffer: { const auto slot = parcel_in.Read(); - const auto buffer = parcel_in.ReadObject(); + const auto buffer = parcel_in.ReadObject(); status = SetPreallocatedBuffer(slot, buffer); break; @@ -867,7 +858,7 @@ void BufferQueueProducer::Transact(HLERequestContext& ctx, TransactionId code, u status = RequestBuffer(slot, &buf); - parcel_out.WriteFlattenedObject(buf); + parcel_out.WriteFlattenedObject(buf.get()); break; } case TransactionId::QueueBuffer: { diff --git a/src/core/hle/service/nvnflinger/buffer_queue_producer.h b/src/core/hle/service/nvnflinger/buffer_queue_producer.h index d4201c1046..64c17d56c9 100644 --- a/src/core/hle/service/nvnflinger/buffer_queue_producer.h +++ b/src/core/hle/service/nvnflinger/buffer_queue_producer.h @@ -38,6 +38,7 @@ namespace Service::android { class BufferQueueCore; class IProducerListener; +struct NvGraphicBuffer; class BufferQueueProducer final : public IBinder { public: @@ -65,7 +66,7 @@ public: bool producer_controlled_by_app, QueueBufferOutput* output); Status Disconnect(NativeWindowApi api); - Status SetPreallocatedBuffer(s32 slot, const std::shared_ptr& buffer); + Status SetPreallocatedBuffer(s32 slot, const std::shared_ptr& buffer); private: BufferQueueProducer(const BufferQueueProducer&) = delete; diff --git a/src/core/hle/service/nvnflinger/buffer_slot.h b/src/core/hle/service/nvnflinger/buffer_slot.h index d8c9dec3b2..d25bca049d 100644 --- a/src/core/hle/service/nvnflinger/buffer_slot.h +++ b/src/core/hle/service/nvnflinger/buffer_slot.h @@ -13,7 +13,7 @@ namespace Service::android { -struct GraphicBuffer; +class GraphicBuffer; enum class BufferState : u32 { Free = 0, diff --git a/src/core/hle/service/nvnflinger/fb_share_buffer_manager.cpp b/src/core/hle/service/nvnflinger/fb_share_buffer_manager.cpp index 2e29bc8487..f260c94b6f 100644 --- a/src/core/hle/service/nvnflinger/fb_share_buffer_manager.cpp +++ b/src/core/hle/service/nvnflinger/fb_share_buffer_manager.cpp @@ -179,7 +179,7 @@ constexpr SharedMemoryPoolLayout SharedBufferPoolLayout = [] { }(); void MakeGraphicBuffer(android::BufferQueueProducer& producer, u32 slot, u32 handle) { - auto buffer = std::make_shared(); + auto buffer = std::make_shared(); buffer->width = SharedBufferWidth; buffer->height = SharedBufferHeight; buffer->stride = SharedBufferBlockLinearStride; diff --git a/src/core/hle/service/nvnflinger/status.h b/src/core/hle/service/nvnflinger/status.h index 7af166c407..3fa0fe15b9 100644 --- a/src/core/hle/service/nvnflinger/status.h +++ b/src/core/hle/service/nvnflinger/status.h @@ -19,7 +19,7 @@ enum class Status : s32 { Busy = -16, NoInit = -19, BadValue = -22, - InvalidOperation = -37, + InvalidOperation = -38, BufferNeedsReallocation = 1, ReleaseAllBuffers = 2, }; diff --git a/src/core/hle/service/nvnflinger/ui/graphic_buffer.cpp b/src/core/hle/service/nvnflinger/ui/graphic_buffer.cpp new file mode 100644 index 0000000000..ce70946ec1 --- /dev/null +++ b/src/core/hle/service/nvnflinger/ui/graphic_buffer.cpp @@ -0,0 +1,34 @@ +// SPDX-FileCopyrightText: Copyright 2023 yuzu Emulator Project +// SPDX-License-Identifier: GPL-3.0-or-later + +#include "core/hle/service/nvdrv/core/nvmap.h" +#include "core/hle/service/nvnflinger/ui/graphic_buffer.h" + +namespace Service::android { + +static NvGraphicBuffer GetBuffer(std::shared_ptr& buffer) { + if (buffer) { + return *buffer; + } else { + return {}; + } +} + +GraphicBuffer::GraphicBuffer(u32 width_, u32 height_, PixelFormat format_, u32 usage_) + : NvGraphicBuffer(width_, height_, format_, usage_), m_nvmap(nullptr) {} + +GraphicBuffer::GraphicBuffer(Service::Nvidia::NvCore::NvMap& nvmap, + std::shared_ptr buffer) + : NvGraphicBuffer(GetBuffer(buffer)), m_nvmap(std::addressof(nvmap)) { + if (this->BufferId() > 0) { + m_nvmap->DuplicateHandle(this->BufferId(), true); + } +} + +GraphicBuffer::~GraphicBuffer() { + if (m_nvmap != nullptr && this->BufferId() > 0) { + m_nvmap->FreeHandle(this->BufferId(), true); + } +} + +} // namespace Service::android diff --git a/src/core/hle/service/nvnflinger/ui/graphic_buffer.h b/src/core/hle/service/nvnflinger/ui/graphic_buffer.h index 3eac5cedd6..da430aa752 100644 --- a/src/core/hle/service/nvnflinger/ui/graphic_buffer.h +++ b/src/core/hle/service/nvnflinger/ui/graphic_buffer.h @@ -6,16 +6,22 @@ #pragma once +#include + #include "common/common_funcs.h" #include "common/common_types.h" #include "core/hle/service/nvnflinger/pixel_format.h" +namespace Service::Nvidia::NvCore { +class NvMap; +} // namespace Service::Nvidia::NvCore + namespace Service::android { -struct GraphicBuffer final { - constexpr GraphicBuffer() = default; +struct NvGraphicBuffer { + constexpr NvGraphicBuffer() = default; - constexpr GraphicBuffer(u32 width_, u32 height_, PixelFormat format_, u32 usage_) + constexpr NvGraphicBuffer(u32 width_, u32 height_, PixelFormat format_, u32 usage_) : width{static_cast(width_)}, height{static_cast(height_)}, format{format_}, usage{static_cast(usage_)} {} @@ -93,6 +99,17 @@ struct GraphicBuffer final { u32 offset{}; INSERT_PADDING_WORDS(60); }; -static_assert(sizeof(GraphicBuffer) == 0x16C, "GraphicBuffer has wrong size"); +static_assert(sizeof(NvGraphicBuffer) == 0x16C, "NvGraphicBuffer has wrong size"); + +class GraphicBuffer final : public NvGraphicBuffer { +public: + explicit GraphicBuffer(u32 width, u32 height, PixelFormat format, u32 usage); + explicit GraphicBuffer(Service::Nvidia::NvCore::NvMap& nvmap, + std::shared_ptr buffer); + ~GraphicBuffer(); + +private: + Service::Nvidia::NvCore::NvMap* m_nvmap{}; +}; } // namespace Service::android diff --git a/src/core/hle/service/vi/display/vi_display.cpp b/src/core/hle/service/vi/display/vi_display.cpp index f0b5eff8af..d30f49877a 100644 --- a/src/core/hle/service/vi/display/vi_display.cpp +++ b/src/core/hle/service/vi/display/vi_display.cpp @@ -35,7 +35,7 @@ static BufferQueue CreateBufferQueue(KernelHelpers::ServiceContext& service_cont return { buffer_queue_core, std::make_unique(service_context, buffer_queue_core, nvmap), - std::make_unique(buffer_queue_core, nvmap)}; + std::make_unique(buffer_queue_core)}; } Display::Display(u64 id, std::string name_, From a872030a351cc50293e6bf0793fe70041cee0098 Mon Sep 17 00:00:00 2001 From: Liam Date: Sun, 29 Oct 2023 23:38:24 -0400 Subject: [PATCH 032/154] nvnflinger: implement consumer abandonment --- .../nvnflinger/buffer_queue_consumer.cpp | 19 ++++++++++++++++ .../nvnflinger/buffer_queue_consumer.h | 1 + .../service/nvnflinger/buffer_queue_core.cpp | 12 ---------- .../service/nvnflinger/buffer_queue_core.h | 3 --- .../hle/service/nvnflinger/consumer_base.cpp | 20 +++++++++++++++++ .../hle/service/nvnflinger/consumer_base.h | 2 ++ .../hle/service/nvnflinger/nvnflinger.cpp | 22 ++++++++++++++----- src/core/hle/service/nvnflinger/nvnflinger.h | 2 ++ 8 files changed, 60 insertions(+), 21 deletions(-) diff --git a/src/core/hle/service/nvnflinger/buffer_queue_consumer.cpp b/src/core/hle/service/nvnflinger/buffer_queue_consumer.cpp index 51291539d9..215c1ea809 100644 --- a/src/core/hle/service/nvnflinger/buffer_queue_consumer.cpp +++ b/src/core/hle/service/nvnflinger/buffer_queue_consumer.cpp @@ -175,6 +175,25 @@ Status BufferQueueConsumer::Connect(std::shared_ptr consumer_ return Status::NoError; } +Status BufferQueueConsumer::Disconnect() { + LOG_DEBUG(Service_Nvnflinger, "called"); + + std::scoped_lock lock{core->mutex}; + + if (core->consumer_listener == nullptr) { + LOG_ERROR(Service_Nvnflinger, "no consumer is connected"); + return Status::BadValue; + } + + core->is_abandoned = true; + core->consumer_listener = nullptr; + core->queue.clear(); + core->FreeAllBuffersLocked(); + core->SignalDequeueCondition(); + + return Status::NoError; +} + Status BufferQueueConsumer::GetReleasedBuffers(u64* out_slot_mask) { if (out_slot_mask == nullptr) { LOG_ERROR(Service_Nvnflinger, "out_slot_mask may not be nullptr"); diff --git a/src/core/hle/service/nvnflinger/buffer_queue_consumer.h b/src/core/hle/service/nvnflinger/buffer_queue_consumer.h index 50ed0bb5fb..9a6968dfa6 100644 --- a/src/core/hle/service/nvnflinger/buffer_queue_consumer.h +++ b/src/core/hle/service/nvnflinger/buffer_queue_consumer.h @@ -32,6 +32,7 @@ public: Status AcquireBuffer(BufferItem* out_buffer, std::chrono::nanoseconds expected_present); Status ReleaseBuffer(s32 slot, u64 frame_number, const Fence& release_fence); Status Connect(std::shared_ptr consumer_listener, bool controlled_by_app); + Status Disconnect(); Status GetReleasedBuffers(u64* out_slot_mask); private: diff --git a/src/core/hle/service/nvnflinger/buffer_queue_core.cpp b/src/core/hle/service/nvnflinger/buffer_queue_core.cpp index ed66f6f5b1..4ed5e59782 100644 --- a/src/core/hle/service/nvnflinger/buffer_queue_core.cpp +++ b/src/core/hle/service/nvnflinger/buffer_queue_core.cpp @@ -14,24 +14,12 @@ BufferQueueCore::BufferQueueCore() = default; BufferQueueCore::~BufferQueueCore() = default; -void BufferQueueCore::NotifyShutdown() { - std::scoped_lock lock{mutex}; - - is_shutting_down = true; - - SignalDequeueCondition(); -} - void BufferQueueCore::SignalDequeueCondition() { dequeue_possible.store(true); dequeue_condition.notify_all(); } bool BufferQueueCore::WaitForDequeueCondition(std::unique_lock& lk) { - if (is_shutting_down) { - return false; - } - dequeue_condition.wait(lk, [&] { return dequeue_possible.load(); }); dequeue_possible.store(false); diff --git a/src/core/hle/service/nvnflinger/buffer_queue_core.h b/src/core/hle/service/nvnflinger/buffer_queue_core.h index 9164f08a0a..e513d183bf 100644 --- a/src/core/hle/service/nvnflinger/buffer_queue_core.h +++ b/src/core/hle/service/nvnflinger/buffer_queue_core.h @@ -34,8 +34,6 @@ public: BufferQueueCore(); ~BufferQueueCore(); - void NotifyShutdown(); - private: void SignalDequeueCondition(); bool WaitForDequeueCondition(std::unique_lock& lk); @@ -74,7 +72,6 @@ private: u32 transform_hint{}; bool is_allocating{}; mutable std::condition_variable_any is_allocating_condition; - bool is_shutting_down{}; }; } // namespace Service::android diff --git a/src/core/hle/service/nvnflinger/consumer_base.cpp b/src/core/hle/service/nvnflinger/consumer_base.cpp index 4dcda8dacd..1059e72bf3 100644 --- a/src/core/hle/service/nvnflinger/consumer_base.cpp +++ b/src/core/hle/service/nvnflinger/consumer_base.cpp @@ -27,6 +27,26 @@ void ConsumerBase::Connect(bool controlled_by_app) { consumer->Connect(shared_from_this(), controlled_by_app); } +void ConsumerBase::Abandon() { + LOG_DEBUG(Service_Nvnflinger, "called"); + + std::scoped_lock lock{mutex}; + + if (!is_abandoned) { + this->AbandonLocked(); + is_abandoned = true; + } +} + +void ConsumerBase::AbandonLocked() { + for (int i = 0; i < BufferQueueDefs::NUM_BUFFER_SLOTS; i++) { + this->FreeBufferLocked(i); + } + // disconnect from the BufferQueue + consumer->Disconnect(); + consumer = nullptr; +} + void ConsumerBase::FreeBufferLocked(s32 slot_index) { LOG_DEBUG(Service_Nvnflinger, "slot_index={}", slot_index); diff --git a/src/core/hle/service/nvnflinger/consumer_base.h b/src/core/hle/service/nvnflinger/consumer_base.h index 264829414b..ea3e9e97ab 100644 --- a/src/core/hle/service/nvnflinger/consumer_base.h +++ b/src/core/hle/service/nvnflinger/consumer_base.h @@ -24,6 +24,7 @@ class BufferQueueConsumer; class ConsumerBase : public IConsumerListener, public std::enable_shared_from_this { public: void Connect(bool controlled_by_app); + void Abandon(); protected: explicit ConsumerBase(std::unique_ptr consumer_); @@ -34,6 +35,7 @@ protected: void OnBuffersReleased() override; void OnSidebandStreamChanged() override; + void AbandonLocked(); void FreeBufferLocked(s32 slot_index); Status AcquireBufferLocked(BufferItem* item, std::chrono::nanoseconds present_when); Status ReleaseBufferLocked(s32 slot, const std::shared_ptr& graphic_buffer); diff --git a/src/core/hle/service/nvnflinger/nvnflinger.cpp b/src/core/hle/service/nvnflinger/nvnflinger.cpp index bebb45eae3..0745434c5b 100644 --- a/src/core/hle/service/nvnflinger/nvnflinger.cpp +++ b/src/core/hle/service/nvnflinger/nvnflinger.cpp @@ -47,7 +47,10 @@ void Nvnflinger::SplitVSync(std::stop_token stop_token) { vsync_signal.Wait(); const auto lock_guard = Lock(); - Compose(); + + if (!is_abandoned) { + Compose(); + } } } @@ -98,7 +101,6 @@ Nvnflinger::~Nvnflinger() { } ShutdownLayers(); - vsync_thread = {}; if (nvdrv) { nvdrv->Close(disp_fd); @@ -106,12 +108,20 @@ Nvnflinger::~Nvnflinger() { } void Nvnflinger::ShutdownLayers() { - const auto lock_guard = Lock(); - for (auto& display : displays) { - for (size_t layer = 0; layer < display.GetNumLayers(); ++layer) { - display.GetLayer(layer).Core().NotifyShutdown(); + // Abandon consumers. + { + const auto lock_guard = Lock(); + for (auto& display : displays) { + for (size_t layer = 0; layer < display.GetNumLayers(); ++layer) { + display.GetLayer(layer).GetConsumer().Abandon(); + } } + + is_abandoned = true; } + + // Join the vsync thread, if it exists. + vsync_thread = {}; } void Nvnflinger::SetNVDrvInstance(std::shared_ptr instance) { diff --git a/src/core/hle/service/nvnflinger/nvnflinger.h b/src/core/hle/service/nvnflinger/nvnflinger.h index 959d8b46bf..f5d73acdbb 100644 --- a/src/core/hle/service/nvnflinger/nvnflinger.h +++ b/src/core/hle/service/nvnflinger/nvnflinger.h @@ -140,6 +140,8 @@ private: s32 swap_interval = 1; + bool is_abandoned = false; + /// Event that handles screen composition. std::shared_ptr multi_composition_event; std::shared_ptr single_composition_event; From 6a7123826a426ed195257da24d75170bfc56f670 Mon Sep 17 00:00:00 2001 From: Liam Date: Wed, 25 Oct 2023 21:26:56 -0400 Subject: [PATCH 033/154] qt: remove duplicate exit confirmation setting --- src/yuzu/configuration/shared_translation.cpp | 1 - src/yuzu/main.cpp | 12 +++++++++--- src/yuzu/uisettings.h | 4 ---- 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/src/yuzu/configuration/shared_translation.cpp b/src/yuzu/configuration/shared_translation.cpp index 3fe448f27d..1434b1a561 100644 --- a/src/yuzu/configuration/shared_translation.cpp +++ b/src/yuzu/configuration/shared_translation.cpp @@ -156,7 +156,6 @@ std::unique_ptr InitializeTranslations(QWidget* parent) { // Ui General INSERT(UISettings, select_user_on_boot, "Prompt for user on game boot", ""); INSERT(UISettings, pause_when_in_background, "Pause emulation when in background", ""); - INSERT(UISettings, confirm_before_closing, "Confirm exit while emulation is running", ""); INSERT(UISettings, confirm_before_stopping, "Confirm before stopping emulation", ""); INSERT(UISettings, hide_mouse, "Hide mouse on inactivity", ""); INSERT(UISettings, controller_applet_disabled, "Disable controller applet", ""); diff --git a/src/yuzu/main.cpp b/src/yuzu/main.cpp index 0df163029b..2b430c40af 100644 --- a/src/yuzu/main.cpp +++ b/src/yuzu/main.cpp @@ -2174,6 +2174,7 @@ void GMainWindow::ShutdownGame() { return; } + play_time_manager->Stop(); OnShutdownBegin(); OnEmulationStopTimeExpired(); OnEmulationStopped(); @@ -3484,7 +3485,7 @@ void GMainWindow::OnExecuteProgram(std::size_t program_index) { } void GMainWindow::OnExit() { - OnStopGame(); + ShutdownGame(); } void GMainWindow::OnSaveConfig() { @@ -4847,7 +4848,12 @@ bool GMainWindow::SelectRomFSDumpTarget(const FileSys::ContentProvider& installe } bool GMainWindow::ConfirmClose() { - if (emu_thread == nullptr || !UISettings::values.confirm_before_closing) { + if (emu_thread == nullptr || + UISettings::values.confirm_before_stopping.GetValue() == ConfirmStop::Ask_Never) { + return true; + } + if (!system->GetExitLocked() && + UISettings::values.confirm_before_stopping.GetValue() == ConfirmStop::Ask_Based_On_Game) { return true; } const auto text = tr("Are you sure you want to close yuzu?"); @@ -4952,7 +4958,7 @@ bool GMainWindow::ConfirmChangeGame() { } bool GMainWindow::ConfirmForceLockedExit() { - if (emu_thread == nullptr || !UISettings::values.confirm_before_closing) { + if (emu_thread == nullptr) { return true; } const auto text = tr("The currently running application has requested yuzu to not exit.\n\n" diff --git a/src/yuzu/uisettings.h b/src/yuzu/uisettings.h index b62ff620ce..77d992c542 100644 --- a/src/yuzu/uisettings.h +++ b/src/yuzu/uisettings.h @@ -93,10 +93,6 @@ struct Values { Setting show_filter_bar{linkage, true, "showFilterBar", Category::Ui}; Setting show_status_bar{linkage, true, "showStatusBar", Category::Ui}; - Setting confirm_before_closing{ - linkage, true, "confirmClose", Category::UiGeneral, Settings::Specialization::Default, - true, true}; - SwitchableSetting confirm_before_stopping{linkage, ConfirmStop::Ask_Always, "confirmStop", From 1d7ff850d6fe57540f838fa32c5f183139198d3e Mon Sep 17 00:00:00 2001 From: Charles Lombardo Date: Tue, 31 Oct 2023 20:19:33 -0400 Subject: [PATCH 034/154] android: Update translations from transifex --- .../app/src/main/res/values-ar/strings.xml | 385 +++++++++++++++++ .../app/src/main/res/values-ckb/strings.xml | 336 +++++++++++++++ .../app/src/main/res/values-de/strings.xml | 119 ++++-- .../app/src/main/res/values-es/strings.xml | 180 ++++++-- .../app/src/main/res/values-fr/strings.xml | 180 ++++++-- .../app/src/main/res/values-he/strings.xml | 367 ++++++++++++++++ .../app/src/main/res/values-hu/strings.xml | 402 ++++++++++++++++++ .../app/src/main/res/values-it/strings.xml | 192 ++++++--- .../app/src/main/res/values-ja/strings.xml | 218 +++++++--- .../app/src/main/res/values-ko/strings.xml | 271 ++++++------ .../app/src/main/res/values-nb/strings.xml | 111 +++-- .../app/src/main/res/values-pl/strings.xml | 81 ++-- .../src/main/res/values-pt-rBR/strings.xml | 210 ++++++--- .../src/main/res/values-pt-rPT/strings.xml | 192 ++++++--- .../app/src/main/res/values-ru/strings.xml | 159 +++++-- .../app/src/main/res/values-uk/strings.xml | 90 +--- .../app/src/main/res/values-vi/strings.xml | 340 +++++++++++++++ .../src/main/res/values-zh-rCN/strings.xml | 138 +++++- .../src/main/res/values-zh-rTW/strings.xml | 137 +++++- 19 files changed, 3423 insertions(+), 685 deletions(-) create mode 100644 src/android/app/src/main/res/values-ar/strings.xml create mode 100644 src/android/app/src/main/res/values-ckb/strings.xml create mode 100644 src/android/app/src/main/res/values-he/strings.xml create mode 100644 src/android/app/src/main/res/values-hu/strings.xml create mode 100644 src/android/app/src/main/res/values-vi/strings.xml diff --git a/src/android/app/src/main/res/values-ar/strings.xml b/src/android/app/src/main/res/values-ar/strings.xml new file mode 100644 index 0000000000..07dffffe8d --- /dev/null +++ b/src/android/app/src/main/res/values-ar/strings.xml @@ -0,0 +1,385 @@ + + + + المحاكي نشط + اظهار اشعار دائم عندما يكون المحاكي نشطاً + يوزو يعمل + الإشعارات والأخطاء + اظهار اشعار عند حصول اي مشكلة. + لم يتم منح إذن الإشعار + + + مرحبًا + والانتقال إلى المحاكاة يوزو تعرف على كيفية إعداد. + لنبدأ + المفاتيح + اختر ملف <b>prod.keys</b> من الزر ادناه + إختيار المفاتيح + الألعاب + اختر مجلد <b>العابك</b> من الزر ادناه. + إنهاء + كل شيء جاهز./n استمتع بألعابك! + استمر + التالي + عودة + إضافة ألعاب + إختار مجلد ألعابك + مكتمل + + + الألعاب + البحث + الإعدادات + لم يتم العثور على ملفات او لم يتم تحديد مسار العاب. + بحث وتصفية الألعاب + تحديد مجلد الألعاب + يسمح لـ يوزو بملء قائمة الألعاب + تخطُ اختيار مجلد الالعاب؟ + لن يتم عرض الألعاب في قائمة الألعاب إذا لم يتم تحديد مجلد + https://yuzu-emu.org/help/quickstart/#dumping-games + البحث عن ألعاب + إعدادات البحث + تم تحديد مجلد الألعاب + تثبيت prod.keys + مطلوب لفك تشفير ألعاب البيع بالتجزئة + تخطي إضافة المفاتيح؟ + مطلوب مفاتيح صالحة لمحاكاة ألعاب البيع بالتجزئة. ستعمل تطبيقات البيرة المنزلية فقط إذا تابعت + https://yuzu-emu.org/help/quickstart/#guide-introduction + التنبيهات + امنح إذن الإشعار باستخدام الزر أدناه + منح الإذن + تخطي منح إذن الإشعارات؟ + لن يتمكن يوزو من إشعارك بالمعلومات المهمة + تم رفض الإذن + لقد رفضت هذا الإذن عدة مرات ويتعين عليك الآن منحه يدويًا في إعدادات النظام + حول + بناء الإصدار، والاعتمادات، وأكثر من ذلك + مساعدة + تخطي + إلغاء + تثبيت مفاتيح أميبو + مطلوب لاستخدام أميبو في اللعبة + تم تحديد ملف مفاتيح غير صالح + تم تثبيت المفاتيح بنجاح + خطأ في قراءة مفاتيح التشفير + مفاتيح التشفير غير صالحة + https://yuzu-emu.org/help/quickstart/#dumping-decryption-keys + الملف المحدد غير صحيح أو تالف. يرجى إعادة المفاتيح الخاصة بك + GPU تثبيت برنامج تشغيل + قم بتثبيت برامج تشغيل بديلة للحصول على أداء أو دقة أفضل + إعدادات متقدمة + إعدادات متقدمة: %1$s + تكوين إعدادات المحاكي + لعبت مؤخرا + أضيف مؤخرا + بيع بالتجزئة + البيرة المنزلية + فتح مجلد يوزو + إدارة ملفات يوزو الداخلية + تعديل مظهر التطبيق + لم يتم العثور على مدير الملفات + لا يمكن فتح مجلد يوزو + الرجاء تحديد موقع مجلد المستخدم باستخدام اللوحة الجانبية لمدير الملفات يدويًا + إدارة حفظ البيانات + حفظ البيانات التي تم العثور عليها. يرجى اختيار أحد الخيارات التالية + استيراد أو تصدير ملفات الحفظ + تم الاستيراد بنجاح + بنية مجلد الحفظ غير صالحة + يجب أن يكون اسم المجلد الفرعي الأول هو معرف عنوان اللعبة. + استيراد + تصدير + تثبيت البرامج الثابتة + تثبيت البرامج الثابتة + تم تثبيت البرامج الثابتة بنجاح + فشل تثبيت البرامج الثابتة + مشاركة سجلات التصحيح + مشاركة ملف سجل يوزو لتصحيح المشكلات + لم يتم العثور على ملف السجل + تثبيت محتوى اللعبة + DLC قم بتثبيت تحديثات اللعبة أو + جارٍ تثبيت المحتوى + لا يُسمح بتثبيت الألعاب الأساسية لتجنب التعارضات المحتملة. + %1$d تم التثبيت بنجاح + %1$d تمت الكتابة فوقه بنجاح + https://yuzu-emu.org/help/quickstart/#dumping-installed-updates + برامج التشغيل المخصصة غير مدعومة + تحميل برنامج التشغيل المخصص غير معتمد حاليًا لهذا الجهاز.\nحدد هذا الخيار مرة أخرى في المستقبل لمعرفة ما إذا تمت إضافة الدعم! + إدارة بيانات يوزو + استيراد/تصدير البرامج الثابتة والمفاتيح وبيانات المستخدم والمزيد! + مشاركة ملف الحفظ + فشل تصدير الحفظ + + نسخ إلى الحافظة + محاكي سويتش مفتوح المصدر + المساهمين + https://github.com/yuzu-emu/yuzu/graphs/contributors + المشاريع التي تجعل تطبيق يوزو لنظام أندرويد ممكنًا + البناء + بيانات المستخدم + جارٍ تصدير بيانات المستخدم + جارٍ استيراد بيانات المستخدم + استيراد بيانات المستخدم + نسخة احتياطية يوزو غير صالحة + تم تصدير بيانات المستخدم بنجاح + تم استيراد بيانات المستخدم بنجاح + تم إلغاء التصدير + https://discord.gg/u77vRWY + https://yuzu-emu.org/ + https://github.com/yuzu-emu + + + الوصول المبكر + احصل على الوصول المبكر + https://play.google.com/store/apps/details?id=org.yuzu.yuzu_emu.ea + الميزات المتطورة، والوصول المبكر إلى التحديثات، وأكثر من ذلك + مزايا الوصول المبكر + ميزات متطورة + الوصول المبكر إلى التحديثات + لا يوجد التثبيت اليدوي + الدعم ذو الأولوية + المساعدة في الحفاظ على اللعبة + امتناننا الأبدي + هل انت مهتم؟ + + + الحد من السرعة + يحد من سرعة المحاكاة بنسبة محددة من السرعة العادية + الحد من السرعة في المئة + يحدد النسبة المئوية للحد من سرعة المحاكاة. 100% هي السرعة الطبيعية. ستؤدي القيم الأعلى أو الأدنى إلى زيادة أو تقليل حد السرعة. + دقة وحدة المعالجة المركزية + %1$s%2$s + + + وضع الإرساء + زيادة الدقة، وانخفاض الأداء. يتم استخدام الوضع المحمول عند تعطيله، مما يؤدي إلى خفض الدقة وزيادة الأداء. + المنطقة التي تمت محاكاتها + لغة المحاكاه + حدد التاريخ و الساعة في الوقت الحقيقي + حدد وقت الساعة في الوقت الفعلي + ساعة مخصصة في الوقت الحقيقي + يسمح لك بتعيين ساعة مخصصة في الوقت الفعلي منفصلة عن وقت النظام الحالي لديك + تعيين ساعة مخصصة في الوقت الحقيقي + + + مستوى الدقة + (Handheld/Docked) الدقة + VSync وضع + الاتجاه + تناسب الابعاد + طريقة مكافحة التعرج + استخدم تظليل غير متزامن + يجمع التظليل بشكل غير متزامن، مما يقلل من التأتأة ولكنه قد يؤدي إلى حدوث بعض الأخطاء. + استخدم التنظيف التفاعلي + تحسين دقة العرض في بعض الألعاب على حساب الأداء + يقلل من التأتأة عن طريق تخزين وتحميل التظليلات التي تم إنشاؤها محليًا. + + + وحدة المعالج المركزية + تصحيح أخطاء وحدة المعالجة المركزية + يضع وحدة المعالجة المركزية في وضع التصحيح البطيء. + GPU + API + تصحيح الأخطاء الرسومية + يضبط واجهة برمجة تطبيقات الرسومات على وضع تصحيح الأخطاء البطيء. + Fastmem + + + محرك الإخراج + حجم + يحدد حجم إخراج الصوت + + + افتراضي + الإعدادات المحفوظة + الإعدادات المحفوظة لـ %1$s + القائمة غير المنفذة + جاري تحميل + إيقاف تشغيل + هل تريد إعادة تعيين هذا الإعداد مرة أخرى إلى قيمته الافتراضية؟ + إعادة تعيين إلى الافتراضي + إعادة تعيين جميع الإعدادات؟ + سيتم إعادة تعيين كافة الإعدادات المتقدمة إلى تكوينها الافتراضي. هذا لا يمكن التراجع عنها. + إعادة تعيين الأعدادات + إغلاق + معرفة المزيد + تلقائي + إرسال + قيمه خاليه + استيراد + تصدير + فشل التصدير + فشل الاستيراد + إلغاء + + + GPU حدد برنامج تشغيل + الحالي الخاص بك؟ GPU هل ترغب في استبدال برنامج تشغيل + تثبيت + افتراضي + يستخدم تعريف معالج الرسوميات الافتراضي + تم تحديد برنامج تشغيل غير صالح ، باستخدام النظام الافتراضي + تعريف معالج الرسوميات الخاص بالنظام + جارٍ تثبيت برنامج التشغيل… + + + إعدادات + عام + النظام + الرسوميات + الصوت + السمة واللون + تصحيح الأخطاء + + + الخاص بك ROM تم تشفير + حدث خطأ أثناء تهيئة مركز الفيديو + ROM غير قادر على تحميل + غير موجود ROM ملف + + + الخروج من المحاكاة + منجز + عداد إطار/ثانية + تبديل عناصر التحكم + مركز العصا النسبي + مزلاق أزرار الاتجاهات + الاهتزازات الديناميكية + عرض التراكب + تبديل الكل + ضبط التراكب + حجم + العتامه + إعادة تعيين التراكب + تحرير التراكب + إيقاف المحاكاة مؤقتًا + إلغاء الإيقاف المؤقت للمضاهاة + خيارات التراكب + + جارٍ تحميل الإعدادات + + + لوحة المفاتيح البرمجية + + + إلغاء + استمر + لم يتم العثور على أرشيف النظام + أرشيف النظام + خطأ في الحفظ/التحميل + خطا فادح + سيؤدي إيقاف تشغيل هذا الإعداد إلى تقليل أداء المحاكاة بشكل ملحوظ! للحصول على أفضل تجربة، يوصى بترك هذا الإعداد ممكنًا. + %1$s %2$s + لا توجد لعبة قابلة للتمهيد + + + اليابان + الولايات المتحدة الأمريكية + أوروبا + أستراليا + الصين + كوريا + تايوان + + + Byte + KB + MB + GB + TB + PB + EB + + + Vulkan + لاشيء + + + عادي + عالي + Extreme (بطيء) + + + 0.5X (360p/540p) + 0.75X (540p/810p) + 1X (720p/1080p) + 2X (1440p/2160p) (بطيء) + 3X (2160p/3240p) (بطيء) + 4X (2880p/4320p) (بطيء) + + + Immediate (Off) + Mailbox + FIFO (On) + FIFO Relaxed + + + Nearest Neighbor + Bilinear + Bicubic + Gaussian + ScaleForce + AMD FidelityFX™ Super Resolution + + + لا شيء + FXAA + SMAA + + + افقي + عمودي + تلقائي + + + (16:9) افتراضي + 4:3 فرض + 21:9 فرض + 16:10 فرض + تمتد إلى النافذة + + + دقه + غير آمن + Paranoid (Slow) + + + أزرار الاتجاهات + العصا اليسرى + العصا اليمنى + شاشة الإستقبال + لقطة شاشة + + + تحضير التظليل + بناء التظليل + + + تغيير سمة التطبيق + افتراضي + Material You + + + تغيير وضع السمة + اتبع النظام + فاتح + غامق + + + cubeb + + + خلفيات سوداء + عند استخدام المظهر الداكن، قم بتطبيق خلفيات سوداء. + + + صورة داخل صورة + تصغير النافذة عند وضعها في الخلفية + توقف + تشغيل + كتم + إلغاء الكتم + + + التراخيص + AMD ترقية عالية الجودة من + diff --git a/src/android/app/src/main/res/values-ckb/strings.xml b/src/android/app/src/main/res/values-ckb/strings.xml new file mode 100644 index 0000000000..d2e5fee194 --- /dev/null +++ b/src/android/app/src/main/res/values-ckb/strings.xml @@ -0,0 +1,336 @@ + + + + ئەم نەرمەکاڵایە یارییەکانی کۆنسۆلی نینتێندۆ سویچ کارپێدەکات. هیچ ناونیشانێکی یاری و کلیلی تێدا نییە..<br /><br />پێش ئەوەی دەست پێ بکەیت، تکایە شوێنی فایلی prod.keys ]]> دیاریبکە لە نێو کۆگای ئامێرەکەت.<br /><br />زیاتر فێربە]]> + ئیمولەیشن کارایە + ئاگادارکردنەوەیەکی بەردەوام نیشان دەدات کاتێک ئیمولەیشن کاردەکات. + یوزو کاردەکات + ئاگاداری و هەڵەکان + ئاگادارکردنەوەکان پیشان دەدات کاتێک شتێک بە هەڵەدا دەچێت. + مۆڵەتی ئاگادارکردنەوە نەدراوە! + + + بەخێربێیت! + فێربە چۆن <b>yuzu</b> ڕێکبخەیت و بچییە ناو ئیمولەیشن. + دەست پێبکە + کلیلەکان + فایلی <b>prod.keys</b> هەڵبژێرە بە دوگمەی خوارەوە. + کلیلەکان هەڵبژێرە + یاریەکان + فۆڵدەری <b>Games</b> هەڵبژێرە بە دوگمەی خوارەوە. + تەواو + تۆ تەواو ئامادەیت.\nچێژ لە یارییەکانت وەربگرە! + بەردەوام بوون + دواتر + گەڕانەوە + زیادکردنی یاری + فۆڵدەری یارییەکانت هەڵبژێرە + + یاریەکان + گەڕان + ڕێکخستنەکان + تا ئێستا هیچ فایلێک نەدۆزراوەتەوە یان هیچ ناونیشانێکی یاری هەڵنەبژێردراوە. + گەڕان و فلتەرکردنی یارییەکان + فۆڵدەری یارییەکان هەڵبژێرە + ڕێگە بە یوزو دەدات بۆ پڕکردنەوەی لیستی یارییەکان + هەڵبژاردنی فۆڵدەری یارییەکان تێپەڕدەکەیت؟ + یارییەکان لە لیستی یارییەکاندا پیشان نادرێن ئەگەر فۆڵدەرێک هەڵنەبژێردرێت. + https://yuzu-emu.org/help/quickstart/#dumping-games + گەڕان بەدوای یارییەکاندا + ناونیشانی یارییەکان هەڵبژێردرا + دابمەزرێنە prod.keys + پێویستە بۆ کۆدکردنەوەى یارییە تاکەکەسییەکان + زیادکردنی کلیلەکان تێپەڕدەکەیت؟ + کلیلی دروست پێویستە بۆ وەرگرتنی یارییەکانی تاکەکەسی. تەنها ئەپەکانی homebrew کاردەکەن ئەگەر بەردەوام بیت. + https://yuzu-emu.org/help/quickstart/#guide-introduction + ئاگادارکردنەوەکان + بە دوگمەی خوارەوە مۆڵەتی ئاگادارکردنەوەکە بدە. + مۆڵەت بدە + پێدانی مۆڵەتی ئاگادارکردنەوە تێپەڕدەکەیت؟ + یوزو ناتوانێت لە زانیاری گرنگ ئاگادارت بکاتەوە. + مۆڵەت پێدان ڕەتکرایەوە + زۆر جار ئەم مۆڵەتەت ڕەتکردۆتەوە و ئێستا دەبێت بە دەستی ڕێگەپێدان بکەیت لە ڕێکخستنەکانی سیستەمدا. + دەربارە + وەشانی دروستکردن، بیتبێن و زۆر شتیتر + یارمەتی + پەڕاندن + ڕەتکردنەوە + دامەزراندنی کلیلی Amiibo + پێویستە بۆ بەکارهێنانی Amiibo لە یاریدا + فایلی کلیلێکی نادروست هەڵبژێردرا + کلیلەکان بە سەرکەوتوویی دامەزران + هەڵە لە خوێندنەوەی کۆدکردنی کلیل + دڵنیابەوە کە فایلی کلیلەکانت درێژکراوەی .keys ی هەیە و دووبارە هەوڵبدەرەوە. + دڵنیابە کە فایلی کلیلەکانت درێژکراوەی .bin ی هەیە و دووبارە هەوڵبدەرەوە. + کلیلی کۆدکردنی نادروستە + https://yuzu-emu.org/help/quickstart/#dumping-decryption-keys + فایلە هەڵبژێردراوەکە هەڵەیە یان تێکچووە. تکایە دووبارە کلیلەکانت دەربێنەوە. + دامەزراندنی وەگەڕخەری GPU + دامەزراندنی وەگەڕخەری بەدیل بۆ ئەوەی بە ئەگەرێکی زۆرەوە کارایی باشتر یان وردبینی هەبێت + ڕێکخستنە پێشکەوتووەکان + سازدانی ڕێکخستنەکانی ئیمولەیتەر + بەم دواییە یاری کردووە + بەم دواییە زیادکرا + بەتاک + هۆم بریو + کردنەوەی فۆڵدەری یوزو + بەڕێوەبردنی فایلە ناوخۆییەکانی یوزو + دەستکاری کردنی شێوازی ئەپەکە + هیچ فایل بەڕێوەبەرێک نەدۆزرایەوە + نەتوانرا ناونیشانی یوزو بکرێتەوە + تکایە شوێنی فۆڵدەری بەکارهێنەر لەگەڵ پانێڵی لایەنی فایل بەڕێوەبارەکان بە دەست بدۆزەرەوە. + بەڕێوەبردنی داتای پاشەکەوتکراو + داتای پاشەکەوتکراو دۆزراوە. تکایە لە خوارەوە بژاردەیەک هەڵبژێرە. + هاوردەکردن یان هەناردەکردنی فایلی پاشەکەوتکراو + بە سەرکەوتوویی هاوردە کرا + پێکهاتەی شوێنی پاشەکەوتکراو نادروستە + ناوی یەکەمی فۆڵدەر دەبێت ناسنامەی ناونیشانی یارییەکە بێت. + هاوردەکردن + هەناردەکردن + دامەزراندنی پتەوواڵا + پتەوواڵا دەبێت لە ئەرشیفی زیپدا بێت و پێویستە بۆ بووتکردنی هەندێک یاری + دامەزرانی پتەوواڵا + پتەوواڵا بە سەرکەوتوویی دامەزرا + دامەزراندنی پتەوواڵا شکستی هێنا + هاوبەشی پێکردنی لۆگەکانی چاککردنەوە + فایلە لۆگەکەی یوزو هاوبەش بکە بۆ چاککردنی کێشەکان + هیچ فایلێکی لۆگ نەدۆزراوە + دامەزراندنی ناوەڕۆکی یاری + دامەزراندنی نوێکاری یارییەکان یان DLC + https://yuzu-emu.org/help/quickstart/#dumping-installed-updates + + گایا ڕاستەقینە نییە + کۆپی کرا بۆ تەختەی نووسین + ئیمۆلیتەرێکی سەرچاوە-کراوەی سویچ + بەشداربووان + دروستکراوە لەگەڵ \u2764 لەلایەن تیمەکەی یوزو + https://github.com/yuzu-emu/yuzu/graphs/contributors + ئەو پڕۆژانەی کە یوزوی بۆ ئەندرۆید ڕەخساند + بونیات + https://discord.gg/u77vRWY + https://yuzu-emu.org/ + https://github.com/yuzu-emu + + + بەزوویی دەسپێگەشتن + بەدەستهێنانی بەزوویی دەسپێگەشتن + https://play.google.com/store/apps/details?id=org.yuzu.yuzu_emu.ea + تایبەتمەندییە پێشکەوتووەکان، بەزوویی دەستگەیشتن بە نوێکارییەکان و زۆر شتی تر + سوودەکانی بەزوویی دەسپێگەشتن + تایبەتمەندییە پێشکەوتووەکان + زوو دەستگەیشتن بە نوێکارییەکان + چیتر دامەزراندنی دەستی نییە + پشتگیری لە پێشینە + یارمەتیدانی پاراستنی یارییەکان + سوپاس و پێزانینی هەمیشەییمان + ئایا تۆ خوازیاریت؟ + + + سنووردارکردنی خێرایی + خێرایی ئیمولەیشن سنووردار دەکات بۆ ڕێژەیەکی دیاریکراو لە خێرایی ئاسایی. + سنووردارکردنی لەسەدای خێرایی + ڕێژەی سەدی دیاری دەکات بۆ سنووردارکردنی خێرایی ئیمولەیشن. 100% خێرایی ئاساییە. بەهایی بەرزتر یان نزمتر دەبێتە هۆی زیاد یان کەمکردنەوەی سنووری خێرایی. + وردی CPU + + دۆخی دۆککراو + ڕوونی زیاد دەکات، کارایی کەم دەکاتەوە. دۆخی دەستی بەکاردێت کاتێک لەکاردەخرێت، ئەمەش ڕوونی دادەبەزێنێت و کارایی زیاد دەکات. + ناوچەی ئیمولەیشن + زمانی ئیمولەیتەر + هەڵبژاردنی بەرواری RTC + هەڵبژاردنی کاتی RTC + RTCی تایبەتمەند + ڕێگەت پێدەدات کاتژمێرێکی کاتی ڕاستەقینەی تایبەتمەند دابنێیت کە جیاوازە لە کاتی ئێستای سیستەمەکەت. + دانانی RTCی تایبەتمەند + + + ئاستی وردبینی + ڕوونی (دۆخی دەستی/دۆخی دۆک) + دۆخی VSync + ڕێژەی ڕووبەری شاشە + فلتەری گونجاندنی پەنجەرە + شێوازی دژە-خاوڕۆیی + ناچاریکردن بۆ زۆرترین کاتژمێر (تەنها ئەدرینۆ) + GPU ناچار دەکات بە زۆرترین کاتژمێر کاربکات (هێشتا سنووردارکردنی گەرمی جێبەجێ دەکرێت). + بەکارهێنانی سێبەری ناهاوسەنگ + سێبەرەکان بە شێوەیەکی ناهاوسەنگ کۆدەکاتەوە، پچڕپچڕی کەمدەکاتەوە بەڵام لەوانەیە گلێچ دروستکا. + بەکارهێنانی بەرپێچدەرەوە + وردی ڕێندەرکردن لە هەندێک یاریدا باشتر دەکات لەسەر تێچووی کارایی. + بیرگەخێرای سێبەری دیسک + پچڕپچڕی کەمدەکاتەوە بە هەڵگرتن و بارکردنی سێبەری دروستکراو لە ناوخۆدا. + + + CPU + API گرافیک + چاککردنەوەی گرافیک + API ی گرافیکەکان ڕێکدەخات بۆ دۆخی چاککردنی خاو. + قەبارەی دەنگی + دیاریکردنی قەبارەی دەنگی دەرچووی بیستۆک و بزوێنەری دەنگی دەرەکی. + + + بنەڕەت + ڕێکخستنە پاشەکەوتکراوەکان + ڕێکخستنە پاشەکەوتکراوەکان بۆ %1$s + هەڵە لە پاشەکەوتکردن %1$s.ini: %2$s + بارکردن... + ئایا دەتەوێت ئەم ڕێکخستنە بگەڕێنیتەوە بۆ بەهای بنەڕەتی خۆی؟ + دوبارە ڕێکخستنەوەی بۆ بنەڕەت + هەموو ڕێکخستنەکان دوبارە ڕێک دەخاتەوە؟ + هەموو ڕێکخستنە پێشکەوتووەکان دەگەڕێنەوە بۆ ڕێکخستنی بنەڕەتی خۆیان. پاشگەز بوونەوەی نییه. + دوبارە ڕێککردنەوەی ڕێکخستنەکان + داخستن + زیاتر فێربە + خودکار + پێشکەشکردن + هاوردەکردن + هەناردەکردن + + هەڵبژاردنی وەگەڕخەری GPU + حەز دەکەیت وەگەڕخەری GPU ی ئێستات بگۆڕیت؟ + دامەزراندن + بنەڕەت + بەکارهێنانی وەگەڕخەری GPU ی بنەڕەت + وەگەڕخەری نادروست هەڵبژێردرا، بە بەکارهێنانی بنەڕەتی سیستەم! + وەگەڕخەری GPU ی سیستەم + دامەزراندنی وەگەڕخەر... + + + ڕێکخستنەکان + گشتی + سیستەم + گرافیک + دەنگ + ڕەنگ و ڕووکار + چاککردنەوە + + + ڕۆمەکەت کۆدکراوە + prod.keys فایلەکەت بۆ ئەوەی بتوانرێت یارییەکان کۆد بکرێنەوە.]]> + هەڵەیەک لە دەستپێکردنی ناوەکی ڤیدیۆکەدا ڕوویدا + ئەمەش بەزۆری بەهۆی وەگەڕخەرێکی ناتەبای GPU ەوەیە. دامەزراندنی وەگەڕخەری GPU ی تایبەتمەندکراو لەوانەیە ئەم کێشەیە چارەسەر بکات. + ناتوانرێت ڕۆم باربکرێت + فایلی ڕۆم بوونی نییە + + + دەرچوون لە ئیمولەیشن + تەواو + FPS ژمێر + گۆڕینی کۆنتڕۆڵ + ناوەندی گێڕ بەنزیکەیی + خلیسکانی 4 دوگمەکە + لەرینەوەی پەنجەلێدان + نیشاندانی داپۆشەر + گۆڕینی سەرجەم + ڕێکخستنی داپۆشەر + پێوەر + ڕوونی + دووبارە ڕێکخستنەوەی داپۆشەر + دەستکاریکردنی داپۆشەر + وەستاندنی ئیمولەیشن + لادانی وەستاندنی ئیمولەیشن + هەڵبژاردەکانی داپۆشەر + + بارکردنی ڕێکخستنەکان... + + + کیبۆردی نەرمەکاڵا + + + دەربارە + بەردەوام بوون + ئەرشیفی سیستەم نەدۆزراوە + %s دیار نییە. تکایە ئەرشیفی سیستەمەکەت فڕێ بدە.\nبەردەوامی ئیمولەیشن لەوانەیە ببێتە هۆی تێکچوون و فڕێدانەدەرەوە. + ئەرشیفێکی سیستەم + هەڵەی پاشەکەوتکردن/بارکردن + هەڵەی کوشندە + هەڵەیەکی کوشندە ڕوویدا. بۆ وردەکارییەکان لۆگەکە بپشکنە.\nبەردەوامی ئیمولەیشن لەوانەیە ببێتە هۆی تێکچوون و فڕێدانەدەرەوە. + کوژاندنەوەی ئەم ڕێکخستنە دەبێتە هۆی کەمکردنەوەی کارایی ئیمولەیشن! بۆ باشترین ئەزموون، باشترە ئەم ڕێکخستنە چالاک بهێڵیتەوە. + + ژاپۆن + ئەمریکا + ئەورووپا + ئوسترالیا + چین + کۆریا + تایوان + + GB + + ڤوڵکان + هیچ + + + ئاسایی + بەرز + ئەوپەڕ (خاو) + + + 0.5X (360p/540p) + 0.75X (540p/810p) + 1X (720p/1080p) + 2X (1440p/2160p) (خاو) + 3X (2160p/3240p) (خاو) + 4X (2880p/4320p) (خاو) + + + دەستبەجێ (کوژاوە) + سندوقی پۆستە + FIFO (پێکراو) + FIFO ئارام + + + نزیکترین دراوسێ + دوو هێڵی + دووخشتەکی + گاوسی + پێوەرهێز + AMD FidelityFX™ سوپەر ووردبینی + + + هیچ + FXAA + SMAA + + خودکار + + + بنەڕەت (16:9) + ڕووبەری 4:3 + ڕووبەری 21:9 + ڕووبەری 16:10 + کشانی پڕ بەشاشە + + + وورد + ناسەقامگیر + بەگومان (خاو) + + + 4 دوگمەکە + گێڕی چەپ + گێڕی ڕاست + ماڵەوە + وێنەگرتنی شاشە + + + ئامادەکردنی سێبەرەکان + دروستکردنی سێبەرەکان + + + گۆڕینی ڕووکاری ئەپەکە + بنەڕەت + کەرەستەی تۆ + + + گۆڕینی دۆخی ڕووکار + پەیڕەوی کردنی سیستەم + ڕوناکی + تاریک + + + پاشبنەمای ڕەش + لە کاتی بەکارهێنانی ڕووکاری تاریکدا، پاشبنەمای ڕەش دادەنێ. + + + مۆڵەتەکان + بەرزکردنەوەی کوالێتی بەرز لە کۆمپانیای AMD + diff --git a/src/android/app/src/main/res/values-de/strings.xml b/src/android/app/src/main/res/values-de/strings.xml index 72a47fbdbb..9c6590b5e9 100644 --- a/src/android/app/src/main/res/values-de/strings.xml +++ b/src/android/app/src/main/res/values-de/strings.xml @@ -1,5 +1,5 @@ - + Diese Software kann Spiele für die Nintendo Switch abspielen. Keine Spiele oder Spielekeys sind enthalten.<br /><br />Bevor du beginnst, bitte halte deine prod.keys ]]> auf deinem Gerät bereit. .<br /><br />Mehr Infos]]> Emulation ist aktiv @@ -25,6 +25,7 @@ Zurück Spiele hinzufügen Spieleverzeichnis auswählen + Fertig! Spiele @@ -38,6 +39,7 @@ Spiele werden in der Spieleliste nicht angezeigt, wenn kein Ordner ausgewählt ist. https://yuzu-emu.org/help/quickstart/#dumping-games Spiele suchen + Einstellungen suchen Spieleverzeichnis ausgewählt prod.keys installieren Zum Entschlüsseln von Spielen benötigt @@ -60,8 +62,11 @@ Ungültige Schlüsseldatei ausgewählt Schlüssel erfolgreich installiert Fehler beim Lesen der Schlüssel + Überprüfen Sie, ob Ihre Schlüsseldatei die Erweiterung \".keys\" hat, und versuchen Sie es erneut. + Überprüfen Sie, ob Ihre Schlüsseldatei die Erweiterung \".bin\" hat, und versuchen Sie es erneut. Ungültige Schlüssel https://yuzu-emu.org/help/quickstart/#dumping-decryption-keys + Die ausgewählte Datei ist falsch oder beschädigt. Bitte kopieren Sie Ihre Schlüssel erneut. GPU-Treiber installieren Alternative Treiber für eventuell bessere Leistung oder Genauigkeit installieren Erweiterte Einstellungen @@ -84,7 +89,17 @@ Der erste Unterordnername muss die Titel-ID des Spiels sein. Importieren Exportieren - + Firmware installieren + Die Firmware muss in einem ZIP-Archiv vorliegen und wird zum Booten einiger Spiele benötigt + Firmware wird installiert + Die Firmware wurde erfolgreich installiert! + Bei der Firmware installation ist etwas fehlgeschlagen. + Debug-Logs teilen + Debug-Logs an yuzu zur Untersuchung absenden + Keine Log-Datei gefunden + Spiel installieren + Spiel Update oder DLC installieren + https://yuzu-emu.org/help/quickstart/#dumping-installed-updates Gaia ist nicht real In die Zwischenablage kopiert @@ -92,7 +107,10 @@ Beitragende Gemacht mit \u2764 vom yuzu Team https://github.com/yuzu-emu/yuzu/graphs/contributors + Projekte, die yuzu für Android möglich machen Build + Nutzerdaten + Export abgebrochen https://discord.gg/u77vRWY https://yuzu-emu.org/ https://github.com/yuzu-emu @@ -107,45 +125,39 @@ Früherer Zugriff auf Updates Keine manuelle Installation Priorisierte Unterstützung + Beitrag zur Erhaltung der Spiele Unsere ewige Dankbarkeit Bist du interessiert? - Geschwindigkeitsbegrenzung aktivieren - Wenn aktiviert, wird die Emulationsgeschwindigkeit auf einen Prozentsatz der normalen Geschwindigkeit begrenzt. + Limitierte Geschwindigkeit + Limitiert die Geschwindigkeit auf einen von dir festgelegten Prozentsatz. Geschwindkeitsbegrenzung in Prozent - Legt den Prozentsatz der Bergrenzung der Emulationsgeschwindigkeit fest. Mit dem Standardwert von 100% wird die Emulation auf die normale Geschwindigkeit begrenzt. Höhere oder niedrigere Werte erhöhen oder verringern die Geschwindigkeitsbegrenzung. + Gibt die prozentuale Geschwindigkeit der Emulation an. 100% sind normal. Werte darüber oder drunter werden die Geschwindigkeit entsprechend verändern. CPU-Genauigkeit - - Dock-Modus - Emuliert im Dock-Modus, was die Auflösung verbessert, aber die Leistung senkt. + Gedockter Modus + Der Docked Modus erhöht die Auflösung, verringert die aber die Leistung. Wird der Handheld-Modus verwendet, verringert es die Auflösung und erhöht die Leistung. Emulierte Region Emulierte Sprache RTC-Datum auswählen RTC-Zeit auswählen - Benutzerdefinierte RTC aktivieren - Mit dieser Einstellung kann eine benutzerdefinierte Echtzeituhr unabhängig von der aktuellen Systemzeit verwendet werden. - Benutzerdefinierte RTC einstellen - + Benutzerdefinierte Echtzeituhr - API Genauigkeitsstufe - Auflösung VSync-Modus + Orientierung Seitenverhältnis Fensteranpassungsfilter - Kantenglättungs-Methode Maximale Taktfrequenz erzwingen (nur Adreno) Erzwingt den Betrieb der GPU mit der maximal möglichen Taktfrequenz (Temperaturbeschränkungen werden weiterhin angewendet). Asynchrone Shader nutzen - Kompiliert Shader asynchron, was Ruckler reduziert, aber zu Glitches führen kann. - Grafik-Debugging aktivieren - Wenn aktiviert, schaltet die Grafik-API in einen langsameren Debugging-Modus. - Nutze Festplatten-Shader-Cache - Ruckeln wird durch das Speichern und Laden von generierten Shadern auf der Festplatte reduziert. - - + + CPU + CPU Debugging + GPU + API + Graphik-Debugging Lautstärke Legt die Lautstärke der Audioausgabe fest. @@ -154,14 +166,22 @@ Einstellungen gespeichert Einstellungen für %1$s gespeichert Fehler beim Speichern von %1$s.ini: %2$s + Unimplementiertes Menü Lädt... Möchtest du diese Einstellung auf den Standardwert zurücksetzen? Auf Standard zurücksetzen Alle Einstellungen zurücksetzen? - Alle erweiterten Einstellungen werden auf ihren Standardwert zurückgesetzt. Dies kann nicht rückgängig gemacht werden. Einstellungen zurückgesetzt Schließen Mehr erfahren + Auto + Absenden + Null + Importieren + Exportieren + Export fehlgeschlagen + Import fehlgeschlagen + Abbrechen GPU-Treiber auswählen @@ -169,6 +189,7 @@ Installieren Standard Standard GPU-Treiber wird verwendet + Ungültiger Treiber ausgewählt, Standard-Treiber wird verwendet! System GPU-Treiber Treiber wird installiert... @@ -179,6 +200,7 @@ Grafik Audio Theme und Farbe + Debug Das ROM ist verschlüsselt @@ -192,22 +214,15 @@ Emulation beenden Fertig FPS Zähler - Steuerung umschalten - Relative Stick-Mitte - DPad Slide - Haptik - Overlay anzeigen Alle umschalten Overlay anpassen Größe Transparenz Overlay zurücksetzen Overlay bearbeiten - Emulation pausieren - Emulation fortsetzen Overlay-Optionen - Lädt Einstellungen... + Lade Einstellungen... Software-Tastatur @@ -221,7 +236,7 @@ Schwerwiegender Fehler Ein schwerwiegender Fehler ist aufgetreten. Einzelheiten wurden im Log protokolliert.\nDas Fortsetzen der Emulation kann zu Abstürzen und Bugs führen. Das Deaktivieren dieser Einstellung führt zu erheblichen Leistungsverlusten! Für ein optimales Erlebnis wird empfohlen, sie aktiviert zu lassen. - + %1$s %2$s Japan USA @@ -231,6 +246,15 @@ Korea Taiwan + + Byte + KB + MB + GB + TB + PB + EB + Vulkan Keiner @@ -267,12 +291,15 @@ FXAA SMAA + Portrait + Auto + Standard (16:9) 4:3 erzwingen 21:9 erzwingen Erzwinge 16:10 - Auf Fenster anpassen + Auf Bildschirmgröße anpsassen Akkurat @@ -280,9 +307,9 @@ Paranoid (Langsam) - Steuerkreuz - Linker Analogstick - Rechter Analogstick + D-Pad + Linker Stick + Rechter Stick Home Screenshot @@ -291,18 +318,30 @@ Shader werden erstellt - App-Theme ändern + App-Thema ändern Standard Material You - Theme-Modus ändern + Themen-Modus ändern System folgen Hell Dunkel + + cubeb + - Schwarze Hintergünde verwenden + Schwarze Hintergründe Bei Verwendung des dunklen Themes, schwarze Hintergründe verwenden. - + + Bild im Bild + Pause + Stummschalten + Ton aktivieren + + + Lizenzen + Hochwertiges Upscaling von AMD + diff --git a/src/android/app/src/main/res/values-es/strings.xml b/src/android/app/src/main/res/values-es/strings.xml index e5bdd58894..103ac6e653 100644 --- a/src/android/app/src/main/res/values-es/strings.xml +++ b/src/android/app/src/main/res/values-es/strings.xml @@ -1,7 +1,7 @@ - + - Este software ejecuta juegos para la videoconsola Nintendo Switch. Los videojuegos o keys no vienen incluidos.<br /><br />Antes de empezar, por favor, localice el archivo prod.keys ]]>en el almacenamiento de su dispositivo..<br /><br />Saber más]]> + Este software ejecuta juegos para la videoconsola Nintendo Switch. Los videojuegos o claves no vienen incluidos.<br /><br />Antes de empezar, por favor, localice el archivo prod.keys ]]>en el almacenamiento de su dispositivo..<br /><br />Saber más]]> Emulación activa Muestra una notificación persistente cuando la emulación está activa. yuzu esta ejecutándose @@ -25,6 +25,7 @@ Atrás Añadir Juegos Selecciona la carpeta de juegos + ¡Completado! Juegos @@ -37,7 +38,8 @@ ¿Omitir la selección de la carpeta de juegos? No se mostrará ningún juego si no se ha seleccionado una carpeta de juegos. https://yuzu-emu.org/help/quickstart/#dumping-games - Buscar Juegos + Buscar juegos + Buscar configuración Directorio de juegos seleccionado Instalar prod.keys Requerido para descifrar juegos @@ -58,15 +60,18 @@ Cancelar Instalar clave de Amiiboo Necesario para usar Amiibo en el juego - Archivo de claves inválido seleccionado + Archivo de claves seleccionado inválido Claves instaladas correctamente Error al leer las claves de cifrado + Compruebe que el archivo de claves tenga una extensión .keys y pruebe otra vez. + Compruebe que el archivo de claves tenga una extensión .bin y pruebe otra vez. Claves de cifrado no válidas https://yuzu-emu.org/help/quickstart/#dumping-decryption-keys El archivo seleccionado es incorrecto o está corrupto. Vuelva a redumpear sus claves. Instalar driver de GPU Instale drivers alternativos para obtener un rendimiento o una precisión potencialmente mejores Opciones avanzadas + Configuración avanzada: %1$s Configurar las opciones del emulador Jugado recientemente Añadido recientemente @@ -86,6 +91,33 @@ El nombre de la primera subcarpeta debe ser el Title ID del juego. Importar Exportar + Instalar firmware + El firmware debe estar en un archivo ZIP y es necesario para ejecutar algunos juegos + Instalando firmware + Firmware instalado con éxito + Falló la instalación de firmware + Asegúrese de que los archivos nca del firmware estén en la raíz del zip e inténtelo de nuevo. + Compartir registros de depuración + Comparta el archivo de registro de yuzu para depurar problemas + No se encontró ningún archivo de registro + Instalar contenido de juego + Instalar actualizaciones o DLC + Instalando contenido... + Error instalando archivo(s) a la NAND + Asegúrese de que el/los contenido(s) son válidos y que el archivo prod.keys esté instalado. + La instalación de los juegos base no está permitida para así evitar posibles conflictos. + Sólo hay soporte para el contenido en NSP y XCI. Asegúrese de que el/los contenido(s) son válidos. + %1$d error(es) de instalación + Contenido(s) de juego instalado/s con éxito + %1$d instalado con éxito + %1$d sobreescrito con éxito + https://yuzu-emu.org/help/quickstart/#dumping-installed-updates + Drivers personalizados no soportados + En estos momentos, la carga de drivers personalizados no está disponible para este dispositivo..\n¡Comprueba esta opción en el futuro para ver si ya está añadido el soporte a ese dispositivo! + Administrar datos de yuzu + Importa/exporta el firmware, las keys, los datos de usuario, ¡y más! + Compartir archivo de guardado + La exportación del guardado falló Gaia no es real @@ -94,7 +126,18 @@ Contribuidores Hecho con \u2764 del equipo yuzu https://github.com/yuzu-emu/yuzu/graphs/contributors + Proyectos que hacen que yuzu para Android sea una realidad Versión + Datos de usuario + Importa/exporta todos los datos de usuario.\n\nCuando se importen los datos de usuario, ¡los demás datos de usuario existentes serán borrados! + Exportando datos de usuario... + Importando datos de usuario... + Importar datos de usuario + Backup de válido + Datos de usuario exportados con éxito + Datos de usuario importados con éxito + Exportación cancelada + Asegúrese de que las carpetas de datos de usuario estén en la raíz de la carpeta del zip y contengan un archivo config en config/config.ini e inténtelo de nuevo. https://discord.gg/u77vRWY https://yuzu-emu.org/ https://github.com/yuzu-emu @@ -114,41 +157,53 @@ ¿Estás interesado? - Activar limite de velocidad - Cuando está habilitado, la velocidad de emulación se limitará a un porcentaje específico de la velocidad normal. + Limitar velocidad + Limita la velocidad de emulación a un porcentaje específico de la velocidad normal. Limitar porcentaje de velocidad - Especifica el porcentaje para limitar la velocidad de emulación. Con el valor predeterminado del 100 %, la emulación se limitará a la velocidad normal. Valores más altos o más bajos aumentarán o disminuirán el límite de velocidad. + Especifica el porcentaje para limitar la velocidad de emulación. 100% es la velocidad normal. Valores más altos o bajos incrementarán o disminuirán el límite de velocidad. Precisión de CPU + %1$s%2$s - Modo sobremesa - Emula en modo sobremesa, lo que aumenta la resolución perjudicando el rendimiento. + Modo Sobremesa + Incrementa la resolución al coste de reducir el rendimiento. El Modo Portátil es usado cuando está desactivado, reduciendo la resolución y mejorando así el rendimiento. Región emulada Idioma emulado - Seleccionar Fecha RTC - Seleccionar Tiempo RTC - Habilitar RTC Personalizado - Esta configuración le permite configurar un reloj de tiempo real personalizado diferente a la hora actual de su sistema - Establecer RTC Personalizado + Seleccionar fecha RTC + Seleccionar tiempo RTC + RTC personalizado + Te permite tener un reloj personalizado en tiempo real diferente del tiempo del propio sistema. + Configurar RTC personalizado - API Nivel de precisión - Resolución + Resolución (Portátil/Sobremesa) Modo VSync + Orientación Relación de aspecto Filtro de adaptación de ventana - Metodo Anti Aliasing + Método anti-aliasing Forzar velocidad al máximo (solo Adreno) Fuerza a la GPU a ejecutarse a la velocidad máxima de reloj posible (se seguirán aplicando restricciones térmicas). Usar shaders asíncronos - Compila shaders de forma asincrónica, lo que reducirá los parones pero puede introducir fallos. - Habilitar la depuración de gráficos - Cuando esté marcado, la API de gráficos entra en un modo de depuración más lento. - Usar caché de shaders en disco - Reduzca los parones almacenando y cargando shaders generados en el disco. + Compila shaders de manera asíncrona, reduciendo los parones, pero puede introducir fallos. + Usar limpieza reactiva + Mejora la precisión de renderizado en algunos juegos, pero reduce el rendimiento. + Caché de shaders en disco + Reduce los parones almacenando y cargando shaders generados. + + + CPU + Depuración de CPU + Pone la CPU en un modo de depuración lento. + GPU + API + Depuración de gráficos + Configura la API gráfica a un modo de depuración lento. + Fastmem + Motor de salida Volumen Especifica el volumen de la salida de audio. @@ -157,14 +212,24 @@ Configuración guardada Configuración guardada para %1$s Error guardando %1$s.ini: %2$s + Menú sin implementar Cargando... + Saliendo... ¿Desea restablecer esta configuración a su valor predeterminado? Restablecer a predeterminado ¿Restablecer todas las configuraciones? - Todas las configuraciones avanzadas se restablecerán a su configuración predeterminada. Esto no se puede deshacer. + Todas las opciones avanzadas se restablecerán a su configuración predeterminada. Esta acción no se puede deshacer. Reiniciar la configuracion Cerrar - Más información + Saber más + Auto + Enviar + Null + Importar + Exportar + La exportación falló + La importación falló + Cancelando Seleccionar driver GPU @@ -172,6 +237,7 @@ Instalar Predeterminado Usando el driver de GPU por defecto + ¡Driver no válido, utilizando el predeterminado del sistema! Driver GPU del sistema Instalando driver... @@ -182,10 +248,11 @@ Gráficos Audio Tema y color + Depuración Su ROM está encriptada - cartuchos de juegos o titulos instalados.]]> + cartuchos de juegos o títulos instalados.]]> prod.keys está instalado, para que los juegos sean descifrados.]]> Ocurrió un error al inicializar el núcleo de video, posiblemente debido a una incompatibilidad con el driver seleccionado Esto suele deberse a un driver de GPU incompatible. La instalación de un controlador de GPU personalizado puede resolver este problema. @@ -196,25 +263,25 @@ Salir de la emulación Hecho Contador de FPS - Alternar Controles - Centro Relativo del Stick - Deslizamiento de la Cruceta - Hápticos - Mostrar pantalla - Alternar Todo - Ajustar pantalla + Alternar controles + Centro relativo del stick + Deslizamiento de la cruceta + Toques hápticos + Mostrar overlay + Alternar todo + Ajustar overlay Escala Opacidad - Reiniciar pantalla - Editar pantalla - Pausar Emulación - Reanudar Emulación - Opciones de pantalla + Reiniciar overlay + Editar overlay + Pausar emulación + Despausar emulación + Opciones de overlay Cargando configuración... - Software del teclado + Teclado de software Abortar @@ -226,6 +293,9 @@ Error fatal Ocurrió un error fatal. Consulte el registro para obtener más detalles.\nContinuar con la emulación puede provocar bloqueos y errores. ¡Desactivar esta configuración reducirá significativamente el rendimiento de la emulación! Para obtener la mejor experiencia, se recomienda dejar esta configuración habilitada. + RAM de dispositivo: %1$s\nRecomendado: %2$s + %1$s %2$s + ¡No hay ningún juego ejecutable presente! Japón @@ -236,7 +306,14 @@ Corea Taiwán - + + Byte + KB + MB + GB + TB + PB + EB Vulkan @@ -274,6 +351,11 @@ FXAA SMAA + + Paisaje + Retrato + Auto + Predeterminado (16:9) Forzar 4:3 @@ -298,7 +380,7 @@ Construyendo shaders - Cambiar Tema + Cambiar tema Predeterminado Material You @@ -308,8 +390,22 @@ Claro Oscuro + + cubeb + - Usar Fondos Negros + Fondos oscuros Cuando utilice el modo oscuro, aplique fondos negros. - + + Picture in Picture + Minimizar ventana cuando esté en segundo plano + Pausar + Jugar + Mutear + Desmutear + + + Licencias + Upscaling de alta calidad de AMD + diff --git a/src/android/app/src/main/res/values-fr/strings.xml b/src/android/app/src/main/res/values-fr/strings.xml index 1e02828aac..5a827c50b1 100644 --- a/src/android/app/src/main/res/values-fr/strings.xml +++ b/src/android/app/src/main/res/values-fr/strings.xml @@ -1,5 +1,5 @@ - + Ce logiciel exécutera des jeux pour la console de jeu Nintendo Switch. Aucun jeux ou clés n\'est inclus.<br /><br />Avant de commencer, veuillez localiser votre fichier prod.keys ]]> sur le stockage de votre appareil.<br /><br />En savoir plus]]> L\'émulation est active @@ -19,12 +19,13 @@ Jeux Sélectionnez votre dossier <b>de Jeux</b> avec le bouton ci-dessous. Terminé - Vous êtes prêt.\nProfitez de vos jeux ! + Vous êtes prêt.\nProfitez de vos jeux ! Continuer Suivant Retour Ajouter des jeux - Sélectionner votre dossier de jeux + Sélectionner le dossier des jeux + Terminé ! Jeux @@ -32,12 +33,13 @@ Paramètres Aucun fichier n\'a été trouvé ou aucun répertoire de jeu n\'a encore été sélectionné. Rechercher et filtrer les jeux - Sélectionner le dossier de jeux + Sélectionner le dossier des jeux Permet à yuzu de remplir la liste des jeux - Ne pas sélectionner le dossier des jeux ? + Ne pas sélectionner le dossier des jeux ? Les jeux ne seront pas affichés dans la liste des jeux si aucun dossier n\'est sélectionné. https://yuzu-emu.org/help/quickstart/#dumping-games Rechercher des jeux + Rechercher un paramètre Répertoire de jeux sélectionné Installer prod.keys Nécessaire pour décrypter les jeux commerciaux. @@ -46,7 +48,7 @@ https://yuzu-emu.org/help/quickstart/#guide-introduction Notifications Accordez l\'autorisation de notification avec le bouton ci-dessous. - Donner la permission + Accorder la permission Ne pas accorder la permission de notification ? yuzu ne pourra pas vous communiquer d\'informations importantes. Permission refusée @@ -61,12 +63,15 @@ Fichier de clés sélectionné invalide Clés installées avec succès Erreur lors de la lecture des clés de chiffrement + Vérifiez que votre fichier de clés a une extension .keys et réessayez. + Vérifiez que votre fichier de clés a une extension .bin et réessayez. Clés de chiffrement invalides https://yuzu-emu.org/help/quickstart/#dumping-decryption-keys Le fichier sélectionné est incorrect ou corrompu. Veuillez dumper à nouveau vos clés. Installer le pilote du GPU - Installez des pilotes alternatifs pour des performances ou une précision potentiellement meilleures + Installer des pilotes alternatifs pour des performances ou une précision potentiellement meilleures Paramètres avancés + Paramètres avancés : %1$s Configurer les paramètres de l\'émulateur Joué récemment Ajouté récemment @@ -86,6 +91,33 @@ Le nom du premier sous-dossier doit être l\'identifiant du titre du jeu. Importer Exporter + Installer le firmware + Le firmware doit être dans une archive ZIP et est nécessaire pour démarrer certains jeux. + Installation du firmware + Firmware installé avec succès + L\'installation du firmware a échoué + Assurez-vous que les fichiers NCA du firmware se trouvent à la racine du fichier ZIP, puis réessayez. + Partager les logs de débogage + Partagez le fichier de log de yuzu pour déboguer les problèmes. + Aucun fichier de log trouvé + Installer le contenu du jeu + Installer une mise à jour ou un DLC + Installation du contenu en cours... + Erreur lors de l\'installation du fichier dans la NAND + Veuillez vous assurer que le contenu est valide et que le fichier prod.keys est installé. + L\'installation de jeux de base n\'est pas autorisée afin d\'éviter d\'éventuels conflits. + Seuls les contenus NSP et XCI sont pris en charge. Veuillez vérifier que le contenu du jeu est valide. + %1$d erreur(s) d\'installation + Contenu du jeu installé avec succès + %1$d installé avec succès + %1$d écrasé avec succès + https://yuzu-emu.org/help/quickstart/#dumping-installed-updates + Pilotes personnalisés non supporté + Le chargement des pilotes personnalisés ne sont pas actuellement pris en charge pour ce périphérique. Vérifiez à nouveau cette option à l\'avenir pour voir si la prise en charge a été ajoutée ! + Gérer les données de yuzu + Importer/exporter le firmware, les clés, les données utilisateur, et bien plus encore ! + Partager le fichier de sauvegarde + Échec de l\'exportation de la sauvegarde Gaia n\'est pas réel @@ -94,7 +126,18 @@ Contributeurs Fait avec \u2764 de l\'équipe yuzu https://github.com/yuzu-emu/yuzu/graphs/contributors + Des projets qui rendent possible yuzu pour Android Build + Données utilisateur + Importer/exporter toutes les données de l\'application.\n\nLors de l\'importation des données utilisateur, toutes les données utilisateur existantes seront supprimées ! + Exportation des données utilisateur... + Importation des données utilisateur... + Importer des données utilisateur + Backup yuzu invalide + Les données utilisateur ont été exportés avec succès + Les données utilisateur ont été importées avec succès + Exportation annulée + Assurez-vous que les dossiers de données utilisateur se trouvent à la racine du dossier ZIP et contiennent un fichier de configuration à config/config.ini, puis réessayez. https://discord.gg/u77vRWY https://yuzu-emu.org/ https://github.com/yuzu-emu @@ -114,64 +157,87 @@ Es tu intéressé ? - Activer la vitesse limite - Lorsqu\'elle est activée, la vitesse d\'émulation sera limitée à un pourcentage spécifié de la vitesse normale. + Limitation de vitesse + Limiter la vitesse d\'émulation à un pourcentage spécifié de la vitesse normale Limite en pourcentage de vitesse - Spécifie le pourcentage pour limiter la vitesse d\'émulation. Avec la valeur par défaut de 100%, l\'émulation sera limitée à la vitesse normale. Des valeurs supérieures ou inférieures augmenteront ou diminueront la limite de vitesse. + Spécifier le pourcentage pour limiter la vitesse d\'émulation. 100% correspond à la vitesse normale. Des valeurs plus élevées ou plus basses augmenteront ou diminueront la limite de vitesse. Précision du CPU + %1$s%2$s Mode TV - Émuler en mode TV augmente la résolution au détriment des performances. + Augmenter la résolution, ce qui diminue les performances. Le mode portable est utilisé lorsque la fonction est désactivée, ce qui réduit la résolution et améliore les performances. Région émulée Langue émulée Sélectionner la date RTC Sélectionner l\'heure RTC - Activer l\'horloge RTC personnalisée - Ce paramètre vous permet de définir une horloge en temps réel personnalisée distincte de l\'heure actuelle de votre système. + RTC personnalisé + Vous permet de définir une horloge en temps réel personnalisée distincte de l\'heure actuelle de votre système. Définir l\'horloge RTC personnalisée - API Niveau de précision - Résolution + Résolution (Mode Portable/Mode TV) Mode VSync + Orientation Format Filtre de fenêtre adaptatif - Méthode d\'anticrénelage : - Forcer la fréquence d\'horloge maximale (Adreno uniquement) - Force le GPU à fonctionner au maximum d\'horloges possibles (les contraintes thermiques seront toujours appliquées). + Méthode d\'anticrénelage + Forcer les fréquences maximales (Adreno uniquement) + Forcer le GPU à fonctionner à ses fréquences maximales possibles (les contraintes thermiques seront toujours appliquées). Utiliser les shaders asynchrones - Compile les shaders de manière asynchrone, ce qui réduira les saccades mais peut entraîner des problèmes visuels. - Activer le débogage des graphismes - Lorsque cette case est cochée, l\'API graphique entre dans un mode de débogage plus lent. - Utiliser les shader cache de disque - Réduire les saccades en stockant et en chargeant les shaders générés sur le disque. + Compile les shaders de manière asynchrone, réduisant les saccades mais pouvant entraîner des problèmes visuels. + Utiliser le vidage réactif + Améliore la précision du rendu dans certains jeux au détriment des performances. + Utiliser les shader cache + Réduire les saccades en stockant et en chargeant localement les shaders générés + + + CPU + Débogage du CPU + Place le CPU en mode lent de débogage. + GPU + API + Débogage des graphismes + Définit l\'API graphique en mode de débogage lent. + Fastmem + Moteur de sortie Volume - Spécifie le volume de la sortie audio. + Spécifier le volume de la sortie audio. - Défaut + Par défaut Paramètres enregistrés Paramètres enregistrés pour %1$s Erreur lors de l\'enregistrement de %1$s.ini: %2$s + Menu non implémenté Chargement... - Voulez-vous réinitialiser ce paramètre à sa valeur par défaut ? + Extinction en cours... + Voulez-vous réinitialiser ce paramètre à sa valeur par défaut ? Réinitialiser par défaut Réinitialiser tous les réglages ? Tous les paramètres avancés seront réinitialisés à leur configuration par défaut. Ça ne peut pas être annulé. Paramètres réinitialisés Fermer - Plus d\'informations + En savoir plus + Auto + Soumettre + Nul + Importer + Exporter + L\'exportation a échoué + L\'importation a échoué + Annulation Sélectionner le pilote du GPU Souhaitez vous remplacer votre pilote actuel ? Installer - Défaut - Utilisation du pilote de GPU par défaut + Par défaut + Utilisation du pilote du GPU par défaut + Pilote non valide sélectionné, utilisation du paramètre par défaut du système ! Pilote du GPU du système Installation du pilote... @@ -182,13 +248,14 @@ Vidéo Audio Thème et couleur + Débogage Votre ROM est cryptée - cartouches de jeu ou titres installés.]]> + cartouches de jeu ou de vos titres installés.]]> prod.keys est installé pour que les jeux puissent être déchiffrés.]]> Une erreur s\'est produite lors de l\'initialisation du noyau vidéo - Cela est généralement dû à un pilote du GPU incompatible. L\'installation d\'un pilote du GPU personnalisé peut résoudre ce problème. + Cela est généralement dû à un pilote GPU incompatible. L\'installation d\'un pilote GPU personnalisé peut résoudre ce problème. Impossible de charger la ROM Le fichier ROM n\'existe pas @@ -198,8 +265,8 @@ Compteur FPS Activer/Désactiver les contrôles Centre du stick relatif - Glissement du DPad - Haptique + Glissement du D-pad + Toucher haptique Afficher l\'overlay Tout basculer Ajuster l\'overlay @@ -225,7 +292,10 @@ Erreur de sauvegarde/chargement Erreur fatale Une erreur fatale s\'est produite. Consultez les logs pour plus de détails.\nContinuer l\'émulation peut entraîner des plantages et des bogues. - La désactivation de ce paramètre réduira considérablement les performances d\'émulation ! Pour une expérience optimale, il est recommandé de laisser ce paramètre activé. + La désactivation de ce paramètre réduira considérablement les performances d\'émulation ! Pour une expérience optimale, il est recommandé de laisser ce paramètre activé. + Mémoire RAM de l\'appareil : %1$s\nRecommandé : %2$s + %1$s %2$s + Aucun jeu démarreable présent ! Japon @@ -236,7 +306,14 @@ Corée Taïwan - + + Octet + Ko + Mo + GB + To + Po + Eo Vulkan @@ -274,6 +351,11 @@ FXAA SMAA + + Paysage + Portrait + Auto + Par défaut (16:9) Forcer le 4:3 @@ -288,8 +370,8 @@ Pavé directionnel - Stick Gauche - Stick Droit + Stick gauche + Stick droit Home Capture d\'écran @@ -299,7 +381,7 @@ Changer le thème de l\'application - Défaut + Par défaut Material You @@ -308,8 +390,22 @@ Lumineux Sombre - - Utiliser des arrière-plans noirs - Lorsque vous utilisez le thème sombre, appliquer des arrière-plans noirs. + + cubeb - + + Arrière-plan noir + Lorsque vous utilisez le thème sombre, appliquer un arrière-plan noir. + + + Lecteur réduit + Réduire la fenêtre lorsqu\'elle est placée en arrière-plan + Pause + Jouer + Couper le son + Remettre le son + + + Licences + Mise à l\'échelle de haute qualité par AMD. + diff --git a/src/android/app/src/main/res/values-he/strings.xml b/src/android/app/src/main/res/values-he/strings.xml new file mode 100644 index 0000000000..0af78a57c8 --- /dev/null +++ b/src/android/app/src/main/res/values-he/strings.xml @@ -0,0 +1,367 @@ + + + + התוכנה תריץ משחקים לקונסולת ה Nintendo Switch. אף משחק או קבצים בעלי זכויות יוצרים נכללים.<br /><br /> לפני שאת/ה מתחיל בבקשה מצא את קובץ prod.keys]]> על המכשיר.<br /><br />קרא עוד]]> + אמולציה פעילה + מציג התראה מתמשכת כאשר האמולציה פועלת. + yuzu רץ + התראות ותקלות + מציג התראות כאשר משהו הולך לא כשורה. + הרשאות התראות לא ניתנה! + + + ברוכים הבאים! + למד איך להפעיל <b>yuzu</b> וקפוץ ישר לאמולציה. + כדי להתחיל + מפתחות + בחר את קובץ ה <b>prod.keys</b> שלך עם הכפתור למטה. + בחר מפתחות + משחקים + בחר את התיקיית ה <b>Games</b> שלך עם הכפתור למטה. + סיום + את/ה מוכן. \nתהנה/י מהמשחקים שלך + המשך + הבא + אחורה + הוסף משחקים + בחר/י את תיקיית המשחקים שלך + הושלם! + + + משחקים + חפש + הגדרות + לא נמצאו קבצים או לנבחרה ספריית קבצים בינתיים. + חפש וסנן משחקים + בחר תיקיית משחקים + אפשר ל yuzu לאכלס את רשימת המשחקים + לדלג על בחירת תיקיית המשחקים? + משחקים לא יוצגו ברשימת המשחקים אם לנבחרה תיקיית משחקים. + https://yuzu-emu.org/help/quickstart/#dumping-games + חפש משחקים + חפש בהגדרות + ספריית משחקים נבחרה + התקן prod.keys + הכרחי בכדי לפענח משחקים + לדלג על הוספת מפתחות? + מפתחות חוקיים הכרחיים כדי לשחק במשחקים. רק אפליקציות פירטיות יפעלו אם תמשיך. + https://yuzu-emu.org/help/quickstart/#guide-introduction + התראות + תן גישה להתראות עם הכפתור למטה. + תן הרשאה + דלג על מתן הרשאה להתראות? + yuzu לא יוכל להתריע לך על מידע חשוב. + הרשאה נדחתה + את/ה דיחת את ההרשאה יותר מדי פעמים ועכשיו את/ה צריך/ה לתת גישה באופן ידני בהגדרות. + אודות + מספר גירסה, קרדיטים ועוד + עזרה + דלג + ביטול + התקן מפתחות Amiibo + נחוץ כדי להשתמש ב Amiibo במשחק + קובץ מפתחות לא חוקי נבחר + מפתחות הותקנו בהצלחה + שגיאה בקריאת מפתחות ההצפנה + ודא שלקובץ המפתחות שלך יש סיומת של key. ונסה/י שוב. + ודא/י שלקובץ המפתחות שלך יש סיומת של bin. ונסה/י שוב. + מפתחות הצפנה לא חוקיים + https://yuzu-emu.org/help/quickstart/#dumping-decryption-keys + קבוץ שנבחר מושחת או לא נכון. בבקשה הוצא מחדש את המפתחות שלך. + התקן דרייבר למעבד הגרפי + התקן דרייברים אחרים בשביל סיכוי לביצועים או דיוק גבוההים יותר + הגדרות מתקדמות + הגדרות מתקדמות: %1$s + הדר את הגדרות האמולטור + שוחק לאחרונה + הוסף לאחרונה + קמעונאי + Homebrew + פתח את תיקיית yuzu + נה ל את הקבצים הפנימיין של yuzu + ערוך את נראות האפליקציה + לא נמצא מנהל קבצים + לא יכול לפתוח את ספריית yuzu + בבקשה מקם את תיקיית המשתמש בפנל הצידי של מנהל הקבצים באופן ידני. + נהל מידע שמור + מידע שמור לא נמצא. בבקשה בחר/י אופציה מלמטה + יבא או יצא קבצי שמירה + יובא בהצלחה + מבנה ספריית השמירות לא חוקי + התת תיקייה הראשונה חייב להיות ה title ID של המשחק + ייבוא + ייצוא + התקן firmware + ה frimware חייב להיות בקובץ zip והוא הכרחי להפעלת חלק מהמשחקים + מתקין frimware + ה frimware הותקן בהצלחה + התקנת ה frimware נכשלה + ודא שקבצי ה firmware nca נמצאים בשורש ה zip ונסה שוב. + שתף את יומני הרישום של מיפוי הבאגים + שתף את קובץ יומני הרישום של yuzu בכדי לתקן בעיות + לא נמצא קובץ יומן רישום + התקן תוכן משחק + התקן עדכוני משחק או DLC + מתקין תוכן... + תקלה בהתקנת הקובץ (או קבצים) ל NAND + בבקשה ודא שהתוכן (או תכנים) חוקיים ושקובץ ה prod.keys מותקן. + התקנת משחק בסיס נדחת בכדי להימנע מקונפליקטים אפשריים. + רק קבצי NSP ו XCI נתמכים. בבקשה ודא שתוכן (או תכנים) המשחק חוקי. + %1$dבעיה (בעיות) התקנה + תוכן (או תכני) המשחק הותקנו בהצלחה + %1$d הותקן בהצלחה + %1$d נדרס/נכתב מעל בהצלחה + https://yuzu-emu.org/help/quickstart/#dumping-installed-updates + דרייברים מותאמים אישית לא נתמכים + הטענת דרייבים מותאמים אישית לא נתמך כרגע על מכשיר זה. \nבבקשה בדוק אופציה זו בעתיד בכדי לראות אם נוספה תמיכה! + נהל את המידע של yuzu + יבא/יצא firmware, keys, מידע של משתמש ועוד! + שתף קובץ שמירה + נכשל בייצוא שמירה + + + Gaia לא אמיתית + הועתק ללוח + אמולטור Switch עם קוד פתוח + תורמים + נוצר עם \u2764 מקבוצת yuzu + https://github.com/yuzu-emu/yuzu/graphs/contributors + פרוייקטים שהופכים את yuzu ל Android אפשרי + גרסה + נתוני משתמש + יבא/יצא את כל נתוני האפליקציה.\n\nכאשר מייבאים את נתוני המשתמש, כל נתוני המשתמש הקיימים ימחקו! + מייצא נתוני משתמש... + מייבא נתוני משתמש... + יבא נתוני משתמש + גיבוי yuzu לא חוקי + נתוני משתמש יוצאו בהצלחה + נתוני משתמש יובאו בהצלחה + ייצוא בוטל + ודא שנתוני המשתמש נמצאים בשורש קובץ ה zip ושהוא מכיל קובץ סידור ב config/config.ini ונסה שוב. + https://discord.gg/u77vRWY + https://yuzu-emu.org/ + https://github.com/yuzu-emu + + + גישה מוקדמת + קבל גישה מוקדמת + https://play.google.com/store/apps/details?id=org.yuzu.yuzu_emu.ea + תכונות חותכות קצה, גישה מוקדמת לעדכונים, ועוד + יתרונות של גישה מקודמת + תכונות חותכות קצה + גישה מוקדמת לעדכונים + ללא התקנה ידנית + תמיכה בעדיפות + עוזר בשמירת משחקים + התודה האינסופית שלנו + אתה מעוניין? + + + הגבל מהירות + מגביל את מהירות האמולציה לאחוז מהירות המבוקש מהמהירות הרגילה. + הגבל את אחוז המהירות + מדייק את אחוז מהירות האמולציה. 100% זה מהירות רגילה. ערכים גדולים או קטנים יאיצו או יאטו את מהירות האמולציה. + דיוק המעבד + %1$s%2$s + + + מצב עגינה + מעלה את הרזולוציה, פוגע בביצועים. משתמש במצב נייד כאשר מנוטרל, מפחית את הרזולוציה ומעלה את הביצועים. + אזור אמולציה + שפת אמולציה + בחר תאריך RTC + בחר זמן RTC + RTC מותאם אישית + מאפשר לך לקבוע שעון זמן אמת נפרד משעון המערכת שלך. + קבע RTC מותאם אישית + + + רמת דיוק + רזולוציה (מעוגן/נייד) + מצב VSync + כיוון + יחס רוחב גובה + פילטר מתאם חלון + שיטת Anti-aliasing + החזק מהירות שעון מקסימלית (רק ל Adreno) + מכריח לדחוף את מהירויות המעבד הגרפי למקסימום (הגבלות חום ימשיכו לתפקד). + משפר את הדיוק של האמולציה במשחקים מסויימים במחיר של ביצועים. + + מעבד + מכניס את המעבד למצב דיבאג איטי + מעבד גרפי + + מנוע פלט + עוצמת שמע + + ברירת מחדל + הגדרות שמורות + הגדרות שמורות עבור %1$s + תקלה בשמירת %1$s.ini: %2$s + טוען... + כיבוי... + אתה מעוניין לאפס את ההגדרה הזו חזרה לברירת המחדל? + אפס לברירת המחדל + לאפס את כל ההגדרות? + כל ההגדרות המתקדמות יאופסו לברירת המחדל. לא ניתן לבטל פעולה זו. + אפס הגדרות + סגור + למד עוד + אוטומטי + שלח + ייבוא + ייצוא + ייצוא נכשל + ייבוא נכשל + מבטל + + + בחר דרייבר למעבד הגרפי + אתה מעוניין להחליף את הדרייבר של המעבד הגרפי שלך? + התקן + ברירת מחדל + משתמש בדרייבר ברירת המחדל של המעבד הגרפי + דרייבר לא חוקי נבחר, משתמש בברירת המחדל של המערכת! + דרייבר של המעבד הגרפי של המערכת + מתקין דרייבר... + + + הגדרות + כללי + מערכת + גרפיקה + שמע + צבע ונושא + + המשחק שלך מוצפן + אין אפשרות לטעון את המשחק + קובץ המשחק לא קיים + + + צא מהאמולציה + סיום + סופר FPS + קנה מידה + שקיפות + עצור אמולציה + המשך אמולציה + טוען הגדרות... + + + מקלדת תוכנה + + + אודות + המשך + ארכיון מערכת לא נמצא + %s חסר. בבקשה הוצא תא ארכיוני המערכת שלך./nהמשכת האמולציה עלולה לגרום לקריסות ובאגים. + ארכיון מערכת + בעיית שמירה/טעינה + שגיאה חמורה + RAM המכשיר: %1$s/nמומלץ: %2$s + %1$s%2$s + אין משחק שניתן להריץ! + + + יפן + ארה״ב + אירופה + אוסטרליה + סין + קוריאה + טייוואן + + + בייט + KB + MB + GB + TB + PB + EB + + + Vulkan + אין שום דבר + + + רגיל + גבוה + אקסטרים (איטי) + + + 0.5X (360p/540p) + 0.75X (540p/810p) + 1X (720p/1080p) + 2X (1440p/2160p) (איטי) + 3X (2160p/3240p) (איטי) + 4X (2880p/4320p) (איטי) + + תיבת דואר + FIFO (On) + FIFO נינוח + + + השכן הקרוב ביותר + ScaleForce + AMD FidelityFX™ Super Resolution + + + אין שום דבר + FXAA + SMAA + + + לרוחב + לאורך + אוטומטי + + + ברירת מחדל (16:9) + הכרח 4:3 + הכרח 21:9 + הכרח 16:10 + הרחב לגודל המסך + + + מדויק + לא בטוח + פראנואידי (איטי) + + + D-pad + ג׳ויסטיק שמאלי + ג׳ויסטיק ימני + בית + צילום מסך + + + שנה את נושא האפליקצייה + ברירת מחדל + חומר אתה/מאטיריאל יו + + + שנה את מצב הנושא + עקוב אחרי המערכת + בהיר + כהה + + + cubeb + + + רקעים שחורים + כשמתשמשים במצב כהה, שם רקעים שחורים. + + + תמונה בתוך תמונה + הקטן את החלון כאשר נמצא ברקע + עצור + שחק + השתק + בטל השתקה + + + רישיונות + אפסקיילינג באיכות גבוהה מ AMD + diff --git a/src/android/app/src/main/res/values-hu/strings.xml b/src/android/app/src/main/res/values-hu/strings.xml new file mode 100644 index 0000000000..6563ba288b --- /dev/null +++ b/src/android/app/src/main/res/values-hu/strings.xml @@ -0,0 +1,402 @@ + + + + Ez a szoftver Nintendo Switch játékkonzolhoz készült játékokat futtat. Nem tartalmaz játékokat vagy kulcsokat. .<br /><br />Mielőtt hozzákezdenél, kérjük, válaszd ki a prod.keys]]> fájl helyét a készülék tárhelyén<br /><br />Tudj meg többet]]> + Emuláció aktív + Állandó értesítést jelenít meg, amíg az emuláció fut. + A yuzu fut + Megjegyzések és hibák + Értesítések megjelenítése, ha valami rosszul sül el. + Nincs engedély az értesítés megjelenítéséhez! + + + Üdvözöljük! + Ismerkedj meg a <b>yuzu</b> beállításával és ugorj bele az emulációba. + Vágjunk bele + Kulcsok + Válaszd ki a(z) <b>prod.keys</b> fájlodat az alábbi gombbal. + Kulcsok kiválasztása + Játékok + +Válaszd ki a(z) <b>Games</b> mappát az alábbi gombbal. + Kész + Minden kész.\nJó szórakozást! + Folytatás + Következő + Vissza + Játékok hozzáadása + Játékaid mappa kiválasztása + Kész! + + + Játékok + Keresés + Beállítások + Nem található fájl, vagy még nincs kiválasztva könyvtár. + Játékok keresése és szűrése + Játékmappa kiválasztása + Kihagyod a játékok mappa kiválasztását? + A játékok nem jelennek meg a Játékok listában, ha egy mappa nincs kijelölve. + https://yuzu-emu.org/help/quickstart/#dumping-games + Játékok keresése + Beállítások keresése + Játékok könyvtár kiválasztva + prod.keys telepítése + Kiskereskedelmi játékok dekódolásához szükséges + Kihagyod a kulcsok hozzáadását? + A kiskereskedelmi játékok emulálásához érvényes kulcsokra van szükség. Csak a homebrew alkalmazások fognak működni, ha folytatod. + https://yuzu-emu.org/help/quickstart/#guide-introduction + Értesítések + Értesítési engedélyek megadása az alábbi gombbal. + Engedély megadása + Kihagyod az értesítési engedély megadását? + yuzu nem fog tudni értesíteni a fontos imformációkról + Engedély megtagadva + Túl gyakran utasítottad el a hozzáférést, így manuálisan kell jóváhagynod a rendszer beállításokban. + A programról + Build verzió, készítők, és még több + Segítség + Kihagyás + Mégse + Amiibo kulcsok telepítése + Amiibo használata szükséges a játékhoz + Érvénytelen titkosítófájlok kiválasztva + Kulcsok sikeresen telepítve + Hiba történt a titkosítókulcsok olvasása során + Győződj meg róla, hogy a titkosító fájlod .keys kiterjesztéssel rendelkezik, majd próbáld újra. + Győződj meg róla, hogy a titkosító fájlod .bin kiterjesztéssel rendelkezik, majd próbáld újra. + Érvénytelen titkosítókulcsok + https://yuzu-emu.org/help/quickstart/#dumping-decryption-keys + A kiválasztott fájl helytelen, vagy sérült. Állíts össze egy új kulcsot. + GPU illesztőprogram telepítése + Alternatív illesztőprogramok telepítése az esetlegesen elérhető teljesítmény és pontosság érdekében + Haladó beállítások + Haladó beállítások: %1$s + Emulátorbeállítások konfigurálása + Nemrég játszva + Nemrég hozzáadva + Kiskereskedelmi + yuzu mappa megnyitása + yuzu belső fájljainak kezelése + Az alkalmazás megjelenésének módosítása + Nem található fájlkezelő + Nem sikerült megnyitni a yuzu könyvtárat + Kérjük, manuálisan keresd meg a felhasználói mappát a fájlkezelő oldalsó paneljével. + Mentésadatok kezelése + Mentés található. Kérjük, válassz egyet az alábbi opciók közül. + Mentési fájlok importálás vagy exportálása + Sikeresen importálva + Érvénytelen mentési könyvtárstruktúra + Az első almappa neve a játék azonosítója kell, hogy legyen. + Importálás + Exportálás + Firmware telepítés + A firmwarenek ZIP archívumban kell lennie, és szükséges a játékok indításához + Firmware telepítése + Firmware sikeresen telepítve + Firmware telepítése sikertelen + Győződj meg róla, hogy a firmware nca fájlok a zip gyökerénél vannak, és próbáld meg újra. + Hibakereső logok megosztása + A yuzu naplófájl megosztása a problémák elhárításához + Nem található log fájl + Játéktartalom telepítése + Játékfrissítések vagy DLC telepítése + Tartalom telepítése... + Hiba történt a fájl(ok) NAND-ra telepítése közben + Győződj meg róla, hogy a tartalom valós, és a prod.keys fájl telepítve van. + Az alapjátékok telepítése nem engedélyezett az esetleges konfliktusok elkerülése érdekében. + Csak NSP és XCI tartalom támogatott. Győződj meg róla, hogy a játéktartalom érvényes. + %1$d telepítési hiba + Játéktartalom sikeresen telepítve + %1$d sikeresen telepítve + %1$d sikeresen felülírva + https://yuzu-emu.org/help/quickstart/#dumping-installed-updates + Egyéni illesztőprogramok nem támogatottak + Egyéni illesztőprogram telepítése jelenleg nem támogatott ezen az eszközön.\nNézz vissza később, hátha hozzáadtuk a támogatását! + yuzu adatok kezelése + Firmware, kulcsok, felhasználói adatok és egyebek importálása/exportálása + Mentési fájl megosztása + A mentés exportálása sikertelen + + + Gaia nem valódi + Másolva a vágólapra + Egy nyílt forráskódú Switch emulátor + Hozzájárulók + \u2764 által készítve a yuzu csapattól + https://github.com/yuzu-emu/yuzu/graphs/contributors + Projektek, amik nélkül a yuzu nem jöhetett volna létre Androidra + Felhasználói adatok + Az összes alkalmazásadat importálása/exportálása.\n\nA felhasználói adatok importálásakor az összes meglévő felhasználói adat törlődik! + Felhasználói adatok exportálása... + Felhasználói adatok importálása... + Felhasználói adatok importálása + Érvénytelen yuzu biztonsági másolat + Felhasználói adatok sikeresen exportálva + Felhasználói adatok sikeresen importálva + Exportálás megszakítva + Ellenőrizd, hogy a felhasználói adatok mappái a zip mappa gyökerében vannak, és tartalmaznak egy konfig fájlt a config/config.ini címen, majd próbáld meg újra. + https://discord.gg/u77vRWY + https://yuzu-emu.org/ + https://github.com/yuzu-emu + + + Korai hozzáférés + Szerezz korai hozzáférést + https://play.google.com/store/apps/details?id=org.yuzu.yuzu_emu.ea + Legújabb funkciók, korai hozzáférés a frissítésekhez, és sok más + Korai hozzáférés előnyei + Legújabb funkciók + Korai hozzáférés a frissítésekhez + Automatikus telepítések + Priorizált támogatás + Valamint az örök hálánk + Érdekel a dolog? + + + Sebességkorlát + Korlátozza az emuláció sebességét a normál sebesség adott százalékára. + Sebességkorlát százaléka + Az emuláció sebességét határozza meg. 100% a normál sebesség. A magasabb értékek növelik, az alacsonyabbak csökkentik a sebességkorlátot. + CPU pontosság + %1$s%2$s + + + Dokkolt mód + Növeli a felbontást, de csökkenti a teljesítményt. Kikapcsolás esetén a Kézi mód van használatban, ami kisebb felbontást, de nagyobb teljesítményt eredményez. + Emulált régió + Emulált nyelv + Válassz RTC dátumot + Válassz RTC időt + Egyéni RTC + Megadhatsz egy valós idejű órát, amely eltér a rendszer által használt órától. + Egyéni RTC beállítása + + + Pontosság szintje + Felbontás (Kézi/Dockolt) + VSync mód + Orientáció + Képarány + Ablakhoz alkalmazkodó szűrő + Élsimítási módszer + Maximum órajel kényszerítése (csak Adreno) + Kényszeríti a GPU-t a lehető legnagyobb órajelen működésre (a hőmérséklet korlátozások továbbra is érvényben maradnak). + Aszinkron árnyékolók használata + Aszinkron módon fordítja az árnyékolókat, ami csökkenti az akadozást, de hibákat okozhat. + Reaktív ürítés használata + Javítja a renderelési pontosságot néhány játékban a teljesítmény rovására. + Lemez árnyékoló gyorsítótár + Csökkenti az akadásokat azáltal, hogy helyileg tárolja és tölti be a generált árnyékolókat. + + + CPU + CPU hibakeresés + Lassú hibakereső módba állítja a CPU-t. + GPU + API + Grafikai hibakeresés + Lassú hibakeresési módba állítja a grafikus API-t . + + Kimeneti rendszer + Hangerő + Hangkimenet hangerejének megadása + + + Alapértelmezett + Beállítások elmentve + Beállítások elmentve a következőhöz: %1$s + Mentési hiba%1$s .ini: %2$s + Nem implementált menü + Betöltés... + Leállítás... + Szeretnéd visszaállítani a beállítások az alapértelmezett értékekre? + Alaphelyzetbe állítás + Alaphelyzetbe állítod a beállításokat? + Minden haladó beállítás vissza lesz állítva az alapértelmezett konfigurációra. Ez a művelet nem vonható vissza. + Beállítások alaphelyzetbe állítva + Bezárás + Tudj meg többet + Automatikus + Küldés + Nulla + Importálás + Exportálás + Exportálás sikertelen + Importálás sikertelen + Megszakítás + + + Válassz GPU illesztőprogramot + Szeretnéd lecserélni a jelenlegi GPU illesztőprogramot? + Telepítés + Alapértelmezett + Alapértelmezett GPU illesztőprogram használata + Érvénytelen driver kiválasztva, a rendszer alapértelmezett lesz használva! + Rendszer GPU illesztőprogram + Illesztőprogram telepítése... + + + Beállítások + Általános + Rendszer + Grafika + Hang + Téma és színek + Hibakeresés + + + ROM titkosítva + prod.keys fájl telepítve van, hogy a játékok visszafejthetők legyenek.]]> + Hiba lépett fel a videómag inicializása során + Ezt általában egy nem kompatibilis GPU illesztő okozza. Egyéni GPU illesztőprogram telepítése megoldhatja a problémát. + Nem sikerült betölteni a ROM-ot + ROM fájl nem létezik + + + Emuláció bezárása + Kész + FPS számláló + Irányítás átkapcsolása + D-pad csúsztatása + Érintés haptikája + Átfedés mutatása + Össze átkapcsolása + Átfedés testreszabása + Skálázás + Átlátszóság + Átfedés visszaállítása + Átfedés módosítása + Emuláció szünetelése + Emuláció folytatása + Átfedés beállításai + + Beállítások betöltése... + + + Szoftver billenytűzet + + + Megszakítás + Folytatás + Nem található rendszerarchívum + %s hiányzik. Kérjük, mentsd ki a rendszerarchívumaidat.\nAz emuláció folytatása összeomlásokhoz és hibákhoz vezethet. + Egy rendszerarchívum + Mentési/betöltési hiba + Végzetes hiba + Végzetes hiba történt. Ellenőrizd a logot a részletekért.\nAz emuláció folytatása összeomlást és hibákat eredményzhet. + Ennek a beállításnak a kikapcsolása jelentős mértékben csökkenti a teljesítményt! A legjobb élmény érdekében javasolt a beállítás bekapcsolva tartása. + Eszköz RAM: %1$s\nAjánlott: %2$s + %1$s %2$s + Nincs indítható játék! + + + Japán + USA + Európa + Ausztrália + Kína + Korea + Tajvan + + + Bájt + KB + MB + GB + TB + PB + EB + + + Vulkan + Nincs + + + Normál + Magas + Extrém (Lassú) + + + 0.5X (360p/540p) + 0.75X (540p/810p) + 1X (720p/1080p) + 2X (1440p/2160p) (Lassú) + 3X (2160p/3240p) (Lassú) + 4X (2880p/4320p) (Lassú) + + + Azonnali (Ki) + Postaláda + FIFO (Be) + FIFO Relaxált + + + Legközelebbi szomszéd + Bilineáris + Bikubikus + Gauss-féle + ScaleForce + AMD FidelityFX™ Super Resolution + + + Nincs + FXAA + SMAA + + + Fekvő + Álló + Automatikus + + + Alapértelmezett (16:9) + 4:3 kényszerítése + 21:9 kényszerítése + 16:10 kényszerítése + Ablakhoz nyújtás + + + Pontos + Nem biztonságos + Paranoid (Lassú) + + + D-pad + Bal kar + Jobb kar + Home + Képernyőmentés + + + Árnyékolók előkészítése + Árnyékolók létrehozása + + + Alkalmazás témájának módosítása + Alapértelmezett + + Téma váltása + Rendszerbeállítások használata + Világos + Sötét + + + cubeb + + + Fekete háttér + Sötét téma használatakor fekete háttér használata. + + + Kép a képben + Ablak minimalizálása, amikor háttérbe kerül + Szünet + Lejátszás + Némítás + Némítás feloldása + + + Licenszek + Magas minőségű felskálázás az AMD-től + diff --git a/src/android/app/src/main/res/values-it/strings.xml b/src/android/app/src/main/res/values-it/strings.xml index 09c9345b0f..5afebb4c45 100644 --- a/src/android/app/src/main/res/values-it/strings.xml +++ b/src/android/app/src/main/res/values-it/strings.xml @@ -1,5 +1,5 @@ - + Questo software permette di giocare ai giochi della console Nintendo Switch. Nessun gioco o chiave è inclusa.<br /><br />Prima di iniziare, perfavore individua il file prod.keys ]]> nella memoria del tuo dispositivo.<br /><br />Scopri di più]]> L\'emulatore è attivo @@ -13,9 +13,9 @@ Benvenuto! Scopri come configurare <b>yuzu</b> e passare all\'emulazione. Iniziare - Pulsanti + Chiavi Seleziona il tuo file <b>prod.keys</b> con il pulsante in basso. - Selezione Pulsanti + Seleziona le chiavi Giochi Seleziona la cartella <b>Games</b> con il pulsante in basso. Fatto @@ -25,6 +25,7 @@ Indietro Aggiungi giochi Seleziona la cartella dei giochi + Completato! Giochi @@ -38,6 +39,7 @@ I giochi non saranno mostrati nella lista dei giochi se una cartella non è selezionata. https://yuzu-emu.org/help/quickstart/#dumping-games Cerca giochi + Cerca impostazione Cartella dei giochi selezionata Installa prod.keys Necessario per decrittografare i giochi @@ -61,15 +63,18 @@ Selezionate chiavi non valide Chiavi installate correttamente Errore durante la lettura delle chiavi di crittografia + Controlla che le tue chiavi abbiano l\'estensione .keys e prova di nuovo. + Controlla che le tue chiavi abbiano l\'estensione .bin e prova di nuovo Chiavi di crittografia non valide https://yuzu-emu.org/help/quickstart/#dumping-decryption-keys Il file selezionato è incorretto o corrotto. Per favore riesegui il dump delle tue chiavi. Installa i driver GPU Installa driver alternativi per potenziali prestazioni migliori o accuratezza. Impostazioni avanzate + Impostazioni Avanzate: %1$s Configura le impostazioni dell\'emulatore - Giocato recentemente - Aggiunto recentemente + Giocati recentemente + Aggiunti recentemente Rivenditore Homebrew Apri la cartella di yuzu @@ -86,6 +91,33 @@ La prima sotto cartella deve chiamarsi come l\'ID del titolo del gioco. Importa Esporta + Installa firmware + Il firmware deve essere in un archivio ZIP ed è necessario per avviare alcuni giochi + Installando il firmware + Firmware installato con successo + L\'installazione del firmware è fallita + Accertati che i file .nca del firmware siano contenuti direttamente nella radice dello .zip e riprova. + Condividi log di debug + Condividi i log di yuzu per ricevere supporto + Nessun file di log trovato + Installa contenuti di gioco + Installa aggiornamenti o DLC + Installazione dei contenuti... + Errore durante l\'installazione del contenuto in NAND. + Accertati che i contenuti da installare siano validi e che le prod.keys siano presenti. + Installare i giochi base in NAND non è permesso, perché potrebbe causare dei conflitti con altri tipi di contenuti(Aggiornamenti e DLC) + Solo i tipi NSP e XCI sono supportati. Verifica che i contenuti di gioco siano validi. + Errori di installazione: %1$d + Contenuto/i di gioco installato/i con successo. + %1$dinstallato con successo. + %1$dsovrascritto con successo + https://yuzu-emu.org/help/quickstart/#dumping-installed-updates + I driver personalizzati non sono supportati. + I driver personalizzati non sono attualmente supportati su questo dispositivo.\n Ricontrolla in futuro. + Gestisci i dati di Yuzu + Importa/Esporta il firmware, le keys, i dati utente, e altro! + Condividi i tuoi dati di salvataggio + Errore durante l\'esportazione del salvataggio Gaia non è reale @@ -94,7 +126,18 @@ Collaboratori Realizzato con \u2764 dal team yuzu https://github.com/yuzu-emu/yuzu/graphs/contributors + Progetti che rendono yuzu per Android possibile Compilazione + Dati Utente + Importa/Esporta tutti i dati dell\'applicazione.\n\nDurante l\'importazione dei Dati Utente, quelli già esistenti verranno ELIMINATI. + Esportazione dei Dati Utente... + Importazione dei Dati Utente... + Importa i Dati Utente + Backup di Yuzu Invalido + Dati Utente esportati con successo + Dati Utente importati con successo. + Esportazione annullata + Assicurati che la cartella dei Dati dell\'utente stiano nella radice del file.zip e che sia presente una cartella config in config/config.ini, poi, riprova. https://discord.gg/u77vRWY https://yuzu-emu.org/ https://github.com/yuzu-emu @@ -114,41 +157,53 @@ Sei interessato? - Abilita il limite di velocità - Quando abilitato, la velocità di emulazione verrà limitata a una specifica percentuale della velocità normale. + Limita velocità + Limita la velocità dell\'emulazione a una specifica percentuale della velocità normale. Limite velocità percentuale - Specifica la percentuale del limite della velocità di emulazione. Con quella preimpostata al 100% l\'emulazione verrà limitata alla velocità normale. Valori più alti o bassi aumenteranno o diminuiranno il limite di velocità. + Specifica la percentuale per limitare la velocità di emulazione. 100% è la velocità normale. Valori maggiori o minori aumenteranno o diminuiranno il limite di velocità Accuratezza della CPU + %1$s%2$s - Modalità docked - Emula in modalità docked, questo aumenta la risoluzione a spese delle performance. + Modalità Docked + Aumenta la risoluzione, diminuendo le performance. La modalità portatile è usata quando disabilitato, diminuendo la risoluzione e aumentando le performance. Regione emulata Lingua emulata - Seleziona la data dall\'orologio in tempo reale - Seleziona il tempo dall\'orologio in tempo reale - Abilità l\'orologio in tempo reale personalizzato - Questa impostazione ti permette di impostare un orologio in tempo reale personalizzato separato da quello del tuo sistema corrente. - Imposta l\'orologio in tempo reale personalizzato + Imposta la data + Imposta l\'ora, i minuti e i secondi. + RTC Personalizzato + Ti permette di impostare un orologio in tempo reale personalizzato, completamente separato da quello di sistema. + Imposta un orologio in tempo reale personalizzato - API Livello di accuratezza - Risoluzione + Risoluzione (Portatile/Docked) Modalità VSync - Rapporto d\'aspetto - Filtro di adattamento alla finestra + Orientamento + Rapporto d\'aspetto: + Filtro adattivo della finestra Metodo di anti-aliasing Forza clock massimi (solo Adreno) Forza la GPU a girare col massimo clock possibile (i vincoli alla temperatura saranno comunque applicati) Usa shaders asincrone - Compila le shaders asincronamente, questo riduce lo shutter ma potrebbe introdurre dei glitch. - Abilità il debug grafico - Quando l\'opzione è selezionata, l\'API grafica entra in una modalità di debug più lenta - Usa cache shader su disco - Riduce lo stuttering salvando e caricando le shader generate sul disco. + Compila le shader in modo asincrone, riducendo lo stutter. Può causare glitch grafici. + Abilita il Reactive Flushing + Migliora l\'accuratezza della grafica in alcuni giochi, al costo delle performance. + Usa la cache delle shader + Riduce lo stuttering caricando le shader già compilate all\'avvio. + + + CPU + Debug della CPU + Imposta la CPU in modalità Debug (Più lento) + GPU + API + Debug GPU + Imposta l\'API grafica in uno stato dedicato al Debugging. Impatta di molto sulle performance. + Fastmem + Motore di Output Volume Specifica il volume dell\'audio in uscita. @@ -157,14 +212,24 @@ Impostazioni salvate Impostazioni salvate per %1$s Errore nel salvare %1$s.ini %2$s + Menu non implementato Caricamento… + Spegnimento... Vuoi ripristinare queste impostazioni al loro valore originale? Riportare alle impostazioni originali Resettare tutte le impostazioni? - Tutte le Impostazioni Avanzate saranno ripristinate a quelle originali. Questa operazione non è reversibile + Le impostazione avanzate verranno completamente reimpostate. Questa operazione è IRREVERSIBILE. Reimposta le impostazioni Chiudi Per saperne di più + Automatico + Invia + Nullo + Importa + Esporta + Esportazione Fallita + Importazione Fallita + Cancellazione Seleziona il driver della GPU @@ -172,6 +237,7 @@ Installa Predefinito Utilizza il driver predefinito della GPU. + Il driver selezionato è invalido, è in utilizzo quello predefinito di sistema! Driver GPU del sistema Installando i driver... @@ -182,10 +248,11 @@ Grafica Audio Tema e colori + Debug La tua ROM è criptata - cartuccia di gioco o i titoli installati.]]> + dump delle tue cartucce di giocooppure dei titoli già installati.]]> prod.keys sia installato in modo che i giochi possano essere decrittati.]]> È stato riscontrato un errore nell\'inizializzazione del core video Questo è causato solitamente dal driver incompatibile di una GPU. L\'installazione di driver GPU personalizzati potrebbe risolvere questo problema. @@ -193,28 +260,28 @@ Il file della ROM non esiste - Uscire dall\'emulazione + Arresta emulazione Fatto - Contatore degli FPS + Contatore FPS Controlli a interruttore Centro relativo degli Stick - Slittamento del Pad Direzionale - Aptico - Mostra Overlay - Attiva/disattiva tutto - Aggiusta Overlay + DPad A Scorrimento + Feedback Aptico + Mostra l\'Overlay + Attiva/Disattiva tutto + Modifica l\'Overlay Scala Opacità - Reimposta Overlay - Modifica Overlay - Metti in pausa l\'emulazione - Riprendi Emulazione - Impostazioni Overlay + Reimposta l\'Overlay + Modifica l\'Overlay + Sospendi l\'emulazione + Riprendi l\'emulazione + Opzioni overlay - Caricamento delle impostazioni... + Carico le impostazioni... - Tastiera software + Tastiera Software Interrompi @@ -226,6 +293,9 @@ Errore Fatale Un errore fatale è accaduto. Controlla i log per i dettagli.\nContinuare ad emulare potrebbe portare bug o causare crash. Disattivare questa impostazione può ridurre significativamente le performance di emulazione! Per una migliore esperienza, è consigliato lasciare questa impostazione attivata. + RAM Totale:%1$s\nRaccomandati: %2$s + %1$s%2$s + Non è presente alcun gioco avviabile. Giappone @@ -236,7 +306,14 @@ Corea Taiwan - + + Byte + Kb + Mb + GB + Tb + Pb + Eb Vulkan @@ -274,12 +351,17 @@ FXAA SMAA + + Layout Orizzontale + Layout Verticale + Automatico + Predefinito (16:9) Forza 4:3 Forza 21:9 Forza 16:10 - Allunga a finestra + Adatta alla finestra Accurata @@ -287,9 +369,9 @@ Paranoico (Lento) - D-Pad - Levetta sinistra - Levetta destra + D-pad + Analogico sinistro + Analogico destro Home Screenshot @@ -298,7 +380,7 @@ Costruendo gli shaders - Cambia il tema dell\'app + Cambia tema dell\'app Predefinito Material You @@ -308,8 +390,22 @@ Chiaro Scuro + + cubeb + - Usa sfondi neri + Sfondi neri Quando utilizzi il tema scuro, applica sfondi neri. - + + Picture in Picture + Minimizza la finestra quando viene impostata in background + Pausa + Gioca + Silenzia + Riattiva + + + Licenze + Upscaling di alta qualità da parte di AMD + diff --git a/src/android/app/src/main/res/values-ja/strings.xml b/src/android/app/src/main/res/values-ja/strings.xml index a0ea78befa..3be4e7d265 100644 --- a/src/android/app/src/main/res/values-ja/strings.xml +++ b/src/android/app/src/main/res/values-ja/strings.xml @@ -1,11 +1,12 @@ - + - このソフトウェアは、Nintendo Switch用のゲームを実行します。 ゲームソフトやキーは含まれません。<br /><br />事前に、 prod.keys ]]> ファイルをデバイスのストレージに配置しておいてください。<br /><br />詳細]]> + このソフトウェアでは、Nintendo Switchのゲームを実行できます。 ゲームソフトやキーは含まれません。<br /><br />事前に、 prod.keys ]]> ファイルをストレージに配置しておいてください。<br /><br />詳細]]> エミュレーションが有効です エミュレーションの実行中に常設通知を表示します。 yuzu は実行中です - 問題が発生したときに通知を表示します。 + 通知とエラー + 問題の発生時に通知を表示します。 通知が許可されていません! @@ -16,7 +17,7 @@ 下のボタンから <b>prod.keys</b> ファイルを選択してください。 キーを選択 ゲーム - 下のボタンから<b>ゲーム</b>があるフォルダを選択してください。 + 下のボタンから<b>ゲーム</b>のあるフォルダを選択してください。 完了 準備が完了しました。\nゲームをお楽しみください! 続行 @@ -24,48 +25,53 @@ 戻る ゲームを追加 ゲームフォルダを選択 + 完了! ゲーム 検索 設定 - ファイルが見つからないか、ゲームディレクトリがまだ選択されていません。 + ファイルが存在しないかゲームフォルダが選択されていません。 ゲームの検索と絞り込み - ゲームフォルダを選択 - yuzu がゲームリストに追加できるようにします + ゲームフォルダ + ゲームをyuzuのゲームリストに追加します ゲームフォルダの選択をスキップしますか? - フォルダを選択しない場合、ゲームはゲームリストに表示されません。 + フォルダを選択しないと、ゲームがリストに表示されません。 https://yuzu-emu.org/help/quickstart/#dumping-games ゲームを検索 - ゲームディレクトリが選択されました - prod.keys をインストール - ゲームの復号化に必要 + 検索設定 + フォルダを選択しました + prod.keys + 製品版ゲームの復号化に必要です キーの追加をスキップしますか? 製品版ゲームのエミュレーションには、有効なキーが必要です。続行すると自作アプリしか機能しません。 https://yuzu-emu.org/help/quickstart/#guide-introduction 通知 - 下のボタンで通知の権限を許可してください。 + 下のボタンで通知を許可してください。 許可 通知の許可をスキップしますか? yuzuは重要なお知らせを通知できません。 権限が拒否されました - この権限を複数回拒否したため、システム設定で手動で許可する必要があります。 + この権限を複数回拒否したため、設定から手動で許可する必要があります。 情報 ビルドバージョン、クレジットなど ヘルプ スキップ キャンセル - Amiibo キーをインストール - ゲーム内での Amiibo の使用に必要 - 無効なキーファイルが選択されました + Amiibo + ゲーム内での Amiibo の使用に必要です + 無効なキーファイルです 正常にインストールされました - 暗号化キーの読み取りエラー - 暗号化キーが無効です + 暗号化キーの読み込み失敗 + キーの拡張子が.keysであることを確認し、再度お試しください。 + キーの拡張子が.binであることを確認し、再度お試しください。 + 暗号化キーが無効 https://yuzu-emu.org/help/quickstart/#dumping-decryption-keys - 選択されたファイルが不正または破損しています。キーを再ダンプしてください。 - GPUドライバーをインストール + ファイルが間違っているか破損しています。キーを再ダンプしてください。 + GPUドライバー 代替ドライバーをインストールしてパフォーマンスや精度を向上させます 高度な設定 + 高度な設定: %1$s エミュレーターの設定を構成します 最近プレイした 最近追加された @@ -77,15 +83,34 @@ ファイルマネージャーが見つかりませんでした yuzuのディレクトリを開けません ファイルマネージャのサイドパネルでユーザーフォルダを手動で探してください。 - セーブデータを管理 - セーブデータが見つかりました。以下のオプションから選択してください。 + セーブデータ + セーブデータが見つかりました。操作を選択してください。 セーブファイルをインポート/エクスポート インポートが完了しました - セーブデータのディレクトリ構造が無効です + セーブデータのディレクトリ構造が無効 最初のサブフォルダ名は、ゲームのタイトルIDである必要があります。 インポート エクスポート - + ファームウェア + ファームウェアはZIPアーカイブである必要があり、一部のゲームを起動するのに必要です + ファームウェアをインストール中 + インストールが完了しました + インストール失敗 + デバッグログ + yuzuのログファイルを共有して問題をデバッグします + ログが見つかりません + 追加コンテンツ + 更新データやDLCをインストールします + コンテンツをインストール中... + NSPとXCI形式のコンテンツのみサポートされています。ゲームコンテンツが有効なものであるかご確認ください。 + %1$d のインストールエラー + ゲームコンテンツのインストールに成功しました + %1$d のインストールに成功しました + %1$d の上書きに成功しました + https://yuzu-emu.org/help/quickstart/#dumping-installed-updates + カスタムドライバはサポートされていません + yuzu データを管理 + セーブファイルを共有 ガイアは実在しない クリップボードにコピーしました @@ -93,7 +118,15 @@ 貢献者 yuzuチームの\u2764で作られた https://github.com/yuzu-emu/yuzu/graphs/contributors + yuzu for Androidの作成を可能にしたプロジェクト ビルド + ユーザデータ + ユーザデータをエクスポート中... + ユーザデータをインポート中... + ユーザデータをインポート + ユーザデータのエクスポートに成功しました + ユーザデータのインポートに成功しました + エクスポートをキャンセルしました https://discord.gg/u77vRWY https://yuzu-emu.org/ https://github.com/yuzu-emu @@ -105,72 +138,91 @@ 最先端の機能、アップデートの早期アクセスなど 早期アクセスのメリット 最先端の機能 - アップデートの早期アクセス + アップデートへの早期アクセス 手動インストールが不要 - 優先的なサポート + 優先サポート ゲームの保存に貢献 - 私たちの永遠の感謝 + 私たちから永遠の感謝 興味がありますか? - 速度制限を有効化 - 有効にすると、エミュレーション速度が任意の割合に制限されます。 - エミュレーション速度の制限 - エミュレーション速度を制限する割合を指定します。デフォルトの100%では、エミュレーションは通常の速度に制限されます。値が高いまたは低いほど、速度制限が増加または減少します。 + エミュレーション速度を制限 + エミュレーション速度を指定した割合に制限します。 + エミュレーション速度 + エミュレーション速度を制限するパーセンテージを指定します。100%は通常速度です。値の増減で速度も増減します。 CPU精度 - TVモード - TVモードでエミュレートします。パフォーマンスが犠牲になりますが、解像度が向上します。 + 高解像度、低パフォーマンス。無効時には携帯モードが使用されます(低解像度、高パフォーマンス)。 地域 言語 RTCの日付を選択 RTCの時刻を選択 - カスタムRTC - 現在のシステム時間とは別にカスタムのリアルタイムクロックを設定できます。 + カスタム RTC + 現在のシステム時間とは別に、任意のリアルタイムクロックを設定できます。 カスタムRTCを設定 - API 精度 - 解像度 + 解像度(携帯モード/TVモード) 垂直同期モード + 画面の向き アスペクト比 ウィンドウ適応フィルター アンチエイリアス方式 最大クロックを強制 (Adrenoのみ) - GPUを可能な限り最大クロックで動作させます (過熱制限は引き続き適用されます)。 + GPUを最大限可能な周波数で動作させます (過熱制限は引き続き適用されます)。 非同期シェーダー シェーダーを非同期でコンパイルします。コマ落ちが軽減されますが、不具合が発生する可能性があります。 + 即時書き込み + 一部のゲームにおいて、パフォーマンスを犠牲にしながらも、レンダリング精度を向上させます。 + ディスクシェーダーキャッシュ + 生成したシェーダーを端末に保存して読み込み、コマ落ちを軽減します。 + + + CPU + CPU デバッギング + GPU + API グラフィックデバッグ - オンにすると、グラフィックAPI は低速のデバッグモードに入ります。 - シェーダーキャッシュを使用 - 生成したシェーダーをディスクに保存して読み込むことで、コマ落ちを軽減します。 + グラフィックAPIを低速デバッグモードに設定します。 + Fastmem + 出力エンジン 音量 オーディオ出力の音量を指定します デフォルト 設定を保存しました - %1$sの設定を保存しました + %1$s の設定を保存しました %1$s.ini の保存エラー: %2$s + 未実装のメニュー 読み込み中… + 終了中... この設定を初期値にリセットしますか? 初期設定に戻す すべての設定をリセットしますか? - すべての詳細設定が初期設定に戻されます。この操作は元に戻せません。 + すべての詳細設定が初期値に戻されます。この操作は元に戻せません。 設定をリセットしました 閉じる 詳細情報 + 自動 + 送信 + インポート + エクスポート + エクスポート失敗 + インポート失敗 + キャンセル中 GPUドライバを選択 - 現在のGPUドライバーを置き換えますか? + 現在のGPUドライバを置き換えますか? インストール デフォルト - デフォルトのGPUドライバーを使用します + デフォルトのドライバを使用します + 選択されたドライバが無効、システムのデフォルトを使用します! システムのGPUドライバ インストール中… @@ -181,33 +233,34 @@ グラフィック サウンド テーマと色 + デバッグ ROMが暗号化されています - ゲームカートリッジやインストール済みのタイトルを再度ダンプするためのガイドに従ってください。]]> - prod.keys ファイルがインストールされていることを確認してください。]]> + prod.keys ファイルがインストールされていることを確認してください。]]> ビデオコアの初期化中にエラーが発生しました これは通常、互換性のないGPUドライバーが原因で発生します。 カスタムGPUドライバーをインストールすると、問題が解決する可能性があります。 ROMの読み込みに失敗しました ROMファイルが存在しません - エミュレーションを終了 + 終了 完了 FPSカウンター - コントロールを切り替え - 十字キーのスライド操作 - 振動 - オーバーレイを表示 - すべて選択 - オーバーレイを調整 + ボタンの表示設定 + スティックを固定しない + 十字キーをスライド操作 + タッチ振動 + ボタンを表示 + すべて切替 + 見た目を調整 大きさ 不透明度 リセット - オーバーレイを編集 - エミュレーションを一時停止 - エミュレーションを再開 - オーバーレイオプション + 位置を編集 + 一時停止 + 再開 + 表示オプション 設定をロード中… @@ -220,10 +273,13 @@ システムアーカイブが見つかりません %s が見つかりません。システムアーカイブをダンプしてください。\nエミュレーションを続行すると、クラッシュやバグが発生する可能性があります。 システムアーカイブ - セーブ/ロード エラー + セーブ/ロードエラー 致命的なエラー 致命的なエラーが発生しました。詳細はログを確認してください。\nエミュレーションを続行するとクラッシュやバグが発生する可能性があります。 - この設定をオフにすると、エミュレーションのパフォーマンスが著しく低下します!最高の体験を得るためには、この設定を有効にしておくことをお勧めします。 + この設定をオフにすると、エミュレーションのパフォーマンスが著しく低下します!最高の体験を得るためには、この設定を有効にしておくことを推奨します。 + デバイス RAM: %1$s\n推奨: %2$s + %1$s %2$s + 起動できるゲームがありません! 日本 @@ -234,7 +290,14 @@ 韓国 台湾 - + + Byte + KB + MB + GB + TB + PB + EB Vulkan @@ -242,7 +305,7 @@ 標準 - 高い + 最高 (低速) @@ -272,12 +335,17 @@ FXAA SMAA + + 横長 + 縦長 + 自動 + デフォルト (16:9) 強制 4:3 強制 21:9 強制 16:10 - ウィンドウに合わせる + 画面に合わせる 正確 @@ -289,7 +357,7 @@ Lスティック Rスティック HOMEボタン - スクリーンショット + キャプチャーボタン シェーダーを準備しています @@ -306,8 +374,22 @@ ライト ダーク - - 黒色の背景を使用 - ダークテーマの使用時は、黒色の背景を有効にしてください。 + + cubeb - + + 完全な黒を使用 + ダークテーマの背景色に黒が適用されます。 + + + ピクチャーインピクチャー + バックグラウンド時にウインドウを最小化する + 中断 + プレイ + 消音 + 消音解除 + + + ライセンス + AMDの高品質アップスケーリング + diff --git a/src/android/app/src/main/res/values-ko/strings.xml b/src/android/app/src/main/res/values-ko/strings.xml index 214f95706d..1b9160a235 100644 --- a/src/android/app/src/main/res/values-ko/strings.xml +++ b/src/android/app/src/main/res/values-ko/strings.xml @@ -1,9 +1,9 @@ - + - 이 소프트웨어는 닌텐도 스위치 게임 콘솔용 게임을 실행합니다. 게임 타이틀이나 keys는 포함되어 있지 않습니다.<br /><br />시작하기 전에 장치 저장소에서 prod.keys ]]> 파일을 찾아주세요.<br /><br />자세히 알아보기]]> + 이 소프트웨어는 Nintendo Switch 게임을 실행합니다. 게임 타이틀이나 키는 포함되어 있지 않습니다.<br /><br />시작하기 전에 장치 저장소에서 prod.keys ]]> 파일을 찾아주세요.<br /><br />자세히 알아보기]]> 에뮬레이션이 활성화됨 - 에뮬레이션이 실행 중일 때 영구 알림을 표시합니다. + 에뮬레이션이 실행 중일 때 지속적으로 알림을 표시합니다. yuzu가 실행 중입니다. 알림 및 오류 문제가 발생하면 알림을 표시합니다. @@ -11,26 +11,25 @@ 환영합니다! - <b>yuzu</b> 를 설정하고 에뮬레이션으로 이동하는 방법을 알아보세요. + <b>yuzu</b>를 설정하고 에뮬레이션을 시작하세요. 시작하기 - Keys - 아래 버튼을 사용하여 <b>prod.keys</b> 파일을 선택합니다. - keys 선택 + 키 설정 + 아래 버튼으로 <b>prod.keys</b> 파일을 선택합니다. + 키 선택 게임 아래 버튼으로 <b>게임</b> 폴더를 선택합니다. 완료 - 모든 준비가 완료되었습니다.\n게임을 즐기세요! + 모두 준비되었습니다.\n게임을 즐기세요! 계속 다음 - 뒤로 + 이전 게임 추가 게임 폴더 선택 - 게임 검색 설정 - 파일을 찾을 수 없거나 아직 게임 디렉토리를 선택하지 않았습니다. + 파일을 찾을 수 없거나 아직 게임 디렉터리를 선택하지 않았습니다. 게임 검색 및 필터링 게임 폴더 선택 yuzu가 게임 목록을 채울 수 있도록 허용 @@ -38,140 +37,160 @@ 폴더를 선택하지 않으면 게임 목록에 게임이 표시되지 않습니다. https://yuzu-emu.org/help/quickstart/#dumping-games 게임 검색 - 게임 디렉터리 선택 + 게임 디렉터리를 설정했습니다. prod.keys 설치 - 판매용 게임 암호 해독에 요구 - keys 추가를 건너뛰겠습니까? - 정품 게임을 에뮬레이트하려면 유효한 keys가 필요합니다. 계속하면 자체 제작 앱만 작동합니다. + 패키지 게임 암호 해독에 필요 + 키 추가를 건너뛰겠습니까? + 패키지 게임을 에뮬레이트하려면 유효한 키 값이 필요합니다. 이 단계를 건너뛰면 홈브류 게임만 실행할 수 있습니다. https://yuzu-emu.org/help/quickstart/#guide-introduction 알림 아래 버튼으로 알림 권한을 부여합니다. - 권한 부여 - 알림 권한 부여를 건너뛰겠습니까? - yuzu는 중요한 정보를 알려드리지 않습니다. + 알림 켜기 + 알림을 끄겠습니까? + yuzu가 중요한 정보를 알려드리지 않습니다. 권한 거부됨 - 이 권한을 너무 많이 거부했으므로 이제 시스템 설정에서 수동으로 권한을 부여해야 합니다. + 권한 허용을 너무 많이 거부하여 시스템 설정에서 수동으로 권한을 부여해야 합니다. 정보 빌드 버전, 크레딧 등 도움말 건너뛰기 취소 - Amiibo keys 설치 - 게임에서 아미보 사용 시 필요 - 잘못된 keys 파일 선택 - keys가 성공적으로 설치됨 - 암호화 keys 읽기 오류 - 잘못된 암호화 keys + amiibo 키 설치 + 게임에서 amiibo 사용 시 필요 + 잘못된 키 파일이 선택됨 + 키 값을 설치했습니다. + 암호화 키 읽기 오류 + 키 파일의 확장자가 .keys인지 확인하고 다시 시도하세요. + 키 파일의 확장자가 .bin인지 확인하고 다시 시도하세요. + 암호화 키가 올바르지 않음 https://yuzu-emu.org/help/quickstart/#dumping-decryption-keys - 선택한 파일이 잘못되었거나 손상되었습니다. keys를 다시 덤프하세요. + 선택한 파일이 잘못되었거나 손상되었습니다. 키를 다시 덤프하세요. GPU 드라이버 설치 잠재적으로 더 나은 성능 또는 정확성을 위해 대체 드라이버를 설치하세요. 고급 설정 에뮬레이터 설정 구성 - 최근 플레이한 게임 - 최근 추가한 게임 - 판매용 + 최근 플레이 + 최근 추가 + 패키지 홈브류 yuzu 폴더 열기 yuzu의 내부 파일 관리 - 앱 모양 수정 + 앱 디자인 편집 파일 관리자를 찾을 수 없음 - yuzu 디렉토리를 열 수 없음 + yuzu 디렉터리를 열 수 없음 파일 관리자의 사이드 패널에서 사용자 폴더를 수동으로 찾아주세요. 저장 데이터 관리 - 데이터를 저장했습니다. 아래에서 옵션을 선택하세요. + 저장 데이터를 발견했습니다. 아래에서 옵션을 선택하세요. 저장 파일 가져오기 또는 내보내기 - 가져오기 성공 - 저장 디렉터리 구조가 잘못됨 + 데이터를 불러왔습니다. + 올바르지 않은 저장 디렉터리 구조 첫 번째 하위 폴더 이름은 게임의 타이틀 ID여야 합니다. 가져오기 내보내기 - + 펌웨어 설치 + 펌웨어는 ZIP 파일이며 일부 게임을 부팅하는 데 필요합니다. + 펌웨어 설치 + 펌웨어를 설치했습니다. + 펌웨어 설치 실패 + 디버그 로그 공유 + yuzu의 로그 파일을 공유하여 문제 디버깅하기 + 로그 파일을 찾을 수 없습니다. + 게임 콘텐츠 설치 + 게임 업데이트 또는 DLC 설치 + https://yuzu-emu.org/help/quickstart/#dumping-installed-updates 가이아는 진짜가 아님 - 클립보드에 복사 - 오픈 소스 스위치 에뮬레이터 + 클립보드에 복사되었습니다. + 오픈 소스 Switch 에뮬레이터 기여자 yuzu 팀의 \u2764로 제작 https://github.com/yuzu-emu/yuzu/graphs/contributors + Android용 yuzu를 가능하게 하는 프로젝트 빌드 https://discord.gg/u77vRWY https://yuzu-emu.org/ https://github.com/yuzu-emu - 미리 체험하기 - 미리 체험하기 신청 + 앞서 해보기 + 앞서 해보기 신청 https://play.google.com/store/apps/details?id=org.yuzu.yuzu_emu.ea - 최첨단 기능, 미리 체험하기 업데이트 등 - 미리 체험하기 혜택 - 최첨단 기능 - 미리 체험하기 업데이트 + 최신 기능, 업데이트 미리 체험 등 + 앞서 해보기 혜택 + 최신 기능 + 업데이트 미리 체험 수동 설치 불필요 우선 지원 - 게임 보존 도움주기 - 영원한 감사의 마음을 전합니다 + 게임 보존 지원 + 우리의 영원한 감사의 마음 관심 있으세요? - 제한 속도 활성화 - 활성화하면 에뮬레이션 속도가 정상 속도의 지정된 비율로 제한됩니다. + 속도 제한 + 에뮬레이션 속도를 정상 속도의 지정된 비율로 제한합니다. 속도 제한 비율 - 에뮬레이션 속도를 제한할 비율을 지정합니다. 기본값인 100%로 설정하면 에뮬레이션이 정상 속도로 제한됩니다. 값이 높거나 낮으면 속도 제한이 증가하거나 감소합니다. + 에뮬레이션 속도의 제한 비율을 지정합니다. 100%가 정상 속도입니다. 값이 높거나 낮으면 속도 제한이 증가하거나 감소합니다. CPU 정확도 - - 도킹 모드 - 도킹 모드에서 에뮬레이션하면 성능이 저하되는 대신 해상도가 향상됩니다. - 에뮬레이트된 지역 - 에뮬레이트된 언어 + 독 모드 + 해상도를 높이며 성능이 저하됩니다. 비활성화시 휴대 모드가 사용되며 해상도는 낮아지고 성능은 향상됩니다. + 에뮬레이트 지역 + 에뮬레이트 언어 RTC 날짜 선택 RTC 시간 선택 - 커스텀 RTC 활성화 - 이 설정을 사용하면 현재 시스템 시간과 별도로 사용자 지정 실시간 시계를 설정할 수 있음 - 커스텀 RTC 설정 + 사용자 지정 RTC + 현재 시스템 시간과 별도로 사용자 지정 실시간 시계를 설정할 수 있습니다. + 사용자 지정 RTC 설정 - API 정확도 수준 - 해상도 + 해상도 (휴대 모드/독 모드) 수직동기화 모드 화면비 - 창 적응 필터 - 안티-에일리어싱 방법 - 최대 클럭 강제 설정 (아드레노만 해당) + 윈도우 적응 필터 + 안티에일리어싱 방법 + 최대 클럭 강제 설정 (아드레노 전용) GPU가 가능한 최대 클럭으로 실행되도록 강제합니다 (열 제약 조건은 여전히 적용됩니다). 비동기 셰이더 사용 - 셰이더를 비동기식으로 컴파일하므로 끊김 현상이 줄어들지만 글리치가 발생할 수 있습니다. - 그래픽 디버깅 활성화 - 이 옵션을 선택하면 그래픽 API가 느린 디버깅 모드로 전환됩니다. - 디스크 셰이더 캐시 사용 - 생성된 셰이더를 디스크에 저장하고 불러오기하여 끊김 현상을 줄입니다. + 셰이더를 비동기식으로 컴파일하여 끊김 현상을 줄이지만 글리치가 발생할 수 있습니다. + 반응형 플러싱 사용 + 일부 게임에서 성능 저하를 감수하고 렌더링 정확도를 향상합니다. + 디스크 셰이더 캐시 + 생성된 셰이더를 로컬에 저장하고 로드하여 끊김 현상을 줄입니다. - + + CPU + API + 그래픽 디버깅 + 그래픽 API를 느린 디버깅 모드로 설정합니다. 볼륨 오디오 출력의 볼륨을 지정합니다. 기본값 - 저장된 설정 - %1$s를 위해 저장된 설정 - %1$s.ini 저장 중 오류: %2$s - 불러오기 중... - 이 설정을 기본값으로 되돌리겠습니까? + 설정이 저장되었습니다. + %1$s 전용 설정이 저장되었습니다. + %1$s.ini 저장 중 오류 발생: %2$s + 불러오는 중... + 이 설정을 기본값으로 재설정하겠습니까? 기본값으로 재설정 모든 설정을 초기화하겠습니까? - 모든 고급 설정이 기본 구성으로 재설정됩니다. 이 설정은 되돌릴 수 없습니다. + 모든 고급 설정이 기본 구성으로 재설정됩니다. 이 작업은 되돌릴 수 없습니다. 설정 초기화 닫기 - 자세히 알아보기 - + 자세히 + 자동 + 제출 + Null + 가져오기 + 내보내기 GPU 드라이버 선택 - 현재 사용 중인 GPU 드라이버를 교체하겠습니까? + 현재 사용중인 GPU 드라이버를 변경하겠습니까? 설치 기본값 - 기본 GPU 드라이버 사용 + 기본 GPU 드라이버를 사용합니다. + 잘못된 드라이브가 선택되었습니다. 시스템 기본값을 사용합니다. 시스템 GPU 드라이버 드라이버 설치 중... @@ -182,51 +201,50 @@ 그래픽 오디오 테마 및 색상 + 디버그 - 롬이 암호화되었음 - 게임 카트리지 또는 설치된 타이틀를 다시 덤프하세요.]]> - prod.keys 파일이 설치되어 있는지 확인하세요.]]> + 롬 파일이 암호화되어있음 + prod.keys 파일이 설치되어 있는지 확인하세요.]]> 비디오 코어를 초기화하는 동안 오류 발생 - 이 문제는 일반적으로 호환되지 않는 GPU 드라이버로 인해 발생합니다. 사용자 지정 GPU 드라이버를 설치하면 이 문제가 해결될 수 있습니다. - 롬을 불러올 수 없음 + 일반적으로 이 문제는 호환되지 않는 GPU 드라이버로 인해 발생합니다. 사용자 지정 GPU 드라이버를 설치하면 이 문제가 해결될 수 있습니다. + 롬 파일을 불러올 수 없음 롬 파일이 존재하지 않음 에뮬레이션 종료 완료 - FPS 카운터 - 토글 제어 - 상대 스틱 센터 - 십자패드 슬라이드 - 햅틱 - 오버레이 표시 - 모두 토글 - 오버레이 조정 - 스케일 + FPS 표시 + 컨트롤러 선택 + 스틱의 중심 이동 + 십자키 슬라이드 + 터치 햅틱 + 컨트롤러 표시 + 모두 선택 + 컨트롤러 조정 + 크기 불투명도 - 오버레이 재설정 - 오버레이 편집 + 컨트롤러 설정 초기화 + 컨트롤러 위치 편집 에뮬레이션 일시 중지 에뮬레이션 일시 중지 해제 - 오버레이 옵션 + 화면 오버레이 설정 - 설정 불러오기 중... + 설정 불러오는 중... - 가상 키보드 + 소프트웨어 키보드 - 정보 + 중단 계속 시스템 아카이브를 찾을 수 없음 %s가 누락되었습니다. 시스템 아카이브를 덤프하세요.\n에뮬레이션을 계속하면 충돌 및 버그가 발생할 수 있습니다. 시스템 아카이브 저장하기/불러오기 오류 - 치명적인 오류 - 치명적인 오류가 발생했습니다. 자세한 내용은 로그를 확인하십시오.\n에뮬레이션을 계속하면 충돌 및 버그가 발생할 수 있습니다. + 치명적 오류 + 치명적 오류가 발생했습니다. 자세한 내용은 로그를 확인하십시오.\n에뮬레이션을 계속하면 충돌 및 버그가 발생할 수 있습니다. 이 설정을 끄면 에뮬레이션 성능이 크게 저하됩니다! 최상의 환경을 위해 이 설정을 활성화된 상태로 두는 것이 좋습니다. - 일본 미국 @@ -234,12 +252,11 @@ 호주 중국 대한민국 - 타이완 - - + 대만 + 영국 하계 표준시(GB) - 불칸 + Vulcan 없음 @@ -256,17 +273,17 @@ 4X (2880p/4320p) (느림) - 즉시 (끔) + 즉각 표시 (끄기) 메일박스 - FIFO (켬) - FIFO 릴랙스 + FIFO (켜기) + FIFO Relaxed - 가장 가까운 이웃 - 이중선형 - 고등차수보간 + 최근접 보간 + 쌍선형 보간 + 쌍입방 보간 가우시안 - 스케일포스 + ScaleForce AMD FidelityFX™ 초고해상도 @@ -274,27 +291,29 @@ FXAA SMAA + 자동 + 기본 (16:9) 강제 4:3 강제 21:9 강제 16:10 - 창에 맞게 늘림 + 화면에 맞춤 정확함 - 안전하지 않음 - 편집증 (느림) + 최적화 (안전하지 않음) + 최적화하지 않음 (느림) - 십자패드 + 십자키 L 스틱 R 스틱 스크린샷 - 셰이더 준비하기 + 셰이더 준비하는 중 셰이더 빌드 중 @@ -303,13 +322,19 @@ Material You - 테마 모드 변경 - 팔로우 시스템 - 밝음 - 어두움 + 다크 모드 설정 + 시스템 값 사용 + 라이트 모드 + 다크 모드 - 검은색 배경 사용 - 어두운 테마를 사용할 때는 검은색 배경을 적용합니다. + 검정 배경 + 어두운 테마를 사용할 때는 검정 배경을 적용합니다. - + 음소거 + 음소거 해제 + + + 라이센스 + AMD의 고품질 업스케일링 + diff --git a/src/android/app/src/main/res/values-nb/strings.xml b/src/android/app/src/main/res/values-nb/strings.xml index 5443cef429..3162a9d41b 100644 --- a/src/android/app/src/main/res/values-nb/strings.xml +++ b/src/android/app/src/main/res/values-nb/strings.xml @@ -1,5 +1,5 @@ - + Denne programvaren vil kjøre spill for Nintendo Switch-spillkonsollen. Ingen spilltitler eller nøkler er inkludert.<br /><br />Før du begynner, må du finne prod.keys ]]> filen din på enhetslagringen.<br /><br />Lær mer]]> Emulering er aktiv @@ -25,7 +25,6 @@ Tilbake Legg til spill Velg din spillmappe - Spill Søk @@ -37,7 +36,7 @@ Hoppe over valg av spillmappe? Spill vises ikke i Spill-listen hvis en mappe ikke er valgt. https://yuzu-emu.org/help/quickstart/#dumping-games - Søk i spill + Søk i spill| Spillkatalogen er valgt Installer prod.keys Nødvendig for å dekryptere spill @@ -61,6 +60,8 @@ Ugyldig nøkkelfil valgt Nøkler vellykket installert Feil ved lesing av krypteringsnøkler + Kontroller at nøkkelfilen har filtypen .keys, og prøv igjen. + Kontroller at nøkkelfilen har filtypen .bin, og prøv igjen. Ugyldige krypteringsnøkler https://yuzu-emu.org/help/quickstart/#dumping-decryption-keys Den valgte filen er feil eller ødelagt. Vennligst dump nøklene på nytt. @@ -86,7 +87,17 @@ Det første undermappenavnet må være spillets tittel-ID. Importer Eksporter - + Installer fastvare + Fastvaren må være i et ZIP-arkiv og er nødvendig for å starte noen spill. + Installering av fastvare + Fastvaren er vellykket installert + Installasjon av fastvare mislyktes + Del feilsøkingslogger + Del yuzus loggfil for å feilsøke problemer + Ingen loggfil funnet + Installer spillinnhold + Installer spilloppdateringer eller DLC + https://yuzu-emu.org/help/quickstart/#dumping-installed-updates Gaia er ikke ekte Kopiert til utklippstavlen @@ -94,6 +105,7 @@ Bidragsytere Laget med \u2764 fra yuzu-teamet https://github.com/yuzu-emu/yuzu/graphs/contributors + Prosjekter som gjør yuzu for Android mulig Bygg https://discord.gg/u77vRWY https://yuzu-emu.org/ @@ -114,41 +126,43 @@ Er du interessert? - Aktiver hastighetsbegrensning - Når aktivert, begrenses emuleringshastigheten til en angitt prosentandel av normal hastighet. + Begrense hastigheten + Begrenser emuleringshastigheten til en spesifisert prosentandel av normal hastighet. Hastighetsbegrensning i prosent - Angir prosentandelen som skal begrense emuleringshastigheten. Med standardverdien 100 % vil emuleringen være begrenset til normal hastighet. Høyere eller lavere verdier vil øke eller redusere hastighetsbegrensningen. + Angir prosentandelen som skal begrense emuleringshastigheten. 100 % er normal hastighet. Høyere eller lavere verdier vil øke eller redusere hastighetsgrensen. CPU-nøyaktighet - Dokket modus - Emulerer i dokket modus, noe som øker oppløsningen på bekostning av ytelsen. + Øker oppløsningen, men reduserer ytelsen. Håndholdt modus brukes når den er deaktivert, noe som reduserer oppløsningen og øker ytelsen. Emulert region Emulert språk Velg RTC-dato Velg RTC-tid - Aktiver egendefinert RTC - Med denne innstillingen kan du stille inn en egendefinert sanntidsklokke som er atskilt fra gjeldende systemtid. - Angi egendefinert RTC + Tilpasset Sannhetstidsklokke + Gjør det mulig å stille inn en egendefinert sanntidsklokke separat fra den gjeldende systemtiden. + Angi tilpasset RTC - API Nøyaktighetsnivå - Oppløsning + Oppløsning (håndholdt/dokket) VSync-modus Størrelsesforhold Filter for vindustilpasning - Anti-Aliasing-metode + Anti-aliasing-metode Tving fram maksimal klokkefrekvens (kun Adreno) Tvinger GPU-en til å kjøre med maksimal klokkefrekvens (termiske begrensninger vil fortsatt gjelde). Bruk asynkrone shaders - Kompilerer shaders asynkront, noe som reduserer hakkingen, men kan føre til feil. - Aktiver feilsøking av grafikk - Når dette er merket av, går grafikk-API-et inn i en langsommere feilsøkingsmodus. - Bruk disk shader-cache - Reduser hakking ved å lagre og laste inn genererte shaders på disken. + Kompilerer shaders asynkront, noe som reduserer hakking, men kan føre til feil. + Bruk reaktiv spyling + Forbedrer gjengivelsesnøyaktigheten i enkelte spill på bekostning av ytelsen. + Disk shader-hurtigbuffer + Reduserer hakking ved å lagre og laste inn genererte shaders lokalt. - + + CPU + API + Feilsøking av grafikk + Setter grafikk-API-et til en langsom feilsøkingsmodus. Volum Angir volumet på lydutgangen. @@ -164,14 +178,19 @@ Alle avanserte innstillinger tilbakestilles til standardkonfigurasjonen. Dette kan ikke angres. Tilbakestilling av innstillinger Lukk - Lær Mer - + Lær mer + Auto + Send inn + Null + Importer + Eksporter Velg GPU-driver Ønsker du å bytte ut din nåværende GPU-driver? Installer Standard Bruk av standard GPU-driver + Ugyldig driver valgt, bruker systemstandard! Systemets GPU-driver Installerer driver... @@ -182,10 +201,10 @@ Grafikk Lyd Tema og farge + Feilsøk ROM-en din er kryptert - spillkassetter eller installerte titler.]]> prod.keys filen er installert slik at spillene kan dekrypteres.]]> Det oppstod en feil ved initialisering av videokjernen Dette skyldes vanligvis en inkompatibel GPU-driver. Installering av en tilpasset GPU-driver kan løse problemet. @@ -196,25 +215,25 @@ Avslutt emulering Ferdig FPS-teller - Veksle kontroller - Relativt senter for stikken - DPad-skyveplate - Haptikk + Veksle mellom kontrollene + Relativt pinnesenter + D-pad-skyving + Berøringshaptikk Vis overlegg - Slå av alt + Veksle mellom alle Juster overlegg Skaler Gjennomsiktighet Tilbakestill overlegg Rediger overlegg - Pause Emulering - Opphev pausing av emulering - Alternativer for overlegg + Pause emulering + Ta emuleringen ut av pause + Overlay-alternativer Laster inn innstillinger... - Programvare Tastatur + Programvaretastatur Avbryt @@ -226,7 +245,6 @@ Fatal Feil Det oppstod en fatal feil. Sjekk loggen for mer informasjon.\nFortsatt emulering kan føre til krasj og feil. Hvis du slår av denne innstillingen, reduseres emuleringsytelsen betydelig! Vi anbefaler at du lar denne innstillingen være aktivert for å få den beste opplevelsen. - Japan USA @@ -236,8 +254,7 @@ Korea Taiwan - - + GB Vulkan Ingen @@ -274,12 +291,14 @@ FXAA SMAA + Auto + Standard (16:9) Tving 4:3 Tving 21:9 Tving 16:10 - Strekk til Vindu + Strekk til vindu Nøyaktig @@ -287,9 +306,9 @@ Paranoid (Langsom) - D-Pad - Venstre Pinne - Høyre Pinne + D-pad + Venstre spak + Høyre spak Hjem Skjermbilde @@ -298,7 +317,7 @@ Bygging av shaders - Endre appens tema + Endre app-tema Standard Material You @@ -309,7 +328,13 @@ Mørk - Bruk svart bakgrunn + Svart bakgrunn Bruk svart bakgrunn når du bruker det mørke temaet. - + Lydløs + Slå på lyden + + + Lisenser + Oppskalering av høy kvalitet fra AMD + diff --git a/src/android/app/src/main/res/values-pl/strings.xml b/src/android/app/src/main/res/values-pl/strings.xml index 899e233d0a..f4d9920c24 100644 --- a/src/android/app/src/main/res/values-pl/strings.xml +++ b/src/android/app/src/main/res/values-pl/strings.xml @@ -1,5 +1,5 @@ - + To oprogramowanie umożliwia uruchomienie gier z konsoli Nintendo Switch. Nie zawiera gier ani wymaganych kluczy.<br /><br />Zanim zaczniesz, wybierz plik kluczy prod.keys ]]> z katalogu w pamięci masowej.<br /><br />Dowiedz się więcej]]> Emulacja jest uruchomiona @@ -25,7 +25,6 @@ Wstecz Dodaj gry Wybierz folder zawierający Twoje gry - Gry Szukaj @@ -61,6 +60,8 @@ Wybrano niepoprawne klucze Klucze zainstalowane pomyślnie Błąd podczas odczytu kluczy + Upewnij się że twoje klucze mają rozszerzenie .keys i spróbuj ponownie. + Upewnij się że twoje klucze mają rozszerzenie .bin i spróbuj ponownie. Niepoprawne klucze https://yuzu-emu.org/help/quickstart/#dumping-decryption-keys Wybrany plik jest niepoprawny lub uszkodzony. Zrzuć ponownie swoje klucze. @@ -86,7 +87,17 @@ Pierwszy podkatalog musi zawierać w nazwie numer ID tytułu gry. Importuj Eksportuj - + Zainstaluj firmware + Firmware musi być w postaci archiwum ZIP, niektóre gry wymagają go do uruchomienia/prawidłowego działania + Instaluję firmware + Zainstalowano pomyślnie + Błąd podczas instalacji firmware + Udostępnij logi debugowania + Podziel się logami yuzu, pomoże to twórcom w poprawie działania emulatora + Nie znaleziono plików logów + Zainstaluj zawartość gry + Zainstaluj aktualizację gry lub dodatek DLC + https://yuzu-emu.org/help/quickstart/#dumping-installed-updates Gaia isn\'t real Skopiowano do schowka @@ -94,6 +105,7 @@ Współtwórcy Stworzone z \u2764 przez zespół yuzu https://github.com/yuzu-emu/yuzu/graphs/contributors + Projekty dzięki którym yuzu mógł zostać stworzony Wersja https://discord.gg/u77vRWY https://yuzu-emu.org/ @@ -114,27 +126,25 @@ Jesteś zainteresowany? - Włącz limit szybkości emulacji + Limit szybkość Włącz, aby ustawić procentowy limit szybkości emulacji Procentowy limit szybkości emulacji Określa limit szybkości emulacji gier. Domyślna wartość 100% oznacza normalną szybkość z jaką działa gra. Wartości niższe lub wyższe zmniejszą lub zwiększą limit szybkości. Dokładność procesora CPU - Tryb zadokowany - Emulacja w trybie stacji dokującej, zwiększa rozdzielczość kosztem wydajności. + Zwiększa rozdzielczość kosztem wydajności. Kiedy wyłączone, używany jest tryb Handheld, który obniża rozdzielczość i dzięki temu zwiększa wydajność. Region emulacji Język emulacji Ustaw datę RTC Ustaw czas RTC - Włącz niestandardowy zegar RTC + Niestandardowy RTC Ta opcja pozwala na wybranie własnych ustawień czasu używanych w czasie emulacji, innych niż czas systemu Android. Ustaw niestandardowy czas RTC - Interfejs graficzny Poziom precyzji emulacji - Rozdzielczość + Rozdzielczość (Handheld/Zadokowany) Synchronizacja pionowa VSync Proporcje ekranu Filtr adaptacji rozdzielczości @@ -143,12 +153,16 @@ Wymusza uruchomienie maksymalnego taktowania układu graficznego (zabezpieczenia termiczne będą dalej aktywne). Wyłącz synchronizację shaderów Kompiluj oświetlenie bez synchronizacji, poprawi wydajność ale może powodować błędy. - Włącz debugowanie grafiki - Kiedy włączone, interfejs graficzny korzysta z wolnego trybu debugowania błędów. - Użyj pamięci podręcznej shaderów na dysku + Użyj spłukiwania reaktywnego - reactive flushing + Poprawia jakość renderowania w kilku grach, kosztem wydajności. + Pamięć podręczna shaderów Zmniejsza przycięcia przez przechowywanie gotowych wygenerowanych plików oświetlenia w pamięci urządzenia. - + + CPU + Interfejs graficzny + Debugowanie grafiki + Kiedy włączone, interfejs graficzny korzysta z wolnego trybu debugowania błędów. Głośność Ustala poziom głośności wyjścia dźwięku. @@ -161,17 +175,21 @@ Przywrócić wartość tego ustawienia do wartości domyślnej? Przywróć ustawienia domyślne Przywrócić WSZYSTKIE ustawienia? - Wszystkie zaawansowane opcje zostaną przywrócone do wartości domyślnych. Czynności nie będzie można cofnąć. + Wszystkie zaawansowane opcje zostaną przywrócone do wartości domyślnych. Czynności nie będzie można cofnąć Reset ustawień Zamknij Dowiedz się więcej - + Automatyczny + Zatwierdź + Importuj + Eksportuj Wybierz sterownik GPU Chcesz zastąpić obecny sterownik układu graficznego? Zainstaluj Domyślne Aktywny domyślny sterownik GPU + Wybrano błędny sterownik, powrót do domyślnego. Systemowy sterownik GPU Instalowanie sterownika... @@ -182,10 +200,10 @@ Grafika Dźwięk Motyw i kolor + Debug Twój ROM jest zakodowany - kardridży lub zainstalowanych gier.]]> prod.keys jest zainstalowany aby gry mogły zostać odczytane.]]> Błąd inicjacji podsystemu graficznego Zazwyczaj spowodowane niekompatybilnym sterownikiem GPU, instalacja niestandardowego sterownika może rozwiązać ten problem. @@ -198,23 +216,23 @@ Licznik FPS Wybierz przyciski Wycentruj gałki - Ruchomy DPad + Ruchomy D-pad Wibracje haptyczne Pokaż przyciski - Zaznacz wszystkie + Włącz wszystkie Dostosuj nakładkę Skala Przeźroczystość - Resetuj + Resetuj nakładkę Edytuj nakładkę Wstrzymaj emulację Wznów emulację Opcje nakładki - Wczytywanie ustawień... + Wczytuję ustawienia... - Klawiatura systemowa + Klawiatura programowa Przerwij @@ -226,7 +244,6 @@ Błąd krytyczny Wystąpił błąd krytyczny. Szczegóły znajdziesz w pliku log.\nKontynuowanie może spowodować błędy lub przerwanie emulacji. Wyłączenie tej opcji znacząco ograniczy wydajność! Dla najlepszego doświadczenia, zaleca się zostawienie tej opcji włączonej. - Japonia USA @@ -236,8 +253,7 @@ Korea Tajwan - - + GB Vulkan Żadny @@ -274,12 +290,14 @@ FXAA SMAA + Automatyczny + Domyślne (16:9) Wymuś 4:3 Wymuś 21:9 Wymuś 16:10 - Rozciągnij do Okna + Rozciągnij do okna Dokładny @@ -287,7 +305,7 @@ Paranoid (Wolny) - D-Pad + D-pad Lewa gałka Prawa gałka Home @@ -298,18 +316,21 @@ Budowanie shaderów - Zmień motyw aplikacji + Ustaw motyw aplikacji Domyślny Material You - Zmiana trybu motywu + Zmień tryb motywu Podążaj za systemowym Jasny Ciemny - Używaj czarnego tła + Czarne tła Kiedy używany ciemny motyw, tła zostają zastąpione czernią. - + + Licencje + Rozciąganie wysokiej jakości od AMD + diff --git a/src/android/app/src/main/res/values-pt-rBR/strings.xml b/src/android/app/src/main/res/values-pt-rBR/strings.xml index caa0953645..8888fc7504 100644 --- a/src/android/app/src/main/res/values-pt-rBR/strings.xml +++ b/src/android/app/src/main/res/values-pt-rBR/strings.xml @@ -1,30 +1,31 @@ - + - Este software corre jogos para a consola Nintendo Switch. Não estão incluídas nem jogos ou chaves. <br /><br />Antes de começares, por favor localiza o ficheiro no armazenamento do teu dispositivo.<br /><br /> + Este software executa jogos do console Nintendo Switch. Não estão inclusos nem jogos ou chaves. <br /><br />Antes de começar, por favor localize o arquivo no armazenamento de seu dispositivo.<br /><br /> Emulação está Ativa - Mostra uma notificação permanente enquanto a emulação está a correr. + Mostra uma notificação permanente enquanto a emulação estiver em andamento. Yuzu está em execução Notificações e erros - Mostra notificações quendo algo corre mal. - Permissões de notificação não permitidas + Mostra notificações quando algo dá errado. + Acesso às notificações não concedido! - Bemvindo! - Aprende como configurar <b>yuzu</b> e arranca a emulação. - Começa - Chaves - Seleciona o teu ficheiro <b>prod.keys</b> com o botão abaixo. - Seleciona as Chaves + Bem-vindo! + Aprenda como configurar o <b>yuzu</b> e mergulhe na emulação. + Primeiros passos + Keys + Selecione seu arquivo <b>prod.keys</b> com o botão abaixo. + Selecione as Keys Jogos - Seleciona a tua pasta <b>Games</b> com o botão abaixo. + Seleciona sua pasta <b>Jogos</b> com o botão abaixo. Feito - Tudo pronto.\nDisfruta dos teus jogos! + Tudo pronto.\nAproveite seus jogos! Continuar Próximo Voltar - Adiciona Jogos - Seleciona a tua pasta de Jogos + Adicionar Jogos + Selecione sua pasta de Jogos + Completo! Jogos @@ -37,7 +38,8 @@ Ignorar a seleção da pasta de jogos? Os jogos não serão exibidos na lista de jogos se uma pasta não estiver selecionada. https://yuzu-emu.org/help/quickstart/#dumping-games - Procurar Jogos + Procurar jogos + Procurar nas definições Pasta de Jogos selecionada Instala prod.keys Necessário para desencriptar jogos comerciais @@ -61,15 +63,18 @@ Ficheiro de chaves inválido Chaves instaladas com sucesso Erro ao ler chaves de encriptação + Verifique se seu arquivo keys possui a extensão .keys e tente novamente. + Verifique se seu arquivo keys possui a extensão .bin e tente novamente. Chaves de encriptação inválidas https://yuzu-emu.org/help/quickstart/#dumping-decryption-keys O ficheiro selecionado está corrompido. Por favor recarrega as tuas chaves. Instala driver para GPU Instala drivers alternativos para desempenho ou precisão potencialmente melhores Definições avançadas + Definições avançadas: %1$s Configura definições do emulador - Jogos recentes - Adicionados recentemente + Jogado recentemente + Adicionado recentemente Jogos comerciais Homebrew Abre a pasta Yuzu @@ -86,6 +91,33 @@ O nome da primeira sub pasta tem de ser a ID do jogo. Importar Exportar + Instalar firmware + O firmware deve estar em um arquivo ZIP e é necessário para iniciar alguns jogos. + Instalando firmware + Firmware instalado com sucesso. + Falha na instalação do firmware + Cofirma que os ficheiros firmware nca estão no root do finheiro zip e tenta de novo. + Compartilhe registros de debug. + Compartilhe o arquivo de registro do yuzu para obter ajuda com problemas + Arquivo de registro não encontrado + Instalar conteúdo de jogos + Instalar atualizações de jogos ou DLC + A instalar conteúdo... + Erro ao instalar ficheiro(s) para NAND + Por favor confitma que o conteúdo(s) é válido e que as prod.keys estão instaladas. + A instalação de jogos base não é permitida para evitar possíveis conflitos. + Sò conteúdos NSP e XCI são suportados. Por favor verifica que o conteúdo(s) do jogo são válidos. + %1$d erro(s) de instalação + Conteúdo(s) de jogo instalados com sucesso + %1$d instalado com sucesso + %1$d substituída com êxito + https://yuzu-emu.org/help/quickstart/#dumping-installed-updates + Drivers personalizados não suportados + Carrea«gamento de drivers personalizados não é suportado pr este dispositivo. \nCheck verifica esta opção de futuro para confirmar se o suporte foi adicionado! + Administrar dados yuzu + Importa/exporta firmware, chaves, dados do usuário e mais! + Partilha ficheiro duardado + Erro ao exportar dados guardados Gaia não é real @@ -94,7 +126,18 @@ Contribuidores Feito com \u2764 da equipa do Yuzu https://github.com/yuzu-emu/yuzu/graphs/contributors + Projetos que tornam o yuzu para Android possível Versão + Dado de utilizados + Importar/exportar todos dados da aplicação data.\n\n Ao importar dados do utilizados, todos os dados existentes do utilizados serão excluídos! + A exportar dados de utilizados... + A importar dados de utilizador... + Importar dados de utilizados... + Backup yuzu inválido + Dados de utilizados exportados com sucesso + Dados de utilizador importado com sucesso + Exportação cancelada + Verifiqua se as pastas de dados do utilizados estão na raiz da pasta zip e contêm um arquivo de configuração em config/config.ini e tenta novamente. https://discord.gg/u77vRWY https://yuzu-emu.org/ https://github.com/yuzu-emu @@ -114,41 +157,53 @@ Estás interessado? - Ativar limite de velocidade - Quando ativada, a velocidade da emulação será limitada à percentagem definida da velocidade normal. + Limite de velocidade + Limita a velocidade da emulação a uma porcentagem específica da velocidade normal. Percentagem do limite de velocidade - Especifica o limite da percentagem da velocidade da emulação. Com a velocidade por defeito a 100% a emulação será limitada à velocidade normal. Valores maiores ou menores aumentarão ou diminuirão o limite de velocidade. + Especifica a porcentagem para limitar a velocidade de emulação. 100% é o normal. Valores mais altos ou mais baixos irão aumentar ou diminuir o limite de velocidade. Precisão do CPU + %1$s%2$s - Modo ancorado - Emula em modo ancorado, que aumenta a resolução ás custas da performance. + Modo Ancorado + Aumenta a resolução, diminuindo o desempenho. O Modo Portátil é utilizado quando estiver desabilitado, diminuindo a resolução e melhorando o desempenho. Região da emulação Idioma da emulação - Seleciona a data RTC - Seleciona a hora RTC - Ativa RTC personalizado - Esta configuração permite definir um RTC personalizado diferente da hora atual do sistema - Define RTC personalizado + Selecione a data do sistema + Selecione a hora do sistema + Data e hora personalizada + Permite a você configurar um relógio em tempo real separado do relógio do seu dispositivo. + Defina um relógio em tempo real personalizado - API Nível de precisão - Resolução + Resolução (Portátil/Ancorado) Modo VSync - Proporção do ecrã + Oriantação + Proporção da tela Filtro de Adaptação da Janela - Método de Anti-Aliasing + Método de Anti-Serrilhado Força velocidade máxima (Adreno only) Força o GPU a correr à velocidade máxima (restrições térmicas serão aplicadas) Usa shaders assíncronos - Compila shaders assincronamente, que aumentará a fluidez, mas poderá causar falhas. + Compila os shaders de forma assíncrona, reduzindo travamentos, mas pode apresentar problemas. + Usar flushing reativo + Melhora a precisão da renderização em alguns jogos ao custo de desempenho. + Cache de shaders em disco + Reduz travamentos ao armazenar e carregar localmente os shaders. + + + CPU + Depuração da CPU + Coloca a CPU em um modo de depuração lento. + GPU + API Ativar depuração de gráficos Quando selecionado, a API gráfica entra num modo de depuração mais lento. - Usar cache de shaders em disco - Aumenta a fluidez ao guardar e carregar shaders gerados para o armazenamento. + Fastmem + Motor de saída Volume Especifica o volume de saída. @@ -157,14 +212,24 @@ Definições guardadas Definições guardadas para %1$s Erro ao guardar %1$s.ini: %2$s + Menu não implementado A carregar... + A desligar... Queres reverter esta definição para os valores padrão? Reverter para padrão Redefinir todas as definições? - Todas as definições avançadas serão redefinidas para as definições padrão. Isto não pode ser revertido. + Todas as configurações avançadas retornarão ao padrão. Isto não pode ser desfeito. Redefinir definições Fechar Saiba mais + Automático + Enviar + Nenhum (desativado) + Importar + Exportar + Exportação falhada + IMportação falhada + A cancelar Seleciona a driver para o GPU @@ -172,6 +237,7 @@ Instalar Padrão Usar o driver padrão do GPU + Driver selecionado inválido, a usar o padrão do sistema! Driver do GPU padrão A instalar o Driver... @@ -182,10 +248,11 @@ Gráficos Áudio Cor e tema. + Depuração A tua ROM está encriptada - Cartidges de Jogo or Jogos Instalados.]]> + cartucho de jogo or títulos instalados.]]> prod.keys está instalado para que os jogos possam ser desencriptados.]]> Ocorreu um erro ao iniciar o núcleo de vídeo. Isto é normalmente causado por um driver de GPU incompatível. Instalar um driver GPU pode resolver este problema. @@ -193,25 +260,25 @@ O ficheiro da ROM não existe - Sair da emulação + Parar emulação Feito Contador de FPS - Alterar Controlos - Centro do Analógico Relativo - Deslizar do DPad - Hápticos - Mostrar sobreposição - Alterar todos - Ajustar a sobreposição + Alterar controles + Centro Relativo de Analógico + Deslizamento dos Botões Direcionais + Vibração ao tocar + Mostrar overlay + Marcar/Desmarcar tudo + Ajustar overlay Escala Opacidade - Redefinir Sobreposição - Editar sobreposição - Pausa emulação + Restaurar overlay padrão + Editar overlay + Pausar emulação Retomar emulação - Opções de sobreposição + Opções de overlay - Configurações a carregar... + Carregando configurações... Teclado de software @@ -226,6 +293,9 @@ Erro fatal Ocorreu um erro fatal. Verifica o teu registro para detalhes. \nContinuar a emulação pode causar erros. Desligar esta configuração irá reduzir a performance da emulação significantemente! Para a melhor experiência é recomendado que deixes esta configuração ativada. + RAM do dispositivo: %1$s\nRecommended: %2$s + %1$s %2$s + Nenhum jogo inicializável presente! Japão @@ -236,7 +306,14 @@ Coréia Taiwan - + + Byte + KB + MB + GB + TB + PB + EB Vulcano @@ -274,12 +351,17 @@ FXAA SMAA + + Landscape + Portrait + Automático + Padrão (16:9) Forçar 4:3 Forçar 21:9 Forçar 16:10 - Esticar para a janela + Esticar à janela Preciso @@ -287,7 +369,7 @@ Paranoid (Lento) - D-pad + Botões Direcionais Analógico esquerdo Analógico direito Botão Home @@ -298,18 +380,32 @@ A criar shaders - Muda o Tema da App + Mudar o tema do aplicativo Padrão Material You - Altera o Modo do Tema + Alterar o tema Igual ao Sistema Claro Escuro + + cubeb + - Usa Fundos Negros + Plano de fundo preto Quando usar tema escuro, aplicar fundos escuros - + + Picture in Picture + Minimizar a janela quando colocada em segundo plano + Pausa + Correr + Mudo + Unmute + + + Licenças + Upscaling de alta qualidade da AMD + diff --git a/src/android/app/src/main/res/values-pt-rPT/strings.xml b/src/android/app/src/main/res/values-pt-rPT/strings.xml index 0a1a47fbb0..6afea9b03b 100644 --- a/src/android/app/src/main/res/values-pt-rPT/strings.xml +++ b/src/android/app/src/main/res/values-pt-rPT/strings.xml @@ -1,5 +1,5 @@ - + Este software corre jogos para a consola Nintendo Switch. Não estão incluídas nem jogos ou chaves. <br /><br />Antes de começares, por favor localiza o ficheiro no armazenamento do teu dispositivo.<br /><br /> Emulação está Ativa @@ -25,6 +25,7 @@ Voltar Adiciona Jogos Seleciona a tua pasta de Jogos + Completo! Jogos @@ -37,7 +38,8 @@ Ignorar a seleção da pasta de jogos? Os jogos não serão exibidos na lista de jogos se uma pasta não estiver selecionada. https://yuzu-emu.org/help/quickstart/#dumping-games - Procurar Jogos + Procurar jogos + Procurar nas definições Pasta de Jogos selecionada Instala prod.keys Necessário para desencriptar jogos comerciais @@ -61,15 +63,18 @@ Ficheiro de chaves inválido Chaves instaladas com sucesso Erro ao ler chaves de encriptação + Verifique se seu arquivo keys possui a extensão .keys e tente novamente. + Verifique se seu arquivo keys possui a extensão .bin e tente novamente. Chaves de encriptação inválidas https://yuzu-emu.org/help/quickstart/#dumping-decryption-keys O ficheiro selecionado está corrompido. Por favor recarrega as tuas chaves. Instala driver para GPU Instala drivers alternativos para desempenho ou precisão potencialmente melhores Configurações avançadas + Definições avançadas: %1$s Configura configurações do emulador - Jogos recentes - Adicionados recentemente + Jogado recentemente + Adicionado recentemente Jogos comerciais Homebrew Abre a pasta Yuzu @@ -86,6 +91,33 @@ O nome da primeira sub pasta tem de ser a ID do jogo. Importar Exportar + Instalar firmware + O firmware deve estar em um arquivo ZIP e é necessário para iniciar alguns jogos. + Instalando firmware + Firmware instalado com sucesso. + Falha na instalação do firmware + Cofirma que os ficheiros firmware nca estão no root do finheiro zip e tenta de novo. + Compartilhe registros de debug. + Compartilhe o arquivo de registro do yuzu para obter ajuda com problemas + Arquivo de registro não encontrado + Instalar conteúdo adicional + Instale atualizações de jogos ou DLC + A instalar conteúdo... + Erro ao instalar ficheiro(s) para NAND + Por favor confitma que o conteúdo(s) é válido e que as prod.keys estão instaladas. + A instalação de jogos base não é permitida para evitar possíveis conflitos. + Sò conteúdos NSP e XCI são suportados. Por favor verifica que o conteúdo(s) do jogo são válidos. + %1$d erro(s) de instalação + Conteúdo(s) de jogo instalados com sucesso + %1$d instalado com sucesso + %1$d substituída com êxito + https://yuzu-emu.org/help/quickstart/#dumping-installed-updates + Drivers personalizados não suportados + Carrea«gamento de drivers personalizados não é suportado pr este dispositivo. \nCheck verifica esta opção de futuro para confirmar se o suporte foi adicionado! + Administrar dados yuzu + Importa/exporta firmware, chaves, dados do usuário e mais! + Partilha ficheiro duardado + Erro ao exportar dados guardados Gaia não é real @@ -94,7 +126,18 @@ Contribuidores Feito com \u2764 da equipa do Yuzu https://github.com/yuzu-emu/yuzu/graphs/contributors + Projetos que tornam o yuzu para Android possível Versão + Dado de utilizados + Importar/exportar todos dados da aplicação data.\n\n Ao importar dados do utilizados, todos os dados existentes do utilizados serão excluídos! + A exportar dados de utilizados... + A importar dados de utilizador... + Importar dados de utilizados... + Backup yuzu inválido + Dados de utilizados exportados com sucesso + Dados de utilizador importado com sucesso + Exportação cancelada + Verifiqua se as pastas de dados do utilizados estão na raiz da pasta zip e contêm um arquivo de configuração em config/config.ini e tenta novamente. https://discord.gg/u77vRWY https://yuzu-emu.org/ https://github.com/yuzu-emu @@ -114,41 +157,53 @@ Estás interessado? - Ativar limite de velocidade - Quando ativada, a velocidade da emulação será limitada à percentagem definida da velocidade normal. + Limite de velocidade + Limita a velocidade da emulação a uma porcentagem específica da velocidade normal. Percentagem do limite de velocidade - Especifica o limite da percentagem da velocidade da emulação. Com a velocidade por defeito a 100% a emulação será limitada à velocidade normal. Valores maiores ou menores aumentarão ou diminuirão o limite de velocidade. + Especifica a porcentagem para limitar a velocidade de emulação. 100% é o normal. Valores mais altos ou mais baixos irão aumentar ou diminuir o limite de velocidade. Precisão do CPU + %1$s%2$s - Modo ancorado - Emula em modo ancorado, que aumenta a resolução ás custas da performance. + Modo Ancorado + Aumenta a resolução, diminuindo o desempenho. O Modo Portátil é utilizado quando estiver desabilitado, diminuindo a resolução e melhorando o desempenho. Região da emulação Idioma da emulação - Seleciona a data RTC - Seleciona a hora RTC - Ativa RTC personalizado - Esta configuração permite definir um RTC personalizado diferente da hora atual do sistema - Define RTC personalizado + Selecione a data do sistema + Selecione a hora do sistema + RTC personalizado + Permite a você configurar um relógio em tempo real separado do relógio do seu dispositivo. + Defina um relógio em tempo real personalizado - API Nível de precisão - Resolução + Resolução (Portátil/Ancorado) Modo VSync - Proporção do ecrã + Oriantação + Proporção da tela Filtro de Adaptação da Janela - Método de Anti-Aliasing + Método de Anti-Serrilhado Força velocidade máxima (Adreno only) Força o GPU a correr à velocidade máxima (restrições térmicas serão aplicadas) Usa shaders assíncronos - Compila shaders assincronamente, que aumentará a fluidez, mas poderá causar falhas. + Compila os shaders de forma assíncrona, reduzindo travamentos, mas pode apresentar problemas. + Usar flushing reativo + Melhora a precisão da renderização em alguns jogos ao custo de desempenho. + Cache de shaders em disco + Reduz travamentos ao armazenar e carregar localmente os shaders. + + + CPU + Depuração da CPU + Coloca a CPU em um modo de depuração lento. + GPU + API Ativar depuração de gráficos Quando selecionado, a API gráfica entra num modo de depuração mais lento. - Usar cache do disk shader - Aumenta a fluidez ao guardar e carregar shaders gerados para o armazenamento. + Fastmem + Motor de saída Volume Especifica o volume de saída. @@ -157,14 +212,24 @@ Configurações guardadas Configurações guardadas para %1$s Erro ao guardar %1$s.ini: %2$s + Menu não implementado A carregar... + A desligar... Queres reverter esta definição para os valores padrão? Reverter para padrão Redefinir todas as configurações? - Todas as configurações avançadas serão redefinidas para as definições padrão. Isto não pode ser revertido. + Todas as configurações avançadas retornarão ao padrão. Isto não pode ser desfeito. Redefinir configurações Fechar - Saber Mais + Saber mais + Automático + Enviar + Nenhum (desativado) + Importar + Exportar + Exportação falhada + IMportação falhada + A cancelar Seleciona a driver para o GPU @@ -172,6 +237,7 @@ Instalar Padrão Usar o driver padrão do GPU + Driver selecionado inválido, a usar o padrão do sistema! Driver do GPU padrão A instalar o Driver... @@ -182,10 +248,11 @@ Gráficos Audio Cor e tema. + Depurar A tua ROM está encriptada - Cartidges de Jogo or Jogos Instalados.]]> + cartucho de jogo or títulos instalados.]]> prod.keys está instalado para que os jogos possam ser desencriptados.]]> Ocorreu um erro ao iniciar o núcleo de vídeo. Isto é normalmente causado por um driver de GPU incompatível. Instalar um driver GPU pode resolver este problema. @@ -193,28 +260,28 @@ O ficheiro da ROM não existe - Sair da emulação + Parar emulação Feito Contador de FPS - Alterar Controlos - Centro do Analógico Relativo - Deslizar do DPad - Hápticos - Mostrar sobreposição - Alterar todos - Ajustar a sobreposição + Alterar controles + Centro Relativo de Analógico + Deslizamento dos Botões Direcionais + Vibração ao tocar + Mostrar overlay + Marcar/Desmarcar tudo + Ajustar overlay Escala Opacidade - Redefinir Sobreposição - Editar sobreposição - Pausa emulação - Retomar emulação - Opções de sobreposição + Restaurar overlay padrão + Editar overlay + Pausar emulação + Despausar emulação + Opções de overlay - Configurações a carregar... + Carregando configurações... - Teclado de Software + Teclado de software Abortar @@ -226,6 +293,9 @@ Erro fatal Ocorreu um erro fatal. Verifica o teu registro para detalhes. \nContinuar a emulação pode causar erros. Desligar esta configuração irá reduzir a performance da emulação significantemente! Para a melhor experiência é recomendado que deixes esta configuração ativada. + RAM do dispositivo: %1$s\nRecommended: %2$s + %1$s %2$s + Nenhum jogo inicializável presente! Japão @@ -236,7 +306,14 @@ Coreia Taiwan - + + Byte + KB + MB + GB + TB + PB + EB Vulcano @@ -274,12 +351,17 @@ FXAA SMAA + + Landscape + Portrait + Automático + Padrão (16:9) Forçar 4:3 Forçar 21:9 Forçar 16:10 - Esticar à Janela + Esticar à janela Preciso @@ -287,9 +369,9 @@ Paranoid (Lento) - D-Pad - Analógico Esquerdo - Analógico Direito + Botões Direcionais + Analógico esquerdo + Analógico direito Home Captura de ecrã @@ -298,18 +380,32 @@ A criar shaders - Muda o Tema da App + Mudar o tema do aplicativo Padrão Material You - Altera o Modo do Tema + Alterar o tema Igual ao Sistema Claro Escuro + + cubeb + - Usa Fundos Escuros + Plano de fundo preto Quando usar tema escuro, aplicar fundos escuros - + + Picture in Picture + Minimizar a janela quando colocada em segundo plano + Pausa + Correr + Mute + Unmute + + + Licenças + Upscaling de alta qualidade da AMD + diff --git a/src/android/app/src/main/res/values-ru/strings.xml b/src/android/app/src/main/res/values-ru/strings.xml index 0bef035d63..c614257a83 100644 --- a/src/android/app/src/main/res/values-ru/strings.xml +++ b/src/android/app/src/main/res/values-ru/strings.xml @@ -1,5 +1,5 @@ - + Это программное обеспечение позволяет запускать игры для игровой консоли Nintendo Switch. Мы не предоставляем сами игры или ключи.<br /><br />Перед началом работы найдите файл prod.keys ]]> в хранилище устройства..<br /><br />Узнать больше]]> Эмуляция активна @@ -7,7 +7,7 @@ yuzu запущен Уведомления и ошибки Показывать уведомления, когда что-то пошло не так - Вы не предоставили разрешение уведомлений! + Вы не предоставили разрешение на уведомления! Добро пожаловать! @@ -25,6 +25,7 @@ Назад Добавить игры Выберите папку с играми + Выполнено! Игры @@ -38,6 +39,7 @@ Игры не будут отображаться в списке Игры, если папка не выбрана. https://yuzu-emu.org/help/quickstart/#dumping-games Найти игры + Настройки поиска Выбрана папка с играми Установить prod.keys Требуется для расшифровки розничных игр @@ -61,14 +63,17 @@ Выбран неверный файл ключей Ключи успешно установлены Ошибка при чтении ключей шифрования + Убедитесь, что файл ключей имеет расширение .keys, и повторите попытку. + Убедитесь, что файл ключей имеет расширение .bin, и повторите попытку. Неверные ключи шифрования https://yuzu-emu.org/help/quickstart/#dumping-decryption-keys Выбранный файл неверен или поврежден. Пожалуйста, пере-дампите ваши ключи. Установить драйвер ГП Установите альтернативные драйверы для потенциально лучшей производительности и/или точности Расширенные настройки + Расширенные настройки: %1$s Настройка параметров эмулятора - Недавно сыграно + Недавно сыгранные Недавно добавлено Розничные Homebrew @@ -86,6 +91,34 @@ Название первой вложенной папки должно быть идентификатором игры. Импорт Экспорт + Установить прошивку + Прошивка должна находиться в ZIP-архиве и необходима для загрузки некоторых игр + Установка прошивки + Прошивка успешно установлена + Не удалось установить прошивку + Убедитесь что файлы прошивки nca находятся в корне zip-архива и повторите попытку. + Поделиться журналом отладки + Поделиться журналом отладки yuzu для устранения проблем + Файл журнала не найден + Установить игровой контент + Установить обновления игры или дополнений + Установка контента... + Ошибка установки файл(ов) в NAND. + Убедитесь что содержимое допустимо и что файл prod.keys установлен. + Установка базовых игр запрещена во избежание возможных конфликтов. + Поддерживается только контент NSP и XCI. Пожалуйста убедитесь что игровой контент действителен. + %1$d ошибка установки + Игровой контент успешно установлен + %1$d Успешно установлено + %1$d Успешно перезаписано + https://yuzu-emu.org/help/quickstart/#dumping-installed-updates + Пользовательские драйверы не поддерживаются + Загрузка пользовательского драйвера в настоящее время не поддерживается для этого устройства.\nПроверьте этот параметр еще раз в будущем чтобы узнать была ли добавлена ​​поддержка! +  + Управление данными yuzu + Импортируйте/экспортируйте прошивку, ключи, пользовательские данные и многое другое! + Поделиться файлом сохранения + Не удалось экспортировать сохранение Gaia не существует @@ -94,7 +127,18 @@ Контрибьюторы Сделано с \u2764 от команды yuzu https://github.com/yuzu-emu/yuzu/graphs/contributors + Проекты, которые сделали yuzu для Android возможным Сборка + Данные пользователя + Импортируйте/экспортируйте все данные приложения.\n\nПри импорте пользовательских данных все существующие пользовательские данные будут удалены! + Экспорт пользовательских данных… + Импорт пользовательских данных… + Импортировать пользовательские данные + Неверная резервная копия yuzu + Пользовательские данные успешно экспортированы + Пользовательские данные успешно импортированы + Экспорт отменен + Убедитесь что папки пользовательских данных находятся в корне zip-папки и содержат файл конфигурации config/config.ini и повторите попытку. https://discord.gg/u77vRWY https://yuzu-emu.org/ https://github.com/yuzu-emu @@ -114,41 +158,51 @@ Вы заинтересованы? - Включить ограничение скорости - Если эта функция включена, скорость эмуляции будет ограничена указанным процентом от нормальной скорости. + Ограничить скорость + Ограничивает скорость эмуляции указанным процентом от нормальной скорости. Ограничение процента cкорости - Указывает процент для ограничения скорости эмуляции. При значении по умолчанию 100% эмуляция будет ограничена нормальной скоростью. Значения выше или ниже будут увеличивать или уменьшать ограничение скорости. + Указывает процент ограничения скорости эмуляции. 100% - это нормальная скорость. Значения больше или меньше увеличивают или уменьшают ограничение скорости. Точность ЦП + %1$s%2$s Режим док-станции - Эмуляция режима док-станции, что увеличивает разрешение за счет снижения производительности. - Эмулируемый регион - Эмулируемый язык + Увеличивает разрешение, снижая производительность. Портативный режим используется при отключении, снижая разрешение и повышая производительность. + Регион консоли + Язык консоли Выберите дату RTC Выберите время RTC - Включить пользовательский RTC - Этот параметр позволяет установить пользовательские часы реального времени отдельно от текущего системного времени + Пользовательский RTC + Позволяет установить пользовательские часы реального времени отдельно от текущего системного времени. Установить пользовательский RTC - API Уровень точности - Разрешение + Разрешение (портативное/в док-станции) Режим верт. синхронизации + Ориентация Соотношение сторон Фильтр адаптации окна Метод сглаживания Принудительно заставить максимальную тактовую частоту (только для Adreno) Заставляет ГП работать на максимально возможных тактовых частотах (тепловые ограничения все равно будут применяться). Использовать асинхронные шейдеры - Компилирует шейдеры асинхронно, что уменьшает зависания, но может взамен предоставить визуальные баги. - Включить отладку графики - Если включено, графический API переходит в более медленный режим отладки - Использовать кэш шейдеров на диске - Уменьшение зависаний за счет хранения и загрузки сгенерированных шейдеров на хранилище. + Компиляция шейдеров происходит асинхронно, что уменьшает зависания, но может привести к появлению багов. + Реактивная очистка + Повышение точности рендеринга в некоторых играх за счет снижения производительности. + Кэш шейдеров на диске + Уменьшение зависаний за счет хранения и загрузки сгенерированных шейдеров. + + + ЦП + Отладка ЦП + Переводит ЦП в режим медленной отладки. + графический процессор + API + Отладка графики + Переводит графический API в режим медленной отладки. + Fastmem - Громкость Задает громкость аудиовыхода. @@ -157,7 +211,9 @@ Сохраненные настройки Настройки сохранены для %1$s Ошибка сохранения %1$s.ini: %2$s + Нереализованное меню Загрузка... + Выключение… Хотите ли вы вернуть этот параметр к значению по умолчанию? Сброс к настройкам по умолчанию Сбросить все настройки? @@ -165,6 +221,14 @@ Настройки сброшены Закрыть Узнать больше + Авто + Отправить + Null + Импорт + Экспорт + Ошибка экспорта + Ошибка импортирования + Отменяю Выбрать драйвер ГП @@ -172,6 +236,7 @@ Установить По умолчанию Используется стандартный драйвер ГП + Выбран неверный драйвер, используется стандартный системный! Системный драйвер ГП Установка драйвера... @@ -182,10 +247,11 @@ Графика Аудио Тема и цвет + Отладка Ваш ROM зашифрованный - игровые картриджи или установленные игры.]]> + или установленные игры.]]> prod.keys установлен, чтобы игры можно было расшифровать.]]> Произошла ошибка при инициализации видеоядра. Обычно это вызвано несовместимым драйвером ГП. Установка пользовательского драйвера ГП может решить эту проблему. @@ -199,17 +265,17 @@ Переключение управления Относительный центр стика Слайд крестовиной - Тактильная обратная связь + Обратная связь от нажатий Показать оверлей Переключить всё - Настроить оверлей + Регулировка оверлея Масштаб Непрозрачность Сбросить оверлей - Изменить оверлей + Редактировать оверлей Пауза эмуляции - Возобновление эмуляции - Настройки оверлея + Возобновить эмуляцию + Настройка оверлея Загрузка настроек... @@ -226,6 +292,9 @@ Фатальная ошибка Произошла фатальная ошибка. Проверьте журнал для получения подробной информации.\nПродолжение эмуляции может привести к сбоям и ошибкам. Отключение этой настройки значительно снизит производительность эмуляции! Для достижения наилучших результатов рекомендуется оставить эту настройку включенной. + Оперативная память устройства: %1$s\nРекомендовано: %2$s + %1$s%2$s + Загрузочной игры нету! Япония @@ -236,7 +305,14 @@ Корея Тайвань - + + Байт + КБ + МБ + GB + ТБ + ПБ + ЕВ Vulkan @@ -274,6 +350,11 @@ FXAA SMAA + + Пейзаж + Портрет + Авто + Стандартное (16:9) Заставить 4:3 @@ -288,8 +369,8 @@ Крестовина - Левый мини-джойстик - Правый мини-джойстик + Левый стик + Правый стик Home Скриншот @@ -298,18 +379,32 @@ Постройка шейдеров - Изменить тему приложения + Сменить тему По умолчанию Material You - Изменить режим темы + Сменить режим темы Системная Светлая Темная + + cubeb + - Использовать черный фон + Чёрный фон При использовании темной темы применяйте черный фон. - + + Картинка в картинке + Свернуть окно при размещении в фоновом режиме + Пауза + Играть + Выключить звук + Включить звук + + + Лицензии + Высококачественное масштабирование от AMD + diff --git a/src/android/app/src/main/res/values-uk/strings.xml b/src/android/app/src/main/res/values-uk/strings.xml index 5b789ee986..34809dbb80 100644 --- a/src/android/app/src/main/res/values-uk/strings.xml +++ b/src/android/app/src/main/res/values-uk/strings.xml @@ -1,5 +1,5 @@ - + Це програмне забезпечення дозволяє запускати ігри для ігрової консолі Nintendo Switch. Ми не надаємо самі ігри або ключі.<br /><br />Перед початком роботи знайдіть ваш файл prod.keys ]]> у сховищі пристрою.<br /><br />Дізнатися більше]]> Емуляція активна @@ -25,7 +25,6 @@ Назад Додати ігри Виберіть папку з іграми - Ігри Пошук @@ -61,6 +60,7 @@ Вибрано неправильний файл ключів Ключі успішно встановлено Помилка під час зчитування ключів шифрування + Переконайтеся, що файл ключів має розширення .keys, і повторіть спробу. Невірні ключі шифрування https://yuzu-emu.org/help/quickstart/#dumping-decryption-keys Обраний файл невірний або пошкоджений. Будь ласка, пере-дампіть ваші ключі. @@ -68,8 +68,6 @@ Встановіть альтернативні драйвери для потенційно кращої продуктивності та/або точності Розширені налаштування Налаштування параметрів емулятора - Нещодавно зіграно - Нещодавно додано Роздрібні Homebrew Відкрити папку yuzu @@ -86,7 +84,6 @@ Назва першої вкладеної папки має бути ідентифікатором гри. Імпорт Експорт - Gaia не існує Скопійовано в буфер обміну @@ -113,42 +110,20 @@ Наша нескінченна вдячність Ви зацікавлені? - - Увімкнути обмеження швидкості - Якщо цю функцію ввімкнено, швидкість емуляції буде обмежена зазначеним відсотком від нормальної швидкості. Обмеження відсотка швидкості - Вказує відсоток для обмеження швидкості емуляції. При значенні за замовчуванням 100% емуляція буде обмежена нормальною швидкістю. Значення вище або нижче збільшуватимуть або зменшуватимуть обмеження швидкості. Точність ЦП - - - Режим док-станції - Емуляція режиму док-станції, що збільшує роздільну здатність за рахунок зниження продуктивності. Емульований регіон Емульована мова - Оберіть дату RTC - Оберіть час RTC - Увімкнути користувацький RTC - Цей параметр дає змогу встановити користувацький годинник реального часу окремо від поточного системного часу - Встановити користувацький RTC - + Користувацький RTC - API Рівень точності - Роздільна здатність Режим верт. синхронізації - Співвідношення сторін - Фільтр адаптації вікна - Метод згладжування Примусово змусити максимальну тактову частоту (тільки для Adreno) Змушує ГП працювати на максимально можливих тактових частотах (теплові обмеження все одно будуть застосовуватися). Використовувати асинхронні шейдери - Компілює шейдери асинхронно, що зменшує зависання, але може натомість надати візуальні баги. - Увімкнути налагодження графіки - Якщо увімкнено, графічний API переходить у повільніший режим налагодження - Використовувати кеш шейдерів на диску - Зменшення зависань завдяки зберіганню та завантаженню згенерованих шейдерів на сховище. - - + + ЦП + API Гучність Вказує гучність аудіовиходу. @@ -161,17 +136,20 @@ Чи хочете ви повернути цей параметр до значення за замовчуванням? Скидання до налаштувань за замовчуванням Скинути всі налаштування - Усі додаткові налаштування буде скинуто до налаштування за замовчуванням. Це неможливо скасувати. Налаштування скинуто Закрити Дізнатися більше - + Авто + Null + Імпорт + Експорт Вибрати драйвер ГП Хочете замінити поточний драйвер ГП? Встановити За замовчуванням Використовується стандартний драйвер ГП + Обрано неправильний драйвер, використовується стандартний системний! Системний драйвер ГП Встановлення драйвера... @@ -182,40 +160,19 @@ Графіка Аудіо Тема і колір + Налагодження Ваш ROM зашифрований - ігрові картриджі або встановлені ігри.]]> prod.keys встановлено, щоб ігри можна було розшифрувати.]]> Сталася помилка під час ініціалізації відеоядра. Зазвичай це спричинено несумісним драйвером ГП. Встановлення користувацького драйвера ГП може вирішити цю проблему. Не вдалося запустити ROM Файл ROM не існує - - Вихід з емуляції Готово - Лічильник FPS - Перемикання керування - Відносний центр стіка - Слайд хрестовиною - Тактильний зворотний зв\'язок - Показати оверлей - Перемкнути все - Налаштувати оверлей Масштаб Непрозорість - Скинути оверлей - Змінити оверлей - Пауза емуляції - Відновлення емуляції - Налаштування оверлея - - Завантаження налаштувань... - - - Віртуальна клавіатура - Перервати Продовжити @@ -226,7 +183,6 @@ Фатальна помилка Сталася фатальна помилка. Перевірте журнал для отримання докладної інформації.\nПродовження емуляції може призвести до збоїв і помилок. Вимкнення цього налаштування значно знизить продуктивність емуляції! Для досягнення найкращих результатів рекомендується залишити це налаштування увімкненим. - Японія США @@ -236,8 +192,7 @@ Корея Тайвань - - + GB Vulkan Вимкнено @@ -274,22 +229,18 @@ FXAA SMAA + Авто + За замовчуванням (16:9) Змусити 4:3 Змусити 21:9 Змусити 16:10 - Розтягнути до вікна - Точно Небезпечно Параноїк (повільно) - - Кнопки напрямків - Лівий міні-джойстик - Правий міні-джойстик Home Знімок екрану @@ -297,19 +248,16 @@ Підготовка шейдерів Побудова шейдерів - - Змінити тему застосунку За замовчуванням Material You - - Змінити режим теми Системна Світла Темна - - Використовувати чорне тло У разі використання темної теми застосовуйте чорне тло. - + Вимкнути звук + Увімкнути звук + + diff --git a/src/android/app/src/main/res/values-vi/strings.xml b/src/android/app/src/main/res/values-vi/strings.xml new file mode 100644 index 0000000000..f977db3a2f --- /dev/null +++ b/src/android/app/src/main/res/values-vi/strings.xml @@ -0,0 +1,340 @@ + + + + Phần mềm này sẽ chạy các game cho máy chơi game Nintendo Switch. Không có title games hoặc keys được bao gồm.<br /><br />Trước khi bạn bắt đầu, hãy tìm tập tin prod.keys ]]> trên bộ nhớ thiết bị của bạn.<br /><br />Tìm hiểu thêm]]> + Giả lập đang chạy + Hiển thị thông báo liên tục khi giả lập đang chạy. + yuzu đang chạy + Thông báo và lỗi + Hiển thị thông báo khi có sự cố xảy ra. + Ứng dụng không được cấp quyền thông báo! + + + Chào mừng! + Tìm hiểu cách cài đặt <b>yuzu</b> và bắt đầu giả lập. + Bắt đầu + Keys + Chọn tệp <b>prod.keys</b> của bạn bằng nút bên dưới. + Chọn Keys + Game + Chọn thư mục <b>Game</b> của bạn bằng nút bên dưới. + Hoàn thành + Tất cả đã hoàn tất.\nHãy tận hưởng các game của bạn! + Tiếp tục + Tiếp theo + Trở lại + Thêm Game + Chọn thư mục game của bạn + + Game + Tìm kiếm + Cài đặt + Không tìm thấy tập tin hoặc chưa có thư mục game nào được chọn. + Tìm và lọc game + Chọn thư mục game + Cho phép yuzu thêm vào danh sách game + Bỏ qua việc lựa chọn thư mục game? + Game sẽ không hiển thị trong danh sách nếu một thư mục không được chọn. + https://yuzu-emu.org/help/quickstart/#dumping-games + Tìm kiếm game + Thư mục game đã được chọn + Cài đặt prod.keys + Yêu cầu để giải mã các game bán lẻ + Bỏ qua việc thêm keys? + Cần có keys hợp lệ để giả lập các game bán lẻ. Chỉ có các ứng dụng homebrew có thể vận hành nếu bạn tiếp tục. + https://yuzu-emu.org/help/quickstart/#guide-introduction + Thông báo + Cấp quyền thông báo bằng nút bên dưới. + Cấp quyền + Bỏ qua việc cấp quyền thông báo? + yuzu sẽ không thể gửi những thông báo quan trọng đến bạn. + Đã từ chối cấp quyền + Bạn từ chối cấp quyền này quá nhiều lần và giờ bạn phải cấp quyền thủ công trong cài đặt máy. + Thông tin + Phiên bản, đóng góp và những thứ khác + Trợ giúp + Bỏ qua + Hủy bỏ + Cài đặt keys Amiibo + Cần thiết để dùng Amiibo trong game + Tệp keys không hợp lệ đã được chọn + Cài đặt keys thành công + Lỗi đọc keys mã hóa + Xác minh rằng tệp keys của bạn có đuôi .keys và thử lại. + Xác minh rằng tệp keys của bạn có đuôi .bin và thử lại. + Keys mã hoá không hợp lệ + https://yuzu-emu.org/help/quickstart/#dumping-decryption-keys + Tệp đã chọn sai hoặc hỏng. Vui lòng trích xuất lại keys của bạn. + Cài đặt driver GPU + Cài đặt driver thay thế để có thể có hiệu suất tốt và chính xác hơn + Cài đặt nâng cao + Cấu hình cài đặt giả lập + Đã chơi gần đây + Đã thêm gần đây + Bán lẻ + Homebrew + Mở thư mục yuzu + Quản lý tệp nội bộ của yuzu + Thay đổi giao diện ứng dụng + Không tìm thấy trình quản lý tập tin + Không thể mở thư mục yuzu + Vui lòng xác định thư mục người dùng với bảng điều khiển bên của trình quản lý tệp thủ công. + Quản lý dữ liệu save + Đã tìm thấy dữ liệu save. Vui lòng chọn một tuỳ chọn bên dưới. + Nhập hoặc xuất tệp save + Nhập thành công + Cấu trúc thư mục save không hợp lệ + Tên thư mục con đầu tiên phải là ID title của game. + Nhập + Xuất + Cài đặt firmware + Firmware phải được đặt trong một tập tin nén ZIP và cần thiết để khởi chạy một số game + Đang cài đặt firmware + Cài đặt firmware thành công + Cài đặt firmware thất bại + Chia sẻ nhật ký gỡ lỗi + Chia sẻ tập tin nhật ký của yuzu để gỡ lỗi vấn đề + Không tìm thấy tập tin nhật ký + Cài đặt nội dung game + Cài đặt cập nhật game hoặc DLC + https://yuzu-emu.org/help/quickstart/#dumping-installed-updates + + Gaia không có thật + Đã sao chép vào bộ nhớ tạm + Một giả lập Switch mã nguồn mở + Người đóng góp + Được làm với \u2764 từ nhóm yuzu + https://github.com/yuzu-emu/yuzu/graphs/contributors + Các dự án làm cho yuzu trên Android trở thành điều có thể + Dựng + https://discord.gg/u77vRWY + https://yuzu-emu.org/ + https://github.com/yuzu-emu + + + Early Access + Tải Early Access + https://play.google.com/store/apps/details?id=org.yuzu.yuzu_emu.ea + Các tính năng tiên tiến, truy cập sớm các bản cập nhật và nhiều hơn nữa + Lợi ích của Early Access + Tính năng tiên tiến + Truy cập sớm các bản cập nhật + Không có cài đặt thủ công + Ưu tiên hỗ trợ + Hỗ trợ bảo tồn game + Sự biết ơn vô hạn của chúng tôi + Bạn có thấy hứng thú không? + + + Giới hạn tốc độ + Giới hạn tốc độ giả lập ở một phần trăm cụ thể của tốc độ bình thường. + Giới hạn phần trăm tốc độ + Xác định phần trăm để giới hạn tốc độ giả lập. 100% là tốc độ bình thường. Giá trị cao hơn hoặc thấp hơn sẽ tăng hoặc giảm giới hạn tốc độ. + Độ chính xác CPU + + Chế độ docked + Tăng độ phân giải, giảm hiệu suất. Chế độ handheld được sử dụng khi tắt, giảm độ phân giải và tăng hiệu suất. + Khu vực giả lập + Ngôn ngữ giả lập + Chọn ngày RTC + Chọn giờ RTC + RTC tuỳ chỉnh + Cho phép bạn thiết lập một đồng hồ thời gian thực tùy chỉnh riêng biệt so với thời gian hệ thống hiện tại. + Thiết lập RTC tùy chỉnh + + + Mức độ chính xác + Độ phân giải (Handheld/Docked) + Chế độ VSync + Tỉ lệ khung hình + Bộ lọc điều chỉnh cửa sổ + Phương pháp khử răng cưa + Buộc chạy ở xung nhịp tối đa (chỉ cho Adreno) + Buộc GPU hoạt động ở xung nhịp tối đa có thể (ràng buộc nhiệt độ vẫn sẽ được áp dụng). + Dùng các shader bất đồng bộ + Biên dịch các shader bất đồng bộ, giảm tình trạng giật lag nhưng có thể gây ra các lỗi. + Dùng xả tương ứng + Cải thiện độ chính xác kết xuất trong một số game nhưng đồng thời giảm hiệu suất. + Lưu bộ nhớ đệm shader trên ổ cứng + Giảm tình trạng giật lag bằng cách lưu trữ và tải các shader được tạo ra nội bộ. + + + CPU + API + Gỡ lỗi đồ hoạ + Đặt API đồ họa vào chế độ gỡ lỗi chậm. + Âm lượng + Xác định âm lượng của đầu ra âm thanh. + + + Mặc định + Cài đặt đã lưu + Cài đặt đã lưu cho %1$s + Lỗi khi lưu %1$s.ini: %2$s + Đang tải... + Bạn có muốn đặt lại cài đặt này về giá trị mặc định không? + Đặt lại về mặc định + Bạn có muốn đặt lại tất cả các cài đặt về giá trị mặc định không? + Tất cả các cài đặt nâng cao sẽ được đặt lại về cấu hình mặc định. Điều này không thể hoàn tác. + Cài đặt đã được đặt lại + Đóng + Tìm hiểu thêm + Tự động + Gửi + Null + Nhập + Xuất + + Chọn driver GPU + Bạn có muốn thay thế driver GPU hiện tại không? + Cài đặt + Mặc định + Dùng driver GPU mặc định + Driver không hợp lệ đã được chọn, dùng mặc định hệ thống! + Driver GPU hệ thống + Đang cài đặt driver... + + + Cài đặt + Chung + Hệ thống + Đồ hoạ + Âm thanh + Chủ đề và màu sắc + Gỡ lỗi + + + ROM của bạn đã bị mã hoá + prod.keys đã được cài đặt để các game có thể được giải mã.]]> + Đã xảy ra lỗi khi khởi tạo lõi video + Việc này thường do driver GPU không tương thích. Cài đặt một driver GPU tùy chỉnh có thể giải quyết vấn đề này. + Không thể nạp ROM + Tệp ROM không tồn tại + + + Thoát giả lập + Hoàn thành + Bộ đếm FPS + Chuyển đổi điều khiển + Trung tâm nút cần xoay tương đối + Trượt D-pad + Chạm haptics + Hiện lớp phủ + Chuyển đổi tất cả + Điều chỉnh lớp phủ + Tỉ lệ thu phóng + Độ mờ + Đặt lại lớp phủ + Chỉnh sửa lớp phủ + Tạm đừng giả lập + Tiếp tục giả lập + Tuỳ chọn lớp phủ + + Đang tải cài đặt... + + + Bàn phím mềm + + + Hủy bỏ + Tiếp tục + Không tìm thấy bản lưu trữ của hệ thống + %s bị thiếu. Vui lòng trích xuất các bản lưu trữ hệ thống của bạn.\nNếu chạy tiếp giả lập có thể bị crash và lỗi. + Một bản lưu trữ của hệ thống + Lỗi Lưu/Tải + Lỗi nghiêm trọng + Đã xảy ra lỗi nghiêm trọng. Kiểm tra nhật ký để biết thêm chi tiết.\nNếu chạy tiếp giả lập có thể bị crash và lỗi. + Tắt cài đặt này sẽ làm giảm đáng kể hiệu suất giả lập! Để có trải nghiệm tốt nhất, bạn nên bật cài đặt này. + + Nhật Bản + Hoa Kỳ + Châu Âu + Úc + Trung Quốc + Hàn Quốc + Đài Loan + + GB + + Vulkan + Không có + + + Bình thường + Cao + Cực đại (Chậm) + + + 0.5X (360p/540p) + 0.75X (540p/810p) + 1X (720p/1080p) + 2X (1440p/2160p) (Chậm) + 3X (2160p/3240p) (Chậm) + 4X (2880p/4320p) (Chậm) + + + Immediate (Tắt) + Mailbox + FIFO (Bật) + FIFO Relaxed + + + Nearest Neighbor + Bilinear + Bicubic + Gaussian + ScaleForce + AMD FidelityFX™ Super Resolution + + + Không có + FXAA + SMAA + + Tự động + + + Mặc định (16:9) + Dùng 4:3 + Dùng 21:9 + Dùng 16:10 + Mở rộng đến cửa sổ + + + Chính xác + Không an toàn + Paranoid (Chậm) + + + D-pad + Cần trái + Cần phải + Home + Ảnh chụp màn hình + + + Đang chuẩn bị shader + Đang đựng shader + + + Thay đổi chủ đề ứng dụng + Mặc định + Material You + + + Thay đổi chủ đề + Theo hệ thống + Sáng + Tối + + + Nền đen + Khi sử dụng chủ đề tối, hãy áp dụng nền đen. + + Tắt tiếng + Bật tiếng + + + Giấy phép + Upscaling chất lượng cao từ AMD + diff --git a/src/android/app/src/main/res/values-zh-rCN/strings.xml b/src/android/app/src/main/res/values-zh-rCN/strings.xml index c0e8857510..13455564f9 100644 --- a/src/android/app/src/main/res/values-zh-rCN/strings.xml +++ b/src/android/app/src/main/res/values-zh-rCN/strings.xml @@ -1,5 +1,5 @@ - + 此软件可以运行 Nintendo Switch 游戏,但不包含任何游戏和密钥文件。<br /><br />在开始前,请找到放置于设备存储中的 prod.keys ]]> 文件。<br /><br />了解更多]]> 正在进行模拟 @@ -17,7 +17,7 @@ 使用下方的按钮来选择你的 <b>prod.keys</b> 文件。 选择密钥文件 游戏 - 使用下方的按钮选择你的 <b>游戏</b> 文件夹。 + 使用下方的按钮选择你的<b>游戏</b>文件夹。 完成 你完成了全部设置。\n玩的开心! 继续 @@ -25,6 +25,7 @@ 上一步 添加游戏 选择你的游戏文件夹 + 完成! 游戏 @@ -38,6 +39,7 @@ 如果未选择游戏文件夹,游戏将不会显示在游戏列表中。 https://yuzu-emu.org/help/quickstart/#dumping-games 搜索游戏 + 搜索设置 已选择游戏文件夹 安装 prod.keys 文件 需要密钥文件来解密游戏 @@ -61,12 +63,15 @@ 选择的密钥文件无效 密钥文件已成功安装 读取加密密钥时出错 + 请确保您的密钥文件扩展名为 .keys 并重试。 + 请确保您的密钥文件扩展名为 .bin 并重试。 无效的加密密钥 https://yuzu-emu.org/help/quickstart/#dumping-decryption-keys 选择的密钥文件不正确或已损坏。请重新转储密钥文件。 安装 GPU 驱动 安装替代的驱动程序以获得更好的性能和精度 高级选项 + 高级选项: %1$s 更改模拟器设置 最近游玩 最近添加 @@ -86,6 +91,33 @@ 第一个子文件夹名称必须为当前游戏的 ID。 导入 导出 + 安装固件 + 固件文件必须为 zip 格式,启动某些游戏时必需 + 正在安装固件 + 固件已成功安装 + 固件安装失败 + 请确保固件 nca 文件位于 zip 压缩包的根目录,然后重试。 + 分享调试日志 + 分享 yuzu 日志文件以便调试 + 未找到日志文件 + 安装游戏附加内容 + 安装游戏更新及 DLC + 安装中... + 向 NAND 安装文件时失败 + 请确保附加内容的有效性,并且 prod.keys 密钥文件已安装。 + 为避免产生冲突,此功能不能用于安装游戏本体。 + 只有 NSP 或 XCI 格式的附加内容可以安装。请确保您的游戏附加内容是有效的。 + %1$d 安装出错 + 游戏附加内容已成功安装 + %1$d 安装成功 + %1$d 覆盖安装成功 + https://yuzu-emu.org/help/quickstart/#dumping-installed-updates + 不支持自定义驱动 + 此设备不支持自定义驱动。\n请之后再访问此项,查看是否已为此设备添加支持。 + 管理 yuzu 数据 + 导入/导出固件、密钥、用户数据及其他。 + 分享存档文件 + 导出存档文件失败 Gaia 不真实 @@ -94,14 +126,25 @@ 贡献者 使用来自 yuzu 团队的 \u2764 制作 https://github.com/yuzu-emu/yuzu/graphs/contributors + Android 版 yuzu 离不开这些项目的支持 构建版本 + 用户数据 + 导入/导出应用程序所有数据。\n\n导入用户数据时,将删除当前所有的用户数据! + 正在导出用户数据... + 正在导入用户数据... + 导入用户数据 + 无效的 yuzu 备份 + 导出用户数据成功 + 导入用户数据成功 + 已取消导出数据 + 请确保用户数据文件夹位于 zip 压缩包的根目录,并在 config/config.ini 路径中包含配置文件,然后重试。 https://discord.gg/u77vRWY https://yuzu-emu.org/ https://github.com/yuzu-emu 抢先体验 - 取得抢先体验 + 获取抢先体验! https://play.google.com/store/apps/details?id=org.yuzu.yuzu_emu.ea 最新的功能、抢先更新、以及更多 抢先体验的权益 @@ -109,33 +152,34 @@ 抢先更新 无需手动安装 优先支持 - 帮助保留游戏 + 帮助保留游玩历史 我们真诚的感激 您对此感兴趣吗? - 启用运行速度限制 - 启用后,模拟速度将限制在正常运行速度的指定百分比。 + 运行速度限制 + 将运行速度限制为正常速度的指定百分比。 限制速度百分比 - 指定限制模拟速度的百分比。预设为 100%,此时模拟速度将被限制为标准速度。更高或更低的值将增加或降低速度限制上限。 + 指定限制运行速度的百分比。100% 为正常速度。更高或更低的值将增加或降低速度限制上限。 CPU 精度 + %1$s%2$s 主机模式 - 以主机模式进行模拟,牺牲性能并提高画面分辨率。 + 提高分辨率,但降低性能。禁用此项时使用掌机模式,降低分辨率并提高性能。 模拟区域 模拟语言 选择日期 选择时间 - 启用自定义系统时钟 - 此选项允许您设置与目前系统时间相独立的自定义系统时钟 - 设置自定义系统时钟 + 自定义系统时间 + 此选项允许您设置与目前系统时间相独立的自定义系统时钟。 + 设置自定义系统时间 - API 精度等级 - 分辨率 + 分辨率 (掌机模式/主机模式) 垂直同步模式 + 屏幕方向 屏幕纵横比 窗口滤镜 抗锯齿方式 @@ -143,12 +187,23 @@ 强制 GPU 以最大时钟运行 (仍被温控限制)。 使用异步着色器 异步编译着色器,减少卡顿,但可能引入故障。 - 启用图形调试 - 启用时,图形 API 将进入较慢的调试模式。 - 使用磁盘着色器缓存 - 将生成的着色器缓存于磁盘中并进行读取以减少卡顿。 + 启用反应性刷新 + 牺牲性能,提高某些游戏的渲染精度。 + 磁盘着色器缓存 + 将生成的着色器缓存于磁盘中并进行读取,以减少卡顿。 + + + CPU + CPU 调试 + 将 CPU 设置为较慢的调试模式。 + GPU + API + 图形调试 + 将图形 API 设置为较慢的调试模式。 + Fastmem + 输出引擎 音量 指定输出的音量。 @@ -157,7 +212,9 @@ 已保存设置 已保存 %1$s 的设置 保存 %1$s.ini 时出错: %2$s + 未生效菜单 加载中… + 正在关闭… 您要将此设定重设为默认值吗? 恢复默认 重置所有设置项? @@ -165,6 +222,14 @@ 重设设置项 关闭 了解更多 + 自动 + 提交 + + 导入 + 导出 + 导出失败 + 导入失败 + 取消中 选择 GPU 驱动程序 @@ -172,6 +237,7 @@ 安装 系统默认 使用默认 GPU 驱动程序 + 选择的驱动程序无效,将使用系统默认的驱动程序! 系统 GPU 驱动程序 正在安装驱动程序… @@ -182,10 +248,11 @@ 图形 声音 主题和色彩 + 调试 您的 ROM 已加密 - 游戏卡带或已安装的游戏。]]> + 游戏卡带或已安装的游戏。]]> prod.keys 文件已安装,使得游戏可以被解密。]]> 初始化视频核心时发生错误 这通常由不兼容的 GPU 驱动程序造成,安装自定义 GPU 驱动程序可能解决此问题。 @@ -226,6 +293,9 @@ 致命错误 发生致命错误,请查阅日志获取详细信息。\n继续模拟可能会造成崩溃和错误。 关闭此项会显著降低模拟性能!建议您将此项保持为启用状态。 + 设备 RAM: %1$s\n推荐 RAM: %2$s + %1$s%2$s + 当前没有可启动的游戏! 日本 @@ -236,7 +306,14 @@ 韩国 中国台湾 - + + Byte + KB + MB + GB + TB + PB + EB Vulkan @@ -274,6 +351,11 @@ 快速近似抗锯齿 子像素形态学抗锯齿 + + 横向大屏 + 纵向屏幕 + 自动 + 默认 (16:9) 强制 4:3 @@ -303,13 +385,27 @@ Material You - 主题模式 + 更改主题模式 跟随系统 浅色 深色 + + cubeb + 使用黑色背景 使用深色主题时,套用黑色背景。 - + + 画中画 + 模拟器位于后台时最小化窗口 + 暂停 + 开始 + 静音 + 取消静音 + + + 许可证 + 来自 AMD 的高品质画质升级 + diff --git a/src/android/app/src/main/res/values-zh-rTW/strings.xml b/src/android/app/src/main/res/values-zh-rTW/strings.xml index 4a21bf8933..b8f468c686 100644 --- a/src/android/app/src/main/res/values-zh-rTW/strings.xml +++ b/src/android/app/src/main/res/values-zh-rTW/strings.xml @@ -1,5 +1,5 @@ - + 此軟體可以執行 Nintendo Switch 主機遊戲,但不包含任何遊戲和金鑰。<br /><br />在您開始前,請找到放置於您的裝置儲存空間的 prod.keys ]]> 檔案。<br /><br />深入瞭解]]> 模擬進行中 @@ -25,6 +25,7 @@ 上一步 新增遊戲 選取您的遊戲資料夾 + 完成! 遊戲 @@ -33,11 +34,12 @@ 找不到檔案,或者尚未選取遊戲目錄。 搜尋並篩選遊戲 選取遊戲資料夾 - 一律允許 yuzu 填入遊戲清單 + 允許 yuzu 填入遊戲清單 跳過選取遊戲資料夾? 如果資料夾未選取,遊戲將不會顯示在遊戲清單。 https://yuzu-emu.org/help/quickstart/#dumping-games 搜尋遊戲 + 搜索设置 遊戲目錄已選取 安裝 prod.keys 需要解密零售遊戲 @@ -60,13 +62,16 @@ 需要在遊戲中使用 Amiibo 無效的金鑰檔案已選取 金鑰已成功安裝 - 讀取加密金鑰時出現錯誤 + 讀取加密金鑰時發生錯誤 + 驗證您的金鑰檔案是否具有 .keys 副檔名並再試一次。 + 驗證您的金鑰檔案是否具有 .bin 副檔名並再試一次。 無效的加密金鑰 https://yuzu-emu.org/help/quickstart/#dumping-decryption-keys 選取的檔案不正確或已損毀,請重新傾印您的金鑰。 安裝 GPU 驅動程式 安裝替代驅動程式以取得潛在的更佳效能或準確度 進階設定 + 高级选项: %1$s 進行模擬器設定 最近遊玩 最近新增 @@ -86,6 +91,33 @@ 首個子資料夾名稱必須為遊戲標題 ID。 匯入 匯出 + 安裝韌體 + 韌體必須為 ZIP 封存檔,將會用於部分遊戲的啟動 + 正在安裝韌體 + 韌體已成功安裝 + 韌體安裝失敗 + 请确保固件 nca 文件位于 zip 压缩包的根目录,然后重试。 + 分享偵錯記錄 + 分享 yuzu 的記錄檔以便對相關問題進行偵錯 + 找不到記錄檔 + 安裝遊戲內容 + 安裝遊戲更新或 DLC + 安装中... + 向 NAND 安装文件时失败 + 请确保附加内容的有效性,并且 prod.keys 密钥文件已安装。 + 为避免产生冲突,此功能不能用于安装游戏本体。 + 只有 NSP 或 XCI 格式的附加内容可以安装。请确保您的游戏附加内容是有效的。 + %1$d 安装出错 + 游戏附加内容已成功安装 + %1$d 安装成功 + %1$d 覆盖安装成功 + https://yuzu-emu.org/help/quickstart/#dumping-installed-updates + 不支持自定义驱动 + 此设备不支持自定义驱动。\n请之后再访问此项,查看是否已为此设备添加支持。 + 管理 yuzu 数据 + 导入/导出固件、密钥、用户数据及其他。 + 分享存档文件 + 导出存档文件失败 Gaia 不真實 @@ -94,7 +126,18 @@ 參與者 使用來自 yuzu 團隊的 \u2764 製作 https://github.com/yuzu-emu/yuzu/graphs/contributors + 這些專案使 yuzu Android 版成為可能 組建 + 用户数据 + 导入/导出应用程序所有数据。\n\n导入用户数据时,将删除当前所有的用户数据! + 正在导出用户数据... + 正在导入用户数据... + 导入用户数据 + 无效的 yuzu 备份 + 导出用户数据成功 + 导入用户数据成功 + 已取消导出数据 + 请确保用户数据文件夹位于 zip 压缩包的根目录,并在 config/config.ini 路径中包含配置文件,然后重试。 https://discord.gg/u77vRWY https://yuzu-emu.org/ https://github.com/yuzu-emu @@ -114,28 +157,29 @@ 您仍感興趣嗎? - 啟用限制速度 - 若啟用,模擬速度將會限制在標準速度的指定百分比。 + 限制速度 + 將模擬速度限制在標準速度的指定百分比。 限制速度百分比 - 指定限制模擬速度的百分比。預設為 100%,模擬速度將被限制為標準速度。更高或更低的值將會增加或減少速度限制。 + 指定限制模擬速度的百分比。100% 為標準速度,更高或更低的值將會增加或減少速度限制。 CPU 準確度 + %1$s%2$s 底座模式 - 以底座模式模擬,以犧牲效能的代價提高解析度。 + 提高解析度,降低效能。停用後將會使用手提模式,會降低解析度並提高效能。 模擬區域 模擬語言 選取 RTC 日期 選取 RTC 時間 - 啟用自訂 RTC - 此設定允許您設定與您的目前系統時間相互獨立的自訂即時時鐘 + 自訂 RTC + 允許您設定與您的目前系統時間相互獨立的自訂即時時鐘。 設定自訂 RTC - API 準確度層級 - 解析度 + 解析度 (手提/底座) VSync 模式 + 屏幕方向 長寬比 視窗適應過濾器 消除鋸齒方法 @@ -143,12 +187,23 @@ 強制 GPU 以最大可能時脈執行 (熱溫限制仍被套用)。 使用非同步著色器 非同步編譯著色器,將會減少間斷,但可能會引入故障。 - 啟用圖形偵錯 - 核取時,圖形 API 將會進入慢速偵錯模式。 - 使用磁碟著色器快取 + 使用重新啟用排清 + 犧牲效能,以改善部分遊戲的轉譯準確度。 + 磁碟著色器快取 透過將產生的著色器儲存並載入至磁碟,減少中斷。 + + CPU + CPU 调试 + 将 CPU 设置为较慢的调试模式。 + GPU + API + 圖形偵錯 + 將圖形 API 設為慢速偵錯模式。 + Fastmem + + 输出引擎 音量 指定音訊輸出音量。 @@ -157,7 +212,9 @@ 已儲存設定 已儲存 %1$s 設定 儲存 %1$s 時發生錯誤 ini: %2$s + 未生效菜单 正在載入… + 正在关闭… 要將此設定重設回預設值嗎? 重設為預設值 重設所有設定? @@ -165,6 +222,14 @@ 設定已重設 關閉 深入瞭解 + 自動 + 提交 + + 匯入 + 匯出 + 导出失败 + 导入失败 + 取消中 選取 GPU 驅動程式 @@ -172,6 +237,7 @@ 安裝 預設 使用預設 GPU 驅動程式 + 選取的驅動程式無效,將使用系統預設驅動程式! 系統 GPU 驅動程式 正在安裝驅動程式… @@ -182,10 +248,11 @@ 圖形 音訊 主題和色彩 + 偵錯 您的 ROM 已加密 - 遊戲卡匣或安裝標題。]]> + 游戏卡带或已安装的游戏。]]> prod.keys 檔案已安裝,讓遊戲可以解密。]]> 初始化視訊核心時發生錯誤 這經常由不相容的 GPU 驅動程式造成,安裝自訂 GPU 驅動程式可能會解決此問題。 @@ -219,13 +286,16 @@ 中止 繼續 - 找不到系統檔案 + 找不到系統封存 %s 遺失,請傾印您的系統封存。\n繼續模擬可能會造成當機和錯誤。 系統封存 儲存/載入發生錯誤 嚴重錯誤 發生嚴重錯誤,檢查記錄以取得詳細資訊。\n繼續模擬可能會造成當機和錯誤。 關閉此設定會顯著降低模擬效能!如需最佳體驗,建議您將此設定保持為啟用狀態。 + 设备 RAM: %1$s\n推荐 RAM: %2$s + %1$s%2$s + 当前没有可启动的游戏! 日本 @@ -236,7 +306,14 @@ 南韓 台灣 - + + Byte + KB + MB + 英國 + TB + PB + EB Vulkan @@ -274,14 +351,20 @@ FXAA SMAA + + 横向大屏 + 纵向屏幕 + 自動 + 預設 (16:9) 強制 4:3 強制 21:9 強制 16:10 - 延伸視窗 + 延展視窗 + 高精度 低精度 不合理 (慢) @@ -307,8 +390,22 @@ 淺色 深色 + + cubeb + - 使用黑色背景 + 黑色背景 使用深色主題時,套用黑色背景。 - + + 画中画 + 模拟器位于后台时最小化窗口 + 暂停 + 开始 + 靜音 + 取消靜音 + + + 授權 + 來自 AMD 的升級圖像品質 + From 97b4ca1d01fef5fb350125d103e6aff89cd92108 Mon Sep 17 00:00:00 2001 From: Charles Lombardo Date: Tue, 31 Oct 2023 20:29:16 -0400 Subject: [PATCH 035/154] android: Auto-generate locale config --- src/android/app/build.gradle.kts | 4 ++++ src/android/app/src/main/AndroidManifest.xml | 1 - .../app/src/main/res/resources.properties | 1 + .../app/src/main/res/xml/locales_config.xml | 17 ----------------- 4 files changed, 5 insertions(+), 18 deletions(-) create mode 100644 src/android/app/src/main/res/resources.properties delete mode 100644 src/android/app/src/main/res/xml/locales_config.xml diff --git a/src/android/app/build.gradle.kts b/src/android/app/build.gradle.kts index ac43d84b72..021b070e08 100644 --- a/src/android/app/build.gradle.kts +++ b/src/android/app/build.gradle.kts @@ -47,6 +47,10 @@ android { jniLibs.useLegacyPackaging = true } + androidResources { + generateLocaleConfig = true + } + defaultConfig { // TODO If this is ever modified, change application_id in strings.xml applicationId = "org.yuzu.yuzu_emu" diff --git a/src/android/app/src/main/AndroidManifest.xml b/src/android/app/src/main/AndroidManifest.xml index a673517270..f10131b244 100644 --- a/src/android/app/src/main/AndroidManifest.xml +++ b/src/android/app/src/main/AndroidManifest.xml @@ -26,7 +26,6 @@ SPDX-License-Identifier: GPL-3.0-or-later android:supportsRtl="true" android:isGame="true" android:appCategory="game" - android:localeConfig="@xml/locales_config" android:banner="@drawable/tv_banner" android:fullBackupContent="@xml/data_extraction_rules" android:dataExtractionRules="@xml/data_extraction_rules_api_31" diff --git a/src/android/app/src/main/res/resources.properties b/src/android/app/src/main/res/resources.properties new file mode 100644 index 0000000000..467b3efec9 --- /dev/null +++ b/src/android/app/src/main/res/resources.properties @@ -0,0 +1 @@ +unqualifiedResLocale=en-US diff --git a/src/android/app/src/main/res/xml/locales_config.xml b/src/android/app/src/main/res/xml/locales_config.xml deleted file mode 100644 index 51b88d9dc3..0000000000 --- a/src/android/app/src/main/res/xml/locales_config.xml +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - - - - - - - - - - - - From 1e468eac94e69bc1788a960cb8b5c696e5b89037 Mon Sep 17 00:00:00 2001 From: The yuzu Community Date: Wed, 1 Nov 2023 02:08:34 +0000 Subject: [PATCH 036/154] Update translations (2023-11-01) --- dist/languages/ar.ts | 1695 +++++++++++++++++++++------------------ dist/languages/ca.ts | 848 +++++++++++--------- dist/languages/cs.ts | 856 +++++++++++--------- dist/languages/da.ts | 856 +++++++++++--------- dist/languages/de.ts | 997 ++++++++++++----------- dist/languages/el.ts | 856 +++++++++++--------- dist/languages/es.ts | 890 ++++++++++---------- dist/languages/fr.ts | 876 +++++++++++--------- dist/languages/hu.ts | 1685 ++++++++++++++++++++------------------ dist/languages/id.ts | 856 +++++++++++--------- dist/languages/it.ts | 864 +++++++++++--------- dist/languages/ja_JP.ts | 928 +++++++++++---------- dist/languages/ko_KR.ts | 850 +++++++++++--------- dist/languages/nb.ts | 850 +++++++++++--------- dist/languages/nl.ts | 850 +++++++++++--------- dist/languages/pl.ts | 850 +++++++++++--------- dist/languages/pt_BR.ts | 886 +++++++++++--------- dist/languages/pt_PT.ts | 884 +++++++++++--------- dist/languages/ru_RU.ts | 850 +++++++++++--------- dist/languages/sv.ts | 856 +++++++++++--------- dist/languages/tr_TR.ts | 850 +++++++++++--------- dist/languages/uk.ts | 850 +++++++++++--------- dist/languages/vi.ts | 850 +++++++++++--------- dist/languages/vi_VN.ts | 850 +++++++++++--------- dist/languages/zh_CN.ts | 868 +++++++++++--------- dist/languages/zh_TW.ts | 850 +++++++++++--------- 26 files changed, 13200 insertions(+), 11001 deletions(-) diff --git a/dist/languages/ar.ts b/dist/languages/ar.ts index 89adc7e7b9..3bd929ac9a 100644 --- a/dist/languages/ar.ts +++ b/dist/languages/ar.ts @@ -4,7 +4,7 @@ About yuzu - عن يوزو + حول يوزو @@ -49,12 +49,12 @@ p, li { white-space: pre-wrap; } Communicating with the server... - يتواصل مع الخادوم... + يتواصل مع الخادوم Cancel - الغِ + إلغاء @@ -69,12 +69,12 @@ p, li { white-space: pre-wrap; } Configuration completed! - أتممت الضبط! + اكتمل الضبط OK - حسنًا + نعم @@ -87,12 +87,12 @@ p, li { white-space: pre-wrap; } Send Chat Message - أرسل رسالةً + إرسال رسالة دردشة Send Message - أرسل الرسالة + إرسال رسالة @@ -122,12 +122,12 @@ p, li { white-space: pre-wrap; } %1 has been unbanned - رُفِع حظر %1 + تم إلغاء حظر %1 View Profile - اعرض ملف المستخدم + عرض ملف المستخدم @@ -190,7 +190,7 @@ This would ban both their forum username and their IP address. Moderation... - الإشراف... + الإشراف @@ -208,7 +208,7 @@ This would ban both their forum username and their IP address. Disconnected - ليس متصلًا + غير متصل @@ -252,7 +252,7 @@ This would ban both their forum username and their IP address. No The game doesn't get past the "Launching..." screen - لا تشتغل، ولا تتعدى شاشة «يشغِّل...» + لا، اللعبة لا تتجاوز شاشة الإطلاق @@ -272,12 +272,12 @@ This would ban both their forum username and their IP address. Yes The game works without crashes - نعم، وتعمل دون أن تتعطل + نعم اللعبة تعمل بدون أعطال No The game crashes or freezes during gameplay - لا، وتنهار أو تبقى معلَّقةً أثناء اللعب + لا، تتعطل اللعبة أو تتجمد أثناء اللعب @@ -302,12 +302,12 @@ This would ban both their forum username and their IP address. Major The game has major graphical errors - توجد أخطاء كبيرة توجد أخطاء رسمية كبيرة في اللعبة + توجد أخطاء كبيرة توجد أخطاء رسومية كبيرة في اللعبة Minor The game has minor graphical errors - توجد أخطاء صغيرة توجد أخطاء رسمية صغيرة في اللعبة + توجد أخطاء صغيرة توجد أخطاء رسومية صغيرة في اللعبة @@ -342,7 +342,7 @@ This would ban both their forum username and their IP address. Thank you for your submission! - شكرا على مساهمتك! + شكرا على مساهمتك @@ -373,13 +373,13 @@ This would ban both their forum username and their IP address. % - + Auto (%1) Auto select time zone تلقائي (%1) - + Default (%1) Default time zone افتراضي (%1) @@ -404,17 +404,17 @@ This would ban both their forum username and their IP address. Select where the image of the emulated camera comes from. It may be a virtual camera or a real camera. - + حدد من أين تأتي صورة الكاميرا التي تمت محاكاتها. قد تكون كاميرا افتراضية أو كاميرا حقيقية. Camera Image Source: - مصدر صورة الكاميرا: + :مصدر صورة الكاميرا Input device: - جهاز الادخال: + :جهاز الادخال @@ -424,7 +424,7 @@ This would ban both their forum username and their IP address. Resolution: 320*240 - الدقة: 320*240 + الدقة: 240*320 @@ -434,7 +434,7 @@ This would ban both their forum username and their IP address. Restore Defaults - إعادة الأصلي + استعادة الافتراضي @@ -462,7 +462,7 @@ This would ban both their forum username and their IP address. We recommend setting accuracy to "Auto". - نحن نوصي بتتعين الدقة إلى "تلقائي". + نوصي بضبط الدقة على "تلقائي". @@ -509,7 +509,7 @@ This would ban both their forum username and their IP address. Enable inline page tables - + تمكين جداول الصفحات المضمنة @@ -521,7 +521,7 @@ This would ban both their forum username and their IP address. Enable block linking - + تمكين ربط الكتلة @@ -557,7 +557,7 @@ This would ban both their forum username and their IP address. Enable context elimination - + تمكين حذف السياق @@ -581,7 +581,7 @@ This would ban both their forum username and their IP address. Enable miscellaneous optimizations - + تمكين التحسينات المتنوعة @@ -594,7 +594,7 @@ This would ban both their forum username and their IP address. Enable misalignment check reduction - + تمكين تقليل التحقق من المحاذاة غير الصحيحة @@ -643,17 +643,20 @@ This would ban both their forum username and their IP address. <div style="white-space: nowrap">This optimization speeds up memory accesses by allowing invalid memory accesses to succeed.</div> <div style="white-space: nowrap">Enabling it reduces the overhead of all memory accesses and has no impact on programs that don't access invalid memory.</div> - + + <div style="white-space: nowrap">يعمل هذا التحسين على تسريع عمليات الوصول إلى الذاكرة عن طريق السماح بنجاح الوصول إلى الذاكرة غير الصالحة.</div> + <div style="white-space: nowrap">يؤدي تمكينه إلى تقليل الحمل الزائد لجميع عمليات الوصول إلى الذاكرة وليس له أي تأثير على البرامج التي لا تصل إلى الذاكرة غير الصالحة.</div> + Enable fallbacks for invalid memory accesses - + تمكين الإجراءات الاحتياطية للوصول إلى الذاكرة غير الصالحة CPU settings are available only when game is not running. - + تتوفر إعدادات وحدة المعالجة المركزية فقط عندما لا تكون اللعبة قيد التشغيل. @@ -671,7 +674,7 @@ This would ban both their forum username and their IP address. Port: - المنفذ: + :المنفذ @@ -706,7 +709,7 @@ This would ban both their forum username and their IP address. Homebrew - + البيرة المنزلية @@ -786,7 +789,7 @@ This would ban both their forum username and their IP address. Enable Graphics Debugging - + تمكين تصحيح الرسومات @@ -816,7 +819,7 @@ This would ban both their forum username and their IP address. Perform Startup Vulkan Check - + Vulkan إجراء فحص بدء التشغيل @@ -826,12 +829,12 @@ This would ban both their forum username and their IP address. Enable All Controller Types - + تمكين كافة أنواع اذرع التحكم Enable Auto-Stub** - + تمكين الإيقاف التلقائي** @@ -841,12 +844,12 @@ This would ban both their forum username and their IP address. Enable CPU Debugging - + تمكين تصحيح أخطاء وحدة المعالجة المركزية Enable Debug Asserts - + تمكين تأكيدات التصحيح @@ -860,56 +863,36 @@ This would ban both their forum username and their IP address. - Create Minidump After Crash - - - - Enable this to output the latest generated audio command list to the console. Only affects games using the audio renderer. - + Dump Audio Commands To Console** - + Enable Verbose Reporting Services** - + تمكين خدمات التقارير المطولة** - + **This will be reset automatically when yuzu closes. - + ** سيتم إعادة ضبط هذا تلقائيًا عند إغلاق يوزو. - - Restart Required - إعادة التشغيل مطلوبة - - - - yuzu is required to restart in order to apply this setting. - - - - + Web applet not compiled - - - MiniDump creation not compiled - - ConfigureDebugController Configure Debug Controller - + تهيئة تصحيح أخطاء ذراع التحكم @@ -990,7 +973,7 @@ This would ban both their forum username and their IP address. GraphicsAdvanced - + الرسومات المتقدمة @@ -1147,12 +1130,12 @@ This would ban both their forum username and their IP address. Select Dump Directory... - + حدد دليل التفريغ Select Mod Load Directory... - + حدد دليل تحميل التعديل @@ -1196,7 +1179,7 @@ This would ban both their forum username and their IP address. This reset all settings and remove all per-game configurations. This will not delete game directories, profiles, or input profiles. Proceed? - + يؤدي هذا إلى إعادة تعيين جميع الإعدادات وإزالة جميع التكوينات لكل لعبة. لن يؤدي هذا إلى حذف أدلة اللعبة أو الملفات الشخصية أو ملفات تعريف الإدخال. يتابع؟ @@ -1214,7 +1197,7 @@ This would ban both their forum username and their IP address. API Settings - إعدادات API + API إعدادات @@ -1224,7 +1207,7 @@ This would ban both their forum username and their IP address. Background Color: - لون الخلفية: + :لون الخلفية @@ -1301,7 +1284,7 @@ This would ban both their forum username and their IP address. Restore Defaults - إعادة الأصلي + استعادة الافتراضي @@ -1316,12 +1299,12 @@ This would ban both their forum username and their IP address. Controller Hotkey - + مفتاح التحكم السريع - + Conflicting Key Sequence تسلسل أزرار متناقض مع الموجود @@ -1342,27 +1325,37 @@ This would ban both their forum username and their IP address. غير صالح - - Restore Default - إعادة الأصلي + + Invalid hotkey settings + إعدادات مفتاح الاختصار غير صالحة - + + An error occurred. Please report this issue on github. + حدث خطأ. يرجى الإبلاغ عن هذه المشكلة على جيثب. + + + + Restore Default + استعادة الافتراضي + + + Clear مسح - + Conflicting Button Sequence - + The default button sequence is already assigned to: %1 - + The default key sequence is already assigned to: %1 سبق و تم تعيين تسلسل الأزرار الأصلي، مع: %1 @@ -1446,7 +1439,7 @@ This would ban both their forum username and their IP address. Vibration - إرتجاج + الاهتزاز @@ -1457,12 +1450,12 @@ This would ban both their forum username and their IP address. Motion - حركة + الحركة Controllers - أيادي التحكم + ذراع التحكم @@ -1530,7 +1523,7 @@ This would ban both their forum username and their IP address. Joycon Colors - ألوان أيادي جويكون + ألوان جوي كون @@ -1559,7 +1552,7 @@ This would ban both their forum username and their IP address. L Button - + L زر @@ -1583,7 +1576,7 @@ This would ban both their forum username and their IP address. R Button - + R زر @@ -1648,7 +1641,7 @@ This would ban both their forum username and their IP address. Debug Controller - تصحيح أخطاء أداة التحكم + تصحيح أخطاء ذراع التحكم @@ -1676,7 +1669,7 @@ This would ban both their forum username and their IP address. Emulate Analog with Keyboard Input - + محاكاة التناظرية مع إدخال لوحة المفاتيح @@ -1703,7 +1696,7 @@ This would ban both their forum username and their IP address. Enable direct JoyCon driver - + تمكين برنامج تشغيل جوي كون المباشر @@ -1741,52 +1734,52 @@ This would ban both their forum username and their IP address. Input Profiles - + ملفات تعريف الإدخال Player 1 Profile - + الملف الشخصي للاعب 1 Player 2 Profile - + الملف الشخصي للاعب 2 Player 3 Profile - + الملف الشخصي للاعب 3 Player 4 Profile - + الملف الشخصي للاعب 4 Player 5 Profile - + الملف الشخصي للاعب 5 Player 6 Profile - + الملف الشخصي للاعب 6 Player 7 Profile - + الملف الشخصي للاعب 7 Player 8 Profile - + الملف الشخصي للاعب 8 Use global input configuration - + استخدم تكوين الإدخال العالمي @@ -1917,7 +1910,7 @@ This would ban both their forum username and their IP address. Modifier Range: 0% - + 0% :نطاق التعديل @@ -1948,7 +1941,7 @@ This would ban both their forum username and their IP address. Capture - تصوير + التقاط @@ -2038,7 +2031,7 @@ This would ban both their forum username and their IP address. Mouse panning - + تحريك الفأرة @@ -2073,7 +2066,7 @@ This would ban both their forum username and their IP address. Toggle button - + زر التبديل @@ -2091,7 +2084,7 @@ This would ban both their forum username and their IP address. Set threshold - + تعيين الحد الأدنى @@ -2102,7 +2095,7 @@ This would ban both their forum username and their IP address. Toggle axis - + تبديل المحور @@ -2112,12 +2105,12 @@ This would ban both their forum username and their IP address. Calibrate sensor - + معايرة الاستشعار Map Analog Stick - + خريطة عصا التناظرية @@ -2140,28 +2133,28 @@ To invert the axes, first move your joystick vertically, and then horizontally.< Modifier Range: %1% - + %1% :نطاق التعديل Pro Controller - + Pro Controller Dual Joycons - + جوي كون ثنائي Left Joycon - + جوي كون يسار Right Joycon - + جوي كون يمين @@ -2196,7 +2189,7 @@ To invert the axes, first move your joystick vertically, and then horizontally.< Sega Genesis - + Sega Genesis @@ -2211,12 +2204,12 @@ To invert the axes, first move your joystick vertically, and then horizontally.< Control Stick - + عصا التحكم C-Stick - + C-عصا @@ -2231,58 +2224,58 @@ To invert the axes, first move your joystick vertically, and then horizontally.< New Profile - + الملف الشخصي الجديد Enter a profile name: - + :أدخل اسم الملف الشخصي Create Input Profile - + إنشاء ملف تعريف الإدخال The given profile name is not valid! - + اسم الملف الشخصي المحدد غير صالح! Failed to create the input profile "%1" - + "%1" فشل في إنشاء ملف تعريف الإدخال Delete Input Profile - + حذف ملف تعريف الإدخال Failed to delete the input profile "%1" - + "%1" فشل في مسح ملف تعريف الإدخال Load Input Profile - + تحميل ملف تعريف الإدخال Failed to load the input profile "%1" - + "%1" فشل في تحميل ملف تعريف الإدخال Save Input Profile - + حفظ ملف تعريف الإدخال Failed to save the input profile "%1" - + "%1" فشل في حفظ ملف تعريف الإدخال @@ -2290,7 +2283,7 @@ To invert the axes, first move your joystick vertically, and then horizontally.< Create Input Profile - + إنشاء ملف تعريف الإدخال @@ -2350,12 +2343,12 @@ To invert the axes, first move your joystick vertically, and then horizontally.< Server: - + :الخادم Port: - المنفذ: + :المنفذ @@ -2401,7 +2394,7 @@ To invert the axes, first move your joystick vertically, and then horizontally.< Port number has invalid characters - + يحتوي رقم المنفذ على أحرف غير صالحة @@ -2411,7 +2404,7 @@ To invert the axes, first move your joystick vertically, and then horizontally.< IP address is not valid - + غير صالح IP عنوان @@ -2421,32 +2414,32 @@ To invert the axes, first move your joystick vertically, and then horizontally.< Unable to add more than 8 servers - + غير قادر على إضافة أكثر من 8 خوادم Testing - + اختبار Configuring - + تكوين Test Successful - + تم الاختبار بنجاح Successfully received data from the server. - + تم استلام البيانات من الخادم بنجاح. Test Failed - + فشل الاختبار @@ -2464,12 +2457,12 @@ To invert the axes, first move your joystick vertically, and then horizontally.< Configure mouse panning - + تكوين تحريك الماوس Enable mouse panning - + تمكين تحريك الماوس @@ -2508,12 +2501,12 @@ To invert the axes, first move your joystick vertically, and then horizontally.< Counteracts a game's built-in deadzone - + يتصدى للمنطقة الميتة المضمنة في اللعبة Deadzone - + المنطقة الميتة @@ -2544,17 +2537,17 @@ Current values are %1% and %2% respectively. Emulated mouse is enabled. This is incompatible with mouse panning. - + تم تمكين الماوس الذي تمت محاكاته. وهذا غير متوافق مع تحريك الماوس. Emulated mouse is enabled - + تم تمكين الماوس الذي تمت محاكاته Real mouse input and mouse panning are incompatible. Please disable the emulated mouse in input advanced settings to allow mouse panning. - + الإدخال الحقيقي للماوس والتحريك بالماوس غير متوافقين. الرجاء تعطيل الماوس الذي تمت محاكاته في إعدادات الإدخال المتقدمة للسماح بتحريك الماوس. @@ -2577,7 +2570,7 @@ Current values are %1% and %2% respectively. Network Interface - + واجهة الشبكة @@ -2595,7 +2588,7 @@ Current values are %1% and %2% respectively. Info - + معلومات @@ -2620,7 +2613,7 @@ Current values are %1% and %2% respectively. Version - النسخة + إصدار @@ -2660,7 +2653,7 @@ Current values are %1% and %2% respectively. Adv. Graphics - + الرسومات المتقدمة @@ -2670,7 +2663,7 @@ Current values are %1% and %2% respectively. Input Profiles - + ملفات تعريف الإدخال @@ -2698,7 +2691,7 @@ Current values are %1% and %2% respectively. Version - النسخة + إصدار @@ -2716,7 +2709,7 @@ Current values are %1% and %2% respectively. Profile Manager - + مدير الملف الشخصي @@ -2751,7 +2744,7 @@ Current values are %1% and %2% respectively. Profile management is available only when game is not running. - + إدارة الملف الشخصي متاحة فقط عندما لا تكون اللعبة قيد التشغيل. @@ -2774,12 +2767,12 @@ Current values are %1% and %2% respectively. Enter a username for the new user: - + :أدخل اسم مستخدم للمستخدم الجديد Enter a new username: - + :أدخل اسم مستخدم جديد @@ -2794,7 +2787,7 @@ Current values are %1% and %2% respectively. Error deleting image - + خطأ في حذف الصورة @@ -2804,7 +2797,7 @@ Current values are %1% and %2% respectively. Error deleting file - + خطأ في حذف الملف @@ -2814,7 +2807,7 @@ Current values are %1% and %2% respectively. Error creating user image directory - + خطأ في إنشاء دليل صورة المستخدم @@ -2824,7 +2817,7 @@ Current values are %1% and %2% respectively. Error copying user image - + حدث خطأ أثناء نسخ صورة المستخدم @@ -2834,12 +2827,12 @@ Current values are %1% and %2% respectively. Error resizing user image - + خطأ في تغيير حجم صورة المستخدم Unable to resize image - + غير قادر على تغيير حجم الصورة @@ -2847,7 +2840,7 @@ Current values are %1% and %2% respectively. Delete this user? All of the user's save data will be deleted. - + حذف هذا المستخدم؟ سيتم حذف جميع بيانات الحفظ الخاصة بالمستخدم. @@ -2899,7 +2892,7 @@ UUID: %2 Direct Joycon Driver - + برنامج تشغيل جوي كون المباشر @@ -2921,12 +2914,12 @@ UUID: %2 Not connected - + غير متصل Restore Defaults - إعادة الأصلي + استعادة الافتراضي @@ -2957,12 +2950,12 @@ UUID: %2 Direct Joycon driver is not enabled - + لم يتم تمكين برنامج تشغيل جوي كون المباشر Configuring - + تكوين @@ -2977,7 +2970,7 @@ UUID: %2 The current mapped device is not connected - + الجهاز المعين الحالي غير متصل @@ -3006,7 +2999,7 @@ UUID: %2 Core - + نواة @@ -3039,7 +3032,7 @@ UUID: %2 Settings - الإعدادات + إعدادات @@ -3054,7 +3047,7 @@ UUID: %2 Pause execution during loads - + إيقاف التنفيذ مؤقتا أثناء التحميل @@ -3090,12 +3083,12 @@ UUID: %2 Configure Touchscreen Mappings - + تكوين تعيينات شاشة اللمس Mapping: - تخطيط أزرار: + :تخطيط أزرار @@ -3110,13 +3103,14 @@ UUID: %2 Rename - تسمية + إعادة تسمية Click the bottom area to add a point, then press a button to bind. Drag points to change position, or double-click table cells to edit values. - + انقر على المنطقة السفلية لإضافة نقطة، ثم اضغط على زر للربط. +اسحب النقاط لتغيير موضعها، أو انقر نقرًا مزدوجًا فوق خلايا الجدول لتحرير القيم. @@ -3143,37 +3137,37 @@ Drag points to change position, or double-click table cells to edit values. New Profile - + الملف الشخصي الجديد Enter the name for the new profile. - + أدخل اسم الملف الشخصي الجديد. Delete Profile - + حذف الملف الشخصي Delete profile %1? - + %1 حذف الملف الشخصي Rename Profile - + إعادة تسمية الملف الشخصي New name: - + :اسم جديد [press key] - + [اضغط المفتاح] @@ -3181,12 +3175,12 @@ Drag points to change position, or double-click table cells to edit values. Configure Touchscreen - + تكوين شاشة اللمس Warning: The settings in this page affect the inner workings of yuzu's emulated touchscreen. Changing them may result in undesirable behavior, such as the touchscreen partially or not working. You should only use this page if you know what you are doing. - + تحذير: تؤثر الإعدادات الموجودة في هذه الصفحة على الأعمال الداخلية لشاشة اللمس التي تمت محاكاتها في يوزو. قد يؤدي تغييرها إلى سلوك غير مرغوب فيه، مثل شاشة اللمس جزئيًا أو عدم عملها. يجب عليك استخدام هذه الصفحة فقط إذا كنت تعرف ما تفعله. @@ -3206,12 +3200,12 @@ Drag points to change position, or double-click table cells to edit values. Rotational Angle - + زاوية الدوران Restore Defaults - إعادة الأصلي + استعادة الافتراضي @@ -3299,17 +3293,17 @@ Drag points to change position, or double-click table cells to edit values. Note: Changing language will apply your configuration. - + ملاحظة: سيؤدي تغيير اللغة إلى تطبيق التكوين الخاص بك. Interface language: - لغة الواجهة: + :لغة الواجهة Theme: - السمة: + :السمة @@ -3319,7 +3313,7 @@ Drag points to change position, or double-click table cells to edit values. Show Compatibility List - عرض قائمة التوافقية + عرض قائمة التوافق @@ -3337,67 +3331,72 @@ Drag points to change position, or double-click table cells to edit values.عرض عمود أنواع الملف - + + Show Play Time Column + إظهار عمود وقت التشغيل + + + Game Icon Size: - حجم أيقونة اللعبة: + :حجم أيقونة اللعبة - + Folder Icon Size: - حجم أيقونة المجلد: + :حجم أيقونة المجلد - + Row 1 Text: - نص السطر 1: + :نص السطر 1 - + Row 2 Text: - نص السطر 2: + :نص السطر 2 - + Screenshots لقطات الشاشة - + Ask Where To Save Screenshots (Windows Only) اسأل أين أحفظ لقطات الشاشة (نظام التشغيل ويندوز فقط) - + Screenshots Path: - مسار لقطات الشاشة: + :مسار لقطات الشاشة - + ... ... - + TextLabel - + Resolution: - الدقة: + :الدقة - + Select Screenshots Path... أختر مسار لقطات الشاشة - + <System> <System> - + Auto (%1 x %2, %3 x %4) Screenshot width value تلقائي (%1 x %2, %3 x %4) @@ -3408,17 +3407,17 @@ Drag points to change position, or double-click table cells to edit values. Configure Vibration - + تكوين الاهتزاز Press any controller button to vibrate the controller. - + اضغط على أي زر تحكم ليهتز جهاز التحكم. Vibration - إرتجاج + الاهتزاز @@ -3475,12 +3474,12 @@ Drag points to change position, or double-click table cells to edit values. Settings - الإعدادات + إعدادات Enable Accurate Vibration - + تمكين الاهتزاز الدقيق @@ -3519,12 +3518,12 @@ Drag points to change position, or double-click table cells to edit values. Token: - الرمز: + :الرمز Username: - اسم المستخدم: + :اسم المستخدم @@ -3534,7 +3533,7 @@ Drag points to change position, or double-click table cells to edit values. Web Service configuration can only be changed when a public room isn't being hosted. - + لا يمكن تغيير تكوين خدمة الويب إلا في حالة عدم استضافة غرفة عامة. @@ -3554,7 +3553,7 @@ Drag points to change position, or double-click table cells to edit values. Telemetry ID: - معرف القياس عن بعد: + :معرف القياس عن بعد @@ -3564,12 +3563,12 @@ Drag points to change position, or double-click table cells to edit values. Discord Presence - + وجود ديسكورد Show Current Game in your Discord Status - + إظهار اللعبة الحالية في حالة ديسكورد الخاصة بك @@ -3601,7 +3600,7 @@ Drag points to change position, or double-click table cells to edit values. Token not verified - + لم يتم التحقق من الرمز المميز @@ -3612,35 +3611,35 @@ Drag points to change position, or double-click table cells to edit values. Unverified, please click Verify before saving configuration Tooltip - + لم يتم التحقق منه، الرجاء النقر فوق "تحقق" قبل حفظ التكوين Verifying... - + جاري التحقق Verified Tooltip - + تم التحقق Verification failed Tooltip - + فشل التحقق Verification failed - + فشل التحقق Verification failed. Check that you have entered your token correctly, and that your internet connection is working. - + فشل التحقق. تأكد من إدخال الرمز المميز الخاص بك بشكل صحيح، ومن أن اتصالك بالإنترنت يعمل. @@ -3648,12 +3647,12 @@ Drag points to change position, or double-click table cells to edit values. Controller P1 - + P1 ذراع التحكم &Controller P1 - + &P1 ذراع التحكم @@ -3661,12 +3660,12 @@ Drag points to change position, or double-click table cells to edit values. Direct Connect - + اتصال مباشر Server Address - + عنوان الخادم @@ -3686,7 +3685,7 @@ Drag points to change position, or double-click table cells to edit values. Nickname - + الاسم المستعار @@ -3696,7 +3695,7 @@ Drag points to change position, or double-click table cells to edit values. Connect - + الاتصال @@ -3704,970 +3703,1006 @@ Drag points to change position, or double-click table cells to edit values. Connecting - + الاتصال Connect - + الاتصال GMainWindow - + <a href='https://yuzu-emu.org/help/feature/telemetry/'>Anonymous data is collected</a> to help improve yuzu. <br/><br/>Would you like to share your usage data with us? - + Telemetry القياس عن بعد - + Broken Vulkan Installation Detected - + معطل Vulkan تم اكتشاف تثبيت - + Vulkan initialization failed during boot.<br><br>Click <a href='https://yuzu-emu.org/wiki/faq/#yuzu-starts-with-the-error-broken-vulkan-installation-detected'>here for instructions to fix the issue</a>. - + Running a game TRANSLATORS: This string is shown to the user to explain why yuzu needs to prevent the computer from sleeping - + تشغيل لعبة - + Loading Web Applet... - - + + Disable Web Applet - + Disabling the web applet can lead to undefined behavior and should only be used with Super Mario 3D All-Stars. Are you sure you want to disable the web applet? (This can be re-enabled in the Debug settings.) - + The amount of shaders currently being built - + The current selected resolution scaling multiplier. - + Current emulation speed. Values higher or lower than 100% indicate emulation is running faster or slower than a Switch. - + سرعة المحاكاة الحالية. تشير القيم الأعلى أو الأقل من 100% إلى أن المحاكاة تعمل بشكل أسرع أو أبطأ من سويتش. - + How many frames per second the game is currently displaying. This will vary from game to game and scene to scene. - + كم عدد الإطارات في الثانية التي تعرضها اللعبة حاليًا. سيختلف هذا من لعبة إلى أخرى ومن مشهد إلى آخر. - + Time taken to emulate a Switch frame, not counting framelimiting or v-sync. For full-speed emulation this should be at most 16.67 ms. - + Unmute إلغاء الكتم - + Mute كتم - + Reset Volume - + إعادة ضبط مستوى الصوت - + &Clear Recent Files &مسح الملفات الحديثة - + Emulated mouse is enabled - + تم تمكين الماوس الذي تمت محاكاته - + Real mouse input and mouse panning are incompatible. Please disable the emulated mouse in input advanced settings to allow mouse panning. - + الإدخال الحقيقي للماوس والتحريك بالماوس غير متوافقين. الرجاء تعطيل الماوس الذي تمت محاكاته في إعدادات الإدخال المتقدمة للسماح بتحريك الماوس. - + &Continue - &استمرار + &استأنف - + &Pause &إيقاف مؤقت - + Warning Outdated Game Format - + تحذير من تنسيق اللعبة القديم - + You are using the deconstructed ROM directory format for this game, which is an outdated format that has been superseded by others such as NCA, NAX, XCI, or NSP. Deconstructed ROM directories lack icons, metadata, and update support.<br><br>For an explanation of the various Switch formats yuzu supports, <a href='https://yuzu-emu.org/wiki/overview-of-switch-game-formats'>check out our wiki</a>. This message will not be shown again. - + Error while loading ROM! - + ROM خطأ أثناء تحميل - + The ROM format is not supported. - + غير مدعوم ROM تنسيق. - + An error occurred initializing the video core. - + yuzu has encountered an error while running the video core. This is usually caused by outdated GPU drivers, including integrated ones. Please see the log for more details. For more information on accessing the log, please see the following page: <a href='https://yuzu-emu.org/help/reference/log-files/'>How to Upload the Log File</a>. - + Error while loading ROM! %1 %1 signifies a numeric error code. - + %1<br>Please follow <a href='https://yuzu-emu.org/help/quickstart/'>the yuzu quickstart guide</a> to redump your files.<br>You can refer to the yuzu wiki</a> or the yuzu Discord</a> for help. %1 signifies an error string. - + An unknown error occurred. Please see the log for more details. - + حدث خطأ غير معروف. يرجى الاطلاع على السجل لمزيد من التفاصيل. - + (64-bit) - (64-بت) + (64-bit) - + (32-bit) - (32-بت) + (32-bit) - + %1 %2 %1 is the title name. %2 indicates if the title is 64-bit or 32-bit %1 %2 - + Closing software... - + إغلاق البرامج - + Save Data - + حفظ البيانات - + Mod Data - + Error Opening %1 Folder - + %1 حدث خطأ أثناء فتح المجلد - - + + Folder does not exist! - + المجلد غير موجود - + Error Opening Transferable Shader Cache - + Failed to create the shader cache directory for this title. - + فشل إنشاء دليل ذاكرة التخزين المؤقت للتظليل لهذا العنوان. - + Error Removing Contents - + خطأ في إزالة المحتويات - + Error Removing Update - + خطأ في إزالة التحديث - + Error Removing DLC - + Remove Installed Game Contents? - + هل تريد إزالة محتويات اللعبة المثبتة؟ - + Remove Installed Game Update? - + هل تريد إزالة تحديث اللعبة المثبت؟ - + Remove Installed Game DLC? - - - - - Remove Entry - - - - - - - - - - Successfully Removed - - - - - Successfully removed the installed base game. - + للعبة المثبتة؟ DLC إزالة المحتوى القابل للتنزيل + Remove Entry + إزالة الإدخال + + + + + + + + + Successfully Removed + تمت الإزالة بنجاح + + + + Successfully removed the installed base game. + تمت إزالة اللعبة الأساسية المثبتة بنجاح. + + + The base game is not installed in the NAND and cannot be removed. - + Successfully removed the installed update. - + تمت إزالة التحديث المثبت بنجاح. - + There is no update installed for this title. - + لا يوجد تحديث مثبت لهذا العنوان. - + There are no DLC installed for this title. - + مثبت لهذا العنوان DLC لا يوجد أي محتوى قابل للتنزيل. - + Successfully removed %1 installed DLC. - + Delete OpenGL Transferable Shader Cache? - + Delete Vulkan Transferable Shader Cache? - + Delete All Transferable Shader Caches? - + Remove Custom Game Configuration? - + إزالة تكوين اللعبة المخصصة؟ - + Remove Cache Storage? - + Remove File - + إزالة الملف - - + + Remove Play Time Data + إزالة بيانات وقت التشغيل + + + + Reset play time? + إعادة تعيين وقت اللعب؟ + + + + Error Removing Transferable Shader Cache - - + + A shader cache for this title does not exist. - + Successfully removed the transferable shader cache. - + Failed to remove the transferable shader cache. - + Error Removing Vulkan Driver Pipeline Cache - + Failed to remove the driver pipeline cache. - - + + Error Removing Transferable Shader Caches - + Successfully removed the transferable shader caches. - + Failed to remove the transferable shader cache directory. - - + + Error Removing Custom Configuration - + حدث خطأ أثناء إزالة التكوين المخصص - + A custom configuration for this title does not exist. - + لا يوجد تكوين مخصص لهذا العنوان. - + Successfully removed the custom game configuration. - + تمت إزالة تكوين اللعبة المخصص بنجاح. - + Failed to remove the custom game configuration. - + فشل إزالة تكوين اللعبة المخصص. - - + + RomFS Extraction Failed! - + There was an error copying the RomFS files or the user cancelled the operation. - + Full - + كامل - + Skeleton - + Select RomFS Dump Mode - + Please select the how you would like the RomFS dumped.<br>Full will copy all of the files into the new directory while <br>skeleton will only create the directory structure. - + There is not enough free space at %1 to extract the RomFS. Please free up space or select a different dump directory at Emulation > Configure > System > Filesystem > Dump Root - + Extracting RomFS... - - - - + + + + Cancel إلغاء - + RomFS Extraction Succeeded! - - - + + + The operation completed successfully. أكتملت العملية بنجاح - + Integrity verification couldn't be performed! - + لا يمكن إجراء التحقق من سلامة - + File contents were not checked for validity. - + لم يتم التحقق من صحة محتويات الملف. - - + + Integrity verification failed! - + فشل التحقق من سلامة - + File contents may be corrupt. - + قد تكون محتويات الملف تالفة. - - + + Verifying integrity... - + التحقق من سلامة - - + + Integrity verification succeeded! - + نجح التحقق من سلامة! - - - - - + + + + Create Shortcut إنشاء إختصار - + This will create a shortcut to the current AppImage. This may not work well if you update. Continue? - - Cannot create shortcut on desktop. Path "%1" does not exist. + + Cannot create shortcut. Path "%1" does not exist. - - Cannot create shortcut in applications menu. Path "%1" does not exist and cannot be created. - - - - + Create Icon - + إنشاء أيقونة - + Cannot create icon file. Path "%1" does not exist and cannot be created. - + Start %1 with the yuzu Emulator بدء %1 بمحاكي يوزو - + Failed to create a shortcut at %1 - + Successfully created a shortcut to %1 - + Error Opening %1 - + Select Directory - + حدد الدليل - + Properties الخصائص - + The game properties could not be loaded. - + تعذر تحميل خصائص اللعبة. - + Switch Executable (%1);;All Files (*.*) %1 is an identifier for the Switch executable file extensions. - + Load File تشغيل المِلَفّ - + Open Extracted ROM Directory - + Invalid Directory Selected - + تم تحديد دليل غير صالح - + The directory you have selected does not contain a 'main' file. - + Installable Switch File (*.nca *.nsp *.xci);;Nintendo Content Archive (*.nca);;Nintendo Submission Package (*.nsp);;NX Cartridge Image (*.xci) - + Install Files - + تثبيت الملفات - + %n file(s) remaining - + Installing file "%1"... - - + + Install Results - + To avoid possible conflicts, we discourage users from installing base games to the NAND. Please, only use this feature to install updates and DLC. - + %n file(s) were newly installed - + %n file(s) were overwritten - + %n file(s) failed to install - + System Application - + تطبيق النظام - + System Archive - + أرشيف النظام - + System Application Update - + تحديث تطبيق النظام - + Firmware Package (Type A) - + Firmware Package (Type B) - + Game اللعبة - + Game Update - + تحديث اللعبة - + Game DLC - + Delta Title - + Select NCA Install Type... - + Please select the type of title you would like to install this NCA as: (In most instances, the default 'Game' is fine.) - + Failed to Install - + فشل فى التثبيت - + The title type you selected for the NCA is invalid. - + File not found لم يتم العثور على الملف - + File "%1" not found - + OK موافق - - + + Hardware requirements not met - - + + Your system does not meet the recommended hardware requirements. Compatibility reporting has been disabled. - + Missing yuzu Account حساب يوزو مفقود - + In order to submit a game compatibility test case, you must link your yuzu account.<br><br/>To link your yuzu account, go to Emulation &gt; Configuration &gt; Web. - + Error opening URL خطأ في فتح URL - + Unable to open the URL "%1". - + TAS Recording - + Overwrite file of player 1? - + Invalid config detected - + تم اكتشاف تكوين غير صالح - + Handheld controller can't be used on docked mode. Pro controller will be selected. - - + + Amiibo أميبو - - + + The current amiibo has been removed أميبو اللعبة الحالية تمت إزالته - + Error خطأ - - + + The current game is not looking for amiibos اللعبة الحالية لا تبحث عن أميبو - + Amiibo File (%1);; All Files (*.*) - + Load Amiibo تحميل أميبو - + Error loading Amiibo data خطأ أثناء تحميل بيانات أميبو - + The selected file is not a valid amiibo - + The selected file is already on use - + الملف المحدد قيد الاستخدام بالفعل - + An unknown error occurred - + حدث خطأ غير معروف - + Verification failed for the following files: %1 - + + + No firmware available - + + Please install the firmware to use the Album applet. + + + + + Album Applet + التطبيق الصغير للألبوم + + + + Album applet is not available. Please reinstall firmware. + + + + + Please install the firmware to use the Cabinet applet. + + + + + Cabinet Applet + + + + + Cabinet applet is not available. Please reinstall firmware. + + + + Please install the firmware to use the Mii editor. - + Mii Edit Applet - + Mii editor is not available. Please reinstall firmware. - + Capture Screenshot لقطة شاشة - + PNG Image (*.png) - + TAS state: Running %1/%2 - + TAS state: Recording %1 - + TAS state: Idle %1/%2 - + TAS State: Invalid - + &Stop Running &إيقاف التشغيل - + &Start - &ابدأ + &بدء - + Stop R&ecording &إيقاف التسجيل - + R&ecord &تسجيل - + Building: %n shader(s) - + Scale: %1x %1 is the resolution scaling factor - + Speed: %1% / %2% - + Speed: %1% - + Game: %1 FPS (Unlocked) - + Game: %1 FPS - + Frame: %1 ms - + %1 %2 %1 %2 - + FSR - + FSR - + NO AA - + NO AA - + VOLUME: MUTE - + VOLUME: %1% Volume percentage (e.g. 50%) - + Confirm Key Rederivation - + You are about to force rederive all of your keys. If you do not know what this means or what you are doing, this is a potentially destructive action. @@ -4678,90 +4713,92 @@ This will delete your autogenerated key files and re-run the key derivation modu - + Missing fuses - + - Missing BOOT0 - + - Missing BCPKG2-1-Normal-Main - + - Missing PRODINFO - + Derivation Components Missing - + Encryption keys are missing. <br>Please follow <a href='https://yuzu-emu.org/help/quickstart/'>the yuzu quickstart guide</a> to get all your keys, firmware and games.<br><br><small>(%1)</small> - + Deriving keys... This may take up to a minute depending on your system's performance. - + Deriving Keys - + System Archive Decryption Failed - + فشل فك تشفير أرشيف النظام - + Encryption keys failed to decrypt firmware. <br>Please follow <a href='https://yuzu-emu.org/help/quickstart/'>the yuzu quickstart guide</a> to get all your keys, firmware and games. - + Select RomFS Dump Target - + Please select which RomFS you would like to dump. - + Are you sure you want to close yuzu? - هل انت متاكد انك تريد اغلاق يوزو? + هل أنت متأكد أنك تريد إغلاق يوزو؟ - - - + + + yuzu يوزو - + Are you sure you want to stop the emulation? Any unsaved progress will be lost. هل أنت متأكد أنك تريد إيقاف المحاكاة؟ ستيم فقد البيانات التي لم تتم حفظه - + The currently running application has requested yuzu to not exit. Would you like to bypass this and exit anyway? - + لقد طلب التطبيق قيد التشغيل حاليًا من يوزو عدم الخروج. + +هل ترغب في تجاوز هذا والخروج على أية حال؟ @@ -4771,37 +4808,37 @@ Would you like to bypass this and exit anyway? FXAA - + FXAA SMAA - + SMAA Nearest - + Nearest Bilinear - + Bilinear Bicubic - + Bicubic Gaussian - + Gaussian ScaleForce - + ScaleForce @@ -4831,32 +4868,32 @@ Would you like to bypass this and exit anyway? Vulkan - + Vulkan OpenGL - + OpenGL Null - + قيمه خاليه GLSL - + GLSL GLASM - + GLASM SPIRV - + SPIRV @@ -4907,251 +4944,261 @@ Would you like to bypass this and exit anyway? GameList - + Favorite مفضلة - + Start Game بدء اللعبة - + Start Game without Custom Configuration بدء اللعبة بدون الإعدادات المخصصة - + Open Save Data Location فتح موقع بيانات الحفظ - + Open Mod Data Location فتح موقع بيانات التعديلات - + Open Transferable Pipeline Cache - + Remove ازالة - + Remove Installed Update ازالة التحديث المثبت - + Remove All Installed DLC ازل جميع المحتويات المثبتها - + Remove Custom Configuration - + إزالة التكوين المخصص - + + Remove Play Time Data + إزالة بيانات وقت التشغيل + + + Remove Cache Storage - + Remove OpenGL Pipeline Cache - + Remove Vulkan Pipeline Cache - + Remove All Pipeline Caches - + Remove All Installed Contents - + قم بإزالة كافة المحتويات المثبتة - - + + Dump RomFS - + Dump RomFS to SDMC - + Verify Integrity - + التحقق من سلامة - + Copy Title ID to Clipboard - + Navigate to GameDB entry - + Create Shortcut إنشاء إختصار - + Add to Desktop إضافة إلى سطح المكتب - + Add to Applications Menu إضافة إلى قائمة التطبيقات - + Properties الخصائص - + Scan Subfolders مسح الملفات الداخلية - + Remove Game Directory - + إزالة دليل اللعبة - + ▲ Move Up ▲ نقل للأعلى - + ▼ Move Down ▼ نقل للأسفل - + Open Directory Location فتح موقع الدليل - + Clear مسح - + Name الاسم - + Compatibility التوافق - + Add-ons الإضافات - + File type نوع الملف - + Size الحجم + + + Play time + وقت اللعب + GameListItemCompat - + Ingame - + في اللعبة - + Game starts, but crashes or major glitches prevent it from being completed. - - - - - Perfect - متقن - - - - Game can be played without issues. - + تبدأ اللعبة، لكن الأعطال أو الأخطاء الرئيسية تمنعها من الاكتمال. + Perfect + مثالي + + + + Game can be played without issues. + يمكن لعب اللعبة بدون مشاكل. + + + Playable قابل للعب - + Game functions with minor graphical or audio glitches and is playable from start to finish. - - - - - Intro/Menu - مقدمة أو قوائم - - - - Game loads, but is unable to progress past the Start Screen. - + تحتوي وظائف اللعبة على بعض الأخطاء الرسومية أو الصوتية البسيطة ويمكن تشغيلها من البداية إلى النهاية. + Intro/Menu + مقدمة/القائمة + + + + Game loads, but is unable to progress past the Start Screen. + يتم تحميل اللعبة، ولكنها غير قادرة على التقدم بعد شاشة البدء. + + + Won't Boot لا تفتح - + The game crashes when attempting to startup. - + تعطل اللعبة عند محاولة بدء التشغيل. - + Not Tested لم تختبر - + The game has not yet been tested. - + اللعبة لم يتم اختبارها بعد. GameListPlaceholder - + Double-click to add a new folder to the game list - + انقر نقرًا مزدوجًا لإضافة مجلد جديد إلى قائمة الألعاب @@ -5162,14 +5209,14 @@ Would you like to bypass this and exit anyway? - + Filter: - + :تصفيه - + Enter pattern to filter - + أدخل النمط للتصفية @@ -5177,7 +5224,7 @@ Would you like to bypass this and exit anyway? Create Room - + إنشاء غرفة @@ -5202,7 +5249,7 @@ Would you like to bypass this and exit anyway? (Leave blank for open game) - + (اتركه فارغا للعبة مفتوحة) @@ -5222,7 +5269,7 @@ Would you like to bypass this and exit anyway? Load Previous Ban List - + تحميل قائمة الحظر السابقة @@ -5232,12 +5279,12 @@ Would you like to bypass this and exit anyway? Unlisted - + غير مدرج Host Room - + غرفة المضيفة @@ -5259,7 +5306,7 @@ Debug Message: Audio Mute/Unmute - + كتم الصوت/إلغاء كتم الصوت @@ -5284,18 +5331,19 @@ Debug Message: + Main Window - + النافذة الرئيسية Audio Volume Down - + خفض مستوى الصوت Audio Volume Up - + رفع مستوى الصوت @@ -5310,7 +5358,7 @@ Debug Message: Change Docked Mode - + تغيير وضع الإرساء @@ -5320,7 +5368,7 @@ Debug Message: Continue/Pause Emulation - + متابعة/إيقاف مؤقت للمحاكاة @@ -5340,7 +5388,7 @@ Debug Message: Load File - تشغيل المِلَفّ + تحميل الملف @@ -5350,12 +5398,12 @@ Debug Message: Restart Emulation - + إعادة تشغيل المحاكاة Stop Emulation - + إيقاف المحاكاة @@ -5380,7 +5428,7 @@ Debug Message: Toggle Framerate Limit - + تبديل حد معدل الإطارات @@ -5389,9 +5437,14 @@ Debug Message: - Toggle Status Bar + Toggle Renderdoc Capture + + + Toggle Status Bar + تبديل شريط الحالة + InstallDialog @@ -5403,7 +5456,7 @@ Debug Message: Installing an Update or DLC will overwrite the previously installed one. - + إلى استبدال التحديث المثبت مسبقًا DLC سيؤدي تثبيت التحديث أو المحتوى القابل للتنزيل @@ -5422,7 +5475,8 @@ Debug Message: The text can't contain any of the following characters: %1 - + لا يمكن أن يحتوي النص على أي من الأحرف التالية: +%1 @@ -5430,17 +5484,17 @@ Debug Message: Loading Shaders 387 / 1628 - + تحميل التظليل 1628 / 387 Loading Shaders %v out of %m - + %m من %v جاري تحميل التظليل Estimated Time 5m 4s - + 5m 4s الوقت المقدر @@ -5450,7 +5504,7 @@ Debug Message: Loading Shaders %1 / %2 - + %1 / %2 جاري تحميل التظليل @@ -5460,7 +5514,7 @@ Debug Message: Estimated Time %1 - + %1 الوقت المقدر @@ -5468,18 +5522,18 @@ Debug Message: Public Room Browser - + متصفح الغرفة العامة Nickname - + الاسم المستعار Filters - + المرشحات @@ -5514,7 +5568,7 @@ Debug Message: Password: - كلمة المرور: + :كلمة المرور @@ -5544,7 +5598,7 @@ Debug Message: Refresh List - إنعاش القائمة + تحديث القائمة @@ -5577,7 +5631,7 @@ Debug Message: &Reset Window Size - &إعادة تعيين حجم الشاشة + &إعادة ضبط حجم النافذة @@ -5587,32 +5641,32 @@ Debug Message: Reset Window Size to &720p - اعادة تعيين حجم النافذة إلى &720p + 720p إعادة تعيين حجم النافذة إلى Reset Window Size to 720p - اعادة تعيين حجم النافذة إلى 720p + 720p إعادة تعيين حجم النافذة إلى Reset Window Size to &900p - اعادة تعيين حجم النافذة إلى &900p + 900p إعادة تعيين حجم النافذة إلى Reset Window Size to 900p - اعادة تعيين حجم النافذة إلى 900p + 900p إعادة تعيين حجم النافذة إلى Reset Window Size to &1080p - اعادة تعيين حجم النافذة إلى &1080p + 1080p إعادة تعيين حجم النافذة إلى Reset Window Size to 1080p - اعادة تعيين حجم النافذة إلى 1080p + 1080p إعادة تعيين حجم النافذة إلى @@ -5626,186 +5680,216 @@ Debug Message: + &Amiibo + أميبو + + + &TAS - + &Help &مساعدة - + &Install Files to NAND... - &تثبيت الملفات الى الذاكرة الداخلية... + &NAND تثبيت الملفات على - + L&oad File... - &تحميل ملف... + &تحميل ملف - + Load &Folder... - تحميل &مجلد... + تحميل &مجلد - + E&xit &خروج - + &Pause &إيقاف مؤقت - + &Stop &إيقاف - + &Reinitialize keys... - &إعادة تهيئة المفاتيح... + &إعادة تهيئة المفاتيح - + &Verify Installed Contents - + التحقق من المحتويات المثبتة - + &About yuzu - &عن يوزو + &حول يوزو - + Single &Window Mode - وضع &الشاشة الواحدة - - - - Con&figure... - &أعدادات... + وضع النافذة الواحدة + Con&figure... + &أعدادات + + + Display D&ock Widget Headers - + Show &Filter Bar - عرض &شريط المرشح + عرض &شريط التصفية - + Show &Status Bar عرض &شريط الحالة - + Show Status Bar عرض شريط الحالة - + &Browse Public Game Lobby &استعراض ردهة الألعاب العامة - + &Create Room &إنشاء غرفة - + &Leave Room &مغادرة الغرفة - + &Direct Connect to Room &اتصال مباشر مع غرفة - + &Show Current Room &عرض الغرفة الحالية - + F&ullscreen - &ملئ الشاشة + &ملء الشاشة - + &Restart &إعادة التشغيل - + Load/Remove &Amiibo... - تحميل/إزالة &أميبو... + تحميل/إزالة &أميبو - + &Report Compatibility - &تقرير توافقية + &تقرير التوافق - + Open &Mods Page فتح صفحة &التعديلات - + Open &Quickstart Guide - فتح دليل &البداية السريعة + فتح دليل التشغيل السريع - + &FAQ - &الاسئلة الاكثر شيوعا + &التعليمات - + Open &yuzu Folder فتح مجلد &يوزو - + &Capture Screenshot - &لقط الشاشة + &التقاط لقطة للشاشة - + + Open &Album + افتح الألبوم + + + + &Set Nickname and Owner + &تعيين الاسم المستعار والمالك + + + + &Delete Game Data + حذف بيانات اللعبة + + + + &Restore Amiibo + &استعادة أميبو + + + + &Format Amiibo + &تنسيق أميبو + + + Open &Mii Editor - + Mii فتح محرر - + &Configure TAS... - + Configure C&urrent Game... إعدادات &اللعبة الحالية - + &Start - &ابدأ + &بدء - + &Reset &إعادة تعيين - + R&ecord &تسجيل @@ -5854,7 +5938,7 @@ Debug Message: Forum Username - + اسم المستخدم في المنتدى @@ -5903,7 +5987,8 @@ Debug Message: Failed to update the room information. Please check your Internet connection and try hosting the room again. Debug Message: - + فشل في تحديث معلومات الغرفة. يرجى التحقق من اتصالك بالإنترنت ومحاولة استضافة الغرفة مرة أخرى. +رسالة التصحيح: @@ -5936,37 +6021,37 @@ Debug Message: You must choose a Preferred Game to host a room. If you do not have any games in your game list yet, add a game folder by clicking on the plus icon in the game list. - + يجب عليك اختيار لعبة مفضلة لاستضافة غرفة. إذا لم يكن لديك أي ألعاب في قائمة الألعاب الخاصة بك حتى الآن، قم بإضافة مجلد الألعاب من خلال النقر على أيقونة الزائد في قائمة الألعاب. Unable to find an internet connection. Check your internet settings. - + غير قادر على العثور على اتصال بالإنترنت. تحقق من إعدادات الإنترنت لديك. Unable to connect to the host. Verify that the connection settings are correct. If you still cannot connect, contact the room host and verify that the host is properly configured with the external port forwarded. - + غير قادر على الاتصال بالمضيف. تأكد من صحة إعدادات الاتصال. إذا كنت لا تزال غير قادر على الاتصال، فاتصل بمضيف الغرفة وتأكد من تكوين المضيف بشكل صحيح مع إعادة توجيه المنفذ الخارجي. Unable to connect to the room because it is already full. - + غير قادر على الاتصال بالغرفة لأنها ممتلئة بالفعل. Creating a room failed. Please retry. Restarting yuzu might be necessary. - + فشل إنشاء الغرفة. الرجاء اعادة المحاولة. قد تكون إعادة تشغيل يوزو ضرورية. The host of the room has banned you. Speak with the host to unban you or try a different room. - + لقد قام مضيف الغرفة بحظرك. تحدث مع المضيف لإلغاء الحظر عليك أو تجربة غرفة مختلفة. Version mismatch! Please update to the latest version of yuzu. If the problem persists, contact the room host and ask them to update the server. - + عدم تطابق إصدار! يرجى التحديث إلى أحدث إصدار من يوزو. إذا استمرت المشكلة، فاتصل بمضيف الغرفة واطلب منه تحديث الخادم. @@ -6009,18 +6094,20 @@ They may have left the room. No valid network interface is selected. Please go to Configure -> System -> Network and make a selection. - + لم يتم تحديد واجهة شبكة صالحة. +يرجى الانتقال إلى التكوين -> النظام -> الشبكة وتحديد الاختيار. Game already running - اللعبة تشتغل مسبقا + اللعبة قيد التشغيل بالفعل Joining a room when the game is already running is discouraged and can cause the room feature not to work correctly. Proceed anyway? - + لا يُنصح بالانضمام إلى غرفة عندما تكون اللعبة قيد التشغيل بالفعل وقد يؤدي ذلك إلى عدم عمل ميزة الغرفة بشكل صحيح. +المتابعة على أية حال؟ @@ -6110,27 +6197,27 @@ p, li { white-space: pre-wrap; } لا يلعب أي لعبة - + Installed SD Titles عناوين مثبته على بطاقة الذاكرة - + Installed NAND Titles عناوين مثبته على الذاكرة الداخلية - + System Titles عناوين النظام - + Add New Game Directory اضافة دليل ألعاب جديد - + Favorites المفضلة @@ -6272,7 +6359,7 @@ p, li { white-space: pre-wrap; } Start - ابدأ + Start @@ -6602,17 +6689,17 @@ p, li { white-space: pre-wrap; } The following amiibo data will be formatted: - بيانات أمبيو التالية سيتم تهيئتها: + :بيانات أمبيو التالية سيتم تهيئتها The following game data will removed: - بيانات الألعاب التالية سيتم إزالتها: + :بيانات الألعاب التالية سيتم إزالتها Set nickname and owner: - + تعيين الاسم المستعار والمالك @@ -6630,12 +6717,12 @@ p, li { white-space: pre-wrap; } Supported Controller Types: - أنواع أداوت التحكم المدعومة: + :أنواع ذراع التحكم المدعومة Players: - اللاعبين: + :اللاعبين @@ -6645,7 +6732,7 @@ p, li { white-space: pre-wrap; } P4 - + P4 @@ -6656,9 +6743,9 @@ p, li { white-space: pre-wrap; } - + Pro Controller - + Pro Controller @@ -6669,9 +6756,9 @@ p, li { white-space: pre-wrap; } - + Dual Joycons - + جوي كون ثنائي @@ -6682,9 +6769,9 @@ p, li { white-space: pre-wrap; } - + Left Joycon - + جوي كون يسار @@ -6695,9 +6782,9 @@ p, li { white-space: pre-wrap; } - + Right Joycon - + جوي كون يمين @@ -6709,49 +6796,49 @@ p, li { white-space: pre-wrap; } Use Current Config - + استخدم التكوين الحالي P2 - + P2 P1 - + P1 - + Handheld محمول P3 - + P3 P7 - + P7 P8 - + P8 P5 - + P5 P6 - + P6 @@ -6766,7 +6853,7 @@ p, li { white-space: pre-wrap; } Vibration - إرتجاج + الاهتزاز @@ -6792,7 +6879,7 @@ p, li { white-space: pre-wrap; } Controllers - أيادي التحكم + ذراع التحكم @@ -6840,34 +6927,39 @@ p, li { white-space: pre-wrap; } 8 - - GameCube Controller - أداة تحكم GameCube + + Not enough controllers + لا توجد اذرع تحكم كافية - + + GameCube Controller + ذراع تحكم GameCube + + + Poke Ball Plus Poke Ball Plus - + NES Controller - أداة تحكم NES + ذراع تحكم NES - + SNES Controller - أداة تحكم SNES + ذراع تحكم SNES - + N64 Controller - أداة تحكم N64 + ذراع تحكم N64 - + Sega Genesis - + Sega Genesis @@ -6883,7 +6975,8 @@ p, li { white-space: pre-wrap; } An error has occurred. Please try again or contact the developer of the software. - + حدث خطأ. +يرجى المحاولة مرة أخرى أو الاتصال بمطور البرنامج. @@ -6898,7 +6991,11 @@ Please try again or contact the developer of the software. %1 %2 - + حدث خطأ. + +%1 + +%2 @@ -6919,73 +7016,73 @@ Please try again or contact the developer of the software. Profile Creator - + منشئ الملف الشخصي Profile Selector - + محدد الملف الشخصي Profile Icon Editor - + محرر أيقونة الملف الشخصي Profile Nickname Editor - + محرر الاسم المستعار للملف الشخصي Who will receive the points? - + من سيحصل على النقاط؟ Who is using Nintendo eShop? - + ؟Nintendo eShop من يستخدم Who is making this purchase? - + من يقوم بهذا الشراء؟ Who is posting? - + من ينشر؟ Select a user to link to a Nintendo Account. - + Nintendo حدد مستخدمًا لربطه بحساب Change settings for which user? - + تغيير الإعدادات لأي مستخدم؟ Format data for which user? - + تنسيق البيانات لأي مستخدم؟ Which user will be transferred to another console? - + من هو المستخدم الذي سيتم نقله إلى وحدة تحكم أخرى؟ Send save data for which user? - + إرسال حفظ البيانات لأي مستخدم؟ Select a user: - اختر مستخدم: + :اختر مستخدم @@ -7059,17 +7156,17 @@ p, li { white-space: pre-wrap; } runnable - + قابل للتشغيل paused - + متوقف مؤقتا sleeping - + نائم @@ -7109,7 +7206,7 @@ p, li { white-space: pre-wrap; } terminated - + تم إنهاؤه @@ -7119,7 +7216,7 @@ p, li { white-space: pre-wrap; } PC = 0x%1 LR = 0x%2 - + PC = 0x%1 LR = 0x%2 diff --git a/dist/languages/ca.ts b/dist/languages/ca.ts index 0ececae420..65b8ca894a 100644 --- a/dist/languages/ca.ts +++ b/dist/languages/ca.ts @@ -365,13 +365,13 @@ This would ban both their forum username and their IP address. % - + Auto (%1) Auto select time zone - + Default (%1) Default time zone @@ -882,49 +882,29 @@ This would ban both their forum username and their IP address. - Create Minidump After Crash - - - - Enable this to output the latest generated audio command list to the console. Only affects games using the audio renderer. - + Dump Audio Commands To Console** - + Enable Verbose Reporting Services** Activa els serveis d'informes detallats** - + **This will be reset automatically when yuzu closes. **Això es restablirà automàticament quan es tanqui yuzu. - - Restart Required - - - - - yuzu is required to restart in order to apply this setting. - - - - + Web applet not compiled - - - MiniDump creation not compiled - - ConfigureDebugController @@ -1343,7 +1323,7 @@ This would ban both their forum username and their IP address. - + Conflicting Key Sequence Seqüència de tecles en conflicte @@ -1364,27 +1344,37 @@ This would ban both their forum username and their IP address. Invàlid - + + Invalid hotkey settings + + + + + An error occurred. Please report this issue on github. + + + + Restore Default Restaurar el valor predeterminat - + Clear Esborrar - + Conflicting Button Sequence Seqüència de botons en conflicte - + The default button sequence is already assigned to: %1 La seqüència de botons per defecte ja està assignada a: %1 - + The default key sequence is already assigned to: %1 La seqüència de tecles predeterminada ja ha estat assignada a: %1 @@ -3360,67 +3350,72 @@ Arrossegui els punts per a canviar la posició, o faci doble clic a les cel·les - + + Show Play Time Column + + + + Game Icon Size: Tamany de les icones dels jocs - + Folder Icon Size: Tamany de les icones de les carpetes - + Row 1 Text: Text de la fila 1: - + Row 2 Text: Text de la fila 2: - + Screenshots Captures de pantalla - + Ask Where To Save Screenshots (Windows Only) Preguntar on guardar les captures de pantalla (només Windows) - + Screenshots Path: Ruta de les captures de pantalla: - + ... ... - + TextLabel - + Resolution: Resolució: - + Select Screenshots Path... Seleccioni el directori de les Captures de Pantalla... - + <System> <System> - + Auto (%1 x %2, %3 x %4) Screenshot width value @@ -3738,612 +3733,616 @@ Arrossegui els punts per a canviar la posició, o faci doble clic a les cel·les GMainWindow - + <a href='https://yuzu-emu.org/help/feature/telemetry/'>Anonymous data is collected</a> to help improve yuzu. <br/><br/>Would you like to share your usage data with us? <a href='https://yuzu-emu.org/help/feature/telemetry/'>Es recullen dades anònimes</a> per ajudar a millorar yuzu. <br/><br/>Desitja compartir les seves dades d'ús amb nosaltres? - + Telemetry Telemetria - + Broken Vulkan Installation Detected - + Vulkan initialization failed during boot.<br><br>Click <a href='https://yuzu-emu.org/wiki/faq/#yuzu-starts-with-the-error-broken-vulkan-installation-detected'>here for instructions to fix the issue</a>. - + Running a game TRANSLATORS: This string is shown to the user to explain why yuzu needs to prevent the computer from sleeping - + Loading Web Applet... Carregant Web applet... - - + + Disable Web Applet Desactivar el Web Applet - + Disabling the web applet can lead to undefined behavior and should only be used with Super Mario 3D All-Stars. Are you sure you want to disable the web applet? (This can be re-enabled in the Debug settings.) Desactivar l'Applet Web pot provocar comportaments indefinits i només hauria d'utilitzar-se amb Super Mario 3D All-Stars. Estàs segur de que vols desactivar l'Applet Web? (Això pot ser reactivat als paràmetres Debug.) - + The amount of shaders currently being built La quantitat de shaders que s'estan compilant actualment - + The current selected resolution scaling multiplier. El multiplicador d'escala de resolució seleccionat actualment. - + Current emulation speed. Values higher or lower than 100% indicate emulation is running faster or slower than a Switch. Velocitat d'emulació actual. Valors superiors o inferiors a 100% indiquen que l'emulació s'està executant més ràpidament o més lentament que a la Switch. - + How many frames per second the game is currently displaying. This will vary from game to game and scene to scene. Quants fotogrames per segon està mostrant el joc actualment. Això variarà d'un joc a un altre i d'una escena a una altra. - + Time taken to emulate a Switch frame, not counting framelimiting or v-sync. For full-speed emulation this should be at most 16.67 ms. Temps que costa emular un fotograma de la Switch, sense tenir en compte la limitació de fotogrames o la sincronització vertical. Per a una emulació òptima, aquest valor hauria de ser com a màxim de 16.67 ms. - + Unmute - + Mute - + Reset Volume - + &Clear Recent Files &Esborrar arxius recents - + Emulated mouse is enabled - + Real mouse input and mouse panning are incompatible. Please disable the emulated mouse in input advanced settings to allow mouse panning. - + &Continue &Continuar - + &Pause &Pausar - + Warning Outdated Game Format Advertència format del joc desfasat - + You are using the deconstructed ROM directory format for this game, which is an outdated format that has been superseded by others such as NCA, NAX, XCI, or NSP. Deconstructed ROM directories lack icons, metadata, and update support.<br><br>For an explanation of the various Switch formats yuzu supports, <a href='https://yuzu-emu.org/wiki/overview-of-switch-game-formats'>check out our wiki</a>. This message will not be shown again. Està utilitzant el format de directori de ROM deconstruït per a aquest joc, que és un format desactualitzat que ha sigut reemplaçat per altres, com NCA, NAX, XCI o NSP. Els directoris de ROM deconstruïts careixen d'icones, metadades i suport d'actualitzacions.<br><br>Per a obtenir una explicació dels diversos formats de Switch que suporta yuzu,<a href='https://yuzu-emu.org/wiki/overview-of-switch-game-formats'>faci una ullada a la nostra wiki</a>. Aquest missatge no es tornarà a mostrar. - + Error while loading ROM! Error carregant la ROM! - + The ROM format is not supported. El format de la ROM no està suportat. - + An error occurred initializing the video core. S'ha produït un error inicialitzant el nucli de vídeo. - + yuzu has encountered an error while running the video core. This is usually caused by outdated GPU drivers, including integrated ones. Please see the log for more details. For more information on accessing the log, please see the following page: <a href='https://yuzu-emu.org/help/reference/log-files/'>How to Upload the Log File</a>. yuzu ha trobat un error mentre executava el nucli de vídeo. Això sol ser causat per controladors de la GPU obsolets, inclosos els integrats. Si us plau, consulti el registre per a més detalls. Per obtenir més informació sobre com accedir al registre, consulti la següent pàgina: <a href='https://yuzu-emu.org/help/reference/log-files/'>Com carregar el fitxer de registre</a>. - + Error while loading ROM! %1 %1 signifies a numeric error code. Error al carregar la ROM! %1 - + %1<br>Please follow <a href='https://yuzu-emu.org/help/quickstart/'>the yuzu quickstart guide</a> to redump your files.<br>You can refer to the yuzu wiki</a> or the yuzu Discord</a> for help. %1 signifies an error string. %1<br>Si us plau, segueixi <a href='https://yuzu-emu.org/help/quickstart/'>la guia d'inici de yuzu</a> per a bolcar de nou els seus fitxers.<br>Pot consultar la wiki de yuzu wiki</a> o el Discord de yuzu</a> per obtenir ajuda. - + An unknown error occurred. Please see the log for more details. S'ha produït un error desconegut. Si us plau, consulti el registre per a més detalls. - + (64-bit) (64-bit) - + (32-bit) (32-bit) - + %1 %2 %1 is the title name. %2 indicates if the title is 64-bit or 32-bit %1 %2 - + Closing software... S'està tancant el programari - + Save Data Dades de partides guardades - + Mod Data Dades de mods - + Error Opening %1 Folder Error obrint la carpeta %1 - - + + Folder does not exist! La carpeta no existeix! - + Error Opening Transferable Shader Cache Error obrint la cache transferible de shaders - + Failed to create the shader cache directory for this title. No s'ha pogut crear el directori de la cache dels shaders per aquest títol. - + Error Removing Contents - + Error Removing Update - + Error Removing DLC - + Remove Installed Game Contents? - + Remove Installed Game Update? - + Remove Installed Game DLC? - + Remove Entry Eliminar entrada - - - - - - + + + + + + Successfully Removed S'ha eliminat correctament - + Successfully removed the installed base game. S'ha eliminat correctament el joc base instal·lat. - + The base game is not installed in the NAND and cannot be removed. El joc base no està instal·lat a la NAND i no pot ser eliminat. - + Successfully removed the installed update. S'ha eliminat correctament l'actualització instal·lada. - + There is no update installed for this title. No hi ha cap actualització instal·lada per aquest títol. - + There are no DLC installed for this title. No hi ha cap DLC instal·lat per aquest títol. - + Successfully removed %1 installed DLC. S'ha eliminat correctament %1 DLC instal·lat/s. - + Delete OpenGL Transferable Shader Cache? Desitja eliminar la cache transferible de shaders d'OpenGL? - + Delete Vulkan Transferable Shader Cache? Desitja eliminar la cache transferible de shaders de Vulkan? - + Delete All Transferable Shader Caches? Desitja eliminar totes les caches transferibles de shaders? - + Remove Custom Game Configuration? Desitja eliminar la configuració personalitzada del joc? - + Remove Cache Storage? - + Remove File Eliminar arxiu - - + + Remove Play Time Data + + + + + Reset play time? + + + + + Error Removing Transferable Shader Cache Error eliminant la cache transferible de shaders - - + + A shader cache for this title does not exist. No existeix una cache de shaders per aquest títol. - + Successfully removed the transferable shader cache. S'ha eliminat correctament la cache transferible de shaders. - + Failed to remove the transferable shader cache. No s'ha pogut eliminar la cache transferible de shaders. - + Error Removing Vulkan Driver Pipeline Cache - + Failed to remove the driver pipeline cache. - - + + Error Removing Transferable Shader Caches Error al eliminar les caches de shaders transferibles - + Successfully removed the transferable shader caches. Caches de shaders transferibles eliminades correctament. - + Failed to remove the transferable shader cache directory. No s'ha pogut eliminar el directori de caches de shaders transferibles. - - + + Error Removing Custom Configuration Error eliminant la configuració personalitzada - + A custom configuration for this title does not exist. No existeix una configuració personalitzada per aquest joc. - + Successfully removed the custom game configuration. S'ha eliminat correctament la configuració personalitzada del joc. - + Failed to remove the custom game configuration. No s'ha pogut eliminar la configuració personalitzada del joc. - - + + RomFS Extraction Failed! La extracció de RomFS ha fallat! - + There was an error copying the RomFS files or the user cancelled the operation. S'ha produït un error copiant els arxius RomFS o l'usuari ha cancel·lat la operació. - + Full Completa - + Skeleton Esquelet - + Select RomFS Dump Mode Seleccioni el mode de bolcat de RomFS - + Please select the how you would like the RomFS dumped.<br>Full will copy all of the files into the new directory while <br>skeleton will only create the directory structure. Si us plau, seleccioni la forma en que desitja bolcar la RomFS.<br>Completa copiarà tots els arxius al nou directori mentre que<br>esquelet només crearà l'estructura de directoris. - + There is not enough free space at %1 to extract the RomFS. Please free up space or select a different dump directory at Emulation > Configure > System > Filesystem > Dump Root No hi ha suficient espai lliure a %1 per extreure el RomFS. Si us plau, alliberi espai o esculli un altre directori de bolcat a Emulació > Configuració > Sistema > Sistema d'arxius > Carpeta arrel de bolcat - + Extracting RomFS... Extraient RomFS... - - - - + + + + Cancel Cancel·la - + RomFS Extraction Succeeded! Extracció de RomFS completada correctament! - - - + + + The operation completed successfully. L'operació s'ha completat correctament. - + Integrity verification couldn't be performed! - + File contents were not checked for validity. - - + + Integrity verification failed! - + File contents may be corrupt. - - + + Verifying integrity... - - + + Integrity verification succeeded! - - - - - + + + + Create Shortcut - + This will create a shortcut to the current AppImage. This may not work well if you update. Continue? - - Cannot create shortcut on desktop. Path "%1" does not exist. + + Cannot create shortcut. Path "%1" does not exist. - - Cannot create shortcut in applications menu. Path "%1" does not exist and cannot be created. - - - - + Create Icon - + Cannot create icon file. Path "%1" does not exist and cannot be created. - + Start %1 with the yuzu Emulator - + Failed to create a shortcut at %1 - + Successfully created a shortcut to %1 - + Error Opening %1 Error obrint %1 - + Select Directory Seleccionar directori - + Properties Propietats - + The game properties could not be loaded. Les propietats del joc no s'han pogut carregar. - + Switch Executable (%1);;All Files (*.*) %1 is an identifier for the Switch executable file extensions. Executable de Switch (%1);;Tots els Arxius (*.*) - + Load File Carregar arxiu - + Open Extracted ROM Directory Obrir el directori de la ROM extreta - + Invalid Directory Selected Directori seleccionat invàlid - + The directory you have selected does not contain a 'main' file. El directori que ha seleccionat no conté un arxiu 'main'. - + Installable Switch File (*.nca *.nsp *.xci);;Nintendo Content Archive (*.nca);;Nintendo Submission Package (*.nsp);;NX Cartridge Image (*.xci) Arxiu de Switch Instal·lable (*.nca *.nsp *.xci);;Arxiu de Continguts Nintendo (*.nca);;Paquet d'enviament Nintendo (*.nsp);;Imatge de Cartutx NX (*.xci) - + Install Files Instal·lar arxius - + %n file(s) remaining %n arxiu(s) restants%n arxiu(s) restants - + Installing file "%1"... Instal·lant arxiu "%1"... - - + + Install Results Resultats instal·lació - + To avoid possible conflicts, we discourage users from installing base games to the NAND. Please, only use this feature to install updates and DLC. Per evitar possibles conflictes, no recomanem als usuaris que instal·lin jocs base a la NAND. Si us plau, utilitzi aquesta funció només per a instal·lar actualitzacions i DLCs. - + %n file(s) were newly installed %n nou(s) arxiu(s) s'ha(n) instal·lat @@ -4351,7 +4350,7 @@ Si us plau, utilitzi aquesta funció només per a instal·lar actualitzacions i - + %n file(s) were overwritten %n arxiu(s) s'han sobreescrit @@ -4359,7 +4358,7 @@ Si us plau, utilitzi aquesta funció només per a instal·lar actualitzacions i - + %n file(s) failed to install %n arxiu(s) no s'han instal·lat @@ -4367,339 +4366,371 @@ Si us plau, utilitzi aquesta funció només per a instal·lar actualitzacions i - + System Application Aplicació del sistema - + System Archive Arxiu del sistema - + System Application Update Actualització de l'aplicació del sistema - + Firmware Package (Type A) Paquet de firmware (Tipus A) - + Firmware Package (Type B) Paquet de firmware (Tipus B) - + Game Joc - + Game Update Actualització de joc - + Game DLC DLC del joc - + Delta Title Títol delta - + Select NCA Install Type... Seleccioni el tipus d'instal·lació NCA... - + Please select the type of title you would like to install this NCA as: (In most instances, the default 'Game' is fine.) Seleccioni el tipus de títol que desitja instal·lar aquest NCA com a: (En la majoria dels casos, el valor predeterminat 'Joc' està bé.) - + Failed to Install Ha fallat la instal·lació - + The title type you selected for the NCA is invalid. El tipus de títol seleccionat per el NCA és invàlid. - + File not found Arxiu no trobat - + File "%1" not found Arxiu "%1" no trobat - + OK D'acord - - + + Hardware requirements not met - - + + Your system does not meet the recommended hardware requirements. Compatibility reporting has been disabled. - + Missing yuzu Account Falta el compte de yuzu - + In order to submit a game compatibility test case, you must link your yuzu account.<br><br/>To link your yuzu account, go to Emulation &gt; Configuration &gt; Web. Per tal d'enviar un cas de prova de compatibilitat de joc, ha de vincular el seu compte de yuzu.<br><br/>Per a vincular el seu compte de yuzu, vagi a Emulació & gt; Configuració & gt; Web. - + Error opening URL Error obrint URL - + Unable to open the URL "%1". No es pot obrir la URL "%1". - + TAS Recording Gravació TAS - + Overwrite file of player 1? Sobreescriure l'arxiu del jugador 1? - + Invalid config detected Configuració invàlida detectada - + Handheld controller can't be used on docked mode. Pro controller will be selected. El controlador del mode portàtil no es pot fer servir en el mode acoblat. Es seleccionarà el controlador Pro en el seu lloc. - - + + Amiibo Amiibo - - + + The current amiibo has been removed L'amiibo actual ha sigut eliminat - + Error Error - - + + The current game is not looking for amiibos El joc actual no està buscant amiibos - + Amiibo File (%1);; All Files (*.*) Arxiu Amiibo (%1);; Tots els Arxius (*.*) - + Load Amiibo Carregar Amiibo - + Error loading Amiibo data Error al carregar les dades d'Amiibo - + The selected file is not a valid amiibo - + The selected file is already on use - + An unknown error occurred - + Verification failed for the following files: %1 - + + + No firmware available - + + Please install the firmware to use the Album applet. + + + + + Album Applet + + + + + Album applet is not available. Please reinstall firmware. + + + + + Please install the firmware to use the Cabinet applet. + + + + + Cabinet Applet + + + + + Cabinet applet is not available. Please reinstall firmware. + + + + Please install the firmware to use the Mii editor. - + Mii Edit Applet - + Mii editor is not available. Please reinstall firmware. - + Capture Screenshot Captura de pantalla - + PNG Image (*.png) Imatge PNG (*.png) - + TAS state: Running %1/%2 Estat TAS: executant %1/%2 - + TAS state: Recording %1 Estat TAS: gravant %1 - + TAS state: Idle %1/%2 Estat TAS: inactiu %1/%2 - + TAS State: Invalid Estat TAS: invàlid - + &Stop Running &Parar l'execució - + &Start &Iniciar - + Stop R&ecording Parar g&ravació - + R&ecord G&ravar - + Building: %n shader(s) Construint: %n shader(s)Construint: %n shader(s) - + Scale: %1x %1 is the resolution scaling factor Escala: %1x - + Speed: %1% / %2% Velocitat: %1% / %2% - + Speed: %1% Velocitat: %1% - + Game: %1 FPS (Unlocked) Joc: %1 FPS (desbloquejat) - + Game: %1 FPS Joc: %1 FPS - + Frame: %1 ms Fotograma: %1 ms - + %1 %2 %1 %2 - + FSR FSR - + NO AA SENSE AA - + VOLUME: MUTE - + VOLUME: %1% Volume percentage (e.g. 50%) - + Confirm Key Rederivation Confirmi la clau de rederivació - + You are about to force rederive all of your keys. If you do not know what this means or what you are doing, this is a potentially destructive action. @@ -4716,37 +4747,37 @@ i opcionalment faci còpies de seguretat. Això eliminarà els arxius de les claus generats automàticament i tornarà a executar el mòdul de derivació de claus. - + Missing fuses Falten fusibles - + - Missing BOOT0 - Falta BOOT0 - + - Missing BCPKG2-1-Normal-Main - Falta BCPKG2-1-Normal-Main - + - Missing PRODINFO - Falta PRODINFO - + Derivation Components Missing Falten components de derivació - + Encryption keys are missing. <br>Please follow <a href='https://yuzu-emu.org/help/quickstart/'>the yuzu quickstart guide</a> to get all your keys, firmware and games.<br><br><small>(%1)</small> Falten les claus d'encriptació. <br>Si us plau, segueixi <a href='https://yuzu-emu.org/help/quickstart/'>la guia ràpida de yuzu</a> per a obtenir totes les seves claus, firmware i jocs.<br><br><small>(%1)</small> - + Deriving keys... This may take up to a minute depending on your system's performance. @@ -4755,49 +4786,49 @@ Això pot prendre fins a un minut depenent del rendiment del seu sistema. - + Deriving Keys Derivant claus - + System Archive Decryption Failed - + Encryption keys failed to decrypt firmware. <br>Please follow <a href='https://yuzu-emu.org/help/quickstart/'>the yuzu quickstart guide</a> to get all your keys, firmware and games. - + Select RomFS Dump Target Seleccioni el destinatari per a bolcar el RomFS - + Please select which RomFS you would like to dump. Si us plau, seleccioni quin RomFS desitja bolcar. - + Are you sure you want to close yuzu? Està segur de que vol tancar yuzu? - - - + + + yuzu yuzu - + Are you sure you want to stop the emulation? Any unsaved progress will be lost. Està segur de que vol aturar l'emulació? Qualsevol progrés no guardat es perdrà. - + The currently running application has requested yuzu to not exit. Would you like to bypass this and exit anyway? @@ -4949,241 +4980,251 @@ Desitja tancar-lo de totes maneres? GameList - + Favorite Preferit - + Start Game Iniciar el joc - + Start Game without Custom Configuration Iniciar el joc sense la configuració personalitzada - + Open Save Data Location Obrir la ubicació dels arxius de partides guardades - + Open Mod Data Location Obrir la ubicació dels mods - + Open Transferable Pipeline Cache Obrir cache transferible de shaders de canonada - + Remove Eliminar - + Remove Installed Update Eliminar actualització instal·lada - + Remove All Installed DLC Eliminar tots els DLC instal·lats - + Remove Custom Configuration Eliminar configuració personalitzada - + + Remove Play Time Data + + + + Remove Cache Storage - + Remove OpenGL Pipeline Cache Eliminar cache de canonada d'OpenGL - + Remove Vulkan Pipeline Cache Eliminar cache de canonada de Vulkan - + Remove All Pipeline Caches Eliminar totes les caches de canonada - + Remove All Installed Contents Eliminar tots els continguts instal·lats - - + + Dump RomFS Bolcar RomFS - + Dump RomFS to SDMC Bolcar RomFS a SDMC - + Verify Integrity - + Copy Title ID to Clipboard Copiar la ID del títol al porta-retalls - + Navigate to GameDB entry Navegar a l'entrada de GameDB - + Create Shortcut - + Add to Desktop - + Add to Applications Menu - + Properties Propietats - + Scan Subfolders Escanejar subdirectoris - + Remove Game Directory Eliminar directori de jocs - + ▲ Move Up ▲ Moure amunt - + ▼ Move Down ▼ Move avall - + Open Directory Location Obre ubicació del directori - + Clear Esborrar - + Name Nom - + Compatibility Compatibilitat - + Add-ons Complements - + File type Tipus d'arxiu - + Size Mida + + + Play time + + GameListItemCompat - + Ingame - + Game starts, but crashes or major glitches prevent it from being completed. - + Perfect Perfecte - + Game can be played without issues. - + Playable - + Game functions with minor graphical or audio glitches and is playable from start to finish. - + Intro/Menu Intro / Menú - + Game loads, but is unable to progress past the Start Screen. - + Won't Boot No engega - + The game crashes when attempting to startup. El joc es bloqueja al intentar iniciar. - + Not Tested No provat - + The game has not yet been tested. Aquest joc encara no ha estat provat. @@ -5191,7 +5232,7 @@ Desitja tancar-lo de totes maneres? GameListPlaceholder - + Double-click to add a new folder to the game list Faci doble clic per afegir un nou directori a la llista de jocs @@ -5204,12 +5245,12 @@ Desitja tancar-lo de totes maneres? %1 de %n resultat(s)%1 de %n resultat(s) - + Filter: Filtre: - + Enter pattern to filter Introdueixi patró per a filtrar @@ -5326,6 +5367,7 @@ Debug Message: + Main Window @@ -5431,6 +5473,11 @@ Debug Message: + Toggle Renderdoc Capture + + + + Toggle Status Bar @@ -5669,186 +5716,216 @@ Debug Message: + &Amiibo + + + + &TAS &TAS - + &Help &Ajuda - + &Install Files to NAND... &instal·lar arxius a la NAND... - + L&oad File... C&arregar arxiu... - + Load &Folder... Carregar &carpeta... - + E&xit S&ortir - + &Pause &Pausar - + &Stop &Aturar - + &Reinitialize keys... &Reinicialitzar claus... - + &Verify Installed Contents - + &About yuzu &Sobre yuzu - + Single &Window Mode Mode una sola &finestra - + Con&figure... Con&figurar... - + Display D&ock Widget Headers Mostrar complements de capçalera del D&ock - + Show &Filter Bar Mostrar la barra de &filtre - + Show &Status Bar Mostrar la barra d'&estat - + Show Status Bar Mostrar barra d'estat - + &Browse Public Game Lobby - + &Create Room - + &Leave Room - + &Direct Connect to Room - + &Show Current Room - + F&ullscreen P&antalla completa - + &Restart &Reiniciar - + Load/Remove &Amiibo... Carregar/Eliminar &Amiibo... - + &Report Compatibility &Informar de compatibilitat - + Open &Mods Page Obrir la pàgina de &mods - + Open &Quickstart Guide Obre la guia d'&inici ràpid - + &FAQ &Preguntes freqüents - + Open &yuzu Folder Obrir la carpeta de &yuzu - + &Capture Screenshot &Captura de pantalla - + + Open &Album + + + + + &Set Nickname and Owner + + + + + &Delete Game Data + + + + + &Restore Amiibo + + + + + &Format Amiibo + + + + Open &Mii Editor - + &Configure TAS... &Configurar TAS... - + Configure C&urrent Game... Configurar joc a&ctual... - + &Start &Iniciar - + &Reset &Reiniciar - + R&ecord E&nregistrar @@ -6152,27 +6229,27 @@ p, li { white-space: pre-wrap; } - + Installed SD Titles Títols instal·lats a la SD - + Installed NAND Titles Títols instal·lats a la NAND - + System Titles Títols del sistema - + Add New Game Directory Afegir un nou directori de jocs - + Favorites Preferits @@ -6698,7 +6775,7 @@ p, li { white-space: pre-wrap; } - + Pro Controller Controlador Pro @@ -6711,7 +6788,7 @@ p, li { white-space: pre-wrap; } - + Dual Joycons Joycons duals @@ -6724,7 +6801,7 @@ p, li { white-space: pre-wrap; } - + Left Joycon Joycon esquerra @@ -6737,7 +6814,7 @@ p, li { white-space: pre-wrap; } - + Right Joycon Joycon dret @@ -6766,7 +6843,7 @@ p, li { white-space: pre-wrap; } - + Handheld Portàtil @@ -6882,32 +6959,37 @@ p, li { white-space: pre-wrap; } 8 - + + Not enough controllers + + + + GameCube Controller Controlador de GameCube - + Poke Ball Plus Poke Ball Plus - + NES Controller Controlador NES - + SNES Controller Controlador SNES - + N64 Controller Controlador N64 - + Sega Genesis Sega Genesis diff --git a/dist/languages/cs.ts b/dist/languages/cs.ts index 899725ed49..efe3559b6d 100644 --- a/dist/languages/cs.ts +++ b/dist/languages/cs.ts @@ -365,13 +365,13 @@ This would ban both their forum username and their IP address. % - + Auto (%1) Auto select time zone - + Default (%1) Default time zone @@ -876,49 +876,29 @@ This would ban both their forum username and their IP address. - Create Minidump After Crash - - - - Enable this to output the latest generated audio command list to the console. Only affects games using the audio renderer. - + Dump Audio Commands To Console** - + Enable Verbose Reporting Services** - + **This will be reset automatically when yuzu closes. - - Restart Required - - - - - yuzu is required to restart in order to apply this setting. - - - - + Web applet not compiled - - - MiniDump creation not compiled - - ConfigureDebugController @@ -1337,7 +1317,7 @@ This would ban both their forum username and their IP address. - + Conflicting Key Sequence Protichůdné klávesové sekvence @@ -1358,27 +1338,37 @@ This would ban both their forum username and their IP address. - + + Invalid hotkey settings + + + + + An error occurred. Please report this issue on github. + + + + Restore Default Vrátit výchozí nastavení - + Clear Vyčistit - + Conflicting Button Sequence - + The default button sequence is already assigned to: %1 - + The default key sequence is already assigned to: %1 Výchozí klávesová sekvence je již přiřazena k: %1 @@ -3354,67 +3344,72 @@ Táhněte body pro změnu pozice nebo dvojitě klikněte na buňky tabulky pro z - + + Show Play Time Column + + + + Game Icon Size: - + Folder Icon Size: - + Row 1 Text: Text řádku 1: - + Row 2 Text: Text řádku 2: - + Screenshots Snímek obrazovky - + Ask Where To Save Screenshots (Windows Only) Zeptat se, kam uložit snímek obrazovky (pouze Windows) - + Screenshots Path: Cesta snímků obrazovky: - + ... ... - + TextLabel - + Resolution: - + Select Screenshots Path... Vyberte cestu ke snímkům obrazovky... - + <System> <System> - + Auto (%1 x %2, %3 x %4) Screenshot width value @@ -3732,961 +3727,997 @@ Táhněte body pro změnu pozice nebo dvojitě klikněte na buňky tabulky pro z GMainWindow - + <a href='https://yuzu-emu.org/help/feature/telemetry/'>Anonymous data is collected</a> to help improve yuzu. <br/><br/>Would you like to share your usage data with us? <a href='https://yuzu-emu.org/help/feature/telemetry/'>Anonymní data jsou sbírána</a> pro vylepšení yuzu. <br/><br/>Chcete s námi sdílet anonymní data? - + Telemetry Telemetry - + Broken Vulkan Installation Detected - + Vulkan initialization failed during boot.<br><br>Click <a href='https://yuzu-emu.org/wiki/faq/#yuzu-starts-with-the-error-broken-vulkan-installation-detected'>here for instructions to fix the issue</a>. - + Running a game TRANSLATORS: This string is shown to the user to explain why yuzu needs to prevent the computer from sleeping - + Loading Web Applet... Načítání Web Appletu... - - + + Disable Web Applet Zakázat Web Applet - + Disabling the web applet can lead to undefined behavior and should only be used with Super Mario 3D All-Stars. Are you sure you want to disable the web applet? (This can be re-enabled in the Debug settings.) - + The amount of shaders currently being built Počet aktuálně sestavovaných shaderů - + The current selected resolution scaling multiplier. - + Current emulation speed. Values higher or lower than 100% indicate emulation is running faster or slower than a Switch. Aktuální emulační rychlost. Hodnoty vyšší než 100% indikují, že emulace běží rychleji nebo pomaleji než na Switchi. - + How many frames per second the game is currently displaying. This will vary from game to game and scene to scene. Kolik snímků za sekundu aktuálně hra zobrazuje. Tohle závisí na hře od hry a scény od scény. - + Time taken to emulate a Switch frame, not counting framelimiting or v-sync. For full-speed emulation this should be at most 16.67 ms. Čas potřebný na emulaci framu scény, nepočítá se limit nebo v-sync. Pro plnou rychlost by se tohle mělo pohybovat okolo 16.67 ms. - + Unmute - + Mute - + Reset Volume - + &Clear Recent Files &Vymazat poslední soubory - + Emulated mouse is enabled - + Real mouse input and mouse panning are incompatible. Please disable the emulated mouse in input advanced settings to allow mouse panning. - + &Continue &Pokračovat - + &Pause &Pauza - + Warning Outdated Game Format Varování Zastaralý Formát Hry - + You are using the deconstructed ROM directory format for this game, which is an outdated format that has been superseded by others such as NCA, NAX, XCI, or NSP. Deconstructed ROM directories lack icons, metadata, and update support.<br><br>For an explanation of the various Switch formats yuzu supports, <a href='https://yuzu-emu.org/wiki/overview-of-switch-game-formats'>check out our wiki</a>. This message will not be shown again. Používáte rozbalený formát hry, který je zastaralý a byl nahrazen jinými jako NCA, NAX, XCI, nebo NSP. Rozbalená ROM nemá ikony, metadata, a podporu updatů.<br><br>Pro vysvětlení všech možných podporovaných typů, <a href='https://yuzu-emu.org/wiki/overview-of-switch-game-formats'>zkoukni naší wiki</a>. Tato zpráva se nebude znova zobrazovat. - + Error while loading ROM! Chyba při načítání ROM! - + The ROM format is not supported. Tento formát ROM není podporován. - + An error occurred initializing the video core. Nastala chyba při inicializaci jádra videa. - + yuzu has encountered an error while running the video core. This is usually caused by outdated GPU drivers, including integrated ones. Please see the log for more details. For more information on accessing the log, please see the following page: <a href='https://yuzu-emu.org/help/reference/log-files/'>How to Upload the Log File</a>. - + Error while loading ROM! %1 %1 signifies a numeric error code. Chyba při načítání ROM! %1 - + %1<br>Please follow <a href='https://yuzu-emu.org/help/quickstart/'>the yuzu quickstart guide</a> to redump your files.<br>You can refer to the yuzu wiki</a> or the yuzu Discord</a> for help. %1 signifies an error string. %1<br>Pro extrakci souborů postupujte podle <a href='https://yuzu-emu.org/help/quickstart/'>rychlého průvodce yuzu</a>. Nápovědu naleznete na <br>wiki</a> nebo na Discordu</a>. - + An unknown error occurred. Please see the log for more details. Nastala chyba. Koukni do logu. - + (64-bit) (64-bit) - + (32-bit) (32-bit) - + %1 %2 %1 is the title name. %2 indicates if the title is 64-bit or 32-bit %1 %2 - + Closing software... - + Save Data Uložit data - + Mod Data Módovat Data - + Error Opening %1 Folder Chyba otevírání složky %1 - - + + Folder does not exist! Složka neexistuje! - + Error Opening Transferable Shader Cache Chyba při otevírání přenositelné mezipaměti shaderů - + Failed to create the shader cache directory for this title. - + Error Removing Contents - + Error Removing Update - + Error Removing DLC - + Remove Installed Game Contents? - + Remove Installed Game Update? - + Remove Installed Game DLC? - + Remove Entry Odebrat položku - - - - - - + + + + + + Successfully Removed Úspěšně odebráno - + Successfully removed the installed base game. Úspěšně odebrán nainstalovaný základ hry. - + The base game is not installed in the NAND and cannot be removed. Základ hry není nainstalovaný na NAND a nemůže být odstraněn. - + Successfully removed the installed update. Úspěšně odebrána nainstalovaná aktualizace. - + There is no update installed for this title. Není nainstalovaná žádná aktualizace pro tento titul. - + There are no DLC installed for this title. Není nainstalované žádné DLC pro tento titul. - + Successfully removed %1 installed DLC. Úspěšně odstraněno %1 nainstalovaných DLC. - + Delete OpenGL Transferable Shader Cache? - + Delete Vulkan Transferable Shader Cache? - + Delete All Transferable Shader Caches? - + Remove Custom Game Configuration? Odstranit vlastní konfiguraci hry? - + Remove Cache Storage? - + Remove File Odstranit soubor - - + + Remove Play Time Data + + + + + Reset play time? + + + + + Error Removing Transferable Shader Cache Chyba při odstraňování přenositelné mezipaměti shaderů - - + + A shader cache for this title does not exist. Mezipaměť shaderů pro tento titul neexistuje. - + Successfully removed the transferable shader cache. Přenositelná mezipaměť shaderů úspěšně odstraněna - + Failed to remove the transferable shader cache. Nepodařilo se odstranit přenositelnou mezipaměť shaderů - + Error Removing Vulkan Driver Pipeline Cache - + Failed to remove the driver pipeline cache. - - + + Error Removing Transferable Shader Caches - + Successfully removed the transferable shader caches. - + Failed to remove the transferable shader cache directory. - - + + Error Removing Custom Configuration Chyba při odstraňování vlastní konfigurace hry - + A custom configuration for this title does not exist. Vlastní konfigurace hry pro tento titul neexistuje. - + Successfully removed the custom game configuration. Úspěšně odstraněna vlastní konfigurace hry. - + Failed to remove the custom game configuration. Nepodařilo se odstranit vlastní konfiguraci hry. - - + + RomFS Extraction Failed! Extrakce RomFS se nepovedla! - + There was an error copying the RomFS files or the user cancelled the operation. Nastala chyba při kopírování RomFS souborů, nebo uživatel operaci zrušil. - + Full Plný - + Skeleton Kostra - + Select RomFS Dump Mode Vyber RomFS Dump Mode - + Please select the how you would like the RomFS dumped.<br>Full will copy all of the files into the new directory while <br>skeleton will only create the directory structure. Vyber jak by si chtěl RomFS vypsat.<br>Plné zkopíruje úplně všechno, ale<br>kostra zkopíruje jen strukturu složky. - + There is not enough free space at %1 to extract the RomFS. Please free up space or select a different dump directory at Emulation > Configure > System > Filesystem > Dump Root - + Extracting RomFS... Extrahuji RomFS... - - - - + + + + Cancel Zrušit - + RomFS Extraction Succeeded! Extrakce RomFS se povedla! - - - + + + The operation completed successfully. Operace byla dokončena úspěšně. - + Integrity verification couldn't be performed! - + File contents were not checked for validity. - - + + Integrity verification failed! - + File contents may be corrupt. - - + + Verifying integrity... - - + + Integrity verification succeeded! - - - - - + + + + Create Shortcut - + This will create a shortcut to the current AppImage. This may not work well if you update. Continue? - - Cannot create shortcut on desktop. Path "%1" does not exist. + + Cannot create shortcut. Path "%1" does not exist. - - Cannot create shortcut in applications menu. Path "%1" does not exist and cannot be created. - - - - + Create Icon - + Cannot create icon file. Path "%1" does not exist and cannot be created. - + Start %1 with the yuzu Emulator - + Failed to create a shortcut at %1 - + Successfully created a shortcut to %1 - + Error Opening %1 Chyba při otevírání %1 - + Select Directory Vybraná Složka - + Properties Vlastnosti - + The game properties could not be loaded. Herní vlastnosti nemohly být načteny. - + Switch Executable (%1);;All Files (*.*) %1 is an identifier for the Switch executable file extensions. Switch Executable (%1);;Všechny soubory (*.*) - + Load File Načíst soubor - + Open Extracted ROM Directory Otevřít složku s extrahovanou ROM - + Invalid Directory Selected Vybraná složka je neplatná - + The directory you have selected does not contain a 'main' file. Složka kterou jste vybrali neobsahuje soubor "main" - + Installable Switch File (*.nca *.nsp *.xci);;Nintendo Content Archive (*.nca);;Nintendo Submission Package (*.nsp);;NX Cartridge Image (*.xci) Instalovatelný soubor pro Switch (*.nca *.nsp *.xci);;Nintendo Content Archive (*.nca);;Nintendo Submission Package (*.nsp);;NX Cartridge Image (*.xci) - + Install Files Instalovat Soubory - + %n file(s) remaining - + Installing file "%1"... Instalování souboru "%1"... - - + + Install Results Výsledek instalace - + To avoid possible conflicts, we discourage users from installing base games to the NAND. Please, only use this feature to install updates and DLC. Abychom předešli možným konfliktům, nedoporučujeme uživatelům instalovat základní hry na paměť NAND. Tuto funkci prosím používejte pouze k instalaci aktualizací a DLC. - + %n file(s) were newly installed - + %n file(s) were overwritten - + %n file(s) failed to install - + System Application Systémová Aplikace - + System Archive Systémový archív - + System Application Update Systémový Update Aplikace - + Firmware Package (Type A) Firmware-ový baliček (Typu A) - + Firmware Package (Type B) Firmware-ový baliček (Typu B) - + Game Hra - + Game Update Update Hry - + Game DLC Herní DLC - + Delta Title Delta Title - + Select NCA Install Type... Vyberte typ instalace NCA... - + Please select the type of title you would like to install this NCA as: (In most instances, the default 'Game' is fine.) Vyberte typ title-u, který chcete nainstalovat tenhle NCA jako: (Většinou základní "game" stačí.) - + Failed to Install Chyba v instalaci - + The title type you selected for the NCA is invalid. Tento typ pro tento NCA není platný. - + File not found Soubor nenalezen - + File "%1" not found Soubor "%1" nenalezen - + OK OK - - + + Hardware requirements not met - - + + Your system does not meet the recommended hardware requirements. Compatibility reporting has been disabled. - + Missing yuzu Account Chybí účet yuzu - + In order to submit a game compatibility test case, you must link your yuzu account.<br><br/>To link your yuzu account, go to Emulation &gt; Configuration &gt; Web. Pro přidání recenze kompatibility je třeba mít účet yuzu<br><br/>Pro nalinkování yuzu účtu jdi do Emulace &gt; Konfigurace &gt; Web. - + Error opening URL Chyba při otevírání URL - + Unable to open the URL "%1". Nelze otevřít URL "%1". - + TAS Recording - + Overwrite file of player 1? - + Invalid config detected Zjištěno neplatné nastavení - + Handheld controller can't be used on docked mode. Pro controller will be selected. Ruční ovladač nelze používat v dokovacím režimu. Bude vybrán ovladač Pro Controller. - - + + Amiibo - - + + The current amiibo has been removed - + Error - - + + The current game is not looking for amiibos - + Amiibo File (%1);; All Files (*.*) Soubor Amiibo (%1);; Všechny Soubory (*.*) - + Load Amiibo Načíst Amiibo - + Error loading Amiibo data Chyba načítání Amiiba - + The selected file is not a valid amiibo - + The selected file is already on use - + An unknown error occurred - + Verification failed for the following files: %1 - + + + No firmware available - + + Please install the firmware to use the Album applet. + + + + + Album Applet + + + + + Album applet is not available. Please reinstall firmware. + + + + + Please install the firmware to use the Cabinet applet. + + + + + Cabinet Applet + + + + + Cabinet applet is not available. Please reinstall firmware. + + + + Please install the firmware to use the Mii editor. - + Mii Edit Applet - + Mii editor is not available. Please reinstall firmware. - + Capture Screenshot Pořídit Snímek Obrazovky - + PNG Image (*.png) PNG Image (*.png) - + TAS state: Running %1/%2 - + TAS state: Recording %1 - + TAS state: Idle %1/%2 - + TAS State: Invalid - + &Stop Running - + &Start &Start - + Stop R&ecording - + R&ecord - + Building: %n shader(s) - + Scale: %1x %1 is the resolution scaling factor - + Speed: %1% / %2% Rychlost: %1% / %2% - + Speed: %1% Rychlost: %1% - + Game: %1 FPS (Unlocked) - + Game: %1 FPS Hra: %1 FPS - + Frame: %1 ms Frame: %1 ms - + %1 %2 %1 %2 - + FSR - + NO AA - + VOLUME: MUTE - + VOLUME: %1% Volume percentage (e.g. 50%) - + Confirm Key Rederivation Potvďte Rederivaci Klíčů - + You are about to force rederive all of your keys. If you do not know what this means or what you are doing, this is a potentially destructive action. @@ -4703,37 +4734,37 @@ a udělejte si zálohu. Toto vymaže věechny vaše automaticky generované klíče a znova spustí modul derivace klíčů. - + Missing fuses Chybí Fuses - + - Missing BOOT0 - Chybí BOOT0 - + - Missing BCPKG2-1-Normal-Main - Chybí BCPKG2-1-Normal-Main - + - Missing PRODINFO - Chybí PRODINFO - + Derivation Components Missing Chybé odvozené komponenty - + Encryption keys are missing. <br>Please follow <a href='https://yuzu-emu.org/help/quickstart/'>the yuzu quickstart guide</a> to get all your keys, firmware and games.<br><br><small>(%1)</small> - + Deriving keys... This may take up to a minute depending on your system's performance. @@ -4742,49 +4773,49 @@ Tohle může zabrat až minutu podle výkonu systému. - + Deriving Keys Derivuji Klíče - + System Archive Decryption Failed - + Encryption keys failed to decrypt firmware. <br>Please follow <a href='https://yuzu-emu.org/help/quickstart/'>the yuzu quickstart guide</a> to get all your keys, firmware and games. - + Select RomFS Dump Target Vyberte Cíl vypsaní RomFS - + Please select which RomFS you would like to dump. Vyberte, kterou RomFS chcete vypsat. - + Are you sure you want to close yuzu? Jste si jist, že chcete zavřít yuzu? - - - + + + yuzu yuzu - + Are you sure you want to stop the emulation? Any unsaved progress will be lost. Jste si jist, že chcete ukončit emulaci? Jakýkolic neuložený postup bude ztracen. - + The currently running application has requested yuzu to not exit. Would you like to bypass this and exit anyway? @@ -4936,241 +4967,251 @@ Opravdu si přejete ukončit tuto aplikaci? GameList - + Favorite Oblíbené - + Start Game Spustit hru - + Start Game without Custom Configuration Spustit hru bez vlastní konfigurace - + Open Save Data Location Otevřít Lokaci Savů - + Open Mod Data Location Otevřít Lokaci Modifikací - + Open Transferable Pipeline Cache - + Remove Odstranit - + Remove Installed Update Odstranit nainstalovanou aktualizaci - + Remove All Installed DLC Odstranit všechny nainstalované DLC - + Remove Custom Configuration Odstranit vlastní konfiguraci hry - + + Remove Play Time Data + + + + Remove Cache Storage - + Remove OpenGL Pipeline Cache - + Remove Vulkan Pipeline Cache - + Remove All Pipeline Caches - + Remove All Installed Contents Odstranit všechen nainstalovaný obsah - - + + Dump RomFS Vypsat RomFS - + Dump RomFS to SDMC - + Verify Integrity - + Copy Title ID to Clipboard Zkopírovat ID Titulu do schránky - + Navigate to GameDB entry Navigovat do GameDB - + Create Shortcut - + Add to Desktop - + Add to Applications Menu - + Properties Vlastnosti - + Scan Subfolders Prohledat podsložky - + Remove Game Directory Odstranit složku se hrou - + ▲ Move Up ▲ Posunout nahoru - + ▼ Move Down ▼ Posunout dolů - + Open Directory Location Otevřít umístění složky - + Clear Vymazat - + Name Název - + Compatibility Kompatibilita - + Add-ons Modifkace - + File type Typ-Souboru - + Size Velikost + + + Play time + + GameListItemCompat - + Ingame - + Game starts, but crashes or major glitches prevent it from being completed. - + Perfect Perfektní - + Game can be played without issues. - + Playable - + Game functions with minor graphical or audio glitches and is playable from start to finish. - + Intro/Menu Intro/Menu - + Game loads, but is unable to progress past the Start Screen. - + Won't Boot Nebootuje - + The game crashes when attempting to startup. Hra crashuje při startu. - + Not Tested Netestováno - + The game has not yet been tested. Hra ještě nebyla testována @@ -5178,7 +5219,7 @@ Opravdu si přejete ukončit tuto aplikaci? GameListPlaceholder - + Double-click to add a new folder to the game list Dvojitým kliknutím přidáte novou složku do seznamu her @@ -5191,12 +5232,12 @@ Opravdu si přejete ukončit tuto aplikaci? - + Filter: Filtr: - + Enter pattern to filter Zadejte filtr @@ -5313,6 +5354,7 @@ Debug Message: + Main Window @@ -5418,6 +5460,11 @@ Debug Message: + Toggle Renderdoc Capture + + + + Toggle Status Bar @@ -5655,186 +5702,216 @@ Debug Message: + &Amiibo + + + + &TAS - + &Help &Pomoc - + &Install Files to NAND... &Instalovat soubory na NAND... - + L&oad File... Načís&t soubor... - + Load &Folder... Načíst sl&ožku... - + E&xit E&xit - + &Pause &Pauza - + &Stop &Stop - + &Reinitialize keys... &Znovu inicializovat klíče... - + &Verify Installed Contents - + &About yuzu O &aplikaci yuzu - + Single &Window Mode &Režim jednoho okna - + Con&figure... &Nastavení - + Display D&ock Widget Headers Zobrazit záhlaví widgetů d&oku - + Show &Filter Bar Zobrazit &filtrovací panel - + Show &Status Bar Zobrazit &stavový řádek - + Show Status Bar Zobrazit Staus Bar - + &Browse Public Game Lobby - + &Create Room - + &Leave Room - + &Direct Connect to Room - + &Show Current Room - + F&ullscreen &Celá obrazovka - + &Restart &Restartovat - + Load/Remove &Amiibo... - + &Report Compatibility &Nahlásit kompatibilitu - + Open &Mods Page Otevřít stránku s &modifikacemi - + Open &Quickstart Guide Otevřít &rychlého průvodce - + &FAQ Často &kladené otázky - + Open &yuzu Folder Otevřít složku s &yuzu - + &Capture Screenshot Za&chytit snímek obrazovky - - Open &Mii Editor - - - - - &Configure TAS... + + Open &Album + &Set Nickname and Owner + + + + + &Delete Game Data + + + + + &Restore Amiibo + + + + + &Format Amiibo + + + + + Open &Mii Editor + + + + + &Configure TAS... + + + + Configure C&urrent Game... Nastavení současné hry - + &Start &Start - + &Reset - + R&ecord @@ -6138,27 +6215,27 @@ p, li { white-space: pre-wrap; } - + Installed SD Titles Nainstalované SD tituly - + Installed NAND Titles Nainstalované NAND tituly - + System Titles Systémové tituly - + Add New Game Directory Přidat novou složku s hrami - + Favorites Oblíbené @@ -6684,7 +6761,7 @@ p, li { white-space: pre-wrap; } - + Pro Controller Pro Controller @@ -6697,7 +6774,7 @@ p, li { white-space: pre-wrap; } - + Dual Joycons Oba Joycony @@ -6710,7 +6787,7 @@ p, li { white-space: pre-wrap; } - + Left Joycon Levý Joycon @@ -6723,7 +6800,7 @@ p, li { white-space: pre-wrap; } - + Right Joycon Pravý Joycon @@ -6752,7 +6829,7 @@ p, li { white-space: pre-wrap; } - + Handheld Handheld @@ -6868,32 +6945,37 @@ p, li { white-space: pre-wrap; } 8 - + + Not enough controllers + + + + GameCube Controller Ovladač GameCube - + Poke Ball Plus - + NES Controller - + SNES Controller - + N64 Controller - + Sega Genesis diff --git a/dist/languages/da.ts b/dist/languages/da.ts index 96fa73cc07..da4816f5bb 100644 --- a/dist/languages/da.ts +++ b/dist/languages/da.ts @@ -373,13 +373,13 @@ Dette vil bandlyse både vedkommendes forum-brugernavn og IP-adresse.% - + Auto (%1) Auto select time zone - + Default (%1) Default time zone @@ -890,49 +890,29 @@ Dette vil bandlyse både vedkommendes forum-brugernavn og IP-adresse. - Create Minidump After Crash - Opret Minidump Efter Nedbrud - - - Enable this to output the latest generated audio command list to the console. Only affects games using the audio renderer. Aktivér dette, for at udgyde den senest genererede lyd-kommandoliste til konsollen. Påvirker kun spil, som gør brug af lyd-renderingen. - + Dump Audio Commands To Console** Dump Lydkommandoer Til Konsol** - + Enable Verbose Reporting Services** Aktivér Vitterlig Rapporteringstjeneste - + **This will be reset automatically when yuzu closes. **Dette vil automatisk blive nulstillet, når yuzu lukkes. - - Restart Required - Genstart Kræves - - - - yuzu is required to restart in order to apply this setting. - Yuzu kræver en genstart, for at anvende denne indstilling. - - - + Web applet not compiled Net-applet ikke kompileret - - - MiniDump creation not compiled - MiniDump oprettelse ikke kompileret - ConfigureDebugController @@ -1351,7 +1331,7 @@ Dette vil bandlyse både vedkommendes forum-brugernavn og IP-adresse. - + Conflicting Key Sequence Modstridende Tastesekvens @@ -1372,27 +1352,37 @@ Dette vil bandlyse både vedkommendes forum-brugernavn og IP-adresse. - + + Invalid hotkey settings + + + + + An error occurred. Please report this issue on github. + + + + Restore Default Gendan Standard - + Clear Ryd - + Conflicting Button Sequence - + The default button sequence is already assigned to: %1 - + The default key sequence is already assigned to: %1 Standard-tastesekvensen er allerede tilegnet: %1 @@ -3368,67 +3358,72 @@ Træk punkter, for at skifte position, eller dobbeltklik i tabelceller, for at r - + + Show Play Time Column + + + + Game Icon Size: Spil-Ikonstørrelse: - + Folder Icon Size: Mappe-Ikonstørrelse: - + Row 1 Text: Række 1-Tekst: - + Row 2 Text: Række 2-Tekst: - + Screenshots Skærmbilleder - + Ask Where To Save Screenshots (Windows Only) Spørg Hvor Skærmbilleder Skal Gemmes (Kun Windows) - + Screenshots Path: Skærmbilledsti: - + ... ... - + TextLabel - + Resolution: Opløsning: - + Select Screenshots Path... Vælg Skærmbilledsti... - + <System> <System> - + Auto (%1 x %2, %3 x %4) Screenshot width value @@ -3746,959 +3741,995 @@ Træk punkter, for at skifte position, eller dobbeltklik i tabelceller, for at r GMainWindow - + <a href='https://yuzu-emu.org/help/feature/telemetry/'>Anonymous data is collected</a> to help improve yuzu. <br/><br/>Would you like to share your usage data with us? <a href='https://yuzu-emu.org/help/feature/telemetry/'>Anonym data indsamles</a>, for at hjælp med, at forbedre yuzu. <br/><br/>Kunne du tænke dig, at dele dine brugsdata med os? - + Telemetry Telemetri - + Broken Vulkan Installation Detected - + Vulkan initialization failed during boot.<br><br>Click <a href='https://yuzu-emu.org/wiki/faq/#yuzu-starts-with-the-error-broken-vulkan-installation-detected'>here for instructions to fix the issue</a>. - + Running a game TRANSLATORS: This string is shown to the user to explain why yuzu needs to prevent the computer from sleeping - + Loading Web Applet... Indlæser Net-Applet... - - + + Disable Web Applet Deaktivér Net-Applet - + Disabling the web applet can lead to undefined behavior and should only be used with Super Mario 3D All-Stars. Are you sure you want to disable the web applet? (This can be re-enabled in the Debug settings.) - + The amount of shaders currently being built - + The current selected resolution scaling multiplier. - + Current emulation speed. Values higher or lower than 100% indicate emulation is running faster or slower than a Switch. Aktuel emuleringshastighed. Værdier højere eller lavere end 100% indikerer, at emulering kører hurtigere eller langsommere end en Switch. - + How many frames per second the game is currently displaying. This will vary from game to game and scene to scene. - + Time taken to emulate a Switch frame, not counting framelimiting or v-sync. For full-speed emulation this should be at most 16.67 ms. - + Unmute - + Mute - + Reset Volume - + &Clear Recent Files - + Emulated mouse is enabled - + Real mouse input and mouse panning are incompatible. Please disable the emulated mouse in input advanced settings to allow mouse panning. - + &Continue - + &Pause - + Warning Outdated Game Format Advarsel, Forældet Spilformat - + You are using the deconstructed ROM directory format for this game, which is an outdated format that has been superseded by others such as NCA, NAX, XCI, or NSP. Deconstructed ROM directories lack icons, metadata, and update support.<br><br>For an explanation of the various Switch formats yuzu supports, <a href='https://yuzu-emu.org/wiki/overview-of-switch-game-formats'>check out our wiki</a>. This message will not be shown again. - + Error while loading ROM! Fejl under indlæsning af ROM! - + The ROM format is not supported. ROM-formatet understøttes ikke. - + An error occurred initializing the video core. Der skete en fejl under initialisering af video-kerne. - + yuzu has encountered an error while running the video core. This is usually caused by outdated GPU drivers, including integrated ones. Please see the log for more details. For more information on accessing the log, please see the following page: <a href='https://yuzu-emu.org/help/reference/log-files/'>How to Upload the Log File</a>. - + Error while loading ROM! %1 %1 signifies a numeric error code. - + %1<br>Please follow <a href='https://yuzu-emu.org/help/quickstart/'>the yuzu quickstart guide</a> to redump your files.<br>You can refer to the yuzu wiki</a> or the yuzu Discord</a> for help. %1 signifies an error string. - + An unknown error occurred. Please see the log for more details. - + (64-bit) - + (32-bit) - + %1 %2 %1 is the title name. %2 indicates if the title is 64-bit or 32-bit - + Closing software... - + Save Data - + Mod Data - + Error Opening %1 Folder Fejl ved Åbning af %1 Mappe - - + + Folder does not exist! Mappe eksisterer ikke! - + Error Opening Transferable Shader Cache - + Failed to create the shader cache directory for this title. - + Error Removing Contents - + Error Removing Update - + Error Removing DLC - + Remove Installed Game Contents? - + Remove Installed Game Update? - + Remove Installed Game DLC? - + Remove Entry - - - - - - + + + + + + Successfully Removed - + Successfully removed the installed base game. - + The base game is not installed in the NAND and cannot be removed. - + Successfully removed the installed update. - + There is no update installed for this title. - + There are no DLC installed for this title. - + Successfully removed %1 installed DLC. - + Delete OpenGL Transferable Shader Cache? - + Delete Vulkan Transferable Shader Cache? - + Delete All Transferable Shader Caches? - + Remove Custom Game Configuration? - + Remove Cache Storage? - + Remove File - - + + Remove Play Time Data + + + + + Reset play time? + + + + + Error Removing Transferable Shader Cache - - + + A shader cache for this title does not exist. - + Successfully removed the transferable shader cache. - + Failed to remove the transferable shader cache. - + Error Removing Vulkan Driver Pipeline Cache - + Failed to remove the driver pipeline cache. - - + + Error Removing Transferable Shader Caches - + Successfully removed the transferable shader caches. - + Failed to remove the transferable shader cache directory. - - + + Error Removing Custom Configuration - + A custom configuration for this title does not exist. - + Successfully removed the custom game configuration. - + Failed to remove the custom game configuration. - - + + RomFS Extraction Failed! RomFS-Udpakning Mislykkedes! - + There was an error copying the RomFS files or the user cancelled the operation. Der skete en fejl ved kopiering af RomFS-filerne, eller brugeren afbrød opgaven. - + Full Fuld - + Skeleton Skelet - + Select RomFS Dump Mode Vælg RomFS-Nedfældelsestilstand - + Please select the how you would like the RomFS dumped.<br>Full will copy all of the files into the new directory while <br>skeleton will only create the directory structure. - + There is not enough free space at %1 to extract the RomFS. Please free up space or select a different dump directory at Emulation > Configure > System > Filesystem > Dump Root - + Extracting RomFS... Udpakker RomFS... - - - - + + + + Cancel Afbryd - + RomFS Extraction Succeeded! RomFS-Udpakning Lykkedes! - - - + + + The operation completed successfully. Fuldførelse af opgaven lykkedes. - + Integrity verification couldn't be performed! - + File contents were not checked for validity. - - + + Integrity verification failed! - + File contents may be corrupt. - - + + Verifying integrity... - - + + Integrity verification succeeded! - - - - - + + + + Create Shortcut - + This will create a shortcut to the current AppImage. This may not work well if you update. Continue? - - Cannot create shortcut on desktop. Path "%1" does not exist. + + Cannot create shortcut. Path "%1" does not exist. - - Cannot create shortcut in applications menu. Path "%1" does not exist and cannot be created. - - - - + Create Icon - + Cannot create icon file. Path "%1" does not exist and cannot be created. - + Start %1 with the yuzu Emulator - + Failed to create a shortcut at %1 - + Successfully created a shortcut to %1 - + Error Opening %1 Fejl ved Åbning af %1 - + Select Directory Vælg Mappe - + Properties Egenskaber - + The game properties could not be loaded. Spil-egenskaberne kunne ikke indlæses. - + Switch Executable (%1);;All Files (*.*) %1 is an identifier for the Switch executable file extensions. Switch-Eksekverbar (%1);;Alle filer (*.*) - + Load File Indlæs Fil - + Open Extracted ROM Directory Åbn Udpakket ROM-Mappe - + Invalid Directory Selected Ugyldig Mappe Valgt - + The directory you have selected does not contain a 'main' file. - + Installable Switch File (*.nca *.nsp *.xci);;Nintendo Content Archive (*.nca);;Nintendo Submission Package (*.nsp);;NX Cartridge Image (*.xci) - + Install Files - + %n file(s) remaining - + Installing file "%1"... Installér fil "%1"... - - + + Install Results - + To avoid possible conflicts, we discourage users from installing base games to the NAND. Please, only use this feature to install updates and DLC. - + %n file(s) were newly installed - + %n file(s) were overwritten - + %n file(s) failed to install - + System Application Systemapplikation - + System Archive Systemarkiv - + System Application Update Systemapplikationsopdatering - + Firmware Package (Type A) Firmwarepakke (Type A) - + Firmware Package (Type B) Firmwarepakke (Type B) - + Game Spil - + Game Update Spilopdatering - + Game DLC Spiludvidelse - + Delta Title Delta-Titel - + Select NCA Install Type... Vælg NCA-Installationstype... - + Please select the type of title you would like to install this NCA as: (In most instances, the default 'Game' is fine.) - + Failed to Install Installation mislykkedes - + The title type you selected for the NCA is invalid. - + File not found Fil ikke fundet - + File "%1" not found Fil "%1" ikke fundet - + OK OK - - + + Hardware requirements not met - - + + Your system does not meet the recommended hardware requirements. Compatibility reporting has been disabled. - + Missing yuzu Account Manglende yuzu-Konto - + In order to submit a game compatibility test case, you must link your yuzu account.<br><br/>To link your yuzu account, go to Emulation &gt; Configuration &gt; Web. - + Error opening URL - + Unable to open the URL "%1". - + TAS Recording - + Overwrite file of player 1? - + Invalid config detected - + Handheld controller can't be used on docked mode. Pro controller will be selected. - - + + Amiibo - - + + The current amiibo has been removed - + Error - - + + The current game is not looking for amiibos - + Amiibo File (%1);; All Files (*.*) Amiibo-Fil (%1);; Alle Filer (*.*) - + Load Amiibo Indlæs Amiibo - + Error loading Amiibo data Fejl ved indlæsning af Amiibo-data - + The selected file is not a valid amiibo - + The selected file is already on use - + An unknown error occurred - + Verification failed for the following files: %1 - + + + No firmware available - + + Please install the firmware to use the Album applet. + + + + + Album Applet + + + + + Album applet is not available. Please reinstall firmware. + + + + + Please install the firmware to use the Cabinet applet. + + + + + Cabinet Applet + + + + + Cabinet applet is not available. Please reinstall firmware. + + + + Please install the firmware to use the Mii editor. - + Mii Edit Applet - + Mii editor is not available. Please reinstall firmware. - + Capture Screenshot Optag Skærmbillede - + PNG Image (*.png) PNG-Billede (*.png) - + TAS state: Running %1/%2 - + TAS state: Recording %1 - + TAS state: Idle %1/%2 - + TAS State: Invalid - + &Stop Running - + &Start - + Stop R&ecording - + R&ecord - + Building: %n shader(s) - + Scale: %1x %1 is the resolution scaling factor - + Speed: %1% / %2% Hastighed: %1% / %2% - + Speed: %1% Hastighed: %1% - + Game: %1 FPS (Unlocked) - + Game: %1 FPS Spil: %1 FPS - + Frame: %1 ms Billede: %1 ms - + %1 %2 - + FSR - + NO AA - + VOLUME: MUTE - + VOLUME: %1% Volume percentage (e.g. 50%) - + Confirm Key Rederivation - + You are about to force rederive all of your keys. If you do not know what this means or what you are doing, this is a potentially destructive action. @@ -4709,86 +4740,86 @@ This will delete your autogenerated key files and re-run the key derivation modu - + Missing fuses - + - Missing BOOT0 - + - Missing BCPKG2-1-Normal-Main - + - Missing PRODINFO - + Derivation Components Missing - + Encryption keys are missing. <br>Please follow <a href='https://yuzu-emu.org/help/quickstart/'>the yuzu quickstart guide</a> to get all your keys, firmware and games.<br><br><small>(%1)</small> - + Deriving keys... This may take up to a minute depending on your system's performance. - + Deriving Keys - + System Archive Decryption Failed - + Encryption keys failed to decrypt firmware. <br>Please follow <a href='https://yuzu-emu.org/help/quickstart/'>the yuzu quickstart guide</a> to get all your keys, firmware and games. - + Select RomFS Dump Target - + Please select which RomFS you would like to dump. - + Are you sure you want to close yuzu? Er du sikker på, at du vil lukke yuzu? - - - + + + yuzu yuzu - + Are you sure you want to stop the emulation? Any unsaved progress will be lost. Er du sikker på, at du vil stoppe emulereingen? Enhver ulagret data, vil gå tabt. - + The currently running application has requested yuzu to not exit. Would you like to bypass this and exit anyway? @@ -4938,241 +4969,251 @@ Would you like to bypass this and exit anyway? GameList - + Favorite - + Start Game - + Start Game without Custom Configuration - + Open Save Data Location Åbn Gemt Data-Placering - + Open Mod Data Location Åbn Mod-Data-Placering - + Open Transferable Pipeline Cache - + Remove Fjern - + Remove Installed Update - + Remove All Installed DLC - + Remove Custom Configuration - + + Remove Play Time Data + + + + Remove Cache Storage - + Remove OpenGL Pipeline Cache - + Remove Vulkan Pipeline Cache - + Remove All Pipeline Caches - + Remove All Installed Contents - - + + Dump RomFS - + Dump RomFS to SDMC - + Verify Integrity - + Copy Title ID to Clipboard Kopiér Titel-ID til Udklipsholder - + Navigate to GameDB entry - + Create Shortcut - + Add to Desktop - + Add to Applications Menu - + Properties Egenskaber - + Scan Subfolders - + Remove Game Directory - + ▲ Move Up - + ▼ Move Down - + Open Directory Location - + Clear Ryd - + Name Navn - + Compatibility Kompatibilitet - + Add-ons Tilføjelser - + File type Filtype - + Size Størrelse + + + Play time + + GameListItemCompat - + Ingame - + Game starts, but crashes or major glitches prevent it from being completed. - + Perfect Perfekt - + Game can be played without issues. - + Playable - + Game functions with minor graphical or audio glitches and is playable from start to finish. - + Intro/Menu Intro/Menu - + Game loads, but is unable to progress past the Start Screen. - + Won't Boot Starter Ikke Op - + The game crashes when attempting to startup. - + Not Tested Ikke Afprøvet - + The game has not yet been tested. Spillet er endnu ikke blevet afprøvet. @@ -5180,7 +5221,7 @@ Would you like to bypass this and exit anyway? GameListPlaceholder - + Double-click to add a new folder to the game list @@ -5193,12 +5234,12 @@ Would you like to bypass this and exit anyway? - + Filter: Filter: - + Enter pattern to filter @@ -5315,6 +5356,7 @@ Debug Message: + Main Window @@ -5420,6 +5462,11 @@ Debug Message: + Toggle Renderdoc Capture + + + + Toggle Status Bar @@ -5657,186 +5704,216 @@ Debug Message: + &Amiibo + + + + &TAS - + &Help &Hjælp - + &Install Files to NAND... - + L&oad File... - + Load &Folder... - + E&xit - + &Pause - + &Stop - + &Reinitialize keys... - + &Verify Installed Contents - + &About yuzu - + Single &Window Mode - + Con&figure... - + Display D&ock Widget Headers - + Show &Filter Bar - + Show &Status Bar - + Show Status Bar Vis Statuslinje - + &Browse Public Game Lobby - + &Create Room - + &Leave Room - + &Direct Connect to Room - + &Show Current Room - + F&ullscreen - + &Restart - + Load/Remove &Amiibo... - + &Report Compatibility - + Open &Mods Page - + Open &Quickstart Guide - + &FAQ - + Open &yuzu Folder - + &Capture Screenshot - - Open &Mii Editor - - - - - &Configure TAS... + + Open &Album + &Set Nickname and Owner + + + + + &Delete Game Data + + + + + &Restore Amiibo + + + + + &Format Amiibo + + + + + Open &Mii Editor + + + + + &Configure TAS... + + + + Configure C&urrent Game... - + &Start - + &Reset - + R&ecord @@ -6136,27 +6213,27 @@ p, li { white-space: pre-wrap; } - + Installed SD Titles Installerede SD-Titler - + Installed NAND Titles Installerede NAND-Titler - + System Titles Systemtitler - + Add New Game Directory Tilføj Ny Spilmappe - + Favorites @@ -6682,7 +6759,7 @@ p, li { white-space: pre-wrap; } - + Pro Controller Pro-Styringsenhed @@ -6695,7 +6772,7 @@ p, li { white-space: pre-wrap; } - + Dual Joycons Dobbelt-Joycon @@ -6708,7 +6785,7 @@ p, li { white-space: pre-wrap; } - + Left Joycon Venstre Joycon @@ -6721,7 +6798,7 @@ p, li { white-space: pre-wrap; } - + Right Joycon Højre Joycon @@ -6750,7 +6827,7 @@ p, li { white-space: pre-wrap; } - + Handheld Håndholdt @@ -6866,32 +6943,37 @@ p, li { white-space: pre-wrap; } 8 - + + Not enough controllers + + + + GameCube Controller GameCube-Styringsenhed - + Poke Ball Plus - + NES Controller - + SNES Controller - + N64 Controller - + Sega Genesis diff --git a/dist/languages/de.ts b/dist/languages/de.ts index 263c111582..e11d96da61 100644 --- a/dist/languages/de.ts +++ b/dist/languages/de.ts @@ -372,16 +372,16 @@ Dies würde deren Forum Benutzernamen und deren IP-Adresse sperren.% - + Auto (%1) Auto select time zone - + Automatisch (%1) - + Default (%1) Default time zone - + Standard (%1) @@ -756,7 +756,7 @@ Dies würde deren Forum Benutzernamen und deren IP-Adresse sperren. Disable Loop safety checks - + Loop-safety-checks deaktivieren @@ -831,7 +831,7 @@ Dies würde deren Forum Benutzernamen und deren IP-Adresse sperren. Enable Renderdoc Hotkey - + Renderdoc-Hotkey aktivieren @@ -890,49 +890,29 @@ Dies würde deren Forum Benutzernamen und deren IP-Adresse sperren. - Create Minidump After Crash - Minidump nach Absturz erstellen - - - Enable this to output the latest generated audio command list to the console. Only affects games using the audio renderer. Aktivieren Sie diese Option, um den zuletzt generierten Audio-Log auf der Konsole auszugeben. Betrifft nur Spiele, die den Audio-Renderer verwenden. - + Dump Audio Commands To Console** Audio-Befehle auf die Konsole als Dump abspeichern** - + Enable Verbose Reporting Services** Ausführliche Berichtsdienste aktivieren** - + **This will be reset automatically when yuzu closes. **Dies wird automatisch beim Schließen von yuzu zurückgesetzt. - - Restart Required - Neustart erforderlich - - - - yuzu is required to restart in order to apply this setting. - yuzu muss neugestartet werden, damit diese Einstellungen übernommen werden können. - - - + Web applet not compiled Web-Applet nicht kompiliert - - - MiniDump creation not compiled - MiniDump-Erstellung nicht kompiliert - ConfigureDebugController @@ -1351,7 +1331,7 @@ Dies würde deren Forum Benutzernamen und deren IP-Adresse sperren. - + Conflicting Key Sequence Tastensequenz bereits belegt @@ -1372,27 +1352,37 @@ Dies würde deren Forum Benutzernamen und deren IP-Adresse sperren.Ungültig - + + Invalid hotkey settings + Ungültige Hotkey-Einstellungen + + + + An error occurred. Please report this issue on github. + + + + Restore Default Standardwerte wiederherstellen - + Clear Löschen - + Conflicting Button Sequence Widersprüchliche Tastenfolge - + The default button sequence is already assigned to: %1 Die Standard Tastenfolge ist bereits belegt von: %1 - + The default key sequence is already assigned to: %1 Die Standard-Sequenz ist bereits vergeben an: %1 @@ -1678,7 +1668,7 @@ Dies würde deren Forum Benutzernamen und deren IP-Adresse sperren. Debug Controller - Debug Controller + Debug-Controller @@ -2068,7 +2058,7 @@ Dies würde deren Forum Benutzernamen und deren IP-Adresse sperren. Mouse panning - + Maus-Panning @@ -2366,7 +2356,7 @@ Um die Achsen umzukehren, bewege den Joystick zuerst vertikal und dann horizonta Touch from button profile: - + Berührung des Button-Profils: @@ -2505,7 +2495,7 @@ Um die Achsen umzukehren, bewege den Joystick zuerst vertikal und dann horizonta Can be toggled via a hotkey. Default hotkey is Ctrl + F9 - + Kann mit einem Hotkey umgeschaltet werden. Standard-Hotkey ist STRG + F9 @@ -2539,17 +2529,17 @@ Um die Achsen umzukehren, bewege den Joystick zuerst vertikal und dann horizonta Counteracts a game's built-in deadzone - + Überschreibt spieleigene Deadzone Deadzone - + Deadzone Stick decay - + Stick Abklingzeit @@ -2570,7 +2560,8 @@ Um die Achsen umzukehren, bewege den Joystick zuerst vertikal und dann horizonta Mouse panning works better with a deadzone of 0% and a range of 100%. Current values are %1% and %2% respectively. - + Das Bewegen der Maus funktioniert mit einer Deadzone zwischen 0% und 100% besser. +Aktuell liegen die Werte bei %1% bzw. %2%. @@ -2889,7 +2880,8 @@ Current values are %1% and %2% respectively. Name: %1 UUID: %2 - + Name: %1 +UUID: %2 @@ -2902,7 +2894,7 @@ UUID: %2 To use Ring-Con, configure player 1 as right Joy-Con (both physical and emulated), and player 2 as left Joy-Con (left physical and dual emulated) before starting the game. - + Um einen Ring-Con zu nutzen, konfiguriere Spieler 1 als rechten Joy-Con (als Eingabegerät und emulierter Controller), und Spieler 2 als linken Joy-Con (linker Joy-Con als Eingabegerät und als zwei Joy-Cons emuliert) vor dem Starten des Spieles. @@ -3002,7 +2994,7 @@ UUID: %2 The current mapped device doesn't have a ring attached - + Das aktuell genutzte Gerät ist nicht mit dem Ring-Con verbunden @@ -3036,7 +3028,7 @@ UUID: %2 Core - + Kern @@ -3084,7 +3076,7 @@ UUID: %2 Pause execution during loads - + Pausiere Ausführung während des Ladens @@ -3360,78 +3352,83 @@ Ziehe die Punkte mit deiner Maus, um ihre Position zu ändern. Doppelklicke auf Show Size Column - + "Größe"-Spalte anzeigen Show File Types Column - + "Dateityp"-Spalte anzeigen - + + Show Play Time Column + "Spielzeit"-Spalte anzeigen + + + Game Icon Size: Spiel-Icon Größe: - + Folder Icon Size: Ordner-Icon Größe: - + Row 1 Text: Zeile 1 Text: - + Row 2 Text: Zeile 2 Text: - + Screenshots Screenshots - + Ask Where To Save Screenshots (Windows Only) Frage nach, wo Screenshots gespeichert werden sollen (Nur Windows) - + Screenshots Path: Screenshotpfad - + ... ... - + TextLabel - + TextLabel - + Resolution: Auflösung: - + Select Screenshots Path... Screenshotpfad auswählen... - + <System> <System> - + Auto (%1 x %2, %3 x %4) Screenshot width value - + Auto (%1 x %2, %3 x %4) @@ -3565,7 +3562,7 @@ Ziehe die Punkte mit deiner Maus, um ihre Position zu ändern. Doppelklicke auf Web Service configuration can only be changed when a public room isn't being hosted. - + Die Konfiguration des Webservice kann nur geändert werden, wenn kein öffentlicher Raum gehostet wird. @@ -3643,7 +3640,7 @@ Ziehe die Punkte mit deiner Maus, um ihre Position zu ändern. Doppelklicke auf Unverified, please click Verify before saving configuration Tooltip - + Nicht verifiziert, vor dem Speichern Verifizieren wählen @@ -3712,7 +3709,7 @@ Ziehe die Punkte mit deiner Maus, um ihre Position zu ändern. Doppelklicke auf <html><head/><body><p>Port number the host is listening on</p></body></html> - + <html><head/><body><p>Port, welcher vom Host zum Empfangen verwendet wird</p></body></html> @@ -3746,613 +3743,618 @@ Ziehe die Punkte mit deiner Maus, um ihre Position zu ändern. Doppelklicke auf GMainWindow - + <a href='https://yuzu-emu.org/help/feature/telemetry/'>Anonymous data is collected</a> to help improve yuzu. <br/><br/>Would you like to share your usage data with us? <a href='https://yuzu-emu.org/help/feature/telemetry/'>Anonyme Daten werden gesammelt,</a> um yuzu zu verbessern.<br/><br/>Möchstest du deine Nutzungsdaten mit uns teilen? - + Telemetry Telemetrie - + Broken Vulkan Installation Detected Defekte Vulkan-Installation erkannt - + Vulkan initialization failed during boot.<br><br>Click <a href='https://yuzu-emu.org/wiki/faq/#yuzu-starts-with-the-error-broken-vulkan-installation-detected'>here for instructions to fix the issue</a>. Vulkan Initialisierung fehlgeschlagen.<br><br>Klicken Sie auf <a href='https://yuzu-emu.org/wiki/faq/#yuzu-starts-with-the-error-broken-vulkan-installation-detected'>für Instruktionen zur Problembehebung.</a>. - + Running a game TRANSLATORS: This string is shown to the user to explain why yuzu needs to prevent the computer from sleeping - + Spiel wird ausgeführt - + Loading Web Applet... Lade Web-Applet... - - + + Disable Web Applet Deaktiviere die Web Applikation - + Disabling the web applet can lead to undefined behavior and should only be used with Super Mario 3D All-Stars. Are you sure you want to disable the web applet? (This can be re-enabled in the Debug settings.) - + Deaktivieren des Web-Applets kann zu undefiniertem Verhalten führen, und sollte nur mit Super Mario 3D All-Stars benutzt werden. Bist du sicher, dass du das Web-Applet deaktivieren möchtest? +(Dies kann in den Debug-Einstellungen wieder aktiviert werden.) - + The amount of shaders currently being built Wie viele Shader im Moment kompiliert werden - + The current selected resolution scaling multiplier. Der momentan ausgewählte Auflösungsskalierung Multiplikator. - + Current emulation speed. Values higher or lower than 100% indicate emulation is running faster or slower than a Switch. Derzeitige Emulations-Geschwindigkeit. Werte höher oder niedriger als 100% zeigen, dass die Emulation scheller oder langsamer läuft als auf einer Switch. - + How many frames per second the game is currently displaying. This will vary from game to game and scene to scene. Wie viele Bilder pro Sekunde angezeigt werden variiert von Spiel zu Spiel und von Szene zu Szene. - + Time taken to emulate a Switch frame, not counting framelimiting or v-sync. For full-speed emulation this should be at most 16.67 ms. Zeit, die gebraucht wurde, um einen Switch-Frame zu emulieren, ohne Framelimit oder V-Sync. Für eine Emulation bei voller Geschwindigkeit sollte dieser Wert bei höchstens 16.67ms liegen. - + Unmute Ton aktivieren - + Mute Stummschalten - + Reset Volume Ton zurücksetzen - + &Clear Recent Files &Zuletzt geladene Dateien leeren - + Emulated mouse is enabled Emulierte Maus ist aktiviert - + Real mouse input and mouse panning are incompatible. Please disable the emulated mouse in input advanced settings to allow mouse panning. Echte Mauseingabe und Mausschwenken sind nicht kompatibel. Bitte deaktivieren Sie die emulierte Maus in den erweiterten Eingabeeinstellungen, um das Schwenken der Maus zu ermöglichen. - + &Continue &Fortsetzen - + &Pause &Pause - + Warning Outdated Game Format Warnung veraltetes Spielformat - + You are using the deconstructed ROM directory format for this game, which is an outdated format that has been superseded by others such as NCA, NAX, XCI, or NSP. Deconstructed ROM directories lack icons, metadata, and update support.<br><br>For an explanation of the various Switch formats yuzu supports, <a href='https://yuzu-emu.org/wiki/overview-of-switch-game-formats'>check out our wiki</a>. This message will not be shown again. Du nutzt eine entpackte ROM-Ordnerstruktur für dieses Spiel, welches ein veraltetes Format ist und von anderen Formaten wie NCA, NAX, XCI oder NSP überholt wurde. Entpackte ROM-Ordner unterstützen keine Icons, Metadaten oder Updates.<br><br><a href='https://yuzu-emu.org/wiki/overview-of-switch-game-formats'>Unser Wiki</a> enthält eine Erklärung der verschiedenen Formate, die yuzu unterstützt. Diese Nachricht wird nicht noch einmal angezeigt. - + Error while loading ROM! ROM konnte nicht geladen werden! - + The ROM format is not supported. ROM-Format wird nicht unterstützt. - + An error occurred initializing the video core. Beim Initialisieren des Video-Kerns ist ein Fehler aufgetreten. - + yuzu has encountered an error while running the video core. This is usually caused by outdated GPU drivers, including integrated ones. Please see the log for more details. For more information on accessing the log, please see the following page: <a href='https://yuzu-emu.org/help/reference/log-files/'>How to Upload the Log File</a>. Yuzu ist auf einen Fehler gestoßen beim Ausführen des Videokerns. Dies ist in der Regel auf veraltete GPU Treiber zurückzuführen, integrierte GPUs eingeschlossen. Bitte öffnen Sie die Log Datei für weitere Informationen. Für weitere Informationen wie Sie auf die Log Datei zugreifen, öffnen Sie bitte die folgende Seite: <a href='https://yuzu-emu.org/help/reference/log-files/'>Wie wird eine Log Datei hochgeladen?</a>. - + Error while loading ROM! %1 %1 signifies a numeric error code. ROM konnte nicht geladen werden! %1 - + %1<br>Please follow <a href='https://yuzu-emu.org/help/quickstart/'>the yuzu quickstart guide</a> to redump your files.<br>You can refer to the yuzu wiki</a> or the yuzu Discord</a> for help. %1 signifies an error string. %1<br>Bitte folge der <a href='https://yuzu-emu.org/help/quickstart/'>yuzu-Schnellstart-Anleitung</a> um deine Dateien zu extrahieren.<br>Hilfe findest du im yuzu-Wiki</a> oder dem yuzu-Discord</a>. - + An unknown error occurred. Please see the log for more details. Ein unbekannter Fehler ist aufgetreten. Bitte prüfe die Log-Dateien auf mögliche Fehlermeldungen. - + (64-bit) (64-Bit) - + (32-bit) (32-Bit) - + %1 %2 %1 is the title name. %2 indicates if the title is 64-bit or 32-bit %1 %2 - + Closing software... Schließe Software... - + Save Data Speicherdaten - + Mod Data Mod-Daten - + Error Opening %1 Folder Konnte Verzeichnis %1 nicht öffnen - - + + Folder does not exist! Verzeichnis existiert nicht! - + Error Opening Transferable Shader Cache Fehler beim Öffnen des transferierbaren Shader-Caches - + Failed to create the shader cache directory for this title. Fehler beim erstellen des Shader-Cache-Ordner für den ausgewählten Titel. - + Error Removing Contents Fehler beim Entfernen des Inhalts - + Error Removing Update Fehler beim Entfernen des Updates - + Error Removing DLC Fehler beim Entfernen des DLCs - + Remove Installed Game Contents? Installierten Spiele-Content entfernen? - + Remove Installed Game Update? Installierte Spiele-Updates entfernen? - + Remove Installed Game DLC? Installierte Spiele-DLCs entfernen? - + Remove Entry Eintrag entfernen - - - - - - + + + + + + Successfully Removed Erfolgreich entfernt - + Successfully removed the installed base game. Das Spiel wurde entfernt. - + The base game is not installed in the NAND and cannot be removed. Das Spiel ist nicht im NAND installiert und kann somit nicht entfernt werden. - + Successfully removed the installed update. Das Update wurde entfernt. - + There is no update installed for this title. Es ist kein Update für diesen Titel installiert. - + There are no DLC installed for this title. Es sind keine DLC für diesen Titel installiert. - + Successfully removed %1 installed DLC. %1 DLC entfernt. - + Delete OpenGL Transferable Shader Cache? Transferierbaren OpenGL Shader Cache löschen? - + Delete Vulkan Transferable Shader Cache? Transferierbaren Vulkan Shader Cache löschen? - + Delete All Transferable Shader Caches? Alle transferierbaren Shader Caches löschen? - + Remove Custom Game Configuration? Spiel-Einstellungen entfernen? - + Remove Cache Storage? Cache-Speicher entfernen? - + Remove File Datei entfernen - - + + Remove Play Time Data + Spielzeit-Daten enfernen + + + + Reset play time? + Spielzeit zurücksetzen? + + + + Error Removing Transferable Shader Cache Fehler beim Entfernen - - + + A shader cache for this title does not exist. Es existiert kein Shader-Cache für diesen Titel. - + Successfully removed the transferable shader cache. Der transferierbare Shader-Cache wurde entfernt. - + Failed to remove the transferable shader cache. Konnte den transferierbaren Shader-Cache nicht entfernen. - + Error Removing Vulkan Driver Pipeline Cache Fehler beim Entfernen des Vulkan-Pipeline-Cache - + Failed to remove the driver pipeline cache. Fehler beim Entfernen des Driver-Pipeline-Cache - - + + Error Removing Transferable Shader Caches Fehler beim Entfernen der transferierbaren Shader Caches - + Successfully removed the transferable shader caches. Die übertragbaren Shader-Caches wurden erfolgreich entfernt. - + Failed to remove the transferable shader cache directory. - + Entfernen des transferierbaren Shader-Cache-Verzeichnisses fehlgeschlagen. - - + + Error Removing Custom Configuration Fehler beim Entfernen - + A custom configuration for this title does not exist. Es existieren keine Spiel-Einstellungen für dieses Spiel. - + Successfully removed the custom game configuration. Die Spiel-Einstellungen wurden entfernt. - + Failed to remove the custom game configuration. Die Spiel-Einstellungen konnten nicht entfernt werden. - - + + RomFS Extraction Failed! RomFS-Extraktion fehlgeschlagen! - + There was an error copying the RomFS files or the user cancelled the operation. Das RomFS konnte wegen eines Fehlers oder Abbruchs nicht kopiert werden. - + Full Komplett - + Skeleton Nur Ordnerstruktur - + Select RomFS Dump Mode RomFS Extraktions-Modus auswählen - + Please select the how you would like the RomFS dumped.<br>Full will copy all of the files into the new directory while <br>skeleton will only create the directory structure. Bitte wähle, wie das RomFS gespeichert werden soll.<br>"Full" wird alle Dateien des Spiels extrahieren, während <br>"Skeleton" nur die Ordnerstruktur erstellt. - + There is not enough free space at %1 to extract the RomFS. Please free up space or select a different dump directory at Emulation > Configure > System > Filesystem > Dump Root Es ist nicht genügend Speicher (%1) vorhanden um das RomFS zu entpacken. Bitte sorge für genügend Speicherplatze oder wähle ein anderes Verzeichnis aus. (Emulation > Konfiguration > System > Dateisystem > Dump Root) - + Extracting RomFS... RomFS wird extrahiert... - - - - + + + + Cancel Abbrechen - + RomFS Extraction Succeeded! RomFS wurde extrahiert! - - - + + + The operation completed successfully. Der Vorgang wurde erfolgreich abgeschlossen. - + Integrity verification couldn't be performed! - + Integritätsüberprüfung konnte nicht durchgeführt werden! - + File contents were not checked for validity. - + Datei-Inhalte wurden nicht auf Gültigkeit überprüft. - - + + Integrity verification failed! - + Integritätsüberprüfung fehlgeschlagen! - + File contents may be corrupt. - + Datei-Inhalte könnten defekt sein. - - + + Verifying integrity... - + Überprüfe Integrität… - - + + Integrity verification succeeded! - + Integritätsüberprüfung erfolgreich! - - - - - + + + + Create Shortcut Verknüpfung erstellen - + This will create a shortcut to the current AppImage. This may not work well if you update. Continue? - + Dies wird eine Verknüpfung zum aktuellen AppImage erstellen. Dies könnte nicht gut funktionieren falls du aktualisierst. Fortfahren? - - Cannot create shortcut on desktop. Path "%1" does not exist. - + + Cannot create shortcut. Path "%1" does not exist. + Verknüpfung kann nicht erstellt werden. Pfad "%1" existiert nicht. - - Cannot create shortcut in applications menu. Path "%1" does not exist and cannot be created. - - - - + Create Icon Icon erstellen - + Cannot create icon file. Path "%1" does not exist and cannot be created. Symboldatei konnte nicht erstellt werden. Der Pfad "%1" existiert nicht oder kann nicht erstellt werden. - + Start %1 with the yuzu Emulator - + Starte %1 mit dem yuzu Emulator - + Failed to create a shortcut at %1 Verknüpfung konnte nicht unter %1 erstellt werden. - + Successfully created a shortcut to %1 Verknüpfung wurde erfolgreich erstellt unter %1 - + Error Opening %1 Fehler beim Öffnen von %1 - + Select Directory Verzeichnis auswählen - + Properties Einstellungen - + The game properties could not be loaded. Spiel-Einstellungen konnten nicht geladen werden. - + Switch Executable (%1);;All Files (*.*) %1 is an identifier for the Switch executable file extensions. Switch-Programme (%1);;Alle Dateien (*.*) - + Load File Datei laden - + Open Extracted ROM Directory Öffne das extrahierte ROM-Verzeichnis - + Invalid Directory Selected Ungültiges Verzeichnis ausgewählt - + The directory you have selected does not contain a 'main' file. Das Verzeichnis, das du ausgewählt hast, enthält keine 'main'-Datei. - + Installable Switch File (*.nca *.nsp *.xci);;Nintendo Content Archive (*.nca);;Nintendo Submission Package (*.nsp);;NX Cartridge Image (*.xci) Installierbares Switch-Programm (*.nca *.nsp *.xci);;Nintendo Content Archive (*.nca);;Nintendo Submissions Package (*.nsp);;NX Cartridge Image (*.xci) - + Install Files Dateien installieren - + %n file(s) remaining %n Datei verbleibend%n Dateien verbleibend - + Installing file "%1"... Datei "%1" wird installiert... - - + + Install Results NAND-Installation - + To avoid possible conflicts, we discourage users from installing base games to the NAND. Please, only use this feature to install updates and DLC. Um Konflikte zu vermeiden, raten wir Nutzern davon ab, Spiele im NAND zu installieren. Bitte nutze diese Funktion nur zum Installieren von Updates und DLC. - + %n file(s) were newly installed %n file was newly installed @@ -4360,351 +4362,389 @@ Bitte nutze diese Funktion nur zum Installieren von Updates und DLC. - + %n file(s) were overwritten - + %n Datei wurde überschrieben +%n Dateien wurden überschrieben + - + %n file(s) failed to install - + %n Datei konnte nicht installiert werden +%n Dateien konnten nicht installiert werden + - + System Application Systemanwendung - + System Archive Systemarchiv - + System Application Update Systemanwendungsupdate - + Firmware Package (Type A) Firmware-Paket (Typ A) - + Firmware Package (Type B) Firmware-Paket (Typ B) - + Game Spiel - + Game Update Spiel-Update - + Game DLC Spiel-DLC - + Delta Title Delta-Titel - + Select NCA Install Type... Wähle den NCA-Installationstyp aus... - + Please select the type of title you would like to install this NCA as: (In most instances, the default 'Game' is fine.) Bitte wähle, als was diese NCA installiert werden soll: (In den meisten Fällen sollte die Standardeinstellung 'Spiel' ausreichen.) - + Failed to Install Installation fehlgeschlagen - + The title type you selected for the NCA is invalid. Der Titel-Typ, den du für diese NCA ausgewählt hast, ist ungültig. - + File not found Datei nicht gefunden - + File "%1" not found Datei "%1" nicht gefunden - + OK OK - - + + Hardware requirements not met Hardwareanforderungen nicht erfüllt - - + + Your system does not meet the recommended hardware requirements. Compatibility reporting has been disabled. Dein System erfüllt nicht die empfohlenen Mindestanforderungen der Hardware. Meldung der Komptabilität wurde deaktiviert. - + Missing yuzu Account Fehlender yuzu-Account - + In order to submit a game compatibility test case, you must link your yuzu account.<br><br/>To link your yuzu account, go to Emulation &gt; Configuration &gt; Web. Um einen Kompatibilitätsbericht abzuschicken, musst du einen yuzu-Account mit yuzu verbinden.<br><br/>Um einen yuzu-Account zu verbinden, prüfe die Einstellungen unter Emulation &gt; Konfiguration &gt; Web. - + Error opening URL Fehler beim Öffnen der URL - + Unable to open the URL "%1". URL "%1" kann nicht geöffnet werden. - + TAS Recording TAS Aufnahme - + Overwrite file of player 1? Datei von Spieler 1 überschreiben? - + Invalid config detected Ungültige Konfiguration erkannt - + Handheld controller can't be used on docked mode. Pro controller will be selected. Handheld-Controller können nicht im Dock verwendet werden. Der Pro-Controller wird verwendet. - - + + Amiibo Amiibo - - + + The current amiibo has been removed Das aktuelle Amiibo wurde entfernt - + Error Fehler - - + + The current game is not looking for amiibos Das aktuelle Spiel sucht nicht nach Amiibos - + Amiibo File (%1);; All Files (*.*) Amiibo-Datei (%1);; Alle Dateien (*.*) - + Load Amiibo Amiibo laden - + Error loading Amiibo data Fehler beim Laden der Amiibo-Daten - + The selected file is not a valid amiibo Die ausgewählte Datei ist keine gültige Amiibo - + The selected file is already on use Die ausgewählte Datei wird bereits verwendet - + An unknown error occurred Ein unbekannter Fehler ist aufgetreten - + Verification failed for the following files: %1 - + Überprüfung für die folgenden Dateien ist fehlgeschlagen: + +%1 - + + + No firmware available - + Keine Firmware verfügbar - + + Please install the firmware to use the Album applet. + Bitte installiere die Firmware um das Album-Applet zu nutzen. + + + + Album Applet + Album-Applet + + + + Album applet is not available. Please reinstall firmware. + Album-Applet ist nicht verfügbar. Bitte Firmware erneut installieren. + + + + Please install the firmware to use the Cabinet applet. + Bitte installiere die Firmware um das Cabinet-Applet zu nutzen. + + + + Cabinet Applet + Cabinet-Applet + + + + Cabinet applet is not available. Please reinstall firmware. + Cabinet-Applet ist nicht verfügbar. Bitte Firmware erneut installieren. + + + Please install the firmware to use the Mii editor. - + Bitte installiere die Firmware um den Mii-Editor zu nutzen. - + Mii Edit Applet - + Mii-Edit-Applet - + Mii editor is not available. Please reinstall firmware. - + Mii-Editor ist nicht verfügbar. Bitte Firmware erneut installieren. - + Capture Screenshot Screenshot aufnehmen - + PNG Image (*.png) PNG Bild (*.png) - + TAS state: Running %1/%2 TAS Zustand: Läuft %1/%2 - + TAS state: Recording %1 TAS Zustand: Aufnahme %1 - + TAS state: Idle %1/%2 - + TAS Status: Untätig %1/%2 - + TAS State: Invalid TAS Zustand: Ungültig - + &Stop Running - + &Stoppe Ausführung - + &Start &Start - + Stop R&ecording Aufnahme stoppen - + R&ecord Aufnahme - + Building: %n shader(s) - + Scale: %1x %1 is the resolution scaling factor Skalierung: %1x - + Speed: %1% / %2% Geschwindigkeit: %1% / %2% - + Speed: %1% Geschwindigkeit: %1% - + Game: %1 FPS (Unlocked) Spiel: %1 FPS (Unbegrenzt) - + Game: %1 FPS Spiel: %1 FPS - + Frame: %1 ms Frame: %1 ms - + %1 %2 %1 %2 - + FSR FSR - + NO AA KEIN AA - + VOLUME: MUTE LAUTSTÄRKE: STUMM - + VOLUME: %1% Volume percentage (e.g. 50%) LAUTSTÄRKE: %1% - + Confirm Key Rederivation Schlüsselableitung bestätigen - + You are about to force rederive all of your keys. If you do not know what this means or what you are doing, this is a potentially destructive action. @@ -4717,37 +4757,37 @@ This will delete your autogenerated key files and re-run the key derivation modu Dieser Prozess wird die generierten Schlüsseldateien löschen und die Schlüsselableitung neu starten. - + Missing fuses Fuses fehlen - + - Missing BOOT0 - BOOT0 fehlt - + - Missing BCPKG2-1-Normal-Main - BCPKG2-1-Normal-Main fehlt - + - Missing PRODINFO - PRODINFO fehlt - + Derivation Components Missing Derivationskomponenten fehlen - + Encryption keys are missing. <br>Please follow <a href='https://yuzu-emu.org/help/quickstart/'>the yuzu quickstart guide</a> to get all your keys, firmware and games.<br><br><small>(%1)</small> Die Verschlüsselungsschlüssel fehlen. <br>Bitte folgen Sie <a href='https://yuzu-emu.org/help/quickstart/'>dem Yuzu Schnellstart Guide</a> um ihre benötigten Schlüssel, Firmware und Spiele zu erhalten.<br><br><small>(%1)</small> - + Deriving keys... This may take up to a minute depending on your system's performance. @@ -4755,49 +4795,49 @@ on your system's performance. Dies könnte, je nach Leistung deines Systems, bis zu einer Minute dauern. - + Deriving Keys Schlüsselableitung - + System Archive Decryption Failed Die Systemarchiventschlüsselung ist gescheitert. - + Encryption keys failed to decrypt firmware. <br>Please follow <a href='https://yuzu-emu.org/help/quickstart/'>the yuzu quickstart guide</a> to get all your keys, firmware and games. - + Verschlüsselungsschlüssel konnten die Firmware nicht entschlüsseln. <br>Bitte befolge <a href='https://yuzu-emu.org/help/quickstart/'>den yuzu-Quickstart-Guide</a> um alle deine Schlüssel (Keys), Firmware, und Spiele zu erhalten. - + Select RomFS Dump Target RomFS wählen - + Please select which RomFS you would like to dump. Wähle, welches RomFS du speichern möchtest. - + Are you sure you want to close yuzu? Bist du sicher, dass du yuzu beenden willst? - - - + + + yuzu yuzu - + Are you sure you want to stop the emulation? Any unsaved progress will be lost. Bist du sicher, dass du die Emulation stoppen willst? Jeder nicht gespeicherte Fortschritt geht verloren. - + The currently running application has requested yuzu to not exit. Would you like to bypass this and exit anyway? @@ -4823,7 +4863,7 @@ Möchtest du dies umgehen und sie trotzdem beenden? Nearest - + Nächster @@ -4883,22 +4923,22 @@ Möchtest du dies umgehen und sie trotzdem beenden? Null - + Null GLSL - + GLSL GLASM - + GLASM SPIRV - + SPIRV @@ -4949,241 +4989,251 @@ Möchtest du dies umgehen und sie trotzdem beenden? GameList - + Favorite Favorit - + Start Game Spiel starten - + Start Game without Custom Configuration Spiel ohne benutzerdefinierte Spiel-Einstellungen starten - + Open Save Data Location Spielstand-Verzeichnis öffnen - + Open Mod Data Location Mod-Verzeichnis öffnen - + Open Transferable Pipeline Cache - + Transferierbaren Pipeline-Cache öffnen - + Remove Entfernen - + Remove Installed Update Installiertes Update entfernen - + Remove All Installed DLC Alle installierten DLCs entfernen - + Remove Custom Configuration Spiel-Einstellungen entfernen - + + Remove Play Time Data + Spielzeit-Daten entfernen + + + Remove Cache Storage Cache-Speicher entfernen - + Remove OpenGL Pipeline Cache OpenGL-Pipeline-Cache entfernen - + Remove Vulkan Pipeline Cache Vulkan-Pipeline-Cache entfernen - + Remove All Pipeline Caches Alle Pipeline-Caches entfernen - + Remove All Installed Contents Alle installierten Inhalte entfernen - - + + Dump RomFS RomFS speichern - + Dump RomFS to SDMC RomFS nach SDMC dumpen - + Verify Integrity - + Integrität überprüfen - + Copy Title ID to Clipboard Title-ID in die Zwischenablage kopieren - + Navigate to GameDB entry GameDB-Eintrag öffnen - + Create Shortcut Verknüpfung erstellen - + Add to Desktop Zum Desktop hinzufügen - + Add to Applications Menu Zum Menü "Anwendungen" hinzufügen - + Properties Eigenschaften - + Scan Subfolders Unterordner scannen - + Remove Game Directory Spieleverzeichnis entfernen - + ▲ Move Up ▲ Nach Oben - + ▼ Move Down ▼ Nach Unten - + Open Directory Location Verzeichnis öffnen - + Clear Löschen - + Name Name - + Compatibility Kompatibilität - + Add-ons Add-ons - + File type Dateityp - + Size Größe + + + Play time + Spielzeit + GameListItemCompat - + Ingame Im Spiel - + Game starts, but crashes or major glitches prevent it from being completed. - + Spiel startet, stürzt jedoch ab oder hat signifikante Glitches, die es verbieten es durchzuspielen. - + Perfect Perfekt - + Game can be played without issues. Das Spiel kann ohne Probleme gespielt werden. - + Playable Spielbar - + Game functions with minor graphical or audio glitches and is playable from start to finish. Das Spiel funktioniert mit minimalen grafischen oder Tonstörungen und ist komplett spielbar. - + Intro/Menu Intro/Menü - + Game loads, but is unable to progress past the Start Screen. Das Spiel lädt, ist jedoch nicht im Stande den Startbildschirm zu passieren. - + Won't Boot Startet nicht - + The game crashes when attempting to startup. Das Spiel stürzt beim Versuch zu starten ab. - + Not Tested Nicht getestet - + The game has not yet been tested. Spiel wurde noch nicht getestet. @@ -5191,7 +5241,7 @@ Möchtest du dies umgehen und sie trotzdem beenden? GameListPlaceholder - + Double-click to add a new folder to the game list Doppelklicke, um einen neuen Ordner zur Spieleliste hinzuzufügen. @@ -5204,12 +5254,12 @@ Möchtest du dies umgehen und sie trotzdem beenden? %1 von %n Ergebnis%1 von %n Ergebnisse(n) - + Filter: Filter: - + Enter pattern to filter Wörter zum Filtern eingeben @@ -5293,7 +5343,8 @@ Möchtest du dies umgehen und sie trotzdem beenden? Failed to announce the room to the public lobby. In order to host a room publicly, you must have a valid yuzu account configured in Emulation -> Configure -> Web. If you do not want to publish a room in the public lobby, then select Unlisted instead. Debug Message: - + Ankündigen des Raums in der öffentlichen Lobby fehlgeschlagen. Um einen öffentlichen Raum zu erstellen, muss ein gültiges yuzu-Konto in Emulation -> Konfigurieren -> Web hinterlegt sein. Falls der Raum nicht in der öffentlichen Lobby angezeigt werden soll, wähle "Nicht gelistet". +Debug Nachricht: @@ -5326,6 +5377,7 @@ Debug Message: + Main Window Hauptfenster @@ -5352,7 +5404,7 @@ Debug Message: Change Docked Mode - + Dockmodus ändern @@ -5431,6 +5483,11 @@ Debug Message: + Toggle Renderdoc Capture + + + + Toggle Status Bar Statusleiste umschalten @@ -5668,186 +5725,216 @@ Debug Message: + &Amiibo + &Amiibo + + + &TAS &TAS - + &Help &Hilfe - + &Install Files to NAND... &Dateien im NAND installieren... - + L&oad File... Datei &laden... - + Load &Folder... &Verzeichnis laden... - + E&xit S&chließen - + &Pause &Pause - + &Stop &Stop - + &Reinitialize keys... &Schlüssel neu initialisieren... - + &Verify Installed Contents - + Installierte Inhalte &überprüfen - + &About yuzu &Über yuzu - + Single &Window Mode &Einzelfenster-Modus - + Con&figure... Kon&figurieren - + Display D&ock Widget Headers D&ock-Widget-Header anzeigen - + Show &Filter Bar &Filterleiste anzeigen - + Show &Status Bar &Statusleiste anzeigen - + Show Status Bar Statusleiste anzeigen - + &Browse Public Game Lobby &Öffentliche Spiele-Lobbys durchsuchen - + &Create Room &Raum erstellen - + &Leave Room &Raum verlassen - + &Direct Connect to Room &Direkte Verbindung zum Raum - + &Show Current Room &Aktuellen Raum anzeigen - + F&ullscreen Vollbild (&u) - + &Restart Neusta&rt - + Load/Remove &Amiibo... &Amiibo laden/entfernen... - + &Report Compatibility &Kompatibilität melden - + Open &Mods Page &Mods-Seite öffnen - + Open &Quickstart Guide &Schnellstart-Anleitung öffnen - + &FAQ &FAQ - + Open &yuzu Folder &yuzu-Verzeichnis öffnen - + &Capture Screenshot &Bildschirmfoto aufnehmen - - Open &Mii Editor - + + Open &Album + &Album öffnen - + + &Set Nickname and Owner + Spitzname und Besitzer &festlegen + + + + &Delete Game Data + Spiel-Daten &löschen + + + + &Restore Amiibo + Amiibo &wiederherstellen + + + + &Format Amiibo + Amiibo &formatieren + + + + Open &Mii Editor + &Mii-Editor öffnen + + + &Configure TAS... &TAS &konfigurieren... - + Configure C&urrent Game... &Spiel-Einstellungen ändern... - + &Start &Start - + &Reset &Zurücksetzen - + R&ecord Aufnahme @@ -5945,7 +6032,8 @@ Debug Message: Failed to update the room information. Please check your Internet connection and try hosting the room again. Debug Message: - + Aktualisieren der Rauminformationen fehlgeschlagen. Überprüfe deine Internetverbindung und versuche erneut einen Raum zu erstellen. +Debug Message: @@ -5978,7 +6066,7 @@ Debug Message: You must choose a Preferred Game to host a room. If you do not have any games in your game list yet, add a game folder by clicking on the plus icon in the game list. - + Es muss ein bevorzugtes Spiel ausgewählt werden um einen Raum zu erstellen. Sollten keine Spiele in der Spieleliste vorhanden sein, kann ein Spielordner mittels des Plus-Symbols in der Spieleliste hinzugefügt werden. @@ -6010,7 +6098,7 @@ Wenn Sie immer noch keine Verbindung herstellen können, wenden Sie sich an den Version mismatch! Please update to the latest version of yuzu. If the problem persists, contact the room host and ask them to update the server. - + Keine Übereinstimmung der Versionen! Bitte zur neuesten Version von yuzu aktualisieren. Sollte das Problem weiterhin vorhanden sein, kontaktiere den Raumersteller und bitte ihn den Server zu aktualisieren. @@ -6155,27 +6243,27 @@ p, li { white-space: pre-wrap; } Spielt kein Spiel - + Installed SD Titles Installierte SD-Titel - + Installed NAND Titles Installierte NAND-Titel - + System Titles Systemtitel - + Add New Game Directory Neues Spieleverzeichnis hinzufügen - + Favorites Favoriten @@ -6412,7 +6500,7 @@ p, li { white-space: pre-wrap; } %1%2Hat %3 - + %1%2Hat %3 @@ -6531,25 +6619,25 @@ p, li { white-space: pre-wrap; } %1%2%3%4 - + %1%2%3%4 %1%2%3Hat %4 - + %1%2%3Hat %4 %1%2%3Axis %4 - + %1%2%3Achse %4 %1%2%3Button %4 - + %1%2%3Knopf %4 @@ -6701,7 +6789,7 @@ p, li { white-space: pre-wrap; } - + Pro Controller Pro-Controller @@ -6714,7 +6802,7 @@ p, li { white-space: pre-wrap; } - + Dual Joycons Zwei Joycons @@ -6727,7 +6815,7 @@ p, li { white-space: pre-wrap; } - + Left Joycon Linker Joycon @@ -6740,7 +6828,7 @@ p, li { white-space: pre-wrap; } - + Right Joycon Rechter Joycon @@ -6769,7 +6857,7 @@ p, li { white-space: pre-wrap; } - + Handheld Handheld @@ -6885,32 +6973,37 @@ p, li { white-space: pre-wrap; } 8 - + + Not enough controllers + Nicht genügend Controller + + + GameCube Controller GameCube-Controller - + Poke Ball Plus Poke-Ball Plus - + NES Controller NES Controller - + SNES Controller SNES Controller - + N64 Controller N64 Controller - + Sega Genesis Sega Genesis @@ -7031,7 +7124,7 @@ Bitte versuche es noch einmal oder kontaktiere den Entwickler der Software. Send save data for which user? - + Speicherdaten für welchen Nutzer senden? @@ -7097,7 +7190,7 @@ p, li { white-space: pre-wrap; } [%1] %2 - + [%1] %2 diff --git a/dist/languages/el.ts b/dist/languages/el.ts index cb6cb9c9a1..d421be61d8 100644 --- a/dist/languages/el.ts +++ b/dist/languages/el.ts @@ -373,13 +373,13 @@ This would ban both their forum username and their IP address. % - + Auto (%1) Auto select time zone - + Default (%1) Default time zone @@ -882,49 +882,29 @@ This would ban both their forum username and their IP address. - Create Minidump After Crash - Δημιουργία Minidump μετά από κατάρρευση - - - Enable this to output the latest generated audio command list to the console. Only affects games using the audio renderer. - + Dump Audio Commands To Console** - + Enable Verbose Reporting Services** - + **This will be reset automatically when yuzu closes. **Αυτό θα μηδενιστεί αυτόματα όταν το yuzu κλείσει. - - Restart Required - Απαιτείται επανεκκίνηση - - - - yuzu is required to restart in order to apply this setting. - το yuzu πρέπει να επανεκκινηθεί για να εφαρμοστεί αυτή η ρύθμιση. - - - + Web applet not compiled Το web applet δεν έχει συσταθεί - - - MiniDump creation not compiled - Δημιουργία MiniDump που δεν έχει συσταθεί - ConfigureDebugController @@ -1343,7 +1323,7 @@ This would ban both their forum username and their IP address. - + Conflicting Key Sequence Αντικρουόμενη Ακολουθία Πλήκτρων @@ -1364,27 +1344,37 @@ This would ban both their forum username and their IP address. Μη Έγκυρο - + + Invalid hotkey settings + + + + + An error occurred. Please report this issue on github. + + + + Restore Default Επαναφορά Προκαθορισμένων - + Clear Καθαρισμός - + Conflicting Button Sequence Αντικρουόμενη Ακολουθία Κουμπιών - + The default button sequence is already assigned to: %1 Η προεπιλεγμένη ακολουθία κουμπιών έχει ήδη αντιστοιχιστεί στο: %1 - + The default key sequence is already assigned to: %1 Η προεπιλεγμένη ακολουθία πλήκτρων έχει ήδη αντιστοιχιστεί στο: %1 @@ -3359,67 +3349,72 @@ Drag points to change position, or double-click table cells to edit values. - + + Show Play Time Column + + + + Game Icon Size: - + Folder Icon Size: - + Row 1 Text: - + Row 2 Text: - + Screenshots Στιγμιότυπα - + Ask Where To Save Screenshots (Windows Only) - + Screenshots Path: - + ... ... - + TextLabel - + Resolution: Ανάλυση: - + Select Screenshots Path... - + <System> <System> - + Auto (%1 x %2, %3 x %4) Screenshot width value @@ -3737,120 +3732,120 @@ Drag points to change position, or double-click table cells to edit values. GMainWindow - + <a href='https://yuzu-emu.org/help/feature/telemetry/'>Anonymous data is collected</a> to help improve yuzu. <br/><br/>Would you like to share your usage data with us? - + Telemetry Τηλεμετρία - + Broken Vulkan Installation Detected - + Vulkan initialization failed during boot.<br><br>Click <a href='https://yuzu-emu.org/wiki/faq/#yuzu-starts-with-the-error-broken-vulkan-installation-detected'>here for instructions to fix the issue</a>. - + Running a game TRANSLATORS: This string is shown to the user to explain why yuzu needs to prevent the computer from sleeping - + Loading Web Applet... - - + + Disable Web Applet - + Disabling the web applet can lead to undefined behavior and should only be used with Super Mario 3D All-Stars. Are you sure you want to disable the web applet? (This can be re-enabled in the Debug settings.) - + The amount of shaders currently being built - + The current selected resolution scaling multiplier. - + Current emulation speed. Values higher or lower than 100% indicate emulation is running faster or slower than a Switch. - + How many frames per second the game is currently displaying. This will vary from game to game and scene to scene. Πόσα καρέ ανά δευτερόλεπτο εμφανίζει το παιχνίδι αυτή τη στιγμή. Αυτό διαφέρει από παιχνίδι σε παιχνίδι και από σκηνή σε σκηνή. - + Time taken to emulate a Switch frame, not counting framelimiting or v-sync. For full-speed emulation this should be at most 16.67 ms. - + Unmute - + Mute - + Reset Volume - + &Clear Recent Files - + Emulated mouse is enabled - + Real mouse input and mouse panning are incompatible. Please disable the emulated mouse in input advanced settings to allow mouse panning. - + &Continue &Συνέχεια - + &Pause &Παύση - + Warning Outdated Game Format - + You are using the deconstructed ROM directory format for this game, which is an outdated format that has been superseded by others such as NCA, NAX, XCI, or NSP. Deconstructed ROM directories lack icons, metadata, and update support.<br><br>For an explanation of the various Switch formats yuzu supports, <a href='https://yuzu-emu.org/wiki/overview-of-switch-game-formats'>check out our wiki</a>. This message will not be shown again. Μη μεταφρασμένη συμβολοσειρά @@ -3858,843 +3853,879 @@ Drag points to change position, or double-click table cells to edit values. - + Error while loading ROM! Σφάλμα κατά τη φόρτωση της ROM! - + The ROM format is not supported. - + An error occurred initializing the video core. - + yuzu has encountered an error while running the video core. This is usually caused by outdated GPU drivers, including integrated ones. Please see the log for more details. For more information on accessing the log, please see the following page: <a href='https://yuzu-emu.org/help/reference/log-files/'>How to Upload the Log File</a>. - + Error while loading ROM! %1 %1 signifies a numeric error code. - + %1<br>Please follow <a href='https://yuzu-emu.org/help/quickstart/'>the yuzu quickstart guide</a> to redump your files.<br>You can refer to the yuzu wiki</a> or the yuzu Discord</a> for help. %1 signifies an error string. - + An unknown error occurred. Please see the log for more details. Εμφανίστηκε ένα απροσδιόριστο σφάλμα. Ανατρέξτε στο αρχείο καταγραφής για περισσότερες λεπτομέρειες. - + (64-bit) (64-bit) - + (32-bit) (32-bit) - + %1 %2 %1 is the title name. %2 indicates if the title is 64-bit or 32-bit %1 %2 - + Closing software... - + Save Data Αποθήκευση δεδομένων - + Mod Data - + Error Opening %1 Folder - - + + Folder does not exist! Ο φάκελος δεν υπάρχει! - + Error Opening Transferable Shader Cache - + Failed to create the shader cache directory for this title. - + Error Removing Contents - + Error Removing Update - + Error Removing DLC - + Remove Installed Game Contents? - + Remove Installed Game Update? - + Remove Installed Game DLC? - + Remove Entry - - - - - - + + + + + + Successfully Removed - + Successfully removed the installed base game. - + The base game is not installed in the NAND and cannot be removed. - + Successfully removed the installed update. - + There is no update installed for this title. - + There are no DLC installed for this title. - + Successfully removed %1 installed DLC. - + Delete OpenGL Transferable Shader Cache? - + Delete Vulkan Transferable Shader Cache? - + Delete All Transferable Shader Caches? - + Remove Custom Game Configuration? - + Remove Cache Storage? - + Remove File Αφαίρεση Αρχείου - - + + Remove Play Time Data + + + + + Reset play time? + + + + + Error Removing Transferable Shader Cache - - + + A shader cache for this title does not exist. - + Successfully removed the transferable shader cache. - + Failed to remove the transferable shader cache. - + Error Removing Vulkan Driver Pipeline Cache - + Failed to remove the driver pipeline cache. - - + + Error Removing Transferable Shader Caches - + Successfully removed the transferable shader caches. - + Failed to remove the transferable shader cache directory. - - + + Error Removing Custom Configuration - + A custom configuration for this title does not exist. - + Successfully removed the custom game configuration. - + Failed to remove the custom game configuration. - - + + RomFS Extraction Failed! - + There was an error copying the RomFS files or the user cancelled the operation. - + Full - + Skeleton - + Select RomFS Dump Mode Επιλογή λειτουργίας απόρριψης RomFS - + Please select the how you would like the RomFS dumped.<br>Full will copy all of the files into the new directory while <br>skeleton will only create the directory structure. Μη αποθηκευμένη μετάφραση. Παρακαλούμε επιλέξτε τον τρόπο με τον οποίο θα θέλατε να γίνει η απόρριψη της RomFS.<br> Η επιλογή Πλήρης θα αντιγράψει όλα τα αρχεία στο νέο κατάλογο, ενώ η επιλογή <br> Σκελετός θα δημιουργήσει μόνο τη δομή του καταλόγου. - + There is not enough free space at %1 to extract the RomFS. Please free up space or select a different dump directory at Emulation > Configure > System > Filesystem > Dump Root - + Extracting RomFS... - - - - + + + + Cancel Ακύρωση - + RomFS Extraction Succeeded! - - - + + + The operation completed successfully. Η επέμβαση ολοκληρώθηκε με επιτυχία. - + Integrity verification couldn't be performed! - + File contents were not checked for validity. - - + + Integrity verification failed! - + File contents may be corrupt. - - + + Verifying integrity... - - + + Integrity verification succeeded! - - - - - + + + + Create Shortcut - + This will create a shortcut to the current AppImage. This may not work well if you update. Continue? - - Cannot create shortcut on desktop. Path "%1" does not exist. + + Cannot create shortcut. Path "%1" does not exist. - - Cannot create shortcut in applications menu. Path "%1" does not exist and cannot be created. - - - - + Create Icon - + Cannot create icon file. Path "%1" does not exist and cannot be created. - + Start %1 with the yuzu Emulator - + Failed to create a shortcut at %1 - + Successfully created a shortcut to %1 - + Error Opening %1 - + Select Directory Επιλογή καταλόγου - + Properties Ιδιότητες - + The game properties could not be loaded. - + Switch Executable (%1);;All Files (*.*) %1 is an identifier for the Switch executable file extensions. - + Load File Φόρτωση αρχείου - + Open Extracted ROM Directory - + Invalid Directory Selected - + The directory you have selected does not contain a 'main' file. - + Installable Switch File (*.nca *.nsp *.xci);;Nintendo Content Archive (*.nca);;Nintendo Submission Package (*.nsp);;NX Cartridge Image (*.xci) - + Install Files - + %n file(s) remaining - + Installing file "%1"... - - + + Install Results Αποτελέσματα εγκατάστασης - + To avoid possible conflicts, we discourage users from installing base games to the NAND. Please, only use this feature to install updates and DLC. - + %n file(s) were newly installed - + %n file(s) were overwritten - + %n file(s) failed to install - + System Application Εφαρμογή συστήματος - + System Archive - + System Application Update - + Firmware Package (Type A) - + Firmware Package (Type B) - + Game Παιχνίδι - + Game Update Ενημέρωση παιχνιδιού - + Game DLC DLC παιχνιδιού - + Delta Title - + Select NCA Install Type... Επιλέξτε τον τύπο εγκατάστασης NCA... - + Please select the type of title you would like to install this NCA as: (In most instances, the default 'Game' is fine.) - + Failed to Install - + The title type you selected for the NCA is invalid. - + File not found Το αρχείο δεν βρέθηκε - + File "%1" not found Το αρχείο "%1" δεν βρέθηκε - + OK OK - - + + Hardware requirements not met - - + + Your system does not meet the recommended hardware requirements. Compatibility reporting has been disabled. - + Missing yuzu Account - + In order to submit a game compatibility test case, you must link your yuzu account.<br><br/>To link your yuzu account, go to Emulation &gt; Configuration &gt; Web. - + Error opening URL Σφάλμα κατα το άνοιγμα του URL - + Unable to open the URL "%1". Αδυναμία ανοίγματος του URL "%1". - + TAS Recording - + Overwrite file of player 1? - + Invalid config detected - + Handheld controller can't be used on docked mode. Pro controller will be selected. - - + + Amiibo Amiibo - - + + The current amiibo has been removed - + Error Σφάλμα - - + + The current game is not looking for amiibos - + Amiibo File (%1);; All Files (*.*) - + Load Amiibo Φόρτωση Amiibo - + Error loading Amiibo data Σφάλμα φόρτωσης δεδομένων Amiibo - + The selected file is not a valid amiibo Το επιλεγμένο αρχείο δεν αποτελεί έγκυρο amiibo - + The selected file is already on use Το επιλεγμένο αρχείο χρησιμοποιείται ήδη - + An unknown error occurred - + Verification failed for the following files: %1 - + + + No firmware available - + + Please install the firmware to use the Album applet. + + + + + Album Applet + + + + + Album applet is not available. Please reinstall firmware. + + + + + Please install the firmware to use the Cabinet applet. + + + + + Cabinet Applet + + + + + Cabinet applet is not available. Please reinstall firmware. + + + + Please install the firmware to use the Mii editor. - + Mii Edit Applet - + Mii editor is not available. Please reinstall firmware. - + Capture Screenshot Λήψη στιγμιότυπου οθόνης - + PNG Image (*.png) Εικόνα PBG (*.png) - + TAS state: Running %1/%2 - + TAS state: Recording %1 - + TAS state: Idle %1/%2 - + TAS State: Invalid - + &Stop Running - + &Start &Έναρξη - + Stop R&ecording - + R&ecord - + Building: %n shader(s) - + Scale: %1x %1 is the resolution scaling factor Κλίμακα: %1x - + Speed: %1% / %2% Ταχύτητα: %1% / %2% - + Speed: %1% Ταχύτητα: %1% - + Game: %1 FPS (Unlocked) - + Game: %1 FPS - + Frame: %1 ms Καρέ: %1 ms - + %1 %2 %1 %2 - + FSR FSR - + NO AA - + VOLUME: MUTE - + VOLUME: %1% Volume percentage (e.g. 50%) - + Confirm Key Rederivation - + You are about to force rederive all of your keys. If you do not know what this means or what you are doing, this is a potentially destructive action. @@ -4705,86 +4736,86 @@ This will delete your autogenerated key files and re-run the key derivation modu - + Missing fuses - + - Missing BOOT0 - Λείπει το BOOT0 - + - Missing BCPKG2-1-Normal-Main - Λείπει το BCPKG2-1-Normal-Main - + - Missing PRODINFO - Λείπει το PRODINFO - + Derivation Components Missing - + Encryption keys are missing. <br>Please follow <a href='https://yuzu-emu.org/help/quickstart/'>the yuzu quickstart guide</a> to get all your keys, firmware and games.<br><br><small>(%1)</small> - + Deriving keys... This may take up to a minute depending on your system's performance. - + Deriving Keys - + System Archive Decryption Failed - + Encryption keys failed to decrypt firmware. <br>Please follow <a href='https://yuzu-emu.org/help/quickstart/'>the yuzu quickstart guide</a> to get all your keys, firmware and games. - + Select RomFS Dump Target - + Please select which RomFS you would like to dump. - + Are you sure you want to close yuzu? Είστε σίγουροι ότι θέλετε να κλείσετε το yuzu; - - - + + + yuzu yuzu - + Are you sure you want to stop the emulation? Any unsaved progress will be lost. - + The currently running application has requested yuzu to not exit. Would you like to bypass this and exit anyway? @@ -4934,241 +4965,251 @@ Would you like to bypass this and exit anyway? GameList - + Favorite Αγαπημένο - + Start Game Έναρξη παιχνιδιού - + Start Game without Custom Configuration - + Open Save Data Location Άνοιγμα Τοποθεσίας Αποθήκευσης Δεδομένων - + Open Mod Data Location Άνοιγμα Τοποθεσίας Δεδομένων Mod - + Open Transferable Pipeline Cache - + Remove Αφαίρεση - + Remove Installed Update Αφαίρεση Εγκατεστημένης Ενημέρωσης - + Remove All Installed DLC Αφαίρεση Όλων των Εγκατεστημένων DLC - + Remove Custom Configuration - + + Remove Play Time Data + + + + Remove Cache Storage - + Remove OpenGL Pipeline Cache - + Remove Vulkan Pipeline Cache - + Remove All Pipeline Caches Καταργήστε Όλη την Κρυφή μνήμη του Pipeline - + Remove All Installed Contents Καταργήστε Όλο το Εγκατεστημένο Περιεχόμενο - - + + Dump RomFS Απόθεση του RomFS - + Dump RomFS to SDMC Απόθεση του RomFS στο SDMC - + Verify Integrity - + Copy Title ID to Clipboard Αντιγραφή του Title ID στο Πρόχειρο - + Navigate to GameDB entry Μεταβείτε στην καταχώρηση GameDB - + Create Shortcut - + Add to Desktop - + Add to Applications Menu - + Properties Ιδιότητες - + Scan Subfolders Σκανάρισμα Υποφακέλων - + Remove Game Directory Αφαίρεση Φακέλου Παιχνιδιών - + ▲ Move Up ▲ Μετακίνηση Επάνω - + ▼ Move Down ▼ Μετακίνηση Κάτω - + Open Directory Location Ανοίξτε την Τοποθεσία Καταλόγου - + Clear Καθαρισμός - + Name Όνομα - + Compatibility Συμβατότητα - + Add-ons Πρόσθετα - + File type Τύπος αρχείου - + Size Μέγεθος + + + Play time + + GameListItemCompat - + Ingame - + Game starts, but crashes or major glitches prevent it from being completed. - + Perfect Τέλεια - + Game can be played without issues. - + Playable - + Game functions with minor graphical or audio glitches and is playable from start to finish. - + Intro/Menu Εισαγωγή/Μενου - + Game loads, but is unable to progress past the Start Screen. - + Won't Boot Δεν ξεκινά - + The game crashes when attempting to startup. Το παιχνίδι διακόπτεται κατά την προσπάθεια εκκίνησης. - + Not Tested Μη Τεσταρισμένο - + The game has not yet been tested. Το παιχνίδι δεν έχει ακόμα τεσταριστεί. @@ -5176,7 +5217,7 @@ Would you like to bypass this and exit anyway? GameListPlaceholder - + Double-click to add a new folder to the game list Διπλο-κλικ για προσθήκη νεου φακέλου στη λίστα παιχνιδιών @@ -5189,12 +5230,12 @@ Would you like to bypass this and exit anyway? - + Filter: Φίλτρο: - + Enter pattern to filter Εισαγάγετε μοτίβο για φιλτράρισμα @@ -5311,6 +5352,7 @@ Debug Message: + Main Window @@ -5416,6 +5458,11 @@ Debug Message: + Toggle Renderdoc Capture + + + + Toggle Status Bar @@ -5653,186 +5700,216 @@ Debug Message: + &Amiibo + + + + &TAS &TAS - + &Help - + &Install Files to NAND... - + L&oad File... - + Load &Folder... - + E&xit - + &Pause &Παύση - + &Stop &Σταμάτημα - + &Reinitialize keys... - + &Verify Installed Contents - + &About yuzu - + Single &Window Mode - + Con&figure... - + Display D&ock Widget Headers - + Show &Filter Bar - + Show &Status Bar - + Show Status Bar - + &Browse Public Game Lobby &Περιήγηση σε δημόσιο λόμπι παιχνιδιού - + &Create Room &Δημιουργία δωματίου - + &Leave Room &Αποχωρήσει από το δωμάτιο - + &Direct Connect to Room &Άμεση σύνδεση σε Δωμάτιο - + &Show Current Room &Εμφάνιση τρέχοντος δωματίου - + F&ullscreen - + &Restart - + Load/Remove &Amiibo... - + &Report Compatibility - + Open &Mods Page - + Open &Quickstart Guide - + &FAQ - + Open &yuzu Folder - + &Capture Screenshot - - Open &Mii Editor - - - - - &Configure TAS... + + Open &Album + &Set Nickname and Owner + + + + + &Delete Game Data + + + + + &Restore Amiibo + + + + + &Format Amiibo + + + + + Open &Mii Editor + + + + + &Configure TAS... + + + + Configure C&urrent Game... - + &Start &Έναρξη - + &Reset - + R&ecord @@ -6135,27 +6212,27 @@ p, li { white-space: pre-wrap; } Δεν παίζει παιχνίδι - + Installed SD Titles - + Installed NAND Titles - + System Titles Τίτλοι Συστήματος - + Add New Game Directory Προσθήκη Νέας Τοποθεσίας Παιχνιδιών - + Favorites Αγαπημένα @@ -6681,7 +6758,7 @@ p, li { white-space: pre-wrap; } - + Pro Controller Pro Controller @@ -6694,7 +6771,7 @@ p, li { white-space: pre-wrap; } - + Dual Joycons Διπλά Joycons @@ -6707,7 +6784,7 @@ p, li { white-space: pre-wrap; } - + Left Joycon Αριστερό Joycon @@ -6720,7 +6797,7 @@ p, li { white-space: pre-wrap; } - + Right Joycon Δεξί Joycon @@ -6749,7 +6826,7 @@ p, li { white-space: pre-wrap; } - + Handheld Handheld @@ -6865,32 +6942,37 @@ p, li { white-space: pre-wrap; } 8 - + + Not enough controllers + + + + GameCube Controller Χειριστήριο GameCube - + Poke Ball Plus Poke Ball Plus - + NES Controller Χειριστήριο NES - + SNES Controller Χειριστήριο SNES - + N64 Controller Χειριστήριο N64 - + Sega Genesis Sega Genesis diff --git a/dist/languages/es.ts b/dist/languages/es.ts index 608f9b3996..4adeb599fd 100644 --- a/dist/languages/es.ts +++ b/dist/languages/es.ts @@ -277,7 +277,7 @@ Esto banearía su nombre del foro y su dirección IP. No The game crashes or freezes during gameplay - No El juego se bloquea o se congela durante el juego + No El juego se bloquea o se congela durante la ejecución @@ -312,7 +312,7 @@ Esto banearía su nombre del foro y su dirección IP. None Everything is rendered as it looks on the Nintendo Switch - Ninguno Todo está renderizado conforme se ve en la Nintendo Switch + Ninguno Todo está renderizado conforme se muestra en la Nintendo Switch @@ -322,22 +322,22 @@ Esto banearía su nombre del foro y su dirección IP. Major The game has major audio errors - Importantes El juego tiene grandes problemas de sonido + Importantes El juego tiene bastantes problemas de audio Minor The game has minor audio errors - Menores El juego tiene pequeños problemas de sonido + Menores El juego tiene pequeños problemas de audio None Audio is played perfectly - Ninguno El sonido se reproduce perfectamente + Ninguno El audio se reproduce perfectamente <html><head/><body><p>Does the game have any audio glitches / missing effects?</p></body></html> - <html><head/><body><p>¿El juego tiene algún problema de sonido o falta de algunos efectos?</p></body></html> + <html><head/><body><p>¿El juego tiene algún problema de audio o falta de efectos de sonido?</p></body></html> @@ -352,7 +352,7 @@ Esto banearía su nombre del foro y su dirección IP. Communication error - Error de comunicación. + Error de comunicación @@ -373,13 +373,13 @@ Esto banearía su nombre del foro y su dirección IP. % - + Auto (%1) Auto select time zone Auto (%1) - + Default (%1) Default time zone Predeterminada (%1) @@ -893,49 +893,29 @@ Esto banearía su nombre del foro y su dirección IP. - Create Minidump After Crash - Crear mini volcado tras un crash - - - Enable this to output the latest generated audio command list to the console. Only affects games using the audio renderer. Activa esta opción para mostrar en la consola la última lista de comandos de audio generada. Solo afecta a los juegos que utilizan el renderizador de audio. - + Dump Audio Commands To Console** Volcar comandos de audio a la consola** - + Enable Verbose Reporting Services** Activar servicios de reporte detallados** - + **This will be reset automatically when yuzu closes. **Esto se reiniciará automáticamente cuando yuzu se cierre. - - Restart Required - Reinicio requerido - - - - yuzu is required to restart in order to apply this setting. - Para aplicar estos ajustes es necesario reiniciar yuzu. - - - + Web applet not compiled La web applet no se ha compilado - - - MiniDump creation not compiled - La creación del mini volcado no se ha compilado - ConfigureDebugController @@ -984,7 +964,7 @@ Esto banearía su nombre del foro y su dirección IP. Some settings are only available when a game is not running. - Algunos ajustes sólo están disponibles cuando no se esté ejecutando ningún juego. + Algunos ajustes sólo están disponibles cuando no se estén ejecutando los juegos. @@ -1354,7 +1334,7 @@ Esto banearía su nombre del foro y su dirección IP. - + Conflicting Key Sequence Combinación de teclas en conflicto @@ -1375,27 +1355,37 @@ Esto banearía su nombre del foro y su dirección IP. No válido - + + Invalid hotkey settings + Configuración de teclas de atajo no válida + + + + An error occurred. Please report this issue on github. + Ha ocurrido un error. Por favor, repórtelo en Github. + + + Restore Default Restaurar valor predeterminado - + Clear Eliminar - + Conflicting Button Sequence Secuencia de botones en conflicto - + The default button sequence is already assigned to: %1 La secuencia de botones por defecto ya esta asignada a: %1 - + The default key sequence is already assigned to: %1 La combinación de teclas predeterminada ya ha sido asignada a: %1 @@ -2670,7 +2660,7 @@ Los valores actuales son %1% y %2% respectivamente. Some settings are only available when a game is not running. - Algunos ajustes sólo están disponibles cuando no se esté ejecutando ningún juego. + Algunos ajustes sólo están disponibles cuando no se estén ejecutando los juegos. @@ -2786,7 +2776,7 @@ Los valores actuales son %1% y %2% respectivamente. Profile management is available only when game is not running. - El sistema de perfiles sólo se encuentra disponible cuando no se esté ejecutando ningún juego. + El sistema de perfiles sólo se encuentra disponible cuando no se estén ejecutando los juegos. @@ -3373,67 +3363,72 @@ Arrastra los puntos para cambiar de posición, o haz doble clic en las celdas de Mostrar columna de tipos de archivo - + + Show Play Time Column + Mostrar columna de tiempo de juego + + + Game Icon Size: Tamaño de los iconos de los juegos: - + Folder Icon Size: Tamaño de los iconos de la carpeta: - + Row 1 Text: Texto de fila 1: - + Row 2 Text: Texto de fila 2: - + Screenshots Capturas de pantalla - + Ask Where To Save Screenshots (Windows Only) Preguntar dónde guardar las capturas de pantalla (sólo en Windows) - + Screenshots Path: Ruta de las capturas de pantalla: - + ... ... - + TextLabel TextLabel - + Resolution: Resolución: - + Select Screenshots Path... Selecciona la ruta de las capturas de pantalla: - + <System> <System> - + Auto (%1 x %2, %3 x %4) Screenshot width value Auto (%1 x %2, %3 x %4) @@ -3751,612 +3746,616 @@ Arrastra los puntos para cambiar de posición, o haz doble clic en las celdas de GMainWindow - + <a href='https://yuzu-emu.org/help/feature/telemetry/'>Anonymous data is collected</a> to help improve yuzu. <br/><br/>Would you like to share your usage data with us? <a href='https://yuzu-emu.org/help/feature/telemetry/'>Los datos de uso anónimos se recogen</a> para ayudar a mejorar yuzu. <br/><br/>¿Deseas compartir tus datos de uso con nosotros? - + Telemetry Telemetría - + Broken Vulkan Installation Detected Se ha detectado una instalación corrupta de Vulkan - + Vulkan initialization failed during boot.<br><br>Click <a href='https://yuzu-emu.org/wiki/faq/#yuzu-starts-with-the-error-broken-vulkan-installation-detected'>here for instructions to fix the issue</a>. La inicialización de Vulkan ha fallado durante la ejecución. Haz clic <a href='https://yuzu-emu.org/wiki/faq/#yuzu-starts-with-the-error-broken-vulkan-installation-detected'>aquí para más información sobre como arreglar el problema</a>. - + Running a game TRANSLATORS: This string is shown to the user to explain why yuzu needs to prevent the computer from sleeping Ejecutando un juego - + Loading Web Applet... Cargando Web applet... - - + + Disable Web Applet Desactivar Web applet - + Disabling the web applet can lead to undefined behavior and should only be used with Super Mario 3D All-Stars. Are you sure you want to disable the web applet? (This can be re-enabled in the Debug settings.) Deshabilitar el Applet Web puede causar comportamientos imprevistos y debería solo ser usado con Super Mario 3D All-Stars. ¿Estas seguro que quieres deshabilitar el Applet Web? (Puede ser reactivado en las configuraciones de Depuración.) - + The amount of shaders currently being built La cantidad de shaders que se están construyendo actualmente - + The current selected resolution scaling multiplier. El multiplicador de escala de resolución seleccionado actualmente. - + Current emulation speed. Values higher or lower than 100% indicate emulation is running faster or slower than a Switch. La velocidad de emulación actual. Los valores superiores o inferiores al 100% indican que la emulación se está ejecutando más rápido o más lento que en una Switch. - + How many frames per second the game is currently displaying. This will vary from game to game and scene to scene. La cantidad de fotogramas por segundo que se está mostrando el juego actualmente. Esto variará de un juego a otro y de una escena a otra. - + Time taken to emulate a Switch frame, not counting framelimiting or v-sync. For full-speed emulation this should be at most 16.67 ms. Tiempo que lleva emular un fotograma de la Switch, sin tener en cuenta la limitación de fotogramas o sincronización vertical. Para una emulación óptima, este valor debería ser como máximo de 16.67 ms. - + Unmute Desmutear - + Mute Mutear - + Reset Volume Restablecer Volumen - + &Clear Recent Files &Eliminar archivos recientes - + Emulated mouse is enabled El ratón emulado está activado - + Real mouse input and mouse panning are incompatible. Please disable the emulated mouse in input advanced settings to allow mouse panning. La entrada de un ratón real y la panoramización del ratón son incompatibles. Por favor, desactive el ratón emulado en la configuración avanzada de entrada para permitir así la panoramización del ratón. - + &Continue &Continuar - + &Pause &Pausar - + Warning Outdated Game Format Advertencia: formato del juego obsoleto - + You are using the deconstructed ROM directory format for this game, which is an outdated format that has been superseded by others such as NCA, NAX, XCI, or NSP. Deconstructed ROM directories lack icons, metadata, and update support.<br><br>For an explanation of the various Switch formats yuzu supports, <a href='https://yuzu-emu.org/wiki/overview-of-switch-game-formats'>check out our wiki</a>. This message will not be shown again. Está utilizando el formato de directorio de ROM deconstruido para este juego, que es un formato desactualizado que ha sido reemplazado por otros, como los NCA, NAX, XCI o NSP. Los directorios de ROM deconstruidos carecen de íconos, metadatos y soporte de actualizaciones.<br><br>Para ver una explicación de los diversos formatos de Switch que soporta yuzu,<a href='https://yuzu-emu.org/wiki/overview-of-switch-game-formats'>echa un vistazo a nuestra wiki</a>. Este mensaje no se volverá a mostrar. - + Error while loading ROM! ¡Error al cargar la ROM! - + The ROM format is not supported. El formato de la ROM no es compatible. - + An error occurred initializing the video core. Se ha producido un error al inicializar el núcleo de video. - + yuzu has encountered an error while running the video core. This is usually caused by outdated GPU drivers, including integrated ones. Please see the log for more details. For more information on accessing the log, please see the following page: <a href='https://yuzu-emu.org/help/reference/log-files/'>How to Upload the Log File</a>. yuzu ha encontrado un error al ejecutar el núcleo de video. Esto suele ocurrir al no tener los controladores de la GPU actualizados, incluyendo los integrados. Por favor, revisa el registro para más detalles. Para más información sobre cómo acceder al registro, por favor, consulta la siguiente página: <a href='https://yuzu-emu.org/help/reference/log-files/'>Como cargar el archivo de registro</a>. - + Error while loading ROM! %1 %1 signifies a numeric error code. ¡Error al cargar la ROM! %1 - + %1<br>Please follow <a href='https://yuzu-emu.org/help/quickstart/'>the yuzu quickstart guide</a> to redump your files.<br>You can refer to the yuzu wiki</a> or the yuzu Discord</a> for help. %1 signifies an error string. %1<br>Por favor, sigue <a href='https://yuzu-emu.org/help/quickstart/'>la guía de inicio rápido de yuzu</a> para revolcar los archivos.<br>Puedes consultar la wiki de yuzu</a> o el Discord de yuzu</a> para obtener ayuda. - + An unknown error occurred. Please see the log for more details. Error desconocido. Por favor, consulte el archivo de registro para ver más detalles. - + (64-bit) (64-bit) - + (32-bit) (32-bit) - + %1 %2 %1 is the title name. %2 indicates if the title is 64-bit or 32-bit %1 %2 - + Closing software... Cerrando software... - + Save Data Datos de guardado - + Mod Data Datos de mods - + Error Opening %1 Folder Error al abrir la carpeta %1 - - + + Folder does not exist! ¡La carpeta no existe! - + Error Opening Transferable Shader Cache Error al abrir el caché transferible de shaders - + Failed to create the shader cache directory for this title. No se pudo crear el directorio de la caché de los shaders para este título. - + Error Removing Contents Error al eliminar el contenido - + Error Removing Update Error al eliminar la actualización - + Error Removing DLC Error al eliminar el DLC - + Remove Installed Game Contents? ¿Eliminar contenido del juego instalado? - + Remove Installed Game Update? ¿Eliminar actualización del juego instalado? - + Remove Installed Game DLC? ¿Eliminar el DLC del juego instalado? - + Remove Entry Eliminar entrada - - - - - - + + + + + + Successfully Removed Se ha eliminado con éxito - + Successfully removed the installed base game. Se ha eliminado con éxito el juego base instalado. - + The base game is not installed in the NAND and cannot be removed. El juego base no está instalado en el NAND y no se puede eliminar. - + Successfully removed the installed update. Se ha eliminado con éxito la actualización instalada. - + There is no update installed for this title. No hay ninguna actualización instalada para este título. - + There are no DLC installed for this title. No hay ningún DLC instalado para este título. - + Successfully removed %1 installed DLC. Se ha eliminado con éxito %1 DLC instalado(s). - + Delete OpenGL Transferable Shader Cache? ¿Deseas eliminar el caché transferible de shaders de OpenGL? - + Delete Vulkan Transferable Shader Cache? ¿Deseas eliminar el caché transferible de shaders de Vulkan? - + Delete All Transferable Shader Caches? ¿Deseas eliminar todo el caché transferible de shaders? - + Remove Custom Game Configuration? ¿Deseas eliminar la configuración personalizada del juego? - + Remove Cache Storage? ¿Quitar almacenamiento de caché? - + Remove File Eliminar archivo - - + + Remove Play Time Data + Eliminar información del tiempo de juego + + + + Reset play time? + ¿Reestablecer tiempo de juego? + + + + Error Removing Transferable Shader Cache Error al eliminar la caché de shaders transferibles - - + + A shader cache for this title does not exist. No existe caché de shaders para este título. - + Successfully removed the transferable shader cache. El caché de shaders transferibles se ha eliminado con éxito. - + Failed to remove the transferable shader cache. No se ha podido eliminar la caché de shaders transferibles. - + Error Removing Vulkan Driver Pipeline Cache Error al eliminar la caché de canalización del controlador Vulkan - + Failed to remove the driver pipeline cache. No se ha podido eliminar la caché de canalización del controlador. - - + + Error Removing Transferable Shader Caches Error al eliminar las cachés de shaders transferibles - + Successfully removed the transferable shader caches. Cachés de shaders transferibles eliminadas con éxito. - + Failed to remove the transferable shader cache directory. No se ha podido eliminar el directorio de cachés de shaders transferibles. - - + + Error Removing Custom Configuration Error al eliminar la configuración personalizada del juego - + A custom configuration for this title does not exist. No existe una configuración personalizada para este título. - + Successfully removed the custom game configuration. Se eliminó con éxito la configuración personalizada del juego. - + Failed to remove the custom game configuration. No se ha podido eliminar la configuración personalizada del juego. - - + + RomFS Extraction Failed! ¡La extracción de RomFS ha fallado! - + There was an error copying the RomFS files or the user cancelled the operation. Se ha producido un error al copiar los archivos RomFS o el usuario ha cancelado la operación. - + Full Completo - + Skeleton En secciones - + Select RomFS Dump Mode Elegir método de volcado de RomFS - + Please select the how you would like the RomFS dumped.<br>Full will copy all of the files into the new directory while <br>skeleton will only create the directory structure. Por favor, selecciona el método en que quieres volcar el RomFS.<br>Completo copiará todos los archivos al nuevo directorio <br> mientras que en secciones solo creará la estructura del directorio. - + There is not enough free space at %1 to extract the RomFS. Please free up space or select a different dump directory at Emulation > Configure > System > Filesystem > Dump Root No hay suficiente espacio en %1 para extraer el RomFS. Por favor, libera espacio o elige otro directorio de volcado en Emulación > Configuración > Sistema > Sistema de archivos > Raíz de volcado - + Extracting RomFS... Extrayendo RomFS... - - - - + + + + Cancel Cancelar - + RomFS Extraction Succeeded! ¡La extracción RomFS ha tenido éxito! - - - + + + The operation completed successfully. La operación se completó con éxito. - + Integrity verification couldn't be performed! ¡No se pudo ejecutar la verificación de integridad! - + File contents were not checked for validity. No se ha podido comprobar la validez de los contenidos del archivo. - - + + Integrity verification failed! ¡Verificación de integridad fallida! - + File contents may be corrupt. Los contenidos del archivo pueden estar corruptos. - - + + Verifying integrity... Verificando integridad... - - + + Integrity verification succeeded! ¡La verificación de integridad ha sido un éxito! - - - - - + + + + Create Shortcut Crear acceso directo - + This will create a shortcut to the current AppImage. This may not work well if you update. Continue? Esto creará un acceso directo a la AppImage actual. Esto puede no funcionar bien si se actualiza. ¿Continuar? - - Cannot create shortcut on desktop. Path "%1" does not exist. - No se puede crear un acceso directo en el escritorio. La ruta "%1" no existe. + + Cannot create shortcut. Path "%1" does not exist. + No se puede crear un acceso directo. La ruta "%1" no existe. - - Cannot create shortcut in applications menu. Path "%1" does not exist and cannot be created. - No se puede crear un acceso directo en el menú de aplicaciones. La ruta "%1" no existe y no se puede crear. - - - + Create Icon Crear icono - + Cannot create icon file. Path "%1" does not exist and cannot be created. No se puede crear el archivo de icono. La ruta "%1" no existe y no se ha podido crear. - + Start %1 with the yuzu Emulator Iniciar %1 con el Emulador yuzu - + Failed to create a shortcut at %1 Error al crear un acceso directo en %1 - + Successfully created a shortcut to %1 Se ha creado un acceso directo a %1 - + Error Opening %1 Error al intentar abrir %1 - + Select Directory Seleccionar directorio - + Properties Propiedades - + The game properties could not be loaded. No se pueden cargar las propiedades del juego. - + Switch Executable (%1);;All Files (*.*) %1 is an identifier for the Switch executable file extensions. Ejecutable de Switch (%1);;Todos los archivos (*.*) - + Load File Cargar archivo - + Open Extracted ROM Directory Abrir el directorio de la ROM extraída - + Invalid Directory Selected Directorio seleccionado no válido - + The directory you have selected does not contain a 'main' file. El directorio que ha seleccionado no contiene ningún archivo 'main'. - + Installable Switch File (*.nca *.nsp *.xci);;Nintendo Content Archive (*.nca);;Nintendo Submission Package (*.nsp);;NX Cartridge Image (*.xci) Archivo de Switch Instalable (*.nca *.nsp *.xci);;Archivo de contenidos de Nintendo (*.nca);;Paquete de envío de Nintendo (*.nsp);;Imagen de cartucho NX (*.xci) - + Install Files Instalar archivos - + %n file(s) remaining %n archivo(s) restantes%n archivo(s) restantes%n archivo(s) restantes - + Installing file "%1"... Instalando el archivo "%1"... - - + + Install Results Instalar resultados - + To avoid possible conflicts, we discourage users from installing base games to the NAND. Please, only use this feature to install updates and DLC. Para evitar posibles conflictos, no se recomienda a los usuarios que instalen juegos base en el NAND. Por favor, utiliza esta función sólo para instalar actualizaciones y DLCs. - + %n file(s) were newly installed %n archivo(s) recién instalado/s @@ -4365,7 +4364,7 @@ Por favor, utiliza esta función sólo para instalar actualizaciones y DLCs. - + %n file(s) were overwritten %n archivo(s) recién sobreescrito/s @@ -4374,7 +4373,7 @@ Por favor, utiliza esta función sólo para instalar actualizaciones y DLCs. - + %n file(s) failed to install %n archivo(s) no se instaló/instalaron @@ -4383,194 +4382,194 @@ Por favor, utiliza esta función sólo para instalar actualizaciones y DLCs. - + System Application Aplicación del sistema - + System Archive Archivo del sistema - + System Application Update Actualización de la aplicación del sistema - + Firmware Package (Type A) Paquete de firmware (Tipo A) - + Firmware Package (Type B) Paquete de firmware (Tipo B) - + Game Juego - + Game Update Actualización de juego - + Game DLC DLC del juego - + Delta Title Titulo delta - + Select NCA Install Type... Seleccione el tipo de instalación NCA... - + Please select the type of title you would like to install this NCA as: (In most instances, the default 'Game' is fine.) Seleccione el tipo de título en el que deseas instalar este NCA como: (En la mayoría de los casos, el 'Juego' predeterminado está bien). - + Failed to Install Fallo en la instalación - + The title type you selected for the NCA is invalid. El tipo de título que seleccionó para el NCA no es válido. - + File not found Archivo no encontrado - + File "%1" not found Archivo "%1" no encontrado - + OK Aceptar - - + + Hardware requirements not met No se cumplen los requisitos de hardware - - + + Your system does not meet the recommended hardware requirements. Compatibility reporting has been disabled. El sistema no cumple con los requisitos de hardware recomendados. Los informes de compatibilidad se han desactivado. - + Missing yuzu Account Falta la cuenta de Yuzu - + In order to submit a game compatibility test case, you must link your yuzu account.<br><br/>To link your yuzu account, go to Emulation &gt; Configuration &gt; Web. Para enviar un caso de prueba de compatibilidad de juegos, debes vincular tu cuenta de yuzu.<br><br/> Para vincular tu cuenta de yuzu, ve a Emulación &gt; Configuración &gt; Web. - + Error opening URL Error al abrir la URL - + Unable to open the URL "%1". No se puede abrir la URL "%1". - + TAS Recording Grabación TAS - + Overwrite file of player 1? ¿Sobrescribir archivo del jugador 1? - + Invalid config detected Configuración no válida detectada - + Handheld controller can't be used on docked mode. Pro controller will be selected. El controlador del modo portátil no puede ser usado en el modo sobremesa. Se seleccionará el controlador Pro en su lugar. - - + + Amiibo Amiibo - - + + The current amiibo has been removed El amiibo actual ha sido eliminado - + Error Error - - + + The current game is not looking for amiibos El juego actual no está buscando amiibos - + Amiibo File (%1);; All Files (*.*) Archivo amiibo (%1);; Todos los archivos (*.*) - + Load Amiibo Cargar amiibo - + Error loading Amiibo data Error al cargar los datos Amiibo - + The selected file is not a valid amiibo El archivo seleccionado no es un amiibo válido - + The selected file is already on use El archivo seleccionado ya se encuentra en uso - + An unknown error occurred Ha ocurrido un error inesperado - + Verification failed for the following files: %1 @@ -4579,145 +4578,177 @@ Por favor, utiliza esta función sólo para instalar actualizaciones y DLCs. - + + + No firmware available - + No hay firmware disponible - + + Please install the firmware to use the Album applet. + Por favor, instala el firmware para usar la aplicación del Álbum. + + + + Album Applet + Applet de Álbum + + + + Album applet is not available. Please reinstall firmware. + La aplicación del Álbum no esta disponible. Por favor, reinstala el firmware. + + + + Please install the firmware to use the Cabinet applet. + Por favor, instala el firmware para usar la applet de Cabinet. + + + + Cabinet Applet + Applet de Cabinet + + + + Cabinet applet is not available. Please reinstall firmware. + La applet de Cabinet no está disponible. Por favor, reinstale el firmware. + + + Please install the firmware to use the Mii editor. - + Por favor, instala el firmware para usar el editor de Mii. - + Mii Edit Applet - + Applet de Editor de Mii - + Mii editor is not available. Please reinstall firmware. - + El editor de Mii no está disponible. Por favor, reinstala el firmware. - + Capture Screenshot Captura de pantalla - + PNG Image (*.png) Imagen PNG (*.png) - + TAS state: Running %1/%2 Estado TAS: ejecutando %1/%2 - + TAS state: Recording %1 Estado TAS: grabando %1 - + TAS state: Idle %1/%2 Estado TAS: inactivo %1/%2 - + TAS State: Invalid Estado TAS: nulo - + &Stop Running &Parar de ejecutar - + &Start &Iniciar - + Stop R&ecording Pausar g&rabación - + R&ecord G&rabar - + Building: %n shader(s) Creando: %n shader(s)Construyendo: %n shader(s)Construyendo: %n shader(s) - + Scale: %1x %1 is the resolution scaling factor Escalado: %1x - + Speed: %1% / %2% Velocidad: %1% / %2% - + Speed: %1% Velocidad: %1% - + Game: %1 FPS (Unlocked) Juego: %1 FPS (desbloqueado) - + Game: %1 FPS Juego: %1 FPS - + Frame: %1 ms Fotogramas: %1 ms - + %1 %2 %1 %2 - + FSR FSR - + NO AA NO AA - + VOLUME: MUTE VOLUMEN: SILENCIO - + VOLUME: %1% Volume percentage (e.g. 50%) VOLUMEN: %1% - + Confirm Key Rederivation Confirmar la clave de rederivación - + You are about to force rederive all of your keys. If you do not know what this means or what you are doing, this is a potentially destructive action. @@ -4734,37 +4765,37 @@ es lo que quieres hacer si es necesario. Esto eliminará los archivos de las claves generadas automáticamente y volverá a ejecutar el módulo de derivación de claves. - + Missing fuses Faltan fuses - + - Missing BOOT0 - Falta BOOT0 - + - Missing BCPKG2-1-Normal-Main - Falta BCPKG2-1-Normal-Main - + - Missing PRODINFO - Falta PRODINFO - + Derivation Components Missing Faltan componentes de derivación - + Encryption keys are missing. <br>Please follow <a href='https://yuzu-emu.org/help/quickstart/'>the yuzu quickstart guide</a> to get all your keys, firmware and games.<br><br><small>(%1)</small> Faltan las claves de encriptación. <br>Por favor, sigue <a href='https://yuzu-emu.org/help/quickstart/'>la guía rápida de yuzu</a> para obtener todas tus claves, firmware y juegos.<br><br><small>(%1)</small> - + Deriving keys... This may take up to a minute depending on your system's performance. @@ -4773,49 +4804,49 @@ Esto puede llevar unos minutos dependiendo del rendimiento de su sistema. - + Deriving Keys Obtención de claves - + System Archive Decryption Failed Desencriptación del Sistema de Archivos Fallida - + Encryption keys failed to decrypt firmware. <br>Please follow <a href='https://yuzu-emu.org/help/quickstart/'>the yuzu quickstart guide</a> to get all your keys, firmware and games. Las claves de encriptación no han podido desencriptar el firmware. <br>Por favor, siga<a href='https://yuzu-emu.org/help/quickstart/'>la guía de inicio rápido de yuzu</a> para obtener todas tus claves, firmware y juegos. - + Select RomFS Dump Target Selecciona el destinatario para volcar el RomFS - + Please select which RomFS you would like to dump. Por favor, seleccione los RomFS que deseas volcar. - + Are you sure you want to close yuzu? ¿Estás seguro de que quieres cerrar yuzu? - - - + + + yuzu yuzu - + Are you sure you want to stop the emulation? Any unsaved progress will be lost. ¿Estás seguro de que quieres detener la emulación? Cualquier progreso no guardado se perderá. - + The currently running application has requested yuzu to not exit. Would you like to bypass this and exit anyway? @@ -4967,241 +4998,251 @@ Would you like to bypass this and exit anyway? GameList - + Favorite Favorito - + Start Game Iniciar juego - + Start Game without Custom Configuration Iniciar juego sin la configuración personalizada - + Open Save Data Location Abrir ubicación de los archivos de guardado - + Open Mod Data Location Abrir ubicación de los mods - + Open Transferable Pipeline Cache Abrir caché de canalización de shaders transferibles - + Remove Eliminar - + Remove Installed Update Eliminar la actualización instalada - + Remove All Installed DLC Eliminar todos los DLC instalados - + Remove Custom Configuration Eliminar la configuración personalizada - + + Remove Play Time Data + Eliminar información del tiempo de juego + + + Remove Cache Storage Quitar almacenamiento de caché - + Remove OpenGL Pipeline Cache Eliminar caché de canalización de OpenGL - + Remove Vulkan Pipeline Cache Eliminar caché de canalización de Vulkan - + Remove All Pipeline Caches Eliminar todas las cachés de canalización - + Remove All Installed Contents Eliminar todo el contenido instalado - - + + Dump RomFS Volcar RomFS - + Dump RomFS to SDMC Volcar RomFS a SDMC - + Verify Integrity Verificar Integridad - + Copy Title ID to Clipboard Copiar la ID del título al portapapeles - + Navigate to GameDB entry Ir a la sección de bases de datos del juego - + Create Shortcut Crear Acceso directo - + Add to Desktop Añadir al Escritorio - + Add to Applications Menu Añadir al menú de Aplicaciones - + Properties Propiedades - + Scan Subfolders Escanear subdirectorios - + Remove Game Directory Eliminar directorio de juegos - + ▲ Move Up ▲ Mover hacia arriba - + ▼ Move Down ▼ Mover hacia abajo - + Open Directory Location Abrir ubicación del directorio - + Clear Limpiar - + Name Nombre - + Compatibility Compatibilidad - + Add-ons Extras/Add-ons - + File type Tipo de archivo - + Size Tamaño + + + Play time + Tiempo de juego + GameListItemCompat - + Ingame Inicia - + Game starts, but crashes or major glitches prevent it from being completed. El juego se inicia, pero se bloquea o se producen fallos importantes que impiden completarlo. - + Perfect Perfecta - + Game can be played without issues. El juego se puede jugar sin problemas. - + Playable Jugable - + Game functions with minor graphical or audio glitches and is playable from start to finish. El juego funciona con pequeños errores gráficos o de sonido y es jugable de principio a fin. - + Intro/Menu Inicio/Menu - + Game loads, but is unable to progress past the Start Screen. El juego se ejecuta, pero no puede pasar de la pantalla de inicio. - + Won't Boot No funciona - + The game crashes when attempting to startup. El juego se bloquea al intentar iniciar. - + Not Tested Sin testear - + The game has not yet been tested. El juego todavía no ha sido testeado todavía. @@ -5209,7 +5250,7 @@ Would you like to bypass this and exit anyway? GameListPlaceholder - + Double-click to add a new folder to the game list Haz doble clic para agregar un nuevo directorio a la lista de juegos. @@ -5222,12 +5263,12 @@ Would you like to bypass this and exit anyway? %1 de %n resultado(s)%1 de %n resultado(s)%1 de %n resultado(s) - + Filter: Búsqueda: - + Enter pattern to filter Introduce un patrón para buscar @@ -5345,6 +5386,7 @@ Mensaje de depuración: + Main Window Ventana principal @@ -5450,6 +5492,11 @@ Mensaje de depuración: + Toggle Renderdoc Capture + Alternar Captura de Renderdoc + + + Toggle Status Bar Alternar barra de estado @@ -5688,186 +5735,216 @@ Mensaje de depuración: + &Amiibo + &Amiibo + + + &TAS &TAS - + &Help &Ayuda - + &Install Files to NAND... &Instalar archivos en NAND... - + L&oad File... C&argar archivo... - + Load &Folder... Cargar &carpeta - + E&xit S&alir - + &Pause &Pausar - + &Stop &Detener - + &Reinitialize keys... &Reiniciar claves... - + &Verify Installed Contents - + &Verificar contenidos instalados - + &About yuzu &Acerca de yuzu - + Single &Window Mode Modo &ventana - + Con&figure... Con&figurar... - + Display D&ock Widget Headers Mostrar complementos de cabecera del D&ock - + Show &Filter Bar Mostrar barra de &búsqueda - + Show &Status Bar Mostrar barra de &estado - + Show Status Bar Mostrar barra de estado - + &Browse Public Game Lobby &Buscar en el lobby de juegos públicos - + &Create Room &Crear sala - + &Leave Room &Abandonar sala - + &Direct Connect to Room &Conexión directa a una sala - + &Show Current Room &Mostrar sala actual - + F&ullscreen P&antalla completa - + &Restart &Reiniciar - + Load/Remove &Amiibo... Cargar/Eliminar &Amiibo... - + &Report Compatibility &Reporte de compatibilidad - + Open &Mods Page Abrir página de &mods - + Open &Quickstart Guide Abrir guía de &inicio rápido - + &FAQ &Preguntas frecuentes - + Open &yuzu Folder Abrir la carpeta de &yuzu - + &Capture Screenshot &Captura de pantalla - - Open &Mii Editor - + + Open &Album + Abrir &Álbum - + + &Set Nickname and Owner + &Darle Nombre y Propietario + + + + &Delete Game Data + &Borrar Datos de Juego + + + + &Restore Amiibo + &Restaurar Amiibo + + + + &Format Amiibo + &Formatear Amiibo + + + + Open &Mii Editor + Abrir Editor de &Mii + + + &Configure TAS... &Configurar TAS... - + Configure C&urrent Game... Configurar j&uego actual... - + &Start &Iniciar - + &Reset &Reiniciar - + R&ecord G&rabar @@ -6044,7 +6121,7 @@ Mensaje de depuración: Connection to room lost. Try to reconnect. - Conexión a la sala perdida. Intenta reconectarte. + Conexión a la sala perdida. Prueba a reconectarte. @@ -6175,27 +6252,27 @@ p, li { white-space: pre-wrap; } No jugando ningún juego - + Installed SD Titles Títulos instalados en la SD - + Installed NAND Titles Títulos instalados en NAND - + System Titles Títulos del sistema - + Add New Game Directory Añadir un nuevo directorio de juegos - + Favorites Favoritos @@ -6662,7 +6739,7 @@ p, li { white-space: pre-wrap; } No game data present - No hay datos del juego + No existen datos de juego @@ -6721,7 +6798,7 @@ p, li { white-space: pre-wrap; } - + Pro Controller Controlador Pro @@ -6734,7 +6811,7 @@ p, li { white-space: pre-wrap; } - + Dual Joycons Joycons duales @@ -6747,7 +6824,7 @@ p, li { white-space: pre-wrap; } - + Left Joycon Joycon izquierdo @@ -6760,7 +6837,7 @@ p, li { white-space: pre-wrap; } - + Right Joycon Joycon derecho @@ -6789,7 +6866,7 @@ p, li { white-space: pre-wrap; } - + Handheld Portátil @@ -6905,32 +6982,37 @@ p, li { white-space: pre-wrap; } 8 - + + Not enough controllers + No hay suficientes controladores. + + + GameCube Controller Controlador de GameCube - + Poke Ball Plus Poke Ball Plus - + NES Controller Control de NES - + SNES Controller Control de SNES - + N64 Controller Control de N64 - + Sega Genesis Sega Genesis @@ -7041,7 +7123,7 @@ Por favor, inténtalo de nuevo o contacta con el desarrollador del software. Format data for which user? - ¿Para qué usuario se borrarán sus datos? + ¿Para qué usuario se borrarán los datos? diff --git a/dist/languages/fr.ts b/dist/languages/fr.ts index 91025e950e..8b84420375 100644 --- a/dist/languages/fr.ts +++ b/dist/languages/fr.ts @@ -36,7 +36,7 @@ p, li { white-space: pre-wrap; } <html><head/><body><p><a href="https://yuzu-emu.org/"><span style=" text-decoration: underline; color:#039be5;">Website</span></a> | <a href="https://github.com/yuzu-emu"><span style=" text-decoration: underline; color:#039be5;">Source Code</span></a> | <a href="https://github.com/yuzu-emu/yuzu/graphs/contributors"><span style=" text-decoration: underline; color:#039be5;">Contributors</span></a> | <a href="https://github.com/yuzu-emu/yuzu/blob/master/LICENSE.txt"><span style=" text-decoration: underline; color:#039be5;">License</span></a></p></body></html> - <html><head/><body><p><a href="https://yuzu-emu.org/"><span style=" text-decoration: underline; color:#039be5;">Site Web</span></a> | <a href="https://github.com/yuzu-emu"><span style=" text-decoration: underline; color:#039be5;">Code Source </span></a> | <a href="https://github.com/yuzu-emu/yuzu/graphs/contributors"><span style=" text-decoration: underline; color:#039be5;">Contributeurs</span></a> | <a href="https://github.com/yuzu-emu/yuzu/blob/master/LICENSE.txt"><span style=" text-decoration: underline; color:#039be5;">Licence</span></a></p></body></html> + <html><head/><body><p><a href="https://yuzu-emu.org/"><span style=" text-decoration: underline; color:#039be5;">Site Web</span></a> | <a href="https://github.com/yuzu-emu"><span style=" text-decoration: underline; color:#039be5;">Code Source</span></a> | <a href="https://github.com/yuzu-emu/yuzu/graphs/contributors"><span style=" text-decoration: underline; color:#039be5;">Contributeurs</span></a> | <a href="https://github.com/yuzu-emu/yuzu/blob/master/LICENSE.txt"><span style=" text-decoration: underline; color:#039be5;">Licence</span></a></p></body></html> @@ -374,13 +374,13 @@ Cela bannirait à la fois son nom d'utilisateur du forum et son adresse IP. % - + Auto (%1) Auto select time zone Auto (%1) - + Default (%1) Default time zone Par défaut (%1) @@ -430,7 +430,7 @@ Cela bannirait à la fois son nom d'utilisateur du forum et son adresse IP. Click to preview - Cliquez pour prévisualiser + Cliquer pour prévisualiser @@ -730,7 +730,7 @@ Cela bannirait à la fois son nom d'utilisateur du forum et son adresse IP. Enable Extended Logging** - Activer la Journalisation Étendue** + Activer la journalisation étendue** @@ -830,7 +830,7 @@ Cela bannirait à la fois son nom d'utilisateur du forum et son adresse IP. Dump Game Shaders - Récupérer Shaders Jeu + Extraire les shaders du jeu @@ -875,7 +875,7 @@ Cela bannirait à la fois son nom d'utilisateur du forum et son adresse IP. Enable CPU Debugging - Activer le Débogage CPU + Activer le débogage CPU @@ -894,49 +894,29 @@ Cela bannirait à la fois son nom d'utilisateur du forum et son adresse IP. - Create Minidump After Crash - Créer un minidump après un crash - - - Enable this to output the latest generated audio command list to the console. Only affects games using the audio renderer. Activez cette option pour afficher la dernière liste de commandes audio générée sur la console. N'affecte que les jeux utilisant le moteur de rendu audio. - + Dump Audio Commands To Console** Déversez les commandes audio à la console** - + Enable Verbose Reporting Services** Activer les services de rapport verbeux** - + **This will be reset automatically when yuzu closes. **Ces options seront réinitialisées automatiquement lorsque yuzu fermera. - - Restart Required - Redémarrage nécessaire - - - - yuzu is required to restart in order to apply this setting. - yuzu doit redémarrer pour appliquer ce paramètre. - - - + Web applet not compiled Applet Web non compilé - - - MiniDump creation not compiled - Création de minidump non compilé - ConfigureDebugController @@ -1355,7 +1335,7 @@ Cela bannirait à la fois son nom d'utilisateur du forum et son adresse IP. - + Conflicting Key Sequence Séquence de touches conflictuelle @@ -1376,27 +1356,37 @@ Cela bannirait à la fois son nom d'utilisateur du forum et son adresse IP. Invalide - + + Invalid hotkey settings + Paramètres de raccourci invalides + + + + An error occurred. Please report this issue on github. + Une erreur s'est produite. Veuillez signaler ce problème sur GitHub. + + + Restore Default Restaurer les paramètres par défaut - + Clear Effacer - + Conflicting Button Sequence Séquence de bouton conflictuelle - + The default button sequence is already assigned to: %1 La séquence de bouton par défaut est déjà assignée à : %1 - + The default key sequence is already assigned to: %1 La séquence de touches par défaut est déjà attribuée à : %1 @@ -1695,7 +1685,7 @@ Cela bannirait à la fois son nom d'utilisateur du forum et son adresse IP. Ring Controller - Contrôleur Anneau + Contrôleur anneau @@ -3374,67 +3364,72 @@ Faites glisser les points pour modifier la position ou double-cliquez sur les ce Afficher la colonne des types de fichier - + + Show Play Time Column + Afficher la colonne de temps de jeu + + + Game Icon Size: Taille de l'icône du jeu : - + Folder Icon Size: Taille de l'icône du dossier : - + Row 1 Text: Texte rangée 1 : - + Row 2 Text: Texte rangée 2 : - + Screenshots Captures d'écran - + Ask Where To Save Screenshots (Windows Only) Demander où enregistrer les captures d'écran (Windows uniquement) - + Screenshots Path: Chemin du dossier des captures d'écran : - + ... ... - + TextLabel TextLabel - + Resolution: Résolution : - + Select Screenshots Path... Sélectionnez le chemin du dossier des captures d'écran... - + <System> <System> - + Auto (%1 x %2, %3 x %4) Screenshot width value Auto (%1 x %2, %3 x %4) @@ -3752,817 +3747,821 @@ Faites glisser les points pour modifier la position ou double-cliquez sur les ce GMainWindow - + <a href='https://yuzu-emu.org/help/feature/telemetry/'>Anonymous data is collected</a> to help improve yuzu. <br/><br/>Would you like to share your usage data with us? <a href='https://yuzu-emu.org/help/feature/telemetry/'>Des données anonymes sont collectées</a> pour aider à améliorer yuzu. <br/><br/>Voulez-vous partager vos données d'utilisations avec nous ? - + Telemetry Télémétrie - + Broken Vulkan Installation Detected - Installation Vulkan Cassée Détectée + Détection d'une installation Vulkan endommagée - + Vulkan initialization failed during boot.<br><br>Click <a href='https://yuzu-emu.org/wiki/faq/#yuzu-starts-with-the-error-broken-vulkan-installation-detected'>here for instructions to fix the issue</a>. L'initialisation de Vulkan a échoué lors du démarrage.<br><br>Cliquez <a href='https://yuzu-emu.org/wiki/faq/#yuzu-starts-with-the-error-broken-vulkan-installation-detected'>ici pour obtenir des instructions pour résoudre le problème</a>. - + Running a game TRANSLATORS: This string is shown to the user to explain why yuzu needs to prevent the computer from sleeping Exécution d'un jeu - + Loading Web Applet... - Chargement du Web Applet... + Chargement de l'applet web... - - + + Disable Web Applet Désactiver l'applet web - + Disabling the web applet can lead to undefined behavior and should only be used with Super Mario 3D All-Stars. Are you sure you want to disable the web applet? (This can be re-enabled in the Debug settings.) La désactivation de l'applet Web peut entraîner un comportement indéfini et ne doit être utilisée qu'avec Super Mario 3D All-Stars. Voulez-vous vraiment désactiver l'applet Web ? (Cela peut être réactivé dans les paramètres de débogage.) - + The amount of shaders currently being built La quantité de shaders en cours de construction - + The current selected resolution scaling multiplier. Le multiplicateur de mise à l'échelle de résolution actuellement sélectionné. - + Current emulation speed. Values higher or lower than 100% indicate emulation is running faster or slower than a Switch. Valeur actuelle de la vitesse de l'émulation. Des valeurs plus hautes ou plus basses que 100% indique que l'émulation fonctionne plus vite ou plus lentement qu'une véritable Switch. - + How many frames per second the game is currently displaying. This will vary from game to game and scene to scene. Combien d'image par seconde le jeu est en train d'afficher. Ceci vas varier de jeu en jeu et de scènes en scènes. - + Time taken to emulate a Switch frame, not counting framelimiting or v-sync. For full-speed emulation this should be at most 16.67 ms. Temps pris pour émuler une image par seconde de la switch, sans compter le limiteur d'image par seconde ou la synchronisation verticale. Pour une émulation à pleine vitesse, ceci devrait être au maximum à 16.67 ms. - + Unmute Remettre le son - + Mute Couper le son - + Reset Volume Réinitialiser le volume - + &Clear Recent Files &Effacer les fichiers récents - + Emulated mouse is enabled La souris émulée est activée - + Real mouse input and mouse panning are incompatible. Please disable the emulated mouse in input advanced settings to allow mouse panning. La saisie réelle de la souris et le panoramique de la souris sont incompatibles. Veuillez désactiver la souris émulée dans les paramètres avancés d'entrée pour permettre le panoramique de la souris. - + &Continue &Continuer - + &Pause &Pause - + Warning Outdated Game Format Avertissement : Le Format de jeu est dépassé - + You are using the deconstructed ROM directory format for this game, which is an outdated format that has been superseded by others such as NCA, NAX, XCI, or NSP. Deconstructed ROM directories lack icons, metadata, and update support.<br><br>For an explanation of the various Switch formats yuzu supports, <a href='https://yuzu-emu.org/wiki/overview-of-switch-game-formats'>check out our wiki</a>. This message will not be shown again. Vous utilisez un format de ROM déconstruite pour ce jeu, qui est donc un format dépassé qui à été remplacer par d'autre. Par exemple les formats NCA, NAX, XCI, ou NSP. Les destinations de ROM déconstruites manque des icônes, des métadonnée et du support de mise à jour.<br><br>Pour une explication des divers formats Switch que yuzu supporte, <a href='https://yuzu-emu.org/wiki/overview-of-switch-game-formats'>Regardez dans le wiki</a>. Ce message ne sera pas montré une autre fois. - + Error while loading ROM! Erreur lors du chargement de la ROM ! - + The ROM format is not supported. Le format de la ROM n'est pas supporté. - + An error occurred initializing the video core. Une erreur s'est produite lors de l'initialisation du noyau dédié à la vidéo. - + yuzu has encountered an error while running the video core. This is usually caused by outdated GPU drivers, including integrated ones. Please see the log for more details. For more information on accessing the log, please see the following page: <a href='https://yuzu-emu.org/help/reference/log-files/'>How to Upload the Log File</a>. yuzu a rencontré une erreur en exécutant le cœur vidéo. Cela est généralement causé par des pilotes graphiques trop anciens. Veuillez consulter les logs pour plus d'informations. Pour savoir comment accéder aux logs, veuillez vous référer à la page suivante : <a href='https://yuzu-emu.org/help/reference/log-files/'>Comment partager un fichier de log </a>. - + Error while loading ROM! %1 %1 signifies a numeric error code. Erreur lors du chargement de la ROM ! %1 - + %1<br>Please follow <a href='https://yuzu-emu.org/help/quickstart/'>the yuzu quickstart guide</a> to redump your files.<br>You can refer to the yuzu wiki</a> or the yuzu Discord</a> for help. %1 signifies an error string. %1<br>Veuillez suivre <a href='https://yuzu-emu.org/help/quickstart/'>le guide de démarrage rapide yuzu</a> pour retransférer vos fichiers.<br>Vous pouvez vous référer au wiki yuzu</a> ou le Discord yuzu</a> pour de l'assistance. - + An unknown error occurred. Please see the log for more details. Une erreur inconnue est survenue. Veuillez consulter le journal des logs pour plus de détails. - + (64-bit) (64-bit) - + (32-bit) (32-bit) - + %1 %2 %1 is the title name. %2 indicates if the title is 64-bit or 32-bit %1 %2 - + Closing software... Fermeture du logiciel... - + Save Data Enregistrer les données - + Mod Data Donnés du Mod - + Error Opening %1 Folder Erreur dans l'ouverture du dossier %1. - - + + Folder does not exist! Le dossier n'existe pas ! - + Error Opening Transferable Shader Cache Erreur lors de l'ouverture des Shader Cache Transferable - + Failed to create the shader cache directory for this title. Impossible de créer le dossier de cache du shader pour ce jeu. - + Error Removing Contents Erreur en enlevant le contenu - + Error Removing Update Erreur en enlevant la Mise à Jour - + Error Removing DLC Erreur en enlevant le DLC - + Remove Installed Game Contents? Enlever les données du jeu installé ? - + Remove Installed Game Update? Enlever la mise à jour du jeu installé ? - + Remove Installed Game DLC? Enlever le DLC du jeu installé ? - + Remove Entry Supprimer l'entrée - - - - - - + + + + + + Successfully Removed Supprimé avec succès - + Successfully removed the installed base game. Suppression du jeu de base installé avec succès. - + The base game is not installed in the NAND and cannot be removed. Le jeu de base n'est pas installé dans la NAND et ne peut pas être supprimé. - + Successfully removed the installed update. Suppression de la mise à jour installée avec succès. - + There is no update installed for this title. Il n'y a pas de mise à jour installée pour ce titre. - + There are no DLC installed for this title. Il n'y a pas de DLC installé pour ce titre. - + Successfully removed %1 installed DLC. Suppression de %1 DLC installé(s) avec succès. - + Delete OpenGL Transferable Shader Cache? Supprimer la Cache OpenGL de Shader Transférable? - + Delete Vulkan Transferable Shader Cache? Supprimer la Cache Vulkan de Shader Transférable? - + Delete All Transferable Shader Caches? Supprimer Toutes les Caches de Shader Transférable? - + Remove Custom Game Configuration? Supprimer la configuration personnalisée du jeu? - + Remove Cache Storage? Supprimer le stockage du cache ? - + Remove File Supprimer fichier - - + + Remove Play Time Data + Supprimer les données de temps de jeu + + + + Reset play time? + Réinitialiser le temps de jeu ? + + + + Error Removing Transferable Shader Cache Erreur lors de la suppression du cache de shader transférable - - + + A shader cache for this title does not exist. Un shader cache pour ce titre n'existe pas. - + Successfully removed the transferable shader cache. Suppression du cache de shader transférable avec succès. - + Failed to remove the transferable shader cache. Échec de la suppression du cache de shader transférable. - + Error Removing Vulkan Driver Pipeline Cache Erreur lors de la suppression du cache de pipeline de pilotes Vulkan - + Failed to remove the driver pipeline cache. Échec de la suppression du cache de pipeline de pilotes. - - + + Error Removing Transferable Shader Caches Erreur durant la Suppression des Caches de Shader Transférable - + Successfully removed the transferable shader caches. Suppression des caches de shader transférable effectuée avec succès. - + Failed to remove the transferable shader cache directory. Impossible de supprimer le dossier de la cache de shader transférable. - - + + Error Removing Custom Configuration Erreur lors de la suppression de la configuration personnalisée - + A custom configuration for this title does not exist. Il n'existe pas de configuration personnalisée pour ce titre. - + Successfully removed the custom game configuration. Suppression de la configuration de jeu personnalisée avec succès. - + Failed to remove the custom game configuration. Échec de la suppression de la configuration personnalisée du jeu. - - + + RomFS Extraction Failed! L'extraction de la RomFS a échoué ! - + There was an error copying the RomFS files or the user cancelled the operation. Une erreur s'est produite lors de la copie des fichiers RomFS ou l'utilisateur a annulé l'opération. - + Full Plein - + Skeleton Squelette - + Select RomFS Dump Mode Sélectionnez le mode d'extraction de la RomFS - + Please select the how you would like the RomFS dumped.<br>Full will copy all of the files into the new directory while <br>skeleton will only create the directory structure. Veuillez sélectionner la manière dont vous souhaitez que le fichier RomFS soit extrait.<br>Full copiera tous les fichiers dans le nouveau répertoire, tandis que<br>skeleton créera uniquement la structure de répertoires. - + There is not enough free space at %1 to extract the RomFS. Please free up space or select a different dump directory at Emulation > Configure > System > Filesystem > Dump Root Il n'y a pas assez d'espace libre dans %1 pour extraire la RomFS. Veuillez libérer de l'espace ou sélectionner un autre dossier d'extraction dans Émulation > Configurer > Système > Système de fichiers > Extraire la racine - + Extracting RomFS... Extraction de la RomFS ... - - - - + + + + Cancel Annuler - + RomFS Extraction Succeeded! Extraction de la RomFS réussi ! - - - + + + The operation completed successfully. L'opération s'est déroulée avec succès. - + Integrity verification couldn't be performed! La vérification de l'intégrité n'a pas pu être effectuée ! - + File contents were not checked for validity. La validité du contenu du fichier n'a pas été vérifiée. - - + + Integrity verification failed! La vérification de l'intégrité a échoué ! - + File contents may be corrupt. Le contenu du fichier pourrait être corrompu. - - + + Verifying integrity... Vérification de l'intégrité... - - + + Integrity verification succeeded! La vérification de l'intégrité a réussi ! - - - - - + + + + Create Shortcut Créer un raccourci - + This will create a shortcut to the current AppImage. This may not work well if you update. Continue? Cela créera un raccourci vers l'AppImage actuelle. Cela peut ne pas fonctionner correctement si vous mettez à jour. Continuer ? - - Cannot create shortcut on desktop. Path "%1" does not exist. - Impossible de créer un raccourci sur le bureau. Le chemin "%1" n'existe pas. + + Cannot create shortcut. Path "%1" does not exist. + Impossible de créer un raccourci. Le chemin "%1" n'existe pas. - - Cannot create shortcut in applications menu. Path "%1" does not exist and cannot be created. - Impossible de créer un raccourci dans le menu des applications. Le chemin "%1" n'existe pas et ne peut pas être créé. - - - + Create Icon Créer une icône - + Cannot create icon file. Path "%1" does not exist and cannot be created. Impossible de créer le fichier d'icône. Le chemin "%1" n'existe pas et ne peut pas être créé. - + Start %1 with the yuzu Emulator Démarrer %1 avec l'émulateur Yuzu - + Failed to create a shortcut at %1 Impossible de créer un raccourci vers %1 - + Successfully created a shortcut to %1 Création réussie d'un raccourci vers %1 - + Error Opening %1 Erreur lors de l'ouverture %1 - + Select Directory Sélectionner un répertoire - + Properties Propriétés - + The game properties could not be loaded. Les propriétés du jeu n'ont pas pu être chargées. - + Switch Executable (%1);;All Files (*.*) %1 is an identifier for the Switch executable file extensions. Exécutable Switch (%1);;Tous les fichiers (*.*) - + Load File Charger un fichier - + Open Extracted ROM Directory Ouvrir le dossier des ROM extraites - + Invalid Directory Selected Destination sélectionnée invalide - + The directory you have selected does not contain a 'main' file. Le répertoire que vous avez sélectionné ne contient pas de fichier "main". - + Installable Switch File (*.nca *.nsp *.xci);;Nintendo Content Archive (*.nca);;Nintendo Submission Package (*.nsp);;NX Cartridge Image (*.xci) Fichier Switch installable (*.nca *.nsp *.xci);;Nintendo Content Archive (*.nca);;Nintendo Submission Package (*.nsp);;NX Cartridge Image (*.xci) - + Install Files Installer les fichiers - + %n file(s) remaining %n fichier restant%n fichiers restants%n fichiers restants - + Installing file "%1"... Installation du fichier "%1" ... - - + + Install Results Résultats d'installation - + To avoid possible conflicts, we discourage users from installing base games to the NAND. Please, only use this feature to install updates and DLC. Pour éviter d'éventuels conflits, nous déconseillons aux utilisateurs d'installer des jeux de base sur la NAND. Veuillez n'utiliser cette fonctionnalité que pour installer des mises à jour et des DLC. - + %n file(s) were newly installed %n fichier a été nouvellement installé%n fichiers ont été nouvellement installés%n fichiers ont été nouvellement installés - + %n file(s) were overwritten %n fichier a été écrasé%n fichiers ont été écrasés%n fichiers ont été écrasés - + %n file(s) failed to install %n fichier n'a pas pu être installé%n fichiers n'ont pas pu être installés%n fichiers n'ont pas pu être installés - + System Application Application Système - + System Archive Archive Système - + System Application Update Mise à jour de l'application système - + Firmware Package (Type A) Paquet micrologiciel (Type A) - + Firmware Package (Type B) Paquet micrologiciel (Type B) - + Game Jeu - + Game Update Mise à jour de jeu - + Game DLC DLC de jeu - + Delta Title Titre Delta - + Select NCA Install Type... Sélectionner le type d'installation du NCA... - + Please select the type of title you would like to install this NCA as: (In most instances, the default 'Game' is fine.) Veuillez sélectionner le type de titre auquel vous voulez installer ce NCA : (Dans la plupart des cas, le titre par défaut : 'Jeu' est correct.) - + Failed to Install Échec de l'installation - + The title type you selected for the NCA is invalid. Le type de titre que vous avez sélectionné pour le NCA n'est pas valide. - + File not found Fichier non trouvé - + File "%1" not found Fichier "%1" non trouvé - + OK OK - - + + Hardware requirements not met Éxigences matérielles non respectées - - + + Your system does not meet the recommended hardware requirements. Compatibility reporting has been disabled. Votre système ne correspond pas aux éxigences matérielles. Les rapports de comptabilité ont été désactivés. - + Missing yuzu Account Compte yuzu manquant - + In order to submit a game compatibility test case, you must link your yuzu account.<br><br/>To link your yuzu account, go to Emulation &gt; Configuration &gt; Web. Pour soumettre un test de compatibilité pour un jeu, vous devez lier votre compte yuzu.<br><br/>Pour lier votre compte yuzu, aller à Emulation &gt; Configuration&gt; Web. - + Error opening URL Erreur lors de l'ouverture de l'URL - + Unable to open the URL "%1". Impossible d'ouvrir l'URL "%1". - + TAS Recording Enregistrement TAS - + Overwrite file of player 1? Écraser le fichier du joueur 1 ? - + Invalid config detected Configuration invalide détectée - + Handheld controller can't be used on docked mode. Pro controller will be selected. Le contrôleur portable ne peut pas être utilisé en mode TV. La manette pro sera sélectionné. - - + + Amiibo Amiibo - - + + The current amiibo has been removed L'amiibo actuel a été retiré - + Error Erreur - - + + The current game is not looking for amiibos Le jeu actuel ne cherche pas d'amiibos. - + Amiibo File (%1);; All Files (*.*) Fichier Amiibo (%1);; Tous les fichiers (*.*) - + Load Amiibo Charger un Amiibo - + Error loading Amiibo data Erreur lors du chargement des données Amiibo - + The selected file is not a valid amiibo Le fichier choisi n'est pas un amiibo valide - + The selected file is already on use Le fichier sélectionné est déjà utilisé - + An unknown error occurred Une erreur inconnue s'est produite - + Verification failed for the following files: %1 @@ -4571,145 +4570,177 @@ Veuillez n'utiliser cette fonctionnalité que pour installer des mises à j %1 - + + + No firmware available Pas de firmware disponible - + + Please install the firmware to use the Album applet. + Veuillez installer le firmware pour utiliser l'applet de l'album. + + + + Album Applet + Applet de l'album + + + + Album applet is not available. Please reinstall firmware. + L'applet de l'album n'est pas disponible. Veuillez réinstaller le firmware. + + + + Please install the firmware to use the Cabinet applet. + Veuillez installer le firmware pour utiliser l'applet du cabinet. + + + + Cabinet Applet + Applet du cabinet + + + + Cabinet applet is not available. Please reinstall firmware. + L'applet du cabinet n'est pas disponible. Veuillez réinstaller le firmware. + + + Please install the firmware to use the Mii editor. Veuillez installer le firmware pour utiliser l'éditeur Mii. - + Mii Edit Applet Applet de l'éditeur Mii - + Mii editor is not available. Please reinstall firmware. L'éditeur Mii n'est pas disponible. Veuillez réinstaller le firmware. - + Capture Screenshot Capture d'écran - + PNG Image (*.png) Image PNG (*.png) - + TAS state: Running %1/%2 État du TAS : En cours d'exécution %1/%2 - + TAS state: Recording %1 État du TAS : Enregistrement %1 - + TAS state: Idle %1/%2 État du TAS : Inactif %1:%2 - + TAS State: Invalid État du TAS : Invalide - + &Stop Running &Stopper l'exécution - + &Start &Start - + Stop R&ecording Stopper l'en&registrement - + R&ecord En&registrer - + Building: %n shader(s) Compilation: %n shaderCompilation : %n shadersCompilation : %n shaders - + Scale: %1x %1 is the resolution scaling factor Échelle : %1x - + Speed: %1% / %2% Vitesse : %1% / %2% - + Speed: %1% Vitesse : %1% - + Game: %1 FPS (Unlocked) Jeu : %1 IPS (Débloqué) - + Game: %1 FPS Jeu : %1 FPS - + Frame: %1 ms Frame : %1 ms - + %1 %2 %1 %2 - + FSR FSR - + NO AA AUCUN AA - + VOLUME: MUTE VOLUME : MUET - + VOLUME: %1% Volume percentage (e.g. 50%) VOLUME : %1% - + Confirm Key Rederivation Confirmer la réinstallation de la clé - + You are about to force rederive all of your keys. If you do not know what this means or what you are doing, this is a potentially destructive action. @@ -4726,37 +4757,37 @@ et éventuellement faites des sauvegardes. Cela supprimera vos fichiers de clé générés automatiquement et ré exécutera le module d'installation de clé. - + Missing fuses Fusibles manquants - + - Missing BOOT0 - BOOT0 manquant - + - Missing BCPKG2-1-Normal-Main - BCPKG2-1-Normal-Main manquant - + - Missing PRODINFO - PRODINFO manquant - + Derivation Components Missing Composants de dérivation manquants - + Encryption keys are missing. <br>Please follow <a href='https://yuzu-emu.org/help/quickstart/'>the yuzu quickstart guide</a> to get all your keys, firmware and games.<br><br><small>(%1)</small> Les clés de chiffrement sont manquantes. <br>Veuillez suivre <a href='https://yuzu-emu.org/help/quickstart/'>le guide de démarrage rapide yuzu</a> pour obtenir tous vos clés, firmware et jeux.<br><br><small>(%1)</small> - + Deriving keys... This may take up to a minute depending on your system's performance. @@ -4765,49 +4796,49 @@ Cela peut prendre jusqu'à une minute en fonction des performances de votre système. - + Deriving Keys Installation des clés - + System Archive Decryption Failed Échec du déchiffrement de l'archive système. - + Encryption keys failed to decrypt firmware. <br>Please follow <a href='https://yuzu-emu.org/help/quickstart/'>the yuzu quickstart guide</a> to get all your keys, firmware and games. Les clés de chiffrement n'ont pas réussi à déchiffrer le firmware. <br>Veuillez suivre <a href='https://yuzu-emu.org/help/quickstart/'>le guide de démarrage rapide du yuzu</a> pour obtenir toutes vos clés, firmware et jeux. - + Select RomFS Dump Target Sélectionner la cible d'extraction du RomFS - + Please select which RomFS you would like to dump. Veuillez sélectionner quel RomFS vous voulez extraire. - + Are you sure you want to close yuzu? Êtes vous sûr de vouloir fermer yuzu ? - - - + + + yuzu yuzu - + Are you sure you want to stop the emulation? Any unsaved progress will be lost. Êtes-vous sûr d'arrêter l'émulation ? Tout progrès non enregistré sera perdu. - + The currently running application has requested yuzu to not exit. Would you like to bypass this and exit anyway? @@ -4959,241 +4990,251 @@ Voulez-vous ignorer ceci and quitter quand même ? GameList - + Favorite Préférer - + Start Game Démarrer le jeu - + Start Game without Custom Configuration Démarrer le jeu sans configuration personnalisée - + Open Save Data Location Ouvrir l'emplacement des données de sauvegarde - + Open Mod Data Location Ouvrir l'emplacement des données des mods - + Open Transferable Pipeline Cache - Ouvrir la Cache de Pipeline Transférable + Ouvrir le cache de pipelines transférable - + Remove Supprimer - + Remove Installed Update Supprimer mise à jour installée - + Remove All Installed DLC Supprimer tous les DLC installés - + Remove Custom Configuration Supprimer la configuration personnalisée - + + Remove Play Time Data + Supprimer les données de temps de jeu + + + Remove Cache Storage Supprimer le stockage du cache - + Remove OpenGL Pipeline Cache - Supprimer la Cache de Pipeline OpenGL + Supprimer le cache de pipelines OpenGL - + Remove Vulkan Pipeline Cache - Supprimer la Cache de Pipeline Vulkan + Supprimer le cache de pipelines Vulkan - + Remove All Pipeline Caches - Supprimer Toutes les Caches de Pipeline + Supprimer tous les caches de pipelines - + Remove All Installed Contents Supprimer tout le contenu installé - - + + Dump RomFS Extraire la RomFS - + Dump RomFS to SDMC Décharger RomFS vers SDMC - + Verify Integrity Vérifier l'intégrité - + Copy Title ID to Clipboard Copier l'ID du titre dans le Presse-papiers - + Navigate to GameDB entry Accédez à l'entrée GameDB - + Create Shortcut Créer un raccourci - + Add to Desktop Ajouter au bureau - + Add to Applications Menu Ajouter au menu des applications - + Properties Propriétés - + Scan Subfolders Scanner les sous-dossiers - + Remove Game Directory Supprimer le répertoire du jeu - + ▲ Move Up ▲ Monter - + ▼ Move Down ▼ Descendre - + Open Directory Location Ouvrir l'emplacement du répertoire - + Clear Effacer - + Name Nom - + Compatibility Compatibilité - + Add-ons Extensions - + File type Type de fichier - + Size Taille + + + Play time + Temps de jeu + GameListItemCompat - + Ingame En jeu - + Game starts, but crashes or major glitches prevent it from being completed. Le jeu se lance, mais crash ou des bugs majeurs l'empêchent d'être complété. - + Perfect Parfait - + Game can be played without issues. Le jeu peut être joué sans problèmes. - + Playable Jouable - + Game functions with minor graphical or audio glitches and is playable from start to finish. Le jeu fonctionne avec des glitchs graphiques ou audio mineurs et est jouable du début à la fin. - + Intro/Menu Intro/Menu - + Game loads, but is unable to progress past the Start Screen. Le jeu charge, mais ne peut pas progresser après le menu de démarrage. - + Won't Boot Ne démarre pas - + The game crashes when attempting to startup. Le jeu crash au lancement. - + Not Tested Non testé - + The game has not yet been tested. Le jeu n'a pas encore été testé. @@ -5201,7 +5242,7 @@ Voulez-vous ignorer ceci and quitter quand même ? GameListPlaceholder - + Double-click to add a new folder to the game list Double-cliquez pour ajouter un nouveau dossier à la liste de jeux @@ -5214,12 +5255,12 @@ Voulez-vous ignorer ceci and quitter quand même ? %1 sur %n résultat%1 sur %n résultats%1 sur %n résultats - + Filter: Filtre : - + Enter pattern to filter Entrez un motif à filtrer @@ -5337,6 +5378,7 @@ Message de débogage : + Main Window Fenêtre Principale @@ -5442,6 +5484,11 @@ Message de débogage : + Toggle Renderdoc Capture + Activer la capture renderdoc + + + Toggle Status Bar Activer la barre d'état @@ -5680,186 +5727,216 @@ Message de débogage : + &Amiibo + &Amiibo + + + &TAS &TAS - + &Help &Aide - + &Install Files to NAND... &Installer des fichiers sur la NAND... - + L&oad File... &Charger un fichier... - + Load &Folder... &Charger un dossier - + E&xit Q&uitter - + &Pause &Pause - + &Stop &Arrêter - + &Reinitialize keys... &Réinitialiser les clés... - + &Verify Installed Contents &Vérifier les contenus installés - + &About yuzu &À propos de yuzu - + Single &Window Mode &Mode fenêtre unique - + Con&figure... &Configurer... - + Display D&ock Widget Headers &Afficher les en-têtes du widget Dock - + Show &Filter Bar &Afficher la barre de filtre - + Show &Status Bar &Afficher la barre d'état - + Show Status Bar Afficher la barre d'état - + &Browse Public Game Lobby &Parcourir le menu des jeux publics - + &Create Room &Créer un salon - + &Leave Room &Quitter le salon - + &Direct Connect to Room &Connexion directe au salon - + &Show Current Room &Afficher le salon actuel - + F&ullscreen P&lein écran - + &Restart &Redémarrer - + Load/Remove &Amiibo... Charger/Retirer &Amiibo… - + &Report Compatibility &Signaler la compatibilité - + Open &Mods Page Ouvrir la &page des mods - + Open &Quickstart Guide - Ouvrir le &guide de Démarrage rapide + Ouvrir le &guide de démarrage rapide - + &FAQ &FAQ - + Open &yuzu Folder Ouvrir le &dossier de Yuzu - + &Capture Screenshot &Capture d'écran - + + Open &Album + Ouvrir l'&album + + + + &Set Nickname and Owner + &Définir le surnom et le propriétaire + + + + &Delete Game Data + &Supprimer les données du jeu + + + + &Restore Amiibo + &Restaurer l'amiibo + + + + &Format Amiibo + &Formater l'amiibo + + + Open &Mii Editor Ouvrir l'&éditeur Mii - + &Configure TAS... &Configurer TAS... - + Configure C&urrent Game... Configurer le j&eu actuel... - + &Start &Démarrer - + &Reset &Réinitialiser - + R&ecord En&registrer @@ -6167,27 +6244,27 @@ p, li { white-space: pre-wrap; } Ne joue pas à un jeu - + Installed SD Titles Titres installés sur la SD - + Installed NAND Titles Titres installés sur la NAND - + System Titles Titres Système - + Add New Game Directory Ajouter un nouveau répertoire de jeu - + Favorites Favoris @@ -6713,7 +6790,7 @@ p, li { white-space: pre-wrap; } - + Pro Controller Manette Switch Pro @@ -6726,7 +6803,7 @@ p, li { white-space: pre-wrap; } - + Dual Joycons Deux Joycons @@ -6739,7 +6816,7 @@ p, li { white-space: pre-wrap; } - + Left Joycon Joycon gauche @@ -6752,7 +6829,7 @@ p, li { white-space: pre-wrap; } - + Right Joycon Joycon droit @@ -6781,7 +6858,7 @@ p, li { white-space: pre-wrap; } - + Handheld Mode Portable @@ -6897,32 +6974,37 @@ p, li { white-space: pre-wrap; } 8 - + + Not enough controllers + Pas assez de manettes. + + + GameCube Controller Manette GameCube - + Poke Ball Plus Poké Ball Plus - + NES Controller Manette NES - + SNES Controller Manette SNES - + N64 Controller Manette N64 - + Sega Genesis Sega Genesis diff --git a/dist/languages/hu.ts b/dist/languages/hu.ts index 3c14971ba4..863e7383ba 100644 --- a/dist/languages/hu.ts +++ b/dist/languages/hu.ts @@ -29,7 +29,7 @@ p, li { white-space: pre-wrap; } <html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } </style></head><body style=" font-family:'Ubuntu'; font-size:11pt; font-weight:400; font-style:normal;"> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'MS Shell Dlg 2'; font-size:12pt;">A yuzu egy kísérleti nyílt forráskódú emulátor a Nintendo Switchhez, GPLv3.0+ licenccel.</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'MS Shell Dlg 2'; font-size:12pt;">A yuzu egy kísérleti, nyílt forráskódú Nintendo Switch emulátor, amely a GPLv3.0+ licenc alatt áll.</span></p> <p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'MS Shell Dlg 2'; font-size:8pt;"><br /></p> <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'MS Shell Dlg 2'; font-size:12pt;">Ezt a szoftvert ne használd, ha nem legálisan szerezted meg a játékaidat.</span></p></body></html> @@ -213,7 +213,7 @@ Ez kitiltaná a fórum felhasználóneve és az IP címe alapján. %1 - %2 (%3/%4 members) - connected - %1 - %2 (%3/%4 tagok) - csatlakoztatva + %1 - %2 (%3/%4 tag) - csatlakoztatva @@ -237,7 +237,7 @@ Ez kitiltaná a fórum felhasználóneve és az IP címe alapján. <html><head/><body><p><span style=" font-size:10pt;">Should you choose to submit a test case to the </span><a href="https://yuzu-emu.org/game/"><span style=" font-size:10pt; text-decoration: underline; color:#0000ff;">yuzu Compatibility List</span></a><span style=" font-size:10pt;">, The following information will be collected and displayed on the site:</span></p><ul style="margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; -qt-list-indent: 1;"><li style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Hardware Information (CPU / GPU / Operating System)</li><li style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Which version of yuzu you are running</li><li style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">The connected yuzu account</li></ul></body></html> - <html><head/><body><p><span style=" font-size:10pt;">Szeretnél küldeni egy tesztelési jelentést a </span><a href="https://yuzu-emu.org/game/"><span style=" font-size:10pt; text-decoration: underline; color:#0000ff;">yuzu Kompatibilitás Listájára</span></a><span style=" font-size:10pt;">, A következő információkat fogjuk begyűjteni és megjeleníteni az oldalon:</span></p><ul style="margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; -qt-list-indent: 1;"><li style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Hardver Információk (CPU / GPU / Operációs rendszer)</li><li style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">A yuzu, milyen verzión fut</li><li style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">A használt yuzu fiók</li></ul></body></html> + <html><head/><body><p><span style=" font-size:10pt;">Ha úgy döntesz, hogy tesztesetet küldesz a </span><a href="https://yuzu-emu.org/game/"><span style=" font-size:10pt; text-decoration: underline; color:#0000ff;">yuzu kompatibilitási listára</span></a><span style=" font-size:10pt;">,a következő információkat gyűjtjük és jelenítjük meg az oldalon:</span></p><ul style="margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; -qt-list-indent: 1;"><li style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Hardverinformáció (CPU / GPU / operációs rendszer)</li><li style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">A yuzu futtatott verziója</li><li style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">A csatlakoztatott yuzu-fiók</li></ul></body></html> @@ -373,13 +373,13 @@ Ez kitiltaná a fórum felhasználóneve és az IP címe alapján. % - + Auto (%1) Auto select time zone Automatikus (%1) - + Default (%1) Default time zone Alapértelmezett (%1) @@ -404,12 +404,12 @@ Ez kitiltaná a fórum felhasználóneve és az IP címe alapján. Select where the image of the emulated camera comes from. It may be a virtual camera or a real camera. - + Válaszd ki, honnan származik az emulált kamera képe. Ez lehet egy virtuális vagy egy valódi kamera. Camera Image Source: - + Kamerakép forrása: @@ -434,7 +434,7 @@ Ez kitiltaná a fórum felhasználóneve és az IP címe alapján. Restore Defaults - Visszaállítás alapértelmezettre + Visszaállítás @@ -447,7 +447,7 @@ Ez kitiltaná a fórum felhasználóneve és az IP címe alapján. Form - + Forma @@ -480,7 +480,7 @@ Ez kitiltaná a fórum felhasználóneve és az IP címe alapján. Form - + Forma @@ -521,7 +521,7 @@ Ez kitiltaná a fórum felhasználóneve és az IP címe alapján. Enable block linking - + Blokk összekapcsolás engedélyezése @@ -533,7 +533,7 @@ Ez kitiltaná a fórum felhasználóneve és az IP címe alapján. Enable return stack buffer - + Visszatérési puffer engedélyezése @@ -552,36 +552,42 @@ Ez kitiltaná a fórum felhasználóneve és az IP címe alapján. <div>Enables an IR optimization that reduces unnecessary accesses to the CPU context structure.</div> - + + <div>Engedélyezi az IR-optimalizálást, amely csökkenti a CPU-kontextus struktúrájához való szükségtelen hozzáféréseket.</div> + Enable context elimination - + Kontextus kiküszöbölésének engedélyezése <div>Enables IR optimizations that involve constant propagation.</div> - + + <div>Lehetővé teszi az olyan IR-optimalizációkat, amelyek állandó továbbítással járnak.</div> + Enable constant propagation - + Állandó továbbítás engedélyezése <div>Enables miscellaneous IR optimizations.</div> - + + <div>Engedélyezi az egyéb IR-optimalizációkat. </div> + Enable miscellaneous optimizations - + Egyéb optimalizációk engedélyezése @@ -666,7 +672,7 @@ Ez kitiltaná a fórum felhasználóneve és az IP címe alapján. Enable GDB Stub - + GDB Stub engedélyezése @@ -681,22 +687,22 @@ Ez kitiltaná a fórum felhasználóneve és az IP címe alapján. Open Log Location - Naplózási Hely Megnyitása + Naplózási hely megnyitása Global Log Filter - Globális Naplózási Szűrő + Globális naplózási szűrő When checked, the max size of the log increases from 100 MB to 1 GB - Ha bepipálva marad, a naplózásnak a maximális nagysága 100 MB-ról 1 GB-ra növekszik + Ha be van jelölve, a napló maximális mérete 100 MB-ról 1 GB-ra nő. Enable Extended Logging** - Bővített Naplózás Engedélyezése + Bővített naplózás engedélyezése @@ -721,7 +727,7 @@ Ez kitiltaná a fórum felhasználóneve és az IP címe alapján. When checked, it executes shaders without loop logic changes - Ha be van pipálva, végrehajtja az árnyékolókat ismétlő logikai változtatások nélkül + Ha be van jelölve, végrehajtja az árnyékolókat ismétlő logikai változtatások nélkül @@ -731,7 +737,7 @@ Ez kitiltaná a fórum felhasználóneve és az IP címe alapján. When checked, it disables the macro HLE functions. Enabling this makes games run slower - Ha bepipálva marad, letiltja a macro HLE funkciókat. Ha engedélyezi, lassabban futnak a játékok + Ha be van jelölve, letiltja a macro HLE funkciókat. Ennek engedélyezése lelassítja a játékok sebességét. @@ -741,37 +747,37 @@ Ez kitiltaná a fórum felhasználóneve és az IP címe alapján. When checked, it will dump all the macro programs of the GPU - + Ha be van jelölve, ki fogja menteni a GPU összes makróprogramját. Dump Maxwell Macros - + Maxwell makrók kimentése When checked, it enables Nsight Aftermath crash dumps - + Ha be van jelölve, engedélyezi az Nsight Aftermath összeomlási naplókat. Enable Nsight Aftermath - Nsight Aftermath Engedélyezése + Nsight Aftermath engedélyezése When checked, yuzu will log statistics about the compiled pipeline cache - + Ha be van jelölve, a yuzu naplózza a fordított pipeline gyorsítótár statisztikáit. Enable Shader Feedback - Árnyékoló Visszajelzés Engedélyezése + Árnyékoló visszajelzés engedélyezése When checked, it disables the macro Just In Time compiler. Enabling this makes games run slower - Ha bepipálva marad, letiltja a macro Just In Time összegyűjtőt. Ha engedélyezi, lassabban futnak a játékok + Ha be van jelölve, letiltja a macro Just In Time fordítót. Ennek engedélyezése lelassítja a játékok sebességét. @@ -781,27 +787,27 @@ Ez kitiltaná a fórum felhasználóneve és az IP címe alapján. When checked, the graphics API enters a slower debugging mode - Ha bepipálva marad, a grafikai API lassabb hibakereső módba fog lépni + Ha be van jelölve, a grafikus API lassabb hibakereső módba lép. Enable Graphics Debugging - Grafikai Hibakereső Engedélyezése + Grafikai hibakereső engedélyezése When checked, it will dump all the original assembler shaders from the disk shader cache or game as found - + Ha be van jelölve, az összes eredeti assembler árnyékolót ki fogja menteni a lemez árnyékoló gyorsítótárból vagy a játékból, ahogyan azt találja. Dump Game Shaders - + Játék árnyékolók kimentése Enable Renderdoc Hotkey - + Renderdoc gyorsgomb engedélyezése @@ -811,22 +817,22 @@ Ez kitiltaná a fórum felhasználóneve és az IP címe alapján. Enables yuzu to check for a working Vulkan environment when the program starts up. Disable this if this is causing issues with external programs seeing yuzu. - Engedélyezi a yuzunak, hogy keressen működő Vulkan környezetet, amikor a program elindul. Tiltsa le, ha okoz problémát yuzu észlelésénél külsős programoknál + Lehetővé teszi, hogy a yuzu ellenőrizze a Vulkan környezet működését a program indításakor. Ha ez problémát okoz a külső programoknak a yuzu észlelésében, akkor tiltsd le ezt az opciót. Perform Startup Vulkan Check - Elindítási Vulkan Ellenőrzés Végrehajtása + Vulkan ellenőrzése indításkor Disable Web Applet - Webalkalmazás letiltása + Web applet letiltása Enable All Controller Types - Összes Kontroller Típus Engedélyezése + Összes vezérlőtípus engedélyezése @@ -836,12 +842,12 @@ Ez kitiltaná a fórum felhasználóneve és az IP címe alapján. Kiosk (Quest) Mode - Kiosk (Quest) Mód + Kiosk (Quest) mód Enable CPU Debugging - CPU Hibakereső Engedélyezése + CPU hibakereső engedélyezése @@ -860,56 +866,36 @@ Ez kitiltaná a fórum felhasználóneve és az IP címe alapján. - Create Minidump After Crash - - - - Enable this to output the latest generated audio command list to the console. Only affects games using the audio renderer. - + Dump Audio Commands To Console** - + Enable Verbose Reporting Services** - + **This will be reset automatically when yuzu closes. **Ez automatikusan visszaáll, amikor a yuzu leáll. - - Restart Required - Újraindítás Szükséges - - - - yuzu is required to restart in order to apply this setting. - Szükséges a yuzu újraindítása, hogy alkalmazzuk ezt a beállítást. - - - + Web applet not compiled - - - MiniDump creation not compiled - - ConfigureDebugController Configure Debug Controller - Hibakeresési Kontroller Konfigurálása + Hibakeresési vezérlő konfigurálása @@ -919,7 +905,7 @@ Ez kitiltaná a fórum felhasználóneve és az IP címe alapján. Defaults - Alapértelmezettek + Alap @@ -927,7 +913,7 @@ Ez kitiltaná a fórum felhasználóneve és az IP címe alapján. Form - + Forma @@ -951,7 +937,7 @@ Ez kitiltaná a fórum felhasználóneve és az IP címe alapján. Some settings are only available when a game is not running. - Valamely beállítások csak akkor elérhetőek, amikor nem fut játék. + Néhány beállítás csak akkor érhető el, amikor nem fut játék. @@ -1035,7 +1021,7 @@ Ez kitiltaná a fórum felhasználóneve és az IP címe alapján. Form - + Forma @@ -1099,7 +1085,7 @@ Ez kitiltaná a fórum felhasználóneve és az IP címe alapján. Dump ExeFS - + ExeFS kimentése @@ -1109,7 +1095,7 @@ Ez kitiltaná a fórum felhasználóneve és az IP címe alapján. Dump Root - + Gyökér kimentése @@ -1132,27 +1118,27 @@ Ez kitiltaná a fórum felhasználóneve és az IP címe alapján. Select Emulated NAND Directory... - Válasszon ki Emulált NAND Könyvtárat... + Emulált NAND könyvtár kiválasztása... Select Emulated SD Directory... - Válasszon ki Emulált SD Könyvtárat... + Emulált SD könyvtár kiválasztása... Select Gamecard Path... - Válasszon ki Játékkártya Könyvtárat... + Játékkártya könyvtár kiválasztása... Select Dump Directory... - + Kimentési mappa kiválasztása... Select Mod Load Directory... - Válasszon ki Mod Betöltő Könyvtárat... + Mod betöltő könyvtár kiválasztása... @@ -1175,7 +1161,7 @@ Ez kitiltaná a fórum felhasználóneve és az IP címe alapján. Form - + Forma @@ -1186,7 +1172,7 @@ Ez kitiltaná a fórum felhasználóneve és az IP címe alapján. Reset All Settings - Összes Beállítás Visszaállítása + Összes beállítás visszaállítása @@ -1204,7 +1190,7 @@ Ez kitiltaná a fórum felhasználóneve és az IP címe alapján. Form - + Forma @@ -1214,12 +1200,12 @@ Ez kitiltaná a fórum felhasználóneve és az IP címe alapján. API Settings - API Beállítások + API beállítások Graphics Settings - Grafikai Beállítások + Grafikai beállítások @@ -1263,7 +1249,7 @@ Ez kitiltaná a fórum felhasználóneve és az IP címe alapján. Form - + Forma @@ -1273,7 +1259,7 @@ Ez kitiltaná a fórum felhasználóneve és az IP címe alapján. Advanced Graphics Settings - Haladó Grafikai Beállítások + Haladó grafikai beállítások @@ -1281,7 +1267,7 @@ Ez kitiltaná a fórum felhasználóneve és az IP címe alapján. Hotkey Settings - Gyorsgomb Beállítások + Gyorsgomb beállítások @@ -1296,12 +1282,12 @@ Ez kitiltaná a fórum felhasználóneve és az IP címe alapján. Clear All - Összes Törlése + Összes törlése Restore Defaults - Visszaállítás alapértelmezettre + Visszaállítás @@ -1316,12 +1302,12 @@ Ez kitiltaná a fórum felhasználóneve és az IP címe alapján. Controller Hotkey - Kontroller Gyorsgomb + Vezérlő gyorsgomb - + Conflicting Key Sequence Ütköző kulcssorozat @@ -1342,27 +1328,37 @@ Ez kitiltaná a fórum felhasználóneve és az IP címe alapján. Érvénytelen - - Restore Default - Alapértelmezettre állítás + + Invalid hotkey settings + Érvénytelen gyorsbillentyű beállítások - + + An error occurred. Please report this issue on github. + + + + + Restore Default + Alapértelmezés + + + Clear Törlés - + Conflicting Button Sequence Ütköző gombsor - + The default button sequence is already assigned to: %1 Az alapértelmezett gombsor már hozzá van rendelve a: %1 - + The default key sequence is already assigned to: %1 Az alapértelmezett kulcssorozat már hozzá van rendelve a: %1 @@ -1372,7 +1368,7 @@ Ez kitiltaná a fórum felhasználóneve és az IP címe alapján. ConfigureInput - Bevitel Konfigurálása + Bevitel konfigurálása @@ -1431,12 +1427,12 @@ Ez kitiltaná a fórum felhasználóneve és az IP címe alapján. Console Mode - Konzol Mód + Konzol mód Docked - Dokkolva + Dokkolt @@ -1462,7 +1458,7 @@ Ez kitiltaná a fórum felhasználóneve és az IP címe alapján. Controllers - Kontrollerek + Vezérlők @@ -1512,7 +1508,7 @@ Ez kitiltaná a fórum felhasználóneve és az IP címe alapján. Defaults - Alapértelmezettek + Alap @@ -1525,12 +1521,12 @@ Ez kitiltaná a fórum felhasználóneve és az IP címe alapján. Configure Input - Bevitel Konfigurálása + Bevitel konfigurálása Joycon Colors - Joycon Színei + Joycon színei @@ -1547,7 +1543,7 @@ Ez kitiltaná a fórum felhasználóneve és az IP címe alapján. L Body - Bal Test + Bal test @@ -1559,7 +1555,7 @@ Ez kitiltaná a fórum felhasználóneve és az IP címe alapján. L Button - Bal Gomb + Bal gomb @@ -1571,7 +1567,7 @@ Ez kitiltaná a fórum felhasználóneve és az IP címe alapján. R Body - Jobb Test + Jobb test @@ -1583,7 +1579,7 @@ Ez kitiltaná a fórum felhasználóneve és az IP címe alapján. R Button - Jobb Gomb + Jobb gomb @@ -1623,7 +1619,7 @@ Ez kitiltaná a fórum felhasználóneve és az IP címe alapján. Emulated Devices - Emulált Eszközök + Emulált eszközök @@ -1648,7 +1644,7 @@ Ez kitiltaná a fórum felhasználóneve és az IP címe alapján. Debug Controller - Kontroller Hibakeresése + Vézérlő hibakeresése @@ -1661,12 +1657,12 @@ Ez kitiltaná a fórum felhasználóneve és az IP címe alapján. Ring Controller - Ring Kontroller + Ring kontroller Infrared Camera - Infravörös Kamera + Infravörös kamera @@ -1676,7 +1672,7 @@ Ez kitiltaná a fórum felhasználóneve és az IP címe alapján. Emulate Analog with Keyboard Input - Analóg Emulálása Billentyűzet Bevitellel + Analóg emulálása billentyűzet bevitellel @@ -1688,17 +1684,17 @@ Ez kitiltaná a fórum felhasználóneve és az IP címe alapján. Enable XInput 8 player support (disables web applet) - + XInput 8 játékos támogatás engedélyezése (web appletet letiltja) Enable UDP controllers (not needed for motion) - + UDP vezérlők engedélyezése (motionhöz nem szükséges) Controller navigation - Kontroller nagiváció + Kontroller navigáció @@ -1713,7 +1709,7 @@ Ez kitiltaná a fórum felhasználóneve és az IP címe alapján. Allows unlimited uses of the same Amiibo in games that would otherwise limit you to one use. - Engedélyezi az ugyanolyan Amiibo korlátlan használatát, olyan játékokban ahol másképpen egyszeri használatra lenne limitálva. + Lehetővé teszi, hogy ugyanazt az Amiibo-t korlátlanul használd olyan játékokban, amelyek egyébként csak egyszerre engednék használni. @@ -1731,7 +1727,7 @@ Ez kitiltaná a fórum felhasználóneve és az IP címe alapján. Form - + Forma @@ -1741,52 +1737,52 @@ Ez kitiltaná a fórum felhasználóneve és az IP címe alapján. Input Profiles - Beviteli Profilok + Beviteli profilok Player 1 Profile - Játékos 1 Profilja + Játékos 1 profilja Player 2 Profile - Játékos 2 Profilja + Játékos 2 profilja Player 3 Profile - Játékos 3 Profilja + Játékos 3 profilja Player 4 Profile - Játékos 4 Profilja + Játékos 4 profilja Player 5 Profile - Játékos 5 Profilja + Játékos 5 profilja Player 6 Profile - Játékos 6 Profilja + Játékos 6 profilja Player 7 Profile - Játékos 7 Profilja + Játékos 7 profilja Player 8 Profile - Játékos 8 Profilja + Játékos 8 profilja Use global input configuration - + Globális bemenet konfiguráció használata @@ -1799,7 +1795,7 @@ Ez kitiltaná a fórum felhasználóneve és az IP címe alapján. Configure Input - Bevitel Konfigurálása + Bevitel konfigurálása @@ -1809,7 +1805,7 @@ Ez kitiltaná a fórum felhasználóneve és az IP címe alapján. Input Device - Bemeneti Eszköz + Bemeneti eszköz @@ -1929,7 +1925,7 @@ Ez kitiltaná a fórum felhasználóneve és az IP címe alapján. L - + L @@ -1942,7 +1938,7 @@ Ez kitiltaná a fórum felhasználóneve és az IP címe alapján. Minus - + Mínusz @@ -1955,7 +1951,7 @@ Ez kitiltaná a fórum felhasználóneve és az IP címe alapján. Plus - + Plusz @@ -1969,7 +1965,7 @@ Ez kitiltaná a fórum felhasználóneve és az IP címe alapján. R - + R @@ -2021,13 +2017,13 @@ Ez kitiltaná a fórum felhasználóneve és az IP címe alapján. A - + A B - + B @@ -2038,7 +2034,7 @@ Ez kitiltaná a fórum felhasználóneve és az IP címe alapján. Mouse panning - + Egérpásztázás @@ -2060,7 +2056,7 @@ Ez kitiltaná a fórum felhasználóneve és az IP címe alapján. [not set] - [nincs beállítva] + [nincs beáll.] @@ -2078,7 +2074,7 @@ Ez kitiltaná a fórum felhasználóneve és az IP címe alapján. Turbo button - + Turbó gomb @@ -2091,7 +2087,7 @@ Ez kitiltaná a fórum felhasználóneve és az IP címe alapján. Set threshold - + Küszöbérték beállítása @@ -2129,7 +2125,7 @@ A tengely megfordításához mozgasd a kart először függőlegesen, majd vízs Center axis - + Középtengely @@ -2167,7 +2163,7 @@ A tengely megfordításához mozgasd a kart először függőlegesen, majd vízs Handheld - Kézben + Kézi @@ -2177,7 +2173,7 @@ A tengely megfordításához mozgasd a kart először függőlegesen, majd vízs Poke Ball Plus - + Poke Ball Plus @@ -2197,7 +2193,7 @@ A tengely megfordításához mozgasd a kart először függőlegesen, majd vízs Sega Genesis - + Sega Genesis @@ -2207,7 +2203,7 @@ A tengely megfordításához mozgasd a kart először függőlegesen, majd vízs Z - + Z @@ -2222,12 +2218,12 @@ A tengely megfordításához mozgasd a kart először függőlegesen, majd vízs Shake! - + Rázd! [waiting] - [várokazás] + [várakozás] @@ -2237,7 +2233,7 @@ A tengely megfordításához mozgasd a kart először függőlegesen, majd vízs Enter a profile name: - + Add meg a profil nevét: @@ -2253,7 +2249,7 @@ A tengely megfordításához mozgasd a kart először függőlegesen, majd vízs Failed to create the input profile "%1" - + A "%1" beviteli profilt nem sikerült létrehozni @@ -2263,7 +2259,7 @@ A tengely megfordításához mozgasd a kart először függőlegesen, majd vízs Failed to delete the input profile "%1" - + A "%1" beviteli profilt nem sikerült eltávolítani @@ -2273,7 +2269,7 @@ A tengely megfordításához mozgasd a kart először függőlegesen, majd vízs Failed to load the input profile "%1" - + A "%1" beviteli profilt nem sikerült betölteni @@ -2283,7 +2279,7 @@ A tengely megfordításához mozgasd a kart először függőlegesen, majd vízs Failed to save the input profile "%1" - + A "%1" beviteli profilt nem sikerült elmenteni @@ -2301,7 +2297,7 @@ A tengely megfordításához mozgasd a kart először függőlegesen, majd vízs Defaults - Alapértelmezettek + Alap @@ -2341,7 +2337,7 @@ A tengely megfordításához mozgasd a kart először függőlegesen, majd vízs CemuhookUDP Config - + CemuhookUDP konfig @@ -2422,7 +2418,7 @@ A tengely megfordításához mozgasd a kart először függőlegesen, majd vízs Unable to add more than 8 servers - + 8-nál több kiszolgálót nem lehet hozzáadni @@ -2442,7 +2438,7 @@ A tengely megfordításához mozgasd a kart először függőlegesen, majd vízs Successfully received data from the server. - + Az adatok sikeresen beérkeztek a kiszolgálótól. @@ -2457,7 +2453,7 @@ A tengely megfordításához mozgasd a kart először függőlegesen, majd vízs UDP Test or calibration configuration is in progress.<br>Please wait for them to finish. - + UDP tesztelés vagy a kalibrálás konfigurálása folyamatban van.<br>Kérjük, várj, amíg befejeződik. @@ -2465,17 +2461,17 @@ A tengely megfordításához mozgasd a kart először függőlegesen, majd vízs Configure mouse panning - + Egérpásztázás konfigurálása Enable mouse panning - + Egérpásztázás engedélyezése Can be toggled via a hotkey. Default hotkey is Ctrl + F9 - + Gyorsgombbal kapcsolható. Alapértelmezett gyorsbillentyű: Ctrl + F9 @@ -2524,7 +2520,7 @@ A tengely megfordításához mozgasd a kart először függőlegesen, majd vízs Strength - + Erősség @@ -2545,7 +2541,7 @@ Current values are %1% and %2% respectively. Emulated mouse is enabled. This is incompatible with mouse panning. - + Az emulált egér engedélyezve van. Ez nem kompatibilis az egérpásztázással. @@ -2563,7 +2559,7 @@ Current values are %1% and %2% respectively. Form - + Forma @@ -2578,7 +2574,7 @@ Current values are %1% and %2% respectively. Network Interface - + Hálózati adapter @@ -2591,12 +2587,12 @@ Current values are %1% and %2% respectively. Dialog - + Párbeszéd Info - + Infó @@ -2636,7 +2632,7 @@ Current values are %1% and %2% respectively. Some settings are only available when a game is not running. - Valamely beállítások csak akkor elérhetőek, amikor nem fut játék. + Néhány beállítás csak akkor érhető el, amikor nem fut játék. @@ -2671,7 +2667,7 @@ Current values are %1% and %2% respectively. Input Profiles - Beviteli Profilok + Beviteli profilok @@ -2684,7 +2680,7 @@ Current values are %1% and %2% respectively. Form - + Forma @@ -2694,7 +2690,7 @@ Current values are %1% and %2% respectively. Patch Name - Patch Név + Patch név @@ -2707,7 +2703,7 @@ Current values are %1% and %2% respectively. Form - + Forma @@ -2780,12 +2776,12 @@ Current values are %1% and %2% respectively. Enter a new username: - + Add meg az új felhasználóneved: Select User Image - + Felhasználói kép kiválasztása @@ -2800,7 +2796,7 @@ Current values are %1% and %2% respectively. Error occurred attempting to overwrite previous image at: %1. - + Hiba történt az előző kép felülírása során: %1. @@ -2810,37 +2806,37 @@ Current values are %1% and %2% respectively. Unable to delete existing file: %1. - + A meglévő fájl törlése nem lehetséges: %1. Error creating user image directory - + Hiba történt a felhasználó kép könyvtárának létrehozásakor Unable to create directory %1 for storing user images. - + Nem sikerült létrehozni a(z) %1 könyvtárat a felhasználó képeinek tárolásához. Error copying user image - + Hiba történt a felhasználói kép másolásakor Unable to copy image from %1 to %2 - + Nem sikerült kimásolni a képet innen %1 ide %2 Error resizing user image - + Hiba történt a felhasználói kép átméretezésekor Unable to resize image - + A kép nem méretezhető át @@ -2848,7 +2844,7 @@ Current values are %1% and %2% respectively. Delete this user? All of the user's save data will be deleted. - + Törlöd a felhasználót? Minden felhasználói adat törölve lesz. @@ -2859,7 +2855,8 @@ Current values are %1% and %2% respectively. Name: %1 UUID: %2 - + Név: %1 +UUID: %2 @@ -2926,7 +2923,7 @@ UUID: %2 Restore Defaults - Visszaállítás alapértelmezettre + Visszaállítás @@ -2936,7 +2933,7 @@ UUID: %2 [not set] - [nincs beállítva] + [nincs beáll.] @@ -2977,7 +2974,7 @@ UUID: %2 The current mapped device is not connected - + Az jelenleg hozzárendelt eszköz nincs csatlakoztatva @@ -2987,7 +2984,7 @@ UUID: %2 [waiting] - [várokazás] + [várakozás] @@ -2995,7 +2992,7 @@ UUID: %2 Form - + Forma @@ -3019,7 +3016,7 @@ UUID: %2 TAS - + TAS @@ -3044,7 +3041,7 @@ UUID: %2 Enable TAS features - + TAS funkciók engedélyezése @@ -3054,7 +3051,7 @@ UUID: %2 Pause execution during loads - + Végrehajtás szüneteltetése terhelés közben @@ -3077,7 +3074,7 @@ UUID: %2 TAS Configuration - + TAS konfigurálása @@ -3181,7 +3178,7 @@ Drag points to change position, or double-click table cells to edit values. Configure Touchscreen - + Érintőképernyő konfigurálása @@ -3191,27 +3188,27 @@ Drag points to change position, or double-click table cells to edit values. Touch Parameters - + Érintési paraméterek Touch Diameter Y - + Érintési átmérő Y Touch Diameter X - + Érintési átmérő X Rotational Angle - + Forgásszög Restore Defaults - Visszaállítás alapértelmezettre + Visszaállítás @@ -3231,7 +3228,7 @@ Drag points to change position, or double-click table cells to edit values. Standard (64x64) - + Szabványos (64x64) @@ -3251,7 +3248,7 @@ Drag points to change position, or double-click table cells to edit values. Standard (48x48) - + Szabványos (48x48) @@ -3284,7 +3281,7 @@ Drag points to change position, or double-click table cells to edit values. Form - + Forma @@ -3299,7 +3296,7 @@ Drag points to change position, or double-click table cells to edit values. Note: Changing language will apply your configuration. - + Megjegyzés: A nyelvváltoztatás azonnal érvénybe lép. @@ -3337,70 +3334,75 @@ Drag points to change position, or double-click table cells to edit values.Fájltípus oszlop mutatása - + + Show Play Time Column + Játékidő oszlop mutatása + + + Game Icon Size: Játék ikonméret: - + Folder Icon Size: Mappa ikonméret: - + Row 1 Text: 1. sor szövege: - + Row 2 Text: 2. sor szövege: - + Screenshots Képernyőmentések - + Ask Where To Save Screenshots (Windows Only) Kérdezze meg a képernyőmentések útvonalát (csak Windowson) - + Screenshots Path: Képernyőmentések útvonala: - + ... ... - + TextLabel - + Resolution: Felbontás: - + Select Screenshots Path... Képernyőmentések útvonala... - + <System> <System> - + Auto (%1 x %2, %3 x %4) Screenshot width value - Auto (%1 x %2, %3 x %4) + Automatikus (%1 x %2, %3 x %4) @@ -3488,7 +3490,7 @@ Drag points to change position, or double-click table cells to edit values. Form - + Forma @@ -3529,7 +3531,7 @@ Drag points to change position, or double-click table cells to edit values. What is my token? - + Mi a tokenem? @@ -3584,7 +3586,7 @@ Drag points to change position, or double-click table cells to edit values. <a href='https://yuzu-emu.org/wiki/yuzu-web-service/'><span style="text-decoration: underline; color:#039be5;">What is my token?</span></a> - + <a href='https://yuzu-emu.org/wiki/yuzu-web-service/'><span style="text-decoration: underline; color:#039be5;">Mi a tokenem?</span></a> @@ -3596,23 +3598,23 @@ Drag points to change position, or double-click table cells to edit values. Unspecified - + Nem meghatározott Token not verified - + Token nincs megerősítve Token was not verified. The change to your token has not been saved. - + Token nincs megerősítve. A változtatások nem lettek elmentve. Unverified, please click Verify before saving configuration Tooltip - + Nincs megerősítve, kattints a Megerősítés gombra mielőtt elmentenéd a konfigurációt @@ -3640,7 +3642,7 @@ Drag points to change position, or double-click table cells to edit values. Verification failed. Check that you have entered your token correctly, and that your internet connection is working. - Sikertelen megerősítése. Győződj meg róla, hogy helyesen írtad be a tokened, és van internetkapcsolatod. + Sikertelen megerősítés. Győződj meg róla, hogy helyesen írtad be a tokened, és van internetkapcsolatod. @@ -3661,7 +3663,7 @@ Drag points to change position, or double-click table cells to edit values. Direct Connect - Közvetlen kapcsolat + Közvetlen kapcsolódás @@ -3715,959 +3717,998 @@ Drag points to change position, or double-click table cells to edit values. GMainWindow - + <a href='https://yuzu-emu.org/help/feature/telemetry/'>Anonymous data is collected</a> to help improve yuzu. <br/><br/>Would you like to share your usage data with us? - + <a href='https://yuzu-emu.org/help/feature/telemetry/'>Névtelen adatok begyűjtve</a> a yuzu fejlesztésének segítéséhez. <br/><br/>Szeretnéd megosztani velünk a felhasználási adataidat? - + Telemetry Telemetria - + Broken Vulkan Installation Detected Hibás Vulkan telepítés észlelve - + Vulkan initialization failed during boot.<br><br>Click <a href='https://yuzu-emu.org/wiki/faq/#yuzu-starts-with-the-error-broken-vulkan-installation-detected'>here for instructions to fix the issue</a>. A Vulkan inicializálása sikertelen volt az indulás során. <br><br>Kattints ide<a href='https://yuzu-emu.org/wiki/faq/#yuzu-starts-with-the-error-broken-vulkan-installation-detected'>a probléma megoldásához szükséges instrukciókhoz</a>. - + Running a game TRANSLATORS: This string is shown to the user to explain why yuzu needs to prevent the computer from sleeping Játék közben - + Loading Web Applet... - Webalkalmazás betöltése... + Web applet betöltése... - - + + Disable Web Applet - Webalkalmazás letiltása + Web applet letiltása - + Disabling the web applet can lead to undefined behavior and should only be used with Super Mario 3D All-Stars. Are you sure you want to disable the web applet? (This can be re-enabled in the Debug settings.) - + The amount of shaders currently being built - + A jelenleg készülő árnyékolók mennyisége - + The current selected resolution scaling multiplier. - + Current emulation speed. Values higher or lower than 100% indicate emulation is running faster or slower than a Switch. - + Jelenlegi emuláció sebessége. 100%-nál magasabb vagy alacsonyabb érték azt jelzi, hogy mennyivel gyorsabb vagy lassabb a Switch-nél. - + How many frames per second the game is currently displaying. This will vary from game to game and scene to scene. - + A másodpercenként megjelenített képkockák számát mutatja. Ez játékonként és jelenetenként eltérő lehet. - + Time taken to emulate a Switch frame, not counting framelimiting or v-sync. For full-speed emulation this should be at most 16.67 ms. - + Egy Switch-kép emulálásához szükséges idő, képkockaszám-korlátozás és v-sync nélkül. Teljes sebességű emulálás esetén ennek legfeljebb 16.67 ms-nak kell lennie. - + Unmute Némítás feloldása - + Mute Némítás - + Reset Volume Hangerő visszaállítása - + &Clear Recent Files &Legutóbbi fájlok törlése - + Emulated mouse is enabled Emulált egér engedélyezve - + Real mouse input and mouse panning are incompatible. Please disable the emulated mouse in input advanced settings to allow mouse panning. - + &Continue &Folytatás - + &Pause &Szünet - + Warning Outdated Game Format Figyelmeztetés: Elavult játékformátum - + You are using the deconstructed ROM directory format for this game, which is an outdated format that has been superseded by others such as NCA, NAX, XCI, or NSP. Deconstructed ROM directories lack icons, metadata, and update support.<br><br>For an explanation of the various Switch formats yuzu supports, <a href='https://yuzu-emu.org/wiki/overview-of-switch-game-formats'>check out our wiki</a>. This message will not be shown again. - + Error while loading ROM! Hiba történt a ROM betöltése során! - + The ROM format is not supported. A ROM formátum nem támogatott. - + An error occurred initializing the video core. - + Hiba történt a videómag inicializálásakor. - + yuzu has encountered an error while running the video core. This is usually caused by outdated GPU drivers, including integrated ones. Please see the log for more details. For more information on accessing the log, please see the following page: <a href='https://yuzu-emu.org/help/reference/log-files/'>How to Upload the Log File</a>. - + Error while loading ROM! %1 %1 signifies a numeric error code. Hiba történt a ROM betöltése során! %1 - + %1<br>Please follow <a href='https://yuzu-emu.org/help/quickstart/'>the yuzu quickstart guide</a> to redump your files.<br>You can refer to the yuzu wiki</a> or the yuzu Discord</a> for help. %1 signifies an error string. - + An unknown error occurred. Please see the log for more details. Ismeretlen hiba történt. Nyisd meg a logot a részletekért. - + (64-bit) (64-bit) - + (32-bit) (32-bit) - + %1 %2 %1 is the title name. %2 indicates if the title is 64-bit or 32-bit %1 %2 - + Closing software... Szoftver bezárása... - + Save Data Mentett adat - + Mod Data Modolt adat - + Error Opening %1 Folder Hiba törént a(z) %1 mappa megnyitása során - - + + Folder does not exist! A mappa nem létezik! - + Error Opening Transferable Shader Cache - + Failed to create the shader cache directory for this title. Nem sikerült létrehozni az árnyékoló gyorsítótár könyvtárat ehhez a játékhoz. - + Error Removing Contents Hiba történt a játéktartalom eltávolítása során - + Error Removing Update Hiba történt a frissítés eltávolítása során - + Error Removing DLC Hiba történt a DLC eltávolítása során - + Remove Installed Game Contents? Törlöd a telepített játéktartalmat? - + Remove Installed Game Update? Törlöd a telepített játékfrissítést? - + Remove Installed Game DLC? Törlöd a telepített DLC-t? - + Remove Entry Bejegyzés törlése - - - - - - + + + + + + Successfully Removed Sikeresen eltávolítva - + Successfully removed the installed base game. A telepített alapjáték sikeresen el lett távolítva. - + The base game is not installed in the NAND and cannot be removed. Az alapjáték nincs telepítve a NAND-ra, ezért nem törölhető. - + Successfully removed the installed update. A telepített frissítés sikeresen el lett távolítva. - + There is no update installed for this title. Nincs telepítve frissítés ehhez a játékhoz. - + There are no DLC installed for this title. Nincs telepítve DLC ehhez a játékhoz. - + Successfully removed %1 installed DLC. %1 telepített DLC sikeresen eltávolítva. - + Delete OpenGL Transferable Shader Cache? - + Delete Vulkan Transferable Shader Cache? - + Delete All Transferable Shader Caches? - + Remove Custom Game Configuration? Törlöd az egyéni játék konfigurációt? - + Remove Cache Storage? Törlöd a gyorsítótárat? - + Remove File Fájl eltávolítása - - + + Remove Play Time Data + Játékidő törlése + + + + Reset play time? + Visszaállítod a játékidőt? + + + + Error Removing Transferable Shader Cache - - + + A shader cache for this title does not exist. - + Ehhez a játékhoz nem létezik árnyékoló gyorsítótár. - + Successfully removed the transferable shader cache. - + Failed to remove the transferable shader cache. - + Error Removing Vulkan Driver Pipeline Cache - + Failed to remove the driver pipeline cache. - - + + Error Removing Transferable Shader Caches - + Successfully removed the transferable shader caches. - + Failed to remove the transferable shader cache directory. - - + + Error Removing Custom Configuration Hiba történt az egyéni konfiguráció törlése során - + A custom configuration for this title does not exist. Nem létezik egyéni konfiguráció ehhez a játékhoz. - + Successfully removed the custom game configuration. Egyéni játék konfiguráció sikeresen eltávolítva. - + Failed to remove the custom game configuration. Nem sikerült eltávolítani az egyéni játék konfigurációt. - - + + RomFS Extraction Failed! RomFS kicsomagolása sikertelen! - + There was an error copying the RomFS files or the user cancelled the operation. Hiba történt a RomFS fájlok másolása közben, vagy a felhasználó megszakította a műveletet. - + Full Teljes - + Skeleton Csontváz - + Select RomFS Dump Mode - + Please select the how you would like the RomFS dumped.<br>Full will copy all of the files into the new directory while <br>skeleton will only create the directory structure. - + There is not enough free space at %1 to extract the RomFS. Please free up space or select a different dump directory at Emulation > Configure > System > Filesystem > Dump Root - + Extracting RomFS... RomFS kicsomagolása... - - - - + + + + Cancel Mégse - + RomFS Extraction Succeeded! - + RomFS kibontása sikeres volt! - - - + + + The operation completed successfully. A művelet sikeresen végrehajtva. - + Integrity verification couldn't be performed! - + Az integritás ellenőrzését nem lehetett elvégezni! - + File contents were not checked for validity. - + A fájl tartalmának érvényessége nem lett ellenőrizve. - - + + Integrity verification failed! - + Az integritás ellenőrzése sikertelen! - + File contents may be corrupt. - + A fájl tartalma sérült lehet. - - + + Verifying integrity... - + Integritás ellenőrzése... - - + + Integrity verification succeeded! - + Integritás ellenőrzése sikeres! - - - - - + + + + Create Shortcut Parancsikon létrehozása - + This will create a shortcut to the current AppImage. This may not work well if you update. Continue? - + Ez létrehoz egy parancsikont az aktuális AppImage-hez. Frissítés után nem garantált a helyes működése. Folytatod? - - Cannot create shortcut on desktop. Path "%1" does not exist. - + + Cannot create shortcut. Path "%1" does not exist. + Nem hozható létre parancsikon. Ez az útvonal nem létezik "%1". - - Cannot create shortcut in applications menu. Path "%1" does not exist and cannot be created. - - - - + Create Icon Ikon létrehozása - + Cannot create icon file. Path "%1" does not exist and cannot be created. - + Nem hozható létre az ikonfájl. Az útvonal "%1" nem létezik és nem is hozható létre. - + Start %1 with the yuzu Emulator - + %1 indítása a yuzu Emulátorral - + Failed to create a shortcut at %1 - + Nem sikerült létrehozni ezt a parancsikont %1 - + Successfully created a shortcut to %1 - + Parancsikon sikeresen létrehozva ide %1 - + Error Opening %1 - + Hiba a %1 megnyitásakor - + Select Directory Könyvtár kiválasztása - + Properties Tulajdonságok - + The game properties could not be loaded. - + A játék tulajdonságait nem sikerült betölteni. - + Switch Executable (%1);;All Files (*.*) %1 is an identifier for the Switch executable file extensions. - + Switch állományok(%1);;Minden fájl (*.*) - + Load File Fájl betöltése - + Open Extracted ROM Directory - + Kicsomagolt ROM könyvár megnyitása - + Invalid Directory Selected Érvénytelen könyvtár kiválasztva - + The directory you have selected does not contain a 'main' file. - + A kiválasztott könyvtár nem tartalmaz 'main' fájlt. - + Installable Switch File (*.nca *.nsp *.xci);;Nintendo Content Archive (*.nca);;Nintendo Submission Package (*.nsp);;NX Cartridge Image (*.xci) - + Telepíthető Switch fájl (*.nca *.nsp *.xci);;Nintendo Content Archive (*.nca);;Nintendo Submission Package (*.nsp);;NX Cartridge Image (*.xci) - + Install Files Fájlok telepítése - + %n file(s) remaining - + Installing file "%1"... "%1" fájl telepítése... - - + + Install Results Telepítés eredménye - + To avoid possible conflicts, we discourage users from installing base games to the NAND. Please, only use this feature to install updates and DLC. - + %n file(s) were newly installed - + %n file(s) were overwritten - + %n file(s) failed to install - + System Application Rendszeralkalmazás - + System Archive - + Rendszerarchívum - + System Application Update - + Rendszeralkalmazás frissítés - + Firmware Package (Type A) - + Firmware csomag (A típus) - + Firmware Package (Type B) - + Firmware csomag (B típus) - + Game Játék - + Game Update Játékfrissítés - + Game DLC Játék DLC - + Delta Title - + Select NCA Install Type... - + NCA telepítési típus kiválasztása... - + Please select the type of title you would like to install this NCA as: (In most instances, the default 'Game' is fine.) - + Kérjük, válaszd ki, hogy milyen típusú címként szeretnéd telepíteni ezt az NCA-t: +(A legtöbb esetben az alapértelmezett "Játék" megfelelő.) - + Failed to Install - + Nem sikerült telepíteni - + The title type you selected for the NCA is invalid. - + Az NCA-hoz kiválasztott címtípus érvénytelen. - + File not found Fájl nem található - + File "%1" not found "%1" fájl nem található - + OK OK - - + + Hardware requirements not met - + A hardverkövetelmények nem teljesülnek - - + + Your system does not meet the recommended hardware requirements. Compatibility reporting has been disabled. - + Az eszközöd nem felel meg az ajánlott hardverkövetelményeknek. A kompatibilitás jelentése letiltásra került. - + Missing yuzu Account - + Hiányzó yuzu fiók - + In order to submit a game compatibility test case, you must link your yuzu account.<br><br/>To link your yuzu account, go to Emulation &gt; Configuration &gt; Web. - + Error opening URL Hiba történt az URL megnyitása során - + Unable to open the URL "%1". Hiba történt az URL megnyitása során: "%1". - + TAS Recording - + TAS felvétel - + Overwrite file of player 1? - + Felülírod az 1. játékos fájlját? - + Invalid config detected Érvénytelen konfig észlelve - + Handheld controller can't be used on docked mode. Pro controller will be selected. - + A kézi vezérlés nem használható dokkolt módban. Helyette a Pro kontroller lesz kiválasztva. - - + + Amiibo Amiibo - - + + The current amiibo has been removed - + A jelenlegi amiibo el lett távolítva - + Error Hiba - - + + The current game is not looking for amiibos - + A jelenlegi játék nem keres amiibo-kat - + Amiibo File (%1);; All Files (*.*) Amiibo fájl (%1);; Minden fájl (*.*) - + Load Amiibo Amiibo betöltése - + Error loading Amiibo data - + Amiibo adatok betöltése sikertelen - + The selected file is not a valid amiibo - + A kiválasztott fájl nem érvényes amiibo - + The selected file is already on use A kiválasztott fájl már használatban van - + An unknown error occurred Ismeretlen hiba történt - + Verification failed for the following files: %1 - + Az alábbi fájlok ellenőrzése sikertelen volt: + +%1 - + + + No firmware available - + Nincs elérhető firmware - + + Please install the firmware to use the Album applet. + Kérjük, telepítsd a firmware-t az Album applet használatához. + + + + Album Applet + Album applet + + + + Album applet is not available. Please reinstall firmware. + Album applet nem elérhető. Kérjük, telepítsd újra a firmware-t. + + + + Please install the firmware to use the Cabinet applet. + Kérjük, telepítsd a firmware-t a kabinet applet használatához. + + + + Cabinet Applet + Kabinet applet + + + + Cabinet applet is not available. Please reinstall firmware. + Kabinet applet nem elérhető. Kérjük, telepítsd újra a firmware-t. + + + Please install the firmware to use the Mii editor. - + Kérjük, telepítsd a firmware-t a Mii-szerkesztő használatához. - + Mii Edit Applet - + Mii szerkesztő applet - + Mii editor is not available. Please reinstall firmware. - + A Mii szerkesztő nem elérhető. Kérjük, telepítsd újra a firmware-t. - + Capture Screenshot Képernyőkép készítése - + PNG Image (*.png) PNG kép (*.png) - + TAS state: Running %1/%2 - + TAS állapot: %1/%2 futtatása - + TAS state: Recording %1 - + TAS állapot: %1 felvétele - + TAS state: Idle %1/%2 - + TAS állapot: Tétlen %1/%2 - + TAS State: Invalid - + TAS állapot: Érvénytelen - + &Stop Running - + &Futás leállítása - + &Start &Indítás - + Stop R&ecording F&elvétel leállítása - + R&ecord F&elvétel - + Building: %n shader(s) - + Scale: %1x %1 is the resolution scaling factor Skálázás: %1x - + Speed: %1% / %2% Sebesség: %1% / %2% - + Speed: %1% Sebesség: %1% - + Game: %1 FPS (Unlocked) Játék: %1 FPS (Feloldva) - + Game: %1 FPS Játék: %1 FPS - + Frame: %1 ms Képkocka: %1 ms - + %1 %2 %1 %2 - + FSR FSR - + NO AA Nincs élsimítás - + VOLUME: MUTE HANGERŐ: NÉMÍTVA - + VOLUME: %1% Volume percentage (e.g. 50%) HANGERŐ: %1% - + Confirm Key Rederivation - + Kulcs újragenerálásának megerősítése - + You are about to force rederive all of your keys. If you do not know what this means or what you are doing, this is a potentially destructive action. @@ -4675,93 +4716,103 @@ Please make sure this is what you want and optionally make backups. This will delete your autogenerated key files and re-run the key derivation module. - + Épp az összes kulcs kényszerített újragenerálására készülsz. +Ha nem tudod, mit jelent, vagy mit csinálsz, +ez egy potenciálisan veszélyes művelet. +Kérljük, győződj meg róla, hogy ezt szeretnéd, +és opcionálisan készíts biztonsági másolatot. + +Ez törli az automatikusan generált kulcsfájlokat, és újraindítja a kulcsgeneráló modult. - + Missing fuses - + - Missing BOOT0 - Hiányzó BOOT0 - + - Missing BCPKG2-1-Normal-Main - Hiányzó BCPKG2-1-Normal-Main - + - Missing PRODINFO - Hiányzó PRODINFO - + Derivation Components Missing - + Encryption keys are missing. <br>Please follow <a href='https://yuzu-emu.org/help/quickstart/'>the yuzu quickstart guide</a> to get all your keys, firmware and games.<br><br><small>(%1)</small> - + Hiányzó titkosítási kulcsok. <br>Kérjük, kövesd a <a href='https://yuzu-emu.org/help/quickstart/'>yuzu gyorstájékoztatóját</a>, hogy megszerezd az összes kulcsot, firmware-t és játékot.<br><br><small>(%1)</small> - + Deriving keys... This may take up to a minute depending on your system's performance. - + Kulcsok generálása... +Ez akár egy percet is igénybe vehet, +rendszered teljesítményétől függően. - + Deriving Keys - + Kulcsok generálása - + System Archive Decryption Failed - + Rendszerarchívum visszafejtése sikertelen - + Encryption keys failed to decrypt firmware. <br>Please follow <a href='https://yuzu-emu.org/help/quickstart/'>the yuzu quickstart guide</a> to get all your keys, firmware and games. - + Select RomFS Dump Target - + Please select which RomFS you would like to dump. - + Are you sure you want to close yuzu? Biztosan be akarod zárni a yuzut? - - - + + + yuzu yuzu - + Are you sure you want to stop the emulation? Any unsaved progress will be lost. - + Biztos le akarod állítani az emulációt? Minden nem mentett adat el fog veszni. - + The currently running application has requested yuzu to not exit. Would you like to bypass this and exit anyway? - + Az éppen futó alkalmazás azt kérte a yuzu-tól, hogy ne lépjen ki. + +Mégis ki szeretnél lépni? @@ -4806,7 +4857,7 @@ Would you like to bypass this and exit anyway? Docked - Dokkolva + Dokkolt @@ -4901,247 +4952,257 @@ Would you like to bypass this and exit anyway? Your GPU may not support one or more required OpenGL extensions. Please ensure you have the latest graphics driver.<br><br>GL Renderer:<br>%1<br><br>Unsupported extensions:<br>%2 - + Előfordulhat, hogy a GPU-d nem támogat egy vagy több szükséges OpenGL kiterjesztést. Győződj meg róla, hogy a legújabb videokártya-illesztőprogramot használod.<br><br>GL Renderer:<br>%1<br><br>Nem támogatott kiterjesztések:<br>%2 GameList - + Favorite Kedvenc - + Start Game Játék indítása - + Start Game without Custom Configuration Játék indítása egyéni konfiguráció nélkül - + Open Save Data Location - + Open Mod Data Location - + Open Transferable Pipeline Cache - + Remove Eltávolítás - + Remove Installed Update Telepített frissítés eltávolítása - + Remove All Installed DLC Összes telepített DLC eltávolítása - + Remove Custom Configuration Egyéni konfiguráció eltávolítása - + + Remove Play Time Data + Játékidő törlése + + + Remove Cache Storage Gyorsítótár ürítése - + Remove OpenGL Pipeline Cache OpenGL Pipeline gyorsítótár eltávolítása - + Remove Vulkan Pipeline Cache - Vulkan Pipeline gyorsítótár eltávolítása + Vulkan pipeline gyorsítótár eltávolítása - + Remove All Pipeline Caches Az összes Pipeline gyorsítótár törlése - + Remove All Installed Contents Összes telepített tartalom törlése - - + + Dump RomFS - + RomFS kimentése - + Dump RomFS to SDMC - + RomFS kimentése SDMC-re - + Verify Integrity Integritás ellenőrzése - + Copy Title ID to Clipboard Játék címének vágólapra másolása - + Navigate to GameDB entry - + GameDB bejegyzéshez navigálás - + Create Shortcut Parancsikon létrehozása - + Add to Desktop Asztalhoz adás - + Add to Applications Menu Alkalmazások menühöz adás - + Properties Tulajdonságok - + Scan Subfolders Almappák szkennelése - + Remove Game Directory - + Játékkönyvtár eltávolítása - + ▲ Move Up - + ▲ Feljebb mozgatás - + ▼ Move Down - + ▼ Lejjebb mozgatás - + Open Directory Location - + Könyvtár helyének megnyitása - + Clear Törlés - + Name Név - + Compatibility Kompatibilitás - + Add-ons Kiegészítők - + File type Fájltípus - + Size Méret + + + Play time + Játékidő + GameListItemCompat - + Ingame Játékban - + Game starts, but crashes or major glitches prevent it from being completed. - + A játék elindul, de összeomlik, vagy súlyos hibák miatt nem fejezhető be. - + Perfect Tökéletes - + Game can be played without issues. A játék problémamentesen játszható. - + Playable Játszható - + Game functions with minor graphical or audio glitches and is playable from start to finish. A játék kisebb grafikai- és hanghibákkal végigjátszható. - + Intro/Menu Bevezető/Menü - + Game loads, but is unable to progress past the Start Screen. - + A játék betölt, de nem jut tovább a Kezdőképernyőn. - + Won't Boot Nem indul - + The game crashes when attempting to startup. - + A játék összeomlik indításkor. - + Not Tested Nem tesztelt - + The game has not yet been tested. Ez a játék még nem lett tesztelve. @@ -5149,9 +5210,9 @@ Would you like to bypass this and exit anyway? GameListPlaceholder - + Double-click to add a new folder to the game list - + Dupla kattintással új mappát adhatsz hozzá a játéklistához. @@ -5162,14 +5223,14 @@ Would you like to bypass this and exit anyway? - + Filter: Szűrés: - + Enter pattern to filter - + Adj meg egy mintát a szűréshez @@ -5187,7 +5248,7 @@ Would you like to bypass this and exit anyway? Preferred Game - + Preferált játék @@ -5237,7 +5298,7 @@ Would you like to bypass this and exit anyway? Host Room - + Szoba létrehozása @@ -5251,7 +5312,8 @@ Would you like to bypass this and exit anyway? Failed to announce the room to the public lobby. In order to host a room publicly, you must have a valid yuzu account configured in Emulation -> Configure -> Web. If you do not want to publish a room in the public lobby, then select Unlisted instead. Debug Message: - + Nem sikerült bejelenteni a szobát a nyilvános lobbiban. Ahhoz, hogy egy szobát nyilvánosan létrehozhass, érvényes yuzu-fiókkal kell rendelkezned, amelyet az Emuláció -> Konfigurálás -> Web menüpontban kell beállítanod. Ha nem szeretnél egy szobát közzétenni a nyilvános lobbiban, akkor válaszd helyette a Nem listázott lehetőséget. +Hibakereső üzenet: @@ -5284,6 +5346,7 @@ Debug Message: + Main Window Főablak @@ -5305,22 +5368,22 @@ Debug Message: Change Adapting Filter - + Alkalmazkodó szűrő módosítása Change Docked Mode - + Dokkolt mód módosítása Change GPU Accuracy - + GPU pontosság módosítása Continue/Pause Emulation - + Emuláció folytatása/szüneteltetése @@ -5345,7 +5408,7 @@ Debug Message: Load/Remove Amiibo - + Amiibo betöltése/törlése @@ -5360,17 +5423,17 @@ Debug Message: TAS Record - + TAS felvétel TAS Reset - + TAS visszaállítása TAS Start/Stop - + TAS indítása/leállítása @@ -5380,15 +5443,20 @@ Debug Message: Toggle Framerate Limit - + Képfrissítési korlát kapcsoló Toggle Mouse Panning - + Egérpásztázás kapcsoló + Toggle Renderdoc Capture + + + + Toggle Status Bar Állapotsáv kapcsoló @@ -5398,12 +5466,12 @@ Debug Message: Please confirm these are the files you wish to install. - + Kérjük, erősítsd meg, hogy ezeket a fájlokat szeretnéd telepíteni. Installing an Update or DLC will overwrite the previously installed one. - + Egy frissítés vagy DLC telepítése felülírja a korábban telepítettet. @@ -5422,7 +5490,8 @@ Debug Message: The text can't contain any of the following characters: %1 - + A szöveg nem tartalmazhatja a következő karakterek egyikét sem: +%1 @@ -5435,7 +5504,7 @@ Debug Message: Loading Shaders %v out of %m - Loading Shaders %v out of %m + Árnyékolók betöltése %v / %m @@ -5468,7 +5537,7 @@ Debug Message: Public Room Browser - + Nyilvános szoba böngésző @@ -5529,12 +5598,12 @@ Debug Message: Preferred Game - + Preferált játék Host - Hoszt + Házigazda @@ -5567,7 +5636,7 @@ Debug Message: &Emulation - + &Emuláció @@ -5626,186 +5695,216 @@ Debug Message: + &Amiibo + &Amiibo + + + &TAS &TAS - + &Help &Segítség - + &Install Files to NAND... - + &Fájlok telepítése a NAND-ra... - + L&oad File... - + F&ájl betöltése... - + Load &Folder... - + &Mappa betöltése... - + E&xit K&ilépés - + &Pause &Szünet - + &Stop &Leállítás - + &Reinitialize keys... - + &Kulcsok újraaktiválása... - + &Verify Installed Contents - + &Telepített tartalom ellenőrzése - + &About yuzu &A yuzuról - + Single &Window Mode - - - - - Con&figure... - Kon@figurálás + &Egyablakos mód - Display D&ock Widget Headers - + Con&figure... + Kon&figurálás - + + Display D&ock Widget Headers + D&ock Widget fejlécek megjelenítése + + + Show &Filter Bar &Szűrősáv mutatása - + Show &Status Bar &Állapotsáv mutatása - + Show Status Bar Állapotsáv mutatása - + &Browse Public Game Lobby &Nyilvános játéklobbi böngészése - + &Create Room &Szoba létrehozása - + &Leave Room &Szoba elhagyása - + &Direct Connect to Room - + &Közvetlen csatlakozás a szobához - + &Show Current Room - + &Jelenlegi szoba megjelenítése - + F&ullscreen - T@eljes képernyő + T&eljes képernyő - + &Restart &Újraindítás - + Load/Remove &Amiibo... &Amiibo betöltése/törlése... - + &Report Compatibility &Kompatibilitás jelentése - + Open &Mods Page &Módok oldal megnyitása - + Open &Quickstart Guide - + &Gyorstájékoztató megnyitása - + &FAQ &GYIK - + Open &yuzu Folder &yuzu mappa megnyitása - + &Capture Screenshot - + &Képernyőkép készítése - - Open &Mii Editor - - - - - &Configure TAS... - + + Open &Album + &Album megnyitása - Configure C&urrent Game... - + &Set Nickname and Owner + &Becenév és tulajdonos beállítása - + + &Delete Game Data + &Játékadatok törlése + + + + &Restore Amiibo + &Amiibo helyreállítása + + + + &Format Amiibo + &Amiibo formázása + + + + Open &Mii Editor + &Mii szerkesztő megnyitása + + + + &Configure TAS... + &TAS konfigurálása... + + + + Configure C&urrent Game... + J&elenlegi játék konfigurálása... + + + &Start &Indítás - + &Reset &Visszaállítás - + R&ecord F&elvétel @@ -5815,7 +5914,7 @@ Debug Message: &MicroProfile - + &Mikroprofil @@ -5903,7 +6002,8 @@ Debug Message: Failed to update the room information. Please check your Internet connection and try hosting the room again. Debug Message: - + Nem sikerült frissíteni a szoba adatait. Kérjük, ellenőrizd az internetkapcsolatot, és próbáld újra a szoba létrehozását. +Hibakereső üzenet: @@ -5931,22 +6031,22 @@ Debug Message: Port must be a number between 0 to 65535. - + A port csak 0 és 65535 közötti szám lehet. You must choose a Preferred Game to host a room. If you do not have any games in your game list yet, add a game folder by clicking on the plus icon in the game list. - + A szoba létrehozásához ki kell választanod egy Preferált játékot. Ha még nem szerepel a listádban egyetlen játék sem, adj hozzá egy játékmappát a játéklistában a plusz ikonra kattintva. Unable to find an internet connection. Check your internet settings. - + Nem található internetkapcsolat. Ellenőrizd az internetbeállításokat. Unable to connect to the host. Verify that the connection settings are correct. If you still cannot connect, contact the room host and verify that the host is properly configured with the external port forwarded. - + Nem sikerült csatlakozni a házigazdához. Ellenőrizd, hogy a kapcsolat beállításai helyesek-e. Ha még mindig nem tudsz csatlakozni, lépj kapcsolatba a gazdával, hogy ellenőrizze, megfelelően van-e konfigurálva a külső port továbbítása. @@ -5956,17 +6056,17 @@ Debug Message: Creating a room failed. Please retry. Restarting yuzu might be necessary. - + Szoba létrehozása sikertelen. Próbáld újra. A yuzu újraindítására szükség lehet. The host of the room has banned you. Speak with the host to unban you or try a different room. - + A szoba házigazdája kitiltott téged. Beszélj a házigazdával, hogy feloldjon téged, vagy csatlakozz másik szobához. Version mismatch! Please update to the latest version of yuzu. If the problem persists, contact the room host and ask them to update the server. - + Verzió eltérés! Kérjük, frissítsd a yuzut a legújabb verzióra. Ha a probléma továbbra is fennáll, vedd fel a kapcsolatot a házigazdával és kérd meg, hogy frissítse a szervert. @@ -5976,39 +6076,41 @@ Debug Message: An unknown error occurred. If this error continues to occur, please open an issue - + Ismeretlen hiba történt. Amennyiben a hiba továbbra is fennáll, nyiss egy hibajegyet. Connection to room lost. Try to reconnect. - + Megszakadt a kapcsolat a szobával. Próbálj újracsatlakozni. You have been kicked by the room host. - + A szoba házigazdája kirúgott téged. IP address is already in use. Please choose another. - + Az IP-cím már használatban van. Kérjük, válassz egy másikat. You do not have enough permission to perform this action. - + Nincs elég jogosultságod a művelet végrehajtásához. The user you are trying to kick/ban could not be found. They may have left the room. - + A felhasználó, akit ki akarsz rúgni/tiltani, nem található. +Lehet, hogy elhagyta a szobát. No valid network interface is selected. Please go to Configure -> System -> Network and make a selection. - + Nincs kiválasztva érvényes hálózati adapter. +Látogasd meg a Konfigurálás -> Rendszer -> Hálózat menüpontokat a beállításhoz. @@ -6019,7 +6121,8 @@ Please go to Configure -> System -> Network and make a selection. Joining a room when the game is already running is discouraged and can cause the room feature not to work correctly. Proceed anyway? - + Már játékban lévő szobához való csatlakozás nem ajánlott, és problémákat okozhat a szoba funkcióinak működésében. +Mindenképp folytatod? @@ -6029,7 +6132,7 @@ Proceed anyway? You are about to close the room. Any network connections will be closed. - + Éppen készülsz bezárni a szobát. Minden hálózati kapcsolat lezárul. @@ -6039,7 +6142,7 @@ Proceed anyway? You are about to leave the room. Any network connections will be closed. - + Éppen készülsz elhagyni a szobát. Minden hálózati kapcsolat lezárul. @@ -6055,7 +6158,7 @@ Proceed anyway? Dialog - + Párbeszéd @@ -6076,7 +6179,11 @@ Proceed anyway? p, li { white-space: pre-wrap; } </style></head><body style=" font-family:'MS Shell Dlg 2'; font-size:18pt; font-weight:400; font-style:normal;"> <p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br /></p></body></html> - + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> +<html><head><meta name="qrichtext" content="1" /><style type="text/css"> +p, li { white-space: pre-wrap; } +</style></head><body style=" font-family:'MS Shell Dlg 2'; font-size:18pt; font-weight:400; font-style:normal;"> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br /></p></body></html> @@ -6105,27 +6212,27 @@ p, li { white-space: pre-wrap; } Nincs játékban - + Installed SD Titles - + Telepített SD játékok - + Installed NAND Titles - + Telepített NAND játékok - + System Titles - + Rendszercímek - + Add New Game Directory - + Új játékkönyvtár hozzáadása - + Favorites Kedvencek @@ -6134,21 +6241,21 @@ p, li { white-space: pre-wrap; } Shift - + Shift Ctrl - + Ctrl Alt - + Alt @@ -6157,7 +6264,7 @@ p, li { white-space: pre-wrap; } [not set] - [nincs beállítva] + [nincs beáll.] @@ -6175,12 +6282,12 @@ p, li { white-space: pre-wrap; } Axis %1%2 - + Tengely %1%2 Button %1 - + Gomb %1 @@ -6191,7 +6298,7 @@ p, li { white-space: pre-wrap; } [unknown] - + [ismeretlen] @@ -6225,31 +6332,31 @@ p, li { white-space: pre-wrap; } Z - + Z R - + R L - + L A - + A B - + B @@ -6267,43 +6374,43 @@ p, li { white-space: pre-wrap; } Start - + Start L1 - + L1 L2 - + L2 L3 - + L3 R1 - + R1 R2 - + R2 R3 - + R3 @@ -6345,18 +6452,18 @@ p, li { white-space: pre-wrap; } [undefined] - + [nem definiált] %1%2 - + %1%2 [invalid] - + [érvénytelen] @@ -6370,13 +6477,13 @@ p, li { white-space: pre-wrap; } %1%2Axis %3 - + %1%2Tengely %3 %1%2Axis %3,%4,%5 - + %1%2Tengely %3,%4,%5 @@ -6388,13 +6495,13 @@ p, li { white-space: pre-wrap; } %1%2Button %3 - + %1%2Gomb %3 [unused] - + [nem használt] @@ -6429,12 +6536,12 @@ p, li { white-space: pre-wrap; } Plus - + Plusz Minus - + Mínusz @@ -6461,27 +6568,27 @@ p, li { white-space: pre-wrap; } Backward - + Hátra Forward - + Előre Task - + Feladat Extra - + Extra %1%2%3%4 - + %1%2%3%4 @@ -6493,13 +6600,13 @@ p, li { white-space: pre-wrap; } %1%2%3Axis %4 - + %1%2%3Tengely %4 %1%2%3Button %4 - + %1%2%3Gomb %4 @@ -6507,12 +6614,12 @@ p, li { white-space: pre-wrap; } Amiibo Settings - + Amiibo beállítások Amiibo Info - + Amiibo infó @@ -6532,7 +6639,7 @@ p, li { white-space: pre-wrap; } Amiibo Data - + Amiibo adatok @@ -6577,7 +6684,7 @@ p, li { white-space: pre-wrap; } Mount Amiibo - + Amiibo csatolása @@ -6597,7 +6704,7 @@ p, li { white-space: pre-wrap; } The following amiibo data will be formatted: - + Az alábbi amiibo adatok formázva lesznek: @@ -6607,12 +6714,12 @@ p, li { white-space: pre-wrap; } Set nickname and owner: - + Becenév és tulajdonos beállítása: Do you wish to restore this amiibo? - + Szeretnéd visszaállítani ezt az amiibót? @@ -6620,7 +6727,7 @@ p, li { white-space: pre-wrap; } Controller Applet - + Vezérlő applet @@ -6640,7 +6747,7 @@ p, li { white-space: pre-wrap; } P4 - + P4 @@ -6651,7 +6758,7 @@ p, li { white-space: pre-wrap; } - + Pro Controller Pro kontroller @@ -6664,7 +6771,7 @@ p, li { white-space: pre-wrap; } - + Dual Joycons @@ -6677,7 +6784,7 @@ p, li { white-space: pre-wrap; } - + Left Joycon Bal Joycon @@ -6690,7 +6797,7 @@ p, li { white-space: pre-wrap; } - + Right Joycon Jobb Joycon @@ -6719,44 +6826,44 @@ p, li { white-space: pre-wrap; } - + Handheld Kézi P3 - + P3 P7 - + P7 P8 - + P8 P5 - + P5 P6 - + P6 Console Mode - Konzol Mód + Konzol mód Docked - Dokkolva + Dokkolt @@ -6787,7 +6894,7 @@ p, li { white-space: pre-wrap; } Controllers - Kontrollerek + Vezérlők @@ -6835,34 +6942,39 @@ p, li { white-space: pre-wrap; } 8 - + + Not enough controllers + Nincs elég vezérlő + + + GameCube Controller GameCube kontroller - + Poke Ball Plus - + Poke Ball Plus - + NES Controller NES kontroller - + SNES Controller SNES kontroller - + N64 Controller N64 kontroller - + Sega Genesis - + Sega Genesis @@ -6878,7 +6990,8 @@ p, li { white-space: pre-wrap; } An error has occurred. Please try again or contact the developer of the software. - + Hiba történt. +Kérjük, próbáld újra, vagy lépj kapcsolatba a szoftver fejlesztőjével. @@ -6959,7 +7072,7 @@ Please try again or contact the developer of the software. Select a user to link to a Nintendo Account. - + Válassz ki egy felhasználót a Nintendo fiókkal való összekapcsoláshoz. @@ -6969,7 +7082,7 @@ Please try again or contact the developer of the software. Format data for which user? - + Melyik felhasználó adatait formázzuk? @@ -7006,7 +7119,11 @@ Please try again or contact the developer of the software. p, li { white-space: pre-wrap; } </style></head><body style=" font-family:'MS Shell Dlg 2'; font-size:26pt; font-weight:400; font-style:normal;"> <p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br /></p></body></html> - + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> +<html><head><meta name="qrichtext" content="1" /><style type="text/css"> +p, li { white-space: pre-wrap; } +</style></head><body style=" font-family:'MS Shell Dlg 2'; font-size:26pt; font-weight:400; font-style:normal;"> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br /></p></body></html> @@ -7046,7 +7163,7 @@ p, li { white-space: pre-wrap; } waited by no thread - + nem vár egy szálra sem @@ -7064,32 +7181,32 @@ p, li { white-space: pre-wrap; } sleeping - + alszik waiting for IPC reply - + IPC válaszra várakozás waiting for objects - + várakozás objektumokra waiting for condition variable - + várakozás állapotváltozóra waiting for address arbiter - + várakozás címkiosztásra waiting for suspend resume - + várakozás felfüggesztés folytatására @@ -7124,7 +7241,7 @@ p, li { white-space: pre-wrap; } core %1 - + mag %1 @@ -7134,22 +7251,22 @@ p, li { white-space: pre-wrap; } affinity mask = %1 - + affinitás maszk = %1 thread id = %1 - + szál azonosító = %1 priority = %1(current) / %2(normal) - + prioritás = %1(jelenleg) / %2(normál) last running ticks = %1 - + utolsó futó tickek = %1 @@ -7157,7 +7274,7 @@ p, li { white-space: pre-wrap; } waited by thread - + szálra várakozás @@ -7165,7 +7282,7 @@ p, li { white-space: pre-wrap; } &Wait Tree - + &Várófa \ No newline at end of file diff --git a/dist/languages/id.ts b/dist/languages/id.ts index bbf0ed89a5..6a1475f137 100644 --- a/dist/languages/id.ts +++ b/dist/languages/id.ts @@ -365,13 +365,13 @@ This would ban both their forum username and their IP address. % - + Auto (%1) Auto select time zone - + Default (%1) Default time zone @@ -855,49 +855,29 @@ Memungkinkan berbagai macam optimasi IR. - Create Minidump After Crash - - - - Enable this to output the latest generated audio command list to the console. Only affects games using the audio renderer. - + Dump Audio Commands To Console** - + Enable Verbose Reporting Services** Nyalakan Layanan Laporan Bertele-tele** - + **This will be reset automatically when yuzu closes. **Ini akan diatur ulang secara otomatis ketika yuzu ditutup. - - Restart Required - - - - - yuzu is required to restart in order to apply this setting. - yuzu harus dimuat-ulang untuk mengaplikasikan pengaturan ini. - - - + Web applet not compiled - - - MiniDump creation not compiled - - ConfigureDebugController @@ -1316,7 +1296,7 @@ Memungkinkan berbagai macam optimasi IR. - + Conflicting Key Sequence Urutan Tombol yang Konflik @@ -1337,27 +1317,37 @@ Memungkinkan berbagai macam optimasi IR. Tidak valid - + + Invalid hotkey settings + + + + + An error occurred. Please report this issue on github. + + + + Restore Default Kembalikan ke Semula - + Clear Bersihkan - + Conflicting Button Sequence - + The default button sequence is already assigned to: %1 - + The default key sequence is already assigned to: %1 Urutan tombol bawaan sudah diterapkan ke: %1 @@ -3332,67 +3322,72 @@ Drag points to change position, or double-click table cells to edit values. - + + Show Play Time Column + + + + Game Icon Size: Ukuran Ikon Game: - + Folder Icon Size: Ukuran Ikon Folder: - + Row 1 Text: Teks Baris 1: - + Row 2 Text: Teks Baris 2: - + Screenshots Screenshot - + Ask Where To Save Screenshots (Windows Only) Menanya Dimana Untuk Menyimpan Screenshot (Hanya untuk Windows) - + Screenshots Path: Jalur Screenshot: - + ... ... - + TextLabel - + Resolution: Resolusi: - + Select Screenshots Path... Pilih Jalur Screenshot... - + <System> <System> - + Auto (%1 x %2, %3 x %4) Screenshot width value @@ -3710,963 +3705,999 @@ Drag points to change position, or double-click table cells to edit values. GMainWindow - + <a href='https://yuzu-emu.org/help/feature/telemetry/'>Anonymous data is collected</a> to help improve yuzu. <br/><br/>Would you like to share your usage data with us? <a href='https://yuzu-emu.org/help/feature/telemetry/'>Data anonim dikumpulkan</a> untuk membantu yuzu. <br/><br/>Apa Anda ingin membagi data penggunaan dengan kami? - + Telemetry Telemetri - + Broken Vulkan Installation Detected - + Vulkan initialization failed during boot.<br><br>Click <a href='https://yuzu-emu.org/wiki/faq/#yuzu-starts-with-the-error-broken-vulkan-installation-detected'>here for instructions to fix the issue</a>. - + Running a game TRANSLATORS: This string is shown to the user to explain why yuzu needs to prevent the computer from sleeping - + Loading Web Applet... Memuat Applet Web... - - + + Disable Web Applet Matikan Applet Web - + Disabling the web applet can lead to undefined behavior and should only be used with Super Mario 3D All-Stars. Are you sure you want to disable the web applet? (This can be re-enabled in the Debug settings.) - + The amount of shaders currently being built Jumlah shader yang sedang dibuat - + The current selected resolution scaling multiplier. Pengali skala resolusi yang terpilih. - + Current emulation speed. Values higher or lower than 100% indicate emulation is running faster or slower than a Switch. Kecepatan emulasi saat ini. Nilai yang lebih tinggi atau rendah dari 100% menandakan pengemulasian berjalan lebih cepat atau lambat dibanding Switch aslinya. - + How many frames per second the game is currently displaying. This will vary from game to game and scene to scene. Berapa banyak frame per second (bingkai per detik) permainan akan ditampilkan. Ini akan berubah dari berbagai permainan dan pemandangan. - + Time taken to emulate a Switch frame, not counting framelimiting or v-sync. For full-speed emulation this should be at most 16.67 ms. Waktu yang diperlukan untuk mengemulasikan bingkai Switch, tak menghitung pembatas bingkai atau v-sync. Agar emulasi berkecepatan penuh, ini harus 16.67 mdtk. - + Unmute Membunyikan - + Mute Bisukan - + Reset Volume Atur ulang tingkat suara - + &Clear Recent Files &Bersihkan Berkas Baru-baru Ini - + Emulated mouse is enabled - + Real mouse input and mouse panning are incompatible. Please disable the emulated mouse in input advanced settings to allow mouse panning. - + &Continue &Lanjutkan - + &Pause &Jeda - + Warning Outdated Game Format Peringatan Format Permainan yang Usang - + You are using the deconstructed ROM directory format for this game, which is an outdated format that has been superseded by others such as NCA, NAX, XCI, or NSP. Deconstructed ROM directories lack icons, metadata, and update support.<br><br>For an explanation of the various Switch formats yuzu supports, <a href='https://yuzu-emu.org/wiki/overview-of-switch-game-formats'>check out our wiki</a>. This message will not be shown again. Anda menggunakan format direktori ROM yang sudah didekonstruksi untuk permainan ini, yang mana itu merupakan format lawas yang sudah tergantikan oleh yang lain seperti NCA, NAX, XCI, atau NSP. Direktori ROM yang sudah didekonstruksi kekurangan ikon, metadata, dan dukungan pembaruan.<br><br>Untuk penjelasan berbagai format Switch yang didukung yuzu, <a href='https://yuzu-emu.org/wiki/overview-of-switch-game-formats'>periksa wiki kami</a>. Pesan ini tidak akan ditampilkan lagi. - + Error while loading ROM! Kesalahan ketika memuat ROM! - + The ROM format is not supported. Format ROM tak didukung. - + An error occurred initializing the video core. Terjadi kesalahan ketika menginisialisasi inti video. - + yuzu has encountered an error while running the video core. This is usually caused by outdated GPU drivers, including integrated ones. Please see the log for more details. For more information on accessing the log, please see the following page: <a href='https://yuzu-emu.org/help/reference/log-files/'>How to Upload the Log File</a>. yuzu telah mengalami error saat menjalankan inti video. Ini biasanya disebabkan oleh pemicu piranti (driver) GPU yang usang, termasuk yang terintegrasi. Mohon lihat catatan untuk informasi lebih rinci. Untuk informasi cara mengakses catatan, mohon lihat halaman berikut: <a href='https://yuzu-emu.org/help/reference/log-files/'>Cara Mengupload Berkas Catatan</a>. - + Error while loading ROM! %1 %1 signifies a numeric error code. - + %1<br>Please follow <a href='https://yuzu-emu.org/help/quickstart/'>the yuzu quickstart guide</a> to redump your files.<br>You can refer to the yuzu wiki</a> or the yuzu Discord</a> for help. %1 signifies an error string. - + An unknown error occurred. Please see the log for more details. Terjadi kesalahan yang tak diketahui. Mohon lihat catatan untuk informasi lebih rinci. - + (64-bit) (64-bit) - + (32-bit) (32-bit) - + %1 %2 %1 is the title name. %2 indicates if the title is 64-bit or 32-bit %1 %2 - + Closing software... - + Save Data Simpan Data - + Mod Data Mod Data - + Error Opening %1 Folder Gagal Membuka Folder %1 - - + + Folder does not exist! Folder tak ada! - + Error Opening Transferable Shader Cache Gagal Ketika Membuka Tembolok Shader yang Dapat Ditransfer - + Failed to create the shader cache directory for this title. - + Error Removing Contents Error saat menghapus konten - + Error Removing Update Error saat menghapus Update - + Error Removing DLC Error saat menghapus DLC - + Remove Installed Game Contents? Hapus Konten Game yang terinstall? - + Remove Installed Game Update? Hapus Update Game yang terinstall? - + Remove Installed Game DLC? Hapus DLC Game yang terinstall? - + Remove Entry Hapus Masukan - - - - - - + + + + + + Successfully Removed Berhasil menghapus - + Successfully removed the installed base game. - + The base game is not installed in the NAND and cannot be removed. - + Successfully removed the installed update. - + There is no update installed for this title. - + There are no DLC installed for this title. Tidak ada DLC yang terinstall untuk judul ini. - + Successfully removed %1 installed DLC. - + Delete OpenGL Transferable Shader Cache? - + Delete Vulkan Transferable Shader Cache? - + Delete All Transferable Shader Caches? - + Remove Custom Game Configuration? - + Remove Cache Storage? - + Remove File Hapus File - - + + Remove Play Time Data + + + + + Reset play time? + + + + + Error Removing Transferable Shader Cache Kesalahan Menghapus Transferable Shader Cache - - + + A shader cache for this title does not exist. Cache shader bagi judul ini tidak ada - + Successfully removed the transferable shader cache. - + Failed to remove the transferable shader cache. - + Error Removing Vulkan Driver Pipeline Cache - + Failed to remove the driver pipeline cache. - - + + Error Removing Transferable Shader Caches - + Successfully removed the transferable shader caches. - + Failed to remove the transferable shader cache directory. - - + + Error Removing Custom Configuration Kesalahan Menghapus Konfigurasi Buatan - + A custom configuration for this title does not exist. - + Successfully removed the custom game configuration. - + Failed to remove the custom game configuration. - - + + RomFS Extraction Failed! Pengekstrakan RomFS Gagal! - + There was an error copying the RomFS files or the user cancelled the operation. Terjadi kesalahan ketika menyalin berkas RomFS atau dibatalkan oleh pengguna. - + Full Penuh - + Skeleton Skeleton - + Select RomFS Dump Mode Pilih Mode Dump RomFS - + Please select the how you would like the RomFS dumped.<br>Full will copy all of the files into the new directory while <br>skeleton will only create the directory structure. Mohon pilih cara RomFS akan di-dump.<br>FPenuh akan menyalin seluruh berkas ke dalam direktori baru sementara <br>jerangkong hanya akan menciptakan struktur direktorinya saja. - + There is not enough free space at %1 to extract the RomFS. Please free up space or select a different dump directory at Emulation > Configure > System > Filesystem > Dump Root - + Extracting RomFS... Mengekstrak RomFS... - - - - + + + + Cancel Batal - + RomFS Extraction Succeeded! Pengekstrakan RomFS Berhasil! - - - + + + The operation completed successfully. Operasi selesai dengan sukses, - + Integrity verification couldn't be performed! - + File contents were not checked for validity. - - + + Integrity verification failed! - + File contents may be corrupt. - - + + Verifying integrity... - - + + Integrity verification succeeded! - - - - - + + + + Create Shortcut Buat Pintasan - + This will create a shortcut to the current AppImage. This may not work well if you update. Continue? - - Cannot create shortcut on desktop. Path "%1" does not exist. + + Cannot create shortcut. Path "%1" does not exist. - - Cannot create shortcut in applications menu. Path "%1" does not exist and cannot be created. - - - - + Create Icon Buat ikon - + Cannot create icon file. Path "%1" does not exist and cannot be created. - + Start %1 with the yuzu Emulator - + Failed to create a shortcut at %1 - + Successfully created a shortcut to %1 - + Error Opening %1 Gagal membuka %1 - + Select Directory Pilih Direktori - + Properties Properti - + The game properties could not be loaded. Properti permainan tak dapat dimuat. - + Switch Executable (%1);;All Files (*.*) %1 is an identifier for the Switch executable file extensions. Eksekutabel Switch (%1);;Semua Berkas (*.*) - + Load File Muat Berkas - + Open Extracted ROM Directory Buka Direktori ROM Terekstrak - + Invalid Directory Selected Direktori Terpilih Tidak Sah - + The directory you have selected does not contain a 'main' file. Direktori yang Anda pilih tak memiliki berkas 'utama.' - + Installable Switch File (*.nca *.nsp *.xci);;Nintendo Content Archive (*.nca);;Nintendo Submission Package (*.nsp);;NX Cartridge Image (*.xci) - + Install Files Install File - + %n file(s) remaining - + Installing file "%1"... Memasang berkas "%1"... - - + + Install Results Hasil Install - + To avoid possible conflicts, we discourage users from installing base games to the NAND. Please, only use this feature to install updates and DLC. - + %n file(s) were newly installed %n file(s) baru diinstall - + %n file(s) were overwritten %n file(s) telah ditimpa - + %n file(s) failed to install %n file(s) gagal di install - + System Application Aplikasi Sistem - + System Archive Arsip Sistem - + System Application Update Pembaruan Aplikasi Sistem - + Firmware Package (Type A) Paket Perangkat Tegar (Tipe A) - + Firmware Package (Type B) Paket Perangkat Tegar (Tipe B) - + Game Permainan - + Game Update Pembaruan Permainan - + Game DLC DLC Permainan - + Delta Title Judul Delta - + Select NCA Install Type... Pilih Tipe Pemasangan NCA... - + Please select the type of title you would like to install this NCA as: (In most instances, the default 'Game' is fine.) Mohon pilih jenis judul yang Anda ingin pasang sebagai NCA ini: (Dalam kebanyakan kasus, pilihan bawaan 'Permainan' tidak apa-apa`.) - + Failed to Install Gagal Memasang - + The title type you selected for the NCA is invalid. Jenis judul yang Anda pilih untuk NCA tidak sah. - + File not found Berkas tak ditemukan - + File "%1" not found Berkas "%1" tak ditemukan - + OK OK - - + + Hardware requirements not met - - + + Your system does not meet the recommended hardware requirements. Compatibility reporting has been disabled. - + Missing yuzu Account Akun yuzu Hilang - + In order to submit a game compatibility test case, you must link your yuzu account.<br><br/>To link your yuzu account, go to Emulation &gt; Configuration &gt; Web. Agar dapat mengirimkan berkas uju kompatibilitas permainan, Anda harus menautkan akun yuzu Anda.<br><br/>TUntuk mennautkan akun yuzu Anda, pergi ke Emulasi &gt; Konfigurasi &gt; Web. - + Error opening URL Kesalahan saat membuka URL - + Unable to open the URL "%1". Tidak dapat membuka URL "%1". - + TAS Recording Rekaman TAS - + Overwrite file of player 1? Timpa file pemain 1? - + Invalid config detected Konfigurasi tidak sah terdeteksi - + Handheld controller can't be used on docked mode. Pro controller will be selected. Kontroller jinjing tidak bisa digunakan dalam mode dock. Kontroller Pro akan dipilih - - + + Amiibo - - + + The current amiibo has been removed - + Error - - + + The current game is not looking for amiibos - + Amiibo File (%1);; All Files (*.*) Berkas Amiibo (%1);; Semua Berkas (*.*) - + Load Amiibo Muat Amiibo - + Error loading Amiibo data Gagal memuat data Amiibo - + The selected file is not a valid amiibo - + The selected file is already on use - + An unknown error occurred - + Verification failed for the following files: %1 - + + + No firmware available - + + Please install the firmware to use the Album applet. + + + + + Album Applet + + + + + Album applet is not available. Please reinstall firmware. + + + + + Please install the firmware to use the Cabinet applet. + + + + + Cabinet Applet + + + + + Cabinet applet is not available. Please reinstall firmware. + + + + Please install the firmware to use the Mii editor. - + Mii Edit Applet - + Mii editor is not available. Please reinstall firmware. - + Capture Screenshot Tangkapan Layar - + PNG Image (*.png) Berkas PNG (*.png) - + TAS state: Running %1/%2 Status TAS: Berjalan %1/%2 - + TAS state: Recording %1 Status TAS: Merekam %1 - + TAS state: Idle %1/%2 Status TAS: Diam %1/%2 - + TAS State: Invalid Status TAS: Tidak Valid - + &Stop Running &Matikan - + &Start &Mulai - + Stop R&ecording Berhenti Mer&ekam - + R&ecord R&ekam - + Building: %n shader(s) Membangun: %n shader(s) - + Scale: %1x %1 is the resolution scaling factor Skala: %1x - + Speed: %1% / %2% Kecepatan: %1% / %2% - + Speed: %1% Kecepatan: %1% - + Game: %1 FPS (Unlocked) - + Game: %1 FPS Permainan: %1 FPS - + Frame: %1 ms Frame: %1 ms - + %1 %2 %1 %2 - + FSR FSR - + NO AA TANPA AA - + VOLUME: MUTE VOLUME : SENYAP - + VOLUME: %1% Volume percentage (e.g. 50%) - + Confirm Key Rederivation - + You are about to force rederive all of your keys. If you do not know what this means or what you are doing, this is a potentially destructive action. @@ -4677,37 +4708,37 @@ This will delete your autogenerated key files and re-run the key derivation modu - + Missing fuses - + - Missing BOOT0 - Kehilangan BOOT0 - + - Missing BCPKG2-1-Normal-Main - Kehilangan BCPKG2-1-Normal-Main - + - Missing PRODINFO - Kehilangan PRODINFO - + Derivation Components Missing - + Encryption keys are missing. <br>Please follow <a href='https://yuzu-emu.org/help/quickstart/'>the yuzu quickstart guide</a> to get all your keys, firmware and games.<br><br><small>(%1)</small> - + Deriving keys... This may take up to a minute depending on your system's performance. @@ -4716,49 +4747,49 @@ Ini mungkin memakan waktu hingga satu menit tergantung dari sistem performa Anda. - + Deriving Keys - + System Archive Decryption Failed - + Encryption keys failed to decrypt firmware. <br>Please follow <a href='https://yuzu-emu.org/help/quickstart/'>the yuzu quickstart guide</a> to get all your keys, firmware and games. - + Select RomFS Dump Target Pilih Target Dump RomFS - + Please select which RomFS you would like to dump. Silahkan pilih jenis RomFS yang ingin Anda buang. - + Are you sure you want to close yuzu? Apakah anda yakin ingin menutup yuzu? - - - + + + yuzu yuzu - + Are you sure you want to stop the emulation? Any unsaved progress will be lost. Apakah Anda yakin untuk menghentikan emulasi? Setiap progres yang tidak tersimpan akan hilang. - + The currently running application has requested yuzu to not exit. Would you like to bypass this and exit anyway? @@ -4908,241 +4939,251 @@ Would you like to bypass this and exit anyway? GameList - + Favorite Favorit - + Start Game Mulai permainan - + Start Game without Custom Configuration - + Open Save Data Location Buka Lokasi Data Penyimpanan - + Open Mod Data Location Buka Lokasi Data Mod - + Open Transferable Pipeline Cache - + Remove Singkirkan - + Remove Installed Update - + Remove All Installed DLC - + Remove Custom Configuration - + + Remove Play Time Data + + + + Remove Cache Storage - + Remove OpenGL Pipeline Cache - + Remove Vulkan Pipeline Cache - + Remove All Pipeline Caches - + Remove All Installed Contents Hapus semua konten terinstall. - - + + Dump RomFS Dump RomFS - + Dump RomFS to SDMC - + Verify Integrity - + Copy Title ID to Clipboard Salin Judul ID ke Clipboard. - + Navigate to GameDB entry Pindah ke tampilan GameDB - + Create Shortcut Buat pintasan - + Add to Desktop Menambahkan ke Desktop - + Add to Applications Menu - + Properties Properti - + Scan Subfolders Memindai subfolder - + Remove Game Directory - + ▲ Move Up - + ▼ Move Down - + Open Directory Location Buka Lokasi Direktori - + Clear Bersihkan - + Name Nama - + Compatibility Kompatibilitas - + Add-ons Pengaya (Add-On) - + File type Tipe berkas - + Size Ukuran + + + Play time + + GameListItemCompat - + Ingame - + Game starts, but crashes or major glitches prevent it from being completed. - + Perfect Sempurna - + Game can be played without issues. Permainan dapat dimainkan tanpa kendala. - + Playable - + Game functions with minor graphical or audio glitches and is playable from start to finish. - + Intro/Menu Awal/Menu - + Game loads, but is unable to progress past the Start Screen. - + Won't Boot Tidak Akan Berjalan - + The game crashes when attempting to startup. Gim rusak saat mencoba untuk memulai. - + Not Tested Belum dites - + The game has not yet been tested. Gim belum pernah dites. @@ -5150,7 +5191,7 @@ Would you like to bypass this and exit anyway? GameListPlaceholder - + Double-click to add a new folder to the game list Klik dua kali untuk menambahkan folder sebagai daftar permainan. @@ -5163,12 +5204,12 @@ Would you like to bypass this and exit anyway? - + Filter: - + Enter pattern to filter Masukkan pola untuk memfilter @@ -5285,6 +5326,7 @@ Debug Message: + Main Window @@ -5390,6 +5432,11 @@ Debug Message: + Toggle Renderdoc Capture + + + + Toggle Status Bar @@ -5627,186 +5674,216 @@ Debug Message: + &Amiibo + + + + &TAS - + &Help - + &Install Files to NAND... - + L&oad File... - + Load &Folder... - + E&xit - + &Pause &Jeda - + &Stop - + &Reinitialize keys... - + &Verify Installed Contents - + &About yuzu - + Single &Window Mode - + Con&figure... - + Display D&ock Widget Headers - + Show &Filter Bar - + Show &Status Bar - + Show Status Bar Munculkan Status Bar - + &Browse Public Game Lobby - + &Create Room - + &Leave Room - + &Direct Connect to Room - + &Show Current Room - + F&ullscreen - + &Restart - + Load/Remove &Amiibo... - + &Report Compatibility - + Open &Mods Page - + Open &Quickstart Guide Buka %Panduan cepat - + &FAQ - + Open &yuzu Folder - + &Capture Screenshot - - Open &Mii Editor - - - - - &Configure TAS... + + Open &Album + &Set Nickname and Owner + + + + + &Delete Game Data + + + + + &Restore Amiibo + + + + + &Format Amiibo + + + + + Open &Mii Editor + + + + + &Configure TAS... + + + + Configure C&urrent Game... - + &Start &Mulai - + &Reset - + R&ecord R&ekam @@ -6106,27 +6183,27 @@ p, li { white-space: pre-wrap; } - + Installed SD Titles - + Installed NAND Titles - + System Titles - + Add New Game Directory Tambahkan direktori permainan - + Favorites @@ -6652,7 +6729,7 @@ p, li { white-space: pre-wrap; } - + Pro Controller Kontroler Pro @@ -6665,7 +6742,7 @@ p, li { white-space: pre-wrap; } - + Dual Joycons Joycon Dual @@ -6678,7 +6755,7 @@ p, li { white-space: pre-wrap; } - + Left Joycon Joycon Kiri @@ -6691,7 +6768,7 @@ p, li { white-space: pre-wrap; } - + Right Joycon Joycon Kanan @@ -6720,7 +6797,7 @@ p, li { white-space: pre-wrap; } - + Handheld Jinjing @@ -6836,32 +6913,37 @@ p, li { white-space: pre-wrap; } 8 - + + Not enough controllers + + + + GameCube Controller Kontroler GameCube - + Poke Ball Plus Poke Ball Plus - + NES Controller Kontroler NES - + SNES Controller Kontroler SNES - + N64 Controller Kontroler N64 - + Sega Genesis Sega Genesis diff --git a/dist/languages/it.ts b/dist/languages/it.ts index 69f39500a7..22c6cf912c 100644 --- a/dist/languages/it.ts +++ b/dist/languages/it.ts @@ -373,13 +373,13 @@ Questo bannerà sia il suo nome utente del forum che il suo indirizzo IP.% - + Auto (%1) Auto select time zone Automatico (%1) - + Default (%1) Default time zone Predefinito (%1) @@ -891,49 +891,29 @@ Questo bannerà sia il suo nome utente del forum che il suo indirizzo IP. - Create Minidump After Crash - Crea Minidump dopo un arresto anomalo - - - Enable this to output the latest generated audio command list to the console. Only affects games using the audio renderer. Abilita questa opzione per stampare l'ultima lista dei comandi audio nella console. Impatta solo i giochi che usano il renderer audio. - + Dump Audio Commands To Console** Stampa i comandi audio nella console** - + Enable Verbose Reporting Services** Abilita servizi di segnalazione dettagliata** - + **This will be reset automatically when yuzu closes. **L'opzione verrà automaticamente ripristinata alla chiusura di yuzu. - - Restart Required - Riavvio richiesto - - - - yuzu is required to restart in order to apply this setting. - yuzu dev'essere riavviato affinché questa opzione venga applicata. - - - + Web applet not compiled Applet web non compilato - - - MiniDump creation not compiled - Creazione MiniDump non compilata - ConfigureDebugController @@ -1352,7 +1332,7 @@ Questo bannerà sia il suo nome utente del forum che il suo indirizzo IP. - + Conflicting Key Sequence Sequenza di tasti in conflitto @@ -1373,27 +1353,37 @@ Questo bannerà sia il suo nome utente del forum che il suo indirizzo IP.Non valido - + + Invalid hotkey settings + + + + + An error occurred. Please report this issue on github. + + + + Restore Default Ripristina predefinita - + Clear Cancella - + Conflicting Button Sequence Sequenza di pulsanti in conflitto - + The default button sequence is already assigned to: %1 La sequenza di pulsanti predefinita è già assegnata a: %1 - + The default key sequence is already assigned to: %1 La sequenza di tasti predefinita è già assegnata a: %1 @@ -3375,67 +3365,72 @@ Trascina i punti per cambiare posizione, oppure clicca due volte la cella in tab Mostra colonna Tipo di file - + + Show Play Time Column + Mostra Tempo di Gioco + + + Game Icon Size: Dimensione dell'icona del gioco: - + Folder Icon Size: Dimensione dell'icona delle cartelle: - + Row 1 Text: Testo riga 1: - + Row 2 Text: Testo riga 2: - + Screenshots Screenshot - + Ask Where To Save Screenshots (Windows Only) Chiedi dove salvare gli screenshot (solo Windows) - + Screenshots Path: Percorso degli screenshot: - + ... ... - + TextLabel Etichetta - + Resolution: Risoluzione: - + Select Screenshots Path... Seleziona il percorso degli screenshot... - + <System> <System> - + Auto (%1 x %2, %3 x %4) Screenshot width value Automatica (%1 x %2, %3 x %4) @@ -3753,44 +3748,44 @@ Trascina i punti per cambiare posizione, oppure clicca due volte la cella in tab GMainWindow - + <a href='https://yuzu-emu.org/help/feature/telemetry/'>Anonymous data is collected</a> to help improve yuzu. <br/><br/>Would you like to share your usage data with us? <a href='https://yuzu-emu.org/help/feature/telemetry/'>Vengono raccolti dati anonimi</a> per aiutarci a migliorare yuzu. <br/><br/>Desideri condividere i tuoi dati di utilizzo con noi? - + Telemetry Telemetria - + Broken Vulkan Installation Detected Rilevata installazione di Vulkan non funzionante - + Vulkan initialization failed during boot.<br><br>Click <a href='https://yuzu-emu.org/wiki/faq/#yuzu-starts-with-the-error-broken-vulkan-installation-detected'>here for instructions to fix the issue</a>. L'inizializzazione di Vulkan è fallita durante l'avvio.<br><br>Clicca <a href='https://yuzu-emu.org/wiki/faq/#yuzu-starts-with-the-error-broken-vulkan-installation-detected'>qui per istruzioni su come risolvere il problema</a>. - + Running a game TRANSLATORS: This string is shown to the user to explain why yuzu needs to prevent the computer from sleeping Gioco in esecuzione - + Loading Web Applet... Caricamento dell'applet web... - - + + Disable Web Applet Disabilita l'applet web - + Disabling the web applet can lead to undefined behavior and should only be used with Super Mario 3D All-Stars. Are you sure you want to disable the web applet? (This can be re-enabled in the Debug settings.) Disabilitare l'applet web potrebbe causare dei comportamenti indesiderati. @@ -3798,570 +3793,574 @@ Da usare solo con Super Mario 3D All-Stars. Sei sicuro di voler procedere? (Puoi riabilitarlo quando vuoi nelle impostazioni di Debug.) - + The amount of shaders currently being built Il numero di shader in fase di compilazione - + The current selected resolution scaling multiplier. Il moltiplicatore corrente dello scaling della risoluzione. - + Current emulation speed. Values higher or lower than 100% indicate emulation is running faster or slower than a Switch. Velocità corrente dell'emulazione. Valori più alti o più bassi di 100% indicano che l'emulazione sta funzionando più velocemente o lentamente rispetto a una Switch. - + How many frames per second the game is currently displaying. This will vary from game to game and scene to scene. Il numero di fotogrammi al secondo che il gioco visualizza attualmente. Può variare in base al gioco e alla situazione. - + Time taken to emulate a Switch frame, not counting framelimiting or v-sync. For full-speed emulation this should be at most 16.67 ms. Tempo necessario per emulare un fotogramma della Switch, senza tenere conto del limite al framerate o del V-Sync. Per un'emulazione alla massima velocità, il valore non dovrebbe essere superiore a 16.67 ms. - + Unmute Riattiva - + Mute Silenzia - + Reset Volume Reimposta volume - + &Clear Recent Files &Cancella i file recenti - + Emulated mouse is enabled Mouse emulato abilitato - + Real mouse input and mouse panning are incompatible. Please disable the emulated mouse in input advanced settings to allow mouse panning. L'input reale del mouse è incompatibile col mouse panning. Per attivarlo, disattiva il mouse emulato. - + &Continue &Continua - + &Pause &Pausa - + Warning Outdated Game Format Formato del gioco obsoleto - + You are using the deconstructed ROM directory format for this game, which is an outdated format that has been superseded by others such as NCA, NAX, XCI, or NSP. Deconstructed ROM directories lack icons, metadata, and update support.<br><br>For an explanation of the various Switch formats yuzu supports, <a href='https://yuzu-emu.org/wiki/overview-of-switch-game-formats'>check out our wiki</a>. This message will not be shown again. Stai usando una cartella contenente una ROM decostruita per avviare questo gioco, che è un formato obsoleto e sostituito da NCA, NAX, XCI o NSP. Le ROM decostruite non hanno icone, metadati e non supportano gli aggiornamenti. <br><br>Per una spiegazione sui vari formati della Switch supportati da yuzu, <a href='https://yuzu-emu.org/wiki/overview-of-switch-game-formats'>consulta la nostra wiki (in inglese)</a>. Non riceverai di nuovo questo avviso. - + Error while loading ROM! Errore nel caricamento della ROM! - + The ROM format is not supported. Il formato della ROM non è supportato. - + An error occurred initializing the video core. È stato riscontrato un errore nell'inizializzazione del core video. - + yuzu has encountered an error while running the video core. This is usually caused by outdated GPU drivers, including integrated ones. Please see the log for more details. For more information on accessing the log, please see the following page: <a href='https://yuzu-emu.org/help/reference/log-files/'>How to Upload the Log File</a>. yuzu ha riscontrato un problema durante l'avvio del core video. Di solito questo errore è causato da driver GPU obsoleti, compresi quelli integrati. Consulta il log per maggiori dettagli. Se hai bisogno di aiuto per accedere ai log, consulta questa pagina (in inglese): <a href='https://yuzu-emu.org/help/reference/log-files/'>Come caricare i file di log</a>. - + Error while loading ROM! %1 %1 signifies a numeric error code. Errore nel caricamento della ROM! %1 - + %1<br>Please follow <a href='https://yuzu-emu.org/help/quickstart/'>the yuzu quickstart guide</a> to redump your files.<br>You can refer to the yuzu wiki</a> or the yuzu Discord</a> for help. %1 signifies an error string. %1<br>Segui <a href='https://yuzu-emu.org/help/quickstart/'>la guida introduttiva di yuzu</a> per rifare il dump dei file.<br>Puoi dare un occhiata alla wiki di yuzu (in inglese)</a> o al server Discord di yuzu</a> per assistenza. - + An unknown error occurred. Please see the log for more details. Si è verificato un errore sconosciuto. Visualizza il log per maggiori dettagli. - + (64-bit) (64-bit) - + (32-bit) (32-bit) - + %1 %2 %1 is the title name. %2 indicates if the title is 64-bit or 32-bit %1 %2 - + Closing software... Chiusura del software in corso... - + Save Data Dati di salvataggio - + Mod Data Dati delle mod - + Error Opening %1 Folder Impossibile aprire la cartella %1 - - + + Folder does not exist! La cartella non esiste! - + Error Opening Transferable Shader Cache Impossibile aprire la cache trasferibile degli shader - + Failed to create the shader cache directory for this title. Impossibile creare la cartella della cache degli shader per questo titolo. - + Error Removing Contents Impossibile rimuovere il contentuto - + Error Removing Update Impossibile rimuovere l'aggiornamento - + Error Removing DLC Impossibile rimuovere il DLC - + Remove Installed Game Contents? Rimuovere il contenuto del gioco installato? - + Remove Installed Game Update? Rimuovere l'aggiornamento installato? - + Remove Installed Game DLC? Rimuovere il DLC installato? - + Remove Entry Rimuovi voce - - - - - - + + + + + + Successfully Removed Rimozione completata - + Successfully removed the installed base game. Il gioco base installato è stato rimosso con successo. - + The base game is not installed in the NAND and cannot be removed. Il gioco base non è installato su NAND e non può essere rimosso. - + Successfully removed the installed update. Aggiornamento rimosso con successo. - + There is no update installed for this title. Non c'è alcun aggiornamento installato per questo gioco. - + There are no DLC installed for this title. Non c'è alcun DLC installato per questo gioco. - + Successfully removed %1 installed DLC. %1 DLC rimossi con successo. - + Delete OpenGL Transferable Shader Cache? Vuoi rimuovere la cache trasferibile degli shader OpenGL? - + Delete Vulkan Transferable Shader Cache? Vuoi rimuovere la cache trasferibile degli shader Vulkan? - + Delete All Transferable Shader Caches? Vuoi rimuovere tutte le cache trasferibili degli shader? - + Remove Custom Game Configuration? Rimuovere la configurazione personalizzata del gioco? - + Remove Cache Storage? Rimuovere la Storage Cache? - + Remove File Rimuovi file - - + + Remove Play Time Data + Resetta il Tempo di Gioco + + + + Reset play time? + Davvero? + + + + Error Removing Transferable Shader Cache Impossibile rimuovere la cache trasferibile degli shader - - + + A shader cache for this title does not exist. Per questo titolo non esiste una cache degli shader. - + Successfully removed the transferable shader cache. La cache trasferibile degli shader è stata rimossa con successo. - + Failed to remove the transferable shader cache. Impossibile rimuovere la cache trasferibile degli shader. - + Error Removing Vulkan Driver Pipeline Cache Impossibile rimuovere la cache delle pipeline del driver Vulkan - + Failed to remove the driver pipeline cache. Impossibile rimuovere la cache delle pipeline del driver. - - + + Error Removing Transferable Shader Caches Impossibile rimuovere le cache trasferibili degli shader - + Successfully removed the transferable shader caches. Le cache trasferibili degli shader sono state rimosse con successo. - + Failed to remove the transferable shader cache directory. Impossibile rimuovere la cartella della cache trasferibile degli shader. - - + + Error Removing Custom Configuration Impossibile rimuovere la configurazione personalizzata - + A custom configuration for this title does not exist. Non esiste una configurazione personalizzata per questo gioco. - + Successfully removed the custom game configuration. La configurazione personalizzata del gioco è stata rimossa con successo. - + Failed to remove the custom game configuration. Impossibile rimuovere la configurazione personalizzata del gioco. - - + + RomFS Extraction Failed! Estrazione RomFS fallita! - + There was an error copying the RomFS files or the user cancelled the operation. C'è stato un errore nella copia dei file del RomFS o l'operazione è stata annullata dall'utente. - + Full Completa - + Skeleton Cartelle - + Select RomFS Dump Mode Seleziona la modalità di estrazione della RomFS - + Please select the how you would like the RomFS dumped.<br>Full will copy all of the files into the new directory while <br>skeleton will only create the directory structure. Seleziona come vorresti estrarre la RomFS. <br>La modalità Completa copierà tutti i file in una nuova cartella mentre<br>la modalità Cartelle creerà solamente le cartelle e le sottocartelle. - + There is not enough free space at %1 to extract the RomFS. Please free up space or select a different dump directory at Emulation > Configure > System > Filesystem > Dump Root Non c'è abbastanza spazio disponibile nel disco %1 per estrarre la RomFS. Libera lo spazio o seleziona una cartella di estrazione diversa in Emulazione > Configura > Sistema > File system > Cartella di estrazione - + Extracting RomFS... Estrazione RomFS in corso... - - - - + + + + Cancel Annulla - + RomFS Extraction Succeeded! Estrazione RomFS riuscita! - - - + + + The operation completed successfully. L'operazione è stata completata con successo. - + Integrity verification couldn't be performed! Impossibile verificare l'integrità dei file. - + File contents were not checked for validity. I contenuti di questo file non sono stati verificati - - + + Integrity verification failed! Verifica integrità fallita. - + File contents may be corrupt. I contenuti di questo File potrebbero essere corrotti. - - + + Verifying integrity... Verificando l'integrità della ROM... - - + + Integrity verification succeeded! Verifica dell'integrità completata con successo! - - - - - + + + + Create Shortcut Crea scorciatoia - + This will create a shortcut to the current AppImage. This may not work well if you update. Continue? Verrà creata una scorciatoia all'AppImage attuale. Potrebbe non funzionare correttamente se effettui un aggiornamento. Vuoi continuare? - - Cannot create shortcut on desktop. Path "%1" does not exist. - Impossibile creare la scorciatoia sul desktop. Il percorso "%1" non esiste. + + Cannot create shortcut. Path "%1" does not exist. + Impossibile creare una scorciatoia. Il percorso "%1" non esiste. - - Cannot create shortcut in applications menu. Path "%1" does not exist and cannot be created. - Impossibile creare la scorciatoia nel menù delle applicazioni. Il percorso "%1" non esiste e non può essere creato. - - - + Create Icon Crea icona - + Cannot create icon file. Path "%1" does not exist and cannot be created. Impossibile creare il file dell'icona. Il percorso "%1" non esiste e non può essere creato. - + Start %1 with the yuzu Emulator Avvia %1 con l'emulatore yuzu - + Failed to create a shortcut at %1 Impossibile creare la scorciatoia in %1 - + Successfully created a shortcut to %1 Scorciatoia creata con successo in %1 - + Error Opening %1 Impossibile aprire %1 - + Select Directory Seleziona cartella - + Properties Proprietà - + The game properties could not be loaded. Non è stato possibile caricare le proprietà del gioco. - + Switch Executable (%1);;All Files (*.*) %1 is an identifier for the Switch executable file extensions. Eseguibile Switch (%1);;Tutti i file (*.*) - + Load File Carica file - + Open Extracted ROM Directory Apri cartella ROM estratta - + Invalid Directory Selected Cartella selezionata non valida - + The directory you have selected does not contain a 'main' file. La cartella che hai selezionato non contiene un file "main". - + Installable Switch File (*.nca *.nsp *.xci);;Nintendo Content Archive (*.nca);;Nintendo Submission Package (*.nsp);;NX Cartridge Image (*.xci) File installabili Switch (*.nca *.nsp *.xci);;Nintendo Content Archive (*.nca);;Nintendo Submission Package (*.nsp);;NX Cartridge Image (*.xci) - + Install Files Installa file - + %n file(s) remaining %n file rimanente%n file rimanenti%n file rimanenti - + Installing file "%1"... Installazione del file "%1"... - - + + Install Results Risultati dell'installazione - + To avoid possible conflicts, we discourage users from installing base games to the NAND. Please, only use this feature to install updates and DLC. Per evitare possibli conflitti, sconsigliamo di installare i giochi base su NAND. Usa questa funzione solo per installare aggiornamenti e DLC. - + %n file(s) were newly installed %n nuovo file è stato installato @@ -4370,7 +4369,7 @@ Usa questa funzione solo per installare aggiornamenti e DLC. - + %n file(s) were overwritten %n file è stato sovrascritto @@ -4379,7 +4378,7 @@ Usa questa funzione solo per installare aggiornamenti e DLC. - + %n file(s) failed to install %n file non è stato installato a causa di errori @@ -4388,195 +4387,195 @@ Usa questa funzione solo per installare aggiornamenti e DLC. - + System Application Applicazione di sistema - + System Archive Archivio di sistema - + System Application Update Aggiornamento di un'applicazione di sistema - + Firmware Package (Type A) Pacchetto firmware (tipo A) - + Firmware Package (Type B) Pacchetto firmware (tipo B) - + Game Gioco - + Game Update Aggiornamento di gioco - + Game DLC DLC - + Delta Title Titolo delta - + Select NCA Install Type... Seleziona il tipo di installazione NCA - + Please select the type of title you would like to install this NCA as: (In most instances, the default 'Game' is fine.) Seleziona il tipo del file NCA da installare: (Nella maggior parte dei casi, il valore predefinito 'Gioco' va bene.) - + Failed to Install Installazione fallita - + The title type you selected for the NCA is invalid. Il tipo che hai selezionato per l'NCA non è valido. - + File not found File non trovato - + File "%1" not found File "%1" non trovato - + OK OK - - + + Hardware requirements not met Requisiti hardware non soddisfatti - - + + Your system does not meet the recommended hardware requirements. Compatibility reporting has been disabled. Il tuo sistema non soddisfa i requisiti hardware consigliati. La funzionalità di segnalazione della compatibilità è stata disattivata. - + Missing yuzu Account Account di yuzu non trovato - + In order to submit a game compatibility test case, you must link your yuzu account.<br><br/>To link your yuzu account, go to Emulation &gt; Configuration &gt; Web. Per segnalare la compatibilità di un gioco, devi collegare il tuo account yuzu. <br><br/>Per collegare il tuo account yuzu, vai su Emulazione &gt; Configurazione &gt; Web. - + Error opening URL Impossibile aprire l'URL - + Unable to open the URL "%1". Non è stato possibile aprire l'URL "%1". - + TAS Recording Registrazione TAS - + Overwrite file of player 1? Vuoi sovrascrivere il file del giocatore 1? - + Invalid config detected Rilevata configurazione non valida - + Handheld controller can't be used on docked mode. Pro controller will be selected. Il controller portatile non può essere utilizzato in modalità dock. Verrà selezionato il controller Pro. - - + + Amiibo Amiibo - - + + The current amiibo has been removed L'Amiibo corrente è stato rimosso - + Error Errore - - + + The current game is not looking for amiibos Il gioco in uso non è alla ricerca di Amiibo - + Amiibo File (%1);; All Files (*.*) File Amiibo (%1);; Tutti i file (*.*) - + Load Amiibo Carica Amiibo - + Error loading Amiibo data Impossibile caricare i dati dell'Amiibo - + The selected file is not a valid amiibo Il file selezionato non è un Amiibo valido - + The selected file is already on use Il file selezionato è già in uso - + An unknown error occurred Si è verificato un errore sconosciuto - + Verification failed for the following files: %1 @@ -4585,145 +4584,177 @@ Configurazione &gt; Web. %1 - + + + No firmware available - + Nessun Firmware disponibile. - + + Please install the firmware to use the Album applet. + Devi installare il firmware per usare l'applet dell'Album. + + + + Album Applet + Applet Album + + + + Album applet is not available. Please reinstall firmware. + L'applet dell'Album non è disponibile. Reinstalla il firmware. + + + + Please install the firmware to use the Cabinet applet. + Devi installare il firmware per usare l'applet Cabinet. + + + + Cabinet Applet + Applet Cabinet + + + + Cabinet applet is not available. Please reinstall firmware. + L'applet del Cabinet non è disponibile. Reinstalla il firmware. + + + Please install the firmware to use the Mii editor. - + Per usare l'editor dei Mii, devi installare il firmware. - + Mii Edit Applet - + Editor Mii - + Mii editor is not available. Please reinstall firmware. - + L'Editor dei Mii non è disponibile. Reinstalla il firmware. - + Capture Screenshot Cattura screenshot - + PNG Image (*.png) Immagine PNG (*.png) - + TAS state: Running %1/%2 Stato TAS: In esecuzione (%1/%2) - + TAS state: Recording %1 Stato TAS: Registrazione in corso (%1) - + TAS state: Idle %1/%2 Stato TAS: In attesa (%1/%2) - + TAS State: Invalid Stato TAS: Non valido - + &Stop Running &Interrompi - + &Start &Avvia - + Stop R&ecording Interrompi r&egistrazione - + R&ecord R&egistra - + Building: %n shader(s) Compilazione di %n shaderCompilazione di %n shaderCompilazione di %n shader - + Scale: %1x %1 is the resolution scaling factor Risoluzione: %1x - + Speed: %1% / %2% Velocità: %1% / %2% - + Speed: %1% Velocità: %1% - + Game: %1 FPS (Unlocked) Gioco: %1 FPS (Sbloccati) - + Game: %1 FPS Gioco: %1 FPS - + Frame: %1 ms Frame: %1 ms - + %1 %2 %1 %2 - + FSR FSR - + NO AA NO AA - + VOLUME: MUTE VOLUME: MUTO - + VOLUME: %1% Volume percentage (e.g. 50%) VOLUME: %1% - + Confirm Key Rederivation Conferma ri-derivazione chiavi - + You are about to force rederive all of your keys. If you do not know what this means or what you are doing, this is a potentially destructive action. @@ -4740,37 +4771,37 @@ Se sei sicuro di voler procedere, Questa azione eliminerà i tuoi file delle chiavi autogenerati e ripeterà il processo di derivazione delle chiavi. - + Missing fuses Fusi mancanti - + - Missing BOOT0 - BOOT0 mancante - + - Missing BCPKG2-1-Normal-Main - BCPKG2-1-Normal-Main mancante - + - Missing PRODINFO - PRODINFO mancante - + Derivation Components Missing Componenti di derivazione mancanti - + Encryption keys are missing. <br>Please follow <a href='https://yuzu-emu.org/help/quickstart/'>the yuzu quickstart guide</a> to get all your keys, firmware and games.<br><br><small>(%1)</small> Chiavi di crittografia mancanti. <br>Segui <a href='https://yuzu-emu.org/help/quickstart/'>la guida introduttiva di yuzu</a> per ottenere tutte le tue chiavi, il firmware e i giochi.<br><br><small>(%1)</small> - + Deriving keys... This may take up to a minute depending on your system's performance. @@ -4779,49 +4810,49 @@ Questa operazione potrebbe durare fino a un minuto in base alle prestazioni del tuo sistema. - + Deriving Keys Derivazione chiavi - + System Archive Decryption Failed Decrittazione dell'archivio di sistema fallita - + Encryption keys failed to decrypt firmware. <br>Please follow <a href='https://yuzu-emu.org/help/quickstart/'>the yuzu quickstart guide</a> to get all your keys, firmware and games. Le chiavi di crittografia non sono riuscite a decrittare il firmware. <br>Segui <a href='https://yuzu-emu.org/help/quickstart/'>la guida introduttiva di yuzu</a> per estrarre tutte le tue chiavi, il firmware e i giochi dalla tua Switch. - + Select RomFS Dump Target Seleziona Target dell'Estrazione del RomFS - + Please select which RomFS you would like to dump. Seleziona quale RomFS vorresti estrarre. - + Are you sure you want to close yuzu? Sei sicuro di voler chiudere yuzu? - - - + + + yuzu yuzu - + Are you sure you want to stop the emulation? Any unsaved progress will be lost. Sei sicuro di voler arrestare l'emulazione? Tutti i progressi non salvati verranno perduti. - + The currently running application has requested yuzu to not exit. Would you like to bypass this and exit anyway? @@ -4973,241 +5004,251 @@ Vuoi forzare l'arresto? GameList - + Favorite Preferito - + Start Game Avvia gioco - + Start Game without Custom Configuration Avvia gioco senza la configurazione personalizzata - + Open Save Data Location Apri la cartella dei dati di salvataggio - + Open Mod Data Location Apri la cartella delle mod - + Open Transferable Pipeline Cache Apri la cartella della cache trasferibile delle pipeline - + Remove Rimuovi - + Remove Installed Update Rimuovi l'aggiornamento installato - + Remove All Installed DLC Rimuovi tutti i DLC installati - + Remove Custom Configuration Rimuovi la configurazione personalizzata - + + Remove Play Time Data + Resetta il Tempo di Gioco + + + Remove Cache Storage Rimuovi Storage Cache - + Remove OpenGL Pipeline Cache Rimuovi la cache delle pipeline OpenGL - + Remove Vulkan Pipeline Cache Rimuovi la cache delle pipeline Vulkan - + Remove All Pipeline Caches Rimuovi tutte le cache delle pipeline - + Remove All Installed Contents Rimuovi tutti i contenuti installati - - + + Dump RomFS Estrai RomFS - + Dump RomFS to SDMC Estrai RomFS su SDMC - + Verify Integrity Verifica Integrità - + Copy Title ID to Clipboard Copia il Title ID negli Appunti - + Navigate to GameDB entry Vai alla pagina di GameDB - + Create Shortcut Crea scorciatoia - + Add to Desktop Aggiungi al desktop - + Add to Applications Menu Aggiungi al menù delle applicazioni - + Properties Proprietà - + Scan Subfolders Scansiona le sottocartelle - + Remove Game Directory Rimuovi cartella dei giochi - + ▲ Move Up ▲ Sposta in alto - + ▼ Move Down ▼ Sposta in basso - + Open Directory Location Apri cartella - + Clear Cancella - + Name Nome - + Compatibility Compatibilità - + Add-ons Add-on - + File type Tipo di file - + Size Dimensione + + + Play time + Tempo di Gioco + GameListItemCompat - + Ingame In-game - + Game starts, but crashes or major glitches prevent it from being completed. Il gioco parte, ma non può essere completato a causa di arresti anomali o di glitch importanti. - + Perfect Perfetto - + Game can be played without issues. Il gioco funziona senza problemi. - + Playable Giocabile - + Game functions with minor graphical or audio glitches and is playable from start to finish. Il gioco presenta alcuni glitch audio o video minori ed è possibile giocare dall'inizio alla fine. - + Intro/Menu Intro/Menù - + Game loads, but is unable to progress past the Start Screen. Il gioco si avvia, ma è impossibile proseguire oltre la schermata iniziale. - + Won't Boot Non si avvia - + The game crashes when attempting to startup. Il gioco si blocca quando viene avviato. - + Not Tested Non testato - + The game has not yet been tested. Il gioco non è ancora stato testato. @@ -5215,7 +5256,7 @@ Vuoi forzare l'arresto? GameListPlaceholder - + Double-click to add a new folder to the game list Clicca due volte per aggiungere una nuova cartella alla lista dei giochi @@ -5228,12 +5269,12 @@ Vuoi forzare l'arresto? %1 di %n risultato%1 di %n risultati%1 di %n risultati - + Filter: Filtro: - + Enter pattern to filter Inserisci pattern per filtrare @@ -5351,6 +5392,7 @@ Messaggio di debug: + Main Window Finestra principale @@ -5456,6 +5498,11 @@ Messaggio di debug: + Toggle Renderdoc Capture + + + + Toggle Status Bar Mostra/nascondi la barra di stato @@ -5694,186 +5741,216 @@ Messaggio di debug: + &Amiibo + &Amiibo + + + &TAS &TAS - + &Help &Aiuto - + &Install Files to NAND... &Installa file su NAND... - + L&oad File... Carica &file... - + Load &Folder... Carica &cartella... - + E&xit &Esci - + &Pause &Pausa - + &Stop Arre&sta - + &Reinitialize keys... &Reinizializza chiavi... - + &Verify Installed Contents - + &Verifica i Contenuti Installati - + &About yuzu &Informazioni su yuzu - + Single &Window Mode &Modalità finestra singola - + Con&figure... Configura... - + Display D&ock Widget Headers Visualizza le intestazioni del dock dei widget - + Show &Filter Bar Mostra barra del &filtro - + Show &Status Bar Mostra barra di &stato - + Show Status Bar Mostra barra di stato - + &Browse Public Game Lobby &Sfoglia lobby di gioco pubblica - + &Create Room &Crea stanza - + &Leave Room &Esci dalla stanza - + &Direct Connect to Room Collegamento &diretto alla stanza - + &Show Current Room &Mostra stanza attuale - + F&ullscreen Schermo intero - + &Restart &Riavvia - + Load/Remove &Amiibo... Carica/Rimuovi &Amiibo... - + &Report Compatibility &Segnala la compatibilità - + Open &Mods Page Apri la pagina delle &mod - + Open &Quickstart Guide Apri la &guida introduttiva - + &FAQ &Domande frequenti - + Open &yuzu Folder Apri la cartella di yuzu - + &Capture Screenshot Cattura schermo - - Open &Mii Editor - + + Open &Album + Apri l'&Album - + + &Set Nickname and Owner + &Imposta Nickname e Proprietario + + + + &Delete Game Data + &Rimuovi i Dati di Gioco + + + + &Restore Amiibo + %Resetta gli Amiibo + + + + &Format Amiibo + &Formatta gli Amiibo + + + + Open &Mii Editor + Apri l'&Editor dei Mii + + + &Configure TAS... &Configura TAS... - + Configure C&urrent Game... Configura il gioco in uso... - + &Start &Avvia - + &Reset &Reimposta - + R&ecord R&egistra @@ -6181,27 +6258,27 @@ p, li { white-space: pre-wrap; } Non in gioco - + Installed SD Titles Titoli SD installati - + Installed NAND Titles Titoli NAND installati - + System Titles Titoli di sistema - + Add New Game Directory Aggiungi nuova cartella dei giochi - + Favorites Preferiti @@ -6727,7 +6804,7 @@ p, li { white-space: pre-wrap; } - + Pro Controller Pro Controller @@ -6740,7 +6817,7 @@ p, li { white-space: pre-wrap; } - + Dual Joycons Due Joycon @@ -6753,7 +6830,7 @@ p, li { white-space: pre-wrap; } - + Left Joycon Joycon sinistro @@ -6766,7 +6843,7 @@ p, li { white-space: pre-wrap; } - + Right Joycon Joycon destro @@ -6795,7 +6872,7 @@ p, li { white-space: pre-wrap; } - + Handheld Portatile @@ -6911,32 +6988,37 @@ p, li { white-space: pre-wrap; } 8 - + + Not enough controllers + Non ci sono abbastanza controllers collegati. + + + GameCube Controller Controller GameCube - + Poke Ball Plus Poké Ball Plus - + NES Controller Controller NES - + SNES Controller Controller SNES - + N64 Controller Controller N64 - + Sega Genesis Sega Genesis diff --git a/dist/languages/ja_JP.ts b/dist/languages/ja_JP.ts index 8c06a0afd1..6ff603a2db 100644 --- a/dist/languages/ja_JP.ts +++ b/dist/languages/ja_JP.ts @@ -373,13 +373,13 @@ This would ban both their forum username and their IP address. % - + Auto (%1) Auto select time zone 自動 (%1) - + Default (%1) Default time zone 既定 (%1) @@ -893,49 +893,29 @@ This would ban both their forum username and their IP address. - Create Minidump After Crash - クラッシュ時にミニダンプを生成 - - - Enable this to output the latest generated audio command list to the console. Only affects games using the audio renderer. これを有効にすると、最新のオーディオコマンドリストがコンソールに出力されます。オーディオレンダラーを使用するゲームにのみ影響します。 - + Dump Audio Commands To Console** - + Enable Verbose Reporting Services** 詳細なレポートサービスの有効化** - + **This will be reset automatically when yuzu closes. ** yuzuを終了したときに自動的にリセットされます。 - - Restart Required - 再起動が必要 - - - - yuzu is required to restart in order to apply this setting. - この設定を適用するには yuzu を再起動する必要があります. - - - + Web applet not compiled ウェブアプレットがコンパイルされていません - - - MiniDump creation not compiled - - ConfigureDebugController @@ -1354,7 +1334,7 @@ This would ban both their forum username and their IP address. - + Conflicting Key Sequence 入力された組合せの衝突 @@ -1375,27 +1355,37 @@ This would ban both their forum username and their IP address. 無効 - + + Invalid hotkey settings + + + + + An error occurred. Please report this issue on github. + + + + Restore Default デフォルトに戻す - + Clear 消去 - + Conflicting Button Sequence ボタンが競合しています - + The default button sequence is already assigned to: %1 デフォルトのボタン配列はすでに %1 に割り当てられています。 - + The default key sequence is already assigned to: %1 デフォルトの組合せはすでに %1 に割り当てられています。 @@ -2508,7 +2498,7 @@ To invert the axes, first move your joystick vertically, and then horizontally.< Can be toggled via a hotkey. Default hotkey is Ctrl + F9 - + ホットキーで切り替えできます。 デフォルトのホットキーは Ctrl + F9 です @@ -3359,80 +3349,85 @@ Drag points to change position, or double-click table cells to edit values. Show Add-Ons Column - アドオン列を表示 + アドオンを表示 Show Size Column - サイズ列を表示 + サイズを表示 Show File Types Column - ファイルタイプ列を表示 + ファイルタイプを表示 - + + Show Play Time Column + プレイ時間を表示 + + + Game Icon Size: ゲームアイコンサイズ: - + Folder Icon Size: フォルダアイコンサイズ: - + Row 1 Text: 1行目の表示内容: - + Row 2 Text: 2行目の表示内容: - + Screenshots スクリーンショット - + Ask Where To Save Screenshots (Windows Only) スクリーンショット時に保存先を確認する(Windowsのみ) - + Screenshots Path: スクリーンショットの保存先: - + ... ... - + TextLabel - + Resolution: 解像度: - + Select Screenshots Path... スクリーンショットの保存先を選択... - + <System> <System> - + Auto (%1 x %2, %3 x %4) Screenshot width value @@ -3750,965 +3745,1003 @@ Drag points to change position, or double-click table cells to edit values. GMainWindow - + <a href='https://yuzu-emu.org/help/feature/telemetry/'>Anonymous data is collected</a> to help improve yuzu. <br/><br/>Would you like to share your usage data with us? yuzuの改善に役立てるため、<a href='https://yuzu-emu.org/help/feature/telemetry/'>匿名データが収集されます</a>。<br/><br/>統計情報を共有しますか? - + Telemetry テレメトリ - + Broken Vulkan Installation Detected 壊れたVulkanのインストールが検出されました。 - + Vulkan initialization failed during boot.<br><br>Click <a href='https://yuzu-emu.org/wiki/faq/#yuzu-starts-with-the-error-broken-vulkan-installation-detected'>here for instructions to fix the issue</a>. 起動時にVulkanの初期化に失敗しました。<br><br>この問題を解決するための手順は<a href='https://yuzu-emu.org/wiki/faq/#yuzu-starts-with-the-error-broken-vulkan-installation-detected'>こちら</a>。 - + Running a game TRANSLATORS: This string is shown to the user to explain why yuzu needs to prevent the computer from sleeping - + Loading Web Applet... Webアプレットをロード中... - - + + Disable Web Applet Webアプレットの無効化 - + Disabling the web applet can lead to undefined behavior and should only be used with Super Mario 3D All-Stars. Are you sure you want to disable the web applet? (This can be re-enabled in the Debug settings.) Webアプレットを無効にすると、未定義の動作になる可能性があるため、スーパーマリオ3Dオールスターズでのみ使用するようにしてください。本当にWebアプレットを無効化しますか? (デバッグ設定で再度有効にすることができます)。 - + The amount of shaders currently being built ビルド中のシェーダー数 - + The current selected resolution scaling multiplier. 現在選択されている解像度の倍率。 - + Current emulation speed. Values higher or lower than 100% indicate emulation is running faster or slower than a Switch. 現在のエミュレーション速度。値が100%より高いか低い場合、エミュレーション速度がSwitchより速いか遅いことを示します。 - + How many frames per second the game is currently displaying. This will vary from game to game and scene to scene. ゲームが現在表示している1秒あたりのフレーム数。これはゲームごと、シーンごとに異なります。 - + Time taken to emulate a Switch frame, not counting framelimiting or v-sync. For full-speed emulation this should be at most 16.67 ms. Switchフレームをエミュレートするのにかかる時間で、フレームリミットやV-Syncは含まれません。フルスピードエミュレーションの場合、最大で16.67ミリ秒になります。 - + Unmute 消音解除 - + Mute 消音 - + Reset Volume 音量をリセット - + &Clear Recent Files 最近のファイルをクリア(&C) - + Emulated mouse is enabled - + Real mouse input and mouse panning are incompatible. Please disable the emulated mouse in input advanced settings to allow mouse panning. - + &Continue 再開(&C) - + &Pause 中断(&P) - + Warning Outdated Game Format 古いゲームフォーマットの警告 - + You are using the deconstructed ROM directory format for this game, which is an outdated format that has been superseded by others such as NCA, NAX, XCI, or NSP. Deconstructed ROM directories lack icons, metadata, and update support.<br><br>For an explanation of the various Switch formats yuzu supports, <a href='https://yuzu-emu.org/wiki/overview-of-switch-game-formats'>check out our wiki</a>. This message will not be shown again. このゲームでは、分解されたROMディレクトリフォーマットを使用しています。これは、NCA、NAX、XCI、またはNSPなどに取って代わられた古いフォーマットです。分解されたROMディレクトリには、アイコン、メタデータ、およびアップデートサポートがありません。<br><br>yuzuがサポートするSwitchフォーマットの説明については、<a href='https://yuzu-emu.org/wiki/overview-of-switch-game-formats'>wikiをチェックしてください</a>。このメッセージは二度と表示されません。 - + Error while loading ROM! ROMロード中にエラーが発生しました! - + The ROM format is not supported. このROMフォーマットはサポートされていません。 - + An error occurred initializing the video core. ビデオコア初期化中にエラーが発生しました。 - + yuzu has encountered an error while running the video core. This is usually caused by outdated GPU drivers, including integrated ones. Please see the log for more details. For more information on accessing the log, please see the following page: <a href='https://yuzu-emu.org/help/reference/log-files/'>How to Upload the Log File</a>. yuzuは、ビデオコアの実行中にエラーが発生しました。これは通常、内蔵GPUも含め、古いGPUドライバが原因です。詳しくはログをご覧ください。ログへのアクセス方法については、以下のページをご覧ください:<a href='https://yuzu-emu.org/help/reference/log-files/'>ログファイルのアップロード方法について</a>。 - + Error while loading ROM! %1 %1 signifies a numeric error code. ROMのロード中にエラー! %1 - + %1<br>Please follow <a href='https://yuzu-emu.org/help/quickstart/'>the yuzu quickstart guide</a> to redump your files.<br>You can refer to the yuzu wiki</a> or the yuzu Discord</a> for help. %1 signifies an error string. %1<br><a href='https://yuzu-emu.org/help/quickstart/'>yuzuクイックスタートガイド</a>を参照してファイルを再ダンプしてください。<br>またはyuzu wiki及び</a>yuzu Discord</a>を参照するとよいでしょう。 - + An unknown error occurred. Please see the log for more details. 不明なエラーが発生しました。詳細はログを確認して下さい。 - + (64-bit) (64-bit) - + (32-bit) (32-bit) - + %1 %2 %1 is the title name. %2 indicates if the title is 64-bit or 32-bit %1 %2 - + Closing software... ソフトウェアを終了中... - + Save Data データのセーブ - + Mod Data Modデータ - + Error Opening %1 Folder ”%1”フォルダを開けませんでした - - + + Folder does not exist! フォルダが存在しません! - + Error Opening Transferable Shader Cache シェーダーキャッシュを開けませんでした - + Failed to create the shader cache directory for this title. このタイトル用のシェーダーキャッシュディレクトリの作成に失敗しました - + Error Removing Contents コンテンツの削除エラー - + Error Removing Update アップデートの削除エラー - + Error Removing DLC DLC の削除エラー - + Remove Installed Game Contents? インストールされたゲームのコンテンツを削除しますか? - + Remove Installed Game Update? インストールされたゲームのアップデートを削除しますか? - + Remove Installed Game DLC? インストールされたゲームの DLC を削除しますか? - + Remove Entry エントリ削除 - - - - - - + + + + + + Successfully Removed 削除しました - + Successfully removed the installed base game. インストールされたゲームを正常に削除しました。 - + The base game is not installed in the NAND and cannot be removed. ゲームはNANDにインストールされていないため、削除できません。 - + Successfully removed the installed update. インストールされたアップデートを正常に削除しました。 - + There is no update installed for this title. このタイトルのアップデートはインストールされていません。 - + There are no DLC installed for this title. このタイトルにはDLCがインストールされていません。 - + Successfully removed %1 installed DLC. %1にインストールされたDLCを正常に削除しました。 - + Delete OpenGL Transferable Shader Cache? - 転送可能なOpenGLシェーダーキャッシュを削除しますか? + OpenGLシェーダーキャッシュを削除しますか? - + Delete Vulkan Transferable Shader Cache? - 転送可能なVulkanシェーダーキャッシュを削除しますか? + Vulkanシェーダーキャッシュを削除しますか? - + Delete All Transferable Shader Caches? - 転送可能なすべてのシェーダーキャッシュを削除しますか? + すべてのシェーダーキャッシュを削除しますか? - + Remove Custom Game Configuration? このタイトルのカスタム設定を削除しますか? - + Remove Cache Storage? キャッシュストレージを削除しますか? - + Remove File ファイル削除 - - - Error Removing Transferable Shader Cache - 転送可能なシェーダーキャッシュの削除エラー + + Remove Play Time Data + プレイ時間情報を削除 - - + + Reset play time? + プレイ時間をリセットしますか? + + + + + Error Removing Transferable Shader Cache + シェーダーキャッシュの削除エラー + + + + A shader cache for this title does not exist. このタイトル用のシェーダーキャッシュは存在しません。 - + Successfully removed the transferable shader cache. - 転送可能なシェーダーキャッシュが正常に削除されました。 + シェーダーキャッシュを正常に削除しました。 - + Failed to remove the transferable shader cache. - 転送可能なシェーダーキャッシュを削除できませんでした。 + シェーダーキャッシュの削除に失敗しました。 - + Error Removing Vulkan Driver Pipeline Cache - + Failed to remove the driver pipeline cache. - - + + Error Removing Transferable Shader Caches - 転送可能なシェーダーキャッシュの削除エラー + シェーダーキャッシュの削除エラー - + Successfully removed the transferable shader caches. - 転送可能なシェーダーキャッシュを正常に削除しました。 + シェーダーキャッシュを正常に削除しました。 - + Failed to remove the transferable shader cache directory. - 転送可能なシェーダーキャッシュディレクトリの削除に失敗しました。 + シェーダーキャッシュディレクトリの削除に失敗しました。 - - + + Error Removing Custom Configuration カスタム設定の削除エラー - + A custom configuration for this title does not exist. このタイトルのカスタム設定は存在しません。 - + Successfully removed the custom game configuration. カスタム設定を正常に削除しました。 - + Failed to remove the custom game configuration. カスタム設定の削除に失敗しました。 - - + + RomFS Extraction Failed! RomFSの抽出に失敗しました! - + There was an error copying the RomFS files or the user cancelled the operation. RomFSファイルをコピー中にエラーが発生したか、ユーザー操作によりキャンセルされました。 - + Full フル - + Skeleton スケルトン - + Select RomFS Dump Mode RomFSダンプモードの選択 - + Please select the how you would like the RomFS dumped.<br>Full will copy all of the files into the new directory while <br>skeleton will only create the directory structure. RomFSのダンプ方法を選択してください。<br>”完全”はすべてのファイルが新しいディレクトリにコピーされます。<br>”スケルトン”はディレクトリ構造を作成するだけです。 - + There is not enough free space at %1 to extract the RomFS. Please free up space or select a different dump directory at Emulation > Configure > System > Filesystem > Dump Root %1 に RomFS を展開するための十分な空き領域がありません。Emulation > Configure > System > Filesystem > Dump Root で、空き容量を確保するか、別のダンプディレクトリを選択してください。 - + Extracting RomFS... RomFSを抽出中... - - - - + + + + Cancel キャンセル - + RomFS Extraction Succeeded! RomFS抽出成功! - - - + + + The operation completed successfully. 操作は成功しました。 - + Integrity verification couldn't be performed! - + 整合性の確認を実行できませんでした! - + File contents were not checked for validity. - + ファイルの妥当性は確認されませんでした. - - + + Integrity verification failed! - + 整合性の確認に失敗しました! - + File contents may be corrupt. - + ファイルが破損しているかもしれません。 - - + + Verifying integrity... - + 整合性を確認中... - - + + Integrity verification succeeded! - + 整合性の確認に成功しました! - - - - - + + + + Create Shortcut ショートカットを作成 - + This will create a shortcut to the current AppImage. This may not work well if you update. Continue? - - Cannot create shortcut on desktop. Path "%1" does not exist. + + Cannot create shortcut. Path "%1" does not exist. - - Cannot create shortcut in applications menu. Path "%1" does not exist and cannot be created. - - - - + Create Icon アイコンを作成 - + Cannot create icon file. Path "%1" does not exist and cannot be created. - + Start %1 with the yuzu Emulator - + Failed to create a shortcut at %1 - + %1 へのショートカット作成に失敗しました - + Successfully created a shortcut to %1 - + %1 へのショートカット作成に成功しました - + Error Opening %1 ”%1”を開けませんでした - + Select Directory ディレクトリの選択 - + Properties プロパティ - + The game properties could not be loaded. ゲームプロパティをロード出来ませんでした。 - + Switch Executable (%1);;All Files (*.*) %1 is an identifier for the Switch executable file extensions. Switch実行ファイル (%1);;すべてのファイル (*.*) - + Load File ファイルのロード - + Open Extracted ROM Directory 展開されているROMディレクトリを開く - + Invalid Directory Selected 無効なディレクトリが選択されました - + The directory you have selected does not contain a 'main' file. 選択されたディレクトリに”main”ファイルが見つかりませんでした。 - + Installable Switch File (*.nca *.nsp *.xci);;Nintendo Content Archive (*.nca);;Nintendo Submission Package (*.nsp);;NX Cartridge Image (*.xci) インストール可能なスイッチファイル (*.nca *.nsp *.xci);;任天堂コンテンツアーカイブ (*.nca);;任天堂サブミッションパッケージ (*.nsp);;NXカートリッジイメージ (*.xci) - + Install Files ファイルのインストール - + %n file(s) remaining 残り %n ファイル - + Installing file "%1"... "%1"ファイルをインストールしています・・・ - - + + Install Results インストール結果 - + To avoid possible conflicts, we discourage users from installing base games to the NAND. Please, only use this feature to install updates and DLC. 競合を避けるため、NANDにゲーム本体をインストールすることはお勧めしません。 この機能は、アップデートやDLCのインストールにのみ使用してください。 - + %n file(s) were newly installed %n ファイルが新たにインストールされました - + %n file(s) were overwritten %n ファイルが上書きされました - + %n file(s) failed to install %n ファイルのインストールに失敗しました - + System Application システムアプリケーション - + System Archive システムアーカイブ - + System Application Update システムアプリケーションアップデート - + Firmware Package (Type A) ファームウェアパッケージ(Type A) - + Firmware Package (Type B) ファームウェアパッケージ(Type B) - + Game ゲーム - + Game Update ゲームアップデート - + Game DLC ゲームDLC - + Delta Title 差分タイトル - + Select NCA Install Type... NCAインストール種別を選択・・・ - + Please select the type of title you would like to install this NCA as: (In most instances, the default 'Game' is fine.) インストールするNCAタイトル種別を選択して下さい: (ほとんどの場合、デフォルトの”ゲーム”で問題ありません。) - + Failed to Install インストール失敗 - + The title type you selected for the NCA is invalid. 選択されたNCAのタイトル種別が無効です。 - + File not found ファイルが存在しません - + File "%1" not found ファイル”%1”が存在しません - + OK OK - - + + Hardware requirements not met - - + + Your system does not meet the recommended hardware requirements. Compatibility reporting has been disabled. - + Missing yuzu Account yuzuアカウントが存在しません - + In order to submit a game compatibility test case, you must link your yuzu account.<br><br/>To link your yuzu account, go to Emulation &gt; Configuration &gt; Web. ゲームの互換性テストケースを送信するには、yuzuアカウントをリンクする必要があります。<br><br/>yuzuアカウントをリンクするには、エミュレーション > 設定 > Web から行います。 - + Error opening URL URLオープンエラー - + Unable to open the URL "%1". URL"%1"を開けません。 - + TAS Recording TAS 記録中 - + Overwrite file of player 1? プレイヤー1のファイルを上書きしますか? - + Invalid config detected 無効な設定を検出しました - + Handheld controller can't be used on docked mode. Pro controller will be selected. 携帯コントローラはドックモードで使用できないため、Proコントローラが選択されます。 - - + + Amiibo Amiibo - - + + The current amiibo has been removed 現在の amiibo は削除されました - + Error エラー - - + + The current game is not looking for amiibos 現在のゲームはamiiboを要求しません - + Amiibo File (%1);; All Files (*.*) amiiboファイル (%1);;すべてのファイル (*.*) - + Load Amiibo amiiboのロード - + Error loading Amiibo data amiiboデータ読み込み中にエラーが発生しました - + The selected file is not a valid amiibo - + 選択されたファイルは有効な amiibo ではありません - + The selected file is already on use - + 選択されたファイルはすでに使用中です - + An unknown error occurred 不明なエラーが発生しました - + Verification failed for the following files: %1 - + 以下のファイルの確認に失敗しました: + +%1 - + + + No firmware available + ファームウェアがありません + + + + Please install the firmware to use the Album applet. - + + Album Applet + + + + + Album applet is not available. Please reinstall firmware. + + + + + Please install the firmware to use the Cabinet applet. + + + + + Cabinet Applet + + + + + Cabinet applet is not available. Please reinstall firmware. + + + + Please install the firmware to use the Mii editor. - + Mii Edit Applet - + Mii editor is not available. Please reinstall firmware. - + Capture Screenshot スクリーンショットのキャプチャ - + PNG Image (*.png) PNG画像 (*.png) - + TAS state: Running %1/%2 TAS 状態: 実行中 %1/%2 - + TAS state: Recording %1 TAS 状態: 記録中 %1 - + TAS state: Idle %1/%2 TAS 状態: アイドル %1/%2 - + TAS State: Invalid TAS 状態: 無効 - + &Stop Running 実行停止(&S) - + &Start 実行(&S) - + Stop R&ecording 記録停止(&R) - + R&ecord 記録(&R) - + Building: %n shader(s) 構築中: %n 個のシェーダー - + Scale: %1x %1 is the resolution scaling factor 拡大率: %1x - + Speed: %1% / %2% 速度:%1% / %2% - + Speed: %1% 速度:%1% - + Game: %1 FPS (Unlocked) Game: %1 FPS(制限解除) - + Game: %1 FPS ゲーム:%1 FPS - + Frame: %1 ms フレーム:%1 ms - + %1 %2 %1 %2 - + FSR FSR - + NO AA NO AA - + VOLUME: MUTE 音量: ミュート - + VOLUME: %1% Volume percentage (e.g. 50%) 音量: %1% - + Confirm Key Rederivation キーの再取得確認 - + You are about to force rederive all of your keys. If you do not know what this means or what you are doing, this is a potentially destructive action. @@ -4725,37 +4758,37 @@ This will delete your autogenerated key files and re-run the key derivation modu 実行すると、自動生成された鍵ファイルが削除され、鍵生成モジュールが再実行されます。 - + Missing fuses ヒューズがありません - + - Missing BOOT0 - BOOT0がありません - + - Missing BCPKG2-1-Normal-Main - BCPKG2-1-Normal-Mainがありません - + - Missing PRODINFO - PRODINFOがありません - + Derivation Components Missing 派生コンポーネントがありません - + Encryption keys are missing. <br>Please follow <a href='https://yuzu-emu.org/help/quickstart/'>the yuzu quickstart guide</a> to get all your keys, firmware and games.<br><br><small>(%1)</small> 暗号化キーがありません。<br>キー、ファームウェア、ゲームを取得するには<a href='https://yuzu-emu.org/help/quickstart/'>yuzu クイックスタートガイド</a>を参照ください。<br><br><small>(%1)</small> - + Deriving keys... This may take up to a minute depending on your system's performance. @@ -4764,49 +4797,49 @@ on your system's performance. 1分以上かかります。 - + Deriving Keys 派生キー - + System Archive Decryption Failed システムアーカイブの復号に失敗しました - + Encryption keys failed to decrypt firmware. <br>Please follow <a href='https://yuzu-emu.org/help/quickstart/'>the yuzu quickstart guide</a> to get all your keys, firmware and games. - + Select RomFS Dump Target RomFSダンプターゲットの選択 - + Please select which RomFS you would like to dump. ダンプしたいRomFSを選択して下さい。 - + Are you sure you want to close yuzu? yuzuを終了しますか? - - - + + + yuzu yuzu - + Are you sure you want to stop the emulation? Any unsaved progress will be lost. エミュレーションを停止しますか?セーブされていない進行状況は失われます。 - + The currently running application has requested yuzu to not exit. Would you like to bypass this and exit anyway? @@ -4958,241 +4991,251 @@ Would you like to bypass this and exit anyway? GameList - + Favorite お気に入り - + Start Game ゲームを開始 - + Start Game without Custom Configuration カスタム設定なしでゲームを開始 - + Open Save Data Location セーブデータディレクトリを開く - + Open Mod Data Location Modデータディレクトリを開く - + Open Transferable Pipeline Cache - 転送可能なパイプラインキャッシュを開く + パイプラインキャッシュを開く - + Remove 削除 - + Remove Installed Update インストールされているアップデートを削除 - + Remove All Installed DLC 全てのインストールされているDLCを削除 - + Remove Custom Configuration カスタム設定を削除 - + + Remove Play Time Data + プレイ時間情報を削除 + + + Remove Cache Storage キャッシュストレージを削除 - + Remove OpenGL Pipeline Cache OpenGLパイプラインキャッシュを削除 - + Remove Vulkan Pipeline Cache Vulkanパイプラインキャッシュを削除 - + Remove All Pipeline Caches すべてのパイプラインキャッシュを削除 - + Remove All Installed Contents 全てのインストールされているコンテンツを削除 - - + + Dump RomFS RomFSをダンプ - + Dump RomFS to SDMC RomFSをSDMCにダンプ - + Verify Integrity - + 整合性を確認 - + Copy Title ID to Clipboard タイトルIDをクリップボードへコピー - + Navigate to GameDB entry GameDBエントリを表示 - + Create Shortcut ショートカットを作成 - + Add to Desktop デスクトップに追加 - + Add to Applications Menu アプリケーションメニューに追加 - + Properties プロパティ - + Scan Subfolders サブフォルダをスキャンする - + Remove Game Directory ゲームディレクトリを削除する - + ▲ Move Up ▲ 上へ移動 - + ▼ Move Down ▼ 下へ移動 - + Open Directory Location ディレクトリの場所を開く - + Clear クリア - + Name ゲーム名 - + Compatibility 互換性 - + Add-ons アドオン - + File type ファイル種別 - + Size ファイルサイズ + + + Play time + プレイ時間 + GameListItemCompat - + Ingame - + Game starts, but crashes or major glitches prevent it from being completed. - + Perfect カンペキ - + Game can be played without issues. - + Playable プレイ可 - + Game functions with minor graphical or audio glitches and is playable from start to finish. - + Intro/Menu イントロ - + Game loads, but is unable to progress past the Start Screen. - + Won't Boot 起動不可 - + The game crashes when attempting to startup. ゲームは起動時にクラッシュしました。 - + Not Tested 未テスト - + The game has not yet been tested. このゲームはまだテストされていません。 @@ -5200,7 +5243,7 @@ Would you like to bypass this and exit anyway? GameListPlaceholder - + Double-click to add a new folder to the game list 新しいゲームリストフォルダを追加するにはダブルクリックしてください。 @@ -5213,12 +5256,12 @@ Would you like to bypass this and exit anyway? - + Filter: フィルター: - + Enter pattern to filter フィルターパターンを入力 @@ -5302,7 +5345,7 @@ Would you like to bypass this and exit anyway? Failed to announce the room to the public lobby. In order to host a room publicly, you must have a valid yuzu account configured in Emulation -> Configure -> Web. If you do not want to publish a room in the public lobby, then select Unlisted instead. Debug Message: - 公開ロビーへの部屋のアナウンスに失敗しました。部屋を公開するためには、Emulation -> Configure -> Web で有効なyuzuアカウントが設定されている必要があります。もし、部屋を公開ロビーに公開したくないのであれば、代わりに非公開を選択してください。 + 公開ロビーへのルームのアナウンスに失敗しました。ルームを公開するためには、エミュレーション -> 設定 -> Web で有効なyuzuアカウントが設定されている必要があります。もし、ルームを公開ロビーに公開したくないのであれば、代わりに非公開を選択してください。 デバッグメッセージ : @@ -5336,6 +5379,7 @@ Debug Message: + Main Window メイン画面 @@ -5441,6 +5485,11 @@ Debug Message: + Toggle Renderdoc Capture + + + + Toggle Status Bar ステータスバー切り替え @@ -5679,186 +5728,216 @@ Debug Message: + &Amiibo + &Amiibo + + + &TAS &TAS - + &Help ヘルプ(&H) - + &Install Files to NAND... ファイルをNANDにインストール...(&I) - + L&oad File... ファイルをロード...(&L) - + Load &Folder... フォルダをロード...(&F) - + E&xit 終了(&E) - + &Pause 中断(&P) - + &Stop 停止(&S) - + &Reinitialize keys... 鍵を再初期化...(&R) - + &Verify Installed Contents - + インストールされたコンテンツを確認(&V) - + &About yuzu yuzuについて(&A) - + Single &Window Mode シングルウィンドウモード(&W) - + Con&figure... 設定...(&F) - + Display D&ock Widget Headers ドックウィジェットヘッダ(&O) - + Show &Filter Bar フィルタバー(&F) - + Show &Status Bar ステータスバー(&S) - + Show Status Bar ステータスバーの表示 - + &Browse Public Game Lobby 公開ゲームロビーを参照 (&B) - + &Create Room ルームを作成 (&C) - + &Leave Room ルームを退出 (&L) - + &Direct Connect to Room ルームに直接接続 (&D) - + &Show Current Room 現在のルームを表示 (&S) - + F&ullscreen 全画面表示(&F) - + &Restart 再実行(&R) - + Load/Remove &Amiibo... &Amiibo をロード/削除... - + &Report Compatibility 互換性を報告(&R) - + Open &Mods Page &Modページを開く - + Open &Quickstart Guide クイックスタートガイドを開く(&Q) - + &FAQ &FAQ - + Open &yuzu Folder &yuzuフォルダを開く - + &Capture Screenshot スクリーンショットをキャプチャ(&C) - - Open &Mii Editor + + Open &Album - + + &Set Nickname and Owner + + + + + &Delete Game Data + ゲームデータを削除(&D) + + + + &Restore Amiibo + + + + + &Format Amiibo + + + + + Open &Mii Editor + &Mii エディタを開く + + + &Configure TAS... TASを設定... (&C) - + Configure C&urrent Game... 現在のゲームを設定...(&U) - + &Start 実行(&S) - + &Reset リセット(&R) - + R&ecord 記録(&R) @@ -5930,7 +6009,7 @@ Debug Message: Not Connected. Click here to find a room! - 接続されていません。ここをクリックして部屋を見つけてください。 + 接続されていません。ここをクリックしてルームを見つけてください。 @@ -6015,7 +6094,7 @@ Debug Message: The host of the room has banned you. Speak with the host to unban you or try a different room. - この部屋のホストはあなたを入室禁止にしています。ホストと話をしてアクセス禁止を解除してもらうか、他の部屋を試してみてください。 + このルームのホストはあなたを入室禁止にしています。ホストと話をしてアクセス禁止を解除してもらうか、他のルームを試してみてください。 @@ -6035,7 +6114,7 @@ Debug Message: Connection to room lost. Try to reconnect. - 部屋への接続が失われました。再接続を試みてください。 + ルームへの接続が失われました。再接続を試みてください。 @@ -6085,7 +6164,7 @@ Proceed anyway? You are about to close the room. Any network connections will be closed. - 部屋を閉じようとしています。ネットワーク接続がすべて終了します。 + ルームを閉じようとしています。ネットワーク接続がすべて終了します。 @@ -6095,7 +6174,7 @@ Proceed anyway? You are about to leave the room. Any network connections will be closed. - 部屋を退出しようとしています。ネットワーク接続はすべて終了します。 + ルームを退出しようとしています。ネットワーク接続はすべて終了します。 @@ -6165,27 +6244,27 @@ p, li { white-space: pre-wrap; } - + Installed SD Titles インストール済みSDタイトル - + Installed NAND Titles インストール済みNANDタイトル - + System Titles システムタイトル - + Add New Game Directory 新しいゲームディレクトリを追加する - + Favorites お気に入り @@ -6711,7 +6790,7 @@ p, li { white-space: pre-wrap; } - + Pro Controller Proコントローラ @@ -6724,7 +6803,7 @@ p, li { white-space: pre-wrap; } - + Dual Joycons Joy-Con(L/R) @@ -6737,7 +6816,7 @@ p, li { white-space: pre-wrap; } - + Left Joycon Joy-Con(L) @@ -6750,7 +6829,7 @@ p, li { white-space: pre-wrap; } - + Right Joycon Joy-Con(R) @@ -6779,7 +6858,7 @@ p, li { white-space: pre-wrap; } - + Handheld 携帯モード @@ -6895,32 +6974,37 @@ p, li { white-space: pre-wrap; } 8 - + + Not enough controllers + + + + GameCube Controller ゲームキューブコントローラ - + Poke Ball Plus モンスターボールプラス - + NES Controller ファミコン・コントローラー - + SNES Controller スーパーファミコン・コントローラー - + N64 Controller ニンテンドウ64・コントローラー - + Sega Genesis メガドライブ @@ -7026,7 +7110,7 @@ Please try again or contact the developer of the software. Change settings for which user? - + どのユーザの設定を変更しますか? @@ -7036,12 +7120,12 @@ Please try again or contact the developer of the software. Which user will be transferred to another console? - + どのユーザを別のコンソールに転送しますか? Send save data for which user? - + どのユーザにセーブデータを送信しますか? @@ -7107,7 +7191,7 @@ p, li { white-space: pre-wrap; } [%1] %2 - + [%1] %2 diff --git a/dist/languages/ko_KR.ts b/dist/languages/ko_KR.ts index f5204f1aa2..0dc3cd319f 100644 --- a/dist/languages/ko_KR.ts +++ b/dist/languages/ko_KR.ts @@ -373,13 +373,13 @@ This would ban both their forum username and their IP address. % - + Auto (%1) Auto select time zone 자동 (%1) - + Default (%1) Default time zone 기본 (%1) @@ -894,49 +894,29 @@ This would ban both their forum username and their IP address. - Create Minidump After Crash - 충돌후 미니덤프 생성 - - - Enable this to output the latest generated audio command list to the console. Only affects games using the audio renderer. 이 옵션을 활성화하면 가장 최근에 생성된 오디오 명령어 목록을 콘솔에 출력할 수 있습니다. 오디오 렌더러를 사용하는 게임에만 영향을 줍니다. - + Dump Audio Commands To Console** 콘솔에 오디오 명령어 덤프 - + Enable Verbose Reporting Services** 자세한 리포팅 서비스 활성화** - + **This will be reset automatically when yuzu closes. **Yuzu가 종료되면 자동으로 재설정됩니다. - - Restart Required - 재시작 필요 - - - - yuzu is required to restart in order to apply this setting. - 이 설정을 적용하려면 yuzu를 다시 시작해야 합니다. - - - + Web applet not compiled 웹 애플릿이 컴파일되지 않음 - - - MiniDump creation not compiled - MiniDump 생성이 컴파일되지 않음 - ConfigureDebugController @@ -1355,7 +1335,7 @@ This would ban both their forum username and their IP address. - + Conflicting Key Sequence 키 시퀀스 충돌 @@ -1376,27 +1356,37 @@ This would ban both their forum username and their IP address. 유효하지않음 - + + Invalid hotkey settings + + + + + An error occurred. Please report this issue on github. + + + + Restore Default 초기화 - + Clear 비우기 - + Conflicting Button Sequence 키 시퀀스 충돌 - + The default button sequence is already assigned to: %1 기본 키 시퀀스가 %1에 이미 할당되었습니다. - + The default key sequence is already assigned to: %1 기본 키 시퀀스가 %1에 이미 할당되었습니다. @@ -3373,67 +3363,72 @@ Drag points to change position, or double-click table cells to edit values.파일 형식 열 표시 - + + Show Play Time Column + + + + Game Icon Size: 게임 아이콘 크기: - + Folder Icon Size: 폴더 아이콘 크기: - + Row 1 Text: 1번째 행 텍스트: - + Row 2 Text: 2번째 행 텍스트: - + Screenshots 스크린샷 - + Ask Where To Save Screenshots (Windows Only) 스크린샷 저장 위치 물어보기 (Windows 전용) - + Screenshots Path: 스크린샷 경로 : - + ... ... - + TextLabel - + Resolution: 해상도: - + Select Screenshots Path... 스크린샷 경로 선택... - + <System> <System> - + Auto (%1 x %2, %3 x %4) Screenshot width value 자동 (%1 x %2, %3 x %4) @@ -3751,965 +3746,1001 @@ Drag points to change position, or double-click table cells to edit values. GMainWindow - + <a href='https://yuzu-emu.org/help/feature/telemetry/'>Anonymous data is collected</a> to help improve yuzu. <br/><br/>Would you like to share your usage data with us? yuzu를 개선하기 위해 <a href='https://yuzu-emu.org/help/feature/telemetry/'>익명 데이터가 수집됩니다.</a> <br/><br/>사용 데이터를 공유하시겠습니까? - + Telemetry 원격 측정 - + Broken Vulkan Installation Detected 깨진 Vulkan 설치 감지됨 - + Vulkan initialization failed during boot.<br><br>Click <a href='https://yuzu-emu.org/wiki/faq/#yuzu-starts-with-the-error-broken-vulkan-installation-detected'>here for instructions to fix the issue</a>. 부팅하는 동안 Vulkan 초기화에 실패했습니다.<br><br>문제 해결 지침을 보려면 <a href='https://yuzu-emu.org/wiki/faq/#yuzu-starts-with-the-error-broken-vulkan-installation-detected'>여기</a>를 클릭하세요. - + Running a game TRANSLATORS: This string is shown to the user to explain why yuzu needs to prevent the computer from sleeping 게임 실행중 - + Loading Web Applet... 웹 애플릿을 로드하는 중... - - + + Disable Web Applet 웹 애플릿 비활성화 - + Disabling the web applet can lead to undefined behavior and should only be used with Super Mario 3D All-Stars. Are you sure you want to disable the web applet? (This can be re-enabled in the Debug settings.) 웹 애플릿을 비활성화하면 정의되지 않은 동작이 발생할 수 있으며 Super Mario 3D All-Stars에서만 사용해야 합니다. 웹 애플릿을 비활성화하시겠습니까? (디버그 설정에서 다시 활성화할 수 있습니다.) - + The amount of shaders currently being built 현재 생성중인 셰이더의 양 - + The current selected resolution scaling multiplier. 현재 선택된 해상도 배율입니다. - + Current emulation speed. Values higher or lower than 100% indicate emulation is running faster or slower than a Switch. 현재 에뮬레이션 속도. 100%보다 높거나 낮은 값은 에뮬레이션이 Switch보다 빠르거나 느린 것을 나타냅니다. - + How many frames per second the game is currently displaying. This will vary from game to game and scene to scene. 게임이 현재 표시하고 있는 초당 프레임 수입니다. 이것은 게임마다 다르고 장면마다 다릅니다. - + Time taken to emulate a Switch frame, not counting framelimiting or v-sync. For full-speed emulation this should be at most 16.67 ms. 프레임 제한이나 수직 동기화를 계산하지 않고 Switch 프레임을 에뮬레이션 하는 데 걸린 시간. 최대 속도로 에뮬레이트 중일 때에는 대부분 16.67 ms 근처입니다. - + Unmute 음소거 해제 - + Mute 음소거 - + Reset Volume 볼륨 재설정 - + &Clear Recent Files Clear Recent Files(&C) - + Emulated mouse is enabled 에뮬레이트 마우스 사용 - + Real mouse input and mouse panning are incompatible. Please disable the emulated mouse in input advanced settings to allow mouse panning. 실제 마우스 입력과 마우스 패닝은 호환되지 않습니다. 마우스 패닝을 허용하려면 입력 고급 설정에서 에뮬레이트 마우스를 비활성화하세요. - + &Continue 재개(&C) - + &Pause 일시중지(&P) - + Warning Outdated Game Format 오래된 게임 포맷 경고 - + You are using the deconstructed ROM directory format for this game, which is an outdated format that has been superseded by others such as NCA, NAX, XCI, or NSP. Deconstructed ROM directories lack icons, metadata, and update support.<br><br>For an explanation of the various Switch formats yuzu supports, <a href='https://yuzu-emu.org/wiki/overview-of-switch-game-formats'>check out our wiki</a>. This message will not be shown again. 이 게임 파일은 '분해된 ROM 디렉토리'라는 오래된 포맷을 사용하고 있습니다. 해당 포맷은 NCA, NAX, XCI 또는 NSP와 같은 다른 포맷으로 대체되었으며 분해된 ROM 디렉토리에는 아이콘, 메타 데이터 및 업데이트가 지원되지 않습니다.<br><br>yuzu가 지원하는 다양한 Switch 포맷에 대한 설명은 <a href='https://yuzu-emu.org/wiki/overview-of-switch-game-formats'>위키를 확인하세요.</a> 이 메시지는 다시 표시되지 않습니다. - + Error while loading ROM! ROM 로드 중 오류 발생! - + The ROM format is not supported. 지원되지 않는 롬 포맷입니다. - + An error occurred initializing the video core. 비디오 코어를 초기화하는 동안 오류가 발생했습니다. - + yuzu has encountered an error while running the video core. This is usually caused by outdated GPU drivers, including integrated ones. Please see the log for more details. For more information on accessing the log, please see the following page: <a href='https://yuzu-emu.org/help/reference/log-files/'>How to Upload the Log File</a>. 비디오 코어를 실행하는 동안 yuzu에 오류가 발생했습니다. 이것은 일반적으로 통합 드라이버를 포함하여 오래된 GPU 드라이버로 인해 발생합니다. 자세한 내용은 로그를 참조하십시오. 로그 액세스에 대한 자세한 내용은 <a href='https://yuzu-emu.org/help/reference/log-files/'>로그 파일 업로드 방법</a> 페이지를 참조하세요. - + Error while loading ROM! %1 %1 signifies a numeric error code. ROM 불러오는 중 오류 발생! %1 - + %1<br>Please follow <a href='https://yuzu-emu.org/help/quickstart/'>the yuzu quickstart guide</a> to redump your files.<br>You can refer to the yuzu wiki</a> or the yuzu Discord</a> for help. %1 signifies an error string. %1<br>파일들을 다시 덤프하기 위해<a href='https://yuzu-emu.org/help/quickstart/'>yuzu 빠른 시작 가이드</a> 를 따라주세요.<br>도움이 필요할 시 yuzu 위키</a> 를 참고하거나 yuzu 디스코드</a> 를 이용해보세요. - + An unknown error occurred. Please see the log for more details. 알 수 없는 오류가 발생했습니다. 자세한 내용은 로그를 참고하십시오. - + (64-bit) (64비트) - + (32-bit) (32비트) - + %1 %2 %1 is the title name. %2 indicates if the title is 64-bit or 32-bit %1 %2 - + Closing software... 소프트웨어를 닫는 중... - + Save Data 세이브 데이터 - + Mod Data 모드 데이터 - + Error Opening %1 Folder %1 폴더 열기 오류 - - + + Folder does not exist! 폴더가 존재하지 않습니다! - + Error Opening Transferable Shader Cache 전송 가능한 셰이더 캐시 열기 오류 - + Failed to create the shader cache directory for this title. 이 타이틀에 대한 셰이더 캐시 디렉토리를 생성하지 못했습니다. - + Error Removing Contents 콘텐츠 제거 중 오류 발생 - + Error Removing Update 업데이트 제거 오류 - + Error Removing DLC DLC 제거 오류 - + Remove Installed Game Contents? 설치된 게임 콘텐츠를 제거하겠습니까? - + Remove Installed Game Update? 설치된 게임 업데이트를 제거하겠습니까? - + Remove Installed Game DLC? 설치된 게임 DLC를 제거하겠습니까? - + Remove Entry 항목 제거 - - - - - - + + + + + + Successfully Removed 삭제 완료 - + Successfully removed the installed base game. 설치된 기본 게임을 성공적으로 제거했습니다. - + The base game is not installed in the NAND and cannot be removed. 기본 게임은 NAND에 설치되어 있지 않으며 제거 할 수 없습니다. - + Successfully removed the installed update. 설치된 업데이트를 성공적으로 제거했습니다. - + There is no update installed for this title. 이 타이틀에 대해 설치된 업데이트가 없습니다. - + There are no DLC installed for this title. 이 타이틀에 설치된 DLC가 없습니다. - + Successfully removed %1 installed DLC. 설치된 %1 DLC를 성공적으로 제거했습니다. - + Delete OpenGL Transferable Shader Cache? OpenGL 전송 가능한 셰이더 캐시를 삭제하시겠습니까? - + Delete Vulkan Transferable Shader Cache? Vulkan 전송 가능한 셰이더 캐시를 삭제하시겠습니까? - + Delete All Transferable Shader Caches? 모든 전송 가능한 셰이더 캐시를 삭제하시겠습니까? - + Remove Custom Game Configuration? 사용자 지정 게임 구성을 제거 하시겠습니까? - + Remove Cache Storage? 캐시 저장소를 제거하겠습니까? - + Remove File 파일 제거 - - + + Remove Play Time Data + + + + + Reset play time? + + + + + Error Removing Transferable Shader Cache 전송 가능한 셰이더 캐시 제거 오류 - - + + A shader cache for this title does not exist. 이 타이틀에 대한 셰이더 캐시가 존재하지 않습니다. - + Successfully removed the transferable shader cache. 전송 가능한 셰이더 캐시를 성공적으로 제거했습니다. - + Failed to remove the transferable shader cache. 전송 가능한 셰이더 캐시를 제거하지 못했습니다. - + Error Removing Vulkan Driver Pipeline Cache Vulkan 드라이버 파이프라인 캐시 제거 오류 - + Failed to remove the driver pipeline cache. 드라이버 파이프라인 캐시를 제거하지 못했습니다. - - + + Error Removing Transferable Shader Caches 전송 가능한 셰이더 캐시 제거 오류 - + Successfully removed the transferable shader caches. 전송 가능한 셰이더 캐시를 성공적으로 제거했습니다. - + Failed to remove the transferable shader cache directory. 전송 가능한 셰이더 캐시 디렉토리를 제거하지 못했습니다. - - + + Error Removing Custom Configuration 사용자 지정 구성 제거 오류 - + A custom configuration for this title does not exist. 이 타이틀에 대한 사용자 지정 구성이 존재하지 않습니다. - + Successfully removed the custom game configuration. 사용자 지정 게임 구성을 성공적으로 제거했습니다. - + Failed to remove the custom game configuration. 사용자 지정 게임 구성을 제거하지 못했습니다. - - + + RomFS Extraction Failed! RomFS 추출 실패! - + There was an error copying the RomFS files or the user cancelled the operation. RomFS 파일을 복사하는 중에 오류가 발생했거나 사용자가 작업을 취소했습니다. - + Full 전체 - + Skeleton 뼈대 - + Select RomFS Dump Mode RomFS 덤프 모드 선택 - + Please select the how you would like the RomFS dumped.<br>Full will copy all of the files into the new directory while <br>skeleton will only create the directory structure. RomFS 덤프 방법을 선택하십시오.<br>전체는 모든 파일을 새 디렉토리에 복사하고<br>뼈대는 디렉토리 구조 만 생성합니다. - + There is not enough free space at %1 to extract the RomFS. Please free up space or select a different dump directory at Emulation > Configure > System > Filesystem > Dump Root %1에 RomFS를 추출하기에 충분한 여유 공간이 없습니다. 공간을 확보하거나 에뮬레이견 > 설정 > 시스템 > 파일시스템 > 덤프 경로에서 다른 덤프 디렉토리를 선택하십시오. - + Extracting RomFS... RomFS 추출 중... - - - - + + + + Cancel 취소 - + RomFS Extraction Succeeded! RomFS 추출이 성공했습니다! - - - + + + The operation completed successfully. 작업이 성공적으로 완료되었습니다. - + Integrity verification couldn't be performed! - + File contents were not checked for validity. - - + + Integrity verification failed! - + File contents may be corrupt. - - + + Verifying integrity... - - + + Integrity verification succeeded! - - - - - + + + + Create Shortcut 바로가기 만들기 - + This will create a shortcut to the current AppImage. This may not work well if you update. Continue? 현재 AppImage에 대한 바로 가기가 생성됩니다. 업데이트하면 제대로 작동하지 않을 수 있습니다. 계속합니까? - - Cannot create shortcut on desktop. Path "%1" does not exist. - 바탕 화면에 바로가기를 만들 수 없습니다. 경로 "%1"이(가) 존재하지 않습니다. + + Cannot create shortcut. Path "%1" does not exist. + - - Cannot create shortcut in applications menu. Path "%1" does not exist and cannot be created. - 애플리케이션 메뉴에서 바로가기를 만들 수 없습니다. 경로 "%1"이(가) 존재하지 않으며 생성할 수 없습니다. - - - + Create Icon 아이콘 만들기 - + Cannot create icon file. Path "%1" does not exist and cannot be created. 아이콘 파일을 만들 수 없습니다. 경로 "%1"이(가) 존재하지 않으며 생성할 수 없습니다. - + Start %1 with the yuzu Emulator yuzu 에뮬레이터로 %1 시작 - + Failed to create a shortcut at %1 %1에서 바로가기를 만들기 실패 - + Successfully created a shortcut to %1 %1 바로가기를 성공적으로 만듬 - + Error Opening %1 %1 열기 오류 - + Select Directory 경로 선택 - + Properties 속성 - + The game properties could not be loaded. 게임 속성을 로드 할 수 없습니다. - + Switch Executable (%1);;All Files (*.*) %1 is an identifier for the Switch executable file extensions. Switch 실행파일 (%1);;모든 파일 (*.*) - + Load File 파일 로드 - + Open Extracted ROM Directory 추출된 ROM 디렉토리 열기 - + Invalid Directory Selected 잘못된 디렉토리 선택 - + The directory you have selected does not contain a 'main' file. 선택한 디렉토리에 'main'파일이 없습니다. - + Installable Switch File (*.nca *.nsp *.xci);;Nintendo Content Archive (*.nca);;Nintendo Submission Package (*.nsp);;NX Cartridge Image (*.xci) 설치 가능한 Switch 파일 (*.nca *.nsp *.xci);;Nintendo 컨텐츠 아카이브 (*.nca);;Nintendo 서브미션 패키지 (*.nsp);;NX 카트리지 이미지 (*.xci) - + Install Files 파일 설치 - + %n file(s) remaining %n개의 파일이 남음 - + Installing file "%1"... 파일 "%1" 설치 중... - - + + Install Results 설치 결과 - + To avoid possible conflicts, we discourage users from installing base games to the NAND. Please, only use this feature to install updates and DLC. 충돌을 피하기 위해, 낸드에 베이스 게임을 설치하는 것을 권장하지 않습니다. 이 기능은 업데이트나 DLC를 설치할 때에만 사용해주세요. - + %n file(s) were newly installed %n개의 파일이 새로 설치되었습니다. - + %n file(s) were overwritten %n개의 파일을 덮어썼습니다. - + %n file(s) failed to install %n개의 파일을 설치하지 못했습니다. - + System Application 시스템 애플리케이션 - + System Archive 시스템 아카이브 - + System Application Update 시스템 애플리케이션 업데이트 - + Firmware Package (Type A) 펌웨어 패키지 (A타입) - + Firmware Package (Type B) 펌웨어 패키지 (B타입) - + Game 게임 - + Game Update 게임 업데이트 - + Game DLC 게임 DLC - + Delta Title 델타 타이틀 - + Select NCA Install Type... NCA 설치 유형 선택... - + Please select the type of title you would like to install this NCA as: (In most instances, the default 'Game' is fine.) 이 NCA를 설치할 타이틀 유형을 선택하세요: (대부분의 경우 기본값인 '게임'이 괜찮습니다.) - + Failed to Install 설치 실패 - + The title type you selected for the NCA is invalid. NCA 타이틀 유형이 유효하지 않습니다. - + File not found 파일을 찾을 수 없음 - + File "%1" not found 파일 "%1"을 찾을 수 없습니다 - + OK OK - - + + Hardware requirements not met 하드웨어 요구 사항이 충족되지 않음 - - + + Your system does not meet the recommended hardware requirements. Compatibility reporting has been disabled. 시스템이 권장 하드웨어 요구 사항을 충족하지 않습니다. 호환성 보고가 비활성화되었습니다. - + Missing yuzu Account yuzu 계정 누락 - + In order to submit a game compatibility test case, you must link your yuzu account.<br><br/>To link your yuzu account, go to Emulation &gt; Configuration &gt; Web. 게임 호환성 테스트 결과를 제출하려면 yuzu 계정을 연결해야합니다.<br><br/>yuzu 계정을 연결하려면 에뮬레이션 &gt; 설정 &gt; 웹으로 가세요. - + Error opening URL URL 열기 오류 - + Unable to open the URL "%1". URL "%1"을 열 수 없습니다. - + TAS Recording TAS 레코딩 - + Overwrite file of player 1? 플레이어 1의 파일을 덮어쓰시겠습니까? - + Invalid config detected 유효하지 않은 설정 감지 - + Handheld controller can't be used on docked mode. Pro controller will be selected. 휴대 모드용 컨트롤러는 거치 모드에서 사용할 수 없습니다. 프로 컨트롤러로 대신 선택됩니다. - - + + Amiibo Amiibo - - + + The current amiibo has been removed 현재 amiibo가 제거되었습니다. - + Error 오류 - - + + The current game is not looking for amiibos 현재 게임은 amiibo를 찾고 있지 않습니다 - + Amiibo File (%1);; All Files (*.*) Amiibo 파일 (%1);; 모든 파일 (*.*) - + Load Amiibo Amiibo 로드 - + Error loading Amiibo data Amiibo 데이터 로드 오류 - + The selected file is not a valid amiibo 선택한 파일은 유효한 amiibo가 아닙니다 - + The selected file is already on use 선택한 파일은 이미 사용 중입니다 - + An unknown error occurred 알수없는 오류가 발생했습니다 - + Verification failed for the following files: %1 - + + + No firmware available - + + Please install the firmware to use the Album applet. + + + + + Album Applet + + + + + Album applet is not available. Please reinstall firmware. + + + + + Please install the firmware to use the Cabinet applet. + + + + + Cabinet Applet + + + + + Cabinet applet is not available. Please reinstall firmware. + + + + Please install the firmware to use the Mii editor. - + Mii Edit Applet - + Mii editor is not available. Please reinstall firmware. - + Capture Screenshot 스크린샷 캡처 - + PNG Image (*.png) PNG 이미지 (*.png) - + TAS state: Running %1/%2 TAS 상태: %1/%2 실행 중 - + TAS state: Recording %1 TAS 상태: 레코딩 %1 - + TAS state: Idle %1/%2 TAS 상태: 유휴 %1/%2 - + TAS State: Invalid TAS 상태: 유효하지 않음 - + &Stop Running 실행 중지(&S) - + &Start 시작(&S) - + Stop R&ecording 레코딩 중지(&e) - + R&ecord 레코드(&R) - + Building: %n shader(s) 빌드중: %n개 셰이더 - + Scale: %1x %1 is the resolution scaling factor 스케일: %1x - + Speed: %1% / %2% 속도: %1% / %2% - + Speed: %1% 속도: %1% - + Game: %1 FPS (Unlocked) 게임: %1 FPS (제한없음) - + Game: %1 FPS 게임: %1 FPS - + Frame: %1 ms 프레임: %1 ms - + %1 %2 %1 %2 - + FSR FSR - + NO AA AA 없음 - + VOLUME: MUTE 볼륨: 음소거 - + VOLUME: %1% Volume percentage (e.g. 50%) 볼륨: %1% - + Confirm Key Rederivation 키 재생성 확인 - + You are about to force rederive all of your keys. If you do not know what this means or what you are doing, this is a potentially destructive action. @@ -4726,37 +4757,37 @@ This will delete your autogenerated key files and re-run the key derivation modu 자동 생성되었던 키 파일들이 삭제되고 키 생성 모듈이 다시 실행됩니다. - + Missing fuses fuses 누락 - + - Missing BOOT0 - BOOT0 누락 - + - Missing BCPKG2-1-Normal-Main - BCPKG2-1-Normal-Main 누락 - + - Missing PRODINFO - PRODINFO 누락 - + Derivation Components Missing 파생 구성 요소 누락 - + Encryption keys are missing. <br>Please follow <a href='https://yuzu-emu.org/help/quickstart/'>the yuzu quickstart guide</a> to get all your keys, firmware and games.<br><br><small>(%1)</small> 암호화 키가 없습니다. <br>모든 키, 펌웨어 및 게임을 얻으려면 <a href='https://yuzu-emu.org/help/quickstart/'>yuzu 빠른 시작 가이드</a>를 따르세요.<br><br> <small>(%1)</small> - + Deriving keys... This may take up to a minute depending on your system's performance. @@ -4765,49 +4796,49 @@ on your system's performance. 소요될 수 있습니다. - + Deriving Keys 파생 키 - + System Archive Decryption Failed 시스템 아카이브 암호 해독 실패 - + Encryption keys failed to decrypt firmware. <br>Please follow <a href='https://yuzu-emu.org/help/quickstart/'>the yuzu quickstart guide</a> to get all your keys, firmware and games. 암호화 키가 펌웨어를 해독하지 못했습니다. <br> 암호화 키와 펌웨어 및 게임을 얻기위해<a href='https://yuzu-emu.org/help/quickstart/'> Yuzu 빠른 시작 가이드 </a>를 따르세요. - + Select RomFS Dump Target RomFS 덤프 대상 선택 - + Please select which RomFS you would like to dump. 덤프할 RomFS를 선택하십시오. - + Are you sure you want to close yuzu? yuzu를 닫으시겠습니까? - - - + + + yuzu yuzu - + Are you sure you want to stop the emulation? Any unsaved progress will be lost. 에뮬레이션을 중지하시겠습니까? 모든 저장되지 않은 진행 상황은 사라집니다. - + The currently running application has requested yuzu to not exit. Would you like to bypass this and exit anyway? @@ -4959,241 +4990,251 @@ Would you like to bypass this and exit anyway? GameList - + Favorite 선호하는 게임 - + Start Game 게임 시작 - + Start Game without Custom Configuration 맞춤 설정 없이 게임 시작 - + Open Save Data Location 세이브 데이터 경로 열기 - + Open Mod Data Location MOD 데이터 경로 열기 - + Open Transferable Pipeline Cache 전송 가능한 파이프라인 캐시 열기 - + Remove 제거 - + Remove Installed Update 설치된 업데이트 삭제 - + Remove All Installed DLC 설치된 모든 DLC 삭제 - + Remove Custom Configuration 사용자 지정 구성 제거 - + + Remove Play Time Data + + + + Remove Cache Storage 캐시 스토리지 제거 - + Remove OpenGL Pipeline Cache OpenGL 파이프라인 캐시 제거 - + Remove Vulkan Pipeline Cache Vulkan 파이프라인 캐시 제거 - + Remove All Pipeline Caches 모든 파이프라인 캐시 제거 - + Remove All Installed Contents 설치된 모든 컨텐츠 제거 - - + + Dump RomFS RomFS를 덤프 - + Dump RomFS to SDMC RomFS를 SDMC로 덤프 - + Verify Integrity - + Copy Title ID to Clipboard 클립보드에 타이틀 ID 복사 - + Navigate to GameDB entry GameDB 항목으로 이동 - + Create Shortcut 바로가기 만들기 - + Add to Desktop 데스크톱에 추가 - + Add to Applications Menu 애플리케이션 메뉴에 추가 - + Properties 속성 - + Scan Subfolders 하위 폴더 스캔 - + Remove Game Directory 게임 디렉토리 제거 - + ▲ Move Up ▲ 위로 이동 - + ▼ Move Down ▼ 아래로 이동 - + Open Directory Location 디렉토리 위치 열기 - + Clear 초기화 - + Name 이름 - + Compatibility 호환성 - + Add-ons 부가 기능 - + File type 파일 형식 - + Size 크기 + + + Play time + + GameListItemCompat - + Ingame 게임 내 - + Game starts, but crashes or major glitches prevent it from being completed. 게임이 시작되지만, 충돌이나 주요 결함으로 인해 게임이 완료되지 않습니다. - + Perfect 완벽함 - + Game can be played without issues. 문제 없이 게임 플레이가 가능합니다. - + Playable 재생 가능 - + Game functions with minor graphical or audio glitches and is playable from start to finish. 약간의 그래픽 또는 오디오 결함이 있는 게임 기능이 있으며 처음부터 끝까지 플레이할 수 있습니다. - + Intro/Menu 인트로/메뉴 - + Game loads, but is unable to progress past the Start Screen. 게임이 로드되지만 시작 화면을 지나서 진행할 수 없습니다. - + Won't Boot 실행 불가 - + The game crashes when attempting to startup. 게임 실행 시 크래시가 일어납니다. - + Not Tested 테스트되지 않음 - + The game has not yet been tested. 이 게임은 아직 테스트되지 않았습니다. @@ -5201,7 +5242,7 @@ Would you like to bypass this and exit anyway? GameListPlaceholder - + Double-click to add a new folder to the game list 더블 클릭하여 게임 목록에 새 폴더 추가 @@ -5214,12 +5255,12 @@ Would you like to bypass this and exit anyway? %1 중의 %n 결과 - + Filter: 필터: - + Enter pattern to filter 검색 필터 입력 @@ -5337,6 +5378,7 @@ Debug Message: + Main Window 메인 윈도우 @@ -5442,6 +5484,11 @@ Debug Message: + Toggle Renderdoc Capture + + + + Toggle Status Bar 상태 표시줄 전환 @@ -5680,186 +5727,216 @@ Debug Message: + &Amiibo + + + + &TAS TAS(&T) - + &Help 도움말(&H) - + &Install Files to NAND... 낸드에 파일 설치(&I) - + L&oad File... 파일 불러오기...(&L) - + Load &Folder... 폴더 불러오기...(&F) - + E&xit 종료(&X) - + &Pause 일시중지(&P) - + &Stop 정지(&S) - + &Reinitialize keys... 키 재설정...(&R) - + &Verify Installed Contents - + &About yuzu yuzu 정보(&A) - + Single &Window Mode 싱글 창 모드(&W) - + Con&figure... 설정(&f) - + Display D&ock Widget Headers 독 위젯 헤더 표시(&o) - + Show &Filter Bar 필터링 바 표시(&F) - + Show &Status Bar 상태 표시줄 보이기(&S) - + Show Status Bar 상태 표시줄 보이기 - + &Browse Public Game Lobby 공개 게임 로비 찾아보기(&B) - + &Create Room 방 만들기(&C) - + &Leave Room 방에서 나가기(&L) - + &Direct Connect to Room 방에 직접 연결(&D) - + &Show Current Room 현재 방 표시(&S) - + F&ullscreen 전체 화면(&u) - + &Restart 재시작(&R) - + Load/Remove &Amiibo... Amiibo 로드/제거(&A)... - + &Report Compatibility 호환성 보고(&R) - + Open &Mods Page 게임 모드 페이지 열기(&M) - + Open &Quickstart Guide 빠른 시작 가이드 열기(&Q) - + &FAQ FAQ(&F) - + Open &yuzu Folder yuzu 폴더 열기(&y) - + &Capture Screenshot 스크린샷 찍기(&C) - + + Open &Album + + + + + &Set Nickname and Owner + + + + + &Delete Game Data + + + + + &Restore Amiibo + + + + + &Format Amiibo + + + + Open &Mii Editor - + &Configure TAS... TAS설정...(&C) - + Configure C&urrent Game... 실행중인 게임 맞춤 설정...(&u) - + &Start 시작(&S) - + &Reset 리셋(&R) - + R&ecord 레코드(&e) @@ -6167,27 +6244,27 @@ p, li { white-space: pre-wrap; } 게임을 하지 않음 - + Installed SD Titles 설치된 SD 타이틀 - + Installed NAND Titles 설치된 NAND 타이틀 - + System Titles 시스템 타이틀 - + Add New Game Directory 새 게임 디렉토리 추가 - + Favorites 선호하는 게임 @@ -6713,7 +6790,7 @@ p, li { white-space: pre-wrap; } - + Pro Controller 프로 컨트롤러 @@ -6726,7 +6803,7 @@ p, li { white-space: pre-wrap; } - + Dual Joycons 듀얼 조이콘 @@ -6739,7 +6816,7 @@ p, li { white-space: pre-wrap; } - + Left Joycon 왼쪽 조이콘 @@ -6752,7 +6829,7 @@ p, li { white-space: pre-wrap; } - + Right Joycon 오른쪽 조이콘 @@ -6781,7 +6858,7 @@ p, li { white-space: pre-wrap; } - + Handheld 휴대 모드 @@ -6897,32 +6974,37 @@ p, li { white-space: pre-wrap; } 8 - + + Not enough controllers + + + + GameCube Controller GameCube 컨트롤러 - + Poke Ball Plus 몬스터볼 Plus - + NES Controller NES 컨트롤러 - + SNES Controller SNES 컨트롤러 - + N64 Controller N64 컨트롤러 - + Sega Genesis 세가 제네시스 diff --git a/dist/languages/nb.ts b/dist/languages/nb.ts index d5e1ea1385..14be337d62 100644 --- a/dist/languages/nb.ts +++ b/dist/languages/nb.ts @@ -373,13 +373,13 @@ Dette vil bannlyse både deres forum brukernavn og deres IP adresse.% - + Auto (%1) Auto select time zone Auto (%1) - + Default (%1) Default time zone Normalverdi (%1) @@ -893,49 +893,29 @@ Dette vil bannlyse både deres forum brukernavn og deres IP adresse. - Create Minidump After Crash - Lag Minidump Etter Kræsj - - - Enable this to output the latest generated audio command list to the console. Only affects games using the audio renderer. Aktiver dette for å sende den siste genererte lydkommandolisten til konsollen. Påvirker bare spill som bruker lydrenderen. - + Dump Audio Commands To Console** Dump Lydkommandoer Til Konsollen** - + Enable Verbose Reporting Services** Aktiver Verbose Reporting Services** - + **This will be reset automatically when yuzu closes. **Dette blir automatisk tilbakestilt når yuzu lukkes. - - Restart Required - Omstart Nødvendig - - - - yuzu is required to restart in order to apply this setting. - yuzu må startes på nytt for å bruke denne innstillingen. - - - + Web applet not compiled Web-applet ikke kompilert - - - MiniDump creation not compiled - MiniDump-opprettelse ikke kompilert - ConfigureDebugController @@ -1354,7 +1334,7 @@ Dette vil bannlyse både deres forum brukernavn og deres IP adresse. - + Conflicting Key Sequence Mostridende tastesekvens @@ -1375,27 +1355,37 @@ Dette vil bannlyse både deres forum brukernavn og deres IP adresse.Ugyldig - + + Invalid hotkey settings + + + + + An error occurred. Please report this issue on github. + + + + Restore Default Gjenopprett Standardverdi - + Clear Fjern - + Conflicting Button Sequence Motstridende knappesekvens - + The default button sequence is already assigned to: %1 Standardknappesekvensen er allerede tildelt til: %1 - + The default key sequence is already assigned to: %1 Standardtastesekvensen er allerede tildelt til: %1 @@ -3373,67 +3363,72 @@ Dra punkter for å endre posisjon, eller dobbelttrykk på tabellfelter for å re Vis Kolonne For Filtype - + + Show Play Time Column + + + + Game Icon Size: Spillikonstørrelse: - + Folder Icon Size: Mappeikonstørrelse: - + Row 1 Text: Rad 1 Tekst: - + Row 2 Text: Rad 2 Tekst: - + Screenshots Skjermbilder - + Ask Where To Save Screenshots (Windows Only) Spør om hvor skjermbilder skal lagres (kun for Windows) - + Screenshots Path: Skjermbildebane: - + ... ... - + TextLabel TextLabel - + Resolution: Oppløsning: - + Select Screenshots Path... Velg Skermbildebane... - + <System> <System> - + Auto (%1 x %2, %3 x %4) Screenshot width value Auto (%1 x %2, %3 x %4) @@ -3751,612 +3746,616 @@ Dra punkter for å endre posisjon, eller dobbelttrykk på tabellfelter for å re GMainWindow - + <a href='https://yuzu-emu.org/help/feature/telemetry/'>Anonymous data is collected</a> to help improve yuzu. <br/><br/>Would you like to share your usage data with us? <a href='https://yuzu-emu.org/help/feature/telemetry/'>Anonym data blir samlet inn</a>for å hjelpe til med å forbedre yuzu.<br/><br/>Vil du dele din bruksdata med oss? - + Telemetry Telemetri - + Broken Vulkan Installation Detected Ødelagt Vulkan-installasjon oppdaget - + Vulkan initialization failed during boot.<br><br>Click <a href='https://yuzu-emu.org/wiki/faq/#yuzu-starts-with-the-error-broken-vulkan-installation-detected'>here for instructions to fix the issue</a>. Vulkan-initialisering mislyktes under oppstart.<br><br>Klikk<a href='https://yuzu-emu.org/wiki/faq/#yuzu-starts-with-the-error-broken-vulkan-installation-detected'>her for instruksjoner for å løse problemet</a>. - + Running a game TRANSLATORS: This string is shown to the user to explain why yuzu needs to prevent the computer from sleeping Kjører et spill - + Loading Web Applet... Laster web-applet... - - + + Disable Web Applet Slå av web-applet - + Disabling the web applet can lead to undefined behavior and should only be used with Super Mario 3D All-Stars. Are you sure you want to disable the web applet? (This can be re-enabled in the Debug settings.) Deaktivering av webappleten kan føre til udefinert oppførsel og bør bare brukes med Super Mario 3D All-Stars. Er du sikker på at du vil deaktivere webappleten? (Dette kan aktiveres på nytt i feilsøkingsinnstillingene). - + The amount of shaders currently being built Antall shader-e som bygges for øyeblikket - + The current selected resolution scaling multiplier. Den valgte oppløsningsskaleringsfaktoren. - + Current emulation speed. Values higher or lower than 100% indicate emulation is running faster or slower than a Switch. Nåværende emuleringshastighet. Verdier høyere eller lavere en 100% indikerer at emuleringen kjører raskere eller tregere enn en Switch. - + How many frames per second the game is currently displaying. This will vary from game to game and scene to scene. Hvor mange bilder per sekund spiller viser. Dette vil variere fra spill til spill og scene til scene. - + Time taken to emulate a Switch frame, not counting framelimiting or v-sync. For full-speed emulation this should be at most 16.67 ms. Tid det tar for å emulere et Switch bilde. Teller ikke med bildebegrensing eller v-sync. For full-hastighet emulering burde dette være 16.67 ms. på det høyeste. - + Unmute Slå på lyden - + Mute Lydløs - + Reset Volume Tilbakestill volum - + &Clear Recent Files &Tøm Nylige Filer - + Emulated mouse is enabled Emulert mus er aktivert - + Real mouse input and mouse panning are incompatible. Please disable the emulated mouse in input advanced settings to allow mouse panning. Ekte museinndata og musepanning er inkompatible. Deaktiver den emulerte musen i avanserte innstillinger for inndata for å tillate musepanning. - + &Continue &Fortsett - + &Pause &Paus - + Warning Outdated Game Format Advarsel: Utdatert Spillformat - + You are using the deconstructed ROM directory format for this game, which is an outdated format that has been superseded by others such as NCA, NAX, XCI, or NSP. Deconstructed ROM directories lack icons, metadata, and update support.<br><br>For an explanation of the various Switch formats yuzu supports, <a href='https://yuzu-emu.org/wiki/overview-of-switch-game-formats'>check out our wiki</a>. This message will not be shown again. Du bruker en dekonstruert ROM-mappe for dette spillet, som er et utdatert format som har blitt erstattet av andre formater som NCA, NAX, XCI, eller NSP. Dekonstruerte ROM-mapper mangler ikoner, metadata, og oppdateringsstøtte.<br><br>For en forklaring på diverse Switch-formater som yuzu støtter,<a href='https://yuzu-emu.org/wiki/overview-of-switch-game-formats'>sjekk vår wiki</a>. Denne meldingen vil ikke bli vist igjen. - + Error while loading ROM! Feil under innlasting av ROM! - + The ROM format is not supported. Dette ROM-formatet er ikke støttet. - + An error occurred initializing the video core. En feil oppstod under initialisering av videokjernen. - + yuzu has encountered an error while running the video core. This is usually caused by outdated GPU drivers, including integrated ones. Please see the log for more details. For more information on accessing the log, please see the following page: <a href='https://yuzu-emu.org/help/reference/log-files/'>How to Upload the Log File</a>. yuzu har oppdaget en feil under kjøring av videokjernen. Dette er vanligvis forårsaket av utdaterte GPU-drivere, inkludert for integrert grafikk. Vennligst sjekk loggen for flere detaljer. For mer informasjon om å finne loggen, besøk følgende side: <a href='https://yuzu-emu.org/help/reference/log-files/'>How to Uploadd the Log File</a>. - + Error while loading ROM! %1 %1 signifies a numeric error code. Feil under lasting av ROM! %1 - + %1<br>Please follow <a href='https://yuzu-emu.org/help/quickstart/'>the yuzu quickstart guide</a> to redump your files.<br>You can refer to the yuzu wiki</a> or the yuzu Discord</a> for help. %1 signifies an error string. %1<br>Vennligst følg <a href='https://yuzu-emu.org/help/quickstart/'>hurtigstartsguiden</a> for å redumpe filene dine. <br>Du kan henvise til yuzu wikien</a> eller yuzu Discorden</a> for hjelp. - + An unknown error occurred. Please see the log for more details. En ukjent feil oppstod. Se loggen for flere detaljer. - + (64-bit) (64-bit) - + (32-bit) (32-bit) - + %1 %2 %1 is the title name. %2 indicates if the title is 64-bit or 32-bit %1 %2 - + Closing software... Lukker programvare... - + Save Data Lagre Data - + Mod Data Mod Data - + Error Opening %1 Folder Feil Under Åpning av %1 Mappen - - + + Folder does not exist! Mappen eksisterer ikke! - + Error Opening Transferable Shader Cache Feil ved åpning av overførbar shaderbuffer - + Failed to create the shader cache directory for this title. Kunne ikke opprette shader cache-katalogen for denne tittelen. - + Error Removing Contents Feil ved fjerning av innhold - + Error Removing Update Feil ved fjerning av oppdatering - + Error Removing DLC Feil ved fjerning av DLC - + Remove Installed Game Contents? Fjern Innstallert Spillinnhold? - + Remove Installed Game Update? Fjern Installert Spilloppdatering? - + Remove Installed Game DLC? Fjern Installert Spill DLC? - + Remove Entry Fjern oppføring - - - - - - + + + + + + Successfully Removed Fjerning lykkes - + Successfully removed the installed base game. Vellykket fjerning av det installerte basisspillet. - + The base game is not installed in the NAND and cannot be removed. Grunnspillet er ikke installert i NAND og kan ikke bli fjernet. - + Successfully removed the installed update. Fjernet vellykket den installerte oppdateringen. - + There is no update installed for this title. Det er ingen oppdatering installert for denne tittelen. - + There are no DLC installed for this title. Det er ingen DLC installert for denne tittelen. - + Successfully removed %1 installed DLC. Fjernet vellykket %1 installerte DLC-er. - + Delete OpenGL Transferable Shader Cache? Slette OpenGL Overførbar Shaderbuffer? - + Delete Vulkan Transferable Shader Cache? Slette Vulkan Overførbar Shaderbuffer? - + Delete All Transferable Shader Caches? Slette Alle Overførbare Shaderbuffere? - + Remove Custom Game Configuration? Fjern Tilpasset Spillkonfigurasjon? - + Remove Cache Storage? Fjerne Hurtiglagringen? - + Remove File Fjern Fil - - + + Remove Play Time Data + + + + + Reset play time? + + + + + Error Removing Transferable Shader Cache Feil under fjerning av overførbar shader cache - - + + A shader cache for this title does not exist. En shaderbuffer for denne tittelen eksisterer ikke. - + Successfully removed the transferable shader cache. Lykkes i å fjerne den overførbare shader cachen. - + Failed to remove the transferable shader cache. Feil under fjerning av den overførbare shader cachen. - + Error Removing Vulkan Driver Pipeline Cache Feil ved fjerning av Vulkan Driver-Rørledningsbuffer - + Failed to remove the driver pipeline cache. Kunne ikke fjerne driverens rørledningsbuffer. - - + + Error Removing Transferable Shader Caches Feil ved fjerning av overførbare shaderbuffere - + Successfully removed the transferable shader caches. Vellykket fjerning av overførbare shaderbuffere. - + Failed to remove the transferable shader cache directory. Feil ved fjerning av overførbar shaderbuffer katalog. - - + + Error Removing Custom Configuration Feil Under Fjerning Av Tilpasset Konfigurasjon - + A custom configuration for this title does not exist. En tilpasset konfigurasjon for denne tittelen finnes ikke. - + Successfully removed the custom game configuration. Fjernet vellykket den tilpassede spillkonfigurasjonen. - + Failed to remove the custom game configuration. Feil under fjerning av den tilpassede spillkonfigurasjonen. - - + + RomFS Extraction Failed! Utvinning av RomFS Feilet! - + There was an error copying the RomFS files or the user cancelled the operation. Det oppstod en feil under kopiering av RomFS filene eller så kansellerte brukeren operasjonen. - + Full Fullstendig - + Skeleton Skjelett - + Select RomFS Dump Mode Velg RomFS Dump Modus - + Please select the how you would like the RomFS dumped.<br>Full will copy all of the files into the new directory while <br>skeleton will only create the directory structure. Velg hvordan du vil dumpe RomFS.<br>Fullstendig vil kopiere alle filene til en ny mappe mens <br>skjelett vil bare skape mappestrukturen. - + There is not enough free space at %1 to extract the RomFS. Please free up space or select a different dump directory at Emulation > Configure > System > Filesystem > Dump Root Det er ikke nok ledig plass på %1 til å pakke ut RomFS. Vennligst frigjør plass eller velg en annen dump-katalog under Emulering > Konfigurer > System > Filsystem > Dump Root. - + Extracting RomFS... Utvinner RomFS... - - - - + + + + Cancel Avbryt - + RomFS Extraction Succeeded! RomFS Utpakking lyktes! - - - + + + The operation completed successfully. Operasjonen fullført vellykket. - + Integrity verification couldn't be performed! Integritetsverifisering kunne ikke utføres! - + File contents were not checked for validity. Filinnholdet ble ikke kontrollert for gyldighet. - - + + Integrity verification failed! Integritetsverifisering mislyktes! - + File contents may be corrupt. Filinnholdet kan være skadet. - - + + Verifying integrity... Verifiserer integritet... - - + + Integrity verification succeeded! Integritetsverifisering vellykket! - - - - - + + + + Create Shortcut Lag Snarvei - + This will create a shortcut to the current AppImage. This may not work well if you update. Continue? Dette vil opprette en snarvei til gjeldende AppImage. Dette fungerer kanskje ikke bra hvis du oppdaterer. Fortsette? - - Cannot create shortcut on desktop. Path "%1" does not exist. - Kan ikke opprette snarvei på skrivebordet. Stien "%1" finnes ikke. + + Cannot create shortcut. Path "%1" does not exist. + - - Cannot create shortcut in applications menu. Path "%1" does not exist and cannot be created. - Kan ikke opprette snarvei i applikasjonsmenyen. Stien "%1" finnes ikke og kan ikke opprettes. - - - + Create Icon Lag Ikon - + Cannot create icon file. Path "%1" does not exist and cannot be created. Kan ikke opprette ikonfil. Stien "%1" finnes ikke og kan ikke opprettes. - + Start %1 with the yuzu Emulator Start %1 med yuzu-emulatoren - + Failed to create a shortcut at %1 Mislyktes i å opprette en snarvei ved %1 - + Successfully created a shortcut to %1 Opprettet en snarvei til %1 - + Error Opening %1 Feil ved åpning av %1 - + Select Directory Velg Mappe - + Properties Egenskaper - + The game properties could not be loaded. Spillets egenskaper kunne ikke bli lastet inn. - + Switch Executable (%1);;All Files (*.*) %1 is an identifier for the Switch executable file extensions. Switch Kjørbar Fil (%1);;Alle Filer (*.*) - + Load File Last inn Fil - + Open Extracted ROM Directory Åpne Utpakket ROM Mappe - + Invalid Directory Selected Ugyldig Mappe Valgt - + The directory you have selected does not contain a 'main' file. Mappen du valgte inneholder ikke en 'main' fil. - + Installable Switch File (*.nca *.nsp *.xci);;Nintendo Content Archive (*.nca);;Nintendo Submission Package (*.nsp);;NX Cartridge Image (*.xci) Installerbar Switch-Fil (*.nca *.nsp *.xci);;Nintendo Content Archive (*.nca);;Nintendo Submission Package (*.nsp);;NX Cartridge Image (*.xcI) - + Install Files Installer Filer - + %n file(s) remaining %n fil gjenstår%n filer gjenstår - + Installing file "%1"... Installerer fil "%1"... - - + + Install Results Insallasjonsresultater - + To avoid possible conflicts, we discourage users from installing base games to the NAND. Please, only use this feature to install updates and DLC. For å unngå mulige konflikter fraråder vi brukere å installere basisspill på NAND. Bruk kun denne funksjonen til å installere oppdateringer og DLC. - + %n file(s) were newly installed %n fil ble nylig installert @@ -4364,7 +4363,7 @@ Bruk kun denne funksjonen til å installere oppdateringer og DLC. - + %n file(s) were overwritten %n fil ble overskrevet @@ -4372,7 +4371,7 @@ Bruk kun denne funksjonen til å installere oppdateringer og DLC. - + %n file(s) failed to install %n fil ble ikke installert @@ -4380,194 +4379,194 @@ Bruk kun denne funksjonen til å installere oppdateringer og DLC. - + System Application Systemapplikasjon - + System Archive Systemarkiv - + System Application Update Systemapplikasjonsoppdatering - + Firmware Package (Type A) Firmware Pakke (Type A) - + Firmware Package (Type B) Firmware-Pakke (Type B) - + Game Spill - + Game Update Spilloppdatering - + Game DLC Spill tilleggspakke - + Delta Title Delta Tittel - + Select NCA Install Type... Velg NCA Installasjonstype... - + Please select the type of title you would like to install this NCA as: (In most instances, the default 'Game' is fine.) Vennligst velg typen tittel du vil installere denne NCA-en som: (I de fleste tilfellene, standarden 'Spill' fungerer.) - + Failed to Install Feil under Installasjon - + The title type you selected for the NCA is invalid. Titteltypen du valgte for NCA-en er ugyldig. - + File not found Fil ikke funnet - + File "%1" not found Filen "%1" ikke funnet - + OK OK - - + + Hardware requirements not met Krav til maskinvare ikke oppfylt - - + + Your system does not meet the recommended hardware requirements. Compatibility reporting has been disabled. Systemet ditt oppfyller ikke de anbefalte maskinvarekravene. Kompatibilitetsrapportering er deaktivert. - + Missing yuzu Account Mangler yuzu Bruker - + In order to submit a game compatibility test case, you must link your yuzu account.<br><br/>To link your yuzu account, go to Emulation &gt; Configuration &gt; Web. For å sende inn et testtilfelle for spillkompatibilitet, må du linke yuzu-brukeren din.<br><br/>For å linke yuzu-brukeren din, gå til Emulasjon &gt; Konfigurasjon &gt; Nett. - + Error opening URL Feil under åpning av URL - + Unable to open the URL "%1". Kunne ikke åpne URL "%1". - + TAS Recording TAS-innspilling - + Overwrite file of player 1? Overskriv filen til spiller 1? - + Invalid config detected Ugyldig konfigurasjon oppdaget - + Handheld controller can't be used on docked mode. Pro controller will be selected. Håndholdt kontroller kan ikke brukes i dokket modus. Pro-kontroller vil bli valgt. - - + + Amiibo Amiibo - - + + The current amiibo has been removed Den valgte amiibo-en har blitt fjernet - + Error Feil - - + + The current game is not looking for amiibos Det kjørende spillet sjekker ikke for amiibo-er - + Amiibo File (%1);; All Files (*.*) Amiibo-Fil (%1);; Alle Filer (*.*) - + Load Amiibo Last inn Amiibo - + Error loading Amiibo data Feil ved lasting av Amiibo data - + The selected file is not a valid amiibo Den valgte filen er ikke en gyldig amiibo - + The selected file is already on use Den valgte filen er allerede i bruk - + An unknown error occurred En ukjent feil oppso - + Verification failed for the following files: %1 @@ -4576,145 +4575,177 @@ Bruk kun denne funksjonen til å installere oppdateringer og DLC. %1 - + + + No firmware available - + + Please install the firmware to use the Album applet. + + + + + Album Applet + + + + + Album applet is not available. Please reinstall firmware. + + + + + Please install the firmware to use the Cabinet applet. + + + + + Cabinet Applet + + + + + Cabinet applet is not available. Please reinstall firmware. + + + + Please install the firmware to use the Mii editor. - + Mii Edit Applet - + Mii editor is not available. Please reinstall firmware. - + Capture Screenshot Ta Skjermbilde - + PNG Image (*.png) PNG Bilde (*.png) - + TAS state: Running %1/%2 TAS-tilstand: Kjører %1/%2 - + TAS state: Recording %1 TAS-tilstand: Spiller inn %1 - + TAS state: Idle %1/%2 TAS-tilstand: Venter %1%2 - + TAS State: Invalid TAS-tilstand: Ugyldig - + &Stop Running &Stopp kjøring - + &Start &Start - + Stop R&ecording Stopp innspilling (&E) - + R&ecord Spill inn (%E) - + Building: %n shader(s) Bygger: %n shaderBygger: %n shader-e - + Scale: %1x %1 is the resolution scaling factor Skala: %1x - + Speed: %1% / %2% Hastighet: %1% / %2% - + Speed: %1% Hastighet: %1% - + Game: %1 FPS (Unlocked) Spill: %1 FPS (ubegrenset) - + Game: %1 FPS Spill: %1 FPS - + Frame: %1 ms Ramme: %1 ms - + %1 %2 %1 %2 - + FSR FSR - + NO AA INGEN AA - + VOLUME: MUTE VOLUM: DEMPET - + VOLUME: %1% Volume percentage (e.g. 50%) VOLUM: %1% - + Confirm Key Rederivation Bekreft Nøkkel-Redirevasjon - + You are about to force rederive all of your keys. If you do not know what this means or what you are doing, this is a potentially destructive action. @@ -4731,37 +4762,37 @@ og eventuelt lag backups. Dette vil slette dine autogenererte nøkkel-filer og kjøre nøkkel-derivasjonsmodulen på nytt. - + Missing fuses Mangler fuses - + - Missing BOOT0 - Mangler BOOT0 - + - Missing BCPKG2-1-Normal-Main - Mangler BCPKG2-1-Normal-Main - + - Missing PRODINFO - Mangler PRODINFO - + Derivation Components Missing Derivasjonskomponenter Mangler - + Encryption keys are missing. <br>Please follow <a href='https://yuzu-emu.org/help/quickstart/'>the yuzu quickstart guide</a> to get all your keys, firmware and games.<br><br><small>(%1)</small> Krypteringsnøkler mangler. <br>Vennligst følg <a href='https://yuzu-emu.org/help/quickstart/'>yuzus oppstartsguide</a> for å få alle nøklene, fastvaren og spillene dine.<br><br><small>(%1)</small> - + Deriving keys... This may take up to a minute depending on your system's performance. @@ -4770,49 +4801,49 @@ Dette kan ta opp til et minutt avhengig av systemytelsen din. - + Deriving Keys Deriverer Nøkler - + System Archive Decryption Failed Dekryptering av systemarkiv mislyktes - + Encryption keys failed to decrypt firmware. <br>Please follow <a href='https://yuzu-emu.org/help/quickstart/'>the yuzu quickstart guide</a> to get all your keys, firmware and games. Krypteringsnøkler klarte ikke å dekryptere firmware. <br>Vennligst følg <a href='https://yuzu-emu.org/help/quickstart/'>quickstartguiden for yuzu </a> for å få alle nøkler, firmware og spill. - + Select RomFS Dump Target Velg RomFS Dump-Mål - + Please select which RomFS you would like to dump. Vennligst velg hvilken RomFS du vil dumpe. - + Are you sure you want to close yuzu? Er du sikker på at du vil lukke yuzu? - - - + + + yuzu yuzu - + Are you sure you want to stop the emulation? Any unsaved progress will be lost. Er du sikker på at du vil stoppe emulasjonen? All ulagret fremgang vil bli tapt. - + The currently running application has requested yuzu to not exit. Would you like to bypass this and exit anyway? @@ -4964,241 +4995,251 @@ Vil du overstyre dette og lukke likevel? GameList - + Favorite Legg til som favoritt - + Start Game Start Spill - + Start Game without Custom Configuration Star Spill Uten Tilpasset Konfigurasjon - + Open Save Data Location Åpne Lagret Data plassering - + Open Mod Data Location Åpne Mod Data plassering - + Open Transferable Pipeline Cache Åpne Overførbar Rørledningsbuffer - + Remove Fjern - + Remove Installed Update Fjern Installert Oppdatering - + Remove All Installed DLC Fjern All Installert DLC - + Remove Custom Configuration Fjern Tilpasset Konfigurasjon - + + Remove Play Time Data + + + + Remove Cache Storage Fjern Hurtiglagring - + Remove OpenGL Pipeline Cache Fjer OpenGL Rørledningsbuffer - + Remove Vulkan Pipeline Cache Fjern Vulkan Rørledningsbuffer - + Remove All Pipeline Caches Fjern Alle Rørledningsbuffere - + Remove All Installed Contents Fjern All Installert Innhold - - + + Dump RomFS Dump RomFS - + Dump RomFS to SDMC Dump RomFS til SDMC - + Verify Integrity Verifiser integritet - + Copy Title ID to Clipboard Kopier Tittel-ID til Utklippstavle - + Navigate to GameDB entry Naviger til GameDB-oppføring - + Create Shortcut lag Snarvei - + Add to Desktop Legg Til På Skrivebordet - + Add to Applications Menu Legg Til Applikasjonsmenyen - + Properties Egenskaper - + Scan Subfolders Skann Undermapper - + Remove Game Directory Fjern Spillmappe - + ▲ Move Up ▲ Flytt Opp - + ▼ Move Down ▼ Flytt Ned - + Open Directory Location Åpne Spillmappe - + Clear Fjern - + Name Navn - + Compatibility Kompatibilitet - + Add-ons Tilleggsprogrammer - + File type Fil Type - + Size Størrelse + + + Play time + + GameListItemCompat - + Ingame i Spillet - + Game starts, but crashes or major glitches prevent it from being completed. Spillet starter, men krasjer eller større feil gjør at det ikke kan fullføres. - + Perfect Perfekt - + Game can be played without issues. Spillet kan spilles uten problemer. - + Playable Spillbart - + Game functions with minor graphical or audio glitches and is playable from start to finish. Spillet fungerer med mindre grafiske eller lydfeil og kan spilles fra start til slutt. - + Intro/Menu Intro/Meny - + Game loads, but is unable to progress past the Start Screen. Spillet lastes inn, men kan ikke gå videre forbi startskjermen. - + Won't Boot Vil ikke starte - + The game crashes when attempting to startup. Spillet krasjer under oppstart. - + Not Tested Ikke testet - + The game has not yet been tested. Spillet har ikke blitt testet ennå. @@ -5206,7 +5247,7 @@ Vil du overstyre dette og lukke likevel? GameListPlaceholder - + Double-click to add a new folder to the game list Dobbeltrykk for å legge til en ny mappe i spillisten @@ -5219,12 +5260,12 @@ Vil du overstyre dette og lukke likevel? %1 of %n resultat%1 of %n resultater - + Filter: Filter: - + Enter pattern to filter Angi mønster for å filtrere @@ -5342,6 +5383,7 @@ Feilmelding: + Main Window Hovedvindu @@ -5447,6 +5489,11 @@ Feilmelding: + Toggle Renderdoc Capture + + + + Toggle Status Bar Veksle Statuslinje @@ -5685,186 +5732,216 @@ Feilmelding: + &Amiibo + + + + &TAS &TAS - + &Help &Hjelp - + &Install Files to NAND... &Installer filer til NAND... - + L&oad File... Last inn fil... (&O) - + Load &Folder... Last inn mappe (&F) - + E&xit &Avslutt - + &Pause &Paus - + &Stop &Stop - + &Reinitialize keys... &Reinitialiser nøkler... - + &Verify Installed Contents - + &About yuzu Om yuzu (&A) - + Single &Window Mode Énvindusmodus (&W) - + Con&figure... Kon&figurer... - + Display D&ock Widget Headers Vis Overskrifter for Dock Widget (&O) - + Show &Filter Bar Vis &filterlinje - + Show &Status Bar Vis &statuslinje - + Show Status Bar Vis statuslinje - + &Browse Public Game Lobby Bla gjennom den offentlige spillobbyen (&B) - + &Create Room Opprett Rom (&C) - + &Leave Room Forlat Rommet (&L) - + &Direct Connect to Room Direkte Tilkobling Til Rommet (&D) - + &Show Current Room Vis nåværende rom (&S) - + F&ullscreen F&ullskjerm - + &Restart Omstart (&R) - + Load/Remove &Amiibo... Last/Fjern Amiibo (&A) - + &Report Compatibility Rapporter kompatibilitet (&R) - + Open &Mods Page Åpne Modifikasjonssiden (&M) - + Open &Quickstart Guide Åpne Hurtigstartsguiden (&Q) - + &FAQ &FAQ - + Open &yuzu Folder Åpne &yuzu Mappen - + &Capture Screenshot Ta Skjermbilde (&C) - + + Open &Album + + + + + &Set Nickname and Owner + + + + + &Delete Game Data + + + + + &Restore Amiibo + + + + + &Format Amiibo + + + + Open &Mii Editor - + &Configure TAS... Konfigurer TAS (&C) - + Configure C&urrent Game... Konfigurer Gjeldende Spill (&U) - + &Start &Start - + &Reset Tilbakestill (&R) - + R&ecord Spill inn (%E) @@ -6172,27 +6249,27 @@ p, li { white-space: pre-wrap; } Spiller ikke et spill - + Installed SD Titles Installerte SD-titler - + Installed NAND Titles Installerte NAND-titler - + System Titles System Titler - + Add New Game Directory Legg til ny spillmappe - + Favorites Favoritter @@ -6718,7 +6795,7 @@ p, li { white-space: pre-wrap; } - + Pro Controller Pro-Kontroller @@ -6731,7 +6808,7 @@ p, li { white-space: pre-wrap; } - + Dual Joycons Doble Joycons @@ -6744,7 +6821,7 @@ p, li { white-space: pre-wrap; } - + Left Joycon Venstre Joycon @@ -6757,7 +6834,7 @@ p, li { white-space: pre-wrap; } - + Right Joycon Høyre Joycon @@ -6786,7 +6863,7 @@ p, li { white-space: pre-wrap; } - + Handheld Håndholdt @@ -6902,32 +6979,37 @@ p, li { white-space: pre-wrap; } 8 - + + Not enough controllers + + + + GameCube Controller GameCube-kontroller - + Poke Ball Plus Poke Ball Plus - + NES Controller NES-kontroller - + SNES Controller SNES-kontroller - + N64 Controller N64-kontroller - + Sega Genesis Sega Genesis diff --git a/dist/languages/nl.ts b/dist/languages/nl.ts index ec7577c9d1..c1d9985d95 100644 --- a/dist/languages/nl.ts +++ b/dist/languages/nl.ts @@ -373,13 +373,13 @@ Dit zou zowel hun forum gebruikersnaam als hun IP-adres verbannen. % - + Auto (%1) Auto select time zone Auto (%1) - + Default (%1) Default time zone Standaard (%1) @@ -881,49 +881,29 @@ Dit zou zowel hun forum gebruikersnaam als hun IP-adres verbannen. - Create Minidump After Crash - Maak Minidump na Crash - - - Enable this to output the latest generated audio command list to the console. Only affects games using the audio renderer. Zet dit aan om de laatst gegenereerde audio commandolijst naar de console te sturen. Alleen van invloed op spellen die de audio renderer gebruiken. - + Dump Audio Commands To Console** Dump Audio-opdrachten naar Console** - + Enable Verbose Reporting Services** Schakel Verbose Reporting Services** in - + **This will be reset automatically when yuzu closes. **Deze optie wordt automatisch gereset wanneer yuzu is gesloten. - - Restart Required - Herstart Vereist - - - - yuzu is required to restart in order to apply this setting. - yuzu moet opnieuw opstarten om deze instelling toe te passen. - - - + Web applet not compiled Webapplet niet gecompileerd - - - MiniDump creation not compiled - MiniDump-creatie niet gecompileerd - ConfigureDebugController @@ -1342,7 +1322,7 @@ Dit zou zowel hun forum gebruikersnaam als hun IP-adres verbannen. - + Conflicting Key Sequence Ongeldige Toetsvolgorde @@ -1363,27 +1343,37 @@ Dit zou zowel hun forum gebruikersnaam als hun IP-adres verbannen. Ongeldig - + + Invalid hotkey settings + + + + + An error occurred. Please report this issue on github. + + + + Restore Default Standaard Herstellen - + Clear Wis - + Conflicting Button Sequence Conflicterende Knoppencombinatie - + The default button sequence is already assigned to: %1 De standaard knoppencombinatie is al toegewezen aan: %1 - + The default key sequence is already assigned to: %1 De ingevoerde toetsencombinatie is al in gebruik door: %1 @@ -3361,67 +3351,72 @@ Versleep punten om de positie te veranderen, of dubbelklik op tabelcellen om waa Toon Kolom Bestandstypen - + + Show Play Time Column + + + + Game Icon Size: Grootte Spelicoon: - + Folder Icon Size: Grootte Mapicoon: - + Row 1 Text: Rij 1 Tekst: - + Row 2 Text: Rij 2 Tekst: - + Screenshots Schermafbeelding - + Ask Where To Save Screenshots (Windows Only) Vraag waar schermafbeeldingen moeten worden opgeslagen (alleen Windows) - + Screenshots Path: Schermafbeeldingspad: - + ... ... - + TextLabel TextLabel - + Resolution: Resolutie: - + Select Screenshots Path... Selecteer Schermafbeeldingspad... - + <System> <System> - + Auto (%1 x %2, %3 x %4) Screenshot width value Auto (%1 x %2, %3 x %4) @@ -3739,612 +3734,616 @@ Versleep punten om de positie te veranderen, of dubbelklik op tabelcellen om waa GMainWindow - + <a href='https://yuzu-emu.org/help/feature/telemetry/'>Anonymous data is collected</a> to help improve yuzu. <br/><br/>Would you like to share your usage data with us? <a href='https://yuzu-emu.org/help/feature/telemetry/'>Annonieme gegevens worden verzameld</a> om yuzu te helpen verbeteren. <br/><br/> Zou je jouw gebruiksgegevens met ons willen delen? - + Telemetry Telemetrie - + Broken Vulkan Installation Detected Beschadigde Vulkan-installatie gedetecteerd - + Vulkan initialization failed during boot.<br><br>Click <a href='https://yuzu-emu.org/wiki/faq/#yuzu-starts-with-the-error-broken-vulkan-installation-detected'>here for instructions to fix the issue</a>. Vulkan-initialisatie mislukt tijdens het opstarten.<br><br>Klik <a href='https://yuzu-emu.org/wiki/faq/#yuzu-starts-with-the-error-broken-vulkan-installation-detected'>hier voor instructies om het probleem op te lossen</a>. - + Running a game TRANSLATORS: This string is shown to the user to explain why yuzu needs to prevent the computer from sleeping Een spel uitvoeren - + Loading Web Applet... Web Applet Laden... - - + + Disable Web Applet Schakel Webapplet uit - + Disabling the web applet can lead to undefined behavior and should only be used with Super Mario 3D All-Stars. Are you sure you want to disable the web applet? (This can be re-enabled in the Debug settings.) Het uitschakelen van de webapplet kan leiden tot ongedefinieerd gedrag en mag alleen gebruikt worden met Super Mario 3D All-Stars. Weet je zeker dat je de webapplet wilt uitschakelen? (Deze kan opnieuw worden ingeschakeld in de Debug-instellingen). - + The amount of shaders currently being built Het aantal shaders dat momenteel wordt gebouwd - + The current selected resolution scaling multiplier. De huidige geselecteerde resolutieschaalmultiplier. - + Current emulation speed. Values higher or lower than 100% indicate emulation is running faster or slower than a Switch. Huidige emulatiesnelheid. Waarden hoger of lager dan 100% geven aan dat de emulatie sneller of langzamer werkt dan een Switch. - + How many frames per second the game is currently displaying. This will vary from game to game and scene to scene. Hoeveel beelden per seconde het spel momenteel weergeeft. Dit varieert van spel tot spel en van scène tot scène. - + Time taken to emulate a Switch frame, not counting framelimiting or v-sync. For full-speed emulation this should be at most 16.67 ms. Tijd die nodig is om een Switch-beeld te emuleren, beeldbeperking of v-sync niet meegerekend. Voor emulatie op volle snelheid mag dit maximaal 16,67 ms zijn. - + Unmute Dempen opheffen - + Mute Dempen - + Reset Volume Herstel Volume - + &Clear Recent Files &Wis Recente Bestanden - + Emulated mouse is enabled Geëmuleerde muis is ingeschakeld - + Real mouse input and mouse panning are incompatible. Please disable the emulated mouse in input advanced settings to allow mouse panning. Echte muisinvoer en muispanning zijn niet compatibel. Schakel de geëmuleerde muis uit in de geavanceerde invoerinstellingen om muispanning mogelijk te maken. - + &Continue &Doorgaan - + &Pause &Onderbreken - + Warning Outdated Game Format Waarschuwing Verouderd Spelformaat - + You are using the deconstructed ROM directory format for this game, which is an outdated format that has been superseded by others such as NCA, NAX, XCI, or NSP. Deconstructed ROM directories lack icons, metadata, and update support.<br><br>For an explanation of the various Switch formats yuzu supports, <a href='https://yuzu-emu.org/wiki/overview-of-switch-game-formats'>check out our wiki</a>. This message will not be shown again. Je gebruikt het gedeconstrueerde ROM-mapformaat voor dit spel, wat een verouderd formaat is dat vervangen is door andere zoals NCA, NAX, XCI, of NSP. Deconstructed ROM-mappen missen iconen, metadata, en update-ondersteuning.<br><br>Voor een uitleg van de verschillende Switch-formaten die yuzu ondersteunt,<a href='https://yuzu-emu.org/wiki/overview-of-switch-game-formats'> bekijk onze wiki</a>. Dit bericht wordt niet meer getoond. - + Error while loading ROM! Fout tijdens het laden van een ROM! - + The ROM format is not supported. Het ROM-formaat wordt niet ondersteund. - + An error occurred initializing the video core. Er is een fout opgetreden tijdens het initialiseren van de videokern. - + yuzu has encountered an error while running the video core. This is usually caused by outdated GPU drivers, including integrated ones. Please see the log for more details. For more information on accessing the log, please see the following page: <a href='https://yuzu-emu.org/help/reference/log-files/'>How to Upload the Log File</a>. yuzu is een fout tegengekomen tijdens het uitvoeren van de videokern. Dit wordt meestal veroorzaakt door verouderde GPU-drivers, inclusief geïntegreerde. Zie het logboek voor meer details. Voor meer informatie over toegang tot het log, zie de volgende pagina: <a href='https://yuzu-emu.org/help/reference/log-files/'>Hoe upload je het logbestand</a>. - + Error while loading ROM! %1 %1 signifies a numeric error code. Fout tijdens het laden van ROM! %1 - + %1<br>Please follow <a href='https://yuzu-emu.org/help/quickstart/'>the yuzu quickstart guide</a> to redump your files.<br>You can refer to the yuzu wiki</a> or the yuzu Discord</a> for help. %1 signifies an error string. %1<br>Volg de <a href='https://yuzu-emu.org/help/quickstart/'>yuzu snelstartgids</a> om je bestanden te redumpen.<br>Je kunt de yuzu-wiki</a>of de yuzu-Discord</a> raadplegen voor hulp. - + An unknown error occurred. Please see the log for more details. Een onbekende fout heeft plaatsgevonden. Kijk in de log voor meer details. - + (64-bit) (64-bit) - + (32-bit) (32-bit) - + %1 %2 %1 is the title name. %2 indicates if the title is 64-bit or 32-bit %1 %2 - + Closing software... Software sluiten... - + Save Data Save Data - + Mod Data Mod Data - + Error Opening %1 Folder Fout tijdens het openen van %1 map - - + + Folder does not exist! Map bestaat niet! - + Error Opening Transferable Shader Cache Fout bij het openen van overdraagbare shader-cache - + Failed to create the shader cache directory for this title. Kon de shader-cache-map voor dit spel niet aanmaken. - + Error Removing Contents Fout bij het verwijderen van de inhoud - + Error Removing Update Fout bij het verwijderen van de update - + Error Removing DLC Fout bij het verwijderen van DLC - + Remove Installed Game Contents? Geïnstalleerde Spelinhoud Verwijderen? - + Remove Installed Game Update? Geïnstalleerde Spel-update Verwijderen? - + Remove Installed Game DLC? Geïnstalleerde Spel-DLC Verwijderen? - + Remove Entry Verwijder Invoer - - - - - - + + + + + + Successfully Removed Met Succes Verwijderd - + Successfully removed the installed base game. Het geïnstalleerde basisspel is succesvol verwijderd. - + The base game is not installed in the NAND and cannot be removed. Het basisspel is niet geïnstalleerd in de NAND en kan niet worden verwijderd. - + Successfully removed the installed update. De geïnstalleerde update is succesvol verwijderd. - + There is no update installed for this title. Er is geen update geïnstalleerd voor dit spel. - + There are no DLC installed for this title. Er is geen DLC geïnstalleerd voor dit spel. - + Successfully removed %1 installed DLC. %1 geïnstalleerde DLC met succes verwijderd. - + Delete OpenGL Transferable Shader Cache? Overdraagbare OpenGL-shader-cache Verwijderen? - + Delete Vulkan Transferable Shader Cache? Overdraagbare Vulkan-shader-cache Verwijderen? - + Delete All Transferable Shader Caches? Alle Overdraagbare Shader-caches Verwijderen? - + Remove Custom Game Configuration? Aangepaste Spelconfiguratie Verwijderen? - + Remove Cache Storage? Verwijder Cache-opslag? - + Remove File Verwijder Bestand - - + + Remove Play Time Data + + + + + Reset play time? + + + + + Error Removing Transferable Shader Cache Fout bij het verwijderen van Overdraagbare Shader-cache - - + + A shader cache for this title does not exist. Er bestaat geen shader-cache voor dit spel. - + Successfully removed the transferable shader cache. De overdraagbare shader-cache is verwijderd. - + Failed to remove the transferable shader cache. Kon de overdraagbare shader-cache niet verwijderen. - + Error Removing Vulkan Driver Pipeline Cache Fout bij het verwijderen van Pijplijn-cache van Vulkan-driver - + Failed to remove the driver pipeline cache. Kon de pijplijn-cache van de driver niet verwijderen. - - + + Error Removing Transferable Shader Caches Fout bij het verwijderen van overdraagbare shader-caches - + Successfully removed the transferable shader caches. De overdraagbare shader-caches zijn verwijderd. - + Failed to remove the transferable shader cache directory. Kon de overdraagbare shader-cache-map niet verwijderen. - - + + Error Removing Custom Configuration Fout bij het verwijderen van aangepaste configuratie - + A custom configuration for this title does not exist. Er bestaat geen aangepaste configuratie voor dit spel. - + Successfully removed the custom game configuration. De aangepaste spelconfiguratie is verwijderd. - + Failed to remove the custom game configuration. Kon de aangepaste spelconfiguratie niet verwijderen. - - + + RomFS Extraction Failed! RomFS-extractie Mislukt! - + There was an error copying the RomFS files or the user cancelled the operation. Er is een fout opgetreden bij het kopiëren van de RomFS-bestanden of de gebruiker heeft de bewerking geannuleerd. - + Full Volledig - + Skeleton Skelet - + Select RomFS Dump Mode Selecteer RomFS-dumpmodus - + Please select the how you would like the RomFS dumped.<br>Full will copy all of the files into the new directory while <br>skeleton will only create the directory structure. Selecteer hoe je de RomFS gedumpt wilt hebben.<br>Volledig zal alle bestanden naar de nieuwe map kopiëren, terwijl <br>Skelet alleen de mapstructuur zal aanmaken. - + There is not enough free space at %1 to extract the RomFS. Please free up space or select a different dump directory at Emulation > Configure > System > Filesystem > Dump Root Er is niet genoeg vrije ruimte op %1 om de RomFS uit te pakken. Maak ruimte vrij of kies een andere dumpmap bij Emulatie > Configuratie > Systeem > Bestandssysteem > Dump Root. - + Extracting RomFS... RomFS uitpakken... - - - - + + + + Cancel Annuleren - + RomFS Extraction Succeeded! RomFS-extractie Geslaagd! - - - + + + The operation completed successfully. De bewerking is succesvol voltooid. - + Integrity verification couldn't be performed! Integriteitsverificatie kon niet worden uitgevoerd! - + File contents were not checked for validity. De inhoud van bestanden werd niet gecontroleerd op geldigheid. - - + + Integrity verification failed! Integriteitsverificatie mislukt! - + File contents may be corrupt. Bestandsinhoud kan corrupt zijn. - - + + Verifying integrity... Integriteit verifiëren... - - + + Integrity verification succeeded! Integriteitsverificatie geslaagd! - - - - - + + + + Create Shortcut Maak Snelkoppeling - + This will create a shortcut to the current AppImage. This may not work well if you update. Continue? Dit maakt een snelkoppeling naar de huidige AppImage. Dit werkt mogelijk niet goed als je een update uitvoert. Doorgaan? - - Cannot create shortcut on desktop. Path "%1" does not exist. - Kan geen snelkoppeling op het bureaublad maken. Pad "%1" bestaat niet. + + Cannot create shortcut. Path "%1" does not exist. + - - Cannot create shortcut in applications menu. Path "%1" does not exist and cannot be created. - Kan geen snelkoppeling maken in toepassingen menu. Pad "%1" bestaat niet en kan niet worden aangemaakt. - - - + Create Icon Maak Icoon - + Cannot create icon file. Path "%1" does not exist and cannot be created. Kan geen icoonbestand maken. Pad "%1" bestaat niet en kan niet worden aangemaakt. - + Start %1 with the yuzu Emulator Voer %1 uiit met de yuzu-emulator - + Failed to create a shortcut at %1 Er is geen snelkoppeling gemaakt op %1 - + Successfully created a shortcut to %1 Succesvol een snelkoppeling naar %1 gemaakt - + Error Opening %1 Fout bij openen %1 - + Select Directory Selecteer Map - + Properties Eigenschappen - + The game properties could not be loaded. De speleigenschappen kunnen niet geladen worden. - + Switch Executable (%1);;All Files (*.*) %1 is an identifier for the Switch executable file extensions. Switch Executable (%1);;Alle Bestanden (*.*) - + Load File Laad Bestand - + Open Extracted ROM Directory Open Uitgepakte ROM-map - + Invalid Directory Selected Ongeldige Map Geselecteerd - + The directory you have selected does not contain a 'main' file. De map die je hebt geselecteerd bevat geen 'main'-bestand. - + Installable Switch File (*.nca *.nsp *.xci);;Nintendo Content Archive (*.nca);;Nintendo Submission Package (*.nsp);;NX Cartridge Image (*.xci) Installeerbaar Switch-bestand (*.nca *.nsp *.xci);;Nintendo Content Archive (*.nca);;Nintendo Submission Package (*.nsp);;NX Cartridge Image (*.xci) - + Install Files Installeer Bestanden - + %n file(s) remaining %n bestand(en) resterend%n bestand(en) resterend - + Installing file "%1"... Bestand "%1" Installeren... - - + + Install Results Installeerresultaten - + To avoid possible conflicts, we discourage users from installing base games to the NAND. Please, only use this feature to install updates and DLC. Om mogelijke conflicten te voorkomen, raden we gebruikers af om basisgames te installeren op de NAND. Gebruik deze functie alleen om updates en DLC te installeren. - + %n file(s) were newly installed %n bestand(en) zijn recent geïnstalleerd @@ -4352,7 +4351,7 @@ Gebruik deze functie alleen om updates en DLC te installeren. - + %n file(s) were overwritten %n bestand(en) werden overschreven @@ -4360,7 +4359,7 @@ Gebruik deze functie alleen om updates en DLC te installeren. - + %n file(s) failed to install %n bestand(en) niet geïnstalleerd @@ -4368,194 +4367,194 @@ Gebruik deze functie alleen om updates en DLC te installeren. - + System Application Systeemapplicatie - + System Archive Systeemarchief - + System Application Update Systeemapplicatie-update - + Firmware Package (Type A) Filmware-pakket (Type A) - + Firmware Package (Type B) Filmware-pakket (Type B) - + Game Spel - + Game Update Spelupdate - + Game DLC Spel-DLC - + Delta Title Delta Titel - + Select NCA Install Type... Selecteer NCA-installatiesoort... - + Please select the type of title you would like to install this NCA as: (In most instances, the default 'Game' is fine.) Selecteer het type titel waarin je deze NCA wilt installeren: (In de meeste gevallen is de standaard "Spel" prima). - + Failed to Install Installatie Mislukt - + The title type you selected for the NCA is invalid. Het soort title dat je hebt geselecteerd voor de NCA is ongeldig. - + File not found Bestand niet gevonden - + File "%1" not found Bestand "%1" niet gevonden - + OK OK - - + + Hardware requirements not met Er is niet voldaan aan de hardwarevereisten - - + + Your system does not meet the recommended hardware requirements. Compatibility reporting has been disabled. Je systeem voldoet niet aan de aanbevolen hardwarevereisten. Compatibiliteitsrapportage is uitgeschakeld. - + Missing yuzu Account yuzu-account Ontbreekt - + In order to submit a game compatibility test case, you must link your yuzu account.<br><br/>To link your yuzu account, go to Emulation &gt; Configuration &gt; Web. Om een spelcompatibiliteitstest in te dienen, moet je je yuzu-account koppelen.<br><br/>Om je yuzu-account te koppelen, ga naar Emulatie &gt; Configuratie &gt; Web. - + Error opening URL Fout bij het openen van URL - + Unable to open the URL "%1". Kan de URL "%1" niet openen. - + TAS Recording TAS-opname - + Overwrite file of player 1? Het bestand van speler 1 overschrijven? - + Invalid config detected Ongeldige configuratie gedetecteerd - + Handheld controller can't be used on docked mode. Pro controller will be selected. Handheld-controller kan niet gebruikt worden in docked-modus. Pro controller wordt geselecteerd. - - + + Amiibo Amiibo - - + + The current amiibo has been removed De huidige amiibo is verwijderd - + Error Fout - - + + The current game is not looking for amiibos Het huidige spel is niet op zoek naar amiibo's - + Amiibo File (%1);; All Files (*.*) Amiibo-bestand (%1);; Alle Bestanden (*.*) - + Load Amiibo Laad Amiibo - + Error loading Amiibo data Fout tijdens het laden van de Amiibo-gegevens - + The selected file is not a valid amiibo Het geselecteerde bestand is geen geldige amiibo - + The selected file is already on use Het geselecteerde bestand is al in gebruik - + An unknown error occurred Er is een onbekende fout opgetreden - + Verification failed for the following files: %1 @@ -4564,145 +4563,177 @@ Gebruik deze functie alleen om updates en DLC te installeren. %1 - + + + No firmware available - + + Please install the firmware to use the Album applet. + + + + + Album Applet + + + + + Album applet is not available. Please reinstall firmware. + + + + + Please install the firmware to use the Cabinet applet. + + + + + Cabinet Applet + + + + + Cabinet applet is not available. Please reinstall firmware. + + + + Please install the firmware to use the Mii editor. - + Mii Edit Applet - + Mii editor is not available. Please reinstall firmware. - + Capture Screenshot Leg Schermafbeelding Vast - + PNG Image (*.png) PNG-afbeelding (*.png) - + TAS state: Running %1/%2 TAS-status: %1/%2 In werking - + TAS state: Recording %1 TAS-status: %1 Aan het opnemen - + TAS state: Idle %1/%2 TAS-status: %1/%2 Inactief - + TAS State: Invalid TAS-status: Ongeldig - + &Stop Running &Stop Uitvoering - + &Start &Start - + Stop R&ecording Stop Opname - + R&ecord Opnemen - + Building: %n shader(s) Bouwen: %n shader(s)Bouwen: %n shader(s) - + Scale: %1x %1 is the resolution scaling factor Schaal: %1x - + Speed: %1% / %2% Snelheid: %1% / %2% - + Speed: %1% Snelheid: %1% - + Game: %1 FPS (Unlocked) Spel: %1 FPS (Ontgrendeld) - + Game: %1 FPS Game: %1 FPS - + Frame: %1 ms Frame: %1 ms - + %1 %2 %1 %2 - + FSR FSR - + NO AA GEEN AA - + VOLUME: MUTE VOLUME: GEDEMPT - + VOLUME: %1% Volume percentage (e.g. 50%) VOLUME: %1% - + Confirm Key Rederivation Bevestig Sleutelherhaling - + You are about to force rederive all of your keys. If you do not know what this means or what you are doing, this is a potentially destructive action. @@ -4719,37 +4750,37 @@ en maak eventueel back-ups. Dit zal je automatisch gegenereerde sleutelbestanden verwijderen en de sleutelafleidingsmodule opnieuw uitvoeren. - + Missing fuses Missing fuses - + - Missing BOOT0 - BOOT0 Ontbreekt - + - Missing BCPKG2-1-Normal-Main - BCPKG2-1-Normal-Main Ontbreekt - + - Missing PRODINFO - PRODINFO Ontbreekt - + Derivation Components Missing Afleidingscomponenten ontbreken - + Encryption keys are missing. <br>Please follow <a href='https://yuzu-emu.org/help/quickstart/'>the yuzu quickstart guide</a> to get all your keys, firmware and games.<br><br><small>(%1)</small> Encryptiesleutels ontbreken. <br>Volg <a href='https://yuzu-emu.org/help/quickstart/'>de yuzu-snelstartgids</a> om al je sleutels, firmware en spellen te krijgen.<br><br><small>(%1)</small> - + Deriving keys... This may take up to a minute depending on your system's performance. @@ -4758,49 +4789,49 @@ Dit kan tot een minuut duren, afhankelijk van de prestaties van je systeem. - + Deriving Keys Sleutels Afleiden - + System Archive Decryption Failed Decryptie van Systeemarchief Mislukt - + Encryption keys failed to decrypt firmware. <br>Please follow <a href='https://yuzu-emu.org/help/quickstart/'>the yuzu quickstart guide</a> to get all your keys, firmware and games. Encryptiesleutels zijn mislukt om firmware te decoderen. <br>Volg <a href='https://yuzu-emu.org/help/quickstart/'>de yuzu-snelstartgids</a> om al je sleutels, firmware en games te krijgen. - + Select RomFS Dump Target Selecteer RomFS-dumpdoel - + Please select which RomFS you would like to dump. Selecteer welke RomFS je zou willen dumpen. - + Are you sure you want to close yuzu? Weet je zeker dat je yuzu wilt sluiten? - - - + + + yuzu yuzu - + Are you sure you want to stop the emulation? Any unsaved progress will be lost. Weet je zeker dat je de emulatie wilt stoppen? Alle niet opgeslagen voortgang zal verloren gaan. - + The currently running application has requested yuzu to not exit. Would you like to bypass this and exit anyway? @@ -4952,241 +4983,251 @@ Wil je toch afsluiten? GameList - + Favorite Favoriet - + Start Game Start Spel - + Start Game without Custom Configuration Start Spel zonder Aangepaste Configuratie - + Open Save Data Location Open Locatie van Save-data - + Open Mod Data Location Open Locatie van Mod-data - + Open Transferable Pipeline Cache Open Overdraagbare Pijplijn-cache - + Remove Verwijder - + Remove Installed Update Verwijder Geïnstalleerde Update - + Remove All Installed DLC Verwijder Alle Geïnstalleerde DLC's - + Remove Custom Configuration Verwijder Aangepaste Configuraties - + + Remove Play Time Data + + + + Remove Cache Storage Verwijder Cache-opslag - + Remove OpenGL Pipeline Cache Verwijder OpenGL-pijplijn-cache - + Remove Vulkan Pipeline Cache Verwijder Vulkan-pijplijn-cache - + Remove All Pipeline Caches Verwijder Alle Pijplijn-caches - + Remove All Installed Contents Verwijder Alle Geïnstalleerde Inhoud - - + + Dump RomFS Dump RomFS - + Dump RomFS to SDMC Dump RomFS naar SDMC - + Verify Integrity Verifieer Integriteit - + Copy Title ID to Clipboard Kopiëer Titel-ID naar Klembord - + Navigate to GameDB entry Navigeer naar GameDB-invoer - + Create Shortcut Maak Snelkoppeling - + Add to Desktop Toevoegen aan Bureaublad - + Add to Applications Menu Toevoegen aan menu Toepassingen - + Properties Eigenschappen - + Scan Subfolders Scan Submappen - + Remove Game Directory Verwijder Spelmap - + ▲ Move Up ▲ Omhoog - + ▼ Move Down ▼ Omlaag - + Open Directory Location Open Maplocatie - + Clear Verwijder - + Name Naam - + Compatibility Compatibiliteit - + Add-ons Add-ons - + File type Bestandssoort - + Size Grootte + + + Play time + + GameListItemCompat - + Ingame In het spel - + Game starts, but crashes or major glitches prevent it from being completed. Het spel start, maar crashes of grote glitches voorkomen dat het wordt voltooid. - + Perfect Perfect - + Game can be played without issues. Het spel kan zonder problemen gespeeld worden. - + Playable Speelbaar - + Game functions with minor graphical or audio glitches and is playable from start to finish. Het spel werkt met kleine grafische of audiofouten en is speelbaar van begin tot eind. - + Intro/Menu Intro/Menu - + Game loads, but is unable to progress past the Start Screen. Het spel wordt geladen, maar komt niet verder dan het startscherm. - + Won't Boot Start niet op - + The game crashes when attempting to startup. Het spel loopt vast bij het opstarten. - + Not Tested Niet Getest - + The game has not yet been tested. Het spel is nog niet getest. @@ -5194,7 +5235,7 @@ Wil je toch afsluiten? GameListPlaceholder - + Double-click to add a new folder to the game list Dubbel-klik om een ​​nieuwe map toe te voegen aan de spellijst @@ -5207,12 +5248,12 @@ Wil je toch afsluiten? %1 van %n resultaat(en)%1 van %n resultaat(en) - + Filter: Filter: - + Enter pattern to filter Voer patroon in om te filteren @@ -5330,6 +5371,7 @@ Debug-bericht: + Main Window Hoofdvenster @@ -5435,6 +5477,11 @@ Debug-bericht: + Toggle Renderdoc Capture + + + + Toggle Status Bar Schakel Statusbalk @@ -5673,186 +5720,216 @@ Debug-bericht: + &Amiibo + + + + &TAS &TAS - + &Help &Help - + &Install Files to NAND... &Installeer Bestanden naar NAND... - + L&oad File... L&aad Bestand... - + Load &Folder... Laad &Map... - + E&xit A&fsluiten - + &Pause &Onderbreken - + &Stop &Stop - + &Reinitialize keys... &Herinitialiseer toetsen... - + &Verify Installed Contents - + &About yuzu &Over yuzu - + Single &Window Mode Modus Enkel Venster - + Con&figure... Con&figureer... - + Display D&ock Widget Headers Toon Dock Widget Kopteksten - + Show &Filter Bar Toon &Filterbalk - + Show &Status Bar Toon &Statusbalk - + Show Status Bar Toon Statusbalk - + &Browse Public Game Lobby &Bladeren door Openbare Spellobby - + &Create Room &Maak Kamer - + &Leave Room &Verlaat Kamer - + &Direct Connect to Room &Directe Verbinding met Kamer - + &Show Current Room &Toon Huidige Kamer - + F&ullscreen Volledig Scherm - + &Restart &Herstart - + Load/Remove &Amiibo... Laad/Verwijder &Amiibo... - + &Report Compatibility &Rapporteer Compatibiliteit - + Open &Mods Page Open &Mod-pagina - + Open &Quickstart Guide Open &Snelstartgids - + &FAQ &FAQ - + Open &yuzu Folder Open &yuzu-map - + &Capture Screenshot &Leg Schermafbeelding Vast - + + Open &Album + + + + + &Set Nickname and Owner + + + + + &Delete Game Data + + + + + &Restore Amiibo + + + + + &Format Amiibo + + + + Open &Mii Editor - + &Configure TAS... &Configureer TAS... - + Configure C&urrent Game... Configureer Huidig Spel... - + &Start &Start - + &Reset &Herstel - + R&ecord Opnemen @@ -6160,27 +6237,27 @@ p, li { white-space: pre-wrap; } Geen spel aan het spelen - + Installed SD Titles Geïnstalleerde SD-titels - + Installed NAND Titles Geïnstalleerde NAND-titels - + System Titles Systeemtitels - + Add New Game Directory Voeg Nieuwe Spelmap Toe - + Favorites Favorieten @@ -6706,7 +6783,7 @@ p, li { white-space: pre-wrap; } - + Pro Controller Pro Controller @@ -6719,7 +6796,7 @@ p, li { white-space: pre-wrap; } - + Dual Joycons Twee Joycons @@ -6732,7 +6809,7 @@ p, li { white-space: pre-wrap; } - + Left Joycon Linker Joycon @@ -6745,7 +6822,7 @@ p, li { white-space: pre-wrap; } - + Right Joycon Rechter Joycon @@ -6774,7 +6851,7 @@ p, li { white-space: pre-wrap; } - + Handheld Handheld @@ -6890,32 +6967,37 @@ p, li { white-space: pre-wrap; } 8 - + + Not enough controllers + + + + GameCube Controller GameCube-controller - + Poke Ball Plus Poke Ball Plus - + NES Controller NES-controller - + SNES Controller SNES-controller - + N64 Controller N64-controller - + Sega Genesis Sega Genesis diff --git a/dist/languages/pl.ts b/dist/languages/pl.ts index 4fa59f40bd..f15091bf44 100644 --- a/dist/languages/pl.ts +++ b/dist/languages/pl.ts @@ -373,13 +373,13 @@ To zbanuje jego/jej nick na forum, oraz jego/jej adres IP. % - + Auto (%1) Auto select time zone - + Default (%1) Default time zone @@ -891,49 +891,29 @@ Gdy ta opcja jest włączona, niedopasowanie jest uruchamiane tylko wtedy, gdy d - Create Minidump After Crash - Utwórz mini zrzut po awarii - - - Enable this to output the latest generated audio command list to the console. Only affects games using the audio renderer. Włącz tę opcję, aby wyświetlić ostatnio wygenerowaną listę poleceń dźwiękowych na konsoli. Wpływa tylko na gry korzystające z renderera dźwięku. - + Dump Audio Commands To Console** Zrzuć polecenia audio do konsoli** - + Enable Verbose Reporting Services** Włącz Pełne Usługi Raportowania** - + **This will be reset automatically when yuzu closes. **To zresetuje się automatycznie po wyłączeniu yuzu. - - Restart Required - Ponowne uruchomienie jest wymagane - - - - yuzu is required to restart in order to apply this setting. - yuzu wymaga ponownego uruchomienia w przypadku zastosowania tego ustawienia. - - - + Web applet not compiled Aplet sieciowy nie został skompilowany - - - MiniDump creation not compiled - Tworzenie mini zrzutów nie zostało skompilowane - ConfigureDebugController @@ -1352,7 +1332,7 @@ Gdy ta opcja jest włączona, niedopasowanie jest uruchamiane tylko wtedy, gdy d - + Conflicting Key Sequence Sprzeczna sekwencja klawiszy @@ -1373,27 +1353,37 @@ Gdy ta opcja jest włączona, niedopasowanie jest uruchamiane tylko wtedy, gdy d Nieprawidłowe - + + Invalid hotkey settings + + + + + An error occurred. Please report this issue on github. + + + + Restore Default Przywróć ustawienia domyślne - + Clear Wyczyść - + Conflicting Button Sequence Sprzeczna Sekwencja Przycisków - + The default button sequence is already assigned to: %1 Domyślna sekwencja przycisków już jest przypisana do: %1 - + The default key sequence is already assigned to: %1 Domyślna sekwencja klawiszy jest już przypisana do: %1 @@ -3370,67 +3360,72 @@ Przeciągnij punkty, aby zmienić pozycję, lub kliknij dwukrotnie komórki tabe Pokaż kolumnę typów plików - + + Show Play Time Column + + + + Game Icon Size: Rozmiar Ikony Gry - + Folder Icon Size: Rozmiar Ikony Folderu - + Row 1 Text: Tekst 1. linii - + Row 2 Text: Tekst 2. linii - + Screenshots Zrzuty ekranu - + Ask Where To Save Screenshots (Windows Only) Pytaj gdzie zapisać zrzuty ekranu (Tylko dla Windows) - + Screenshots Path: Ścieżka zrzutów ekranu: - + ... ... - + TextLabel - + Resolution: Rozdzielczość: - + Select Screenshots Path... Wybierz ścieżkę zrzutów ekranu... - + <System> <System> - + Auto (%1 x %2, %3 x %4) Screenshot width value @@ -3748,613 +3743,617 @@ Przeciągnij punkty, aby zmienić pozycję, lub kliknij dwukrotnie komórki tabe GMainWindow - + <a href='https://yuzu-emu.org/help/feature/telemetry/'>Anonymous data is collected</a> to help improve yuzu. <br/><br/>Would you like to share your usage data with us? <a href='https://yuzu-emu.org/help/feature/telemetry/'>Dane anonimowe są gromadzone</a> aby ulepszyć yuzu. <br/><br/>Czy chcesz udostępnić nam swoje dane o użytkowaniu? - + Telemetry Telemetria - + Broken Vulkan Installation Detected Wykryto uszkodzoną instalację Vulkana - + Vulkan initialization failed during boot.<br><br>Click <a href='https://yuzu-emu.org/wiki/faq/#yuzu-starts-with-the-error-broken-vulkan-installation-detected'>here for instructions to fix the issue</a>. Inicjalizacja Vulkana nie powiodła się podczas uruchamiania.<br><br>Kliknij<a href='https://yuzu-emu.org/wiki/faq/#yuzu-starts-with-the-error-broken-vulkan-installation-detected'>tutaj aby uzyskać instrukcje dotyczące rozwiązania tego problemu</a>. - + Running a game TRANSLATORS: This string is shown to the user to explain why yuzu needs to prevent the computer from sleeping - + Loading Web Applet... Ładowanie apletu internetowego... - - + + Disable Web Applet Wyłącz Aplet internetowy - + Disabling the web applet can lead to undefined behavior and should only be used with Super Mario 3D All-Stars. Are you sure you want to disable the web applet? (This can be re-enabled in the Debug settings.) Wyłączanie web appletu może doprowadzić do nieokreślonych zachowań - wyłączyć applet należy jedynie grając w Super Mario 3D All-Stars. Na pewno chcesz wyłączyć web applet? (Można go ponownie włączyć w ustawieniach debug.) - + The amount of shaders currently being built Ilość budowanych shaderów - + The current selected resolution scaling multiplier. Obecnie wybrany mnożnik rozdzielczości. - + Current emulation speed. Values higher or lower than 100% indicate emulation is running faster or slower than a Switch. Aktualna prędkość emulacji. Wartości większe lub niższe niż 100% wskazują, że emulacja działa szybciej lub wolniej niż Switch. - + How many frames per second the game is currently displaying. This will vary from game to game and scene to scene. Ile klatek na sekundę gra aktualnie wyświetla. To będzie się różnić w zależności od gry, od sceny do sceny. - + Time taken to emulate a Switch frame, not counting framelimiting or v-sync. For full-speed emulation this should be at most 16.67 ms. Czas potrzebny do emulacji klatki na sekundę Switcha, nie licząc ograniczania klatek ani v-sync. Dla emulacji pełnej szybkości powinno to wynosić co najwyżej 16,67 ms. - + Unmute - + Mute - + Reset Volume - + &Clear Recent Files &Usuń Ostatnie pliki - + Emulated mouse is enabled Emulacja myszki jest aktywna - + Real mouse input and mouse panning are incompatible. Please disable the emulated mouse in input advanced settings to allow mouse panning. - + &Continue &Kontynuuj - + &Pause &Pauza - + Warning Outdated Game Format OSTRZEŻENIE! Nieaktualny format gry - + You are using the deconstructed ROM directory format for this game, which is an outdated format that has been superseded by others such as NCA, NAX, XCI, or NSP. Deconstructed ROM directories lack icons, metadata, and update support.<br><br>For an explanation of the various Switch formats yuzu supports, <a href='https://yuzu-emu.org/wiki/overview-of-switch-game-formats'>check out our wiki</a>. This message will not be shown again. Używasz zdekonstruowanego formatu katalogu ROM dla tej gry, który jest przestarzałym formatem, który został zastąpiony przez inne, takie jak NCA, NAX, XCI lub NSP. W zdekonstruowanych katalogach ROM brakuje ikon, metadanych i obsługi aktualizacji.<br><br> Aby znaleźć wyjaśnienie różnych formatów Switch obsługiwanych przez yuzu,<a href='https://yuzu-emu.org/wiki/overview-of-switch-game-formats'> sprawdź nasze wiki</a>. Ta wiadomość nie pojawi się ponownie. - + Error while loading ROM! Błąd podczas wczytywania ROMu! - + The ROM format is not supported. Ten format ROMu nie jest wspierany. - + An error occurred initializing the video core. Wystąpił błąd podczas inicjowania rdzenia wideo. - + yuzu has encountered an error while running the video core. This is usually caused by outdated GPU drivers, including integrated ones. Please see the log for more details. For more information on accessing the log, please see the following page: <a href='https://yuzu-emu.org/help/reference/log-files/'>How to Upload the Log File</a>. yuzu napotkał błąd podczas uruchamiania rdzenia wideo. Jest to zwykle spowodowane przestarzałymi sterownikami GPU, w tym zintegrowanymi. Więcej szczegółów znajdziesz w pliku log. Więcej informacji na temat dostępu do log-u można znaleźć na następującej stronie: <a href='https://yuzu-emu.org/help/reference/log-files/'>Jak przesłać plik log</a>. - + Error while loading ROM! %1 %1 signifies a numeric error code. Błąd podczas wczytywania ROMu! %1 - + %1<br>Please follow <a href='https://yuzu-emu.org/help/quickstart/'>the yuzu quickstart guide</a> to redump your files.<br>You can refer to the yuzu wiki</a> or the yuzu Discord</a> for help. %1 signifies an error string. %1<br>Postępuj zgodnie z<a href='https://yuzu-emu.org/help/quickstart/'>yuzu quickstart guide</a> aby zrzucić ponownie swoje pliki.<br>Możesz odwołać się do wiki yuzu</a>lub discord yuzu </a> po pomoc. - + An unknown error occurred. Please see the log for more details. Wystąpił nieznany błąd. Więcej informacji można znaleźć w pliku log. - + (64-bit) (64-bit) - + (32-bit) (32-bit) - + %1 %2 %1 is the title name. %2 indicates if the title is 64-bit or 32-bit %1 %2 - + Closing software... Zamykanie aplikacji... - + Save Data Zapis danych - + Mod Data Dane modów - + Error Opening %1 Folder Błąd podczas otwarcia folderu %1 - - + + Folder does not exist! Folder nie istnieje! - + Error Opening Transferable Shader Cache Błąd podczas otwierania przenośnej pamięci podręcznej Shaderów. - + Failed to create the shader cache directory for this title. Nie udało się stworzyć ścieżki shaderów dla tego tytułu. - + Error Removing Contents Błąd podczas usuwania zawartości - + Error Removing Update Błąd podczas usuwania aktualizacji - + Error Removing DLC Błąd podczas usuwania dodatków - + Remove Installed Game Contents? Czy usunąć zainstalowaną zawartość gry? - + Remove Installed Game Update? Czy usunąć zainstalowaną aktualizację gry? - + Remove Installed Game DLC? Czy usunąć zainstalowane dodatki gry? - + Remove Entry Usuń wpis - - - - - - + + + + + + Successfully Removed Pomyślnie usunięto - + Successfully removed the installed base game. Pomyślnie usunięto zainstalowaną grę. - + The base game is not installed in the NAND and cannot be removed. Gra nie jest zainstalowana w NAND i nie może zostać usunięta. - + Successfully removed the installed update. Pomyślnie usunięto zainstalowaną łatkę. - + There is no update installed for this title. Brak zainstalowanych łatek dla tego tytułu. - + There are no DLC installed for this title. Brak zainstalowanych DLC dla tego tytułu. - + Successfully removed %1 installed DLC. Pomyślnie usunięto %1 zainstalowane DLC. - + Delete OpenGL Transferable Shader Cache? Usunąć Transferowalne Shadery OpenGL? - + Delete Vulkan Transferable Shader Cache? Usunąć Transferowalne Shadery Vulkan? - + Delete All Transferable Shader Caches? Usunąć Wszystkie Transferowalne Shadery? - + Remove Custom Game Configuration? Usunąć niestandardową konfigurację gry? - + Remove Cache Storage? Usunąć pamięć podręczną? - + Remove File Usuń plik - - + + Remove Play Time Data + + + + + Reset play time? + + + + + Error Removing Transferable Shader Cache Błąd podczas usuwania przenośnej pamięci podręcznej Shaderów. - - + + A shader cache for this title does not exist. Pamięć podręczna Shaderów dla tego tytułu nie istnieje. - + Successfully removed the transferable shader cache. Pomyślnie usunięto przenośną pamięć podręczną Shaderów. - + Failed to remove the transferable shader cache. Nie udało się usunąć przenośnej pamięci Shaderów. - + Error Removing Vulkan Driver Pipeline Cache Błąd podczas usuwania pamięci podręcznej strumienia sterownika Vulkana - + Failed to remove the driver pipeline cache. Błąd podczas usuwania pamięci podręcznej strumienia sterownika. - - + + Error Removing Transferable Shader Caches Błąd podczas usuwania Transferowalnych Shaderów - + Successfully removed the transferable shader caches. Pomyślnie usunięto transferowalne shadery. - + Failed to remove the transferable shader cache directory. Nie udało się usunąć ścieżki transferowalnych shaderów. - - + + Error Removing Custom Configuration Błąd podczas usuwania niestandardowej konfiguracji - + A custom configuration for this title does not exist. Niestandardowa konfiguracja nie istnieje dla tego tytułu. - + Successfully removed the custom game configuration. Pomyślnie usunięto niestandardową konfiguracje gry. - + Failed to remove the custom game configuration. Nie udało się usunąć niestandardowej konfiguracji gry. - - + + RomFS Extraction Failed! Wypakowanie RomFS nieudane! - + There was an error copying the RomFS files or the user cancelled the operation. Wystąpił błąd podczas kopiowania plików RomFS lub użytkownik anulował operację. - + Full Pełny - + Skeleton Szkielet - + Select RomFS Dump Mode Wybierz tryb zrzutu RomFS - + Please select the how you would like the RomFS dumped.<br>Full will copy all of the files into the new directory while <br>skeleton will only create the directory structure. Proszę wybrać w jaki sposób chcesz, aby zrzut pliku RomFS został wykonany. <br>Pełna kopia ze wszystkimi plikami do nowego folderu, gdy <br>skielet utworzy tylko strukturę folderu. - + There is not enough free space at %1 to extract the RomFS. Please free up space or select a different dump directory at Emulation > Configure > System > Filesystem > Dump Root Nie ma wystarczająco miejsca w %1 aby wyodrębnić RomFS. Zwolnij trochę miejsca, albo zmień ścieżkę zrzutu RomFs w Emulacja> Konfiguruj> System> System Plików> Źródło Zrzutu - + Extracting RomFS... Wypakowywanie RomFS... - - - - + + + + Cancel Anuluj - + RomFS Extraction Succeeded! Wypakowanie RomFS zakończone pomyślnie! - - - + + + The operation completed successfully. Operacja zakończona sukcesem. - + Integrity verification couldn't be performed! - + File contents were not checked for validity. - - + + Integrity verification failed! - + File contents may be corrupt. - - + + Verifying integrity... - - + + Integrity verification succeeded! - - - - - + + + + Create Shortcut Utwórz skrót - + This will create a shortcut to the current AppImage. This may not work well if you update. Continue? Utworzy to skrót do obecnego AppImage. Może nie działać dobrze po aktualizacji. Kontynuować? - - Cannot create shortcut on desktop. Path "%1" does not exist. - Nie można utworzyć skrótu na pulpicie. Ścieżka "%1" nie istnieje. + + Cannot create shortcut. Path "%1" does not exist. + - - Cannot create shortcut in applications menu. Path "%1" does not exist and cannot be created. - Nie można utworzyć skrótu w menu aplikacji. Ścieżka "%1" nie istnieje oraz nie może być utworzona. - - - + Create Icon Utwórz ikonę - + Cannot create icon file. Path "%1" does not exist and cannot be created. Nie można utworzyć pliku ikony. Ścieżka "%1" nie istnieje oraz nie może być utworzona. - + Start %1 with the yuzu Emulator Włącz %1 z emulatorem yuzu - + Failed to create a shortcut at %1 Nie udało się utworzyć skrótu pod %1 - + Successfully created a shortcut to %1 Pomyślnie utworzono skrót do %1 - + Error Opening %1 Błąd podczas otwierania %1 - + Select Directory Wybierz folder... - + Properties Właściwości - + The game properties could not be loaded. Właściwości tej gry nie mogły zostać załadowane. - + Switch Executable (%1);;All Files (*.*) %1 is an identifier for the Switch executable file extensions. Plik wykonywalny Switcha (%1);;Wszystkie pliki (*.*) - + Load File Załaduj plik... - + Open Extracted ROM Directory Otwórz folder wypakowanego ROMu - + Invalid Directory Selected Wybrano niewłaściwy folder - + The directory you have selected does not contain a 'main' file. Folder wybrany przez ciebie nie zawiera 'głownego' pliku. - + Installable Switch File (*.nca *.nsp *.xci);;Nintendo Content Archive (*.nca);;Nintendo Submission Package (*.nsp);;NX Cartridge Image (*.xci) Instalacyjne pliki Switch'a (*.nca *.nsp *.xci);;Archiwum zawartości Nintendo (*.nca);;Pakiet poddany Nintendo (*.nsp);;Obraz z kartridża NX (*.xci) - + Install Files Zainstaluj pliki - + %n file(s) remaining 1 plik został%n plików zostało%n plików zostało%n plików zostało - + Installing file "%1"... Instalowanie pliku "%1"... - - + + Install Results Wynik instalacji - + To avoid possible conflicts, we discourage users from installing base games to the NAND. Please, only use this feature to install updates and DLC. Aby uniknąć ewentualnych konfliktów, odradzamy użytkownikom instalowanie gier na NAND. Proszę, używaj tej funkcji tylko do instalowania łatek i DLC. - + %n file(s) were newly installed 1 nowy plik został zainstalowany @@ -4364,351 +4363,383 @@ Proszę, używaj tej funkcji tylko do instalowania łatek i DLC. - + %n file(s) were overwritten 1 plik został nadpisany%n plików zostało nadpisane%n plików zostało nadpisane%n plików zostało nadpisane - + %n file(s) failed to install 1 pliku nie udało się zainstalować%n plików nie udało się zainstalować%n plików nie udało się zainstalować%n plików nie udało się zainstalować - + System Application Aplikacja systemowa - + System Archive Archiwum systemu - + System Application Update Aktualizacja aplikacji systemowej - + Firmware Package (Type A) Paczka systemowa (Typ A) - + Firmware Package (Type B) Paczka systemowa (Typ B) - + Game Gra - + Game Update Aktualizacja gry - + Game DLC Dodatek do gry - + Delta Title Tytuł Delta - + Select NCA Install Type... Wybierz typ instalacji NCA... - + Please select the type of title you would like to install this NCA as: (In most instances, the default 'Game' is fine.) Wybierz typ tytułu, do którego chcesz zainstalować ten NCA, jako: (W większości przypadków domyślna "gra" jest w porządku.) - + Failed to Install Instalacja nieudana - + The title type you selected for the NCA is invalid. Typ tytułu wybrany dla NCA jest nieprawidłowy. - + File not found Nie znaleziono pliku - + File "%1" not found Nie znaleziono pliku "%1" - + OK OK - - + + Hardware requirements not met Wymagania sprzętowe nie są spełnione - - + + Your system does not meet the recommended hardware requirements. Compatibility reporting has been disabled. Twój system nie spełnia rekomendowanych wymagań sprzętowych. Raportowanie kompatybilności zostało wyłączone. - + Missing yuzu Account Brakuje konta Yuzu - + In order to submit a game compatibility test case, you must link your yuzu account.<br><br/>To link your yuzu account, go to Emulation &gt; Configuration &gt; Web. Aby przesłać test zgodności gry, musisz połączyć swoje konto yuzu.<br><br/> Aby połączyć swoje konto yuzu, przejdź do opcji Emulacja &gt; Konfiguracja &gt; Sieć. - + Error opening URL Błąd otwierania adresu URL - + Unable to open the URL "%1". Nie można otworzyć adresu URL "%1". - + TAS Recording Nagrywanie TAS - + Overwrite file of player 1? Nadpisać plik gracza 1? - + Invalid config detected Wykryto nieprawidłową konfigurację - + Handheld controller can't be used on docked mode. Pro controller will be selected. Nie można używać kontrolera handheld w trybie zadokowanym. Zostanie wybrany kontroler Pro. - - + + Amiibo Amiibo - - + + The current amiibo has been removed Amiibo zostało "zdjęte" - + Error Błąd - - + + The current game is not looking for amiibos Ta gra nie szuka amiibo - + Amiibo File (%1);; All Files (*.*) Plik Amiibo (%1);;Wszyskie pliki (*.*) - + Load Amiibo Załaduj Amiibo - + Error loading Amiibo data Błąd podczas ładowania pliku danych Amiibo - + The selected file is not a valid amiibo Wybrany plik nie jest poprawnym amiibo - + The selected file is already on use Wybrany plik jest już w użyciu - + An unknown error occurred Wystąpił nieznany błąd - + Verification failed for the following files: %1 - + + + No firmware available - + + Please install the firmware to use the Album applet. + + + + + Album Applet + + + + + Album applet is not available. Please reinstall firmware. + + + + + Please install the firmware to use the Cabinet applet. + + + + + Cabinet Applet + + + + + Cabinet applet is not available. Please reinstall firmware. + + + + Please install the firmware to use the Mii editor. - + Mii Edit Applet - + Mii editor is not available. Please reinstall firmware. - + Capture Screenshot Zrób zrzut ekranu - + PNG Image (*.png) Obrazek PNG (*.png) - + TAS state: Running %1/%2 Status TAS: Działa %1%2 - + TAS state: Recording %1 Status TAS: Nagrywa %1 - + TAS state: Idle %1/%2 Status TAS: Bezczynny %1%2 - + TAS State: Invalid Status TAS: Niepoprawny - + &Stop Running &Wyłącz - + &Start &Start - + Stop R&ecording Przestań N&agrywać - + R&ecord N&agraj - + Building: %n shader(s) Budowanie shaderaBudowanie: %n shaderówBudowanie: %n shaderówBudowanie: %n shaderów - + Scale: %1x %1 is the resolution scaling factor Skala: %1x - + Speed: %1% / %2% Prędkość: %1% / %2% - + Speed: %1% Prędkość: %1% - + Game: %1 FPS (Unlocked) Gra: %1 FPS (Odblokowane) - + Game: %1 FPS Gra: %1 FPS - + Frame: %1 ms Klatka: %1 ms - + %1 %2 %1 %2 - + FSR FSR - + NO AA BEZ AA - + VOLUME: MUTE Głośność: Wyciszony - + VOLUME: %1% Volume percentage (e.g. 50%) Głośność: %1% - + Confirm Key Rederivation Potwierdź ponowną aktywacje klucza - + You are about to force rederive all of your keys. If you do not know what this means or what you are doing, this is a potentially destructive action. @@ -4725,37 +4756,37 @@ i opcjonalnie tworzyć kopie zapasowe. Spowoduje to usunięcie wygenerowanych automatycznie plików kluczy i ponowne uruchomienie modułu pochodnego klucza. - + Missing fuses Brakujące bezpieczniki - + - Missing BOOT0 - Brak BOOT0 - + - Missing BCPKG2-1-Normal-Main - Brak BCPKG2-1-Normal-Main - + - Missing PRODINFO - Brak PRODINFO - + Derivation Components Missing Brak komponentów wyprowadzania - + Encryption keys are missing. <br>Please follow <a href='https://yuzu-emu.org/help/quickstart/'>the yuzu quickstart guide</a> to get all your keys, firmware and games.<br><br><small>(%1)</small> Brakuje elementów, które mogą uniemożliwić zakończenie wyprowadzania kluczy. <br>Postępuj zgodnie z <a href='https://yuzu-emu.org/help/quickstart/'>yuzu quickstart guide</a> aby zdobyć wszystkie swoje klucze i gry.<br><br><small>(%1)</small> - + Deriving keys... This may take up to a minute depending on your system's performance. @@ -4764,49 +4795,49 @@ Zależnie od tego może potrwać do minuty na wydajność twojego systemu. - + Deriving Keys Wyprowadzanie kluczy... - + System Archive Decryption Failed - + Encryption keys failed to decrypt firmware. <br>Please follow <a href='https://yuzu-emu.org/help/quickstart/'>the yuzu quickstart guide</a> to get all your keys, firmware and games. - + Select RomFS Dump Target Wybierz cel zrzutu RomFS - + Please select which RomFS you would like to dump. Proszę wybrać RomFS, jakie chcesz zrzucić. - + Are you sure you want to close yuzu? Czy na pewno chcesz zamknąć yuzu? - - - + + + yuzu yuzu - + Are you sure you want to stop the emulation? Any unsaved progress will be lost. Czy na pewno chcesz zatrzymać emulację? Wszystkie niezapisane postępy zostaną utracone. - + The currently running application has requested yuzu to not exit. Would you like to bypass this and exit anyway? @@ -4958,241 +4989,251 @@ Czy chcesz to ominąć i mimo to wyjść? GameList - + Favorite Ulubione - + Start Game Uruchom grę - + Start Game without Custom Configuration Uruchom grę bez niestandardowej konfiguracji - + Open Save Data Location Otwórz lokalizację zapisów - + Open Mod Data Location Otwórz lokalizację modyfikacji - + Open Transferable Pipeline Cache Otwórz Transferowalną Pamięć Podręczną Pipeline - + Remove Usuń - + Remove Installed Update Usuń zainstalowaną łatkę - + Remove All Installed DLC Usuń wszystkie zainstalowane DLC - + Remove Custom Configuration Usuń niestandardową konfigurację - + + Remove Play Time Data + + + + Remove Cache Storage Usuń pamięć podręczną - + Remove OpenGL Pipeline Cache Usuń Pamięć Podręczną Pipeline OpenGL - + Remove Vulkan Pipeline Cache Usuń Pamięć Podręczną Pipeline Vulkan - + Remove All Pipeline Caches Usuń całą pamięć podręczną Pipeline - + Remove All Installed Contents Usuń całą zainstalowaną zawartość - - + + Dump RomFS Zrzuć RomFS - + Dump RomFS to SDMC Zrzuć RomFS do SDMC - + Verify Integrity - + Copy Title ID to Clipboard Kopiuj identyfikator gry do schowka - + Navigate to GameDB entry Nawiguj do wpisu kompatybilności gry - + Create Shortcut Utwórz skrót - + Add to Desktop Dodaj do pulpitu - + Add to Applications Menu Dodaj do menu aplikacji - + Properties Właściwości - + Scan Subfolders Skanuj podfoldery - + Remove Game Directory Usuń katalog gier - + ▲ Move Up ▲ Przenieś w górę - + ▼ Move Down ▼ Przenieś w dół - + Open Directory Location Otwórz lokalizacje katalogu - + Clear Wyczyść - + Name Nazwa gry - + Compatibility Kompatybilność - + Add-ons Dodatki - + File type Typ pliku - + Size Rozmiar + + + Play time + + GameListItemCompat - + Ingame W grze - + Game starts, but crashes or major glitches prevent it from being completed. Gra uruchamia się, ale awarie lub poważne błędy uniemożliwiają jej ukończenie. - + Perfect Perfekcyjnie - + Game can be played without issues. Można grać bez problemów. - + Playable Grywalna - + Game functions with minor graphical or audio glitches and is playable from start to finish. Gra działa z drobnymi błędami graficznymi lub dźwiękowymi oraz jest grywalna od początku aż do końca. - + Intro/Menu Intro/Menu - + Game loads, but is unable to progress past the Start Screen. Gra się ładuje, ale nie może przejść przez ekran początkowy. - + Won't Boot Nie uruchamia się - + The game crashes when attempting to startup. Ta gra się zawiesza przy próbie startu. - + Not Tested Nie testowane - + The game has not yet been tested. Ta gra nie została jeszcze przetestowana. @@ -5200,7 +5241,7 @@ Czy chcesz to ominąć i mimo to wyjść? GameListPlaceholder - + Double-click to add a new folder to the game list Kliknij podwójnie aby dodać folder do listy gier @@ -5213,12 +5254,12 @@ Czy chcesz to ominąć i mimo to wyjść? 1 z %n rezultatów%1 z %n rezultatów%1 z %n rezultatów%1 z %n rezultatów - + Filter: Filter: - + Enter pattern to filter Wpisz typ do filtra @@ -5336,6 +5377,7 @@ Komunikat debugowania: + Main Window Okno główne @@ -5441,6 +5483,11 @@ Komunikat debugowania: + Toggle Renderdoc Capture + + + + Toggle Status Bar Przełącz pasek stanu @@ -5679,186 +5726,216 @@ Komunikat debugowania: + &Amiibo + + + + &TAS &TAS - + &Help &Pomoc - + &Install Files to NAND... &Zainstaluj pliki na NAND... - + L&oad File... Z&aładuj Plik... - + Load &Folder... Załaduj &Folder... - + E&xit &Wyjście - + &Pause &Pauza - + &Stop &Stop - + &Reinitialize keys... &Zainicjuj ponownie klucze... - + &Verify Installed Contents - + &About yuzu &O yuzu - + Single &Window Mode Tryb &Pojedyńczego Okna - + Con&figure... Kon&figuruj... - + Display D&ock Widget Headers Wyłącz Nagłówek Widżetu Docku - + Show &Filter Bar Pokaż &Pasek Filtrów - + Show &Status Bar Pokaż &Pasek Statusu - + Show Status Bar Pokaż pasek statusu - + &Browse Public Game Lobby &Przeglądaj publiczne lobby gier - + &Create Room &Utwórz Pokój - + &Leave Room &Wyjdź z Pokoju - + &Direct Connect to Room &Bezpośrednie połączenie z pokojem - + &Show Current Room &Pokaż bieżący pokój - + F&ullscreen P&ełny Ekran - + &Restart &Restart - + Load/Remove &Amiibo... Załaduj/Usuń &Amiibo... - + &Report Compatibility &Zraportuj Kompatybilność - + Open &Mods Page Otwórz &Stronę z Modami - + Open &Quickstart Guide Otwórz &Poradnik Szybkiego Startu - + &FAQ &FAQ - + Open &yuzu Folder Otwórz &Folder yuzu - + &Capture Screenshot &Zrób Zdjęcie - + + Open &Album + + + + + &Set Nickname and Owner + + + + + &Delete Game Data + + + + + &Restore Amiibo + + + + + &Format Amiibo + + + + Open &Mii Editor - + &Configure TAS... &Skonfiguruj TAS - + Configure C&urrent Game... Skonfiguruj O&becną Grę... - + &Start &Start - + &Reset &Zresetuj - + R&ecord N&agraj @@ -6166,27 +6243,27 @@ p, li { white-space: pre-wrap; } Nie gra w żadną grę - + Installed SD Titles Zainstalowane tytuły SD - + Installed NAND Titles Zainstalowane tytuły NAND - + System Titles Tytuły systemu - + Add New Game Directory Dodaj nowy katalog gier - + Favorites Ulubione @@ -6712,7 +6789,7 @@ p, li { white-space: pre-wrap; } - + Pro Controller Pro kontroler @@ -6725,7 +6802,7 @@ p, li { white-space: pre-wrap; } - + Dual Joycons Para Joyconów @@ -6738,7 +6815,7 @@ p, li { white-space: pre-wrap; } - + Left Joycon Lewy Joycon @@ -6751,7 +6828,7 @@ p, li { white-space: pre-wrap; } - + Right Joycon Prawy Joycon @@ -6780,7 +6857,7 @@ p, li { white-space: pre-wrap; } - + Handheld Handheld @@ -6896,32 +6973,37 @@ p, li { white-space: pre-wrap; } 8 - + + Not enough controllers + + + + GameCube Controller Kontroler GameCube - + Poke Ball Plus Poke Ball Plus - + NES Controller Kontroler NES/Pegasus - + SNES Controller Kontroler SNES - + N64 Controller Kontroler N64 - + Sega Genesis Sega Mega Drive diff --git a/dist/languages/pt_BR.ts b/dist/languages/pt_BR.ts index e6265e41b0..0bb294c851 100644 --- a/dist/languages/pt_BR.ts +++ b/dist/languages/pt_BR.ts @@ -36,7 +36,7 @@ p, li { white-space: pre-wrap; } <html><head/><body><p><a href="https://yuzu-emu.org/"><span style=" text-decoration: underline; color:#039be5;">Website</span></a> | <a href="https://github.com/yuzu-emu"><span style=" text-decoration: underline; color:#039be5;">Source Code</span></a> | <a href="https://github.com/yuzu-emu/yuzu/graphs/contributors"><span style=" text-decoration: underline; color:#039be5;">Contributors</span></a> | <a href="https://github.com/yuzu-emu/yuzu/blob/master/LICENSE.txt"><span style=" text-decoration: underline; color:#039be5;">License</span></a></p></body></html> - <html><head/><body><p><a href="https://yuzu-emu.org/"><span style=" text-decoration: underline; color:#039be5;">Site</span></a> | <a href="https://github.com/yuzu-emu"><span style=" text-decoration: underline; color:#039be5;">Código fonte</span></a> | <a href="https://github.com/yuzu-emu/yuzu/graphs/contributors"><span style=" text-decoration: underline; color:#039be5;">Contribuidores</span></a> | <a href="https://github.com/yuzu-emu/yuzu/blob/master/LICENSE.txt"><span style=" text-decoration: underline; color:#039be5;">Licença</span></a></p></body></html> + <html><head/><body><p><a href="https://yuzu-emu.org/"><span style=" text-decoration: underline; color:#039be5;">Site</span></a> | <a href="https://github.com/yuzu-emu"><span style=" text-decoration: underline; color:#039be5;">Código-fonte</span></a> | <a href="https://github.com/yuzu-emu/yuzu/graphs/contributors"><span style=" text-decoration: underline; color:#039be5;">Contribuidores</span></a> | <a href="https://github.com/yuzu-emu/yuzu/blob/master/LICENSE.txt"><span style=" text-decoration: underline; color:#039be5;">Licença</span></a></p></body></html> @@ -373,13 +373,13 @@ Isto banirá tanto o nome de usuário do fórum como o endereço IP.% - + Auto (%1) Auto select time zone Auto (%1) - + Default (%1) Default time zone Padrão (%1) @@ -834,7 +834,7 @@ Isto banirá tanto o nome de usuário do fórum como o endereço IP. Enable Renderdoc Hotkey - + Habilitar atalho para Renderdoc @@ -893,49 +893,29 @@ Isto banirá tanto o nome de usuário do fórum como o endereço IP. - Create Minidump After Crash - Criar um despejo resumido após uma falha - - - Enable this to output the latest generated audio command list to the console. Only affects games using the audio renderer. Habilite essa opção para gravar a última saída da lista de comandos de áudio para o console. Somente afetará jogos que utilizam o renderizador de áudio. - + Dump Audio Commands To Console** Despejar comandos de áudio no console** - + Enable Verbose Reporting Services** Ativar serviços de relatório detalhado** - + **This will be reset automatically when yuzu closes. **Isto será restaurado automaticamente assim que o yuzu for fechado. - - Restart Required - É necessário reiniciar - - - - yuzu is required to restart in order to apply this setting. - Será necessário reiniciar o yuzu para aplicar as configurações. - - - + Web applet not compiled Applet Web não compilado - - - MiniDump creation not compiled - Criação do mini despejo não compilada - ConfigureDebugController @@ -1354,7 +1334,7 @@ Isto banirá tanto o nome de usuário do fórum como o endereço IP. - + Conflicting Key Sequence Combinação de teclas já utilizada @@ -1375,27 +1355,37 @@ Isto banirá tanto o nome de usuário do fórum como o endereço IP.Inválido - + + Invalid hotkey settings + Configurações de atalho inválidas + + + + An error occurred. Please report this issue on github. + Houve um erro. Relate o problema no GitHub. + + + Restore Default Restaurar padrão - + Clear Limpar - + Conflicting Button Sequence Sequência de botões conflitante - + The default button sequence is already assigned to: %1 A sequência de botões padrão já está vinculada a %1 - + The default key sequence is already assigned to: %1 A sequência de teclas padrão já esta atribuida para: %1 @@ -3373,67 +3363,72 @@ Mova os pontos para mudar a posição, ou clique duas vezes nas células da tabe Mostrar coluna de tipos de arquivos - + + Show Play Time Column + Exibir coluna Tempo jogado + + + Game Icon Size: Tamanho do ícone do jogo: - + Folder Icon Size: Tamanho do ícone da pasta: - + Row 1 Text: Texto da 1ª linha: - + Row 2 Text: Texto da 2ª linha: - + Screenshots Capturas de tela - + Ask Where To Save Screenshots (Windows Only) Perguntar onde salvar capturas de tela (apenas Windows) - + Screenshots Path: Pasta para capturas de tela: - + ... ... - + TextLabel TextLabel - + Resolution: Resolução: - + Select Screenshots Path... Selecione a pasta de capturas de tela... - + <System> <System> - + Auto (%1 x %2, %3 x %4) Screenshot width value Auto (%1 x %2, %3 x %4) @@ -3751,612 +3746,616 @@ Mova os pontos para mudar a posição, ou clique duas vezes nas células da tabe GMainWindow - + <a href='https://yuzu-emu.org/help/feature/telemetry/'>Anonymous data is collected</a> to help improve yuzu. <br/><br/>Would you like to share your usage data with us? <a href='https://yuzu-emu.org/help/feature/telemetry/'>Dados anônimos são recolhidos</a> para ajudar a melhorar o yuzu. <br/><br/>Gostaria de compartilhar os seus dados de uso conosco? - + Telemetry Telemetria - + Broken Vulkan Installation Detected Detectada Instalação Defeituosa do Vulkan - + Vulkan initialization failed during boot.<br><br>Click <a href='https://yuzu-emu.org/wiki/faq/#yuzu-starts-with-the-error-broken-vulkan-installation-detected'>here for instructions to fix the issue</a>. A inicialização do Vulkan falhou durante a carga do programa. <br><br>Clique <a href='https://yuzu-emu.org/wiki/faq/#yuzu-starts-with-the-error-broken-vulkan-installation-detected'>aqui para instruções de como resolver o problema</a>. - + Running a game TRANSLATORS: This string is shown to the user to explain why yuzu needs to prevent the computer from sleeping Rodando um jogo - + Loading Web Applet... Carregando applet web... - - + + Disable Web Applet Desativar o applet da web - + Disabling the web applet can lead to undefined behavior and should only be used with Super Mario 3D All-Stars. Are you sure you want to disable the web applet? (This can be re-enabled in the Debug settings.) A desativação do applet da web pode causar comportamento inesperado e deve apenas ser usada com Super Mario 3D All-Stars. Você deseja mesmo desativar o applet da web? (Ele pode ser reativado nas configurações de depuração.) - + The amount of shaders currently being built A quantidade de shaders sendo construídos - + The current selected resolution scaling multiplier. O atualmente multiplicador de escala de resolução selecionado. - + Current emulation speed. Values higher or lower than 100% indicate emulation is running faster or slower than a Switch. Velocidade atual de emulação. Valores maiores ou menores que 100% indicam que a emulação está rodando mais rápida ou lentamente que em um Switch. - + How many frames per second the game is currently displaying. This will vary from game to game and scene to scene. Quantos quadros por segundo o jogo está exibindo atualmente. Isto irá variar de jogo para jogo e cena para cena. - + Time taken to emulate a Switch frame, not counting framelimiting or v-sync. For full-speed emulation this should be at most 16.67 ms. Tempo que leva para emular um quadro do Switch, sem considerar o limitador de taxa de quadros ou a sincronização vertical. Um valor menor ou igual a 16.67 ms indica que a emulação está em velocidade plena. - + Unmute Unmute - + Mute Mudo - + Reset Volume Redefinir volume - + &Clear Recent Files &Limpar arquivos recentes - + Emulated mouse is enabled Mouse emulado está habilitado - + Real mouse input and mouse panning are incompatible. Please disable the emulated mouse in input advanced settings to allow mouse panning. Controle de mouse real e controle panorâmico do mouse são incompatíveis. Por favor desabilite a emulação do mouse em configurações avançadas de controles para permitir o controle panorâmico do mouse. - + &Continue &Continuar - + &Pause &Pausar - + Warning Outdated Game Format Aviso - formato de jogo desatualizado - + You are using the deconstructed ROM directory format for this game, which is an outdated format that has been superseded by others such as NCA, NAX, XCI, or NSP. Deconstructed ROM directories lack icons, metadata, and update support.<br><br>For an explanation of the various Switch formats yuzu supports, <a href='https://yuzu-emu.org/wiki/overview-of-switch-game-formats'>check out our wiki</a>. This message will not be shown again. Você está usando neste jogo o formato de ROM desconstruída e extraída em uma pasta, que é um formato desatualizado que foi substituído por outros, como NCA, NAX, XCI ou NSP. Pastas desconstruídas de ROMs não possuem ícones, metadados e suporte a atualizações.<br><br>Para saber mais sobre os vários formatos de ROMs de Switch compatíveis com o yuzu, <a href='https://yuzu-emu.org/wiki/overview-of-switch-game-formats'>confira a nossa wiki</a>. Esta mensagem não será exibida novamente. - + Error while loading ROM! Erro ao carregar a ROM! - + The ROM format is not supported. O formato da ROM não é suportado. - + An error occurred initializing the video core. Ocorreu um erro ao inicializar o núcleo de vídeo. - + yuzu has encountered an error while running the video core. This is usually caused by outdated GPU drivers, including integrated ones. Please see the log for more details. For more information on accessing the log, please see the following page: <a href='https://yuzu-emu.org/help/reference/log-files/'>How to Upload the Log File</a>. yuzu encontrou um erro enquanto rodando o núcleo de vídeo. Normalmente isto é causado por drivers de GPU desatualizados, incluindo integrados. Por favor veja o registro para mais detalhes. Para mais informações em acesso ao registro por favor veja a seguinte página: <a href='https://yuzu-emu.org/help/reference/log-files/'>Como fazer envio de arquivo de registro</a>. - + Error while loading ROM! %1 %1 signifies a numeric error code. Erro ao carregar a ROM! %1 - + %1<br>Please follow <a href='https://yuzu-emu.org/help/quickstart/'>the yuzu quickstart guide</a> to redump your files.<br>You can refer to the yuzu wiki</a> or the yuzu Discord</a> for help. %1 signifies an error string. %1<br>Por favor, siga <a href='https://yuzu-emu.org/help/quickstart/'>o guia de início rápido</a> para reextrair os seus arquivos.<br>Você pode consultar a wiki do yuzu</a> ou o Discord do yuzu</a> para obter ajuda. - + An unknown error occurred. Please see the log for more details. Ocorreu um erro desconhecido. Consulte o registro para mais detalhes. - + (64-bit) (64-bit) - + (32-bit) (32-bit) - + %1 %2 %1 is the title name. %2 indicates if the title is 64-bit or 32-bit %1 %2 - + Closing software... Encerrando software... - + Save Data Dados de jogos salvos - + Mod Data Dados de mods - + Error Opening %1 Folder Erro ao abrir a pasta %1 - - + + Folder does not exist! A pasta não existe! - + Error Opening Transferable Shader Cache Erro ao abrir o cache de shaders transferível - + Failed to create the shader cache directory for this title. Falha ao criar o diretório de cache de shaders para este título. - + Error Removing Contents Erro ao Remover Conteúdos - + Error Removing Update Erro ao Remover Atualização - + Error Removing DLC Erro ao Remover DLC - + Remove Installed Game Contents? Remover Conteúdo Instalado do Jogo? - + Remove Installed Game Update? Remover Atualização Instalada do Jogo? - + Remove Installed Game DLC? Remover DLC Instalada do Jogo? - + Remove Entry Remover item - - - - - - + + + + + + Successfully Removed Removido com sucesso - + Successfully removed the installed base game. O jogo base foi removido com sucesso. - + The base game is not installed in the NAND and cannot be removed. O jogo base não está instalado na NAND e não pode ser removido. - + Successfully removed the installed update. A atualização instalada foi removida com sucesso. - + There is no update installed for this title. Não há nenhuma atualização instalada para este título. - + There are no DLC installed for this title. Não há nenhum DLC instalado para este título. - + Successfully removed %1 installed DLC. %1 DLC(s) instalados foram removidos com sucesso. - + Delete OpenGL Transferable Shader Cache? Apagar o cache de shaders transferível do OpenGL? - + Delete Vulkan Transferable Shader Cache? Apagar o cache de shaders transferível do Vulkan? - + Delete All Transferable Shader Caches? Apagar todos os caches de shaders transferíveis? - + Remove Custom Game Configuration? Remover configurações customizadas do jogo? - + Remove Cache Storage? Remover Armazenamento da Cache? - + Remove File Remover arquivo - - + + Remove Play Time Data + Remover dados de tempo jogado + + + + Reset play time? + Deseja mesmo resetar o tempo jogado? + + + + Error Removing Transferable Shader Cache Erro ao remover cache de shaders transferível - - + + A shader cache for this title does not exist. Não existe um cache de shaders para este título. - + Successfully removed the transferable shader cache. O cache de shaders transferível foi removido com sucesso. - + Failed to remove the transferable shader cache. Falha ao remover o cache de shaders transferível. - + Error Removing Vulkan Driver Pipeline Cache Erro ao Remover Cache de Pipeline do Driver Vulkan - + Failed to remove the driver pipeline cache. Falha ao remover o pipeline de cache do driver. - - + + Error Removing Transferable Shader Caches Erro ao remover os caches de shaders transferíveis - + Successfully removed the transferable shader caches. Os caches de shaders transferíveis foram removidos com sucesso. - + Failed to remove the transferable shader cache directory. Falha ao remover o diretório do cache de shaders transferível. - - + + Error Removing Custom Configuration Erro ao remover as configurações customizadas do jogo. - + A custom configuration for this title does not exist. Não há uma configuração customizada para este título. - + Successfully removed the custom game configuration. As configurações customizadas do jogo foram removidas com sucesso. - + Failed to remove the custom game configuration. Falha ao remover as configurações customizadas do jogo. - - + + RomFS Extraction Failed! Falha ao extrair RomFS! - + There was an error copying the RomFS files or the user cancelled the operation. Houve um erro ao copiar os arquivos RomFS ou o usuário cancelou a operação. - + Full Extração completa - + Skeleton Apenas estrutura - + Select RomFS Dump Mode Selecione o modo de extração do RomFS - + Please select the how you would like the RomFS dumped.<br>Full will copy all of the files into the new directory while <br>skeleton will only create the directory structure. Selecione a forma como você gostaria que o RomFS seja extraído.<br>"Extração completa" copiará todos os arquivos para a nova pasta, enquanto que <br>"Apenas estrutura" criará apenas a estrutura de pastas. - + There is not enough free space at %1 to extract the RomFS. Please free up space or select a different dump directory at Emulation > Configure > System > Filesystem > Dump Root Não há espaço suficiente em %1 para extrair o RomFS. Por favor abra espaço ou selecione um diretório diferente em Emulação > Configurar > Sistema > Sistema de arquivos > Extrair raiz - + Extracting RomFS... Extraindo RomFS... - - - - + + + + Cancel Cancelar - + RomFS Extraction Succeeded! Extração do RomFS concluida! - - - + + + The operation completed successfully. A operação foi concluída com sucesso. - + Integrity verification couldn't be performed! - + A verificação de integridade não foi realizada. - + File contents were not checked for validity. - + O conteúdo do arquivo não foi analisado. - - + + Integrity verification failed! - + Houve uma falha na verificação de integridade! - + File contents may be corrupt. - + O conteúdo do arquivo pode estar corrompido. - - + + Verifying integrity... - + Verificando integridade… - - + + Integrity verification succeeded! - + Verificação de integridade concluída! - - - - - + + + + Create Shortcut Criar Atalho - + This will create a shortcut to the current AppImage. This may not work well if you update. Continue? Isso irá criar um atalho para o AppImage atual. Isso pode não funcionar corretamente se você fizer uma atualização. Continuar? - - Cannot create shortcut on desktop. Path "%1" does not exist. - Não foi possível criar um atalho na área de trabalho. O caminho "%1" não existe. + + Cannot create shortcut. Path "%1" does not exist. + Não foi possível criar o atalho. O caminho "%1" não existe. - - Cannot create shortcut in applications menu. Path "%1" does not exist and cannot be created. - Não foi possível criar um atalho no menu de aplicativos. O caminho "%1" não existe e não pode ser criado. - - - + Create Icon Criar Ícone - + Cannot create icon file. Path "%1" does not exist and cannot be created. Não foi possível criar o arquivo de ícone. O caminho "%1" não existe e não pode ser criado. - + Start %1 with the yuzu Emulator Iniciar %1 com o emulador yuzu - + Failed to create a shortcut at %1 Falha ao criar um atalho em %1 - + Successfully created a shortcut to %1 Atalho criado em %1 - + Error Opening %1 Erro ao abrir %1 - + Select Directory Selecionar pasta - + Properties Propriedades - + The game properties could not be loaded. As propriedades do jogo não puderam ser carregadas. - + Switch Executable (%1);;All Files (*.*) %1 is an identifier for the Switch executable file extensions. Executável do Switch (%1);;Todos os arquivos (*.*) - + Load File Carregar arquivo - + Open Extracted ROM Directory Abrir pasta da ROM extraída - + Invalid Directory Selected Pasta inválida selecionada - + The directory you have selected does not contain a 'main' file. A pasta que você selecionou não contém um arquivo 'main'. - + Installable Switch File (*.nca *.nsp *.xci);;Nintendo Content Archive (*.nca);;Nintendo Submission Package (*.nsp);;NX Cartridge Image (*.xci) Arquivo de Switch instalável (*.nca *.nsp *.xci);; Nintendo Content Archive (*.nca);;Nintendo Submission Package (*.nsp);;NX Cartridge Image (*.xci) - + Install Files Instalar arquivos - + %n file(s) remaining %n arquivo restante%n arquivo(s) restante(s)%n arquivo(s) restante(s) - + Installing file "%1"... Instalando arquivo "%1"... - - + + Install Results Resultados da instalação - + To avoid possible conflicts, we discourage users from installing base games to the NAND. Please, only use this feature to install updates and DLC. Para evitar possíveis conflitos, desencorajamos que os usuários instalem os jogos base na NAND. Por favor, use esse recurso apenas para instalar atualizações e DLCs. - + %n file(s) were newly installed %n arquivo(s) instalado(s) @@ -4365,7 +4364,7 @@ Por favor, use esse recurso apenas para instalar atualizações e DLCs. - + %n file(s) were overwritten %n arquivo(s) sobrescrito(s) @@ -4374,7 +4373,7 @@ Por favor, use esse recurso apenas para instalar atualizações e DLCs. - + %n file(s) failed to install %n arquivo(s) não instalado(s) @@ -4383,339 +4382,373 @@ Por favor, use esse recurso apenas para instalar atualizações e DLCs. - + System Application Aplicativo do sistema - + System Archive Arquivo do sistema - + System Application Update Atualização de aplicativo do sistema - + Firmware Package (Type A) Pacote de firmware (tipo A) - + Firmware Package (Type B) Pacote de firmware (tipo B) - + Game Jogo - + Game Update Atualização de jogo - + Game DLC DLC de jogo - + Delta Title Título delta - + Select NCA Install Type... Selecione o tipo de instalação do NCA... - + Please select the type of title you would like to install this NCA as: (In most instances, the default 'Game' is fine.) Selecione o tipo de título como o qual você gostaria de instalar este NCA: (Na maioria dos casos, o padrão 'Jogo' serve bem.) - + Failed to Install Falha ao instalar - + The title type you selected for the NCA is invalid. O tipo de título que você selecionou para o NCA é inválido. - + File not found Arquivo não encontrado - + File "%1" not found Arquivo "%1" não encontrado - + OK OK - - + + Hardware requirements not met Requisitos de hardware não atendidos - - + + Your system does not meet the recommended hardware requirements. Compatibility reporting has been disabled. Seu sistema não atende os requisitos de harwdare. O relatório de compatibilidade foi desabilitado. - + Missing yuzu Account Conta do yuzu faltando - + In order to submit a game compatibility test case, you must link your yuzu account.<br><br/>To link your yuzu account, go to Emulation &gt; Configuration &gt; Web. Para enviar um caso de teste de compatibilidade de jogo, você precisa entrar com a sua conta do yuzu.<br><br/>Para isso, vá para Emulação &gt; Configurar... &gt; Rede. - + Error opening URL Erro ao abrir URL - + Unable to open the URL "%1". Não foi possível abrir o URL "%1". - + TAS Recording Gravando TAS - + Overwrite file of player 1? Sobrescrever arquivo do jogador 1? - + Invalid config detected Configuração inválida detectada - + Handheld controller can't be used on docked mode. Pro controller will be selected. O controle portátil não pode ser usado no modo encaixado na base. O Pro Controller será selecionado. - - + + Amiibo Amiibo - - + + The current amiibo has been removed O amiibo atual foi removido - + Error Erro - - + + The current game is not looking for amiibos O jogo atual não está procurando amiibos - + Amiibo File (%1);; All Files (*.*) Arquivo Amiibo (%1);; Todos os arquivos (*.*) - + Load Amiibo Carregar Amiibo - + Error loading Amiibo data Erro ao carregar dados do Amiibo - + The selected file is not a valid amiibo O arquivo selecionado não é um amiibo válido - + The selected file is already on use O arquivo selecionado já está em uso - + An unknown error occurred Ocorreu um erro desconhecido - + Verification failed for the following files: %1 - + Houve uma falha na verificação dos seguintes arquivos: + +%1 - + + + No firmware available - + Nenhum firmware disponível - + + Please install the firmware to use the Album applet. + Instale o firmware para usar o applet Álbum. + + + + Album Applet + Applet Álbum + + + + Album applet is not available. Please reinstall firmware. + O applet Álbum não está disponível. Reinstale o firmware. + + + + Please install the firmware to use the Cabinet applet. + Instale o firmware para usar o applet Armário. + + + + Cabinet Applet + Applet Armário + + + + Cabinet applet is not available. Please reinstall firmware. + O applet Armário não está disponível. Reinstale o firmware. + + + Please install the firmware to use the Mii editor. - + Instale o firmware para usar o applet Editor de Miis. - + Mii Edit Applet - + Applet Editor de Miis - + Mii editor is not available. Please reinstall firmware. - + O applet Editor de Miis não está disponível. Reinstale o firmware. - + Capture Screenshot Capturar tela - + PNG Image (*.png) Imagem PNG (*.png) - + TAS state: Running %1/%2 Situação TAS: Rodando %1%2 - + TAS state: Recording %1 Situação TAS: Gravando %1 - + TAS state: Idle %1/%2 Situação TAS: Repouso %1%2 - + TAS State: Invalid Situação TAS: Inválido - + &Stop Running &Parar de rodar - + &Start &Iniciar - + Stop R&ecording Parar G&ravação - + R&ecord G&ravação - + Building: %n shader(s) Compilando: %n shader(s)Compilando: %n shader(s)Compilando: %n shader(s) - + Scale: %1x %1 is the resolution scaling factor Escala: %1x - + Speed: %1% / %2% Velocidade: %1% / %2% - + Speed: %1% Velocidade: %1% - + Game: %1 FPS (Unlocked) Jogo: %1 FPS (Desbloqueado) - + Game: %1 FPS Jogo: %1 FPS - + Frame: %1 ms Quadro: %1 ms - + %1 %2 %1 %2 - + FSR FSR - + NO AA Sem AA - + VOLUME: MUTE VOLUME: MUDO - + VOLUME: %1% Volume percentage (e.g. 50%) VOLUME: %1% - + Confirm Key Rederivation Confirmar rederivação de chave - + You are about to force rederive all of your keys. If you do not know what this means or what you are doing, this is a potentially destructive action. @@ -4732,37 +4765,37 @@ e opcionalmente faça cópias de segurança. Isto excluirá o seus arquivos de chaves geradas automaticamente, e reexecutar o módulo de derivação de chaves. - + Missing fuses Faltando fusíveis - + - Missing BOOT0 - Faltando BOOT0 - + - Missing BCPKG2-1-Normal-Main - Faltando BCPKG2-1-Normal-Main - + - Missing PRODINFO - Faltando PRODINFO - + Derivation Components Missing Faltando componentes de derivação - + Encryption keys are missing. <br>Please follow <a href='https://yuzu-emu.org/help/quickstart/'>the yuzu quickstart guide</a> to get all your keys, firmware and games.<br><br><small>(%1)</small> Chaves de encriptação faltando. <br>Por favor, siga <a href='https://yuzu-emu.org/help/quickstart/'>o guia de início rápido</a> para extrair suas chaves, firmware e jogos. <br><br><small>(%1)</small> - + Deriving keys... This may take up to a minute depending on your system's performance. @@ -4771,49 +4804,49 @@ Isto pode demorar até um minuto, dependendo do desempenho do seu sistema. - + Deriving Keys Derivando chaves - + System Archive Decryption Failed Falha a desencriptar o arquivo do sistema - + Encryption keys failed to decrypt firmware. <br>Please follow <a href='https://yuzu-emu.org/help/quickstart/'>the yuzu quickstart guide</a> to get all your keys, firmware and games. Chaves de encriptação falharam a desencriptar o firmware. <br>Por favor segue <a href='https://yuzu-emu.org/help/quickstart/'>the yuzu quickstart guide</a> para obter todas as tuas chaves, firmware e jogos. - + Select RomFS Dump Target Selecionar alvo de extração do RomFS - + Please select which RomFS you would like to dump. Selecione qual RomFS você quer extrair. - + Are you sure you want to close yuzu? Você deseja mesmo fechar o yuzu? - - - + + + yuzu yuzu - + Are you sure you want to stop the emulation? Any unsaved progress will be lost. Deseja mesmo parar a emulação? Qualquer progresso não salvo será perdido. - + The currently running application has requested yuzu to not exit. Would you like to bypass this and exit anyway? @@ -4965,241 +4998,251 @@ Deseja ignorar isso e sair mesmo assim? GameList - + Favorite Favorito - + Start Game Iniciar jogo - + Start Game without Custom Configuration Iniciar jogo sem configuração personalizada - + Open Save Data Location Abrir local dos jogos salvos - + Open Mod Data Location Abrir local dos dados de mods - + Open Transferable Pipeline Cache Abrir cache de pipeline transferível - + Remove Remover - + Remove Installed Update Remover atualização instalada - + Remove All Installed DLC Remover todos os DLCs instalados - + Remove Custom Configuration Remover configuração customizada - + + Remove Play Time Data + Remover dados de tempo jogado + + + Remove Cache Storage Remover cache do armazenamento - + Remove OpenGL Pipeline Cache Remover cache de pipeline do OpenGL - + Remove Vulkan Pipeline Cache Remover cache de pipeline do Vulkan - + Remove All Pipeline Caches Remover todos os caches de pipeline - + Remove All Installed Contents Remover todo o conteúdo instalado - - + + Dump RomFS Extrair RomFS - + Dump RomFS to SDMC Extrair RomFS para SDMC - + Verify Integrity - + Verificar integridade - + Copy Title ID to Clipboard Copiar ID do título para a área de transferência - + Navigate to GameDB entry Abrir artigo do jogo no GameDB - + Create Shortcut Criar atalho - + Add to Desktop Adicionar à área de trabalho - + Add to Applications Menu Adicionar ao menu de aplicativos - + Properties Propriedades - + Scan Subfolders Examinar subpastas - + Remove Game Directory Remover pasta de jogo - + ▲ Move Up ▲ Mover para cima - + ▼ Move Down ▼ Mover para baixo - + Open Directory Location Abrir local da pasta - + Clear Limpar - + Name Nome - + Compatibility Compatibilidade - + Add-ons Adicionais - + File type Tipo de arquivo - + Size Tamanho + + + Play time + Tempo jogado + GameListItemCompat - + Ingame Não Jogável - + Game starts, but crashes or major glitches prevent it from being completed. O jogo inicia, porém problemas ou grandes falhas impedem que ele seja concluído. - + Perfect Perfeito - + Game can be played without issues. O jogo pode ser jogado sem problemas. - + Playable Jogável - + Game functions with minor graphical or audio glitches and is playable from start to finish. O jogo funciona com pequenas falhas gráficas ou de áudio e pode ser reproduzido do início ao fim. - + Intro/Menu Intro/menu - + Game loads, but is unable to progress past the Start Screen. O jogo carrega, porém não consegue passar da tela inicial. - + Won't Boot Não inicia - + The game crashes when attempting to startup. O jogo trava ou se encerra abruptamente ao se tentar iniciá-lo. - + Not Tested Não testado - + The game has not yet been tested. Esse jogo ainda não foi testado. @@ -5207,7 +5250,7 @@ Deseja ignorar isso e sair mesmo assim? GameListPlaceholder - + Double-click to add a new folder to the game list Clique duas vezes para adicionar uma pasta à lista de jogos @@ -5220,12 +5263,12 @@ Deseja ignorar isso e sair mesmo assim? %1 de %n resultado(s)%1 de %n resultado(s)%1 de %n resultado(s) - + Filter: Filtro: - + Enter pattern to filter Digite o padrão para filtrar @@ -5343,6 +5386,7 @@ Mensagem de depuração: + Main Window Janela principal @@ -5448,6 +5492,11 @@ Mensagem de depuração: + Toggle Renderdoc Capture + + + + Toggle Status Bar Alternar Barra de Status @@ -5686,186 +5735,216 @@ Mensagem de depuração: + &Amiibo + &Amiibo + + + &TAS &TAS - + &Help &Ajuda - + &Install Files to NAND... &Instalar arquivos para NAND... - + L&oad File... &Carregar arquivo... - + Load &Folder... Carregar &pasta... - + E&xit S&air - + &Pause &Pausar - + &Stop &Parar - + &Reinitialize keys... &Reinicializar chaves... - + &Verify Installed Contents - + &Verificar conteúdo instalado - + &About yuzu &Sobre o yuzu - + Single &Window Mode Modo de &janela única - + Con&figure... Con&figurar... - + Display D&ock Widget Headers Exibir barra de títul&os de widgets afixados - + Show &Filter Bar Exibir barra de &filtro - + Show &Status Bar Exibir barra de &status - + Show Status Bar Exibir barra de status - + &Browse Public Game Lobby &Navegar no Lobby de Salas Públicas - + &Create Room &Criar sala - + &Leave Room Sai&r da sala - + &Direct Connect to Room Entrar &diretamente numa sala - + &Show Current Room Mostrar &sala atual - + F&ullscreen &Tela cheia - + &Restart &Reiniciar - + Load/Remove &Amiibo... Carregar/Remover &Amiibo... - + &Report Compatibility &Reportar compatibilidade - + Open &Mods Page Abrir página de &mods - + Open &Quickstart Guide Abrir &guia de início rápido - + &FAQ &Perguntas frequentes - + Open &yuzu Folder Abrir pasta do &yuzu - + &Capture Screenshot &Captura de tela - - Open &Mii Editor - + + Open &Album + Abrir &Álbum - + + &Set Nickname and Owner + &Definir apelido e proprietário + + + + &Delete Game Data + &Remover dados do jogo + + + + &Restore Amiibo + &Recuperar Amiibo + + + + &Format Amiibo + &Formatar Amiibo + + + + Open &Mii Editor + Abrir &Editor de Miis + + + &Configure TAS... &Configurar TAS - + Configure C&urrent Game... Configurar jogo &atual.. - + &Start &Iniciar - + &Reset &Restaurar - + R&ecord G&ravar @@ -6173,27 +6252,27 @@ p, li { white-space: pre-wrap; } Não está jogando um jogo - + Installed SD Titles Títulos instalados no SD - + Installed NAND Titles Títulos instalados na NAND - + System Titles Títulos do sistema - + Add New Game Directory Adicionar pasta de jogos - + Favorites Favoritos @@ -6719,7 +6798,7 @@ p, li { white-space: pre-wrap; } - + Pro Controller Pro Controller @@ -6732,7 +6811,7 @@ p, li { white-space: pre-wrap; } - + Dual Joycons Par de Joycons @@ -6745,7 +6824,7 @@ p, li { white-space: pre-wrap; } - + Left Joycon Joycon esquerdo @@ -6758,7 +6837,7 @@ p, li { white-space: pre-wrap; } - + Right Joycon Joycon direito @@ -6787,7 +6866,7 @@ p, li { white-space: pre-wrap; } - + Handheld Portátil @@ -6903,32 +6982,37 @@ p, li { white-space: pre-wrap; } 8 - + + Not enough controllers + Não há a quantidade mínima de controles + + + GameCube Controller Controle de GameCube - + Poke Ball Plus Poké Ball Plus - + NES Controller Controle do NES - + SNES Controller Controle do SNES - + N64 Controller Controle do Nintendo 64 - + Sega Genesis Mega Drive diff --git a/dist/languages/pt_PT.ts b/dist/languages/pt_PT.ts index dc52afcbbc..6b091db8c0 100644 --- a/dist/languages/pt_PT.ts +++ b/dist/languages/pt_PT.ts @@ -373,13 +373,13 @@ Isto banirá tanto o nome de usuário do fórum como o endereço IP.% - + Auto (%1) Auto select time zone Auto (%1) - + Default (%1) Default time zone Padrão (%1) @@ -826,7 +826,7 @@ Isto banirá tanto o nome de usuário do fórum como o endereço IP. Enable Renderdoc Hotkey - + Habilitar atalho para Renderdoc @@ -885,49 +885,29 @@ Isto banirá tanto o nome de usuário do fórum como o endereço IP. - Create Minidump After Crash - Criar um despejo resumido após uma falha - - - Enable this to output the latest generated audio command list to the console. Only affects games using the audio renderer. Habilite essa opção para gravar a última saída da lista de comandos de áudio para o console. Somente afetará jogos que utilizam o renderizador de áudio. - + Dump Audio Commands To Console** Despejar comandos de áudio no console** - + Enable Verbose Reporting Services** Ativar serviços de relatório detalhado** - + **This will be reset automatically when yuzu closes. **Isto será restaurado automaticamente assim que o yuzu for fechado. - - Restart Required - É necessário reiniciar - - - - yuzu is required to restart in order to apply this setting. - Será necessário reiniciar o yuzu para aplicar as configurações. - - - + Web applet not compiled Applet Web não compilado - - - MiniDump creation not compiled - Criação do mini despejo não compilada - ConfigureDebugController @@ -1346,7 +1326,7 @@ Isto banirá tanto o nome de usuário do fórum como o endereço IP. - + Conflicting Key Sequence Sequência de teclas em conflito @@ -1367,27 +1347,37 @@ Isto banirá tanto o nome de usuário do fórum como o endereço IP.Inválido - + + Invalid hotkey settings + Configurações de atalho inválidas + + + + An error occurred. Please report this issue on github. + Houve um erro. Relate o problema no GitHub. + + + Restore Default Restaurar Padrão - + Clear Limpar - + Conflicting Button Sequence Sequência de botões conflitante - + The default button sequence is already assigned to: %1 A sequência de botões padrão já está vinculada a %1 - + The default key sequence is already assigned to: %1 A sequência de teclas padrão já está atribuída a: %1 @@ -3365,67 +3355,72 @@ Arrasta os pontos para mudar a posição, ou dá duplo-clique nas células da ta Exibir Coluna Tipos de Arquivos - + + Show Play Time Column + Exibir coluna Tempo jogado + + + Game Icon Size: Tamanho do ícone do jogo: - + Folder Icon Size: Tamanho do ícone da pasta: - + Row 1 Text: Linha 1 Texto: - + Row 2 Text: Linha 2 Texto: - + Screenshots Captura de Ecrã - + Ask Where To Save Screenshots (Windows Only) Perguntar Onde Guardar Capturas de Ecrã (Apenas Windows) - + Screenshots Path: Caminho das Capturas de Ecrã: - + ... ... - + TextLabel TextLabel - + Resolution: Resolução: - + Select Screenshots Path... Seleccionar Caminho de Capturas de Ecrã... - + <System> <System> - + Auto (%1 x %2, %3 x %4) Screenshot width value Auto (%1 x %2, %3 x %4) @@ -3743,962 +3738,1000 @@ Arrasta os pontos para mudar a posição, ou dá duplo-clique nas células da ta GMainWindow - + <a href='https://yuzu-emu.org/help/feature/telemetry/'>Anonymous data is collected</a> to help improve yuzu. <br/><br/>Would you like to share your usage data with us? <a href='https://yuzu-emu.org/help/feature/telemetry/'>Dados anônimos são coletados</a>para ajudar a melhorar o yuzu.<br/><br/>Gostaria de compartilhar seus dados de uso conosco? - + Telemetry Telemetria - + Broken Vulkan Installation Detected Detectada Instalação Defeituosa do Vulkan - + Vulkan initialization failed during boot.<br><br>Click <a href='https://yuzu-emu.org/wiki/faq/#yuzu-starts-with-the-error-broken-vulkan-installation-detected'>here for instructions to fix the issue</a>. A inicialização do Vulkan falhou durante a carga do programa. <br><br>Clique <a href='https://yuzu-emu.org/wiki/faq/#yuzu-starts-with-the-error-broken-vulkan-installation-detected'>aqui para instruções de como resolver o problema</a>. - + Running a game TRANSLATORS: This string is shown to the user to explain why yuzu needs to prevent the computer from sleeping Rodando um jogo - + Loading Web Applet... A Carregar o Web Applet ... - - + + Disable Web Applet Desativar Web Applet - + Disabling the web applet can lead to undefined behavior and should only be used with Super Mario 3D All-Stars. Are you sure you want to disable the web applet? (This can be re-enabled in the Debug settings.) A desativação do applet da web pode causar comportamento inesperado e deve apenas ser usada com Super Mario 3D All-Stars. Você deseja mesmo desativar o applet da web? (Ele pode ser reativado nas configurações de depuração.) - + The amount of shaders currently being built Quantidade de shaders a serem construídos - + The current selected resolution scaling multiplier. O atualmente multiplicador de escala de resolução selecionado. - + Current emulation speed. Values higher or lower than 100% indicate emulation is running faster or slower than a Switch. Velocidade da emulação actual. Valores acima ou abaixo de 100% indicam que a emulação está sendo executada mais depressa ou mais devagar do que a Switch - + How many frames per second the game is currently displaying. This will vary from game to game and scene to scene. Quantos quadros por segundo o jogo está exibindo de momento. Isto irá variar de jogo para jogo e de cena para cena. - + Time taken to emulate a Switch frame, not counting framelimiting or v-sync. For full-speed emulation this should be at most 16.67 ms. Tempo gasto para emular um frame da Switch, sem contar o a limitação de quadros ou o v-sync. Para emulação de velocidade máxima, esta deve ser no máximo 16.67 ms. - + Unmute Unmute - + Mute Mute - + Reset Volume Redefinir volume - + &Clear Recent Files &Limpar arquivos recentes - + Emulated mouse is enabled Mouse emulado está habilitado - + Real mouse input and mouse panning are incompatible. Please disable the emulated mouse in input advanced settings to allow mouse panning. Controle de mouse real e controle panorâmico do mouse são incompatíveis. Por favor desabilite a emulação do mouse em configurações avançadas de controles para permitir o controle panorâmico do mouse. - + &Continue &Continuar - + &Pause &Pausa - + Warning Outdated Game Format Aviso de Formato de Jogo Desactualizado - + You are using the deconstructed ROM directory format for this game, which is an outdated format that has been superseded by others such as NCA, NAX, XCI, or NSP. Deconstructed ROM directories lack icons, metadata, and update support.<br><br>For an explanation of the various Switch formats yuzu supports, <a href='https://yuzu-emu.org/wiki/overview-of-switch-game-formats'>check out our wiki</a>. This message will not be shown again. Você está usando o formato de directório ROM desconstruído para este jogo, que é um formato desactualizado que foi substituído por outros, como NCA, NAX, XCI ou NSP. Os directórios de ROM não construídos não possuem ícones, metadados e suporte de actualização.<br><br>Para uma explicação dos vários formatos de Switch que o yuzu suporta,<a href='https://yuzu-emu.org/wiki/overview-of-switch-game-formats'>Verifique a nossa Wiki</a>. Esta mensagem não será mostrada novamente. - + Error while loading ROM! Erro ao carregar o ROM! - + The ROM format is not supported. O formato do ROM não é suportado. - + An error occurred initializing the video core. Ocorreu um erro ao inicializar o núcleo do vídeo. - + yuzu has encountered an error while running the video core. This is usually caused by outdated GPU drivers, including integrated ones. Please see the log for more details. For more information on accessing the log, please see the following page: <a href='https://yuzu-emu.org/help/reference/log-files/'>How to Upload the Log File</a>. yuzu encontrou um erro enquanto rodando o núcleo de vídeo. Normalmente isto é causado por drivers de GPU desatualizados, incluindo integrados. Por favor veja o registro para mais detalhes. Para mais informações em acesso ao registro por favor veja a seguinte página: <a href='https://yuzu-emu.org/help/reference/log-files/'>Como fazer envio de arquivo de registro</a>. - + Error while loading ROM! %1 %1 signifies a numeric error code. Erro ao carregar a ROM! %1 - + %1<br>Please follow <a href='https://yuzu-emu.org/help/quickstart/'>the yuzu quickstart guide</a> to redump your files.<br>You can refer to the yuzu wiki</a> or the yuzu Discord</a> for help. %1 signifies an error string. %1<br>Por favor, siga <a href='https://yuzu-emu.org/help/quickstart/'>a guia de início rápido do yuzu</a> para fazer o redespejo dos seus arquivos.<br>Você pode consultar a wiki do yuzu</a> ou o Discord do yuzu</a> para obter ajuda. - + An unknown error occurred. Please see the log for more details. Ocorreu um erro desconhecido. Por favor, veja o log para mais detalhes. - + (64-bit) (64-bit) - + (32-bit) (32-bit) - + %1 %2 %1 is the title name. %2 indicates if the title is 64-bit or 32-bit %1 %2 - + Closing software... Encerrando software... - + Save Data Save Data - + Mod Data Mod Data - + Error Opening %1 Folder Erro ao abrir a pasta %1 - - + + Folder does not exist! A Pasta não existe! - + Error Opening Transferable Shader Cache Erro ao abrir os Shader Cache transferíveis - + Failed to create the shader cache directory for this title. Falha ao criar o diretório de cache de shaders para este título. - + Error Removing Contents Erro Removendo Conteúdos - + Error Removing Update Erro ao Remover Atualização - + Error Removing DLC Erro Removendo DLC - + Remove Installed Game Contents? Remover Conteúdo Instalado do Jogo? - + Remove Installed Game Update? Remover Atualização Instalada do Jogo? - + Remove Installed Game DLC? Remover DLC Instalada do Jogo? - + Remove Entry Remover Entrada - - - - - - + + + + + + Successfully Removed Removido com Sucesso - + Successfully removed the installed base game. Removida a instalação do jogo base com sucesso. - + The base game is not installed in the NAND and cannot be removed. O jogo base não está instalado no NAND e não pode ser removido. - + Successfully removed the installed update. Removida a actualização instalada com sucesso. - + There is no update installed for this title. Não há actualização instalada neste título. - + There are no DLC installed for this title. Não há DLC instalado neste título. - + Successfully removed %1 installed DLC. Removido DLC instalado %1 com sucesso. - + Delete OpenGL Transferable Shader Cache? Apagar o cache de shaders transferível do OpenGL? - + Delete Vulkan Transferable Shader Cache? Apagar o cache de shaders transferível do Vulkan? - + Delete All Transferable Shader Caches? Apagar todos os caches de shaders transferíveis? - + Remove Custom Game Configuration? Remover Configuração Personalizada do Jogo? - + Remove Cache Storage? Remover Armazenamento da Cache? - + Remove File Remover Ficheiro - - + + Remove Play Time Data + Remover dados de tempo jogado + + + + Reset play time? + Deseja mesmo resetar o tempo jogado? + + + + Error Removing Transferable Shader Cache Error ao Remover Cache de Shader Transferível - - + + A shader cache for this title does not exist. O Shader Cache para este titulo não existe. - + Successfully removed the transferable shader cache. Removido a Cache de Shader Transferível com Sucesso. - + Failed to remove the transferable shader cache. Falha ao remover a cache de shader transferível. - + Error Removing Vulkan Driver Pipeline Cache Erro ao Remover Cache de Pipeline do Driver Vulkan - + Failed to remove the driver pipeline cache. Falha ao remover o pipeline de cache do driver. - - + + Error Removing Transferable Shader Caches Erro ao remover os caches de shaders transferíveis - + Successfully removed the transferable shader caches. Os caches de shaders transferíveis foram removidos com sucesso. - + Failed to remove the transferable shader cache directory. Falha ao remover o diretório do cache de shaders transferível. - - + + Error Removing Custom Configuration Erro ao Remover Configuração Personalizada - + A custom configuration for this title does not exist. Não existe uma configuração personalizada para este titúlo. - + Successfully removed the custom game configuration. Removida a configuração personalizada do jogo com sucesso. - + Failed to remove the custom game configuration. Falha ao remover a configuração personalizada do jogo. - - + + RomFS Extraction Failed! A Extração de RomFS falhou! - + There was an error copying the RomFS files or the user cancelled the operation. Houve um erro ao copiar os arquivos RomFS ou o usuário cancelou a operação. - + Full Cheio - + Skeleton Esqueleto - + Select RomFS Dump Mode Selecione o modo de despejo do RomFS - + Please select the how you would like the RomFS dumped.<br>Full will copy all of the files into the new directory while <br>skeleton will only create the directory structure. Por favor, selecione a forma como você gostaria que o RomFS fosse despejado<br>Full irá copiar todos os arquivos para o novo diretório enquanto<br>skeleton criará apenas a estrutura de diretórios. - + There is not enough free space at %1 to extract the RomFS. Please free up space or select a different dump directory at Emulation > Configure > System > Filesystem > Dump Root Não há espaço suficiente em %1 para extrair o RomFS. Por favor abra espaço ou selecione um diretório diferente em Emulação > Configurar > Sistema > Sistema de arquivos > Extrair raiz - + Extracting RomFS... Extraindo o RomFS ... - - - - + + + + Cancel Cancelar - + RomFS Extraction Succeeded! Extração de RomFS Bem-Sucedida! - - - + + + The operation completed successfully. A operação foi completa com sucesso. - + Integrity verification couldn't be performed! - + A verificação de integridade não foi realizada. - + File contents were not checked for validity. - + O conteúdo do arquivo não foi analisado. - - + + Integrity verification failed! - + Houve uma falha na verificação de integridade! - + File contents may be corrupt. - + O conteúdo do arquivo pode estar corrompido. - - + + Verifying integrity... - + Verificando integridade… - - + + Integrity verification succeeded! - + Verificação de integridade concluída! - - - - - + + + + Create Shortcut Criar Atalho - + This will create a shortcut to the current AppImage. This may not work well if you update. Continue? Isso irá criar um atalho para o AppImage atual. Isso pode não funcionar corretamente se você fizer uma atualização. Continuar? - - Cannot create shortcut on desktop. Path "%1" does not exist. - Não foi possível criar um atalho na área de trabalho. O caminho "%1" não existe. + + Cannot create shortcut. Path "%1" does not exist. + Não foi possível criar o atalho. O caminho "%1" não existe. - - Cannot create shortcut in applications menu. Path "%1" does not exist and cannot be created. - Não foi possível criar um atalho no menu de aplicativos. O caminho "%1" não existe e não pode ser criado. - - - + Create Icon Criar Ícone - + Cannot create icon file. Path "%1" does not exist and cannot be created. Não foi possível criar o arquivo de ícone. O caminho "%1" não existe e não pode ser criado. - + Start %1 with the yuzu Emulator Iniciar %1 com o Emulador Yuzu - + Failed to create a shortcut at %1 Falha ao criar um atalho em %1 - + Successfully created a shortcut to %1 Atalho criado com sucesso em %1 - + Error Opening %1 Erro ao abrir %1 - + Select Directory Selecione o Diretório - + Properties Propriedades - + The game properties could not be loaded. As propriedades do jogo não puderam ser carregadas. - + Switch Executable (%1);;All Files (*.*) %1 is an identifier for the Switch executable file extensions. Executáveis Switch (%1);;Todos os Ficheiros (*.*) - + Load File Carregar Ficheiro - + Open Extracted ROM Directory Abrir o directório ROM extraído - + Invalid Directory Selected Diretório inválido selecionado - + The directory you have selected does not contain a 'main' file. O diretório que você selecionou não contém um arquivo 'Main'. - + Installable Switch File (*.nca *.nsp *.xci);;Nintendo Content Archive (*.nca);;Nintendo Submission Package (*.nsp);;NX Cartridge Image (*.xci) Ficheiro Switch Instalável (*.nca *.nsp *.xci);;Arquivo de Conteúdo Nintendo (*.nca);;Pacote de Envio Nintendo (*.nsp);;Imagem de Cartucho NX (*.xci) - + Install Files Instalar Ficheiros - + %n file(s) remaining %n arquivo restante%n ficheiro(s) remanescente(s)%n ficheiro(s) remanescente(s) - + Installing file "%1"... Instalando arquivo "%1"... - - + + Install Results Instalar Resultados - + To avoid possible conflicts, we discourage users from installing base games to the NAND. Please, only use this feature to install updates and DLC. Para evitar possíveis conflitos, desencorajamos que os utilizadores instalem os jogos base na NAND. Por favor, use esse recurso apenas para instalar atualizações e DLC. - + %n file(s) were newly installed - + %n file(s) were overwritten - + %n file(s) failed to install - + System Application Aplicação do sistema - + System Archive Arquivo do sistema - + System Application Update Atualização do aplicativo do sistema - + Firmware Package (Type A) Pacote de Firmware (Tipo A) - + Firmware Package (Type B) Pacote de Firmware (Tipo B) - + Game Jogo - + Game Update Actualização do Jogo - + Game DLC DLC do Jogo - + Delta Title Título Delta - + Select NCA Install Type... Selecione o tipo de instalação do NCA ... - + Please select the type of title you would like to install this NCA as: (In most instances, the default 'Game' is fine.) Por favor, selecione o tipo de título que você gostaria de instalar este NCA como: (Na maioria dos casos, o padrão 'Jogo' é suficiente). - + Failed to Install Falha na instalação - + The title type you selected for the NCA is invalid. O tipo de título que você selecionou para o NCA é inválido. - + File not found Arquivo não encontrado - + File "%1" not found Arquivo "%1" não encontrado - + OK OK - - + + Hardware requirements not met Requisitos de hardware não atendidos - - + + Your system does not meet the recommended hardware requirements. Compatibility reporting has been disabled. Seu sistema não atende os requisitos de harwdare. O relatório de compatibilidade foi desabilitado. - + Missing yuzu Account Conta Yuzu Ausente - + In order to submit a game compatibility test case, you must link your yuzu account.<br><br/>To link your yuzu account, go to Emulation &gt; Configuration &gt; Web. Para enviar um caso de teste de compatibilidade de jogos, você deve vincular sua conta yuzu.<br><br/>Para vincular sua conta yuzu, vá para Emulação &gt; Configuração &gt; Rede. - + Error opening URL Erro ao abrir URL - + Unable to open the URL "%1". Não foi possível abrir o URL "%1". - + TAS Recording Gravando TAS - + Overwrite file of player 1? Sobrescrever arquivo do jogador 1? - + Invalid config detected Configação inválida detectada - + Handheld controller can't be used on docked mode. Pro controller will be selected. O comando portátil não pode ser usado no modo encaixado na base. O Pro controller será selecionado. - - + + Amiibo Amiibo - - + + The current amiibo has been removed O amiibo atual foi removido - + Error Erro - - + + The current game is not looking for amiibos O jogo atual não está procurando amiibos - + Amiibo File (%1);; All Files (*.*) Arquivo Amiibo (%1);; Todos os Arquivos (*.*) - + Load Amiibo Carregar Amiibo - + Error loading Amiibo data Erro ao carregar dados do Amiibo - + The selected file is not a valid amiibo O arquivo selecionado não é um amiibo válido - + The selected file is already on use O arquivo selecionado já está em uso - + An unknown error occurred Ocorreu um erro desconhecido - + Verification failed for the following files: %1 - + Houve uma falha na verificação dos seguintes arquivos: + +%1 - + + + No firmware available - + Nenhum firmware disponível - + + Please install the firmware to use the Album applet. + Instale o firmware para usar o applet Album. + + + + Album Applet + Applet Álbum + + + + Album applet is not available. Please reinstall firmware. + O applet Álbum não está disponível. Reinstale o firmware. + + + + Please install the firmware to use the Cabinet applet. + Instale o firmware para usar o applet Armário. + + + + Cabinet Applet + Applet Armário + + + + Cabinet applet is not available. Please reinstall firmware. + O applet Armário não está disponível. Reinstale o firmware. + + + Please install the firmware to use the Mii editor. - + Instale o firmware para usar o applet Editor de Miis. - + Mii Edit Applet - + Applet Editor de Miis - + Mii editor is not available. Please reinstall firmware. - + O applet Editor de Miis não está disponível. Reinstale o firmware. - + Capture Screenshot Captura de Tela - + PNG Image (*.png) Imagem PNG (*.png) - + TAS state: Running %1/%2 Situação TAS: Rodando %1%2 - + TAS state: Recording %1 Situação TAS: Gravando %1 - + TAS state: Idle %1/%2 Situação TAS: Repouso %1%2 - + TAS State: Invalid Situação TAS: Inválido - + &Stop Running &Parar de rodar - + &Start &Começar - + Stop R&ecording Parar G&ravação - + R&ecord G&ravação - + Building: %n shader(s) - + Scale: %1x %1 is the resolution scaling factor Escala: %1x - + Speed: %1% / %2% Velocidade: %1% / %2% - + Speed: %1% Velocidade: %1% - + Game: %1 FPS (Unlocked) Jogo: %1 FPS (Desbloqueado) - + Game: %1 FPS Jogo: %1 FPS - + Frame: %1 ms Quadro: %1 ms - + %1 %2 %1 %2 - + FSR FSR - + NO AA Sem AA - + VOLUME: MUTE VOLUME: MUDO - + VOLUME: %1% Volume percentage (e.g. 50%) VOLUME: %1% - + Confirm Key Rederivation Confirme a rederivação da chave - + You are about to force rederive all of your keys. If you do not know what this means or what you are doing, this is a potentially destructive action. @@ -4715,37 +4748,37 @@ e opcionalmente faça backups. Isso irá excluir os seus arquivos de chave gerados automaticamente e executará novamente o módulo de derivação de chave. - + Missing fuses Fusíveis em Falta - + - Missing BOOT0 - BOOT0 em Falta - + - Missing BCPKG2-1-Normal-Main - BCPKG2-1-Normal-Main em Falta - + - Missing PRODINFO - PRODINFO em Falta - + Derivation Components Missing Componentes de Derivação em Falta - + Encryption keys are missing. <br>Please follow <a href='https://yuzu-emu.org/help/quickstart/'>the yuzu quickstart guide</a> to get all your keys, firmware and games.<br><br><small>(%1)</small> Chaves de encriptação faltando. <br>Por favor, siga <a href='https://yuzu-emu.org/help/quickstart/'>o guia de início rápido</a> para extrair suas chaves, firmware e jogos. <br><br><small>(%1)</small> - + Deriving keys... This may take up to a minute depending on your system's performance. @@ -4754,49 +4787,49 @@ Isto pode demorar até um minuto, dependendo do desempenho do seu sistema. - + Deriving Keys Derivando Chaves - + System Archive Decryption Failed Falha a desencriptar o arquivo do sistema - + Encryption keys failed to decrypt firmware. <br>Please follow <a href='https://yuzu-emu.org/help/quickstart/'>the yuzu quickstart guide</a> to get all your keys, firmware and games. Chaves de encriptação falharam a desencriptar o firmware. <br>Por favor segue <a href='https://yuzu-emu.org/help/quickstart/'>the yuzu quickstart guide</a> para obter todas as tuas chaves, firmware e jogos. - + Select RomFS Dump Target Selecione o destino de despejo do RomFS - + Please select which RomFS you would like to dump. Por favor, selecione qual o RomFS que você gostaria de despejar. - + Are you sure you want to close yuzu? Tem a certeza que quer fechar o yuzu? - - - + + + yuzu yuzu - + Are you sure you want to stop the emulation? Any unsaved progress will be lost. Tem a certeza de que quer parar a emulação? Qualquer progresso não salvo será perdido. - + The currently running application has requested yuzu to not exit. Would you like to bypass this and exit anyway? @@ -4948,241 +4981,251 @@ Deseja ignorar isso e sair mesmo assim? GameList - + Favorite Favorito - + Start Game Iniciar jogo - + Start Game without Custom Configuration Iniciar jogo sem configuração personalizada - + Open Save Data Location Abrir Localização de Dados Salvos - + Open Mod Data Location Abrir a Localização de Dados do Mod - + Open Transferable Pipeline Cache Abrir cache de pipeline transferível - + Remove Remover - + Remove Installed Update Remover Actualizações Instaladas - + Remove All Installed DLC Remover Todos os DLC Instalados - + Remove Custom Configuration Remover Configuração Personalizada - + + Remove Play Time Data + Remover dados de tempo jogado + + + Remove Cache Storage Remove a Cache do Armazenamento - + Remove OpenGL Pipeline Cache Remover cache de pipeline do OpenGL - + Remove Vulkan Pipeline Cache Remover cache de pipeline do Vulkan - + Remove All Pipeline Caches Remover todos os caches de pipeline - + Remove All Installed Contents Remover Todos os Conteúdos Instalados - - + + Dump RomFS Despejar RomFS - + Dump RomFS to SDMC Extrair RomFS para SDMC - + Verify Integrity - + Verificar integridade - + Copy Title ID to Clipboard Copiar título de ID para a área de transferência - + Navigate to GameDB entry Navegue para a Entrada da Base de Dados de Jogos - + Create Shortcut Criar Atalho - + Add to Desktop Adicionar à Área de Trabalho - + Add to Applications Menu Adicionar ao Menu de Aplicativos - + Properties Propriedades - + Scan Subfolders Examinar Sub-pastas - + Remove Game Directory Remover diretório do Jogo - + ▲ Move Up ▲ Mover para Cima - + ▼ Move Down ▼ Mover para Baixo - + Open Directory Location Abrir Localização do diretório - + Clear Limpar - + Name Nome - + Compatibility Compatibilidade - + Add-ons Add-ons - + File type Tipo de Arquivo - + Size Tamanho + + + Play time + Tempo jogado + GameListItemCompat - + Ingame Não Jogável - + Game starts, but crashes or major glitches prevent it from being completed. O jogo inicia, porém problemas ou grandes falhas impedem que ele seja concluído. - + Perfect Perfeito - + Game can be played without issues. O jogo pode ser jogado sem problemas. - + Playable Jogável - + Game functions with minor graphical or audio glitches and is playable from start to finish. O jogo funciona com pequenas falhas gráficas ou de áudio e pode ser reproduzido do início ao fim. - + Intro/Menu Introdução / Menu - + Game loads, but is unable to progress past the Start Screen. O jogo carrega, porém não consegue passar da tela inicial. - + Won't Boot Não Inicia - + The game crashes when attempting to startup. O jogo trava ao tentar iniciar. - + Not Tested Não Testado - + The game has not yet been tested. O jogo ainda não foi testado. @@ -5190,7 +5233,7 @@ Deseja ignorar isso e sair mesmo assim? GameListPlaceholder - + Double-click to add a new folder to the game list Clique duas vezes para adicionar uma nova pasta à lista de jogos @@ -5203,12 +5246,12 @@ Deseja ignorar isso e sair mesmo assim? - + Filter: Filtro: - + Enter pattern to filter Digite o padrão para filtrar @@ -5326,6 +5369,7 @@ Mensagem de depuração: + Main Window Janela Principal @@ -5431,6 +5475,11 @@ Mensagem de depuração: + Toggle Renderdoc Capture + + + + Toggle Status Bar Alternar Barra de Status @@ -5669,186 +5718,216 @@ Mensagem de depuração: + &Amiibo + &Amiibo + + + &TAS &TAS - + &Help &Ajuda - + &Install Files to NAND... &Instalar arquivos na NAND... - + L&oad File... C&arregar arquivo... - + Load &Folder... Carregar &pasta... - + E&xit &Sair - + &Pause &Pausa - + &Stop &Parar - + &Reinitialize keys... &Reinicializar chaves... - + &Verify Installed Contents - + &Verificar conteúdo instalado - + &About yuzu &Sobre o yuzu - + Single &Window Mode Modo de &janela única - + Con&figure... Con&figurar... - + Display D&ock Widget Headers Exibir barra de títul&os de widgets afixados - + Show &Filter Bar Mostrar Barra de &Filtros - + Show &Status Bar Mostrar Barra de &Estado - + Show Status Bar Mostrar Barra de Estado - + &Browse Public Game Lobby &Navegar no Lobby de Salas Públicas - + &Create Room &Criar Sala - + &Leave Room &Sair da Sala - + &Direct Connect to Room Conectar &Diretamente Numa Sala - + &Show Current Room Exibir &Sala Atual - + F&ullscreen T&ela cheia - + &Restart &Reiniciar - + Load/Remove &Amiibo... Carregar/Remover &Amiibo... - + &Report Compatibility &Reportar compatibilidade - + Open &Mods Page Abrir Página de &Mods - + Open &Quickstart Guide Abrir &guia de início rápido - + &FAQ &Perguntas frequentes - + Open &yuzu Folder Abrir pasta &yuzu - + &Capture Screenshot &Captura de Tela - - Open &Mii Editor - + + Open &Album + Abrir &Álbum - + + &Set Nickname and Owner + &Definir apelido e proprietário + + + + &Delete Game Data + &Remover dados do jogo + + + + &Restore Amiibo + &Recuperar Amiibo + + + + &Format Amiibo + &Formatar Amiibo + + + + Open &Mii Editor + Abrir &Editor de Miis + + + &Configure TAS... &Configurar TAS - + Configure C&urrent Game... Configurar jogo atual... - + &Start &Começar - + &Reset &Restaurar - + R&ecord G&ravar @@ -6155,27 +6234,27 @@ p, li { white-space: pre-wrap; } Não está jogando um jogo - + Installed SD Titles Títulos SD instalados - + Installed NAND Titles Títulos NAND instalados - + System Titles Títulos do sistema - + Add New Game Directory Adicionar novo diretório de jogos - + Favorites Favoritos @@ -6701,7 +6780,7 @@ p, li { white-space: pre-wrap; } - + Pro Controller Comando Pro @@ -6714,7 +6793,7 @@ p, li { white-space: pre-wrap; } - + Dual Joycons Par de Joycons @@ -6727,7 +6806,7 @@ p, li { white-space: pre-wrap; } - + Left Joycon Joycon Esquerdo @@ -6740,7 +6819,7 @@ p, li { white-space: pre-wrap; } - + Right Joycon Joycon Direito @@ -6769,7 +6848,7 @@ p, li { white-space: pre-wrap; } - + Handheld Portátil @@ -6885,32 +6964,37 @@ p, li { white-space: pre-wrap; } 8 - + + Not enough controllers + Não há a quantidade mínima de controles + + + GameCube Controller Controlador de depuração - + Poke Ball Plus Poké Ball Plus - + NES Controller Controle do NES - + SNES Controller Controle do SNES - + N64 Controller Controle do Nintendo 64 - + Sega Genesis Mega Drive diff --git a/dist/languages/ru_RU.ts b/dist/languages/ru_RU.ts index a8432bf83f..80cf2078c6 100644 --- a/dist/languages/ru_RU.ts +++ b/dist/languages/ru_RU.ts @@ -373,13 +373,13 @@ This would ban both their forum username and their IP address. % - + Auto (%1) Auto select time zone Авто (%1) - + Default (%1) Default time zone По умолчанию (%1) @@ -893,49 +893,29 @@ This would ban both their forum username and their IP address. - Create Minidump After Crash - Создавать мини-дамп после краша - - - Enable this to output the latest generated audio command list to the console. Only affects games using the audio renderer. Включите эту опцию, чтобы вывести на консоль последний сгенерированный список аудиокоманд. Влияет только на игры, использующие аудио рендерер. - + Dump Audio Commands To Console** Дамп аудиокоманд в консоль** - + Enable Verbose Reporting Services** Включить службу отчётов в развернутом виде** - + **This will be reset automatically when yuzu closes. **Это будет автоматически сброшено после закрытия yuzu. - - Restart Required - Требуется перезапуск - - - - yuzu is required to restart in order to apply this setting. - yuzu необходимо перезапустить, чтобы применить эту настройку. - - - + Web applet not compiled Веб-апплет не скомпилирован - - - MiniDump creation not compiled - Создание мини-дампа не скомпилировано - ConfigureDebugController @@ -1354,7 +1334,7 @@ This would ban both their forum username and their IP address. - + Conflicting Key Sequence Конфликтующее сочетание клавиш @@ -1375,27 +1355,37 @@ This would ban both their forum username and their IP address. Недопустимо - + + Invalid hotkey settings + + + + + An error occurred. Please report this issue on github. + + + + Restore Default Ввостановить значение по умолчанию - + Clear Очистить - + Conflicting Button Sequence Конфликтующее сочетание кнопок - + The default button sequence is already assigned to: %1 Сочетание кнопок по умолчанию уже назначено на: %1 - + The default key sequence is already assigned to: %1 Сочетание клавиш по умолчанию уже назначено на: %1 @@ -3373,67 +3363,72 @@ Drag points to change position, or double-click table cells to edit values.Показвыать столбец типа файлов - + + Show Play Time Column + + + + Game Icon Size: Размер иконки игры: - + Folder Icon Size: Размер иконки папки: - + Row 1 Text: Текст 1-ой строки: - + Row 2 Text: Текст 2-ой строки: - + Screenshots Скриншоты - + Ask Where To Save Screenshots (Windows Only) Спрашивать куда сохранять скриншоты (Только для Windows) - + Screenshots Path: Папка для скриншотов: - + ... ... - + TextLabel - + Resolution: Разрешение: - + Select Screenshots Path... Выберите папку для скриншотов... - + <System> <System> - + Auto (%1 x %2, %3 x %4) Screenshot width value @@ -3751,612 +3746,616 @@ Drag points to change position, or double-click table cells to edit values. GMainWindow - + <a href='https://yuzu-emu.org/help/feature/telemetry/'>Anonymous data is collected</a> to help improve yuzu. <br/><br/>Would you like to share your usage data with us? <a href='https://yuzu-emu.org/help/feature/telemetry/'>Анонимные данные собираются для того,</a> чтобы помочь улучшить работу yuzu. <br/><br/>Хотели бы вы делиться данными об использовании с нами? - + Telemetry Телеметрия - + Broken Vulkan Installation Detected Обнаружена поврежденная установка Vulkan - + Vulkan initialization failed during boot.<br><br>Click <a href='https://yuzu-emu.org/wiki/faq/#yuzu-starts-with-the-error-broken-vulkan-installation-detected'>here for instructions to fix the issue</a>. Не удалось выполнить инициализацию Vulkan во время загрузки.<br><br>Нажмите <a href='https://yuzu-emu.org/wiki/faq/#yuzu-starts-with-the-error-broken-vulkan-installation-detected'>здесь для получения инструкций по устранению проблемы</a>. - + Running a game TRANSLATORS: This string is shown to the user to explain why yuzu needs to prevent the computer from sleeping Запущена игра - + Loading Web Applet... Загрузка веб-апплета... - - + + Disable Web Applet Отключить веб-апплет - + Disabling the web applet can lead to undefined behavior and should only be used with Super Mario 3D All-Stars. Are you sure you want to disable the web applet? (This can be re-enabled in the Debug settings.) Отключение веб-апплета может привести к неожиданному поведению и должно использоваться только с Super Mario 3D All-Stars. Вы уверены, что хотите отключить веб-апплет? (Его можно снова включить в настройках отладки.) - + The amount of shaders currently being built Количество создаваемых шейдеров на данный момент - + The current selected resolution scaling multiplier. Текущий выбранный множитель масштабирования разрешения. - + Current emulation speed. Values higher or lower than 100% indicate emulation is running faster or slower than a Switch. Текущая скорость эмуляции. Значения выше или ниже 100% указывают на то, что эмуляция идет быстрее или медленнее, чем на Switch. - + How many frames per second the game is currently displaying. This will vary from game to game and scene to scene. Количество кадров в секунду в данный момент. Значение будет меняться между играми и сценами. - + Time taken to emulate a Switch frame, not counting framelimiting or v-sync. For full-speed emulation this should be at most 16.67 ms. Время, которое нужно для эмуляции 1 кадра Switch, не принимая во внимание ограничение FPS или вертикальную синхронизацию. Для эмуляции в полной скорости значение должно быть не больше 16,67 мс. - + Unmute Включить звук - + Mute Выключить звук - + Reset Volume Сбросить громкость - + &Clear Recent Files [&C] Очистить недавние файлы - + Emulated mouse is enabled Эмулированная мышь включена - + Real mouse input and mouse panning are incompatible. Please disable the emulated mouse in input advanced settings to allow mouse panning. Ввод реальной мыши и панорамирование мышью несовместимы. Пожалуйста, отключите эмулированную мышь в расширенных настройках ввода, чтобы разрешить панорамирование мышью. - + &Continue [&C] Продолжить - + &Pause [&P] Пауза - + Warning Outdated Game Format Предупреждение устаревший формат игры - + You are using the deconstructed ROM directory format for this game, which is an outdated format that has been superseded by others such as NCA, NAX, XCI, or NSP. Deconstructed ROM directories lack icons, metadata, and update support.<br><br>For an explanation of the various Switch formats yuzu supports, <a href='https://yuzu-emu.org/wiki/overview-of-switch-game-formats'>check out our wiki</a>. This message will not be shown again. Для этой игры вы используете разархивированный формат ROM'а, который является устаревшим и был заменен другими, такими как NCA, NAX, XCI или NSP. В разархивированных каталогах ROM'а отсутствуют иконки, метаданные и поддержка обновлений. <br><br>Для получения информации о различных форматах Switch, поддерживаемых yuzu, <a href='https://yuzu-emu.org/wiki/overview-of-switch-game-formats'>просмотрите нашу вики</a>. Это сообщение больше не будет отображаться. - + Error while loading ROM! Ошибка при загрузке ROM'а! - + The ROM format is not supported. Формат ROM'а не поддерживается. - + An error occurred initializing the video core. Произошла ошибка при инициализации видеоядра. - + yuzu has encountered an error while running the video core. This is usually caused by outdated GPU drivers, including integrated ones. Please see the log for more details. For more information on accessing the log, please see the following page: <a href='https://yuzu-emu.org/help/reference/log-files/'>How to Upload the Log File</a>. yuzu столкнулся с ошибкой при запуске видеоядра. Обычно это вызвано устаревшими драйверами ГП, включая интегрированные. Проверьте журнал для получения более подробной информации. Дополнительную информацию о доступе к журналу смотрите на следующей странице: <a href='https://yuzu-emu.org/help/reference/log-files/'>Как загрузить файл журнала</a>. - + Error while loading ROM! %1 %1 signifies a numeric error code. Ошибка при загрузке ROM'а! %1 - + %1<br>Please follow <a href='https://yuzu-emu.org/help/quickstart/'>the yuzu quickstart guide</a> to redump your files.<br>You can refer to the yuzu wiki</a> or the yuzu Discord</a> for help. %1 signifies an error string. %1<br>Пожалуйста, следуйте <a href='https://yuzu-emu.org/help/quickstart/'>краткому руководству пользователя yuzu</a> чтобы пере-дампить ваши файлы<br>Вы можете обратиться к вики yuzu</a> или Discord yuzu</a> для помощи. - + An unknown error occurred. Please see the log for more details. Произошла неизвестная ошибка. Пожалуйста, проверьте журнал для подробностей. - + (64-bit) (64-х битный) - + (32-bit) (32-х битный) - + %1 %2 %1 is the title name. %2 indicates if the title is 64-bit or 32-bit %1 %2 - + Closing software... Закрываем программу... - + Save Data Сохранения - + Mod Data Данные модов - + Error Opening %1 Folder Ошибка при открытии папки %1 - - + + Folder does not exist! Папка не существует! - + Error Opening Transferable Shader Cache Ошибка при открытии переносного кэша шейдеров - + Failed to create the shader cache directory for this title. Не удалось создать папку кэша шейдеров для этой игры. - + Error Removing Contents Ошибка при удалении содержимого - + Error Removing Update Ошибка при удалении обновлений - + Error Removing DLC Ошибка при удалении DLC - + Remove Installed Game Contents? Удалить установленное содержимое игр? - + Remove Installed Game Update? Удалить установленные обновления игры? - + Remove Installed Game DLC? Удалить установленные DLC игры? - + Remove Entry Удалить запись - - - - - - + + + + + + Successfully Removed Успешно удалено - + Successfully removed the installed base game. Установленная игра успешно удалена. - + The base game is not installed in the NAND and cannot be removed. Игра не установлена в NAND и не может быть удалена. - + Successfully removed the installed update. Установленное обновление успешно удалено. - + There is no update installed for this title. Для этой игры не было установлено обновление. - + There are no DLC installed for this title. Для этой игры не были установлены DLC. - + Successfully removed %1 installed DLC. Установленное DLC %1 было успешно удалено - + Delete OpenGL Transferable Shader Cache? Удалить переносной кэш шейдеров OpenGL? - + Delete Vulkan Transferable Shader Cache? Удалить переносной кэш шейдеров Vulkan? - + Delete All Transferable Shader Caches? Удалить весь переносной кэш шейдеров? - + Remove Custom Game Configuration? Удалить пользовательскую настройку игры? - + Remove Cache Storage? Удалить кэш-хранилище? - + Remove File Удалить файл - - + + Remove Play Time Data + + + + + Reset play time? + + + + + Error Removing Transferable Shader Cache Ошибка при удалении переносного кэша шейдеров - - + + A shader cache for this title does not exist. Кэш шейдеров для этой игры не существует. - + Successfully removed the transferable shader cache. Переносной кэш шейдеров успешно удалён. - + Failed to remove the transferable shader cache. Не удалось удалить переносной кэш шейдеров. - + Error Removing Vulkan Driver Pipeline Cache Ошибка при удалении конвейерного кэша Vulkan - + Failed to remove the driver pipeline cache. Не удалось удалить конвейерный кэш шейдеров. - - + + Error Removing Transferable Shader Caches Ошибка при удалении переносного кэша шейдеров - + Successfully removed the transferable shader caches. Переносной кэш шейдеров успешно удален. - + Failed to remove the transferable shader cache directory. Ошибка при удалении папки переносного кэша шейдеров. - - + + Error Removing Custom Configuration Ошибка при удалении пользовательской настройки - + A custom configuration for this title does not exist. Пользовательская настройка для этой игры не существует. - + Successfully removed the custom game configuration. Пользовательская настройка игры успешно удалена. - + Failed to remove the custom game configuration. Не удалось удалить пользовательскую настройку игры. - - + + RomFS Extraction Failed! Не удалось извлечь RomFS! - + There was an error copying the RomFS files or the user cancelled the operation. Произошла ошибка при копировании файлов RomFS или пользователь отменил операцию. - + Full Полный - + Skeleton Скелет - + Select RomFS Dump Mode Выберите режим дампа RomFS - + Please select the how you would like the RomFS dumped.<br>Full will copy all of the files into the new directory while <br>skeleton will only create the directory structure. Пожалуйста, выберите, как вы хотите выполнить дамп RomFS. <br>Полный скопирует все файлы в новую папку, в то время как <br>скелет создаст только структуру папок. - + There is not enough free space at %1 to extract the RomFS. Please free up space or select a different dump directory at Emulation > Configure > System > Filesystem > Dump Root В %1 недостаточно свободного места для извлечения RomFS. Пожалуйста, освободите место или выберите другую папку для дампа в Эмуляция > Настройка > Система > Файловая система > Корень дампа - + Extracting RomFS... Извлечение RomFS... - - - - + + + + Cancel Отмена - + RomFS Extraction Succeeded! Извлечение RomFS прошло успешно! - - - + + + The operation completed successfully. Операция выполнена. - + Integrity verification couldn't be performed! - + File contents were not checked for validity. - - + + Integrity verification failed! - + File contents may be corrupt. - - + + Verifying integrity... - - + + Integrity verification succeeded! - - - - - + + + + Create Shortcut Создать ярлык - + This will create a shortcut to the current AppImage. This may not work well if you update. Continue? Это создаст ярлык для текущего AppImage. Он может не работать после обновлений. Продолжить? - - Cannot create shortcut on desktop. Path "%1" does not exist. - Не удается создать ярлык на рабочем столе. Путь "%1" не существует. + + Cannot create shortcut. Path "%1" does not exist. + - - Cannot create shortcut in applications menu. Path "%1" does not exist and cannot be created. - Невозможно создать ярлык в меню приложений. Путь "%1" не существует и не может быть создан. - - - + Create Icon Создать иконку - + Cannot create icon file. Path "%1" does not exist and cannot be created. Невозможно создать файл иконки. Путь "%1" не существует и не может быть создан. - + Start %1 with the yuzu Emulator Запустить %1 с помощью эмулятора yuzu - + Failed to create a shortcut at %1 Не удалось создать ярлык в %1 - + Successfully created a shortcut to %1 Успешно создан ярлык в %1 - + Error Opening %1 Ошибка открытия %1 - + Select Directory Выбрать папку - + Properties Свойства - + The game properties could not be loaded. Не удалось загрузить свойства игры. - + Switch Executable (%1);;All Files (*.*) %1 is an identifier for the Switch executable file extensions. Исполняемый файл Switch (%1);;Все файлы (*.*) - + Load File Загрузить файл - + Open Extracted ROM Directory Открыть папку извлечённого ROM'а - + Invalid Directory Selected Выбрана недопустимая папка - + The directory you have selected does not contain a 'main' file. Папка, которую вы выбрали, не содержит файла 'main'. - + Installable Switch File (*.nca *.nsp *.xci);;Nintendo Content Archive (*.nca);;Nintendo Submission Package (*.nsp);;NX Cartridge Image (*.xci) Устанавливаемый файл Switch (*.nca, *.nsp, *.xci);;Архив контента Nintendo (*.nca);;Пакет подачи Nintendo (*.nsp);;Образ картриджа NX (*.xci) - + Install Files Установить файлы - + %n file(s) remaining Остался %n файлОсталось %n файл(ов)Осталось %n файл(ов)Осталось %n файл(ов) - + Installing file "%1"... Установка файла "%1"... - - + + Install Results Результаты установки - + To avoid possible conflicts, we discourage users from installing base games to the NAND. Please, only use this feature to install updates and DLC. Чтобы избежать возможных конфликтов, мы не рекомендуем пользователям устанавливать игры в NAND. Пожалуйста, используйте эту функцию только для установки обновлений и DLC. - + %n file(s) were newly installed %n файл был недавно установлен @@ -4366,7 +4365,7 @@ Please, only use this feature to install updates and DLC. - + %n file(s) were overwritten %n файл был перезаписан @@ -4376,7 +4375,7 @@ Please, only use this feature to install updates and DLC. - + %n file(s) failed to install %n файл не удалось установить @@ -4386,339 +4385,371 @@ Please, only use this feature to install updates and DLC. - + System Application Системное приложение - + System Archive Системный архив - + System Application Update Обновление системного приложения - + Firmware Package (Type A) Пакет прошивки (Тип А) - + Firmware Package (Type B) Пакет прошивки (Тип Б) - + Game Игра - + Game Update Обновление игры - + Game DLC DLC игры - + Delta Title Дельта-титул - + Select NCA Install Type... Выберите тип установки NCA... - + Please select the type of title you would like to install this NCA as: (In most instances, the default 'Game' is fine.) Пожалуйста, выберите тип приложения, который вы хотите установить для этого NCA: (В большинстве случаев, подходит стандартный выбор «Игра».) - + Failed to Install Ошибка установки - + The title type you selected for the NCA is invalid. Тип приложения, который вы выбрали для NCA, недействителен. - + File not found Файл не найден - + File "%1" not found Файл "%1" не найден - + OK ОК - - + + Hardware requirements not met Не удовлетворены системные требования - - + + Your system does not meet the recommended hardware requirements. Compatibility reporting has been disabled. Ваша система не соответствует рекомендуемым системным требованиям. Отчеты о совместимости были отключены. - + Missing yuzu Account Отсутствует аккаунт yuzu - + In order to submit a game compatibility test case, you must link your yuzu account.<br><br/>To link your yuzu account, go to Emulation &gt; Configuration &gt; Web. Чтобы отправить отчет о совместимости игры, необходимо привязать свою учетную запись yuzu.<br><br/>Чтобы привязать свою учетную запись yuzu, перейдите в раздел Эмуляция &gt; Параметры &gt; Сеть. - + Error opening URL Ошибка при открытии URL - + Unable to open the URL "%1". Не удалось открыть URL: "%1". - + TAS Recording Запись TAS - + Overwrite file of player 1? Перезаписать файл игрока 1? - + Invalid config detected Обнаружена недопустимая конфигурация - + Handheld controller can't be used on docked mode. Pro controller will be selected. Портативный контроллер не может быть использован в режиме док-станции. Будет выбран контроллер Pro. - - + + Amiibo Amiibo - - + + The current amiibo has been removed Текущий amiibo был убран - + Error Ошибка - - + + The current game is not looking for amiibos Текущая игра не ищет amiibo - + Amiibo File (%1);; All Files (*.*) Файл Amiibo (%1);; Все Файлы (*.*) - + Load Amiibo Загрузить Amiibo - + Error loading Amiibo data Ошибка загрузки данных Amiibo - + The selected file is not a valid amiibo Выбранный файл не является допустимым amiibo - + The selected file is already on use Выбранный файл уже используется - + An unknown error occurred Произошла неизвестная ошибка - + Verification failed for the following files: %1 - + + + No firmware available - + + Please install the firmware to use the Album applet. + + + + + Album Applet + + + + + Album applet is not available. Please reinstall firmware. + + + + + Please install the firmware to use the Cabinet applet. + + + + + Cabinet Applet + + + + + Cabinet applet is not available. Please reinstall firmware. + + + + Please install the firmware to use the Mii editor. - + Mii Edit Applet - + Mii editor is not available. Please reinstall firmware. - + Capture Screenshot Сделать скриншот - + PNG Image (*.png) Изображение PNG (*.png) - + TAS state: Running %1/%2 Состояние TAS: Выполняется %1/%2 - + TAS state: Recording %1 Состояние TAS: Записывается %1 - + TAS state: Idle %1/%2 Состояние TAS: Простой %1/%2 - + TAS State: Invalid Состояние TAS: Неверное - + &Stop Running [&S] Остановка - + &Start [&S] Начать - + Stop R&ecording [&E] Закончить запись - + R&ecord [&E] Запись - + Building: %n shader(s) Постройка: %n шейдерПостройка: %n шейдер(ов)Постройка: %n шейдер(ов)Постройка: %n шейдер(ов) - + Scale: %1x %1 is the resolution scaling factor Масштаб: %1x - + Speed: %1% / %2% Скорость: %1% / %2% - + Speed: %1% Скорость: %1% - + Game: %1 FPS (Unlocked) Игра: %1 FPS (Неограниченно) - + Game: %1 FPS Игра: %1 FPS - + Frame: %1 ms Кадр: %1 мс - + %1 %2 %1 %2 - + FSR FSR - + NO AA БЕЗ СГЛАЖИВАНИЯ - + VOLUME: MUTE ГРОМКОСТЬ: ЗАГЛУШЕНА - + VOLUME: %1% Volume percentage (e.g. 50%) ГРОМКОСТЬ: %1% - + Confirm Key Rederivation Подтвердите перерасчет ключа - + You are about to force rederive all of your keys. If you do not know what this means or what you are doing, this is a potentially destructive action. @@ -4735,37 +4766,37 @@ This will delete your autogenerated key files and re-run the key derivation modu Это удалит ваши автоматически сгенерированные файлы ключей и повторно запустит модуль расчета ключей. - + Missing fuses Отсутствуют предохранители - + - Missing BOOT0 - Отсутствует BOOT0 - + - Missing BCPKG2-1-Normal-Main - Отсутствует BCPKG2-1-Normal-Main - + - Missing PRODINFO - Отсутствует PRODINFO - + Derivation Components Missing Компоненты расчета отсутствуют - + Encryption keys are missing. <br>Please follow <a href='https://yuzu-emu.org/help/quickstart/'>the yuzu quickstart guide</a> to get all your keys, firmware and games.<br><br><small>(%1)</small> Ключи шифрования отсутствуют. <br>Пожалуйста, следуйте <a href='https://yuzu-emu.org/help/quickstart/'>краткому руководству пользователя yuzu</a>, чтобы получить все ваши ключи, прошивку и игры.<br><br><small>(%1)</small> - + Deriving keys... This may take up to a minute depending on your system's performance. @@ -4774,49 +4805,49 @@ on your system's performance. от производительности вашей системы. - + Deriving Keys Получение ключей - + System Archive Decryption Failed Не удалось расшифровать системный архив - + Encryption keys failed to decrypt firmware. <br>Please follow <a href='https://yuzu-emu.org/help/quickstart/'>the yuzu quickstart guide</a> to get all your keys, firmware and games. Ключи шифрования не смогли расшифровать прошивку. <br>Пожалуйста, следуйте <a href='https://yuzu-emu.org/help/quickstart/'>краткому руководству пользователя yuzu</a> чтобы получить все ваши ключи, прошивку и игры. - + Select RomFS Dump Target Выберите цель для дампа RomFS - + Please select which RomFS you would like to dump. Пожалуйста, выберите, какой RomFS вы хотите сдампить. - + Are you sure you want to close yuzu? Вы уверены, что хотите закрыть yuzu? - - - + + + yuzu yuzu - + Are you sure you want to stop the emulation? Any unsaved progress will be lost. Вы уверены, что хотите остановить эмуляцию? Любой несохраненный прогресс будет потерян. - + The currently running application has requested yuzu to not exit. Would you like to bypass this and exit anyway? @@ -4968,241 +4999,251 @@ Would you like to bypass this and exit anyway? GameList - + Favorite Избранное - + Start Game Запустить игру - + Start Game without Custom Configuration Запустить игру без пользовательской настройки - + Open Save Data Location Открыть папку для сохранений - + Open Mod Data Location Открыть папку для модов - + Open Transferable Pipeline Cache Открыть переносной кэш конвейера - + Remove Удалить - + Remove Installed Update Удалить установленное обновление - + Remove All Installed DLC Удалить все установленные DLC - + Remove Custom Configuration Удалить пользовательскую настройку - + + Remove Play Time Data + + + + Remove Cache Storage Удалить кэш-хранилище? - + Remove OpenGL Pipeline Cache Удалить кэш конвейера OpenGL - + Remove Vulkan Pipeline Cache Удалить кэш конвейера Vulkan - + Remove All Pipeline Caches Удалить весь кэш конвейеров - + Remove All Installed Contents Удалить все установленное содержимое - - + + Dump RomFS Дамп RomFS - + Dump RomFS to SDMC Сдампить RomFS в SDMC - + Verify Integrity - + Copy Title ID to Clipboard Скопировать ID приложения в буфер обмена - + Navigate to GameDB entry Перейти к странице GameDB - + Create Shortcut Создать ярлык - + Add to Desktop Добавить на Рабочий стол - + Add to Applications Menu Добавить в меню приложений - + Properties Свойства - + Scan Subfolders Сканировать подпапки - + Remove Game Directory Удалить папку с играми - + ▲ Move Up ▲ Переместить вверх - + ▼ Move Down ▼ Переместить вниз - + Open Directory Location Открыть расположение папки - + Clear Очистить - + Name Имя - + Compatibility Совместимость - + Add-ons Дополнения - + File type Тип файла - + Size Размер + + + Play time + + GameListItemCompat - + Ingame Запускается - + Game starts, but crashes or major glitches prevent it from being completed. Игра запускается, но вылеты или серьезные баги не позволяют ее завершить. - + Perfect Идеально - + Game can be played without issues. В игру можно играть без проблем. - + Playable Играбельно - + Game functions with minor graphical or audio glitches and is playable from start to finish. Игра работает с незначительными графическими и/или звуковыми ошибками и проходима от начала до конца. - + Intro/Menu Вступление/Меню - + Game loads, but is unable to progress past the Start Screen. Игра загружается, но не проходит дальше стартового экрана. - + Won't Boot Не запускается - + The game crashes when attempting to startup. Игра вылетает при запуске. - + Not Tested Не проверено - + The game has not yet been tested. Игру ещё не проверяли на совместимость. @@ -5210,7 +5251,7 @@ Would you like to bypass this and exit anyway? GameListPlaceholder - + Double-click to add a new folder to the game list Нажмите дважды, чтобы добавить новую папку в список игр @@ -5223,12 +5264,12 @@ Would you like to bypass this and exit anyway? %1 из %n результат(ов)%1 из %n результат(ов)%1 из %n результат(ов)%1 из %n результат(ов) - + Filter: Поиск: - + Enter pattern to filter Введите текст для поиска @@ -5346,6 +5387,7 @@ Debug Message: + Main Window Основное окно @@ -5451,6 +5493,11 @@ Debug Message: + Toggle Renderdoc Capture + + + + Toggle Status Bar Переключить панель состояния @@ -5689,186 +5736,216 @@ Debug Message: + &Amiibo + + + + &TAS [&T] TAS - + &Help [&H] Помощь - + &Install Files to NAND... [&I] Установить файлы в NAND... - + L&oad File... [&O] Загрузить файл... - + Load &Folder... [&F] Загрузить папку... - + E&xit [&X] Выход - + &Pause [&P] Пауза - + &Stop [&S] Стоп - + &Reinitialize keys... [&R] Переинициализировать ключи... - + &Verify Installed Contents - + &About yuzu [&A] О yuzu - + Single &Window Mode [&W] Режим одного окна - + Con&figure... [&F] Параметры... - + Display D&ock Widget Headers [&O] Отображать заголовки виджетов дока - + Show &Filter Bar [&F] Показать панель поиска - + Show &Status Bar [&S] Показать панель статуса - + Show Status Bar Показать панель статуса - + &Browse Public Game Lobby [&B] Просмотреть публичные игровые лобби - + &Create Room [&C] Создать комнату - + &Leave Room [&L] Покинуть комнату - + &Direct Connect to Room [&D] Прямое подключение к комнате - + &Show Current Room [&S] Показать текущую комнату - + F&ullscreen [&U] Полноэкранный - + &Restart [&R] Перезапустить - + Load/Remove &Amiibo... [&A] Загрузить/Удалить Amiibo... - + &Report Compatibility [&R] Сообщить о совместимости - + Open &Mods Page [&M] Открыть страницу модов - + Open &Quickstart Guide [&Q] Открыть руководство пользователя - + &FAQ [&F] ЧАВО - + Open &yuzu Folder [&Y] Открыть папку yuzu - + &Capture Screenshot [&C] Сделать скриншот - + + Open &Album + + + + + &Set Nickname and Owner + + + + + &Delete Game Data + + + + + &Restore Amiibo + + + + + &Format Amiibo + + + + Open &Mii Editor - + &Configure TAS... [&C] Настройка TAS... - + Configure C&urrent Game... [&U] Настроить текущую игру... - + &Start [&S] Запустить - + &Reset [&S] Сбросить - + R&ecord [&E] Запись @@ -6176,27 +6253,27 @@ p, li { white-space: pre-wrap; } Не играет в игру - + Installed SD Titles Установленные SD игры - + Installed NAND Titles Установленные NAND игры - + System Titles Системные игры - + Add New Game Directory Добавить новую папку с играми - + Favorites Избранные @@ -6722,7 +6799,7 @@ p, li { white-space: pre-wrap; } - + Pro Controller Контроллер Pro @@ -6735,7 +6812,7 @@ p, li { white-space: pre-wrap; } - + Dual Joycons Двойные Joy-Сon'ы @@ -6748,7 +6825,7 @@ p, li { white-space: pre-wrap; } - + Left Joycon Левый Joy-Сon @@ -6761,7 +6838,7 @@ p, li { white-space: pre-wrap; } - + Right Joycon Правый Joy-Сon @@ -6790,7 +6867,7 @@ p, li { white-space: pre-wrap; } - + Handheld Портативный @@ -6906,32 +6983,37 @@ p, li { white-space: pre-wrap; } 8 - + + Not enough controllers + + + + GameCube Controller Контроллер GameCube - + Poke Ball Plus Poke Ball Plus - + NES Controller Контроллер NES - + SNES Controller Контроллер SNES - + N64 Controller Контроллер N64 - + Sega Genesis Sega Genesis diff --git a/dist/languages/sv.ts b/dist/languages/sv.ts index 886b9de521..bda3c05f50 100644 --- a/dist/languages/sv.ts +++ b/dist/languages/sv.ts @@ -373,13 +373,13 @@ Detta kommer bannlysa både dennes användarnamn på forum samt IP-adress.% - + Auto (%1) Auto select time zone - + Default (%1) Default time zone @@ -879,49 +879,29 @@ avgjord kod.</div> - Create Minidump After Crash - - - - Enable this to output the latest generated audio command list to the console. Only affects games using the audio renderer. - + Dump Audio Commands To Console** - + Enable Verbose Reporting Services** - + **This will be reset automatically when yuzu closes. - - Restart Required - - - - - yuzu is required to restart in order to apply this setting. - - - - + Web applet not compiled - - - MiniDump creation not compiled - - ConfigureDebugController @@ -1340,7 +1320,7 @@ avgjord kod.</div> - + Conflicting Key Sequence Motstridig Tangentsekvens @@ -1361,27 +1341,37 @@ avgjord kod.</div> - + + Invalid hotkey settings + + + + + An error occurred. Please report this issue on github. + + + + Restore Default Återställ standard - + Clear Rensa - + Conflicting Button Sequence - + The default button sequence is already assigned to: %1 - + The default key sequence is already assigned to: %1 Standardtangentsekvensen är redan tilldelad: %1 @@ -3356,67 +3346,72 @@ Dra punkter för att ändra position, eller dubbelklicka tabellceller för att r - + + Show Play Time Column + + + + Game Icon Size: - + Folder Icon Size: - + Row 1 Text: Rad 1 Text: - + Row 2 Text: Rad 2 Text: - + Screenshots Skrämdump - + Ask Where To Save Screenshots (Windows Only) Fråga till var man ska spara skärmdumpar (endast Windows) - + Screenshots Path: Skärmdumpssökväg - + ... ... - + TextLabel - + Resolution: - + Select Screenshots Path... Välj Skärmdumpssökväg... - + <System> <System> - + Auto (%1 x %2, %3 x %4) Screenshot width value @@ -3734,960 +3729,996 @@ Dra punkter för att ändra position, eller dubbelklicka tabellceller för att r GMainWindow - + <a href='https://yuzu-emu.org/help/feature/telemetry/'>Anonymous data is collected</a> to help improve yuzu. <br/><br/>Would you like to share your usage data with us? <a href='https://yuzu-emu.org/help/feature/telemetry/'>Anonym data skickas </a>För att förbättra yuzu. <br/><br/>Vill du dela med dig av din användarstatistik med oss? - + Telemetry Telemetri - + Broken Vulkan Installation Detected Felaktig Vulkaninstallation Upptäckt - + Vulkan initialization failed during boot.<br><br>Click <a href='https://yuzu-emu.org/wiki/faq/#yuzu-starts-with-the-error-broken-vulkan-installation-detected'>here for instructions to fix the issue</a>. - + Running a game TRANSLATORS: This string is shown to the user to explain why yuzu needs to prevent the computer from sleeping - + Loading Web Applet... Laddar WebApplet... - - + + Disable Web Applet Avaktivera Webbappletten - + Disabling the web applet can lead to undefined behavior and should only be used with Super Mario 3D All-Stars. Are you sure you want to disable the web applet? (This can be re-enabled in the Debug settings.) - + The amount of shaders currently being built Mängden shaders som just nu byggs - + The current selected resolution scaling multiplier. - + Current emulation speed. Values higher or lower than 100% indicate emulation is running faster or slower than a Switch. Nuvarande emuleringshastighet. Värden över eller under 100% indikerar på att emulationen körs snabbare eller långsammare än en Switch. - + How many frames per second the game is currently displaying. This will vary from game to game and scene to scene. Hur många bilder per sekund som spelet just nu visar. Detta varierar från spel till spel och scen till scen. - + Time taken to emulate a Switch frame, not counting framelimiting or v-sync. For full-speed emulation this should be at most 16.67 ms. Tid det tar att emulera en Switch bild, utan att räkna med framelimiting eller v-sync. För emulering på full hastighet så ska det vara som mest 16.67 ms. - + Unmute - + Mute - + Reset Volume - + &Clear Recent Files - + Emulated mouse is enabled Emulerad datormus är aktiverad - + Real mouse input and mouse panning are incompatible. Please disable the emulated mouse in input advanced settings to allow mouse panning. - + &Continue - + &Pause &Paus - + Warning Outdated Game Format Varning Föråldrat Spelformat - + You are using the deconstructed ROM directory format for this game, which is an outdated format that has been superseded by others such as NCA, NAX, XCI, or NSP. Deconstructed ROM directories lack icons, metadata, and update support.<br><br>For an explanation of the various Switch formats yuzu supports, <a href='https://yuzu-emu.org/wiki/overview-of-switch-game-formats'>check out our wiki</a>. This message will not be shown again. Du använder det dekonstruerade ROM-formatet för det här spelet. Det är ett föråldrat format som har överträffats av andra som NCA, NAX, XCI eller NSP. Dekonstruerade ROM-kataloger saknar ikoner, metadata och uppdatering.<br><br>För en förklaring av de olika format som yuzu stöder, <a href='https://yuzu-emu.org/wiki/overview-of-switch-game-formats'>kolla in vår wiki</a>. Det här meddelandet visas inte igen. - + Error while loading ROM! Fel vid laddning av ROM! - + The ROM format is not supported. ROM-formatet stöds inte. - + An error occurred initializing the video core. Ett fel inträffade vid initiering av videokärnan. - + yuzu has encountered an error while running the video core. This is usually caused by outdated GPU drivers, including integrated ones. Please see the log for more details. For more information on accessing the log, please see the following page: <a href='https://yuzu-emu.org/help/reference/log-files/'>How to Upload the Log File</a>. - + Error while loading ROM! %1 %1 signifies a numeric error code. - + %1<br>Please follow <a href='https://yuzu-emu.org/help/quickstart/'>the yuzu quickstart guide</a> to redump your files.<br>You can refer to the yuzu wiki</a> or the yuzu Discord</a> for help. %1 signifies an error string. - + An unknown error occurred. Please see the log for more details. Ett okänt fel har uppstått. Se loggen för mer information. - + (64-bit) - + (32-bit) - + %1 %2 %1 is the title name. %2 indicates if the title is 64-bit or 32-bit - + Closing software... - + Save Data Spardata - + Mod Data Mod-data - + Error Opening %1 Folder Fel Öppnar %1 Mappen - - + + Folder does not exist! Mappen finns inte! - + Error Opening Transferable Shader Cache Fel Under Öppning Av Överförbar Shadercache - + Failed to create the shader cache directory for this title. - + Error Removing Contents - + Error Removing Update - + Error Removing DLC - + Remove Installed Game Contents? - + Remove Installed Game Update? - + Remove Installed Game DLC? - + Remove Entry Ta bort katalog - - - - - - + + + + + + Successfully Removed Framgångsrikt borttagen - + Successfully removed the installed base game. Tog bort det installerade basspelet framgångsrikt. - + The base game is not installed in the NAND and cannot be removed. Basspelet är inte installerat i NAND och kan inte tas bort. - + Successfully removed the installed update. Tog bort den installerade uppdateringen framgångsrikt. - + There is no update installed for this title. Det finns ingen uppdatering installerad för denna titel. - + There are no DLC installed for this title. Det finns inga DLC installerade för denna titel. - + Successfully removed %1 installed DLC. Tog framgångsrikt bort den %1 installerade DLCn. - + Delete OpenGL Transferable Shader Cache? - + Delete Vulkan Transferable Shader Cache? - + Delete All Transferable Shader Caches? - + Remove Custom Game Configuration? Ta Bort Anpassad Spelkonfiguration? - + Remove Cache Storage? - + Remove File Radera fil - - + + Remove Play Time Data + + + + + Reset play time? + + + + + Error Removing Transferable Shader Cache Fel När Överförbar Shader Cache Raderades - - + + A shader cache for this title does not exist. En shader cache för denna titel existerar inte. - + Successfully removed the transferable shader cache. Raderade den överförbara shadercachen framgångsrikt. - + Failed to remove the transferable shader cache. Misslyckades att ta bort den överförbara shadercache - + Error Removing Vulkan Driver Pipeline Cache - + Failed to remove the driver pipeline cache. - - + + Error Removing Transferable Shader Caches - + Successfully removed the transferable shader caches. - + Failed to remove the transferable shader cache directory. - - + + Error Removing Custom Configuration Fel När Anpassad Konfiguration Raderades - + A custom configuration for this title does not exist. En anpassad konfiguration för denna titel existerar inte. - + Successfully removed the custom game configuration. Tog bort den anpassade spelkonfigurationen framgångsrikt. - + Failed to remove the custom game configuration. Misslyckades att ta bort den anpassade spelkonfigurationen. - - + + RomFS Extraction Failed! RomFS Extraktion Misslyckades! - + There was an error copying the RomFS files or the user cancelled the operation. Det uppstod ett fel vid kopiering av RomFS filer eller användaren avbröt operationen. - + Full Full - + Skeleton Skelett - + Select RomFS Dump Mode Välj RomFS Dump-Läge - + Please select the how you would like the RomFS dumped.<br>Full will copy all of the files into the new directory while <br>skeleton will only create the directory structure. Välj hur du vill att RomFS ska dumpas. <br>Full kommer att kopiera alla filer i den nya katalogen medan <br>skelett bara skapar katalogstrukturen. - + There is not enough free space at %1 to extract the RomFS. Please free up space or select a different dump directory at Emulation > Configure > System > Filesystem > Dump Root - + Extracting RomFS... Extraherar RomFS... - - - - + + + + Cancel Avbryt - + RomFS Extraction Succeeded! RomFS Extraktion Lyckades! - - - + + + The operation completed successfully. Operationen var lyckad. - + Integrity verification couldn't be performed! - + File contents were not checked for validity. - - + + Integrity verification failed! - + File contents may be corrupt. - - + + Verifying integrity... - - + + Integrity verification succeeded! - - - - - + + + + Create Shortcut - + This will create a shortcut to the current AppImage. This may not work well if you update. Continue? - - Cannot create shortcut on desktop. Path "%1" does not exist. + + Cannot create shortcut. Path "%1" does not exist. - - Cannot create shortcut in applications menu. Path "%1" does not exist and cannot be created. - - - - + Create Icon - + Cannot create icon file. Path "%1" does not exist and cannot be created. - + Start %1 with the yuzu Emulator - + Failed to create a shortcut at %1 - + Successfully created a shortcut to %1 - + Error Opening %1 Fel under öppning av %1 - + Select Directory Välj Katalog - + Properties Egenskaper - + The game properties could not be loaded. Spelegenskaperna kunde inte laddas. - + Switch Executable (%1);;All Files (*.*) %1 is an identifier for the Switch executable file extensions. Switch Körbar (%1);;Alla Filer (*.*) - + Load File Ladda Fil - + Open Extracted ROM Directory Öppna Extraherad ROM-Katalog - + Invalid Directory Selected Ogiltig Katalog Vald - + The directory you have selected does not contain a 'main' file. Katalogen du har valt innehåller inte en 'main'-fil. - + Installable Switch File (*.nca *.nsp *.xci);;Nintendo Content Archive (*.nca);;Nintendo Submission Package (*.nsp);;NX Cartridge Image (*.xci) Installerbar Switch-fil (*.nca *.nsp *.xci);;Nintendo Content Archive (*.nca);;Nintendo Submission Package (*.nsp);;NX Cartridge Image (*.xci) - + Install Files Installera filer - + %n file(s) remaining - + Installing file "%1"... Installerar Fil "%1"... - - + + Install Results Installera resultat - + To avoid possible conflicts, we discourage users from installing base games to the NAND. Please, only use this feature to install updates and DLC. - + %n file(s) were newly installed - + %n file(s) were overwritten - + %n file(s) failed to install - + System Application Systemapplikation - + System Archive Systemarkiv - + System Application Update Systemapplikationsuppdatering - + Firmware Package (Type A) Firmwarepaket (Typ A) - + Firmware Package (Type B) Firmwarepaket (Typ B) - + Game Spel - + Game Update Speluppdatering - + Game DLC Spel DLC - + Delta Title Delta Titel - + Select NCA Install Type... Välj NCA-Installationsläge... - + Please select the type of title you would like to install this NCA as: (In most instances, the default 'Game' is fine.) Välj vilken typ av titel du vill installera som: (I de flesta fallen, standard 'Spel' är bra.) - + Failed to Install Misslyckades med Installationen - + The title type you selected for the NCA is invalid. Den titeltyp du valt för NCA är ogiltig. - + File not found Filen hittades inte - + File "%1" not found Filen "%1" hittades inte - + OK OK - - + + Hardware requirements not met Hårdvarukraven uppfylls ej - - + + Your system does not meet the recommended hardware requirements. Compatibility reporting has been disabled. - + Missing yuzu Account yuzu Konto hittades inte - + In order to submit a game compatibility test case, you must link your yuzu account.<br><br/>To link your yuzu account, go to Emulation &gt; Configuration &gt; Web. För att skicka ett spelkompatibilitetstest, du måste länka ditt yuzu-konto.<br><br/>För att länka ditt yuzu-konto, gå till Emulering &gt, Konfigurering &gt, Web. - + Error opening URL Fel när URL öppnades - + Unable to open the URL "%1". Oförmögen att öppna URL:en "%1". - + TAS Recording TAS Inspelning - + Overwrite file of player 1? Överskriv spelare 1:s fil? - + Invalid config detected Ogiltig konfiguration upptäckt - + Handheld controller can't be used on docked mode. Pro controller will be selected. - - + + Amiibo Amiibo - - + + The current amiibo has been removed Den aktuella amiibon har avlägsnats - + Error Fel - - + + The current game is not looking for amiibos Det aktuella spelet letar ej efter amiibos - + Amiibo File (%1);; All Files (*.*) Amiibo Fil (%1);; Alla Filer (*.*) - + Load Amiibo Ladda Amiibo - + Error loading Amiibo data Fel vid laddning av Amiibodata - + The selected file is not a valid amiibo Den valda filen är inte en giltig amiibo - + The selected file is already on use Den valda filen är redan använd - + An unknown error occurred Ett okänt fel har inträffat - + Verification failed for the following files: %1 - + + + No firmware available - + + Please install the firmware to use the Album applet. + + + + + Album Applet + + + + + Album applet is not available. Please reinstall firmware. + + + + + Please install the firmware to use the Cabinet applet. + + + + + Cabinet Applet + + + + + Cabinet applet is not available. Please reinstall firmware. + + + + Please install the firmware to use the Mii editor. - + Mii Edit Applet - + Mii editor is not available. Please reinstall firmware. - + Capture Screenshot Skärmdump - + PNG Image (*.png) PNG Bild (*.png) - + TAS state: Running %1/%2 TAStillstånd: pågående %1/%2 - + TAS state: Recording %1 TAStillstånd: spelar in %1 - + TAS state: Idle %1/%2 TAStillstånd: inaktiv %1/%2 - + TAS State: Invalid TAStillstånd: ogiltigt - + &Stop Running - + &Start &Start - + Stop R&ecording - + R&ecord - + Building: %n shader(s) - + Scale: %1x %1 is the resolution scaling factor - + Speed: %1% / %2% Hastighet: %1% / %2% - + Speed: %1% Hastighet: %1% - + Game: %1 FPS (Unlocked) - + Game: %1 FPS Spel: %1 FPS - + Frame: %1 ms Ruta: %1 ms - + %1 %2 - + FSR - + NO AA - + VOLUME: MUTE - + VOLUME: %1% Volume percentage (e.g. 50%) - + Confirm Key Rederivation Bekräfta Nyckel Rederivering - + You are about to force rederive all of your keys. If you do not know what this means or what you are doing, this is a potentially destructive action. @@ -4704,37 +4735,37 @@ och eventuellt göra säkerhetskopior. Detta raderar dina autogenererade nyckelfiler och kör nyckelderivationsmodulen. - + Missing fuses Saknade säkringar - + - Missing BOOT0 - Saknar BOOT0 - + - Missing BCPKG2-1-Normal-Main - Saknar BCPKG2-1-Normal-Main - + - Missing PRODINFO - Saknar PRODINFO - + Derivation Components Missing Deriveringsdelar saknas - + Encryption keys are missing. <br>Please follow <a href='https://yuzu-emu.org/help/quickstart/'>the yuzu quickstart guide</a> to get all your keys, firmware and games.<br><br><small>(%1)</small> - + Deriving keys... This may take up to a minute depending on your system's performance. @@ -4743,49 +4774,49 @@ Detta kan ta upp till en minut beroende på systemets prestanda. - + Deriving Keys Härleda Nycklar - + System Archive Decryption Failed - + Encryption keys failed to decrypt firmware. <br>Please follow <a href='https://yuzu-emu.org/help/quickstart/'>the yuzu quickstart guide</a> to get all your keys, firmware and games. - + Select RomFS Dump Target Välj RomFS Dumpa Mål - + Please select which RomFS you would like to dump. Välj vilken RomFS du vill dumpa. - + Are you sure you want to close yuzu? Är du säker på att du vill stänga yuzu? - - - + + + yuzu yuzu - + Are you sure you want to stop the emulation? Any unsaved progress will be lost. Är du säker på att du vill stoppa emuleringen? Du kommer att förlora osparade framsteg. - + The currently running application has requested yuzu to not exit. Would you like to bypass this and exit anyway? @@ -4937,241 +4968,251 @@ Vill du strunta i detta och avsluta ändå? GameList - + Favorite - + Start Game - + Start Game without Custom Configuration - + Open Save Data Location Öppna Spara Data Destination - + Open Mod Data Location Öppna Mod Data Destination - + Open Transferable Pipeline Cache - + Remove Ta Bort - + Remove Installed Update Ta Bort Installerad Uppdatering - + Remove All Installed DLC Ta Bort Alla Installerade DLC - + Remove Custom Configuration Ta Bort Anpassad Konfiguration - + + Remove Play Time Data + + + + Remove Cache Storage - + Remove OpenGL Pipeline Cache - + Remove Vulkan Pipeline Cache - + Remove All Pipeline Caches - + Remove All Installed Contents Ta Bort Allt Installerat Innehåll - - + + Dump RomFS Dumpa RomFS - + Dump RomFS to SDMC - + Verify Integrity - + Copy Title ID to Clipboard Kopiera Titel ID till Urklipp - + Navigate to GameDB entry Navigera till GameDB-sida - + Create Shortcut - + Add to Desktop - + Add to Applications Menu - + Properties Egenskaper - + Scan Subfolders Skanna Underkataloger - + Remove Game Directory Radera Spelkatalog - + ▲ Move Up ▲ Flytta upp - + ▼ Move Down ▼ Flytta ner - + Open Directory Location Öppna Sökvägsplats - + Clear Rensa - + Name Namn - + Compatibility Kompatibilitet - + Add-ons Add-Ons - + File type Filtyp - + Size Storlek + + + Play time + + GameListItemCompat - + Ingame - + Game starts, but crashes or major glitches prevent it from being completed. - + Perfect Perfekt - + Game can be played without issues. - + Playable - + Game functions with minor graphical or audio glitches and is playable from start to finish. - + Intro/Menu Intro/Meny - + Game loads, but is unable to progress past the Start Screen. - + Won't Boot Startar Inte - + The game crashes when attempting to startup. Spelet kraschar när man försöker starta det. - + Not Tested Inte Testad - + The game has not yet been tested. Spelet har ännu inte testats. @@ -5179,7 +5220,7 @@ Vill du strunta i detta och avsluta ändå? GameListPlaceholder - + Double-click to add a new folder to the game list Dubbelklicka för att lägga till en ny mapp i spellistan. @@ -5192,12 +5233,12 @@ Vill du strunta i detta och avsluta ändå? - + Filter: Filter: - + Enter pattern to filter Ange mönster för att filtrera @@ -5314,6 +5355,7 @@ Debug Message: + Main Window @@ -5419,6 +5461,11 @@ Debug Message: + Toggle Renderdoc Capture + + + + Toggle Status Bar @@ -5656,186 +5703,216 @@ Debug Message: + &Amiibo + + + + &TAS - + &Help &Hjälp - + &Install Files to NAND... - + L&oad File... - + Load &Folder... - + E&xit A&vsluta - + &Pause &Paus - + &Stop &Sluta - + &Reinitialize keys... - + &Verify Installed Contents - + &About yuzu - + Single &Window Mode - + Con&figure... - + Display D&ock Widget Headers - + Show &Filter Bar - + Show &Status Bar - + Show Status Bar Visa Statusfält - + &Browse Public Game Lobby - + &Create Room - + &Leave Room - + &Direct Connect to Room - + &Show Current Room - + F&ullscreen - + &Restart - + Load/Remove &Amiibo... - + &Report Compatibility - + Open &Mods Page - + Open &Quickstart Guide - + &FAQ - + Open &yuzu Folder - + &Capture Screenshot - - Open &Mii Editor - - - - - &Configure TAS... + + Open &Album + &Set Nickname and Owner + + + + + &Delete Game Data + + + + + &Restore Amiibo + + + + + &Format Amiibo + + + + + Open &Mii Editor + + + + + &Configure TAS... + + + + Configure C&urrent Game... - + &Start &Start - + &Reset - + R&ecord @@ -6135,27 +6212,27 @@ p, li { white-space: pre-wrap; } Spelar inte något spel - + Installed SD Titles Installerade SD-titlar - + Installed NAND Titles Installerade NAND-titlar - + System Titles Systemtitlar - + Add New Game Directory Lägg till ny spelkatalog - + Favorites Favoriter @@ -6681,7 +6758,7 @@ p, li { white-space: pre-wrap; } - + Pro Controller Prokontroller @@ -6694,7 +6771,7 @@ p, li { white-space: pre-wrap; } - + Dual Joycons Dubbla Joycons @@ -6707,7 +6784,7 @@ p, li { white-space: pre-wrap; } - + Left Joycon Vänster Joycon @@ -6720,7 +6797,7 @@ p, li { white-space: pre-wrap; } - + Right Joycon Höger Joycon @@ -6749,7 +6826,7 @@ p, li { white-space: pre-wrap; } - + Handheld Handhållen @@ -6865,32 +6942,37 @@ p, li { white-space: pre-wrap; } 8 - + + Not enough controllers + + + + GameCube Controller GameCube-kontroll - + Poke Ball Plus Poke Ball Plus - + NES Controller NES-kontroll - + SNES Controller SNES-kontroll - + N64 Controller N64-kontroll - + Sega Genesis Sega Genesis diff --git a/dist/languages/tr_TR.ts b/dist/languages/tr_TR.ts index 855540d30c..4c7a850564 100644 --- a/dist/languages/tr_TR.ts +++ b/dist/languages/tr_TR.ts @@ -373,13 +373,13 @@ Bu işlem onların hem forum kullanıcı adını hem de IP adresini banlar.% - + Auto (%1) Auto select time zone - + Default (%1) Default time zone @@ -891,49 +891,29 @@ Bu işlem onların hem forum kullanıcı adını hem de IP adresini banlar. - Create Minidump After Crash - Çöküş Sonrası Küçük Dump Oluştur - - - Enable this to output the latest generated audio command list to the console. Only affects games using the audio renderer. Bu seçenek açıksa son oluşturulan ses komutları konsolda gösterilir. Sadece ses işleyicisi kullanan oyunları etkiler. - + Dump Audio Commands To Console** Konsola Ses Komutlarını Aktar** - + Enable Verbose Reporting Services** Detaylı Raporlama Hizmetini Etkinleştir - + **This will be reset automatically when yuzu closes. **Bu yuzu kapandığında otomatik olarak eski haline dönecektir. - - Restart Required - Yeniden Başlatma Gerekli - - - - yuzu is required to restart in order to apply this setting. - yuzu'nun bu ayarı uygulayabilmesi için yeniden başlatılması gereklidir. - - - + Web applet not compiled Web uygulaması derlenmemiş - - - MiniDump creation not compiled - Küçük Dump oluşumu derlenmemiş - ConfigureDebugController @@ -1352,7 +1332,7 @@ Bu işlem onların hem forum kullanıcı adını hem de IP adresini banlar. - + Conflicting Key Sequence Tutarsız Anahtar Dizisi @@ -1373,27 +1353,37 @@ Bu işlem onların hem forum kullanıcı adını hem de IP adresini banlar.Geçersiz - + + Invalid hotkey settings + + + + + An error occurred. Please report this issue on github. + + + + Restore Default Varsayılana Döndür - + Clear Temizle - + Conflicting Button Sequence Tutarsız Tuş Dizisi - + The default button sequence is already assigned to: %1 Varsayılan buton dizisi zaten %1'e atanmış. - + The default key sequence is already assigned to: %1 Varsayılan anahtar dizisi zaten %1'e atanmış. @@ -3370,67 +3360,72 @@ Noktanın konumunu değiştirmek için sürükleyin ya da sayıların üstüne Dosya Türü Sütununu Göster - + + Show Play Time Column + + + + Game Icon Size: Oyun Simge Boyutu: - + Folder Icon Size: Dosya Simge Boyutu: - + Row 1 Text: 1. Sıra Yazısı: - + Row 2 Text: 2. Sıra Yazısı: - + Screenshots Ekran Görüntüleri - + Ask Where To Save Screenshots (Windows Only) Ekran Görüntülerinin Nereye Kaydedileceğini Belirle (Windows'a Özel) - + Screenshots Path: Ekran Görüntülerinin Konumu: - + ... ... - + TextLabel - + Resolution: Çözünürlük: - + Select Screenshots Path... Ekran Görüntülerinin Konumunu Seçin... - + <System> <System> - + Auto (%1 x %2, %3 x %4) Screenshot width value @@ -3748,612 +3743,616 @@ Noktanın konumunu değiştirmek için sürükleyin ya da sayıların üstüne GMainWindow - + <a href='https://yuzu-emu.org/help/feature/telemetry/'>Anonymous data is collected</a> to help improve yuzu. <br/><br/>Would you like to share your usage data with us? <a href='https://yuzu-emu.org/help/feature/telemetry/'>Yuzuyu geliştirmeye yardımcı olmak için </a> anonim veri toplandı. <br/><br/>Kullanım verinizi bizimle paylaşmak ister misiniz? - + Telemetry Telemetri - + Broken Vulkan Installation Detected Bozuk Vulkan Kurulumu Algılandı - + Vulkan initialization failed during boot.<br><br>Click <a href='https://yuzu-emu.org/wiki/faq/#yuzu-starts-with-the-error-broken-vulkan-installation-detected'>here for instructions to fix the issue</a>. Açılışta Vulkan başlatılırken hata. Hata yardımını görüntülemek için <a href='https://yuzu-emu.org/wiki/faq/#yuzu-starts-with-the-error-broken-vulkan-installation-detected'>buraya tıklayın</a>. - + Running a game TRANSLATORS: This string is shown to the user to explain why yuzu needs to prevent the computer from sleeping - + Loading Web Applet... Web Uygulaması Yükleniyor... - - + + Disable Web Applet Web Uygulamasını Devre Dışı Bırak - + Disabling the web applet can lead to undefined behavior and should only be used with Super Mario 3D All-Stars. Are you sure you want to disable the web applet? (This can be re-enabled in the Debug settings.) Web uygulamasını kapatmak bilinmeyen hatalara neden olabileceğinden dolayı sadece Super Mario 3D All-Stars için kapatılması önerilir. Web uygulamasını kapatmak istediğinize emin misiniz? (Hata ayıklama ayarlarından tekrar açılabilir) - + The amount of shaders currently being built Şu anda derlenen shader miktarı - + The current selected resolution scaling multiplier. Geçerli seçili çözünürlük ölçekleme çarpanı. - + Current emulation speed. Values higher or lower than 100% indicate emulation is running faster or slower than a Switch. Geçerli emülasyon hızı. %100'den yüksek veya düşük değerler emülasyonun bir Switch'den daha hızlı veya daha yavaş çalıştığını gösterir. - + How many frames per second the game is currently displaying. This will vary from game to game and scene to scene. Oyunun şuanda saniye başına kaç kare gösterdiği. Bu oyundan oyuna ve sahneden sahneye değişiklik gösterir. - + Time taken to emulate a Switch frame, not counting framelimiting or v-sync. For full-speed emulation this should be at most 16.67 ms. Bir Switch karesini emüle etmekte geçen zaman, karelimitleme ve v-sync hariç. Tam hız emülasyon için bu en çok 16,67 ms olmalı. - + Unmute - + Mute - + Reset Volume - + &Clear Recent Files &Son Dosyaları Temizle - + Emulated mouse is enabled - + Real mouse input and mouse panning are incompatible. Please disable the emulated mouse in input advanced settings to allow mouse panning. - + &Continue &Devam Et - + &Pause &Duraklat - + Warning Outdated Game Format Uyarı, Eski Oyun Formatı - + You are using the deconstructed ROM directory format for this game, which is an outdated format that has been superseded by others such as NCA, NAX, XCI, or NSP. Deconstructed ROM directories lack icons, metadata, and update support.<br><br>For an explanation of the various Switch formats yuzu supports, <a href='https://yuzu-emu.org/wiki/overview-of-switch-game-formats'>check out our wiki</a>. This message will not be shown again. Bu oyun için dekonstrükte ROM formatı kullanıyorsunuz, bu fromatın yerine NCA, NAX, XCI ve NSP formatları kullanılmaktadır. Dekonstrükte ROM formatları ikon, üst veri ve güncelleme desteği içermemektedir.<br><br>Yuzu'nun desteklediği çeşitli Switch formatları için<a href='https://yuzu-emu.org/wiki/overview-of-switch-game-formats'>Wiki'yi ziyaret edin</a>. Bu mesaj yeniden gösterilmeyecektir. - + Error while loading ROM! ROM yüklenirken hata oluştu! - + The ROM format is not supported. Bu ROM biçimi desteklenmiyor. - + An error occurred initializing the video core. Video çekirdeğini başlatılırken bir hata oluştu. - + yuzu has encountered an error while running the video core. This is usually caused by outdated GPU drivers, including integrated ones. Please see the log for more details. For more information on accessing the log, please see the following page: <a href='https://yuzu-emu.org/help/reference/log-files/'>How to Upload the Log File</a>. yuzu video çekirdeğini çalıştırırken bir hatayla karşılaştı. Bu sorun genellikle eski GPU sürücüleri sebebiyle ortaya çıkar. Daha fazla detay için lütfen log dosyasına bakın. Log dosyasını incelemeye dair daha fazla bilgi için lütfen bu sayfaya ulaşın: <a href='https://yuzu-emu.org/help/reference/log-files/'>Log dosyası nasıl yüklenir</a>. - + Error while loading ROM! %1 %1 signifies a numeric error code. ROM yüklenirken hata oluştu! %1 - + %1<br>Please follow <a href='https://yuzu-emu.org/help/quickstart/'>the yuzu quickstart guide</a> to redump your files.<br>You can refer to the yuzu wiki</a> or the yuzu Discord</a> for help. %1 signifies an error string. %1<br>Lütfen dosyalarınızı yeniden dump etmek için<a href='https://yuzu-emu.org/help/quickstart/'>yuzu hızlı başlangıç kılavuzu'nu</a> takip edin.<br> Yardım için yuzu wiki</a>veya yuzu Discord'una</a> bakabilirsiniz. - + An unknown error occurred. Please see the log for more details. Bilinmeyen bir hata oluştu. Lütfen daha fazla detay için kütüğe göz atınız. - + (64-bit) (64-bit) - + (32-bit) (32-bit) - + %1 %2 %1 is the title name. %2 indicates if the title is 64-bit or 32-bit %1 %2 - + Closing software... Yazılım kapatılıyor... - + Save Data Kayıt Verisi - + Mod Data Mod Verisi - + Error Opening %1 Folder %1 klasörü açılırken hata - - + + Folder does not exist! Klasör mevcut değil! - + Error Opening Transferable Shader Cache Transfer Edilebilir Shader Cache'ini Açarken Bir Hata Oluştu - + Failed to create the shader cache directory for this title. Bu oyun için shader cache konumu oluşturulamadı. - + Error Removing Contents İçerik Kaldırma Hatası - + Error Removing Update Güncelleme Kaldırma hatası - + Error Removing DLC DLC Kaldırma Hatası - + Remove Installed Game Contents? Yüklenmiş Oyun İçeriğini Kaldırmak İstediğinize Emin Misiniz? - + Remove Installed Game Update? Yüklenmiş Oyun Güncellemesini Kaldırmak İstediğinize Emin Misiniz? - + Remove Installed Game DLC? Yüklenmiş DLC'yi Kaldırmak İstediğinize Emin Misiniz? - + Remove Entry Girdiyi Kaldır - - - - - - + + + + + + Successfully Removed Başarıyla Kaldırıldı - + Successfully removed the installed base game. Yüklenmiş oyun başarıyla kaldırıldı. - + The base game is not installed in the NAND and cannot be removed. Asıl oyun NAND'de kurulu değil ve kaldırılamaz. - + Successfully removed the installed update. Yüklenmiş güncelleme başarıyla kaldırıldı. - + There is no update installed for this title. Bu oyun için yüklenmiş bir güncelleme yok. - + There are no DLC installed for this title. Bu oyun için yüklenmiş bir DLC yok. - + Successfully removed %1 installed DLC. %1 yüklenmiş DLC başarıyla kaldırıldı. - + Delete OpenGL Transferable Shader Cache? OpenGL Transfer Edilebilir Shader Cache'ini Kaldırmak İstediğinize Emin Misiniz? - + Delete Vulkan Transferable Shader Cache? Vulkan Transfer Edilebilir Shader Cache'ini Kaldırmak İstediğinize Emin Misiniz? - + Delete All Transferable Shader Caches? Tüm Transfer Edilebilir Shader Cache'leri Kaldırmak İstediğinize Emin Misiniz? - + Remove Custom Game Configuration? Oyuna Özel Yapılandırmayı Kaldırmak İstediğinize Emin Misiniz? - + Remove Cache Storage? - + Remove File Dosyayı Sil - - + + Remove Play Time Data + + + + + Reset play time? + + + + + Error Removing Transferable Shader Cache Transfer Edilebilir Shader Cache Kaldırılırken Bir Hata Oluştu - - + + A shader cache for this title does not exist. Bu oyun için oluşturulmuş bir shader cache yok. - + Successfully removed the transferable shader cache. Transfer edilebilir shader cache başarıyla kaldırıldı. - + Failed to remove the transferable shader cache. Transfer edilebilir shader cache kaldırılamadı. - + Error Removing Vulkan Driver Pipeline Cache Vulkan Pipeline Önbelleği Kaldırılırken Hata - + Failed to remove the driver pipeline cache. Sürücü pipeline önbelleği kaldırılamadı. - - + + Error Removing Transferable Shader Caches Transfer Edilebilir Shader Cache'ler Kaldırılırken Bir Hata Oluştu - + Successfully removed the transferable shader caches. Transfer edilebilir shader cacheler başarıyla kaldırıldı. - + Failed to remove the transferable shader cache directory. Transfer edilebilir shader cache konumu kaldırılamadı. - - + + Error Removing Custom Configuration Oyuna Özel Yapılandırma Kaldırılırken Bir Hata Oluştu. - + A custom configuration for this title does not exist. Bu oyun için bir özel yapılandırma yok. - + Successfully removed the custom game configuration. Oyuna özel yapılandırma başarıyla kaldırıldı. - + Failed to remove the custom game configuration. Oyuna özel yapılandırma kaldırılamadı. - - + + RomFS Extraction Failed! RomFS Çıkartımı Başarısız! - + There was an error copying the RomFS files or the user cancelled the operation. RomFS dosyaları kopyalanırken bir hata oluştu veya kullanıcı işlemi iptal etti. - + Full Full - + Skeleton Çerçeve - + Select RomFS Dump Mode RomFS Dump Modunu Seçiniz - + Please select the how you would like the RomFS dumped.<br>Full will copy all of the files into the new directory while <br>skeleton will only create the directory structure. Lütfen RomFS'in nasıl dump edilmesini istediğinizi seçin.<br>"Full" tüm dosyaları yeni bir klasöre kopyalarken <br>"skeleton" sadece klasör yapısını oluşturur. - + There is not enough free space at %1 to extract the RomFS. Please free up space or select a different dump directory at Emulation > Configure > System > Filesystem > Dump Root %1 konumunda RomFS çıkarmaya yetecek alan yok. Lütfen yer açın ya da Emülasyon > Yapılandırma > Sistem > Dosya Sistemi > Dump konumu kısmından farklı bir çıktı konumu belirleyin. - + Extracting RomFS... RomFS çıkartılıyor... - - - - + + + + Cancel İptal - + RomFS Extraction Succeeded! RomFS Çıkartımı Başarılı! - - - + + + The operation completed successfully. İşlem başarıyla tamamlandı. - + Integrity verification couldn't be performed! - + File contents were not checked for validity. - - + + Integrity verification failed! - + File contents may be corrupt. - - + + Verifying integrity... - - + + Integrity verification succeeded! - - - - - + + + + Create Shortcut Kısayol Oluştur - + This will create a shortcut to the current AppImage. This may not work well if you update. Continue? Bu seçenek, şu anki AppImage dosyasının kısayolunu oluşturacak. Uygulama güncellenirse kısayol çalışmayabilir. Devam edilsin mi? - - Cannot create shortcut on desktop. Path "%1" does not exist. - Masaüstünde kısayol oluşturulamadı. "%1" dizini yok. + + Cannot create shortcut. Path "%1" does not exist. + - - Cannot create shortcut in applications menu. Path "%1" does not exist and cannot be created. - Uygulamalar menüsünde kısayol oluşturulamadı. "%1" dizini yok ve oluşturulamıyor. - - - + Create Icon Simge Oluştur - + Cannot create icon file. Path "%1" does not exist and cannot be created. Simge dosyası oluşturulamadı. "%1" dizini yok ve oluşturulamıyor. - + Start %1 with the yuzu Emulator yuzu Emülatörü başlatılırken %1 başlatılsın - + Failed to create a shortcut at %1 %1 dizininde kısayol oluşturulamadı - + Successfully created a shortcut to %1 %1 dizinine kısayol oluşturuldu - + Error Opening %1 %1 Açılırken Bir Hata Oluştu - + Select Directory Klasör Seç - + Properties Özellikler - + The game properties could not be loaded. Oyun özellikleri yüklenemedi. - + Switch Executable (%1);;All Files (*.*) %1 is an identifier for the Switch executable file extensions. Switch Çalıştırılabilir Dosyası (%1);;Tüm Dosyalar (*.*) - + Load File Dosya Aç - + Open Extracted ROM Directory Çıkartılmış ROM klasörünü aç - + Invalid Directory Selected Geçersiz Klasör Seçildi - + The directory you have selected does not contain a 'main' file. Seçtiğiniz klasör bir "main" dosyası içermiyor. - + Installable Switch File (*.nca *.nsp *.xci);;Nintendo Content Archive (*.nca);;Nintendo Submission Package (*.nsp);;NX Cartridge Image (*.xci) Yüklenilebilir Switch Dosyası (*.nca *.nsp *.xci);;Nintendo Content Archive (*.nca);;Nintendo Submissions Package (*.nsp);;NX Cartridge Image (*.xci) - + Install Files Dosya Kur - + %n file(s) remaining %n dosya kaldı%n dosya kaldı - + Installing file "%1"... "%1" dosyası kuruluyor... - - + + Install Results Kurulum Sonuçları - + To avoid possible conflicts, we discourage users from installing base games to the NAND. Please, only use this feature to install updates and DLC. Olası çakışmaları önlemek için oyunları NAND'e yüklememenizi tavsiye ediyoruz. Lütfen bu özelliği sadece güncelleme ve DLC yüklemek için kullanın. - + %n file(s) were newly installed %n dosya güncel olarak yüklendi @@ -4361,7 +4360,7 @@ Lütfen bu özelliği sadece güncelleme ve DLC yüklemek için kullanın. - + %n file(s) were overwritten %n dosyanın üstüne yazıldı @@ -4369,7 +4368,7 @@ Lütfen bu özelliği sadece güncelleme ve DLC yüklemek için kullanın. - + %n file(s) failed to install %n dosya yüklenemedi @@ -4377,339 +4376,371 @@ Lütfen bu özelliği sadece güncelleme ve DLC yüklemek için kullanın. - + System Application Sistem Uygulaması - + System Archive Sistem Arşivi - + System Application Update Sistem Uygulama Güncellemesi - + Firmware Package (Type A) Yazılım Paketi (Tür A) - + Firmware Package (Type B) Yazılım Paketi (Tür B) - + Game Oyun - + Game Update Oyun Güncellemesi - + Game DLC Oyun DLC'si - + Delta Title Delta Başlık - + Select NCA Install Type... NCA Kurulum Tipi Seçin... - + Please select the type of title you would like to install this NCA as: (In most instances, the default 'Game' is fine.) Lütfen bu NCA dosyası için belirlemek istediğiniz başlık türünü seçiniz: (Çoğu durumda, varsayılan olan 'Oyun' kullanılabilir.) - + Failed to Install Kurulum Başarısız Oldu - + The title type you selected for the NCA is invalid. NCA için seçtiğiniz başlık türü geçersiz - + File not found Dosya Bulunamadı - + File "%1" not found Dosya "%1" Bulunamadı - + OK Tamam - - + + Hardware requirements not met Donanım gereksinimleri karşılanmıyor - - + + Your system does not meet the recommended hardware requirements. Compatibility reporting has been disabled. Sisteminiz, önerilen donanım gereksinimlerini karşılamıyor. Uyumluluk raporlayıcı kapatıldı. - + Missing yuzu Account Kayıp yuzu Hesabı - + In order to submit a game compatibility test case, you must link your yuzu account.<br><br/>To link your yuzu account, go to Emulation &gt; Configuration &gt; Web. Oyun uyumluluk test çalışması göndermek için öncelikle yuzu hesabınla giriş yapmanız gerekiyor.<br><br/>Yuzu hesabınızla giriş yapmak için, Emülasyon &gt; Yapılandırma &gt; Web'e gidiniz. - + Error opening URL URL açılırken bir hata oluştu - + Unable to open the URL "%1". URL "%1" açılamıyor. - + TAS Recording TAS kayıtta - + Overwrite file of player 1? Oyuncu 1'in dosyasının üstüne yazılsın mı? - + Invalid config detected Geçersiz yapılandırma tespit edildi - + Handheld controller can't be used on docked mode. Pro controller will be selected. Handheld kontrolcü dock modunda kullanılamaz. Pro kontrolcü seçilecek. - - + + Amiibo Amiibo - - + + The current amiibo has been removed Amiibo kaldırıldı - + Error Hata - - + + The current game is not looking for amiibos Aktif oyun amiibo beklemiyor - + Amiibo File (%1);; All Files (*.*) Amiibo Dosyası (%1);; Tüm Dosyalar (*.*) - + Load Amiibo Amiibo Yükle - + Error loading Amiibo data Amiibo verisi yüklenirken hata - + The selected file is not a valid amiibo Seçtiğiniz dosya geçerli bir amiibo değil - + The selected file is already on use Seçtiğiniz dosya hali hazırda kullanılıyor - + An unknown error occurred Bilinmeyen bir hata oluştu - + Verification failed for the following files: %1 - + + + No firmware available - + + Please install the firmware to use the Album applet. + + + + + Album Applet + + + + + Album applet is not available. Please reinstall firmware. + + + + + Please install the firmware to use the Cabinet applet. + + + + + Cabinet Applet + + + + + Cabinet applet is not available. Please reinstall firmware. + + + + Please install the firmware to use the Mii editor. - + Mii Edit Applet - + Mii editor is not available. Please reinstall firmware. - + Capture Screenshot Ekran Görüntüsü Al - + PNG Image (*.png) PNG görüntüsü (*.png) - + TAS state: Running %1/%2 TAS durumu: %1%2 çalışıyor - + TAS state: Recording %1 TAS durumu: %1 kaydediliyor - + TAS state: Idle %1/%2 TAS durumu: %1%2 boşta - + TAS State: Invalid TAS durumu: Geçersiz - + &Stop Running &Çalıştırmayı durdur - + &Start &Başlat - + Stop R&ecording K&aydetmeyi Durdur - + R&ecord K&aydet - + Building: %n shader(s) Oluşturuluyor: %n shaderOluşturuluyor: %n shader - + Scale: %1x %1 is the resolution scaling factor Ölçek: %1x - + Speed: %1% / %2% Hız %1% / %2% - + Speed: %1% Hız: %1% - + Game: %1 FPS (Unlocked) Oyun: %1 FPS (Sınırsız) - + Game: %1 FPS Oyun: %1 FPS - + Frame: %1 ms Kare: %1 ms - + %1 %2 %1 %2 - + FSR FSR - + NO AA AA YOK - + VOLUME: MUTE SES: KAPALI - + VOLUME: %1% Volume percentage (e.g. 50%) SES: %%1 - + Confirm Key Rederivation Anahtar Yeniden Türetimini Onayla - + You are about to force rederive all of your keys. If you do not know what this means or what you are doing, this is a potentially destructive action. @@ -4726,37 +4757,37 @@ ve opsiyonel olarak yedekler alın. Bu sizin otomatik oluşturulmuş anahtar dosyalarınızı silecek ve anahtar türetme modülünü tekrar çalıştıracak. - + Missing fuses Anahtarlar Kayıp - + - Missing BOOT0 - BOOT0 Kayıp - + - Missing BCPKG2-1-Normal-Main - BCPKG2-1-Normal-Main Kayıp - + - Missing PRODINFO - PRODINFO Kayıp - + Derivation Components Missing Türeten Bileşenleri Kayıp - + Encryption keys are missing. <br>Please follow <a href='https://yuzu-emu.org/help/quickstart/'>the yuzu quickstart guide</a> to get all your keys, firmware and games.<br><br><small>(%1)</small> Şifreleme anahtarları eksik. <br>Lütfen takip edin<a href='https://yuzu-emu.org/help/quickstart/'>yuzu hızlı başlangıç kılavuzunu</a>tüm anahtarlarınızı, aygıt yazılımınızı ve oyunlarınızı almada.<br><br><small>(%1)</small> - + Deriving keys... This may take up to a minute depending on your system's performance. @@ -4765,49 +4796,49 @@ Bu sistem performansınıza bağlı olarak bir dakika kadar zaman alabilir. - + Deriving Keys Anahtarlar Türetiliyor - + System Archive Decryption Failed - + Encryption keys failed to decrypt firmware. <br>Please follow <a href='https://yuzu-emu.org/help/quickstart/'>the yuzu quickstart guide</a> to get all your keys, firmware and games. - + Select RomFS Dump Target RomFS Dump Hedefini Seçiniz - + Please select which RomFS you would like to dump. Lütfen dump etmek istediğiniz RomFS'i seçiniz. - + Are you sure you want to close yuzu? yuzu'yu kapatmak istediğinizden emin misiniz? - - - + + + yuzu yuzu - + Are you sure you want to stop the emulation? Any unsaved progress will be lost. Emülasyonu durdurmak istediğinizden emin misiniz? Kaydedilmemiş veriler kaybolur. - + The currently running application has requested yuzu to not exit. Would you like to bypass this and exit anyway? @@ -4959,241 +4990,251 @@ Görmezden gelip kapatmak ister misiniz? GameList - + Favorite Favori - + Start Game Oyunu Başlat - + Start Game without Custom Configuration Oyunu Özel Yapılandırma Olmadan Başlat - + Open Save Data Location Kayıt Dosyası Konumunu Aç - + Open Mod Data Location Mod Dosyası Konumunu Aç - + Open Transferable Pipeline Cache Transfer Edilebilir Pipeline Cache'ini Aç - + Remove Kaldır - + Remove Installed Update Yüklenmiş Güncellemeleri Kaldır - + Remove All Installed DLC Yüklenmiş DLC'leri Kaldır - + Remove Custom Configuration Oyuna Özel Yapılandırmayı Kaldır - + + Remove Play Time Data + + + + Remove Cache Storage - + Remove OpenGL Pipeline Cache OpenGL Pipeline Cache'ini Kaldır - + Remove Vulkan Pipeline Cache Vulkan Pipeline Cache'ini Kaldır - + Remove All Pipeline Caches Bütün Pipeline Cache'lerini Kaldır - + Remove All Installed Contents Tüm Yüklenmiş İçeriği Kaldır - - + + Dump RomFS RomFS Dump Et - + Dump RomFS to SDMC RomFS'i SDMC'ye çıkar. - + Verify Integrity - + Copy Title ID to Clipboard Title ID'yi Panoya Kopyala - + Navigate to GameDB entry GameDB sayfasına yönlendir - + Create Shortcut Kısayol Oluştur - + Add to Desktop Masaüstüne Ekle - + Add to Applications Menu Uygulamalar Menüsüne Ekl - + Properties Özellikler - + Scan Subfolders Alt Klasörleri Tara - + Remove Game Directory Oyun Konumunu Kaldır - + ▲ Move Up ▲Yukarı Git - + ▼ Move Down ▼Aşağı Git - + Open Directory Location Oyun Dosyası Konumunu Aç - + Clear Temizle - + Name İsim - + Compatibility Uyumluluk - + Add-ons Eklentiler - + File type Dosya türü - + Size Boyut + + + Play time + + GameListItemCompat - + Ingame Oyunda - + Game starts, but crashes or major glitches prevent it from being completed. Oyun başlatılabiliyor, fakat bariz hatalardan veya çökme sorunlarından dolayı bitirilemiyor. - + Perfect Mükemmel - + Game can be played without issues. Oyun sorunsuz bir şekilde oynanabiliyor. - + Playable Oynanabilir - + Game functions with minor graphical or audio glitches and is playable from start to finish. Oyun küçük grafik veya ses hatalarıyla çalışıyor ve baştan sona kadar oynanabilir. - + Intro/Menu İntro/Menü - + Game loads, but is unable to progress past the Start Screen. Oyun açılıyor, fakat ana menüden ileri gidilemiyor. - + Won't Boot Açılmıyor - + The game crashes when attempting to startup. Oyun açılmaya çalışıldığında çöküyor. - + Not Tested Test Edilmedi - + The game has not yet been tested. Bu oyun henüz test edilmedi. @@ -5201,7 +5242,7 @@ Görmezden gelip kapatmak ister misiniz? GameListPlaceholder - + Double-click to add a new folder to the game list Oyun listesine yeni bir klasör eklemek için çift tıklayın. @@ -5214,12 +5255,12 @@ Görmezden gelip kapatmak ister misiniz? %n sonucun %1'i%n sonucun %1'i - + Filter: Filtre: - + Enter pattern to filter Filtrelemek için bir düzen giriniz @@ -5336,6 +5377,7 @@ Debug Message: + Main Window Ana Pencere @@ -5441,6 +5483,11 @@ Debug Message: + Toggle Renderdoc Capture + + + + Toggle Status Bar Durum Çubuğunu Aç/Kapa @@ -5679,186 +5726,216 @@ Debug Message: + &Amiibo + + + + &TAS &TAS - + &Help &Yardım - + &Install Files to NAND... &NAND'e Dosya Kur... - + L&oad File... &Dosyayı Yükle... - + Load &Folder... &Klasörü Yükle... - + E&xit &Çıkış - + &Pause &Duraklat - + &Stop Du&rdur - + &Reinitialize keys... &Anahtarları Yeniden Kur... - + &Verify Installed Contents - + &About yuzu &Yuzu Hakkında - + Single &Window Mode &Tek Pencere Modu - + Con&figure... &Yapılandır... - + Display D&ock Widget Headers D&ock Widget Başlıkları'nı Göster - + Show &Filter Bar &Filtre Çubuğu'nu Göster - + Show &Status Bar &Durum Çubuğu'nu Göster - + Show Status Bar Durum Çubuğunu Göster - + &Browse Public Game Lobby &Herkese Açık Oyun Lobilerine Göz At - + &Create Room &Oda Oluştur - + &Leave Room &Odadan Ayrıl - + &Direct Connect to Room &Odaya Direkt Bağlan - + &Show Current Room &Şu Anki Odayı Göster - + F&ullscreen &Tam Ekran - + &Restart &Yeniden Başlat - + Load/Remove &Amiibo... &Amiibo Yükle/Kaldır - + &Report Compatibility &Uyumluluk Bildir - + Open &Mods Page &Mod Sayfasını Aç - + Open &Quickstart Guide &Hızlı Başlangıç Kılavuzunu Aç - + &FAQ &SSS - + Open &yuzu Folder &yuzu Klasörünü Aç - + &Capture Screenshot &Ekran Görüntüsü Al - + + Open &Album + + + + + &Set Nickname and Owner + + + + + &Delete Game Data + + + + + &Restore Amiibo + + + + + &Format Amiibo + + + + Open &Mii Editor - + &Configure TAS... &TAS'i Ayarla... - + Configure C&urrent Game... &Geçerli Oyunu Yapılandır... - + &Start B&aşlat - + &Reset &Sıfırla - + R&ecord K&aydet @@ -6166,27 +6243,27 @@ p, li { white-space: pre-wrap; } Şu anda oyun oynamıyor - + Installed SD Titles Yüklenmiş SD Oyunları - + Installed NAND Titles Yüklenmiş NAND Oyunları - + System Titles Sistemde Yüklü Oyunlar - + Add New Game Directory Yeni Oyun Konumu Ekle - + Favorites Favoriler @@ -6712,7 +6789,7 @@ p, li { white-space: pre-wrap; } - + Pro Controller Pro Controller @@ -6725,7 +6802,7 @@ p, li { white-space: pre-wrap; } - + Dual Joycons İkili Joyconlar @@ -6738,7 +6815,7 @@ p, li { white-space: pre-wrap; } - + Left Joycon Sol Joycon @@ -6751,7 +6828,7 @@ p, li { white-space: pre-wrap; } - + Right Joycon Sağ Joycon @@ -6780,7 +6857,7 @@ p, li { white-space: pre-wrap; } - + Handheld Handheld @@ -6896,32 +6973,37 @@ p, li { white-space: pre-wrap; } 8 - + + Not enough controllers + + + + GameCube Controller GameCube Kontrolcüsü - + Poke Ball Plus Poke Ball Plus - + NES Controller NES Kontrolcüsü - + SNES Controller SNES Kontrolcüsü - + N64 Controller N64 Kontrolcüsü - + Sega Genesis Sega Genesis diff --git a/dist/languages/uk.ts b/dist/languages/uk.ts index 096c6039af..a4fb7893da 100644 --- a/dist/languages/uk.ts +++ b/dist/languages/uk.ts @@ -373,13 +373,13 @@ This would ban both their forum username and their IP address. % - + Auto (%1) Auto select time zone Авто (%1) - + Default (%1) Default time zone За замовчуванням (%1) @@ -893,49 +893,29 @@ This would ban both their forum username and their IP address. - Create Minidump After Crash - Створювати міні-дамп після крашу - - - Enable this to output the latest generated audio command list to the console. Only affects games using the audio renderer. Увімкніть це щоб виводити останній згенерирований список аудіо команд в консоль. Впливає лише на ігри, які використовують аудіо рендерер. - + Dump Audio Commands To Console** Вивантажувати аудіо команди в консоль** - + Enable Verbose Reporting Services** Увімкнути службу звітів у розгорнутому вигляді** - + **This will be reset automatically when yuzu closes. **Це буде автоматично скинуто після закриття yuzu. - - Restart Required - Потрібен перезапуск - - - - yuzu is required to restart in order to apply this setting. - yuzu необхідно перезапустити, щоб застосувати це налаштування. - - - + Web applet not compiled Веб-аплет не скомпільовано - - - MiniDump creation not compiled - Створення міні-дампа не скомпільовано - ConfigureDebugController @@ -1354,7 +1334,7 @@ This would ban both their forum username and their IP address. - + Conflicting Key Sequence Конфліктуюча комбінація клавіш @@ -1375,27 +1355,37 @@ This would ban both their forum username and their IP address. Неприпустимо - + + Invalid hotkey settings + + + + + An error occurred. Please report this issue on github. + + + + Restore Default Відновити значення за замовчуванням - + Clear Очистити - + Conflicting Button Sequence Конфліктуюче поєднання кнопок - + The default button sequence is already assigned to: %1 Типова комбінація кнопок вже призначена до: %1 - + The default key sequence is already assigned to: %1 Типова комбінація клавіш вже призначена до: %1 @@ -3373,67 +3363,72 @@ Drag points to change position, or double-click table cells to edit values.Показувати стовпець типу файлів - + + Show Play Time Column + + + + Game Icon Size: Розмір іконки гри: - + Folder Icon Size: Розмір іконки папки: - + Row 1 Text: Текст 1-го рядку: - + Row 2 Text: Текст 2-го рядку: - + Screenshots Знімки екрану - + Ask Where To Save Screenshots (Windows Only) Запитувати куди зберігати знімки екрану (Тільки для Windows) - + Screenshots Path: Папка для знімків екрану: - + ... ... - + TextLabel - + Resolution: Роздільна здатність: - + Select Screenshots Path... Виберіть папку для знімків екрану... - + <System> <System> - + Auto (%1 x %2, %3 x %4) Screenshot width value @@ -3751,612 +3746,616 @@ Drag points to change position, or double-click table cells to edit values. GMainWindow - + <a href='https://yuzu-emu.org/help/feature/telemetry/'>Anonymous data is collected</a> to help improve yuzu. <br/><br/>Would you like to share your usage data with us? <a href='https://yuzu-emu.org/help/feature/telemetry/'>Анонімні дані збираються для того,</a> щоб допомогти поліпшити роботу yuzu. <br/><br/>Хотіли б ви ділитися даними про використання з нами? - + Telemetry Телеметрія - + Broken Vulkan Installation Detected Виявлено пошкоджену інсталяцію Vulkan - + Vulkan initialization failed during boot.<br><br>Click <a href='https://yuzu-emu.org/wiki/faq/#yuzu-starts-with-the-error-broken-vulkan-installation-detected'>here for instructions to fix the issue</a>. Не вдалося виконати ініціалізацію Vulkan під час завантаження.<br><br>Натисніть <a href='https://yuzu-emu.org/wiki/faq/#yuzu-starts-with-the-error-broken-vulkan-installation-detected'>тут для отримання інструкцій щодо усунення проблеми</a>. - + Running a game TRANSLATORS: This string is shown to the user to explain why yuzu needs to prevent the computer from sleeping Запущено гру - + Loading Web Applet... Завантаження веб-аплета... - - + + Disable Web Applet Вимкнути веб-аплет - + Disabling the web applet can lead to undefined behavior and should only be used with Super Mario 3D All-Stars. Are you sure you want to disable the web applet? (This can be re-enabled in the Debug settings.) Вимкнення веб-апплета може призвести до несподіваної поведінки, і його слід вимикати лише заради Super Mario 3D All-Stars. Ви впевнені, що хочете вимкнути веб-апплет? (Його можна знову ввімкнути в налаштуваннях налагодження.) - + The amount of shaders currently being built Кількість створюваних шейдерів на цей момент - + The current selected resolution scaling multiplier. Поточний обраний множник масштабування роздільної здатності. - + Current emulation speed. Values higher or lower than 100% indicate emulation is running faster or slower than a Switch. Поточна швидкість емуляції. Значення вище або нижче 100% вказують на те, що емуляція йде швидше або повільніше, ніж на Switch. - + How many frames per second the game is currently displaying. This will vary from game to game and scene to scene. Кількість кадрів на секунду в цей момент. Значення буде змінюватися між іграми та сценами. - + Time taken to emulate a Switch frame, not counting framelimiting or v-sync. For full-speed emulation this should be at most 16.67 ms. Час, який потрібен для емуляції 1 кадру Switch, не беручи до уваги обмеження FPS або вертикальну синхронізацію. Для емуляції в повній швидкості значення має бути не більше 16,67 мс. - + Unmute Увімкнути звук - + Mute Вимкнути звук - + Reset Volume Скинути гучність - + &Clear Recent Files [&C] Очистити нещодавні файли - + Emulated mouse is enabled Емульована мишка увімкнена - + Real mouse input and mouse panning are incompatible. Please disable the emulated mouse in input advanced settings to allow mouse panning. Введення реальної миші та панорамування мишею несумісні. Будь ласка, вимкніть емульовану мишу в розширених налаштуваннях введення, щоб дозволити панорамування мишею. - + &Continue [&C] Продовжити - + &Pause [&P] Пауза - + Warning Outdated Game Format Попередження застарілий формат гри - + You are using the deconstructed ROM directory format for this game, which is an outdated format that has been superseded by others such as NCA, NAX, XCI, or NSP. Deconstructed ROM directories lack icons, metadata, and update support.<br><br>For an explanation of the various Switch formats yuzu supports, <a href='https://yuzu-emu.org/wiki/overview-of-switch-game-formats'>check out our wiki</a>. This message will not be shown again. Для цієї гри ви використовуєте розархівований формат ROM'а, який є застарілим і був замінений іншими, такими як NCA, NAX, XCI або NSP. У розархівованих каталогах ROM'а відсутні іконки, метадані та підтримка оновлень. <br><br>Для отримання інформації про різні формати Switch, підтримувані yuzu, <a href='https://yuzu-emu.org/wiki/overview-of-switch-game-formats'>перегляньте нашу вікі</a>. Це повідомлення більше не буде відображатися. - + Error while loading ROM! Помилка під час завантаження ROM! - + The ROM format is not supported. Формат ROM'а не підтримується. - + An error occurred initializing the video core. Сталася помилка під час ініціалізації відеоядра. - + yuzu has encountered an error while running the video core. This is usually caused by outdated GPU drivers, including integrated ones. Please see the log for more details. For more information on accessing the log, please see the following page: <a href='https://yuzu-emu.org/help/reference/log-files/'>How to Upload the Log File</a>. yuzu зіткнувся з помилкою під час запуску відеоядра. Зазвичай це спричинено застарілими драйверами ГП, включно з інтегрованими. Перевірте журнал для отримання більш детальної інформації. Додаткову інформацію про доступ до журналу дивіться на наступній сторінці: <a href='https://yuzu-emu.org/help/reference/log-files/'>Як завантажити файл журналу</a>. - + Error while loading ROM! %1 %1 signifies a numeric error code. Помилка під час завантаження ROM'а! %1 - + %1<br>Please follow <a href='https://yuzu-emu.org/help/quickstart/'>the yuzu quickstart guide</a> to redump your files.<br>You can refer to the yuzu wiki</a> or the yuzu Discord</a> for help. %1 signifies an error string. %1<br>Будь ласка, дотримуйтесь <a href='https://yuzu-emu.org/help/quickstart/'>короткого керівництва користувача yuzu</a> щоб пере-дампити ваші файли<br>Ви можете звернутися до вікі yuzu</a> або Discord yuzu</a> для допомоги - + An unknown error occurred. Please see the log for more details. Сталася невідома помилка. Будь ласка, перевірте журнал для подробиць. - + (64-bit) (64-бітний) - + (32-bit) (32-бітний) - + %1 %2 %1 is the title name. %2 indicates if the title is 64-bit or 32-bit %1 %2 - + Closing software... Закриваємо програму... - + Save Data Збереження - + Mod Data Дані модів - + Error Opening %1 Folder Помилка під час відкриття папки %1 - - + + Folder does not exist! Папка не існує! - + Error Opening Transferable Shader Cache Помилка під час відкриття переносного кешу шейдерів - + Failed to create the shader cache directory for this title. Не вдалося створити папку кешу шейдерів для цієї гри. - + Error Removing Contents Помилка під час видалення вмісту - + Error Removing Update Помилка під час видалення оновлень - + Error Removing DLC Помилка під час видалення DLC - + Remove Installed Game Contents? Видалити встановлений вміст ігор? - + Remove Installed Game Update? Видалити встановлені оновлення гри? - + Remove Installed Game DLC? Видалити встановлені DLC гри? - + Remove Entry Видалити запис - - - - - - + + + + + + Successfully Removed Успішно видалено - + Successfully removed the installed base game. Встановлену гру успішно видалено. - + The base game is not installed in the NAND and cannot be removed. Гру не встановлено в NAND і не може буде видалено. - + Successfully removed the installed update. Встановлене оновлення успішно видалено. - + There is no update installed for this title. Для цієї гри не було встановлено оновлення. - + There are no DLC installed for this title. Для цієї гри не було встановлено DLC. - + Successfully removed %1 installed DLC. Встановлений DLC %1 було успішно видалено - + Delete OpenGL Transferable Shader Cache? Видалити переносний кеш шейдерів OpenGL? - + Delete Vulkan Transferable Shader Cache? Видалити переносний кеш шейдерів Vulkan? - + Delete All Transferable Shader Caches? Видалити весь переносний кеш шейдерів? - + Remove Custom Game Configuration? Видалити користувацьке налаштування гри? - + Remove Cache Storage? Видалити кеш-сховище? - + Remove File Видалити файл - - + + Remove Play Time Data + + + + + Reset play time? + + + + + Error Removing Transferable Shader Cache Помилка під час видалення переносного кешу шейдерів - - + + A shader cache for this title does not exist. Кеш шейдерів для цієї гри не існує. - + Successfully removed the transferable shader cache. Переносний кеш шейдерів успішно видалено. - + Failed to remove the transferable shader cache. Не вдалося видалити переносний кеш шейдерів. - + Error Removing Vulkan Driver Pipeline Cache Помилка під час видалення конвеєрного кешу Vulkan - + Failed to remove the driver pipeline cache. Не вдалося видалити конвеєрний кеш шейдерів. - - + + Error Removing Transferable Shader Caches Помилка під час видалення переносного кешу шейдерів - + Successfully removed the transferable shader caches. Переносний кеш шейдерів успішно видалено. - + Failed to remove the transferable shader cache directory. Помилка під час видалення папки переносного кешу шейдерів. - - + + Error Removing Custom Configuration Помилка під час видалення користувацького налаштування - + A custom configuration for this title does not exist. Користувацьких налаштувань для цієї гри не існує. - + Successfully removed the custom game configuration. Користувацьке налаштування гри успішно видалено. - + Failed to remove the custom game configuration. Не вдалося видалити користувацьке налаштування гри. - - + + RomFS Extraction Failed! Не вдалося вилучити RomFS! - + There was an error copying the RomFS files or the user cancelled the operation. Сталася помилка під час копіювання файлів RomFS або користувач скасував операцію. - + Full Повний - + Skeleton Скелет - + Select RomFS Dump Mode Виберіть режим дампа RomFS - + Please select the how you would like the RomFS dumped.<br>Full will copy all of the files into the new directory while <br>skeleton will only create the directory structure. Будь ласка, виберіть, як ви хочете виконати дамп RomFS <br>Повний скопіює всі файли в нову папку, тоді як <br>скелет створить лише структуру папок. - + There is not enough free space at %1 to extract the RomFS. Please free up space or select a different dump directory at Emulation > Configure > System > Filesystem > Dump Root В %1 недостатньо вільного місця для вилучення RomFS. Будь ласка, звільніть місце або виберіть іншу папку для дампа в Емуляція > Налаштування > Система > Файлова система > Корінь дампа - + Extracting RomFS... Вилучення RomFS... - - - - + + + + Cancel Скасувати - + RomFS Extraction Succeeded! Вилучення RomFS пройшло успішно! - - - + + + The operation completed successfully. Операція завершилася успішно. - + Integrity verification couldn't be performed! - + File contents were not checked for validity. - - + + Integrity verification failed! - + File contents may be corrupt. - - + + Verifying integrity... - - + + Integrity verification succeeded! - - - - - + + + + Create Shortcut Створити ярлик - + This will create a shortcut to the current AppImage. This may not work well if you update. Continue? Це створить ярлик для поточного AppImage. Він може не працювати після оновлень. Продовжити? - - Cannot create shortcut on desktop. Path "%1" does not exist. - Не вдається створити ярлик на робочому столі. Шлях "%1" не існує. + + Cannot create shortcut. Path "%1" does not exist. + - - Cannot create shortcut in applications menu. Path "%1" does not exist and cannot be created. - Неможливо створити ярлик у меню додатків. Шлях "%1" не існує і не може бути створений. - - - + Create Icon Створити іконку - + Cannot create icon file. Path "%1" does not exist and cannot be created. Неможливо створити файл іконки. Шлях "%1" не існує і не може бути створений. - + Start %1 with the yuzu Emulator Запустити %1 за допомогою емулятора yuzu - + Failed to create a shortcut at %1 Не вдалося створити ярлик у %1 - + Successfully created a shortcut to %1 Успішно створено ярлик у %1 - + Error Opening %1 Помилка відкриття %1 - + Select Directory Обрати папку - + Properties Властивості - + The game properties could not be loaded. Не вдалося завантажити властивості гри. - + Switch Executable (%1);;All Files (*.*) %1 is an identifier for the Switch executable file extensions. Виконуваний файл Switch (%1);;Усі файли (*.*) - + Load File Завантажити файл - + Open Extracted ROM Directory Відкрити папку вилученого ROM'а - + Invalid Directory Selected Вибрано неприпустиму папку - + The directory you have selected does not contain a 'main' file. Папка, яку ви вибрали, не містить файлу 'main'. - + Installable Switch File (*.nca *.nsp *.xci);;Nintendo Content Archive (*.nca);;Nintendo Submission Package (*.nsp);;NX Cartridge Image (*.xci) Встановлюваний файл Switch (*.nca, *.nsp, *.xci);;Архів контенту Nintendo (*.nca);;Пакет подачі Nintendo (*.nsp);;Образ картриджа NX (*.xci) - + Install Files Встановити файли - + %n file(s) remaining Залишився %n файлЗалишилося %n файл(ів)Залишилося %n файл(ів)Залишилося %n файл(ів) - + Installing file "%1"... Встановлення файлу "%1"... - - + + Install Results Результати встановлення - + To avoid possible conflicts, we discourage users from installing base games to the NAND. Please, only use this feature to install updates and DLC. Щоб уникнути можливих конфліктів, ми не рекомендуємо користувачам встановлювати ігри в NAND. Будь ласка, використовуйте цю функцію тільки для встановлення оновлень і завантажуваного контенту. - + %n file(s) were newly installed %n файл було нещодавно встановлено @@ -4366,7 +4365,7 @@ Please, only use this feature to install updates and DLC. - + %n file(s) were overwritten %n файл було перезаписано @@ -4376,7 +4375,7 @@ Please, only use this feature to install updates and DLC. - + %n file(s) failed to install %n файл не вдалося встановити @@ -4386,339 +4385,371 @@ Please, only use this feature to install updates and DLC. - + System Application Системний додаток - + System Archive Системний архів - + System Application Update Оновлення системного додатку - + Firmware Package (Type A) Пакет прошивки (Тип А) - + Firmware Package (Type B) Пакет прошивки (Тип Б) - + Game Гра - + Game Update Оновлення гри - + Game DLC DLC до гри - + Delta Title Дельта-титул - + Select NCA Install Type... Виберіть тип установки NCA... - + Please select the type of title you would like to install this NCA as: (In most instances, the default 'Game' is fine.) Будь ласка, виберіть тип додатку, який ви хочете встановити для цього NCA: (У більшості випадків, підходить стандартний вибір "Гра".) - + Failed to Install Помилка встановлення - + The title type you selected for the NCA is invalid. Тип додатку, який ви вибрали для NCA, недійсний. - + File not found Файл не знайдено - + File "%1" not found Файл "%1" не знайдено - + OK ОК - - + + Hardware requirements not met Не задоволені системні вимоги - - + + Your system does not meet the recommended hardware requirements. Compatibility reporting has been disabled. Ваша система не відповідає рекомендованим системним вимогам. Звіти про сумісність було вимкнено. - + Missing yuzu Account Відсутній обліковий запис yuzu - + In order to submit a game compatibility test case, you must link your yuzu account.<br><br/>To link your yuzu account, go to Emulation &gt; Configuration &gt; Web. Щоб надіслати звіт про сумісність гри, необхідно прив'язати свій обліковий запис yuzu. <br><br/>Щоб прив'язати свій обліковий запис yuzu, перейдіть у розділ Емуляція &gt; Параметри &gt; Мережа. - + Error opening URL Помилка під час відкриття URL - + Unable to open the URL "%1". Не вдалося відкрити URL: "%1". - + TAS Recording Запис TAS - + Overwrite file of player 1? Перезаписати файл гравця 1? - + Invalid config detected Виявлено неприпустиму конфігурацію - + Handheld controller can't be used on docked mode. Pro controller will be selected. Портативний контролер не може бути використаний у режимі док-станції. Буде обрано контролер Pro. - - + + Amiibo Amiibo - - + + The current amiibo has been removed Поточний amiibo було прибрано - + Error Помилка - - + + The current game is not looking for amiibos Поточна гра не шукає amiibo - + Amiibo File (%1);; All Files (*.*) Файл Amiibo (%1);; Всі Файли (*.*) - + Load Amiibo Завантажити Amiibo - + Error loading Amiibo data Помилка під час завантаження даних Amiibo - + The selected file is not a valid amiibo Обраний файл не є допустимим amiibo - + The selected file is already on use Обраний файл уже використовується - + An unknown error occurred Виникла невідома помилка - + Verification failed for the following files: %1 - + + + No firmware available - + + Please install the firmware to use the Album applet. + + + + + Album Applet + + + + + Album applet is not available. Please reinstall firmware. + + + + + Please install the firmware to use the Cabinet applet. + + + + + Cabinet Applet + + + + + Cabinet applet is not available. Please reinstall firmware. + + + + Please install the firmware to use the Mii editor. - + Mii Edit Applet - + Mii editor is not available. Please reinstall firmware. - + Capture Screenshot Зробити знімок екрану - + PNG Image (*.png) Зображення PNG (*.png) - + TAS state: Running %1/%2 Стан TAS: Виконується %1/%2 - + TAS state: Recording %1 Стан TAS: Записується %1 - + TAS state: Idle %1/%2 Стан TAS: Простий %1/%2 - + TAS State: Invalid Стан TAS: Неприпустимий - + &Stop Running [&S] Зупинка - + &Start [&S] Почати - + Stop R&ecording [&E] Закінчити запис - + R&ecord [&E] Запис - + Building: %n shader(s) Побудова: %n шейдерПобудова: %n шейдер(ів)Побудова: %n шейдер(ів)Побудова: %n шейдер(ів) - + Scale: %1x %1 is the resolution scaling factor Масштаб: %1x - + Speed: %1% / %2% Швидкість: %1% / %2% - + Speed: %1% Швидкість: %1% - + Game: %1 FPS (Unlocked) Гра: %1 FPS (Необмежено) - + Game: %1 FPS Гра: %1 FPS - + Frame: %1 ms Кадр: %1 мс - + %1 %2 %1 %2 - + FSR FSR - + NO AA БЕЗ ЗГЛАДЖУВАННЯ - + VOLUME: MUTE ГУЧНІСТЬ: ЗАГЛУШЕНА - + VOLUME: %1% Volume percentage (e.g. 50%) ГУЧНІСТЬ: %1% - + Confirm Key Rederivation Підтвердіть перерахунок ключа - + You are about to force rederive all of your keys. If you do not know what this means or what you are doing, this is a potentially destructive action. @@ -4735,37 +4766,37 @@ This will delete your autogenerated key files and re-run the key derivation modu Це видалить ваші автоматично згенеровані файли ключів і повторно запустить модуль розрахунку ключів. - + Missing fuses Відсутні запобіжники - + - Missing BOOT0 - Відсутній BOOT0 - + - Missing BCPKG2-1-Normal-Main - Відсутній BCPKG2-1-Normal-Main - + - Missing PRODINFO - Відсутній PRODINFO - + Derivation Components Missing Компоненти розрахунку відсутні - + Encryption keys are missing. <br>Please follow <a href='https://yuzu-emu.org/help/quickstart/'>the yuzu quickstart guide</a> to get all your keys, firmware and games.<br><br><small>(%1)</small> Ключі шифрування відсутні.<br>Будь ласка, дотримуйтесь <a href='https://yuzu-emu.org/help/quickstart/'>короткого керівництва користувача yuzu</a>, щоб отримати всі ваші ключі, прошивку та ігри<br><br><small>(%1)</small> - + Deriving keys... This may take up to a minute depending on your system's performance. @@ -4774,49 +4805,49 @@ on your system's performance. від продуктивності вашої системи. - + Deriving Keys Отримання ключів - + System Archive Decryption Failed Не вдалося розшифрувати системний архів - + Encryption keys failed to decrypt firmware. <br>Please follow <a href='https://yuzu-emu.org/help/quickstart/'>the yuzu quickstart guide</a> to get all your keys, firmware and games. Ключі шифрування не змогли розшифрувати прошивку.<br>Будь ласка, дотримуйтесь <a href='https://yuzu-emu.org/help/quickstart/'>короткого керівництва користувача yuzu</a> щоб отримати всі ваші ключі, прошивку та ігри. - + Select RomFS Dump Target Оберіть ціль для дампа RomFS - + Please select which RomFS you would like to dump. Будь ласка, виберіть, який RomFS ви хочете здампити. - + Are you sure you want to close yuzu? Ви впевнені, що хочете закрити yuzu? - - - + + + yuzu yuzu - + Are you sure you want to stop the emulation? Any unsaved progress will be lost. Ви впевнені, що хочете зупинити емуляцію? Будь-який незбережений прогрес буде втрачено. - + The currently running application has requested yuzu to not exit. Would you like to bypass this and exit anyway? @@ -4968,241 +4999,251 @@ Would you like to bypass this and exit anyway? GameList - + Favorite Улюблені - + Start Game Запустити гру - + Start Game without Custom Configuration Запустити гру без користувацького налаштування - + Open Save Data Location Відкрити папку для збережень - + Open Mod Data Location Відкрити папку для модів - + Open Transferable Pipeline Cache Відкрити переносний кеш конвеєра - + Remove Видалити - + Remove Installed Update Видалити встановлене оновлення - + Remove All Installed DLC Видалити усі DLC - + Remove Custom Configuration Видалити користувацьке налаштування - + + Remove Play Time Data + + + + Remove Cache Storage Видалити кеш-сховище - + Remove OpenGL Pipeline Cache Видалити кеш конвеєра OpenGL - + Remove Vulkan Pipeline Cache Видалити кеш конвеєра Vulkan - + Remove All Pipeline Caches Видалити весь кеш конвеєра - + Remove All Installed Contents Видалити весь встановлений вміст - - + + Dump RomFS Дамп RomFS - + Dump RomFS to SDMC Здампити RomFS у SDMC - + Verify Integrity - + Copy Title ID to Clipboard Скопіювати ідентифікатор додатку в буфер обміну - + Navigate to GameDB entry Перейти до сторінки GameDB - + Create Shortcut Створити ярлик - + Add to Desktop Додати на Робочий стіл - + Add to Applications Menu Додати до меню застосунків - + Properties Властивості - + Scan Subfolders Сканувати підпапки - + Remove Game Directory Видалити директорію гри - + ▲ Move Up ▲ Перемістити вверх - + ▼ Move Down ▼ Перемістити вниз - + Open Directory Location Відкрити розташування папки - + Clear Очистити - + Name Назва - + Compatibility Сумісність - + Add-ons Доповнення - + File type Тип файлу - + Size Розмір + + + Play time + + GameListItemCompat - + Ingame Запускається - + Game starts, but crashes or major glitches prevent it from being completed. Гра запускається, але вильоти або серйозні баги не дають змоги її завершити. - + Perfect Ідеально - + Game can be played without issues. У гру можна грати без проблем. - + Playable Придатно до гри - + Game functions with minor graphical or audio glitches and is playable from start to finish. Гра працює з незначними графічними та/або звуковими помилками і прохідна від початку до кінця. - + Intro/Menu Вступ/Меню - + Game loads, but is unable to progress past the Start Screen. Гра завантажується, але не проходить далі стартового екрана. - + Won't Boot Не запускається - + The game crashes when attempting to startup. Гра вилітає під час запуску. - + Not Tested Не перевірено - + The game has not yet been tested. Гру ще не перевіряли на сумісність. @@ -5210,7 +5251,7 @@ Would you like to bypass this and exit anyway? GameListPlaceholder - + Double-click to add a new folder to the game list Натисніть двічі, щоб додати нову папку до списку ігор @@ -5223,12 +5264,12 @@ Would you like to bypass this and exit anyway? %1 із %n результат(ів)%1 із %n результат(ів)%1 із %n результат(ів)%1 із %n результат(ів) - + Filter: Пошук: - + Enter pattern to filter Введіть текст для пошуку @@ -5346,6 +5387,7 @@ Debug Message: + Main Window Основне вікно @@ -5451,6 +5493,11 @@ Debug Message: + Toggle Renderdoc Capture + + + + Toggle Status Bar Переключити панель стану @@ -5689,186 +5736,216 @@ Debug Message: + &Amiibo + + + + &TAS [&T] TAS - + &Help [&H] Допомога - + &Install Files to NAND... [&I] Встановити файли в NAND... - + L&oad File... [&O] Завантажити файл... - + Load &Folder... [&F] Завантажити папку... - + E&xit [&X] Вихід - + &Pause [&P] Пауза - + &Stop [&S] Стоп - + &Reinitialize keys... [&R] Переініціалізувати ключі... - + &Verify Installed Contents - + &About yuzu [&A] Про yuzu - + Single &Window Mode [&W] Режим одного вікна - + Con&figure... [&F] Налаштування... - + Display D&ock Widget Headers [&O] Відображати заголовки віджетів дока - + Show &Filter Bar [&F] Показати панель пошуку - + Show &Status Bar [&S] Показати панель статусу - + Show Status Bar Показати панель статусу - + &Browse Public Game Lobby [&B] Переглянути публічні ігрові фойє - + &Create Room [&C] Створити кімнату - + &Leave Room [&L] Залишити кімнату - + &Direct Connect to Room [&D] Пряме під'єднання до кімнати - + &Show Current Room [&S] Показати поточну кімнату - + F&ullscreen [&U] Повноекранний - + &Restart [&R] Перезапустити - + Load/Remove &Amiibo... [&A] Завантажити/Видалити Amiibo... - + &Report Compatibility [&R] Повідомити про сумісність - + Open &Mods Page [&M] Відкрити сторінку модів - + Open &Quickstart Guide [&Q] Відкрити посібник користувача - + &FAQ [&F] ЧАП - + Open &yuzu Folder [&Y] Відкрити папку yuzu - + &Capture Screenshot [&C] Зробити знімок екрану - + + Open &Album + + + + + &Set Nickname and Owner + + + + + &Delete Game Data + + + + + &Restore Amiibo + + + + + &Format Amiibo + + + + Open &Mii Editor - + &Configure TAS... [&C] Налаштування TAS... - + Configure C&urrent Game... [&U] Налаштувати поточну гру... - + &Start [&S] Почати - + &Reset [&S] Скинути - + R&ecord [&E] Запис @@ -6176,27 +6253,27 @@ p, li { white-space: pre-wrap; } Не грає в гру - + Installed SD Titles Встановлені SD ігри - + Installed NAND Titles Встановлені NAND ігри - + System Titles Системні ігри - + Add New Game Directory Додати нову папку з іграми - + Favorites Улюблені @@ -6722,7 +6799,7 @@ p, li { white-space: pre-wrap; } - + Pro Controller Контролер Pro @@ -6735,7 +6812,7 @@ p, li { white-space: pre-wrap; } - + Dual Joycons Подвійні Joy-Con'и @@ -6748,7 +6825,7 @@ p, li { white-space: pre-wrap; } - + Left Joycon Лівий Joy-Con @@ -6761,7 +6838,7 @@ p, li { white-space: pre-wrap; } - + Right Joycon Правий Joy-Con @@ -6790,7 +6867,7 @@ p, li { white-space: pre-wrap; } - + Handheld Портативний @@ -6906,32 +6983,37 @@ p, li { white-space: pre-wrap; } 8 - + + Not enough controllers + + + + GameCube Controller Контролер GameCube - + Poke Ball Plus Poke Ball Plus - + NES Controller Контролер NES - + SNES Controller Контролер SNES - + N64 Controller Контролер N64 - + Sega Genesis Sega Genesis diff --git a/dist/languages/vi.ts b/dist/languages/vi.ts index c4c1fb3b29..067aab0700 100644 --- a/dist/languages/vi.ts +++ b/dist/languages/vi.ts @@ -373,13 +373,13 @@ Việc này sẽ ban tên người dùng trên diễn đàn và IP của họ lu % - + Auto (%1) Auto select time zone Tự động (%1) - + Default (%1) Default time zone Mặc định (%1) @@ -893,49 +893,29 @@ Việc này sẽ ban tên người dùng trên diễn đàn và IP của họ lu - Create Minidump After Crash - Tạo Minidump sau khi crash - - - Enable this to output the latest generated audio command list to the console. Only affects games using the audio renderer. Bật tính năng này để đưa ra danh sách lệnh âm thanh mới nhất đã tạo ra đến console. Chỉ ảnh hưởng đến các game sử dụng bộ mã hóa âm thanh. - + Dump Audio Commands To Console** Trích xuất các lệnh âm thanh đến console** - + Enable Verbose Reporting Services** Bật dịch vụ báo cáo chi tiết** - + **This will be reset automatically when yuzu closes. **Sẽ tự động đặt lại khi đóng yuzu. - - Restart Required - Cần khởi động lại - - - - yuzu is required to restart in order to apply this setting. - yuzu cần khởi động lại để áp dụng cài đặt này. - - - + Web applet not compiled Applet web chưa được biên dịch - - - MiniDump creation not compiled - Chức năng tạo MiniDump không được biên dịch - ConfigureDebugController @@ -1354,7 +1334,7 @@ Việc này sẽ ban tên người dùng trên diễn đàn và IP của họ lu - + Conflicting Key Sequence Tổ hợp phím bị xung đột @@ -1375,27 +1355,37 @@ Việc này sẽ ban tên người dùng trên diễn đàn và IP của họ lu Không hợp lệ - + + Invalid hotkey settings + + + + + An error occurred. Please report this issue on github. + + + + Restore Default Khôi phục mặc định - + Clear Xóa - + Conflicting Button Sequence Tổ hợp nút bị xung đột - + The default button sequence is already assigned to: %1 Tổ hợp nút mặc định đã được gán cho: %1 - + The default key sequence is already assigned to: %1 Tổ hợp phím này đã gán với: %1 @@ -3373,67 +3363,72 @@ Kéo điểm để thay đổi vị trí, hoặc nhấp đúp chuột vào ô tr Hiện cột Loại tập tin - + + Show Play Time Column + + + + Game Icon Size: Kích thước biểu tượng game: - + Folder Icon Size: Kích thước biểu tượng thư mục: - + Row 1 Text: Dòng chữ hàng 1: - + Row 2 Text: Dòng chữ hàng 2: - + Screenshots Ảnh chụp màn hình - + Ask Where To Save Screenshots (Windows Only) Hỏi nơi lưu ảnh chụp màn hình (chỉ cho Windows) - + Screenshots Path: Đường dẫn cho ảnh chụp màn hình: - + ... ... - + TextLabel NhãnVănBản - + Resolution: Độ phân giải: - + Select Screenshots Path... Chọn đường dẫn cho ảnh chụp màn hình... - + <System> <System> - + Auto (%1 x %2, %3 x %4) Screenshot width value Tự động (%1 x %2, %3 x %4) @@ -3751,820 +3746,824 @@ Kéo điểm để thay đổi vị trí, hoặc nhấp đúp chuột vào ô tr GMainWindow - + <a href='https://yuzu-emu.org/help/feature/telemetry/'>Anonymous data is collected</a> to help improve yuzu. <br/><br/>Would you like to share your usage data with us? <a href='https://yuzu-emu.org/help/feature/telemetry/'>Dữ liệu ẩn danh được thu thập</a>để hỗ trợ cải thiện yuzu. <br/><br/>Bạn có muốn chia sẽ dữ liệu sử dụng với chúng tôi? - + Telemetry Viễn trắc - + Broken Vulkan Installation Detected Phát hiện cài đặt Vulkan bị hỏng - + Vulkan initialization failed during boot.<br><br>Click <a href='https://yuzu-emu.org/wiki/faq/#yuzu-starts-with-the-error-broken-vulkan-installation-detected'>here for instructions to fix the issue</a>. Khởi tạo Vulkan thất bại trong quá trình khởi động.<br>Nhấp <br><a href='https://yuzu-emu.org/wiki/faq/#yuzu-starts-with-the-error-broken-vulkan-installation-detected'>vào đây để xem hướng dẫn khắc phục vấn đề</a>. - + Running a game TRANSLATORS: This string is shown to the user to explain why yuzu needs to prevent the computer from sleeping Đang chạy một game - + Loading Web Applet... Đang tải applet web... - - + + Disable Web Applet Tắt applet web - + Disabling the web applet can lead to undefined behavior and should only be used with Super Mario 3D All-Stars. Are you sure you want to disable the web applet? (This can be re-enabled in the Debug settings.) Tắt applet web có thể dẫn đến hành vi không xác định và chỉ nên được sử dụng với Super Mario 3D All-Stars. Bạn có chắc chắn muốn tắt applet web không? (Có thể được bật lại trong cài đặt Gỡ lỗi.) - + The amount of shaders currently being built Số lượng shader đang được dựng - + The current selected resolution scaling multiplier. Bội số tỷ lệ độ phân giải được chọn hiện tại. - + Current emulation speed. Values higher or lower than 100% indicate emulation is running faster or slower than a Switch. Tốc độ giả lập hiện tại. Giá trị cao hơn hoặc thấp hơn 100% chỉ ra giả lập sẽ chạy nhanh hơn hoặc chậm hơn trên máy Switch. - + How many frames per second the game is currently displaying. This will vary from game to game and scene to scene. Có bao nhiêu khung hình trên mỗi giây mà game đang hiển thị. Điều này sẽ thay đổi giữa các game và các cảnh khác nhau. - + Time taken to emulate a Switch frame, not counting framelimiting or v-sync. For full-speed emulation this should be at most 16.67 ms. Thời gian mà giả lập lấy từ khung hình Switch, sẽ không kể đến giới hạn khung hình hoặc v-sync. Đối với tốc độ tối đa mà giả lập nhận được nhiều nhất là ở độ khoảng 16.67 ms. - + Unmute Bật tiếng - + Mute Tắt tiếng - + Reset Volume Đặt lại âm lượng - + &Clear Recent Files &Xoá tập tin gần đây - + Emulated mouse is enabled Chuột giả lập đã được bật - + Real mouse input and mouse panning are incompatible. Please disable the emulated mouse in input advanced settings to allow mouse panning. Đầu vào từ chuột thật và tính năng lia chuột không tương thích. Vui lòng tắt chuột giả lập trong cài đặt đầu vào nâng cao để cho phép lia chuột. - + &Continue &Tiếp tục - + &Pause &Tạm dừng - + Warning Outdated Game Format Cảnh báo định dạng game đã lỗi thời - + You are using the deconstructed ROM directory format for this game, which is an outdated format that has been superseded by others such as NCA, NAX, XCI, or NSP. Deconstructed ROM directories lack icons, metadata, and update support.<br><br>For an explanation of the various Switch formats yuzu supports, <a href='https://yuzu-emu.org/wiki/overview-of-switch-game-formats'>check out our wiki</a>. This message will not be shown again. Bạn đang sử dụng định dạng thư mục ROM đã giải nén cho game này, một định dạng lỗi thời đã được thay thế bởi những thứ khác như NCA, NAX, XCI, hoặc NSP. Thư mục ROM đã giải nén có thể thiếu các biểu tượng, metadata, và hỗ trợ cập nhật.<br><br>Để hiểu thêm về các định dạng khác nhau của Switch mà yuzu hỗ trợ, <a href='https://yuzu-emu.org/wiki/overview-of-switch-game-formats'>vui lòng kiểm tra wiki của chúng tôi</a>. Thông báo này sẽ không hiển thị lại lần sau. - + Error while loading ROM! Lỗi khi nạp ROM! - + The ROM format is not supported. Định dạng ROM này không được hỗ trợ. - + An error occurred initializing the video core. Đã xảy ra lỗi khi khởi tạo lõi video. - + yuzu has encountered an error while running the video core. This is usually caused by outdated GPU drivers, including integrated ones. Please see the log for more details. For more information on accessing the log, please see the following page: <a href='https://yuzu-emu.org/help/reference/log-files/'>How to Upload the Log File</a>. yuzu đã gặp lỗi khi chạy lõi video. Điều này thường xảy ra do phiên bản driver GPU đã cũ, bao gồm cả driver tích hợp. Vui lòng xem nhật ký để biết thêm chi tiết. Để biết thêm thông tin về cách truy cập nhật ký, vui lòng xem trang sau: <a href='https://yuzu-emu.org/help/reference/log-files/'>Cách tải lên tập tin nhật ký</a>. - + Error while loading ROM! %1 %1 signifies a numeric error code. Lỗi khi nạp ROM! %1 - + %1<br>Please follow <a href='https://yuzu-emu.org/help/quickstart/'>the yuzu quickstart guide</a> to redump your files.<br>You can refer to the yuzu wiki</a> or the yuzu Discord</a> for help. %1 signifies an error string. %1<br>Vui lòng tuân theo <a href='https://yuzu-emu.org/help/quickstart/'>hướng dẫn nhanh của yuzu</a> để trích xuất lại các tập tin của bạn.<br>Bạn có thể tham khảo yuzu wiki</a> hoặc yuzu Discord</a>để được hỗ trợ. - + An unknown error occurred. Please see the log for more details. Đã xảy ra lỗi không xác định. Hãy xem nhật ký để biết thêm chi tiết. - + (64-bit) (64-bit) - + (32-bit) (32-bit) - + %1 %2 %1 is the title name. %2 indicates if the title is 64-bit or 32-bit %1 %2 - + Closing software... Đang đóng phần mềm... - + Save Data Dữ liệu save - + Mod Data Dữ liệu mod - + Error Opening %1 Folder Lỗi khi mở thư mục %1 - - + + Folder does not exist! Thư mục này không tồn tại! - + Error Opening Transferable Shader Cache Lỗi khi mở bộ nhớ đệm shader chuyển được - + Failed to create the shader cache directory for this title. Thất bại khi tạo thư mục bộ nhớ đệm shader cho title này. - + Error Removing Contents Lỗi khi loại bỏ nội dung - + Error Removing Update Lỗi khi loại bỏ bản cập nhật - + Error Removing DLC Lỗi khi loại bỏ DLC - + Remove Installed Game Contents? Loại bỏ nội dung game đã cài đặt? - + Remove Installed Game Update? Loại bỏ bản cập nhật game đã cài đặt? - + Remove Installed Game DLC? Loại bỏ DLC game đã cài đặt? - + Remove Entry Xoá mục - - - - - - + + + + + + Successfully Removed Loại bỏ thành công - + Successfully removed the installed base game. Loại bỏ thành công base game đã cài đặt. - + The base game is not installed in the NAND and cannot be removed. Base game không được cài đặt trong NAND và không thể loại bỏ. - + Successfully removed the installed update. Loại bỏ thành công bản cập nhật đã cài đặt. - + There is no update installed for this title. Không có bản cập nhật nào được cài đặt cho title này. - + There are no DLC installed for this title. Không có DLC nào được cài đặt cho title này. - + Successfully removed %1 installed DLC. Loại bỏ thành công %1 DLC đã cài đặt. - + Delete OpenGL Transferable Shader Cache? Xoá bộ nhớ đệm shader OpenGL chuyển được? - + Delete Vulkan Transferable Shader Cache? Xoá bộ nhớ đệm shader Vulkan chuyển được? - + Delete All Transferable Shader Caches? Xoá tất cả bộ nhớ đệm shader chuyển được? - + Remove Custom Game Configuration? Loại bỏ cấu hình game tuỳ chỉnh? - + Remove Cache Storage? Loại bỏ bộ nhớ đệm? - + Remove File Loại bỏ tập tin - - + + Remove Play Time Data + + + + + Reset play time? + + + + + Error Removing Transferable Shader Cache Lỗi khi loại bỏ bộ nhớ đệm shader chuyển được - - + + A shader cache for this title does not exist. Bộ nhớ đệm shader cho title này không tồn tại. - + Successfully removed the transferable shader cache. Thành công loại bỏ bộ nhớ đệm shader chuyển được. - + Failed to remove the transferable shader cache. Thất bại khi xoá bộ nhớ đệm shader chuyển được. - + Error Removing Vulkan Driver Pipeline Cache Lỗi khi xoá bộ nhớ đệm pipeline Vulkan - + Failed to remove the driver pipeline cache. Thất bại khi xoá bộ nhớ đệm pipeline của driver. - - + + Error Removing Transferable Shader Caches Lỗi khi loại bỏ bộ nhớ đệm shader chuyển được - + Successfully removed the transferable shader caches. Thành công loại bỏ tất cả bộ nhớ đệm shader chuyển được. - + Failed to remove the transferable shader cache directory. Thất bại khi loại bỏ thư mục bộ nhớ đệm shader. - - + + Error Removing Custom Configuration Lỗi khi loại bỏ cấu hình tuỳ chỉnh - + A custom configuration for this title does not exist. Cấu hình tuỳ chỉnh cho title này không tồn tại. - + Successfully removed the custom game configuration. Loại bỏ thành công cấu hình game tuỳ chỉnh. - + Failed to remove the custom game configuration. Thất bại khi xoá cấu hình game tuỳ chỉnh. - - + + RomFS Extraction Failed! Giải nén RomFS không thành công! - + There was an error copying the RomFS files or the user cancelled the operation. Đã xảy ra lỗi khi sao chép các tập tin RomFS hoặc người dùng đã hủy bỏ hoạt động này. - + Full Đầy đủ - + Skeleton Khung - + Select RomFS Dump Mode Chọn chế độ trích xuất RomFS - + Please select the how you would like the RomFS dumped.<br>Full will copy all of the files into the new directory while <br>skeleton will only create the directory structure. Vui lòng chọn cách mà bạn muốn RomFS được trích xuất.<br>Chế độ Đầy đủ sẽ sao chép toàn bộ tập tin vào một thư mục mới trong khi <br>chế độ Khung chỉ tạo cấu trúc thư mục. - + There is not enough free space at %1 to extract the RomFS. Please free up space or select a different dump directory at Emulation > Configure > System > Filesystem > Dump Root Không đủ bộ nhớ trống tại %1 để trích xuất RomFS. Hãy giải phóng bộ nhớ hoặc chọn một thư mục trích xuất khác tại Giả lập > Cấu hình > Hệ thống > Hệ thống tập tin > Thư mục trích xuất gốc - + Extracting RomFS... Giải nén RomFS... - - - - + + + + Cancel Hủy bỏ - + RomFS Extraction Succeeded! Giải nén RomFS thành công! - - - + + + The operation completed successfully. Các hoạt động đã hoàn tất thành công. - + Integrity verification couldn't be performed! Không thể thực hiện kiểm tra tính toàn vẹn! - + File contents were not checked for validity. Chưa kiểm tra sự hợp lệ của nội dung tập tin. - - + + Integrity verification failed! Kiểm tra tính toàn vẹn thất bại! - + File contents may be corrupt. Nội dung tập tin có thể bị hỏng. - - + + Verifying integrity... Đang kiểm tra tính toàn vẹn... - - + + Integrity verification succeeded! Kiểm tra tính toàn vẹn thành công! - - - - - + + + + Create Shortcut Tạo lối tắt - + This will create a shortcut to the current AppImage. This may not work well if you update. Continue? Việc này sẽ tạo một lối tắt tới AppImage hiện tại. Điều này có thể không hoạt động tốt nếu bạn cập nhật. Tiếp tục? - - Cannot create shortcut on desktop. Path "%1" does not exist. - Không thể tạo lối tắt trên desktop. Đường dẫn "%1" không tồn tại. + + Cannot create shortcut. Path "%1" does not exist. + - - Cannot create shortcut in applications menu. Path "%1" does not exist and cannot be created. - Không thể tạo lối tắt trong menu ứng dụng. Đường dẫn "%1" không tồn tại và không thể tạo. - - - + Create Icon Tạo biểu tượng - + Cannot create icon file. Path "%1" does not exist and cannot be created. Không thể tạo tập tin biểu tượng. Đường dẫn "%1" không tồn tại và không thể tạo. - + Start %1 with the yuzu Emulator Bắt đầu %1 với giả lập yuzu - + Failed to create a shortcut at %1 Thất bại khi tạo lối tắt tại %1 - + Successfully created a shortcut to %1 Thành công tạo lối tắt tại %1 - + Error Opening %1 Lỗi khi mở %1 - + Select Directory Chọn thư mục - + Properties Thuộc tính - + The game properties could not be loaded. Không thể tải thuộc tính của game. - + Switch Executable (%1);;All Files (*.*) %1 is an identifier for the Switch executable file extensions. Thực thi Switch (%1);;Tất cả tập tin (*.*) - + Load File Nạp tập tin - + Open Extracted ROM Directory Mở thư mục ROM đã giải nén - + Invalid Directory Selected Danh mục đã chọn không hợp lệ - + The directory you have selected does not contain a 'main' file. Thư mục mà bạn đã chọn không chứa tập tin 'main'. - + Installable Switch File (*.nca *.nsp *.xci);;Nintendo Content Archive (*.nca);;Nintendo Submission Package (*.nsp);;NX Cartridge Image (*.xci) Những tập tin Switch cài được (*.nca *.nsp *.xci);;Nintendo Content Archive (*.nca);;Nintendo Submission Package (*.nsp);;NX Cartridge Image (*.xci) - + Install Files Cài đặt tập tin - + %n file(s) remaining %n tập tin còn lại - + Installing file "%1"... Đang cài đặt tập tin "%1"... - - + + Install Results Kết quả cài đặt - + To avoid possible conflicts, we discourage users from installing base games to the NAND. Please, only use this feature to install updates and DLC. Để tránh xung đột có thể xảy ra, chúng tôi không khuyến khích người dùng cài đặt base game vào NAND. Vui lòng, chỉ sử dụng tính năng này để cài đặt các bản cập nhật và DLC. - + %n file(s) were newly installed %n tập tin đã được cài đặt mới - + %n file(s) were overwritten %n tập tin đã được ghi đè - + %n file(s) failed to install %n tập tin thất bại khi cài đặt - + System Application Ứng dụng hệ thống - + System Archive Bản lưu trữ của hệ thống - + System Application Update Cập nhật ứng dụng hệ thống - + Firmware Package (Type A) Gói firmware (Loại A) - + Firmware Package (Type B) Gói firmware (Loại B) - + Game Game - + Game Update Cập nhật game - + Game DLC DLC game - + Delta Title Title Delta - + Select NCA Install Type... Chọn cách cài đặt NCA... - + Please select the type of title you would like to install this NCA as: (In most instances, the default 'Game' is fine.) Vui lòng chọn loại title mà bạn muốn cài đặt NCA này: (Trong hầu hết trường hợp, chọn mặc định 'Game' là tốt nhất.) - + Failed to Install Cài đặt thất bại - + The title type you selected for the NCA is invalid. Loại title mà bạn đã chọn cho NCA không hợp lệ. - + File not found Không tìm thấy tập tin - + File "%1" not found Không tìm thấy tập tin "%1" - + OK OK - - + + Hardware requirements not met Yêu cầu phần cứng không được đáp ứng - - + + Your system does not meet the recommended hardware requirements. Compatibility reporting has been disabled. Hệ thống của bạn không đáp ứng yêu cầu phần cứng được đề xuất. Báo cáo độ tương thích đã bị vô hiệu hoá. - + Missing yuzu Account Thiếu tài khoản yuzu - + In order to submit a game compatibility test case, you must link your yuzu account.<br><br/>To link your yuzu account, go to Emulation &gt; Configuration &gt; Web. Để gửi trường hợp thử nghiệm game tương thích, bạn phải liên kết tài khoản yuzu.<br><br/>Để liên kết tải khoản yuzu của bạn, hãy đến Giả lập &gt; Cấu hình &gt; Web. - + Error opening URL Lỗi khi mở URL - + Unable to open the URL "%1". Không thể mở URL "%1". - + TAS Recording Ghi lại TAS - + Overwrite file of player 1? Ghi đè tập tin của người chơi 1? - + Invalid config detected Đã phát hiện cấu hình không hợp lệ - + Handheld controller can't be used on docked mode. Pro controller will be selected. Tay cầm handheld không thể được sử dụng trong chế độ docked. Pro Controller sẽ được chọn. - - + + Amiibo Amiibo - - + + The current amiibo has been removed Amiibo hiện tại đã được loại bỏ - + Error Lỗi - - + + The current game is not looking for amiibos Game hiện tại không tìm kiếm amiibos - + Amiibo File (%1);; All Files (*.*) Tập tin Amiibo (%1);; Tất cả tập tin (*.*) - + Load Amiibo Nạp Amiibo - + Error loading Amiibo data Lỗi khi nạp dữ liệu Amiibo - + The selected file is not a valid amiibo Tập tin đã chọn không phải là amiibo hợp lệ - + The selected file is already on use Tập tin đã chọn đã được sử dụng - + An unknown error occurred Đã xảy ra lỗi không xác định - + Verification failed for the following files: %1 @@ -4573,145 +4572,177 @@ Vui lòng, chỉ sử dụng tính năng này để cài đặt các bản cập %1 - + + + No firmware available - + + Please install the firmware to use the Album applet. + + + + + Album Applet + + + + + Album applet is not available. Please reinstall firmware. + + + + + Please install the firmware to use the Cabinet applet. + + + + + Cabinet Applet + + + + + Cabinet applet is not available. Please reinstall firmware. + + + + Please install the firmware to use the Mii editor. - + Mii Edit Applet - + Mii editor is not available. Please reinstall firmware. - + Capture Screenshot Chụp ảnh màn hình - + PNG Image (*.png) Hình ảnh PNG (*.png) - + TAS state: Running %1/%2 Trạng thái TAS: Đang chạy %1/%2 - + TAS state: Recording %1 Trạng thái TAS: Đang ghi %1 - + TAS state: Idle %1/%2 Trạng thái TAS: Đang chờ %1/%2 - + TAS State: Invalid Trạng thái TAS: Không hợp lệ - + &Stop Running &Dừng chạy - + &Start &Bắt đầu - + Stop R&ecording Dừng G&hi - + R&ecord G&hi - + Building: %n shader(s) Đang dựng: %n shader - + Scale: %1x %1 is the resolution scaling factor Tỉ lệ thu phóng: %1x - + Speed: %1% / %2% Tốc độ: %1% / %2% - + Speed: %1% Tốc độ: %1% - + Game: %1 FPS (Unlocked) Game: %1 FPS (Đã mở khoá) - + Game: %1 FPS Game: %1 FPS - + Frame: %1 ms Khung hình: %1 ms - + %1 %2 %1 %2 - + FSR FSR - + NO AA NO AA - + VOLUME: MUTE ÂM LƯỢNG: TẮT TIẾNG - + VOLUME: %1% Volume percentage (e.g. 50%) ÂM LƯỢNG: %1% - + Confirm Key Rederivation Xác nhận chuyển hoá lại key - + You are about to force rederive all of your keys. If you do not know what this means or what you are doing, this is a potentially destructive action. @@ -4728,37 +4759,37 @@ và tạo một bản sao lưu. Việc này sẽ xóa các tập tin key tự động sinh ra của bạn và chạy lại mô-đun chuyển hoá key. - + Missing fuses Thiếu fuses - + - Missing BOOT0 - Thiếu BOOT0 - + - Missing BCPKG2-1-Normal-Main - Thiếu BCPKG2-1-Normal-Main - + - Missing PRODINFO - Thiếu PRODINFO - + Derivation Components Missing Thiếu các thành phần chuyển hoá - + Encryption keys are missing. <br>Please follow <a href='https://yuzu-emu.org/help/quickstart/'>the yuzu quickstart guide</a> to get all your keys, firmware and games.<br><br><small>(%1)</small> Keys mã hoá bị thiếu. <br>Vui lòng tuân theo <a href='https://yuzu-emu.org/help/quickstart/'>hướng dẫn nhanh của yuzu</a> để lấy tất cả key, firmware và game của bạn.<br><br><small>(%1)</small> - + Deriving keys... This may take up to a minute depending on your system's performance. @@ -4767,49 +4798,49 @@ on your system's performance. hệ thống của bạn. - + Deriving Keys Đang chuyển hoá key - + System Archive Decryption Failed Giải mã bản lưu trữ của hệ thống thất bại - + Encryption keys failed to decrypt firmware. <br>Please follow <a href='https://yuzu-emu.org/help/quickstart/'>the yuzu quickstart guide</a> to get all your keys, firmware and games. Keys mã hoá thất bại khi giải mã firmware. <br>Vui lòng tuân theo <a href='https://yuzu-emu.org/help/quickstart/'>hướng dẫn nhanh của yuzu</a>để lấy tất cả key, firmware và game của bạn. - + Select RomFS Dump Target Chọn thư mục để trích xuất RomFS - + Please select which RomFS you would like to dump. Vui lòng chọn RomFS mà bạn muốn trích xuất. - + Are you sure you want to close yuzu? Bạn có chắc chắn muốn đóng yuzu? - - - + + + yuzu yuzu - + Are you sure you want to stop the emulation? Any unsaved progress will be lost. Bạn có chắc rằng muốn dừng giả lập? Bất kì tiến trình nào chưa được lưu sẽ bị mất. - + The currently running application has requested yuzu to not exit. Would you like to bypass this and exit anyway? @@ -4961,241 +4992,251 @@ Bạn có muốn bỏ qua yêu cầu đó và thoát luôn không? GameList - + Favorite Ưa thích - + Start Game Bắt đầu game - + Start Game without Custom Configuration Bắt đầu game mà không có cấu hình tuỳ chỉnh - + Open Save Data Location Mở vị trí dữ liệu save - + Open Mod Data Location Mở vị trí chứa dữ liệu mod - + Open Transferable Pipeline Cache Mở thư mục chứa bộ nhớ đệm pipeline - + Remove Loại bỏ - + Remove Installed Update Loại bỏ bản cập nhật đã cài - + Remove All Installed DLC Loại bỏ tất cả DLC đã cài đặt - + Remove Custom Configuration Loại bỏ cấu hình tuỳ chỉnh - + + Remove Play Time Data + + + + Remove Cache Storage Loại bỏ bộ nhớ đệm - + Remove OpenGL Pipeline Cache Loại bỏ bộ nhớ đệm pipeline OpenGL - + Remove Vulkan Pipeline Cache Loại bỏ bộ nhớ đệm pipeline Vulkan - + Remove All Pipeline Caches Loại bỏ tất cả bộ nhớ đệm shader - + Remove All Installed Contents Loại bỏ tất cả nội dung đã cài đặt - - + + Dump RomFS Trích xuất RomFS - + Dump RomFS to SDMC Trích xuất RomFS tới SDMC - + Verify Integrity Kiểm tra tính toàn vẹn - + Copy Title ID to Clipboard Sao chép ID title vào bộ nhớ tạm - + Navigate to GameDB entry Điều hướng đến mục GameDB - + Create Shortcut Tạo lối tắt - + Add to Desktop Thêm vào desktop - + Add to Applications Menu Thêm vào menu ứng dụng - + Properties Thuộc tính - + Scan Subfolders Quét các thư mục con - + Remove Game Directory Loại bỏ thư mục game - + ▲ Move Up ▲ Di chuyển lên - + ▼ Move Down ▼ Di chuyển xuống - + Open Directory Location Mở vị trí thư mục - + Clear Xóa - + Name Tên - + Compatibility Độ tương thích - + Add-ons Add-ons - + File type Loại tập tin - + Size Kích thước + + + Play time + + GameListItemCompat - + Ingame Trong game - + Game starts, but crashes or major glitches prevent it from being completed. Game khởi động, nhưng bị crash hoặc lỗi nghiêm trọng dẫn đến việc không thể hoàn thành nó. - + Perfect Hoàn hảo - + Game can be played without issues. Game có thể chơi mà không gặp vấn đề. - + Playable Có thể chơi - + Game functions with minor graphical or audio glitches and is playable from start to finish. Game hoạt động với lỗi hình ảnh hoặc âm thanh nhẹ và có thể chơi từ đầu tới cuối. - + Intro/Menu Phần mở đầu/Menu - + Game loads, but is unable to progress past the Start Screen. Game đã tải, nhưng không thể qua được màn hình bắt đầu. - + Won't Boot Không khởi động - + The game crashes when attempting to startup. Game crash khi đang khởi động. - + Not Tested Chưa ai thử - + The game has not yet been tested. Game này chưa được thử nghiệm. @@ -5203,7 +5244,7 @@ Bạn có muốn bỏ qua yêu cầu đó và thoát luôn không? GameListPlaceholder - + Double-click to add a new folder to the game list Nhấp đúp chuột để thêm một thư mục mới vào danh sách game @@ -5216,12 +5257,12 @@ Bạn có muốn bỏ qua yêu cầu đó và thoát luôn không? %1 trong %n kết quả - + Filter: Lọc: - + Enter pattern to filter Nhập mẫu để lọc @@ -5339,6 +5380,7 @@ Tin nhắn gỡ lỗi: + Main Window Cửa sổ chính @@ -5444,6 +5486,11 @@ Tin nhắn gỡ lỗi: + Toggle Renderdoc Capture + + + + Toggle Status Bar Hiện/Ẩn thanh trạng thái @@ -5682,186 +5729,216 @@ Tin nhắn gỡ lỗi: + &Amiibo + + + + &TAS &TAS - + &Help &Trợ giúp - + &Install Files to NAND... &Cài đặt tập tin vào NAND... - + L&oad File... N&ạp tập tin... - + Load &Folder... Nạp &thư mục... - + E&xit T&hoát - + &Pause &Tạm dừng - + &Stop &Dừng - + &Reinitialize keys... &Khởi tạo lại keys... - + &Verify Installed Contents - + &About yuzu &Thông tin về yuzu - + Single &Window Mode Chế độ &cửa sổ đơn - + Con&figure... Cấu &hình... - + Display D&ock Widget Headers Hiển thị tiêu đề công cụ D&ock - + Show &Filter Bar Hiện thanh &lọc - + Show &Status Bar Hiện thanh &trạng thái - + Show Status Bar Hiện thanh trạng thái - + &Browse Public Game Lobby &Duyệt phòng game công khai - + &Create Room &Tạo phòng - + &Leave Room &Rời phòng - + &Direct Connect to Room &Kết nối trực tiếp tới phòng - + &Show Current Room &Hiện phòng hiện tại - + F&ullscreen T&oàn màn hình - + &Restart &Khởi động lại - + Load/Remove &Amiibo... Nạp/Loại bỏ &Amiibo... - + &Report Compatibility &Báo cáo độ tương thích - + Open &Mods Page Mở trang &mods - + Open &Quickstart Guide Mở &Hướng dẫn nhanh - + &FAQ &FAQ - + Open &yuzu Folder Mở thư mục &yuzu - + &Capture Screenshot &Chụp ảnh màn hình - + + Open &Album + + + + + &Set Nickname and Owner + + + + + &Delete Game Data + + + + + &Restore Amiibo + + + + + &Format Amiibo + + + + Open &Mii Editor - + &Configure TAS... &Cấu hình TAS... - + Configure C&urrent Game... Cấu hình game h&iện tại... - + &Start &Bắt đầu - + &Reset &Đặt lại - + R&ecord G&hi lại @@ -6169,27 +6246,27 @@ p, li { white-space: pre-wrap; } Hiện không chơi game - + Installed SD Titles Các title đã cài đặt trên thẻ SD - + Installed NAND Titles Các title đã cài đặt trên NAND - + System Titles Titles hệ thống - + Add New Game Directory Thêm thư mục game - + Favorites Ưa thích @@ -6715,7 +6792,7 @@ p, li { white-space: pre-wrap; } - + Pro Controller Pro Controller @@ -6728,7 +6805,7 @@ p, li { white-space: pre-wrap; } - + Dual Joycons Joycon đôi @@ -6741,7 +6818,7 @@ p, li { white-space: pre-wrap; } - + Left Joycon Joycon trái @@ -6754,7 +6831,7 @@ p, li { white-space: pre-wrap; } - + Right Joycon Joycon phải @@ -6783,7 +6860,7 @@ p, li { white-space: pre-wrap; } - + Handheld Handheld @@ -6899,32 +6976,37 @@ p, li { white-space: pre-wrap; } 8 - + + Not enough controllers + + + + GameCube Controller Tay cầm GameCube - + Poke Ball Plus Poke Ball Plus - + NES Controller Tay cầm NES - + SNES Controller Tay cầm SNES - + N64 Controller Tay cầm N64 - + Sega Genesis Sega Genesis diff --git a/dist/languages/vi_VN.ts b/dist/languages/vi_VN.ts index fcc841ff22..2cee82e7e1 100644 --- a/dist/languages/vi_VN.ts +++ b/dist/languages/vi_VN.ts @@ -373,13 +373,13 @@ This would ban both their forum username and their IP address. % - + Auto (%1) Auto select time zone Tự động (%1) - + Default (%1) Default time zone Mặc định (%1) @@ -893,49 +893,29 @@ This would ban both their forum username and their IP address. - Create Minidump After Crash - Tạo Minidump sau khi xảy ra sự cố. - - - Enable this to output the latest generated audio command list to the console. Only affects games using the audio renderer. Bật tính năng này để đưa ra danh sách lệnh âm thanh mới nhất đã tạo ra đến console. Chỉ ảnh hưởng đến các game sử dụng bộ mã hóa âm thanh. - + Dump Audio Commands To Console** Trích xuất các lệnh âm thanh đến console** - + Enable Verbose Reporting Services** Bật dịch vụ báo cáo chi tiết** - + **This will be reset automatically when yuzu closes. **Sẽ tự động thiết lập lại khi tắt yuzu. - - Restart Required - Cần khởi động lại - - - - yuzu is required to restart in order to apply this setting. - yuzu cần khởi động lại để áp dụng cài đặt này. - - - + Web applet not compiled Applet web chưa được biên dịch - - - MiniDump creation not compiled - Chức năng tạo MiniDump không được biên dịch - ConfigureDebugController @@ -1354,7 +1334,7 @@ This would ban both their forum username and their IP address. - + Conflicting Key Sequence Tổ hợp phím bị xung đột @@ -1375,27 +1355,37 @@ This would ban both their forum username and their IP address. Không hợp lệ - + + Invalid hotkey settings + + + + + An error occurred. Please report this issue on github. + + + + Restore Default Khôi phục về mặc định - + Clear Xóa - + Conflicting Button Sequence Dãy nút xung đột - + The default button sequence is already assigned to: %1 Dãy nút mặc định đã được gán cho: %1 - + The default key sequence is already assigned to: %1 Tổ hợp phím này đã gán với: %1 @@ -3373,67 +3363,72 @@ Kéo điểm để thay đổi vị trí, hoặc nhấp đúp chuột vào ô tr Hiện cột Loại tệp - + + Show Play Time Column + + + + Game Icon Size: Kích thước icon game: - + Folder Icon Size: Kích thước icon thư mục: - + Row 1 Text: Dòng chữ hàng 1: - + Row 2 Text: Dòng chữ hàng 2: - + Screenshots Ảnh chụp màn hình - + Ask Where To Save Screenshots (Windows Only) Hỏi nơi lưu ảnh chụp màn hình (chỉ Windows) - + Screenshots Path: Đường dẫn cho ảnh chụp màn hình: - + ... ... - + TextLabel NhãnVănBản - + Resolution: Độ phân giải: - + Select Screenshots Path... Chọn đường dẫn cho ảnh chụp màn hình... - + <System> <System> - + Auto (%1 x %2, %3 x %4) Screenshot width value Tự động (%1 x %2, %3 x %4) @@ -3751,820 +3746,824 @@ Kéo điểm để thay đổi vị trí, hoặc nhấp đúp chuột vào ô tr GMainWindow - + <a href='https://yuzu-emu.org/help/feature/telemetry/'>Anonymous data is collected</a> to help improve yuzu. <br/><br/>Would you like to share your usage data with us? <a href='https://yuzu-emu.org/help/feature/telemetry/'>Dữ liệu ẩn danh được thu thập</a>để hỗ trợ cải thiện yuzu. <br/><br/>Bạn có muốn chia sẽ dữ liệu sử dụng cho chúng tôi? - + Telemetry Viễn trắc - + Broken Vulkan Installation Detected Phát hiện cài đặt Vulkan bị hỏng - + Vulkan initialization failed during boot.<br><br>Click <a href='https://yuzu-emu.org/wiki/faq/#yuzu-starts-with-the-error-broken-vulkan-installation-detected'>here for instructions to fix the issue</a>. Khởi tạo Vulkan thất bại trong quá trình khởi động.<br>Nhấn <br><a href='https://yuzu-emu.org/wiki/faq/#yuzu-starts-with-the-error-broken-vulkan-installation-detected'>vào đây để xem hướng dẫn khắc phục vấn đề</a>. - + Running a game TRANSLATORS: This string is shown to the user to explain why yuzu needs to prevent the computer from sleeping Đang chạy một game - + Loading Web Applet... Đang tải applet web... - - + + Disable Web Applet Tắt applet web - + Disabling the web applet can lead to undefined behavior and should only be used with Super Mario 3D All-Stars. Are you sure you want to disable the web applet? (This can be re-enabled in the Debug settings.) Tắt applet web có thể dẫn đến hành vi không xác định và chỉ nên được sử dụng với Super Mario 3D All-Stars. Bạn có chắc chắn muốn tắt applet web không? (Có thể được bật lại trong cài đặt Gỡ lỗi.) - + The amount of shaders currently being built Số lượng shader đang được dựng - + The current selected resolution scaling multiplier. Bội số tỷ lệ độ phân giải được chọn hiện tại. - + Current emulation speed. Values higher or lower than 100% indicate emulation is running faster or slower than a Switch. Tốc độ giả lập hiện tại. Giá trị cao hơn hoặc thấp hơn 100% chỉ ra giả lập sẽ chạy nhanh hơn hoặc chậm hơn trên máy Switch - + How many frames per second the game is currently displaying. This will vary from game to game and scene to scene. Có bao nhiêu khung hình trên mỗi giây mà trò chơi đang hiển thị. Điều này sẽ thay đổi từ trò chơi này đến trò chơi kia và khung cảnh này đến khung cảnh kia. - + Time taken to emulate a Switch frame, not counting framelimiting or v-sync. For full-speed emulation this should be at most 16.67 ms. Thời gian mà giả lập lấy từ khung hình Switch, sẽ không kể đến giới hạn khung hình hoặc v-sync. Đối với tốc độ tối đa mà giả lập nhận được nhiều nhất là ở độ khoảng 16.67 ms. - + Unmute Bật tiếng - + Mute Tắt tiếng - + Reset Volume Đặt lại âm lượng - + &Clear Recent Files &Xoá tập tin gần đây - + Emulated mouse is enabled Chuột giả lập đã được kích hoạt - + Real mouse input and mouse panning are incompatible. Please disable the emulated mouse in input advanced settings to allow mouse panning. Đầu vào chuột thật và tính năng lia chuột không tương thích. Vui lòng tắt chuột giả lập trong cài đặt đầu vào nâng cao để cho phép lia chuột. - + &Continue &Tiếp tục - + &Pause &Tạm dừng - + Warning Outdated Game Format Chú ý định dạng trò chơi đã lỗi thời - + You are using the deconstructed ROM directory format for this game, which is an outdated format that has been superseded by others such as NCA, NAX, XCI, or NSP. Deconstructed ROM directories lack icons, metadata, and update support.<br><br>For an explanation of the various Switch formats yuzu supports, <a href='https://yuzu-emu.org/wiki/overview-of-switch-game-formats'>check out our wiki</a>. This message will not be shown again. Bạn đang sử dụng định dạng danh mục ROM giải mã cho trò chơi này, và đó là một định dạng lỗi thời đã được thay thế bởi những thứ khác như NCA, NAX, XCI, hoặc NSP. Danh mục ROM giải mã có thể thiếu biểu tượng, metadata, và hỗ trợ cập nhật.<br><br>Để giải thích về các định dạng khác nhau của Switch mà yuzu hỗ trợ, <a href='https://yuzu-emu.org/wiki/overview-of-switch-game-formats'>vui lòng kiểm tra trên wiki của chúng tôi</a>. Thông báo này sẽ không hiển thị lại lần sau. - + Error while loading ROM! Xảy ra lỗi khi đang nạp ROM! - + The ROM format is not supported. Định dạng ROM này không hỗ trợ. - + An error occurred initializing the video core. Đã xảy ra lỗi khi khởi tạo lõi video. - + yuzu has encountered an error while running the video core. This is usually caused by outdated GPU drivers, including integrated ones. Please see the log for more details. For more information on accessing the log, please see the following page: <a href='https://yuzu-emu.org/help/reference/log-files/'>How to Upload the Log File</a>. yuzu đã gặp lỗi khi chạy lõi video. Điều này thường xảy ra do phiên bản driver GPU đã cũ, bao gồm cả driver tích hợp. Vui lòng xem nhật ký để biết thêm chi tiết. Để biết thêm thông tin về cách truy cập nhật ký, vui lòng xem trang sau: <a href='https://yuzu-emu.org/help/reference/log-files/'>Cách tải lên tập tin nhật ký</a>. - + Error while loading ROM! %1 %1 signifies a numeric error code. Lỗi xảy ra khi nạp ROM! %1 - + %1<br>Please follow <a href='https://yuzu-emu.org/help/quickstart/'>the yuzu quickstart guide</a> to redump your files.<br>You can refer to the yuzu wiki</a> or the yuzu Discord</a> for help. %1 signifies an error string. %1<br>Vui lòng tuân theo <a href='https://yuzu-emu.org/help/quickstart/'>hướng dẫn nhanh của yuzu</a> để trích xuất lại các tệp của bạn.<br>Bạn có thể tham khảo yuzu wiki</a> hoặc yuzu Discord</a>để được hỗ trợ. - + An unknown error occurred. Please see the log for more details. Đã xảy ra lỗi không xác định. Vui lòng kiểm tra sổ ghi chép để biết thêm chi tiết. - + (64-bit) (64-bit) - + (32-bit) (32-bit) - + %1 %2 %1 is the title name. %2 indicates if the title is 64-bit or 32-bit %1 %2 - + Closing software... Đang đóng phần mềm... - + Save Data Dữ liệu save - + Mod Data Dữ liệu mod - + Error Opening %1 Folder Xảy ra lỗi khi mở %1 thư mục - - + + Folder does not exist! Thư mục này không tồn tại! - + Error Opening Transferable Shader Cache Lỗi khi mở bộ nhớ cache shader có thể chuyển. - + Failed to create the shader cache directory for this title. Thất bại khi tạo thư mục bộ nhớ cache shader cho title này. - + Error Removing Contents Lỗi khi loại bỏ nội dung - + Error Removing Update Lỗi khi loại bỏ cập nhật - + Error Removing DLC Lỗi khi loại bỏ DLC - + Remove Installed Game Contents? Loại bỏ nội dung game đã cài đặt? - + Remove Installed Game Update? Loại bỏ bản cập nhật game đã cài đặt? - + Remove Installed Game DLC? Loại bỏ DLC game đã cài đặt? - + Remove Entry Xoá mục - - - - - - + + + + + + Successfully Removed Loại bỏ thành công - + Successfully removed the installed base game. Loại bỏ thành công base game đã cài đặt - + The base game is not installed in the NAND and cannot be removed. Base game không được cài đặt trong NAND và không thể loại bỏ. - + Successfully removed the installed update. Loại bỏ thành công bản cập nhật đã cài đặt - + There is no update installed for this title. Không có bản cập nhật nào được cài đặt cho title này. - + There are no DLC installed for this title. Không có DLC nào được cài đặt cho title này. - + Successfully removed %1 installed DLC. Loại bỏ thành công %1 DLC đã cài đặt - + Delete OpenGL Transferable Shader Cache? Xoá bộ nhớ cache shader OpenGL chuyển được? - + Delete Vulkan Transferable Shader Cache? Xoá bộ nhớ cache shader Vulkan chuyển được? - + Delete All Transferable Shader Caches? Xoá tất cả bộ nhớ cache shader chuyển được? - + Remove Custom Game Configuration? Loại bỏ cấu hình game tuỳ chỉnh? - + Remove Cache Storage? Xoá bộ nhớ cache? - + Remove File Xoá tập tin - - + + Remove Play Time Data + + + + + Reset play time? + + + + + Error Removing Transferable Shader Cache Lỗi khi xoá bộ nhớ cache shader chuyển được - - + + A shader cache for this title does not exist. Bộ nhớ cache shader cho title này không tồn tại. - + Successfully removed the transferable shader cache. Thành công loại bỏ bộ nhớ cache shader chuyển được - + Failed to remove the transferable shader cache. Thất bại khi xoá bộ nhớ cache shader chuyển được. - + Error Removing Vulkan Driver Pipeline Cache Lỗi khi xoá bộ nhớ cache pipeline Vulkan - + Failed to remove the driver pipeline cache. Thất bại khi xoá bộ nhớ cache pipeline của driver. - - + + Error Removing Transferable Shader Caches Lỗi khi loại bỏ bộ nhớ cache shader chuyển được - + Successfully removed the transferable shader caches. Thành công loại bỏ tât cả bộ nhớ cache shader chuyển được. - + Failed to remove the transferable shader cache directory. Thất bại khi loại bỏ thư mục bộ nhớ cache shader. - - + + Error Removing Custom Configuration Lỗi khi loại bỏ cấu hình tuỳ chỉnh - + A custom configuration for this title does not exist. Cấu hình tuỳ chỉnh cho title này không tồn tại. - + Successfully removed the custom game configuration. Loại bỏ thành công cấu hình game tuỳ chỉnh. - + Failed to remove the custom game configuration. Thất bại khi xoá cấu hình game tuỳ chỉnh - - + + RomFS Extraction Failed! Khai thác RomFS không thành công! - + There was an error copying the RomFS files or the user cancelled the operation. Đã xảy ra lỗi khi sao chép tệp tin RomFS hoặc người dùng đã hủy bỏ hoạt động này. - + Full Đầy - + Skeleton Sườn - + Select RomFS Dump Mode Chọn chế độ kết xuất RomFS - + Please select the how you would like the RomFS dumped.<br>Full will copy all of the files into the new directory while <br>skeleton will only create the directory structure. Vui lòng chọn RomFS mà bạn muốn kết xuất như thế nào.<br>Đầy đủ sẽ sao chép toàn bộ tệp tin vào một danh mục mới trong khi <br>bộ xương chỉ tạo kết cấu danh mục. - + There is not enough free space at %1 to extract the RomFS. Please free up space or select a different dump directory at Emulation > Configure > System > Filesystem > Dump Root Không đủ bộ nhớ trống tại %1 để trích xuất RomFS. Hãy giải phóng bộ nhớ hoặc chọn một thư mục trích xuất khác tại Giả lập > Thiết lập > Hệ thống > Hệ thống tệp > Thư mục trích xuất gốc - + Extracting RomFS... Khai thác RomFS... - - - - + + + + Cancel Hủy bỏ - + RomFS Extraction Succeeded! Khai thác RomFS thành công! - - - + + + The operation completed successfully. Các hoạt động đã hoàn tất thành công. - + Integrity verification couldn't be performed! Không thể thực hiện kiểm tra tính toàn vẹn! - + File contents were not checked for validity. Chưa kiểm tra sự hợp lệ của nội dung tập tin. - - + + Integrity verification failed! Kiểm tra tính toàn vẹn thất bại! - + File contents may be corrupt. Nội dung tập tin có thể bị hỏng. - - + + Verifying integrity... Đang kiểm tra tính toàn vẹn... - - + + Integrity verification succeeded! Kiểm tra tính toàn vẹn thành công! - - - - - + + + + Create Shortcut Tạo lối tắt - + This will create a shortcut to the current AppImage. This may not work well if you update. Continue? Việc này sẽ tạo một lối tắt tới AppImage hiện tại. Điều này có thể không hoạt động tốt nếu bạn cập nhật. Tiếp tục? - - Cannot create shortcut on desktop. Path "%1" does not exist. - Không thể tạo lối tắt trên desktop. Đường dẫn "%1" không tồn tại. + + Cannot create shortcut. Path "%1" does not exist. + - - Cannot create shortcut in applications menu. Path "%1" does not exist and cannot be created. - Không thể tạo lối tắt trong menu ứng dụng. Đường dẫn "%1" không tồn tại và không thể tạo. - - - + Create Icon Tạo icon - + Cannot create icon file. Path "%1" does not exist and cannot be created. Không thể tạo tập tin icon. Đường dẫn "%1" không tồn tại và không thể tạo. - + Start %1 with the yuzu Emulator Bắt đầu %1 với giả lập yuzu - + Failed to create a shortcut at %1 Thất bại khi tạo lối tắt tại %1 - + Successfully created a shortcut to %1 Thành công tạo lối tắt tại %1 - + Error Opening %1 Lỗi khi mở %1 - + Select Directory Chọn danh mục - + Properties Thuộc tính - + The game properties could not be loaded. Thuộc tính của trò chơi không thể nạp được. - + Switch Executable (%1);;All Files (*.*) %1 is an identifier for the Switch executable file extensions. Thực thi Switch (%1);;Tất cả tệp tin (*.*) - + Load File Nạp tệp tin - + Open Extracted ROM Directory Mở danh mục ROM đã trích xuất - + Invalid Directory Selected Danh mục đã chọn không hợp lệ - + The directory you have selected does not contain a 'main' file. Danh mục mà bạn đã chọn không có chứa tệp tin 'main'. - + Installable Switch File (*.nca *.nsp *.xci);;Nintendo Content Archive (*.nca);;Nintendo Submission Package (*.nsp);;NX Cartridge Image (*.xci) Những tệp tin Switch cài được (*.nca *.nsp *.xci);;Nintendo Content Archive (*.nca);;Nintendo Submission Package (*.nsp);;NX Cartridge Image (*.xci) - + Install Files Cài đặt tập tin - + %n file(s) remaining %n tập tin còn lại - + Installing file "%1"... Đang cài đặt tệp tin "%1"... - - + + Install Results Kết quả cài đặt - + To avoid possible conflicts, we discourage users from installing base games to the NAND. Please, only use this feature to install updates and DLC. Để tránh xung đột có thể xảy ra, chúng tôi không khuyến khích người dùng cài base games vào NAND. Vui lòng, chỉ sử dụng tính năng này để cài các bản cập nhật và DLC. - + %n file(s) were newly installed %n đã được cài đặt mới - + %n file(s) were overwritten %n tập tin đã được ghi đè - + %n file(s) failed to install %n tập tin thất bại khi cài đặt - + System Application Ứng dụng hệ thống - + System Archive Hệ thống lưu trữ - + System Application Update Cập nhật hệ thống ứng dụng - + Firmware Package (Type A) Gói phần mềm (Loại A) - + Firmware Package (Type B) Gói phần mềm (Loại B) - + Game Trò chơi - + Game Update Cập nhật trò chơi - + Game DLC Nội dung trò chơi có thể tải xuống - + Delta Title Tiêu đề Delta - + Select NCA Install Type... Chọn loại NCA để cài đặt... - + Please select the type of title you would like to install this NCA as: (In most instances, the default 'Game' is fine.) Vui lòng chọn loại tiêu đề mà bạn muốn cài đặt NCA này: (Trong hầu hết trường hợp, chọn mặc định 'Game' là tốt nhất.) - + Failed to Install Cài đặt đã không thành công - + The title type you selected for the NCA is invalid. Loại tiêu đề NCA mà bạn chọn nó không hợp lệ. - + File not found Không tìm thấy tệp tin - + File "%1" not found Không tìm thấy "%1" tệp tin - + OK OK - - + + Hardware requirements not met Yêu cầu phần cứng không được đáp ứng - - + + Your system does not meet the recommended hardware requirements. Compatibility reporting has been disabled. Hệ thống của bạn không đáp ứng yêu cầu phần cứng được đề xuất. Báo cáo tương thích đã được tắt. - + Missing yuzu Account Thiếu tài khoản yuzu - + In order to submit a game compatibility test case, you must link your yuzu account.<br><br/>To link your yuzu account, go to Emulation &gt; Configuration &gt; Web. Để gửi trường hợp thử nghiệm trò chơi tương thích, bạn phải liên kết tài khoản yuzu.<br><br/>Để liên kết tải khoản yuzu của bạn, hãy đến Giả lập &gt; Thiết lập &gt; Web. - + Error opening URL Lỗi khi mở URL - + Unable to open the URL "%1". Không thể mở URL "%1". - + TAS Recording Ghi lại TAS - + Overwrite file of player 1? Ghi đè tập tin của người chơi 1? - + Invalid config detected Đã phát hiện cấu hình không hợp lệ - + Handheld controller can't be used on docked mode. Pro controller will be selected. Tay cầm handheld không thể được sử dụng trong chế độ docked. Pro Controller sẽ được chọn. - - + + Amiibo Amiibo - - + + The current amiibo has been removed Amiibo hiện tại đã bị loại bỏ - + Error Lỗi - - + + The current game is not looking for amiibos Game hiện tại không tìm kiếm amiibos - + Amiibo File (%1);; All Files (*.*) Tệp tin Amiibo (%1);; Tất cả tệp tin (*.*) - + Load Amiibo Nạp dữ liệu Amiibo - + Error loading Amiibo data Xảy ra lỗi khi nạp dữ liệu Amiibo - + The selected file is not a valid amiibo Tập tin đã chọn không phải là amiibo hợp lệ - + The selected file is already on use Tập tin đã chọn đã được sử dụng - + An unknown error occurred Đã xảy ra lỗi không xác định - + Verification failed for the following files: %1 @@ -4573,145 +4572,177 @@ Vui lòng, chỉ sử dụng tính năng này để cài các bản cập nhật %1 - + + + No firmware available - + + Please install the firmware to use the Album applet. + + + + + Album Applet + + + + + Album applet is not available. Please reinstall firmware. + + + + + Please install the firmware to use the Cabinet applet. + + + + + Cabinet Applet + + + + + Cabinet applet is not available. Please reinstall firmware. + + + + Please install the firmware to use the Mii editor. - + Mii Edit Applet - + Mii editor is not available. Please reinstall firmware. - + Capture Screenshot Chụp ảnh màn hình - + PNG Image (*.png) Hình ảnh PNG (*.png) - + TAS state: Running %1/%2 Trạng thái TAS: Đang chạy %1/%2 - + TAS state: Recording %1 Trạng thái TAS: Đang ghi %1 - + TAS state: Idle %1/%2 Trạng thái TAS: Đang chờ %1/%2 - + TAS State: Invalid Trạng thái TAS: Không hợp lệ - + &Stop Running &Dừng chạy - + &Start &Bắt đầu - + Stop R&ecording Dừng G&hi - + R&ecord G&hi - + Building: %n shader(s) Đang dựng: %n shader(s) - + Scale: %1x %1 is the resolution scaling factor Tỉ lệ thu phóng: %1x - + Speed: %1% / %2% Tốc độ: %1% / %2% - + Speed: %1% Tốc độ: %1% - + Game: %1 FPS (Unlocked) Game: %1 FPS (Đã mở khoá) - + Game: %1 FPS Trò chơi: %1 FPS - + Frame: %1 ms Khung hình: %1 ms - + %1 %2 %1 %2 - + FSR FSR - + NO AA NO AA - + VOLUME: MUTE ÂM LƯỢNG: TẮT TIẾNG - + VOLUME: %1% Volume percentage (e.g. 50%) ÂM LƯỢNG: %1% - + Confirm Key Rederivation Xác nhận mã khóa Rederivation - + You are about to force rederive all of your keys. If you do not know what this means or what you are doing, this is a potentially destructive action. @@ -4728,37 +4759,37 @@ và phải tạo ra một bản sao lưu lại. Điều này sẽ xóa mã khóa tự động tạo trên tệp tin của bạn và chạy lại mô-đun mã khóa derivation. - + Missing fuses Thiếu fuses - + - Missing BOOT0 - Thiếu BOOT0 - + - Missing BCPKG2-1-Normal-Main - Thiếu BCPKG2-1-Normal-Main - + - Missing PRODINFO - Thiếu PRODINFO - + Derivation Components Missing Thiếu các thành phần chuyển hoá - + Encryption keys are missing. <br>Please follow <a href='https://yuzu-emu.org/help/quickstart/'>the yuzu quickstart guide</a> to get all your keys, firmware and games.<br><br><small>(%1)</small> Keys mã hoá bị thiếu. <br>Vui lòng tuân theo <a href='https://yuzu-emu.org/help/quickstart/'>hướng dẫn nhanh của yuzu</a> để lấy tất cả keys, firmware và games của bạn.<br><br><small>(%1)</small> - + Deriving keys... This may take up to a minute depending on your system's performance. @@ -4767,49 +4798,49 @@ on your system's performance. vào hiệu suất hệ thống của bạn. - + Deriving Keys Mã khóa xuất phát - + System Archive Decryption Failed Giải mã bản lưu trữ của hệ thống thất bại - + Encryption keys failed to decrypt firmware. <br>Please follow <a href='https://yuzu-emu.org/help/quickstart/'>the yuzu quickstart guide</a> to get all your keys, firmware and games. Keys mã hoá thấy bại khi giải mã firmware. <br>Vui lòng tuân theo <a href='https://yuzu-emu.org/help/quickstart/'>hướng dẫn nhanh của yuzu</a>để lấy tất cả keys, firmware và games của bạn. - + Select RomFS Dump Target Chọn thư mục để sao chép RomFS - + Please select which RomFS you would like to dump. Vui lòng chọn RomFS mà bạn muốn sao chép. - + Are you sure you want to close yuzu? Bạn có chắc chắn muốn đóng yuzu? - - - + + + yuzu yuzu - + Are you sure you want to stop the emulation? Any unsaved progress will be lost. Bạn có chắc rằng muốn dừng giả lập? Bất kì tiến trình nào chưa được lưu sẽ bị mất. - + The currently running application has requested yuzu to not exit. Would you like to bypass this and exit anyway? @@ -4961,241 +4992,251 @@ Bạn có muốn bỏ qua yêu cầu đó và thoát luôn không? GameList - + Favorite Ưa thích - + Start Game Bắt đầu game - + Start Game without Custom Configuration Bắt đầu game mà không có cấu hình tuỳ chỉnh - + Open Save Data Location Mở vị trí lưu dữ liệu - + Open Mod Data Location Mở vị trí chỉnh sửa dữ liệu - + Open Transferable Pipeline Cache Mở thư mục chứa bộ nhớ cache pipeline - + Remove Gỡ Bỏ - + Remove Installed Update Loại bỏ bản cập nhật đã cài - + Remove All Installed DLC Loại bỏ tất cả DLC đã cài đặt - + Remove Custom Configuration Loại bỏ cấu hình tuỳ chỉnh - + + Remove Play Time Data + + + + Remove Cache Storage Xoá bộ nhớ cache - + Remove OpenGL Pipeline Cache Loại bỏ OpenGL Pipeline Cache - + Remove Vulkan Pipeline Cache Loại bỏ bộ nhớ cache pipeline Vulkan - + Remove All Pipeline Caches Loại bỏ tất cả bộ nhớ cache shader - + Remove All Installed Contents Loại bỏ tất cả nội dung đã cài đặt - - + + Dump RomFS Kết xuất RomFS - + Dump RomFS to SDMC Trích xuất RomFS tới SDMC - + Verify Integrity Kiểm tra tính toàn vẹn - + Copy Title ID to Clipboard Sao chép ID tiêu đề vào bộ nhớ tạm - + Navigate to GameDB entry Điều hướng đến mục cơ sở dữ liệu trò chơi - + Create Shortcut Tạo lối tắt - + Add to Desktop Thêm vào Desktop - + Add to Applications Menu Thêm vào menu ứng dụng - + Properties Thuộc tính - + Scan Subfolders Quét các thư mục con - + Remove Game Directory Loại bỏ thư mục game - + ▲ Move Up ▲ Di chuyển lên - + ▼ Move Down ▼ Di chuyển xuống - + Open Directory Location Mở vị trí thư mục - + Clear Bỏ trống - + Name Tên - + Compatibility Tương thích - + Add-ons Tiện ích ngoài - + File type Loại tệp tin - + Size Kích cỡ + + + Play time + + GameListItemCompat - + Ingame Trong game - + Game starts, but crashes or major glitches prevent it from being completed. Game khởi động, nhưng gặp vấn đề hoặc lỗi nghiêm trọng đến việc không thể hoàn thành trò chơi. - + Perfect Tốt nhất - + Game can be played without issues. Game có thể chơi mà không gặp vấn đề. - + Playable Có thể chơi - + Game functions with minor graphical or audio glitches and is playable from start to finish. Game hoạt động với lỗi hình ảnh hoặc âm thanh nhẹ và có thể chơi từ đầu tới cuối. - + Intro/Menu Phần mở đầu/Menu - + Game loads, but is unable to progress past the Start Screen. Trò chơi đã tải, nhưng không thể qua Màn hình Bắt đầu. - + Won't Boot Không hoạt động - + The game crashes when attempting to startup. Trò chơi sẽ thoát đột ngột khi khởi động. - + Not Tested Chưa ai thử - + The game has not yet been tested. Trò chơi này chưa có ai thử cả. @@ -5203,7 +5244,7 @@ Bạn có muốn bỏ qua yêu cầu đó và thoát luôn không? GameListPlaceholder - + Double-click to add a new folder to the game list Nháy đúp chuột để thêm một thư mục mới vào danh sách trò chơi game @@ -5216,12 +5257,12 @@ Bạn có muốn bỏ qua yêu cầu đó và thoát luôn không? %1 trong %n kết quả - + Filter: Bộ lọc: - + Enter pattern to filter Nhập khuôn để lọc @@ -5339,6 +5380,7 @@ Tin nhắn gỡ lỗi: + Main Window Cửa sổ chính @@ -5444,6 +5486,11 @@ Tin nhắn gỡ lỗi: + Toggle Renderdoc Capture + + + + Toggle Status Bar Hiện/Ẩn thanh trạng thái @@ -5682,186 +5729,216 @@ Tin nhắn gỡ lỗi: + &Amiibo + + + + &TAS &TAS - + &Help &Trợ giúp - + &Install Files to NAND... &Cài đặt tập tin vào NAND... - + L&oad File... N&ạp tập tin... - + Load &Folder... Nạp &Thư mục - + E&xit Th&oát - + &Pause &Tạm dừng - + &Stop &Dừng - + &Reinitialize keys... &Khởi tạo lại keys... - + &Verify Installed Contents - + &About yuzu &Thông tin về yuzu - + Single &Window Mode &Chế độ cửa sổ đơn - + Con&figure... Cấu& hình - + Display D&ock Widget Headers Hiển thị tiêu đề công cụ D&ock - + Show &Filter Bar Hiện thanh &lọc - + Show &Status Bar Hiện thanh &trạng thái - + Show Status Bar Hiển thị thanh trạng thái - + &Browse Public Game Lobby &Duyệt phòng game công khai - + &Create Room &Tạo phòng - + &Leave Room &Rời phòng - + &Direct Connect to Room &Kết nối trực tiếp tới phòng - + &Show Current Room &Hiện phòng hiện tại - + F&ullscreen T&oàn màn hình - + &Restart &Khởi động lại - + Load/Remove &Amiibo... Tải/Loại bỏ &Amiibo - + &Report Compatibility &Báo cáo tương thích - + Open &Mods Page Mở trang &mods - + Open &Quickstart Guide Mở &Hướng dẫn nhanh - + &FAQ &FAQ - + Open &yuzu Folder Mở thư mục &yuzu - + &Capture Screenshot &Chụp ảnh màn hình - + + Open &Album + + + + + &Set Nickname and Owner + + + + + &Delete Game Data + + + + + &Restore Amiibo + + + + + &Format Amiibo + + + + Open &Mii Editor - + &Configure TAS... &Cấu hình TAS... - + Configure C&urrent Game... Cấu hình game hiện tại... - + &Start &Bắt đầu - + &Reset &Đặt lại - + R&ecord G&hi @@ -6168,27 +6245,27 @@ p, li { white-space: pre-wrap; } Hiện không chơi game - + Installed SD Titles Các title đã cài đặt trên thẻ SD - + Installed NAND Titles Các title đã cài đặt trên NAND - + System Titles Titles hệ thống - + Add New Game Directory Thêm thư mục game - + Favorites Ưa thích @@ -6714,7 +6791,7 @@ p, li { white-space: pre-wrap; } - + Pro Controller Tay cầm Pro Controller @@ -6727,7 +6804,7 @@ p, li { white-space: pre-wrap; } - + Dual Joycons Joycon đôi @@ -6740,7 +6817,7 @@ p, li { white-space: pre-wrap; } - + Left Joycon Joycon Trái @@ -6753,7 +6830,7 @@ p, li { white-space: pre-wrap; } - + Right Joycon Joycon Phải @@ -6782,7 +6859,7 @@ p, li { white-space: pre-wrap; } - + Handheld Cầm tay @@ -6898,32 +6975,37 @@ p, li { white-space: pre-wrap; } 8 - + + Not enough controllers + + + + GameCube Controller Tay cầm GameCube - + Poke Ball Plus Poke Ball Plus - + NES Controller Tay cầm NES - + SNES Controller Tay cầm SNES - + N64 Controller Tay cầm N64 - + Sega Genesis Sega Genesis diff --git a/dist/languages/zh_CN.ts b/dist/languages/zh_CN.ts index 65baa91754..b7f1d32fbc 100644 --- a/dist/languages/zh_CN.ts +++ b/dist/languages/zh_CN.ts @@ -373,13 +373,13 @@ This would ban both their forum username and their IP address. % - + Auto (%1) Auto select time zone 自动 (%1) - + Default (%1) Default time zone 默认 (%1) @@ -853,7 +853,7 @@ This would ban both their forum username and their IP address. Disable Web Applet - 禁用 Web 应用程序 + 禁用 Web 小程序 @@ -892,48 +892,28 @@ This would ban both their forum username and their IP address. - Create Minidump After Crash - 微型故障转储 - - - Enable this to output the latest generated audio command list to the console. Only affects games using the audio renderer. 启用此选项会将最新的音频命令列表输出到控制台。只影响使用音频渲染器的游戏。 - + Dump Audio Commands To Console** 将音频命令转储至控制台** - + Enable Verbose Reporting Services** 启用详细报告服务** - + **This will be reset automatically when yuzu closes. **该选项将在 yuzu 关闭时自动重置。 - - Restart Required - 需要重启 - - - - yuzu is required to restart in order to apply this setting. - 重启 yuzu 后才能应用此设置。 - - - + Web applet not compiled - Web 应用程序未编译 - - - - MiniDump creation not compiled - 微型转储未编译 + Web 小程序未编译 @@ -1353,7 +1333,7 @@ This would ban both their forum username and their IP address. - + Conflicting Key Sequence 按键冲突 @@ -1374,27 +1354,37 @@ This would ban both their forum username and their IP address. 无效 - + + Invalid hotkey settings + 无效的热键设置 + + + + An error occurred. Please report this issue on github. + 发生错误。请在 GitHub 提交 Issue。 + + + Restore Default 恢复默认 - + Clear 清除 - + Conflicting Button Sequence 键位冲突 - + The default button sequence is already assigned to: %1 默认的按键序列已分配给: %1 - + The default key sequence is already assigned to: %1 默认的按键序列已分配给: %1 @@ -1720,7 +1710,7 @@ This would ban both their forum username and their IP address. Enable XInput 8 player support (disables web applet) - 启用 XInput 8 输入支持 (禁用 web 应用程序) + 启用 XInput 8 输入支持 (禁用 web 小程序) @@ -3372,67 +3362,72 @@ Drag points to change position, or double-click table cells to edit values.显示“文件类型”列 - + + Show Play Time Column + 显示“游玩时间”列 + + + Game Icon Size: 游戏图标大小: - + Folder Icon Size: 文件夹图标大小: - + Row 1 Text: 第一行: - + Row 2 Text: 第二行: - + Screenshots 捕获截图 - + Ask Where To Save Screenshots (Windows Only) 询问保存截图的位置 (仅限 Windows ) - + Screenshots Path: 截图保存位置: - + ... ... - + TextLabel 文本水印 - + Resolution: 分辨率: - + Select Screenshots Path... 选择截图保存位置... - + <System> <System> - + Auto (%1 x %2, %3 x %4) Screenshot width value 自动 (%1 x %2, %3 x %4) @@ -3750,820 +3745,824 @@ Drag points to change position, or double-click table cells to edit values. GMainWindow - + <a href='https://yuzu-emu.org/help/feature/telemetry/'>Anonymous data is collected</a> to help improve yuzu. <br/><br/>Would you like to share your usage data with us? <a href='https://yuzu-emu.org/help/feature/telemetry/'>我们收集匿名数据</a>来帮助改进 yuzu 。<br/><br/>您愿意和我们分享您的使用数据吗? - + Telemetry 使用数据共享 - + Broken Vulkan Installation Detected 检测到 Vulkan 的安装已损坏 - + Vulkan initialization failed during boot.<br><br>Click <a href='https://yuzu-emu.org/wiki/faq/#yuzu-starts-with-the-error-broken-vulkan-installation-detected'>here for instructions to fix the issue</a>. Vulkan 初始化失败。<br><br>点击<a href='https://yuzu-emu.org/wiki/faq/#yuzu-starts-with-the-error-broken-vulkan-installation-detected'>这里</a>获取此问题的相关信息。 - + Running a game TRANSLATORS: This string is shown to the user to explain why yuzu needs to prevent the computer from sleeping 游戏正在运行 - + Loading Web Applet... - 正在加载 Web 应用程序... + 正在加载 Web 小程序... - - + + Disable Web Applet - 禁用 Web 应用程序 + 禁用 Web 小程序 - + Disabling the web applet can lead to undefined behavior and should only be used with Super Mario 3D All-Stars. Are you sure you want to disable the web applet? (This can be re-enabled in the Debug settings.) - 禁用 Web 应用程序可能会发生未知的行为,且只能在《超级马里奥 3D 全明星》中使用。您确定要禁用 Web 应用程序吗? + 禁用 Web 小程序可能会发生未知的行为,且只能在《超级马里奥 3D 全明星》中使用。您确定要禁用 Web 小程序吗? (您可以在调试选项中重新启用它。) - + The amount of shaders currently being built 当前正在构建的着色器数量 - + The current selected resolution scaling multiplier. 当前选定的分辨率缩放比例。 - + Current emulation speed. Values higher or lower than 100% indicate emulation is running faster or slower than a Switch. 当前的模拟速度。高于或低于 100% 的值表示运行速度比实际的 Switch 更快或更慢。 - + How many frames per second the game is currently displaying. This will vary from game to game and scene to scene. 游戏当前运行的帧率。这将因游戏和场景的不同而有所变化。 - + Time taken to emulate a Switch frame, not counting framelimiting or v-sync. For full-speed emulation this should be at most 16.67 ms. 在不计算速度限制和垂直同步的情况下,模拟一个 Switch 帧的实际时间。若要进行全速模拟,这个数值不应超过 16.67 毫秒。 - + Unmute 取消静音 - + Mute 静音 - + Reset Volume 重置音量 - + &Clear Recent Files 清除最近文件 (&C) - + Emulated mouse is enabled 已启用模拟鼠标 - + Real mouse input and mouse panning are incompatible. Please disable the emulated mouse in input advanced settings to allow mouse panning. 实体鼠标输入与鼠标平移不兼容。请在高级输入设置中禁用模拟鼠标以使用鼠标平移。 - + &Continue 继续 (&C) - + &Pause 暂停 (&P) - + Warning Outdated Game Format 过时游戏格式警告 - + You are using the deconstructed ROM directory format for this game, which is an outdated format that has been superseded by others such as NCA, NAX, XCI, or NSP. Deconstructed ROM directories lack icons, metadata, and update support.<br><br>For an explanation of the various Switch formats yuzu supports, <a href='https://yuzu-emu.org/wiki/overview-of-switch-game-formats'>check out our wiki</a>. This message will not be shown again. 目前使用的游戏为解体的 ROM 目录格式,这是一种过时的格式,已被其他格式替代,如 NCA,NAX,XCI 或 NSP。解体的 ROM 目录缺少图标、元数据和更新支持。<br><br>有关 yuzu 支持的各种 Switch 格式的说明,<a href='https://yuzu-emu.org/wiki/overview-of-switch-game-formats'>请查看我们的 wiki</a>。此消息将不会再次出现。 - + Error while loading ROM! 加载 ROM 时出错! - + The ROM format is not supported. 该 ROM 格式不受支持。 - + An error occurred initializing the video core. 初始化视频核心时发生错误 - + yuzu has encountered an error while running the video core. This is usually caused by outdated GPU drivers, including integrated ones. Please see the log for more details. For more information on accessing the log, please see the following page: <a href='https://yuzu-emu.org/help/reference/log-files/'>How to Upload the Log File</a>. yuzu 在运行视频核心时发生错误。这可能是由 GPU 驱动程序过旧造成的。有关详细信息,请参阅日志文件。关于日志文件的更多信息,请参考以下页面:<a href='https://yuzu-emu.org/help/reference/log-files/'>如何上传日志文件</a>。 - + Error while loading ROM! %1 %1 signifies a numeric error code. 加载 ROM 时出错! %1 - + %1<br>Please follow <a href='https://yuzu-emu.org/help/quickstart/'>the yuzu quickstart guide</a> to redump your files.<br>You can refer to the yuzu wiki</a> or the yuzu Discord</a> for help. %1 signifies an error string. %1<br>请参考<a href='https://yuzu-emu.org/help/quickstart/'>yuzu 快速导航</a>以获取相关文件。<br>您可以参考 yuzu 的 wiki 页面</a>或 Discord 社区</a>以获得帮助。 - + An unknown error occurred. Please see the log for more details. 发生了未知错误。请查看日志了解详情。 - + (64-bit) (64-bit) - + (32-bit) (32-bit) - + %1 %2 %1 is the title name. %2 indicates if the title is 64-bit or 32-bit %1 %2 - + Closing software... 正在关闭… - + Save Data 保存数据 - + Mod Data Mod 数据 - + Error Opening %1 Folder 打开 %1 文件夹时出错 - - + + Folder does not exist! 文件夹不存在! - + Error Opening Transferable Shader Cache 打开可转移着色器缓存时出错 - + Failed to create the shader cache directory for this title. 为该游戏创建着色器缓存目录时失败。 - + Error Removing Contents 删除内容时出错 - + Error Removing Update 删除更新时出错 - + Error Removing DLC 删除 DLC 时出错 - + Remove Installed Game Contents? 删除已安装的游戏内容? - + Remove Installed Game Update? 删除已安装的游戏更新? - + Remove Installed Game DLC? 删除已安装的游戏 DLC 内容? - + Remove Entry 删除项目 - - - - - - + + + + + + Successfully Removed 删除成功 - + Successfully removed the installed base game. 成功删除已安装的游戏。 - + The base game is not installed in the NAND and cannot be removed. 该游戏未安装于 NAND 中,无法删除。 - + Successfully removed the installed update. 成功删除已安装的游戏更新。 - + There is no update installed for this title. 这个游戏没有任何已安装的更新。 - + There are no DLC installed for this title. 这个游戏没有任何已安装的 DLC 。 - + Successfully removed %1 installed DLC. 成功删除游戏 %1 安装的 DLC 。 - + Delete OpenGL Transferable Shader Cache? 删除 OpenGL 模式的着色器缓存? - + Delete Vulkan Transferable Shader Cache? 删除 Vulkan 模式的着色器缓存? - + Delete All Transferable Shader Caches? 删除所有的着色器缓存? - + Remove Custom Game Configuration? 移除自定义游戏设置? - + Remove Cache Storage? 移除缓存? - + Remove File 删除文件 - - + + Remove Play Time Data + 清除游玩时间 + + + + Reset play time? + 重置游玩时间? + + + + Error Removing Transferable Shader Cache 删除着色器缓存时出错 - - + + A shader cache for this title does not exist. 这个游戏的着色器缓存不存在。 - + Successfully removed the transferable shader cache. 成功删除着色器缓存。 - + Failed to remove the transferable shader cache. 删除着色器缓存失败。 - + Error Removing Vulkan Driver Pipeline Cache 删除 Vulkan 驱动程序管线缓存时出错 - + Failed to remove the driver pipeline cache. 删除驱动程序管线缓存失败。 - - + + Error Removing Transferable Shader Caches 删除着色器缓存时出错 - + Successfully removed the transferable shader caches. 着色器缓存删除成功。 - + Failed to remove the transferable shader cache directory. 删除着色器缓存目录失败。 - - + + Error Removing Custom Configuration 移除自定义游戏设置时出错 - + A custom configuration for this title does not exist. 这个游戏的自定义设置不存在。 - + Successfully removed the custom game configuration. 成功移除自定义游戏设置。 - + Failed to remove the custom game configuration. 移除自定义游戏设置失败。 - - + + RomFS Extraction Failed! RomFS 提取失败! - + There was an error copying the RomFS files or the user cancelled the operation. 复制 RomFS 文件时出错,或用户取消了操作。 - + Full 完整 - + Skeleton 框架 - + Select RomFS Dump Mode 选择 RomFS 转储模式 - + Please select the how you would like the RomFS dumped.<br>Full will copy all of the files into the new directory while <br>skeleton will only create the directory structure. 请选择 RomFS 转储的方式。<br>“完整” 会将所有文件复制到新目录中,而<br>“框架” 只会创建目录结构。 - + There is not enough free space at %1 to extract the RomFS. Please free up space or select a different dump directory at Emulation > Configure > System > Filesystem > Dump Root %1 没有足够的空间用于提取 RomFS。请保持足够的空间或于模拟—>设置—>系统—>文件系统—>转储根目录中选择一个其他目录。 - + Extracting RomFS... 正在提取 RomFS... - - - - + + + + Cancel 取消 - + RomFS Extraction Succeeded! RomFS 提取成功! - - - + + + The operation completed successfully. 操作成功完成。 - + Integrity verification couldn't be performed! 无法执行完整性验证! - + File contents were not checked for validity. 未检查文件的完整性。 - - + + Integrity verification failed! 完整性验证失败! - + File contents may be corrupt. 文件可能已经损坏。 - - + + Verifying integrity... 正在验证完整性... - - + + Integrity verification succeeded! 完整性验证成功! - - - - - + + + + Create Shortcut 创建快捷方式 - + This will create a shortcut to the current AppImage. This may not work well if you update. Continue? 这将为当前的游戏创建快捷方式。但在其更新后,快捷方式可能无法正常工作。是否继续? - - Cannot create shortcut on desktop. Path "%1" does not exist. - 无法在桌面创建快捷方式。路径“ %1 ”不存在。 + + Cannot create shortcut. Path "%1" does not exist. + 无法创建快捷方式。路径“ %1 ”不存在。 - - Cannot create shortcut in applications menu. Path "%1" does not exist and cannot be created. - 无法在应用程序菜单中创建快捷方式。路径“ %1 ”不存在且无法被创建。 - - - + Create Icon 创建图标 - + Cannot create icon file. Path "%1" does not exist and cannot be created. 无法创建图标文件。路径“ %1 ”不存在且无法被创建。 - + Start %1 with the yuzu Emulator 使用 yuzu 启动 %1 - + Failed to create a shortcut at %1 在 %1 处创建快捷方式时失败 - + Successfully created a shortcut to %1 成功地在 %1 处创建快捷方式 - + Error Opening %1 打开 %1 时出错 - + Select Directory 选择目录 - + Properties 属性 - + The game properties could not be loaded. 无法加载该游戏的属性信息。 - + Switch Executable (%1);;All Files (*.*) %1 is an identifier for the Switch executable file extensions. Switch 可执行文件 (%1);;所有文件 (*.*) - + Load File 加载文件 - + Open Extracted ROM Directory 打开提取的 ROM 目录 - + Invalid Directory Selected 选择的目录无效 - + The directory you have selected does not contain a 'main' file. 选择的目录不包含 “main” 文件。 - + Installable Switch File (*.nca *.nsp *.xci);;Nintendo Content Archive (*.nca);;Nintendo Submission Package (*.nsp);;NX Cartridge Image (*.xci) 可安装 Switch 文件 (*.nca *.nsp *.xci);;任天堂内容档案 (*.nca);;任天堂应用包 (*.nsp);;NX 卡带镜像 (*.xci) - + Install Files 安装文件 - + %n file(s) remaining 剩余 %n 个文件 - + Installing file "%1"... 正在安装文件 "%1"... - - + + Install Results 安装结果 - + To avoid possible conflicts, we discourage users from installing base games to the NAND. Please, only use this feature to install updates and DLC. 为了避免可能存在的冲突,我们不建议将游戏本体安装到 NAND 中。 此功能仅用于安装游戏更新和 DLC 。 - + %n file(s) were newly installed 最近安装了 %n 个文件 - + %n file(s) were overwritten %n 个文件被覆盖 - + %n file(s) failed to install %n 个文件安装失败 - + System Application 系统应用 - + System Archive 系统档案 - + System Application Update 系统应用更新 - + Firmware Package (Type A) 固件包 (A型) - + Firmware Package (Type B) 固件包 (B型) - + Game 游戏 - + Game Update 游戏更新 - + Game DLC 游戏 DLC - + Delta Title 差量程序 - + Select NCA Install Type... 选择 NCA 安装类型... - + Please select the type of title you would like to install this NCA as: (In most instances, the default 'Game' is fine.) 请选择此 NCA 的程序类型: (在大多数情况下,选择默认的“游戏”即可。) - + Failed to Install 安装失败 - + The title type you selected for the NCA is invalid. 选择的 NCA 程序类型无效。 - + File not found 找不到文件 - + File "%1" not found 文件 "%1" 未找到 - + OK 确定 - - + + Hardware requirements not met 硬件不满足要求 - - + + Your system does not meet the recommended hardware requirements. Compatibility reporting has been disabled. 您的系统不满足运行 yuzu 的推荐配置。兼容性报告已被禁用。 - + Missing yuzu Account 未设置 yuzu 账户 - + In order to submit a game compatibility test case, you must link your yuzu account.<br><br/>To link your yuzu account, go to Emulation &gt; Configuration &gt; Web. 要提交游戏兼容性测试用例,您必须设置您的 yuzu 帐户。<br><br/>要设置您的 yuzu 帐户,请转到模拟 &gt; 设置 &gt; 网络。 - + Error opening URL 打开 URL 时出错 - + Unable to open the URL "%1". 无法打开 URL : "%1" 。 - + TAS Recording TAS 录制中 - + Overwrite file of player 1? 覆盖玩家 1 的文件? - + Invalid config detected 检测到无效配置 - + Handheld controller can't be used on docked mode. Pro controller will be selected. 掌机手柄无法在主机模式中使用。将会选择 Pro controller。 - - + + Amiibo Amiibo - - + + The current amiibo has been removed 当前的 Amiibo 已被移除。 - + Error 错误 - - + + The current game is not looking for amiibos 当前游戏并没有在寻找 Amiibos - + Amiibo File (%1);; All Files (*.*) Amiibo 文件 (%1);; 全部文件 (*.*) - + Load Amiibo 加载 Amiibo - + Error loading Amiibo data 加载 Amiibo 数据时出错 - + The selected file is not a valid amiibo 选择的文件并不是有效的 amiibo - + The selected file is already on use 选择的文件已在使用中 - + An unknown error occurred 发生了未知错误 - + Verification failed for the following files: %1 @@ -4572,145 +4571,177 @@ Please, only use this feature to install updates and DLC. %1 - + + + No firmware available 无可用固件 - + + Please install the firmware to use the Album applet. + 请安装固件以使用相册小程序。 + + + + Album Applet + 相册小程序 + + + + Album applet is not available. Please reinstall firmware. + 相册小程序不可用。请重新安装固件。 + + + + Please install the firmware to use the Cabinet applet. + 请安装固件以使用 Cabinet 小程序。 + + + + Cabinet Applet + Cabinet 小程序 + + + + Cabinet applet is not available. Please reinstall firmware. + Cabinet 小程序不可用。请重新安装固件。 + + + Please install the firmware to use the Mii editor. 请安装固件以使用 Mii editor。 - + Mii Edit Applet - MiiEdit 小程序 + Mii Edit 小程序 - + Mii editor is not available. Please reinstall firmware. - Mii editor 不可用。请安装固件。 + Mii editor 不可用。请重新安装固件。 - + Capture Screenshot 捕获截图 - + PNG Image (*.png) PNG 图像 (*.png) - + TAS state: Running %1/%2 TAS 状态:正在运行 %1/%2 - + TAS state: Recording %1 TAS 状态:正在录制 %1 - + TAS state: Idle %1/%2 TAS 状态:空闲 %1/%2 - + TAS State: Invalid TAS 状态:无效 - + &Stop Running 停止运行 (&S) - + &Start 开始 (&S) - + Stop R&ecording 停止录制 (&E) - + R&ecord 录制 (&E) - + Building: %n shader(s) 正在编译 %n 个着色器文件 - + Scale: %1x %1 is the resolution scaling factor 缩放比例: %1x - + Speed: %1% / %2% 速度: %1% / %2% - + Speed: %1% 速度: %1% - + Game: %1 FPS (Unlocked) FPS: %1 (未锁定) - + Game: %1 FPS FPS: %1 - + Frame: %1 ms 帧延迟: %1 毫秒 - + %1 %2 %1 %2 - + FSR FSR - + NO AA 抗锯齿关 - + VOLUME: MUTE 音量: 静音 - + VOLUME: %1% Volume percentage (e.g. 50%) 音量: %1% - + Confirm Key Rederivation 确认重新生成密钥 - + You are about to force rederive all of your keys. If you do not know what this means or what you are doing, this is a potentially destructive action. @@ -4726,37 +4757,37 @@ This will delete your autogenerated key files and re-run the key derivation modu 这将删除您自动生成的密钥文件并重新运行密钥生成模块。 - + Missing fuses 项目丢失 - + - Missing BOOT0 - 丢失 BOOT0 - + - Missing BCPKG2-1-Normal-Main - 丢失 BCPKG2-1-Normal-Main - + - Missing PRODINFO - 丢失 PRODINFO - + Derivation Components Missing 组件丢失 - + Encryption keys are missing. <br>Please follow <a href='https://yuzu-emu.org/help/quickstart/'>the yuzu quickstart guide</a> to get all your keys, firmware and games.<br><br><small>(%1)</small> 密钥缺失。<br>请查看<a href='https://yuzu-emu.org/help/quickstart/'>yuzu 快速导航</a>以获得你的密钥、固件和游戏。<br><br><small>(%1)</small> - + Deriving keys... This may take up to a minute depending on your system's performance. @@ -4765,49 +4796,49 @@ on your system's performance. 您的系统性能。 - + Deriving Keys 生成密钥 - + System Archive Decryption Failed 系统固件解密失败 - + Encryption keys failed to decrypt firmware. <br>Please follow <a href='https://yuzu-emu.org/help/quickstart/'>the yuzu quickstart guide</a> to get all your keys, firmware and games. 当前密钥无法解密系统固件。<br>请查看<a href='https://yuzu-emu.org/help/quickstart/'>yuzu 快速导航</a>以获得你的密钥、固件和游戏。 - + Select RomFS Dump Target 选择 RomFS 转储目标 - + Please select which RomFS you would like to dump. 请选择希望转储的 RomFS。 - + Are you sure you want to close yuzu? 您确定要关闭 yuzu 吗? - - - + + + yuzu yuzu - + Are you sure you want to stop the emulation? Any unsaved progress will be lost. 您确定要停止模拟吗?未保存的进度将会丢失。 - + The currently running application has requested yuzu to not exit. Would you like to bypass this and exit anyway? @@ -4959,241 +4990,251 @@ Would you like to bypass this and exit anyway? GameList - + Favorite 收藏 - + Start Game 开始游戏 - + Start Game without Custom Configuration 使用公共设置项进行游戏 - + Open Save Data Location 打开存档位置 - + Open Mod Data Location 打开 MOD 数据位置 - + Open Transferable Pipeline Cache 打开可转移着色器缓存 - + Remove 删除 - + Remove Installed Update 删除已安装的游戏更新 - + Remove All Installed DLC 删除所有已安装 DLC - + Remove Custom Configuration 删除自定义设置 - + + Remove Play Time Data + 清除游玩时间 + + + Remove Cache Storage 移除缓存 - + Remove OpenGL Pipeline Cache 删除 OpenGL 着色器缓存 - + Remove Vulkan Pipeline Cache 删除 Vulkan 着色器缓存 - + Remove All Pipeline Caches 删除所有着色器缓存 - + Remove All Installed Contents 删除所有安装的项目 - - + + Dump RomFS 转储 RomFS - + Dump RomFS to SDMC 转储 RomFS 到 SDMC - + Verify Integrity 完整性验证 - + Copy Title ID to Clipboard 复制游戏 ID 到剪贴板 - + Navigate to GameDB entry 查看兼容性报告 - + Create Shortcut 创建快捷方式 - + Add to Desktop 添加到桌面 - + Add to Applications Menu 添加到应用程序菜单 - + Properties 属性 - + Scan Subfolders 扫描子文件夹 - + Remove Game Directory 移除游戏目录 - + ▲ Move Up ▲ 向上移动 - + ▼ Move Down ▼ 向下移动 - + Open Directory Location 打开目录位置 - + Clear 清除 - + Name 名称 - + Compatibility 兼容性 - + Add-ons 附加项 - + File type 文件类型 - + Size 大小 + + + Play time + 游玩时间 + GameListItemCompat - + Ingame 可进游戏 - + Game starts, but crashes or major glitches prevent it from being completed. 游戏可以开始,但会出现崩溃或严重故障导致游戏无法继续。 - + Perfect 完美 - + Game can be played without issues. 游戏可以毫无问题地运行。 - + Playable 可运行 - + Game functions with minor graphical or audio glitches and is playable from start to finish. 游戏可以从头到尾完整地运行,但可能出现轻微的图形或音频故障。 - + Intro/Menu 开场/菜单 - + Game loads, but is unable to progress past the Start Screen. 游戏可以加载,但无法通过标题页面。 - + Won't Boot 无法启动 - + The game crashes when attempting to startup. 在启动游戏时直接崩溃。 - + Not Tested 未测试 - + The game has not yet been tested. 游戏尚未经过测试。 @@ -5201,7 +5242,7 @@ Would you like to bypass this and exit anyway? GameListPlaceholder - + Double-click to add a new folder to the game list 双击添加新的游戏文件夹 @@ -5214,12 +5255,12 @@ Would you like to bypass this and exit anyway? %1 / %n 个结果 - + Filter: 搜索: - + Enter pattern to filter 搜索游戏 @@ -5337,6 +5378,7 @@ Debug Message: + Main Window 主窗口 @@ -5442,6 +5484,11 @@ Debug Message: + Toggle Renderdoc Capture + 切换到 Renderdoc 捕获截图 + + + Toggle Status Bar 切换状态栏 @@ -5680,186 +5727,216 @@ Debug Message: + &Amiibo + Amiibo (&A) + + + &TAS TAS (&T) - + &Help 帮助 (&H) - + &Install Files to NAND... 安装文件到 NAND... (&I) - + L&oad File... 加载文件... (&O) - + Load &Folder... 加载文件夹... (&F) - + E&xit 退出 (&X) - + &Pause 暂停 (&P) - + &Stop 停止 (&S) - + &Reinitialize keys... 重新生成密钥... (&R) - + &Verify Installed Contents 验证已安装内容的完整性 (&V) - + &About yuzu 关于 yuzu (&A) - + Single &Window Mode 单窗口模式 (&W) - + Con&figure... 设置... (&F) - + Display D&ock Widget Headers 显示停靠小部件的标题 (&O) - + Show &Filter Bar 显示搜索栏 (&F) - + Show &Status Bar 显示状态栏 (&S) - + Show Status Bar 显示状态栏 - + &Browse Public Game Lobby 浏览公共游戏大厅 (&B) - + &Create Room 创建房间 (&C) - + &Leave Room 离开房间 (&L) - + &Direct Connect to Room 直接连接到房间 (&D) - + &Show Current Room 显示当前房间 (&S) - + F&ullscreen 全屏 (&U) - + &Restart 重新启动 (&R) - + Load/Remove &Amiibo... 加载/移除 Amiibo... (&A) - + &Report Compatibility 报告兼容性 (&R) - + Open &Mods Page 打开 Mod 页面 (&M) - + Open &Quickstart Guide 查看快速导航 (&Q) - + &FAQ FAQ (&F) - + Open &yuzu Folder 打开 yuzu 文件夹 (&Y) - + &Capture Screenshot 捕获截图 (&C) - + + Open &Album + 打开相册 (&A) + + + + &Set Nickname and Owner + 设置昵称及所有者 (&S) + + + + &Delete Game Data + 删除游戏数据 (&D) + + + + &Restore Amiibo + 重置 Amiibo (&R) + + + + &Format Amiibo + 格式化 Amiibo (&F) + + + Open &Mii Editor 打开 Mii Editor (&M) - + &Configure TAS... 配置 TAS... (&C) - + Configure C&urrent Game... 配置当前游戏... (&U) - + &Start 开始 (&S) - + &Reset 重置 (&R) - + R&ecord 录制 (&E) @@ -6167,27 +6244,27 @@ p, li { white-space: pre-wrap; } 不在玩游戏 - + Installed SD Titles SD 卡中安装的项目 - + Installed NAND Titles NAND 中安装的项目 - + System Titles 系统项目 - + Add New Game Directory 添加游戏目录 - + Favorites 收藏 @@ -6682,7 +6759,7 @@ p, li { white-space: pre-wrap; } Controller Applet - 控制器程序 + 控制器小程序 @@ -6713,7 +6790,7 @@ p, li { white-space: pre-wrap; } - + Pro Controller Pro Controller @@ -6726,7 +6803,7 @@ p, li { white-space: pre-wrap; } - + Dual Joycons 双 Joycons 手柄 @@ -6739,7 +6816,7 @@ p, li { white-space: pre-wrap; } - + Left Joycon 左 Joycon 手柄 @@ -6752,7 +6829,7 @@ p, li { white-space: pre-wrap; } - + Right Joycon 右 Joycon 手柄 @@ -6781,7 +6858,7 @@ p, li { white-space: pre-wrap; } - + Handheld 掌机模式 @@ -6897,32 +6974,37 @@ p, li { white-space: pre-wrap; } 8 - + + Not enough controllers + 控制器数量不足 + + + GameCube Controller GameCube 控制器 - + Poke Ball Plus 精灵球 PLUS - + NES Controller NES 控制器 - + SNES Controller SNES 控制器 - + N64 Controller N64 控制器 - + Sega Genesis 世嘉创世纪 diff --git a/dist/languages/zh_TW.ts b/dist/languages/zh_TW.ts index 52421f6f61..f0cc66e0a9 100644 --- a/dist/languages/zh_TW.ts +++ b/dist/languages/zh_TW.ts @@ -373,13 +373,13 @@ This would ban both their forum username and their IP address. % - + Auto (%1) Auto select time zone 自動 (%1) - + Default (%1) Default time zone 預設 (%1) @@ -892,49 +892,29 @@ This would ban both their forum username and their IP address. - Create Minidump After Crash - 微型故障转储 - - - Enable this to output the latest generated audio command list to the console. Only affects games using the audio renderer. 启用此选项会将最新的音频命令列表输出到控制台。只影响使用音频渲染器的游戏。 - + Dump Audio Commands To Console** 将音频命令转储至控制台** - + Enable Verbose Reporting Services** 啟用詳細報告服務 - + **This will be reset automatically when yuzu closes. **當 yuzu 關閉時會自動重設。 - - Restart Required - 需要重新啟動 - - - - yuzu is required to restart in order to apply this setting. - yuzu 需要重新啟動以套用此設定。 - - - + Web applet not compiled Web 小程式未編譯 - - - MiniDump creation not compiled - 小型转储创建未编译 - ConfigureDebugController @@ -1353,7 +1333,7 @@ This would ban both their forum username and their IP address. - + Conflicting Key Sequence 按鍵衝突 @@ -1374,27 +1354,37 @@ This would ban both their forum username and their IP address. 無效 - + + Invalid hotkey settings + 无效的热键设置 + + + + An error occurred. Please report this issue on github. + 发生错误。请在 GitHub 提交 Issue。 + + + Restore Default 還原預設值 - + Clear 清除 - + Conflicting Button Sequence 按鍵衝突 - + The default button sequence is already assigned to: %1 預設的按鍵序列已分配給: %1 - + The default key sequence is already assigned to: %1 預設金鑰已指定給:%1 @@ -3372,67 +3362,72 @@ Drag points to change position, or double-click table cells to edit values.显示“文件类型”列 - + + Show Play Time Column + 显示“游玩时间”列 + + + Game Icon Size: 遊戲圖示大小: - + Folder Icon Size: 資料夾圖示大小: - + Row 1 Text: 第一行顯示文字: - + Row 2 Text: 第二行顯示文字: - + Screenshots 螢幕截圖 - + Ask Where To Save Screenshots (Windows Only) 詢問儲存螢幕截圖的位置(僅限 Windows) - + Screenshots Path: 螢幕截圖位置 - + ... ... - + TextLabel 文本标签 - + Resolution: 解析度: - + Select Screenshots Path... 選擇儲存螢幕截圖位置... - + <System> <System> - + Auto (%1 x %2, %3 x %4) Screenshot width value 自动 (%1 x %2, %3 x %4) @@ -3750,819 +3745,823 @@ Drag points to change position, or double-click table cells to edit values. GMainWindow - + <a href='https://yuzu-emu.org/help/feature/telemetry/'>Anonymous data is collected</a> to help improve yuzu. <br/><br/>Would you like to share your usage data with us? 我們<a href='https://yuzu-emu.org/help/feature/telemetry/'>蒐集匿名的資料</a>以幫助改善 yuzu。<br/><br/>您願意和我們分享您的使用資料嗎? - + Telemetry 遙測 - + Broken Vulkan Installation Detected 检测到 Vulkan 的安装已损坏 - + Vulkan initialization failed during boot.<br><br>Click <a href='https://yuzu-emu.org/wiki/faq/#yuzu-starts-with-the-error-broken-vulkan-installation-detected'>here for instructions to fix the issue</a>. Vulkan 初始化失败。<br><br>点击<a href='https://yuzu-emu.org/wiki/faq/#yuzu-starts-with-the-error-broken-vulkan-installation-detected'>这里</a>获取此问题的相关信息。 - + Running a game TRANSLATORS: This string is shown to the user to explain why yuzu needs to prevent the computer from sleeping 游戏正在运行 - + Loading Web Applet... 載入 Web Applet... - - + + Disable Web Applet 停用 Web Applet - + Disabling the web applet can lead to undefined behavior and should only be used with Super Mario 3D All-Stars. Are you sure you want to disable the web applet? (This can be re-enabled in the Debug settings.) 禁用 Web 应用程序可能会导致未知的行为,且只能在《超级马里奥 3D 全明星》中使用。您确定要禁用 Web 应用程序吗? (您可以在调试选项中重新启用它。) - + The amount of shaders currently being built 目前正在建構的著色器數量 - + The current selected resolution scaling multiplier. 目前選擇的解析度縮放比例。 - + Current emulation speed. Values higher or lower than 100% indicate emulation is running faster or slower than a Switch. 目前的模擬速度。高於或低於 100% 表示比實際 Switch 執行速度更快或更慢。 - + How many frames per second the game is currently displaying. This will vary from game to game and scene to scene. 遊戲即時 FPS。會因遊戲和場景的不同而改變。 - + Time taken to emulate a Switch frame, not counting framelimiting or v-sync. For full-speed emulation this should be at most 16.67 ms. 在不考慮幀數限制和垂直同步的情況下模擬一個 Switch 畫格的實際時間,若要全速模擬,此數值不得超過 16.67 毫秒。 - + Unmute 取消靜音 - + Mute 靜音 - + Reset Volume 重設音量 - + &Clear Recent Files 清除最近的檔案(&C) - + Emulated mouse is enabled 模擬滑鼠已啟用 - + Real mouse input and mouse panning are incompatible. Please disable the emulated mouse in input advanced settings to allow mouse panning. 实体鼠标输入与鼠标平移不兼容。请在高级输入设置中禁用模拟鼠标以使用鼠标平移。 - + &Continue 繼續(&C) - + &Pause &暫停 - + Warning Outdated Game Format 過時遊戲格式警告 - + You are using the deconstructed ROM directory format for this game, which is an outdated format that has been superseded by others such as NCA, NAX, XCI, or NSP. Deconstructed ROM directories lack icons, metadata, and update support.<br><br>For an explanation of the various Switch formats yuzu supports, <a href='https://yuzu-emu.org/wiki/overview-of-switch-game-formats'>check out our wiki</a>. This message will not be shown again. 此遊戲為解構的 ROM 資料夾格式,這是一種過時的格式,已被其他格式取代,如 NCA、NAX、XCI、NSP。解構的 ROM 目錄缺少圖示、中繼資料和更新支援。<br><br>有關 yuzu 支援的各種 Switch 格式說明,<a href='https://yuzu-emu.org/wiki/overview-of-switch-game-formats'>請參閱我們的 wiki </a>。此訊息將不再顯示。 - + Error while loading ROM! 載入 ROM 時發生錯誤! - + The ROM format is not supported. 此 ROM 格式不支援 - + An error occurred initializing the video core. 初始化視訊核心時發生錯誤 - + yuzu has encountered an error while running the video core. This is usually caused by outdated GPU drivers, including integrated ones. Please see the log for more details. For more information on accessing the log, please see the following page: <a href='https://yuzu-emu.org/help/reference/log-files/'>How to Upload the Log File</a>. yuzu 在執行視訊核心時發生錯誤。 這可能是 GPU 驅動程序過舊造成的。 詳細資訊請查閱日誌檔案。 關於日誌檔案的更多資訊,請參考以下頁面:<a href='https://yuzu-emu.org/help/reference/log-files/'>如何上傳日誌檔案</a>。 - + Error while loading ROM! %1 %1 signifies a numeric error code. 載入 ROM 時發生錯誤!%1 - + %1<br>Please follow <a href='https://yuzu-emu.org/help/quickstart/'>the yuzu quickstart guide</a> to redump your files.<br>You can refer to the yuzu wiki</a> or the yuzu Discord</a> for help. %1 signifies an error string. %1<br>請參閱 <a href='https://yuzu-emu.org/help/quickstart/'>yuzu 快速指引</a>以重新傾印檔案。<br>您可以前往 yuzu 的 wiki</a> 或 Discord 社群</a>以獲得幫助。 - + An unknown error occurred. Please see the log for more details. 發生未知錯誤,請檢視紀錄了解細節。 - + (64-bit) (64-bit) - + (32-bit) (32-bit) - + %1 %2 %1 is the title name. %2 indicates if the title is 64-bit or 32-bit %1 %2 - + Closing software... 正在關閉軟體… - + Save Data 儲存資料 - + Mod Data 模組資料 - + Error Opening %1 Folder 開啟資料夾 %1 時發生錯誤 - - + + Folder does not exist! 資料夾不存在 - + Error Opening Transferable Shader Cache 開啟通用著色器快取位置時發生錯誤 - + Failed to create the shader cache directory for this title. 無法新增此遊戲的著色器快取資料夾。 - + Error Removing Contents 移除內容時發生錯誤 - + Error Removing Update 移除更新時發生錯誤 - + Error Removing DLC 移除 DLC 時發生錯誤 - + Remove Installed Game Contents? 移除已安裝的遊戲內容? - + Remove Installed Game Update? 移除已安裝的遊戲更新? - + Remove Installed Game DLC? 移除已安裝的遊戲 DLC? - + Remove Entry 移除項目 - - - - - - + + + + + + Successfully Removed 移除成功 - + Successfully removed the installed base game. 成功移除已安裝的遊戲。 - + The base game is not installed in the NAND and cannot be removed. 此遊戲並非安裝在內部儲存空間,因此無法移除。 - + Successfully removed the installed update. 成功移除已安裝的遊戲更新。 - + There is no update installed for this title. 此遊戲沒有已安裝的更新。 - + There are no DLC installed for this title. 此遊戲沒有已安裝的 DLC。 - + Successfully removed %1 installed DLC. 成功移除遊戲 %1 已安裝的 DLC。 - + Delete OpenGL Transferable Shader Cache? 刪除 OpenGL 模式的著色器快取? - + Delete Vulkan Transferable Shader Cache? 刪除 Vulkan 模式的著色器快取? - + Delete All Transferable Shader Caches? 刪除所有的著色器快取? - + Remove Custom Game Configuration? 移除額外遊戲設定? - + Remove Cache Storage? 移除快取儲存空間? - + Remove File 刪除檔案 - - + + Remove Play Time Data + 清除游玩时间 + + + + Reset play time? + 重置游玩时间? + + + + Error Removing Transferable Shader Cache 刪除通用著色器快取時發生錯誤 - - + + A shader cache for this title does not exist. 此遊戲沒有著色器快取 - + Successfully removed the transferable shader cache. 成功刪除著色器快取。 - + Failed to remove the transferable shader cache. 刪除通用著色器快取失敗。 - + Error Removing Vulkan Driver Pipeline Cache 移除 Vulkan 驅動程式管線快取時發生錯誤 - + Failed to remove the driver pipeline cache. 無法移除驅動程式管線快取。 - - + + Error Removing Transferable Shader Caches 刪除通用著色器快取時發生錯誤 - + Successfully removed the transferable shader caches. 成功刪除通用著色器快取。 - + Failed to remove the transferable shader cache directory. 無法刪除著色器快取資料夾。 - - + + Error Removing Custom Configuration 移除額外遊戲設定時發生錯誤 - + A custom configuration for this title does not exist. 此遊戲沒有額外設定。 - + Successfully removed the custom game configuration. 成功移除額外遊戲設定。 - + Failed to remove the custom game configuration. 移除額外遊戲設定失敗。 - - + + RomFS Extraction Failed! RomFS 抽取失敗! - + There was an error copying the RomFS files or the user cancelled the operation. 複製 RomFS 檔案時發生錯誤或使用者取消動作。 - + Full 全部 - + Skeleton 部分 - + Select RomFS Dump Mode 選擇RomFS傾印模式 - + Please select the how you would like the RomFS dumped.<br>Full will copy all of the files into the new directory while <br>skeleton will only create the directory structure. 請選擇如何傾印 RomFS。<br>「全部」會複製所有檔案到新資料夾中,而<br>「部分」只會建立資料夾結構。 - + There is not enough free space at %1 to extract the RomFS. Please free up space or select a different dump directory at Emulation > Configure > System > Filesystem > Dump Root %1 沒有足夠的空間用於抽取 RomFS。請確保有足夠的空間或於模擬 > 設定 >系統 >檔案系統 > 傾印根目錄中選擇其他資料夾。 - + Extracting RomFS... 抽取 RomFS 中... - - - - + + + + Cancel 取消 - + RomFS Extraction Succeeded! RomFS 抽取完成! - - - + + + The operation completed successfully. 動作已成功完成 - + Integrity verification couldn't be performed! 无法执行完整性验证! - + File contents were not checked for validity. 未检查文件的完整性。 - - + + Integrity verification failed! 完整性验证失败! - + File contents may be corrupt. 文件可能已经损坏。 - - + + Verifying integrity... 正在验证完整性... - - + + Integrity verification succeeded! 完整性验证成功! - - - - - + + + + Create Shortcut 建立捷徑 - + This will create a shortcut to the current AppImage. This may not work well if you update. Continue? 這將會為目前的應用程式映像建立捷徑,可能在其更新後無法運作,仍要繼續嗎? - - Cannot create shortcut on desktop. Path "%1" does not exist. - 無法在桌面上建立捷徑,路徑「%1」不存在。 + + Cannot create shortcut. Path "%1" does not exist. + 无法创建快捷方式。路径“ %1 ”不存在。 - - Cannot create shortcut in applications menu. Path "%1" does not exist and cannot be created. - 無法在應用程式選單中建立捷徑,路徑「%1」不存在且無法建立。 - - - + Create Icon 建立圖示 - + Cannot create icon file. Path "%1" does not exist and cannot be created. 無法建立圖示檔案,路徑「%1」不存在且無法建立。 - + Start %1 with the yuzu Emulator 使用 yuzu 模擬器啟動 %1 - + Failed to create a shortcut at %1 無法在 %1 建立捷徑 - + Successfully created a shortcut to %1 已成功在 %1 建立捷徑 - + Error Opening %1 開啟 %1 時發生錯誤 - + Select Directory 選擇資料夾 - + Properties 屬性 - + The game properties could not be loaded. 無法載入遊戲屬性 - + Switch Executable (%1);;All Files (*.*) %1 is an identifier for the Switch executable file extensions. Switch 執行檔 (%1);;所有檔案 (*.*) - + Load File 開啟檔案 - + Open Extracted ROM Directory 開啟已抽取的 ROM 資料夾 - + Invalid Directory Selected 選擇的資料夾無效 - + The directory you have selected does not contain a 'main' file. 選擇的資料夾未包含「main」檔案。 - + Installable Switch File (*.nca *.nsp *.xci);;Nintendo Content Archive (*.nca);;Nintendo Submission Package (*.nsp);;NX Cartridge Image (*.xci) 可安装的 Switch 檔案 (*.nca *.nsp *.xci);;Nintendo Content Archive (*.nca);;Nintendo Submission Package (*.nsp);;NX 卡帶映像 (*.xci) - + Install Files 安裝檔案 - + %n file(s) remaining 剩餘 %n 個檔案 - + Installing file "%1"... 正在安裝檔案「%1」... - - + + Install Results 安裝結果 - + To avoid possible conflicts, we discourage users from installing base games to the NAND. Please, only use this feature to install updates and DLC. 為了避免潛在的衝突,不建議將遊戲本體安裝至內部儲存空間。 此功能僅用於安裝遊戲更新和 DLC。 - + %n file(s) were newly installed 最近安裝了 %n 個檔案 - + %n file(s) were overwritten %n 個檔案被取代 - + %n file(s) failed to install %n 個檔案安裝失敗 - + System Application 系統應用程式 - + System Archive 系統檔案 - + System Application Update 系統應用程式更新 - + Firmware Package (Type A) 韌體包(A型) - + Firmware Package (Type B) 韌體包(B型) - + Game 遊戲 - + Game Update 遊戲更新 - + Game DLC 遊戲 DLC - + Delta Title Delta Title - + Select NCA Install Type... 選擇 NCA 安裝類型... - + Please select the type of title you would like to install this NCA as: (In most instances, the default 'Game' is fine.) 請選擇此 NCA 的安裝類型: (在多數情況下,選擇預設的「遊戲」即可。) - + Failed to Install 安裝失敗 - + The title type you selected for the NCA is invalid. 選擇的 NCA 安裝類型無效。 - + File not found 找不到檔案 - + File "%1" not found 找不到「%1」檔案 - + OK 確定 - - + + Hardware requirements not met 硬體不符合需求 - - + + Your system does not meet the recommended hardware requirements. Compatibility reporting has been disabled. 您的系統不符合建議的硬體需求,相容性回報已停用。 - + Missing yuzu Account 未設定 yuzu 帳號 - + In order to submit a game compatibility test case, you must link your yuzu account.<br><br/>To link your yuzu account, go to Emulation &gt; Configuration &gt; Web. 為了上傳相容性測試結果,您必須登入 yuzu 帳號。<br><br/>欲登入 yuzu 帳號請至模擬 &gt; 設定 &gt; 網路。 - + Error opening URL 開啟 URL 時發生錯誤 - + Unable to open the URL "%1". 無法開啟 URL:「%1」。 - + TAS Recording TAS 錄製 - + Overwrite file of player 1? 覆寫玩家 1 的檔案? - + Invalid config detected 偵測到無效設定 - + Handheld controller can't be used on docked mode. Pro controller will be selected. 掌機手把無法在主機模式中使用。將會選擇 Pro 手把。 - - + + Amiibo Amiibo - - + + The current amiibo has been removed 目前 Amiibo 已被移除。 - + Error 錯誤 - - + + The current game is not looking for amiibos 目前遊戲並未在尋找 Amiibos - + Amiibo File (%1);; All Files (*.*) Amiibo 檔案 (%1);; 所有檔案 (*.*) - + Load Amiibo 開啟 Amiibo - + Error loading Amiibo data 載入 Amiibo 資料時發生錯誤 - + The selected file is not a valid amiibo 選取的檔案不是有效的 Amiibo - + The selected file is already on use 選取的檔案已在使用中 - + An unknown error occurred 發生了未知錯誤 - + Verification failed for the following files: %1 @@ -4571,145 +4570,177 @@ Please, only use this feature to install updates and DLC. %1 - + + + No firmware available 无可用固件 - + + Please install the firmware to use the Album applet. + 请安装固件以使用相册小程序。 + + + + Album Applet + 相册小程序 + + + + Album applet is not available. Please reinstall firmware. + 相册小程序不可用。请安装固件。 + + + + Please install the firmware to use the Cabinet applet. + 请安装固件以使用 Cabinet 小程序。 + + + + Cabinet Applet + Cabinet 小程序 + + + + Cabinet applet is not available. Please reinstall firmware. + Cabinet 小程序不可用。请安装固件。 + + + Please install the firmware to use the Mii editor. 请安装固件以使用 Mii editor。 - + Mii Edit Applet MiiEdit 小程序 - + Mii editor is not available. Please reinstall firmware. Mii editor 不可用。请安装固件。 - + Capture Screenshot 截圖 - + PNG Image (*.png) PNG 圖片 (*.png) - + TAS state: Running %1/%2 TAS 狀態:正在執行 %1/%2 - + TAS state: Recording %1 TAS 狀態:正在錄製 %1 - + TAS state: Idle %1/%2 TAS 狀態:閒置 %1/%2 - + TAS State: Invalid TAS 狀態:無效 - + &Stop Running &停止執行 - + &Start 開始(&S) - + Stop R&ecording 停止錄製 - + R&ecord 錄製 (&E) - + Building: %n shader(s) 正在編譯 %n 個著色器檔案 - + Scale: %1x %1 is the resolution scaling factor 縮放比例:%1x - + Speed: %1% / %2% 速度:%1% / %2% - + Speed: %1% 速度:%1% - + Game: %1 FPS (Unlocked) 遊戲: %1 FPS(未限制) - + Game: %1 FPS 遊戲:%1 FPS - + Frame: %1 ms 畫格延遲:%1 ms - + %1 %2 %1 %2 - + FSR FSR - + NO AA 抗鋸齒關 - + VOLUME: MUTE 音量: 靜音 - + VOLUME: %1% Volume percentage (e.g. 50%) 音量: %1% - + Confirm Key Rederivation 確認重新產生金鑰 - + You are about to force rederive all of your keys. If you do not know what this means or what you are doing, this is a potentially destructive action. @@ -4725,37 +4756,37 @@ This will delete your autogenerated key files and re-run the key derivation modu 這將刪除您自動產生的金鑰檔案並重新執行產生金鑰模組。 - + Missing fuses 遺失項目 - + - Missing BOOT0 - 遺失 BOOT0 - + - Missing BCPKG2-1-Normal-Main - 遺失 BCPKG2-1-Normal-Main - + - Missing PRODINFO - 遺失 PRODINFO - + Derivation Components Missing 遺失產生元件 - + Encryption keys are missing. <br>Please follow <a href='https://yuzu-emu.org/help/quickstart/'>the yuzu quickstart guide</a> to get all your keys, firmware and games.<br><br><small>(%1)</small> 缺少加密金鑰。 <br>請按照<a href='https://yuzu-emu.org/help/quickstart/'>《Yuzu快速入門指南》來取得所有金鑰、韌體、遊戲<br><br><small>(%1)。 - + Deriving keys... This may take up to a minute depending on your system's performance. @@ -4764,49 +4795,49 @@ on your system's performance. 您的系統效能。 - + Deriving Keys 產生金鑰 - + System Archive Decryption Failed 系統封存解密失敗 - + Encryption keys failed to decrypt firmware. <br>Please follow <a href='https://yuzu-emu.org/help/quickstart/'>the yuzu quickstart guide</a> to get all your keys, firmware and games. 加密金鑰無法解密韌體。<br>請依循<a href='https://yuzu-emu.org/help/quickstart/'>yuzu 快速開始指南</a>以取得您的金鑰、韌體和遊戲。 - + Select RomFS Dump Target 選擇 RomFS 傾印目標 - + Please select which RomFS you would like to dump. 請選擇希望傾印的 RomFS。 - + Are you sure you want to close yuzu? 您確定要關閉 yuzu 嗎? - - - + + + yuzu yuzu - + Are you sure you want to stop the emulation? Any unsaved progress will be lost. 您確定要停止模擬嗎?未儲存的進度將會遺失。 - + The currently running application has requested yuzu to not exit. Would you like to bypass this and exit anyway? @@ -4958,241 +4989,251 @@ Would you like to bypass this and exit anyway? GameList - + Favorite 我的最愛 - + Start Game 開始遊戲 - + Start Game without Custom Configuration 開始遊戲(不使用額外設定) - + Open Save Data Location 開啟存檔位置 - + Open Mod Data Location 開啟模組位置 - + Open Transferable Pipeline Cache 開啟通用著色器管線快取位置 - + Remove 移除 - + Remove Installed Update 移除已安裝的遊戲更新 - + Remove All Installed DLC 移除所有安裝的遊戲更新 - + Remove Custom Configuration 移除額外設定 - + + Remove Play Time Data + 清除游玩时间 + + + Remove Cache Storage 移除快取儲存空間 - + Remove OpenGL Pipeline Cache 刪除 OpenGL 著色器管線快取 - + Remove Vulkan Pipeline Cache 刪除 Vulkan 著色器管線快取 - + Remove All Pipeline Caches 刪除所有著色器管線快取 - + Remove All Installed Contents 移除所有安裝項目 - - + + Dump RomFS 傾印 RomFS - + Dump RomFS to SDMC 傾印 RomFS 到 SDMC - + Verify Integrity 完整性验证 - + Copy Title ID to Clipboard 複製遊戲 ID 到剪貼簿 - + Navigate to GameDB entry 檢視遊戲相容性報告 - + Create Shortcut 建立捷徑 - + Add to Desktop 新增至桌面 - + Add to Applications Menu 新增至應用程式選單 - + Properties 屬性 - + Scan Subfolders 包含子資料夾 - + Remove Game Directory 移除遊戲資料夾 - + ▲ Move Up ▲ 向上移動 - + ▼ Move Down ▼ 向下移動 - + Open Directory Location 開啟資料夾位置 - + Clear 清除 - + Name 名稱 - + Compatibility 相容性 - + Add-ons 延伸模組 - + File type 檔案格式 - + Size 大小 + + + Play time + 游玩时间 + GameListItemCompat - + Ingame 遊戲內 - + Game starts, but crashes or major glitches prevent it from being completed. 遊戲可以執行,但可能會出現當機或故障導致遊戲無法正常運作。 - + Perfect 完美 - + Game can be played without issues. 遊戲可以毫無問題的遊玩。 - + Playable 可遊玩 - + Game functions with minor graphical or audio glitches and is playable from start to finish. 遊戲自始至終可以正常遊玩,但可能會有一些輕微的圖形或音訊故障。 - + Intro/Menu 開始畫面/選單 - + Game loads, but is unable to progress past the Start Screen. 遊戲可以載入,但無法通過開始畫面。 - + Won't Boot 無法啟動 - + The game crashes when attempting to startup. 啟動遊戲時異常關閉 - + Not Tested 未測試 - + The game has not yet been tested. 此遊戲尚未經過測試 @@ -5200,7 +5241,7 @@ Would you like to bypass this and exit anyway? GameListPlaceholder - + Double-click to add a new folder to the game list 連點兩下以新增資料夾至遊戲清單 @@ -5213,12 +5254,12 @@ Would you like to bypass this and exit anyway? %1 / %n 個結果 - + Filter: 搜尋: - + Enter pattern to filter 輸入文字以搜尋 @@ -5336,6 +5377,7 @@ Debug Message: + Main Window 主要視窗 @@ -5441,6 +5483,11 @@ Debug Message: + Toggle Renderdoc Capture + 切换到 Renderdoc 捕获截图 + + + Toggle Status Bar 切換狀態列 @@ -5678,186 +5725,216 @@ Debug Message: + &Amiibo + Amiibo (&A) + + + &TAS TAS (&T) - + &Help 說明 (&H) - + &Install Files to NAND... &安裝檔案至內部儲存空間 - + L&oad File... 開啟檔案(&O)... - + Load &Folder... 開啟資料夾(&F)... - + E&xit 結束(&X) - + &Pause 暫停(&P) - + &Stop 停止(&S) - + &Reinitialize keys... 重新初始化金鑰(&R)... - + &Verify Installed Contents 验证已安装内容的完整性 (&V) - + &About yuzu 關於 yuzu(&A) - + Single &Window Mode 單一視窗模式(&W) - + Con&figure... 設定 (&F) - + Display D&ock Widget Headers 顯示 Dock 小工具標題 (&O) - + Show &Filter Bar 顯示搜尋列(&F) - + Show &Status Bar 顯示狀態列(&S) - + Show Status Bar 顯示狀態列 - + &Browse Public Game Lobby 瀏覽公用遊戲大廳 (&B) - + &Create Room 建立房間 (&C) - + &Leave Room 離開房間 (&L) - + &Direct Connect to Room 直接連線到房間 (&D) - + &Show Current Room 顯示目前的房間 (&S) - + F&ullscreen 全螢幕(&U) - + &Restart 重新啟動(&R) - + Load/Remove &Amiibo... 載入/移除 Amiibo... (&A) - + &Report Compatibility 回報相容性(&R) - + Open &Mods Page 模組資訊 (&M) - + Open &Quickstart Guide 快速入門 (&Q) - + &FAQ 常見問題 (&F) - + Open &yuzu Folder 開啟 yuzu 資料夾(&Y) - + &Capture Screenshot 截圖 (&C) - + + Open &Album + 打开相册 (&A) + + + + &Set Nickname and Owner + 设置昵称及所有者 (&S) + + + + &Delete Game Data + 删除游戏数据 (&D) + + + + &Restore Amiibo + 重置 Amiibo (&R) + + + + &Format Amiibo + 格式化 Amiibo (&F) + + + Open &Mii Editor 打开 Mii Editor (&M) - + &Configure TAS... 設定 &TAS… - + Configure C&urrent Game... 目前遊戲設定...(&U) - + &Start 開始(&S) - + &Reset 重設 (&R) - + R&ecord 錄製 (&E) @@ -6165,27 +6242,27 @@ p, li { white-space: pre-wrap; } 不在玩游戏 - + Installed SD Titles 安裝在 SD 卡中的遊戲 - + Installed NAND Titles 安裝在內部儲存空間中的遊戲 - + System Titles 系統項目 - + Add New Game Directory 加入遊戲資料夾 - + Favorites 我的最愛 @@ -6711,7 +6788,7 @@ p, li { white-space: pre-wrap; } - + Pro Controller Pro 手把 @@ -6724,7 +6801,7 @@ p, li { white-space: pre-wrap; } - + Dual Joycons 雙 Joycon 手把 @@ -6737,7 +6814,7 @@ p, li { white-space: pre-wrap; } - + Left Joycon 左 Joycon 手把 @@ -6750,7 +6827,7 @@ p, li { white-space: pre-wrap; } - + Right Joycon 右 Joycon 手把 @@ -6779,7 +6856,7 @@ p, li { white-space: pre-wrap; } - + Handheld 掌機模式 @@ -6895,32 +6972,37 @@ p, li { white-space: pre-wrap; } 8 - + + Not enough controllers + 控制器数量不足 + + + GameCube Controller GameCube 手把 - + Poke Ball Plus 精靈球 PLUS - + NES Controller NES 控制手把 - + SNES Controller SNES 控制手把 - + N64 Controller N64 控制手把 - + Sega Genesis Mega Drive From 135b645b3d666f541d5955aaa82af4c480643fde Mon Sep 17 00:00:00 2001 From: Charles Lombardo Date: Tue, 31 Oct 2023 20:43:01 -0400 Subject: [PATCH 037/154] ci: android: Use signing key if available Lets gradle handle apk signing when available --- .ci/scripts/android/build.sh | 9 +++++++++ .ci/scripts/android/upload.sh | 12 ------------ 2 files changed, 9 insertions(+), 12 deletions(-) diff --git a/.ci/scripts/android/build.sh b/.ci/scripts/android/build.sh index a5fd1ee181..d135af029d 100755 --- a/.ci/scripts/android/build.sh +++ b/.ci/scripts/android/build.sh @@ -8,8 +8,17 @@ ccache -s BUILD_FLAVOR=mainline +if [ ! -z "${ANDROID_KEYSTORE_B64}" ]; then + export ANDROID_KEYSTORE_FILE="${GITHUB_WORKSPACE}/ks.jks" + base64 --decode <<< "${ANDROID_KEYSTORE_B64}" > "${ANDROID_KEYSTORE_FILE}" +fi + cd src/android chmod +x ./gradlew ./gradlew "assemble${BUILD_FLAVOR}Release" "bundle${BUILD_FLAVOR}Release" ccache -s + +if [ ! -z "${ANDROID_KEYSTORE_B64}" ]; then + rm "${ANDROID_KEYSTORE_FILE}" +fi diff --git a/.ci/scripts/android/upload.sh b/.ci/scripts/android/upload.sh index cfaeff3286..5f8ca73c08 100755 --- a/.ci/scripts/android/upload.sh +++ b/.ci/scripts/android/upload.sh @@ -13,15 +13,3 @@ cp src/android/app/build/outputs/apk/"${BUILD_FLAVOR}/release/app-${BUILD_FLAVOR "artifacts/${REV_NAME}.apk" cp src/android/app/build/outputs/bundle/"${BUILD_FLAVOR}Release"/"app-${BUILD_FLAVOR}-release.aab" \ "artifacts/${REV_NAME}.aab" - -if [ -n "${ANDROID_KEYSTORE_B64}" ] -then - echo "Signing apk..." - base64 --decode <<< "${ANDROID_KEYSTORE_B64}" > ks.jks - - apksigner sign --ks ks.jks \ - --ks-key-alias "${ANDROID_KEY_ALIAS}" \ - --ks-pass env:ANDROID_KEYSTORE_PASS "artifacts/${REV_NAME}.apk" -else - echo "No keystore specified, not signing the APK files." -fi From b0c6bf497a1eabec14c116b710dcc757e77455bf Mon Sep 17 00:00:00 2001 From: Liam Date: Tue, 31 Oct 2023 20:11:14 -0400 Subject: [PATCH 038/154] romfs: fix extraction of single-directory root --- src/core/file_sys/romfs.cpp | 44 +++++++------------ src/core/file_sys/romfs.h | 9 +--- .../service/am/applets/applet_web_browser.cpp | 3 +- src/yuzu/main.cpp | 2 +- 4 files changed, 18 insertions(+), 40 deletions(-) diff --git a/src/core/file_sys/romfs.cpp b/src/core/file_sys/romfs.cpp index 1c580de57a..1eb1f439ab 100644 --- a/src/core/file_sys/romfs.cpp +++ b/src/core/file_sys/romfs.cpp @@ -35,13 +35,14 @@ struct RomFSHeader { static_assert(sizeof(RomFSHeader) == 0x50, "RomFSHeader has incorrect size."); struct DirectoryEntry { + u32_le parent; u32_le sibling; u32_le child_dir; u32_le child_file; u32_le hash; u32_le name_length; }; -static_assert(sizeof(DirectoryEntry) == 0x14, "DirectoryEntry has incorrect size."); +static_assert(sizeof(DirectoryEntry) == 0x18, "DirectoryEntry has incorrect size."); struct FileEntry { u32_le parent; @@ -64,25 +65,22 @@ std::pair GetEntry(const VirtualFile& file, std::size_t offs return {entry, string}; } -void ProcessFile(VirtualFile file, std::size_t file_offset, std::size_t data_offset, - u32 this_file_offset, std::shared_ptr parent) { - while (true) { +void ProcessFile(const VirtualFile& file, std::size_t file_offset, std::size_t data_offset, + u32 this_file_offset, std::shared_ptr& parent) { + while (this_file_offset != ROMFS_ENTRY_EMPTY) { auto entry = GetEntry(file, file_offset + this_file_offset); parent->AddFile(std::make_shared( file, entry.first.size, entry.first.offset + data_offset, entry.second)); - if (entry.first.sibling == ROMFS_ENTRY_EMPTY) - break; - this_file_offset = entry.first.sibling; } } -void ProcessDirectory(VirtualFile file, std::size_t dir_offset, std::size_t file_offset, +void ProcessDirectory(const VirtualFile& file, std::size_t dir_offset, std::size_t file_offset, std::size_t data_offset, u32 this_dir_offset, - std::shared_ptr parent) { - while (true) { + std::shared_ptr& parent) { + while (this_dir_offset != ROMFS_ENTRY_EMPTY) { auto entry = GetEntry(file, dir_offset + this_dir_offset); auto current = std::make_shared( std::vector{}, std::vector{}, entry.second); @@ -97,14 +95,12 @@ void ProcessDirectory(VirtualFile file, std::size_t dir_offset, std::size_t file } parent->AddDirectory(current); - if (entry.first.sibling == ROMFS_ENTRY_EMPTY) - break; this_dir_offset = entry.first.sibling; } } } // Anonymous namespace -VirtualDir ExtractRomFS(VirtualFile file, RomFSExtractionType type) { +VirtualDir ExtractRomFS(VirtualFile file) { RomFSHeader header{}; if (file->ReadObject(&header) != sizeof(RomFSHeader)) return nullptr; @@ -113,27 +109,17 @@ VirtualDir ExtractRomFS(VirtualFile file, RomFSExtractionType type) { return nullptr; const u64 file_offset = header.file_meta.offset; - const u64 dir_offset = header.directory_meta.offset + 4; + const u64 dir_offset = header.directory_meta.offset; - auto root = - std::make_shared(std::vector{}, std::vector{}, - file->GetName(), file->GetContainingDirectory()); + auto root_container = std::make_shared(); - ProcessDirectory(file, dir_offset, file_offset, header.data_offset, 0, root); + ProcessDirectory(file, dir_offset, file_offset, header.data_offset, 0, root_container); - VirtualDir out = std::move(root); - - if (type == RomFSExtractionType::SingleDiscard) - return out->GetSubdirectories().front(); - - while (out->GetSubdirectories().size() == 1 && out->GetFiles().empty()) { - if (Common::ToLower(out->GetSubdirectories().front()->GetName()) == "data" && - type == RomFSExtractionType::Truncated) - break; - out = out->GetSubdirectories().front(); + if (auto root = root_container->GetSubdirectory(""); root) { + return std::make_shared(std::move(root)); } - return std::make_shared(std::move(out)); + return nullptr; } VirtualFile CreateRomFS(VirtualDir dir, VirtualDir ext) { diff --git a/src/core/file_sys/romfs.h b/src/core/file_sys/romfs.h index 5d7f0c2a8a..b75ff1aada 100644 --- a/src/core/file_sys/romfs.h +++ b/src/core/file_sys/romfs.h @@ -7,16 +7,9 @@ namespace FileSys { -enum class RomFSExtractionType { - Full, // Includes data directory - Truncated, // Traverses into data directory - SingleDiscard, // Traverses into the first subdirectory of root -}; - // Converts a RomFS binary blob to VFS Filesystem // Returns nullptr on failure -VirtualDir ExtractRomFS(VirtualFile file, - RomFSExtractionType type = RomFSExtractionType::Truncated); +VirtualDir ExtractRomFS(VirtualFile file); // Converts a VFS filesystem into a RomFS binary // Returns nullptr on failure diff --git a/src/core/hle/service/am/applets/applet_web_browser.cpp b/src/core/hle/service/am/applets/applet_web_browser.cpp index 1c9a1dc298..b0ea2b3816 100644 --- a/src/core/hle/service/am/applets/applet_web_browser.cpp +++ b/src/core/hle/service/am/applets/applet_web_browser.cpp @@ -330,8 +330,7 @@ void WebBrowser::ExtractOfflineRomFS() { LOG_DEBUG(Service_AM, "Extracting RomFS to {}", Common::FS::PathToUTF8String(offline_cache_dir)); - const auto extracted_romfs_dir = - FileSys::ExtractRomFS(offline_romfs, FileSys::RomFSExtractionType::SingleDiscard); + const auto extracted_romfs_dir = FileSys::ExtractRomFS(offline_romfs); const auto temp_dir = system.GetFilesystem()->CreateDirectory( Common::FS::PathToUTF8String(offline_cache_dir), FileSys::Mode::ReadWrite); diff --git a/src/yuzu/main.cpp b/src/yuzu/main.cpp index 0df163029b..db9da6dc8d 100644 --- a/src/yuzu/main.cpp +++ b/src/yuzu/main.cpp @@ -2737,7 +2737,7 @@ void GMainWindow::OnGameListDumpRomFS(u64 program_id, const std::string& game_pa return; } - const auto extracted = FileSys::ExtractRomFS(romfs, FileSys::RomFSExtractionType::Full); + const auto extracted = FileSys::ExtractRomFS(romfs); if (extracted == nullptr) { failed(); return; From 2b6edd3efd1c3a88ed47249b77e7b12951d8a13d Mon Sep 17 00:00:00 2001 From: Charles Lombardo Date: Wed, 1 Nov 2023 00:17:38 -0400 Subject: [PATCH 039/154] android: Reorganize settings tab --- .../fragments/HomeSettingsFragment.kt | 66 +++++++++---------- 1 file changed, 33 insertions(+), 33 deletions(-) diff --git a/src/android/app/src/main/java/org/yuzu/yuzu_emu/fragments/HomeSettingsFragment.kt b/src/android/app/src/main/java/org/yuzu/yuzu_emu/fragments/HomeSettingsFragment.kt index 6e19fc6c0c..ed2a5cb555 100644 --- a/src/android/app/src/main/java/org/yuzu/yuzu_emu/fragments/HomeSettingsFragment.kt +++ b/src/android/app/src/main/java/org/yuzu/yuzu_emu/fragments/HomeSettingsFragment.kt @@ -84,28 +84,6 @@ class HomeSettingsFragment : Fragment() { } ) ) - add( - HomeSetting( - R.string.open_user_folder, - R.string.open_user_folder_description, - R.drawable.ic_folder_open, - { openFileManager() } - ) - ) - add( - HomeSetting( - R.string.preferences_theme, - R.string.theme_and_color_description, - R.drawable.ic_palette, - { - val action = HomeNavigationDirections.actionGlobalSettingsActivity( - null, - Settings.MenuTag.SECTION_THEME - ) - binding.root.findNavController().navigate(action) - } - ) - ) add( HomeSetting( R.string.gpu_driver_manager, @@ -121,17 +99,6 @@ class HomeSettingsFragment : Fragment() { driverViewModel.selectedDriverMetadata ) ) - add( - HomeSetting( - R.string.manage_yuzu_data, - R.string.manage_yuzu_data_description, - R.drawable.ic_install, - { - binding.root.findNavController() - .navigate(R.id.action_homeSettingsFragment_to_installableFragment) - } - ) - ) add( HomeSetting( R.string.applets, @@ -146,6 +113,17 @@ class HomeSettingsFragment : Fragment() { R.string.applets_error_description ) ) + add( + HomeSetting( + R.string.manage_yuzu_data, + R.string.manage_yuzu_data_description, + R.drawable.ic_install, + { + binding.root.findNavController() + .navigate(R.id.action_homeSettingsFragment_to_installableFragment) + } + ) + ) add( HomeSetting( R.string.select_games_folder, @@ -170,6 +148,28 @@ class HomeSettingsFragment : Fragment() { { shareLog() } ) ) + add( + HomeSetting( + R.string.open_user_folder, + R.string.open_user_folder_description, + R.drawable.ic_folder_open, + { openFileManager() } + ) + ) + add( + HomeSetting( + R.string.preferences_theme, + R.string.theme_and_color_description, + R.drawable.ic_palette, + { + val action = HomeNavigationDirections.actionGlobalSettingsActivity( + null, + Settings.MenuTag.SECTION_THEME + ) + binding.root.findNavController().navigate(action) + } + ) + ) add( HomeSetting( R.string.about, From 5872c7d420064a2831520aa3b31a4070c7a17484 Mon Sep 17 00:00:00 2001 From: Charles Lombardo Date: Wed, 1 Nov 2023 00:18:20 -0400 Subject: [PATCH 040/154] android: Adjust driver manager source string --- src/android/app/src/main/res/values/strings.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/android/app/src/main/res/values/strings.xml b/src/android/app/src/main/res/values/strings.xml index b929781409..c551a61064 100644 --- a/src/android/app/src/main/res/values/strings.xml +++ b/src/android/app/src/main/res/values/strings.xml @@ -72,7 +72,7 @@ Invalid encryption keys https://yuzu-emu.org/help/quickstart/#dumping-decryption-keys The selected file is incorrect or corrupt. Please redump your keys. - GPU Driver Manager + GPU driver manager Install GPU driver Install alternative drivers for potentially better performance or accuracy Advanced settings From 344162db75bffd0de9b43d18d2d789c1fd564e57 Mon Sep 17 00:00:00 2001 From: Charles Lombardo Date: Wed, 1 Nov 2023 13:10:51 -0400 Subject: [PATCH 041/154] android: Default to player number 0 if we get an input from an unrecognized controller --- .../app/src/main/java/org/yuzu/yuzu_emu/utils/InputHandler.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/android/app/src/main/java/org/yuzu/yuzu_emu/utils/InputHandler.kt b/src/android/app/src/main/java/org/yuzu/yuzu_emu/utils/InputHandler.kt index fc6a8b5cb7..47bde5081e 100644 --- a/src/android/app/src/main/java/org/yuzu/yuzu_emu/utils/InputHandler.kt +++ b/src/android/app/src/main/java/org/yuzu/yuzu_emu/utils/InputHandler.kt @@ -68,7 +68,7 @@ object InputHandler { private fun getPlayerNumber(index: Int, deviceId: Int = -1): Int { var deviceIndex = index if (deviceId != -1) { - deviceIndex = controllerIds[deviceId]!! + deviceIndex = controllerIds[deviceId] ?: 0 } // TODO: Joycons are handled as different controllers. Find a way to merge them. From 92418e909f7bb3d2c199b9392304f4bd1dea65bc Mon Sep 17 00:00:00 2001 From: Charles Lombardo Date: Wed, 1 Nov 2023 00:45:13 -0400 Subject: [PATCH 042/154] android: Use yuzu logging system Now anything that's logged in the frontend will be printed into the log file --- .../java/org/yuzu/yuzu_emu/NativeLibrary.kt | 4 +-- .../main/java/org/yuzu/yuzu_emu/utils/Log.kt | 34 +++---------------- src/android/app/src/main/jni/CMakeLists.txt | 1 + src/android/app/src/main/jni/native_log.cpp | 31 +++++++++++++++++ 4 files changed, 39 insertions(+), 31 deletions(-) create mode 100644 src/android/app/src/main/jni/native_log.cpp diff --git a/src/android/app/src/main/java/org/yuzu/yuzu_emu/NativeLibrary.kt b/src/android/app/src/main/java/org/yuzu/yuzu_emu/NativeLibrary.kt index 07f1b48422..ed8fe6c3f0 100644 --- a/src/android/app/src/main/java/org/yuzu/yuzu_emu/NativeLibrary.kt +++ b/src/android/app/src/main/java/org/yuzu/yuzu_emu/NativeLibrary.kt @@ -462,12 +462,12 @@ object NativeLibrary { } fun setEmulationActivity(emulationActivity: EmulationActivity?) { - Log.verbose("[NativeLibrary] Registering EmulationActivity.") + Log.debug("[NativeLibrary] Registering EmulationActivity.") sEmulationActivity = WeakReference(emulationActivity) } fun clearEmulationActivity() { - Log.verbose("[NativeLibrary] Unregistering EmulationActivity.") + Log.debug("[NativeLibrary] Unregistering EmulationActivity.") sEmulationActivity.clear() } diff --git a/src/android/app/src/main/java/org/yuzu/yuzu_emu/utils/Log.kt b/src/android/app/src/main/java/org/yuzu/yuzu_emu/utils/Log.kt index a193e82a4c..1d3c7dce36 100644 --- a/src/android/app/src/main/java/org/yuzu/yuzu_emu/utils/Log.kt +++ b/src/android/app/src/main/java/org/yuzu/yuzu_emu/utils/Log.kt @@ -3,38 +3,14 @@ package org.yuzu.yuzu_emu.utils -import android.util.Log -import org.yuzu.yuzu_emu.BuildConfig - -/** - * Contains methods that call through to [android.util.Log], but - * with the same TAG automatically provided. Also no-ops VERBOSE and DEBUG log - * levels in release builds. - */ object Log { - private const val TAG = "Yuzu Frontend" + external fun debug(message: String) - fun verbose(message: String) { - if (BuildConfig.DEBUG) { - Log.v(TAG, message) - } - } + external fun warning(message: String) - fun debug(message: String) { - if (BuildConfig.DEBUG) { - Log.d(TAG, message) - } - } + external fun info(message: String) - fun info(message: String) { - Log.i(TAG, message) - } + external fun error(message: String) - fun warning(message: String) { - Log.w(TAG, message) - } - - fun error(message: String) { - Log.e(TAG, message) - } + external fun critical(message: String) } diff --git a/src/android/app/src/main/jni/CMakeLists.txt b/src/android/app/src/main/jni/CMakeLists.txt index 1c36661f55..88a570f686 100644 --- a/src/android/app/src/main/jni/CMakeLists.txt +++ b/src/android/app/src/main/jni/CMakeLists.txt @@ -18,6 +18,7 @@ add_library(yuzu-android SHARED native_config.cpp uisettings.cpp game_metadata.cpp + native_log.cpp ) set_property(TARGET yuzu-android PROPERTY IMPORTED_LOCATION ${FFmpeg_LIBRARY_DIR}) diff --git a/src/android/app/src/main/jni/native_log.cpp b/src/android/app/src/main/jni/native_log.cpp new file mode 100644 index 0000000000..33d691dc88 --- /dev/null +++ b/src/android/app/src/main/jni/native_log.cpp @@ -0,0 +1,31 @@ +// SPDX-FileCopyrightText: 2023 yuzu Emulator Project +// SPDX-License-Identifier: GPL-2.0-or-later + +#include +#include + +#include "android_common/android_common.h" + +extern "C" { + +void Java_org_yuzu_yuzu_1emu_utils_Log_debug(JNIEnv* env, jobject obj, jstring jmessage) { + LOG_DEBUG(Frontend, "{}", GetJString(env, jmessage)); +} + +void Java_org_yuzu_yuzu_1emu_utils_Log_warning(JNIEnv* env, jobject obj, jstring jmessage) { + LOG_WARNING(Frontend, "{}", GetJString(env, jmessage)); +} + +void Java_org_yuzu_yuzu_1emu_utils_Log_info(JNIEnv* env, jobject obj, jstring jmessage) { + LOG_INFO(Frontend, "{}", GetJString(env, jmessage)); +} + +void Java_org_yuzu_yuzu_1emu_utils_Log_error(JNIEnv* env, jobject obj, jstring jmessage) { + LOG_ERROR(Frontend, "{}", GetJString(env, jmessage)); +} + +void Java_org_yuzu_yuzu_1emu_utils_Log_critical(JNIEnv* env, jobject obj, jstring jmessage) { + LOG_CRITICAL(Frontend, "{}", GetJString(env, jmessage)); +} + +} // extern "C" From 398e8814288cbf71e2620ff22648d3002f7908b6 Mon Sep 17 00:00:00 2001 From: Charles Lombardo Date: Wed, 1 Nov 2023 01:26:10 -0400 Subject: [PATCH 043/154] android: Adjust log lifecycle Now logging will start when the frontend starts like qt does. This also adjusts the share log button to follow where we share the current log if we just returned from a game or return the old log if we haven't started a game yet. --- .../yuzu_emu/activities/EmulationActivity.kt | 2 ++ .../fragments/HomeSettingsFragment.kt | 26 ++++++++++++++----- .../main/java/org/yuzu/yuzu_emu/utils/Log.kt | 3 +++ src/android/app/src/main/jni/native.cpp | 9 ++++--- 4 files changed, 30 insertions(+), 10 deletions(-) diff --git a/src/android/app/src/main/java/org/yuzu/yuzu_emu/activities/EmulationActivity.kt b/src/android/app/src/main/java/org/yuzu/yuzu_emu/activities/EmulationActivity.kt index f37875ffea..da98d4ef50 100644 --- a/src/android/app/src/main/java/org/yuzu/yuzu_emu/activities/EmulationActivity.kt +++ b/src/android/app/src/main/java/org/yuzu/yuzu_emu/activities/EmulationActivity.kt @@ -47,6 +47,7 @@ import org.yuzu.yuzu_emu.model.EmulationViewModel import org.yuzu.yuzu_emu.model.Game import org.yuzu.yuzu_emu.utils.ForegroundService import org.yuzu.yuzu_emu.utils.InputHandler +import org.yuzu.yuzu_emu.utils.Log import org.yuzu.yuzu_emu.utils.MemoryUtil import org.yuzu.yuzu_emu.utils.NfcReader import org.yuzu.yuzu_emu.utils.ThemeHelper @@ -80,6 +81,7 @@ class EmulationActivity : AppCompatActivity(), SensorEventListener { } override fun onCreate(savedInstanceState: Bundle?) { + Log.gameLaunched = true ThemeHelper.setTheme(this) super.onCreate(savedInstanceState) diff --git a/src/android/app/src/main/java/org/yuzu/yuzu_emu/fragments/HomeSettingsFragment.kt b/src/android/app/src/main/java/org/yuzu/yuzu_emu/fragments/HomeSettingsFragment.kt index 6e19fc6c0c..8ed4b482e4 100644 --- a/src/android/app/src/main/java/org/yuzu/yuzu_emu/fragments/HomeSettingsFragment.kt +++ b/src/android/app/src/main/java/org/yuzu/yuzu_emu/fragments/HomeSettingsFragment.kt @@ -42,6 +42,7 @@ import org.yuzu.yuzu_emu.model.HomeViewModel import org.yuzu.yuzu_emu.ui.main.MainActivity import org.yuzu.yuzu_emu.utils.FileUtil import org.yuzu.yuzu_emu.utils.GpuDriverHelper +import org.yuzu.yuzu_emu.utils.Log class HomeSettingsFragment : Fragment() { private var _binding: FragmentHomeSettingsBinding? = null @@ -312,19 +313,32 @@ class HomeSettingsFragment : Fragment() { } } + // Share the current log if we just returned from a game but share the old log + // if we just started the app and the old log exists. private fun shareLog() { - val file = DocumentFile.fromSingleUri( + val currentLog = DocumentFile.fromSingleUri( mainActivity, DocumentsContract.buildDocumentUri( DocumentProvider.AUTHORITY, "${DocumentProvider.ROOT_ID}/log/yuzu_log.txt" ) )!! - if (file.exists()) { - val intent = Intent(Intent.ACTION_SEND) - .setDataAndType(file.uri, FileUtil.TEXT_PLAIN) - .addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION) - .putExtra(Intent.EXTRA_STREAM, file.uri) + val oldLog = DocumentFile.fromSingleUri( + mainActivity, + DocumentsContract.buildDocumentUri( + DocumentProvider.AUTHORITY, + "${DocumentProvider.ROOT_ID}/log/yuzu_log.txt.old.txt" + ) + )!! + + val intent = Intent(Intent.ACTION_SEND) + .setDataAndType(currentLog.uri, FileUtil.TEXT_PLAIN) + .addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION) + if (!Log.gameLaunched && oldLog.exists()) { + intent.putExtra(Intent.EXTRA_STREAM, oldLog.uri) + startActivity(Intent.createChooser(intent, getText(R.string.share_log))) + } else if (currentLog.exists()) { + intent.putExtra(Intent.EXTRA_STREAM, currentLog.uri) startActivity(Intent.createChooser(intent, getText(R.string.share_log))) } else { Toast.makeText( diff --git a/src/android/app/src/main/java/org/yuzu/yuzu_emu/utils/Log.kt b/src/android/app/src/main/java/org/yuzu/yuzu_emu/utils/Log.kt index 1d3c7dce36..fb682c3446 100644 --- a/src/android/app/src/main/java/org/yuzu/yuzu_emu/utils/Log.kt +++ b/src/android/app/src/main/java/org/yuzu/yuzu_emu/utils/Log.kt @@ -4,6 +4,9 @@ package org.yuzu.yuzu_emu.utils object Log { + // Tracks whether we should share the old log or the current log + var gameLaunched = false + external fun debug(message: String) external fun warning(message: String) diff --git a/src/android/app/src/main/jni/native.cpp b/src/android/app/src/main/jni/native.cpp index 0e458df38d..294e41045c 100644 --- a/src/android/app/src/main/jni/native.cpp +++ b/src/android/app/src/main/jni/native.cpp @@ -248,6 +248,11 @@ void EmulationSession::ConfigureFilesystemProvider(const std::string& filepath) } void EmulationSession::InitializeSystem() { + // Initialize logging system + Common::Log::Initialize(); + Common::Log::SetColorConsoleBackendEnabled(true); + Common::Log::Start(); + // Initialize filesystem. m_system.SetFilesystem(m_vfs); m_system.GetUserChannel().clear(); @@ -462,10 +467,6 @@ void EmulationSession::OnEmulationStopped(Core::SystemResultStatus result) { } static Core::SystemResultStatus RunEmulation(const std::string& filepath) { - Common::Log::Initialize(); - Common::Log::SetColorConsoleBackendEnabled(true); - Common::Log::Start(); - MicroProfileOnThreadCreate("EmuThread"); SCOPE_EXIT({ MicroProfileShutdown(); }); From 41701052d3ebbd2ed746beef342e1bdeaa9374e6 Mon Sep 17 00:00:00 2001 From: Liam Date: Wed, 1 Nov 2023 20:47:08 -0400 Subject: [PATCH 044/154] renderer_vulkan: minimize transform feedback support log --- src/video_core/renderer_vulkan/vk_rasterizer.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/video_core/renderer_vulkan/vk_rasterizer.cpp b/src/video_core/renderer_vulkan/vk_rasterizer.cpp index 059b7cb40c..3983b2eb75 100644 --- a/src/video_core/renderer_vulkan/vk_rasterizer.cpp +++ b/src/video_core/renderer_vulkan/vk_rasterizer.cpp @@ -923,9 +923,13 @@ void RasterizerVulkan::UpdateDynamicStates() { } void RasterizerVulkan::HandleTransformFeedback() { + static std::once_flag warn_unsupported; + const auto& regs = maxwell3d->regs; if (!device.IsExtTransformFeedbackSupported()) { - LOG_ERROR(Render_Vulkan, "Transform feedbacks used but not supported"); + std::call_once(warn_unsupported, [&] { + LOG_ERROR(Render_Vulkan, "Transform feedbacks used but not supported"); + }); return; } query_cache.CounterEnable(VideoCommon::QueryType::StreamingByteCount, From 57cf830862bac1d68d660c120014e7d5021b72e8 Mon Sep 17 00:00:00 2001 From: german77 Date: Thu, 2 Nov 2023 17:42:47 -0600 Subject: [PATCH 045/154] core: hid: Fix wrong battery values --- src/core/hid/emulated_controller.cpp | 14 +++++++------- src/core/hid/hid_types.h | 15 ++++++++++----- src/core/hle/service/hid/controllers/npad.cpp | 6 +++--- 3 files changed, 20 insertions(+), 15 deletions(-) diff --git a/src/core/hid/emulated_controller.cpp b/src/core/hid/emulated_controller.cpp index 2af3f06fc2..8e2894449c 100644 --- a/src/core/hid/emulated_controller.cpp +++ b/src/core/hid/emulated_controller.cpp @@ -1091,30 +1091,30 @@ void EmulatedController::SetBattery(const Common::Input::CallbackStatus& callbac bool is_charging = false; bool is_powered = false; - NpadBatteryLevel battery_level = 0; + NpadBatteryLevel battery_level = NpadBatteryLevel::Empty; switch (controller.battery_values[index]) { case Common::Input::BatteryLevel::Charging: is_charging = true; is_powered = true; - battery_level = 6; + battery_level = NpadBatteryLevel::Full; break; case Common::Input::BatteryLevel::Medium: - battery_level = 6; + battery_level = NpadBatteryLevel::High; break; case Common::Input::BatteryLevel::Low: - battery_level = 4; + battery_level = NpadBatteryLevel::Low; break; case Common::Input::BatteryLevel::Critical: - battery_level = 2; + battery_level = NpadBatteryLevel::Critical; break; case Common::Input::BatteryLevel::Empty: - battery_level = 0; + battery_level = NpadBatteryLevel::Empty; break; case Common::Input::BatteryLevel::None: case Common::Input::BatteryLevel::Full: default: is_powered = true; - battery_level = 8; + battery_level = NpadBatteryLevel::Full; break; } diff --git a/src/core/hid/hid_types.h b/src/core/hid/hid_types.h index 00beb40dd6..7ba75a50cd 100644 --- a/src/core/hid/hid_types.h +++ b/src/core/hid/hid_types.h @@ -302,6 +302,15 @@ enum class TouchScreenModeForNx : u8 { Heat2, }; +// This is nn::hid::system::NpadBatteryLevel +enum class NpadBatteryLevel : u32 { + Empty, + Critical, + Low, + High, + Full, +}; + // This is nn::hid::NpadStyleTag struct NpadStyleTag { union { @@ -385,16 +394,12 @@ struct NpadGcTriggerState { }; static_assert(sizeof(NpadGcTriggerState) == 0x10, "NpadGcTriggerState is an invalid size"); -// This is nn::hid::system::NpadBatteryLevel -using NpadBatteryLevel = u32; -static_assert(sizeof(NpadBatteryLevel) == 0x4, "NpadBatteryLevel is an invalid size"); - // This is nn::hid::system::NpadPowerInfo struct NpadPowerInfo { bool is_powered{}; bool is_charging{}; INSERT_PADDING_BYTES(0x6); - NpadBatteryLevel battery_level{8}; + NpadBatteryLevel battery_level{NpadBatteryLevel::Full}; }; static_assert(sizeof(NpadPowerInfo) == 0xC, "NpadPowerInfo is an invalid size"); diff --git a/src/core/hle/service/hid/controllers/npad.cpp b/src/core/hle/service/hid/controllers/npad.cpp index bc822f19e6..21695bda29 100644 --- a/src/core/hle/service/hid/controllers/npad.cpp +++ b/src/core/hle/service/hid/controllers/npad.cpp @@ -1108,9 +1108,9 @@ Result Controller_NPad::DisconnectNpad(Core::HID::NpadIdType npad_id) { shared_memory->sixaxis_dual_right_properties.raw = 0; shared_memory->sixaxis_left_properties.raw = 0; shared_memory->sixaxis_right_properties.raw = 0; - shared_memory->battery_level_dual = 0; - shared_memory->battery_level_left = 0; - shared_memory->battery_level_right = 0; + shared_memory->battery_level_dual = Core::HID::NpadBatteryLevel::Empty; + shared_memory->battery_level_left = Core::HID::NpadBatteryLevel::Empty; + shared_memory->battery_level_right = Core::HID::NpadBatteryLevel::Empty; shared_memory->fullkey_color = { .attribute = ColorAttribute::NoController, .fullkey = {}, From b36fec486e063fc16c50346179bd8e1cb26ee177 Mon Sep 17 00:00:00 2001 From: german77 Date: Thu, 2 Nov 2023 19:14:05 -0600 Subject: [PATCH 046/154] service: hid: Ensure GetNextEntryIndex can't fail --- src/core/hle/service/hid/ring_lifo.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/core/hle/service/hid/ring_lifo.h b/src/core/hle/service/hid/ring_lifo.h index 65eb7ea02e..0816784e08 100644 --- a/src/core/hle/service/hid/ring_lifo.h +++ b/src/core/hle/service/hid/ring_lifo.h @@ -32,15 +32,15 @@ struct Lifo { } std::size_t GetPreviousEntryIndex() const { - return static_cast((buffer_tail + total_buffer_count - 1) % total_buffer_count); + return static_cast((buffer_tail + max_buffer_size - 1) % max_buffer_size); } std::size_t GetNextEntryIndex() const { - return static_cast((buffer_tail + 1) % total_buffer_count); + return static_cast((buffer_tail + 1) % max_buffer_size); } void WriteNextEntry(const State& new_state) { - if (buffer_count < total_buffer_count - 1) { + if (buffer_count < static_cast(max_buffer_size) - 1) { buffer_count++; } buffer_tail = GetNextEntryIndex(); From a294beb116026ba15ed90299308ea47e4775c1e5 Mon Sep 17 00:00:00 2001 From: Kelebek1 Date: Fri, 3 Nov 2023 11:16:38 -0400 Subject: [PATCH 047/154] Allow 0 stereo count --- src/audio_core/adsp/apps/opus/opus_decoder.cpp | 4 ++-- src/audio_core/opus/decoder_manager.cpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/audio_core/adsp/apps/opus/opus_decoder.cpp b/src/audio_core/adsp/apps/opus/opus_decoder.cpp index 2084de1285..75f0fb9ad9 100644 --- a/src/audio_core/adsp/apps/opus/opus_decoder.cpp +++ b/src/audio_core/adsp/apps/opus/opus_decoder.cpp @@ -30,9 +30,9 @@ bool IsValidMultiStreamChannelCount(u32 channel_count) { return channel_count <= OpusStreamCountMax; } -bool IsValidMultiStreamStreamCounts(s32 total_stream_count, s32 sterero_stream_count) { +bool IsValidMultiStreamStreamCounts(s32 total_stream_count, s32 stereo_stream_count) { return IsValidMultiStreamChannelCount(total_stream_count) && total_stream_count > 0 && - sterero_stream_count > 0 && sterero_stream_count <= total_stream_count; + stereo_stream_count >= 0 && stereo_stream_count <= total_stream_count; } } // namespace diff --git a/src/audio_core/opus/decoder_manager.cpp b/src/audio_core/opus/decoder_manager.cpp index 4a5382973a..fdeccdf50b 100644 --- a/src/audio_core/opus/decoder_manager.cpp +++ b/src/audio_core/opus/decoder_manager.cpp @@ -24,7 +24,7 @@ bool IsValidSampleRate(u32 sample_rate) { } bool IsValidStreamCount(u32 channel_count, u32 total_stream_count, u32 stereo_stream_count) { - return total_stream_count > 0 && stereo_stream_count > 0 && + return total_stream_count > 0 && static_cast(stereo_stream_count) >= 0 && stereo_stream_count <= total_stream_count && total_stream_count + stereo_stream_count <= channel_count; } From b3a1f793c3792dce9fb38c764d0ee9ee38d66783 Mon Sep 17 00:00:00 2001 From: Charles Lombardo Date: Fri, 3 Nov 2023 13:31:06 -0400 Subject: [PATCH 048/154] android: Update surface parameters on emulation start This adds a quick update that notifies the render surface if there was a change between surface creation and emulation starting. --- .../org/yuzu/yuzu_emu/fragments/EmulationFragment.kt | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/android/app/src/main/java/org/yuzu/yuzu_emu/fragments/EmulationFragment.kt b/src/android/app/src/main/java/org/yuzu/yuzu_emu/fragments/EmulationFragment.kt index 07bd78bf72..c456c05921 100644 --- a/src/android/app/src/main/java/org/yuzu/yuzu_emu/fragments/EmulationFragment.kt +++ b/src/android/app/src/main/java/org/yuzu/yuzu_emu/fragments/EmulationFragment.kt @@ -312,6 +312,8 @@ class EmulationFragment : Fragment(), SurfaceHolder.Callback { ViewUtils.showView(binding.surfaceInputOverlay) ViewUtils.hideView(binding.loadingIndicator) + emulationState.updateSurface() + // Setup overlay updateShowFpsOverlay() } @@ -804,6 +806,13 @@ class EmulationFragment : Fragment(), SurfaceHolder.Callback { } } + @Synchronized + fun updateSurface() { + if (surface != null) { + NativeLibrary.surfaceChanged(surface) + } + } + @Synchronized fun clearSurface() { if (surface == null) { From 9bb8ac7cb6ac87fe5c0b82cd563ba62483761b4e Mon Sep 17 00:00:00 2001 From: Charles Lombardo Date: Fri, 3 Nov 2023 15:51:17 -0400 Subject: [PATCH 049/154] android: Fix fetching system memory size from MemoryUtil We weren't rounding up the value at a unit before (GB, MB, etc) we were rounding up the total bytes and that would do nothing. This fixes that, and the check for total system memory during first emulation start where we tried to check the required system memory against 1 gigabyte. --- .../yuzu_emu/activities/EmulationActivity.kt | 2 +- .../org/yuzu/yuzu_emu/utils/MemoryUtil.kt | 34 +++++++++---------- 2 files changed, 17 insertions(+), 19 deletions(-) diff --git a/src/android/app/src/main/java/org/yuzu/yuzu_emu/activities/EmulationActivity.kt b/src/android/app/src/main/java/org/yuzu/yuzu_emu/activities/EmulationActivity.kt index da98d4ef50..054e4b7558 100644 --- a/src/android/app/src/main/java/org/yuzu/yuzu_emu/activities/EmulationActivity.kt +++ b/src/android/app/src/main/java/org/yuzu/yuzu_emu/activities/EmulationActivity.kt @@ -107,7 +107,7 @@ class EmulationActivity : AppCompatActivity(), SensorEventListener { val preferences = PreferenceManager.getDefaultSharedPreferences(YuzuApplication.appContext) if (!preferences.getBoolean(Settings.PREF_MEMORY_WARNING_SHOWN, false)) { - if (MemoryUtil.isLessThan(MemoryUtil.REQUIRED_MEMORY, MemoryUtil.Gb)) { + if (MemoryUtil.isLessThan(MemoryUtil.REQUIRED_MEMORY, MemoryUtil.totalMemory)) { Toast.makeText( this, getString( diff --git a/src/android/app/src/main/java/org/yuzu/yuzu_emu/utils/MemoryUtil.kt b/src/android/app/src/main/java/org/yuzu/yuzu_emu/utils/MemoryUtil.kt index aa4a5539a6..9076a86c41 100644 --- a/src/android/app/src/main/java/org/yuzu/yuzu_emu/utils/MemoryUtil.kt +++ b/src/android/app/src/main/java/org/yuzu/yuzu_emu/utils/MemoryUtil.kt @@ -27,7 +27,7 @@ object MemoryUtil { const val Pb = Tb * 1024 const val Eb = Pb * 1024 - private fun bytesToSizeUnit(size: Float): String = + private fun bytesToSizeUnit(size: Float, roundUp: Boolean = false): String = when { size < Kb -> { context.getString( @@ -39,63 +39,59 @@ object MemoryUtil { size < Mb -> { context.getString( R.string.memory_formatted, - (size / Kb).hundredths, + if (roundUp) ceil(size / Kb) else (size / Kb).hundredths, context.getString(R.string.memory_kilobyte) ) } size < Gb -> { context.getString( R.string.memory_formatted, - (size / Mb).hundredths, + if (roundUp) ceil(size / Mb) else (size / Mb).hundredths, context.getString(R.string.memory_megabyte) ) } size < Tb -> { context.getString( R.string.memory_formatted, - (size / Gb).hundredths, + if (roundUp) ceil(size / Gb) else (size / Gb).hundredths, context.getString(R.string.memory_gigabyte) ) } size < Pb -> { context.getString( R.string.memory_formatted, - (size / Tb).hundredths, + if (roundUp) ceil(size / Tb) else (size / Tb).hundredths, context.getString(R.string.memory_terabyte) ) } size < Eb -> { context.getString( R.string.memory_formatted, - (size / Pb).hundredths, + if (roundUp) ceil(size / Pb) else (size / Pb).hundredths, context.getString(R.string.memory_petabyte) ) } else -> { context.getString( R.string.memory_formatted, - (size / Eb).hundredths, + if (roundUp) ceil(size / Eb) else (size / Eb).hundredths, context.getString(R.string.memory_exabyte) ) } } - // Devices are unlikely to have 0.5GB increments of memory so we'll just round up to account for - // the potential error created by memInfo.totalMem - private val totalMemory: Float + val totalMemory: Float get() { val memInfo = ActivityManager.MemoryInfo() with(context.getSystemService(Context.ACTIVITY_SERVICE) as ActivityManager) { getMemoryInfo(memInfo) } - return ceil( - if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.UPSIDE_DOWN_CAKE) { - memInfo.advertisedMem.toFloat() - } else { - memInfo.totalMem.toFloat() - } - ) + return if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.UPSIDE_DOWN_CAKE) { + memInfo.advertisedMem.toFloat() + } else { + memInfo.totalMem.toFloat() + } } fun isLessThan(minimum: Int, size: Float): Boolean = @@ -109,5 +105,7 @@ object MemoryUtil { else -> totalMemory < Kb && totalMemory < minimum } - fun getDeviceRAM(): String = bytesToSizeUnit(totalMemory) + // Devices are unlikely to have 0.5GB increments of memory so we'll just round up to account for + // the potential error created by memInfo.totalMem + fun getDeviceRAM(): String = bytesToSizeUnit(totalMemory, true) } From 0a83047368b2e0e72535c0239db806d6c229d7e9 Mon Sep 17 00:00:00 2001 From: Charles Lombardo Date: Fri, 3 Nov 2023 15:52:01 -0400 Subject: [PATCH 050/154] android: Log more system information during startup Logs device manufacturer/model, SoC manufacturer/model where available, and the total system memory --- .../main/java/org/yuzu/yuzu_emu/YuzuApplication.kt | 2 ++ .../app/src/main/java/org/yuzu/yuzu_emu/utils/Log.kt | 12 ++++++++++++ 2 files changed, 14 insertions(+) diff --git a/src/android/app/src/main/java/org/yuzu/yuzu_emu/YuzuApplication.kt b/src/android/app/src/main/java/org/yuzu/yuzu_emu/YuzuApplication.kt index 8c053670c6..d114bd53d7 100644 --- a/src/android/app/src/main/java/org/yuzu/yuzu_emu/YuzuApplication.kt +++ b/src/android/app/src/main/java/org/yuzu/yuzu_emu/YuzuApplication.kt @@ -11,6 +11,7 @@ import java.io.File import org.yuzu.yuzu_emu.utils.DirectoryInitialization import org.yuzu.yuzu_emu.utils.DocumentsTree import org.yuzu.yuzu_emu.utils.GpuDriverHelper +import org.yuzu.yuzu_emu.utils.Log fun Context.getPublicFilesDir(): File = getExternalFilesDir(null) ?: filesDir @@ -49,6 +50,7 @@ class YuzuApplication : Application() { DirectoryInitialization.start() GpuDriverHelper.initializeDriverParameters() NativeLibrary.logDeviceInfo() + Log.logDeviceInfo() createNotificationChannels() } diff --git a/src/android/app/src/main/java/org/yuzu/yuzu_emu/utils/Log.kt b/src/android/app/src/main/java/org/yuzu/yuzu_emu/utils/Log.kt index fb682c3446..aebe84b0f1 100644 --- a/src/android/app/src/main/java/org/yuzu/yuzu_emu/utils/Log.kt +++ b/src/android/app/src/main/java/org/yuzu/yuzu_emu/utils/Log.kt @@ -3,6 +3,8 @@ package org.yuzu.yuzu_emu.utils +import android.os.Build + object Log { // Tracks whether we should share the old log or the current log var gameLaunched = false @@ -16,4 +18,14 @@ object Log { external fun error(message: String) external fun critical(message: String) + + fun logDeviceInfo() { + info("Device Manufacturer - ${Build.MANUFACTURER}") + info("Device Model - ${Build.MODEL}") + if (Build.VERSION.SDK_INT > Build.VERSION_CODES.R) { + info("SoC Manufacturer - ${Build.SOC_MANUFACTURER}") + info("SoC Model - ${Build.SOC_MODEL}") + } + info("Total System Memory - ${MemoryUtil.getDeviceRAM()}") + } } From 4b321c003caed15a23d6f221da871980ceed72c2 Mon Sep 17 00:00:00 2001 From: Charles Lombardo Date: Fri, 3 Nov 2023 16:21:54 -0400 Subject: [PATCH 051/154] arm: NativeClock: Special handling for bad system counter clock frequency reporting On some devices, checking the system counter clock frequency will return 0. Substitute in the correct values to prevent issues. --- src/common/arm64/native_clock.cpp | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/src/common/arm64/native_clock.cpp b/src/common/arm64/native_clock.cpp index 88fdba5277..f437d71870 100644 --- a/src/common/arm64/native_clock.cpp +++ b/src/common/arm64/native_clock.cpp @@ -1,6 +1,9 @@ // SPDX-FileCopyrightText: Copyright 2023 yuzu Emulator Project // SPDX-License-Identifier: GPL-2.0-or-later +#ifdef ANDROID +#include +#endif #include "common/arm64/native_clock.h" namespace Common::Arm64 { @@ -65,7 +68,23 @@ bool NativeClock::IsNative() const { u64 NativeClock::GetHostCNTFRQ() { u64 cntfrq_el0 = 0; - asm("mrs %[cntfrq_el0], cntfrq_el0" : [cntfrq_el0] "=r"(cntfrq_el0)); + std::string_view board{""}; +#ifdef ANDROID + char buffer[PROP_VALUE_MAX]; + int len{__system_property_get("ro.product.board", buffer)}; + board = std::string_view(buffer, static_cast(len)); +#endif + if (board == "s5e9925") { // Exynos 2200 + cntfrq_el0 = 25600000; + } else if (board == "exynos2100") { // Exynos 2100 + cntfrq_el0 = 26000000; + } else if (board == "exynos9810") { // Exynos 9810 + cntfrq_el0 = 26000000; + } else if (board == "s5e8825") { // Exynos 1280 + cntfrq_el0 = 26000000; + } else { + asm("mrs %[cntfrq_el0], cntfrq_el0" : [cntfrq_el0] "=r"(cntfrq_el0)); + } return cntfrq_el0; } From 75de0cadcfaa483393a832fc804d80382f61d885 Mon Sep 17 00:00:00 2001 From: Liam Date: Fri, 3 Nov 2023 20:54:38 -0400 Subject: [PATCH 052/154] renderer_null: fix --- src/video_core/renderer_null/null_rasterizer.cpp | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/src/video_core/renderer_null/null_rasterizer.cpp b/src/video_core/renderer_null/null_rasterizer.cpp index 65cd5aa067..4f1d5b548c 100644 --- a/src/video_core/renderer_null/null_rasterizer.cpp +++ b/src/video_core/renderer_null/null_rasterizer.cpp @@ -3,6 +3,7 @@ #include "common/alignment.h" #include "core/memory.h" +#include "video_core/control/channel_state.h" #include "video_core/host1x/host1x.h" #include "video_core/memory_manager.h" #include "video_core/renderer_null/null_rasterizer.h" @@ -99,8 +100,14 @@ bool RasterizerNull::AccelerateDisplay(const Tegra::FramebufferConfig& config, } void RasterizerNull::LoadDiskResources(u64 title_id, std::stop_token stop_loading, const VideoCore::DiskResourceLoadCallback& callback) {} -void RasterizerNull::InitializeChannel(Tegra::Control::ChannelState& channel) {} -void RasterizerNull::BindChannel(Tegra::Control::ChannelState& channel) {} -void RasterizerNull::ReleaseChannel(s32 channel_id) {} +void RasterizerNull::InitializeChannel(Tegra::Control::ChannelState& channel) { + CreateChannel(channel); +} +void RasterizerNull::BindChannel(Tegra::Control::ChannelState& channel) { + BindToChannel(channel.bind_id); +} +void RasterizerNull::ReleaseChannel(s32 channel_id) { + EraseChannel(channel_id); +} } // namespace Null From 036d2686af47c9c52e121c96266cfa47fb865742 Mon Sep 17 00:00:00 2001 From: Charles Lombardo Date: Fri, 3 Nov 2023 22:49:31 -0400 Subject: [PATCH 053/154] android: Don't reload log/system after loading firmware/backup --- .../java/org/yuzu/yuzu_emu/NativeLibrary.kt | 2 +- .../org/yuzu/yuzu_emu/ui/main/MainActivity.kt | 4 ++-- .../yuzu_emu/utils/DirectoryInitialization.kt | 2 +- src/android/app/src/main/jni/native.cpp | 21 ++++++++++++------- src/android/app/src/main/jni/native.h | 2 +- 5 files changed, 18 insertions(+), 13 deletions(-) diff --git a/src/android/app/src/main/java/org/yuzu/yuzu_emu/NativeLibrary.kt b/src/android/app/src/main/java/org/yuzu/yuzu_emu/NativeLibrary.kt index ed8fe6c3f0..9ebd6c732a 100644 --- a/src/android/app/src/main/java/org/yuzu/yuzu_emu/NativeLibrary.kt +++ b/src/android/app/src/main/java/org/yuzu/yuzu_emu/NativeLibrary.kt @@ -252,7 +252,7 @@ object NativeLibrary { external fun reloadKeys(): Boolean - external fun initializeSystem() + external fun initializeSystem(reload: Boolean) external fun defaultCPUCore(): Int diff --git a/src/android/app/src/main/java/org/yuzu/yuzu_emu/ui/main/MainActivity.kt b/src/android/app/src/main/java/org/yuzu/yuzu_emu/ui/main/MainActivity.kt index ba1177426a..211b7cf69d 100644 --- a/src/android/app/src/main/java/org/yuzu/yuzu_emu/ui/main/MainActivity.kt +++ b/src/android/app/src/main/java/org/yuzu/yuzu_emu/ui/main/MainActivity.kt @@ -403,7 +403,7 @@ class MainActivity : AppCompatActivity(), ThemeProvider { } else { firmwarePath.deleteRecursively() cacheFirmwareDir.copyRecursively(firmwarePath, true) - NativeLibrary.initializeSystem() + NativeLibrary.initializeSystem(true) getString(R.string.save_file_imported_success) } } catch (e: Exception) { @@ -649,7 +649,7 @@ class MainActivity : AppCompatActivity(), ThemeProvider { } // Reinitialize relevant data - NativeLibrary.initializeSystem() + NativeLibrary.initializeSystem(true) gamesViewModel.reloadGames(false) return@newInstance getString(R.string.user_data_import_success) diff --git a/src/android/app/src/main/java/org/yuzu/yuzu_emu/utils/DirectoryInitialization.kt b/src/android/app/src/main/java/org/yuzu/yuzu_emu/utils/DirectoryInitialization.kt index 79a07f7ef7..5e9a1176ad 100644 --- a/src/android/app/src/main/java/org/yuzu/yuzu_emu/utils/DirectoryInitialization.kt +++ b/src/android/app/src/main/java/org/yuzu/yuzu_emu/utils/DirectoryInitialization.kt @@ -15,7 +15,7 @@ object DirectoryInitialization { fun start() { if (!areDirectoriesReady) { initializeInternalStorage() - NativeLibrary.initializeSystem() + NativeLibrary.initializeSystem(false) areDirectoriesReady = true } } diff --git a/src/android/app/src/main/jni/native.cpp b/src/android/app/src/main/jni/native.cpp index 294e41045c..46438906e1 100644 --- a/src/android/app/src/main/jni/native.cpp +++ b/src/android/app/src/main/jni/native.cpp @@ -247,11 +247,13 @@ void EmulationSession::ConfigureFilesystemProvider(const std::string& filepath) } } -void EmulationSession::InitializeSystem() { - // Initialize logging system - Common::Log::Initialize(); - Common::Log::SetColorConsoleBackendEnabled(true); - Common::Log::Start(); +void EmulationSession::InitializeSystem(bool reload) { + if (!reload) { + // Initialize logging system + Common::Log::Initialize(); + Common::Log::SetColorConsoleBackendEnabled(true); + Common::Log::Start(); + } // Initialize filesystem. m_system.SetFilesystem(m_vfs); @@ -667,12 +669,15 @@ void Java_org_yuzu_yuzu_1emu_NativeLibrary_onTouchReleased(JNIEnv* env, jclass c } } -void Java_org_yuzu_yuzu_1emu_NativeLibrary_initializeSystem(JNIEnv* env, jclass clazz) { +void Java_org_yuzu_yuzu_1emu_NativeLibrary_initializeSystem(JNIEnv* env, jclass clazz, + jboolean reload) { // Create the default config.ini. Config{}; // Initialize the emulated system. - EmulationSession::GetInstance().System().Initialize(); - EmulationSession::GetInstance().InitializeSystem(); + if (!reload) { + EmulationSession::GetInstance().System().Initialize(); + } + EmulationSession::GetInstance().InitializeSystem(reload); } jint Java_org_yuzu_yuzu_1emu_NativeLibrary_defaultCPUCore(JNIEnv* env, jclass clazz) { diff --git a/src/android/app/src/main/jni/native.h b/src/android/app/src/main/jni/native.h index 0aa2b085b5..3b9596459a 100644 --- a/src/android/app/src/main/jni/native.h +++ b/src/android/app/src/main/jni/native.h @@ -43,7 +43,7 @@ public: const Core::PerfStatsResults& PerfStats() const; void ConfigureFilesystemProvider(const std::string& filepath); - void InitializeSystem(); + void InitializeSystem(bool reload); Core::SystemResultStatus InitializeEmulation(const std::string& filepath); bool IsHandheldOnly(); From 9543adf072a7d116e49b2d54359cd7e5b374e594 Mon Sep 17 00:00:00 2001 From: Charles Lombardo Date: Fri, 3 Nov 2023 23:57:57 -0400 Subject: [PATCH 054/154] android: Always update FPS counter --- .../org/yuzu/yuzu_emu/fragments/EmulationFragment.kt | 6 +++--- src/android/app/src/main/jni/native.cpp | 9 ++------- src/android/app/src/main/jni/native.h | 3 +-- 3 files changed, 6 insertions(+), 12 deletions(-) diff --git a/src/android/app/src/main/java/org/yuzu/yuzu_emu/fragments/EmulationFragment.kt b/src/android/app/src/main/java/org/yuzu/yuzu_emu/fragments/EmulationFragment.kt index c456c05921..77f2cdf65f 100644 --- a/src/android/app/src/main/java/org/yuzu/yuzu_emu/fragments/EmulationFragment.kt +++ b/src/android/app/src/main/java/org/yuzu/yuzu_emu/fragments/EmulationFragment.kt @@ -414,12 +414,12 @@ class EmulationFragment : Fragment(), SurfaceHolder.Callback { val FRAMETIME = 2 val SPEED = 3 perfStatsUpdater = { - if (emulationViewModel.emulationStarted.value == true) { + if (emulationViewModel.emulationStarted.value) { val perfStats = NativeLibrary.getPerfStats() - if (perfStats[FPS] > 0 && _binding != null) { + if (_binding != null) { binding.showFpsText.text = String.format("FPS: %.1f", perfStats[FPS]) } - perfStatsUpdateHandler.postDelayed(perfStatsUpdater!!, 100) + perfStatsUpdateHandler.postDelayed(perfStatsUpdater!!, 800) } } perfStatsUpdateHandler.post(perfStatsUpdater!!) diff --git a/src/android/app/src/main/jni/native.cpp b/src/android/app/src/main/jni/native.cpp index 294e41045c..2b1c6374d9 100644 --- a/src/android/app/src/main/jni/native.cpp +++ b/src/android/app/src/main/jni/native.cpp @@ -199,8 +199,8 @@ bool EmulationSession::IsPaused() const { return m_is_running && m_is_paused; } -const Core::PerfStatsResults& EmulationSession::PerfStats() const { - std::scoped_lock m_perf_stats_lock(m_perf_stats_mutex); +const Core::PerfStatsResults& EmulationSession::PerfStats() { + m_perf_stats = m_system.GetAndResetPerfStats(); return m_perf_stats; } @@ -381,11 +381,6 @@ void EmulationSession::RunEmulation() { break; } } - { - // Refresh performance stats. - std::scoped_lock m_perf_stats_lock(m_perf_stats_mutex); - m_perf_stats = m_system.GetAndResetPerfStats(); - } } } diff --git a/src/android/app/src/main/jni/native.h b/src/android/app/src/main/jni/native.h index 0aa2b085b5..9f915b160e 100644 --- a/src/android/app/src/main/jni/native.h +++ b/src/android/app/src/main/jni/native.h @@ -41,7 +41,7 @@ public: void RunEmulation(); void ShutdownEmulation(); - const Core::PerfStatsResults& PerfStats() const; + const Core::PerfStatsResults& PerfStats(); void ConfigureFilesystemProvider(const std::string& filepath); void InitializeSystem(); Core::SystemResultStatus InitializeEmulation(const std::string& filepath); @@ -80,6 +80,5 @@ private: // Synchronization std::condition_variable_any m_cv; - mutable std::mutex m_perf_stats_mutex; mutable std::mutex m_mutex; }; From bf8d7bc0da2a2e49f883c9360908ec8901d7e01c Mon Sep 17 00:00:00 2001 From: german77 Date: Fri, 3 Nov 2023 23:22:28 -0600 Subject: [PATCH 055/154] service: hid: Silence EnableUnintendedHomeButtonInputProtection --- src/core/hle/service/hid/hid.cpp | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/src/core/hle/service/hid/hid.cpp b/src/core/hle/service/hid/hid.cpp index 929dd5f035..1d4101be9f 100644 --- a/src/core/hle/service/hid/hid.cpp +++ b/src/core/hle/service/hid/hid.cpp @@ -1353,7 +1353,7 @@ void Hid::IsUnintendedHomeButtonInputProtectionEnabled(HLERequestContext& ctx) { void Hid::EnableUnintendedHomeButtonInputProtection(HLERequestContext& ctx) { IPC::RequestParser rp{ctx}; struct Parameters { - bool unintended_home_button_input_protection; + bool is_enabled; INSERT_PADDING_BYTES_NOINIT(3); Core::HID::NpadIdType npad_id; u64 applet_resource_user_id; @@ -1364,13 +1364,11 @@ void Hid::EnableUnintendedHomeButtonInputProtection(HLERequestContext& ctx) { auto& controller = GetAppletResource()->GetController(HidController::NPad); const auto result = controller.SetUnintendedHomeButtonInputProtectionEnabled( - parameters.unintended_home_button_input_protection, parameters.npad_id); + parameters.is_enabled, parameters.npad_id); - LOG_WARNING(Service_HID, - "(STUBBED) called, unintended_home_button_input_protection={}, npad_id={}," - "applet_resource_user_id={}", - parameters.unintended_home_button_input_protection, parameters.npad_id, - parameters.applet_resource_user_id); + LOG_DEBUG(Service_HID, + "(STUBBED) called, is_enabled={}, npad_id={}, applet_resource_user_id={}", + parameters.is_enabled, parameters.npad_id, parameters.applet_resource_user_id); IPC::ResponseBuilder rb{ctx, 2}; rb.Push(result); From 90aa937593e53a5d5e070fb623b228578b0b225f Mon Sep 17 00:00:00 2001 From: Kelebek1 Date: Sat, 4 Nov 2023 18:25:40 +0000 Subject: [PATCH 056/154] Convert files to LF eol --- .../adsp/apps/opus/opus_decode_object.cpp | 214 ++++---- .../opus/opus_multistream_decode_object.cpp | 222 ++++---- src/audio_core/opus/decoder.cpp | 358 ++++++------- src/audio_core/opus/decoder.h | 106 ++-- src/audio_core/opus/decoder_manager.cpp | 204 ++++---- src/audio_core/opus/decoder_manager.h | 76 +-- src/audio_core/opus/hardware_opus.cpp | 482 +++++++++--------- src/audio_core/opus/hardware_opus.h | 90 ++-- src/yuzu/configuration/config.h | 2 +- src/yuzu/configuration/configure_camera.h | 2 +- src/yuzu/configuration/configure_input.h | 2 +- .../configuration/configure_input_player.h | 2 +- src/yuzu/configuration/configure_per_game.h | 2 +- src/yuzu/configuration/configure_ringcon.h | 2 +- src/yuzu/configuration/configure_tas.h | 2 +- .../configure_touchscreen_advanced.h | 2 +- 16 files changed, 884 insertions(+), 884 deletions(-) diff --git a/src/audio_core/adsp/apps/opus/opus_decode_object.cpp b/src/audio_core/adsp/apps/opus/opus_decode_object.cpp index 2c16d37692..e2b9eb566c 100644 --- a/src/audio_core/adsp/apps/opus/opus_decode_object.cpp +++ b/src/audio_core/adsp/apps/opus/opus_decode_object.cpp @@ -1,107 +1,107 @@ -// SPDX-FileCopyrightText: Copyright 2023 yuzu Emulator Project -// SPDX-License-Identifier: GPL-2.0-or-later - -#include "audio_core/adsp/apps/opus/opus_decode_object.h" -#include "common/assert.h" - -namespace AudioCore::ADSP::OpusDecoder { -namespace { -bool IsValidChannelCount(u32 channel_count) { - return channel_count == 1 || channel_count == 2; -} -} // namespace - -u32 OpusDecodeObject::GetWorkBufferSize(u32 channel_count) { - if (!IsValidChannelCount(channel_count)) { - return 0; - } - return static_cast(sizeof(OpusDecodeObject)) + opus_decoder_get_size(channel_count); -} - -OpusDecodeObject& OpusDecodeObject::Initialize(u64 buffer, u64 buffer2) { - auto* new_decoder = reinterpret_cast(buffer); - auto* comparison = reinterpret_cast(buffer2); - - if (new_decoder->magic == DecodeObjectMagic) { - if (!new_decoder->initialized || - (new_decoder->initialized && new_decoder->self == comparison)) { - new_decoder->state_valid = true; - } - } else { - new_decoder->initialized = false; - new_decoder->state_valid = true; - } - return *new_decoder; -} - -s32 OpusDecodeObject::InitializeDecoder(u32 sample_rate, u32 channel_count) { - if (!state_valid) { - return OPUS_INVALID_STATE; - } - - if (initialized) { - return OPUS_OK; - } - - // Unfortunately libopus does not expose the OpusDecoder struct publicly, so we can't include - // it in this class. Nintendo does not allocate memory, which is why we have a workbuffer - // provided. - // We could use _create and have libopus allocate it for us, but then we have to separately - // track which decoder is being used between this and multistream in order to call the correct - // destroy from the host side. - // This is a bit cringe, but is safe as these objects are only ever initialized inside the given - // workbuffer, and GetWorkBufferSize will guarantee there's enough space to follow. - decoder = (LibOpusDecoder*)(this + 1); - s32 ret = opus_decoder_init(decoder, sample_rate, channel_count); - if (ret == OPUS_OK) { - magic = DecodeObjectMagic; - initialized = true; - state_valid = true; - self = this; - final_range = 0; - } - return ret; -} - -s32 OpusDecodeObject::Shutdown() { - if (!state_valid) { - return OPUS_INVALID_STATE; - } - - if (initialized) { - magic = 0x0; - initialized = false; - state_valid = false; - self = nullptr; - final_range = 0; - decoder = nullptr; - } - return OPUS_OK; -} - -s32 OpusDecodeObject::ResetDecoder() { - return opus_decoder_ctl(decoder, OPUS_RESET_STATE); -} - -s32 OpusDecodeObject::Decode(u32& out_sample_count, u64 output_data, u64 output_data_size, - u64 input_data, u64 input_data_size) { - ASSERT(initialized); - out_sample_count = 0; - - if (!state_valid) { - return OPUS_INVALID_STATE; - } - - auto ret_code_or_samples = opus_decode( - decoder, reinterpret_cast(input_data), static_cast(input_data_size), - reinterpret_cast(output_data), static_cast(output_data_size), 0); - - if (ret_code_or_samples < OPUS_OK) { - return ret_code_or_samples; - } - - out_sample_count = ret_code_or_samples; - return opus_decoder_ctl(decoder, OPUS_GET_FINAL_RANGE_REQUEST, &final_range); -} - -} // namespace AudioCore::ADSP::OpusDecoder +// SPDX-FileCopyrightText: Copyright 2023 yuzu Emulator Project +// SPDX-License-Identifier: GPL-2.0-or-later + +#include "audio_core/adsp/apps/opus/opus_decode_object.h" +#include "common/assert.h" + +namespace AudioCore::ADSP::OpusDecoder { +namespace { +bool IsValidChannelCount(u32 channel_count) { + return channel_count == 1 || channel_count == 2; +} +} // namespace + +u32 OpusDecodeObject::GetWorkBufferSize(u32 channel_count) { + if (!IsValidChannelCount(channel_count)) { + return 0; + } + return static_cast(sizeof(OpusDecodeObject)) + opus_decoder_get_size(channel_count); +} + +OpusDecodeObject& OpusDecodeObject::Initialize(u64 buffer, u64 buffer2) { + auto* new_decoder = reinterpret_cast(buffer); + auto* comparison = reinterpret_cast(buffer2); + + if (new_decoder->magic == DecodeObjectMagic) { + if (!new_decoder->initialized || + (new_decoder->initialized && new_decoder->self == comparison)) { + new_decoder->state_valid = true; + } + } else { + new_decoder->initialized = false; + new_decoder->state_valid = true; + } + return *new_decoder; +} + +s32 OpusDecodeObject::InitializeDecoder(u32 sample_rate, u32 channel_count) { + if (!state_valid) { + return OPUS_INVALID_STATE; + } + + if (initialized) { + return OPUS_OK; + } + + // Unfortunately libopus does not expose the OpusDecoder struct publicly, so we can't include + // it in this class. Nintendo does not allocate memory, which is why we have a workbuffer + // provided. + // We could use _create and have libopus allocate it for us, but then we have to separately + // track which decoder is being used between this and multistream in order to call the correct + // destroy from the host side. + // This is a bit cringe, but is safe as these objects are only ever initialized inside the given + // workbuffer, and GetWorkBufferSize will guarantee there's enough space to follow. + decoder = (LibOpusDecoder*)(this + 1); + s32 ret = opus_decoder_init(decoder, sample_rate, channel_count); + if (ret == OPUS_OK) { + magic = DecodeObjectMagic; + initialized = true; + state_valid = true; + self = this; + final_range = 0; + } + return ret; +} + +s32 OpusDecodeObject::Shutdown() { + if (!state_valid) { + return OPUS_INVALID_STATE; + } + + if (initialized) { + magic = 0x0; + initialized = false; + state_valid = false; + self = nullptr; + final_range = 0; + decoder = nullptr; + } + return OPUS_OK; +} + +s32 OpusDecodeObject::ResetDecoder() { + return opus_decoder_ctl(decoder, OPUS_RESET_STATE); +} + +s32 OpusDecodeObject::Decode(u32& out_sample_count, u64 output_data, u64 output_data_size, + u64 input_data, u64 input_data_size) { + ASSERT(initialized); + out_sample_count = 0; + + if (!state_valid) { + return OPUS_INVALID_STATE; + } + + auto ret_code_or_samples = opus_decode( + decoder, reinterpret_cast(input_data), static_cast(input_data_size), + reinterpret_cast(output_data), static_cast(output_data_size), 0); + + if (ret_code_or_samples < OPUS_OK) { + return ret_code_or_samples; + } + + out_sample_count = ret_code_or_samples; + return opus_decoder_ctl(decoder, OPUS_GET_FINAL_RANGE_REQUEST, &final_range); +} + +} // namespace AudioCore::ADSP::OpusDecoder diff --git a/src/audio_core/adsp/apps/opus/opus_multistream_decode_object.cpp b/src/audio_core/adsp/apps/opus/opus_multistream_decode_object.cpp index f6d362e68c..7f1ed04509 100644 --- a/src/audio_core/adsp/apps/opus/opus_multistream_decode_object.cpp +++ b/src/audio_core/adsp/apps/opus/opus_multistream_decode_object.cpp @@ -1,111 +1,111 @@ -// SPDX-FileCopyrightText: Copyright 2023 yuzu Emulator Project -// SPDX-License-Identifier: GPL-2.0-or-later - -#include "audio_core/adsp/apps/opus/opus_multistream_decode_object.h" -#include "common/assert.h" - -namespace AudioCore::ADSP::OpusDecoder { - -namespace { -bool IsValidChannelCount(u32 channel_count) { - return channel_count == 1 || channel_count == 2; -} - -bool IsValidStreamCounts(u32 total_stream_count, u32 stereo_stream_count) { - return total_stream_count > 0 && stereo_stream_count > 0 && - stereo_stream_count <= total_stream_count && IsValidChannelCount(total_stream_count); -} -} // namespace - -u32 OpusMultiStreamDecodeObject::GetWorkBufferSize(u32 total_stream_count, - u32 stereo_stream_count) { - if (IsValidStreamCounts(total_stream_count, stereo_stream_count)) { - return static_cast(sizeof(OpusMultiStreamDecodeObject)) + - opus_multistream_decoder_get_size(total_stream_count, stereo_stream_count); - } - return 0; -} - -OpusMultiStreamDecodeObject& OpusMultiStreamDecodeObject::Initialize(u64 buffer, u64 buffer2) { - auto* new_decoder = reinterpret_cast(buffer); - auto* comparison = reinterpret_cast(buffer2); - - if (new_decoder->magic == DecodeMultiStreamObjectMagic) { - if (!new_decoder->initialized || - (new_decoder->initialized && new_decoder->self == comparison)) { - new_decoder->state_valid = true; - } - } else { - new_decoder->initialized = false; - new_decoder->state_valid = true; - } - return *new_decoder; -} - -s32 OpusMultiStreamDecodeObject::InitializeDecoder(u32 sample_rate, u32 total_stream_count, - u32 channel_count, u32 stereo_stream_count, - u8* mappings) { - if (!state_valid) { - return OPUS_INVALID_STATE; - } - - if (initialized) { - return OPUS_OK; - } - - // See OpusDecodeObject::InitializeDecoder for an explanation of this - decoder = (LibOpusMSDecoder*)(this + 1); - s32 ret = opus_multistream_decoder_init(decoder, sample_rate, channel_count, total_stream_count, - stereo_stream_count, mappings); - if (ret == OPUS_OK) { - magic = DecodeMultiStreamObjectMagic; - initialized = true; - state_valid = true; - self = this; - final_range = 0; - } - return ret; -} - -s32 OpusMultiStreamDecodeObject::Shutdown() { - if (!state_valid) { - return OPUS_INVALID_STATE; - } - - if (initialized) { - magic = 0x0; - initialized = false; - state_valid = false; - self = nullptr; - final_range = 0; - decoder = nullptr; - } - return OPUS_OK; -} - -s32 OpusMultiStreamDecodeObject::ResetDecoder() { - return opus_multistream_decoder_ctl(decoder, OPUS_RESET_STATE); -} - -s32 OpusMultiStreamDecodeObject::Decode(u32& out_sample_count, u64 output_data, - u64 output_data_size, u64 input_data, u64 input_data_size) { - ASSERT(initialized); - out_sample_count = 0; - - if (!state_valid) { - return OPUS_INVALID_STATE; - } - - auto ret_code_or_samples = opus_multistream_decode( - decoder, reinterpret_cast(input_data), static_cast(input_data_size), - reinterpret_cast(output_data), static_cast(output_data_size), 0); - - if (ret_code_or_samples < OPUS_OK) { - return ret_code_or_samples; - } - - out_sample_count = ret_code_or_samples; - return opus_multistream_decoder_ctl(decoder, OPUS_GET_FINAL_RANGE_REQUEST, &final_range); -} - -} // namespace AudioCore::ADSP::OpusDecoder +// SPDX-FileCopyrightText: Copyright 2023 yuzu Emulator Project +// SPDX-License-Identifier: GPL-2.0-or-later + +#include "audio_core/adsp/apps/opus/opus_multistream_decode_object.h" +#include "common/assert.h" + +namespace AudioCore::ADSP::OpusDecoder { + +namespace { +bool IsValidChannelCount(u32 channel_count) { + return channel_count == 1 || channel_count == 2; +} + +bool IsValidStreamCounts(u32 total_stream_count, u32 stereo_stream_count) { + return total_stream_count > 0 && stereo_stream_count > 0 && + stereo_stream_count <= total_stream_count && IsValidChannelCount(total_stream_count); +} +} // namespace + +u32 OpusMultiStreamDecodeObject::GetWorkBufferSize(u32 total_stream_count, + u32 stereo_stream_count) { + if (IsValidStreamCounts(total_stream_count, stereo_stream_count)) { + return static_cast(sizeof(OpusMultiStreamDecodeObject)) + + opus_multistream_decoder_get_size(total_stream_count, stereo_stream_count); + } + return 0; +} + +OpusMultiStreamDecodeObject& OpusMultiStreamDecodeObject::Initialize(u64 buffer, u64 buffer2) { + auto* new_decoder = reinterpret_cast(buffer); + auto* comparison = reinterpret_cast(buffer2); + + if (new_decoder->magic == DecodeMultiStreamObjectMagic) { + if (!new_decoder->initialized || + (new_decoder->initialized && new_decoder->self == comparison)) { + new_decoder->state_valid = true; + } + } else { + new_decoder->initialized = false; + new_decoder->state_valid = true; + } + return *new_decoder; +} + +s32 OpusMultiStreamDecodeObject::InitializeDecoder(u32 sample_rate, u32 total_stream_count, + u32 channel_count, u32 stereo_stream_count, + u8* mappings) { + if (!state_valid) { + return OPUS_INVALID_STATE; + } + + if (initialized) { + return OPUS_OK; + } + + // See OpusDecodeObject::InitializeDecoder for an explanation of this + decoder = (LibOpusMSDecoder*)(this + 1); + s32 ret = opus_multistream_decoder_init(decoder, sample_rate, channel_count, total_stream_count, + stereo_stream_count, mappings); + if (ret == OPUS_OK) { + magic = DecodeMultiStreamObjectMagic; + initialized = true; + state_valid = true; + self = this; + final_range = 0; + } + return ret; +} + +s32 OpusMultiStreamDecodeObject::Shutdown() { + if (!state_valid) { + return OPUS_INVALID_STATE; + } + + if (initialized) { + magic = 0x0; + initialized = false; + state_valid = false; + self = nullptr; + final_range = 0; + decoder = nullptr; + } + return OPUS_OK; +} + +s32 OpusMultiStreamDecodeObject::ResetDecoder() { + return opus_multistream_decoder_ctl(decoder, OPUS_RESET_STATE); +} + +s32 OpusMultiStreamDecodeObject::Decode(u32& out_sample_count, u64 output_data, + u64 output_data_size, u64 input_data, u64 input_data_size) { + ASSERT(initialized); + out_sample_count = 0; + + if (!state_valid) { + return OPUS_INVALID_STATE; + } + + auto ret_code_or_samples = opus_multistream_decode( + decoder, reinterpret_cast(input_data), static_cast(input_data_size), + reinterpret_cast(output_data), static_cast(output_data_size), 0); + + if (ret_code_or_samples < OPUS_OK) { + return ret_code_or_samples; + } + + out_sample_count = ret_code_or_samples; + return opus_multistream_decoder_ctl(decoder, OPUS_GET_FINAL_RANGE_REQUEST, &final_range); +} + +} // namespace AudioCore::ADSP::OpusDecoder diff --git a/src/audio_core/opus/decoder.cpp b/src/audio_core/opus/decoder.cpp index 5b23fce148..c6fd45f474 100644 --- a/src/audio_core/opus/decoder.cpp +++ b/src/audio_core/opus/decoder.cpp @@ -1,179 +1,179 @@ -// SPDX-FileCopyrightText: Copyright 2023 yuzu Emulator Project -// SPDX-License-Identifier: GPL-2.0-or-later - -#include "audio_core/opus/decoder.h" -#include "audio_core/opus/hardware_opus.h" -#include "audio_core/opus/parameters.h" -#include "common/alignment.h" -#include "common/swap.h" -#include "core/core.h" - -namespace AudioCore::OpusDecoder { -using namespace Service::Audio; -namespace { -OpusPacketHeader ReverseHeader(OpusPacketHeader header) { - OpusPacketHeader out; - out.size = Common::swap32(header.size); - out.final_range = Common::swap32(header.final_range); - return out; -} -} // namespace - -OpusDecoder::OpusDecoder(Core::System& system_, HardwareOpus& hardware_opus_) - : system{system_}, hardware_opus{hardware_opus_} {} - -OpusDecoder::~OpusDecoder() { - if (decode_object_initialized) { - hardware_opus.ShutdownDecodeObject(shared_buffer.get(), shared_buffer_size); - } -} - -Result OpusDecoder::Initialize(OpusParametersEx& params, Kernel::KTransferMemory* transfer_memory, - u64 transfer_memory_size) { - auto frame_size{params.use_large_frame_size ? 5760 : 1920}; - shared_buffer_size = transfer_memory_size; - shared_buffer = std::make_unique(shared_buffer_size); - shared_memory_mapped = true; - - buffer_size = - Common::AlignUp((frame_size * params.channel_count) / (48'000 / params.sample_rate), 16); - - out_data = {shared_buffer.get() + shared_buffer_size - buffer_size, buffer_size}; - size_t in_data_size{0x600u}; - in_data = {out_data.data() - in_data_size, in_data_size}; - - ON_RESULT_FAILURE { - if (shared_memory_mapped) { - shared_memory_mapped = false; - ASSERT(R_SUCCEEDED(hardware_opus.UnmapMemory(shared_buffer.get(), shared_buffer_size))); - } - }; - - R_TRY(hardware_opus.InitializeDecodeObject(params.sample_rate, params.channel_count, - shared_buffer.get(), shared_buffer_size)); - - sample_rate = params.sample_rate; - channel_count = params.channel_count; - use_large_frame_size = params.use_large_frame_size; - decode_object_initialized = true; - R_SUCCEED(); -} - -Result OpusDecoder::Initialize(OpusMultiStreamParametersEx& params, - Kernel::KTransferMemory* transfer_memory, u64 transfer_memory_size) { - auto frame_size{params.use_large_frame_size ? 5760 : 1920}; - shared_buffer_size = transfer_memory_size; - shared_buffer = std::make_unique(shared_buffer_size); - shared_memory_mapped = true; - - buffer_size = - Common::AlignUp((frame_size * params.channel_count) / (48'000 / params.sample_rate), 16); - - out_data = {shared_buffer.get() + shared_buffer_size - buffer_size, buffer_size}; - size_t in_data_size{Common::AlignUp(1500ull * params.total_stream_count, 64u)}; - in_data = {out_data.data() - in_data_size, in_data_size}; - - ON_RESULT_FAILURE { - if (shared_memory_mapped) { - shared_memory_mapped = false; - ASSERT(R_SUCCEEDED(hardware_opus.UnmapMemory(shared_buffer.get(), shared_buffer_size))); - } - }; - - R_TRY(hardware_opus.InitializeMultiStreamDecodeObject( - params.sample_rate, params.channel_count, params.total_stream_count, - params.stereo_stream_count, params.mappings.data(), shared_buffer.get(), - shared_buffer_size)); - - sample_rate = params.sample_rate; - channel_count = params.channel_count; - total_stream_count = params.total_stream_count; - stereo_stream_count = params.stereo_stream_count; - use_large_frame_size = params.use_large_frame_size; - decode_object_initialized = true; - R_SUCCEED(); -} - -Result OpusDecoder::DecodeInterleaved(u32* out_data_size, u64* out_time_taken, - u32* out_sample_count, std::span input_data, - std::span output_data, bool reset) { - u32 out_samples; - u64 time_taken{}; - - R_UNLESS(input_data.size_bytes() > sizeof(OpusPacketHeader), ResultInputDataTooSmall); - - auto* header_p{reinterpret_cast(input_data.data())}; - OpusPacketHeader header{ReverseHeader(*header_p)}; - - R_UNLESS(in_data.size_bytes() >= header.size && - header.size + sizeof(OpusPacketHeader) <= input_data.size_bytes(), - ResultBufferTooSmall); - - if (!shared_memory_mapped) { - R_TRY(hardware_opus.MapMemory(shared_buffer.get(), shared_buffer_size)); - shared_memory_mapped = true; - } - - std::memcpy(in_data.data(), input_data.data() + sizeof(OpusPacketHeader), header.size); - - R_TRY(hardware_opus.DecodeInterleaved(out_samples, out_data.data(), out_data.size_bytes(), - channel_count, in_data.data(), header.size, - shared_buffer.get(), time_taken, reset)); - - std::memcpy(output_data.data(), out_data.data(), out_samples * channel_count * sizeof(s16)); - - *out_data_size = header.size + sizeof(OpusPacketHeader); - *out_sample_count = out_samples; - if (out_time_taken) { - *out_time_taken = time_taken / 1000; - } - R_SUCCEED(); -} - -Result OpusDecoder::SetContext([[maybe_unused]] std::span context) { - R_SUCCEED_IF(shared_memory_mapped); - shared_memory_mapped = true; - R_RETURN(hardware_opus.MapMemory(shared_buffer.get(), shared_buffer_size)); -} - -Result OpusDecoder::DecodeInterleavedForMultiStream(u32* out_data_size, u64* out_time_taken, - u32* out_sample_count, - std::span input_data, - std::span output_data, bool reset) { - u32 out_samples; - u64 time_taken{}; - - R_UNLESS(input_data.size_bytes() > sizeof(OpusPacketHeader), ResultInputDataTooSmall); - - auto* header_p{reinterpret_cast(input_data.data())}; - OpusPacketHeader header{ReverseHeader(*header_p)}; - - LOG_ERROR(Service_Audio, "header size 0x{:X} input data size 0x{:X} in_data size 0x{:X}", - header.size, input_data.size_bytes(), in_data.size_bytes()); - - R_UNLESS(in_data.size_bytes() >= header.size && - header.size + sizeof(OpusPacketHeader) <= input_data.size_bytes(), - ResultBufferTooSmall); - - if (!shared_memory_mapped) { - R_TRY(hardware_opus.MapMemory(shared_buffer.get(), shared_buffer_size)); - shared_memory_mapped = true; - } - - std::memcpy(in_data.data(), input_data.data() + sizeof(OpusPacketHeader), header.size); - - R_TRY(hardware_opus.DecodeInterleavedForMultiStream( - out_samples, out_data.data(), out_data.size_bytes(), channel_count, in_data.data(), - header.size, shared_buffer.get(), time_taken, reset)); - - std::memcpy(output_data.data(), out_data.data(), out_samples * channel_count * sizeof(s16)); - - *out_data_size = header.size + sizeof(OpusPacketHeader); - *out_sample_count = out_samples; - if (out_time_taken) { - *out_time_taken = time_taken / 1000; - } - R_SUCCEED(); -} - -} // namespace AudioCore::OpusDecoder +// SPDX-FileCopyrightText: Copyright 2023 yuzu Emulator Project +// SPDX-License-Identifier: GPL-2.0-or-later + +#include "audio_core/opus/decoder.h" +#include "audio_core/opus/hardware_opus.h" +#include "audio_core/opus/parameters.h" +#include "common/alignment.h" +#include "common/swap.h" +#include "core/core.h" + +namespace AudioCore::OpusDecoder { +using namespace Service::Audio; +namespace { +OpusPacketHeader ReverseHeader(OpusPacketHeader header) { + OpusPacketHeader out; + out.size = Common::swap32(header.size); + out.final_range = Common::swap32(header.final_range); + return out; +} +} // namespace + +OpusDecoder::OpusDecoder(Core::System& system_, HardwareOpus& hardware_opus_) + : system{system_}, hardware_opus{hardware_opus_} {} + +OpusDecoder::~OpusDecoder() { + if (decode_object_initialized) { + hardware_opus.ShutdownDecodeObject(shared_buffer.get(), shared_buffer_size); + } +} + +Result OpusDecoder::Initialize(OpusParametersEx& params, Kernel::KTransferMemory* transfer_memory, + u64 transfer_memory_size) { + auto frame_size{params.use_large_frame_size ? 5760 : 1920}; + shared_buffer_size = transfer_memory_size; + shared_buffer = std::make_unique(shared_buffer_size); + shared_memory_mapped = true; + + buffer_size = + Common::AlignUp((frame_size * params.channel_count) / (48'000 / params.sample_rate), 16); + + out_data = {shared_buffer.get() + shared_buffer_size - buffer_size, buffer_size}; + size_t in_data_size{0x600u}; + in_data = {out_data.data() - in_data_size, in_data_size}; + + ON_RESULT_FAILURE { + if (shared_memory_mapped) { + shared_memory_mapped = false; + ASSERT(R_SUCCEEDED(hardware_opus.UnmapMemory(shared_buffer.get(), shared_buffer_size))); + } + }; + + R_TRY(hardware_opus.InitializeDecodeObject(params.sample_rate, params.channel_count, + shared_buffer.get(), shared_buffer_size)); + + sample_rate = params.sample_rate; + channel_count = params.channel_count; + use_large_frame_size = params.use_large_frame_size; + decode_object_initialized = true; + R_SUCCEED(); +} + +Result OpusDecoder::Initialize(OpusMultiStreamParametersEx& params, + Kernel::KTransferMemory* transfer_memory, u64 transfer_memory_size) { + auto frame_size{params.use_large_frame_size ? 5760 : 1920}; + shared_buffer_size = transfer_memory_size; + shared_buffer = std::make_unique(shared_buffer_size); + shared_memory_mapped = true; + + buffer_size = + Common::AlignUp((frame_size * params.channel_count) / (48'000 / params.sample_rate), 16); + + out_data = {shared_buffer.get() + shared_buffer_size - buffer_size, buffer_size}; + size_t in_data_size{Common::AlignUp(1500ull * params.total_stream_count, 64u)}; + in_data = {out_data.data() - in_data_size, in_data_size}; + + ON_RESULT_FAILURE { + if (shared_memory_mapped) { + shared_memory_mapped = false; + ASSERT(R_SUCCEEDED(hardware_opus.UnmapMemory(shared_buffer.get(), shared_buffer_size))); + } + }; + + R_TRY(hardware_opus.InitializeMultiStreamDecodeObject( + params.sample_rate, params.channel_count, params.total_stream_count, + params.stereo_stream_count, params.mappings.data(), shared_buffer.get(), + shared_buffer_size)); + + sample_rate = params.sample_rate; + channel_count = params.channel_count; + total_stream_count = params.total_stream_count; + stereo_stream_count = params.stereo_stream_count; + use_large_frame_size = params.use_large_frame_size; + decode_object_initialized = true; + R_SUCCEED(); +} + +Result OpusDecoder::DecodeInterleaved(u32* out_data_size, u64* out_time_taken, + u32* out_sample_count, std::span input_data, + std::span output_data, bool reset) { + u32 out_samples; + u64 time_taken{}; + + R_UNLESS(input_data.size_bytes() > sizeof(OpusPacketHeader), ResultInputDataTooSmall); + + auto* header_p{reinterpret_cast(input_data.data())}; + OpusPacketHeader header{ReverseHeader(*header_p)}; + + R_UNLESS(in_data.size_bytes() >= header.size && + header.size + sizeof(OpusPacketHeader) <= input_data.size_bytes(), + ResultBufferTooSmall); + + if (!shared_memory_mapped) { + R_TRY(hardware_opus.MapMemory(shared_buffer.get(), shared_buffer_size)); + shared_memory_mapped = true; + } + + std::memcpy(in_data.data(), input_data.data() + sizeof(OpusPacketHeader), header.size); + + R_TRY(hardware_opus.DecodeInterleaved(out_samples, out_data.data(), out_data.size_bytes(), + channel_count, in_data.data(), header.size, + shared_buffer.get(), time_taken, reset)); + + std::memcpy(output_data.data(), out_data.data(), out_samples * channel_count * sizeof(s16)); + + *out_data_size = header.size + sizeof(OpusPacketHeader); + *out_sample_count = out_samples; + if (out_time_taken) { + *out_time_taken = time_taken / 1000; + } + R_SUCCEED(); +} + +Result OpusDecoder::SetContext([[maybe_unused]] std::span context) { + R_SUCCEED_IF(shared_memory_mapped); + shared_memory_mapped = true; + R_RETURN(hardware_opus.MapMemory(shared_buffer.get(), shared_buffer_size)); +} + +Result OpusDecoder::DecodeInterleavedForMultiStream(u32* out_data_size, u64* out_time_taken, + u32* out_sample_count, + std::span input_data, + std::span output_data, bool reset) { + u32 out_samples; + u64 time_taken{}; + + R_UNLESS(input_data.size_bytes() > sizeof(OpusPacketHeader), ResultInputDataTooSmall); + + auto* header_p{reinterpret_cast(input_data.data())}; + OpusPacketHeader header{ReverseHeader(*header_p)}; + + LOG_ERROR(Service_Audio, "header size 0x{:X} input data size 0x{:X} in_data size 0x{:X}", + header.size, input_data.size_bytes(), in_data.size_bytes()); + + R_UNLESS(in_data.size_bytes() >= header.size && + header.size + sizeof(OpusPacketHeader) <= input_data.size_bytes(), + ResultBufferTooSmall); + + if (!shared_memory_mapped) { + R_TRY(hardware_opus.MapMemory(shared_buffer.get(), shared_buffer_size)); + shared_memory_mapped = true; + } + + std::memcpy(in_data.data(), input_data.data() + sizeof(OpusPacketHeader), header.size); + + R_TRY(hardware_opus.DecodeInterleavedForMultiStream( + out_samples, out_data.data(), out_data.size_bytes(), channel_count, in_data.data(), + header.size, shared_buffer.get(), time_taken, reset)); + + std::memcpy(output_data.data(), out_data.data(), out_samples * channel_count * sizeof(s16)); + + *out_data_size = header.size + sizeof(OpusPacketHeader); + *out_sample_count = out_samples; + if (out_time_taken) { + *out_time_taken = time_taken / 1000; + } + R_SUCCEED(); +} + +} // namespace AudioCore::OpusDecoder diff --git a/src/audio_core/opus/decoder.h b/src/audio_core/opus/decoder.h index d08d8a4a4d..fd728958a4 100644 --- a/src/audio_core/opus/decoder.h +++ b/src/audio_core/opus/decoder.h @@ -1,53 +1,53 @@ -// SPDX-FileCopyrightText: Copyright 2023 yuzu Emulator Project -// SPDX-License-Identifier: GPL-2.0-or-later - -#pragma once - -#include - -#include "audio_core/opus/parameters.h" -#include "common/common_types.h" -#include "core/hle/kernel/k_transfer_memory.h" -#include "core/hle/service/audio/errors.h" - -namespace Core { -class System; -} - -namespace AudioCore::OpusDecoder { -class HardwareOpus; - -class OpusDecoder { -public: - explicit OpusDecoder(Core::System& system, HardwareOpus& hardware_opus_); - ~OpusDecoder(); - - Result Initialize(OpusParametersEx& params, Kernel::KTransferMemory* transfer_memory, - u64 transfer_memory_size); - Result Initialize(OpusMultiStreamParametersEx& params, Kernel::KTransferMemory* transfer_memory, - u64 transfer_memory_size); - Result DecodeInterleaved(u32* out_data_size, u64* out_time_taken, u32* out_sample_count, - std::span input_data, std::span output_data, bool reset); - Result SetContext([[maybe_unused]] std::span context); - Result DecodeInterleavedForMultiStream(u32* out_data_size, u64* out_time_taken, - u32* out_sample_count, std::span input_data, - std::span output_data, bool reset); - -private: - Core::System& system; - HardwareOpus& hardware_opus; - std::unique_ptr shared_buffer{}; - u64 shared_buffer_size; - std::span in_data{}; - std::span out_data{}; - u64 buffer_size{}; - s32 sample_rate{}; - s32 channel_count{}; - bool use_large_frame_size{false}; - s32 total_stream_count{}; - s32 stereo_stream_count{}; - bool shared_memory_mapped{false}; - bool decode_object_initialized{false}; -}; - -} // namespace AudioCore::OpusDecoder +// SPDX-FileCopyrightText: Copyright 2023 yuzu Emulator Project +// SPDX-License-Identifier: GPL-2.0-or-later + +#pragma once + +#include + +#include "audio_core/opus/parameters.h" +#include "common/common_types.h" +#include "core/hle/kernel/k_transfer_memory.h" +#include "core/hle/service/audio/errors.h" + +namespace Core { +class System; +} + +namespace AudioCore::OpusDecoder { +class HardwareOpus; + +class OpusDecoder { +public: + explicit OpusDecoder(Core::System& system, HardwareOpus& hardware_opus_); + ~OpusDecoder(); + + Result Initialize(OpusParametersEx& params, Kernel::KTransferMemory* transfer_memory, + u64 transfer_memory_size); + Result Initialize(OpusMultiStreamParametersEx& params, Kernel::KTransferMemory* transfer_memory, + u64 transfer_memory_size); + Result DecodeInterleaved(u32* out_data_size, u64* out_time_taken, u32* out_sample_count, + std::span input_data, std::span output_data, bool reset); + Result SetContext([[maybe_unused]] std::span context); + Result DecodeInterleavedForMultiStream(u32* out_data_size, u64* out_time_taken, + u32* out_sample_count, std::span input_data, + std::span output_data, bool reset); + +private: + Core::System& system; + HardwareOpus& hardware_opus; + std::unique_ptr shared_buffer{}; + u64 shared_buffer_size; + std::span in_data{}; + std::span out_data{}; + u64 buffer_size{}; + s32 sample_rate{}; + s32 channel_count{}; + bool use_large_frame_size{false}; + s32 total_stream_count{}; + s32 stereo_stream_count{}; + bool shared_memory_mapped{false}; + bool decode_object_initialized{false}; +}; + +} // namespace AudioCore::OpusDecoder diff --git a/src/audio_core/opus/decoder_manager.cpp b/src/audio_core/opus/decoder_manager.cpp index fdeccdf50b..1464880a1b 100644 --- a/src/audio_core/opus/decoder_manager.cpp +++ b/src/audio_core/opus/decoder_manager.cpp @@ -1,102 +1,102 @@ -// SPDX-FileCopyrightText: Copyright 2023 yuzu Emulator Project -// SPDX-License-Identifier: GPL-2.0-or-later - -#include "audio_core/adsp/apps/opus/opus_decoder.h" -#include "audio_core/opus/decoder_manager.h" -#include "common/alignment.h" -#include "core/core.h" - -namespace AudioCore::OpusDecoder { -using namespace Service::Audio; - -namespace { -bool IsValidChannelCount(u32 channel_count) { - return channel_count == 1 || channel_count == 2; -} - -bool IsValidMultiStreamChannelCount(u32 channel_count) { - return channel_count > 0 && channel_count <= OpusStreamCountMax; -} - -bool IsValidSampleRate(u32 sample_rate) { - return sample_rate == 8'000 || sample_rate == 12'000 || sample_rate == 16'000 || - sample_rate == 24'000 || sample_rate == 48'000; -} - -bool IsValidStreamCount(u32 channel_count, u32 total_stream_count, u32 stereo_stream_count) { - return total_stream_count > 0 && static_cast(stereo_stream_count) >= 0 && - stereo_stream_count <= total_stream_count && - total_stream_count + stereo_stream_count <= channel_count; -} - -} // namespace - -OpusDecoderManager::OpusDecoderManager(Core::System& system_) - : system{system_}, hardware_opus{system} { - for (u32 i = 0; i < MaxChannels; i++) { - required_workbuffer_sizes[i] = hardware_opus.GetWorkBufferSize(1 + i); - } -} - -Result OpusDecoderManager::GetWorkBufferSize(OpusParameters& params, u64& out_size) { - OpusParametersEx ex{ - .sample_rate = params.sample_rate, - .channel_count = params.channel_count, - .use_large_frame_size = false, - }; - R_RETURN(GetWorkBufferSizeExEx(ex, out_size)); -} - -Result OpusDecoderManager::GetWorkBufferSizeEx(OpusParametersEx& params, u64& out_size) { - R_RETURN(GetWorkBufferSizeExEx(params, out_size)); -} - -Result OpusDecoderManager::GetWorkBufferSizeExEx(OpusParametersEx& params, u64& out_size) { - R_UNLESS(IsValidChannelCount(params.channel_count), ResultInvalidOpusChannelCount); - R_UNLESS(IsValidSampleRate(params.sample_rate), ResultInvalidOpusSampleRate); - - auto work_buffer_size{required_workbuffer_sizes[params.channel_count - 1]}; - auto frame_size{params.use_large_frame_size ? 5760 : 1920}; - work_buffer_size += - Common::AlignUp((frame_size * params.channel_count) / (48'000 / params.sample_rate), 64); - out_size = work_buffer_size + 0x600; - R_SUCCEED(); -} - -Result OpusDecoderManager::GetWorkBufferSizeForMultiStream(OpusMultiStreamParameters& params, - u64& out_size) { - OpusMultiStreamParametersEx ex{ - .sample_rate = params.sample_rate, - .channel_count = params.channel_count, - .total_stream_count = params.total_stream_count, - .stereo_stream_count = params.stereo_stream_count, - .use_large_frame_size = false, - .mappings = {}, - }; - R_RETURN(GetWorkBufferSizeForMultiStreamExEx(ex, out_size)); -} - -Result OpusDecoderManager::GetWorkBufferSizeForMultiStreamEx(OpusMultiStreamParametersEx& params, - u64& out_size) { - R_RETURN(GetWorkBufferSizeForMultiStreamExEx(params, out_size)); -} - -Result OpusDecoderManager::GetWorkBufferSizeForMultiStreamExEx(OpusMultiStreamParametersEx& params, - u64& out_size) { - R_UNLESS(IsValidMultiStreamChannelCount(params.channel_count), ResultInvalidOpusChannelCount); - R_UNLESS(IsValidSampleRate(params.sample_rate), ResultInvalidOpusSampleRate); - R_UNLESS(IsValidStreamCount(params.channel_count, params.total_stream_count, - params.stereo_stream_count), - ResultInvalidOpusSampleRate); - - auto work_buffer_size{hardware_opus.GetWorkBufferSizeForMultiStream( - params.total_stream_count, params.stereo_stream_count)}; - auto frame_size{params.use_large_frame_size ? 5760 : 1920}; - work_buffer_size += Common::AlignUp(1500 * params.total_stream_count, 64); - work_buffer_size += - Common::AlignUp((frame_size * params.channel_count) / (48'000 / params.sample_rate), 64); - out_size = work_buffer_size; - R_SUCCEED(); -} - -} // namespace AudioCore::OpusDecoder +// SPDX-FileCopyrightText: Copyright 2023 yuzu Emulator Project +// SPDX-License-Identifier: GPL-2.0-or-later + +#include "audio_core/adsp/apps/opus/opus_decoder.h" +#include "audio_core/opus/decoder_manager.h" +#include "common/alignment.h" +#include "core/core.h" + +namespace AudioCore::OpusDecoder { +using namespace Service::Audio; + +namespace { +bool IsValidChannelCount(u32 channel_count) { + return channel_count == 1 || channel_count == 2; +} + +bool IsValidMultiStreamChannelCount(u32 channel_count) { + return channel_count > 0 && channel_count <= OpusStreamCountMax; +} + +bool IsValidSampleRate(u32 sample_rate) { + return sample_rate == 8'000 || sample_rate == 12'000 || sample_rate == 16'000 || + sample_rate == 24'000 || sample_rate == 48'000; +} + +bool IsValidStreamCount(u32 channel_count, u32 total_stream_count, u32 stereo_stream_count) { + return total_stream_count > 0 && static_cast(stereo_stream_count) >= 0 && + stereo_stream_count <= total_stream_count && + total_stream_count + stereo_stream_count <= channel_count; +} + +} // namespace + +OpusDecoderManager::OpusDecoderManager(Core::System& system_) + : system{system_}, hardware_opus{system} { + for (u32 i = 0; i < MaxChannels; i++) { + required_workbuffer_sizes[i] = hardware_opus.GetWorkBufferSize(1 + i); + } +} + +Result OpusDecoderManager::GetWorkBufferSize(OpusParameters& params, u64& out_size) { + OpusParametersEx ex{ + .sample_rate = params.sample_rate, + .channel_count = params.channel_count, + .use_large_frame_size = false, + }; + R_RETURN(GetWorkBufferSizeExEx(ex, out_size)); +} + +Result OpusDecoderManager::GetWorkBufferSizeEx(OpusParametersEx& params, u64& out_size) { + R_RETURN(GetWorkBufferSizeExEx(params, out_size)); +} + +Result OpusDecoderManager::GetWorkBufferSizeExEx(OpusParametersEx& params, u64& out_size) { + R_UNLESS(IsValidChannelCount(params.channel_count), ResultInvalidOpusChannelCount); + R_UNLESS(IsValidSampleRate(params.sample_rate), ResultInvalidOpusSampleRate); + + auto work_buffer_size{required_workbuffer_sizes[params.channel_count - 1]}; + auto frame_size{params.use_large_frame_size ? 5760 : 1920}; + work_buffer_size += + Common::AlignUp((frame_size * params.channel_count) / (48'000 / params.sample_rate), 64); + out_size = work_buffer_size + 0x600; + R_SUCCEED(); +} + +Result OpusDecoderManager::GetWorkBufferSizeForMultiStream(OpusMultiStreamParameters& params, + u64& out_size) { + OpusMultiStreamParametersEx ex{ + .sample_rate = params.sample_rate, + .channel_count = params.channel_count, + .total_stream_count = params.total_stream_count, + .stereo_stream_count = params.stereo_stream_count, + .use_large_frame_size = false, + .mappings = {}, + }; + R_RETURN(GetWorkBufferSizeForMultiStreamExEx(ex, out_size)); +} + +Result OpusDecoderManager::GetWorkBufferSizeForMultiStreamEx(OpusMultiStreamParametersEx& params, + u64& out_size) { + R_RETURN(GetWorkBufferSizeForMultiStreamExEx(params, out_size)); +} + +Result OpusDecoderManager::GetWorkBufferSizeForMultiStreamExEx(OpusMultiStreamParametersEx& params, + u64& out_size) { + R_UNLESS(IsValidMultiStreamChannelCount(params.channel_count), ResultInvalidOpusChannelCount); + R_UNLESS(IsValidSampleRate(params.sample_rate), ResultInvalidOpusSampleRate); + R_UNLESS(IsValidStreamCount(params.channel_count, params.total_stream_count, + params.stereo_stream_count), + ResultInvalidOpusSampleRate); + + auto work_buffer_size{hardware_opus.GetWorkBufferSizeForMultiStream( + params.total_stream_count, params.stereo_stream_count)}; + auto frame_size{params.use_large_frame_size ? 5760 : 1920}; + work_buffer_size += Common::AlignUp(1500 * params.total_stream_count, 64); + work_buffer_size += + Common::AlignUp((frame_size * params.channel_count) / (48'000 / params.sample_rate), 64); + out_size = work_buffer_size; + R_SUCCEED(); +} + +} // namespace AudioCore::OpusDecoder diff --git a/src/audio_core/opus/decoder_manager.h b/src/audio_core/opus/decoder_manager.h index 466e1967b8..70ebc4babd 100644 --- a/src/audio_core/opus/decoder_manager.h +++ b/src/audio_core/opus/decoder_manager.h @@ -1,38 +1,38 @@ -// SPDX-FileCopyrightText: Copyright 2023 yuzu Emulator Project -// SPDX-License-Identifier: GPL-2.0-or-later - -#pragma once - -#include "audio_core/opus/hardware_opus.h" -#include "audio_core/opus/parameters.h" -#include "common/common_types.h" -#include "core/hle/service/audio/errors.h" - -namespace Core { -class System; -} - -namespace AudioCore::OpusDecoder { - -class OpusDecoderManager { -public: - OpusDecoderManager(Core::System& system); - - HardwareOpus& GetHardwareOpus() { - return hardware_opus; - } - - Result GetWorkBufferSize(OpusParameters& params, u64& out_size); - Result GetWorkBufferSizeEx(OpusParametersEx& params, u64& out_size); - Result GetWorkBufferSizeExEx(OpusParametersEx& params, u64& out_size); - Result GetWorkBufferSizeForMultiStream(OpusMultiStreamParameters& params, u64& out_size); - Result GetWorkBufferSizeForMultiStreamEx(OpusMultiStreamParametersEx& params, u64& out_size); - Result GetWorkBufferSizeForMultiStreamExEx(OpusMultiStreamParametersEx& params, u64& out_size); - -private: - Core::System& system; - HardwareOpus hardware_opus; - std::array required_workbuffer_sizes{}; -}; - -} // namespace AudioCore::OpusDecoder +// SPDX-FileCopyrightText: Copyright 2023 yuzu Emulator Project +// SPDX-License-Identifier: GPL-2.0-or-later + +#pragma once + +#include "audio_core/opus/hardware_opus.h" +#include "audio_core/opus/parameters.h" +#include "common/common_types.h" +#include "core/hle/service/audio/errors.h" + +namespace Core { +class System; +} + +namespace AudioCore::OpusDecoder { + +class OpusDecoderManager { +public: + OpusDecoderManager(Core::System& system); + + HardwareOpus& GetHardwareOpus() { + return hardware_opus; + } + + Result GetWorkBufferSize(OpusParameters& params, u64& out_size); + Result GetWorkBufferSizeEx(OpusParametersEx& params, u64& out_size); + Result GetWorkBufferSizeExEx(OpusParametersEx& params, u64& out_size); + Result GetWorkBufferSizeForMultiStream(OpusMultiStreamParameters& params, u64& out_size); + Result GetWorkBufferSizeForMultiStreamEx(OpusMultiStreamParametersEx& params, u64& out_size); + Result GetWorkBufferSizeForMultiStreamExEx(OpusMultiStreamParametersEx& params, u64& out_size); + +private: + Core::System& system; + HardwareOpus hardware_opus; + std::array required_workbuffer_sizes{}; +}; + +} // namespace AudioCore::OpusDecoder diff --git a/src/audio_core/opus/hardware_opus.cpp b/src/audio_core/opus/hardware_opus.cpp index d6544dcb05..5ff71ab2d0 100644 --- a/src/audio_core/opus/hardware_opus.cpp +++ b/src/audio_core/opus/hardware_opus.cpp @@ -1,241 +1,241 @@ -// SPDX-FileCopyrightText: Copyright 2023 yuzu Emulator Project -// SPDX-License-Identifier: GPL-2.0-or-later - -#include - -#include "audio_core/audio_core.h" -#include "audio_core/opus/hardware_opus.h" -#include "core/core.h" - -namespace AudioCore::OpusDecoder { -namespace { -using namespace Service::Audio; - -static constexpr Result ResultCodeFromLibOpusErrorCode(u64 error_code) { - s32 error{static_cast(error_code)}; - ASSERT(error <= OPUS_OK); - switch (error) { - case OPUS_ALLOC_FAIL: - R_THROW(ResultLibOpusAllocFail); - case OPUS_INVALID_STATE: - R_THROW(ResultLibOpusInvalidState); - case OPUS_UNIMPLEMENTED: - R_THROW(ResultLibOpusUnimplemented); - case OPUS_INVALID_PACKET: - R_THROW(ResultLibOpusInvalidPacket); - case OPUS_INTERNAL_ERROR: - R_THROW(ResultLibOpusInternalError); - case OPUS_BUFFER_TOO_SMALL: - R_THROW(ResultBufferTooSmall); - case OPUS_BAD_ARG: - R_THROW(ResultLibOpusBadArg); - case OPUS_OK: - R_RETURN(ResultSuccess); - } - UNREACHABLE(); -} - -} // namespace - -HardwareOpus::HardwareOpus(Core::System& system_) - : system{system_}, opus_decoder{system.AudioCore().ADSP().OpusDecoder()} { - opus_decoder.SetSharedMemory(shared_memory); -} - -u64 HardwareOpus::GetWorkBufferSize(u32 channel) { - if (!opus_decoder.IsRunning()) { - return 0; - } - std::scoped_lock l{mutex}; - shared_memory.host_send_data[0] = channel; - opus_decoder.Send(ADSP::Direction::DSP, ADSP::OpusDecoder::Message::GetWorkBufferSize); - auto msg = opus_decoder.Receive(ADSP::Direction::Host); - if (msg != ADSP::OpusDecoder::Message::GetWorkBufferSizeOK) { - LOG_ERROR(Service_Audio, "OpusDecoder returned invalid message. Expected {} got {}", - ADSP::OpusDecoder::Message::GetWorkBufferSizeOK, msg); - return 0; - } - return shared_memory.dsp_return_data[0]; -} - -u64 HardwareOpus::GetWorkBufferSizeForMultiStream(u32 total_stream_count, u32 stereo_stream_count) { - std::scoped_lock l{mutex}; - shared_memory.host_send_data[0] = total_stream_count; - shared_memory.host_send_data[1] = stereo_stream_count; - opus_decoder.Send(ADSP::Direction::DSP, - ADSP::OpusDecoder::Message::GetWorkBufferSizeForMultiStream); - auto msg = opus_decoder.Receive(ADSP::Direction::Host); - if (msg != ADSP::OpusDecoder::Message::GetWorkBufferSizeForMultiStreamOK) { - LOG_ERROR(Service_Audio, "OpusDecoder returned invalid message. Expected {} got {}", - ADSP::OpusDecoder::Message::GetWorkBufferSizeForMultiStreamOK, msg); - return 0; - } - return shared_memory.dsp_return_data[0]; -} - -Result HardwareOpus::InitializeDecodeObject(u32 sample_rate, u32 channel_count, void* buffer, - u64 buffer_size) { - std::scoped_lock l{mutex}; - shared_memory.host_send_data[0] = (u64)buffer; - shared_memory.host_send_data[1] = buffer_size; - shared_memory.host_send_data[2] = sample_rate; - shared_memory.host_send_data[3] = channel_count; - - opus_decoder.Send(ADSP::Direction::DSP, ADSP::OpusDecoder::Message::InitializeDecodeObject); - auto msg = opus_decoder.Receive(ADSP::Direction::Host); - if (msg != ADSP::OpusDecoder::Message::InitializeDecodeObjectOK) { - LOG_ERROR(Service_Audio, "OpusDecoder returned invalid message. Expected {} got {}", - ADSP::OpusDecoder::Message::InitializeDecodeObjectOK, msg); - R_THROW(ResultInvalidOpusDSPReturnCode); - } - - R_RETURN(ResultCodeFromLibOpusErrorCode(shared_memory.dsp_return_data[0])); -} - -Result HardwareOpus::InitializeMultiStreamDecodeObject(u32 sample_rate, u32 channel_count, - u32 total_stream_count, - u32 stereo_stream_count, void* mappings, - void* buffer, u64 buffer_size) { - std::scoped_lock l{mutex}; - shared_memory.host_send_data[0] = (u64)buffer; - shared_memory.host_send_data[1] = buffer_size; - shared_memory.host_send_data[2] = sample_rate; - shared_memory.host_send_data[3] = channel_count; - shared_memory.host_send_data[4] = total_stream_count; - shared_memory.host_send_data[5] = stereo_stream_count; - - ASSERT(channel_count <= MaxChannels); - std::memcpy(shared_memory.channel_mapping.data(), mappings, channel_count * sizeof(u8)); - - opus_decoder.Send(ADSP::Direction::DSP, - ADSP::OpusDecoder::Message::InitializeMultiStreamDecodeObject); - auto msg = opus_decoder.Receive(ADSP::Direction::Host); - if (msg != ADSP::OpusDecoder::Message::InitializeMultiStreamDecodeObjectOK) { - LOG_ERROR(Service_Audio, "OpusDecoder returned invalid message. Expected {} got {}", - ADSP::OpusDecoder::Message::InitializeMultiStreamDecodeObjectOK, msg); - R_THROW(ResultInvalidOpusDSPReturnCode); - } - - R_RETURN(ResultCodeFromLibOpusErrorCode(shared_memory.dsp_return_data[0])); -} - -Result HardwareOpus::ShutdownDecodeObject(void* buffer, u64 buffer_size) { - std::scoped_lock l{mutex}; - shared_memory.host_send_data[0] = (u64)buffer; - shared_memory.host_send_data[1] = buffer_size; - - opus_decoder.Send(ADSP::Direction::DSP, ADSP::OpusDecoder::Message::ShutdownDecodeObject); - auto msg = opus_decoder.Receive(ADSP::Direction::Host); - ASSERT_MSG(msg == ADSP::OpusDecoder::Message::ShutdownDecodeObjectOK, - "Expected Opus shutdown code {}, got {}", - ADSP::OpusDecoder::Message::ShutdownDecodeObjectOK, msg); - - R_RETURN(ResultCodeFromLibOpusErrorCode(shared_memory.dsp_return_data[0])); -} - -Result HardwareOpus::ShutdownMultiStreamDecodeObject(void* buffer, u64 buffer_size) { - std::scoped_lock l{mutex}; - shared_memory.host_send_data[0] = (u64)buffer; - shared_memory.host_send_data[1] = buffer_size; - - opus_decoder.Send(ADSP::Direction::DSP, - ADSP::OpusDecoder::Message::ShutdownMultiStreamDecodeObject); - auto msg = opus_decoder.Receive(ADSP::Direction::Host); - ASSERT_MSG(msg == ADSP::OpusDecoder::Message::ShutdownMultiStreamDecodeObjectOK, - "Expected Opus shutdown code {}, got {}", - ADSP::OpusDecoder::Message::ShutdownMultiStreamDecodeObjectOK, msg); - - R_RETURN(ResultCodeFromLibOpusErrorCode(shared_memory.dsp_return_data[0])); -} - -Result HardwareOpus::DecodeInterleaved(u32& out_sample_count, void* output_data, - u64 output_data_size, u32 channel_count, void* input_data, - u64 input_data_size, void* buffer, u64& out_time_taken, - bool reset) { - std::scoped_lock l{mutex}; - shared_memory.host_send_data[0] = (u64)buffer; - shared_memory.host_send_data[1] = (u64)input_data; - shared_memory.host_send_data[2] = input_data_size; - shared_memory.host_send_data[3] = (u64)output_data; - shared_memory.host_send_data[4] = output_data_size; - shared_memory.host_send_data[5] = 0; - shared_memory.host_send_data[6] = reset; - - opus_decoder.Send(ADSP::Direction::DSP, ADSP::OpusDecoder::Message::DecodeInterleaved); - auto msg = opus_decoder.Receive(ADSP::Direction::Host); - if (msg != ADSP::OpusDecoder::Message::DecodeInterleavedOK) { - LOG_ERROR(Service_Audio, "OpusDecoder returned invalid message. Expected {} got {}", - ADSP::OpusDecoder::Message::DecodeInterleavedOK, msg); - R_THROW(ResultInvalidOpusDSPReturnCode); - } - - auto error_code{static_cast(shared_memory.dsp_return_data[0])}; - if (error_code == OPUS_OK) { - out_sample_count = static_cast(shared_memory.dsp_return_data[1]); - out_time_taken = 1000 * shared_memory.dsp_return_data[2]; - } - R_RETURN(ResultCodeFromLibOpusErrorCode(error_code)); -} - -Result HardwareOpus::DecodeInterleavedForMultiStream(u32& out_sample_count, void* output_data, - u64 output_data_size, u32 channel_count, - void* input_data, u64 input_data_size, - void* buffer, u64& out_time_taken, - bool reset) { - std::scoped_lock l{mutex}; - shared_memory.host_send_data[0] = (u64)buffer; - shared_memory.host_send_data[1] = (u64)input_data; - shared_memory.host_send_data[2] = input_data_size; - shared_memory.host_send_data[3] = (u64)output_data; - shared_memory.host_send_data[4] = output_data_size; - shared_memory.host_send_data[5] = 0; - shared_memory.host_send_data[6] = reset; - - opus_decoder.Send(ADSP::Direction::DSP, - ADSP::OpusDecoder::Message::DecodeInterleavedForMultiStream); - auto msg = opus_decoder.Receive(ADSP::Direction::Host); - if (msg != ADSP::OpusDecoder::Message::DecodeInterleavedForMultiStreamOK) { - LOG_ERROR(Service_Audio, "OpusDecoder returned invalid message. Expected {} got {}", - ADSP::OpusDecoder::Message::DecodeInterleavedForMultiStreamOK, msg); - R_THROW(ResultInvalidOpusDSPReturnCode); - } - - auto error_code{static_cast(shared_memory.dsp_return_data[0])}; - if (error_code == OPUS_OK) { - out_sample_count = static_cast(shared_memory.dsp_return_data[1]); - out_time_taken = 1000 * shared_memory.dsp_return_data[2]; - } - R_RETURN(ResultCodeFromLibOpusErrorCode(error_code)); -} - -Result HardwareOpus::MapMemory(void* buffer, u64 buffer_size) { - std::scoped_lock l{mutex}; - shared_memory.host_send_data[0] = (u64)buffer; - shared_memory.host_send_data[1] = buffer_size; - - opus_decoder.Send(ADSP::Direction::DSP, ADSP::OpusDecoder::Message::MapMemory); - auto msg = opus_decoder.Receive(ADSP::Direction::Host); - if (msg != ADSP::OpusDecoder::Message::MapMemoryOK) { - LOG_ERROR(Service_Audio, "OpusDecoder returned invalid message. Expected {} got {}", - ADSP::OpusDecoder::Message::MapMemoryOK, msg); - R_THROW(ResultInvalidOpusDSPReturnCode); - } - R_SUCCEED(); -} - -Result HardwareOpus::UnmapMemory(void* buffer, u64 buffer_size) { - std::scoped_lock l{mutex}; - shared_memory.host_send_data[0] = (u64)buffer; - shared_memory.host_send_data[1] = buffer_size; - - opus_decoder.Send(ADSP::Direction::DSP, ADSP::OpusDecoder::Message::UnmapMemory); - auto msg = opus_decoder.Receive(ADSP::Direction::Host); - if (msg != ADSP::OpusDecoder::Message::UnmapMemoryOK) { - LOG_ERROR(Service_Audio, "OpusDecoder returned invalid message. Expected {} got {}", - ADSP::OpusDecoder::Message::UnmapMemoryOK, msg); - R_THROW(ResultInvalidOpusDSPReturnCode); - } - R_SUCCEED(); -} - -} // namespace AudioCore::OpusDecoder +// SPDX-FileCopyrightText: Copyright 2023 yuzu Emulator Project +// SPDX-License-Identifier: GPL-2.0-or-later + +#include + +#include "audio_core/audio_core.h" +#include "audio_core/opus/hardware_opus.h" +#include "core/core.h" + +namespace AudioCore::OpusDecoder { +namespace { +using namespace Service::Audio; + +static constexpr Result ResultCodeFromLibOpusErrorCode(u64 error_code) { + s32 error{static_cast(error_code)}; + ASSERT(error <= OPUS_OK); + switch (error) { + case OPUS_ALLOC_FAIL: + R_THROW(ResultLibOpusAllocFail); + case OPUS_INVALID_STATE: + R_THROW(ResultLibOpusInvalidState); + case OPUS_UNIMPLEMENTED: + R_THROW(ResultLibOpusUnimplemented); + case OPUS_INVALID_PACKET: + R_THROW(ResultLibOpusInvalidPacket); + case OPUS_INTERNAL_ERROR: + R_THROW(ResultLibOpusInternalError); + case OPUS_BUFFER_TOO_SMALL: + R_THROW(ResultBufferTooSmall); + case OPUS_BAD_ARG: + R_THROW(ResultLibOpusBadArg); + case OPUS_OK: + R_RETURN(ResultSuccess); + } + UNREACHABLE(); +} + +} // namespace + +HardwareOpus::HardwareOpus(Core::System& system_) + : system{system_}, opus_decoder{system.AudioCore().ADSP().OpusDecoder()} { + opus_decoder.SetSharedMemory(shared_memory); +} + +u64 HardwareOpus::GetWorkBufferSize(u32 channel) { + if (!opus_decoder.IsRunning()) { + return 0; + } + std::scoped_lock l{mutex}; + shared_memory.host_send_data[0] = channel; + opus_decoder.Send(ADSP::Direction::DSP, ADSP::OpusDecoder::Message::GetWorkBufferSize); + auto msg = opus_decoder.Receive(ADSP::Direction::Host); + if (msg != ADSP::OpusDecoder::Message::GetWorkBufferSizeOK) { + LOG_ERROR(Service_Audio, "OpusDecoder returned invalid message. Expected {} got {}", + ADSP::OpusDecoder::Message::GetWorkBufferSizeOK, msg); + return 0; + } + return shared_memory.dsp_return_data[0]; +} + +u64 HardwareOpus::GetWorkBufferSizeForMultiStream(u32 total_stream_count, u32 stereo_stream_count) { + std::scoped_lock l{mutex}; + shared_memory.host_send_data[0] = total_stream_count; + shared_memory.host_send_data[1] = stereo_stream_count; + opus_decoder.Send(ADSP::Direction::DSP, + ADSP::OpusDecoder::Message::GetWorkBufferSizeForMultiStream); + auto msg = opus_decoder.Receive(ADSP::Direction::Host); + if (msg != ADSP::OpusDecoder::Message::GetWorkBufferSizeForMultiStreamOK) { + LOG_ERROR(Service_Audio, "OpusDecoder returned invalid message. Expected {} got {}", + ADSP::OpusDecoder::Message::GetWorkBufferSizeForMultiStreamOK, msg); + return 0; + } + return shared_memory.dsp_return_data[0]; +} + +Result HardwareOpus::InitializeDecodeObject(u32 sample_rate, u32 channel_count, void* buffer, + u64 buffer_size) { + std::scoped_lock l{mutex}; + shared_memory.host_send_data[0] = (u64)buffer; + shared_memory.host_send_data[1] = buffer_size; + shared_memory.host_send_data[2] = sample_rate; + shared_memory.host_send_data[3] = channel_count; + + opus_decoder.Send(ADSP::Direction::DSP, ADSP::OpusDecoder::Message::InitializeDecodeObject); + auto msg = opus_decoder.Receive(ADSP::Direction::Host); + if (msg != ADSP::OpusDecoder::Message::InitializeDecodeObjectOK) { + LOG_ERROR(Service_Audio, "OpusDecoder returned invalid message. Expected {} got {}", + ADSP::OpusDecoder::Message::InitializeDecodeObjectOK, msg); + R_THROW(ResultInvalidOpusDSPReturnCode); + } + + R_RETURN(ResultCodeFromLibOpusErrorCode(shared_memory.dsp_return_data[0])); +} + +Result HardwareOpus::InitializeMultiStreamDecodeObject(u32 sample_rate, u32 channel_count, + u32 total_stream_count, + u32 stereo_stream_count, void* mappings, + void* buffer, u64 buffer_size) { + std::scoped_lock l{mutex}; + shared_memory.host_send_data[0] = (u64)buffer; + shared_memory.host_send_data[1] = buffer_size; + shared_memory.host_send_data[2] = sample_rate; + shared_memory.host_send_data[3] = channel_count; + shared_memory.host_send_data[4] = total_stream_count; + shared_memory.host_send_data[5] = stereo_stream_count; + + ASSERT(channel_count <= MaxChannels); + std::memcpy(shared_memory.channel_mapping.data(), mappings, channel_count * sizeof(u8)); + + opus_decoder.Send(ADSP::Direction::DSP, + ADSP::OpusDecoder::Message::InitializeMultiStreamDecodeObject); + auto msg = opus_decoder.Receive(ADSP::Direction::Host); + if (msg != ADSP::OpusDecoder::Message::InitializeMultiStreamDecodeObjectOK) { + LOG_ERROR(Service_Audio, "OpusDecoder returned invalid message. Expected {} got {}", + ADSP::OpusDecoder::Message::InitializeMultiStreamDecodeObjectOK, msg); + R_THROW(ResultInvalidOpusDSPReturnCode); + } + + R_RETURN(ResultCodeFromLibOpusErrorCode(shared_memory.dsp_return_data[0])); +} + +Result HardwareOpus::ShutdownDecodeObject(void* buffer, u64 buffer_size) { + std::scoped_lock l{mutex}; + shared_memory.host_send_data[0] = (u64)buffer; + shared_memory.host_send_data[1] = buffer_size; + + opus_decoder.Send(ADSP::Direction::DSP, ADSP::OpusDecoder::Message::ShutdownDecodeObject); + auto msg = opus_decoder.Receive(ADSP::Direction::Host); + ASSERT_MSG(msg == ADSP::OpusDecoder::Message::ShutdownDecodeObjectOK, + "Expected Opus shutdown code {}, got {}", + ADSP::OpusDecoder::Message::ShutdownDecodeObjectOK, msg); + + R_RETURN(ResultCodeFromLibOpusErrorCode(shared_memory.dsp_return_data[0])); +} + +Result HardwareOpus::ShutdownMultiStreamDecodeObject(void* buffer, u64 buffer_size) { + std::scoped_lock l{mutex}; + shared_memory.host_send_data[0] = (u64)buffer; + shared_memory.host_send_data[1] = buffer_size; + + opus_decoder.Send(ADSP::Direction::DSP, + ADSP::OpusDecoder::Message::ShutdownMultiStreamDecodeObject); + auto msg = opus_decoder.Receive(ADSP::Direction::Host); + ASSERT_MSG(msg == ADSP::OpusDecoder::Message::ShutdownMultiStreamDecodeObjectOK, + "Expected Opus shutdown code {}, got {}", + ADSP::OpusDecoder::Message::ShutdownMultiStreamDecodeObjectOK, msg); + + R_RETURN(ResultCodeFromLibOpusErrorCode(shared_memory.dsp_return_data[0])); +} + +Result HardwareOpus::DecodeInterleaved(u32& out_sample_count, void* output_data, + u64 output_data_size, u32 channel_count, void* input_data, + u64 input_data_size, void* buffer, u64& out_time_taken, + bool reset) { + std::scoped_lock l{mutex}; + shared_memory.host_send_data[0] = (u64)buffer; + shared_memory.host_send_data[1] = (u64)input_data; + shared_memory.host_send_data[2] = input_data_size; + shared_memory.host_send_data[3] = (u64)output_data; + shared_memory.host_send_data[4] = output_data_size; + shared_memory.host_send_data[5] = 0; + shared_memory.host_send_data[6] = reset; + + opus_decoder.Send(ADSP::Direction::DSP, ADSP::OpusDecoder::Message::DecodeInterleaved); + auto msg = opus_decoder.Receive(ADSP::Direction::Host); + if (msg != ADSP::OpusDecoder::Message::DecodeInterleavedOK) { + LOG_ERROR(Service_Audio, "OpusDecoder returned invalid message. Expected {} got {}", + ADSP::OpusDecoder::Message::DecodeInterleavedOK, msg); + R_THROW(ResultInvalidOpusDSPReturnCode); + } + + auto error_code{static_cast(shared_memory.dsp_return_data[0])}; + if (error_code == OPUS_OK) { + out_sample_count = static_cast(shared_memory.dsp_return_data[1]); + out_time_taken = 1000 * shared_memory.dsp_return_data[2]; + } + R_RETURN(ResultCodeFromLibOpusErrorCode(error_code)); +} + +Result HardwareOpus::DecodeInterleavedForMultiStream(u32& out_sample_count, void* output_data, + u64 output_data_size, u32 channel_count, + void* input_data, u64 input_data_size, + void* buffer, u64& out_time_taken, + bool reset) { + std::scoped_lock l{mutex}; + shared_memory.host_send_data[0] = (u64)buffer; + shared_memory.host_send_data[1] = (u64)input_data; + shared_memory.host_send_data[2] = input_data_size; + shared_memory.host_send_data[3] = (u64)output_data; + shared_memory.host_send_data[4] = output_data_size; + shared_memory.host_send_data[5] = 0; + shared_memory.host_send_data[6] = reset; + + opus_decoder.Send(ADSP::Direction::DSP, + ADSP::OpusDecoder::Message::DecodeInterleavedForMultiStream); + auto msg = opus_decoder.Receive(ADSP::Direction::Host); + if (msg != ADSP::OpusDecoder::Message::DecodeInterleavedForMultiStreamOK) { + LOG_ERROR(Service_Audio, "OpusDecoder returned invalid message. Expected {} got {}", + ADSP::OpusDecoder::Message::DecodeInterleavedForMultiStreamOK, msg); + R_THROW(ResultInvalidOpusDSPReturnCode); + } + + auto error_code{static_cast(shared_memory.dsp_return_data[0])}; + if (error_code == OPUS_OK) { + out_sample_count = static_cast(shared_memory.dsp_return_data[1]); + out_time_taken = 1000 * shared_memory.dsp_return_data[2]; + } + R_RETURN(ResultCodeFromLibOpusErrorCode(error_code)); +} + +Result HardwareOpus::MapMemory(void* buffer, u64 buffer_size) { + std::scoped_lock l{mutex}; + shared_memory.host_send_data[0] = (u64)buffer; + shared_memory.host_send_data[1] = buffer_size; + + opus_decoder.Send(ADSP::Direction::DSP, ADSP::OpusDecoder::Message::MapMemory); + auto msg = opus_decoder.Receive(ADSP::Direction::Host); + if (msg != ADSP::OpusDecoder::Message::MapMemoryOK) { + LOG_ERROR(Service_Audio, "OpusDecoder returned invalid message. Expected {} got {}", + ADSP::OpusDecoder::Message::MapMemoryOK, msg); + R_THROW(ResultInvalidOpusDSPReturnCode); + } + R_SUCCEED(); +} + +Result HardwareOpus::UnmapMemory(void* buffer, u64 buffer_size) { + std::scoped_lock l{mutex}; + shared_memory.host_send_data[0] = (u64)buffer; + shared_memory.host_send_data[1] = buffer_size; + + opus_decoder.Send(ADSP::Direction::DSP, ADSP::OpusDecoder::Message::UnmapMemory); + auto msg = opus_decoder.Receive(ADSP::Direction::Host); + if (msg != ADSP::OpusDecoder::Message::UnmapMemoryOK) { + LOG_ERROR(Service_Audio, "OpusDecoder returned invalid message. Expected {} got {}", + ADSP::OpusDecoder::Message::UnmapMemoryOK, msg); + R_THROW(ResultInvalidOpusDSPReturnCode); + } + R_SUCCEED(); +} + +} // namespace AudioCore::OpusDecoder diff --git a/src/audio_core/opus/hardware_opus.h b/src/audio_core/opus/hardware_opus.h index 7013a6b404..b10184baa7 100644 --- a/src/audio_core/opus/hardware_opus.h +++ b/src/audio_core/opus/hardware_opus.h @@ -1,45 +1,45 @@ -// SPDX-FileCopyrightText: Copyright 2023 yuzu Emulator Project -// SPDX-License-Identifier: GPL-2.0-or-later - -#pragma once - -#include -#include - -#include "audio_core/adsp/apps/opus/opus_decoder.h" -#include "audio_core/adsp/apps/opus/shared_memory.h" -#include "audio_core/adsp/mailbox.h" -#include "core/hle/service/audio/errors.h" - -namespace AudioCore::OpusDecoder { -class HardwareOpus { -public: - HardwareOpus(Core::System& system); - - u64 GetWorkBufferSize(u32 channel); - u64 GetWorkBufferSizeForMultiStream(u32 total_stream_count, u32 stereo_stream_count); - - Result InitializeDecodeObject(u32 sample_rate, u32 channel_count, void* buffer, - u64 buffer_size); - Result InitializeMultiStreamDecodeObject(u32 sample_rate, u32 channel_count, - u32 totaL_stream_count, u32 stereo_stream_count, - void* mappings, void* buffer, u64 buffer_size); - Result ShutdownDecodeObject(void* buffer, u64 buffer_size); - Result ShutdownMultiStreamDecodeObject(void* buffer, u64 buffer_size); - Result DecodeInterleaved(u32& out_sample_count, void* output_data, u64 output_data_size, - u32 channel_count, void* input_data, u64 input_data_size, void* buffer, - u64& out_time_taken, bool reset); - Result DecodeInterleavedForMultiStream(u32& out_sample_count, void* output_data, - u64 output_data_size, u32 channel_count, - void* input_data, u64 input_data_size, void* buffer, - u64& out_time_taken, bool reset); - Result MapMemory(void* buffer, u64 buffer_size); - Result UnmapMemory(void* buffer, u64 buffer_size); - -private: - Core::System& system; - std::mutex mutex; - ADSP::OpusDecoder::OpusDecoder& opus_decoder; - ADSP::OpusDecoder::SharedMemory shared_memory; -}; -} // namespace AudioCore::OpusDecoder +// SPDX-FileCopyrightText: Copyright 2023 yuzu Emulator Project +// SPDX-License-Identifier: GPL-2.0-or-later + +#pragma once + +#include +#include + +#include "audio_core/adsp/apps/opus/opus_decoder.h" +#include "audio_core/adsp/apps/opus/shared_memory.h" +#include "audio_core/adsp/mailbox.h" +#include "core/hle/service/audio/errors.h" + +namespace AudioCore::OpusDecoder { +class HardwareOpus { +public: + HardwareOpus(Core::System& system); + + u64 GetWorkBufferSize(u32 channel); + u64 GetWorkBufferSizeForMultiStream(u32 total_stream_count, u32 stereo_stream_count); + + Result InitializeDecodeObject(u32 sample_rate, u32 channel_count, void* buffer, + u64 buffer_size); + Result InitializeMultiStreamDecodeObject(u32 sample_rate, u32 channel_count, + u32 totaL_stream_count, u32 stereo_stream_count, + void* mappings, void* buffer, u64 buffer_size); + Result ShutdownDecodeObject(void* buffer, u64 buffer_size); + Result ShutdownMultiStreamDecodeObject(void* buffer, u64 buffer_size); + Result DecodeInterleaved(u32& out_sample_count, void* output_data, u64 output_data_size, + u32 channel_count, void* input_data, u64 input_data_size, void* buffer, + u64& out_time_taken, bool reset); + Result DecodeInterleavedForMultiStream(u32& out_sample_count, void* output_data, + u64 output_data_size, u32 channel_count, + void* input_data, u64 input_data_size, void* buffer, + u64& out_time_taken, bool reset); + Result MapMemory(void* buffer, u64 buffer_size); + Result UnmapMemory(void* buffer, u64 buffer_size); + +private: + Core::System& system; + std::mutex mutex; + ADSP::OpusDecoder::OpusDecoder& opus_decoder; + ADSP::OpusDecoder::SharedMemory shared_memory; +}; +} // namespace AudioCore::OpusDecoder diff --git a/src/yuzu/configuration/config.h b/src/yuzu/configuration/config.h index 74ec4f771e..1589ba0577 100644 --- a/src/yuzu/configuration/config.h +++ b/src/yuzu/configuration/config.h @@ -1,4 +1,4 @@ -// SPDX-FileCopyrightText: 2014 Citra Emulator Project +// SPDX-FileCopyrightText: 2014 Citra Emulator Project // SPDX-License-Identifier: GPL-2.0-or-later #pragma once diff --git a/src/yuzu/configuration/configure_camera.h b/src/yuzu/configuration/configure_camera.h index 9a90512b3e..3d822da7bb 100644 --- a/src/yuzu/configuration/configure_camera.h +++ b/src/yuzu/configuration/configure_camera.h @@ -1,4 +1,4 @@ -// Text : Copyright 2022 yuzu Emulator Project +// Text : Copyright 2022 yuzu Emulator Project // SPDX-License-Identifier: GPL-3.0-or-later #pragma once diff --git a/src/yuzu/configuration/configure_input.h b/src/yuzu/configuration/configure_input.h index 136cd3a0a3..beb503dae0 100644 --- a/src/yuzu/configuration/configure_input.h +++ b/src/yuzu/configuration/configure_input.h @@ -1,4 +1,4 @@ -// SPDX-FileCopyrightText: 2016 Citra Emulator Project +// SPDX-FileCopyrightText: 2016 Citra Emulator Project // SPDX-License-Identifier: GPL-2.0-or-later #pragma once diff --git a/src/yuzu/configuration/configure_input_player.h b/src/yuzu/configuration/configure_input_player.h index d3255d2b44..fda09e9257 100644 --- a/src/yuzu/configuration/configure_input_player.h +++ b/src/yuzu/configuration/configure_input_player.h @@ -1,4 +1,4 @@ -// SPDX-FileCopyrightText: 2016 Citra Emulator Project +// SPDX-FileCopyrightText: 2016 Citra Emulator Project // SPDX-License-Identifier: GPL-2.0-or-later #pragma once diff --git a/src/yuzu/configuration/configure_per_game.h b/src/yuzu/configuration/configure_per_game.h index 1a727f32c0..cc2513001d 100644 --- a/src/yuzu/configuration/configure_per_game.h +++ b/src/yuzu/configuration/configure_per_game.h @@ -1,4 +1,4 @@ -// SPDX-FileCopyrightText: Copyright 2020 yuzu Emulator Project +// SPDX-FileCopyrightText: Copyright 2020 yuzu Emulator Project // SPDX-License-Identifier: GPL-2.0-or-later #pragma once diff --git a/src/yuzu/configuration/configure_ringcon.h b/src/yuzu/configuration/configure_ringcon.h index b23c279061..6fd95e2b8d 100644 --- a/src/yuzu/configuration/configure_ringcon.h +++ b/src/yuzu/configuration/configure_ringcon.h @@ -1,4 +1,4 @@ -// SPDX-FileCopyrightText: Copyright 2022 yuzu Emulator Project +// SPDX-FileCopyrightText: Copyright 2022 yuzu Emulator Project // SPDX-License-Identifier: GPL-2.0-or-later #pragma once diff --git a/src/yuzu/configuration/configure_tas.h b/src/yuzu/configuration/configure_tas.h index 4a6b0ba4ef..a918919064 100644 --- a/src/yuzu/configuration/configure_tas.h +++ b/src/yuzu/configuration/configure_tas.h @@ -1,4 +1,4 @@ -// SPDX-FileCopyrightText: Copyright 2021 yuzu Emulator Project +// SPDX-FileCopyrightText: Copyright 2021 yuzu Emulator Project // SPDX-License-Identifier: GPL-2.0-or-later #pragma once diff --git a/src/yuzu/configuration/configure_touchscreen_advanced.h b/src/yuzu/configuration/configure_touchscreen_advanced.h index 034dc0d465..b6fdffdc83 100644 --- a/src/yuzu/configuration/configure_touchscreen_advanced.h +++ b/src/yuzu/configuration/configure_touchscreen_advanced.h @@ -1,4 +1,4 @@ -// SPDX-FileCopyrightText: 2016 Citra Emulator Project +// SPDX-FileCopyrightText: 2016 Citra Emulator Project // SPDX-License-Identifier: GPL-2.0-or-later #pragma once From 78b9956a04be1b84788cecfa9e160900f3435360 Mon Sep 17 00:00:00 2001 From: Kelebek1 Date: Sat, 4 Nov 2023 18:26:49 +0000 Subject: [PATCH 057/154] Skip git blame --- .git-blame-ignore-revs | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .git-blame-ignore-revs diff --git a/.git-blame-ignore-revs b/.git-blame-ignore-revs new file mode 100644 index 0000000000..109f2f45e7 --- /dev/null +++ b/.git-blame-ignore-revs @@ -0,0 +1,5 @@ +# SPDX-FileCopyrightText: 2023 yuzu Emulator Project +# SPDX-License-Identifier: GPL-2.0-or-later + +# CRLF -> LF +90aa937593e53a5d5e070fb623b228578b0b225f From f07484bc64e6c6f178f4891f1c86ebb23d14dbe7 Mon Sep 17 00:00:00 2001 From: Narr the Reg Date: Sat, 4 Nov 2023 14:05:05 -0600 Subject: [PATCH 058/154] core: hid: Signal color updates --- src/core/hid/emulated_controller.cpp | 37 +++++++++++++------ src/core/hid/emulated_controller.h | 3 ++ src/yuzu/configuration/configure_input.cpp | 2 +- .../configure_input_advanced.cpp | 8 +++- .../configuration/configure_input_advanced.h | 8 +++- 5 files changed, 42 insertions(+), 16 deletions(-) diff --git a/src/core/hid/emulated_controller.cpp b/src/core/hid/emulated_controller.cpp index 8e2894449c..b08a714468 100644 --- a/src/core/hid/emulated_controller.cpp +++ b/src/core/hid/emulated_controller.cpp @@ -96,18 +96,7 @@ void EmulatedController::ReloadFromSettings() { } controller.color_values = {}; - controller.colors_state.fullkey = { - .body = GetNpadColor(player.body_color_left), - .button = GetNpadColor(player.button_color_left), - }; - controller.colors_state.left = { - .body = GetNpadColor(player.body_color_left), - .button = GetNpadColor(player.button_color_left), - }; - controller.colors_state.right = { - .body = GetNpadColor(player.body_color_right), - .button = GetNpadColor(player.button_color_right), - }; + ReloadColorsFromSettings(); ring_params[0] = Common::ParamPackage(Settings::values.ringcon_analogs); @@ -128,6 +117,30 @@ void EmulatedController::ReloadFromSettings() { ReloadInput(); } +void EmulatedController::ReloadColorsFromSettings() { + const auto player_index = NpadIdTypeToIndex(npad_id_type); + const auto& player = Settings::values.players.GetValue()[player_index]; + + // Avoid updating colors if overridden by physical controller + if (controller.color_values[LeftIndex].body != 0 && + controller.color_values[RightIndex].body != 0) { + return; + } + + controller.colors_state.fullkey = { + .body = GetNpadColor(player.body_color_left), + .button = GetNpadColor(player.button_color_left), + }; + controller.colors_state.left = { + .body = GetNpadColor(player.body_color_left), + .button = GetNpadColor(player.button_color_left), + }; + controller.colors_state.right = { + .body = GetNpadColor(player.body_color_right), + .button = GetNpadColor(player.button_color_right), + }; +} + void EmulatedController::LoadDevices() { // TODO(german77): Use more buttons to detect the correct device const auto left_joycon = button_params[Settings::NativeButton::DRight]; diff --git a/src/core/hid/emulated_controller.h b/src/core/hid/emulated_controller.h index d4500583ef..ea18c23432 100644 --- a/src/core/hid/emulated_controller.h +++ b/src/core/hid/emulated_controller.h @@ -253,6 +253,9 @@ public: /// Overrides current mapped devices with the stored configuration and reloads all input devices void ReloadFromSettings(); + /// Updates current colors with the ones stored in the configuration + void ReloadColorsFromSettings(); + /// Saves the current mapped configuration void SaveCurrentConfig(); diff --git a/src/yuzu/configuration/configure_input.cpp b/src/yuzu/configuration/configure_input.cpp index 3dcad27010..02e23cce67 100644 --- a/src/yuzu/configuration/configure_input.cpp +++ b/src/yuzu/configuration/configure_input.cpp @@ -152,7 +152,7 @@ void ConfigureInput::Initialize(InputCommon::InputSubsystem* input_subsystem, connect(player_controllers[0], &ConfigureInputPlayer::HandheldStateChanged, [this](bool is_handheld) { UpdateDockedState(is_handheld); }); - advanced = new ConfigureInputAdvanced(this); + advanced = new ConfigureInputAdvanced(hid_core, this); ui->tabAdvanced->setLayout(new QHBoxLayout(ui->tabAdvanced)); ui->tabAdvanced->layout()->addWidget(advanced); diff --git a/src/yuzu/configuration/configure_input_advanced.cpp b/src/yuzu/configuration/configure_input_advanced.cpp index 3cfd5d4394..441cea3f6a 100644 --- a/src/yuzu/configuration/configure_input_advanced.cpp +++ b/src/yuzu/configuration/configure_input_advanced.cpp @@ -4,11 +4,13 @@ #include #include "common/settings.h" #include "core/core.h" +#include "core/hid/emulated_controller.h" +#include "core/hid/hid_core.h" #include "ui_configure_input_advanced.h" #include "yuzu/configuration/configure_input_advanced.h" -ConfigureInputAdvanced::ConfigureInputAdvanced(QWidget* parent) - : QWidget(parent), ui(std::make_unique()) { +ConfigureInputAdvanced::ConfigureInputAdvanced(Core::HID::HIDCore& hid_core_, QWidget* parent) + : QWidget(parent), ui(std::make_unique()), hid_core{hid_core_} { ui->setupUi(this); controllers_color_buttons = {{ @@ -123,6 +125,8 @@ void ConfigureInputAdvanced::ApplyConfiguration() { player.button_color_left = colors[1]; player.body_color_right = colors[2]; player.button_color_right = colors[3]; + + hid_core.GetEmulatedControllerByIndex(player_idx)->ReloadColorsFromSettings(); } Settings::values.debug_pad_enabled = ui->debug_enabled->isChecked(); diff --git a/src/yuzu/configuration/configure_input_advanced.h b/src/yuzu/configuration/configure_input_advanced.h index fc12302844..41f822c4a2 100644 --- a/src/yuzu/configuration/configure_input_advanced.h +++ b/src/yuzu/configuration/configure_input_advanced.h @@ -14,11 +14,15 @@ namespace Ui { class ConfigureInputAdvanced; } +namespace Core::HID { +class HIDCore; +} // namespace Core::HID + class ConfigureInputAdvanced : public QWidget { Q_OBJECT public: - explicit ConfigureInputAdvanced(QWidget* parent = nullptr); + explicit ConfigureInputAdvanced(Core::HID::HIDCore& hid_core_, QWidget* parent = nullptr); ~ConfigureInputAdvanced() override; void ApplyConfiguration(); @@ -44,4 +48,6 @@ private: std::array, 8> controllers_colors; std::array, 8> controllers_color_buttons; + + Core::HID::HIDCore& hid_core; }; From 4b8b223db2ed0f79ce81083128fe8085786877cc Mon Sep 17 00:00:00 2001 From: Franco M Date: Sun, 5 Nov 2023 00:39:43 +0000 Subject: [PATCH 059/154] modified: src/yuzu/main.cpp --- src/yuzu/main.cpp | 73 +++++------------------------------------------ 1 file changed, 7 insertions(+), 66 deletions(-) diff --git a/src/yuzu/main.cpp b/src/yuzu/main.cpp index c8efd19178..6b6feb1e6c 100644 --- a/src/yuzu/main.cpp +++ b/src/yuzu/main.cpp @@ -8,6 +8,7 @@ #include #include #include +#include #include "core/loader/nca.h" #include "core/tools/renderdoc.h" #ifdef __APPLE__ @@ -2856,6 +2857,7 @@ bool GMainWindow::CreateShortcutLink(const std::filesystem::path& shortcut_path, LOG_ERROR(Frontend, "Failed to create shortcut"); return false; } + // TODO: Migrate fmt::print to std::print in futures STD C++ 23. fmt::print(shortcut_stream, "[Desktop Entry]\n"); fmt::print(shortcut_stream, "Type=Application\n"); fmt::print(shortcut_stream, "Version=1.0\n"); @@ -2983,7 +2985,6 @@ bool GMainWindow::MakeShortcutIcoPath(const u64 program_id, const std::string_vi #elif defined(__linux__) || defined(__FreeBSD__) out_icon_path = Common::FS::GetDataDirectory("XDG_DATA_HOME") / "icons/hicolor/256x256"; #endif - // Create icons directory if it doesn't exist if (!Common::FS::CreateDirs(out_icon_path)) { QMessageBox::critical( @@ -2996,8 +2997,8 @@ bool GMainWindow::MakeShortcutIcoPath(const u64 program_id, const std::string_vi } // Create icon file path - out_icon_path /= (program_id == 0 ? fmt::format("yuzu-{}.{}", game_file_name, ico_extension) - : fmt::format("yuzu-{:016X}.{}", program_id, ico_extension)); + out_icon_path /= (program_id == 0 ? std::format("yuzu-{}.{}", game_file_name, ico_extension) + : std::format("yuzu-{:016X}.{}", program_id, ico_extension)); return true; } @@ -3030,7 +3031,7 @@ void GMainWindow::OnGameListCreateShortcut(u64 program_id, const std::string& ga const auto control = pm.GetControlMetadata(); const auto loader = Loader::GetLoader(*system, vfs->OpenFile(game_path, FileSys::Mode::Read)); - game_title = fmt::format("{:016X}", program_id); + game_title = std::format("{:016X}", program_id); if (control.first != nullptr) { game_title = control.first->GetApplicationName(); } else { @@ -3079,12 +3080,12 @@ void GMainWindow::OnGameListCreateShortcut(u64 program_id, const std::string& ga } #endif // __linux__ // Create shortcut - std::string arguments = fmt::format("-g \"{:s}\"", game_path); + std::string arguments = std::format("-g \"{:s}\"", game_path); if (GMainWindow::CreateShortcutMessagesGUI( this, GMainWindow::CREATE_SHORTCUT_MSGBOX_FULLSCREEN_YES, qt_game_title)) { arguments = "-f " + arguments; } - const std::string comment = fmt::format("Start {:s} with the yuzu Emulator", game_title); + const std::string comment = std::format("Start {:s} with the yuzu Emulator", game_title); const std::string categories = "Game;Emulator;Qt;"; const std::string keywords = "Switch;Nintendo;"; @@ -4090,66 +4091,6 @@ void GMainWindow::OpenPerGameConfiguration(u64 title_id, const std::string& file } } -bool GMainWindow::CreateShortcut(const std::string& shortcut_path, const std::string& title, - const std::string& comment, const std::string& icon_path, - const std::string& command, const std::string& arguments, - const std::string& categories, const std::string& keywords) { -#if defined(__linux__) || defined(__FreeBSD__) || defined(__APPLE__) - // This desktop file template was writing referencing - // https://specifications.freedesktop.org/desktop-entry-spec/desktop-entry-spec-1.0.html - std::string shortcut_contents{}; - shortcut_contents.append("[Desktop Entry]\n"); - shortcut_contents.append("Type=Application\n"); - shortcut_contents.append("Version=1.0\n"); - shortcut_contents.append(fmt::format("Name={:s}\n", title)); - shortcut_contents.append(fmt::format("Comment={:s}\n", comment)); - shortcut_contents.append(fmt::format("Icon={:s}\n", icon_path)); - shortcut_contents.append(fmt::format("TryExec={:s}\n", command)); - shortcut_contents.append(fmt::format("Exec={:s} {:s}\n", command, arguments)); - shortcut_contents.append(fmt::format("Categories={:s}\n", categories)); - shortcut_contents.append(fmt::format("Keywords={:s}\n", keywords)); - - std::ofstream shortcut_stream(shortcut_path); - if (!shortcut_stream.is_open()) { - LOG_WARNING(Common, "Failed to create file {:s}", shortcut_path); - return false; - } - shortcut_stream << shortcut_contents; - shortcut_stream.close(); - - return true; -#elif defined(WIN32) - IShellLinkW* shell_link; - auto hres = CoCreateInstance(CLSID_ShellLink, NULL, CLSCTX_INPROC_SERVER, IID_IShellLinkW, - (void**)&shell_link); - if (FAILED(hres)) { - return false; - } - shell_link->SetPath( - Common::UTF8ToUTF16W(command).data()); // Path to the object we are referring to - shell_link->SetArguments(Common::UTF8ToUTF16W(arguments).data()); - shell_link->SetDescription(Common::UTF8ToUTF16W(comment).data()); - shell_link->SetIconLocation(Common::UTF8ToUTF16W(icon_path).data(), 0); - - IPersistFile* persist_file; - hres = shell_link->QueryInterface(IID_IPersistFile, (void**)&persist_file); - if (FAILED(hres)) { - return false; - } - - hres = persist_file->Save(Common::UTF8ToUTF16W(shortcut_path).data(), TRUE); - if (FAILED(hres)) { - return false; - } - - persist_file->Release(); - shell_link->Release(); - - return true; -#endif - return false; -} - void GMainWindow::OnLoadAmiibo() { if (emu_thread == nullptr || !emu_thread->IsRunning()) { return; From 5323d9f6b3cba683522d90fbd9f28b6e11b9348b Mon Sep 17 00:00:00 2001 From: german77 Date: Sun, 5 Nov 2023 09:00:45 -0600 Subject: [PATCH 060/154] service: acc: Ensure proper profile size --- src/core/hle/service/acc/acc.cpp | 56 ++++++++++++++++--- .../configure_profile_manager.cpp | 6 +- 2 files changed, 50 insertions(+), 12 deletions(-) diff --git a/src/core/hle/service/acc/acc.cpp b/src/core/hle/service/acc/acc.cpp index 1b1c8190e7..f215536446 100644 --- a/src/core/hle/service/acc/acc.cpp +++ b/src/core/hle/service/acc/acc.cpp @@ -3,11 +3,13 @@ #include #include + #include "common/common_types.h" #include "common/fs/file.h" #include "common/fs/path_util.h" #include "common/logging/log.h" #include "common/polyfill_ranges.h" +#include "common/stb.h" #include "common/string_util.h" #include "common/swap.h" #include "core/constants.h" @@ -38,9 +40,36 @@ static std::filesystem::path GetImagePath(const Common::UUID& uuid) { fmt::format("system/save/8000000000000010/su/avators/{}.jpg", uuid.FormattedString()); } -static constexpr u32 SanitizeJPEGSize(std::size_t size) { +static void JPGToMemory(void* context, void* data, int len) { + std::vector* jpg_image = static_cast*>(context); + unsigned char* jpg = static_cast(data); + jpg_image->insert(jpg_image->end(), jpg, jpg + len); +} + +static void SanitizeJPEGImageSize(std::vector& image) { constexpr std::size_t max_jpeg_image_size = 0x20000; - return static_cast(std::min(size, max_jpeg_image_size)); + constexpr int profile_dimensions = 256; + int original_width, original_height, color_channels; + + const auto plain_image = + stbi_load_from_memory(image.data(), static_cast(image.size()), &original_width, + &original_height, &color_channels, STBI_rgb); + + // Resize image to match 256*256 + if (original_width != profile_dimensions || original_height != profile_dimensions) { + // Use vector instead of array to avoid overflowing the stack + std::vector out_image(profile_dimensions * profile_dimensions * STBI_rgb); + stbir_resize_uint8_srgb(plain_image, original_width, original_height, 0, out_image.data(), + profile_dimensions, profile_dimensions, 0, STBI_rgb, 0, + STBIR_FILTER_BOX); + image.clear(); + if (!stbi_write_jpg_to_func(JPGToMemory, &image, profile_dimensions, profile_dimensions, + STBI_rgb, out_image.data(), 0)) { + LOG_ERROR(Service_ACC, "Failed to resize the user provided image."); + } + } + + image.resize(std::min(image.size(), max_jpeg_image_size)); } class IManagerForSystemService final : public ServiceFramework { @@ -339,19 +368,20 @@ protected: LOG_WARNING(Service_ACC, "Failed to load user provided image! Falling back to built-in backup..."); ctx.WriteBuffer(Core::Constants::ACCOUNT_BACKUP_JPEG); - rb.Push(SanitizeJPEGSize(Core::Constants::ACCOUNT_BACKUP_JPEG.size())); + rb.Push(static_cast(Core::Constants::ACCOUNT_BACKUP_JPEG.size())); return; } - const u32 size = SanitizeJPEGSize(image.GetSize()); - std::vector buffer(size); + std::vector buffer(image.GetSize()); if (image.Read(buffer) != buffer.size()) { LOG_ERROR(Service_ACC, "Failed to read all the bytes in the user provided image."); } + SanitizeJPEGImageSize(buffer); + ctx.WriteBuffer(buffer); - rb.Push(size); + rb.Push(static_cast(buffer.size())); } void GetImageSize(HLERequestContext& ctx) { @@ -365,10 +395,18 @@ protected: if (!image.IsOpen()) { LOG_WARNING(Service_ACC, "Failed to load user provided image! Falling back to built-in backup..."); - rb.Push(SanitizeJPEGSize(Core::Constants::ACCOUNT_BACKUP_JPEG.size())); - } else { - rb.Push(SanitizeJPEGSize(image.GetSize())); + rb.Push(static_cast(Core::Constants::ACCOUNT_BACKUP_JPEG.size())); + return; } + + std::vector buffer(image.GetSize()); + + if (image.Read(buffer) != buffer.size()) { + LOG_ERROR(Service_ACC, "Failed to read all the bytes in the user provided image."); + } + + SanitizeJPEGImageSize(buffer); + rb.Push(static_cast(buffer.size())); } void Store(HLERequestContext& ctx) { diff --git a/src/yuzu/configuration/configure_profile_manager.cpp b/src/yuzu/configuration/configure_profile_manager.cpp index a470899889..6d2219bf50 100644 --- a/src/yuzu/configuration/configure_profile_manager.cpp +++ b/src/yuzu/configuration/configure_profile_manager.cpp @@ -306,10 +306,10 @@ void ConfigureProfileManager::SetUserImage() { return; } - // Some games crash when the profile image is too big. Resize any image bigger than 256x256 + // Profile image must be 256x256 QImage image(image_path); - if (image.width() > 256 || image.height() > 256) { - image = image.scaled(256, 256, Qt::KeepAspectRatio); + if (image.width() != 256 || image.height() != 256) { + image = image.scaled(256, 256, Qt::KeepAspectRatioByExpanding, Qt::SmoothTransformation); if (!image.save(image_path)) { QMessageBox::warning(this, tr("Error resizing user image"), tr("Unable to resize image")); From 507f360a81f6938a06643eab0df4dc24f3e89307 Mon Sep 17 00:00:00 2001 From: german77 Date: Fri, 3 Nov 2023 23:43:41 -0600 Subject: [PATCH 061/154] yuzu: Only store games in the recently played list --- src/core/hle/service/am/applets/applets.h | 24 +++++++++++++++++++++++ src/yuzu/main.cpp | 11 +++++++---- 2 files changed, 31 insertions(+), 4 deletions(-) diff --git a/src/core/hle/service/am/applets/applets.h b/src/core/hle/service/am/applets/applets.h index f02bbc4501..a6c322458d 100644 --- a/src/core/hle/service/am/applets/applets.h +++ b/src/core/hle/service/am/applets/applets.h @@ -69,6 +69,30 @@ enum class AppletId : u32 { MyPage = 0x1A, }; +enum class AppletProgramId : u64 { + QLaunch = 0x0100000000001000ull, + Auth = 0x0100000000001001ull, + Cabinet = 0x0100000000001002ull, + Controller = 0x0100000000001003ull, + DataErase = 0x0100000000001004ull, + Error = 0x0100000000001005ull, + NetConnect = 0x0100000000001006ull, + ProfileSelect = 0x0100000000001007ull, + SoftwareKeyboard = 0x0100000000001008ull, + MiiEdit = 0x0100000000001009ull, + Web = 0x010000000000100Aull, + Shop = 0x010000000000100Bull, + OverlayDisplay = 0x01000000000100Cull, + PhotoViewer = 0x01000000000100Dull, + Settings = 0x010000000000100Eull, + OfflineWeb = 0x010000000000100Full, + LoginShare = 0x0100000000001010ull, + WebAuth = 0x0100000000001011ull, + Starter = 0x0100000000001012ull, + MyPage = 0x0100000000001013ull, + MaxProgramId = 0x0100000000001FFFull, +}; + enum class LibraryAppletMode : u32 { AllForeground = 0, Background = 1, diff --git a/src/yuzu/main.cpp b/src/yuzu/main.cpp index db9da6dc8d..d1a53614ce 100644 --- a/src/yuzu/main.cpp +++ b/src/yuzu/main.cpp @@ -1908,7 +1908,10 @@ void GMainWindow::ConfigureFilesystemProvider(const std::string& filepath) { void GMainWindow::BootGame(const QString& filename, u64 program_id, std::size_t program_index, StartGameType type, AmLaunchType launch_type) { LOG_INFO(Frontend, "yuzu starting..."); - StoreRecentFile(filename); // Put the filename on top of the list + + if (program_id > static_cast(Service::AM::Applets::AppletProgramId::MaxProgramId)) { + StoreRecentFile(filename); // Put the filename on top of the list + } // Save configurations UpdateUISettings(); @@ -4272,7 +4275,7 @@ void GMainWindow::OnToggleStatusBar() { } void GMainWindow::OnAlbum() { - constexpr u64 AlbumId = 0x010000000000100Dull; + constexpr u64 AlbumId = static_cast(Service::AM::Applets::AppletProgramId::PhotoViewer); auto bis_system = system->GetFileSystemController().GetSystemNANDContents(); if (!bis_system) { QMessageBox::warning(this, tr("No firmware available"), @@ -4295,7 +4298,7 @@ void GMainWindow::OnAlbum() { } void GMainWindow::OnCabinet(Service::NFP::CabinetMode mode) { - constexpr u64 CabinetId = 0x0100000000001002ull; + constexpr u64 CabinetId = static_cast(Service::AM::Applets::AppletProgramId::Cabinet); auto bis_system = system->GetFileSystemController().GetSystemNANDContents(); if (!bis_system) { QMessageBox::warning(this, tr("No firmware available"), @@ -4319,7 +4322,7 @@ void GMainWindow::OnCabinet(Service::NFP::CabinetMode mode) { } void GMainWindow::OnMiiEdit() { - constexpr u64 MiiEditId = 0x0100000000001009ull; + constexpr u64 MiiEditId = static_cast(Service::AM::Applets::AppletProgramId::MiiEdit); auto bis_system = system->GetFileSystemController().GetSystemNANDContents(); if (!bis_system) { QMessageBox::warning(this, tr("No firmware available"), From a423e0f9e0f7d759f22474e93a18cedeb8ab418c Mon Sep 17 00:00:00 2001 From: liamwhite Date: Sun, 5 Nov 2023 15:47:35 -0500 Subject: [PATCH 062/154] renderer_vulkan: render on bottom of surface clip when flipped (#11894) --- src/video_core/renderer_vulkan/vk_rasterizer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/video_core/renderer_vulkan/vk_rasterizer.cpp b/src/video_core/renderer_vulkan/vk_rasterizer.cpp index 3983b2eb75..c0e8431e4c 100644 --- a/src/video_core/renderer_vulkan/vk_rasterizer.cpp +++ b/src/video_core/renderer_vulkan/vk_rasterizer.cpp @@ -82,7 +82,7 @@ VkViewport GetViewportState(const Device& device, const Maxwell& regs, size_t in } if (y_negate) { - y += height; + y += conv(static_cast(regs.surface_clip.height)); height = -height; } From a5a3167eba175a3d52ceaef125e7cbc753cfe4f1 Mon Sep 17 00:00:00 2001 From: german77 Date: Sun, 5 Nov 2023 17:26:34 -0600 Subject: [PATCH 063/154] service: am: Set the correct album program id --- src/core/hle/service/am/applets/applets.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/core/hle/service/am/applets/applets.h b/src/core/hle/service/am/applets/applets.h index a6c322458d..0bf2598b76 100644 --- a/src/core/hle/service/am/applets/applets.h +++ b/src/core/hle/service/am/applets/applets.h @@ -82,8 +82,8 @@ enum class AppletProgramId : u64 { MiiEdit = 0x0100000000001009ull, Web = 0x010000000000100Aull, Shop = 0x010000000000100Bull, - OverlayDisplay = 0x01000000000100Cull, - PhotoViewer = 0x01000000000100Dull, + OverlayDisplay = 0x010000000000100Cull, + PhotoViewer = 0x010000000000100Dull, Settings = 0x010000000000100Eull, OfflineWeb = 0x010000000000100Full, LoginShare = 0x0100000000001010ull, From 50c604f37fc34ca6aaa874f1d51c9bcdec90f570 Mon Sep 17 00:00:00 2001 From: Charles Lombardo Date: Sat, 4 Nov 2023 00:11:05 -0400 Subject: [PATCH 064/154] android: Color the FPS counter white --- .../main/java/org/yuzu/yuzu_emu/fragments/EmulationFragment.kt | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/android/app/src/main/java/org/yuzu/yuzu_emu/fragments/EmulationFragment.kt b/src/android/app/src/main/java/org/yuzu/yuzu_emu/fragments/EmulationFragment.kt index 77f2cdf65f..3781d1d35c 100644 --- a/src/android/app/src/main/java/org/yuzu/yuzu_emu/fragments/EmulationFragment.kt +++ b/src/android/app/src/main/java/org/yuzu/yuzu_emu/fragments/EmulationFragment.kt @@ -10,7 +10,6 @@ import android.content.DialogInterface import android.content.SharedPreferences import android.content.pm.ActivityInfo import android.content.res.Configuration -import android.graphics.Color import android.net.Uri import android.os.Bundle import android.os.Handler @@ -155,7 +154,6 @@ class EmulationFragment : Fragment(), SurfaceHolder.Callback { } binding.surfaceEmulation.holder.addCallback(this) - binding.showFpsText.setTextColor(Color.YELLOW) binding.doneControlConfig.setOnClickListener { stopConfiguringControls() } binding.drawerLayout.addDrawerListener(object : DrawerListener { From 5191465b0aa7b0cf1edde2c29f0c42a96a09a2ae Mon Sep 17 00:00:00 2001 From: Charles Lombardo Date: Sun, 5 Nov 2023 18:28:50 -0500 Subject: [PATCH 065/154] android: Simplify FPS counter padding --- .../yuzu_emu/fragments/EmulationFragment.kt | 21 ------------------- .../main/res/layout/fragment_emulation.xml | 8 ++++--- 2 files changed, 5 insertions(+), 24 deletions(-) diff --git a/src/android/app/src/main/java/org/yuzu/yuzu_emu/fragments/EmulationFragment.kt b/src/android/app/src/main/java/org/yuzu/yuzu_emu/fragments/EmulationFragment.kt index 3781d1d35c..c32fa0d7e7 100644 --- a/src/android/app/src/main/java/org/yuzu/yuzu_emu/fragments/EmulationFragment.kt +++ b/src/android/app/src/main/java/org/yuzu/yuzu_emu/fragments/EmulationFragment.kt @@ -462,7 +462,6 @@ class EmulationFragment : Fragment(), SurfaceHolder.Callback { if (it.orientation == FoldingFeature.Orientation.HORIZONTAL) { // Restrict emulation and overlays to the top of the screen binding.emulationContainer.layoutParams.height = it.bounds.top - binding.overlayContainer.layoutParams.height = it.bounds.top // Restrict input and menu drawer to the bottom of the screen binding.inputContainer.layoutParams.height = it.bounds.bottom binding.inGameMenu.layoutParams.height = it.bounds.bottom @@ -476,7 +475,6 @@ class EmulationFragment : Fragment(), SurfaceHolder.Callback { if (!isFolding) { binding.emulationContainer.layoutParams.height = ViewGroup.LayoutParams.MATCH_PARENT binding.inputContainer.layoutParams.height = ViewGroup.LayoutParams.MATCH_PARENT - binding.overlayContainer.layoutParams.height = ViewGroup.LayoutParams.MATCH_PARENT binding.inGameMenu.layoutParams.height = ViewGroup.LayoutParams.MATCH_PARENT isInFoldableLayout = false updateOrientation() @@ -484,7 +482,6 @@ class EmulationFragment : Fragment(), SurfaceHolder.Callback { } binding.emulationContainer.requestLayout() binding.inputContainer.requestLayout() - binding.overlayContainer.requestLayout() binding.inGameMenu.requestLayout() } @@ -710,24 +707,6 @@ class EmulationFragment : Fragment(), SurfaceHolder.Callback { } v.setPadding(left, cutInsets.top, right, 0) - - // Ensure FPS text doesn't get cut off by rounded display corners - val sidePadding = resources.getDimensionPixelSize(R.dimen.spacing_xtralarge) - if (cutInsets.left == 0) { - binding.showFpsText.setPadding( - sidePadding, - cutInsets.top, - cutInsets.right, - cutInsets.bottom - ) - } else { - binding.showFpsText.setPadding( - cutInsets.left, - cutInsets.top, - cutInsets.right, - cutInsets.bottom - ) - } windowInsets } } diff --git a/src/android/app/src/main/res/layout/fragment_emulation.xml b/src/android/app/src/main/res/layout/fragment_emulation.xml index 750ce094af..cd6360b45f 100644 --- a/src/android/app/src/main/res/layout/fragment_emulation.xml +++ b/src/android/app/src/main/res/layout/fragment_emulation.xml @@ -134,16 +134,18 @@ + android:layout_height="match_parent" + android:fitsSystemWindows="true"> - From 2f8e237ab7317fb377c3c23a283ed0024b41935b Mon Sep 17 00:00:00 2001 From: Charles Lombardo Date: Sun, 5 Nov 2023 21:09:21 -0500 Subject: [PATCH 066/154] ci: android: Declare secrets during build step --- .github/workflows/android-build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/android-build.yml b/.github/workflows/android-build.yml index 5893f860e7..80aea4aa7c 100644 --- a/.github/workflows/android-build.yml +++ b/.github/workflows/android-build.yml @@ -40,11 +40,11 @@ jobs: sudo apt-get install -y ccache apksigner glslang-dev glslang-tools - name: Build run: ./.ci/scripts/android/build.sh - - name: Copy and sign artifacts env: ANDROID_KEYSTORE_B64: ${{ secrets.ANDROID_KEYSTORE_B64 }} ANDROID_KEY_ALIAS: ${{ secrets.ANDROID_KEY_ALIAS }} ANDROID_KEYSTORE_PASS: ${{ secrets.ANDROID_KEYSTORE_PASS }} + - name: Copy artifacts run: ./.ci/scripts/android/upload.sh - name: Upload uses: actions/upload-artifact@v3 From c95f35ea853fa1fd116e3be29232e12ada1ae1c7 Mon Sep 17 00:00:00 2001 From: Samay Navale <92618552+SamayXD@users.noreply.github.com> Date: Tue, 7 Nov 2023 02:13:15 +0530 Subject: [PATCH 067/154] Update CMakeLists.txt Updated Comments for better readability. --- src/CMakeLists.txt | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index d7f68618c6..5727b6f0a0 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -21,7 +21,7 @@ if (MSVC) # Avoid windows.h from including some usually unused libs like winsocks.h, since this might cause some redefinition errors. add_definitions(-DWIN32_LEAN_AND_MEAN) - # Ensure that projects build with Unicode support. + # Ensure that projects are built with Unicode support. add_definitions(-DUNICODE -D_UNICODE) # /W4 - Level 4 warnings @@ -54,11 +54,11 @@ if (MSVC) /GT # Modules - /experimental:module- # Disable module support explicitly due to conflicts with precompiled headers + /experimental:module- # Explicitly disable module support due to conflicts with precompiled headers. # External headers diagnostics /external:anglebrackets # Treats all headers included by #include
, where the header file is enclosed in angle brackets (< >), as external headers - /external:W0 # Sets the default warning level to 0 for external headers, effectively turning off warnings for external headers + /external:W0 # Sets the default warning level to 0 for external headers, effectively disabling warnings for them. # Warnings /W4 @@ -69,7 +69,7 @@ if (MSVC) /we4265 # 'class': class has virtual functions, but destructor is not virtual /we4388 # 'expression': signed/unsigned mismatch /we4389 # 'operator': signed/unsigned mismatch - /we4456 # Declaration of 'identifier' hides previous local declaration + /we4456 # Declaration of 'identifier' hides a previous local declaration /we4457 # Declaration of 'identifier' hides function parameter /we4458 # Declaration of 'identifier' hides class member /we4459 # Declaration of 'identifier' hides global declaration @@ -84,7 +84,7 @@ if (MSVC) /wd4100 # 'identifier': unreferenced formal parameter /wd4324 # 'struct_name': structure was padded due to __declspec(align()) - /wd4201 # nonstandard extension used : nameless struct/union + /wd4201 # nonstandard extension used: nameless struct/union /wd4702 # unreachable code (when used with LTO) ) From 4c6217f09bbf404072d1e7ebf2205a4f221c4771 Mon Sep 17 00:00:00 2001 From: Samay Navale <92618552+SamayXD@users.noreply.github.com> Date: Tue, 7 Nov 2023 02:20:29 +0530 Subject: [PATCH 068/154] Update CMakeLists.txt --- src/CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 5727b6f0a0..d2ca4904ab 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -69,7 +69,7 @@ if (MSVC) /we4265 # 'class': class has virtual functions, but destructor is not virtual /we4388 # 'expression': signed/unsigned mismatch /we4389 # 'operator': signed/unsigned mismatch - /we4456 # Declaration of 'identifier' hides a previous local declaration + /we4456 # Declaration of 'identifier' hides previous local declaration /we4457 # Declaration of 'identifier' hides function parameter /we4458 # Declaration of 'identifier' hides class member /we4459 # Declaration of 'identifier' hides global declaration @@ -84,7 +84,7 @@ if (MSVC) /wd4100 # 'identifier': unreferenced formal parameter /wd4324 # 'struct_name': structure was padded due to __declspec(align()) - /wd4201 # nonstandard extension used: nameless struct/union + /wd4201 # nonstandard extension used : nameless struct/union /wd4702 # unreachable code (when used with LTO) ) From 8d0d0e1c7a95858dc5eaffe0eb0484815b491d9d Mon Sep 17 00:00:00 2001 From: Franco M Date: Tue, 7 Nov 2023 02:32:19 +0000 Subject: [PATCH 069/154] Fixed clang --- src/yuzu/main.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/yuzu/main.cpp b/src/yuzu/main.cpp index 6b6feb1e6c..2402ea6f58 100644 --- a/src/yuzu/main.cpp +++ b/src/yuzu/main.cpp @@ -4,13 +4,14 @@ #include #include #include +#include #include #include #include #include -#include #include "core/loader/nca.h" #include "core/tools/renderdoc.h" + #ifdef __APPLE__ #include // for chdir #endif @@ -5331,4 +5332,4 @@ int main(int argc, char* argv[]) { int result = app.exec(); detached_tasks.WaitForAllTasks(); return result; -} +} \ No newline at end of file From edce713fc92881bea1f6bb049b06efb2e86d81fa Mon Sep 17 00:00:00 2001 From: Lucas Reis Date: Tue, 7 Nov 2023 22:47:02 -0400 Subject: [PATCH 070/154] Allocate resources for test window before getting system info --- src/yuzu/vk_device_info.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/yuzu/vk_device_info.cpp b/src/yuzu/vk_device_info.cpp index 92f10d3154..ab0d39c256 100644 --- a/src/yuzu/vk_device_info.cpp +++ b/src/yuzu/vk_device_info.cpp @@ -31,6 +31,7 @@ void PopulateRecords(std::vector& records, QWindow* window) try { // Create a test window with a Vulkan surface type for checking present modes. QWindow test_window(window); test_window.setSurfaceType(QWindow::VulkanSurface); + test_window.create(); auto wsi = QtCommon::GetWindowSystemInfo(&test_window); vk::InstanceDispatch dld; From 71cdfa6ad576c721227595cac8170fb9095f23e3 Mon Sep 17 00:00:00 2001 From: lat9nq <22451773+lat9nq@users.noreply.github.com> Date: Wed, 8 Nov 2023 11:25:30 -0500 Subject: [PATCH 071/154] shared_translation: Call tr for each string Qt can't parse tr called within a macro, so we must call it on each string. shared_translation: Remove redundant include --- src/yuzu/configuration/shared_translation.cpp | 517 +++++++++--------- 1 file changed, 268 insertions(+), 249 deletions(-) diff --git a/src/yuzu/configuration/shared_translation.cpp b/src/yuzu/configuration/shared_translation.cpp index 1434b1a561..a7b5def32e 100644 --- a/src/yuzu/configuration/shared_translation.cpp +++ b/src/yuzu/configuration/shared_translation.cpp @@ -1,17 +1,18 @@ // SPDX-FileCopyrightText: Copyright 2023 yuzu Emulator Project // SPDX-License-Identifier: GPL-2.0-or-later -#include "common/time_zone.h" #include "yuzu/configuration/shared_translation.h" #include #include #include #include +#include #include #include "common/settings.h" #include "common/settings_enums.h" #include "common/settings_setting.h" +#include "common/time_zone.h" #include "yuzu/uisettings.h" namespace ConfigurationShared { @@ -21,123 +22,135 @@ std::unique_ptr InitializeTranslations(QWidget* parent) { const auto& tr = [parent](const char* text) -> QString { return parent->tr(text); }; #define INSERT(SETTINGS, ID, NAME, TOOLTIP) \ - translations->insert(std::pair{SETTINGS::values.ID.Id(), std::pair{tr((NAME)), tr((TOOLTIP))}}) + translations->insert(std::pair{SETTINGS::values.ID.Id(), std::pair{(NAME), (TOOLTIP)}}) // A setting can be ignored by giving it a blank name // Audio - INSERT(Settings, sink_id, "Output Engine:", ""); - INSERT(Settings, audio_output_device_id, "Output Device:", ""); - INSERT(Settings, audio_input_device_id, "Input Device:", ""); - INSERT(Settings, audio_muted, "Mute audio", ""); - INSERT(Settings, volume, "Volume:", ""); - INSERT(Settings, dump_audio_commands, "", ""); - INSERT(UISettings, mute_when_in_background, "Mute audio when in background", ""); + INSERT(Settings, sink_id, tr("Output Engine:"), QStringLiteral()); + INSERT(Settings, audio_output_device_id, tr("Output Device:"), QStringLiteral()); + INSERT(Settings, audio_input_device_id, tr("Input Device:"), QStringLiteral()); + INSERT(Settings, audio_muted, tr("Mute audio"), QStringLiteral()); + INSERT(Settings, volume, tr("Volume:"), QStringLiteral()); + INSERT(Settings, dump_audio_commands, QStringLiteral(), QStringLiteral()); + INSERT(UISettings, mute_when_in_background, tr("Mute audio when in background"), + QStringLiteral()); // Core - INSERT(Settings, use_multi_core, "Multicore CPU Emulation", ""); - INSERT(Settings, memory_layout_mode, "Memory Layout", ""); - INSERT(Settings, use_speed_limit, "", ""); - INSERT(Settings, speed_limit, "Limit Speed Percent", ""); + INSERT(Settings, use_multi_core, tr("Multicore CPU Emulation"), QStringLiteral()); + INSERT(Settings, memory_layout_mode, tr("Memory Layout"), QStringLiteral()); + INSERT(Settings, use_speed_limit, QStringLiteral(), QStringLiteral()); + INSERT(Settings, speed_limit, tr("Limit Speed Percent"), QStringLiteral()); // Cpu - INSERT(Settings, cpu_accuracy, "Accuracy:", ""); + INSERT(Settings, cpu_accuracy, tr("Accuracy:"), QStringLiteral()); // Cpu Debug // Cpu Unsafe - INSERT(Settings, cpuopt_unsafe_unfuse_fma, - "Unfuse FMA (improve performance on CPUs without FMA)", - "This option improves speed by reducing accuracy of fused-multiply-add instructions on " - "CPUs without native FMA support."); - INSERT(Settings, cpuopt_unsafe_reduce_fp_error, "Faster FRSQRTE and FRECPE", - "This option improves the speed of some approximate floating-point functions by using " - "less accurate native approximations."); - INSERT(Settings, cpuopt_unsafe_ignore_standard_fpcr, "Faster ASIMD instructions (32 bits only)", - "This option improves the speed of 32 bits ASIMD floating-point functions by running " - "with incorrect rounding modes."); - INSERT(Settings, cpuopt_unsafe_inaccurate_nan, "Inaccurate NaN handling", - "This option improves speed by removing NaN checking. Please note this also reduces " - "accuracy of certain floating-point instructions."); INSERT( - Settings, cpuopt_unsafe_fastmem_check, "Disable address space checks", - "This option improves speed by eliminating a safety check before every memory read/write " - "in guest. Disabling it may allow a game to read/write the emulator's memory."); - INSERT(Settings, cpuopt_unsafe_ignore_global_monitor, "Ignore global monitor", - "This option improves speed by relying only on the semantics of cmpxchg to ensure " + Settings, cpuopt_unsafe_unfuse_fma, + tr("Unfuse FMA (improve performance on CPUs without FMA)"), + tr("This option improves speed by reducing accuracy of fused-multiply-add instructions on " + "CPUs without native FMA support.")); + INSERT( + Settings, cpuopt_unsafe_reduce_fp_error, tr("Faster FRSQRTE and FRECPE"), + tr("This option improves the speed of some approximate floating-point functions by using " + "less accurate native approximations.")); + INSERT(Settings, cpuopt_unsafe_ignore_standard_fpcr, + tr("Faster ASIMD instructions (32 bits only)"), + tr("This option improves the speed of 32 bits ASIMD floating-point functions by running " + "with incorrect rounding modes.")); + INSERT(Settings, cpuopt_unsafe_inaccurate_nan, tr("Inaccurate NaN handling"), + tr("This option improves speed by removing NaN checking. Please note this also reduces " + "accuracy of certain floating-point instructions.")); + INSERT(Settings, cpuopt_unsafe_fastmem_check, tr("Disable address space checks"), + tr("This option improves speed by eliminating a safety check before every memory " + "read/write " + "in guest. Disabling it may allow a game to read/write the emulator's memory.")); + INSERT( + Settings, cpuopt_unsafe_ignore_global_monitor, tr("Ignore global monitor"), + tr("This option improves speed by relying only on the semantics of cmpxchg to ensure " "safety of exclusive access instructions. Please note this may result in deadlocks and " - "other race conditions."); + "other race conditions.")); // Renderer - INSERT(Settings, renderer_backend, "API:", ""); - INSERT(Settings, vulkan_device, "Device:", ""); - INSERT(Settings, shader_backend, "Shader Backend:", ""); - INSERT(Settings, resolution_setup, "Resolution:", ""); - INSERT(Settings, scaling_filter, "Window Adapting Filter:", ""); - INSERT(Settings, fsr_sharpening_slider, "FSR Sharpness:", ""); - INSERT(Settings, anti_aliasing, "Anti-Aliasing Method:", ""); - INSERT(Settings, fullscreen_mode, "Fullscreen Mode:", ""); - INSERT(Settings, aspect_ratio, "Aspect Ratio:", ""); - INSERT(Settings, use_disk_shader_cache, "Use disk pipeline cache", ""); - INSERT(Settings, use_asynchronous_gpu_emulation, "Use asynchronous GPU emulation", ""); - INSERT(Settings, nvdec_emulation, "NVDEC emulation:", ""); - INSERT(Settings, accelerate_astc, "ASTC Decoding Method:", ""); - INSERT(Settings, astc_recompression, "ASTC Recompression Method:", ""); - INSERT(Settings, vsync_mode, "VSync Mode:", - "FIFO (VSync) does not drop frames or exhibit tearing but is limited by the screen " + INSERT(Settings, renderer_backend, tr("API:"), QStringLiteral()); + INSERT(Settings, vulkan_device, tr("Device:"), QStringLiteral()); + INSERT(Settings, shader_backend, tr("Shader Backend:"), QStringLiteral()); + INSERT(Settings, resolution_setup, tr("Resolution:"), QStringLiteral()); + INSERT(Settings, scaling_filter, tr("Window Adapting Filter:"), QStringLiteral()); + INSERT(Settings, fsr_sharpening_slider, tr("FSR Sharpness:"), QStringLiteral()); + INSERT(Settings, anti_aliasing, tr("Anti-Aliasing Method:"), QStringLiteral()); + INSERT(Settings, fullscreen_mode, tr("Fullscreen Mode:"), QStringLiteral()); + INSERT(Settings, aspect_ratio, tr("Aspect Ratio:"), QStringLiteral()); + INSERT(Settings, use_disk_shader_cache, tr("Use disk pipeline cache"), QStringLiteral()); + INSERT(Settings, use_asynchronous_gpu_emulation, tr("Use asynchronous GPU emulation"), + QStringLiteral()); + INSERT(Settings, nvdec_emulation, tr("NVDEC emulation:"), QStringLiteral()); + INSERT(Settings, accelerate_astc, tr("ASTC Decoding Method:"), QStringLiteral()); + INSERT(Settings, astc_recompression, tr("ASTC Recompression Method:"), QStringLiteral()); + INSERT( + Settings, vsync_mode, tr("VSync Mode:"), + tr("FIFO (VSync) does not drop frames or exhibit tearing but is limited by the screen " "refresh rate.\nFIFO Relaxed is similar to FIFO but allows tearing as it recovers from " "a slow down.\nMailbox can have lower latency than FIFO and does not tear but may drop " "frames.\nImmediate (no synchronization) just presents whatever is available and can " - "exhibit tearing."); - INSERT(Settings, bg_red, "", ""); - INSERT(Settings, bg_green, "", ""); - INSERT(Settings, bg_blue, "", ""); + "exhibit tearing.")); + INSERT(Settings, bg_red, QStringLiteral(), QStringLiteral()); + INSERT(Settings, bg_green, QStringLiteral(), QStringLiteral()); + INSERT(Settings, bg_blue, QStringLiteral(), QStringLiteral()); // Renderer (Advanced Graphics) - INSERT(Settings, async_presentation, "Enable asynchronous presentation (Vulkan only)", ""); - INSERT(Settings, renderer_force_max_clock, "Force maximum clocks (Vulkan only)", - "Runs work in the background while waiting for graphics commands to keep the GPU from " - "lowering its clock speed."); - INSERT(Settings, max_anisotropy, "Anisotropic Filtering:", ""); - INSERT(Settings, gpu_accuracy, "Accuracy Level:", ""); - INSERT(Settings, use_asynchronous_shaders, "Use asynchronous shader building (Hack)", - "Enables asynchronous shader compilation, which may reduce shader stutter. This feature " - "is experimental."); - INSERT(Settings, use_fast_gpu_time, "Use Fast GPU Time (Hack)", - "Enables Fast GPU Time. This option will force most games to run at their highest " - "native resolution."); - INSERT(Settings, use_vulkan_driver_pipeline_cache, "Use Vulkan pipeline cache", - "Enables GPU vendor-specific pipeline cache. This option can improve shader loading " - "time significantly in cases where the Vulkan driver does not store pipeline cache " - "files internally."); - INSERT(Settings, enable_compute_pipelines, "Enable Compute Pipelines (Intel Vulkan Only)", - "Enable compute pipelines, required by some games.\nThis setting only exists for Intel " + INSERT(Settings, async_presentation, tr("Enable asynchronous presentation (Vulkan only)"), + QStringLiteral()); + INSERT( + Settings, renderer_force_max_clock, tr("Force maximum clocks (Vulkan only)"), + tr("Runs work in the background while waiting for graphics commands to keep the GPU from " + "lowering its clock speed.")); + INSERT(Settings, max_anisotropy, tr("Anisotropic Filtering:"), QStringLiteral()); + INSERT(Settings, gpu_accuracy, tr("Accuracy Level:"), QStringLiteral()); + INSERT( + Settings, use_asynchronous_shaders, tr("Use asynchronous shader building (Hack)"), + tr("Enables asynchronous shader compilation, which may reduce shader stutter. This feature " + "is experimental.")); + INSERT(Settings, use_fast_gpu_time, tr("Use Fast GPU Time (Hack)"), + tr("Enables Fast GPU Time. This option will force most games to run at their highest " + "native resolution.")); + INSERT(Settings, use_vulkan_driver_pipeline_cache, tr("Use Vulkan pipeline cache"), + tr("Enables GPU vendor-specific pipeline cache. This option can improve shader loading " + "time significantly in cases where the Vulkan driver does not store pipeline cache " + "files internally.")); + INSERT( + Settings, enable_compute_pipelines, tr("Enable Compute Pipelines (Intel Vulkan Only)"), + tr("Enable compute pipelines, required by some games.\nThis setting only exists for Intel " "proprietary drivers, and may crash if enabled.\nCompute pipelines are always enabled " - "on all other drivers."); - INSERT(Settings, use_reactive_flushing, "Enable Reactive Flushing", - "Uses reactive flushing instead of predictive flushing, allowing more accurate memory " - "syncing."); - INSERT(Settings, use_video_framerate, "Sync to framerate of video playback", - "Run the game at normal speed during video playback, even when the framerate is " - "unlocked."); - INSERT(Settings, barrier_feedback_loops, "Barrier feedback loops", - "Improves rendering of transparency effects in specific games."); + "on all other drivers.")); + INSERT( + Settings, use_reactive_flushing, tr("Enable Reactive Flushing"), + tr("Uses reactive flushing instead of predictive flushing, allowing more accurate memory " + "syncing.")); + INSERT(Settings, use_video_framerate, tr("Sync to framerate of video playback"), + tr("Run the game at normal speed during video playback, even when the framerate is " + "unlocked.")); + INSERT(Settings, barrier_feedback_loops, tr("Barrier feedback loops"), + tr("Improves rendering of transparency effects in specific games.")); // Renderer (Debug) // System - INSERT(Settings, rng_seed, "RNG Seed", ""); - INSERT(Settings, rng_seed_enabled, "", ""); - INSERT(Settings, device_name, "Device Name", ""); - INSERT(Settings, custom_rtc, "Custom RTC", ""); - INSERT(Settings, custom_rtc_enabled, "", ""); - INSERT(Settings, language_index, - "Language:", "Note: this can be overridden when region setting is auto-select"); - INSERT(Settings, region_index, "Region:", ""); - INSERT(Settings, time_zone_index, "Time Zone:", ""); - INSERT(Settings, sound_index, "Sound Output Mode:", ""); - INSERT(Settings, use_docked_mode, "Console Mode:", ""); - INSERT(Settings, current_user, "", ""); + INSERT(Settings, rng_seed, tr("RNG Seed"), QStringLiteral()); + INSERT(Settings, rng_seed_enabled, QStringLiteral(), QStringLiteral()); + INSERT(Settings, device_name, tr("Device Name"), QStringLiteral()); + INSERT(Settings, custom_rtc, tr("Custom RTC"), QStringLiteral()); + INSERT(Settings, custom_rtc_enabled, QStringLiteral(), QStringLiteral()); + INSERT(Settings, language_index, tr("Language:"), + tr("Note: this can be overridden when region setting is auto-select")); + INSERT(Settings, region_index, tr("Region:"), QStringLiteral()); + INSERT(Settings, time_zone_index, tr("Time Zone:"), QStringLiteral()); + INSERT(Settings, sound_index, tr("Sound Output Mode:"), QStringLiteral()); + INSERT(Settings, use_docked_mode, tr("Console Mode:"), QStringLiteral()); + INSERT(Settings, current_user, QStringLiteral(), QStringLiteral()); // Controls @@ -154,11 +167,14 @@ std::unique_ptr InitializeTranslations(QWidget* parent) { // Ui // Ui General - INSERT(UISettings, select_user_on_boot, "Prompt for user on game boot", ""); - INSERT(UISettings, pause_when_in_background, "Pause emulation when in background", ""); - INSERT(UISettings, confirm_before_stopping, "Confirm before stopping emulation", ""); - INSERT(UISettings, hide_mouse, "Hide mouse on inactivity", ""); - INSERT(UISettings, controller_applet_disabled, "Disable controller applet", ""); + INSERT(UISettings, select_user_on_boot, tr("Prompt for user on game boot"), QStringLiteral()); + INSERT(UISettings, pause_when_in_background, tr("Pause emulation when in background"), + QStringLiteral()); + INSERT(UISettings, confirm_before_stopping, tr("Confirm before stopping emulation"), + QStringLiteral()); + INSERT(UISettings, hide_mouse, tr("Hide mouse on inactivity"), QStringLiteral()); + INSERT(UISettings, controller_applet_disabled, tr("Disable controller applet"), + QStringLiteral()); // Ui Debugging @@ -178,140 +194,141 @@ std::unique_ptr ComboboxEnumeration(QWidget* parent) { return parent->tr(text, context); }; -#define PAIR(ENUM, VALUE, TRANSLATION) \ - { static_cast(Settings::ENUM::VALUE), tr(TRANSLATION) } -#define CTX_PAIR(ENUM, VALUE, TRANSLATION, CONTEXT) \ - { static_cast(Settings::ENUM::VALUE), tr(TRANSLATION, CONTEXT) } +#define PAIR(ENUM, VALUE, TRANSLATION) {static_cast(Settings::ENUM::VALUE), (TRANSLATION)} // Intentionally skipping VSyncMode to let the UI fill that one out translations->insert({Settings::EnumMetadata::Index(), { - PAIR(AstcDecodeMode, Cpu, "CPU"), - PAIR(AstcDecodeMode, Gpu, "GPU"), - PAIR(AstcDecodeMode, CpuAsynchronous, "CPU Asynchronous"), - }}); - translations->insert({Settings::EnumMetadata::Index(), - { - PAIR(AstcRecompression, Uncompressed, "Uncompressed (Best quality)"), - PAIR(AstcRecompression, Bc1, "BC1 (Low quality)"), - PAIR(AstcRecompression, Bc3, "BC3 (Medium quality)"), + PAIR(AstcDecodeMode, Cpu, tr("CPU")), + PAIR(AstcDecodeMode, Gpu, tr("GPU")), + PAIR(AstcDecodeMode, CpuAsynchronous, tr("CPU Asynchronous")), }}); + translations->insert( + {Settings::EnumMetadata::Index(), + { + PAIR(AstcRecompression, Uncompressed, tr("Uncompressed (Best quality)")), + PAIR(AstcRecompression, Bc1, tr("BC1 (Low quality)")), + PAIR(AstcRecompression, Bc3, tr("BC3 (Medium quality)")), + }}); translations->insert({Settings::EnumMetadata::Index(), { #ifdef HAS_OPENGL - PAIR(RendererBackend, OpenGL, "OpenGL"), + PAIR(RendererBackend, OpenGL, tr("OpenGL")), #endif - PAIR(RendererBackend, Vulkan, "Vulkan"), - PAIR(RendererBackend, Null, "Null"), - }}); - translations->insert({Settings::EnumMetadata::Index(), - { - PAIR(ShaderBackend, Glsl, "GLSL"), - PAIR(ShaderBackend, Glasm, "GLASM (Assembly Shaders, NVIDIA Only)"), - PAIR(ShaderBackend, SpirV, "SPIR-V (Experimental, Mesa Only)"), + PAIR(RendererBackend, Vulkan, tr("Vulkan")), + PAIR(RendererBackend, Null, tr("Null")), }}); + translations->insert( + {Settings::EnumMetadata::Index(), + { + PAIR(ShaderBackend, Glsl, tr("GLSL")), + PAIR(ShaderBackend, Glasm, tr("GLASM (Assembly Shaders, NVIDIA Only)")), + PAIR(ShaderBackend, SpirV, tr("SPIR-V (Experimental, Mesa Only)")), + }}); translations->insert({Settings::EnumMetadata::Index(), { - PAIR(GpuAccuracy, Normal, "Normal"), - PAIR(GpuAccuracy, High, "High"), - PAIR(GpuAccuracy, Extreme, "Extreme"), - }}); - translations->insert({Settings::EnumMetadata::Index(), - { - PAIR(CpuAccuracy, Auto, "Auto"), - PAIR(CpuAccuracy, Accurate, "Accurate"), - PAIR(CpuAccuracy, Unsafe, "Unsafe"), - PAIR(CpuAccuracy, Paranoid, "Paranoid (disables most optimizations)"), + PAIR(GpuAccuracy, Normal, tr("Normal")), + PAIR(GpuAccuracy, High, tr("High")), + PAIR(GpuAccuracy, Extreme, tr("Extreme")), }}); + translations->insert( + {Settings::EnumMetadata::Index(), + { + PAIR(CpuAccuracy, Auto, tr("Auto")), + PAIR(CpuAccuracy, Accurate, tr("Accurate")), + PAIR(CpuAccuracy, Unsafe, tr("Unsafe")), + PAIR(CpuAccuracy, Paranoid, tr("Paranoid (disables most optimizations)")), + }}); translations->insert({Settings::EnumMetadata::Index(), { - PAIR(FullscreenMode, Borderless, "Borderless Windowed"), - PAIR(FullscreenMode, Exclusive, "Exclusive Fullscreen"), + PAIR(FullscreenMode, Borderless, tr("Borderless Windowed")), + PAIR(FullscreenMode, Exclusive, tr("Exclusive Fullscreen")), }}); translations->insert({Settings::EnumMetadata::Index(), { - PAIR(NvdecEmulation, Off, "No Video Output"), - PAIR(NvdecEmulation, Cpu, "CPU Video Decoding"), - PAIR(NvdecEmulation, Gpu, "GPU Video Decoding (Default)"), - }}); - translations->insert({Settings::EnumMetadata::Index(), - { - PAIR(ResolutionSetup, Res1_2X, "0.5X (360p/540p) [EXPERIMENTAL]"), - PAIR(ResolutionSetup, Res3_4X, "0.75X (540p/810p) [EXPERIMENTAL]"), - PAIR(ResolutionSetup, Res1X, "1X (720p/1080p)"), - PAIR(ResolutionSetup, Res3_2X, "1.5X (1080p/1620p) [EXPERIMENTAL]"), - PAIR(ResolutionSetup, Res2X, "2X (1440p/2160p)"), - PAIR(ResolutionSetup, Res3X, "3X (2160p/3240p)"), - PAIR(ResolutionSetup, Res4X, "4X (2880p/4320p)"), - PAIR(ResolutionSetup, Res5X, "5X (3600p/5400p)"), - PAIR(ResolutionSetup, Res6X, "6X (4320p/6480p)"), - PAIR(ResolutionSetup, Res7X, "7X (5040p/7560p)"), - PAIR(ResolutionSetup, Res8X, "8X (5760p/8640p)"), + PAIR(NvdecEmulation, Off, tr("No Video Output")), + PAIR(NvdecEmulation, Cpu, tr("CPU Video Decoding")), + PAIR(NvdecEmulation, Gpu, tr("GPU Video Decoding (Default)")), }}); + translations->insert( + {Settings::EnumMetadata::Index(), + { + PAIR(ResolutionSetup, Res1_2X, tr("0.5X (360p/540p) [EXPERIMENTAL]")), + PAIR(ResolutionSetup, Res3_4X, tr("0.75X (540p/810p) [EXPERIMENTAL]")), + PAIR(ResolutionSetup, Res1X, tr("1X (720p/1080p)")), + PAIR(ResolutionSetup, Res3_2X, tr("1.5X (1080p/1620p) [EXPERIMENTAL]")), + PAIR(ResolutionSetup, Res2X, tr("2X (1440p/2160p)")), + PAIR(ResolutionSetup, Res3X, tr("3X (2160p/3240p)")), + PAIR(ResolutionSetup, Res4X, tr("4X (2880p/4320p)")), + PAIR(ResolutionSetup, Res5X, tr("5X (3600p/5400p)")), + PAIR(ResolutionSetup, Res6X, tr("6X (4320p/6480p)")), + PAIR(ResolutionSetup, Res7X, tr("7X (5040p/7560p)")), + PAIR(ResolutionSetup, Res8X, tr("8X (5760p/8640p)")), + }}); translations->insert({Settings::EnumMetadata::Index(), { - PAIR(ScalingFilter, NearestNeighbor, "Nearest Neighbor"), - PAIR(ScalingFilter, Bilinear, "Bilinear"), - PAIR(ScalingFilter, Bicubic, "Bicubic"), - PAIR(ScalingFilter, Gaussian, "Gaussian"), - PAIR(ScalingFilter, ScaleForce, "ScaleForce"), - PAIR(ScalingFilter, Fsr, "AMD FidelityFX™️ Super Resolution"), + PAIR(ScalingFilter, NearestNeighbor, tr("Nearest Neighbor")), + PAIR(ScalingFilter, Bilinear, tr("Bilinear")), + PAIR(ScalingFilter, Bicubic, tr("Bicubic")), + PAIR(ScalingFilter, Gaussian, tr("Gaussian")), + PAIR(ScalingFilter, ScaleForce, tr("ScaleForce")), + PAIR(ScalingFilter, Fsr, tr("AMD FidelityFX™️ Super Resolution")), }}); translations->insert({Settings::EnumMetadata::Index(), { - PAIR(AntiAliasing, None, "None"), - PAIR(AntiAliasing, Fxaa, "FXAA"), - PAIR(AntiAliasing, Smaa, "SMAA"), + PAIR(AntiAliasing, None, tr("None")), + PAIR(AntiAliasing, Fxaa, tr("FXAA")), + PAIR(AntiAliasing, Smaa, tr("SMAA")), }}); translations->insert({Settings::EnumMetadata::Index(), { - PAIR(AspectRatio, R16_9, "Default (16:9)"), - PAIR(AspectRatio, R4_3, "Force 4:3"), - PAIR(AspectRatio, R21_9, "Force 21:9"), - PAIR(AspectRatio, R16_10, "Force 16:10"), - PAIR(AspectRatio, Stretch, "Stretch to Window"), + PAIR(AspectRatio, R16_9, tr("Default (16:9)")), + PAIR(AspectRatio, R4_3, tr("Force 4:3")), + PAIR(AspectRatio, R21_9, tr("Force 21:9")), + PAIR(AspectRatio, R16_10, tr("Force 16:10")), + PAIR(AspectRatio, Stretch, tr("Stretch to Window")), }}); translations->insert({Settings::EnumMetadata::Index(), { - PAIR(AnisotropyMode, Automatic, "Automatic"), - PAIR(AnisotropyMode, Default, "Default"), - PAIR(AnisotropyMode, X2, "2x"), - PAIR(AnisotropyMode, X4, "4x"), - PAIR(AnisotropyMode, X8, "8x"), - PAIR(AnisotropyMode, X16, "16x"), + PAIR(AnisotropyMode, Automatic, tr("Automatic")), + PAIR(AnisotropyMode, Default, tr("Default")), + PAIR(AnisotropyMode, X2, tr("2x")), + PAIR(AnisotropyMode, X4, tr("4x")), + PAIR(AnisotropyMode, X8, tr("8x")), + PAIR(AnisotropyMode, X16, tr("16x")), }}); translations->insert( {Settings::EnumMetadata::Index(), { - PAIR(Language, Japanese, "Japanese (日本語)"), - PAIR(Language, EnglishAmerican, "American English"), - PAIR(Language, French, "French (français)"), - PAIR(Language, German, "German (Deutsch)"), - PAIR(Language, Italian, "Italian (italiano)"), - PAIR(Language, Spanish, "Spanish (español)"), - PAIR(Language, Chinese, "Chinese"), - PAIR(Language, Korean, "Korean (한국어)"), - PAIR(Language, Dutch, "Dutch (Nederlands)"), - PAIR(Language, Portuguese, "Portuguese (português)"), - PAIR(Language, Russian, "Russian (Русский)"), - PAIR(Language, Taiwanese, "Taiwanese"), - PAIR(Language, EnglishBritish, "British English"), - PAIR(Language, FrenchCanadian, "Canadian French"), - PAIR(Language, SpanishLatin, "Latin American Spanish"), - PAIR(Language, ChineseSimplified, "Simplified Chinese"), - PAIR(Language, ChineseTraditional, "Traditional Chinese (正體中文)"), - PAIR(Language, PortugueseBrazilian, "Brazilian Portuguese (português do Brasil)"), + PAIR(Language, Japanese, tr("Japanese (日本語)")), + PAIR(Language, EnglishAmerican, tr("American English")), + PAIR(Language, French, tr("French (français)")), + PAIR(Language, German, tr("German (Deutsch)")), + PAIR(Language, Italian, tr("Italian (italiano)")), + PAIR(Language, Spanish, tr("Spanish (español)")), + PAIR(Language, Chinese, tr("Chinese")), + PAIR(Language, Korean, tr("Korean (한국어)")), + PAIR(Language, Dutch, tr("Dutch (Nederlands)")), + PAIR(Language, Portuguese, tr("Portuguese (português)")), + PAIR(Language, Russian, tr("Russian (Русский)")), + PAIR(Language, Taiwanese, tr("Taiwanese")), + PAIR(Language, EnglishBritish, tr("British English")), + PAIR(Language, FrenchCanadian, tr("Canadian French")), + PAIR(Language, SpanishLatin, tr("Latin American Spanish")), + PAIR(Language, ChineseSimplified, tr("Simplified Chinese")), + PAIR(Language, ChineseTraditional, tr("Traditional Chinese (正體中文)")), + PAIR(Language, PortugueseBrazilian, tr("Brazilian Portuguese (português do Brasil)")), }}); translations->insert({Settings::EnumMetadata::Index(), { - PAIR(Region, Japan, "Japan"), - PAIR(Region, Usa, "USA"), - PAIR(Region, Europe, "Europe"), - PAIR(Region, Australia, "Australia"), - PAIR(Region, China, "China"), - PAIR(Region, Korea, "Korea"), - PAIR(Region, Taiwan, "Taiwan"), + PAIR(Region, Japan, tr("Japan")), + PAIR(Region, Usa, tr("USA")), + PAIR(Region, Europe, tr("Europe")), + PAIR(Region, Australia, tr("Australia")), + PAIR(Region, China, tr("China")), + PAIR(Region, Korea, tr("Korea")), + PAIR(Region, Taiwan, tr("Taiwan")), }}); translations->insert( {Settings::EnumMetadata::Index(), @@ -323,72 +340,74 @@ std::unique_ptr ComboboxEnumeration(QWidget* parent) { {static_cast(Settings::TimeZone::Default), tr("Default (%1)", "Default time zone") .arg(QString::fromStdString(Common::TimeZone::GetDefaultTimeZone()))}, - PAIR(TimeZone, Cet, "CET"), - PAIR(TimeZone, Cst6Cdt, "CST6CDT"), - PAIR(TimeZone, Cuba, "Cuba"), - PAIR(TimeZone, Eet, "EET"), - PAIR(TimeZone, Egypt, "Egypt"), - PAIR(TimeZone, Eire, "Eire"), - PAIR(TimeZone, Est, "EST"), - PAIR(TimeZone, Est5Edt, "EST5EDT"), - PAIR(TimeZone, Gb, "GB"), - PAIR(TimeZone, GbEire, "GB-Eire"), - PAIR(TimeZone, Gmt, "GMT"), - PAIR(TimeZone, GmtPlusZero, "GMT+0"), - PAIR(TimeZone, GmtMinusZero, "GMT-0"), - PAIR(TimeZone, GmtZero, "GMT0"), - PAIR(TimeZone, Greenwich, "Greenwich"), - PAIR(TimeZone, Hongkong, "Hongkong"), - PAIR(TimeZone, Hst, "HST"), - PAIR(TimeZone, Iceland, "Iceland"), - PAIR(TimeZone, Iran, "Iran"), - PAIR(TimeZone, Israel, "Israel"), - PAIR(TimeZone, Jamaica, "Jamaica"), - PAIR(TimeZone, Japan, "Japan"), - PAIR(TimeZone, Kwajalein, "Kwajalein"), - PAIR(TimeZone, Libya, "Libya"), - PAIR(TimeZone, Met, "MET"), - PAIR(TimeZone, Mst, "MST"), - PAIR(TimeZone, Mst7Mdt, "MST7MDT"), - PAIR(TimeZone, Navajo, "Navajo"), - PAIR(TimeZone, Nz, "NZ"), - PAIR(TimeZone, NzChat, "NZ-CHAT"), - PAIR(TimeZone, Poland, "Poland"), - PAIR(TimeZone, Portugal, "Portugal"), - PAIR(TimeZone, Prc, "PRC"), - PAIR(TimeZone, Pst8Pdt, "PST8PDT"), - PAIR(TimeZone, Roc, "ROC"), - PAIR(TimeZone, Rok, "ROK"), - PAIR(TimeZone, Singapore, "Singapore"), - PAIR(TimeZone, Turkey, "Turkey"), - PAIR(TimeZone, Uct, "UCT"), - PAIR(TimeZone, Universal, "Universal"), - PAIR(TimeZone, Utc, "UTC"), - PAIR(TimeZone, WSu, "W-SU"), - PAIR(TimeZone, Wet, "WET"), - PAIR(TimeZone, Zulu, "Zulu"), + PAIR(TimeZone, Cet, tr("CET")), + PAIR(TimeZone, Cst6Cdt, tr("CST6CDT")), + PAIR(TimeZone, Cuba, tr("Cuba")), + PAIR(TimeZone, Eet, tr("EET")), + PAIR(TimeZone, Egypt, tr("Egypt")), + PAIR(TimeZone, Eire, tr("Eire")), + PAIR(TimeZone, Est, tr("EST")), + PAIR(TimeZone, Est5Edt, tr("EST5EDT")), + PAIR(TimeZone, Gb, tr("GB")), + PAIR(TimeZone, GbEire, tr("GB-Eire")), + PAIR(TimeZone, Gmt, tr("GMT")), + PAIR(TimeZone, GmtPlusZero, tr("GMT+0")), + PAIR(TimeZone, GmtMinusZero, tr("GMT-0")), + PAIR(TimeZone, GmtZero, tr("GMT0")), + PAIR(TimeZone, Greenwich, tr("Greenwich")), + PAIR(TimeZone, Hongkong, tr("Hongkong")), + PAIR(TimeZone, Hst, tr("HST")), + PAIR(TimeZone, Iceland, tr("Iceland")), + PAIR(TimeZone, Iran, tr("Iran")), + PAIR(TimeZone, Israel, tr("Israel")), + PAIR(TimeZone, Jamaica, tr("Jamaica")), + PAIR(TimeZone, Japan, tr("Japan")), + PAIR(TimeZone, Kwajalein, tr("Kwajalein")), + PAIR(TimeZone, Libya, tr("Libya")), + PAIR(TimeZone, Met, tr("MET")), + PAIR(TimeZone, Mst, tr("MST")), + PAIR(TimeZone, Mst7Mdt, tr("MST7MDT")), + PAIR(TimeZone, Navajo, tr("Navajo")), + PAIR(TimeZone, Nz, tr("NZ")), + PAIR(TimeZone, NzChat, tr("NZ-CHAT")), + PAIR(TimeZone, Poland, tr("Poland")), + PAIR(TimeZone, Portugal, tr("Portugal")), + PAIR(TimeZone, Prc, tr("PRC")), + PAIR(TimeZone, Pst8Pdt, tr("PST8PDT")), + PAIR(TimeZone, Roc, tr("ROC")), + PAIR(TimeZone, Rok, tr("ROK")), + PAIR(TimeZone, Singapore, tr("Singapore")), + PAIR(TimeZone, Turkey, tr("Turkey")), + PAIR(TimeZone, Uct, tr("UCT")), + PAIR(TimeZone, Universal, tr("Universal")), + PAIR(TimeZone, Utc, tr("UTC")), + PAIR(TimeZone, WSu, tr("W-SU")), + PAIR(TimeZone, Wet, tr("WET")), + PAIR(TimeZone, Zulu, tr("Zulu")), }}); translations->insert({Settings::EnumMetadata::Index(), { - PAIR(AudioMode, Mono, "Mono"), - PAIR(AudioMode, Stereo, "Stereo"), - PAIR(AudioMode, Surround, "Surround"), + PAIR(AudioMode, Mono, tr("Mono")), + PAIR(AudioMode, Stereo, tr("Stereo")), + PAIR(AudioMode, Surround, tr("Surround")), }}); translations->insert({Settings::EnumMetadata::Index(), { - PAIR(MemoryLayout, Memory_4Gb, "4GB DRAM (Default)"), - PAIR(MemoryLayout, Memory_6Gb, "6GB DRAM (Unsafe)"), - PAIR(MemoryLayout, Memory_8Gb, "8GB DRAM (Unsafe)"), + PAIR(MemoryLayout, Memory_4Gb, tr("4GB DRAM (Default)")), + PAIR(MemoryLayout, Memory_6Gb, tr("6GB DRAM (Unsafe)")), + PAIR(MemoryLayout, Memory_8Gb, tr("8GB DRAM (Unsafe)")), + }}); + translations->insert({Settings::EnumMetadata::Index(), + { + PAIR(ConsoleMode, Docked, tr("Docked")), + PAIR(ConsoleMode, Handheld, tr("Handheld")), }}); - translations->insert( - {Settings::EnumMetadata::Index(), - {PAIR(ConsoleMode, Docked, "Docked"), PAIR(ConsoleMode, Handheld, "Handheld")}}); translations->insert( {Settings::EnumMetadata::Index(), { - PAIR(ConfirmStop, Ask_Always, "Always ask (Default)"), - PAIR(ConfirmStop, Ask_Based_On_Game, "Only if game specifies not to stop"), - PAIR(ConfirmStop, Ask_Never, "Never ask"), + PAIR(ConfirmStop, Ask_Always, tr("Always ask (Default)")), + PAIR(ConfirmStop, Ask_Based_On_Game, tr("Only if game specifies not to stop")), + PAIR(ConfirmStop, Ask_Never, tr("Never ask")), }}); #undef PAIR From cb3559539a33da15859bc5f1ded24bdb41f4bd7f Mon Sep 17 00:00:00 2001 From: lat9nq <22451773+lat9nq@users.noreply.github.com> Date: Wed, 8 Nov 2023 11:27:13 -0500 Subject: [PATCH 072/154] CMakeLists: Add option to call lupdate directly qt_create_translation silently fails to run at all on my system. Since there is no error, I was unable to determine a fix. This sidesteps the convenience function by setting up the rules ourselves. This is left as an option since this path likely does not work on Windows. --- src/yuzu/CMakeLists.txt | 51 +++++++++++++++++++++++++++++++++-------- 1 file changed, 42 insertions(+), 9 deletions(-) diff --git a/src/yuzu/CMakeLists.txt b/src/yuzu/CMakeLists.txt index 33e1fb6639..181b2817c6 100644 --- a/src/yuzu/CMakeLists.txt +++ b/src/yuzu/CMakeLists.txt @@ -252,6 +252,7 @@ file(GLOB_RECURSE THEMES ${PROJECT_SOURCE_DIR}/dist/qt_themes/*) if (ENABLE_QT_TRANSLATION) set(YUZU_QT_LANGUAGES "${PROJECT_SOURCE_DIR}/dist/languages" CACHE PATH "Path to the translation bundle for the Qt frontend") option(GENERATE_QT_TRANSLATION "Generate en.ts as the translation source file" OFF) + option(WORKAROUND_BROKEN_LUPDATE "Run lupdate directly through CMake if Qt's convenience wrappers don't work" OFF) # Update source TS file if enabled if (GENERATE_QT_TRANSLATION) @@ -259,19 +260,51 @@ if (ENABLE_QT_TRANSLATION) # these calls to qt_create_translation also creates a rule to generate en.qm which conflicts with providing english plurals # so we have to set a OUTPUT_LOCATION so that we don't have multiple rules to generate en.qm set_source_files_properties(${YUZU_QT_LANGUAGES}/en.ts PROPERTIES OUTPUT_LOCATION "${CMAKE_CURRENT_BINARY_DIR}/translations") - qt_create_translation(QM_FILES - ${SRCS} - ${UIS} - ${YUZU_QT_LANGUAGES}/en.ts - OPTIONS - -source-language en_US - -target-language en_US - ) + if (WORKAROUND_BROKEN_LUPDATE) + add_custom_command(OUTPUT ${YUZU_QT_LANGUAGES}/en.ts + COMMAND lupdate + -source-language en_US + -target-language en_US + ${SRCS} + ${UIS} + -ts ${YUZU_QT_LANGUAGES}/en.ts + DEPENDS + ${SRCS} + ${UIS} + WORKING_DIRECTORY + ${CMAKE_CURRENT_SOURCE_DIR} + ) + else() + qt_create_translation(QM_FILES + ${SRCS} + ${UIS} + ${YUZU_QT_LANGUAGES}/en.ts + OPTIONS + -source-language en_US + -target-language en_US + ) + endif() # Generate plurals into dist/english_plurals/generated_en.ts so it can be used to revise dist/english_plurals/en.ts set(GENERATED_PLURALS_FILE ${PROJECT_SOURCE_DIR}/dist/english_plurals/generated_en.ts) set_source_files_properties(${GENERATED_PLURALS_FILE} PROPERTIES OUTPUT_LOCATION "${CMAKE_CURRENT_BINARY_DIR}/plurals") - qt_create_translation(QM_FILES ${SRCS} ${UIS} ${GENERATED_PLURALS_FILE} OPTIONS -pluralonly -source-language en_US -target-language en_US) + if (WORKAROUND_BROKEN_LUPDATE) + add_custom_command(OUTPUT ${GENERATED_PLURALS_FILE} + COMMAND lupdate + -source-language en_US + -target-language en_US + ${SRCS} + ${UIS} + -ts ${GENERATED_PLURALS_FILE} + DEPENDS + ${SRCS} + ${UIS} + WORKING_DIRECTORY + ${CMAKE_CURRENT_SOURCE_DIR} + ) + else() + qt_create_translation(QM_FILES ${SRCS} ${UIS} ${GENERATED_PLURALS_FILE} OPTIONS -pluralonly -source-language en_US -target-language en_US) + endif() add_custom_target(translation ALL DEPENDS ${YUZU_QT_LANGUAGES}/en.ts ${GENERATED_PLURALS_FILE}) endif() From c7b31d24b979c36e2a9e59e7ae6876ffbc82a81e Mon Sep 17 00:00:00 2001 From: Franco M Date: Wed, 8 Nov 2023 21:04:30 +0000 Subject: [PATCH 073/154] Final change, i think --- src/yuzu/main.cpp | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/yuzu/main.cpp b/src/yuzu/main.cpp index 2402ea6f58..442408280f 100644 --- a/src/yuzu/main.cpp +++ b/src/yuzu/main.cpp @@ -4,7 +4,6 @@ #include #include #include -#include #include #include #include @@ -2998,8 +2997,8 @@ bool GMainWindow::MakeShortcutIcoPath(const u64 program_id, const std::string_vi } // Create icon file path - out_icon_path /= (program_id == 0 ? std::format("yuzu-{}.{}", game_file_name, ico_extension) - : std::format("yuzu-{:016X}.{}", program_id, ico_extension)); + out_icon_path /= (program_id == 0 ? fmt::format("yuzu-{}.{}", game_file_name, ico_extension) + : fmt::format("yuzu-{:016X}.{}", program_id, ico_extension)); return true; } @@ -3032,7 +3031,7 @@ void GMainWindow::OnGameListCreateShortcut(u64 program_id, const std::string& ga const auto control = pm.GetControlMetadata(); const auto loader = Loader::GetLoader(*system, vfs->OpenFile(game_path, FileSys::Mode::Read)); - game_title = std::format("{:016X}", program_id); + game_title = fmt::format("{:016X}", program_id); if (control.first != nullptr) { game_title = control.first->GetApplicationName(); } else { @@ -3081,12 +3080,12 @@ void GMainWindow::OnGameListCreateShortcut(u64 program_id, const std::string& ga } #endif // __linux__ // Create shortcut - std::string arguments = std::format("-g \"{:s}\"", game_path); + std::string arguments = fmt::format("-g \"{:s}\"", game_path); if (GMainWindow::CreateShortcutMessagesGUI( this, GMainWindow::CREATE_SHORTCUT_MSGBOX_FULLSCREEN_YES, qt_game_title)) { arguments = "-f " + arguments; } - const std::string comment = std::format("Start {:s} with the yuzu Emulator", game_title); + const std::string comment = fmt::format("Start {:s} with the yuzu Emulator", game_title); const std::string categories = "Game;Emulator;Qt;"; const std::string keywords = "Switch;Nintendo;"; From f3053920bf75858b702b13a2d80589a386c397b9 Mon Sep 17 00:00:00 2001 From: Franco M Date: Thu, 9 Nov 2023 03:37:06 +0000 Subject: [PATCH 074/154] Minor changes --- src/yuzu/main.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/yuzu/main.cpp b/src/yuzu/main.cpp index 442408280f..a4ad9d8a80 100644 --- a/src/yuzu/main.cpp +++ b/src/yuzu/main.cpp @@ -2980,7 +2980,7 @@ bool GMainWindow::MakeShortcutIcoPath(const u64 program_id, const std::string_vi // Get path to Yuzu icons directory & icon extension std::string ico_extension = "png"; #if defined(_WIN32) - out_icon_path = Common::FS::GetYuzuPath(Common::FS::YuzuPath::ConfigDir) / "icons"; + out_icon_path = Common::FS::YuzuPath::IconsDir; ico_extension = "ico"; #elif defined(__linux__) || defined(__FreeBSD__) out_icon_path = Common::FS::GetDataDirectory("XDG_DATA_HOME") / "icons/hicolor/256x256"; @@ -5331,4 +5331,4 @@ int main(int argc, char* argv[]) { int result = app.exec(); detached_tasks.WaitForAllTasks(); return result; -} \ No newline at end of file +} From c9038af29e05458bd2f647158cc2903132c4c560 Mon Sep 17 00:00:00 2001 From: Franco M Date: Thu, 9 Nov 2023 04:53:10 +0000 Subject: [PATCH 075/154] Fix out_icon_path = Common::FS::GetYuzuPath(Common::FS::YuzuPath::IconsDir); --- src/yuzu/main.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/yuzu/main.cpp b/src/yuzu/main.cpp index a4ad9d8a80..e0a656a5ed 100644 --- a/src/yuzu/main.cpp +++ b/src/yuzu/main.cpp @@ -2980,7 +2980,7 @@ bool GMainWindow::MakeShortcutIcoPath(const u64 program_id, const std::string_vi // Get path to Yuzu icons directory & icon extension std::string ico_extension = "png"; #if defined(_WIN32) - out_icon_path = Common::FS::YuzuPath::IconsDir; + out_icon_path = Common::FS::GetYuzuPath(Common::FS::YuzuPath::IconsDir); ico_extension = "ico"; #elif defined(__linux__) || defined(__FreeBSD__) out_icon_path = Common::FS::GetDataDirectory("XDG_DATA_HOME") / "icons/hicolor/256x256"; From 09f993899e174d1f3c4577ab713eb8119741093e Mon Sep 17 00:00:00 2001 From: t895 Date: Thu, 9 Nov 2023 22:27:40 -0500 Subject: [PATCH 076/154] android: Hide loading animation on first frame --- src/android/app/src/main/jni/emu_window/emu_window.cpp | 8 ++++++++ src/android/app/src/main/jni/emu_window/emu_window.h | 4 +++- src/android/app/src/main/jni/native.cpp | 2 -- src/android/app/src/main/jni/native.h | 3 ++- 4 files changed, 13 insertions(+), 4 deletions(-) diff --git a/src/android/app/src/main/jni/emu_window/emu_window.cpp b/src/android/app/src/main/jni/emu_window/emu_window.cpp index a7e414b815..c4f631924b 100644 --- a/src/android/app/src/main/jni/emu_window/emu_window.cpp +++ b/src/android/app/src/main/jni/emu_window/emu_window.cpp @@ -9,6 +9,7 @@ #include "input_common/drivers/virtual_gamepad.h" #include "input_common/main.h" #include "jni/emu_window/emu_window.h" +#include "jni/native.h" void EmuWindow_Android::OnSurfaceChanged(ANativeWindow* surface) { m_window_width = ANativeWindow_getWidth(surface); @@ -57,6 +58,13 @@ void EmuWindow_Android::OnRemoveNfcTag() { m_input_subsystem->GetVirtualAmiibo()->CloseAmiibo(); } +void EmuWindow_Android::OnFrameDisplayed() { + if (!m_first_frame) { + EmulationSession::GetInstance().OnEmulationStarted(); + m_first_frame = true; + } +} + EmuWindow_Android::EmuWindow_Android(InputCommon::InputSubsystem* input_subsystem, ANativeWindow* surface, std::shared_ptr driver_library) diff --git a/src/android/app/src/main/jni/emu_window/emu_window.h b/src/android/app/src/main/jni/emu_window/emu_window.h index b38087f738..a34a0e479f 100644 --- a/src/android/app/src/main/jni/emu_window/emu_window.h +++ b/src/android/app/src/main/jni/emu_window/emu_window.h @@ -45,7 +45,7 @@ public: float gyro_z, float accel_x, float accel_y, float accel_z); void OnReadNfcTag(std::span data); void OnRemoveNfcTag(); - void OnFrameDisplayed() override {} + void OnFrameDisplayed() override; std::unique_ptr CreateSharedContext() const override { return {std::make_unique(m_driver_library)}; @@ -61,4 +61,6 @@ private: float m_window_height{}; std::shared_ptr m_driver_library; + + bool m_first_frame = false; }; diff --git a/src/android/app/src/main/jni/native.cpp b/src/android/app/src/main/jni/native.cpp index 1484cc2244..64663b0845 100644 --- a/src/android/app/src/main/jni/native.cpp +++ b/src/android/app/src/main/jni/native.cpp @@ -372,8 +372,6 @@ void EmulationSession::RunEmulation() { m_system.InitializeDebugger(); } - OnEmulationStarted(); - while (true) { { [[maybe_unused]] std::unique_lock lock(m_mutex); diff --git a/src/android/app/src/main/jni/native.h b/src/android/app/src/main/jni/native.h index 6b02c44b55..78ef968021 100644 --- a/src/android/app/src/main/jni/native.h +++ b/src/android/app/src/main/jni/native.h @@ -52,9 +52,10 @@ public: void OnGamepadDisconnectEvent([[maybe_unused]] int index); SoftwareKeyboard::AndroidKeyboard* SoftwareKeyboard(); + static void OnEmulationStarted(); + private: static void LoadDiskCacheProgress(VideoCore::LoadCallbackStage stage, int progress, int max); - static void OnEmulationStarted(); static void OnEmulationStopped(Core::SystemResultStatus result); private: From 1d03a0fa7598cc8bafaf9edc8796eb0137ee7876 Mon Sep 17 00:00:00 2001 From: Fernando Sahmkow Date: Fri, 10 Nov 2023 15:40:48 +0100 Subject: [PATCH 077/154] Revert "renderer_vulkan: add locks to avoid scheduler flushes from CPU" This reverts commit d9dde7e6f3a90f58d642808900ddd558da21f762. --- src/video_core/fence_manager.h | 5 +---- src/video_core/renderer_vulkan/renderer_vulkan.cpp | 14 +++++--------- src/video_core/renderer_vulkan/vk_rasterizer.cpp | 10 ++++------ src/video_core/renderer_vulkan/vk_rasterizer.h | 4 ---- 4 files changed, 10 insertions(+), 23 deletions(-) diff --git a/src/video_core/fence_manager.h b/src/video_core/fence_manager.h index c0e6471fed..805a899008 100644 --- a/src/video_core/fence_manager.h +++ b/src/video_core/fence_manager.h @@ -86,10 +86,7 @@ public: uncommitted_operations.emplace_back(std::move(func)); } pending_operations.emplace_back(std::move(uncommitted_operations)); - { - std::scoped_lock lock{buffer_cache.mutex, texture_cache.mutex}; - QueueFence(new_fence); - } + QueueFence(new_fence); if (!delay_fence) { func(); } diff --git a/src/video_core/renderer_vulkan/renderer_vulkan.cpp b/src/video_core/renderer_vulkan/renderer_vulkan.cpp index 7e7a807402..c4c30d8071 100644 --- a/src/video_core/renderer_vulkan/renderer_vulkan.cpp +++ b/src/video_core/renderer_vulkan/renderer_vulkan.cpp @@ -132,16 +132,12 @@ void RendererVulkan::SwapBuffers(const Tegra::FramebufferConfig* framebuffer) { const bool use_accelerated = rasterizer.AccelerateDisplay(*framebuffer, framebuffer_addr, framebuffer->stride); const bool is_srgb = use_accelerated && screen_info.is_srgb; + RenderScreenshot(*framebuffer, use_accelerated); - { - std::scoped_lock lock{rasterizer.LockCaches()}; - RenderScreenshot(*framebuffer, use_accelerated); - - Frame* frame = present_manager.GetRenderFrame(); - blit_screen.DrawToSwapchain(frame, *framebuffer, use_accelerated, is_srgb); - scheduler.Flush(*frame->render_ready); - present_manager.Present(frame); - } + Frame* frame = present_manager.GetRenderFrame(); + blit_screen.DrawToSwapchain(frame, *framebuffer, use_accelerated, is_srgb); + scheduler.Flush(*frame->render_ready); + present_manager.Present(frame); gpu.RendererFrameEndNotify(); rasterizer.TickFrame(); diff --git a/src/video_core/renderer_vulkan/vk_rasterizer.cpp b/src/video_core/renderer_vulkan/vk_rasterizer.cpp index c0e8431e4c..3bfaabc498 100644 --- a/src/video_core/renderer_vulkan/vk_rasterizer.cpp +++ b/src/video_core/renderer_vulkan/vk_rasterizer.cpp @@ -199,7 +199,7 @@ void RasterizerVulkan::PrepareDraw(bool is_indexed, Func&& draw_func) { if (!pipeline) { return; } - std::scoped_lock lock{LockCaches()}; + std::scoped_lock lock{buffer_cache.mutex, texture_cache.mutex}; // update engine as channel may be different. pipeline->SetEngine(maxwell3d, gpu_memory); pipeline->Configure(is_indexed); @@ -710,7 +710,6 @@ void RasterizerVulkan::TiledCacheBarrier() { } void RasterizerVulkan::FlushCommands() { - std::scoped_lock lock{LockCaches()}; if (draw_counter == 0) { return; } @@ -808,7 +807,6 @@ void RasterizerVulkan::FlushWork() { if ((++draw_counter & 7) != 7) { return; } - std::scoped_lock lock{LockCaches()}; if (draw_counter < DRAWS_TO_DISPATCH) { // Send recorded tasks to the worker thread scheduler.DispatchWork(); @@ -1507,7 +1505,7 @@ void RasterizerVulkan::UpdateVertexInput(Tegra::Engines::Maxwell3D::Regs& regs) void RasterizerVulkan::InitializeChannel(Tegra::Control::ChannelState& channel) { CreateChannel(channel); { - std::scoped_lock lock{LockCaches()}; + std::scoped_lock lock{buffer_cache.mutex, texture_cache.mutex}; texture_cache.CreateChannel(channel); buffer_cache.CreateChannel(channel); } @@ -1520,7 +1518,7 @@ void RasterizerVulkan::BindChannel(Tegra::Control::ChannelState& channel) { const s32 channel_id = channel.bind_id; BindToChannel(channel_id); { - std::scoped_lock lock{LockCaches()}; + std::scoped_lock lock{buffer_cache.mutex, texture_cache.mutex}; texture_cache.BindToChannel(channel_id); buffer_cache.BindToChannel(channel_id); } @@ -1533,7 +1531,7 @@ void RasterizerVulkan::BindChannel(Tegra::Control::ChannelState& channel) { void RasterizerVulkan::ReleaseChannel(s32 channel_id) { EraseChannel(channel_id); { - std::scoped_lock lock{LockCaches()}; + std::scoped_lock lock{buffer_cache.mutex, texture_cache.mutex}; texture_cache.EraseChannel(channel_id); buffer_cache.EraseChannel(channel_id); } diff --git a/src/video_core/renderer_vulkan/vk_rasterizer.h b/src/video_core/renderer_vulkan/vk_rasterizer.h index ce3dfbaab8..ad069556cf 100644 --- a/src/video_core/renderer_vulkan/vk_rasterizer.h +++ b/src/video_core/renderer_vulkan/vk_rasterizer.h @@ -133,10 +133,6 @@ public: void ReleaseChannel(s32 channel_id) override; - std::scoped_lock LockCaches() { - return std::scoped_lock{buffer_cache.mutex, texture_cache.mutex}; - } - private: static constexpr size_t MAX_TEXTURES = 192; static constexpr size_t MAX_IMAGES = 48; From 9169cbf72835bf12434c9f9f1fea11f03d40437f Mon Sep 17 00:00:00 2001 From: Narr the Reg Date: Thu, 9 Nov 2023 20:11:13 -0600 Subject: [PATCH 078/154] yuzu: Save mute when in background setting --- src/common/settings.cpp | 2 ++ src/common/settings_common.h | 1 + src/yuzu/configuration/config.cpp | 2 ++ src/yuzu/configuration/configure_audio.cpp | 10 +++++++--- src/yuzu/uisettings.h | 10 +++++++--- 5 files changed, 19 insertions(+), 6 deletions(-) diff --git a/src/common/settings.cpp b/src/common/settings.cpp index 98b43e49c8..51717be06f 100644 --- a/src/common/settings.cpp +++ b/src/common/settings.cpp @@ -203,6 +203,8 @@ const char* TranslateCategory(Category category) { case Category::Ui: case Category::UiGeneral: return "UI"; + case Category::UiAudio: + return "UiAudio"; case Category::UiLayout: return "UiLayout"; case Category::UiGameList: diff --git a/src/common/settings_common.h b/src/common/settings_common.h index 1800ab10dd..7943223eba 100644 --- a/src/common/settings_common.h +++ b/src/common/settings_common.h @@ -32,6 +32,7 @@ enum class Category : u32 { AddOns, Controls, Ui, + UiAudio, UiGeneral, UiLayout, UiGameList, diff --git a/src/yuzu/configuration/config.cpp b/src/yuzu/configuration/config.cpp index baa3e55f3d..42bbb29641 100644 --- a/src/yuzu/configuration/config.cpp +++ b/src/yuzu/configuration/config.cpp @@ -360,6 +360,7 @@ void Config::ReadAudioValues() { qt_config->beginGroup(QStringLiteral("Audio")); ReadCategory(Settings::Category::Audio); + ReadCategory(Settings::Category::UiAudio); qt_config->endGroup(); } @@ -900,6 +901,7 @@ void Config::SaveAudioValues() { qt_config->beginGroup(QStringLiteral("Audio")); WriteCategory(Settings::Category::Audio); + WriteCategory(Settings::Category::UiAudio); qt_config->endGroup(); } diff --git a/src/yuzu/configuration/configure_audio.cpp b/src/yuzu/configuration/configure_audio.cpp index 81dd51ad36..9b6ef47a75 100644 --- a/src/yuzu/configuration/configure_audio.cpp +++ b/src/yuzu/configuration/configure_audio.cpp @@ -38,17 +38,21 @@ void ConfigureAudio::Setup(const ConfigurationShared::Builder& builder) { std::map hold; - auto push = [&](Settings::Category category) { + auto push_settings = [&](Settings::Category category) { for (auto* setting : Settings::values.linkage.by_category[category]) { settings.push_back(setting); } + }; + + auto push_ui_settings = [&](Settings::Category category) { for (auto* setting : UISettings::values.linkage.by_category[category]) { settings.push_back(setting); } }; - push(Settings::Category::Audio); - push(Settings::Category::SystemAudio); + push_settings(Settings::Category::Audio); + push_settings(Settings::Category::SystemAudio); + push_ui_settings(Settings::Category::UiAudio); for (auto* setting : settings) { auto* widget = builder.BuildWidget(setting, apply_funcs); diff --git a/src/yuzu/uisettings.h b/src/yuzu/uisettings.h index 77d992c542..3485a6347b 100644 --- a/src/yuzu/uisettings.h +++ b/src/yuzu/uisettings.h @@ -109,9 +109,13 @@ struct Values { Settings::Specialization::Default, true, true}; - Setting mute_when_in_background{ - linkage, false, "muteWhenInBackground", Category::Audio, Settings::Specialization::Default, - true, true}; + Setting mute_when_in_background{linkage, + false, + "muteWhenInBackground", + Category::UiAudio, + Settings::Specialization::Default, + true, + true}; Setting hide_mouse{ linkage, true, "hideInactiveMouse", Category::UiGeneral, Settings::Specialization::Default, true, true}; From 9e331f9957bbc7aec82cd8f96c67373e115bcd68 Mon Sep 17 00:00:00 2001 From: Narr the Reg Date: Thu, 9 Nov 2023 20:30:00 -0600 Subject: [PATCH 079/154] yuzu: Make mute audio persistent --- src/common/settings.h | 2 +- src/yuzu/main.cpp | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/common/settings.h b/src/common/settings.h index 9317075f76..e899f1ae68 100644 --- a/src/common/settings.h +++ b/src/common/settings.h @@ -153,7 +153,7 @@ struct Values { true, true}; Setting audio_muted{ - linkage, false, "audio_muted", Category::Audio, Specialization::Default, false, true}; + linkage, false, "audio_muted", Category::Audio, Specialization::Default, true, true}; Setting dump_audio_commands{ linkage, false, "dump_audio_commands", Category::Audio, Specialization::Default, false}; diff --git a/src/yuzu/main.cpp b/src/yuzu/main.cpp index 91aba118a4..1bf173efbb 100644 --- a/src/yuzu/main.cpp +++ b/src/yuzu/main.cpp @@ -1064,12 +1064,6 @@ void GMainWindow::InitializeWidgets() { volume_slider->setObjectName(QStringLiteral("volume_slider")); volume_slider->setMaximum(200); volume_slider->setPageStep(5); - connect(volume_slider, &QSlider::valueChanged, this, [this](int percentage) { - Settings::values.audio_muted = false; - const auto volume = static_cast(percentage); - Settings::values.volume.SetValue(volume); - UpdateVolumeUI(); - }); volume_popup->layout()->addWidget(volume_slider); volume_button = new VolumeButton(); @@ -1077,6 +1071,12 @@ void GMainWindow::InitializeWidgets() { volume_button->setFocusPolicy(Qt::NoFocus); volume_button->setCheckable(true); UpdateVolumeUI(); + connect(volume_slider, &QSlider::valueChanged, this, [this](int percentage) { + Settings::values.audio_muted = false; + const auto volume = static_cast(percentage); + Settings::values.volume.SetValue(volume); + UpdateVolumeUI(); + }); connect(volume_button, &QPushButton::clicked, this, [&] { UpdateVolumeUI(); volume_popup->setVisible(!volume_popup->isVisible()); From 2a255b2d61a445fb2b83cc8af7632e3d720e1292 Mon Sep 17 00:00:00 2001 From: Liam Date: Sun, 22 Oct 2023 21:16:38 -0400 Subject: [PATCH 080/154] kernel: add KPageTableBase Co-authored-by: Kelebek1 --- src/common/page_table.cpp | 30 +- src/common/page_table.h | 17 +- src/core/CMakeLists.txt | 6 +- src/core/debugger/gdbstub.cpp | 98 +- .../board/nintendo/nx/k_system_control.cpp | 13 +- .../board/nintendo/nx/k_system_control.h | 7 +- src/core/hle/kernel/k_capabilities.cpp | 36 +- src/core/hle/kernel/k_capabilities.h | 17 +- .../hle/kernel/k_device_address_space.cpp | 4 +- src/core/hle/kernel/k_device_address_space.h | 10 +- src/core/hle/kernel/k_memory_layout.h | 8 + src/core/hle/kernel/k_memory_manager.cpp | 12 +- src/core/hle/kernel/k_page_table.cpp | 3519 ---------- src/core/hle/kernel/k_page_table.h | 542 +- src/core/hle/kernel/k_page_table_base.cpp | 5718 +++++++++++++++++ src/core/hle/kernel/k_page_table_base.h | 759 +++ src/core/hle/kernel/k_process.cpp | 18 +- src/core/hle/kernel/k_process.h | 14 +- src/core/hle/kernel/k_process_page_table.h | 480 ++ src/core/hle/kernel/k_server_session.cpp | 2 +- src/core/hle/kernel/k_system_resource.cpp | 2 +- src/core/hle/kernel/k_thread_local_page.cpp | 4 +- src/core/hle/kernel/process_capability.cpp | 389 -- src/core/hle/kernel/process_capability.h | 266 - src/core/hle/kernel/svc/svc_memory.cpp | 6 +- .../hle/kernel/svc/svc_physical_memory.cpp | 9 +- .../hle/kernel/svc/svc_process_memory.cpp | 3 +- src/core/hle/kernel/svc/svc_query_memory.cpp | 8 +- src/core/hle/result.h | 31 + src/core/hle/service/ldr/ldr.cpp | 45 +- src/core/memory.cpp | 6 +- 31 files changed, 7202 insertions(+), 4877 deletions(-) delete mode 100644 src/core/hle/kernel/k_page_table.cpp create mode 100644 src/core/hle/kernel/k_page_table_base.cpp create mode 100644 src/core/hle/kernel/k_page_table_base.h create mode 100644 src/core/hle/kernel/k_process_page_table.h delete mode 100644 src/core/hle/kernel/process_capability.cpp delete mode 100644 src/core/hle/kernel/process_capability.h diff --git a/src/common/page_table.cpp b/src/common/page_table.cpp index 4b16902695..166dc3dcee 100644 --- a/src/common/page_table.cpp +++ b/src/common/page_table.cpp @@ -9,12 +9,12 @@ PageTable::PageTable() = default; PageTable::~PageTable() noexcept = default; -bool PageTable::BeginTraversal(TraversalEntry& out_entry, TraversalContext& out_context, - u64 address) const { +bool PageTable::BeginTraversal(TraversalEntry* out_entry, TraversalContext* out_context, + Common::ProcessAddress address) const { // Setup invalid defaults. - out_entry.phys_addr = 0; - out_entry.block_size = page_size; - out_context.next_page = 0; + out_entry->phys_addr = 0; + out_entry->block_size = page_size; + out_context->next_page = 0; // Validate that we can read the actual entry. const auto page = address / page_size; @@ -29,20 +29,20 @@ bool PageTable::BeginTraversal(TraversalEntry& out_entry, TraversalContext& out_ } // Populate the results. - out_entry.phys_addr = phys_addr + address; - out_context.next_page = page + 1; - out_context.next_offset = address + page_size; + out_entry->phys_addr = phys_addr + GetInteger(address); + out_context->next_page = page + 1; + out_context->next_offset = GetInteger(address) + page_size; return true; } -bool PageTable::ContinueTraversal(TraversalEntry& out_entry, TraversalContext& context) const { +bool PageTable::ContinueTraversal(TraversalEntry* out_entry, TraversalContext* context) const { // Setup invalid defaults. - out_entry.phys_addr = 0; - out_entry.block_size = page_size; + out_entry->phys_addr = 0; + out_entry->block_size = page_size; // Validate that we can read the actual entry. - const auto page = context.next_page; + const auto page = context->next_page; if (page >= backing_addr.size()) { return false; } @@ -54,9 +54,9 @@ bool PageTable::ContinueTraversal(TraversalEntry& out_entry, TraversalContext& c } // Populate the results. - out_entry.phys_addr = phys_addr + context.next_offset; - context.next_page = page + 1; - context.next_offset += page_size; + out_entry->phys_addr = phys_addr + context->next_offset; + context->next_page = page + 1; + context->next_offset += page_size; return true; } diff --git a/src/common/page_table.h b/src/common/page_table.h index e653d52adc..5340f7d863 100644 --- a/src/common/page_table.h +++ b/src/common/page_table.h @@ -6,6 +6,7 @@ #include #include "common/common_types.h" +#include "common/typed_address.h" #include "common/virtual_buffer.h" namespace Common { @@ -100,9 +101,9 @@ struct PageTable { PageTable(PageTable&&) noexcept = default; PageTable& operator=(PageTable&&) noexcept = default; - bool BeginTraversal(TraversalEntry& out_entry, TraversalContext& out_context, - u64 address) const; - bool ContinueTraversal(TraversalEntry& out_entry, TraversalContext& context) const; + 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 @@ -117,6 +118,16 @@ struct PageTable { 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 = backing_addr[virt_addr / page_size] + GetInteger(virt_addr); + return true; + } + /** * Vector of memory pointers backing each page. An entry can only be non-null if the * corresponding attribute element is of type `Memory`. diff --git a/src/core/CMakeLists.txt b/src/core/CMakeLists.txt index e4f499135a..8be3bdd080 100644 --- a/src/core/CMakeLists.txt +++ b/src/core/CMakeLists.txt @@ -271,8 +271,9 @@ add_library(core STATIC hle/kernel/k_page_heap.h hle/kernel/k_page_group.cpp hle/kernel/k_page_group.h - hle/kernel/k_page_table.cpp hle/kernel/k_page_table.h + hle/kernel/k_page_table_base.cpp + hle/kernel/k_page_table_base.h hle/kernel/k_page_table_manager.h hle/kernel/k_page_table_slab_heap.h hle/kernel/k_port.cpp @@ -280,6 +281,7 @@ add_library(core STATIC hle/kernel/k_priority_queue.h hle/kernel/k_process.cpp hle/kernel/k_process.h + hle/kernel/k_process_page_table.h hle/kernel/k_readable_event.cpp hle/kernel/k_readable_event.h hle/kernel/k_resource_limit.cpp @@ -330,8 +332,6 @@ add_library(core STATIC hle/kernel/physical_core.cpp hle/kernel/physical_core.h hle/kernel/physical_memory.h - hle/kernel/process_capability.cpp - hle/kernel/process_capability.h hle/kernel/slab_helpers.h hle/kernel/svc.cpp hle/kernel/svc.h diff --git a/src/core/debugger/gdbstub.cpp b/src/core/debugger/gdbstub.cpp index 6f5f5156ba..e9bf578951 100644 --- a/src/core/debugger/gdbstub.cpp +++ b/src/core/debugger/gdbstub.cpp @@ -727,29 +727,34 @@ static constexpr const char* GetMemoryPermissionString(const Kernel::Svc::Memory } } -static VAddr GetModuleEnd(Kernel::KPageTable& page_table, VAddr base) { - Kernel::Svc::MemoryInfo mem_info; +static VAddr GetModuleEnd(Kernel::KProcessPageTable& page_table, VAddr base) { + Kernel::KMemoryInfo mem_info; + Kernel::Svc::MemoryInfo svc_mem_info; + Kernel::Svc::PageInfo page_info; VAddr cur_addr{base}; // Expect: r-x Code (.text) - mem_info = page_table.QueryInfo(cur_addr).GetSvcMemoryInfo(); - cur_addr = mem_info.base_address + mem_info.size; - if (mem_info.state != Kernel::Svc::MemoryState::Code || - mem_info.permission != Kernel::Svc::MemoryPermission::ReadExecute) { + R_ASSERT(page_table.QueryInfo(std::addressof(mem_info), std::addressof(page_info), cur_addr)); + svc_mem_info = mem_info.GetSvcMemoryInfo(); + cur_addr = svc_mem_info.base_address + svc_mem_info.size; + if (svc_mem_info.state != Kernel::Svc::MemoryState::Code || + svc_mem_info.permission != Kernel::Svc::MemoryPermission::ReadExecute) { return cur_addr - 1; } // Expect: r-- Code (.rodata) - mem_info = page_table.QueryInfo(cur_addr).GetSvcMemoryInfo(); - cur_addr = mem_info.base_address + mem_info.size; - if (mem_info.state != Kernel::Svc::MemoryState::Code || - mem_info.permission != Kernel::Svc::MemoryPermission::Read) { + R_ASSERT(page_table.QueryInfo(std::addressof(mem_info), std::addressof(page_info), cur_addr)); + svc_mem_info = mem_info.GetSvcMemoryInfo(); + cur_addr = svc_mem_info.base_address + svc_mem_info.size; + if (svc_mem_info.state != Kernel::Svc::MemoryState::Code || + svc_mem_info.permission != Kernel::Svc::MemoryPermission::Read) { return cur_addr - 1; } // Expect: rw- CodeData (.data) - mem_info = page_table.QueryInfo(cur_addr).GetSvcMemoryInfo(); - cur_addr = mem_info.base_address + mem_info.size; + R_ASSERT(page_table.QueryInfo(std::addressof(mem_info), std::addressof(page_info), cur_addr)); + svc_mem_info = mem_info.GetSvcMemoryInfo(); + cur_addr = svc_mem_info.base_address + svc_mem_info.size; return cur_addr - 1; } @@ -767,7 +772,7 @@ void GDBStub::HandleRcmd(const std::vector& command) { if (command_str == "get fastmem") { if (Settings::IsFastmemEnabled()) { - const auto& impl = page_table.PageTableImpl(); + const auto& impl = page_table.GetImpl(); const auto region = reinterpret_cast(impl.fastmem_arena); const auto region_bits = impl.current_address_space_width_in_bits; const auto region_size = 1ULL << region_bits; @@ -785,20 +790,22 @@ void GDBStub::HandleRcmd(const std::vector& command) { reply = fmt::format("Process: {:#x} ({})\n" "Program Id: {:#018x}\n", process->GetProcessId(), process->GetName(), process->GetProgramId()); - reply += fmt::format("Layout:\n" - " Alias: {:#012x} - {:#012x}\n" - " Heap: {:#012x} - {:#012x}\n" - " Aslr: {:#012x} - {:#012x}\n" - " Stack: {:#012x} - {:#012x}\n" - "Modules:\n", - GetInteger(page_table.GetAliasRegionStart()), - GetInteger(page_table.GetAliasRegionEnd()), - GetInteger(page_table.GetHeapRegionStart()), - GetInteger(page_table.GetHeapRegionEnd()), - GetInteger(page_table.GetAliasCodeRegionStart()), - GetInteger(page_table.GetAliasCodeRegionEnd()), - GetInteger(page_table.GetStackRegionStart()), - GetInteger(page_table.GetStackRegionEnd())); + reply += fmt::format( + "Layout:\n" + " Alias: {:#012x} - {:#012x}\n" + " Heap: {:#012x} - {:#012x}\n" + " Aslr: {:#012x} - {:#012x}\n" + " Stack: {:#012x} - {:#012x}\n" + "Modules:\n", + GetInteger(page_table.GetAliasRegionStart()), + GetInteger(page_table.GetAliasRegionStart()) + page_table.GetAliasRegionSize() - 1, + GetInteger(page_table.GetHeapRegionStart()), + GetInteger(page_table.GetHeapRegionStart()) + page_table.GetHeapRegionSize() - 1, + GetInteger(page_table.GetAliasCodeRegionStart()), + GetInteger(page_table.GetAliasCodeRegionStart()) + page_table.GetAliasCodeRegionSize() - + 1, + GetInteger(page_table.GetStackRegionStart()), + GetInteger(page_table.GetStackRegionStart()) + page_table.GetStackRegionSize() - 1); for (const auto& [vaddr, name] : modules) { reply += fmt::format(" {:#012x} - {:#012x} {}\n", vaddr, @@ -811,27 +818,34 @@ void GDBStub::HandleRcmd(const std::vector& command) { while (true) { using MemoryAttribute = Kernel::Svc::MemoryAttribute; - auto mem_info = page_table.QueryInfo(cur_addr).GetSvcMemoryInfo(); + Kernel::KMemoryInfo mem_info{}; + Kernel::Svc::PageInfo page_info{}; + R_ASSERT(page_table.QueryInfo(std::addressof(mem_info), std::addressof(page_info), + cur_addr)); + auto svc_mem_info = mem_info.GetSvcMemoryInfo(); - if (mem_info.state != Kernel::Svc::MemoryState::Inaccessible || - mem_info.base_address + mem_info.size - 1 != std::numeric_limits::max()) { - const char* state = GetMemoryStateName(mem_info.state); - const char* perm = GetMemoryPermissionString(mem_info); + if (svc_mem_info.state != Kernel::Svc::MemoryState::Inaccessible || + svc_mem_info.base_address + svc_mem_info.size - 1 != + std::numeric_limits::max()) { + const char* state = GetMemoryStateName(svc_mem_info.state); + const char* perm = GetMemoryPermissionString(svc_mem_info); - const char l = True(mem_info.attribute & MemoryAttribute::Locked) ? 'L' : '-'; - const char i = True(mem_info.attribute & MemoryAttribute::IpcLocked) ? 'I' : '-'; - const char d = True(mem_info.attribute & MemoryAttribute::DeviceShared) ? 'D' : '-'; - const char u = True(mem_info.attribute & MemoryAttribute::Uncached) ? 'U' : '-'; + const char l = True(svc_mem_info.attribute & MemoryAttribute::Locked) ? 'L' : '-'; + const char i = + True(svc_mem_info.attribute & MemoryAttribute::IpcLocked) ? 'I' : '-'; + const char d = + True(svc_mem_info.attribute & MemoryAttribute::DeviceShared) ? 'D' : '-'; + const char u = True(svc_mem_info.attribute & MemoryAttribute::Uncached) ? 'U' : '-'; const char p = - True(mem_info.attribute & MemoryAttribute::PermissionLocked) ? 'P' : '-'; + True(svc_mem_info.attribute & MemoryAttribute::PermissionLocked) ? 'P' : '-'; - reply += fmt::format(" {:#012x} - {:#012x} {} {} {}{}{}{}{} [{}, {}]\n", - mem_info.base_address, - mem_info.base_address + mem_info.size - 1, perm, state, l, i, - d, u, p, mem_info.ipc_count, mem_info.device_count); + reply += fmt::format( + " {:#012x} - {:#012x} {} {} {}{}{}{}{} [{}, {}]\n", svc_mem_info.base_address, + svc_mem_info.base_address + svc_mem_info.size - 1, perm, state, l, i, d, u, p, + svc_mem_info.ipc_count, svc_mem_info.device_count); } - const uintptr_t next_address = mem_info.base_address + mem_info.size; + const uintptr_t next_address = svc_mem_info.base_address + svc_mem_info.size; if (next_address <= cur_addr) { break; } diff --git a/src/core/hle/kernel/board/nintendo/nx/k_system_control.cpp b/src/core/hle/kernel/board/nintendo/nx/k_system_control.cpp index 59364efa1a..37fa39a734 100644 --- a/src/core/hle/kernel/board/nintendo/nx/k_system_control.cpp +++ b/src/core/hle/kernel/board/nintendo/nx/k_system_control.cpp @@ -222,7 +222,7 @@ Result KSystemControl::AllocateSecureMemory(KernelCore& kernel, KVirtualAddress* }; // We succeeded. - *out = KPageTable::GetHeapVirtualAddress(kernel.MemoryLayout(), paddr); + *out = KPageTable::GetHeapVirtualAddress(kernel, paddr); R_SUCCEED(); } @@ -238,8 +238,17 @@ void KSystemControl::FreeSecureMemory(KernelCore& kernel, KVirtualAddress addres ASSERT(Common::IsAligned(size, alignment)); // Close the secure region's pages. - kernel.MemoryManager().Close(KPageTable::GetHeapPhysicalAddress(kernel.MemoryLayout(), address), + kernel.MemoryManager().Close(KPageTable::GetHeapPhysicalAddress(kernel, address), size / PageSize); } +// Insecure Memory. +KResourceLimit* KSystemControl::GetInsecureMemoryResourceLimit(KernelCore& kernel) { + return kernel.GetSystemResourceLimit(); +} + +u32 KSystemControl::GetInsecureMemoryPool() { + return static_cast(KMemoryManager::Pool::SystemNonSecure); +} + } // namespace Kernel::Board::Nintendo::Nx diff --git a/src/core/hle/kernel/board/nintendo/nx/k_system_control.h b/src/core/hle/kernel/board/nintendo/nx/k_system_control.h index ff1feec700..60c5e58b73 100644 --- a/src/core/hle/kernel/board/nintendo/nx/k_system_control.h +++ b/src/core/hle/kernel/board/nintendo/nx/k_system_control.h @@ -8,7 +8,8 @@ namespace Kernel { class KernelCore; -} +class KResourceLimit; +} // namespace Kernel namespace Kernel::Board::Nintendo::Nx { @@ -40,6 +41,10 @@ public: u32 pool); static void FreeSecureMemory(KernelCore& kernel, KVirtualAddress address, size_t size, u32 pool); + + // Insecure Memory. + static KResourceLimit* GetInsecureMemoryResourceLimit(KernelCore& kernel); + static u32 GetInsecureMemoryPool(); }; } // namespace Kernel::Board::Nintendo::Nx diff --git a/src/core/hle/kernel/k_capabilities.cpp b/src/core/hle/kernel/k_capabilities.cpp index e7da7a21d4..fb890f978d 100644 --- a/src/core/hle/kernel/k_capabilities.cpp +++ b/src/core/hle/kernel/k_capabilities.cpp @@ -4,14 +4,15 @@ #include "core/hardware_properties.h" #include "core/hle/kernel/k_capabilities.h" #include "core/hle/kernel/k_memory_layout.h" -#include "core/hle/kernel/k_page_table.h" +#include "core/hle/kernel/k_process_page_table.h" #include "core/hle/kernel/kernel.h" #include "core/hle/kernel/svc_results.h" #include "core/hle/kernel/svc_version.h" namespace Kernel { -Result KCapabilities::InitializeForKip(std::span kern_caps, KPageTable* page_table) { +Result KCapabilities::InitializeForKip(std::span kern_caps, + KProcessPageTable* page_table) { // We're initializing an initial process. m_svc_access_flags.reset(); m_irq_access_flags.reset(); @@ -41,7 +42,8 @@ Result KCapabilities::InitializeForKip(std::span kern_caps, KPageTabl R_RETURN(this->SetCapabilities(kern_caps, page_table)); } -Result KCapabilities::InitializeForUser(std::span user_caps, KPageTable* page_table) { +Result KCapabilities::InitializeForUser(std::span user_caps, + KProcessPageTable* page_table) { // We're initializing a user process. m_svc_access_flags.reset(); m_irq_access_flags.reset(); @@ -121,7 +123,7 @@ Result KCapabilities::SetSyscallMaskCapability(const u32 cap, u32& set_svc) { R_SUCCEED(); } -Result KCapabilities::MapRange_(const u32 cap, const u32 size_cap, KPageTable* page_table) { +Result KCapabilities::MapRange_(const u32 cap, const u32 size_cap, KProcessPageTable* page_table) { const auto range_pack = MapRange{cap}; const auto size_pack = MapRangeSize{size_cap}; @@ -142,16 +144,13 @@ Result KCapabilities::MapRange_(const u32 cap, const u32 size_cap, KPageTable* p ? KMemoryPermission::UserRead : KMemoryPermission::UserReadWrite; if (MapRangeSize{size_cap}.normal) { - // R_RETURN(page_table->MapStatic(phys_addr, size, perm)); + R_RETURN(page_table->MapStatic(phys_addr, size, perm)); } else { - // R_RETURN(page_table->MapIo(phys_addr, size, perm)); + R_RETURN(page_table->MapIo(phys_addr, size, perm)); } - - UNIMPLEMENTED(); - R_SUCCEED(); } -Result KCapabilities::MapIoPage_(const u32 cap, KPageTable* page_table) { +Result KCapabilities::MapIoPage_(const u32 cap, KProcessPageTable* page_table) { // Get/validate address/size const u64 phys_addr = MapIoPage{cap}.address.Value() * PageSize; const size_t num_pages = 1; @@ -160,10 +159,7 @@ Result KCapabilities::MapIoPage_(const u32 cap, KPageTable* page_table) { R_UNLESS(((phys_addr + size - 1) & ~PhysicalMapAllowedMask) == 0, ResultInvalidAddress); // Do the mapping. - // R_RETURN(page_table->MapIo(phys_addr, size, KMemoryPermission_UserReadWrite)); - - UNIMPLEMENTED(); - R_SUCCEED(); + R_RETURN(page_table->MapIo(phys_addr, size, KMemoryPermission::UserReadWrite)); } template @@ -200,13 +196,11 @@ Result KCapabilities::ProcessMapRegionCapability(const u32 cap, F f) { R_SUCCEED(); } -Result KCapabilities::MapRegion_(const u32 cap, KPageTable* page_table) { +Result KCapabilities::MapRegion_(const u32 cap, KProcessPageTable* page_table) { // Map each region into the process's page table. return ProcessMapRegionCapability( - cap, [](KMemoryRegionType region_type, KMemoryPermission perm) -> Result { - // R_RETURN(page_table->MapRegion(region_type, perm)); - UNIMPLEMENTED(); - R_SUCCEED(); + cap, [page_table](KMemoryRegionType region_type, KMemoryPermission perm) -> Result { + R_RETURN(page_table->MapRegion(region_type, perm)); }); } @@ -280,7 +274,7 @@ Result KCapabilities::SetDebugFlagsCapability(const u32 cap) { } Result KCapabilities::SetCapability(const u32 cap, u32& set_flags, u32& set_svc, - KPageTable* page_table) { + KProcessPageTable* page_table) { // Validate this is a capability we can act on. const auto type = GetCapabilityType(cap); R_UNLESS(type != CapabilityType::Invalid, ResultInvalidArgument); @@ -318,7 +312,7 @@ Result KCapabilities::SetCapability(const u32 cap, u32& set_flags, u32& set_svc, } } -Result KCapabilities::SetCapabilities(std::span caps, KPageTable* page_table) { +Result KCapabilities::SetCapabilities(std::span caps, KProcessPageTable* page_table) { u32 set_flags = 0, set_svc = 0; for (size_t i = 0; i < caps.size(); i++) { diff --git a/src/core/hle/kernel/k_capabilities.h b/src/core/hle/kernel/k_capabilities.h index ebd4eedb1e..013d952ad4 100644 --- a/src/core/hle/kernel/k_capabilities.h +++ b/src/core/hle/kernel/k_capabilities.h @@ -15,15 +15,15 @@ namespace Kernel { -class KPageTable; +class KProcessPageTable; class KernelCore; class KCapabilities { public: constexpr explicit KCapabilities() = default; - Result InitializeForKip(std::span kern_caps, KPageTable* page_table); - Result InitializeForUser(std::span user_caps, KPageTable* page_table); + Result InitializeForKip(std::span kern_caps, KProcessPageTable* page_table); + Result InitializeForUser(std::span user_caps, KProcessPageTable* page_table); static Result CheckCapabilities(KernelCore& kernel, std::span user_caps); @@ -264,9 +264,9 @@ private: Result SetCorePriorityCapability(const u32 cap); Result SetSyscallMaskCapability(const u32 cap, u32& set_svc); - Result MapRange_(const u32 cap, const u32 size_cap, KPageTable* page_table); - Result MapIoPage_(const u32 cap, KPageTable* page_table); - Result MapRegion_(const u32 cap, KPageTable* page_table); + Result MapRange_(const u32 cap, const u32 size_cap, KProcessPageTable* page_table); + Result MapIoPage_(const u32 cap, KProcessPageTable* page_table); + Result MapRegion_(const u32 cap, KProcessPageTable* page_table); Result SetInterruptPairCapability(const u32 cap); Result SetProgramTypeCapability(const u32 cap); Result SetKernelVersionCapability(const u32 cap); @@ -277,8 +277,9 @@ private: static Result ProcessMapRegionCapability(const u32 cap, F f); static Result CheckMapRegion(KernelCore& kernel, const u32 cap); - Result SetCapability(const u32 cap, u32& set_flags, u32& set_svc, KPageTable* page_table); - Result SetCapabilities(std::span caps, KPageTable* page_table); + Result SetCapability(const u32 cap, u32& set_flags, u32& set_svc, + KProcessPageTable* page_table); + Result SetCapabilities(std::span caps, KProcessPageTable* page_table); private: Svc::SvcAccessFlagSet m_svc_access_flags{}; diff --git a/src/core/hle/kernel/k_device_address_space.cpp b/src/core/hle/kernel/k_device_address_space.cpp index f488967153..f0703f795b 100644 --- a/src/core/hle/kernel/k_device_address_space.cpp +++ b/src/core/hle/kernel/k_device_address_space.cpp @@ -54,7 +54,7 @@ Result KDeviceAddressSpace::Detach(Svc::DeviceName device_name) { R_SUCCEED(); } -Result KDeviceAddressSpace::Map(KPageTable* page_table, KProcessAddress process_address, +Result KDeviceAddressSpace::Map(KProcessPageTable* page_table, KProcessAddress process_address, size_t size, u64 device_address, u32 option, bool is_aligned) { // Check that the address falls within the space. R_UNLESS((m_space_address <= device_address && @@ -113,7 +113,7 @@ Result KDeviceAddressSpace::Map(KPageTable* page_table, KProcessAddress process_ R_SUCCEED(); } -Result KDeviceAddressSpace::Unmap(KPageTable* page_table, KProcessAddress process_address, +Result KDeviceAddressSpace::Unmap(KProcessPageTable* page_table, KProcessAddress process_address, size_t size, u64 device_address) { // Check that the address falls within the space. R_UNLESS((m_space_address <= device_address && diff --git a/src/core/hle/kernel/k_device_address_space.h b/src/core/hle/kernel/k_device_address_space.h index 18556e3cc1..ff0ec8152b 100644 --- a/src/core/hle/kernel/k_device_address_space.h +++ b/src/core/hle/kernel/k_device_address_space.h @@ -5,7 +5,7 @@ #include -#include "core/hle/kernel/k_page_table.h" +#include "core/hle/kernel/k_process_page_table.h" #include "core/hle/kernel/k_typed_address.h" #include "core/hle/kernel/slab_helpers.h" #include "core/hle/result.h" @@ -31,23 +31,23 @@ public: Result Attach(Svc::DeviceName device_name); Result Detach(Svc::DeviceName device_name); - Result MapByForce(KPageTable* page_table, KProcessAddress process_address, size_t size, + Result MapByForce(KProcessPageTable* page_table, KProcessAddress process_address, size_t size, u64 device_address, u32 option) { R_RETURN(this->Map(page_table, process_address, size, device_address, option, false)); } - Result MapAligned(KPageTable* page_table, KProcessAddress process_address, size_t size, + Result MapAligned(KProcessPageTable* page_table, KProcessAddress process_address, size_t size, u64 device_address, u32 option) { R_RETURN(this->Map(page_table, process_address, size, device_address, option, true)); } - Result Unmap(KPageTable* page_table, KProcessAddress process_address, size_t size, + Result Unmap(KProcessPageTable* page_table, KProcessAddress process_address, size_t size, u64 device_address); static void Initialize(); private: - Result Map(KPageTable* page_table, KProcessAddress process_address, size_t size, + Result Map(KProcessPageTable* page_table, KProcessAddress process_address, size_t size, u64 device_address, u32 option, bool is_aligned); private: diff --git a/src/core/hle/kernel/k_memory_layout.h b/src/core/hle/kernel/k_memory_layout.h index c8122644fd..d7adb31699 100644 --- a/src/core/hle/kernel/k_memory_layout.h +++ b/src/core/hle/kernel/k_memory_layout.h @@ -394,6 +394,14 @@ private: return region.GetEndAddress(); } +public: + static const KMemoryRegion* Find(const KMemoryLayout& layout, KVirtualAddress address) { + return Find(address, layout.GetVirtualMemoryRegionTree()); + } + static const KMemoryRegion* Find(const KMemoryLayout& layout, KPhysicalAddress address) { + return Find(address, layout.GetPhysicalMemoryRegionTree()); + } + private: u64 m_linear_phys_to_virt_diff{}; u64 m_linear_virt_to_phys_diff{}; diff --git a/src/core/hle/kernel/k_memory_manager.cpp b/src/core/hle/kernel/k_memory_manager.cpp index cdc5572d85..0a973ec8ce 100644 --- a/src/core/hle/kernel/k_memory_manager.cpp +++ b/src/core/hle/kernel/k_memory_manager.cpp @@ -456,8 +456,7 @@ size_t KMemoryManager::Impl::Initialize(KPhysicalAddress address, size_t size, } void KMemoryManager::Impl::InitializeOptimizedMemory(KernelCore& kernel) { - auto optimize_pa = - KPageTable::GetHeapPhysicalAddress(kernel.MemoryLayout(), m_management_region); + auto optimize_pa = KPageTable::GetHeapPhysicalAddress(kernel, m_management_region); auto* optimize_map = kernel.System().DeviceMemory().GetPointer(optimize_pa); std::memset(optimize_map, 0, CalculateOptimizedProcessOverheadSize(m_heap.GetSize())); @@ -465,8 +464,7 @@ void KMemoryManager::Impl::InitializeOptimizedMemory(KernelCore& kernel) { void KMemoryManager::Impl::TrackUnoptimizedAllocation(KernelCore& kernel, KPhysicalAddress block, size_t num_pages) { - auto optimize_pa = - KPageTable::GetHeapPhysicalAddress(kernel.MemoryLayout(), m_management_region); + auto optimize_pa = KPageTable::GetHeapPhysicalAddress(kernel, m_management_region); auto* optimize_map = kernel.System().DeviceMemory().GetPointer(optimize_pa); // Get the range we're tracking. @@ -485,8 +483,7 @@ void KMemoryManager::Impl::TrackUnoptimizedAllocation(KernelCore& kernel, KPhysi void KMemoryManager::Impl::TrackOptimizedAllocation(KernelCore& kernel, KPhysicalAddress block, size_t num_pages) { - auto optimize_pa = - KPageTable::GetHeapPhysicalAddress(kernel.MemoryLayout(), m_management_region); + auto optimize_pa = KPageTable::GetHeapPhysicalAddress(kernel, m_management_region); auto* optimize_map = kernel.System().DeviceMemory().GetPointer(optimize_pa); // Get the range we're tracking. @@ -506,8 +503,7 @@ void KMemoryManager::Impl::TrackOptimizedAllocation(KernelCore& kernel, KPhysica bool KMemoryManager::Impl::ProcessOptimizedAllocation(KernelCore& kernel, KPhysicalAddress block, size_t num_pages, u8 fill_pattern) { auto& device_memory = kernel.System().DeviceMemory(); - auto optimize_pa = - KPageTable::GetHeapPhysicalAddress(kernel.MemoryLayout(), m_management_region); + auto optimize_pa = KPageTable::GetHeapPhysicalAddress(kernel, m_management_region); auto* optimize_map = device_memory.GetPointer(optimize_pa); // We want to return whether any pages were newly allocated. diff --git a/src/core/hle/kernel/k_page_table.cpp b/src/core/hle/kernel/k_page_table.cpp deleted file mode 100644 index 1d47bdf6b5..0000000000 --- a/src/core/hle/kernel/k_page_table.cpp +++ /dev/null @@ -1,3519 +0,0 @@ -// SPDX-FileCopyrightText: Copyright 2020 yuzu Emulator Project -// SPDX-License-Identifier: GPL-2.0-or-later - -#include "common/alignment.h" -#include "common/assert.h" -#include "common/literals.h" -#include "common/scope_exit.h" -#include "common/settings.h" -#include "core/core.h" -#include "core/hle/kernel/k_address_space_info.h" -#include "core/hle/kernel/k_memory_block.h" -#include "core/hle/kernel/k_memory_block_manager.h" -#include "core/hle/kernel/k_page_group.h" -#include "core/hle/kernel/k_page_table.h" -#include "core/hle/kernel/k_process.h" -#include "core/hle/kernel/k_resource_limit.h" -#include "core/hle/kernel/k_scoped_resource_reservation.h" -#include "core/hle/kernel/k_system_control.h" -#include "core/hle/kernel/k_system_resource.h" -#include "core/hle/kernel/kernel.h" -#include "core/hle/kernel/svc_results.h" -#include "core/memory.h" - -namespace Kernel { - -namespace { - -class KScopedLightLockPair { - YUZU_NON_COPYABLE(KScopedLightLockPair); - YUZU_NON_MOVEABLE(KScopedLightLockPair); - -private: - KLightLock* m_lower; - KLightLock* m_upper; - -public: - KScopedLightLockPair(KLightLock& lhs, KLightLock& rhs) { - // Ensure our locks are in a consistent order. - if (std::addressof(lhs) <= std::addressof(rhs)) { - m_lower = std::addressof(lhs); - m_upper = std::addressof(rhs); - } else { - m_lower = std::addressof(rhs); - m_upper = std::addressof(lhs); - } - - // Acquire both locks. - m_lower->Lock(); - if (m_lower != m_upper) { - m_upper->Lock(); - } - } - - ~KScopedLightLockPair() { - // Unlock the upper lock. - if (m_upper != nullptr && m_upper != m_lower) { - m_upper->Unlock(); - } - - // Unlock the lower lock. - if (m_lower != nullptr) { - m_lower->Unlock(); - } - } - -public: - // Utility. - void TryUnlockHalf(KLightLock& lock) { - // Only allow unlocking if the lock is half the pair. - if (m_lower != m_upper) { - // We want to be sure the lock is one we own. - if (m_lower == std::addressof(lock)) { - lock.Unlock(); - m_lower = nullptr; - } else if (m_upper == std::addressof(lock)) { - lock.Unlock(); - m_upper = nullptr; - } - } - } -}; - -using namespace Common::Literals; - -constexpr size_t GetAddressSpaceWidthFromType(Svc::CreateProcessFlag as_type) { - switch (as_type) { - case Svc::CreateProcessFlag::AddressSpace32Bit: - case Svc::CreateProcessFlag::AddressSpace32BitWithoutAlias: - return 32; - case Svc::CreateProcessFlag::AddressSpace64BitDeprecated: - return 36; - case Svc::CreateProcessFlag::AddressSpace64Bit: - return 39; - default: - ASSERT(false); - return {}; - } -} - -} // namespace - -KPageTable::KPageTable(Core::System& system_) - : m_general_lock{system_.Kernel()}, - m_map_physical_memory_lock{system_.Kernel()}, m_system{system_}, m_kernel{system_.Kernel()} {} - -KPageTable::~KPageTable() = default; - -Result KPageTable::InitializeForProcess(Svc::CreateProcessFlag as_type, bool enable_aslr, - bool enable_das_merge, bool from_back, - KMemoryManager::Pool pool, KProcessAddress code_addr, - size_t code_size, KSystemResource* system_resource, - KResourceLimit* resource_limit, - Core::Memory::Memory& memory) { - - const auto GetSpaceStart = [this](KAddressSpaceInfo::Type type) { - return KAddressSpaceInfo::GetAddressSpaceStart(m_address_space_width, type); - }; - const auto GetSpaceSize = [this](KAddressSpaceInfo::Type type) { - return KAddressSpaceInfo::GetAddressSpaceSize(m_address_space_width, type); - }; - - // Set the tracking memory - m_memory = std::addressof(memory); - - // Set our width and heap/alias sizes - m_address_space_width = GetAddressSpaceWidthFromType(as_type); - const KProcessAddress start = 0; - const KProcessAddress end{1ULL << m_address_space_width}; - size_t alias_region_size{GetSpaceSize(KAddressSpaceInfo::Type::Alias)}; - size_t heap_region_size{GetSpaceSize(KAddressSpaceInfo::Type::Heap)}; - - ASSERT(code_addr < code_addr + code_size); - ASSERT(code_addr + code_size - 1 <= end - 1); - - // Adjust heap/alias size if we don't have an alias region - if (as_type == Svc::CreateProcessFlag::AddressSpace32BitWithoutAlias) { - heap_region_size += alias_region_size; - alias_region_size = 0; - } - - // Set code regions and determine remaining - constexpr size_t RegionAlignment{2_MiB}; - KProcessAddress process_code_start{}; - KProcessAddress process_code_end{}; - size_t stack_region_size{}; - size_t kernel_map_region_size{}; - - if (m_address_space_width == 39) { - alias_region_size = GetSpaceSize(KAddressSpaceInfo::Type::Alias); - heap_region_size = GetSpaceSize(KAddressSpaceInfo::Type::Heap); - stack_region_size = GetSpaceSize(KAddressSpaceInfo::Type::Stack); - kernel_map_region_size = GetSpaceSize(KAddressSpaceInfo::Type::MapSmall); - m_code_region_start = GetSpaceStart(KAddressSpaceInfo::Type::Map39Bit); - m_code_region_end = m_code_region_start + GetSpaceSize(KAddressSpaceInfo::Type::Map39Bit); - m_alias_code_region_start = m_code_region_start; - m_alias_code_region_end = m_code_region_end; - process_code_start = Common::AlignDown(GetInteger(code_addr), RegionAlignment); - process_code_end = Common::AlignUp(GetInteger(code_addr) + code_size, RegionAlignment); - } else { - stack_region_size = 0; - kernel_map_region_size = 0; - m_code_region_start = GetSpaceStart(KAddressSpaceInfo::Type::MapSmall); - m_code_region_end = m_code_region_start + GetSpaceSize(KAddressSpaceInfo::Type::MapSmall); - m_stack_region_start = m_code_region_start; - m_alias_code_region_start = m_code_region_start; - m_alias_code_region_end = GetSpaceStart(KAddressSpaceInfo::Type::MapLarge) + - GetSpaceSize(KAddressSpaceInfo::Type::MapLarge); - m_stack_region_end = m_code_region_end; - m_kernel_map_region_start = m_code_region_start; - m_kernel_map_region_end = m_code_region_end; - process_code_start = m_code_region_start; - process_code_end = m_code_region_end; - } - - // Set other basic fields - m_enable_aslr = enable_aslr; - m_enable_device_address_space_merge = enable_das_merge; - m_address_space_start = start; - m_address_space_end = end; - m_is_kernel = false; - m_memory_block_slab_manager = system_resource->GetMemoryBlockSlabManagerPointer(); - m_block_info_manager = system_resource->GetBlockInfoManagerPointer(); - m_resource_limit = resource_limit; - - // Determine the region we can place our undetermineds in - KProcessAddress alloc_start{}; - size_t alloc_size{}; - if ((process_code_start - m_code_region_start) >= (end - process_code_end)) { - alloc_start = m_code_region_start; - alloc_size = process_code_start - m_code_region_start; - } else { - alloc_start = process_code_end; - alloc_size = end - process_code_end; - } - const size_t needed_size = - (alias_region_size + heap_region_size + stack_region_size + kernel_map_region_size); - R_UNLESS(alloc_size >= needed_size, ResultOutOfMemory); - - const size_t remaining_size{alloc_size - needed_size}; - - // Determine random placements for each region - size_t alias_rnd{}, heap_rnd{}, stack_rnd{}, kmap_rnd{}; - if (enable_aslr) { - alias_rnd = KSystemControl::GenerateRandomRange(0, remaining_size / RegionAlignment) * - RegionAlignment; - heap_rnd = KSystemControl::GenerateRandomRange(0, remaining_size / RegionAlignment) * - RegionAlignment; - stack_rnd = KSystemControl::GenerateRandomRange(0, remaining_size / RegionAlignment) * - RegionAlignment; - kmap_rnd = KSystemControl::GenerateRandomRange(0, remaining_size / RegionAlignment) * - RegionAlignment; - } - - // Setup heap and alias regions - m_alias_region_start = alloc_start + alias_rnd; - m_alias_region_end = m_alias_region_start + alias_region_size; - m_heap_region_start = alloc_start + heap_rnd; - m_heap_region_end = m_heap_region_start + heap_region_size; - - if (alias_rnd <= heap_rnd) { - m_heap_region_start += alias_region_size; - m_heap_region_end += alias_region_size; - } else { - m_alias_region_start += heap_region_size; - m_alias_region_end += heap_region_size; - } - - // Setup stack region - if (stack_region_size) { - m_stack_region_start = alloc_start + stack_rnd; - m_stack_region_end = m_stack_region_start + stack_region_size; - - if (alias_rnd < stack_rnd) { - m_stack_region_start += alias_region_size; - m_stack_region_end += alias_region_size; - } else { - m_alias_region_start += stack_region_size; - m_alias_region_end += stack_region_size; - } - - if (heap_rnd < stack_rnd) { - m_stack_region_start += heap_region_size; - m_stack_region_end += heap_region_size; - } else { - m_heap_region_start += stack_region_size; - m_heap_region_end += stack_region_size; - } - } - - // Setup kernel map region - if (kernel_map_region_size) { - m_kernel_map_region_start = alloc_start + kmap_rnd; - m_kernel_map_region_end = m_kernel_map_region_start + kernel_map_region_size; - - if (alias_rnd < kmap_rnd) { - m_kernel_map_region_start += alias_region_size; - m_kernel_map_region_end += alias_region_size; - } else { - m_alias_region_start += kernel_map_region_size; - m_alias_region_end += kernel_map_region_size; - } - - if (heap_rnd < kmap_rnd) { - m_kernel_map_region_start += heap_region_size; - m_kernel_map_region_end += heap_region_size; - } else { - m_heap_region_start += kernel_map_region_size; - m_heap_region_end += kernel_map_region_size; - } - - if (stack_region_size) { - if (stack_rnd < kmap_rnd) { - m_kernel_map_region_start += stack_region_size; - m_kernel_map_region_end += stack_region_size; - } else { - m_stack_region_start += kernel_map_region_size; - m_stack_region_end += kernel_map_region_size; - } - } - } - - // Set heap and fill members. - m_current_heap_end = m_heap_region_start; - m_max_heap_size = 0; - m_mapped_physical_memory_size = 0; - m_mapped_unsafe_physical_memory = 0; - m_mapped_insecure_memory = 0; - m_mapped_ipc_server_memory = 0; - - m_heap_fill_value = 0; - m_ipc_fill_value = 0; - m_stack_fill_value = 0; - - // Set allocation option. - m_allocate_option = - KMemoryManager::EncodeOption(pool, from_back ? KMemoryManager::Direction::FromBack - : KMemoryManager::Direction::FromFront); - - // Ensure that we regions inside our address space - auto IsInAddressSpace = [&](KProcessAddress addr) { - return m_address_space_start <= addr && addr <= m_address_space_end; - }; - ASSERT(IsInAddressSpace(m_alias_region_start)); - ASSERT(IsInAddressSpace(m_alias_region_end)); - ASSERT(IsInAddressSpace(m_heap_region_start)); - ASSERT(IsInAddressSpace(m_heap_region_end)); - ASSERT(IsInAddressSpace(m_stack_region_start)); - ASSERT(IsInAddressSpace(m_stack_region_end)); - ASSERT(IsInAddressSpace(m_kernel_map_region_start)); - ASSERT(IsInAddressSpace(m_kernel_map_region_end)); - - // Ensure that we selected regions that don't overlap - const KProcessAddress alias_start{m_alias_region_start}; - const KProcessAddress alias_last{m_alias_region_end - 1}; - const KProcessAddress heap_start{m_heap_region_start}; - const KProcessAddress heap_last{m_heap_region_end - 1}; - const KProcessAddress stack_start{m_stack_region_start}; - const KProcessAddress stack_last{m_stack_region_end - 1}; - const KProcessAddress kmap_start{m_kernel_map_region_start}; - const KProcessAddress kmap_last{m_kernel_map_region_end - 1}; - ASSERT(alias_last < heap_start || heap_last < alias_start); - ASSERT(alias_last < stack_start || stack_last < alias_start); - ASSERT(alias_last < kmap_start || kmap_last < alias_start); - ASSERT(heap_last < stack_start || stack_last < heap_start); - ASSERT(heap_last < kmap_start || kmap_last < heap_start); - - m_current_heap_end = m_heap_region_start; - m_max_heap_size = 0; - m_mapped_physical_memory_size = 0; - m_memory_pool = pool; - - m_page_table_impl = std::make_unique(); - m_page_table_impl->Resize(m_address_space_width, PageBits); - - // Initialize our memory block manager. - R_RETURN(m_memory_block_manager.Initialize(m_address_space_start, m_address_space_end, - m_memory_block_slab_manager)); -} - -void KPageTable::Finalize() { - auto HostUnmapCallback = [&](KProcessAddress addr, u64 size) { - if (Settings::IsFastmemEnabled()) { - m_system.DeviceMemory().buffer.Unmap(GetInteger(addr), size); - } - }; - - // Finalize memory blocks. - m_memory_block_manager.Finalize(m_memory_block_slab_manager, std::move(HostUnmapCallback)); - - // Release any insecure mapped memory. - if (m_mapped_insecure_memory) { - UNIMPLEMENTED(); - } - - // Release any ipc server memory. - if (m_mapped_ipc_server_memory) { - UNIMPLEMENTED(); - } - - // Close the backing page table, as the destructor is not called for guest objects. - m_page_table_impl.reset(); -} - -Result KPageTable::MapProcessCode(KProcessAddress addr, size_t num_pages, KMemoryState state, - KMemoryPermission perm) { - const u64 size{num_pages * PageSize}; - - // Validate the mapping request. - R_UNLESS(this->CanContain(addr, size, state), ResultInvalidCurrentMemory); - - // Lock the table. - KScopedLightLock lk(m_general_lock); - - // Verify that the destination memory is unmapped. - R_TRY(this->CheckMemoryState(addr, size, KMemoryState::All, KMemoryState::Free, - KMemoryPermission::None, KMemoryPermission::None, - KMemoryAttribute::None, KMemoryAttribute::None)); - - // Create an update allocator. - Result allocator_result{ResultSuccess}; - KMemoryBlockManagerUpdateAllocator allocator(std::addressof(allocator_result), - m_memory_block_slab_manager); - - // Allocate and open. - KPageGroup pg{m_kernel, m_block_info_manager}; - R_TRY(m_system.Kernel().MemoryManager().AllocateAndOpen( - &pg, num_pages, - KMemoryManager::EncodeOption(KMemoryManager::Pool::Application, m_allocation_option))); - - R_TRY(Operate(addr, num_pages, pg, OperationType::MapGroup)); - - // Update the blocks. - m_memory_block_manager.Update(std::addressof(allocator), addr, num_pages, state, perm, - KMemoryAttribute::None, KMemoryBlockDisableMergeAttribute::Normal, - KMemoryBlockDisableMergeAttribute::None); - - R_SUCCEED(); -} - -Result KPageTable::MapCodeMemory(KProcessAddress dst_address, KProcessAddress src_address, - size_t size) { - // Validate the mapping request. - R_UNLESS(this->CanContain(dst_address, size, KMemoryState::AliasCode), - ResultInvalidMemoryRegion); - - // Lock the table. - KScopedLightLock lk(m_general_lock); - - // Verify that the source memory is normal heap. - KMemoryState src_state{}; - KMemoryPermission src_perm{}; - size_t num_src_allocator_blocks{}; - R_TRY(this->CheckMemoryState(&src_state, &src_perm, nullptr, &num_src_allocator_blocks, - src_address, size, KMemoryState::All, KMemoryState::Normal, - KMemoryPermission::All, KMemoryPermission::UserReadWrite, - KMemoryAttribute::All, KMemoryAttribute::None)); - - // Verify that the destination memory is unmapped. - size_t num_dst_allocator_blocks{}; - R_TRY(this->CheckMemoryState(&num_dst_allocator_blocks, dst_address, size, KMemoryState::All, - KMemoryState::Free, KMemoryPermission::None, - KMemoryPermission::None, KMemoryAttribute::None, - KMemoryAttribute::None)); - - // Create an update allocator for the source. - Result src_allocator_result{ResultSuccess}; - KMemoryBlockManagerUpdateAllocator src_allocator(std::addressof(src_allocator_result), - m_memory_block_slab_manager, - num_src_allocator_blocks); - R_TRY(src_allocator_result); - - // Create an update allocator for the destination. - Result dst_allocator_result{ResultSuccess}; - KMemoryBlockManagerUpdateAllocator dst_allocator(std::addressof(dst_allocator_result), - m_memory_block_slab_manager, - num_dst_allocator_blocks); - R_TRY(dst_allocator_result); - - // Map the code memory. - { - // Determine the number of pages being operated on. - const size_t num_pages = size / PageSize; - - // Create page groups for the memory being mapped. - KPageGroup pg{m_kernel, m_block_info_manager}; - AddRegionToPages(src_address, num_pages, pg); - - // We're going to perform an update, so create a helper. - KScopedPageTableUpdater updater(this); - - // Reprotect the source as kernel-read/not mapped. - const auto new_perm = static_cast(KMemoryPermission::KernelRead | - KMemoryPermission::NotMapped); - R_TRY(Operate(src_address, num_pages, new_perm, OperationType::ChangePermissions)); - - // Ensure that we unprotect the source pages on failure. - auto unprot_guard = SCOPE_GUARD({ - ASSERT(this->Operate(src_address, num_pages, src_perm, OperationType::ChangePermissions) - .IsSuccess()); - }); - - // Map the alias pages. - const KPageProperties dst_properties = {new_perm, false, false, - DisableMergeAttribute::DisableHead}; - R_TRY( - this->MapPageGroupImpl(updater.GetPageList(), dst_address, pg, dst_properties, false)); - - // We successfully mapped the alias pages, so we don't need to unprotect the src pages on - // failure. - unprot_guard.Cancel(); - - // Apply the memory block updates. - m_memory_block_manager.Update(std::addressof(src_allocator), src_address, num_pages, - src_state, new_perm, KMemoryAttribute::Locked, - KMemoryBlockDisableMergeAttribute::Locked, - KMemoryBlockDisableMergeAttribute::None); - m_memory_block_manager.Update(std::addressof(dst_allocator), dst_address, num_pages, - KMemoryState::AliasCode, new_perm, KMemoryAttribute::None, - KMemoryBlockDisableMergeAttribute::Normal, - KMemoryBlockDisableMergeAttribute::None); - } - - R_SUCCEED(); -} - -Result KPageTable::UnmapCodeMemory(KProcessAddress dst_address, KProcessAddress src_address, - size_t size, - ICacheInvalidationStrategy icache_invalidation_strategy) { - // Validate the mapping request. - R_UNLESS(this->CanContain(dst_address, size, KMemoryState::AliasCode), - ResultInvalidMemoryRegion); - - // Lock the table. - KScopedLightLock lk(m_general_lock); - - // Verify that the source memory is locked normal heap. - size_t num_src_allocator_blocks{}; - R_TRY(this->CheckMemoryState(std::addressof(num_src_allocator_blocks), src_address, size, - KMemoryState::All, KMemoryState::Normal, KMemoryPermission::None, - KMemoryPermission::None, KMemoryAttribute::All, - KMemoryAttribute::Locked)); - - // Verify that the destination memory is aliasable code. - size_t num_dst_allocator_blocks{}; - R_TRY(this->CheckMemoryStateContiguous( - std::addressof(num_dst_allocator_blocks), dst_address, size, KMemoryState::FlagCanCodeAlias, - KMemoryState::FlagCanCodeAlias, KMemoryPermission::None, KMemoryPermission::None, - KMemoryAttribute::All & ~KMemoryAttribute::PermissionLocked, KMemoryAttribute::None)); - - // Determine whether any pages being unmapped are code. - bool any_code_pages = false; - { - KMemoryBlockManager::const_iterator it = m_memory_block_manager.FindIterator(dst_address); - while (true) { - // Get the memory info. - const KMemoryInfo info = it->GetMemoryInfo(); - - // Check if the memory has code flag. - if ((info.GetState() & KMemoryState::FlagCode) != KMemoryState::None) { - any_code_pages = true; - break; - } - - // Check if we're done. - if (dst_address + size - 1 <= info.GetLastAddress()) { - break; - } - - // Advance. - ++it; - } - } - - // Ensure that we maintain the instruction cache. - bool reprotected_pages = false; - SCOPE_EXIT({ - if (reprotected_pages && any_code_pages) { - if (icache_invalidation_strategy == ICacheInvalidationStrategy::InvalidateRange) { - m_system.InvalidateCpuInstructionCacheRange(GetInteger(dst_address), size); - } else { - m_system.InvalidateCpuInstructionCaches(); - } - } - }); - - // Unmap. - { - // Determine the number of pages being operated on. - const size_t num_pages = size / PageSize; - - // Create an update allocator for the source. - Result src_allocator_result{ResultSuccess}; - KMemoryBlockManagerUpdateAllocator src_allocator(std::addressof(src_allocator_result), - m_memory_block_slab_manager, - num_src_allocator_blocks); - R_TRY(src_allocator_result); - - // Create an update allocator for the destination. - Result dst_allocator_result{ResultSuccess}; - KMemoryBlockManagerUpdateAllocator dst_allocator(std::addressof(dst_allocator_result), - m_memory_block_slab_manager, - num_dst_allocator_blocks); - R_TRY(dst_allocator_result); - - // Unmap the aliased copy of the pages. - R_TRY(Operate(dst_address, num_pages, KMemoryPermission::None, OperationType::Unmap)); - - // Try to set the permissions for the source pages back to what they should be. - R_TRY(Operate(src_address, num_pages, KMemoryPermission::UserReadWrite, - OperationType::ChangePermissions)); - - // Apply the memory block updates. - m_memory_block_manager.Update( - std::addressof(dst_allocator), dst_address, num_pages, KMemoryState::None, - KMemoryPermission::None, KMemoryAttribute::None, - KMemoryBlockDisableMergeAttribute::None, KMemoryBlockDisableMergeAttribute::Normal); - m_memory_block_manager.Update( - std::addressof(src_allocator), src_address, num_pages, KMemoryState::Normal, - KMemoryPermission::UserReadWrite, KMemoryAttribute::None, - KMemoryBlockDisableMergeAttribute::None, KMemoryBlockDisableMergeAttribute::Locked); - - // Note that we reprotected pages. - reprotected_pages = true; - } - - R_SUCCEED(); -} - -KProcessAddress KPageTable::FindFreeArea(KProcessAddress region_start, size_t region_num_pages, - size_t num_pages, size_t alignment, size_t offset, - size_t guard_pages) { - KProcessAddress address = 0; - - if (num_pages <= region_num_pages) { - if (this->IsAslrEnabled()) { - UNIMPLEMENTED(); - } - // Find the first free area. - if (address == 0) { - address = m_memory_block_manager.FindFreeArea(region_start, region_num_pages, num_pages, - alignment, offset, guard_pages); - } - } - - return address; -} - -Result KPageTable::MakePageGroup(KPageGroup& pg, KProcessAddress addr, size_t num_pages) { - ASSERT(this->IsLockedByCurrentThread()); - - const size_t size = num_pages * PageSize; - - // We're making a new group, not adding to an existing one. - R_UNLESS(pg.empty(), ResultInvalidCurrentMemory); - - // Begin traversal. - Common::PageTable::TraversalContext context; - Common::PageTable::TraversalEntry next_entry; - R_UNLESS(m_page_table_impl->BeginTraversal(next_entry, context, GetInteger(addr)), - ResultInvalidCurrentMemory); - - // Prepare tracking variables. - KPhysicalAddress cur_addr = next_entry.phys_addr; - size_t cur_size = next_entry.block_size - (cur_addr & (next_entry.block_size - 1)); - size_t tot_size = cur_size; - - // Iterate, adding to group as we go. - const auto& memory_layout = m_system.Kernel().MemoryLayout(); - while (tot_size < size) { - R_UNLESS(m_page_table_impl->ContinueTraversal(next_entry, context), - ResultInvalidCurrentMemory); - - if (next_entry.phys_addr != (cur_addr + cur_size)) { - const size_t cur_pages = cur_size / PageSize; - - R_UNLESS(IsHeapPhysicalAddress(memory_layout, cur_addr), ResultInvalidCurrentMemory); - R_TRY(pg.AddBlock(cur_addr, cur_pages)); - - cur_addr = next_entry.phys_addr; - cur_size = next_entry.block_size; - } else { - cur_size += next_entry.block_size; - } - - tot_size += next_entry.block_size; - } - - // Ensure we add the right amount for the last block. - if (tot_size > size) { - cur_size -= (tot_size - size); - } - - // Add the last block. - const size_t cur_pages = cur_size / PageSize; - R_UNLESS(IsHeapPhysicalAddress(memory_layout, cur_addr), ResultInvalidCurrentMemory); - R_TRY(pg.AddBlock(cur_addr, cur_pages)); - - R_SUCCEED(); -} - -bool KPageTable::IsValidPageGroup(const KPageGroup& pg, KProcessAddress addr, size_t num_pages) { - ASSERT(this->IsLockedByCurrentThread()); - - const size_t size = num_pages * PageSize; - const auto& memory_layout = m_system.Kernel().MemoryLayout(); - - // Empty groups are necessarily invalid. - if (pg.empty()) { - return false; - } - - // We're going to validate that the group we'd expect is the group we see. - auto cur_it = pg.begin(); - KPhysicalAddress cur_block_address = cur_it->GetAddress(); - size_t cur_block_pages = cur_it->GetNumPages(); - - auto UpdateCurrentIterator = [&]() { - if (cur_block_pages == 0) { - if ((++cur_it) == pg.end()) { - return false; - } - - cur_block_address = cur_it->GetAddress(); - cur_block_pages = cur_it->GetNumPages(); - } - return true; - }; - - // Begin traversal. - Common::PageTable::TraversalContext context; - Common::PageTable::TraversalEntry next_entry; - if (!m_page_table_impl->BeginTraversal(next_entry, context, GetInteger(addr))) { - return false; - } - - // Prepare tracking variables. - KPhysicalAddress cur_addr = next_entry.phys_addr; - size_t cur_size = next_entry.block_size - (cur_addr & (next_entry.block_size - 1)); - size_t tot_size = cur_size; - - // Iterate, comparing expected to actual. - while (tot_size < size) { - if (!m_page_table_impl->ContinueTraversal(next_entry, context)) { - return false; - } - - if (next_entry.phys_addr != (cur_addr + cur_size)) { - const size_t cur_pages = cur_size / PageSize; - - if (!IsHeapPhysicalAddress(memory_layout, cur_addr)) { - return false; - } - - if (!UpdateCurrentIterator()) { - return false; - } - - if (cur_block_address != cur_addr || cur_block_pages < cur_pages) { - return false; - } - - cur_block_address += cur_size; - cur_block_pages -= cur_pages; - cur_addr = next_entry.phys_addr; - cur_size = next_entry.block_size; - } else { - cur_size += next_entry.block_size; - } - - tot_size += next_entry.block_size; - } - - // Ensure we compare the right amount for the last block. - if (tot_size > size) { - cur_size -= (tot_size - size); - } - - if (!IsHeapPhysicalAddress(memory_layout, cur_addr)) { - return false; - } - - if (!UpdateCurrentIterator()) { - return false; - } - - return cur_block_address == cur_addr && cur_block_pages == (cur_size / PageSize); -} - -Result KPageTable::UnmapProcessMemory(KProcessAddress dst_addr, size_t size, - KPageTable& src_page_table, KProcessAddress src_addr) { - // Acquire the table locks. - KScopedLightLockPair lk(src_page_table.m_general_lock, m_general_lock); - - const size_t num_pages{size / PageSize}; - - // Check that the memory is mapped in the destination process. - size_t num_allocator_blocks; - R_TRY(CheckMemoryState(&num_allocator_blocks, dst_addr, size, KMemoryState::All, - KMemoryState::SharedCode, KMemoryPermission::UserReadWrite, - KMemoryPermission::UserReadWrite, KMemoryAttribute::All, - KMemoryAttribute::None)); - - // Check that the memory is mapped in the source process. - R_TRY(src_page_table.CheckMemoryState(src_addr, size, KMemoryState::FlagCanMapProcess, - KMemoryState::FlagCanMapProcess, KMemoryPermission::None, - KMemoryPermission::None, KMemoryAttribute::All, - KMemoryAttribute::None)); - - // Create an update allocator. - Result allocator_result{ResultSuccess}; - KMemoryBlockManagerUpdateAllocator allocator(std::addressof(allocator_result), - m_memory_block_slab_manager, num_allocator_blocks); - R_TRY(allocator_result); - - R_TRY(Operate(dst_addr, num_pages, KMemoryPermission::None, OperationType::Unmap)); - - // Apply the memory block update. - m_memory_block_manager.Update(std::addressof(allocator), dst_addr, num_pages, - KMemoryState::Free, KMemoryPermission::None, - KMemoryAttribute::None, KMemoryBlockDisableMergeAttribute::None, - KMemoryBlockDisableMergeAttribute::Normal); - - m_system.InvalidateCpuInstructionCaches(); - - R_SUCCEED(); -} - -Result KPageTable::SetupForIpcClient(PageLinkedList* page_list, size_t* out_blocks_needed, - KProcessAddress address, size_t size, - KMemoryPermission test_perm, KMemoryState dst_state) { - // Validate pre-conditions. - ASSERT(this->IsLockedByCurrentThread()); - ASSERT(test_perm == KMemoryPermission::UserReadWrite || - test_perm == KMemoryPermission::UserRead); - - // Check that the address is in range. - R_UNLESS(this->Contains(address, size), ResultInvalidCurrentMemory); - - // Get the source permission. - const auto src_perm = (test_perm == KMemoryPermission::UserReadWrite) - ? KMemoryPermission::KernelReadWrite | KMemoryPermission::NotMapped - : KMemoryPermission::UserRead; - - // Get aligned extents. - const KProcessAddress aligned_src_start = Common::AlignDown(GetInteger(address), PageSize); - const KProcessAddress aligned_src_end = Common::AlignUp(GetInteger(address) + size, PageSize); - const KProcessAddress mapping_src_start = Common::AlignUp(GetInteger(address), PageSize); - const KProcessAddress mapping_src_end = Common::AlignDown(GetInteger(address) + size, PageSize); - - const auto aligned_src_last = (aligned_src_end)-1; - const auto mapping_src_last = (mapping_src_end)-1; - - // Get the test state and attribute mask. - KMemoryState test_state; - KMemoryAttribute test_attr_mask; - switch (dst_state) { - case KMemoryState::Ipc: - test_state = KMemoryState::FlagCanUseIpc; - test_attr_mask = - KMemoryAttribute::Uncached | KMemoryAttribute::DeviceShared | KMemoryAttribute::Locked; - break; - case KMemoryState::NonSecureIpc: - test_state = KMemoryState::FlagCanUseNonSecureIpc; - test_attr_mask = KMemoryAttribute::Uncached | KMemoryAttribute::Locked; - break; - case KMemoryState::NonDeviceIpc: - test_state = KMemoryState::FlagCanUseNonDeviceIpc; - test_attr_mask = KMemoryAttribute::Uncached | KMemoryAttribute::Locked; - break; - default: - R_THROW(ResultInvalidCombination); - } - - // Ensure that on failure, we roll back appropriately. - size_t mapped_size = 0; - ON_RESULT_FAILURE { - if (mapped_size > 0) { - this->CleanupForIpcClientOnServerSetupFailure(page_list, mapping_src_start, mapped_size, - src_perm); - } - }; - - size_t blocks_needed = 0; - - // Iterate, mapping as needed. - KMemoryBlockManager::const_iterator it = m_memory_block_manager.FindIterator(aligned_src_start); - while (true) { - const KMemoryInfo info = it->GetMemoryInfo(); - - // Validate the current block. - R_TRY(this->CheckMemoryState(info, test_state, test_state, test_perm, test_perm, - test_attr_mask, KMemoryAttribute::None)); - - if (mapping_src_start < mapping_src_end && (mapping_src_start) < info.GetEndAddress() && - info.GetAddress() < GetInteger(mapping_src_end)) { - const auto cur_start = info.GetAddress() >= GetInteger(mapping_src_start) - ? info.GetAddress() - : (mapping_src_start); - const auto cur_end = mapping_src_last >= info.GetLastAddress() ? info.GetEndAddress() - : (mapping_src_end); - const size_t cur_size = cur_end - cur_start; - - if (info.GetAddress() < GetInteger(mapping_src_start)) { - ++blocks_needed; - } - if (mapping_src_last < info.GetLastAddress()) { - ++blocks_needed; - } - - // Set the permissions on the block, if we need to. - if ((info.GetPermission() & KMemoryPermission::IpcLockChangeMask) != src_perm) { - R_TRY(Operate(cur_start, cur_size / PageSize, src_perm, - OperationType::ChangePermissions)); - } - - // Note that we mapped this part. - mapped_size += cur_size; - } - - // If the block is at the end, we're done. - if (aligned_src_last <= info.GetLastAddress()) { - break; - } - - // Advance. - ++it; - ASSERT(it != m_memory_block_manager.end()); - } - - if (out_blocks_needed != nullptr) { - ASSERT(blocks_needed <= KMemoryBlockManagerUpdateAllocator::MaxBlocks); - *out_blocks_needed = blocks_needed; - } - - R_SUCCEED(); -} - -Result KPageTable::SetupForIpcServer(KProcessAddress* out_addr, size_t size, - KProcessAddress src_addr, KMemoryPermission test_perm, - KMemoryState dst_state, KPageTable& src_page_table, - bool send) { - ASSERT(this->IsLockedByCurrentThread()); - ASSERT(src_page_table.IsLockedByCurrentThread()); - - // Check that we can theoretically map. - const KProcessAddress region_start = m_alias_region_start; - const size_t region_size = m_alias_region_end - m_alias_region_start; - R_UNLESS(size < region_size, ResultOutOfAddressSpace); - - // Get aligned source extents. - const KProcessAddress src_start = src_addr; - const KProcessAddress src_end = src_addr + size; - const KProcessAddress aligned_src_start = Common::AlignDown(GetInteger(src_start), PageSize); - const KProcessAddress aligned_src_end = Common::AlignUp(GetInteger(src_start) + size, PageSize); - const KProcessAddress mapping_src_start = Common::AlignUp(GetInteger(src_start), PageSize); - const KProcessAddress mapping_src_end = - Common::AlignDown(GetInteger(src_start) + size, PageSize); - const size_t aligned_src_size = aligned_src_end - aligned_src_start; - const size_t mapping_src_size = - (mapping_src_start < mapping_src_end) ? (mapping_src_end - mapping_src_start) : 0; - - // Select a random address to map at. - KProcessAddress dst_addr = - this->FindFreeArea(region_start, region_size / PageSize, aligned_src_size / PageSize, - PageSize, 0, this->GetNumGuardPages()); - - R_UNLESS(dst_addr != 0, ResultOutOfAddressSpace); - - // Check that we can perform the operation we're about to perform. - ASSERT(this->CanContain(dst_addr, aligned_src_size, dst_state)); - - // Create an update allocator. - Result allocator_result; - KMemoryBlockManagerUpdateAllocator allocator(std::addressof(allocator_result), - m_memory_block_slab_manager); - R_TRY(allocator_result); - - // We're going to perform an update, so create a helper. - KScopedPageTableUpdater updater(this); - - // Reserve space for any partial pages we allocate. - const size_t unmapped_size = aligned_src_size - mapping_src_size; - KScopedResourceReservation memory_reservation( - m_resource_limit, LimitableResource::PhysicalMemoryMax, unmapped_size); - R_UNLESS(memory_reservation.Succeeded(), ResultLimitReached); - - // Ensure that we manage page references correctly. - KPhysicalAddress start_partial_page = 0; - KPhysicalAddress end_partial_page = 0; - KProcessAddress cur_mapped_addr = dst_addr; - - // If the partial pages are mapped, an extra reference will have been opened. Otherwise, they'll - // free on scope exit. - SCOPE_EXIT({ - if (start_partial_page != 0) { - m_system.Kernel().MemoryManager().Close(start_partial_page, 1); - } - if (end_partial_page != 0) { - m_system.Kernel().MemoryManager().Close(end_partial_page, 1); - } - }); - - ON_RESULT_FAILURE { - if (cur_mapped_addr != dst_addr) { - ASSERT(Operate(dst_addr, (cur_mapped_addr - dst_addr) / PageSize, - KMemoryPermission::None, OperationType::Unmap) - .IsSuccess()); - } - }; - - // Allocate the start page as needed. - if (aligned_src_start < mapping_src_start) { - start_partial_page = - m_system.Kernel().MemoryManager().AllocateAndOpenContinuous(1, 1, m_allocate_option); - R_UNLESS(start_partial_page != 0, ResultOutOfMemory); - } - - // Allocate the end page as needed. - if (mapping_src_end < aligned_src_end && - (aligned_src_start < mapping_src_end || aligned_src_start == mapping_src_start)) { - end_partial_page = - m_system.Kernel().MemoryManager().AllocateAndOpenContinuous(1, 1, m_allocate_option); - R_UNLESS(end_partial_page != 0, ResultOutOfMemory); - } - - // Get the implementation. - auto& src_impl = src_page_table.PageTableImpl(); - - // Get the fill value for partial pages. - const auto fill_val = m_ipc_fill_value; - - // Begin traversal. - Common::PageTable::TraversalContext context; - Common::PageTable::TraversalEntry next_entry; - bool traverse_valid = - src_impl.BeginTraversal(next_entry, context, GetInteger(aligned_src_start)); - ASSERT(traverse_valid); - - // Prepare tracking variables. - KPhysicalAddress cur_block_addr = next_entry.phys_addr; - size_t cur_block_size = - next_entry.block_size - ((cur_block_addr) & (next_entry.block_size - 1)); - size_t tot_block_size = cur_block_size; - - // Map the start page, if we have one. - if (start_partial_page != 0) { - // Ensure the page holds correct data. - const KVirtualAddress start_partial_virt = - GetHeapVirtualAddress(m_system.Kernel().MemoryLayout(), start_partial_page); - if (send) { - const size_t partial_offset = src_start - aligned_src_start; - size_t copy_size, clear_size; - if (src_end < mapping_src_start) { - copy_size = size; - clear_size = mapping_src_start - src_end; - } else { - copy_size = mapping_src_start - src_start; - clear_size = 0; - } - - std::memset(m_memory->GetPointer(GetInteger(start_partial_virt)), fill_val, - partial_offset); - std::memcpy( - m_memory->GetPointer(GetInteger(start_partial_virt) + partial_offset), - m_memory->GetPointer(GetInteger(GetHeapVirtualAddress( - m_system.Kernel().MemoryLayout(), cur_block_addr)) + - partial_offset), - copy_size); - if (clear_size > 0) { - std::memset(m_memory->GetPointer(GetInteger(start_partial_virt) + - partial_offset + copy_size), - fill_val, clear_size); - } - } else { - std::memset(m_memory->GetPointer(GetInteger(start_partial_virt)), fill_val, - PageSize); - } - - // Map the page. - R_TRY(Operate(cur_mapped_addr, 1, test_perm, OperationType::Map, start_partial_page)); - - // Update tracking extents. - cur_mapped_addr += PageSize; - cur_block_addr += PageSize; - cur_block_size -= PageSize; - - // If the block's size was one page, we may need to continue traversal. - if (cur_block_size == 0 && aligned_src_size > PageSize) { - traverse_valid = src_impl.ContinueTraversal(next_entry, context); - ASSERT(traverse_valid); - - cur_block_addr = next_entry.phys_addr; - cur_block_size = next_entry.block_size; - tot_block_size += next_entry.block_size; - } - } - - // Map the remaining pages. - while (aligned_src_start + tot_block_size < mapping_src_end) { - // Continue the traversal. - traverse_valid = src_impl.ContinueTraversal(next_entry, context); - ASSERT(traverse_valid); - - // Process the block. - if (next_entry.phys_addr != cur_block_addr + cur_block_size) { - // Map the block we've been processing so far. - R_TRY(Operate(cur_mapped_addr, cur_block_size / PageSize, test_perm, OperationType::Map, - cur_block_addr)); - - // Update tracking extents. - cur_mapped_addr += cur_block_size; - cur_block_addr = next_entry.phys_addr; - cur_block_size = next_entry.block_size; - } else { - cur_block_size += next_entry.block_size; - } - tot_block_size += next_entry.block_size; - } - - // Handle the last direct-mapped page. - if (const KProcessAddress mapped_block_end = - aligned_src_start + tot_block_size - cur_block_size; - mapped_block_end < mapping_src_end) { - const size_t last_block_size = mapping_src_end - mapped_block_end; - - // Map the last block. - R_TRY(Operate(cur_mapped_addr, last_block_size / PageSize, test_perm, OperationType::Map, - cur_block_addr)); - - // Update tracking extents. - cur_mapped_addr += last_block_size; - cur_block_addr += last_block_size; - if (mapped_block_end + cur_block_size < aligned_src_end && - cur_block_size == last_block_size) { - traverse_valid = src_impl.ContinueTraversal(next_entry, context); - ASSERT(traverse_valid); - - cur_block_addr = next_entry.phys_addr; - } - } - - // Map the end page, if we have one. - if (end_partial_page != 0) { - // Ensure the page holds correct data. - const KVirtualAddress end_partial_virt = - GetHeapVirtualAddress(m_system.Kernel().MemoryLayout(), end_partial_page); - if (send) { - const size_t copy_size = src_end - mapping_src_end; - std::memcpy(m_memory->GetPointer(GetInteger(end_partial_virt)), - m_memory->GetPointer(GetInteger(GetHeapVirtualAddress( - m_system.Kernel().MemoryLayout(), cur_block_addr))), - copy_size); - std::memset(m_memory->GetPointer(GetInteger(end_partial_virt) + copy_size), - fill_val, PageSize - copy_size); - } else { - std::memset(m_memory->GetPointer(GetInteger(end_partial_virt)), fill_val, - PageSize); - } - - // Map the page. - R_TRY(Operate(cur_mapped_addr, 1, test_perm, OperationType::Map, end_partial_page)); - } - - // Update memory blocks to reflect our changes - m_memory_block_manager.Update(std::addressof(allocator), dst_addr, aligned_src_size / PageSize, - dst_state, test_perm, KMemoryAttribute::None, - KMemoryBlockDisableMergeAttribute::Normal, - KMemoryBlockDisableMergeAttribute::None); - - // Set the output address. - *out_addr = dst_addr + (src_start - aligned_src_start); - - // We succeeded. - memory_reservation.Commit(); - R_SUCCEED(); -} - -Result KPageTable::SetupForIpc(KProcessAddress* out_dst_addr, size_t size, KProcessAddress src_addr, - KPageTable& src_page_table, KMemoryPermission test_perm, - KMemoryState dst_state, bool send) { - // For convenience, alias this. - KPageTable& dst_page_table = *this; - - // Acquire the table locks. - KScopedLightLockPair lk(src_page_table.m_general_lock, dst_page_table.m_general_lock); - - // We're going to perform an update, so create a helper. - KScopedPageTableUpdater updater(std::addressof(src_page_table)); - - // Perform client setup. - size_t num_allocator_blocks; - R_TRY(src_page_table.SetupForIpcClient(updater.GetPageList(), - std::addressof(num_allocator_blocks), src_addr, size, - test_perm, dst_state)); - - // Create an update allocator. - Result allocator_result; - KMemoryBlockManagerUpdateAllocator allocator(std::addressof(allocator_result), - src_page_table.m_memory_block_slab_manager, - num_allocator_blocks); - R_TRY(allocator_result); - - // Get the mapped extents. - const KProcessAddress src_map_start = Common::AlignUp(GetInteger(src_addr), PageSize); - const KProcessAddress src_map_end = Common::AlignDown(GetInteger(src_addr) + size, PageSize); - const size_t src_map_size = src_map_end - src_map_start; - - // Ensure that we clean up appropriately if we fail after this. - const auto src_perm = (test_perm == KMemoryPermission::UserReadWrite) - ? KMemoryPermission::KernelReadWrite | KMemoryPermission::NotMapped - : KMemoryPermission::UserRead; - ON_RESULT_FAILURE { - if (src_map_end > src_map_start) { - src_page_table.CleanupForIpcClientOnServerSetupFailure( - updater.GetPageList(), src_map_start, src_map_size, src_perm); - } - }; - - // Perform server setup. - R_TRY(dst_page_table.SetupForIpcServer(out_dst_addr, size, src_addr, test_perm, dst_state, - src_page_table, send)); - - // If anything was mapped, ipc-lock the pages. - if (src_map_start < src_map_end) { - // Get the source permission. - src_page_table.m_memory_block_manager.UpdateLock(std::addressof(allocator), src_map_start, - (src_map_end - src_map_start) / PageSize, - &KMemoryBlock::LockForIpc, src_perm); - } - - R_SUCCEED(); -} - -Result KPageTable::CleanupForIpcServer(KProcessAddress address, size_t size, - KMemoryState dst_state) { - // Validate the address. - R_UNLESS(this->Contains(address, size), ResultInvalidCurrentMemory); - - // Lock the table. - KScopedLightLock lk(m_general_lock); - - // Validate the memory state. - size_t num_allocator_blocks; - R_TRY(this->CheckMemoryState(std::addressof(num_allocator_blocks), address, size, - KMemoryState::All, dst_state, KMemoryPermission::UserRead, - KMemoryPermission::UserRead, KMemoryAttribute::All, - KMemoryAttribute::None)); - - // Create an update allocator. - Result allocator_result; - KMemoryBlockManagerUpdateAllocator allocator(std::addressof(allocator_result), - m_memory_block_slab_manager, num_allocator_blocks); - R_TRY(allocator_result); - - // We're going to perform an update, so create a helper. - KScopedPageTableUpdater updater(this); - - // Get aligned extents. - const KProcessAddress aligned_start = Common::AlignDown(GetInteger(address), PageSize); - const KProcessAddress aligned_end = Common::AlignUp(GetInteger(address) + size, PageSize); - const size_t aligned_size = aligned_end - aligned_start; - const size_t aligned_num_pages = aligned_size / PageSize; - - // Unmap the pages. - R_TRY(Operate(aligned_start, aligned_num_pages, KMemoryPermission::None, OperationType::Unmap)); - - // Update memory blocks. - m_memory_block_manager.Update(std::addressof(allocator), aligned_start, aligned_num_pages, - KMemoryState::None, KMemoryPermission::None, - KMemoryAttribute::None, KMemoryBlockDisableMergeAttribute::None, - KMemoryBlockDisableMergeAttribute::Normal); - - // Release from the resource limit as relevant. - const KProcessAddress mapping_start = Common::AlignUp(GetInteger(address), PageSize); - const KProcessAddress mapping_end = Common::AlignDown(GetInteger(address) + size, PageSize); - const size_t mapping_size = (mapping_start < mapping_end) ? mapping_end - mapping_start : 0; - m_resource_limit->Release(LimitableResource::PhysicalMemoryMax, aligned_size - mapping_size); - - R_SUCCEED(); -} - -Result KPageTable::CleanupForIpcClient(KProcessAddress address, size_t size, - KMemoryState dst_state) { - // Validate the address. - R_UNLESS(this->Contains(address, size), ResultInvalidCurrentMemory); - - // Get aligned source extents. - const KProcessAddress mapping_start = Common::AlignUp(GetInteger(address), PageSize); - const KProcessAddress mapping_end = Common::AlignDown(GetInteger(address) + size, PageSize); - const KProcessAddress mapping_last = mapping_end - 1; - const size_t mapping_size = (mapping_start < mapping_end) ? (mapping_end - mapping_start) : 0; - - // If nothing was mapped, we're actually done immediately. - R_SUCCEED_IF(mapping_size == 0); - - // Get the test state and attribute mask. - KMemoryState test_state; - KMemoryAttribute test_attr_mask; - switch (dst_state) { - case KMemoryState::Ipc: - test_state = KMemoryState::FlagCanUseIpc; - test_attr_mask = - KMemoryAttribute::Uncached | KMemoryAttribute::DeviceShared | KMemoryAttribute::Locked; - break; - case KMemoryState::NonSecureIpc: - test_state = KMemoryState::FlagCanUseNonSecureIpc; - test_attr_mask = KMemoryAttribute::Uncached | KMemoryAttribute::Locked; - break; - case KMemoryState::NonDeviceIpc: - test_state = KMemoryState::FlagCanUseNonDeviceIpc; - test_attr_mask = KMemoryAttribute::Uncached | KMemoryAttribute::Locked; - break; - default: - R_THROW(ResultInvalidCombination); - } - - // Lock the table. - // NOTE: Nintendo does this *after* creating the updater below, but this does not follow - // convention elsewhere in KPageTable. - KScopedLightLock lk(m_general_lock); - - // We're going to perform an update, so create a helper. - KScopedPageTableUpdater updater(this); - - // Ensure that on failure, we roll back appropriately. - size_t mapped_size = 0; - ON_RESULT_FAILURE { - if (mapped_size > 0) { - // Determine where the mapping ends. - const auto mapped_end = (mapping_start) + mapped_size; - const auto mapped_last = mapped_end - 1; - - // Get current and next iterators. - KMemoryBlockManager::const_iterator start_it = - m_memory_block_manager.FindIterator(mapping_start); - KMemoryBlockManager::const_iterator next_it = start_it; - ++next_it; - - // Get the current block info. - KMemoryInfo cur_info = start_it->GetMemoryInfo(); - - // Create tracking variables. - KProcessAddress cur_address = cur_info.GetAddress(); - size_t cur_size = cur_info.GetSize(); - bool cur_perm_eq = cur_info.GetPermission() == cur_info.GetOriginalPermission(); - bool cur_needs_set_perm = !cur_perm_eq && cur_info.GetIpcLockCount() == 1; - bool first = - cur_info.GetIpcDisableMergeCount() == 1 && - (cur_info.GetDisableMergeAttribute() & KMemoryBlockDisableMergeAttribute::Locked) == - KMemoryBlockDisableMergeAttribute::None; - - while (((cur_address) + cur_size - 1) < mapped_last) { - // Check that we have a next block. - ASSERT(next_it != m_memory_block_manager.end()); - - // Get the next info. - const KMemoryInfo next_info = next_it->GetMemoryInfo(); - - // Check if we can consolidate the next block's permission set with the current one. - - const bool next_perm_eq = - next_info.GetPermission() == next_info.GetOriginalPermission(); - const bool next_needs_set_perm = !next_perm_eq && next_info.GetIpcLockCount() == 1; - if (cur_perm_eq == next_perm_eq && cur_needs_set_perm == next_needs_set_perm && - cur_info.GetOriginalPermission() == next_info.GetOriginalPermission()) { - // We can consolidate the reprotection for the current and next block into a - // single call. - cur_size += next_info.GetSize(); - } else { - // We have to operate on the current block. - if ((cur_needs_set_perm || first) && !cur_perm_eq) { - ASSERT(Operate(cur_address, cur_size / PageSize, cur_info.GetPermission(), - OperationType::ChangePermissions) - .IsSuccess()); - } - - // Advance. - cur_address = next_info.GetAddress(); - cur_size = next_info.GetSize(); - first = false; - } - - // Advance. - cur_info = next_info; - cur_perm_eq = next_perm_eq; - cur_needs_set_perm = next_needs_set_perm; - ++next_it; - } - - // Process the last block. - if ((first || cur_needs_set_perm) && !cur_perm_eq) { - ASSERT(Operate(cur_address, cur_size / PageSize, cur_info.GetPermission(), - OperationType::ChangePermissions) - .IsSuccess()); - } - } - }; - - // Iterate, reprotecting as needed. - { - // Get current and next iterators. - KMemoryBlockManager::const_iterator start_it = - m_memory_block_manager.FindIterator(mapping_start); - KMemoryBlockManager::const_iterator next_it = start_it; - ++next_it; - - // Validate the current block. - KMemoryInfo cur_info = start_it->GetMemoryInfo(); - ASSERT(this->CheckMemoryState(cur_info, test_state, test_state, KMemoryPermission::None, - KMemoryPermission::None, - test_attr_mask | KMemoryAttribute::IpcLocked, - KMemoryAttribute::IpcLocked) - .IsSuccess()); - - // Create tracking variables. - KProcessAddress cur_address = cur_info.GetAddress(); - size_t cur_size = cur_info.GetSize(); - bool cur_perm_eq = cur_info.GetPermission() == cur_info.GetOriginalPermission(); - bool cur_needs_set_perm = !cur_perm_eq && cur_info.GetIpcLockCount() == 1; - bool first = - cur_info.GetIpcDisableMergeCount() == 1 && - (cur_info.GetDisableMergeAttribute() & KMemoryBlockDisableMergeAttribute::Locked) == - KMemoryBlockDisableMergeAttribute::None; - - while ((cur_address + cur_size - 1) < mapping_last) { - // Check that we have a next block. - ASSERT(next_it != m_memory_block_manager.end()); - - // Get the next info. - const KMemoryInfo next_info = next_it->GetMemoryInfo(); - - // Validate the next block. - ASSERT(this->CheckMemoryState(next_info, test_state, test_state, - KMemoryPermission::None, KMemoryPermission::None, - test_attr_mask | KMemoryAttribute::IpcLocked, - KMemoryAttribute::IpcLocked) - .IsSuccess()); - - // Check if we can consolidate the next block's permission set with the current one. - const bool next_perm_eq = - next_info.GetPermission() == next_info.GetOriginalPermission(); - const bool next_needs_set_perm = !next_perm_eq && next_info.GetIpcLockCount() == 1; - if (cur_perm_eq == next_perm_eq && cur_needs_set_perm == next_needs_set_perm && - cur_info.GetOriginalPermission() == next_info.GetOriginalPermission()) { - // We can consolidate the reprotection for the current and next block into a single - // call. - cur_size += next_info.GetSize(); - } else { - // We have to operate on the current block. - if ((cur_needs_set_perm || first) && !cur_perm_eq) { - R_TRY(Operate(cur_address, cur_size / PageSize, - cur_needs_set_perm ? cur_info.GetOriginalPermission() - : cur_info.GetPermission(), - OperationType::ChangePermissions)); - } - - // Mark that we mapped the block. - mapped_size += cur_size; - - // Advance. - cur_address = next_info.GetAddress(); - cur_size = next_info.GetSize(); - first = false; - } - - // Advance. - cur_info = next_info; - cur_perm_eq = next_perm_eq; - cur_needs_set_perm = next_needs_set_perm; - ++next_it; - } - - // Process the last block. - const auto lock_count = - cur_info.GetIpcLockCount() + - (next_it != m_memory_block_manager.end() - ? (next_it->GetIpcDisableMergeCount() - next_it->GetIpcLockCount()) - : 0); - if ((first || cur_needs_set_perm || (lock_count == 1)) && !cur_perm_eq) { - R_TRY(Operate(cur_address, cur_size / PageSize, - cur_needs_set_perm ? cur_info.GetOriginalPermission() - : cur_info.GetPermission(), - OperationType::ChangePermissions)); - } - } - - // Create an update allocator. - // NOTE: Guaranteed zero blocks needed here. - Result allocator_result; - KMemoryBlockManagerUpdateAllocator allocator(std::addressof(allocator_result), - m_memory_block_slab_manager, 0); - R_TRY(allocator_result); - - // Unlock the pages. - m_memory_block_manager.UpdateLock(std::addressof(allocator), mapping_start, - mapping_size / PageSize, &KMemoryBlock::UnlockForIpc, - KMemoryPermission::None); - - R_SUCCEED(); -} - -void KPageTable::CleanupForIpcClientOnServerSetupFailure([[maybe_unused]] PageLinkedList* page_list, - KProcessAddress address, size_t size, - KMemoryPermission prot_perm) { - ASSERT(this->IsLockedByCurrentThread()); - ASSERT(Common::IsAligned(GetInteger(address), PageSize)); - ASSERT(Common::IsAligned(size, PageSize)); - - // Get the mapped extents. - const KProcessAddress src_map_start = address; - const KProcessAddress src_map_end = address + size; - const KProcessAddress src_map_last = src_map_end - 1; - - // This function is only invoked when there's something to do. - ASSERT(src_map_end > src_map_start); - - // Iterate over blocks, fixing permissions. - KMemoryBlockManager::const_iterator it = m_memory_block_manager.FindIterator(address); - while (true) { - const KMemoryInfo info = it->GetMemoryInfo(); - - const auto cur_start = info.GetAddress() >= GetInteger(src_map_start) - ? info.GetAddress() - : GetInteger(src_map_start); - const auto cur_end = - src_map_last <= info.GetLastAddress() ? src_map_end : info.GetEndAddress(); - - // If we can, fix the protections on the block. - if ((info.GetIpcLockCount() == 0 && - (info.GetPermission() & KMemoryPermission::IpcLockChangeMask) != prot_perm) || - (info.GetIpcLockCount() != 0 && - (info.GetOriginalPermission() & KMemoryPermission::IpcLockChangeMask) != prot_perm)) { - // Check if we actually need to fix the protections on the block. - if (cur_end == src_map_end || info.GetAddress() <= GetInteger(src_map_start) || - (info.GetPermission() & KMemoryPermission::IpcLockChangeMask) != prot_perm) { - ASSERT(Operate(cur_start, (cur_end - cur_start) / PageSize, info.GetPermission(), - OperationType::ChangePermissions) - .IsSuccess()); - } - } - - // If we're past the end of the region, we're done. - if (src_map_last <= info.GetLastAddress()) { - break; - } - - // Advance. - ++it; - ASSERT(it != m_memory_block_manager.end()); - } -} - -Result KPageTable::MapPhysicalMemory(KProcessAddress address, size_t size) { - // Lock the physical memory lock. - KScopedLightLock phys_lk(m_map_physical_memory_lock); - - // Calculate the last address for convenience. - const KProcessAddress last_address = address + size - 1; - - // Define iteration variables. - KProcessAddress cur_address; - size_t mapped_size; - - // The entire mapping process can be retried. - while (true) { - // Check if the memory is already mapped. - { - // Lock the table. - KScopedLightLock lk(m_general_lock); - - // Iterate over the memory. - cur_address = address; - mapped_size = 0; - - auto it = m_memory_block_manager.FindIterator(cur_address); - while (true) { - // Check that the iterator is valid. - ASSERT(it != m_memory_block_manager.end()); - - // Get the memory info. - const KMemoryInfo info = it->GetMemoryInfo(); - - // Check if we're done. - if (last_address <= info.GetLastAddress()) { - if (info.GetState() != KMemoryState::Free) { - mapped_size += (last_address + 1 - cur_address); - } - break; - } - - // Track the memory if it's mapped. - if (info.GetState() != KMemoryState::Free) { - mapped_size += KProcessAddress(info.GetEndAddress()) - cur_address; - } - - // Advance. - cur_address = info.GetEndAddress(); - ++it; - } - - // If the size mapped is the size requested, we've nothing to do. - R_SUCCEED_IF(size == mapped_size); - } - - // Allocate and map the memory. - { - // Reserve the memory from the process resource limit. - KScopedResourceReservation memory_reservation( - m_resource_limit, LimitableResource::PhysicalMemoryMax, size - mapped_size); - R_UNLESS(memory_reservation.Succeeded(), ResultLimitReached); - - // Allocate pages for the new memory. - KPageGroup pg{m_kernel, m_block_info_manager}; - R_TRY(m_system.Kernel().MemoryManager().AllocateForProcess( - &pg, (size - mapped_size) / PageSize, m_allocate_option, 0, 0)); - - // If we fail in the next bit (or retry), we need to cleanup the pages. - // auto pg_guard = SCOPE_GUARD { - // pg.OpenFirst(); - // pg.Close(); - //}; - - // Map the memory. - { - // Lock the table. - KScopedLightLock lk(m_general_lock); - - size_t num_allocator_blocks = 0; - - // Verify that nobody has mapped memory since we first checked. - { - // Iterate over the memory. - size_t checked_mapped_size = 0; - cur_address = address; - - auto it = m_memory_block_manager.FindIterator(cur_address); - while (true) { - // Check that the iterator is valid. - ASSERT(it != m_memory_block_manager.end()); - - // Get the memory info. - const KMemoryInfo info = it->GetMemoryInfo(); - - const bool is_free = info.GetState() == KMemoryState::Free; - if (is_free) { - if (info.GetAddress() < GetInteger(address)) { - ++num_allocator_blocks; - } - if (last_address < info.GetLastAddress()) { - ++num_allocator_blocks; - } - } - - // Check if we're done. - if (last_address <= info.GetLastAddress()) { - if (!is_free) { - checked_mapped_size += (last_address + 1 - cur_address); - } - break; - } - - // Track the memory if it's mapped. - if (!is_free) { - checked_mapped_size += - KProcessAddress(info.GetEndAddress()) - cur_address; - } - - // Advance. - cur_address = info.GetEndAddress(); - ++it; - } - - // If the size now isn't what it was before, somebody mapped or unmapped - // concurrently. If this happened, retry. - if (mapped_size != checked_mapped_size) { - continue; - } - } - - // Create an update allocator. - ASSERT(num_allocator_blocks <= KMemoryBlockManagerUpdateAllocator::MaxBlocks); - Result allocator_result; - KMemoryBlockManagerUpdateAllocator allocator(std::addressof(allocator_result), - m_memory_block_slab_manager, - num_allocator_blocks); - R_TRY(allocator_result); - - // We're going to perform an update, so create a helper. - KScopedPageTableUpdater updater(this); - - // Prepare to iterate over the memory. - auto pg_it = pg.begin(); - KPhysicalAddress pg_phys_addr = pg_it->GetAddress(); - size_t pg_pages = pg_it->GetNumPages(); - - // Reset the current tracking address, and make sure we clean up on failure. - // pg_guard.Cancel(); - cur_address = address; - ON_RESULT_FAILURE { - if (cur_address > address) { - const KProcessAddress last_unmap_address = cur_address - 1; - - // Iterate, unmapping the pages. - cur_address = address; - - auto it = m_memory_block_manager.FindIterator(cur_address); - while (true) { - // Check that the iterator is valid. - ASSERT(it != m_memory_block_manager.end()); - - // Get the memory info. - const KMemoryInfo info = it->GetMemoryInfo(); - - // If the memory state is free, we mapped it and need to unmap it. - if (info.GetState() == KMemoryState::Free) { - // Determine the range to unmap. - const size_t cur_pages = - std::min(KProcessAddress(info.GetEndAddress()) - cur_address, - last_unmap_address + 1 - cur_address) / - PageSize; - - // Unmap. - ASSERT(Operate(cur_address, cur_pages, KMemoryPermission::None, - OperationType::Unmap) - .IsSuccess()); - } - - // Check if we're done. - if (last_unmap_address <= info.GetLastAddress()) { - break; - } - - // Advance. - cur_address = info.GetEndAddress(); - ++it; - } - } - - // Release any remaining unmapped memory. - m_system.Kernel().MemoryManager().OpenFirst(pg_phys_addr, pg_pages); - m_system.Kernel().MemoryManager().Close(pg_phys_addr, pg_pages); - for (++pg_it; pg_it != pg.end(); ++pg_it) { - m_system.Kernel().MemoryManager().OpenFirst(pg_it->GetAddress(), - pg_it->GetNumPages()); - m_system.Kernel().MemoryManager().Close(pg_it->GetAddress(), - pg_it->GetNumPages()); - } - }; - - auto it = m_memory_block_manager.FindIterator(cur_address); - while (true) { - // Check that the iterator is valid. - ASSERT(it != m_memory_block_manager.end()); - - // Get the memory info. - const KMemoryInfo info = it->GetMemoryInfo(); - - // If it's unmapped, we need to map it. - if (info.GetState() == KMemoryState::Free) { - // Determine the range to map. - size_t map_pages = - std::min(KProcessAddress(info.GetEndAddress()) - cur_address, - last_address + 1 - cur_address) / - PageSize; - - // While we have pages to map, map them. - { - // Create a page group for the current mapping range. - KPageGroup cur_pg(m_kernel, m_block_info_manager); - { - ON_RESULT_FAILURE_2 { - cur_pg.OpenFirst(); - cur_pg.Close(); - }; - - size_t remain_pages = map_pages; - while (remain_pages > 0) { - // Check if we're at the end of the physical block. - if (pg_pages == 0) { - // Ensure there are more pages to map. - ASSERT(pg_it != pg.end()); - - // Advance our physical block. - ++pg_it; - pg_phys_addr = pg_it->GetAddress(); - pg_pages = pg_it->GetNumPages(); - } - - // Add whatever we can to the current block. - const size_t cur_pages = std::min(pg_pages, remain_pages); - R_TRY(cur_pg.AddBlock(pg_phys_addr + - ((pg_pages - cur_pages) * PageSize), - cur_pages)); - - // Advance. - remain_pages -= cur_pages; - pg_pages -= cur_pages; - } - } - - // Map the pages. - R_TRY(this->Operate(cur_address, map_pages, cur_pg, - OperationType::MapFirstGroup)); - } - } - - // Check if we're done. - if (last_address <= info.GetLastAddress()) { - break; - } - - // Advance. - cur_address = info.GetEndAddress(); - ++it; - } - - // We succeeded, so commit the memory reservation. - memory_reservation.Commit(); - - // Increase our tracked mapped size. - m_mapped_physical_memory_size += (size - mapped_size); - - // Update the relevant memory blocks. - m_memory_block_manager.UpdateIfMatch( - std::addressof(allocator), address, size / PageSize, KMemoryState::Free, - KMemoryPermission::None, KMemoryAttribute::None, KMemoryState::Normal, - KMemoryPermission::UserReadWrite, KMemoryAttribute::None, - address == this->GetAliasRegionStart() - ? KMemoryBlockDisableMergeAttribute::Normal - : KMemoryBlockDisableMergeAttribute::None, - KMemoryBlockDisableMergeAttribute::None); - - R_SUCCEED(); - } - } - } -} - -Result KPageTable::UnmapPhysicalMemory(KProcessAddress address, size_t size) { - // Lock the physical memory lock. - KScopedLightLock phys_lk(m_map_physical_memory_lock); - - // Lock the table. - KScopedLightLock lk(m_general_lock); - - // Calculate the last address for convenience. - const KProcessAddress last_address = address + size - 1; - - // Define iteration variables. - KProcessAddress map_start_address = 0; - KProcessAddress map_last_address = 0; - - KProcessAddress cur_address; - size_t mapped_size; - size_t num_allocator_blocks = 0; - - // Check if the memory is mapped. - { - // Iterate over the memory. - cur_address = address; - mapped_size = 0; - - auto it = m_memory_block_manager.FindIterator(cur_address); - while (true) { - // Check that the iterator is valid. - ASSERT(it != m_memory_block_manager.end()); - - // Get the memory info. - const KMemoryInfo info = it->GetMemoryInfo(); - - // Verify the memory's state. - const bool is_normal = info.GetState() == KMemoryState::Normal && - info.GetAttribute() == KMemoryAttribute::None; - const bool is_free = info.GetState() == KMemoryState::Free; - R_UNLESS(is_normal || is_free, ResultInvalidCurrentMemory); - - if (is_normal) { - R_UNLESS(info.GetAttribute() == KMemoryAttribute::None, ResultInvalidCurrentMemory); - - if (map_start_address == 0) { - map_start_address = cur_address; - } - map_last_address = - (last_address >= info.GetLastAddress()) ? info.GetLastAddress() : last_address; - - if (info.GetAddress() < GetInteger(address)) { - ++num_allocator_blocks; - } - if (last_address < info.GetLastAddress()) { - ++num_allocator_blocks; - } - - mapped_size += (map_last_address + 1 - cur_address); - } - - // Check if we're done. - if (last_address <= info.GetLastAddress()) { - break; - } - - // Advance. - cur_address = info.GetEndAddress(); - ++it; - } - - // If there's nothing mapped, we've nothing to do. - R_SUCCEED_IF(mapped_size == 0); - } - - // Create an update allocator. - ASSERT(num_allocator_blocks <= KMemoryBlockManagerUpdateAllocator::MaxBlocks); - Result allocator_result; - KMemoryBlockManagerUpdateAllocator allocator(std::addressof(allocator_result), - m_memory_block_slab_manager, num_allocator_blocks); - R_TRY(allocator_result); - - // We're going to perform an update, so create a helper. - KScopedPageTableUpdater updater(this); - - // Separate the mapping. - R_TRY(Operate(map_start_address, (map_last_address + 1 - map_start_address) / PageSize, - KMemoryPermission::None, OperationType::Separate)); - - // Reset the current tracking address, and make sure we clean up on failure. - cur_address = address; - - // Iterate over the memory, unmapping as we go. - auto it = m_memory_block_manager.FindIterator(cur_address); - - const auto clear_merge_attr = - (it->GetState() == KMemoryState::Normal && - it->GetAddress() == this->GetAliasRegionStart() && it->GetAddress() == address) - ? KMemoryBlockDisableMergeAttribute::Normal - : KMemoryBlockDisableMergeAttribute::None; - - while (true) { - // Check that the iterator is valid. - ASSERT(it != m_memory_block_manager.end()); - - // Get the memory info. - const KMemoryInfo info = it->GetMemoryInfo(); - - // If the memory state is normal, we need to unmap it. - if (info.GetState() == KMemoryState::Normal) { - // Determine the range to unmap. - const size_t cur_pages = std::min(KProcessAddress(info.GetEndAddress()) - cur_address, - last_address + 1 - cur_address) / - PageSize; - - // Unmap. - ASSERT(Operate(cur_address, cur_pages, KMemoryPermission::None, OperationType::Unmap) - .IsSuccess()); - } - - // Check if we're done. - if (last_address <= info.GetLastAddress()) { - break; - } - - // Advance. - cur_address = info.GetEndAddress(); - ++it; - } - - // Release the memory resource. - m_mapped_physical_memory_size -= mapped_size; - m_resource_limit->Release(LimitableResource::PhysicalMemoryMax, mapped_size); - - // Update memory blocks. - m_memory_block_manager.Update(std::addressof(allocator), address, size / PageSize, - KMemoryState::Free, KMemoryPermission::None, - KMemoryAttribute::None, KMemoryBlockDisableMergeAttribute::None, - clear_merge_attr); - - // We succeeded. - R_SUCCEED(); -} - -Result KPageTable::MapMemory(KProcessAddress dst_address, KProcessAddress src_address, - size_t size) { - // Lock the table. - KScopedLightLock lk(m_general_lock); - - // Validate that the source address's state is valid. - KMemoryState src_state; - size_t num_src_allocator_blocks; - R_TRY(this->CheckMemoryState(std::addressof(src_state), nullptr, nullptr, - std::addressof(num_src_allocator_blocks), src_address, size, - KMemoryState::FlagCanAlias, KMemoryState::FlagCanAlias, - KMemoryPermission::All, KMemoryPermission::UserReadWrite, - KMemoryAttribute::All, KMemoryAttribute::None)); - - // Validate that the dst address's state is valid. - size_t num_dst_allocator_blocks; - R_TRY(this->CheckMemoryState(std::addressof(num_dst_allocator_blocks), dst_address, size, - KMemoryState::All, KMemoryState::Free, KMemoryPermission::None, - KMemoryPermission::None, KMemoryAttribute::None, - KMemoryAttribute::None)); - - // Create an update allocator for the source. - Result src_allocator_result; - KMemoryBlockManagerUpdateAllocator src_allocator(std::addressof(src_allocator_result), - m_memory_block_slab_manager, - num_src_allocator_blocks); - R_TRY(src_allocator_result); - - // Create an update allocator for the destination. - Result dst_allocator_result; - KMemoryBlockManagerUpdateAllocator dst_allocator(std::addressof(dst_allocator_result), - m_memory_block_slab_manager, - num_dst_allocator_blocks); - R_TRY(dst_allocator_result); - - // Map the memory. - { - // Determine the number of pages being operated on. - const size_t num_pages = size / PageSize; - - // Create page groups for the memory being unmapped. - KPageGroup pg{m_kernel, m_block_info_manager}; - - // Create the page group representing the source. - R_TRY(this->MakePageGroup(pg, src_address, num_pages)); - - // We're going to perform an update, so create a helper. - KScopedPageTableUpdater updater(this); - - // Reprotect the source as kernel-read/not mapped. - const KMemoryPermission new_src_perm = static_cast( - KMemoryPermission::KernelRead | KMemoryPermission::NotMapped); - const KMemoryAttribute new_src_attr = KMemoryAttribute::Locked; - const KPageProperties src_properties = {new_src_perm, false, false, - DisableMergeAttribute::DisableHeadBodyTail}; - R_TRY(this->Operate(src_address, num_pages, src_properties.perm, - OperationType::ChangePermissions)); - - // Ensure that we unprotect the source pages on failure. - ON_RESULT_FAILURE { - const KPageProperties unprotect_properties = { - KMemoryPermission::UserReadWrite, false, false, - DisableMergeAttribute::EnableHeadBodyTail}; - ASSERT(this->Operate(src_address, num_pages, unprotect_properties.perm, - OperationType::ChangePermissions) == ResultSuccess); - }; - - // Map the alias pages. - const KPageProperties dst_map_properties = {KMemoryPermission::UserReadWrite, false, false, - DisableMergeAttribute::DisableHead}; - R_TRY(this->MapPageGroupImpl(updater.GetPageList(), dst_address, pg, dst_map_properties, - false)); - - // Apply the memory block updates. - m_memory_block_manager.Update(std::addressof(src_allocator), src_address, num_pages, - src_state, new_src_perm, new_src_attr, - KMemoryBlockDisableMergeAttribute::Locked, - KMemoryBlockDisableMergeAttribute::None); - m_memory_block_manager.Update( - std::addressof(dst_allocator), dst_address, num_pages, KMemoryState::Stack, - KMemoryPermission::UserReadWrite, KMemoryAttribute::None, - KMemoryBlockDisableMergeAttribute::Normal, KMemoryBlockDisableMergeAttribute::None); - } - - R_SUCCEED(); -} - -Result KPageTable::UnmapMemory(KProcessAddress dst_address, KProcessAddress src_address, - size_t size) { - // Lock the table. - KScopedLightLock lk(m_general_lock); - - // Validate that the source address's state is valid. - KMemoryState src_state; - size_t num_src_allocator_blocks; - R_TRY(this->CheckMemoryState( - std::addressof(src_state), nullptr, nullptr, std::addressof(num_src_allocator_blocks), - src_address, size, KMemoryState::FlagCanAlias, KMemoryState::FlagCanAlias, - KMemoryPermission::All, KMemoryPermission::NotMapped | KMemoryPermission::KernelRead, - KMemoryAttribute::All, KMemoryAttribute::Locked)); - - // Validate that the dst address's state is valid. - KMemoryPermission dst_perm; - size_t num_dst_allocator_blocks; - R_TRY(this->CheckMemoryState( - nullptr, std::addressof(dst_perm), nullptr, std::addressof(num_dst_allocator_blocks), - dst_address, size, KMemoryState::All, KMemoryState::Stack, KMemoryPermission::None, - KMemoryPermission::None, KMemoryAttribute::All, KMemoryAttribute::None)); - - // Create an update allocator for the source. - Result src_allocator_result; - KMemoryBlockManagerUpdateAllocator src_allocator(std::addressof(src_allocator_result), - m_memory_block_slab_manager, - num_src_allocator_blocks); - R_TRY(src_allocator_result); - - // Create an update allocator for the destination. - Result dst_allocator_result; - KMemoryBlockManagerUpdateAllocator dst_allocator(std::addressof(dst_allocator_result), - m_memory_block_slab_manager, - num_dst_allocator_blocks); - R_TRY(dst_allocator_result); - - // Unmap the memory. - { - // Determine the number of pages being operated on. - const size_t num_pages = size / PageSize; - - // Create page groups for the memory being unmapped. - KPageGroup pg{m_kernel, m_block_info_manager}; - - // Create the page group representing the destination. - R_TRY(this->MakePageGroup(pg, dst_address, num_pages)); - - // Ensure the page group is the valid for the source. - R_UNLESS(this->IsValidPageGroup(pg, src_address, num_pages), ResultInvalidMemoryRegion); - - // We're going to perform an update, so create a helper. - KScopedPageTableUpdater updater(this); - - // Unmap the aliased copy of the pages. - const KPageProperties dst_unmap_properties = {KMemoryPermission::None, false, false, - DisableMergeAttribute::None}; - R_TRY( - this->Operate(dst_address, num_pages, dst_unmap_properties.perm, OperationType::Unmap)); - - // Ensure that we re-map the aliased pages on failure. - ON_RESULT_FAILURE { - this->RemapPageGroup(updater.GetPageList(), dst_address, size, pg); - }; - - // Try to set the permissions for the source pages back to what they should be. - const KPageProperties src_properties = {KMemoryPermission::UserReadWrite, false, false, - DisableMergeAttribute::EnableAndMergeHeadBodyTail}; - R_TRY(this->Operate(src_address, num_pages, src_properties.perm, - OperationType::ChangePermissions)); - - // Apply the memory block updates. - m_memory_block_manager.Update( - std::addressof(src_allocator), src_address, num_pages, src_state, - KMemoryPermission::UserReadWrite, KMemoryAttribute::None, - KMemoryBlockDisableMergeAttribute::None, KMemoryBlockDisableMergeAttribute::Locked); - m_memory_block_manager.Update( - std::addressof(dst_allocator), dst_address, num_pages, KMemoryState::None, - KMemoryPermission::None, KMemoryAttribute::None, - KMemoryBlockDisableMergeAttribute::None, KMemoryBlockDisableMergeAttribute::Normal); - } - - R_SUCCEED(); -} - -Result KPageTable::AllocateAndMapPagesImpl(PageLinkedList* page_list, KProcessAddress address, - size_t num_pages, KMemoryPermission perm) { - ASSERT(this->IsLockedByCurrentThread()); - - // Create a page group to hold the pages we allocate. - KPageGroup pg{m_kernel, m_block_info_manager}; - - // Allocate the pages. - R_TRY( - m_kernel.MemoryManager().AllocateAndOpen(std::addressof(pg), num_pages, m_allocate_option)); - - // Ensure that the page group is closed when we're done working with it. - SCOPE_EXIT({ pg.Close(); }); - - // Clear all pages. - for (const auto& it : pg) { - std::memset(m_system.DeviceMemory().GetPointer(it.GetAddress()), m_heap_fill_value, - it.GetSize()); - } - - // Map the pages. - R_RETURN(this->Operate(address, num_pages, pg, OperationType::MapGroup)); -} - -Result KPageTable::MapPageGroupImpl(PageLinkedList* page_list, KProcessAddress address, - const KPageGroup& pg, const KPageProperties properties, - bool reuse_ll) { - ASSERT(this->IsLockedByCurrentThread()); - - // Note the current address, so that we can iterate. - const KProcessAddress start_address = address; - KProcessAddress cur_address = address; - - // Ensure that we clean up on failure. - ON_RESULT_FAILURE { - ASSERT(!reuse_ll); - if (cur_address != start_address) { - const KPageProperties unmap_properties = {KMemoryPermission::None, false, false, - DisableMergeAttribute::None}; - ASSERT(this->Operate(start_address, (cur_address - start_address) / PageSize, - unmap_properties.perm, OperationType::Unmap) == ResultSuccess); - } - }; - - // Iterate, mapping all pages in the group. - for (const auto& block : pg) { - // Map and advance. - const KPageProperties cur_properties = - (cur_address == start_address) - ? properties - : KPageProperties{properties.perm, properties.io, properties.uncached, - DisableMergeAttribute::None}; - this->Operate(cur_address, block.GetNumPages(), cur_properties.perm, OperationType::Map, - block.GetAddress()); - cur_address += block.GetSize(); - } - - // We succeeded! - R_SUCCEED(); -} - -void KPageTable::RemapPageGroup(PageLinkedList* page_list, KProcessAddress address, size_t size, - const KPageGroup& pg) { - ASSERT(this->IsLockedByCurrentThread()); - - // Note the current address, so that we can iterate. - const KProcessAddress start_address = address; - const KProcessAddress last_address = start_address + size - 1; - const KProcessAddress end_address = last_address + 1; - - // Iterate over the memory. - auto pg_it = pg.begin(); - ASSERT(pg_it != pg.end()); - - KPhysicalAddress pg_phys_addr = pg_it->GetAddress(); - size_t pg_pages = pg_it->GetNumPages(); - - auto it = m_memory_block_manager.FindIterator(start_address); - while (true) { - // Check that the iterator is valid. - ASSERT(it != m_memory_block_manager.end()); - - // Get the memory info. - const KMemoryInfo info = it->GetMemoryInfo(); - - // Determine the range to map. - KProcessAddress map_address = std::max(info.GetAddress(), start_address); - const KProcessAddress map_end_address = - std::min(info.GetEndAddress(), end_address); - ASSERT(map_end_address != map_address); - - // Determine if we should disable head merge. - const bool disable_head_merge = - info.GetAddress() >= GetInteger(start_address) && - True(info.GetDisableMergeAttribute() & KMemoryBlockDisableMergeAttribute::Normal); - const KPageProperties map_properties = { - info.GetPermission(), false, false, - disable_head_merge ? DisableMergeAttribute::DisableHead : DisableMergeAttribute::None}; - - // While we have pages to map, map them. - size_t map_pages = (map_end_address - map_address) / PageSize; - while (map_pages > 0) { - // Check if we're at the end of the physical block. - if (pg_pages == 0) { - // Ensure there are more pages to map. - ASSERT(pg_it != pg.end()); - - // Advance our physical block. - ++pg_it; - pg_phys_addr = pg_it->GetAddress(); - pg_pages = pg_it->GetNumPages(); - } - - // Map whatever we can. - const size_t cur_pages = std::min(pg_pages, map_pages); - ASSERT(this->Operate(map_address, map_pages, map_properties.perm, OperationType::Map, - pg_phys_addr) == ResultSuccess); - - // Advance. - map_address += cur_pages * PageSize; - map_pages -= cur_pages; - - pg_phys_addr += cur_pages * PageSize; - pg_pages -= cur_pages; - } - - // Check if we're done. - if (last_address <= info.GetLastAddress()) { - break; - } - - // Advance. - ++it; - } - - // Check that we re-mapped precisely the page group. - ASSERT((++pg_it) == pg.end()); -} - -Result KPageTable::MapPages(KProcessAddress* out_addr, size_t num_pages, size_t alignment, - KPhysicalAddress phys_addr, bool is_pa_valid, - KProcessAddress region_start, size_t region_num_pages, - KMemoryState state, KMemoryPermission perm) { - ASSERT(Common::IsAligned(alignment, PageSize) && alignment >= PageSize); - - // Ensure this is a valid map request. - R_UNLESS(this->CanContain(region_start, region_num_pages * PageSize, state), - ResultInvalidCurrentMemory); - R_UNLESS(num_pages < region_num_pages, ResultOutOfMemory); - - // Lock the table. - KScopedLightLock lk(m_general_lock); - - // Find a random address to map at. - KProcessAddress addr = this->FindFreeArea(region_start, region_num_pages, num_pages, alignment, - 0, this->GetNumGuardPages()); - R_UNLESS(addr != 0, ResultOutOfMemory); - ASSERT(Common::IsAligned(GetInteger(addr), alignment)); - ASSERT(this->CanContain(addr, num_pages * PageSize, state)); - ASSERT(this->CheckMemoryState(addr, num_pages * PageSize, KMemoryState::All, KMemoryState::Free, - KMemoryPermission::None, KMemoryPermission::None, - KMemoryAttribute::None, KMemoryAttribute::None) == ResultSuccess); - - // Create an update allocator. - Result allocator_result; - KMemoryBlockManagerUpdateAllocator allocator(std::addressof(allocator_result), - m_memory_block_slab_manager); - R_TRY(allocator_result); - - // We're going to perform an update, so create a helper. - KScopedPageTableUpdater updater(this); - - // Perform mapping operation. - if (is_pa_valid) { - const KPageProperties properties = {perm, false, false, DisableMergeAttribute::DisableHead}; - R_TRY(this->Operate(addr, num_pages, properties.perm, OperationType::Map, phys_addr)); - } else { - R_TRY(this->AllocateAndMapPagesImpl(updater.GetPageList(), addr, num_pages, perm)); - } - - // Update the blocks. - m_memory_block_manager.Update(std::addressof(allocator), addr, num_pages, state, perm, - KMemoryAttribute::None, KMemoryBlockDisableMergeAttribute::Normal, - KMemoryBlockDisableMergeAttribute::None); - - // We successfully mapped the pages. - *out_addr = addr; - R_SUCCEED(); -} - -Result KPageTable::MapPages(KProcessAddress address, size_t num_pages, KMemoryState state, - KMemoryPermission perm) { - // Check that the map is in range. - const size_t size = num_pages * PageSize; - R_UNLESS(this->CanContain(address, size, state), ResultInvalidCurrentMemory); - - // Lock the table. - KScopedLightLock lk(m_general_lock); - - // Check the memory state. - size_t num_allocator_blocks; - R_TRY(this->CheckMemoryState(std::addressof(num_allocator_blocks), address, size, - KMemoryState::All, KMemoryState::Free, KMemoryPermission::None, - KMemoryPermission::None, KMemoryAttribute::None, - KMemoryAttribute::None)); - - // Create an update allocator. - Result allocator_result; - KMemoryBlockManagerUpdateAllocator allocator(std::addressof(allocator_result), - m_memory_block_slab_manager, num_allocator_blocks); - R_TRY(allocator_result); - - // We're going to perform an update, so create a helper. - KScopedPageTableUpdater updater(this); - - // Map the pages. - R_TRY(this->AllocateAndMapPagesImpl(updater.GetPageList(), address, num_pages, perm)); - - // Update the blocks. - m_memory_block_manager.Update(std::addressof(allocator), address, num_pages, state, perm, - KMemoryAttribute::None, KMemoryBlockDisableMergeAttribute::Normal, - KMemoryBlockDisableMergeAttribute::None); - - R_SUCCEED(); -} - -Result KPageTable::UnmapPages(KProcessAddress address, size_t num_pages, KMemoryState state) { - // Check that the unmap is in range. - const size_t size = num_pages * PageSize; - R_UNLESS(this->Contains(address, size), ResultInvalidCurrentMemory); - - // Lock the table. - KScopedLightLock lk(m_general_lock); - - // Check the memory state. - size_t num_allocator_blocks; - R_TRY(this->CheckMemoryState(std::addressof(num_allocator_blocks), address, size, - KMemoryState::All, state, KMemoryPermission::None, - KMemoryPermission::None, KMemoryAttribute::All, - KMemoryAttribute::None)); - - // Create an update allocator. - Result allocator_result; - KMemoryBlockManagerUpdateAllocator allocator(std::addressof(allocator_result), - m_memory_block_slab_manager, num_allocator_blocks); - R_TRY(allocator_result); - - // We're going to perform an update, so create a helper. - KScopedPageTableUpdater updater(this); - - // Perform the unmap. - const KPageProperties unmap_properties = {KMemoryPermission::None, false, false, - DisableMergeAttribute::None}; - R_TRY(this->Operate(address, num_pages, unmap_properties.perm, OperationType::Unmap)); - - // Update the blocks. - m_memory_block_manager.Update(std::addressof(allocator), address, num_pages, KMemoryState::Free, - KMemoryPermission::None, KMemoryAttribute::None, - KMemoryBlockDisableMergeAttribute::None, - KMemoryBlockDisableMergeAttribute::Normal); - - R_SUCCEED(); -} - -Result KPageTable::MapPageGroup(KProcessAddress* out_addr, const KPageGroup& pg, - KProcessAddress region_start, size_t region_num_pages, - KMemoryState state, KMemoryPermission perm) { - ASSERT(!this->IsLockedByCurrentThread()); - - // Ensure this is a valid map request. - const size_t num_pages = pg.GetNumPages(); - R_UNLESS(this->CanContain(region_start, region_num_pages * PageSize, state), - ResultInvalidCurrentMemory); - R_UNLESS(num_pages < region_num_pages, ResultOutOfMemory); - - // Lock the table. - KScopedLightLock lk(m_general_lock); - - // Find a random address to map at. - KProcessAddress addr = this->FindFreeArea(region_start, region_num_pages, num_pages, PageSize, - 0, this->GetNumGuardPages()); - R_UNLESS(addr != 0, ResultOutOfMemory); - ASSERT(this->CanContain(addr, num_pages * PageSize, state)); - ASSERT(this->CheckMemoryState(addr, num_pages * PageSize, KMemoryState::All, KMemoryState::Free, - KMemoryPermission::None, KMemoryPermission::None, - KMemoryAttribute::None, KMemoryAttribute::None) == ResultSuccess); - - // Create an update allocator. - Result allocator_result; - KMemoryBlockManagerUpdateAllocator allocator(std::addressof(allocator_result), - m_memory_block_slab_manager); - R_TRY(allocator_result); - - // We're going to perform an update, so create a helper. - KScopedPageTableUpdater updater(this); - - // Perform mapping operation. - const KPageProperties properties = {perm, false, false, DisableMergeAttribute::DisableHead}; - R_TRY(this->MapPageGroupImpl(updater.GetPageList(), addr, pg, properties, false)); - - // Update the blocks. - m_memory_block_manager.Update(std::addressof(allocator), addr, num_pages, state, perm, - KMemoryAttribute::None, KMemoryBlockDisableMergeAttribute::Normal, - KMemoryBlockDisableMergeAttribute::None); - - // We successfully mapped the pages. - *out_addr = addr; - R_SUCCEED(); -} - -Result KPageTable::MapPageGroup(KProcessAddress addr, const KPageGroup& pg, KMemoryState state, - KMemoryPermission perm) { - ASSERT(!this->IsLockedByCurrentThread()); - - // Ensure this is a valid map request. - const size_t num_pages = pg.GetNumPages(); - const size_t size = num_pages * PageSize; - R_UNLESS(this->CanContain(addr, size, state), ResultInvalidCurrentMemory); - - // Lock the table. - KScopedLightLock lk(m_general_lock); - - // Check if state allows us to map. - size_t num_allocator_blocks; - R_TRY(this->CheckMemoryState(std::addressof(num_allocator_blocks), addr, size, - KMemoryState::All, KMemoryState::Free, KMemoryPermission::None, - KMemoryPermission::None, KMemoryAttribute::None, - KMemoryAttribute::None)); - - // Create an update allocator. - Result allocator_result; - KMemoryBlockManagerUpdateAllocator allocator(std::addressof(allocator_result), - m_memory_block_slab_manager, num_allocator_blocks); - R_TRY(allocator_result); - - // We're going to perform an update, so create a helper. - KScopedPageTableUpdater updater(this); - - // Perform mapping operation. - const KPageProperties properties = {perm, false, false, DisableMergeAttribute::DisableHead}; - R_TRY(this->MapPageGroupImpl(updater.GetPageList(), addr, pg, properties, false)); - - // Update the blocks. - m_memory_block_manager.Update(std::addressof(allocator), addr, num_pages, state, perm, - KMemoryAttribute::None, KMemoryBlockDisableMergeAttribute::Normal, - KMemoryBlockDisableMergeAttribute::None); - - // We successfully mapped the pages. - R_SUCCEED(); -} - -Result KPageTable::UnmapPageGroup(KProcessAddress address, const KPageGroup& pg, - KMemoryState state) { - ASSERT(!this->IsLockedByCurrentThread()); - - // Ensure this is a valid unmap request. - const size_t num_pages = pg.GetNumPages(); - const size_t size = num_pages * PageSize; - R_UNLESS(this->CanContain(address, size, state), ResultInvalidCurrentMemory); - - // Lock the table. - KScopedLightLock lk(m_general_lock); - - // Check if state allows us to unmap. - size_t num_allocator_blocks; - R_TRY(this->CheckMemoryState(std::addressof(num_allocator_blocks), address, size, - KMemoryState::All, state, KMemoryPermission::None, - KMemoryPermission::None, KMemoryAttribute::All, - KMemoryAttribute::None)); - - // Check that the page group is valid. - R_UNLESS(this->IsValidPageGroup(pg, address, num_pages), ResultInvalidCurrentMemory); - - // Create an update allocator. - Result allocator_result; - KMemoryBlockManagerUpdateAllocator allocator(std::addressof(allocator_result), - m_memory_block_slab_manager, num_allocator_blocks); - R_TRY(allocator_result); - - // We're going to perform an update, so create a helper. - KScopedPageTableUpdater updater(this); - - // Perform unmapping operation. - const KPageProperties properties = {KMemoryPermission::None, false, false, - DisableMergeAttribute::None}; - R_TRY(this->Operate(address, num_pages, properties.perm, OperationType::Unmap)); - - // Update the blocks. - m_memory_block_manager.Update(std::addressof(allocator), address, num_pages, KMemoryState::Free, - KMemoryPermission::None, KMemoryAttribute::None, - KMemoryBlockDisableMergeAttribute::None, - KMemoryBlockDisableMergeAttribute::Normal); - - R_SUCCEED(); -} - -Result KPageTable::MakeAndOpenPageGroup(KPageGroup* out, KProcessAddress address, size_t num_pages, - KMemoryState state_mask, KMemoryState state, - KMemoryPermission perm_mask, KMemoryPermission perm, - KMemoryAttribute attr_mask, KMemoryAttribute attr) { - // Ensure that the page group isn't null. - ASSERT(out != nullptr); - - // Make sure that the region we're mapping is valid for the table. - const size_t size = num_pages * PageSize; - R_UNLESS(this->Contains(address, size), ResultInvalidCurrentMemory); - - // Lock the table. - KScopedLightLock lk(m_general_lock); - - // Check if state allows us to create the group. - R_TRY(this->CheckMemoryState(address, size, state_mask | KMemoryState::FlagReferenceCounted, - state | KMemoryState::FlagReferenceCounted, perm_mask, perm, - attr_mask, attr)); - - // Create a new page group for the region. - R_TRY(this->MakePageGroup(*out, address, num_pages)); - - R_SUCCEED(); -} - -Result KPageTable::SetProcessMemoryPermission(KProcessAddress addr, size_t size, - Svc::MemoryPermission svc_perm) { - const size_t num_pages = size / PageSize; - - // Lock the table. - KScopedLightLock lk(m_general_lock); - - // Verify we can change the memory permission. - KMemoryState old_state; - KMemoryPermission old_perm; - size_t num_allocator_blocks; - R_TRY(this->CheckMemoryState(std::addressof(old_state), std::addressof(old_perm), nullptr, - std::addressof(num_allocator_blocks), addr, size, - KMemoryState::FlagCode, KMemoryState::FlagCode, - KMemoryPermission::None, KMemoryPermission::None, - KMemoryAttribute::All, KMemoryAttribute::None)); - - // Determine new perm/state. - const KMemoryPermission new_perm = ConvertToKMemoryPermission(svc_perm); - KMemoryState new_state = old_state; - const bool is_w = (new_perm & KMemoryPermission::UserWrite) == KMemoryPermission::UserWrite; - const bool is_x = (new_perm & KMemoryPermission::UserExecute) == KMemoryPermission::UserExecute; - const bool was_x = - (old_perm & KMemoryPermission::UserExecute) == KMemoryPermission::UserExecute; - ASSERT(!(is_w && is_x)); - - if (is_w) { - switch (old_state) { - case KMemoryState::Code: - new_state = KMemoryState::CodeData; - break; - case KMemoryState::AliasCode: - new_state = KMemoryState::AliasCodeData; - break; - default: - ASSERT(false); - break; - } - } - - // Succeed if there's nothing to do. - R_SUCCEED_IF(old_perm == new_perm && old_state == new_state); - - // Create an update allocator. - Result allocator_result{ResultSuccess}; - KMemoryBlockManagerUpdateAllocator allocator(std::addressof(allocator_result), - m_memory_block_slab_manager, num_allocator_blocks); - R_TRY(allocator_result); - - // Perform mapping operation. - const auto operation = - was_x ? OperationType::ChangePermissionsAndRefresh : OperationType::ChangePermissions; - R_TRY(Operate(addr, num_pages, new_perm, operation)); - - // Update the blocks. - m_memory_block_manager.Update(std::addressof(allocator), addr, num_pages, new_state, new_perm, - KMemoryAttribute::None, KMemoryBlockDisableMergeAttribute::None, - KMemoryBlockDisableMergeAttribute::None); - - // Ensure cache coherency, if we're setting pages as executable. - if (is_x) { - m_system.InvalidateCpuInstructionCacheRange(GetInteger(addr), size); - } - - R_SUCCEED(); -} - -KMemoryInfo KPageTable::QueryInfoImpl(KProcessAddress addr) { - KScopedLightLock lk(m_general_lock); - - return m_memory_block_manager.FindBlock(addr)->GetMemoryInfo(); -} - -KMemoryInfo KPageTable::QueryInfo(KProcessAddress addr) { - if (!Contains(addr, 1)) { - return { - .m_address = GetInteger(m_address_space_end), - .m_size = 0 - GetInteger(m_address_space_end), - .m_state = static_cast(Svc::MemoryState::Inaccessible), - .m_device_disable_merge_left_count = 0, - .m_device_disable_merge_right_count = 0, - .m_ipc_lock_count = 0, - .m_device_use_count = 0, - .m_ipc_disable_merge_count = 0, - .m_permission = KMemoryPermission::None, - .m_attribute = KMemoryAttribute::None, - .m_original_permission = KMemoryPermission::None, - .m_disable_merge_attribute = KMemoryBlockDisableMergeAttribute::None, - }; - } - - return QueryInfoImpl(addr); -} - -Result KPageTable::SetMemoryPermission(KProcessAddress addr, size_t size, - Svc::MemoryPermission svc_perm) { - const size_t num_pages = size / PageSize; - - // Lock the table. - KScopedLightLock lk(m_general_lock); - - // Verify we can change the memory permission. - KMemoryState old_state; - KMemoryPermission old_perm; - size_t num_allocator_blocks; - R_TRY(this->CheckMemoryState(std::addressof(old_state), std::addressof(old_perm), nullptr, - std::addressof(num_allocator_blocks), addr, size, - KMemoryState::FlagCanReprotect, KMemoryState::FlagCanReprotect, - KMemoryPermission::None, KMemoryPermission::None, - KMemoryAttribute::All, KMemoryAttribute::None)); - - // Determine new perm. - const KMemoryPermission new_perm = ConvertToKMemoryPermission(svc_perm); - R_SUCCEED_IF(old_perm == new_perm); - - // Create an update allocator. - Result allocator_result{ResultSuccess}; - KMemoryBlockManagerUpdateAllocator allocator(std::addressof(allocator_result), - m_memory_block_slab_manager, num_allocator_blocks); - R_TRY(allocator_result); - - // Perform mapping operation. - R_TRY(Operate(addr, num_pages, new_perm, OperationType::ChangePermissions)); - - // Update the blocks. - m_memory_block_manager.Update(std::addressof(allocator), addr, num_pages, old_state, new_perm, - KMemoryAttribute::None, KMemoryBlockDisableMergeAttribute::None, - KMemoryBlockDisableMergeAttribute::None); - - R_SUCCEED(); -} - -Result KPageTable::SetMemoryAttribute(KProcessAddress addr, size_t size, u32 mask, u32 attr) { - const size_t num_pages = size / PageSize; - ASSERT((static_cast(mask) | KMemoryAttribute::SetMask) == - KMemoryAttribute::SetMask); - - // Lock the table. - KScopedLightLock lk(m_general_lock); - - // Verify we can change the memory attribute. - KMemoryState old_state; - KMemoryPermission old_perm; - KMemoryAttribute old_attr; - size_t num_allocator_blocks; - constexpr auto AttributeTestMask = - ~(KMemoryAttribute::SetMask | KMemoryAttribute::DeviceShared); - const KMemoryState state_test_mask = - static_cast(((mask & static_cast(KMemoryAttribute::Uncached)) - ? static_cast(KMemoryState::FlagCanChangeAttribute) - : 0) | - ((mask & static_cast(KMemoryAttribute::PermissionLocked)) - ? static_cast(KMemoryState::FlagCanPermissionLock) - : 0)); - R_TRY(this->CheckMemoryState(std::addressof(old_state), std::addressof(old_perm), - std::addressof(old_attr), std::addressof(num_allocator_blocks), - addr, size, state_test_mask, state_test_mask, - KMemoryPermission::None, KMemoryPermission::None, - AttributeTestMask, KMemoryAttribute::None, ~AttributeTestMask)); - - // Create an update allocator. - Result allocator_result{ResultSuccess}; - KMemoryBlockManagerUpdateAllocator allocator(std::addressof(allocator_result), - m_memory_block_slab_manager, num_allocator_blocks); - R_TRY(allocator_result); - - // If we need to, perform a change attribute operation. - if (True(KMemoryAttribute::Uncached & static_cast(mask))) { - // Perform operation. - R_TRY(this->Operate(addr, num_pages, old_perm, - OperationType::ChangePermissionsAndRefreshAndFlush, 0)); - } - - // Update the blocks. - m_memory_block_manager.UpdateAttribute(std::addressof(allocator), addr, num_pages, - static_cast(mask), - static_cast(attr)); - - R_SUCCEED(); -} - -Result KPageTable::SetMaxHeapSize(size_t size) { - // Lock the table. - KScopedLightLock lk(m_general_lock); - - // Only process page tables are allowed to set heap size. - ASSERT(!this->IsKernel()); - - m_max_heap_size = size; - - R_SUCCEED(); -} - -Result KPageTable::SetHeapSize(u64* out, size_t size) { - // Lock the physical memory mutex. - KScopedLightLock map_phys_mem_lk(m_map_physical_memory_lock); - - // Try to perform a reduction in heap, instead of an extension. - KProcessAddress cur_address{}; - size_t allocation_size{}; - { - // Lock the table. - KScopedLightLock lk(m_general_lock); - - // Validate that setting heap size is possible at all. - R_UNLESS(!m_is_kernel, ResultOutOfMemory); - R_UNLESS(size <= static_cast(m_heap_region_end - m_heap_region_start), - ResultOutOfMemory); - R_UNLESS(size <= m_max_heap_size, ResultOutOfMemory); - - if (size < GetHeapSize()) { - // The size being requested is less than the current size, so we need to free the end of - // the heap. - - // Validate memory state. - size_t num_allocator_blocks; - R_TRY(this->CheckMemoryState(std::addressof(num_allocator_blocks), - m_heap_region_start + size, GetHeapSize() - size, - KMemoryState::All, KMemoryState::Normal, - KMemoryPermission::All, KMemoryPermission::UserReadWrite, - KMemoryAttribute::All, KMemoryAttribute::None)); - - // Create an update allocator. - Result allocator_result{ResultSuccess}; - KMemoryBlockManagerUpdateAllocator allocator(std::addressof(allocator_result), - m_memory_block_slab_manager, - num_allocator_blocks); - R_TRY(allocator_result); - - // Unmap the end of the heap. - const auto num_pages = (GetHeapSize() - size) / PageSize; - R_TRY(Operate(m_heap_region_start + size, num_pages, KMemoryPermission::None, - OperationType::Unmap)); - - // Release the memory from the resource limit. - m_resource_limit->Release(LimitableResource::PhysicalMemoryMax, num_pages * PageSize); - - // Apply the memory block update. - m_memory_block_manager.Update(std::addressof(allocator), m_heap_region_start + size, - num_pages, KMemoryState::Free, KMemoryPermission::None, - KMemoryAttribute::None, - KMemoryBlockDisableMergeAttribute::None, - size == 0 ? KMemoryBlockDisableMergeAttribute::Normal - : KMemoryBlockDisableMergeAttribute::None); - - // Update the current heap end. - m_current_heap_end = m_heap_region_start + size; - - // Set the output. - *out = GetInteger(m_heap_region_start); - R_SUCCEED(); - } else if (size == GetHeapSize()) { - // The size requested is exactly the current size. - *out = GetInteger(m_heap_region_start); - R_SUCCEED(); - } else { - // We have to allocate memory. Determine how much to allocate and where while the table - // is locked. - cur_address = m_current_heap_end; - allocation_size = size - GetHeapSize(); - } - } - - // Reserve memory for the heap extension. - KScopedResourceReservation memory_reservation( - m_resource_limit, LimitableResource::PhysicalMemoryMax, allocation_size); - R_UNLESS(memory_reservation.Succeeded(), ResultLimitReached); - - // Allocate pages for the heap extension. - KPageGroup pg{m_kernel, m_block_info_manager}; - R_TRY(m_system.Kernel().MemoryManager().AllocateAndOpen( - &pg, allocation_size / PageSize, - KMemoryManager::EncodeOption(m_memory_pool, m_allocation_option))); - - // Clear all the newly allocated pages. - for (const auto& it : pg) { - std::memset(m_system.DeviceMemory().GetPointer(it.GetAddress()), m_heap_fill_value, - it.GetSize()); - } - - // Map the pages. - { - // Lock the table. - KScopedLightLock lk(m_general_lock); - - // Ensure that the heap hasn't changed since we began executing. - ASSERT(cur_address == m_current_heap_end); - - // Check the memory state. - size_t num_allocator_blocks{}; - R_TRY(this->CheckMemoryState(std::addressof(num_allocator_blocks), m_current_heap_end, - allocation_size, KMemoryState::All, KMemoryState::Free, - KMemoryPermission::None, KMemoryPermission::None, - KMemoryAttribute::None, KMemoryAttribute::None)); - - // Create an update allocator. - Result allocator_result{ResultSuccess}; - KMemoryBlockManagerUpdateAllocator allocator( - std::addressof(allocator_result), m_memory_block_slab_manager, num_allocator_blocks); - R_TRY(allocator_result); - - // Map the pages. - const auto num_pages = allocation_size / PageSize; - R_TRY(Operate(m_current_heap_end, num_pages, pg, OperationType::MapGroup)); - - // Clear all the newly allocated pages. - for (size_t cur_page = 0; cur_page < num_pages; ++cur_page) { - std::memset(m_memory->GetPointer(m_current_heap_end + (cur_page * PageSize)), 0, - PageSize); - } - - // We succeeded, so commit our memory reservation. - memory_reservation.Commit(); - - // Apply the memory block update. - m_memory_block_manager.Update( - std::addressof(allocator), m_current_heap_end, num_pages, KMemoryState::Normal, - KMemoryPermission::UserReadWrite, KMemoryAttribute::None, - m_heap_region_start == m_current_heap_end ? KMemoryBlockDisableMergeAttribute::Normal - : KMemoryBlockDisableMergeAttribute::None, - KMemoryBlockDisableMergeAttribute::None); - - // Update the current heap end. - m_current_heap_end = m_heap_region_start + size; - - // Set the output. - *out = GetInteger(m_heap_region_start); - R_SUCCEED(); - } -} - -Result KPageTable::LockForMapDeviceAddressSpace(bool* out_is_io, KProcessAddress address, - size_t size, KMemoryPermission perm, - bool is_aligned, bool check_heap) { - // Lightly validate the range before doing anything else. - const size_t num_pages = size / PageSize; - R_UNLESS(this->Contains(address, size), ResultInvalidCurrentMemory); - - // Lock the table. - KScopedLightLock lk(m_general_lock); - - // Check the memory state. - const auto test_state = - (is_aligned ? KMemoryState::FlagCanAlignedDeviceMap : KMemoryState::FlagCanDeviceMap) | - (check_heap ? KMemoryState::FlagReferenceCounted : KMemoryState::None); - size_t num_allocator_blocks; - KMemoryState old_state; - R_TRY(this->CheckMemoryState(std::addressof(old_state), nullptr, nullptr, - std::addressof(num_allocator_blocks), address, size, test_state, - test_state, perm, perm, - KMemoryAttribute::IpcLocked | KMemoryAttribute::Locked, - KMemoryAttribute::None, KMemoryAttribute::DeviceShared)); - - // Create an update allocator. - Result allocator_result; - KMemoryBlockManagerUpdateAllocator allocator(std::addressof(allocator_result), - m_memory_block_slab_manager, num_allocator_blocks); - R_TRY(allocator_result); - - // Update the memory blocks. - m_memory_block_manager.UpdateLock(std::addressof(allocator), address, num_pages, - &KMemoryBlock::ShareToDevice, KMemoryPermission::None); - - // Set whether the locked memory was io. - *out_is_io = - static_cast(old_state & KMemoryState::Mask) == Svc::MemoryState::Io; - - R_SUCCEED(); -} - -Result KPageTable::LockForUnmapDeviceAddressSpace(KProcessAddress address, size_t size, - bool check_heap) { - // Lightly validate the range before doing anything else. - const size_t num_pages = size / PageSize; - R_UNLESS(this->Contains(address, size), ResultInvalidCurrentMemory); - - // Lock the table. - KScopedLightLock lk(m_general_lock); - - // Check the memory state. - const auto test_state = KMemoryState::FlagCanDeviceMap | - (check_heap ? KMemoryState::FlagReferenceCounted : KMemoryState::None); - size_t num_allocator_blocks; - R_TRY(this->CheckMemoryStateContiguous( - std::addressof(num_allocator_blocks), address, size, test_state, test_state, - KMemoryPermission::None, KMemoryPermission::None, - KMemoryAttribute::DeviceShared | KMemoryAttribute::Locked, KMemoryAttribute::DeviceShared)); - - // Create an update allocator. - Result allocator_result; - KMemoryBlockManagerUpdateAllocator allocator(std::addressof(allocator_result), - m_memory_block_slab_manager, num_allocator_blocks); - R_TRY(allocator_result); - - // Update the memory blocks. - const KMemoryBlockManager::MemoryBlockLockFunction lock_func = - m_enable_device_address_space_merge - ? &KMemoryBlock::UpdateDeviceDisableMergeStateForShare - : &KMemoryBlock::UpdateDeviceDisableMergeStateForShareRight; - m_memory_block_manager.UpdateLock(std::addressof(allocator), address, num_pages, lock_func, - KMemoryPermission::None); - - R_SUCCEED(); -} - -Result KPageTable::UnlockForDeviceAddressSpace(KProcessAddress address, size_t size) { - // Lightly validate the range before doing anything else. - const size_t num_pages = size / PageSize; - R_UNLESS(this->Contains(address, size), ResultInvalidCurrentMemory); - - // Lock the table. - KScopedLightLock lk(m_general_lock); - - // Check the memory state. - size_t num_allocator_blocks; - R_TRY(this->CheckMemoryStateContiguous( - std::addressof(num_allocator_blocks), address, size, KMemoryState::FlagCanDeviceMap, - KMemoryState::FlagCanDeviceMap, KMemoryPermission::None, KMemoryPermission::None, - KMemoryAttribute::DeviceShared | KMemoryAttribute::Locked, KMemoryAttribute::DeviceShared)); - - // Create an update allocator. - Result allocator_result{ResultSuccess}; - KMemoryBlockManagerUpdateAllocator allocator(std::addressof(allocator_result), - m_memory_block_slab_manager, num_allocator_blocks); - R_TRY(allocator_result); - - // Update the memory blocks. - m_memory_block_manager.UpdateLock(std::addressof(allocator), address, num_pages, - &KMemoryBlock::UnshareToDevice, KMemoryPermission::None); - - R_SUCCEED(); -} - -Result KPageTable::LockForIpcUserBuffer(KPhysicalAddress* out, KProcessAddress address, - size_t size) { - R_RETURN(this->LockMemoryAndOpen( - nullptr, out, address, size, KMemoryState::FlagCanIpcUserBuffer, - KMemoryState::FlagCanIpcUserBuffer, KMemoryPermission::All, - KMemoryPermission::UserReadWrite, KMemoryAttribute::All, KMemoryAttribute::None, - KMemoryPermission::NotMapped | KMemoryPermission::KernelReadWrite, - KMemoryAttribute::Locked)); -} - -Result KPageTable::UnlockForIpcUserBuffer(KProcessAddress address, size_t size) { - R_RETURN(this->UnlockMemory(address, size, KMemoryState::FlagCanIpcUserBuffer, - KMemoryState::FlagCanIpcUserBuffer, KMemoryPermission::None, - KMemoryPermission::None, KMemoryAttribute::All, - KMemoryAttribute::Locked, KMemoryPermission::UserReadWrite, - KMemoryAttribute::Locked, nullptr)); -} - -Result KPageTable::LockForTransferMemory(KPageGroup* out, KProcessAddress address, size_t size, - KMemoryPermission perm) { - R_RETURN(this->LockMemoryAndOpen(out, nullptr, address, size, KMemoryState::FlagCanTransfer, - KMemoryState::FlagCanTransfer, KMemoryPermission::All, - KMemoryPermission::UserReadWrite, KMemoryAttribute::All, - KMemoryAttribute::None, perm, KMemoryAttribute::Locked)); -} - -Result KPageTable::UnlockForTransferMemory(KProcessAddress address, size_t size, - const KPageGroup& pg) { - R_RETURN(this->UnlockMemory(address, size, KMemoryState::FlagCanTransfer, - KMemoryState::FlagCanTransfer, KMemoryPermission::None, - KMemoryPermission::None, KMemoryAttribute::All, - KMemoryAttribute::Locked, KMemoryPermission::UserReadWrite, - KMemoryAttribute::Locked, std::addressof(pg))); -} - -Result KPageTable::LockForCodeMemory(KPageGroup* out, KProcessAddress addr, size_t size) { - R_RETURN(this->LockMemoryAndOpen( - out, nullptr, addr, size, KMemoryState::FlagCanCodeMemory, KMemoryState::FlagCanCodeMemory, - KMemoryPermission::All, KMemoryPermission::UserReadWrite, KMemoryAttribute::All, - KMemoryAttribute::None, KMemoryPermission::NotMapped | KMemoryPermission::KernelReadWrite, - KMemoryAttribute::Locked)); -} - -Result KPageTable::UnlockForCodeMemory(KProcessAddress addr, size_t size, const KPageGroup& pg) { - R_RETURN(this->UnlockMemory( - addr, size, KMemoryState::FlagCanCodeMemory, KMemoryState::FlagCanCodeMemory, - KMemoryPermission::None, KMemoryPermission::None, KMemoryAttribute::All, - KMemoryAttribute::Locked, KMemoryPermission::UserReadWrite, KMemoryAttribute::Locked, &pg)); -} - -bool KPageTable::IsRegionContiguous(KProcessAddress addr, u64 size) const { - auto start_ptr = m_system.DeviceMemory().GetPointer(GetInteger(addr)); - for (u64 offset{}; offset < size; offset += PageSize) { - if (start_ptr != m_system.DeviceMemory().GetPointer(GetInteger(addr) + offset)) { - return false; - } - start_ptr += PageSize; - } - return true; -} - -void KPageTable::AddRegionToPages(KProcessAddress start, size_t num_pages, - KPageGroup& page_linked_list) { - KProcessAddress addr{start}; - while (addr < start + (num_pages * PageSize)) { - const KPhysicalAddress paddr{GetPhysicalAddr(addr)}; - ASSERT(paddr != 0); - page_linked_list.AddBlock(paddr, 1); - addr += PageSize; - } -} - -KProcessAddress KPageTable::AllocateVirtualMemory(KProcessAddress start, size_t region_num_pages, - u64 needed_num_pages, size_t align) { - if (m_enable_aslr) { - UNIMPLEMENTED(); - } - return m_memory_block_manager.FindFreeArea(start, region_num_pages, needed_num_pages, align, 0, - IsKernel() ? 1 : 4); -} - -Result KPageTable::Operate(KProcessAddress addr, size_t num_pages, const KPageGroup& page_group, - OperationType operation) { - ASSERT(this->IsLockedByCurrentThread()); - - ASSERT(Common::IsAligned(GetInteger(addr), PageSize)); - ASSERT(num_pages > 0); - ASSERT(num_pages == page_group.GetNumPages()); - - switch (operation) { - case OperationType::MapGroup: - case OperationType::MapFirstGroup: { - // We want to maintain a new reference to every page in the group. - KScopedPageGroup spg(page_group, operation != OperationType::MapFirstGroup); - - for (const auto& node : page_group) { - const size_t size{node.GetNumPages() * PageSize}; - - // Map the pages. - m_memory->MapMemoryRegion(*m_page_table_impl, addr, size, node.GetAddress()); - - addr += size; - } - - // We succeeded! We want to persist the reference to the pages. - spg.CancelClose(); - - break; - } - default: - ASSERT(false); - break; - } - - R_SUCCEED(); -} - -Result KPageTable::Operate(KProcessAddress addr, size_t num_pages, KMemoryPermission perm, - OperationType operation, KPhysicalAddress map_addr) { - ASSERT(this->IsLockedByCurrentThread()); - - ASSERT(num_pages > 0); - ASSERT(Common::IsAligned(GetInteger(addr), PageSize)); - ASSERT(ContainsPages(addr, num_pages)); - - switch (operation) { - case OperationType::Unmap: { - // Ensure that any pages we track close on exit. - KPageGroup pages_to_close{m_kernel, this->GetBlockInfoManager()}; - SCOPE_EXIT({ pages_to_close.CloseAndReset(); }); - - this->AddRegionToPages(addr, num_pages, pages_to_close); - m_memory->UnmapRegion(*m_page_table_impl, addr, num_pages * PageSize); - break; - } - case OperationType::Map: { - ASSERT(map_addr); - ASSERT(Common::IsAligned(GetInteger(map_addr), PageSize)); - m_memory->MapMemoryRegion(*m_page_table_impl, addr, num_pages * PageSize, map_addr); - - // Open references to pages, if we should. - if (IsHeapPhysicalAddress(m_kernel.MemoryLayout(), map_addr)) { - m_kernel.MemoryManager().Open(map_addr, num_pages); - } - break; - } - case OperationType::Separate: { - // HACK: Unimplemented. - break; - } - case OperationType::ChangePermissions: - case OperationType::ChangePermissionsAndRefresh: - case OperationType::ChangePermissionsAndRefreshAndFlush: - break; - default: - ASSERT(false); - break; - } - R_SUCCEED(); -} - -void KPageTable::FinalizeUpdate(PageLinkedList* page_list) { - while (page_list->Peek()) { - [[maybe_unused]] auto page = page_list->Pop(); - - // TODO(bunnei): Free pages once they are allocated in guest memory - // ASSERT(this->GetPageTableManager().IsInPageTableHeap(page)); - // ASSERT(this->GetPageTableManager().GetRefCount(page) == 0); - // this->GetPageTableManager().Free(page); - } -} - -KProcessAddress KPageTable::GetRegionAddress(Svc::MemoryState state) const { - switch (state) { - case Svc::MemoryState::Free: - case Svc::MemoryState::Kernel: - return m_address_space_start; - case Svc::MemoryState::Normal: - return m_heap_region_start; - case Svc::MemoryState::Ipc: - case Svc::MemoryState::NonSecureIpc: - case Svc::MemoryState::NonDeviceIpc: - return m_alias_region_start; - case Svc::MemoryState::Stack: - return m_stack_region_start; - case Svc::MemoryState::Static: - case Svc::MemoryState::ThreadLocal: - return m_kernel_map_region_start; - case Svc::MemoryState::Io: - case Svc::MemoryState::Shared: - case Svc::MemoryState::AliasCode: - case Svc::MemoryState::AliasCodeData: - case Svc::MemoryState::Transfered: - case Svc::MemoryState::SharedTransfered: - case Svc::MemoryState::SharedCode: - case Svc::MemoryState::GeneratedCode: - case Svc::MemoryState::CodeOut: - case Svc::MemoryState::Coverage: - case Svc::MemoryState::Insecure: - return m_alias_code_region_start; - case Svc::MemoryState::Code: - case Svc::MemoryState::CodeData: - return m_code_region_start; - default: - UNREACHABLE(); - } -} - -size_t KPageTable::GetRegionSize(Svc::MemoryState state) const { - switch (state) { - case Svc::MemoryState::Free: - case Svc::MemoryState::Kernel: - return m_address_space_end - m_address_space_start; - case Svc::MemoryState::Normal: - return m_heap_region_end - m_heap_region_start; - case Svc::MemoryState::Ipc: - case Svc::MemoryState::NonSecureIpc: - case Svc::MemoryState::NonDeviceIpc: - return m_alias_region_end - m_alias_region_start; - case Svc::MemoryState::Stack: - return m_stack_region_end - m_stack_region_start; - case Svc::MemoryState::Static: - case Svc::MemoryState::ThreadLocal: - return m_kernel_map_region_end - m_kernel_map_region_start; - case Svc::MemoryState::Io: - case Svc::MemoryState::Shared: - case Svc::MemoryState::AliasCode: - case Svc::MemoryState::AliasCodeData: - case Svc::MemoryState::Transfered: - case Svc::MemoryState::SharedTransfered: - case Svc::MemoryState::SharedCode: - case Svc::MemoryState::GeneratedCode: - case Svc::MemoryState::CodeOut: - case Svc::MemoryState::Coverage: - case Svc::MemoryState::Insecure: - return m_alias_code_region_end - m_alias_code_region_start; - case Svc::MemoryState::Code: - case Svc::MemoryState::CodeData: - return m_code_region_end - m_code_region_start; - default: - UNREACHABLE(); - } -} - -bool KPageTable::CanContain(KProcessAddress addr, size_t size, Svc::MemoryState state) const { - const KProcessAddress end = addr + size; - const KProcessAddress last = end - 1; - - const KProcessAddress region_start = this->GetRegionAddress(state); - const size_t region_size = this->GetRegionSize(state); - - const bool is_in_region = - region_start <= addr && addr < end && last <= region_start + region_size - 1; - const bool is_in_heap = !(end <= m_heap_region_start || m_heap_region_end <= addr || - m_heap_region_start == m_heap_region_end); - const bool is_in_alias = !(end <= m_alias_region_start || m_alias_region_end <= addr || - m_alias_region_start == m_alias_region_end); - switch (state) { - case Svc::MemoryState::Free: - case Svc::MemoryState::Kernel: - return is_in_region; - case Svc::MemoryState::Io: - case Svc::MemoryState::Static: - case Svc::MemoryState::Code: - case Svc::MemoryState::CodeData: - case Svc::MemoryState::Shared: - case Svc::MemoryState::AliasCode: - case Svc::MemoryState::AliasCodeData: - case Svc::MemoryState::Stack: - case Svc::MemoryState::ThreadLocal: - case Svc::MemoryState::Transfered: - case Svc::MemoryState::SharedTransfered: - case Svc::MemoryState::SharedCode: - case Svc::MemoryState::GeneratedCode: - case Svc::MemoryState::CodeOut: - case Svc::MemoryState::Coverage: - case Svc::MemoryState::Insecure: - return is_in_region && !is_in_heap && !is_in_alias; - case Svc::MemoryState::Normal: - ASSERT(is_in_heap); - return is_in_region && !is_in_alias; - case Svc::MemoryState::Ipc: - case Svc::MemoryState::NonSecureIpc: - case Svc::MemoryState::NonDeviceIpc: - ASSERT(is_in_alias); - return is_in_region && !is_in_heap; - default: - return false; - } -} - -Result KPageTable::CheckMemoryState(const KMemoryInfo& info, KMemoryState state_mask, - KMemoryState state, KMemoryPermission perm_mask, - KMemoryPermission perm, KMemoryAttribute attr_mask, - KMemoryAttribute attr) const { - // Validate the states match expectation. - R_UNLESS((info.m_state & state_mask) == state, ResultInvalidCurrentMemory); - R_UNLESS((info.m_permission & perm_mask) == perm, ResultInvalidCurrentMemory); - R_UNLESS((info.m_attribute & attr_mask) == attr, ResultInvalidCurrentMemory); - - R_SUCCEED(); -} - -Result KPageTable::CheckMemoryStateContiguous(size_t* out_blocks_needed, KProcessAddress addr, - size_t size, KMemoryState state_mask, - KMemoryState state, KMemoryPermission perm_mask, - KMemoryPermission perm, KMemoryAttribute attr_mask, - KMemoryAttribute attr) const { - ASSERT(this->IsLockedByCurrentThread()); - - // Get information about the first block. - const KProcessAddress last_addr = addr + size - 1; - KMemoryBlockManager::const_iterator it = m_memory_block_manager.FindIterator(addr); - KMemoryInfo info = it->GetMemoryInfo(); - - // If the start address isn't aligned, we need a block. - const size_t blocks_for_start_align = - (Common::AlignDown(GetInteger(addr), PageSize) != info.GetAddress()) ? 1 : 0; - - while (true) { - // Validate against the provided masks. - R_TRY(this->CheckMemoryState(info, state_mask, state, perm_mask, perm, attr_mask, attr)); - - // Break once we're done. - if (last_addr <= info.GetLastAddress()) { - break; - } - - // Advance our iterator. - it++; - ASSERT(it != m_memory_block_manager.cend()); - info = it->GetMemoryInfo(); - } - - // If the end address isn't aligned, we need a block. - const size_t blocks_for_end_align = - (Common::AlignUp(GetInteger(addr) + size, PageSize) != info.GetEndAddress()) ? 1 : 0; - - if (out_blocks_needed != nullptr) { - *out_blocks_needed = blocks_for_start_align + blocks_for_end_align; - } - - R_SUCCEED(); -} - -Result KPageTable::CheckMemoryState(KMemoryState* out_state, KMemoryPermission* out_perm, - KMemoryAttribute* out_attr, size_t* out_blocks_needed, - KMemoryBlockManager::const_iterator it, - KProcessAddress last_addr, KMemoryState state_mask, - KMemoryState state, KMemoryPermission perm_mask, - KMemoryPermission perm, KMemoryAttribute attr_mask, - KMemoryAttribute attr, KMemoryAttribute ignore_attr) const { - ASSERT(this->IsLockedByCurrentThread()); - - // Get information about the first block. - KMemoryInfo info = it->GetMemoryInfo(); - - // Validate all blocks in the range have correct state. - const KMemoryState first_state = info.m_state; - const KMemoryPermission first_perm = info.m_permission; - const KMemoryAttribute first_attr = info.m_attribute; - while (true) { - // Validate the current block. - R_UNLESS(info.m_state == first_state, ResultInvalidCurrentMemory); - R_UNLESS(info.m_permission == first_perm, ResultInvalidCurrentMemory); - R_UNLESS((info.m_attribute | ignore_attr) == (first_attr | ignore_attr), - ResultInvalidCurrentMemory); - - // Validate against the provided masks. - R_TRY(this->CheckMemoryState(info, state_mask, state, perm_mask, perm, attr_mask, attr)); - - // Break once we're done. - if (last_addr <= info.GetLastAddress()) { - break; - } - - // Advance our iterator. - it++; - ASSERT(it != m_memory_block_manager.cend()); - info = it->GetMemoryInfo(); - } - - // Write output state. - if (out_state != nullptr) { - *out_state = first_state; - } - if (out_perm != nullptr) { - *out_perm = first_perm; - } - if (out_attr != nullptr) { - *out_attr = static_cast(first_attr & ~ignore_attr); - } - - // If the end address isn't aligned, we need a block. - if (out_blocks_needed != nullptr) { - const size_t blocks_for_end_align = - (Common::AlignDown(GetInteger(last_addr), PageSize) + PageSize != info.GetEndAddress()) - ? 1 - : 0; - *out_blocks_needed = blocks_for_end_align; - } - - R_SUCCEED(); -} - -Result KPageTable::CheckMemoryState(KMemoryState* out_state, KMemoryPermission* out_perm, - KMemoryAttribute* out_attr, size_t* out_blocks_needed, - KProcessAddress addr, size_t size, KMemoryState state_mask, - KMemoryState state, KMemoryPermission perm_mask, - KMemoryPermission perm, KMemoryAttribute attr_mask, - KMemoryAttribute attr, KMemoryAttribute ignore_attr) const { - ASSERT(this->IsLockedByCurrentThread()); - - // Check memory state. - const KProcessAddress last_addr = addr + size - 1; - KMemoryBlockManager::const_iterator it = m_memory_block_manager.FindIterator(addr); - R_TRY(this->CheckMemoryState(out_state, out_perm, out_attr, out_blocks_needed, it, last_addr, - state_mask, state, perm_mask, perm, attr_mask, attr, ignore_attr)); - - // If the start address isn't aligned, we need a block. - if (out_blocks_needed != nullptr && - Common::AlignDown(GetInteger(addr), PageSize) != it->GetAddress()) { - ++(*out_blocks_needed); - } - - R_SUCCEED(); -} - -Result KPageTable::LockMemoryAndOpen(KPageGroup* out_pg, KPhysicalAddress* out_KPhysicalAddress, - KProcessAddress addr, size_t size, KMemoryState state_mask, - KMemoryState state, KMemoryPermission perm_mask, - KMemoryPermission perm, KMemoryAttribute attr_mask, - KMemoryAttribute attr, KMemoryPermission new_perm, - KMemoryAttribute lock_attr) { - // Validate basic preconditions. - ASSERT((lock_attr & attr) == KMemoryAttribute::None); - ASSERT((lock_attr & (KMemoryAttribute::IpcLocked | KMemoryAttribute::DeviceShared)) == - KMemoryAttribute::None); - - // Validate the lock request. - const size_t num_pages = size / PageSize; - R_UNLESS(this->Contains(addr, size), ResultInvalidCurrentMemory); - - // Lock the table. - KScopedLightLock lk(m_general_lock); - - // Check that the output page group is empty, if it exists. - if (out_pg) { - ASSERT(out_pg->GetNumPages() == 0); - } - - // Check the state. - KMemoryState old_state{}; - KMemoryPermission old_perm{}; - KMemoryAttribute old_attr{}; - size_t num_allocator_blocks{}; - R_TRY(this->CheckMemoryState(std::addressof(old_state), std::addressof(old_perm), - std::addressof(old_attr), std::addressof(num_allocator_blocks), - addr, size, state_mask | KMemoryState::FlagReferenceCounted, - state | KMemoryState::FlagReferenceCounted, perm_mask, perm, - attr_mask, attr)); - - // Get the physical address, if we're supposed to. - if (out_KPhysicalAddress != nullptr) { - ASSERT(this->GetPhysicalAddressLocked(out_KPhysicalAddress, addr)); - } - - // Make the page group, if we're supposed to. - if (out_pg != nullptr) { - R_TRY(this->MakePageGroup(*out_pg, addr, num_pages)); - } - - // Create an update allocator. - Result allocator_result{ResultSuccess}; - KMemoryBlockManagerUpdateAllocator allocator(std::addressof(allocator_result), - m_memory_block_slab_manager, num_allocator_blocks); - R_TRY(allocator_result); - - // Decide on new perm and attr. - new_perm = (new_perm != KMemoryPermission::None) ? new_perm : old_perm; - KMemoryAttribute new_attr = static_cast(old_attr | lock_attr); - - // Update permission, if we need to. - if (new_perm != old_perm) { - R_TRY(Operate(addr, num_pages, new_perm, OperationType::ChangePermissions)); - } - - // Apply the memory block updates. - m_memory_block_manager.Update(std::addressof(allocator), addr, num_pages, old_state, new_perm, - new_attr, KMemoryBlockDisableMergeAttribute::Locked, - KMemoryBlockDisableMergeAttribute::None); - - // If we have an output page group, open. - if (out_pg) { - out_pg->Open(); - } - - R_SUCCEED(); -} - -Result KPageTable::UnlockMemory(KProcessAddress addr, size_t size, KMemoryState state_mask, - KMemoryState state, KMemoryPermission perm_mask, - KMemoryPermission perm, KMemoryAttribute attr_mask, - KMemoryAttribute attr, KMemoryPermission new_perm, - KMemoryAttribute lock_attr, const KPageGroup* pg) { - // Validate basic preconditions. - ASSERT((attr_mask & lock_attr) == lock_attr); - ASSERT((attr & lock_attr) == lock_attr); - - // Validate the unlock request. - const size_t num_pages = size / PageSize; - R_UNLESS(this->Contains(addr, size), ResultInvalidCurrentMemory); - - // Lock the table. - KScopedLightLock lk(m_general_lock); - - // Check the state. - KMemoryState old_state{}; - KMemoryPermission old_perm{}; - KMemoryAttribute old_attr{}; - size_t num_allocator_blocks{}; - R_TRY(this->CheckMemoryState(std::addressof(old_state), std::addressof(old_perm), - std::addressof(old_attr), std::addressof(num_allocator_blocks), - addr, size, state_mask | KMemoryState::FlagReferenceCounted, - state | KMemoryState::FlagReferenceCounted, perm_mask, perm, - attr_mask, attr)); - - // Check the page group. - if (pg != nullptr) { - R_UNLESS(this->IsValidPageGroup(*pg, addr, num_pages), ResultInvalidMemoryRegion); - } - - // Decide on new perm and attr. - new_perm = (new_perm != KMemoryPermission::None) ? new_perm : old_perm; - KMemoryAttribute new_attr = static_cast(old_attr & ~lock_attr); - - // Create an update allocator. - Result allocator_result{ResultSuccess}; - KMemoryBlockManagerUpdateAllocator allocator(std::addressof(allocator_result), - m_memory_block_slab_manager, num_allocator_blocks); - R_TRY(allocator_result); - - // Update permission, if we need to. - if (new_perm != old_perm) { - R_TRY(Operate(addr, num_pages, new_perm, OperationType::ChangePermissions)); - } - - // Apply the memory block updates. - m_memory_block_manager.Update(std::addressof(allocator), addr, num_pages, old_state, new_perm, - new_attr, KMemoryBlockDisableMergeAttribute::None, - KMemoryBlockDisableMergeAttribute::Locked); - - R_SUCCEED(); -} - -} // namespace Kernel diff --git a/src/core/hle/kernel/k_page_table.h b/src/core/hle/kernel/k_page_table.h index 66f16faaf9..5541bc13f8 100644 --- a/src/core/hle/kernel/k_page_table.h +++ b/src/core/hle/kernel/k_page_table.h @@ -3,548 +3,14 @@ #pragma once -#include - -#include "common/common_funcs.h" -#include "common/page_table.h" -#include "core/file_sys/program_metadata.h" -#include "core/hle/kernel/k_dynamic_resource_manager.h" -#include "core/hle/kernel/k_light_lock.h" -#include "core/hle/kernel/k_memory_block.h" -#include "core/hle/kernel/k_memory_block_manager.h" -#include "core/hle/kernel/k_memory_layout.h" -#include "core/hle/kernel/k_memory_manager.h" -#include "core/hle/kernel/k_typed_address.h" -#include "core/hle/result.h" -#include "core/memory.h" - -namespace Core { -class System; -} +#include "core/hle/kernel/k_page_table_base.h" namespace Kernel { -enum class DisableMergeAttribute : u8 { - None = (0U << 0), - DisableHead = (1U << 0), - DisableHeadAndBody = (1U << 1), - EnableHeadAndBody = (1U << 2), - DisableTail = (1U << 3), - EnableTail = (1U << 4), - EnableAndMergeHeadBodyTail = (1U << 5), - EnableHeadBodyTail = EnableHeadAndBody | EnableTail, - DisableHeadBodyTail = DisableHeadAndBody | DisableTail, -}; - -struct KPageProperties { - KMemoryPermission perm; - bool io; - bool uncached; - DisableMergeAttribute disable_merge_attributes; -}; -static_assert(std::is_trivial_v); -static_assert(sizeof(KPageProperties) == sizeof(u32)); - -class KBlockInfoManager; -class KMemoryBlockManager; -class KResourceLimit; -class KSystemResource; - -class KPageTable final { -protected: - struct PageLinkedList; - +class KPageTable final : public KPageTableBase { public: - enum class ICacheInvalidationStrategy : u32 { InvalidateRange, InvalidateAll }; - - YUZU_NON_COPYABLE(KPageTable); - YUZU_NON_MOVEABLE(KPageTable); - - explicit KPageTable(Core::System& system_); - ~KPageTable(); - - Result InitializeForProcess(Svc::CreateProcessFlag as_type, bool enable_aslr, - bool enable_das_merge, bool from_back, KMemoryManager::Pool pool, - KProcessAddress code_addr, size_t code_size, - KSystemResource* system_resource, KResourceLimit* resource_limit, - Core::Memory::Memory& memory); - - void Finalize(); - - Result MapProcessCode(KProcessAddress addr, size_t pages_count, KMemoryState state, - KMemoryPermission perm); - Result MapCodeMemory(KProcessAddress dst_address, KProcessAddress src_address, size_t size); - Result UnmapCodeMemory(KProcessAddress dst_address, KProcessAddress src_address, size_t size, - ICacheInvalidationStrategy icache_invalidation_strategy); - Result UnmapProcessMemory(KProcessAddress dst_addr, size_t size, KPageTable& src_page_table, - KProcessAddress src_addr); - Result MapPhysicalMemory(KProcessAddress addr, size_t size); - Result UnmapPhysicalMemory(KProcessAddress addr, size_t size); - Result MapMemory(KProcessAddress dst_addr, KProcessAddress src_addr, size_t size); - Result UnmapMemory(KProcessAddress dst_addr, KProcessAddress src_addr, size_t size); - Result SetProcessMemoryPermission(KProcessAddress addr, size_t size, - Svc::MemoryPermission svc_perm); - KMemoryInfo QueryInfo(KProcessAddress addr); - Result SetMemoryPermission(KProcessAddress addr, size_t size, Svc::MemoryPermission perm); - Result SetMemoryAttribute(KProcessAddress addr, size_t size, u32 mask, u32 attr); - Result SetMaxHeapSize(size_t size); - Result SetHeapSize(u64* out, size_t size); - Result LockForMapDeviceAddressSpace(bool* out_is_io, KProcessAddress address, size_t size, - KMemoryPermission perm, bool is_aligned, bool check_heap); - Result LockForUnmapDeviceAddressSpace(KProcessAddress address, size_t size, bool check_heap); - - Result UnlockForDeviceAddressSpace(KProcessAddress addr, size_t size); - - Result LockForIpcUserBuffer(KPhysicalAddress* out, KProcessAddress address, size_t size); - Result UnlockForIpcUserBuffer(KProcessAddress address, size_t size); - - Result SetupForIpc(KProcessAddress* out_dst_addr, size_t size, KProcessAddress src_addr, - KPageTable& src_page_table, KMemoryPermission test_perm, - KMemoryState dst_state, bool send); - Result CleanupForIpcServer(KProcessAddress address, size_t size, KMemoryState dst_state); - Result CleanupForIpcClient(KProcessAddress address, size_t size, KMemoryState dst_state); - - Result LockForTransferMemory(KPageGroup* out, KProcessAddress address, size_t size, - KMemoryPermission perm); - Result UnlockForTransferMemory(KProcessAddress address, size_t size, const KPageGroup& pg); - Result LockForCodeMemory(KPageGroup* out, KProcessAddress addr, size_t size); - Result UnlockForCodeMemory(KProcessAddress addr, size_t size, const KPageGroup& pg); - Result MakeAndOpenPageGroup(KPageGroup* out, KProcessAddress address, size_t num_pages, - KMemoryState state_mask, KMemoryState state, - KMemoryPermission perm_mask, KMemoryPermission perm, - KMemoryAttribute attr_mask, KMemoryAttribute attr); - - Common::PageTable& PageTableImpl() { - return *m_page_table_impl; - } - - const Common::PageTable& PageTableImpl() const { - return *m_page_table_impl; - } - - KBlockInfoManager* GetBlockInfoManager() { - return m_block_info_manager; - } - - Result MapPages(KProcessAddress* out_addr, size_t num_pages, size_t alignment, - KPhysicalAddress phys_addr, KProcessAddress region_start, - size_t region_num_pages, KMemoryState state, KMemoryPermission perm) { - R_RETURN(this->MapPages(out_addr, num_pages, alignment, phys_addr, true, region_start, - region_num_pages, state, perm)); - } - - Result MapPages(KProcessAddress* out_addr, size_t num_pages, size_t alignment, - KPhysicalAddress phys_addr, KMemoryState state, KMemoryPermission perm) { - R_RETURN(this->MapPages(out_addr, num_pages, alignment, phys_addr, true, - this->GetRegionAddress(state), - this->GetRegionSize(state) / PageSize, state, perm)); - } - - Result MapPages(KProcessAddress* out_addr, size_t num_pages, KMemoryState state, - KMemoryPermission perm) { - R_RETURN(this->MapPages(out_addr, num_pages, PageSize, 0, false, - this->GetRegionAddress(state), - this->GetRegionSize(state) / PageSize, state, perm)); - } - - Result MapPages(KProcessAddress address, size_t num_pages, KMemoryState state, - KMemoryPermission perm); - Result UnmapPages(KProcessAddress address, size_t num_pages, KMemoryState state); - - Result MapPageGroup(KProcessAddress* out_addr, const KPageGroup& pg, - KProcessAddress region_start, size_t region_num_pages, KMemoryState state, - KMemoryPermission perm); - Result MapPageGroup(KProcessAddress address, const KPageGroup& pg, KMemoryState state, - KMemoryPermission perm); - Result UnmapPageGroup(KProcessAddress address, const KPageGroup& pg, KMemoryState state); - void RemapPageGroup(PageLinkedList* page_list, KProcessAddress address, size_t size, - const KPageGroup& pg); - - KProcessAddress GetRegionAddress(Svc::MemoryState state) const; - size_t GetRegionSize(Svc::MemoryState state) const; - bool CanContain(KProcessAddress addr, size_t size, Svc::MemoryState state) const; - - KProcessAddress GetRegionAddress(KMemoryState state) const { - return this->GetRegionAddress(static_cast(state & KMemoryState::Mask)); - } - size_t GetRegionSize(KMemoryState state) const { - return this->GetRegionSize(static_cast(state & KMemoryState::Mask)); - } - bool CanContain(KProcessAddress addr, size_t size, KMemoryState state) const { - return this->CanContain(addr, size, - static_cast(state & KMemoryState::Mask)); - } - -protected: - struct PageLinkedList { - private: - struct Node { - Node* m_next; - std::array m_buffer; - }; - - public: - constexpr PageLinkedList() = default; - - void Push(Node* n) { - ASSERT(Common::IsAligned(reinterpret_cast(n), PageSize)); - n->m_next = m_root; - m_root = n; - } - - void Push(Core::Memory::Memory& memory, KVirtualAddress addr) { - this->Push(memory.GetPointer(GetInteger(addr))); - } - - Node* Peek() const { - return m_root; - } - - Node* Pop() { - Node* const r = m_root; - - m_root = r->m_next; - r->m_next = nullptr; - - return r; - } - - private: - Node* m_root{}; - }; - static_assert(std::is_trivially_destructible::value); - -private: - enum class OperationType : u32 { - Map = 0, - MapGroup = 1, - MapFirstGroup = 2, - Unmap = 3, - ChangePermissions = 4, - ChangePermissionsAndRefresh = 5, - ChangePermissionsAndRefreshAndFlush = 6, - Separate = 7, - }; - - static constexpr KMemoryAttribute DefaultMemoryIgnoreAttr = - KMemoryAttribute::IpcLocked | KMemoryAttribute::DeviceShared; - - Result MapPages(KProcessAddress* out_addr, size_t num_pages, size_t alignment, - KPhysicalAddress phys_addr, bool is_pa_valid, KProcessAddress region_start, - size_t region_num_pages, KMemoryState state, KMemoryPermission perm); - bool IsRegionContiguous(KProcessAddress addr, u64 size) const; - void AddRegionToPages(KProcessAddress start, size_t num_pages, KPageGroup& page_linked_list); - KMemoryInfo QueryInfoImpl(KProcessAddress addr); - KProcessAddress AllocateVirtualMemory(KProcessAddress start, size_t region_num_pages, - u64 needed_num_pages, size_t align); - Result Operate(KProcessAddress addr, size_t num_pages, const KPageGroup& page_group, - OperationType operation); - Result Operate(KProcessAddress addr, size_t num_pages, KMemoryPermission perm, - OperationType operation, KPhysicalAddress map_addr = 0); - void FinalizeUpdate(PageLinkedList* page_list); - - KProcessAddress FindFreeArea(KProcessAddress region_start, size_t region_num_pages, - size_t num_pages, size_t alignment, size_t offset, - size_t guard_pages); - - Result CheckMemoryStateContiguous(size_t* out_blocks_needed, KProcessAddress addr, size_t size, - KMemoryState state_mask, KMemoryState state, - KMemoryPermission perm_mask, KMemoryPermission perm, - KMemoryAttribute attr_mask, KMemoryAttribute attr) const; - Result CheckMemoryStateContiguous(KProcessAddress addr, size_t size, KMemoryState state_mask, - KMemoryState state, KMemoryPermission perm_mask, - KMemoryPermission perm, KMemoryAttribute attr_mask, - KMemoryAttribute attr) const { - R_RETURN(this->CheckMemoryStateContiguous(nullptr, addr, size, state_mask, state, perm_mask, - perm, attr_mask, attr)); - } - - Result CheckMemoryState(const KMemoryInfo& info, KMemoryState state_mask, KMemoryState state, - KMemoryPermission perm_mask, KMemoryPermission perm, - KMemoryAttribute attr_mask, KMemoryAttribute attr) const; - Result CheckMemoryState(KMemoryState* out_state, KMemoryPermission* out_perm, - KMemoryAttribute* out_attr, size_t* out_blocks_needed, - KMemoryBlockManager::const_iterator it, KProcessAddress last_addr, - KMemoryState state_mask, KMemoryState state, - KMemoryPermission perm_mask, KMemoryPermission perm, - KMemoryAttribute attr_mask, KMemoryAttribute attr, - KMemoryAttribute ignore_attr = DefaultMemoryIgnoreAttr) const; - Result CheckMemoryState(KMemoryState* out_state, KMemoryPermission* out_perm, - KMemoryAttribute* out_attr, size_t* out_blocks_needed, - KProcessAddress addr, size_t size, KMemoryState state_mask, - KMemoryState state, KMemoryPermission perm_mask, KMemoryPermission perm, - KMemoryAttribute attr_mask, KMemoryAttribute attr, - KMemoryAttribute ignore_attr = DefaultMemoryIgnoreAttr) const; - Result CheckMemoryState(size_t* out_blocks_needed, KProcessAddress addr, size_t size, - KMemoryState state_mask, KMemoryState state, - KMemoryPermission perm_mask, KMemoryPermission perm, - KMemoryAttribute attr_mask, KMemoryAttribute attr, - KMemoryAttribute ignore_attr = DefaultMemoryIgnoreAttr) const { - R_RETURN(CheckMemoryState(nullptr, nullptr, nullptr, out_blocks_needed, addr, size, - state_mask, state, perm_mask, perm, attr_mask, attr, - ignore_attr)); - } - Result CheckMemoryState(KProcessAddress addr, size_t size, KMemoryState state_mask, - KMemoryState state, KMemoryPermission perm_mask, KMemoryPermission perm, - KMemoryAttribute attr_mask, KMemoryAttribute attr, - KMemoryAttribute ignore_attr = DefaultMemoryIgnoreAttr) const { - R_RETURN(this->CheckMemoryState(nullptr, addr, size, state_mask, state, perm_mask, perm, - attr_mask, attr, ignore_attr)); - } - - Result LockMemoryAndOpen(KPageGroup* out_pg, KPhysicalAddress* out_KPhysicalAddress, - KProcessAddress addr, size_t size, KMemoryState state_mask, - KMemoryState state, KMemoryPermission perm_mask, - KMemoryPermission perm, KMemoryAttribute attr_mask, - KMemoryAttribute attr, KMemoryPermission new_perm, - KMemoryAttribute lock_attr); - Result UnlockMemory(KProcessAddress addr, size_t size, KMemoryState state_mask, - KMemoryState state, KMemoryPermission perm_mask, KMemoryPermission perm, - KMemoryAttribute attr_mask, KMemoryAttribute attr, - KMemoryPermission new_perm, KMemoryAttribute lock_attr, - const KPageGroup* pg); - - Result MakePageGroup(KPageGroup& pg, KProcessAddress addr, size_t num_pages); - bool IsValidPageGroup(const KPageGroup& pg, KProcessAddress addr, size_t num_pages); - - bool IsLockedByCurrentThread() const { - return m_general_lock.IsLockedByCurrentThread(); - } - - bool IsHeapPhysicalAddress(const KMemoryLayout& layout, KPhysicalAddress phys_addr) { - ASSERT(this->IsLockedByCurrentThread()); - - return layout.IsHeapPhysicalAddress(m_cached_physical_heap_region, phys_addr); - } - - bool GetPhysicalAddressLocked(KPhysicalAddress* out, KProcessAddress virt_addr) const { - ASSERT(this->IsLockedByCurrentThread()); - - *out = GetPhysicalAddr(virt_addr); - - return *out != 0; - } - - Result SetupForIpcClient(PageLinkedList* page_list, size_t* out_blocks_needed, - KProcessAddress address, size_t size, KMemoryPermission test_perm, - KMemoryState dst_state); - Result SetupForIpcServer(KProcessAddress* out_addr, size_t size, KProcessAddress src_addr, - KMemoryPermission test_perm, KMemoryState dst_state, - KPageTable& src_page_table, bool send); - void CleanupForIpcClientOnServerSetupFailure(PageLinkedList* page_list, KProcessAddress address, - size_t size, KMemoryPermission prot_perm); - - Result AllocateAndMapPagesImpl(PageLinkedList* page_list, KProcessAddress address, - size_t num_pages, KMemoryPermission perm); - Result MapPageGroupImpl(PageLinkedList* page_list, KProcessAddress address, - const KPageGroup& pg, const KPageProperties properties, bool reuse_ll); - - mutable KLightLock m_general_lock; - mutable KLightLock m_map_physical_memory_lock; - -public: - constexpr KProcessAddress GetAddressSpaceStart() const { - return m_address_space_start; - } - constexpr KProcessAddress GetAddressSpaceEnd() const { - return m_address_space_end; - } - constexpr size_t GetAddressSpaceSize() const { - return m_address_space_end - m_address_space_start; - } - constexpr KProcessAddress GetHeapRegionStart() const { - return m_heap_region_start; - } - constexpr KProcessAddress GetHeapRegionEnd() const { - return m_heap_region_end; - } - constexpr size_t GetHeapRegionSize() const { - return m_heap_region_end - m_heap_region_start; - } - constexpr KProcessAddress GetAliasRegionStart() const { - return m_alias_region_start; - } - constexpr KProcessAddress GetAliasRegionEnd() const { - return m_alias_region_end; - } - constexpr size_t GetAliasRegionSize() const { - return m_alias_region_end - m_alias_region_start; - } - constexpr KProcessAddress GetStackRegionStart() const { - return m_stack_region_start; - } - constexpr KProcessAddress GetStackRegionEnd() const { - return m_stack_region_end; - } - constexpr size_t GetStackRegionSize() const { - return m_stack_region_end - m_stack_region_start; - } - constexpr KProcessAddress GetKernelMapRegionStart() const { - return m_kernel_map_region_start; - } - constexpr KProcessAddress GetKernelMapRegionEnd() const { - return m_kernel_map_region_end; - } - constexpr KProcessAddress GetCodeRegionStart() const { - return m_code_region_start; - } - constexpr KProcessAddress GetCodeRegionEnd() const { - return m_code_region_end; - } - constexpr KProcessAddress GetAliasCodeRegionStart() const { - return m_alias_code_region_start; - } - constexpr KProcessAddress GetAliasCodeRegionEnd() const { - return m_alias_code_region_end; - } - constexpr size_t GetAliasCodeRegionSize() const { - return m_alias_code_region_end - m_alias_code_region_start; - } - size_t GetNormalMemorySize() const { - KScopedLightLock lk(m_general_lock); - return GetHeapSize() + m_mapped_physical_memory_size; - } - constexpr size_t GetAddressSpaceWidth() const { - return m_address_space_width; - } - constexpr size_t GetHeapSize() const { - return m_current_heap_end - m_heap_region_start; - } - constexpr size_t GetNumGuardPages() const { - return IsKernel() ? 1 : 4; - } - KPhysicalAddress GetPhysicalAddr(KProcessAddress addr) const { - const auto backing_addr = m_page_table_impl->backing_addr[addr >> PageBits]; - ASSERT(backing_addr); - return backing_addr + GetInteger(addr); - } - constexpr bool Contains(KProcessAddress addr) const { - return m_address_space_start <= addr && addr <= m_address_space_end - 1; - } - constexpr bool Contains(KProcessAddress addr, size_t size) const { - return m_address_space_start <= addr && addr < addr + size && - addr + size - 1 <= m_address_space_end - 1; - } - constexpr bool IsInAliasRegion(KProcessAddress addr, size_t size) const { - return this->Contains(addr, size) && m_alias_region_start <= addr && - addr + size - 1 <= m_alias_region_end - 1; - } - constexpr bool IsInHeapRegion(KProcessAddress addr, size_t size) const { - return this->Contains(addr, size) && m_heap_region_start <= addr && - addr + size - 1 <= m_heap_region_end - 1; - } - -public: - static KVirtualAddress GetLinearMappedVirtualAddress(const KMemoryLayout& layout, - KPhysicalAddress addr) { - return layout.GetLinearVirtualAddress(addr); - } - - static KPhysicalAddress GetLinearMappedPhysicalAddress(const KMemoryLayout& layout, - KVirtualAddress addr) { - return layout.GetLinearPhysicalAddress(addr); - } - - static KVirtualAddress GetHeapVirtualAddress(const KMemoryLayout& layout, - KPhysicalAddress addr) { - return GetLinearMappedVirtualAddress(layout, addr); - } - - static KPhysicalAddress GetHeapPhysicalAddress(const KMemoryLayout& layout, - KVirtualAddress addr) { - return GetLinearMappedPhysicalAddress(layout, addr); - } - - static KVirtualAddress GetPageTableVirtualAddress(const KMemoryLayout& layout, - KPhysicalAddress addr) { - return GetLinearMappedVirtualAddress(layout, addr); - } - - static KPhysicalAddress GetPageTablePhysicalAddress(const KMemoryLayout& layout, - KVirtualAddress addr) { - return GetLinearMappedPhysicalAddress(layout, addr); - } - -private: - constexpr bool IsKernel() const { - return m_is_kernel; - } - constexpr bool IsAslrEnabled() const { - return m_enable_aslr; - } - - constexpr bool ContainsPages(KProcessAddress addr, size_t num_pages) const { - return (m_address_space_start <= addr) && - (num_pages <= (m_address_space_end - m_address_space_start) / PageSize) && - (addr + num_pages * PageSize - 1 <= m_address_space_end - 1); - } - -private: - class KScopedPageTableUpdater { - private: - KPageTable* m_pt{}; - PageLinkedList m_ll; - - public: - explicit KScopedPageTableUpdater(KPageTable* pt) : m_pt(pt) {} - explicit KScopedPageTableUpdater(KPageTable& pt) : KScopedPageTableUpdater(&pt) {} - ~KScopedPageTableUpdater() { - m_pt->FinalizeUpdate(this->GetPageList()); - } - - PageLinkedList* GetPageList() { - return std::addressof(m_ll); - } - }; - -private: - KProcessAddress m_address_space_start{}; - KProcessAddress m_address_space_end{}; - KProcessAddress m_heap_region_start{}; - KProcessAddress m_heap_region_end{}; - KProcessAddress m_current_heap_end{}; - KProcessAddress m_alias_region_start{}; - KProcessAddress m_alias_region_end{}; - KProcessAddress m_stack_region_start{}; - KProcessAddress m_stack_region_end{}; - KProcessAddress m_kernel_map_region_start{}; - KProcessAddress m_kernel_map_region_end{}; - KProcessAddress m_code_region_start{}; - KProcessAddress m_code_region_end{}; - KProcessAddress m_alias_code_region_start{}; - KProcessAddress m_alias_code_region_end{}; - - size_t m_max_heap_size{}; - size_t m_mapped_physical_memory_size{}; - size_t m_mapped_unsafe_physical_memory{}; - size_t m_mapped_insecure_memory{}; - size_t m_mapped_ipc_server_memory{}; - size_t m_address_space_width{}; - - KMemoryBlockManager m_memory_block_manager; - u32 m_allocate_option{}; - - bool m_is_kernel{}; - bool m_enable_aslr{}; - bool m_enable_device_address_space_merge{}; - - KMemoryBlockSlabManager* m_memory_block_slab_manager{}; - KBlockInfoManager* m_block_info_manager{}; - KResourceLimit* m_resource_limit{}; - - u32 m_heap_fill_value{}; - u32 m_ipc_fill_value{}; - u32 m_stack_fill_value{}; - const KMemoryRegion* m_cached_physical_heap_region{}; - - KMemoryManager::Pool m_memory_pool{KMemoryManager::Pool::Application}; - KMemoryManager::Direction m_allocation_option{KMemoryManager::Direction::FromFront}; - - std::unique_ptr m_page_table_impl; - - Core::System& m_system; - KernelCore& m_kernel; - Core::Memory::Memory* m_memory{}; + explicit KPageTable(KernelCore& kernel) : KPageTableBase(kernel) {} + ~KPageTable() = default; }; } // namespace Kernel diff --git a/src/core/hle/kernel/k_page_table_base.cpp b/src/core/hle/kernel/k_page_table_base.cpp new file mode 100644 index 0000000000..1cc019c066 --- /dev/null +++ b/src/core/hle/kernel/k_page_table_base.cpp @@ -0,0 +1,5718 @@ +// SPDX-FileCopyrightText: Copyright 2023 yuzu Emulator Project +// SPDX-License-Identifier: GPL-2.0-or-later + +#include "common/scope_exit.h" +#include "common/settings.h" +#include "core/core.h" +#include "core/hle/kernel/k_address_space_info.h" +#include "core/hle/kernel/k_page_table_base.h" +#include "core/hle/kernel/k_scoped_resource_reservation.h" +#include "core/hle/kernel/k_system_resource.h" + +namespace Kernel { + +namespace { + +class KScopedLightLockPair { + YUZU_NON_COPYABLE(KScopedLightLockPair); + YUZU_NON_MOVEABLE(KScopedLightLockPair); + +private: + KLightLock* m_lower; + KLightLock* m_upper; + +public: + KScopedLightLockPair(KLightLock& lhs, KLightLock& rhs) { + // Ensure our locks are in a consistent order. + if (std::addressof(lhs) <= std::addressof(rhs)) { + m_lower = std::addressof(lhs); + m_upper = std::addressof(rhs); + } else { + m_lower = std::addressof(rhs); + m_upper = std::addressof(lhs); + } + + // Acquire both locks. + m_lower->Lock(); + if (m_lower != m_upper) { + m_upper->Lock(); + } + } + + ~KScopedLightLockPair() { + // Unlock the upper lock. + if (m_upper != nullptr && m_upper != m_lower) { + m_upper->Unlock(); + } + + // Unlock the lower lock. + if (m_lower != nullptr) { + m_lower->Unlock(); + } + } + +public: + // Utility. + void TryUnlockHalf(KLightLock& lock) { + // Only allow unlocking if the lock is half the pair. + if (m_lower != m_upper) { + // We want to be sure the lock is one we own. + if (m_lower == std::addressof(lock)) { + lock.Unlock(); + m_lower = nullptr; + } else if (m_upper == std::addressof(lock)) { + lock.Unlock(); + m_upper = nullptr; + } + } + } +}; + +void InvalidateEntireInstructionCache(Core::System& system) { + system.InvalidateCpuInstructionCaches(); +} + +template +Result InvalidateDataCache(AddressType addr, u64 size) { + R_SUCCEED(); +} + +template +Result StoreDataCache(AddressType addr, u64 size) { + R_SUCCEED(); +} + +template +Result FlushDataCache(AddressType addr, u64 size) { + R_SUCCEED(); +} + +} // namespace + +void KPageTableBase::MemoryRange::Open() { + // If the range contains heap pages, open them. + if (this->IsHeap()) { + m_kernel.MemoryManager().Open(this->GetAddress(), this->GetSize() / PageSize); + } +} + +void KPageTableBase::MemoryRange::Close() { + // If the range contains heap pages, close them. + if (this->IsHeap()) { + m_kernel.MemoryManager().Close(this->GetAddress(), this->GetSize() / PageSize); + } +} + +KPageTableBase::KPageTableBase(KernelCore& kernel) + : m_kernel(kernel), m_system(kernel.System()), m_general_lock(kernel), + m_map_physical_memory_lock(kernel), m_device_map_lock(kernel) {} +KPageTableBase::~KPageTableBase() = default; + +Result KPageTableBase::InitializeForKernel(bool is_64_bit, KVirtualAddress start, + KVirtualAddress end, Core::Memory::Memory& memory) { + // Initialize our members. + m_address_space_width = + static_cast(is_64_bit ? Common::BitSize() : Common::BitSize()); + m_address_space_start = KProcessAddress(GetInteger(start)); + m_address_space_end = KProcessAddress(GetInteger(end)); + m_is_kernel = true; + m_enable_aslr = true; + m_enable_device_address_space_merge = false; + + m_heap_region_start = 0; + m_heap_region_end = 0; + m_current_heap_end = 0; + m_alias_region_start = 0; + m_alias_region_end = 0; + m_stack_region_start = 0; + m_stack_region_end = 0; + m_kernel_map_region_start = 0; + m_kernel_map_region_end = 0; + m_alias_code_region_start = 0; + m_alias_code_region_end = 0; + m_code_region_start = 0; + m_code_region_end = 0; + m_max_heap_size = 0; + m_mapped_physical_memory_size = 0; + m_mapped_unsafe_physical_memory = 0; + m_mapped_insecure_memory = 0; + m_mapped_ipc_server_memory = 0; + + m_memory_block_slab_manager = + m_kernel.GetSystemSystemResource().GetMemoryBlockSlabManagerPointer(); + m_block_info_manager = m_kernel.GetSystemSystemResource().GetBlockInfoManagerPointer(); + m_resource_limit = m_kernel.GetSystemResourceLimit(); + + m_allocate_option = KMemoryManager::EncodeOption(KMemoryManager::Pool::System, + KMemoryManager::Direction::FromFront); + m_heap_fill_value = MemoryFillValue_Zero; + m_ipc_fill_value = MemoryFillValue_Zero; + m_stack_fill_value = MemoryFillValue_Zero; + + m_cached_physical_linear_region = nullptr; + m_cached_physical_heap_region = nullptr; + + // Initialize our implementation. + m_impl = std::make_unique(); + m_impl->Resize(m_address_space_width, PageBits); + + // Set the tracking memory. + m_memory = std::addressof(memory); + + // Initialize our memory block manager. + R_RETURN(m_memory_block_manager.Initialize(m_address_space_start, m_address_space_end, + m_memory_block_slab_manager)); +} + +Result KPageTableBase::InitializeForProcess(Svc::CreateProcessFlag as_type, bool enable_aslr, + bool enable_das_merge, bool from_back, + KMemoryManager::Pool pool, KProcessAddress code_address, + size_t code_size, KSystemResource* system_resource, + KResourceLimit* resource_limit, + Core::Memory::Memory& memory) { + // Calculate region extents. + const size_t as_width = GetAddressSpaceWidth(as_type); + const KProcessAddress start = 0; + const KProcessAddress end = (1ULL << as_width); + + // Validate the region. + ASSERT(start <= code_address); + ASSERT(code_address < code_address + code_size); + ASSERT(code_address + code_size - 1 <= end - 1); + + // Define helpers. + auto GetSpaceStart = [&](KAddressSpaceInfo::Type type) { + return KAddressSpaceInfo::GetAddressSpaceStart(m_address_space_width, type); + }; + auto GetSpaceSize = [&](KAddressSpaceInfo::Type type) { + return KAddressSpaceInfo::GetAddressSpaceSize(m_address_space_width, type); + }; + + // Set our bit width and heap/alias sizes. + m_address_space_width = static_cast(GetAddressSpaceWidth(as_type)); + size_t alias_region_size = GetSpaceSize(KAddressSpaceInfo::Type::Alias); + size_t heap_region_size = GetSpaceSize(KAddressSpaceInfo::Type::Heap); + + // Adjust heap/alias size if we don't have an alias region. + if ((as_type & Svc::CreateProcessFlag::AddressSpaceMask) == + Svc::CreateProcessFlag::AddressSpace32BitWithoutAlias) { + heap_region_size += alias_region_size; + alias_region_size = 0; + } + + // Set code regions and determine remaining sizes. + KProcessAddress process_code_start; + KProcessAddress process_code_end; + size_t stack_region_size; + size_t kernel_map_region_size; + if (m_address_space_width == 39) { + alias_region_size = GetSpaceSize(KAddressSpaceInfo::Type::Alias); + heap_region_size = GetSpaceSize(KAddressSpaceInfo::Type::Heap); + stack_region_size = GetSpaceSize(KAddressSpaceInfo::Type::Stack); + kernel_map_region_size = GetSpaceSize(KAddressSpaceInfo::Type::MapSmall); + m_code_region_start = GetSpaceStart(KAddressSpaceInfo::Type::Map39Bit); + m_code_region_end = m_code_region_start + GetSpaceSize(KAddressSpaceInfo::Type::Map39Bit); + m_alias_code_region_start = m_code_region_start; + m_alias_code_region_end = m_code_region_end; + process_code_start = Common::AlignDown(GetInteger(code_address), RegionAlignment); + process_code_end = Common::AlignUp(GetInteger(code_address) + code_size, RegionAlignment); + } else { + stack_region_size = 0; + kernel_map_region_size = 0; + m_code_region_start = GetSpaceStart(KAddressSpaceInfo::Type::MapSmall); + m_code_region_end = m_code_region_start + GetSpaceSize(KAddressSpaceInfo::Type::MapSmall); + m_stack_region_start = m_code_region_start; + m_alias_code_region_start = m_code_region_start; + m_alias_code_region_end = GetSpaceStart(KAddressSpaceInfo::Type::MapLarge) + + GetSpaceSize(KAddressSpaceInfo::Type::MapLarge); + m_stack_region_end = m_code_region_end; + m_kernel_map_region_start = m_code_region_start; + m_kernel_map_region_end = m_code_region_end; + process_code_start = m_code_region_start; + process_code_end = m_code_region_end; + } + + // Set other basic fields. + m_enable_aslr = enable_aslr; + m_enable_device_address_space_merge = enable_das_merge; + m_address_space_start = start; + m_address_space_end = end; + m_is_kernel = false; + m_memory_block_slab_manager = system_resource->GetMemoryBlockSlabManagerPointer(); + m_block_info_manager = system_resource->GetBlockInfoManagerPointer(); + m_resource_limit = resource_limit; + + // Determine the region we can place our undetermineds in. + KProcessAddress alloc_start; + size_t alloc_size; + if ((GetInteger(process_code_start) - GetInteger(m_code_region_start)) >= + (GetInteger(end) - GetInteger(process_code_end))) { + alloc_start = m_code_region_start; + alloc_size = GetInteger(process_code_start) - GetInteger(m_code_region_start); + } else { + alloc_start = process_code_end; + alloc_size = GetInteger(end) - GetInteger(process_code_end); + } + const size_t needed_size = + (alias_region_size + heap_region_size + stack_region_size + kernel_map_region_size); + R_UNLESS(alloc_size >= needed_size, ResultOutOfMemory); + + const size_t remaining_size = alloc_size - needed_size; + + // Determine random placements for each region. + size_t alias_rnd = 0, heap_rnd = 0, stack_rnd = 0, kmap_rnd = 0; + if (enable_aslr) { + alias_rnd = KSystemControl::GenerateRandomRange(0, remaining_size / RegionAlignment) * + RegionAlignment; + heap_rnd = KSystemControl::GenerateRandomRange(0, remaining_size / RegionAlignment) * + RegionAlignment; + stack_rnd = KSystemControl::GenerateRandomRange(0, remaining_size / RegionAlignment) * + RegionAlignment; + kmap_rnd = KSystemControl::GenerateRandomRange(0, remaining_size / RegionAlignment) * + RegionAlignment; + } + + // Setup heap and alias regions. + m_alias_region_start = alloc_start + alias_rnd; + m_alias_region_end = m_alias_region_start + alias_region_size; + m_heap_region_start = alloc_start + heap_rnd; + m_heap_region_end = m_heap_region_start + heap_region_size; + + if (alias_rnd <= heap_rnd) { + m_heap_region_start += alias_region_size; + m_heap_region_end += alias_region_size; + } else { + m_alias_region_start += heap_region_size; + m_alias_region_end += heap_region_size; + } + + // Setup stack region. + if (stack_region_size) { + m_stack_region_start = alloc_start + stack_rnd; + m_stack_region_end = m_stack_region_start + stack_region_size; + + if (alias_rnd < stack_rnd) { + m_stack_region_start += alias_region_size; + m_stack_region_end += alias_region_size; + } else { + m_alias_region_start += stack_region_size; + m_alias_region_end += stack_region_size; + } + + if (heap_rnd < stack_rnd) { + m_stack_region_start += heap_region_size; + m_stack_region_end += heap_region_size; + } else { + m_heap_region_start += stack_region_size; + m_heap_region_end += stack_region_size; + } + } + + // Setup kernel map region. + if (kernel_map_region_size) { + m_kernel_map_region_start = alloc_start + kmap_rnd; + m_kernel_map_region_end = m_kernel_map_region_start + kernel_map_region_size; + + if (alias_rnd < kmap_rnd) { + m_kernel_map_region_start += alias_region_size; + m_kernel_map_region_end += alias_region_size; + } else { + m_alias_region_start += kernel_map_region_size; + m_alias_region_end += kernel_map_region_size; + } + + if (heap_rnd < kmap_rnd) { + m_kernel_map_region_start += heap_region_size; + m_kernel_map_region_end += heap_region_size; + } else { + m_heap_region_start += kernel_map_region_size; + m_heap_region_end += kernel_map_region_size; + } + + if (stack_region_size) { + if (stack_rnd < kmap_rnd) { + m_kernel_map_region_start += stack_region_size; + m_kernel_map_region_end += stack_region_size; + } else { + m_stack_region_start += kernel_map_region_size; + m_stack_region_end += kernel_map_region_size; + } + } + } + + // Set heap and fill members. + m_current_heap_end = m_heap_region_start; + m_max_heap_size = 0; + m_mapped_physical_memory_size = 0; + m_mapped_unsafe_physical_memory = 0; + m_mapped_insecure_memory = 0; + m_mapped_ipc_server_memory = 0; + + // const bool fill_memory = KTargetSystem::IsDebugMemoryFillEnabled(); + const bool fill_memory = false; + m_heap_fill_value = fill_memory ? MemoryFillValue_Heap : MemoryFillValue_Zero; + m_ipc_fill_value = fill_memory ? MemoryFillValue_Ipc : MemoryFillValue_Zero; + m_stack_fill_value = fill_memory ? MemoryFillValue_Stack : MemoryFillValue_Zero; + + // Set allocation option. + m_allocate_option = + KMemoryManager::EncodeOption(pool, from_back ? KMemoryManager::Direction::FromBack + : KMemoryManager::Direction::FromFront); + + // Ensure that we regions inside our address space. + auto IsInAddressSpace = [&](KProcessAddress addr) { + return m_address_space_start <= addr && addr <= m_address_space_end; + }; + ASSERT(IsInAddressSpace(m_alias_region_start)); + ASSERT(IsInAddressSpace(m_alias_region_end)); + ASSERT(IsInAddressSpace(m_heap_region_start)); + ASSERT(IsInAddressSpace(m_heap_region_end)); + ASSERT(IsInAddressSpace(m_stack_region_start)); + ASSERT(IsInAddressSpace(m_stack_region_end)); + ASSERT(IsInAddressSpace(m_kernel_map_region_start)); + ASSERT(IsInAddressSpace(m_kernel_map_region_end)); + + // Ensure that we selected regions that don't overlap. + const KProcessAddress alias_start = m_alias_region_start; + const KProcessAddress alias_last = m_alias_region_end - 1; + const KProcessAddress heap_start = m_heap_region_start; + const KProcessAddress heap_last = m_heap_region_end - 1; + const KProcessAddress stack_start = m_stack_region_start; + const KProcessAddress stack_last = m_stack_region_end - 1; + const KProcessAddress kmap_start = m_kernel_map_region_start; + const KProcessAddress kmap_last = m_kernel_map_region_end - 1; + ASSERT(alias_last < heap_start || heap_last < alias_start); + ASSERT(alias_last < stack_start || stack_last < alias_start); + ASSERT(alias_last < kmap_start || kmap_last < alias_start); + ASSERT(heap_last < stack_start || stack_last < heap_start); + ASSERT(heap_last < kmap_start || kmap_last < heap_start); + + // Initialize our implementation. + m_impl = std::make_unique(); + m_impl->Resize(m_address_space_width, PageBits); + + // Set the tracking memory. + m_memory = std::addressof(memory); + + // Initialize our memory block manager. + R_RETURN(m_memory_block_manager.Initialize(m_address_space_start, m_address_space_end, + m_memory_block_slab_manager)); +} + +void KPageTableBase::Finalize() { + auto HostUnmapCallback = [&](KProcessAddress addr, u64 size) { + if (Settings::IsFastmemEnabled()) { + m_system.DeviceMemory().buffer.Unmap(GetInteger(addr), size); + } + }; + + // Finalize memory blocks. + m_memory_block_manager.Finalize(m_memory_block_slab_manager, std::move(HostUnmapCallback)); + + // Free any unsafe mapped memory. + if (m_mapped_unsafe_physical_memory) { + UNIMPLEMENTED(); + } + + // Release any insecure mapped memory. + if (m_mapped_insecure_memory) { + if (auto* const insecure_resource_limit = + KSystemControl::GetInsecureMemoryResourceLimit(m_kernel); + insecure_resource_limit != nullptr) { + insecure_resource_limit->Release(Svc::LimitableResource::PhysicalMemoryMax, + m_mapped_insecure_memory); + } + } + + // Release any ipc server memory. + if (m_mapped_ipc_server_memory) { + m_resource_limit->Release(Svc::LimitableResource::PhysicalMemoryMax, + m_mapped_ipc_server_memory); + } + + // Invalidate the entire instruction cache. + InvalidateEntireInstructionCache(m_system); + + // Close the backing page table, as the destructor is not called for guest objects. + m_impl.reset(); +} + +KProcessAddress KPageTableBase::GetRegionAddress(Svc::MemoryState state) const { + switch (state) { + case Svc::MemoryState::Free: + case Svc::MemoryState::Kernel: + return m_address_space_start; + case Svc::MemoryState::Normal: + return m_heap_region_start; + case Svc::MemoryState::Ipc: + case Svc::MemoryState::NonSecureIpc: + case Svc::MemoryState::NonDeviceIpc: + return m_alias_region_start; + case Svc::MemoryState::Stack: + return m_stack_region_start; + case Svc::MemoryState::Static: + case Svc::MemoryState::ThreadLocal: + return m_kernel_map_region_start; + case Svc::MemoryState::Io: + case Svc::MemoryState::Shared: + case Svc::MemoryState::AliasCode: + case Svc::MemoryState::AliasCodeData: + case Svc::MemoryState::Transfered: + case Svc::MemoryState::SharedTransfered: + case Svc::MemoryState::SharedCode: + case Svc::MemoryState::GeneratedCode: + case Svc::MemoryState::CodeOut: + case Svc::MemoryState::Coverage: + case Svc::MemoryState::Insecure: + return m_alias_code_region_start; + case Svc::MemoryState::Code: + case Svc::MemoryState::CodeData: + return m_code_region_start; + default: + UNREACHABLE(); + } +} + +size_t KPageTableBase::GetRegionSize(Svc::MemoryState state) const { + switch (state) { + case Svc::MemoryState::Free: + case Svc::MemoryState::Kernel: + return m_address_space_end - m_address_space_start; + case Svc::MemoryState::Normal: + return m_heap_region_end - m_heap_region_start; + case Svc::MemoryState::Ipc: + case Svc::MemoryState::NonSecureIpc: + case Svc::MemoryState::NonDeviceIpc: + return m_alias_region_end - m_alias_region_start; + case Svc::MemoryState::Stack: + return m_stack_region_end - m_stack_region_start; + case Svc::MemoryState::Static: + case Svc::MemoryState::ThreadLocal: + return m_kernel_map_region_end - m_kernel_map_region_start; + case Svc::MemoryState::Io: + case Svc::MemoryState::Shared: + case Svc::MemoryState::AliasCode: + case Svc::MemoryState::AliasCodeData: + case Svc::MemoryState::Transfered: + case Svc::MemoryState::SharedTransfered: + case Svc::MemoryState::SharedCode: + case Svc::MemoryState::GeneratedCode: + case Svc::MemoryState::CodeOut: + case Svc::MemoryState::Coverage: + case Svc::MemoryState::Insecure: + return m_alias_code_region_end - m_alias_code_region_start; + case Svc::MemoryState::Code: + case Svc::MemoryState::CodeData: + return m_code_region_end - m_code_region_start; + default: + UNREACHABLE(); + } +} + +bool KPageTableBase::CanContain(KProcessAddress addr, size_t size, Svc::MemoryState state) const { + const KProcessAddress end = addr + size; + const KProcessAddress last = end - 1; + + const KProcessAddress region_start = this->GetRegionAddress(state); + const size_t region_size = this->GetRegionSize(state); + + const bool is_in_region = + region_start <= addr && addr < end && last <= region_start + region_size - 1; + const bool is_in_heap = !(end <= m_heap_region_start || m_heap_region_end <= addr || + m_heap_region_start == m_heap_region_end); + const bool is_in_alias = !(end <= m_alias_region_start || m_alias_region_end <= addr || + m_alias_region_start == m_alias_region_end); + switch (state) { + case Svc::MemoryState::Free: + case Svc::MemoryState::Kernel: + return is_in_region; + case Svc::MemoryState::Io: + case Svc::MemoryState::Static: + case Svc::MemoryState::Code: + case Svc::MemoryState::CodeData: + case Svc::MemoryState::Shared: + case Svc::MemoryState::AliasCode: + case Svc::MemoryState::AliasCodeData: + case Svc::MemoryState::Stack: + case Svc::MemoryState::ThreadLocal: + case Svc::MemoryState::Transfered: + case Svc::MemoryState::SharedTransfered: + case Svc::MemoryState::SharedCode: + case Svc::MemoryState::GeneratedCode: + case Svc::MemoryState::CodeOut: + case Svc::MemoryState::Coverage: + case Svc::MemoryState::Insecure: + return is_in_region && !is_in_heap && !is_in_alias; + case Svc::MemoryState::Normal: + ASSERT(is_in_heap); + return is_in_region && !is_in_alias; + case Svc::MemoryState::Ipc: + case Svc::MemoryState::NonSecureIpc: + case Svc::MemoryState::NonDeviceIpc: + ASSERT(is_in_alias); + return is_in_region && !is_in_heap; + default: + return false; + } +} + +Result KPageTableBase::CheckMemoryState(const KMemoryInfo& info, KMemoryState state_mask, + KMemoryState state, KMemoryPermission perm_mask, + KMemoryPermission perm, KMemoryAttribute attr_mask, + KMemoryAttribute attr) const { + // Validate the states match expectation. + R_UNLESS((info.m_state & state_mask) == state, ResultInvalidCurrentMemory); + R_UNLESS((info.m_permission & perm_mask) == perm, ResultInvalidCurrentMemory); + R_UNLESS((info.m_attribute & attr_mask) == attr, ResultInvalidCurrentMemory); + + R_SUCCEED(); +} + +Result KPageTableBase::CheckMemoryStateContiguous(size_t* out_blocks_needed, KProcessAddress addr, + size_t size, KMemoryState state_mask, + KMemoryState state, KMemoryPermission perm_mask, + KMemoryPermission perm, + KMemoryAttribute attr_mask, + KMemoryAttribute attr) const { + ASSERT(this->IsLockedByCurrentThread()); + + // Get information about the first block. + const KProcessAddress last_addr = addr + size - 1; + KMemoryBlockManager::const_iterator it = m_memory_block_manager.FindIterator(addr); + KMemoryInfo info = it->GetMemoryInfo(); + + // If the start address isn't aligned, we need a block. + const size_t blocks_for_start_align = + (Common::AlignDown(GetInteger(addr), PageSize) != info.GetAddress()) ? 1 : 0; + + while (true) { + // Validate against the provided masks. + R_TRY(this->CheckMemoryState(info, state_mask, state, perm_mask, perm, attr_mask, attr)); + + // Break once we're done. + if (last_addr <= info.GetLastAddress()) { + break; + } + + // Advance our iterator. + it++; + ASSERT(it != m_memory_block_manager.cend()); + info = it->GetMemoryInfo(); + } + + // If the end address isn't aligned, we need a block. + const size_t blocks_for_end_align = + (Common::AlignUp(GetInteger(addr) + size, PageSize) != info.GetEndAddress()) ? 1 : 0; + + if (out_blocks_needed != nullptr) { + *out_blocks_needed = blocks_for_start_align + blocks_for_end_align; + } + + R_SUCCEED(); +} + +Result KPageTableBase::CheckMemoryState(KMemoryState* out_state, KMemoryPermission* out_perm, + KMemoryAttribute* out_attr, size_t* out_blocks_needed, + KMemoryBlockManager::const_iterator it, + KProcessAddress last_addr, KMemoryState state_mask, + KMemoryState state, KMemoryPermission perm_mask, + KMemoryPermission perm, KMemoryAttribute attr_mask, + KMemoryAttribute attr, KMemoryAttribute ignore_attr) const { + ASSERT(this->IsLockedByCurrentThread()); + + // Get information about the first block. + KMemoryInfo info = it->GetMemoryInfo(); + + // Validate all blocks in the range have correct state. + const KMemoryState first_state = info.m_state; + const KMemoryPermission first_perm = info.m_permission; + const KMemoryAttribute first_attr = info.m_attribute; + while (true) { + // Validate the current block. + R_UNLESS(info.m_state == first_state, ResultInvalidCurrentMemory); + R_UNLESS(info.m_permission == first_perm, ResultInvalidCurrentMemory); + R_UNLESS((info.m_attribute | ignore_attr) == (first_attr | ignore_attr), + ResultInvalidCurrentMemory); + + // Validate against the provided masks. + R_TRY(this->CheckMemoryState(info, state_mask, state, perm_mask, perm, attr_mask, attr)); + + // Break once we're done. + if (last_addr <= info.GetLastAddress()) { + break; + } + + // Advance our iterator. + it++; + ASSERT(it != m_memory_block_manager.cend()); + info = it->GetMemoryInfo(); + } + + // Write output state. + if (out_state != nullptr) { + *out_state = first_state; + } + if (out_perm != nullptr) { + *out_perm = first_perm; + } + if (out_attr != nullptr) { + *out_attr = first_attr & ~ignore_attr; + } + + // If the end address isn't aligned, we need a block. + if (out_blocks_needed != nullptr) { + const size_t blocks_for_end_align = + (Common::AlignDown(GetInteger(last_addr), PageSize) + PageSize != info.GetEndAddress()) + ? 1 + : 0; + *out_blocks_needed = blocks_for_end_align; + } + + R_SUCCEED(); +} + +Result KPageTableBase::CheckMemoryState(KMemoryState* out_state, KMemoryPermission* out_perm, + KMemoryAttribute* out_attr, size_t* out_blocks_needed, + KProcessAddress addr, size_t size, KMemoryState state_mask, + KMemoryState state, KMemoryPermission perm_mask, + KMemoryPermission perm, KMemoryAttribute attr_mask, + KMemoryAttribute attr, KMemoryAttribute ignore_attr) const { + ASSERT(this->IsLockedByCurrentThread()); + + // Check memory state. + const KProcessAddress last_addr = addr + size - 1; + KMemoryBlockManager::const_iterator it = m_memory_block_manager.FindIterator(addr); + R_TRY(this->CheckMemoryState(out_state, out_perm, out_attr, out_blocks_needed, it, last_addr, + state_mask, state, perm_mask, perm, attr_mask, attr, ignore_attr)); + + // If the start address isn't aligned, we need a block. + if (out_blocks_needed != nullptr && + Common::AlignDown(GetInteger(addr), PageSize) != it->GetAddress()) { + ++(*out_blocks_needed); + } + + R_SUCCEED(); +} + +Result KPageTableBase::LockMemoryAndOpen(KPageGroup* out_pg, KPhysicalAddress* out_paddr, + KProcessAddress addr, size_t size, KMemoryState state_mask, + KMemoryState state, KMemoryPermission perm_mask, + KMemoryPermission perm, KMemoryAttribute attr_mask, + KMemoryAttribute attr, KMemoryPermission new_perm, + KMemoryAttribute lock_attr) { + // Validate basic preconditions. + ASSERT(False(lock_attr & attr)); + ASSERT(False(lock_attr & (KMemoryAttribute::IpcLocked | KMemoryAttribute::DeviceShared))); + + // Validate the lock request. + const size_t num_pages = size / PageSize; + R_UNLESS(this->Contains(addr, size), ResultInvalidCurrentMemory); + + // Lock the table. + KScopedLightLock lk(m_general_lock); + + // Check that the output page group is empty, if it exists. + if (out_pg) { + ASSERT(out_pg->GetNumPages() == 0); + } + + // Check the state. + KMemoryState old_state; + KMemoryPermission old_perm; + KMemoryAttribute old_attr; + size_t num_allocator_blocks; + R_TRY(this->CheckMemoryState(std::addressof(old_state), std::addressof(old_perm), + std::addressof(old_attr), std::addressof(num_allocator_blocks), + addr, size, state_mask | KMemoryState::FlagReferenceCounted, + state | KMemoryState::FlagReferenceCounted, perm_mask, perm, + attr_mask, attr)); + + // Get the physical address, if we're supposed to. + if (out_paddr != nullptr) { + ASSERT(this->GetPhysicalAddressLocked(out_paddr, addr)); + } + + // Make the page group, if we're supposed to. + if (out_pg != nullptr) { + R_TRY(this->MakePageGroup(*out_pg, addr, num_pages)); + } + + // Create an update allocator. + Result allocator_result; + KMemoryBlockManagerUpdateAllocator allocator(std::addressof(allocator_result), + m_memory_block_slab_manager, num_allocator_blocks); + R_TRY(allocator_result); + + // Decide on new perm and attr. + new_perm = (new_perm != KMemoryPermission::None) ? new_perm : old_perm; + KMemoryAttribute new_attr = old_attr | static_cast(lock_attr); + + // Update permission, if we need to. + if (new_perm != old_perm) { + // We're going to perform an update, so create a helper. + KScopedPageTableUpdater updater(this); + + const KPageProperties properties = {new_perm, false, + True(old_attr & KMemoryAttribute::Uncached), + DisableMergeAttribute::DisableHeadBodyTail}; + R_TRY(this->Operate(updater.GetPageList(), addr, num_pages, 0, false, properties, + OperationType::ChangePermissions, false)); + } + + // Apply the memory block updates. + m_memory_block_manager.Update(std::addressof(allocator), addr, num_pages, old_state, new_perm, + new_attr, KMemoryBlockDisableMergeAttribute::Locked, + KMemoryBlockDisableMergeAttribute::None); + + // If we have an output group, open. + if (out_pg) { + out_pg->Open(); + } + + R_SUCCEED(); +} + +Result KPageTableBase::UnlockMemory(KProcessAddress addr, size_t size, KMemoryState state_mask, + KMemoryState state, KMemoryPermission perm_mask, + KMemoryPermission perm, KMemoryAttribute attr_mask, + KMemoryAttribute attr, KMemoryPermission new_perm, + KMemoryAttribute lock_attr, const KPageGroup* pg) { + // Validate basic preconditions. + ASSERT((attr_mask & lock_attr) == lock_attr); + ASSERT((attr & lock_attr) == lock_attr); + + // Validate the unlock request. + const size_t num_pages = size / PageSize; + R_UNLESS(this->Contains(addr, size), ResultInvalidCurrentMemory); + + // Lock the table. + KScopedLightLock lk(m_general_lock); + + // Check the state. + KMemoryState old_state; + KMemoryPermission old_perm; + KMemoryAttribute old_attr; + size_t num_allocator_blocks; + R_TRY(this->CheckMemoryState(std::addressof(old_state), std::addressof(old_perm), + std::addressof(old_attr), std::addressof(num_allocator_blocks), + addr, size, state_mask | KMemoryState::FlagReferenceCounted, + state | KMemoryState::FlagReferenceCounted, perm_mask, perm, + attr_mask, attr)); + + // Check the page group. + if (pg != nullptr) { + R_UNLESS(this->IsValidPageGroup(*pg, addr, num_pages), ResultInvalidMemoryRegion); + } + + // Decide on new perm and attr. + new_perm = (new_perm != KMemoryPermission::None) ? new_perm : old_perm; + KMemoryAttribute new_attr = old_attr & ~static_cast(lock_attr); + + // Create an update allocator. + Result allocator_result; + KMemoryBlockManagerUpdateAllocator allocator(std::addressof(allocator_result), + m_memory_block_slab_manager, num_allocator_blocks); + R_TRY(allocator_result); + + // Update permission, if we need to. + if (new_perm != old_perm) { + // We're going to perform an update, so create a helper. + KScopedPageTableUpdater updater(this); + + const KPageProperties properties = {new_perm, false, + True(old_attr & KMemoryAttribute::Uncached), + DisableMergeAttribute::EnableAndMergeHeadBodyTail}; + R_TRY(this->Operate(updater.GetPageList(), addr, num_pages, 0, false, properties, + OperationType::ChangePermissions, false)); + } + + // Apply the memory block updates. + m_memory_block_manager.Update(std::addressof(allocator), addr, num_pages, old_state, new_perm, + new_attr, KMemoryBlockDisableMergeAttribute::None, + KMemoryBlockDisableMergeAttribute::Locked); + + R_SUCCEED(); +} + +Result KPageTableBase::QueryInfoImpl(KMemoryInfo* out_info, Svc::PageInfo* out_page, + KProcessAddress address) const { + ASSERT(this->IsLockedByCurrentThread()); + ASSERT(out_info != nullptr); + ASSERT(out_page != nullptr); + + const KMemoryBlock* block = m_memory_block_manager.FindBlock(address); + R_UNLESS(block != nullptr, ResultInvalidCurrentMemory); + + *out_info = block->GetMemoryInfo(); + out_page->flags = 0; + R_SUCCEED(); +} + +Result KPageTableBase::QueryMappingImpl(KProcessAddress* out, KPhysicalAddress address, size_t size, + Svc::MemoryState state) const { + ASSERT(!this->IsLockedByCurrentThread()); + ASSERT(out != nullptr); + + const KProcessAddress region_start = this->GetRegionAddress(state); + const size_t region_size = this->GetRegionSize(state); + + // Check that the address/size are potentially valid. + R_UNLESS((address < address + size), ResultNotFound); + + // Lock the table. + KScopedLightLock lk(m_general_lock); + + auto& impl = this->GetImpl(); + + // Begin traversal. + TraversalContext context; + TraversalEntry cur_entry = {.phys_addr = 0, .block_size = 0}; + bool cur_valid = false; + TraversalEntry next_entry; + bool next_valid; + size_t tot_size = 0; + + next_valid = + impl.BeginTraversal(std::addressof(next_entry), std::addressof(context), region_start); + next_entry.block_size = + (next_entry.block_size - (GetInteger(region_start) & (next_entry.block_size - 1))); + + // Iterate, looking for entry. + while (true) { + if ((!next_valid && !cur_valid) || + (next_valid && cur_valid && + next_entry.phys_addr == cur_entry.phys_addr + cur_entry.block_size)) { + cur_entry.block_size += next_entry.block_size; + } else { + if (cur_valid && cur_entry.phys_addr <= address && + address + size <= cur_entry.phys_addr + cur_entry.block_size) { + // Check if this region is valid. + const KProcessAddress mapped_address = + (region_start + tot_size) + GetInteger(address - cur_entry.phys_addr); + if (R_SUCCEEDED(this->CheckMemoryState( + mapped_address, size, KMemoryState::Mask, static_cast(state), + KMemoryPermission::UserRead, KMemoryPermission::UserRead, + KMemoryAttribute::None, KMemoryAttribute::None))) { + // It is! + *out = mapped_address; + R_SUCCEED(); + } + } + + // Update tracking variables. + tot_size += cur_entry.block_size; + cur_entry = next_entry; + cur_valid = next_valid; + } + + if (cur_entry.block_size + tot_size >= region_size) { + break; + } + + next_valid = impl.ContinueTraversal(std::addressof(next_entry), std::addressof(context)); + } + + // Check the last entry. + R_UNLESS(cur_valid, ResultNotFound); + R_UNLESS(cur_entry.phys_addr <= address, ResultNotFound); + R_UNLESS(address + size <= cur_entry.phys_addr + cur_entry.block_size, ResultNotFound); + + // Check if the last region is valid. + const KProcessAddress mapped_address = + (region_start + tot_size) + GetInteger(address - cur_entry.phys_addr); + R_TRY_CATCH(this->CheckMemoryState(mapped_address, size, KMemoryState::All, + static_cast(state), + KMemoryPermission::UserRead, KMemoryPermission::UserRead, + KMemoryAttribute::None, KMemoryAttribute::None)) { + R_CONVERT_ALL(ResultNotFound); + } + R_END_TRY_CATCH; + + // We found the region. + *out = mapped_address; + R_SUCCEED(); +} + +Result KPageTableBase::MapMemory(KProcessAddress dst_address, KProcessAddress src_address, + size_t size) { + // Lock the table. + KScopedLightLock lk(m_general_lock); + + // Validate that the source address's state is valid. + KMemoryState src_state; + size_t num_src_allocator_blocks; + R_TRY(this->CheckMemoryState(std::addressof(src_state), nullptr, nullptr, + std::addressof(num_src_allocator_blocks), src_address, size, + KMemoryState::FlagCanAlias, KMemoryState::FlagCanAlias, + KMemoryPermission::All, KMemoryPermission::UserReadWrite, + KMemoryAttribute::All, KMemoryAttribute::None)); + + // Validate that the dst address's state is valid. + size_t num_dst_allocator_blocks; + R_TRY(this->CheckMemoryState(std::addressof(num_dst_allocator_blocks), dst_address, size, + KMemoryState::All, KMemoryState::Free, KMemoryPermission::None, + KMemoryPermission::None, KMemoryAttribute::None, + KMemoryAttribute::None)); + + // Create an update allocator for the source. + Result src_allocator_result; + KMemoryBlockManagerUpdateAllocator src_allocator(std::addressof(src_allocator_result), + m_memory_block_slab_manager, + num_src_allocator_blocks); + R_TRY(src_allocator_result); + + // Create an update allocator for the destination. + Result dst_allocator_result; + KMemoryBlockManagerUpdateAllocator dst_allocator(std::addressof(dst_allocator_result), + m_memory_block_slab_manager, + num_dst_allocator_blocks); + R_TRY(dst_allocator_result); + + // Map the memory. + { + // Determine the number of pages being operated on. + const size_t num_pages = size / PageSize; + + // Create page groups for the memory being unmapped. + KPageGroup pg(m_kernel, m_block_info_manager); + + // Create the page group representing the source. + R_TRY(this->MakePageGroup(pg, src_address, num_pages)); + + // We're going to perform an update, so create a helper. + KScopedPageTableUpdater updater(this); + + // Reprotect the source as kernel-read/not mapped. + const KMemoryPermission new_src_perm = static_cast( + KMemoryPermission::KernelRead | KMemoryPermission::NotMapped); + const KMemoryAttribute new_src_attr = KMemoryAttribute::Locked; + const KPageProperties src_properties = {new_src_perm, false, false, + DisableMergeAttribute::DisableHeadBodyTail}; + R_TRY(this->Operate(updater.GetPageList(), src_address, num_pages, 0, false, src_properties, + OperationType::ChangePermissions, false)); + + // Ensure that we unprotect the source pages on failure. + ON_RESULT_FAILURE { + const KPageProperties unprotect_properties = { + KMemoryPermission::UserReadWrite, false, false, + DisableMergeAttribute::EnableHeadBodyTail}; + R_ASSERT(this->Operate(updater.GetPageList(), src_address, num_pages, 0, false, + unprotect_properties, OperationType::ChangePermissions, true)); + }; + + // Map the alias pages. + const KPageProperties dst_map_properties = {KMemoryPermission::UserReadWrite, false, false, + DisableMergeAttribute::DisableHead}; + R_TRY(this->MapPageGroupImpl(updater.GetPageList(), dst_address, pg, dst_map_properties, + false)); + + // Apply the memory block updates. + m_memory_block_manager.Update(std::addressof(src_allocator), src_address, num_pages, + src_state, new_src_perm, new_src_attr, + KMemoryBlockDisableMergeAttribute::Locked, + KMemoryBlockDisableMergeAttribute::None); + m_memory_block_manager.Update( + std::addressof(dst_allocator), dst_address, num_pages, KMemoryState::Stack, + KMemoryPermission::UserReadWrite, KMemoryAttribute::None, + KMemoryBlockDisableMergeAttribute::Normal, KMemoryBlockDisableMergeAttribute::None); + } + + R_SUCCEED(); +} + +Result KPageTableBase::UnmapMemory(KProcessAddress dst_address, KProcessAddress src_address, + size_t size) { + // Lock the table. + KScopedLightLock lk(m_general_lock); + + // Validate that the source address's state is valid. + KMemoryState src_state; + size_t num_src_allocator_blocks; + R_TRY(this->CheckMemoryState( + std::addressof(src_state), nullptr, nullptr, std::addressof(num_src_allocator_blocks), + src_address, size, KMemoryState::FlagCanAlias, KMemoryState::FlagCanAlias, + KMemoryPermission::All, KMemoryPermission::NotMapped | KMemoryPermission::KernelRead, + KMemoryAttribute::All, KMemoryAttribute::Locked)); + + // Validate that the dst address's state is valid. + KMemoryPermission dst_perm; + size_t num_dst_allocator_blocks; + R_TRY(this->CheckMemoryState( + nullptr, std::addressof(dst_perm), nullptr, std::addressof(num_dst_allocator_blocks), + dst_address, size, KMemoryState::All, KMemoryState::Stack, KMemoryPermission::None, + KMemoryPermission::None, KMemoryAttribute::All, KMemoryAttribute::None)); + + // Create an update allocator for the source. + Result src_allocator_result; + KMemoryBlockManagerUpdateAllocator src_allocator(std::addressof(src_allocator_result), + m_memory_block_slab_manager, + num_src_allocator_blocks); + R_TRY(src_allocator_result); + + // Create an update allocator for the destination. + Result dst_allocator_result; + KMemoryBlockManagerUpdateAllocator dst_allocator(std::addressof(dst_allocator_result), + m_memory_block_slab_manager, + num_dst_allocator_blocks); + R_TRY(dst_allocator_result); + + // Unmap the memory. + { + // Determine the number of pages being operated on. + const size_t num_pages = size / PageSize; + + // Create page groups for the memory being unmapped. + KPageGroup pg(m_kernel, m_block_info_manager); + + // Create the page group representing the destination. + R_TRY(this->MakePageGroup(pg, dst_address, num_pages)); + + // Ensure the page group is the valid for the source. + R_UNLESS(this->IsValidPageGroup(pg, src_address, num_pages), ResultInvalidMemoryRegion); + + // We're going to perform an update, so create a helper. + KScopedPageTableUpdater updater(this); + + // Unmap the aliased copy of the pages. + const KPageProperties dst_unmap_properties = {KMemoryPermission::None, false, false, + DisableMergeAttribute::None}; + R_TRY(this->Operate(updater.GetPageList(), dst_address, num_pages, 0, false, + dst_unmap_properties, OperationType::Unmap, false)); + + // Ensure that we re-map the aliased pages on failure. + ON_RESULT_FAILURE { + this->RemapPageGroup(updater.GetPageList(), dst_address, size, pg); + }; + + // Try to set the permissions for the source pages back to what they should be. + const KPageProperties src_properties = {KMemoryPermission::UserReadWrite, false, false, + DisableMergeAttribute::EnableAndMergeHeadBodyTail}; + R_TRY(this->Operate(updater.GetPageList(), src_address, num_pages, 0, false, src_properties, + OperationType::ChangePermissions, false)); + + // Apply the memory block updates. + m_memory_block_manager.Update( + std::addressof(src_allocator), src_address, num_pages, src_state, + KMemoryPermission::UserReadWrite, KMemoryAttribute::None, + KMemoryBlockDisableMergeAttribute::None, KMemoryBlockDisableMergeAttribute::Locked); + m_memory_block_manager.Update( + std::addressof(dst_allocator), dst_address, num_pages, KMemoryState::None, + KMemoryPermission::None, KMemoryAttribute::None, + KMemoryBlockDisableMergeAttribute::None, KMemoryBlockDisableMergeAttribute::Normal); + } + + R_SUCCEED(); +} + +Result KPageTableBase::MapCodeMemory(KProcessAddress dst_address, KProcessAddress src_address, + size_t size) { + // Validate the mapping request. + R_UNLESS(this->CanContain(dst_address, size, KMemoryState::AliasCode), + ResultInvalidMemoryRegion); + + // Lock the table. + KScopedLightLock lk(m_general_lock); + + // Verify that the source memory is normal heap. + KMemoryState src_state; + KMemoryPermission src_perm; + size_t num_src_allocator_blocks; + R_TRY(this->CheckMemoryState(std::addressof(src_state), std::addressof(src_perm), nullptr, + std::addressof(num_src_allocator_blocks), src_address, size, + KMemoryState::All, KMemoryState::Normal, KMemoryPermission::All, + KMemoryPermission::UserReadWrite, KMemoryAttribute::All, + KMemoryAttribute::None)); + + // Verify that the destination memory is unmapped. + size_t num_dst_allocator_blocks; + R_TRY(this->CheckMemoryState(std::addressof(num_dst_allocator_blocks), dst_address, size, + KMemoryState::All, KMemoryState::Free, KMemoryPermission::None, + KMemoryPermission::None, KMemoryAttribute::None, + KMemoryAttribute::None)); + + // Create an update allocator for the source. + Result src_allocator_result; + KMemoryBlockManagerUpdateAllocator src_allocator(std::addressof(src_allocator_result), + m_memory_block_slab_manager, + num_src_allocator_blocks); + R_TRY(src_allocator_result); + + // Create an update allocator for the destination. + Result dst_allocator_result; + KMemoryBlockManagerUpdateAllocator dst_allocator(std::addressof(dst_allocator_result), + m_memory_block_slab_manager, + num_dst_allocator_blocks); + R_TRY(dst_allocator_result); + + // Map the code memory. + { + // Determine the number of pages being operated on. + const size_t num_pages = size / PageSize; + + // Create page groups for the memory being unmapped. + KPageGroup pg(m_kernel, m_block_info_manager); + + // Create the page group representing the source. + R_TRY(this->MakePageGroup(pg, src_address, num_pages)); + + // We're going to perform an update, so create a helper. + KScopedPageTableUpdater updater(this); + + // Reprotect the source as kernel-read/not mapped. + const KMemoryPermission new_perm = static_cast( + KMemoryPermission::KernelRead | KMemoryPermission::NotMapped); + const KPageProperties src_properties = {new_perm, false, false, + DisableMergeAttribute::DisableHeadBodyTail}; + R_TRY(this->Operate(updater.GetPageList(), src_address, num_pages, 0, false, src_properties, + OperationType::ChangePermissions, false)); + + // Ensure that we unprotect the source pages on failure. + ON_RESULT_FAILURE { + const KPageProperties unprotect_properties = { + src_perm, false, false, DisableMergeAttribute::EnableHeadBodyTail}; + R_ASSERT(this->Operate(updater.GetPageList(), src_address, num_pages, 0, false, + unprotect_properties, OperationType::ChangePermissions, true)); + }; + + // Map the alias pages. + const KPageProperties dst_properties = {new_perm, false, false, + DisableMergeAttribute::DisableHead}; + R_TRY( + this->MapPageGroupImpl(updater.GetPageList(), dst_address, pg, dst_properties, false)); + + // Apply the memory block updates. + m_memory_block_manager.Update(std::addressof(src_allocator), src_address, num_pages, + src_state, new_perm, KMemoryAttribute::Locked, + KMemoryBlockDisableMergeAttribute::Locked, + KMemoryBlockDisableMergeAttribute::None); + m_memory_block_manager.Update(std::addressof(dst_allocator), dst_address, num_pages, + KMemoryState::AliasCode, new_perm, KMemoryAttribute::None, + KMemoryBlockDisableMergeAttribute::Normal, + KMemoryBlockDisableMergeAttribute::None); + } + + R_SUCCEED(); +} + +Result KPageTableBase::UnmapCodeMemory(KProcessAddress dst_address, KProcessAddress src_address, + size_t size) { + // Validate the mapping request. + R_UNLESS(this->CanContain(dst_address, size, KMemoryState::AliasCode), + ResultInvalidMemoryRegion); + + // Lock the table. + KScopedLightLock lk(m_general_lock); + + // Verify that the source memory is locked normal heap. + size_t num_src_allocator_blocks; + R_TRY(this->CheckMemoryState(std::addressof(num_src_allocator_blocks), src_address, size, + KMemoryState::All, KMemoryState::Normal, KMemoryPermission::None, + KMemoryPermission::None, KMemoryAttribute::All, + KMemoryAttribute::Locked)); + + // Verify that the destination memory is aliasable code. + size_t num_dst_allocator_blocks; + R_TRY(this->CheckMemoryStateContiguous( + std::addressof(num_dst_allocator_blocks), dst_address, size, KMemoryState::FlagCanCodeAlias, + KMemoryState::FlagCanCodeAlias, KMemoryPermission::None, KMemoryPermission::None, + KMemoryAttribute::All & ~KMemoryAttribute::PermissionLocked, KMemoryAttribute::None)); + + // Determine whether any pages being unmapped are code. + bool any_code_pages = false; + { + KMemoryBlockManager::const_iterator it = m_memory_block_manager.FindIterator(dst_address); + while (true) { + // Get the memory info. + const KMemoryInfo info = it->GetMemoryInfo(); + + // Check if the memory has code flag. + if (True(info.GetState() & KMemoryState::FlagCode)) { + any_code_pages = true; + break; + } + + // Check if we're done. + if (dst_address + size - 1 <= info.GetLastAddress()) { + break; + } + + // Advance. + ++it; + } + } + + // Ensure that we maintain the instruction cache. + bool reprotected_pages = false; + SCOPE_EXIT({ + if (reprotected_pages && any_code_pages) { + InvalidateEntireInstructionCache(m_system); + } + }); + + // Unmap. + { + // Determine the number of pages being operated on. + const size_t num_pages = size / PageSize; + + // Create page groups for the memory being unmapped. + KPageGroup pg(m_kernel, m_block_info_manager); + + // Create the page group representing the destination. + R_TRY(this->MakePageGroup(pg, dst_address, num_pages)); + + // Verify that the page group contains the same pages as the source. + R_UNLESS(this->IsValidPageGroup(pg, src_address, num_pages), ResultInvalidMemoryRegion); + + // Create an update allocator for the source. + Result src_allocator_result; + KMemoryBlockManagerUpdateAllocator src_allocator(std::addressof(src_allocator_result), + m_memory_block_slab_manager, + num_src_allocator_blocks); + R_TRY(src_allocator_result); + + // Create an update allocator for the destination. + Result dst_allocator_result; + KMemoryBlockManagerUpdateAllocator dst_allocator(std::addressof(dst_allocator_result), + m_memory_block_slab_manager, + num_dst_allocator_blocks); + R_TRY(dst_allocator_result); + + // We're going to perform an update, so create a helper. + KScopedPageTableUpdater updater(this); + + // Unmap the aliased copy of the pages. + const KPageProperties dst_unmap_properties = {KMemoryPermission::None, false, false, + DisableMergeAttribute::None}; + R_TRY(this->Operate(updater.GetPageList(), dst_address, num_pages, 0, false, + dst_unmap_properties, OperationType::Unmap, false)); + + // Ensure that we re-map the aliased pages on failure. + ON_RESULT_FAILURE { + this->RemapPageGroup(updater.GetPageList(), dst_address, size, pg); + }; + + // Try to set the permissions for the source pages back to what they should be. + const KPageProperties src_properties = {KMemoryPermission::UserReadWrite, false, false, + DisableMergeAttribute::EnableAndMergeHeadBodyTail}; + R_TRY(this->Operate(updater.GetPageList(), src_address, num_pages, 0, false, src_properties, + OperationType::ChangePermissions, false)); + + // Apply the memory block updates. + m_memory_block_manager.Update( + std::addressof(dst_allocator), dst_address, num_pages, KMemoryState::None, + KMemoryPermission::None, KMemoryAttribute::None, + KMemoryBlockDisableMergeAttribute::None, KMemoryBlockDisableMergeAttribute::Normal); + m_memory_block_manager.Update( + std::addressof(src_allocator), src_address, num_pages, KMemoryState::Normal, + KMemoryPermission::UserReadWrite, KMemoryAttribute::None, + KMemoryBlockDisableMergeAttribute::None, KMemoryBlockDisableMergeAttribute::Locked); + + // Note that we reprotected pages. + reprotected_pages = true; + } + + R_SUCCEED(); +} + +Result KPageTableBase::MapInsecureMemory(KProcessAddress address, size_t size) { + // Get the insecure memory resource limit and pool. + auto* const insecure_resource_limit = KSystemControl::GetInsecureMemoryResourceLimit(m_kernel); + const auto insecure_pool = + static_cast(KSystemControl::GetInsecureMemoryPool()); + + // Reserve the insecure memory. + // NOTE: ResultOutOfMemory is returned here instead of the usual LimitReached. + KScopedResourceReservation memory_reservation(insecure_resource_limit, + Svc::LimitableResource::PhysicalMemoryMax, size); + R_UNLESS(memory_reservation.Succeeded(), ResultOutOfMemory); + + // Allocate pages for the insecure memory. + KPageGroup pg(m_kernel, m_block_info_manager); + R_TRY(m_kernel.MemoryManager().AllocateAndOpen( + std::addressof(pg), size / PageSize, + KMemoryManager::EncodeOption(insecure_pool, KMemoryManager::Direction::FromFront))); + + // Close the opened pages when we're done with them. + // If the mapping succeeds, each page will gain an extra reference, otherwise they will be freed + // automatically. + SCOPE_EXIT({ pg.Close(); }); + + // Clear all the newly allocated pages. + for (const auto& it : pg) { + std::memset(GetHeapVirtualPointer(m_kernel, it.GetAddress()), + static_cast(m_heap_fill_value), it.GetSize()); + } + + // Lock the table. + KScopedLightLock lk(m_general_lock); + + // Validate that the address's state is valid. + size_t num_allocator_blocks; + R_TRY(this->CheckMemoryState(std::addressof(num_allocator_blocks), address, size, + KMemoryState::All, KMemoryState::Free, KMemoryPermission::None, + KMemoryPermission::None, KMemoryAttribute::None, + KMemoryAttribute::None)); + + // Create an update allocator. + Result allocator_result; + KMemoryBlockManagerUpdateAllocator allocator(std::addressof(allocator_result), + m_memory_block_slab_manager, num_allocator_blocks); + R_TRY(allocator_result); + + // We're going to perform an update, so create a helper. + KScopedPageTableUpdater updater(this); + + // Map the pages. + const size_t num_pages = size / PageSize; + const KPageProperties map_properties = {KMemoryPermission::UserReadWrite, false, false, + DisableMergeAttribute::DisableHead}; + R_TRY(this->Operate(updater.GetPageList(), address, num_pages, pg, map_properties, + OperationType::MapGroup, false)); + + // Apply the memory block update. + m_memory_block_manager.Update(std::addressof(allocator), address, num_pages, + KMemoryState::Insecure, KMemoryPermission::UserReadWrite, + KMemoryAttribute::None, KMemoryBlockDisableMergeAttribute::Normal, + KMemoryBlockDisableMergeAttribute::None); + + // Update our mapped insecure size. + m_mapped_insecure_memory += size; + + // Commit the memory reservation. + memory_reservation.Commit(); + + // We succeeded. + R_SUCCEED(); +} + +Result KPageTableBase::UnmapInsecureMemory(KProcessAddress address, size_t size) { + // Lock the table. + KScopedLightLock lk(m_general_lock); + + // Check the memory state. + size_t num_allocator_blocks; + R_TRY(this->CheckMemoryState(std::addressof(num_allocator_blocks), address, size, + KMemoryState::All, KMemoryState::Insecure, KMemoryPermission::All, + KMemoryPermission::UserReadWrite, KMemoryAttribute::All, + KMemoryAttribute::None)); + + // Create an update allocator. + Result allocator_result; + KMemoryBlockManagerUpdateAllocator allocator(std::addressof(allocator_result), + m_memory_block_slab_manager, num_allocator_blocks); + R_TRY(allocator_result); + + // We're going to perform an update, so create a helper. + KScopedPageTableUpdater updater(this); + + // Unmap the memory. + const size_t num_pages = size / PageSize; + const KPageProperties unmap_properties = {KMemoryPermission::None, false, false, + DisableMergeAttribute::None}; + R_TRY(this->Operate(updater.GetPageList(), address, num_pages, 0, false, unmap_properties, + OperationType::Unmap, false)); + + // Apply the memory block update. + m_memory_block_manager.Update(std::addressof(allocator), address, num_pages, KMemoryState::Free, + KMemoryPermission::None, KMemoryAttribute::None, + KMemoryBlockDisableMergeAttribute::None, + KMemoryBlockDisableMergeAttribute::Normal); + + // Update our mapped insecure size. + m_mapped_insecure_memory -= size; + + // Release the insecure memory from the insecure limit. + if (auto* const insecure_resource_limit = + KSystemControl::GetInsecureMemoryResourceLimit(m_kernel); + insecure_resource_limit != nullptr) { + insecure_resource_limit->Release(Svc::LimitableResource::PhysicalMemoryMax, size); + } + + R_SUCCEED(); +} + +KProcessAddress KPageTableBase::FindFreeArea(KProcessAddress region_start, size_t region_num_pages, + size_t num_pages, size_t alignment, size_t offset, + size_t guard_pages) const { + KProcessAddress address = 0; + + if (num_pages <= region_num_pages) { + if (this->IsAslrEnabled()) { + // Try to directly find a free area up to 8 times. + for (size_t i = 0; i < 8; i++) { + const size_t random_offset = + KSystemControl::GenerateRandomRange( + 0, (region_num_pages - num_pages - guard_pages) * PageSize / alignment) * + alignment; + const KProcessAddress candidate = + Common::AlignDown(GetInteger(region_start + random_offset), alignment) + offset; + + KMemoryInfo info; + Svc::PageInfo page_info; + R_ASSERT(this->QueryInfoImpl(std::addressof(info), std::addressof(page_info), + candidate)); + + if (info.m_state != KMemoryState::Free) { + continue; + } + if (!(region_start <= candidate)) { + continue; + } + if (!(info.GetAddress() + guard_pages * PageSize <= GetInteger(candidate))) { + continue; + } + if (!(candidate + (num_pages + guard_pages) * PageSize - 1 <= + info.GetLastAddress())) { + continue; + } + if (!(candidate + (num_pages + guard_pages) * PageSize - 1 <= + region_start + region_num_pages * PageSize - 1)) { + continue; + } + + address = candidate; + break; + } + // Fall back to finding the first free area with a random offset. + if (address == 0) { + // NOTE: Nintendo does not account for guard pages here. + // This may theoretically cause an offset to be chosen that cannot be mapped. + // We will account for guard pages. + const size_t offset_pages = KSystemControl::GenerateRandomRange( + 0, region_num_pages - num_pages - guard_pages); + address = m_memory_block_manager.FindFreeArea( + region_start + offset_pages * PageSize, region_num_pages - offset_pages, + num_pages, alignment, offset, guard_pages); + } + } + // Find the first free area. + if (address == 0) { + address = m_memory_block_manager.FindFreeArea(region_start, region_num_pages, num_pages, + alignment, offset, guard_pages); + } + } + + return address; +} + +size_t KPageTableBase::GetSize(KMemoryState state) const { + // Lock the table. + KScopedLightLock lk(m_general_lock); + + // Iterate, counting blocks with the desired state. + size_t total_size = 0; + for (KMemoryBlockManager::const_iterator it = + m_memory_block_manager.FindIterator(m_address_space_start); + it != m_memory_block_manager.end(); ++it) { + // Get the memory info. + const KMemoryInfo info = it->GetMemoryInfo(); + if (info.GetState() == state) { + total_size += info.GetSize(); + } + } + + return total_size; +} + +size_t KPageTableBase::GetCodeSize() const { + return this->GetSize(KMemoryState::Code); +} + +size_t KPageTableBase::GetCodeDataSize() const { + return this->GetSize(KMemoryState::CodeData); +} + +size_t KPageTableBase::GetAliasCodeSize() const { + return this->GetSize(KMemoryState::AliasCode); +} + +size_t KPageTableBase::GetAliasCodeDataSize() const { + return this->GetSize(KMemoryState::AliasCodeData); +} + +Result KPageTableBase::AllocateAndMapPagesImpl(PageLinkedList* page_list, KProcessAddress address, + size_t num_pages, KMemoryPermission perm) { + ASSERT(this->IsLockedByCurrentThread()); + + // Create a page group to hold the pages we allocate. + KPageGroup pg(m_kernel, m_block_info_manager); + + // Allocate the pages. + R_TRY( + m_kernel.MemoryManager().AllocateAndOpen(std::addressof(pg), num_pages, m_allocate_option)); + + // Ensure that the page group is closed when we're done working with it. + SCOPE_EXIT({ pg.Close(); }); + + // Clear all pages. + for (const auto& it : pg) { + std::memset(GetHeapVirtualPointer(m_kernel, it.GetAddress()), + static_cast(m_heap_fill_value), it.GetSize()); + } + + // Map the pages. + const KPageProperties properties = {perm, false, false, DisableMergeAttribute::None}; + R_RETURN(this->Operate(page_list, address, num_pages, pg, properties, OperationType::MapGroup, + false)); +} + +Result KPageTableBase::MapPageGroupImpl(PageLinkedList* page_list, KProcessAddress address, + const KPageGroup& pg, const KPageProperties properties, + bool reuse_ll) { + ASSERT(this->IsLockedByCurrentThread()); + + // Note the current address, so that we can iterate. + const KProcessAddress start_address = address; + KProcessAddress cur_address = address; + + // Ensure that we clean up on failure. + ON_RESULT_FAILURE { + ASSERT(!reuse_ll); + if (cur_address != start_address) { + const KPageProperties unmap_properties = {KMemoryPermission::None, false, false, + DisableMergeAttribute::None}; + R_ASSERT(this->Operate(page_list, start_address, + (cur_address - start_address) / PageSize, 0, false, + unmap_properties, OperationType::Unmap, true)); + } + }; + + // Iterate, mapping all pages in the group. + for (const auto& block : pg) { + // Map and advance. + const KPageProperties cur_properties = + (cur_address == start_address) + ? properties + : KPageProperties{properties.perm, properties.io, properties.uncached, + DisableMergeAttribute::None}; + R_TRY(this->Operate(page_list, cur_address, block.GetNumPages(), block.GetAddress(), true, + cur_properties, OperationType::Map, reuse_ll)); + cur_address += block.GetSize(); + } + + // We succeeded! + R_SUCCEED(); +} + +void KPageTableBase::RemapPageGroup(PageLinkedList* page_list, KProcessAddress address, size_t size, + const KPageGroup& pg) { + ASSERT(this->IsLockedByCurrentThread()); + + // Note the current address, so that we can iterate. + const KProcessAddress start_address = address; + const KProcessAddress last_address = start_address + size - 1; + const KProcessAddress end_address = last_address + 1; + + // Iterate over the memory. + auto pg_it = pg.begin(); + ASSERT(pg_it != pg.end()); + + KPhysicalAddress pg_phys_addr = pg_it->GetAddress(); + size_t pg_pages = pg_it->GetNumPages(); + + auto it = m_memory_block_manager.FindIterator(start_address); + while (true) { + // Check that the iterator is valid. + ASSERT(it != m_memory_block_manager.end()); + + // Get the memory info. + const KMemoryInfo info = it->GetMemoryInfo(); + + // Determine the range to map. + KProcessAddress map_address = std::max(info.GetAddress(), GetInteger(start_address)); + const KProcessAddress map_end_address = + std::min(info.GetEndAddress(), GetInteger(end_address)); + ASSERT(map_end_address != map_address); + + // Determine if we should disable head merge. + const bool disable_head_merge = + info.GetAddress() >= GetInteger(start_address) && + True(info.GetDisableMergeAttribute() & KMemoryBlockDisableMergeAttribute::Normal); + const KPageProperties map_properties = { + info.GetPermission(), false, false, + disable_head_merge ? DisableMergeAttribute::DisableHead : DisableMergeAttribute::None}; + + // While we have pages to map, map them. + size_t map_pages = (map_end_address - map_address) / PageSize; + while (map_pages > 0) { + // Check if we're at the end of the physical block. + if (pg_pages == 0) { + // Ensure there are more pages to map. + ASSERT(pg_it != pg.end()); + + // Advance our physical block. + ++pg_it; + pg_phys_addr = pg_it->GetAddress(); + pg_pages = pg_it->GetNumPages(); + } + + // Map whatever we can. + const size_t cur_pages = std::min(pg_pages, map_pages); + R_ASSERT(this->Operate(page_list, map_address, map_pages, pg_phys_addr, true, + map_properties, OperationType::Map, true)); + + // Advance. + map_address += cur_pages * PageSize; + map_pages -= cur_pages; + + pg_phys_addr += cur_pages * PageSize; + pg_pages -= cur_pages; + } + + // Check if we're done. + if (last_address <= info.GetLastAddress()) { + break; + } + + // Advance. + ++it; + } + + // Check that we re-mapped precisely the page group. + ASSERT((++pg_it) == pg.end()); +} + +Result KPageTableBase::MakePageGroup(KPageGroup& pg, KProcessAddress addr, size_t num_pages) { + ASSERT(this->IsLockedByCurrentThread()); + + const size_t size = num_pages * PageSize; + + // We're making a new group, not adding to an existing one. + R_UNLESS(pg.empty(), ResultInvalidCurrentMemory); + + auto& impl = this->GetImpl(); + + // Begin traversal. + TraversalContext context; + TraversalEntry next_entry; + R_UNLESS(impl.BeginTraversal(std::addressof(next_entry), std::addressof(context), addr), + ResultInvalidCurrentMemory); + + // Prepare tracking variables. + KPhysicalAddress cur_addr = next_entry.phys_addr; + size_t cur_size = next_entry.block_size - (GetInteger(cur_addr) & (next_entry.block_size - 1)); + size_t tot_size = cur_size; + + // Iterate, adding to group as we go. + while (tot_size < size) { + R_UNLESS(impl.ContinueTraversal(std::addressof(next_entry), std::addressof(context)), + ResultInvalidCurrentMemory); + + if (next_entry.phys_addr != (cur_addr + cur_size)) { + const size_t cur_pages = cur_size / PageSize; + + R_UNLESS(IsHeapPhysicalAddress(cur_addr), ResultInvalidCurrentMemory); + R_TRY(pg.AddBlock(cur_addr, cur_pages)); + + cur_addr = next_entry.phys_addr; + cur_size = next_entry.block_size; + } else { + cur_size += next_entry.block_size; + } + + tot_size += next_entry.block_size; + } + + // Ensure we add the right amount for the last block. + if (tot_size > size) { + cur_size -= (tot_size - size); + } + + // add the last block. + const size_t cur_pages = cur_size / PageSize; + R_UNLESS(IsHeapPhysicalAddress(cur_addr), ResultInvalidCurrentMemory); + R_TRY(pg.AddBlock(cur_addr, cur_pages)); + + R_SUCCEED(); +} + +bool KPageTableBase::IsValidPageGroup(const KPageGroup& pg, KProcessAddress addr, + size_t num_pages) { + ASSERT(this->IsLockedByCurrentThread()); + + const size_t size = num_pages * PageSize; + + // Empty groups are necessarily invalid. + if (pg.empty()) { + return false; + } + + auto& impl = this->GetImpl(); + + // We're going to validate that the group we'd expect is the group we see. + auto cur_it = pg.begin(); + KPhysicalAddress cur_block_address = cur_it->GetAddress(); + size_t cur_block_pages = cur_it->GetNumPages(); + + auto UpdateCurrentIterator = [&]() { + if (cur_block_pages == 0) { + if ((++cur_it) == pg.end()) { + return false; + } + + cur_block_address = cur_it->GetAddress(); + cur_block_pages = cur_it->GetNumPages(); + } + return true; + }; + + // Begin traversal. + TraversalContext context; + TraversalEntry next_entry; + if (!impl.BeginTraversal(std::addressof(next_entry), std::addressof(context), addr)) { + return false; + } + + // Prepare tracking variables. + KPhysicalAddress cur_addr = next_entry.phys_addr; + size_t cur_size = next_entry.block_size - (GetInteger(cur_addr) & (next_entry.block_size - 1)); + size_t tot_size = cur_size; + + // Iterate, comparing expected to actual. + while (tot_size < size) { + if (!impl.ContinueTraversal(std::addressof(next_entry), std::addressof(context))) { + return false; + } + + if (next_entry.phys_addr != (cur_addr + cur_size)) { + const size_t cur_pages = cur_size / PageSize; + + if (!IsHeapPhysicalAddress(cur_addr)) { + return false; + } + + if (!UpdateCurrentIterator()) { + return false; + } + + if (cur_block_address != cur_addr || cur_block_pages < cur_pages) { + return false; + } + + cur_block_address += cur_size; + cur_block_pages -= cur_pages; + cur_addr = next_entry.phys_addr; + cur_size = next_entry.block_size; + } else { + cur_size += next_entry.block_size; + } + + tot_size += next_entry.block_size; + } + + // Ensure we compare the right amount for the last block. + if (tot_size > size) { + cur_size -= (tot_size - size); + } + + if (!IsHeapPhysicalAddress(cur_addr)) { + return false; + } + + if (!UpdateCurrentIterator()) { + return false; + } + + return cur_block_address == cur_addr && cur_block_pages == (cur_size / PageSize); +} + +Result KPageTableBase::GetContiguousMemoryRangeWithState( + MemoryRange* out, KProcessAddress address, size_t size, KMemoryState state_mask, + KMemoryState state, KMemoryPermission perm_mask, KMemoryPermission perm, + KMemoryAttribute attr_mask, KMemoryAttribute attr) { + ASSERT(this->IsLockedByCurrentThread()); + + auto& impl = this->GetImpl(); + + // Begin a traversal. + TraversalContext context; + TraversalEntry cur_entry = {.phys_addr = 0, .block_size = 0}; + R_UNLESS(impl.BeginTraversal(std::addressof(cur_entry), std::addressof(context), address), + ResultInvalidCurrentMemory); + + // Traverse until we have enough size or we aren't contiguous any more. + const KPhysicalAddress phys_address = cur_entry.phys_addr; + size_t contig_size; + for (contig_size = + cur_entry.block_size - (GetInteger(phys_address) & (cur_entry.block_size - 1)); + contig_size < size; contig_size += cur_entry.block_size) { + if (!impl.ContinueTraversal(std::addressof(cur_entry), std::addressof(context))) { + break; + } + if (cur_entry.phys_addr != phys_address + contig_size) { + break; + } + } + + // Take the minimum size for our region. + size = std::min(size, contig_size); + + // Check that the memory is contiguous (modulo the reference count bit). + const KMemoryState test_state_mask = state_mask | KMemoryState::FlagReferenceCounted; + const bool is_heap = R_SUCCEEDED(this->CheckMemoryStateContiguous( + address, size, test_state_mask, state | KMemoryState::FlagReferenceCounted, perm_mask, perm, + attr_mask, attr)); + if (!is_heap) { + R_TRY(this->CheckMemoryStateContiguous(address, size, test_state_mask, state, perm_mask, + perm, attr_mask, attr)); + } + + // The memory is contiguous, so set the output range. + out->Set(phys_address, size, is_heap); + R_SUCCEED(); +} + +Result KPageTableBase::SetMemoryPermission(KProcessAddress addr, size_t size, + Svc::MemoryPermission svc_perm) { + const size_t num_pages = size / PageSize; + + // Lock the table. + KScopedLightLock lk(m_general_lock); + + // Verify we can change the memory permission. + KMemoryState old_state; + KMemoryPermission old_perm; + size_t num_allocator_blocks; + R_TRY(this->CheckMemoryState(std::addressof(old_state), std::addressof(old_perm), nullptr, + std::addressof(num_allocator_blocks), addr, size, + KMemoryState::FlagCanReprotect, KMemoryState::FlagCanReprotect, + KMemoryPermission::None, KMemoryPermission::None, + KMemoryAttribute::All, KMemoryAttribute::None)); + + // Determine new perm. + const KMemoryPermission new_perm = ConvertToKMemoryPermission(svc_perm); + R_SUCCEED_IF(old_perm == new_perm); + + // Create an update allocator. + Result allocator_result; + KMemoryBlockManagerUpdateAllocator allocator(std::addressof(allocator_result), + m_memory_block_slab_manager, num_allocator_blocks); + R_TRY(allocator_result); + + // We're going to perform an update, so create a helper. + KScopedPageTableUpdater updater(this); + + // Perform mapping operation. + const KPageProperties properties = {new_perm, false, false, DisableMergeAttribute::None}; + R_TRY(this->Operate(updater.GetPageList(), addr, num_pages, 0, false, properties, + OperationType::ChangePermissions, false)); + + // Update the blocks. + m_memory_block_manager.Update(std::addressof(allocator), addr, num_pages, old_state, new_perm, + KMemoryAttribute::None, KMemoryBlockDisableMergeAttribute::None, + KMemoryBlockDisableMergeAttribute::None); + + R_SUCCEED(); +} + +Result KPageTableBase::SetProcessMemoryPermission(KProcessAddress addr, size_t size, + Svc::MemoryPermission svc_perm) { + const size_t num_pages = size / PageSize; + + // Lock the table. + KScopedLightLock lk(m_general_lock); + + // Verify we can change the memory permission. + KMemoryState old_state; + KMemoryPermission old_perm; + size_t num_allocator_blocks; + R_TRY(this->CheckMemoryState(std::addressof(old_state), std::addressof(old_perm), nullptr, + std::addressof(num_allocator_blocks), addr, size, + KMemoryState::FlagCode, KMemoryState::FlagCode, + KMemoryPermission::None, KMemoryPermission::None, + KMemoryAttribute::All, KMemoryAttribute::None)); + + // Make a new page group for the region. + KPageGroup pg(m_kernel, m_block_info_manager); + + // Determine new perm/state. + const KMemoryPermission new_perm = ConvertToKMemoryPermission(svc_perm); + KMemoryState new_state = old_state; + const bool is_w = (new_perm & KMemoryPermission::UserWrite) == KMemoryPermission::UserWrite; + const bool is_x = (new_perm & KMemoryPermission::UserExecute) == KMemoryPermission::UserExecute; + const bool was_x = + (old_perm & KMemoryPermission::UserExecute) == KMemoryPermission::UserExecute; + ASSERT(!(is_w && is_x)); + + if (is_w) { + switch (old_state) { + case KMemoryState::Code: + new_state = KMemoryState::CodeData; + break; + case KMemoryState::AliasCode: + new_state = KMemoryState::AliasCodeData; + break; + default: + UNREACHABLE(); + } + } + + // Create a page group, if we're setting execute permissions. + if (is_x) { + R_TRY(this->MakePageGroup(pg, GetInteger(addr), num_pages)); + } + + // Succeed if there's nothing to do. + R_SUCCEED_IF(old_perm == new_perm && old_state == new_state); + + // Create an update allocator. + Result allocator_result; + KMemoryBlockManagerUpdateAllocator allocator(std::addressof(allocator_result), + m_memory_block_slab_manager, num_allocator_blocks); + R_TRY(allocator_result); + + // We're going to perform an update, so create a helper. + KScopedPageTableUpdater updater(this); + + // Perform mapping operation. + const KPageProperties properties = {new_perm, false, false, DisableMergeAttribute::None}; + const auto operation = was_x ? OperationType::ChangePermissionsAndRefreshAndFlush + : OperationType::ChangePermissions; + R_TRY(this->Operate(updater.GetPageList(), addr, num_pages, 0, false, properties, operation, + false)); + + // Update the blocks. + m_memory_block_manager.Update(std::addressof(allocator), addr, num_pages, new_state, new_perm, + KMemoryAttribute::None, KMemoryBlockDisableMergeAttribute::None, + KMemoryBlockDisableMergeAttribute::None); + + // Ensure cache coherency, if we're setting pages as executable. + if (is_x) { + for (const auto& block : pg) { + StoreDataCache(GetHeapVirtualPointer(m_kernel, block.GetAddress()), block.GetSize()); + } + InvalidateEntireInstructionCache(m_system); + } + + R_SUCCEED(); +} + +Result KPageTableBase::SetMemoryAttribute(KProcessAddress addr, size_t size, KMemoryAttribute mask, + KMemoryAttribute attr) { + const size_t num_pages = size / PageSize; + ASSERT((mask | KMemoryAttribute::SetMask) == KMemoryAttribute::SetMask); + + // Lock the table. + KScopedLightLock lk(m_general_lock); + + // Verify we can change the memory attribute. + KMemoryState old_state; + KMemoryPermission old_perm; + KMemoryAttribute old_attr; + size_t num_allocator_blocks; + constexpr KMemoryAttribute AttributeTestMask = + ~(KMemoryAttribute::SetMask | KMemoryAttribute::DeviceShared); + const KMemoryState state_test_mask = + (True(mask & KMemoryAttribute::Uncached) ? KMemoryState::FlagCanChangeAttribute + : KMemoryState::None) | + (True(mask & KMemoryAttribute::PermissionLocked) ? KMemoryState::FlagCanPermissionLock + : KMemoryState::None); + R_TRY(this->CheckMemoryState(std::addressof(old_state), std::addressof(old_perm), + std::addressof(old_attr), std::addressof(num_allocator_blocks), + addr, size, state_test_mask, state_test_mask, + KMemoryPermission::None, KMemoryPermission::None, + AttributeTestMask, KMemoryAttribute::None, ~AttributeTestMask)); + + // Create an update allocator. + Result allocator_result; + KMemoryBlockManagerUpdateAllocator allocator(std::addressof(allocator_result), + m_memory_block_slab_manager, num_allocator_blocks); + R_TRY(allocator_result); + + // We're going to perform an update, so create a helper. + KScopedPageTableUpdater updater(this); + + // If we need to, perform a change attribute operation. + if (True(mask & KMemoryAttribute::Uncached)) { + // Determine the new attribute. + const KMemoryAttribute new_attr = + static_cast(((old_attr & ~mask) | (attr & mask))); + + // Perform operation. + const KPageProperties properties = {old_perm, false, + True(new_attr & KMemoryAttribute::Uncached), + DisableMergeAttribute::None}; + R_TRY(this->Operate(updater.GetPageList(), addr, num_pages, 0, false, properties, + OperationType::ChangePermissionsAndRefreshAndFlush, false)); + } + + // Update the blocks. + m_memory_block_manager.UpdateAttribute(std::addressof(allocator), addr, num_pages, mask, attr); + + R_SUCCEED(); +} + +Result KPageTableBase::SetHeapSize(KProcessAddress* out, size_t size) { + // Lock the physical memory mutex. + KScopedLightLock map_phys_mem_lk(m_map_physical_memory_lock); + + // Try to perform a reduction in heap, instead of an extension. + KProcessAddress cur_address; + size_t allocation_size; + { + // Lock the table. + KScopedLightLock lk(m_general_lock); + + // Validate that setting heap size is possible at all. + R_UNLESS(!m_is_kernel, ResultOutOfMemory); + R_UNLESS(size <= static_cast(m_heap_region_end - m_heap_region_start), + ResultOutOfMemory); + R_UNLESS(size <= m_max_heap_size, ResultOutOfMemory); + + if (size < static_cast(m_current_heap_end - m_heap_region_start)) { + // The size being requested is less than the current size, so we need to free the end of + // the heap. + + // Validate memory state. + size_t num_allocator_blocks; + R_TRY(this->CheckMemoryState( + std::addressof(num_allocator_blocks), m_heap_region_start + size, + (m_current_heap_end - m_heap_region_start) - size, KMemoryState::All, + KMemoryState::Normal, KMemoryPermission::All, KMemoryPermission::UserReadWrite, + KMemoryAttribute::All, KMemoryAttribute::None)); + + // Create an update allocator. + Result allocator_result; + KMemoryBlockManagerUpdateAllocator allocator(std::addressof(allocator_result), + m_memory_block_slab_manager, + num_allocator_blocks); + R_TRY(allocator_result); + + // We're going to perform an update, so create a helper. + KScopedPageTableUpdater updater(this); + + // Unmap the end of the heap. + const size_t num_pages = ((m_current_heap_end - m_heap_region_start) - size) / PageSize; + const KPageProperties unmap_properties = {KMemoryPermission::None, false, false, + DisableMergeAttribute::None}; + R_TRY(this->Operate(updater.GetPageList(), m_heap_region_start + size, num_pages, 0, + false, unmap_properties, OperationType::Unmap, false)); + + // Release the memory from the resource limit. + m_resource_limit->Release(Svc::LimitableResource::PhysicalMemoryMax, + num_pages * PageSize); + + // Apply the memory block update. + m_memory_block_manager.Update(std::addressof(allocator), m_heap_region_start + size, + num_pages, KMemoryState::Free, KMemoryPermission::None, + KMemoryAttribute::None, + KMemoryBlockDisableMergeAttribute::None, + size == 0 ? KMemoryBlockDisableMergeAttribute::Normal + : KMemoryBlockDisableMergeAttribute::None); + + // Update the current heap end. + m_current_heap_end = m_heap_region_start + size; + + // Set the output. + *out = m_heap_region_start; + R_SUCCEED(); + } else if (size == static_cast(m_current_heap_end - m_heap_region_start)) { + // The size requested is exactly the current size. + *out = m_heap_region_start; + R_SUCCEED(); + } else { + // We have to allocate memory. Determine how much to allocate and where while the table + // is locked. + cur_address = m_current_heap_end; + allocation_size = size - (m_current_heap_end - m_heap_region_start); + } + } + + // Reserve memory for the heap extension. + KScopedResourceReservation memory_reservation( + m_resource_limit, Svc::LimitableResource::PhysicalMemoryMax, allocation_size); + R_UNLESS(memory_reservation.Succeeded(), ResultLimitReached); + + // Allocate pages for the heap extension. + KPageGroup pg(m_kernel, m_block_info_manager); + R_TRY(m_kernel.MemoryManager().AllocateAndOpen(std::addressof(pg), allocation_size / PageSize, + m_allocate_option)); + + // Close the opened pages when we're done with them. + // If the mapping succeeds, each page will gain an extra reference, otherwise they will be freed + // automatically. + SCOPE_EXIT({ pg.Close(); }); + + // Clear all the newly allocated pages. + for (const auto& it : pg) { + std::memset(GetHeapVirtualPointer(m_kernel, it.GetAddress()), m_heap_fill_value, + it.GetSize()); + } + + // Map the pages. + { + // Lock the table. + KScopedLightLock lk(m_general_lock); + + // Ensure that the heap hasn't changed since we began executing. + ASSERT(cur_address == m_current_heap_end); + + // Check the memory state. + size_t num_allocator_blocks; + R_TRY(this->CheckMemoryState(std::addressof(num_allocator_blocks), m_current_heap_end, + allocation_size, KMemoryState::All, KMemoryState::Free, + KMemoryPermission::None, KMemoryPermission::None, + KMemoryAttribute::None, KMemoryAttribute::None)); + + // Create an update allocator. + Result allocator_result; + KMemoryBlockManagerUpdateAllocator allocator( + std::addressof(allocator_result), m_memory_block_slab_manager, num_allocator_blocks); + R_TRY(allocator_result); + + // We're going to perform an update, so create a helper. + KScopedPageTableUpdater updater(this); + + // Map the pages. + const size_t num_pages = allocation_size / PageSize; + const KPageProperties map_properties = {KMemoryPermission::UserReadWrite, false, false, + (m_current_heap_end == m_heap_region_start) + ? DisableMergeAttribute::DisableHead + : DisableMergeAttribute::None}; + R_TRY(this->Operate(updater.GetPageList(), m_current_heap_end, num_pages, pg, + map_properties, OperationType::MapGroup, false)); + + // We succeeded, so commit our memory reservation. + memory_reservation.Commit(); + + // Apply the memory block update. + m_memory_block_manager.Update( + std::addressof(allocator), m_current_heap_end, num_pages, KMemoryState::Normal, + KMemoryPermission::UserReadWrite, KMemoryAttribute::None, + m_heap_region_start == m_current_heap_end ? KMemoryBlockDisableMergeAttribute::Normal + : KMemoryBlockDisableMergeAttribute::None, + KMemoryBlockDisableMergeAttribute::None); + + // Update the current heap end. + m_current_heap_end = m_heap_region_start + size; + + // Set the output. + *out = m_heap_region_start; + R_SUCCEED(); + } +} + +Result KPageTableBase::SetMaxHeapSize(size_t size) { + // Lock the table. + KScopedLightLock lk(m_general_lock); + + // Only process page tables are allowed to set heap size. + ASSERT(!this->IsKernel()); + + m_max_heap_size = size; + + R_SUCCEED(); +} + +Result KPageTableBase::QueryInfo(KMemoryInfo* out_info, Svc::PageInfo* out_page_info, + KProcessAddress addr) const { + // If the address is invalid, create a fake block. + if (!this->Contains(addr, 1)) { + *out_info = { + .m_address = GetInteger(m_address_space_end), + .m_size = 0 - GetInteger(m_address_space_end), + .m_state = static_cast(Svc::MemoryState::Inaccessible), + .m_device_disable_merge_left_count = 0, + .m_device_disable_merge_right_count = 0, + .m_ipc_lock_count = 0, + .m_device_use_count = 0, + .m_ipc_disable_merge_count = 0, + .m_permission = KMemoryPermission::None, + .m_attribute = KMemoryAttribute::None, + .m_original_permission = KMemoryPermission::None, + .m_disable_merge_attribute = KMemoryBlockDisableMergeAttribute::None, + }; + out_page_info->flags = 0; + + R_SUCCEED(); + } + + // Otherwise, lock the table and query. + KScopedLightLock lk(m_general_lock); + R_RETURN(this->QueryInfoImpl(out_info, out_page_info, addr)); +} + +Result KPageTableBase::QueryPhysicalAddress(Svc::lp64::PhysicalMemoryInfo* out, + KProcessAddress address) const { + // Lock the table. + KScopedLightLock lk(m_general_lock); + + // Align the address down to page size. + address = Common::AlignDown(GetInteger(address), PageSize); + + // Verify that we can query the address. + KMemoryInfo info; + Svc::PageInfo page_info; + R_TRY(this->QueryInfoImpl(std::addressof(info), std::addressof(page_info), address)); + + // Check the memory state. + R_TRY(this->CheckMemoryState(info, KMemoryState::FlagCanQueryPhysical, + KMemoryState::FlagCanQueryPhysical, + KMemoryPermission::UserReadExecute, KMemoryPermission::UserRead, + KMemoryAttribute::None, KMemoryAttribute::None)); + + // Prepare to traverse. + KPhysicalAddress phys_addr; + size_t phys_size; + + KProcessAddress virt_addr = info.GetAddress(); + KProcessAddress end_addr = info.GetEndAddress(); + + // Perform traversal. + { + // Begin traversal. + TraversalContext context; + TraversalEntry next_entry; + bool traverse_valid = + m_impl->BeginTraversal(std::addressof(next_entry), std::addressof(context), virt_addr); + R_UNLESS(traverse_valid, ResultInvalidCurrentMemory); + + // Set tracking variables. + phys_addr = next_entry.phys_addr; + phys_size = next_entry.block_size - (GetInteger(phys_addr) & (next_entry.block_size - 1)); + + // Iterate. + while (true) { + // Continue the traversal. + traverse_valid = + m_impl->ContinueTraversal(std::addressof(next_entry), std::addressof(context)); + if (!traverse_valid) { + break; + } + + if (next_entry.phys_addr != (phys_addr + phys_size)) { + // Check if we're done. + if (virt_addr <= address && address <= virt_addr + phys_size - 1) { + break; + } + + // Advance. + phys_addr = next_entry.phys_addr; + virt_addr += next_entry.block_size; + phys_size = + next_entry.block_size - (GetInteger(phys_addr) & (next_entry.block_size - 1)); + } else { + phys_size += next_entry.block_size; + } + + // Check if we're done. + if (end_addr < virt_addr + phys_size) { + break; + } + } + ASSERT(virt_addr <= address && address <= virt_addr + phys_size - 1); + + // Ensure we use the right size. + if (end_addr < virt_addr + phys_size) { + phys_size = end_addr - virt_addr; + } + } + + // Set the output. + out->physical_address = GetInteger(phys_addr); + out->virtual_address = GetInteger(virt_addr); + out->size = phys_size; + R_SUCCEED(); +} + +Result KPageTableBase::MapIoImpl(KProcessAddress* out, PageLinkedList* page_list, + KPhysicalAddress phys_addr, size_t size, KMemoryState state, + KMemoryPermission perm) { + // Check pre-conditions. + ASSERT(this->IsLockedByCurrentThread()); + ASSERT(Common::IsAligned(GetInteger(phys_addr), PageSize)); + ASSERT(Common::IsAligned(size, PageSize)); + ASSERT(size > 0); + + R_UNLESS(phys_addr < phys_addr + size, ResultInvalidAddress); + const size_t num_pages = size / PageSize; + const KPhysicalAddress last = phys_addr + size - 1; + + // Get region extents. + const KProcessAddress region_start = m_kernel_map_region_start; + const size_t region_size = m_kernel_map_region_end - m_kernel_map_region_start; + const size_t region_num_pages = region_size / PageSize; + + ASSERT(this->CanContain(region_start, region_size, state)); + + // Locate the memory region. + const KMemoryRegion* region = KMemoryLayout::Find(m_kernel.MemoryLayout(), phys_addr); + R_UNLESS(region != nullptr, ResultInvalidAddress); + + ASSERT(region->Contains(GetInteger(phys_addr))); + + // Ensure that the region is mappable. + const bool is_rw = perm == KMemoryPermission::UserReadWrite; + while (true) { + // Check that the region exists. + R_UNLESS(region != nullptr, ResultInvalidAddress); + + // Check the region attributes. + R_UNLESS(!region->IsDerivedFrom(KMemoryRegionType_Dram), ResultInvalidAddress); + R_UNLESS(!region->HasTypeAttribute(KMemoryRegionAttr_UserReadOnly) || !is_rw, + ResultInvalidAddress); + R_UNLESS(!region->HasTypeAttribute(KMemoryRegionAttr_NoUserMap), ResultInvalidAddress); + + // Check if we're done. + if (GetInteger(last) <= region->GetLastAddress()) { + break; + } + + // Advance. + region = region->GetNext(); + }; + + // Select an address to map at. + KProcessAddress addr = 0; + { + const size_t alignment = 4_KiB; + const KPhysicalAddress aligned_phys = + Common::AlignUp(GetInteger(phys_addr), alignment) + alignment - 1; + R_UNLESS(aligned_phys > phys_addr, ResultInvalidAddress); + + const KPhysicalAddress last_aligned_paddr = + Common::AlignDown(GetInteger(last) + 1, alignment) - 1; + R_UNLESS((last_aligned_paddr <= last && aligned_phys <= last_aligned_paddr), + ResultInvalidAddress); + + addr = this->FindFreeArea(region_start, region_num_pages, num_pages, alignment, 0, + this->GetNumGuardPages()); + R_UNLESS(addr != 0, ResultOutOfMemory); + } + + // Check that we can map IO here. + ASSERT(this->CanContain(addr, size, state)); + R_ASSERT(this->CheckMemoryState(addr, size, KMemoryState::All, KMemoryState::Free, + KMemoryPermission::None, KMemoryPermission::None, + KMemoryAttribute::None, KMemoryAttribute::None)); + + // Perform mapping operation. + const KPageProperties properties = {perm, state == KMemoryState::IoRegister, false, + DisableMergeAttribute::DisableHead}; + R_TRY(this->Operate(page_list, addr, num_pages, phys_addr, true, properties, OperationType::Map, + false)); + + // Set the output address. + *out = addr; + + R_SUCCEED(); +} + +Result KPageTableBase::MapIo(KPhysicalAddress phys_addr, size_t size, KMemoryPermission perm) { + // Lock the table. + KScopedLightLock lk(m_general_lock); + + // Create an update allocator. + Result allocator_result; + KMemoryBlockManagerUpdateAllocator allocator(std::addressof(allocator_result), + m_memory_block_slab_manager); + R_TRY(allocator_result); + + // We're going to perform an update, so create a helper. + KScopedPageTableUpdater updater(this); + + // Map the io memory. + KProcessAddress addr; + R_TRY(this->MapIoImpl(std::addressof(addr), updater.GetPageList(), phys_addr, size, + KMemoryState::IoRegister, perm)); + + // Update the blocks. + m_memory_block_manager.Update(std::addressof(allocator), addr, size / PageSize, + KMemoryState::IoRegister, perm, KMemoryAttribute::Locked, + KMemoryBlockDisableMergeAttribute::Normal, + KMemoryBlockDisableMergeAttribute::None); + + // We successfully mapped the pages. + R_SUCCEED(); +} + +Result KPageTableBase::MapIoRegion(KProcessAddress dst_address, KPhysicalAddress phys_addr, + size_t size, Svc::MemoryMapping mapping, + Svc::MemoryPermission svc_perm) { + const size_t num_pages = size / PageSize; + + // Lock the table. + KScopedLightLock lk(m_general_lock); + + // Validate the memory state. + size_t num_allocator_blocks; + R_TRY(this->CheckMemoryState(std::addressof(num_allocator_blocks), dst_address, size, + KMemoryState::All, KMemoryState::None, KMemoryPermission::None, + KMemoryPermission::None, KMemoryAttribute::None, + KMemoryAttribute::None)); + + // Create an update allocator. + Result allocator_result; + KMemoryBlockManagerUpdateAllocator allocator(std::addressof(allocator_result), + m_memory_block_slab_manager, num_allocator_blocks); + R_TRY(allocator_result); + + // We're going to perform an update, so create a helper. + KScopedPageTableUpdater updater(this); + + // Perform mapping operation. + const KMemoryPermission perm = ConvertToKMemoryPermission(svc_perm); + const KPageProperties properties = {perm, mapping == Svc::MemoryMapping::IoRegister, + mapping == Svc::MemoryMapping::Uncached, + DisableMergeAttribute::DisableHead}; + R_TRY(this->Operate(updater.GetPageList(), dst_address, num_pages, phys_addr, true, properties, + OperationType::Map, false)); + + // Update the blocks. + const auto state = + mapping == Svc::MemoryMapping::Memory ? KMemoryState::IoMemory : KMemoryState::IoRegister; + m_memory_block_manager.Update( + std::addressof(allocator), dst_address, num_pages, state, perm, KMemoryAttribute::Locked, + KMemoryBlockDisableMergeAttribute::Normal, KMemoryBlockDisableMergeAttribute::None); + + // We successfully mapped the pages. + R_SUCCEED(); +} + +Result KPageTableBase::UnmapIoRegion(KProcessAddress dst_address, KPhysicalAddress phys_addr, + size_t size, Svc::MemoryMapping mapping) { + const size_t num_pages = size / PageSize; + + // Lock the table. + KScopedLightLock lk(m_general_lock); + + // Validate the memory state. + KMemoryState old_state; + KMemoryPermission old_perm; + KMemoryAttribute old_attr; + size_t num_allocator_blocks; + R_TRY(this->CheckMemoryState( + std::addressof(old_state), std::addressof(old_perm), std::addressof(old_attr), + std::addressof(num_allocator_blocks), dst_address, size, KMemoryState::All, + mapping == Svc::MemoryMapping::Memory ? KMemoryState::IoMemory : KMemoryState::IoRegister, + KMemoryPermission::None, KMemoryPermission::None, KMemoryAttribute::All, + KMemoryAttribute::Locked)); + + // Validate that the region being unmapped corresponds to the physical range described. + { + // Get the impl. + auto& impl = this->GetImpl(); + + // Begin traversal. + TraversalContext context; + TraversalEntry next_entry; + ASSERT( + impl.BeginTraversal(std::addressof(next_entry), std::addressof(context), dst_address)); + + // Check that the physical region matches. + R_UNLESS(next_entry.phys_addr == phys_addr, ResultInvalidMemoryRegion); + + // Iterate. + for (size_t checked_size = + next_entry.block_size - (GetInteger(phys_addr) & (next_entry.block_size - 1)); + checked_size < size; checked_size += next_entry.block_size) { + // Continue the traversal. + ASSERT(impl.ContinueTraversal(std::addressof(next_entry), std::addressof(context))); + + // Check that the physical region matches. + R_UNLESS(next_entry.phys_addr == phys_addr + checked_size, ResultInvalidMemoryRegion); + } + } + + // Create an update allocator. + Result allocator_result; + KMemoryBlockManagerUpdateAllocator allocator(std::addressof(allocator_result), + m_memory_block_slab_manager, num_allocator_blocks); + R_TRY(allocator_result); + + // We're going to perform an update, so create a helper. + KScopedPageTableUpdater updater(this); + + // If the region being unmapped is Memory, synchronize. + if (mapping == Svc::MemoryMapping::Memory) { + // Change the region to be uncached. + const KPageProperties properties = {old_perm, false, true, DisableMergeAttribute::None}; + R_ASSERT(this->Operate(updater.GetPageList(), dst_address, num_pages, 0, false, properties, + OperationType::ChangePermissionsAndRefresh, false)); + + // Temporarily unlock ourselves, so that other operations can occur while we flush the + // region. + m_general_lock.Unlock(); + SCOPE_EXIT({ m_general_lock.Lock(); }); + + // Flush the region. + R_ASSERT(FlushDataCache(dst_address, size)); + } + + // Perform the unmap. + const KPageProperties unmap_properties = {KMemoryPermission::None, false, false, + DisableMergeAttribute::None}; + R_ASSERT(this->Operate(updater.GetPageList(), dst_address, num_pages, 0, false, + unmap_properties, OperationType::Unmap, false)); + + // Update the blocks. + m_memory_block_manager.Update(std::addressof(allocator), dst_address, num_pages, + KMemoryState::Free, KMemoryPermission::None, + KMemoryAttribute::None, KMemoryBlockDisableMergeAttribute::None, + KMemoryBlockDisableMergeAttribute::Normal); + + R_SUCCEED(); +} + +Result KPageTableBase::MapStatic(KPhysicalAddress phys_addr, size_t size, KMemoryPermission perm) { + ASSERT(Common::IsAligned(GetInteger(phys_addr), PageSize)); + ASSERT(Common::IsAligned(size, PageSize)); + ASSERT(size > 0); + R_UNLESS(phys_addr < phys_addr + size, ResultInvalidAddress); + const size_t num_pages = size / PageSize; + const KPhysicalAddress last = phys_addr + size - 1; + + // Get region extents. + const KProcessAddress region_start = this->GetRegionAddress(KMemoryState::Static); + const size_t region_size = this->GetRegionSize(KMemoryState::Static); + const size_t region_num_pages = region_size / PageSize; + + // Locate the memory region. + const KMemoryRegion* region = KMemoryLayout::Find(m_kernel.MemoryLayout(), phys_addr); + R_UNLESS(region != nullptr, ResultInvalidAddress); + + ASSERT(region->Contains(GetInteger(phys_addr))); + R_UNLESS(GetInteger(last) <= region->GetLastAddress(), ResultInvalidAddress); + + // Check the region attributes. + const bool is_rw = perm == KMemoryPermission::UserReadWrite; + R_UNLESS(region->IsDerivedFrom(KMemoryRegionType_Dram), ResultInvalidAddress); + R_UNLESS(!region->HasTypeAttribute(KMemoryRegionAttr_NoUserMap), ResultInvalidAddress); + R_UNLESS(!region->HasTypeAttribute(KMemoryRegionAttr_UserReadOnly) || !is_rw, + ResultInvalidAddress); + + // Lock the table. + KScopedLightLock lk(m_general_lock); + + // Select an address to map at. + KProcessAddress addr = 0; + { + const size_t alignment = 4_KiB; + const KPhysicalAddress aligned_phys = + Common::AlignUp(GetInteger(phys_addr), alignment) + alignment - 1; + R_UNLESS(aligned_phys > phys_addr, ResultInvalidAddress); + + const KPhysicalAddress last_aligned_paddr = + Common::AlignDown(GetInteger(last) + 1, alignment) - 1; + R_UNLESS((last_aligned_paddr <= last && aligned_phys <= last_aligned_paddr), + ResultInvalidAddress); + + addr = this->FindFreeArea(region_start, region_num_pages, num_pages, alignment, 0, + this->GetNumGuardPages()); + R_UNLESS(addr != 0, ResultOutOfMemory); + } + + // Check that we can map static here. + ASSERT(this->CanContain(addr, size, KMemoryState::Static)); + R_ASSERT(this->CheckMemoryState(addr, size, KMemoryState::All, KMemoryState::Free, + KMemoryPermission::None, KMemoryPermission::None, + KMemoryAttribute::None, KMemoryAttribute::None)); + + // Create an update allocator. + Result allocator_result; + KMemoryBlockManagerUpdateAllocator allocator(std::addressof(allocator_result), + m_memory_block_slab_manager); + R_TRY(allocator_result); + + // We're going to perform an update, so create a helper. + KScopedPageTableUpdater updater(this); + + // Perform mapping operation. + const KPageProperties properties = {perm, false, false, DisableMergeAttribute::DisableHead}; + R_TRY(this->Operate(updater.GetPageList(), addr, num_pages, phys_addr, true, properties, + OperationType::Map, false)); + + // Update the blocks. + m_memory_block_manager.Update(std::addressof(allocator), addr, num_pages, KMemoryState::Static, + perm, KMemoryAttribute::None, + KMemoryBlockDisableMergeAttribute::Normal, + KMemoryBlockDisableMergeAttribute::None); + + // We successfully mapped the pages. + R_SUCCEED(); +} + +Result KPageTableBase::MapRegion(KMemoryRegionType region_type, KMemoryPermission perm) { + // Get the memory region. + const KMemoryRegion* region = + m_kernel.MemoryLayout().GetPhysicalMemoryRegionTree().FindFirstDerived(region_type); + R_UNLESS(region != nullptr, ResultOutOfRange); + + // Check that the region is valid. + ASSERT(region->GetEndAddress() != 0); + + // Map the region. + R_TRY_CATCH(this->MapStatic(region->GetAddress(), region->GetSize(), perm)){ + R_CONVERT(ResultInvalidAddress, ResultOutOfRange)} R_END_TRY_CATCH; + + R_SUCCEED(); +} + +Result KPageTableBase::MapPages(KProcessAddress* out_addr, size_t num_pages, size_t alignment, + KPhysicalAddress phys_addr, bool is_pa_valid, + KProcessAddress region_start, size_t region_num_pages, + KMemoryState state, KMemoryPermission perm) { + ASSERT(Common::IsAligned(alignment, PageSize) && alignment >= PageSize); + + // Ensure this is a valid map request. + R_UNLESS(this->CanContain(region_start, region_num_pages * PageSize, state), + ResultInvalidCurrentMemory); + R_UNLESS(num_pages < region_num_pages, ResultOutOfMemory); + + // Lock the table. + KScopedLightLock lk(m_general_lock); + + // Find a random address to map at. + KProcessAddress addr = this->FindFreeArea(region_start, region_num_pages, num_pages, alignment, + 0, this->GetNumGuardPages()); + R_UNLESS(addr != 0, ResultOutOfMemory); + ASSERT(Common::IsAligned(GetInteger(addr), alignment)); + ASSERT(this->CanContain(addr, num_pages * PageSize, state)); + R_ASSERT(this->CheckMemoryState( + addr, num_pages * PageSize, KMemoryState::All, KMemoryState::Free, KMemoryPermission::None, + KMemoryPermission::None, KMemoryAttribute::None, KMemoryAttribute::None)); + + // Create an update allocator. + Result allocator_result; + KMemoryBlockManagerUpdateAllocator allocator(std::addressof(allocator_result), + m_memory_block_slab_manager); + R_TRY(allocator_result); + + // We're going to perform an update, so create a helper. + KScopedPageTableUpdater updater(this); + + // Perform mapping operation. + if (is_pa_valid) { + const KPageProperties properties = {perm, false, false, DisableMergeAttribute::DisableHead}; + R_TRY(this->Operate(updater.GetPageList(), addr, num_pages, phys_addr, true, properties, + OperationType::Map, false)); + } else { + R_TRY(this->AllocateAndMapPagesImpl(updater.GetPageList(), addr, num_pages, perm)); + } + + // Update the blocks. + m_memory_block_manager.Update(std::addressof(allocator), addr, num_pages, state, perm, + KMemoryAttribute::None, KMemoryBlockDisableMergeAttribute::Normal, + KMemoryBlockDisableMergeAttribute::None); + + // We successfully mapped the pages. + *out_addr = addr; + R_SUCCEED(); +} + +Result KPageTableBase::MapPages(KProcessAddress address, size_t num_pages, KMemoryState state, + KMemoryPermission perm) { + // Check that the map is in range. + const size_t size = num_pages * PageSize; + R_UNLESS(this->CanContain(address, size, state), ResultInvalidCurrentMemory); + + // Lock the table. + KScopedLightLock lk(m_general_lock); + + // Check the memory state. + size_t num_allocator_blocks; + R_TRY(this->CheckMemoryState(std::addressof(num_allocator_blocks), address, size, + KMemoryState::All, KMemoryState::Free, KMemoryPermission::None, + KMemoryPermission::None, KMemoryAttribute::None, + KMemoryAttribute::None)); + + // Create an update allocator. + Result allocator_result; + KMemoryBlockManagerUpdateAllocator allocator(std::addressof(allocator_result), + m_memory_block_slab_manager, num_allocator_blocks); + R_TRY(allocator_result); + + // We're going to perform an update, so create a helper. + KScopedPageTableUpdater updater(this); + + // Map the pages. + R_TRY(this->AllocateAndMapPagesImpl(updater.GetPageList(), address, num_pages, perm)); + + // Update the blocks. + m_memory_block_manager.Update(std::addressof(allocator), address, num_pages, state, perm, + KMemoryAttribute::None, KMemoryBlockDisableMergeAttribute::Normal, + KMemoryBlockDisableMergeAttribute::None); + + R_SUCCEED(); +} + +Result KPageTableBase::UnmapPages(KProcessAddress address, size_t num_pages, KMemoryState state) { + // Check that the unmap is in range. + const size_t size = num_pages * PageSize; + R_UNLESS(this->Contains(address, size), ResultInvalidCurrentMemory); + + // Lock the table. + KScopedLightLock lk(m_general_lock); + + // Check the memory state. + size_t num_allocator_blocks; + R_TRY(this->CheckMemoryState(std::addressof(num_allocator_blocks), address, size, + KMemoryState::All, state, KMemoryPermission::None, + KMemoryPermission::None, KMemoryAttribute::All, + KMemoryAttribute::None)); + + // Create an update allocator. + Result allocator_result; + KMemoryBlockManagerUpdateAllocator allocator(std::addressof(allocator_result), + m_memory_block_slab_manager, num_allocator_blocks); + R_TRY(allocator_result); + + // We're going to perform an update, so create a helper. + KScopedPageTableUpdater updater(this); + + // Perform the unmap. + const KPageProperties unmap_properties = {KMemoryPermission::None, false, false, + DisableMergeAttribute::None}; + R_TRY(this->Operate(updater.GetPageList(), address, num_pages, 0, false, unmap_properties, + OperationType::Unmap, false)); + + // Update the blocks. + m_memory_block_manager.Update(std::addressof(allocator), address, num_pages, KMemoryState::Free, + KMemoryPermission::None, KMemoryAttribute::None, + KMemoryBlockDisableMergeAttribute::None, + KMemoryBlockDisableMergeAttribute::Normal); + + R_SUCCEED(); +} + +Result KPageTableBase::MapPageGroup(KProcessAddress* out_addr, const KPageGroup& pg, + KProcessAddress region_start, size_t region_num_pages, + KMemoryState state, KMemoryPermission perm) { + ASSERT(!this->IsLockedByCurrentThread()); + + // Ensure this is a valid map request. + const size_t num_pages = pg.GetNumPages(); + R_UNLESS(this->CanContain(region_start, region_num_pages * PageSize, state), + ResultInvalidCurrentMemory); + R_UNLESS(num_pages < region_num_pages, ResultOutOfMemory); + + // Lock the table. + KScopedLightLock lk(m_general_lock); + + // Find a random address to map at. + KProcessAddress addr = this->FindFreeArea(region_start, region_num_pages, num_pages, PageSize, + 0, this->GetNumGuardPages()); + R_UNLESS(addr != 0, ResultOutOfMemory); + ASSERT(this->CanContain(addr, num_pages * PageSize, state)); + R_ASSERT(this->CheckMemoryState( + addr, num_pages * PageSize, KMemoryState::All, KMemoryState::Free, KMemoryPermission::None, + KMemoryPermission::None, KMemoryAttribute::None, KMemoryAttribute::None)); + + // Create an update allocator. + Result allocator_result; + KMemoryBlockManagerUpdateAllocator allocator(std::addressof(allocator_result), + m_memory_block_slab_manager); + R_TRY(allocator_result); + + // We're going to perform an update, so create a helper. + KScopedPageTableUpdater updater(this); + + // Perform mapping operation. + const KPageProperties properties = {perm, false, false, DisableMergeAttribute::DisableHead}; + R_TRY(this->MapPageGroupImpl(updater.GetPageList(), addr, pg, properties, false)); + + // Update the blocks. + m_memory_block_manager.Update(std::addressof(allocator), addr, num_pages, state, perm, + KMemoryAttribute::None, KMemoryBlockDisableMergeAttribute::Normal, + KMemoryBlockDisableMergeAttribute::None); + + // We successfully mapped the pages. + *out_addr = addr; + R_SUCCEED(); +} + +Result KPageTableBase::MapPageGroup(KProcessAddress addr, const KPageGroup& pg, KMemoryState state, + KMemoryPermission perm) { + ASSERT(!this->IsLockedByCurrentThread()); + + // Ensure this is a valid map request. + const size_t num_pages = pg.GetNumPages(); + const size_t size = num_pages * PageSize; + R_UNLESS(this->CanContain(addr, size, state), ResultInvalidCurrentMemory); + + // Lock the table. + KScopedLightLock lk(m_general_lock); + + // Check if state allows us to map. + size_t num_allocator_blocks; + R_TRY(this->CheckMemoryState(std::addressof(num_allocator_blocks), addr, size, + KMemoryState::All, KMemoryState::Free, KMemoryPermission::None, + KMemoryPermission::None, KMemoryAttribute::None, + KMemoryAttribute::None)); + + // Create an update allocator. + Result allocator_result; + KMemoryBlockManagerUpdateAllocator allocator(std::addressof(allocator_result), + m_memory_block_slab_manager, num_allocator_blocks); + R_TRY(allocator_result); + + // We're going to perform an update, so create a helper. + KScopedPageTableUpdater updater(this); + + // Perform mapping operation. + const KPageProperties properties = {perm, false, false, DisableMergeAttribute::DisableHead}; + R_TRY(this->MapPageGroupImpl(updater.GetPageList(), addr, pg, properties, false)); + + // Update the blocks. + m_memory_block_manager.Update(std::addressof(allocator), addr, num_pages, state, perm, + KMemoryAttribute::None, KMemoryBlockDisableMergeAttribute::Normal, + KMemoryBlockDisableMergeAttribute::None); + + // We successfully mapped the pages. + R_SUCCEED(); +} + +Result KPageTableBase::UnmapPageGroup(KProcessAddress address, const KPageGroup& pg, + KMemoryState state) { + ASSERT(!this->IsLockedByCurrentThread()); + + // Ensure this is a valid unmap request. + const size_t num_pages = pg.GetNumPages(); + const size_t size = num_pages * PageSize; + R_UNLESS(this->CanContain(address, size, state), ResultInvalidCurrentMemory); + + // Lock the table. + KScopedLightLock lk(m_general_lock); + + // Check if state allows us to unmap. + size_t num_allocator_blocks; + R_TRY(this->CheckMemoryState(std::addressof(num_allocator_blocks), address, size, + KMemoryState::All, state, KMemoryPermission::None, + KMemoryPermission::None, KMemoryAttribute::All, + KMemoryAttribute::None)); + + // Check that the page group is valid. + R_UNLESS(this->IsValidPageGroup(pg, address, num_pages), ResultInvalidCurrentMemory); + + // Create an update allocator. + Result allocator_result; + KMemoryBlockManagerUpdateAllocator allocator(std::addressof(allocator_result), + m_memory_block_slab_manager, num_allocator_blocks); + R_TRY(allocator_result); + + // We're going to perform an update, so create a helper. + KScopedPageTableUpdater updater(this); + + // Perform unmapping operation. + const KPageProperties properties = {KMemoryPermission::None, false, false, + DisableMergeAttribute::None}; + R_TRY(this->Operate(updater.GetPageList(), address, num_pages, 0, false, properties, + OperationType::Unmap, false)); + + // Update the blocks. + m_memory_block_manager.Update(std::addressof(allocator), address, num_pages, KMemoryState::Free, + KMemoryPermission::None, KMemoryAttribute::None, + KMemoryBlockDisableMergeAttribute::None, + KMemoryBlockDisableMergeAttribute::Normal); + + R_SUCCEED(); +} + +Result KPageTableBase::MakeAndOpenPageGroup(KPageGroup* out, KProcessAddress address, + size_t num_pages, KMemoryState state_mask, + KMemoryState state, KMemoryPermission perm_mask, + KMemoryPermission perm, KMemoryAttribute attr_mask, + KMemoryAttribute attr) { + // Ensure that the page group isn't null. + ASSERT(out != nullptr); + + // Make sure that the region we're mapping is valid for the table. + const size_t size = num_pages * PageSize; + R_UNLESS(this->Contains(address, size), ResultInvalidCurrentMemory); + + // Lock the table. + KScopedLightLock lk(m_general_lock); + + // Check if state allows us to create the group. + R_TRY(this->CheckMemoryState(address, size, state_mask | KMemoryState::FlagReferenceCounted, + state | KMemoryState::FlagReferenceCounted, perm_mask, perm, + attr_mask, attr)); + + // Create a new page group for the region. + R_TRY(this->MakePageGroup(*out, address, num_pages)); + + // Open a new reference to the pages in the group. + out->Open(); + + R_SUCCEED(); +} + +Result KPageTableBase::InvalidateProcessDataCache(KProcessAddress address, size_t size) { + // Check that the region is in range. + R_UNLESS(this->Contains(address, size), ResultInvalidCurrentMemory); + + // Lock the table. + KScopedLightLock lk(m_general_lock); + + // Check the memory state. + R_TRY(this->CheckMemoryStateContiguous( + address, size, KMemoryState::FlagReferenceCounted, KMemoryState::FlagReferenceCounted, + KMemoryPermission::UserReadWrite, KMemoryPermission::UserReadWrite, + KMemoryAttribute::Uncached, KMemoryAttribute::None)); + + // Get the impl. + auto& impl = this->GetImpl(); + + // Begin traversal. + TraversalContext context; + TraversalEntry next_entry; + bool traverse_valid = + impl.BeginTraversal(std::addressof(next_entry), std::addressof(context), address); + R_UNLESS(traverse_valid, ResultInvalidCurrentMemory); + + // Prepare tracking variables. + KPhysicalAddress cur_addr = next_entry.phys_addr; + size_t cur_size = next_entry.block_size - (GetInteger(cur_addr) & (next_entry.block_size - 1)); + size_t tot_size = cur_size; + + // Iterate. + while (tot_size < size) { + // Continue the traversal. + traverse_valid = + impl.ContinueTraversal(std::addressof(next_entry), std::addressof(context)); + R_UNLESS(traverse_valid, ResultInvalidCurrentMemory); + + if (next_entry.phys_addr != (cur_addr + cur_size)) { + // Check that the pages are linearly mapped. + R_UNLESS(IsLinearMappedPhysicalAddress(cur_addr), ResultInvalidCurrentMemory); + + // Invalidate the block. + if (cur_size > 0) { + // NOTE: Nintendo does not check the result of invalidation. + InvalidateDataCache(GetLinearMappedVirtualPointer(m_kernel, cur_addr), cur_size); + } + + // Advance. + cur_addr = next_entry.phys_addr; + cur_size = next_entry.block_size; + } else { + cur_size += next_entry.block_size; + } + + tot_size += next_entry.block_size; + } + + // Ensure we use the right size for the last block. + if (tot_size > size) { + cur_size -= (tot_size - size); + } + + // Check that the last block is linearly mapped. + R_UNLESS(IsLinearMappedPhysicalAddress(cur_addr), ResultInvalidCurrentMemory); + + // Invalidate the last block. + if (cur_size > 0) { + // NOTE: Nintendo does not check the result of invalidation. + InvalidateDataCache(GetLinearMappedVirtualPointer(m_kernel, cur_addr), cur_size); + } + + R_SUCCEED(); +} + +Result KPageTableBase::InvalidateCurrentProcessDataCache(KProcessAddress address, size_t size) { + // Check pre-condition: this is being called on the current process. + ASSERT(this == std::addressof(GetCurrentProcess(m_kernel).GetPageTable().GetBasePageTable())); + + // Check that the region is in range. + R_UNLESS(this->Contains(address, size), ResultInvalidCurrentMemory); + + // Lock the table. + KScopedLightLock lk(m_general_lock); + + // Check the memory state. + R_TRY(this->CheckMemoryStateContiguous( + address, size, KMemoryState::FlagReferenceCounted, KMemoryState::FlagReferenceCounted, + KMemoryPermission::UserReadWrite, KMemoryPermission::UserReadWrite, + KMemoryAttribute::Uncached, KMemoryAttribute::None)); + + // Invalidate the data cache. + R_RETURN(InvalidateDataCache(address, size)); +} + +Result KPageTableBase::ReadDebugMemory(KProcessAddress dst_address, KProcessAddress src_address, + size_t size) { + // Lightly validate the region is in range. + R_UNLESS(this->Contains(src_address, size), ResultInvalidCurrentMemory); + + // Lock the table. + KScopedLightLock lk(m_general_lock); + + // Require that the memory either be user readable or debuggable. + const bool can_read = R_SUCCEEDED(this->CheckMemoryStateContiguous( + src_address, size, KMemoryState::None, KMemoryState::None, KMemoryPermission::UserRead, + KMemoryPermission::UserRead, KMemoryAttribute::None, KMemoryAttribute::None)); + if (!can_read) { + const bool can_debug = R_SUCCEEDED(this->CheckMemoryStateContiguous( + src_address, size, KMemoryState::FlagCanDebug, KMemoryState::FlagCanDebug, + KMemoryPermission::None, KMemoryPermission::None, KMemoryAttribute::None, + KMemoryAttribute::None)); + R_UNLESS(can_debug, ResultInvalidCurrentMemory); + } + + // Get the impl. + auto& impl = this->GetImpl(); + auto& dst_memory = GetCurrentMemory(m_system.Kernel()); + + // Begin traversal. + TraversalContext context; + TraversalEntry next_entry; + bool traverse_valid = + impl.BeginTraversal(std::addressof(next_entry), std::addressof(context), src_address); + R_UNLESS(traverse_valid, ResultInvalidCurrentMemory); + + // Prepare tracking variables. + KPhysicalAddress cur_addr = next_entry.phys_addr; + size_t cur_size = next_entry.block_size - (GetInteger(cur_addr) & (next_entry.block_size - 1)); + size_t tot_size = cur_size; + + auto PerformCopy = [&]() -> Result { + // Ensure the address is linear mapped. + R_UNLESS(IsLinearMappedPhysicalAddress(cur_addr), ResultInvalidCurrentMemory); + + // Copy as much aligned data as we can. + if (cur_size >= sizeof(u32)) { + const size_t copy_size = Common::AlignDown(cur_size, sizeof(u32)); + const void* copy_src = GetLinearMappedVirtualPointer(m_kernel, cur_addr); + FlushDataCache(copy_src, copy_size); + R_UNLESS(dst_memory.WriteBlock(dst_address, copy_src, copy_size), ResultInvalidPointer); + + dst_address += copy_size; + cur_addr += copy_size; + cur_size -= copy_size; + } + + // Copy remaining data. + if (cur_size > 0) { + const void* copy_src = GetLinearMappedVirtualPointer(m_kernel, cur_addr); + FlushDataCache(copy_src, cur_size); + R_UNLESS(dst_memory.WriteBlock(dst_address, copy_src, cur_size), ResultInvalidPointer); + } + + R_SUCCEED(); + }; + + // Iterate. + while (tot_size < size) { + // Continue the traversal. + traverse_valid = + impl.ContinueTraversal(std::addressof(next_entry), std::addressof(context)); + ASSERT(traverse_valid); + + if (next_entry.phys_addr != (cur_addr + cur_size)) { + // Perform copy. + R_TRY(PerformCopy()); + + // Advance. + dst_address += cur_size; + + cur_addr = next_entry.phys_addr; + cur_size = next_entry.block_size; + } else { + cur_size += next_entry.block_size; + } + + tot_size += next_entry.block_size; + } + + // Ensure we use the right size for the last block. + if (tot_size > size) { + cur_size -= (tot_size - size); + } + + // Perform copy for the last block. + R_TRY(PerformCopy()); + + R_SUCCEED(); +} + +Result KPageTableBase::WriteDebugMemory(KProcessAddress dst_address, KProcessAddress src_address, + size_t size) { + // Lightly validate the region is in range. + R_UNLESS(this->Contains(dst_address, size), ResultInvalidCurrentMemory); + + // Lock the table. + KScopedLightLock lk(m_general_lock); + + // Require that the memory either be user writable or debuggable. + const bool can_read = R_SUCCEEDED(this->CheckMemoryStateContiguous( + dst_address, size, KMemoryState::None, KMemoryState::None, KMemoryPermission::UserReadWrite, + KMemoryPermission::UserReadWrite, KMemoryAttribute::None, KMemoryAttribute::None)); + if (!can_read) { + const bool can_debug = R_SUCCEEDED(this->CheckMemoryStateContiguous( + dst_address, size, KMemoryState::FlagCanDebug, KMemoryState::FlagCanDebug, + KMemoryPermission::None, KMemoryPermission::None, KMemoryAttribute::None, + KMemoryAttribute::None)); + R_UNLESS(can_debug, ResultInvalidCurrentMemory); + } + + // Get the impl. + auto& impl = this->GetImpl(); + auto& src_memory = GetCurrentMemory(m_system.Kernel()); + + // Begin traversal. + TraversalContext context; + TraversalEntry next_entry; + bool traverse_valid = + impl.BeginTraversal(std::addressof(next_entry), std::addressof(context), dst_address); + R_UNLESS(traverse_valid, ResultInvalidCurrentMemory); + + // Prepare tracking variables. + KPhysicalAddress cur_addr = next_entry.phys_addr; + size_t cur_size = next_entry.block_size - (GetInteger(cur_addr) & (next_entry.block_size - 1)); + size_t tot_size = cur_size; + + auto PerformCopy = [&]() -> Result { + // Ensure the address is linear mapped. + R_UNLESS(IsLinearMappedPhysicalAddress(cur_addr), ResultInvalidCurrentMemory); + + // Copy as much aligned data as we can. + if (cur_size >= sizeof(u32)) { + const size_t copy_size = Common::AlignDown(cur_size, sizeof(u32)); + void* copy_dst = GetLinearMappedVirtualPointer(m_kernel, cur_addr); + R_UNLESS(src_memory.ReadBlock(src_address, copy_dst, copy_size), + ResultInvalidCurrentMemory); + + StoreDataCache(GetLinearMappedVirtualPointer(m_kernel, cur_addr), copy_size); + + src_address += copy_size; + cur_addr += copy_size; + cur_size -= copy_size; + } + + // Copy remaining data. + if (cur_size > 0) { + void* copy_dst = GetLinearMappedVirtualPointer(m_kernel, cur_addr); + R_UNLESS(src_memory.ReadBlock(src_address, copy_dst, cur_size), + ResultInvalidCurrentMemory); + + StoreDataCache(GetLinearMappedVirtualPointer(m_kernel, cur_addr), cur_size); + } + + R_SUCCEED(); + }; + + // Iterate. + while (tot_size < size) { + // Continue the traversal. + traverse_valid = + impl.ContinueTraversal(std::addressof(next_entry), std::addressof(context)); + ASSERT(traverse_valid); + + if (next_entry.phys_addr != (cur_addr + cur_size)) { + // Perform copy. + R_TRY(PerformCopy()); + + // Advance. + src_address += cur_size; + + cur_addr = next_entry.phys_addr; + cur_size = next_entry.block_size; + } else { + cur_size += next_entry.block_size; + } + + tot_size += next_entry.block_size; + } + + // Ensure we use the right size for the last block. + if (tot_size > size) { + cur_size -= (tot_size - size); + } + + // Perform copy for the last block. + R_TRY(PerformCopy()); + + // Invalidate the entire instruction cache, as this svc allows modifying executable pages. + InvalidateEntireInstructionCache(m_system); + + R_SUCCEED(); +} + +Result KPageTableBase::ReadIoMemoryImpl(KProcessAddress dst_addr, KPhysicalAddress phys_addr, + size_t size, KMemoryState state) { + // Check pre-conditions. + ASSERT(this->IsLockedByCurrentThread()); + + // Determine the mapping extents. + const KPhysicalAddress map_start = Common::AlignDown(GetInteger(phys_addr), PageSize); + const KPhysicalAddress map_end = Common::AlignUp(GetInteger(phys_addr) + size, PageSize); + const size_t map_size = map_end - map_start; + + // Get the memory reference to write into. + auto& dst_memory = GetCurrentMemory(m_kernel); + + // We're going to perform an update, so create a helper. + KScopedPageTableUpdater updater(this); + + // Temporarily map the io memory. + KProcessAddress io_addr; + R_TRY(this->MapIoImpl(std::addressof(io_addr), updater.GetPageList(), map_start, map_size, + state, KMemoryPermission::UserRead)); + + // Ensure we unmap the io memory when we're done with it. + const KPageProperties unmap_properties = + KPageProperties{KMemoryPermission::None, false, false, DisableMergeAttribute::None}; + SCOPE_EXIT({ + R_ASSERT(this->Operate(updater.GetPageList(), io_addr, map_size / PageSize, 0, false, + unmap_properties, OperationType::Unmap, true)); + }); + + // Read the memory. + const KProcessAddress read_addr = io_addr + (GetInteger(phys_addr) & (PageSize - 1)); + dst_memory.CopyBlock(dst_addr, read_addr, size); + + R_SUCCEED(); +} + +Result KPageTableBase::WriteIoMemoryImpl(KPhysicalAddress phys_addr, KProcessAddress src_addr, + size_t size, KMemoryState state) { + // Check pre-conditions. + ASSERT(this->IsLockedByCurrentThread()); + + // Determine the mapping extents. + const KPhysicalAddress map_start = Common::AlignDown(GetInteger(phys_addr), PageSize); + const KPhysicalAddress map_end = Common::AlignUp(GetInteger(phys_addr) + size, PageSize); + const size_t map_size = map_end - map_start; + + // Get the memory reference to read from. + auto& src_memory = GetCurrentMemory(m_kernel); + + // We're going to perform an update, so create a helper. + KScopedPageTableUpdater updater(this); + + // Temporarily map the io memory. + KProcessAddress io_addr; + R_TRY(this->MapIoImpl(std::addressof(io_addr), updater.GetPageList(), map_start, map_size, + state, KMemoryPermission::UserReadWrite)); + + // Ensure we unmap the io memory when we're done with it. + const KPageProperties unmap_properties = + KPageProperties{KMemoryPermission::None, false, false, DisableMergeAttribute::None}; + SCOPE_EXIT({ + R_ASSERT(this->Operate(updater.GetPageList(), io_addr, map_size / PageSize, 0, false, + unmap_properties, OperationType::Unmap, true)); + }); + + // Write the memory. + const KProcessAddress write_addr = io_addr + (GetInteger(phys_addr) & (PageSize - 1)); + R_UNLESS(src_memory.CopyBlock(write_addr, src_addr, size), ResultInvalidPointer); + + R_SUCCEED(); +} + +Result KPageTableBase::ReadDebugIoMemory(KProcessAddress dst_address, KProcessAddress src_address, + size_t size, KMemoryState state) { + // Lightly validate the range before doing anything else. + R_UNLESS(this->Contains(src_address, size), ResultInvalidCurrentMemory); + + // We need to lock both this table, and the current process's table, so set up some aliases. + KPageTableBase& src_page_table = *this; + KPageTableBase& dst_page_table = GetCurrentProcess(m_kernel).GetPageTable().GetBasePageTable(); + + // Acquire the table locks. + KScopedLightLockPair lk(src_page_table.m_general_lock, dst_page_table.m_general_lock); + + // Check that the desired range is readable io memory. + R_TRY(this->CheckMemoryStateContiguous(src_address, size, KMemoryState::All, state, + KMemoryPermission::UserRead, KMemoryPermission::UserRead, + KMemoryAttribute::None, KMemoryAttribute::None)); + + // Read the memory. + KProcessAddress dst = dst_address; + const KProcessAddress last_address = src_address + size - 1; + while (src_address <= last_address) { + // Get the current physical address. + KPhysicalAddress phys_addr; + ASSERT(src_page_table.GetPhysicalAddressLocked(std::addressof(phys_addr), src_address)); + + // Determine the current read size. + const size_t cur_size = + std::min(last_address - src_address + 1, + Common::AlignDown(GetInteger(src_address) + PageSize, PageSize) - + GetInteger(src_address)); + + // Read. + R_TRY(dst_page_table.ReadIoMemoryImpl(dst, phys_addr, cur_size, state)); + + // Advance. + src_address += cur_size; + dst += cur_size; + } + + R_SUCCEED(); +} + +Result KPageTableBase::WriteDebugIoMemory(KProcessAddress dst_address, KProcessAddress src_address, + size_t size, KMemoryState state) { + // Lightly validate the range before doing anything else. + R_UNLESS(this->Contains(dst_address, size), ResultInvalidCurrentMemory); + + // We need to lock both this table, and the current process's table, so set up some aliases. + KPageTableBase& src_page_table = *this; + KPageTableBase& dst_page_table = GetCurrentProcess(m_kernel).GetPageTable().GetBasePageTable(); + + // Acquire the table locks. + KScopedLightLockPair lk(src_page_table.m_general_lock, dst_page_table.m_general_lock); + + // Check that the desired range is writable io memory. + R_TRY(this->CheckMemoryStateContiguous( + dst_address, size, KMemoryState::All, state, KMemoryPermission::UserReadWrite, + KMemoryPermission::UserReadWrite, KMemoryAttribute::None, KMemoryAttribute::None)); + + // Read the memory. + KProcessAddress src = src_address; + const KProcessAddress last_address = dst_address + size - 1; + while (dst_address <= last_address) { + // Get the current physical address. + KPhysicalAddress phys_addr; + ASSERT(src_page_table.GetPhysicalAddressLocked(std::addressof(phys_addr), dst_address)); + + // Determine the current read size. + const size_t cur_size = + std::min(last_address - dst_address + 1, + Common::AlignDown(GetInteger(dst_address) + PageSize, PageSize) - + GetInteger(dst_address)); + + // Read. + R_TRY(dst_page_table.WriteIoMemoryImpl(phys_addr, src, cur_size, state)); + + // Advance. + dst_address += cur_size; + src += cur_size; + } + + R_SUCCEED(); +} + +Result KPageTableBase::LockForMapDeviceAddressSpace(bool* out_is_io, KProcessAddress address, + size_t size, KMemoryPermission perm, + bool is_aligned, bool check_heap) { + // Lightly validate the range before doing anything else. + const size_t num_pages = size / PageSize; + R_UNLESS(this->Contains(address, size), ResultInvalidCurrentMemory); + + // Lock the table. + KScopedLightLock lk(m_general_lock); + + // Check the memory state. + const KMemoryState test_state = + (is_aligned ? KMemoryState::FlagCanAlignedDeviceMap : KMemoryState::FlagCanDeviceMap) | + (check_heap ? KMemoryState::FlagReferenceCounted : KMemoryState::None); + size_t num_allocator_blocks; + KMemoryState old_state; + R_TRY(this->CheckMemoryState(std::addressof(old_state), nullptr, nullptr, + std::addressof(num_allocator_blocks), address, size, test_state, + test_state, perm, perm, + KMemoryAttribute::IpcLocked | KMemoryAttribute::Locked, + KMemoryAttribute::None, KMemoryAttribute::DeviceShared)); + + // Create an update allocator. + Result allocator_result; + KMemoryBlockManagerUpdateAllocator allocator(std::addressof(allocator_result), + m_memory_block_slab_manager, num_allocator_blocks); + R_TRY(allocator_result); + + // Update the memory blocks. + m_memory_block_manager.UpdateLock(std::addressof(allocator), address, num_pages, + &KMemoryBlock::ShareToDevice, KMemoryPermission::None); + + // Set whether the locked memory was io. + *out_is_io = + static_cast(old_state & KMemoryState::Mask) == Svc::MemoryState::Io; + + R_SUCCEED(); +} + +Result KPageTableBase::LockForUnmapDeviceAddressSpace(KProcessAddress address, size_t size, + bool check_heap) { + // Lightly validate the range before doing anything else. + const size_t num_pages = size / PageSize; + R_UNLESS(this->Contains(address, size), ResultInvalidCurrentMemory); + + // Lock the table. + KScopedLightLock lk(m_general_lock); + + // Check the memory state. + const KMemoryState test_state = + KMemoryState::FlagCanDeviceMap | + (check_heap ? KMemoryState::FlagReferenceCounted : KMemoryState::None); + size_t num_allocator_blocks; + R_TRY(this->CheckMemoryStateContiguous( + std::addressof(num_allocator_blocks), address, size, test_state, test_state, + KMemoryPermission::None, KMemoryPermission::None, + KMemoryAttribute::DeviceShared | KMemoryAttribute::Locked, KMemoryAttribute::DeviceShared)); + + // Create an update allocator. + Result allocator_result; + KMemoryBlockManagerUpdateAllocator allocator(std::addressof(allocator_result), + m_memory_block_slab_manager, num_allocator_blocks); + R_TRY(allocator_result); + + // Update the memory blocks. + const KMemoryBlockManager::MemoryBlockLockFunction lock_func = + m_enable_device_address_space_merge + ? &KMemoryBlock::UpdateDeviceDisableMergeStateForShare + : &KMemoryBlock::UpdateDeviceDisableMergeStateForShareRight; + m_memory_block_manager.UpdateLock(std::addressof(allocator), address, num_pages, lock_func, + KMemoryPermission::None); + + R_SUCCEED(); +} + +Result KPageTableBase::UnlockForDeviceAddressSpace(KProcessAddress address, size_t size) { + // Lightly validate the range before doing anything else. + const size_t num_pages = size / PageSize; + R_UNLESS(this->Contains(address, size), ResultInvalidCurrentMemory); + + // Lock the table. + KScopedLightLock lk(m_general_lock); + + // Check the memory state. + size_t num_allocator_blocks; + R_TRY(this->CheckMemoryStateContiguous( + std::addressof(num_allocator_blocks), address, size, KMemoryState::FlagCanDeviceMap, + KMemoryState::FlagCanDeviceMap, KMemoryPermission::None, KMemoryPermission::None, + KMemoryAttribute::DeviceShared | KMemoryAttribute::Locked, KMemoryAttribute::DeviceShared)); + + // Create an update allocator. + Result allocator_result; + KMemoryBlockManagerUpdateAllocator allocator(std::addressof(allocator_result), + m_memory_block_slab_manager, num_allocator_blocks); + R_TRY(allocator_result); + + // Update the memory blocks. + m_memory_block_manager.UpdateLock(std::addressof(allocator), address, num_pages, + &KMemoryBlock::UnshareToDevice, KMemoryPermission::None); + + R_SUCCEED(); +} + +Result KPageTableBase::UnlockForDeviceAddressSpacePartialMap(KProcessAddress address, size_t size) { + // Lightly validate the range before doing anything else. + const size_t num_pages = size / PageSize; + R_UNLESS(this->Contains(address, size), ResultInvalidCurrentMemory); + + // Lock the table. + KScopedLightLock lk(m_general_lock); + + // Check memory state. + size_t allocator_num_blocks = 0; + R_TRY(this->CheckMemoryStateContiguous( + std::addressof(allocator_num_blocks), address, size, KMemoryState::FlagCanDeviceMap, + KMemoryState::FlagCanDeviceMap, KMemoryPermission::None, KMemoryPermission::None, + KMemoryAttribute::DeviceShared | KMemoryAttribute::Locked, KMemoryAttribute::DeviceShared)); + + // Create an update allocator for the region. + Result allocator_result; + KMemoryBlockManagerUpdateAllocator allocator(std::addressof(allocator_result), + m_memory_block_slab_manager, allocator_num_blocks); + R_TRY(allocator_result); + + // Update the memory blocks. + m_memory_block_manager.UpdateLock( + std::addressof(allocator), address, num_pages, + m_enable_device_address_space_merge + ? &KMemoryBlock::UpdateDeviceDisableMergeStateForUnshare + : &KMemoryBlock::UpdateDeviceDisableMergeStateForUnshareRight, + KMemoryPermission::None); + + R_SUCCEED(); +} + +Result KPageTableBase::OpenMemoryRangeForMapDeviceAddressSpace(KPageTableBase::MemoryRange* out, + KProcessAddress address, size_t size, + KMemoryPermission perm, + bool is_aligned) { + // Lock the table. + KScopedLightLock lk(m_general_lock); + + // Get the range. + const KMemoryState test_state = + (is_aligned ? KMemoryState::FlagCanAlignedDeviceMap : KMemoryState::FlagCanDeviceMap); + R_TRY(this->GetContiguousMemoryRangeWithState( + out, address, size, test_state, test_state, perm, perm, + KMemoryAttribute::IpcLocked | KMemoryAttribute::Locked, KMemoryAttribute::None)); + + // We got the range, so open it. + out->Open(); + + R_SUCCEED(); +} + +Result KPageTableBase::OpenMemoryRangeForUnmapDeviceAddressSpace(MemoryRange* out, + KProcessAddress address, + size_t size) { + // Lock the table. + KScopedLightLock lk(m_general_lock); + + // Get the range. + R_TRY(this->GetContiguousMemoryRangeWithState( + out, address, size, KMemoryState::FlagCanDeviceMap, KMemoryState::FlagCanDeviceMap, + KMemoryPermission::None, KMemoryPermission::None, + KMemoryAttribute::DeviceShared | KMemoryAttribute::Locked, KMemoryAttribute::DeviceShared)); + + // We got the range, so open it. + out->Open(); + + R_SUCCEED(); +} + +Result KPageTableBase::LockForIpcUserBuffer(KPhysicalAddress* out, KProcessAddress address, + size_t size) { + R_RETURN(this->LockMemoryAndOpen( + nullptr, out, address, size, KMemoryState::FlagCanIpcUserBuffer, + KMemoryState::FlagCanIpcUserBuffer, KMemoryPermission::All, + KMemoryPermission::UserReadWrite, KMemoryAttribute::All, KMemoryAttribute::None, + static_cast(KMemoryPermission::NotMapped | + KMemoryPermission::KernelReadWrite), + KMemoryAttribute::Locked)); +} + +Result KPageTableBase::UnlockForIpcUserBuffer(KProcessAddress address, size_t size) { + R_RETURN(this->UnlockMemory(address, size, KMemoryState::FlagCanIpcUserBuffer, + KMemoryState::FlagCanIpcUserBuffer, KMemoryPermission::None, + KMemoryPermission::None, KMemoryAttribute::All, + KMemoryAttribute::Locked, KMemoryPermission::UserReadWrite, + KMemoryAttribute::Locked, nullptr)); +} + +Result KPageTableBase::LockForTransferMemory(KPageGroup* out, KProcessAddress address, size_t size, + KMemoryPermission perm) { + R_RETURN(this->LockMemoryAndOpen(out, nullptr, address, size, KMemoryState::FlagCanTransfer, + KMemoryState::FlagCanTransfer, KMemoryPermission::All, + KMemoryPermission::UserReadWrite, KMemoryAttribute::All, + KMemoryAttribute::None, perm, KMemoryAttribute::Locked)); +} + +Result KPageTableBase::UnlockForTransferMemory(KProcessAddress address, size_t size, + const KPageGroup& pg) { + R_RETURN(this->UnlockMemory(address, size, KMemoryState::FlagCanTransfer, + KMemoryState::FlagCanTransfer, KMemoryPermission::None, + KMemoryPermission::None, KMemoryAttribute::All, + KMemoryAttribute::Locked, KMemoryPermission::UserReadWrite, + KMemoryAttribute::Locked, std::addressof(pg))); +} + +Result KPageTableBase::LockForCodeMemory(KPageGroup* out, KProcessAddress address, size_t size) { + R_RETURN(this->LockMemoryAndOpen( + out, nullptr, address, size, KMemoryState::FlagCanCodeMemory, + KMemoryState::FlagCanCodeMemory, KMemoryPermission::All, KMemoryPermission::UserReadWrite, + KMemoryAttribute::All, KMemoryAttribute::None, + static_cast(KMemoryPermission::NotMapped | + KMemoryPermission::KernelReadWrite), + KMemoryAttribute::Locked)); +} + +Result KPageTableBase::UnlockForCodeMemory(KProcessAddress address, size_t size, + const KPageGroup& pg) { + R_RETURN(this->UnlockMemory(address, size, KMemoryState::FlagCanCodeMemory, + KMemoryState::FlagCanCodeMemory, KMemoryPermission::None, + KMemoryPermission::None, KMemoryAttribute::All, + KMemoryAttribute::Locked, KMemoryPermission::UserReadWrite, + KMemoryAttribute::Locked, std::addressof(pg))); +} + +Result KPageTableBase::OpenMemoryRangeForProcessCacheOperation(MemoryRange* out, + KProcessAddress address, + size_t size) { + // Lock the table. + KScopedLightLock lk(m_general_lock); + + // Get the range. + R_TRY(this->GetContiguousMemoryRangeWithState( + out, address, size, KMemoryState::FlagReferenceCounted, KMemoryState::FlagReferenceCounted, + KMemoryPermission::UserRead, KMemoryPermission::UserRead, KMemoryAttribute::Uncached, + KMemoryAttribute::None)); + + // We got the range, so open it. + out->Open(); + + R_SUCCEED(); +} + +Result KPageTableBase::CopyMemoryFromLinearToUser( + KProcessAddress dst_addr, size_t size, KProcessAddress src_addr, KMemoryState src_state_mask, + KMemoryState src_state, KMemoryPermission src_test_perm, KMemoryAttribute src_attr_mask, + KMemoryAttribute src_attr) { + // Lightly validate the range before doing anything else. + R_UNLESS(this->Contains(src_addr, size), ResultInvalidCurrentMemory); + + // Get the destination memory reference. + auto& dst_memory = GetCurrentMemory(m_kernel); + + // Copy the memory. + { + // Lock the table. + KScopedLightLock lk(m_general_lock); + + // Check memory state. + R_TRY(this->CheckMemoryStateContiguous( + src_addr, size, src_state_mask, src_state, src_test_perm, src_test_perm, + src_attr_mask | KMemoryAttribute::Uncached, src_attr)); + + auto& impl = this->GetImpl(); + + // Begin traversal. + TraversalContext context; + TraversalEntry next_entry; + bool traverse_valid = + impl.BeginTraversal(std::addressof(next_entry), std::addressof(context), src_addr); + ASSERT(traverse_valid); + + // Prepare tracking variables. + KPhysicalAddress cur_addr = next_entry.phys_addr; + size_t cur_size = + next_entry.block_size - (GetInteger(cur_addr) & (next_entry.block_size - 1)); + size_t tot_size = cur_size; + + auto PerformCopy = [&]() -> Result { + // Ensure the address is linear mapped. + R_UNLESS(IsLinearMappedPhysicalAddress(cur_addr), ResultInvalidCurrentMemory); + + // Copy as much aligned data as we can. + if (cur_size >= sizeof(u32)) { + const size_t copy_size = Common::AlignDown(cur_size, sizeof(u32)); + R_UNLESS(dst_memory.WriteBlock(dst_addr, + GetLinearMappedVirtualPointer(m_kernel, cur_addr), + copy_size), + ResultInvalidCurrentMemory); + + dst_addr += copy_size; + cur_addr += copy_size; + cur_size -= copy_size; + } + + // Copy remaining data. + if (cur_size > 0) { + R_UNLESS(dst_memory.WriteBlock( + dst_addr, GetLinearMappedVirtualPointer(m_kernel, cur_addr), cur_size), + ResultInvalidCurrentMemory); + } + + R_SUCCEED(); + }; + + // Iterate. + while (tot_size < size) { + // Continue the traversal. + traverse_valid = + impl.ContinueTraversal(std::addressof(next_entry), std::addressof(context)); + ASSERT(traverse_valid); + + if (next_entry.phys_addr != (cur_addr + cur_size)) { + // Perform copy. + R_TRY(PerformCopy()); + + // Advance. + dst_addr += cur_size; + + cur_addr = next_entry.phys_addr; + cur_size = next_entry.block_size; + } else { + cur_size += next_entry.block_size; + } + + tot_size += next_entry.block_size; + } + + // Ensure we use the right size for the last block. + if (tot_size > size) { + cur_size -= (tot_size - size); + } + + // Perform copy for the last block. + R_TRY(PerformCopy()); + } + + R_SUCCEED(); +} + +Result KPageTableBase::CopyMemoryFromLinearToKernel( + void* buffer, size_t size, KProcessAddress src_addr, KMemoryState src_state_mask, + KMemoryState src_state, KMemoryPermission src_test_perm, KMemoryAttribute src_attr_mask, + KMemoryAttribute src_attr) { + // Lightly validate the range before doing anything else. + R_UNLESS(this->Contains(src_addr, size), ResultInvalidCurrentMemory); + + // Copy the memory. + { + // Lock the table. + KScopedLightLock lk(m_general_lock); + + // Check memory state. + R_TRY(this->CheckMemoryStateContiguous( + src_addr, size, src_state_mask, src_state, src_test_perm, src_test_perm, + src_attr_mask | KMemoryAttribute::Uncached, src_attr)); + + auto& impl = this->GetImpl(); + + // Begin traversal. + TraversalContext context; + TraversalEntry next_entry; + bool traverse_valid = + impl.BeginTraversal(std::addressof(next_entry), std::addressof(context), src_addr); + ASSERT(traverse_valid); + + // Prepare tracking variables. + KPhysicalAddress cur_addr = next_entry.phys_addr; + size_t cur_size = + next_entry.block_size - (GetInteger(cur_addr) & (next_entry.block_size - 1)); + size_t tot_size = cur_size; + + auto PerformCopy = [&]() -> Result { + // Ensure the address is linear mapped. + R_UNLESS(IsLinearMappedPhysicalAddress(cur_addr), ResultInvalidCurrentMemory); + + // Copy the data. + std::memcpy(buffer, GetLinearMappedVirtualPointer(m_kernel, cur_addr), cur_size); + + R_SUCCEED(); + }; + + // Iterate. + while (tot_size < size) { + // Continue the traversal. + traverse_valid = + impl.ContinueTraversal(std::addressof(next_entry), std::addressof(context)); + ASSERT(traverse_valid); + + if (next_entry.phys_addr != (cur_addr + cur_size)) { + // Perform copy. + R_TRY(PerformCopy()); + + // Advance. + buffer = reinterpret_cast(reinterpret_cast(buffer) + cur_size); + + cur_addr = next_entry.phys_addr; + cur_size = next_entry.block_size; + } else { + cur_size += next_entry.block_size; + } + + tot_size += next_entry.block_size; + } + + // Ensure we use the right size for the last block. + if (tot_size > size) { + cur_size -= (tot_size - size); + } + + // Perform copy for the last block. + R_TRY(PerformCopy()); + } + + R_SUCCEED(); +} + +Result KPageTableBase::CopyMemoryFromUserToLinear( + KProcessAddress dst_addr, size_t size, KMemoryState dst_state_mask, KMemoryState dst_state, + KMemoryPermission dst_test_perm, KMemoryAttribute dst_attr_mask, KMemoryAttribute dst_attr, + KProcessAddress src_addr) { + // Lightly validate the range before doing anything else. + R_UNLESS(this->Contains(dst_addr, size), ResultInvalidCurrentMemory); + + // Get the source memory reference. + auto& src_memory = GetCurrentMemory(m_kernel); + + // Copy the memory. + { + // Lock the table. + KScopedLightLock lk(m_general_lock); + + // Check memory state. + R_TRY(this->CheckMemoryStateContiguous( + dst_addr, size, dst_state_mask, dst_state, dst_test_perm, dst_test_perm, + dst_attr_mask | KMemoryAttribute::Uncached, dst_attr)); + + auto& impl = this->GetImpl(); + + // Begin traversal. + TraversalContext context; + TraversalEntry next_entry; + bool traverse_valid = + impl.BeginTraversal(std::addressof(next_entry), std::addressof(context), dst_addr); + ASSERT(traverse_valid); + + // Prepare tracking variables. + KPhysicalAddress cur_addr = next_entry.phys_addr; + size_t cur_size = + next_entry.block_size - (GetInteger(cur_addr) & (next_entry.block_size - 1)); + size_t tot_size = cur_size; + + auto PerformCopy = [&]() -> Result { + // Ensure the address is linear mapped. + R_UNLESS(IsLinearMappedPhysicalAddress(cur_addr), ResultInvalidCurrentMemory); + + // Copy as much aligned data as we can. + if (cur_size >= sizeof(u32)) { + const size_t copy_size = Common::AlignDown(cur_size, sizeof(u32)); + R_UNLESS(src_memory.ReadBlock(src_addr, + GetLinearMappedVirtualPointer(m_kernel, cur_addr), + copy_size), + ResultInvalidCurrentMemory); + src_addr += copy_size; + cur_addr += copy_size; + cur_size -= copy_size; + } + + // Copy remaining data. + if (cur_size > 0) { + R_UNLESS(src_memory.ReadBlock( + src_addr, GetLinearMappedVirtualPointer(m_kernel, cur_addr), cur_size), + ResultInvalidCurrentMemory); + } + + R_SUCCEED(); + }; + + // Iterate. + while (tot_size < size) { + // Continue the traversal. + traverse_valid = + impl.ContinueTraversal(std::addressof(next_entry), std::addressof(context)); + ASSERT(traverse_valid); + + if (next_entry.phys_addr != (cur_addr + cur_size)) { + // Perform copy. + R_TRY(PerformCopy()); + + // Advance. + src_addr += cur_size; + + cur_addr = next_entry.phys_addr; + cur_size = next_entry.block_size; + } else { + cur_size += next_entry.block_size; + } + + tot_size += next_entry.block_size; + } + + // Ensure we use the right size for the last block. + if (tot_size > size) { + cur_size -= (tot_size - size); + } + + // Perform copy for the last block. + R_TRY(PerformCopy()); + } + + R_SUCCEED(); +} + +Result KPageTableBase::CopyMemoryFromKernelToLinear(KProcessAddress dst_addr, size_t size, + KMemoryState dst_state_mask, + KMemoryState dst_state, + KMemoryPermission dst_test_perm, + KMemoryAttribute dst_attr_mask, + KMemoryAttribute dst_attr, void* buffer) { + // Lightly validate the range before doing anything else. + R_UNLESS(this->Contains(dst_addr, size), ResultInvalidCurrentMemory); + + // Copy the memory. + { + // Lock the table. + KScopedLightLock lk(m_general_lock); + + // Check memory state. + R_TRY(this->CheckMemoryStateContiguous( + dst_addr, size, dst_state_mask, dst_state, dst_test_perm, dst_test_perm, + dst_attr_mask | KMemoryAttribute::Uncached, dst_attr)); + + auto& impl = this->GetImpl(); + + // Begin traversal. + TraversalContext context; + TraversalEntry next_entry; + bool traverse_valid = + impl.BeginTraversal(std::addressof(next_entry), std::addressof(context), dst_addr); + ASSERT(traverse_valid); + + // Prepare tracking variables. + KPhysicalAddress cur_addr = next_entry.phys_addr; + size_t cur_size = + next_entry.block_size - (GetInteger(cur_addr) & (next_entry.block_size - 1)); + size_t tot_size = cur_size; + + auto PerformCopy = [&]() -> Result { + // Ensure the address is linear mapped. + R_UNLESS(IsLinearMappedPhysicalAddress(cur_addr), ResultInvalidCurrentMemory); + + // Copy the data. + std::memcpy(GetLinearMappedVirtualPointer(m_kernel, cur_addr), buffer, cur_size); + + R_SUCCEED(); + }; + + // Iterate. + while (tot_size < size) { + // Continue the traversal. + traverse_valid = + impl.ContinueTraversal(std::addressof(next_entry), std::addressof(context)); + ASSERT(traverse_valid); + + if (next_entry.phys_addr != (cur_addr + cur_size)) { + // Perform copy. + R_TRY(PerformCopy()); + + // Advance. + buffer = reinterpret_cast(reinterpret_cast(buffer) + cur_size); + + cur_addr = next_entry.phys_addr; + cur_size = next_entry.block_size; + } else { + cur_size += next_entry.block_size; + } + + tot_size += next_entry.block_size; + } + + // Ensure we use the right size for the last block. + if (tot_size > size) { + cur_size -= (tot_size - size); + } + + // Perform copy for the last block. + R_TRY(PerformCopy()); + } + + R_SUCCEED(); +} + +Result KPageTableBase::CopyMemoryFromHeapToHeap( + KPageTableBase& dst_page_table, KProcessAddress dst_addr, size_t size, + KMemoryState dst_state_mask, KMemoryState dst_state, KMemoryPermission dst_test_perm, + KMemoryAttribute dst_attr_mask, KMemoryAttribute dst_attr, KProcessAddress src_addr, + KMemoryState src_state_mask, KMemoryState src_state, KMemoryPermission src_test_perm, + KMemoryAttribute src_attr_mask, KMemoryAttribute src_attr) { + // For convenience, alias this. + KPageTableBase& src_page_table = *this; + + // Lightly validate the ranges before doing anything else. + R_UNLESS(src_page_table.Contains(src_addr, size), ResultInvalidCurrentMemory); + R_UNLESS(dst_page_table.Contains(dst_addr, size), ResultInvalidCurrentMemory); + + // Copy the memory. + { + // Acquire the table locks. + KScopedLightLockPair lk(src_page_table.m_general_lock, dst_page_table.m_general_lock); + + // Check memory state. + R_TRY(src_page_table.CheckMemoryStateContiguous( + src_addr, size, src_state_mask, src_state, src_test_perm, src_test_perm, + src_attr_mask | KMemoryAttribute::Uncached, src_attr)); + R_TRY(dst_page_table.CheckMemoryStateContiguous( + dst_addr, size, dst_state_mask, dst_state, dst_test_perm, dst_test_perm, + dst_attr_mask | KMemoryAttribute::Uncached, dst_attr)); + + // Get implementations. + auto& src_impl = src_page_table.GetImpl(); + auto& dst_impl = dst_page_table.GetImpl(); + + // Prepare for traversal. + TraversalContext src_context; + TraversalContext dst_context; + TraversalEntry src_next_entry; + TraversalEntry dst_next_entry; + bool traverse_valid; + + // Begin traversal. + traverse_valid = src_impl.BeginTraversal(std::addressof(src_next_entry), + std::addressof(src_context), src_addr); + ASSERT(traverse_valid); + traverse_valid = dst_impl.BeginTraversal(std::addressof(dst_next_entry), + std::addressof(dst_context), dst_addr); + ASSERT(traverse_valid); + + // Prepare tracking variables. + KPhysicalAddress cur_src_block_addr = src_next_entry.phys_addr; + KPhysicalAddress cur_dst_block_addr = dst_next_entry.phys_addr; + size_t cur_src_size = src_next_entry.block_size - + (GetInteger(cur_src_block_addr) & (src_next_entry.block_size - 1)); + size_t cur_dst_size = dst_next_entry.block_size - + (GetInteger(cur_dst_block_addr) & (dst_next_entry.block_size - 1)); + + // Adjust the initial block sizes. + src_next_entry.block_size = cur_src_size; + dst_next_entry.block_size = cur_dst_size; + + // Before we get any crazier, succeed if there's nothing to do. + R_SUCCEED_IF(size == 0); + + // We're going to manage dual traversal via an offset against the total size. + KPhysicalAddress cur_src_addr = cur_src_block_addr; + KPhysicalAddress cur_dst_addr = cur_dst_block_addr; + size_t cur_min_size = std::min(cur_src_size, cur_dst_size); + + // Iterate. + size_t ofs = 0; + while (ofs < size) { + // Determine how much we can copy this iteration. + const size_t cur_copy_size = std::min(cur_min_size, size - ofs); + + // If we need to advance the traversals, do so. + bool updated_src = false, updated_dst = false, skip_copy = false; + if (ofs + cur_copy_size != size) { + if (cur_src_addr + cur_min_size == cur_src_block_addr + cur_src_size) { + // Continue the src traversal. + traverse_valid = src_impl.ContinueTraversal(std::addressof(src_next_entry), + std::addressof(src_context)); + ASSERT(traverse_valid); + + // Update source. + updated_src = cur_src_addr + cur_min_size != src_next_entry.phys_addr; + } + + if (cur_dst_addr + cur_min_size == + dst_next_entry.phys_addr + dst_next_entry.block_size) { + // Continue the dst traversal. + traverse_valid = dst_impl.ContinueTraversal(std::addressof(dst_next_entry), + std::addressof(dst_context)); + ASSERT(traverse_valid); + + // Update destination. + updated_dst = cur_dst_addr + cur_min_size != dst_next_entry.phys_addr; + } + + // If we didn't update either of source/destination, skip the copy this iteration. + if (!updated_src && !updated_dst) { + skip_copy = true; + + // Update the source block address. + cur_src_block_addr = src_next_entry.phys_addr; + } + } + + // Do the copy, unless we're skipping it. + if (!skip_copy) { + // We need both ends of the copy to be heap blocks. + R_UNLESS(IsHeapPhysicalAddress(cur_src_addr), ResultInvalidCurrentMemory); + R_UNLESS(IsHeapPhysicalAddress(cur_dst_addr), ResultInvalidCurrentMemory); + + // Copy the data. + std::memcpy(GetHeapVirtualPointer(m_kernel, cur_dst_addr), + GetHeapVirtualPointer(m_kernel, cur_src_addr), cur_copy_size); + + // Update. + cur_src_block_addr = src_next_entry.phys_addr; + cur_src_addr = updated_src ? cur_src_block_addr : cur_src_addr + cur_copy_size; + cur_dst_block_addr = dst_next_entry.phys_addr; + cur_dst_addr = updated_dst ? cur_dst_block_addr : cur_dst_addr + cur_copy_size; + + // Advance offset. + ofs += cur_copy_size; + } + + // Update min size. + cur_src_size = src_next_entry.block_size; + cur_dst_size = dst_next_entry.block_size; + cur_min_size = std::min(cur_src_block_addr - cur_src_addr + cur_src_size, + cur_dst_block_addr - cur_dst_addr + cur_dst_size); + } + } + + R_SUCCEED(); +} + +Result KPageTableBase::CopyMemoryFromHeapToHeapWithoutCheckDestination( + KPageTableBase& dst_page_table, KProcessAddress dst_addr, size_t size, + KMemoryState dst_state_mask, KMemoryState dst_state, KMemoryPermission dst_test_perm, + KMemoryAttribute dst_attr_mask, KMemoryAttribute dst_attr, KProcessAddress src_addr, + KMemoryState src_state_mask, KMemoryState src_state, KMemoryPermission src_test_perm, + KMemoryAttribute src_attr_mask, KMemoryAttribute src_attr) { + // For convenience, alias this. + KPageTableBase& src_page_table = *this; + + // Lightly validate the ranges before doing anything else. + R_UNLESS(src_page_table.Contains(src_addr, size), ResultInvalidCurrentMemory); + R_UNLESS(dst_page_table.Contains(dst_addr, size), ResultInvalidCurrentMemory); + + // Copy the memory. + { + // Acquire the table locks. + KScopedLightLockPair lk(src_page_table.m_general_lock, dst_page_table.m_general_lock); + + // Check memory state for source. + R_TRY(src_page_table.CheckMemoryStateContiguous( + src_addr, size, src_state_mask, src_state, src_test_perm, src_test_perm, + src_attr_mask | KMemoryAttribute::Uncached, src_attr)); + + // Destination state is intentionally unchecked. + + // Get implementations. + auto& src_impl = src_page_table.GetImpl(); + auto& dst_impl = dst_page_table.GetImpl(); + + // Prepare for traversal. + TraversalContext src_context; + TraversalContext dst_context; + TraversalEntry src_next_entry; + TraversalEntry dst_next_entry; + bool traverse_valid; + + // Begin traversal. + traverse_valid = src_impl.BeginTraversal(std::addressof(src_next_entry), + std::addressof(src_context), src_addr); + ASSERT(traverse_valid); + traverse_valid = dst_impl.BeginTraversal(std::addressof(dst_next_entry), + std::addressof(dst_context), dst_addr); + ASSERT(traverse_valid); + + // Prepare tracking variables. + KPhysicalAddress cur_src_block_addr = src_next_entry.phys_addr; + KPhysicalAddress cur_dst_block_addr = dst_next_entry.phys_addr; + size_t cur_src_size = src_next_entry.block_size - + (GetInteger(cur_src_block_addr) & (src_next_entry.block_size - 1)); + size_t cur_dst_size = dst_next_entry.block_size - + (GetInteger(cur_dst_block_addr) & (dst_next_entry.block_size - 1)); + + // Adjust the initial block sizes. + src_next_entry.block_size = cur_src_size; + dst_next_entry.block_size = cur_dst_size; + + // Before we get any crazier, succeed if there's nothing to do. + R_SUCCEED_IF(size == 0); + + // We're going to manage dual traversal via an offset against the total size. + KPhysicalAddress cur_src_addr = cur_src_block_addr; + KPhysicalAddress cur_dst_addr = cur_dst_block_addr; + size_t cur_min_size = std::min(cur_src_size, cur_dst_size); + + // Iterate. + size_t ofs = 0; + while (ofs < size) { + // Determine how much we can copy this iteration. + const size_t cur_copy_size = std::min(cur_min_size, size - ofs); + + // If we need to advance the traversals, do so. + bool updated_src = false, updated_dst = false, skip_copy = false; + if (ofs + cur_copy_size != size) { + if (cur_src_addr + cur_min_size == cur_src_block_addr + cur_src_size) { + // Continue the src traversal. + traverse_valid = src_impl.ContinueTraversal(std::addressof(src_next_entry), + std::addressof(src_context)); + ASSERT(traverse_valid); + + // Update source. + updated_src = cur_src_addr + cur_min_size != src_next_entry.phys_addr; + } + + if (cur_dst_addr + cur_min_size == + dst_next_entry.phys_addr + dst_next_entry.block_size) { + // Continue the dst traversal. + traverse_valid = dst_impl.ContinueTraversal(std::addressof(dst_next_entry), + std::addressof(dst_context)); + ASSERT(traverse_valid); + + // Update destination. + updated_dst = cur_dst_addr + cur_min_size != dst_next_entry.phys_addr; + } + + // If we didn't update either of source/destination, skip the copy this iteration. + if (!updated_src && !updated_dst) { + skip_copy = true; + + // Update the source block address. + cur_src_block_addr = src_next_entry.phys_addr; + } + } + + // Do the copy, unless we're skipping it. + if (!skip_copy) { + // We need both ends of the copy to be heap blocks. + R_UNLESS(IsHeapPhysicalAddress(cur_src_addr), ResultInvalidCurrentMemory); + R_UNLESS(IsHeapPhysicalAddress(cur_dst_addr), ResultInvalidCurrentMemory); + + // Copy the data. + std::memcpy(GetHeapVirtualPointer(m_kernel, cur_dst_addr), + GetHeapVirtualPointer(m_kernel, cur_src_addr), cur_copy_size); + + // Update. + cur_src_block_addr = src_next_entry.phys_addr; + cur_src_addr = updated_src ? cur_src_block_addr : cur_src_addr + cur_copy_size; + cur_dst_block_addr = dst_next_entry.phys_addr; + cur_dst_addr = updated_dst ? cur_dst_block_addr : cur_dst_addr + cur_copy_size; + + // Advance offset. + ofs += cur_copy_size; + } + + // Update min size. + cur_src_size = src_next_entry.block_size; + cur_dst_size = dst_next_entry.block_size; + cur_min_size = std::min(cur_src_block_addr - cur_src_addr + cur_src_size, + cur_dst_block_addr - cur_dst_addr + cur_dst_size); + } + } + + R_SUCCEED(); +} + +Result KPageTableBase::SetupForIpcClient(PageLinkedList* page_list, size_t* out_blocks_needed, + KProcessAddress address, size_t size, + KMemoryPermission test_perm, KMemoryState dst_state) { + // Validate pre-conditions. + ASSERT(this->IsLockedByCurrentThread()); + ASSERT(test_perm == KMemoryPermission::UserReadWrite || + test_perm == KMemoryPermission::UserRead); + + // Check that the address is in range. + R_UNLESS(this->Contains(address, size), ResultInvalidCurrentMemory); + + // Get the source permission. + const auto src_perm = static_cast( + (test_perm == KMemoryPermission::UserReadWrite) + ? KMemoryPermission::KernelReadWrite | KMemoryPermission::NotMapped + : KMemoryPermission::UserRead); + + // Get aligned extents. + const KProcessAddress aligned_src_start = Common::AlignDown(GetInteger(address), PageSize); + const KProcessAddress aligned_src_end = Common::AlignUp(GetInteger(address) + size, PageSize); + const KProcessAddress mapping_src_start = Common::AlignUp(GetInteger(address), PageSize); + const KProcessAddress mapping_src_end = Common::AlignDown(GetInteger(address) + size, PageSize); + + const auto aligned_src_last = GetInteger(aligned_src_end) - 1; + const auto mapping_src_last = GetInteger(mapping_src_end) - 1; + + // Get the test state and attribute mask. + KMemoryState test_state; + KMemoryAttribute test_attr_mask; + switch (dst_state) { + case KMemoryState::Ipc: + test_state = KMemoryState::FlagCanUseIpc; + test_attr_mask = + KMemoryAttribute::Uncached | KMemoryAttribute::DeviceShared | KMemoryAttribute::Locked; + break; + case KMemoryState::NonSecureIpc: + test_state = KMemoryState::FlagCanUseNonSecureIpc; + test_attr_mask = KMemoryAttribute::Uncached | KMemoryAttribute::Locked; + break; + case KMemoryState::NonDeviceIpc: + test_state = KMemoryState::FlagCanUseNonDeviceIpc; + test_attr_mask = KMemoryAttribute::Uncached | KMemoryAttribute::Locked; + break; + default: + R_THROW(ResultInvalidCombination); + } + + // Ensure that on failure, we roll back appropriately. + size_t mapped_size = 0; + ON_RESULT_FAILURE { + if (mapped_size > 0) { + this->CleanupForIpcClientOnServerSetupFailure(page_list, mapping_src_start, mapped_size, + src_perm); + } + }; + + size_t blocks_needed = 0; + + // Iterate, mapping as needed. + KMemoryBlockManager::const_iterator it = m_memory_block_manager.FindIterator(aligned_src_start); + while (true) { + const KMemoryInfo info = it->GetMemoryInfo(); + + // Validate the current block. + R_TRY(this->CheckMemoryState(info, test_state, test_state, test_perm, test_perm, + test_attr_mask, KMemoryAttribute::None)); + + if (mapping_src_start < mapping_src_end && + GetInteger(mapping_src_start) < info.GetEndAddress() && + info.GetAddress() < GetInteger(mapping_src_end)) { + const auto cur_start = info.GetAddress() >= GetInteger(mapping_src_start) + ? info.GetAddress() + : GetInteger(mapping_src_start); + const auto cur_end = mapping_src_last >= info.GetLastAddress() + ? info.GetEndAddress() + : GetInteger(mapping_src_end); + const size_t cur_size = cur_end - cur_start; + + if (info.GetAddress() < GetInteger(mapping_src_start)) { + ++blocks_needed; + } + if (mapping_src_last < info.GetLastAddress()) { + ++blocks_needed; + } + + // Set the permissions on the block, if we need to. + if ((info.GetPermission() & KMemoryPermission::IpcLockChangeMask) != src_perm) { + const DisableMergeAttribute head_body_attr = + (GetInteger(mapping_src_start) >= info.GetAddress()) + ? DisableMergeAttribute::DisableHeadAndBody + : DisableMergeAttribute::None; + const DisableMergeAttribute tail_attr = (cur_end == GetInteger(mapping_src_end)) + ? DisableMergeAttribute::DisableTail + : DisableMergeAttribute::None; + const KPageProperties properties = { + src_perm, false, false, + static_cast(head_body_attr | tail_attr)}; + R_TRY(this->Operate(page_list, cur_start, cur_size / PageSize, 0, false, properties, + OperationType::ChangePermissions, false)); + } + + // Note that we mapped this part. + mapped_size += cur_size; + } + + // If the block is at the end, we're done. + if (aligned_src_last <= info.GetLastAddress()) { + break; + } + + // Advance. + ++it; + ASSERT(it != m_memory_block_manager.end()); + } + + if (out_blocks_needed != nullptr) { + ASSERT(blocks_needed <= KMemoryBlockManagerUpdateAllocator::MaxBlocks); + *out_blocks_needed = blocks_needed; + } + + R_SUCCEED(); +} + +Result KPageTableBase::SetupForIpcServer(KProcessAddress* out_addr, size_t size, + KProcessAddress src_addr, KMemoryPermission test_perm, + KMemoryState dst_state, KPageTableBase& src_page_table, + bool send) { + ASSERT(this->IsLockedByCurrentThread()); + ASSERT(src_page_table.IsLockedByCurrentThread()); + + // Check that we can theoretically map. + const KProcessAddress region_start = m_alias_region_start; + const size_t region_size = m_alias_region_end - m_alias_region_start; + R_UNLESS(size < region_size, ResultOutOfAddressSpace); + + // Get aligned source extents. + const KProcessAddress src_start = src_addr; + const KProcessAddress src_end = src_addr + size; + const KProcessAddress aligned_src_start = Common::AlignDown(GetInteger(src_start), PageSize); + const KProcessAddress aligned_src_end = Common::AlignUp(GetInteger(src_start) + size, PageSize); + const KProcessAddress mapping_src_start = Common::AlignUp(GetInteger(src_start), PageSize); + const KProcessAddress mapping_src_end = + Common::AlignDown(GetInteger(src_start) + size, PageSize); + const size_t aligned_src_size = aligned_src_end - aligned_src_start; + const size_t mapping_src_size = + (mapping_src_start < mapping_src_end) ? (mapping_src_end - mapping_src_start) : 0; + + // Select a random address to map at. + KProcessAddress dst_addr = 0; + { + const size_t alignment = 4_KiB; + const size_t offset = GetInteger(aligned_src_start) & (alignment - 1); + + dst_addr = + this->FindFreeArea(region_start, region_size / PageSize, aligned_src_size / PageSize, + alignment, offset, this->GetNumGuardPages()); + R_UNLESS(dst_addr != 0, ResultOutOfAddressSpace); + } + + // Check that we can perform the operation we're about to perform. + ASSERT(this->CanContain(dst_addr, aligned_src_size, dst_state)); + + // Create an update allocator. + Result allocator_result; + KMemoryBlockManagerUpdateAllocator allocator(std::addressof(allocator_result), + m_memory_block_slab_manager); + R_TRY(allocator_result); + + // We're going to perform an update, so create a helper. + KScopedPageTableUpdater updater(this); + + // Reserve space for any partial pages we allocate. + const size_t unmapped_size = aligned_src_size - mapping_src_size; + KScopedResourceReservation memory_reservation( + m_resource_limit, Svc::LimitableResource::PhysicalMemoryMax, unmapped_size); + R_UNLESS(memory_reservation.Succeeded(), ResultLimitReached); + + // Ensure that we manage page references correctly. + KPhysicalAddress start_partial_page = 0; + KPhysicalAddress end_partial_page = 0; + KProcessAddress cur_mapped_addr = dst_addr; + + // If the partial pages are mapped, an extra reference will have been opened. Otherwise, they'll + // free on scope exit. + SCOPE_EXIT({ + if (start_partial_page != 0) { + m_kernel.MemoryManager().Close(start_partial_page, 1); + } + if (end_partial_page != 0) { + m_kernel.MemoryManager().Close(end_partial_page, 1); + } + }); + + ON_RESULT_FAILURE { + if (cur_mapped_addr != dst_addr) { + const KPageProperties unmap_properties = {KMemoryPermission::None, false, false, + DisableMergeAttribute::None}; + R_ASSERT(this->Operate(updater.GetPageList(), dst_addr, + (cur_mapped_addr - dst_addr) / PageSize, 0, false, + unmap_properties, OperationType::Unmap, true)); + } + }; + + // Allocate the start page as needed. + if (aligned_src_start < mapping_src_start) { + start_partial_page = + m_kernel.MemoryManager().AllocateAndOpenContinuous(1, 1, m_allocate_option); + R_UNLESS(start_partial_page != 0, ResultOutOfMemory); + } + + // Allocate the end page as needed. + if (mapping_src_end < aligned_src_end && + (aligned_src_start < mapping_src_end || aligned_src_start == mapping_src_start)) { + end_partial_page = + m_kernel.MemoryManager().AllocateAndOpenContinuous(1, 1, m_allocate_option); + R_UNLESS(end_partial_page != 0, ResultOutOfMemory); + } + + // Get the implementation. + auto& src_impl = src_page_table.GetImpl(); + + // Get the fill value for partial pages. + const auto fill_val = m_ipc_fill_value; + + // Begin traversal. + TraversalContext context; + TraversalEntry next_entry; + bool traverse_valid = src_impl.BeginTraversal(std::addressof(next_entry), + std::addressof(context), aligned_src_start); + ASSERT(traverse_valid); + + // Prepare tracking variables. + KPhysicalAddress cur_block_addr = next_entry.phys_addr; + size_t cur_block_size = + next_entry.block_size - (GetInteger(cur_block_addr) & (next_entry.block_size - 1)); + size_t tot_block_size = cur_block_size; + + // Map the start page, if we have one. + if (start_partial_page != 0) { + // Ensure the page holds correct data. + u8* const start_partial_virt = GetHeapVirtualPointer(m_kernel, start_partial_page); + if (send) { + const size_t partial_offset = src_start - aligned_src_start; + size_t copy_size, clear_size; + if (src_end < mapping_src_start) { + copy_size = size; + clear_size = mapping_src_start - src_end; + } else { + copy_size = mapping_src_start - src_start; + clear_size = 0; + } + + std::memset(start_partial_virt, fill_val, partial_offset); + std::memcpy(start_partial_virt + partial_offset, + GetHeapVirtualPointer(m_kernel, cur_block_addr) + partial_offset, + copy_size); + if (clear_size > 0) { + std::memset(start_partial_virt + partial_offset + copy_size, fill_val, clear_size); + } + } else { + std::memset(start_partial_virt, fill_val, PageSize); + } + + // Map the page. + const KPageProperties start_map_properties = {test_perm, false, false, + DisableMergeAttribute::DisableHead}; + R_TRY(this->Operate(updater.GetPageList(), cur_mapped_addr, 1, start_partial_page, true, + start_map_properties, OperationType::Map, false)); + + // Update tracking extents. + cur_mapped_addr += PageSize; + cur_block_addr += PageSize; + cur_block_size -= PageSize; + + // If the block's size was one page, we may need to continue traversal. + if (cur_block_size == 0 && aligned_src_size > PageSize) { + traverse_valid = + src_impl.ContinueTraversal(std::addressof(next_entry), std::addressof(context)); + ASSERT(traverse_valid); + + cur_block_addr = next_entry.phys_addr; + cur_block_size = next_entry.block_size; + tot_block_size += next_entry.block_size; + } + } + + // Map the remaining pages. + while (aligned_src_start + tot_block_size < mapping_src_end) { + // Continue the traversal. + traverse_valid = + src_impl.ContinueTraversal(std::addressof(next_entry), std::addressof(context)); + ASSERT(traverse_valid); + + // Process the block. + if (next_entry.phys_addr != cur_block_addr + cur_block_size) { + // Map the block we've been processing so far. + const KPageProperties map_properties = {test_perm, false, false, + (cur_mapped_addr == dst_addr) + ? DisableMergeAttribute::DisableHead + : DisableMergeAttribute::None}; + R_TRY(this->Operate(updater.GetPageList(), cur_mapped_addr, cur_block_size / PageSize, + cur_block_addr, true, map_properties, OperationType::Map, false)); + + // Update tracking extents. + cur_mapped_addr += cur_block_size; + cur_block_addr = next_entry.phys_addr; + cur_block_size = next_entry.block_size; + } else { + cur_block_size += next_entry.block_size; + } + tot_block_size += next_entry.block_size; + } + + // Handle the last direct-mapped page. + if (const KProcessAddress mapped_block_end = + aligned_src_start + tot_block_size - cur_block_size; + mapped_block_end < mapping_src_end) { + const size_t last_block_size = mapping_src_end - mapped_block_end; + + // Map the last block. + const KPageProperties map_properties = {test_perm, false, false, + (cur_mapped_addr == dst_addr) + ? DisableMergeAttribute::DisableHead + : DisableMergeAttribute::None}; + R_TRY(this->Operate(updater.GetPageList(), cur_mapped_addr, last_block_size / PageSize, + cur_block_addr, true, map_properties, OperationType::Map, false)); + + // Update tracking extents. + cur_mapped_addr += last_block_size; + cur_block_addr += last_block_size; + if (mapped_block_end + cur_block_size < aligned_src_end && + cur_block_size == last_block_size) { + traverse_valid = + src_impl.ContinueTraversal(std::addressof(next_entry), std::addressof(context)); + ASSERT(traverse_valid); + + cur_block_addr = next_entry.phys_addr; + } + } + + // Map the end page, if we have one. + if (end_partial_page != 0) { + // Ensure the page holds correct data. + u8* const end_partial_virt = GetHeapVirtualPointer(m_kernel, end_partial_page); + if (send) { + const size_t copy_size = src_end - mapping_src_end; + std::memcpy(end_partial_virt, GetHeapVirtualPointer(m_kernel, cur_block_addr), + copy_size); + std::memset(end_partial_virt + copy_size, fill_val, PageSize - copy_size); + } else { + std::memset(end_partial_virt, fill_val, PageSize); + } + + // Map the page. + const KPageProperties map_properties = {test_perm, false, false, + (cur_mapped_addr == dst_addr) + ? DisableMergeAttribute::DisableHead + : DisableMergeAttribute::None}; + R_TRY(this->Operate(updater.GetPageList(), cur_mapped_addr, 1, end_partial_page, true, + map_properties, OperationType::Map, false)); + } + + // Update memory blocks to reflect our changes + m_memory_block_manager.Update(std::addressof(allocator), dst_addr, aligned_src_size / PageSize, + dst_state, test_perm, KMemoryAttribute::None, + KMemoryBlockDisableMergeAttribute::Normal, + KMemoryBlockDisableMergeAttribute::None); + + // Set the output address. + *out_addr = dst_addr + (src_start - aligned_src_start); + + // We succeeded. + memory_reservation.Commit(); + R_SUCCEED(); +} + +Result KPageTableBase::SetupForIpc(KProcessAddress* out_dst_addr, size_t size, + KProcessAddress src_addr, KPageTableBase& src_page_table, + KMemoryPermission test_perm, KMemoryState dst_state, bool send) { + // For convenience, alias this. + KPageTableBase& dst_page_table = *this; + + // Acquire the table locks. + KScopedLightLockPair lk(src_page_table.m_general_lock, dst_page_table.m_general_lock); + + // We're going to perform an update, so create a helper. + KScopedPageTableUpdater updater(std::addressof(src_page_table)); + + // Perform client setup. + size_t num_allocator_blocks; + R_TRY(src_page_table.SetupForIpcClient(updater.GetPageList(), + std::addressof(num_allocator_blocks), src_addr, size, + test_perm, dst_state)); + + // Create an update allocator. + Result allocator_result; + KMemoryBlockManagerUpdateAllocator allocator(std::addressof(allocator_result), + src_page_table.m_memory_block_slab_manager, + num_allocator_blocks); + R_TRY(allocator_result); + + // Get the mapped extents. + const KProcessAddress src_map_start = Common::AlignUp(GetInteger(src_addr), PageSize); + const KProcessAddress src_map_end = Common::AlignDown(GetInteger(src_addr) + size, PageSize); + const size_t src_map_size = src_map_end - src_map_start; + + // Ensure that we clean up appropriately if we fail after this. + const auto src_perm = static_cast( + (test_perm == KMemoryPermission::UserReadWrite) + ? KMemoryPermission::KernelReadWrite | KMemoryPermission::NotMapped + : KMemoryPermission::UserRead); + ON_RESULT_FAILURE { + if (src_map_end > src_map_start) { + src_page_table.CleanupForIpcClientOnServerSetupFailure( + updater.GetPageList(), src_map_start, src_map_size, src_perm); + } + }; + + // Perform server setup. + R_TRY(dst_page_table.SetupForIpcServer(out_dst_addr, size, src_addr, test_perm, dst_state, + src_page_table, send)); + + // If anything was mapped, ipc-lock the pages. + if (src_map_start < src_map_end) { + // Get the source permission. + src_page_table.m_memory_block_manager.UpdateLock(std::addressof(allocator), src_map_start, + (src_map_end - src_map_start) / PageSize, + &KMemoryBlock::LockForIpc, src_perm); + } + + R_SUCCEED(); +} + +Result KPageTableBase::CleanupForIpcServer(KProcessAddress address, size_t size, + KMemoryState dst_state) { + // Validate the address. + R_UNLESS(this->Contains(address, size), ResultInvalidCurrentMemory); + + // Lock the table. + KScopedLightLock lk(m_general_lock); + + // Validate the memory state. + size_t num_allocator_blocks; + R_TRY(this->CheckMemoryState(std::addressof(num_allocator_blocks), address, size, + KMemoryState::All, dst_state, KMemoryPermission::UserRead, + KMemoryPermission::UserRead, KMemoryAttribute::All, + KMemoryAttribute::None)); + + // Create an update allocator. + Result allocator_result; + KMemoryBlockManagerUpdateAllocator allocator(std::addressof(allocator_result), + m_memory_block_slab_manager, num_allocator_blocks); + R_TRY(allocator_result); + + // We're going to perform an update, so create a helper. + KScopedPageTableUpdater updater(this); + + // Get aligned extents. + const KProcessAddress aligned_start = Common::AlignDown(GetInteger(address), PageSize); + const KProcessAddress aligned_end = Common::AlignUp(GetInteger(address) + size, PageSize); + const size_t aligned_size = aligned_end - aligned_start; + const size_t aligned_num_pages = aligned_size / PageSize; + + // Unmap the pages. + const KPageProperties unmap_properties = {KMemoryPermission::None, false, false, + DisableMergeAttribute::None}; + R_TRY(this->Operate(updater.GetPageList(), aligned_start, aligned_num_pages, 0, false, + unmap_properties, OperationType::Unmap, false)); + + // Update memory blocks. + m_memory_block_manager.Update(std::addressof(allocator), aligned_start, aligned_num_pages, + KMemoryState::None, KMemoryPermission::None, + KMemoryAttribute::None, KMemoryBlockDisableMergeAttribute::None, + KMemoryBlockDisableMergeAttribute::Normal); + + // Release from the resource limit as relevant. + const KProcessAddress mapping_start = Common::AlignUp(GetInteger(address), PageSize); + const KProcessAddress mapping_end = Common::AlignDown(GetInteger(address) + size, PageSize); + const size_t mapping_size = (mapping_start < mapping_end) ? mapping_end - mapping_start : 0; + m_resource_limit->Release(Svc::LimitableResource::PhysicalMemoryMax, + aligned_size - mapping_size); + + R_SUCCEED(); +} + +Result KPageTableBase::CleanupForIpcClient(KProcessAddress address, size_t size, + KMemoryState dst_state) { + // Validate the address. + R_UNLESS(this->Contains(address, size), ResultInvalidCurrentMemory); + + // Get aligned source extents. + const KProcessAddress mapping_start = Common::AlignUp(GetInteger(address), PageSize); + const KProcessAddress mapping_end = Common::AlignDown(GetInteger(address) + size, PageSize); + const KProcessAddress mapping_last = mapping_end - 1; + const size_t mapping_size = (mapping_start < mapping_end) ? (mapping_end - mapping_start) : 0; + + // If nothing was mapped, we're actually done immediately. + R_SUCCEED_IF(mapping_size == 0); + + // Get the test state and attribute mask. + KMemoryState test_state; + KMemoryAttribute test_attr_mask; + switch (dst_state) { + case KMemoryState::Ipc: + test_state = KMemoryState::FlagCanUseIpc; + test_attr_mask = + KMemoryAttribute::Uncached | KMemoryAttribute::DeviceShared | KMemoryAttribute::Locked; + break; + case KMemoryState::NonSecureIpc: + test_state = KMemoryState::FlagCanUseNonSecureIpc; + test_attr_mask = KMemoryAttribute::Uncached | KMemoryAttribute::Locked; + break; + case KMemoryState::NonDeviceIpc: + test_state = KMemoryState::FlagCanUseNonDeviceIpc; + test_attr_mask = KMemoryAttribute::Uncached | KMemoryAttribute::Locked; + break; + default: + R_THROW(ResultInvalidCombination); + } + + // Lock the table. + // NOTE: Nintendo does this *after* creating the updater below, but this does not follow + // convention elsewhere in KPageTableBase. + KScopedLightLock lk(m_general_lock); + + // We're going to perform an update, so create a helper. + KScopedPageTableUpdater updater(this); + + // Ensure that on failure, we roll back appropriately. + size_t mapped_size = 0; + ON_RESULT_FAILURE { + if (mapped_size > 0) { + // Determine where the mapping ends. + const auto mapped_end = GetInteger(mapping_start) + mapped_size; + const auto mapped_last = mapped_end - 1; + + // Get current and next iterators. + KMemoryBlockManager::const_iterator start_it = + m_memory_block_manager.FindIterator(mapping_start); + KMemoryBlockManager::const_iterator next_it = start_it; + ++next_it; + + // Get the current block info. + KMemoryInfo cur_info = start_it->GetMemoryInfo(); + + // Create tracking variables. + KProcessAddress cur_address = cur_info.GetAddress(); + size_t cur_size = cur_info.GetSize(); + bool cur_perm_eq = cur_info.GetPermission() == cur_info.GetOriginalPermission(); + bool cur_needs_set_perm = !cur_perm_eq && cur_info.GetIpcLockCount() == 1; + bool first = cur_info.GetIpcDisableMergeCount() == 1 && + False(cur_info.GetDisableMergeAttribute() & + KMemoryBlockDisableMergeAttribute::Locked); + + while ((GetInteger(cur_address) + cur_size - 1) < mapped_last) { + // Check that we have a next block. + ASSERT(next_it != m_memory_block_manager.end()); + + // Get the next info. + const KMemoryInfo next_info = next_it->GetMemoryInfo(); + + // Check if we can consolidate the next block's permission set with the current one. + const bool next_perm_eq = + next_info.GetPermission() == next_info.GetOriginalPermission(); + const bool next_needs_set_perm = !next_perm_eq && next_info.GetIpcLockCount() == 1; + if (cur_perm_eq == next_perm_eq && cur_needs_set_perm == next_needs_set_perm && + cur_info.GetOriginalPermission() == next_info.GetOriginalPermission()) { + // We can consolidate the reprotection for the current and next block into a + // single call. + cur_size += next_info.GetSize(); + } else { + // We have to operate on the current block. + if ((cur_needs_set_perm || first) && !cur_perm_eq) { + const KPageProperties properties = { + cur_info.GetPermission(), false, false, + first ? DisableMergeAttribute::EnableAndMergeHeadBodyTail + : DisableMergeAttribute::None}; + R_ASSERT(this->Operate(updater.GetPageList(), cur_address, + cur_size / PageSize, 0, false, properties, + OperationType::ChangePermissions, true)); + } + + // Advance. + cur_address = next_info.GetAddress(); + cur_size = next_info.GetSize(); + first = false; + } + + // Advance. + cur_info = next_info; + cur_perm_eq = next_perm_eq; + cur_needs_set_perm = next_needs_set_perm; + ++next_it; + } + + // Process the last block. + if ((first || cur_needs_set_perm) && !cur_perm_eq) { + const KPageProperties properties = { + cur_info.GetPermission(), false, false, + first ? DisableMergeAttribute::EnableAndMergeHeadBodyTail + : DisableMergeAttribute::None}; + R_ASSERT(this->Operate(updater.GetPageList(), cur_address, cur_size / PageSize, 0, + false, properties, OperationType::ChangePermissions, true)); + } + } + }; + + // Iterate, reprotecting as needed. + { + // Get current and next iterators. + KMemoryBlockManager::const_iterator start_it = + m_memory_block_manager.FindIterator(mapping_start); + KMemoryBlockManager::const_iterator next_it = start_it; + ++next_it; + + // Validate the current block. + KMemoryInfo cur_info = start_it->GetMemoryInfo(); + R_ASSERT(this->CheckMemoryState( + cur_info, test_state, test_state, KMemoryPermission::None, KMemoryPermission::None, + test_attr_mask | KMemoryAttribute::IpcLocked, KMemoryAttribute::IpcLocked)); + + // Create tracking variables. + KProcessAddress cur_address = cur_info.GetAddress(); + size_t cur_size = cur_info.GetSize(); + bool cur_perm_eq = cur_info.GetPermission() == cur_info.GetOriginalPermission(); + bool cur_needs_set_perm = !cur_perm_eq && cur_info.GetIpcLockCount() == 1; + bool first = + cur_info.GetIpcDisableMergeCount() == 1 && + False(cur_info.GetDisableMergeAttribute() & KMemoryBlockDisableMergeAttribute::Locked); + + while ((cur_address + cur_size - 1) < mapping_last) { + // Check that we have a next block. + ASSERT(next_it != m_memory_block_manager.end()); + + // Get the next info. + const KMemoryInfo next_info = next_it->GetMemoryInfo(); + + // Validate the next block. + R_ASSERT(this->CheckMemoryState( + next_info, test_state, test_state, KMemoryPermission::None, KMemoryPermission::None, + test_attr_mask | KMemoryAttribute::IpcLocked, KMemoryAttribute::IpcLocked)); + + // Check if we can consolidate the next block's permission set with the current one. + const bool next_perm_eq = + next_info.GetPermission() == next_info.GetOriginalPermission(); + const bool next_needs_set_perm = !next_perm_eq && next_info.GetIpcLockCount() == 1; + if (cur_perm_eq == next_perm_eq && cur_needs_set_perm == next_needs_set_perm && + cur_info.GetOriginalPermission() == next_info.GetOriginalPermission()) { + // We can consolidate the reprotection for the current and next block into a single + // call. + cur_size += next_info.GetSize(); + } else { + // We have to operate on the current block. + if ((cur_needs_set_perm || first) && !cur_perm_eq) { + const KPageProperties properties = { + cur_needs_set_perm ? cur_info.GetOriginalPermission() + : cur_info.GetPermission(), + false, false, + first ? DisableMergeAttribute::EnableHeadAndBody + : DisableMergeAttribute::None}; + R_TRY(this->Operate(updater.GetPageList(), cur_address, cur_size / PageSize, 0, + false, properties, OperationType::ChangePermissions, + false)); + } + + // Mark that we mapped the block. + mapped_size += cur_size; + + // Advance. + cur_address = next_info.GetAddress(); + cur_size = next_info.GetSize(); + first = false; + } + + // Advance. + cur_info = next_info; + cur_perm_eq = next_perm_eq; + cur_needs_set_perm = next_needs_set_perm; + ++next_it; + } + + // Process the last block. + const auto lock_count = + cur_info.GetIpcLockCount() + + (next_it != m_memory_block_manager.end() + ? (next_it->GetIpcDisableMergeCount() - next_it->GetIpcLockCount()) + : 0); + if ((first || cur_needs_set_perm || (lock_count == 1)) && !cur_perm_eq) { + const DisableMergeAttribute head_body_attr = + first ? DisableMergeAttribute::EnableHeadAndBody : DisableMergeAttribute::None; + const DisableMergeAttribute tail_attr = + lock_count == 1 ? DisableMergeAttribute::EnableTail : DisableMergeAttribute::None; + const KPageProperties properties = { + cur_needs_set_perm ? cur_info.GetOriginalPermission() : cur_info.GetPermission(), + false, false, static_cast(head_body_attr | tail_attr)}; + R_TRY(this->Operate(updater.GetPageList(), cur_address, cur_size / PageSize, 0, false, + properties, OperationType::ChangePermissions, false)); + } + } + + // Create an update allocator. + // NOTE: Guaranteed zero blocks needed here. + Result allocator_result; + KMemoryBlockManagerUpdateAllocator allocator(std::addressof(allocator_result), + m_memory_block_slab_manager, 0); + R_TRY(allocator_result); + + // Unlock the pages. + m_memory_block_manager.UpdateLock(std::addressof(allocator), mapping_start, + mapping_size / PageSize, &KMemoryBlock::UnlockForIpc, + KMemoryPermission::None); + + R_SUCCEED(); +} + +void KPageTableBase::CleanupForIpcClientOnServerSetupFailure(PageLinkedList* page_list, + KProcessAddress address, size_t size, + KMemoryPermission prot_perm) { + ASSERT(this->IsLockedByCurrentThread()); + ASSERT(Common::IsAligned(GetInteger(address), PageSize)); + ASSERT(Common::IsAligned(size, PageSize)); + + // Get the mapped extents. + const KProcessAddress src_map_start = address; + const KProcessAddress src_map_end = address + size; + const KProcessAddress src_map_last = src_map_end - 1; + + // This function is only invoked when there's something to do. + ASSERT(src_map_end > src_map_start); + + // Iterate over blocks, fixing permissions. + KMemoryBlockManager::const_iterator it = m_memory_block_manager.FindIterator(address); + while (true) { + const KMemoryInfo info = it->GetMemoryInfo(); + + const auto cur_start = info.GetAddress() >= GetInteger(src_map_start) + ? info.GetAddress() + : GetInteger(src_map_start); + const auto cur_end = + src_map_last <= info.GetLastAddress() ? src_map_end : info.GetEndAddress(); + + // If we can, fix the protections on the block. + if ((info.GetIpcLockCount() == 0 && + (info.GetPermission() & KMemoryPermission::IpcLockChangeMask) != prot_perm) || + (info.GetIpcLockCount() != 0 && + (info.GetOriginalPermission() & KMemoryPermission::IpcLockChangeMask) != prot_perm)) { + // Check if we actually need to fix the protections on the block. + if (cur_end == src_map_end || info.GetAddress() <= GetInteger(src_map_start) || + (info.GetPermission() & KMemoryPermission::IpcLockChangeMask) != prot_perm) { + const bool start_nc = (info.GetAddress() == GetInteger(src_map_start)) + ? (False(info.GetDisableMergeAttribute() & + (KMemoryBlockDisableMergeAttribute::Locked | + KMemoryBlockDisableMergeAttribute::IpcLeft))) + : info.GetAddress() <= GetInteger(src_map_start); + + const DisableMergeAttribute head_body_attr = + start_nc ? DisableMergeAttribute::EnableHeadAndBody + : DisableMergeAttribute::None; + DisableMergeAttribute tail_attr; + if (cur_end == src_map_end && info.GetEndAddress() == src_map_end) { + auto next_it = it; + ++next_it; + + const auto lock_count = + info.GetIpcLockCount() + + (next_it != m_memory_block_manager.end() + ? (next_it->GetIpcDisableMergeCount() - next_it->GetIpcLockCount()) + : 0); + tail_attr = lock_count == 0 ? DisableMergeAttribute::EnableTail + : DisableMergeAttribute::None; + } else { + tail_attr = DisableMergeAttribute::None; + } + + const KPageProperties properties = { + info.GetPermission(), false, false, + static_cast(head_body_attr | tail_attr)}; + R_ASSERT(this->Operate(page_list, cur_start, (cur_end - cur_start) / PageSize, 0, + false, properties, OperationType::ChangePermissions, true)); + } + } + + // If we're past the end of the region, we're done. + if (src_map_last <= info.GetLastAddress()) { + break; + } + + // Advance. + ++it; + ASSERT(it != m_memory_block_manager.end()); + } +} + +Result KPageTableBase::MapPhysicalMemory(KProcessAddress address, size_t size) { + // Lock the physical memory lock. + KScopedLightLock phys_lk(m_map_physical_memory_lock); + + // Calculate the last address for convenience. + const KProcessAddress last_address = address + size - 1; + + // Define iteration variables. + KProcessAddress cur_address; + size_t mapped_size; + + // The entire mapping process can be retried. + while (true) { + // Check if the memory is already mapped. + { + // Lock the table. + KScopedLightLock lk(m_general_lock); + + // Iterate over the memory. + cur_address = address; + mapped_size = 0; + + auto it = m_memory_block_manager.FindIterator(cur_address); + while (true) { + // Check that the iterator is valid. + ASSERT(it != m_memory_block_manager.end()); + + // Get the memory info. + const KMemoryInfo info = it->GetMemoryInfo(); + + // Check if we're done. + if (last_address <= info.GetLastAddress()) { + if (info.GetState() != KMemoryState::Free) { + mapped_size += (last_address + 1 - cur_address); + } + break; + } + + // Track the memory if it's mapped. + if (info.GetState() != KMemoryState::Free) { + mapped_size += KProcessAddress(info.GetEndAddress()) - cur_address; + } + + // Advance. + cur_address = info.GetEndAddress(); + ++it; + } + + // If the size mapped is the size requested, we've nothing to do. + R_SUCCEED_IF(size == mapped_size); + } + + // Allocate and map the memory. + { + // Reserve the memory from the process resource limit. + KScopedResourceReservation memory_reservation( + m_resource_limit, Svc::LimitableResource::PhysicalMemoryMax, size - mapped_size); + R_UNLESS(memory_reservation.Succeeded(), ResultLimitReached); + + // Allocate pages for the new memory. + KPageGroup pg(m_kernel, m_block_info_manager); + R_TRY(m_kernel.MemoryManager().AllocateForProcess( + std::addressof(pg), (size - mapped_size) / PageSize, m_allocate_option, + GetCurrentProcess(m_kernel).GetId(), m_heap_fill_value)); + + // If we fail in the next bit (or retry), we need to cleanup the pages. + auto pg_guard = SCOPE_GUARD({ + pg.OpenFirst(); + pg.Close(); + }); + + // Map the memory. + { + // Lock the table. + KScopedLightLock lk(m_general_lock); + + size_t num_allocator_blocks = 0; + + // Verify that nobody has mapped memory since we first checked. + { + // Iterate over the memory. + size_t checked_mapped_size = 0; + cur_address = address; + + auto it = m_memory_block_manager.FindIterator(cur_address); + while (true) { + // Check that the iterator is valid. + ASSERT(it != m_memory_block_manager.end()); + + // Get the memory info. + const KMemoryInfo info = it->GetMemoryInfo(); + + const bool is_free = info.GetState() == KMemoryState::Free; + if (is_free) { + if (info.GetAddress() < GetInteger(address)) { + ++num_allocator_blocks; + } + if (last_address < info.GetLastAddress()) { + ++num_allocator_blocks; + } + } + + // Check if we're done. + if (last_address <= info.GetLastAddress()) { + if (!is_free) { + checked_mapped_size += (last_address + 1 - cur_address); + } + break; + } + + // Track the memory if it's mapped. + if (!is_free) { + checked_mapped_size += + KProcessAddress(info.GetEndAddress()) - cur_address; + } + + // Advance. + cur_address = info.GetEndAddress(); + ++it; + } + + // If the size now isn't what it was before, somebody mapped or unmapped + // concurrently. If this happened, retry. + if (mapped_size != checked_mapped_size) { + continue; + } + } + + // Create an update allocator. + ASSERT(num_allocator_blocks <= KMemoryBlockManagerUpdateAllocator::MaxBlocks); + Result allocator_result; + KMemoryBlockManagerUpdateAllocator allocator(std::addressof(allocator_result), + m_memory_block_slab_manager, + num_allocator_blocks); + R_TRY(allocator_result); + + // We're going to perform an update, so create a helper. + KScopedPageTableUpdater updater(this); + + // Prepare to iterate over the memory. + auto pg_it = pg.begin(); + KPhysicalAddress pg_phys_addr = pg_it->GetAddress(); + size_t pg_pages = pg_it->GetNumPages(); + + // Reset the current tracking address, and make sure we clean up on failure. + pg_guard.Cancel(); + cur_address = address; + ON_RESULT_FAILURE { + if (cur_address > address) { + const KProcessAddress last_unmap_address = cur_address - 1; + + // Iterate, unmapping the pages. + cur_address = address; + + auto it = m_memory_block_manager.FindIterator(cur_address); + while (true) { + // Check that the iterator is valid. + ASSERT(it != m_memory_block_manager.end()); + + // Get the memory info. + const KMemoryInfo info = it->GetMemoryInfo(); + + // If the memory state is free, we mapped it and need to unmap it. + if (info.GetState() == KMemoryState::Free) { + // Determine the range to unmap. + const KPageProperties unmap_properties = { + KMemoryPermission::None, false, false, + DisableMergeAttribute::None}; + const size_t cur_pages = + std::min(KProcessAddress(info.GetEndAddress()) - cur_address, + last_unmap_address + 1 - cur_address) / + PageSize; + + // Unmap. + R_ASSERT(this->Operate(updater.GetPageList(), cur_address, + cur_pages, 0, false, unmap_properties, + OperationType::Unmap, true)); + } + + // Check if we're done. + if (last_unmap_address <= info.GetLastAddress()) { + break; + } + + // Advance. + cur_address = info.GetEndAddress(); + ++it; + } + } + + // Release any remaining unmapped memory. + m_kernel.MemoryManager().OpenFirst(pg_phys_addr, pg_pages); + m_kernel.MemoryManager().Close(pg_phys_addr, pg_pages); + for (++pg_it; pg_it != pg.end(); ++pg_it) { + m_kernel.MemoryManager().OpenFirst(pg_it->GetAddress(), + pg_it->GetNumPages()); + m_kernel.MemoryManager().Close(pg_it->GetAddress(), pg_it->GetNumPages()); + } + }; + + auto it = m_memory_block_manager.FindIterator(cur_address); + while (true) { + // Check that the iterator is valid. + ASSERT(it != m_memory_block_manager.end()); + + // Get the memory info. + const KMemoryInfo info = it->GetMemoryInfo(); + + // If it's unmapped, we need to map it. + if (info.GetState() == KMemoryState::Free) { + // Determine the range to map. + const KPageProperties map_properties = { + KMemoryPermission::UserReadWrite, false, false, + cur_address == this->GetAliasRegionStart() + ? DisableMergeAttribute::DisableHead + : DisableMergeAttribute::None}; + size_t map_pages = + std::min(KProcessAddress(info.GetEndAddress()) - cur_address, + last_address + 1 - cur_address) / + PageSize; + + // While we have pages to map, map them. + { + // Create a page group for the current mapping range. + KPageGroup cur_pg(m_kernel, m_block_info_manager); + { + ON_RESULT_FAILURE_2 { + cur_pg.OpenFirst(); + cur_pg.Close(); + }; + + size_t remain_pages = map_pages; + while (remain_pages > 0) { + // Check if we're at the end of the physical block. + if (pg_pages == 0) { + // Ensure there are more pages to map. + ASSERT(pg_it != pg.end()); + + // Advance our physical block. + ++pg_it; + pg_phys_addr = pg_it->GetAddress(); + pg_pages = pg_it->GetNumPages(); + } + + // Add whatever we can to the current block. + const size_t cur_pages = std::min(pg_pages, remain_pages); + R_TRY(cur_pg.AddBlock(pg_phys_addr + + ((pg_pages - cur_pages) * PageSize), + cur_pages)); + + // Advance. + remain_pages -= cur_pages; + pg_pages -= cur_pages; + } + } + + // Map the papges. + R_TRY(this->Operate(updater.GetPageList(), cur_address, map_pages, + cur_pg, map_properties, + OperationType::MapFirstGroup, false)); + } + } + + // Check if we're done. + if (last_address <= info.GetLastAddress()) { + break; + } + + // Advance. + cur_address = info.GetEndAddress(); + ++it; + } + + // We succeeded, so commit the memory reservation. + memory_reservation.Commit(); + + // Increase our tracked mapped size. + m_mapped_physical_memory_size += (size - mapped_size); + + // Update the relevant memory blocks. + m_memory_block_manager.UpdateIfMatch( + std::addressof(allocator), address, size / PageSize, KMemoryState::Free, + KMemoryPermission::None, KMemoryAttribute::None, KMemoryState::Normal, + KMemoryPermission::UserReadWrite, KMemoryAttribute::None, + address == this->GetAliasRegionStart() + ? KMemoryBlockDisableMergeAttribute::Normal + : KMemoryBlockDisableMergeAttribute::None, + KMemoryBlockDisableMergeAttribute::None); + + R_SUCCEED(); + } + } + } +} + +Result KPageTableBase::UnmapPhysicalMemory(KProcessAddress address, size_t size) { + // Lock the physical memory lock. + KScopedLightLock phys_lk(m_map_physical_memory_lock); + + // Lock the table. + KScopedLightLock lk(m_general_lock); + + // Calculate the last address for convenience. + const KProcessAddress last_address = address + size - 1; + + // Define iteration variables. + KProcessAddress map_start_address = 0; + KProcessAddress map_last_address = 0; + + KProcessAddress cur_address; + size_t mapped_size; + size_t num_allocator_blocks = 0; + + // Check if the memory is mapped. + { + // Iterate over the memory. + cur_address = address; + mapped_size = 0; + + auto it = m_memory_block_manager.FindIterator(cur_address); + while (true) { + // Check that the iterator is valid. + ASSERT(it != m_memory_block_manager.end()); + + // Get the memory info. + const KMemoryInfo info = it->GetMemoryInfo(); + + // Verify the memory's state. + const bool is_normal = info.GetState() == KMemoryState::Normal && + info.GetAttribute() == KMemoryAttribute::None; + const bool is_free = info.GetState() == KMemoryState::Free; + R_UNLESS(is_normal || is_free, ResultInvalidCurrentMemory); + + if (is_normal) { + R_UNLESS(info.GetAttribute() == KMemoryAttribute::None, ResultInvalidCurrentMemory); + + if (map_start_address == 0) { + map_start_address = cur_address; + } + map_last_address = + (last_address >= info.GetLastAddress()) ? info.GetLastAddress() : last_address; + + if (info.GetAddress() < GetInteger(address)) { + ++num_allocator_blocks; + } + if (last_address < info.GetLastAddress()) { + ++num_allocator_blocks; + } + + mapped_size += (map_last_address + 1 - cur_address); + } + + // Check if we're done. + if (last_address <= info.GetLastAddress()) { + break; + } + + // Advance. + cur_address = info.GetEndAddress(); + ++it; + } + + // If there's nothing mapped, we've nothing to do. + R_SUCCEED_IF(mapped_size == 0); + } + + // Create an update allocator. + ASSERT(num_allocator_blocks <= KMemoryBlockManagerUpdateAllocator::MaxBlocks); + Result allocator_result; + KMemoryBlockManagerUpdateAllocator allocator(std::addressof(allocator_result), + m_memory_block_slab_manager, num_allocator_blocks); + R_TRY(allocator_result); + + // We're going to perform an update, so create a helper. + KScopedPageTableUpdater updater(this); + + // Separate the mapping. + const KPageProperties sep_properties = {KMemoryPermission::None, false, false, + DisableMergeAttribute::None}; + R_TRY(this->Operate(updater.GetPageList(), map_start_address, + (map_last_address + 1 - map_start_address) / PageSize, 0, false, + sep_properties, OperationType::Separate, false)); + + // Reset the current tracking address, and make sure we clean up on failure. + cur_address = address; + + // Iterate over the memory, unmapping as we go. + auto it = m_memory_block_manager.FindIterator(cur_address); + + const auto clear_merge_attr = + (it->GetState() == KMemoryState::Normal && + it->GetAddress() == this->GetAliasRegionStart() && it->GetAddress() == address) + ? KMemoryBlockDisableMergeAttribute::Normal + : KMemoryBlockDisableMergeAttribute::None; + + while (true) { + // Check that the iterator is valid. + ASSERT(it != m_memory_block_manager.end()); + + // Get the memory info. + const KMemoryInfo info = it->GetMemoryInfo(); + + // If the memory state is normal, we need to unmap it. + if (info.GetState() == KMemoryState::Normal) { + // Determine the range to unmap. + const KPageProperties unmap_properties = {KMemoryPermission::None, false, false, + DisableMergeAttribute::None}; + const size_t cur_pages = std::min(KProcessAddress(info.GetEndAddress()) - cur_address, + last_address + 1 - cur_address) / + PageSize; + + // Unmap. + R_ASSERT(this->Operate(updater.GetPageList(), cur_address, cur_pages, 0, false, + unmap_properties, OperationType::Unmap, false)); + } + + // Check if we're done. + if (last_address <= info.GetLastAddress()) { + break; + } + + // Advance. + cur_address = info.GetEndAddress(); + ++it; + } + + // Release the memory resource. + m_mapped_physical_memory_size -= mapped_size; + m_resource_limit->Release(Svc::LimitableResource::PhysicalMemoryMax, mapped_size); + + // Update memory blocks. + m_memory_block_manager.Update(std::addressof(allocator), address, size / PageSize, + KMemoryState::Free, KMemoryPermission::None, + KMemoryAttribute::None, KMemoryBlockDisableMergeAttribute::None, + clear_merge_attr); + + // We succeeded. + R_SUCCEED(); +} + +Result KPageTableBase::MapPhysicalMemoryUnsafe(KProcessAddress address, size_t size) { + UNIMPLEMENTED(); + R_THROW(ResultNotImplemented); +} + +Result KPageTableBase::UnmapPhysicalMemoryUnsafe(KProcessAddress address, size_t size) { + UNIMPLEMENTED(); + R_THROW(ResultNotImplemented); +} + +Result KPageTableBase::UnmapProcessMemory(KProcessAddress dst_address, size_t size, + KPageTableBase& src_page_table, + KProcessAddress src_address) { + // We need to lock both this table, and the current process's table, so set up an alias. + KPageTableBase& dst_page_table = *this; + + // Acquire the table locks. + KScopedLightLockPair lk(src_page_table.m_general_lock, dst_page_table.m_general_lock); + + // Check that the memory is mapped in the destination process. + size_t num_allocator_blocks; + R_TRY(dst_page_table.CheckMemoryState( + std::addressof(num_allocator_blocks), dst_address, size, KMemoryState::All, + KMemoryState::SharedCode, KMemoryPermission::UserReadWrite, + KMemoryPermission::UserReadWrite, KMemoryAttribute::All, KMemoryAttribute::None)); + + // Check that the memory is mapped in the source process. + R_TRY(src_page_table.CheckMemoryState(src_address, size, KMemoryState::FlagCanMapProcess, + KMemoryState::FlagCanMapProcess, KMemoryPermission::None, + KMemoryPermission::None, KMemoryAttribute::All, + KMemoryAttribute::None)); + + // Validate that the memory ranges are compatible. + { + // Define a helper type. + struct ContiguousRangeInfo { + public: + KPageTableBase& m_pt; + TraversalContext m_context; + TraversalEntry m_entry; + KPhysicalAddress m_phys_addr; + size_t m_cur_size; + size_t m_remaining_size; + + public: + ContiguousRangeInfo(KPageTableBase& pt, KProcessAddress address, size_t size) + : m_pt(pt), m_remaining_size(size) { + // Begin a traversal. + ASSERT(m_pt.GetImpl().BeginTraversal(std::addressof(m_entry), + std::addressof(m_context), address)); + + // Setup tracking fields. + m_phys_addr = m_entry.phys_addr; + m_cur_size = std::min( + m_remaining_size, + m_entry.block_size - (GetInteger(m_phys_addr) & (m_entry.block_size - 1))); + + // Consume the whole contiguous block. + this->DetermineContiguousBlockExtents(); + } + + void ContinueTraversal() { + // Update our remaining size. + m_remaining_size = m_remaining_size - m_cur_size; + + // Update our tracking fields. + if (m_remaining_size > 0) { + m_phys_addr = m_entry.phys_addr; + m_cur_size = std::min(m_remaining_size, m_entry.block_size); + + // Consume the whole contiguous block. + this->DetermineContiguousBlockExtents(); + } + } + + private: + void DetermineContiguousBlockExtents() { + // Continue traversing until we're not contiguous, or we have enough. + while (m_cur_size < m_remaining_size) { + ASSERT(m_pt.GetImpl().ContinueTraversal(std::addressof(m_entry), + std::addressof(m_context))); + + // If we're not contiguous, we're done. + if (m_entry.phys_addr != m_phys_addr + m_cur_size) { + break; + } + + // Update our current size. + m_cur_size = std::min(m_remaining_size, m_cur_size + m_entry.block_size); + } + } + }; + + // Create ranges for both tables. + ContiguousRangeInfo src_range(src_page_table, src_address, size); + ContiguousRangeInfo dst_range(dst_page_table, dst_address, size); + + // Validate the ranges. + while (src_range.m_remaining_size > 0 && dst_range.m_remaining_size > 0) { + R_UNLESS(src_range.m_phys_addr == dst_range.m_phys_addr, ResultInvalidMemoryRegion); + R_UNLESS(src_range.m_cur_size == dst_range.m_cur_size, ResultInvalidMemoryRegion); + + src_range.ContinueTraversal(); + dst_range.ContinueTraversal(); + } + } + + // We no longer need to hold our lock on the source page table. + lk.TryUnlockHalf(src_page_table.m_general_lock); + + // Create an update allocator. + Result allocator_result; + KMemoryBlockManagerUpdateAllocator allocator(std::addressof(allocator_result), + m_memory_block_slab_manager, num_allocator_blocks); + R_TRY(allocator_result); + + // We're going to perform an update, so create a helper. + KScopedPageTableUpdater updater(this); + + // Unmap the memory. + const size_t num_pages = size / PageSize; + const KPageProperties unmap_properties = {KMemoryPermission::None, false, false, + DisableMergeAttribute::None}; + R_TRY(this->Operate(updater.GetPageList(), dst_address, num_pages, 0, false, unmap_properties, + OperationType::Unmap, false)); + + // Apply the memory block update. + m_memory_block_manager.Update(std::addressof(allocator), dst_address, num_pages, + KMemoryState::Free, KMemoryPermission::None, + KMemoryAttribute::None, KMemoryBlockDisableMergeAttribute::None, + KMemoryBlockDisableMergeAttribute::Normal); + + R_SUCCEED(); +} + +Result KPageTableBase::Operate(PageLinkedList* page_list, KProcessAddress virt_addr, + size_t num_pages, KPhysicalAddress phys_addr, bool is_pa_valid, + const KPageProperties properties, OperationType operation, + bool reuse_ll) { + ASSERT(this->IsLockedByCurrentThread()); + ASSERT(num_pages > 0); + ASSERT(Common::IsAligned(GetInteger(virt_addr), PageSize)); + ASSERT(this->ContainsPages(virt_addr, num_pages)); + + // As we don't allocate page entries in guest memory, we don't need to allocate them from + // or free them to the page list, and so it goes unused (along with page properties). + + switch (operation) { + case OperationType::Unmap: { + // Ensure that any pages we track are closed on exit. + KPageGroup pages_to_close(m_kernel, this->GetBlockInfoManager()); + SCOPE_EXIT({ pages_to_close.CloseAndReset(); }); + + // Make a page group representing the region to unmap. + this->MakePageGroup(pages_to_close, virt_addr, num_pages); + + // Unmap. + m_memory->UnmapRegion(*m_impl, virt_addr, num_pages * PageSize); + + R_SUCCEED(); + } + case OperationType::Map: { + ASSERT(virt_addr != 0); + ASSERT(Common::IsAligned(GetInteger(virt_addr), PageSize)); + m_memory->MapMemoryRegion(*m_impl, virt_addr, num_pages * PageSize, phys_addr); + + // Open references to pages, if we should. + if (this->IsHeapPhysicalAddress(phys_addr)) { + m_kernel.MemoryManager().Open(phys_addr, num_pages); + } + + R_SUCCEED(); + } + case OperationType::Separate: { + // TODO: Unimplemented. + R_SUCCEED(); + } + case OperationType::ChangePermissions: + case OperationType::ChangePermissionsAndRefresh: + case OperationType::ChangePermissionsAndRefreshAndFlush: + R_SUCCEED(); + default: + UNREACHABLE(); + } +} + +Result KPageTableBase::Operate(PageLinkedList* page_list, KProcessAddress virt_addr, + size_t num_pages, const KPageGroup& page_group, + const KPageProperties properties, OperationType operation, + bool reuse_ll) { + ASSERT(this->IsLockedByCurrentThread()); + ASSERT(Common::IsAligned(GetInteger(virt_addr), PageSize)); + ASSERT(num_pages > 0); + ASSERT(num_pages == page_group.GetNumPages()); + + // As we don't allocate page entries in guest memory, we don't need to allocate them from + // the page list, and so it goes unused (along with page properties). + + switch (operation) { + case OperationType::MapGroup: + case OperationType::MapFirstGroup: { + // We want to maintain a new reference to every page in the group. + KScopedPageGroup spg(page_group, operation != OperationType::MapFirstGroup); + + for (const auto& node : page_group) { + const size_t size{node.GetNumPages() * PageSize}; + + // Map the pages. + m_memory->MapMemoryRegion(*m_impl, virt_addr, size, node.GetAddress()); + + virt_addr += size; + } + + // We succeeded! We want to persist the reference to the pages. + spg.CancelClose(); + + R_SUCCEED(); + } + default: + UNREACHABLE(); + } +} + +void KPageTableBase::FinalizeUpdate(PageLinkedList* page_list) { + while (page_list->Peek()) { + [[maybe_unused]] auto page = page_list->Pop(); + + // TODO: Free page entries once they are allocated in guest memory. + // ASSERT(this->GetPageTableManager().IsInPageTableHeap(page)); + // ASSERT(this->GetPageTableManager().GetRefCount(page) == 0); + // this->GetPageTableManager().Free(page); + } +} + +} // namespace Kernel diff --git a/src/core/hle/kernel/k_page_table_base.h b/src/core/hle/kernel/k_page_table_base.h new file mode 100644 index 0000000000..ee2c41e67b --- /dev/null +++ b/src/core/hle/kernel/k_page_table_base.h @@ -0,0 +1,759 @@ +// SPDX-FileCopyrightText: Copyright 2023 yuzu Emulator Project +// SPDX-License-Identifier: GPL-2.0-or-later + +#pragma once + +#include + +#include "common/common_funcs.h" +#include "common/page_table.h" +#include "core/core.h" +#include "core/hle/kernel/k_dynamic_resource_manager.h" +#include "core/hle/kernel/k_light_lock.h" +#include "core/hle/kernel/k_memory_block.h" +#include "core/hle/kernel/k_memory_block_manager.h" +#include "core/hle/kernel/k_memory_layout.h" +#include "core/hle/kernel/k_memory_manager.h" +#include "core/hle/kernel/k_typed_address.h" +#include "core/hle/kernel/kernel.h" +#include "core/hle/result.h" +#include "core/memory.h" + +namespace Kernel { + +enum class DisableMergeAttribute : u8 { + None = (0U << 0), + + DisableHead = (1U << 0), + DisableHeadAndBody = (1U << 1), + EnableHeadAndBody = (1U << 2), + DisableTail = (1U << 3), + EnableTail = (1U << 4), + EnableAndMergeHeadBodyTail = (1U << 5), + + EnableHeadBodyTail = EnableHeadAndBody | EnableTail, + DisableHeadBodyTail = DisableHeadAndBody | DisableTail, +}; +DECLARE_ENUM_FLAG_OPERATORS(DisableMergeAttribute); + +struct KPageProperties { + KMemoryPermission perm; + bool io; + bool uncached; + DisableMergeAttribute disable_merge_attributes; +}; +static_assert(std::is_trivial_v); +static_assert(sizeof(KPageProperties) == sizeof(u32)); + +class KResourceLimit; +class KSystemResource; + +class KPageTableBase { + YUZU_NON_COPYABLE(KPageTableBase); + YUZU_NON_MOVEABLE(KPageTableBase); + +public: + using TraversalEntry = Common::PageTable::TraversalEntry; + using TraversalContext = Common::PageTable::TraversalContext; + + class MemoryRange { + private: + KernelCore& m_kernel; + KPhysicalAddress m_address; + size_t m_size; + bool m_heap; + + public: + explicit MemoryRange(KernelCore& kernel) + : m_kernel(kernel), m_address(0), m_size(0), m_heap(false) {} + + void Set(KPhysicalAddress address, size_t size, bool heap) { + m_address = address; + m_size = size; + m_heap = heap; + } + + KPhysicalAddress GetAddress() const { + return m_address; + } + size_t GetSize() const { + return m_size; + } + bool IsHeap() const { + return m_heap; + } + + void Open(); + void Close(); + }; + +protected: + enum MemoryFillValue : u8 { + MemoryFillValue_Zero = 0, + MemoryFillValue_Stack = 'X', + MemoryFillValue_Ipc = 'Y', + MemoryFillValue_Heap = 'Z', + }; + + enum class OperationType { + Map = 0, + MapGroup = 1, + MapFirstGroup = 2, + Unmap = 3, + ChangePermissions = 4, + ChangePermissionsAndRefresh = 5, + ChangePermissionsAndRefreshAndFlush = 6, + Separate = 7, + }; + + static constexpr size_t MaxPhysicalMapAlignment = 1_GiB; + static constexpr size_t RegionAlignment = 2_MiB; + static_assert(RegionAlignment == KernelAslrAlignment); + + struct PageLinkedList { + private: + struct Node { + Node* m_next; + std::array m_buffer; + }; + static_assert(std::is_trivial_v); + + private: + Node* m_root{}; + + public: + constexpr PageLinkedList() : m_root(nullptr) {} + + void Push(Node* n) { + ASSERT(Common::IsAligned(reinterpret_cast(n), PageSize)); + n->m_next = m_root; + m_root = n; + } + + Node* Peek() const { + return m_root; + } + + Node* Pop() { + Node* const r = m_root; + + m_root = r->m_next; + r->m_next = nullptr; + + return r; + } + }; + static_assert(std::is_trivially_destructible_v); + + static constexpr auto DefaultMemoryIgnoreAttr = + KMemoryAttribute::IpcLocked | KMemoryAttribute::DeviceShared; + + static constexpr size_t GetAddressSpaceWidth(Svc::CreateProcessFlag as_type) { + switch (static_cast(as_type & + Svc::CreateProcessFlag::AddressSpaceMask)) { + case Svc::CreateProcessFlag::AddressSpace64Bit: + return 39; + case Svc::CreateProcessFlag::AddressSpace64BitDeprecated: + return 36; + case Svc::CreateProcessFlag::AddressSpace32Bit: + case Svc::CreateProcessFlag::AddressSpace32BitWithoutAlias: + return 32; + default: + UNREACHABLE(); + } + } + +private: + class KScopedPageTableUpdater { + private: + KPageTableBase* m_pt; + PageLinkedList m_ll; + + public: + explicit KScopedPageTableUpdater(KPageTableBase* pt) : m_pt(pt), m_ll() {} + explicit KScopedPageTableUpdater(KPageTableBase& pt) + : KScopedPageTableUpdater(std::addressof(pt)) {} + ~KScopedPageTableUpdater() { + m_pt->FinalizeUpdate(this->GetPageList()); + } + + PageLinkedList* GetPageList() { + return std::addressof(m_ll); + } + }; + +private: + KernelCore& m_kernel; + Core::System& m_system; + KProcessAddress m_address_space_start{}; + KProcessAddress m_address_space_end{}; + KProcessAddress m_heap_region_start{}; + KProcessAddress m_heap_region_end{}; + KProcessAddress m_current_heap_end{}; + KProcessAddress m_alias_region_start{}; + KProcessAddress m_alias_region_end{}; + KProcessAddress m_stack_region_start{}; + KProcessAddress m_stack_region_end{}; + KProcessAddress m_kernel_map_region_start{}; + KProcessAddress m_kernel_map_region_end{}; + KProcessAddress m_alias_code_region_start{}; + KProcessAddress m_alias_code_region_end{}; + KProcessAddress m_code_region_start{}; + KProcessAddress m_code_region_end{}; + size_t m_max_heap_size{}; + size_t m_mapped_physical_memory_size{}; + size_t m_mapped_unsafe_physical_memory{}; + size_t m_mapped_insecure_memory{}; + size_t m_mapped_ipc_server_memory{}; + mutable KLightLock m_general_lock; + mutable KLightLock m_map_physical_memory_lock; + KLightLock m_device_map_lock; + std::unique_ptr m_impl{}; + Core::Memory::Memory* m_memory{}; + KMemoryBlockManager m_memory_block_manager{}; + u32 m_allocate_option{}; + u32 m_address_space_width{}; + bool m_is_kernel{}; + bool m_enable_aslr{}; + bool m_enable_device_address_space_merge{}; + KMemoryBlockSlabManager* m_memory_block_slab_manager{}; + KBlockInfoManager* m_block_info_manager{}; + KResourceLimit* m_resource_limit{}; + const KMemoryRegion* m_cached_physical_linear_region{}; + const KMemoryRegion* m_cached_physical_heap_region{}; + MemoryFillValue m_heap_fill_value{}; + MemoryFillValue m_ipc_fill_value{}; + MemoryFillValue m_stack_fill_value{}; + +public: + explicit KPageTableBase(KernelCore& kernel); + ~KPageTableBase(); + + Result InitializeForKernel(bool is_64_bit, KVirtualAddress start, KVirtualAddress end, + Core::Memory::Memory& memory); + Result InitializeForProcess(Svc::CreateProcessFlag as_type, bool enable_aslr, + bool enable_device_address_space_merge, bool from_back, + KMemoryManager::Pool pool, KProcessAddress code_address, + size_t code_size, KSystemResource* system_resource, + KResourceLimit* resource_limit, Core::Memory::Memory& memory); + + void Finalize(); + + bool IsKernel() const { + return m_is_kernel; + } + bool IsAslrEnabled() const { + return m_enable_aslr; + } + + bool Contains(KProcessAddress addr) const { + return m_address_space_start <= addr && addr <= m_address_space_end - 1; + } + + bool Contains(KProcessAddress addr, size_t size) const { + return m_address_space_start <= addr && addr < addr + size && + addr + size - 1 <= m_address_space_end - 1; + } + + bool IsInAliasRegion(KProcessAddress addr, size_t size) const { + return this->Contains(addr, size) && m_alias_region_start <= addr && + addr + size - 1 <= m_alias_region_end - 1; + } + + bool IsInHeapRegion(KProcessAddress addr, size_t size) const { + return this->Contains(addr, size) && m_heap_region_start <= addr && + addr + size - 1 <= m_heap_region_end - 1; + } + + bool IsInUnsafeAliasRegion(KProcessAddress addr, size_t size) const { + // Even though Unsafe physical memory is KMemoryState_Normal, it must be mapped inside the + // alias code region. + return this->CanContain(addr, size, Svc::MemoryState::AliasCode); + } + + KScopedLightLock AcquireDeviceMapLock() { + return KScopedLightLock(m_device_map_lock); + } + + KProcessAddress GetRegionAddress(Svc::MemoryState state) const; + size_t GetRegionSize(Svc::MemoryState state) const; + bool CanContain(KProcessAddress addr, size_t size, Svc::MemoryState state) const; + + KProcessAddress GetRegionAddress(KMemoryState state) const { + return this->GetRegionAddress(static_cast(state & KMemoryState::Mask)); + } + size_t GetRegionSize(KMemoryState state) const { + return this->GetRegionSize(static_cast(state & KMemoryState::Mask)); + } + bool CanContain(KProcessAddress addr, size_t size, KMemoryState state) const { + return this->CanContain(addr, size, + static_cast(state & KMemoryState::Mask)); + } + +public: + Core::Memory::Memory& GetMemory() { + return *m_memory; + } + + Core::Memory::Memory& GetMemory() const { + return *m_memory; + } + + Common::PageTable& GetImpl() { + return *m_impl; + } + + Common::PageTable& GetImpl() const { + return *m_impl; + } + + size_t GetNumGuardPages() const { + return this->IsKernel() ? 1 : 4; + } + +protected: + // NOTE: These three functions (Operate, Operate, FinalizeUpdate) are virtual functions + // in Nintendo's kernel. We devirtualize them, since KPageTable is the only derived + // class, and this avoids unnecessary virtual function calls. + Result Operate(PageLinkedList* page_list, KProcessAddress virt_addr, size_t num_pages, + KPhysicalAddress phys_addr, bool is_pa_valid, const KPageProperties properties, + OperationType operation, bool reuse_ll); + Result Operate(PageLinkedList* page_list, KProcessAddress virt_addr, size_t num_pages, + const KPageGroup& page_group, const KPageProperties properties, + OperationType operation, bool reuse_ll); + void FinalizeUpdate(PageLinkedList* page_list); + + bool IsLockedByCurrentThread() const { + return m_general_lock.IsLockedByCurrentThread(); + } + + bool IsLinearMappedPhysicalAddress(KPhysicalAddress phys_addr) { + ASSERT(this->IsLockedByCurrentThread()); + + return m_kernel.MemoryLayout().IsLinearMappedPhysicalAddress( + m_cached_physical_linear_region, phys_addr); + } + + bool IsLinearMappedPhysicalAddress(KPhysicalAddress phys_addr, size_t size) { + ASSERT(this->IsLockedByCurrentThread()); + + return m_kernel.MemoryLayout().IsLinearMappedPhysicalAddress( + m_cached_physical_linear_region, phys_addr, size); + } + + bool IsHeapPhysicalAddress(KPhysicalAddress phys_addr) { + ASSERT(this->IsLockedByCurrentThread()); + + return m_kernel.MemoryLayout().IsHeapPhysicalAddress(m_cached_physical_heap_region, + phys_addr); + } + + bool IsHeapPhysicalAddress(KPhysicalAddress phys_addr, size_t size) { + ASSERT(this->IsLockedByCurrentThread()); + + return m_kernel.MemoryLayout().IsHeapPhysicalAddress(m_cached_physical_heap_region, + phys_addr, size); + } + + bool IsHeapPhysicalAddressForFinalize(KPhysicalAddress phys_addr) { + ASSERT(!this->IsLockedByCurrentThread()); + + return m_kernel.MemoryLayout().IsHeapPhysicalAddress(m_cached_physical_heap_region, + phys_addr); + } + + bool ContainsPages(KProcessAddress addr, size_t num_pages) const { + return (m_address_space_start <= addr) && + (num_pages <= (m_address_space_end - m_address_space_start) / PageSize) && + (addr + num_pages * PageSize - 1 <= m_address_space_end - 1); + } + +private: + KProcessAddress FindFreeArea(KProcessAddress region_start, size_t region_num_pages, + size_t num_pages, size_t alignment, size_t offset, + size_t guard_pages) const; + + Result CheckMemoryStateContiguous(size_t* out_blocks_needed, KProcessAddress addr, size_t size, + KMemoryState state_mask, KMemoryState state, + KMemoryPermission perm_mask, KMemoryPermission perm, + KMemoryAttribute attr_mask, KMemoryAttribute attr) const; + Result CheckMemoryStateContiguous(KProcessAddress addr, size_t size, KMemoryState state_mask, + KMemoryState state, KMemoryPermission perm_mask, + KMemoryPermission perm, KMemoryAttribute attr_mask, + KMemoryAttribute attr) const { + R_RETURN(this->CheckMemoryStateContiguous(nullptr, addr, size, state_mask, state, perm_mask, + perm, attr_mask, attr)); + } + + Result CheckMemoryState(const KMemoryInfo& info, KMemoryState state_mask, KMemoryState state, + KMemoryPermission perm_mask, KMemoryPermission perm, + KMemoryAttribute attr_mask, KMemoryAttribute attr) const; + Result CheckMemoryState(KMemoryState* out_state, KMemoryPermission* out_perm, + KMemoryAttribute* out_attr, size_t* out_blocks_needed, + KMemoryBlockManager::const_iterator it, KProcessAddress last_addr, + KMemoryState state_mask, KMemoryState state, + KMemoryPermission perm_mask, KMemoryPermission perm, + KMemoryAttribute attr_mask, KMemoryAttribute attr, + KMemoryAttribute ignore_attr = DefaultMemoryIgnoreAttr) const; + Result CheckMemoryState(KMemoryState* out_state, KMemoryPermission* out_perm, + KMemoryAttribute* out_attr, size_t* out_blocks_needed, + KProcessAddress addr, size_t size, KMemoryState state_mask, + KMemoryState state, KMemoryPermission perm_mask, KMemoryPermission perm, + KMemoryAttribute attr_mask, KMemoryAttribute attr, + KMemoryAttribute ignore_attr = DefaultMemoryIgnoreAttr) const; + Result CheckMemoryState(size_t* out_blocks_needed, KProcessAddress addr, size_t size, + KMemoryState state_mask, KMemoryState state, + KMemoryPermission perm_mask, KMemoryPermission perm, + KMemoryAttribute attr_mask, KMemoryAttribute attr, + KMemoryAttribute ignore_attr = DefaultMemoryIgnoreAttr) const { + R_RETURN(this->CheckMemoryState(nullptr, nullptr, nullptr, out_blocks_needed, addr, size, + state_mask, state, perm_mask, perm, attr_mask, attr, + ignore_attr)); + } + Result CheckMemoryState(KProcessAddress addr, size_t size, KMemoryState state_mask, + KMemoryState state, KMemoryPermission perm_mask, KMemoryPermission perm, + KMemoryAttribute attr_mask, KMemoryAttribute attr, + KMemoryAttribute ignore_attr = DefaultMemoryIgnoreAttr) const { + R_RETURN(this->CheckMemoryState(nullptr, addr, size, state_mask, state, perm_mask, perm, + attr_mask, attr, ignore_attr)); + } + + Result LockMemoryAndOpen(KPageGroup* out_pg, KPhysicalAddress* out_paddr, KProcessAddress addr, + size_t size, KMemoryState state_mask, KMemoryState state, + KMemoryPermission perm_mask, KMemoryPermission perm, + KMemoryAttribute attr_mask, KMemoryAttribute attr, + KMemoryPermission new_perm, KMemoryAttribute lock_attr); + Result UnlockMemory(KProcessAddress addr, size_t size, KMemoryState state_mask, + KMemoryState state, KMemoryPermission perm_mask, KMemoryPermission perm, + KMemoryAttribute attr_mask, KMemoryAttribute attr, + KMemoryPermission new_perm, KMemoryAttribute lock_attr, + const KPageGroup* pg); + + Result QueryInfoImpl(KMemoryInfo* out_info, Svc::PageInfo* out_page, + KProcessAddress address) const; + + Result QueryMappingImpl(KProcessAddress* out, KPhysicalAddress address, size_t size, + Svc::MemoryState state) const; + + Result AllocateAndMapPagesImpl(PageLinkedList* page_list, KProcessAddress address, + size_t num_pages, KMemoryPermission perm); + Result MapPageGroupImpl(PageLinkedList* page_list, KProcessAddress address, + const KPageGroup& pg, const KPageProperties properties, bool reuse_ll); + + void RemapPageGroup(PageLinkedList* page_list, KProcessAddress address, size_t size, + const KPageGroup& pg); + + Result MakePageGroup(KPageGroup& pg, KProcessAddress addr, size_t num_pages); + bool IsValidPageGroup(const KPageGroup& pg, KProcessAddress addr, size_t num_pages); + + Result GetContiguousMemoryRangeWithState(MemoryRange* out, KProcessAddress address, size_t size, + KMemoryState state_mask, KMemoryState state, + KMemoryPermission perm_mask, KMemoryPermission perm, + KMemoryAttribute attr_mask, KMemoryAttribute attr); + + Result MapPages(KProcessAddress* out_addr, size_t num_pages, size_t alignment, + KPhysicalAddress phys_addr, bool is_pa_valid, KProcessAddress region_start, + size_t region_num_pages, KMemoryState state, KMemoryPermission perm); + + Result MapIoImpl(KProcessAddress* out, PageLinkedList* page_list, KPhysicalAddress phys_addr, + size_t size, KMemoryState state, KMemoryPermission perm); + Result ReadIoMemoryImpl(KProcessAddress dst_addr, KPhysicalAddress phys_addr, size_t size, + KMemoryState state); + Result WriteIoMemoryImpl(KPhysicalAddress phys_addr, KProcessAddress src_addr, size_t size, + KMemoryState state); + + Result SetupForIpcClient(PageLinkedList* page_list, size_t* out_blocks_needed, + KProcessAddress address, size_t size, KMemoryPermission test_perm, + KMemoryState dst_state); + Result SetupForIpcServer(KProcessAddress* out_addr, size_t size, KProcessAddress src_addr, + KMemoryPermission test_perm, KMemoryState dst_state, + KPageTableBase& src_page_table, bool send); + void CleanupForIpcClientOnServerSetupFailure(PageLinkedList* page_list, KProcessAddress address, + size_t size, KMemoryPermission prot_perm); + + size_t GetSize(KMemoryState state) const; + + bool GetPhysicalAddressLocked(KPhysicalAddress* out, KProcessAddress virt_addr) const { + // Validate pre-conditions. + ASSERT(this->IsLockedByCurrentThread()); + + return this->GetImpl().GetPhysicalAddress(out, virt_addr); + } + +public: + bool GetPhysicalAddress(KPhysicalAddress* out, KProcessAddress virt_addr) const { + // Validate pre-conditions. + ASSERT(!this->IsLockedByCurrentThread()); + + // Acquire exclusive access to the table while doing address translation. + KScopedLightLock lk(m_general_lock); + + return this->GetPhysicalAddressLocked(out, virt_addr); + } + + KBlockInfoManager* GetBlockInfoManager() const { + return m_block_info_manager; + } + + Result SetMemoryPermission(KProcessAddress addr, size_t size, Svc::MemoryPermission perm); + Result SetProcessMemoryPermission(KProcessAddress addr, size_t size, + Svc::MemoryPermission perm); + Result SetMemoryAttribute(KProcessAddress addr, size_t size, KMemoryAttribute mask, + KMemoryAttribute attr); + Result SetHeapSize(KProcessAddress* out, size_t size); + Result SetMaxHeapSize(size_t size); + Result QueryInfo(KMemoryInfo* out_info, Svc::PageInfo* out_page_info, + KProcessAddress addr) const; + Result QueryPhysicalAddress(Svc::lp64::PhysicalMemoryInfo* out, KProcessAddress address) const; + Result QueryStaticMapping(KProcessAddress* out, KPhysicalAddress address, size_t size) const { + R_RETURN(this->QueryMappingImpl(out, address, size, Svc::MemoryState::Static)); + } + Result QueryIoMapping(KProcessAddress* out, KPhysicalAddress address, size_t size) const { + R_RETURN(this->QueryMappingImpl(out, address, size, Svc::MemoryState::Io)); + } + Result MapMemory(KProcessAddress dst_address, KProcessAddress src_address, size_t size); + Result UnmapMemory(KProcessAddress dst_address, KProcessAddress src_address, size_t size); + Result MapCodeMemory(KProcessAddress dst_address, KProcessAddress src_address, size_t size); + Result UnmapCodeMemory(KProcessAddress dst_address, KProcessAddress src_address, size_t size); + Result MapIo(KPhysicalAddress phys_addr, size_t size, KMemoryPermission perm); + Result MapIoRegion(KProcessAddress dst_address, KPhysicalAddress phys_addr, size_t size, + Svc::MemoryMapping mapping, Svc::MemoryPermission perm); + Result UnmapIoRegion(KProcessAddress dst_address, KPhysicalAddress phys_addr, size_t size, + Svc::MemoryMapping mapping); + Result MapStatic(KPhysicalAddress phys_addr, size_t size, KMemoryPermission perm); + Result MapRegion(KMemoryRegionType region_type, KMemoryPermission perm); + Result MapInsecureMemory(KProcessAddress address, size_t size); + Result UnmapInsecureMemory(KProcessAddress address, size_t size); + + Result MapPages(KProcessAddress* out_addr, size_t num_pages, size_t alignment, + KPhysicalAddress phys_addr, KProcessAddress region_start, + size_t region_num_pages, KMemoryState state, KMemoryPermission perm) { + R_RETURN(this->MapPages(out_addr, num_pages, alignment, phys_addr, true, region_start, + region_num_pages, state, perm)); + } + + Result MapPages(KProcessAddress* out_addr, size_t num_pages, size_t alignment, + KPhysicalAddress phys_addr, KMemoryState state, KMemoryPermission perm) { + R_RETURN(this->MapPages(out_addr, num_pages, alignment, phys_addr, true, + this->GetRegionAddress(state), + this->GetRegionSize(state) / PageSize, state, perm)); + } + + Result MapPages(KProcessAddress* out_addr, size_t num_pages, KMemoryState state, + KMemoryPermission perm) { + R_RETURN(this->MapPages(out_addr, num_pages, PageSize, 0, false, + this->GetRegionAddress(state), + this->GetRegionSize(state) / PageSize, state, perm)); + } + + Result MapPages(KProcessAddress address, size_t num_pages, KMemoryState state, + KMemoryPermission perm); + Result UnmapPages(KProcessAddress address, size_t num_pages, KMemoryState state); + + Result MapPageGroup(KProcessAddress* out_addr, const KPageGroup& pg, + KProcessAddress region_start, size_t region_num_pages, KMemoryState state, + KMemoryPermission perm); + Result MapPageGroup(KProcessAddress address, const KPageGroup& pg, KMemoryState state, + KMemoryPermission perm); + Result UnmapPageGroup(KProcessAddress address, const KPageGroup& pg, KMemoryState state); + + Result MakeAndOpenPageGroup(KPageGroup* out, KProcessAddress address, size_t num_pages, + KMemoryState state_mask, KMemoryState state, + KMemoryPermission perm_mask, KMemoryPermission perm, + KMemoryAttribute attr_mask, KMemoryAttribute attr); + + Result InvalidateProcessDataCache(KProcessAddress address, size_t size); + Result InvalidateCurrentProcessDataCache(KProcessAddress address, size_t size); + + Result ReadDebugMemory(KProcessAddress dst_address, KProcessAddress src_address, size_t size); + Result ReadDebugIoMemory(KProcessAddress dst_address, KProcessAddress src_address, size_t size, + KMemoryState state); + + Result WriteDebugMemory(KProcessAddress dst_address, KProcessAddress src_address, size_t size); + Result WriteDebugIoMemory(KProcessAddress dst_address, KProcessAddress src_address, size_t size, + KMemoryState state); + + Result LockForMapDeviceAddressSpace(bool* out_is_io, KProcessAddress address, size_t size, + KMemoryPermission perm, bool is_aligned, bool check_heap); + Result LockForUnmapDeviceAddressSpace(KProcessAddress address, size_t size, bool check_heap); + + Result UnlockForDeviceAddressSpace(KProcessAddress address, size_t size); + Result UnlockForDeviceAddressSpacePartialMap(KProcessAddress address, size_t size); + + Result OpenMemoryRangeForMapDeviceAddressSpace(KPageTableBase::MemoryRange* out, + KProcessAddress address, size_t size, + KMemoryPermission perm, bool is_aligned); + Result OpenMemoryRangeForUnmapDeviceAddressSpace(MemoryRange* out, KProcessAddress address, + size_t size); + + Result LockForIpcUserBuffer(KPhysicalAddress* out, KProcessAddress address, size_t size); + Result UnlockForIpcUserBuffer(KProcessAddress address, size_t size); + + Result LockForTransferMemory(KPageGroup* out, KProcessAddress address, size_t size, + KMemoryPermission perm); + Result UnlockForTransferMemory(KProcessAddress address, size_t size, const KPageGroup& pg); + Result LockForCodeMemory(KPageGroup* out, KProcessAddress address, size_t size); + Result UnlockForCodeMemory(KProcessAddress address, size_t size, const KPageGroup& pg); + + Result OpenMemoryRangeForProcessCacheOperation(MemoryRange* out, KProcessAddress address, + size_t size); + + Result CopyMemoryFromLinearToUser(KProcessAddress dst_addr, size_t size, + KProcessAddress src_addr, KMemoryState src_state_mask, + KMemoryState src_state, KMemoryPermission src_test_perm, + KMemoryAttribute src_attr_mask, KMemoryAttribute src_attr); + Result CopyMemoryFromLinearToKernel(void* buffer, size_t size, KProcessAddress src_addr, + KMemoryState src_state_mask, KMemoryState src_state, + KMemoryPermission src_test_perm, + KMemoryAttribute src_attr_mask, KMemoryAttribute src_attr); + Result CopyMemoryFromUserToLinear(KProcessAddress dst_addr, size_t size, + KMemoryState dst_state_mask, KMemoryState dst_state, + KMemoryPermission dst_test_perm, + KMemoryAttribute dst_attr_mask, KMemoryAttribute dst_attr, + KProcessAddress src_addr); + Result CopyMemoryFromKernelToLinear(KProcessAddress dst_addr, size_t size, + KMemoryState dst_state_mask, KMemoryState dst_state, + KMemoryPermission dst_test_perm, + KMemoryAttribute dst_attr_mask, KMemoryAttribute dst_attr, + void* buffer); + Result CopyMemoryFromHeapToHeap(KPageTableBase& dst_page_table, KProcessAddress dst_addr, + size_t size, KMemoryState dst_state_mask, + KMemoryState dst_state, KMemoryPermission dst_test_perm, + KMemoryAttribute dst_attr_mask, KMemoryAttribute dst_attr, + KProcessAddress src_addr, KMemoryState src_state_mask, + KMemoryState src_state, KMemoryPermission src_test_perm, + KMemoryAttribute src_attr_mask, KMemoryAttribute src_attr); + Result CopyMemoryFromHeapToHeapWithoutCheckDestination( + KPageTableBase& dst_page_table, KProcessAddress dst_addr, size_t size, + KMemoryState dst_state_mask, KMemoryState dst_state, KMemoryPermission dst_test_perm, + KMemoryAttribute dst_attr_mask, KMemoryAttribute dst_attr, KProcessAddress src_addr, + KMemoryState src_state_mask, KMemoryState src_state, KMemoryPermission src_test_perm, + KMemoryAttribute src_attr_mask, KMemoryAttribute src_attr); + + Result SetupForIpc(KProcessAddress* out_dst_addr, size_t size, KProcessAddress src_addr, + KPageTableBase& src_page_table, KMemoryPermission test_perm, + KMemoryState dst_state, bool send); + Result CleanupForIpcServer(KProcessAddress address, size_t size, KMemoryState dst_state); + Result CleanupForIpcClient(KProcessAddress address, size_t size, KMemoryState dst_state); + + Result MapPhysicalMemory(KProcessAddress address, size_t size); + Result UnmapPhysicalMemory(KProcessAddress address, size_t size); + + Result MapPhysicalMemoryUnsafe(KProcessAddress address, size_t size); + Result UnmapPhysicalMemoryUnsafe(KProcessAddress address, size_t size); + + Result UnmapProcessMemory(KProcessAddress dst_address, size_t size, KPageTableBase& src_pt, + KProcessAddress src_address); + +public: + KProcessAddress GetAddressSpaceStart() const { + return m_address_space_start; + } + KProcessAddress GetHeapRegionStart() const { + return m_heap_region_start; + } + KProcessAddress GetAliasRegionStart() const { + return m_alias_region_start; + } + KProcessAddress GetStackRegionStart() const { + return m_stack_region_start; + } + KProcessAddress GetKernelMapRegionStart() const { + return m_kernel_map_region_start; + } + KProcessAddress GetCodeRegionStart() const { + return m_code_region_start; + } + KProcessAddress GetAliasCodeRegionStart() const { + return m_alias_code_region_start; + } + + size_t GetAddressSpaceSize() const { + return m_address_space_end - m_address_space_start; + } + size_t GetHeapRegionSize() const { + return m_heap_region_end - m_heap_region_start; + } + size_t GetAliasRegionSize() const { + return m_alias_region_end - m_alias_region_start; + } + size_t GetStackRegionSize() const { + return m_stack_region_end - m_stack_region_start; + } + size_t GetKernelMapRegionSize() const { + return m_kernel_map_region_end - m_kernel_map_region_start; + } + size_t GetCodeRegionSize() const { + return m_code_region_end - m_code_region_start; + } + size_t GetAliasCodeRegionSize() const { + return m_alias_code_region_end - m_alias_code_region_start; + } + + size_t GetNormalMemorySize() const { + // Lock the table. + KScopedLightLock lk(m_general_lock); + + return (m_current_heap_end - m_heap_region_start) + m_mapped_physical_memory_size; + } + + size_t GetCodeSize() const; + size_t GetCodeDataSize() const; + size_t GetAliasCodeSize() const; + size_t GetAliasCodeDataSize() const; + + u32 GetAllocateOption() const { + return m_allocate_option; + } + + u32 GetAddressSpaceWidth() const { + return m_address_space_width; + } + +public: + // Linear mapped + static u8* GetLinearMappedVirtualPointer(KernelCore& kernel, KPhysicalAddress addr) { + return kernel.System().DeviceMemory().GetPointer(addr); + } + + static KPhysicalAddress GetLinearMappedPhysicalAddress(KernelCore& kernel, + KVirtualAddress addr) { + return kernel.MemoryLayout().GetLinearPhysicalAddress(addr); + } + + static KVirtualAddress GetLinearMappedVirtualAddress(KernelCore& kernel, + KPhysicalAddress addr) { + return kernel.MemoryLayout().GetLinearVirtualAddress(addr); + } + + // Heap + static u8* GetHeapVirtualPointer(KernelCore& kernel, KPhysicalAddress addr) { + return kernel.System().DeviceMemory().GetPointer(addr); + } + + static KPhysicalAddress GetHeapPhysicalAddress(KernelCore& kernel, KVirtualAddress addr) { + return GetLinearMappedPhysicalAddress(kernel, addr); + } + + static KVirtualAddress GetHeapVirtualAddress(KernelCore& kernel, KPhysicalAddress addr) { + return GetLinearMappedVirtualAddress(kernel, addr); + } + + // Member heap + u8* GetHeapVirtualPointer(KPhysicalAddress addr) { + return GetHeapVirtualPointer(m_kernel, addr); + } + + KPhysicalAddress GetHeapPhysicalAddress(KVirtualAddress addr) { + return GetHeapPhysicalAddress(m_kernel, addr); + } + + KVirtualAddress GetHeapVirtualAddress(KPhysicalAddress addr) { + return GetHeapVirtualAddress(m_kernel, addr); + } + + // TODO: GetPageTableVirtualAddress + // TODO: GetPageTablePhysicalAddress +}; + +} // namespace Kernel diff --git a/src/core/hle/kernel/k_process.cpp b/src/core/hle/kernel/k_process.cpp index 1f4b0755d6..3cfb414e5d 100644 --- a/src/core/hle/kernel/k_process.cpp +++ b/src/core/hle/kernel/k_process.cpp @@ -298,9 +298,9 @@ Result KProcess::Initialize(const Svc::CreateProcessParameter& params, const KPa const bool enable_aslr = True(params.flags & Svc::CreateProcessFlag::EnableAslr); const bool enable_das_merge = False(params.flags & Svc::CreateProcessFlag::DisableDeviceAddressSpaceMerge); - R_TRY(m_page_table.InitializeForProcess( - as_type, enable_aslr, enable_das_merge, !enable_aslr, pool, params.code_address, - params.code_num_pages * PageSize, m_system_resource, res_limit, this->GetMemory())); + R_TRY(m_page_table.Initialize(as_type, enable_aslr, enable_das_merge, !enable_aslr, pool, + params.code_address, params.code_num_pages * PageSize, + m_system_resource, res_limit, this->GetMemory())); } ON_RESULT_FAILURE_2 { m_page_table.Finalize(); @@ -391,9 +391,9 @@ Result KProcess::Initialize(const Svc::CreateProcessParameter& params, const bool enable_aslr = True(params.flags & Svc::CreateProcessFlag::EnableAslr); const bool enable_das_merge = False(params.flags & Svc::CreateProcessFlag::DisableDeviceAddressSpaceMerge); - R_TRY(m_page_table.InitializeForProcess(as_type, enable_aslr, enable_das_merge, - !enable_aslr, pool, params.code_address, code_size, - m_system_resource, res_limit, this->GetMemory())); + R_TRY(m_page_table.Initialize(as_type, enable_aslr, enable_das_merge, !enable_aslr, pool, + params.code_address, code_size, m_system_resource, res_limit, + this->GetMemory())); } ON_RESULT_FAILURE_2 { m_page_table.Finalize(); @@ -1122,9 +1122,9 @@ Result KProcess::GetThreadList(s32* out_num_threads, KProcessAddress out_thread_ void KProcess::Switch(KProcess* cur_process, KProcess* next_process) {} KProcess::KProcess(KernelCore& kernel) - : KAutoObjectWithSlabHeapAndContainer(kernel), m_page_table{kernel.System()}, - m_state_lock{kernel}, m_list_lock{kernel}, m_cond_var{kernel.System()}, - m_address_arbiter{kernel.System()}, m_handle_table{kernel} {} + : KAutoObjectWithSlabHeapAndContainer(kernel), m_page_table{kernel}, m_state_lock{kernel}, + m_list_lock{kernel}, m_cond_var{kernel.System()}, m_address_arbiter{kernel.System()}, + m_handle_table{kernel} {} KProcess::~KProcess() = default; Result KProcess::LoadFromMetadata(const FileSys::ProgramMetadata& metadata, std::size_t code_size, diff --git a/src/core/hle/kernel/k_process.h b/src/core/hle/kernel/k_process.h index f9f755afa2..8339465fd8 100644 --- a/src/core/hle/kernel/k_process.h +++ b/src/core/hle/kernel/k_process.h @@ -5,13 +5,14 @@ #include +#include "core/file_sys/program_metadata.h" #include "core/hle/kernel/code_set.h" #include "core/hle/kernel/k_address_arbiter.h" #include "core/hle/kernel/k_capabilities.h" #include "core/hle/kernel/k_condition_variable.h" #include "core/hle/kernel/k_handle_table.h" -#include "core/hle/kernel/k_page_table.h" #include "core/hle/kernel/k_page_table_manager.h" +#include "core/hle/kernel/k_process_page_table.h" #include "core/hle/kernel/k_system_resource.h" #include "core/hle/kernel/k_thread.h" #include "core/hle/kernel/k_thread_local_page.h" @@ -65,7 +66,7 @@ private: using TLPIterator = TLPTree::iterator; private: - KPageTable m_page_table; + KProcessPageTable m_page_table; std::atomic m_used_kernel_memory_size{}; TLPTree m_fully_used_tlp_tree{}; TLPTree m_partially_used_tlp_tree{}; @@ -254,9 +255,8 @@ public: return m_is_hbl; } - Kernel::KMemoryManager::Direction GetAllocateOption() const { - // TODO: property of the KPageTableBase - return KMemoryManager::Direction::FromFront; + u32 GetAllocateOption() const { + return m_page_table.GetAllocateOption(); } ThreadList& GetThreadList() { @@ -295,10 +295,10 @@ public: return m_list_lock; } - KPageTable& GetPageTable() { + KProcessPageTable& GetPageTable() { return m_page_table; } - const KPageTable& GetPageTable() const { + const KProcessPageTable& GetPageTable() const { return m_page_table; } diff --git a/src/core/hle/kernel/k_process_page_table.h b/src/core/hle/kernel/k_process_page_table.h new file mode 100644 index 0000000000..b7ae5abd01 --- /dev/null +++ b/src/core/hle/kernel/k_process_page_table.h @@ -0,0 +1,480 @@ +// SPDX-FileCopyrightText: Copyright 2023 yuzu Emulator Project +// SPDX-License-Identifier: GPL-2.0-or-later + +#pragma once + +#include "core/hle/kernel/k_page_table.h" +#include "core/hle/kernel/k_scoped_lock.h" +#include "core/hle/kernel/svc_types.h" + +namespace Core { +class ARM_Interface; +} + +namespace Kernel { + +class KProcessPageTable { +private: + KPageTable m_page_table; + +public: + KProcessPageTable(KernelCore& kernel) : m_page_table(kernel) {} + + Result Initialize(Svc::CreateProcessFlag as_type, bool enable_aslr, bool enable_das_merge, + bool from_back, KMemoryManager::Pool pool, KProcessAddress code_address, + size_t code_size, KSystemResource* system_resource, + KResourceLimit* resource_limit, Core::Memory::Memory& memory) { + R_RETURN(m_page_table.InitializeForProcess(as_type, enable_aslr, enable_das_merge, + from_back, pool, code_address, code_size, + system_resource, resource_limit, memory)); + } + + void Finalize() { + m_page_table.Finalize(); + } + + Core::Memory::Memory& GetMemory() { + return m_page_table.GetMemory(); + } + + Core::Memory::Memory& GetMemory() const { + return m_page_table.GetMemory(); + } + + Common::PageTable& GetImpl() { + return m_page_table.GetImpl(); + } + + Common::PageTable& GetImpl() const { + return m_page_table.GetImpl(); + } + + size_t GetNumGuardPages() const { + return m_page_table.GetNumGuardPages(); + } + + KScopedLightLock AcquireDeviceMapLock() { + return m_page_table.AcquireDeviceMapLock(); + } + + Result SetMemoryPermission(KProcessAddress addr, size_t size, Svc::MemoryPermission perm) { + R_RETURN(m_page_table.SetMemoryPermission(addr, size, perm)); + } + + Result SetProcessMemoryPermission(KProcessAddress addr, size_t size, + Svc::MemoryPermission perm) { + R_RETURN(m_page_table.SetProcessMemoryPermission(addr, size, perm)); + } + + Result SetMemoryAttribute(KProcessAddress addr, size_t size, KMemoryAttribute mask, + KMemoryAttribute attr) { + R_RETURN(m_page_table.SetMemoryAttribute(addr, size, mask, attr)); + } + + Result SetHeapSize(KProcessAddress* out, size_t size) { + R_RETURN(m_page_table.SetHeapSize(out, size)); + } + + Result SetMaxHeapSize(size_t size) { + R_RETURN(m_page_table.SetMaxHeapSize(size)); + } + + Result QueryInfo(KMemoryInfo* out_info, Svc::PageInfo* out_page_info, + KProcessAddress addr) const { + R_RETURN(m_page_table.QueryInfo(out_info, out_page_info, addr)); + } + + Result QueryPhysicalAddress(Svc::lp64::PhysicalMemoryInfo* out, KProcessAddress address) { + R_RETURN(m_page_table.QueryPhysicalAddress(out, address)); + } + + Result QueryStaticMapping(KProcessAddress* out, KPhysicalAddress address, size_t size) { + R_RETURN(m_page_table.QueryStaticMapping(out, address, size)); + } + + Result QueryIoMapping(KProcessAddress* out, KPhysicalAddress address, size_t size) { + R_RETURN(m_page_table.QueryIoMapping(out, address, size)); + } + + Result MapMemory(KProcessAddress dst_address, KProcessAddress src_address, size_t size) { + R_RETURN(m_page_table.MapMemory(dst_address, src_address, size)); + } + + Result UnmapMemory(KProcessAddress dst_address, KProcessAddress src_address, size_t size) { + R_RETURN(m_page_table.UnmapMemory(dst_address, src_address, size)); + } + + Result MapCodeMemory(KProcessAddress dst_address, KProcessAddress src_address, size_t size) { + R_RETURN(m_page_table.MapCodeMemory(dst_address, src_address, size)); + } + + Result UnmapCodeMemory(KProcessAddress dst_address, KProcessAddress src_address, size_t size) { + R_RETURN(m_page_table.UnmapCodeMemory(dst_address, src_address, size)); + } + + Result MapIo(KPhysicalAddress phys_addr, size_t size, KMemoryPermission perm) { + R_RETURN(m_page_table.MapIo(phys_addr, size, perm)); + } + + Result MapIoRegion(KProcessAddress dst_address, KPhysicalAddress phys_addr, size_t size, + Svc::MemoryMapping mapping, Svc::MemoryPermission perm) { + R_RETURN(m_page_table.MapIoRegion(dst_address, phys_addr, size, mapping, perm)); + } + + Result UnmapIoRegion(KProcessAddress dst_address, KPhysicalAddress phys_addr, size_t size, + Svc::MemoryMapping mapping) { + R_RETURN(m_page_table.UnmapIoRegion(dst_address, phys_addr, size, mapping)); + } + + Result MapStatic(KPhysicalAddress phys_addr, size_t size, KMemoryPermission perm) { + R_RETURN(m_page_table.MapStatic(phys_addr, size, perm)); + } + + Result MapRegion(KMemoryRegionType region_type, KMemoryPermission perm) { + R_RETURN(m_page_table.MapRegion(region_type, perm)); + } + + Result MapInsecureMemory(KProcessAddress address, size_t size) { + R_RETURN(m_page_table.MapInsecureMemory(address, size)); + } + + Result UnmapInsecureMemory(KProcessAddress address, size_t size) { + R_RETURN(m_page_table.UnmapInsecureMemory(address, size)); + } + + Result MapPageGroup(KProcessAddress addr, const KPageGroup& pg, KMemoryState state, + KMemoryPermission perm) { + R_RETURN(m_page_table.MapPageGroup(addr, pg, state, perm)); + } + + Result UnmapPageGroup(KProcessAddress address, const KPageGroup& pg, KMemoryState state) { + R_RETURN(m_page_table.UnmapPageGroup(address, pg, state)); + } + + Result MapPages(KProcessAddress* out_addr, size_t num_pages, size_t alignment, + KPhysicalAddress phys_addr, KMemoryState state, KMemoryPermission perm) { + R_RETURN(m_page_table.MapPages(out_addr, num_pages, alignment, phys_addr, state, perm)); + } + + Result MapPages(KProcessAddress* out_addr, size_t num_pages, KMemoryState state, + KMemoryPermission perm) { + R_RETURN(m_page_table.MapPages(out_addr, num_pages, state, perm)); + } + + Result MapPages(KProcessAddress address, size_t num_pages, KMemoryState state, + KMemoryPermission perm) { + R_RETURN(m_page_table.MapPages(address, num_pages, state, perm)); + } + + Result UnmapPages(KProcessAddress addr, size_t num_pages, KMemoryState state) { + R_RETURN(m_page_table.UnmapPages(addr, num_pages, state)); + } + + Result MakeAndOpenPageGroup(KPageGroup* out, KProcessAddress address, size_t num_pages, + KMemoryState state_mask, KMemoryState state, + KMemoryPermission perm_mask, KMemoryPermission perm, + KMemoryAttribute attr_mask, KMemoryAttribute attr) { + R_RETURN(m_page_table.MakeAndOpenPageGroup(out, address, num_pages, state_mask, state, + perm_mask, perm, attr_mask, attr)); + } + + Result InvalidateProcessDataCache(KProcessAddress address, size_t size) { + R_RETURN(m_page_table.InvalidateProcessDataCache(address, size)); + } + + Result ReadDebugMemory(KProcessAddress dst_address, KProcessAddress src_address, size_t size) { + R_RETURN(m_page_table.ReadDebugMemory(dst_address, src_address, size)); + } + + Result ReadDebugIoMemory(KProcessAddress dst_address, KProcessAddress src_address, size_t size, + KMemoryState state) { + R_RETURN(m_page_table.ReadDebugIoMemory(dst_address, src_address, size, state)); + } + + Result WriteDebugMemory(KProcessAddress dst_address, KProcessAddress src_address, size_t size) { + R_RETURN(m_page_table.WriteDebugMemory(dst_address, src_address, size)); + } + + Result WriteDebugIoMemory(KProcessAddress dst_address, KProcessAddress src_address, size_t size, + KMemoryState state) { + R_RETURN(m_page_table.WriteDebugIoMemory(dst_address, src_address, size, state)); + } + + Result LockForMapDeviceAddressSpace(bool* out_is_io, KProcessAddress address, size_t size, + KMemoryPermission perm, bool is_aligned, bool check_heap) { + R_RETURN(m_page_table.LockForMapDeviceAddressSpace(out_is_io, address, size, perm, + is_aligned, check_heap)); + } + + Result LockForUnmapDeviceAddressSpace(KProcessAddress address, size_t size, bool check_heap) { + R_RETURN(m_page_table.LockForUnmapDeviceAddressSpace(address, size, check_heap)); + } + + Result UnlockForDeviceAddressSpace(KProcessAddress address, size_t size) { + R_RETURN(m_page_table.UnlockForDeviceAddressSpace(address, size)); + } + + Result UnlockForDeviceAddressSpacePartialMap(KProcessAddress address, size_t size) { + R_RETURN(m_page_table.UnlockForDeviceAddressSpacePartialMap(address, size)); + } + + Result OpenMemoryRangeForMapDeviceAddressSpace(KPageTableBase::MemoryRange* out, + KProcessAddress address, size_t size, + KMemoryPermission perm, bool is_aligned) { + R_RETURN(m_page_table.OpenMemoryRangeForMapDeviceAddressSpace(out, address, size, perm, + is_aligned)); + } + + Result OpenMemoryRangeForUnmapDeviceAddressSpace(KPageTableBase::MemoryRange* out, + KProcessAddress address, size_t size) { + R_RETURN(m_page_table.OpenMemoryRangeForUnmapDeviceAddressSpace(out, address, size)); + } + + Result LockForIpcUserBuffer(KPhysicalAddress* out, KProcessAddress address, size_t size) { + R_RETURN(m_page_table.LockForIpcUserBuffer(out, address, size)); + } + + Result UnlockForIpcUserBuffer(KProcessAddress address, size_t size) { + R_RETURN(m_page_table.UnlockForIpcUserBuffer(address, size)); + } + + Result LockForTransferMemory(KPageGroup* out, KProcessAddress address, size_t size, + KMemoryPermission perm) { + R_RETURN(m_page_table.LockForTransferMemory(out, address, size, perm)); + } + + Result UnlockForTransferMemory(KProcessAddress address, size_t size, const KPageGroup& pg) { + R_RETURN(m_page_table.UnlockForTransferMemory(address, size, pg)); + } + + Result LockForCodeMemory(KPageGroup* out, KProcessAddress address, size_t size) { + R_RETURN(m_page_table.LockForCodeMemory(out, address, size)); + } + + Result UnlockForCodeMemory(KProcessAddress address, size_t size, const KPageGroup& pg) { + R_RETURN(m_page_table.UnlockForCodeMemory(address, size, pg)); + } + + Result OpenMemoryRangeForProcessCacheOperation(KPageTableBase::MemoryRange* out, + KProcessAddress address, size_t size) { + R_RETURN(m_page_table.OpenMemoryRangeForProcessCacheOperation(out, address, size)); + } + + Result CopyMemoryFromLinearToUser(KProcessAddress dst_addr, size_t size, + KProcessAddress src_addr, KMemoryState src_state_mask, + KMemoryState src_state, KMemoryPermission src_test_perm, + KMemoryAttribute src_attr_mask, KMemoryAttribute src_attr) { + R_RETURN(m_page_table.CopyMemoryFromLinearToUser(dst_addr, size, src_addr, src_state_mask, + src_state, src_test_perm, src_attr_mask, + src_attr)); + } + + Result CopyMemoryFromLinearToKernel(void* dst_addr, size_t size, KProcessAddress src_addr, + KMemoryState src_state_mask, KMemoryState src_state, + KMemoryPermission src_test_perm, + KMemoryAttribute src_attr_mask, KMemoryAttribute src_attr) { + R_RETURN(m_page_table.CopyMemoryFromLinearToKernel(dst_addr, size, src_addr, src_state_mask, + src_state, src_test_perm, src_attr_mask, + src_attr)); + } + + Result CopyMemoryFromUserToLinear(KProcessAddress dst_addr, size_t size, + KMemoryState dst_state_mask, KMemoryState dst_state, + KMemoryPermission dst_test_perm, + KMemoryAttribute dst_attr_mask, KMemoryAttribute dst_attr, + KProcessAddress src_addr) { + R_RETURN(m_page_table.CopyMemoryFromUserToLinear(dst_addr, size, dst_state_mask, dst_state, + dst_test_perm, dst_attr_mask, dst_attr, + src_addr)); + } + + Result CopyMemoryFromKernelToLinear(KProcessAddress dst_addr, size_t size, + KMemoryState dst_state_mask, KMemoryState dst_state, + KMemoryPermission dst_test_perm, + KMemoryAttribute dst_attr_mask, KMemoryAttribute dst_attr, + void* src_addr) { + R_RETURN(m_page_table.CopyMemoryFromKernelToLinear(dst_addr, size, dst_state_mask, + dst_state, dst_test_perm, dst_attr_mask, + dst_attr, src_addr)); + } + + Result CopyMemoryFromHeapToHeap(KProcessPageTable& dst_page_table, KProcessAddress dst_addr, + size_t size, KMemoryState dst_state_mask, + KMemoryState dst_state, KMemoryPermission dst_test_perm, + KMemoryAttribute dst_attr_mask, KMemoryAttribute dst_attr, + KProcessAddress src_addr, KMemoryState src_state_mask, + KMemoryState src_state, KMemoryPermission src_test_perm, + KMemoryAttribute src_attr_mask, KMemoryAttribute src_attr) { + R_RETURN(m_page_table.CopyMemoryFromHeapToHeap( + dst_page_table.m_page_table, dst_addr, size, dst_state_mask, dst_state, dst_test_perm, + dst_attr_mask, dst_attr, src_addr, src_state_mask, src_state, src_test_perm, + src_attr_mask, src_attr)); + } + + Result CopyMemoryFromHeapToHeapWithoutCheckDestination( + KProcessPageTable& dst_page_table, KProcessAddress dst_addr, size_t size, + KMemoryState dst_state_mask, KMemoryState dst_state, KMemoryPermission dst_test_perm, + KMemoryAttribute dst_attr_mask, KMemoryAttribute dst_attr, KProcessAddress src_addr, + KMemoryState src_state_mask, KMemoryState src_state, KMemoryPermission src_test_perm, + KMemoryAttribute src_attr_mask, KMemoryAttribute src_attr) { + R_RETURN(m_page_table.CopyMemoryFromHeapToHeapWithoutCheckDestination( + dst_page_table.m_page_table, dst_addr, size, dst_state_mask, dst_state, dst_test_perm, + dst_attr_mask, dst_attr, src_addr, src_state_mask, src_state, src_test_perm, + src_attr_mask, src_attr)); + } + + Result SetupForIpc(KProcessAddress* out_dst_addr, size_t size, KProcessAddress src_addr, + KProcessPageTable& src_page_table, KMemoryPermission test_perm, + KMemoryState dst_state, bool send) { + R_RETURN(m_page_table.SetupForIpc(out_dst_addr, size, src_addr, src_page_table.m_page_table, + test_perm, dst_state, send)); + } + + Result CleanupForIpcServer(KProcessAddress address, size_t size, KMemoryState dst_state) { + R_RETURN(m_page_table.CleanupForIpcServer(address, size, dst_state)); + } + + Result CleanupForIpcClient(KProcessAddress address, size_t size, KMemoryState dst_state) { + R_RETURN(m_page_table.CleanupForIpcClient(address, size, dst_state)); + } + + Result MapPhysicalMemory(KProcessAddress address, size_t size) { + R_RETURN(m_page_table.MapPhysicalMemory(address, size)); + } + + Result UnmapPhysicalMemory(KProcessAddress address, size_t size) { + R_RETURN(m_page_table.UnmapPhysicalMemory(address, size)); + } + + Result MapPhysicalMemoryUnsafe(KProcessAddress address, size_t size) { + R_RETURN(m_page_table.MapPhysicalMemoryUnsafe(address, size)); + } + + Result UnmapPhysicalMemoryUnsafe(KProcessAddress address, size_t size) { + R_RETURN(m_page_table.UnmapPhysicalMemoryUnsafe(address, size)); + } + + Result UnmapProcessMemory(KProcessAddress dst_address, size_t size, + KProcessPageTable& src_page_table, KProcessAddress src_address) { + R_RETURN(m_page_table.UnmapProcessMemory(dst_address, size, src_page_table.m_page_table, + src_address)); + } + + bool GetPhysicalAddress(KPhysicalAddress* out, KProcessAddress address) { + return m_page_table.GetPhysicalAddress(out, address); + } + + bool Contains(KProcessAddress addr, size_t size) const { + return m_page_table.Contains(addr, size); + } + + bool IsInAliasRegion(KProcessAddress addr, size_t size) const { + return m_page_table.IsInAliasRegion(addr, size); + } + bool IsInHeapRegion(KProcessAddress addr, size_t size) const { + return m_page_table.IsInHeapRegion(addr, size); + } + bool IsInUnsafeAliasRegion(KProcessAddress addr, size_t size) const { + return m_page_table.IsInUnsafeAliasRegion(addr, size); + } + + bool CanContain(KProcessAddress addr, size_t size, KMemoryState state) const { + return m_page_table.CanContain(addr, size, state); + } + + KProcessAddress GetAddressSpaceStart() const { + return m_page_table.GetAddressSpaceStart(); + } + KProcessAddress GetHeapRegionStart() const { + return m_page_table.GetHeapRegionStart(); + } + KProcessAddress GetAliasRegionStart() const { + return m_page_table.GetAliasRegionStart(); + } + KProcessAddress GetStackRegionStart() const { + return m_page_table.GetStackRegionStart(); + } + KProcessAddress GetKernelMapRegionStart() const { + return m_page_table.GetKernelMapRegionStart(); + } + KProcessAddress GetCodeRegionStart() const { + return m_page_table.GetCodeRegionStart(); + } + KProcessAddress GetAliasCodeRegionStart() const { + return m_page_table.GetAliasCodeRegionStart(); + } + + size_t GetAddressSpaceSize() const { + return m_page_table.GetAddressSpaceSize(); + } + size_t GetHeapRegionSize() const { + return m_page_table.GetHeapRegionSize(); + } + size_t GetAliasRegionSize() const { + return m_page_table.GetAliasRegionSize(); + } + size_t GetStackRegionSize() const { + return m_page_table.GetStackRegionSize(); + } + size_t GetKernelMapRegionSize() const { + return m_page_table.GetKernelMapRegionSize(); + } + size_t GetCodeRegionSize() const { + return m_page_table.GetCodeRegionSize(); + } + size_t GetAliasCodeRegionSize() const { + return m_page_table.GetAliasCodeRegionSize(); + } + + size_t GetNormalMemorySize() const { + return m_page_table.GetNormalMemorySize(); + } + + size_t GetCodeSize() const { + return m_page_table.GetCodeSize(); + } + size_t GetCodeDataSize() const { + return m_page_table.GetCodeDataSize(); + } + + size_t GetAliasCodeSize() const { + return m_page_table.GetAliasCodeSize(); + } + size_t GetAliasCodeDataSize() const { + return m_page_table.GetAliasCodeDataSize(); + } + + u32 GetAllocateOption() const { + return m_page_table.GetAllocateOption(); + } + + u32 GetAddressSpaceWidth() const { + return m_page_table.GetAddressSpaceWidth(); + } + + KPhysicalAddress GetHeapPhysicalAddress(KVirtualAddress address) { + return m_page_table.GetHeapPhysicalAddress(address); + } + + u8* GetHeapVirtualPointer(KPhysicalAddress address) { + return m_page_table.GetHeapVirtualPointer(address); + } + + KVirtualAddress GetHeapVirtualAddress(KPhysicalAddress address) { + return m_page_table.GetHeapVirtualAddress(address); + } + + KBlockInfoManager* GetBlockInfoManager() { + return m_page_table.GetBlockInfoManager(); + } + + KPageTable& GetBasePageTable() { + return m_page_table; + } + + const KPageTable& GetBasePageTable() const { + return m_page_table; + } +}; + +} // namespace Kernel diff --git a/src/core/hle/kernel/k_server_session.cpp b/src/core/hle/kernel/k_server_session.cpp index c64ceb5302..3ea653163b 100644 --- a/src/core/hle/kernel/k_server_session.cpp +++ b/src/core/hle/kernel/k_server_session.cpp @@ -383,7 +383,7 @@ Result KServerSession::SendReply(bool is_hle) { if (event != nullptr) { // // Get the client process/page table. // KProcess *client_process = client_thread->GetOwnerProcess(); - // KPageTable *client_page_table = std::addressof(client_process->PageTable()); + // KProcessPageTable *client_page_table = std::addressof(client_process->PageTable()); // // If we need to, reply with an async error. // if (R_FAILED(client_result)) { diff --git a/src/core/hle/kernel/k_system_resource.cpp b/src/core/hle/kernel/k_system_resource.cpp index 07e92aa804..b51941faf4 100644 --- a/src/core/hle/kernel/k_system_resource.cpp +++ b/src/core/hle/kernel/k_system_resource.cpp @@ -40,7 +40,7 @@ Result KSecureSystemResource::Initialize(size_t size, KResourceLimit* resource_l // Get resource pointer. KPhysicalAddress resource_paddr = - KPageTable::GetHeapPhysicalAddress(m_kernel.MemoryLayout(), m_resource_address); + KPageTable::GetHeapPhysicalAddress(m_kernel, m_resource_address); auto* resource = m_kernel.System().DeviceMemory().GetPointer(resource_paddr); diff --git a/src/core/hle/kernel/k_thread_local_page.cpp b/src/core/hle/kernel/k_thread_local_page.cpp index 2c45b42324..a632d16349 100644 --- a/src/core/hle/kernel/k_thread_local_page.cpp +++ b/src/core/hle/kernel/k_thread_local_page.cpp @@ -37,8 +37,8 @@ Result KThreadLocalPage::Initialize(KernelCore& kernel, KProcess* process) { Result KThreadLocalPage::Finalize() { // Get the physical address of the page. - const KPhysicalAddress phys_addr = m_owner->GetPageTable().GetPhysicalAddr(m_virt_addr); - ASSERT(phys_addr); + KPhysicalAddress phys_addr{}; + ASSERT(m_owner->GetPageTable().GetPhysicalAddress(std::addressof(phys_addr), m_virt_addr)); // Unmap the page. R_TRY(m_owner->GetPageTable().UnmapPages(this->GetAddress(), 1, KMemoryState::ThreadLocal)); diff --git a/src/core/hle/kernel/process_capability.cpp b/src/core/hle/kernel/process_capability.cpp deleted file mode 100644 index 773319ad85..0000000000 --- a/src/core/hle/kernel/process_capability.cpp +++ /dev/null @@ -1,389 +0,0 @@ -// SPDX-FileCopyrightText: Copyright 2018 yuzu Emulator Project -// SPDX-License-Identifier: GPL-2.0-or-later - -#include - -#include "common/bit_util.h" -#include "common/logging/log.h" -#include "core/hle/kernel/k_handle_table.h" -#include "core/hle/kernel/k_page_table.h" -#include "core/hle/kernel/process_capability.h" -#include "core/hle/kernel/svc_results.h" - -namespace Kernel { -namespace { - -// clang-format off - -// Shift offsets for kernel capability types. -enum : u32 { - CapabilityOffset_PriorityAndCoreNum = 3, - CapabilityOffset_Syscall = 4, - CapabilityOffset_MapPhysical = 6, - CapabilityOffset_MapIO = 7, - CapabilityOffset_MapRegion = 10, - CapabilityOffset_Interrupt = 11, - CapabilityOffset_ProgramType = 13, - CapabilityOffset_KernelVersion = 14, - CapabilityOffset_HandleTableSize = 15, - CapabilityOffset_Debug = 16, -}; - -// Combined mask of all parameters that may be initialized only once. -constexpr u32 InitializeOnceMask = (1U << CapabilityOffset_PriorityAndCoreNum) | - (1U << CapabilityOffset_ProgramType) | - (1U << CapabilityOffset_KernelVersion) | - (1U << CapabilityOffset_HandleTableSize) | - (1U << CapabilityOffset_Debug); - -// Packed kernel version indicating 10.4.0 -constexpr u32 PackedKernelVersion = 0x520000; - -// Indicates possible types of capabilities that can be specified. -enum class CapabilityType : u32 { - Unset = 0U, - PriorityAndCoreNum = (1U << CapabilityOffset_PriorityAndCoreNum) - 1, - Syscall = (1U << CapabilityOffset_Syscall) - 1, - MapPhysical = (1U << CapabilityOffset_MapPhysical) - 1, - MapIO = (1U << CapabilityOffset_MapIO) - 1, - MapRegion = (1U << CapabilityOffset_MapRegion) - 1, - Interrupt = (1U << CapabilityOffset_Interrupt) - 1, - ProgramType = (1U << CapabilityOffset_ProgramType) - 1, - KernelVersion = (1U << CapabilityOffset_KernelVersion) - 1, - HandleTableSize = (1U << CapabilityOffset_HandleTableSize) - 1, - Debug = (1U << CapabilityOffset_Debug) - 1, - Ignorable = 0xFFFFFFFFU, -}; - -// clang-format on - -constexpr CapabilityType GetCapabilityType(u32 value) { - return static_cast((~value & (value + 1)) - 1); -} - -u32 GetFlagBitOffset(CapabilityType type) { - const auto value = static_cast(type); - return static_cast(Common::BitSize() - static_cast(std::countl_zero(value))); -} - -} // Anonymous namespace - -Result ProcessCapabilities::InitializeForKernelProcess(const u32* capabilities, - std::size_t num_capabilities, - KPageTable& page_table) { - Clear(); - - // Allow all cores and priorities. - core_mask = 0xF; - priority_mask = 0xFFFFFFFFFFFFFFFF; - kernel_version = PackedKernelVersion; - - return ParseCapabilities(capabilities, num_capabilities, page_table); -} - -Result ProcessCapabilities::InitializeForUserProcess(const u32* capabilities, - std::size_t num_capabilities, - KPageTable& page_table) { - Clear(); - - return ParseCapabilities(capabilities, num_capabilities, page_table); -} - -void ProcessCapabilities::InitializeForMetadatalessProcess() { - // Allow all cores and priorities - core_mask = 0xF; - priority_mask = 0xFFFFFFFFFFFFFFFF; - kernel_version = PackedKernelVersion; - - // Allow all system calls and interrupts. - svc_capabilities.set(); - interrupt_capabilities.set(); - - // Allow using the maximum possible amount of handles - handle_table_size = static_cast(KHandleTable::MaxTableSize); - - // Allow all debugging capabilities. - is_debuggable = true; - can_force_debug = true; -} - -Result ProcessCapabilities::ParseCapabilities(const u32* capabilities, std::size_t num_capabilities, - KPageTable& page_table) { - u32 set_flags = 0; - u32 set_svc_bits = 0; - - for (std::size_t i = 0; i < num_capabilities; ++i) { - const u32 descriptor = capabilities[i]; - const auto type = GetCapabilityType(descriptor); - - if (type == CapabilityType::MapPhysical) { - i++; - - // The MapPhysical type uses two descriptor flags for its parameters. - // If there's only one, then there's a problem. - if (i >= num_capabilities) { - LOG_ERROR(Kernel, "Invalid combination! i={}", i); - return ResultInvalidCombination; - } - - const auto size_flags = capabilities[i]; - if (GetCapabilityType(size_flags) != CapabilityType::MapPhysical) { - LOG_ERROR(Kernel, "Invalid capability type! size_flags={}", size_flags); - return ResultInvalidCombination; - } - - const auto result = HandleMapPhysicalFlags(descriptor, size_flags, page_table); - if (result.IsError()) { - LOG_ERROR(Kernel, "Failed to map physical flags! descriptor={}, size_flags={}", - descriptor, size_flags); - return result; - } - } else { - const auto result = - ParseSingleFlagCapability(set_flags, set_svc_bits, descriptor, page_table); - if (result.IsError()) { - LOG_ERROR( - Kernel, - "Failed to parse capability flag! set_flags={}, set_svc_bits={}, descriptor={}", - set_flags, set_svc_bits, descriptor); - return result; - } - } - } - - return ResultSuccess; -} - -Result ProcessCapabilities::ParseSingleFlagCapability(u32& set_flags, u32& set_svc_bits, u32 flag, - KPageTable& page_table) { - const auto type = GetCapabilityType(flag); - - if (type == CapabilityType::Unset) { - return ResultInvalidArgument; - } - - // Bail early on ignorable entries, as one would expect, - // ignorable descriptors can be ignored. - if (type == CapabilityType::Ignorable) { - return ResultSuccess; - } - - // Ensure that the give flag hasn't already been initialized before. - // If it has been, then bail. - const u32 flag_length = GetFlagBitOffset(type); - const u32 set_flag = 1U << flag_length; - if ((set_flag & set_flags & InitializeOnceMask) != 0) { - LOG_ERROR(Kernel, - "Attempted to initialize flags that may only be initialized once. set_flags={}", - set_flags); - return ResultInvalidCombination; - } - set_flags |= set_flag; - - switch (type) { - case CapabilityType::PriorityAndCoreNum: - return HandlePriorityCoreNumFlags(flag); - case CapabilityType::Syscall: - return HandleSyscallFlags(set_svc_bits, flag); - case CapabilityType::MapIO: - return HandleMapIOFlags(flag, page_table); - case CapabilityType::MapRegion: - return HandleMapRegionFlags(flag, page_table); - case CapabilityType::Interrupt: - return HandleInterruptFlags(flag); - case CapabilityType::ProgramType: - return HandleProgramTypeFlags(flag); - case CapabilityType::KernelVersion: - return HandleKernelVersionFlags(flag); - case CapabilityType::HandleTableSize: - return HandleHandleTableFlags(flag); - case CapabilityType::Debug: - return HandleDebugFlags(flag); - default: - break; - } - - LOG_ERROR(Kernel, "Invalid capability type! type={}", type); - return ResultInvalidArgument; -} - -void ProcessCapabilities::Clear() { - svc_capabilities.reset(); - interrupt_capabilities.reset(); - - core_mask = 0; - priority_mask = 0; - - handle_table_size = 0; - kernel_version = 0; - - program_type = ProgramType::SysModule; - - is_debuggable = false; - can_force_debug = false; -} - -Result ProcessCapabilities::HandlePriorityCoreNumFlags(u32 flags) { - if (priority_mask != 0 || core_mask != 0) { - LOG_ERROR(Kernel, "Core or priority mask are not zero! priority_mask={}, core_mask={}", - priority_mask, core_mask); - return ResultInvalidArgument; - } - - const u32 core_num_min = (flags >> 16) & 0xFF; - const u32 core_num_max = (flags >> 24) & 0xFF; - if (core_num_min > core_num_max) { - LOG_ERROR(Kernel, "Core min is greater than core max! core_num_min={}, core_num_max={}", - core_num_min, core_num_max); - return ResultInvalidCombination; - } - - const u32 priority_min = (flags >> 10) & 0x3F; - const u32 priority_max = (flags >> 4) & 0x3F; - if (priority_min > priority_max) { - LOG_ERROR(Kernel, - "Priority min is greater than priority max! priority_min={}, priority_max={}", - core_num_min, priority_max); - return ResultInvalidCombination; - } - - // The switch only has 4 usable cores. - if (core_num_max >= 4) { - LOG_ERROR(Kernel, "Invalid max cores specified! core_num_max={}", core_num_max); - return ResultInvalidCoreId; - } - - const auto make_mask = [](u64 min, u64 max) { - const u64 range = max - min + 1; - const u64 mask = (1ULL << range) - 1; - - return mask << min; - }; - - core_mask = make_mask(core_num_min, core_num_max); - priority_mask = make_mask(priority_min, priority_max); - return ResultSuccess; -} - -Result ProcessCapabilities::HandleSyscallFlags(u32& set_svc_bits, u32 flags) { - const u32 index = flags >> 29; - const u32 svc_bit = 1U << index; - - // If we've already set this svc before, bail. - if ((set_svc_bits & svc_bit) != 0) { - return ResultInvalidCombination; - } - set_svc_bits |= svc_bit; - - const u32 svc_mask = (flags >> 5) & 0xFFFFFF; - for (u32 i = 0; i < 24; ++i) { - const u32 svc_number = index * 24 + i; - - if ((svc_mask & (1U << i)) == 0) { - continue; - } - - svc_capabilities[svc_number] = true; - } - - return ResultSuccess; -} - -Result ProcessCapabilities::HandleMapPhysicalFlags(u32 flags, u32 size_flags, - KPageTable& page_table) { - // TODO(Lioncache): Implement once the memory manager can handle this. - return ResultSuccess; -} - -Result ProcessCapabilities::HandleMapIOFlags(u32 flags, KPageTable& page_table) { - // TODO(Lioncache): Implement once the memory manager can handle this. - return ResultSuccess; -} - -Result ProcessCapabilities::HandleMapRegionFlags(u32 flags, KPageTable& page_table) { - // TODO(Lioncache): Implement once the memory manager can handle this. - return ResultSuccess; -} - -Result ProcessCapabilities::HandleInterruptFlags(u32 flags) { - constexpr u32 interrupt_ignore_value = 0x3FF; - const u32 interrupt0 = (flags >> 12) & 0x3FF; - const u32 interrupt1 = (flags >> 22) & 0x3FF; - - for (u32 interrupt : {interrupt0, interrupt1}) { - if (interrupt == interrupt_ignore_value) { - continue; - } - - // NOTE: - // This should be checking a generic interrupt controller value - // as part of the calculation, however, given we don't currently - // emulate that, it's sufficient to mark every interrupt as defined. - - if (interrupt >= interrupt_capabilities.size()) { - LOG_ERROR(Kernel, "Process interrupt capability is out of range! svc_number={}", - interrupt); - return ResultOutOfRange; - } - - interrupt_capabilities[interrupt] = true; - } - - return ResultSuccess; -} - -Result ProcessCapabilities::HandleProgramTypeFlags(u32 flags) { - const u32 reserved = flags >> 17; - if (reserved != 0) { - LOG_ERROR(Kernel, "Reserved value is non-zero! reserved={}", reserved); - return ResultReservedUsed; - } - - program_type = static_cast((flags >> 14) & 0b111); - return ResultSuccess; -} - -Result ProcessCapabilities::HandleKernelVersionFlags(u32 flags) { - // Yes, the internal member variable is checked in the actual kernel here. - // This might look odd for options that are only allowed to be initialized - // just once, however the kernel has a separate initialization function for - // kernel processes and userland processes. The kernel variant sets this - // member variable ahead of time. - - const u32 major_version = kernel_version >> 19; - - if (major_version != 0 || flags < 0x80000) { - LOG_ERROR(Kernel, - "Kernel version is non zero or flags are too small! major_version={}, flags={}", - major_version, flags); - return ResultInvalidArgument; - } - - kernel_version = flags; - return ResultSuccess; -} - -Result ProcessCapabilities::HandleHandleTableFlags(u32 flags) { - const u32 reserved = flags >> 26; - if (reserved != 0) { - LOG_ERROR(Kernel, "Reserved value is non-zero! reserved={}", reserved); - return ResultReservedUsed; - } - - handle_table_size = static_cast((flags >> 16) & 0x3FF); - return ResultSuccess; -} - -Result ProcessCapabilities::HandleDebugFlags(u32 flags) { - const u32 reserved = flags >> 19; - if (reserved != 0) { - LOG_ERROR(Kernel, "Reserved value is non-zero! reserved={}", reserved); - return ResultReservedUsed; - } - - is_debuggable = (flags & 0x20000) != 0; - can_force_debug = (flags & 0x40000) != 0; - return ResultSuccess; -} - -} // namespace Kernel diff --git a/src/core/hle/kernel/process_capability.h b/src/core/hle/kernel/process_capability.h deleted file mode 100644 index ff05dc5ff7..0000000000 --- a/src/core/hle/kernel/process_capability.h +++ /dev/null @@ -1,266 +0,0 @@ -// SPDX-FileCopyrightText: Copyright 2018 yuzu Emulator Project -// SPDX-License-Identifier: GPL-2.0-or-later - -#pragma once - -#include - -#include "common/common_types.h" - -union Result; - -namespace Kernel { - -class KPageTable; - -/// The possible types of programs that may be indicated -/// by the program type capability descriptor. -enum class ProgramType { - SysModule, - Application, - Applet, -}; - -/// Handles kernel capability descriptors that are provided by -/// application metadata. These descriptors provide information -/// that alters certain parameters for kernel process instance -/// that will run said application (or applet). -/// -/// Capabilities are a sequence of flag descriptors, that indicate various -/// configurations and constraints for a particular process. -/// -/// Flag types are indicated by a sequence of set low bits. E.g. the -/// types are indicated with the low bits as follows (where x indicates "don't care"): -/// -/// - Priority and core mask : 0bxxxxxxxxxxxx0111 -/// - Allowed service call mask: 0bxxxxxxxxxxx01111 -/// - Map physical memory : 0bxxxxxxxxx0111111 -/// - Map IO memory : 0bxxxxxxxx01111111 -/// - Interrupts : 0bxxxx011111111111 -/// - Application type : 0bxx01111111111111 -/// - Kernel version : 0bx011111111111111 -/// - Handle table size : 0b0111111111111111 -/// - Debugger flags : 0b1111111111111111 -/// -/// These are essentially a bit offset subtracted by 1 to create a mask. -/// e.g. The first entry in the above list is simply bit 3 (value 8 -> 0b1000) -/// subtracted by one (7 -> 0b0111) -/// -/// An example of a bit layout (using the map physical layout): -/// -/// The MapPhysical type indicates a sequence entry pair of: -/// -/// [initial, memory_flags], where: -/// -/// initial: -/// bits: -/// 7-24: Starting page to map memory at. -/// 25 : Indicates if the memory should be mapped as read only. -/// -/// memory_flags: -/// bits: -/// 7-20 : Number of pages to map -/// 21-25: Seems to be reserved (still checked against though) -/// 26 : Whether or not the memory being mapped is IO memory, or physical memory -/// -/// -class ProcessCapabilities { -public: - using InterruptCapabilities = std::bitset<1024>; - using SyscallCapabilities = std::bitset<192>; - - ProcessCapabilities() = default; - ProcessCapabilities(const ProcessCapabilities&) = delete; - ProcessCapabilities(ProcessCapabilities&&) = default; - - ProcessCapabilities& operator=(const ProcessCapabilities&) = delete; - ProcessCapabilities& operator=(ProcessCapabilities&&) = default; - - /// Initializes this process capabilities instance for a kernel process. - /// - /// @param capabilities The capabilities to parse - /// @param num_capabilities The number of capabilities to parse. - /// @param page_table The memory manager to use for handling any mapping-related - /// operations (such as mapping IO memory, etc). - /// - /// @returns ResultSuccess if this capabilities instance was able to be initialized, - /// otherwise, an error code upon failure. - /// - Result InitializeForKernelProcess(const u32* capabilities, std::size_t num_capabilities, - KPageTable& page_table); - - /// Initializes this process capabilities instance for a userland process. - /// - /// @param capabilities The capabilities to parse. - /// @param num_capabilities The total number of capabilities to parse. - /// @param page_table The memory manager to use for handling any mapping-related - /// operations (such as mapping IO memory, etc). - /// - /// @returns ResultSuccess if this capabilities instance was able to be initialized, - /// otherwise, an error code upon failure. - /// - Result InitializeForUserProcess(const u32* capabilities, std::size_t num_capabilities, - KPageTable& page_table); - - /// Initializes this process capabilities instance for a process that does not - /// have any metadata to parse. - /// - /// This is necessary, as we allow running raw executables, and the internal - /// kernel process capabilities also determine what CPU cores the process is - /// allowed to run on, and what priorities are allowed for threads. It also - /// determines the max handle table size, what the program type is, whether or - /// not the process can be debugged, or whether it's possible for a process to - /// forcibly debug another process. - /// - /// Given the above, this essentially enables all capabilities across the board - /// for the process. It allows the process to: - /// - /// - Run on any core - /// - Use any thread priority - /// - Use the maximum amount of handles a process is allowed to. - /// - Be debuggable - /// - Forcibly debug other processes. - /// - /// Note that this is not a behavior that the kernel allows a process to do via - /// a single function like this. This is yuzu-specific behavior to handle - /// executables with no capability descriptors whatsoever to derive behavior from. - /// It being yuzu-specific is why this is also not the default behavior and not - /// done by default in the constructor. - /// - void InitializeForMetadatalessProcess(); - - /// Gets the allowable core mask - u64 GetCoreMask() const { - return core_mask; - } - - /// Gets the allowable priority mask - u64 GetPriorityMask() const { - return priority_mask; - } - - /// Gets the SVC access permission bits - const SyscallCapabilities& GetServiceCapabilities() const { - return svc_capabilities; - } - - /// Gets the valid interrupt bits. - const InterruptCapabilities& GetInterruptCapabilities() const { - return interrupt_capabilities; - } - - /// Gets the program type for this process. - ProgramType GetProgramType() const { - return program_type; - } - - /// Gets the number of total allowable handles for the process' handle table. - s32 GetHandleTableSize() const { - return handle_table_size; - } - - /// Gets the kernel version value. - u32 GetKernelVersion() const { - return kernel_version; - } - - /// Whether or not this process can be debugged. - bool IsDebuggable() const { - return is_debuggable; - } - - /// Whether or not this process can forcibly debug another - /// process, even if that process is not considered debuggable. - bool CanForceDebug() const { - return can_force_debug; - } - -private: - /// Attempts to parse a given sequence of capability descriptors. - /// - /// @param capabilities The sequence of capability descriptors to parse. - /// @param num_capabilities The number of descriptors within the given sequence. - /// @param page_table The memory manager that will perform any memory - /// mapping if necessary. - /// - /// @return ResultSuccess if no errors occur, otherwise an error code. - /// - Result ParseCapabilities(const u32* capabilities, std::size_t num_capabilities, - KPageTable& page_table); - - /// Attempts to parse a capability descriptor that is only represented by a - /// single flag set. - /// - /// @param set_flags Running set of flags that are used to catch - /// flags being initialized more than once when they shouldn't be. - /// @param set_svc_bits Running set of bits representing the allowed supervisor calls mask. - /// @param flag The flag to attempt to parse. - /// @param page_table The memory manager that will perform any memory - /// mapping if necessary. - /// - /// @return ResultSuccess if no errors occurred, otherwise an error code. - /// - Result ParseSingleFlagCapability(u32& set_flags, u32& set_svc_bits, u32 flag, - KPageTable& page_table); - - /// Clears the internal state of this process capability instance. Necessary, - /// to have a sane starting point due to us allowing running executables without - /// configuration metadata. We assume a process is not going to have metadata, - /// and if it turns out that the process does, in fact, have metadata, then - /// we attempt to parse it. Thus, we need this to reset data members back to - /// a good state. - /// - /// DO NOT ever make this a public member function. This isn't an invariant - /// anything external should depend upon (and if anything comes to rely on it, - /// you should immediately be questioning the design of that thing, not this - /// class. If the kernel itself can run without depending on behavior like that, - /// then so can yuzu). - /// - void Clear(); - - /// Handles flags related to the priority and core number capability flags. - Result HandlePriorityCoreNumFlags(u32 flags); - - /// Handles flags related to determining the allowable SVC mask. - Result HandleSyscallFlags(u32& set_svc_bits, u32 flags); - - /// Handles flags related to mapping physical memory pages. - Result HandleMapPhysicalFlags(u32 flags, u32 size_flags, KPageTable& page_table); - - /// Handles flags related to mapping IO pages. - Result HandleMapIOFlags(u32 flags, KPageTable& page_table); - - /// Handles flags related to mapping physical memory regions. - Result HandleMapRegionFlags(u32 flags, KPageTable& page_table); - - /// Handles flags related to the interrupt capability flags. - Result HandleInterruptFlags(u32 flags); - - /// Handles flags related to the program type. - Result HandleProgramTypeFlags(u32 flags); - - /// Handles flags related to the handle table size. - Result HandleHandleTableFlags(u32 flags); - - /// Handles flags related to the kernel version capability flags. - Result HandleKernelVersionFlags(u32 flags); - - /// Handles flags related to debug-specific capabilities. - Result HandleDebugFlags(u32 flags); - - SyscallCapabilities svc_capabilities; - InterruptCapabilities interrupt_capabilities; - - u64 core_mask = 0; - u64 priority_mask = 0; - - s32 handle_table_size = 0; - u32 kernel_version = 0; - - ProgramType program_type = ProgramType::SysModule; - - bool is_debuggable = false; - bool can_force_debug = false; -}; - -} // namespace Kernel diff --git a/src/core/hle/kernel/svc/svc_memory.cpp b/src/core/hle/kernel/svc/svc_memory.cpp index 97f1210def..4ca62860d5 100644 --- a/src/core/hle/kernel/svc/svc_memory.cpp +++ b/src/core/hle/kernel/svc/svc_memory.cpp @@ -29,7 +29,8 @@ constexpr bool IsValidAddressRange(u64 address, u64 size) { // Helper function that performs the common sanity checks for svcMapMemory // and svcUnmapMemory. This is doable, as both functions perform their sanitizing // in the same order. -Result MapUnmapMemorySanityChecks(const KPageTable& manager, u64 dst_addr, u64 src_addr, u64 size) { +Result MapUnmapMemorySanityChecks(const KProcessPageTable& manager, u64 dst_addr, u64 src_addr, + u64 size) { if (!Common::Is4KBAligned(dst_addr)) { LOG_ERROR(Kernel_SVC, "Destination address is not aligned to 4KB, 0x{:016X}", dst_addr); R_THROW(ResultInvalidAddress); @@ -123,7 +124,8 @@ Result SetMemoryAttribute(Core::System& system, u64 address, u64 size, u32 mask, R_UNLESS(page_table.Contains(address, size), ResultInvalidCurrentMemory); // Set the memory attribute. - R_RETURN(page_table.SetMemoryAttribute(address, size, mask, attr)); + R_RETURN(page_table.SetMemoryAttribute(address, size, static_cast(mask), + static_cast(attr))); } /// Maps a memory range into a different range. diff --git a/src/core/hle/kernel/svc/svc_physical_memory.cpp b/src/core/hle/kernel/svc/svc_physical_memory.cpp index 99330d02a9..793e9f8d01 100644 --- a/src/core/hle/kernel/svc/svc_physical_memory.cpp +++ b/src/core/hle/kernel/svc/svc_physical_memory.cpp @@ -16,7 +16,14 @@ Result SetHeapSize(Core::System& system, u64* out_address, u64 size) { R_UNLESS(size < MainMemorySizeMax, ResultInvalidSize); // Set the heap size. - R_RETURN(GetCurrentProcess(system.Kernel()).GetPageTable().SetHeapSize(out_address, size)); + KProcessAddress address{}; + R_TRY(GetCurrentProcess(system.Kernel()) + .GetPageTable() + .SetHeapSize(std::addressof(address), size)); + + // We succeeded. + *out_address = GetInteger(address); + R_SUCCEED(); } /// Maps memory at a desired address diff --git a/src/core/hle/kernel/svc/svc_process_memory.cpp b/src/core/hle/kernel/svc/svc_process_memory.cpp index 07cd481755..e1427947b0 100644 --- a/src/core/hle/kernel/svc/svc_process_memory.cpp +++ b/src/core/hle/kernel/svc/svc_process_memory.cpp @@ -247,8 +247,7 @@ Result UnmapProcessCodeMemory(Core::System& system, Handle process_handle, u64 d R_THROW(ResultInvalidCurrentMemory); } - R_RETURN(page_table.UnmapCodeMemory(dst_address, src_address, size, - KPageTable::ICacheInvalidationStrategy::InvalidateAll)); + R_RETURN(page_table.UnmapCodeMemory(dst_address, src_address, size)); } Result SetProcessMemoryPermission64(Core::System& system, Handle process_handle, uint64_t address, diff --git a/src/core/hle/kernel/svc/svc_query_memory.cpp b/src/core/hle/kernel/svc/svc_query_memory.cpp index 51af06e97d..816dcb8d0f 100644 --- a/src/core/hle/kernel/svc/svc_query_memory.cpp +++ b/src/core/hle/kernel/svc/svc_query_memory.cpp @@ -31,12 +31,12 @@ Result QueryProcessMemory(Core::System& system, uint64_t out_memory_info, PageIn } auto& current_memory{GetCurrentMemory(system.Kernel())}; - const auto memory_info{process->GetPageTable().QueryInfo(address).GetSvcMemoryInfo()}; - current_memory.WriteBlock(out_memory_info, std::addressof(memory_info), sizeof(memory_info)); + KMemoryInfo mem_info; + R_TRY(process->GetPageTable().QueryInfo(std::addressof(mem_info), out_page_info, address)); - //! This is supposed to be part of the QueryInfo call. - *out_page_info = {}; + const auto svc_mem_info = mem_info.GetSvcMemoryInfo(); + current_memory.WriteBlock(out_memory_info, std::addressof(svc_mem_info), sizeof(svc_mem_info)); R_SUCCEED(); } diff --git a/src/core/hle/result.h b/src/core/hle/result.h index dd0b27f479..749f51f696 100644 --- a/src/core/hle/result.h +++ b/src/core/hle/result.h @@ -407,3 +407,34 @@ constexpr inline Result __TmpCurrentResultReference = ResultSuccess; /// Evaluates a boolean expression, and succeeds if that expression is true. #define R_SUCCEED_IF(expr) R_UNLESS(!(expr), ResultSuccess) + +#define R_TRY_CATCH(res_expr) \ + { \ + const auto R_CURRENT_RESULT = (res_expr); \ + if (R_FAILED(R_CURRENT_RESULT)) { \ + if (false) + +#define R_END_TRY_CATCH \ + else if (R_FAILED(R_CURRENT_RESULT)) { \ + R_THROW(R_CURRENT_RESULT); \ + } \ + } \ + } + +#define R_CATCH_ALL() \ + } \ + else if (R_FAILED(R_CURRENT_RESULT)) { \ + if (true) + +#define R_CATCH(res_expr) \ + } \ + else if ((res_expr) == (R_CURRENT_RESULT)) { \ + if (true) + +#define R_CONVERT(catch_type, convert_type) \ + R_CATCH(catch_type) { R_THROW(static_cast(convert_type)); } + +#define R_CONVERT_ALL(convert_type) \ + R_CATCH_ALL() { R_THROW(static_cast(convert_type)); } + +#define R_ASSERT(res_expr) ASSERT(R_SUCCEEDED(res_expr)) diff --git a/src/core/hle/service/ldr/ldr.cpp b/src/core/hle/service/ldr/ldr.cpp index c73035c77a..97b6a9385d 100644 --- a/src/core/hle/service/ldr/ldr.cpp +++ b/src/core/hle/service/ldr/ldr.cpp @@ -286,9 +286,14 @@ public: rb.Push(ResultSuccess); } - bool ValidateRegionForMap(Kernel::KPageTable& page_table, VAddr start, std::size_t size) const { + bool ValidateRegionForMap(Kernel::KProcessPageTable& page_table, VAddr start, + std::size_t size) const { const std::size_t padding_size{page_table.GetNumGuardPages() * Kernel::PageSize}; - const auto start_info{page_table.QueryInfo(start - 1)}; + + Kernel::KMemoryInfo start_info; + Kernel::Svc::PageInfo page_info; + R_ASSERT( + page_table.QueryInfo(std::addressof(start_info), std::addressof(page_info), start - 1)); if (start_info.GetState() != Kernel::KMemoryState::Free) { return {}; @@ -298,7 +303,9 @@ public: return {}; } - const auto end_info{page_table.QueryInfo(start + size)}; + Kernel::KMemoryInfo end_info; + R_ASSERT(page_table.QueryInfo(std::addressof(end_info), std::addressof(page_info), + start + size)); if (end_info.GetState() != Kernel::KMemoryState::Free) { return {}; @@ -307,7 +314,7 @@ public: return (start + size + padding_size) <= (end_info.GetAddress() + end_info.GetSize()); } - Result GetAvailableMapRegion(Kernel::KPageTable& page_table, u64 size, VAddr& out_addr) { + Result GetAvailableMapRegion(Kernel::KProcessPageTable& page_table, u64 size, VAddr& out_addr) { size = Common::AlignUp(size, Kernel::PageSize); size += page_table.GetNumGuardPages() * Kernel::PageSize * 4; @@ -391,12 +398,8 @@ public: if (bss_size) { auto block_guard = detail::ScopeExit([&] { - page_table.UnmapCodeMemory( - addr + nro_size, bss_addr, bss_size, - Kernel::KPageTable::ICacheInvalidationStrategy::InvalidateRange); - page_table.UnmapCodeMemory( - addr, nro_addr, nro_size, - Kernel::KPageTable::ICacheInvalidationStrategy::InvalidateRange); + page_table.UnmapCodeMemory(addr + nro_size, bss_addr, bss_size); + page_table.UnmapCodeMemory(addr, nro_addr, nro_size); }); const Result result{page_table.MapCodeMemory(addr + nro_size, bss_addr, bss_size)}; @@ -578,21 +581,17 @@ public: auto& page_table{system.ApplicationProcess()->GetPageTable()}; if (info.bss_size != 0) { - R_TRY(page_table.UnmapCodeMemory( - info.nro_address + info.text_size + info.ro_size + info.data_size, info.bss_address, - info.bss_size, Kernel::KPageTable::ICacheInvalidationStrategy::InvalidateRange)); + R_TRY(page_table.UnmapCodeMemory(info.nro_address + info.text_size + info.ro_size + + info.data_size, + info.bss_address, info.bss_size)); } - R_TRY(page_table.UnmapCodeMemory( - info.nro_address + info.text_size + info.ro_size, - info.src_addr + info.text_size + info.ro_size, info.data_size, - Kernel::KPageTable::ICacheInvalidationStrategy::InvalidateRange)); - R_TRY(page_table.UnmapCodeMemory( - info.nro_address + info.text_size, info.src_addr + info.text_size, info.ro_size, - Kernel::KPageTable::ICacheInvalidationStrategy::InvalidateRange)); - R_TRY(page_table.UnmapCodeMemory( - info.nro_address, info.src_addr, info.text_size, - Kernel::KPageTable::ICacheInvalidationStrategy::InvalidateRange)); + R_TRY(page_table.UnmapCodeMemory(info.nro_address + info.text_size + info.ro_size, + info.src_addr + info.text_size + info.ro_size, + info.data_size)); + R_TRY(page_table.UnmapCodeMemory(info.nro_address + info.text_size, + info.src_addr + info.text_size, info.ro_size)); + R_TRY(page_table.UnmapCodeMemory(info.nro_address, info.src_addr, info.text_size)); return ResultSuccess; } diff --git a/src/core/memory.cpp b/src/core/memory.cpp index fa52734025..84b60a928b 100644 --- a/src/core/memory.cpp +++ b/src/core/memory.cpp @@ -41,7 +41,7 @@ struct Memory::Impl { explicit Impl(Core::System& system_) : system{system_} {} void SetCurrentPageTable(Kernel::KProcess& process, u32 core_id) { - current_page_table = &process.GetPageTable().PageTableImpl(); + current_page_table = &process.GetPageTable().GetImpl(); current_page_table->fastmem_arena = system.DeviceMemory().buffer.VirtualBasePointer(); const std::size_t address_space_width = process.GetPageTable().GetAddressSpaceWidth(); @@ -195,7 +195,7 @@ struct Memory::Impl { bool WalkBlock(const Common::ProcessAddress addr, const std::size_t size, auto on_unmapped, auto on_memory, auto on_rasterizer, auto increment) { - const auto& page_table = system.ApplicationProcess()->GetPageTable().PageTableImpl(); + const auto& page_table = system.ApplicationProcess()->GetPageTable().GetImpl(); std::size_t remaining_size = size; std::size_t page_index = addr >> YUZU_PAGEBITS; std::size_t page_offset = addr & YUZU_PAGEMASK; @@ -826,7 +826,7 @@ void Memory::UnmapRegion(Common::PageTable& page_table, Common::ProcessAddress b bool Memory::IsValidVirtualAddress(const Common::ProcessAddress vaddr) const { const Kernel::KProcess& process = *system.ApplicationProcess(); - const auto& page_table = process.GetPageTable().PageTableImpl(); + const auto& page_table = process.GetPageTable().GetImpl(); const size_t page = vaddr >> YUZU_PAGEBITS; if (page >= page_table.pointers.size()) { return false; From b16fefa106d0dcafb5d7520debe7d1d6438c3ced Mon Sep 17 00:00:00 2001 From: Liam Date: Tue, 7 Nov 2023 20:42:22 -0500 Subject: [PATCH 081/154] k_page_table: use more precise icache invalidates --- src/core/hle/kernel/k_page_table_base.cpp | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/src/core/hle/kernel/k_page_table_base.cpp b/src/core/hle/kernel/k_page_table_base.cpp index 1cc019c066..c97b4a6b70 100644 --- a/src/core/hle/kernel/k_page_table_base.cpp +++ b/src/core/hle/kernel/k_page_table_base.cpp @@ -72,6 +72,11 @@ void InvalidateEntireInstructionCache(Core::System& system) { system.InvalidateCpuInstructionCaches(); } +template +void InvalidateInstructionCache(Core::System& system, AddressType addr, u64 size) { + system.InvalidateCpuInstructionCacheRange(GetInteger(addr), size); +} + template Result InvalidateDataCache(AddressType addr, u64 size) { R_SUCCEED(); @@ -1245,7 +1250,7 @@ Result KPageTableBase::UnmapCodeMemory(KProcessAddress dst_address, KProcessAddr bool reprotected_pages = false; SCOPE_EXIT({ if (reprotected_pages && any_code_pages) { - InvalidateEntireInstructionCache(m_system); + InvalidateInstructionCache(m_system, dst_address, size); } }); @@ -1981,7 +1986,7 @@ Result KPageTableBase::SetProcessMemoryPermission(KProcessAddress addr, size_t s for (const auto& block : pg) { StoreDataCache(GetHeapVirtualPointer(m_kernel, block.GetAddress()), block.GetSize()); } - InvalidateEntireInstructionCache(m_system); + InvalidateInstructionCache(m_system, addr, size); } R_SUCCEED(); @@ -3222,8 +3227,8 @@ Result KPageTableBase::WriteDebugMemory(KProcessAddress dst_address, KProcessAdd // Perform copy for the last block. R_TRY(PerformCopy()); - // Invalidate the entire instruction cache, as this svc allows modifying executable pages. - InvalidateEntireInstructionCache(m_system); + // Invalidate the instruction cache, as this svc allows modifying executable pages. + InvalidateInstructionCache(m_system, dst_address, size); R_SUCCEED(); } From 875246f5b29d1a14e6c08a1631a2acc8c8eb3a19 Mon Sep 17 00:00:00 2001 From: Liam Date: Fri, 10 Nov 2023 12:01:32 -0500 Subject: [PATCH 082/154] k_page_table: fix shutdown --- src/core/hle/kernel/k_page_table_base.cpp | 7 ------- 1 file changed, 7 deletions(-) diff --git a/src/core/hle/kernel/k_page_table_base.cpp b/src/core/hle/kernel/k_page_table_base.cpp index c97b4a6b70..6a57ad55c3 100644 --- a/src/core/hle/kernel/k_page_table_base.cpp +++ b/src/core/hle/kernel/k_page_table_base.cpp @@ -68,10 +68,6 @@ public: } }; -void InvalidateEntireInstructionCache(Core::System& system) { - system.InvalidateCpuInstructionCaches(); -} - template void InvalidateInstructionCache(Core::System& system, AddressType addr, u64 size) { system.InvalidateCpuInstructionCacheRange(GetInteger(addr), size); @@ -435,9 +431,6 @@ void KPageTableBase::Finalize() { m_mapped_ipc_server_memory); } - // Invalidate the entire instruction cache. - InvalidateEntireInstructionCache(m_system); - // Close the backing page table, as the destructor is not called for guest objects. m_impl.reset(); } From e588f341edfa208743e1202382ddf0929bff13be Mon Sep 17 00:00:00 2001 From: Narr the Reg Date: Tue, 7 Nov 2023 11:02:13 -0600 Subject: [PATCH 083/154] service: irs: Implement moment image processor --- src/core/hle/service/hid/irs.cpp | 2 +- .../hid/irsensor/clustering_processor.cpp | 16 ++- .../hid/irsensor/clustering_processor.h | 9 +- .../hid/irsensor/image_transfer_processor.cpp | 2 +- .../service/hid/irsensor/moment_processor.cpp | 123 +++++++++++++++++- .../service/hid/irsensor/moment_processor.h | 34 ++++- 6 files changed, 169 insertions(+), 17 deletions(-) diff --git a/src/core/hle/service/hid/irs.cpp b/src/core/hle/service/hid/irs.cpp index 221c33b860..d383a266d9 100644 --- a/src/core/hle/service/hid/irs.cpp +++ b/src/core/hle/service/hid/irs.cpp @@ -138,7 +138,7 @@ void IRS::RunMomentProcessor(HLERequestContext& ctx) { if (result.IsSuccess()) { auto& device = GetIrCameraSharedMemoryDeviceEntry(parameters.camera_handle); - MakeProcessor(parameters.camera_handle, device); + MakeProcessorWithCoreContext(parameters.camera_handle, device); auto& image_transfer_processor = GetProcessor(parameters.camera_handle); image_transfer_processor.SetConfig(parameters.processor_config); npad_device->SetPollingMode(Core::HID::EmulatedDeviceIndex::RightIndex, diff --git a/src/core/hle/service/hid/irsensor/clustering_processor.cpp b/src/core/hle/service/hid/irsensor/clustering_processor.cpp index e2f4ae876c..c559eb0d5f 100644 --- a/src/core/hle/service/hid/irsensor/clustering_processor.cpp +++ b/src/core/hle/service/hid/irsensor/clustering_processor.cpp @@ -3,16 +3,18 @@ #include +#include "core/core.h" +#include "core/core_timing.h" #include "core/hid/emulated_controller.h" #include "core/hid/hid_core.h" #include "core/hle/service/hid/irsensor/clustering_processor.h" namespace Service::IRS { -ClusteringProcessor::ClusteringProcessor(Core::HID::HIDCore& hid_core_, +ClusteringProcessor::ClusteringProcessor(Core::System& system_, Core::IrSensor::DeviceFormat& device_format, std::size_t npad_index) - : device{device_format} { - npad_device = hid_core_.GetEmulatedControllerByIndex(npad_index); + : device{device_format}, system{system_} { + npad_device = system.HIDCore().GetEmulatedControllerByIndex(npad_index); device.mode = Core::IrSensor::IrSensorMode::ClusteringProcessor; device.camera_status = Core::IrSensor::IrCameraStatus::Unconnected; @@ -48,7 +50,7 @@ void ClusteringProcessor::OnControllerUpdate(Core::HID::ControllerTriggerType ty } next_state = {}; - const auto camera_data = npad_device->GetCamera(); + const auto& camera_data = npad_device->GetCamera(); auto filtered_image = camera_data.data; RemoveLowIntensityData(filtered_image); @@ -83,7 +85,7 @@ void ClusteringProcessor::OnControllerUpdate(Core::HID::ControllerTriggerType ty } next_state.sampling_number = camera_data.sample; - next_state.timestamp = next_state.timestamp + 131; + next_state.timestamp = system.CoreTiming().GetGlobalTimeNs().count(); next_state.ambient_noise_level = Core::IrSensor::CameraAmbientNoiseLevel::Low; shared_memory->clustering_lifo.WriteNextEntry(next_state); @@ -202,14 +204,14 @@ ClusteringProcessor::ClusteringData ClusteringProcessor::MergeCluster( } u8 ClusteringProcessor::GetPixel(const std::vector& data, std::size_t x, std::size_t y) const { - if ((y * width) + x > data.size()) { + if ((y * width) + x >= data.size()) { return 0; } return data[(y * width) + x]; } void ClusteringProcessor::SetPixel(std::vector& data, std::size_t x, std::size_t y, u8 value) { - if ((y * width) + x > data.size()) { + if ((y * width) + x >= data.size()) { return; } data[(y * width) + x] = value; diff --git a/src/core/hle/service/hid/irsensor/clustering_processor.h b/src/core/hle/service/hid/irsensor/clustering_processor.h index dc01a8ea78..83f34734a7 100644 --- a/src/core/hle/service/hid/irsensor/clustering_processor.h +++ b/src/core/hle/service/hid/irsensor/clustering_processor.h @@ -8,6 +8,10 @@ #include "core/hle/service/hid/irs_ring_lifo.h" #include "core/hle/service/hid/irsensor/processor_base.h" +namespace Core { +class System; +} + namespace Core::HID { class EmulatedController; } // namespace Core::HID @@ -15,8 +19,7 @@ class EmulatedController; namespace Service::IRS { class ClusteringProcessor final : public ProcessorBase { public: - explicit ClusteringProcessor(Core::HID::HIDCore& hid_core_, - Core::IrSensor::DeviceFormat& device_format, + explicit ClusteringProcessor(Core::System& system_, Core::IrSensor::DeviceFormat& device_format, std::size_t npad_index); ~ClusteringProcessor() override; @@ -106,5 +109,7 @@ private: Core::IrSensor::DeviceFormat& device; Core::HID::EmulatedController* npad_device; int callback_key{}; + + Core::System& system; }; } // namespace Service::IRS diff --git a/src/core/hle/service/hid/irsensor/image_transfer_processor.cpp b/src/core/hle/service/hid/irsensor/image_transfer_processor.cpp index 803a6277c1..22067a591e 100644 --- a/src/core/hle/service/hid/irsensor/image_transfer_processor.cpp +++ b/src/core/hle/service/hid/irsensor/image_transfer_processor.cpp @@ -49,7 +49,7 @@ void ImageTransferProcessor::OnControllerUpdate(Core::HID::ControllerTriggerType return; } - const auto camera_data = npad_device->GetCamera(); + const auto& camera_data = npad_device->GetCamera(); // This indicates how much ambient light is present processor_state.ambient_noise_level = Core::IrSensor::CameraAmbientNoiseLevel::Low; diff --git a/src/core/hle/service/hid/irsensor/moment_processor.cpp b/src/core/hle/service/hid/irsensor/moment_processor.cpp index dbaca420ad..cf045bda7c 100644 --- a/src/core/hle/service/hid/irsensor/moment_processor.cpp +++ b/src/core/hle/service/hid/irsensor/moment_processor.cpp @@ -1,24 +1,137 @@ // SPDX-FileCopyrightText: Copyright 2022 yuzu Emulator Project // SPDX-License-Identifier: GPL-3.0-or-later +#include "core/core.h" +#include "core/core_timing.h" +#include "core/hid/emulated_controller.h" +#include "core/hid/hid_core.h" #include "core/hle/service/hid/irsensor/moment_processor.h" namespace Service::IRS { -MomentProcessor::MomentProcessor(Core::IrSensor::DeviceFormat& device_format) - : device(device_format) { +static constexpr auto format = Core::IrSensor::ImageTransferProcessorFormat::Size40x30; +static constexpr std::size_t ImageWidth = 40; +static constexpr std::size_t ImageHeight = 30; + +MomentProcessor::MomentProcessor(Core::System& system_, Core::IrSensor::DeviceFormat& device_format, + std::size_t npad_index) + : device(device_format), system{system_} { + npad_device = system.HIDCore().GetEmulatedControllerByIndex(npad_index); + device.mode = Core::IrSensor::IrSensorMode::MomentProcessor; device.camera_status = Core::IrSensor::IrCameraStatus::Unconnected; device.camera_internal_status = Core::IrSensor::IrCameraInternalStatus::Stopped; + + shared_memory = std::construct_at( + reinterpret_cast(&device_format.state.processor_raw_data)); + + Core::HID::ControllerUpdateCallback engine_callback{ + .on_change = [this](Core::HID::ControllerTriggerType type) { OnControllerUpdate(type); }, + .is_npad_service = true, + }; + callback_key = npad_device->SetCallback(engine_callback); } -MomentProcessor::~MomentProcessor() = default; +MomentProcessor::~MomentProcessor() { + npad_device->DeleteCallback(callback_key); +}; -void MomentProcessor::StartProcessor() {} +void MomentProcessor::StartProcessor() { + device.camera_status = Core::IrSensor::IrCameraStatus::Available; + device.camera_internal_status = Core::IrSensor::IrCameraInternalStatus::Ready; +} void MomentProcessor::SuspendProcessor() {} void MomentProcessor::StopProcessor() {} +void MomentProcessor::OnControllerUpdate(Core::HID::ControllerTriggerType type) { + if (type != Core::HID::ControllerTriggerType::IrSensor) { + return; + } + + next_state = {}; + const auto& camera_data = npad_device->GetCamera(); + + const auto window_width = static_cast(current_config.window_of_interest.width); + const auto window_height = static_cast(current_config.window_of_interest.height); + const auto window_start_x = static_cast(current_config.window_of_interest.x); + const auto window_start_y = static_cast(current_config.window_of_interest.y); + + const std::size_t block_width = window_width / Columns; + const std::size_t block_height = window_height / Rows; + + for (std::size_t row = 0; row < Rows; row++) { + for (std::size_t column = 0; column < Columns; column++) { + const size_t x_pos = (column * block_width) + window_start_x; + const size_t y_pos = (row * block_height) + window_start_y; + auto& statistic = next_state.statistic[column + (row * Columns)]; + statistic = GetStatistic(camera_data.data, x_pos, y_pos, block_width, block_height); + } + } + + next_state.sampling_number = camera_data.sample; + next_state.timestamp = system.CoreTiming().GetGlobalTimeNs().count(); + next_state.ambient_noise_level = Core::IrSensor::CameraAmbientNoiseLevel::Low; + shared_memory->moment_lifo.WriteNextEntry(next_state); + + if (!IsProcessorActive()) { + StartProcessor(); + } +} + +u8 MomentProcessor::GetPixel(const std::vector& data, std::size_t x, std::size_t y) const { + if ((y * ImageWidth) + x >= data.size()) { + return 0; + } + return data[(y * ImageWidth) + x]; +} + +MomentProcessor::MomentStatistic MomentProcessor::GetStatistic(const std::vector& data, + std::size_t start_x, + std::size_t start_y, + std::size_t width, + std::size_t height) const { + // The actual implementation is always 320x240 + static constexpr std::size_t RealWidth = 320; + static constexpr std::size_t RealHeight = 240; + static constexpr std::size_t Threshold = 30; + MomentStatistic statistic{}; + std::size_t active_points{}; + + // Sum all data points on the block that meet with the threshold + for (std::size_t y = 0; y < width; y++) { + for (std::size_t x = 0; x < height; x++) { + const size_t x_pos = x + start_x; + const size_t y_pos = y + start_y; + const auto pixel = + GetPixel(data, x_pos * ImageWidth / RealWidth, y_pos * ImageHeight / RealHeight); + + if (pixel < Threshold) { + continue; + } + + statistic.average_intensity += pixel; + + statistic.centroid.x += static_cast(x_pos); + statistic.centroid.y += static_cast(y_pos); + + active_points++; + } + } + + // Return an empty field if no points were available + if (active_points == 0) { + return {}; + } + + // Finally calculate the actual centroid and average intensity + statistic.centroid.x /= static_cast(active_points); + statistic.centroid.y /= static_cast(active_points); + statistic.average_intensity /= static_cast(width * height); + + return statistic; +} + void MomentProcessor::SetConfig(Core::IrSensor::PackedMomentProcessorConfig config) { current_config.camera_config.exposure_time = config.camera_config.exposure_time; current_config.camera_config.gain = config.camera_config.gain; @@ -29,6 +142,8 @@ void MomentProcessor::SetConfig(Core::IrSensor::PackedMomentProcessorConfig conf current_config.preprocess = static_cast(config.preprocess); current_config.preprocess_intensity_threshold = config.preprocess_intensity_threshold; + + npad_device->SetCameraFormat(format); } } // namespace Service::IRS diff --git a/src/core/hle/service/hid/irsensor/moment_processor.h b/src/core/hle/service/hid/irsensor/moment_processor.h index d4bd22e0f2..398cfbdc10 100644 --- a/src/core/hle/service/hid/irsensor/moment_processor.h +++ b/src/core/hle/service/hid/irsensor/moment_processor.h @@ -6,12 +6,22 @@ #include "common/bit_field.h" #include "common/common_types.h" #include "core/hid/irs_types.h" +#include "core/hle/service/hid/irs_ring_lifo.h" #include "core/hle/service/hid/irsensor/processor_base.h" +namespace Core { +class System; +} + +namespace Core::HID { +class EmulatedController; +} // namespace Core::HID + namespace Service::IRS { class MomentProcessor final : public ProcessorBase { public: - explicit MomentProcessor(Core::IrSensor::DeviceFormat& device_format); + explicit MomentProcessor(Core::System& system_, Core::IrSensor::DeviceFormat& device_format, + std::size_t npad_index); ~MomentProcessor() override; // Called when the processor is initialized @@ -27,6 +37,9 @@ public: void SetConfig(Core::IrSensor::PackedMomentProcessorConfig config); private: + static constexpr std::size_t Columns = 8; + static constexpr std::size_t Rows = 6; + // This is nn::irsensor::MomentProcessorConfig struct MomentProcessorConfig { Core::IrSensor::CameraConfig camera_config; @@ -50,12 +63,29 @@ private: u64 timestamp; Core::IrSensor::CameraAmbientNoiseLevel ambient_noise_level; INSERT_PADDING_BYTES(4); - std::array stadistic; + std::array statistic; }; static_assert(sizeof(MomentProcessorState) == 0x258, "MomentProcessorState is an invalid size"); + struct MomentSharedMemory { + Service::IRS::Lifo moment_lifo; + }; + static_assert(sizeof(MomentSharedMemory) == 0xE20, "MomentSharedMemory is an invalid size"); + + void OnControllerUpdate(Core::HID::ControllerTriggerType type); + u8 GetPixel(const std::vector& data, std::size_t x, std::size_t y) const; + MomentStatistic GetStatistic(const std::vector& data, std::size_t start_x, + std::size_t start_y, std::size_t width, std::size_t height) const; + + MomentSharedMemory* shared_memory = nullptr; + MomentProcessorState next_state{}; + MomentProcessorConfig current_config{}; Core::IrSensor::DeviceFormat& device; + Core::HID::EmulatedController* npad_device; + int callback_key{}; + + Core::System& system; }; } // namespace Service::IRS From 3b872b89d18b31ed24830e91f323eeae324af166 Mon Sep 17 00:00:00 2001 From: Liam Date: Sat, 11 Nov 2023 10:41:06 -0500 Subject: [PATCH 084/154] gdbstub: read module information from memory layout --- src/core/debugger/gdbstub.cpp | 165 ++++++++++++++++++++++++---------- 1 file changed, 118 insertions(+), 47 deletions(-) diff --git a/src/core/debugger/gdbstub.cpp b/src/core/debugger/gdbstub.cpp index e9bf578951..148dd3e397 100644 --- a/src/core/debugger/gdbstub.cpp +++ b/src/core/debugger/gdbstub.cpp @@ -562,6 +562,120 @@ static std::string PaginateBuffer(std::string_view buffer, std::string_view requ } } +static VAddr GetModuleEnd(Kernel::KProcessPageTable& page_table, VAddr base) { + Kernel::KMemoryInfo mem_info; + Kernel::Svc::MemoryInfo svc_mem_info; + Kernel::Svc::PageInfo page_info; + VAddr cur_addr{base}; + + // Expect: r-x Code (.text) + R_ASSERT(page_table.QueryInfo(std::addressof(mem_info), std::addressof(page_info), cur_addr)); + svc_mem_info = mem_info.GetSvcMemoryInfo(); + cur_addr = svc_mem_info.base_address + svc_mem_info.size; + if (svc_mem_info.state != Kernel::Svc::MemoryState::Code || + svc_mem_info.permission != Kernel::Svc::MemoryPermission::ReadExecute) { + return cur_addr - 1; + } + + // Expect: r-- Code (.rodata) + R_ASSERT(page_table.QueryInfo(std::addressof(mem_info), std::addressof(page_info), cur_addr)); + svc_mem_info = mem_info.GetSvcMemoryInfo(); + cur_addr = svc_mem_info.base_address + svc_mem_info.size; + if (svc_mem_info.state != Kernel::Svc::MemoryState::Code || + svc_mem_info.permission != Kernel::Svc::MemoryPermission::Read) { + return cur_addr - 1; + } + + // Expect: rw- CodeData (.data) + R_ASSERT(page_table.QueryInfo(std::addressof(mem_info), std::addressof(page_info), cur_addr)); + svc_mem_info = mem_info.GetSvcMemoryInfo(); + cur_addr = svc_mem_info.base_address + svc_mem_info.size; + return cur_addr - 1; +} + +static Loader::AppLoader::Modules FindModules(Core::System& system) { + Loader::AppLoader::Modules modules; + + auto& page_table = system.ApplicationProcess()->GetPageTable(); + auto& memory = system.ApplicationMemory(); + VAddr cur_addr = 0; + + // Look for executable sections in Code or AliasCode regions. + while (true) { + Kernel::KMemoryInfo mem_info{}; + Kernel::Svc::PageInfo page_info{}; + R_ASSERT( + page_table.QueryInfo(std::addressof(mem_info), std::addressof(page_info), cur_addr)); + auto svc_mem_info = mem_info.GetSvcMemoryInfo(); + + if (svc_mem_info.permission == Kernel::Svc::MemoryPermission::ReadExecute && + (svc_mem_info.state == Kernel::Svc::MemoryState::Code || + svc_mem_info.state == Kernel::Svc::MemoryState::AliasCode)) { + // Try to read the module name from its path. + constexpr s32 PathLengthMax = 0x200; + struct { + u32 zero; + s32 path_length; + std::array path; + } module_path; + + if (memory.ReadBlock(svc_mem_info.base_address + svc_mem_info.size, &module_path, + sizeof(module_path))) { + if (module_path.zero == 0 && module_path.path_length > 0) { + // Truncate module name. + module_path.path[PathLengthMax - 1] = '\0'; + + // Ignore leading directories. + char* path_pointer = module_path.path.data(); + + for (s32 i = 0; i < std::min(PathLengthMax, module_path.path_length) && + module_path.path[i] != '\0'; + i++) { + if (module_path.path[i] == '/' || module_path.path[i] == '\\') { + path_pointer = module_path.path.data() + i + 1; + } + } + + // Insert output. + modules.emplace(svc_mem_info.base_address, path_pointer); + } + } + } + + // Check if we're done. + const uintptr_t next_address = svc_mem_info.base_address + svc_mem_info.size; + if (next_address <= cur_addr) { + break; + } + + cur_addr = next_address; + } + + return modules; +} + +static VAddr FindMainModuleEntrypoint(Core::System& system) { + Loader::AppLoader::Modules modules; + system.GetAppLoader().ReadNSOModules(modules); + + // Do we have a module named main? + const auto main = std::find_if(modules.begin(), modules.end(), + [](const auto& key) { return key.second == "main"; }); + + if (main != modules.end()) { + return main->first; + } + + // Do we have any loaded executable sections? + modules = FindModules(system); + if (!modules.empty()) { + return modules.begin()->first; + } + + // As a last resort, use the start of the code region. + return GetInteger(system.ApplicationProcess()->GetPageTable().GetCodeRegionStart()); +} + void GDBStub::HandleQuery(std::string_view command) { if (command.starts_with("TStatus")) { // no tracepoint support @@ -573,21 +687,10 @@ void GDBStub::HandleQuery(std::string_view command) { const auto target_xml{arch->GetTargetXML()}; SendReply(PaginateBuffer(target_xml, command.substr(30))); } else if (command.starts_with("Offsets")) { - Loader::AppLoader::Modules modules; - system.GetAppLoader().ReadNSOModules(modules); - - const auto main = std::find_if(modules.begin(), modules.end(), - [](const auto& key) { return key.second == "main"; }); - if (main != modules.end()) { - SendReply(fmt::format("TextSeg={:x}", main->first)); - } else { - SendReply(fmt::format( - "TextSeg={:x}", - GetInteger(system.ApplicationProcess()->GetPageTable().GetCodeRegionStart()))); - } + const auto main_offset = FindMainModuleEntrypoint(system); + SendReply(fmt::format("TextSeg={:x}", main_offset)); } else if (command.starts_with("Xfer:libraries:read::")) { - Loader::AppLoader::Modules modules; - system.GetAppLoader().ReadNSOModules(modules); + auto modules = FindModules(system); std::string buffer; buffer += R"()"; @@ -727,37 +830,6 @@ static constexpr const char* GetMemoryPermissionString(const Kernel::Svc::Memory } } -static VAddr GetModuleEnd(Kernel::KProcessPageTable& page_table, VAddr base) { - Kernel::KMemoryInfo mem_info; - Kernel::Svc::MemoryInfo svc_mem_info; - Kernel::Svc::PageInfo page_info; - VAddr cur_addr{base}; - - // Expect: r-x Code (.text) - R_ASSERT(page_table.QueryInfo(std::addressof(mem_info), std::addressof(page_info), cur_addr)); - svc_mem_info = mem_info.GetSvcMemoryInfo(); - cur_addr = svc_mem_info.base_address + svc_mem_info.size; - if (svc_mem_info.state != Kernel::Svc::MemoryState::Code || - svc_mem_info.permission != Kernel::Svc::MemoryPermission::ReadExecute) { - return cur_addr - 1; - } - - // Expect: r-- Code (.rodata) - R_ASSERT(page_table.QueryInfo(std::addressof(mem_info), std::addressof(page_info), cur_addr)); - svc_mem_info = mem_info.GetSvcMemoryInfo(); - cur_addr = svc_mem_info.base_address + svc_mem_info.size; - if (svc_mem_info.state != Kernel::Svc::MemoryState::Code || - svc_mem_info.permission != Kernel::Svc::MemoryPermission::Read) { - return cur_addr - 1; - } - - // Expect: rw- CodeData (.data) - R_ASSERT(page_table.QueryInfo(std::addressof(mem_info), std::addressof(page_info), cur_addr)); - svc_mem_info = mem_info.GetSvcMemoryInfo(); - cur_addr = svc_mem_info.base_address + svc_mem_info.size; - return cur_addr - 1; -} - void GDBStub::HandleRcmd(const std::vector& command) { std::string_view command_str{reinterpret_cast(&command[0]), command.size()}; std::string reply; @@ -784,8 +856,7 @@ void GDBStub::HandleRcmd(const std::vector& command) { reply = "Fastmem is not enabled.\n"; } } else if (command_str == "get info") { - Loader::AppLoader::Modules modules; - system.GetAppLoader().ReadNSOModules(modules); + auto modules = FindModules(system); reply = fmt::format("Process: {:#x} ({})\n" "Program Id: {:#018x}\n", From a6735cba5f6c7b9a7ad663686d99f8835ea000f6 Mon Sep 17 00:00:00 2001 From: Liam Date: Sat, 11 Nov 2023 10:45:43 -0500 Subject: [PATCH 085/154] k_capabilities: ignore map region when KTrace is disabled --- src/core/hle/kernel/k_capabilities.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/core/hle/kernel/k_capabilities.cpp b/src/core/hle/kernel/k_capabilities.cpp index fb890f978d..274fee493f 100644 --- a/src/core/hle/kernel/k_capabilities.cpp +++ b/src/core/hle/kernel/k_capabilities.cpp @@ -5,6 +5,7 @@ #include "core/hle/kernel/k_capabilities.h" #include "core/hle/kernel/k_memory_layout.h" #include "core/hle/kernel/k_process_page_table.h" +#include "core/hle/kernel/k_trace.h" #include "core/hle/kernel/kernel.h" #include "core/hle/kernel/svc_results.h" #include "core/hle/kernel/svc_version.h" @@ -329,6 +330,8 @@ Result KCapabilities::SetCapabilities(std::span caps, KProcessPageTab // Map the range. R_TRY(this->MapRange_(cap, size_cap, page_table)); + } else if (GetCapabilityType(cap) == CapabilityType::MapRegion && !IsKTraceEnabled) { + continue; } else { R_TRY(this->SetCapability(cap, set_flags, set_svc, page_table)); } From 0c032d3f2fca46569562d968b3edb37d972d0975 Mon Sep 17 00:00:00 2001 From: german77 Date: Sat, 11 Nov 2023 10:12:11 -0600 Subject: [PATCH 086/154] yuzu: Keep homebrew on the recently played list --- src/yuzu/main.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/yuzu/main.cpp b/src/yuzu/main.cpp index ce0c710211..d2a054eaab 100644 --- a/src/yuzu/main.cpp +++ b/src/yuzu/main.cpp @@ -1909,7 +1909,8 @@ void GMainWindow::BootGame(const QString& filename, u64 program_id, std::size_t StartGameType type, AmLaunchType launch_type) { LOG_INFO(Frontend, "yuzu starting..."); - if (program_id > static_cast(Service::AM::Applets::AppletProgramId::MaxProgramId)) { + if (program_id == 0 || + program_id > static_cast(Service::AM::Applets::AppletProgramId::MaxProgramId)) { StoreRecentFile(filename); // Put the filename on top of the list } @@ -4295,7 +4296,7 @@ void GMainWindow::OnAlbum() { const auto filename = QString::fromStdString(album_nca->GetFullPath()); UISettings::values.roms_path = QFileInfo(filename).path(); - BootGame(filename); + BootGame(filename, AlbumId); } void GMainWindow::OnCabinet(Service::NFP::CabinetMode mode) { @@ -4319,7 +4320,7 @@ void GMainWindow::OnCabinet(Service::NFP::CabinetMode mode) { const auto filename = QString::fromStdString(cabinet_nca->GetFullPath()); UISettings::values.roms_path = QFileInfo(filename).path(); - BootGame(filename); + BootGame(filename, CabinetId); } void GMainWindow::OnMiiEdit() { @@ -4342,7 +4343,7 @@ void GMainWindow::OnMiiEdit() { const auto filename = QString::fromStdString((mii_applet_nca->GetFullPath())); UISettings::values.roms_path = QFileInfo(filename).path(); - BootGame(filename); + BootGame(filename, MiiEditId); } void GMainWindow::OnCaptureScreenshot() { From ae57a99d7d2063661cc15e76e8183122d8e0bc1b Mon Sep 17 00:00:00 2001 From: german77 Date: Sat, 11 Nov 2023 20:54:06 -0600 Subject: [PATCH 087/154] core: hid: Split SL and SR buttons --- src/common/settings_input.cpp | 9 +- src/common/settings_input.h | 7 +- src/core/hid/emulated_controller.cpp | 28 +- src/core/hle/service/hid/controllers/npad.cpp | 6 +- src/input_common/drivers/gc_adapter.cpp | 8 +- src/input_common/drivers/joycon.cpp | 8 +- src/input_common/drivers/sdl_driver.cpp | 20 +- src/input_common/drivers/sdl_driver.h | 2 +- src/input_common/drivers/udp_client.cpp | 8 +- src/yuzu/configuration/config.cpp | 1 + .../configuration/configure_input_player.cpp | 36 +- .../configuration/configure_input_player.ui | 389 ++++++++++++------ .../configure_input_player_widget.cpp | 45 +- 13 files changed, 382 insertions(+), 185 deletions(-) diff --git a/src/common/settings_input.cpp b/src/common/settings_input.cpp index 0a6eea3cf4..a6007e7b29 100644 --- a/src/common/settings_input.cpp +++ b/src/common/settings_input.cpp @@ -6,10 +6,11 @@ namespace Settings { namespace NativeButton { const std::array mapping = {{ - "button_a", "button_b", "button_x", "button_y", "button_lstick", - "button_rstick", "button_l", "button_r", "button_zl", "button_zr", - "button_plus", "button_minus", "button_dleft", "button_dup", "button_dright", - "button_ddown", "button_sl", "button_sr", "button_home", "button_screenshot", + "button_a", "button_b", "button_x", "button_y", "button_lstick", + "button_rstick", "button_l", "button_r", "button_zl", "button_zr", + "button_plus", "button_minus", "button_dleft", "button_dup", "button_dright", + "button_ddown", "button_slleft", "button_srleft", "button_home", "button_screenshot", + "button_slright", "button_srright", }}; } diff --git a/src/common/settings_input.h b/src/common/settings_input.h index 46f38c7030..53a95ef8f1 100644 --- a/src/common/settings_input.h +++ b/src/common/settings_input.h @@ -29,12 +29,15 @@ enum Values : int { DRight, DDown, - SL, - SR, + SLLeft, + SRLeft, Home, Screenshot, + SLRight, + SRRight, + NumButtons, }; diff --git a/src/core/hid/emulated_controller.cpp b/src/core/hid/emulated_controller.cpp index b08a714468..34927cddd4 100644 --- a/src/core/hid/emulated_controller.cpp +++ b/src/core/hid/emulated_controller.cpp @@ -243,10 +243,12 @@ void EmulatedController::LoadTASParams() { tas_button_params[Settings::NativeButton::DUp].Set("button", 13); tas_button_params[Settings::NativeButton::DRight].Set("button", 14); tas_button_params[Settings::NativeButton::DDown].Set("button", 15); - tas_button_params[Settings::NativeButton::SL].Set("button", 16); - tas_button_params[Settings::NativeButton::SR].Set("button", 17); + tas_button_params[Settings::NativeButton::SLLeft].Set("button", 16); + tas_button_params[Settings::NativeButton::SRLeft].Set("button", 17); tas_button_params[Settings::NativeButton::Home].Set("button", 18); tas_button_params[Settings::NativeButton::Screenshot].Set("button", 19); + tas_button_params[Settings::NativeButton::SLRight].Set("button", 20); + tas_button_params[Settings::NativeButton::SRRight].Set("button", 21); tas_stick_params[Settings::NativeAnalog::LStick].Set("axis_x", 0); tas_stick_params[Settings::NativeAnalog::LStick].Set("axis_y", 1); @@ -296,10 +298,12 @@ void EmulatedController::LoadVirtualGamepadParams() { virtual_button_params[Settings::NativeButton::DUp].Set("button", 13); virtual_button_params[Settings::NativeButton::DRight].Set("button", 14); virtual_button_params[Settings::NativeButton::DDown].Set("button", 15); - virtual_button_params[Settings::NativeButton::SL].Set("button", 16); - virtual_button_params[Settings::NativeButton::SR].Set("button", 17); + virtual_button_params[Settings::NativeButton::SLLeft].Set("button", 16); + virtual_button_params[Settings::NativeButton::SRLeft].Set("button", 17); virtual_button_params[Settings::NativeButton::Home].Set("button", 18); virtual_button_params[Settings::NativeButton::Screenshot].Set("button", 19); + virtual_button_params[Settings::NativeButton::SLRight].Set("button", 20); + virtual_button_params[Settings::NativeButton::SRRight].Set("button", 21); virtual_stick_params[Settings::NativeAnalog::LStick].Set("axis_x", 0); virtual_stick_params[Settings::NativeAnalog::LStick].Set("axis_y", 1); @@ -867,12 +871,16 @@ void EmulatedController::SetButton(const Common::Input::CallbackStatus& callback controller.npad_button_state.down.Assign(current_status.value); controller.debug_pad_button_state.d_down.Assign(current_status.value); break; - case Settings::NativeButton::SL: + case Settings::NativeButton::SLLeft: controller.npad_button_state.left_sl.Assign(current_status.value); + break; + case Settings::NativeButton::SLRight: controller.npad_button_state.right_sl.Assign(current_status.value); break; - case Settings::NativeButton::SR: + case Settings::NativeButton::SRLeft: controller.npad_button_state.left_sr.Assign(current_status.value); + break; + case Settings::NativeButton::SRRight: controller.npad_button_state.right_sr.Assign(current_status.value); break; case Settings::NativeButton::Home: @@ -1890,12 +1898,16 @@ NpadButton EmulatedController::GetTurboButtonMask() const { case Settings::NativeButton::DDown: button_mask.down.Assign(1); break; - case Settings::NativeButton::SL: + case Settings::NativeButton::SLLeft: button_mask.left_sl.Assign(1); + break; + case Settings::NativeButton::SLRight: button_mask.right_sl.Assign(1); break; - case Settings::NativeButton::SR: + case Settings::NativeButton::SRLeft: button_mask.left_sr.Assign(1); + break; + case Settings::NativeButton::SRRight: button_mask.right_sr.Assign(1); break; default: diff --git a/src/core/hle/service/hid/controllers/npad.cpp b/src/core/hle/service/hid/controllers/npad.cpp index 21695bda29..d46bf917e6 100644 --- a/src/core/hle/service/hid/controllers/npad.cpp +++ b/src/core/hle/service/hid/controllers/npad.cpp @@ -457,12 +457,14 @@ void Controller_NPad::RequestPadStateUpdate(Core::HID::NpadIdType npad_id) { pad_entry.l_stick = stick_state.left; } - if (controller_type == Core::HID::NpadStyleIndex::JoyconLeft) { + if (controller_type == Core::HID::NpadStyleIndex::JoyconLeft || + controller_type == Core::HID::NpadStyleIndex::JoyconDual) { pad_entry.npad_buttons.left_sl.Assign(button_state.left_sl); pad_entry.npad_buttons.left_sr.Assign(button_state.left_sr); } - if (controller_type == Core::HID::NpadStyleIndex::JoyconRight) { + if (controller_type == Core::HID::NpadStyleIndex::JoyconRight || + controller_type == Core::HID::NpadStyleIndex::JoyconDual) { pad_entry.npad_buttons.right_sl.Assign(button_state.right_sl); pad_entry.npad_buttons.right_sr.Assign(button_state.right_sr); } diff --git a/src/input_common/drivers/gc_adapter.cpp b/src/input_common/drivers/gc_adapter.cpp index 3ad34884d4..1ff296af52 100644 --- a/src/input_common/drivers/gc_adapter.cpp +++ b/src/input_common/drivers/gc_adapter.cpp @@ -415,7 +415,7 @@ ButtonMapping GCAdapter::GetButtonMappingForDevice(const Common::ParamPackage& p // This list is missing ZL/ZR since those are not considered buttons. // We will add those afterwards // This list also excludes any button that can't be really mapped - static constexpr std::array, 12> + static constexpr std::array, 14> switch_to_gcadapter_button = { std::pair{Settings::NativeButton::A, PadButton::ButtonA}, {Settings::NativeButton::B, PadButton::ButtonB}, @@ -426,8 +426,10 @@ ButtonMapping GCAdapter::GetButtonMappingForDevice(const Common::ParamPackage& p {Settings::NativeButton::DUp, PadButton::ButtonUp}, {Settings::NativeButton::DRight, PadButton::ButtonRight}, {Settings::NativeButton::DDown, PadButton::ButtonDown}, - {Settings::NativeButton::SL, PadButton::TriggerL}, - {Settings::NativeButton::SR, PadButton::TriggerR}, + {Settings::NativeButton::SLLeft, PadButton::TriggerL}, + {Settings::NativeButton::SRLeft, PadButton::TriggerR}, + {Settings::NativeButton::SLRight, PadButton::TriggerL}, + {Settings::NativeButton::SRRight, PadButton::TriggerR}, {Settings::NativeButton::R, PadButton::TriggerZ}, }; if (!params.Has("port")) { diff --git a/src/input_common/drivers/joycon.cpp b/src/input_common/drivers/joycon.cpp index 0aca5a3a38..72d2951f3d 100644 --- a/src/input_common/drivers/joycon.cpp +++ b/src/input_common/drivers/joycon.cpp @@ -680,8 +680,8 @@ ButtonMapping Joycons::GetButtonMappingForDevice(const Common::ParamPackage& par Common::ParamPackage sr_button_params = button_params; sl_button_params.Set("button", static_cast(Joycon::PadButton::LeftSL)); sr_button_params.Set("button", static_cast(Joycon::PadButton::LeftSR)); - mapping.insert_or_assign(Settings::NativeButton::SL, std::move(sl_button_params)); - mapping.insert_or_assign(Settings::NativeButton::SR, std::move(sr_button_params)); + mapping.insert_or_assign(Settings::NativeButton::SLLeft, std::move(sl_button_params)); + mapping.insert_or_assign(Settings::NativeButton::SRLeft, std::move(sr_button_params)); } // Map SL and SR buttons for right joycons @@ -693,8 +693,8 @@ ButtonMapping Joycons::GetButtonMappingForDevice(const Common::ParamPackage& par Common::ParamPackage sr_button_params = button_params; sl_button_params.Set("button", static_cast(Joycon::PadButton::RightSL)); sr_button_params.Set("button", static_cast(Joycon::PadButton::RightSR)); - mapping.insert_or_assign(Settings::NativeButton::SL, std::move(sl_button_params)); - mapping.insert_or_assign(Settings::NativeButton::SR, std::move(sr_button_params)); + mapping.insert_or_assign(Settings::NativeButton::SLRight, std::move(sl_button_params)); + mapping.insert_or_assign(Settings::NativeButton::SRRight, std::move(sr_button_params)); } return mapping; diff --git a/src/input_common/drivers/sdl_driver.cpp b/src/input_common/drivers/sdl_driver.cpp index 66e3ae9afd..78f458afe3 100644 --- a/src/input_common/drivers/sdl_driver.cpp +++ b/src/input_common/drivers/sdl_driver.cpp @@ -828,16 +828,18 @@ ButtonMapping SDLDriver::GetButtonMappingForDevice(const Common::ParamPackage& p ButtonBindings SDLDriver::GetDefaultButtonBinding( const std::shared_ptr& joystick) const { // Default SL/SR mapping for other controllers - auto sl_button = SDL_CONTROLLER_BUTTON_LEFTSHOULDER; - auto sr_button = SDL_CONTROLLER_BUTTON_RIGHTSHOULDER; + auto sll_button = SDL_CONTROLLER_BUTTON_LEFTSHOULDER; + auto srl_button = SDL_CONTROLLER_BUTTON_RIGHTSHOULDER; + auto slr_button = SDL_CONTROLLER_BUTTON_LEFTSHOULDER; + auto srr_button = SDL_CONTROLLER_BUTTON_RIGHTSHOULDER; if (joystick->IsJoyconLeft()) { - sl_button = SDL_CONTROLLER_BUTTON_PADDLE2; - sr_button = SDL_CONTROLLER_BUTTON_PADDLE4; + sll_button = SDL_CONTROLLER_BUTTON_PADDLE2; + srl_button = SDL_CONTROLLER_BUTTON_PADDLE4; } if (joystick->IsJoyconRight()) { - sl_button = SDL_CONTROLLER_BUTTON_PADDLE3; - sr_button = SDL_CONTROLLER_BUTTON_PADDLE1; + slr_button = SDL_CONTROLLER_BUTTON_PADDLE3; + srr_button = SDL_CONTROLLER_BUTTON_PADDLE1; } return { @@ -855,8 +857,10 @@ ButtonBindings SDLDriver::GetDefaultButtonBinding( {Settings::NativeButton::DUp, SDL_CONTROLLER_BUTTON_DPAD_UP}, {Settings::NativeButton::DRight, SDL_CONTROLLER_BUTTON_DPAD_RIGHT}, {Settings::NativeButton::DDown, SDL_CONTROLLER_BUTTON_DPAD_DOWN}, - {Settings::NativeButton::SL, sl_button}, - {Settings::NativeButton::SR, sr_button}, + {Settings::NativeButton::SLLeft, sll_button}, + {Settings::NativeButton::SRLeft, srl_button}, + {Settings::NativeButton::SLRight, slr_button}, + {Settings::NativeButton::SRRight, srr_button}, {Settings::NativeButton::Home, SDL_CONTROLLER_BUTTON_GUIDE}, {Settings::NativeButton::Screenshot, SDL_CONTROLLER_BUTTON_MISC1}, }; diff --git a/src/input_common/drivers/sdl_driver.h b/src/input_common/drivers/sdl_driver.h index fcba4e3c63..08e49a0da6 100644 --- a/src/input_common/drivers/sdl_driver.h +++ b/src/input_common/drivers/sdl_driver.h @@ -24,7 +24,7 @@ namespace InputCommon { class SDLJoystick; using ButtonBindings = - std::array, 18>; + std::array, 20>; using ZButtonBindings = std::array, 2>; diff --git a/src/input_common/drivers/udp_client.cpp b/src/input_common/drivers/udp_client.cpp index 77db60e929..60821b31a6 100644 --- a/src/input_common/drivers/udp_client.cpp +++ b/src/input_common/drivers/udp_client.cpp @@ -396,7 +396,7 @@ std::vector UDPClient::GetInputDevices() const { ButtonMapping UDPClient::GetButtonMappingForDevice(const Common::ParamPackage& params) { // This list excludes any button that can't be really mapped - static constexpr std::array, 20> + static constexpr std::array, 22> switch_to_dsu_button = { std::pair{Settings::NativeButton::A, PadButton::Circle}, {Settings::NativeButton::B, PadButton::Cross}, @@ -412,8 +412,10 @@ ButtonMapping UDPClient::GetButtonMappingForDevice(const Common::ParamPackage& p {Settings::NativeButton::R, PadButton::R1}, {Settings::NativeButton::ZL, PadButton::L2}, {Settings::NativeButton::ZR, PadButton::R2}, - {Settings::NativeButton::SL, PadButton::L2}, - {Settings::NativeButton::SR, PadButton::R2}, + {Settings::NativeButton::SLLeft, PadButton::L2}, + {Settings::NativeButton::SRLeft, PadButton::R2}, + {Settings::NativeButton::SLRight, PadButton::L2}, + {Settings::NativeButton::SRRight, PadButton::R2}, {Settings::NativeButton::LStick, PadButton::L3}, {Settings::NativeButton::RStick, PadButton::R3}, {Settings::NativeButton::Home, PadButton::Home}, diff --git a/src/yuzu/configuration/config.cpp b/src/yuzu/configuration/config.cpp index baa3e55f3d..09cd8d1807 100644 --- a/src/yuzu/configuration/config.cpp +++ b/src/yuzu/configuration/config.cpp @@ -35,6 +35,7 @@ const std::array Config::default_button Qt::Key_G, Qt::Key_Q, Qt::Key_E, Qt::Key_R, Qt::Key_T, Qt::Key_M, Qt::Key_N, Qt::Key_Left, Qt::Key_Up, Qt::Key_Right, Qt::Key_Down, Qt::Key_Q, Qt::Key_E, 0, 0, + Qt::Key_Q, Qt::Key_E, }; const std::array Config::default_motions = { diff --git a/src/yuzu/configuration/configure_input_player.cpp b/src/yuzu/configuration/configure_input_player.cpp index 576f5b5711..9259e2a5d0 100644 --- a/src/yuzu/configuration/configure_input_player.cpp +++ b/src/yuzu/configuration/configure_input_player.cpp @@ -322,11 +322,12 @@ ConfigureInputPlayer::ConfigureInputPlayer(QWidget* parent, std::size_t player_i setFocusPolicy(Qt::ClickFocus); button_map = { - ui->buttonA, ui->buttonB, ui->buttonX, ui->buttonY, - ui->buttonLStick, ui->buttonRStick, ui->buttonL, ui->buttonR, - ui->buttonZL, ui->buttonZR, ui->buttonPlus, ui->buttonMinus, - ui->buttonDpadLeft, ui->buttonDpadUp, ui->buttonDpadRight, ui->buttonDpadDown, - ui->buttonSL, ui->buttonSR, ui->buttonHome, ui->buttonScreenshot, + ui->buttonA, ui->buttonB, ui->buttonX, ui->buttonY, + ui->buttonLStick, ui->buttonRStick, ui->buttonL, ui->buttonR, + ui->buttonZL, ui->buttonZR, ui->buttonPlus, ui->buttonMinus, + ui->buttonDpadLeft, ui->buttonDpadUp, ui->buttonDpadRight, ui->buttonDpadDown, + ui->buttonSLLeft, ui->buttonSRLeft, ui->buttonHome, ui->buttonScreenshot, + ui->buttonSLRight, ui->buttonSRRight, }; analog_map_buttons = {{ @@ -1181,10 +1182,13 @@ void ConfigureInputPlayer::UpdateControllerAvailableButtons() { // List of all the widgets that will be hidden by any of the following layouts that need // "unhidden" after the controller type changes - const std::array layout_show = { - ui->buttonShoulderButtonsSLSR, + const std::array layout_show = { + ui->buttonShoulderButtonsSLSRLeft, + ui->buttonShoulderButtonsSLSRRight, ui->horizontalSpacerShoulderButtonsWidget, ui->horizontalSpacerShoulderButtonsWidget2, + ui->horizontalSpacerShoulderButtonsWidget3, + ui->horizontalSpacerShoulderButtonsWidget4, ui->buttonShoulderButtonsLeft, ui->buttonMiscButtonsMinusScreenshot, ui->bottomLeft, @@ -1202,16 +1206,19 @@ void ConfigureInputPlayer::UpdateControllerAvailableButtons() { std::vector layout_hidden; switch (layout) { case Core::HID::NpadStyleIndex::ProController: - case Core::HID::NpadStyleIndex::JoyconDual: case Core::HID::NpadStyleIndex::Handheld: layout_hidden = { - ui->buttonShoulderButtonsSLSR, + ui->buttonShoulderButtonsSLSRLeft, + ui->buttonShoulderButtonsSLSRRight, ui->horizontalSpacerShoulderButtonsWidget2, + ui->horizontalSpacerShoulderButtonsWidget4, }; break; case Core::HID::NpadStyleIndex::JoyconLeft: layout_hidden = { + ui->buttonShoulderButtonsSLSRRight, ui->horizontalSpacerShoulderButtonsWidget2, + ui->horizontalSpacerShoulderButtonsWidget3, ui->buttonShoulderButtonsRight, ui->buttonMiscButtonsPlusHome, ui->bottomRight, @@ -1219,16 +1226,17 @@ void ConfigureInputPlayer::UpdateControllerAvailableButtons() { break; case Core::HID::NpadStyleIndex::JoyconRight: layout_hidden = { - ui->horizontalSpacerShoulderButtonsWidget, - ui->buttonShoulderButtonsLeft, - ui->buttonMiscButtonsMinusScreenshot, - ui->bottomLeft, + ui->buttonShoulderButtonsSLSRLeft, ui->horizontalSpacerShoulderButtonsWidget, + ui->horizontalSpacerShoulderButtonsWidget4, ui->buttonShoulderButtonsLeft, + ui->buttonMiscButtonsMinusScreenshot, ui->bottomLeft, }; break; case Core::HID::NpadStyleIndex::GameCube: layout_hidden = { - ui->buttonShoulderButtonsSLSR, + ui->buttonShoulderButtonsSLSRLeft, + ui->buttonShoulderButtonsSLSRRight, ui->horizontalSpacerShoulderButtonsWidget2, + ui->horizontalSpacerShoulderButtonsWidget4, ui->buttonMiscButtonsMinusGroup, ui->buttonMiscButtonsScreenshotGroup, }; diff --git a/src/yuzu/configuration/configure_input_player.ui b/src/yuzu/configuration/configure_input_player.ui index 611a794778..5518cccd1d 100644 --- a/src/yuzu/configuration/configure_input_player.ui +++ b/src/yuzu/configuration/configure_input_player.ui @@ -1208,6 +1208,159 @@ 3 + + + + + 0 + + + 0 + + + 0 + + + 0 + + + 0 + + + + + SL + + + Qt::AlignCenter + + + + 3 + + + 3 + + + 3 + + + 3 + + + 3 + + + + + + 68 + 0 + + + + + 68 + 16777215 + + + + min-width: 68px; + + + SL + + + + + + + + + + SR + + + Qt::AlignCenter + + + + 3 + + + 3 + + + 3 + + + 3 + + + 3 + + + + + + 68 + 0 + + + + + 68 + 16777215 + + + + min-width: 68px; + + + SR + + + + + + + + + + + + + + 0 + + + 0 + + + 0 + + + 0 + + + 0 + + + + + Qt::Horizontal + + + + 0 + 20 + + + + + + + @@ -1830,125 +1983,125 @@ - - - - - 0 - - - 0 - - - 0 - - - 0 - - - 0 - - - - - SL - - - Qt::AlignCenter - - - - 3 - - - 3 - - - 3 - - - 3 - - - 3 - - - - - - 68 - 0 - - - - - 68 - 16777215 - - - - min-width: 68px; - - - SL - - - + + + + + 0 + + + 0 + + + 0 + + + 0 + + + 0 + + + + + SL + + + Qt::AlignCenter + + + + 3 + + + 3 + + + 3 + + + 3 + + + 3 + + + + + + 68 + 0 + + + + + 68 + 16777215 + + + + min-width: 68px; + + + SL + + + + + + + + + + SR + + + Qt::AlignCenter + + + + 3 + + + 3 + + + 3 + + + 3 + + + 3 + + + + + + 68 + 0 + + + + + 68 + 16777215 + + + + min-width: 68px; + + + SR + + + + + + - - - - - - SR - - - Qt::AlignCenter - - - - 3 - - - 3 - - - 3 - - - 3 - - - 3 - - - - - - 68 - 0 - - - - - 68 - 16777215 - - - - min-width: 68px; - - - SR - - - - - - - - - + + diff --git a/src/yuzu/configuration/configure_input_player_widget.cpp b/src/yuzu/configuration/configure_input_player_widget.cpp index a188eef92c..550cff9a0f 100644 --- a/src/yuzu/configuration/configure_input_player_widget.cpp +++ b/src/yuzu/configuration/configure_input_player_widget.cpp @@ -297,8 +297,8 @@ void PlayerControlPreview::DrawLeftController(QPainter& p, const QPointF center) // Sideview SL and SR buttons button_color = colors.slider_button; - DrawRoundButton(p, center + QPoint(59, 52), button_values[SR], 5, 12, Direction::Left); - DrawRoundButton(p, center + QPoint(59, -69), button_values[SL], 5, 12, Direction::Left); + DrawRoundButton(p, center + QPoint(59, 52), button_values[SRLeft], 5, 12, Direction::Left); + DrawRoundButton(p, center + QPoint(59, -69), button_values[SLLeft], 5, 12, Direction::Left); DrawLeftBody(p, center); @@ -353,8 +353,10 @@ void PlayerControlPreview::DrawLeftController(QPainter& p, const QPointF center) // SR and SL buttons p.setPen(colors.outline); button_color = colors.slider_button; - DrawRoundButton(p, center + QPoint(155, 52), button_values[SR], 5.2f, 12, Direction::None, 4); - DrawRoundButton(p, center + QPoint(155, -69), button_values[SL], 5.2f, 12, Direction::None, 4); + DrawRoundButton(p, center + QPoint(155, 52), button_values[SRLeft], 5.2f, 12, Direction::None, + 4); + DrawRoundButton(p, center + QPoint(155, -69), button_values[SLLeft], 5.2f, 12, Direction::None, + 4); // SR and SL text p.setPen(colors.transparent); @@ -428,8 +430,10 @@ void PlayerControlPreview::DrawRightController(QPainter& p, const QPointF center // Sideview SL and SR buttons button_color = colors.slider_button; - DrawRoundButton(p, center + QPoint(-59, 52), button_values[SL], 5, 11, Direction::Right); - DrawRoundButton(p, center + QPoint(-59, -69), button_values[SR], 5, 11, Direction::Right); + DrawRoundButton(p, center + QPoint(-59, 52), button_values[SLRight], 5, 11, + Direction::Right); + DrawRoundButton(p, center + QPoint(-59, -69), button_values[SRRight], 5, 11, + Direction::Right); DrawRightBody(p, center); @@ -484,8 +488,10 @@ void PlayerControlPreview::DrawRightController(QPainter& p, const QPointF center // SR and SL buttons p.setPen(colors.outline); button_color = colors.slider_button; - DrawRoundButton(p, center + QPoint(-155, 52), button_values[SL], 5, 12, Direction::None, 4.0f); - DrawRoundButton(p, center + QPoint(-155, -69), button_values[SR], 5, 12, Direction::None, 4.0f); + DrawRoundButton(p, center + QPoint(-155, 52), button_values[SLRight], 5, 12, Direction::None, + 4.0f); + DrawRoundButton(p, center + QPoint(-155, -69), button_values[SRRight], 5, 12, Direction::None, + 4.0f); // SR and SL text p.setPen(colors.transparent); @@ -557,6 +563,19 @@ void PlayerControlPreview::DrawDualController(QPainter& p, const QPointF center) DrawRoundButton(p, center + QPoint(-154, -72), button_values[Minus], 7, 4, Direction::Up, 1); + // Left SR and SL sideview buttons + button_color = colors.slider_button; + DrawRoundButton(p, center + QPoint(-20, -62), button_values[SLLeft], 4, 11, + Direction::Left); + DrawRoundButton(p, center + QPoint(-20, 47), button_values[SRLeft], 4, 11, Direction::Left); + + // Right SR and SL sideview buttons + button_color = colors.slider_button; + DrawRoundButton(p, center + QPoint(20, 47), button_values[SLRight], 4, 11, + Direction::Right); + DrawRoundButton(p, center + QPoint(20, -62), button_values[SRRight], 4, 11, + Direction::Right); + DrawDualBody(p, center); // Right trigger top view @@ -1792,16 +1811,6 @@ void PlayerControlPreview::DrawDualBody(QPainter& p, const QPointF center) { p.setBrush(colors.right); DrawPolygon(p, qright_joycon_topview); - // Right SR and SL sideview buttons - p.setPen(colors.outline); - p.setBrush(colors.slider_button); - DrawRoundRectangle(p, center + QPoint(19, 47), 7, 22, 1); - DrawRoundRectangle(p, center + QPoint(19, -62), 7, 22, 1); - - // Left SR and SL sideview buttons - DrawRoundRectangle(p, center + QPoint(-19, 47), 7, 22, 1); - DrawRoundRectangle(p, center + QPoint(-19, -62), 7, 22, 1); - // Right Sideview body p.setBrush(colors.slider); DrawPolygon(p, qright_joycon_slider); From f1806d237f57f2c0944f6ae4721ac9497de5b4cf Mon Sep 17 00:00:00 2001 From: Fernando Sahmkow Date: Fri, 10 Nov 2023 16:43:56 +0100 Subject: [PATCH 088/154] Memory: Fix invalidation handling from the CPU/Services --- src/core/memory.cpp | 25 +++++++++++++++---- .../renderer_opengl/gl_rasterizer.cpp | 2 +- .../renderer_vulkan/vk_rasterizer.cpp | 2 +- 3 files changed, 22 insertions(+), 7 deletions(-) diff --git a/src/core/memory.cpp b/src/core/memory.cpp index fa52734025..9f4883afcf 100644 --- a/src/core/memory.cpp +++ b/src/core/memory.cpp @@ -1,8 +1,10 @@ // SPDX-FileCopyrightText: 2015 Citra Emulator Project +// SPDX-FileCopyrightText: 2018 yuzu Emulator Project // SPDX-License-Identifier: GPL-2.0-or-later #include #include +#include #include #include "common/assert.h" @@ -10,6 +12,7 @@ #include "common/common_types.h" #include "common/logging/log.h" #include "common/page_table.h" +#include "common/scope_exit.h" #include "common/settings.h" #include "common/swap.h" #include "core/core.h" @@ -318,7 +321,7 @@ struct Memory::Impl { [&](const Common::ProcessAddress current_vaddr, const std::size_t copy_amount, u8* const host_ptr) { if constexpr (!UNSAFE) { - system.GPU().InvalidateRegion(GetInteger(current_vaddr), copy_amount); + HandleRasterizerWrite(GetInteger(current_vaddr), copy_amount); } std::memcpy(host_ptr, src_buffer, copy_amount); }, @@ -351,7 +354,7 @@ struct Memory::Impl { }, [&](const Common::ProcessAddress current_vaddr, const std::size_t copy_amount, u8* const host_ptr) { - system.GPU().InvalidateRegion(GetInteger(current_vaddr), copy_amount); + HandleRasterizerWrite(GetInteger(current_vaddr), copy_amount); std::memset(host_ptr, 0, copy_amount); }, [](const std::size_t copy_amount) {}); @@ -420,7 +423,7 @@ struct Memory::Impl { const std::size_t block_size) { // dc cvac: Store to point of coherency // CPU flush -> GPU invalidate - system.GPU().InvalidateRegion(GetInteger(current_vaddr), block_size); + HandleRasterizerWrite(GetInteger(current_vaddr), block_size); }; return PerformCacheOperation(dest_addr, size, on_rasterizer); } @@ -430,7 +433,7 @@ struct Memory::Impl { const std::size_t block_size) { // dc civac: Store to point of coherency, and invalidate from cache // CPU flush -> GPU invalidate - system.GPU().InvalidateRegion(GetInteger(current_vaddr), block_size); + HandleRasterizerWrite(GetInteger(current_vaddr), block_size); }; return PerformCacheOperation(dest_addr, size, on_rasterizer); } @@ -767,7 +770,18 @@ struct Memory::Impl { } void HandleRasterizerWrite(VAddr address, size_t size) { - const size_t core = system.GetCurrentHostThreadID(); + constexpr size_t sys_core = Core::Hardware::NUM_CPU_CORES - 1; + const size_t core = std::min(system.GetCurrentHostThreadID(), + sys_core); // any other calls threads go to syscore. + // Guard on sys_core; + if (core == sys_core) [[unlikely]] { + sys_core_guard.lock(); + } + SCOPE_EXIT({ + if (core == sys_core) [[unlikely]] { + sys_core_guard.unlock(); + } + }); auto& current_area = rasterizer_write_areas[core]; VAddr subaddress = address >> YUZU_PAGEBITS; bool do_collection = current_area.last_address == subaddress; @@ -799,6 +813,7 @@ struct Memory::Impl { rasterizer_read_areas{}; std::array rasterizer_write_areas{}; std::span gpu_dirty_managers; + std::mutex sys_core_guard; }; Memory::Memory(Core::System& system_) : system{system_} { diff --git a/src/video_core/renderer_opengl/gl_rasterizer.cpp b/src/video_core/renderer_opengl/gl_rasterizer.cpp index 27e2de1bf0..9995b6dd4f 100644 --- a/src/video_core/renderer_opengl/gl_rasterizer.cpp +++ b/src/video_core/renderer_opengl/gl_rasterizer.cpp @@ -555,7 +555,7 @@ void RasterizerOpenGL::OnCacheInvalidation(VAddr addr, u64 size) { } { std::scoped_lock lock{buffer_cache.mutex}; - buffer_cache.CachedWriteMemory(addr, size); + buffer_cache.WriteMemory(addr, size); } shader_cache.InvalidateRegion(addr, size); } diff --git a/src/video_core/renderer_vulkan/vk_rasterizer.cpp b/src/video_core/renderer_vulkan/vk_rasterizer.cpp index 3bfaabc498..e0ab1eaacd 100644 --- a/src/video_core/renderer_vulkan/vk_rasterizer.cpp +++ b/src/video_core/renderer_vulkan/vk_rasterizer.cpp @@ -621,7 +621,7 @@ void RasterizerVulkan::OnCacheInvalidation(VAddr addr, u64 size) { } { std::scoped_lock lock{buffer_cache.mutex}; - buffer_cache.CachedWriteMemory(addr, size); + buffer_cache.WriteMemory(addr, size); } pipeline_cache.InvalidateRegion(addr, size); } From c600bc86526bae9fe621cd3d8ab1a36d0fc7a931 Mon Sep 17 00:00:00 2001 From: t895 Date: Sun, 12 Nov 2023 13:54:31 -0500 Subject: [PATCH 089/154] android: Fix top app bar tint being cut off in the about fragment Adjust margin on the toolbar, not the app bar --- .../java/org/yuzu/yuzu_emu/fragments/AboutFragment.kt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/android/app/src/main/java/org/yuzu/yuzu_emu/fragments/AboutFragment.kt b/src/android/app/src/main/java/org/yuzu/yuzu_emu/fragments/AboutFragment.kt index 2ff827c6b0..a1620fbb7a 100644 --- a/src/android/app/src/main/java/org/yuzu/yuzu_emu/fragments/AboutFragment.kt +++ b/src/android/app/src/main/java/org/yuzu/yuzu_emu/fragments/AboutFragment.kt @@ -114,10 +114,10 @@ class AboutFragment : Fragment() { val leftInsets = barInsets.left + cutoutInsets.left val rightInsets = barInsets.right + cutoutInsets.right - val mlpAppBar = binding.appbarAbout.layoutParams as MarginLayoutParams - mlpAppBar.leftMargin = leftInsets - mlpAppBar.rightMargin = rightInsets - binding.appbarAbout.layoutParams = mlpAppBar + val mlpToolbar = binding.toolbarAbout.layoutParams as MarginLayoutParams + mlpToolbar.leftMargin = leftInsets + mlpToolbar.rightMargin = rightInsets + binding.toolbarAbout.layoutParams = mlpToolbar val mlpScrollAbout = binding.scrollAbout.layoutParams as MarginLayoutParams mlpScrollAbout.leftMargin = leftInsets From 4efb9763d90f02e4f966034db90b51fca366c441 Mon Sep 17 00:00:00 2001 From: t895 Date: Sun, 12 Nov 2023 13:55:20 -0500 Subject: [PATCH 090/154] android: Shrink logo in settings tab Adjusts padding between the cards and logo to fit appropriately --- src/android/app/src/main/res/layout/card_home_option.xml | 4 ++-- .../app/src/main/res/layout/fragment_home_settings.xml | 9 +++++---- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/src/android/app/src/main/res/layout/card_home_option.xml b/src/android/app/src/main/res/layout/card_home_option.xml index 6e8a232f94..cb667c928a 100644 --- a/src/android/app/src/main/res/layout/card_home_option.xml +++ b/src/android/app/src/main/res/layout/card_home_option.xml @@ -6,8 +6,8 @@ android:id="@+id/option_card" android:layout_width="match_parent" android:layout_height="wrap_content" - android:layout_marginVertical="12dp" - android:layout_marginHorizontal="16dp" + android:layout_marginBottom="24dp" + android:layout_marginHorizontal="12dp" android:background="?attr/selectableItemBackground" android:backgroundTint="?attr/colorSurfaceVariant" android:clickable="true" diff --git a/src/android/app/src/main/res/layout/fragment_home_settings.xml b/src/android/app/src/main/res/layout/fragment_home_settings.xml index 1cb421dcbe..d84093ba32 100644 --- a/src/android/app/src/main/res/layout/fragment_home_settings.xml +++ b/src/android/app/src/main/res/layout/fragment_home_settings.xml @@ -14,13 +14,14 @@ android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical" - android:background="?attr/colorSurface"> + android:background="?attr/colorSurface" + android:paddingHorizontal="8dp"> From ff72bf2cb2cdc652e77fc71b3dc39188db9fa4c4 Mon Sep 17 00:00:00 2001 From: t895 Date: Sun, 12 Nov 2023 13:56:13 -0500 Subject: [PATCH 091/154] android: Shrink logo in about page --- src/android/app/src/main/res/layout/fragment_about.xml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/android/app/src/main/res/layout/fragment_about.xml b/src/android/app/src/main/res/layout/fragment_about.xml index 3e1d98451b..a24f5230e7 100644 --- a/src/android/app/src/main/res/layout/fragment_about.xml +++ b/src/android/app/src/main/res/layout/fragment_about.xml @@ -38,17 +38,17 @@ + android:layout_marginHorizontal="20dp" /> Date: Sun, 12 Nov 2023 13:56:42 -0500 Subject: [PATCH 092/154] android: Add a landscape-specific layout to the about page Moves the logo to the side to fit more information on screen --- .../main/res/layout-w600dp/fragment_about.xml | 233 ++++++++++++++++++ 1 file changed, 233 insertions(+) create mode 100644 src/android/app/src/main/res/layout-w600dp/fragment_about.xml diff --git a/src/android/app/src/main/res/layout-w600dp/fragment_about.xml b/src/android/app/src/main/res/layout-w600dp/fragment_about.xml new file mode 100644 index 0000000000..a26ffbc73d --- /dev/null +++ b/src/android/app/src/main/res/layout-w600dp/fragment_about.xml @@ -0,0 +1,233 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +