From 1e90f4594105c5e14f3d9099572dc765ab0e8d7a Mon Sep 17 00:00:00 2001 From: SaynedBread <114937220+CyntexMore@users.noreply.github.com> Date: Sun, 25 Aug 2024 02:53:13 +0200 Subject: [PATCH 01/69] docs: Added some fancy Markdown formating to the README --- README.md | 26 ++++++++++++++++---------- 1 file changed, 16 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index 542acca9e..ba94b64bd 100644 --- a/README.md +++ b/README.md @@ -32,25 +32,28 @@ SPDX-License-Identifier: GPL-2.0-or-later

-# shadPS4 +# General information -shadPS4 is an early **PlayStation 4** emulator for **Windows**, **Linux** and **macOS** written in C++ +shadPS4 is an early **PlayStation 4** emulator for **Windows**, **Linux** and **macOS** written in C++. If you encounter problems or have doubts, do not hesitate to look at the [**Quickstart**](https://github.com/shadps4-emu/shadPS4/blob/main/documents/Quickstart/Quickstart.md). To verify that a game works, you can look at [**shadPS4 Game Compatibility**](https://github.com/shadps4-emu/shadps4-game-compatibility). -To discuss shadPS4 development or suggest ideas, join the [**Discord server**](https://discord.gg/MyZRaBngxA). +To discuss shadPS4 development, suggest ideas or to ask for help, join our [**Discord server**](https://discord.gg/MyZRaBngxA). -To get the latest news, go to our [**X (twitter)**](https://x.com/shadps4) or our [**website**](https://shadps4.net/). +To get the latest news, go to our [**X (Twitter)**](https://x.com/shadps4) or our [**website**](https://shadps4.net/). # Status -In development, small games are working like [**Sonic Mania**](https://www.youtube.com/watch?v=AAHoNzhHyCU), [**Undertale**](https://youtu.be/5zIvdy65Ro4), [**Dysmantle**](https://youtu.be/b9xzhLBdESE) and others... +> [!IMPORTANT] +> shadPS4 is early in developement, don't expect a flawless experience. + +Currently, the emulator successfully runs small games like [**Sonic Mania**](https://www.youtube.com/watch?v=AAHoNzhHyCU), [**Undertale**](https://youtu.be/5zIvdy65Ro4), [**Dysmantle**](https://youtu.be/b9xzhLBdESE), and a few others. Most importantly shadPS4 can *somewhat* run Bloodborne. # Why -The project started as a fun project. Due to limited free time, it will probably take a while before shadPS4 is able to run anything decent, but we're trying to make small, regular commits. +This project began as a fun project. Given our limited free time, it may take some time before shadPS4 can run more complex games, but we're committed to making small, regular updates. # Build @@ -62,7 +65,7 @@ Check the build instructions for [**Windows**](https://github.com/shadps4-emu/sh Check the build instructions for [**Linux**](https://github.com/shadps4-emu/shadPS4/blob/main/documents/building-linux.md). -## Build status +## Building status
Windows @@ -95,9 +98,12 @@ Check the build instructions for [**Linux**](https://github.com/shadps4-emu/shad For more information on how to test, debug and report issues with the emulator or games, read the [Debugging documentation](https://github.com/shadps4-emu/shadPS4/blob/main/documents/Debugging/Debugging.md). -# Keyboard Mapping +# Keyboard mapping -| Controller button | Keyboard | +> [!NOTE] +> Keyboard mappings can be changed from the Qt interface of shadPS4. Xbox and DualShock controllers work out of the box. + +| Controller button | Keyboard equivelant | |-------------|-------------| LEFT AXIS UP | W | LEFT AXIS DOWN | S | @@ -154,4 +160,4 @@ Open a PR and we'll check it :) # License -- [**GPL-2.0 license**](https://github.com/shadps4-emu/shadPS4/blob/main/LICENSE) \ No newline at end of file +- [**GPL-2.0 license**](https://github.com/shadps4-emu/shadPS4/blob/main/LICENSE) From 41a93dcae41d4c977d430978ba5b01a4ed03e108 Mon Sep 17 00:00:00 2001 From: SaynedBread <114937220+CyntexMore@users.noreply.github.com> Date: Sun, 25 Aug 2024 02:54:46 +0200 Subject: [PATCH 02/69] docs: Added some fancy Markdown formating to the README --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index ba94b64bd..25dbbccc2 100644 --- a/README.md +++ b/README.md @@ -55,7 +55,7 @@ Currently, the emulator successfully runs small games like [**Sonic Mania**](htt This project began as a fun project. Given our limited free time, it may take some time before shadPS4 can run more complex games, but we're committed to making small, regular updates. -# Build +# Building ## Windows From 3f445eca407984a3808a1be9efd12ccfcb8299fa Mon Sep 17 00:00:00 2001 From: Dzmitry Dubrova Date: Sun, 25 Aug 2024 11:45:26 +0300 Subject: [PATCH 03/69] gui: Implement gui translations --- CMakeLists.txt | 19 +- src/common/config.cpp | 12 + src/common/config.h | 2 + src/qt_gui/game_info.cpp | 4 +- src/qt_gui/game_install_dialog.cpp | 10 +- src/qt_gui/gui_context_menus.h | 39 +-- src/qt_gui/main_window.cpp | 41 +++ src/qt_gui/main_window.h | 5 + src/qt_gui/settings_dialog.cpp | 33 ++ src/qt_gui/settings_dialog.h | 7 + src/qt_gui/settings_dialog.ui | 69 ++-- src/qt_gui/translations/da_DK.ts | 491 +++++++++++++++++++++++++++++ src/qt_gui/translations/de.ts | 491 +++++++++++++++++++++++++++++ src/qt_gui/translations/el.ts | 491 +++++++++++++++++++++++++++++ src/qt_gui/translations/en.ts | 491 +++++++++++++++++++++++++++++ src/qt_gui/translations/es_ES.ts | 491 +++++++++++++++++++++++++++++ src/qt_gui/translations/fi.ts | 491 +++++++++++++++++++++++++++++ src/qt_gui/translations/fr.ts | 491 +++++++++++++++++++++++++++++ src/qt_gui/translations/hu_HU.ts | 491 +++++++++++++++++++++++++++++ src/qt_gui/translations/id.ts | 491 +++++++++++++++++++++++++++++ src/qt_gui/translations/it.ts | 491 +++++++++++++++++++++++++++++ src/qt_gui/translations/ja_JP.ts | 491 +++++++++++++++++++++++++++++ src/qt_gui/translations/ko_KR.ts | 491 +++++++++++++++++++++++++++++ src/qt_gui/translations/lt_LT.ts | 491 +++++++++++++++++++++++++++++ src/qt_gui/translations/nb.ts | 491 +++++++++++++++++++++++++++++ src/qt_gui/translations/nl.ts | 491 +++++++++++++++++++++++++++++ src/qt_gui/translations/pl_PL.ts | 491 +++++++++++++++++++++++++++++ src/qt_gui/translations/pt_BR.ts | 491 +++++++++++++++++++++++++++++ src/qt_gui/translations/ro_RO.ts | 491 +++++++++++++++++++++++++++++ src/qt_gui/translations/ru_RU.ts | 491 +++++++++++++++++++++++++++++ src/qt_gui/translations/tr_TR.ts | 491 +++++++++++++++++++++++++++++ src/qt_gui/translations/vi_VN.ts | 491 +++++++++++++++++++++++++++++ src/qt_gui/translations/zh_CN.ts | 491 +++++++++++++++++++++++++++++ src/qt_gui/translations/zh_TW.ts | 491 +++++++++++++++++++++++++++++ src/qt_gui/trophy_viewer.cpp | 2 +- 35 files changed, 11473 insertions(+), 63 deletions(-) create mode 100644 src/qt_gui/translations/da_DK.ts create mode 100644 src/qt_gui/translations/de.ts create mode 100644 src/qt_gui/translations/el.ts create mode 100644 src/qt_gui/translations/en.ts create mode 100644 src/qt_gui/translations/es_ES.ts create mode 100644 src/qt_gui/translations/fi.ts create mode 100644 src/qt_gui/translations/fr.ts create mode 100644 src/qt_gui/translations/hu_HU.ts create mode 100644 src/qt_gui/translations/id.ts create mode 100644 src/qt_gui/translations/it.ts create mode 100644 src/qt_gui/translations/ja_JP.ts create mode 100644 src/qt_gui/translations/ko_KR.ts create mode 100644 src/qt_gui/translations/lt_LT.ts create mode 100644 src/qt_gui/translations/nb.ts create mode 100644 src/qt_gui/translations/nl.ts create mode 100644 src/qt_gui/translations/pl_PL.ts create mode 100644 src/qt_gui/translations/pt_BR.ts create mode 100644 src/qt_gui/translations/ro_RO.ts create mode 100644 src/qt_gui/translations/ru_RU.ts create mode 100644 src/qt_gui/translations/tr_TR.ts create mode 100644 src/qt_gui/translations/vi_VN.ts create mode 100644 src/qt_gui/translations/zh_CN.ts create mode 100644 src/qt_gui/translations/zh_TW.ts diff --git a/CMakeLists.txt b/CMakeLists.txt index 0ff00d6f5..721f11287 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -113,11 +113,27 @@ add_subdirectory(externals) include_directories(src) if(ENABLE_QT_GUI) - find_package(Qt6 REQUIRED COMPONENTS Widgets Concurrent) + find_package(Qt6 REQUIRED COMPONENTS Widgets Concurrent LinguistTools) qt_standard_project_setup() set(CMAKE_AUTORCC ON) set(CMAKE_AUTOMOC ON) set(CMAKE_AUTOUIC ON) + + set(QT_TRANSLATIONS "${PROJECT_SOURCE_DIR}/src/qt_gui/translations") + file(GLOB_RECURSE TRANSLATIONS_TS ${QT_TRANSLATIONS}/*.ts) + + set_source_files_properties(${TRANSLATIONS_TS} PROPERTIES OUTPUT_LOCATION "${CMAKE_CURRENT_BINARY_DIR}/translations") + qt_add_translation(TRANSLATIONS_QM ${TRANSLATIONS_TS}) + + set(TRANSLATIONS_QRC ${CMAKE_CURRENT_BINARY_DIR}/translations/translations.qrc) + file(WRITE ${TRANSLATIONS_QRC} "\n") + foreach (QM ${TRANSLATIONS_QM}) + get_filename_component(QM_FILE ${QM} NAME) + file(APPEND ${TRANSLATIONS_QRC} "${QM_FILE}\n") + endforeach (QM) + file(APPEND ${TRANSLATIONS_QRC} "") + + qt_add_resources(TRANSLATIONS ${TRANSLATIONS_QRC}) endif() set(AUDIO_CORE src/audio_core/sdl_audio.cpp @@ -574,6 +590,7 @@ set(QT_GUI src/qt_gui/about_dialog.cpp src/qt_gui/main.cpp ${EMULATOR} ${RESOURCE_FILES} + ${TRANSLATIONS} ) endif() diff --git a/src/common/config.cpp b/src/common/config.cpp index ddd1d3257..0659a987f 100644 --- a/src/common/config.cpp +++ b/src/common/config.cpp @@ -45,6 +45,7 @@ u32 m_window_size_H = 720; std::vector m_pkg_viewer; std::vector m_elf_viewer; std::vector m_recent_files; +std::string emulator_language = "en"; // Settings u32 m_language = 1; // english @@ -242,6 +243,10 @@ void setRecentFiles(const std::vector& recentFiles) { m_recent_files = recentFiles; } +void setEmulatorLanguage(std::string language) { + emulator_language = language; +} + u32 getMainWindowGeometryX() { return main_window_geometry_x; } @@ -291,6 +296,10 @@ std::vector getRecentFiles() { return m_recent_files; } +std::string getEmulatorLanguage() { + return emulator_language; +} + u32 GetLanguage() { return m_language; } @@ -368,6 +377,7 @@ void load(const std::filesystem::path& path) { m_elf_viewer = toml::find_or>(gui, "elfDirs", {}); m_recent_files = toml::find_or>(gui, "recentFiles", {}); m_table_mode = toml::find_or(gui, "gameTableMode", 0); + emulator_language = toml::find_or(gui, "emulatorLanguage", "en"); } if (data.contains("Settings")) { @@ -430,6 +440,7 @@ void save(const std::filesystem::path& path) { data["GUI"]["pkgDirs"] = m_pkg_viewer; data["GUI"]["elfDirs"] = m_elf_viewer; data["GUI"]["recentFiles"] = m_recent_files; + data["GUI"]["emulatorLanguage"] = emulator_language; data["Settings"]["consoleLanguage"] = m_language; @@ -454,6 +465,7 @@ void setDefaultValues() { vblankDivider = 1; vkValidation = false; rdocEnable = false; + emulator_language = "en"; m_language = 1; gpuId = -1; } diff --git a/src/common/config.h b/src/common/config.h index 9bf91e692..458fa88c3 100644 --- a/src/common/config.h +++ b/src/common/config.h @@ -69,6 +69,7 @@ void setMainWindowHeight(u32 height); void setPkgViewer(const std::vector& pkgList); void setElfViewer(const std::vector& elfList); void setRecentFiles(const std::vector& recentFiles); +void setEmulatorLanguage(std::string language); u32 getMainWindowGeometryX(); u32 getMainWindowGeometryY(); @@ -86,6 +87,7 @@ u32 getMainWindowHeight(); std::vector getPkgViewer(); std::vector getElfViewer(); std::vector getRecentFiles(); +std::string getEmulatorLanguage(); void setDefaultValues(); diff --git a/src/qt_gui/game_info.cpp b/src/qt_gui/game_info.cpp index d2bf3bb2d..2821a0322 100644 --- a/src/qt_gui/game_info.cpp +++ b/src/qt_gui/game_info.cpp @@ -23,8 +23,8 @@ void GameInfoClass::GetGameInfo(QWidget* parent) { }).results(); // Progress bar, please be patient :) - QProgressDialog dialog("Loading game list, please wait :3", "Cancel", 0, 0, parent); - dialog.setWindowTitle("Loading..."); + QProgressDialog dialog(tr("Loading game list, please wait :3"), tr("Cancel"), 0, 0, parent); + dialog.setWindowTitle(tr("Loading...")); QFutureWatcher futureWatcher; GameListUtils game_util; diff --git a/src/qt_gui/game_install_dialog.cpp b/src/qt_gui/game_install_dialog.cpp index 4b2b8528b..5f031bdec 100644 --- a/src/qt_gui/game_install_dialog.cpp +++ b/src/qt_gui/game_install_dialog.cpp @@ -21,14 +21,14 @@ GameInstallDialog::GameInstallDialog() : m_gamesDirectory(nullptr) { layout->addStretch(); layout->addWidget(SetupDialogActions()); - setWindowTitle("shadPS4 - Choose directory"); + setWindowTitle(tr("shadPS4 - Choose directory")); setWindowIcon(QIcon(":images/shadps4.ico")); } GameInstallDialog::~GameInstallDialog() {} void GameInstallDialog::Browse() { - auto path = QFileDialog::getExistingDirectory(this, "Directory to install games"); + auto path = QFileDialog::getExistingDirectory(this, tr("Directory to install games")); if (!path.isEmpty()) { m_gamesDirectory->setText(QDir::toNativeSeparators(path)); @@ -36,7 +36,7 @@ void GameInstallDialog::Browse() { } QWidget* GameInstallDialog::SetupGamesDirectory() { - auto group = new QGroupBox("Directory to install games"); + auto group = new QGroupBox(tr("Directory to install games")); auto layout = new QHBoxLayout(group); // Input. @@ -47,7 +47,7 @@ QWidget* GameInstallDialog::SetupGamesDirectory() { layout->addWidget(m_gamesDirectory); // Browse button. - auto browse = new QPushButton("Browse"); + auto browse = new QPushButton(tr("Browse")); connect(browse, &QPushButton::clicked, this, &GameInstallDialog::Browse); @@ -71,7 +71,7 @@ void GameInstallDialog::Save() { if (gamesDirectory.isEmpty() || !QDir(gamesDirectory).exists() || !QDir::isAbsolutePath(gamesDirectory)) { - QMessageBox::critical(this, "Error", + QMessageBox::critical(this, tr("Error"), "The value for location to install games is not valid."); return; } diff --git a/src/qt_gui/gui_context_menus.h b/src/qt_gui/gui_context_menus.h index 16afdb188..f4bc519a2 100644 --- a/src/qt_gui/gui_context_menus.h +++ b/src/qt_gui/gui_context_menus.h @@ -36,10 +36,10 @@ public: // Setup menu. QMenu menu(widget); - QAction createShortcut("Create Shortcut", widget); - QAction openFolder("Open Game Folder", widget); - QAction openSfoViewer("SFO Viewer", widget); - QAction openTrophyViewer("Trophy Viewer", widget); + QAction createShortcut(tr("Create Shortcut"), widget); + QAction openFolder(tr("Open Game Folder"), widget); + QAction openSfoViewer(tr("SFO Viewer"), widget); + QAction openTrophyViewer(tr("Trophy Viewer"), widget); menu.addAction(&openFolder); menu.addAction(&createShortcut); @@ -47,10 +47,10 @@ public: menu.addAction(&openTrophyViewer); // "Copy" submenu. - QMenu* copyMenu = new QMenu("Copy info", widget); - QAction* copyName = new QAction("Copy Name", widget); - QAction* copySerial = new QAction("Copy Serial", widget); - QAction* copyNameAll = new QAction("Copy All", widget); + QMenu* copyMenu = new QMenu(tr("Copy info"), widget); + QAction* copyName = new QAction(tr("Copy Name"), widget); + QAction* copySerial = new QAction(tr("Copy Serial"), widget); + QAction* copyNameAll = new QAction(tr("Copy All"), widget); copyMenu->addAction(copyName); copyMenu->addAction(copySerial); @@ -116,7 +116,7 @@ public: tableWidget->horizontalHeader()->setVisible(false); tableWidget->horizontalHeader()->setSectionResizeMode(QHeaderView::Fixed); - tableWidget->setWindowTitle("SFO Viewer"); + tableWidget->setWindowTitle(tr("SFO Viewer")); tableWidget->show(); } } @@ -170,15 +170,15 @@ public: if (createShortcutLinux(linkPath, ebootPath, iconPath)) { #endif QMessageBox::information( - nullptr, "Shortcut creation", - QString("Shortcut created successfully!\n %1").arg(linkPath)); + nullptr, tr("Shortcut creation"), + QString(tr("Shortcut created successfully!\n %1")).arg(linkPath)); } else { QMessageBox::critical( - nullptr, "Error", - QString("Error creating shortcut!\n %1").arg(linkPath)); + nullptr, tr("Error"), + QString(tr("Error creating shortcut!\n %1")).arg(linkPath)); } } else { - QMessageBox::critical(nullptr, "Error", "Failed to convert icon."); + QMessageBox::critical(nullptr, tr("Error"), tr("Failed to convert icon.")); } } else { // If the icon is already in ICO format, we just create the shortcut @@ -188,11 +188,12 @@ public: if (createShortcutLinux(linkPath, ebootPath, iconPath)) { #endif QMessageBox::information( - nullptr, "Shortcut creation", - QString("Shortcut created successfully!\n %1").arg(linkPath)); + nullptr, tr("Shortcut creation"), + QString(tr("Shortcut created successfully!\n %1")).arg(linkPath)); } else { - QMessageBox::critical(nullptr, "Error", - QString("Error creating shortcut!\n %1").arg(linkPath)); + QMessageBox::critical( + nullptr, tr("Error"), + QString(tr("Error creating shortcut!\n %1")).arg(linkPath)); } } } @@ -249,7 +250,7 @@ public: int itemIndex = GetRowIndex(treeWidget, currentItem); // row QMenu menu(treeWidget); - QAction installPackage("Install PKG", treeWidget); + QAction installPackage(tr("Install PKG"), treeWidget); menu.addAction(&installPackage); diff --git a/src/qt_gui/main_window.cpp b/src/qt_gui/main_window.cpp index b6711d719..64a89c6a6 100644 --- a/src/qt_gui/main_window.cpp +++ b/src/qt_gui/main_window.cpp @@ -37,6 +37,7 @@ bool MainWindow::Init() { SetLastUsedTheme(); SetLastIconSizeBullet(); GetPhysicalDevices(); + LoadTranslation(); // show ui setMinimumSize(350, minimumSizeHint().height()); setWindowTitle(QString::fromStdString("shadPS4 v" + std::string(Common::VERSION))); @@ -200,11 +201,19 @@ void MainWindow::CreateConnects() { connect(ui->configureAct, &QAction::triggered, this, [this]() { auto settingsDialog = new SettingsDialog(m_physical_devices, this); + + connect(settingsDialog, &SettingsDialog::LanguageChanged, this, + &MainWindow::OnLanguageChanged); + settingsDialog->exec(); }); connect(ui->settingsButton, &QPushButton::clicked, this, [this]() { auto settingsDialog = new SettingsDialog(m_physical_devices, this); + + connect(settingsDialog, &SettingsDialog::LanguageChanged, this, + &MainWindow::OnLanguageChanged); + settingsDialog->exec(); }); @@ -781,3 +790,35 @@ void MainWindow::CreateRecentGameActions() { emulator.Run(gamePath.toUtf8().constData()); }); } + +void MainWindow::LoadTranslation() { + auto language = QString::fromStdString(Config::getEmulatorLanguage()); + + const QString base_dir = QStringLiteral(":/translations"); + QString base_path = QStringLiteral("%1/%2.qm").arg(base_dir).arg(language); + + if (QFile::exists(base_path)) { + if (translator != nullptr) { + qApp->removeTranslator(translator); + } + + translator = new QTranslator(qApp); + if (!translator->load(base_path)) { + QMessageBox::warning( + nullptr, QStringLiteral("Translation Error"), + QStringLiteral("Failed to find load translation file for '%1':\n%2") + .arg(language) + .arg(base_path)); + delete translator; + } else { + qApp->installTranslator(translator); + ui->retranslateUi(this); + } + } +} + +void MainWindow::OnLanguageChanged(const std::string& locale) { + Config::setEmulatorLanguage(locale); + + LoadTranslation(); +} \ No newline at end of file diff --git a/src/qt_gui/main_window.h b/src/qt_gui/main_window.h index 1abe17625..d3b83e619 100644 --- a/src/qt_gui/main_window.h +++ b/src/qt_gui/main_window.h @@ -5,6 +5,7 @@ #include #include +#include #include "common/config.h" #include "common/path_util.h" @@ -43,6 +44,7 @@ private Q_SLOTS: void ShowGameList(); void RefreshGameTable(); void HandleResize(QResizeEvent* event); + void OnLanguageChanged(const std::string& locale); private: Ui_MainWindow* ui; @@ -59,6 +61,7 @@ private: void InstallPkg(); void BootGame(); void AddRecentFiles(QString filePath); + void LoadTranslation(); QIcon RecolorIcon(const QIcon& icon, bool isWhite); bool isIconBlack = false; bool isTableList = true; @@ -84,6 +87,8 @@ private: std::shared_ptr m_game_info = std::make_shared(); + QTranslator* translator; + protected: void dragEnterEvent(QDragEnterEvent* event1) override { if (event1->mimeData()->hasUrls()) { diff --git a/src/qt_gui/settings_dialog.cpp b/src/qt_gui/settings_dialog.cpp index 09247951a..d572915c6 100644 --- a/src/qt_gui/settings_dialog.cpp +++ b/src/qt_gui/settings_dialog.cpp @@ -2,7 +2,9 @@ // SPDX-License-Identifier: GPL-2.0-or-later #include +#include +#include "main_window.h" #include "settings_dialog.h" #include "ui_settings_dialog.h" @@ -60,6 +62,7 @@ SettingsDialog::SettingsDialog(std::span physical_devices, QWidge completer->setCaseSensitivity(Qt::CaseInsensitive); ui->consoleLanguageComboBox->setCompleter(completer); + InitializeEmulatorLanguages(); LoadValuesFromConfig(); connect(ui->buttonBox, &QDialogButtonBox::rejected, this, &QWidget::close); @@ -158,6 +161,7 @@ void SettingsDialog::LoadValuesFromConfig() { languageIndexes.begin(), std::find(languageIndexes.begin(), languageIndexes.end(), Config::GetLanguage())) % languageIndexes.size()); + ui->emulatorLanguageComboBox->setCurrentIndex(languages[Config::getEmulatorLanguage()]); ui->graphicsAdapterBox->setCurrentIndex(Config::getGpuId() + 1); ui->widthSpinBox->setValue(Config::getScreenWidth()); ui->heightSpinBox->setValue(Config::getScreenHeight()); @@ -179,6 +183,35 @@ void SettingsDialog::LoadValuesFromConfig() { ui->rdocCheckBox->setChecked(Config::isRdocEnabled()); } +void SettingsDialog::InitializeEmulatorLanguages() { + QDirIterator it(QStringLiteral(":/translations"), QDirIterator::NoIteratorFlags); + + int idx = 0; + while (it.hasNext()) { + QString locale = it.next(); + locale.truncate(locale.lastIndexOf(QLatin1Char{'.'})); + locale.remove(0, locale.lastIndexOf(QLatin1Char{'/'}) + 1); + const QString lang = QLocale::languageToString(QLocale(locale).language()); + const QString country = QLocale::territoryToString(QLocale(locale).territory()); + ui->emulatorLanguageComboBox->addItem(QStringLiteral("%1 (%2)").arg(lang, country), locale); + + languages[locale.toStdString()] = idx; + idx++; + } + + connect(ui->emulatorLanguageComboBox, qOverload(&QComboBox::currentIndexChanged), this, + &SettingsDialog::OnLanguageChanged); +} + +void SettingsDialog::OnLanguageChanged(int index) { + if (index == -1) + return; + + ui->retranslateUi(this); + + emit LanguageChanged(ui->emulatorLanguageComboBox->itemData(index).toString().toStdString()); +} + int SettingsDialog::exec() { return QDialog::exec(); } diff --git a/src/qt_gui/settings_dialog.h b/src/qt_gui/settings_dialog.h index 7d8701093..ddae7daac 100644 --- a/src/qt_gui/settings_dialog.h +++ b/src/qt_gui/settings_dialog.h @@ -22,8 +22,15 @@ public: int exec() override; +signals: + void LanguageChanged(const std::string& locale); + private: void LoadValuesFromConfig(); + void InitializeEmulatorLanguages(); + void OnLanguageChanged(int index); std::unique_ptr ui; + + std::map languages; }; diff --git a/src/qt_gui/settings_dialog.ui b/src/qt_gui/settings_dialog.ui index d11f177d1..1ecd12495 100644 --- a/src/qt_gui/settings_dialog.ui +++ b/src/qt_gui/settings_dialog.ui @@ -79,32 +79,6 @@ System - - - - 6 - - - 0 - - - - - - - Username - - - - - - - - - - - - @@ -117,6 +91,18 @@ + + + + Emulator Language + + + + + + + + @@ -156,17 +142,30 @@ - - - Qt::Orientation::Horizontal + + + 6 - - - 40 - 20 - + + 0 - + + + + + + Username + + + + + + + + + + + diff --git a/src/qt_gui/translations/da_DK.ts b/src/qt_gui/translations/da_DK.ts new file mode 100644 index 000000000..0f4489eed --- /dev/null +++ b/src/qt_gui/translations/da_DK.ts @@ -0,0 +1,491 @@ + + + + AboutDialog + + + About shadPS4 + About shadPS4 + + + + shadPS4 + shadPS4 + + + + shadPS4 is an experimental open-source emulator for the PlayStation 4. + shadPS4 is an experimental open-source emulator for the PlayStation 4. + + + + This software should not be used to play games you have not legally obtained. + This software should not be used to play games you have not legally obtained. + + + + ElfViewer + + + Open Folder + Open Folder + + + + GameInfoClass + + + Loading game list, please wait :3 + Loading game list, please wait :3 + + + + Cancel + Cancel + + + + Loading... + Loading... + + + + GameInstallDialog + + + shadPS4 - Choose directory + shadPS4 - Choose directory + + + + Directory to install games + Directory to install games + + + + Browse + Browse + + + + Error + Error + + + + The value for location to install games is not valid. + The value for location to install games is not valid. + + + + GuiContextMenus + + + Create Shortcut + Create Shortcut + + + + Open Game Folder + Open Game Folder + + + + SFO Viewer + SFO Viewer + + + + Trophy Viewer + Trophy Viewer + + + + Copy info + Copy info + + + + Copy Name + Copy Name + + + + Copy Serial + Copy Serial + + + + Copy All + Copy All + + + + Shortcut creation + Shortcut creation + + + + Shortcut created successfully!\n %1 + Shortcut created successfully!\n %1 + + + + Error + Error + + + + Error creating shortcut!\n %1 + Error creating shortcut!\n %1 + + + + Install PKG + Install PKG + + + + MainWindow + + + Open/Add Elf Folder + Open/Add Elf Folder + + + + Install Packages (PKG) + Install Packages (PKG) + + + + Boot Game + Boot Game + + + + About shadPS4 + About shadPS4 + + + + Configure... + Configure... + + + + Install application from a .pkg file + Install application from a .pkg file + + + + Recent Games + Recent Games + + + + Exit + Exit + + + + Exit shadPS4 + Exit shadPS4 + + + + Exit the application. + Exit the application. + + + + Show Game List + Show Game List + + + + Game List Refresh + Game List Refresh + + + + Tiny + Tiny + + + + Small + Small + + + + Medium + Medium + + + + Large + Large + + + + List View + List View + + + + Grid View + Grid View + + + + Elf Viewer + Elf Viewer + + + + Game Install Directory + Game Install Directory + + + + Dump Game List + Dump Game List + + + + PKG Viewer + PKG Viewer + + + + Search... + Search... + + + + File + File + + + + View + View + + + + Game List Icons + Game List Icons + + + + Game List Mode + Game List Mode + + + + Settings + Settings + + + + Utils + Utils + + + + Themes + Themes + + + + About + About + + + + Dark + Dark + + + + Light + Light + + + + Green + Green + + + + Blue + Blue + + + + Violet + Violet + + + + toolBar + toolBar + + + + PKGViewer + + + Open Folder + Open Folder + + + + TrophyViewer + + + Trophy Viewer + Trophy Viewer + + + + SettingsDialog + + + Settings + Settings + + + + General + General + + + + System + System + + + + Console Language + Console Language + + + + Emulator Language + Emulator Language + + + + Emulator + Emulator + + + + Enable Fullscreen + Enable Fullscreen + + + + Show Splash + Show Splash + + + + Is PS4 Pro + Is PS4 Pro + + + + Username + Username + + + + Logger + Logger + + + + Log Type + Log Type + + + + Log Filter + Log Filter + + + + Graphics + Graphics + + + + Graphics Device + Graphics Device + + + + Width + Width + + + + Height + Height + + + + Vblank Divider + Vblank Divider + + + + Advanced + Advanced + + + + Enable Shaders Dumping + Enable Shaders Dumping + + + + Enable NULL GPU + Enable NULL GPU + + + + Enable PM4 Dumping + Enable PM4 Dumping + + + + Debug + Debug + + + + Enable Debug Dumping + Enable Debug Dumping + + + + Enable Vulkan Validation Layers + Enable Vulkan Validation Layers + + + + Enable Vulkan Synchronization Validation + Enable Vulkan Synchronization Validation + + + + Enable RenderDoc Debugging + Enable RenderDoc Debugging + + + \ No newline at end of file diff --git a/src/qt_gui/translations/de.ts b/src/qt_gui/translations/de.ts new file mode 100644 index 000000000..1ff204df9 --- /dev/null +++ b/src/qt_gui/translations/de.ts @@ -0,0 +1,491 @@ + + + + AboutDialog + + + About shadPS4 + About shadPS4 + + + + shadPS4 + shadPS4 + + + + shadPS4 is an experimental open-source emulator for the PlayStation 4. + shadPS4 is an experimental open-source emulator for the PlayStation 4. + + + + This software should not be used to play games you have not legally obtained. + This software should not be used to play games you have not legally obtained. + + + + ElfViewer + + + Open Folder + Open Folder + + + + GameInfoClass + + + Loading game list, please wait :3 + Loading game list, please wait :3 + + + + Cancel + Cancel + + + + Loading... + Loading... + + + + GameInstallDialog + + + shadPS4 - Choose directory + shadPS4 - Choose directory + + + + Directory to install games + Directory to install games + + + + Browse + Browse + + + + Error + Error + + + + The value for location to install games is not valid. + The value for location to install games is not valid. + + + + GuiContextMenus + + + Create Shortcut + Create Shortcut + + + + Open Game Folder + Open Game Folder + + + + SFO Viewer + SFO Viewer + + + + Trophy Viewer + Trophy Viewer + + + + Copy info + Copy info + + + + Copy Name + Copy Name + + + + Copy Serial + Copy Serial + + + + Copy All + Copy All + + + + Shortcut creation + Shortcut creation + + + + Shortcut created successfully!\n %1 + Shortcut created successfully!\n %1 + + + + Error + Error + + + + Error creating shortcut!\n %1 + Error creating shortcut!\n %1 + + + + Install PKG + Install PKG + + + + MainWindow + + + Open/Add Elf Folder + Open/Add Elf Folder + + + + Install Packages (PKG) + Install Packages (PKG) + + + + Boot Game + Boot Game + + + + About shadPS4 + About shadPS4 + + + + Configure... + Configure... + + + + Install application from a .pkg file + Install application from a .pkg file + + + + Recent Games + Recent Games + + + + Exit + Exit + + + + Exit shadPS4 + Exit shadPS4 + + + + Exit the application. + Exit the application. + + + + Show Game List + Show Game List + + + + Game List Refresh + Game List Refresh + + + + Tiny + Tiny + + + + Small + Small + + + + Medium + Medium + + + + Large + Large + + + + List View + List View + + + + Grid View + Grid View + + + + Elf Viewer + Elf Viewer + + + + Game Install Directory + Game Install Directory + + + + Dump Game List + Dump Game List + + + + PKG Viewer + PKG Viewer + + + + Search... + Search... + + + + File + File + + + + View + View + + + + Game List Icons + Game List Icons + + + + Game List Mode + Game List Mode + + + + Settings + Settings + + + + Utils + Utils + + + + Themes + Themes + + + + About + About + + + + Dark + Dark + + + + Light + Light + + + + Green + Green + + + + Blue + Blue + + + + Violet + Violet + + + + toolBar + toolBar + + + + PKGViewer + + + Open Folder + Open Folder + + + + TrophyViewer + + + Trophy Viewer + Trophy Viewer + + + + SettingsDialog + + + Settings + Settings + + + + General + General + + + + System + System + + + + Console Language + Console Language + + + + Emulator Language + Emulator Language + + + + Emulator + Emulator + + + + Enable Fullscreen + Enable Fullscreen + + + + Show Splash + Show Splash + + + + Is PS4 Pro + Is PS4 Pro + + + + Username + Username + + + + Logger + Logger + + + + Log Type + Log Type + + + + Log Filter + Log Filter + + + + Graphics + Graphics + + + + Graphics Device + Graphics Device + + + + Width + Width + + + + Height + Height + + + + Vblank Divider + Vblank Divider + + + + Advanced + Advanced + + + + Enable Shaders Dumping + Enable Shaders Dumping + + + + Enable NULL GPU + Enable NULL GPU + + + + Enable PM4 Dumping + Enable PM4 Dumping + + + + Debug + Debug + + + + Enable Debug Dumping + Enable Debug Dumping + + + + Enable Vulkan Validation Layers + Enable Vulkan Validation Layers + + + + Enable Vulkan Synchronization Validation + Enable Vulkan Synchronization Validation + + + + Enable RenderDoc Debugging + Enable RenderDoc Debugging + + + \ No newline at end of file diff --git a/src/qt_gui/translations/el.ts b/src/qt_gui/translations/el.ts new file mode 100644 index 000000000..b015954e6 --- /dev/null +++ b/src/qt_gui/translations/el.ts @@ -0,0 +1,491 @@ + + + + AboutDialog + + + About shadPS4 + About shadPS4 + + + + shadPS4 + shadPS4 + + + + shadPS4 is an experimental open-source emulator for the PlayStation 4. + shadPS4 is an experimental open-source emulator for the PlayStation 4. + + + + This software should not be used to play games you have not legally obtained. + This software should not be used to play games you have not legally obtained. + + + + ElfViewer + + + Open Folder + Open Folder + + + + GameInfoClass + + + Loading game list, please wait :3 + Loading game list, please wait :3 + + + + Cancel + Cancel + + + + Loading... + Loading... + + + + GameInstallDialog + + + shadPS4 - Choose directory + shadPS4 - Choose directory + + + + Directory to install games + Directory to install games + + + + Browse + Browse + + + + Error + Error + + + + The value for location to install games is not valid. + The value for location to install games is not valid. + + + + GuiContextMenus + + + Create Shortcut + Create Shortcut + + + + Open Game Folder + Open Game Folder + + + + SFO Viewer + SFO Viewer + + + + Trophy Viewer + Trophy Viewer + + + + Copy info + Copy info + + + + Copy Name + Copy Name + + + + Copy Serial + Copy Serial + + + + Copy All + Copy All + + + + Shortcut creation + Shortcut creation + + + + Shortcut created successfully!\n %1 + Shortcut created successfully!\n %1 + + + + Error + Error + + + + Error creating shortcut!\n %1 + Error creating shortcut!\n %1 + + + + Install PKG + Install PKG + + + + MainWindow + + + Open/Add Elf Folder + Open/Add Elf Folder + + + + Install Packages (PKG) + Install Packages (PKG) + + + + Boot Game + Boot Game + + + + About shadPS4 + About shadPS4 + + + + Configure... + Configure... + + + + Install application from a .pkg file + Install application from a .pkg file + + + + Recent Games + Recent Games + + + + Exit + Exit + + + + Exit shadPS4 + Exit shadPS4 + + + + Exit the application. + Exit the application. + + + + Show Game List + Show Game List + + + + Game List Refresh + Game List Refresh + + + + Tiny + Tiny + + + + Small + Small + + + + Medium + Medium + + + + Large + Large + + + + List View + List View + + + + Grid View + Grid View + + + + Elf Viewer + Elf Viewer + + + + Game Install Directory + Game Install Directory + + + + Dump Game List + Dump Game List + + + + PKG Viewer + PKG Viewer + + + + Search... + Search... + + + + File + File + + + + View + View + + + + Game List Icons + Game List Icons + + + + Game List Mode + Game List Mode + + + + Settings + Settings + + + + Utils + Utils + + + + Themes + Themes + + + + About + About + + + + Dark + Dark + + + + Light + Light + + + + Green + Green + + + + Blue + Blue + + + + Violet + Violet + + + + toolBar + toolBar + + + + PKGViewer + + + Open Folder + Open Folder + + + + TrophyViewer + + + Trophy Viewer + Trophy Viewer + + + + SettingsDialog + + + Settings + Settings + + + + General + General + + + + System + System + + + + Console Language + Console Language + + + + Emulator Language + Emulator Language + + + + Emulator + Emulator + + + + Enable Fullscreen + Enable Fullscreen + + + + Show Splash + Show Splash + + + + Is PS4 Pro + Is PS4 Pro + + + + Username + Username + + + + Logger + Logger + + + + Log Type + Log Type + + + + Log Filter + Log Filter + + + + Graphics + Graphics + + + + Graphics Device + Graphics Device + + + + Width + Width + + + + Height + Height + + + + Vblank Divider + Vblank Divider + + + + Advanced + Advanced + + + + Enable Shaders Dumping + Enable Shaders Dumping + + + + Enable NULL GPU + Enable NULL GPU + + + + Enable PM4 Dumping + Enable PM4 Dumping + + + + Debug + Debug + + + + Enable Debug Dumping + Enable Debug Dumping + + + + Enable Vulkan Validation Layers + Enable Vulkan Validation Layers + + + + Enable Vulkan Synchronization Validation + Enable Vulkan Synchronization Validation + + + + Enable RenderDoc Debugging + Enable RenderDoc Debugging + + + \ No newline at end of file diff --git a/src/qt_gui/translations/en.ts b/src/qt_gui/translations/en.ts new file mode 100644 index 000000000..5ceb11884 --- /dev/null +++ b/src/qt_gui/translations/en.ts @@ -0,0 +1,491 @@ + + + + AboutDialog + + + About shadPS4 + About shadPS4 + + + + shadPS4 + shadPS4 + + + + shadPS4 is an experimental open-source emulator for the PlayStation 4. + shadPS4 is an experimental open-source emulator for the PlayStation 4. + + + + This software should not be used to play games you have not legally obtained. + This software should not be used to play games you have not legally obtained. + + + + ElfViewer + + + Open Folder + Open Folder + + + + GameInfoClass + + + Loading game list, please wait :3 + Loading game list, please wait :3 + + + + Cancel + Cancel + + + + Loading... + Loading... + + + + GameInstallDialog + + + shadPS4 - Choose directory + shadPS4 - Choose directory + + + + Directory to install games + Directory to install games + + + + Browse + Browse + + + + Error + Error + + + + The value for location to install games is not valid. + The value for location to install games is not valid. + + + + GuiContextMenus + + + Create Shortcut + Create Shortcut + + + + Open Game Folder + Open Game Folder + + + + SFO Viewer + SFO Viewer + + + + Trophy Viewer + Trophy Viewer + + + + Copy info + Copy info + + + + Copy Name + Copy Name + + + + Copy Serial + Copy Serial + + + + Copy All + Copy All + + + + Shortcut creation + Shortcut creation + + + + Shortcut created successfully!\n %1 + Shortcut created successfully!\n %1 + + + + Error + Error + + + + Error creating shortcut!\n %1 + Error creating shortcut!\n %1 + + + + Install PKG + Install PKG + + + + MainWindow + + + Open/Add Elf Folder + Open/Add Elf Folder + + + + Install Packages (PKG) + Install Packages (PKG) + + + + Boot Game + Boot Game + + + + About shadPS4 + About shadPS4 + + + + Configure... + Configure... + + + + Install application from a .pkg file + Install application from a .pkg file + + + + Recent Games + Recent Games + + + + Exit + Exit + + + + Exit shadPS4 + Exit shadPS4 + + + + Exit the application. + Exit the application. + + + + Show Game List + Show Game List + + + + Game List Refresh + Game List Refresh + + + + Tiny + Tiny + + + + Small + Small + + + + Medium + Medium + + + + Large + Large + + + + List View + List View + + + + Grid View + Grid View + + + + Elf Viewer + Elf Viewer + + + + Game Install Directory + Game Install Directory + + + + Dump Game List + Dump Game List + + + + PKG Viewer + PKG Viewer + + + + Search... + Search... + + + + File + File + + + + View + View + + + + Game List Icons + Game List Icons + + + + Game List Mode + Game List Mode + + + + Settings + Settings + + + + Utils + Utils + + + + Themes + Themes + + + + About + About + + + + Dark + Dark + + + + Light + Light + + + + Green + Green + + + + Blue + Blue + + + + Violet + Violet + + + + toolBar + toolBar + + + + PKGViewer + + + Open Folder + Open Folder + + + + TrophyViewer + + + Trophy Viewer + Trophy Viewer + + + + SettingsDialog + + + Settings + Settings + + + + General + General + + + + System + System + + + + Console Language + Console Language + + + + Emulator Language + Emulator Language + + + + Emulator + Emulator + + + + Enable Fullscreen + Enable Fullscreen + + + + Show Splash + Show Splash + + + + Is PS4 Pro + Is PS4 Pro + + + + Username + Username + + + + Logger + Logger + + + + Log Type + Log Type + + + + Log Filter + Log Filter + + + + Graphics + Graphics + + + + Graphics Device + Graphics Device + + + + Width + Width + + + + Height + Height + + + + Vblank Divider + Vblank Divider + + + + Advanced + Advanced + + + + Enable Shaders Dumping + Enable Shaders Dumping + + + + Enable NULL GPU + Enable NULL GPU + + + + Enable PM4 Dumping + Enable PM4 Dumping + + + + Debug + Debug + + + + Enable Debug Dumping + Enable Debug Dumping + + + + Enable Vulkan Validation Layers + Enable Vulkan Validation Layers + + + + Enable Vulkan Synchronization Validation + Enable Vulkan Synchronization Validation + + + + Enable RenderDoc Debugging + Enable RenderDoc Debugging + + + \ No newline at end of file diff --git a/src/qt_gui/translations/es_ES.ts b/src/qt_gui/translations/es_ES.ts new file mode 100644 index 000000000..eedd4f6d4 --- /dev/null +++ b/src/qt_gui/translations/es_ES.ts @@ -0,0 +1,491 @@ + + + + AboutDialog + + + About shadPS4 + About shadPS4 + + + + shadPS4 + shadPS4 + + + + shadPS4 is an experimental open-source emulator for the PlayStation 4. + shadPS4 is an experimental open-source emulator for the PlayStation 4. + + + + This software should not be used to play games you have not legally obtained. + This software should not be used to play games you have not legally obtained. + + + + ElfViewer + + + Open Folder + Open Folder + + + + GameInfoClass + + + Loading game list, please wait :3 + Loading game list, please wait :3 + + + + Cancel + Cancel + + + + Loading... + Loading... + + + + GameInstallDialog + + + shadPS4 - Choose directory + shadPS4 - Choose directory + + + + Directory to install games + Directory to install games + + + + Browse + Browse + + + + Error + Error + + + + The value for location to install games is not valid. + The value for location to install games is not valid. + + + + GuiContextMenus + + + Create Shortcut + Create Shortcut + + + + Open Game Folder + Open Game Folder + + + + SFO Viewer + SFO Viewer + + + + Trophy Viewer + Trophy Viewer + + + + Copy info + Copy info + + + + Copy Name + Copy Name + + + + Copy Serial + Copy Serial + + + + Copy All + Copy All + + + + Shortcut creation + Shortcut creation + + + + Shortcut created successfully!\n %1 + Shortcut created successfully!\n %1 + + + + Error + Error + + + + Error creating shortcut!\n %1 + Error creating shortcut!\n %1 + + + + Install PKG + Install PKG + + + + MainWindow + + + Open/Add Elf Folder + Open/Add Elf Folder + + + + Install Packages (PKG) + Install Packages (PKG) + + + + Boot Game + Boot Game + + + + About shadPS4 + About shadPS4 + + + + Configure... + Configure... + + + + Install application from a .pkg file + Install application from a .pkg file + + + + Recent Games + Recent Games + + + + Exit + Exit + + + + Exit shadPS4 + Exit shadPS4 + + + + Exit the application. + Exit the application. + + + + Show Game List + Show Game List + + + + Game List Refresh + Game List Refresh + + + + Tiny + Tiny + + + + Small + Small + + + + Medium + Medium + + + + Large + Large + + + + List View + List View + + + + Grid View + Grid View + + + + Elf Viewer + Elf Viewer + + + + Game Install Directory + Game Install Directory + + + + Dump Game List + Dump Game List + + + + PKG Viewer + PKG Viewer + + + + Search... + Search... + + + + File + File + + + + View + View + + + + Game List Icons + Game List Icons + + + + Game List Mode + Game List Mode + + + + Settings + Settings + + + + Utils + Utils + + + + Themes + Themes + + + + About + About + + + + Dark + Dark + + + + Light + Light + + + + Green + Green + + + + Blue + Blue + + + + Violet + Violet + + + + toolBar + toolBar + + + + PKGViewer + + + Open Folder + Open Folder + + + + TrophyViewer + + + Trophy Viewer + Trophy Viewer + + + + SettingsDialog + + + Settings + Settings + + + + General + General + + + + System + System + + + + Console Language + Console Language + + + + Emulator Language + Emulator Language + + + + Emulator + Emulator + + + + Enable Fullscreen + Enable Fullscreen + + + + Show Splash + Show Splash + + + + Is PS4 Pro + Is PS4 Pro + + + + Username + Username + + + + Logger + Logger + + + + Log Type + Log Type + + + + Log Filter + Log Filter + + + + Graphics + Graphics + + + + Graphics Device + Graphics Device + + + + Width + Width + + + + Height + Height + + + + Vblank Divider + Vblank Divider + + + + Advanced + Advanced + + + + Enable Shaders Dumping + Enable Shaders Dumping + + + + Enable NULL GPU + Enable NULL GPU + + + + Enable PM4 Dumping + Enable PM4 Dumping + + + + Debug + Debug + + + + Enable Debug Dumping + Enable Debug Dumping + + + + Enable Vulkan Validation Layers + Enable Vulkan Validation Layers + + + + Enable Vulkan Synchronization Validation + Enable Vulkan Synchronization Validation + + + + Enable RenderDoc Debugging + Enable RenderDoc Debugging + + + \ No newline at end of file diff --git a/src/qt_gui/translations/fi.ts b/src/qt_gui/translations/fi.ts new file mode 100644 index 000000000..af605d641 --- /dev/null +++ b/src/qt_gui/translations/fi.ts @@ -0,0 +1,491 @@ + + + + AboutDialog + + + About shadPS4 + About shadPS4 + + + + shadPS4 + shadPS4 + + + + shadPS4 is an experimental open-source emulator for the PlayStation 4. + shadPS4 is an experimental open-source emulator for the PlayStation 4. + + + + This software should not be used to play games you have not legally obtained. + This software should not be used to play games you have not legally obtained. + + + + ElfViewer + + + Open Folder + Open Folder + + + + GameInfoClass + + + Loading game list, please wait :3 + Loading game list, please wait :3 + + + + Cancel + Cancel + + + + Loading... + Loading... + + + + GameInstallDialog + + + shadPS4 - Choose directory + shadPS4 - Choose directory + + + + Directory to install games + Directory to install games + + + + Browse + Browse + + + + Error + Error + + + + The value for location to install games is not valid. + The value for location to install games is not valid. + + + + GuiContextMenus + + + Create Shortcut + Create Shortcut + + + + Open Game Folder + Open Game Folder + + + + SFO Viewer + SFO Viewer + + + + Trophy Viewer + Trophy Viewer + + + + Copy info + Copy info + + + + Copy Name + Copy Name + + + + Copy Serial + Copy Serial + + + + Copy All + Copy All + + + + Shortcut creation + Shortcut creation + + + + Shortcut created successfully!\n %1 + Shortcut created successfully!\n %1 + + + + Error + Error + + + + Error creating shortcut!\n %1 + Error creating shortcut!\n %1 + + + + Install PKG + Install PKG + + + + MainWindow + + + Open/Add Elf Folder + Open/Add Elf Folder + + + + Install Packages (PKG) + Install Packages (PKG) + + + + Boot Game + Boot Game + + + + About shadPS4 + About shadPS4 + + + + Configure... + Configure... + + + + Install application from a .pkg file + Install application from a .pkg file + + + + Recent Games + Recent Games + + + + Exit + Exit + + + + Exit shadPS4 + Exit shadPS4 + + + + Exit the application. + Exit the application. + + + + Show Game List + Show Game List + + + + Game List Refresh + Game List Refresh + + + + Tiny + Tiny + + + + Small + Small + + + + Medium + Medium + + + + Large + Large + + + + List View + List View + + + + Grid View + Grid View + + + + Elf Viewer + Elf Viewer + + + + Game Install Directory + Game Install Directory + + + + Dump Game List + Dump Game List + + + + PKG Viewer + PKG Viewer + + + + Search... + Search... + + + + File + File + + + + View + View + + + + Game List Icons + Game List Icons + + + + Game List Mode + Game List Mode + + + + Settings + Settings + + + + Utils + Utils + + + + Themes + Themes + + + + About + About + + + + Dark + Dark + + + + Light + Light + + + + Green + Green + + + + Blue + Blue + + + + Violet + Violet + + + + toolBar + toolBar + + + + PKGViewer + + + Open Folder + Open Folder + + + + TrophyViewer + + + Trophy Viewer + Trophy Viewer + + + + SettingsDialog + + + Settings + Settings + + + + General + General + + + + System + System + + + + Console Language + Console Language + + + + Emulator Language + Emulator Language + + + + Emulator + Emulator + + + + Enable Fullscreen + Enable Fullscreen + + + + Show Splash + Show Splash + + + + Is PS4 Pro + Is PS4 Pro + + + + Username + Username + + + + Logger + Logger + + + + Log Type + Log Type + + + + Log Filter + Log Filter + + + + Graphics + Graphics + + + + Graphics Device + Graphics Device + + + + Width + Width + + + + Height + Height + + + + Vblank Divider + Vblank Divider + + + + Advanced + Advanced + + + + Enable Shaders Dumping + Enable Shaders Dumping + + + + Enable NULL GPU + Enable NULL GPU + + + + Enable PM4 Dumping + Enable PM4 Dumping + + + + Debug + Debug + + + + Enable Debug Dumping + Enable Debug Dumping + + + + Enable Vulkan Validation Layers + Enable Vulkan Validation Layers + + + + Enable Vulkan Synchronization Validation + Enable Vulkan Synchronization Validation + + + + Enable RenderDoc Debugging + Enable RenderDoc Debugging + + + \ No newline at end of file diff --git a/src/qt_gui/translations/fr.ts b/src/qt_gui/translations/fr.ts new file mode 100644 index 000000000..d56f6e427 --- /dev/null +++ b/src/qt_gui/translations/fr.ts @@ -0,0 +1,491 @@ + + + + AboutDialog + + + About shadPS4 + About shadPS4 + + + + shadPS4 + shadPS4 + + + + shadPS4 is an experimental open-source emulator for the PlayStation 4. + shadPS4 is an experimental open-source emulator for the PlayStation 4. + + + + This software should not be used to play games you have not legally obtained. + This software should not be used to play games you have not legally obtained. + + + + ElfViewer + + + Open Folder + Open Folder + + + + GameInfoClass + + + Loading game list, please wait :3 + Loading game list, please wait :3 + + + + Cancel + Cancel + + + + Loading... + Loading... + + + + GameInstallDialog + + + shadPS4 - Choose directory + shadPS4 - Choose directory + + + + Directory to install games + Directory to install games + + + + Browse + Browse + + + + Error + Error + + + + The value for location to install games is not valid. + The value for location to install games is not valid. + + + + GuiContextMenus + + + Create Shortcut + Create Shortcut + + + + Open Game Folder + Open Game Folder + + + + SFO Viewer + SFO Viewer + + + + Trophy Viewer + Trophy Viewer + + + + Copy info + Copy info + + + + Copy Name + Copy Name + + + + Copy Serial + Copy Serial + + + + Copy All + Copy All + + + + Shortcut creation + Shortcut creation + + + + Shortcut created successfully!\n %1 + Shortcut created successfully!\n %1 + + + + Error + Error + + + + Error creating shortcut!\n %1 + Error creating shortcut!\n %1 + + + + Install PKG + Install PKG + + + + MainWindow + + + Open/Add Elf Folder + Open/Add Elf Folder + + + + Install Packages (PKG) + Install Packages (PKG) + + + + Boot Game + Boot Game + + + + About shadPS4 + About shadPS4 + + + + Configure... + Configure... + + + + Install application from a .pkg file + Install application from a .pkg file + + + + Recent Games + Recent Games + + + + Exit + Exit + + + + Exit shadPS4 + Exit shadPS4 + + + + Exit the application. + Exit the application. + + + + Show Game List + Show Game List + + + + Game List Refresh + Game List Refresh + + + + Tiny + Tiny + + + + Small + Small + + + + Medium + Medium + + + + Large + Large + + + + List View + List View + + + + Grid View + Grid View + + + + Elf Viewer + Elf Viewer + + + + Game Install Directory + Game Install Directory + + + + Dump Game List + Dump Game List + + + + PKG Viewer + PKG Viewer + + + + Search... + Search... + + + + File + File + + + + View + View + + + + Game List Icons + Game List Icons + + + + Game List Mode + Game List Mode + + + + Settings + Settings + + + + Utils + Utils + + + + Themes + Themes + + + + About + About + + + + Dark + Dark + + + + Light + Light + + + + Green + Green + + + + Blue + Blue + + + + Violet + Violet + + + + toolBar + toolBar + + + + PKGViewer + + + Open Folder + Open Folder + + + + TrophyViewer + + + Trophy Viewer + Trophy Viewer + + + + SettingsDialog + + + Settings + Settings + + + + General + General + + + + System + System + + + + Console Language + Console Language + + + + Emulator Language + Emulator Language + + + + Emulator + Emulator + + + + Enable Fullscreen + Enable Fullscreen + + + + Show Splash + Show Splash + + + + Is PS4 Pro + Is PS4 Pro + + + + Username + Username + + + + Logger + Logger + + + + Log Type + Log Type + + + + Log Filter + Log Filter + + + + Graphics + Graphics + + + + Graphics Device + Graphics Device + + + + Width + Width + + + + Height + Height + + + + Vblank Divider + Vblank Divider + + + + Advanced + Advanced + + + + Enable Shaders Dumping + Enable Shaders Dumping + + + + Enable NULL GPU + Enable NULL GPU + + + + Enable PM4 Dumping + Enable PM4 Dumping + + + + Debug + Debug + + + + Enable Debug Dumping + Enable Debug Dumping + + + + Enable Vulkan Validation Layers + Enable Vulkan Validation Layers + + + + Enable Vulkan Synchronization Validation + Enable Vulkan Synchronization Validation + + + + Enable RenderDoc Debugging + Enable RenderDoc Debugging + + + \ No newline at end of file diff --git a/src/qt_gui/translations/hu_HU.ts b/src/qt_gui/translations/hu_HU.ts new file mode 100644 index 000000000..a32b2d2ad --- /dev/null +++ b/src/qt_gui/translations/hu_HU.ts @@ -0,0 +1,491 @@ + + + + AboutDialog + + + About shadPS4 + About shadPS4 + + + + shadPS4 + shadPS4 + + + + shadPS4 is an experimental open-source emulator for the PlayStation 4. + shadPS4 is an experimental open-source emulator for the PlayStation 4. + + + + This software should not be used to play games you have not legally obtained. + This software should not be used to play games you have not legally obtained. + + + + ElfViewer + + + Open Folder + Open Folder + + + + GameInfoClass + + + Loading game list, please wait :3 + Loading game list, please wait :3 + + + + Cancel + Cancel + + + + Loading... + Loading... + + + + GameInstallDialog + + + shadPS4 - Choose directory + shadPS4 - Choose directory + + + + Directory to install games + Directory to install games + + + + Browse + Browse + + + + Error + Error + + + + The value for location to install games is not valid. + The value for location to install games is not valid. + + + + GuiContextMenus + + + Create Shortcut + Create Shortcut + + + + Open Game Folder + Open Game Folder + + + + SFO Viewer + SFO Viewer + + + + Trophy Viewer + Trophy Viewer + + + + Copy info + Copy info + + + + Copy Name + Copy Name + + + + Copy Serial + Copy Serial + + + + Copy All + Copy All + + + + Shortcut creation + Shortcut creation + + + + Shortcut created successfully!\n %1 + Shortcut created successfully!\n %1 + + + + Error + Error + + + + Error creating shortcut!\n %1 + Error creating shortcut!\n %1 + + + + Install PKG + Install PKG + + + + MainWindow + + + Open/Add Elf Folder + Open/Add Elf Folder + + + + Install Packages (PKG) + Install Packages (PKG) + + + + Boot Game + Boot Game + + + + About shadPS4 + About shadPS4 + + + + Configure... + Configure... + + + + Install application from a .pkg file + Install application from a .pkg file + + + + Recent Games + Recent Games + + + + Exit + Exit + + + + Exit shadPS4 + Exit shadPS4 + + + + Exit the application. + Exit the application. + + + + Show Game List + Show Game List + + + + Game List Refresh + Game List Refresh + + + + Tiny + Tiny + + + + Small + Small + + + + Medium + Medium + + + + Large + Large + + + + List View + List View + + + + Grid View + Grid View + + + + Elf Viewer + Elf Viewer + + + + Game Install Directory + Game Install Directory + + + + Dump Game List + Dump Game List + + + + PKG Viewer + PKG Viewer + + + + Search... + Search... + + + + File + File + + + + View + View + + + + Game List Icons + Game List Icons + + + + Game List Mode + Game List Mode + + + + Settings + Settings + + + + Utils + Utils + + + + Themes + Themes + + + + About + About + + + + Dark + Dark + + + + Light + Light + + + + Green + Green + + + + Blue + Blue + + + + Violet + Violet + + + + toolBar + toolBar + + + + PKGViewer + + + Open Folder + Open Folder + + + + TrophyViewer + + + Trophy Viewer + Trophy Viewer + + + + SettingsDialog + + + Settings + Settings + + + + General + General + + + + System + System + + + + Console Language + Console Language + + + + Emulator Language + Emulator Language + + + + Emulator + Emulator + + + + Enable Fullscreen + Enable Fullscreen + + + + Show Splash + Show Splash + + + + Is PS4 Pro + Is PS4 Pro + + + + Username + Username + + + + Logger + Logger + + + + Log Type + Log Type + + + + Log Filter + Log Filter + + + + Graphics + Graphics + + + + Graphics Device + Graphics Device + + + + Width + Width + + + + Height + Height + + + + Vblank Divider + Vblank Divider + + + + Advanced + Advanced + + + + Enable Shaders Dumping + Enable Shaders Dumping + + + + Enable NULL GPU + Enable NULL GPU + + + + Enable PM4 Dumping + Enable PM4 Dumping + + + + Debug + Debug + + + + Enable Debug Dumping + Enable Debug Dumping + + + + Enable Vulkan Validation Layers + Enable Vulkan Validation Layers + + + + Enable Vulkan Synchronization Validation + Enable Vulkan Synchronization Validation + + + + Enable RenderDoc Debugging + Enable RenderDoc Debugging + + + \ No newline at end of file diff --git a/src/qt_gui/translations/id.ts b/src/qt_gui/translations/id.ts new file mode 100644 index 000000000..502be21e6 --- /dev/null +++ b/src/qt_gui/translations/id.ts @@ -0,0 +1,491 @@ + + + + AboutDialog + + + About shadPS4 + About shadPS4 + + + + shadPS4 + shadPS4 + + + + shadPS4 is an experimental open-source emulator for the PlayStation 4. + shadPS4 is an experimental open-source emulator for the PlayStation 4. + + + + This software should not be used to play games you have not legally obtained. + This software should not be used to play games you have not legally obtained. + + + + ElfViewer + + + Open Folder + Open Folder + + + + GameInfoClass + + + Loading game list, please wait :3 + Loading game list, please wait :3 + + + + Cancel + Cancel + + + + Loading... + Loading... + + + + GameInstallDialog + + + shadPS4 - Choose directory + shadPS4 - Choose directory + + + + Directory to install games + Directory to install games + + + + Browse + Browse + + + + Error + Error + + + + The value for location to install games is not valid. + The value for location to install games is not valid. + + + + GuiContextMenus + + + Create Shortcut + Create Shortcut + + + + Open Game Folder + Open Game Folder + + + + SFO Viewer + SFO Viewer + + + + Trophy Viewer + Trophy Viewer + + + + Copy info + Copy info + + + + Copy Name + Copy Name + + + + Copy Serial + Copy Serial + + + + Copy All + Copy All + + + + Shortcut creation + Shortcut creation + + + + Shortcut created successfully!\n %1 + Shortcut created successfully!\n %1 + + + + Error + Error + + + + Error creating shortcut!\n %1 + Error creating shortcut!\n %1 + + + + Install PKG + Install PKG + + + + MainWindow + + + Open/Add Elf Folder + Open/Add Elf Folder + + + + Install Packages (PKG) + Install Packages (PKG) + + + + Boot Game + Boot Game + + + + About shadPS4 + About shadPS4 + + + + Configure... + Configure... + + + + Install application from a .pkg file + Install application from a .pkg file + + + + Recent Games + Recent Games + + + + Exit + Exit + + + + Exit shadPS4 + Exit shadPS4 + + + + Exit the application. + Exit the application. + + + + Show Game List + Show Game List + + + + Game List Refresh + Game List Refresh + + + + Tiny + Tiny + + + + Small + Small + + + + Medium + Medium + + + + Large + Large + + + + List View + List View + + + + Grid View + Grid View + + + + Elf Viewer + Elf Viewer + + + + Game Install Directory + Game Install Directory + + + + Dump Game List + Dump Game List + + + + PKG Viewer + PKG Viewer + + + + Search... + Search... + + + + File + File + + + + View + View + + + + Game List Icons + Game List Icons + + + + Game List Mode + Game List Mode + + + + Settings + Settings + + + + Utils + Utils + + + + Themes + Themes + + + + About + About + + + + Dark + Dark + + + + Light + Light + + + + Green + Green + + + + Blue + Blue + + + + Violet + Violet + + + + toolBar + toolBar + + + + PKGViewer + + + Open Folder + Open Folder + + + + TrophyViewer + + + Trophy Viewer + Trophy Viewer + + + + SettingsDialog + + + Settings + Settings + + + + General + General + + + + System + System + + + + Console Language + Console Language + + + + Emulator Language + Emulator Language + + + + Emulator + Emulator + + + + Enable Fullscreen + Enable Fullscreen + + + + Show Splash + Show Splash + + + + Is PS4 Pro + Is PS4 Pro + + + + Username + Username + + + + Logger + Logger + + + + Log Type + Log Type + + + + Log Filter + Log Filter + + + + Graphics + Graphics + + + + Graphics Device + Graphics Device + + + + Width + Width + + + + Height + Height + + + + Vblank Divider + Vblank Divider + + + + Advanced + Advanced + + + + Enable Shaders Dumping + Enable Shaders Dumping + + + + Enable NULL GPU + Enable NULL GPU + + + + Enable PM4 Dumping + Enable PM4 Dumping + + + + Debug + Debug + + + + Enable Debug Dumping + Enable Debug Dumping + + + + Enable Vulkan Validation Layers + Enable Vulkan Validation Layers + + + + Enable Vulkan Synchronization Validation + Enable Vulkan Synchronization Validation + + + + Enable RenderDoc Debugging + Enable RenderDoc Debugging + + + \ No newline at end of file diff --git a/src/qt_gui/translations/it.ts b/src/qt_gui/translations/it.ts new file mode 100644 index 000000000..64d123f2e --- /dev/null +++ b/src/qt_gui/translations/it.ts @@ -0,0 +1,491 @@ + + + + AboutDialog + + + About shadPS4 + About shadPS4 + + + + shadPS4 + shadPS4 + + + + shadPS4 is an experimental open-source emulator for the PlayStation 4. + shadPS4 is an experimental open-source emulator for the PlayStation 4. + + + + This software should not be used to play games you have not legally obtained. + This software should not be used to play games you have not legally obtained. + + + + ElfViewer + + + Open Folder + Open Folder + + + + GameInfoClass + + + Loading game list, please wait :3 + Loading game list, please wait :3 + + + + Cancel + Cancel + + + + Loading... + Loading... + + + + GameInstallDialog + + + shadPS4 - Choose directory + shadPS4 - Choose directory + + + + Directory to install games + Directory to install games + + + + Browse + Browse + + + + Error + Error + + + + The value for location to install games is not valid. + The value for location to install games is not valid. + + + + GuiContextMenus + + + Create Shortcut + Create Shortcut + + + + Open Game Folder + Open Game Folder + + + + SFO Viewer + SFO Viewer + + + + Trophy Viewer + Trophy Viewer + + + + Copy info + Copy info + + + + Copy Name + Copy Name + + + + Copy Serial + Copy Serial + + + + Copy All + Copy All + + + + Shortcut creation + Shortcut creation + + + + Shortcut created successfully!\n %1 + Shortcut created successfully!\n %1 + + + + Error + Error + + + + Error creating shortcut!\n %1 + Error creating shortcut!\n %1 + + + + Install PKG + Install PKG + + + + MainWindow + + + Open/Add Elf Folder + Open/Add Elf Folder + + + + Install Packages (PKG) + Install Packages (PKG) + + + + Boot Game + Boot Game + + + + About shadPS4 + About shadPS4 + + + + Configure... + Configure... + + + + Install application from a .pkg file + Install application from a .pkg file + + + + Recent Games + Recent Games + + + + Exit + Exit + + + + Exit shadPS4 + Exit shadPS4 + + + + Exit the application. + Exit the application. + + + + Show Game List + Show Game List + + + + Game List Refresh + Game List Refresh + + + + Tiny + Tiny + + + + Small + Small + + + + Medium + Medium + + + + Large + Large + + + + List View + List View + + + + Grid View + Grid View + + + + Elf Viewer + Elf Viewer + + + + Game Install Directory + Game Install Directory + + + + Dump Game List + Dump Game List + + + + PKG Viewer + PKG Viewer + + + + Search... + Search... + + + + File + File + + + + View + View + + + + Game List Icons + Game List Icons + + + + Game List Mode + Game List Mode + + + + Settings + Settings + + + + Utils + Utils + + + + Themes + Themes + + + + About + About + + + + Dark + Dark + + + + Light + Light + + + + Green + Green + + + + Blue + Blue + + + + Violet + Violet + + + + toolBar + toolBar + + + + PKGViewer + + + Open Folder + Open Folder + + + + TrophyViewer + + + Trophy Viewer + Trophy Viewer + + + + SettingsDialog + + + Settings + Settings + + + + General + General + + + + System + System + + + + Console Language + Console Language + + + + Emulator Language + Emulator Language + + + + Emulator + Emulator + + + + Enable Fullscreen + Enable Fullscreen + + + + Show Splash + Show Splash + + + + Is PS4 Pro + Is PS4 Pro + + + + Username + Username + + + + Logger + Logger + + + + Log Type + Log Type + + + + Log Filter + Log Filter + + + + Graphics + Graphics + + + + Graphics Device + Graphics Device + + + + Width + Width + + + + Height + Height + + + + Vblank Divider + Vblank Divider + + + + Advanced + Advanced + + + + Enable Shaders Dumping + Enable Shaders Dumping + + + + Enable NULL GPU + Enable NULL GPU + + + + Enable PM4 Dumping + Enable PM4 Dumping + + + + Debug + Debug + + + + Enable Debug Dumping + Enable Debug Dumping + + + + Enable Vulkan Validation Layers + Enable Vulkan Validation Layers + + + + Enable Vulkan Synchronization Validation + Enable Vulkan Synchronization Validation + + + + Enable RenderDoc Debugging + Enable RenderDoc Debugging + + + \ No newline at end of file diff --git a/src/qt_gui/translations/ja_JP.ts b/src/qt_gui/translations/ja_JP.ts new file mode 100644 index 000000000..c67352569 --- /dev/null +++ b/src/qt_gui/translations/ja_JP.ts @@ -0,0 +1,491 @@ + + + + AboutDialog + + + About shadPS4 + About shadPS4 + + + + shadPS4 + shadPS4 + + + + shadPS4 is an experimental open-source emulator for the PlayStation 4. + shadPS4 is an experimental open-source emulator for the PlayStation 4. + + + + This software should not be used to play games you have not legally obtained. + This software should not be used to play games you have not legally obtained. + + + + ElfViewer + + + Open Folder + Open Folder + + + + GameInfoClass + + + Loading game list, please wait :3 + Loading game list, please wait :3 + + + + Cancel + Cancel + + + + Loading... + Loading... + + + + GameInstallDialog + + + shadPS4 - Choose directory + shadPS4 - Choose directory + + + + Directory to install games + Directory to install games + + + + Browse + Browse + + + + Error + Error + + + + The value for location to install games is not valid. + The value for location to install games is not valid. + + + + GuiContextMenus + + + Create Shortcut + Create Shortcut + + + + Open Game Folder + Open Game Folder + + + + SFO Viewer + SFO Viewer + + + + Trophy Viewer + Trophy Viewer + + + + Copy info + Copy info + + + + Copy Name + Copy Name + + + + Copy Serial + Copy Serial + + + + Copy All + Copy All + + + + Shortcut creation + Shortcut creation + + + + Shortcut created successfully!\n %1 + Shortcut created successfully!\n %1 + + + + Error + Error + + + + Error creating shortcut!\n %1 + Error creating shortcut!\n %1 + + + + Install PKG + Install PKG + + + + MainWindow + + + Open/Add Elf Folder + Open/Add Elf Folder + + + + Install Packages (PKG) + Install Packages (PKG) + + + + Boot Game + Boot Game + + + + About shadPS4 + About shadPS4 + + + + Configure... + Configure... + + + + Install application from a .pkg file + Install application from a .pkg file + + + + Recent Games + Recent Games + + + + Exit + Exit + + + + Exit shadPS4 + Exit shadPS4 + + + + Exit the application. + Exit the application. + + + + Show Game List + Show Game List + + + + Game List Refresh + Game List Refresh + + + + Tiny + Tiny + + + + Small + Small + + + + Medium + Medium + + + + Large + Large + + + + List View + List View + + + + Grid View + Grid View + + + + Elf Viewer + Elf Viewer + + + + Game Install Directory + Game Install Directory + + + + Dump Game List + Dump Game List + + + + PKG Viewer + PKG Viewer + + + + Search... + Search... + + + + File + File + + + + View + View + + + + Game List Icons + Game List Icons + + + + Game List Mode + Game List Mode + + + + Settings + Settings + + + + Utils + Utils + + + + Themes + Themes + + + + About + About + + + + Dark + Dark + + + + Light + Light + + + + Green + Green + + + + Blue + Blue + + + + Violet + Violet + + + + toolBar + toolBar + + + + PKGViewer + + + Open Folder + Open Folder + + + + TrophyViewer + + + Trophy Viewer + Trophy Viewer + + + + SettingsDialog + + + Settings + Settings + + + + General + General + + + + System + System + + + + Console Language + Console Language + + + + Emulator Language + Emulator Language + + + + Emulator + Emulator + + + + Enable Fullscreen + Enable Fullscreen + + + + Show Splash + Show Splash + + + + Is PS4 Pro + Is PS4 Pro + + + + Username + Username + + + + Logger + Logger + + + + Log Type + Log Type + + + + Log Filter + Log Filter + + + + Graphics + Graphics + + + + Graphics Device + Graphics Device + + + + Width + Width + + + + Height + Height + + + + Vblank Divider + Vblank Divider + + + + Advanced + Advanced + + + + Enable Shaders Dumping + Enable Shaders Dumping + + + + Enable NULL GPU + Enable NULL GPU + + + + Enable PM4 Dumping + Enable PM4 Dumping + + + + Debug + Debug + + + + Enable Debug Dumping + Enable Debug Dumping + + + + Enable Vulkan Validation Layers + Enable Vulkan Validation Layers + + + + Enable Vulkan Synchronization Validation + Enable Vulkan Synchronization Validation + + + + Enable RenderDoc Debugging + Enable RenderDoc Debugging + + + \ No newline at end of file diff --git a/src/qt_gui/translations/ko_KR.ts b/src/qt_gui/translations/ko_KR.ts new file mode 100644 index 000000000..b33b5d927 --- /dev/null +++ b/src/qt_gui/translations/ko_KR.ts @@ -0,0 +1,491 @@ + + + + AboutDialog + + + About shadPS4 + About shadPS4 + + + + shadPS4 + shadPS4 + + + + shadPS4 is an experimental open-source emulator for the PlayStation 4. + shadPS4 is an experimental open-source emulator for the PlayStation 4. + + + + This software should not be used to play games you have not legally obtained. + This software should not be used to play games you have not legally obtained. + + + + ElfViewer + + + Open Folder + Open Folder + + + + GameInfoClass + + + Loading game list, please wait :3 + Loading game list, please wait :3 + + + + Cancel + Cancel + + + + Loading... + Loading... + + + + GameInstallDialog + + + shadPS4 - Choose directory + shadPS4 - Choose directory + + + + Directory to install games + Directory to install games + + + + Browse + Browse + + + + Error + Error + + + + The value for location to install games is not valid. + The value for location to install games is not valid. + + + + GuiContextMenus + + + Create Shortcut + Create Shortcut + + + + Open Game Folder + Open Game Folder + + + + SFO Viewer + SFO Viewer + + + + Trophy Viewer + Trophy Viewer + + + + Copy info + Copy info + + + + Copy Name + Copy Name + + + + Copy Serial + Copy Serial + + + + Copy All + Copy All + + + + Shortcut creation + Shortcut creation + + + + Shortcut created successfully!\n %1 + Shortcut created successfully!\n %1 + + + + Error + Error + + + + Error creating shortcut!\n %1 + Error creating shortcut!\n %1 + + + + Install PKG + Install PKG + + + + MainWindow + + + Open/Add Elf Folder + Open/Add Elf Folder + + + + Install Packages (PKG) + Install Packages (PKG) + + + + Boot Game + Boot Game + + + + About shadPS4 + About shadPS4 + + + + Configure... + Configure... + + + + Install application from a .pkg file + Install application from a .pkg file + + + + Recent Games + Recent Games + + + + Exit + Exit + + + + Exit shadPS4 + Exit shadPS4 + + + + Exit the application. + Exit the application. + + + + Show Game List + Show Game List + + + + Game List Refresh + Game List Refresh + + + + Tiny + Tiny + + + + Small + Small + + + + Medium + Medium + + + + Large + Large + + + + List View + List View + + + + Grid View + Grid View + + + + Elf Viewer + Elf Viewer + + + + Game Install Directory + Game Install Directory + + + + Dump Game List + Dump Game List + + + + PKG Viewer + PKG Viewer + + + + Search... + Search... + + + + File + File + + + + View + View + + + + Game List Icons + Game List Icons + + + + Game List Mode + Game List Mode + + + + Settings + Settings + + + + Utils + Utils + + + + Themes + Themes + + + + About + About + + + + Dark + Dark + + + + Light + Light + + + + Green + Green + + + + Blue + Blue + + + + Violet + Violet + + + + toolBar + toolBar + + + + PKGViewer + + + Open Folder + Open Folder + + + + TrophyViewer + + + Trophy Viewer + Trophy Viewer + + + + SettingsDialog + + + Settings + Settings + + + + General + General + + + + System + System + + + + Console Language + Console Language + + + + Emulator Language + Emulator Language + + + + Emulator + Emulator + + + + Enable Fullscreen + Enable Fullscreen + + + + Show Splash + Show Splash + + + + Is PS4 Pro + Is PS4 Pro + + + + Username + Username + + + + Logger + Logger + + + + Log Type + Log Type + + + + Log Filter + Log Filter + + + + Graphics + Graphics + + + + Graphics Device + Graphics Device + + + + Width + Width + + + + Height + Height + + + + Vblank Divider + Vblank Divider + + + + Advanced + Advanced + + + + Enable Shaders Dumping + Enable Shaders Dumping + + + + Enable NULL GPU + Enable NULL GPU + + + + Enable PM4 Dumping + Enable PM4 Dumping + + + + Debug + Debug + + + + Enable Debug Dumping + Enable Debug Dumping + + + + Enable Vulkan Validation Layers + Enable Vulkan Validation Layers + + + + Enable Vulkan Synchronization Validation + Enable Vulkan Synchronization Validation + + + + Enable RenderDoc Debugging + Enable RenderDoc Debugging + + + \ No newline at end of file diff --git a/src/qt_gui/translations/lt_LT.ts b/src/qt_gui/translations/lt_LT.ts new file mode 100644 index 000000000..286ec3f43 --- /dev/null +++ b/src/qt_gui/translations/lt_LT.ts @@ -0,0 +1,491 @@ + + + + AboutDialog + + + About shadPS4 + About shadPS4 + + + + shadPS4 + shadPS4 + + + + shadPS4 is an experimental open-source emulator for the PlayStation 4. + shadPS4 is an experimental open-source emulator for the PlayStation 4. + + + + This software should not be used to play games you have not legally obtained. + This software should not be used to play games you have not legally obtained. + + + + ElfViewer + + + Open Folder + Open Folder + + + + GameInfoClass + + + Loading game list, please wait :3 + Loading game list, please wait :3 + + + + Cancel + Cancel + + + + Loading... + Loading... + + + + GameInstallDialog + + + shadPS4 - Choose directory + shadPS4 - Choose directory + + + + Directory to install games + Directory to install games + + + + Browse + Browse + + + + Error + Error + + + + The value for location to install games is not valid. + The value for location to install games is not valid. + + + + GuiContextMenus + + + Create Shortcut + Create Shortcut + + + + Open Game Folder + Open Game Folder + + + + SFO Viewer + SFO Viewer + + + + Trophy Viewer + Trophy Viewer + + + + Copy info + Copy info + + + + Copy Name + Copy Name + + + + Copy Serial + Copy Serial + + + + Copy All + Copy All + + + + Shortcut creation + Shortcut creation + + + + Shortcut created successfully!\n %1 + Shortcut created successfully!\n %1 + + + + Error + Error + + + + Error creating shortcut!\n %1 + Error creating shortcut!\n %1 + + + + Install PKG + Install PKG + + + + MainWindow + + + Open/Add Elf Folder + Open/Add Elf Folder + + + + Install Packages (PKG) + Install Packages (PKG) + + + + Boot Game + Boot Game + + + + About shadPS4 + About shadPS4 + + + + Configure... + Configure... + + + + Install application from a .pkg file + Install application from a .pkg file + + + + Recent Games + Recent Games + + + + Exit + Exit + + + + Exit shadPS4 + Exit shadPS4 + + + + Exit the application. + Exit the application. + + + + Show Game List + Show Game List + + + + Game List Refresh + Game List Refresh + + + + Tiny + Tiny + + + + Small + Small + + + + Medium + Medium + + + + Large + Large + + + + List View + List View + + + + Grid View + Grid View + + + + Elf Viewer + Elf Viewer + + + + Game Install Directory + Game Install Directory + + + + Dump Game List + Dump Game List + + + + PKG Viewer + PKG Viewer + + + + Search... + Search... + + + + File + File + + + + View + View + + + + Game List Icons + Game List Icons + + + + Game List Mode + Game List Mode + + + + Settings + Settings + + + + Utils + Utils + + + + Themes + Themes + + + + About + About + + + + Dark + Dark + + + + Light + Light + + + + Green + Green + + + + Blue + Blue + + + + Violet + Violet + + + + toolBar + toolBar + + + + PKGViewer + + + Open Folder + Open Folder + + + + TrophyViewer + + + Trophy Viewer + Trophy Viewer + + + + SettingsDialog + + + Settings + Settings + + + + General + General + + + + System + System + + + + Console Language + Console Language + + + + Emulator Language + Emulator Language + + + + Emulator + Emulator + + + + Enable Fullscreen + Enable Fullscreen + + + + Show Splash + Show Splash + + + + Is PS4 Pro + Is PS4 Pro + + + + Username + Username + + + + Logger + Logger + + + + Log Type + Log Type + + + + Log Filter + Log Filter + + + + Graphics + Graphics + + + + Graphics Device + Graphics Device + + + + Width + Width + + + + Height + Height + + + + Vblank Divider + Vblank Divider + + + + Advanced + Advanced + + + + Enable Shaders Dumping + Enable Shaders Dumping + + + + Enable NULL GPU + Enable NULL GPU + + + + Enable PM4 Dumping + Enable PM4 Dumping + + + + Debug + Debug + + + + Enable Debug Dumping + Enable Debug Dumping + + + + Enable Vulkan Validation Layers + Enable Vulkan Validation Layers + + + + Enable Vulkan Synchronization Validation + Enable Vulkan Synchronization Validation + + + + Enable RenderDoc Debugging + Enable RenderDoc Debugging + + + \ No newline at end of file diff --git a/src/qt_gui/translations/nb.ts b/src/qt_gui/translations/nb.ts new file mode 100644 index 000000000..27fc540c1 --- /dev/null +++ b/src/qt_gui/translations/nb.ts @@ -0,0 +1,491 @@ + + + + AboutDialog + + + About shadPS4 + About shadPS4 + + + + shadPS4 + shadPS4 + + + + shadPS4 is an experimental open-source emulator for the PlayStation 4. + shadPS4 is an experimental open-source emulator for the PlayStation 4. + + + + This software should not be used to play games you have not legally obtained. + This software should not be used to play games you have not legally obtained. + + + + ElfViewer + + + Open Folder + Open Folder + + + + GameInfoClass + + + Loading game list, please wait :3 + Loading game list, please wait :3 + + + + Cancel + Cancel + + + + Loading... + Loading... + + + + GameInstallDialog + + + shadPS4 - Choose directory + shadPS4 - Choose directory + + + + Directory to install games + Directory to install games + + + + Browse + Browse + + + + Error + Error + + + + The value for location to install games is not valid. + The value for location to install games is not valid. + + + + GuiContextMenus + + + Create Shortcut + Create Shortcut + + + + Open Game Folder + Open Game Folder + + + + SFO Viewer + SFO Viewer + + + + Trophy Viewer + Trophy Viewer + + + + Copy info + Copy info + + + + Copy Name + Copy Name + + + + Copy Serial + Copy Serial + + + + Copy All + Copy All + + + + Shortcut creation + Shortcut creation + + + + Shortcut created successfully!\n %1 + Shortcut created successfully!\n %1 + + + + Error + Error + + + + Error creating shortcut!\n %1 + Error creating shortcut!\n %1 + + + + Install PKG + Install PKG + + + + MainWindow + + + Open/Add Elf Folder + Open/Add Elf Folder + + + + Install Packages (PKG) + Install Packages (PKG) + + + + Boot Game + Boot Game + + + + About shadPS4 + About shadPS4 + + + + Configure... + Configure... + + + + Install application from a .pkg file + Install application from a .pkg file + + + + Recent Games + Recent Games + + + + Exit + Exit + + + + Exit shadPS4 + Exit shadPS4 + + + + Exit the application. + Exit the application. + + + + Show Game List + Show Game List + + + + Game List Refresh + Game List Refresh + + + + Tiny + Tiny + + + + Small + Small + + + + Medium + Medium + + + + Large + Large + + + + List View + List View + + + + Grid View + Grid View + + + + Elf Viewer + Elf Viewer + + + + Game Install Directory + Game Install Directory + + + + Dump Game List + Dump Game List + + + + PKG Viewer + PKG Viewer + + + + Search... + Search... + + + + File + File + + + + View + View + + + + Game List Icons + Game List Icons + + + + Game List Mode + Game List Mode + + + + Settings + Settings + + + + Utils + Utils + + + + Themes + Themes + + + + About + About + + + + Dark + Dark + + + + Light + Light + + + + Green + Green + + + + Blue + Blue + + + + Violet + Violet + + + + toolBar + toolBar + + + + PKGViewer + + + Open Folder + Open Folder + + + + TrophyViewer + + + Trophy Viewer + Trophy Viewer + + + + SettingsDialog + + + Settings + Settings + + + + General + General + + + + System + System + + + + Console Language + Console Language + + + + Emulator Language + Emulator Language + + + + Emulator + Emulator + + + + Enable Fullscreen + Enable Fullscreen + + + + Show Splash + Show Splash + + + + Is PS4 Pro + Is PS4 Pro + + + + Username + Username + + + + Logger + Logger + + + + Log Type + Log Type + + + + Log Filter + Log Filter + + + + Graphics + Graphics + + + + Graphics Device + Graphics Device + + + + Width + Width + + + + Height + Height + + + + Vblank Divider + Vblank Divider + + + + Advanced + Advanced + + + + Enable Shaders Dumping + Enable Shaders Dumping + + + + Enable NULL GPU + Enable NULL GPU + + + + Enable PM4 Dumping + Enable PM4 Dumping + + + + Debug + Debug + + + + Enable Debug Dumping + Enable Debug Dumping + + + + Enable Vulkan Validation Layers + Enable Vulkan Validation Layers + + + + Enable Vulkan Synchronization Validation + Enable Vulkan Synchronization Validation + + + + Enable RenderDoc Debugging + Enable RenderDoc Debugging + + + \ No newline at end of file diff --git a/src/qt_gui/translations/nl.ts b/src/qt_gui/translations/nl.ts new file mode 100644 index 000000000..2f4f5f9b2 --- /dev/null +++ b/src/qt_gui/translations/nl.ts @@ -0,0 +1,491 @@ + + + + AboutDialog + + + About shadPS4 + About shadPS4 + + + + shadPS4 + shadPS4 + + + + shadPS4 is an experimental open-source emulator for the PlayStation 4. + shadPS4 is an experimental open-source emulator for the PlayStation 4. + + + + This software should not be used to play games you have not legally obtained. + This software should not be used to play games you have not legally obtained. + + + + ElfViewer + + + Open Folder + Open Folder + + + + GameInfoClass + + + Loading game list, please wait :3 + Loading game list, please wait :3 + + + + Cancel + Cancel + + + + Loading... + Loading... + + + + GameInstallDialog + + + shadPS4 - Choose directory + shadPS4 - Choose directory + + + + Directory to install games + Directory to install games + + + + Browse + Browse + + + + Error + Error + + + + The value for location to install games is not valid. + The value for location to install games is not valid. + + + + GuiContextMenus + + + Create Shortcut + Create Shortcut + + + + Open Game Folder + Open Game Folder + + + + SFO Viewer + SFO Viewer + + + + Trophy Viewer + Trophy Viewer + + + + Copy info + Copy info + + + + Copy Name + Copy Name + + + + Copy Serial + Copy Serial + + + + Copy All + Copy All + + + + Shortcut creation + Shortcut creation + + + + Shortcut created successfully!\n %1 + Shortcut created successfully!\n %1 + + + + Error + Error + + + + Error creating shortcut!\n %1 + Error creating shortcut!\n %1 + + + + Install PKG + Install PKG + + + + MainWindow + + + Open/Add Elf Folder + Open/Add Elf Folder + + + + Install Packages (PKG) + Install Packages (PKG) + + + + Boot Game + Boot Game + + + + About shadPS4 + About shadPS4 + + + + Configure... + Configure... + + + + Install application from a .pkg file + Install application from a .pkg file + + + + Recent Games + Recent Games + + + + Exit + Exit + + + + Exit shadPS4 + Exit shadPS4 + + + + Exit the application. + Exit the application. + + + + Show Game List + Show Game List + + + + Game List Refresh + Game List Refresh + + + + Tiny + Tiny + + + + Small + Small + + + + Medium + Medium + + + + Large + Large + + + + List View + List View + + + + Grid View + Grid View + + + + Elf Viewer + Elf Viewer + + + + Game Install Directory + Game Install Directory + + + + Dump Game List + Dump Game List + + + + PKG Viewer + PKG Viewer + + + + Search... + Search... + + + + File + File + + + + View + View + + + + Game List Icons + Game List Icons + + + + Game List Mode + Game List Mode + + + + Settings + Settings + + + + Utils + Utils + + + + Themes + Themes + + + + About + About + + + + Dark + Dark + + + + Light + Light + + + + Green + Green + + + + Blue + Blue + + + + Violet + Violet + + + + toolBar + toolBar + + + + PKGViewer + + + Open Folder + Open Folder + + + + TrophyViewer + + + Trophy Viewer + Trophy Viewer + + + + SettingsDialog + + + Settings + Settings + + + + General + General + + + + System + System + + + + Console Language + Console Language + + + + Emulator Language + Emulator Language + + + + Emulator + Emulator + + + + Enable Fullscreen + Enable Fullscreen + + + + Show Splash + Show Splash + + + + Is PS4 Pro + Is PS4 Pro + + + + Username + Username + + + + Logger + Logger + + + + Log Type + Log Type + + + + Log Filter + Log Filter + + + + Graphics + Graphics + + + + Graphics Device + Graphics Device + + + + Width + Width + + + + Height + Height + + + + Vblank Divider + Vblank Divider + + + + Advanced + Advanced + + + + Enable Shaders Dumping + Enable Shaders Dumping + + + + Enable NULL GPU + Enable NULL GPU + + + + Enable PM4 Dumping + Enable PM4 Dumping + + + + Debug + Debug + + + + Enable Debug Dumping + Enable Debug Dumping + + + + Enable Vulkan Validation Layers + Enable Vulkan Validation Layers + + + + Enable Vulkan Synchronization Validation + Enable Vulkan Synchronization Validation + + + + Enable RenderDoc Debugging + Enable RenderDoc Debugging + + + \ No newline at end of file diff --git a/src/qt_gui/translations/pl_PL.ts b/src/qt_gui/translations/pl_PL.ts new file mode 100644 index 000000000..cad5c5829 --- /dev/null +++ b/src/qt_gui/translations/pl_PL.ts @@ -0,0 +1,491 @@ + + + + AboutDialog + + + About shadPS4 + About shadPS4 + + + + shadPS4 + shadPS4 + + + + shadPS4 is an experimental open-source emulator for the PlayStation 4. + shadPS4 is an experimental open-source emulator for the PlayStation 4. + + + + This software should not be used to play games you have not legally obtained. + This software should not be used to play games you have not legally obtained. + + + + ElfViewer + + + Open Folder + Open Folder + + + + GameInfoClass + + + Loading game list, please wait :3 + Loading game list, please wait :3 + + + + Cancel + Cancel + + + + Loading... + Loading... + + + + GameInstallDialog + + + shadPS4 - Choose directory + shadPS4 - Choose directory + + + + Directory to install games + Directory to install games + + + + Browse + Browse + + + + Error + Error + + + + The value for location to install games is not valid. + The value for location to install games is not valid. + + + + GuiContextMenus + + + Create Shortcut + Create Shortcut + + + + Open Game Folder + Open Game Folder + + + + SFO Viewer + SFO Viewer + + + + Trophy Viewer + Trophy Viewer + + + + Copy info + Copy info + + + + Copy Name + Copy Name + + + + Copy Serial + Copy Serial + + + + Copy All + Copy All + + + + Shortcut creation + Shortcut creation + + + + Shortcut created successfully!\n %1 + Shortcut created successfully!\n %1 + + + + Error + Error + + + + Error creating shortcut!\n %1 + Error creating shortcut!\n %1 + + + + Install PKG + Install PKG + + + + MainWindow + + + Open/Add Elf Folder + Open/Add Elf Folder + + + + Install Packages (PKG) + Install Packages (PKG) + + + + Boot Game + Boot Game + + + + About shadPS4 + About shadPS4 + + + + Configure... + Configure... + + + + Install application from a .pkg file + Install application from a .pkg file + + + + Recent Games + Recent Games + + + + Exit + Exit + + + + Exit shadPS4 + Exit shadPS4 + + + + Exit the application. + Exit the application. + + + + Show Game List + Show Game List + + + + Game List Refresh + Game List Refresh + + + + Tiny + Tiny + + + + Small + Small + + + + Medium + Medium + + + + Large + Large + + + + List View + List View + + + + Grid View + Grid View + + + + Elf Viewer + Elf Viewer + + + + Game Install Directory + Game Install Directory + + + + Dump Game List + Dump Game List + + + + PKG Viewer + PKG Viewer + + + + Search... + Search... + + + + File + File + + + + View + View + + + + Game List Icons + Game List Icons + + + + Game List Mode + Game List Mode + + + + Settings + Settings + + + + Utils + Utils + + + + Themes + Themes + + + + About + About + + + + Dark + Dark + + + + Light + Light + + + + Green + Green + + + + Blue + Blue + + + + Violet + Violet + + + + toolBar + toolBar + + + + PKGViewer + + + Open Folder + Open Folder + + + + TrophyViewer + + + Trophy Viewer + Trophy Viewer + + + + SettingsDialog + + + Settings + Settings + + + + General + General + + + + System + System + + + + Console Language + Console Language + + + + Emulator Language + Emulator Language + + + + Emulator + Emulator + + + + Enable Fullscreen + Enable Fullscreen + + + + Show Splash + Show Splash + + + + Is PS4 Pro + Is PS4 Pro + + + + Username + Username + + + + Logger + Logger + + + + Log Type + Log Type + + + + Log Filter + Log Filter + + + + Graphics + Graphics + + + + Graphics Device + Graphics Device + + + + Width + Width + + + + Height + Height + + + + Vblank Divider + Vblank Divider + + + + Advanced + Advanced + + + + Enable Shaders Dumping + Enable Shaders Dumping + + + + Enable NULL GPU + Enable NULL GPU + + + + Enable PM4 Dumping + Enable PM4 Dumping + + + + Debug + Debug + + + + Enable Debug Dumping + Enable Debug Dumping + + + + Enable Vulkan Validation Layers + Enable Vulkan Validation Layers + + + + Enable Vulkan Synchronization Validation + Enable Vulkan Synchronization Validation + + + + Enable RenderDoc Debugging + Enable RenderDoc Debugging + + + \ No newline at end of file diff --git a/src/qt_gui/translations/pt_BR.ts b/src/qt_gui/translations/pt_BR.ts new file mode 100644 index 000000000..a35f9b1d8 --- /dev/null +++ b/src/qt_gui/translations/pt_BR.ts @@ -0,0 +1,491 @@ + + + + AboutDialog + + + About shadPS4 + About shadPS4 + + + + shadPS4 + shadPS4 + + + + shadPS4 is an experimental open-source emulator for the PlayStation 4. + shadPS4 is an experimental open-source emulator for the PlayStation 4. + + + + This software should not be used to play games you have not legally obtained. + This software should not be used to play games you have not legally obtained. + + + + ElfViewer + + + Open Folder + Open Folder + + + + GameInfoClass + + + Loading game list, please wait :3 + Loading game list, please wait :3 + + + + Cancel + Cancel + + + + Loading... + Loading... + + + + GameInstallDialog + + + shadPS4 - Choose directory + shadPS4 - Choose directory + + + + Directory to install games + Directory to install games + + + + Browse + Browse + + + + Error + Error + + + + The value for location to install games is not valid. + The value for location to install games is not valid. + + + + GuiContextMenus + + + Create Shortcut + Create Shortcut + + + + Open Game Folder + Open Game Folder + + + + SFO Viewer + SFO Viewer + + + + Trophy Viewer + Trophy Viewer + + + + Copy info + Copy info + + + + Copy Name + Copy Name + + + + Copy Serial + Copy Serial + + + + Copy All + Copy All + + + + Shortcut creation + Shortcut creation + + + + Shortcut created successfully!\n %1 + Shortcut created successfully!\n %1 + + + + Error + Error + + + + Error creating shortcut!\n %1 + Error creating shortcut!\n %1 + + + + Install PKG + Install PKG + + + + MainWindow + + + Open/Add Elf Folder + Open/Add Elf Folder + + + + Install Packages (PKG) + Install Packages (PKG) + + + + Boot Game + Boot Game + + + + About shadPS4 + About shadPS4 + + + + Configure... + Configure... + + + + Install application from a .pkg file + Install application from a .pkg file + + + + Recent Games + Recent Games + + + + Exit + Exit + + + + Exit shadPS4 + Exit shadPS4 + + + + Exit the application. + Exit the application. + + + + Show Game List + Show Game List + + + + Game List Refresh + Game List Refresh + + + + Tiny + Tiny + + + + Small + Small + + + + Medium + Medium + + + + Large + Large + + + + List View + List View + + + + Grid View + Grid View + + + + Elf Viewer + Elf Viewer + + + + Game Install Directory + Game Install Directory + + + + Dump Game List + Dump Game List + + + + PKG Viewer + PKG Viewer + + + + Search... + Search... + + + + File + File + + + + View + View + + + + Game List Icons + Game List Icons + + + + Game List Mode + Game List Mode + + + + Settings + Settings + + + + Utils + Utils + + + + Themes + Themes + + + + About + About + + + + Dark + Dark + + + + Light + Light + + + + Green + Green + + + + Blue + Blue + + + + Violet + Violet + + + + toolBar + toolBar + + + + PKGViewer + + + Open Folder + Open Folder + + + + TrophyViewer + + + Trophy Viewer + Trophy Viewer + + + + SettingsDialog + + + Settings + Settings + + + + General + General + + + + System + System + + + + Console Language + Console Language + + + + Emulator Language + Emulator Language + + + + Emulator + Emulator + + + + Enable Fullscreen + Enable Fullscreen + + + + Show Splash + Show Splash + + + + Is PS4 Pro + Is PS4 Pro + + + + Username + Username + + + + Logger + Logger + + + + Log Type + Log Type + + + + Log Filter + Log Filter + + + + Graphics + Graphics + + + + Graphics Device + Graphics Device + + + + Width + Width + + + + Height + Height + + + + Vblank Divider + Vblank Divider + + + + Advanced + Advanced + + + + Enable Shaders Dumping + Enable Shaders Dumping + + + + Enable NULL GPU + Enable NULL GPU + + + + Enable PM4 Dumping + Enable PM4 Dumping + + + + Debug + Debug + + + + Enable Debug Dumping + Enable Debug Dumping + + + + Enable Vulkan Validation Layers + Enable Vulkan Validation Layers + + + + Enable Vulkan Synchronization Validation + Enable Vulkan Synchronization Validation + + + + Enable RenderDoc Debugging + Enable RenderDoc Debugging + + + \ No newline at end of file diff --git a/src/qt_gui/translations/ro_RO.ts b/src/qt_gui/translations/ro_RO.ts new file mode 100644 index 000000000..c7dfae1b4 --- /dev/null +++ b/src/qt_gui/translations/ro_RO.ts @@ -0,0 +1,491 @@ + + + + AboutDialog + + + About shadPS4 + About shadPS4 + + + + shadPS4 + shadPS4 + + + + shadPS4 is an experimental open-source emulator for the PlayStation 4. + shadPS4 is an experimental open-source emulator for the PlayStation 4. + + + + This software should not be used to play games you have not legally obtained. + This software should not be used to play games you have not legally obtained. + + + + ElfViewer + + + Open Folder + Open Folder + + + + GameInfoClass + + + Loading game list, please wait :3 + Loading game list, please wait :3 + + + + Cancel + Cancel + + + + Loading... + Loading... + + + + GameInstallDialog + + + shadPS4 - Choose directory + shadPS4 - Choose directory + + + + Directory to install games + Directory to install games + + + + Browse + Browse + + + + Error + Error + + + + The value for location to install games is not valid. + The value for location to install games is not valid. + + + + GuiContextMenus + + + Create Shortcut + Create Shortcut + + + + Open Game Folder + Open Game Folder + + + + SFO Viewer + SFO Viewer + + + + Trophy Viewer + Trophy Viewer + + + + Copy info + Copy info + + + + Copy Name + Copy Name + + + + Copy Serial + Copy Serial + + + + Copy All + Copy All + + + + Shortcut creation + Shortcut creation + + + + Shortcut created successfully!\n %1 + Shortcut created successfully!\n %1 + + + + Error + Error + + + + Error creating shortcut!\n %1 + Error creating shortcut!\n %1 + + + + Install PKG + Install PKG + + + + MainWindow + + + Open/Add Elf Folder + Open/Add Elf Folder + + + + Install Packages (PKG) + Install Packages (PKG) + + + + Boot Game + Boot Game + + + + About shadPS4 + About shadPS4 + + + + Configure... + Configure... + + + + Install application from a .pkg file + Install application from a .pkg file + + + + Recent Games + Recent Games + + + + Exit + Exit + + + + Exit shadPS4 + Exit shadPS4 + + + + Exit the application. + Exit the application. + + + + Show Game List + Show Game List + + + + Game List Refresh + Game List Refresh + + + + Tiny + Tiny + + + + Small + Small + + + + Medium + Medium + + + + Large + Large + + + + List View + List View + + + + Grid View + Grid View + + + + Elf Viewer + Elf Viewer + + + + Game Install Directory + Game Install Directory + + + + Dump Game List + Dump Game List + + + + PKG Viewer + PKG Viewer + + + + Search... + Search... + + + + File + File + + + + View + View + + + + Game List Icons + Game List Icons + + + + Game List Mode + Game List Mode + + + + Settings + Settings + + + + Utils + Utils + + + + Themes + Themes + + + + About + About + + + + Dark + Dark + + + + Light + Light + + + + Green + Green + + + + Blue + Blue + + + + Violet + Violet + + + + toolBar + toolBar + + + + PKGViewer + + + Open Folder + Open Folder + + + + TrophyViewer + + + Trophy Viewer + Trophy Viewer + + + + SettingsDialog + + + Settings + Settings + + + + General + General + + + + System + System + + + + Console Language + Console Language + + + + Emulator Language + Emulator Language + + + + Emulator + Emulator + + + + Enable Fullscreen + Enable Fullscreen + + + + Show Splash + Show Splash + + + + Is PS4 Pro + Is PS4 Pro + + + + Username + Username + + + + Logger + Logger + + + + Log Type + Log Type + + + + Log Filter + Log Filter + + + + Graphics + Graphics + + + + Graphics Device + Graphics Device + + + + Width + Width + + + + Height + Height + + + + Vblank Divider + Vblank Divider + + + + Advanced + Advanced + + + + Enable Shaders Dumping + Enable Shaders Dumping + + + + Enable NULL GPU + Enable NULL GPU + + + + Enable PM4 Dumping + Enable PM4 Dumping + + + + Debug + Debug + + + + Enable Debug Dumping + Enable Debug Dumping + + + + Enable Vulkan Validation Layers + Enable Vulkan Validation Layers + + + + Enable Vulkan Synchronization Validation + Enable Vulkan Synchronization Validation + + + + Enable RenderDoc Debugging + Enable RenderDoc Debugging + + + \ No newline at end of file diff --git a/src/qt_gui/translations/ru_RU.ts b/src/qt_gui/translations/ru_RU.ts new file mode 100644 index 000000000..556875e17 --- /dev/null +++ b/src/qt_gui/translations/ru_RU.ts @@ -0,0 +1,491 @@ + + + + AboutDialog + + + About shadPS4 + About shadPS4 + + + + shadPS4 + shadPS4 + + + + shadPS4 is an experimental open-source emulator for the PlayStation 4. + shadPS4 is an experimental open-source emulator for the PlayStation 4. + + + + This software should not be used to play games you have not legally obtained. + This software should not be used to play games you have not legally obtained. + + + + ElfViewer + + + Open Folder + Open Folder + + + + GameInfoClass + + + Loading game list, please wait :3 + Loading game list, please wait :3 + + + + Cancel + Cancel + + + + Loading... + Loading... + + + + GameInstallDialog + + + shadPS4 - Choose directory + shadPS4 - Choose directory + + + + Directory to install games + Directory to install games + + + + Browse + Browse + + + + Error + Error + + + + The value for location to install games is not valid. + The value for location to install games is not valid. + + + + GuiContextMenus + + + Create Shortcut + Create Shortcut + + + + Open Game Folder + Open Game Folder + + + + SFO Viewer + SFO Viewer + + + + Trophy Viewer + Trophy Viewer + + + + Copy info + Copy info + + + + Copy Name + Copy Name + + + + Copy Serial + Copy Serial + + + + Copy All + Copy All + + + + Shortcut creation + Shortcut creation + + + + Shortcut created successfully!\n %1 + Shortcut created successfully!\n %1 + + + + Error + Error + + + + Error creating shortcut!\n %1 + Error creating shortcut!\n %1 + + + + Install PKG + Install PKG + + + + MainWindow + + + Open/Add Elf Folder + Open/Add Elf Folder + + + + Install Packages (PKG) + Install Packages (PKG) + + + + Boot Game + Boot Game + + + + About shadPS4 + About shadPS4 + + + + Configure... + Configure... + + + + Install application from a .pkg file + Install application from a .pkg file + + + + Recent Games + Recent Games + + + + Exit + Exit + + + + Exit shadPS4 + Exit shadPS4 + + + + Exit the application. + Exit the application. + + + + Show Game List + Show Game List + + + + Game List Refresh + Game List Refresh + + + + Tiny + Tiny + + + + Small + Small + + + + Medium + Medium + + + + Large + Large + + + + List View + List View + + + + Grid View + Grid View + + + + Elf Viewer + Elf Viewer + + + + Game Install Directory + Game Install Directory + + + + Dump Game List + Dump Game List + + + + PKG Viewer + PKG Viewer + + + + Search... + Search... + + + + File + File + + + + View + View + + + + Game List Icons + Game List Icons + + + + Game List Mode + Game List Mode + + + + Settings + Settings + + + + Utils + Utils + + + + Themes + Themes + + + + About + About + + + + Dark + Dark + + + + Light + Light + + + + Green + Green + + + + Blue + Blue + + + + Violet + Violet + + + + toolBar + toolBar + + + + PKGViewer + + + Open Folder + Open Folder + + + + TrophyViewer + + + Trophy Viewer + Trophy Viewer + + + + SettingsDialog + + + Settings + Settings + + + + General + General + + + + System + System + + + + Console Language + Console Language + + + + Emulator Language + Emulator Language + + + + Emulator + Emulator + + + + Enable Fullscreen + Enable Fullscreen + + + + Show Splash + Show Splash + + + + Is PS4 Pro + Is PS4 Pro + + + + Username + Username + + + + Logger + Logger + + + + Log Type + Log Type + + + + Log Filter + Log Filter + + + + Graphics + Graphics + + + + Graphics Device + Graphics Device + + + + Width + Width + + + + Height + Height + + + + Vblank Divider + Vblank Divider + + + + Advanced + Advanced + + + + Enable Shaders Dumping + Enable Shaders Dumping + + + + Enable NULL GPU + Enable NULL GPU + + + + Enable PM4 Dumping + Enable PM4 Dumping + + + + Debug + Debug + + + + Enable Debug Dumping + Enable Debug Dumping + + + + Enable Vulkan Validation Layers + Enable Vulkan Validation Layers + + + + Enable Vulkan Synchronization Validation + Enable Vulkan Synchronization Validation + + + + Enable RenderDoc Debugging + Enable RenderDoc Debugging + + + \ No newline at end of file diff --git a/src/qt_gui/translations/tr_TR.ts b/src/qt_gui/translations/tr_TR.ts new file mode 100644 index 000000000..ebb8b9b7c --- /dev/null +++ b/src/qt_gui/translations/tr_TR.ts @@ -0,0 +1,491 @@ + + + + AboutDialog + + + About shadPS4 + About shadPS4 + + + + shadPS4 + shadPS4 + + + + shadPS4 is an experimental open-source emulator for the PlayStation 4. + shadPS4 is an experimental open-source emulator for the PlayStation 4. + + + + This software should not be used to play games you have not legally obtained. + This software should not be used to play games you have not legally obtained. + + + + ElfViewer + + + Open Folder + Open Folder + + + + GameInfoClass + + + Loading game list, please wait :3 + Loading game list, please wait :3 + + + + Cancel + Cancel + + + + Loading... + Loading... + + + + GameInstallDialog + + + shadPS4 - Choose directory + shadPS4 - Choose directory + + + + Directory to install games + Directory to install games + + + + Browse + Browse + + + + Error + Error + + + + The value for location to install games is not valid. + The value for location to install games is not valid. + + + + GuiContextMenus + + + Create Shortcut + Create Shortcut + + + + Open Game Folder + Open Game Folder + + + + SFO Viewer + SFO Viewer + + + + Trophy Viewer + Trophy Viewer + + + + Copy info + Copy info + + + + Copy Name + Copy Name + + + + Copy Serial + Copy Serial + + + + Copy All + Copy All + + + + Shortcut creation + Shortcut creation + + + + Shortcut created successfully!\n %1 + Shortcut created successfully!\n %1 + + + + Error + Error + + + + Error creating shortcut!\n %1 + Error creating shortcut!\n %1 + + + + Install PKG + Install PKG + + + + MainWindow + + + Open/Add Elf Folder + Open/Add Elf Folder + + + + Install Packages (PKG) + Install Packages (PKG) + + + + Boot Game + Boot Game + + + + About shadPS4 + About shadPS4 + + + + Configure... + Configure... + + + + Install application from a .pkg file + Install application from a .pkg file + + + + Recent Games + Recent Games + + + + Exit + Exit + + + + Exit shadPS4 + Exit shadPS4 + + + + Exit the application. + Exit the application. + + + + Show Game List + Show Game List + + + + Game List Refresh + Game List Refresh + + + + Tiny + Tiny + + + + Small + Small + + + + Medium + Medium + + + + Large + Large + + + + List View + List View + + + + Grid View + Grid View + + + + Elf Viewer + Elf Viewer + + + + Game Install Directory + Game Install Directory + + + + Dump Game List + Dump Game List + + + + PKG Viewer + PKG Viewer + + + + Search... + Search... + + + + File + File + + + + View + View + + + + Game List Icons + Game List Icons + + + + Game List Mode + Game List Mode + + + + Settings + Settings + + + + Utils + Utils + + + + Themes + Themes + + + + About + About + + + + Dark + Dark + + + + Light + Light + + + + Green + Green + + + + Blue + Blue + + + + Violet + Violet + + + + toolBar + toolBar + + + + PKGViewer + + + Open Folder + Open Folder + + + + TrophyViewer + + + Trophy Viewer + Trophy Viewer + + + + SettingsDialog + + + Settings + Settings + + + + General + General + + + + System + System + + + + Console Language + Console Language + + + + Emulator Language + Emulator Language + + + + Emulator + Emulator + + + + Enable Fullscreen + Enable Fullscreen + + + + Show Splash + Show Splash + + + + Is PS4 Pro + Is PS4 Pro + + + + Username + Username + + + + Logger + Logger + + + + Log Type + Log Type + + + + Log Filter + Log Filter + + + + Graphics + Graphics + + + + Graphics Device + Graphics Device + + + + Width + Width + + + + Height + Height + + + + Vblank Divider + Vblank Divider + + + + Advanced + Advanced + + + + Enable Shaders Dumping + Enable Shaders Dumping + + + + Enable NULL GPU + Enable NULL GPU + + + + Enable PM4 Dumping + Enable PM4 Dumping + + + + Debug + Debug + + + + Enable Debug Dumping + Enable Debug Dumping + + + + Enable Vulkan Validation Layers + Enable Vulkan Validation Layers + + + + Enable Vulkan Synchronization Validation + Enable Vulkan Synchronization Validation + + + + Enable RenderDoc Debugging + Enable RenderDoc Debugging + + + \ No newline at end of file diff --git a/src/qt_gui/translations/vi_VN.ts b/src/qt_gui/translations/vi_VN.ts new file mode 100644 index 000000000..08af9b351 --- /dev/null +++ b/src/qt_gui/translations/vi_VN.ts @@ -0,0 +1,491 @@ + + + + AboutDialog + + + About shadPS4 + About shadPS4 + + + + shadPS4 + shadPS4 + + + + shadPS4 is an experimental open-source emulator for the PlayStation 4. + shadPS4 is an experimental open-source emulator for the PlayStation 4. + + + + This software should not be used to play games you have not legally obtained. + This software should not be used to play games you have not legally obtained. + + + + ElfViewer + + + Open Folder + Open Folder + + + + GameInfoClass + + + Loading game list, please wait :3 + Loading game list, please wait :3 + + + + Cancel + Cancel + + + + Loading... + Loading... + + + + GameInstallDialog + + + shadPS4 - Choose directory + shadPS4 - Choose directory + + + + Directory to install games + Directory to install games + + + + Browse + Browse + + + + Error + Error + + + + The value for location to install games is not valid. + The value for location to install games is not valid. + + + + GuiContextMenus + + + Create Shortcut + Create Shortcut + + + + Open Game Folder + Open Game Folder + + + + SFO Viewer + SFO Viewer + + + + Trophy Viewer + Trophy Viewer + + + + Copy info + Copy info + + + + Copy Name + Copy Name + + + + Copy Serial + Copy Serial + + + + Copy All + Copy All + + + + Shortcut creation + Shortcut creation + + + + Shortcut created successfully!\n %1 + Shortcut created successfully!\n %1 + + + + Error + Error + + + + Error creating shortcut!\n %1 + Error creating shortcut!\n %1 + + + + Install PKG + Install PKG + + + + MainWindow + + + Open/Add Elf Folder + Open/Add Elf Folder + + + + Install Packages (PKG) + Install Packages (PKG) + + + + Boot Game + Boot Game + + + + About shadPS4 + About shadPS4 + + + + Configure... + Configure... + + + + Install application from a .pkg file + Install application from a .pkg file + + + + Recent Games + Recent Games + + + + Exit + Exit + + + + Exit shadPS4 + Exit shadPS4 + + + + Exit the application. + Exit the application. + + + + Show Game List + Show Game List + + + + Game List Refresh + Game List Refresh + + + + Tiny + Tiny + + + + Small + Small + + + + Medium + Medium + + + + Large + Large + + + + List View + List View + + + + Grid View + Grid View + + + + Elf Viewer + Elf Viewer + + + + Game Install Directory + Game Install Directory + + + + Dump Game List + Dump Game List + + + + PKG Viewer + PKG Viewer + + + + Search... + Search... + + + + File + File + + + + View + View + + + + Game List Icons + Game List Icons + + + + Game List Mode + Game List Mode + + + + Settings + Settings + + + + Utils + Utils + + + + Themes + Themes + + + + About + About + + + + Dark + Dark + + + + Light + Light + + + + Green + Green + + + + Blue + Blue + + + + Violet + Violet + + + + toolBar + toolBar + + + + PKGViewer + + + Open Folder + Open Folder + + + + TrophyViewer + + + Trophy Viewer + Trophy Viewer + + + + SettingsDialog + + + Settings + Settings + + + + General + General + + + + System + System + + + + Console Language + Console Language + + + + Emulator Language + Emulator Language + + + + Emulator + Emulator + + + + Enable Fullscreen + Enable Fullscreen + + + + Show Splash + Show Splash + + + + Is PS4 Pro + Is PS4 Pro + + + + Username + Username + + + + Logger + Logger + + + + Log Type + Log Type + + + + Log Filter + Log Filter + + + + Graphics + Graphics + + + + Graphics Device + Graphics Device + + + + Width + Width + + + + Height + Height + + + + Vblank Divider + Vblank Divider + + + + Advanced + Advanced + + + + Enable Shaders Dumping + Enable Shaders Dumping + + + + Enable NULL GPU + Enable NULL GPU + + + + Enable PM4 Dumping + Enable PM4 Dumping + + + + Debug + Debug + + + + Enable Debug Dumping + Enable Debug Dumping + + + + Enable Vulkan Validation Layers + Enable Vulkan Validation Layers + + + + Enable Vulkan Synchronization Validation + Enable Vulkan Synchronization Validation + + + + Enable RenderDoc Debugging + Enable RenderDoc Debugging + + + \ No newline at end of file diff --git a/src/qt_gui/translations/zh_CN.ts b/src/qt_gui/translations/zh_CN.ts new file mode 100644 index 000000000..6f6392237 --- /dev/null +++ b/src/qt_gui/translations/zh_CN.ts @@ -0,0 +1,491 @@ + + + + AboutDialog + + + About shadPS4 + About shadPS4 + + + + shadPS4 + shadPS4 + + + + shadPS4 is an experimental open-source emulator for the PlayStation 4. + shadPS4 is an experimental open-source emulator for the PlayStation 4. + + + + This software should not be used to play games you have not legally obtained. + This software should not be used to play games you have not legally obtained. + + + + ElfViewer + + + Open Folder + Open Folder + + + + GameInfoClass + + + Loading game list, please wait :3 + Loading game list, please wait :3 + + + + Cancel + Cancel + + + + Loading... + Loading... + + + + GameInstallDialog + + + shadPS4 - Choose directory + shadPS4 - Choose directory + + + + Directory to install games + Directory to install games + + + + Browse + Browse + + + + Error + Error + + + + The value for location to install games is not valid. + The value for location to install games is not valid. + + + + GuiContextMenus + + + Create Shortcut + Create Shortcut + + + + Open Game Folder + Open Game Folder + + + + SFO Viewer + SFO Viewer + + + + Trophy Viewer + Trophy Viewer + + + + Copy info + Copy info + + + + Copy Name + Copy Name + + + + Copy Serial + Copy Serial + + + + Copy All + Copy All + + + + Shortcut creation + Shortcut creation + + + + Shortcut created successfully!\n %1 + Shortcut created successfully!\n %1 + + + + Error + Error + + + + Error creating shortcut!\n %1 + Error creating shortcut!\n %1 + + + + Install PKG + Install PKG + + + + MainWindow + + + Open/Add Elf Folder + Open/Add Elf Folder + + + + Install Packages (PKG) + Install Packages (PKG) + + + + Boot Game + Boot Game + + + + About shadPS4 + About shadPS4 + + + + Configure... + Configure... + + + + Install application from a .pkg file + Install application from a .pkg file + + + + Recent Games + Recent Games + + + + Exit + Exit + + + + Exit shadPS4 + Exit shadPS4 + + + + Exit the application. + Exit the application. + + + + Show Game List + Show Game List + + + + Game List Refresh + Game List Refresh + + + + Tiny + Tiny + + + + Small + Small + + + + Medium + Medium + + + + Large + Large + + + + List View + List View + + + + Grid View + Grid View + + + + Elf Viewer + Elf Viewer + + + + Game Install Directory + Game Install Directory + + + + Dump Game List + Dump Game List + + + + PKG Viewer + PKG Viewer + + + + Search... + Search... + + + + File + File + + + + View + View + + + + Game List Icons + Game List Icons + + + + Game List Mode + Game List Mode + + + + Settings + Settings + + + + Utils + Utils + + + + Themes + Themes + + + + About + About + + + + Dark + Dark + + + + Light + Light + + + + Green + Green + + + + Blue + Blue + + + + Violet + Violet + + + + toolBar + toolBar + + + + PKGViewer + + + Open Folder + Open Folder + + + + TrophyViewer + + + Trophy Viewer + Trophy Viewer + + + + SettingsDialog + + + Settings + Settings + + + + General + General + + + + System + System + + + + Console Language + Console Language + + + + Emulator Language + Emulator Language + + + + Emulator + Emulator + + + + Enable Fullscreen + Enable Fullscreen + + + + Show Splash + Show Splash + + + + Is PS4 Pro + Is PS4 Pro + + + + Username + Username + + + + Logger + Logger + + + + Log Type + Log Type + + + + Log Filter + Log Filter + + + + Graphics + Graphics + + + + Graphics Device + Graphics Device + + + + Width + Width + + + + Height + Height + + + + Vblank Divider + Vblank Divider + + + + Advanced + Advanced + + + + Enable Shaders Dumping + Enable Shaders Dumping + + + + Enable NULL GPU + Enable NULL GPU + + + + Enable PM4 Dumping + Enable PM4 Dumping + + + + Debug + Debug + + + + Enable Debug Dumping + Enable Debug Dumping + + + + Enable Vulkan Validation Layers + Enable Vulkan Validation Layers + + + + Enable Vulkan Synchronization Validation + Enable Vulkan Synchronization Validation + + + + Enable RenderDoc Debugging + Enable RenderDoc Debugging + + + \ No newline at end of file diff --git a/src/qt_gui/translations/zh_TW.ts b/src/qt_gui/translations/zh_TW.ts new file mode 100644 index 000000000..1ddeaa43f --- /dev/null +++ b/src/qt_gui/translations/zh_TW.ts @@ -0,0 +1,491 @@ + + + + AboutDialog + + + About shadPS4 + About shadPS4 + + + + shadPS4 + shadPS4 + + + + shadPS4 is an experimental open-source emulator for the PlayStation 4. + shadPS4 is an experimental open-source emulator for the PlayStation 4. + + + + This software should not be used to play games you have not legally obtained. + This software should not be used to play games you have not legally obtained. + + + + ElfViewer + + + Open Folder + Open Folder + + + + GameInfoClass + + + Loading game list, please wait :3 + Loading game list, please wait :3 + + + + Cancel + Cancel + + + + Loading... + Loading... + + + + GameInstallDialog + + + shadPS4 - Choose directory + shadPS4 - Choose directory + + + + Directory to install games + Directory to install games + + + + Browse + Browse + + + + Error + Error + + + + The value for location to install games is not valid. + The value for location to install games is not valid. + + + + GuiContextMenus + + + Create Shortcut + Create Shortcut + + + + Open Game Folder + Open Game Folder + + + + SFO Viewer + SFO Viewer + + + + Trophy Viewer + Trophy Viewer + + + + Copy info + Copy info + + + + Copy Name + Copy Name + + + + Copy Serial + Copy Serial + + + + Copy All + Copy All + + + + Shortcut creation + Shortcut creation + + + + Shortcut created successfully!\n %1 + Shortcut created successfully!\n %1 + + + + Error + Error + + + + Error creating shortcut!\n %1 + Error creating shortcut!\n %1 + + + + Install PKG + Install PKG + + + + MainWindow + + + Open/Add Elf Folder + Open/Add Elf Folder + + + + Install Packages (PKG) + Install Packages (PKG) + + + + Boot Game + Boot Game + + + + About shadPS4 + About shadPS4 + + + + Configure... + Configure... + + + + Install application from a .pkg file + Install application from a .pkg file + + + + Recent Games + Recent Games + + + + Exit + Exit + + + + Exit shadPS4 + Exit shadPS4 + + + + Exit the application. + Exit the application. + + + + Show Game List + Show Game List + + + + Game List Refresh + Game List Refresh + + + + Tiny + Tiny + + + + Small + Small + + + + Medium + Medium + + + + Large + Large + + + + List View + List View + + + + Grid View + Grid View + + + + Elf Viewer + Elf Viewer + + + + Game Install Directory + Game Install Directory + + + + Dump Game List + Dump Game List + + + + PKG Viewer + PKG Viewer + + + + Search... + Search... + + + + File + File + + + + View + View + + + + Game List Icons + Game List Icons + + + + Game List Mode + Game List Mode + + + + Settings + Settings + + + + Utils + Utils + + + + Themes + Themes + + + + About + About + + + + Dark + Dark + + + + Light + Light + + + + Green + Green + + + + Blue + Blue + + + + Violet + Violet + + + + toolBar + toolBar + + + + PKGViewer + + + Open Folder + Open Folder + + + + TrophyViewer + + + Trophy Viewer + Trophy Viewer + + + + SettingsDialog + + + Settings + Settings + + + + General + General + + + + System + System + + + + Console Language + Console Language + + + + Emulator Language + Emulator Language + + + + Emulator + Emulator + + + + Enable Fullscreen + Enable Fullscreen + + + + Show Splash + Show Splash + + + + Is PS4 Pro + Is PS4 Pro + + + + Username + Username + + + + Logger + Logger + + + + Log Type + Log Type + + + + Log Filter + Log Filter + + + + Graphics + Graphics + + + + Graphics Device + Graphics Device + + + + Width + Width + + + + Height + Height + + + + Vblank Divider + Vblank Divider + + + + Advanced + Advanced + + + + Enable Shaders Dumping + Enable Shaders Dumping + + + + Enable NULL GPU + Enable NULL GPU + + + + Enable PM4 Dumping + Enable PM4 Dumping + + + + Debug + Debug + + + + Enable Debug Dumping + Enable Debug Dumping + + + + Enable Vulkan Validation Layers + Enable Vulkan Validation Layers + + + + Enable Vulkan Synchronization Validation + Enable Vulkan Synchronization Validation + + + + Enable RenderDoc Debugging + Enable RenderDoc Debugging + + + \ No newline at end of file diff --git a/src/qt_gui/trophy_viewer.cpp b/src/qt_gui/trophy_viewer.cpp index bb17dfc3a..57dce6b4e 100644 --- a/src/qt_gui/trophy_viewer.cpp +++ b/src/qt_gui/trophy_viewer.cpp @@ -5,7 +5,7 @@ #include "trophy_viewer.h" TrophyViewer::TrophyViewer(QString trophyPath, QString gameTrpPath) : QMainWindow() { - this->setWindowTitle("Trophy Viewer"); + this->setWindowTitle(tr("Trophy Viewer")); this->setAttribute(Qt::WA_DeleteOnClose); tabWidget = new QTabWidget(this); gameTrpPath_ = gameTrpPath; From 7766a653d572dd0ead49d9a8fb2894961f23a555 Mon Sep 17 00:00:00 2001 From: Dzmitry Dubrova Date: Sun, 25 Aug 2024 12:30:05 +0300 Subject: [PATCH 04/69] ci: Add LinguistTools to CIs --- .github/workflows/macos-qt.yml | 3 ++- .github/workflows/windows-qt.yml | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/macos-qt.yml b/.github/workflows/macos-qt.yml index 4b3672dff..24c71af49 100644 --- a/.github/workflows/macos-qt.yml +++ b/.github/workflows/macos-qt.yml @@ -38,7 +38,7 @@ jobs: host: mac target: desktop arch: clang_64 - archives: qtbase + archives: qtbase qttools - name: Configure CMake run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCMAKE_OSX_ARCHITECTURES=x86_64 -DENABLE_QT_GUI=ON @@ -50,6 +50,7 @@ jobs: run: | mkdir upload mv ${{github.workspace}}/build/shadps4.app upload + mv ${{github.workspace}}/build/translations/* upload macdeployqt upload/shadps4.app tar cf shadps4-macos-qt.tar.gz -C upload . diff --git a/.github/workflows/windows-qt.yml b/.github/workflows/windows-qt.yml index 06a16eb5b..a3adfa90c 100644 --- a/.github/workflows/windows-qt.yml +++ b/.github/workflows/windows-qt.yml @@ -28,7 +28,7 @@ jobs: host: windows target: desktop arch: win64_msvc2019_64 - archives: qtbase + archives: qtbase qttools - name: Configure CMake run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -T ClangCL -DENABLE_QT_GUI=ON @@ -40,6 +40,7 @@ jobs: run: | mkdir upload move build/Release/shadPS4.exe upload + move build/Release/translations/* upload windeployqt --dir upload upload/shadPS4.exe - name: Upload executable From e603165e2b7a71bdfa38e0c74f2d344f19f933e9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C2=A5IGA?= <164882787+Xphalnos@users.noreply.github.com> Date: Sun, 25 Aug 2024 12:31:45 +0200 Subject: [PATCH 05/69] Implement French translation --- src/qt_gui/translations/fr.ts | 182 +++++++++++++++++----------------- 1 file changed, 91 insertions(+), 91 deletions(-) diff --git a/src/qt_gui/translations/fr.ts b/src/qt_gui/translations/fr.ts index d56f6e427..54100f17d 100644 --- a/src/qt_gui/translations/fr.ts +++ b/src/qt_gui/translations/fr.ts @@ -6,7 +6,7 @@ About shadPS4 - About shadPS4 + À propos de shadPS4 @@ -16,12 +16,12 @@ shadPS4 is an experimental open-source emulator for the PlayStation 4. - shadPS4 is an experimental open-source emulator for the PlayStation 4. + shadPS4 est un émulateur expérimental de la PlayStation 4. This software should not be used to play games you have not legally obtained. - This software should not be used to play games you have not legally obtained. + Ce logiciel ne doit pas être utilisé pour jouer à des jeux que vous n'avez pas obtenus légalement. @@ -29,7 +29,7 @@ Open Folder - Open Folder + Ouvrir un dossier @@ -37,17 +37,17 @@ Loading game list, please wait :3 - Loading game list, please wait :3 + Chargement de la liste de jeu, veuillez attendre... Cancel - Cancel + Annuler Loading... - Loading... + Chargement... @@ -55,27 +55,27 @@ shadPS4 - Choose directory - shadPS4 - Choose directory + shadPS4 - Choisir un répertoire Directory to install games - Directory to install games + Répertoire pour installer les jeux Browse - Browse + Parcourir Error - Error + Erreur The value for location to install games is not valid. - The value for location to install games is not valid. + Le répertoire d'installation des jeux n'est pas valide. @@ -83,67 +83,67 @@ Create Shortcut - Create Shortcut + Créer un raccourci Open Game Folder - Open Game Folder + Ouvrir le dossier du jeu SFO Viewer - SFO Viewer + Visionneur SFO Trophy Viewer - Trophy Viewer + Visionneur de trophés Copy info - Copy info + Copier les informations Copy Name - Copy Name + Copier le nom Copy Serial - Copy Serial + Copier le numéro de série Copy All - Copy All + Copier tout Shortcut creation - Shortcut creation + Création du raccourci Shortcut created successfully!\n %1 - Shortcut created successfully!\n %1 + Raccourci créé avec succès!\n %1 Error - Error + Erreur Error creating shortcut!\n %1 - Error creating shortcut!\n %1 + Erreur lors de la création du raccourci!\n %1 Install PKG - Install PKG + Installer un PKG @@ -151,177 +151,177 @@ Open/Add Elf Folder - Open/Add Elf Folder + Ouvrir/Ajouter un dossier Elf Install Packages (PKG) - Install Packages (PKG) + Installer des packages (PKG) Boot Game - Boot Game + Démarrer un jeu About shadPS4 - About shadPS4 + À propos de shadPS4 Configure... - Configure... + Configurer... Install application from a .pkg file - Install application from a .pkg file + Installer une application depuis un fichier .pkg Recent Games - Recent Games + Jeux récents Exit - Exit + Fermer Exit shadPS4 - Exit shadPS4 + Fermer shadPS4 Exit the application. - Exit the application. + Fermer l'application. Show Game List - Show Game List + Afficher la liste de jeux Game List Refresh - Game List Refresh + Rafraîchir la liste de jeux Tiny - Tiny + Très Petit Small - Small + Petit Medium - Medium + Moyen Large - Large + Grand List View - List View + Mode liste Grid View - Grid View + Mode grille Elf Viewer - Elf Viewer + Visionneur Elf Game Install Directory - Game Install Directory + Répertoire des jeux Dump Game List - Dump Game List + Dumper la liste des jeux PKG Viewer - PKG Viewer + Visionneur PKG Search... - Search... + Chercher... File - File + Fichier View - View + Affichage Game List Icons - Game List Icons + Icones des jeux Game List Mode - Game List Mode + Mode liste Settings - Settings + Paramètres Utils - Utils + Utilitaire Themes - Themes + Thèmes About - About + À propos Dark - Dark + Noir Light - Light + Blanc Green - Green + Vert Blue - Blue + Bleu @@ -331,7 +331,7 @@ toolBar - toolBar + Bare d'outils @@ -339,7 +339,7 @@ Open Folder - Open Folder + Ouvrir un dossier @@ -347,7 +347,7 @@ Trophy Viewer - Trophy Viewer + Visionneur de trophés @@ -355,137 +355,137 @@ Settings - Settings + Paramètres General - General + Général System - System + Système Console Language - Console Language + Langage de la console Emulator Language - Emulator Language + Langage de l'émulateur Emulator - Emulator + Émulateur Enable Fullscreen - Enable Fullscreen + Plein écran Show Splash - Show Splash + Afficher l'image du jeu Is PS4 Pro - Is PS4 Pro + Mode PS4 Pro Username - Username + Nom d'utilisateur Logger - Logger + Journalisation Log Type - Log Type + Type Log Filter - Log Filter + Filtre Graphics - Graphics + Graphismes Graphics Device - Graphics Device + Carte graphique Width - Width + Largeur Height - Height + Hauteur Vblank Divider - Vblank Divider + Vblank Advanced - Advanced + Avancé Enable Shaders Dumping - Enable Shaders Dumping + Dumper les shaders Enable NULL GPU - Enable NULL GPU + NULL GPU Enable PM4 Dumping - Enable PM4 Dumping + Dumper le PM4 Debug - Debug + Débogage Enable Debug Dumping - Enable Debug Dumping + Activer le débogage Enable Vulkan Validation Layers - Enable Vulkan Validation Layers + Couche de validation Vulkan Enable Vulkan Synchronization Validation - Enable Vulkan Synchronization Validation + Synchroniser la validation Vulkan Enable RenderDoc Debugging - Enable RenderDoc Debugging + Activer le débogage RenderDoc - \ No newline at end of file + From 83b43363fa7e63b68dd60bc3039e78ceabe3df18 Mon Sep 17 00:00:00 2001 From: Dzmitry Dubrova Date: Sun, 25 Aug 2024 13:59:22 +0300 Subject: [PATCH 06/69] ci: Fix CI --- .github/workflows/macos-qt.yml | 2 +- .github/workflows/windows-qt.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/macos-qt.yml b/.github/workflows/macos-qt.yml index 24c71af49..def98ea34 100644 --- a/.github/workflows/macos-qt.yml +++ b/.github/workflows/macos-qt.yml @@ -50,7 +50,7 @@ jobs: run: | mkdir upload mv ${{github.workspace}}/build/shadps4.app upload - mv ${{github.workspace}}/build/translations/* upload + mv ${{github.workspace}}/build/translations upload macdeployqt upload/shadps4.app tar cf shadps4-macos-qt.tar.gz -C upload . diff --git a/.github/workflows/windows-qt.yml b/.github/workflows/windows-qt.yml index a3adfa90c..70c33ebe9 100644 --- a/.github/workflows/windows-qt.yml +++ b/.github/workflows/windows-qt.yml @@ -40,7 +40,7 @@ jobs: run: | mkdir upload move build/Release/shadPS4.exe upload - move build/Release/translations/* upload + move build/translations upload windeployqt --dir upload upload/shadPS4.exe - name: Upload executable From 5664d45305b310d8716d9eee598964ad53ec0cf2 Mon Sep 17 00:00:00 2001 From: SaynedBread <114937220+CyntexMore@users.noreply.github.com> Date: Sun, 25 Aug 2024 14:12:16 +0200 Subject: [PATCH 07/69] docs: Updated Status --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 25dbbccc2..4e9e6fb9e 100644 --- a/README.md +++ b/README.md @@ -49,7 +49,7 @@ To get the latest news, go to our [**X (Twitter)**](https://x.com/shadps4) or ou > [!IMPORTANT] > shadPS4 is early in developement, don't expect a flawless experience. -Currently, the emulator successfully runs small games like [**Sonic Mania**](https://www.youtube.com/watch?v=AAHoNzhHyCU), [**Undertale**](https://youtu.be/5zIvdy65Ro4), [**Dysmantle**](https://youtu.be/b9xzhLBdESE), and a few others. Most importantly shadPS4 can *somewhat* run Bloodborne. +Currently, the emulator successfully runs small games like [**Sonic Mania**](https://www.youtube.com/watch?v=AAHoNzhHyCU), [**Undertale**](https://youtu.be/5zIvdy65Ro4) and it can even *somewhat* run [**Bloodborne**](https://www.youtube.com/watch?v=wC6s0avpQRE). # Why From 6a87c37aeb8d49a750696608f187820faeed471b Mon Sep 17 00:00:00 2001 From: SaynedBread <114937220+CyntexMore@users.noreply.github.com> Date: Sun, 25 Aug 2024 14:37:17 +0200 Subject: [PATCH 08/69] docs: Removed misinformation --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 4e9e6fb9e..c99142c78 100644 --- a/README.md +++ b/README.md @@ -101,7 +101,7 @@ For more information on how to test, debug and report issues with the emulator o # Keyboard mapping > [!NOTE] -> Keyboard mappings can be changed from the Qt interface of shadPS4. Xbox and DualShock controllers work out of the box. +> Xbox and DualShock controllers work out of the box. | Controller button | Keyboard equivelant | |-------------|-------------| From 26b5661dea64da7b1f6dc62d2746b5e5468b21a9 Mon Sep 17 00:00:00 2001 From: Dzmitry Dubrova Date: Sun, 25 Aug 2024 15:19:24 +0300 Subject: [PATCH 09/69] ci: Fix linux-qt CI --- .github/linux-appimage-qt.sh | 4 ++++ .github/workflows/linux-qt.yml | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/linux-appimage-qt.sh b/.github/linux-appimage-qt.sh index 870172457..203d214e3 100755 --- a/.github/linux-appimage-qt.sh +++ b/.github/linux-appimage-qt.sh @@ -19,8 +19,12 @@ chmod a+x linuxdeploy-x86_64.AppImage chmod a+x linuxdeploy-plugin-qt-x86_64.AppImage chmod a+x linuxdeploy-plugin-checkrt-x86_64.sh + # Build AppImage ./linuxdeploy-x86_64.AppImage --appdir AppDir ./linuxdeploy-plugin-checkrt-x86_64.sh --appdir AppDir + +cp -a "$GITHUB_WORKSPACE/build/translations" AppDir/usr/bin + ./linuxdeploy-x86_64.AppImage --appdir AppDir -d "$GITHUB_WORKSPACE"/.github/shadps4.desktop -e "$GITHUB_WORKSPACE"/build/shadps4 -i "$GITHUB_WORKSPACE"/.github/shadps4.png --plugin qt --output appimage mv Shadps4-x86_64.AppImage Shadps4-qt.AppImage diff --git a/.github/workflows/linux-qt.yml b/.github/workflows/linux-qt.yml index 5611ae50f..26b80d683 100644 --- a/.github/workflows/linux-qt.yml +++ b/.github/workflows/linux-qt.yml @@ -23,7 +23,7 @@ jobs: - name: Install misc packages run: > - sudo apt-get update && sudo apt install libx11-dev libxext-dev libwayland-dev libfuse2 clang build-essential qt6-base-dev + sudo apt-get update && sudo apt install libx11-dev libxext-dev libwayland-dev libfuse2 clang build-essential qt6-base-dev qt6-tools-dev - name: Configure CMake run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DENABLE_QT_GUI=ON From b687ae5e3474ae4f124a730e4e59b810768c19d7 Mon Sep 17 00:00:00 2001 From: psucien <168137814+psucien@users.noreply.github.com> Date: Sun, 25 Aug 2024 22:01:05 +0200 Subject: [PATCH 10/69] GnmDriver: Clear context support (#567) * gnmdriver: added support for gpu context reset * shader_recompiler: minor validation fixes * shader_recompiler: added `V_CMPX_GT_I32` * shader_recompiler: fix for crash on inline sampler access * compilation warnings and dead code elimination * amdgpu: fix for registers addressing * libraries: videoout: reduce logging pressure * shader_recompiler: fix for devergence scope detection --- CMakeLists.txt | 1 + src/core/libraries/gnmdriver/gnmdriver.cpp | 50 +++++++++++------ src/core/libraries/videoout/video_out.cpp | 16 +++--- .../backend/spirv/emit_spirv.cpp | 1 + .../backend/spirv/spirv_emit_context.cpp | 4 ++ .../frontend/control_flow_graph.cpp | 18 ++++-- .../frontend/instruction.cpp | 14 +++++ src/shader_recompiler/frontend/instruction.h | 1 + .../frontend/translate/vector_alu.cpp | 2 + .../ir/passes/resource_tracking_pass.cpp | 5 +- src/video_core/amdgpu/default_context.cpp | 55 +++++++++++++++++++ src/video_core/amdgpu/liverpool.cpp | 1 + src/video_core/amdgpu/liverpool.h | 2 + src/video_core/buffer_cache/buffer.h | 6 +- .../renderer_vulkan/vk_instance.cpp | 1 + .../renderer_vulkan/vk_rasterizer.cpp | 4 +- src/video_core/texture_cache/image.h | 6 +- src/video_core/texture_cache/image_view.cpp | 3 +- src/video_core/texture_cache/tile_manager.cpp | 7 --- 19 files changed, 147 insertions(+), 50 deletions(-) create mode 100644 src/video_core/amdgpu/default_context.cpp diff --git a/CMakeLists.txt b/CMakeLists.txt index 721f11287..43ad23e94 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -488,6 +488,7 @@ set(VIDEO_CORE src/video_core/amdgpu/liverpool.cpp src/video_core/amdgpu/pm4_cmds.h src/video_core/amdgpu/pm4_opcodes.h src/video_core/amdgpu/resource.h + src/video_core/amdgpu/default_context.cpp src/video_core/buffer_cache/buffer.cpp src/video_core/buffer_cache/buffer.h src/video_core/buffer_cache/buffer_cache.cpp diff --git a/src/core/libraries/gnmdriver/gnmdriver.cpp b/src/core/libraries/gnmdriver/gnmdriver.cpp index c2ee6d592..95821a03b 100644 --- a/src/core/libraries/gnmdriver/gnmdriver.cpp +++ b/src/core/libraries/gnmdriver/gnmdriver.cpp @@ -55,6 +55,10 @@ static constexpr auto HwInitPacketSize = 0x100u; // clang-format off static constexpr std::array InitSequence{ + // A fake preamble to mimic context reset sent by FW + 0xc0001200u, 0u, // IT_CLEAR_STATE + + // Actual init state sequence 0xc0017600u, 0x216u, 0xffffffffu, 0xc0017600u, 0x217u, 0xffffffffu, 0xc0017600u, 0x215u, 0u, @@ -94,9 +98,13 @@ static constexpr std::array InitSequence{ 0xc0036900u, 0x295u, 0x100u, 0x100u, 4u, 0xc0017900u, 0x200u, 0xe0000000u, }; -static_assert(InitSequence.size() == 0x73); +static_assert(InitSequence.size() == 0x73 + 2); static constexpr std::array InitSequence175{ + // A fake preamble to mimic context reset sent by FW + 0xc0001200u, 0u, // IT_CLEAR_STATE + + // Actual init state sequence 0xc0017600u, 0x216u, 0xffffffffu, 0xc0017600u, 0x217u, 0xffffffffu, 0xc0017600u, 0x215u, 0u, @@ -136,9 +144,13 @@ static constexpr std::array InitSequence175{ 0xc0036900u, 0x295u, 0x100u, 0x100u, 4u, 0xc0017900u, 0x200u, 0xe0000000u, }; -static_assert(InitSequence175.size() == 0x73); +static_assert(InitSequence175.size() == 0x73 + 2); static constexpr std::array InitSequence200{ + // A fake preamble to mimic context reset sent by FW + 0xc0001200u, 0u, // IT_CLEAR_STATE + + // Actual init state sequence 0xc0017600u, 0x216u, 0xffffffffu, 0xc0017600u, 0x217u, 0xffffffffu, 0xc0017600u, 0x215u, 0u, @@ -179,9 +191,13 @@ static constexpr std::array InitSequence200{ 0xc0036900u, 0x295u, 0x100u, 0x100u, 4u, 0xc0017900u, 0x200u, 0xe0000000u, }; -static_assert(InitSequence200.size() == 0x76); +static_assert(InitSequence200.size() == 0x76 + 2); static constexpr std::array InitSequence350{ + // A fake preamble to mimic context reset sent by FW + 0xc0001200u, 0u, // IT_CLEAR_STATE + + // Actual init state sequence 0xc0017600u, 0x216u, 0xffffffffu, 0xc0017600u, 0x217u, 0xffffffffu, 0xc0017600u, 0x215u, 0u, @@ -224,7 +240,7 @@ static constexpr std::array InitSequence350{ 0xc0017900u, 0x200u, 0xe0000000u, 0xc0016900u, 0x2aau, 0xffu, }; -static_assert(InitSequence350.size() == 0x7c); +static_assert(InitSequence350.size() == 0x7c + 2); static constexpr std::array CtxInitSequence{ 0xc0012800u, 0x80000000u, 0x80000000u, @@ -735,11 +751,11 @@ u32 PS4_SYSV_ABI sceGnmDrawInitDefaultHardwareState(u32* cmdbuf, u32 size) { cmdbuf = ClearContextState(cmdbuf); } - std::memcpy(cmdbuf, InitSequence.data(), InitSequence.size() * 4); - cmdbuf += InitSequence.size(); + std::memcpy(cmdbuf, &InitSequence[2], (InitSequence.size() - 2) * 4); + cmdbuf += InitSequence.size() - 2; const auto cmdbuf_left = - HwInitPacketSize - InitSequence.size() - (clear_state ? 0xc : 0) - 1; + HwInitPacketSize - (InitSequence.size() - 2) - (clear_state ? 0xc : 0) - 1; cmdbuf = WriteHeader(cmdbuf, cmdbuf_left); cmdbuf = WriteBody(cmdbuf, 0u); @@ -757,10 +773,10 @@ u32 PS4_SYSV_ABI sceGnmDrawInitDefaultHardwareState175(u32* cmdbuf, u32 size) { } cmdbuf = ClearContextState(cmdbuf); - std::memcpy(cmdbuf, InitSequence175.data(), InitSequence175.size() * 4); - cmdbuf += InitSequence175.size(); + std::memcpy(cmdbuf, &InitSequence175[2], (InitSequence175.size() - 2) * 4); + cmdbuf += InitSequence175.size() - 2; - constexpr auto cmdbuf_left = HwInitPacketSize - InitSequence175.size() - 0xc - 1; + constexpr auto cmdbuf_left = HwInitPacketSize - (InitSequence175.size() - 2) - 0xc - 1; WriteTrailingNop(cmdbuf); return HwInitPacketSize; @@ -778,11 +794,11 @@ u32 PS4_SYSV_ABI sceGnmDrawInitDefaultHardwareState200(u32* cmdbuf, u32 size) { cmdbuf = ClearContextState(cmdbuf); } - std::memcpy(cmdbuf, InitSequence200.data(), InitSequence200.size() * 4); - cmdbuf += InitSequence200.size(); + std::memcpy(cmdbuf, &InitSequence200[2], (InitSequence200.size() - 2) * 4); + cmdbuf += InitSequence200.size() - 2; const auto cmdbuf_left = - HwInitPacketSize - InitSequence200.size() - (clear_state ? 0xc : 0) - 1; + HwInitPacketSize - (InitSequence200.size() - 2) - (clear_state ? 0xc : 0) - 1; cmdbuf = WriteHeader(cmdbuf, cmdbuf_left); cmdbuf = WriteBody(cmdbuf, 0u); @@ -804,11 +820,11 @@ u32 PS4_SYSV_ABI sceGnmDrawInitDefaultHardwareState350(u32* cmdbuf, u32 size) { cmdbuf = ClearContextState(cmdbuf); } - std::memcpy(cmdbuf, InitSequence350.data(), InitSequence350.size() * 4); - cmdbuf += InitSequence350.size(); + std::memcpy(cmdbuf, &InitSequence350[2], (InitSequence350.size() - 2) * 4); + cmdbuf += InitSequence350.size() - 2; const auto cmdbuf_left = - HwInitPacketSize - InitSequence350.size() - (clear_state ? 0xc : 0) - 1; + HwInitPacketSize - (InitSequence350.size() - 2) - (clear_state ? 0xc : 0) - 1; cmdbuf = WriteHeader(cmdbuf, cmdbuf_left); cmdbuf = WriteBody(cmdbuf, 0u); @@ -1743,7 +1759,7 @@ s32 PS4_SYSV_ABI sceGnmSetVsShader(u32* cmdbuf, u32 size, const u32* vs_regs, u3 return -1; } - const u32 var = shader_modifier == 0 ? vs_regs[2] : (vs_regs[2] & 0xfcfffc3f | shader_modifier); + const u32 var = shader_modifier == 0 ? vs_regs[2] : (vs_regs[2] & 0xfcfffc3f) | shader_modifier; cmdbuf = PM4CmdSetData::SetShReg(cmdbuf, 0x48u, vs_regs[0], 0u); // SPI_SHADER_PGM_LO_VS cmdbuf = PM4CmdSetData::SetShReg(cmdbuf, 0x4au, var, vs_regs[3]); // SPI_SHADER_PGM_RSRC1_VS cmdbuf = PM4CmdSetData::SetContextReg(cmdbuf, 0x207u, vs_regs[6]); // PA_CL_VS_OUT_CNTL diff --git a/src/core/libraries/videoout/video_out.cpp b/src/core/libraries/videoout/video_out.cpp index d13062cd4..a6c1a7623 100644 --- a/src/core/libraries/videoout/video_out.cpp +++ b/src/core/libraries/videoout/video_out.cpp @@ -185,14 +185,16 @@ s32 PS4_SYSV_ABI sceVideoOutGetFlipStatus(s32 handle, FlipStatus* status) { return ORBIS_VIDEO_OUT_ERROR_INVALID_HANDLE; } - std::unique_lock lock{port->port_mutex}; - *status = port->flip_status; + { + std::unique_lock lock{port->port_mutex}; + *status = port->flip_status; + } - LOG_INFO(Lib_VideoOut, - "count = {}, processTime = {}, tsc = {}, submitTsc = {}, flipArg = {}, gcQueueNum = " - "{}, flipPendingNum = {}, currentBuffer = {}", - status->count, status->processTime, status->tsc, status->submitTsc, status->flipArg, - status->gcQueueNum, status->flipPendingNum, status->currentBuffer); + LOG_TRACE(Lib_VideoOut, + "count = {}, processTime = {}, tsc = {}, submitTsc = {}, flipArg = {}, gcQueueNum = " + "{}, flipPendingNum = {}, currentBuffer = {}", + status->count, status->processTime, status->tsc, status->submitTsc, status->flipArg, + status->gcQueueNum, status->flipPendingNum, status->currentBuffer); return ORBIS_OK; } diff --git a/src/shader_recompiler/backend/spirv/emit_spirv.cpp b/src/shader_recompiler/backend/spirv/emit_spirv.cpp index c70427635..09a9fd629 100644 --- a/src/shader_recompiler/backend/spirv/emit_spirv.cpp +++ b/src/shader_recompiler/backend/spirv/emit_spirv.cpp @@ -179,6 +179,7 @@ void DefineEntryPoint(const IR::Program& program, EmitContext& ctx, Id main) { spv::ExecutionModel execution_model{}; ctx.AddCapability(spv::Capability::Image1D); ctx.AddCapability(spv::Capability::Sampled1D); + ctx.AddCapability(spv::Capability::ImageQuery); if (info.uses_fp16) { ctx.AddCapability(spv::Capability::Float16); ctx.AddCapability(spv::Capability::Int16); diff --git a/src/shader_recompiler/backend/spirv/spirv_emit_context.cpp b/src/shader_recompiler/backend/spirv/spirv_emit_context.cpp index e48b89f4b..994c2847e 100644 --- a/src/shader_recompiler/backend/spirv/spirv_emit_context.cpp +++ b/src/shader_recompiler/backend/spirv/spirv_emit_context.cpp @@ -405,6 +405,10 @@ spv::ImageFormat GetFormat(const AmdGpu::Image& image) { image.GetNumberFmt() == AmdGpu::NumberFormat::Float) { return spv::ImageFormat::Rg16f; } + if (image.GetDataFmt() == AmdGpu::DataFormat::Format16_16 && + image.GetNumberFmt() == AmdGpu::NumberFormat::Snorm) { + return spv::ImageFormat::Rg16Snorm; + } if (image.GetDataFmt() == AmdGpu::DataFormat::Format8_8 && image.GetNumberFmt() == AmdGpu::NumberFormat::Unorm) { return spv::ImageFormat::Rg8; diff --git a/src/shader_recompiler/frontend/control_flow_graph.cpp b/src/shader_recompiler/frontend/control_flow_graph.cpp index 3faf8665b..276bd9db0 100644 --- a/src/shader_recompiler/frontend/control_flow_graph.cpp +++ b/src/shader_recompiler/frontend/control_flow_graph.cpp @@ -21,8 +21,13 @@ struct Compare { } }; -static IR::Condition MakeCondition(Opcode opcode) { - switch (opcode) { +static IR::Condition MakeCondition(const GcnInst& inst) { + if (inst.IsCmpx()) { + ASSERT(inst.opcode == Opcode::V_CMPX_NE_U32); + return IR::Condition::Execnz; + } + + switch (inst.opcode) { case Opcode::S_CBRANCH_SCC0: return IR::Condition::Scc0; case Opcode::S_CBRANCH_SCC1: @@ -37,7 +42,6 @@ static IR::Condition MakeCondition(Opcode opcode) { return IR::Condition::Execnz; case Opcode::S_AND_SAVEEXEC_B64: case Opcode::S_ANDN2_B64: - case Opcode::V_CMPX_NE_U32: return IR::Condition::Execnz; default: return IR::Condition::True; @@ -94,7 +98,8 @@ void CFG::EmitDivergenceLabels() { // While this instruction does not save EXEC it is often used paired // with SAVEEXEC to mask the threads that didn't pass the condition // of initial branch. - inst.opcode == Opcode::S_ANDN2_B64 || inst.opcode == Opcode::V_CMPX_NE_U32; + (inst.opcode == Opcode::S_ANDN2_B64 && inst.dst[0].field == OperandField::ExecLo) || + inst.opcode == Opcode::V_CMPX_NE_U32; }; const auto is_close_scope = [](const GcnInst& inst) { // Closing an EXEC scope can be either a branch instruction @@ -104,7 +109,8 @@ void CFG::EmitDivergenceLabels() { // Sometimes compiler might insert instructions between the SAVEEXEC and the branch. // Those instructions need to be wrapped in the condition as well so allow branch // as end scope instruction. - inst.opcode == Opcode::S_CBRANCH_EXECZ || inst.opcode == Opcode::S_ANDN2_B64; + inst.opcode == Opcode::S_CBRANCH_EXECZ || + (inst.opcode == Opcode::S_ANDN2_B64 && inst.dst[0].field == OperandField::ExecLo); }; // Since we will be adding new labels, avoid iterating those as well. @@ -171,7 +177,7 @@ void CFG::EmitBlocks() { block->begin_index = GetIndex(start); block->end_index = end_index; block->end_inst = end_inst; - block->cond = MakeCondition(end_inst.opcode); + block->cond = MakeCondition(end_inst); blocks.insert(*block); } } diff --git a/src/shader_recompiler/frontend/instruction.cpp b/src/shader_recompiler/frontend/instruction.cpp index 756d3b4e2..a0c132053 100644 --- a/src/shader_recompiler/frontend/instruction.cpp +++ b/src/shader_recompiler/frontend/instruction.cpp @@ -47,4 +47,18 @@ bool GcnInst::IsConditionalBranch() const { return false; } +bool GcnInst::IsCmpx() const { + if ((opcode >= Opcode::V_CMPX_F_F32 && opcode <= Opcode::V_CMPX_T_F32) || + (opcode >= Opcode::V_CMPX_F_F64 && opcode <= Opcode::V_CMPX_T_F64) || + (opcode >= Opcode::V_CMPSX_F_F32 && opcode <= Opcode::V_CMPSX_T_F32) || + (opcode >= Opcode::V_CMPSX_F_F64 && opcode <= Opcode::V_CMPSX_T_F64) || + (opcode >= Opcode::V_CMPX_F_I32 && opcode <= Opcode::V_CMPX_CLASS_F32) || + (opcode >= Opcode::V_CMPX_F_I64 && opcode <= Opcode::V_CMPX_CLASS_F64) || + (opcode >= Opcode::V_CMPX_F_U32 && opcode <= Opcode::V_CMPX_T_U32) || + (opcode >= Opcode::V_CMPX_F_U64 && opcode <= Opcode::V_CMPX_T_U64)) { + return true; + } + return false; +} + } // namespace Shader::Gcn diff --git a/src/shader_recompiler/frontend/instruction.h b/src/shader_recompiler/frontend/instruction.h index f83f43db5..7c2e0bd1e 100644 --- a/src/shader_recompiler/frontend/instruction.h +++ b/src/shader_recompiler/frontend/instruction.h @@ -203,6 +203,7 @@ struct GcnInst { bool IsUnconditionalBranch() const; bool IsConditionalBranch() const; bool IsFork() const; + bool IsCmpx() const; }; } // namespace Shader::Gcn diff --git a/src/shader_recompiler/frontend/translate/vector_alu.cpp b/src/shader_recompiler/frontend/translate/vector_alu.cpp index 1bbc3c162..0216238ab 100644 --- a/src/shader_recompiler/frontend/translate/vector_alu.cpp +++ b/src/shader_recompiler/frontend/translate/vector_alu.cpp @@ -280,6 +280,8 @@ void Translator::EmitVectorAlu(const GcnInst& inst) { return V_CMP_U32(ConditionOp::GT, true, false, inst); case Opcode::V_CMP_LT_I32: return V_CMP_U32(ConditionOp::LT, true, false, inst); + case Opcode::V_CMPX_GT_I32: + return V_CMP_U32(ConditionOp::GT, true, true, inst); case Opcode::V_CMPX_LT_I32: return V_CMP_U32(ConditionOp::LT, true, true, inst); case Opcode::V_CMPX_F_U32: diff --git a/src/shader_recompiler/ir/passes/resource_tracking_pass.cpp b/src/shader_recompiler/ir/passes/resource_tracking_pass.cpp index efee710db..016ba3660 100644 --- a/src/shader_recompiler/ir/passes/resource_tracking_pass.cpp +++ b/src/shader_recompiler/ir/passes/resource_tracking_pass.cpp @@ -246,10 +246,7 @@ public: return true; } // Samplers with different bindings might still be the same. - const auto old_sharp = - info.ReadUd(existing.sgpr_base, existing.dword_offset); - const auto new_sharp = info.ReadUd(desc.sgpr_base, desc.dword_offset); - return old_sharp == new_sharp; + return existing.GetSsharp(info) == desc.GetSsharp(info); })}; return index; } diff --git a/src/video_core/amdgpu/default_context.cpp b/src/video_core/amdgpu/default_context.cpp new file mode 100644 index 000000000..01229e7b1 --- /dev/null +++ b/src/video_core/amdgpu/default_context.cpp @@ -0,0 +1,55 @@ +// SPDX-FileCopyrightText: Copyright 2024 shadPS4 Emulator Project +// SPDX-License-Identifier: GPL-2.0-or-later + +#include "common/types.h" +#include "video_core/amdgpu/liverpool.h" + +#include + +namespace AmdGpu { + +// The following values are taken from fpPS4: +// https://github.com/red-prig/fpPS4/blob/436b43064be4c78229500f3d3c054fc76639247d/chip/pm4_pfp.pas#L410 +// +static constexpr std::array reg_array_default{ + 0x00000000u, 0x80000000u, 0x40004000u, 0xdeadbeefu, 0x00000000u, 0x40004000u, 0x00000000u, + 0x40004000u, 0x00000000u, 0x40004000u, 0x00000000u, 0x40004000u, 0xaa99aaaau, 0x00000000u, + 0xdeadbeefu, 0xdeadbeefu, 0x80000000u, 0x40004000u, 0x00000000u, 0x00000000u, 0x80000000u, + 0x40004000u, 0x80000000u, 0x40004000u, 0x80000000u, 0x40004000u, 0x80000000u, 0x40004000u, + 0x80000000u, 0x40004000u, 0x80000000u, 0x40004000u, 0x80000000u, 0x40004000u, 0x80000000u, + 0x40004000u, 0x80000000u, 0x40004000u, 0x80000000u, 0x40004000u, 0x80000000u, 0x40004000u, + 0x80000000u, 0x40004000u, 0x80000000u, 0x40004000u, 0x80000000u, 0x40004000u, 0x80000000u, + 0x40004000u, 0x80000000u, 0x40004000u, 0x00000000u, 0x3f800000u, 0x00000000u, 0x3f800000u, + 0x00000000u, 0x3f800000u, 0x00000000u, 0x3f800000u, 0x00000000u, 0x3f800000u, 0x00000000u, + 0x3f800000u, 0x00000000u, 0x3f800000u, 0x00000000u, 0x3f800000u, 0x00000000u, 0x3f800000u, + 0x00000000u, 0x3f800000u, 0x00000000u, 0x3f800000u, 0x00000000u, 0x3f800000u, 0x00000000u, + 0x3f800000u, 0x00000000u, 0x3f800000u, 0x00000000u, 0x3f800000u, 0x00000000u, 0x3f800000u, + 0x2a00161au, +}; + +void Liverpool::Regs::SetDefaults() { + std::memset(reg_array.data(), 0, reg_array.size() * sizeof(u32)); + + std::memcpy(®_array[ContextRegWordOffset + 0x80], reg_array_default.data(), + reg_array_default.size() * sizeof(u32)); + + // Individual context regs values + reg_array[ContextRegWordOffset + 0x000d] = 0x40004000u; + reg_array[ContextRegWordOffset + 0x01b6] = 0x00000002u; + reg_array[ContextRegWordOffset + 0x0204] = 0x00090000u; + reg_array[ContextRegWordOffset + 0x0205] = 0x00000004u; + reg_array[ContextRegWordOffset + 0x0295] = 0x00000100u; + reg_array[ContextRegWordOffset + 0x0296] = 0x00000080u; + reg_array[ContextRegWordOffset + 0x0297] = 0x00000002u; + reg_array[ContextRegWordOffset + 0x02aa] = 0x00001000u; + reg_array[ContextRegWordOffset + 0x02f7] = 0x00001000u; + reg_array[ContextRegWordOffset + 0x02f9] = 0x00000005u; + reg_array[ContextRegWordOffset + 0x02fa] = 0x3f800000u; + reg_array[ContextRegWordOffset + 0x02fb] = 0x3f800000u; + reg_array[ContextRegWordOffset + 0x02fc] = 0x3f800000u; + reg_array[ContextRegWordOffset + 0x02fd] = 0x3f800000u; + reg_array[ContextRegWordOffset + 0x0316] = 0x0000000eu; + reg_array[ContextRegWordOffset + 0x0317] = 0x00000010u; +} + +} // namespace AmdGpu diff --git a/src/video_core/amdgpu/liverpool.cpp b/src/video_core/amdgpu/liverpool.cpp index dce2d4b42..89ab7fe43 100644 --- a/src/video_core/amdgpu/liverpool.cpp +++ b/src/video_core/amdgpu/liverpool.cpp @@ -216,6 +216,7 @@ Liverpool::Task Liverpool::ProcessGraphics(std::span dcb, std::span usage_override /*= {}*/) - : info{info_}, image_id{image_id_} { + : image_id{image_id_}, info{info_} { vk::ImageViewUsageCreateInfo usage_ci{}; if (usage_override) { usage_ci.usage = usage_override.value(); diff --git a/src/video_core/texture_cache/tile_manager.cpp b/src/video_core/texture_cache/tile_manager.cpp index 6bb104a66..0bed5adc2 100644 --- a/src/video_core/texture_cache/tile_manager.cpp +++ b/src/video_core/texture_cache/tile_manager.cpp @@ -342,12 +342,6 @@ TileManager::ScratchBuffer TileManager::AllocBuffer(u32 size, bool is_storage /* .usage = usage, }; -#ifdef __APPLE__ - // Fix for detiler artifacts on macOS - const bool is_large_buffer = true; -#else - const bool is_large_buffer = size > 128_MB; -#endif VmaAllocationCreateInfo alloc_info{ .flags = !is_storage ? VMA_ALLOCATION_CREATE_HOST_ACCESS_ALLOW_TRANSFER_INSTEAD_BIT | VMA_ALLOCATION_CREATE_HOST_ACCESS_SEQUENTIAL_WRITE_BIT @@ -462,7 +456,6 @@ std::optional TileManager::TryDetile(Image& image) { (m > 0 ? params.sizes[m - 1] : 0); } - auto pitch = image.info.pitch; cmdbuf.pushConstants(*detiler->pl_layout, vk::ShaderStageFlagBits::eCompute, 0u, sizeof(params), ¶ms); From 2a737d08004e9429720226ed2069397d643bc802 Mon Sep 17 00:00:00 2001 From: DanielSvoboda Date: Sun, 25 Aug 2024 17:07:46 -0300 Subject: [PATCH 11/69] V_NOP | PfpSyncMe | S_CMPK_EQ_U32 (#426) * V_NOP V_NOP = Do nothing * PfpSyncMe PfpSyncMe ensures that all previous commands are completed before continuing. 'break' should be enough for now * S_CMPK_EQ_U32 S_CMPK_EQ_U32 SCC = (D.u == SIMM16) * S_CMPK_EQ_U32 * OperandField::Undefined: * Update translate.cpp remove OperandField::Undefined: * Update image_view.cpp [Render.Vulkan] image_view.cpp:ImageViewInfo:109: Storage image (num_comps = 4) requires swizzling [BGRA] format 43 dst_sel 3886 * Update liverpool_to_vk.cpp * S_CMPK_EQ_U32 * S_CMPK_EQ_U32 --- src/shader_recompiler/frontend/translate/scalar_alu.cpp | 9 +++++++++ src/shader_recompiler/frontend/translate/translate.h | 1 + src/shader_recompiler/frontend/translate/vector_alu.cpp | 2 ++ src/video_core/amdgpu/liverpool.cpp | 3 +++ src/video_core/renderer_vulkan/liverpool_to_vk.cpp | 1 + src/video_core/texture_cache/image_view.cpp | 3 +++ 6 files changed, 19 insertions(+) diff --git a/src/shader_recompiler/frontend/translate/scalar_alu.cpp b/src/shader_recompiler/frontend/translate/scalar_alu.cpp index 7f7c9d7e0..50a550d44 100644 --- a/src/shader_recompiler/frontend/translate/scalar_alu.cpp +++ b/src/shader_recompiler/frontend/translate/scalar_alu.cpp @@ -96,6 +96,8 @@ void Translator::EmitScalarAlu(const GcnInst& inst) { return S_MAX_U32(inst); case Opcode::S_WQM_B64: break; + case Opcode::S_CMPK_EQ_U32: + return S_CMPK_EQ_U32(inst); default: LogMissingOpcode(inst); } @@ -468,4 +470,11 @@ void Translator::S_MIN_U32(const GcnInst& inst) { ir.SetScc(ir.IEqual(result, src0)); } +void Translator::S_CMPK_EQ_U32(const GcnInst& inst) { + const s32 simm16 = inst.control.sopk.simm; + const IR::U32 src0{GetSrc(inst.src[0])}; + const IR::U32 src1{ir.Imm32(simm16)}; + ir.SetScc(ir.IEqual(src0, src1)); +} + } // namespace Shader::Gcn diff --git a/src/shader_recompiler/frontend/translate/translate.h b/src/shader_recompiler/frontend/translate/translate.h index 009acabdf..6de5e3673 100644 --- a/src/shader_recompiler/frontend/translate/translate.h +++ b/src/shader_recompiler/frontend/translate/translate.h @@ -98,6 +98,7 @@ public: void S_ADDK_I32(const GcnInst& inst); void S_MAX_U32(const GcnInst& inst); void S_MIN_U32(const GcnInst& inst); + void S_CMPK_EQ_U32(const GcnInst& inst); // Scalar Memory void S_LOAD_DWORD(int num_dwords, const GcnInst& inst); diff --git a/src/shader_recompiler/frontend/translate/vector_alu.cpp b/src/shader_recompiler/frontend/translate/vector_alu.cpp index 0216238ab..99543a207 100644 --- a/src/shader_recompiler/frontend/translate/vector_alu.cpp +++ b/src/shader_recompiler/frontend/translate/vector_alu.cpp @@ -307,6 +307,8 @@ void Translator::EmitVectorAlu(const GcnInst& inst) { return V_MBCNT_U32_B32(true, inst); case Opcode::V_MBCNT_HI_U32_B32: return V_MBCNT_U32_B32(false, inst); + case Opcode::V_NOP: + return; default: LogMissingOpcode(inst); } diff --git a/src/video_core/amdgpu/liverpool.cpp b/src/video_core/amdgpu/liverpool.cpp index 89ab7fe43..5b3db603a 100644 --- a/src/video_core/amdgpu/liverpool.cpp +++ b/src/video_core/amdgpu/liverpool.cpp @@ -455,6 +455,9 @@ Liverpool::Task Liverpool::ProcessGraphics(std::span dcb, std::span(opcode), count); diff --git a/src/video_core/renderer_vulkan/liverpool_to_vk.cpp b/src/video_core/renderer_vulkan/liverpool_to_vk.cpp index c42e4f609..025f311d8 100644 --- a/src/video_core/renderer_vulkan/liverpool_to_vk.cpp +++ b/src/video_core/renderer_vulkan/liverpool_to_vk.cpp @@ -320,6 +320,7 @@ std::span GetAllFormats() { vk::Format::eR8G8Uint, vk::Format::eR8G8Unorm, vk::Format::eR8Sint, + vk::Format::eR8Snorm, vk::Format::eR8Uint, vk::Format::eR8Unorm, vk::Format::eR8Srgb, diff --git a/src/video_core/texture_cache/image_view.cpp b/src/video_core/texture_cache/image_view.cpp index 9f6ec5c4f..08be6bdc5 100644 --- a/src/video_core/texture_cache/image_view.cpp +++ b/src/video_core/texture_cache/image_view.cpp @@ -59,6 +59,9 @@ vk::Format TrySwizzleFormat(vk::Format format, u32 dst_sel) { if (format == vk::Format::eR8G8B8A8Unorm && dst_sel == 0b111100101110) { return vk::Format::eB8G8R8A8Unorm; } + if (format == vk::Format::eR8G8B8A8Srgb && dst_sel == 0b111100101110) { + return vk::Format::eB8G8R8A8Srgb; + } return format; } From 6fd4264b5d9784ea9cf327841bff043c74ca37df Mon Sep 17 00:00:00 2001 From: psucien Date: Sun, 25 Aug 2024 22:24:10 +0200 Subject: [PATCH 12/69] video_core: vk_rasterizer: fix for crash on markers with nullGpu --- src/video_core/renderer_vulkan/vk_rasterizer.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/video_core/renderer_vulkan/vk_rasterizer.cpp b/src/video_core/renderer_vulkan/vk_rasterizer.cpp index b26c36cef..f22f19eaf 100644 --- a/src/video_core/renderer_vulkan/vk_rasterizer.cpp +++ b/src/video_core/renderer_vulkan/vk_rasterizer.cpp @@ -243,7 +243,7 @@ void Rasterizer::UpdateDepthStencilState() { } void Rasterizer::ScopeMarkerBegin(const std::string_view& str) { - if (!Config::isMarkersEnabled()) { + if (Config::nullGpu() || !Config::isMarkersEnabled()) { return; } @@ -254,7 +254,7 @@ void Rasterizer::ScopeMarkerBegin(const std::string_view& str) { } void Rasterizer::ScopeMarkerEnd() { - if (!Config::isMarkersEnabled()) { + if (Config::nullGpu() || !Config::isMarkersEnabled()) { return; } @@ -263,7 +263,7 @@ void Rasterizer::ScopeMarkerEnd() { } void Rasterizer::ScopedMarkerInsert(const std::string_view& str) { - if (!Config::isMarkersEnabled()) { + if (Config::nullGpu() || !Config::isMarkersEnabled()) { return; } @@ -274,7 +274,7 @@ void Rasterizer::ScopedMarkerInsert(const std::string_view& str) { } void Rasterizer::Breadcrumb(u64 id) { - if (!instance.HasNvCheckpoints()) { + if (Config::nullGpu() || !instance.HasNvCheckpoints()) { return; } scheduler.CommandBuffer().setCheckpointNV(id); From bcc3a105576c54e16def5719959721d116e03864 Mon Sep 17 00:00:00 2001 From: bigol83 <38129260+bigol83@users.noreply.github.com> Date: Mon, 26 Aug 2024 02:22:07 +0200 Subject: [PATCH 13/69] Add Italian translation (#585) * Update it.ts * Update it.ts --- src/qt_gui/translations/it.ts | 178 +++++++++++++++++----------------- 1 file changed, 89 insertions(+), 89 deletions(-) diff --git a/src/qt_gui/translations/it.ts b/src/qt_gui/translations/it.ts index 64d123f2e..228d798d0 100644 --- a/src/qt_gui/translations/it.ts +++ b/src/qt_gui/translations/it.ts @@ -6,7 +6,7 @@ About shadPS4 - About shadPS4 + Riguardo shadPS4 @@ -16,12 +16,12 @@ shadPS4 is an experimental open-source emulator for the PlayStation 4. - shadPS4 is an experimental open-source emulator for the PlayStation 4. + shadPS4 è un emulatore sperimentale open source per Playstation 4. This software should not be used to play games you have not legally obtained. - This software should not be used to play games you have not legally obtained. + Questo programma non dovrebbe essere utilizzato per riprodurre giochi che non vengono ottenuti legalmente. @@ -29,7 +29,7 @@ Open Folder - Open Folder + Apri Cartella @@ -37,17 +37,17 @@ Loading game list, please wait :3 - Loading game list, please wait :3 + Caricamento lista giochi, attendere :3 Cancel - Cancel + Annulla Loading... - Loading... + Caricamento... @@ -55,27 +55,27 @@ shadPS4 - Choose directory - shadPS4 - Choose directory + shadPS4 - Scegli cartella Directory to install games - Directory to install games + Cartella di installazione dei giochi Browse - Browse + Sfoglia Error - Error + Errore The value for location to install games is not valid. - The value for location to install games is not valid. + Il valore del percorso di installazione dei giochi non è valido. @@ -83,67 +83,67 @@ Create Shortcut - Create Shortcut + Crea scorciatoia Open Game Folder - Open Game Folder + Apri cartella del gioco SFO Viewer - SFO Viewer + Visualizzatore SFO Trophy Viewer - Trophy Viewer + Visualizzatore Trofei Copy info - Copy info + Copia informazioni Copy Name - Copy Name + Copia Nome Copy Serial - Copy Serial + Copia Seriale Copy All - Copy All + Copia Tutto Shortcut creation - Shortcut creation + Creazione scorciatoia Shortcut created successfully!\n %1 - Shortcut created successfully!\n %1 + Scorciatoia creata con successo!\n %1 Error - Error + Errore Error creating shortcut!\n %1 - Error creating shortcut!\n %1 + Errore nella creazione della scorciatoia!\n %1 Install PKG - Install PKG + Installa PKG @@ -151,117 +151,117 @@ Open/Add Elf Folder - Open/Add Elf Folder + Apri/Aggiungi cartella Elf Install Packages (PKG) - Install Packages (PKG) + Installa Pacchetti (PKG) Boot Game - Boot Game + Avvia Gioco About shadPS4 - About shadPS4 + Riguardo a shadPS4 Configure... - Configure... + Configura... Install application from a .pkg file - Install application from a .pkg file + Installa applicaazione da un .pkg file Recent Games - Recent Games + Giochi Recenti Exit - Exit + Uscita Exit shadPS4 - Exit shadPS4 + Esci da shadPS4 Exit the application. - Exit the application. + Esci dall'applicazione. Show Game List - Show Game List + Mostra Lista Giochi Game List Refresh - Game List Refresh + Aggiorna Lista Giochi Tiny - Tiny + Minuscolo Small - Small + Piccolo Medium - Medium + Medio Large - Large + Grande List View - List View + Visualizzazione lista Grid View - Grid View + Visualizzazione Griglia Elf Viewer - Elf Viewer + Visualizzatore Elf Game Install Directory - Game Install Directory + Cartella Installazione Giochi Dump Game List - Dump Game List + Scarica Lista Giochi PKG Viewer - PKG Viewer + Visualizzatore PKG Search... - Search... + Cerca... @@ -271,67 +271,67 @@ View - View + Visualizza Game List Icons - Game List Icons + Icone Lista Giochi Game List Mode - Game List Mode + Modalità Lista Giochi Settings - Settings + Impostazioni Utils - Utils + Utilità Themes - Themes + Temi About - About + Info su Dark - Dark + Scuro Light - Light + Chiaro Green - Green + Verde Blue - Blue + Blu Violet - Violet + Viola toolBar - toolBar + barra strumenti @@ -339,14 +339,14 @@ Open Folder - Open Folder + Apri Cartella TrophyViewer - Trophy Viewer + Visualizzatore Trofei Trophy Viewer @@ -355,52 +355,52 @@ Settings - Settings + Impostazioni General - General + Generale System - System + Systema Console Language - Console Language + Lingua della console Emulator Language - Emulator Language + Lingua dell'emulatore Emulator - Emulator + Emulatore Enable Fullscreen - Enable Fullscreen + Abilita Schermo Intero Show Splash - Show Splash + Mostra Schermata Iniziale Is PS4 Pro - Is PS4 Pro + Modalità Ps4Pro Username - Username + Nome Utente @@ -410,57 +410,57 @@ Log Type - Log Type + Tipo di Log Log Filter - Log Filter + Filtro Log Graphics - Graphics + Grafica Graphics Device - Graphics Device + Adattatore grafico Width - Width + Larghezza Height - Height + Altezza Vblank Divider - Vblank Divider + Divisore Vblank Advanced - Advanced + Avanzato Enable Shaders Dumping - Enable Shaders Dumping + Abilita Scaricamento Shader Enable NULL GPU - Enable NULL GPU + Abilita NULL GPU Enable PM4 Dumping - Enable PM4 Dumping + Abilita Scaricamento PM4 @@ -470,22 +470,22 @@ Enable Debug Dumping - Enable Debug Dumping + Abilita Scaricamento Debug Enable Vulkan Validation Layers - Enable Vulkan Validation Layers + Abilita Vulkan Validation Layers Enable Vulkan Synchronization Validation - Enable Vulkan Synchronization Validation + Abilita Vulkan Synchronization Validation Enable RenderDoc Debugging - Enable RenderDoc Debugging + Abilita Debugging RenderDoc - \ No newline at end of file + From 5d7407dc7dfeebba3cda7e04be49269056329a5a Mon Sep 17 00:00:00 2001 From: Yury <27062841+f1amy@users.noreply.github.com> Date: Mon, 26 Aug 2024 05:22:30 +0500 Subject: [PATCH 14/69] Add ru translation (#579) --- src/qt_gui/translations/ru_RU.ts | 184 +++++++++++++++---------------- 1 file changed, 92 insertions(+), 92 deletions(-) diff --git a/src/qt_gui/translations/ru_RU.ts b/src/qt_gui/translations/ru_RU.ts index 556875e17..46a30cdeb 100644 --- a/src/qt_gui/translations/ru_RU.ts +++ b/src/qt_gui/translations/ru_RU.ts @@ -6,7 +6,7 @@ About shadPS4 - About shadPS4 + О shadPS4 @@ -16,12 +16,12 @@ shadPS4 is an experimental open-source emulator for the PlayStation 4. - shadPS4 is an experimental open-source emulator for the PlayStation 4. + shadPS4 это экспериментальный эмулятор с открытым исходным кодом для PlayStation 4. This software should not be used to play games you have not legally obtained. - This software should not be used to play games you have not legally obtained. + Это програмное обеспечение не должно использоваться для запуска игр, которые вы получили нелегально. @@ -29,7 +29,7 @@ Open Folder - Open Folder + Открыть папку @@ -37,17 +37,17 @@ Loading game list, please wait :3 - Loading game list, please wait :3 + Загрузка списка игр, пожалуйста подождите :3 Cancel - Cancel + Отмена Loading... - Loading... + Загрузка... @@ -55,27 +55,27 @@ shadPS4 - Choose directory - shadPS4 - Choose directory + shadPS4 - Выберите папку Directory to install games - Directory to install games + Папка для установки игр Browse - Browse + Обзор Error - Error + Ошибка The value for location to install games is not valid. - The value for location to install games is not valid. + Недопустимое значение местоположения для установки игр. @@ -83,67 +83,67 @@ Create Shortcut - Create Shortcut + Создать ярлык Open Game Folder - Open Game Folder + Открыть папку с игрой SFO Viewer - SFO Viewer + Просмотр SFO Trophy Viewer - Trophy Viewer + Просмотр трофеев Copy info - Copy info + Копировать информацию Copy Name - Copy Name + Копировать имя Copy Serial - Copy Serial + Копировать серийный номер Copy All - Copy All + Копировать все Shortcut creation - Shortcut creation + Создание ярлыка Shortcut created successfully!\n %1 - Shortcut created successfully!\n %1 + Ярлык создан успешно!\n %1 Error - Error + Ошибка Error creating shortcut!\n %1 - Error creating shortcut!\n %1 + Ошибка создания ярлыка!\n %1 Install PKG - Install PKG + Установить PKG @@ -151,187 +151,187 @@ Open/Add Elf Folder - Open/Add Elf Folder + Открыть/Добавить папку Elf Install Packages (PKG) - Install Packages (PKG) + Установить пакеты (PKG) Boot Game - Boot Game + Запустить игру About shadPS4 - About shadPS4 + О shadPS4 Configure... - Configure... + Настроить... Install application from a .pkg file - Install application from a .pkg file + Установить приложение из файла .pkg Recent Games - Recent Games + Недавние игры Exit - Exit + Выход Exit shadPS4 - Exit shadPS4 + Выйти из shadPS4 Exit the application. - Exit the application. + Выйти из приложения. Show Game List - Show Game List + Показать список игр Game List Refresh - Game List Refresh + Обновить список игр Tiny - Tiny + Крошечный Small - Small + Маленький Medium - Medium + Средний Large - Large + Большой List View - List View + Список Grid View - Grid View + Сетка Elf Viewer - Elf Viewer + Elf Game Install Directory - Game Install Directory + Каталог установки игры Dump Game List - Dump Game List + Дамп списка игр PKG Viewer - PKG Viewer + Просмотр PKG Search... - Search... + Поиск... File - File + Файл View - View + Вид Game List Icons - Game List Icons + Размер иконок списка игр Game List Mode - Game List Mode + Вид списка игр Settings - Settings + Настройки Utils - Utils + Утилиты Themes - Themes + Темы About - About + Справка Dark - Dark + Темная Light - Light + Светлая Green - Green + Зеленая Blue - Blue + Синяя Violet - Violet + Фиолетовая toolBar - toolBar + Панель инструментов @@ -339,7 +339,7 @@ Open Folder - Open Folder + Открыть папку @@ -347,7 +347,7 @@ Trophy Viewer - Trophy Viewer + Трофеи @@ -355,137 +355,137 @@ Settings - Settings + Настройки General - General + Общее System - System + Система Console Language - Console Language + Язык консоли Emulator Language - Emulator Language + Язык эмулятора Emulator - Emulator + Эмулятор Enable Fullscreen - Enable Fullscreen + Включить полноэкранный режим Show Splash - Show Splash + Показать заставку Is PS4 Pro - Is PS4 Pro + Режим PS4 Pro Username - Username + Имя пользователя Logger - Logger + Логирование Log Type - Log Type + Тип логов Log Filter - Log Filter + Фильтр логов Graphics - Graphics + Графика Graphics Device - Graphics Device + Графическое устройство Width - Width + Ширина Height - Height + Высота Vblank Divider - Vblank Divider + Разделитель Vblank Advanced - Advanced + Продвинутые Enable Shaders Dumping - Enable Shaders Dumping + Включить дамп шейдеров Enable NULL GPU - Enable NULL GPU + Включить NULL GPU Enable PM4 Dumping - Enable PM4 Dumping + Включить дамп PM4 Debug - Debug + Отладка Enable Debug Dumping - Enable Debug Dumping + Включить отладочные дампы Enable Vulkan Validation Layers - Enable Vulkan Validation Layers + Включить слои валидации Vulkan Enable Vulkan Synchronization Validation - Enable Vulkan Synchronization Validation + Включить валидацию синхронизации Vulkan Enable RenderDoc Debugging - Enable RenderDoc Debugging + Включить отладку RenderDoc - \ No newline at end of file + From fae0c0ae8509d69a1d6b38af93629c34e86b5c89 Mon Sep 17 00:00:00 2001 From: "Daniel R." <47796739+polybiusproxy@users.noreply.github.com> Date: Mon, 26 Aug 2024 03:14:21 +0200 Subject: [PATCH 15/69] core/kernel: Miscellaneous memory fixes (#557) * core/libraries/kernel: Fix inaccurate direct memory size * core/memory: Fix available dmem query on non-free dmem areas * core/kernel: return ENOMEM if memory area size is zero * core/kernel: Fix returns on `sceKernelAvailableDirectMemorySize` * core/memory: Remove unneeded size alignment --- src/core/libraries/kernel/memory_management.cpp | 17 +++++++++++++---- src/core/libraries/kernel/memory_management.h | 2 +- src/core/memory.cpp | 5 +++++ 3 files changed, 19 insertions(+), 5 deletions(-) diff --git a/src/core/libraries/kernel/memory_management.cpp b/src/core/libraries/kernel/memory_management.cpp index 826d47973..fbc457954 100644 --- a/src/core/libraries/kernel/memory_management.cpp +++ b/src/core/libraries/kernel/memory_management.cpp @@ -75,19 +75,28 @@ s32 PS4_SYSV_ABI sceKernelAvailableDirectMemorySize(u64 searchStart, u64 searchE LOG_WARNING(Kernel_Vmm, "called searchStart = {:#x}, searchEnd = {:#x}, alignment = {:#x}", searchStart, searchEnd, alignment); - if (searchEnd <= searchStart) { + if (physAddrOut == nullptr || sizeOut == nullptr) { return ORBIS_KERNEL_ERROR_EINVAL; } if (searchEnd > SCE_KERNEL_MAIN_DMEM_SIZE) { return ORBIS_KERNEL_ERROR_EINVAL; } + if (searchEnd <= searchStart) { + return ORBIS_KERNEL_ERROR_ENOMEM; + } auto* memory = Core::Memory::Instance(); - PAddr physAddr; - s32 result = - memory->DirectQueryAvailable(searchStart, searchEnd, alignment, &physAddr, sizeOut); + PAddr physAddr{}; + size_t size{}; + s32 result = memory->DirectQueryAvailable(searchStart, searchEnd, alignment, &physAddr, &size); + + if (size == 0) { + return ORBIS_KERNEL_ERROR_ENOMEM; + } + *physAddrOut = static_cast(physAddr); + *sizeOut = size; return result; } diff --git a/src/core/libraries/kernel/memory_management.h b/src/core/libraries/kernel/memory_management.h index 378449cc5..c9dd86e18 100644 --- a/src/core/libraries/kernel/memory_management.h +++ b/src/core/libraries/kernel/memory_management.h @@ -6,7 +6,7 @@ #include "common/bit_field.h" #include "common/types.h" -constexpr u64 SCE_KERNEL_MAIN_DMEM_SIZE = 6_GB; // ~ 6GB +constexpr u64 SCE_KERNEL_MAIN_DMEM_SIZE = 4608_MB; // ~ 4.5GB namespace Libraries::Kernel { diff --git a/src/core/memory.cpp b/src/core/memory.cpp index 552c4039c..d6d5c1e36 100644 --- a/src/core/memory.cpp +++ b/src/core/memory.cpp @@ -328,6 +328,11 @@ int MemoryManager::DirectQueryAvailable(PAddr search_start, PAddr search_end, si PAddr paddr{}; size_t max_size{}; while (dmem_area != dmem_map.end() && dmem_area->second.GetEnd() <= search_end) { + if (!dmem_area->second.is_free) { + dmem_area++; + continue; + } + if (dmem_area->second.size > max_size) { paddr = dmem_area->second.base; max_size = dmem_area->second.size; From 86870e7c8da8a2e1521141702d3a845e46b0e38a Mon Sep 17 00:00:00 2001 From: greggameplayer Date: Mon, 26 Aug 2024 03:39:38 +0200 Subject: [PATCH 16/69] Implement TBUFFER_STORE_FORMAT_XY --- src/shader_recompiler/frontend/translate/vector_memory.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/shader_recompiler/frontend/translate/vector_memory.cpp b/src/shader_recompiler/frontend/translate/vector_memory.cpp index 41eb91234..45440da2f 100644 --- a/src/shader_recompiler/frontend/translate/vector_memory.cpp +++ b/src/shader_recompiler/frontend/translate/vector_memory.cpp @@ -94,6 +94,8 @@ void Translator::EmitVectorMemory(const GcnInst& inst) { case Opcode::TBUFFER_STORE_FORMAT_X: return BUFFER_STORE_FORMAT(1, true, true, inst); + case Opcode::TBUFFER_STORE_FORMAT_XY: + return BUFFER_STORE_FORMAT(2, true, true, inst); case Opcode::TBUFFER_STORE_FORMAT_XYZ: return BUFFER_STORE_FORMAT(3, true, true, inst); From e16aa2a012a9a487828374b231f72a5eb4ba7783 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C2=A5IGA?= <164882787+Xphalnos@users.noreply.github.com> Date: Mon, 26 Aug 2024 08:39:24 +0200 Subject: [PATCH 17/69] Update French tranlations (#592) --- src/qt_gui/translations/fr.ts | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/src/qt_gui/translations/fr.ts b/src/qt_gui/translations/fr.ts index 54100f17d..3f3b38baf 100644 --- a/src/qt_gui/translations/fr.ts +++ b/src/qt_gui/translations/fr.ts @@ -16,7 +16,7 @@ shadPS4 is an experimental open-source emulator for the PlayStation 4. - shadPS4 est un émulateur expérimental de la PlayStation 4. + shadPS4 est un émulateur open-source expérimental de la PlayStation 4. @@ -37,7 +37,7 @@ Loading game list, please wait :3 - Chargement de la liste de jeu, veuillez attendre... + Chargement de la liste de jeu, veuillez patienter... @@ -60,7 +60,7 @@ Directory to install games - Répertoire pour installer les jeux + Répertoire d'installation des jeux @@ -93,12 +93,12 @@ SFO Viewer - Visionneur SFO + Visionneuse SFO Trophy Viewer - Visionneur de trophés + Visionneuse de trophées @@ -151,7 +151,7 @@ Open/Add Elf Folder - Ouvrir/Ajouter un dossier Elf + Ouvrir/Ajouter un dossier ELF @@ -241,7 +241,7 @@ Elf Viewer - Visionneur Elf + Visionneuse ELF @@ -256,7 +256,7 @@ PKG Viewer - Visionneur PKG + Visionneuse PKG @@ -276,12 +276,12 @@ Game List Icons - Icones des jeux + Icônes des jeux Game List Mode - Mode liste + Mode d'affichage @@ -347,7 +347,7 @@ Trophy Viewer - Visionneur de trophés + Visionneuse de trophées @@ -488,4 +488,4 @@ Activer le débogage RenderDoc - + \ No newline at end of file From 7aa8cf992f6d7f7d25953f319e2f3ded97236d16 Mon Sep 17 00:00:00 2001 From: nishinji <107111782+nishinji@users.noreply.github.com> Date: Mon, 26 Aug 2024 15:39:49 +0900 Subject: [PATCH 18/69] Add Japanese translation (#591) --- src/qt_gui/translations/ja_JP.ts | 186 +++++++++++++++---------------- 1 file changed, 93 insertions(+), 93 deletions(-) diff --git a/src/qt_gui/translations/ja_JP.ts b/src/qt_gui/translations/ja_JP.ts index c67352569..88e7554ea 100644 --- a/src/qt_gui/translations/ja_JP.ts +++ b/src/qt_gui/translations/ja_JP.ts @@ -6,7 +6,7 @@ About shadPS4 - About shadPS4 + shadPS4ɂ‚ @@ -16,12 +16,12 @@ shadPS4 is an experimental open-source emulator for the PlayStation 4. - shadPS4 is an experimental open-source emulator for the PlayStation 4. + shadPS4́APlayStation 4̎IȃI[v\[XG~[^[łB This software should not be used to play games you have not legally obtained. - This software should not be used to play games you have not legally obtained. + ̃\tgEFÁA@Iɓ肵ĂȂQ[vC邽߂Ɏgp̂ł͂܂B @@ -29,7 +29,7 @@ Open Folder - Open Folder + tH_J @@ -37,17 +37,17 @@ Loading game list, please wait :3 - Loading game list, please wait :3 + Q[XgǂݍݒłB҂ :3 Cancel - Cancel + LZ Loading... - Loading... + ǂݍݒ... @@ -55,27 +55,27 @@ shadPS4 - Choose directory - shadPS4 - Choose directory + shadPS4 - fBNgI Directory to install games - Directory to install games + Q[CXg[fBNg Browse - Browse + Q Error - Error + G[ The value for location to install games is not valid. - The value for location to install games is not valid. + Q[CXg[ꏊłB @@ -83,67 +83,67 @@ Create Shortcut - Create Shortcut + V[gJbg쐬 Open Game Folder - Open Game Folder + Q[tH_J SFO Viewer - SFO Viewer + SFOr[[ Trophy Viewer - Trophy Viewer + gtB[r[[ Copy info - Copy info + Rs[ Copy Name - Copy Name + ORs[ Copy Serial - Copy Serial + VARs[ Copy All - Copy All + ׂăRs[ Shortcut creation - Shortcut creation + V[gJbg̍쐬 Shortcut created successfully!\n %1 - Shortcut created successfully!\n %1 + V[gJbgɍ쐬܂!\n %1 Error - Error + G[ Error creating shortcut!\n %1 - Error creating shortcut!\n %1 + V[gJbg̍쐬Ɏs܂!\n %1 Install PKG - Install PKG + PKGCXg[ @@ -151,187 +151,187 @@ Open/Add Elf Folder - Open/Add Elf Folder + ElftH_J/lj Install Packages (PKG) - Install Packages (PKG) + pbP[WCXg[ (PKG) Boot Game - Boot Game + Q[N About shadPS4 - About shadPS4 + shadPS4ɂ‚ Configure... - Configure... + ݒ... Install application from a .pkg file - Install application from a .pkg file + .pkgt@CAvP[VCXg[ Recent Games - Recent Games + ŋ߂̃Q[ Exit - Exit + I Exit shadPS4 - Exit shadPS4 + shadPS4I Exit the application. - Exit the application. + AvP[VI܂B Show Game List - Show Game List + Q[Xg\ Game List Refresh - Game List Refresh + Q[Xg̍XV Tiny - Tiny + ɏ Small - Small + Medium - Medium + Large - Large + + List View - List View + Xgr[ Grid View - Grid View + Obhr[ Elf Viewer - Elf Viewer + Elfr[ Game Install Directory - Game Install Directory + Q[CXg[fBNg Dump Game List - Dump Game List + Q[Xg_v - PKG Viewer - PKG Viewer + PKGr[A[ Search... - Search... + ... File - File + t@C View - View + \ Game List Icons - Game List Icons + Q[XgACR Game List Mode - Game List Mode + Q[Xg[h Settings - Settings + ݒ Utils - Utils + [eBeB Themes - Themes + e[} About - About + Dark - Dark + _[N Light - Light + Cg Green - Green + O[ Blue - Blue + u[ Violet - Violet + oCIbg toolBar - toolBar + c[o[ @@ -339,7 +339,7 @@ Open Folder - Open Folder + tH_[J @@ -347,7 +347,7 @@ Trophy Viewer - Trophy Viewer + gtB[r[A[ @@ -355,137 +355,137 @@ Settings - Settings + ݒ General - General + System - System + VXe Console Language - Console Language + R\[ Emulator Language - Emulator Language + G~[^[ Emulator - Emulator + G~[^[ Enable Fullscreen - Enable Fullscreen + tXN[Lɂ Show Splash - Show Splash + XvbV\ Is PS4 Pro - Is PS4 Pro + PS4 Pro[h Username - Username + [U[ Logger - Logger + K[ Log Type - Log Type + O^Cv Log Filter - Log Filter + OtB^[ Graphics - Graphics + OtBbNX Graphics Device - Graphics Device + OtBbNXfoCX Width - Width + Height - Height + Vblank Divider - Vblank Divider + VblankfBoC_[ Advanced - Advanced + xȐݒ Enable Shaders Dumping - Enable Shaders Dumping + VF[_[̃_vLɂ Enable NULL GPU - Enable NULL GPU + NULL GPULɂ Enable PM4 Dumping - Enable PM4 Dumping + PM4_vLɂ Debug - Debug + fobO Enable Debug Dumping - Enable Debug Dumping + fobO_vLɂ Enable Vulkan Validation Layers - Enable Vulkan Validation Layers + Vulkan؃C[Lɂ Enable Vulkan Synchronization Validation - Enable Vulkan Synchronization Validation + Vulkan؂Lɂ Enable RenderDoc Debugging - Enable RenderDoc Debugging + RenderDocfobOLɂ - \ No newline at end of file + From 78e24852f8bf0634be6631050e6326fdc8fba875 Mon Sep 17 00:00:00 2001 From: psucien Date: Sun, 25 Aug 2024 23:29:22 +0200 Subject: [PATCH 19/69] libraries: kernel: fix for inaccurate `sceKernelGetProcessTime` --- src/common/native_clock.cpp | 12 ++++++------ src/common/native_clock.h | 6 +++--- src/core/libraries/kernel/time_management.cpp | 4 +++- 3 files changed, 12 insertions(+), 10 deletions(-) diff --git a/src/common/native_clock.cpp b/src/common/native_clock.cpp index 20d0737a6..c3fa637aa 100644 --- a/src/common/native_clock.cpp +++ b/src/common/native_clock.cpp @@ -18,16 +18,16 @@ NativeClock::NativeClock() us_rdtsc_factor{GetFixedPoint64Factor(std::micro::den, rdtsc_frequency)}, ms_rdtsc_factor{GetFixedPoint64Factor(std::milli::den, rdtsc_frequency)} {} -u64 NativeClock::GetTimeNS() const { - return MultiplyHigh(GetUptime(), ns_rdtsc_factor); +u64 NativeClock::GetTimeNS(u64 base_ptc /*= 0*/) const { + return MultiplyHigh(GetUptime() - base_ptc, ns_rdtsc_factor); } -u64 NativeClock::GetTimeUS() const { - return MultiplyHigh(GetUptime(), us_rdtsc_factor); +u64 NativeClock::GetTimeUS(u64 base_ptc /*= 0*/) const { + return MultiplyHigh(GetUptime() - base_ptc, us_rdtsc_factor); } -u64 NativeClock::GetTimeMS() const { - return MultiplyHigh(GetUptime(), ms_rdtsc_factor); +u64 NativeClock::GetTimeMS(u64 base_ptc /*= 0*/) const { + return MultiplyHigh(GetUptime() - base_ptc, ms_rdtsc_factor); } u64 NativeClock::GetUptime() const { diff --git a/src/common/native_clock.h b/src/common/native_clock.h index 227c8d1ae..b5e389452 100644 --- a/src/common/native_clock.h +++ b/src/common/native_clock.h @@ -16,9 +16,9 @@ public: return rdtsc_frequency; } - u64 GetTimeNS() const; - u64 GetTimeUS() const; - u64 GetTimeMS() const; + u64 GetTimeNS(u64 base_ptc = 0) const; + u64 GetTimeUS(u64 base_ptc = 0) const; + u64 GetTimeMS(u64 base_ptc = 0) const; u64 GetUptime() const; u64 GetProcessTimeUS() const; diff --git a/src/core/libraries/kernel/time_management.cpp b/src/core/libraries/kernel/time_management.cpp index 214f039b4..d01b0c83f 100644 --- a/src/core/libraries/kernel/time_management.cpp +++ b/src/core/libraries/kernel/time_management.cpp @@ -3,6 +3,7 @@ #include #include "common/assert.h" +#include "common/debug.h" #include "common/native_clock.h" #include "core/libraries/error_codes.h" #include "core/libraries/kernel/time_management.h" @@ -30,7 +31,8 @@ u64 PS4_SYSV_ABI sceKernelGetTscFrequency() { } u64 PS4_SYSV_ABI sceKernelGetProcessTime() { - return clock->GetProcessTimeUS(); + // TODO: this timer should support suspends, so initial ptc needs to be updated on wake up + return clock->GetTimeUS(initial_ptc); } u64 PS4_SYSV_ABI sceKernelGetProcessTimeCounter() { From 6e340bcdc14d8cc50c95bccbf8ad20938e3ca5d8 Mon Sep 17 00:00:00 2001 From: nishinji <107111782+nishinji@users.noreply.github.com> Date: Mon, 26 Aug 2024 16:56:11 +0900 Subject: [PATCH 20/69] Fix ja_JP.ts (#594) * Fix ja_JP.ts * a --- src/qt_gui/translations/ja_JP.ts | 186 +++++++++++++++---------------- 1 file changed, 93 insertions(+), 93 deletions(-) diff --git a/src/qt_gui/translations/ja_JP.ts b/src/qt_gui/translations/ja_JP.ts index 88e7554ea..557b0760b 100644 --- a/src/qt_gui/translations/ja_JP.ts +++ b/src/qt_gui/translations/ja_JP.ts @@ -1,4 +1,4 @@ - + @@ -6,7 +6,7 @@ About shadPS4 - shadPS4ɂ‚ + shadPS4について @@ -16,12 +16,12 @@ shadPS4 is an experimental open-source emulator for the PlayStation 4. - shadPS4́APlayStation 4̎IȃI[v\[XG~[^[łB + shadPS4は、PlayStation 4の実験的なオープンソースエミュレーターです。 This software should not be used to play games you have not legally obtained. - ̃\tgEFÁA@Iɓ肵ĂȂQ[vC邽߂Ɏgp̂ł͂܂B + このソフトウェアは、合法的に入手していないゲームをプレイするために使用するものではありません。 @@ -29,7 +29,7 @@ Open Folder - tH_J + フォルダを開く @@ -37,17 +37,17 @@ Loading game list, please wait :3 - Q[XgǂݍݒłB҂ :3 + ゲームリストを読み込み中です。お待ちください :3 Cancel - LZ + キャンセル Loading... - ǂݍݒ... + 読み込み中... @@ -55,27 +55,27 @@ shadPS4 - Choose directory - shadPS4 - fBNgI + shadPS4 - ディレクトリを選択 Directory to install games - Q[CXg[fBNg + ゲームをインストールするディレクトリ Browse - Q + 参照 Error - G[ + エラー The value for location to install games is not valid. - Q[CXg[ꏊłB + ゲームをインストールする場所が無効です。 @@ -83,67 +83,67 @@ Create Shortcut - V[gJbg쐬 + ショートカットを作成 Open Game Folder - Q[tH_J + ゲームフォルダを開く SFO Viewer - SFOr[[ + SFOビューワー Trophy Viewer - gtB[r[[ + トロフィービューワー Copy info - Rs[ + 情報をコピー Copy Name - ORs[ + 名前をコピー Copy Serial - VARs[ + シリアルをコピー Copy All - ׂăRs[ + すべてコピー Shortcut creation - V[gJbg̍쐬 + ショートカットの作成 Shortcut created successfully!\n %1 - V[gJbgɍ쐬܂!\n %1 + ショートカットが正常に作成されました!\n %1 Error - G[ + エラー Error creating shortcut!\n %1 - V[gJbg̍쐬Ɏs܂!\n %1 + ショートカットの作成に失敗しました!\n %1 Install PKG - PKGCXg[ + PKGをインストール @@ -151,187 +151,187 @@ Open/Add Elf Folder - ElftH_J/lj + Elfフォルダを開く/追加する Install Packages (PKG) - pbP[WCXg[ (PKG) + パッケージをインストール (PKG) Boot Game - Q[N + ゲームを起動 About shadPS4 - shadPS4ɂ‚ + shadPS4について Configure... - ݒ... + 設定... Install application from a .pkg file - .pkgt@CAvP[VCXg[ + .pkgファイルからアプリケーションをインストールする Recent Games - ŋ߂̃Q[ + 最近のゲーム Exit - I + 終了 Exit shadPS4 - shadPS4I + shadPS4を終了 Exit the application. - AvP[VI܂B + アプリケーションを終了します。 Show Game List - Q[Xg\ + ゲームリストを表示 Game List Refresh - Q[Xg̍XV + ゲームリストの更新 Tiny - ɏ + 極小 Small - + Medium - + Large - + - List View - Xgr[ + リストビュー Grid View - Obhr[ + グリッドビュー Elf Viewer - Elfr[ + Elfビュワー Game Install Directory - Q[CXg[fBNg + ゲームインストールディレクトリ Dump Game List - Q[Xg_v + ゲームリストをダンプ + PKG Viewer - PKGr[A[ + PKGビューアー Search... - ... + 検索... File - t@C + ファイル View - \ + 表示 Game List Icons - Q[XgACR + ゲームリストアイコン Game List Mode - Q[Xg[h + ゲームリストモード Settings - ݒ + 設定 Utils - [eBeB + ユーティリティ Themes - e[} + テーマ About - + 情報 Dark - _[N + ダーク Light - Cg + ライト Green - O[ + グリーン Blue - u[ + ブルー Violet - oCIbg + バイオレット toolBar - c[o[ + ツールバー @@ -339,7 +339,7 @@ Open Folder - tH_[J + フォルダーを開く @@ -347,7 +347,7 @@ Trophy Viewer - gtB[r[A[ + トロフィービューアー @@ -355,137 +355,137 @@ Settings - ݒ + 設定 General - + 一般 System - VXe + システム Console Language - R\[ + コンソール言語 Emulator Language - G~[^[ + エミュレーター言語 Emulator - G~[^[ + エミュレーター Enable Fullscreen - tXN[Lɂ + フルスクリーンを有効にする Show Splash - XvbV\ + スプラッシュを表示する Is PS4 Pro - PS4 Pro[h + PS4 Proモード Username - [U[ + ユーザー名 Logger - K[ + ロガー Log Type - O^Cv + ログタイプ Log Filter - OtB^[ + ログフィルター Graphics - OtBbNX + グラフィックス Graphics Device - OtBbNXfoCX + グラフィックスデバイス Width - + Height - + 高さ Vblank Divider - VblankfBoC_[ + Vblankディバイダー Advanced - xȐݒ + 高度な設定 Enable Shaders Dumping - VF[_[̃_vLɂ + シェーダーのダンプを有効にする Enable NULL GPU - NULL GPULɂ + NULL GPUを有効にする Enable PM4 Dumping - PM4_vLɂ + PM4ダンプを有効にする Debug - fobO + デバッグ Enable Debug Dumping - fobO_vLɂ + デバッグダンプを有効にする Enable Vulkan Validation Layers - Vulkan؃C[Lɂ + Vulkan検証レイヤーを有効にする Enable Vulkan Synchronization Validation - Vulkan؂Lɂ + Vulkan同期検証を有効にする Enable RenderDoc Debugging - RenderDocfobOLɂ + RenderDocデバッグを有効にする From 0b5616c4930576ba6fdf9bdaae2b89ce66044cc7 Mon Sep 17 00:00:00 2001 From: Marcin Mitura Date: Mon, 26 Aug 2024 12:20:12 +0200 Subject: [PATCH 21/69] Polish localization (#580) Initial polish localization for shadPS4 --- src/qt_gui/translations/pl_PL.ts | 984 ++++++++++++++++--------------- 1 file changed, 493 insertions(+), 491 deletions(-) diff --git a/src/qt_gui/translations/pl_PL.ts b/src/qt_gui/translations/pl_PL.ts index cad5c5829..7d18f203d 100644 --- a/src/qt_gui/translations/pl_PL.ts +++ b/src/qt_gui/translations/pl_PL.ts @@ -1,491 +1,493 @@ - - - - AboutDialog - - - About shadPS4 - About shadPS4 - - - - shadPS4 - shadPS4 - - - - shadPS4 is an experimental open-source emulator for the PlayStation 4. - shadPS4 is an experimental open-source emulator for the PlayStation 4. - - - - This software should not be used to play games you have not legally obtained. - This software should not be used to play games you have not legally obtained. - - - - ElfViewer - - - Open Folder - Open Folder - - - - GameInfoClass - - - Loading game list, please wait :3 - Loading game list, please wait :3 - - - - Cancel - Cancel - - - - Loading... - Loading... - - - - GameInstallDialog - - - shadPS4 - Choose directory - shadPS4 - Choose directory - - - - Directory to install games - Directory to install games - - - - Browse - Browse - - - - Error - Error - - - - The value for location to install games is not valid. - The value for location to install games is not valid. - - - - GuiContextMenus - - - Create Shortcut - Create Shortcut - - - - Open Game Folder - Open Game Folder - - - - SFO Viewer - SFO Viewer - - - - Trophy Viewer - Trophy Viewer - - - - Copy info - Copy info - - - - Copy Name - Copy Name - - - - Copy Serial - Copy Serial - - - - Copy All - Copy All - - - - Shortcut creation - Shortcut creation - - - - Shortcut created successfully!\n %1 - Shortcut created successfully!\n %1 - - - - Error - Error - - - - Error creating shortcut!\n %1 - Error creating shortcut!\n %1 - - - - Install PKG - Install PKG - - - - MainWindow - - - Open/Add Elf Folder - Open/Add Elf Folder - - - - Install Packages (PKG) - Install Packages (PKG) - - - - Boot Game - Boot Game - - - - About shadPS4 - About shadPS4 - - - - Configure... - Configure... - - - - Install application from a .pkg file - Install application from a .pkg file - - - - Recent Games - Recent Games - - - - Exit - Exit - - - - Exit shadPS4 - Exit shadPS4 - - - - Exit the application. - Exit the application. - - - - Show Game List - Show Game List - - - - Game List Refresh - Game List Refresh - - - - Tiny - Tiny - - - - Small - Small - - - - Medium - Medium - - - - Large - Large - - - - List View - List View - - - - Grid View - Grid View - - - - Elf Viewer - Elf Viewer - - - - Game Install Directory - Game Install Directory - - - - Dump Game List - Dump Game List - - - - PKG Viewer - PKG Viewer - - - - Search... - Search... - - - - File - File - - - - View - View - - - - Game List Icons - Game List Icons - - - - Game List Mode - Game List Mode - - - - Settings - Settings - - - - Utils - Utils - - - - Themes - Themes - - - - About - About - - - - Dark - Dark - - - - Light - Light - - - - Green - Green - - - - Blue - Blue - - - - Violet - Violet - - - - toolBar - toolBar - - - - PKGViewer - - - Open Folder - Open Folder - - - - TrophyViewer - - - Trophy Viewer - Trophy Viewer - - - - SettingsDialog - - - Settings - Settings - - - - General - General - - - - System - System - - - - Console Language - Console Language - - - - Emulator Language - Emulator Language - - - - Emulator - Emulator - - - - Enable Fullscreen - Enable Fullscreen - - - - Show Splash - Show Splash - - - - Is PS4 Pro - Is PS4 Pro - - - - Username - Username - - - - Logger - Logger - - - - Log Type - Log Type - - - - Log Filter - Log Filter - - - - Graphics - Graphics - - - - Graphics Device - Graphics Device - - - - Width - Width - - - - Height - Height - - - - Vblank Divider - Vblank Divider - - - - Advanced - Advanced - - - - Enable Shaders Dumping - Enable Shaders Dumping - - - - Enable NULL GPU - Enable NULL GPU - - - - Enable PM4 Dumping - Enable PM4 Dumping - - - - Debug - Debug - - - - Enable Debug Dumping - Enable Debug Dumping - - - - Enable Vulkan Validation Layers - Enable Vulkan Validation Layers - - - - Enable Vulkan Synchronization Validation - Enable Vulkan Synchronization Validation - - - - Enable RenderDoc Debugging - Enable RenderDoc Debugging - - - \ No newline at end of file + + + + + + + AboutDialog + + + About shadPS4 + O programie + + + + shadPS4 + shadPS4 + + + + shadPS4 is an experimental open-source emulator for the PlayStation 4. + shadPS4 to eksperymentalny otwartoźródłowy emulator konsoli PlayStation 4. + + + + This software should not be used to play games you have not legally obtained. + To oprogramowanie nie służy do grania w gry pochodzące z nielegalnego źródła. + + + + ElfViewer + + + Open Folder + Otwórz folder + + + + GameInfoClass + + + Loading game list, please wait :3 + Ładowanie listy gier, proszę poczekaj :3 + + + + Cancel + Anuluj + + + + Loading... + Ładowanie... + + + + GameInstallDialog + + + shadPS4 - Choose directory + shadPS4 - Wybierz katalog + + + + Directory to install games + Katalog do instalacji gier + + + + Browse + Przeglądaj + + + + Error + Błąd + + + + The value for location to install games is not valid. + Podana ścieżka do instalacji gier nie jest prawidłowa. + + + + GuiContextMenus + + + Create Shortcut + Utwórz skrót + + + + Open Game Folder + Otwórz katalog gry + + + + SFO Viewer + Menedżer plików SFO + + + + Trophy Viewer + Menedżer trofeów + + + + Copy info + Kopiuj informacje + + + + Copy Name + Kopiuj nazwę + + + + Copy Serial + Kopiuj numer seryjny + + + + Copy All + Kopiuj wszystko + + + + Shortcut creation + Tworzenie skrótu + + + + Shortcut created successfully!\n %1 + Utworzenie skrótu zakończone pomyślnie!\n %1 + + + + Error + Błąd + + + + Error creating shortcut!\n %1 + Utworzenie skrótu zakończone niepowodzeniem!\n %1 + + + + Install PKG + Zainstaluj PKG + + + + MainWindow + + + Open/Add Elf Folder + Otwórz/Dodaj folder Elf + + + + Install Packages (PKG) + Zainstaluj paczkę (PKG) + + + + Boot Game + Uruchom grę + + + + About shadPS4 + O programie + + + + Configure... + Konfiguruj... + + + + Install application from a .pkg file + Zainstaluj aplikacje z pliku .pkg + + + + Recent Games + Ostatnie gry + + + + Exit + Wyjdź + + + + Exit shadPS4 + Wyjdź z shadPS4 + + + + Exit the application. + Wyjdź z aplikacji. + + + + Show Game List + Pokaż listę gier + + + + Game List Refresh + Odśwież listę gier + + + + Tiny + Malutkie + + + + Small + Małe + + + + Medium + Średnie + + + + Large + Wielkie + + + + List View + Widok listy + + + + Grid View + Widok siatki + + + + Elf Viewer + Menedżer plików ELF + + + + Game Install Directory + Katalog zainstalowanej gry + + + + Dump Game List + Zgraj listę gier + + + + PKG Viewer + Menedżer plików PKG + + + + Search... + Szukaj... + + + + File + Plik + + + + View + Widok + + + + Game List Icons + Ikony w widoku listy + + + + Game List Mode + Tryb listy gier + + + + Settings + Ustawienia + + + + Utils + Narzędzia + + + + Themes + Motywy + + + + About + O programie + + + + Dark + Ciemny + + + + Light + Jasny + + + + Green + Zielony + + + + Blue + Niebieski + + + + Violet + Fioletowy + + + + toolBar + Pasek narzędzi + + + + PKGViewer + + + Open Folder + Open Folder + + + + TrophyViewer + + + Trophy Viewer + Menedżer trofeów + + + + SettingsDialog + + + Settings + Ustawienia + + + + General + Ogólne + + + + System + System + + + + Console Language + Język konsoli + + + + Emulator Language + Język emulatora + + + + Emulator + Emulator + + + + Enable Fullscreen + Włącz pełny ekran + + + + Show Splash + Pokaż ekran powitania + + + + Is PS4 Pro + Emulacja PS4 Pro + + + + Username + Nazwa użytkownika + + + + Logger + Dziennik zdarzeń + + + + Log Type + Typ dziennika + + + + Log Filter + Filtrowanie dziennika + + + + Graphics + Grafika + + + + Graphics Device + Karta graficzna + + + + Width + Szerokość + + + + Height + Wysokość + + + + Vblank Divider + Dzielnik pionowego blankingu (Vblank) + + + + Advanced + Zaawansowane + + + + Enable Shaders Dumping + Włącz zgrywanie cieni + + + + Enable NULL GPU + Wyłącz kartę graficzną + + + + Enable PM4 Dumping + Włącz zgrywanie PM4 + + + + Debug + Debugowanie + + + + Enable Debug Dumping + Włącz zgrywanie debugowania + + + + Enable Vulkan Validation Layers + Włącz warstwy walidacji Vulkan + + + + Enable Vulkan Synchronization Validation + Włącz walidację synchronizacji Vulkan + + + + Enable RenderDoc Debugging + Włącz debugowanie RenderDoc + + + From d3b6b17c7571a5627fcaf36335574bcf1fbf7dc1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Crist=C3=B3bal=20Mart=C3=AD=20M=C3=A9ndez?= <61116988+elCrimar@users.noreply.github.com> Date: Mon, 26 Aug 2024 12:20:26 +0200 Subject: [PATCH 22/69] Add spanish translation (#583) * Add spanish transalation * Update es_ES.ts --- src/qt_gui/translations/es_ES.ts | 180 +++++++++++++++---------------- 1 file changed, 90 insertions(+), 90 deletions(-) diff --git a/src/qt_gui/translations/es_ES.ts b/src/qt_gui/translations/es_ES.ts index eedd4f6d4..1b42b18e6 100644 --- a/src/qt_gui/translations/es_ES.ts +++ b/src/qt_gui/translations/es_ES.ts @@ -6,7 +6,7 @@ About shadPS4 - About shadPS4 + Acerca de shadPS4 @@ -16,12 +16,12 @@ shadPS4 is an experimental open-source emulator for the PlayStation 4. - shadPS4 is an experimental open-source emulator for the PlayStation 4. + shadPS4 es un emulador experimental de código abierto para la PlayStation 4. This software should not be used to play games you have not legally obtained. - This software should not be used to play games you have not legally obtained. + Este software no debe utilizarse para jugar juegos que no hayas obtenido legalmente. @@ -29,7 +29,7 @@ Open Folder - Open Folder + Abrir carpeta @@ -37,17 +37,17 @@ Loading game list, please wait :3 - Loading game list, please wait :3 + Cargando lista de juegos, por favor espera :3 Cancel - Cancel + Cancelar Loading... - Loading... + Cargando... @@ -55,17 +55,17 @@ shadPS4 - Choose directory - shadPS4 - Choose directory + shadPS4 - Elegir carpeta Directory to install games - Directory to install games + Carpeta para instalar juegos Browse - Browse + Buscar @@ -75,7 +75,7 @@ The value for location to install games is not valid. - The value for location to install games is not valid. + El valor para la ubicación de instalación de los juegos no es válido. @@ -83,52 +83,52 @@ Create Shortcut - Create Shortcut + Crear acceso directo Open Game Folder - Open Game Folder + Abrir carpeta del juego SFO Viewer - SFO Viewer + Vista SFO Trophy Viewer - Trophy Viewer + Ver trofeos Copy info - Copy info + Copiar información Copy Name - Copy Name + Copiar nombre Copy Serial - Copy Serial + Copiar serial Copy All - Copy All + Copiar todo Shortcut creation - Shortcut creation + Acceso directo creado Shortcut created successfully!\n %1 - Shortcut created successfully!\n %1 + ¡Acceso directo creado con éxito!\n %1 @@ -138,12 +138,12 @@ Error creating shortcut!\n %1 - Error creating shortcut!\n %1 + ¡Error al crear el acceso directo!\n %1 Install PKG - Install PKG + Instalar PKG @@ -151,187 +151,187 @@ Open/Add Elf Folder - Open/Add Elf Folder + Abrir/Agregar carpeta Elf Install Packages (PKG) - Install Packages (PKG) + Instalar paquetes (PKG) Boot Game - Boot Game + Iniciar juego About shadPS4 - About shadPS4 + Acerca de shadPS4 Configure... - Configure... + Configurar... Install application from a .pkg file - Install application from a .pkg file + Instalar aplicación desde un archivo .pkg Recent Games - Recent Games + Juegos recientes Exit - Exit + Salir Exit shadPS4 - Exit shadPS4 + Salir de shadPS4 Exit the application. - Exit the application. + Salir de la aplicación. Show Game List - Show Game List + Mostrar lista de juegos Game List Refresh - Game List Refresh + Actualizar lista de juegos Tiny - Tiny + Muy pequeño Small - Small + Pequeño Medium - Medium + Mediano Large - Large + Grande List View - List View + Vista de lista Grid View - Grid View + Vista de cuadrícula Elf Viewer - Elf Viewer + Vista Elf Game Install Directory - Game Install Directory + Carpeta de instalación de los juegos Dump Game List - Dump Game List + Volcar lista de juegos PKG Viewer - PKG Viewer + Vista PKG Search... - Search... + Buscar... File - File + Archivo View - View + Vista Game List Icons - Game List Icons + Iconos de los juegos Game List Mode - Game List Mode + Tipo de lista Settings - Settings + Configuraciones Utils - Utils + Utilidades Themes - Themes + Temas About - About + Ayuda Dark - Dark + Oscuro Light - Light + Claro Green - Green + Verde Blue - Blue + Azul Violet - Violet + Violeta toolBar - toolBar + barra de herramientas @@ -339,7 +339,7 @@ Open Folder - Open Folder + Abrir carpeta @@ -347,15 +347,15 @@ Trophy Viewer - Trophy Viewer + Vista de trofeos - + SettingsDialog Settings - Settings + Configuraciones @@ -365,127 +365,127 @@ System - System + Sistema Console Language - Console Language + Idioma de la consola Emulator Language - Emulator Language + Idioma del emulador Emulator - Emulator + Emulador Enable Fullscreen - Enable Fullscreen + Habilitar pantalla completa Show Splash - Show Splash + Mostrar splash Is PS4 Pro - Is PS4 Pro + Modo PS4 Pro Username - Username + Nombre de usuario Logger - Logger + Registro Log Type - Log Type + Tipo de registro Log Filter - Log Filter + Filtro de registro Graphics - Graphics + Gráficos Graphics Device - Graphics Device + Dispositivo gráfico Width - Width + Ancho Height - Height + Alto Vblank Divider - Vblank Divider + Divisor de Vblank Advanced - Advanced + Avanzado Enable Shaders Dumping - Enable Shaders Dumping + Habilitar volcado de shaders Enable NULL GPU - Enable NULL GPU + Habilitar GPU NULL Enable PM4 Dumping - Enable PM4 Dumping + Habilitar volcado de PM4 Debug - Debug + Depuración Enable Debug Dumping - Enable Debug Dumping + Habilitar volcado de depuración Enable Vulkan Validation Layers - Enable Vulkan Validation Layers + Habilitar capas de validación de Vulkan Enable Vulkan Synchronization Validation - Enable Vulkan Synchronization Validation + Habilitar validación de sincronización de Vulkan Enable RenderDoc Debugging - Enable RenderDoc Debugging + Habilitar depuración de RenderDoc - \ No newline at end of file + From 6520f3ca171644f4adf7eee6bb1c9fbc0b577656 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pl=C3=ADnio=20Larrubia?= Date: Mon, 26 Aug 2024 07:20:40 -0300 Subject: [PATCH 23/69] feat: add pt_BR translation (#584) * feat: add pt_BR translation - Made by @LeDragoX - Revised by @gabsF * fix: change translation string 'Mostrar Tela Inicial' to 'Mostrar Splash Inicial' --- src/qt_gui/translations/pt_BR.ts | 182 +++++++++++++++---------------- 1 file changed, 91 insertions(+), 91 deletions(-) diff --git a/src/qt_gui/translations/pt_BR.ts b/src/qt_gui/translations/pt_BR.ts index a35f9b1d8..c98d84410 100644 --- a/src/qt_gui/translations/pt_BR.ts +++ b/src/qt_gui/translations/pt_BR.ts @@ -6,7 +6,7 @@ About shadPS4 - About shadPS4 + Sobre o shadPS4 @@ -16,12 +16,12 @@ shadPS4 is an experimental open-source emulator for the PlayStation 4. - shadPS4 is an experimental open-source emulator for the PlayStation 4. + shadPS4 é um emulador experimental de código-fonte aberto para o PlayStation 4. This software should not be used to play games you have not legally obtained. - This software should not be used to play games you have not legally obtained. + Este software não deve ser usado para jogar jogos piratas. @@ -29,7 +29,7 @@ Open Folder - Open Folder + Abrir Pasta @@ -37,17 +37,17 @@ Loading game list, please wait :3 - Loading game list, please wait :3 + Carregando lista de jogos, por favor aguarde :3 Cancel - Cancel + Cancelar Loading... - Loading... + Carregando... @@ -55,27 +55,27 @@ shadPS4 - Choose directory - shadPS4 - Choose directory + shadPS4 - Escolha o diretório Directory to install games - Directory to install games + Diretório para instalar jogos Browse - Browse + Procurar Error - Error + Erro The value for location to install games is not valid. - The value for location to install games is not valid. + O diretório da instalação dos jogos não é válido. @@ -83,67 +83,67 @@ Create Shortcut - Create Shortcut + Criar Atalho Open Game Folder - Open Game Folder + Abrir Pasta do Jogo SFO Viewer - SFO Viewer + Visualizador de SFO Trophy Viewer - Trophy Viewer + Visualizador de Troféu Copy info - Copy info + Copiar informação Copy Name - Copy Name + Copiar Nome Copy Serial - Copy Serial + Copiar Serial Copy All - Copy All + Copiar Tudo Shortcut creation - Shortcut creation + Criação de atalho Shortcut created successfully!\n %1 - Shortcut created successfully!\n %1 + Atalho criado com sucesso!\n %1 Error - Error + Erro Error creating shortcut!\n %1 - Error creating shortcut!\n %1 + Erro ao criar atalho!\n %1 Install PKG - Install PKG + Instalar PKG @@ -151,187 +151,187 @@ Open/Add Elf Folder - Open/Add Elf Folder + Abrir/Adicionar pasta Elf Install Packages (PKG) - Install Packages (PKG) + Instalar Pacotes (PKG) Boot Game - Boot Game + Iniciar Jogo About shadPS4 - About shadPS4 + Sobre o shadPS4 Configure... - Configure... + Configurar... Install application from a .pkg file - Install application from a .pkg file + Instalar aplicação de um arquivo .pkg Recent Games - Recent Games + Jogos Recentes Exit - Exit + Sair Exit shadPS4 - Exit shadPS4 + Sair do shadPS4 Exit the application. - Exit the application. + Sair da aplicação. Show Game List - Show Game List + Mostrar Lista de Jogos Game List Refresh - Game List Refresh + Atualizar Lista de Jogos Tiny - Tiny + Muito pequeno Small - Small + Pequeno Medium - Medium + Médio Large - Large + Grande List View - List View + Visualizar em Lista Grid View - Grid View + Visualizar em Grade Elf Viewer - Elf Viewer + Visualizador de Elf Game Install Directory - Game Install Directory + Diretório de Instalação de Jogos Dump Game List - Dump Game List + Dumpar Lista de Jogos PKG Viewer - PKG Viewer + Visualizador de PKG Search... - Search... + Pesquisar... File - File + Arquivo View - View + Ver Game List Icons - Game List Icons + Ícones da Lista de Jogos Game List Mode - Game List Mode + Modo de Lista de Jogos Settings - Settings + Configurações Utils - Utils + Utilitários Themes - Themes + Temas About - About + Sobre Dark - Dark + Escuro Light - Light + Claro Green - Green + Verde Blue - Blue + Azul Violet - Violet + Violeta toolBar - toolBar + Barra de Ferramentas @@ -339,7 +339,7 @@ Open Folder - Open Folder + Abrir Pasta @@ -347,7 +347,7 @@ Trophy Viewer - Trophy Viewer + Visualizador de Troféu @@ -355,137 +355,137 @@ Settings - Settings + Configurações General - General + Geral System - System + Sistema Console Language - Console Language + Idioma do Console Emulator Language - Emulator Language + Idioma do Emulador Emulator - Emulator + Emulador Enable Fullscreen - Enable Fullscreen + Ativar Tela Cheia Show Splash - Show Splash + Mostrar Splash Inicial Is PS4 Pro - Is PS4 Pro + Modo PS4 Pro Username - Username + Nome de usuário Logger - Logger + Registro Log Type - Log Type + Tipo de Registro Log Filter - Log Filter + Filtro Graphics - Graphics + Gráficos Graphics Device - Graphics Device + Placa de Vídeo Width - Width + Largura Height - Height + Altura Vblank Divider - Vblank Divider + Divisor Vblank Advanced - Advanced + Avançado Enable Shaders Dumping - Enable Shaders Dumping + Ativar Dumping de Shaders Enable NULL GPU - Enable NULL GPU + Ativar GPU NULA Enable PM4 Dumping - Enable PM4 Dumping + Ativar Dumping de PM4 Debug - Debug + Depuração Enable Debug Dumping - Enable Debug Dumping + Ativar Depuração de Dumping Enable Vulkan Validation Layers - Enable Vulkan Validation Layers + Ativar Camadas de Validação do Vulkan Enable Vulkan Synchronization Validation - Enable Vulkan Synchronization Validation + Ativar Validação de Sincronização do Vulkan Enable RenderDoc Debugging - Enable RenderDoc Debugging + Ativar Depuração por RenderDoc \ No newline at end of file From cd6b5abccfcf408027a06f48f60f1a9dca53cd80 Mon Sep 17 00:00:00 2001 From: Batu Date: Mon, 26 Aug 2024 13:20:53 +0300 Subject: [PATCH 24/69] added tr language support (#587) --- src/qt_gui/translations/tr_TR.ts | 182 +++++++++++++++---------------- 1 file changed, 91 insertions(+), 91 deletions(-) diff --git a/src/qt_gui/translations/tr_TR.ts b/src/qt_gui/translations/tr_TR.ts index ebb8b9b7c..ea5d0765f 100644 --- a/src/qt_gui/translations/tr_TR.ts +++ b/src/qt_gui/translations/tr_TR.ts @@ -6,7 +6,7 @@ About shadPS4 - About shadPS4 + shadPS4 Hakkında @@ -16,12 +16,12 @@ shadPS4 is an experimental open-source emulator for the PlayStation 4. - shadPS4 is an experimental open-source emulator for the PlayStation 4. + shadPS4, PlayStation 4 için deneysel bir açık kaynak kodlu emülatördür. This software should not be used to play games you have not legally obtained. - This software should not be used to play games you have not legally obtained. + Bu yazılım, yasal olarak edinmediğiniz oyunları oynamak için kullanılmamalıdır. @@ -29,7 +29,7 @@ Open Folder - Open Folder + Klasörü Aç @@ -37,17 +37,17 @@ Loading game list, please wait :3 - Loading game list, please wait :3 + Oyun listesi yükleniyor, lütfen bekleyin :3 Cancel - Cancel + İptal Loading... - Loading... + Yükleniyor... @@ -55,27 +55,27 @@ shadPS4 - Choose directory - shadPS4 - Choose directory + shadPS4 - Klasörü Seç Directory to install games - Directory to install games + Oyunların yükleneceği klasör Browse - Browse + Gözat Error - Error + Hata The value for location to install games is not valid. - The value for location to install games is not valid. + Oyunların yükleneceği konum için girilen klasör geçerli değil. @@ -83,67 +83,67 @@ Create Shortcut - Create Shortcut + Kısayol Oluştur Open Game Folder - Open Game Folder + Oyun Klasörünü Aç SFO Viewer - SFO Viewer + SFO Görüntüleyici Trophy Viewer - Trophy Viewer + Kupa Görüntüleyici Copy info - Copy info + Bilgiyi Kopyala Copy Name - Copy Name + Adı Kopyala Copy Serial - Copy Serial + Seri Numarasını Kopyala Copy All - Copy All + Tümünü Kopyala Shortcut creation - Shortcut creation + Kısayol oluşturma Shortcut created successfully!\n %1 - Shortcut created successfully!\n %1 + Kısayol başarıyla oluşturuldu!\n %1 Error - Error + Hata Error creating shortcut!\n %1 - Error creating shortcut!\n %1 + Kısayol oluşturulurken hata oluştu!\n %1 Install PKG - Install PKG + PKG Yükle @@ -151,187 +151,187 @@ Open/Add Elf Folder - Open/Add Elf Folder + Elf Klasörünü Aç/Ekle Install Packages (PKG) - Install Packages (PKG) + Paketleri Kur (PKG) Boot Game - Boot Game + Oyunu Başlat About shadPS4 - About shadPS4 + shadPS4 Hakkında Configure... - Configure... + Yapılandır... Install application from a .pkg file - Install application from a .pkg file + .pkg dosyasından uygulama yükle Recent Games - Recent Games + Son Oyunlar Exit - Exit + Çıkış Exit shadPS4 - Exit shadPS4 + shadPS4'ten Çık Exit the application. - Exit the application. + Uygulamadan çık. Show Game List - Show Game List + Oyun Listesini Göster Game List Refresh - Game List Refresh + Oyun Listesini Yenile Tiny - Tiny + Küçük Small - Small + Ufak Medium - Medium + Orta Large - Large + Büyük List View - List View + Liste Görünümü Grid View - Grid View + Izgara Görünümü Elf Viewer - Elf Viewer + Elf Görüntüleyici Game Install Directory - Game Install Directory + Oyun Kurulum Klasörü Dump Game List - Dump Game List + Oyun Listesini Kaydet PKG Viewer - PKG Viewer + PKG Görüntüleyici Search... - Search... + Ara... File - File + Dosya View - View + Görünüm Game List Icons - Game List Icons + Oyun Listesi Simgeleri Game List Mode - Game List Mode + Oyun Listesi Modu Settings - Settings + Ayarlar Utils - Utils + Yardımcı Araçlar Themes - Themes + Temalar About - About + Hakkında Dark - Dark + Koyu Light - Light + Açık Green - Green + Yeşil Blue - Blue + Mavi Violet - Violet + Mor toolBar - toolBar + Araç Çubuğu @@ -339,7 +339,7 @@ Open Folder - Open Folder + Klasörü Aç @@ -347,7 +347,7 @@ Trophy Viewer - Trophy Viewer + Kupa Görüntüleyici @@ -355,137 +355,137 @@ Settings - Settings + Ayarlar General - General + Genel System - System + Sistem Console Language - Console Language + Konsol Dili Emulator Language - Emulator Language + Emülatör Dili Emulator - Emulator + Emülatör Enable Fullscreen - Enable Fullscreen + Tam Ekranı Etkinleştir Show Splash - Show Splash + Başlangıç Ekranını Göster Is PS4 Pro - Is PS4 Pro + PS4 Pro mu Username - Username + Kullanıcı Adı Logger - Logger + Kayıt Tutucu Log Type - Log Type + Kayıt Türü Log Filter - Log Filter + Kayıt Filtresi Graphics - Graphics + Grafikler Graphics Device - Graphics Device + Grafik Cihazı Width - Width + Genişlik Height - Height + Yükseklik Vblank Divider - Vblank Divider + Vblank Bölücü Advanced - Advanced + Gelişmiş Enable Shaders Dumping - Enable Shaders Dumping + Shader Kaydını Etkinleştir Enable NULL GPU - Enable NULL GPU + NULL GPU'yu Etkinleştir Enable PM4 Dumping - Enable PM4 Dumping + PM4 Kaydını Etkinleştir Debug - Debug + Hata Ayıklama Enable Debug Dumping - Enable Debug Dumping + Hata Ayıklama Dökümü Etkinleştir Enable Vulkan Validation Layers - Enable Vulkan Validation Layers + Vulkan Doğrulama Katmanlarını Etkinleştir Enable Vulkan Synchronization Validation - Enable Vulkan Synchronization Validation + Vulkan Senkronizasyon Doğrulamasını Etkinleştir Enable RenderDoc Debugging - Enable RenderDoc Debugging + RenderDoc Hata Ayıklamayı Etkinleştir \ No newline at end of file From aae6e5be73a6c43afdfb4bd8d22da5f47d9e380f Mon Sep 17 00:00:00 2001 From: Lizardy <6063922+lzardy@users.noreply.github.com> Date: Mon, 26 Aug 2024 08:21:20 -0400 Subject: [PATCH 25/69] shader_recompiler: BUFFER_ATOMIC_SWAP Opcode (#566) * shader_recompiler: BUFFER_ATOMIC_SWAP Opcode * clang * follow 32 convention --------- Co-authored-by: microsoftv <6063922+microsoftv@users.noreply.github.com> --- src/shader_recompiler/backend/spirv/emit_spirv_atomic.cpp | 2 +- .../backend/spirv/emit_spirv_instructions.h | 2 +- src/shader_recompiler/frontend/translate/vector_memory.cpp | 4 +++- src/shader_recompiler/ir/ir_emitter.cpp | 6 +++--- src/shader_recompiler/ir/ir_emitter.h | 4 ++-- src/shader_recompiler/ir/microinstruction.cpp | 2 +- src/shader_recompiler/ir/opcodes.inc | 4 ++-- src/shader_recompiler/ir/passes/resource_tracking_pass.cpp | 3 ++- 8 files changed, 15 insertions(+), 12 deletions(-) diff --git a/src/shader_recompiler/backend/spirv/emit_spirv_atomic.cpp b/src/shader_recompiler/backend/spirv/emit_spirv_atomic.cpp index 37e91d3b1..1d553dc56 100644 --- a/src/shader_recompiler/backend/spirv/emit_spirv_atomic.cpp +++ b/src/shader_recompiler/backend/spirv/emit_spirv_atomic.cpp @@ -102,7 +102,7 @@ Id EmitBufferAtomicXor32(EmitContext& ctx, IR::Inst* inst, u32 handle, Id addres return BufferAtomicU32(ctx, inst, handle, address, value, &Sirit::Module::OpAtomicXor); } -Id EmitBufferAtomicExchange32(EmitContext& ctx, IR::Inst* inst, u32 handle, Id address, Id value) { +Id EmitBufferAtomicSwap32(EmitContext& ctx, IR::Inst* inst, u32 handle, Id address, Id value) { return BufferAtomicU32(ctx, inst, handle, address, value, &Sirit::Module::OpAtomicExchange); } diff --git a/src/shader_recompiler/backend/spirv/emit_spirv_instructions.h b/src/shader_recompiler/backend/spirv/emit_spirv_instructions.h index 0703efb96..dd3d8fae9 100644 --- a/src/shader_recompiler/backend/spirv/emit_spirv_instructions.h +++ b/src/shader_recompiler/backend/spirv/emit_spirv_instructions.h @@ -91,7 +91,7 @@ Id EmitBufferAtomicDec32(EmitContext& ctx, IR::Inst* inst, u32 handle, Id addres Id EmitBufferAtomicAnd32(EmitContext& ctx, IR::Inst* inst, u32 handle, Id address, Id value); Id EmitBufferAtomicOr32(EmitContext& ctx, IR::Inst* inst, u32 handle, Id address, Id value); Id EmitBufferAtomicXor32(EmitContext& ctx, IR::Inst* inst, u32 handle, Id address, Id value); -Id EmitBufferAtomicExchange32(EmitContext& ctx, IR::Inst* inst, u32 handle, Id address, Id value); +Id EmitBufferAtomicSwap32(EmitContext& ctx, IR::Inst* inst, u32 handle, Id address, Id value); Id EmitGetAttribute(EmitContext& ctx, IR::Attribute attr, u32 comp); Id EmitGetAttributeU32(EmitContext& ctx, IR::Attribute attr, u32 comp); void EmitSetAttribute(EmitContext& ctx, IR::Attribute attr, Id value, u32 comp); diff --git a/src/shader_recompiler/frontend/translate/vector_memory.cpp b/src/shader_recompiler/frontend/translate/vector_memory.cpp index 45440da2f..b88cfc46c 100644 --- a/src/shader_recompiler/frontend/translate/vector_memory.cpp +++ b/src/shader_recompiler/frontend/translate/vector_memory.cpp @@ -111,6 +111,8 @@ void Translator::EmitVectorMemory(const GcnInst& inst) { // Buffer atomic operations case Opcode::BUFFER_ATOMIC_ADD: return BUFFER_ATOMIC(AtomicOp::Add, inst); + case Opcode::BUFFER_ATOMIC_SWAP: + return BUFFER_ATOMIC(AtomicOp::Swap, inst); default: LogMissingOpcode(inst); } @@ -476,7 +478,7 @@ void Translator::BUFFER_ATOMIC(AtomicOp op, const GcnInst& inst) { const IR::Value original_val = [&] { switch (op) { case AtomicOp::Swap: - return ir.BufferAtomicExchange(handle, address, vdata_val, info); + return ir.BufferAtomicSwap(handle, address, vdata_val, info); case AtomicOp::Add: return ir.BufferAtomicIAdd(handle, address, vdata_val, info); case AtomicOp::Smin: diff --git a/src/shader_recompiler/ir/ir_emitter.cpp b/src/shader_recompiler/ir/ir_emitter.cpp index 0f2fb2f7c..a65e538cf 100644 --- a/src/shader_recompiler/ir/ir_emitter.cpp +++ b/src/shader_recompiler/ir/ir_emitter.cpp @@ -404,9 +404,9 @@ Value IREmitter::BufferAtomicXor(const Value& handle, const Value& address, cons return Inst(Opcode::BufferAtomicXor32, Flags{info}, handle, address, value); } -Value IREmitter::BufferAtomicExchange(const Value& handle, const Value& address, const Value& value, - BufferInstInfo info) { - return Inst(Opcode::BufferAtomicExchange32, Flags{info}, handle, address, value); +Value IREmitter::BufferAtomicSwap(const Value& handle, const Value& address, const Value& value, + BufferInstInfo info) { + return Inst(Opcode::BufferAtomicSwap32, Flags{info}, handle, address, value); } void IREmitter::StoreBufferFormat(int num_dwords, const Value& handle, const Value& address, diff --git a/src/shader_recompiler/ir/ir_emitter.h b/src/shader_recompiler/ir/ir_emitter.h index 45fa5f216..8f806eb50 100644 --- a/src/shader_recompiler/ir/ir_emitter.h +++ b/src/shader_recompiler/ir/ir_emitter.h @@ -115,8 +115,8 @@ public: const Value& value, BufferInstInfo info); [[nodiscard]] Value BufferAtomicXor(const Value& handle, const Value& address, const Value& value, BufferInstInfo info); - [[nodiscard]] Value BufferAtomicExchange(const Value& handle, const Value& address, - const Value& value, BufferInstInfo info); + [[nodiscard]] Value BufferAtomicSwap(const Value& handle, const Value& address, + const Value& value, BufferInstInfo info); [[nodiscard]] U32 LaneId(); [[nodiscard]] U32 WarpId(); diff --git a/src/shader_recompiler/ir/microinstruction.cpp b/src/shader_recompiler/ir/microinstruction.cpp index e35be8a7f..a8c8b0737 100644 --- a/src/shader_recompiler/ir/microinstruction.cpp +++ b/src/shader_recompiler/ir/microinstruction.cpp @@ -70,7 +70,7 @@ bool Inst::MayHaveSideEffects() const noexcept { case Opcode::BufferAtomicAnd32: case Opcode::BufferAtomicOr32: case Opcode::BufferAtomicXor32: - case Opcode::BufferAtomicExchange32: + case Opcode::BufferAtomicSwap32: case Opcode::WriteSharedU128: case Opcode::WriteSharedU64: case Opcode::WriteSharedU32: diff --git a/src/shader_recompiler/ir/opcodes.inc b/src/shader_recompiler/ir/opcodes.inc index 9be89f648..26da00bbd 100644 --- a/src/shader_recompiler/ir/opcodes.inc +++ b/src/shader_recompiler/ir/opcodes.inc @@ -95,7 +95,7 @@ OPCODE(StoreBufferFormatF32x4, Void, Opaq OPCODE(StoreBufferU32, Void, Opaque, Opaque, U32, ) // Buffer atomic operations -OPCODE(BufferAtomicIAdd32, U32, Opaque, Opaque, U32 ) +OPCODE(BufferAtomicIAdd32, U32, Opaque, Opaque, U32 ) OPCODE(BufferAtomicSMin32, U32, Opaque, Opaque, U32 ) OPCODE(BufferAtomicUMin32, U32, Opaque, Opaque, U32 ) OPCODE(BufferAtomicSMax32, U32, Opaque, Opaque, U32 ) @@ -105,7 +105,7 @@ OPCODE(BufferAtomicDec32, U32, Opaq OPCODE(BufferAtomicAnd32, U32, Opaque, Opaque, U32, ) OPCODE(BufferAtomicOr32, U32, Opaque, Opaque, U32, ) OPCODE(BufferAtomicXor32, U32, Opaque, Opaque, U32, ) -OPCODE(BufferAtomicExchange32, U32, Opaque, Opaque, U32, ) +OPCODE(BufferAtomicSwap32, U32, Opaque, Opaque, U32, ) // Vector utility OPCODE(CompositeConstructU32x2, U32x2, U32, U32, ) diff --git a/src/shader_recompiler/ir/passes/resource_tracking_pass.cpp b/src/shader_recompiler/ir/passes/resource_tracking_pass.cpp index 016ba3660..ccdcfc6e6 100644 --- a/src/shader_recompiler/ir/passes/resource_tracking_pass.cpp +++ b/src/shader_recompiler/ir/passes/resource_tracking_pass.cpp @@ -32,7 +32,7 @@ bool IsBufferAtomic(const IR::Inst& inst) { case IR::Opcode::BufferAtomicAnd32: case IR::Opcode::BufferAtomicOr32: case IR::Opcode::BufferAtomicXor32: - case IR::Opcode::BufferAtomicExchange32: + case IR::Opcode::BufferAtomicSwap32: return true; default: return false; @@ -136,6 +136,7 @@ IR::Type BufferDataType(const IR::Inst& inst, AmdGpu::NumberFormat num_format) { case IR::Opcode::ReadConstBufferU32: case IR::Opcode::StoreBufferU32: case IR::Opcode::BufferAtomicIAdd32: + case IR::Opcode::BufferAtomicSwap32: return IR::Type::U32; default: UNREACHABLE(); From ad8373095a4fda41d61ae3105af280ca4484f382 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pl=C3=ADnio=20Larrubia?= Date: Mon, 26 Aug 2024 09:22:11 -0300 Subject: [PATCH 26/69] fix typo in LOG_INFO (#559) fix: file name typo constant_propogation_pass.cpp fix typo from 'symbol_vitrual_addr' variable fix typo in emit_spirv_context_get_set.cpp fix typo from constant_propagation_pass.cpp in CMakeLists fix typo in these some config.cpp functions - setSliderPosition - setSliderPositionGrid - getSliderPosition - getSliderPositionGrid fix typo inside src\core\aerolib\stubs.cpp fix typo in a comment from src\core\file_format\pkg.cpp fix typo inside src\core\file_sys\fs.cpp + fs.h - NeedsCaseInsensiveSearch -> NeedsCaseInsensitiveSearch fix 2 function typos: sceAppContentAddcontEnqueueDownloadByEntitlemetId and sceAppContentAddcontMountByEntitlemetId fix typo on comment inside src\core\libraries\kernel\file_system.cpp fix typo on src\core\libraries\videoout\driver.cpp fix typo in src\core\memory.cpp fix typo from comment in src\qt_gui\game_list_utils.h fix typo in src\video_core\amdgpu\liverpool.h - window_offset_disble to window_offset_disable fix typo from comments in src\video_core\host_shaders\detile_m32x1.comp + detile_m32x2.comp - subotimal -> suboptimal fix typo from comment in src\video_core\renderer_vulkan\renderer_vulkan.cpp - dimentions -> dimensions fix typo from enum in src\common\debug.h and other files - MarkersPallete -> MarkersPalette fix last typo in src\video_core\amdgpu\pm4_opcodes.h - PremableCntl -> PreambleCntl --- CMakeLists.txt | 2 +- scripts/aerolib.inl | 4 +-- scripts/ps4_names.txt | 4 +-- src/common/config.cpp | 8 +++--- src/common/config.h | 8 +++--- src/common/debug.h | 2 +- src/core/aerolib/aerolib.inl | 4 +-- src/core/aerolib/stubs.cpp | 2 +- src/core/file_format/pkg.cpp | 4 +-- src/core/file_sys/fs.cpp | 2 +- src/core/file_sys/fs.h | 4 +-- .../libraries/app_content/app_content.cpp | 8 +++--- src/core/libraries/app_content/app_content.h | 4 +-- src/core/libraries/kernel/file_system.cpp | 2 +- src/core/libraries/videoout/driver.cpp | 2 +- src/core/linker.cpp | 12 ++++---- src/core/memory.cpp | 2 +- src/qt_gui/game_list_utils.h | 2 +- src/qt_gui/main_window.cpp | 28 +++++++++---------- .../spirv/emit_spirv_context_get_set.cpp | 4 +-- ...pass.cpp => constant_propagation_pass.cpp} | 0 src/video_core/amdgpu/liverpool.h | 2 +- src/video_core/amdgpu/pm4_opcodes.h | 2 +- src/video_core/host_shaders/detile_m8x1.comp | 2 +- src/video_core/host_shaders/detile_m8x2.comp | 2 +- .../renderer_vulkan/renderer_vulkan.cpp | 4 +-- .../renderer_vulkan/vk_scheduler.cpp | 2 +- 27 files changed, 61 insertions(+), 61 deletions(-) rename src/shader_recompiler/ir/passes/{constant_propogation_pass.cpp => constant_propagation_pass.cpp} (100%) diff --git a/CMakeLists.txt b/CMakeLists.txt index 43ad23e94..decc27b17 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -450,7 +450,7 @@ set(SHADER_RECOMPILER src/shader_recompiler/exception.h src/shader_recompiler/frontend/opcodes.h src/shader_recompiler/frontend/structured_control_flow.cpp src/shader_recompiler/frontend/structured_control_flow.h - src/shader_recompiler/ir/passes/constant_propogation_pass.cpp + src/shader_recompiler/ir/passes/constant_propagation_pass.cpp src/shader_recompiler/ir/passes/dead_code_elimination_pass.cpp src/shader_recompiler/ir/passes/identity_removal_pass.cpp src/shader_recompiler/ir/passes/ir_passes.h diff --git a/scripts/aerolib.inl b/scripts/aerolib.inl index a87c3cc4e..64ee32ea2 100644 --- a/scripts/aerolib.inl +++ b/scripts/aerolib.inl @@ -114108,7 +114108,7 @@ STUB( _ZN3sce2Np9CppWebApi6Common12IntrusivePtrINS1_7Matches2V124RequestCompetitiveResultEE7add_refEv) STUB("efPahl2FufA", _ZN3sce2Np9CppWebApi30CommunicationRestrictionStatus2V35Error8fromJsonERKNS_4Json5ValueE) -STUB("efX3lrPwdKA", sceAppContentAddcontMountByEntitlemetId) +STUB("efX3lrPwdKA", sceAppContentAddcontMountByEntitlementId) STUB("efXnxYFN5oE", _ZNSt11range_errorD0Ev) STUB("efcwuDLsAM0", _ZThn120_NK7WebCore16HTMLMediaElement5mutedEv) STUB("efhGArzWdxE", _ZN7bmalloc6IsoTLS15s_didInitializeE) @@ -129493,7 +129493,7 @@ STUB( STUB("kJlYH5uMAWI", sceNetResolverDestroy) STUB("kJmdxo4uM+8", _ZNSt9money_putIwSt19ostreambuf_iteratorIwSt11char_traitsIwEEE5_InitERKSt8_Locinfo) -STUB("kJmjt81mXKQ", sceAppContentAddcontEnqueueDownloadByEntitlemetId) +STUB("kJmjt81mXKQ", sceAppContentAddcontEnqueueDownloadByEntitlementId) STUB( "kJoY9lMIFzY", _ZN3sce2Np9CppWebApi6Common8IteratorINS2_12IntrusivePtrINS1_21AdvancedPlayerProfile2V138MatchCompletionRateDisconnectedMetricsEEEEmmEi) diff --git a/scripts/ps4_names.txt b/scripts/ps4_names.txt index caad2b4df..6f95cc734 100644 --- a/scripts/ps4_names.txt +++ b/scripts/ps4_names.txt @@ -80897,10 +80897,10 @@ sceAppCheckerExecute sceAppCheckerExecuteEx sceAppContentAddcontDelete sceAppContentAddcontEnqueueDownload -sceAppContentAddcontEnqueueDownloadByEntitlemetId +sceAppContentAddcontEnqueueDownloadByEntitlementId sceAppContentAddcontEnqueueDownloadSp sceAppContentAddcontMount -sceAppContentAddcontMountByEntitlemetId +sceAppContentAddcontMountByEntitlementId sceAppContentAddcontShrink sceAppContentAddcontUnmount sceAppContentAppParamGetInt diff --git a/src/common/config.cpp b/src/common/config.cpp index 0659a987f..9f55cbd40 100644 --- a/src/common/config.cpp +++ b/src/common/config.cpp @@ -215,10 +215,10 @@ void setIconSize(u32 size) { void setIconSizeGrid(u32 size) { m_icon_size_grid = size; } -void setSliderPositon(u32 pos) { +void setSliderPosition(u32 pos) { m_slider_pos = pos; } -void setSliderPositonGrid(u32 pos) { +void setSliderPositionGrid(u32 pos) { m_slider_pos_grid = pos; } void setTableMode(u32 mode) { @@ -271,10 +271,10 @@ u32 getIconSize() { u32 getIconSizeGrid() { return m_icon_size_grid; } -u32 getSliderPositon() { +u32 getSliderPosition() { return m_slider_pos; } -u32 getSliderPositonGrid() { +u32 getSliderPositionGrid() { return m_slider_pos_grid; } u32 getTableMode() { diff --git a/src/common/config.h b/src/common/config.h index 458fa88c3..554515a44 100644 --- a/src/common/config.h +++ b/src/common/config.h @@ -61,8 +61,8 @@ void setGameInstallDir(const std::string& dir); void setMainWindowTheme(u32 theme); void setIconSize(u32 size); void setIconSizeGrid(u32 size); -void setSliderPositon(u32 pos); -void setSliderPositonGrid(u32 pos); +void setSliderPosition(u32 pos); +void setSliderPositionGrid(u32 pos); void setTableMode(u32 mode); void setMainWindowWidth(u32 width); void setMainWindowHeight(u32 height); @@ -79,8 +79,8 @@ std::string getGameInstallDir(); u32 getMainWindowTheme(); u32 getIconSize(); u32 getIconSizeGrid(); -u32 getSliderPositon(); -u32 getSliderPositonGrid(); +u32 getSliderPosition(); +u32 getSliderPositionGrid(); u32 getTableMode(); u32 getMainWindowWidth(); u32 getMainWindowHeight(); diff --git a/src/common/debug.h b/src/common/debug.h index 50022a156..596ad7b84 100644 --- a/src/common/debug.h +++ b/src/common/debug.h @@ -29,7 +29,7 @@ static inline bool IsProfilerConnected() { #define TRACK_ALLOC(ptr, size, pool) TracyAllocN(std::bit_cast(ptr), (size), (pool)) #define TRACK_FREE(ptr, pool) TracyFreeN(std::bit_cast(ptr), (pool)) -enum MarkersPallete : int { +enum MarkersPalette : int { EmulatorMarkerColor = 0x264653, RendererMarkerColor = 0x2a9d8f, HleMarkerColor = 0xe9c46a, diff --git a/src/core/aerolib/aerolib.inl b/src/core/aerolib/aerolib.inl index a87c3cc4e..64ee32ea2 100644 --- a/src/core/aerolib/aerolib.inl +++ b/src/core/aerolib/aerolib.inl @@ -114108,7 +114108,7 @@ STUB( _ZN3sce2Np9CppWebApi6Common12IntrusivePtrINS1_7Matches2V124RequestCompetitiveResultEE7add_refEv) STUB("efPahl2FufA", _ZN3sce2Np9CppWebApi30CommunicationRestrictionStatus2V35Error8fromJsonERKNS_4Json5ValueE) -STUB("efX3lrPwdKA", sceAppContentAddcontMountByEntitlemetId) +STUB("efX3lrPwdKA", sceAppContentAddcontMountByEntitlementId) STUB("efXnxYFN5oE", _ZNSt11range_errorD0Ev) STUB("efcwuDLsAM0", _ZThn120_NK7WebCore16HTMLMediaElement5mutedEv) STUB("efhGArzWdxE", _ZN7bmalloc6IsoTLS15s_didInitializeE) @@ -129493,7 +129493,7 @@ STUB( STUB("kJlYH5uMAWI", sceNetResolverDestroy) STUB("kJmdxo4uM+8", _ZNSt9money_putIwSt19ostreambuf_iteratorIwSt11char_traitsIwEEE5_InitERKSt8_Locinfo) -STUB("kJmjt81mXKQ", sceAppContentAddcontEnqueueDownloadByEntitlemetId) +STUB("kJmjt81mXKQ", sceAppContentAddcontEnqueueDownloadByEntitlementId) STUB( "kJoY9lMIFzY", _ZN3sce2Np9CppWebApi6Common8IteratorINS2_12IntrusivePtrINS1_21AdvancedPlayerProfile2V138MatchCompletionRateDisconnectedMetricsEEEEmmEi) diff --git a/src/core/aerolib/stubs.cpp b/src/core/aerolib/stubs.cpp index 5e2d55cdc..2634fc46a 100644 --- a/src/core/aerolib/stubs.cpp +++ b/src/core/aerolib/stubs.cpp @@ -13,7 +13,7 @@ namespace Core::AeroLib { // on lookup, setting up the nid_entry they are matched with // // If it runs out of stubs with name information, it will return -// a default implemetnation without function name details +// a default implementation without function name details // Up to 512, larger values lead to more resolve stub slots // and to longer compile / CI times diff --git a/src/core/file_format/pkg.cpp b/src/core/file_format/pkg.cpp index 336d81019..fe3c34547 100644 --- a/src/core/file_format/pkg.cpp +++ b/src/core/file_format/pkg.cpp @@ -279,8 +279,8 @@ bool PKG::Extract(const std::filesystem::path& filepath, const std::filesystem:: } } - // let's deal with the root/uroot enteries here. - // Sometimes it's more than 2 enteries (Tomb Raider Remastered) + // let's deal with the root/uroot entries here. + // Sometimes it's more than 2 entries (Tomb Raider Remastered) const std::string_view flat_path_table(&decompressedData[0x10], 15); if (flat_path_table == "flat_path_table") { uroot_reached = true; diff --git a/src/core/file_sys/fs.cpp b/src/core/file_sys/fs.cpp index 40d8212bb..199e42a04 100644 --- a/src/core/file_sys/fs.cpp +++ b/src/core/file_sys/fs.cpp @@ -48,7 +48,7 @@ std::filesystem::path MntPoints::GetHostPath(std::string_view guest_directory) { pos = mount->mount.size() + 1; const auto rel_path = std::string_view(corrected_path).substr(pos); const auto host_path = mount->host_path / rel_path; - if (!NeedsCaseInsensiveSearch) { + if (!NeedsCaseInsensitiveSearch) { return host_path; } diff --git a/src/core/file_sys/fs.h b/src/core/file_sys/fs.h index b0fb63242..2c55b0513 100644 --- a/src/core/file_sys/fs.h +++ b/src/core/file_sys/fs.h @@ -14,9 +14,9 @@ namespace Core::FileSys { class MntPoints { #ifdef _WIN64 - static constexpr bool NeedsCaseInsensiveSearch = false; + static constexpr bool NeedsCaseInsensitiveSearch = false; #else - static constexpr bool NeedsCaseInsensiveSearch = true; + static constexpr bool NeedsCaseInsensitiveSearch = true; #endif public: struct MntPair { diff --git a/src/core/libraries/app_content/app_content.cpp b/src/core/libraries/app_content/app_content.cpp index 882f99e49..ab3c901aa 100644 --- a/src/core/libraries/app_content/app_content.cpp +++ b/src/core/libraries/app_content/app_content.cpp @@ -221,12 +221,12 @@ int PS4_SYSV_ABI Func_C59A36FF8D7C59DA() { return ORBIS_OK; } -int PS4_SYSV_ABI sceAppContentAddcontEnqueueDownloadByEntitlemetId() { +int PS4_SYSV_ABI sceAppContentAddcontEnqueueDownloadByEntitlementId() { LOG_ERROR(Lib_AppContent, "(STUBBED) called"); return ORBIS_OK; } -int PS4_SYSV_ABI sceAppContentAddcontMountByEntitlemetId() { +int PS4_SYSV_ABI sceAppContentAddcontMountByEntitlementId() { LOG_ERROR(Lib_AppContent, "(STUBBED) called"); return ORBIS_OK; } @@ -313,9 +313,9 @@ void RegisterlibSceAppContent(Core::Loader::SymbolsResolver* sym) { LIB_FUNCTION("xZo2-418Wdo", "libSceAppContentBundle", 1, "libSceAppContent", 1, 1, Func_C59A36FF8D7C59DA); LIB_FUNCTION("kJmjt81mXKQ", "libSceAppContentIro", 1, "libSceAppContent", 1, 1, - sceAppContentAddcontEnqueueDownloadByEntitlemetId); + sceAppContentAddcontEnqueueDownloadByEntitlementId); LIB_FUNCTION("efX3lrPwdKA", "libSceAppContentIro", 1, "libSceAppContent", 1, 1, - sceAppContentAddcontMountByEntitlemetId); + sceAppContentAddcontMountByEntitlementId); LIB_FUNCTION("z9hgjLd1SGA", "libSceAppContentIro", 1, "libSceAppContent", 1, 1, sceAppContentGetAddcontInfoByEntitlementId); LIB_FUNCTION("3wUaDTGmjcQ", "libSceAppContentIro", 1, "libSceAppContent", 1, 1, diff --git a/src/core/libraries/app_content/app_content.h b/src/core/libraries/app_content/app_content.h index ecf69199e..3e6f9b540 100644 --- a/src/core/libraries/app_content/app_content.h +++ b/src/core/libraries/app_content/app_content.h @@ -92,8 +92,8 @@ int PS4_SYSV_ABI sceAppContentTemporaryDataMount2(OrbisAppContentTemporaryDataOp int PS4_SYSV_ABI sceAppContentTemporaryDataUnmount(); int PS4_SYSV_ABI sceAppContentGetPftFlag(); int PS4_SYSV_ABI Func_C59A36FF8D7C59DA(); -int PS4_SYSV_ABI sceAppContentAddcontEnqueueDownloadByEntitlemetId(); -int PS4_SYSV_ABI sceAppContentAddcontMountByEntitlemetId(); +int PS4_SYSV_ABI sceAppContentAddcontEnqueueDownloadByEntitlementId(); +int PS4_SYSV_ABI sceAppContentAddcontMountByEntitlementId(); int PS4_SYSV_ABI sceAppContentGetAddcontInfoByEntitlementId(); int PS4_SYSV_ABI sceAppContentGetAddcontInfoListByIroTag(); int PS4_SYSV_ABI sceAppContentGetDownloadedStoreCountry(); diff --git a/src/core/libraries/kernel/file_system.cpp b/src/core/libraries/kernel/file_system.cpp index 990b11d69..f7f58df59 100644 --- a/src/core/libraries/kernel/file_system.cpp +++ b/src/core/libraries/kernel/file_system.cpp @@ -538,7 +538,7 @@ void fileSystemSymbolsRegister(Core::Loader::SymbolsResolver* sym) { // openOrbis (to check if it is valid out of OpenOrbis LIB_FUNCTION("6c3rCVE-fTU", "libkernel", 1, "libkernel", 1, 1, - posix_open); // _open shoudld be equal to open function + posix_open); // _open should be equal to open function } } // namespace Libraries::Kernel diff --git a/src/core/libraries/videoout/driver.cpp b/src/core/libraries/videoout/driver.cpp index dbbcb1def..09e9cef5b 100644 --- a/src/core/libraries/videoout/driver.cpp +++ b/src/core/libraries/videoout/driver.cpp @@ -96,7 +96,7 @@ int VideoOutDriver::RegisterBuffers(VideoOutPort* port, s32 startIndex, void* co } if (attribute->reserved0 != 0 || attribute->reserved1 != 0) { - LOG_ERROR(Lib_VideoOut, "Invalid reserved memebers"); + LOG_ERROR(Lib_VideoOut, "Invalid reserved members"); return ORBIS_VIDEO_OUT_ERROR_INVALID_VALUE; } if (attribute->aspect_ratio != 0) { diff --git a/src/core/linker.cpp b/src/core/linker.cpp index d4a15825b..6f46fdbe3 100644 --- a/src/core/linker.cpp +++ b/src/core/linker.cpp @@ -168,7 +168,7 @@ void Linker::Relocate(Module* module) { auto sym_bind = sym.GetBind(); auto sym_type = sym.GetType(); auto sym_visibility = sym.GetVisibility(); - u64 symbol_vitrual_addr = 0; + u64 symbol_virtual_addr = 0; Loader::SymbolRecord symrec{}; switch (sym_type) { case STT_FUN: @@ -185,12 +185,12 @@ void Linker::Relocate(Module* module) { } if (sym_visibility != 0) { - LOG_INFO(Core_Linker, "symbol visilibity !=0"); + LOG_INFO(Core_Linker, "symbol visibility !=0"); } switch (sym_bind) { case STB_LOCAL: - symbol_vitrual_addr = rel_base_virtual_addr + sym.st_value; + symbol_virtual_addr = rel_base_virtual_addr + sym.st_value; module->SetRelaBit(bit_idx); break; case STB_GLOBAL: @@ -200,14 +200,14 @@ void Linker::Relocate(Module* module) { // Only set the rela bit if the symbol was actually resolved and not stubbed. module->SetRelaBit(bit_idx); } - symbol_vitrual_addr = symrec.virtual_address; + symbol_virtual_addr = symrec.virtual_address; break; } default: ASSERT_MSG(0, "unknown bind type {}", sym_bind); } - rel_is_resolved = (symbol_vitrual_addr != 0); - rel_value = (rel_is_resolved ? symbol_vitrual_addr + addend : 0); + rel_is_resolved = (symbol_virtual_addr != 0); + rel_value = (rel_is_resolved ? symbol_virtual_addr + addend : 0); rel_name = symrec.name; break; } diff --git a/src/core/memory.cpp b/src/core/memory.cpp index d6d5c1e36..0feef260b 100644 --- a/src/core/memory.cpp +++ b/src/core/memory.cpp @@ -349,7 +349,7 @@ void MemoryManager::NameVirtualRange(VAddr virtual_addr, size_t size, std::strin auto it = FindVMA(virtual_addr); ASSERT_MSG(it->second.Contains(virtual_addr, size), - "Range provided is not fully containted in vma"); + "Range provided is not fully contained in vma"); it->second.name = name; } VAddr MemoryManager::SearchFree(VAddr virtual_addr, size_t size, u32 alignment) { diff --git a/src/qt_gui/game_list_utils.h b/src/qt_gui/game_list_utils.h index 8f934388d..7911ce46f 100644 --- a/src/qt_gui/game_list_utils.h +++ b/src/qt_gui/game_list_utils.h @@ -4,7 +4,7 @@ #pragma once struct GameInfo { - std::string path; // root path of game directory (normaly directory that contains eboot.bin) + std::string path; // root path of game directory (normally directory that contains eboot.bin) std::string icon_path; // path of icon0.png std::string pic_path; // path of pic1.png QImage icon; diff --git a/src/qt_gui/main_window.cpp b/src/qt_gui/main_window.cpp index 64a89c6a6..8a4281726 100644 --- a/src/qt_gui/main_window.cpp +++ b/src/qt_gui/main_window.cpp @@ -116,7 +116,7 @@ void MainWindow::CreateDockWindows() { m_elf_viewer->hide(); m_game_list_frame->show(); m_dock_widget->setWidget(m_game_list_frame.data()); - slider_pos = Config::getSliderPositon(); + slider_pos = Config::getSliderPosition(); ui->sizeSlider->setSliderPosition(slider_pos); // set slider pos at start; isTableList = true; } else if (table_mode == 1) { // Grid @@ -124,7 +124,7 @@ void MainWindow::CreateDockWindows() { m_elf_viewer->hide(); m_game_grid_frame->show(); m_dock_widget->setWidget(m_game_grid_frame.data()); - slider_pos = Config::getSliderPositonGrid(); + slider_pos = Config::getSliderPositionGrid(); ui->sizeSlider->setSliderPosition(slider_pos); // set slider pos at start; isTableList = false; } else { @@ -184,12 +184,12 @@ void MainWindow::CreateConnects() { 36 + value; // 36 is the minimum icon size to use due to text disappearing. m_game_list_frame->ResizeIcons(36 + value); Config::setIconSize(36 + value); - Config::setSliderPositon(value); + Config::setSliderPosition(value); } else { m_game_grid_frame->icon_size = 69 + value; m_game_grid_frame->PopulateGameGrid(m_game_info->m_games, false); Config::setIconSizeGrid(69 + value); - Config::setSliderPositonGrid(value); + Config::setSliderPositionGrid(value); } }); @@ -228,11 +228,11 @@ void MainWindow::CreateConnects() { 36; // 36 is the minimum icon size to use due to text disappearing. ui->sizeSlider->setValue(0); // icone_size - 36 Config::setIconSize(36); - Config::setSliderPositon(0); + Config::setSliderPosition(0); } else { ui->sizeSlider->setValue(0); // icone_size - 36 Config::setIconSizeGrid(69); - Config::setSliderPositonGrid(0); + Config::setSliderPositionGrid(0); } }); @@ -241,11 +241,11 @@ void MainWindow::CreateConnects() { m_game_list_frame->icon_size = 64; ui->sizeSlider->setValue(28); Config::setIconSize(64); - Config::setSliderPositon(28); + Config::setSliderPosition(28); } else { ui->sizeSlider->setValue(28); Config::setIconSizeGrid(97); - Config::setSliderPositonGrid(28); + Config::setSliderPositionGrid(28); } }); @@ -254,11 +254,11 @@ void MainWindow::CreateConnects() { m_game_list_frame->icon_size = 128; ui->sizeSlider->setValue(92); Config::setIconSize(128); - Config::setSliderPositon(92); + Config::setSliderPosition(92); } else { ui->sizeSlider->setValue(92); Config::setIconSizeGrid(160); - Config::setSliderPositonGrid(91); + Config::setSliderPositionGrid(91); } }); @@ -267,11 +267,11 @@ void MainWindow::CreateConnects() { m_game_list_frame->icon_size = 256; ui->sizeSlider->setValue(220); Config::setIconSize(256); - Config::setSliderPositon(220); + Config::setSliderPosition(220); } else { ui->sizeSlider->setValue(220); Config::setIconSizeGrid(256); - Config::setSliderPositonGrid(220); + Config::setSliderPositionGrid(220); } }); // List @@ -286,7 +286,7 @@ void MainWindow::CreateConnects() { } isTableList = true; Config::setTableMode(0); - int slider_pos = Config::getSliderPositon(); + int slider_pos = Config::getSliderPosition(); ui->sizeSlider->setEnabled(true); ui->sizeSlider->setSliderPosition(slider_pos); }); @@ -302,7 +302,7 @@ void MainWindow::CreateConnects() { } isTableList = false; Config::setTableMode(1); - int slider_pos_grid = Config::getSliderPositonGrid(); + int slider_pos_grid = Config::getSliderPositionGrid(); ui->sizeSlider->setEnabled(true); ui->sizeSlider->setSliderPosition(slider_pos_grid); }); diff --git a/src/shader_recompiler/backend/spirv/emit_spirv_context_get_set.cpp b/src/shader_recompiler/backend/spirv/emit_spirv_context_get_set.cpp index 0b02f3a37..03fc52ff4 100644 --- a/src/shader_recompiler/backend/spirv/emit_spirv_context_get_set.cpp +++ b/src/shader_recompiler/backend/spirv/emit_spirv_context_get_set.cpp @@ -305,7 +305,7 @@ static Id ConvertValue(EmitContext& ctx, Id value, AmdGpu::NumberFormat format, case AmdGpu::NumberFormat::Float: return value; default: - UNREACHABLE_MSG("Unsupported number fromat for conversion: {}", + UNREACHABLE_MSG("Unsupported number format for conversion: {}", magic_enum::enum_name(format)); } } @@ -478,7 +478,7 @@ static Id ConvertF32ToFormat(EmitContext& ctx, Id value, AmdGpu::NumberFormat fo case AmdGpu::NumberFormat::Float: return value; default: - UNREACHABLE_MSG("Unsupported number fromat for conversion: {}", + UNREACHABLE_MSG("Unsupported number format for conversion: {}", magic_enum::enum_name(format)); } } diff --git a/src/shader_recompiler/ir/passes/constant_propogation_pass.cpp b/src/shader_recompiler/ir/passes/constant_propagation_pass.cpp similarity index 100% rename from src/shader_recompiler/ir/passes/constant_propogation_pass.cpp rename to src/shader_recompiler/ir/passes/constant_propagation_pass.cpp diff --git a/src/video_core/amdgpu/liverpool.h b/src/video_core/amdgpu/liverpool.h index 7b2d47853..2806f3308 100644 --- a/src/video_core/amdgpu/liverpool.h +++ b/src/video_core/amdgpu/liverpool.h @@ -556,7 +556,7 @@ struct Liverpool { union { BitField<0, 15, s32> top_left_x; BitField<15, 15, s32> top_left_y; - BitField<30, 1, s32> window_offset_disble; + BitField<30, 1, s32> window_offset_disable; }; union { BitField<0, 15, s32> bottom_right_x; diff --git a/src/video_core/amdgpu/pm4_opcodes.h b/src/video_core/amdgpu/pm4_opcodes.h index fba0cbb9f..83c1deaa4 100644 --- a/src/video_core/amdgpu/pm4_opcodes.h +++ b/src/video_core/amdgpu/pm4_opcodes.h @@ -48,7 +48,7 @@ enum class PM4ItOpcode : u32 { EventWriteEop = 0x47, EventWriteEos = 0x48, ReleaseMem = 0x49, - PremableCntl = 0x4A, + PreambleCntl = 0x4A, DmaData = 0x50, ContextRegRmw = 0x51, AcquireMem = 0x58, diff --git a/src/video_core/host_shaders/detile_m8x1.comp b/src/video_core/host_shaders/detile_m8x1.comp index 5ec48fae2..3ca2e64bd 100644 --- a/src/video_core/host_shaders/detile_m8x1.comp +++ b/src/video_core/host_shaders/detile_m8x1.comp @@ -4,7 +4,7 @@ #version 450 #extension GL_KHR_shader_subgroup_shuffle : require -// NOTE: Current subgroup utilization is subotimal on most GPUs, so +// NOTE: Current subgroup utilization is suboptimal on most GPUs, so // it will be nice to process two tiles at once here. layout (local_size_x = 16, local_size_y = 1, local_size_z = 1) in; diff --git a/src/video_core/host_shaders/detile_m8x2.comp b/src/video_core/host_shaders/detile_m8x2.comp index d27bc6e2d..ee9b72810 100644 --- a/src/video_core/host_shaders/detile_m8x2.comp +++ b/src/video_core/host_shaders/detile_m8x2.comp @@ -3,7 +3,7 @@ #version 450 -// NOTE: Current subgroup utilization is subotimal on most GPUs, so +// NOTE: Current subgroup utilization is suboptimal on most GPUs, so // it will be nice to process two tiles at once here. layout (local_size_x = 32, local_size_y = 1, local_size_z = 1) in; diff --git a/src/video_core/renderer_vulkan/renderer_vulkan.cpp b/src/video_core/renderer_vulkan/renderer_vulkan.cpp index c78d629e4..b12708088 100644 --- a/src/video_core/renderer_vulkan/renderer_vulkan.cpp +++ b/src/video_core/renderer_vulkan/renderer_vulkan.cpp @@ -258,7 +258,7 @@ void RendererVulkan::Present(Frame* frame) { { auto* profiler_ctx = instance.GetProfilerContext(); TracyVkNamedZoneC(profiler_ctx, renderer_gpu_zone, cmdbuf, "Host frame", - MarkersPallete::GpuMarkerColor, profiler_ctx != nullptr); + MarkersPalette::GpuMarkerColor, profiler_ctx != nullptr); const vk::Extent2D extent = swapchain.GetExtent(); const std::array pre_barriers{ @@ -380,7 +380,7 @@ Frame* RendererVulkan::GetRenderFrame() { // Reset fence for next queue submission. device.resetFences(frame->present_done); - // If the window dimentions changed, recreate this frame + // If the window dimensions changed, recreate this frame if (frame->width != window.getWidth() || frame->height != window.getHeight()) { RecreateFrame(frame, window.getWidth(), window.getHeight()); } diff --git a/src/video_core/renderer_vulkan/vk_scheduler.cpp b/src/video_core/renderer_vulkan/vk_scheduler.cpp index ef0307efd..2f1f13d72 100644 --- a/src/video_core/renderer_vulkan/vk_scheduler.cpp +++ b/src/video_core/renderer_vulkan/vk_scheduler.cpp @@ -145,7 +145,7 @@ void Scheduler::AllocateWorkerCommandBuffers() { auto* profiler_ctx = instance.GetProfilerContext(); if (profiler_ctx) { static const auto scope_loc = - GPU_SCOPE_LOCATION("Guest Frame", MarkersPallete::GpuMarkerColor); + GPU_SCOPE_LOCATION("Guest Frame", MarkersPalette::GpuMarkerColor); new (profiler_scope) tracy::VkCtxScope{profiler_ctx, &scope_loc, current_cmdbuf, true}; } } From 7c7d04133e54818cbfdd589ef1e0ccda447db56c Mon Sep 17 00:00:00 2001 From: Exhigh Date: Mon, 26 Aug 2024 19:34:35 +0400 Subject: [PATCH 27/69] savedata: Handle another missed case in saveDataMount This should potentially fix (CUSA01019) - The Walking Dead: The Complete First Season. --- src/core/libraries/save_data/savedata.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/core/libraries/save_data/savedata.cpp b/src/core/libraries/save_data/savedata.cpp index d62e39f88..a6117cba5 100644 --- a/src/core/libraries/save_data/savedata.cpp +++ b/src/core/libraries/save_data/savedata.cpp @@ -506,7 +506,9 @@ s32 saveDataMount(u32 user_id, char* dir_name, u32 mount_mode, case ORBIS_SAVE_DATA_MOUNT_MODE_CREATE | ORBIS_SAVE_DATA_MOUNT_MODE_RDWR | ORBIS_SAVE_DATA_MOUNT_MODE_COPY_ICON: case ORBIS_SAVE_DATA_MOUNT_MODE_CREATE | ORBIS_SAVE_DATA_MOUNT_MODE_DESTRUCT_OFF | - ORBIS_SAVE_DATA_MOUNT_MODE_COPY_ICON: { + ORBIS_SAVE_DATA_MOUNT_MODE_COPY_ICON: + case ORBIS_SAVE_DATA_MOUNT_MODE_CREATE | ORBIS_SAVE_DATA_MOUNT_MODE_RDWR | + ORBIS_SAVE_DATA_MOUNT_MODE_DESTRUCT_OFF | ORBIS_SAVE_DATA_MOUNT_MODE_COPY_ICON: { if (std::filesystem::exists(mount_dir)) { return ORBIS_SAVE_DATA_ERROR_EXISTS; } From 3e94b533b6c9840c038e529fb95118ec0dd16c0e Mon Sep 17 00:00:00 2001 From: psucien <168137814+psucien@users.noreply.github.com> Date: Mon, 26 Aug 2024 23:14:22 +0200 Subject: [PATCH 28/69] libraries: kernel: skip for protection op; processing logic fixes (#602) --- .../libraries/kernel/memory_management.cpp | 56 +++++++++++-------- 1 file changed, 32 insertions(+), 24 deletions(-) diff --git a/src/core/libraries/kernel/memory_management.cpp b/src/core/libraries/kernel/memory_management.cpp index fbc457954..05c6e6897 100644 --- a/src/core/libraries/kernel/memory_management.cpp +++ b/src/core/libraries/kernel/memory_management.cpp @@ -254,46 +254,54 @@ int PS4_SYSV_ABI sceKernelMunmap(void* addr, size_t len); s32 PS4_SYSV_ABI sceKernelBatchMap2(OrbisKernelBatchMapEntry* entries, int numEntries, int* numEntriesOut, int flags) { + int result = ORBIS_OK; int processed = 0; - int result = 0; - for (int i = 0; i < numEntries; i++) { + for (int i = 0; i < numEntries; i++, processed++) { if (entries == nullptr || entries[i].length == 0 || entries[i].operation > 4) { result = ORBIS_KERNEL_ERROR_EINVAL; break; // break and assign a value to numEntriesOut. } - if (entries[i].operation == MemoryOpTypes::ORBIS_KERNEL_MAP_OP_MAP_DIRECT) { + switch (entries[i].operation) { + case MemoryOpTypes::ORBIS_KERNEL_MAP_OP_MAP_DIRECT: { result = sceKernelMapNamedDirectMemory(&entries[i].start, entries[i].length, entries[i].protection, flags, static_cast(entries[i].offset), 0, ""); - LOG_INFO( - Kernel_Vmm, - "BatchMap: entry = {}, operation = {}, len = {:#x}, offset = {:#x}, type = {}, " - "result = {}", - i, entries[i].operation, entries[i].length, entries[i].offset, (u8)entries[i].type, - result); - - if (result == 0) - processed++; - } else if (entries[i].operation == MemoryOpTypes::ORBIS_KERNEL_MAP_OP_UNMAP) { + LOG_INFO(Kernel_Vmm, + "entry = {}, operation = {}, len = {:#x}, offset = {:#x}, type = {}, " + "result = {}", + i, entries[i].operation, entries[i].length, entries[i].offset, + (u8)entries[i].type, result); + break; + } + case MemoryOpTypes::ORBIS_KERNEL_MAP_OP_UNMAP: { result = sceKernelMunmap(entries[i].start, entries[i].length); - LOG_INFO(Kernel_Vmm, "BatchMap: entry = {}, operation = {}, len = {:#x}, result = {}", - i, entries[i].operation, entries[i].length, result); - - if (result == 0) - processed++; - } else if (entries[i].operation == MemoryOpTypes::ORBIS_KERNEL_MAP_OP_MAP_FLEXIBLE) { + LOG_INFO(Kernel_Vmm, "entry = {}, operation = {}, len = {:#x}, result = {}", i, + entries[i].operation, entries[i].length, result); + break; + } + case MemoryOpTypes::ORBIS_KERNEL_MAP_OP_MAP_FLEXIBLE: { result = sceKernelMapNamedFlexibleMemory(&entries[i].start, entries[i].length, entries[i].protection, flags, ""); LOG_INFO(Kernel_Vmm, - "BatchMap: entry = {}, operation = {}, len = {:#x}, type = {}, " + "entry = {}, operation = {}, len = {:#x}, type = {}, " "result = {}", i, entries[i].operation, entries[i].length, (u8)entries[i].type, result); + break; + } + case MemoryOpTypes::ORBIS_KERNEL_MAP_OP_TYPE_PROTECT: { + // By now, ignore protection and log it instead + LOG_WARNING(Kernel_Vmm, "entry = {}, operation = {}, len = {:#x}, type = {} " + "is UNSUPPORTED and skipped"); + break; + } + default: { + UNREACHABLE(); + } + } - if (result == 0) - processed++; - } else { - UNREACHABLE_MSG("called: Unimplemented Operation = {}", entries[i].operation); + if (result != ORBIS_OK) { + break; } } if (numEntriesOut != NULL) { // can be zero. do not return an error code. From af4356bfe1c58ee596f29b17ecb79ddb3132596d Mon Sep 17 00:00:00 2001 From: psucien Date: Mon, 26 Aug 2024 23:49:36 +0200 Subject: [PATCH 29/69] shader_recompiler: fix for pattern detection in `TryDisableAnisoLod0` Also fix for forgotten log message params. --- src/core/libraries/kernel/memory_management.cpp | 6 ++++-- src/shader_recompiler/ir/passes/resource_tracking_pass.cpp | 5 +++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/src/core/libraries/kernel/memory_management.cpp b/src/core/libraries/kernel/memory_management.cpp index 05c6e6897..ab6aa3985 100644 --- a/src/core/libraries/kernel/memory_management.cpp +++ b/src/core/libraries/kernel/memory_management.cpp @@ -291,8 +291,10 @@ s32 PS4_SYSV_ABI sceKernelBatchMap2(OrbisKernelBatchMapEntry* entries, int numEn } case MemoryOpTypes::ORBIS_KERNEL_MAP_OP_TYPE_PROTECT: { // By now, ignore protection and log it instead - LOG_WARNING(Kernel_Vmm, "entry = {}, operation = {}, len = {:#x}, type = {} " - "is UNSUPPORTED and skipped"); + LOG_WARNING(Kernel_Vmm, + "entry = {}, operation = {}, len = {:#x}, type = {} " + "is UNSUPPORTED and skipped", + i, entries[i].operation, entries[i].length, (u8)entries[i].type); break; } default: { diff --git a/src/shader_recompiler/ir/passes/resource_tracking_pass.cpp b/src/shader_recompiler/ir/passes/resource_tracking_pass.cpp index ccdcfc6e6..ace6a37d8 100644 --- a/src/shader_recompiler/ir/passes/resource_tracking_pass.cpp +++ b/src/shader_recompiler/ir/passes/resource_tracking_pass.cpp @@ -293,10 +293,11 @@ std::pair TryDisableAnisoLod0(const IR::Inst* inst) { return not_found; } - // The bits range is for lods + // The bits range is for lods (note that constants are changed after constant propagation pass) const auto* prod0_arg0 = prod0->Arg(0).InstRecursive(); if (prod0_arg0->GetOpcode() != IR::Opcode::BitFieldUExtract || - prod0_arg0->Arg(1).InstRecursive()->Arg(0).U32() != 0x0008000cu) { + !(prod0_arg0->Arg(1).IsIdentity() && prod0_arg0->Arg(1).U32() == 12) || + !(prod0_arg0->Arg(2).IsIdentity() && prod0_arg0->Arg(2).U32() == 8)) { return not_found; } From 7ecc1d3be0ec13b7370b8c72c80097d2b9c482b1 Mon Sep 17 00:00:00 2001 From: SolidStateDj Date: Mon, 26 Aug 2024 18:27:31 -0400 Subject: [PATCH 30/69] Add a toggle fullscreen button Assigns F11 as the key for toggling fullscreen. --- src/sdl_window.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/sdl_window.cpp b/src/sdl_window.cpp index eec31c901..ff44e6c30 100644 --- a/src/sdl_window.cpp +++ b/src/sdl_window.cpp @@ -273,6 +273,15 @@ void WindowSDL::onKeyPress(const SDL_Event* event) { case SDLK_SPACE: button = OrbisPadButtonDataOffset::ORBIS_PAD_BUTTON_TOUCH_PAD; break; + case SDLK_F11: + if (event->type == SDL_EVENT_KEY_DOWN) { + { + SDL_WindowFlags flag = SDL_GetWindowFlags(window); + bool is_fullscreen = flag & SDL_WINDOW_FULLSCREEN; + SDL_SetWindowFullscreen(window, !is_fullscreen); + } + } + break; default: break; } From 2d354a095ae41cf58d72cf8ec88fffcd84dd4d68 Mon Sep 17 00:00:00 2001 From: Vladislav Mikhalin Date: Tue, 27 Aug 2024 09:32:42 +0300 Subject: [PATCH 31/69] AvPlayer: Handle Initialization errors --- .../avplayer/avplayer_data_streamer.h | 3 + .../avplayer/avplayer_file_streamer.cpp | 30 +++++---- .../avplayer/avplayer_file_streamer.h | 4 +- src/core/libraries/avplayer/avplayer_impl.cpp | 9 ++- .../libraries/avplayer/avplayer_source.cpp | 64 +++++++++++-------- src/core/libraries/avplayer/avplayer_source.h | 8 +-- .../libraries/avplayer/avplayer_state.cpp | 37 +++++++---- src/core/libraries/avplayer/avplayer_state.h | 6 +- 8 files changed, 95 insertions(+), 66 deletions(-) diff --git a/src/core/libraries/avplayer/avplayer_data_streamer.h b/src/core/libraries/avplayer/avplayer_data_streamer.h index 04097bb4d..319c88a91 100644 --- a/src/core/libraries/avplayer/avplayer_data_streamer.h +++ b/src/core/libraries/avplayer/avplayer_data_streamer.h @@ -7,6 +7,8 @@ #include "common/types.h" +#include + struct AVIOContext; namespace Libraries::AvPlayer { @@ -14,6 +16,7 @@ namespace Libraries::AvPlayer { class IDataStreamer { public: virtual ~IDataStreamer() = default; + virtual bool Init(std::string_view path) = 0; virtual AVIOContext* GetContext() = 0; }; diff --git a/src/core/libraries/avplayer/avplayer_file_streamer.cpp b/src/core/libraries/avplayer/avplayer_file_streamer.cpp index dc1386a47..c7bd5b5de 100644 --- a/src/core/libraries/avplayer/avplayer_file_streamer.cpp +++ b/src/core/libraries/avplayer/avplayer_file_streamer.cpp @@ -18,19 +18,8 @@ extern "C" { namespace Libraries::AvPlayer { -AvPlayerFileStreamer::AvPlayerFileStreamer(const SceAvPlayerFileReplacement& file_replacement, - std::string_view path) - : m_file_replacement(file_replacement) { - const auto ptr = m_file_replacement.object_ptr; - m_fd = m_file_replacement.open(ptr, path.data()); - ASSERT(m_fd >= 0); - m_file_size = m_file_replacement.size(ptr); - // avio_buffer is deallocated in `avio_context_free` - const auto avio_buffer = reinterpret_cast(av_malloc(AVPLAYER_AVIO_BUFFER_SIZE)); - m_avio_context = - avio_alloc_context(avio_buffer, AVPLAYER_AVIO_BUFFER_SIZE, 0, this, - &AvPlayerFileStreamer::ReadPacket, nullptr, &AvPlayerFileStreamer::Seek); -} +AvPlayerFileStreamer::AvPlayerFileStreamer(const SceAvPlayerFileReplacement& file_replacement) + : m_file_replacement(file_replacement) {} AvPlayerFileStreamer::~AvPlayerFileStreamer() { if (m_avio_context != nullptr) { @@ -43,6 +32,21 @@ AvPlayerFileStreamer::~AvPlayerFileStreamer() { } } +bool AvPlayerFileStreamer::Init(std::string_view path) { + const auto ptr = m_file_replacement.object_ptr; + m_fd = m_file_replacement.open(ptr, path.data()); + if (m_fd < 0) { + return false; + } + m_file_size = m_file_replacement.size(ptr); + // avio_buffer is deallocated in `avio_context_free` + const auto avio_buffer = reinterpret_cast(av_malloc(AVPLAYER_AVIO_BUFFER_SIZE)); + m_avio_context = + avio_alloc_context(avio_buffer, AVPLAYER_AVIO_BUFFER_SIZE, 0, this, + &AvPlayerFileStreamer::ReadPacket, nullptr, &AvPlayerFileStreamer::Seek); + return true; +} + s32 AvPlayerFileStreamer::ReadPacket(void* opaque, u8* buffer, s32 size) { const auto self = reinterpret_cast(opaque); if (self->m_position >= self->m_file_size) { diff --git a/src/core/libraries/avplayer/avplayer_file_streamer.h b/src/core/libraries/avplayer/avplayer_file_streamer.h index 658ce8c1e..034e40dd4 100644 --- a/src/core/libraries/avplayer/avplayer_file_streamer.h +++ b/src/core/libraries/avplayer/avplayer_file_streamer.h @@ -15,9 +15,11 @@ namespace Libraries::AvPlayer { class AvPlayerFileStreamer : public IDataStreamer { public: - AvPlayerFileStreamer(const SceAvPlayerFileReplacement& file_replacement, std::string_view path); + AvPlayerFileStreamer(const SceAvPlayerFileReplacement& file_replacement); ~AvPlayerFileStreamer(); + bool Init(std::string_view path) override; + AVIOContext* GetContext() override { return m_avio_context; } diff --git a/src/core/libraries/avplayer/avplayer_impl.cpp b/src/core/libraries/avplayer/avplayer_impl.cpp index cdfff8277..6de7b4c20 100644 --- a/src/core/libraries/avplayer/avplayer_impl.cpp +++ b/src/core/libraries/avplayer/avplayer_impl.cpp @@ -110,7 +110,7 @@ s32 AvPlayer::AddSource(std::string_view path) { if (path.empty()) { return ORBIS_AVPLAYER_ERROR_INVALID_PARAMS; } - if (AVPLAYER_IS_ERROR(m_state->AddSource(path, GetSourceType(path)))) { + if (!m_state->AddSource(path, GetSourceType(path))) { return ORBIS_AVPLAYER_ERROR_OPERATION_FAILED; } return ORBIS_OK; @@ -128,7 +128,7 @@ s32 AvPlayer::GetStreamCount() { } s32 AvPlayer::GetStreamInfo(u32 stream_index, SceAvPlayerStreamInfo& info) { - if (AVPLAYER_IS_ERROR(m_state->GetStreamInfo(stream_index, info))) { + if (!m_state->GetStreamInfo(stream_index, info)) { return ORBIS_AVPLAYER_ERROR_OPERATION_FAILED; } return ORBIS_OK; @@ -145,7 +145,10 @@ s32 AvPlayer::EnableStream(u32 stream_index) { } s32 AvPlayer::Start() { - return m_state->Start(); + if (!m_state->Start()) { + return ORBIS_AVPLAYER_ERROR_OPERATION_FAILED; + } + return ORBIS_OK; } bool AvPlayer::GetVideoData(SceAvPlayerFrameInfo& video_info) { diff --git a/src/core/libraries/avplayer/avplayer_source.cpp b/src/core/libraries/avplayer/avplayer_source.cpp index 2e4ea8aab..99ba2e8b6 100644 --- a/src/core/libraries/avplayer/avplayer_source.cpp +++ b/src/core/libraries/avplayer/avplayer_source.cpp @@ -24,31 +24,39 @@ namespace Libraries::AvPlayer { using namespace Kernel; -AvPlayerSource::AvPlayerSource(AvPlayerStateCallback& state, std::string_view path, - const SceAvPlayerInitData& init_data, - SceAvPlayerSourceType source_type) - : m_state(state), m_memory_replacement(init_data.memory_replacement), - m_num_output_video_framebuffers( - std::min(std::max(2, init_data.num_output_video_framebuffers), 16)) { - AVFormatContext* context = avformat_alloc_context(); - if (init_data.file_replacement.open != nullptr) { - m_up_data_streamer = - std::make_unique(init_data.file_replacement, path); - context->pb = m_up_data_streamer->GetContext(); - ASSERT(!AVPLAYER_IS_ERROR(avformat_open_input(&context, nullptr, nullptr, nullptr))); - } else { - const auto mnt = Common::Singleton::Instance(); - const auto filepath = mnt->GetHostPath(path); - ASSERT(!AVPLAYER_IS_ERROR( - avformat_open_input(&context, filepath.string().c_str(), nullptr, nullptr))); - } - m_avformat_context = AVFormatContextPtr(context, &ReleaseAVFormatContext); -} +AvPlayerSource::AvPlayerSource(AvPlayerStateCallback& state) : m_state(state) {} AvPlayerSource::~AvPlayerSource() { Stop(); } +bool AvPlayerSource::Init(const SceAvPlayerInitData& init_data, std::string_view path) { + m_memory_replacement = init_data.memory_replacement, + m_num_output_video_framebuffers = + std::min(std::max(2, init_data.num_output_video_framebuffers), 16); + + AVFormatContext* context = avformat_alloc_context(); + if (init_data.file_replacement.open != nullptr) { + m_up_data_streamer = std::make_unique(init_data.file_replacement); + if (!m_up_data_streamer->Init(path)) { + return false; + } + context->pb = m_up_data_streamer->GetContext(); + if (AVPLAYER_IS_ERROR(avformat_open_input(&context, nullptr, nullptr, nullptr))) { + return false; + } + } else { + const auto mnt = Common::Singleton::Instance(); + const auto filepath = mnt->GetHostPath(path); + if (AVPLAYER_IS_ERROR( + avformat_open_input(&context, filepath.string().c_str(), nullptr, nullptr))) { + return false; + } + } + m_avformat_context = AVFormatContextPtr(context, &ReleaseAVFormatContext); + return true; +} + bool AvPlayerSource::FindStreamInfo() { if (m_avformat_context == nullptr) { LOG_ERROR(Lib_AvPlayer, "Could not find stream info. NULL context."); @@ -87,16 +95,16 @@ static f32 AVRationalToF32(const AVRational rational) { return f32(rational.num) / rational.den; } -s32 AvPlayerSource::GetStreamInfo(u32 stream_index, SceAvPlayerStreamInfo& info) { +bool AvPlayerSource::GetStreamInfo(u32 stream_index, SceAvPlayerStreamInfo& info) { info = {}; if (m_avformat_context == nullptr || stream_index >= m_avformat_context->nb_streams) { LOG_ERROR(Lib_AvPlayer, "Could not get stream {} info.", stream_index); - return -1; + return false; } const auto p_stream = m_avformat_context->streams[stream_index]; if (p_stream == nullptr || p_stream->codecpar == nullptr) { LOG_ERROR(Lib_AvPlayer, "Could not get stream {} info. NULL stream.", stream_index); - return -1; + return false; } info.type = CodecTypeToStreamType(p_stream->codecpar->codec_type); info.start_time = p_stream->start_time; @@ -140,9 +148,9 @@ s32 AvPlayerSource::GetStreamInfo(u32 stream_index, SceAvPlayerStreamInfo& info) break; default: LOG_ERROR(Lib_AvPlayer, "Stream {} type is unknown: {}.", stream_index, info.type); - return -1; + return false; } - return 0; + return true; } bool AvPlayerSource::EnableStream(u32 stream_index) { @@ -215,12 +223,12 @@ std::optional AvPlayerSource::HasFrames(u32 num_frames) { return m_video_packets.Size() > num_frames || m_is_eof; } -s32 AvPlayerSource::Start() { +bool AvPlayerSource::Start() { std::unique_lock lock(m_state_mutex); if (m_audio_codec_context == nullptr && m_video_codec_context == nullptr) { LOG_ERROR(Lib_AvPlayer, "Could not start playback. NULL context."); - return -1; + return false; } m_demuxer_thread = std::jthread([this](std::stop_token stop) { this->DemuxerThread(stop); }); m_video_decoder_thread = @@ -228,7 +236,7 @@ s32 AvPlayerSource::Start() { m_audio_decoder_thread = std::jthread([this](std::stop_token stop) { this->AudioDecoderThread(stop); }); m_start_time = std::chrono::high_resolution_clock::now(); - return 0; + return true; } bool AvPlayerSource::Stop() { diff --git a/src/core/libraries/avplayer/avplayer_source.h b/src/core/libraries/avplayer/avplayer_source.h index 7144e7ee4..906122142 100644 --- a/src/core/libraries/avplayer/avplayer_source.h +++ b/src/core/libraries/avplayer/avplayer_source.h @@ -120,17 +120,17 @@ private: class AvPlayerSource { public: - AvPlayerSource(AvPlayerStateCallback& state, std::string_view path, - const SceAvPlayerInitData& init_data, SceAvPlayerSourceType source_type); + AvPlayerSource(AvPlayerStateCallback& state); ~AvPlayerSource(); + bool Init(const SceAvPlayerInitData& init_data, std::string_view path); bool FindStreamInfo(); s32 GetStreamCount(); - s32 GetStreamInfo(u32 stream_index, SceAvPlayerStreamInfo& info); + bool GetStreamInfo(u32 stream_index, SceAvPlayerStreamInfo& info); bool EnableStream(u32 stream_index); void SetLooping(bool is_looping); std::optional HasFrames(u32 num_frames); - s32 Start(); + bool Start(); bool Stop(); bool GetAudioData(SceAvPlayerFrameInfo& audio_info); bool GetVideoData(SceAvPlayerFrameInfo& video_info); diff --git a/src/core/libraries/avplayer/avplayer_state.cpp b/src/core/libraries/avplayer/avplayer_state.cpp index cb3be2f57..a512063f2 100644 --- a/src/core/libraries/avplayer/avplayer_state.cpp +++ b/src/core/libraries/avplayer/avplayer_state.cpp @@ -24,6 +24,7 @@ void PS4_SYSV_ABI AvPlayerState::AutoPlayEventCallback(void* opaque, s32 event_i s32 timedtext_stream_index = -1; const s32 stream_count = self->GetStreamCount(); if (AVPLAYER_IS_ERROR(stream_count)) { + self->Stop(); return; } if (stream_count == 0) { @@ -32,7 +33,10 @@ void PS4_SYSV_ABI AvPlayerState::AutoPlayEventCallback(void* opaque, s32 event_i } for (u32 stream_index = 0; stream_index < stream_count; ++stream_index) { SceAvPlayerStreamInfo info{}; - self->GetStreamInfo(stream_index, info); + if (!self->GetStreamInfo(stream_index, info)) { + self->Stop(); + return; + } const std::string_view default_language( reinterpret_cast(self->m_default_language)); @@ -116,23 +120,28 @@ AvPlayerState::~AvPlayerState() { } // Called inside GAME thread -s32 AvPlayerState::AddSource(std::string_view path, SceAvPlayerSourceType source_type) { +bool AvPlayerState::AddSource(std::string_view path, SceAvPlayerSourceType source_type) { if (path.empty()) { LOG_ERROR(Lib_AvPlayer, "File path is empty."); - return -1; + return false; } { std::unique_lock lock(m_source_mutex); if (m_up_source != nullptr) { LOG_ERROR(Lib_AvPlayer, "Only one source is supported."); - return -1; + return false; } - m_up_source = std::make_unique(*this, path, m_init_data, source_type); + m_up_source = std::make_unique(*this); + if (!m_up_source->Init(m_init_data, path)) { + SetState(AvState::Error); + m_up_source.reset(); + return false; + } } AddSourceEvent(); - return 0; + return true; } // Called inside GAME thread @@ -146,25 +155,25 @@ s32 AvPlayerState::GetStreamCount() { } // Called inside GAME thread -s32 AvPlayerState::GetStreamInfo(u32 stream_index, SceAvPlayerStreamInfo& info) { +bool AvPlayerState::GetStreamInfo(u32 stream_index, SceAvPlayerStreamInfo& info) { std::shared_lock lock(m_source_mutex); if (m_up_source == nullptr) { LOG_ERROR(Lib_AvPlayer, "Could not get stream {} info. No source.", stream_index); - return -1; + return false; } return m_up_source->GetStreamInfo(stream_index, info); } // Called inside GAME thread -s32 AvPlayerState::Start() { +bool AvPlayerState::Start() { std::shared_lock lock(m_source_mutex); - if (m_up_source == nullptr || m_up_source->Start() < 0) { + if (m_up_source == nullptr || !m_up_source->Start()) { LOG_ERROR(Lib_AvPlayer, "Could not start playback."); - return -1; + return false; } SetState(AvState::Play); OnPlaybackStateChanged(AvState::Play); - return 0; + return true; } void AvPlayerState::AvControllerThread(std::stop_token stop) { @@ -219,10 +228,10 @@ bool AvPlayerState::Stop() { if (m_up_source == nullptr || m_current_state == AvState::Stop) { return false; } - if (!SetState(AvState::Stop)) { + if (!m_up_source->Stop()) { return false; } - if (!m_up_source->Stop()) { + if (!SetState(AvState::Stop)) { return false; } OnPlaybackStateChanged(AvState::Stop); diff --git a/src/core/libraries/avplayer/avplayer_state.h b/src/core/libraries/avplayer/avplayer_state.h index ff80b6cea..a5a3bd689 100644 --- a/src/core/libraries/avplayer/avplayer_state.h +++ b/src/core/libraries/avplayer/avplayer_state.h @@ -24,11 +24,11 @@ public: AvPlayerState(const SceAvPlayerInitData& init_data); ~AvPlayerState(); - s32 AddSource(std::string_view filename, SceAvPlayerSourceType source_type); + bool AddSource(std::string_view filename, SceAvPlayerSourceType source_type); s32 GetStreamCount(); - s32 GetStreamInfo(u32 stream_index, SceAvPlayerStreamInfo& info); + bool GetStreamInfo(u32 stream_index, SceAvPlayerStreamInfo& info); bool EnableStream(u32 stream_index); - s32 Start(); + bool Start(); bool Stop(); bool GetAudioData(SceAvPlayerFrameInfo& audio_info); bool GetVideoData(SceAvPlayerFrameInfo& video_info); From 288db9a0cfe2d34041f6f1e5cc0029efa4681de5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9goire=20Hage?= <33609333+greggameplayer@users.noreply.github.com> Date: Tue, 27 Aug 2024 13:15:32 +0200 Subject: [PATCH 32/69] Implement V_LSHL_B64 (#608) --- src/shader_recompiler/frontend/translate/translate.h | 1 + .../frontend/translate/vector_alu.cpp | 12 ++++++++++++ 2 files changed, 13 insertions(+) diff --git a/src/shader_recompiler/frontend/translate/translate.h b/src/shader_recompiler/frontend/translate/translate.h index 6de5e3673..cde9e58e7 100644 --- a/src/shader_recompiler/frontend/translate/translate.h +++ b/src/shader_recompiler/frontend/translate/translate.h @@ -117,6 +117,7 @@ public: void V_AND_B32(const GcnInst& inst); void V_LSHLREV_B32(const GcnInst& inst); void V_LSHL_B32(const GcnInst& inst); + void V_LSHL_B64(const GcnInst& inst); void V_ADD_I32(const GcnInst& inst); void V_ADDC_U32(const GcnInst& inst); void V_CVT_F32_I32(const GcnInst& inst); diff --git a/src/shader_recompiler/frontend/translate/vector_alu.cpp b/src/shader_recompiler/frontend/translate/vector_alu.cpp index 99543a207..274dcff11 100644 --- a/src/shader_recompiler/frontend/translate/vector_alu.cpp +++ b/src/shader_recompiler/frontend/translate/vector_alu.cpp @@ -11,6 +11,8 @@ void Translator::EmitVectorAlu(const GcnInst& inst) { return V_LSHLREV_B32(inst); case Opcode::V_LSHL_B32: return V_LSHL_B32(inst); + case Opcode::V_LSHL_B64: + return V_LSHL_B64(inst); case Opcode::V_BFREV_B32: return V_BFREV_B32(inst); case Opcode::V_BFE_U32: @@ -390,6 +392,16 @@ void Translator::V_LSHL_B32(const GcnInst& inst) { SetDst(inst.dst[0], ir.ShiftLeftLogical(src0, ir.BitwiseAnd(src1, ir.Imm32(0x1F)))); } +void Translator::V_LSHL_B64(const GcnInst& inst) { + const IR::U64 src0{GetSrc64(inst.src[0])}; + const IR::U64 src1{GetSrc64(inst.src[1])}; + const IR::VectorReg dst_reg{inst.dst[0].code}; + ASSERT_MSG(src0.IsImmediate() && src0.U64() == 0 && src1.IsImmediate() && src1.U64() == 0, + "V_LSHL_B64 with non-zero src0 or src1 is not supported"); + ir.SetVectorReg(dst_reg, ir.Imm32(0)); + ir.SetVectorReg(dst_reg + 1, ir.Imm32(0)); +} + void Translator::V_ADD_I32(const GcnInst& inst) { const IR::U32 src0{GetSrc(inst.src[0])}; const IR::U32 src1{ir.GetVectorReg(IR::VectorReg(inst.src[1].code))}; From 59b651be07dd83217f63843a1bbfe149ea6f54e1 Mon Sep 17 00:00:00 2001 From: Lizardy <6063922+lzardy@users.noreply.github.com> Date: Tue, 27 Aug 2024 08:53:38 -0400 Subject: [PATCH 33/69] [Libs] Error Codes (#612) * ngs2: all errors w/ official names * ajm errors * gnm errors * random errors * clang * random error * linux --------- Co-authored-by: microsoftv <6063922+microsoftv@users.noreply.github.com> --- CMakeLists.txt | 3 + src/core/libraries/ajm/ajm.cpp | 5 +- src/core/libraries/ajm/ajm_error.h | 28 +++++ src/core/libraries/error_codes.h | 11 -- src/core/libraries/gnmdriver/gnm_error.h | 85 ++++++++++++++ src/core/libraries/gnmdriver/gnmdriver.cpp | 4 +- src/core/libraries/ngs2/ngs2_error.h | 124 +++++++++++++++------ src/core/libraries/ngs2/ngs2_impl.cpp | 4 +- src/core/libraries/random/random.cpp | 6 +- src/core/libraries/random/random.h | 2 +- src/core/libraries/random/random_error.h | 8 ++ 11 files changed, 230 insertions(+), 50 deletions(-) create mode 100644 src/core/libraries/ajm/ajm_error.h create mode 100644 src/core/libraries/gnmdriver/gnm_error.h create mode 100644 src/core/libraries/random/random_error.h diff --git a/CMakeLists.txt b/CMakeLists.txt index decc27b17..6450eaf15 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -152,6 +152,7 @@ set(AUDIO_LIB src/core/libraries/audio/audioin.cpp set(GNM_LIB src/core/libraries/gnmdriver/gnmdriver.cpp src/core/libraries/gnmdriver/gnmdriver.h + src/core/libraries/gnmdriver/gnm_error.h ) set(KERNEL_LIB @@ -233,6 +234,7 @@ set(SYSTEM_LIBS src/core/libraries/system/commondialog.cpp src/core/libraries/ngs2/ngs2_error.h src/core/libraries/ngs2/ngs2_impl.cpp src/core/libraries/ngs2/ngs2_impl.h + src/core/libraries/ajm/ajm_error.h ) set(VIDEOOUT_LIB src/core/libraries/videoout/buffer.h @@ -268,6 +270,7 @@ set(PLAYGO_LIB src/core/libraries/playgo/playgo.cpp set(RANDOM_LIB src/core/libraries/random/random.cpp src/core/libraries/random/random.h + src/core/libraries/random/random_error.h ) set(USBD_LIB src/core/libraries/usbd/usbd.cpp diff --git a/src/core/libraries/ajm/ajm.cpp b/src/core/libraries/ajm/ajm.cpp index d8d8304ab..441a07f63 100644 --- a/src/core/libraries/ajm/ajm.cpp +++ b/src/core/libraries/ajm/ajm.cpp @@ -1,9 +1,10 @@ // SPDX-FileCopyrightText: Copyright 2024 shadPS4 Emulator Project // SPDX-License-Identifier: GPL-2.0-or-later -// Generated By moduleGenerator +#include "ajm.h" +#include "ajm_error.h" + #include "common/logging/log.h" -#include "core/libraries/ajm/ajm.h" #include "core/libraries/error_codes.h" #include "core/libraries/libs.h" diff --git a/src/core/libraries/ajm/ajm_error.h b/src/core/libraries/ajm/ajm_error.h new file mode 100644 index 000000000..64129554f --- /dev/null +++ b/src/core/libraries/ajm/ajm_error.h @@ -0,0 +1,28 @@ +// SPDX-FileCopyrightText: Copyright 2024 shadPS4 Emulator Project +// SPDX-License-Identifier: GPL-2.0-or-later + +#pragma once + +constexpr int ORBIS_AJM_ERROR_UNKNOWN = 0x80930001; +constexpr int ORBIS_AJM_ERROR_INVALID_CONTEXT = 0x80930002; +constexpr int ORBIS_AJM_ERROR_INVALID_INSTANCE = 0x80930003; +constexpr int ORBIS_AJM_ERROR_INVALID_BATCH = 0x80930004; +constexpr int ORBIS_AJM_ERROR_INVALID_PARAMETER = 0x80930005; +constexpr int ORBIS_AJM_ERROR_OUT_OF_MEMORY = 0x80930006; +constexpr int ORBIS_AJM_ERROR_OUT_OF_RESOURCES = 0x80930007; +constexpr int ORBIS_AJM_ERROR_CODEC_NOT_SUPPORTED = 0x80930008; +constexpr int ORBIS_AJM_ERROR_CODEC_ALREADY_REGISTERED = 0x80930009; +constexpr int ORBIS_AJM_ERROR_CODEC_NOT_REGISTERED = 0x8093000A; +constexpr int ORBIS_AJM_ERROR_WRONG_REVISION_FLAG = 0x8093000B; +constexpr int ORBIS_AJM_ERROR_FLAG_NOT_SUPPORTED = 0x8093000C; +constexpr int ORBIS_AJM_ERROR_BUSY = 0x8093000D; +constexpr int ORBIS_AJM_ERROR_BAD_PRIORITY = 0x8093000E; +constexpr int ORBIS_AJM_ERROR_IN_PROGRESS = 0x8093000F; +constexpr int ORBIS_AJM_ERROR_RETRY = 0x80930010; +constexpr int ORBIS_AJM_ERROR_MALFORMED_BATCH = 0x80930011; +constexpr int ORBIS_AJM_ERROR_JOB_CREATION = 0x80930012; +constexpr int ORBIS_AJM_ERROR_INVALID_OPCODE = 0x80930013; +constexpr int ORBIS_AJM_ERROR_PRIORITY_VIOLATION = 0x80930014; +constexpr int ORBIS_AJM_ERROR_BUFFER_TOO_BIG = 0x80930015; +constexpr int ORBIS_AJM_ERROR_INVALID_ADDRESS = 0x80930016; +constexpr int ORBIS_AJM_ERROR_CANCELLED = 0x80930017; diff --git a/src/core/libraries/error_codes.h b/src/core/libraries/error_codes.h index 123edcee8..1453b0a8f 100644 --- a/src/core/libraries/error_codes.h +++ b/src/core/libraries/error_codes.h @@ -233,9 +233,6 @@ constexpr int SCE_KERNEL_ERROR_ESDKVERSION = 0x80020063; constexpr int SCE_KERNEL_ERROR_ESTART = 0x80020064; constexpr int SCE_KERNEL_ERROR_ESTOP = 0x80020065; -// libSceRandom error codes -constexpr int SCE_RANDOM_ERROR_INVALID = 0x817C0016; - // videoOut constexpr int SCE_VIDEO_OUT_ERROR_INVALID_VALUE = 0x80290001; // invalid argument constexpr int SCE_VIDEO_OUT_ERROR_INVALID_ADDRESS = 0x80290002; // invalid addresses @@ -249,14 +246,6 @@ constexpr int SCE_VIDEO_OUT_ERROR_SLOT_OCCUPIED = 0x80290010; // slot alr constexpr int SCE_VIDEO_OUT_ERROR_FLIP_QUEUE_FULL = 0x80290012; // flip queue is full constexpr int SCE_VIDEO_OUT_ERROR_INVALID_OPTION = 0x8029001A; // Invalid buffer attribute option -// GnmDriver -constexpr int ORBIS_GNM_ERROR_COMPUTEQUEUE_INVALID_PIPE_ID = 0x80D17000; -constexpr int ORBIS_GNM_ERROR_COMPUTEQUEUE_INVALID_QUEUE_ID = 0x80D17001; -constexpr int ORBIS_GNM_ERROR_COMPUTEQUEUE_INVALID_RING_BASE_ADDR = 0x80D17003; -constexpr int ORBIS_GNM_ERROR_COMPUTEQUEUE_INVALID_RING_SIZE = 0x80D17002; -constexpr int ORBIS_GNM_ERROR_COMPUTEQUEUE_INVALID_READ_PTR_ADDR = 0x80D17004; -constexpr int ORBIS_GNM_ERROR_FAILURE = 0x8EEE00FF; - // Generic constexpr int ORBIS_OK = 0x00000000; constexpr int ORBIS_FAIL = 0xFFFFFFFF; diff --git a/src/core/libraries/gnmdriver/gnm_error.h b/src/core/libraries/gnmdriver/gnm_error.h new file mode 100644 index 000000000..eab684a24 --- /dev/null +++ b/src/core/libraries/gnmdriver/gnm_error.h @@ -0,0 +1,85 @@ +// SPDX-FileCopyrightText: Copyright 2024 shadPS4 Emulator Project +// SPDX-License-Identifier: GPL-2.0-or-later + +#pragma once + +constexpr int ORBIS_GNM_ERROR_SUBMISSION_FAILED_INVALID_ARGUMENT = 0x80D11000; +constexpr int ORBIS_GNM_ERROR_SUBMISSION_NOT_ENOUGH_RESOURCES = 0x80D11001; +constexpr int ORBIS_GNM_ERROR_SUBMISSION_AND_FLIP_FAILED_INVALID_COMMAND_BUFFER = 0x80D11080; +constexpr int ORBIS_GNM_ERROR_SUBMISSION_AND_FLIP_FAILED_INVALID_QUEUE_FULL = 0x80D11081; +constexpr int ORBIS_GNM_ERROR_SUBMISSION_AND_FLIP_FAILED_REQUEST_FAILED = 0x80D11082; +constexpr int ORBIS_GNM_ERROR_SUBMISSION_FAILED_INTERNAL_ERROR = 0x80D110FF; +constexpr int ORBIS_GNM_ERROR_VALIDATION_WARNING = 0x80D12000; +constexpr int ORBIS_GNM_ERROR_VALIDATION_WARNING_RWBUFFER_ROTYPE = 0x80D12001; +constexpr int ORBIS_GNM_ERROR_VALIDATION_WARNING_BLENDING = 0x80D12002; +constexpr int ORBIS_GNM_ERROR_VALIDATION_WARNING_DRAW_CU_MASK = 0x80D12003; +constexpr int ORBIS_GNM_ERROR_VALIDATION_WARNING_MRT_SETUP = 0x80D12004; +constexpr int ORBIS_GNM_ERROR_VALIDATION_WARNING_DEPTH_RT_SETUP = 0x80D12005; +constexpr int ORBIS_GNM_ERROR_VALIDATION_WARNING_PS_AND_MRT_FORMAT = 0x80D1200F; +constexpr int ORBIS_GNM_ERROR_VALIDATION_ERROR = 0x80D13000; +constexpr int ORBIS_GNM_ERROR_VALIDATION_VSHARP = 0x80D13001; +constexpr int ORBIS_GNM_ERROR_VALIDATION_TSHARP = 0x80D13002; +constexpr int ORBIS_GNM_ERROR_VALIDATION_RESOURCE = 0x80D13003; +constexpr int ORBIS_GNM_ERROR_VALIDATION_TABLE_MEMORY = 0x80D13004; +constexpr int ORBIS_GNM_ERROR_VALIDATION_WRITE_EVENT_OP = 0x80D13005; +constexpr int ORBIS_GNM_ERROR_VALIDATION_INDEX_BUFFER = 0x80D13006; +constexpr int ORBIS_GNM_ERROR_VALIDATION_TESS_FACTOR_BUFFER = 0x80D13007; +constexpr int ORBIS_GNM_ERROR_VALIDATION_SCRATCH_RING = 0x80D13008; +constexpr int ORBIS_GNM_ERROR_VALIDATION_PRIMITIVE_TYPE = 0x80D13009; +constexpr int ORBIS_GNM_ERROR_VALIDATION_INDEX_SIZE = 0x80D1300A; +constexpr int ORBIS_GNM_ERROR_VALIDATION_INLINE_DRAW_SIZE = 0x80D1300B; +constexpr int ORBIS_GNM_ERROR_VALIDATION_NUM_INPUT_PATCHES = 0x80D1300C; +constexpr int ORBIS_GNM_ERROR_VALIDATION_GS_MODE = 0x80D1300D; +constexpr int ORBIS_GNM_ERROR_VALIDATION_SHADER_ADDRESS = 0x80D1300E; +constexpr int ORBIS_GNM_ERROR_VALIDATION_BORDER_COLOR_TABLE = 0x80D1300F; +constexpr int ORBIS_GNM_ERROR_VALIDATION_SSHARP = 0x80D13010; +constexpr int ORBIS_GNM_ERROR_VALIDATION_DISPATCH_DRAW = 0x80D13011; +constexpr int ORBIS_GNM_ERROR_VALIDATION_ACTIVE_SHADER_STAGE = 0x80D13012; +constexpr int ORBIS_GNM_ERROR_VALIDATION_DCB = 0x80D13013; +constexpr int ORBIS_GNM_ERROR_VALIDATION_MISMATCH_SHADER_STAGE = 0x80D13014; +constexpr int ORBIS_GNM_ERROR_VALIDATION_MRT_SETUP = 0x80D13015; +constexpr int ORBIS_GNM_ERROR_VALIDATION_BAD_OP_CODE = 0x80D13016; +constexpr int ORBIS_GNM_ERROR_VALIDATION_DEPTH_RT_SETUP = 0x80D13017; +constexpr int ORBIS_GNM_ERROR_VALIDATION_NUM_INSTANCES = 0x80D13018; +constexpr int ORBIS_GNM_ERROR_VALIDATION_SRT = 0x80D13019; +constexpr int ORBIS_GNM_ERROR_VALIDATION_INVALID_ARGUMENT = 0x80D13FFD; +constexpr int ORBIS_GNM_ERROR_VALIDATION_FAILED_INTERNAL_ERROR = 0x80D13FFE; +constexpr int ORBIS_GNM_ERROR_VALIDATION_NOT_ENABLED = 0x80D13FFF; +constexpr int ORBIS_GNM_ERROR_CAPTURE_FILE_IO = 0x80D15000; +constexpr int ORBIS_GNM_ERROR_CAPTURE_RAZOR_NOT_LOADED = 0x80D15001; +constexpr int ORBIS_GNM_ERROR_CAPTURE_NOTHING_TO_CAPTURE = 0x80D15002; +constexpr int ORBIS_GNM_ERROR_CAPTURE_FAILED_INTERNAL = 0x80D1500F; +constexpr int ORBIS_GNM_ERROR_COMPUTEQUEUE_INVALID_PIPE_ID = 0x80D17000; +constexpr int ORBIS_GNM_ERROR_COMPUTEQUEUE_INVALID_QUEUE_ID = 0x80D17001; +constexpr int ORBIS_GNM_ERROR_COMPUTEQUEUE_INVALID_RING_SIZE = 0x80D17002; +constexpr int ORBIS_GNM_ERROR_COMPUTEQUEUE_INVALID_RING_BASE_ADDR = 0x80D17003; +constexpr int ORBIS_GNM_ERROR_COMPUTEQUEUE_INVALID_READ_PTR_ADDR = 0x80D17004; +constexpr int ORBIS_GNM_ERROR_COMPUTEQUEUE_INVALID_PIPE_PRIORITY = 0x80D17005; +constexpr int ORBIS_GNM_ERROR_COMPUTEQUEUE_INTERNAL = 0x80D170FF; +constexpr int ORBIS_GNM_ERROR_RESOURCE_REGISTRATION_INVALID_ARGUMENT = 0x80D19000; +constexpr int ORBIS_GNM_ERROR_RESOURCE_REGISTRATION_INVALID_SHADER = 0x80D19001; +constexpr int ORBIS_GNM_ERROR_RESOURCE_REGISTRATION_STALE_HANDLE = 0x80D19002; +constexpr int ORBIS_GNM_ERROR_RESOURCE_REGISTRATION_FULL = 0x80D19003; +constexpr int ORBIS_GNM_ERROR_RESOURCE_REGISTRATION_NOT_PERMITTED = 0x80D19004; +constexpr int ORBIS_GNM_ERROR_RESOURCE_REGISTRATION_OUTPUT_ARGUMENT_IS_NULL = 0x80D19005; +constexpr int ORBIS_GNM_ERROR_RESOURCE_REGISTRATION_OWNER_HANDLE_INVALID = 0x80D19006; +constexpr int ORBIS_GNM_ERROR_RESOURCE_REGISTRATION_RESOURCE_HANDLE_INVALID = 0x80D19007; +constexpr int ORBIS_GNM_ERROR_RESOURCE_REGISTRATION_RESOURCE_TYPE_INVALID = 0x80D19008; +constexpr int ORBIS_GNM_ERROR_RESOURCE_REGISTRATION_GDS_RESOURCE_TYPE_INVALID = 0x80D19009; +constexpr int ORBIS_GNM_ERROR_RESOURCE_REGISTRATION_RESOURCE_SIZE_INVALID = 0x80D1900A; +constexpr int ORBIS_GNM_ERROR_RESOURCE_REGISTRATION_RESOURCE_ADDRESS_IS_NULL = 0x80D1900B; +constexpr int ORBIS_GNM_ERROR_RESOURCE_REGISTRATION_GDS_OFFSET_INVALID = 0x80D1900C; +constexpr int ORBIS_GNM_ERROR_RESOURCE_REGISTRATION_RESOURCE_NAME_IS_NULL = 0x80D1900D; +constexpr int ORBIS_GNM_ERROR_RESOURCE_REGISTRATION_OWNER_NAME_IS_NULL = 0x80D1900E; +constexpr int ORBIS_GNM_ERROR_RESOURCE_REGISTRATION_FIND_CALLBACK_IS_NULL = 0x80D1900F; +constexpr int ORBIS_GNM_ERROR_RESOURCE_REGISTRATION_RESOURCE_IS_NOT_SHADER = 0x80D19010; +constexpr int ORBIS_GNM_ERROR_RESOURCE_REGISTRATION_USER_MEMORY_PARAM_IS_NULL = 0x80D19011; +constexpr int ORBIS_GNM_ERROR_RESOURCE_REGISTRATION_USER_MEMORY_PARAM_NOT_ALIGNED = 0x80D19012; +constexpr int ORBIS_GNM_ERROR_RESOURCE_REGISTRATION_INVALID_NAME_LENGTH_PARAM = 0x80D19013; +constexpr int ORBIS_GNM_ERROR_RESOURCE_REGISTRATION_INVALID_SIZE_PARAM = 0x80D19014; +constexpr int ORBIS_GNM_ERROR_RESOURCE_REGISTRATION_INVALID_NUM_RESOURCES_PARAM = 0x80D19015; +constexpr int ORBIS_GNM_ERROR_RESOURCE_REGISTRATION_INTERNAL = 0x80D19FFF; +constexpr int ORBIS_GNM_ERROR_GET_GPU_INFO_PARAMETER_NULL = 0x80D1B000; +constexpr int ORBIS_GNM_ERROR_GET_GPU_INFO_FAILED = 0x80D1B001; +constexpr int ORBIS_GNM_ERROR_GET_GPU_INFO_PARAMETER_INVALID = 0x80D1B002; +constexpr int ORBIS_GNM_ERROR_FAILURE = 0x8EEE00FF; diff --git a/src/core/libraries/gnmdriver/gnmdriver.cpp b/src/core/libraries/gnmdriver/gnmdriver.cpp index 95821a03b..6b8b070b8 100644 --- a/src/core/libraries/gnmdriver/gnmdriver.cpp +++ b/src/core/libraries/gnmdriver/gnmdriver.cpp @@ -1,6 +1,9 @@ // SPDX-FileCopyrightText: Copyright 2024 shadPS4 Emulator Project // SPDX-License-Identifier: GPL-2.0-or-later +#include "gnm_error.h" +#include "gnmdriver.h" + #include "common/assert.h" #include "common/config.h" #include "common/debug.h" @@ -9,7 +12,6 @@ #include "common/slot_vector.h" #include "core/address_space.h" #include "core/libraries/error_codes.h" -#include "core/libraries/gnmdriver/gnmdriver.h" #include "core/libraries/kernel/libkernel.h" #include "core/libraries/libs.h" #include "core/libraries/videoout/video_out.h" diff --git a/src/core/libraries/ngs2/ngs2_error.h b/src/core/libraries/ngs2/ngs2_error.h index 254ae26e6..2773168e2 100644 --- a/src/core/libraries/ngs2/ngs2_error.h +++ b/src/core/libraries/ngs2/ngs2_error.h @@ -3,54 +3,116 @@ #pragma once -constexpr int ORBIS_NGS2_ERROR_INVALID_PARAMETERS = 0x804A0001; -constexpr int ORBIS_NGS2_ERROR_INVALID_MAXIMUM_GRAIN_SAMPLES = 0x804A0050; -constexpr int ORBIS_NGS2_ERROR_INVALID_GRAIN_SAMPLES = 0x804A0051; -constexpr int ORBIS_NGS2_ERROR_INVALID_CHANNELS = 0x804A0052; -constexpr int ORBIS_NGS2_ERROR_INVALD_ADDRESS = 0x804A0053; -constexpr int ORBIS_NGS2_ERROR_INVALD_SIZE = 0x804A0054; +constexpr int ORBIS_NGS2_ERROR_FAIL = 0x804A0001; +constexpr int ORBIS_NGS2_ERROR_INVALID_MAX_GRAIN_SAMPLES = 0x804A0050; +constexpr int ORBIS_NGS2_ERROR_INVALID_NUM_GRAIN_SAMPLES = 0x804A0051; +constexpr int ORBIS_NGS2_ERROR_INVALID_NUM_CHANNELS = 0x804A0052; +constexpr int ORBIS_NGS2_ERROR_INVALID_OUT_ADDRESS = 0x804A0053; +constexpr int ORBIS_NGS2_ERROR_INVALID_OUT_SIZE = 0x804A0054; +constexpr int ORBIS_NGS2_ERROR_INVALID_OPTION_ADDRESS = 0x804A0080; constexpr int ORBIS_NGS2_ERROR_INVALID_OPTION_SIZE = 0x804A0081; -constexpr int ORBIS_NGS2_ERROR_INVALID_RACK_OPTION_MAX_MATRICES = 0x804A0100; -constexpr int ORBIS_NGS2_ERROR_INVALID_RACK_OPTION_MAX_PORTS = 0x804A0101; -constexpr int ORBIS_NGS2_ERROR_INVALID_RACK_OPTION_MAX_INPUT_DELAY_BLOCKS = 0x804A0102; -constexpr int ORBIS_NGS2_ERROR_INVALID_MATRIX_LEVELS = 0x804A0150; -constexpr int ORBIS_NGS2_ERROR_SAMPLER_WAVEFORM_TERMINATED = 0x804A0151; -constexpr int ORBIS_NGS2_ERROR_INVALID_ENVELOPE_POINTS = 0x804A0152; +constexpr int ORBIS_NGS2_ERROR_INVALID_OPTION_FLAG = 0x804A0082; +constexpr int ORBIS_NGS2_ERROR_INVALID_MAX_MATRICES = 0x804A0100; +constexpr int ORBIS_NGS2_ERROR_INVALID_MAX_PORTS = 0x804A0101; +constexpr int ORBIS_NGS2_ERROR_INVALID_MAX_INPUT_DELAY_BLOCKS = 0x804A0102; +constexpr int ORBIS_NGS2_ERROR_INVALID_MAX_VOICES = 0x804A0103; +constexpr int ORBIS_NGS2_ERROR_INVALID_MAX_CHANNELS = 0x804A0104; +constexpr int ORBIS_NGS2_ERROR_INVALID_MAX_CHANNEL_WORKS = 0x804A0105; +constexpr int ORBIS_NGS2_ERROR_INVALID_MAX_WAVEFORM_BLOCKS = 0x804A0106; +constexpr int ORBIS_NGS2_ERROR_INVALID_MAX_ENVELOPE_POINTS = 0x804A0107; +constexpr int ORBIS_NGS2_ERROR_INVALID_MAX_FILTERS = 0x804A0108; +constexpr int ORBIS_NGS2_ERROR_INVALID_MAX_CODEC_CACHES = 0x804A0109; +constexpr int ORBIS_NGS2_ERROR_INVALID_MAX_ATRAC9_DECODERS = 0x804A010A; +constexpr int ORBIS_NGS2_ERROR_INVALID_MAX_ATRAC9_CHANNEL_WORKS = 0x804A010B; +constexpr int ORBIS_NGS2_ERROR_INVALID_MAX_INPUTS = 0x804A010C; +constexpr int ORBIS_NGS2_ERROR_INVALID_NUM_MATRIX_LEVELS = 0x804A0150; +constexpr int ORBIS_NGS2_ERROR_INVALID_NUM_WAVEFORM_BLOCKS = 0x804A0151; +constexpr int ORBIS_NGS2_ERROR_INVALID_NUM_ENVELOPE_POINTS = 0x804A0152; constexpr int ORBIS_NGS2_ERROR_INVALID_MATRIX_LEVEL_ADDRESS = 0x804A0153; -constexpr int ORBIS_NGS2_ERROR_INVALID_SAMPLER_WAVEFORM_BLOCK_ADDRESS = 0x804A0154; +constexpr int ORBIS_NGS2_ERROR_INVALID_WAVEFORM_BLOCK_ADDRESS = 0x804A0154; constexpr int ORBIS_NGS2_ERROR_INVALID_ENVELOPE_POINT_ADDRESS = 0x804A0155; +constexpr int ORBIS_NGS2_ERROR_INVALID_NUM_PEAKMETER_BLOCKS = 0x804A0156; constexpr int ORBIS_NGS2_ERROR_INVALID_HANDLE = 0x804A0200; constexpr int ORBIS_NGS2_ERROR_INVALID_SAMPLE_RATE = 0x804A0201; +constexpr int ORBIS_NGS2_ERROR_INVALID_REPORT_TYPE = 0x804A0202; +constexpr int ORBIS_NGS2_ERROR_INVALID_REPORT_HANDLER = 0x804A0203; constexpr int ORBIS_NGS2_ERROR_INVALID_REPORT_HANDLE = 0x804A0204; +constexpr int ORBIS_NGS2_ERROR_EMPTY_REPORT_HANDLE = 0x804A0205; constexpr int ORBIS_NGS2_ERROR_INVALID_BUFFER_INFO = 0x804A0206; constexpr int ORBIS_NGS2_ERROR_INVALID_BUFFER_ADDRESS = 0x804A0207; -constexpr int ORBIS_NGS2_ERROR_INVALID_BUFFER_ALIGNMENT = 0x804A0208; +constexpr int ORBIS_NGS2_ERROR_INVALID_BUFFER_ALIGN = 0x804A0208; constexpr int ORBIS_NGS2_ERROR_INVALID_BUFFER_SIZE = 0x804A0209; constexpr int ORBIS_NGS2_ERROR_INVALID_BUFFER_ALLOCATOR = 0x804A020A; -constexpr int ORBIS_NGS2_ERROR_BUFFER_VERIFY_FAILED = 0x804A020B; -constexpr int ORBIS_NGS2_ERROR_MODULE_PLAYER_DATA_EMPTY = 0x804A020C; +constexpr int ORBIS_NGS2_ERROR_BUFFER_BROKEN = 0x804A020B; +constexpr int ORBIS_NGS2_ERROR_EMPTY_BUFFER = 0x804A020C; constexpr int ORBIS_NGS2_ERROR_INVALID_SYSTEM_HANDLE = 0x804A0230; constexpr int ORBIS_NGS2_ERROR_INVALID_RACK_ID = 0x804A0260; constexpr int ORBIS_NGS2_ERROR_INVALID_RACK_HANDLE = 0x804A0261; constexpr int ORBIS_NGS2_ERROR_INVALID_VOICE_HANDLE = 0x804A0300; +constexpr int ORBIS_NGS2_ERROR_UNINIT_VOICE = 0x804A0301; constexpr int ORBIS_NGS2_ERROR_INVALID_VOICE_INDEX = 0x804A0302; -constexpr int ORBIS_NGS2_ERROR_INVALID_VOICE_EVENT = 0x804A0303; -constexpr int ORBIS_NGS2_ERROR_INVALID_VOICE_PORT_INDEX = 0x804A0304; -constexpr int ORBIS_NGS2_ERROR_INVALID_VOICE_INPUT_OR_RACK_OCCUPIED = 0x804A0305; -constexpr int ORBIS_NGS2_ERROR_INVALID_CONTROL_ID = 0x804A0308; -constexpr int ORBIS_NGS2_ERROR_INVALID_VOICE_CONTROL_PARAMETER = 0x804A0309; -constexpr int ORBIS_NGS2_ERROR_INVALID_PARAMETER_SIZE = 0x804A030A; +constexpr int ORBIS_NGS2_ERROR_INVALID_EVENT_TYPE = 0x804A0303; +constexpr int ORBIS_NGS2_ERROR_INVALID_PORT_INDEX = 0x804A0304; +constexpr int ORBIS_NGS2_ERROR_INVALID_PATCH = 0x804A0305; +constexpr int ORBIS_NGS2_ERROR_EMPTY_CHANNEL_WORK = 0x804A0306; +constexpr int ORBIS_NGS2_ERROR_EMPTY_CODEC_DECODER = 0x804A0307; +constexpr int ORBIS_NGS2_ERROR_INVALID_VOICE_CONTROL_ID = 0x804A0308; +constexpr int ORBIS_NGS2_ERROR_INVALID_VOICE_CONTROL_ADDRESS = 0x804A0309; +constexpr int ORBIS_NGS2_ERROR_INVALID_VOICE_CONTROL_SIZE = 0x804A030A; constexpr int ORBIS_NGS2_ERROR_DETECTED_CIRCULAR_VOICE_CONTROL = 0x804A030B; -constexpr int ORBIS_NGS2_ERROR_INVALID_SAMPLER_WAVEFORM_DATA = 0x804A0400; -constexpr int ORBIS_NGS2_ERROR_INVALID_SAMPLER_WAVEFORM_FORMAT = 0x804A0401; -constexpr int ORBIS_NGS2_ERROR_INVALID_SAMPLER_WAVEFORM_TYPE_NO_ATRAC9_DECODERS = 0x804A0402; -constexpr int ORBIS_NGS2_ERROR_INVALID_SAMPLER_ATRAC9_CONFIG_DATA = 0x804A0403; -constexpr int ORBIS_NGS2_ERROR_INVALID_SAMPLER_WAVEFORM_SAMPLE_RATE = 0x804A0404; -constexpr int ORBIS_NGS2_ERROR_INVALID_SAMPLER_WAVEFORM_FRAME = 0x804A0405; -constexpr int ORBIS_NGS2_ERROR_INVALID_SAMPLER_WAVEFORM_ADDRESS = 0x804A0406; +constexpr int ORBIS_NGS2_ERROR_UNABLE_CALLBACK = 0x804A030C; +constexpr int ORBIS_NGS2_ERROR_INVALID_CALLBACK_FLAG = 0x804A030D; +constexpr int ORBIS_NGS2_ERROR_INVALID_CALLBACK_HANDLER = 0x804A030E; +constexpr int ORBIS_NGS2_ERROR_INVALID_OPERATION = 0x804A030F; +constexpr int ORBIS_NGS2_ERROR_INVALID_WAVEFORM_FORMAT = 0x804A0400; +constexpr int ORBIS_NGS2_ERROR_UNKNOWN_WAVEFORM_FORMAT = 0x804A0401; +constexpr int ORBIS_NGS2_ERROR_INVALID_WAVEFORM_TYPE = 0x804A0402; +constexpr int ORBIS_NGS2_ERROR_INVALID_WAVEFORM_CONFIG = 0x804A0403; +constexpr int ORBIS_NGS2_ERROR_INVALID_WAVEFORM_SAMPLE_RATE = 0x804A0404; +constexpr int ORBIS_NGS2_ERROR_INVALID_WAVEFORM_FRAME = 0x804A0405; +constexpr int ORBIS_NGS2_ERROR_INVALID_WAVEFORM_ADDRESS = 0x804A0406; +constexpr int ORBIS_NGS2_ERROR_INVALID_WAVEFORM_SIZE = 0x804A0407; +constexpr int ORBIS_NGS2_ERROR_INVALID_WAVEFORM_DATA = 0x804A0408; +constexpr int ORBIS_NGS2_ERROR_INVALID_WAVEFORM_BLOCK_NUM_REPEATS = 0x804A0409; constexpr int ORBIS_NGS2_ERROR_INVALID_ENVELOPE_CURVE = 0x804A0500; +constexpr int ORBIS_NGS2_ERROR_INVALID_PEAKMETER_FLAG = 0x804A0510; +constexpr int ORBIS_NGS2_ERROR_INVALID_MAX_CHORUS_PHASES = 0x804A0520; +constexpr int ORBIS_NGS2_ERROR_INVALID_NUM_CHORUS_PHASES = 0x804A0521; +constexpr int ORBIS_NGS2_ERROR_INVALID_MAX_DELAY_LENGTH = 0x804A0530; +constexpr int ORBIS_NGS2_ERROR_INVALID_MAX_DELAY_TAPS = 0x804A0531; +constexpr int ORBIS_NGS2_ERROR_INVALID_DELAY_TYPE = 0x804A0532; +constexpr int ORBIS_NGS2_ERROR_INVALID_NUM_DELAY_TAPS = 0x804A0533; +constexpr int ORBIS_NGS2_ERROR_INVALID_DELAY_TAP_INFO = 0x804A0534; +constexpr int ORBIS_NGS2_ERROR_INVALID_PITCH_SHIFT_QUALITY = 0x804A0540; constexpr int ORBIS_NGS2_ERROR_INVALID_FILTER_INDEX = 0x804A0600; constexpr int ORBIS_NGS2_ERROR_INVALID_FILTER_TYPE = 0x804A0601; constexpr int ORBIS_NGS2_ERROR_INVALID_FILTER_LOCATION = 0x804A0602; -constexpr int ORBIS_NGS2_ERROR_INVALID_LFE_CUT_OFF_FREQUENCY = 0x804A0603; -constexpr int ORBIS_NGS2_ERROR_INVALID_MATRIX_INDEX_OR_TYPE = 0x804A0700; \ No newline at end of file +constexpr int ORBIS_NGS2_ERROR_INVALID_LFE_FC = 0x804A0603; +constexpr int ORBIS_NGS2_ERROR_INVALID_USER_FX_PARAM_SIZE = 0x804A0650; +constexpr int ORBIS_NGS2_ERROR_INVALID_MATRIX_INDEX = 0x804A0700; +constexpr int ORBIS_NGS2_ERROR_CODEC_UNKNOWN_WAVEFORM = 0x804A0800; +constexpr int ORBIS_NGS2_ERROR_CODEC_EMPTY_INSTANCE = 0x804A0801; +constexpr int ORBIS_NGS2_ERROR_CODEC_EMPTY_CHANNEL = 0x804A0802; +constexpr int ORBIS_NGS2_ERROR_CODEC_SETUP_FAIL = 0x804A0803; +constexpr int ORBIS_NGS2_ERROR_CODEC_RESET_FAIL = 0x804A0804; +constexpr int ORBIS_NGS2_ERROR_CODEC_DECODE_FAIL = 0x804A0805; +constexpr int ORBIS_NGS2_ERROR_INVALID_REVERB_SIZE = 0x804A0900; +constexpr int ORBIS_NGS2_ERROR_INVALID_PAN_UNIT_ANGLE = 0x804A0910; +constexpr int ORBIS_NGS2_ERROR_INVALID_PAN_SPEAKER = 0x804A0911; +constexpr int ORBIS_NGS2_ERROR_INVALID_PAN_MATRIX_FORMAT = 0x804A0912; +constexpr int ORBIS_NGS2_ERROR_INVALID_PAN_WORK = 0x804A0913; +constexpr int ORBIS_NGS2_ERROR_INVALID_PAN_PARAM = 0x804A0914; +constexpr int ORBIS_NGS2_ERROR_INVALID_GEOM_DISTANCE = 0x804A0920; +constexpr int ORBIS_NGS2_ERROR_INVALID_GEOM_LISTENER_ADDRESS = 0x804A0921; +constexpr int ORBIS_NGS2_ERROR_INVALID_GEOM_SOURCE_ADDRESS = 0x804A0922; +constexpr int ORBIS_NGS2_ERROR_INVALID_GEOM_FLAG = 0x804A0923; +constexpr int ORBIS_NGS2_ERROR_INVALID_GEOM_CONE = 0x804A0924; +constexpr int ORBIS_NGS2_ERROR_INVALID_MODULE_ID = 0x804A0A00; +constexpr int ORBIS_NGS2_ERROR_INVALID_NUM_MODULES = 0x804A0A01; +constexpr int ORBIS_NGS2_ERROR_INVALID_NUM_MODULE_BUFFERS = 0x804A0A02; +constexpr int ORBIS_NGS2_ERROR_INVALID_MODULE_BUFFER_ID = 0x804A0A03; +constexpr int ORBIS_NGS2_ERROR_INVALID_MODULE_STATE_OFFSET = 0x804A0A04; +constexpr int ORBIS_NGS2_ERROR_INVALID_MODULE_STATE_SIZE = 0x804A0A05; +constexpr int ORBIS_NGS2_ERROR_INVALID_VOICE_STATE_SIZE = 0x804A0A06; +constexpr int ORBIS_NGS2_ERROR_INVALID_MODULE_INDEX = 0x804A0B00; +constexpr int ORBIS_NGS2_ERROR_INVALID_MODULE_INFO_SIZE = 0x804A0B01; \ No newline at end of file diff --git a/src/core/libraries/ngs2/ngs2_impl.cpp b/src/core/libraries/ngs2/ngs2_impl.cpp index 50c62f5e4..793435d83 100644 --- a/src/core/libraries/ngs2/ngs2_impl.cpp +++ b/src/core/libraries/ngs2/ngs2_impl.cpp @@ -138,13 +138,13 @@ s32 Ngs2::SystemSetupCore(StackBuffer* buf, SystemOptions* options, Ngs2Handle** // Validate maxGrainSamples if (maxGrainSamples < 64 || maxGrainSamples > 1024 || (maxGrainSamples & 0x3F) != 0) { LOG_ERROR(Lib_Ngs2, "Invalid system option (maxGrainSamples={},x64)", maxGrainSamples); - return ORBIS_NGS2_ERROR_INVALID_MAXIMUM_GRAIN_SAMPLES; + return ORBIS_NGS2_ERROR_INVALID_MAX_GRAIN_SAMPLES; } // Validate numGrainSamples if (numGrainSamples < 64 || numGrainSamples > 1024 || (numGrainSamples & 0x3F) != 0) { LOG_ERROR(Lib_Ngs2, "Invalid system option (numGrainSamples={},x64)", numGrainSamples); - return ORBIS_NGS2_ERROR_INVALID_GRAIN_SAMPLES; + return ORBIS_NGS2_ERROR_INVALID_NUM_GRAIN_SAMPLES; } // Validate sampleRate diff --git a/src/core/libraries/random/random.cpp b/src/core/libraries/random/random.cpp index 8147c5183..f7cc3fd2c 100644 --- a/src/core/libraries/random/random.cpp +++ b/src/core/libraries/random/random.cpp @@ -1,14 +1,16 @@ // SPDX-FileCopyrightText: Copyright 2024 shadPS4 Emulator Project // SPDX-License-Identifier: GPL-2.0-or-later +#include "random.h" +#include "random_error.h" + #include "common/logging/log.h" #include "core/libraries/error_codes.h" #include "core/libraries/libs.h" -#include "random.h" namespace Libraries::Random { -s32 PS4_SYSV_ABI sceRandomGetRandomNumber(u8* buf, size_t size) { +s32 PS4_SYSV_ABI sceRandomGetRandomNumber(u8* buf, std::size_t size) { LOG_TRACE(Lib_Random, "called"); if (size > SCE_RANDOM_MAX_SIZE) { return SCE_RANDOM_ERROR_INVALID; diff --git a/src/core/libraries/random/random.h b/src/core/libraries/random/random.h index b5f87f877..7bb41f016 100644 --- a/src/core/libraries/random/random.h +++ b/src/core/libraries/random/random.h @@ -11,7 +11,7 @@ class SymbolsResolver; namespace Libraries::Random { constexpr int32_t SCE_RANDOM_MAX_SIZE = 64; -s32 PS4_SYSV_ABI sceRandomGetRandomNumber(u8* buf, size_t size); +s32 PS4_SYSV_ABI sceRandomGetRandomNumber(u8* buf, std::size_t size); void RegisterlibSceRandom(Core::Loader::SymbolsResolver* sym); } // namespace Libraries::Random \ No newline at end of file diff --git a/src/core/libraries/random/random_error.h b/src/core/libraries/random/random_error.h new file mode 100644 index 000000000..772316ae5 --- /dev/null +++ b/src/core/libraries/random/random_error.h @@ -0,0 +1,8 @@ +// SPDX-FileCopyrightText: Copyright 2024 shadPS4 Emulator Project +// SPDX-License-Identifier: GPL-2.0-or-later + +#pragma once + +constexpr int SCE_RANDOM_ERROR_INVALID = 0x817C0016; +constexpr int SCE_RANDOM_ERROR_OUT_OF_RESOURCES = 0x817C001C; +constexpr int SCE_RANDOM_ERROR_FATAL = 0x817C00FF; \ No newline at end of file From 371d1d009aa936d9c3d7b022e616714f2ae762be Mon Sep 17 00:00:00 2001 From: psucien Date: Tue, 27 Aug 2024 19:17:23 +0200 Subject: [PATCH 34/69] Added missing headers and 2D MSAA image type --- src/shader_recompiler/frontend/structured_control_flow.cpp | 1 + src/video_core/buffer_cache/buffer.h | 1 + src/video_core/texture_cache/image_info.cpp | 1 + src/video_core/texture_cache/image_view.cpp | 1 + 4 files changed, 4 insertions(+) diff --git a/src/shader_recompiler/frontend/structured_control_flow.cpp b/src/shader_recompiler/frontend/structured_control_flow.cpp index b50205d46..fefc623fc 100644 --- a/src/shader_recompiler/frontend/structured_control_flow.cpp +++ b/src/shader_recompiler/frontend/structured_control_flow.cpp @@ -3,6 +3,7 @@ #include #include +#include #include #include #include diff --git a/src/video_core/buffer_cache/buffer.h b/src/video_core/buffer_cache/buffer.h index 5c64ba65e..87293c768 100644 --- a/src/video_core/buffer_cache/buffer.h +++ b/src/video_core/buffer_cache/buffer.h @@ -4,6 +4,7 @@ #pragma once #include +#include #include #include #include "common/types.h" diff --git a/src/video_core/texture_cache/image_info.cpp b/src/video_core/texture_cache/image_info.cpp index a073d046e..4ac4aee8f 100644 --- a/src/video_core/texture_cache/image_info.cpp +++ b/src/video_core/texture_cache/image_info.cpp @@ -34,6 +34,7 @@ static vk::ImageType ConvertImageType(AmdGpu::ImageType type) noexcept { case AmdGpu::ImageType::Color1DArray: return vk::ImageType::e1D; case AmdGpu::ImageType::Color2D: + case AmdGpu::ImageType::Color2DMsaa: case AmdGpu::ImageType::Cube: case AmdGpu::ImageType::Color2DArray: return vk::ImageType::e2D; diff --git a/src/video_core/texture_cache/image_view.cpp b/src/video_core/texture_cache/image_view.cpp index 08be6bdc5..00c3833fe 100644 --- a/src/video_core/texture_cache/image_view.cpp +++ b/src/video_core/texture_cache/image_view.cpp @@ -17,6 +17,7 @@ vk::ImageViewType ConvertImageViewType(AmdGpu::ImageType type) { case AmdGpu::ImageType::Color1DArray: return vk::ImageViewType::e1DArray; case AmdGpu::ImageType::Color2D: + case AmdGpu::ImageType::Color2DMsaa: return vk::ImageViewType::e2D; case AmdGpu::ImageType::Cube: return vk::ImageViewType::eCube; From 3eb47226d99d49f8750238b085d5b11adfe6f963 Mon Sep 17 00:00:00 2001 From: psucien Date: Tue, 27 Aug 2024 22:24:26 +0200 Subject: [PATCH 35/69] libraries: kernel: fix `scePthreadMutexattrSettype` error value return --- src/core/libraries/kernel/thread_management.cpp | 13 +++++++------ src/core/libraries/kernel/thread_management.h | 5 +++++ 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/src/core/libraries/kernel/thread_management.cpp b/src/core/libraries/kernel/thread_management.cpp index 567fff184..567ac867e 100644 --- a/src/core/libraries/kernel/thread_management.cpp +++ b/src/core/libraries/kernel/thread_management.cpp @@ -510,23 +510,24 @@ int PS4_SYSV_ABI scePthreadMutexattrInit(ScePthreadMutexattr* attr) { int PS4_SYSV_ABI scePthreadMutexattrSettype(ScePthreadMutexattr* attr, int type) { int ptype = PTHREAD_MUTEX_DEFAULT; switch (type) { - case 1: + case ORBIS_PTHREAD_MUTEX_ERRORCHECK: ptype = PTHREAD_MUTEX_ERRORCHECK; break; - case 2: + case ORBIS_PTHREAD_MUTEX_RECURSIVE: ptype = PTHREAD_MUTEX_RECURSIVE; break; - case 3: - case 4: + case ORBIS_PTHREAD_MUTEX_NORMAL: + case ORBIS_PTHREAD_MUTEX_ADAPTIVE: ptype = PTHREAD_MUTEX_NORMAL; break; default: - UNREACHABLE_MSG("Invalid type: {}", type); + return SCE_KERNEL_ERROR_EINVAL; } int result = pthread_mutexattr_settype(&(*attr)->pth_mutex_attr, ptype); + ASSERT(result == 0); - return result == 0 ? SCE_OK : SCE_KERNEL_ERROR_EINVAL; + return SCE_OK; } int PS4_SYSV_ABI scePthreadMutexattrSetprotocol(ScePthreadMutexattr* attr, int protocol) { diff --git a/src/core/libraries/kernel/thread_management.h b/src/core/libraries/kernel/thread_management.h index c5935275f..3679af84f 100644 --- a/src/core/libraries/kernel/thread_management.h +++ b/src/core/libraries/kernel/thread_management.h @@ -20,6 +20,11 @@ constexpr int ORBIS_KERNEL_PRIO_FIFO_DEFAULT = 700; constexpr int ORBIS_KERNEL_PRIO_FIFO_HIGHEST = 256; constexpr int ORBIS_KERNEL_PRIO_FIFO_LOWEST = 767; +constexpr int ORBIS_PTHREAD_MUTEX_ERRORCHECK = 1; +constexpr int ORBIS_PTHREAD_MUTEX_RECURSIVE = 2; +constexpr int ORBIS_PTHREAD_MUTEX_NORMAL = 3; +constexpr int ORBIS_PTHREAD_MUTEX_ADAPTIVE = 4; + struct PthreadInternal; struct PthreadAttrInternal; struct PthreadMutexInternal; From 659e7a467549ebca374acc859c8a0e3d47c0e0b6 Mon Sep 17 00:00:00 2001 From: Anton Kovalev Date: Tue, 27 Aug 2024 23:16:14 +0200 Subject: [PATCH 36/69] video_core: Added copyGPUCmdBuffers option --- src/common/config.cpp | 11 +++++++++ src/common/config.h | 2 ++ src/video_core/amdgpu/liverpool.cpp | 37 +++++++++++++++++++++++++++++ src/video_core/amdgpu/liverpool.h | 8 +++++++ 4 files changed, 58 insertions(+) diff --git a/src/common/config.cpp b/src/common/config.cpp index 9f55cbd40..04d67d44b 100644 --- a/src/common/config.cpp +++ b/src/common/config.cpp @@ -20,6 +20,7 @@ static std::string userName = "shadPS4"; static bool isDebugDump = false; static bool isShowSplash = false; static bool isNullGpu = false; +static bool shouldCopyGPUBuffers = false; static bool shouldDumpShaders = false; static bool shouldDumpPM4 = false; static u32 vblankDivider = 1; @@ -93,6 +94,10 @@ bool nullGpu() { return isNullGpu; } +bool copyGPUCmdBuffers() { + return shouldCopyGPUBuffers; +} + bool dumpShaders() { return shouldDumpShaders; } @@ -149,6 +154,10 @@ void setNullGpu(bool enable) { isNullGpu = enable; } +void setCopyGPUCmdBuffers(bool enable) { + shouldCopyGPUBuffers = enable; +} + void setDumpShaders(bool enable) { shouldDumpShaders = enable; } @@ -336,6 +345,7 @@ void load(const std::filesystem::path& path) { screenWidth = toml::find_or(gpu, "screenWidth", screenWidth); screenHeight = toml::find_or(gpu, "screenHeight", screenHeight); isNullGpu = toml::find_or(gpu, "nullGpu", false); + shouldCopyGPUBuffers = toml::find_or(gpu, "copyGPUBuffers", false); shouldDumpShaders = toml::find_or(gpu, "dumpShaders", false); shouldDumpPM4 = toml::find_or(gpu, "dumpPM4", false); vblankDivider = toml::find_or(gpu, "vblankDivider", 1); @@ -414,6 +424,7 @@ void save(const std::filesystem::path& path) { data["GPU"]["screenWidth"] = screenWidth; data["GPU"]["screenHeight"] = screenHeight; data["GPU"]["nullGpu"] = isNullGpu; + data["GPU"]["copyGPUBuffers"] = shouldCopyGPUBuffers; data["GPU"]["dumpShaders"] = shouldDumpShaders; data["GPU"]["dumpPM4"] = shouldDumpPM4; data["GPU"]["vblankDivider"] = vblankDivider; diff --git a/src/common/config.h b/src/common/config.h index 554515a44..f1347b076 100644 --- a/src/common/config.h +++ b/src/common/config.h @@ -24,6 +24,7 @@ s32 getGpuId(); bool debugDump(); bool showSplash(); bool nullGpu(); +bool copyGPUCmdBuffers(); bool dumpShaders(); bool dumpPM4(); bool isRdocEnabled(); @@ -33,6 +34,7 @@ u32 vblankDiv(); void setDebugDump(bool enable); void setShowSplash(bool enable); void setNullGpu(bool enable); +void setCopyGPUCmdBuffers(bool enable); void setDumpShaders(bool enable); void setDumpPM4(bool enable); void setVblankDiv(u32 value); diff --git a/src/video_core/amdgpu/liverpool.cpp b/src/video_core/amdgpu/liverpool.cpp index 5b3db603a..cec3b06bb 100644 --- a/src/video_core/amdgpu/liverpool.cpp +++ b/src/video_core/amdgpu/liverpool.cpp @@ -5,6 +5,7 @@ #include "common/debug.h" #include "common/polyfill_thread.h" #include "common/thread.h" +#include "common/config.h" #include "core/libraries/videoout/driver.h" #include "video_core/amdgpu/liverpool.h" #include "video_core/amdgpu/pm4_cmds.h" @@ -568,9 +569,45 @@ Liverpool::Task Liverpool::ProcessCompute(std::span acb, int vqid) { TracyFiberLeave; } +void Liverpool::CopyCmdBuffers(std::span& dcb, std::span& ccb) { + auto& queue = mapped_queues[GfxQueueId]; + + // This is fine because resize doesn't reallocate the buffer on shrink + queue.dcb_buffer.resize(queue.dcb_buffer_offset + dcb.size()); + queue.ccb_buffer.resize(queue.ccb_buffer_offset + dcb.size()); + + u32 prev_dcb_buffer_offset = queue.dcb_buffer_offset; + u32 prev_ccb_buffer_offset = queue.ccb_buffer_offset; + if (!dcb.empty()) { + std::memcpy(queue.dcb_buffer.data() + queue.dcb_buffer_offset, dcb.data(), + dcb.size_bytes()); + queue.dcb_buffer_offset += dcb.size(); + } + + if (!ccb.empty()) { + std::memcpy(queue.ccb_buffer.data() + queue.ccb_buffer_offset, ccb.data(), + ccb.size_bytes()); + queue.ccb_buffer_offset += dcb.size(); + } + + if (!queue.dcb_buffer.empty()) { + dcb = std::span{queue.dcb_buffer.begin() + prev_dcb_buffer_offset, + queue.dcb_buffer.begin() + queue.dcb_buffer_offset}; + } + + if (!queue.ccb_buffer.empty()) { + ccb = std::span{queue.ccb_buffer.begin() + prev_ccb_buffer_offset, + queue.ccb_buffer.begin() + queue.ccb_buffer_offset}; + } +} + void Liverpool::SubmitGfx(std::span dcb, std::span ccb) { auto& queue = mapped_queues[GfxQueueId]; + if (Config::copyGPUCmdBuffers()) { + CopyCmdBuffers(dcb, ccb); + } + auto task = ProcessGraphics(dcb, ccb); { std::scoped_lock lock{queue.m_access}; diff --git a/src/video_core/amdgpu/liverpool.h b/src/video_core/amdgpu/liverpool.h index 2806f3308..a4e61c92a 100644 --- a/src/video_core/amdgpu/liverpool.h +++ b/src/video_core/amdgpu/liverpool.h @@ -11,6 +11,7 @@ #include #include #include +#include #include "common/assert.h" #include "common/bit_field.h" @@ -1047,6 +1048,8 @@ public: void SubmitDone() noexcept { std::scoped_lock lk{submit_mutex}; + mapped_queues[GfxQueueId].ccb_buffer_offset = 0; + mapped_queues[GfxQueueId].dcb_buffer_offset = 0; submit_done = true; submit_cv.notify_one(); } @@ -1108,6 +1111,7 @@ private: Handle handle; }; + void CopyCmdBuffers(std::span& dcb, std::span& ccb); Task ProcessGraphics(std::span dcb, std::span ccb); Task ProcessCeUpdate(std::span ccb); Task ProcessCompute(std::span acb, int vqid); @@ -1116,6 +1120,10 @@ private: struct GpuQueue { std::mutex m_access{}; + std::atomic_uint32_t dcb_buffer_offset; + std::atomic_uint32_t ccb_buffer_offset; + std::vector dcb_buffer; + std::vector ccb_buffer; std::queue submits{}; ComputeProgram cs_state{}; }; From 595b845df0f6776cb44201217a7cdc2f7cb679d3 Mon Sep 17 00:00:00 2001 From: Anton Kovalev Date: Tue, 27 Aug 2024 23:31:04 +0200 Subject: [PATCH 37/69] clang-format fix --- src/video_core/amdgpu/liverpool.cpp | 4 ++-- src/video_core/amdgpu/liverpool.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/video_core/amdgpu/liverpool.cpp b/src/video_core/amdgpu/liverpool.cpp index cec3b06bb..4b8a83152 100644 --- a/src/video_core/amdgpu/liverpool.cpp +++ b/src/video_core/amdgpu/liverpool.cpp @@ -593,8 +593,8 @@ void Liverpool::CopyCmdBuffers(std::span& dcb, std::span& if (!queue.dcb_buffer.empty()) { dcb = std::span{queue.dcb_buffer.begin() + prev_dcb_buffer_offset, queue.dcb_buffer.begin() + queue.dcb_buffer_offset}; - } - + } + if (!queue.ccb_buffer.empty()) { ccb = std::span{queue.ccb_buffer.begin() + prev_ccb_buffer_offset, queue.ccb_buffer.begin() + queue.ccb_buffer_offset}; diff --git a/src/video_core/amdgpu/liverpool.h b/src/video_core/amdgpu/liverpool.h index a4e61c92a..c12c8fdb6 100644 --- a/src/video_core/amdgpu/liverpool.h +++ b/src/video_core/amdgpu/liverpool.h @@ -10,8 +10,8 @@ #include #include #include -#include #include +#include #include "common/assert.h" #include "common/bit_field.h" From 3d46a5d4920fdf5ab04fb20e6f86bde87235d77c Mon Sep 17 00:00:00 2001 From: Anton Kovalev Date: Tue, 27 Aug 2024 23:33:24 +0200 Subject: [PATCH 38/69] Do not shrink buffer's size on submit --- src/video_core/amdgpu/liverpool.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/video_core/amdgpu/liverpool.cpp b/src/video_core/amdgpu/liverpool.cpp index 4b8a83152..93099266a 100644 --- a/src/video_core/amdgpu/liverpool.cpp +++ b/src/video_core/amdgpu/liverpool.cpp @@ -573,8 +573,10 @@ void Liverpool::CopyCmdBuffers(std::span& dcb, std::span& auto& queue = mapped_queues[GfxQueueId]; // This is fine because resize doesn't reallocate the buffer on shrink - queue.dcb_buffer.resize(queue.dcb_buffer_offset + dcb.size()); - queue.ccb_buffer.resize(queue.ccb_buffer_offset + dcb.size()); + queue.dcb_buffer.resize( + std::max(queue.dcb_buffer.size(), queue.dcb_buffer_offset + dcb.size())); + queue.ccb_buffer.resize( + std::max(queue.ccb_buffer.size(), queue.ccb_buffer_offset + dcb.size())); u32 prev_dcb_buffer_offset = queue.dcb_buffer_offset; u32 prev_ccb_buffer_offset = queue.ccb_buffer_offset; From 3842993a4310e5f6c392f0898c795a50e5a731a2 Mon Sep 17 00:00:00 2001 From: Anton Kovalev Date: Wed, 28 Aug 2024 00:21:12 +0200 Subject: [PATCH 39/69] Use input dcb and ccb instead of copy --- src/video_core/amdgpu/liverpool.cpp | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/src/video_core/amdgpu/liverpool.cpp b/src/video_core/amdgpu/liverpool.cpp index 93099266a..3db9ff0d1 100644 --- a/src/video_core/amdgpu/liverpool.cpp +++ b/src/video_core/amdgpu/liverpool.cpp @@ -572,7 +572,6 @@ Liverpool::Task Liverpool::ProcessCompute(std::span acb, int vqid) { void Liverpool::CopyCmdBuffers(std::span& dcb, std::span& ccb) { auto& queue = mapped_queues[GfxQueueId]; - // This is fine because resize doesn't reallocate the buffer on shrink queue.dcb_buffer.resize( std::max(queue.dcb_buffer.size(), queue.dcb_buffer_offset + dcb.size())); queue.ccb_buffer.resize( @@ -584,20 +583,14 @@ void Liverpool::CopyCmdBuffers(std::span& dcb, std::span& std::memcpy(queue.dcb_buffer.data() + queue.dcb_buffer_offset, dcb.data(), dcb.size_bytes()); queue.dcb_buffer_offset += dcb.size(); + dcb = std::span{queue.dcb_buffer.begin() + prev_dcb_buffer_offset, + queue.dcb_buffer.begin() + queue.dcb_buffer_offset}; } if (!ccb.empty()) { std::memcpy(queue.ccb_buffer.data() + queue.ccb_buffer_offset, ccb.data(), ccb.size_bytes()); queue.ccb_buffer_offset += dcb.size(); - } - - if (!queue.dcb_buffer.empty()) { - dcb = std::span{queue.dcb_buffer.begin() + prev_dcb_buffer_offset, - queue.dcb_buffer.begin() + queue.dcb_buffer_offset}; - } - - if (!queue.ccb_buffer.empty()) { ccb = std::span{queue.ccb_buffer.begin() + prev_ccb_buffer_offset, queue.ccb_buffer.begin() + queue.ccb_buffer_offset}; } From 860b93505423dffed0e2abeb0e278aee2d759210 Mon Sep 17 00:00:00 2001 From: Semenov Herman Date: Wed, 28 Aug 2024 01:32:14 +0300 Subject: [PATCH 40/69] crypto: added destructors fix memleak FakeKeyset, DebugRifKeyset, PkgDerivedKey3Keyset --- src/core/crypto/keys.h | 43 ++++++++++++++++++++++++++++++++++++------ 1 file changed, 37 insertions(+), 6 deletions(-) diff --git a/src/core/crypto/keys.h b/src/core/crypto/keys.h index 37b66bd09..58466b764 100644 --- a/src/core/crypto/keys.h +++ b/src/core/crypto/keys.h @@ -132,11 +132,22 @@ public: 0x79, 0x9E, 0x7D, 0x8D, 0xCA, 0x18, 0x6D, 0xBD, 0x9E, 0xA1, 0x80, 0x28, 0x6B, 0x2A, 0xFE, 0x51, 0x24, 0x9B, 0x6F, 0x4D, 0x84, 0x77, 0x80, 0x23}; }; + + // Destructor + ~FakeKeyset() { + delete[] PrivateExponent; + delete[] Exponent1; + delete[] Exponent2; + delete[] PublicExponent; + delete[] Coefficient; + delete[] Modulus; + delete[] Prime1; + delete[] Prime2; + }; }; class DebugRifKeyset { public: - // Constructor // std::uint8_t* PrivateExponent; const CryptoPP::byte* Exponent1; // exponent2 = d mod (q - 1) @@ -263,14 +274,22 @@ public: 0x81, 0x1F, 0xDE, 0x5E, 0xA8, 0x6E, 0x3E, 0x87, 0xEC, 0x44, 0xD2, 0x69, 0xC6, 0x54, 0x91, 0x6B, 0x5E, 0x13, 0x8A, 0x03, 0x87, 0x05, 0x31, 0x8D}; }; + + // Destructor + ~DebugRifKeyset() { + delete[] PrivateExponent; + delete[] Exponent1; + delete[] Exponent2; + delete[] PublicExponent; + delete[] Coefficient; + delete[] Modulus; + delete[] Prime1; + delete[] Prime2; + }; }; class PkgDerivedKey3Keyset { public: - // PkgDerivedKey3Keyset(); - //~PkgDerivedKey3Keyset(); - - // Constructor // std::uint8_t* PrivateExponent; const CryptoPP::byte* Exponent1; // exponent2 = d mod (q - 1) @@ -287,8 +306,8 @@ public: const CryptoPP::byte* Prime2; const CryptoPP::byte* PrivateExponent; + // Constructor PkgDerivedKey3Keyset() { - Prime1 = new CryptoPP::byte[0x80]{ 0xF9, 0x67, 0xAD, 0x99, 0x12, 0x31, 0x0C, 0x56, 0xA2, 0x2E, 0x16, 0x1C, 0x46, 0xB3, 0x4D, 0x5B, 0x43, 0xBE, 0x42, 0xA2, 0xF6, 0x86, 0x96, 0x80, 0x42, 0xC3, @@ -387,4 +406,16 @@ public: 0xf9, 0xc9, 0xa3, 0xc1}; PublicExponent = new CryptoPP::byte[4]{0, 1, 0, 1}; }; + + // Destructor + ~PkgDerivedKey3Keyset() { + delete[] Prime1; + delete[] Prime2; + delete[] PrivateExponent; + delete[] Exponent1; + delete[] Exponent2; + delete[] Coefficient; + delete[] Modulus; + delete[] PublicExponent; + }; }; \ No newline at end of file From 1a02efbd156ff7b07bfa306cd94c39862cba8d56 Mon Sep 17 00:00:00 2001 From: Anton Kovalev Date: Wed, 28 Aug 2024 05:42:48 +0200 Subject: [PATCH 41/69] clang-format style fix --- src/video_core/amdgpu/liverpool.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/video_core/amdgpu/liverpool.cpp b/src/video_core/amdgpu/liverpool.cpp index 3db9ff0d1..6e49aec41 100644 --- a/src/video_core/amdgpu/liverpool.cpp +++ b/src/video_core/amdgpu/liverpool.cpp @@ -2,10 +2,10 @@ // SPDX-License-Identifier: GPL-2.0-or-later #include "common/assert.h" +#include "common/config.h" #include "common/debug.h" #include "common/polyfill_thread.h" #include "common/thread.h" -#include "common/config.h" #include "core/libraries/videoout/driver.h" #include "video_core/amdgpu/liverpool.h" #include "video_core/amdgpu/pm4_cmds.h" From ed42db47af3ab0cbe92be922110023eda895d34a Mon Sep 17 00:00:00 2001 From: Exhigh Date: Wed, 28 Aug 2024 08:52:20 +0400 Subject: [PATCH 42/69] savedata: Add another missed case in saveDataMount This should potentially fix Deadpool (CUSA03528) #554. --- src/core/libraries/save_data/savedata.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/core/libraries/save_data/savedata.cpp b/src/core/libraries/save_data/savedata.cpp index a6117cba5..eb309183f 100644 --- a/src/core/libraries/save_data/savedata.cpp +++ b/src/core/libraries/save_data/savedata.cpp @@ -505,6 +505,7 @@ s32 saveDataMount(u32 user_id, char* dir_name, u32 mount_mode, ORBIS_SAVE_DATA_MOUNT_MODE_DESTRUCT_OFF: case ORBIS_SAVE_DATA_MOUNT_MODE_CREATE | ORBIS_SAVE_DATA_MOUNT_MODE_RDWR | ORBIS_SAVE_DATA_MOUNT_MODE_COPY_ICON: + case ORBIS_SAVE_DATA_MOUNT_MODE_CREATE | ORBIS_SAVE_DATA_MOUNT_MODE_COPY_ICON: case ORBIS_SAVE_DATA_MOUNT_MODE_CREATE | ORBIS_SAVE_DATA_MOUNT_MODE_DESTRUCT_OFF | ORBIS_SAVE_DATA_MOUNT_MODE_COPY_ICON: case ORBIS_SAVE_DATA_MOUNT_MODE_CREATE | ORBIS_SAVE_DATA_MOUNT_MODE_RDWR | From 87ccfdfbbdb7b98ba1169174096baffcd1d93729 Mon Sep 17 00:00:00 2001 From: Anton Kovalev Date: Wed, 28 Aug 2024 09:42:31 +0200 Subject: [PATCH 43/69] Fixed type on function --- src/video_core/amdgpu/liverpool.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/video_core/amdgpu/liverpool.cpp b/src/video_core/amdgpu/liverpool.cpp index 6e49aec41..931b5ea84 100644 --- a/src/video_core/amdgpu/liverpool.cpp +++ b/src/video_core/amdgpu/liverpool.cpp @@ -575,7 +575,7 @@ void Liverpool::CopyCmdBuffers(std::span& dcb, std::span& queue.dcb_buffer.resize( std::max(queue.dcb_buffer.size(), queue.dcb_buffer_offset + dcb.size())); queue.ccb_buffer.resize( - std::max(queue.ccb_buffer.size(), queue.ccb_buffer_offset + dcb.size())); + std::max(queue.ccb_buffer.size(), queue.ccb_buffer_offset + ccb.size())); u32 prev_dcb_buffer_offset = queue.dcb_buffer_offset; u32 prev_ccb_buffer_offset = queue.ccb_buffer_offset; @@ -590,7 +590,7 @@ void Liverpool::CopyCmdBuffers(std::span& dcb, std::span& if (!ccb.empty()) { std::memcpy(queue.ccb_buffer.data() + queue.ccb_buffer_offset, ccb.data(), ccb.size_bytes()); - queue.ccb_buffer_offset += dcb.size(); + queue.ccb_buffer_offset += ccb.size(); ccb = std::span{queue.ccb_buffer.begin() + prev_ccb_buffer_offset, queue.ccb_buffer.begin() + queue.ccb_buffer_offset}; } From c37679154eeb59e6bfe73ec2ff99b15096094942 Mon Sep 17 00:00:00 2001 From: Random <28494085+Random06457@users.noreply.github.com> Date: Wed, 28 Aug 2024 09:53:27 +0200 Subject: [PATCH 44/69] Handle PM4 type-2 packets (#556) * video_core: handle PM4 type-2 packets * video_core: rewrite pm4 comand type handling into a switch statement --- src/video_core/amdgpu/liverpool.cpp | 563 ++++++++++++++-------------- 1 file changed, 287 insertions(+), 276 deletions(-) diff --git a/src/video_core/amdgpu/liverpool.cpp b/src/video_core/amdgpu/liverpool.cpp index 5b3db603a..7e6ca14da 100644 --- a/src/video_core/amdgpu/liverpool.cpp +++ b/src/video_core/amdgpu/liverpool.cpp @@ -175,294 +175,305 @@ Liverpool::Task Liverpool::ProcessGraphics(std::span dcb, std::span(dcb.data()); const u32 type = header->type; - if (type != 3) { - // No other types of packets were spotted so far - UNREACHABLE_MSG("Invalid PM4 type {}", type); - } - const u32 count = header->type3.NumWords(); - const PM4ItOpcode opcode = header->type3.opcode; - switch (opcode) { - case PM4ItOpcode::Nop: { - const auto* nop = reinterpret_cast(header); - if (nop->header.count.Value() == 0) { - break; - } + switch (type) { + case 0: + case 1: + UNREACHABLE_MSG("Unsupported PM4 type {}", type); + break; + case 2: + // Type-2 packet are used for padding purposes + dcb = dcb.subspan(1); + continue; + case 3: + const u32 count = header->type3.NumWords(); + const PM4ItOpcode opcode = header->type3.opcode; + switch (opcode) { + case PM4ItOpcode::Nop: { + const auto* nop = reinterpret_cast(header); + if (nop->header.count.Value() == 0) { + break; + } - switch (nop->data_block[0]) { - case PM4CmdNop::PayloadType::PatchedFlip: { - // There is no evidence that GPU CP drives flip events by parsing - // special NOP packets. For convenience lets assume that it does. - Platform::IrqC::Instance()->Signal(Platform::InterruptId::GfxFlip); + switch (nop->data_block[0]) { + case PM4CmdNop::PayloadType::PatchedFlip: { + // There is no evidence that GPU CP drives flip events by parsing + // special NOP packets. For convenience lets assume that it does. + Platform::IrqC::Instance()->Signal(Platform::InterruptId::GfxFlip); + break; + } + case PM4CmdNop::PayloadType::DebugMarkerPush: { + const auto marker_sz = nop->header.count.Value() * 2; + const std::string_view label{reinterpret_cast(&nop->data_block[1]), + marker_sz}; + rasterizer->ScopeMarkerBegin(label); + break; + } + case PM4CmdNop::PayloadType::DebugMarkerPop: { + rasterizer->ScopeMarkerEnd(); + break; + } + default: + break; + } break; } - case PM4CmdNop::PayloadType::DebugMarkerPush: { - const auto marker_sz = nop->header.count.Value() * 2; - const std::string_view label{reinterpret_cast(&nop->data_block[1]), - marker_sz}; - rasterizer->ScopeMarkerBegin(label); + case PM4ItOpcode::ContextControl: { break; } - case PM4CmdNop::PayloadType::DebugMarkerPop: { - rasterizer->ScopeMarkerEnd(); + case PM4ItOpcode::ClearState: { + regs.SetDefaults(); + break; + } + case PM4ItOpcode::SetConfigReg: { + const auto* set_data = reinterpret_cast(header); + const auto reg_addr = ConfigRegWordOffset + set_data->reg_offset; + const auto* payload = reinterpret_cast(header + 2); + std::memcpy(®s.reg_array[reg_addr], payload, (count - 1) * sizeof(u32)); + break; + } + case PM4ItOpcode::SetContextReg: { + const auto* set_data = reinterpret_cast(header); + const auto reg_addr = ContextRegWordOffset + set_data->reg_offset; + const auto* payload = reinterpret_cast(header + 2); + + std::memcpy(®s.reg_array[reg_addr], payload, (count - 1) * sizeof(u32)); + + // In the case of HW, render target memory has alignment as color block operates on + // tiles. There is no information of actual resource extents stored in CB context + // regs, so any deduction of it from slices/pitch will lead to a larger surface + // created. The same applies to the depth targets. Fortunately, the guest always + // sends a trailing NOP packet right after the context regs setup, so we can use the + // heuristic below and extract the hint to determine actual resource dims. + + switch (reg_addr) { + case ContextRegs::CbColor0Base: + case ContextRegs::CbColor1Base: + case ContextRegs::CbColor2Base: + case ContextRegs::CbColor3Base: + case ContextRegs::CbColor4Base: + case ContextRegs::CbColor5Base: + case ContextRegs::CbColor6Base: + case ContextRegs::CbColor7Base: { + const auto col_buf_id = (reg_addr - ContextRegs::CbColor0Base) / + (ContextRegs::CbColor1Base - ContextRegs::CbColor0Base); + ASSERT(col_buf_id < NumColorBuffers); + + const auto nop_offset = header->type3.count; + if (nop_offset == 0x0e || nop_offset == 0x0d || nop_offset == 0x0b) { + ASSERT_MSG(payload[nop_offset] == 0xc0001000, + "NOP hint is missing in CB setup sequence"); + last_cb_extent[col_buf_id].raw = payload[nop_offset + 1]; + } else { + last_cb_extent[col_buf_id].raw = 0; + } + break; + } + case ContextRegs::CbColor0Cmask: + case ContextRegs::CbColor1Cmask: + case ContextRegs::CbColor2Cmask: + case ContextRegs::CbColor3Cmask: + case ContextRegs::CbColor4Cmask: + case ContextRegs::CbColor5Cmask: + case ContextRegs::CbColor6Cmask: + case ContextRegs::CbColor7Cmask: { + const auto col_buf_id = + (reg_addr - ContextRegs::CbColor0Cmask) / + (ContextRegs::CbColor1Cmask - ContextRegs::CbColor0Cmask); + ASSERT(col_buf_id < NumColorBuffers); + + const auto nop_offset = header->type3.count; + if (nop_offset == 0x04) { + ASSERT_MSG(payload[nop_offset] == 0xc0001000, + "NOP hint is missing in CB setup sequence"); + last_cb_extent[col_buf_id].raw = payload[nop_offset + 1]; + } + break; + } + case ContextRegs::DbZInfo: { + if (header->type3.count == 8) { + ASSERT_MSG(payload[20] == 0xc0001000, + "NOP hint is missing in DB setup sequence"); + last_db_extent.raw = payload[21]; + } else { + last_db_extent.raw = 0; + } + break; + } + default: + break; + } + break; + } + case PM4ItOpcode::SetShReg: { + const auto* set_data = reinterpret_cast(header); + std::memcpy(®s.reg_array[ShRegWordOffset + set_data->reg_offset], header + 2, + (count - 1) * sizeof(u32)); + break; + } + case PM4ItOpcode::SetUconfigReg: { + const auto* set_data = reinterpret_cast(header); + std::memcpy(®s.reg_array[UconfigRegWordOffset + set_data->reg_offset], + header + 2, (count - 1) * sizeof(u32)); + break; + } + case PM4ItOpcode::IndexType: { + const auto* index_type = reinterpret_cast(header); + regs.index_buffer_type.raw = index_type->raw; + break; + } + case PM4ItOpcode::DrawIndex2: { + const auto* draw_index = reinterpret_cast(header); + regs.max_index_size = draw_index->max_size; + regs.index_base_address.base_addr_lo = draw_index->index_base_lo; + regs.index_base_address.base_addr_hi.Assign(draw_index->index_base_hi); + regs.num_indices = draw_index->index_count; + regs.draw_initiator = draw_index->draw_initiator; + if (rasterizer) { + const auto cmd_address = reinterpret_cast(header); + rasterizer->ScopeMarkerBegin(fmt::format("dcb:{}:DrawIndex2", cmd_address)); + rasterizer->Breadcrumb(u64(cmd_address)); + rasterizer->Draw(true); + rasterizer->ScopeMarkerEnd(); + } + break; + } + case PM4ItOpcode::DrawIndexOffset2: { + const auto* draw_index_off = + reinterpret_cast(header); + regs.max_index_size = draw_index_off->max_size; + regs.num_indices = draw_index_off->index_count; + regs.draw_initiator = draw_index_off->draw_initiator; + if (rasterizer) { + const auto cmd_address = reinterpret_cast(header); + rasterizer->ScopeMarkerBegin( + fmt::format("dcb:{}:DrawIndexOffset2", cmd_address)); + rasterizer->Breadcrumb(u64(cmd_address)); + rasterizer->Draw(true, draw_index_off->index_offset); + rasterizer->ScopeMarkerEnd(); + } + break; + } + case PM4ItOpcode::DrawIndexAuto: { + const auto* draw_index = reinterpret_cast(header); + regs.num_indices = draw_index->index_count; + regs.draw_initiator = draw_index->draw_initiator; + if (rasterizer) { + const auto cmd_address = reinterpret_cast(header); + rasterizer->ScopeMarkerBegin(fmt::format("dcb:{}:DrawIndexAuto", cmd_address)); + rasterizer->Breadcrumb(u64(cmd_address)); + rasterizer->Draw(false); + rasterizer->ScopeMarkerEnd(); + } + break; + } + case PM4ItOpcode::DispatchDirect: { + const auto* dispatch_direct = reinterpret_cast(header); + regs.cs_program.dim_x = dispatch_direct->dim_x; + regs.cs_program.dim_y = dispatch_direct->dim_y; + regs.cs_program.dim_z = dispatch_direct->dim_z; + regs.cs_program.dispatch_initiator = dispatch_direct->dispatch_initiator; + if (rasterizer && (regs.cs_program.dispatch_initiator & 1)) { + const auto cmd_address = reinterpret_cast(header); + rasterizer->ScopeMarkerBegin(fmt::format("dcb:{}:Dispatch", cmd_address)); + rasterizer->Breadcrumb(u64(cmd_address)); + rasterizer->DispatchDirect(); + rasterizer->ScopeMarkerEnd(); + } + break; + } + case PM4ItOpcode::NumInstances: { + const auto* num_instances = reinterpret_cast(header); + regs.num_instances.num_instances = num_instances->num_instances; + break; + } + case PM4ItOpcode::IndexBase: { + const auto* index_base = reinterpret_cast(header); + regs.index_base_address.base_addr_lo = index_base->addr_lo; + regs.index_base_address.base_addr_hi.Assign(index_base->addr_hi); + break; + } + case PM4ItOpcode::IndexBufferSize: { + const auto* index_size = reinterpret_cast(header); + regs.num_indices = index_size->num_indices; + break; + } + case PM4ItOpcode::EventWrite: { + // const auto* event = reinterpret_cast(header); + break; + } + case PM4ItOpcode::EventWriteEos: { + const auto* event_eos = reinterpret_cast(header); + event_eos->SignalFence(); + break; + } + case PM4ItOpcode::EventWriteEop: { + const auto* event_eop = reinterpret_cast(header); + event_eop->SignalFence(); + break; + } + case PM4ItOpcode::DmaData: { + const auto* dma_data = reinterpret_cast(header); + break; + } + case PM4ItOpcode::WriteData: { + const auto* write_data = reinterpret_cast(header); + ASSERT(write_data->dst_sel.Value() == 2 || write_data->dst_sel.Value() == 5); + const u32 data_size = (header->type3.count.Value() - 2) * 4; + u64* address = write_data->Address(); + if (!write_data->wr_one_addr.Value()) { + std::memcpy(address, write_data->data, data_size); + } else { + UNREACHABLE(); + } + break; + } + case PM4ItOpcode::AcquireMem: { + // const auto* acquire_mem = reinterpret_cast(header); + break; + } + case PM4ItOpcode::WaitRegMem: { + const auto* wait_reg_mem = reinterpret_cast(header); + // ASSERT(wait_reg_mem->engine.Value() == PM4CmdWaitRegMem::Engine::Me); + // Optimization: VO label waits are special because the emulator + // will write to the label when presentation is finished. So if + // there are no other submits to yield to we can sleep the thread + // instead and allow other tasks to run. + const u64* wait_addr = wait_reg_mem->Address(); + if (vo_port->IsVoLabel(wait_addr) && num_submits == 1) { + vo_port->WaitVoLabel([&] { return wait_reg_mem->Test(); }); + } + while (!wait_reg_mem->Test()) { + mapped_queues[GfxQueueId].cs_state = regs.cs_program; + TracyFiberLeave; + co_yield {}; + TracyFiberEnter(dcb_task_name); + regs.cs_program = mapped_queues[GfxQueueId].cs_state; + } + break; + } + case PM4ItOpcode::IncrementDeCounter: { + ++cblock.de_count; + break; + } + case PM4ItOpcode::WaitOnCeCounter: { + while (cblock.ce_count <= cblock.de_count) { + TracyFiberLeave; + ce_task.handle.resume(); + TracyFiberEnter(dcb_task_name); + } + break; + } + case PM4ItOpcode::PfpSyncMe: { break; } default: - break; + UNREACHABLE_MSG("Unknown PM4 type 3 opcode {:#x} with count {}", + static_cast(opcode), count); } + dcb = dcb.subspan(header->type3.NumWords() + 1); break; } - case PM4ItOpcode::ContextControl: { - break; - } - case PM4ItOpcode::ClearState: { - regs.SetDefaults(); - break; - } - case PM4ItOpcode::SetConfigReg: { - const auto* set_data = reinterpret_cast(header); - const auto reg_addr = ConfigRegWordOffset + set_data->reg_offset; - const auto* payload = reinterpret_cast(header + 2); - std::memcpy(®s.reg_array[reg_addr], payload, (count - 1) * sizeof(u32)); - break; - } - case PM4ItOpcode::SetContextReg: { - const auto* set_data = reinterpret_cast(header); - const auto reg_addr = ContextRegWordOffset + set_data->reg_offset; - const auto* payload = reinterpret_cast(header + 2); - - std::memcpy(®s.reg_array[reg_addr], payload, (count - 1) * sizeof(u32)); - - // In the case of HW, render target memory has alignment as color block operates on - // tiles. There is no information of actual resource extents stored in CB context - // regs, so any deduction of it from slices/pitch will lead to a larger surface created. - // The same applies to the depth targets. Fortunately, the guest always sends - // a trailing NOP packet right after the context regs setup, so we can use the heuristic - // below and extract the hint to determine actual resource dims. - - switch (reg_addr) { - case ContextRegs::CbColor0Base: - case ContextRegs::CbColor1Base: - case ContextRegs::CbColor2Base: - case ContextRegs::CbColor3Base: - case ContextRegs::CbColor4Base: - case ContextRegs::CbColor5Base: - case ContextRegs::CbColor6Base: - case ContextRegs::CbColor7Base: { - const auto col_buf_id = (reg_addr - ContextRegs::CbColor0Base) / - (ContextRegs::CbColor1Base - ContextRegs::CbColor0Base); - ASSERT(col_buf_id < NumColorBuffers); - - const auto nop_offset = header->type3.count; - if (nop_offset == 0x0e || nop_offset == 0x0d || nop_offset == 0x0b) { - ASSERT_MSG(payload[nop_offset] == 0xc0001000, - "NOP hint is missing in CB setup sequence"); - last_cb_extent[col_buf_id].raw = payload[nop_offset + 1]; - } else { - last_cb_extent[col_buf_id].raw = 0; - } - break; - } - case ContextRegs::CbColor0Cmask: - case ContextRegs::CbColor1Cmask: - case ContextRegs::CbColor2Cmask: - case ContextRegs::CbColor3Cmask: - case ContextRegs::CbColor4Cmask: - case ContextRegs::CbColor5Cmask: - case ContextRegs::CbColor6Cmask: - case ContextRegs::CbColor7Cmask: { - const auto col_buf_id = (reg_addr - ContextRegs::CbColor0Cmask) / - (ContextRegs::CbColor1Cmask - ContextRegs::CbColor0Cmask); - ASSERT(col_buf_id < NumColorBuffers); - - const auto nop_offset = header->type3.count; - if (nop_offset == 0x04) { - ASSERT_MSG(payload[nop_offset] == 0xc0001000, - "NOP hint is missing in CB setup sequence"); - last_cb_extent[col_buf_id].raw = payload[nop_offset + 1]; - } - break; - } - case ContextRegs::DbZInfo: { - if (header->type3.count == 8) { - ASSERT_MSG(payload[20] == 0xc0001000, - "NOP hint is missing in DB setup sequence"); - last_db_extent.raw = payload[21]; - } else { - last_db_extent.raw = 0; - } - break; - } - default: - break; - } - break; - } - case PM4ItOpcode::SetShReg: { - const auto* set_data = reinterpret_cast(header); - std::memcpy(®s.reg_array[ShRegWordOffset + set_data->reg_offset], header + 2, - (count - 1) * sizeof(u32)); - break; - } - case PM4ItOpcode::SetUconfigReg: { - const auto* set_data = reinterpret_cast(header); - std::memcpy(®s.reg_array[UconfigRegWordOffset + set_data->reg_offset], header + 2, - (count - 1) * sizeof(u32)); - break; - } - case PM4ItOpcode::IndexType: { - const auto* index_type = reinterpret_cast(header); - regs.index_buffer_type.raw = index_type->raw; - break; - } - case PM4ItOpcode::DrawIndex2: { - const auto* draw_index = reinterpret_cast(header); - regs.max_index_size = draw_index->max_size; - regs.index_base_address.base_addr_lo = draw_index->index_base_lo; - regs.index_base_address.base_addr_hi.Assign(draw_index->index_base_hi); - regs.num_indices = draw_index->index_count; - regs.draw_initiator = draw_index->draw_initiator; - if (rasterizer) { - const auto cmd_address = reinterpret_cast(header); - rasterizer->ScopeMarkerBegin(fmt::format("dcb:{}:DrawIndex2", cmd_address)); - rasterizer->Breadcrumb(u64(cmd_address)); - rasterizer->Draw(true); - rasterizer->ScopeMarkerEnd(); - } - break; - } - case PM4ItOpcode::DrawIndexOffset2: { - const auto* draw_index_off = reinterpret_cast(header); - regs.max_index_size = draw_index_off->max_size; - regs.num_indices = draw_index_off->index_count; - regs.draw_initiator = draw_index_off->draw_initiator; - if (rasterizer) { - const auto cmd_address = reinterpret_cast(header); - rasterizer->ScopeMarkerBegin(fmt::format("dcb:{}:DrawIndexOffset2", cmd_address)); - rasterizer->Breadcrumb(u64(cmd_address)); - rasterizer->Draw(true, draw_index_off->index_offset); - rasterizer->ScopeMarkerEnd(); - } - break; - } - case PM4ItOpcode::DrawIndexAuto: { - const auto* draw_index = reinterpret_cast(header); - regs.num_indices = draw_index->index_count; - regs.draw_initiator = draw_index->draw_initiator; - if (rasterizer) { - const auto cmd_address = reinterpret_cast(header); - rasterizer->ScopeMarkerBegin(fmt::format("dcb:{}:DrawIndexAuto", cmd_address)); - rasterizer->Breadcrumb(u64(cmd_address)); - rasterizer->Draw(false); - rasterizer->ScopeMarkerEnd(); - } - break; - } - case PM4ItOpcode::DispatchDirect: { - const auto* dispatch_direct = reinterpret_cast(header); - regs.cs_program.dim_x = dispatch_direct->dim_x; - regs.cs_program.dim_y = dispatch_direct->dim_y; - regs.cs_program.dim_z = dispatch_direct->dim_z; - regs.cs_program.dispatch_initiator = dispatch_direct->dispatch_initiator; - if (rasterizer && (regs.cs_program.dispatch_initiator & 1)) { - const auto cmd_address = reinterpret_cast(header); - rasterizer->ScopeMarkerBegin(fmt::format("dcb:{}:Dispatch", cmd_address)); - rasterizer->Breadcrumb(u64(cmd_address)); - rasterizer->DispatchDirect(); - rasterizer->ScopeMarkerEnd(); - } - break; - } - case PM4ItOpcode::NumInstances: { - const auto* num_instances = reinterpret_cast(header); - regs.num_instances.num_instances = num_instances->num_instances; - break; - } - case PM4ItOpcode::IndexBase: { - const auto* index_base = reinterpret_cast(header); - regs.index_base_address.base_addr_lo = index_base->addr_lo; - regs.index_base_address.base_addr_hi.Assign(index_base->addr_hi); - break; - } - case PM4ItOpcode::IndexBufferSize: { - const auto* index_size = reinterpret_cast(header); - regs.num_indices = index_size->num_indices; - break; - } - case PM4ItOpcode::EventWrite: { - // const auto* event = reinterpret_cast(header); - break; - } - case PM4ItOpcode::EventWriteEos: { - const auto* event_eos = reinterpret_cast(header); - event_eos->SignalFence(); - break; - } - case PM4ItOpcode::EventWriteEop: { - const auto* event_eop = reinterpret_cast(header); - event_eop->SignalFence(); - break; - } - case PM4ItOpcode::DmaData: { - const auto* dma_data = reinterpret_cast(header); - break; - } - case PM4ItOpcode::WriteData: { - const auto* write_data = reinterpret_cast(header); - ASSERT(write_data->dst_sel.Value() == 2 || write_data->dst_sel.Value() == 5); - const u32 data_size = (header->type3.count.Value() - 2) * 4; - u64* address = write_data->Address(); - if (!write_data->wr_one_addr.Value()) { - std::memcpy(address, write_data->data, data_size); - } else { - UNREACHABLE(); - } - break; - } - case PM4ItOpcode::AcquireMem: { - // const auto* acquire_mem = reinterpret_cast(header); - break; - } - case PM4ItOpcode::WaitRegMem: { - const auto* wait_reg_mem = reinterpret_cast(header); - // ASSERT(wait_reg_mem->engine.Value() == PM4CmdWaitRegMem::Engine::Me); - // Optimization: VO label waits are special because the emulator - // will write to the label when presentation is finished. So if - // there are no other submits to yield to we can sleep the thread - // instead and allow other tasks to run. - const u64* wait_addr = wait_reg_mem->Address(); - if (vo_port->IsVoLabel(wait_addr) && num_submits == 1) { - vo_port->WaitVoLabel([&] { return wait_reg_mem->Test(); }); - } - while (!wait_reg_mem->Test()) { - mapped_queues[GfxQueueId].cs_state = regs.cs_program; - TracyFiberLeave; - co_yield {}; - TracyFiberEnter(dcb_task_name); - regs.cs_program = mapped_queues[GfxQueueId].cs_state; - } - break; - } - case PM4ItOpcode::IncrementDeCounter: { - ++cblock.de_count; - break; - } - case PM4ItOpcode::WaitOnCeCounter: { - while (cblock.ce_count <= cblock.de_count) { - TracyFiberLeave; - ce_task.handle.resume(); - TracyFiberEnter(dcb_task_name); - } - break; - } - case PM4ItOpcode::PfpSyncMe: { - break; - } - default: - UNREACHABLE_MSG("Unknown PM4 type 3 opcode {:#x} with count {}", - static_cast(opcode), count); - } - dcb = dcb.subspan(header->type3.NumWords() + 1); } if (ce_task.handle) { From dfb30ea955279e82f3c86cf9f0f8a0b59c2dcdfd Mon Sep 17 00:00:00 2001 From: Anton Kovalev Date: Wed, 28 Aug 2024 11:24:15 +0200 Subject: [PATCH 45/69] Use pair of spans instead of references in copy command buffers function --- src/video_core/amdgpu/liverpool.cpp | 7 +++++-- src/video_core/amdgpu/liverpool.h | 7 ++++--- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/src/video_core/amdgpu/liverpool.cpp b/src/video_core/amdgpu/liverpool.cpp index 931b5ea84..a3e64b7c0 100644 --- a/src/video_core/amdgpu/liverpool.cpp +++ b/src/video_core/amdgpu/liverpool.cpp @@ -569,7 +569,8 @@ Liverpool::Task Liverpool::ProcessCompute(std::span acb, int vqid) { TracyFiberLeave; } -void Liverpool::CopyCmdBuffers(std::span& dcb, std::span& ccb) { +std::pair, std::span> Liverpool::CopyCmdBuffers( + std::span dcb, std::span ccb) { auto& queue = mapped_queues[GfxQueueId]; queue.dcb_buffer.resize( @@ -594,13 +595,15 @@ void Liverpool::CopyCmdBuffers(std::span& dcb, std::span& ccb = std::span{queue.ccb_buffer.begin() + prev_ccb_buffer_offset, queue.ccb_buffer.begin() + queue.ccb_buffer_offset}; } + + return std::make_pair(dcb, ccb); } void Liverpool::SubmitGfx(std::span dcb, std::span ccb) { auto& queue = mapped_queues[GfxQueueId]; if (Config::copyGPUCmdBuffers()) { - CopyCmdBuffers(dcb, ccb); + std::tie(dcb, ccb) = CopyCmdBuffers(dcb, ccb); } auto task = ProcessGraphics(dcb, ccb); diff --git a/src/video_core/amdgpu/liverpool.h b/src/video_core/amdgpu/liverpool.h index c12c8fdb6..14284bbc6 100644 --- a/src/video_core/amdgpu/liverpool.h +++ b/src/video_core/amdgpu/liverpool.h @@ -1111,7 +1111,8 @@ private: Handle handle; }; - void CopyCmdBuffers(std::span& dcb, std::span& ccb); + std::pair, std::span> CopyCmdBuffers(std::span dcb, + std::span ccb); Task ProcessGraphics(std::span dcb, std::span ccb); Task ProcessCeUpdate(std::span ccb); Task ProcessCompute(std::span acb, int vqid); @@ -1120,8 +1121,8 @@ private: struct GpuQueue { std::mutex m_access{}; - std::atomic_uint32_t dcb_buffer_offset; - std::atomic_uint32_t ccb_buffer_offset; + std::atomic dcb_buffer_offset; + std::atomic ccb_buffer_offset; std::vector dcb_buffer; std::vector ccb_buffer; std::queue submits{}; From 79e86a39fcc022f38104986c10252340025cfeda Mon Sep 17 00:00:00 2001 From: InvoxiPlayGames Date: Wed, 28 Aug 2024 10:27:51 +0100 Subject: [PATCH 46/69] add support for configurable special pad type --- src/common/config.cpp | 29 +++++++++++++++++++++++++++++ src/common/config.h | 6 ++++++ src/core/libraries/pad/pad.cpp | 24 +++++++++++++++++++++++- src/core/libraries/pad/pad.h | 9 ++++++++- 4 files changed, 66 insertions(+), 2 deletions(-) diff --git a/src/common/config.cpp b/src/common/config.cpp index 9f55cbd40..824a70da4 100644 --- a/src/common/config.cpp +++ b/src/common/config.cpp @@ -17,6 +17,8 @@ static s32 gpuId = -1; // Vulkan physical device index. Set to negative for auto static std::string logFilter; static std::string logType = "async"; static std::string userName = "shadPS4"; +static bool useSpecialPad = false; +static int specialPadClass = 1; static bool isDebugDump = false; static bool isShowSplash = false; static bool isNullGpu = false; @@ -81,6 +83,14 @@ std::string getUserName() { return userName; } +bool getUseSpecialPad() { + return useSpecialPad; +} + +int getSpecialPadClass() { + return specialPadClass; +} + bool debugDump() { return isDebugDump; } @@ -197,6 +207,14 @@ void setUserName(const std::string& type) { userName = type; } +void setUseSpecialPad(bool use) { + useSpecialPad = use; +} + +void setSpecialPadClass(int type) { + specialPadClass = type; +} + void setMainWindowGeometry(u32 x, u32 y, u32 w, u32 h) { main_window_geometry_x = x; main_window_geometry_y = y; @@ -330,6 +348,13 @@ void load(const std::filesystem::path& path) { isShowSplash = toml::find_or(general, "showSplash", true); } + if (data.contains("Input")) { + const toml::value& input = data.at("Input"); + + useSpecialPad = toml::find_or(input, "useSpecialPad", false); + specialPadClass = toml::find_or(input, "specialPadClass", 1); + } + if (data.contains("GPU")) { const toml::value& gpu = data.at("GPU"); @@ -411,6 +436,8 @@ void save(const std::filesystem::path& path) { data["General"]["logType"] = logType; data["General"]["userName"] = userName; data["General"]["showSplash"] = isShowSplash; + data["Input"]["useSpecialPad"] = useSpecialPad; + data["Input"]["specialPadClass"] = specialPadClass; data["GPU"]["screenWidth"] = screenWidth; data["GPU"]["screenHeight"] = screenHeight; data["GPU"]["nullGpu"] = isNullGpu; @@ -457,6 +484,8 @@ void setDefaultValues() { logFilter = ""; logType = "async"; userName = "shadPS4"; + useSpecialPad = false; + specialPadClass = 1; isDebugDump = false; isShowSplash = false; isNullGpu = false; diff --git a/src/common/config.h b/src/common/config.h index 554515a44..f5140bc9b 100644 --- a/src/common/config.h +++ b/src/common/config.h @@ -17,6 +17,9 @@ std::string getLogFilter(); std::string getLogType(); std::string getUserName(); +bool getUseSpecialPad(); +int getSpecialPadClass(); + u32 getScreenWidth(); u32 getScreenHeight(); s32 getGpuId(); @@ -44,6 +47,9 @@ void setLanguage(u32 language); void setNeoMode(bool enable); void setUserName(const std::string& type); +void setUseSpecialPad(bool use); +void setSpecialPadClass(int type); + void setLogType(const std::string& type); void setLogFilter(const std::string& type); diff --git a/src/core/libraries/pad/pad.cpp b/src/core/libraries/pad/pad.cpp index 305b20bd6..c4735c9ae 100644 --- a/src/core/libraries/pad/pad.cpp +++ b/src/core/libraries/pad/pad.cpp @@ -4,6 +4,7 @@ // Generated By moduleGenerator #include #include +#include "common/config.h" #include "common/logging/log.h" #include "core/libraries/error_codes.h" #include "core/libraries/libs.h" @@ -25,6 +26,9 @@ int PS4_SYSV_ABI scePadConnectPort() { int PS4_SYSV_ABI scePadDeviceClassGetExtendedInformation( s32 handle, OrbisPadDeviceClassExtendedInformation* pExtInfo) { LOG_ERROR(Lib_Pad, "(STUBBED) called"); + if (Config::getUseSpecialPad()) { + pExtInfo->deviceClass = (OrbisPadDeviceClass)Config::getSpecialPadClass(); + } return ORBIS_OK; } @@ -107,6 +111,10 @@ int PS4_SYSV_ABI scePadGetControllerInformation(s32 handle, OrbisPadControllerIn pInfo->connectedCount = 1; pInfo->connected = true; pInfo->deviceClass = ORBIS_PAD_DEVICE_CLASS_STANDARD; + if (Config::getUseSpecialPad()) { + pInfo->connectionType = ORBIS_PAD_PORT_TYPE_SPECIAL; + pInfo->deviceClass = (OrbisPadDeviceClass)Config::getSpecialPadClass(); + } return SCE_OK; } @@ -239,11 +247,25 @@ int PS4_SYSV_ABI scePadMbusTerm() { int PS4_SYSV_ABI scePadOpen(s32 userId, s32 type, s32 index, const OrbisPadOpenParam* pParam) { LOG_INFO(Lib_Pad, "(DUMMY) called user_id = {} type = {} index = {}", userId, type, index); + if (Config::getUseSpecialPad()) { + if (type != ORBIS_PAD_PORT_TYPE_SPECIAL) + return -1; + } else { + if (type != ORBIS_PAD_PORT_TYPE_STANDARD) + return -1; + } return 1; // dummy } -int PS4_SYSV_ABI scePadOpenExt() { +int PS4_SYSV_ABI scePadOpenExt(s32 userId, s32 type, s32 index, const OrbisPadOpenExtParam* pParam) { LOG_ERROR(Lib_Pad, "(STUBBED) called"); + if (Config::getUseSpecialPad()) { + if (type != ORBIS_PAD_PORT_TYPE_SPECIAL) + return -1; + } else { + if (type != ORBIS_PAD_PORT_TYPE_STANDARD) + return -1; + } return 1; // dummy } diff --git a/src/core/libraries/pad/pad.h b/src/core/libraries/pad/pad.h index 3e9c14a17..b18bbc355 100644 --- a/src/core/libraries/pad/pad.h +++ b/src/core/libraries/pad/pad.h @@ -229,6 +229,13 @@ struct OrbisPadOpenParam { u8 reserve[8]; }; +struct OrbisPadOpenExtParam { + u16 vendorId; + u16 productId; + u16 productId_2; + u8 reserve[10]; +}; + struct OrbisPadLightBarParam { u8 r; u8 g; @@ -284,7 +291,7 @@ int PS4_SYSV_ABI scePadIsValidHandle(); int PS4_SYSV_ABI scePadMbusInit(); int PS4_SYSV_ABI scePadMbusTerm(); int PS4_SYSV_ABI scePadOpen(s32 userId, s32 type, s32 index, const OrbisPadOpenParam* pParam); -int PS4_SYSV_ABI scePadOpenExt(); +int PS4_SYSV_ABI scePadOpenExt(s32 userId, s32 type, s32 index, const OrbisPadOpenExtParam* pParam); int PS4_SYSV_ABI scePadOpenExt2(); int PS4_SYSV_ABI scePadOutputReport(); int PS4_SYSV_ABI scePadRead(s32 handle, OrbisPadData* pData, s32 num); From 550cf0188d40e20df71d99b76237287be63ba13e Mon Sep 17 00:00:00 2001 From: InvoxiPlayGames Date: Wed, 28 Aug 2024 10:51:30 +0100 Subject: [PATCH 47/69] return proper error code for scePadOpen failure --- src/core/libraries/pad/pad.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/core/libraries/pad/pad.cpp b/src/core/libraries/pad/pad.cpp index c4735c9ae..c75e71dfe 100644 --- a/src/core/libraries/pad/pad.cpp +++ b/src/core/libraries/pad/pad.cpp @@ -249,10 +249,10 @@ int PS4_SYSV_ABI scePadOpen(s32 userId, s32 type, s32 index, const OrbisPadOpenP LOG_INFO(Lib_Pad, "(DUMMY) called user_id = {} type = {} index = {}", userId, type, index); if (Config::getUseSpecialPad()) { if (type != ORBIS_PAD_PORT_TYPE_SPECIAL) - return -1; + return ORBIS_PAD_ERROR_DEVICE_NOT_CONNECTED; } else { if (type != ORBIS_PAD_PORT_TYPE_STANDARD) - return -1; + return ORBIS_PAD_ERROR_DEVICE_NOT_CONNECTED; } return 1; // dummy } @@ -261,10 +261,10 @@ int PS4_SYSV_ABI scePadOpenExt(s32 userId, s32 type, s32 index, const OrbisPadOp LOG_ERROR(Lib_Pad, "(STUBBED) called"); if (Config::getUseSpecialPad()) { if (type != ORBIS_PAD_PORT_TYPE_SPECIAL) - return -1; + return ORBIS_PAD_ERROR_DEVICE_NOT_CONNECTED; } else { if (type != ORBIS_PAD_PORT_TYPE_STANDARD) - return -1; + return ORBIS_PAD_ERROR_DEVICE_NOT_CONNECTED; } return 1; // dummy } From 990da7edcc62cae5800bafc8abd92dae91f092cb Mon Sep 17 00:00:00 2001 From: tGecko Date: Wed, 28 Aug 2024 12:10:04 +0200 Subject: [PATCH 48/69] DOCS: Correct and expand windows build instructions (#617) * correct and expand windows build instructions * fix numbering * remove instructions to clone a different branch --- documents/building-windows.md | 39 ++++++++++++++++++++++++++--------- 1 file changed, 29 insertions(+), 10 deletions(-) diff --git a/documents/building-windows.md b/documents/building-windows.md index 684e5fe95..21fd87154 100644 --- a/documents/building-windows.md +++ b/documents/building-windows.md @@ -17,34 +17,53 @@ Note: **ARM64 is not supported!** As of writing, it will not build nor run. The Once you are within the installer: 1. Select `Desktop development with C++` 2. Go to "Individual Components" tab -3. Make sure `C++ Clang Compiler for Windows`, `MSBuild support for LLVM` and `C++ CMake Tools for Windows` are selected +3. Search and select `C++ Clang Compiler for Windows` and `MSBuild support for LLVM` 4. Continue the installation ### (Prerequisite) Download [**Qt**](https://doc.qt.io/qt-6/get-and-install-qt.html) Beware, this requires you to create a Qt account. If you do not want to do this, please follow the MSYS2/MinGW compilation method instead. -1. Select Qt for Visual Studio plugin -2. Select `msvc2019_64` option or similar. If you are on Windows on ARM / Qualcomm Snapdragon Elite X, select `msvc2019_arm64` +1. Under the current, non beta version of Qt (at the time of writing 6.7.2), select the option `MSVC 2019 64-bit` or similar. + If you are on Windows on ARM / Qualcomm Snapdragon Elite X, select `MSVC 2019 ARM64` instead. -Go through the installation normally. If you do not know what components to select, just select the newest Qt version it gives you. -If you know what you are doing, you may unselect individual components that eat up too much disk space. + Go through the installation normally. If you know what you are doing, you may unselect individual components that eat up too much disk space. +2. Download and install [Qt Visual Studio Tools](https://marketplace.visualstudio.com/items?itemName=TheQtCompany.QtVisualStudioTools2022) + Once you are finished, you will have to configure Qt within Visual Studio: 1. Tools -> Options -> Qt -> Versions -2. Add a new Qt version and navigate it to the correct folder. Should look like so: `C:\Qt\6.7.1\msvc2019_64` +2. Add a new Qt version and navigate it to the correct folder. Should look like so: `C:\Qt\6.7.2\msvc2019_64` 3. Enable the default checkmark on the new version you just created. ### (Prerequisite) Download [**Git for Windows**](https://git-scm.com/download/win) Go through the Git for Windows installation as normal -### Compiling with Visual Studio GUI +### Cloning the source code 1. Open Git for Windows, navigate to a place where you want to store the shadPS4 source code folder -2. Run `git clone --depth 1 --recursive https://github.com/shadps4-emu/shadPS4` -3. Open up Visual Studio, select `Open a local folder` and select the folder with the shadPS4 source code. The folder should contain `CMakeLists.txt` -4. Build -> Build All +2. Clone the repository by running + `git clone --depth 1 --recursive https://github.com/shadps4-emu/shadPS4` + +### Compiling with Visual Studio GUI + +1. Open up Visual Studio, select `Open a local folder` and select the folder with the shadPS4 source code. The folder should contain `CMakeLists.txt` +2. Change x64-Clang-Debug to x64-Clang-Release if you want a regular, non-debug build. +3. If you want to build shadPS4 with the Qt Gui: + 1. Click x64-Clang-Release and select "Manage Configurations" + 2. Look for "CMake command arguments" and add to the text field + `-DENABLE_QT_GUI=ON -DCMAKE_PREFIX_PATH=C:\Qt\6.7.2\msvc2019_64` + (Change Qt path if you've installed it to non-default path) + 3. Press CTRL+S to save and wait a moment for CMake generation +4. Change the project to build to shadps4.exe +5. Build -> Build All + +Your shadps4.exe will be in `c:\path\to\source\Build\x64-Clang-Release\` + +To automatically populate the necessary files to run shadPS4.exe, run in a command prompt or terminal: +`C:\Qt\6.7.2\msvc2019_64\bin\windeployqt.exe c:\path\to\shadps4.exe` +(Change Qt path if you've installed it to non-default path) ## Option 2: MSYS2/MinGW From 9d59ea06c784cef14c62fc79170c66995e90d410 Mon Sep 17 00:00:00 2001 From: InvoxiPlayGames Date: Wed, 28 Aug 2024 11:10:20 +0100 Subject: [PATCH 49/69] clang-format fix: scePadOpenExt --- src/core/libraries/pad/pad.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/core/libraries/pad/pad.cpp b/src/core/libraries/pad/pad.cpp index c75e71dfe..5bf9c3af8 100644 --- a/src/core/libraries/pad/pad.cpp +++ b/src/core/libraries/pad/pad.cpp @@ -257,7 +257,8 @@ int PS4_SYSV_ABI scePadOpen(s32 userId, s32 type, s32 index, const OrbisPadOpenP return 1; // dummy } -int PS4_SYSV_ABI scePadOpenExt(s32 userId, s32 type, s32 index, const OrbisPadOpenExtParam* pParam) { +int PS4_SYSV_ABI scePadOpenExt(s32 userId, s32 type, s32 index, + const OrbisPadOpenExtParam* pParam) { LOG_ERROR(Lib_Pad, "(STUBBED) called"); if (Config::getUseSpecialPad()) { if (type != ORBIS_PAD_PORT_TYPE_SPECIAL) From 9f4e55a8e7caf5c2127f1da366b36fdf6aa6df08 Mon Sep 17 00:00:00 2001 From: 0xsegf4ult Date: Wed, 28 Aug 2024 12:10:21 +0200 Subject: [PATCH 50/69] shader_recompiler: constant propagation bitwise operations + S_CMPK_EQ_U32 fix (#613) * rebase on main branch impl of V_LSHL_B64 * remove V_LSHR_B64 * fix S_CMPK_EQ_u32 * fix conflicts * fix broken merge * remove duplicate cases * remove duplicate declaration --- .../backend/spirv/emit_spirv_instructions.h | 1 + .../backend/spirv/emit_spirv_integer.cpp | 7 +++++++ .../frontend/translate/scalar_alu.cpp | 2 +- src/shader_recompiler/ir/ir_emitter.cpp | 14 ++++++++++++-- src/shader_recompiler/ir/ir_emitter.h | 2 +- src/shader_recompiler/ir/opcodes.inc | 1 + .../ir/passes/constant_propagation_pass.cpp | 6 ++++++ 7 files changed, 29 insertions(+), 4 deletions(-) diff --git a/src/shader_recompiler/backend/spirv/emit_spirv_instructions.h b/src/shader_recompiler/backend/spirv/emit_spirv_instructions.h index dd3d8fae9..ce4d3f137 100644 --- a/src/shader_recompiler/backend/spirv/emit_spirv_instructions.h +++ b/src/shader_recompiler/backend/spirv/emit_spirv_instructions.h @@ -286,6 +286,7 @@ Id EmitShiftRightLogical64(EmitContext& ctx, Id base, Id shift); Id EmitShiftRightArithmetic32(EmitContext& ctx, Id base, Id shift); Id EmitShiftRightArithmetic64(EmitContext& ctx, Id base, Id shift); Id EmitBitwiseAnd32(EmitContext& ctx, IR::Inst* inst, Id a, Id b); +Id EmitBitwiseAnd64(EmitContext& ctx, IR::Inst* inst, Id a, Id b); Id EmitBitwiseOr32(EmitContext& ctx, IR::Inst* inst, Id a, Id b); Id EmitBitwiseOr64(EmitContext& ctx, IR::Inst* inst, Id a, Id b); Id EmitBitwiseXor32(EmitContext& ctx, IR::Inst* inst, Id a, Id b); diff --git a/src/shader_recompiler/backend/spirv/emit_spirv_integer.cpp b/src/shader_recompiler/backend/spirv/emit_spirv_integer.cpp index f20c4fac2..a9becb1eb 100644 --- a/src/shader_recompiler/backend/spirv/emit_spirv_integer.cpp +++ b/src/shader_recompiler/backend/spirv/emit_spirv_integer.cpp @@ -139,6 +139,13 @@ Id EmitBitwiseAnd32(EmitContext& ctx, IR::Inst* inst, Id a, Id b) { return result; } +Id EmitBitwiseAnd64(EmitContext& ctx, IR::Inst* inst, Id a, Id b) { + const Id result{ctx.OpBitwiseAnd(ctx.U64, a, b)}; + SetZeroFlag(ctx, inst, result); + SetSignFlag(ctx, inst, result); + return result; +} + Id EmitBitwiseOr32(EmitContext& ctx, IR::Inst* inst, Id a, Id b) { const Id result{ctx.OpBitwiseOr(ctx.U32[1], a, b)}; SetZeroFlag(ctx, inst, result); diff --git a/src/shader_recompiler/frontend/translate/scalar_alu.cpp b/src/shader_recompiler/frontend/translate/scalar_alu.cpp index 50a550d44..7914726f4 100644 --- a/src/shader_recompiler/frontend/translate/scalar_alu.cpp +++ b/src/shader_recompiler/frontend/translate/scalar_alu.cpp @@ -472,7 +472,7 @@ void Translator::S_MIN_U32(const GcnInst& inst) { void Translator::S_CMPK_EQ_U32(const GcnInst& inst) { const s32 simm16 = inst.control.sopk.simm; - const IR::U32 src0{GetSrc(inst.src[0])}; + const IR::U32 src0{GetSrc(inst.dst[0])}; const IR::U32 src1{ir.Imm32(simm16)}; ir.SetScc(ir.IEqual(src0, src1)); } diff --git a/src/shader_recompiler/ir/ir_emitter.cpp b/src/shader_recompiler/ir/ir_emitter.cpp index a65e538cf..65de98b7e 100644 --- a/src/shader_recompiler/ir/ir_emitter.cpp +++ b/src/shader_recompiler/ir/ir_emitter.cpp @@ -1115,8 +1115,18 @@ U32U64 IREmitter::ShiftRightArithmetic(const U32U64& base, const U32& shift) { } } -U32 IREmitter::BitwiseAnd(const U32& a, const U32& b) { - return Inst(Opcode::BitwiseAnd32, a, b); +U32U64 IREmitter::BitwiseAnd(const U32U64& a, const U32U64& b) { + if (a.Type() != b.Type()) { + UNREACHABLE_MSG("Mismatching types {} and {}", a.Type(), b.Type()); + } + switch (a.Type()) { + case Type::U32: + return Inst(Opcode::BitwiseAnd32, a, b); + case Type::U64: + return Inst(Opcode::BitwiseAnd64, a, b); + default: + ThrowInvalidType(a.Type()); + } } U32U64 IREmitter::BitwiseOr(const U32U64& a, const U32U64& b) { diff --git a/src/shader_recompiler/ir/ir_emitter.h b/src/shader_recompiler/ir/ir_emitter.h index 8f806eb50..a60f4c288 100644 --- a/src/shader_recompiler/ir/ir_emitter.h +++ b/src/shader_recompiler/ir/ir_emitter.h @@ -195,7 +195,7 @@ public: [[nodiscard]] U32U64 ShiftLeftLogical(const U32U64& base, const U32& shift); [[nodiscard]] U32U64 ShiftRightLogical(const U32U64& base, const U32& shift); [[nodiscard]] U32U64 ShiftRightArithmetic(const U32U64& base, const U32& shift); - [[nodiscard]] U32 BitwiseAnd(const U32& a, const U32& b); + [[nodiscard]] U32U64 BitwiseAnd(const U32U64& a, const U32U64& b); [[nodiscard]] U32U64 BitwiseOr(const U32U64& a, const U32U64& b); [[nodiscard]] U32 BitwiseXor(const U32& a, const U32& b); [[nodiscard]] U32 BitFieldInsert(const U32& base, const U32& insert, const U32& offset, diff --git a/src/shader_recompiler/ir/opcodes.inc b/src/shader_recompiler/ir/opcodes.inc index 26da00bbd..a49ea1c77 100644 --- a/src/shader_recompiler/ir/opcodes.inc +++ b/src/shader_recompiler/ir/opcodes.inc @@ -260,6 +260,7 @@ OPCODE(ShiftRightLogical64, U64, U64, OPCODE(ShiftRightArithmetic32, U32, U32, U32, ) OPCODE(ShiftRightArithmetic64, U64, U64, U32, ) OPCODE(BitwiseAnd32, U32, U32, U32, ) +OPCODE(BitwiseAnd64, U64, U64, U64, ) OPCODE(BitwiseOr32, U32, U32, U32, ) OPCODE(BitwiseOr64, U64, U64, U64, ) OPCODE(BitwiseXor32, U32, U32, U32, ) diff --git a/src/shader_recompiler/ir/passes/constant_propagation_pass.cpp b/src/shader_recompiler/ir/passes/constant_propagation_pass.cpp index b0d9dcc45..87a069338 100644 --- a/src/shader_recompiler/ir/passes/constant_propagation_pass.cpp +++ b/src/shader_recompiler/ir/passes/constant_propagation_pass.cpp @@ -352,9 +352,15 @@ void ConstantPropagation(IR::Block& block, IR::Inst& inst) { case IR::Opcode::BitwiseAnd32: FoldWhenAllImmediates(inst, [](u32 a, u32 b) { return a & b; }); return; + case IR::Opcode::BitwiseAnd64: + FoldWhenAllImmediates(inst, [](u64 a, u64 b) { return a & b; }); + return; case IR::Opcode::BitwiseOr32: FoldWhenAllImmediates(inst, [](u32 a, u32 b) { return a | b; }); return; + case IR::Opcode::BitwiseOr64: + FoldWhenAllImmediates(inst, [](u64 a, u64 b) { return a | b; }); + return; case IR::Opcode::BitwiseXor32: FoldWhenAllImmediates(inst, [](u32 a, u32 b) { return a ^ b; }); return; From 8192eaa668d6a1ba4b70dd3be01fbf6378ea136e Mon Sep 17 00:00:00 2001 From: Vinicius Rangel Date: Wed, 28 Aug 2024 07:11:55 -0300 Subject: [PATCH 51/69] video_core: re-enable culling (#551) --- src/video_core/renderer_vulkan/vk_graphics_pipeline.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/video_core/renderer_vulkan/vk_graphics_pipeline.cpp b/src/video_core/renderer_vulkan/vk_graphics_pipeline.cpp index 95d3a4b2d..5623e431c 100644 --- a/src/video_core/renderer_vulkan/vk_graphics_pipeline.cpp +++ b/src/video_core/renderer_vulkan/vk_graphics_pipeline.cpp @@ -94,7 +94,7 @@ GraphicsPipeline::GraphicsPipeline(const Instance& instance_, Scheduler& schedul .depthClampEnable = false, .rasterizerDiscardEnable = false, .polygonMode = LiverpoolToVK::PolygonMode(key.polygon_mode), - .cullMode = vk::CullModeFlagBits::eNone /*LiverpoolToVK::CullMode(key.cull_mode)*/, + .cullMode = LiverpoolToVK::CullMode(key.cull_mode), .frontFace = key.front_face == Liverpool::FrontFace::Clockwise ? vk::FrontFace::eClockwise : vk::FrontFace::eCounterClockwise, From da966bedfdffb039069b496c0274e4b0bfbaf6e4 Mon Sep 17 00:00:00 2001 From: squidbus <175574877+squidbus@users.noreply.github.com> Date: Wed, 28 Aug 2024 03:13:33 -0700 Subject: [PATCH 52/69] kernel: Reimplement POSIX semaphores using std::counting_semaphore. (#600) --- CMakeLists.txt | 4 - .../libraries/kernel/thread_management.cpp | 135 +++++++++--------- src/core/libraries/kernel/thread_management.h | 7 + 3 files changed, 78 insertions(+), 68 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 6450eaf15..04740784b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -95,10 +95,6 @@ check_symbol_exists(pthread_mutex_timedlock "pthread.h" HAVE_PTHREAD_MUTEX_TIMED if(HAVE_PTHREAD_MUTEX_TIMEDLOCK OR WIN32) add_compile_options(-DHAVE_PTHREAD_MUTEX_TIMEDLOCK) endif() -check_symbol_exists(sem_timedwait "semaphore.h" HAVE_SEM_TIMEDWAIT) -if(HAVE_SEM_TIMEDWAIT OR WIN32) - add_compile_options(-DHAVE_SEM_TIMEDWAIT) -endif() if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang" OR CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang") # libc++ requires -fexperimental-library to enable std::jthread and std::stop_token support. diff --git a/src/core/libraries/kernel/thread_management.cpp b/src/core/libraries/kernel/thread_management.cpp index 567ac867e..605d0d29f 100644 --- a/src/core/libraries/kernel/thread_management.cpp +++ b/src/core/libraries/kernel/thread_management.cpp @@ -2,8 +2,8 @@ // SPDX-License-Identifier: GPL-2.0-or-later #include +#include #include -#include #include "common/alignment.h" #include "common/assert.h" #include "common/error.h" @@ -1374,90 +1374,97 @@ int PS4_SYSV_ABI posix_pthread_detach(ScePthread thread) { return pthread_detach(thread->pth); } -int PS4_SYSV_ABI posix_sem_init(sem_t* sem, int pshared, unsigned int value) { - int result = sem_init(sem, pshared, value); - if (result == -1) { - SetPosixErrno(errno); +int PS4_SYSV_ABI posix_sem_init(PthreadSemInternal** sem, int pshared, unsigned int value) { + if (value > ORBIS_KERNEL_SEM_VALUE_MAX) { + SetPosixErrno(EINVAL); + return -1; } - return result; + if (sem != nullptr) { + *sem = new PthreadSemInternal{ + .semaphore = std::counting_semaphore{value}, + .value = {static_cast(value)}, + }; + } + return 0; } -int PS4_SYSV_ABI posix_sem_wait(sem_t* sem) { - int result = sem_wait(sem); - if (result == -1) { - SetPosixErrno(errno); +int PS4_SYSV_ABI posix_sem_wait(PthreadSemInternal** sem) { + if (sem == nullptr || *sem == nullptr) { + SetPosixErrno(EINVAL); + return -1; } - return result; + (*sem)->semaphore.acquire(); + --(*sem)->value; + return 0; } -int PS4_SYSV_ABI posix_sem_trywait(sem_t* sem) { - int result = sem_trywait(sem); - if (result == -1) { - SetPosixErrno(errno); +int PS4_SYSV_ABI posix_sem_trywait(PthreadSemInternal** sem) { + if (sem == nullptr || *sem == nullptr) { + SetPosixErrno(EINVAL); + return -1; } - return result; + if (!(*sem)->semaphore.try_acquire()) { + SetPosixErrno(EAGAIN); + return -1; + } + --(*sem)->value; + return 0; } -#ifndef HAVE_SEM_TIMEDWAIT -int sem_timedwait(sem_t* sem, const struct timespec* abstime) { - int rc; - while ((rc = sem_trywait(sem)) == EAGAIN) { - struct timespec curr_time; - clock_gettime(CLOCK_REALTIME, &curr_time); - - s64 remaining_ns = 0; - remaining_ns += - (static_cast(abstime->tv_sec) - static_cast(curr_time.tv_sec)) * 1000000000L; - remaining_ns += static_cast(abstime->tv_nsec) - static_cast(curr_time.tv_nsec); - - if (remaining_ns <= 0) { - return ETIMEDOUT; - } - - struct timespec sleep_time; - sleep_time.tv_sec = 0; - if (remaining_ns < 5000000L) { - sleep_time.tv_nsec = remaining_ns; - } else { - sleep_time.tv_nsec = 5000000; - } - - nanosleep(&sleep_time, nullptr); +int PS4_SYSV_ABI posix_sem_timedwait(PthreadSemInternal** sem, const timespec* t) { + if (sem == nullptr || *sem == nullptr) { + SetPosixErrno(EINVAL); + return -1; } - return rc; -} -#endif -int PS4_SYSV_ABI posix_sem_timedwait(sem_t* sem, const timespec* t) { - int result = sem_timedwait(sem, t); - if (result == -1) { - SetPosixErrno(errno); + using std::chrono::duration_cast; + using std::chrono::nanoseconds; + using std::chrono::seconds; + using std::chrono::system_clock; + + const system_clock::time_point time{ + duration_cast(seconds{t->tv_sec} + nanoseconds{t->tv_nsec})}; + if (!(*sem)->semaphore.try_acquire_until(time)) { + SetPosixErrno(ETIMEDOUT); + return -1; } - return result; + --(*sem)->value; + return 0; } -int PS4_SYSV_ABI posix_sem_post(sem_t* sem) { - int result = sem_post(sem); - if (result == -1) { - SetPosixErrno(errno); +int PS4_SYSV_ABI posix_sem_post(PthreadSemInternal** sem) { + if (sem == nullptr || *sem == nullptr) { + SetPosixErrno(EINVAL); + return -1; } - return result; + if ((*sem)->value == ORBIS_KERNEL_SEM_VALUE_MAX) { + SetPosixErrno(EOVERFLOW); + return -1; + } + ++(*sem)->value; + (*sem)->semaphore.release(); + return 0; } -int PS4_SYSV_ABI posix_sem_destroy(sem_t* sem) { - int result = sem_destroy(sem); - if (result == -1) { - SetPosixErrno(errno); +int PS4_SYSV_ABI posix_sem_destroy(PthreadSemInternal** sem) { + if (sem == nullptr || *sem == nullptr) { + SetPosixErrno(EINVAL); + return -1; } - return result; + delete *sem; + *sem = nullptr; + return 0; } -int PS4_SYSV_ABI posix_sem_getvalue(sem_t* sem, int* sval) { - int result = sem_getvalue(sem, sval); - if (result == -1) { - SetPosixErrno(errno); +int PS4_SYSV_ABI posix_sem_getvalue(PthreadSemInternal** sem, int* sval) { + if (sem == nullptr || *sem == nullptr) { + SetPosixErrno(EINVAL); + return -1; } - return result; + if (sval) { + *sval = (*sem)->value; + } + return 0; } int PS4_SYSV_ABI posix_pthread_attr_getstacksize(const pthread_attr_t* attr, size_t* size) { diff --git a/src/core/libraries/kernel/thread_management.h b/src/core/libraries/kernel/thread_management.h index 3679af84f..27cd7929a 100644 --- a/src/core/libraries/kernel/thread_management.h +++ b/src/core/libraries/kernel/thread_management.h @@ -5,6 +5,7 @@ #include #include +#include #include #include #include @@ -19,6 +20,7 @@ namespace Libraries::Kernel { constexpr int ORBIS_KERNEL_PRIO_FIFO_DEFAULT = 700; constexpr int ORBIS_KERNEL_PRIO_FIFO_HIGHEST = 256; constexpr int ORBIS_KERNEL_PRIO_FIFO_LOWEST = 767; +constexpr int ORBIS_KERNEL_SEM_VALUE_MAX = 0x7FFFFFFF; constexpr int ORBIS_PTHREAD_MUTEX_ERRORCHECK = 1; constexpr int ORBIS_PTHREAD_MUTEX_RECURSIVE = 2; @@ -109,6 +111,11 @@ struct PthreadRwInternal { std::string name; }; +struct PthreadSemInternal { + std::counting_semaphore semaphore; + std::atomic value; +}; + class PThreadPool { public: ScePthread Create(); From 4a6ce1e0d6e3cc7497a600dd9a62d68cbbe3422f Mon Sep 17 00:00:00 2001 From: squidbus <175574877+squidbus@users.noreply.github.com> Date: Wed, 28 Aug 2024 03:36:15 -0700 Subject: [PATCH 53/69] crypto: Fix deallocation of key data while in use. --- src/core/crypto/crypto.cpp | 61 ++-- src/core/crypto/crypto.h | 4 - src/core/crypto/keys.h | 650 +++++++++++++++---------------------- 3 files changed, 296 insertions(+), 419 deletions(-) diff --git a/src/core/crypto/crypto.cpp b/src/core/crypto/crypto.cpp index fc64edc2d..aa1c96724 100644 --- a/src/core/crypto/crypto.cpp +++ b/src/core/crypto/crypto.cpp @@ -6,18 +6,18 @@ CryptoPP::RSA::PrivateKey Crypto::key_pkg_derived_key3_keyset_init() { CryptoPP::InvertibleRSAFunction params; - params.SetPrime1(CryptoPP::Integer(pkg_derived_key3_keyset.Prime1, 0x80)); - params.SetPrime2(CryptoPP::Integer(pkg_derived_key3_keyset.Prime2, 0x80)); + params.SetPrime1(CryptoPP::Integer(PkgDerivedKey3Keyset::Prime1, 0x80)); + params.SetPrime2(CryptoPP::Integer(PkgDerivedKey3Keyset::Prime2, 0x80)); - params.SetPublicExponent(CryptoPP::Integer(pkg_derived_key3_keyset.PublicExponent, 4)); - params.SetPrivateExponent(CryptoPP::Integer(pkg_derived_key3_keyset.PrivateExponent, 0x100)); + params.SetPublicExponent(CryptoPP::Integer(PkgDerivedKey3Keyset::PublicExponent, 4)); + params.SetPrivateExponent(CryptoPP::Integer(PkgDerivedKey3Keyset::PrivateExponent, 0x100)); - params.SetModPrime1PrivateExponent(CryptoPP::Integer(pkg_derived_key3_keyset.Exponent1, 0x80)); - params.SetModPrime2PrivateExponent(CryptoPP::Integer(pkg_derived_key3_keyset.Exponent2, 0x80)); + params.SetModPrime1PrivateExponent(CryptoPP::Integer(PkgDerivedKey3Keyset::Exponent1, 0x80)); + params.SetModPrime2PrivateExponent(CryptoPP::Integer(PkgDerivedKey3Keyset::Exponent2, 0x80)); - params.SetModulus(CryptoPP::Integer(pkg_derived_key3_keyset.Modulus, 0x100)); + params.SetModulus(CryptoPP::Integer(PkgDerivedKey3Keyset::Modulus, 0x100)); params.SetMultiplicativeInverseOfPrime2ModPrime1( - CryptoPP::Integer(pkg_derived_key3_keyset.Coefficient, 0x80)); + CryptoPP::Integer(PkgDerivedKey3Keyset::Coefficient, 0x80)); CryptoPP::RSA::PrivateKey privateKey(params); @@ -26,18 +26,18 @@ CryptoPP::RSA::PrivateKey Crypto::key_pkg_derived_key3_keyset_init() { CryptoPP::RSA::PrivateKey Crypto::FakeKeyset_keyset_init() { CryptoPP::InvertibleRSAFunction params; - params.SetPrime1(CryptoPP::Integer(FakeKeyset_keyset.Prime1, 0x80)); - params.SetPrime2(CryptoPP::Integer(FakeKeyset_keyset.Prime2, 0x80)); + params.SetPrime1(CryptoPP::Integer(FakeKeyset::Prime1, 0x80)); + params.SetPrime2(CryptoPP::Integer(FakeKeyset::Prime2, 0x80)); - params.SetPublicExponent(CryptoPP::Integer(FakeKeyset_keyset.PublicExponent, 4)); - params.SetPrivateExponent(CryptoPP::Integer(FakeKeyset_keyset.PrivateExponent, 0x100)); + params.SetPublicExponent(CryptoPP::Integer(FakeKeyset::PublicExponent, 4)); + params.SetPrivateExponent(CryptoPP::Integer(FakeKeyset::PrivateExponent, 0x100)); - params.SetModPrime1PrivateExponent(CryptoPP::Integer(FakeKeyset_keyset.Exponent1, 0x80)); - params.SetModPrime2PrivateExponent(CryptoPP::Integer(FakeKeyset_keyset.Exponent2, 0x80)); + params.SetModPrime1PrivateExponent(CryptoPP::Integer(FakeKeyset::Exponent1, 0x80)); + params.SetModPrime2PrivateExponent(CryptoPP::Integer(FakeKeyset::Exponent2, 0x80)); - params.SetModulus(CryptoPP::Integer(FakeKeyset_keyset.Modulus, 0x100)); + params.SetModulus(CryptoPP::Integer(FakeKeyset::Modulus, 0x100)); params.SetMultiplicativeInverseOfPrime2ModPrime1( - CryptoPP::Integer(FakeKeyset_keyset.Coefficient, 0x80)); + CryptoPP::Integer(FakeKeyset::Coefficient, 0x80)); CryptoPP::RSA::PrivateKey privateKey(params); @@ -46,25 +46,22 @@ CryptoPP::RSA::PrivateKey Crypto::FakeKeyset_keyset_init() { CryptoPP::RSA::PrivateKey Crypto::DebugRifKeyset_init() { CryptoPP::InvertibleRSAFunction params; - params.SetPrime1( - CryptoPP::Integer(DebugRifKeyset_keyset.Prime1, sizeof(DebugRifKeyset_keyset.Prime1))); - params.SetPrime2( - CryptoPP::Integer(DebugRifKeyset_keyset.Prime2, sizeof(DebugRifKeyset_keyset.Prime2))); + params.SetPrime1(CryptoPP::Integer(DebugRifKeyset::Prime1, sizeof(DebugRifKeyset::Prime1))); + params.SetPrime2(CryptoPP::Integer(DebugRifKeyset::Prime2, sizeof(DebugRifKeyset::Prime2))); - params.SetPublicExponent(CryptoPP::Integer(DebugRifKeyset_keyset.PublicExponent, - sizeof(DebugRifKeyset_keyset.PublicExponent))); - params.SetPrivateExponent(CryptoPP::Integer(DebugRifKeyset_keyset.PrivateExponent, - sizeof(DebugRifKeyset_keyset.PrivateExponent))); + params.SetPublicExponent( + CryptoPP::Integer(DebugRifKeyset::PublicExponent, sizeof(DebugRifKeyset::PublicExponent))); + params.SetPrivateExponent(CryptoPP::Integer(DebugRifKeyset::PrivateExponent, + sizeof(DebugRifKeyset::PrivateExponent))); - params.SetModPrime1PrivateExponent(CryptoPP::Integer(DebugRifKeyset_keyset.Exponent1, - sizeof(DebugRifKeyset_keyset.Exponent1))); - params.SetModPrime2PrivateExponent(CryptoPP::Integer(DebugRifKeyset_keyset.Exponent2, - sizeof(DebugRifKeyset_keyset.Exponent2))); + params.SetModPrime1PrivateExponent( + CryptoPP::Integer(DebugRifKeyset::Exponent1, sizeof(DebugRifKeyset::Exponent1))); + params.SetModPrime2PrivateExponent( + CryptoPP::Integer(DebugRifKeyset::Exponent2, sizeof(DebugRifKeyset::Exponent2))); - params.SetModulus( - CryptoPP::Integer(DebugRifKeyset_keyset.Modulus, sizeof(DebugRifKeyset_keyset.Modulus))); - params.SetMultiplicativeInverseOfPrime2ModPrime1(CryptoPP::Integer( - DebugRifKeyset_keyset.Coefficient, sizeof(DebugRifKeyset_keyset.Coefficient))); + params.SetModulus(CryptoPP::Integer(DebugRifKeyset::Modulus, sizeof(DebugRifKeyset::Modulus))); + params.SetMultiplicativeInverseOfPrime2ModPrime1( + CryptoPP::Integer(DebugRifKeyset::Coefficient, sizeof(DebugRifKeyset::Coefficient))); CryptoPP::RSA::PrivateKey privateKey(params); diff --git a/src/core/crypto/crypto.h b/src/core/crypto/crypto.h index 0c5bc9955..83249bd7d 100644 --- a/src/core/crypto/crypto.h +++ b/src/core/crypto/crypto.h @@ -17,10 +17,6 @@ class Crypto { public: - PkgDerivedKey3Keyset pkg_derived_key3_keyset; - FakeKeyset FakeKeyset_keyset; - DebugRifKeyset DebugRifKeyset_keyset; - CryptoPP::RSA::PrivateKey key_pkg_derived_key3_keyset_init(); CryptoPP::RSA::PrivateKey FakeKeyset_keyset_init(); CryptoPP::RSA::PrivateKey DebugRifKeyset_init(); diff --git a/src/core/crypto/keys.h b/src/core/crypto/keys.h index 58466b764..441082481 100644 --- a/src/core/crypto/keys.h +++ b/src/core/crypto/keys.h @@ -7,415 +7,299 @@ class FakeKeyset { public: // Constructor - const CryptoPP::byte* Exponent1; + static constexpr CryptoPP::byte Exponent1[] = { + 0x6D, 0x48, 0xE0, 0x54, 0x40, 0x25, 0xC8, 0x41, 0x29, 0x52, 0x42, 0x27, 0xEB, 0xD2, 0xC7, + 0xAB, 0x6B, 0x9C, 0x27, 0x0A, 0xB4, 0x1F, 0x94, 0x4E, 0xFA, 0x42, 0x1D, 0xB7, 0xBC, 0xB9, + 0xAE, 0xBC, 0x04, 0x6F, 0x75, 0x8F, 0x10, 0x5F, 0x89, 0xAC, 0xAB, 0x9C, 0xD2, 0xFA, 0xE6, + 0xA4, 0x13, 0x83, 0x68, 0xD4, 0x56, 0x38, 0xFE, 0xE5, 0x2B, 0x78, 0x44, 0x9C, 0x34, 0xE6, + 0x5A, 0xA0, 0xBE, 0x05, 0x70, 0xAD, 0x15, 0xC3, 0x2D, 0x31, 0xAC, 0x97, 0x5D, 0x88, 0xFC, + 0xC1, 0x62, 0x3D, 0xE2, 0xED, 0x11, 0xDB, 0xB6, 0x9E, 0xFC, 0x5A, 0x5A, 0x03, 0xF6, 0xCF, + 0x08, 0xD4, 0x5D, 0x90, 0xC9, 0x2A, 0xB9, 0x9B, 0xCF, 0xC8, 0x1A, 0x65, 0xF3, 0x5B, 0xE8, + 0x7F, 0xCF, 0xA5, 0xA6, 0x4C, 0x5C, 0x2A, 0x12, 0x0F, 0x92, 0xA5, 0xE3, 0xF0, 0x17, 0x1E, + 0x9A, 0x97, 0x45, 0x86, 0xFD, 0xDB, 0x54, 0x25}; // exponent2 = d mod (q - 1) - const CryptoPP::byte* Exponent2; + static constexpr CryptoPP::byte Exponent2[] = { + 0x2A, 0x51, 0xCE, 0x02, 0x44, 0x28, 0x50, 0xE8, 0x30, 0x20, 0x7C, 0x9C, 0x55, 0xBF, 0x60, + 0x39, 0xBC, 0xD1, 0xF0, 0xE7, 0x68, 0xF8, 0x08, 0x5B, 0x61, 0x1F, 0xA7, 0xBF, 0xD0, 0xE8, + 0x8B, 0xB5, 0xB1, 0xD5, 0xD9, 0x16, 0xAC, 0x75, 0x0C, 0x6D, 0xF2, 0xE0, 0xB5, 0x97, 0x75, + 0xD2, 0x68, 0x16, 0x1F, 0x00, 0x7D, 0x8B, 0x17, 0xE8, 0x78, 0x48, 0x41, 0x71, 0x2B, 0x18, + 0x96, 0x80, 0x11, 0xDB, 0x68, 0x39, 0x9C, 0xD6, 0xE0, 0x72, 0x42, 0x86, 0xF0, 0x1B, 0x16, + 0x0D, 0x3E, 0x12, 0x94, 0x3D, 0x25, 0xA8, 0xA9, 0x30, 0x9E, 0x54, 0x5A, 0xD6, 0x36, 0x6C, + 0xD6, 0x8C, 0x20, 0x62, 0x8F, 0xA1, 0x6B, 0x1F, 0x7C, 0x6D, 0xB2, 0xB1, 0xC1, 0x2E, 0xAD, + 0x36, 0x02, 0x9C, 0x3A, 0xCA, 0x2F, 0x09, 0xD2, 0x45, 0x9E, 0xEB, 0xF2, 0xBC, 0x6C, 0xAA, + 0x3B, 0x3E, 0x90, 0xBC, 0x38, 0x67, 0x35, 0x4D}; // e - const CryptoPP::byte* PublicExponent; + static constexpr CryptoPP::byte PublicExponent[] = {0, 1, 0, 1}; // (InverseQ)(q) = 1 mod p - const CryptoPP::byte* Coefficient; + static constexpr CryptoPP::byte Coefficient[] = { + 0x0B, 0x67, 0x1C, 0x0D, 0x6C, 0x57, 0xD3, 0xE7, 0x05, 0x65, 0x94, 0x31, 0x56, 0x55, 0xFD, + 0x28, 0x08, 0xFA, 0x05, 0x8A, 0xCC, 0x55, 0x39, 0x61, 0x97, 0x63, 0xA0, 0x16, 0x27, 0x3D, + 0xED, 0xC1, 0x16, 0x40, 0x2A, 0x12, 0xEA, 0x6F, 0xD9, 0xD8, 0x58, 0x56, 0xA8, 0x56, 0x8B, + 0x0D, 0x38, 0x5E, 0x1E, 0x80, 0x3B, 0x5F, 0x40, 0x80, 0x6F, 0x62, 0x4F, 0x28, 0xA2, 0x69, + 0xF3, 0xD3, 0xF7, 0xFD, 0xB2, 0xC3, 0x52, 0x43, 0x20, 0x92, 0x9D, 0x97, 0x8D, 0xA0, 0x15, + 0x07, 0x15, 0x6E, 0xA4, 0x0D, 0x56, 0xD3, 0x37, 0x1A, 0xC4, 0x9E, 0xDF, 0x02, 0x49, 0xB8, + 0x0A, 0x84, 0x62, 0xF5, 0xFA, 0xB9, 0x3F, 0xA4, 0x09, 0x76, 0xCC, 0xAA, 0xB9, 0x9B, 0xA6, + 0x4F, 0xC1, 0x6A, 0x64, 0xCE, 0xD8, 0x77, 0xAB, 0x4B, 0xF9, 0xA0, 0xAE, 0xDA, 0xF1, 0x67, + 0x87, 0x7C, 0x98, 0x5C, 0x7E, 0xB8, 0x73, 0xF5}; // n = p * q - const CryptoPP::byte* Modulus; + static constexpr CryptoPP::byte Modulus[] = { + 0xC6, 0xCF, 0x71, 0xE7, 0xE5, 0x9A, 0xF0, 0xD1, 0x2A, 0x2C, 0x45, 0x8B, 0xF9, 0x2A, 0x0E, + 0xC1, 0x43, 0x05, 0x8B, 0xC3, 0x71, 0x17, 0x80, 0x1D, 0xCD, 0x49, 0x7D, 0xDE, 0x35, 0x9D, + 0x25, 0x9B, 0xA0, 0xD7, 0xA0, 0xF2, 0x7D, 0x6C, 0x08, 0x7E, 0xAA, 0x55, 0x02, 0x68, 0x2B, + 0x23, 0xC6, 0x44, 0xB8, 0x44, 0x18, 0xEB, 0x56, 0xCF, 0x16, 0xA2, 0x48, 0x03, 0xC9, 0xE7, + 0x4F, 0x87, 0xEB, 0x3D, 0x30, 0xC3, 0x15, 0x88, 0xBF, 0x20, 0xE7, 0x9D, 0xFF, 0x77, 0x0C, + 0xDE, 0x1D, 0x24, 0x1E, 0x63, 0xA9, 0x4F, 0x8A, 0xBF, 0x5B, 0xBE, 0x60, 0x19, 0x68, 0x33, + 0x3B, 0xFC, 0xED, 0x9F, 0x47, 0x4E, 0x5F, 0xF8, 0xEA, 0xCB, 0x3D, 0x00, 0xBD, 0x67, 0x01, + 0xF9, 0x2C, 0x6D, 0xC6, 0xAC, 0x13, 0x64, 0xE7, 0x67, 0x14, 0xF3, 0xDC, 0x52, 0x69, 0x6A, + 0xB9, 0x83, 0x2C, 0x42, 0x30, 0x13, 0x1B, 0xB2, 0xD8, 0xA5, 0x02, 0x0D, 0x79, 0xED, 0x96, + 0xB1, 0x0D, 0xF8, 0xCC, 0x0C, 0xDF, 0x81, 0x95, 0x4F, 0x03, 0x58, 0x09, 0x57, 0x0E, 0x80, + 0x69, 0x2E, 0xFE, 0xFF, 0x52, 0x77, 0xEA, 0x75, 0x28, 0xA8, 0xFB, 0xC9, 0xBE, 0xBF, 0x9F, + 0xBB, 0xB7, 0x79, 0x8E, 0x18, 0x05, 0xE1, 0x80, 0xBD, 0x50, 0x34, 0x94, 0x81, 0xD3, 0x53, + 0xC2, 0x69, 0xA2, 0xD2, 0x4C, 0xCF, 0x6C, 0xF4, 0x57, 0x2C, 0x10, 0x4A, 0x3F, 0xFB, 0x22, + 0xFD, 0x8B, 0x97, 0xE2, 0xC9, 0x5B, 0xA6, 0x2B, 0xCD, 0xD6, 0x1B, 0x6B, 0xDB, 0x68, 0x7F, + 0x4B, 0xC2, 0xA0, 0x50, 0x34, 0xC0, 0x05, 0xE5, 0x8D, 0xEF, 0x24, 0x67, 0xFF, 0x93, 0x40, + 0xCF, 0x2D, 0x62, 0xA2, 0xA0, 0x50, 0xB1, 0xF1, 0x3A, 0xA8, 0x3D, 0xFD, 0x80, 0xD1, 0xF9, + 0xB8, 0x05, 0x22, 0xAF, 0xC8, 0x35, 0x45, 0x90, 0x58, 0x8E, 0xE3, 0x3A, 0x7C, 0xBD, 0x3E, + 0x27}; // p - const CryptoPP::byte* Prime1; + static constexpr CryptoPP::byte Prime1[] = { + 0xFE, 0xF6, 0xBF, 0x1D, 0x69, 0xAB, 0x16, 0x25, 0x08, 0x47, 0x55, 0x6B, 0x86, 0xE4, 0x35, + 0x88, 0x72, 0x2A, 0xB1, 0x3D, 0xF8, 0xB6, 0x44, 0xCA, 0xB3, 0xAB, 0x19, 0xD1, 0x04, 0x24, + 0x28, 0x0A, 0x74, 0x55, 0xB8, 0x15, 0x45, 0x09, 0xCC, 0x13, 0x1C, 0xF2, 0xBA, 0x37, 0xA9, + 0x03, 0x90, 0x8F, 0x02, 0x10, 0xFF, 0x25, 0x79, 0x86, 0xCC, 0x18, 0x50, 0x9A, 0x10, 0x5F, + 0x5B, 0x4C, 0x1C, 0x4E, 0xB0, 0xA7, 0xE3, 0x59, 0xB1, 0x2D, 0xA0, 0xC6, 0xB0, 0x20, 0x2C, + 0x21, 0x33, 0x12, 0xB3, 0xAF, 0x72, 0x34, 0x83, 0xCD, 0x52, 0x2F, 0xAF, 0x0F, 0x20, 0x5A, + 0x1B, 0xC0, 0xE2, 0xA3, 0x76, 0x34, 0x0F, 0xD7, 0xFC, 0xC1, 0x41, 0xC9, 0xF9, 0x79, 0x40, + 0x17, 0x42, 0x21, 0x3E, 0x9D, 0xFD, 0xC7, 0xC1, 0x50, 0xDE, 0x44, 0x5A, 0xC9, 0x31, 0x89, + 0x6A, 0x78, 0x05, 0xBE, 0x65, 0xB4, 0xE8, 0x2D}; // q - const CryptoPP::byte* Prime2; - const CryptoPP::byte* PrivateExponent; - - // Constructor - FakeKeyset() { - // Initialize PrivateExponent - PrivateExponent = new CryptoPP::byte[0x100]{ - 0x7F, 0x76, 0xCD, 0x0E, 0xE2, 0xD4, 0xDE, 0x05, 0x1C, 0xC6, 0xD9, 0xA8, 0x0E, 0x8D, - 0xFA, 0x7B, 0xCA, 0x1E, 0xAA, 0x27, 0x1A, 0x40, 0xF8, 0xF1, 0x22, 0x87, 0x35, 0xDD, - 0xDB, 0xFD, 0xEE, 0xF8, 0xC2, 0xBC, 0xBD, 0x01, 0xFB, 0x8B, 0xE2, 0x3E, 0x63, 0xB2, - 0xB1, 0x22, 0x5C, 0x56, 0x49, 0x6E, 0x11, 0xBE, 0x07, 0x44, 0x0B, 0x9A, 0x26, 0x66, - 0xD1, 0x49, 0x2C, 0x8F, 0xD3, 0x1B, 0xCF, 0xA4, 0xA1, 0xB8, 0xD1, 0xFB, 0xA4, 0x9E, - 0xD2, 0x21, 0x28, 0x83, 0x09, 0x8A, 0xF6, 0xA0, 0x0B, 0xA3, 0xD6, 0x0F, 0x9B, 0x63, - 0x68, 0xCC, 0xBC, 0x0C, 0x4E, 0x14, 0x5B, 0x27, 0xA4, 0xA9, 0xF4, 0x2B, 0xB9, 0xB8, - 0x7B, 0xC0, 0xE6, 0x51, 0xAD, 0x1D, 0x77, 0xD4, 0x6B, 0xB9, 0xCE, 0x20, 0xD1, 0x26, - 0x66, 0x7E, 0x5E, 0x9E, 0xA2, 0xE9, 0x6B, 0x90, 0xF3, 0x73, 0xB8, 0x52, 0x8F, 0x44, - 0x11, 0x03, 0x0C, 0x13, 0x97, 0x39, 0x3D, 0x13, 0x22, 0x58, 0xD5, 0x43, 0x82, 0x49, - 0xDA, 0x6E, 0x7C, 0xA1, 0xC5, 0x8C, 0xA5, 0xB0, 0x09, 0xE0, 0xCE, 0x3D, 0xDF, 0xF4, - 0x9D, 0x3C, 0x97, 0x15, 0xE2, 0x6A, 0xC7, 0x2B, 0x3C, 0x50, 0x93, 0x23, 0xDB, 0xBA, - 0x4A, 0x22, 0x66, 0x44, 0xAC, 0x78, 0xBB, 0x0E, 0x1A, 0x27, 0x43, 0xB5, 0x71, 0x67, - 0xAF, 0xF4, 0xAB, 0x48, 0x46, 0x93, 0x73, 0xD0, 0x42, 0xAB, 0x93, 0x63, 0xE5, 0x6C, - 0x9A, 0xDE, 0x50, 0x24, 0xC0, 0x23, 0x7D, 0x99, 0x79, 0x3F, 0x22, 0x07, 0xE0, 0xC1, - 0x48, 0x56, 0x1B, 0xDF, 0x83, 0x09, 0x12, 0xB4, 0x2D, 0x45, 0x6B, 0xC9, 0xC0, 0x68, - 0x85, 0x99, 0x90, 0x79, 0x96, 0x1A, 0xD7, 0xF5, 0x4D, 0x1F, 0x37, 0x83, 0x40, 0x4A, - 0xEC, 0x39, 0x37, 0xA6, 0x80, 0x92, 0x7D, 0xC5, 0x80, 0xC7, 0xD6, 0x6F, 0xFE, 0x8A, - 0x79, 0x89, 0xC6, 0xB1}; - - // Initialize Exponent1 - Exponent1 = new CryptoPP::byte[0x80]{ - 0x6D, 0x48, 0xE0, 0x54, 0x40, 0x25, 0xC8, 0x41, 0x29, 0x52, 0x42, 0x27, 0xEB, - 0xD2, 0xC7, 0xAB, 0x6B, 0x9C, 0x27, 0x0A, 0xB4, 0x1F, 0x94, 0x4E, 0xFA, 0x42, - 0x1D, 0xB7, 0xBC, 0xB9, 0xAE, 0xBC, 0x04, 0x6F, 0x75, 0x8F, 0x10, 0x5F, 0x89, - 0xAC, 0xAB, 0x9C, 0xD2, 0xFA, 0xE6, 0xA4, 0x13, 0x83, 0x68, 0xD4, 0x56, 0x38, - 0xFE, 0xE5, 0x2B, 0x78, 0x44, 0x9C, 0x34, 0xE6, 0x5A, 0xA0, 0xBE, 0x05, 0x70, - 0xAD, 0x15, 0xC3, 0x2D, 0x31, 0xAC, 0x97, 0x5D, 0x88, 0xFC, 0xC1, 0x62, 0x3D, - 0xE2, 0xED, 0x11, 0xDB, 0xB6, 0x9E, 0xFC, 0x5A, 0x5A, 0x03, 0xF6, 0xCF, 0x08, - 0xD4, 0x5D, 0x90, 0xC9, 0x2A, 0xB9, 0x9B, 0xCF, 0xC8, 0x1A, 0x65, 0xF3, 0x5B, - 0xE8, 0x7F, 0xCF, 0xA5, 0xA6, 0x4C, 0x5C, 0x2A, 0x12, 0x0F, 0x92, 0xA5, 0xE3, - 0xF0, 0x17, 0x1E, 0x9A, 0x97, 0x45, 0x86, 0xFD, 0xDB, 0x54, 0x25 - - }; - - Exponent2 = new CryptoPP::byte[0x80]{ - 0x2A, 0x51, 0xCE, 0x02, 0x44, 0x28, 0x50, 0xE8, 0x30, 0x20, 0x7C, 0x9C, 0x55, - 0xBF, 0x60, 0x39, 0xBC, 0xD1, 0xF0, 0xE7, 0x68, 0xF8, 0x08, 0x5B, 0x61, 0x1F, - 0xA7, 0xBF, 0xD0, 0xE8, 0x8B, 0xB5, 0xB1, 0xD5, 0xD9, 0x16, 0xAC, 0x75, 0x0C, - 0x6D, 0xF2, 0xE0, 0xB5, 0x97, 0x75, 0xD2, 0x68, 0x16, 0x1F, 0x00, 0x7D, 0x8B, - 0x17, 0xE8, 0x78, 0x48, 0x41, 0x71, 0x2B, 0x18, 0x96, 0x80, 0x11, 0xDB, 0x68, - 0x39, 0x9C, 0xD6, 0xE0, 0x72, 0x42, 0x86, 0xF0, 0x1B, 0x16, 0x0D, 0x3E, 0x12, - 0x94, 0x3D, 0x25, 0xA8, 0xA9, 0x30, 0x9E, 0x54, 0x5A, 0xD6, 0x36, 0x6C, 0xD6, - 0x8C, 0x20, 0x62, 0x8F, 0xA1, 0x6B, 0x1F, 0x7C, 0x6D, 0xB2, 0xB1, 0xC1, 0x2E, - 0xAD, 0x36, 0x02, 0x9C, 0x3A, 0xCA, 0x2F, 0x09, 0xD2, 0x45, 0x9E, 0xEB, 0xF2, - 0xBC, 0x6C, 0xAA, 0x3B, 0x3E, 0x90, 0xBC, 0x38, 0x67, 0x35, 0x4D}; - - PublicExponent = new CryptoPP::byte[4]{0, 1, 0, 1}; - - Coefficient = new CryptoPP::byte[0x80]{ - 0x0B, 0x67, 0x1C, 0x0D, 0x6C, 0x57, 0xD3, 0xE7, 0x05, 0x65, 0x94, 0x31, 0x56, - 0x55, 0xFD, 0x28, 0x08, 0xFA, 0x05, 0x8A, 0xCC, 0x55, 0x39, 0x61, 0x97, 0x63, - 0xA0, 0x16, 0x27, 0x3D, 0xED, 0xC1, 0x16, 0x40, 0x2A, 0x12, 0xEA, 0x6F, 0xD9, - 0xD8, 0x58, 0x56, 0xA8, 0x56, 0x8B, 0x0D, 0x38, 0x5E, 0x1E, 0x80, 0x3B, 0x5F, - 0x40, 0x80, 0x6F, 0x62, 0x4F, 0x28, 0xA2, 0x69, 0xF3, 0xD3, 0xF7, 0xFD, 0xB2, - 0xC3, 0x52, 0x43, 0x20, 0x92, 0x9D, 0x97, 0x8D, 0xA0, 0x15, 0x07, 0x15, 0x6E, - 0xA4, 0x0D, 0x56, 0xD3, 0x37, 0x1A, 0xC4, 0x9E, 0xDF, 0x02, 0x49, 0xB8, 0x0A, - 0x84, 0x62, 0xF5, 0xFA, 0xB9, 0x3F, 0xA4, 0x09, 0x76, 0xCC, 0xAA, 0xB9, 0x9B, - 0xA6, 0x4F, 0xC1, 0x6A, 0x64, 0xCE, 0xD8, 0x77, 0xAB, 0x4B, 0xF9, 0xA0, 0xAE, - 0xDA, 0xF1, 0x67, 0x87, 0x7C, 0x98, 0x5C, 0x7E, 0xB8, 0x73, 0xF5}; - - Modulus = new CryptoPP::byte[0x100]{ - 0xC6, 0xCF, 0x71, 0xE7, 0xE5, 0x9A, 0xF0, 0xD1, 0x2A, 0x2C, 0x45, 0x8B, 0xF9, 0x2A, - 0x0E, 0xC1, 0x43, 0x05, 0x8B, 0xC3, 0x71, 0x17, 0x80, 0x1D, 0xCD, 0x49, 0x7D, 0xDE, - 0x35, 0x9D, 0x25, 0x9B, 0xA0, 0xD7, 0xA0, 0xF2, 0x7D, 0x6C, 0x08, 0x7E, 0xAA, 0x55, - 0x02, 0x68, 0x2B, 0x23, 0xC6, 0x44, 0xB8, 0x44, 0x18, 0xEB, 0x56, 0xCF, 0x16, 0xA2, - 0x48, 0x03, 0xC9, 0xE7, 0x4F, 0x87, 0xEB, 0x3D, 0x30, 0xC3, 0x15, 0x88, 0xBF, 0x20, - 0xE7, 0x9D, 0xFF, 0x77, 0x0C, 0xDE, 0x1D, 0x24, 0x1E, 0x63, 0xA9, 0x4F, 0x8A, 0xBF, - 0x5B, 0xBE, 0x60, 0x19, 0x68, 0x33, 0x3B, 0xFC, 0xED, 0x9F, 0x47, 0x4E, 0x5F, 0xF8, - 0xEA, 0xCB, 0x3D, 0x00, 0xBD, 0x67, 0x01, 0xF9, 0x2C, 0x6D, 0xC6, 0xAC, 0x13, 0x64, - 0xE7, 0x67, 0x14, 0xF3, 0xDC, 0x52, 0x69, 0x6A, 0xB9, 0x83, 0x2C, 0x42, 0x30, 0x13, - 0x1B, 0xB2, 0xD8, 0xA5, 0x02, 0x0D, 0x79, 0xED, 0x96, 0xB1, 0x0D, 0xF8, 0xCC, 0x0C, - 0xDF, 0x81, 0x95, 0x4F, 0x03, 0x58, 0x09, 0x57, 0x0E, 0x80, 0x69, 0x2E, 0xFE, 0xFF, - 0x52, 0x77, 0xEA, 0x75, 0x28, 0xA8, 0xFB, 0xC9, 0xBE, 0xBF, 0x9F, 0xBB, 0xB7, 0x79, - 0x8E, 0x18, 0x05, 0xE1, 0x80, 0xBD, 0x50, 0x34, 0x94, 0x81, 0xD3, 0x53, 0xC2, 0x69, - 0xA2, 0xD2, 0x4C, 0xCF, 0x6C, 0xF4, 0x57, 0x2C, 0x10, 0x4A, 0x3F, 0xFB, 0x22, 0xFD, - 0x8B, 0x97, 0xE2, 0xC9, 0x5B, 0xA6, 0x2B, 0xCD, 0xD6, 0x1B, 0x6B, 0xDB, 0x68, 0x7F, - 0x4B, 0xC2, 0xA0, 0x50, 0x34, 0xC0, 0x05, 0xE5, 0x8D, 0xEF, 0x24, 0x67, 0xFF, 0x93, - 0x40, 0xCF, 0x2D, 0x62, 0xA2, 0xA0, 0x50, 0xB1, 0xF1, 0x3A, 0xA8, 0x3D, 0xFD, 0x80, - 0xD1, 0xF9, 0xB8, 0x05, 0x22, 0xAF, 0xC8, 0x35, 0x45, 0x90, 0x58, 0x8E, 0xE3, 0x3A, - 0x7C, 0xBD, 0x3E, 0x27}; - - Prime1 = new CryptoPP::byte[0x80]{ - 0xFE, 0xF6, 0xBF, 0x1D, 0x69, 0xAB, 0x16, 0x25, 0x08, 0x47, 0x55, 0x6B, 0x86, - 0xE4, 0x35, 0x88, 0x72, 0x2A, 0xB1, 0x3D, 0xF8, 0xB6, 0x44, 0xCA, 0xB3, 0xAB, - 0x19, 0xD1, 0x04, 0x24, 0x28, 0x0A, 0x74, 0x55, 0xB8, 0x15, 0x45, 0x09, 0xCC, - 0x13, 0x1C, 0xF2, 0xBA, 0x37, 0xA9, 0x03, 0x90, 0x8F, 0x02, 0x10, 0xFF, 0x25, - 0x79, 0x86, 0xCC, 0x18, 0x50, 0x9A, 0x10, 0x5F, 0x5B, 0x4C, 0x1C, 0x4E, 0xB0, - 0xA7, 0xE3, 0x59, 0xB1, 0x2D, 0xA0, 0xC6, 0xB0, 0x20, 0x2C, 0x21, 0x33, 0x12, - 0xB3, 0xAF, 0x72, 0x34, 0x83, 0xCD, 0x52, 0x2F, 0xAF, 0x0F, 0x20, 0x5A, 0x1B, - 0xC0, 0xE2, 0xA3, 0x76, 0x34, 0x0F, 0xD7, 0xFC, 0xC1, 0x41, 0xC9, 0xF9, 0x79, - 0x40, 0x17, 0x42, 0x21, 0x3E, 0x9D, 0xFD, 0xC7, 0xC1, 0x50, 0xDE, 0x44, 0x5A, - 0xC9, 0x31, 0x89, 0x6A, 0x78, 0x05, 0xBE, 0x65, 0xB4, 0xE8, 0x2D}; - - Prime2 = new CryptoPP::byte[0x80]{ - 0xC7, 0x9E, 0x47, 0x58, 0x00, 0x7D, 0x62, 0x82, 0xB0, 0xD2, 0x22, 0x81, 0xD4, - 0xA8, 0x97, 0x1B, 0x79, 0x0C, 0x3A, 0xB0, 0xD7, 0xC9, 0x30, 0xE3, 0xC3, 0x53, - 0x8E, 0x57, 0xEF, 0xF0, 0x9B, 0x9F, 0xB3, 0x90, 0x52, 0xC6, 0x94, 0x22, 0x36, - 0xAA, 0xE6, 0x4A, 0x5F, 0x72, 0x1D, 0x70, 0xE8, 0x76, 0x58, 0xC8, 0xB2, 0x91, - 0xCE, 0x9C, 0xC3, 0xE9, 0x09, 0x7F, 0x2E, 0x47, 0x97, 0xCC, 0x90, 0x39, 0x15, - 0x35, 0x31, 0xDE, 0x1F, 0x0C, 0x8C, 0x0D, 0xC1, 0xC2, 0x92, 0xBE, 0x97, 0xBF, - 0x2F, 0x91, 0xA1, 0x8C, 0x7D, 0x50, 0xA8, 0x21, 0x2F, 0xD7, 0xA2, 0x9A, 0x7E, - 0xB5, 0xA7, 0x2A, 0x90, 0x02, 0xD9, 0xF3, 0x3D, 0xD1, 0xEB, 0xB8, 0xE0, 0x5A, - 0x79, 0x9E, 0x7D, 0x8D, 0xCA, 0x18, 0x6D, 0xBD, 0x9E, 0xA1, 0x80, 0x28, 0x6B, - 0x2A, 0xFE, 0x51, 0x24, 0x9B, 0x6F, 0x4D, 0x84, 0x77, 0x80, 0x23}; - }; - - // Destructor - ~FakeKeyset() { - delete[] PrivateExponent; - delete[] Exponent1; - delete[] Exponent2; - delete[] PublicExponent; - delete[] Coefficient; - delete[] Modulus; - delete[] Prime1; - delete[] Prime2; - }; + static constexpr CryptoPP::byte Prime2[] = { + 0xC7, 0x9E, 0x47, 0x58, 0x00, 0x7D, 0x62, 0x82, 0xB0, 0xD2, 0x22, 0x81, 0xD4, 0xA8, 0x97, + 0x1B, 0x79, 0x0C, 0x3A, 0xB0, 0xD7, 0xC9, 0x30, 0xE3, 0xC3, 0x53, 0x8E, 0x57, 0xEF, 0xF0, + 0x9B, 0x9F, 0xB3, 0x90, 0x52, 0xC6, 0x94, 0x22, 0x36, 0xAA, 0xE6, 0x4A, 0x5F, 0x72, 0x1D, + 0x70, 0xE8, 0x76, 0x58, 0xC8, 0xB2, 0x91, 0xCE, 0x9C, 0xC3, 0xE9, 0x09, 0x7F, 0x2E, 0x47, + 0x97, 0xCC, 0x90, 0x39, 0x15, 0x35, 0x31, 0xDE, 0x1F, 0x0C, 0x8C, 0x0D, 0xC1, 0xC2, 0x92, + 0xBE, 0x97, 0xBF, 0x2F, 0x91, 0xA1, 0x8C, 0x7D, 0x50, 0xA8, 0x21, 0x2F, 0xD7, 0xA2, 0x9A, + 0x7E, 0xB5, 0xA7, 0x2A, 0x90, 0x02, 0xD9, 0xF3, 0x3D, 0xD1, 0xEB, 0xB8, 0xE0, 0x5A, 0x79, + 0x9E, 0x7D, 0x8D, 0xCA, 0x18, 0x6D, 0xBD, 0x9E, 0xA1, 0x80, 0x28, 0x6B, 0x2A, 0xFE, 0x51, + 0x24, 0x9B, 0x6F, 0x4D, 0x84, 0x77, 0x80, 0x23}; + static constexpr CryptoPP::byte PrivateExponent[] = { + 0x7F, 0x76, 0xCD, 0x0E, 0xE2, 0xD4, 0xDE, 0x05, 0x1C, 0xC6, 0xD9, 0xA8, 0x0E, 0x8D, 0xFA, + 0x7B, 0xCA, 0x1E, 0xAA, 0x27, 0x1A, 0x40, 0xF8, 0xF1, 0x22, 0x87, 0x35, 0xDD, 0xDB, 0xFD, + 0xEE, 0xF8, 0xC2, 0xBC, 0xBD, 0x01, 0xFB, 0x8B, 0xE2, 0x3E, 0x63, 0xB2, 0xB1, 0x22, 0x5C, + 0x56, 0x49, 0x6E, 0x11, 0xBE, 0x07, 0x44, 0x0B, 0x9A, 0x26, 0x66, 0xD1, 0x49, 0x2C, 0x8F, + 0xD3, 0x1B, 0xCF, 0xA4, 0xA1, 0xB8, 0xD1, 0xFB, 0xA4, 0x9E, 0xD2, 0x21, 0x28, 0x83, 0x09, + 0x8A, 0xF6, 0xA0, 0x0B, 0xA3, 0xD6, 0x0F, 0x9B, 0x63, 0x68, 0xCC, 0xBC, 0x0C, 0x4E, 0x14, + 0x5B, 0x27, 0xA4, 0xA9, 0xF4, 0x2B, 0xB9, 0xB8, 0x7B, 0xC0, 0xE6, 0x51, 0xAD, 0x1D, 0x77, + 0xD4, 0x6B, 0xB9, 0xCE, 0x20, 0xD1, 0x26, 0x66, 0x7E, 0x5E, 0x9E, 0xA2, 0xE9, 0x6B, 0x90, + 0xF3, 0x73, 0xB8, 0x52, 0x8F, 0x44, 0x11, 0x03, 0x0C, 0x13, 0x97, 0x39, 0x3D, 0x13, 0x22, + 0x58, 0xD5, 0x43, 0x82, 0x49, 0xDA, 0x6E, 0x7C, 0xA1, 0xC5, 0x8C, 0xA5, 0xB0, 0x09, 0xE0, + 0xCE, 0x3D, 0xDF, 0xF4, 0x9D, 0x3C, 0x97, 0x15, 0xE2, 0x6A, 0xC7, 0x2B, 0x3C, 0x50, 0x93, + 0x23, 0xDB, 0xBA, 0x4A, 0x22, 0x66, 0x44, 0xAC, 0x78, 0xBB, 0x0E, 0x1A, 0x27, 0x43, 0xB5, + 0x71, 0x67, 0xAF, 0xF4, 0xAB, 0x48, 0x46, 0x93, 0x73, 0xD0, 0x42, 0xAB, 0x93, 0x63, 0xE5, + 0x6C, 0x9A, 0xDE, 0x50, 0x24, 0xC0, 0x23, 0x7D, 0x99, 0x79, 0x3F, 0x22, 0x07, 0xE0, 0xC1, + 0x48, 0x56, 0x1B, 0xDF, 0x83, 0x09, 0x12, 0xB4, 0x2D, 0x45, 0x6B, 0xC9, 0xC0, 0x68, 0x85, + 0x99, 0x90, 0x79, 0x96, 0x1A, 0xD7, 0xF5, 0x4D, 0x1F, 0x37, 0x83, 0x40, 0x4A, 0xEC, 0x39, + 0x37, 0xA6, 0x80, 0x92, 0x7D, 0xC5, 0x80, 0xC7, 0xD6, 0x6F, 0xFE, 0x8A, 0x79, 0x89, 0xC6, + 0xB1}; }; class DebugRifKeyset { public: // std::uint8_t* PrivateExponent; - const CryptoPP::byte* Exponent1; + static constexpr CryptoPP::byte Exponent1[] = { + 0xCD, 0x9A, 0x61, 0xB0, 0xB8, 0xD5, 0xB4, 0xE4, 0xE4, 0xF6, 0xAB, 0xF7, 0x27, 0xB7, 0x56, + 0x59, 0x6B, 0xB9, 0x11, 0xE7, 0xF4, 0x83, 0xAF, 0xB9, 0x73, 0x99, 0x7F, 0x49, 0xA2, 0x9C, + 0xF0, 0xB5, 0x6D, 0x37, 0x82, 0x14, 0x15, 0xF1, 0x04, 0x8A, 0xD4, 0x8E, 0xEB, 0x2E, 0x1F, + 0xE2, 0x81, 0xA9, 0x62, 0x6E, 0xB1, 0x68, 0x75, 0x62, 0xF3, 0x0F, 0xFE, 0xD4, 0x91, 0x87, + 0x98, 0x78, 0xBF, 0x26, 0xB5, 0x07, 0x58, 0xD0, 0xEE, 0x3F, 0x21, 0xE8, 0xC8, 0x0F, 0x5F, + 0xFA, 0x1C, 0x64, 0x74, 0x49, 0x52, 0xEB, 0xE7, 0xEE, 0xDE, 0xBA, 0x23, 0x26, 0x4A, 0xF6, + 0x9C, 0x1A, 0x09, 0x3F, 0xB9, 0x0B, 0x36, 0x26, 0x1A, 0xBE, 0xA9, 0x76, 0xE6, 0xF2, 0x69, + 0xDE, 0xFF, 0xAF, 0xCC, 0x0C, 0x9A, 0x66, 0x03, 0x86, 0x0A, 0x1F, 0x49, 0xA4, 0x10, 0xB6, + 0xBC, 0xC3, 0x7C, 0x88, 0xE8, 0xCE, 0x4B, 0xD9}; // exponent2 = d mod (q - 1) - const CryptoPP::byte* Exponent2; + static constexpr CryptoPP::byte Exponent2[] = { + 0xB3, 0x73, 0xA3, 0x59, 0xE6, 0x97, 0xC0, 0xAB, 0x3B, 0x68, 0xFC, 0x39, 0xAC, 0xDB, 0x44, + 0xB1, 0xB4, 0x9E, 0x35, 0x4D, 0xBE, 0xC5, 0x36, 0x69, 0x6C, 0x3D, 0xC5, 0xFC, 0xFE, 0x4B, + 0x2F, 0xDC, 0x86, 0x80, 0x46, 0x96, 0x40, 0x1A, 0x0D, 0x6E, 0xFA, 0x8C, 0xE0, 0x47, 0x91, + 0xAC, 0xAD, 0x95, 0x2B, 0x8E, 0x1F, 0xF2, 0x0A, 0x45, 0xF8, 0x29, 0x95, 0x70, 0xC6, 0x88, + 0x5F, 0x71, 0x03, 0x99, 0x79, 0xBC, 0x84, 0x71, 0xBD, 0xE8, 0x84, 0x8C, 0x0E, 0xD4, 0x7B, + 0x30, 0x74, 0x57, 0x1A, 0x95, 0xE7, 0x90, 0x19, 0x8D, 0xAD, 0x8B, 0x4C, 0x4E, 0xC3, 0xE7, + 0x6B, 0x23, 0x86, 0x01, 0xEE, 0x9B, 0xE0, 0x2F, 0x15, 0xA2, 0x2C, 0x4C, 0x39, 0xD3, 0xDF, + 0x9C, 0x39, 0x01, 0xF1, 0x8C, 0x44, 0x4A, 0x15, 0x44, 0xDC, 0x51, 0xF7, 0x22, 0xD7, 0x7F, + 0x41, 0x7F, 0x68, 0xFA, 0xEE, 0x56, 0xE8, 0x05}; // e - const CryptoPP::byte* PublicExponent; + static constexpr CryptoPP::byte PublicExponent[] = {0x00, 0x01, 0x00, 0x01}; // (InverseQ)(q) = 1 mod p - const CryptoPP::byte* Coefficient; + static constexpr CryptoPP::byte Coefficient[] = { + 0xC0, 0x32, 0x43, 0xD3, 0x8C, 0x3D, 0xB4, 0xD2, 0x48, 0x8C, 0x42, 0x41, 0x24, 0x94, 0x6C, + 0x80, 0xC9, 0xC1, 0x79, 0x36, 0x7F, 0xAC, 0xC3, 0xFF, 0x6A, 0x25, 0xEB, 0x2C, 0xFB, 0xD4, + 0x2B, 0xA0, 0xEB, 0xFE, 0x25, 0xE9, 0xC6, 0x77, 0xCE, 0xFE, 0x2D, 0x23, 0xFE, 0xD0, 0xF4, + 0x0F, 0xD9, 0x7E, 0xD5, 0xA5, 0x7D, 0x1F, 0xC0, 0xE8, 0xE8, 0xEC, 0x80, 0x5B, 0xC7, 0xFD, + 0xE2, 0xBD, 0x94, 0xA6, 0x2B, 0xDD, 0x6A, 0x60, 0x45, 0x54, 0xAB, 0xCA, 0x42, 0x9C, 0x6A, + 0x6C, 0xBF, 0x3C, 0x84, 0xF9, 0xA5, 0x0E, 0x63, 0x0C, 0x51, 0x58, 0x62, 0x6D, 0x5A, 0xB7, + 0x3C, 0x3F, 0x49, 0x1A, 0xD0, 0x93, 0xB8, 0x4F, 0x1A, 0x6C, 0x5F, 0xC5, 0xE5, 0xA9, 0x75, + 0xD4, 0x86, 0x9E, 0xDF, 0x87, 0x0F, 0x27, 0xB0, 0x26, 0x78, 0x4E, 0xFB, 0xC1, 0x8A, 0x4A, + 0x24, 0x3F, 0x7F, 0x8F, 0x9A, 0x12, 0x51, 0xCB}; // n = p * q - const CryptoPP::byte* Modulus; + static constexpr CryptoPP::byte Modulus[] = { + 0xC2, 0xD2, 0x44, 0xBC, 0xDD, 0x84, 0x3F, 0xD9, 0xC5, 0x22, 0xAF, 0xF7, 0xFC, 0x88, 0x8A, + 0x33, 0x80, 0xED, 0x8E, 0xE2, 0xCC, 0x81, 0xF7, 0xEC, 0xF8, 0x1C, 0x79, 0xBF, 0x02, 0xBB, + 0x12, 0x8E, 0x61, 0x68, 0x29, 0x1B, 0x15, 0xB6, 0x5E, 0xC6, 0xF8, 0xBF, 0x5A, 0xE0, 0x3B, + 0x6A, 0x6C, 0xD9, 0xD6, 0xF5, 0x75, 0xAB, 0xA0, 0x6F, 0x34, 0x81, 0x34, 0x9A, 0x5B, 0xAD, + 0xED, 0x31, 0xE3, 0xC6, 0xEA, 0x1A, 0xD1, 0x13, 0x22, 0xBB, 0xB3, 0xDA, 0xB3, 0xB2, 0x53, + 0xBD, 0x45, 0x79, 0x87, 0xAD, 0x0A, 0x01, 0x72, 0x18, 0x10, 0x29, 0x49, 0xF4, 0x41, 0x7F, + 0xD6, 0x47, 0x0C, 0x72, 0x92, 0x9E, 0xE9, 0xBB, 0x95, 0xA9, 0x5D, 0x79, 0xEB, 0xE4, 0x30, + 0x76, 0x90, 0x45, 0x4B, 0x9D, 0x9C, 0xCF, 0x92, 0x03, 0x60, 0x8C, 0x4B, 0x6C, 0xB3, 0x7A, + 0x3A, 0x05, 0x39, 0xA0, 0x66, 0xA9, 0x35, 0xCF, 0xB9, 0xFA, 0xAD, 0x9C, 0xAB, 0xEB, 0xE4, + 0x6A, 0x8C, 0xE9, 0x3B, 0xCC, 0x72, 0x12, 0x62, 0x63, 0xBD, 0x80, 0xC4, 0xEE, 0x37, 0x2B, + 0x32, 0x03, 0xA3, 0x09, 0xF7, 0xA0, 0x61, 0x57, 0xAD, 0x0D, 0xCF, 0x15, 0x98, 0x9E, 0x4E, + 0x49, 0xF8, 0xB5, 0xA3, 0x5C, 0x27, 0xEE, 0x45, 0x04, 0xEA, 0xE4, 0x4B, 0xBC, 0x8F, 0x87, + 0xED, 0x19, 0x1E, 0x46, 0x75, 0x63, 0xC4, 0x5B, 0xD5, 0xBC, 0x09, 0x2F, 0x02, 0x73, 0x19, + 0x3C, 0x58, 0x55, 0x49, 0x66, 0x4C, 0x11, 0xEC, 0x0F, 0x09, 0xFA, 0xA5, 0x56, 0x0A, 0x5A, + 0x63, 0x56, 0xAD, 0xA0, 0x0D, 0x86, 0x08, 0xC1, 0xE6, 0xB6, 0x13, 0x22, 0x49, 0x2F, 0x7C, + 0xDB, 0x4C, 0x56, 0x97, 0x0E, 0xC2, 0xD9, 0x2E, 0x87, 0xBC, 0x0E, 0x67, 0xC0, 0x1B, 0x58, + 0xBC, 0x64, 0x2B, 0xC2, 0x6E, 0xE2, 0x93, 0x2E, 0xB5, 0x6B, 0x70, 0xA4, 0x42, 0x9F, 0x64, + 0xC1}; // p - const CryptoPP::byte* Prime1; + static constexpr CryptoPP::byte Prime1[] = { + 0xE5, 0x62, 0xE1, 0x7F, 0x9F, 0x86, 0x08, 0xE2, 0x61, 0xD3, 0xD0, 0x42, 0xE2, 0xC4, 0xB6, + 0xA8, 0x51, 0x09, 0x19, 0x14, 0xA4, 0x3A, 0x11, 0x4C, 0x33, 0xA5, 0x9C, 0x01, 0x5E, 0x34, + 0xB6, 0x3F, 0x02, 0x1A, 0xCA, 0x47, 0xF1, 0x4F, 0x3B, 0x35, 0x2A, 0x07, 0x20, 0xEC, 0xD8, + 0xC1, 0x15, 0xD9, 0xCA, 0x03, 0x4F, 0xB8, 0xE8, 0x09, 0x73, 0x3F, 0x85, 0xB7, 0x41, 0xD5, + 0x51, 0x3E, 0x7B, 0xE3, 0x53, 0x2B, 0x48, 0x8B, 0x8E, 0xCB, 0xBA, 0xF7, 0xE0, 0x60, 0xF5, + 0x35, 0x0E, 0x6F, 0xB0, 0xD9, 0x2A, 0x99, 0xD0, 0xFF, 0x60, 0x14, 0xED, 0x40, 0xEA, 0xF8, + 0xD7, 0x0B, 0xC3, 0x8D, 0x8C, 0xE8, 0x81, 0xB3, 0x75, 0x93, 0x15, 0xB3, 0x7D, 0xF6, 0x39, + 0x60, 0x1A, 0x00, 0xE7, 0xC3, 0x27, 0xAD, 0xA4, 0x33, 0xD5, 0x3E, 0xA4, 0x35, 0x48, 0x6F, + 0x22, 0xEF, 0x5D, 0xDD, 0x7D, 0x7B, 0x61, 0x05}; // q - const CryptoPP::byte* Prime2; - const CryptoPP::byte* PrivateExponent; - - // Constructor - DebugRifKeyset() { - // Initialize PrivateExponent - PrivateExponent = new CryptoPP::byte[0x100]{ - 0x01, 0x61, 0xAD, 0xD8, 0x9C, 0x06, 0x89, 0xD0, 0x60, 0xC8, 0x41, 0xF0, 0xB3, 0x83, - 0x01, 0x5D, 0xE3, 0xA2, 0x6B, 0xA2, 0xBA, 0x9A, 0x0A, 0x58, 0xCD, 0x1A, 0xA0, 0x97, - 0x64, 0xEC, 0xD0, 0x31, 0x1F, 0xCA, 0x36, 0x0E, 0x69, 0xDD, 0x40, 0xF7, 0x4E, 0xC0, - 0xC6, 0xA3, 0x73, 0xF0, 0x69, 0x84, 0xB2, 0xF4, 0x4B, 0x29, 0x14, 0x2A, 0x6D, 0xB8, - 0x23, 0xD8, 0x1B, 0x61, 0xD4, 0x9E, 0x87, 0xB3, 0xBB, 0xA9, 0xC4, 0x85, 0x4A, 0xF8, - 0x03, 0x4A, 0xBF, 0xFE, 0xF9, 0xFE, 0x8B, 0xDD, 0x54, 0x83, 0xBA, 0xE0, 0x2F, 0x3F, - 0xB1, 0xEF, 0xA5, 0x05, 0x5D, 0x28, 0x8B, 0xAB, 0xB5, 0xD0, 0x23, 0x2F, 0x8A, 0xCF, - 0x48, 0x7C, 0xAA, 0xBB, 0xC8, 0x5B, 0x36, 0x27, 0xC5, 0x16, 0xA4, 0xB6, 0x61, 0xAC, - 0x0C, 0x28, 0x47, 0x79, 0x3F, 0x38, 0xAE, 0x5E, 0x25, 0xC6, 0xAF, 0x35, 0xAE, 0xBC, - 0xB0, 0xF3, 0xBC, 0xBD, 0xFD, 0xA4, 0x87, 0x0D, 0x14, 0x3D, 0x90, 0xE4, 0xDE, 0x5D, - 0x1D, 0x46, 0x81, 0xF1, 0x28, 0x6D, 0x2F, 0x2C, 0x5E, 0x97, 0x2D, 0x89, 0x2A, 0x51, - 0x72, 0x3C, 0x20, 0x02, 0x59, 0xB1, 0x98, 0x93, 0x05, 0x1E, 0x3F, 0xA1, 0x8A, 0x69, - 0x30, 0x0E, 0x70, 0x84, 0x8B, 0xAE, 0x97, 0xA1, 0x08, 0x95, 0x63, 0x4C, 0xC7, 0xE8, - 0x5D, 0x59, 0xCA, 0x78, 0x2A, 0x23, 0x87, 0xAC, 0x6F, 0x04, 0x33, 0xB1, 0x61, 0xB9, - 0xF0, 0x95, 0xDA, 0x33, 0xCC, 0xE0, 0x4C, 0x82, 0x68, 0x82, 0x14, 0x51, 0xBE, 0x49, - 0x1C, 0x58, 0xA2, 0x8B, 0x05, 0x4E, 0x98, 0x37, 0xEB, 0x94, 0x0B, 0x01, 0x22, 0xDC, - 0xB3, 0x19, 0xCA, 0x77, 0xA6, 0x6E, 0x97, 0xFF, 0x8A, 0x53, 0x5A, 0xC5, 0x24, 0xE4, - 0xAF, 0x6E, 0xA8, 0x2B, 0x53, 0xA4, 0xBE, 0x96, 0xA5, 0x7B, 0xCE, 0x22, 0x56, 0xA3, - 0xF1, 0xCF, 0x14, 0xA5}; - - // Initialize Exponent1 - Exponent1 = new CryptoPP::byte[0x80]{ - 0xCD, 0x9A, 0x61, 0xB0, 0xB8, 0xD5, 0xB4, 0xE4, 0xE4, 0xF6, 0xAB, 0xF7, 0x27, - 0xB7, 0x56, 0x59, 0x6B, 0xB9, 0x11, 0xE7, 0xF4, 0x83, 0xAF, 0xB9, 0x73, 0x99, - 0x7F, 0x49, 0xA2, 0x9C, 0xF0, 0xB5, 0x6D, 0x37, 0x82, 0x14, 0x15, 0xF1, 0x04, - 0x8A, 0xD4, 0x8E, 0xEB, 0x2E, 0x1F, 0xE2, 0x81, 0xA9, 0x62, 0x6E, 0xB1, 0x68, - 0x75, 0x62, 0xF3, 0x0F, 0xFE, 0xD4, 0x91, 0x87, 0x98, 0x78, 0xBF, 0x26, 0xB5, - 0x07, 0x58, 0xD0, 0xEE, 0x3F, 0x21, 0xE8, 0xC8, 0x0F, 0x5F, 0xFA, 0x1C, 0x64, - 0x74, 0x49, 0x52, 0xEB, 0xE7, 0xEE, 0xDE, 0xBA, 0x23, 0x26, 0x4A, 0xF6, 0x9C, - 0x1A, 0x09, 0x3F, 0xB9, 0x0B, 0x36, 0x26, 0x1A, 0xBE, 0xA9, 0x76, 0xE6, 0xF2, - 0x69, 0xDE, 0xFF, 0xAF, 0xCC, 0x0C, 0x9A, 0x66, 0x03, 0x86, 0x0A, 0x1F, 0x49, - 0xA4, 0x10, 0xB6, 0xBC, 0xC3, 0x7C, 0x88, 0xE8, 0xCE, 0x4B, 0xD9 - - }; - - Exponent2 = new CryptoPP::byte[0x80]{ - 0xB3, 0x73, 0xA3, 0x59, 0xE6, 0x97, 0xC0, 0xAB, 0x3B, 0x68, 0xFC, 0x39, 0xAC, - 0xDB, 0x44, 0xB1, 0xB4, 0x9E, 0x35, 0x4D, 0xBE, 0xC5, 0x36, 0x69, 0x6C, 0x3D, - 0xC5, 0xFC, 0xFE, 0x4B, 0x2F, 0xDC, 0x86, 0x80, 0x46, 0x96, 0x40, 0x1A, 0x0D, - 0x6E, 0xFA, 0x8C, 0xE0, 0x47, 0x91, 0xAC, 0xAD, 0x95, 0x2B, 0x8E, 0x1F, 0xF2, - 0x0A, 0x45, 0xF8, 0x29, 0x95, 0x70, 0xC6, 0x88, 0x5F, 0x71, 0x03, 0x99, 0x79, - 0xBC, 0x84, 0x71, 0xBD, 0xE8, 0x84, 0x8C, 0x0E, 0xD4, 0x7B, 0x30, 0x74, 0x57, - 0x1A, 0x95, 0xE7, 0x90, 0x19, 0x8D, 0xAD, 0x8B, 0x4C, 0x4E, 0xC3, 0xE7, 0x6B, - 0x23, 0x86, 0x01, 0xEE, 0x9B, 0xE0, 0x2F, 0x15, 0xA2, 0x2C, 0x4C, 0x39, 0xD3, - 0xDF, 0x9C, 0x39, 0x01, 0xF1, 0x8C, 0x44, 0x4A, 0x15, 0x44, 0xDC, 0x51, 0xF7, - 0x22, 0xD7, 0x7F, 0x41, 0x7F, 0x68, 0xFA, 0xEE, 0x56, 0xE8, 0x05}; - - PublicExponent = new CryptoPP::byte[4]{0x00, 0x01, 0x00, 0x01}; - - Coefficient = new CryptoPP::byte[0x80]{ - 0xC0, 0x32, 0x43, 0xD3, 0x8C, 0x3D, 0xB4, 0xD2, 0x48, 0x8C, 0x42, 0x41, 0x24, - 0x94, 0x6C, 0x80, 0xC9, 0xC1, 0x79, 0x36, 0x7F, 0xAC, 0xC3, 0xFF, 0x6A, 0x25, - 0xEB, 0x2C, 0xFB, 0xD4, 0x2B, 0xA0, 0xEB, 0xFE, 0x25, 0xE9, 0xC6, 0x77, 0xCE, - 0xFE, 0x2D, 0x23, 0xFE, 0xD0, 0xF4, 0x0F, 0xD9, 0x7E, 0xD5, 0xA5, 0x7D, 0x1F, - 0xC0, 0xE8, 0xE8, 0xEC, 0x80, 0x5B, 0xC7, 0xFD, 0xE2, 0xBD, 0x94, 0xA6, 0x2B, - 0xDD, 0x6A, 0x60, 0x45, 0x54, 0xAB, 0xCA, 0x42, 0x9C, 0x6A, 0x6C, 0xBF, 0x3C, - 0x84, 0xF9, 0xA5, 0x0E, 0x63, 0x0C, 0x51, 0x58, 0x62, 0x6D, 0x5A, 0xB7, 0x3C, - 0x3F, 0x49, 0x1A, 0xD0, 0x93, 0xB8, 0x4F, 0x1A, 0x6C, 0x5F, 0xC5, 0xE5, 0xA9, - 0x75, 0xD4, 0x86, 0x9E, 0xDF, 0x87, 0x0F, 0x27, 0xB0, 0x26, 0x78, 0x4E, 0xFB, - 0xC1, 0x8A, 0x4A, 0x24, 0x3F, 0x7F, 0x8F, 0x9A, 0x12, 0x51, 0xCB}; - - Modulus = new CryptoPP::byte[0x100]{ - 0xC2, 0xD2, 0x44, 0xBC, 0xDD, 0x84, 0x3F, 0xD9, 0xC5, 0x22, 0xAF, 0xF7, 0xFC, 0x88, - 0x8A, 0x33, 0x80, 0xED, 0x8E, 0xE2, 0xCC, 0x81, 0xF7, 0xEC, 0xF8, 0x1C, 0x79, 0xBF, - 0x02, 0xBB, 0x12, 0x8E, 0x61, 0x68, 0x29, 0x1B, 0x15, 0xB6, 0x5E, 0xC6, 0xF8, 0xBF, - 0x5A, 0xE0, 0x3B, 0x6A, 0x6C, 0xD9, 0xD6, 0xF5, 0x75, 0xAB, 0xA0, 0x6F, 0x34, 0x81, - 0x34, 0x9A, 0x5B, 0xAD, 0xED, 0x31, 0xE3, 0xC6, 0xEA, 0x1A, 0xD1, 0x13, 0x22, 0xBB, - 0xB3, 0xDA, 0xB3, 0xB2, 0x53, 0xBD, 0x45, 0x79, 0x87, 0xAD, 0x0A, 0x01, 0x72, 0x18, - 0x10, 0x29, 0x49, 0xF4, 0x41, 0x7F, 0xD6, 0x47, 0x0C, 0x72, 0x92, 0x9E, 0xE9, 0xBB, - 0x95, 0xA9, 0x5D, 0x79, 0xEB, 0xE4, 0x30, 0x76, 0x90, 0x45, 0x4B, 0x9D, 0x9C, 0xCF, - 0x92, 0x03, 0x60, 0x8C, 0x4B, 0x6C, 0xB3, 0x7A, 0x3A, 0x05, 0x39, 0xA0, 0x66, 0xA9, - 0x35, 0xCF, 0xB9, 0xFA, 0xAD, 0x9C, 0xAB, 0xEB, 0xE4, 0x6A, 0x8C, 0xE9, 0x3B, 0xCC, - 0x72, 0x12, 0x62, 0x63, 0xBD, 0x80, 0xC4, 0xEE, 0x37, 0x2B, 0x32, 0x03, 0xA3, 0x09, - 0xF7, 0xA0, 0x61, 0x57, 0xAD, 0x0D, 0xCF, 0x15, 0x98, 0x9E, 0x4E, 0x49, 0xF8, 0xB5, - 0xA3, 0x5C, 0x27, 0xEE, 0x45, 0x04, 0xEA, 0xE4, 0x4B, 0xBC, 0x8F, 0x87, 0xED, 0x19, - 0x1E, 0x46, 0x75, 0x63, 0xC4, 0x5B, 0xD5, 0xBC, 0x09, 0x2F, 0x02, 0x73, 0x19, 0x3C, - 0x58, 0x55, 0x49, 0x66, 0x4C, 0x11, 0xEC, 0x0F, 0x09, 0xFA, 0xA5, 0x56, 0x0A, 0x5A, - 0x63, 0x56, 0xAD, 0xA0, 0x0D, 0x86, 0x08, 0xC1, 0xE6, 0xB6, 0x13, 0x22, 0x49, 0x2F, - 0x7C, 0xDB, 0x4C, 0x56, 0x97, 0x0E, 0xC2, 0xD9, 0x2E, 0x87, 0xBC, 0x0E, 0x67, 0xC0, - 0x1B, 0x58, 0xBC, 0x64, 0x2B, 0xC2, 0x6E, 0xE2, 0x93, 0x2E, 0xB5, 0x6B, 0x70, 0xA4, - 0x42, 0x9F, 0x64, 0xC1}; - - Prime1 = new CryptoPP::byte[0x80]{ - 0xE5, 0x62, 0xE1, 0x7F, 0x9F, 0x86, 0x08, 0xE2, 0x61, 0xD3, 0xD0, 0x42, 0xE2, - 0xC4, 0xB6, 0xA8, 0x51, 0x09, 0x19, 0x14, 0xA4, 0x3A, 0x11, 0x4C, 0x33, 0xA5, - 0x9C, 0x01, 0x5E, 0x34, 0xB6, 0x3F, 0x02, 0x1A, 0xCA, 0x47, 0xF1, 0x4F, 0x3B, - 0x35, 0x2A, 0x07, 0x20, 0xEC, 0xD8, 0xC1, 0x15, 0xD9, 0xCA, 0x03, 0x4F, 0xB8, - 0xE8, 0x09, 0x73, 0x3F, 0x85, 0xB7, 0x41, 0xD5, 0x51, 0x3E, 0x7B, 0xE3, 0x53, - 0x2B, 0x48, 0x8B, 0x8E, 0xCB, 0xBA, 0xF7, 0xE0, 0x60, 0xF5, 0x35, 0x0E, 0x6F, - 0xB0, 0xD9, 0x2A, 0x99, 0xD0, 0xFF, 0x60, 0x14, 0xED, 0x40, 0xEA, 0xF8, 0xD7, - 0x0B, 0xC3, 0x8D, 0x8C, 0xE8, 0x81, 0xB3, 0x75, 0x93, 0x15, 0xB3, 0x7D, 0xF6, - 0x39, 0x60, 0x1A, 0x00, 0xE7, 0xC3, 0x27, 0xAD, 0xA4, 0x33, 0xD5, 0x3E, 0xA4, - 0x35, 0x48, 0x6F, 0x22, 0xEF, 0x5D, 0xDD, 0x7D, 0x7B, 0x61, 0x05}; - - Prime2 = new CryptoPP::byte[0x80]{ - 0xD9, 0x6C, 0xC2, 0x0C, 0xF7, 0xAE, 0xD1, 0xF3, 0x3B, 0x3B, 0x49, 0x1E, 0x9F, - 0x12, 0x9C, 0xA1, 0x78, 0x1F, 0x35, 0x1D, 0x98, 0x26, 0x13, 0x71, 0xF9, 0x09, - 0xFD, 0xF0, 0xAD, 0x38, 0x55, 0xB7, 0xEE, 0x61, 0x04, 0x72, 0x51, 0x87, 0x2E, - 0x05, 0x84, 0xB1, 0x1D, 0x0C, 0x0D, 0xDB, 0xD4, 0x25, 0x3E, 0x26, 0xED, 0xEA, - 0xB8, 0xF7, 0x49, 0xFE, 0xA2, 0x94, 0xE6, 0xF2, 0x08, 0x92, 0xA7, 0x85, 0xF5, - 0x30, 0xB9, 0x84, 0x22, 0xBF, 0xCA, 0xF0, 0x5F, 0xCB, 0x31, 0x20, 0x34, 0x49, - 0x16, 0x76, 0x34, 0xCC, 0x7A, 0xCB, 0x96, 0xFE, 0x78, 0x7A, 0x41, 0xFE, 0x9A, - 0xA2, 0x23, 0xF7, 0x68, 0x80, 0xD6, 0xCE, 0x4A, 0x78, 0xA5, 0xB7, 0x05, 0x77, - 0x81, 0x1F, 0xDE, 0x5E, 0xA8, 0x6E, 0x3E, 0x87, 0xEC, 0x44, 0xD2, 0x69, 0xC6, - 0x54, 0x91, 0x6B, 0x5E, 0x13, 0x8A, 0x03, 0x87, 0x05, 0x31, 0x8D}; - }; - - // Destructor - ~DebugRifKeyset() { - delete[] PrivateExponent; - delete[] Exponent1; - delete[] Exponent2; - delete[] PublicExponent; - delete[] Coefficient; - delete[] Modulus; - delete[] Prime1; - delete[] Prime2; - }; + static constexpr CryptoPP::byte Prime2[] = { + 0xD9, 0x6C, 0xC2, 0x0C, 0xF7, 0xAE, 0xD1, 0xF3, 0x3B, 0x3B, 0x49, 0x1E, 0x9F, 0x12, 0x9C, + 0xA1, 0x78, 0x1F, 0x35, 0x1D, 0x98, 0x26, 0x13, 0x71, 0xF9, 0x09, 0xFD, 0xF0, 0xAD, 0x38, + 0x55, 0xB7, 0xEE, 0x61, 0x04, 0x72, 0x51, 0x87, 0x2E, 0x05, 0x84, 0xB1, 0x1D, 0x0C, 0x0D, + 0xDB, 0xD4, 0x25, 0x3E, 0x26, 0xED, 0xEA, 0xB8, 0xF7, 0x49, 0xFE, 0xA2, 0x94, 0xE6, 0xF2, + 0x08, 0x92, 0xA7, 0x85, 0xF5, 0x30, 0xB9, 0x84, 0x22, 0xBF, 0xCA, 0xF0, 0x5F, 0xCB, 0x31, + 0x20, 0x34, 0x49, 0x16, 0x76, 0x34, 0xCC, 0x7A, 0xCB, 0x96, 0xFE, 0x78, 0x7A, 0x41, 0xFE, + 0x9A, 0xA2, 0x23, 0xF7, 0x68, 0x80, 0xD6, 0xCE, 0x4A, 0x78, 0xA5, 0xB7, 0x05, 0x77, 0x81, + 0x1F, 0xDE, 0x5E, 0xA8, 0x6E, 0x3E, 0x87, 0xEC, 0x44, 0xD2, 0x69, 0xC6, 0x54, 0x91, 0x6B, + 0x5E, 0x13, 0x8A, 0x03, 0x87, 0x05, 0x31, 0x8D}; + static constexpr CryptoPP::byte PrivateExponent[] = { + 0x01, 0x61, 0xAD, 0xD8, 0x9C, 0x06, 0x89, 0xD0, 0x60, 0xC8, 0x41, 0xF0, 0xB3, 0x83, 0x01, + 0x5D, 0xE3, 0xA2, 0x6B, 0xA2, 0xBA, 0x9A, 0x0A, 0x58, 0xCD, 0x1A, 0xA0, 0x97, 0x64, 0xEC, + 0xD0, 0x31, 0x1F, 0xCA, 0x36, 0x0E, 0x69, 0xDD, 0x40, 0xF7, 0x4E, 0xC0, 0xC6, 0xA3, 0x73, + 0xF0, 0x69, 0x84, 0xB2, 0xF4, 0x4B, 0x29, 0x14, 0x2A, 0x6D, 0xB8, 0x23, 0xD8, 0x1B, 0x61, + 0xD4, 0x9E, 0x87, 0xB3, 0xBB, 0xA9, 0xC4, 0x85, 0x4A, 0xF8, 0x03, 0x4A, 0xBF, 0xFE, 0xF9, + 0xFE, 0x8B, 0xDD, 0x54, 0x83, 0xBA, 0xE0, 0x2F, 0x3F, 0xB1, 0xEF, 0xA5, 0x05, 0x5D, 0x28, + 0x8B, 0xAB, 0xB5, 0xD0, 0x23, 0x2F, 0x8A, 0xCF, 0x48, 0x7C, 0xAA, 0xBB, 0xC8, 0x5B, 0x36, + 0x27, 0xC5, 0x16, 0xA4, 0xB6, 0x61, 0xAC, 0x0C, 0x28, 0x47, 0x79, 0x3F, 0x38, 0xAE, 0x5E, + 0x25, 0xC6, 0xAF, 0x35, 0xAE, 0xBC, 0xB0, 0xF3, 0xBC, 0xBD, 0xFD, 0xA4, 0x87, 0x0D, 0x14, + 0x3D, 0x90, 0xE4, 0xDE, 0x5D, 0x1D, 0x46, 0x81, 0xF1, 0x28, 0x6D, 0x2F, 0x2C, 0x5E, 0x97, + 0x2D, 0x89, 0x2A, 0x51, 0x72, 0x3C, 0x20, 0x02, 0x59, 0xB1, 0x98, 0x93, 0x05, 0x1E, 0x3F, + 0xA1, 0x8A, 0x69, 0x30, 0x0E, 0x70, 0x84, 0x8B, 0xAE, 0x97, 0xA1, 0x08, 0x95, 0x63, 0x4C, + 0xC7, 0xE8, 0x5D, 0x59, 0xCA, 0x78, 0x2A, 0x23, 0x87, 0xAC, 0x6F, 0x04, 0x33, 0xB1, 0x61, + 0xB9, 0xF0, 0x95, 0xDA, 0x33, 0xCC, 0xE0, 0x4C, 0x82, 0x68, 0x82, 0x14, 0x51, 0xBE, 0x49, + 0x1C, 0x58, 0xA2, 0x8B, 0x05, 0x4E, 0x98, 0x37, 0xEB, 0x94, 0x0B, 0x01, 0x22, 0xDC, 0xB3, + 0x19, 0xCA, 0x77, 0xA6, 0x6E, 0x97, 0xFF, 0x8A, 0x53, 0x5A, 0xC5, 0x24, 0xE4, 0xAF, 0x6E, + 0xA8, 0x2B, 0x53, 0xA4, 0xBE, 0x96, 0xA5, 0x7B, 0xCE, 0x22, 0x56, 0xA3, 0xF1, 0xCF, 0x14, + 0xA5}; }; class PkgDerivedKey3Keyset { public: // std::uint8_t* PrivateExponent; - const CryptoPP::byte* Exponent1; + static constexpr CryptoPP::byte Exponent1[] = { + 0x52, 0xCC, 0x2D, 0xA0, 0x9C, 0x9E, 0x75, 0xE7, 0x28, 0xEE, 0x3D, 0xDE, 0xE3, 0x45, 0xD1, + 0x4F, 0x94, 0x1C, 0xCC, 0xC8, 0x87, 0x29, 0x45, 0x3B, 0x8D, 0x6E, 0xAB, 0x6E, 0x2A, 0xA7, + 0xC7, 0x15, 0x43, 0xA3, 0x04, 0x8F, 0x90, 0x5F, 0xEB, 0xF3, 0x38, 0x4A, 0x77, 0xFA, 0x36, + 0xB7, 0x15, 0x76, 0xB6, 0x01, 0x1A, 0x8E, 0x25, 0x87, 0x82, 0xF1, 0x55, 0xD8, 0xC6, 0x43, + 0x2A, 0xC0, 0xE5, 0x98, 0xC9, 0x32, 0xD1, 0x94, 0x6F, 0xD9, 0x01, 0xBA, 0x06, 0x81, 0xE0, + 0x6D, 0x88, 0xF2, 0x24, 0x2A, 0x25, 0x01, 0x64, 0x5C, 0xBF, 0xF2, 0xD9, 0x99, 0x67, 0x3E, + 0xF6, 0x72, 0xEE, 0xE4, 0xE2, 0x33, 0x5C, 0xF8, 0x00, 0x40, 0xE3, 0x2A, 0x9A, 0xF4, 0x3D, + 0x22, 0x86, 0x44, 0x3C, 0xFB, 0x0A, 0xA5, 0x7C, 0x3F, 0xCC, 0xF5, 0xF1, 0x16, 0xC4, 0xAC, + 0x88, 0xB4, 0xDE, 0x62, 0x94, 0x92, 0x6A, 0x13}; // exponent2 = d mod (q - 1) - const CryptoPP::byte* Exponent2; + static constexpr CryptoPP::byte Exponent2[] = { + 0x7C, 0x9D, 0xAD, 0x39, 0xE0, 0xD5, 0x60, 0x14, 0x94, 0x48, 0x19, 0x7F, 0x88, 0x95, 0xD5, + 0x8B, 0x80, 0xAD, 0x85, 0x8A, 0x4B, 0x77, 0x37, 0x85, 0xD0, 0x77, 0xBB, 0xBF, 0x89, 0x71, + 0x4A, 0x72, 0xCB, 0x72, 0x68, 0x38, 0xEC, 0x02, 0xC6, 0x7D, 0xC6, 0x44, 0x06, 0x33, 0x51, + 0x1C, 0xC0, 0xFF, 0x95, 0x8F, 0x0D, 0x75, 0xDC, 0x25, 0xBB, 0x0B, 0x73, 0x91, 0xA9, 0x6D, + 0x42, 0xD8, 0x03, 0xB7, 0x68, 0xD4, 0x1E, 0x75, 0x62, 0xA3, 0x70, 0x35, 0x79, 0x78, 0x00, + 0xC8, 0xF5, 0xEF, 0x15, 0xB9, 0xFC, 0x4E, 0x47, 0x5A, 0xC8, 0x70, 0x70, 0x5B, 0x52, 0x98, + 0xC0, 0xC2, 0x58, 0x4A, 0x70, 0x96, 0xCC, 0xB8, 0x10, 0xE1, 0x2F, 0x78, 0x8B, 0x2B, 0xA1, + 0x7F, 0xF9, 0xAC, 0xDE, 0xF0, 0xBB, 0x2B, 0xE2, 0x66, 0xE3, 0x22, 0x92, 0x31, 0x21, 0x57, + 0x92, 0xC4, 0xB8, 0xF2, 0x3E, 0x76, 0x20, 0x37}; // e - const CryptoPP::byte* PublicExponent; + static constexpr CryptoPP::byte PublicExponent[] = {0, 1, 0, 1}; // (InverseQ)(q) = 1 mod p - const CryptoPP::byte* Coefficient; + static constexpr CryptoPP::byte Coefficient[] = { + 0x45, 0x97, 0x55, 0xD4, 0x22, 0x08, 0x5E, 0xF3, 0x5C, 0xB4, 0x05, 0x7A, 0xFD, 0xAA, 0x42, + 0x42, 0xAD, 0x9A, 0x8C, 0xA0, 0x6C, 0xBB, 0x1D, 0x68, 0x54, 0x54, 0x6E, 0x3E, 0x32, 0xE3, + 0x53, 0x73, 0x76, 0xF1, 0x3E, 0x01, 0xEA, 0xD3, 0xCF, 0xEB, 0xEB, 0x23, 0x3E, 0xC0, 0xBE, + 0xCE, 0xEC, 0x2C, 0x89, 0x5F, 0xA8, 0x27, 0x3A, 0x4C, 0xB7, 0xE6, 0x74, 0xBC, 0x45, 0x4C, + 0x26, 0xC8, 0x25, 0xFF, 0x34, 0x63, 0x25, 0x37, 0xE1, 0x48, 0x10, 0xC1, 0x93, 0xA6, 0xAF, + 0xEB, 0xBA, 0xE3, 0xA2, 0xF1, 0x3D, 0xEF, 0x63, 0xD8, 0xF4, 0xFD, 0xD3, 0xEE, 0xE2, 0x5D, + 0xE9, 0x33, 0xCC, 0xAD, 0xBA, 0x75, 0x5C, 0x85, 0xAF, 0xCE, 0xA9, 0x3D, 0xD1, 0xA2, 0x17, + 0xF3, 0xF6, 0x98, 0xB3, 0x50, 0x8E, 0x5E, 0xF6, 0xEB, 0x02, 0x8E, 0xA1, 0x62, 0xA7, 0xD6, + 0x2C, 0xEC, 0x91, 0xFF, 0x15, 0x40, 0xD2, 0xE3}; // n = p * q - const CryptoPP::byte* Modulus; + static constexpr CryptoPP::byte Modulus[] = { + 0xd2, 0x12, 0xfc, 0x33, 0x5f, 0x6d, 0xdb, 0x83, 0x16, 0x09, 0x62, 0x8b, 0x03, 0x56, 0x27, + 0x37, 0x82, 0xd4, 0x77, 0x85, 0x35, 0x29, 0x39, 0x2d, 0x52, 0x6b, 0x8c, 0x4c, 0x8c, 0xfb, + 0x06, 0xc1, 0x84, 0x5b, 0xe7, 0xd4, 0xf7, 0xbc, 0xd2, 0x4e, 0x62, 0x45, 0xcd, 0x2a, 0xbb, + 0xd7, 0x77, 0x76, 0x45, 0x36, 0x55, 0x27, 0x3f, 0xb3, 0xf5, 0xf9, 0x8e, 0xda, 0x4b, 0xef, + 0xaa, 0x59, 0xae, 0xb3, 0x9b, 0xea, 0x54, 0x98, 0xd2, 0x06, 0x32, 0x6a, 0x58, 0x31, 0x2a, + 0xe0, 0xd4, 0x4f, 0x90, 0xb5, 0x0a, 0x7d, 0xec, 0xf4, 0x3a, 0x9c, 0x52, 0x67, 0x2d, 0x99, + 0x31, 0x8e, 0x0c, 0x43, 0xe6, 0x82, 0xfe, 0x07, 0x46, 0xe1, 0x2e, 0x50, 0xd4, 0x1f, 0x2d, + 0x2f, 0x7e, 0xd9, 0x08, 0xba, 0x06, 0xb3, 0xbf, 0x2e, 0x20, 0x3f, 0x4e, 0x3f, 0xfe, 0x44, + 0xff, 0xaa, 0x50, 0x43, 0x57, 0x91, 0x69, 0x94, 0x49, 0x15, 0x82, 0x82, 0xe4, 0x0f, 0x4c, + 0x8d, 0x9d, 0x2c, 0xc9, 0x5b, 0x1d, 0x64, 0xbf, 0x88, 0x8b, 0xd4, 0xc5, 0x94, 0xe7, 0x65, + 0x47, 0x84, 0x1e, 0xe5, 0x79, 0x10, 0xfb, 0x98, 0x93, 0x47, 0xb9, 0x7d, 0x85, 0x12, 0xa6, + 0x40, 0x98, 0x2c, 0xf7, 0x92, 0xbc, 0x95, 0x19, 0x32, 0xed, 0xe8, 0x90, 0x56, 0x0d, 0x65, + 0xc1, 0xaa, 0x78, 0xc6, 0x2e, 0x54, 0xfd, 0x5f, 0x54, 0xa1, 0xf6, 0x7e, 0xe5, 0xe0, 0x5f, + 0x61, 0xc1, 0x20, 0xb4, 0xb9, 0xb4, 0x33, 0x08, 0x70, 0xe4, 0xdf, 0x89, 0x56, 0xed, 0x01, + 0x29, 0x46, 0x77, 0x5f, 0x8c, 0xb8, 0xa9, 0xf5, 0x1e, 0x2e, 0xb3, 0xb9, 0xbf, 0xe0, 0x09, + 0xb7, 0x8d, 0x28, 0xd4, 0xa6, 0xc3, 0xb8, 0x1e, 0x1f, 0x07, 0xeb, 0xb4, 0x12, 0x0b, 0x95, + 0xb8, 0x85, 0x30, 0xfd, 0xdc, 0x39, 0x13, 0xd0, 0x7c, 0xdc, 0x8f, 0xed, 0xf9, 0xc9, 0xa3, + 0xc1}; // p - const CryptoPP::byte* Prime1; + static constexpr CryptoPP::byte Prime1[] = { + 0xF9, 0x67, 0xAD, 0x99, 0x12, 0x31, 0x0C, 0x56, 0xA2, 0x2E, 0x16, 0x1C, 0x46, 0xB3, 0x4D, + 0x5B, 0x43, 0xBE, 0x42, 0xA2, 0xF6, 0x86, 0x96, 0x80, 0x42, 0xC3, 0xC7, 0x3F, 0xC3, 0x42, + 0xF5, 0x87, 0x49, 0x33, 0x9F, 0x07, 0x5D, 0x6E, 0x2C, 0x04, 0xFD, 0xE3, 0xE1, 0xB2, 0xAE, + 0x0A, 0x0C, 0xF0, 0xC7, 0xA6, 0x1C, 0xA1, 0x63, 0x50, 0xC8, 0x09, 0x9C, 0x51, 0x24, 0x52, + 0x6C, 0x5E, 0x5E, 0xBD, 0x1E, 0x27, 0x06, 0xBB, 0xBC, 0x9E, 0x94, 0xE1, 0x35, 0xD4, 0x6D, + 0xB3, 0xCB, 0x3C, 0x68, 0xDD, 0x68, 0xB3, 0xFE, 0x6C, 0xCB, 0x8D, 0x82, 0x20, 0x76, 0x23, + 0x63, 0xB7, 0xE9, 0x68, 0x10, 0x01, 0x4E, 0xDC, 0xBA, 0x27, 0x5D, 0x01, 0xC1, 0x2D, 0x80, + 0x5E, 0x2B, 0xAF, 0x82, 0x6B, 0xD8, 0x84, 0xB6, 0x10, 0x52, 0x86, 0xA7, 0x89, 0x8E, 0xAE, + 0x9A, 0xE2, 0x89, 0xC6, 0xF7, 0xD5, 0x87, 0xFB}; // q - const CryptoPP::byte* Prime2; - const CryptoPP::byte* PrivateExponent; - - // Constructor - PkgDerivedKey3Keyset() { - Prime1 = new CryptoPP::byte[0x80]{ - 0xF9, 0x67, 0xAD, 0x99, 0x12, 0x31, 0x0C, 0x56, 0xA2, 0x2E, 0x16, 0x1C, 0x46, - 0xB3, 0x4D, 0x5B, 0x43, 0xBE, 0x42, 0xA2, 0xF6, 0x86, 0x96, 0x80, 0x42, 0xC3, - 0xC7, 0x3F, 0xC3, 0x42, 0xF5, 0x87, 0x49, 0x33, 0x9F, 0x07, 0x5D, 0x6E, 0x2C, - 0x04, 0xFD, 0xE3, 0xE1, 0xB2, 0xAE, 0x0A, 0x0C, 0xF0, 0xC7, 0xA6, 0x1C, 0xA1, - 0x63, 0x50, 0xC8, 0x09, 0x9C, 0x51, 0x24, 0x52, 0x6C, 0x5E, 0x5E, 0xBD, 0x1E, - 0x27, 0x06, 0xBB, 0xBC, 0x9E, 0x94, 0xE1, 0x35, 0xD4, 0x6D, 0xB3, 0xCB, 0x3C, - 0x68, 0xDD, 0x68, 0xB3, 0xFE, 0x6C, 0xCB, 0x8D, 0x82, 0x20, 0x76, 0x23, 0x63, - 0xB7, 0xE9, 0x68, 0x10, 0x01, 0x4E, 0xDC, 0xBA, 0x27, 0x5D, 0x01, 0xC1, 0x2D, - 0x80, 0x5E, 0x2B, 0xAF, 0x82, 0x6B, 0xD8, 0x84, 0xB6, 0x10, 0x52, 0x86, 0xA7, - 0x89, 0x8E, 0xAE, 0x9A, 0xE2, 0x89, 0xC6, 0xF7, 0xD5, 0x87, 0xFB}; - - Prime2 = new CryptoPP::byte[0x80]{ - 0xD7, 0xA1, 0x0F, 0x9A, 0x8B, 0xF2, 0xC9, 0x11, 0x95, 0x32, 0x9A, 0x8C, 0xF0, - 0xD9, 0x40, 0x47, 0xF5, 0x68, 0xA0, 0x0D, 0xBD, 0xC1, 0xFC, 0x43, 0x2F, 0x65, - 0xF9, 0xC3, 0x61, 0x0F, 0x25, 0x77, 0x54, 0xAD, 0xD7, 0x58, 0xAC, 0x84, 0x40, - 0x60, 0x8D, 0x3F, 0xF3, 0x65, 0x89, 0x75, 0xB5, 0xC6, 0x2C, 0x51, 0x1A, 0x2F, - 0x1F, 0x22, 0xE4, 0x43, 0x11, 0x54, 0xBE, 0xC9, 0xB4, 0xC7, 0xB5, 0x1B, 0x05, - 0x0B, 0xBC, 0x56, 0x9A, 0xCD, 0x4A, 0xD9, 0x73, 0x68, 0x5E, 0x5C, 0xFB, 0x92, - 0xB7, 0x8B, 0x0D, 0xFF, 0xF5, 0x07, 0xCA, 0xB4, 0xC8, 0x9B, 0x96, 0x3C, 0x07, - 0x9E, 0x3E, 0x6B, 0x2A, 0x11, 0xF2, 0x8A, 0xB1, 0x8A, 0xD7, 0x2E, 0x1B, 0xA5, - 0x53, 0x24, 0x06, 0xED, 0x50, 0xB8, 0x90, 0x67, 0xB1, 0xE2, 0x41, 0xC6, 0x92, - 0x01, 0xEE, 0x10, 0xF0, 0x61, 0xBB, 0xFB, 0xB2, 0x7D, 0x4A, 0x73}; - PrivateExponent = new CryptoPP::byte[0x100]{ - 0x32, 0xD9, 0x03, 0x90, 0x8F, 0xBD, 0xB0, 0x8F, 0x57, 0x2B, 0x28, 0x5E, 0x0B, 0x8D, - 0xB3, 0xEA, 0x5C, 0xD1, 0x7E, 0xA8, 0x90, 0x88, 0x8C, 0xDD, 0x6A, 0x80, 0xBB, 0xB1, - 0xDF, 0xC1, 0xF7, 0x0D, 0xAA, 0x32, 0xF0, 0xB7, 0x7C, 0xCB, 0x88, 0x80, 0x0E, 0x8B, - 0x64, 0xB0, 0xBE, 0x4C, 0xD6, 0x0E, 0x9B, 0x8C, 0x1E, 0x2A, 0x64, 0xE1, 0xF3, 0x5C, - 0xD7, 0x76, 0x01, 0x41, 0x5E, 0x93, 0x5C, 0x94, 0xFE, 0xDD, 0x46, 0x62, 0xC3, 0x1B, - 0x5A, 0xE2, 0xA0, 0xBC, 0x2D, 0xEB, 0xC3, 0x98, 0x0A, 0xA7, 0xB7, 0x85, 0x69, 0x70, - 0x68, 0x2B, 0x64, 0x4A, 0xB3, 0x1F, 0xCC, 0x7D, 0xDC, 0x7C, 0x26, 0xF4, 0x77, 0xF6, - 0x5C, 0xF2, 0xAE, 0x5A, 0x44, 0x2D, 0xD3, 0xAB, 0x16, 0x62, 0x04, 0x19, 0xBA, 0xFB, - 0x90, 0xFF, 0xE2, 0x30, 0x50, 0x89, 0x6E, 0xCB, 0x56, 0xB2, 0xEB, 0xC0, 0x91, 0x16, - 0x92, 0x5E, 0x30, 0x8E, 0xAE, 0xC7, 0x94, 0x5D, 0xFD, 0x35, 0xE1, 0x20, 0xF8, 0xAD, - 0x3E, 0xBC, 0x08, 0xBF, 0xC0, 0x36, 0x74, 0x9F, 0xD5, 0xBB, 0x52, 0x08, 0xFD, 0x06, - 0x66, 0xF3, 0x7A, 0xB3, 0x04, 0xF4, 0x75, 0x29, 0x5D, 0xE9, 0x5F, 0xAA, 0x10, 0x30, - 0xB2, 0x0F, 0x5A, 0x1A, 0xC1, 0x2A, 0xB3, 0xFE, 0xCB, 0x21, 0xAD, 0x80, 0xEC, 0x8F, - 0x20, 0x09, 0x1C, 0xDB, 0xC5, 0x58, 0x94, 0xC2, 0x9C, 0xC6, 0xCE, 0x82, 0x65, 0x3E, - 0x57, 0x90, 0xBC, 0xA9, 0x8B, 0x06, 0xB4, 0xF0, 0x72, 0xF6, 0x77, 0xDF, 0x98, 0x64, - 0xF1, 0xEC, 0xFE, 0x37, 0x2D, 0xBC, 0xAE, 0x8C, 0x08, 0x81, 0x1F, 0xC3, 0xC9, 0x89, - 0x1A, 0xC7, 0x42, 0x82, 0x4B, 0x2E, 0xDC, 0x8E, 0x8D, 0x73, 0xCE, 0xB1, 0xCC, 0x01, - 0xD9, 0x08, 0x70, 0x87, 0x3C, 0x44, 0x08, 0xEC, 0x49, 0x8F, 0x81, 0x5A, 0xE2, 0x40, - 0xFF, 0x77, 0xFC, 0x0D}; - Exponent1 = new CryptoPP::byte[0x80]{ - 0x52, 0xCC, 0x2D, 0xA0, 0x9C, 0x9E, 0x75, 0xE7, 0x28, 0xEE, 0x3D, 0xDE, 0xE3, - 0x45, 0xD1, 0x4F, 0x94, 0x1C, 0xCC, 0xC8, 0x87, 0x29, 0x45, 0x3B, 0x8D, 0x6E, - 0xAB, 0x6E, 0x2A, 0xA7, 0xC7, 0x15, 0x43, 0xA3, 0x04, 0x8F, 0x90, 0x5F, 0xEB, - 0xF3, 0x38, 0x4A, 0x77, 0xFA, 0x36, 0xB7, 0x15, 0x76, 0xB6, 0x01, 0x1A, 0x8E, - 0x25, 0x87, 0x82, 0xF1, 0x55, 0xD8, 0xC6, 0x43, 0x2A, 0xC0, 0xE5, 0x98, 0xC9, - 0x32, 0xD1, 0x94, 0x6F, 0xD9, 0x01, 0xBA, 0x06, 0x81, 0xE0, 0x6D, 0x88, 0xF2, - 0x24, 0x2A, 0x25, 0x01, 0x64, 0x5C, 0xBF, 0xF2, 0xD9, 0x99, 0x67, 0x3E, 0xF6, - 0x72, 0xEE, 0xE4, 0xE2, 0x33, 0x5C, 0xF8, 0x00, 0x40, 0xE3, 0x2A, 0x9A, 0xF4, - 0x3D, 0x22, 0x86, 0x44, 0x3C, 0xFB, 0x0A, 0xA5, 0x7C, 0x3F, 0xCC, 0xF5, 0xF1, - 0x16, 0xC4, 0xAC, 0x88, 0xB4, 0xDE, 0x62, 0x94, 0x92, 0x6A, 0x13}; - Exponent2 = new CryptoPP::byte[0x80]{ - 0x7C, 0x9D, 0xAD, 0x39, 0xE0, 0xD5, 0x60, 0x14, 0x94, 0x48, 0x19, 0x7F, 0x88, - 0x95, 0xD5, 0x8B, 0x80, 0xAD, 0x85, 0x8A, 0x4B, 0x77, 0x37, 0x85, 0xD0, 0x77, - 0xBB, 0xBF, 0x89, 0x71, 0x4A, 0x72, 0xCB, 0x72, 0x68, 0x38, 0xEC, 0x02, 0xC6, - 0x7D, 0xC6, 0x44, 0x06, 0x33, 0x51, 0x1C, 0xC0, 0xFF, 0x95, 0x8F, 0x0D, 0x75, - 0xDC, 0x25, 0xBB, 0x0B, 0x73, 0x91, 0xA9, 0x6D, 0x42, 0xD8, 0x03, 0xB7, 0x68, - 0xD4, 0x1E, 0x75, 0x62, 0xA3, 0x70, 0x35, 0x79, 0x78, 0x00, 0xC8, 0xF5, 0xEF, - 0x15, 0xB9, 0xFC, 0x4E, 0x47, 0x5A, 0xC8, 0x70, 0x70, 0x5B, 0x52, 0x98, 0xC0, - 0xC2, 0x58, 0x4A, 0x70, 0x96, 0xCC, 0xB8, 0x10, 0xE1, 0x2F, 0x78, 0x8B, 0x2B, - 0xA1, 0x7F, 0xF9, 0xAC, 0xDE, 0xF0, 0xBB, 0x2B, 0xE2, 0x66, 0xE3, 0x22, 0x92, - 0x31, 0x21, 0x57, 0x92, 0xC4, 0xB8, 0xF2, 0x3E, 0x76, 0x20, 0x37}; - Coefficient = new CryptoPP::byte[0x80]{ - 0x45, 0x97, 0x55, 0xD4, 0x22, 0x08, 0x5E, 0xF3, 0x5C, 0xB4, 0x05, 0x7A, 0xFD, - 0xAA, 0x42, 0x42, 0xAD, 0x9A, 0x8C, 0xA0, 0x6C, 0xBB, 0x1D, 0x68, 0x54, 0x54, - 0x6E, 0x3E, 0x32, 0xE3, 0x53, 0x73, 0x76, 0xF1, 0x3E, 0x01, 0xEA, 0xD3, 0xCF, - 0xEB, 0xEB, 0x23, 0x3E, 0xC0, 0xBE, 0xCE, 0xEC, 0x2C, 0x89, 0x5F, 0xA8, 0x27, - 0x3A, 0x4C, 0xB7, 0xE6, 0x74, 0xBC, 0x45, 0x4C, 0x26, 0xC8, 0x25, 0xFF, 0x34, - 0x63, 0x25, 0x37, 0xE1, 0x48, 0x10, 0xC1, 0x93, 0xA6, 0xAF, 0xEB, 0xBA, 0xE3, - 0xA2, 0xF1, 0x3D, 0xEF, 0x63, 0xD8, 0xF4, 0xFD, 0xD3, 0xEE, 0xE2, 0x5D, 0xE9, - 0x33, 0xCC, 0xAD, 0xBA, 0x75, 0x5C, 0x85, 0xAF, 0xCE, 0xA9, 0x3D, 0xD1, 0xA2, - 0x17, 0xF3, 0xF6, 0x98, 0xB3, 0x50, 0x8E, 0x5E, 0xF6, 0xEB, 0x02, 0x8E, 0xA1, - 0x62, 0xA7, 0xD6, 0x2C, 0xEC, 0x91, 0xFF, 0x15, 0x40, 0xD2, 0xE3}; - Modulus = new CryptoPP::byte[0x100]{ - 0xd2, 0x12, 0xfc, 0x33, 0x5f, 0x6d, 0xdb, 0x83, 0x16, 0x09, 0x62, 0x8b, 0x03, 0x56, - 0x27, 0x37, 0x82, 0xd4, 0x77, 0x85, 0x35, 0x29, 0x39, 0x2d, 0x52, 0x6b, 0x8c, 0x4c, - 0x8c, 0xfb, 0x06, 0xc1, 0x84, 0x5b, 0xe7, 0xd4, 0xf7, 0xbc, 0xd2, 0x4e, 0x62, 0x45, - 0xcd, 0x2a, 0xbb, 0xd7, 0x77, 0x76, 0x45, 0x36, 0x55, 0x27, 0x3f, 0xb3, 0xf5, 0xf9, - 0x8e, 0xda, 0x4b, 0xef, 0xaa, 0x59, 0xae, 0xb3, 0x9b, 0xea, 0x54, 0x98, 0xd2, 0x06, - 0x32, 0x6a, 0x58, 0x31, 0x2a, 0xe0, 0xd4, 0x4f, 0x90, 0xb5, 0x0a, 0x7d, 0xec, 0xf4, - 0x3a, 0x9c, 0x52, 0x67, 0x2d, 0x99, 0x31, 0x8e, 0x0c, 0x43, 0xe6, 0x82, 0xfe, 0x07, - 0x46, 0xe1, 0x2e, 0x50, 0xd4, 0x1f, 0x2d, 0x2f, 0x7e, 0xd9, 0x08, 0xba, 0x06, 0xb3, - 0xbf, 0x2e, 0x20, 0x3f, 0x4e, 0x3f, 0xfe, 0x44, 0xff, 0xaa, 0x50, 0x43, 0x57, 0x91, - 0x69, 0x94, 0x49, 0x15, 0x82, 0x82, 0xe4, 0x0f, 0x4c, 0x8d, 0x9d, 0x2c, 0xc9, 0x5b, - 0x1d, 0x64, 0xbf, 0x88, 0x8b, 0xd4, 0xc5, 0x94, 0xe7, 0x65, 0x47, 0x84, 0x1e, 0xe5, - 0x79, 0x10, 0xfb, 0x98, 0x93, 0x47, 0xb9, 0x7d, 0x85, 0x12, 0xa6, 0x40, 0x98, 0x2c, - 0xf7, 0x92, 0xbc, 0x95, 0x19, 0x32, 0xed, 0xe8, 0x90, 0x56, 0x0d, 0x65, 0xc1, 0xaa, - 0x78, 0xc6, 0x2e, 0x54, 0xfd, 0x5f, 0x54, 0xa1, 0xf6, 0x7e, 0xe5, 0xe0, 0x5f, 0x61, - 0xc1, 0x20, 0xb4, 0xb9, 0xb4, 0x33, 0x08, 0x70, 0xe4, 0xdf, 0x89, 0x56, 0xed, 0x01, - 0x29, 0x46, 0x77, 0x5f, 0x8c, 0xb8, 0xa9, 0xf5, 0x1e, 0x2e, 0xb3, 0xb9, 0xbf, 0xe0, - 0x09, 0xb7, 0x8d, 0x28, 0xd4, 0xa6, 0xc3, 0xb8, 0x1e, 0x1f, 0x07, 0xeb, 0xb4, 0x12, - 0x0b, 0x95, 0xb8, 0x85, 0x30, 0xfd, 0xdc, 0x39, 0x13, 0xd0, 0x7c, 0xdc, 0x8f, 0xed, - 0xf9, 0xc9, 0xa3, 0xc1}; - PublicExponent = new CryptoPP::byte[4]{0, 1, 0, 1}; - }; - - // Destructor - ~PkgDerivedKey3Keyset() { - delete[] Prime1; - delete[] Prime2; - delete[] PrivateExponent; - delete[] Exponent1; - delete[] Exponent2; - delete[] Coefficient; - delete[] Modulus; - delete[] PublicExponent; - }; + static constexpr CryptoPP::byte Prime2[] = { + 0xD7, 0xA1, 0x0F, 0x9A, 0x8B, 0xF2, 0xC9, 0x11, 0x95, 0x32, 0x9A, 0x8C, 0xF0, 0xD9, 0x40, + 0x47, 0xF5, 0x68, 0xA0, 0x0D, 0xBD, 0xC1, 0xFC, 0x43, 0x2F, 0x65, 0xF9, 0xC3, 0x61, 0x0F, + 0x25, 0x77, 0x54, 0xAD, 0xD7, 0x58, 0xAC, 0x84, 0x40, 0x60, 0x8D, 0x3F, 0xF3, 0x65, 0x89, + 0x75, 0xB5, 0xC6, 0x2C, 0x51, 0x1A, 0x2F, 0x1F, 0x22, 0xE4, 0x43, 0x11, 0x54, 0xBE, 0xC9, + 0xB4, 0xC7, 0xB5, 0x1B, 0x05, 0x0B, 0xBC, 0x56, 0x9A, 0xCD, 0x4A, 0xD9, 0x73, 0x68, 0x5E, + 0x5C, 0xFB, 0x92, 0xB7, 0x8B, 0x0D, 0xFF, 0xF5, 0x07, 0xCA, 0xB4, 0xC8, 0x9B, 0x96, 0x3C, + 0x07, 0x9E, 0x3E, 0x6B, 0x2A, 0x11, 0xF2, 0x8A, 0xB1, 0x8A, 0xD7, 0x2E, 0x1B, 0xA5, 0x53, + 0x24, 0x06, 0xED, 0x50, 0xB8, 0x90, 0x67, 0xB1, 0xE2, 0x41, 0xC6, 0x92, 0x01, 0xEE, 0x10, + 0xF0, 0x61, 0xBB, 0xFB, 0xB2, 0x7D, 0x4A, 0x73}; + static constexpr CryptoPP::byte PrivateExponent[] = { + 0x32, 0xD9, 0x03, 0x90, 0x8F, 0xBD, 0xB0, 0x8F, 0x57, 0x2B, 0x28, 0x5E, 0x0B, 0x8D, 0xB3, + 0xEA, 0x5C, 0xD1, 0x7E, 0xA8, 0x90, 0x88, 0x8C, 0xDD, 0x6A, 0x80, 0xBB, 0xB1, 0xDF, 0xC1, + 0xF7, 0x0D, 0xAA, 0x32, 0xF0, 0xB7, 0x7C, 0xCB, 0x88, 0x80, 0x0E, 0x8B, 0x64, 0xB0, 0xBE, + 0x4C, 0xD6, 0x0E, 0x9B, 0x8C, 0x1E, 0x2A, 0x64, 0xE1, 0xF3, 0x5C, 0xD7, 0x76, 0x01, 0x41, + 0x5E, 0x93, 0x5C, 0x94, 0xFE, 0xDD, 0x46, 0x62, 0xC3, 0x1B, 0x5A, 0xE2, 0xA0, 0xBC, 0x2D, + 0xEB, 0xC3, 0x98, 0x0A, 0xA7, 0xB7, 0x85, 0x69, 0x70, 0x68, 0x2B, 0x64, 0x4A, 0xB3, 0x1F, + 0xCC, 0x7D, 0xDC, 0x7C, 0x26, 0xF4, 0x77, 0xF6, 0x5C, 0xF2, 0xAE, 0x5A, 0x44, 0x2D, 0xD3, + 0xAB, 0x16, 0x62, 0x04, 0x19, 0xBA, 0xFB, 0x90, 0xFF, 0xE2, 0x30, 0x50, 0x89, 0x6E, 0xCB, + 0x56, 0xB2, 0xEB, 0xC0, 0x91, 0x16, 0x92, 0x5E, 0x30, 0x8E, 0xAE, 0xC7, 0x94, 0x5D, 0xFD, + 0x35, 0xE1, 0x20, 0xF8, 0xAD, 0x3E, 0xBC, 0x08, 0xBF, 0xC0, 0x36, 0x74, 0x9F, 0xD5, 0xBB, + 0x52, 0x08, 0xFD, 0x06, 0x66, 0xF3, 0x7A, 0xB3, 0x04, 0xF4, 0x75, 0x29, 0x5D, 0xE9, 0x5F, + 0xAA, 0x10, 0x30, 0xB2, 0x0F, 0x5A, 0x1A, 0xC1, 0x2A, 0xB3, 0xFE, 0xCB, 0x21, 0xAD, 0x80, + 0xEC, 0x8F, 0x20, 0x09, 0x1C, 0xDB, 0xC5, 0x58, 0x94, 0xC2, 0x9C, 0xC6, 0xCE, 0x82, 0x65, + 0x3E, 0x57, 0x90, 0xBC, 0xA9, 0x8B, 0x06, 0xB4, 0xF0, 0x72, 0xF6, 0x77, 0xDF, 0x98, 0x64, + 0xF1, 0xEC, 0xFE, 0x37, 0x2D, 0xBC, 0xAE, 0x8C, 0x08, 0x81, 0x1F, 0xC3, 0xC9, 0x89, 0x1A, + 0xC7, 0x42, 0x82, 0x4B, 0x2E, 0xDC, 0x8E, 0x8D, 0x73, 0xCE, 0xB1, 0xCC, 0x01, 0xD9, 0x08, + 0x70, 0x87, 0x3C, 0x44, 0x08, 0xEC, 0x49, 0x8F, 0x81, 0x5A, 0xE2, 0x40, 0xFF, 0x77, 0xFC, + 0x0D}; }; \ No newline at end of file From 905d49fd9691cab31e0a66eb94e3e0181679dbb1 Mon Sep 17 00:00:00 2001 From: squidbus <175574877+squidbus@users.noreply.github.com> Date: Wed, 28 Aug 2024 03:42:53 -0700 Subject: [PATCH 54/69] memory: Fixes for direct memory allocation. (#615) * memory: Size direct memory based on requested flexible memory. * memory: Guard against OrbisProcParam without an OrbisKernelMemParam. * memory: Account for alignment in direct memory suitability checks and add more debugging. --- .../libraries/kernel/memory_management.cpp | 9 ++-- src/core/libraries/kernel/memory_management.h | 2 +- src/core/linker.cpp | 18 +++++--- src/core/memory.cpp | 44 +++++++++++++++---- src/core/memory.h | 9 ++-- 5 files changed, 60 insertions(+), 22 deletions(-) diff --git a/src/core/libraries/kernel/memory_management.cpp b/src/core/libraries/kernel/memory_management.cpp index ab6aa3985..3fc837d96 100644 --- a/src/core/libraries/kernel/memory_management.cpp +++ b/src/core/libraries/kernel/memory_management.cpp @@ -15,7 +15,8 @@ namespace Libraries::Kernel { u64 PS4_SYSV_ABI sceKernelGetDirectMemorySize() { LOG_WARNING(Kernel_Vmm, "called"); - return SCE_KERNEL_MAIN_DMEM_SIZE; + const auto* memory = Core::Memory::Instance(); + return memory->GetTotalDirectSize(); } int PS4_SYSV_ABI sceKernelAllocateDirectMemory(s64 searchStart, s64 searchEnd, u64 len, @@ -52,8 +53,8 @@ int PS4_SYSV_ABI sceKernelAllocateDirectMemory(s64 searchStart, s64 searchEnd, u s32 PS4_SYSV_ABI sceKernelAllocateMainDirectMemory(size_t len, size_t alignment, int memoryType, s64* physAddrOut) { - return sceKernelAllocateDirectMemory(0, SCE_KERNEL_MAIN_DMEM_SIZE, len, alignment, memoryType, - physAddrOut); + const auto searchEnd = static_cast(sceKernelGetDirectMemorySize()); + return sceKernelAllocateDirectMemory(0, searchEnd, len, alignment, memoryType, physAddrOut); } s32 PS4_SYSV_ABI sceKernelCheckedReleaseDirectMemory(u64 start, size_t len) { @@ -78,7 +79,7 @@ s32 PS4_SYSV_ABI sceKernelAvailableDirectMemorySize(u64 searchStart, u64 searchE if (physAddrOut == nullptr || sizeOut == nullptr) { return ORBIS_KERNEL_ERROR_EINVAL; } - if (searchEnd > SCE_KERNEL_MAIN_DMEM_SIZE) { + if (searchEnd > sceKernelGetDirectMemorySize()) { return ORBIS_KERNEL_ERROR_EINVAL; } if (searchEnd <= searchStart) { diff --git a/src/core/libraries/kernel/memory_management.h b/src/core/libraries/kernel/memory_management.h index c9dd86e18..9a447fe8b 100644 --- a/src/core/libraries/kernel/memory_management.h +++ b/src/core/libraries/kernel/memory_management.h @@ -6,7 +6,7 @@ #include "common/bit_field.h" #include "common/types.h" -constexpr u64 SCE_KERNEL_MAIN_DMEM_SIZE = 4608_MB; // ~ 4.5GB +constexpr u64 SCE_KERNEL_MAIN_DMEM_SIZE = 5056_MB; // ~ 5GB namespace Libraries::Kernel { diff --git a/src/core/linker.cpp b/src/core/linker.cpp index 6f46fdbe3..9783ad96f 100644 --- a/src/core/linker.cpp +++ b/src/core/linker.cpp @@ -68,11 +68,19 @@ void Linker::Execute() { } // Configure used flexible memory size. - // if (auto* mem_param = GetProcParam()->mem_param) { - // if (u64* flexible_size = mem_param->flexible_memory_size) { - // memory->SetTotalFlexibleSize(*flexible_size); - // } - // } + if (const auto* proc_param = GetProcParam()) { + if (proc_param->size >= + offsetof(OrbisProcParam, mem_param) + sizeof(OrbisKernelMemParam*)) { + if (const auto* mem_param = proc_param->mem_param) { + if (mem_param->size >= + offsetof(OrbisKernelMemParam, flexible_memory_size) + sizeof(u64*)) { + if (const auto* flexible_size = mem_param->flexible_memory_size) { + memory->SetupMemoryRegions(*flexible_size); + } + } + } + } + } // Init primary thread. Common::SetCurrentThreadName("GAME_MainThread"); diff --git a/src/core/memory.cpp b/src/core/memory.cpp index 0feef260b..2722c68a9 100644 --- a/src/core/memory.cpp +++ b/src/core/memory.cpp @@ -11,9 +11,11 @@ namespace Core { +constexpr u64 SCE_DEFAULT_FLEXIBLE_MEMORY_SIZE = 448_MB; + MemoryManager::MemoryManager() { - // Insert an area that covers direct memory physical block. - dmem_map.emplace(0, DirectMemoryArea{0, SCE_KERNEL_MAIN_DMEM_SIZE}); + // Set up the direct and flexible memory regions. + SetupMemoryRegions(SCE_DEFAULT_FLEXIBLE_MEMORY_SIZE); // Insert a virtual memory area that covers the entire area we manage. const VAddr system_managed_base = impl.SystemManagedVirtualBase(); @@ -35,6 +37,19 @@ MemoryManager::MemoryManager() { MemoryManager::~MemoryManager() = default; +void MemoryManager::SetupMemoryRegions(u64 flexible_size) { + total_flexible_size = flexible_size; + total_direct_size = SCE_KERNEL_MAIN_DMEM_SIZE - flexible_size; + + // Insert an area that covers direct memory physical block. + // Note that this should never be called after direct memory allocations have been made. + dmem_map.clear(); + dmem_map.emplace(0, DirectMemoryArea{0, total_direct_size}); + + LOG_INFO(Kernel_Vmm, "Configured memory regions: flexible size = {:#x}, direct size = {:#x}", + total_flexible_size, total_direct_size); +} + PAddr MemoryManager::Allocate(PAddr search_start, PAddr search_end, size_t size, u64 alignment, int memory_type) { std::scoped_lock lk{mutex}; @@ -42,12 +57,17 @@ PAddr MemoryManager::Allocate(PAddr search_start, PAddr search_end, size_t size, auto dmem_area = FindDmemArea(search_start); const auto is_suitable = [&] { - return dmem_area->second.is_free && dmem_area->second.size >= size; + const auto aligned_base = alignment > 0 ? Common::AlignUp(dmem_area->second.base, alignment) + : dmem_area->second.base; + const auto alignment_size = aligned_base - dmem_area->second.base; + const auto remaining_size = + dmem_area->second.size >= alignment_size ? dmem_area->second.size - alignment_size : 0; + return dmem_area->second.is_free && remaining_size >= size; }; while (!is_suitable() && dmem_area->second.GetEnd() <= search_end) { dmem_area++; } - ASSERT_MSG(is_suitable(), "Unable to find free direct memory area"); + ASSERT_MSG(is_suitable(), "Unable to find free direct memory area: size = {:#x}", size); // Align free position PAddr free_addr = dmem_area->second.base; @@ -333,14 +353,19 @@ int MemoryManager::DirectQueryAvailable(PAddr search_start, PAddr search_end, si continue; } - if (dmem_area->second.size > max_size) { - paddr = dmem_area->second.base; - max_size = dmem_area->second.size; + const auto aligned_base = alignment > 0 ? Common::AlignUp(dmem_area->second.base, alignment) + : dmem_area->second.base; + const auto alignment_size = aligned_base - dmem_area->second.base; + const auto remaining_size = + dmem_area->second.size >= alignment_size ? dmem_area->second.size - alignment_size : 0; + if (remaining_size > max_size) { + paddr = aligned_base; + max_size = remaining_size; } dmem_area++; } - *phys_addr_out = alignment > 0 ? Common::AlignUp(paddr, alignment) : paddr; + *phys_addr_out = paddr; *size_out = max_size; return ORBIS_OK; } @@ -418,7 +443,8 @@ MemoryManager::DMemHandle MemoryManager::CarveDmemArea(PAddr addr, size_t size) const PAddr start_in_area = addr - area.base; const PAddr end_in_vma = start_in_area + size; - ASSERT_MSG(end_in_vma <= area.size, "Mapping cannot fit inside free region"); + ASSERT_MSG(end_in_vma <= area.size, "Mapping cannot fit inside free region: size = {:#x}", + size); if (end_in_vma != area.size) { // Split VMA at the end of the allocated region diff --git a/src/core/memory.h b/src/core/memory.h index d58269678..c8638626a 100644 --- a/src/core/memory.h +++ b/src/core/memory.h @@ -130,8 +130,8 @@ public: rasterizer = rasterizer_; } - void SetTotalFlexibleSize(u64 size) { - total_flexible_size = size; + u64 GetTotalDirectSize() const { + return total_direct_size; } u64 GetAvailableFlexibleSize() const { @@ -142,6 +142,8 @@ public: return impl.SystemReservedVirtualBase(); } + void SetupMemoryRegions(u64 flexible_size); + PAddr Allocate(PAddr search_start, PAddr search_end, size_t size, u64 alignment, int memory_type); @@ -217,7 +219,8 @@ private: DMemMap dmem_map; VMAMap vma_map; std::recursive_mutex mutex; - size_t total_flexible_size = 448_MB; + size_t total_direct_size{}; + size_t total_flexible_size{}; size_t flexible_usage{}; Vulkan::Rasterizer* rasterizer{}; }; From 4e6e90dfb9c42151ef9d79493d694068eabc629d Mon Sep 17 00:00:00 2001 From: counter185 <33550839+counter185@users.noreply.github.com> Date: Wed, 28 Aug 2024 13:48:50 +0200 Subject: [PATCH 55/69] add touchpad support, auto reconnect --- src/core/libraries/pad/pad.cpp | 11 ++++++----- src/input/controller.cpp | 16 ++++++++++++++-- src/input/controller.h | 8 ++++++++ src/sdl_window.cpp | 16 ++++++++++++++++ 4 files changed, 44 insertions(+), 7 deletions(-) diff --git a/src/core/libraries/pad/pad.cpp b/src/core/libraries/pad/pad.cpp index 5bf9c3af8..b617f7359 100644 --- a/src/core/libraries/pad/pad.cpp +++ b/src/core/libraries/pad/pad.cpp @@ -309,12 +309,13 @@ int PS4_SYSV_ABI scePadRead(s32 handle, OrbisPadData* pData, s32 num) { pData[i].angularVelocity.x = 0.0f; pData[i].angularVelocity.y = 0.0f; pData[i].angularVelocity.z = 0.0f; - pData[i].touchData.touchNum = 0; - pData[i].touchData.touch[0].x = 0; - pData[i].touchData.touch[0].y = 0; + pData[i].touchData.touchNum = (states[i].touchpad[0].state ? 1 : 0) + + (states[i].touchpad[1].state ? 1 : 0); + pData[i].touchData.touch[0].x = states[i].touchpad[0].x; + pData[i].touchData.touch[0].y = states[i].touchpad[0].y; pData[i].touchData.touch[0].id = 1; - pData[i].touchData.touch[1].x = 0; - pData[i].touchData.touch[1].y = 0; + pData[i].touchData.touch[1].x = states[i].touchpad[1].x; + pData[i].touchData.touch[1].y = states[i].touchpad[1].y; pData[i].touchData.touch[1].id = 2; pData[i].connected = connected; pData[i].timestamp = states[i].time; diff --git a/src/input/controller.cpp b/src/input/controller.cpp index 4a3db1633..cb4529a7f 100644 --- a/src/input/controller.cpp +++ b/src/input/controller.cpp @@ -132,15 +132,27 @@ bool GameController::SetVibration(u8 smallMotor, u8 largeMotor) { return true; } +void GameController::SetTouchpadState(int touchIndex, bool touchDown, float x, float y) { + if (touchIndex < 2) { // DS4 has 2-point multitouch + auto state = GetLastState(); + + state.time = Libraries::Kernel::sceKernelGetProcessTime(); + state.touchpad[touchIndex].state = touchDown; + state.touchpad[touchIndex].x = static_cast(x * 1920); + state.touchpad[touchIndex].y = static_cast(y * 1080); + AddState(state); + } +} + void GameController::TryOpenSDLController() { if (m_sdl_gamepad == nullptr || !SDL_GamepadConnected(m_sdl_gamepad)) { int gamepad_count; SDL_JoystickID* gamepads = SDL_GetGamepads(&gamepad_count); m_sdl_gamepad = gamepad_count > 0 ? SDL_OpenGamepad(gamepads[0]) : nullptr; SDL_free(gamepads); - } - SetLightBarRGB(0, 0, 255); + SetLightBarRGB(0, 0, 255); + } } } // namespace Input diff --git a/src/input/controller.h b/src/input/controller.h index ef0991568..cb9fe1726 100644 --- a/src/input/controller.h +++ b/src/input/controller.h @@ -21,10 +21,17 @@ enum class Axis { AxisMax }; +struct TouchpadEntry { + bool state; + u16 x; + u16 y; +}; + struct State { u32 buttonsState = 0; u64 time = 0; int axes[static_cast(Axis::AxisMax)] = {128, 128, 128, 128, 0, 0}; + TouchpadEntry touchpad[2] = {{false, 0, 0}, {false, 0, 0}}; }; inline int GetAxis(int min, int max, int value) { @@ -47,6 +54,7 @@ public: void Axis(int id, Input::Axis axis, int value); void SetLightBarRGB(u8 r, u8 g, u8 b); bool SetVibration(u8 smallMotor, u8 largeMotor); + void SetTouchpadState(int touchIndex, bool touchDown, float x, float y); void TryOpenSDLController(); private: diff --git a/src/sdl_window.cpp b/src/sdl_window.cpp index ff44e6c30..b83afd299 100644 --- a/src/sdl_window.cpp +++ b/src/sdl_window.cpp @@ -98,6 +98,11 @@ void WindowSDL::waitEvent() { case SDL_EVENT_GAMEPAD_BUTTON_DOWN: case SDL_EVENT_GAMEPAD_BUTTON_UP: case SDL_EVENT_GAMEPAD_AXIS_MOTION: + case SDL_EVENT_GAMEPAD_ADDED: + case SDL_EVENT_GAMEPAD_REMOVED: + case SDL_EVENT_GAMEPAD_TOUCHPAD_DOWN: + case SDL_EVENT_GAMEPAD_TOUCHPAD_UP: + case SDL_EVENT_GAMEPAD_TOUCHPAD_MOTION: onGamepadEvent(&event); break; case SDL_EVENT_QUIT: @@ -299,6 +304,17 @@ void WindowSDL::onGamepadEvent(const SDL_Event* event) { u32 button = 0; Input::Axis axis = Input::Axis::AxisMax; switch (event->type) { + case SDL_EVENT_GAMEPAD_ADDED: + case SDL_EVENT_GAMEPAD_REMOVED: + controller->TryOpenSDLController(); + break; + case SDL_EVENT_GAMEPAD_TOUCHPAD_DOWN: + case SDL_EVENT_GAMEPAD_TOUCHPAD_UP: + case SDL_EVENT_GAMEPAD_TOUCHPAD_MOTION: + controller->SetTouchpadState(event->gtouchpad.finger, + event->type != SDL_EVENT_GAMEPAD_TOUCHPAD_UP, + event->gtouchpad.x, event->gtouchpad.y); + break; case SDL_EVENT_GAMEPAD_BUTTON_DOWN: case SDL_EVENT_GAMEPAD_BUTTON_UP: button = sdlGamepadToOrbisButton(event->gbutton.button); From 698dade8645fdc542409d6ba1a6d2e1110bbfa11 Mon Sep 17 00:00:00 2001 From: counter185 <33550839+counter185@users.noreply.github.com> Date: Wed, 28 Aug 2024 13:53:07 +0200 Subject: [PATCH 56/69] * --- src/input/controller.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/input/controller.cpp b/src/input/controller.cpp index cb4529a7f..ed415e232 100644 --- a/src/input/controller.cpp +++ b/src/input/controller.cpp @@ -134,12 +134,14 @@ bool GameController::SetVibration(u8 smallMotor, u8 largeMotor) { void GameController::SetTouchpadState(int touchIndex, bool touchDown, float x, float y) { if (touchIndex < 2) { // DS4 has 2-point multitouch + std::scoped_lock lock{m_mutex}; auto state = GetLastState(); - state.time = Libraries::Kernel::sceKernelGetProcessTime(); + state.touchpad[touchIndex].state = touchDown; state.touchpad[touchIndex].x = static_cast(x * 1920); state.touchpad[touchIndex].y = static_cast(y * 1080); + AddState(state); } } From 0b24ac6991b8829f2d2dda8c903b0af81bcfb5b5 Mon Sep 17 00:00:00 2001 From: counter185 <33550839+counter185@users.noreply.github.com> Date: Wed, 28 Aug 2024 13:56:49 +0200 Subject: [PATCH 57/69] actually get rid of that comment --- src/input/controller.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/input/controller.cpp b/src/input/controller.cpp index ed415e232..96273555b 100644 --- a/src/input/controller.cpp +++ b/src/input/controller.cpp @@ -133,7 +133,7 @@ bool GameController::SetVibration(u8 smallMotor, u8 largeMotor) { } void GameController::SetTouchpadState(int touchIndex, bool touchDown, float x, float y) { - if (touchIndex < 2) { // DS4 has 2-point multitouch + if (touchIndex < 2) { std::scoped_lock lock{m_mutex}; auto state = GetLastState(); state.time = Libraries::Kernel::sceKernelGetProcessTime(); From 15fc267f0d8075bbec4c9a68ea878b14dd1c4dda Mon Sep 17 00:00:00 2001 From: counter185 <33550839+counter185@users.noreply.github.com> Date: Wed, 28 Aug 2024 13:58:37 +0200 Subject: [PATCH 58/69] Update controller.h --- src/input/controller.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/input/controller.h b/src/input/controller.h index cb9fe1726..0a0d663a1 100644 --- a/src/input/controller.h +++ b/src/input/controller.h @@ -22,9 +22,9 @@ enum class Axis { }; struct TouchpadEntry { - bool state; - u16 x; - u16 y; + bool state{}; + u16 x{}; + u16 y{}; }; struct State { From 89bdd3bba20444e1a9627f04b967834d5c8fef02 Mon Sep 17 00:00:00 2001 From: counter185 <33550839+counter185@users.noreply.github.com> Date: Wed, 28 Aug 2024 14:15:01 +0200 Subject: [PATCH 59/69] it's actually 1920x941 --- src/input/controller.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/input/controller.cpp b/src/input/controller.cpp index 96273555b..4de6d83b8 100644 --- a/src/input/controller.cpp +++ b/src/input/controller.cpp @@ -140,7 +140,7 @@ void GameController::SetTouchpadState(int touchIndex, bool touchDown, float x, f state.touchpad[touchIndex].state = touchDown; state.touchpad[touchIndex].x = static_cast(x * 1920); - state.touchpad[touchIndex].y = static_cast(y * 1080); + state.touchpad[touchIndex].y = static_cast(y * 941); AddState(state); } From 2e2f3bb2c682d0305a69f94b29db93482b051161 Mon Sep 17 00:00:00 2001 From: counter185 <33550839+counter185@users.noreply.github.com> Date: Wed, 28 Aug 2024 14:22:59 +0200 Subject: [PATCH 60/69] clang format --- src/core/libraries/pad/pad.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/core/libraries/pad/pad.cpp b/src/core/libraries/pad/pad.cpp index b617f7359..01cc85cca 100644 --- a/src/core/libraries/pad/pad.cpp +++ b/src/core/libraries/pad/pad.cpp @@ -309,8 +309,8 @@ int PS4_SYSV_ABI scePadRead(s32 handle, OrbisPadData* pData, s32 num) { pData[i].angularVelocity.x = 0.0f; pData[i].angularVelocity.y = 0.0f; pData[i].angularVelocity.z = 0.0f; - pData[i].touchData.touchNum = (states[i].touchpad[0].state ? 1 : 0) - + (states[i].touchpad[1].state ? 1 : 0); + pData[i].touchData.touchNum = + (states[i].touchpad[0].state ? 1 : 0) + (states[i].touchpad[1].state ? 1 : 0); pData[i].touchData.touch[0].x = states[i].touchpad[0].x; pData[i].touchData.touch[0].y = states[i].touchpad[0].y; pData[i].touchData.touch[0].id = 1; From bc661039c541d240c7bb2a4cf6bff9dc66c88c71 Mon Sep 17 00:00:00 2001 From: counter185 <33550839+counter185@users.noreply.github.com> Date: Wed, 28 Aug 2024 14:25:07 +0200 Subject: [PATCH 61/69] get rid of one space --- src/core/libraries/pad/pad.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/libraries/pad/pad.cpp b/src/core/libraries/pad/pad.cpp index 01cc85cca..a0abfdf73 100644 --- a/src/core/libraries/pad/pad.cpp +++ b/src/core/libraries/pad/pad.cpp @@ -309,7 +309,7 @@ int PS4_SYSV_ABI scePadRead(s32 handle, OrbisPadData* pData, s32 num) { pData[i].angularVelocity.x = 0.0f; pData[i].angularVelocity.y = 0.0f; pData[i].angularVelocity.z = 0.0f; - pData[i].touchData.touchNum = + pData[i].touchData.touchNum = (states[i].touchpad[0].state ? 1 : 0) + (states[i].touchpad[1].state ? 1 : 0); pData[i].touchData.touch[0].x = states[i].touchpad[0].x; pData[i].touchData.touch[0].y = states[i].touchpad[0].y; From 08036d2b49c3ede671afb61c4c230205036a7ddc Mon Sep 17 00:00:00 2001 From: Emulator-Team-2 <38318848+Emulator-Team-2@users.noreply.github.com> Date: Wed, 28 Aug 2024 18:10:23 +0200 Subject: [PATCH 62/69] added data_format=36 and num_format=9 --- src/video_core/renderer_vulkan/liverpool_to_vk.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/video_core/renderer_vulkan/liverpool_to_vk.cpp b/src/video_core/renderer_vulkan/liverpool_to_vk.cpp index 025f311d8..d474cee68 100644 --- a/src/video_core/renderer_vulkan/liverpool_to_vk.cpp +++ b/src/video_core/renderer_vulkan/liverpool_to_vk.cpp @@ -296,6 +296,7 @@ std::span GetAllFormats() { vk::Format::eB10G11R11UfloatPack32, vk::Format::eBc1RgbaSrgbBlock, vk::Format::eBc1RgbaUnormBlock, + vk::Format::eBc2SrgbBlock, vk::Format::eBc2UnormBlock, vk::Format::eBc3SrgbBlock, vk::Format::eBc3UnormBlock, @@ -457,6 +458,9 @@ vk::Format SurfaceFormat(AmdGpu::DataFormat data_format, AmdGpu::NumberFormat nu } if (data_format == AmdGpu::DataFormat::FormatBc7 && num_format == AmdGpu::NumberFormat::Unorm) { return vk::Format::eBc7UnormBlock; + } + if (data_format == AmdGpu::DataFormat::FormatBc2 && num_format == AmdGpu::NumberFormat::Srgb) { + return vk::Format::eBc2SrgbBlock; } if (data_format == AmdGpu::DataFormat::FormatBc2 && num_format == AmdGpu::NumberFormat::Unorm) { return vk::Format::eBc2UnormBlock; From 6f938a10ce8cd6027afe61c4a9985efac5e1bfb5 Mon Sep 17 00:00:00 2001 From: Emulator-Team-2 <38318848+Emulator-Team-2@users.noreply.github.com> Date: Wed, 28 Aug 2024 18:12:59 +0200 Subject: [PATCH 63/69] added data_format=3 and num_format=4 --- src/video_core/renderer_vulkan/liverpool_to_vk.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/video_core/renderer_vulkan/liverpool_to_vk.cpp b/src/video_core/renderer_vulkan/liverpool_to_vk.cpp index d474cee68..89ee01589 100644 --- a/src/video_core/renderer_vulkan/liverpool_to_vk.cpp +++ b/src/video_core/renderer_vulkan/liverpool_to_vk.cpp @@ -453,6 +453,9 @@ vk::Format SurfaceFormat(AmdGpu::DataFormat data_format, AmdGpu::NumberFormat nu if (data_format == AmdGpu::DataFormat::Format8_8 && num_format == AmdGpu::NumberFormat::Unorm) { return vk::Format::eR8G8Unorm; } + if (data_format == AmdGpu::DataFormat::Format8_8 && num_format == AmdGpu::NumberFormat::Uint) { + return vk::Format::eR8G8Uint; + } if (data_format == AmdGpu::DataFormat::Format8_8 && num_format == AmdGpu::NumberFormat::Snorm) { return vk::Format::eR8G8Snorm; } From af18728962f0e9bf6a0bb7690d0b0b6479361571 Mon Sep 17 00:00:00 2001 From: Emulator-Team-2 <38318848+Emulator-Team-2@users.noreply.github.com> Date: Wed, 28 Aug 2024 18:45:32 +0200 Subject: [PATCH 64/69] clang-format fix --- src/video_core/renderer_vulkan/liverpool_to_vk.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/video_core/renderer_vulkan/liverpool_to_vk.cpp b/src/video_core/renderer_vulkan/liverpool_to_vk.cpp index 89ee01589..3ae19a82a 100644 --- a/src/video_core/renderer_vulkan/liverpool_to_vk.cpp +++ b/src/video_core/renderer_vulkan/liverpool_to_vk.cpp @@ -462,8 +462,8 @@ vk::Format SurfaceFormat(AmdGpu::DataFormat data_format, AmdGpu::NumberFormat nu if (data_format == AmdGpu::DataFormat::FormatBc7 && num_format == AmdGpu::NumberFormat::Unorm) { return vk::Format::eBc7UnormBlock; } - if (data_format == AmdGpu::DataFormat::FormatBc2 && num_format == AmdGpu::NumberFormat::Srgb) { - return vk::Format::eBc2SrgbBlock; + if (data_format == AmdGpu::DataFormat::FormatBc2 && num_format == AmdGpu::NumberFormat::Srgb) { + return vk::Format::eBc2SrgbBlock; } if (data_format == AmdGpu::DataFormat::FormatBc2 && num_format == AmdGpu::NumberFormat::Unorm) { return vk::Format::eBc2UnormBlock; From 365e17f64ea126d19e40dbf4d8f7ad7a37677de2 Mon Sep 17 00:00:00 2001 From: bigol83 <38129260+bigol83@users.noreply.github.com> Date: Wed, 28 Aug 2024 19:14:33 +0200 Subject: [PATCH 65/69] Update it.ts --- src/qt_gui/translations/it.ts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/qt_gui/translations/it.ts b/src/qt_gui/translations/it.ts index 228d798d0..a47d36823 100644 --- a/src/qt_gui/translations/it.ts +++ b/src/qt_gui/translations/it.ts @@ -16,7 +16,7 @@ shadPS4 is an experimental open-source emulator for the PlayStation 4. - shadPS4 è un emulatore sperimentale open source per Playstation 4. + shadPS4 è un emulatore sperimentale open source per PlayStation 4. @@ -176,7 +176,7 @@ Install application from a .pkg file - Installa applicaazione da un .pkg file + Installa applicazione da un file .pkg file @@ -365,7 +365,7 @@ System - Systema + Sistema @@ -450,7 +450,7 @@ Enable Shaders Dumping - Abilita Scaricamento Shader + Abilita Dump Shader @@ -460,7 +460,7 @@ Enable PM4 Dumping - Abilita Scaricamento PM4 + Abilita Dump PM4 @@ -470,7 +470,7 @@ Enable Debug Dumping - Abilita Scaricamento Debug + Abilita Dump Debug From 55be97bca3dacbf9966e6e88c5cd5a9673e47bbb Mon Sep 17 00:00:00 2001 From: CyntexMore Date: Wed, 28 Aug 2024 22:15:03 +0200 Subject: [PATCH 66/69] feat(translation): hu_HU translated --- src/qt_gui/translations/hu_HU.ts | 184 +++++++++++++++---------------- 1 file changed, 92 insertions(+), 92 deletions(-) diff --git a/src/qt_gui/translations/hu_HU.ts b/src/qt_gui/translations/hu_HU.ts index a32b2d2ad..c6cc0bce2 100644 --- a/src/qt_gui/translations/hu_HU.ts +++ b/src/qt_gui/translations/hu_HU.ts @@ -6,7 +6,7 @@ About shadPS4 - About shadPS4 + A shadPS4-ről @@ -16,12 +16,12 @@ shadPS4 is an experimental open-source emulator for the PlayStation 4. - shadPS4 is an experimental open-source emulator for the PlayStation 4. + A shadPS4 egy kezdetleges, open-source PlayStation 4 emulátor. This software should not be used to play games you have not legally obtained. - This software should not be used to play games you have not legally obtained. + Ne használja ezt a szoftvert olyan játékokkal, amelyeket nem legális módon szerzett be. @@ -29,7 +29,7 @@ Open Folder - Open Folder + Mappa megnyitása @@ -37,17 +37,17 @@ Loading game list, please wait :3 - Loading game list, please wait :3 + Játék könyvtár betöltése, kérjük várjon :3 Cancel - Cancel + Megszakítás Loading... - Loading... + Betöltés.. @@ -55,27 +55,27 @@ shadPS4 - Choose directory - shadPS4 - Choose directory + shadPS4 - Mappa kiválasztása Directory to install games - Directory to install games + Mappa a játékok telepítésére Browse - Browse + Böngészés Error - Error + Hiba The value for location to install games is not valid. - The value for location to install games is not valid. + A játékok telepítéséhez megadott érték nem érvényes. @@ -83,67 +83,67 @@ Create Shortcut - Create Shortcut + Parancsikon Létrehozása Open Game Folder - Open Game Folder + Játék Mappa Megnyitása SFO Viewer - SFO Viewer + SFO Néző Trophy Viewer - Trophy Viewer + Trófeák Megtekintése Copy info - Copy info + Információ Másolása Copy Name - Copy Name + Név Másolása Copy Serial - Copy Serial + Széria Másolása Copy All - Copy All + Összes Másolása Shortcut creation - Shortcut creation + Parancsikon létrehozása Shortcut created successfully!\n %1 - Shortcut created successfully!\n %1 + Parancsikon sikeresen létrehozva!\n %1 Error - Error + Hiba Error creating shortcut!\n %1 - Error creating shortcut!\n %1 + Hiba a parancsikon létrehozásával!\n %1 Install PKG - Install PKG + PKG telepítése @@ -151,187 +151,187 @@ Open/Add Elf Folder - Open/Add Elf Folder + Efl Mappa Megnyitása/Hozzáadása Install Packages (PKG) - Install Packages (PKG) + PKG-k Telepítése (PKG) Boot Game - Boot Game + Játék Bootolása About shadPS4 - About shadPS4 + A shadPS4-ről Configure... - Configure... + Konfigurálás... Install application from a .pkg file - Install application from a .pkg file + Program telepítése egy .pkg fájlból Recent Games - Recent Games + Legutóbbi Játékok Exit - Exit + Kilépés Exit shadPS4 - Exit shadPS4 + Kilépés a shadPS4 Exit the application. - Exit the application. + Lépjen ki az programból. Show Game List - Show Game List + Játék Könyvtár Megjelenítése Game List Refresh - Game List Refresh + Játék Könyvtár Újratöltése Tiny - Tiny + Apró Small - Small + Kicsi Medium - Medium + Közepes Large - Large + Nagy List View - List View + Lista Nézet Grid View - Grid View + Rács Nézet Elf Viewer - Elf Viewer + Elf Néző Game Install Directory - Game Install Directory + Játék Telepítési Mappa Dump Game List - Dump Game List + Játék Lista Dumpolása PKG Viewer - PKG Viewer + PKG Néző Search... - Search... + Keresés... File - File + Fájl View - View + Megnézés Game List Icons - Game List Icons + Játék Könyvtár Ikonok Game List Mode - Game List Mode + Játék Könyvtár Mód Settings - Settings + Beállítások Utils - Utils + Segédeszközök Themes - Themes + Témák About - About + Segítség Dark - Dark + Sötét Light - Light + Világos Green - Green + Zöld Blue - Blue + Kék Violet - Violet + Ibolya toolBar - toolBar + Eszköztár @@ -339,7 +339,7 @@ Open Folder - Open Folder + Mappa Megnyitása @@ -347,7 +347,7 @@ Trophy Viewer - Trophy Viewer + Trófeák Megtekintése @@ -355,137 +355,137 @@ Settings - Settings + Beállítások General - General + Általános System - System + Rendszer Console Language - Console Language + A Konzol Nyelvezete Emulator Language - Emulator Language + Az Emulátor Nyelvezete Emulator - Emulator + Emulátor Enable Fullscreen - Enable Fullscreen + Teljesképernyő Engedélyezése Show Splash - Show Splash + Indítóképernyő Mutatása Is PS4 Pro - Is PS4 Pro + PS4 Pro Username - Username + Felhasználónév Logger - Logger + Naplózó Log Type - Log Type + Naplózási Típus Log Filter - Log Filter + Naplózási Filter Graphics - Graphics + Grafika Graphics Device - Graphics Device + Grafikai Eszköz Width - Width + Szélesség Height - Height + Magasság Vblank Divider - Vblank Divider + Vblank Elosztó Advanced - Advanced + Haladó Enable Shaders Dumping - Enable Shaders Dumping + Shader Dumpolás Engedélyezése Enable NULL GPU - Enable NULL GPU + NULL GPU Engedélyezése Enable PM4 Dumping - Enable PM4 Dumping + PM4 Dumpolás Engedélyezése Debug - Debug + Debugolás Enable Debug Dumping - Enable Debug Dumping + Debug Dumpolás Engedélyezése Enable Vulkan Validation Layers - Enable Vulkan Validation Layers + Vulkan Validációs Rétegek Engedélyezése Enable Vulkan Synchronization Validation - Enable Vulkan Synchronization Validation + Vulkan Szinkronizálás Validáció Enable RenderDoc Debugging - Enable RenderDoc Debugging + RenderDoc Debugolás Engedélyezése - \ No newline at end of file + From 3fbb68048e0c28b418fc4a64999cde0c528133fe Mon Sep 17 00:00:00 2001 From: psucien <168137814+psucien@users.noreply.github.com> Date: Wed, 28 Aug 2024 22:27:47 +0200 Subject: [PATCH 67/69] shader_recompiler: frontend: `SOPC` and `SOPK` handling separated; more cmp opcodes (#634) --- .../frontend/translate/scalar_alu.cpp | 238 +++++++++++------- .../frontend/translate/translate.h | 6 +- 2 files changed, 159 insertions(+), 85 deletions(-) diff --git a/src/shader_recompiler/frontend/translate/scalar_alu.cpp b/src/shader_recompiler/frontend/translate/scalar_alu.cpp index 7914726f4..da74f9018 100644 --- a/src/shader_recompiler/frontend/translate/scalar_alu.cpp +++ b/src/shader_recompiler/frontend/translate/scalar_alu.cpp @@ -6,98 +6,150 @@ namespace Shader::Gcn { void Translator::EmitScalarAlu(const GcnInst& inst) { + switch (inst.encoding) { + case InstEncoding::SOPC: { + EmitSOPC(inst); + break; + } + case InstEncoding::SOPK: { + EmitSOPK(inst); + break; + } + default: + switch (inst.opcode) { + case Opcode::S_MOV_B32: + return S_MOV(inst); + case Opcode::S_MUL_I32: + return S_MUL_I32(inst); + case Opcode::S_AND_SAVEEXEC_B64: + return S_AND_SAVEEXEC_B64(inst); + case Opcode::S_MOV_B64: + return S_MOV_B64(inst); + case Opcode::S_OR_B64: + return S_OR_B64(NegateMode::None, false, inst); + case Opcode::S_NOR_B64: + return S_OR_B64(NegateMode::Result, false, inst); + case Opcode::S_XOR_B64: + return S_OR_B64(NegateMode::None, true, inst); + case Opcode::S_ORN2_B64: + return S_OR_B64(NegateMode::Src1, false, inst); + case Opcode::S_AND_B64: + return S_AND_B64(NegateMode::None, inst); + case Opcode::S_NAND_B64: + return S_AND_B64(NegateMode::Result, inst); + case Opcode::S_ANDN2_B64: + return S_AND_B64(NegateMode::Src1, inst); + case Opcode::S_NOT_B64: + return S_NOT_B64(inst); + case Opcode::S_ADD_I32: + return S_ADD_I32(inst); + case Opcode::S_AND_B32: + return S_AND_B32(inst); + case Opcode::S_ASHR_I32: + return S_ASHR_I32(inst); + case Opcode::S_OR_B32: + return S_OR_B32(inst); + case Opcode::S_LSHL_B32: + return S_LSHL_B32(inst); + case Opcode::S_LSHR_B32: + return S_LSHR_B32(inst); + case Opcode::S_CSELECT_B32: + return S_CSELECT_B32(inst); + case Opcode::S_CSELECT_B64: + return S_CSELECT_B64(inst); + case Opcode::S_BFE_U32: + return S_BFE_U32(inst); + case Opcode::S_BFM_B32: + return S_BFM_B32(inst); + case Opcode::S_BREV_B32: + return S_BREV_B32(inst); + case Opcode::S_ADD_U32: + return S_ADD_U32(inst); + case Opcode::S_ADDC_U32: + return S_ADDC_U32(inst); + case Opcode::S_SUB_U32: + case Opcode::S_SUB_I32: + return S_SUB_U32(inst); + case Opcode::S_MIN_U32: + return S_MIN_U32(inst); + case Opcode::S_MAX_U32: + return S_MAX_U32(inst); + case Opcode::S_WQM_B64: + break; + default: + LogMissingOpcode(inst); + } + break; + } +} + +void Translator::EmitSOPC(const GcnInst& inst) { switch (inst.opcode) { - case Opcode::S_MOVK_I32: - return S_MOVK(inst); - case Opcode::S_MOV_B32: - return S_MOV(inst); - case Opcode::S_MUL_I32: - return S_MUL_I32(inst); - case Opcode::S_AND_SAVEEXEC_B64: - return S_AND_SAVEEXEC_B64(inst); - case Opcode::S_MOV_B64: - return S_MOV_B64(inst); - case Opcode::S_CMP_LT_U32: - return S_CMP(ConditionOp::LT, false, inst); - case Opcode::S_CMP_LE_U32: - return S_CMP(ConditionOp::LE, false, inst); - case Opcode::S_CMP_LG_U32: - return S_CMP(ConditionOp::LG, false, inst); - case Opcode::S_CMP_LT_I32: - return S_CMP(ConditionOp::LT, true, inst); + case Opcode::S_CMP_EQ_I32: + return S_CMP(ConditionOp::EQ, true, inst); case Opcode::S_CMP_LG_I32: return S_CMP(ConditionOp::LG, true, inst); case Opcode::S_CMP_GT_I32: return S_CMP(ConditionOp::GT, true, inst); - case Opcode::S_CMP_LE_I32: - return S_CMP(ConditionOp::LE, true, inst); case Opcode::S_CMP_GE_I32: return S_CMP(ConditionOp::GE, true, inst); - case Opcode::S_CMP_EQ_I32: - return S_CMP(ConditionOp::EQ, true, inst); + case Opcode::S_CMP_LT_I32: + return S_CMP(ConditionOp::LT, true, inst); + case Opcode::S_CMP_LE_I32: + return S_CMP(ConditionOp::LE, true, inst); + case Opcode::S_CMP_EQ_U32: return S_CMP(ConditionOp::EQ, false, inst); - case Opcode::S_CMP_GE_U32: - return S_CMP(ConditionOp::GE, false, inst); + case Opcode::S_CMP_LG_U32: + return S_CMP(ConditionOp::LG, false, inst); case Opcode::S_CMP_GT_U32: return S_CMP(ConditionOp::GT, false, inst); - case Opcode::S_OR_B64: - return S_OR_B64(NegateMode::None, false, inst); - case Opcode::S_NOR_B64: - return S_OR_B64(NegateMode::Result, false, inst); - case Opcode::S_XOR_B64: - return S_OR_B64(NegateMode::None, true, inst); - case Opcode::S_ORN2_B64: - return S_OR_B64(NegateMode::Src1, false, inst); - case Opcode::S_AND_B64: - return S_AND_B64(NegateMode::None, inst); - case Opcode::S_NAND_B64: - return S_AND_B64(NegateMode::Result, inst); - case Opcode::S_ANDN2_B64: - return S_AND_B64(NegateMode::Src1, inst); - case Opcode::S_NOT_B64: - return S_NOT_B64(inst); - case Opcode::S_ADD_I32: - return S_ADD_I32(inst); - case Opcode::S_AND_B32: - return S_AND_B32(inst); - case Opcode::S_ASHR_I32: - return S_ASHR_I32(inst); - case Opcode::S_OR_B32: - return S_OR_B32(inst); - case Opcode::S_LSHL_B32: - return S_LSHL_B32(inst); - case Opcode::S_LSHR_B32: - return S_LSHR_B32(inst); - case Opcode::S_CSELECT_B32: - return S_CSELECT_B32(inst); - case Opcode::S_CSELECT_B64: - return S_CSELECT_B64(inst); - case Opcode::S_BFE_U32: - return S_BFE_U32(inst); - case Opcode::S_BFM_B32: - return S_BFM_B32(inst); - case Opcode::S_BREV_B32: - return S_BREV_B32(inst); - case Opcode::S_ADD_U32: - return S_ADD_U32(inst); - case Opcode::S_ADDC_U32: - return S_ADDC_U32(inst); + case Opcode::S_CMP_GE_U32: + return S_CMP(ConditionOp::GE, false, inst); + case Opcode::S_CMP_LT_U32: + return S_CMP(ConditionOp::LT, false, inst); + case Opcode::S_CMP_LE_U32: + return S_CMP(ConditionOp::LE, false, inst); + default: + LogMissingOpcode(inst); + } +} + +void Translator::EmitSOPK(const GcnInst& inst) { + switch (inst.opcode) { + case Opcode::S_MOVK_I32: + return S_MOVK(inst); + + case Opcode::S_CMPK_EQ_I32: + return S_CMPK(ConditionOp::EQ, true, inst); + case Opcode::S_CMPK_LG_I32: + return S_CMPK(ConditionOp::LG, true, inst); + case Opcode::S_CMPK_GT_I32: + return S_CMPK(ConditionOp::GT, true, inst); + case Opcode::S_CMPK_GE_I32: + return S_CMPK(ConditionOp::GE, true, inst); + case Opcode::S_CMPK_LT_I32: + return S_CMPK(ConditionOp::LT, true, inst); + case Opcode::S_CMPK_LE_I32: + return S_CMPK(ConditionOp::LE, true, inst); + + case Opcode::S_CMPK_EQ_U32: + return S_CMPK(ConditionOp::EQ, false, inst); + case Opcode::S_CMPK_LG_U32: + return S_CMPK(ConditionOp::LG, false, inst); + case Opcode::S_CMPK_GT_U32: + return S_CMPK(ConditionOp::GT, false, inst); + case Opcode::S_CMPK_GE_U32: + return S_CMPK(ConditionOp::GE, false, inst); + case Opcode::S_CMPK_LT_U32: + return S_CMPK(ConditionOp::LT, false, inst); + case Opcode::S_CMPK_LE_U32: + return S_CMPK(ConditionOp::LE, false, inst); + case Opcode::S_ADDK_I32: return S_ADDK_I32(inst); case Opcode::S_MULK_I32: return S_MULK_I32(inst); - case Opcode::S_SUB_U32: - case Opcode::S_SUB_I32: - return S_SUB_U32(inst); - case Opcode::S_MIN_U32: - return S_MIN_U32(inst); - case Opcode::S_MAX_U32: - return S_MAX_U32(inst); - case Opcode::S_WQM_B64: - break; - case Opcode::S_CMPK_EQ_U32: - return S_CMPK_EQ_U32(inst); default: LogMissingOpcode(inst); } @@ -154,6 +206,31 @@ void Translator::S_CMP(ConditionOp cond, bool is_signed, const GcnInst& inst) { ir.SetScc(result); } +void Translator::S_CMPK(ConditionOp cond, bool is_signed, const GcnInst& inst) { + const s32 simm16 = inst.control.sopk.simm; + const IR::U32 lhs = GetSrc(inst.dst[0]); + const IR::U32 rhs = ir.Imm32(simm16); + const IR::U1 result = [&] { + switch (cond) { + case ConditionOp::EQ: + return ir.IEqual(lhs, rhs); + case ConditionOp::LG: + return ir.INotEqual(lhs, rhs); + case ConditionOp::GT: + return ir.IGreaterThan(lhs, rhs, is_signed); + case ConditionOp::GE: + return ir.IGreaterThanEqual(lhs, rhs, is_signed); + case ConditionOp::LT: + return ir.ILessThan(lhs, rhs, is_signed); + case ConditionOp::LE: + return ir.ILessThanEqual(lhs, rhs, is_signed); + default: + UNREACHABLE(); + } + }(); + ir.SetScc(result); +} + void Translator::S_AND_SAVEEXEC_B64(const GcnInst& inst) { // This instruction normally operates on 64-bit data (EXEC, VCC, SGPRs) // However here we flatten it to 1-bit EXEC and 1-bit VCC. For the destination @@ -470,11 +547,4 @@ void Translator::S_MIN_U32(const GcnInst& inst) { ir.SetScc(ir.IEqual(result, src0)); } -void Translator::S_CMPK_EQ_U32(const GcnInst& inst) { - const s32 simm16 = inst.control.sopk.simm; - const IR::U32 src0{GetSrc(inst.dst[0])}; - const IR::U32 src1{ir.Imm32(simm16)}; - ir.SetScc(ir.IEqual(src0, src1)); -} - } // namespace Shader::Gcn diff --git a/src/shader_recompiler/frontend/translate/translate.h b/src/shader_recompiler/frontend/translate/translate.h index cde9e58e7..8cbf7357e 100644 --- a/src/shader_recompiler/frontend/translate/translate.h +++ b/src/shader_recompiler/frontend/translate/translate.h @@ -69,6 +69,10 @@ public: void EmitScalarAlu(const GcnInst& inst); void EmitVectorAlu(const GcnInst& inst); + // Instruction encodings + void EmitSOPC(const GcnInst& inst); + void EmitSOPK(const GcnInst& inst); + // Scalar ALU void S_MOVK(const GcnInst& inst); void S_MOV(const GcnInst& inst); @@ -98,7 +102,7 @@ public: void S_ADDK_I32(const GcnInst& inst); void S_MAX_U32(const GcnInst& inst); void S_MIN_U32(const GcnInst& inst); - void S_CMPK_EQ_U32(const GcnInst& inst); + void S_CMPK(ConditionOp cond, bool is_signed, const GcnInst& inst); // Scalar Memory void S_LOAD_DWORD(int num_dwords, const GcnInst& inst); From 614a23b369d127f2891ed0f6f955d1016dfa8906 Mon Sep 17 00:00:00 2001 From: DanielSvoboda Date: Thu, 29 Aug 2024 01:18:50 -0300 Subject: [PATCH 68/69] Cheats/Patches (#493) * Cheats/Patches Adds the possibility of applying cheats/patches according to the specific game serial+version The logic for adding modifications has not yet been implemented! Interface based on issues/372 https://github.com/shadps4-emu/shadPS4/issues/372 [X]Front-end []Back-end Create a synchronized fork of the cheats/patches repository * Clang Format * separate files The code has been separated into separate files as suggested by georgemoralis. Added the Patch tab, which has not been implemented yet. Added the 'applyCheat' area to apply the modification, not implemented yet... And added LOG_INFO. * reuse * initial implementation of cheat functionality * Update cheats_patches.cpp sets all added buttons to the size of the largest button. and fixes some aesthetic issues. * move eboot_address to module.h fixes the non-qt builds and makes more sense to be there anyway * Patchs menu and fixes adds the possibility to download Patches, it does not modify the memory yet. and some other fixes * MemoryPatcher namespace, activate cheats on start * format * initial patch implementation * format * format again... * convertValueToHex * Fixes Choosing which cheat file to use. And some other fixes * fix bytes16, bytes32, bytes64 type patches If a patch is any of these types we convert it from little endian to big endian * format * format again :( * Implement pattern scanning for mask type patches * add check to stop patches applying to wrong game previously if you added a patch to a game, but closed the window and opened a different game it would still try to apply the patch, this is now fixed * format * Fix 'Hint' 0x400000 | and Author * Management |save checkbox | shadps4 repository MENU - Cheats/Patches Management (implementing Patches) save patches checkbox add shadps4 repository * Load saved patches, miscellaneous fixes * Fix an issue with mask patches not being saved * format + remove debug log * multiple patches | TR translation for cheats/patches * clang * ENABLE_QT_GUI * OK * move memory_patcher to qt_gui * clang * add cheats hu_HU * fix log * Remove the item from the patchesListView if no patches were added (the game has patches, but not for the current version) --------- Co-authored-by: CrazyBloo --- CMakeLists.txt | 9 +- src/common/path_util.cpp | 2 + src/common/path_util.h | 4 + src/core/module.cpp | 13 + src/emulator.cpp | 6 + src/qt_gui/cheats_patches.cpp | 1264 +++++++++++++++++++++++++++ src/qt_gui/cheats_patches.h | 115 +++ src/qt_gui/gui_context_menus.h | 22 + src/qt_gui/main_window.cpp | 131 ++- src/qt_gui/main_window_ui.h | 7 +- src/qt_gui/memory_patcher.cpp | 347 ++++++++ src/qt_gui/memory_patcher.h | 47 + src/qt_gui/translations/da_DK.ts | 427 ++++++++- src/qt_gui/translations/de.ts | 427 ++++++++- src/qt_gui/translations/el.ts | 427 ++++++++- src/qt_gui/translations/en.ts | 427 ++++++++- src/qt_gui/translations/es_ES.ts | 429 ++++++++- src/qt_gui/translations/fi.ts | 427 ++++++++- src/qt_gui/translations/fr.ts | 427 ++++++++- src/qt_gui/translations/hu_HU.ts | 401 +++++++++ src/qt_gui/translations/id.ts | 427 ++++++++- src/qt_gui/translations/it.ts | 429 ++++++++- src/qt_gui/translations/ja_JP.ts | 429 ++++++++- src/qt_gui/translations/ko_KR.ts | 427 ++++++++- src/qt_gui/translations/lt_LT.ts | 429 ++++++++- src/qt_gui/translations/nb.ts | 427 ++++++++- src/qt_gui/translations/nl.ts | 427 ++++++++- src/qt_gui/translations/pl_PL.ts | 1385 +++++++++++++++++++----------- src/qt_gui/translations/pt_BR.ts | 427 ++++++++- src/qt_gui/translations/ro_RO.ts | 427 ++++++++- src/qt_gui/translations/ru_RU.ts | 429 ++++++++- src/qt_gui/translations/tr_TR.ts | 498 ++++++++++- src/qt_gui/translations/vi_VN.ts | 427 ++++++++- src/qt_gui/translations/zh_CN.ts | 427 ++++++++- src/qt_gui/translations/zh_TW.ts | 427 ++++++++- 35 files changed, 12003 insertions(+), 798 deletions(-) create mode 100644 src/qt_gui/cheats_patches.cpp create mode 100644 src/qt_gui/cheats_patches.h create mode 100644 src/qt_gui/memory_patcher.cpp create mode 100644 src/qt_gui/memory_patcher.h diff --git a/CMakeLists.txt b/CMakeLists.txt index 04740784b..dfc6528df 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -109,7 +109,7 @@ add_subdirectory(externals) include_directories(src) if(ENABLE_QT_GUI) - find_package(Qt6 REQUIRED COMPONENTS Widgets Concurrent LinguistTools) + find_package(Qt6 REQUIRED COMPONENTS Widgets Concurrent LinguistTools Network) qt_standard_project_setup() set(CMAKE_AUTORCC ON) set(CMAKE_AUTOMOC ON) @@ -563,6 +563,10 @@ qt_add_resources(RESOURCE_FILES src/shadps4.qrc) set(QT_GUI src/qt_gui/about_dialog.cpp src/qt_gui/about_dialog.h src/qt_gui/about_dialog.ui + src/qt_gui/cheats_patches.cpp + src/qt_gui/cheats_patches.h + src/qt_gui/memory_patcher.cpp + src/qt_gui/memory_patcher.h src/qt_gui/main_window_ui.h src/qt_gui/main_window.cpp src/qt_gui/main_window.h @@ -651,7 +655,8 @@ else() endif() if (ENABLE_QT_GUI) - target_link_libraries(shadps4 PRIVATE Qt6::Widgets Qt6::Concurrent) + target_link_libraries(shadps4 PRIVATE Qt6::Widgets Qt6::Concurrent Qt6::Network) + add_definitions(-DENABLE_QT_GUI) endif() if (WIN32) diff --git a/src/common/path_util.cpp b/src/common/path_util.cpp index d69f72163..5d5c9ebad 100644 --- a/src/common/path_util.cpp +++ b/src/common/path_util.cpp @@ -104,6 +104,8 @@ static auto UserPaths = [] { create_path(PathType::SysModuleDir, user_dir / SYSMODULES_DIR); create_path(PathType::DownloadDir, user_dir / DOWNLOAD_DIR); create_path(PathType::CapturesDir, user_dir / CAPTURES_DIR); + create_path(PathType::CheatsDir, user_dir / CHEATS_DIR); + create_path(PathType::PatchesDir, user_dir / PATCHES_DIR); return paths; }(); diff --git a/src/common/path_util.h b/src/common/path_util.h index 263edd46e..8922de9f1 100644 --- a/src/common/path_util.h +++ b/src/common/path_util.h @@ -20,6 +20,8 @@ enum class PathType { SysModuleDir, // Where system modules are stored. DownloadDir, // Where downloads/temp files are stored. CapturesDir, // Where rdoc captures are stored. + CheatsDir, // Where cheats are stored. + PatchesDir, // Where patches are stored. }; constexpr auto PORTABLE_DIR = "user"; @@ -35,6 +37,8 @@ constexpr auto TEMPDATA_DIR = "temp"; constexpr auto SYSMODULES_DIR = "sys_modules"; constexpr auto DOWNLOAD_DIR = "download"; constexpr auto CAPTURES_DIR = "captures"; +constexpr auto CHEATS_DIR = "cheats"; +constexpr auto PATCHES_DIR = "patches"; // Filenames constexpr auto LOG_FILE = "shad_log.txt"; diff --git a/src/core/module.cpp b/src/core/module.cpp index 775e1ef19..f48848bbd 100644 --- a/src/core/module.cpp +++ b/src/core/module.cpp @@ -5,6 +5,9 @@ #include "common/alignment.h" #include "common/assert.h" #include "common/logging/log.h" +#ifdef ENABLE_QT_GUI +#include "qt_gui/memory_patcher.h" +#endif #include "common/string_util.h" #include "core/aerolib/aerolib.h" #include "core/cpu_patches.h" @@ -192,6 +195,16 @@ void Module::LoadModuleToMemory(u32& max_tls_index) { const VAddr entry_addr = base_virtual_addr + elf.GetElfEntry(); LOG_INFO(Core_Linker, "program entry addr ..........: {:#018x}", entry_addr); + +#ifdef ENABLE_QT_GUI + if (MemoryPatcher::g_eboot_address == 0) { + if (name == "eboot") { + MemoryPatcher::g_eboot_address = base_virtual_addr; + MemoryPatcher::g_eboot_image_size = base_size; + MemoryPatcher::OnGameLoaded(); + } + } +#endif } void Module::LoadDynamicInfo() { diff --git a/src/emulator.cpp b/src/emulator.cpp index 836b989e5..b12bb8591 100644 --- a/src/emulator.cpp +++ b/src/emulator.cpp @@ -7,6 +7,9 @@ #include "common/debug.h" #include "common/logging/backend.h" #include "common/logging/log.h" +#ifdef ENABLE_QT_GUI +#include "qt_gui/memory_patcher.h" +#endif #include "common/ntapi.h" #include "common/path_util.h" #include "common/polyfill_thread.h" @@ -93,6 +96,9 @@ void Emulator::Run(const std::filesystem::path& file) { auto* param_sfo = Common::Singleton::Instance(); param_sfo->open(sce_sys_folder.string() + "/param.sfo", {}); id = std::string(param_sfo->GetString("CONTENT_ID"), 7, 9); +#ifdef ENABLE_QT_GUI + MemoryPatcher::g_game_serial = id; +#endif title = param_sfo->GetString("TITLE"); LOG_INFO(Loader, "Game id: {} Title: {}", id, title); u32 fw_version = param_sfo->GetInteger("SYSTEM_VER"); diff --git a/src/qt_gui/cheats_patches.cpp b/src/qt_gui/cheats_patches.cpp new file mode 100644 index 000000000..662d52cc1 --- /dev/null +++ b/src/qt_gui/cheats_patches.cpp @@ -0,0 +1,1264 @@ +// SPDX-FileCopyrightText: Copyright 2024 shadPS4 Emulator Project +// SPDX-License-Identifier: GPL-2.0-or-later + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "cheats_patches.h" +#include "common/path_util.h" +#include "core/module.h" +#include "qt_gui/memory_patcher.h" + +using namespace Common::FS; + +CheatsPatches::CheatsPatches(const QString& gameName, const QString& gameSerial, + const QString& gameVersion, const QString& gameSize, + const QPixmap& gameImage, QWidget* parent) + : QWidget(parent), m_gameName(gameName), m_gameSerial(gameSerial), m_gameVersion(gameVersion), + m_gameSize(gameSize), m_gameImage(gameImage), manager(new QNetworkAccessManager(this)) { + setupUI(); + resize(500, 400); + setWindowTitle(tr("Cheats / Patches")); +} + +CheatsPatches::~CheatsPatches() {} + +void CheatsPatches::setupUI() { + defaultTextEdit = tr("defaultTextEdit_MSG"); + defaultTextEdit.replace("\\n", "\n"); + + QString CHEATS_DIR_QString = + QString::fromStdString(Common::FS::GetUserPath(Common::FS::PathType::CheatsDir).string()); + QString NameCheatJson = m_gameSerial + "_" + m_gameVersion + ".json"; + m_cheatFilePath = CHEATS_DIR_QString + "/" + NameCheatJson; + + QHBoxLayout* mainLayout = new QHBoxLayout(this); + + // Create the game info group box + QGroupBox* gameInfoGroupBox = new QGroupBox(); + QVBoxLayout* gameInfoLayout = new QVBoxLayout(gameInfoGroupBox); + gameInfoLayout->setAlignment(Qt::AlignTop); + + QLabel* gameImageLabel = new QLabel(); + if (!m_gameImage.isNull()) { + gameImageLabel->setPixmap(m_gameImage.scaled(275, 275, Qt::KeepAspectRatio)); + } else { + gameImageLabel->setText(tr("No Image Available")); + } + gameImageLabel->setAlignment(Qt::AlignCenter); + gameInfoLayout->addWidget(gameImageLabel, 0, Qt::AlignCenter); + + QLabel* gameNameLabel = new QLabel(m_gameName); + gameNameLabel->setAlignment(Qt::AlignLeft); + gameNameLabel->setWordWrap(true); + gameInfoLayout->addWidget(gameNameLabel); + + QLabel* gameSerialLabel = new QLabel(tr("Serial: ") + m_gameSerial); + gameSerialLabel->setAlignment(Qt::AlignLeft); + gameInfoLayout->addWidget(gameSerialLabel); + + QLabel* gameVersionLabel = new QLabel(tr("Version: ") + m_gameVersion); + gameVersionLabel->setAlignment(Qt::AlignLeft); + gameInfoLayout->addWidget(gameVersionLabel); + + QLabel* gameSizeLabel = new QLabel(tr("Size: ") + m_gameSize); + gameSizeLabel->setAlignment(Qt::AlignLeft); + gameInfoLayout->addWidget(gameSizeLabel); + + // Add a text area for instructions and 'Patch' descriptions + instructionsTextEdit = new QTextEdit(); + instructionsTextEdit->setText(defaultTextEdit); + instructionsTextEdit->setReadOnly(true); + instructionsTextEdit->setFixedHeight(290); + gameInfoLayout->addWidget(instructionsTextEdit); + + // Create the tab widget + QTabWidget* tabWidget = new QTabWidget(); + QWidget* cheatsTab = new QWidget(); + QWidget* patchesTab = new QWidget(); + + // Layouts for the tabs + QVBoxLayout* cheatsLayout = new QVBoxLayout(); + QVBoxLayout* patchesLayout = new QVBoxLayout(); + + // Setup the cheats tab + QGroupBox* cheatsGroupBox = new QGroupBox(); + rightLayout = new QVBoxLayout(cheatsGroupBox); + rightLayout->setAlignment(Qt::AlignTop); + + cheatsGroupBox->setLayout(rightLayout); + QScrollArea* scrollArea = new QScrollArea(); + scrollArea->setWidgetResizable(true); + scrollArea->setWidget(cheatsGroupBox); + scrollArea->setMinimumHeight(490); + cheatsLayout->addWidget(scrollArea); + + // QListView + listView_selectFile = new QListView(); + listView_selectFile->setSelectionMode(QAbstractItemView::SingleSelection); + listView_selectFile->setEditTriggers(QAbstractItemView::NoEditTriggers); + + // Add QListView to layout + QVBoxLayout* fileListLayout = new QVBoxLayout(); + fileListLayout->addWidget(new QLabel(tr("Select Cheat File:"))); + fileListLayout->addWidget(listView_selectFile); + cheatsLayout->addLayout(fileListLayout, 2); + + // Call the method to fill the list of cheat files + populateFileListCheats(); + + QLabel* repositoryLabel = new QLabel("Repository:"); + repositoryLabel->setAlignment(Qt::AlignLeft); + repositoryLabel->setAlignment(Qt::AlignVCenter); + + // Add a combo box and a download button + QHBoxLayout* controlLayout = new QHBoxLayout(); + controlLayout->addWidget(repositoryLabel); + controlLayout->setAlignment(Qt::AlignLeft); + QComboBox* downloadComboBox = new QComboBox(); + + downloadComboBox->addItem("wolf2022", "wolf2022"); + downloadComboBox->addItem("GoldHEN", "GoldHEN"); + downloadComboBox->addItem("shadPS4", "shadPS4"); + + controlLayout->addWidget(downloadComboBox); + + QPushButton* downloadButton = new QPushButton(tr("Download Cheats")); + connect(downloadButton, &QPushButton::clicked, [=]() { + QString source = downloadComboBox->currentData().toString(); + downloadCheats(source, m_gameSerial, m_gameVersion, true); + }); + + QPushButton* deleteCheatButton = new QPushButton(tr("Delete File")); + connect(deleteCheatButton, &QPushButton::clicked, [=]() { + QStringListModel* model = qobject_cast(listView_selectFile->model()); + if (!model) { + return; + } + QItemSelectionModel* selectionModel = listView_selectFile->selectionModel(); + if (!selectionModel) { + return; + } + QModelIndexList selectedIndexes = selectionModel->selectedIndexes(); + if (selectedIndexes.isEmpty()) { + QMessageBox::warning( + this, tr("Delete File"), + tr("No files selected.") + "\n" + + tr("You can delete the cheats you don't want after downloading them.")); + return; + } + QModelIndex selectedIndex = selectedIndexes.first(); + QString selectedFileName = model->data(selectedIndex).toString(); + + int ret = QMessageBox::warning( + this, tr("Delete File"), + QString(tr("Do you want to delete the selected file?\n%1")).arg(selectedFileName), + QMessageBox::Yes | QMessageBox::No); + + if (ret == QMessageBox::Yes) { + QString filePath = CHEATS_DIR_QString + "/" + selectedFileName; + QFile::remove(filePath); + populateFileListCheats(); + } + }); + + controlLayout->addWidget(downloadButton); + controlLayout->addWidget(deleteCheatButton); + + cheatsLayout->addLayout(controlLayout); + cheatsTab->setLayout(cheatsLayout); + + // Setup the patches tab + QGroupBox* patchesGroupBox = new QGroupBox(); + patchesGroupBoxLayout = new QVBoxLayout(patchesGroupBox); + patchesGroupBoxLayout->setAlignment(Qt::AlignTop); + patchesGroupBox->setLayout(patchesGroupBoxLayout); + + QScrollArea* patchesScrollArea = new QScrollArea(); + patchesScrollArea->setWidgetResizable(true); + patchesScrollArea->setWidget(patchesGroupBox); + patchesScrollArea->setMinimumHeight(490); + patchesLayout->addWidget(patchesScrollArea); + + // List of files in patchesListView + patchesListView = new QListView(); + patchesListView->setSelectionMode(QAbstractItemView::SingleSelection); + patchesListView->setEditTriggers(QAbstractItemView::NoEditTriggers); + + // Add new label "Select Patch File:" above the QListView + QVBoxLayout* patchFileListLayout = new QVBoxLayout(); + patchFileListLayout->addWidget(new QLabel(tr("Select Patch File:"))); + patchFileListLayout->addWidget(patchesListView); + patchesLayout->addLayout(patchFileListLayout, 2); + + QStringListModel* patchesModel = new QStringListModel(); + patchesListView->setModel(patchesModel); + + QHBoxLayout* patchesControlLayout = new QHBoxLayout(); + + QLabel* patchesRepositoryLabel = new QLabel(tr("Repository:")); + patchesRepositoryLabel->setAlignment(Qt::AlignLeft); + patchesRepositoryLabel->setAlignment(Qt::AlignVCenter); + patchesControlLayout->addWidget(patchesRepositoryLabel); + + // Add the combo box with options + patchesComboBox = new QComboBox(); + patchesComboBox->addItem("GoldHEN", "GoldHEN"); + patchesComboBox->addItem("shadPS4", "shadPS4"); + patchesControlLayout->addWidget(patchesComboBox); + + QPushButton* patchesButton = new QPushButton(tr("Download Patches")); + connect(patchesButton, &QPushButton::clicked, [=]() { + QString selectedOption = patchesComboBox->currentData().toString(); + downloadPatches(selectedOption, true); + }); + patchesControlLayout->addWidget(patchesButton); + + QPushButton* saveButton = new QPushButton(tr("Save")); + connect(saveButton, &QPushButton::clicked, this, &CheatsPatches::onSaveButtonClicked); + + patchesControlLayout->addWidget(saveButton); + + patchesLayout->addLayout(patchesControlLayout); + patchesTab->setLayout(patchesLayout); + + tabWidget->addTab(cheatsTab, tr("Cheats")); + tabWidget->addTab(patchesTab, tr("Patches")); + + connect(tabWidget, &QTabWidget::currentChanged, this, [this](int index) { + if (index == 1) { + populateFileListPatches(); + } + }); + + mainLayout->addWidget(gameInfoGroupBox, 1); + mainLayout->addWidget(tabWidget, 3); + + manager = new QNetworkAccessManager(this); + + setLayout(mainLayout); +} + +void CheatsPatches::onSaveButtonClicked() { + // Get the name of the selected folder in the patchesListView + QString selectedPatchName; + QModelIndexList selectedIndexes = patchesListView->selectionModel()->selectedIndexes(); + if (selectedIndexes.isEmpty()) { + QMessageBox::warning(this, tr("Error"), tr("No patch selected.")); + return; + } + selectedPatchName = patchesListView->model()->data(selectedIndexes.first()).toString(); + int separatorIndex = selectedPatchName.indexOf(" | "); + selectedPatchName = selectedPatchName.mid(separatorIndex + 3); + + QString patchDir = + QString::fromStdString(Common::FS::GetUserPath(Common::FS::PathType::PatchesDir).string()) + + "/" + selectedPatchName; + + QString filesJsonPath = patchDir + "/files.json"; + QFile jsonFile(filesJsonPath); + if (!jsonFile.open(QIODevice::ReadOnly)) { + QMessageBox::critical(this, tr("Error"), tr("Unable to open files.json for reading.")); + return; + } + + QByteArray jsonData = jsonFile.readAll(); + jsonFile.close(); + + QJsonDocument jsonDoc = QJsonDocument::fromJson(jsonData); + QJsonObject jsonObject = jsonDoc.object(); + + QString selectedFileName; + QString serial = m_gameSerial; + + for (auto it = jsonObject.constBegin(); it != jsonObject.constEnd(); ++it) { + QString filePath = it.key(); + QJsonArray idsArray = it.value().toArray(); + + if (idsArray.contains(QJsonValue(serial))) { + selectedFileName = filePath; + break; + } + } + + if (selectedFileName.isEmpty()) { + QMessageBox::critical(this, tr("Error"), tr("No patch file found for the current serial.")); + return; + } + + QString filePath = patchDir + "/" + selectedFileName; + QFile file(filePath); + if (!file.open(QIODevice::ReadOnly | QIODevice::Text)) { + QMessageBox::critical(this, tr("Error"), tr("Unable to open the file for reading.")); + return; + } + + QByteArray xmlData = file.readAll(); + file.close(); + + QString newXmlData; + QXmlStreamWriter xmlWriter(&newXmlData); + xmlWriter.setAutoFormatting(true); + xmlWriter.writeStartDocument(); + + QXmlStreamReader xmlReader(xmlData); + bool insideMetadata = false; + + while (!xmlReader.atEnd()) { + xmlReader.readNext(); + + if (xmlReader.isStartElement()) { + if (xmlReader.name() == QStringLiteral("Metadata")) { + insideMetadata = true; + xmlWriter.writeStartElement(xmlReader.name().toString()); + + QString name = xmlReader.attributes().value("Name").toString(); + bool isEnabled = false; + bool hasIsEnabled = false; + bool foundPatchInfo = false; + + // Check and update the isEnabled attribute + for (const QXmlStreamAttribute& attr : xmlReader.attributes()) { + if (attr.name() == QStringLiteral("isEnabled")) { + hasIsEnabled = true; + auto it = m_patchInfos.find(name); + if (it != m_patchInfos.end()) { + QCheckBox* checkBox = findCheckBoxByName(it->name); + if (checkBox) { + foundPatchInfo = true; + isEnabled = checkBox->isChecked(); + xmlWriter.writeAttribute("isEnabled", isEnabled ? "true" : "false"); + } + } + if (!foundPatchInfo) { + auto maskIt = m_patchInfos.find(name + " (any version)"); + if (maskIt != m_patchInfos.end()) { + QCheckBox* checkBox = findCheckBoxByName(maskIt->name); + if (checkBox) { + foundPatchInfo = true; + isEnabled = checkBox->isChecked(); + xmlWriter.writeAttribute("isEnabled", + isEnabled ? "true" : "false"); + } + } + } + + } else { + xmlWriter.writeAttribute(attr.name().toString(), attr.value().toString()); + } + } + + if (!hasIsEnabled) { + auto it = m_patchInfos.find(name); + if (it != m_patchInfos.end()) { + QCheckBox* checkBox = findCheckBoxByName(it->name); + if (checkBox) { + foundPatchInfo = true; + isEnabled = checkBox->isChecked(); + } + } + if (!foundPatchInfo) { + auto maskIt = m_patchInfos.find(name + " (any version)"); + if (maskIt != m_patchInfos.end()) { + QCheckBox* checkBox = findCheckBoxByName(maskIt->name); + if (checkBox) { + foundPatchInfo = true; + isEnabled = checkBox->isChecked(); + } + } + } + xmlWriter.writeAttribute("isEnabled", isEnabled ? "true" : "false"); + } + } else { + xmlWriter.writeStartElement(xmlReader.name().toString()); + for (const QXmlStreamAttribute& attr : xmlReader.attributes()) { + xmlWriter.writeAttribute(attr.name().toString(), attr.value().toString()); + } + } + } else if (xmlReader.isEndElement()) { + if (xmlReader.name() == QStringLiteral("Metadata")) { + insideMetadata = false; + } + xmlWriter.writeEndElement(); + } else if (xmlReader.isCharacters() && !xmlReader.isWhitespace()) { + xmlWriter.writeCharacters(xmlReader.text().toString()); + } + } + + xmlWriter.writeEndDocument(); + + if (!file.open(QIODevice::WriteOnly | QIODevice::Text)) { + QMessageBox::critical(this, tr("Error"), tr("Unable to open the file for writing.")); + return; + } + + QTextStream textStream(&file); + textStream << newXmlData; + file.close(); + + if (xmlReader.hasError()) { + QMessageBox::critical(this, tr("Error"), + tr("Failed to parse XML: ") + "\n" + xmlReader.errorString()); + } else { + QMessageBox::information(this, tr("Success"), tr("Options saved successfully.")); + } +} + +QCheckBox* CheatsPatches::findCheckBoxByName(const QString& name) { + for (int i = 0; i < patchesGroupBoxLayout->count(); ++i) { + QLayoutItem* item = patchesGroupBoxLayout->itemAt(i); + if (item) { + QWidget* widget = item->widget(); + QCheckBox* checkBox = qobject_cast(widget); + if (checkBox) { + if (checkBox->text().toStdString().find(name.toStdString()) != std::string::npos) { + return checkBox; + } + } + } + } + return nullptr; +} + +void CheatsPatches::downloadCheats(const QString& source, const QString& m_gameSerial, + const QString& m_gameVersion, const bool showMessageBox) { + QDir dir(Common::FS::GetUserPath(Common::FS::PathType::CheatsDir)); + if (!dir.exists()) { + dir.mkpath("."); + } + + QString url; + if (source == "GoldHEN") { + url = "https://raw.githubusercontent.com/GoldHEN/GoldHEN_Cheat_Repository/main/json.txt"; + } else if (source == "wolf2022") { + url = "https://wolf2022.ir/trainer/" + m_gameSerial + "_" + m_gameVersion + ".json"; + } else if (source == "shadPS4") { + url = "https://raw.githubusercontent.com/shadps4-emu/ps4_cheats/main/" + "CHEATS_JSON.txt"; + } else { + QMessageBox::warning(this, tr("Invalid Source"), + QString(tr("The selected source is invalid.") + "\n%1").arg(source)); + return; + } + + QNetworkRequest request(url); + QNetworkReply* reply = manager->get(request); + + connect(reply, &QNetworkReply::finished, [=]() { + if (reply->error() == QNetworkReply::NoError) { + QByteArray jsonData = reply->readAll(); + bool foundFiles = false; + + if (source == "GoldHEN" || source == "shadPS4") { + QString textContent(jsonData); + QRegularExpression regex( + QString("%1_%2[^=]*\.json").arg(m_gameSerial).arg(m_gameVersion)); + QRegularExpressionMatchIterator matches = regex.globalMatch(textContent); + QString baseUrl; + + if (source == "GoldHEN") { + baseUrl = "https://raw.githubusercontent.com/GoldHEN/GoldHEN_Cheat_Repository/" + "main/json/"; + } else { + baseUrl = "https://raw.githubusercontent.com/shadps4-emu/ps4_cheats/" + "main/CHEATS/"; + } + + while (matches.hasNext()) { + QRegularExpressionMatch match = matches.next(); + QString fileName = match.captured(0); + + if (!fileName.isEmpty()) { + QString newFileName = fileName; + int dotIndex = newFileName.lastIndexOf('.'); + if (dotIndex != -1) { + + if (source == "GoldHEN") { + newFileName.insert(dotIndex, "_GoldHEN"); + } else { + newFileName.insert(dotIndex, "_shadPS4"); + } + } + QString fileUrl = baseUrl + fileName; + QString localFilePath = dir.filePath(newFileName); + + if (QFile::exists(localFilePath) && showMessageBox) { + QMessageBox::StandardButton reply; + reply = QMessageBox::question( + this, tr("File Exists"), + tr("File already exists. Do you want to replace it?"), + QMessageBox::Yes | QMessageBox::No); + if (reply == QMessageBox::No) { + continue; + } + } + QNetworkRequest fileRequest(fileUrl); + QNetworkReply* fileReply = manager->get(fileRequest); + + connect(fileReply, &QNetworkReply::finished, [=]() { + if (fileReply->error() == QNetworkReply::NoError) { + QByteArray fileData = fileReply->readAll(); + QFile localFile(localFilePath); + if (localFile.open(QIODevice::WriteOnly)) { + localFile.write(fileData); + localFile.close(); + } else { + QMessageBox::warning( + this, tr("Error"), + QString(tr("Failed to save file:") + "\n%1") + .arg(localFilePath)); + } + } else { + QMessageBox::warning(this, tr("Error"), + QString(tr("Failed to download file:") + + "%1\n\n" + tr("Error:") + "%2") + .arg(fileUrl) + .arg(fileReply->errorString())); + } + fileReply->deleteLater(); + }); + + foundFiles = true; + } + } + if (!foundFiles && showMessageBox) { + QMessageBox::warning(this, tr("Cheats Not Found"), tr("CheatsNotFound_MSG")); + } + } else if (source == "wolf2022") { + QString fileName = QFileInfo(QUrl(url).path()).fileName(); + QString baseFileName = fileName; + int dotIndex = baseFileName.lastIndexOf('.'); + if (dotIndex != -1) { + baseFileName.insert(dotIndex, "_wolf2022"); + } + QString filePath = + QString::fromStdString( + Common::FS::GetUserPath(Common::FS::PathType::CheatsDir).string()) + + "/" + baseFileName; + if (QFile::exists(filePath) && showMessageBox) { + QMessageBox::StandardButton reply2; + reply2 = + QMessageBox::question(this, tr("File Exists"), + tr("File already exists. Do you want to replace it?"), + QMessageBox::Yes | QMessageBox::No); + if (reply2 == QMessageBox::No) { + reply->deleteLater(); + return; + } + } + QFile cheatFile(filePath); + if (cheatFile.open(QIODevice::WriteOnly)) { + cheatFile.write(jsonData); + cheatFile.close(); + foundFiles = true; + populateFileListCheats(); + } else { + QMessageBox::warning( + this, tr("Error"), + QString(tr("Failed to save file:") + "\n%1").arg(filePath)); + } + } + if (foundFiles && showMessageBox) { + QMessageBox::information(this, tr("Cheats Downloaded Successfully"), + tr("CheatsDownloadedSuccessfully_MSG")); + populateFileListCheats(); + } + + } else { + if (showMessageBox) { + QMessageBox::warning(this, tr("Cheats Not Found"), tr("CheatsNotFound_MSG")); + } + } + reply->deleteLater(); + emit downloadFinished(); + }); + + // connect(reply, &QNetworkReply::errorOccurred, [=](QNetworkReply::NetworkError code) { + // if (showMessageBox) + // QMessageBox::warning(this, "Download Error", + // QString("Error in response: %1").arg(reply->errorString())); + // }); +} + +void CheatsPatches::populateFileListPatches() { + QLayoutItem* item; + while ((item = patchesGroupBoxLayout->takeAt(0)) != nullptr) { + delete item->widget(); + delete item; + } + m_patchInfos.clear(); + + QString patchesDir = + QString::fromStdString(Common::FS::GetUserPath(Common::FS::PathType::PatchesDir).string()); + QDir dir(patchesDir); + + QStringList folders = dir.entryList(QDir::Dirs | QDir::NoDotAndDotDot); + QStringList matchingFiles; + + foreach (const QString& folder, folders) { + QString folderPath = dir.filePath(folder); + QDir subDir(folderPath); + + QString filesJsonPath = subDir.filePath("files.json"); + QFile file(filesJsonPath); + + if (file.open(QIODevice::ReadOnly)) { + QByteArray fileData = file.readAll(); + file.close(); + + QJsonDocument jsonDoc(QJsonDocument::fromJson(fileData)); + QJsonObject jsonObj = jsonDoc.object(); + + for (auto it = jsonObj.constBegin(); it != jsonObj.constEnd(); ++it) { + QString fileName = it.key(); + QJsonArray serials = it.value().toArray(); + + if (serials.contains(QJsonValue(m_gameSerial))) { + QString fileEntry = fileName + " | " + folder; + if (!matchingFiles.contains(fileEntry)) { + matchingFiles << fileEntry; + } + } + } + } + } + QStringListModel* model = new QStringListModel(matchingFiles, this); + patchesListView->setModel(model); + + connect( + patchesListView->selectionModel(), &QItemSelectionModel::selectionChanged, this, [this]() { + QModelIndexList selectedIndexes = patchesListView->selectionModel()->selectedIndexes(); + if (!selectedIndexes.isEmpty()) { + QString selectedText = selectedIndexes.first().data().toString(); + addPatchesToLayout(selectedText); + } + }); + + if (!matchingFiles.isEmpty()) { + QModelIndex firstIndex = model->index(0, 0); + patchesListView->selectionModel()->select(firstIndex, QItemSelectionModel::Select | + QItemSelectionModel::Rows); + patchesListView->setCurrentIndex(firstIndex); + } +} + +void CheatsPatches::downloadPatches(const QString repository, const bool showMessageBox) { + QString url; + if (repository == "GoldHEN") { + url = "https://github.com/GoldHEN/GoldHEN_Patch_Repository/tree/main/" + "patches/xml"; + } + if (repository == "shadPS4") { + url = "https://github.com/shadps4-emu/ps4_cheats/tree/main/" + "PATCHES"; + } + QNetworkAccessManager* manager = new QNetworkAccessManager(this); + QNetworkRequest request(url); + QNetworkReply* reply = manager->get(request); + + connect(reply, &QNetworkReply::finished, [=]() { + if (reply->error() == QNetworkReply::NoError) { + QByteArray htmlData = reply->readAll(); + reply->deleteLater(); + + // Parsear HTML e extrair JSON usando QRegularExpression + QString htmlString = QString::fromUtf8(htmlData); + QRegularExpression jsonRegex( + R"()"); + QRegularExpressionMatch match = jsonRegex.match(htmlString); + + if (match.hasMatch()) { + QByteArray jsonData = match.captured(1).toUtf8(); + QJsonDocument jsonDoc = QJsonDocument::fromJson(jsonData); + QJsonObject jsonObj = jsonDoc.object(); + QJsonArray itemsArray = + jsonObj["payload"].toObject()["tree"].toObject()["items"].toArray(); + + QDir dir(Common::FS::GetUserPath(Common::FS::PathType::PatchesDir)); + QString fullPath = dir.filePath(repository); + if (!dir.exists(fullPath)) { + dir.mkpath(fullPath); + } + dir.setPath(fullPath); + + foreach (const QJsonValue& value, itemsArray) { + QJsonObject fileObj = value.toObject(); + QString fileName = fileObj["name"].toString(); + QString filePath = fileObj["path"].toString(); + + if (fileName.endsWith(".xml")) { + QString fileUrl; + if (repository == "GoldHEN") { + fileUrl = QString("https://raw.githubusercontent.com/GoldHEN/" + "GoldHEN_Patch_Repository/main/%1") + .arg(filePath); + } + if (repository == "shadPS4") { + fileUrl = QString("https://raw.githubusercontent.com/shadps4-emu/" + "ps4_cheats/main/%1") + .arg(filePath); + } + QNetworkRequest fileRequest(fileUrl); + QNetworkReply* fileReply = manager->get(fileRequest); + + connect(fileReply, &QNetworkReply::finished, [=]() { + if (fileReply->error() == QNetworkReply::NoError) { + QByteArray fileData = fileReply->readAll(); + QFile localFile(dir.filePath(fileName)); + if (localFile.open(QIODevice::WriteOnly)) { + localFile.write(fileData); + localFile.close(); + } else { + if (showMessageBox) { + QMessageBox::warning( + this, tr("Error"), + QString(tr("Failed to save:") + "\n%1").arg(fileName)); + } + } + } else { + if (showMessageBox) { + QMessageBox::warning( + this, tr("Error"), + QString(tr("Failed to download:") + "\n%1").arg(fileUrl)); + } + } + fileReply->deleteLater(); + }); + } + } + if (showMessageBox) { + QMessageBox::information(this, tr("Download Complete"), + QString(tr("DownloadComplete_MSG"))); + } + + // Create the files.json file with the identification of which file to open + createFilesJson(repository); + populateFileListPatches(); + + } else { + if (showMessageBox) { + QMessageBox::warning(this, tr("Error"), + tr("Failed to parse JSON data from HTML.")); + } + } + } else { + if (showMessageBox) { + QMessageBox::warning(this, tr("Error"), tr("Failed to retrieve HTML page.")); + } + } + emit downloadFinished(); + }); +} + +void CheatsPatches::createFilesJson(const QString& repository) { + + QDir dir(Common::FS::GetUserPath(Common::FS::PathType::PatchesDir)); + QString fullPath = dir.filePath(repository); + if (!dir.exists(fullPath)) { + dir.mkpath(fullPath); + } + dir.setPath(fullPath); + + QJsonObject filesObject; + QStringList xmlFiles = dir.entryList(QStringList() << "*.xml", QDir::Files); + + foreach (const QString& xmlFile, xmlFiles) { + QFile file(dir.filePath(xmlFile)); + if (!file.open(QIODevice::ReadOnly | QIODevice::Text)) { + QMessageBox::warning(this, tr("ERROR"), + QString(tr("Failed to open file:") + "\n%1").arg(xmlFile)); + continue; + } + + QXmlStreamReader xmlReader(&file); + QJsonArray titleIdsArray; + + while (!xmlReader.atEnd() && !xmlReader.hasError()) { + QXmlStreamReader::TokenType token = xmlReader.readNext(); + if (token == QXmlStreamReader::StartElement) { + if (xmlReader.name() == QStringLiteral("ID")) { + titleIdsArray.append(xmlReader.readElementText()); + } + } + } + + if (xmlReader.hasError()) { + QMessageBox::warning(this, tr("ERROR"), + QString(tr("XML ERROR:") + "\n%1").arg(xmlReader.errorString())); + } + filesObject[xmlFile] = titleIdsArray; + } + + QFile jsonFile(dir.absolutePath() + "/files.json"); + if (!jsonFile.open(QIODevice::WriteOnly)) { + QMessageBox::warning(this, tr("ERROR"), tr("Failed to open files.json for writing")); + return; + } + + QJsonDocument jsonDoc(filesObject); + jsonFile.write(jsonDoc.toJson()); + jsonFile.close(); +} + +void CheatsPatches::addCheatsToLayout(const QJsonArray& modsArray, const QJsonArray& creditsArray) { + QLayoutItem* item; + while ((item = rightLayout->takeAt(0)) != nullptr) { + delete item->widget(); + delete item; + } + m_cheats.clear(); + m_cheatCheckBoxes.clear(); + + int maxWidthButton = 0; + + for (const QJsonValue& modValue : modsArray) { + QJsonObject modObject = modValue.toObject(); + QString modName = modObject["name"].toString(); + QString modType = modObject["type"].toString(); + + Cheat cheat; + cheat.name = modName; + cheat.type = modType; + + QJsonArray memoryArray = modObject["memory"].toArray(); + for (const QJsonValue& memoryValue : memoryArray) { + QJsonObject memoryObject = memoryValue.toObject(); + MemoryMod memoryMod; + memoryMod.offset = memoryObject["offset"].toString(); + memoryMod.on = memoryObject["on"].toString(); + memoryMod.off = memoryObject["off"].toString(); + cheat.memoryMods.append(memoryMod); + } + + // Check for the presence of 'hint' field + cheat.hasHint = modObject.contains("hint"); + + m_cheats[modName] = cheat; + + if (modType == "checkbox") { + QCheckBox* cheatCheckBox = new QCheckBox(modName); + rightLayout->addWidget(cheatCheckBox); + m_cheatCheckBoxes.append(cheatCheckBox); + connect(cheatCheckBox, &QCheckBox::toggled, + [=](bool checked) { applyCheat(modName, checked); }); + } else if (modType == "button") { + QPushButton* cheatButton = new QPushButton(modName); + cheatButton->adjustSize(); + int buttonWidth = cheatButton->sizeHint().width(); + if (buttonWidth > maxWidthButton) { + maxWidthButton = buttonWidth; + } + + // Create a horizontal layout for buttons + QHBoxLayout* buttonLayout = new QHBoxLayout(); + buttonLayout->setContentsMargins(0, 0, 0, 0); + buttonLayout->addWidget(cheatButton); + buttonLayout->addStretch(); + + rightLayout->addLayout(buttonLayout); + connect(cheatButton, &QPushButton::clicked, [=]() { applyCheat(modName, true); }); + } + } + + // Set minimum and fixed size for all buttons + 20 + for (int i = 0; i < rightLayout->count(); ++i) { + QLayoutItem* layoutItem = rightLayout->itemAt(i); + QWidget* widget = layoutItem->widget(); + if (widget) { + QPushButton* button = qobject_cast(widget); + if (button) { + button->setMinimumWidth(maxWidthButton); + button->setFixedWidth(maxWidthButton + 20); + } + } else { + QLayout* layout = layoutItem->layout(); + if (layout) { + for (int j = 0; j < layout->count(); ++j) { + QLayoutItem* innerItem = layout->itemAt(j); + QWidget* innerWidget = innerItem->widget(); + if (innerWidget) { + QPushButton* button = qobject_cast(innerWidget); + if (button) { + button->setMinimumWidth(maxWidthButton); + button->setFixedWidth(maxWidthButton + 20); + } + } + } + } + } + } + + // Set credits label + QLabel* creditsLabel = new QLabel(); + QString creditsText = tr("Author: "); + if (!creditsArray.isEmpty()) { + creditsText += creditsArray[0].toString(); + } + creditsLabel->setText(creditsText); + creditsLabel->setAlignment(Qt::AlignLeft); + rightLayout->addWidget(creditsLabel); +} + +void CheatsPatches::populateFileListCheats() { + QString cheatsDir = + QString::fromStdString(Common::FS::GetUserPath(Common::FS::PathType::CheatsDir).string()); + QString pattern = m_gameSerial + "_" + m_gameVersion + "*.json"; + + QDir dir(cheatsDir); + QStringList filters; + filters << pattern; + dir.setNameFilters(filters); + + QFileInfoList fileList = dir.entryInfoList(QDir::Files); + QStringList fileNames; + + for (const QFileInfo& fileInfo : fileList) { + fileNames << fileInfo.fileName(); + } + + QStringListModel* model = new QStringListModel(fileNames, this); + listView_selectFile->setModel(model); + + connect(listView_selectFile->selectionModel(), &QItemSelectionModel::selectionChanged, this, + [this]() { + QModelIndexList selectedIndexes = + listView_selectFile->selectionModel()->selectedIndexes(); + if (!selectedIndexes.isEmpty()) { + + QString selectedFileName = selectedIndexes.first().data().toString(); + QString cheatsDir = QString::fromStdString( + Common::FS::GetUserPath(Common::FS::PathType::CheatsDir).string()); + + QFile file(cheatsDir + "/" + selectedFileName); + if (file.open(QIODevice::ReadOnly)) { + QByteArray jsonData = file.readAll(); + QJsonDocument jsonDoc = QJsonDocument::fromJson(jsonData); + QJsonObject jsonObject = jsonDoc.object(); + QJsonArray modsArray = jsonObject["mods"].toArray(); + QJsonArray creditsArray = jsonObject["credits"].toArray(); + addCheatsToLayout(modsArray, creditsArray); + } + } + }); + + if (!fileNames.isEmpty()) { + QModelIndex firstIndex = model->index(0, 0); + listView_selectFile->selectionModel()->select(firstIndex, QItemSelectionModel::Select | + QItemSelectionModel::Rows); + listView_selectFile->setCurrentIndex(firstIndex); + } +} + +void CheatsPatches::addPatchesToLayout(const QString& filePath) { + if (filePath == "") { + return; + } + QString folderPath = filePath.section(" | ", 1, 1); + + // Clear existing layout items + QLayoutItem* item; + while ((item = patchesGroupBoxLayout->takeAt(0)) != nullptr) { + delete item->widget(); + delete item; + } + m_patchInfos.clear(); + + QDir dir(Common::FS::GetUserPath(Common::FS::PathType::PatchesDir)); + QString fullPath = dir.filePath(folderPath); + + if (!dir.exists(fullPath)) { + QMessageBox::warning(this, tr("ERROR"), + QString(tr("Directory does not exist:") + "\n%1").arg(fullPath)); + return; + } + dir.setPath(fullPath); + + QString filesJsonPath = dir.filePath("files.json"); + + QFile jsonFile(filesJsonPath); + if (!jsonFile.open(QIODevice::ReadOnly)) { + QMessageBox::warning(this, tr("ERROR"), tr("Failed to open files.json for reading.")); + return; + } + + QByteArray jsonData = jsonFile.readAll(); + jsonFile.close(); + + QJsonDocument jsonDoc = QJsonDocument::fromJson(jsonData); + QJsonObject jsonObject = jsonDoc.object(); + + bool patchAdded = false; + + // Iterate over each entry in the JSON file + for (auto it = jsonObject.constBegin(); it != jsonObject.constEnd(); ++it) { + QString xmlFileName = it.key(); + QJsonArray idsArray = it.value().toArray(); + + // Check if the serial is in the ID list + if (idsArray.contains(QJsonValue(m_gameSerial))) { + QString xmlFilePath = dir.filePath(xmlFileName); + QFile xmlFile(xmlFilePath); + + if (!xmlFile.open(QIODevice::ReadOnly)) { + QMessageBox::warning( + this, tr("ERROR"), + QString(tr("Failed to open file:") + "\n%1").arg(xmlFile.fileName())); + continue; + } + QXmlStreamReader xmlReader(&xmlFile); + QString patchName; + QString patchAuthor; + QString patchNote; + QJsonArray patchLines; + bool isEnabled = false; + + while (!xmlReader.atEnd() && !xmlReader.hasError()) { + xmlReader.readNext(); + + if (xmlReader.tokenType() == QXmlStreamReader::StartElement) { + if (xmlReader.name() == QStringLiteral("Metadata")) { + QXmlStreamAttributes attributes = xmlReader.attributes(); + QString appVer = attributes.value("AppVer").toString(); + if (appVer == m_gameVersion) { + patchName = attributes.value("Name").toString(); + patchAuthor = attributes.value("Author").toString(); + patchNote = attributes.value("Note").toString(); + isEnabled = + attributes.value("isEnabled").toString() == QStringLiteral("true"); + } + if (appVer == "mask") { + patchName = attributes.value("Name").toString() + " (any version)"; + patchAuthor = attributes.value("Author").toString(); + patchNote = attributes.value("Note").toString(); + isEnabled = + attributes.value("isEnabled").toString() == QStringLiteral("true"); + } + } else if (xmlReader.name() == QStringLiteral("PatchList")) { + QJsonArray linesArray; + while (!xmlReader.atEnd() && + !(xmlReader.tokenType() == QXmlStreamReader::EndElement && + xmlReader.name() == QStringLiteral("PatchList"))) { + xmlReader.readNext(); + if (xmlReader.tokenType() == QXmlStreamReader::StartElement && + xmlReader.name() == QStringLiteral("Line")) { + QXmlStreamAttributes attributes = xmlReader.attributes(); + QJsonObject lineObject; + lineObject["Type"] = attributes.value("Type").toString(); + lineObject["Address"] = attributes.value("Address").toString(); + lineObject["Value"] = attributes.value("Value").toString(); + linesArray.append(lineObject); + } + } + patchLines = linesArray; + } + } + + if (!patchName.isEmpty() && !patchLines.isEmpty()) { + QCheckBox* patchCheckBox = new QCheckBox(patchName); + patchCheckBox->setChecked(isEnabled); + patchesGroupBoxLayout->addWidget(patchCheckBox); + + PatchInfo patchInfo; + patchInfo.name = patchName; + patchInfo.author = patchAuthor; + patchInfo.note = patchNote; + patchInfo.linesArray = patchLines; + patchInfo.serial = m_gameSerial; + m_patchInfos[patchName] = patchInfo; + + patchCheckBox->installEventFilter(this); + + connect(patchCheckBox, &QCheckBox::toggled, + [=](bool checked) { applyPatch(patchName, checked); }); + + patchName.clear(); + patchAuthor.clear(); + patchNote.clear(); + patchLines = QJsonArray(); + patchAdded = true; + } + } + xmlFile.close(); + } + } + + // Remove the item from the list view if no patches were added (the game has patches, but not + // for the current version) + if (!patchAdded) { + QStringListModel* model = qobject_cast(patchesListView->model()); + if (model) { + QStringList items = model->stringList(); + int index = items.indexOf(filePath); + if (index != -1) { + items.removeAt(index); + model->setStringList(items); + } + } + } +} + +void CheatsPatches::updateNoteTextEdit(const QString& patchName) { + if (m_patchInfos.contains(patchName)) { + const PatchInfo& patchInfo = m_patchInfos[patchName]; + QString text = QString(tr("Name:") + " %1\n" + tr("Author:") + " %2\n\n%3") + .arg(patchInfo.name) + .arg(patchInfo.author) + .arg(patchInfo.note); + + foreach (const QJsonValue& value, patchInfo.linesArray) { + QJsonObject lineObject = value.toObject(); + QString type = lineObject["Type"].toString(); + QString address = lineObject["Address"].toString(); + QString patchValue = lineObject["Value"].toString(); + + // add the values ​​to be modified in instructionsTextEdit + // text.append(QString("\nType: %1\nAddress: %2\n\nValue: %3") + // .arg(type) + // .arg(address) + // .arg(patchValue)); + } + text.replace("\\n", "\n"); + instructionsTextEdit->setText(text); + } +} + +bool showErrorMessage = true; +void CheatsPatches::uncheckAllCheatCheckBoxes() { + for (auto& cheatCheckBox : m_cheatCheckBoxes) { + cheatCheckBox->setChecked(false); + } + showErrorMessage = true; +} + +void CheatsPatches::applyCheat(const QString& modName, bool enabled) { + if (!m_cheats.contains(modName)) + return; + + Cheat cheat = m_cheats[modName]; + + for (const MemoryMod& memoryMod : cheat.memoryMods) { + QString value = enabled ? memoryMod.on : memoryMod.off; + + std::string modNameStr = modName.toStdString(); + std::string offsetStr = memoryMod.offset.toStdString(); + std::string valueStr = value.toStdString(); + + if (MemoryPatcher::g_eboot_address == 0) { + MemoryPatcher::patchInfo addingPatch; + addingPatch.modNameStr = modNameStr; + addingPatch.offsetStr = offsetStr; + addingPatch.valueStr = valueStr; + addingPatch.isOffset = true; + + MemoryPatcher::AddPatchToQueue(addingPatch); + continue; + } + // Determine if the hint field is present + bool isHintPresent = m_cheats[modName].hasHint; + MemoryPatcher::PatchMemory(modNameStr, offsetStr, valueStr, !isHintPresent, false); + } +} + +void CheatsPatches::applyPatch(const QString& patchName, bool enabled) { + if (!enabled) + return; + if (m_patchInfos.contains(patchName)) { + const PatchInfo& patchInfo = m_patchInfos[patchName]; + + foreach (const QJsonValue& value, patchInfo.linesArray) { + QJsonObject lineObject = value.toObject(); + QString type = lineObject["Type"].toString(); + QString address = lineObject["Address"].toString(); + QString patchValue = lineObject["Value"].toString(); + QString maskOffsetStr = lineObject["Offset"].toString(); + + patchValue = MemoryPatcher::convertValueToHex(type, patchValue); + + bool littleEndian = false; + + if (type == "bytes16") { + littleEndian = true; + } else if (type == "bytes32") { + littleEndian = true; + } else if (type == "bytes64") { + littleEndian = true; + } + + MemoryPatcher::PatchMask patchMask = MemoryPatcher::PatchMask::None; + int maskOffsetValue = 0; + + if (type == "mask") { + patchMask = MemoryPatcher::PatchMask::Mask; + + // im not sure if this works, there is no games to test the mask offset on yet + if (!maskOffsetStr.toStdString().empty()) + maskOffsetValue = std::stoi(maskOffsetStr.toStdString(), 0, 10); + } + + if (type == "mask_jump32") + patchMask = MemoryPatcher::PatchMask::Mask_Jump32; + + if (MemoryPatcher::g_eboot_address == 0) { + MemoryPatcher::patchInfo addingPatch; + addingPatch.gameSerial = patchInfo.serial.toStdString(); + addingPatch.modNameStr = patchName.toStdString(); + addingPatch.offsetStr = address.toStdString(); + addingPatch.valueStr = patchValue.toStdString(); + addingPatch.isOffset = false; + addingPatch.littleEndian = littleEndian; + addingPatch.patchMask = patchMask; + addingPatch.maskOffset = maskOffsetValue; + + MemoryPatcher::AddPatchToQueue(addingPatch); + continue; + } + MemoryPatcher::PatchMemory(patchName.toStdString(), address.toStdString(), + patchValue.toStdString(), false, littleEndian, patchMask); + } + } +} + +bool CheatsPatches::eventFilter(QObject* obj, QEvent* event) { + if (event->type() == QEvent::HoverEnter || event->type() == QEvent::HoverLeave) { + QCheckBox* checkBox = qobject_cast(obj); + if (checkBox) { + bool hovered = (event->type() == QEvent::HoverEnter); + onPatchCheckBoxHovered(checkBox, hovered); + return true; + } + } + // Pass the event on to base class + return QWidget::eventFilter(obj, event); +} + +void CheatsPatches::onPatchCheckBoxHovered(QCheckBox* checkBox, bool hovered) { + if (hovered) { + QString text = checkBox->text(); + updateNoteTextEdit(text); + } else { + instructionsTextEdit->setText(defaultTextEdit); + } +} \ No newline at end of file diff --git a/src/qt_gui/cheats_patches.h b/src/qt_gui/cheats_patches.h new file mode 100644 index 000000000..7a68829cd --- /dev/null +++ b/src/qt_gui/cheats_patches.h @@ -0,0 +1,115 @@ +// SPDX-FileCopyrightText: Copyright 2024 shadPS4 Emulator Project +// SPDX-License-Identifier: GPL-2.0-or-later + +#ifndef CHEATS_PATCHES_H +#define CHEATS_PATCHES_H + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +class CheatsPatches : public QWidget { + Q_OBJECT + +public: + CheatsPatches(const QString& gameName, const QString& gameSerial, const QString& gameVersion, + const QString& gameSize, const QPixmap& gameImage, QWidget* parent = nullptr); + ~CheatsPatches(); + + // Public Methods + void downloadCheats(const QString& source, const QString& m_gameSerial, + const QString& m_gameVersion, bool showMessageBox); + void downloadPatches(const QString repository, const bool showMessageBox); + +signals: + void downloadFinished(); + +private: + // UI Setup and Event Handlers + void setupUI(); + void onSaveButtonClicked(); + QCheckBox* findCheckBoxByName(const QString& name); + bool eventFilter(QObject* obj, QEvent* event); + void onPatchCheckBoxHovered(QCheckBox* checkBox, bool hovered); + + // Cheat and Patch Management + void populateFileListCheats(); + void populateFileListPatches(); + + void addCheatsToLayout(const QJsonArray& modsArray, const QJsonArray& creditsArray); + void addPatchesToLayout(const QString& serial); + + void applyCheat(const QString& modName, bool enabled); + void applyPatch(const QString& patchName, bool enabled); + + void createFilesJson(const QString& repository); + void uncheckAllCheatCheckBoxes(); + void updateNoteTextEdit(const QString& patchName); + + // Network Manager + QNetworkAccessManager* manager; + + // Patch Info Structures + struct MemoryMod { + QString offset; + QString on; + QString off; + }; + + struct Cheat { + QString name; + QString type; + bool hasHint; + QVector memoryMods; + }; + + struct PatchInfo { + QString name; + QString author; + QString note; + QJsonArray linesArray; + QString serial; + }; + + // Members + QString m_gameName; + QString m_gameSerial; + QString m_gameVersion; + QString m_gameSize; + QPixmap m_gameImage; + QString m_cheatFilePath; + QMap m_cheats; + QMap m_patchInfos; + QVector m_cheatCheckBoxes; + + // UI Elements + QVBoxLayout* rightLayout; + QVBoxLayout* patchesGroupBoxLayout; + QGroupBox* patchesGroupBox; + QVBoxLayout* patchesLayout; + QTextEdit* instructionsTextEdit; + QListView* listView_selectFile; + QItemSelectionModel* selectionModel; + QComboBox* patchesComboBox; + QListView* patchesListView; + + QString defaultTextEdit; +}; + +#endif // CHEATS_PATCHES_H \ No newline at end of file diff --git a/src/qt_gui/gui_context_menus.h b/src/qt_gui/gui_context_menus.h index f4bc519a2..c43ff8f87 100644 --- a/src/qt_gui/gui_context_menus.h +++ b/src/qt_gui/gui_context_menus.h @@ -10,6 +10,7 @@ #include #include +#include "cheats_patches.h" #include "game_info.h" #include "trophy_viewer.h" @@ -20,6 +21,7 @@ #include #include #endif +#include "common/path_util.h" class GuiContextMenus : public QObject { Q_OBJECT @@ -34,15 +36,22 @@ public: itemID = widget->currentRow() * widget->columnCount() + widget->currentColumn(); } + // Do not show the menu if an item is selected + if (itemID == -1) { + return; + } + // Setup menu. QMenu menu(widget); QAction createShortcut(tr("Create Shortcut"), widget); QAction openFolder(tr("Open Game Folder"), widget); + QAction openCheats(tr("Cheats / Patches"), widget); QAction openSfoViewer(tr("SFO Viewer"), widget); QAction openTrophyViewer(tr("Trophy Viewer"), widget); menu.addAction(&openFolder); menu.addAction(&createShortcut); + menu.addAction(&openCheats); menu.addAction(&openSfoViewer); menu.addAction(&openTrophyViewer); @@ -121,6 +130,19 @@ public: } } + if (selected == &openCheats) { + QString gameName = QString::fromStdString(m_games[itemID].name); + QString gameSerial = QString::fromStdString(m_games[itemID].serial); + QString gameVersion = QString::fromStdString(m_games[itemID].version); + QString gameSize = QString::fromStdString(m_games[itemID].size); + QPixmap gameImage(QString::fromStdString(m_games[itemID].icon_path)); + CheatsPatches* cheatsPatches = + new CheatsPatches(gameName, gameSerial, gameVersion, gameSize, gameImage); + cheatsPatches->show(); + connect(widget->parent(), &QWidget::destroyed, cheatsPatches, + [widget, cheatsPatches]() { cheatsPatches->deleteLater(); }); + } + if (selected == &openTrophyViewer) { QString trophyPath = QString::fromStdString(m_games[itemID].serial); QString gameTrpPath = QString::fromStdString(m_games[itemID].path); diff --git a/src/qt_gui/main_window.cpp b/src/qt_gui/main_window.cpp index 8a4281726..23668ef78 100644 --- a/src/qt_gui/main_window.cpp +++ b/src/qt_gui/main_window.cpp @@ -5,6 +5,7 @@ #include #include "about_dialog.h" +#include "cheats_patches.h" #include "common/io_file.h" #include "common/version.h" #include "core/file_format/pkg.h" @@ -164,7 +165,7 @@ void MainWindow::GetPhysicalDevices() { auto prop = physical_device.getProperties(); QString name = QString::fromUtf8(prop.deviceName, -1); if (prop.apiVersion < Vulkan::TargetVulkanApiVersion) { - name += " * Unsupported Vulkan Version"; + name += tr(" * Unsupported Vulkan Version"); } m_physical_devices.push_back(name); } @@ -317,6 +318,83 @@ void MainWindow::CreateConnects() { Config::setTableMode(2); }); + // Cheats/Patches Download. + connect(ui->downloadCheatsPatchesAct, &QAction::triggered, this, [this]() { + QDialog* panelDialog = new QDialog(this); + QVBoxLayout* layout = new QVBoxLayout(panelDialog); + QPushButton* downloadAllCheatsButton = + new QPushButton(tr("Download Cheats For All Installed Games"), panelDialog); + QPushButton* downloadAllPatchesButton = + new QPushButton(tr("Download Patches For All Games"), panelDialog); + + layout->addWidget(downloadAllCheatsButton); + layout->addWidget(downloadAllPatchesButton); + + panelDialog->setLayout(layout); + + connect(downloadAllCheatsButton, &QPushButton::clicked, this, [this, panelDialog]() { + QEventLoop eventLoop; + int pendingDownloads = 0; + + auto onDownloadFinished = [&]() { + if (--pendingDownloads <= 0) { + eventLoop.quit(); + } + }; + + for (const GameInfo& game : m_game_info->m_games) { + QString empty = ""; + QString gameSerial = QString::fromStdString(game.serial); + QString gameVersion = QString::fromStdString(game.version); + + CheatsPatches* cheatsPatches = + new CheatsPatches(empty, empty, empty, empty, empty, nullptr); + connect(cheatsPatches, &CheatsPatches::downloadFinished, onDownloadFinished); + + pendingDownloads += 3; + + cheatsPatches->downloadCheats("wolf2022", gameSerial, gameVersion, false); + cheatsPatches->downloadCheats("GoldHEN", gameSerial, gameVersion, false); + cheatsPatches->downloadCheats("shadPS4", gameSerial, gameVersion, false); + } + eventLoop.exec(); + + QMessageBox::information( + nullptr, tr("Download Complete"), + tr("You have downloaded cheats for all the games you have installed.")); + + panelDialog->accept(); + }); + connect(downloadAllPatchesButton, &QPushButton::clicked, this, [this, panelDialog]() { + QEventLoop eventLoop; + int pendingDownloads = 0; + + auto onDownloadFinished = [&]() { + if (--pendingDownloads <= 0) { + eventLoop.quit(); + } + }; + + QString empty = ""; + CheatsPatches* cheatsPatches = + new CheatsPatches(empty, empty, empty, empty, empty, nullptr); + connect(cheatsPatches, &CheatsPatches::downloadFinished, onDownloadFinished); + + pendingDownloads += 2; + + cheatsPatches->downloadPatches("GoldHEN", false); + cheatsPatches->downloadPatches("shadPS4", false); + + eventLoop.exec(); + QMessageBox::information( + nullptr, tr("Download Complete"), + QString(tr("Patches Downloaded Successfully!") + "\n" + + tr("All Patches available for all games have been downloaded."))); + panelDialog->accept(); + }); + panelDialog->exec(); + }); + // Dump game list. connect(ui->dumpGameListAct, &QAction::triggered, this, [&] { QString filePath = qApp->applicationDirPath().append("/GameList.txt"); @@ -468,7 +546,7 @@ void MainWindow::RefreshGameTable() { m_game_grid_frame->PopulateGameGrid(m_game_info->m_games, false); statusBar->clearMessage(); int numGames = m_game_info->m_games.size(); - QString statusMessage = "Games: " + QString::number(numGames); + QString statusMessage = tr("Games: ") + QString::number(numGames); statusBar->showMessage(statusMessage); } @@ -519,7 +597,8 @@ void MainWindow::BootGame() { int nFiles = fileNames.size(); if (nFiles > 1) { - QMessageBox::critical(nullptr, "Game Boot", QString("Only one file can be selected!")); + QMessageBox::critical(nullptr, tr("Game Boot"), + QString(tr("Only one file can be selected!"))); } else { std::filesystem::path path(fileNames[0].toStdString()); #ifdef _WIN64 @@ -542,7 +621,7 @@ void MainWindow::InstallDragDropPkg(std::filesystem::path file, int pkgNum, int QDir game_dir(QString::fromStdString(extract_path.string())); if (game_dir.exists()) { QMessageBox msgBox; - msgBox.setWindowTitle("PKG Extraction"); + msgBox.setWindowTitle(tr("PKG Extraction")); if (pkgType.contains("PATCH")) { psf.open("", pkg.sfo); QString pkg_app_version = QString::fromStdString(psf.GetString("APP_VER")); @@ -551,23 +630,24 @@ void MainWindow::InstallDragDropPkg(std::filesystem::path file, int pkgNum, int double appD = game_app_version.toDouble(); double pkgD = pkg_app_version.toDouble(); if (pkgD == appD) { - msgBox.setText( - QString("Patch detected!\nPKG and Game versions match!: %1\nWould you like " - "to overwrite?") - .arg(pkg_app_version)); + msgBox.setText(QString(tr("Patch detected!\nPKG and Game versions match!: " + "%1\nWould you like ") + + tr("to overwrite?")) + .arg(pkg_app_version)); msgBox.setStandardButtons(QMessageBox::Yes | QMessageBox::No); msgBox.setDefaultButton(QMessageBox::No); } else if (pkgD < appD) { - msgBox.setText(QString("Patch detected!\nPKG Version %1 is older " - "than installed version!: %2\nWould you like " - "to overwrite?") + msgBox.setText(QString(tr("Patch detected!\nPKG Version %1 is older ") + + tr("than installed version!: %2\nWould you like ") + + tr("to overwrite?")) .arg(pkg_app_version, game_app_version)); msgBox.setStandardButtons(QMessageBox::Yes | QMessageBox::No); msgBox.setDefaultButton(QMessageBox::No); } else { - msgBox.setText(QString("Patch detected!\nGame is installed: %1\nWould you like " - "to install Patch: %2?") - .arg(game_app_version, pkg_app_version)); + msgBox.setText( + QString(tr("Patch detected!\nGame is installed: %1\nWould you like ") + + tr("to install Patch: %2?")) + .arg(game_app_version, pkg_app_version)); msgBox.setStandardButtons(QMessageBox::Yes | QMessageBox::No); msgBox.setDefaultButton(QMessageBox::No); } @@ -578,8 +658,9 @@ void MainWindow::InstallDragDropPkg(std::filesystem::path file, int pkgNum, int return; } } else { - msgBox.setText(QString("Game already installed\n%1\nWould you like to overwrite?") - .arg(QString::fromStdString(extract_path.string()))); + msgBox.setText( + QString(tr("Game already installed\n%1\nWould you like to overwrite?")) + .arg(QString::fromStdString(extract_path.string()))); msgBox.setStandardButtons(QMessageBox::Yes | QMessageBox::No); msgBox.setDefaultButton(QMessageBox::No); int result = msgBox.exec(); @@ -592,15 +673,15 @@ void MainWindow::InstallDragDropPkg(std::filesystem::path file, int pkgNum, int } else { // Do nothing; if (pkgType.contains("PATCH")) { - QMessageBox::information(this, "PKG Extraction", - "PKG is a patch, please install the game first!"); + QMessageBox::information(this, tr("PKG Extraction"), + tr("PKG is a patch, please install the game first!")); return; } // what else? } if (!pkg.Extract(file, extract_path, failreason)) { - QMessageBox::critical(this, "PKG ERROR", QString::fromStdString(failreason)); + QMessageBox::critical(this, tr("PKG ERROR"), QString::fromStdString(failreason)); } else { int nfiles = pkg.GetNumberOfFiles(); @@ -610,9 +691,9 @@ void MainWindow::InstallDragDropPkg(std::filesystem::path file, int pkgNum, int } QProgressDialog dialog; - dialog.setWindowTitle("PKG Extraction"); + dialog.setWindowTitle(tr("PKG Extraction")); dialog.setWindowModality(Qt::WindowModal); - QString extractmsg = QString("Extracting PKG %1/%2").arg(pkgNum).arg(nPkg); + QString extractmsg = QString(tr("Extracting PKG %1/%2")).arg(pkgNum).arg(nPkg); dialog.setLabelText(extractmsg); dialog.setAutoClose(true); dialog.setRange(0, nfiles); @@ -622,8 +703,9 @@ void MainWindow::InstallDragDropPkg(std::filesystem::path file, int pkgNum, int if (pkgNum == nPkg) { QString path = QString::fromStdString(Config::getGameInstallDir()); QMessageBox extractMsgBox(this); - extractMsgBox.setWindowTitle("Extraction Finished"); - extractMsgBox.setText(QString("Game successfully installed at %1").arg(path)); + extractMsgBox.setWindowTitle(tr("Extraction Finished")); + extractMsgBox.setText( + QString(tr("Game successfully installed at %1")).arg(path)); extractMsgBox.addButton(QMessageBox::Ok); extractMsgBox.setDefaultButton(QMessageBox::Ok); connect(&extractMsgBox, &QMessageBox::buttonClicked, this, @@ -644,7 +726,8 @@ void MainWindow::InstallDragDropPkg(std::filesystem::path file, int pkgNum, int dialog.exec(); } } else { - QMessageBox::critical(this, "PKG ERROR", "File doesn't appear to be a valid PKG file"); + QMessageBox::critical(this, tr("PKG ERROR"), + tr("File doesn't appear to be a valid PKG file")); } } diff --git a/src/qt_gui/main_window_ui.h b/src/qt_gui/main_window_ui.h index 1a2a560e0..498cec735 100644 --- a/src/qt_gui/main_window_ui.h +++ b/src/qt_gui/main_window_ui.h @@ -25,6 +25,7 @@ public: QAction* setlistModeGridAct; QAction* setlistElfAct; QAction* gameInstallPathAct; + QAction* downloadCheatsPatchesAct; QAction* dumpGameListAct; QAction* pkgViewerAct; QAction* aboutAct; @@ -120,11 +121,12 @@ public: gameInstallPathAct = new QAction(MainWindow); gameInstallPathAct->setObjectName("gameInstallPathAct"); gameInstallPathAct->setIcon(QIcon(":images/folder_icon.png")); + downloadCheatsPatchesAct = new QAction(MainWindow); + downloadCheatsPatchesAct->setObjectName("downloadCheatsPatchesAct"); dumpGameListAct = new QAction(MainWindow); dumpGameListAct->setObjectName("dumpGameList"); pkgViewerAct = new QAction(MainWindow); pkgViewerAct->setObjectName("pkgViewer"); - pkgViewerAct->setObjectName("pkgViewer"); pkgViewerAct->setIcon(QIcon(":images/file_icon.png")); aboutAct = new QAction(MainWindow); aboutAct->setObjectName("aboutAct"); @@ -277,6 +279,7 @@ public: menuSettings->addAction(configureAct); menuSettings->addAction(gameInstallPathAct); menuSettings->addAction(menuUtils->menuAction()); + menuUtils->addAction(downloadCheatsPatchesAct); menuUtils->addAction(dumpGameListAct); menuUtils->addAction(pkgViewerAct); menuAbout->addAction(aboutAct); @@ -323,6 +326,8 @@ public: setlistElfAct->setText(QCoreApplication::translate("MainWindow", "Elf Viewer", nullptr)); gameInstallPathAct->setText( QCoreApplication::translate("MainWindow", "Game Install Directory", nullptr)); + downloadCheatsPatchesAct->setText( + QCoreApplication::translate("MainWindow", "Download Cheats/Patches", nullptr)); dumpGameListAct->setText( QCoreApplication::translate("MainWindow", "Dump Game List", nullptr)); pkgViewerAct->setText(QCoreApplication::translate("MainWindow", "PKG Viewer", nullptr)); diff --git a/src/qt_gui/memory_patcher.cpp b/src/qt_gui/memory_patcher.cpp new file mode 100644 index 000000000..d5ffa1c99 --- /dev/null +++ b/src/qt_gui/memory_patcher.cpp @@ -0,0 +1,347 @@ +// SPDX-FileCopyrightText: Copyright 2024 shadPS4 Emulator Project +// SPDX-License-Identifier: GPL-2.0-or-later + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "common/logging/log.h" +#include "common/path_util.h" +#include "memory_patcher.h" + +namespace MemoryPatcher { + +uintptr_t g_eboot_address; +u64 g_eboot_image_size; +std::string g_game_serial; +std::vector pending_patches; + +QString toHex(unsigned long long value, size_t byteSize) { + std::stringstream ss; + ss << std::hex << std::setfill('0') << std::setw(byteSize * 2) << value; + return QString::fromStdString(ss.str()); +} + +QString convertValueToHex(const QString& type, const QString& valueStr) { + QString result; + std::string typeStr = type.toStdString(); + std::string valueStrStd = valueStr.toStdString(); + + if (typeStr == "byte") { + unsigned int value = std::stoul(valueStrStd, nullptr, 16); + result = toHex(value, 1); + } else if (typeStr == "bytes16") { + unsigned int value = std::stoul(valueStrStd, nullptr, 16); + result = toHex(value, 2); + } else if (typeStr == "bytes32") { + unsigned long value = std::stoul(valueStrStd, nullptr, 16); + result = toHex(value, 4); + } else if (typeStr == "bytes64") { + unsigned long long value = std::stoull(valueStrStd, nullptr, 16); + result = toHex(value, 8); + } else if (typeStr == "float32") { + union { + float f; + uint32_t i; + } floatUnion; + floatUnion.f = std::stof(valueStrStd); + result = toHex(floatUnion.i, sizeof(floatUnion.i)); + } else if (typeStr == "float64") { + union { + double d; + uint64_t i; + } doubleUnion; + doubleUnion.d = std::stod(valueStrStd); + result = toHex(doubleUnion.i, sizeof(doubleUnion.i)); + } else if (typeStr == "utf8") { + QByteArray byteArray = QString::fromStdString(valueStrStd).toUtf8(); + byteArray.append('\0'); + std::stringstream ss; + for (unsigned char c : byteArray) { + ss << std::hex << std::setfill('0') << std::setw(2) << static_cast(c); + } + result = QString::fromStdString(ss.str()); + } else if (typeStr == "utf16") { + QByteArray byteArray( + reinterpret_cast(QString::fromStdString(valueStrStd).utf16()), + QString::fromStdString(valueStrStd).size() * 2); + byteArray.append('\0'); + byteArray.append('\0'); + std::stringstream ss; + for (unsigned char c : byteArray) { + ss << std::hex << std::setfill('0') << std::setw(2) << static_cast(c); + } + result = QString::fromStdString(ss.str()); + } else if (typeStr == "bytes") { + result = valueStr; + } else if (typeStr == "mask" || typeStr == "mask_jump32") { + result = valueStr; + } else { + LOG_INFO(Loader, "Error applying Patch, unknown type: {}", typeStr); + } + return result; +} + +void OnGameLoaded() { + + // We use the QT headers for the xml and json parsing, this define is only true on QT builds + QString patchDir = + QString::fromStdString(Common::FS::GetUserPath(Common::FS::PathType::PatchesDir).string()); + QString repositories[] = {"GoldHEN", "shadPS4"}; + + for (const QString& repository : repositories) { + QString filesJsonPath = patchDir + "/" + repository + "/files.json"; + + QFile jsonFile(filesJsonPath); + if (!jsonFile.open(QIODevice::ReadOnly)) { + LOG_ERROR(Loader, "Unable to open files.json for reading."); + continue; + } + + QByteArray jsonData = jsonFile.readAll(); + jsonFile.close(); + + QJsonDocument jsonDoc = QJsonDocument::fromJson(jsonData); + QJsonObject jsonObject = jsonDoc.object(); + + QString selectedFileName; + QString serial = QString::fromStdString(g_game_serial); + + for (auto it = jsonObject.constBegin(); it != jsonObject.constEnd(); ++it) { + QString filePath = it.key(); + QJsonArray idsArray = it.value().toArray(); + + if (idsArray.contains(QJsonValue(serial))) { + selectedFileName = filePath; + break; + } + } + + if (selectedFileName.isEmpty()) { + LOG_ERROR(Loader, "No patch file found for the current serial."); + continue; + } + + QString filePath = patchDir + "/" + repository + "/" + selectedFileName; + QFile file(filePath); + if (!file.open(QIODevice::ReadOnly | QIODevice::Text)) { + LOG_ERROR(Loader, "Unable to open the file for reading."); + continue; + } + + QByteArray xmlData = file.readAll(); + file.close(); + + QString newXmlData; + + QXmlStreamReader xmlReader(xmlData); + bool insideMetadata = false; + + bool isEnabled = false; + std::string currentPatchName; + while (!xmlReader.atEnd()) { + xmlReader.readNext(); + + if (xmlReader.isStartElement()) { + QJsonArray patchLines; + if (xmlReader.name() == QStringLiteral("Metadata")) { + insideMetadata = true; + + QString name = xmlReader.attributes().value("Name").toString(); + currentPatchName = name.toStdString(); + + // Check and update the isEnabled attribute + for (const QXmlStreamAttribute& attr : xmlReader.attributes()) { + if (attr.name() == QStringLiteral("isEnabled")) { + if (attr.value().toString() == "true") { + isEnabled = true; + } else + isEnabled = false; + } + } + } else if (xmlReader.name() == QStringLiteral("PatchList")) { + QJsonArray linesArray; + while (!xmlReader.atEnd() && + !(xmlReader.tokenType() == QXmlStreamReader::EndElement && + xmlReader.name() == QStringLiteral("PatchList"))) { + xmlReader.readNext(); + if (xmlReader.tokenType() == QXmlStreamReader::StartElement && + xmlReader.name() == QStringLiteral("Line")) { + QXmlStreamAttributes attributes = xmlReader.attributes(); + QJsonObject lineObject; + lineObject["Type"] = attributes.value("Type").toString(); + lineObject["Address"] = attributes.value("Address").toString(); + lineObject["Value"] = attributes.value("Value").toString(); + linesArray.append(lineObject); + } + } + + patchLines = linesArray; + if (isEnabled) { + foreach (const QJsonValue& value, patchLines) { + QJsonObject lineObject = value.toObject(); + QString type = lineObject["Type"].toString(); + QString address = lineObject["Address"].toString(); + QString patchValue = lineObject["Value"].toString(); + QString maskOffsetStr = lineObject["Offset"].toString(); + + patchValue = convertValueToHex(type, patchValue); + + bool littleEndian = false; + + if (type == "bytes16") { + littleEndian = true; + } else if (type == "bytes32") { + littleEndian = true; + } else if (type == "bytes64") { + littleEndian = true; + } + + MemoryPatcher::PatchMask patchMask = MemoryPatcher::PatchMask::None; + int maskOffsetValue = 0; + + if (type == "mask") { + patchMask = MemoryPatcher::PatchMask::Mask; + + // im not sure if this works, there is no games to test the mask + // offset on yet + if (!maskOffsetStr.toStdString().empty()) + maskOffsetValue = std::stoi(maskOffsetStr.toStdString(), 0, 10); + } + + if (type == "mask_jump32") + patchMask = MemoryPatcher::PatchMask::Mask_Jump32; + + MemoryPatcher::PatchMemory(currentPatchName, address.toStdString(), + patchValue.toStdString(), false, + littleEndian, patchMask); + } + } + } + } + } + + if (xmlReader.hasError()) { + LOG_ERROR(Loader, "Failed to parse XML for {}", g_game_serial); + } else { + LOG_INFO(Loader, "Patches loaded successfully"); + } + ApplyPendingPatches(); + } +} + +void AddPatchToQueue(patchInfo patchToAdd) { + pending_patches.push_back(patchToAdd); +} + +void ApplyPendingPatches() { + + for (size_t i = 0; i < pending_patches.size(); ++i) { + patchInfo currentPatch = pending_patches[i]; + + if (currentPatch.gameSerial != g_game_serial) + continue; + + PatchMemory(currentPatch.modNameStr, currentPatch.offsetStr, currentPatch.valueStr, + currentPatch.isOffset, currentPatch.littleEndian, currentPatch.patchMask, + currentPatch.maskOffset); + } + + pending_patches.clear(); +} + +void PatchMemory(std::string modNameStr, std::string offsetStr, std::string valueStr, bool isOffset, + bool littleEndian, PatchMask patchMask, int maskOffset) { + // Send a request to modify the process memory. + void* cheatAddress = nullptr; + + if (patchMask == PatchMask::None) { + if (isOffset) { + cheatAddress = reinterpret_cast(g_eboot_address + std::stoi(offsetStr, 0, 16)); + } else { + cheatAddress = + reinterpret_cast(g_eboot_address + (std::stoi(offsetStr, 0, 16) - 0x400000)); + } + } + + if (patchMask == PatchMask::Mask) { + cheatAddress = reinterpret_cast(PatternScan(offsetStr) + maskOffset); + } + + // TODO: implement mask_jump32 + + if (cheatAddress == nullptr) { + LOG_ERROR(Loader, "Failed to get address for patch {}", modNameStr); + return; + } + + std::vector bytePatch; + + for (size_t i = 0; i < valueStr.length(); i += 2) { + unsigned char byte = + static_cast(std::strtol(valueStr.substr(i, 2).c_str(), nullptr, 16)); + + bytePatch.push_back(byte); + } + + if (littleEndian) { + std::reverse(bytePatch.begin(), bytePatch.end()); + } + + std::memcpy(cheatAddress, bytePatch.data(), bytePatch.size()); + + LOG_INFO(Loader, "Applied patch: {}, Offset: {}, Value: {}", modNameStr, + (uintptr_t)cheatAddress, valueStr); +} + +static std::vector PatternToByte(const std::string& pattern) { + std::vector bytes; + const char* start = pattern.data(); + const char* end = start + pattern.size(); + + for (const char* current = start; current < end; ++current) { + if (*current == '?') { + ++current; + if (*current == '?') + ++current; + bytes.push_back(-1); + } else { + bytes.push_back(strtoul(current, const_cast(¤t), 16)); + } + } + + return bytes; +} + +uintptr_t PatternScan(const std::string& signature) { + std::vector patternBytes = PatternToByte(signature); + const auto scanBytes = static_cast((void*)g_eboot_address); + + const int32_t* sigPtr = patternBytes.data(); + const size_t sigSize = patternBytes.size(); + + uint32_t foundResults = 0; + for (uint32_t i = 0; i < g_eboot_image_size - sigSize; ++i) { + bool found = true; + for (uint32_t j = 0; j < sigSize; ++j) { + if (scanBytes[i + j] != sigPtr[j] && sigPtr[j] != -1) { + found = false; + break; + } + } + + if (found) { + foundResults++; + return reinterpret_cast(&scanBytes[i]); + } + } + + return 0; +} + +} // namespace MemoryPatcher \ No newline at end of file diff --git a/src/qt_gui/memory_patcher.h b/src/qt_gui/memory_patcher.h new file mode 100644 index 000000000..821184ade --- /dev/null +++ b/src/qt_gui/memory_patcher.h @@ -0,0 +1,47 @@ +// SPDX-FileCopyrightText: Copyright 2024 shadPS4 Emulator Project +// SPDX-License-Identifier: GPL-2.0-or-later + +#pragma once +#include +#include +#include +#include + +namespace MemoryPatcher { + +extern uintptr_t g_eboot_address; +extern u64 g_eboot_image_size; +extern std::string g_game_serial; + +enum PatchMask : uint8_t { + None, + Mask, + Mask_Jump32, +}; + +struct patchInfo { + std::string gameSerial; + std::string modNameStr; + std::string offsetStr; + std::string valueStr; + bool isOffset; + bool littleEndian; + PatchMask patchMask; + int maskOffset; +}; + +extern std::vector pending_patches; + +QString convertValueToHex(const QString& type, const QString& valueStr); + +void OnGameLoaded(); +void AddPatchToQueue(patchInfo patchToAdd); +void ApplyPendingPatches(); + +void PatchMemory(std::string modNameStr, std::string offsetStr, std::string valueStr, bool isOffset, + bool littleEndian, PatchMask patchMask = PatchMask::None, int maskOffset = 0); + +static std::vector PatternToByte(const std::string& pattern); +uintptr_t PatternScan(const std::string& signature); + +} // namespace MemoryPatcher \ No newline at end of file diff --git a/src/qt_gui/translations/da_DK.ts b/src/qt_gui/translations/da_DK.ts index 0f4489eed..de9097f2b 100644 --- a/src/qt_gui/translations/da_DK.ts +++ b/src/qt_gui/translations/da_DK.ts @@ -81,67 +81,72 @@ GuiContextMenus - + Create Shortcut Create Shortcut - + Open Game Folder Open Game Folder - + + Cheats / Patches + Trick / Patches + + + SFO Viewer SFO Viewer - + Trophy Viewer Trophy Viewer - + Copy info Copy info - + Copy Name Copy Name - + Copy Serial Copy Serial - + Copy All Copy All - + Shortcut creation Shortcut creation - + Shortcut created successfully!\n %1 Shortcut created successfully!\n %1 - + Error Error - + Error creating shortcut!\n %1 Error creating shortcut!\n %1 - + Install PKG Install PKG @@ -248,6 +253,11 @@ Game Install Directory Game Install Directory + + + Download Cheats/Patches + Download Tricks / Patches + Dump Game List @@ -487,5 +497,396 @@ Enable RenderDoc Debugging Enable RenderDoc Debugging + + + MainWindow + + + * Unsupported Vulkan Version + * Ikke understøttet Vulkan-version + + + + Download Cheats For All Installed Games + Hent snyd til alle installerede spil + + + + Download Patches For All Games + Hent patches til alle spil + + + + Download Complete + Download fuldført + + + + You have downloaded cheats for all the games you have installed. + Du har hentet snyd til alle de spil, du har installeret. + + + + Patches Downloaded Successfully! + Patcher hentet med succes! + + + + All Patches available for all games have been downloaded. + Alle patches til alle spil er blevet hentet. + + + + Games: + Spil: + + + + PKG File (*.PKG) + PKG-fil (*.PKG) + + + + ELF files (*.bin *.elf *.oelf) + ELF-filer (*.bin *.elf *.oelf) + + + + Game Boot + Spil-boot + + + + Only one file can be selected! + Kun én fil kan vælges! + + + + PKG Extraction + PKG-udtrækning + + + + Patch detected!\nPKG and Game versions match!: %1\nWould you like + Patch opdaget!\nPKG- og spilversioner stemmer overens!: %1\nVil du + + + + to overwrite? + overskrive? + + + + Patch detected!\nPKG Version %1 is older + Patch opdaget!\nPKG-version %1 er ældre + + + + than installed version!: %2\nWould you like + end installeret version!: %2\nVil du + + + + to overwrite? + overskrive? + + + + Patch detected!\nGame is installed: %1\nWould you like + Patch opdaget!\nSpillet er installeret: %1\nVil du + + + + to install Patch: %2? + installere patch: %2? + + + + Game already installed\n%1\nWould you like to overwrite? + Spil allerede installeret\n%1\nVil du overskrive? + + + + PKG is a patch, please install the game first! + PKG er en patch, venligst installer spillet først! + + + + PKG ERROR + PKG FEJL + + + + Extracting PKG %1/%2 + Udvinding af PKG %1/%2 + + + + Extraction Finished + Udvinding afsluttet + + + + Game successfully installed at %1 + Spillet blev installeret succesfuldt på %1 + + + + File doesn't appear to be a valid PKG file + Filen ser ikke ud til at være en gyldig PKG-fil + + + + CheatsPatches + + + Cheats / Patches + Snyd / Patches + + + + defaultTextEdit_MSG + Cheats/Patches er eksperimentelle.\nBrug med forsigtighed.\n\nDownload cheats individuelt ved at vælge lageret og klikke på download-knappen.\nUnder fanen Patches kan du downloade alle patches på én gang, vælge hvilke du vil bruge og gemme valget.\n\nDa vi ikke udvikler cheats/patches,\nvenligst rapporter problemer til cheat-udvikleren.\n\nHar du lavet en ny cheat? Besøg:\nhttps://github.com/shadps4-emu/ps4_cheats + + + + No Image Available + Ingen billede tilgængelig + + + + Serial: + Serienummer: + + + + Version: + Version: + + + + Size: + Størrelse: + + + + Select Cheat File: + Vælg snyd-fil: + + + + Repository: + Repository: + + + + Download Cheats + Hent snyd + + + + Delete File + Slet fil + + + + No files selected. + Ingen filer valgt. + + + + You can delete the cheats you don't want after downloading them. + Du kan slette de snyd, du ikke ønsker, efter at have hentet dem. + + + + Do you want to delete the selected file?\n%1 + Ønsker du at slette den valgte fil?\n%1 + + + + Select Patch File: + Vælg patch-fil: + + + + Download Patches + Hent patches + + + + Save + Gem + + + + Cheats + Snyd + + + + Patches + Patches + + + + Error + Fejl + + + + No patch selected. + Ingen patch valgt. + + + + Unable to open files.json for reading. + Kan ikke åbne files.json til læsning. + + + + No patch file found for the current serial. + Ingen patch-fil fundet for det nuværende serienummer. + + + + Unable to open the file for reading. + Kan ikke åbne filen til læsning. + + + + Unable to open the file for writing. + Kan ikke åbne filen til skrivning. + + + + Failed to parse XML: + Kunne ikke analysere XML: + + + + Success + Succes + + + + Options saved successfully. + Indstillinger gemt med succes. + + + + Invalid Source + Ugyldig kilde + + + + The selected source is invalid. + Den valgte kilde er ugyldig. + + + + File Exists + Fil findes + + + + File already exists. Do you want to replace it? + Filen findes allerede. Vil du erstatte den? + + + + Failed to save file: + Kunne ikke gemme fil: + + + + Failed to download file: + Kunne ikke hente fil: + + + + Cheats Not Found + Snyd ikke fundet + + + + CheatsNotFound_MSG + Ingen snyd fundet til dette spil i denne version af det valgte repository, prøv et andet repository eller en anden version af spillet. + + + + Cheats Downloaded Successfully + Snyd hentet med succes + + + + CheatsDownloadedSuccessfully_MSG + Du har succesfuldt hentet snyd for denne version af spillet fra det valgte repository. Du kan prøve at hente fra et andet repository, hvis det er tilgængeligt, vil det også være muligt at bruge det ved at vælge filen fra listen. + + + + Failed to save: + Kunne ikke gemme: + + + + Failed to download: + Kunne ikke hente: + + + + Download Complete + Download fuldført + + + + DownloadComplete_MSG + Patcher hentet med succes! Alle patches til alle spil er blevet hentet, der er ikke behov for at hente dem individuelt for hvert spil, som det sker med snyd. + + + + Failed to parse JSON data from HTML. + Kunne ikke analysere JSON-data fra HTML. + + + + Failed to retrieve HTML page. + Kunne ikke hente HTML-side. + + + + Failed to open file: + Kunne ikke åbne fil: + + + + XML ERROR: + XML FEJL: + + + + Failed to open files.json for writing + Kunne ikke åbne files.json til skrivning + + + + Author: + Forfatter: + + + + Directory does not exist: + Mappe findes ikke: + + + + Failed to open files.json for reading. + Kunne ikke åbne files.json til læsning. + + + + Name: + Navn: + \ No newline at end of file diff --git a/src/qt_gui/translations/de.ts b/src/qt_gui/translations/de.ts index 1ff204df9..6183c812d 100644 --- a/src/qt_gui/translations/de.ts +++ b/src/qt_gui/translations/de.ts @@ -81,67 +81,72 @@ GuiContextMenus - + Create Shortcut Create Shortcut - + Open Game Folder Open Game Folder - + + Cheats / Patches + Cheats / Patches + + + SFO Viewer SFO Viewer - + Trophy Viewer Trophy Viewer - + Copy info Copy info - + Copy Name Copy Name - + Copy Serial Copy Serial - + Copy All Copy All - + Shortcut creation Shortcut creation - + Shortcut created successfully!\n %1 Shortcut created successfully!\n %1 - + Error Error - + Error creating shortcut!\n %1 Error creating shortcut!\n %1 - + Install PKG Install PKG @@ -248,6 +253,11 @@ Game Install Directory Game Install Directory + + + Download Cheats/Patches + Cheats / Patches herunterladen + Dump Game List @@ -487,5 +497,396 @@ Enable RenderDoc Debugging Enable RenderDoc Debugging + + + MainWindow + + + * Unsupported Vulkan Version + * Nicht unterstützte Vulkan-Version + + + + Download Cheats For All Installed Games + Cheats für alle installierten Spiele herunterladen + + + + Download Patches For All Games + Patches für alle Spiele herunterladen + + + + Download Complete + Download abgeschlossen + + + + You have downloaded cheats for all the games you have installed. + Sie haben Cheats für alle installierten Spiele heruntergeladen. + + + + Patches Downloaded Successfully! + Patches erfolgreich heruntergeladen! + + + + All Patches available for all games have been downloaded. + Alle Patches für alle Spiele wurden heruntergeladen. + + + + Games: + Spiele: + + + + PKG File (*.PKG) + PKG-Datei (*.PKG) + + + + ELF files (*.bin *.elf *.oelf) + ELF-Dateien (*.bin *.elf *.oelf) + + + + Game Boot + Spiel-Start + + + + Only one file can be selected! + Es kann nur eine Datei ausgewählt werden! + + + + PKG Extraction + PKG-Extraktion + + + + Patch detected!\nPKG and Game versions match!: %1\nWould you like + Patch erkannt!\nPKG- und Spielversion stimmen überein!: %1\nMöchten Sie + + + + to overwrite? + überschreiben? + + + + Patch detected!\nPKG Version %1 is older + Patch erkannt!\nPKG-Version %1 ist älter + + + + than installed version!: %2\nWould you like + als die installierte Version!: %2\nMöchten Sie + + + + to overwrite? + überschreiben? + + + + Patch detected!\nGame is installed: %1\nWould you like + Patch erkannt!\nSpiel ist installiert: %1\nMöchten Sie + + + + to install Patch: %2? + Patch installieren: %2? + + + + Game already installed\n%1\nWould you like to overwrite? + Spiel bereits installiert\n%1\nMöchten Sie überschreiben? + + + + PKG is a patch, please install the game first! + PKG ist ein Patch, bitte installieren Sie zuerst das Spiel! + + + + PKG ERROR + PKG-ERROR + + + + Extracting PKG %1/%2 + Extrahiere PKG %1/%2 + + + + Extraction Finished + Extraktion abgeschlossen + + + + Game successfully installed at %1 + Spiel erfolgreich installiert auf %1 + + + + File doesn't appear to be a valid PKG file + Die Datei scheint keine gültige PKG-Datei zu sein + + + + CheatsPatches + + + Cheats / Patches + Cheats / Patches + + + + defaultTextEdit_MSG + Cheats/Patches sind experimentell.\nVerwenden Sie sie mit Vorsicht.\n\nLaden Sie Cheats einzeln herunter, indem Sie das Repository auswählen und auf die Download-Schaltfläche klicken.\nAuf der Registerkarte Patches können Sie alle Patches auf einmal herunterladen, auswählen, welche Sie verwenden möchten, und die Auswahl speichern.\n\nDa wir die Cheats/Patches nicht entwickeln,\nbitte melden Sie Probleme an den Cheat-Autor.\n\nHaben Sie einen neuen Cheat erstellt? Besuchen Sie:\nhttps://github.com/shadps4-emu/ps4_cheats + + + + No Image Available + Kein Bild verfügbar + + + + Serial: + Seriennummer: + + + + Version: + Version: + + + + Size: + Größe: + + + + Select Cheat File: + Cheat-Datei auswählen: + + + + Repository: + Repository: + + + + Download Cheats + Cheats herunterladen + + + + Delete File + Datei löschen + + + + No files selected. + Keine Dateien ausgewählt. + + + + You can delete the cheats you don't want after downloading them. + Sie können die Cheats, die Sie nicht möchten, nach dem Herunterladen löschen. + + + + Do you want to delete the selected file?\n%1 + Wollen Sie die ausgewählte Datei löschen?\n%1 + + + + Select Patch File: + Patch-Datei auswählen: + + + + Download Patches + Patches herunterladen + + + + Save + Speichern + + + + Cheats + Cheats + + + + Patches + Patches + + + + Error + Fehler + + + + No patch selected. + Kein Patch ausgewählt. + + + + Unable to open files.json for reading. + Kann files.json nicht zum Lesen öffnen. + + + + No patch file found for the current serial. + Keine Patch-Datei für die aktuelle Seriennummer gefunden. + + + + Unable to open the file for reading. + Kann die Datei nicht zum Lesen öffnen. + + + + Unable to open the file for writing. + Kann die Datei nicht zum Schreiben öffnen. + + + + Failed to parse XML: + Fehler beim Parsen von XML: + + + + Success + Erfolg + + + + Options saved successfully. + Optionen erfolgreich gespeichert. + + + + Invalid Source + Ungültige Quelle + + + + The selected source is invalid. + Die ausgewählte Quelle ist ungültig. + + + + File Exists + Datei existiert + + + + File already exists. Do you want to replace it? + Datei existiert bereits. Möchten Sie sie ersetzen? + + + + Failed to save file: + Fehler beim Speichern der Datei: + + + + Failed to download file: + Fehler beim Herunterladen der Datei: + + + + Cheats Not Found + Cheats nicht gefunden + + + + CheatsNotFound_MSG + Keine Cheats für dieses Spiel in dieser Version des gewählten Repositories gefunden. Versuchen Sie es mit einem anderen Repository oder einer anderen Version des Spiels. + + + + Cheats Downloaded Successfully + Cheats erfolgreich heruntergeladen + + + + CheatsDownloadedSuccessfully_MSG + Sie haben erfolgreich Cheats für diese Version des Spiels aus dem gewählten Repository heruntergeladen. Sie können versuchen, von einem anderen Repository herunterzuladen. Wenn verfügbar, können Sie es auswählen, indem Sie die Datei aus der Liste auswählen. + + + + Failed to save: + Speichern fehlgeschlagen: + + + + Failed to download: + Herunterladen fehlgeschlagen: + + + + Download Complete + Download abgeschlossen + + + + DownloadComplete_MSG + Patches erfolgreich heruntergeladen! Alle Patches für alle Spiele wurden heruntergeladen, es ist nicht notwendig, sie einzeln für jedes Spiel herunterzuladen, wie es bei Cheats der Fall ist. + + + + Failed to parse JSON data from HTML. + Fehler beim Parsen der JSON-Daten aus HTML. + + + + Failed to retrieve HTML page. + Fehler beim Abrufen der HTML-Seite. + + + + Failed to open file: + Fehler beim Öffnen der Datei: + + + + XML ERROR: + XML-Fehler: + + + + Failed to open files.json for writing + Kann files.json nicht zum Schreiben öffnen + + + + Author: + Autor: + + + + Directory does not exist: + Verzeichnis existiert nicht: + + + + Failed to open files.json for reading. + Kann files.json nicht zum Lesen öffnen. + + + + Name: + Name: + \ No newline at end of file diff --git a/src/qt_gui/translations/el.ts b/src/qt_gui/translations/el.ts index b015954e6..5d4a15d8a 100644 --- a/src/qt_gui/translations/el.ts +++ b/src/qt_gui/translations/el.ts @@ -81,67 +81,72 @@ GuiContextMenus - + Create Shortcut Create Shortcut - + Open Game Folder Open Game Folder - + + Cheats / Patches + Kodikí / Enimeróseis + + + SFO Viewer SFO Viewer - + Trophy Viewer Trophy Viewer - + Copy info Copy info - + Copy Name Copy Name - + Copy Serial Copy Serial - + Copy All Copy All - + Shortcut creation Shortcut creation - + Shortcut created successfully!\n %1 Shortcut created successfully!\n %1 - + Error Error - + Error creating shortcut!\n %1 Error creating shortcut!\n %1 - + Install PKG Install PKG @@ -248,6 +253,11 @@ Game Install Directory Game Install Directory + + + Download Cheats/Patches + Κατεβάστε Κωδικούς / Ενημερώσεις + Dump Game List @@ -487,5 +497,396 @@ Enable RenderDoc Debugging Enable RenderDoc Debugging + + + MainWindow + + + * Unsupported Vulkan Version + * Μη υποστηριζόμενη έκδοση Vulkan + + + + Download Cheats For All Installed Games + Λήψη Cheats για όλα τα εγκατεστημένα παιχνίδια + + + + Download Patches For All Games + Λήψη Patches για όλα τα παιχνίδια + + + + Download Complete + Η λήψη ολοκληρώθηκε + + + + You have downloaded cheats for all the games you have installed. + Έχετε κατεβάσει cheats για όλα τα εγκατεστημένα παιχνίδια. + + + + Patches Downloaded Successfully! + Τα Patches κατέβηκαν επιτυχώς! + + + + All Patches available for all games have been downloaded. + Όλα τα διαθέσιμα Patches για όλα τα παιχνίδια έχουν κατέβει. + + + + Games: + Παιχνίδια: + + + + PKG File (*.PKG) + Αρχείο PKG (*.PKG) + + + + ELF files (*.bin *.elf *.oelf) + Αρχεία ELF (*.bin *.elf *.oelf) + + + + Game Boot + Εκκίνηση παιχνιδιού + + + + Only one file can be selected! + Μπορεί να επιλεγεί μόνο ένα αρχείο! + + + + PKG Extraction + Εξαγωγή PKG + + + + Patch detected!\nPKG and Game versions match!: %1\nWould you like + Ανίχνευση Patch!\nΟι εκδόσεις PKG και παιχνιδιού ταιριάζουν!: %1\nΘέλετε + + + + to overwrite? + να αντικαταστήσετε; + + + + Patch detected!\nPKG Version %1 is older + Ανίχνευση Patch!\nΗ έκδοση PKG %1 είναι παλαιότερη + + + + than installed version!: %2\nWould you like + από την εγκατεστημένη έκδοση!: %2\nΘέλετε + + + + to overwrite? + να αντικαταστήσετε; + + + + Patch detected!\nGame is installed: %1\nWould you like + Ανίχνευση Patch!\nΤο παιχνίδι είναι εγκατεστημένο: %1\nΘέλετε + + + + to install Patch: %2? + να εγκαταστήσετε το Patch: %2; + + + + Game already installed\n%1\nWould you like to overwrite? + Το παιχνίδι είναι ήδη εγκατεστημένο\n%1\nΘέλετε να αντικαταστήσετε; + + + + PKG is a patch, please install the game first! + Το PKG είναι patch, παρακαλώ εγκαταστήστε πρώτα το παιχνίδι! + + + + PKG ERROR + ΣΦΑΛΜΑ PKG + + + + Extracting PKG %1/%2 + Εξαγωγή PKG %1/%2 + + + + Extraction Finished + Η εξαγωγή ολοκληρώθηκε + + + + Game successfully installed at %1 + Το παιχνίδι εγκαταστάθηκε επιτυχώς στο %1 + + + + File doesn't appear to be a valid PKG file + Η αρχείο δεν φαίνεται να είναι έγκυρο αρχείο PKG + + + + CheatsPatches + + + Cheats / Patches + Cheats / Patches + + + + defaultTextEdit_MSG + Οι cheats/patches είναι πειραματικά.\nΧρησιμοποιήστε τα με προσοχή.\n\nΚατεβάστε τους cheats μεμονωμένα επιλέγοντας το αποθετήριο και κάνοντας κλικ στο κουμπί λήψης.\nΣτην καρτέλα Patches, μπορείτε να κατεβάσετε όλα τα patches ταυτόχρονα, να επιλέξετε ποια θέλετε να χρησιμοποιήσετε και να αποθηκεύσετε την επιλογή.\n\nΔεδομένου ότι δεν αναπτύσσουμε τους cheats/patches,\nπαρακαλώ αναφέρετε προβλήματα στον δημιουργό του cheat.\n\nΔημιουργήσατε ένα νέο cheat; Επισκεφθείτε:\nhttps://github.com/shadps4-emu/ps4_cheats + + + + No Image Available + Δεν διατίθεται εικόνα + + + + Serial: + Σειριακός αριθμός: + + + + Version: + Έκδοση: + + + + Size: + Μέγεθος: + + + + Select Cheat File: + Επιλέξτε αρχείο Cheat: + + + + Repository: + Αποθετήριο: + + + + Download Cheats + Λήψη Cheats + + + + Delete File + Διαγραφή αρχείου + + + + No files selected. + Δεν έχουν επιλεγεί αρχεία. + + + + You can delete the cheats you don't want after downloading them. + Μπορείτε να διαγράψετε τα cheats που δεν θέλετε μετά τη λήψη τους. + + + + Do you want to delete the selected file?\n%1 + Θέλετε να διαγράψετε το επιλεγμένο αρχείο;\n%1 + + + + Select Patch File: + Επιλέξτε αρχείο Patch: + + + + Download Patches + Λήψη Patches + + + + Save + Αποθήκευση + + + + Cheats + Cheats + + + + Patches + Patches + + + + Error + Σφάλμα + + + + No patch selected. + Δεν έχει επιλεγεί κανένα patch. + + + + Unable to open files.json for reading. + Αδυναμία ανοίγματος του files.json για ανάγνωση. + + + + No patch file found for the current serial. + Δεν βρέθηκε αρχείο patch για τον τρέχοντα σειριακό αριθμό. + + + + Unable to open the file for reading. + Αδυναμία ανοίγματος του αρχείου για ανάγνωση. + + + + Unable to open the file for writing. + Αδυναμία ανοίγματος του αρχείου για εγγραφή. + + + + Failed to parse XML: + Αποτυχία ανάλυσης XML: + + + + Success + Επιτυχία + + + + Options saved successfully. + Οι ρυθμίσεις αποθηκεύτηκαν επιτυχώς. + + + + Invalid Source + Μη έγκυρη Πηγή + + + + The selected source is invalid. + Η επιλεγμένη πηγή είναι μη έγκυρη. + + + + File Exists + Η αρχείο υπάρχει + + + + File already exists. Do you want to replace it? + Η αρχείο υπάρχει ήδη. Θέλετε να την αντικαταστήσετε; + + + + Failed to save file: + Αποτυχία αποθήκευσης αρχείου: + + + + Failed to download file: + Αποτυχία λήψης αρχείου: + + + + Cheats Not Found + Δεν βρέθηκαν Cheats + + + + CheatsNotFound_MSG + Δεν βρέθηκαν cheats για αυτό το παιχνίδι στην τρέχουσα έκδοση του επιλεγμένου αποθετηρίου. Δοκιμάστε να κατεβάσετε από άλλο αποθετήριο ή άλλη έκδοση του παιχνιδιού. + + + + Cheats Downloaded Successfully + Cheats κατεβάστηκαν επιτυχώς + + + + CheatsDownloadedSuccessfully_MSG + Κατεβάσατε επιτυχώς cheats για αυτή την έκδοση του παιχνιδιού από το επιλεγμένο αποθετήριο. Μπορείτε να δοκιμάσετε να κατεβάσετε από άλλο αποθετήριο. Αν είναι διαθέσιμο, μπορείτε να το επιλέξετε επιλέγοντας το αρχείο από τη λίστα. + + + + Failed to save: + Αποτυχία αποθήκευσης: + + + + Failed to download: + Αποτυχία λήψης: + + + + Download Complete + Η λήψη ολοκληρώθηκε + + + + DownloadComplete_MSG + Τα Patches κατεβάστηκαν επιτυχώς! Όλα τα Patches για όλα τα παιχνίδια έχουν κατέβει, δεν είναι απαραίτητο να τα κατεβάσετε ένα-ένα για κάθε παιχνίδι, όπως με τα Cheats. + + + + Failed to parse JSON data from HTML. + Αποτυχία ανάλυσης δεδομένων JSON από HTML. + + + + Failed to retrieve HTML page. + Αποτυχία ανάκτησης σελίδας HTML. + + + + Failed to open file: + Αποτυχία ανοίγματος αρχείου: + + + + XML ERROR: + ΣΦΑΛΜΑ XML: + + + + Failed to open files.json for writing + Αποτυχία ανοίγματος του files.json για εγγραφή + + + + Author: + Συγγραφέας: + + + + Directory does not exist: + Ο φάκελος δεν υπάρχει: + + + + Failed to open files.json for reading. + Αποτυχία ανοίγματος του files.json για ανάγνωση. + + + + Name: + Όνομα: + \ No newline at end of file diff --git a/src/qt_gui/translations/en.ts b/src/qt_gui/translations/en.ts index 5ceb11884..aa8a1a5d8 100644 --- a/src/qt_gui/translations/en.ts +++ b/src/qt_gui/translations/en.ts @@ -81,67 +81,72 @@ GuiContextMenus - + Create Shortcut Create Shortcut - + Open Game Folder Open Game Folder - + + Cheats / Patches + Cheats / Patches + + + SFO Viewer SFO Viewer - + Trophy Viewer Trophy Viewer - + Copy info Copy info - + Copy Name Copy Name - + Copy Serial Copy Serial - + Copy All Copy All - + Shortcut creation Shortcut creation - + Shortcut created successfully!\n %1 Shortcut created successfully!\n %1 - + Error Error - + Error creating shortcut!\n %1 Error creating shortcut!\n %1 - + Install PKG Install PKG @@ -248,6 +253,11 @@ Game Install Directory Game Install Directory + + + Download Cheats/Patches + Download Cheats / Patches + Dump Game List @@ -488,4 +498,395 @@ Enable RenderDoc Debugging + + MainWindow + + + * Unsupported Vulkan Version + * Unsupported Vulkan Version + + + + Download Cheats For All Installed Games + Download Cheats For All Installed Games + + + + Download Patches For All Games + Download Patches For All Games + + + + Download Complete + Download Complete + + + + You have downloaded cheats for all the games you have installed. + You have downloaded cheats for all the games you have installed. + + + + Patches Downloaded Successfully! + Patches Downloaded Successfully! + + + + All Patches available for all games have been downloaded. + All Patches available for all games have been downloaded. + + + + Games: + Games: + + + + PKG File (*.PKG) + PKG File (*.PKG) + + + + ELF files (*.bin *.elf *.oelf) + ELF files (*.bin *.elf *.oelf) + + + + Game Boot + Game Boot + + + + Only one file can be selected! + Only one file can be selected! + + + + PKG Extraction + PKG Extraction + + + + Patch detected!\nPKG and Game versions match!: %1\nWould you like + Patch detected!\nPKG and Game versions match!: %1\nWould you like + + + + to overwrite? + to overwrite? + + + + Patch detected!\nPKG Version %1 is older + Patch detected!\nPKG Version %1 is older + + + + than installed version!: %2\nWould you like + than installed version!: %2\nWould you like + + + + to overwrite? + to overwrite? + + + + Patch detected!\nGame is installed: %1\nWould you like + Patch detected!\nGame is installed: %1\nWould you like + + + + to install Patch: %2? + to install Patch: %2? + + + + Game already installed\n%1\nWould you like to overwrite? + Game already installed\n%1\nWould you like to overwrite? + + + + PKG is a patch, please install the game first! + PKG is a patch, please install the game first! + + + + PKG ERROR + PKG ERROR + + + + Extracting PKG %1/%2 + Extracting PKG %1/%2 + + + + Extraction Finished + Extraction Finished + + + + Game successfully installed at %1 + Game successfully installed at %1 + + + + File doesn't appear to be a valid PKG file + File doesn't appear to be a valid PKG file + + + + CheatsPatches + + + Cheats / Patches + Cheats / Patches + + + + defaultTextEdit_MSG + Cheats/Patches are experimental.\nUse with caution.\n\nDownload cheats individually by selecting the repository and clicking the download button.\nIn the Patches tab, you can download all patches at once, choose which ones you want to use, and save your selection.\n\nSince we do not develop the Cheats/Patches,\nplease report issues to the cheat author.\n\nCreated a new cheat? Visit:\nhttps://github.com/shadps4-emu/ps4_cheats + + + + No Image Available + No Image Available + + + + Serial: + Serial: + + + + Version: + Version: + + + + Size: + Size: + + + + Select Cheat File: + Select Cheat File: + + + + Repository: + Repository: + + + + Download Cheats + Download Cheats + + + + Delete File + Delete File + + + + No files selected. + No files selected. + + + + You can delete the cheats you don't want after downloading them. + You can delete the cheats you don't want after downloading them. + + + + Do you want to delete the selected file?\n%1 + Do you want to delete the selected file?\n%1 + + + + Select Patch File: + Select Patch File: + + + + Download Patches + Download Patches + + + + Save + Save + + + + Cheats + Cheats + + + + Patches + Patches + + + + Error + Error + + + + No patch selected. + No patch selected. + + + + Unable to open files.json for reading. + Unable to open files.json for reading. + + + + No patch file found for the current serial. + No patch file found for the current serial. + + + + Unable to open the file for reading. + Unable to open the file for reading. + + + + Unable to open the file for writing. + Unable to open the file for writing. + + + + Failed to parse XML: + Failed to parse XML: + + + + Success + Success + + + + Options saved successfully. + Options saved successfully. + + + + Invalid Source + Invalid Source + + + + The selected source is invalid. + The selected source is invalid. + + + + File Exists + File Exists + + + + File already exists. Do you want to replace it? + File already exists. Do you want to replace it? + + + + Failed to save file: + Failed to save file: + + + + Failed to download file: + Failed to download file: + + + + Cheats Not Found + Cheats Not Found + + + + CheatsNotFound_MSG + No Cheats found for this game in this version of the selected repository,try another repository or a different version of the game. + + + + Cheats Downloaded Successfully + Cheats Downloaded Successfully + + + + CheatsDownloadedSuccessfully_MSG + You have successfully downloaded the cheats for this version of the game from the selected repository. You can try downloading from another repository, if it is available it will also be possible to use it by selecting the file from the list. + + + + Failed to save: + Failed to save: + + + + Failed to download: + Failed to download: + + + + Download Complete + Download Complete + + + + DownloadComplete_MSG + Patches Downloaded Successfully! All Patches available for all games have been downloaded, there is no need to download them individually for each game as happens in Cheats. + + + + Failed to parse JSON data from HTML. + Failed to parse JSON data from HTML. + + + + Failed to retrieve HTML page. + Failed to retrieve HTML page. + + + + Failed to open file: + Failed to open file: + + + + XML ERROR: + XML ERROR: + + + + Failed to open files.json for writing + Failed to open files.json for writing + + + + Author: + Author: + + + + Directory does not exist: + Directory does not exist: + + + + Failed to open files.json for reading. + Failed to open files.json for reading. + + + + Name: + Name: + + \ No newline at end of file diff --git a/src/qt_gui/translations/es_ES.ts b/src/qt_gui/translations/es_ES.ts index 1b42b18e6..5b7ad4b6d 100644 --- a/src/qt_gui/translations/es_ES.ts +++ b/src/qt_gui/translations/es_ES.ts @@ -81,67 +81,72 @@ GuiContextMenus - + Create Shortcut Crear acceso directo - + Open Game Folder Abrir carpeta del juego - + + Cheats / Patches + Trucos / Parches + + + SFO Viewer Vista SFO - + Trophy Viewer Ver trofeos - + Copy info Copiar información - + Copy Name Copiar nombre - + Copy Serial Copiar serial - + Copy All Copiar todo - + Shortcut creation Acceso directo creado - + Shortcut created successfully!\n %1 ¡Acceso directo creado con éxito!\n %1 - + Error Error - + Error creating shortcut!\n %1 ¡Error al crear el acceso directo!\n %1 - + Install PKG Instalar PKG @@ -248,6 +253,11 @@ Game Install Directory Carpeta de instalación de los juegos + + + Download Cheats/Patches + Descargar Trucos / Parches + Dump Game List @@ -488,4 +498,395 @@ Habilitar depuración de RenderDoc - + + MainWindow + + + * Unsupported Vulkan Version + * Versión de Vulkan no soportada + + + + Download Cheats For All Installed Games + Descargar trucos para todos los juegos instalados + + + + Download Patches For All Games + Descargar parches para todos los juegos + + + + Download Complete + Descarga completa + + + + You have downloaded cheats for all the games you have installed. + Has descargado trucos para todos los juegos que tienes instalados. + + + + Patches Downloaded Successfully! + ¡Parches descargados exitosamente! + + + + All Patches available for all games have been downloaded. + Todos los parches disponibles para todos los juegos han sido descargados. + + + + Games: + Juegos: + + + + PKG File (*.PKG) + Archivo PKG (*.PKG) + + + + ELF files (*.bin *.elf *.oelf) + Archivos ELF (*.bin *.elf *.oelf) + + + + Game Boot + Inicio del juego + + + + Only one file can be selected! + ¡Solo se puede seleccionar un archivo! + + + + PKG Extraction + Extracción de PKG + + + + Patch detected!\nPKG and Game versions match!: %1\nWould you like + ¡Parche detectado!\n¡La versión de PKG y del juego coinciden!: %1\n¿Te gustaría + + + + to overwrite? + ¿sobrescribir? + + + + Patch detected!\nPKG Version %1 is older + ¡Parche detectado!\nLa versión de PKG %1 es más antigua + + + + than installed version!: %2\nWould you like + que la versión instalada!: %2\n¿Te gustaría + + + + to overwrite? + ¿sobrescribir? + + + + Patch detected!\nGame is installed: %1\nWould you like + ¡Parche detectado!\nJuego está instalado: %1\n¿Te gustaría + + + + to install Patch: %2? + ¿instalar el parche: %2? + + + + Game already installed\n%1\nWould you like to overwrite? + Juego ya instalado\n%1\n¿Te gustaría sobrescribirlo? + + + + PKG is a patch, please install the game first! + PKG es un parche, ¡por favor instala el juego primero! + + + + PKG ERROR + ERROR PKG + + + + Extracting PKG %1/%2 + Extrayendo PKG %1/%2 + + + + Extraction Finished + Extracción terminada + + + + Game successfully installed at %1 + Juego instalado exitosamente en %1 + + + + File doesn't appear to be a valid PKG file + El archivo no parece ser un archivo PKG válido + + + + CheatsPatches + + + Cheats / Patches + Trucos / Parches + + + + defaultTextEdit_MSG + Los cheats/patches son experimentales.\nÚselos con precaución.\n\nDescargue los cheats individualmente seleccionando el repositorio y haciendo clic en el botón de descarga.\nEn la pestaña Patches, puede descargar todos los patches a la vez, elegir cuáles desea usar y guardar la selección.\n\nComo no desarrollamos los Cheats/Patches,\npor favor informe los problemas al autor del cheat.\n\n¿Creaste un nuevo cheat? Visita:\nhttps://github.com/shadps4-emu/ps4_cheats + + + + No Image Available + No hay imagen disponible + + + + Serial: + Serie: + + + + Version: + Versión: + + + + Size: + Tamaño: + + + + Select Cheat File: + Seleccionar archivo de trucos: + + + + Repository: + Repositorio: + + + + Download Cheats + Descargar trucos + + + + Delete File + Eliminar archivo + + + + No files selected. + No se han seleccionado archivos. + + + + You can delete the cheats you don't want after downloading them. + Puedes eliminar los trucos que no quieras después de descargarlos. + + + + Do you want to delete the selected file?\n%1 + ¿Deseas eliminar el archivo seleccionado?\n%1 + + + + Select Patch File: + Seleccionar archivo de parche: + + + + Download Patches + Descargar parches + + + + Save + Guardar + + + + Cheats + Trucos + + + + Patches + Parche + + + + Error + Error + + + + No patch selected. + No se ha seleccionado ningún parche. + + + + Unable to open files.json for reading. + No se puede abrir files.json para lectura. + + + + No patch file found for the current serial. + No se encontró ningún archivo de parche para la serie actual. + + + + Unable to open the file for reading. + No se puede abrir el archivo para lectura. + + + + Unable to open the file for writing. + No se puede abrir el archivo para escritura. + + + + Failed to parse XML: + Error al analizar XML: + + + + Success + Éxito + + + + Options saved successfully. + Opciones guardadas exitosamente. + + + + Invalid Source + Fuente inválida + + + + The selected source is invalid. + La fuente seleccionada es inválida. + + + + File Exists + El archivo ya existe + + + + File already exists. Do you want to replace it? + El archivo ya existe. ¿Deseas reemplazarlo? + + + + Failed to save file: + Error al guardar el archivo: + + + + Failed to download file: + Error al descargar el archivo: + + + + Cheats Not Found + Trucos no encontrados + + + + CheatsNotFound_MSG + No se encontraron trucos para este juego en esta versión del repositorio seleccionado,intenta con otro repositorio o con una versión diferente del juego. + + + + Cheats Downloaded Successfully + Trucos descargados exitosamente + + + + CheatsDownloadedSuccessfully_MSG + Has descargado exitosamente los trucos para esta versión del juego desde el repositorio seleccionado. Puedes intentar descargar desde otro repositorio; si está disponible, también será posible usarlo seleccionando el archivo de la lista. + + + + Failed to save: + Error al guardar: + + + + Failed to download: + Error al descargar: + + + + Download Complete + Descarga completa + + + + DownloadComplete_MSG + ¡Parches descargados exitosamente! Todos los parches disponibles para todos los juegos han sido descargados, no es necesario descargarlos individualmente para cada juego como ocurre con los trucos. + + + + Failed to parse JSON data from HTML. + Error al analizar los datos JSON del HTML. + + + + Failed to retrieve HTML page. + Error al recuperar la página HTML. + + + + Failed to open file: + Error al abrir el archivo: + + + + XML ERROR: + ERROR XML: + + + + Failed to open files.json for writing + Error al abrir files.json para escritura + + + + Author: + Autor: + + + + Directory does not exist: + El directorio no existe: + + + + Failed to open files.json for reading. + Error al abrir files.json para lectura. + + + + Name: + Nombre: + + + \ No newline at end of file diff --git a/src/qt_gui/translations/fi.ts b/src/qt_gui/translations/fi.ts index af605d641..70345efbe 100644 --- a/src/qt_gui/translations/fi.ts +++ b/src/qt_gui/translations/fi.ts @@ -81,67 +81,72 @@ GuiContextMenus - + Create Shortcut Create Shortcut - + Open Game Folder Open Game Folder - + + Cheats / Patches + Huijaukset / Korjaukset + + + SFO Viewer SFO Viewer - + Trophy Viewer Trophy Viewer - + Copy info Copy info - + Copy Name Copy Name - + Copy Serial Copy Serial - + Copy All Copy All - + Shortcut creation Shortcut creation - + Shortcut created successfully!\n %1 Shortcut created successfully!\n %1 - + Error Error - + Error creating shortcut!\n %1 Error creating shortcut!\n %1 - + Install PKG Install PKG @@ -248,6 +253,11 @@ Game Install Directory Game Install Directory + + + Download Cheats/Patches + Lataa Huijaukset / Korjaukset + Dump Game List @@ -488,4 +498,395 @@ Enable RenderDoc Debugging + + MainWindow + + + * Unsupported Vulkan Version + * Tuettu Vulkan-versio + + + + Download Cheats For All Installed Games + Lataa huijaukset kaikille asennetuille peleille + + + + Download Patches For All Games + Lataa korjaukset kaikille peleille + + + + Download Complete + Lataus valmis + + + + You have downloaded cheats for all the games you have installed. + Olet ladannut huijaukset kaikkiin asennettuihin peleihin. + + + + Patches Downloaded Successfully! + Korjaukset ladattu onnistuneesti! + + + + All Patches available for all games have been downloaded. + Kaikki saatavilla olevat korjaukset kaikille peleille on ladattu. + + + + Games: + Pelit: + + + + PKG File (*.PKG) + PKG-tiedosto (*.PKG) + + + + ELF files (*.bin *.elf *.oelf) + ELF-tiedostot (*.bin *.elf *.oelf) + + + + Game Boot + Pelin käynnistys + + + + Only one file can be selected! + Vain yksi tiedosto voidaan valita! + + + + PKG Extraction + PKG:n purku + + + + Patch detected!\nPKG and Game versions match!: %1\nWould you like + Korjaus havaittu!\nPKG:n ja pelin versiot vastaavat!: %1\nHaluatko + + + + to overwrite? + korvata? + + + + Patch detected!\nPKG Version %1 is older + Korjaus havaittu!\nPKG Version %1 on vanhempi + + + + than installed version!: %2\nWould you like + kuin asennettu versio!: %2\nHaluatko + + + + to overwrite? + korvata? + + + + Patch detected!\nGame is installed: %1\nWould you like + Korjaus havaittu!\nPeli on asennettu: %1\nHaluatko + + + + to install Patch: %2? + asentaa korjaus: %2? + + + + Game already installed\n%1\nWould you like to overwrite? + Peli on jo asennettu\n%1\nHaluatko korvata sen? + + + + PKG is a patch, please install the game first! + PKG on korjaus, asenna peli ensin! + + + + PKG ERROR + PKG VIRHE + + + + Extracting PKG %1/%2 + Purkaminen PKG %1/%2 + + + + Extraction Finished + Purku valmis + + + + Game successfully installed at %1 + Peli asennettu onnistuneesti kohtaan %1 + + + + File doesn't appear to be a valid PKG file + Tiedosto ei vaikuta olevan kelvollinen PKG-tiedosto + + + + CheatsPatches + + + Cheats / Patches + Huijaukset / Korjaukset + + + + defaultTextEdit_MSG + Cheats/Patches ovat kokeellisia.\nKäytä varoen.\n\nLataa cheats yksitellen valitsemalla repositorio ja napsauttamalla latauspainiketta.\nPatches-välilehdellä voit ladata kaikki patchit kerralla, valita, mitä haluat käyttää, ja tallentaa valinnan.\n\nKoska emme kehitä Cheats/Patches,\nilmoita ongelmista cheatin tekijälle.\n\nLuo uusi cheat? Käy osoitteessa:\nhttps://github.com/shadps4-emu/ps4_cheats + + + + No Image Available + Kuvaa ei saatavilla + + + + Serial: + Sarjanumero: + + + + Version: + Versio: + + + + Size: + Koko: + + + + Select Cheat File: + Valitse huijaustiedosto: + + + + Repository: + Repo: + + + + Download Cheats + Lataa huijaukset + + + + Delete File + Poista tiedosto + + + + No files selected. + Ei tiedostoja valittu. + + + + You can delete the cheats you don't want after downloading them. + Voit poistaa ei-toivomasi huijaukset lataamisen jälkeen. + + + + Do you want to delete the selected file?\n%1 + Haluatko poistaa valitun tiedoston?\n%1 + + + + Select Patch File: + Valitse korjaustiedosto: + + + + Download Patches + Lataa korjaukset + + + + Save + Tallenna + + + + Cheats + Huijaukset + + + + Patches + Korjaukset + + + + Error + Virhe + + + + No patch selected. + Ei korjausta valittu. + + + + Unable to open files.json for reading. + Tiedostoa files.json ei voitu avata lukemista varten. + + + + No patch file found for the current serial. + Nykyiselle sarjanumerolle ei löytynyt korjaustiedostoa. + + + + Unable to open the file for reading. + Tiedostoa ei voitu avata lukemista varten. + + + + Unable to open the file for writing. + Tiedostoa ei voitu avata kirjoittamista varten. + + + + Failed to parse XML: + XML:n jäsentäminen epäonnistui: + + + + Success + Onnistui + + + + Options saved successfully. + Vaihtoehdot tallennettu onnistuneesti. + + + + Invalid Source + Virheellinen lähde + + + + The selected source is invalid. + Valittu lähde on virheellinen. + + + + File Exists + Tiedosto on olemassa + + + + File already exists. Do you want to replace it? + Tiedosto on jo olemassa. Haluatko korvata sen? + + + + Failed to save file: + Tiedoston tallentaminen epäonnistui: + + + + Failed to download file: + Tiedoston lataaminen epäonnistui: + + + + Cheats Not Found + Huijauksia ei löytynyt + + + + CheatsNotFound_MSG + Huijauksia ei löytynyt tälle pelille tämän version valitusta repositoriosta, yritä toista repositoriota tai pelin eri versiota. + + + + Cheats Downloaded Successfully + Huijaukset ladattu onnistuneesti + + + + CheatsDownloadedSuccessfully_MSG + Olet ladannut huijaukset onnistuneesti valitusta repositoriosta tälle pelin versiolle. Voit yrittää ladata toisesta repositoriosta, jos se on saatavilla, voit myös käyttää sitä valitsemalla tiedoston luettelosta. + + + + Failed to save: + Tallentaminen epäonnistui: + + + + Failed to download: + Lataaminen epäonnistui: + + + + Download Complete + Lataus valmis + + + + DownloadComplete_MSG + Korjaukset ladattu onnistuneesti! Kaikki saatavilla olevat korjaukset kaikille peleille on ladattu, eikä niitä tarvitse ladata yksittäin jokaiselle pelille kuten huijauksissa. + + + + Failed to parse JSON data from HTML. + JSON-tietojen jäsentäminen HTML:stä epäonnistui. + + + + Failed to retrieve HTML page. + HTML-sivun hakeminen epäonnistui. + + + + Failed to open file: + Tiedoston avaaminen epäonnistui: + + + + XML ERROR: + XML VIRHE: + + + + Failed to open files.json for writing + Tiedostoa files.json ei voitu avata kirjoittamista varten + + + + Author: + Tekijä: + + + + Directory does not exist: + Kansiota ei ole olemassa: + + + + Failed to open files.json for reading. + Tiedostoa files.json ei voitu avata lukemista varten. + + + + Name: + Nimi: + + \ No newline at end of file diff --git a/src/qt_gui/translations/fr.ts b/src/qt_gui/translations/fr.ts index 3f3b38baf..56d316092 100644 --- a/src/qt_gui/translations/fr.ts +++ b/src/qt_gui/translations/fr.ts @@ -81,67 +81,72 @@ GuiContextMenus - + Create Shortcut Créer un raccourci - + Open Game Folder Ouvrir le dossier du jeu - + + Cheats / Patches + Trucs / Patchs + + + SFO Viewer Visionneuse SFO - + Trophy Viewer Visionneuse de trophées - + Copy info Copier les informations - + Copy Name Copier le nom - + Copy Serial Copier le numéro de série - + Copy All Copier tout - + Shortcut creation Création du raccourci - + Shortcut created successfully!\n %1 Raccourci créé avec succès!\n %1 - + Error Erreur - + Error creating shortcut!\n %1 Erreur lors de la création du raccourci!\n %1 - + Install PKG Installer un PKG @@ -248,6 +253,11 @@ Game Install Directory Répertoire des jeux + + + Download Cheats/Patches + Télécharger Trucs / Patchs + Dump Game List @@ -487,5 +497,396 @@ Enable RenderDoc Debugging Activer le débogage RenderDoc + + + MainWindow + + + * Unsupported Vulkan Version + * Version Vulkan non prise en charge + + + + Download Cheats For All Installed Games + Télécharger les cheats pour tous les jeux installés + + + + Download Patches For All Games + Télécharger les patches pour tous les jeux + + + + Download Complete + Téléchargement terminé + + + + You have downloaded cheats for all the games you have installed. + Vous avez téléchargé des cheats pour tous les jeux que vous avez installés. + + + + Patches Downloaded Successfully! + Patches téléchargés avec succès ! + + + + All Patches available for all games have been downloaded. + Tous les patches disponibles pour tous les jeux ont été téléchargés. + + + + Games: + Jeux : + + + + PKG File (*.PKG) + Fichier PKG (*.PKG) + + + + ELF files (*.bin *.elf *.oelf) + Fichiers ELF (*.bin *.elf *.oelf) + + + + Game Boot + Boot du jeu + + + + Only one file can be selected! + Un seul fichier peut être sélectionné ! + + + + PKG Extraction + Extraction PKG + + + + Patch detected!\nPKG and Game versions match!: %1\nWould you like + Patch détecté !\nLes versions PKG et Jeu correspondent : %1\nSouhaitez-vous + + + + to overwrite? + écraser ? + + + + Patch detected!\nPKG Version %1 is older + Patch détecté !\nVersion PKG %1 est plus ancienne + + + + than installed version!: %2\nWould you like + que la version installée ! : %2\nSouhaitez-vous + + + + to overwrite? + écraser ? + + + + Patch detected!\nGame is installed: %1\nWould you like + Patch détecté !\nJeu est installé : %1\nSouhaitez-vous + + + + to install Patch: %2? + installer le patch : %2 ? + + + + Game already installed\n%1\nWould you like to overwrite? + Jeu déjà installé\n%1\nSouhaitez-vous écraser ? + + + + PKG is a patch, please install the game first! + PKG est un patch, veuillez d'abord installer le jeu ! + + + + PKG ERROR + ERREUR PKG + + + + Extracting PKG %1/%2 + Extraction PKG %1/%2 + + + + Extraction Finished + Extraction terminée + + + + Game successfully installed at %1 + Jeu installé avec succès à %1 + + + + File doesn't appear to be a valid PKG file + Le fichier ne semble pas être un fichier PKG valide + + + CheatsPatches + + + Cheats / Patches + Cheats / Patches + + + + defaultTextEdit_MSG + Les cheats/patches sont expérimentaux.\nUtilisez-les avec précaution.\n\nTéléchargez les cheats individuellement en sélectionnant le dépôt et en cliquant sur le bouton de téléchargement.\nDans l'onglet Patches, vous pouvez télécharger tous les patches en une seule fois, choisir lesquels vous souhaitez utiliser et enregistrer votre sélection.\n\nComme nous ne développons pas les Cheats/Patches,\nmerci de signaler les problèmes à l'auteur du cheat.\n\nVous avez créé un nouveau cheat ? Visitez :\nhttps://github.com/shadps4-emu/ps4_cheats + + + + No Image Available + Aucune image disponible + + + + Serial: + Série : + + + + Version: + Version : + + + + Size: + Taille : + + + + Select Cheat File: + Sélectionner le fichier de cheat : + + + + Repository: + Dépôt : + + + + Download Cheats + Télécharger les cheats + + + + Delete File + Supprimer le fichier + + + + No files selected. + Aucun fichier sélectionné. + + + + You can delete the cheats you don't want after downloading them. + Vous pouvez supprimer les cheats que vous ne souhaitez pas après les avoir téléchargés. + + + + Do you want to delete the selected file?\n%1 + Voulez-vous supprimer le fichier sélectionné ?\n%1 + + + + Select Patch File: + Sélectionner le fichier de patch : + + + + Download Patches + Télécharger les patches + + + + Save + Enregistrer + + + + Cheats + Cheats + + + + Patches + Patchs + + + + Error + Erreur + + + + No patch selected. + Aucun patch sélectionné. + + + + Unable to open files.json for reading. + Impossible d'ouvrir files.json pour la lecture. + + + + No patch file found for the current serial. + Aucun fichier de patch trouvé pour la série actuelle. + + + + Unable to open the file for reading. + Impossible d'ouvrir le fichier pour la lecture. + + + + Unable to open the file for writing. + Impossible d'ouvrir le fichier pour l'écriture. + + + + Failed to parse XML: + Échec de l'analyse XML : + + + + Success + Succès + + + + Options saved successfully. + Options enregistrées avec succès. + + + + Invalid Source + Source invalide + + + + The selected source is invalid. + La source sélectionnée est invalide. + + + + File Exists + Le fichier existe + + + + File already exists. Do you want to replace it? + Le fichier existe déjà. Voulez-vous le remplacer ? + + + + Failed to save file: + Échec de l'enregistrement du fichier : + + + + Failed to download file: + Échec du téléchargement du fichier : + + + + Cheats Not Found + Cheats non trouvés + + + + CheatsNotFound_MSG + Aucun cheat trouvé pour ce jeu dans cette version du dépôt sélectionné,essayez un autre dépôt ou une version différente du jeu. + + + + Cheats Downloaded Successfully + Cheats téléchargés avec succès + + + + CheatsDownloadedSuccessfully_MSG + Vous avez téléchargé les cheats avec succès pour cette version du jeu depuis le dépôt sélectionné. Vous pouvez essayer de télécharger depuis un autre dépôt, si disponible, il sera également possible de l'utiliser en sélectionnant le fichier dans la liste. + + + + Failed to save: + Échec de l'enregistrement : + + + + Failed to download: + Échec du téléchargement : + + + + Download Complete + Téléchargement terminé + + + + DownloadComplete_MSG + Patchs téléchargés avec succès ! Tous les patches disponibles pour tous les jeux ont été téléchargés, il n'est pas nécessaire de les télécharger individuellement pour chaque jeu comme c'est le cas pour les cheats. + + + + Failed to parse JSON data from HTML. + Échec de l'analyse des données JSON à partir du HTML. + + + + Failed to retrieve HTML page. + Échec de la récupération de la page HTML. + + + + Failed to open file: + Échec de l'ouverture du fichier : + + + + XML ERROR: + ERREUR XML : + + + + Failed to open files.json for writing + Échec de l'ouverture de files.json pour l'écriture + + + + Author: + Auteur : + + + + Directory does not exist: + Répertoire n'existe pas : + + + + Failed to open files.json for reading. + Échec de l'ouverture de files.json pour la lecture. + + + + Name: + Nom : + + \ No newline at end of file diff --git a/src/qt_gui/translations/hu_HU.ts b/src/qt_gui/translations/hu_HU.ts index c6cc0bce2..e531df45c 100644 --- a/src/qt_gui/translations/hu_HU.ts +++ b/src/qt_gui/translations/hu_HU.ts @@ -89,6 +89,11 @@ Open Game Folder Játék Mappa Megnyitása + + + + Cheats / Patches + Csalások / Javítások @@ -247,6 +252,11 @@ Game Install Directory Játék Telepítési Mappa + + + + Download Cheats/Patches + Csalások / Javítások letöltése @@ -488,4 +498,395 @@ RenderDoc Debugolás Engedélyezése + + MainWindow + + + * Unsupported Vulkan Version + * Támogatott Vulkan verzió hiányzik + + + + Download Cheats For All Installed Games + Letöltés csalások minden telepített játékhoz + + + + Download Patches For All Games + Frissítések letöltése minden játékhoz + + + + Download Complete + Letöltés befejezve + + + + You have downloaded cheats for all the games you have installed. + Csalásokat töltöttél le az összes telepített játékhoz. + + + + Patches Downloaded Successfully! + Frissítések sikeresen letöltve! + + + + All Patches available for all games have been downloaded. + Az összes játékhoz elérhető frissítés letöltésre került. + + + + Games: + Játékok: + + + + PKG File (*.PKG) + PKG fájl (*.PKG) + + + + ELF files (*.bin *.elf *.oelf) + ELF fájlok (*.bin *.elf *.oelf) + + + + Game Boot + Játék indító + + + + Only one file can be selected! + Csak egy fájl választható ki! + + + + PKG Extraction + PKG kicsomagolás + + + + Patch detected!\nPKG and Game versions match!: %1\nWould you like + Javítás észlelve!\nA PKG és a játék verziók egyeznek: %1\nSzeretnéd + + + + to overwrite? + felülírni? + + + + Patch detected!\nPKG Version %1 is older + Javítás észlelve!\nA PKG verzió %1 régebbi + + + + than installed version!: %2\nWould you like + mint a telepített verzió: %2\nSzeretnéd + + + + to overwrite? + felülírni? + + + + Patch detected!\nGame is installed: %1\nWould you like + Javítás észlelve!\nA játék telepítve van: %1\nSzeretnéd + + + + to install Patch: %2? + a javítást telepíteni: %2? + + + + Game already installed\n%1\nWould you like to overwrite? + A játék már telepítve van\n%1\nSzeretnéd felülírni? + + + + PKG is a patch, please install the game first! + A PKG egy javítás, először telepítsd a játékot! + + + + PKG ERROR + PKG HIBA + + + + Extracting PKG %1/%2 + PKG kicsomagolása %1/%2 + + + + Extraction Finished + Kicsomagolás befejezve + + + + Game successfully installed at %1 + A játék sikeresen telepítve itt: %1 + + + + File doesn't appear to be a valid PKG file + A fájl nem tűnik érvényes PKG fájlnak + + + + CheatsPatches + + + Cheats / Patches + Csalások / Javítások + + + + defaultTextEdit_MSG + A csalások/patchek kísérleti jellegűek.\nHasználja őket óvatosan.\n\nTöltse le a csalásokat egyesével a repository kiválasztásával és a letöltés gombra kattintással.\nA Patches fül alatt egyszerre letöltheti az összes patchet, választhat, melyeket szeretné használni, és elmentheti a választását.\n\nMivel nem fejlesztjük a csalásokat/patch-eket,\nkérjük, jelentse a problémákat a csalás szerzőjének.\n\nKészített egy új csalást? Látogasson el ide:\nhttps://github.com/shadps4-emu/ps4_cheats + + + + No Image Available + Nincs elérhető kép + + + + Serial: + Sorozatszám: + + + + Version: + Verzió: + + + + Size: + Méret: + + + + Select Cheat File: + Válaszd ki a csalás fájlt: + + + + Repository: + Tároló: + + + + Download Cheats + Csalások letöltése + + + + Delete File + Fájl törlése + + + + No files selected. + Nincsenek kiválasztott fájlok. + + + + You can delete the cheats you don't want after downloading them. + Törölheted a nem kívánt csalásokat a letöltés után. + + + + Do you want to delete the selected file?\n%1 + Szeretnéd törölni a kiválasztott fájlt?\n%1 + + + + Select Patch File: + Válaszd ki a javítás fájlt: + + + + Download Patches + Javítások letöltése + + + + Save + Mentés + + + + Cheats + Csalások + + + + Patches + Javítások + + + + Error + Hiba + + + + No patch selected. + Nincs kiválasztva javítás. + + + + Unable to open files.json for reading. + Nem sikerült megnyitni a files.json fájlt olvasásra. + + + + No patch file found for the current serial. + Nincs található javítási fájl a jelenlegi sorozatszámhoz. + + + + Unable to open the file for reading. + Nem sikerült megnyitni a fájlt olvasásra. + + + + Unable to open the file for writing. + Nem sikerült megnyitni a fájlt írásra. + + + + Failed to parse XML: + XML elemzési hiba: + + + + Success + Siker + + + + Options saved successfully. + A beállítások sikeresen elmentve. + + + + Invalid Source + Érvénytelen forrás + + + + The selected source is invalid. + A kiválasztott forrás érvénytelen. + + + + File Exists + A fájl létezik + + + + File already exists. Do you want to replace it? + A fájl már létezik. Szeretnéd helyettesíteni? + + + + Failed to save file: + Nem sikerült elmenteni a fájlt: + + + + Failed to download file: + Nem sikerült letölteni a fájlt: + + + + Cheats Not Found + Csalások nem találhatóak + + + + CheatsNotFound_MSG + Nincs található csalás ezen a játékverzión ebben a kiválasztott tárolóban,próbálj meg egy másik tárolót vagy a játék egy másik verzióját. + + + + Cheats Downloaded Successfully + Csalások sikeresen letöltve + + + + CheatsDownloadedSuccessfully_MSG + Sikeresen letöltötted a csalásokat ennek a játéknak a verziójához a kiválasztott tárolóból. Próbálhatsz letölteni egy másik tárolóból is, ha az elérhető, akkor a fájl kiválasztásával az is használható lesz. + + + + Failed to save: + Nem sikerült menteni: + + + + Failed to download: + Nem sikerült letölteni: + + + + Download Complete + Letöltés befejezve + + + + DownloadComplete_MSG + Frissítések sikeresen letöltve! Minden elérhető frissítés letöltésre került, nem szükséges egyesével letölteni őket minden játékhoz, mint a csalások esetében. + + + + Failed to parse JSON data from HTML. + Nem sikerült az JSON adatok elemzése HTML-ből. + + + + Failed to retrieve HTML page. + Nem sikerült HTML oldal lekérése. + + + + Failed to open file: + Nem sikerült megnyitni a fájlt: + + + + XML ERROR: + XML HIBA: + + + + Failed to open files.json for writing + Nem sikerült megnyitni a files.json fájlt írásra + + + + Author: + Szerző: + + + + Directory does not exist: + A könyvtár nem létezik: + + + + Failed to open files.json for reading. + Nem sikerült megnyitni a files.json fájlt olvasásra. + + + + Name: + Név: + + diff --git a/src/qt_gui/translations/id.ts b/src/qt_gui/translations/id.ts index 502be21e6..dde590469 100644 --- a/src/qt_gui/translations/id.ts +++ b/src/qt_gui/translations/id.ts @@ -81,67 +81,72 @@ GuiContextMenus - + Create Shortcut Create Shortcut - + Open Game Folder Open Game Folder - + + Cheats / Patches + Cheat / Patch + + + SFO Viewer SFO Viewer - + Trophy Viewer Trophy Viewer - + Copy info Copy info - + Copy Name Copy Name - + Copy Serial Copy Serial - + Copy All Copy All - + Shortcut creation Shortcut creation - + Shortcut created successfully!\n %1 Shortcut created successfully!\n %1 - + Error Error - + Error creating shortcut!\n %1 Error creating shortcut!\n %1 - + Install PKG Install PKG @@ -248,6 +253,11 @@ Game Install Directory Game Install Directory + + + Download Cheats/Patches + Unduh Cheat / Patch + Dump Game List @@ -488,4 +498,395 @@ Enable RenderDoc Debugging + + MainWindow + + + * Unsupported Vulkan Version + * Versi Vulkan Tidak Didukung + + + + Download Cheats For All Installed Games + Unduh Cheat Untuk Semua Game Yang Terpasang + + + + Download Patches For All Games + Unduh Patch Untuk Semua Game + + + + Download Complete + Unduhan Selesai + + + + You have downloaded cheats for all the games you have installed. + Anda telah mengunduh cheat untuk semua game yang terpasang. + + + + Patches Downloaded Successfully! + Patch Berhasil Diunduh! + + + + All Patches available for all games have been downloaded. + Semua Patch yang tersedia untuk semua game telah diunduh. + + + + Games: + Game: + + + + PKG File (*.PKG) + File PKG (*.PKG) + + + + ELF files (*.bin *.elf *.oelf) + File ELF (*.bin *.elf *.oelf) + + + + Game Boot + Boot Game + + + + Only one file can be selected! + Hanya satu file yang bisa dipilih! + + + + PKG Extraction + Ekstraksi PKG + + + + Patch detected!\nPKG and Game versions match!: %1\nWould you like + Patch terdeteksi!\nVersi PKG dan Game cocok!: %1\nApakah Anda ingin + + + + to overwrite? + menimpa? + + + + Patch detected!\nPKG Version %1 is older + Patch terdeteksi!\nVersi PKG %1 lebih lama + + + + than installed version!: %2\nWould you like + daripada versi yang terpasang!: %2\nApakah Anda ingin + + + + to overwrite? + menimpa? + + + + Patch detected!\nGame is installed: %1\nWould you like + Patch terdeteksi!\nGame terpasang: %1\nApakah Anda ingin + + + + to install Patch: %2? + memasang Patch: %2? + + + + Game already installed\n%1\nWould you like to overwrite? + Game sudah terpasang\n%1\nApakah Anda ingin menimpa? + + + + PKG is a patch, please install the game first! + PKG adalah patch, harap pasang game terlebih dahulu! + + + + PKG ERROR + KESALAHAN PKG + + + + Extracting PKG %1/%2 + Mengekstrak PKG %1/%2 + + + + Extraction Finished + Ekstraksi Selesai + + + + Game successfully installed at %1 + Game berhasil dipasang di %1 + + + + File doesn't appear to be a valid PKG file + File tampaknya bukan file PKG yang valid + + + + CheatsPatches + + + Cheats / Patches + Cheat / Patch + + + + defaultTextEdit_MSG + Cheats/Patches bersifat eksperimental.\nGunakan dengan hati-hati.\n\nUnduh cheats satu per satu dengan memilih repositori dan mengklik tombol unduh.\nDi tab Patches, Anda dapat mengunduh semua patch sekaligus, memilih yang ingin digunakan, dan menyimpan pilihan Anda.\n\nKarena kami tidak mengembangkan Cheats/Patches,\nharap laporkan masalah kepada pembuat cheat.\n\nMembuat cheat baru? Kunjungi:\nhttps://github.com/shadps4-emu/ps4_cheats + + + + No Image Available + Tidak Ada Gambar Tersedia + + + + Serial: + Serial: + + + + Version: + Versi: + + + + Size: + Ukuran: + + + + Select Cheat File: + Pilih File Cheat: + + + + Repository: + Repositori: + + + + Download Cheats + Unduh Cheat + + + + Delete File + Hapus File + + + + No files selected. + Tidak ada file yang dipilih. + + + + You can delete the cheats you don't want after downloading them. + Anda dapat menghapus cheat yang tidak Anda inginkan setelah mengunduhnya. + + + + Do you want to delete the selected file?\n%1 + Apakah Anda ingin menghapus berkas yang dipilih?\n%1 + + + + Select Patch File: + Pilih File Patch: + + + + Download Patches + Unduh Patch + + + + Save + Simpan + + + + Cheats + Cheat + + + + Patches + Patch + + + + Error + Kesalahan + + + + No patch selected. + Tidak ada patch yang dipilih. + + + + Unable to open files.json for reading. + Tidak dapat membuka files.json untuk dibaca. + + + + No patch file found for the current serial. + Tidak ada file patch ditemukan untuk serial saat ini. + + + + Unable to open the file for reading. + Tidak dapat membuka file untuk dibaca. + + + + Unable to open the file for writing. + Tidak dapat membuka file untuk menulis. + + + + Failed to parse XML: + Gagal menganalisis XML: + + + + Success + Sukses + + + + Options saved successfully. + Opsi berhasil disimpan. + + + + Invalid Source + Sumber Tidak Valid + + + + The selected source is invalid. + Sumber yang dipilih tidak valid. + + + + File Exists + File Ada + + + + File already exists. Do you want to replace it? + File sudah ada. Apakah Anda ingin menggantinya? + + + + Failed to save file: + Gagal menyimpan file: + + + + Failed to download file: + Gagal mengunduh file: + + + + Cheats Not Found + Cheat Tidak Ditemukan + + + + CheatsNotFound_MSG + Cheat tidak ditemukan untuk game ini dalam versi repositori yang dipilih,cobalah repositori lain atau versi game yang berbeda. + + + + Cheats Downloaded Successfully + Cheat Berhasil Diunduh + + + + CheatsDownloadedSuccessfully_MSG + Anda telah berhasil mengunduh cheat untuk versi game ini dari repositori yang dipilih. Anda bisa mencoba mengunduh dari repositori lain, jika tersedia akan juga memungkinkan untuk menggunakannya dengan memilih file dari daftar. + + + + Failed to save: + Gagal menyimpan: + + + + Failed to download: + Gagal mengunduh: + + + + Download Complete + Unduhan Selesai + + + + DownloadComplete_MSG + Patch Berhasil Diunduh! Semua Patch yang tersedia untuk semua game telah diunduh, tidak perlu mengunduhnya satu per satu seperti yang terjadi pada Cheat. + + + + Failed to parse JSON data from HTML. + Gagal menganalisis data JSON dari HTML. + + + + Failed to retrieve HTML page. + Gagal mengambil halaman HTML. + + + + Failed to open file: + Gagal membuka file: + + + + XML ERROR: + KESALAHAN XML: + + + + Failed to open files.json for writing + Gagal membuka files.json untuk menulis + + + + Author: + Penulis: + + + + Directory does not exist: + Direktori tidak ada: + + + + Failed to open files.json for reading. + Gagal membuka files.json untuk dibaca. + + + + Name: + Nama: + + \ No newline at end of file diff --git a/src/qt_gui/translations/it.ts b/src/qt_gui/translations/it.ts index a47d36823..4cb050b70 100644 --- a/src/qt_gui/translations/it.ts +++ b/src/qt_gui/translations/it.ts @@ -81,67 +81,72 @@ GuiContextMenus - + Create Shortcut Crea scorciatoia - + Open Game Folder Apri cartella del gioco - + + Cheats / Patches + Trucchi / Patch + + + SFO Viewer Visualizzatore SFO - + Trophy Viewer Visualizzatore Trofei - + Copy info Copia informazioni - + Copy Name Copia Nome - + Copy Serial Copia Seriale - + Copy All Copia Tutto - + Shortcut creation Creazione scorciatoia - + Shortcut created successfully!\n %1 Scorciatoia creata con successo!\n %1 - + Error Errore - + Error creating shortcut!\n %1 Errore nella creazione della scorciatoia!\n %1 - + Install PKG Installa PKG @@ -248,6 +253,11 @@ Game Install Directory Cartella Installazione Giochi + + + Download Cheats/Patches + Scarica Trucchi / Patch + Dump Game List @@ -488,4 +498,395 @@ Abilita Debugging RenderDoc - + + MainWindow + + + * Unsupported Vulkan Version + * Versi Vulkan Tidak Didukung + + + + Download Cheats For All Installed Games + Unduh Cheat Untuk Semua Game yang Terinstal + + + + Download Patches For All Games + Unduh Patch Untuk Semua Game + + + + Download Complete + Unduhan Selesai + + + + You have downloaded cheats for all the games you have installed. + Anda telah mengunduh cheat untuk semua game yang telah Anda instal. + + + + Patches Downloaded Successfully! + Patch Berhasil Diunduh! + + + + All Patches available for all games have been downloaded. + Semua patch yang tersedia untuk semua game telah diunduh. + + + + Games: + Game: + + + + PKG File (*.PKG) + File PKG (*.PKG) + + + + ELF files (*.bin *.elf *.oelf) + File ELF (*.bin *.elf *.oelf) + + + + Game Boot + Boot Game + + + + Only one file can be selected! + Hanya satu file yang dapat dipilih! + + + + PKG Extraction + Ekstraksi PKG + + + + Patch detected!\nPKG and Game versions match!: %1\nWould you like + Patch terdeteksi!\nVersi PKG dan Game cocok!: %1\nApakah Anda ingin + + + + to overwrite? + menimpa? + + + + Patch detected!\nPKG Version %1 is older + Patch terdeteksi!\nVersi PKG %1 lebih lama + + + + than installed version!: %2\nWould you like + daripada versi yang terinstal!: %2\nApakah Anda ingin + + + + to overwrite? + menimpa? + + + + Patch detected!\nGame is installed: %1\nWould you like + Patch terdeteksi!\nGame terinstal: %1\nApakah Anda ingin + + + + to install Patch: %2? + menginstal Patch: %2? + + + + Game already installed\n%1\nWould you like to overwrite? + Game sudah terinstal\n%1\nApakah Anda ingin menimpa? + + + + PKG is a patch, please install the game first! + PKG adalah patch, silakan instal game terlebih dahulu! + + + + PKG ERROR + ERROR PKG + + + + Extracting PKG %1/%2 + Estrazione PKG %1/%2 + + + + Extraction Finished + Ekstraksi Selesai + + + + Game successfully installed at %1 + Game berhasil diinstal di %1 + + + + File doesn't appear to be a valid PKG file + File tidak tampak sebagai file PKG yang valid + + + + CheatsPatches + + + Cheats / Patches + Cheat / Patch + + + + defaultTextEdit_MSG + I cheats/patches sono sperimentali.\nUtilizzali con cautela.\n\nScarica i cheats singolarmente selezionando il repository e cliccando sul pulsante di download.\nNella scheda Patches, puoi scaricare tutti i patch in una volta sola, scegliere quali vuoi utilizzare e salvare la tua selezione.\n\nPoiché non sviluppiamo i Cheats/Patches,\nper favore segnala i problemi all'autore del cheat.\n\nHai creato un nuovo cheat? Visita:\nhttps://github.com/shadps4-emu/ps4_cheats + + + + No Image Available + Tidak Ada Gambar + + + + Serial: + Serial: + + + + Version: + Versi: + + + + Size: + Ukuran: + + + + Select Cheat File: + Pilih File Cheat: + + + + Repository: + Repositori: + + + + Download Cheats + Unduh Cheat + + + + Delete File + Hapus File + + + + No files selected. + Tidak ada file yang dipilih. + + + + You can delete the cheats you don't want after downloading them. + Anda dapat menghapus cheat yang tidak diinginkan setelah mengunduhnya. + + + + Do you want to delete the selected file?\n%1 + Apakah Anda ingin menghapus file yang dipilih?\n%1 + + + + Select Patch File: + Pilih File Patch: + + + + Download Patches + Unduh Patch + + + + Save + Simpan + + + + Cheats + Cheat + + + + Patches + Patch + + + + Error + Kesalahan + + + + No patch selected. + Tidak ada patch yang dipilih. + + + + Unable to open files.json for reading. + Gagal membuka files.json untuk dibaca. + + + + No patch file found for the current serial. + Tidak ada file patch ditemukan untuk serial saat ini. + + + + Unable to open the file for reading. + Gagal membuka file untuk dibaca. + + + + Unable to open the file for writing. + Gagal membuka file untuk ditulis. + + + + Failed to parse XML: + Gagal mengurai XML: + + + + Success + Berhasil + + + + Options saved successfully. + Opsi berhasil disimpan. + + + + Invalid Source + Sumber Tidak Valid + + + + The selected source is invalid. + Sumber yang dipilih tidak valid. + + + + File Exists + File Ada + + + + File already exists. Do you want to replace it? + File sudah ada. Apakah Anda ingin menggantinya? + + + + Failed to save file: + Gagal menyimpan file: + + + + Failed to download file: + Gagal mengunduh file: + + + + Cheats Not Found + Cheat Tidak Ditemukan + + + + CheatsNotFound_MSG + Cheat tidak ditemukan untuk game ini dalam versi repositori yang dipilih, coba repositori lain atau versi game yang berbeda. + + + + Cheats Downloaded Successfully + Cheat Berhasil Diunduh + + + + CheatsDownloadedSuccessfully_MSG + Anda telah berhasil mengunduh cheat untuk versi game ini dari repositori yang dipilih. Anda dapat mencoba mengunduh dari repositori lain, jika tersedia, Anda juga dapat menggunakannya dengan memilih file dari daftar. + + + + Failed to save: + Gagal menyimpan: + + + + Failed to download: + Gagal mengunduh: + + + + Download Complete + Unduhan Selesai + + + + DownloadComplete_MSG + Patch Berhasil Diunduh! Semua patch yang tersedia untuk semua game telah diunduh, tidak perlu mengunduhnya secara individu untuk setiap game seperti yang terjadi pada Cheat. + + + + Failed to parse JSON data from HTML. + Gagal mengurai data JSON dari HTML. + + + + Failed to retrieve HTML page. + Gagal mengambil halaman HTML. + + + + Failed to open file: + Gagal membuka file: + + + + XML ERROR: + KESALAHAN XML: + + + + Failed to open files.json for writing + Gagal membuka files.json untuk menulis + + + + Author: + Penulis: + + + + Directory does not exist: + Direktori tidak ada: + + + + Failed to open files.json for reading. + Gagal membuka files.json untuk dibaca. + + + + Name: + Nama: + + + \ No newline at end of file diff --git a/src/qt_gui/translations/ja_JP.ts b/src/qt_gui/translations/ja_JP.ts index 557b0760b..c3eaaba19 100644 --- a/src/qt_gui/translations/ja_JP.ts +++ b/src/qt_gui/translations/ja_JP.ts @@ -81,67 +81,72 @@ GuiContextMenus - + Create Shortcut ショートカットを作成 - + Open Game Folder ゲームフォルダを開く - + + Cheats / Patches + チート / パッチ + + + SFO Viewer SFOビューワー - + Trophy Viewer トロフィービューワー - + Copy info 情報をコピー - + Copy Name 名前をコピー - + Copy Serial シリアルをコピー - + Copy All すべてコピー - + Shortcut creation ショートカットの作成 - + Shortcut created successfully!\n %1 ショートカットが正常に作成されました!\n %1 - + Error エラー - + Error creating shortcut!\n %1 ショートカットの作成に失敗しました!\n %1 - + Install PKG PKGをインストール @@ -248,6 +253,11 @@ Game Install Directory ゲームインストールディレクトリ + + + Download Cheats/Patches + チート / パッチをダウンロード + Dump Game List @@ -488,4 +498,395 @@ RenderDocデバッグを有効にする - + + MainWindow + + + * Unsupported Vulkan Version + * サポートされていないVulkanバージョン + + + + Download Cheats For All Installed Games + すべてのインストール済みゲームのチートをダウンロード + + + + Download Patches For All Games + すべてのゲームのパッチをダウンロード + + + + Download Complete + ダウンロード完了 + + + + You have downloaded cheats for all the games you have installed. + インストールしたすべてのゲームのチートをダウンロードしました。 + + + + Patches Downloaded Successfully! + パッチが正常にダウンロードされました! + + + + All Patches available for all games have been downloaded. + すべてのゲームに利用可能なパッチがダウンロードされました。 + + + + Games: + ゲーム: + + + + PKG File (*.PKG) + PKGファイル (*.PKG) + + + + ELF files (*.bin *.elf *.oelf) + ELFファイル (*.bin *.elf *.oelf) + + + + Game Boot + ゲームブート + + + + Only one file can be selected! + 1つのファイルしか選択できません! + + + + PKG Extraction + PKG抽出 + + + + Patch detected!\nPKG and Game versions match!: %1\nWould you like + パッチが検出されました!\nPKGとゲームバージョンが一致しています!: %1\n上書きしますか + + + + to overwrite? + 上書きしますか? + + + + Patch detected!\nPKG Version %1 is older + パッチが検出されました!\nPKGバージョン %1 は古い + + + + than installed version!: %2\nWould you like + インストールされているバージョンよりも古いです!: %2\n上書きしますか + + + + to overwrite? + 上書きしますか? + + + + Patch detected!\nGame is installed: %1\nWould you like + パッチが検出されました!\nゲームがインストールされています: %1\nインストールしますか + + + + to install Patch: %2? + パッチをインストールしますか: %2? + + + + Game already installed\n%1\nWould you like to overwrite? + ゲームはすでにインストールされています\n%1\n上書きしますか? + + + + PKG is a patch, please install the game first! + PKGはパッチです。ゲームを先にインストールしてください! + + + + PKG ERROR + PKGエラー + + + + Extracting PKG %1/%2 + PKGを抽出中 %1/%2 + + + + Extraction Finished + 抽出完了 + + + + Game successfully installed at %1 + ゲームが %1 に正常にインストールされました + + + + File doesn't appear to be a valid PKG file + ファイルが有効なPKGファイルでないようです + + + + CheatsPatches + + + Cheats / Patches + チート / パッチ + + + + defaultTextEdit_MSG + チート/パッチは実験的です。\n使用には注意してください。\n\nリポジトリを選択し、ダウンロードボタンをクリックしてチートを個別にダウンロードします。\n「Patches」タブでは、すべてのパッチを一度にダウンロードし、使用したいものを選択して選択を保存できます。\n\nチート/パッチを開発していないため、\n問題があればチートの作者に報告してください。\n\n新しいチートを作成しましたか?\nhttps://github.com/shadps4-emu/ps4_cheats を訪問してください。 + + + + No Image Available + 画像は利用できません + + + + Serial: + シリアル: + + + + Version: + バージョン: + + + + Size: + サイズ: + + + + Select Cheat File: + チートファイルを選択: + + + + Repository: + リポジトリ: + + + + Download Cheats + チートをダウンロード + + + + Delete File + ファイルを削除 + + + + No files selected. + ファイルが選択されていません。 + + + + You can delete the cheats you don't want after downloading them. + ダウンロード後に不要なチートを削除できます。 + + + + Do you want to delete the selected file?\n%1 + 選択したファイルを削除しますか?\n%1 + + + + Select Patch File: + パッチファイルを選択: + + + + Download Patches + パッチをダウンロード + + + + Save + 保存 + + + + Cheats + チート + + + + Patches + パッチ + + + + Error + エラー + + + + No patch selected. + パッチが選択されていません。 + + + + Unable to open files.json for reading. + files.jsonを読み込み用に開けません。 + + + + No patch file found for the current serial. + 現在のシリアルに対するパッチファイルが見つかりません。 + + + + Unable to open the file for reading. + ファイルを読み込み用に開けません。 + + + + Unable to open the file for writing. + ファイルを記録用に開けません。 + + + + Failed to parse XML: + XMLの解析に失敗しました: + + + + Success + 成功 + + + + Options saved successfully. + オプションが正常に保存されました。 + + + + Invalid Source + 無効なソース + + + + The selected source is invalid. + 選択したソースは無効です。 + + + + File Exists + ファイルが存在します + + + + File already exists. Do you want to replace it? + ファイルはすでに存在します。置き換えますか? + + + + Failed to save file: + ファイルの保存に失敗しました: + + + + Failed to download file: + ファイルのダウンロードに失敗しました: + + + + Cheats Not Found + チートが見つかりません + + + + CheatsNotFound_MSG + このゲームのこのバージョンのチートが選択されたリポジトリに見つかりませんでした。別のリポジトリまたはゲームの別のバージョンを試してください。 + + + + Cheats Downloaded Successfully + チートが正常にダウンロードされました + + + + CheatsDownloadedSuccessfully_MSG + このゲームのこのバージョンのチートをリポジトリから正常にダウンロードしました。 別のリポジトリからのダウンロードも試せます。利用可能であれば、リストからファイルを選択して使用することも可能です。 + + + + Failed to save: + 保存に失敗しました: + + + + Failed to download: + ダウンロードに失敗しました: + + + + Download Complete + ダウンロード完了 + + + + DownloadComplete_MSG + パッチが正常にダウンロードされました! すべてのゲームに利用可能なパッチがダウンロードされました。チートとは異なり、各ゲームごとに個別にダウンロードする必要はありません。 + + + + Failed to parse JSON data from HTML. + HTMLからJSONデータの解析に失敗しました。 + + + + Failed to retrieve HTML page. + HTMLページの取得に失敗しました。 + + + + Failed to open file: + ファイルを開くのに失敗しました: + + + + XML ERROR: + XMLエラー: + + + + Failed to open files.json for writing + files.jsonを記録用に開けません + + + + Author: + 著者: + + + + Directory does not exist: + ディレクトリが存在しません: + + + + Failed to open files.json for reading. + files.jsonを読み込み用に開けません。 + + + + Name: + 名前: + + + \ No newline at end of file diff --git a/src/qt_gui/translations/ko_KR.ts b/src/qt_gui/translations/ko_KR.ts index b33b5d927..579c6ca79 100644 --- a/src/qt_gui/translations/ko_KR.ts +++ b/src/qt_gui/translations/ko_KR.ts @@ -81,67 +81,72 @@ GuiContextMenus - + Create Shortcut Create Shortcut - + Open Game Folder Open Game Folder - + + Cheats / Patches + 치트 / 패치 + + + SFO Viewer SFO Viewer - + Trophy Viewer Trophy Viewer - + Copy info Copy info - + Copy Name Copy Name - + Copy Serial Copy Serial - + Copy All Copy All - + Shortcut creation Shortcut creation - + Shortcut created successfully!\n %1 Shortcut created successfully!\n %1 - + Error Error - + Error creating shortcut!\n %1 Error creating shortcut!\n %1 - + Install PKG Install PKG @@ -248,6 +253,11 @@ Game Install Directory Game Install Directory + + + Download Cheats/Patches + 치트 / 패치 다운로드 + Dump Game List @@ -488,4 +498,395 @@ Enable RenderDoc Debugging + + MainWindow + + + * Unsupported Vulkan Version + * Unsupported Vulkan Version + + + + Download Cheats For All Installed Games + Download Cheats For All Installed Games + + + + Download Patches For All Games + Download Patches For All Games + + + + Download Complete + Download Complete + + + + You have downloaded cheats for all the games you have installed. + You have downloaded cheats for all the games you have installed. + + + + Patches Downloaded Successfully! + Patches Downloaded Successfully! + + + + All Patches available for all games have been downloaded. + All Patches available for all games have been downloaded. + + + + Games: + Games: + + + + PKG File (*.PKG) + PKG File (*.PKG) + + + + ELF files (*.bin *.elf *.oelf) + ELF files (*.bin *.elf *.oelf) + + + + Game Boot + Game Boot + + + + Only one file can be selected! + Only one file can be selected! + + + + PKG Extraction + PKG Extraction + + + + Patch detected!\nPKG and Game versions match!: %1\nWould you like + Patch detected!\nPKG and Game versions match!: %1\nWould you like + + + + to overwrite? + to overwrite? + + + + Patch detected!\nPKG Version %1 is older + Patch detected!\nPKG Version %1 is older + + + + than installed version!: %2\nWould you like + than installed version!: %2\nWould you like + + + + to overwrite? + to overwrite? + + + + Patch detected!\nGame is installed: %1\nWould you like + Patch detected!\nGame is installed: %1\nWould you like + + + + to install Patch: %2? + to install Patch: %2? + + + + Game already installed\n%1\nWould you like to overwrite? + Game already installed\n%1\nWould you like to overwrite? + + + + PKG is a patch, please install the game first! + PKG is a patch, please install the game first! + + + + PKG ERROR + PKG ERROR + + + + Extracting PKG %1/%2 + Extracting PKG %1/%2 + + + + Extraction Finished + Extraction Finished + + + + Game successfully installed at %1 + Game successfully installed at %1 + + + + File doesn't appear to be a valid PKG file + File doesn't appear to be a valid PKG file + + + + CheatsPatches + + + Cheats / Patches + Cheats / Patches + + + + defaultTextEdit_MSG + Cheats/Patches are experimental.\nUse with caution.\n\nDownload cheats individually by selecting the repository and clicking the download button.\nIn the Patches tab, you can download all patches at once, choose which ones you want to use, and save your selection.\n\nSince we do not develop the Cheats/Patches,\nplease report issues to the cheat author.\n\nCreated a new cheat? Visit:\nhttps://github.com/shadps4-emu/ps4_cheats + + + + No Image Available + No Image Available + + + + Serial: + Serial: + + + + Version: + Version: + + + + Size: + Size: + + + + Select Cheat File: + Select Cheat File: + + + + Repository: + Repository: + + + + Download Cheats + Download Cheats + + + + Delete File + Delete File + + + + No files selected. + No files selected. + + + + You can delete the cheats you don't want after downloading them. + You can delete the cheats you don't want after downloading them. + + + + Do you want to delete the selected file?\n%1 + Do you want to delete the selected file?\n%1 + + + + Select Patch File: + Select Patch File: + + + + Download Patches + Download Patches + + + + Save + Save + + + + Cheats + Cheats + + + + Patches + Patches + + + + Error + Error + + + + No patch selected. + No patch selected. + + + + Unable to open files.json for reading. + Unable to open files.json for reading. + + + + No patch file found for the current serial. + No patch file found for the current serial. + + + + Unable to open the file for reading. + Unable to open the file for reading. + + + + Unable to open the file for writing. + Unable to open the file for writing. + + + + Failed to parse XML: + Failed to parse XML: + + + + Success + Success + + + + Options saved successfully. + Options saved successfully. + + + + Invalid Source + Invalid Source + + + + The selected source is invalid. + The selected source is invalid. + + + + File Exists + File Exists + + + + File already exists. Do you want to replace it? + File already exists. Do you want to replace it? + + + + Failed to save file: + Failed to save file: + + + + Failed to download file: + Failed to download file: + + + + Cheats Not Found + Cheats Not Found + + + + CheatsNotFound_MSG + No Cheats found for this game in this version of the selected repository,try another repository or a different version of the game. + + + + Cheats Downloaded Successfully + Cheats Downloaded Successfully + + + + CheatsDownloadedSuccessfully_MSG + You have successfully downloaded the cheats for this version of the game from the selected repository. You can try downloading from another repository, if it is available it will also be possible to use it by selecting the file from the list. + + + + Failed to save: + Failed to save: + + + + Failed to download: + Failed to download: + + + + Download Complete + Download Complete + + + + DownloadComplete_MSG + Patches Downloaded Successfully! All Patches available for all games have been downloaded, there is no need to download them individually for each game as happens in Cheats. + + + + Failed to parse JSON data from HTML. + Failed to parse JSON data from HTML. + + + + Failed to retrieve HTML page. + Failed to retrieve HTML page. + + + + Failed to open file: + Failed to open file: + + + + XML ERROR: + XML ERROR: + + + + Failed to open files.json for writing + Failed to open files.json for writing + + + + Author: + Author: + + + + Directory does not exist: + Directory does not exist: + + + + Failed to open files.json for reading. + Failed to open files.json for reading. + + + + Name: + Name: + + \ No newline at end of file diff --git a/src/qt_gui/translations/lt_LT.ts b/src/qt_gui/translations/lt_LT.ts index 286ec3f43..c94edb745 100644 --- a/src/qt_gui/translations/lt_LT.ts +++ b/src/qt_gui/translations/lt_LT.ts @@ -81,67 +81,72 @@ GuiContextMenus - + Create Shortcut Create Shortcut - + Open Game Folder Open Game Folder - + + Apgaulės / Pleistrai + Cheats / Patches + + + SFO Viewer SFO Viewer - + Trophy Viewer Trophy Viewer - + Copy info Copy info - + Copy Name Copy Name - + Copy Serial Copy Serial - + Copy All Copy All - + Shortcut creation Shortcut creation - + Shortcut created successfully!\n %1 Shortcut created successfully!\n %1 - + Error Error - + Error creating shortcut!\n %1 Error creating shortcut!\n %1 - + Install PKG Install PKG @@ -248,6 +253,11 @@ Game Install Directory Game Install Directory + + + Download Cheats/Patches + Atsisiųsti Apgaules / Pleistrus + Dump Game List @@ -487,5 +497,396 @@ Enable RenderDoc Debugging Enable RenderDoc Debugging - + + + MainWindow + + + * Unsupported Vulkan Version + * Nepalaikoma Vulkan versija + + + + Download Cheats For All Installed Games + Atsisiųsti sukčiavimus visiems įdiegtiems žaidimams + + + + Download Patches For All Games + Atsisiųsti pataisas visiems žaidimams + + + + Download Complete + Atsisiuntimas baigtas + + + + You have downloaded cheats for all the games you have installed. + Jūs atsisiuntėte sukčiavimus visiems jūsų įdiegtiesiems žaidimams. + + + + Patches Downloaded Successfully! + Pataisos sėkmingai atsisiųstos! + + + + All Patches available for all games have been downloaded. + Visos pataisos visiems žaidimams buvo atsisiųstos. + + + + Games: + Žaidimai: + + + + PKG File (*.PKG) + PKG failas (*.PKG) + + + + ELF files (*.bin *.elf *.oelf) + ELF failai (*.bin *.elf *.oelf) + + + + Game Boot + Žaidimo paleidimas + + + + Only one file can be selected! + Galite pasirinkti tik vieną failą! + + + + PKG Extraction + PKG ištraukimas + + + + Patch detected!\nPKG and Game versions match!: %1\nWould you like + Pataisa aptikta!\nPKG ir žaidimo versijos atitinka!: %1\nAr norėtumėte + + + + to overwrite? + perrašyti? + + + + Patch detected!\nPKG Version %1 is older + Pataisa aptikta!\nPKG versija %1 yra senesnė + + + + than installed version!: %2\nWould you like + nei įdiegta versija!: %2\nAr norėtumėte + + + + to overwrite? + perrašyti? + + + + Patch detected!\nGame is installed: %1\nWould you like + Pataisa aptikta!\nŽaidimas įdiegtas: %1\nAr norėtumėte + + + + to install Patch: %2? + įdiegti pataisą: %2? + + + + Game already installed\n%1\nWould you like to overwrite? + Žaidimas jau įdiegtas\n%1\nAr norėtumėte perrašyti? + + + + PKG is a patch, please install the game first! + PKG yra pataisa, prašome pirmiausia įdiegti žaidimą! + + + + PKG ERROR + PKG KLAIDA + + + + Extracting PKG %1/%2 + Ekstrakcinis PKG %1/%2 + + + + Extraction Finished + Ekstrakcija baigta + + + + Game successfully installed at %1 + Žaidimas sėkmingai įdiegtas %1 + + + + File doesn't appear to be a valid PKG file + Failas atrodo, kad nėra galiojantis PKG failas + + + + CheatsPatches + + + Cheats / Patches + Sukčiavimai / Pataisos + + + + defaultTextEdit_MSG + Cheats/Patches yra eksperimentiniai.\nNaudokite atsargiai.\n\nAtsisiųskite cheats atskirai pasirinkdami saugyklą ir paspausdami atsisiuntimo mygtuką.\nPatches skirtuke galite atsisiųsti visus patch’us vienu metu, pasirinkti, kuriuos norite naudoti, ir išsaugoti pasirinkimą.\n\nKadangi mes nekurime Cheats/Patches,\npraneškite problemas cheat autoriui.\n\nSukūrėte naują cheat? Apsilankykite:\nhttps://github.com/shadps4-emu/ps4_cheats + + + + No Image Available + Nuotrauka neprieinama + + + + Serial: + Seriinis numeris: + + + + Version: + Versija: + + + + Size: + Dydis: + + + + Select Cheat File: + Pasirinkite sukčiavimo failą: + + + + Repository: + Saugykla: + + + + Download Cheats + Atsisiųsti sukčiavimus + + + + Delete File + Pašalinti failą + + + + No files selected. + Failai nepasirinkti. + + + + You can delete the cheats you don't want after downloading them. + Galite pašalinti sukčiavimus, kurių nenorite, juos atsisiuntę. + + + + Do you want to delete the selected file?\n%1 + Ar norite ištrinti pasirinktą failą?\n%1 + + + + Select Patch File: + Pasirinkite pataisos failą: + + + + Download Patches + Atsisiųsti pataisas + + + + Save + Įrašyti + + + + Cheats + Sukčiavimai + + + + Patches + Pataisos + + + + Error + Klaida + + + + No patch selected. + Nieko nepataisyta. + + + + Unable to open files.json for reading. + Neįmanoma atidaryti files.json skaitymui. + + + + No patch file found for the current serial. + Nepavyko rasti pataisos failo dabartiniam serijiniam numeriui. + + + + Unable to open the file for reading. + Neįmanoma atidaryti failo skaitymui. + + + + Unable to open the file for writing. + Neįmanoma atidaryti failo rašymui. + + + + Failed to parse XML: + Nepavyko išanalizuoti XML: + + + + Success + Sėkmė + + + + Options saved successfully. + Nustatymai sėkmingai išsaugoti. + + + + Invalid Source + Netinkamas šaltinis + + + + The selected source is invalid. + Pasirinktas šaltinis yra netinkamas. + + + + File Exists + Failas egzistuoja + + + + File already exists. Do you want to replace it? + Failas jau egzistuoja. Ar norite jį pakeisti? + + + + Failed to save file: + Nepavyko išsaugoti failo: + + + + Failed to download file: + Nepavyko atsisiųsti failo: + + + + Cheats Not Found + Sukčiavimai nerasti + + + + CheatsNotFound_MSG + Nerasta sukčiavimų šiam žaidimui šioje pasirinktos saugyklos versijoje,bandykite kitą saugyklą arba skirtingą žaidimo versiją. + + + + Cheats Downloaded Successfully + Sukčiavimai sėkmingai atsisiųsti + + + + CheatsDownloadedSuccessfully_MSG + Sėkmingai atsisiuntėte sukčiavimus šios žaidimo versijos iš pasirinktos saugyklos. Galite pabandyti atsisiųsti iš kitos saugyklos, jei ji yra prieinama, taip pat bus galima ją naudoti pasirinkus failą iš sąrašo. + + + + Failed to save: + Nepavyko išsaugoti: + + + + Failed to download: + Nepavyko atsisiųsti: + + + + Download Complete + Atsisiuntimas baigtas + + + + DownloadComplete_MSG + Pataisos sėkmingai atsisiųstos! Visos pataisos visiems žaidimams buvo atsisiųstos, nebėra reikalo jas atsisiųsti atskirai kiekvienam žaidimui, kaip tai vyksta su sukčiavimais. + + + + Failed to parse JSON data from HTML. + Nepavyko išanalizuoti JSON duomenų iš HTML. + + + + Failed to retrieve HTML page. + Nepavyko gauti HTML puslapio. + + + + Failed to open file: + Nepavyko atidaryti failo: + + + + XML ERROR: + XML KLAIDA: + + + + Failed to open files.json for writing + Nepavyko atidaryti files.json rašymui + + + + Author: + Autorius: + + + + Directory does not exist: + Katalogas neegzistuoja: + + + + Failed to open files.json for reading. + Nepavyko atidaryti files.json skaitymui. + + + + Name: + Pavadinimas: + + \ No newline at end of file diff --git a/src/qt_gui/translations/nb.ts b/src/qt_gui/translations/nb.ts index 27fc540c1..3c5401a2b 100644 --- a/src/qt_gui/translations/nb.ts +++ b/src/qt_gui/translations/nb.ts @@ -81,67 +81,72 @@ GuiContextMenus - + Create Shortcut Create Shortcut - + Open Game Folder Open Game Folder - + + Cheats / Patches + Juks / Oppdateringer + + + SFO Viewer SFO Viewer - + Trophy Viewer Trophy Viewer - + Copy info Copy info - + Copy Name Copy Name - + Copy Serial Copy Serial - + Copy All Copy All - + Shortcut creation Shortcut creation - + Shortcut created successfully!\n %1 Shortcut created successfully!\n %1 - + Error Error - + Error creating shortcut!\n %1 Error creating shortcut!\n %1 - + Install PKG Install PKG @@ -248,6 +253,11 @@ Game Install Directory Game Install Directory + + + Download Cheats/Patches + Last ned Juks / Oppdateringer + Dump Game List @@ -487,5 +497,396 @@ Enable RenderDoc Debugging Enable RenderDoc Debugging + + + MainWindow + + + * Unsupported Vulkan Version + * Ikke støttet Vulkan-versjon + + + + Download Cheats For All Installed Games + Last ned jukser for alle installerte spill + + + + Download Patches For All Games + Last ned oppdateringer for alle spill + + + + Download Complete + Nedlasting fullført + + + + You have downloaded cheats for all the games you have installed. + Du har lastet ned jukser for alle spillene du har installert. + + + + Patches Downloaded Successfully! + Oppdateringer lastet ned vellykket! + + + + All Patches available for all games have been downloaded. + Alle oppdateringer tilgjengelige for alle spillene har blitt lastet ned. + + + + Games: + Spill: + + + + PKG File (*.PKG) + PKG-fil (*.PKG) + + + + ELF files (*.bin *.elf *.oelf) + ELF-filer (*.bin *.elf *.oelf) + + + + Game Boot + Spilloppstart + + + + Only one file can be selected! + Kun én fil kan velges! + + + + PKG Extraction + PKG-ekstraksjon + + + + Patch detected!\nPKG and Game versions match!: %1\nWould you like + Oppdatering oppdaget!\nPKG og spillversjoner stemmer!: %1\nØnsker du å + + + + to overwrite? + overskrive? + + + + Patch detected!\nPKG Version %1 is older + Oppdatering oppdaget!\nPKG-versjon %1 er eldre + + + + than installed version!: %2\nWould you like + enn installert versjon!: %2\nØnsker du å + + + + to overwrite? + overskrive? + + + + Patch detected!\nGame is installed: %1\nWould you like + Oppdatering oppdaget!\nSpillet er installert: %1\nØnsker du å + + + + to install Patch: %2? + installere oppdateringen: %2? + + + + Game already installed\n%1\nWould you like to overwrite? + Spill allerede installert\n%1\nØnsker du å overskrive? + + + + PKG is a patch, please install the game first! + PKG er en oppdatering, vennligst installer spillet først! + + + + PKG ERROR + PKG FEIL + + + + Extracting PKG %1/%2 + Ekstraherer PKG %1/%2 + + + + Extraction Finished + Ekstrahering fullført + + + + Game successfully installed at %1 + Spillet ble installert vellykket på %1 + + + + File doesn't appear to be a valid PKG file + Fil ser ikke ut til å være en gyldig PKG-fil + + + CheatsPatches + + + Cheats / Patches + Jukser / Oppdateringer + + + + defaultTextEdit_MSG + Cheats/Patches er eksperimentelle.\nBruk med forsiktighet.\n\nLast ned cheats individuelt ved å velge depotet og klikke på nedlastingsknappen.\nPå fanen Patches kan du laste ned alle patches samtidig, velge hvilke du ønsker å bruke, og lagre valget ditt.\n\nSiden vi ikke utvikler Cheats/Patches,\nvær vennlig å rapportere problemer til cheat-utvikleren.\n\nHar du laget en ny cheat? Besøk:\nhttps://github.com/shadps4-emu/ps4_cheats + + + + No Image Available + Ingen bilde tilgjengelig + + + + Serial: + Serienummer: + + + + Version: + Versjon: + + + + Size: + Størrelse: + + + + Select Cheat File: + Velg juksfil: + + + + Repository: + Depot: + + + + Download Cheats + Last ned jukser + + + + Delete File + Slett fil + + + + No files selected. + Ingen filer valgt. + + + + You can delete the cheats you don't want after downloading them. + Du kan slette jukser du ikke ønsker etter å ha lastet dem ned. + + + + Do you want to delete the selected file?\n%1 + Ønsker du å slette den valgte filen?\n%1 + + + + Select Patch File: + Velg oppdateringsfil: + + + + Download Patches + Last ned oppdateringer + + + + Save + Lagre + + + + Cheats + Jukser + + + + Patches + Oppdateringer + + + + Error + Feil + + + + No patch selected. + Ingen oppdatering valgt. + + + + Unable to open files.json for reading. + Kan ikke åpne files.json for lesing. + + + + No patch file found for the current serial. + Ingen oppdateringsfil funnet for det aktuelle serienummeret. + + + + Unable to open the file for reading. + Kan ikke åpne filen for lesing. + + + + Unable to open the file for writing. + Kan ikke åpne filen for skriving. + + + + Failed to parse XML: + Feil ved parsing av XML: + + + + Success + Vellykket + + + + Options saved successfully. + Alternativer lagret vellykket. + + + + Invalid Source + Ugyldig kilde + + + + The selected source is invalid. + Den valgte kilden er ugyldig. + + + + File Exists + Fil eksisterer + + + + File already exists. Do you want to replace it? + Fil eksisterer allerede. Ønsker du å erstatte den? + + + + Failed to save file: + Kunne ikke lagre fil: + + + + Failed to download file: + Kunne ikke laste ned fil: + + + + Cheats Not Found + Jukser ikke funnet + + + + CheatsNotFound_MSG + Ingen jukser funnet for dette spillet i denne versjonen av det valgte depotet,prøv et annet depot eller en annen versjon av spillet. + + + + Cheats Downloaded Successfully + Jukser lastet ned vellykket + + + + CheatsDownloadedSuccessfully_MSG + Du har lastet ned jukser vellykket for denne versjonen av spillet fra det valgte depotet. Du kan prøve å laste ned fra et annet depot, hvis det er tilgjengelig, vil det også være mulig å bruke det ved å velge filen fra listen. + + + + Failed to save: + Kunne ikke lagre: + + + + Failed to download: + Kunne ikke laste ned: + + + + Download Complete + Nedlasting fullført + + + + DownloadComplete_MSG + Oppdateringer lastet ned vellykket! Alle oppdateringer tilgjengelige for alle spill har blitt lastet ned, det er ikke nødvendig å laste dem ned individuelt for hvert spill som skjer med jukser. + + + + Failed to parse JSON data from HTML. + Kunne ikke analysere JSON-data fra HTML. + + + + Failed to retrieve HTML page. + Kunne ikke hente HTML-side. + + + + Failed to open file: + Kunne ikke åpne fil: + + + + XML ERROR: + XML FEIL: + + + + Failed to open files.json for writing + Kunne ikke åpne files.json for skriving + + + + Author: + Forfatter: + + + + Directory does not exist: + Direktory eksisterer ikke: + + + + Failed to open files.json for reading. + Kunne ikke åpne files.json for lesing. + + + + Name: + Navn: + + \ No newline at end of file diff --git a/src/qt_gui/translations/nl.ts b/src/qt_gui/translations/nl.ts index 2f4f5f9b2..8b55b0e2a 100644 --- a/src/qt_gui/translations/nl.ts +++ b/src/qt_gui/translations/nl.ts @@ -81,67 +81,72 @@ GuiContextMenus - + Create Shortcut Create Shortcut - + Open Game Folder Open Game Folder - + + Cheats / Patches + Cheats / Patches + + + SFO Viewer SFO Viewer - + Trophy Viewer Trophy Viewer - + Copy info Copy info - + Copy Name Copy Name - + Copy Serial Copy Serial - + Copy All Copy All - + Shortcut creation Shortcut creation - + Shortcut created successfully!\n %1 Shortcut created successfully!\n %1 - + Error Error - + Error creating shortcut!\n %1 Error creating shortcut!\n %1 - + Install PKG Install PKG @@ -248,6 +253,11 @@ Game Install Directory Game Install Directory + + + Download Cheats/Patches + Download Cheats/Patches + Dump Game List @@ -487,5 +497,396 @@ Enable RenderDoc Debugging Enable RenderDoc Debugging + + + MainWindow + + + * Unsupported Vulkan Version + * Niet ondersteunde Vulkan-versie + + + + Download Cheats For All Installed Games + Download cheats voor alle geïnstalleerde spellen + + + + Download Patches For All Games + Download patches voor alle spellen + + + + Download Complete + Download voltooid + + + + You have downloaded cheats for all the games you have installed. + Je hebt cheats gedownload voor alle spellen die je hebt geïnstalleerd. + + + + Patches Downloaded Successfully! + Patches succesvol gedownload! + + + + All Patches available for all games have been downloaded. + Alle patches voor alle spellen zijn gedownload. + + + + Games: + Spellen: + + + + PKG File (*.PKG) + PKG-bestand (*.PKG) + + + + ELF files (*.bin *.elf *.oelf) + ELF-bestanden (*.bin *.elf *.oelf) + + + + Game Boot + Spelopstart + + + + Only one file can be selected! + Je kunt slechts één bestand selecteren! + + + + PKG Extraction + PKG-extractie + + + + Patch detected!\nPKG and Game versions match!: %1\nWould you like + Patch gedetecteerd!\nPKG en spelversies komen overeen!: %1\nWil je + + + + to overwrite? + overschrijven? + + + + Patch detected!\nPKG Version %1 is older + Patch gedetecteerd!\nPKG-versie %1 is ouder + + + + than installed version!: %2\nWould you like + dan de geïnstalleerde versie!: %2\nWil je + + + + to overwrite? + overschrijven? + + + + Patch detected!\nGame is installed: %1\nWould you like + Patch gedetecteerd!\nSpel is geïnstalleerd: %1\nWil je + + + + to install Patch: %2? + de patch installeren: %2? + + + + Game already installed\n%1\nWould you like to overwrite? + Spel al geïnstalleerd\n%1\nWil je het overschrijven? + + + + PKG is a patch, please install the game first! + PKG is een patch, installeer eerst het spel! + + + + PKG ERROR + PKG FOUT + + + + Extracting PKG %1/%2 + PKG %1/%2 aan het extraheren + + + + Extraction Finished + Extractie voltooid + + + + Game successfully installed at %1 + Spel succesvol geïnstalleerd op %1 + + + + File doesn't appear to be a valid PKG file + Het bestand lijkt geen geldig PKG-bestand te zijn + + + + CheatsPatches + + + Cheats / Patches + Cheats / Patches + + + + defaultTextEdit_MSG + Cheats/Patches zijn experimenteel.\nGebruik met voorzichtigheid.\n\nDownload cheats afzonderlijk door het repository te selecteren en op de downloadknop te klikken.\nOp het tabblad Patches kun je alle patches tegelijk downloaden, kiezen welke je wilt gebruiken en je selectie opslaan.\n\nAangezien wij de Cheats/Patches niet ontwikkelen,\nmeld problemen bij de auteur van de cheat.\n\nHeb je een nieuwe cheat gemaakt? Bezoek:\nhttps://github.com/shadps4-emu/ps4_cheats + + + + No Image Available + Geen afbeelding beschikbaar + + + + Serial: + Serie: + + + + Version: + Versie: + + + + Size: + Grootte: + + + + Select Cheat File: + Selecteer cheatbestand: + + + + Repository: + Repository: + + + + Download Cheats + Download cheats + + + + Delete File + Bestand verwijderen + + + + No files selected. + Geen bestanden geselecteerd. + + + + You can delete the cheats you don't want after downloading them. + Je kunt de cheats die je niet wilt verwijderen nadat je ze hebt gedownload. + + + + Do you want to delete the selected file?\n%1 + Wil je het geselecteerde bestand verwijderen?\n%1 + + + + Select Patch File: + Selecteer patchbestand: + + + + Download Patches + Download patches + + + + Save + Opslaan + + + + Cheats + Cheats + + + + Patches + Patches + + + + Error + Fout + + + + No patch selected. + Geen patch geselecteerd. + + + + Unable to open files.json for reading. + Kan files.json niet openen voor lezen. + + + + No patch file found for the current serial. + Geen patchbestand gevonden voor het huidige serienummer. + + + + Unable to open the file for reading. + Kan het bestand niet openen voor lezen. + + + + Unable to open the file for writing. + Kan het bestand niet openen voor schrijven. + + + + Failed to parse XML: + XML parsing mislukt: + + + + Success + Succes + + + + Options saved successfully. + Opties succesvol opgeslagen. + + + + Invalid Source + Ongeldige bron + + + + The selected source is invalid. + De geselecteerde bron is ongeldig. + + + + File Exists + Bestand bestaat + + + + File already exists. Do you want to replace it? + Bestand bestaat al. Wil je het vervangen? + + + + Failed to save file: + Kan bestand niet opslaan: + + + + Failed to download file: + Kan bestand niet downloaden: + + + + Cheats Not Found + Cheats niet gevonden + + + + CheatsNotFound_MSG + Geen cheats gevonden voor deze game in deze versie van de geselecteerde repository.Probeer een andere repository of een andere versie van het spel. + + + + Cheats Downloaded Successfully + Cheats succesvol gedownload + + + + CheatsDownloadedSuccessfully_MSG + Je hebt cheats succesvol gedownload voor deze versie van het spel uit de geselecteerde repository. Je kunt proberen te downloaden van een andere repository. Als deze beschikbaar is, kan het ook worden gebruikt door het bestand uit de lijst te selecteren. + + + + Failed to save: + Opslaan mislukt: + + + + Failed to download: + Downloaden mislukt: + + + + Download Complete + Download voltooid + + + + DownloadComplete_MSG + Patches succesvol gedownload! Alle beschikbare patches voor alle spellen zijn gedownload. Het is niet nodig om ze afzonderlijk te downloaden voor elk spel dat cheats heeft. + + + + Failed to parse JSON data from HTML. + Kan JSON-gegevens uit HTML niet parseren. + + + + Failed to retrieve HTML page. + Kan HTML-pagina niet ophalen. + + + + Failed to open file: + Kan bestand niet openen: + + + + XML ERROR: + XML FOUT: + + + + Failed to open files.json for writing + Kan files.json niet openen voor schrijven + + + + Author: + Auteur: + + + + Directory does not exist: + Map bestaat niet: + + + + Failed to open files.json for reading. + Kan files.json niet openen voor lezen. + + + + Name: + Naam: + \ No newline at end of file diff --git a/src/qt_gui/translations/pl_PL.ts b/src/qt_gui/translations/pl_PL.ts index 7d18f203d..41c06f89f 100644 --- a/src/qt_gui/translations/pl_PL.ts +++ b/src/qt_gui/translations/pl_PL.ts @@ -1,493 +1,892 @@ - - - - - - - AboutDialog - - - About shadPS4 - O programie - - - - shadPS4 - shadPS4 - - - - shadPS4 is an experimental open-source emulator for the PlayStation 4. - shadPS4 to eksperymentalny otwartoźródłowy emulator konsoli PlayStation 4. - - - - This software should not be used to play games you have not legally obtained. - To oprogramowanie nie służy do grania w gry pochodzące z nielegalnego źródła. - - - - ElfViewer - - - Open Folder - Otwórz folder - - - - GameInfoClass - - - Loading game list, please wait :3 - Ładowanie listy gier, proszę poczekaj :3 - - - - Cancel - Anuluj - - - - Loading... - Ładowanie... - - - - GameInstallDialog - - - shadPS4 - Choose directory - shadPS4 - Wybierz katalog - - - - Directory to install games - Katalog do instalacji gier - - - - Browse - Przeglądaj - - - - Error - Błąd - - - - The value for location to install games is not valid. - Podana ścieżka do instalacji gier nie jest prawidłowa. - - - - GuiContextMenus - - - Create Shortcut - Utwórz skrót - - - - Open Game Folder - Otwórz katalog gry - - - - SFO Viewer - Menedżer plików SFO - - - - Trophy Viewer - Menedżer trofeów - - - - Copy info - Kopiuj informacje - - - - Copy Name - Kopiuj nazwę - - - - Copy Serial - Kopiuj numer seryjny - - - - Copy All - Kopiuj wszystko - - - - Shortcut creation - Tworzenie skrótu - - - - Shortcut created successfully!\n %1 - Utworzenie skrótu zakończone pomyślnie!\n %1 - - - - Error - Błąd - - - - Error creating shortcut!\n %1 - Utworzenie skrótu zakończone niepowodzeniem!\n %1 - - - - Install PKG - Zainstaluj PKG - - - - MainWindow - - - Open/Add Elf Folder - Otwórz/Dodaj folder Elf - - - - Install Packages (PKG) - Zainstaluj paczkę (PKG) - - - - Boot Game - Uruchom grę - - - - About shadPS4 - O programie - - - - Configure... - Konfiguruj... - - - - Install application from a .pkg file - Zainstaluj aplikacje z pliku .pkg - - - - Recent Games - Ostatnie gry - - - - Exit - Wyjdź - - - - Exit shadPS4 - Wyjdź z shadPS4 - - - - Exit the application. - Wyjdź z aplikacji. - - - - Show Game List - Pokaż listę gier - - - - Game List Refresh - Odśwież listę gier - - - - Tiny - Malutkie - - - - Small - Małe - - - - Medium - Średnie - - - - Large - Wielkie - - - - List View - Widok listy - - - - Grid View - Widok siatki - - - - Elf Viewer - Menedżer plików ELF - - - - Game Install Directory - Katalog zainstalowanej gry - - - - Dump Game List - Zgraj listę gier - - - - PKG Viewer - Menedżer plików PKG - - - - Search... - Szukaj... - - - - File - Plik - - - - View - Widok - - - - Game List Icons - Ikony w widoku listy - - - - Game List Mode - Tryb listy gier - - - - Settings - Ustawienia - - - - Utils - Narzędzia - - - - Themes - Motywy - - - - About - O programie - - - - Dark - Ciemny - - - - Light - Jasny - - - - Green - Zielony - - - - Blue - Niebieski - - - - Violet - Fioletowy - - - - toolBar - Pasek narzędzi - - - - PKGViewer - - - Open Folder - Open Folder - - - - TrophyViewer - - - Trophy Viewer - Menedżer trofeów - - - - SettingsDialog - - - Settings - Ustawienia - - - - General - Ogólne - - - - System - System - - - - Console Language - Język konsoli - - - - Emulator Language - Język emulatora - - - - Emulator - Emulator - - - - Enable Fullscreen - Włącz pełny ekran - - - - Show Splash - Pokaż ekran powitania - - - - Is PS4 Pro - Emulacja PS4 Pro - - - - Username - Nazwa użytkownika - - - - Logger - Dziennik zdarzeń - - - - Log Type - Typ dziennika - - - - Log Filter - Filtrowanie dziennika - - - - Graphics - Grafika - - - - Graphics Device - Karta graficzna - - - - Width - Szerokość - - - - Height - Wysokość - - - - Vblank Divider - Dzielnik pionowego blankingu (Vblank) - - - - Advanced - Zaawansowane - - - - Enable Shaders Dumping - Włącz zgrywanie cieni - - - - Enable NULL GPU - Wyłącz kartę graficzną - - - - Enable PM4 Dumping - Włącz zgrywanie PM4 - - - - Debug - Debugowanie - - - - Enable Debug Dumping - Włącz zgrywanie debugowania - - - - Enable Vulkan Validation Layers - Włącz warstwy walidacji Vulkan - - - - Enable Vulkan Synchronization Validation - Włącz walidację synchronizacji Vulkan - - - - Enable RenderDoc Debugging - Włącz debugowanie RenderDoc - - - + + + + AboutDialog + + + About shadPS4 + O programie + + + + shadPS4 + shadPS4 + + + + shadPS4 is an experimental open-source emulator for the PlayStation 4. + shadPS4 to eksperymentalny otwartoźródłowy emulator konsoli PlayStation 4. + + + + This software should not be used to play games you have not legally obtained. + To oprogramowanie nie służy do grania w gry pochodzące z nielegalnego źródła. + + + + ElfViewer + + + Open Folder + Otwórz folder + + + + GameInfoClass + + + Loading game list, please wait :3 + Ładowanie listy gier, proszę poczekaj :3 + + + + Cancel + Anuluj + + + + Loading... + Ładowanie... + + + + GameInstallDialog + + + shadPS4 - Choose directory + shadPS4 - Wybierz katalog + + + + Directory to install games + Katalog do instalacji gier + + + + Browse + Przeglądaj + + + + Error + Błąd + + + + The value for location to install games is not valid. + Podana ścieżka do instalacji gier nie jest prawidłowa. + + + + GuiContextMenus + + + Create Shortcut + Utwórz skrót + + + + Open Game Folder + Otwórz katalog gry + + + + Cheats / Patches + Kody / Patche + + + + SFO Viewer + Menedżer plików SFO + + + + Trophy Viewer + Menedżer trofeów + + + + Copy info + Kopiuj informacje + + + + Copy Name + Kopiuj nazwę + + + + Copy Serial + Kopiuj numer seryjny + + + + Copy All + Kopiuj wszystko + + + + Shortcut creation + Tworzenie skrótu + + + + Shortcut created successfully!\n %1 + Utworzenie skrótu zakończone pomyślnie!\n %1 + + + + Error + Błąd + + + + Error creating shortcut!\n %1 + Utworzenie skrótu zakończone niepowodzeniem!\n %1 + + + + Install PKG + Zainstaluj PKG + + + + MainWindow + + + Open/Add Elf Folder + Otwórz/Dodaj folder Elf + + + + Install Packages (PKG) + Zainstaluj paczkę (PKG) + + + + Boot Game + Uruchom grę + + + + About shadPS4 + O programie + + + + Configure... + Konfiguruj... + + + + Install application from a .pkg file + Zainstaluj aplikacje z pliku .pkg + + + + Recent Games + Ostatnie gry + + + + Exit + Wyjdź + + + + Exit shadPS4 + Wyjdź z shadPS4 + + + + Exit the application. + Wyjdź z aplikacji. + + + + Show Game List + Pokaż listę gier + + + + Game List Refresh + Odśwież listę gier + + + + Tiny + Malutkie + + + + Small + Małe + + + + Medium + Średnie + + + + Large + Wielkie + + + + List View + Widok listy + + + + Grid View + Widok siatki + + + + Elf Viewer + Menedżer plików ELF + + + + Game Install Directory + Katalog zainstalowanej gry + + + + Download Cheats/Patches + Pobierz Kody / Patche + + + + Dump Game List + Zgraj listę gier + + + + PKG Viewer + Menedżer plików PKG + + + + Search... + Szukaj... + + + + File + Plik + + + + View + Widok + + + + Game List Icons + Ikony w widoku listy + + + + Game List Mode + Tryb listy gier + + + + Settings + Ustawienia + + + + Utils + Narzędzia + + + + Themes + Motywy + + + + About + O programie + + + + Dark + Ciemny + + + + Light + Jasny + + + + Green + Zielony + + + + Blue + Niebieski + + + + Violet + Fioletowy + + + + toolBar + Pasek narzędzi + + + + PKGViewer + + + Open Folder + Open Folder + + + + TrophyViewer + + + Trophy Viewer + Menedżer trofeów + + + + SettingsDialog + + + Settings + Ustawienia + + + + General + Ogólne + + + + System + System + + + + Console Language + Język konsoli + + + + Emulator Language + Język emulatora + + + + Emulator + Emulator + + + + Enable Fullscreen + Włącz pełny ekran + + + + Show Splash + Pokaż ekran powitania + + + + Is PS4 Pro + Emulacja PS4 Pro + + + + Username + Nazwa użytkownika + + + + Logger + Dziennik zdarzeń + + + + Log Type + Typ dziennika + + + + Log Filter + Filtrowanie dziennika + + + + Graphics + Grafika + + + + Graphics Device + Karta graficzna + + + + Width + Szerokość + + + + Height + Wysokość + + + + Vblank Divider + Dzielnik pionowego blankingu (Vblank) + + + + Advanced + Zaawansowane + + + + Enable Shaders Dumping + Włącz zgrywanie cieni + + + + Enable NULL GPU + Wyłącz kartę graficzną + + + + Enable PM4 Dumping + Włącz zgrywanie PM4 + + + + Debug + Debugowanie + + + + Enable Debug Dumping + Włącz zgrywanie debugowania + + + + Enable Vulkan Validation Layers + Włącz warstwy walidacji Vulkan + + + + Enable Vulkan Synchronization Validation + Włącz walidację synchronizacji Vulkan + + + + Enable RenderDoc Debugging + Włącz debugowanie RenderDoc + + + + MainWindow + + + * Unsupported Vulkan Version + * Nieobsługiwana wersja Vulkan + + + + Download Cheats For All Installed Games + Pobierz kody do wszystkich zainstalowanych gier + + + + Download Patches For All Games + Pobierz poprawki do wszystkich gier + + + + Download Complete + Pobieranie zakończone + + + + You have downloaded cheats for all the games you have installed. + Pobrałeś kody do wszystkich zainstalowanych gier. + + + + Patches Downloaded Successfully! + Poprawki pobrane pomyślnie! + + + + All Patches available for all games have been downloaded. + Wszystkie poprawki dostępne dla wszystkich gier zostały pobrane. + + + + Games: + Gry: + + + + PKG File (*.PKG) + Plik PKG (*.PKG) + + + + ELF files (*.bin *.elf *.oelf) + Pliki ELF (*.bin *.elf *.oelf) + + + + Game Boot + Uruchomienie gry + + + + Only one file can be selected! + Można wybrać tylko jeden plik! + + + + PKG Extraction + Ekstrakcja PKG + + + + Patch detected!\nPKG and Game versions match!: %1\nWould you like + Wykryto poprawkę!\nWersje PKG i gry pasują do siebie!: %1\nCzy chcesz + + + + to overwrite? + nadpisać? + + + + Patch detected!\nPKG Version %1 is older + Wykryto poprawkę!\nWersja PKG %1 jest starsza + + + + than installed version!: %2\nWould you like + niż zainstalowana wersja!: %2\nCzy chcesz + + + + to overwrite? + nadpisać? + + + + Patch detected!\nGame is installed: %1\nWould you like + Wykryto poprawkę!\nGra jest zainstalowana: %1\nCzy chcesz + + + + to install Patch: %2? + zainstalować poprawkę: %2? + + + + Game already installed\n%1\nWould you like to overwrite? + Gra już zainstalowana\n%1\nCzy chcesz ją nadpisać? + + + + PKG is a patch, please install the game first! + PKG jest poprawką, proszę najpierw zainstalować grę! + + + + PKG ERROR + BŁĄD PKG + + + + Extracting PKG %1/%2 + Ekstrakcja PKG %1/%2 + + + + Extraction Finished + Ekstrakcja zakończona + + + + Game successfully installed at %1 + Gra pomyślnie zainstalowana w %1 + + + + File doesn't appear to be a valid PKG file + Plik nie wydaje się być prawidłowym plikiem PKG + + + + CheatsPatches + + + Cheats / Patches + Kody / Poprawki + + + + defaultTextEdit_MSG + Cheaty/Patche są eksperymentalne.\nUżywaj ich ostrożnie.\n\nPobierz cheaty pojedynczo, wybierając repozytorium i klikając przycisk pobierania.\nNa zakładce Patches możesz pobrać wszystkie patche jednocześnie, wybrać, które chcesz używać, i zapisać wybór.\n\nPonieważ nie rozwijamy Cheats/Patches,\nproszę zgłosić problemy do autora cheatu.\n\nStworzyłeś nowy cheat? Odwiedź:\nhttps://github.com/shadps4-emu/ps4_cheats + + + + No Image Available + Brak dostępnego obrazu + + + + Serial: + Numer seryjny: + + + + Version: + Wersja: + + + + Size: + Rozmiar: + + + + Select Cheat File: + Wybierz plik kodu: + + + + Repository: + Repozytorium: + + + + Download Cheats + Pobierz kody + + + + Remove Old Files + Usuń stare pliki + + + + Do you want to delete the files after downloading them? + Czy chcesz usunąć pliki po ich pobraniu? + + + + Do you want to delete the files after downloading them?\n%1 + Czy chcesz usunąć pliki po ich pobraniu?\n%1 + + + + Do you want to delete the selected file?\n%1 + Czy chcesz usunąć wybrany plik?\n%1 + + + + Select Patch File: + Wybierz plik poprawki: + + + + Download Patches + Pobierz poprawki + + + + Save + Zapisz + + + + Cheats + Kody + + + + Patches + Poprawki + + + + Error + Błąd + + + + No patch selected. + Nie wybrano poprawki. + + + + Unable to open files.json for reading. + Nie można otworzyć pliku files.json do odczytu. + + + + No patch file found for the current serial. + Nie znaleziono pliku poprawki dla bieżącego numeru seryjnego. + + + + Unable to open the file for reading. + Nie można otworzyć pliku do odczytu. + + + + Unable to open the file for writing. + Nie można otworzyć pliku do zapisu. + + + + Failed to parse XML: + Nie udało się sparsować XML: + + + + Success + Sukces + + + + Options saved successfully. + Opcje zostały pomyślnie zapisane. + + + + Invalid Source + Nieprawidłowe źródło + + + + The selected source is invalid. + Wybrane źródło jest nieprawidłowe. + + + + File Exists + Plik istnieje + + + + File already exists. Do you want to replace it? + Plik już istnieje. Czy chcesz go zastąpić? + + + + Failed to save file: + Nie udało się zapisać pliku: + + + + Failed to download file: + Nie udało się pobrać pliku: + + + + Cheats Not Found + Nie znaleziono kodów + + + + CheatsNotFound_MSG + Nie znaleziono kodów do tej gry w tej wersji wybranego repozytorium.Spróbuj innego repozytorium lub innej wersji gry. + + + + Cheats Downloaded Successfully + Kody pobrane pomyślnie + + + + CheatsDownloadedSuccessfully_MSG + Pomyślnie pobrano kody dla tej wersji gry z wybranego repozytorium. Możesz spróbować pobrać z innego repozytorium. Jeśli jest dostępne, możesz również użyć go, wybierając plik z listy. + + + + Failed to save: + Nie udało się zapisać: + + + + Failed to download: + Nie udało się pobrać: + + + + Download Complete + Pobieranie zakończone + + + + DownloadComplete_MSG + Poprawki zostały pomyślnie pobrane! Wszystkie dostępne poprawki dla wszystkich gier zostały pobrane. Nie ma potrzeby pobierania ich osobno dla każdej gry, która ma kody. + + + + Failed to parse JSON data from HTML. + Nie udało się sparsować danych JSON z HTML. + + + + Failed to retrieve HTML page. + Nie udało się pobrać strony HTML. + + + + Failed to open file: + Nie udało się otworzyć pliku: + + + + XML ERROR: + BŁĄD XML: + + + + Failed to open files.json for writing + Nie udało się otworzyć pliku files.json do zapisu + + + + Author: + Autor: + + + + Directory does not exist: + Katalog nie istnieje: + + + + Directory does not exist: %1 + Katalog nie istnieje: %1 + + + + Failed to parse JSON: + Nie udało się sparsować JSON: + + + \ No newline at end of file diff --git a/src/qt_gui/translations/pt_BR.ts b/src/qt_gui/translations/pt_BR.ts index c98d84410..c198d1fd3 100644 --- a/src/qt_gui/translations/pt_BR.ts +++ b/src/qt_gui/translations/pt_BR.ts @@ -81,67 +81,72 @@ GuiContextMenus - + Create Shortcut Criar Atalho - + Open Game Folder Abrir Pasta do Jogo - + + Cheats / Patches + Cheats / Patches + + + SFO Viewer Visualizador de SFO - + Trophy Viewer Visualizador de Troféu - + Copy info Copiar informação - + Copy Name Copiar Nome - + Copy Serial Copiar Serial - + Copy All Copiar Tudo - + Shortcut creation Criação de atalho - + Shortcut created successfully!\n %1 Atalho criado com sucesso!\n %1 - + Error Erro - + Error creating shortcut!\n %1 Erro ao criar atalho!\n %1 - + Install PKG Instalar PKG @@ -248,6 +253,11 @@ Game Install Directory Diretório de Instalação de Jogos + + + Download Cheats/Patches + Baixar Trapaças / Patches + Dump Game List @@ -488,4 +498,395 @@ Ativar Depuração por RenderDoc + + MainWindow + + + * Unsupported Vulkan Version + * Versão Vulkan não suportada + + + + Download Cheats For All Installed Games + Baixar Trapaças para todos os jogos instalados + + + + Download Patches For All Games + Baixar Patches para todos os jogos + + + + Download Complete + Download Completo + + + + You have downloaded cheats for all the games you have installed. + Você baixou trapaças para todos os jogos que instalou. + + + + Patches Downloaded Successfully! + Patches Baixados com Sucesso! + + + + All Patches available for all games have been downloaded. + Todos os patches disponíveis para todos os jogos foram baixados. + + + + Games: + Jogos: + + + + PKG File (*.PKG) + Arquivo PKG (*.PKG) + + + + ELF files (*.bin *.elf *.oelf) + Arquivos ELF (*.bin *.elf *.oelf) + + + + Game Boot + Inicialização do Jogo + + + + Only one file can be selected! + Apenas um arquivo pode ser selecionado! + + + + PKG Extraction + Extração de PKG + + + + Patch detected!\nPKG and Game versions match!: %1\nWould you like + Patch detectado!\nVersões PKG e do Jogo correspondem!: %1\nGostaria de + + + + to overwrite? + substituir? + + + + Patch detected!\nPKG Version %1 is older + Patch detectado!\nVersão PKG %1 é mais antiga + + + + than installed version!: %2\nWould you like + do que a versão instalada!: %2\nGostaria de + + + + to overwrite? + substituir? + + + + Patch detected!\nGame is installed: %1\nWould you like + Patch detectado!\nJogo está instalado: %1\nGostaria de + + + + to install Patch: %2? + instalar o Patch: %2? + + + + Game already installed\n%1\nWould you like to overwrite? + Jogo já instalado\n%1\nGostaria de substituir? + + + + PKG is a patch, please install the game first! + PKG é um patch, por favor, instale o jogo primeiro! + + + + PKG ERROR + ERRO PKG + + + + Extracting PKG %1/%2 + Extraindo PKG %1/%2 + + + + Extraction Finished + Extração Concluída + + + + Game successfully installed at %1 + Jogo instalado com sucesso em %1 + + + + File doesn't appear to be a valid PKG file + O arquivo não parece ser um arquivo PKG válido + + + + CheatsPatches + + + Cheats / Patches + Trapaças / Patches + + + + defaultTextEdit_MSG + Trapaças/Patches são experimentais.\nUse com cautela.\n\nBaixe as trapaças individualmente selecionando o repositório e clicando no botão de download.\nNa aba Patches, você pode baixar todos os Patches de uma vez, escolher qual deseja usar e salvar a opção.\n\nComo não desenvolvemos as Trapaças/Patches,\npor favor, reporte problemas relacionados ao autor da trapaça.\n\nCriou uma nova trapaça? Visite:\nhttps://github.com/shadps4-emu/ps4_cheats + + + + No Image Available + Imagem Não Disponível + + + + Serial: + Série: + + + + Version: + Versão: + + + + Size: + Tamanho: + + + + Select Cheat File: + Selecione o Arquivo de Trapaça: + + + + Repository: + Repositório: + + + + Download Cheats + Baixar Trapaças + + + + Delete File + Excluir Arquivo + + + + No files selected. + Nenhum arquivo selecionado. + + + + You can delete the cheats you don't want after downloading them. + Você pode excluir as trapaças que não deseja após baixá-las. + + + + Do you want to delete the selected file?\n%1 + Deseja excluir o arquivo selecionado?\n%1 + + + + Select Patch File: + Selecione o Arquivo de Patch: + + + + Download Patches + Baixar Patches + + + + Save + Salvar + + + + Cheats + Trapaças + + + + Patches + Patches + + + + Error + Erro + + + + No patch selected. + Nenhum patch selecionado. + + + + Unable to open files.json for reading. + Não foi possível abrir files.json para leitura. + + + + No patch file found for the current serial. + Nenhum arquivo de patch encontrado para a série atual. + + + + Unable to open the file for reading. + Não foi possível abrir o arquivo para leitura. + + + + Unable to open the file for writing. + Não foi possível abrir o arquivo para gravação. + + + + Failed to parse XML: + Falha ao analisar XML: + + + + Success + Sucesso + + + + Options saved successfully. + Opções salvas com sucesso. + + + + Invalid Source + Fonte Inválida + + + + The selected source is invalid. + A fonte selecionada é inválida. + + + + File Exists + Arquivo Existe + + + + File already exists. Do you want to replace it? + O arquivo já existe. Deseja substituí-lo? + + + + Failed to save file: + Falha ao salvar o arquivo: + + + + Failed to download file: + Falha ao baixar o arquivo: + + + + Cheats Not Found + Trapaças Não Encontradas + + + + CheatsNotFound_MSG + Nenhuma trapaça encontrada para este jogo nesta versão do repositório selecionado, tente outro repositório ou uma versão diferente do jogo. + + + + Cheats Downloaded Successfully + Trapaças Baixadas com Sucesso + + + + CheatsDownloadedSuccessfully_MSG + Você baixou as trapaças com sucesso. Para esta versão do jogo a partir do repositório selecionado.Você pode tentar baixar de outro repositório, se estiver disponível, também será possível usá-lo selecionando o arquivo da lista. + + + + Failed to save: + Falha ao salvar: + + + + Failed to download: + Falha ao baixar: + + + + Download Complete + Download Completo + + + + DownloadComplete_MSG + Patches Baixados com Sucesso! Todos os patches disponíveis para todos os jogos foram baixados, não é necessário baixá-los individualmente para cada jogo como acontece com as Trapaças. + + + + Failed to parse JSON data from HTML. + Falha ao analisar dados JSON do HTML. + + + + Failed to retrieve HTML page. + Falha ao recuperar a página HTML. + + + + Failed to open file: + Falha ao abrir o arquivo: + + + + XML ERROR: + ERRO XML: + + + + Failed to open files.json for writing + Falha ao abrir files.json para gravação + + + + Author: + Autor: + + + + Directory does not exist: + Diretório não existe: + + + + Failed to open files.json for reading. + Falha ao abrir files.json para leitura. + + + + Name: + Nome: + + \ No newline at end of file diff --git a/src/qt_gui/translations/ro_RO.ts b/src/qt_gui/translations/ro_RO.ts index c7dfae1b4..3463182f5 100644 --- a/src/qt_gui/translations/ro_RO.ts +++ b/src/qt_gui/translations/ro_RO.ts @@ -81,67 +81,72 @@ GuiContextMenus - + Create Shortcut Create Shortcut - + Open Game Folder Open Game Folder - + + Trapaças / Patches + Coduri / Patch-uri + + + SFO Viewer SFO Viewer - + Trophy Viewer Trophy Viewer - + Copy info Copy info - + Copy Name Copy Name - + Copy Serial Copy Serial - + Copy All Copy All - + Shortcut creation Shortcut creation - + Shortcut created successfully!\n %1 Shortcut created successfully!\n %1 - + Error Error - + Error creating shortcut!\n %1 Error creating shortcut!\n %1 - + Install PKG Install PKG @@ -248,6 +253,11 @@ Game Install Directory Game Install Directory + + + Download Cheats/Patches + Descarcă Coduri / Patch-uri + Dump Game List @@ -487,5 +497,396 @@ Enable RenderDoc Debugging Enable RenderDoc Debugging + + + MainWindow + + + * Unsupported Vulkan Version + * Versiune Vulkan nesuportată + + + + Download Cheats For All Installed Games + Descarcă Cheats pentru toate jocurile instalate + + + + Download Patches For All Games + Descarcă Patches pentru toate jocurile + + + + Download Complete + Descărcare completă + + + + You have downloaded cheats for all the games you have installed. + Ai descărcat cheats pentru toate jocurile instalate. + + + + Patches Downloaded Successfully! + Patches descărcate cu succes! + + + + All Patches available for all games have been downloaded. + Toate Patches disponibile pentru toate jocurile au fost descărcate. + + + + Games: + Jocuri: + + + + PKG File (*.PKG) + Fișier PKG (*.PKG) + + + + ELF files (*.bin *.elf *.oelf) + Fișiere ELF (*.bin *.elf *.oelf) + + + + Game Boot + Boot Joc + + + + Only one file can be selected! + Numai un fișier poate fi selectat! + + + + PKG Extraction + Extracție PKG + + + + Patch detected!\nPKG and Game versions match!: %1\nWould you like + Patch detectat!\nVersiunile PKG și Joc se potrivesc!: %1\nAi dori să + + + + to overwrite? + să suprascrii? + + + + Patch detected!\nPKG Version %1 is older + Patch detectat!\nVersiunea PKG %1 este mai veche + + + + than installed version!: %2\nWould you like + decât versiunea instalată!: %2\nAi dori să + + + + to overwrite? + să suprascrii? + + + + Patch detected!\nGame is installed: %1\nWould you like + Patch detectat!\nJocul este instalat: %1\nAi dori să + + + + to install Patch: %2? + să instalezi Patch-ul: %2? + + + + Game already installed\n%1\nWould you like to overwrite? + Jocul este deja instalat\n%1\nAi dori să suprascrii? + + + + PKG is a patch, please install the game first! + PKG este un patch, te rugăm să instalezi mai întâi jocul! + + + + PKG ERROR + EROARE PKG + + + + Extracting PKG %1/%2 + Extracție PKG %1/%2 + + + + Extraction Finished + Extracție terminată + + + + Game successfully installed at %1 + Jocul a fost instalat cu succes la %1 + + + + File doesn't appear to be a valid PKG file + Fișierul nu pare să fie un fișier PKG valid + + + + CheatsPatches + + + Cheats / Patches + Cheats / Patches + + + + defaultTextEdit_MSG + Cheats/Patches sunt experimentale.\nUtilizați cu prudență.\n\nDescărcați cheats individual prin selectarea depozitului și făcând clic pe butonul de descărcare.\nÎn fila Patches, puteți descărca toate patch-urile deodată, alege pe cele pe care doriți să le utilizați și salvați selecția.\n\nDeoarece nu dezvoltăm Cheats/Patches,\nte rugăm să raportezi problemele autorului cheat-ului.\n\nAi creat un nou cheat? Vizitează:\nhttps://github.com/shadps4-emu/ps4_cheats + + + + No Image Available + Nu este disponibilă imaginea + + + + Serial: + Serial: + + + + Version: + Versiune: + + + + Size: + Dimensiune: + + + + Select Cheat File: + Selectează fișierul Cheat: + + + + Repository: + Repository: + + + + Download Cheats + Descarcă Cheats + + + + Delete File + Șterge Fișierul + + + + No files selected. + Nu sunt fișiere selectate. + + + + You can delete the cheats you don't want after downloading them. + Poti șterge cheats-urile pe care nu le dorești după ce le-ai descărcat. + + + + Do you want to delete the selected file?\n%1 + Vrei să ștergi fișierul selectat?\n%1 + + + + Select Patch File: + Selectează fișierul Patch: + + + + Download Patches + Descarcă Patches + + + + Save + Salvează + + + + Cheats + Cheats + + + + Patches + Patches + + + + Error + Eroare + + + + No patch selected. + Nu este selectat niciun patch. + + + + Unable to open files.json for reading. + Imposibil de deschis files.json pentru citire. + + + + No patch file found for the current serial. + Nu s-a găsit niciun fișier patch pentru serialul curent. + + + + Unable to open the file for reading. + Imposibil de deschis fișierul pentru citire. + + + + Unable to open the file for writing. + Imposibil de deschis fișierul pentru scriere. + + + + Failed to parse XML: + Nu s-a reușit pararea XML: + + + + Success + Succes + + + + Options saved successfully. + Opțiunile au fost salvate cu succes. + + + + Invalid Source + Sursă invalidă + + + + The selected source is invalid. + Sursa selectată este invalidă. + + + + File Exists + Fișier existent + + + + File already exists. Do you want to replace it? + Fișierul există deja. Vrei să-l înlocuiești? + + + + Failed to save file: + Nu s-a reușit salvarea fișierului: + + + + Failed to download file: + Nu s-a reușit descărcarea fișierului: + + + + Cheats Not Found + Cheats Nu au fost găsite + + + + CheatsNotFound_MSG + Nu au fost găsite cheats pentru acest joc în această versiune a repository-ului selectat, încearcă un alt repository sau o versiune diferită a jocului. + + + + Cheats Downloaded Successfully + Cheats descărcate cu succes + + + + CheatsDownloadedSuccessfully_MSG + Ai descărcat cu succes cheats-urile pentru această versiune a jocului din repository-ul selectat. Poți încerca descărcarea din alt repository; dacă este disponibil, va fi posibil să-l folosești selectând fișierul din listă. + + + + Failed to save: + Nu s-a reușit salvarea: + + + + Failed to download: + Nu s-a reușit descărcarea: + + + + Download Complete + Descărcare completă + + + + DownloadComplete_MSG + Patches descărcate cu succes! Toate Patches disponibile pentru toate jocurile au fost descărcate; nu este nevoie să le descarci individual pentru fiecare joc, așa cum se întâmplă cu Cheats. + + + + Failed to parse JSON data from HTML. + Nu s-a reușit pararea datelor JSON din HTML. + + + + Failed to retrieve HTML page. + Nu s-a reușit obținerea paginii HTML. + + + + Failed to open file: + Nu s-a reușit deschiderea fișierului: + + + + XML ERROR: + EROARE XML: + + + + Failed to open files.json for writing + Nu s-a reușit deschiderea files.json pentru scriere + + + + Author: + Autor: + + + + Directory does not exist: + Directorul nu există: + + + + Failed to open files.json for reading. + Nu s-a reușit deschiderea files.json pentru citire. + + + + Name: + Nume: + \ No newline at end of file diff --git a/src/qt_gui/translations/ru_RU.ts b/src/qt_gui/translations/ru_RU.ts index 46a30cdeb..a71533a35 100644 --- a/src/qt_gui/translations/ru_RU.ts +++ b/src/qt_gui/translations/ru_RU.ts @@ -81,67 +81,72 @@ GuiContextMenus - + Create Shortcut Создать ярлык - + Open Game Folder Открыть папку с игрой - + + Cheats / Patches + Читы / Патчи + + + SFO Viewer Просмотр SFO - + Trophy Viewer Просмотр трофеев - + Copy info Копировать информацию - + Copy Name Копировать имя - + Copy Serial Копировать серийный номер - + Copy All Копировать все - + Shortcut creation Создание ярлыка - + Shortcut created successfully!\n %1 Ярлык создан успешно!\n %1 - + Error Ошибка - + Error creating shortcut!\n %1 Ошибка создания ярлыка!\n %1 - + Install PKG Установить PKG @@ -248,6 +253,11 @@ Game Install Directory Каталог установки игры + + + Download Cheats/Patches + Скачать Читы / Патчи + Dump Game List @@ -488,4 +498,395 @@ Включить отладку RenderDoc - + + MainWindow + + + * Unsupported Vulkan Version + * Неподдерживаемая версия Vulkan + + + + Download Cheats For All Installed Games + Скачать читы для всех установленных игр + + + + Download Patches For All Games + Скачать патчи для всех игр + + + + Download Complete + Скачивание завершено + + + + You have downloaded cheats for all the games you have installed. + Вы скачали читы для всех установленных игр. + + + + Patches Downloaded Successfully! + Патчи успешно скачаны! + + + + All Patches available for all games have been downloaded. + Все доступные патчи для всех игр были скачаны. + + + + Games: + Игры: + + + + PKG File (*.PKG) + Файл PKG (*.PKG) + + + + ELF files (*.bin *.elf *.oelf) + Файл ELF (*.bin *.elf *.oelf) + + + + Game Boot + Запуск игры + + + + Only one file can be selected! + Можно выбрать только один файл! + + + + PKG Extraction + Извлечение PKG + + + + Patch detected!\nPKG and Game versions match!: %1\nWould you like + Обнаружен патч!\nВерсии PKG и игры совпадают!: %1\nХотите + + + + to overwrite? + перезаписать? + + + + Patch detected!\nPKG Version %1 is older + Обнаружен патч!\nВерсия PKG %1 устарела + + + + than installed version!: %2\nWould you like + по сравнению с установленной версией!: %2\nХотите + + + + to overwrite? + перезаписать? + + + + Patch detected!\nGame is installed: %1\nWould you like + Обнаружен патч!\nИгра установлена: %1\nХотите + + + + to install Patch: %2? + установить патч: %2? + + + + Game already installed\n%1\nWould you like to overwrite? + Игра уже установлена\n%1\nХотите перезаписать? + + + + PKG is a patch, please install the game first! + PKG - это патч, сначала установите игру! + + + + PKG ERROR + ОШИБКА PKG + + + + Extracting PKG %1/%2 + Извлечение PKG %1/%2 + + + + Extraction Finished + Извлечение завершено + + + + Game successfully installed at %1 + Игра успешно установлена по адресу %1 + + + + File doesn't appear to be a valid PKG file + Файл не является допустимым файлом PKG + + + + CheatsPatches + + + Cheats / Patches + Читы / Патчи + + + + defaultTextEdit_MSG + Cheats/Patches sunt experimentale.\nUtilizați cu prudență.\n\nDescărcați cheats individual prin selectarea depozitului și făcând clic pe butonul de descărcare.\nÎn fila Patches, puteți descărca toate patch-urile deodată, alege pe cele pe care doriți să le utilizați și salvați selecția.\n\nDeoarece nu dezvoltăm Cheats/Patches,\nte rugăm să raportezi problemele autorului cheat-ului.\n\nAi creat un nou cheat? Vizitează:\nhttps://github.com/shadps4-emu/ps4_cheats + + + + No Image Available + Изображение недоступно + + + + Serial: + Серийный номер: + + + + Version: + Версия: + + + + Size: + Размер: + + + + Select Cheat File: + Выберите файл чита: + + + + Repository: + Репозиторий: + + + + Download Cheats + Скачать читы + + + + Delete File + Удалить файл + + + + No files selected. + Файлы не выбраны. + + + + You can delete the cheats you don't want after downloading them. + Вы можете удалить ненужные читы после их скачивания. + + + + Do you want to delete the selected file?\n%1 + Вы хотите удалить выбранный файл?\n%1 + + + + Select Patch File: + Выберите файл патча: + + + + Download Patches + Скачать патчи + + + + Save + Сохранить + + + + Cheats + Читы + + + + Patches + Патчи + + + + Error + Ошибка + + + + No patch selected. + Патч не выбран. + + + + Unable to open files.json for reading. + Не удалось открыть файл files.json для чтения. + + + + No patch file found for the current serial. + Не найден файл патча для текущего серийного номера. + + + + Unable to open the file for reading. + Не удалось открыть файл для чтения. + + + + Unable to open the file for writing. + Не удалось открыть файл для записи. + + + + Failed to parse XML: + Не удалось разобрать XML: + + + + Success + Успех + + + + Options saved successfully. + Опции успешно сохранены. + + + + Invalid Source + Неверный источник + + + + The selected source is invalid. + Выбранный источник недействителен. + + + + File Exists + Файл существует + + + + File already exists. Do you want to replace it? + Файл уже существует. Хотите заменить его? + + + + Failed to save file: + Не удалось сохранить файл: + + + + Failed to download file: + Не удалось скачать файл: + + + + Cheats Not Found + Читы не найдены + + + + CheatsNotFound_MSG + Читы не найдены для этой игры в выбранном репозитории. Попробуйте другой репозиторий или другую версию игры. + + + + Cheats Downloaded Successfully + Читы успешно скачаны + + + + CheatsDownloadedSuccessfully_MSG + Вы успешно скачали читы для этой версии игры из выбранного репозитория. Вы можете попробовать скачать из другого репозитория. Если он доступен, его также можно будет использовать, выбрав файл из списка. + + + + Failed to save: + Не удалось сохранить: + + + + Failed to download: + Не удалось скачать: + + + + Download Complete + Скачивание завершено + + + + DownloadComplete_MSG + Патчи успешно скачаны! Все доступные патчи для всех игр были скачаны, нет необходимости скачивать их по отдельности для каждой игры, как это происходит с читами. + + + + Failed to parse JSON data from HTML. + Не удалось разобрать данные JSON из HTML. + + + + Failed to retrieve HTML page. + Не удалось получить HTML-страницу. + + + + Failed to open file: + Не удалось открыть файл: + + + + XML ERROR: + ОШИБКА XML: + + + + Failed to open files.json for writing + Не удалось открыть файл files.json для записи + + + + Author: + Автор: + + + + Directory does not exist: + Каталог не существует: + + + + Failed to open files.json for reading. + Не удалось открыть файл files.json для чтения. + + + + Name: + Имя: + + + \ No newline at end of file diff --git a/src/qt_gui/translations/tr_TR.ts b/src/qt_gui/translations/tr_TR.ts index ea5d0765f..514b9af7e 100644 --- a/src/qt_gui/translations/tr_TR.ts +++ b/src/qt_gui/translations/tr_TR.ts @@ -81,67 +81,72 @@ GuiContextMenus - + Create Shortcut Kısayol Oluştur - + Open Game Folder Oyun Klasörünü Aç - + + Cheats / Patches + Hileler / Yamanlar + + + SFO Viewer SFO Görüntüleyici - + Trophy Viewer Kupa Görüntüleyici - + Copy info Bilgiyi Kopyala - + Copy Name Adı Kopyala - + Copy Serial Seri Numarasını Kopyala - + Copy All Tümünü Kopyala - + Shortcut creation Kısayol oluşturma - + Shortcut created successfully!\n %1 Kısayol başarıyla oluşturuldu!\n %1 - + Error Hata - + Error creating shortcut!\n %1 Kısayol oluşturulurken hata oluştu!\n %1 - + Install PKG PKG Yükle @@ -248,6 +253,11 @@ Game Install Directory Oyun Kurulum Klasörü + + + Download Cheats/Patches + Hileler / Yamanlar İndir + Dump Game List @@ -488,4 +498,466 @@ RenderDoc Hata Ayıklamayı Etkinleştir + + MainWindow + + + * Unsupported Vulkan Version + * Desteklenmeyen Vulkan Sürümü + + + + Download Cheats For All Installed Games + Tüm Yüklenmiş Oyunlar İçin Hileleri İndir + + + + Download Patches For All Games + Tüm Oyunlar İçin Yamanları İndir + + + + Download Complete + İndirme Tamamlandı + + + + You have downloaded cheats for all the games you have installed. + Yüklediğiniz tüm oyunlar için hileleri indirdiniz. + + + + Patches Downloaded Successfully! + Yamalar Başarıyla İndirildi! + + + + All Patches available for all games have been downloaded. + Tüm oyunlar için mevcut tüm yamalar indirildi. + + + + Games: + Oyunlar: + + + + PKG File (*.PKG) + PKG Dosyası (*.PKG) + + + + ELF files (*.bin *.elf *.oelf) + ELF Dosyaları (*.bin *.elf *.oelf) + + + + Game Boot + Oyun Başlatma + + + + Only one file can be selected! + Sadece bir dosya seçilebilir! + + + + PKG Extraction + PKG Çıkartma + + + + Patch detected!\nPKG and Game versions match!: %1\nWould you like + Yama tespit edildi!\nPKG ve Oyun sürümleri uyuyor!: %1\nÜzerine yazmak ister misiniz? + + + + to overwrite? + üzerine yazmak? + + + + Patch detected!\nPKG Version %1 is older + Yama tespit edildi!\nPKG Sürümü %1 daha eski + + + + than installed version!: %2\nWould you like + yüklü sürümden!: %2\nÜzerine yazmak ister misiniz? + + + + to overwrite? + üzerine yazmak? + + + + Patch detected!\nGame is installed: %1\nWould you like + Yama tespit edildi!\nOyun yüklü: %1\nÜzerine yazmak ister misiniz? + + + + to install Patch: %2? + Yamayı kurmak ister misiniz: %2? + + + + Game already installed\n%1\nWould you like to overwrite? + Oyun zaten yüklü\n%1\nÜzerine yazmak ister misiniz? + + + + PKG is a patch, please install the game first! + PKG bir yama, lütfen önce oyunu yükleyin! + + + + PKG ERROR + PKG HATASI + + + + Extracting PKG %1/%2 + PKG Çıkarılıyor %1/%2 + + + + Extraction Finished + Çıkarma Tamamlandı + + + + Game successfully installed at %1 + Oyun başarıyla %1 konumuna yüklendi + + + + File doesn't appear to be a valid PKG file + Dosya geçerli bir PKG dosyası gibi görünmüyor + + + + CheatsPatches + + + Cheats / Patches + Hileler / Yamalar + + + + defaultTextEdit_MSG + Cheats/Patches deneysel niteliktedir.\nDikkatli kullanın.\n\nCheat'leri ayrı ayrı indirerek, depo seçerek ve indirme düğmesine tıklayarak indirin.\nPatches sekmesinde tüm patch'leri bir kerede indirebilir, hangi patch'leri kullanmak istediğinizi seçebilir ve seçiminizi kaydedebilirsiniz.\n\nCheats/Patches'i geliştirmediğimiz için,\nproblemleri cheat yazarına bildirin.\n\nYeni bir cheat mi oluşturduğunuz? Şu adresi ziyaret edin:\nhttps://github.com/shadps4-emu/ps4_cheats + + + + No Image Available + Görüntü Mevcut Değil + + + + Serial: + Seri Numarası: + + + + Version: + Sürüm: + + + + Size: + Boyut: + + + + Select Cheat File: + Hile Dosyasını Seçin: + + + + Repository: + Depo: + + + + Download Cheats + Hileleri İndir + + + + Confirm Delete + Silme Onayı + + + + Are you sure you want to delete the selected cheat?\n%1 + Seçilen hileyi silmek istediğinizden emin misiniz?\n%1 + + + + You can delete the cheats you don't want after downloading them. + İndirdikten sonra istemediğiniz hileleri silebilirsiniz. + + + + Do you want to delete the selected file?\n%1 + Seçilen dosyayı silmek istiyor musunuz?\n%1 + + + + Select Patch File: + Yama Dosyasını Seçin: + + + + Download Patches + Yamaları İndir + + + + Save + Kaydet + + + + Cheats + Hileler + + + + Patches + Yamalar + + + + Error + Hata + + + + No patch selected. + Hiç yama seçilmedi. + + + + Unable to open files.json for reading. + files.json dosyasını okumak için açılamadı. + + + + No patch file found for the current serial. + Mevcut seri numarası için hiç yama dosyası bulunamadı. + + + + Unable to open the file for reading. + Dosya okumak için açılamadı. + + + + Unable to open the file for writing. + Dosya yazmak için açılamadı. + + + + Failed to parse XML: + XML ayrıştırılamadı: + + + + Success + Başarı + + + + Options saved successfully. + Ayarlar başarıyla kaydedildi. + + + + Invalid Source + Geçersiz Kaynak + + + + The selected source is invalid. + Seçilen kaynak geçersiz. + + + + File Exists + Dosya Var + + + + File already exists. Do you want to replace it? + Dosya zaten var. Üzerine yazmak ister misiniz? + + + + Failed to save file: + Dosya kaydedilemedi: + + + + Failed to download file: + Dosya indirilemedi: + + + + Cheats Not Found + Hileler Bulunamadı + + + + CheatsNotFound_MSG + Bu oyun için seçilen depoda hile bulunamadı.Başka bir depo veya oyun sürümü deneyin. + + + + Cheats Downloaded Successfully + Hileler Başarıyla İndirildi + + + + CheatsDownloadedSuccessfully_MSG + Bu oyun sürümü için hileleri başarıyla indirdiniz. Başka bir depodan indirmeyi deneyebilirsiniz. Eğer mevcutsa, listeden dosyayı seçerek de kullanılabilir. + + + + Failed to save: + Kaydedilemedi: + + + + Failed to download: + İndirilemedi: + + + + Download Complete + İndirme Tamamlandı + + + + DownloadComplete_MSG + Yamalar başarıyla indirildi! Tüm oyunlar için mevcut tüm yamalar indirildi, her oyun için ayrı ayrı indirme yapmanız gerekmez, hilelerle olduğu gibi. + + + + Failed to parse JSON data from HTML. + HTML'den JSON verileri ayrıştırılamadı. + + + + Failed to retrieve HTML page. + HTML sayfası alınamadı. + + + + Failed to open file: + Dosya açılamadı: + + + + XML ERROR: + XML HATASI: + + + + Failed to open files.json for writing + files.json dosyası yazmak için açılamadı + + + + Author: + Yazar: + + + + Directory does not exist: + Klasör mevcut değil: + + + + Failed to open files.json for reading. + files.json dosyası okumak için açılamadı. + + + + Name: + İsim: + + + + Version: + Sürüm: + + + + Size: + Boyut: + + + + LangDialog + + + Language Settings + Dil Ayarları + + + + Select Language: + Dil Seçin: + + + + Restart Required + Yeniden Başlatma Gerekiyor + + + + Changes will take effect after restarting the application. + Değişiklikler uygulama yeniden başlatıldığında geçerli olacaktır. + + + + SettingsDialog + + + Settings + Ayarlar + + + + General + Genel + + + + Cheats + Hileler + + + + Update + Güncelleme + + + + Save + Kaydet + + + + Reset to Default + Varsayılana Sıfırla + + + + Apply Changes + Değişiklikleri Uygula + + \ No newline at end of file diff --git a/src/qt_gui/translations/vi_VN.ts b/src/qt_gui/translations/vi_VN.ts index 08af9b351..977b6760c 100644 --- a/src/qt_gui/translations/vi_VN.ts +++ b/src/qt_gui/translations/vi_VN.ts @@ -81,67 +81,72 @@ GuiContextMenus - + Create Shortcut Create Shortcut - + Open Game Folder Open Game Folder - + + Cheats / Patches + Mẹo / Bản vá + + + SFO Viewer SFO Viewer - + Trophy Viewer Trophy Viewer - + Copy info Copy info - + Copy Name Copy Name - + Copy Serial Copy Serial - + Copy All Copy All - + Shortcut creation Shortcut creation - + Shortcut created successfully!\n %1 Shortcut created successfully!\n %1 - + Error Error - + Error creating shortcut!\n %1 Error creating shortcut!\n %1 - + Install PKG Install PKG @@ -248,6 +253,11 @@ Game Install Directory Game Install Directory + + + Download Cheats/Patches + Tải Mẹo / Bản vá + Dump Game List @@ -488,4 +498,395 @@ Enable RenderDoc Debugging + + MainWindow + + + * Unsupported Vulkan Version + * Phiên bản Vulkan không được hỗ trợ + + + + Download Cheats For All Installed Games + Tải xuống cheat cho tất cả các trò chơi đã cài đặt + + + + Download Patches For All Games + Tải xuống bản vá cho tất cả các trò chơi + + + + Download Complete + Tải xuống hoàn tất + + + + You have downloaded cheats for all the games you have installed. + Bạn đã tải xuống cheat cho tất cả các trò chơi mà bạn đã cài đặt. + + + + Patches Downloaded Successfully! + Bản vá đã tải xuống thành công! + + + + All Patches available for all games have been downloaded. + Tất cả các bản vá có sẵn cho tất cả các trò chơi đã được tải xuống. + + + + Games: + Trò chơi: + + + + PKG File (*.PKG) + Tệp PKG (*.PKG) + + + + ELF files (*.bin *.elf *.oelf) + Tệp ELF (*.bin *.elf *.oelf) + + + + Game Boot + Khởi động trò chơi + + + + Only one file can be selected! + Chỉ có thể chọn một tệp duy nhất! + + + + PKG Extraction + Giải nén PKG + + + + Patch detected!\nPKG and Game versions match!: %1\nWould you like + Đã phát hiện bản vá!\nPhiên bản PKG và trò chơi khớp!: %1\nBạn có muốn + + + + to overwrite? + ghi đè không? + + + + Patch detected!\nPKG Version %1 is older + Đã phát hiện bản vá!\nPhiên bản PKG %1 cũ hơn + + + + than installed version!: %2\nWould you like + so với phiên bản đã cài đặt!: %2\nBạn có muốn + + + + to overwrite? + ghi đè không? + + + + Patch detected!\nGame is installed: %1\nWould you like + Đã phát hiện bản vá!\nTrò chơi đã được cài đặt: %1\nBạn có muốn + + + + to install Patch: %2? + cài đặt bản vá: %2? + + + + Game already installed\n%1\nWould you like to overwrite? + Trò chơi đã được cài đặt\n%1\nBạn có muốn ghi đè không? + + + + PKG is a patch, please install the game first! + PKG là bản vá, vui lòng cài đặt trò chơi trước! + + + + PKG ERROR + LOI PKG + + + + Extracting PKG %1/%2 + Đang giải nén PKG %1/%2 + + + + Extraction Finished + Giải nén hoàn tất + + + + Game successfully installed at %1 + Trò chơi đã được cài đặt thành công tại %1 + + + + File doesn't appear to be a valid PKG file + Tệp không có vẻ là tệp PKG hợp lệ + + + + CheatsPatches + + + Cheats / Patches + Cheat / Bản vá + + + + defaultTextEdit_MSG + Cheats/Patches là các tính năng thử nghiệm.\nHãy sử dụng cẩn thận.\n\nTải xuống các cheat riêng lẻ bằng cách chọn kho lưu trữ và nhấp vào nút tải xuống.\nTại tab Patches, bạn có thể tải xuống tất cả các patch cùng một lúc, chọn cái nào bạn muốn sử dụng và lưu lựa chọn của mình.\n\nVì chúng tôi không phát triển Cheats/Patches,\nxin vui lòng báo cáo các vấn đề cho tác giả cheat.\n\nBạn đã tạo ra một cheat mới? Truy cập:\nhttps://github.com/shadps4-emu/ps4_cheats + + + + No Image Available + Không có hình ảnh + + + + Serial: + Số seri: + + + + Version: + Phiên bản: + + + + Size: + Kích thước: + + + + Select Cheat File: + Chọn tệp Cheat: + + + + Repository: + Kho lưu trữ: + + + + Download Cheats + Tải xuống Cheat + + + + Delete File + Xóa tệp + + + + No files selected. + Không có tệp nào được chọn. + + + + You can delete the cheats you don't want after downloading them. + Bạn có thể xóa các cheat không muốn sau khi tải xuống. + + + + Do you want to delete the selected file?\n%1 + Bạn có muốn xóa tệp đã chọn?\n%1 + + + + Select Patch File: + Chọn tệp Bản vá: + + + + Download Patches + Tải xuống Bản vá + + + + Save + Lưu + + + + Cheats + Cheat + + + + Patches + Bản vá + + + + Error + Lỗi + + + + No patch selected. + Không có bản vá nào được chọn. + + + + Unable to open files.json for reading. + Không thể mở files.json để đọc. + + + + No patch file found for the current serial. + Không tìm thấy tệp bản vá cho số seri hiện tại. + + + + Unable to open the file for reading. + Không thể mở tệp để đọc. + + + + Unable to open the file for writing. + Không thể mở tệp để ghi. + + + + Failed to parse XML: + Không thể phân tích XML: + + + + Success + Thành công + + + + Options saved successfully. + Các tùy chọn đã được lưu thành công. + + + + Invalid Source + Nguồn không hợp lệ + + + + The selected source is invalid. + Nguồn đã chọn không hợp lệ. + + + + File Exists + Tệp đã tồn tại + + + + File already exists. Do you want to replace it? + Tệp đã tồn tại. Bạn có muốn thay thế nó không? + + + + Failed to save file: + Không thể lưu tệp: + + + + Failed to download file: + Không thể tải xuống tệp: + + + + Cheats Not Found + Không tìm thấy Cheat + + + + CheatsNotFound_MSG + Không tìm thấy Cheat cho trò chơi này trong phiên bản kho lưu trữ đã chọn,hãy thử kho lưu trữ khác hoặc phiên bản khác của trò chơi. + + + + Cheats Downloaded Successfully + Cheat đã tải xuống thành công + + + + CheatsDownloadedSuccessfully_MSG + Bạn đã tải xuống các cheat thành công. Cho phiên bản trò chơi này từ kho lưu trữ đã chọn. Bạn có thể thử tải xuống từ kho lưu trữ khác, nếu có, bạn cũng có thể sử dụng bằng cách chọn tệp từ danh sách. + + + + Failed to save: + Không thể lưu: + + + + Failed to download: + Không thể tải xuống: + + + + Download Complete + Tải xuống hoàn tất + + + + DownloadComplete_MSG + Bản vá đã tải xuống thành công! Tất cả các bản vá có sẵn cho tất cả các trò chơi đã được tải xuống, không cần tải xuống riêng lẻ cho mỗi trò chơi như trong Cheat. + + + + Failed to parse JSON data from HTML. + Không thể phân tích dữ liệu JSON từ HTML. + + + + Failed to retrieve HTML page. + Không thể lấy trang HTML. + + + + Failed to open file: + Không thể mở tệp: + + + + XML ERROR: + LỖI XML: + + + + Failed to open files.json for writing + Không thể mở files.json để ghi + + + + Author: + Tác giả: + + + + Directory does not exist: + Thư mục không tồn tại: + + + + Failed to open files.json for reading. + Không thể mở files.json để đọc. + + + + Name: + Tên: + + \ No newline at end of file diff --git a/src/qt_gui/translations/zh_CN.ts b/src/qt_gui/translations/zh_CN.ts index 6f6392237..d5ace320d 100644 --- a/src/qt_gui/translations/zh_CN.ts +++ b/src/qt_gui/translations/zh_CN.ts @@ -81,67 +81,72 @@ GuiContextMenus - + Create Shortcut Create Shortcut - + Open Game Folder Open Game Folder - + + Cheats / Patches + Zuòbì / Bǔdīng + + + SFO Viewer SFO Viewer - + Trophy Viewer Trophy Viewer - + Copy info Copy info - + Copy Name Copy Name - + Copy Serial Copy Serial - + Copy All Copy All - + Shortcut creation Shortcut creation - + Shortcut created successfully!\n %1 Shortcut created successfully!\n %1 - + Error Error - + Error creating shortcut!\n %1 Error creating shortcut!\n %1 - + Install PKG Install PKG @@ -248,6 +253,11 @@ Game Install Directory Game Install Directory + + + Download Cheats/Patches + Xiàzài Zuòbì / Bǔdīng + Dump Game List @@ -488,4 +498,395 @@ Enable RenderDoc Debugging + + MainWindow + + + * Unsupported Vulkan Version + * 不支持的 Vulkan 版本 + + + + Download Cheats For All Installed Games + 下载所有已安装游戏的作弊码 + + + + Download Patches For All Games + 下载所有游戏的补丁 + + + + Download Complete + 下载完成 + + + + You have downloaded cheats for all the games you have installed. + 您已下载了所有已安装游戏的作弊码。 + + + + Patches Downloaded Successfully! + 补丁下载成功! + + + + All Patches available for all games have been downloaded. + 所有游戏的所有补丁都已下载。 + + + + Games: + 游戏: + + + + PKG File (*.PKG) + PKG 文件 (*.PKG) + + + + ELF files (*.bin *.elf *.oelf) + ELF 文件 (*.bin *.elf *.oelf) + + + + Game Boot + 游戏启动 + + + + Only one file can be selected! + 只能选择一个文件! + + + + PKG Extraction + PKG 解压 + + + + Patch detected!\nPKG and Game versions match!: %1\nWould you like + 检测到补丁!\nPKG 和游戏版本匹配:%1\n您想要 + + + + to overwrite? + 覆盖吗? + + + + Patch detected!\nPKG Version %1 is older + 检测到补丁!\nPKG 版本 %1 较旧 + + + + than installed version!: %2\nWould you like + 与已安装版本相比:%2\n您想要 + + + + to overwrite? + 覆盖吗? + + + + Patch detected!\nGame is installed: %1\nWould you like + 检测到补丁!\n游戏已安装:%1\n您想要 + + + + to install Patch: %2? + 安装补丁:%2? + + + + Game already installed\n%1\nWould you like to overwrite? + 游戏已安装\n%1\n您想要覆盖吗? + + + + PKG is a patch, please install the game first! + PKG 是一个补丁,请先安装游戏! + + + + PKG ERROR + PKG 错误 + + + + Extracting PKG %1/%2 + 正在解压 PKG %1/%2 + + + + Extraction Finished + 解压完成 + + + + Game successfully installed at %1 + 游戏成功安装在 %1 + + + + File doesn't appear to be a valid PKG file + 文件似乎不是有效的 PKG 文件 + + + + CheatsPatches + + + Cheats / Patches + 作弊码 / 补丁 + + + + defaultTextEdit_MSG + 作弊/补丁是实验性的。\n请小心使用。\n\n通过选择存储库并点击下载按钮,单独下载作弊程序。\n在“补丁”选项卡中,您可以一次性下载所有补丁,选择要使用的补丁并保存选择。\n\n由于我们不开发作弊程序/补丁,\n请将问题报告给作弊程序的作者。\n\n创建了新的作弊程序?访问:\nhttps://github.com/shadps4-emu/ps4_cheats + + + + No Image Available + 没有可用的图像 + + + + Serial: + 序列号: + + + + Version: + 版本: + + + + Size: + 大小: + + + + Select Cheat File: + 选择作弊码文件: + + + + Repository: + 存储库: + + + + Download Cheats + 下载作弊码 + + + + Delete File + 删除文件 + + + + No files selected. + 没有选择文件。 + + + + You can delete the cheats you don't want after downloading them. + 您可以在下载后删除不想要的作弊码。 + + + + Do you want to delete the selected file?\n%1 + 您要删除选中的文件吗?\n%1 + + + + Select Patch File: + 选择补丁文件: + + + + Download Patches + 下载补丁 + + + + Save + 保存 + + + + Cheats + 作弊码 + + + + Patches + 补丁 + + + + Error + 错误 + + + + No patch selected. + 没有选择补丁。 + + + + Unable to open files.json for reading. + 无法打开 files.json 进行读取。 + + + + No patch file found for the current serial. + 未找到当前序列号的补丁文件。 + + + + Unable to open the file for reading. + 无法打开文件进行读取。 + + + + Unable to open the file for writing. + 无法打开文件进行写入。 + + + + Failed to parse XML: + 解析 XML 失败: + + + + Success + 成功 + + + + Options saved successfully. + 选项已成功保存。 + + + + Invalid Source + 无效的来源 + + + + The selected source is invalid. + 选择的来源无效。 + + + + File Exists + 文件已存在 + + + + File already exists. Do you want to replace it? + 文件已存在。您要替换它吗? + + + + Failed to save file: + 保存文件失败: + + + + Failed to download file: + 下载文件失败: + + + + Cheats Not Found + 未找到作弊码 + + + + CheatsNotFound_MSG + 在所选存储库的版本中找不到该游戏的作弊码,请尝试其他存储库或游戏版本。 + + + + Cheats Downloaded Successfully + 作弊码下载成功 + + + + CheatsDownloadedSuccessfully_MSG + 您已成功下载了该游戏版本的作弊码 从所选存储库中。如果有,您还可以尝试从其他存储库下载,或通过从列表中选择文件来使用它们。 + + + + Failed to save: + 保存失败: + + + + Failed to download: + 下载失败: + + + + Download Complete + 下载完成 + + + + DownloadComplete_MSG + 补丁下载成功!所有可用的补丁已下载完成,无需像作弊码那样单独下载每个游戏的补丁。 + + + + Failed to parse JSON data from HTML. + 无法解析 HTML 中的 JSON 数据。 + + + + Failed to retrieve HTML page. + 无法获取 HTML 页面。 + + + + Failed to open file: + 无法打开文件: + + + + XML ERROR: + XML 错误: + + + + Failed to open files.json for writing + 无法打开 files.json 进行写入 + + + + Author: + 作者: + + + + Directory does not exist: + 目录不存在: + + + + Failed to open files.json for reading. + 无法打开 files.json 进行读取。 + + + + Name: + 名称: + + \ No newline at end of file diff --git a/src/qt_gui/translations/zh_TW.ts b/src/qt_gui/translations/zh_TW.ts index 1ddeaa43f..4a9da9f37 100644 --- a/src/qt_gui/translations/zh_TW.ts +++ b/src/qt_gui/translations/zh_TW.ts @@ -81,67 +81,72 @@ GuiContextMenus - + Create Shortcut Create Shortcut - + Open Game Folder Open Game Folder - + + Cheats / Patches + Zuòbì / Xiūbǔ chéngshì + + + SFO Viewer SFO Viewer - + Trophy Viewer Trophy Viewer - + Copy info Copy info - + Copy Name Copy Name - + Copy Serial Copy Serial - + Copy All Copy All - + Shortcut creation Shortcut creation - + Shortcut created successfully!\n %1 Shortcut created successfully!\n %1 - + Error Error - + Error creating shortcut!\n %1 Error creating shortcut!\n %1 - + Install PKG Install PKG @@ -248,6 +253,11 @@ Game Install Directory Game Install Directory + + + Download Cheats/Patches + Xiàzài Zuòbì / Xiūbǔ chéngshì + Dump Game List @@ -488,4 +498,395 @@ Enable RenderDoc Debugging + + MainWindow + + + * Unsupported Vulkan Version + * 不支援的 Vulkan 版本 + + + + Download Cheats For All Installed Games + 下載所有已安裝遊戲的作弊碼 + + + + Download Patches For All Games + 下載所有遊戲的修補檔 + + + + Download Complete + 下載完成 + + + + You have downloaded cheats for all the games you have installed. + 您已經下載了所有已安裝遊戲的作弊碼。 + + + + Patches Downloaded Successfully! + 修補檔下載成功! + + + + All Patches available for all games have been downloaded. + 所有遊戲的修補檔已經下載完成。 + + + + Games: + 遊戲: + + + + PKG File (*.PKG) + PKG 檔案 (*.PKG) + + + + ELF files (*.bin *.elf *.oelf) + ELF 檔案 (*.bin *.elf *.oelf) + + + + Game Boot + 遊戲啟動 + + + + Only one file can be selected! + 只能選擇一個檔案! + + + + PKG Extraction + PKG 解壓縮 + + + + Patch detected!\nPKG and Game versions match!: %1\nWould you like + 偵測到修補檔!\nPKG 和遊戲版本匹配!: %1\n您是否希望 + + + + to overwrite? + 覆蓋嗎? + + + + Patch detected!\nPKG Version %1 is older + 偵測到修補檔!\nPKG 版本 %1 較舊 + + + + than installed version!: %2\nWould you like + 比安裝的版本舊!: %2\n您是否希望 + + + + to overwrite? + 覆蓋嗎? + + + + Patch detected!\nGame is installed: %1\nWould you like + 偵測到修補檔!\n遊戲已安裝: %1\n您是否希望 + + + + to install Patch: %2? + 安裝修補檔: %2? + + + + Game already installed\n%1\nWould you like to overwrite? + 遊戲已經安裝\n%1\n您是否希望覆蓋? + + + + PKG is a patch, please install the game first! + PKG 是修補檔,請先安裝遊戲! + + + + PKG ERROR + PKG 錯誤 + + + + Extracting PKG %1/%2 + 正在解壓縮 PKG %1/%2 + + + + Extraction Finished + 解壓縮完成 + + + + Game successfully installed at %1 + 遊戲成功安裝於 %1 + + + + File doesn't appear to be a valid PKG file + 檔案似乎不是有效的 PKG 檔案 + + + + CheatsPatches + + + Cheats / Patches + 作弊碼 / 修補檔 + + + + defaultTextEdit_MSG + 作弊/補丁為實驗性功能。\n請小心使用。\n\n透過選擇儲存庫並點擊下載按鈕來單獨下載作弊程式。\n在“補丁”標籤頁中,您可以一次下載所有補丁,選擇要使用的補丁並保存您的選擇。\n\n由於我們不開發作弊/補丁,\n請將問題報告給作弊程式的作者。\n\n創建了新的作弊程式?請訪問:\nhttps://github.com/shadps4-emu/ps4_cheats + + + + No Image Available + 沒有可用的圖片 + + + + Serial: + 序號: + + + + Version: + 版本: + + + + Size: + 大小: + + + + Select Cheat File: + 選擇作弊檔案: + + + + Repository: + 儲存庫: + + + + Download Cheats + 下載作弊碼 + + + + Delete File + 刪除檔案 + + + + No files selected. + 沒有選擇檔案。 + + + + You can delete the cheats you don't want after downloading them. + 您可以在下載後刪除不需要的作弊碼。 + + + + Do you want to delete the selected file?\n%1 + 您是否要刪除選定的檔案?\n%1 + + + + Select Patch File: + 選擇修補檔案: + + + + Download Patches + 下載修補檔 + + + + Save + 儲存 + + + + Cheats + 作弊碼 + + + + Patches + 修補檔 + + + + Error + 錯誤 + + + + No patch selected. + 未選擇修補檔。 + + + + Unable to open files.json for reading. + 無法打開 files.json 進行讀取。 + + + + No patch file found for the current serial. + 找不到當前序號的修補檔。 + + + + Unable to open the file for reading. + 無法打開檔案進行讀取。 + + + + Unable to open the file for writing. + 無法打開檔案進行寫入。 + + + + Failed to parse XML: + 解析 XML 失敗: + + + + Success + 成功 + + + + Options saved successfully. + 選項已成功儲存。 + + + + Invalid Source + 無效的來源 + + + + The selected source is invalid. + 選擇的來源無效。 + + + + File Exists + 檔案已存在 + + + + File already exists. Do you want to replace it? + 檔案已存在。您是否希望替換它? + + + + Failed to save file: + 無法儲存檔案: + + + + Failed to download file: + 無法下載檔案: + + + + Cheats Not Found + 未找到作弊碼 + + + + CheatsNotFound_MSG + 在此版本的儲存庫中未找到該遊戲的作弊碼,請嘗試另一個儲存庫或不同版本的遊戲。 + + + + Cheats Downloaded Successfully + 作弊碼下載成功 + + + + CheatsDownloadedSuccessfully_MSG + 您已成功下載該遊戲版本的作弊碼 從選定的儲存庫中。 您可以嘗試從其他儲存庫下載,如果可用,您也可以選擇從列表中選擇檔案來使用它。 + + + + Failed to save: + 儲存失敗: + + + + Failed to download: + 下載失敗: + + + + Download Complete + 下載完成 + + + + DownloadComplete_MSG + 修補檔下載成功!所有遊戲的修補檔已下載完成,無需像作弊碼那樣為每個遊戲單獨下載。 + + + + Failed to parse JSON data from HTML. + 無法從 HTML 解析 JSON 數據。 + + + + Failed to retrieve HTML page. + 無法檢索 HTML 頁面。 + + + + Failed to open file: + 無法打開檔案: + + + + XML ERROR: + XML 錯誤: + + + + Failed to open files.json for writing + 無法打開 files.json 進行寫入 + + + + Author: + 作者: + + + + Directory does not exist: + 目錄不存在: + + + + Failed to open files.json for reading. + 無法打開 files.json 進行讀取。 + + + + Name: + 名稱: + + \ No newline at end of file From e1382b43c89ac33febd2cd9629ecf24cc8826546 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C2=A5IGA?= <164882787+Xphalnos@users.noreply.github.com> Date: Thu, 29 Aug 2024 09:02:36 +0200 Subject: [PATCH 69/69] Update French translation (#641) --- src/qt_gui/translations/fr.ts | 60 +++++++++++++++++------------------ 1 file changed, 30 insertions(+), 30 deletions(-) diff --git a/src/qt_gui/translations/fr.ts b/src/qt_gui/translations/fr.ts index 56d316092..371da9616 100644 --- a/src/qt_gui/translations/fr.ts +++ b/src/qt_gui/translations/fr.ts @@ -93,7 +93,7 @@ Cheats / Patches - Trucs / Patchs + Cheats/Patchs @@ -108,7 +108,7 @@ Copy info - Copier les informations + Copier infos @@ -133,7 +133,7 @@ Shortcut created successfully!\n %1 - Raccourci créé avec succès!\n %1 + Raccourci créé avec succès !\n %1 @@ -143,7 +143,7 @@ Error creating shortcut!\n %1 - Erreur lors de la création du raccourci!\n %1 + Erreur lors de la création du raccourci !\n %1 @@ -256,7 +256,7 @@ Download Cheats/Patches - Télécharger Trucs / Patchs + Télécharger Cheats/Patchs @@ -485,12 +485,12 @@ Enable Vulkan Validation Layers - Couche de validation Vulkan + Activer la couche de validation Vulkan Enable Vulkan Synchronization Validation - Synchroniser la validation Vulkan + Activer la synchronisation de la validation Vulkan @@ -503,17 +503,17 @@ * Unsupported Vulkan Version - * Version Vulkan non prise en charge + * Version de Vulkan non prise en charge Download Cheats For All Installed Games - Télécharger les cheats pour tous les jeux installés + Télécharger les Cheats pour tous les jeux installés Download Patches For All Games - Télécharger les patches pour tous les jeux + Télécharger les patchs pour tous les jeux @@ -523,17 +523,17 @@ You have downloaded cheats for all the games you have installed. - Vous avez téléchargé des cheats pour tous les jeux que vous avez installés. + Vous avez téléchargé des Cheats pour tous les jeux installés. Patches Downloaded Successfully! - Patches téléchargés avec succès ! + Patchs téléchargés avec succès ! All Patches available for all games have been downloaded. - Tous les patches disponibles pour tous les jeux ont été téléchargés. + Tous les patchs disponibles pour les jeux ont été téléchargés. @@ -543,7 +543,7 @@ PKG File (*.PKG) - Fichier PKG (*.PKG) + Fichiers PKG (*.PKG) @@ -553,7 +553,7 @@ Game Boot - Boot du jeu + Démarrer un jeu @@ -563,12 +563,12 @@ PKG Extraction - Extraction PKG + Extraction du PKG Patch detected!\nPKG and Game versions match!: %1\nWould you like - Patch détecté !\nLes versions PKG et Jeu correspondent : %1\nSouhaitez-vous + Patch détecté !\nLa version du PKG et du jeu correspondent : %1\nSouhaitez-vous @@ -608,12 +608,12 @@ PKG is a patch, please install the game first! - PKG est un patch, veuillez d'abord installer le jeu ! + Le PKG est un patch, veuillez d'abord installer le jeu ! PKG ERROR - ERREUR PKG + Erreur PKG @@ -633,7 +633,7 @@ File doesn't appear to be a valid PKG file - Le fichier ne semble pas être un fichier PKG valide + Le fichier ne semble pas être un PKG valide @@ -641,12 +641,12 @@ Cheats / Patches - Cheats / Patches + Cheats/Patches defaultTextEdit_MSG - Les cheats/patches sont expérimentaux.\nUtilisez-les avec précaution.\n\nTéléchargez les cheats individuellement en sélectionnant le dépôt et en cliquant sur le bouton de téléchargement.\nDans l'onglet Patches, vous pouvez télécharger tous les patches en une seule fois, choisir lesquels vous souhaitez utiliser et enregistrer votre sélection.\n\nComme nous ne développons pas les Cheats/Patches,\nmerci de signaler les problèmes à l'auteur du cheat.\n\nVous avez créé un nouveau cheat ? Visitez :\nhttps://github.com/shadps4-emu/ps4_cheats + Les Cheats/Patchs sont expérimentaux.\nUtilisez-les avec précaution.\n\nTéléchargez les Cheats individuellement en sélectionnant le dépôt et en cliquant sur le bouton de téléchargement.\nDans l'onglet Patchs, vous pouvez télécharger tous les patchs en une seule fois, choisir lesquels vous souhaitez utiliser et enregistrer votre sélection.\n\nComme nous ne développons pas les Cheats/Patches,\nmerci de signaler les problèmes à l'auteur du Cheat.\n\nVous avez créé un nouveau cheat ? Visitez :\nhttps://github.com/shadps4-emu/ps4_cheats @@ -671,7 +671,7 @@ Select Cheat File: - Sélectionner le fichier de cheat : + Sélectionner le fichier de Cheat : @@ -681,7 +681,7 @@ Download Cheats - Télécharger les cheats + Télécharger les Cheats @@ -696,7 +696,7 @@ You can delete the cheats you don't want after downloading them. - Vous pouvez supprimer les cheats que vous ne souhaitez pas après les avoir téléchargés. + Vous pouvez supprimer les Cheats que vous ne souhaitez pas après les avoir téléchargés. @@ -711,7 +711,7 @@ Download Patches - Télécharger les patches + Télécharger les patchs @@ -811,7 +811,7 @@ CheatsNotFound_MSG - Aucun cheat trouvé pour ce jeu dans cette version du dépôt sélectionné,essayez un autre dépôt ou une version différente du jeu. + Aucun Cheat trouvé pour ce jeu dans cette version du dépôt sélectionné, essayez un autre dépôt ou une version différente du jeu. @@ -841,7 +841,7 @@ DownloadComplete_MSG - Patchs téléchargés avec succès ! Tous les patches disponibles pour tous les jeux ont été téléchargés, il n'est pas nécessaire de les télécharger individuellement pour chaque jeu comme c'est le cas pour les cheats. + Patchs téléchargés avec succès ! Tous les patches disponibles pour tous les jeux ont été téléchargés, il n'est pas nécessaire de les télécharger individuellement pour chaque jeu comme c'est le cas pour les Cheats. @@ -861,7 +861,7 @@ XML ERROR: - ERREUR XML : + Erreur XML : @@ -889,4 +889,4 @@ Nom : - \ No newline at end of file +