diff --git a/.ci/clang-format.sh b/.ci/clang-format.sh index c0d8c2c2d..15868550f 100755 --- a/.ci/clang-format.sh +++ b/.ci/clang-format.sh @@ -10,7 +10,7 @@ if grep -nrI '\s$' src *.yml *.txt *.md Doxyfile .gitignore .gitmodules .ci* dis fi # Default clang-format points to default 3.5 version one -CLANG_FORMAT=clang-format-18 +CLANG_FORMAT=clang-format-19 $CLANG_FORMAT --version if [ "$GITHUB_EVENT_NAME" = "pull_request" ]; then diff --git a/.github/ISSUE_TEMPLATE/game-bug-report.yaml b/.github/ISSUE_TEMPLATE/game-bug-report.yaml index 2d984b697..a9c669ff9 100644 --- a/.github/ISSUE_TEMPLATE/game-bug-report.yaml +++ b/.github/ISSUE_TEMPLATE/game-bug-report.yaml @@ -89,7 +89,7 @@ body: - type: textarea id: logs attributes: - label: "Logs" - description: Attach any logs here. Log can be found by right clicking on a game name -> Open Folder... -> Open Log Folder. Make sure that the log type is set to `sync`. + label: "Log File" + description: Drag and drop the log file here. It can be found by right clicking on a game name -> Open Folder... -> Open Log Folder. Make sure that the log type is set to `sync`. validations: - required: false + required: true diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 3b5690438..86ca81c38 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -14,14 +14,14 @@ env: jobs: reuse: - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 continue-on-error: true steps: - uses: actions/checkout@v4 - uses: fsfe/reuse-action@v5 clang-format: - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 continue-on-error: true steps: - uses: actions/checkout@v4 @@ -30,16 +30,16 @@ jobs: - name: Install run: | wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add - - sudo add-apt-repository 'deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-18 main' + sudo add-apt-repository 'deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-19 main' sudo apt update - sudo apt install clang-format-18 + sudo apt install clang-format-19 - name: Build env: COMMIT_RANGE: ${{ github.event.pull_request.base.sha }}..${{ github.event.pull_request.head.sha }} run: ./.ci/clang-format.sh get-info: - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 outputs: date: ${{ steps.vars.outputs.date }} shorthash: ${{ steps.vars.outputs.shorthash }} @@ -57,7 +57,7 @@ jobs: echo "fullhash=$(git rev-parse HEAD)" >> $GITHUB_OUTPUT windows-sdl: - runs-on: windows-latest + runs-on: windows-2025 needs: get-info steps: - uses: actions/checkout@v4 @@ -76,7 +76,7 @@ jobs: ${{ env.cache-name }}- - name: Cache CMake Build - uses: hendrikmuhs/ccache-action@v1.2.14 + uses: hendrikmuhs/ccache-action@v1.2.17 env: cache-name: ${{ runner.os }}-sdl-cache-cmake-build with: @@ -101,7 +101,7 @@ jobs: path: ${{github.workspace}}/build/shadPS4.exe windows-qt: - runs-on: windows-latest + runs-on: windows-2025 needs: get-info steps: - uses: actions/checkout@v4 @@ -111,10 +111,10 @@ jobs: - name: Setup Qt uses: jurplel/install-qt-action@v4 with: - version: 6.7.3 + version: 6.9.0 host: windows target: desktop - arch: win64_msvc2019_64 + arch: win64_msvc2022_64 archives: qtbase qttools modules: qtmultimedia @@ -130,7 +130,7 @@ jobs: ${{ env.cache-name }}- - name: Cache CMake Build - uses: hendrikmuhs/ccache-action@v1.2.14 + uses: hendrikmuhs/ccache-action@v1.2.17 env: cache-name: ${{ runner.os }}-qt-cache-cmake-build with: @@ -186,7 +186,7 @@ jobs: ${{ env.cache-name }}- - name: Cache CMake Build - uses: hendrikmuhs/ccache-action@v1.2.14 + uses: hendrikmuhs/ccache-action@v1.2.17 env: cache-name: ${{runner.os}}-sdl-cache-cmake-build with: @@ -228,7 +228,7 @@ jobs: - name: Setup Qt uses: jurplel/install-qt-action@v4 with: - version: 6.7.3 + version: 6.9.0 host: mac target: desktop arch: clang_64 @@ -247,7 +247,7 @@ jobs: ${{ env.cache-name }}- - name: Cache CMake Build - uses: hendrikmuhs/ccache-action@v1.2.14 + uses: hendrikmuhs/ccache-action@v1.2.17 env: cache-name: ${{runner.os}}-qt-cache-cmake-build with: @@ -296,7 +296,7 @@ jobs: ${{ env.cache-name }}- - name: Cache CMake Build - uses: hendrikmuhs/ccache-action@v1.2.14 + uses: hendrikmuhs/ccache-action@v1.2.17 env: cache-name: ${{ runner.os }}-sdl-cache-cmake-build with: @@ -352,7 +352,7 @@ jobs: ${{ env.cache-name }}- - name: Cache CMake Build - uses: hendrikmuhs/ccache-action@v1.2.14 + uses: hendrikmuhs/ccache-action@v1.2.17 env: cache-name: ${{ runner.os }}-qt-cache-cmake-build with: @@ -376,6 +376,78 @@ jobs: name: shadps4-linux-qt-${{ needs.get-info.outputs.date }}-${{ needs.get-info.outputs.shorthash }} path: Shadps4-qt.AppImage + linux-sdl-gcc: + runs-on: ubuntu-24.04 + needs: get-info + steps: + - uses: actions/checkout@v4 + with: + submodules: recursive + + - name: Install dependencies + run: sudo apt-get update && sudo apt install -y libx11-dev libxext-dev libwayland-dev libdecor-0-dev libxkbcommon-dev libglfw3-dev libgles2-mesa-dev libfuse2 gcc-14 build-essential libasound2-dev libpulse-dev libopenal-dev libudev-dev + + - name: Cache CMake Configuration + uses: actions/cache@v4 + env: + cache-name: ${{ runner.os }}-sdl-gcc-cache-cmake-configuration + with: + path: | + ${{github.workspace}}/build + key: ${{ env.cache-name }}-${{ hashFiles('**/CMakeLists.txt', 'cmake/**') }} + restore-keys: | + ${{ env.cache-name }}- + + - name: Cache CMake Build + uses: hendrikmuhs/ccache-action@v1.2.17 + env: + cache-name: ${{ runner.os }}-sdl-gcc-cache-cmake-build + with: + append-timestamp: false + key: ${{ env.cache-name }}-${{ hashFiles('**/CMakeLists.txt', 'cmake/**') }} + + - name: Configure CMake + run: cmake --fresh -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCMAKE_INTERPROCEDURAL_OPTIMIZATION_RELEASE=ON -DCMAKE_C_COMPILER=gcc-14 -DCMAKE_CXX_COMPILER=g++-14 -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache + + - name: Build + run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} --parallel $(nproc) + + linux-qt-gcc: + runs-on: ubuntu-24.04 + needs: get-info + steps: + - uses: actions/checkout@v4 + with: + submodules: recursive + + - name: Install dependencies + run: sudo apt-get update && sudo apt install -y libx11-dev libxext-dev libwayland-dev libdecor-0-dev libxkbcommon-dev libglfw3-dev libgles2-mesa-dev libfuse2 gcc-14 build-essential qt6-base-dev qt6-tools-dev qt6-multimedia-dev libasound2-dev libpulse-dev libopenal-dev libudev-dev + + - name: Cache CMake Configuration + uses: actions/cache@v4 + env: + cache-name: ${{ runner.os }}-qt-gcc-cache-cmake-configuration + with: + path: | + ${{github.workspace}}/build + key: ${{ env.cache-name }}-${{ hashFiles('**/CMakeLists.txt', 'cmake/**') }} + restore-keys: | + ${{ env.cache-name }}- + + - name: Cache CMake Build + uses: hendrikmuhs/ccache-action@v1.2.17 + env: + cache-name: ${{ runner.os }}-qt-gcc-cache-cmake-build + with: + append-timestamp: false + key: ${{ env.cache-name }}-${{ hashFiles('**/CMakeLists.txt', 'cmake/**') }} + + - name: Configure CMake + run: cmake --fresh -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCMAKE_INTERPROCEDURAL_OPTIMIZATION_RELEASE=ON -DCMAKE_C_COMPILER=gcc-14 -DCMAKE_CXX_COMPILER=g++-14 -DENABLE_QT_GUI=ON -DENABLE_UPDATER=ON -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache + + - name: Build + run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} --parallel $(nproc) + pre-release: if: github.ref == 'refs/heads/main' && github.repository == 'shadps4-emu/shadPS4' && github.event_name == 'push' needs: [get-info, windows-sdl, windows-qt, macos-sdl, macos-qt, linux-sdl, linux-qt] diff --git a/.github/workflows/scripts/update_translation.sh b/.github/workflows/scripts/update_translation.sh new file mode 100755 index 000000000..6b8c76d22 --- /dev/null +++ b/.github/workflows/scripts/update_translation.sh @@ -0,0 +1,11 @@ +#!/bin/bash + +set -e + +sudo apt-get -y install qt6-l10n-tools python3 + +SCRIPT_PATH="src/qt_gui/translations/update_translation.sh" + +chmod +x "$SCRIPT_PATH" + +PATH=/usr/lib/qt6/bin:$PATH "$SCRIPT_PATH" \ No newline at end of file diff --git a/.github/workflows/update_translation.yml b/.github/workflows/update_translation.yml new file mode 100644 index 000000000..6eb9db87a --- /dev/null +++ b/.github/workflows/update_translation.yml @@ -0,0 +1,30 @@ +name: Update Translation + +on: + schedule: + - cron: "0 0 * * *" # Every day at 12am UTC. + workflow_dispatch: # As well as manually. + +jobs: + update: + if: github.repository == 'shadps4-emu/shadPS4' + name: "Update Translation" + runs-on: ubuntu-22.04 + steps: + - uses: actions/checkout@v4 + + - name: Set execution permissions for the script + run: chmod +x ./.github/workflows/scripts/update_translation.sh + + - name: Update Base Translation + run: ./.github/workflows/scripts/update_translation.sh + + - name: Create Pull Request + uses: peter-evans/create-pull-request@v7 + with: + token: ${{ secrets.SHADPS4_TOKEN_REPO }} + title: "Qt GUI: Update Translation" + commit-message: "[ci skip] Qt GUI: Update Translation." + body: "Daily update of translation sources." + branch: update-translation + delete-branch: true diff --git a/.gitmodules b/.gitmodules index 3d0d21c5b..98fba2098 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,15 +1,3 @@ -[submodule "externals/cryptopp-cmake"] - path = externals/cryptopp-cmake - url = https://github.com/shadps4-emu/ext-cryptopp-cmake.git - shallow = true -[submodule "externals/cryptopp"] - path = externals/cryptopp - url = https://github.com/shadps4-emu/ext-cryptopp.git - shallow = true -[submodule "externals/cryptoppwin"] - path = externals/cryptoppwin - url = https://github.com/shadps4-emu/ext-cryptoppwin.git - shallow = true [submodule "externals/zlib-ng"] path = externals/zlib-ng url = https://github.com/shadps4-emu/ext-zlib-ng.git diff --git a/CMakeLists.txt b/CMakeLists.txt index c0f675266..bd458f04e 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -8,7 +8,7 @@ set(CMAKE_CXX_STANDARD 23) set(CMAKE_CXX_STANDARD_REQUIRED True) if(APPLE) - enable_language(OBJC) + list(APPEND ADDITIONAL_LANGUAGES OBJC) set(CMAKE_OSX_DEPLOYMENT_TARGET 14) endif() @@ -16,7 +16,7 @@ if (NOT CMAKE_BUILD_TYPE) set(CMAKE_BUILD_TYPE Release) endif() -project(shadPS4 CXX C ASM) +project(shadPS4 CXX C ASM ${ADDITIONAL_LANGUAGES}) # Forcing PIE makes sure that the base address is high enough so that it doesn't clash with the PS4 memory. if(UNIX AND NOT APPLE) @@ -37,8 +37,10 @@ option(ENABLE_UPDATER "Enables the options to updater" ON) # First, determine whether to use CMAKE_OSX_ARCHITECTURES or CMAKE_SYSTEM_PROCESSOR. if (APPLE AND CMAKE_OSX_ARCHITECTURES) set(BASE_ARCHITECTURE "${CMAKE_OSX_ARCHITECTURES}") -else() +elseif (CMAKE_SYSTEM_PROCESSOR) set(BASE_ARCHITECTURE "${CMAKE_SYSTEM_PROCESSOR}") +else() + set(BASE_ARCHITECTURE "${CMAKE_HOST_SYSTEM_PROCESSOR}") endif() # Next, match common architecture strings down to a known common value. @@ -50,7 +52,12 @@ else() message(FATAL_ERROR "Unsupported CPU architecture: ${BASE_ARCHITECTURE}") endif() -if (APPLE AND ARCHITECTURE STREQUAL "x86_64" AND CMAKE_SYSTEM_PROCESSOR STREQUAL "arm64") +if (ARCHITECTURE STREQUAL "x86_64") + # Set x86_64 target level to Sandy Bridge to generally match what is supported for PS4 guest code with CPU patches. + add_compile_options(-march=sandybridge) +endif() + +if (APPLE AND ARCHITECTURE STREQUAL "x86_64" AND CMAKE_HOST_SYSTEM_PROCESSOR STREQUAL "arm64") # Exclude ARM homebrew path to avoid conflicts when cross compiling. list(APPEND CMAKE_IGNORE_PREFIX_PATH "/opt/homebrew") @@ -106,8 +113,63 @@ git_describe(GIT_DESC --always --long --dirty) git_branch_name(GIT_BRANCH) string(TIMESTAMP BUILD_DATE "%Y-%m-%d %H:%M:%S") +message("start git things") +# Try to get the upstream remote and branch +message("check for remote and branch") +execute_process( + COMMAND git rev-parse --abbrev-ref --symbolic-full-name @{u} + OUTPUT_VARIABLE GIT_REMOTE_NAME + RESULT_VARIABLE GIT_REMOTE_RESULT + ERROR_QUIET + OUTPUT_STRIP_TRAILING_WHITESPACE +) +# If there's no upstream set or the command failed, check remote.pushDefault +if (GIT_REMOTE_RESULT OR GIT_REMOTE_NAME STREQUAL "") + message("check default push") + execute_process( + COMMAND git config --get remote.pushDefault + OUTPUT_VARIABLE GIT_REMOTE_NAME + RESULT_VARIABLE GIT_REMOTE_RESULT + ERROR_QUIET + OUTPUT_STRIP_TRAILING_WHITESPACE + ) +endif() +# If running in GitHub Actions and the above fails +if (GIT_REMOTE_RESULT OR GIT_REMOTE_NAME STREQUAL "") + message("check github") + set(GIT_REMOTE_NAME "origin") + + if (DEFINED ENV{GITHUB_HEAD_REF}) # PR branch name + set(GIT_BRANCH "pr-$ENV{GITHUB_HEAD_REF}") + elseif (DEFINED ENV{GITHUB_REF}) # Normal branch name + string(REGEX REPLACE "^refs/[^/]*/" "" GIT_BRANCH "$ENV{GITHUB_REF}") + else() + message("couldn't find branch") + set(GIT_BRANCH "detached-head") + endif() +else() + # Extract remote name if the output contains a remote/branch format + string(FIND "${GIT_REMOTE_NAME}" "/" INDEX) + if (INDEX GREATER -1) + string(SUBSTRING "${GIT_REMOTE_NAME}" 0 "${INDEX}" GIT_REMOTE_NAME) + else() + # If no remote is present (only a branch name), default to origin + set(GIT_REMOTE_NAME "origin") + endif() +endif() + +# Get remote link +message("getting remote link") +execute_process( + COMMAND git config --get remote.${GIT_REMOTE_NAME}.url + OUTPUT_VARIABLE GIT_REMOTE_URL + OUTPUT_STRIP_TRAILING_WHITESPACE +) + configure_file("${CMAKE_CURRENT_SOURCE_DIR}/src/common/scm_rev.cpp.in" "${CMAKE_CURRENT_BINARY_DIR}/src/common/scm_rev.cpp" @ONLY) +message("end git things, remote: ${GIT_REMOTE_NAME}, branch: ${GIT_BRANCH}") + find_package(Boost 1.84.0 CONFIG) find_package(FFmpeg 5.1.2 MODULE) find_package(fmt 10.2.0 CONFIG) @@ -120,7 +182,7 @@ find_package(SDL3 3.1.2 CONFIG) find_package(stb MODULE) find_package(toml11 4.2.0 CONFIG) find_package(tsl-robin-map 1.3.0 CONFIG) -find_package(VulkanHeaders 1.4.303 CONFIG) +find_package(VulkanHeaders 1.4.305 CONFIG) find_package(VulkanMemoryAllocator 3.1.0 CONFIG) find_package(xbyak 7.07 CONFIG) find_package(xxHash 0.8.2 MODULE) @@ -154,6 +216,7 @@ endif() add_subdirectory(externals) include_directories(src) +include_directories(Resources) if(ENABLE_QT_GUI) find_package(Qt6 REQUIRED COMPONENTS Widgets Concurrent LinguistTools Network Multimedia) @@ -209,6 +272,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/gnmdriver_init.h src/core/libraries/gnmdriver/gnm_error.h ) @@ -249,10 +313,15 @@ set(KERNEL_LIB src/core/libraries/kernel/sync/mutex.cpp src/core/libraries/kernel/time.h src/core/libraries/kernel/orbis_error.h src/core/libraries/kernel/posix_error.h + src/core/libraries/kernel/aio.cpp + src/core/libraries/kernel/aio.h ) set(NETWORK_LIBS src/core/libraries/network/http.cpp src/core/libraries/network/http.h + src/core/libraries/network/http_error.h + src/core/libraries/network/http2.cpp + src/core/libraries/network/http2.h src/core/libraries/network/net.cpp src/core/libraries/network/netctl.cpp src/core/libraries/network/netctl.h @@ -262,6 +331,8 @@ set(NETWORK_LIBS src/core/libraries/network/http.cpp src/core/libraries/network/net.h src/core/libraries/network/ssl.cpp src/core/libraries/network/ssl.h + src/core/libraries/network/ssl2.cpp + src/core/libraries/network/ssl2.h ) set(AVPLAYER_LIB src/core/libraries/avplayer/avplayer_common.cpp @@ -321,6 +392,24 @@ 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/ngs2/ngs2_custom.cpp + src/core/libraries/ngs2/ngs2_custom.h + src/core/libraries/ngs2/ngs2_reverb.cpp + src/core/libraries/ngs2/ngs2_reverb.h + src/core/libraries/ngs2/ngs2_geom.cpp + src/core/libraries/ngs2/ngs2_geom.h + src/core/libraries/ngs2/ngs2_pan.cpp + src/core/libraries/ngs2/ngs2_pan.h + src/core/libraries/ngs2/ngs2_report.cpp + src/core/libraries/ngs2/ngs2_report.h + src/core/libraries/ngs2/ngs2_eq.cpp + src/core/libraries/ngs2/ngs2_eq.h + src/core/libraries/ngs2/ngs2_mastering.cpp + src/core/libraries/ngs2/ngs2_mastering.h + src/core/libraries/ngs2/ngs2_sampler.cpp + src/core/libraries/ngs2/ngs2_sampler.h + src/core/libraries/ngs2/ngs2_submixer.cpp + src/core/libraries/ngs2/ngs2_submixer.h src/core/libraries/ajm/ajm_error.h src/core/libraries/audio3d/audio3d.cpp src/core/libraries/audio3d/audio3d.h @@ -335,6 +424,10 @@ set(SYSTEM_LIBS src/core/libraries/system/commondialog.cpp src/core/libraries/share_play/shareplay.h src/core/libraries/razor_cpu/razor_cpu.cpp src/core/libraries/razor_cpu/razor_cpu.h + src/core/libraries/mouse/mouse.cpp + src/core/libraries/mouse/mouse.h + src/core/libraries/web_browser_dialog/webbrowserdialog.cpp + src/core/libraries/web_browser_dialog/webbrowserdialog.h ) set(VIDEOOUT_LIB src/core/libraries/videoout/buffer.h @@ -345,8 +438,17 @@ set(VIDEOOUT_LIB src/core/libraries/videoout/buffer.h src/core/libraries/videoout/videoout_error.h ) -set(LIBC_SOURCES src/core/libraries/libc_internal/libc_internal.cpp +set(HLE_LIBC_INTERNAL_LIB src/core/libraries/libc_internal/libc_internal.cpp src/core/libraries/libc_internal/libc_internal.h + src/core/libraries/libc_internal/libc_internal_io.cpp + src/core/libraries/libc_internal/libc_internal_io.h + src/core/libraries/libc_internal/libc_internal_memory.cpp + src/core/libraries/libc_internal/libc_internal_memory.h + src/core/libraries/libc_internal/libc_internal_str.cpp + src/core/libraries/libc_internal/libc_internal_str.h + src/core/libraries/libc_internal/libc_internal_math.cpp + src/core/libraries/libc_internal/libc_internal_math.h + src/core/libraries/libc_internal/printf.h ) set(IME_LIB src/core/libraries/ime/error_dialog.cpp @@ -412,7 +514,9 @@ set(VDEC_LIB src/core/libraries/videodec/videodec2_impl.cpp src/core/libraries/videodec/videodec_impl.h ) -set(NP_LIBS src/core/libraries/np_manager/np_manager.cpp +set(NP_LIBS src/core/libraries/np_common/np_common.cpp + src/core/libraries/np_common/np_common.h + src/core/libraries/np_manager/np_manager.cpp src/core/libraries/np_manager/np_manager.h src/core/libraries/np_score/np_score.cpp src/core/libraries/np_score/np_score.h @@ -421,6 +525,19 @@ set(NP_LIBS src/core/libraries/np_manager/np_manager.cpp src/core/libraries/np_trophy/trophy_ui.cpp src/core/libraries/np_trophy/trophy_ui.h src/core/libraries/np_trophy/np_trophy_error.h + src/core/libraries/np_web_api/np_web_api.cpp + src/core/libraries/np_web_api/np_web_api.h + src/core/libraries/np_party/np_party.cpp + src/core/libraries/np_party/np_party.h +) + +set(ZLIB_LIB src/core/libraries/zlib/zlib.cpp + src/core/libraries/zlib/zlib_sce.h + src/core/libraries/zlib/zlib_error.h +) + +set(VR_LIBS src/core/libraries/hmd/hmd.cpp + src/core/libraries/hmd/hmd.h ) set(MISC_LIBS src/core/libraries/screenshot/screenshot.cpp @@ -466,6 +583,7 @@ set(COMMON src/common/logging/backend.cpp src/common/logging/text_formatter.cpp src/common/logging/text_formatter.h src/common/logging/types.h + src/common/aes.h src/common/alignment.h src/common/arch.h src/common/assert.cpp @@ -497,6 +615,7 @@ set(COMMON src/common/logging/backend.cpp src/common/polyfill_thread.h src/common/rdtsc.cpp src/common/rdtsc.h + src/common/sha1.h src/common/signal_context.h src/common/signal_context.cpp src/common/singleton.h @@ -506,6 +625,7 @@ set(COMMON src/common/logging/backend.cpp src/common/spin_lock.h src/common/stb.cpp src/common/stb.h + src/common/string_literal.h src/common/string_util.cpp src/common/string_util.h src/common/thread.cpp @@ -535,32 +655,31 @@ set(CORE src/core/aerolib/stubs.cpp src/core/aerolib/aerolib.h src/core/address_space.cpp src/core/address_space.h - src/core/crypto/crypto.cpp - src/core/crypto/crypto.h - src/core/crypto/keys.h src/core/devices/base_device.cpp src/core/devices/base_device.h src/core/devices/ioccom.h src/core/devices/logger.cpp src/core/devices/logger.h src/core/devices/nop_device.h + src/core/devices/console_device.cpp + src/core/devices/console_device.h + src/core/devices/deci_tty6_device.cpp + src/core/devices/deci_tty6_device.h + src/core/devices/random_device.cpp + src/core/devices/random_device.h + src/core/devices/urandom_device.cpp + src/core/devices/urandom_device.h + src/core/devices/srandom_device.cpp + src/core/devices/srandom_device.h src/core/file_format/pfs.h - src/core/file_format/pkg.cpp - src/core/file_format/pkg.h - src/core/file_format/pkg_type.cpp - src/core/file_format/pkg_type.h src/core/file_format/psf.cpp src/core/file_format/psf.h src/core/file_format/playgo_chunk.cpp src/core/file_format/playgo_chunk.h src/core/file_format/trp.cpp src/core/file_format/trp.h - src/core/file_format/splash.h - src/core/file_format/splash.cpp src/core/file_sys/fs.cpp src/core/file_sys/fs.h - src/core/loader.cpp - src/core/loader.h src/core/loader/dwarf.cpp src/core/loader/dwarf.h src/core/loader/elf.cpp @@ -576,7 +695,7 @@ set(CORE src/core/aerolib/stubs.cpp ${KERNEL_LIB} ${NETWORK_LIBS} ${SYSTEM_LIBS} - ${LIBC_SOURCES} + ${HLE_LIBC_INTERNAL_LIB} ${PAD_LIB} ${VIDEOOUT_LIB} ${NP_LIBS} @@ -585,10 +704,12 @@ set(CORE src/core/aerolib/stubs.cpp ${PLAYGO_LIB} ${RANDOM_LIB} ${USBD_LIB} + ${ZLIB_LIB} ${MISC_LIBS} ${IME_LIB} ${FIBER_LIB} ${VDEC_LIB} + ${VR_LIBS} ${DEV_TOOLS} src/core/debug_state.cpp src/core/debug_state.h @@ -674,11 +795,13 @@ set(SHADER_RECOMPILER src/shader_recompiler/exception.h src/shader_recompiler/ir/passes/hull_shader_transform.cpp src/shader_recompiler/ir/passes/identity_removal_pass.cpp src/shader_recompiler/ir/passes/ir_passes.h - src/shader_recompiler/ir/passes/lower_shared_mem_to_registers.cpp + src/shader_recompiler/ir/passes/lower_buffer_format_to_raw.cpp + src/shader_recompiler/ir/passes/readlane_elimination_pass.cpp src/shader_recompiler/ir/passes/resource_tracking_pass.cpp src/shader_recompiler/ir/passes/ring_access_elimination.cpp src/shader_recompiler/ir/passes/shader_info_collection_pass.cpp src/shader_recompiler/ir/passes/shared_memory_barrier_pass.cpp + src/shader_recompiler/ir/passes/shared_memory_to_storage_pass.cpp src/shader_recompiler/ir/passes/ssa_rewrite_pass.cpp src/shader_recompiler/ir/abstract_syntax_list.h src/shader_recompiler/ir/attribute.cpp @@ -728,8 +851,6 @@ set(VIDEO_CORE src/video_core/amdgpu/liverpool.cpp src/video_core/renderer_vulkan/vk_common.h src/video_core/renderer_vulkan/vk_compute_pipeline.cpp src/video_core/renderer_vulkan/vk_compute_pipeline.h - src/video_core/renderer_vulkan/vk_descriptor_update_queue.cpp - src/video_core/renderer_vulkan/vk_descriptor_update_queue.h src/video_core/renderer_vulkan/vk_graphics_pipeline.cpp src/video_core/renderer_vulkan/vk_graphics_pipeline.h src/video_core/renderer_vulkan/vk_instance.cpp @@ -756,6 +877,10 @@ set(VIDEO_CORE src/video_core/amdgpu/liverpool.cpp src/video_core/renderer_vulkan/vk_shader_util.h src/video_core/renderer_vulkan/vk_swapchain.cpp src/video_core/renderer_vulkan/vk_swapchain.h + src/video_core/renderer_vulkan/host_passes/fsr_pass.cpp + src/video_core/renderer_vulkan/host_passes/fsr_pass.h + src/video_core/renderer_vulkan/host_passes/pp_pass.cpp + src/video_core/renderer_vulkan/host_passes/pp_pass.h src/video_core/texture_cache/image.cpp src/video_core/texture_cache/image.h src/video_core/texture_cache/image_info.cpp @@ -793,6 +918,10 @@ set(IMGUI src/imgui/imgui_config.h set(INPUT src/input/controller.cpp src/input/controller.h + src/input/input_handler.cpp + src/input/input_handler.h + src/input/input_mouse.cpp + src/input/input_mouse.h ) set(EMULATOR src/emulator.cpp @@ -821,6 +950,12 @@ set(QT_GUI src/qt_gui/about_dialog.cpp src/qt_gui/cheats_patches.h src/qt_gui/compatibility_info.cpp src/qt_gui/compatibility_info.h + src/qt_gui/control_settings.cpp + src/qt_gui/control_settings.h + src/qt_gui/control_settings.ui + src/qt_gui/kbm_gui.cpp + src/qt_gui/kbm_gui.h + src/qt_gui/kbm_gui.ui src/qt_gui/main_window_ui.h src/qt_gui/main_window.cpp src/qt_gui/main_window.h @@ -834,14 +969,14 @@ set(QT_GUI src/qt_gui/about_dialog.cpp src/qt_gui/game_grid_frame.h src/qt_gui/game_install_dialog.cpp src/qt_gui/game_install_dialog.h - src/qt_gui/install_dir_select.cpp - src/qt_gui/install_dir_select.h - src/qt_gui/pkg_viewer.cpp - src/qt_gui/pkg_viewer.h src/qt_gui/trophy_viewer.cpp src/qt_gui/trophy_viewer.h src/qt_gui/elf_viewer.cpp src/qt_gui/elf_viewer.h + src/qt_gui/kbm_config_dialog.cpp + src/qt_gui/kbm_config_dialog.h + src/qt_gui/kbm_help_dialog.cpp + src/qt_gui/kbm_help_dialog.h src/qt_gui/main_window_themes.cpp src/qt_gui/main_window_themes.h src/qt_gui/settings_dialog.cpp @@ -927,7 +1062,7 @@ if (APPLE) if (ARCHITECTURE STREQUAL "x86_64") # Reserve system-managed memory space. - target_link_options(shadps4 PRIVATE -Wl,-no_pie,-no_fixup_chains,-no_huge,-pagezero_size,0x4000,-segaddr,TCB_SPACE,0x4000,-segaddr,GUEST_SYSTEM,0x400000,-image_base,0x20000000000) + target_link_options(shadps4 PRIVATE -Wl,-no_pie,-no_fixup_chains,-no_huge,-pagezero_size,0x4000,-segaddr,TCB_SPACE,0x4000,-segaddr,SYSTEM_MANAGED,0x400000,-segaddr,SYSTEM_RESERVED,0x7FFFFC000,-image_base,0x20000000000) endif() # Replacement for std::chrono::time_zone @@ -938,12 +1073,6 @@ if (NOT ENABLE_QT_GUI) target_link_libraries(shadps4 PRIVATE SDL3::SDL3) endif() -if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang" AND MSVC) - target_link_libraries(shadps4 PRIVATE cryptoppwin) -else() - target_link_libraries(shadps4 PRIVATE cryptopp::cryptopp) -endif() - if (ENABLE_QT_GUI) target_link_libraries(shadps4 PRIVATE Qt6::Widgets Qt6::Concurrent Qt6::Network Qt6::Multimedia) add_definitions(-DENABLE_QT_GUI) @@ -1004,6 +1133,18 @@ add_subdirectory(${HOST_SHADERS_INCLUDE}) add_dependencies(shadps4 host_shaders) target_include_directories(shadps4 PRIVATE ${HOST_SHADERS_INCLUDE}) +# embed resources + +include(CMakeRC) +cmrc_add_resource_library(embedded-resources + ALIAS res::embedded + NAMESPACE res + src/images/bronze.png + src/images/gold.png + src/images/platinum.png + src/images/silver.png) +target_link_libraries(shadps4 PRIVATE res::embedded) + # ImGui resources add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/src/imgui/renderer) add_dependencies(shadps4 ImGui_Resources) @@ -1039,7 +1180,6 @@ install(TARGETS shadps4 BUNDLE DESTINATION .) if (ENABLE_QT_GUI AND CMAKE_SYSTEM_NAME STREQUAL "Linux") install(FILES "dist/net.shadps4.shadPS4.desktop" DESTINATION "share/applications") - install(FILES "dist/net.shadps4.shadPS4.releases.xml" DESTINATION "share/metainfo/releases") install(FILES "dist/net.shadps4.shadPS4.metainfo.xml" DESTINATION "share/metainfo") install(FILES ".github/shadps4.png" DESTINATION "share/icons/hicolor/512x512/apps" RENAME "net.shadps4.shadPS4.png") install(FILES "src/images/net.shadps4.shadPS4.svg" DESTINATION "share/icons/hicolor/scalable/apps") diff --git a/README.md b/README.md index fd40d2d63..9259ab875 100644 --- a/README.md +++ b/README.md @@ -55,6 +55,9 @@ This project began as a fun project. Given our limited free time, it may take so # Building +> [!IMPORTANT] +> If you want to use shadPS4 to play your games, you don't have to follow the build instructions, you can simply download the emulator from either the [**release tab**](https://github.com/shadps4-emu/shadPS4/releases) or the [**action tab**](https://github.com/shadps4-emu/shadPS4/actions). + ## Windows Check the build instructions for [**Windows**](https://github.com/shadps4-emu/shadPS4/blob/main/documents/building-windows.md). @@ -74,7 +77,10 @@ Check the build instructions for [**macOS**](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 and Mouse Mappings + +> [!NOTE] +> Some keyboards may also require you to hold the Fn key to use the F\* keys. Mac users should use the Command key instead of Control, and need to use Command+F11 for full screen to avoid conflicting with system key bindings. | Button | Function | |-------------|-------------| @@ -86,32 +92,35 @@ F12 | Trigger RenderDoc Capture > [!NOTE] > Xbox and DualShock controllers work out of the box. -| Controller button | Keyboard equivelant | Mac alternative | -|-------------|-------------|--------------| -LEFT AXIS UP | W | | -LEFT AXIS DOWN | S | | -LEFT AXIS LEFT | A | | -LEFT AXIS RIGHT | D | | -RIGHT AXIS UP | I | | -RIGHT AXIS DOWN | K | | -RIGHT AXIS LEFT | J | | -RIGHT AXIS RIGHT | L | | -TRIANGLE | Numpad 8 | C | -CIRCLE | Numpad 6 | B | -CROSS | Numpad 2 | N | -SQUARE | Numpad 4 | V | -PAD UP | UP | | -PAD DOWN | DOWN | | -PAD LEFT | LEFT | | -PAD RIGHT | RIGHT | | -OPTIONS | RETURN | | -BACK BUTTON / TOUCH PAD | SPACE | | -L1 | Q | | -R1 | U | | -L2 | E | | -R2 | O | | -L3 | X | | -R3 | M | | +| Controller button | Keyboard equivalent | +|-------------|-------------| +LEFT AXIS UP | W | +LEFT AXIS DOWN | S | +LEFT AXIS LEFT | A | +LEFT AXIS RIGHT | D | +RIGHT AXIS UP | I | +RIGHT AXIS DOWN | K | +RIGHT AXIS LEFT | J | +RIGHT AXIS RIGHT | L | +TRIANGLE | Numpad 8 or C | +CIRCLE | Numpad 6 or B | +CROSS | Numpad 2 or N | +SQUARE | Numpad 4 or V | +PAD UP | UP | +PAD DOWN | DOWN | +PAD LEFT | LEFT | +PAD RIGHT | RIGHT | +OPTIONS | RETURN | +BACK BUTTON / TOUCH PAD | SPACE | +L1 | Q | +R1 | U | +L2 | E | +R2 | O | +L3 | X | +R3 | M | + +Keyboard and mouse inputs can be customized in the settings menu by clicking the Controller button, and further details and help on controls are also found there. Custom bindings are saved per-game. Inputs support up to three keys per binding, mouse buttons, mouse movement mapped to joystick input, and more. + # Main team @@ -134,6 +143,9 @@ Logo is done by [**Xphalnos**](https://github.com/Xphalnos) If you want to contribute, please look the [**CONTRIBUTING.md**](https://github.com/shadps4-emu/shadPS4/blob/main/CONTRIBUTING.md) file.\ Open a PR and we'll check it :) +# Translations + +If you want to translate shadPS4 to your language we use [**crowdin**](https://crowdin.com/project/shadps4-emulator). # Contributors @@ -151,7 +163,7 @@ A few noteworthy teams/projects who've helped us along the way are: - **yuzu**: Our shader compiler has been designed with yuzu's Hades compiler as a blueprint. This allowed us to focus on the challenges of emulating a modern AMD GPU while having a high-quality optimizing shader compiler implementation as a base. -- [**hydra**](https://github.com/hydra-emu/hydra): A multisystem, multiplatform emulator (chip-8, GB, NES, N64) from Paris. +- [**felix86**](https://github.com/OFFTKP/felix86): A new x86-64 → RISC-V Linux userspace emulator # License diff --git a/REUSE.toml b/REUSE.toml index cba63adf1..ad2bc3678 100644 --- a/REUSE.toml +++ b/REUSE.toml @@ -3,26 +3,34 @@ version = 1 [[annotations]] path = [ "REUSE.toml", + "crowdin.yml", "CMakeSettings.json", ".github/FUNDING.yml", ".github/shadps4.png", + ".github/workflows/scripts/update_translation.sh", + ".github/workflows/update_translation.yml", ".gitmodules", "dist/MacOSBundleInfo.plist.in", "dist/net.shadps4.shadPS4.desktop", "dist/net.shadps4.shadPS4_metadata.pot", "dist/net.shadps4.shadPS4.metainfo.xml", - "dist/net.shadps4.shadPS4.releases.xml", "documents/changelog.md", "documents/Quickstart/2.png", "documents/Screenshots/*", + "documents/Screenshots/Linux/*", "externals/MoltenVK/MoltenVK_icd.json", "scripts/ps4_names.txt", + "src/images/bronze.png", + "src/images/gold.png", + "src/images/platinum.png", + "src/images/silver.png", "src/images/about_icon.png", "src/images/controller_icon.png", "src/images/discord.png", "src/images/dump_icon.png", "src/images/exit_icon.png", "src/images/file_icon.png", + "src/images/trophy_icon.png", "src/images/flag_china.png", "src/images/flag_eu.png", "src/images/flag_jp.png", @@ -32,14 +40,19 @@ path = [ "src/images/folder_icon.png", "src/images/github.png", "src/images/grid_icon.png", + "src/images/keyboard_icon.png", "src/images/iconsize_icon.png", + "src/images/KBM.png", "src/images/ko-fi.png", "src/images/list_icon.png", "src/images/list_mode_icon.png", "src/images/pause_icon.png", "src/images/play_icon.png", - "src/images/refresh_icon.png", + "src/images/ps4_controller.png", + "src/images/restart_game_icon.png", + "src/images/refreshlist_icon.png", "src/images/settings_icon.png", + "src/images/fullscreen_icon.png", "src/images/stop_icon.png", "src/images/utils_icon.png", "src/images/shadPS4.icns", @@ -51,6 +64,7 @@ path = [ "src/images/website.png", "src/shadps4.qrc", "src/shadps4.rc", + "src/qt_gui/translations/update_translation.sh", ] precedence = "aggregate" SPDX-FileCopyrightText = "shadPS4 Emulator Project" @@ -97,3 +111,12 @@ path = "externals/gcn/include/**" SPDX-FileCopyrightText = "NONE" SPDX-License-Identifier = "CC0-1.0" +[[annotations]] +path = "cmake/CMakeRC.cmake" +SPDX-FileCopyrightText = "Copyright (c) 2017 vector-of-bool " +SPDX-License-Identifier = "MIT" + +[[annotations]] +path = "src/video_core/host_shaders/fsr/*" +SPDX-FileCopyrightText = "Copyright (c) 2021 Advanced Micro Devices, Inc. All rights reserved." +SPDX-License-Identifier = "MIT" diff --git a/cmake/CMakeRC.cmake b/cmake/CMakeRC.cmake new file mode 100644 index 000000000..cea12fba7 --- /dev/null +++ b/cmake/CMakeRC.cmake @@ -0,0 +1,666 @@ +# MIT License +# +# Copyright (c) 2017 vector-of-bool +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in all +# copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. + +# This block is executed when generating an intermediate resource file, not when +# running in CMake configure mode +if(_CMRC_GENERATE_MODE) + # Read in the digits + file(READ "${INPUT_FILE}" bytes HEX) + # Format each pair into a character literal. Heuristics seem to favor doing + # the conversion in groups of five for fastest conversion + string(REGEX REPLACE "(..)(..)(..)(..)(..)" "'\\\\x\\1','\\\\x\\2','\\\\x\\3','\\\\x\\4','\\\\x\\5'," chars "${bytes}") + # Since we did this in groups, we have some leftovers to clean up + string(LENGTH "${bytes}" n_bytes2) + math(EXPR n_bytes "${n_bytes2} / 2") + math(EXPR remainder "${n_bytes} % 5") # <-- '5' is the grouping count from above + set(cleanup_re "$") + set(cleanup_sub ) + while(remainder) + set(cleanup_re "(..)${cleanup_re}") + set(cleanup_sub "'\\\\x\\${remainder}',${cleanup_sub}") + math(EXPR remainder "${remainder} - 1") + endwhile() + if(NOT cleanup_re STREQUAL "$") + string(REGEX REPLACE "${cleanup_re}" "${cleanup_sub}" chars "${chars}") + endif() + string(CONFIGURE [[ + namespace { const char file_array[] = { @chars@ 0 }; } + namespace cmrc { namespace @NAMESPACE@ { namespace res_chars { + extern const char* const @SYMBOL@_begin = file_array; + extern const char* const @SYMBOL@_end = file_array + @n_bytes@; + }}} + ]] code) + file(WRITE "${OUTPUT_FILE}" "${code}") + # Exit from the script. Nothing else needs to be processed + return() +endif() + +set(_version 2.0.0) + +cmake_minimum_required(VERSION 3.12) +include(CMakeParseArguments) + +if(COMMAND cmrc_add_resource_library) + if(NOT DEFINED _CMRC_VERSION OR NOT (_version STREQUAL _CMRC_VERSION)) + message(WARNING "More than one CMakeRC version has been included in this project.") + endif() + # CMakeRC has already been included! Don't do anything + return() +endif() + +set(_CMRC_VERSION "${_version}" CACHE INTERNAL "CMakeRC version. Used for checking for conflicts") + +set(_CMRC_SCRIPT "${CMAKE_CURRENT_LIST_FILE}" CACHE INTERNAL "Path to CMakeRC script") + +function(_cmrc_normalize_path var) + set(path "${${var}}") + file(TO_CMAKE_PATH "${path}" path) + while(path MATCHES "//") + string(REPLACE "//" "/" path "${path}") + endwhile() + string(REGEX REPLACE "/+$" "" path "${path}") + set("${var}" "${path}" PARENT_SCOPE) +endfunction() + +get_filename_component(_inc_dir "${CMAKE_BINARY_DIR}/_cmrc/include" ABSOLUTE) +set(CMRC_INCLUDE_DIR "${_inc_dir}" CACHE INTERNAL "Directory for CMakeRC include files") +# Let's generate the primary include file +file(MAKE_DIRECTORY "${CMRC_INCLUDE_DIR}/cmrc") +set(hpp_content [==[ +#ifndef CMRC_CMRC_HPP_INCLUDED +#define CMRC_CMRC_HPP_INCLUDED + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#if !(defined(__EXCEPTIONS) || defined(__cpp_exceptions) || defined(_CPPUNWIND) || defined(CMRC_NO_EXCEPTIONS)) +#define CMRC_NO_EXCEPTIONS 1 +#endif + +namespace cmrc { namespace detail { struct dummy; } } + +#define CMRC_DECLARE(libid) \ + namespace cmrc { namespace detail { \ + struct dummy; \ + static_assert(std::is_same::value, "CMRC_DECLARE() must only appear at the global namespace"); \ + } } \ + namespace cmrc { namespace libid { \ + cmrc::embedded_filesystem get_filesystem(); \ + } } static_assert(true, "") + +namespace cmrc { + +class file { + const char* _begin = nullptr; + const char* _end = nullptr; + +public: + using iterator = const char*; + using const_iterator = iterator; + iterator begin() const noexcept { return _begin; } + iterator cbegin() const noexcept { return _begin; } + iterator end() const noexcept { return _end; } + iterator cend() const noexcept { return _end; } + std::size_t size() const { return static_cast(std::distance(begin(), end())); } + + file() = default; + file(iterator beg, iterator end) noexcept : _begin(beg), _end(end) {} +}; + +class directory_entry; + +namespace detail { + +class directory; +class file_data; + +class file_or_directory { + union _data_t { + class file_data* file_data; + class directory* directory; + } _data; + bool _is_file = true; + +public: + explicit file_or_directory(file_data& f) { + _data.file_data = &f; + } + explicit file_or_directory(directory& d) { + _data.directory = &d; + _is_file = false; + } + bool is_file() const noexcept { + return _is_file; + } + bool is_directory() const noexcept { + return !is_file(); + } + const directory& as_directory() const noexcept { + assert(!is_file()); + return *_data.directory; + } + const file_data& as_file() const noexcept { + assert(is_file()); + return *_data.file_data; + } +}; + +class file_data { +public: + const char* begin_ptr; + const char* end_ptr; + file_data(const file_data&) = delete; + file_data(const char* b, const char* e) : begin_ptr(b), end_ptr(e) {} +}; + +inline std::pair split_path(const std::string& path) { + auto first_sep = path.find("/"); + if (first_sep == path.npos) { + return std::make_pair(path, ""); + } else { + return std::make_pair(path.substr(0, first_sep), path.substr(first_sep + 1)); + } +} + +struct created_subdirectory { + class directory& directory; + class file_or_directory& index_entry; +}; + +class directory { + std::list _files; + std::list _dirs; + std::map _index; + + using base_iterator = std::map::const_iterator; + +public: + + directory() = default; + directory(const directory&) = delete; + + created_subdirectory add_subdir(std::string name) & { + _dirs.emplace_back(); + auto& back = _dirs.back(); + auto& fod = _index.emplace(name, file_or_directory{back}).first->second; + return created_subdirectory{back, fod}; + } + + file_or_directory* add_file(std::string name, const char* begin, const char* end) & { + assert(_index.find(name) == _index.end()); + _files.emplace_back(begin, end); + return &_index.emplace(name, file_or_directory{_files.back()}).first->second; + } + + const file_or_directory* get(const std::string& path) const { + auto pair = split_path(path); + auto child = _index.find(pair.first); + if (child == _index.end()) { + return nullptr; + } + auto& entry = child->second; + if (pair.second.empty()) { + // We're at the end of the path + return &entry; + } + + if (entry.is_file()) { + // We can't traverse into a file. Stop. + return nullptr; + } + // Keep going down + return entry.as_directory().get(pair.second); + } + + class iterator { + base_iterator _base_iter; + base_iterator _end_iter; + public: + using value_type = directory_entry; + using difference_type = std::ptrdiff_t; + using pointer = const value_type*; + using reference = const value_type&; + using iterator_category = std::input_iterator_tag; + + iterator() = default; + explicit iterator(base_iterator iter, base_iterator end) : _base_iter(iter), _end_iter(end) {} + + iterator begin() const noexcept { + return *this; + } + + iterator end() const noexcept { + return iterator(_end_iter, _end_iter); + } + + inline value_type operator*() const noexcept; + + bool operator==(const iterator& rhs) const noexcept { + return _base_iter == rhs._base_iter; + } + + bool operator!=(const iterator& rhs) const noexcept { + return !(*this == rhs); + } + + iterator& operator++() noexcept { + ++_base_iter; + return *this; + } + + iterator operator++(int) noexcept { + auto cp = *this; + ++_base_iter; + return cp; + } + }; + + using const_iterator = iterator; + + iterator begin() const noexcept { + return iterator(_index.begin(), _index.end()); + } + + iterator end() const noexcept { + return iterator(); + } +}; + +inline std::string normalize_path(std::string path) { + while (path.find("/") == 0) { + path.erase(path.begin()); + } + while (!path.empty() && (path.rfind("/") == path.size() - 1)) { + path.pop_back(); + } + auto off = path.npos; + while ((off = path.find("//")) != path.npos) { + path.erase(path.begin() + static_cast(off)); + } + return path; +} + +using index_type = std::map; + +} // detail + +class directory_entry { + std::string _fname; + const detail::file_or_directory* _item; + +public: + directory_entry() = delete; + explicit directory_entry(std::string filename, const detail::file_or_directory& item) + : _fname(filename) + , _item(&item) + {} + + const std::string& filename() const & { + return _fname; + } + std::string filename() const && { + return std::move(_fname); + } + + bool is_file() const { + return _item->is_file(); + } + + bool is_directory() const { + return _item->is_directory(); + } +}; + +directory_entry detail::directory::iterator::operator*() const noexcept { + assert(begin() != end()); + return directory_entry(_base_iter->first, _base_iter->second); +} + +using directory_iterator = detail::directory::iterator; + +class embedded_filesystem { + // Never-null: + const cmrc::detail::index_type* _index; + const detail::file_or_directory* _get(std::string path) const { + path = detail::normalize_path(path); + auto found = _index->find(path); + if (found == _index->end()) { + return nullptr; + } else { + return found->second; + } + } + +public: + explicit embedded_filesystem(const detail::index_type& index) + : _index(&index) + {} + + file open(const std::string& path) const { + auto entry_ptr = _get(path); + if (!entry_ptr || !entry_ptr->is_file()) { +#ifdef CMRC_NO_EXCEPTIONS + fprintf(stderr, "Error no such file or directory: %s\n", path.c_str()); + abort(); +#else + throw std::system_error(make_error_code(std::errc::no_such_file_or_directory), path); +#endif + } + auto& dat = entry_ptr->as_file(); + return file{dat.begin_ptr, dat.end_ptr}; + } + + bool is_file(const std::string& path) const noexcept { + auto entry_ptr = _get(path); + return entry_ptr && entry_ptr->is_file(); + } + + bool is_directory(const std::string& path) const noexcept { + auto entry_ptr = _get(path); + return entry_ptr && entry_ptr->is_directory(); + } + + bool exists(const std::string& path) const noexcept { + return !!_get(path); + } + + directory_iterator iterate_directory(const std::string& path) const { + auto entry_ptr = _get(path); + if (!entry_ptr) { +#ifdef CMRC_NO_EXCEPTIONS + fprintf(stderr, "Error no such file or directory: %s\n", path.c_str()); + abort(); +#else + throw std::system_error(make_error_code(std::errc::no_such_file_or_directory), path); +#endif + } + if (!entry_ptr->is_directory()) { +#ifdef CMRC_NO_EXCEPTIONS + fprintf(stderr, "Error not a directory: %s\n", path.c_str()); + abort(); +#else + throw std::system_error(make_error_code(std::errc::not_a_directory), path); +#endif + } + return entry_ptr->as_directory().begin(); + } +}; + +} + +#endif // CMRC_CMRC_HPP_INCLUDED +]==]) + +set(cmrc_hpp "${CMRC_INCLUDE_DIR}/cmrc/cmrc.hpp" CACHE INTERNAL "") +set(_generate 1) +if(EXISTS "${cmrc_hpp}") + file(READ "${cmrc_hpp}" _current) + if(_current STREQUAL hpp_content) + set(_generate 0) + endif() +endif() +file(GENERATE OUTPUT "${cmrc_hpp}" CONTENT "${hpp_content}" CONDITION ${_generate}) + +add_library(cmrc-base INTERFACE) +target_include_directories(cmrc-base INTERFACE $) +# Signal a basic C++11 feature to require C++11. +target_compile_features(cmrc-base INTERFACE cxx_nullptr) +set_property(TARGET cmrc-base PROPERTY INTERFACE_CXX_EXTENSIONS OFF) +add_library(cmrc::base ALIAS cmrc-base) + +function(cmrc_add_resource_library name) + set(args ALIAS NAMESPACE TYPE) + cmake_parse_arguments(ARG "" "${args}" "" "${ARGN}") + # Generate the identifier for the resource library's namespace + set(ns_re "[a-zA-Z_][a-zA-Z0-9_]*") + if(NOT DEFINED ARG_NAMESPACE) + # Check that the library name is also a valid namespace + if(NOT name MATCHES "${ns_re}") + message(SEND_ERROR "Library name is not a valid namespace. Specify the NAMESPACE argument") + endif() + set(ARG_NAMESPACE "${name}") + else() + if(NOT ARG_NAMESPACE MATCHES "${ns_re}") + message(SEND_ERROR "NAMESPACE for ${name} is not a valid C++ namespace identifier (${ARG_NAMESPACE})") + endif() + endif() + set(libname "${name}") + # Check that type is either "STATIC" or "OBJECT", or default to "STATIC" if + # not set + if(NOT DEFINED ARG_TYPE) + set(ARG_TYPE STATIC) + elseif(NOT "${ARG_TYPE}" MATCHES "^(STATIC|OBJECT)$") + message(SEND_ERROR "${ARG_TYPE} is not a valid TYPE (STATIC and OBJECT are acceptable)") + set(ARG_TYPE STATIC) + endif() + # Generate a library with the compiled in character arrays. + string(CONFIGURE [=[ + #include + #include + #include + + namespace cmrc { + namespace @ARG_NAMESPACE@ { + + namespace res_chars { + // These are the files which are available in this resource library + $, + > + } + + namespace { + + const cmrc::detail::index_type& + get_root_index() { + static cmrc::detail::directory root_directory_; + static cmrc::detail::file_or_directory root_directory_fod{root_directory_}; + static cmrc::detail::index_type root_index; + root_index.emplace("", &root_directory_fod); + struct dir_inl { + class cmrc::detail::directory& directory; + }; + dir_inl root_directory_dir{root_directory_}; + (void)root_directory_dir; + $, + > + $, + > + return root_index; + } + + } + + cmrc::embedded_filesystem get_filesystem() { + static auto& index = get_root_index(); + return cmrc::embedded_filesystem{index}; + } + + } // @ARG_NAMESPACE@ + } // cmrc + ]=] cpp_content @ONLY) + get_filename_component(libdir "${CMAKE_CURRENT_BINARY_DIR}/__cmrc_${name}" ABSOLUTE) + get_filename_component(lib_tmp_cpp "${libdir}/lib_.cpp" ABSOLUTE) + string(REPLACE "\n " "\n" cpp_content "${cpp_content}") + file(GENERATE OUTPUT "${lib_tmp_cpp}" CONTENT "${cpp_content}") + get_filename_component(libcpp "${libdir}/lib.cpp" ABSOLUTE) + add_custom_command(OUTPUT "${libcpp}" + DEPENDS "${lib_tmp_cpp}" "${cmrc_hpp}" + COMMAND ${CMAKE_COMMAND} -E copy_if_different "${lib_tmp_cpp}" "${libcpp}" + COMMENT "Generating ${name} resource loader" + ) + # Generate the actual static library. Each source file is just a single file + # with a character array compiled in containing the contents of the + # corresponding resource file. + add_library(${name} ${ARG_TYPE} ${libcpp}) + set_property(TARGET ${name} PROPERTY CMRC_LIBDIR "${libdir}") + set_property(TARGET ${name} PROPERTY CMRC_NAMESPACE "${ARG_NAMESPACE}") + target_link_libraries(${name} PUBLIC cmrc::base) + set_property(TARGET ${name} PROPERTY CMRC_IS_RESOURCE_LIBRARY TRUE) + if(ARG_ALIAS) + add_library("${ARG_ALIAS}" ALIAS ${name}) + endif() + cmrc_add_resources(${name} ${ARG_UNPARSED_ARGUMENTS}) +endfunction() + +function(_cmrc_register_dirs name dirpath) + if(dirpath STREQUAL "") + return() + endif() + # Skip this dir if we have already registered it + get_target_property(registered "${name}" _CMRC_REGISTERED_DIRS) + if(dirpath IN_LIST registered) + return() + endif() + # Register the parent directory first + get_filename_component(parent "${dirpath}" DIRECTORY) + if(NOT parent STREQUAL "") + _cmrc_register_dirs("${name}" "${parent}") + endif() + # Now generate the registration + set_property(TARGET "${name}" APPEND PROPERTY _CMRC_REGISTERED_DIRS "${dirpath}") + _cm_encode_fpath(sym "${dirpath}") + if(parent STREQUAL "") + set(parent_sym root_directory) + else() + _cm_encode_fpath(parent_sym "${parent}") + endif() + get_filename_component(leaf "${dirpath}" NAME) + set_property( + TARGET "${name}" + APPEND PROPERTY CMRC_MAKE_DIRS + "static auto ${sym}_dir = ${parent_sym}_dir.directory.add_subdir(\"${leaf}\")\;" + "root_index.emplace(\"${dirpath}\", &${sym}_dir.index_entry)\;" + ) +endfunction() + +function(cmrc_add_resources name) + get_target_property(is_reslib ${name} CMRC_IS_RESOURCE_LIBRARY) + if(NOT TARGET ${name} OR NOT is_reslib) + message(SEND_ERROR "cmrc_add_resources called on target '${name}' which is not an existing resource library") + return() + endif() + + set(options) + set(args WHENCE PREFIX) + set(list_args) + cmake_parse_arguments(ARG "${options}" "${args}" "${list_args}" "${ARGN}") + + if(NOT ARG_WHENCE) + set(ARG_WHENCE ${CMAKE_CURRENT_SOURCE_DIR}) + endif() + _cmrc_normalize_path(ARG_WHENCE) + get_filename_component(ARG_WHENCE "${ARG_WHENCE}" ABSOLUTE) + + # Generate the identifier for the resource library's namespace + get_target_property(lib_ns "${name}" CMRC_NAMESPACE) + + get_target_property(libdir ${name} CMRC_LIBDIR) + get_target_property(target_dir ${name} SOURCE_DIR) + file(RELATIVE_PATH reldir "${target_dir}" "${CMAKE_CURRENT_SOURCE_DIR}") + if(reldir MATCHES "^\\.\\.") + message(SEND_ERROR "Cannot call cmrc_add_resources in a parent directory from the resource library target") + return() + endif() + + foreach(input IN LISTS ARG_UNPARSED_ARGUMENTS) + _cmrc_normalize_path(input) + get_filename_component(abs_in "${input}" ABSOLUTE) + # Generate a filename based on the input filename that we can put in + # the intermediate directory. + file(RELATIVE_PATH relpath "${ARG_WHENCE}" "${abs_in}") + if(relpath MATCHES "^\\.\\.") + # For now we just error on files that exist outside of the soure dir. + message(SEND_ERROR "Cannot add file '${input}': File must be in a subdirectory of ${ARG_WHENCE}") + continue() + endif() + if(DEFINED ARG_PREFIX) + _cmrc_normalize_path(ARG_PREFIX) + endif() + if(ARG_PREFIX AND NOT ARG_PREFIX MATCHES "/$") + set(ARG_PREFIX "${ARG_PREFIX}/") + endif() + get_filename_component(dirpath "${ARG_PREFIX}${relpath}" DIRECTORY) + _cmrc_register_dirs("${name}" "${dirpath}") + get_filename_component(abs_out "${libdir}/intermediate/${ARG_PREFIX}${relpath}.cpp" ABSOLUTE) + # Generate a symbol name relpath the file's character array + _cm_encode_fpath(sym "${relpath}") + # Get the symbol name for the parent directory + if(dirpath STREQUAL "") + set(parent_sym root_directory) + else() + _cm_encode_fpath(parent_sym "${dirpath}") + endif() + # Generate the rule for the intermediate source file + _cmrc_generate_intermediate_cpp(${lib_ns} ${sym} "${abs_out}" "${abs_in}") + target_sources(${name} PRIVATE "${abs_out}") + set_property(TARGET ${name} APPEND PROPERTY CMRC_EXTERN_DECLS + "// Pointers to ${input}" + "extern const char* const ${sym}_begin\;" + "extern const char* const ${sym}_end\;" + ) + get_filename_component(leaf "${relpath}" NAME) + set_property( + TARGET ${name} + APPEND PROPERTY CMRC_MAKE_FILES + "root_index.emplace(" + " \"${ARG_PREFIX}${relpath}\"," + " ${parent_sym}_dir.directory.add_file(" + " \"${leaf}\"," + " res_chars::${sym}_begin," + " res_chars::${sym}_end" + " )" + ")\;" + ) + endforeach() +endfunction() + +function(_cmrc_generate_intermediate_cpp lib_ns symbol outfile infile) + add_custom_command( + # This is the file we will generate + OUTPUT "${outfile}" + # These are the primary files that affect the output + DEPENDS "${infile}" "${_CMRC_SCRIPT}" + COMMAND + "${CMAKE_COMMAND}" + -D_CMRC_GENERATE_MODE=TRUE + -DNAMESPACE=${lib_ns} + -DSYMBOL=${symbol} + "-DINPUT_FILE=${infile}" + "-DOUTPUT_FILE=${outfile}" + -P "${_CMRC_SCRIPT}" + COMMENT "Generating intermediate file for ${infile}" + ) +endfunction() + +function(_cm_encode_fpath var fpath) + string(MAKE_C_IDENTIFIER "${fpath}" ident) + string(MD5 hash "${fpath}") + string(SUBSTRING "${hash}" 0 4 hash) + set(${var} f_${hash}_${ident} PARENT_SCOPE) +endfunction() diff --git a/crowdin.yml b/crowdin.yml new file mode 100644 index 000000000..64363f02a --- /dev/null +++ b/crowdin.yml @@ -0,0 +1,3 @@ +files: + - source: /src/qt_gui/translations/en_US.ts + translation: /%original_path%/%locale_with_underscore%.ts diff --git a/dist/net.shadps4.shadPS4.desktop b/dist/net.shadps4.shadPS4.desktop index fbefa0566..a87829e7b 100644 --- a/dist/net.shadps4.shadPS4.desktop +++ b/dist/net.shadps4.shadPS4.desktop @@ -5,5 +5,5 @@ Terminal=false Type=Application Icon=net.shadps4.shadPS4 Comment=PlayStation 4 emulator -Categories=Game; +Categories=Game;Emulator; StartupWMClass=shadps4; diff --git a/dist/net.shadps4.shadPS4.metainfo.xml b/dist/net.shadps4.shadPS4.metainfo.xml index bef0bec4c..99f9e070d 100644 --- a/dist/net.shadps4.shadPS4.metainfo.xml +++ b/dist/net.shadps4.shadPS4.metainfo.xml @@ -26,7 +26,7 @@ https://cdn.jsdelivr.net/gh/shadps4-emu/shadps4@main/documents/Screenshots/3.png - Yakuza Kiwami + Yakuza 0 https://cdn.jsdelivr.net/gh/shadps4-emu/shadps4@main/documents/Screenshots/4.png @@ -36,9 +36,36 @@ Game - - - + + + https://github.com/shadps4-emu/shadPS4/releases/tag/v.0.7.0 + + + https://github.com/shadps4-emu/shadPS4/releases/tag/v.0.6.0 + + + https://github.com/shadps4-emu/shadPS4/releases/tag/v.0.5.0 + + + https://github.com/shadps4-emu/shadPS4/releases/tag/v.0.4.0 + + + https://github.com/shadps4-emu/shadPS4/releases/tag/v.0.3.0 + + + https://github.com/shadps4-emu/shadPS4/releases/tag/v.0.2.0 + + + https://github.com/shadps4-emu/shadPS4/releases/tag/0.1.0 + + + https://github.com/shadps4-emu/shadPS4/releases/tag/v0.0.3 + + + https://github.com/shadps4-emu/shadPS4/releases/tag/v0.0.2 + + + https://github.com/shadps4-emu/shadPS4/releases/tag/v0.0.1 diff --git a/dist/net.shadps4.shadPS4.releases.xml b/dist/net.shadps4.shadPS4.releases.xml deleted file mode 100644 index 8da203fe4..000000000 --- a/dist/net.shadps4.shadPS4.releases.xml +++ /dev/null @@ -1,23 +0,0 @@ - - - https://github.com/shadps4-emu/shadPS4/releases/tag/v.0.4.0 - - - https://github.com/shadps4-emu/shadPS4/releases/tag/v.0.3.0 - - - https://github.com/shadps4-emu/shadPS4/releases/tag/v.0.2.0 - - - https://github.com/shadps4-emu/shadPS4/releases/tag/0.1.0 - - - https://github.com/shadps4-emu/shadPS4/releases/tag/v0.0.3 - - - https://github.com/shadps4-emu/shadPS4/releases/tag/v0.0.2 - - - https://github.com/shadps4-emu/shadPS4/releases/tag/v0.0.1 - - diff --git a/documents/Quickstart/2.png b/documents/Quickstart/2.png deleted file mode 100644 index 7e5bdfb15..000000000 Binary files a/documents/Quickstart/2.png and /dev/null differ diff --git a/documents/Quickstart/Quickstart.md b/documents/Quickstart/Quickstart.md index b2931e51e..9c6bc5a6f 100644 --- a/documents/Quickstart/Quickstart.md +++ b/documents/Quickstart/Quickstart.md @@ -13,7 +13,6 @@ SPDX-License-Identifier: GPL-2.0-or-later - [**RAM**](#ram) - [**OS**](#os) - [**Have the latest WIP version**](#how-to-run-the-latest-work-in-progress-builds-of-shadps4) -- [**Install PKG files (Games and Updates)**](#install-pkg-files) - [**Configure the emulator**](#configure-the-emulator) ## Minimum PC requirements @@ -22,7 +21,10 @@ SPDX-License-Identifier: GPL-2.0-or-later - A processor with at least 4 cores and 6 threads - Above 2.5 GHz frequency -- required support AVX2 extension or Rosetta 2 on ARM +- A CPU supporting the following instruction sets: MMX, SSE, SSE2, SSE3, SSSE3, SSE4.1, SSE4.2, AVX, F16C, CLMUL, AES, BMI1, MOVBE, XSAVE, ABM + - **Intel**: Haswell generation or newer + - **AMD**: Jaguar generation or newer + - **Apple**: Rosetta 2 on macOS 15 or newer ### GPU @@ -45,13 +47,7 @@ SPDX-License-Identifier: GPL-2.0-or-later 2. Once downloaded, extract to its own folder, and run shadPS4's executable from the extracted folder. -3. Upon first launch, shadPS4 will prompt you to select a folder to store your installed games in. Select "Browse" and then select a folder that shadPS4 can use to install your PKG files to. - -## Install PKG files - -To install PKG files (game and updates), you will need the Qt application (with UI). You will have to go to "File" then to "Install Packages (PKG)", a window will open then you will have to select the files. You can install multiple PKG files at once. Once finished, the game should appear in the application. - - +3. Upon first launch, shadPS4 will prompt you to select a folder to store your installed games in. Select "Browse" and then select a folder that contains your dumped games. ## Configure the emulator diff --git a/documents/Screenshots/Linux/1.png b/documents/Screenshots/Linux/1.png new file mode 100644 index 000000000..3dd5ef92b Binary files /dev/null and b/documents/Screenshots/Linux/1.png differ diff --git a/documents/Screenshots/Linux/2.png b/documents/Screenshots/Linux/2.png new file mode 100644 index 000000000..fc5ff3b53 Binary files /dev/null and b/documents/Screenshots/Linux/2.png differ diff --git a/documents/Screenshots/Linux/3.png b/documents/Screenshots/Linux/3.png new file mode 100644 index 000000000..c1c6d42de Binary files /dev/null and b/documents/Screenshots/Linux/3.png differ diff --git a/documents/Screenshots/Linux/4.png b/documents/Screenshots/Linux/4.png new file mode 100644 index 000000000..6e8a3b6c1 Binary files /dev/null and b/documents/Screenshots/Linux/4.png differ diff --git a/documents/Screenshots/Linux/5.png b/documents/Screenshots/Linux/5.png new file mode 100644 index 000000000..737674606 Binary files /dev/null and b/documents/Screenshots/Linux/5.png differ diff --git a/documents/building-linux.md b/documents/building-linux.md index 989669f4f..cdc8ba12f 100644 --- a/documents/building-linux.md +++ b/documents/building-linux.md @@ -3,59 +3,156 @@ SPDX-FileCopyrightText: 2024 shadPS4 Emulator Project SPDX-License-Identifier: GPL-2.0-or-later --> -## Build shadPS4 for Linux +## Build shadPS4 for Linux -### Install the necessary tools to build shadPS4: +First and foremost, Clang 18 is the **recommended compiler** as it is used for official builds and CI. If you build with GCC, you might encounter issues — please report any you find. Additionally, if you choose to use GCC, please build shadPS4 with Clang at least once before creating an `[APP BUG]` issue or submitting a pull request. + +## Preparatory steps + +### Installing dependencies #### Debian & Ubuntu -``` -sudo apt install build-essential clang git cmake libasound2-dev libpulse-dev libopenal-dev libssl-dev zlib1g-dev libedit-dev libudev-dev libevdev-dev libsdl2-dev libjack-dev libsndio-dev qt6-base-dev qt6-tools-dev qt6-multimedia-dev libvulkan-dev vulkan-validationlayers + +```bash +sudo apt install build-essential clang git cmake libasound2-dev \ + libpulse-dev libopenal-dev libssl-dev zlib1g-dev libedit-dev \ + libudev-dev libevdev-dev libsdl2-dev libjack-dev libsndio-dev \ + qt6-base-dev qt6-tools-dev qt6-multimedia-dev libvulkan-dev \ + vulkan-validationlayers libpng-dev ``` #### Fedora -``` -sudo dnf install clang git cmake libatomic alsa-lib-devel pipewire-jack-audio-connection-kit-devel openal-devel openssl-devel libevdev-devel libudev-devel libXext-devel qt6-qtbase-devel qt6-qtbase-private-devel qt6-qtmultimedia-devel qt6-qtsvg-devel qt6-qttools-devel vulkan-devel vulkan-validation-layers + +```bash +sudo dnf install clang git cmake libatomic alsa-lib-devel \ + pipewire-jack-audio-connection-kit-devel openal-devel \ + openssl-devel libevdev-devel libudev-devel libXext-devel \ + qt6-qtbase-devel qt6-qtbase-private-devel \ + qt6-qtmultimedia-devel qt6-qtsvg-devel qt6-qttools-devel \ + vulkan-devel vulkan-validation-layers libpng-devel ``` #### Arch Linux + +```bash +sudo pacman -S base-devel clang git cmake sndio jack2 openal \ + qt6-base qt6-declarative qt6-multimedia qt6-tools sdl2 \ + vulkan-validation-layers libpng ``` -sudo pacman -S base-devel clang git cmake sndio jack2 openal qt6-base qt6-declarative qt6-multimedia sdl2 vulkan-validation-layers -``` + +**Note**: The `shadps4-git` AUR package is not maintained by any of the developers, and it uses the default compiler, which is often set to GCC. Use at your own discretion. #### OpenSUSE -``` -sudo zypper install clang git cmake libasound2 libpulse-devel libsndio7 libjack-devel openal-soft-devel libopenssl-devel zlib-devel libedit-devel systemd-devel libevdev-devel qt6-base-devel qt6-multimedia-devel qt6-svg-devel qt6-linguist-devel qt6-gui-private-devel vulkan-devel vulkan-validationlayers -``` -### Cloning and compiling: -Clone the repository recursively: +```bash +sudo zypper install clang git cmake libasound2 libpulse-devel \ + libsndio7 libjack-devel openal-soft-devel libopenssl-devel \ + zlib-devel libedit-devel systemd-devel libevdev-devel \ + qt6-base-devel qt6-multimedia-devel qt6-svg-devel \ + qt6-linguist-devel qt6-gui-private-devel vulkan-devel \ + vulkan-validationlayers libpng-devel ``` + +#### NixOS + +```bash +nix-shell shell.nix +``` + +#### Other Linux distributions + +You can try one of two methods: + +- Search the packages by name and install them with your package manager, or +- Install [distrobox](https://distrobox.it/), create a container using any of the distributions cited above as a base, for Arch Linux you'd do: + +```bash +distrobox create --name archlinux --init --image archlinux:latest +``` + +and install the dependencies on that container as cited above. +This option is **highly recommended** for distributions with immutable/atomic filesystems (example: Fedora Kinoite, SteamOS). + +### Cloning + +```bash git clone --recursive https://github.com/shadps4-emu/shadPS4.git cd shadPS4 ``` -Generate the build directory in the shadPS4 directory. To disable the QT GUI, remove the ```-DENABLE_QT_GUI=ON``` flag: +## Building -**Note**: Clang is the compiler used for official builds and CI. If you build with GCC, you might encounter issues—please report any you find. If you choose to use GCC, we recommend building with Clang at least once before submitting a pull request. -``` +There are 3 options you can choose from. Option 1 is **highly recommended**. + +#### Option 1: Terminal-only + +1. Generate the build directory in the shadPS4 directory. + +```bash cmake -S . -B build/ -DENABLE_QT_GUI=ON -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ ``` -Enter the directory: -``` -cd build/ +To disable the Qt GUI, remove the `-DENABLE_QT_GUI=ON` flag. To change the build type (for debugging), add `-DCMAKE_BUILD_TYPE=Debug`. + +2. Use CMake to build the project: + +```bash +cmake --build ./build --parallel$(nproc) ``` -Use make to build the project: -``` -cmake --build . --parallel$(nproc) +If your computer freezes during this step, this could be caused by excessive system resource usage. In that case, remove `--parallel$(nproc)`. + +Now run the emulator. If Qt was enabled at configure time: + +```bash +./build/shadps4 ``` -Now run the emulator. If QT is enabled: -``` -./shadps4 -``` -Otherwise, specify the path to your PKG's boot file: -``` -./shadps4 /"PATH"/"TO"/"GAME"/"FOLDER"/eboot.bin +Otherwise, specify the path to your game's boot file: + +```bash +./build/shadps4 /"PATH"/"TO"/"GAME"/"FOLDER"/eboot.bin ``` + +You can also specify the Game ID as an argument for which game to boot, as long as the folder containing the games is specified in config.toml (example: Bloodborne (US) is CUSA00900). +#### Option 2: Configuring with cmake-gui + +`cmake-gui` should be installed by default alongside `cmake`, if not search for the package in your package manager and install it. + +Open `cmake-gui` and specify the source code and build directories. If you cloned the source code to your Home directory, it would be `/home/user/shadPS4` and `/home/user/shadPS4/build`. + +Click on Configure, select "Unix Makefiles", select "Specify native compilers", click Next and choose `clang` and `clang++` as the C and CXX compilers. Usually they are located in `/bin/clang` and `/bin/clang++`. Click on Finish and let it configure the project. + +Now every option should be displayed in red. Change anything you want, then click on Generate to make the changes permanent, then open a terminal window and do step 2 of Option 1. + +#### Option 3: Visual Studio Code + +This option is pretty convoluted and should only be used if you have VSCode as your default IDE, or just prefer building and debugging projects through it. This also assumes that you're using an Arch Linux environment, as the naming for some options might differ from other distros. + +[Download Visual Studio Code for your platform](https://code.visualstudio.com/download), or use [Code - OSS](https://github.com/microsoft/vscode) if you'd like. Code - OSS is available on most Linux distributions' package repositories (on Arch Linux it is simply named `code`). + +Once set up, go to Extensions and install "CMake Tools": + +![image](https://raw.githubusercontent.com/shadps4-emu/shadPS4/refs/heads/main/documents/Screenshots/Linux/3.png) + +You can also install other CMake and Clang related extensions if you'd like, but this one is what enables you to configure and build CMake projects directly within VSCode. + +Go to Settings, filter by `@ext:ms-vscode.cmake-tools configure` and disable this option: + +![image](https://raw.githubusercontent.com/shadps4-emu/shadPS4/refs/heads/main/documents/Screenshots/Linux/1.png) + +If you wish to build with the Qt GUI, add `-DENABLE_QT_GUI=ON` to the configure arguments: + +![image](https://raw.githubusercontent.com/shadps4-emu/shadPS4/refs/heads/main/documents/Screenshots/Linux/2.png) + +On the CMake tab, change the options as you wish, but make sure that it looks similar to or exactly like this: + +![image](https://raw.githubusercontent.com/shadps4-emu/shadPS4/refs/heads/main/documents/Screenshots/Linux/4.png) + +When hovering over Project Status > Configure, there should be an icon titled "Configure". Click on it and let it configure the project, then do the same for Project Status > Build. + +If you want to debug it, change the build type under Project Status > Configure to Debug (it should be the default) and compile it, then click on the icon in Project Status > Debug. If you simply want to launch the shadPS4 executable from within VSCode, click on the icon in Project Status > Launch. + +Don't forget to change the launch target for both options to the shadPS4 executable inside shadPS4/build: + +![image](https://raw.githubusercontent.com/shadps4-emu/shadPS4/refs/heads/main/documents/Screenshots/Linux/5.png) diff --git a/documents/building-windows.md b/documents/building-windows.md index 845cdd10f..d5db6790a 100644 --- a/documents/building-windows.md +++ b/documents/building-windows.md @@ -25,7 +25,7 @@ Once you are within the installer: 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. Under the current, non beta version of Qt (at the time of writing 6.7.3), select the option `MSVC 2022 64-bit` or similar, as well as `QT Multimedia`. +1. Under the current, non beta version of Qt (at the time of writing 6.8.2), select the option `MSVC 2022 64-bit` or similar, as well as `QT Multimedia`. If you are on Windows on ARM / Qualcomm Snapdragon Elite X, select `MSVC 2022 ARM64` instead. Go through the installation normally. If you know what you are doing, you may unselect individual components that eat up too much disk space. @@ -35,7 +35,7 @@ Beware, this requires you to create a Qt account. If you do not want to do this, 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.3\msvc2022_64` +2. Add a new Qt version and navigate it to the correct folder. Should look like so: `C:\Qt\6.8.2\msvc2022_64` 3. Enable the default checkmark on the new version you just created. ### (Prerequisite) Download [**Git for Windows**](https://git-scm.com/download/win) @@ -55,7 +55,7 @@ Go through the Git for Windows installation as normal 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.3\msvc2022_64` + `-DENABLE_QT_GUI=ON -DCMAKE_PREFIX_PATH=C:\Qt\6.8.2\msvc2022_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 @@ -64,11 +64,14 @@ Go through the Git for Windows installation as normal 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.3\msvc2022_64\bin\windeployqt6.exe "C:\path\to\shadps4.exe"` +`C:\Qt\6.8.2\msvc2022_64\bin\windeployqt6.exe "C:\path\to\shadps4.exe"` (Change Qt path if you've installed it to non-default path) ## Option 2: MSYS2/MinGW +> [!IMPORTANT] +> Building with MSYS2 is broken as of right now, the only way to build on Windows is to use [Option 1: Visual Studio 2022](https://github.com/shadps4-emu/shadPS4/blob/main/documents/building-windows.md#option-1-visual-studio-2022). + ### (Prerequisite) Download [**MSYS2**](https://www.msys2.org/) Go through the MSYS2 installation as normal diff --git a/externals/CMakeLists.txt b/externals/CMakeLists.txt index 4350948b7..d6bdda023 100644 --- a/externals/CMakeLists.txt +++ b/externals/CMakeLists.txt @@ -18,8 +18,6 @@ endif() # Boost if (NOT TARGET Boost::headers) - set(BOOST_ROOT "${CMAKE_SOURCE_DIR}/externals/ext-boost" CACHE STRING "") - set(Boost_NO_SYSTEM_PATHS ON CACHE BOOL "") add_subdirectory(ext-boost) endif() @@ -28,24 +26,7 @@ if (NOT TARGET fmt::fmt) add_subdirectory(fmt) endif() -if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang" AND MSVC) - # If it is clang and MSVC we will add a static lib - # CryptoPP - add_subdirectory(cryptoppwin) - target_include_directories(cryptoppwin INTERFACE cryptoppwin/include) -else() - # CryptoPP - if (NOT TARGET cryptopp::cryptopp) - set(CRYPTOPP_INSTALL OFF) - set(CRYPTOPP_BUILD_TESTING OFF) - set(CRYPTOPP_SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/cryptopp) - add_subdirectory(cryptopp-cmake) - file(COPY cryptopp DESTINATION cryptopp FILES_MATCHING PATTERN "*.h") - # remove externals/cryptopp from include directories because it contains a conflicting zlib.h file - set_target_properties(cryptopp PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "${CMAKE_CURRENT_BINARY_DIR}/cryptopp") - endif() -endif() - +# FFmpeg if (NOT TARGET FFmpeg::ffmpeg) add_subdirectory(ffmpeg-core) add_library(FFmpeg::ffmpeg ALIAS ffmpeg) @@ -77,6 +58,7 @@ endif() # SDL3 if (NOT TARGET SDL3::SDL3) + set(SDL_TEST_LIBRARY OFF) set(SDL_PIPEWIRE OFF) add_subdirectory(sdl3) endif() @@ -131,6 +113,14 @@ endif() # Toml11 if (NOT TARGET toml11::toml11) add_subdirectory(toml11) + + if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang") + if (CMAKE_CXX_COMPILER_FRONTEND_VARIANT STREQUAL "MSVC") + get_target_property(_toml11_compile_options toml11 INTERFACE_COMPILE_OPTIONS) + list(REMOVE_ITEM _toml11_compile_options "/Zc:preprocessor") + set_target_properties(toml11 PROPERTIES INTERFACE_COMPILE_OPTIONS ${_toml11_compile_options}) + endif() + endif() endif() # xxHash @@ -213,9 +203,7 @@ endif() # Discord RPC if (ENABLE_DISCORD_RPC) - set(BUILD_EXAMPLES OFF) add_subdirectory(discord-rpc) - target_include_directories(discord-rpc INTERFACE discord-rpc/include) endif() # GCN Headers diff --git a/externals/LibAtrac9 b/externals/LibAtrac9 index 9640129dc..ec8899dad 160000 --- a/externals/LibAtrac9 +++ b/externals/LibAtrac9 @@ -1 +1 @@ -Subproject commit 9640129dc6f2afbca6ceeca3019856e8653a5fb2 +Subproject commit ec8899dadf393f655f2871a94e0fe4b3d6220c9a diff --git a/externals/MoltenVK/MoltenVK b/externals/MoltenVK/MoltenVK index 9f0b616d9..2048427e5 160000 --- a/externals/MoltenVK/MoltenVK +++ b/externals/MoltenVK/MoltenVK @@ -1 +1 @@ -Subproject commit 9f0b616d9e2c39464d2a859b79dbc655c4a30e7e +Subproject commit 2048427e50f9eb20f2b8f98d316ecaee398c9b91 diff --git a/externals/MoltenVK/SPIRV-Cross b/externals/MoltenVK/SPIRV-Cross index 6173e24b3..2c32b6bf8 160000 --- a/externals/MoltenVK/SPIRV-Cross +++ b/externals/MoltenVK/SPIRV-Cross @@ -1 +1 @@ -Subproject commit 6173e24b31f09a0c3217103a130e74c4ddec14a6 +Subproject commit 2c32b6bf86f3c4a5539aa1f0bacbd59fe61759cf diff --git a/externals/cryptopp b/externals/cryptopp deleted file mode 160000 index 60f81a77e..000000000 --- a/externals/cryptopp +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 60f81a77e0c9a0e7ffc1ca1bc438ddfa2e43b78e diff --git a/externals/cryptopp-cmake b/externals/cryptopp-cmake deleted file mode 160000 index 2c384c282..000000000 --- a/externals/cryptopp-cmake +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 2c384c28265a93358a2455e610e76393358794df diff --git a/externals/cryptoppwin b/externals/cryptoppwin deleted file mode 160000 index bc3441dd2..000000000 --- a/externals/cryptoppwin +++ /dev/null @@ -1 +0,0 @@ -Subproject commit bc3441dd2d6a9728e747dc0180bc8b9065a2923c diff --git a/externals/discord-rpc b/externals/discord-rpc index 4ec218155..51b09d426 160000 --- a/externals/discord-rpc +++ b/externals/discord-rpc @@ -1 +1 @@ -Subproject commit 4ec218155d73bcb8022f8f7ca72305d801f84beb +Subproject commit 51b09d426a4a1bcfa6ee6d4894e57d669f4a2e65 diff --git a/externals/gcn/CMakeLists.txt b/externals/gcn/CMakeLists.txt index 592f28d0d..f5c612be1 100644 --- a/externals/gcn/CMakeLists.txt +++ b/externals/gcn/CMakeLists.txt @@ -3,6 +3,10 @@ project(gcn LANGUAGES CXX) -add_library(gcn dummy.cpp) +add_library(gcn INTERFACE) +target_sources(gcn PRIVATE + "include/gcn/si_ci_vi_merged_offset.h" + "include/gcn/si_ci_vi_merged_pm4_it_opcodes.h" +) target_include_directories(gcn INTERFACE include) diff --git a/externals/gcn/dummy.cpp b/externals/gcn/dummy.cpp deleted file mode 100644 index 4fd1bb62d..000000000 --- a/externals/gcn/dummy.cpp +++ /dev/null @@ -1,2 +0,0 @@ -// SPDX-FileCopyrightText: Copyright 2024 shadPS4 Emulator Project -// SPDX-License-Identifier: GPL-2.0-or-later diff --git a/externals/sdl3 b/externals/sdl3 index 3a1d76d29..a336b62d8 160000 --- a/externals/sdl3 +++ b/externals/sdl3 @@ -1 +1 @@ -Subproject commit 3a1d76d298db023f6cf37fb08ee766f20a4e12ab +Subproject commit a336b62d8b0b97b09214e053203e442e2b6e2be5 diff --git a/externals/sirit b/externals/sirit index 1e74f4ef8..8b9b12c20 160000 --- a/externals/sirit +++ b/externals/sirit @@ -1 +1 @@ -Subproject commit 1e74f4ef8d2a0e3221a4de51977663f342b53c35 +Subproject commit 8b9b12c2089505ac8b10fa56bf56b3ed49d9d7b0 diff --git a/externals/vulkan-headers b/externals/vulkan-headers index 6a74a7d65..a03d2f6d5 160000 --- a/externals/vulkan-headers +++ b/externals/vulkan-headers @@ -1 +1 @@ -Subproject commit 6a74a7d65cafa19e38ec116651436cce6efd5b2e +Subproject commit a03d2f6d5753b365d704d58161825890baad0755 diff --git a/shell.nix b/shell.nix new file mode 100644 index 000000000..4eee9fdea --- /dev/null +++ b/shell.nix @@ -0,0 +1,71 @@ +# SPDX-FileCopyrightText: 2024 shadPS4 Emulator Project +# SPDX-License-Identifier: GPL-2.0-or-later + +with import (fetchTarball "https://github.com/nixos/nixpkgs/archive/cfd19cdc54680956dc1816ac577abba6b58b901c.tar.gz") { }; + +pkgs.mkShell { + name = "shadps4-build-env"; + + nativeBuildInputs = [ + pkgs.llvmPackages_18.clang + pkgs.cmake + pkgs.pkg-config + pkgs.git + ]; + + buildInputs = [ + pkgs.alsa-lib + pkgs.libpulseaudio + pkgs.openal + pkgs.openssl + pkgs.zlib + pkgs.libedit + pkgs.udev + pkgs.libevdev + pkgs.SDL2 + pkgs.jack2 + pkgs.sndio + pkgs.qt6.qtbase + pkgs.qt6.qttools + pkgs.qt6.qtmultimedia + + pkgs.vulkan-headers + pkgs.vulkan-utility-libraries + pkgs.vulkan-tools + + pkgs.ffmpeg + pkgs.fmt + pkgs.glslang + pkgs.libxkbcommon + pkgs.wayland + pkgs.xorg.libxcb + pkgs.xorg.xcbutil + pkgs.xorg.xcbutilkeysyms + pkgs.xorg.xcbutilwm + pkgs.sdl3 + pkgs.stb + pkgs.qt6.qtwayland + pkgs.wayland-protocols + pkgs.libpng + ]; + + shellHook = '' + echo "Entering shadPS4 dev shell" + export QT_QPA_PLATFORM="wayland" + export QT_PLUGIN_PATH="${pkgs.qt6.qtwayland}/lib/qt-6/plugins:${pkgs.qt6.qtbase}/lib/qt-6/plugins" + export QML2_IMPORT_PATH="${pkgs.qt6.qtbase}/lib/qt-6/qml" + export CMAKE_PREFIX_PATH="${pkgs.vulkan-headers}:$CMAKE_PREFIX_PATH" + + # OpenGL + export LD_LIBRARY_PATH="${ + pkgs.lib.makeLibraryPath [ + pkgs.libglvnd + pkgs.vulkan-tools + ] + }:$LD_LIBRARY_PATH" + + export LDFLAGS="-L${pkgs.llvmPackages_18.libcxx}/lib -lc++" + export LC_ALL="C.UTF-8" + export XAUTHORITY=${builtins.getEnv "XAUTHORITY"} + ''; +} diff --git a/src/common/adaptive_mutex.h b/src/common/adaptive_mutex.h new file mode 100644 index 000000000..f174f5996 --- /dev/null +++ b/src/common/adaptive_mutex.h @@ -0,0 +1,27 @@ +// SPDX-FileCopyrightText: Copyright 2024 shadPS4 Emulator Project +// SPDX-License-Identifier: GPL-2.0-or-later + +#pragma once + +#ifdef __linux__ +#include +#endif + +namespace Common { + +#ifdef PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP +class AdaptiveMutex { +public: + void lock() { + pthread_mutex_lock(&mutex); + } + void unlock() { + pthread_mutex_unlock(&mutex); + } + +private: + pthread_mutex_t mutex = PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP; +}; +#endif // PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP + +} // namespace Common diff --git a/src/common/aes.h b/src/common/aes.h new file mode 100644 index 000000000..5ca0096bd --- /dev/null +++ b/src/common/aes.h @@ -0,0 +1,1195 @@ +// SPDX-FileCopyrightText: 2015 kkAyataka +// SPDX-License-Identifier: BSL-1.0 + +#pragma once + +#include +#include +#include +#include +#include +#include + +/** AES cipher APIs */ +namespace aes { +namespace detail { + +const int kWordSize = 4; +typedef unsigned int Word; + +const int kBlockSize = 4; +/** @private */ +struct State { + Word w[4]; + Word& operator[](const int index) { + return w[index]; + } + const Word& operator[](const int index) const { + return w[index]; + } +}; + +const int kStateSize = 16; // Word * BlockSize +typedef State RoundKey; +typedef std::vector RoundKeys; + +inline void add_round_key(const RoundKey& key, State& state) { + for (int i = 0; i < kBlockSize; ++i) { + state[i] ^= key[i]; + } +} + +const unsigned char kSbox[] = { + 0x63, 0x7c, 0x77, 0x7b, 0xf2, 0x6b, 0x6f, 0xc5, 0x30, 0x01, 0x67, 0x2b, 0xfe, 0xd7, 0xab, 0x76, + 0xca, 0x82, 0xc9, 0x7d, 0xfa, 0x59, 0x47, 0xf0, 0xad, 0xd4, 0xa2, 0xaf, 0x9c, 0xa4, 0x72, 0xc0, + 0xb7, 0xfd, 0x93, 0x26, 0x36, 0x3f, 0xf7, 0xcc, 0x34, 0xa5, 0xe5, 0xf1, 0x71, 0xd8, 0x31, 0x15, + 0x04, 0xc7, 0x23, 0xc3, 0x18, 0x96, 0x05, 0x9a, 0x07, 0x12, 0x80, 0xe2, 0xeb, 0x27, 0xb2, 0x75, + 0x09, 0x83, 0x2c, 0x1a, 0x1b, 0x6e, 0x5a, 0xa0, 0x52, 0x3b, 0xd6, 0xb3, 0x29, 0xe3, 0x2f, 0x84, + 0x53, 0xd1, 0x00, 0xed, 0x20, 0xfc, 0xb1, 0x5b, 0x6a, 0xcb, 0xbe, 0x39, 0x4a, 0x4c, 0x58, 0xcf, + 0xd0, 0xef, 0xaa, 0xfb, 0x43, 0x4d, 0x33, 0x85, 0x45, 0xf9, 0x02, 0x7f, 0x50, 0x3c, 0x9f, 0xa8, + 0x51, 0xa3, 0x40, 0x8f, 0x92, 0x9d, 0x38, 0xf5, 0xbc, 0xb6, 0xda, 0x21, 0x10, 0xff, 0xf3, 0xd2, + 0xcd, 0x0c, 0x13, 0xec, 0x5f, 0x97, 0x44, 0x17, 0xc4, 0xa7, 0x7e, 0x3d, 0x64, 0x5d, 0x19, 0x73, + 0x60, 0x81, 0x4f, 0xdc, 0x22, 0x2a, 0x90, 0x88, 0x46, 0xee, 0xb8, 0x14, 0xde, 0x5e, 0x0b, 0xdb, + 0xe0, 0x32, 0x3a, 0x0a, 0x49, 0x06, 0x24, 0x5c, 0xc2, 0xd3, 0xac, 0x62, 0x91, 0x95, 0xe4, 0x79, + 0xe7, 0xc8, 0x37, 0x6d, 0x8d, 0xd5, 0x4e, 0xa9, 0x6c, 0x56, 0xf4, 0xea, 0x65, 0x7a, 0xae, 0x08, + 0xba, 0x78, 0x25, 0x2e, 0x1c, 0xa6, 0xb4, 0xc6, 0xe8, 0xdd, 0x74, 0x1f, 0x4b, 0xbd, 0x8b, 0x8a, + 0x70, 0x3e, 0xb5, 0x66, 0x48, 0x03, 0xf6, 0x0e, 0x61, 0x35, 0x57, 0xb9, 0x86, 0xc1, 0x1d, 0x9e, + 0xe1, 0xf8, 0x98, 0x11, 0x69, 0xd9, 0x8e, 0x94, 0x9b, 0x1e, 0x87, 0xe9, 0xce, 0x55, 0x28, 0xdf, + 0x8c, 0xa1, 0x89, 0x0d, 0xbf, 0xe6, 0x42, 0x68, 0x41, 0x99, 0x2d, 0x0f, 0xb0, 0x54, 0xbb, 0x16}; + +const unsigned char kInvSbox[] = { + 0x52, 0x09, 0x6a, 0xd5, 0x30, 0x36, 0xa5, 0x38, 0xbf, 0x40, 0xa3, 0x9e, 0x81, 0xf3, 0xd7, 0xfb, + 0x7c, 0xe3, 0x39, 0x82, 0x9b, 0x2f, 0xff, 0x87, 0x34, 0x8e, 0x43, 0x44, 0xc4, 0xde, 0xe9, 0xcb, + 0x54, 0x7b, 0x94, 0x32, 0xa6, 0xc2, 0x23, 0x3d, 0xee, 0x4c, 0x95, 0x0b, 0x42, 0xfa, 0xc3, 0x4e, + 0x08, 0x2e, 0xa1, 0x66, 0x28, 0xd9, 0x24, 0xb2, 0x76, 0x5b, 0xa2, 0x49, 0x6d, 0x8b, 0xd1, 0x25, + 0x72, 0xf8, 0xf6, 0x64, 0x86, 0x68, 0x98, 0x16, 0xd4, 0xa4, 0x5c, 0xcc, 0x5d, 0x65, 0xb6, 0x92, + 0x6c, 0x70, 0x48, 0x50, 0xfd, 0xed, 0xb9, 0xda, 0x5e, 0x15, 0x46, 0x57, 0xa7, 0x8d, 0x9d, 0x84, + 0x90, 0xd8, 0xab, 0x00, 0x8c, 0xbc, 0xd3, 0x0a, 0xf7, 0xe4, 0x58, 0x05, 0xb8, 0xb3, 0x45, 0x06, + 0xd0, 0x2c, 0x1e, 0x8f, 0xca, 0x3f, 0x0f, 0x02, 0xc1, 0xaf, 0xbd, 0x03, 0x01, 0x13, 0x8a, 0x6b, + 0x3a, 0x91, 0x11, 0x41, 0x4f, 0x67, 0xdc, 0xea, 0x97, 0xf2, 0xcf, 0xce, 0xf0, 0xb4, 0xe6, 0x73, + 0x96, 0xac, 0x74, 0x22, 0xe7, 0xad, 0x35, 0x85, 0xe2, 0xf9, 0x37, 0xe8, 0x1c, 0x75, 0xdf, 0x6e, + 0x47, 0xf1, 0x1a, 0x71, 0x1d, 0x29, 0xc5, 0x89, 0x6f, 0xb7, 0x62, 0x0e, 0xaa, 0x18, 0xbe, 0x1b, + 0xfc, 0x56, 0x3e, 0x4b, 0xc6, 0xd2, 0x79, 0x20, 0x9a, 0xdb, 0xc0, 0xfe, 0x78, 0xcd, 0x5a, 0xf4, + 0x1f, 0xdd, 0xa8, 0x33, 0x88, 0x07, 0xc7, 0x31, 0xb1, 0x12, 0x10, 0x59, 0x27, 0x80, 0xec, 0x5f, + 0x60, 0x51, 0x7f, 0xa9, 0x19, 0xb5, 0x4a, 0x0d, 0x2d, 0xe5, 0x7a, 0x9f, 0x93, 0xc9, 0x9c, 0xef, + 0xa0, 0xe0, 0x3b, 0x4d, 0xae, 0x2a, 0xf5, 0xb0, 0xc8, 0xeb, 0xbb, 0x3c, 0x83, 0x53, 0x99, 0x61, + 0x17, 0x2b, 0x04, 0x7e, 0xba, 0x77, 0xd6, 0x26, 0xe1, 0x69, 0x14, 0x63, 0x55, 0x21, 0x0c, 0x7d}; + +inline Word sub_word(const Word w) { + return kSbox[(w >> 0) & 0xFF] << 0 | kSbox[(w >> 8) & 0xFF] << 8 | + kSbox[(w >> 16) & 0xFF] << 16 | kSbox[(w >> 24) & 0xFF] << 24; +} + +inline Word inv_sub_word(const Word w) { + return kInvSbox[(w >> 0) & 0xFF] << 0 | kInvSbox[(w >> 8) & 0xFF] << 8 | + kInvSbox[(w >> 16) & 0xFF] << 16 | kInvSbox[(w >> 24) & 0xFF] << 24; +} + +inline void sub_bytes(State& state) { + for (int i = 0; i < kBlockSize; ++i) { + state[i] = sub_word(state[i]); + } +} + +inline void inv_sub_bytes(State& state) { + for (int i = 0; i < kBlockSize; ++i) { + state[i] = inv_sub_word(state[i]); + } +} + +inline void shift_rows(State& state) { + const State ori = {state[0], state[1], state[2], state[3]}; + for (int r = 1; r < kWordSize; ++r) { + const Word m2 = 0xFF << (r * 8); + const Word m1 = ~m2; + for (int c = 0; c < kBlockSize; ++c) { + state[c] = (state[c] & m1) | (ori[(c + r) % kBlockSize] & m2); + } + } +} + +inline void inv_shift_rows(State& state) { + const State ori = {state[0], state[1], state[2], state[3]}; + for (int r = 1; r < kWordSize; ++r) { + const Word m2 = 0xFF << (r * 8); + const Word m1 = ~m2; + for (int c = 0; c < kBlockSize; ++c) { + state[c] = (state[c] & m1) | (ori[(c + kBlockSize - r) % kWordSize] & m2); + } + } +} + +inline unsigned char mul2(const unsigned char b) { + unsigned char m2 = b << 1; + if (b & 0x80) { + m2 ^= 0x011B; + } + + return m2; +} + +inline unsigned char mul(const unsigned char b, const unsigned char m) { + unsigned char v = 0; + unsigned char t = b; + for (int i = 0; i < 8; ++i) { // 8-bits + if ((m >> i) & 0x01) { + v ^= t; + } + + t = mul2(t); + } + + return v; +} + +inline void mix_columns(State& state) { + for (int i = 0; i < kBlockSize; ++i) { + const unsigned char v0_1 = (state[i] >> 0) & 0xFF; + const unsigned char v1_1 = (state[i] >> 8) & 0xFF; + const unsigned char v2_1 = (state[i] >> 16) & 0xFF; + const unsigned char v3_1 = (state[i] >> 24) & 0xFF; + + const unsigned char v0_2 = mul2(v0_1); + const unsigned char v1_2 = mul2(v1_1); + const unsigned char v2_2 = mul2(v2_1); + const unsigned char v3_2 = mul2(v3_1); + + const unsigned char v0_3 = v0_2 ^ v0_1; + const unsigned char v1_3 = v1_2 ^ v1_1; + const unsigned char v2_3 = v2_2 ^ v2_1; + const unsigned char v3_3 = v3_2 ^ v3_1; + + state[i] = (v0_2 ^ v1_3 ^ v2_1 ^ v3_1) << 0 | (v0_1 ^ v1_2 ^ v2_3 ^ v3_1) << 8 | + (v0_1 ^ v1_1 ^ v2_2 ^ v3_3) << 16 | (v0_3 ^ v1_1 ^ v2_1 ^ v3_2) << 24; + } +} + +inline void inv_mix_columns(State& state) { + for (int i = 0; i < kBlockSize; ++i) { + const unsigned char v0 = (state[i] >> 0) & 0xFF; + const unsigned char v1 = (state[i] >> 8) & 0xFF; + const unsigned char v2 = (state[i] >> 16) & 0xFF; + const unsigned char v3 = (state[i] >> 24) & 0xFF; + + state[i] = (mul(v0, 0x0E) ^ mul(v1, 0x0B) ^ mul(v2, 0x0D) ^ mul(v3, 0x09)) << 0 | + (mul(v0, 0x09) ^ mul(v1, 0x0E) ^ mul(v2, 0x0B) ^ mul(v3, 0x0D)) << 8 | + (mul(v0, 0x0D) ^ mul(v1, 0x09) ^ mul(v2, 0x0E) ^ mul(v3, 0x0B)) << 16 | + (mul(v0, 0x0B) ^ mul(v1, 0x0D) ^ mul(v2, 0x09) ^ mul(v3, 0x0E)) << 24; + } +} + +inline Word rot_word(const Word v) { + return ((v >> 8) & 0x00FFFFFF) | ((v & 0xFF) << 24); +} + +/** + * @private + * @throws std::invalid_argument + */ +inline unsigned int get_round_count(const int key_size) { + switch (key_size) { + case 16: + return 10; + case 24: + return 12; + case 32: + return 14; + default: + throw std::invalid_argument("Invalid key size"); + } +} + +/** + * @private + * @throws std::invalid_argument + */ +inline RoundKeys expand_key(const unsigned char* key, const int key_size) { + if (key_size != 16 && key_size != 24 && key_size != 32) { + throw std::invalid_argument("Invalid key size"); + } + + const Word rcon[] = {0x00, 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x1b, 0x36}; + + const int nb = kBlockSize; + const int nk = key_size / nb; + const int nr = get_round_count(key_size); + + std::vector w(nb * (nr + 1)); + for (int i = 0; i < nk; ++i) { + memcpy(&w[i], key + (i * kWordSize), kWordSize); + } + + for (int i = nk; i < nb * (nr + 1); ++i) { + Word t = w[i - 1]; + if (i % nk == 0) { + t = sub_word(rot_word(t)) ^ rcon[i / nk]; + } else if (nk > 6 && i % nk == 4) { + t = sub_word(t); + } + + w[i] = t ^ w[i - nk]; + } + + RoundKeys keys(nr + 1); + memcpy(&keys[0], &w[0], w.size() * kWordSize); + + return keys; +} + +inline void copy_bytes_to_state(const unsigned char data[16], State& state) { + memcpy(&state[0], data + 0, kWordSize); + memcpy(&state[1], data + 4, kWordSize); + memcpy(&state[2], data + 8, kWordSize); + memcpy(&state[3], data + 12, kWordSize); +} + +inline void copy_state_to_bytes(const State& state, unsigned char buf[16]) { + memcpy(buf + 0, &state[0], kWordSize); + memcpy(buf + 4, &state[1], kWordSize); + memcpy(buf + 8, &state[2], kWordSize); + memcpy(buf + 12, &state[3], kWordSize); +} + +inline void xor_data(unsigned char data[kStateSize], const unsigned char v[kStateSize]) { + for (int i = 0; i < kStateSize; ++i) { + data[i] ^= v[i]; + } +} + +/** increment counter (128-bit int) by 1 */ +inline void incr_counter(unsigned char counter[kStateSize]) { + unsigned n = kStateSize, c = 1; + do { + --n; + c += counter[n]; + counter[n] = c; + c >>= 8; + } while (n); +} + +inline void encrypt_state(const RoundKeys& rkeys, const unsigned char data[16], + unsigned char encrypted[16]) { + State s; + copy_bytes_to_state(data, s); + + add_round_key(rkeys[0], s); + + for (unsigned int i = 1; i < rkeys.size() - 1; ++i) { + sub_bytes(s); + shift_rows(s); + mix_columns(s); + add_round_key(rkeys[i], s); + } + + sub_bytes(s); + shift_rows(s); + add_round_key(rkeys.back(), s); + + copy_state_to_bytes(s, encrypted); +} + +inline void decrypt_state(const RoundKeys& rkeys, const unsigned char data[16], + unsigned char decrypted[16]) { + State s; + copy_bytes_to_state(data, s); + + add_round_key(rkeys.back(), s); + inv_shift_rows(s); + inv_sub_bytes(s); + + for (std::size_t i = rkeys.size() - 2; i > 0; --i) { + add_round_key(rkeys[i], s); + inv_mix_columns(s); + inv_shift_rows(s); + inv_sub_bytes(s); + } + + add_round_key(rkeys[0], s); + + copy_state_to_bytes(s, decrypted); +} + +template +std::vector key_from_string(const char (*key_str)[KeyLen]) { + std::vector key(KeyLen - 1); + memcpy(&key[0], *key_str, KeyLen - 1); + return key; +} + +inline bool is_valid_key_size(const std::size_t key_size) { + if (key_size != 16 && key_size != 24 && key_size != 32) { + return false; + } else { + return true; + } +} + +namespace gcm { + +const int kBlockBitSize = 128; +const int kBlockByteSize = kBlockBitSize / 8; + +/** + * @private + * GCM operation unit as bit. + * This library handles 128 bit little endian bit array. + * e.g. 0^127 || 1 == "000...0001" (bit string) == 1 + */ +typedef std::bitset bitset128; + +/** + * @private + * GCM operation unit. + * Little endian byte array + * + * If bitset128 is 1: 0^127 || 1 == "000...0001" (bit string) == 1 + * byte array is 0x00, 0x00, 0x00 ... 0x01 (low -> high). + * Byte array is NOT 0x01, 0x00 ... 0x00. + * + * This library handles GCM bit string in two ways. + * One is an array of bitset, which is a little endian 128-bit array's array. + * + * <- first byte + * bitset128 || bitset128 || bitset128... + * + * The other one is a byte array. + * <- first byte + * byte || byte || byte... + */ +class Block { +public: + Block() { + init_v(0, 0); + } + + Block(const unsigned char* bytes, const unsigned long bytes_size) { + init_v(bytes, bytes_size); + } + + Block(const std::vector& bytes) { + init_v(&bytes[0], bytes.size()); + } + + Block(const std::bitset<128>& bits); // implementation below + + inline unsigned char* data() { + return v_; + } + + inline const unsigned char* data() const { + return v_; + } + + inline std::bitset<128> to_bits() const { + std::bitset<128> bits; + for (int i = 0; i < 16; ++i) { + bits <<= 8; + bits |= v_[i]; + } + + return bits; + } + + inline Block operator^(const Block& b) const { + Block r; + for (int i = 0; i < 16; ++i) { + r.data()[i] = data()[i] ^ b.data()[i]; + } + return r; + } + +private: + unsigned char v_[16]; + + inline void init_v(const unsigned char* bytes, const std::size_t bytes_size) { + memset(v_, 0, sizeof(v_)); + + const std::size_t cs = (std::min)(bytes_size, static_cast(16)); + for (std::size_t i = 0; i < cs; ++i) { + v_[i] = bytes[i]; + } + } +}; + +// Workaround for clang optimization in 32-bit build via Visual Studio producing incorrect results +// (https://github.com/kkAyataka/plusaes/issues/43) +#if defined(__clang__) && defined(_WIN32) && !defined(_WIN64) +#pragma optimize("", off) +#endif +inline Block::Block(const std::bitset<128>& bits) { + init_v(0, 0); + const std::bitset<128> mask(0xFF); // 1 byte mask + for (std::size_t i = 0; i < 16; ++i) { + v_[15 - i] = static_cast(((bits >> (i * 8)) & mask).to_ulong()); + } +} +#if defined(__clang__) && defined(_WIN32) && !defined(_WIN64) +#pragma optimize("", on) +#endif + +template +unsigned long ceil(const T v) { + return static_cast(std::ceil(v) + 0.5); +} + +template +std::bitset operator||(const std::bitset& v1, const std::bitset& v2) { + std::bitset ret(v1.to_string() + v2.to_string()); + return ret; +} + +template +std::bitset lsb(const std::bitset& X) { + std::bitset r; + for (std::size_t i = 0; i < S; ++i) { + r[i] = X[i]; + } + return r; +} + +template +std::bitset msb(const std::bitset& X) { + std::bitset r; + for (std::size_t i = 0; i < S; ++i) { + r[S - 1 - i] = X[X.size() - 1 - i]; + } + return r; +} + +template +std::bitset inc32(const std::bitset X) { + const std::size_t S = 32; + + const auto a = msb(X); + const std::bitset b( + (lsb(X).to_ulong() + 1)); // % (2^32); + // lsb<32> is low 32-bit value + // Spec.'s "mod 2^S" is not necessary when S is 32 (inc32). + // ...and 2^32 is over 32-bit integer. + + return a || b; +} + +#ifdef __clang__ +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wself-assign" +#endif // __clang__ + +/** Algorithm 1 @private */ +inline Block mul_blocks(const Block X, const Block Y) { + const bitset128 R = (std::bitset<8>("11100001") || std::bitset<120>()); + + bitset128 X_bits = X.to_bits(); + bitset128 Z; + bitset128 V = Y.to_bits(); + for (int i = 127; i >= 0; --i) { + // Z + if (X_bits[i] == false) { + Z = Z; + } else { + Z = Z ^ V; + } + + // V + if (V[0] == false) { + V = V >> 1; + } else { + V = (V >> 1) ^ R; + } + } + + return Z; +} + +#ifdef __clang__ +#pragma clang diagnostic pop +#endif // __clang__ + +/** Algorithm 2 @private */ +inline Block ghash(const Block& H, const std::vector& X) { + const std::size_t m = X.size() / kBlockByteSize; + Block Ym; + for (std::size_t i = 0; i < m; ++i) { + const Block Xi(&X[i * kBlockByteSize], kBlockByteSize); + Ym = mul_blocks((Ym ^ Xi), H); + } + + return Ym; +} + +template +std::bitset make_bitset(const unsigned char* bytes, const std::size_t bytes_size) { + std::bitset bits; + for (auto i = 0u; i < bytes_size; ++i) { + bits <<= 8; + bits |= bytes[i]; + } + return bits; +} + +/** Algorithm 3 @private */ +inline std::vector gctr(const detail::RoundKeys& rkeys, const Block& ICB, + const unsigned char* X, const std::size_t X_size) { + if (!X || X_size == 0) { + return std::vector(); + } else { + const unsigned long n = ceil(X_size * 8.0 / kBlockBitSize); + std::vector Y(X_size); + + Block CB; + for (std::size_t i = 0; i < n; ++i) { + // CB + if (i == 0) { // first + CB = ICB; + } else { + CB = inc32(CB.to_bits()); + } + + // CIPH + Block eCB; + encrypt_state(rkeys, CB.data(), eCB.data()); + + // Y + int op_size = 0; + if (i < n - 1) { + op_size = kBlockByteSize; + } else { // last + op_size = (X_size % kBlockByteSize) ? (X_size % kBlockByteSize) : kBlockByteSize; + } + const Block Yi = Block(X + i * kBlockBitSize / 8, op_size) ^ eCB; + memcpy(&Y[i * kBlockByteSize], Yi.data(), op_size); + } + + return Y; + } +} + +inline void push_back(std::vector& bytes, const unsigned char* data, + const std::size_t data_size) { + bytes.insert(bytes.end(), data, data + data_size); +} + +inline void push_back(std::vector& bytes, const std::bitset<64>& bits) { + const std::bitset<64> mask(0xFF); // 1 byte mask + for (std::size_t i = 0; i < 8; ++i) { + bytes.push_back(static_cast(((bits >> ((7 - i) * 8)) & mask).to_ulong())); + } +} + +inline void push_back_zero_bits(std::vector& bytes, + const std::size_t zero_bits_size) { + const std::vector zero_bytes(zero_bits_size / 8); + bytes.insert(bytes.end(), zero_bytes.begin(), zero_bytes.end()); +} + +inline Block calc_H(const RoundKeys& rkeys) { + std::vector H_raw(gcm::kBlockByteSize); + encrypt_state(rkeys, &H_raw[0], &H_raw[0]); + return gcm::Block(H_raw); +} + +inline Block calc_J0(const Block& H, const unsigned char* iv, const std::size_t iv_size) { + if (iv_size == 12) { + const std::bitset<96> iv_bits = gcm::make_bitset<96>(iv, iv_size); + return iv_bits || std::bitset<31>() || std::bitset<1>(1); + } else { + const auto len_iv = iv_size * 8; + const auto s = 128 * gcm::ceil(len_iv / 128.0) - len_iv; + std::vector ghash_in; + gcm::push_back(ghash_in, iv, iv_size); + gcm::push_back_zero_bits(ghash_in, s + 64); + gcm::push_back(ghash_in, std::bitset<64>(len_iv)); + + return gcm::ghash(H, ghash_in); + } +} + +inline void calc_gcm_tag(const unsigned char* data, const std::size_t data_size, + const unsigned char* aadata, const std::size_t aadata_size, + const unsigned char* key, const std::size_t key_size, + const unsigned char* iv, const std::size_t iv_size, unsigned char* tag, + const std::size_t tag_size) { + const detail::RoundKeys rkeys = detail::expand_key(key, static_cast(key_size)); + const gcm::Block H = gcm::calc_H(rkeys); + const gcm::Block J0 = gcm::calc_J0(H, iv, iv_size); + + const auto lenC = data_size * 8; + const auto lenA = aadata_size * 8; + const std::size_t u = 128 * gcm::ceil(lenC / 128.0) - lenC; + const std::size_t v = 128 * gcm::ceil(lenA / 128.0) - lenA; + + std::vector ghash_in; + ghash_in.reserve((aadata_size + v / 8) + (data_size + u / 8) + 8 + 8); + gcm::push_back(ghash_in, aadata, aadata_size); + gcm::push_back_zero_bits(ghash_in, v); + gcm::push_back(ghash_in, data, data_size); + gcm::push_back_zero_bits(ghash_in, u); + gcm::push_back(ghash_in, std::bitset<64>(lenA)); + gcm::push_back(ghash_in, std::bitset<64>(lenC)); + const gcm::Block S = gcm::ghash(H, ghash_in); + const std::vector T = gcm::gctr(rkeys, J0, S.data(), gcm::kBlockByteSize); + + // return + memcpy(tag, &T[0], (std::min)(tag_size, static_cast(16))); +} + +/** Algorithm 4 and 5 @private */ +inline void crypt_gcm(const unsigned char* data, const std::size_t data_size, + const unsigned char* key, const std::size_t key_size, const unsigned char* iv, + const std::size_t iv_size, unsigned char* crypted) { + const detail::RoundKeys rkeys = detail::expand_key(key, static_cast(key_size)); + const gcm::Block H = gcm::calc_H(rkeys); + const gcm::Block J0 = gcm::calc_J0(H, iv, iv_size); + + const std::vector C = + gcm::gctr(rkeys, gcm::inc32(J0.to_bits()), data, data_size); + + if (crypted) { + memcpy(crypted, &C[0], data_size); + } +} + +} // namespace gcm + +} // namespace detail + +/** @defgroup Base Base + * Base definitions and convenient functions + * @{ */ + +/** Create 128-bit key from string. */ +inline std::vector key_from_string(const char (*key_str)[17]) { + return detail::key_from_string<17>(key_str); +} + +/** Create 192-bit key from string. */ +inline std::vector key_from_string(const char (*key_str)[25]) { + return detail::key_from_string<25>(key_str); +} + +/** Create 256-bit key from string. */ +inline std::vector key_from_string(const char (*key_str)[33]) { + return detail::key_from_string<33>(key_str); +} + +/** Calculates encrypted data size when padding is enabled. */ +inline unsigned long get_padded_encrypted_size(const unsigned long data_size) { + return data_size + detail::kStateSize - (data_size % detail::kStateSize); +} + +/** Error code */ +typedef enum { + kErrorOk = 0, + kErrorInvalidDataSize = 1, + kErrorInvalidKeySize, + kErrorInvalidBufferSize, + kErrorInvalidKey, + kErrorDeprecated, // kErrorInvalidNonceSize + kErrorInvalidIvSize, + kErrorInvalidTagSize, + kErrorInvalidTag +} Error; + +/** @} */ + +namespace detail { + +inline Error check_encrypt_cond(const unsigned long data_size, const unsigned long key_size, + const unsigned long encrypted_size, const bool pads) { + // check data size + if (!pads && (data_size % kStateSize != 0)) { + return kErrorInvalidDataSize; + } + + // check key size + if (!detail::is_valid_key_size(key_size)) { + return kErrorInvalidKeySize; + } + + // check encrypted buffer size + if (pads) { + const unsigned long required_size = get_padded_encrypted_size(data_size); + if (encrypted_size < required_size) { + return kErrorInvalidBufferSize; + } + } else { + if (encrypted_size < data_size) { + return kErrorInvalidBufferSize; + } + } + return kErrorOk; +} + +inline Error check_decrypt_cond(const unsigned long data_size, const unsigned long key_size, + const unsigned long decrypted_size, + const unsigned long* padded_size) { + // check data size + if (data_size % 16 != 0) { + return kErrorInvalidDataSize; + } + + // check key size + if (!detail::is_valid_key_size(key_size)) { + return kErrorInvalidKeySize; + } + + // check decrypted buffer size + if (!padded_size) { + if (decrypted_size < data_size) { + return kErrorInvalidBufferSize; + } + } else { + if (decrypted_size < (data_size - kStateSize)) { + return kErrorInvalidBufferSize; + } + } + + return kErrorOk; +} + +inline bool check_padding(const unsigned long padding, const unsigned char data[kStateSize]) { + if (padding > kStateSize) { + return false; + } + + for (unsigned long i = 0; i < padding; ++i) { + if (data[kStateSize - 1 - i] != padding) { + return false; + } + } + + return true; +} + +inline Error check_gcm_cond(const std::size_t key_size, const std::size_t iv_size, + const std::size_t tag_size) { + // check key size + if (!detail::is_valid_key_size(key_size)) { + return kErrorInvalidKeySize; + } + + if (iv_size < 1) { + return kErrorInvalidIvSize; + } + + // check tag size + if ((tag_size < 12 || 16 < tag_size) && (tag_size != 8) && (tag_size != 4)) { + return kErrorInvalidTagSize; + } + + return kErrorOk; +} + +} // namespace detail + +/** @defgroup ECB ECB + * ECB mode functions + * @{ */ + +/** + * Encrypts data with ECB mode. + * @param [in] data Data. + * @param [in] data_size Data size. + * If the pads is false, data size must be multiple of 16. + * @param [in] key key bytes. The key length must be 16 (128-bit), 24 (192-bit) or 32 (256-bit). + * @param [in] key_size key size. + * @param [out] encrypted Encrypted data buffer. + * @param [in] encrypted_size Encrypted data buffer size. + * @param [in] pads If this value is true, encrypted data is padded by PKCS. + * Encrypted data size must be multiple of 16. + * If the pads is true, encrypted data is padded with PKCS. + * So the data is multiple of 16, encrypted data size needs additonal 16 bytes. + * @since 1.0.0 + */ +inline Error encrypt_ecb(const unsigned char* data, const unsigned long data_size, + const unsigned char* key, const unsigned long key_size, + unsigned char* encrypted, const unsigned long encrypted_size, + const bool pads) { + const Error e = detail::check_encrypt_cond(data_size, key_size, encrypted_size, pads); + if (e != kErrorOk) { + return e; + } + + const detail::RoundKeys rkeys = detail::expand_key(key, static_cast(key_size)); + + const unsigned long bc = data_size / detail::kStateSize; + for (unsigned long i = 0; i < bc; ++i) { + detail::encrypt_state(rkeys, data + (i * detail::kStateSize), + encrypted + (i * detail::kStateSize)); + } + + if (pads) { + const int rem = data_size % detail::kStateSize; + const char pad_v = detail::kStateSize - rem; + + std::vector ib(detail::kStateSize, pad_v), ob(detail::kStateSize); + memcpy(&ib[0], data + data_size - rem, rem); + + detail::encrypt_state(rkeys, &ib[0], &ob[0]); + memcpy(encrypted + (data_size - rem), &ob[0], detail::kStateSize); + } + + return kErrorOk; +} + +/** + * Decrypts data with ECB mode. + * @param [in] data Data bytes. + * @param [in] data_size Data size. + * @param [in] key Key bytes. + * @param [in] key_size Key size. + * @param [out] decrypted Decrypted data buffer. + * @param [in] decrypted_size Decrypted data buffer size. + * @param [out] padded_size If this value is NULL, this function does not remove padding. + * If this value is not NULL, this function removes padding by PKCS + * and returns padded size using padded_size. + * @since 1.0.0 + */ +inline Error decrypt_ecb(const unsigned char* data, const unsigned long data_size, + const unsigned char* key, const unsigned long key_size, + unsigned char* decrypted, const unsigned long decrypted_size, + unsigned long* padded_size) { + const Error e = detail::check_decrypt_cond(data_size, key_size, decrypted_size, padded_size); + if (e != kErrorOk) { + return e; + } + + const detail::RoundKeys rkeys = detail::expand_key(key, static_cast(key_size)); + + const unsigned long bc = data_size / detail::kStateSize - 1; + for (unsigned long i = 0; i < bc; ++i) { + detail::decrypt_state(rkeys, data + (i * detail::kStateSize), + decrypted + (i * detail::kStateSize)); + } + + unsigned char last[detail::kStateSize] = {}; + detail::decrypt_state(rkeys, data + (bc * detail::kStateSize), last); + + if (padded_size) { + *padded_size = last[detail::kStateSize - 1]; + const unsigned long cs = detail::kStateSize - *padded_size; + + if (!detail::check_padding(*padded_size, last)) { + return kErrorInvalidKey; + } else if (decrypted_size >= (bc * detail::kStateSize) + cs) { + memcpy(decrypted + (bc * detail::kStateSize), last, cs); + } else { + return kErrorInvalidBufferSize; + } + } else { + memcpy(decrypted + (bc * detail::kStateSize), last, sizeof(last)); + } + + return kErrorOk; +} + +/** @} */ + +/** @defgroup CBC CBC + * CBC mode functions + * @{ */ + +/** + * Encrypt data with CBC mode. + * @param [in] data Data. + * @param [in] data_size Data size. + * If the pads is false, data size must be multiple of 16. + * @param [in] key key bytes. The key length must be 16 (128-bit), 24 (192-bit) or 32 (256-bit). + * @param [in] key_size key size. + * @param [in] iv Initialize vector. + * @param [out] encrypted Encrypted data buffer. + * @param [in] encrypted_size Encrypted data buffer size. + * @param [in] pads If this value is true, encrypted data is padded by PKCS. + * Encrypted data size must be multiple of 16. + * If the pads is true, encrypted data is padded with PKCS. + * So the data is multiple of 16, encrypted data size needs additonal 16 bytes. + * @since 1.0.0 + */ +inline Error encrypt_cbc(const unsigned char* data, const unsigned long data_size, + const unsigned char* key, const unsigned long key_size, + const unsigned char iv[16], unsigned char* encrypted, + const unsigned long encrypted_size, const bool pads) { + const Error e = detail::check_encrypt_cond(data_size, key_size, encrypted_size, pads); + if (e != kErrorOk) { + return e; + } + + const detail::RoundKeys rkeys = detail::expand_key(key, static_cast(key_size)); + + unsigned char s[detail::kStateSize] = {}; // encrypting data + + // calculate padding value + const bool ge16 = (data_size >= detail::kStateSize); + const int rem = data_size % detail::kStateSize; + const unsigned char pad_v = detail::kStateSize - rem; + + // encrypt 1st state + if (ge16) { + memcpy(s, data, detail::kStateSize); + } else { + memset(s, pad_v, detail::kStateSize); + memcpy(s, data, data_size); + } + if (iv) { + detail::xor_data(s, iv); + } + detail::encrypt_state(rkeys, s, encrypted); + + // encrypt mid + const unsigned long bc = data_size / detail::kStateSize; + for (unsigned long i = 1; i < bc; ++i) { + const long offset = i * detail::kStateSize; + memcpy(s, data + offset, detail::kStateSize); + detail::xor_data(s, encrypted + offset - detail::kStateSize); + + detail::encrypt_state(rkeys, s, encrypted + offset); + } + + // enctypt last + if (pads && ge16) { + std::vector ib(detail::kStateSize, pad_v), ob(detail::kStateSize); + memcpy(&ib[0], data + data_size - rem, rem); + + detail::xor_data(&ib[0], encrypted + (bc - 1) * detail::kStateSize); + + detail::encrypt_state(rkeys, &ib[0], &ob[0]); + memcpy(encrypted + (data_size - rem), &ob[0], detail::kStateSize); + } + + return kErrorOk; +} + +/** + * Decrypt data with CBC mode. + * @param [in] data Data bytes. + * @param [in] data_size Data size. + * @param [in] key Key bytes. + * @param [in] key_size Key size. + * @param [in] iv Initialize vector. + * @param [out] decrypted Decrypted data buffer. + * @param [in] decrypted_size Decrypted data buffer size. + * @param [out] padded_size If this value is NULL, this function does not remove padding. + * If this value is not NULL, this function removes padding by PKCS + * and returns padded size using padded_size. + * @since 1.0.0 + */ +inline Error decrypt_cbc(const unsigned char* data, const unsigned long data_size, + const unsigned char* key, const unsigned long key_size, + const unsigned char iv[16], unsigned char* decrypted, + const unsigned long decrypted_size, unsigned long* padded_size) { + const Error e = detail::check_decrypt_cond(data_size, key_size, decrypted_size, padded_size); + if (e != kErrorOk) { + return e; + } + + const detail::RoundKeys rkeys = detail::expand_key(key, static_cast(key_size)); + + // decrypt 1st state + detail::decrypt_state(rkeys, data, decrypted); + if (iv) { + detail::xor_data(decrypted, iv); + } + + // decrypt mid + const unsigned long bc = data_size / detail::kStateSize - 1; + for (unsigned long i = 1; i < bc; ++i) { + const long offset = i * detail::kStateSize; + detail::decrypt_state(rkeys, data + offset, decrypted + offset); + detail::xor_data(decrypted + offset, data + offset - detail::kStateSize); + } + + // decrypt last + unsigned char last[detail::kStateSize] = {}; + if (data_size > detail::kStateSize) { + detail::decrypt_state(rkeys, data + (bc * detail::kStateSize), last); + detail::xor_data(last, data + (bc * detail::kStateSize - detail::kStateSize)); + } else { + memcpy(last, decrypted, data_size); + memset(decrypted, 0, decrypted_size); + } + + if (padded_size) { + *padded_size = last[detail::kStateSize - 1]; + const unsigned long cs = detail::kStateSize - *padded_size; + + if (!detail::check_padding(*padded_size, last)) { + return kErrorInvalidKey; + } else if (decrypted_size >= (bc * detail::kStateSize) + cs) { + memcpy(decrypted + (bc * detail::kStateSize), last, cs); + } else { + return kErrorInvalidBufferSize; + } + } else { + memcpy(decrypted + (bc * detail::kStateSize), last, sizeof(last)); + } + + return kErrorOk; +} + +/** @} */ + +/** @defgroup GCM GCM + * GCM mode functions + * @{ */ + +/** + * Encrypts data with GCM mode and gets an authentication tag. + * + * You can specify iv size and tag size. + * But usually you should use the other overloaded function whose iv and tag size is fixed. + * + * @returns kErrorOk + * @returns kErrorInvalidKeySize + * @returns kErrorInvalidIvSize + * @returns kErrorInvalidTagSize + */ +inline Error encrypt_gcm(unsigned char* data, const std::size_t data_size, + const unsigned char* aadata, const std::size_t aadata_size, + const unsigned char* key, const std::size_t key_size, + const unsigned char* iv, const std::size_t iv_size, unsigned char* tag, + const std::size_t tag_size) { + const Error err = detail::check_gcm_cond(key_size, iv_size, tag_size); + if (err != kErrorOk) { + return err; + } + + detail::gcm::crypt_gcm(data, data_size, key, key_size, iv, iv_size, data); + detail::gcm::calc_gcm_tag(data, data_size, aadata, aadata_size, key, key_size, iv, iv_size, tag, + tag_size); + + return kErrorOk; +} + +/** + * Encrypts data with GCM mode and gets an authentication tag. + * + * @param [in,out] data Input data and output buffer. + * This buffer is replaced with encrypted data. + * @param [in] data_size data size + * @param [in] aadata Additional Authenticated data + * @param [in] aadata_size aadata size + * @param [in] key Cipher key + * @param [in] key_size Cipher key size. This value must be 16 (128-bit), 24 (192-bit), or 32 + * (256-bit). + * @param [in] iv Initialization vector + * @param [out] tag Calculated authentication tag data + * + * @returns kErrorOk + * @returns kErrorInvalidKeySize + */ +inline Error encrypt_gcm(unsigned char* data, const std::size_t data_size, + const unsigned char* aadata, const std::size_t aadata_size, + const unsigned char* key, const std::size_t key_size, + const unsigned char (*iv)[12], unsigned char (*tag)[16]) { + return encrypt_gcm(data, data_size, aadata, aadata_size, key, key_size, *iv, 12, *tag, 16); +} + +/** + * Decrypts data with GCM mode and checks an authentication tag. + * + * You can specify iv size and tag size. + * But usually you should use the other overloaded function whose iv and tag size is fixed. + * + * @returns kErrorOk + * @returns kErrorInvalidKeySize + * @returns kErrorInvalidIvSize + * @returns kErrorInvalidTagSize + * @returns kErrorInvalidTag + */ +inline Error decrypt_gcm(unsigned char* data, const std::size_t data_size, + const unsigned char* aadata, const std::size_t aadata_size, + const unsigned char* key, const std::size_t key_size, + const unsigned char* iv, const std::size_t iv_size, + const unsigned char* tag, const std::size_t tag_size) { + const Error err = detail::check_gcm_cond(key_size, iv_size, tag_size); + if (err != kErrorOk) { + return err; + } + + unsigned char* C = data; + const auto C_size = data_size; + unsigned char tagd[16] = {}; + detail::gcm::calc_gcm_tag(C, C_size, aadata, aadata_size, key, key_size, iv, iv_size, tagd, 16); + + if (memcmp(tag, tagd, tag_size) != 0) { + return kErrorInvalidTag; + } else { + detail::gcm::crypt_gcm(C, C_size, key, key_size, iv, iv_size, C); + + return kErrorOk; + } +} + +/** + * Decrypts data with GCM mode and checks an authentication tag. + * + * @param [in,out] data Input data and output buffer. + * This buffer is replaced with decrypted data. + * @param [in] data_size data size + * @param [in] aadata Additional Authenticated data + * @param [in] aadata_size aadata size + * @param [in] key Cipher key + * @param [in] key_size Cipher key size. This value must be 16 (128-bit), 24 (192-bit), or 32 + * (256-bit). + * @param [in] iv Initialization vector + * @param [in] tag Authentication tag data + * + * @returns kErrorOk + * @returns kErrorInvalidKeySize + * @returns kErrorInvalidTag + */ +inline Error decrypt_gcm(unsigned char* data, const std::size_t data_size, + const unsigned char* aadata, const std::size_t aadata_size, + const unsigned char* key, const std::size_t key_size, + const unsigned char (*iv)[12], const unsigned char (*tag)[16]) { + return decrypt_gcm(data, data_size, aadata, aadata_size, key, key_size, *iv, 12, *tag, 16); +} + +/** @} */ + +/** @defgroup CTR CTR + * CTR mode function + * @{ */ + +/** + * Encrypts or decrypt data in-place with CTR mode. + * + * @param [in,out] data Input data and output buffer. + * This buffer is replaced with encrypted / decrypted data. + * @param [in] data_size Data size. + * @param [in] key Cipher key + * @param [in] key_size Cipher key size. This value must be 16 (128-bit), 24 (192-bit), or 32 + * (256-bit). + * @param [in] nonce Nonce of the counter initialization. + * + * @returns kErrorOk + * @returns kErrorInvalidKeySize + * @since 1.0.0 + */ +inline Error crypt_ctr(unsigned char* data, const std::size_t data_size, const unsigned char* key, + const std::size_t key_size, const unsigned char (*nonce)[16]) { + if (!detail::is_valid_key_size(key_size)) + return kErrorInvalidKeySize; + const detail::RoundKeys rkeys = detail::expand_key(key, static_cast(key_size)); + + unsigned long pos = 0; + unsigned long blkpos = detail::kStateSize; + unsigned char blk[detail::kStateSize] = {}; + unsigned char counter[detail::kStateSize] = {}; + memcpy(counter, nonce, 16); + + while (pos < data_size) { + if (blkpos == detail::kStateSize) { + detail::encrypt_state(rkeys, counter, blk); + detail::incr_counter(counter); + blkpos = 0; + } + data[pos++] ^= blk[blkpos++]; + } + + return kErrorOk; +} + +/** @} */ + +} // namespace aes diff --git a/src/common/config.cpp b/src/common/config.cpp index 246644e2d..d1bb89897 100644 --- a/src/common/config.cpp +++ b/src/common/config.cpp @@ -32,7 +32,7 @@ std::filesystem::path find_fs_path_or(const basic_value& v, const K& ky, namespace Config { static bool isNeo = false; -static bool isFullscreen = false; +static bool isDevKit = false; static bool playBGM = false; static bool isTrophyPopupDisabled = false; static int BGMvolume = 50; @@ -41,16 +41,20 @@ static u32 screenWidth = 1280; static u32 screenHeight = 720; static s32 gpuId = -1; // Vulkan physical device index. Set to negative for auto select static std::string logFilter; -static std::string logType = "async"; +static std::string logType = "sync"; static std::string userName = "shadPS4"; static std::string updateChannel; +static std::string chooseHomeTab; static std::string backButtonBehavior = "left"; static bool useSpecialPad = false; static int specialPadClass = 1; +static bool isMotionControlsEnabled = true; static bool isDebugDump = false; static bool isShaderDebug = false; static bool isShowSplash = false; static bool isAutoUpdate = false; +static bool isAlwaysShowChangelog = false; +static std::string isSideTrophy = "right"; static bool isNullGpu = false; static bool shouldCopyGPUBuffers = false; static bool shouldDumpShaders = false; @@ -59,19 +63,29 @@ static u32 vblankDivider = 1; static bool vkValidation = false; static bool vkValidationSync = false; static bool vkValidationGpu = false; -static bool rdocEnable = false; -static bool vkMarkers = false; static bool vkCrashDiagnostic = false; +static bool vkHostMarkers = false; +static bool vkGuestMarkers = false; +static bool rdocEnable = false; +static bool isFpsColor = true; +static bool isSeparateLogFilesEnabled = false; static s16 cursorState = HideCursorState::Idle; static int cursorHideTimeout = 5; // 5 seconds (default) +static double trophyNotificationDuration = 6.0; +static bool useUnifiedInputConfig = true; +static bool overrideControllerColor = false; +static int controllerCustomColorRGB[3] = {0, 0, 255}; static bool separateupdatefolder = false; static bool compatibilityData = false; static bool checkCompatibilityOnStartup = false; static std::string trophyKey; // Gui -std::vector settings_install_dirs = {}; +static bool load_game_size = true; +static std::vector settings_install_dirs = {}; +std::vector install_dirs_enabled = {}; std::filesystem::path settings_addon_install_dir = {}; +std::filesystem::path save_data_path = {}; u32 main_window_geometry_x = 400; u32 main_window_geometry_y = 400; u32 main_window_geometry_w = 1280; @@ -84,14 +98,49 @@ u32 m_slider_pos_grid = 0; u32 m_table_mode = 0; u32 m_window_size_W = 1280; 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"; +std::string emulator_language = "en_US"; +static int backgroundImageOpacity = 50; +static bool showBackgroundImage = true; +static bool isFullscreen = false; +static std::string fullscreenMode = "Windowed"; +static bool isHDRAllowed = false; +static bool showLabelsUnderIcons = true; // Language u32 m_language = 1; // english +bool allowHDR() { + return isHDRAllowed; +} + +bool GetUseUnifiedInputConfig() { + return useUnifiedInputConfig; +} + +void SetUseUnifiedInputConfig(bool use) { + useUnifiedInputConfig = use; +} + +bool GetOverrideControllerColor() { + return overrideControllerColor; +} + +void SetOverrideControllerColor(bool enable) { + overrideControllerColor = enable; +} + +int* GetControllerCustomColor() { + return controllerCustomColorRGB; +} + +void SetControllerCustomColor(int r, int b, int g) { + controllerCustomColorRGB[0] = r; + controllerCustomColorRGB[1] = b; + controllerCustomColorRGB[2] = g; +} + std::string getTrophyKey() { return trophyKey; } @@ -100,14 +149,45 @@ void setTrophyKey(std::string key) { trophyKey = key; } -bool isNeoMode() { +bool GetLoadGameSizeEnabled() { + return load_game_size; +} + +std::filesystem::path GetSaveDataPath() { + if (save_data_path.empty()) { + return Common::FS::GetUserPath(Common::FS::PathType::SaveDataDir); + } + return save_data_path; +} + +void setLoadGameSizeEnabled(bool enable) { + load_game_size = enable; +} + +bool isNeoModeConsole() { return isNeo; } -bool isFullscreenMode() { +bool isDevKitConsole() { + return isDevKit; +} + +bool getIsFullscreen() { return isFullscreen; } +bool getShowLabelsUnderIcons() { + return showLabelsUnderIcons; +} + +bool setShowLabelsUnderIcons() { + return false; +} + +std::string getFullscreenMode() { + return fullscreenMode; +} + bool getisTrophyPopupDisabled() { return isTrophyPopupDisabled; } @@ -132,6 +212,10 @@ int getCursorHideTimeout() { return cursorHideTimeout; } +double getTrophyNotificationDuration() { + return trophyNotificationDuration; +} + u32 getScreenWidth() { return screenWidth; } @@ -160,6 +244,10 @@ std::string getUpdateChannel() { return updateChannel; } +std::string getChooseHomeTab() { + return chooseHomeTab; +} + std::string getBackButtonBehavior() { return backButtonBehavior; } @@ -172,6 +260,10 @@ int getSpecialPadClass() { return specialPadClass; } +bool getIsMotionControlsEnabled() { + return isMotionControlsEnabled; +} + bool debugDump() { return isDebugDump; } @@ -188,6 +280,14 @@ bool autoUpdate() { return isAutoUpdate; } +bool alwaysShowChangelog() { + return isAlwaysShowChangelog; +} + +std::string sideTrophy() { + return isSideTrophy; +} + bool nullGpu() { return isNullGpu; } @@ -208,8 +308,8 @@ bool isRdocEnabled() { return rdocEnable; } -bool isMarkersEnabled() { - return vkMarkers; +bool fpsColor() { + return isFpsColor; } u32 vblankDiv() { @@ -228,12 +328,28 @@ bool vkValidationGpuEnabled() { return vkValidationGpu; } -bool vkMarkersEnabled() { - return vkMarkers || vkCrashDiagnostic; // Crash diagnostic forces markers on +bool getVkCrashDiagnosticEnabled() { + return vkCrashDiagnostic; } -bool vkCrashDiagnosticEnabled() { - return vkCrashDiagnostic; +bool getVkHostMarkersEnabled() { + return vkHostMarkers; +} + +bool getVkGuestMarkersEnabled() { + return vkGuestMarkers; +} + +void setVkCrashDiagnosticEnabled(bool enable) { + vkCrashDiagnostic = enable; +} + +void setVkHostMarkersEnabled(bool enable) { + vkHostMarkers = enable; +} + +void setVkGuestMarkersEnabled(bool enable) { + vkGuestMarkers = enable; } bool getSeparateUpdateEnabled() { @@ -276,10 +392,22 @@ void setAutoUpdate(bool enable) { isAutoUpdate = enable; } +void setAlwaysShowChangelog(bool enable) { + isAlwaysShowChangelog = enable; +} + +void setSideTrophy(std::string side) { + isSideTrophy = side; +} + void setNullGpu(bool enable) { isNullGpu = enable; } +void setAllowHDR(bool enable) { + isHDRAllowed = enable; +} + void setCopyGPUCmdBuffers(bool enable) { shouldCopyGPUBuffers = enable; } @@ -304,9 +432,16 @@ void setVblankDiv(u32 value) { vblankDivider = value; } -void setFullscreenMode(bool enable) { +void setIsFullscreen(bool enable) { isFullscreen = enable; } +static void setShowLabelsUnderIcons(bool enable) { + showLabelsUnderIcons = enable; +} + +void setFullscreenMode(std::string mode) { + fullscreenMode = mode; +} void setisTrophyPopupDisabled(bool disable) { isTrophyPopupDisabled = disable; @@ -331,6 +466,9 @@ void setCursorState(s16 newCursorState) { void setCursorHideTimeout(int newcursorHideTimeout) { cursorHideTimeout = newcursorHideTimeout; } +void setTrophyNotificationDuration(double newTrophyNotificationDuration) { + trophyNotificationDuration = newTrophyNotificationDuration; +} void setLanguage(u32 language) { m_language = language; @@ -348,6 +486,10 @@ void setLogFilter(const std::string& type) { logFilter = type; } +void setSeparateLogFilesEnabled(bool enabled) { + isSeparateLogFilesEnabled = enabled; +} + void setUserName(const std::string& type) { userName = type; } @@ -355,6 +497,9 @@ void setUserName(const std::string& type) { void setUpdateChannel(const std::string& type) { updateChannel = type; } +void setChooseHomeTab(const std::string& type) { + chooseHomeTab = type; +} void setBackButtonBehavior(const std::string& type) { backButtonBehavior = type; @@ -368,6 +513,10 @@ void setSpecialPadClass(int type) { specialPadClass = type; } +void setIsMotionControlsEnabled(bool use) { + isMotionControlsEnabled = use; +} + void setSeparateUpdateEnabled(bool use) { separateupdatefolder = use; } @@ -387,22 +536,34 @@ void setMainWindowGeometry(u32 x, u32 y, u32 w, u32 h) { main_window_geometry_h = h; } -bool addGameInstallDir(const std::filesystem::path& dir) { - if (std::find(settings_install_dirs.begin(), settings_install_dirs.end(), dir) == - settings_install_dirs.end()) { - settings_install_dirs.push_back(dir); - return true; +bool addGameInstallDir(const std::filesystem::path& dir, bool enabled) { + for (const auto& install_dir : settings_install_dirs) { + if (install_dir.path == dir) { + return false; + } } - return false; + settings_install_dirs.push_back({dir, enabled}); + return true; } void removeGameInstallDir(const std::filesystem::path& dir) { - auto iterator = std::find(settings_install_dirs.begin(), settings_install_dirs.end(), dir); + auto iterator = + std::find_if(settings_install_dirs.begin(), settings_install_dirs.end(), + [&dir](const GameInstallDir& install_dir) { return install_dir.path == dir; }); if (iterator != settings_install_dirs.end()) { settings_install_dirs.erase(iterator); } } +void setGameInstallDirEnabled(const std::filesystem::path& dir, bool enabled) { + auto iterator = + std::find_if(settings_install_dirs.begin(), settings_install_dirs.end(), + [&dir](const GameInstallDir& install_dir) { return install_dir.path == dir; }); + if (iterator != settings_install_dirs.end()) { + iterator->enabled = enabled; + } +} + void setAddonInstallDir(const std::filesystem::path& dir) { settings_addon_install_dir = dir; } @@ -439,11 +600,6 @@ void setMainWindowHeight(u32 height) { m_window_size_H = height; } -void setPkgViewer(const std::vector& pkgList) { - m_pkg_viewer.resize(pkgList.size()); - m_pkg_viewer = pkgList; -} - void setElfViewer(const std::vector& elfList) { m_elf_viewer.resize(elfList.size()); m_elf_viewer = elfList; @@ -458,8 +614,19 @@ void setEmulatorLanguage(std::string language) { emulator_language = language; } -void setGameInstallDirs(const std::vector& settings_install_dirs_config) { - settings_install_dirs = settings_install_dirs_config; +void setGameInstallDirs(const std::vector& dirs_config) { + settings_install_dirs.clear(); + for (const auto& dir : dirs_config) { + settings_install_dirs.push_back({dir, true}); + } +} + +void setAllGameInstallDirs(const std::vector& dirs_config) { + settings_install_dirs = dirs_config; +} + +void setSaveDataPath(const std::filesystem::path& path) { + save_data_path = path; } u32 getMainWindowGeometryX() { @@ -478,8 +645,22 @@ u32 getMainWindowGeometryH() { return main_window_geometry_h; } -const std::vector& getGameInstallDirs() { - return settings_install_dirs; +const std::vector getGameInstallDirs() { + std::vector enabled_dirs; + for (const auto& dir : settings_install_dirs) { + if (dir.enabled) { + enabled_dirs.push_back(dir.path); + } + } + return enabled_dirs; +} + +const std::vector getGameInstallDirsEnabled() { + std::vector enabled_dirs; + for (const auto& dir : settings_install_dirs) { + enabled_dirs.push_back(dir.enabled); + } + return enabled_dirs; } std::filesystem::path getAddonInstallDir() { @@ -522,10 +703,6 @@ u32 getMainWindowHeight() { return m_window_size_H; } -std::vector getPkgViewer() { - return m_pkg_viewer; -} - std::vector getElfViewer() { return m_elf_viewer; } @@ -542,6 +719,26 @@ u32 GetLanguage() { return m_language; } +bool getSeparateLogFilesEnabled() { + return isSeparateLogFilesEnabled; +} + +int getBackgroundImageOpacity() { + return backgroundImageOpacity; +} + +void setBackgroundImageOpacity(int opacity) { + backgroundImageOpacity = std::clamp(opacity, 0, 100); +} + +bool getShowBackgroundImage() { + return showBackgroundImage; +} + +void setShowBackgroundImage(bool show) { + showBackgroundImage = show; +} + void load(const std::filesystem::path& path) { // If the configuration file does not exist, create it and return std::error_code error; @@ -565,9 +762,11 @@ void load(const std::filesystem::path& path) { const toml::value& general = data.at("General"); isNeo = toml::find_or(general, "isPS4Pro", false); - isFullscreen = toml::find_or(general, "Fullscreen", false); + isDevKit = toml::find_or(general, "isDevKit", false); playBGM = toml::find_or(general, "playBGM", false); isTrophyPopupDisabled = toml::find_or(general, "isTrophyPopupDisabled", false); + trophyNotificationDuration = + toml::find_or(general, "trophyNotificationDuration", 5.0); BGMvolume = toml::find_or(general, "BGMvolume", 50); enableDiscordRPC = toml::find_or(general, "enableDiscordRPC", true); logFilter = toml::find_or(general, "logFilter", ""); @@ -580,10 +779,13 @@ void load(const std::filesystem::path& path) { } isShowSplash = toml::find_or(general, "showSplash", true); isAutoUpdate = toml::find_or(general, "autoUpdate", false); + isAlwaysShowChangelog = toml::find_or(general, "alwaysShowChangelog", false); + isSideTrophy = toml::find_or(general, "sideTrophy", "right"); separateupdatefolder = toml::find_or(general, "separateUpdateEnabled", false); compatibilityData = toml::find_or(general, "compatibilityEnabled", false); checkCompatibilityOnStartup = toml::find_or(general, "checkCompatibilityOnStartup", false); + chooseHomeTab = toml::find_or(general, "chooseHomeTab", "Release"); } if (data.contains("Input")) { @@ -594,6 +796,8 @@ void load(const std::filesystem::path& path) { backButtonBehavior = toml::find_or(input, "backButtonBehavior", "left"); useSpecialPad = toml::find_or(input, "useSpecialPad", false); specialPadClass = toml::find_or(input, "specialPadClass", 1); + isMotionControlsEnabled = toml::find_or(input, "isMotionControlsEnabled", true); + useUnifiedInputConfig = toml::find_or(input, "useUnifiedInputConfig", true); } if (data.contains("GPU")) { @@ -606,6 +810,9 @@ void load(const std::filesystem::path& path) { shouldDumpShaders = toml::find_or(gpu, "dumpShaders", false); shouldPatchShaders = toml::find_or(gpu, "patchShaders", true); vblankDivider = toml::find_or(gpu, "vblankDivider", 1); + isFullscreen = toml::find_or(gpu, "Fullscreen", false); + fullscreenMode = toml::find_or(gpu, "FullscreenMode", "Windowed"); + isHDRAllowed = toml::find_or(gpu, "allowHDR", false); } if (data.contains("Vulkan")) { @@ -615,21 +822,25 @@ void load(const std::filesystem::path& path) { vkValidation = toml::find_or(vk, "validation", false); vkValidationSync = toml::find_or(vk, "validation_sync", false); vkValidationGpu = toml::find_or(vk, "validation_gpu", true); - rdocEnable = toml::find_or(vk, "rdocEnable", false); - vkMarkers = toml::find_or(vk, "rdocMarkersEnable", false); vkCrashDiagnostic = toml::find_or(vk, "crashDiagnostic", false); + vkHostMarkers = toml::find_or(vk, "hostMarkers", false); + vkGuestMarkers = toml::find_or(vk, "guestMarkers", false); + rdocEnable = toml::find_or(vk, "rdocEnable", false); } if (data.contains("Debug")) { const toml::value& debug = data.at("Debug"); isDebugDump = toml::find_or(debug, "DebugDump", false); + isSeparateLogFilesEnabled = toml::find_or(debug, "isSeparateLogFilesEnabled", false); isShaderDebug = toml::find_or(debug, "CollectShader", false); + isFpsColor = toml::find_or(debug, "FPSColor", true); } if (data.contains("GUI")) { const toml::value& gui = data.at("GUI"); + load_game_size = toml::find_or(gui, "loadGameSizeEnabled", true); m_icon_size = toml::find_or(gui, "iconSize", 0); m_icon_size_grid = toml::find_or(gui, "iconSizeGrid", 0); m_slider_pos = toml::find_or(gui, "sliderPos", 0); @@ -639,21 +850,38 @@ void load(const std::filesystem::path& path) { m_window_size_H = toml::find_or(gui, "mw_height", 0); const auto install_dir_array = - toml::find_or>(gui, "installDirs", {}); - for (const auto& dir : install_dir_array) { - addGameInstallDir(std::filesystem::path{dir}); + toml::find_or>(gui, "installDirs", {}); + + try { + install_dirs_enabled = toml::find>(gui, "installDirsEnabled"); + } catch (...) { + // If it does not exist, assume that all are enabled. + install_dirs_enabled.resize(install_dir_array.size(), true); } + if (install_dirs_enabled.size() < install_dir_array.size()) { + install_dirs_enabled.resize(install_dir_array.size(), true); + } + + settings_install_dirs.clear(); + for (size_t i = 0; i < install_dir_array.size(); i++) { + settings_install_dirs.push_back( + {std::filesystem::path{install_dir_array[i]}, install_dirs_enabled[i]}); + } + + save_data_path = toml::find_fs_path_or(gui, "saveDataPath", {}); + settings_addon_install_dir = toml::find_fs_path_or(gui, "addonInstallDir", {}); main_window_geometry_x = toml::find_or(gui, "geometry_x", 0); main_window_geometry_y = toml::find_or(gui, "geometry_y", 0); main_window_geometry_w = toml::find_or(gui, "geometry_w", 0); main_window_geometry_h = toml::find_or(gui, "geometry_h", 0); - m_pkg_viewer = toml::find_or>(gui, "pkgDirs", {}); 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"); + emulator_language = toml::find_or(gui, "emulatorLanguage", "en_US"); + backgroundImageOpacity = toml::find_or(gui, "backgroundImageOpacity", 50); + showBackgroundImage = toml::find_or(gui, "showBackgroundImage", true); } if (data.contains("Settings")) { @@ -666,10 +894,53 @@ void load(const std::filesystem::path& path) { const toml::value& keys = data.at("Keys"); trophyKey = toml::find_or(keys, "TrophyKey", ""); } + + // Check if the loaded language is in the allowed list + const std::vector allowed_languages = { + "ar_SA", "da_DK", "de_DE", "el_GR", "en_US", "es_ES", "fa_IR", "fi_FI", "fr_FR", "hu_HU", + "id_ID", "it_IT", "ja_JP", "ko_KR", "lt_LT", "nb_NO", "nl_NL", "pl_PL", "pt_BR", "pt_PT", + "ro_RO", "ru_RU", "sq_AL", "sv_SE", "tr_TR", "uk_UA", "vi_VN", "zh_CN", "zh_TW"}; + + if (std::find(allowed_languages.begin(), allowed_languages.end(), emulator_language) == + allowed_languages.end()) { + emulator_language = "en_US"; // Default to en_US if not in the list + save(path); + } +} + +void sortTomlSections(toml::ordered_value& data) { + toml::ordered_value ordered_data; + std::vector section_order = {"General", "Input", "GPU", "Vulkan", + "Debug", "Keys", "GUI", "Settings"}; + + for (const auto& section : section_order) { + if (data.contains(section)) { + std::vector keys; + for (const auto& item : data.at(section).as_table()) { + keys.push_back(item.first); + } + + std::sort(keys.begin(), keys.end(), [](const std::string& a, const std::string& b) { + return std::lexicographical_compare( + a.begin(), a.end(), b.begin(), b.end(), [](char a_char, char b_char) { + return std::tolower(a_char) < std::tolower(b_char); + }); + }); + + toml::ordered_value ordered_section; + for (const auto& key : keys) { + ordered_section[key] = data.at(section).at(key); + } + + ordered_data[section] = ordered_section; + } + } + + data = ordered_data; } void save(const std::filesystem::path& path) { - toml::value data; + toml::ordered_value data; std::error_code error; if (std::filesystem::exists(path, error)) { @@ -677,7 +948,8 @@ void save(const std::filesystem::path& path) { std::ifstream ifs; ifs.exceptions(std::ifstream::failbit | std::ifstream::badbit); ifs.open(path, std::ios_base::binary); - data = toml::parse(ifs, std::string{fmt::UTF(path.filename().u8string()).data}); + data = toml::parse( + ifs, std::string{fmt::UTF(path.filename().u8string()).data}); } catch (const std::exception& ex) { fmt::print("Exception trying to parse config file. Exception: {}\n", ex.what()); return; @@ -690,8 +962,9 @@ void save(const std::filesystem::path& path) { } data["General"]["isPS4Pro"] = isNeo; - data["General"]["Fullscreen"] = isFullscreen; + data["General"]["isDevKit"] = isDevKit; data["General"]["isTrophyPopupDisabled"] = isTrophyPopupDisabled; + data["General"]["trophyNotificationDuration"] = trophyNotificationDuration; data["General"]["playBGM"] = playBGM; data["General"]["BGMvolume"] = BGMvolume; data["General"]["enableDiscordRPC"] = enableDiscordRPC; @@ -699,8 +972,11 @@ void save(const std::filesystem::path& path) { data["General"]["logType"] = logType; data["General"]["userName"] = userName; data["General"]["updateChannel"] = updateChannel; + data["General"]["chooseHomeTab"] = chooseHomeTab; data["General"]["showSplash"] = isShowSplash; data["General"]["autoUpdate"] = isAutoUpdate; + data["General"]["alwaysShowChangelog"] = isAlwaysShowChangelog; + data["General"]["sideTrophy"] = isSideTrophy; data["General"]["separateUpdateEnabled"] = separateupdatefolder; data["General"]["compatibilityEnabled"] = compatibilityData; data["General"]["checkCompatibilityOnStartup"] = checkCompatibilityOnStartup; @@ -709,6 +985,8 @@ void save(const std::filesystem::path& path) { data["Input"]["backButtonBehavior"] = backButtonBehavior; data["Input"]["useSpecialPad"] = useSpecialPad; data["Input"]["specialPadClass"] = specialPadClass; + data["Input"]["isMotionControlsEnabled"] = isMotionControlsEnabled; + data["Input"]["useUnifiedInputConfig"] = useUnifiedInputConfig; data["GPU"]["screenWidth"] = screenWidth; data["GPU"]["screenHeight"] = screenHeight; data["GPU"]["nullGpu"] = isNullGpu; @@ -716,37 +994,74 @@ void save(const std::filesystem::path& path) { data["GPU"]["dumpShaders"] = shouldDumpShaders; data["GPU"]["patchShaders"] = shouldPatchShaders; data["GPU"]["vblankDivider"] = vblankDivider; + data["GPU"]["Fullscreen"] = isFullscreen; + data["GPU"]["FullscreenMode"] = fullscreenMode; + data["GPU"]["allowHDR"] = isHDRAllowed; data["Vulkan"]["gpuId"] = gpuId; data["Vulkan"]["validation"] = vkValidation; data["Vulkan"]["validation_sync"] = vkValidationSync; data["Vulkan"]["validation_gpu"] = vkValidationGpu; - data["Vulkan"]["rdocEnable"] = rdocEnable; - data["Vulkan"]["rdocMarkersEnable"] = vkMarkers; data["Vulkan"]["crashDiagnostic"] = vkCrashDiagnostic; + data["Vulkan"]["hostMarkers"] = vkHostMarkers; + data["Vulkan"]["guestMarkers"] = vkGuestMarkers; + data["Vulkan"]["rdocEnable"] = rdocEnable; data["Debug"]["DebugDump"] = isDebugDump; data["Debug"]["CollectShader"] = isShaderDebug; - + data["Debug"]["isSeparateLogFilesEnabled"] = isSeparateLogFilesEnabled; + data["Debug"]["FPSColor"] = isFpsColor; data["Keys"]["TrophyKey"] = trophyKey; std::vector install_dirs; - for (const auto& dirString : settings_install_dirs) { - install_dirs.emplace_back(std::string{fmt::UTF(dirString.u8string()).data}); + std::vector install_dirs_enabled; + + // temporary structure for ordering + struct DirEntry { + std::string path_str; + bool enabled; + }; + + std::vector sorted_dirs; + for (const auto& dirInfo : settings_install_dirs) { + sorted_dirs.push_back( + {std::string{fmt::UTF(dirInfo.path.u8string()).data}, dirInfo.enabled}); } + + // Sort directories alphabetically + std::sort(sorted_dirs.begin(), sorted_dirs.end(), [](const DirEntry& a, const DirEntry& b) { + return std::lexicographical_compare( + a.path_str.begin(), a.path_str.end(), b.path_str.begin(), b.path_str.end(), + [](char a_char, char b_char) { return std::tolower(a_char) < std::tolower(b_char); }); + }); + + for (const auto& entry : sorted_dirs) { + install_dirs.push_back(entry.path_str); + install_dirs_enabled.push_back(entry.enabled); + } + data["GUI"]["installDirs"] = install_dirs; + data["GUI"]["installDirsEnabled"] = install_dirs_enabled; + data["GUI"]["saveDataPath"] = std::string{fmt::UTF(save_data_path.u8string()).data}; + data["GUI"]["loadGameSizeEnabled"] = load_game_size; data["GUI"]["addonInstallDir"] = std::string{fmt::UTF(settings_addon_install_dir.u8string()).data}; data["GUI"]["emulatorLanguage"] = emulator_language; + data["GUI"]["backgroundImageOpacity"] = backgroundImageOpacity; + data["GUI"]["showBackgroundImage"] = showBackgroundImage; data["Settings"]["consoleLanguage"] = m_language; + // Sorting of TOML sections + sortTomlSections(data); + std::ofstream file(path, std::ios::binary); file << data; file.close(); + saveMainWindow(path); } void saveMainWindow(const std::filesystem::path& path) { - toml::value data; + toml::ordered_value data; std::error_code error; if (std::filesystem::exists(path, error)) { @@ -754,7 +1069,8 @@ void saveMainWindow(const std::filesystem::path& path) { std::ifstream ifs; ifs.exceptions(std::ifstream::failbit | std::ifstream::badbit); ifs.open(path, std::ios_base::binary); - data = toml::parse(ifs, std::string{fmt::UTF(path.filename().u8string()).data}); + data = toml::parse( + ifs, std::string{fmt::UTF(path.filename().u8string()).data}); } catch (const std::exception& ex) { fmt::print("Exception trying to parse config file. Exception: {}\n", ex.what()); return; @@ -778,17 +1094,21 @@ void saveMainWindow(const std::filesystem::path& path) { data["GUI"]["geometry_y"] = main_window_geometry_y; data["GUI"]["geometry_w"] = main_window_geometry_w; data["GUI"]["geometry_h"] = main_window_geometry_h; - data["GUI"]["pkgDirs"] = m_pkg_viewer; data["GUI"]["elfDirs"] = m_elf_viewer; data["GUI"]["recentFiles"] = m_recent_files; + // Sorting of TOML sections + sortTomlSections(data); + std::ofstream file(path, std::ios::binary); file << data; file.close(); } void setDefaultValues() { + isHDRAllowed = false; isNeo = false; + isDevKit = false; isFullscreen = false; isTrophyPopupDisabled = false; playBGM = false; @@ -797,15 +1117,17 @@ void setDefaultValues() { screenWidth = 1280; screenHeight = 720; logFilter = ""; - logType = "async"; + logType = "sync"; userName = "shadPS4"; if (Common::isRelease) { updateChannel = "Release"; } else { updateChannel = "Nightly"; } + chooseHomeTab = "General"; cursorState = HideCursorState::Idle; cursorHideTimeout = 5; + trophyNotificationDuration = 6.0; backButtonBehavior = "left"; useSpecialPad = false; specialPadClass = 1; @@ -813,21 +1135,136 @@ void setDefaultValues() { isShaderDebug = false; isShowSplash = false; isAutoUpdate = false; + isAlwaysShowChangelog = false; + isSideTrophy = "right"; isNullGpu = false; shouldDumpShaders = false; vblankDivider = 1; vkValidation = false; vkValidationSync = false; vkValidationGpu = false; - rdocEnable = false; - vkMarkers = false; vkCrashDiagnostic = false; - emulator_language = "en"; + vkHostMarkers = false; + vkGuestMarkers = false; + rdocEnable = false; + emulator_language = "en_US"; m_language = 1; gpuId = -1; separateupdatefolder = false; compatibilityData = false; checkCompatibilityOnStartup = false; + backgroundImageOpacity = 50; + showBackgroundImage = true; +} + +constexpr std::string_view GetDefaultKeyboardConfig() { + return R"(#Feeling lost? Check out the Help section! + +# Keyboard bindings + +triangle = kp8 +circle = kp6 +cross = kp2 +square = kp4 +# Alternatives for users without a keypad +triangle = c +circle = b +cross = n +square = v + +l1 = q +r1 = u +l2 = e +r2 = o +l3 = x +r3 = m + +options = enter +touchpad = space + +pad_up = up +pad_down = down +pad_left = left +pad_right = right + +axis_left_x_minus = a +axis_left_x_plus = d +axis_left_y_minus = w +axis_left_y_plus = s + +axis_right_x_minus = j +axis_right_x_plus = l +axis_right_y_minus = i +axis_right_y_plus = k + +# Controller bindings + +triangle = triangle +cross = cross +square = square +circle = circle + +l1 = l1 +l2 = l2 +l3 = l3 +r1 = r1 +r2 = r2 +r3 = r3 + +options = options +touchpad = back + +pad_up = pad_up +pad_down = pad_down +pad_left = pad_left +pad_right = pad_right + +axis_left_x = axis_left_x +axis_left_y = axis_left_y +axis_right_x = axis_right_x +axis_right_y = axis_right_y + +# Range of deadzones: 1 (almost none) to 127 (max) +analog_deadzone = leftjoystick, 2, 127 +analog_deadzone = rightjoystick, 2, 127 + +override_controller_color = false, 0, 0, 255 +)"; +} +std::filesystem::path GetFoolproofKbmConfigFile(const std::string& game_id) { + // Read configuration file of the game, and if it doesn't exist, generate it from default + // If that doesn't exist either, generate that from getDefaultConfig() and try again + // If even the folder is missing, we start with that. + + const auto config_dir = Common::FS::GetUserPath(Common::FS::PathType::UserDir) / "input_config"; + const auto config_file = config_dir / (game_id + ".ini"); + const auto default_config_file = config_dir / "default.ini"; + + // Ensure the config directory exists + if (!std::filesystem::exists(config_dir)) { + std::filesystem::create_directories(config_dir); + } + + // Check if the default config exists + if (!std::filesystem::exists(default_config_file)) { + // If the default config is also missing, create it from getDefaultConfig() + const auto default_config = GetDefaultKeyboardConfig(); + std::ofstream default_config_stream(default_config_file); + if (default_config_stream) { + default_config_stream << default_config; + } + } + + // if empty, we only need to execute the function up until this point + if (game_id.empty()) { + return default_config_file; + } + + // If game-specific config doesn't exist, create it from the default config + if (!std::filesystem::exists(config_file)) { + std::filesystem::copy(default_config_file, config_file); + } + return config_file; } } // namespace Config diff --git a/src/common/config.h b/src/common/config.h index 9d943008b..d040aa337 100644 --- a/src/common/config.h +++ b/src/common/config.h @@ -9,6 +9,11 @@ namespace Config { +struct GameInstallDir { + std::filesystem::path path; + bool enabled; +}; + enum HideCursorState : s16 { Never, Idle, Always }; void load(const std::filesystem::path& path); @@ -17,9 +22,15 @@ void saveMainWindow(const std::filesystem::path& path); std::string getTrophyKey(); void setTrophyKey(std::string key); - -bool isNeoMode(); -bool isFullscreenMode(); +bool GetLoadGameSizeEnabled(); +std::filesystem::path GetSaveDataPath(); +void setLoadGameSizeEnabled(bool enable); +bool getIsFullscreen(); +bool getShowLabelsUnderIcons(); +bool setShowLabelsUnderIcons(); +std::string getFullscreenMode(); +bool isNeoModeConsole(); +bool isDevKitConsole(); bool getPlayBGM(); int getBGMvolume(); bool getisTrophyPopupDisabled(); @@ -27,45 +38,64 @@ bool getEnableDiscordRPC(); bool getSeparateUpdateEnabled(); bool getCompatibilityEnabled(); bool getCheckCompatibilityOnStartup(); +int getBackgroundImageOpacity(); +bool getShowBackgroundImage(); std::string getLogFilter(); std::string getLogType(); std::string getUserName(); std::string getUpdateChannel(); +std::string getChooseHomeTab(); s16 getCursorState(); int getCursorHideTimeout(); +double getTrophyNotificationDuration(); std::string getBackButtonBehavior(); bool getUseSpecialPad(); int getSpecialPadClass(); +bool getIsMotionControlsEnabled(); +bool GetUseUnifiedInputConfig(); +void SetUseUnifiedInputConfig(bool use); +bool GetOverrideControllerColor(); +void SetOverrideControllerColor(bool enable); +int* GetControllerCustomColor(); +void SetControllerCustomColor(int r, int b, int g); u32 getScreenWidth(); u32 getScreenHeight(); s32 getGpuId(); +bool allowHDR(); bool debugDump(); bool collectShadersForDebug(); bool showSplash(); bool autoUpdate(); +bool alwaysShowChangelog(); +std::string sideTrophy(); bool nullGpu(); bool copyGPUCmdBuffers(); bool dumpShaders(); bool patchShaders(); bool isRdocEnabled(); +bool fpsColor(); u32 vblankDiv(); void setDebugDump(bool enable); void setCollectShaderForDebug(bool enable); void setShowSplash(bool enable); void setAutoUpdate(bool enable); +void setAlwaysShowChangelog(bool enable); +void setSideTrophy(std::string side); void setNullGpu(bool enable); +void setAllowHDR(bool enable); void setCopyGPUCmdBuffers(bool enable); void setDumpShaders(bool enable); void setVblankDiv(u32 value); void setGpuId(s32 selectedGpuId); void setScreenWidth(u32 width); void setScreenHeight(u32 height); -void setFullscreenMode(bool enable); +void setIsFullscreen(bool enable); +void setFullscreenMode(std::string mode); void setisTrophyPopupDisabled(bool disable); void setPlayBGM(bool enable); void setBGMvolume(int volume); @@ -74,20 +104,28 @@ void setLanguage(u32 language); void setNeoMode(bool enable); void setUserName(const std::string& type); void setUpdateChannel(const std::string& type); +void setChooseHomeTab(const std::string& type); void setSeparateUpdateEnabled(bool use); -void setGameInstallDirs(const std::vector& settings_install_dirs_config); +void setGameInstallDirs(const std::vector& dirs_config); +void setAllGameInstallDirs(const std::vector& dirs_config); +void setSaveDataPath(const std::filesystem::path& path); void setCompatibilityEnabled(bool use); void setCheckCompatibilityOnStartup(bool use); +void setBackgroundImageOpacity(int opacity); +void setShowBackgroundImage(bool show); void setCursorState(s16 cursorState); void setCursorHideTimeout(int newcursorHideTimeout); +void setTrophyNotificationDuration(double newTrophyNotificationDuration); void setBackButtonBehavior(const std::string& type); void setUseSpecialPad(bool use); void setSpecialPadClass(int type); +void setIsMotionControlsEnabled(bool use); void setLogType(const std::string& type); void setLogFilter(const std::string& type); - +void setSeparateLogFilesEnabled(bool enabled); +bool getSeparateLogFilesEnabled(); void setVkValidation(bool enable); void setVkSyncValidation(bool enable); void setRdocEnabled(bool enable); @@ -95,13 +133,18 @@ void setRdocEnabled(bool enable); bool vkValidationEnabled(); bool vkValidationSyncEnabled(); bool vkValidationGpuEnabled(); -bool vkMarkersEnabled(); -bool vkCrashDiagnosticEnabled(); +bool getVkCrashDiagnosticEnabled(); +bool getVkHostMarkersEnabled(); +bool getVkGuestMarkersEnabled(); +void setVkCrashDiagnosticEnabled(bool enable); +void setVkHostMarkersEnabled(bool enable); +void setVkGuestMarkersEnabled(bool enable); // Gui void setMainWindowGeometry(u32 x, u32 y, u32 w, u32 h); -bool addGameInstallDir(const std::filesystem::path& dir); +bool addGameInstallDir(const std::filesystem::path& dir, bool enabled = true); void removeGameInstallDir(const std::filesystem::path& dir); +void setGameInstallDirEnabled(const std::filesystem::path& dir, bool enabled); void setAddonInstallDir(const std::filesystem::path& dir); void setMainWindowTheme(u32 theme); void setIconSize(u32 size); @@ -111,7 +154,6 @@ void setSliderPositionGrid(u32 pos); void setTableMode(u32 mode); void setMainWindowWidth(u32 width); 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); @@ -120,7 +162,8 @@ u32 getMainWindowGeometryX(); u32 getMainWindowGeometryY(); u32 getMainWindowGeometryW(); u32 getMainWindowGeometryH(); -const std::vector& getGameInstallDirs(); +const std::vector getGameInstallDirs(); +const std::vector getGameInstallDirsEnabled(); std::filesystem::path getAddonInstallDir(); u32 getMainWindowTheme(); u32 getIconSize(); @@ -130,13 +173,15 @@ u32 getSliderPositionGrid(); u32 getTableMode(); u32 getMainWindowWidth(); u32 getMainWindowHeight(); -std::vector getPkgViewer(); std::vector getElfViewer(); std::vector getRecentFiles(); std::string getEmulatorLanguage(); void setDefaultValues(); +// todo: name and function location pending +std::filesystem::path GetFoolproofKbmConfigFile(const std::string& game_id = ""); + // settings u32 GetLanguage(); -}; // namespace Config \ No newline at end of file +}; // namespace Config diff --git a/src/common/elf_info.h b/src/common/elf_info.h index 6eb144e9a..062cee012 100644 --- a/src/common/elf_info.h +++ b/src/common/elf_info.h @@ -3,10 +3,12 @@ #pragma once +#include #include #include #include "assert.h" +#include "bit_field.h" #include "singleton.h" #include "types.h" @@ -16,6 +18,46 @@ class Emulator; namespace Common { +union PSFAttributes { + /// Supports initial user's logout + BitField<0, 1, u32> support_initial_user_logout; + /// Enter button for the common dialog is cross. + BitField<1, 1, u32> enter_button_cross; + /// Warning dialog for PS Move is displayed in the options menu. + BitField<2, 1, u32> ps_move_warning; + /// Supports stereoscopic 3D. + BitField<3, 1, u32> support_stereoscopic_3d; + /// Suspends when PS button is pressed. + BitField<4, 1, u32> ps_button_suspend; + /// Enter button for the common dialog is assigned by the system software. + BitField<5, 1, u32> enter_button_system; + /// Overrides share menu behavior. + BitField<6, 1, u32> override_share_menu; + /// Suspends when PS button is pressed and special output resolution is set. + BitField<8, 1, u32> special_res_ps_button_suspend; + /// Enable HDCP. + BitField<9, 1, u32> enable_hdcp; + /// Disable HDCP for non-game. + BitField<10, 1, u32> disable_hdcp_non_game; + /// Supports PS VR. + BitField<14, 1, u32> support_ps_vr; + /// CPU mode (6 CPU) + BitField<15, 1, u32> six_cpu_mode; + /// CPU mode (7 CPU) + BitField<16, 1, u32> seven_cpu_mode; + /// Supports PS4 Pro (Neo) mode. + BitField<23, 1, u32> support_neo_mode; + /// Requires PS VR. + BitField<26, 1, u32> require_ps_vr; + /// Supports HDR. + BitField<29, 1, u32> support_hdr; + /// Display location. + BitField<31, 1, u32> display_location; + + u32 raw{}; +}; +static_assert(sizeof(PSFAttributes) == 4); + class ElfInfo { friend class Core::Emulator; @@ -26,6 +68,9 @@ class ElfInfo { std::string app_ver{}; u32 firmware_ver = 0; u32 raw_firmware_ver = 0; + PSFAttributes psf_attributes{}; + + std::filesystem::path splash_path{}; public: static constexpr u32 FW_15 = 0x1500000; @@ -38,6 +83,7 @@ public: static constexpr u32 FW_40 = 0x4000000; static constexpr u32 FW_45 = 0x4500000; static constexpr u32 FW_50 = 0x5000000; + static constexpr u32 FW_55 = 0x5500000; static constexpr u32 FW_80 = 0x8000000; static ElfInfo& Instance() { @@ -68,6 +114,15 @@ public: ASSERT(initialized); return raw_firmware_ver; } + + [[nodiscard]] const PSFAttributes& GetPSFAttributes() const { + ASSERT(initialized); + return psf_attributes; + } + + [[nodiscard]] const std::filesystem::path& GetSplashPath() const { + return splash_path; + } }; } // namespace Common diff --git a/src/common/io_file.cpp b/src/common/io_file.cpp index 067010a26..3efadc6ea 100644 --- a/src/common/io_file.cpp +++ b/src/common/io_file.cpp @@ -125,12 +125,15 @@ namespace { [[nodiscard]] constexpr int ToSeekOrigin(SeekOrigin origin) { switch (origin) { case SeekOrigin::SetOrigin: - default: return SEEK_SET; case SeekOrigin::CurrentPosition: return SEEK_CUR; case SeekOrigin::End: return SEEK_END; + default: + LOG_ERROR(Common_Filesystem, "Unsupported origin {}, defaulting to SEEK_SET", + static_cast(origin)); + return SEEK_SET; } } @@ -377,20 +380,6 @@ bool IOFile::Seek(s64 offset, SeekOrigin origin) const { return false; } - if (False(file_access_mode & (FileAccessMode::Write | FileAccessMode::Append))) { - u64 size = GetSize(); - if (origin == SeekOrigin::CurrentPosition && Tell() + offset > size) { - LOG_ERROR(Common_Filesystem, "Seeking past the end of the file"); - return false; - } else if (origin == SeekOrigin::SetOrigin && (u64)offset > size) { - LOG_ERROR(Common_Filesystem, "Seeking past the end of the file"); - return false; - } else if (origin == SeekOrigin::End && offset > 0) { - LOG_ERROR(Common_Filesystem, "Seeking past the end of the file"); - return false; - } - } - errno = 0; const auto seek_result = fseeko(file, offset, ToSeekOrigin(origin)) == 0; diff --git a/src/common/io_file.h b/src/common/io_file.h index 45787a092..fb20a2bc5 100644 --- a/src/common/io_file.h +++ b/src/common/io_file.h @@ -61,6 +61,8 @@ enum class SeekOrigin : u32 { SetOrigin, // Seeks from the start of the file. CurrentPosition, // Seeks from the current file pointer position. End, // Seeks from the end of the file. + SeekHole, // Seeks from the start of the next hole in the file. + SeekData, // Seeks from the start of the next non-hole region in the file. }; class IOFile final { diff --git a/src/common/logging/backend.cpp b/src/common/logging/backend.cpp index 7802977f5..c16a5399a 100644 --- a/src/common/logging/backend.cpp +++ b/src/common/logging/backend.cpp @@ -139,8 +139,9 @@ public: std::filesystem::create_directory(log_dir); Filter filter; filter.ParseFilterString(Config::getLogFilter()); - instance = std::unique_ptr(new Impl(log_dir / LOG_FILE, filter), - Deleter); + const auto& log_file_path = log_file.empty() ? LOG_FILE : log_file; + instance = std::unique_ptr( + new Impl(log_dir / log_file_path, filter), Deleter); initialization_in_progress_suppress_logging = false; } diff --git a/src/common/logging/filter.cpp b/src/common/logging/filter.cpp index a2fd2c0a4..bed7802ed 100644 --- a/src/common/logging/filter.cpp +++ b/src/common/logging/filter.cpp @@ -80,6 +80,7 @@ bool ParseFilterRule(Filter& instance, Iterator begin, Iterator end) { SUB(Kernel, Sce) \ CLS(Lib) \ SUB(Lib, LibC) \ + SUB(Lib, LibcInternal) \ SUB(Lib, Kernel) \ SUB(Lib, Pad) \ SUB(Lib, GnmDriver) \ @@ -95,12 +96,16 @@ bool ParseFilterRule(Filter& instance, Iterator begin, Iterator end) { SUB(Lib, SaveData) \ SUB(Lib, SaveDataDialog) \ SUB(Lib, Http) \ + SUB(Lib, Http2) \ SUB(Lib, Ssl) \ + SUB(Lib, Ssl2) \ SUB(Lib, SysModule) \ SUB(Lib, Move) \ + SUB(Lib, NpCommon) \ SUB(Lib, NpManager) \ SUB(Lib, NpScore) \ SUB(Lib, NpTrophy) \ + SUB(Lib, NpWebApi) \ SUB(Lib, Screenshot) \ SUB(Lib, LibCInternal) \ SUB(Lib, AppContent) \ @@ -126,6 +131,11 @@ bool ParseFilterRule(Filter& instance, Iterator begin, Iterator end) { SUB(Lib, Vdec2) \ SUB(Lib, Videodec) \ SUB(Lib, RazorCpu) \ + SUB(Lib, Mouse) \ + SUB(Lib, WebBrowserDialog) \ + SUB(Lib, NpParty) \ + SUB(Lib, Zlib) \ + SUB(Lib, Hmd) \ CLS(Frontend) \ CLS(Render) \ SUB(Render, Vulkan) \ diff --git a/src/common/logging/text_formatter.cpp b/src/common/logging/text_formatter.cpp index 5f6c2172d..b4fa204bc 100644 --- a/src/common/logging/text_formatter.cpp +++ b/src/common/logging/text_formatter.cpp @@ -23,8 +23,8 @@ std::string FormatLogMessage(const Entry& entry) { const char* class_name = GetLogClassName(entry.log_class); const char* level_name = GetLevelName(entry.log_level); - return fmt::format("[{}] <{}> {}:{}:{}: {}", class_name, level_name, entry.filename, - entry.function, entry.line_num, entry.message); + return fmt::format("[{}] <{}> {}:{} {}: {}", class_name, level_name, entry.filename, + entry.line_num, entry.function, entry.message); } void PrintMessage(const Entry& entry) { diff --git a/src/common/logging/types.h b/src/common/logging/types.h index 5b496d175..c07efbc0d 100644 --- a/src/common/logging/types.h +++ b/src/common/logging/types.h @@ -47,6 +47,7 @@ enum class Class : u8 { Lib, ///< HLE implementation of system library. Each major library ///< should have its own subclass. Lib_LibC, ///< The LibC implementation. + Lib_LibcInternal, ///< The LibcInternal implementation. Lib_Kernel, ///< The LibKernel implementation. Lib_Pad, ///< The LibScePad implementation. Lib_GnmDriver, ///< The LibSceGnmDriver implementation. @@ -63,11 +64,15 @@ enum class Class : u8 { Lib_SaveData, ///< The LibSceSaveData implementation. Lib_SaveDataDialog, ///< The LibSceSaveDataDialog implementation. Lib_Ssl, ///< The LibSceSsl implementation. + Lib_Ssl2, ///< The LibSceSsl2 implementation. Lib_Http, ///< The LibSceHttp implementation. + Lib_Http2, ///< The LibSceHttp2 implementation. Lib_SysModule, ///< The LibSceSysModule implementation + Lib_NpCommon, ///< The LibSceNpCommon implementation Lib_NpManager, ///< The LibSceNpManager implementation Lib_NpScore, ///< The LibSceNpScore implementation Lib_NpTrophy, ///< The LibSceNpTrophy implementation + Lib_NpWebApi, ///< The LibSceWebApi implementation Lib_Screenshot, ///< The LibSceScreenshot implementation Lib_LibCInternal, ///< The LibCInternal implementation. Lib_AppContent, ///< The LibSceAppContent implementation. @@ -93,6 +98,11 @@ enum class Class : u8 { Lib_Vdec2, ///< The LibSceVideodec2 implementation. Lib_Videodec, ///< The LibSceVideodec implementation. Lib_RazorCpu, ///< The LibRazorCpu implementation. + Lib_Mouse, ///< The LibSceMouse implementation + Lib_WebBrowserDialog, ///< The LibSceWebBrowserDialog implementation + Lib_NpParty, ///< The LibSceNpParty implementation + Lib_Zlib, ///< The LibSceZlib implementation. + Lib_Hmd, ///< The LibSceHmd implementation. Frontend, ///< Emulator UI Render, ///< Video Core Render_Vulkan, ///< Vulkan backend diff --git a/src/common/memory_patcher.cpp b/src/common/memory_patcher.cpp index 6b79edb9f..2a8b26acb 100644 --- a/src/common/memory_patcher.cpp +++ b/src/common/memory_patcher.cpp @@ -7,6 +7,7 @@ #include #include #ifdef ENABLE_QT_GUI +#include #include #include #include @@ -143,37 +144,38 @@ void OnGameLoaded() { std::string type = patchLineIt->attribute("Type").value(); std::string address = patchLineIt->attribute("Address").value(); std::string patchValue = patchLineIt->attribute("Value").value(); - std::string maskOffsetStr = patchLineIt->attribute("type").value(); - - patchValue = convertValueToHex(type, patchValue); + std::string maskOffsetStr = patchLineIt->attribute("Offset").value(); + std::string targetStr = ""; + std::string sizeStr = ""; + if (type == "mask_jump32") { + targetStr = patchLineIt->attribute("Target").value(); + sizeStr = patchLineIt->attribute("Size").value(); + } else { + patchValue = convertValueToHex(type, patchValue); + } bool littleEndian = false; - if (type == "bytes16") { - littleEndian = true; - } else if (type == "bytes32") { - littleEndian = true; - } else if (type == "bytes64") { + if (type == "bytes16" || type == "bytes32" || type == "bytes64") { littleEndian = true; } MemoryPatcher::PatchMask patchMask = MemoryPatcher::PatchMask::None; int maskOffsetValue = 0; - if (type == "mask") { + 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.empty()) - maskOffsetValue = std::stoi(maskOffsetStr, 0, 10); - } - if (type == "mask_jump32") patchMask = MemoryPatcher::PatchMask::Mask_Jump32; - MemoryPatcher::PatchMemory(currentPatchName, address, patchValue, false, - littleEndian, patchMask); + if (type == "mask" || type == "mask_jump32" && !maskOffsetStr.empty()) { + maskOffsetValue = std::stoi(maskOffsetStr, 0, 10); + } + + MemoryPatcher::PatchMemory(currentPatchName, address, patchValue, + targetStr, sizeStr, false, littleEndian, + patchMask, maskOffsetValue); } } } @@ -189,14 +191,16 @@ void OnGameLoaded() { // We use the QT headers for the xml and json parsing, this define is only true on QT builds QString patchDir; Common::FS::PathToQString(patchDir, Common::FS::GetUserPath(Common::FS::PathType::PatchesDir)); - QString repositories[] = {"GoldHEN", "shadPS4"}; + QDir dir(patchDir); + QStringList folders = dir.entryList(QDir::Dirs | QDir::NoDotAndDotDot); - for (const QString& repository : repositories) { - QString filesJsonPath = patchDir + "/" + repository + "/files.json"; + for (const QString& folder : folders) { + QString filesJsonPath = patchDir + "/" + folder + "/files.json"; QFile jsonFile(filesJsonPath); if (!jsonFile.open(QIODevice::ReadOnly)) { - LOG_ERROR(Loader, "Unable to open files.json for reading."); + LOG_ERROR(Loader, "Unable to open files.json for reading in repository {}", + folder.toStdString()); continue; } @@ -220,11 +224,12 @@ void OnGameLoaded() { } if (selectedFileName.isEmpty()) { - LOG_ERROR(Loader, "No patch file found for the current serial."); + LOG_ERROR(Loader, "No patch file found for the current serial in repository {}", + folder.toStdString()); continue; } - QString filePath = patchDir + "/" + repository + "/" + selectedFileName; + QString filePath = patchDir + "/" + folder + "/" + selectedFileName; QFile file(filePath); if (!file.open(QIODevice::ReadOnly | QIODevice::Text)) { LOG_ERROR(Loader, "Unable to open the file for reading."); @@ -274,6 +279,11 @@ void OnGameLoaded() { lineObject["Type"] = attributes.value("Type").toString(); lineObject["Address"] = attributes.value("Address").toString(); lineObject["Value"] = attributes.value("Value").toString(); + lineObject["Offset"] = attributes.value("Offset").toString(); + if (lineObject["Type"].toString() == "mask_jump32") { + lineObject["Target"] = attributes.value("Target").toString(); + lineObject["Size"] = attributes.value("Size").toString(); + } linesArray.append(lineObject); } } @@ -287,37 +297,39 @@ void OnGameLoaded() { QString patchValue = lineObject["Value"].toString(); QString maskOffsetStr = lineObject["Offset"].toString(); - patchValue = QString::fromStdString( - convertValueToHex(type.toStdString(), patchValue.toStdString())); + QString targetStr; + QString sizeStr; + if (type == "mask_jump32") { + targetStr = lineObject["Target"].toString(); + sizeStr = lineObject["Size"].toString(); + } else { + patchValue = QString::fromStdString(convertValueToHex( + type.toStdString(), patchValue.toStdString())); + } bool littleEndian = false; - if (type == "bytes16") { + if (type == "bytes16" || type == "bytes32" || type == "bytes64") 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") { + 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 (type == "mask" || + type == "mask_jump32" && !maskOffsetStr.toStdString().empty()) { + maskOffsetValue = std::stoi(maskOffsetStr.toStdString(), 0, 10); + } + + MemoryPatcher::PatchMemory( + currentPatchName, address.toStdString(), patchValue.toStdString(), + targetStr.toStdString(), sizeStr.toStdString(), false, littleEndian, + patchMask, maskOffsetValue); } } } @@ -346,7 +358,7 @@ void ApplyPendingPatches() { if (currentPatch.gameSerial != g_game_serial) continue; - PatchMemory(currentPatch.modNameStr, currentPatch.offsetStr, currentPatch.valueStr, + PatchMemory(currentPatch.modNameStr, currentPatch.offsetStr, currentPatch.valueStr, "", "", currentPatch.isOffset, currentPatch.littleEndian, currentPatch.patchMask, currentPatch.maskOffset); } @@ -354,8 +366,9 @@ void ApplyPendingPatches() { pending_patches.clear(); } -void PatchMemory(std::string modNameStr, std::string offsetStr, std::string valueStr, bool isOffset, - bool littleEndian, PatchMask patchMask, int maskOffset) { +void PatchMemory(std::string modNameStr, std::string offsetStr, std::string valueStr, + std::string targetStr, std::string sizeStr, bool isOffset, bool littleEndian, + PatchMask patchMask, int maskOffset) { // Send a request to modify the process memory. void* cheatAddress = nullptr; @@ -372,7 +385,83 @@ void PatchMemory(std::string modNameStr, std::string offsetStr, std::string valu cheatAddress = reinterpret_cast(PatternScan(offsetStr) + maskOffset); } - // TODO: implement mask_jump32 + if (patchMask == PatchMask::Mask_Jump32) { + int jumpSize = std::stoi(sizeStr); + + constexpr int MAX_PATTERN_LENGTH = 256; + if (jumpSize < 5) { + LOG_ERROR(Loader, "Jump size must be at least 5 bytes"); + return; + } + if (jumpSize > MAX_PATTERN_LENGTH) { + LOG_ERROR(Loader, "Jump size must be no more than {} bytes.", MAX_PATTERN_LENGTH); + return; + } + + // Find the base address using "Address" + uintptr_t baseAddress = PatternScan(offsetStr); + if (baseAddress == 0) { + LOG_ERROR(Loader, "PatternScan failed for mask_jump32 with pattern: {}", offsetStr); + return; + } + uintptr_t patchAddress = baseAddress + maskOffset; + + // Fills the original region (jumpSize bytes) with NOPs + std::vector nopBytes(jumpSize, 0x90); + std::memcpy(reinterpret_cast(patchAddress), nopBytes.data(), nopBytes.size()); + + // Use "Target" to locate the start of the code cave + uintptr_t jump_target = PatternScan(targetStr); + if (jump_target == 0) { + LOG_ERROR(Loader, "PatternScan failed to Target with pattern: {}", targetStr); + return; + } + + // Converts the Value attribute to a byte array (payload) + std::vector payload; + for (size_t i = 0; i < valueStr.length(); i += 2) { + + std::string tempStr = valueStr.substr(i, 2); + const char* byteStr = tempStr.c_str(); + char* endPtr; + unsigned int byteVal = std::strtoul(byteStr, &endPtr, 16); + + if (endPtr != byteStr + 2) { + LOG_ERROR(Loader, "Invalid byte in Value: {}", valueStr.substr(i, 2)); + return; + } + payload.push_back(static_cast(byteVal)); + } + + // Calculates the end of the code cave (where the return jump will be inserted) + uintptr_t code_cave_end = jump_target + payload.size(); + + // Write the payload to the code cave, from jump_target + std::memcpy(reinterpret_cast(jump_target), payload.data(), payload.size()); + + // Inserts the initial jump in the original region to divert to the code cave + u8 jumpInstruction[5]; + jumpInstruction[0] = 0xE9; + s32 relJump = static_cast(jump_target - patchAddress - 5); + std::memcpy(&jumpInstruction[1], &relJump, sizeof(relJump)); + std::memcpy(reinterpret_cast(patchAddress), jumpInstruction, + sizeof(jumpInstruction)); + + // Inserts jump back at the end of the code cave to resume execution after patching + u8 jumpBack[5]; + jumpBack[0] = 0xE9; + // Calculates the relative offset to return to the instruction immediately following the + // overwritten region + s32 target_return = static_cast((patchAddress + jumpSize) - (code_cave_end + 5)); + std::memcpy(&jumpBack[1], &target_return, sizeof(target_return)); + std::memcpy(reinterpret_cast(code_cave_end), jumpBack, sizeof(jumpBack)); + + LOG_INFO(Loader, + "Applied Patch mask_jump32: {}, PatchAddress: {:#x}, JumpTarget: {:#x}, " + "CodeCaveEnd: {:#x}, JumpSize: {}", + modNameStr, patchAddress, jump_target, code_cave_end, jumpSize); + return; + } if (cheatAddress == nullptr) { LOG_ERROR(Loader, "Failed to get address for patch {}", modNameStr); @@ -443,4 +532,4 @@ uintptr_t PatternScan(const std::string& signature) { return 0; } -} // namespace MemoryPatcher \ No newline at end of file +} // namespace MemoryPatcher diff --git a/src/common/memory_patcher.h b/src/common/memory_patcher.h index 899ffccb1..29045a6a2 100644 --- a/src/common/memory_patcher.h +++ b/src/common/memory_patcher.h @@ -38,8 +38,9 @@ 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); +void PatchMemory(std::string modNameStr, std::string offsetStr, std::string valueStr, + std::string targetStr, std::string sizeStr, 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); diff --git a/src/common/path_util.cpp b/src/common/path_util.cpp index 53eb123dc..702d0fabc 100644 --- a/src/common/path_util.cpp +++ b/src/common/path_util.cpp @@ -1,6 +1,7 @@ // SPDX-FileCopyrightText: Copyright 2024 shadPS4 Emulator Project // SPDX-License-Identifier: GPL-2.0-or-later +#include #include #include "common/logging/log.h" #include "common/path_util.h" @@ -16,6 +17,8 @@ #ifdef _WIN32 // This is the maximum number of UTF-16 code units permissible in Windows file paths #define MAX_PATH 260 +#include +#include #else // This is the maximum number of UTF-8 code units permissible in all other OSes' file paths #define MAX_PATH 1024 @@ -105,6 +108,10 @@ static auto UserPaths = [] { } else { user_dir = std::filesystem::path(getenv("HOME")) / ".local" / "share" / "shadPS4"; } +#elif _WIN32 + TCHAR appdata[MAX_PATH] = {0}; + SHGetFolderPath(NULL, CSIDL_APPDATA, NULL, 0, appdata); + user_dir = std::filesystem::path(appdata) / "shadPS4"; #endif } @@ -128,6 +135,22 @@ static auto UserPaths = [] { create_path(PathType::CheatsDir, user_dir / CHEATS_DIR); create_path(PathType::PatchesDir, user_dir / PATCHES_DIR); create_path(PathType::MetaDataDir, user_dir / METADATA_DIR); + create_path(PathType::CustomTrophy, user_dir / CUSTOM_TROPHY); + + std::ofstream notice_file(user_dir / CUSTOM_TROPHY / "Notice.txt"); + if (notice_file.is_open()) { + notice_file + << "++++++++++++++++++++++++++++++++\n+ Custom Trophy Images / Sound " + "+\n++++++++++++++++++++++++++++++++\n\nYou can add custom images to the " + "trophies.\n*We recommend a square resolution image, for example 200x200, 500x500, " + "the same size as the height and width.\nIn this folder ('user\\custom_trophy'), " + "add the files with the following " + "names:\n\nbronze.png\nsilver.png\ngold.png\nplatinum.png\n\nYou can add a custom " + "sound for trophy notifications.\n*By default, no audio is played unless it is in " + "this folder and you are using the QT version.\nIn this folder " + "('user\\custom_trophy'), add the files with the following names:\n\ntrophy.mp3"; + notice_file.close(); + } return paths; }(); @@ -176,6 +199,34 @@ void SetUserPath(PathType shad_path, const fs::path& new_path) { UserPaths.insert_or_assign(shad_path, new_path); } +std::optional FindGameByID(const fs::path& dir, const std::string& game_id, + int max_depth) { + if (max_depth < 0) { + return std::nullopt; + } + + // Check if this is the game we're looking for + if (dir.filename() == game_id && fs::exists(dir / "sce_sys" / "param.sfo")) { + auto eboot_path = dir / "eboot.bin"; + if (fs::exists(eboot_path)) { + return eboot_path; + } + } + + // Recursively search subdirectories + std::error_code ec; + for (const auto& entry : fs::directory_iterator(dir, ec)) { + if (!entry.is_directory()) { + continue; + } + if (auto found = FindGameByID(entry.path(), game_id, max_depth - 1)) { + return found; + } + } + + return std::nullopt; +} + #ifdef ENABLE_QT_GUI void PathToQString(QString& result, const std::filesystem::path& path) { #ifdef _WIN32 @@ -194,4 +245,4 @@ std::filesystem::path PathFromQString(const QString& path) { } #endif -} // namespace Common::FS \ No newline at end of file +} // namespace Common::FS diff --git a/src/common/path_util.h b/src/common/path_util.h index 09b7a3337..2fd9b1588 100644 --- a/src/common/path_util.h +++ b/src/common/path_util.h @@ -4,6 +4,7 @@ #pragma once #include +#include #include #ifdef ENABLE_QT_GUI @@ -26,6 +27,7 @@ enum class PathType { CheatsDir, // Where cheats are stored. PatchesDir, // Where patches are stored. MetaDataDir, // Where game metadata (e.g. trophies and menu backgrounds) is stored. + CustomTrophy, // Where custom files for trophies are stored. }; constexpr auto PORTABLE_DIR = "user"; @@ -43,6 +45,7 @@ constexpr auto CAPTURES_DIR = "captures"; constexpr auto CHEATS_DIR = "cheats"; constexpr auto PATCHES_DIR = "patches"; constexpr auto METADATA_DIR = "game_data"; +constexpr auto CUSTOM_TROPHY = "custom_trophy"; // Filenames constexpr auto LOG_FILE = "shad_log.txt"; @@ -115,4 +118,18 @@ void PathToQString(QString& result, const std::filesystem::path& path); [[nodiscard]] std::filesystem::path PathFromQString(const QString& path); #endif +/** + * Recursively searches for a game directory by its ID. + * Limits search depth to prevent excessive filesystem traversal. + * + * @param dir Base directory to start the search from + * @param game_id The game ID to search for + * @param max_depth Maximum directory depth to search + * + * @returns Path to eboot.bin if found, std::nullopt otherwise + */ +[[nodiscard]] std::optional FindGameByID(const std::filesystem::path& dir, + const std::string& game_id, + int max_depth); + } // namespace Common::FS diff --git a/src/common/polyfill_thread.h b/src/common/polyfill_thread.h index 12e59a893..ca0481055 100644 --- a/src/common/polyfill_thread.h +++ b/src/common/polyfill_thread.h @@ -339,7 +339,9 @@ void CondvarWait(Condvar& cv, std::unique_lock& lk, std::stop_token token, } std::stop_callback callback(token, [&] { - { std::scoped_lock lk2{*lk.mutex()}; } + { + std::scoped_lock lk2{*lk.mutex()}; + } cv.notify_all(); }); diff --git a/src/common/scm_rev.cpp.in b/src/common/scm_rev.cpp.in index 642e6373d..2de04e0be 100644 --- a/src/common/scm_rev.cpp.in +++ b/src/common/scm_rev.cpp.in @@ -6,14 +6,18 @@ #define GIT_REV "@GIT_REV@" #define GIT_BRANCH "@GIT_BRANCH@" #define GIT_DESC "@GIT_DESC@" +#define GIT_REMOTE_NAME "@GIT_REMOTE_NAME@" +#define GIT_REMOTE_URL "@GIT_REMOTE_URL@" #define BUILD_DATE "@BUILD_DATE@" namespace Common { -const char g_scm_rev[] = GIT_REV; -const char g_scm_branch[] = GIT_BRANCH; -const char g_scm_desc[] = GIT_DESC; -const char g_scm_date[] = BUILD_DATE; +const char g_scm_rev[] = GIT_REV; +const char g_scm_branch[] = GIT_BRANCH; +const char g_scm_desc[] = GIT_DESC; +const char g_scm_remote_name[] = GIT_REMOTE_NAME; +const char g_scm_remote_url[] = GIT_REMOTE_URL; +const char g_scm_date[] = BUILD_DATE; } // namespace diff --git a/src/common/scm_rev.h b/src/common/scm_rev.h index 005099d2d..f38efff42 100644 --- a/src/common/scm_rev.h +++ b/src/common/scm_rev.h @@ -8,6 +8,8 @@ namespace Common { extern const char g_scm_rev[]; extern const char g_scm_branch[]; extern const char g_scm_desc[]; +extern const char g_scm_remote_name[]; +extern const char g_scm_remote_url[]; extern const char g_scm_date[]; } // namespace Common diff --git a/src/common/sha1.h b/src/common/sha1.h new file mode 100644 index 000000000..fad849dcc --- /dev/null +++ b/src/common/sha1.h @@ -0,0 +1,180 @@ +// SPDX-FileCopyrightText: 2012 SAURAV MOHAPATRA +// SPDX-License-Identifier: MIT + +#pragma once + +#include +#include +#include + +namespace sha1 { +class SHA1 { +public: + typedef uint32_t digest32_t[5]; + typedef uint8_t digest8_t[20]; + inline static uint32_t LeftRotate(uint32_t value, size_t count) { + return (value << count) ^ (value >> (32 - count)); + } + SHA1() { + reset(); + } + virtual ~SHA1() {} + SHA1(const SHA1& s) { + *this = s; + } + const SHA1& operator=(const SHA1& s) { + memcpy(m_digest, s.m_digest, 5 * sizeof(uint32_t)); + memcpy(m_block, s.m_block, 64); + m_blockByteIndex = s.m_blockByteIndex; + m_byteCount = s.m_byteCount; + return *this; + } + SHA1& reset() { + m_digest[0] = 0x67452301; + m_digest[1] = 0xEFCDAB89; + m_digest[2] = 0x98BADCFE; + m_digest[3] = 0x10325476; + m_digest[4] = 0xC3D2E1F0; + m_blockByteIndex = 0; + m_byteCount = 0; + return *this; + } + SHA1& processByte(uint8_t octet) { + this->m_block[this->m_blockByteIndex++] = octet; + ++this->m_byteCount; + if (m_blockByteIndex == 64) { + this->m_blockByteIndex = 0; + processBlock(); + } + return *this; + } + SHA1& processBlock(const void* const start, const void* const end) { + const uint8_t* begin = static_cast(start); + const uint8_t* finish = static_cast(end); + while (begin != finish) { + processByte(*begin); + begin++; + } + return *this; + } + SHA1& processBytes(const void* const data, size_t len) { + const uint8_t* block = static_cast(data); + processBlock(block, block + len); + return *this; + } + const uint32_t* getDigest(digest32_t digest) { + size_t bitCount = this->m_byteCount * 8; + processByte(0x80); + if (this->m_blockByteIndex > 56) { + while (m_blockByteIndex != 0) { + processByte(0); + } + while (m_blockByteIndex < 56) { + processByte(0); + } + } else { + while (m_blockByteIndex < 56) { + processByte(0); + } + } + processByte(0); + processByte(0); + processByte(0); + processByte(0); + processByte(static_cast((bitCount >> 24) & 0xFF)); + processByte(static_cast((bitCount >> 16) & 0xFF)); + processByte(static_cast((bitCount >> 8) & 0xFF)); + processByte(static_cast((bitCount) & 0xFF)); + + memcpy(digest, m_digest, 5 * sizeof(uint32_t)); + return digest; + } + const uint8_t* getDigestBytes(digest8_t digest) { + digest32_t d32; + getDigest(d32); + size_t di = 0; + digest[di++] = ((d32[0] >> 24) & 0xFF); + digest[di++] = ((d32[0] >> 16) & 0xFF); + digest[di++] = ((d32[0] >> 8) & 0xFF); + digest[di++] = ((d32[0]) & 0xFF); + + digest[di++] = ((d32[1] >> 24) & 0xFF); + digest[di++] = ((d32[1] >> 16) & 0xFF); + digest[di++] = ((d32[1] >> 8) & 0xFF); + digest[di++] = ((d32[1]) & 0xFF); + + digest[di++] = ((d32[2] >> 24) & 0xFF); + digest[di++] = ((d32[2] >> 16) & 0xFF); + digest[di++] = ((d32[2] >> 8) & 0xFF); + digest[di++] = ((d32[2]) & 0xFF); + + digest[di++] = ((d32[3] >> 24) & 0xFF); + digest[di++] = ((d32[3] >> 16) & 0xFF); + digest[di++] = ((d32[3] >> 8) & 0xFF); + digest[di++] = ((d32[3]) & 0xFF); + + digest[di++] = ((d32[4] >> 24) & 0xFF); + digest[di++] = ((d32[4] >> 16) & 0xFF); + digest[di++] = ((d32[4] >> 8) & 0xFF); + digest[di++] = ((d32[4]) & 0xFF); + return digest; + } + +protected: + void processBlock() { + uint32_t w[80]; + for (size_t i = 0; i < 16; i++) { + w[i] = (m_block[i * 4 + 0] << 24); + w[i] |= (m_block[i * 4 + 1] << 16); + w[i] |= (m_block[i * 4 + 2] << 8); + w[i] |= (m_block[i * 4 + 3]); + } + for (size_t i = 16; i < 80; i++) { + w[i] = LeftRotate((w[i - 3] ^ w[i - 8] ^ w[i - 14] ^ w[i - 16]), 1); + } + + uint32_t a = m_digest[0]; + uint32_t b = m_digest[1]; + uint32_t c = m_digest[2]; + uint32_t d = m_digest[3]; + uint32_t e = m_digest[4]; + + for (std::size_t i = 0; i < 80; ++i) { + uint32_t f = 0; + uint32_t k = 0; + + if (i < 20) { + f = (b & c) | (~b & d); + k = 0x5A827999; + } else if (i < 40) { + f = b ^ c ^ d; + k = 0x6ED9EBA1; + } else if (i < 60) { + f = (b & c) | (b & d) | (c & d); + k = 0x8F1BBCDC; + } else { + f = b ^ c ^ d; + k = 0xCA62C1D6; + } + uint32_t temp = LeftRotate(a, 5) + f + e + k + w[i]; + e = d; + d = c; + c = LeftRotate(b, 30); + b = a; + a = temp; + } + + m_digest[0] += a; + m_digest[1] += b; + m_digest[2] += c; + m_digest[3] += d; + m_digest[4] += e; + } + +private: + digest32_t m_digest; + uint8_t m_block[64]; + size_t m_blockByteIndex; + size_t m_byteCount; +}; +} // namespace sha1 diff --git a/src/common/string_literal.h b/src/common/string_literal.h new file mode 100644 index 000000000..9f64f62bd --- /dev/null +++ b/src/common/string_literal.h @@ -0,0 +1,15 @@ +// SPDX-FileCopyrightText: Copyright 2024 shadPS4 Emulator Project +// SPDX-License-Identifier: GPL-2.0-or-later + +#pragma once + +template +struct StringLiteral { + static constexpr size_t len = N; + + constexpr StringLiteral(const C (&str)[N]) { + std::copy_n(str, N, value); + } + + C value[N]{}; +}; diff --git a/src/common/thread.cpp b/src/common/thread.cpp index c87aea6ef..9ef1e86d8 100644 --- a/src/common/thread.cpp +++ b/src/common/thread.cpp @@ -41,7 +41,7 @@ void SetCurrentThreadRealtime(const std::chrono::nanoseconds period_ns) { const std::chrono::nanoseconds computation_ns = period_ns / 2; // Determine the timebase for converting time to ticks. - struct mach_timebase_info timebase {}; + struct mach_timebase_info timebase{}; mach_timebase_info(&timebase); const auto ticks_per_ns = static_cast(timebase.denom) / static_cast(timebase.numer); diff --git a/src/common/thread.h b/src/common/thread.h index 175ba9445..92cc0c59d 100644 --- a/src/common/thread.h +++ b/src/common/thread.h @@ -37,6 +37,10 @@ public: void Start(); void End(); + + std::chrono::nanoseconds GetTotalWait() const { + return total_wait; + } }; } // namespace Common diff --git a/src/common/version.h b/src/common/version.h index c903b1db6..652f36e6d 100644 --- a/src/common/version.h +++ b/src/common/version.h @@ -8,7 +8,7 @@ namespace Common { -constexpr char VERSION[] = "0.5.1 WIP"; +constexpr char VERSION[] = "0.7.1 WIP"; constexpr bool isRelease = false; } // namespace Common diff --git a/src/core/address_space.cpp b/src/core/address_space.cpp index 2b7331cbd..2e66bdf83 100644 --- a/src/core/address_space.cpp +++ b/src/core/address_space.cpp @@ -21,7 +21,8 @@ #if defined(__APPLE__) && defined(ARCH_X86_64) // Reserve space for the system address space using a zerofill section. -asm(".zerofill GUEST_SYSTEM,GUEST_SYSTEM,__guest_system,0xFBFC00000"); +asm(".zerofill SYSTEM_MANAGED,SYSTEM_MANAGED,__SYSTEM_MANAGED,0x7FFBFC000"); +asm(".zerofill SYSTEM_RESERVED,SYSTEM_RESERVED,__SYSTEM_RESERVED,0x7C0004000"); #endif namespace Core { @@ -67,28 +68,25 @@ struct AddressSpace::Impl { static constexpr size_t ReductionOnFail = 1_GB; static constexpr size_t MaxReductions = 10; - size_t reduction = 0; size_t virtual_size = SystemManagedSize + SystemReservedSize + UserSize; for (u32 i = 0; i < MaxReductions; i++) { - virtual_base = static_cast(VirtualAlloc2(process, NULL, virtual_size - reduction, + virtual_base = static_cast(VirtualAlloc2(process, NULL, virtual_size, MEM_RESERVE | MEM_RESERVE_PLACEHOLDER, PAGE_NOACCESS, ¶m, 1)); if (virtual_base) { break; } - reduction += ReductionOnFail; + virtual_size -= ReductionOnFail; } ASSERT_MSG(virtual_base, "Unable to reserve virtual address space: {}", Common::GetLastErrorMsg()); - // Take the reduction off of the system managed area, and leave the others unchanged. - reduction = size_t(virtual_base - SYSTEM_MANAGED_MIN); - system_managed_base = virtual_base; - system_managed_size = SystemManagedSize - reduction; system_reserved_base = reinterpret_cast(SYSTEM_RESERVED_MIN); system_reserved_size = SystemReservedSize; + system_managed_base = virtual_base; + system_managed_size = system_reserved_base - virtual_base; user_base = reinterpret_cast(USER_MIN); - user_size = UserSize; + user_size = virtual_base + virtual_size - user_base; LOG_INFO(Kernel_Vmm, "System managed virtual memory region: {} - {}", fmt::ptr(system_managed_base), @@ -101,10 +99,8 @@ struct AddressSpace::Impl { // Initializer placeholder tracker const uintptr_t system_managed_addr = reinterpret_cast(system_managed_base); - const uintptr_t system_reserved_addr = reinterpret_cast(system_reserved_base); - const uintptr_t user_addr = reinterpret_cast(user_base); regions.emplace(system_managed_addr, - MemoryRegion{system_managed_addr, virtual_size - reduction, false}); + MemoryRegion{system_managed_addr, virtual_size, false}); // Allocate backing file that represents the total physical memory. backing_handle = diff --git a/src/core/cpu_patches.cpp b/src/core/cpu_patches.cpp index b812e5444..a9f6c67a8 100644 --- a/src/core/cpu_patches.cpp +++ b/src/core/cpu_patches.cpp @@ -30,16 +30,6 @@ using namespace Xbyak::util; -#define MAYBE_AVX(OPCODE, ...) \ - [&] { \ - Cpu cpu; \ - if (cpu.has(Cpu::tAVX)) { \ - c.v##OPCODE(__VA_ARGS__); \ - } else { \ - c.OPCODE(__VA_ARGS__); \ - } \ - }() - namespace Core { static Xbyak::Reg ZydisToXbyakRegister(const ZydisRegister reg) { @@ -190,28 +180,44 @@ static void RestoreStack(Xbyak::CodeGenerator& c) { c.mov(rsp, qword[reinterpret_cast(stack_pointer_slot * sizeof(void*))]); } +/// Validates that the dst register is supported given the SaveStack/RestoreStack implementation. +static void ValidateDst(const Xbyak::Reg& dst) { + // No restrictions. +} + #else -// These utilities are not implemented as we can't save anything to thread local storage without -// temporary registers. void InitializeThreadPatchStack() { // No-op } +// NOTE: Since stack pointer here is subtracted through safe zone and not saved anywhere, +// it must not be modified during the instruction. Otherwise, we will not be able to find +// and load registers back from where they were saved. Thus, a limitation is placed on +// instructions, that they must not use the stack pointer register as a destination. + /// Saves the stack pointer to thread local storage and loads the patch stack. static void SaveStack(Xbyak::CodeGenerator& c) { - UNIMPLEMENTED(); + c.lea(rsp, ptr[rsp - 128]); // red zone } /// Restores the stack pointer from thread local storage. static void RestoreStack(Xbyak::CodeGenerator& c) { - UNIMPLEMENTED(); + c.lea(rsp, ptr[rsp + 128]); // red zone +} + +/// Validates that the dst register is supported given the SaveStack/RestoreStack implementation. +static void ValidateDst(const Xbyak::Reg& dst) { + // Stack pointer is not preserved, so it can't be used as a dst. + ASSERT_MSG(dst.getIdx() != rsp.getIdx(), "Stack pointer not supported as destination."); } #endif /// Switches to the patch stack, saves registers, and restores the original stack. static void SaveRegisters(Xbyak::CodeGenerator& c, const std::initializer_list regs) { + // Uses a more robust solution for saving registers on MacOS to avoid potential stack corruption + // if games decide to not follow the ABI and use the red zone. SaveStack(c); for (const auto& reg : regs) { c.push(reg.cvt64()); @@ -235,9 +241,9 @@ static void SaveContext(Xbyak::CodeGenerator& c, bool save_flags = false) { for (int reg = Xbyak::Operand::RAX; reg <= Xbyak::Operand::R15; reg++) { c.push(Xbyak::Reg64(reg)); } - for (int reg = 0; reg <= 7; reg++) { - c.lea(rsp, ptr[rsp - 32]); - c.vmovdqu(ptr[rsp], Xbyak::Ymm(reg)); + c.lea(rsp, ptr[rsp - 32 * 16]); + for (int reg = 0; reg <= 15; reg++) { + c.vmovdqu(ptr[rsp + 32 * reg], Xbyak::Ymm(reg)); } if (save_flags) { c.pushfq(); @@ -251,12 +257,12 @@ static void RestoreContext(Xbyak::CodeGenerator& c, const Xbyak::Operand& dst, if (restore_flags) { c.popfq(); } - for (int reg = 7; reg >= 0; reg--) { + for (int reg = 15; reg >= 0; reg--) { if ((!dst.isXMM() && !dst.isYMM()) || dst.getIdx() != reg) { - c.vmovdqu(Xbyak::Ymm(reg), ptr[rsp]); + c.vmovdqu(Xbyak::Ymm(reg), ptr[rsp + 32 * reg]); } - c.lea(rsp, ptr[rsp + 32]); } + c.lea(rsp, ptr[rsp + 32 * 16]); for (int reg = Xbyak::Operand::R15; reg >= Xbyak::Operand::RAX; reg--) { if (!dst.isREG() || dst.getIdx() != reg) { c.pop(Xbyak::Reg64(reg)); @@ -267,29 +273,50 @@ static void RestoreContext(Xbyak::CodeGenerator& c, const Xbyak::Operand& dst, RestoreStack(c); } -#ifdef __APPLE__ - static void GenerateANDN(const ZydisDecodedOperand* operands, Xbyak::CodeGenerator& c) { const auto dst = ZydisToXbyakRegisterOperand(operands[0]); const auto src1 = ZydisToXbyakRegisterOperand(operands[1]); const auto src2 = ZydisToXbyakOperand(operands[2]); + ValidateDst(dst); - const auto scratch = AllocateScratchRegister({&dst, &src1, src2.get()}, dst.getBit()); + // Check if src2 is a memory operand or a register different to dst. + // In those cases, we don't need to use a temporary register and are free to modify dst. + // In cases where dst and src2 are the same register, a temporary needs to be used to avoid + // modifying src2. + bool src2_uses_dst = false; + if (src2->isMEM()) { + const auto base = src2->getAddress().getRegExp().getBase().getIdx(); + const auto index = src2->getAddress().getRegExp().getIndex().getIdx(); + src2_uses_dst = base == dst.getIdx() || index == dst.getIdx(); + } else { + ASSERT(src2->isREG()); + src2_uses_dst = src2->getReg() == dst; + } - SaveRegisters(c, {scratch}); + if (!src2_uses_dst) { + if (dst != src1) + c.mov(dst, src1); + c.not_(dst); + c.and_(dst, *src2); + } else { + const auto scratch = AllocateScratchRegister({&dst, &src1, src2.get()}, dst.getBit()); - c.mov(scratch, src1); - c.not_(scratch); - c.and_(scratch, *src2); - c.mov(dst, scratch); + SaveRegisters(c, {scratch}); - RestoreRegisters(c, {scratch}); + c.mov(scratch, src1); + c.not_(scratch); + c.and_(scratch, *src2); + c.mov(dst, scratch); + + RestoreRegisters(c, {scratch}); + } } static void GenerateBEXTR(const ZydisDecodedOperand* operands, Xbyak::CodeGenerator& c) { const auto dst = ZydisToXbyakRegisterOperand(operands[0]); const auto src = ZydisToXbyakOperand(operands[1]); const auto start_len = ZydisToXbyakRegisterOperand(operands[2]); + ValidateDst(dst); const Xbyak::Reg32e shift(Xbyak::Operand::RCX, static_cast(start_len.getBit())); const auto scratch1 = @@ -327,6 +354,7 @@ static void GenerateBEXTR(const ZydisDecodedOperand* operands, Xbyak::CodeGenera static void GenerateBLSI(const ZydisDecodedOperand* operands, Xbyak::CodeGenerator& c) { const auto dst = ZydisToXbyakRegisterOperand(operands[0]); const auto src = ZydisToXbyakOperand(operands[1]); + ValidateDst(dst); const auto scratch = AllocateScratchRegister({&dst, src.get()}, dst.getBit()); @@ -356,6 +384,7 @@ static void GenerateBLSI(const ZydisDecodedOperand* operands, Xbyak::CodeGenerat static void GenerateBLSMSK(const ZydisDecodedOperand* operands, Xbyak::CodeGenerator& c) { const auto dst = ZydisToXbyakRegisterOperand(operands[0]); const auto src = ZydisToXbyakOperand(operands[1]); + ValidateDst(dst); const auto scratch = AllocateScratchRegister({&dst, src.get()}, dst.getBit()); @@ -384,9 +413,37 @@ static void GenerateBLSMSK(const ZydisDecodedOperand* operands, Xbyak::CodeGener RestoreRegisters(c, {scratch}); } +static void GenerateTZCNT(const ZydisDecodedOperand* operands, Xbyak::CodeGenerator& c) { + const auto dst = ZydisToXbyakRegisterOperand(operands[0]); + const auto src = ZydisToXbyakOperand(operands[1]); + ValidateDst(dst); + + Xbyak::Label src_zero, end; + + c.cmp(*src, 0); + c.je(src_zero); + + // If src is not zero, functions like a BSF, but also clears the CF + c.bsf(dst, *src); + c.clc(); + c.jmp(end); + + c.L(src_zero); + c.mov(dst, operands[0].size); + // Since dst is not zero, also set ZF to zero. Testing dst with itself when we know + // it isn't zero is a good way to do this. + // Use cvt32 to avoid REX/Operand size prefixes. + c.test(dst.cvt32(), dst.cvt32()); + // When source is zero, TZCNT also sets CF. + c.stc(); + + c.L(end); +} + static void GenerateBLSR(const ZydisDecodedOperand* operands, Xbyak::CodeGenerator& c) { const auto dst = ZydisToXbyakRegisterOperand(operands[0]); const auto src = ZydisToXbyakOperand(operands[1]); + ValidateDst(dst); const auto scratch = AllocateScratchRegister({&dst, src.get()}, dst.getBit()); @@ -415,6 +472,8 @@ static void GenerateBLSR(const ZydisDecodedOperand* operands, Xbyak::CodeGenerat RestoreRegisters(c, {scratch}); } +#ifdef __APPLE__ + static __attribute__((sysv_abi)) void PerformVCVTPH2PS(float* out, const half_float::half* in, const u32 count) { for (u32 i = 0; i < count; i++) { @@ -605,6 +664,11 @@ static bool FilterNoSSE4a(const ZydisDecodedOperand*) { return !cpu.has(Cpu::tSSE4a); } +static bool FilterNoBMI1(const ZydisDecodedOperand*) { + Cpu cpu; + return !cpu.has(Cpu::tBMI1); +} + static void GenerateEXTRQ(const ZydisDecodedOperand* operands, Xbyak::CodeGenerator& c) { bool immediateForm = operands[1].type == ZYDIS_OPERAND_TYPE_IMMEDIATE && operands[2].type == ZYDIS_OPERAND_TYPE_IMMEDIATE; @@ -643,7 +707,7 @@ static void GenerateEXTRQ(const ZydisDecodedOperand* operands, Xbyak::CodeGenera ASSERT_MSG(length + index <= 64, "length + index must be less than or equal to 64."); // Get lower qword from xmm register - MAYBE_AVX(movq, scratch1, xmm_dst); + c.vmovq(scratch1, xmm_dst); if (index != 0) { c.shr(scratch1, index); @@ -656,7 +720,7 @@ static void GenerateEXTRQ(const ZydisDecodedOperand* operands, Xbyak::CodeGenera // Writeback to xmm register, extrq instruction says top 64-bits are undefined so we don't // care to preserve them - MAYBE_AVX(movq, xmm_dst, scratch1); + c.vmovq(xmm_dst, scratch1); c.pop(scratch2); c.pop(scratch1); @@ -690,7 +754,7 @@ static void GenerateEXTRQ(const ZydisDecodedOperand* operands, Xbyak::CodeGenera c.push(mask); // Construct the mask out of the length that resides in bottom 6 bits of source xmm - MAYBE_AVX(movq, scratch1, xmm_src); + c.vmovq(scratch1, xmm_src); c.mov(scratch2, scratch1); c.and_(scratch2, 0x3F); c.jz(length_zero); @@ -711,10 +775,10 @@ static void GenerateEXTRQ(const ZydisDecodedOperand* operands, Xbyak::CodeGenera c.and_(scratch1, 0x3F); c.mov(scratch2, scratch1); // cl now contains the shift amount - MAYBE_AVX(movq, scratch1, xmm_dst); + c.vmovq(scratch1, xmm_dst); c.shr(scratch1, cl); c.and_(scratch1, mask); - MAYBE_AVX(movq, xmm_dst, scratch1); + c.vmovq(xmm_dst, scratch1); c.pop(mask); c.pop(scratch2); @@ -765,8 +829,8 @@ static void GenerateINSERTQ(const ZydisDecodedOperand* operands, Xbyak::CodeGene ASSERT_MSG(length + index <= 64, "length + index must be less than or equal to 64."); - MAYBE_AVX(movq, scratch1, xmm_src); - MAYBE_AVX(movq, scratch2, xmm_dst); + c.vmovq(scratch1, xmm_src); + c.vmovq(scratch2, xmm_dst); c.mov(mask, mask_value); // src &= mask @@ -784,12 +848,7 @@ static void GenerateINSERTQ(const ZydisDecodedOperand* operands, Xbyak::CodeGene c.or_(scratch2, scratch1); // Insert scratch2 into low 64 bits of dst, upper 64 bits are unaffected - Cpu cpu; - if (cpu.has(Cpu::tAVX)) { - c.vpinsrq(xmm_dst, xmm_dst, scratch2, 0); - } else { - c.pinsrq(xmm_dst, scratch2, 0); - } + c.vpinsrq(xmm_dst, xmm_dst, scratch2, 0); c.pop(mask); c.pop(scratch2); @@ -816,7 +875,7 @@ static void GenerateINSERTQ(const ZydisDecodedOperand* operands, Xbyak::CodeGene c.push(mask); // Get upper 64 bits of src and copy it to mask and index - MAYBE_AVX(pextrq, index, xmm_src, 1); + c.vpextrq(index, xmm_src, 1); c.mov(mask, index); // When length is 0, set it to 64 @@ -839,7 +898,7 @@ static void GenerateINSERTQ(const ZydisDecodedOperand* operands, Xbyak::CodeGene c.and_(index, 0x3F); // src &= mask - MAYBE_AVX(movq, scratch1, xmm_src); + c.vmovq(scratch1, xmm_src); c.and_(scratch1, mask); // mask = ~(mask << index) @@ -851,12 +910,12 @@ static void GenerateINSERTQ(const ZydisDecodedOperand* operands, Xbyak::CodeGene c.shl(scratch1, cl); // dst = (dst & mask) | src - MAYBE_AVX(movq, scratch2, xmm_dst); + c.vmovq(scratch2, xmm_dst); c.and_(scratch2, mask); c.or_(scratch2, scratch1); // Upper 64 bits are undefined in insertq - MAYBE_AVX(movq, xmm_dst, scratch2); + c.vmovq(xmm_dst, scratch2); c.pop(mask); c.pop(index); @@ -891,14 +950,16 @@ static const std::unordered_map Patches = { {ZYDIS_MNEMONIC_EXTRQ, {FilterNoSSE4a, GenerateEXTRQ, true}}, {ZYDIS_MNEMONIC_INSERTQ, {FilterNoSSE4a, GenerateINSERTQ, true}}, + // BMI1 + {ZYDIS_MNEMONIC_ANDN, {FilterNoBMI1, GenerateANDN, true}}, + {ZYDIS_MNEMONIC_BEXTR, {FilterNoBMI1, GenerateBEXTR, true}}, + {ZYDIS_MNEMONIC_BLSI, {FilterNoBMI1, GenerateBLSI, true}}, + {ZYDIS_MNEMONIC_BLSMSK, {FilterNoBMI1, GenerateBLSMSK, true}}, + {ZYDIS_MNEMONIC_BLSR, {FilterNoBMI1, GenerateBLSR, true}}, + {ZYDIS_MNEMONIC_TZCNT, {FilterNoBMI1, GenerateTZCNT, true}}, + #ifdef __APPLE__ // Patches for instruction sets not supported by Rosetta 2. - // BMI1 - {ZYDIS_MNEMONIC_ANDN, {FilterRosetta2Only, GenerateANDN, true}}, - {ZYDIS_MNEMONIC_BEXTR, {FilterRosetta2Only, GenerateBEXTR, true}}, - {ZYDIS_MNEMONIC_BLSI, {FilterRosetta2Only, GenerateBLSI, true}}, - {ZYDIS_MNEMONIC_BLSMSK, {FilterRosetta2Only, GenerateBLSMSK, true}}, - {ZYDIS_MNEMONIC_BLSR, {FilterRosetta2Only, GenerateBLSR, true}}, // F16C {ZYDIS_MNEMONIC_VCVTPH2PS, {FilterRosetta2Only, GenerateVCVTPH2PS, true}}, {ZYDIS_MNEMONIC_VCVTPS2PH, {FilterRosetta2Only, GenerateVCVTPS2PH, true}}, @@ -1056,10 +1117,10 @@ static bool TryExecuteIllegalInstruction(void* ctx, void* code_address) { if (length + index > 64) { // Undefined behavior if length + index is bigger than 64 according to the spec, // we'll warn and continue execution. - LOG_WARNING(Core, - "extrq at {} with length {} and index {} is bigger than 64, " - "undefined behavior", - fmt::ptr(code_address), length, index); + LOG_TRACE(Core, + "extrq at {} with length {} and index {} is bigger than 64, " + "undefined behavior", + fmt::ptr(code_address), length, index); } lowQWordDst >>= index; @@ -1116,10 +1177,10 @@ static bool TryExecuteIllegalInstruction(void* ctx, void* code_address) { if (length + index > 64) { // Undefined behavior if length + index is bigger than 64 according to the spec, // we'll warn and continue execution. - LOG_WARNING(Core, - "insertq at {} with length {} and index {} is bigger than 64, " - "undefined behavior", - fmt::ptr(code_address), length, index); + LOG_TRACE(Core, + "insertq at {} with length {} and index {} is bigger than 64, " + "undefined behavior", + fmt::ptr(code_address), length, index); } lowQWordSrc &= mask; diff --git a/src/core/crypto/crypto.cpp b/src/core/crypto/crypto.cpp deleted file mode 100644 index 4020edfd8..000000000 --- a/src/core/crypto/crypto.cpp +++ /dev/null @@ -1,215 +0,0 @@ -// SPDX-FileCopyrightText: Copyright 2024 shadPS4 Emulator Project -// SPDX-License-Identifier: GPL-2.0-or-later - -#include - -#include "crypto.h" - -CryptoPP::RSA::PrivateKey Crypto::key_pkg_derived_key3_keyset_init() { - CryptoPP::InvertibleRSAFunction params; - params.SetPrime1(CryptoPP::Integer(PkgDerivedKey3Keyset::Prime1, 0x80)); - params.SetPrime2(CryptoPP::Integer(PkgDerivedKey3Keyset::Prime2, 0x80)); - - params.SetPublicExponent(CryptoPP::Integer(PkgDerivedKey3Keyset::PublicExponent, 4)); - params.SetPrivateExponent(CryptoPP::Integer(PkgDerivedKey3Keyset::PrivateExponent, 0x100)); - - params.SetModPrime1PrivateExponent(CryptoPP::Integer(PkgDerivedKey3Keyset::Exponent1, 0x80)); - params.SetModPrime2PrivateExponent(CryptoPP::Integer(PkgDerivedKey3Keyset::Exponent2, 0x80)); - - params.SetModulus(CryptoPP::Integer(PkgDerivedKey3Keyset::Modulus, 0x100)); - params.SetMultiplicativeInverseOfPrime2ModPrime1( - CryptoPP::Integer(PkgDerivedKey3Keyset::Coefficient, 0x80)); - - CryptoPP::RSA::PrivateKey privateKey(params); - - return privateKey; -} - -CryptoPP::RSA::PrivateKey Crypto::FakeKeyset_keyset_init() { - CryptoPP::InvertibleRSAFunction params; - params.SetPrime1(CryptoPP::Integer(FakeKeyset::Prime1, 0x80)); - params.SetPrime2(CryptoPP::Integer(FakeKeyset::Prime2, 0x80)); - - params.SetPublicExponent(CryptoPP::Integer(FakeKeyset::PublicExponent, 4)); - params.SetPrivateExponent(CryptoPP::Integer(FakeKeyset::PrivateExponent, 0x100)); - - params.SetModPrime1PrivateExponent(CryptoPP::Integer(FakeKeyset::Exponent1, 0x80)); - params.SetModPrime2PrivateExponent(CryptoPP::Integer(FakeKeyset::Exponent2, 0x80)); - - params.SetModulus(CryptoPP::Integer(FakeKeyset::Modulus, 0x100)); - params.SetMultiplicativeInverseOfPrime2ModPrime1( - CryptoPP::Integer(FakeKeyset::Coefficient, 0x80)); - - CryptoPP::RSA::PrivateKey privateKey(params); - - return privateKey; -} - -CryptoPP::RSA::PrivateKey Crypto::DebugRifKeyset_init() { - CryptoPP::InvertibleRSAFunction params; - params.SetPrime1(CryptoPP::Integer(DebugRifKeyset::Prime1, sizeof(DebugRifKeyset::Prime1))); - params.SetPrime2(CryptoPP::Integer(DebugRifKeyset::Prime2, sizeof(DebugRifKeyset::Prime2))); - - params.SetPublicExponent( - CryptoPP::Integer(DebugRifKeyset::PublicExponent, sizeof(DebugRifKeyset::PublicExponent))); - params.SetPrivateExponent(CryptoPP::Integer(DebugRifKeyset::PrivateExponent, - sizeof(DebugRifKeyset::PrivateExponent))); - - params.SetModPrime1PrivateExponent( - CryptoPP::Integer(DebugRifKeyset::Exponent1, sizeof(DebugRifKeyset::Exponent1))); - params.SetModPrime2PrivateExponent( - CryptoPP::Integer(DebugRifKeyset::Exponent2, sizeof(DebugRifKeyset::Exponent2))); - - params.SetModulus(CryptoPP::Integer(DebugRifKeyset::Modulus, sizeof(DebugRifKeyset::Modulus))); - params.SetMultiplicativeInverseOfPrime2ModPrime1( - CryptoPP::Integer(DebugRifKeyset::Coefficient, sizeof(DebugRifKeyset::Coefficient))); - - CryptoPP::RSA::PrivateKey privateKey(params); - - return privateKey; -} - -void Crypto::RSA2048Decrypt(std::span dec_key, - std::span ciphertext, - bool is_dk3) { // RSAES_PKCS1v15_ - // Create an RSA decryptor - CryptoPP::RSA::PrivateKey privateKey; - if (is_dk3) { - privateKey = key_pkg_derived_key3_keyset_init(); - } else { - privateKey = FakeKeyset_keyset_init(); - } - - CryptoPP::RSAES_PKCS1v15_Decryptor rsaDecryptor(privateKey); - - // Allocate memory for the decrypted data - std::array decrypted; - - // Perform the decryption - CryptoPP::AutoSeededRandomPool rng; - CryptoPP::DecodingResult result = - rsaDecryptor.Decrypt(rng, ciphertext.data(), decrypted.size(), decrypted.data()); - std::copy(decrypted.begin(), decrypted.begin() + dec_key.size(), dec_key.begin()); -} - -void Crypto::ivKeyHASH256(std::span cipher_input, - std::span ivkey_result) { - CryptoPP::SHA256 sha256; - std::array hashResult; - auto array_sink = new CryptoPP::ArraySink(hashResult.data(), CryptoPP::SHA256::DIGESTSIZE); - auto filter = new CryptoPP::HashFilter(sha256, array_sink); - CryptoPP::ArraySource r(cipher_input.data(), cipher_input.size(), true, filter); - std::copy(hashResult.begin(), hashResult.begin() + ivkey_result.size(), ivkey_result.begin()); -} - -void Crypto::aesCbcCfb128Decrypt(std::span ivkey, - std::span ciphertext, - std::span decrypted) { - std::array key; - std::array iv; - - std::copy(ivkey.begin() + 16, ivkey.begin() + 16 + key.size(), key.begin()); - std::copy(ivkey.begin(), ivkey.begin() + iv.size(), iv.begin()); - - CryptoPP::AES::Decryption aesDecryption(key.data(), CryptoPP::AES::DEFAULT_KEYLENGTH); - CryptoPP::CBC_Mode_ExternalCipher::Decryption cbcDecryption(aesDecryption, iv.data()); - - for (size_t i = 0; i < decrypted.size(); i += CryptoPP::AES::BLOCKSIZE) { - cbcDecryption.ProcessData(decrypted.data() + i, ciphertext.data() + i, - CryptoPP::AES::BLOCKSIZE); - } -} - -void Crypto::aesCbcCfb128DecryptEntry(std::span ivkey, - std::span ciphertext, - std::span decrypted) { - std::array key; - std::array iv; - - std::copy(ivkey.begin() + 16, ivkey.begin() + 16 + key.size(), key.begin()); - std::copy(ivkey.begin(), ivkey.begin() + iv.size(), iv.begin()); - - CryptoPP::AES::Decryption aesDecryption(key.data(), CryptoPP::AES::DEFAULT_KEYLENGTH); - CryptoPP::CBC_Mode_ExternalCipher::Decryption cbcDecryption(aesDecryption, iv.data()); - - for (size_t i = 0; i < decrypted.size(); i += CryptoPP::AES::BLOCKSIZE) { - cbcDecryption.ProcessData(decrypted.data() + i, ciphertext.data() + i, - CryptoPP::AES::BLOCKSIZE); - } -} - -void Crypto::decryptEFSM(std::span trophyKey, - std::span NPcommID, - std::span efsmIv, std::span ciphertext, - std::span decrypted) { - - // step 1: Encrypt NPcommID - CryptoPP::CBC_Mode::Encryption encrypt; - - std::vector trophyIv(16, 0); - std::vector trpKey(16); - - encrypt.SetKeyWithIV(trophyKey.data(), trophyKey.size(), trophyIv.data()); - encrypt.ProcessData(trpKey.data(), NPcommID.data(), 16); - - // step 2: decrypt efsm. - CryptoPP::CBC_Mode::Decryption decrypt; - decrypt.SetKeyWithIV(trpKey.data(), trpKey.size(), efsmIv.data()); - - for (size_t i = 0; i < decrypted.size(); i += CryptoPP::AES::BLOCKSIZE) { - decrypt.ProcessData(decrypted.data() + i, ciphertext.data() + i, CryptoPP::AES::BLOCKSIZE); - } -} - -void Crypto::PfsGenCryptoKey(std::span ekpfs, - std::span seed, - std::span dataKey, - std::span tweakKey) { - CryptoPP::HMAC hmac(ekpfs.data(), ekpfs.size()); - - CryptoPP::SecByteBlock d(20); // Use Crypto++ SecByteBlock for better memory management - - // Copy the bytes of 'index' to the 'd' array - uint32_t index = 1; - std::memcpy(d, &index, sizeof(uint32_t)); - - // Copy the bytes of 'seed' to the 'd' array starting from index 4 - std::memcpy(d + sizeof(uint32_t), seed.data(), seed.size()); - - // Allocate memory for 'u64' using new - std::vector data_tweak_key(hmac.DigestSize()); - - // Calculate the HMAC - hmac.CalculateDigest(data_tweak_key.data(), d, d.size()); - std::copy(data_tweak_key.begin(), data_tweak_key.begin() + dataKey.size(), tweakKey.begin()); - std::copy(data_tweak_key.begin() + tweakKey.size(), - data_tweak_key.begin() + tweakKey.size() + dataKey.size(), dataKey.begin()); -} - -void Crypto::decryptPFS(std::span dataKey, - std::span tweakKey, std::span src_image, - std::span dst_image, u64 sector) { - // Start at 0x10000 to keep the header when decrypting the whole pfs_image. - for (int i = 0; i < src_image.size(); i += 0x1000) { - const u64 current_sector = sector + (i / 0x1000); - CryptoPP::ECB_Mode::Encryption encrypt(tweakKey.data(), tweakKey.size()); - CryptoPP::ECB_Mode::Decryption decrypt(dataKey.data(), dataKey.size()); - - std::array tweak{}; - std::array encryptedTweak; - std::array xorBuffer; - std::memcpy(tweak.data(), ¤t_sector, sizeof(u64)); - - // Encrypt the tweak for each sector. - encrypt.ProcessData(encryptedTweak.data(), tweak.data(), 16); - - for (int plaintextOffset = 0; plaintextOffset < 0x1000; plaintextOffset += 16) { - xtsXorBlock(xorBuffer.data(), src_image.data() + i + plaintextOffset, - encryptedTweak.data()); // x, c, t - decrypt.ProcessData(xorBuffer.data(), xorBuffer.data(), 16); // x, x - xtsXorBlock(dst_image.data() + i + plaintextOffset, xorBuffer.data(), - encryptedTweak.data()); //(p) c, x , t - xtsMult(encryptedTweak); - } - } -} diff --git a/src/core/crypto/crypto.h b/src/core/crypto/crypto.h deleted file mode 100644 index b5d8104b5..000000000 --- a/src/core/crypto/crypto.h +++ /dev/null @@ -1,63 +0,0 @@ -// SPDX-FileCopyrightText: Copyright 2024 shadPS4 Emulator Project -// SPDX-License-Identifier: GPL-2.0-or-later - -#pragma once - -#include -#include -#include -#include -#include -#include -#include -#include - -#include "common/types.h" -#include "keys.h" - -class Crypto { -public: - CryptoPP::RSA::PrivateKey key_pkg_derived_key3_keyset_init(); - CryptoPP::RSA::PrivateKey FakeKeyset_keyset_init(); - CryptoPP::RSA::PrivateKey DebugRifKeyset_init(); - - void RSA2048Decrypt(std::span dk3, - std::span ciphertext, - bool is_dk3); // RSAES_PKCS1v15_ - void ivKeyHASH256(std::span cipher_input, - std::span ivkey_result); - void aesCbcCfb128Decrypt(std::span ivkey, - std::span ciphertext, - std::span decrypted); - void aesCbcCfb128DecryptEntry(std::span ivkey, - std::span ciphertext, - std::span decrypted); - void decryptEFSM(std::span trophyKey, - std::span NPcommID, std::span efsmIv, - std::span ciphertext, std::span decrypted); - void PfsGenCryptoKey(std::span ekpfs, - std::span seed, - std::span dataKey, - std::span tweakKey); - void decryptPFS(std::span dataKey, - std::span tweakKey, std::span src_image, - std::span dst_image, u64 sector); - - void xtsXorBlock(CryptoPP::byte* x, const CryptoPP::byte* a, const CryptoPP::byte* b) { - for (int i = 0; i < 16; i++) { - x[i] = a[i] ^ b[i]; - } - } - - void xtsMult(std::span encryptedTweak) { - int feedback = 0; - for (int k = 0; k < encryptedTweak.size(); k++) { - const auto tmp = (encryptedTweak[k] >> 7) & 1; - encryptedTweak[k] = ((encryptedTweak[k] << 1) + feedback) & 0xFF; - feedback = tmp; - } - if (feedback != 0) { - encryptedTweak[0] ^= 0x87; - } - } -}; diff --git a/src/core/crypto/keys.h b/src/core/crypto/keys.h deleted file mode 100644 index 441082481..000000000 --- a/src/core/crypto/keys.h +++ /dev/null @@ -1,305 +0,0 @@ -// SPDX-FileCopyrightText: Copyright 2024 shadPS4 Emulator Project -// SPDX-License-Identifier: GPL-2.0-or-later - -#pragma once -#include - -class FakeKeyset { -public: - // Constructor - 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) - 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 - static constexpr CryptoPP::byte PublicExponent[] = {0, 1, 0, 1}; - // (InverseQ)(q) = 1 mod p - 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 - 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 - 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 - 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; - 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) - 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 - static constexpr CryptoPP::byte PublicExponent[] = {0x00, 0x01, 0x00, 0x01}; - // (InverseQ)(q) = 1 mod p - 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 - 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 - 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 - 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; - 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) - 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 - static constexpr CryptoPP::byte PublicExponent[] = {0, 1, 0, 1}; - // (InverseQ)(q) = 1 mod p - 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 - 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 - 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 - 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 diff --git a/src/core/debug_state.cpp b/src/core/debug_state.cpp index 6508a9875..23ebcbb9b 100644 --- a/src/core/debug_state.cpp +++ b/src/core/debug_state.cpp @@ -17,6 +17,8 @@ using namespace DebugStateType; DebugStateImpl& DebugState = *Common::Singleton::Instance(); +bool DebugStateType::showing_debug_menu_bar = false; + static ThreadID ThisThreadID() { #ifdef _WIN32 return GetCurrentThreadId(); diff --git a/src/core/debug_state.h b/src/core/debug_state.h index 6a8e15baa..b1b8c00d6 100644 --- a/src/core/debug_state.h +++ b/src/core/debug_state.h @@ -35,6 +35,8 @@ class ShaderList; namespace DebugStateType { +extern bool showing_debug_menu_bar; + enum class QueueType { dcb = 0, ccb = 1, @@ -153,6 +155,13 @@ class DebugStateImpl { std::vector shader_dump_list{}; public: + float Framerate = 1.0f / 60.0f; + float FrameDeltaTime; + + std::pair game_resolution{}; + std::pair output_resolution{}; + bool is_using_fsr{}; + void ShowDebugMessage(std::string message) { if (message.empty()) { return; @@ -160,6 +169,10 @@ public: debug_message_popup.push(std::move(message)); } + bool& IsShowingDebugMenuBar() { + return showing_debug_menu_bar; + } + void AddCurrentThreadToGuestList(); void RemoveCurrentThreadFromGuestList(); diff --git a/src/core/devices/base_device.cpp b/src/core/devices/base_device.cpp index 4f91c81c7..fc2a98a29 100644 --- a/src/core/devices/base_device.cpp +++ b/src/core/devices/base_device.cpp @@ -1,5 +1,5 @@ -// SPDX-FileCopyrightText: Copyright 2024 shadPS4 Emulator Project -// SPDX-License-Identifier: GPL-2.0-or-later +// SPDX-FileCopyrightText: Copyright 2024 shadPS4 Emulator Project +// SPDX-License-Identifier: GPL-2.0-or-later #include "base_device.h" diff --git a/src/core/devices/base_device.h b/src/core/devices/base_device.h index 351af82b4..36614b8f4 100644 --- a/src/core/devices/base_device.h +++ b/src/core/devices/base_device.h @@ -1,5 +1,5 @@ -// SPDX-FileCopyrightText: Copyright 2024 shadPS4 Emulator Project -// SPDX-License-Identifier: GPL-2.0-or-later +// SPDX-FileCopyrightText: Copyright 2024 shadPS4 Emulator Project +// SPDX-License-Identifier: GPL-2.0-or-later #pragma once diff --git a/src/core/devices/console_device.cpp b/src/core/devices/console_device.cpp new file mode 100644 index 000000000..f109cadb9 --- /dev/null +++ b/src/core/devices/console_device.cpp @@ -0,0 +1,74 @@ +// SPDX-FileCopyrightText: Copyright 2024 shadPS4 Emulator Project +// SPDX-License-Identifier: GPL-2.0-or-later + +#include "common/logging/log.h" +#include "console_device.h" + +namespace Core::Devices { + +std::shared_ptr ConsoleDevice::Create(u32 handle, const char*, int, u16) { + return std::shared_ptr( + reinterpret_cast(new ConsoleDevice(handle))); +} + +int ConsoleDevice::ioctl(u64 cmd, Common::VaCtx* args) { + LOG_ERROR(Kernel_Pthread, "(STUBBED) called"); + return 0; +} + +s64 ConsoleDevice::write(const void* buf, size_t nbytes) { + LOG_ERROR(Kernel_Pthread, "(STUBBED) called"); + return 0; +} + +size_t ConsoleDevice::writev(const Libraries::Kernel::SceKernelIovec* iov, int iovcnt) { + LOG_ERROR(Kernel_Pthread, "(STUBBED) called"); + return 0; +} + +size_t ConsoleDevice::readv(const Libraries::Kernel::SceKernelIovec* iov, int iovcnt) { + LOG_ERROR(Kernel_Pthread, "(STUBBED) called"); + return 0; +} + +s64 ConsoleDevice::preadv(const Libraries::Kernel::SceKernelIovec* iov, int iovcnt, u64 offset) { + LOG_ERROR(Kernel_Pthread, "(STUBBED) called"); + return 0; +} + +s64 ConsoleDevice::lseek(s64 offset, int whence) { + LOG_ERROR(Kernel_Pthread, "(STUBBED) called"); + return 0; +} + +s64 ConsoleDevice::read(void* buf, size_t nbytes) { + LOG_ERROR(Kernel_Pthread, "(STUBBED) called"); + return 0; +} + +int ConsoleDevice::fstat(Libraries::Kernel::OrbisKernelStat* sb) { + LOG_ERROR(Kernel_Pthread, "(STUBBED) called"); + return 0; +} + +s32 ConsoleDevice::fsync() { + LOG_ERROR(Kernel_Pthread, "(STUBBED) called"); + return 0; +} + +int ConsoleDevice::ftruncate(s64 length) { + LOG_ERROR(Kernel_Pthread, "(STUBBED) called"); + return 0; +} + +int ConsoleDevice::getdents(void* buf, u32 nbytes, s64* basep) { + LOG_ERROR(Kernel_Pthread, "(STUBBED) called"); + return 0; +} + +s64 ConsoleDevice::pwrite(const void* buf, size_t nbytes, u64 offset) { + LOG_ERROR(Kernel_Pthread, "(STUBBED) called"); + return 0; +} + +} // namespace Core::Devices \ No newline at end of file diff --git a/src/core/devices/console_device.h b/src/core/devices/console_device.h new file mode 100644 index 000000000..d4b590ba0 --- /dev/null +++ b/src/core/devices/console_device.h @@ -0,0 +1,33 @@ +// SPDX-FileCopyrightText: Copyright 2024 shadPS4 Emulator Project +// SPDX-License-Identifier: GPL-2.0-or-later + +#pragma once +#include +#include "base_device.h" + +namespace Core::Devices { + +class ConsoleDevice final : BaseDevice { + u32 handle; + +public: + static std::shared_ptr Create(u32 handle, const char*, int, u16); + explicit ConsoleDevice(u32 handle) : handle(handle) {} + + ~ConsoleDevice() override = default; + + int ioctl(u64 cmd, Common::VaCtx* args) override; + s64 write(const void* buf, size_t nbytes) override; + size_t readv(const Libraries::Kernel::SceKernelIovec* iov, int iovcnt) override; + size_t writev(const Libraries::Kernel::SceKernelIovec* iov, int iovcnt) override; + s64 preadv(const Libraries::Kernel::SceKernelIovec* iov, int iovcnt, u64 offset) override; + s64 lseek(s64 offset, int whence) override; + s64 read(void* buf, size_t nbytes) override; + int fstat(Libraries::Kernel::OrbisKernelStat* sb) override; + s32 fsync() override; + int ftruncate(s64 length) override; + int getdents(void* buf, u32 nbytes, s64* basep) override; + s64 pwrite(const void* buf, size_t nbytes, u64 offset) override; +}; + +} // namespace Core::Devices \ No newline at end of file diff --git a/src/core/devices/deci_tty6_device.cpp b/src/core/devices/deci_tty6_device.cpp new file mode 100644 index 000000000..e7a5fd4fc --- /dev/null +++ b/src/core/devices/deci_tty6_device.cpp @@ -0,0 +1,74 @@ +// SPDX-FileCopyrightText: Copyright 2024 shadPS4 Emulator Project +// SPDX-License-Identifier: GPL-2.0-or-later + +#include "common/logging/log.h" +#include "deci_tty6_device.h" + +namespace Core::Devices { + +std::shared_ptr DeciTty6Device::Create(u32 handle, const char*, int, u16) { + return std::shared_ptr( + reinterpret_cast(new DeciTty6Device(handle))); +} + +int DeciTty6Device::ioctl(u64 cmd, Common::VaCtx* args) { + LOG_ERROR(Kernel_Pthread, "(STUBBED) called"); + return 0; +} + +s64 DeciTty6Device::write(const void* buf, size_t nbytes) { + LOG_ERROR(Kernel_Pthread, "(STUBBED) called"); + return 0; +} + +size_t DeciTty6Device::writev(const Libraries::Kernel::SceKernelIovec* iov, int iovcnt) { + LOG_ERROR(Kernel_Pthread, "(STUBBED) called"); + return 0; +} + +size_t DeciTty6Device::readv(const Libraries::Kernel::SceKernelIovec* iov, int iovcnt) { + LOG_ERROR(Kernel_Pthread, "(STUBBED) called"); + return 0; +} + +s64 DeciTty6Device::preadv(const Libraries::Kernel::SceKernelIovec* iov, int iovcnt, u64 offset) { + LOG_ERROR(Kernel_Pthread, "(STUBBED) called"); + return 0; +} + +s64 DeciTty6Device::lseek(s64 offset, int whence) { + LOG_ERROR(Kernel_Pthread, "(STUBBED) called"); + return 0; +} + +s64 DeciTty6Device::read(void* buf, size_t nbytes) { + LOG_ERROR(Kernel_Pthread, "(STUBBED) called"); + return 0; +} + +int DeciTty6Device::fstat(Libraries::Kernel::OrbisKernelStat* sb) { + LOG_ERROR(Kernel_Pthread, "(STUBBED) called"); + return 0; +} + +s32 DeciTty6Device::fsync() { + LOG_ERROR(Kernel_Pthread, "(STUBBED) called"); + return 0; +} + +int DeciTty6Device::ftruncate(s64 length) { + LOG_ERROR(Kernel_Pthread, "(STUBBED) called"); + return 0; +} + +int DeciTty6Device::getdents(void* buf, u32 nbytes, s64* basep) { + LOG_ERROR(Kernel_Pthread, "(STUBBED) called"); + return 0; +} + +s64 DeciTty6Device::pwrite(const void* buf, size_t nbytes, u64 offset) { + LOG_ERROR(Kernel_Pthread, "(STUBBED) called"); + return 0; +} + +} // namespace Core::Devices \ No newline at end of file diff --git a/src/core/devices/deci_tty6_device.h b/src/core/devices/deci_tty6_device.h new file mode 100644 index 000000000..b8bd48556 --- /dev/null +++ b/src/core/devices/deci_tty6_device.h @@ -0,0 +1,33 @@ +// SPDX-FileCopyrightText: Copyright 2024 shadPS4 Emulator Project +// SPDX-License-Identifier: GPL-2.0-or-later + +#pragma once +#include +#include "base_device.h" + +namespace Core::Devices { + +class DeciTty6Device final : BaseDevice { + u32 handle; + +public: + static std::shared_ptr Create(u32 handle, const char*, int, u16); + explicit DeciTty6Device(u32 handle) : handle(handle) {} + + ~DeciTty6Device() override = default; + + int ioctl(u64 cmd, Common::VaCtx* args) override; + s64 write(const void* buf, size_t nbytes) override; + size_t readv(const Libraries::Kernel::SceKernelIovec* iov, int iovcnt) override; + size_t writev(const Libraries::Kernel::SceKernelIovec* iov, int iovcnt) override; + s64 preadv(const Libraries::Kernel::SceKernelIovec* iov, int iovcnt, u64 offset) override; + s64 lseek(s64 offset, int whence) override; + s64 read(void* buf, size_t nbytes) override; + int fstat(Libraries::Kernel::OrbisKernelStat* sb) override; + s32 fsync() override; + int ftruncate(s64 length) override; + int getdents(void* buf, u32 nbytes, s64* basep) override; + s64 pwrite(const void* buf, size_t nbytes, u64 offset) override; +}; + +} // namespace Core::Devices \ No newline at end of file diff --git a/src/core/devices/ioccom.h b/src/core/devices/ioccom.h index 671ee33d4..2ded90bd8 100644 --- a/src/core/devices/ioccom.h +++ b/src/core/devices/ioccom.h @@ -1,5 +1,5 @@ -// SPDX-FileCopyrightText: Copyright 2024 shadPS4 Emulator Project -// SPDX-License-Identifier: GPL-2.0-or-later +// SPDX-FileCopyrightText: Copyright 2024 shadPS4 Emulator Project +// SPDX-License-Identifier: GPL-2.0-or-later #pragma once diff --git a/src/core/devices/logger.cpp b/src/core/devices/logger.cpp index 6f104509c..8dcb24a3b 100644 --- a/src/core/devices/logger.cpp +++ b/src/core/devices/logger.cpp @@ -1,5 +1,5 @@ -// SPDX-FileCopyrightText: Copyright 2024 shadPS4 Emulator Project -// SPDX-License-Identifier: GPL-2.0-or-later +// SPDX-FileCopyrightText: Copyright 2024 shadPS4 Emulator Project +// SPDX-License-Identifier: GPL-2.0-or-later #include "common/logging/log.h" #include "core/libraries/kernel/file_system.h" @@ -17,10 +17,12 @@ s64 Logger::write(const void* buf, size_t nbytes) { } size_t Logger::writev(const Libraries::Kernel::SceKernelIovec* iov, int iovcnt) { + size_t total_written = 0; for (int i = 0; i < iovcnt; i++) { log(static_cast(iov[i].iov_base), iov[i].iov_len); + total_written += iov[i].iov_len; } - return iovcnt; + return total_written; } s64 Logger::pwrite(const void* buf, size_t nbytes, u64 offset) { diff --git a/src/core/devices/logger.h b/src/core/devices/logger.h index bfb07f337..eef17bc4b 100644 --- a/src/core/devices/logger.h +++ b/src/core/devices/logger.h @@ -1,5 +1,5 @@ -// SPDX-FileCopyrightText: Copyright 2024 shadPS4 Emulator Project -// SPDX-License-Identifier: GPL-2.0-or-later +// SPDX-FileCopyrightText: Copyright 2024 shadPS4 Emulator Project +// SPDX-License-Identifier: GPL-2.0-or-later #pragma once diff --git a/src/core/devices/nop_device.h b/src/core/devices/nop_device.h index a75b92f1b..da9a3fc82 100644 --- a/src/core/devices/nop_device.h +++ b/src/core/devices/nop_device.h @@ -1,5 +1,5 @@ -// SPDX-FileCopyrightText: Copyright 2024 shadPS4 Emulator Project -// SPDX-License-Identifier: GPL-2.0-or-later +// SPDX-FileCopyrightText: Copyright 2024 shadPS4 Emulator Project +// SPDX-License-Identifier: GPL-2.0-or-later #pragma once #include "base_device.h" @@ -17,36 +17,47 @@ public: int ioctl(u64 cmd, Common::VaCtx* args) override { return 0; } + s64 write(const void* buf, size_t nbytes) override { return 0; } + size_t readv(const Libraries::Kernel::SceKernelIovec* iov, int iovcnt) override { return 0; } + size_t writev(const Libraries::Kernel::SceKernelIovec* iov, int iovcnt) override { return 0; } + s64 preadv(const Libraries::Kernel::SceKernelIovec* iov, int iovcnt, u64 offset) override { return 0; } + s64 lseek(s64 offset, int whence) override { return 0; } + s64 read(void* buf, size_t nbytes) override { return 0; } + int fstat(Libraries::Kernel::OrbisKernelStat* sb) override { return 0; } + s32 fsync() override { return 0; } + int ftruncate(s64 length) override { return 0; } + int getdents(void* buf, u32 nbytes, s64* basep) override { return 0; } + s64 pwrite(const void* buf, size_t nbytes, u64 offset) override { return 0; } diff --git a/src/core/devices/random_device.cpp b/src/core/devices/random_device.cpp new file mode 100644 index 000000000..50934e3b8 --- /dev/null +++ b/src/core/devices/random_device.cpp @@ -0,0 +1,78 @@ +// SPDX-FileCopyrightText: Copyright 2024 shadPS4 Emulator Project +// SPDX-License-Identifier: GPL-2.0-or-later + +#include +#include "common/logging/log.h" +#include "random_device.h" + +namespace Core::Devices { + +std::shared_ptr RandomDevice::Create(u32 handle, const char*, int, u16) { + std::srand(std::time(nullptr)); + return std::shared_ptr( + reinterpret_cast(new RandomDevice(handle))); +} + +int RandomDevice::ioctl(u64 cmd, Common::VaCtx* args) { + LOG_ERROR(Kernel_Pthread, "(STUBBED) called"); + return 0; +} + +s64 RandomDevice::write(const void* buf, size_t nbytes) { + LOG_ERROR(Kernel_Pthread, "(STUBBED) called"); + return 0; +} + +size_t RandomDevice::writev(const Libraries::Kernel::SceKernelIovec* iov, int iovcnt) { + LOG_ERROR(Kernel_Pthread, "(STUBBED) called"); + return 0; +} + +size_t RandomDevice::readv(const Libraries::Kernel::SceKernelIovec* iov, int iovcnt) { + LOG_ERROR(Kernel_Pthread, "(STUBBED) called"); + return 0; +} + +s64 RandomDevice::preadv(const Libraries::Kernel::SceKernelIovec* iov, int iovcnt, u64 offset) { + LOG_ERROR(Kernel_Pthread, "(STUBBED) called"); + return 0; +} + +s64 RandomDevice::lseek(s64 offset, int whence) { + return 0; +} + +s64 RandomDevice::read(void* buf, size_t nbytes) { + auto rbuf = static_cast(buf); + for (size_t i = 0; i < nbytes; i++) { + rbuf[i] = std::rand() & 0xFF; + } + return nbytes; +} + +int RandomDevice::fstat(Libraries::Kernel::OrbisKernelStat* sb) { + LOG_ERROR(Kernel_Pthread, "(STUBBED) called"); + return 0; +} + +s32 RandomDevice::fsync() { + LOG_ERROR(Kernel_Pthread, "(STUBBED) called"); + return 0; +} + +int RandomDevice::ftruncate(s64 length) { + LOG_ERROR(Kernel_Pthread, "(STUBBED) called"); + return 0; +} + +int RandomDevice::getdents(void* buf, u32 nbytes, s64* basep) { + LOG_ERROR(Kernel_Pthread, "(STUBBED) called"); + return 0; +} + +s64 RandomDevice::pwrite(const void* buf, size_t nbytes, u64 offset) { + LOG_ERROR(Kernel_Pthread, "(STUBBED) called"); + return 0; +} + +} // namespace Core::Devices \ No newline at end of file diff --git a/src/core/devices/random_device.h b/src/core/devices/random_device.h new file mode 100644 index 000000000..a5c8e9845 --- /dev/null +++ b/src/core/devices/random_device.h @@ -0,0 +1,33 @@ +// SPDX-FileCopyrightText: Copyright 2024 shadPS4 Emulator Project +// SPDX-License-Identifier: GPL-2.0-or-later + +#pragma once +#include +#include "base_device.h" + +namespace Core::Devices { + +class RandomDevice final : BaseDevice { + u32 handle; + +public: + static std::shared_ptr Create(u32 handle, const char*, int, u16); + explicit RandomDevice(u32 handle) : handle(handle) {} + + ~RandomDevice() override = default; + + int ioctl(u64 cmd, Common::VaCtx* args) override; + s64 write(const void* buf, size_t nbytes) override; + size_t readv(const Libraries::Kernel::SceKernelIovec* iov, int iovcnt) override; + size_t writev(const Libraries::Kernel::SceKernelIovec* iov, int iovcnt) override; + s64 preadv(const Libraries::Kernel::SceKernelIovec* iov, int iovcnt, u64 offset) override; + s64 lseek(s64 offset, int whence) override; + s64 read(void* buf, size_t nbytes) override; + int fstat(Libraries::Kernel::OrbisKernelStat* sb) override; + s32 fsync() override; + int ftruncate(s64 length) override; + int getdents(void* buf, u32 nbytes, s64* basep) override; + s64 pwrite(const void* buf, size_t nbytes, u64 offset) override; +}; + +} // namespace Core::Devices \ No newline at end of file diff --git a/src/core/devices/srandom_device.cpp b/src/core/devices/srandom_device.cpp new file mode 100644 index 000000000..ab78ddbe2 --- /dev/null +++ b/src/core/devices/srandom_device.cpp @@ -0,0 +1,79 @@ +// SPDX-FileCopyrightText: Copyright 2024 shadPS4 Emulator Project +// SPDX-License-Identifier: GPL-2.0-or-later + +#include +#include "common/logging/log.h" +#include "srandom_device.h" + +namespace Core::Devices { + +std::shared_ptr SRandomDevice::Create(u32 handle, const char*, int, u16) { + std::srand(std::time(nullptr)); + return std::shared_ptr( + reinterpret_cast(new SRandomDevice(handle))); +} + +int SRandomDevice::ioctl(u64 cmd, Common::VaCtx* args) { + LOG_ERROR(Kernel_Pthread, "(STUBBED) called"); + return 0; +} + +s64 SRandomDevice::write(const void* buf, size_t nbytes) { + LOG_ERROR(Kernel_Pthread, "(STUBBED) called"); + return 0; +} + +size_t SRandomDevice::writev(const Libraries::Kernel::SceKernelIovec* iov, int iovcnt) { + LOG_ERROR(Kernel_Pthread, "(STUBBED) called"); + return 0; +} + +size_t SRandomDevice::readv(const Libraries::Kernel::SceKernelIovec* iov, int iovcnt) { + LOG_ERROR(Kernel_Pthread, "(STUBBED) called"); + return 0; +} + +s64 SRandomDevice::preadv(const Libraries::Kernel::SceKernelIovec* iov, int iovcnt, u64 offset) { + LOG_ERROR(Kernel_Pthread, "(STUBBED) called"); + return 0; +} + +s64 SRandomDevice::lseek(s64 offset, int whence) { + LOG_ERROR(Kernel_Pthread, "(STUBBED) called"); + return 0; +} + +s64 SRandomDevice::read(void* buf, size_t nbytes) { + auto rbuf = static_cast(buf); + for (size_t i = 0; i < nbytes; i++) { + rbuf[i] = std::rand(); + } + return nbytes; +} + +int SRandomDevice::fstat(Libraries::Kernel::OrbisKernelStat* sb) { + LOG_ERROR(Kernel_Pthread, "(STUBBED) called"); + return 0; +} + +s32 SRandomDevice::fsync() { + LOG_ERROR(Kernel_Pthread, "(STUBBED) called"); + return s32(); +} + +int SRandomDevice::ftruncate(s64 length) { + LOG_ERROR(Kernel_Pthread, "(STUBBED) called"); + return 0; +} + +int SRandomDevice::getdents(void* buf, u32 nbytes, s64* basep) { + LOG_ERROR(Kernel_Pthread, "(STUBBED) called"); + return 0; +} + +s64 SRandomDevice::pwrite(const void* buf, size_t nbytes, u64 offset) { + LOG_ERROR(Kernel_Pthread, "(STUBBED) called"); + return 0; +} + +} // namespace Core::Devices \ No newline at end of file diff --git a/src/core/devices/srandom_device.h b/src/core/devices/srandom_device.h new file mode 100644 index 000000000..cd32f7289 --- /dev/null +++ b/src/core/devices/srandom_device.h @@ -0,0 +1,33 @@ +// SPDX-FileCopyrightText: Copyright 2024 shadPS4 Emulator Project +// SPDX-License-Identifier: GPL-2.0-or-later + +#pragma once +#include +#include "base_device.h" + +namespace Core::Devices { + +class SRandomDevice final : BaseDevice { + u32 handle; + +public: + static std::shared_ptr Create(u32 handle, const char*, int, u16); + explicit SRandomDevice(u32 handle) : handle(handle) {} + + ~SRandomDevice() override = default; + + int ioctl(u64 cmd, Common::VaCtx* args) override; + s64 write(const void* buf, size_t nbytes) override; + size_t readv(const Libraries::Kernel::SceKernelIovec* iov, int iovcnt) override; + size_t writev(const Libraries::Kernel::SceKernelIovec* iov, int iovcnt) override; + s64 preadv(const Libraries::Kernel::SceKernelIovec* iov, int iovcnt, u64 offset) override; + s64 lseek(s64 offset, int whence) override; + s64 read(void* buf, size_t nbytes) override; + int fstat(Libraries::Kernel::OrbisKernelStat* sb) override; + s32 fsync() override; + int ftruncate(s64 length) override; + int getdents(void* buf, u32 nbytes, s64* basep) override; + s64 pwrite(const void* buf, size_t nbytes, u64 offset) override; +}; + +} // namespace Core::Devices \ No newline at end of file diff --git a/src/core/devices/urandom_device.cpp b/src/core/devices/urandom_device.cpp new file mode 100644 index 000000000..c001aab83 --- /dev/null +++ b/src/core/devices/urandom_device.cpp @@ -0,0 +1,79 @@ +// SPDX-FileCopyrightText: Copyright 2024 shadPS4 Emulator Project +// SPDX-License-Identifier: GPL-2.0-or-later + +#include +#include "common/logging/log.h" +#include "urandom_device.h" + +namespace Core::Devices { + +std::shared_ptr URandomDevice::Create(u32 handle, const char*, int, u16) { + std::srand(std::time(nullptr)); + return std::shared_ptr( + reinterpret_cast(new URandomDevice(handle))); +} + +int URandomDevice::ioctl(u64 cmd, Common::VaCtx* args) { + LOG_ERROR(Kernel_Pthread, "(STUBBED) called"); + return 0; +} + +s64 URandomDevice::write(const void* buf, size_t nbytes) { + LOG_ERROR(Kernel_Pthread, "(STUBBED) called"); + return 0; +} + +size_t URandomDevice::writev(const Libraries::Kernel::SceKernelIovec* iov, int iovcnt) { + LOG_ERROR(Kernel_Pthread, "(STUBBED) called"); + return 0; +} + +size_t URandomDevice::readv(const Libraries::Kernel::SceKernelIovec* iov, int iovcnt) { + LOG_ERROR(Kernel_Pthread, "(STUBBED) called"); + return 0; +} + +s64 URandomDevice::preadv(const Libraries::Kernel::SceKernelIovec* iov, int iovcnt, u64 offset) { + LOG_ERROR(Kernel_Pthread, "(STUBBED) called"); + return 0; +} + +s64 URandomDevice::lseek(s64 offset, int whence) { + LOG_ERROR(Kernel_Pthread, "(STUBBED) called"); + return 0; +} + +s64 URandomDevice::read(void* buf, size_t nbytes) { + auto rbuf = static_cast(buf); + for (size_t i = 0; i < nbytes; i++) { + rbuf[i] = std::rand() & 0xFF; + } + return nbytes; +} + +int URandomDevice::fstat(Libraries::Kernel::OrbisKernelStat* sb) { + LOG_ERROR(Kernel_Pthread, "(STUBBED) called"); + return 0; +} + +s32 URandomDevice::fsync() { + LOG_ERROR(Kernel_Pthread, "(STUBBED) called"); + return 0; +} + +int URandomDevice::ftruncate(s64 length) { + LOG_ERROR(Kernel_Pthread, "(STUBBED) called"); + return 0; +} + +int URandomDevice::getdents(void* buf, u32 nbytes, s64* basep) { + LOG_ERROR(Kernel_Pthread, "(STUBBED) called"); + return 0; +} + +s64 URandomDevice::pwrite(const void* buf, size_t nbytes, u64 offset) { + LOG_ERROR(Kernel_Pthread, "(STUBBED) called"); + return 0; +} + +} // namespace Core::Devices \ No newline at end of file diff --git a/src/core/devices/urandom_device.h b/src/core/devices/urandom_device.h new file mode 100644 index 000000000..b8a854cc0 --- /dev/null +++ b/src/core/devices/urandom_device.h @@ -0,0 +1,33 @@ +// SPDX-FileCopyrightText: Copyright 2024 shadPS4 Emulator Project +// SPDX-License-Identifier: GPL-2.0-or-later + +#pragma once +#include +#include "base_device.h" + +namespace Core::Devices { + +class URandomDevice final : BaseDevice { + u32 handle; + +public: + static std::shared_ptr Create(u32 handle, const char*, int, u16); + explicit URandomDevice(u32 handle) : handle(handle) {} + + ~URandomDevice() override = default; + + int ioctl(u64 cmd, Common::VaCtx* args) override; + s64 write(const void* buf, size_t nbytes) override; + size_t readv(const Libraries::Kernel::SceKernelIovec* iov, int iovcnt) override; + size_t writev(const Libraries::Kernel::SceKernelIovec* iov, int iovcnt) override; + s64 preadv(const Libraries::Kernel::SceKernelIovec* iov, int iovcnt, u64 offset) override; + s64 lseek(s64 offset, int whence) override; + s64 read(void* buf, size_t nbytes) override; + int fstat(Libraries::Kernel::OrbisKernelStat* sb) override; + s32 fsync() override; + int ftruncate(s64 length) override; + int getdents(void* buf, u32 nbytes, s64* basep) override; + s64 pwrite(const void* buf, size_t nbytes, u64 offset) override; +}; + +} // namespace Core::Devices \ No newline at end of file diff --git a/src/core/devtools/layer.cpp b/src/core/devtools/layer.cpp index 776f3377d..94b39e801 100644 --- a/src/core/devtools/layer.cpp +++ b/src/core/devtools/layer.cpp @@ -1,6 +1,7 @@ // SPDX-FileCopyrightText: Copyright 2024 shadPS4 Emulator Project // SPDX-License-Identifier: GPL-2.0-or-later +#include "SDL3/SDL_log.h" #include "layer.h" #include @@ -21,14 +22,13 @@ extern std::unique_ptr presenter; using namespace ImGui; -using namespace Core::Devtools; -using L = Core::Devtools::Layer; +using namespace ::Core::Devtools; +using L = ::Core::Devtools::Layer; static bool show_simple_fps = false; static bool visibility_toggled = false; static float fps_scale = 1.0f; -static bool show_advanced_debug = false; static int dump_frame_count = 1; static Widget::FrameGraph frame_graph; @@ -82,8 +82,24 @@ void L::DrawMenuBar() { ImGui::EndMenu(); } if (BeginMenu("Display")) { + auto& pp_settings = presenter->GetPPSettingsRef(); if (BeginMenu("Brightness")) { - SliderFloat("Gamma", &presenter->GetGammaRef(), 0.1f, 2.0f); + SliderFloat("Gamma", &pp_settings.gamma, 0.1f, 2.0f); + ImGui::EndMenu(); + } + if (BeginMenu("FSR")) { + auto& fsr = presenter->GetFsrSettingsRef(); + Checkbox("FSR Enabled", &fsr.enable); + BeginDisabled(!fsr.enable); + { + Checkbox("RCAS", &fsr.use_rcas); + BeginDisabled(!fsr.use_rcas); + { + SliderFloat("RCAS Attenuation", &fsr.rcas_attenuation, 0.0, 3.0); + } + EndDisabled(); + } + EndDisabled(); ImGui::EndMenu(); } ImGui::EndMenu(); @@ -94,24 +110,14 @@ void L::DrawMenuBar() { } ImGui::EndMenu(); } + + SameLine(ImGui::GetWindowWidth() - 30.0f); + if (Button("X", ImVec2(25, 25))) { + DebugState.IsShowingDebugMenuBar() = false; + } + EndMainMenuBar(); } - - if (IsKeyPressed(ImGuiKey_F9, false)) { - if (io.KeyCtrl && io.KeyAlt) { - if (!DebugState.ShouldPauseInSubmit()) { - DebugState.RequestFrameDump(dump_frame_count); - } - } - if (!io.KeyCtrl && !io.KeyAlt) { - if (isSystemPaused) { - DebugState.ResumeGuestThreads(); - } else { - DebugState.PauseGuestThreads(); - } - } - } - if (open_popup_options) { OpenPopup("GPU Tools Options"); just_opened_options = true; @@ -253,8 +259,20 @@ void L::DrawAdvanced() { } void L::DrawSimple() { - const auto io = GetIO(); - Text("%.1f FPS (%.2f ms)", io.Framerate, 1000.0f / io.Framerate); + const float frameRate = DebugState.Framerate; + if (Config::fpsColor()) { + if (frameRate < 10) { + PushStyleColor(ImGuiCol_Text, ImVec4(1.0f, 0.0f, 0.0f, 1.0f)); // Red + } else if (frameRate >= 10 && frameRate < 20) { + PushStyleColor(ImGuiCol_Text, ImVec4(1.0f, 0.5f, 0.0f, 1.0f)); // Orange + } else { + PushStyleColor(ImGuiCol_Text, ImVec4(1.0f, 1.0f, 1.0f, 1.0f)); // White + } + } else { + PushStyleColor(ImGuiCol_Text, ImVec4(1.0f, 1.0f, 1.0f, 1.0f)); // White + } + Text("%d FPS (%.1f ms)", static_cast(std::round(frameRate)), 1000.0f / frameRate); + PopStyleColor(); } static void LoadSettings(const char* line) { @@ -265,7 +283,7 @@ static void LoadSettings(const char* line) { return; } if (sscanf(line, "show_advanced_debug=%d", &i) == 1) { - show_advanced_debug = i != 0; + DebugState.IsShowingDebugMenuBar() = i != 0; return; } if (sscanf(line, "show_frame_graph=%d", &i) == 1) { @@ -310,7 +328,7 @@ void L::SetupSettings() { handler.WriteAllFn = [](ImGuiContext*, ImGuiSettingsHandler* handler, ImGuiTextBuffer* buf) { buf->appendf("[%s][Data]\n", handler->TypeName); buf->appendf("fps_scale=%f\n", fps_scale); - buf->appendf("show_advanced_debug=%d\n", show_advanced_debug); + buf->appendf("show_advanced_debug=%d\n", DebugState.IsShowingDebugMenuBar()); buf->appendf("show_frame_graph=%d\n", frame_graph.is_open); buf->appendf("dump_frame_count=%d\n", dump_frame_count); buf->append("\n"); @@ -336,18 +354,44 @@ void L::Draw() { if (!DebugState.IsGuestThreadsPaused()) { const auto fn = DebugState.flip_frame_count.load(); - frame_graph.AddFrame(fn, io.DeltaTime); + frame_graph.AddFrame(fn, DebugState.FrameDeltaTime); } if (IsKeyPressed(ImGuiKey_F10, false)) { if (io.KeyCtrl) { - show_advanced_debug = !show_advanced_debug; + DebugState.IsShowingDebugMenuBar() ^= true; } else { show_simple_fps = !show_simple_fps; } visibility_toggled = true; } + if (IsKeyPressed(ImGuiKey_F9, false)) { + if (io.KeyCtrl && io.KeyAlt) { + if (!DebugState.ShouldPauseInSubmit()) { + DebugState.RequestFrameDump(dump_frame_count); + } + } else { + if (DebugState.IsGuestThreadsPaused()) { + DebugState.ResumeGuestThreads(); + SDL_Log("Game resumed from Keyboard"); + show_pause_status = false; + } else { + DebugState.PauseGuestThreads(); + SDL_Log("Game paused from Keyboard"); + show_pause_status = true; + } + visibility_toggled = true; + } + } + + if (show_pause_status) { + ImVec2 pos = ImVec2(10, 10); + ImU32 color = IM_COL32(255, 255, 255, 255); + + ImGui::GetForegroundDrawList()->AddText(pos, color, "Game Paused Press F9 to Resume"); + } + if (show_simple_fps) { if (Begin("Video Info", nullptr, ImGuiWindowFlags_NoNav | ImGuiWindowFlags_NoDecoration | @@ -376,7 +420,7 @@ void L::Draw() { End(); } - if (show_advanced_debug) { + if (DebugState.IsShowingDebugMenuBar()) { PushFont(io.Fonts->Fonts[IMGUI_FONT_MONO]); PushID("DevtoolsLayer"); DrawAdvanced(); diff --git a/src/core/devtools/layer.h b/src/core/devtools/layer.h index 5bb53fbdb..9e949c8e9 100644 --- a/src/core/devtools/layer.h +++ b/src/core/devtools/layer.h @@ -19,6 +19,7 @@ public: static void SetupSettings(); void Draw() override; + bool show_pause_status = false; }; } // namespace Core::Devtools diff --git a/src/core/devtools/widget/frame_graph.cpp b/src/core/devtools/widget/frame_graph.cpp index 0e170db38..8f3e133f5 100644 --- a/src/core/devtools/widget/frame_graph.cpp +++ b/src/core/devtools/widget/frame_graph.cpp @@ -74,7 +74,7 @@ void FrameGraph::Draw() { if (!is_open) { return; } - SetNextWindowSize({340.0, 185.0f}, ImGuiCond_FirstUseEver); + SetNextWindowSize({308.0, 270.0f}, ImGuiCond_FirstUseEver); if (Begin("Video debug info", &is_open)) { const auto& ctx = *GImGui; const auto& io = ctx.IO; @@ -83,20 +83,25 @@ void FrameGraph::Draw() { auto isSystemPaused = DebugState.IsGuestThreadsPaused(); - static float deltaTime; - static float frameRate; - if (!isSystemPaused) { - deltaTime = io.DeltaTime * 1000.0f; + deltaTime = DebugState.FrameDeltaTime * 1000.0f; frameRate = 1000.0f / deltaTime; } - Text("Frame time: %.3f ms (%.1f FPS)", deltaTime, frameRate); - Text("Flip frame: %d Gnm submit frame: %d", DebugState.flip_frame_count.load(), - DebugState.gnm_frame_count.load()); - SeparatorText("Frame graph"); DrawFrameGraph(); + + SeparatorText("Renderer info"); + + Text("Frame time: %.3f ms (%.1f FPS)", deltaTime, frameRate); + Text("Presenter time: %.3f ms (%.1f FPS)", io.DeltaTime * 1000.0f, 1.0f / io.DeltaTime); + Text("Flip frame: %d Gnm submit frame: %d", DebugState.flip_frame_count.load(), + DebugState.gnm_frame_count.load()); + Text("Game Res: %dx%d", DebugState.game_resolution.first, + DebugState.game_resolution.second); + Text("Output Res: %dx%d", DebugState.output_resolution.first, + DebugState.output_resolution.second); + Text("FSR: %s", DebugState.is_using_fsr ? "on" : "off"); } End(); } diff --git a/src/core/devtools/widget/frame_graph.h b/src/core/devtools/widget/frame_graph.h index 40a68ffa7..aef3c0747 100644 --- a/src/core/devtools/widget/frame_graph.h +++ b/src/core/devtools/widget/frame_graph.h @@ -16,6 +16,9 @@ class FrameGraph { std::array frame_list{}; + float deltaTime{}; + float frameRate{}; + void DrawFrameGraph(); public: diff --git a/src/core/devtools/widget/reg_popup.cpp b/src/core/devtools/widget/reg_popup.cpp index fae620901..7bb38df24 100644 --- a/src/core/devtools/widget/reg_popup.cpp +++ b/src/core/devtools/widget/reg_popup.cpp @@ -105,7 +105,8 @@ void RegPopup::DrawDepthBuffer(const DepthBuffer& depth_data) { "DEPTH_SLICE.TILE_MAX", depth_buffer.depth_slice.tile_max, "Pitch()", depth_buffer.Pitch(), "Height()", depth_buffer.Height(), - "Address()", depth_buffer.Address(), + "DepthAddress()", depth_buffer.DepthAddress(), + "StencilAddress()", depth_buffer.StencilAddress(), "NumSamples()", depth_buffer.NumSamples(), "NumBits()", depth_buffer.NumBits(), "GetDepthSliceSize()", depth_buffer.GetDepthSliceSize() diff --git a/src/core/devtools/widget/reg_view.cpp b/src/core/devtools/widget/reg_view.cpp index a1b7937df..fa3c5e3e6 100644 --- a/src/core/devtools/widget/reg_view.cpp +++ b/src/core/devtools/widget/reg_view.cpp @@ -155,7 +155,7 @@ void RegView::DrawGraphicsRegs() { TableNextColumn(); TextUnformatted("Depth buffer"); TableNextColumn(); - if (regs.depth_buffer.Address() == 0 || !regs.depth_control.depth_enable) { + if (regs.depth_buffer.DepthAddress() == 0 || !regs.depth_control.depth_enable) { TextUnformatted("N/A"); } else { const char* text = last_selected_cb == depth_id && default_reg_popup.open ? "x" : "->"; @@ -241,7 +241,7 @@ void RegView::SetData(DebugStateType::RegDump _data, const std::string& base_tit default_reg_popup.open = false; if (last_selected_cb == depth_id) { const auto& has_depth = - regs.depth_buffer.Address() != 0 && regs.depth_control.depth_enable; + regs.depth_buffer.DepthAddress() != 0 && regs.depth_control.depth_enable; if (has_depth) { default_reg_popup.SetData(title, regs.depth_buffer, regs.depth_control); default_reg_popup.open = true; diff --git a/src/core/devtools/widget/shader_list.cpp b/src/core/devtools/widget/shader_list.cpp index 97d01896d..0285db5a5 100644 --- a/src/core/devtools/widget/shader_list.cpp +++ b/src/core/devtools/widget/shader_list.cpp @@ -24,16 +24,33 @@ using namespace ImGui; namespace Core::Devtools::Widget { -ShaderList::Selection::Selection(int index) : index(index) { - isa_editor.SetPalette(TextEditor::GetDarkPalette()); - isa_editor.SetReadOnly(true); - glsl_editor.SetPalette(TextEditor::GetDarkPalette()); - glsl_editor.SetLanguageDefinition(TextEditor::LanguageDefinition::GLSL()); +ShaderList::Selection::Selection(int index) + : index(index), isa_editor(std::make_unique()), + glsl_editor(std::make_unique()) { + isa_editor->SetPalette(TextEditor::GetDarkPalette()); + isa_editor->SetReadOnly(true); + glsl_editor->SetPalette(TextEditor::GetDarkPalette()); + glsl_editor->SetLanguageDefinition(TextEditor::LanguageDefinition::GLSL()); presenter->GetWindow().RequestKeyboard(); } ShaderList::Selection::~Selection() { - presenter->GetWindow().ReleaseKeyboard(); + if (index >= 0) { + presenter->GetWindow().ReleaseKeyboard(); + } +} + +ShaderList::Selection::Selection(Selection&& other) noexcept + : index{other.index}, isa_editor{std::move(other.isa_editor)}, + glsl_editor{std::move(other.glsl_editor)}, open{other.open}, showing_bin{other.showing_bin}, + patch_path{std::move(other.patch_path)}, patch_bin_path{std::move(other.patch_bin_path)} { + other.index = -1; +} + +ShaderList::Selection& ShaderList::Selection::operator=(Selection other) { + using std::swap; + swap(*this, other); + return *this; } void ShaderList::Selection::ReloadShader(DebugStateType::ShaderDump& value) { @@ -72,13 +89,13 @@ bool ShaderList::Selection::DrawShader(DebugStateType::ShaderDump& value) { value.is_patched = !value.patch_spv.empty(); if (!value.is_patched) { // No patch - isa_editor.SetText(value.cache_isa_disasm); - glsl_editor.SetText(value.cache_spv_disasm); + isa_editor->SetText(value.cache_isa_disasm); + glsl_editor->SetText(value.cache_spv_disasm); } else { - isa_editor.SetText(value.cache_patch_disasm); - isa_editor.SetLanguageDefinition(TextEditor::LanguageDefinition::SPIRV()); - glsl_editor.SetText(value.patch_source); - glsl_editor.SetReadOnly(false); + isa_editor->SetText(value.cache_patch_disasm); + isa_editor->SetLanguageDefinition(TextEditor::LanguageDefinition::SPIRV()); + glsl_editor->SetText(value.patch_source); + glsl_editor->SetReadOnly(false); } } @@ -97,18 +114,18 @@ bool ShaderList::Selection::DrawShader(DebugStateType::ShaderDump& value) { if (value.patch_source.empty()) { value.patch_source = value.cache_spv_disasm; } - isa_editor.SetText(value.cache_patch_disasm); - isa_editor.SetLanguageDefinition(TextEditor::LanguageDefinition::SPIRV()); - glsl_editor.SetText(value.patch_source); - glsl_editor.SetReadOnly(false); + isa_editor->SetText(value.cache_patch_disasm); + isa_editor->SetLanguageDefinition(TextEditor::LanguageDefinition::SPIRV()); + glsl_editor->SetText(value.patch_source); + glsl_editor->SetReadOnly(false); if (!value.patch_spv.empty()) { ReloadShader(value); } } else { - isa_editor.SetText(value.cache_isa_disasm); - isa_editor.SetLanguageDefinition(TextEditor::LanguageDefinition()); - glsl_editor.SetText(value.cache_spv_disasm); - glsl_editor.SetReadOnly(true); + isa_editor->SetText(value.cache_isa_disasm); + isa_editor->SetLanguageDefinition(TextEditor::LanguageDefinition()); + glsl_editor->SetText(value.cache_spv_disasm); + glsl_editor->SetReadOnly(true); ReloadShader(value); } } @@ -154,7 +171,7 @@ bool ShaderList::Selection::DrawShader(DebugStateType::ShaderDump& value) { compile = true; } if (save) { - value.patch_source = glsl_editor.GetText(); + value.patch_source = glsl_editor->GetText(); std::ofstream file{patch_path, std::ios::binary | std::ios::trunc}; file << value.patch_source; std::string msg = "Patch saved to "; @@ -192,7 +209,7 @@ bool ShaderList::Selection::DrawShader(DebugStateType::ShaderDump& value) { DebugState.ShowDebugMessage("Decompilation failed (Compile was ok):\n" + res); } else { - isa_editor.SetText(value.cache_patch_disasm); + isa_editor->SetText(value.cache_patch_disasm); ReloadShader(value); } } @@ -201,9 +218,9 @@ bool ShaderList::Selection::DrawShader(DebugStateType::ShaderDump& value) { } if (showing_bin) { - isa_editor.Render(value.is_patched ? "SPIRV" : "ISA", GetContentRegionAvail()); + isa_editor->Render(value.is_patched ? "SPIRV" : "ISA", GetContentRegionAvail()); } else { - glsl_editor.Render("GLSL", GetContentRegionAvail()); + glsl_editor->Render("GLSL", GetContentRegionAvail()); } End(); diff --git a/src/core/devtools/widget/shader_list.h b/src/core/devtools/widget/shader_list.h index fbb8d2070..c882b0964 100644 --- a/src/core/devtools/widget/shader_list.h +++ b/src/core/devtools/widget/shader_list.h @@ -14,14 +14,17 @@ class ShaderList { struct Selection { explicit Selection(int index); ~Selection(); + Selection(const Selection& other) = delete; + Selection(Selection&& other) noexcept; + Selection& operator=(Selection other); void ReloadShader(DebugStateType::ShaderDump& value); bool DrawShader(DebugStateType::ShaderDump& value); - int index; - TextEditor isa_editor{}; - TextEditor glsl_editor{}; + int index{-1}; + std::unique_ptr isa_editor{}; + std::unique_ptr glsl_editor{}; bool open = true; bool showing_bin = false; diff --git a/src/core/file_format/pkg.cpp b/src/core/file_format/pkg.cpp deleted file mode 100644 index a6b5eb9a8..000000000 --- a/src/core/file_format/pkg.cpp +++ /dev/null @@ -1,473 +0,0 @@ -// SPDX-FileCopyrightText: Copyright 2024 shadPS4 Emulator Project -// SPDX-License-Identifier: GPL-2.0-or-later - -#include -#include "common/io_file.h" -#include "common/logging/formatter.h" -#include "core/file_format/pkg.h" -#include "core/file_format/pkg_type.h" - -static void DecompressPFSC(std::span compressed_data, std::span decompressed_data) { - z_stream decompressStream; - decompressStream.zalloc = Z_NULL; - decompressStream.zfree = Z_NULL; - decompressStream.opaque = Z_NULL; - - if (inflateInit(&decompressStream) != Z_OK) { - // std::cerr << "Error initializing zlib for deflation." << std::endl; - } - - decompressStream.avail_in = compressed_data.size(); - decompressStream.next_in = reinterpret_cast(compressed_data.data()); - decompressStream.avail_out = decompressed_data.size(); - decompressStream.next_out = reinterpret_cast(decompressed_data.data()); - - if (inflate(&decompressStream, Z_FINISH)) { - } - if (inflateEnd(&decompressStream) != Z_OK) { - // std::cerr << "Error ending zlib inflate" << std::endl; - } -} - -u32 GetPFSCOffset(std::span pfs_image) { - static constexpr u32 PfscMagic = 0x43534650; - u32 value; - for (u32 i = 0x20000; i < pfs_image.size(); i += 0x10000) { - std::memcpy(&value, &pfs_image[i], sizeof(u32)); - if (value == PfscMagic) - return i; - } - return -1; -} - -PKG::PKG() = default; - -PKG::~PKG() = default; - -bool PKG::Open(const std::filesystem::path& filepath, std::string& failreason) { - Common::FS::IOFile file(filepath, Common::FS::FileAccessMode::Read); - if (!file.IsOpen()) { - return false; - } - pkgSize = file.GetSize(); - - file.Read(pkgheader); - if (pkgheader.magic != 0x7F434E54) - return false; - - for (const auto& flag : flagNames) { - if (isFlagSet(pkgheader.pkg_content_flags, flag.first)) { - if (!pkgFlags.empty()) - pkgFlags += (", "); - pkgFlags += (flag.second); - } - } - - // Find title id it is part of pkg_content_id starting at offset 0x40 - file.Seek(0x47); // skip first 7 characters of content_id - file.Read(pkgTitleID); - - u32 offset = pkgheader.pkg_table_entry_offset; - u32 n_files = pkgheader.pkg_table_entry_count; - - if (!file.Seek(offset)) { - failreason = "Failed to seek to PKG table entry offset"; - return false; - } - - for (int i = 0; i < n_files; i++) { - PKGEntry entry{}; - file.Read(entry.id); - file.Read(entry.filename_offset); - file.Read(entry.flags1); - file.Read(entry.flags2); - file.Read(entry.offset); - file.Read(entry.size); - file.Seek(8, Common::FS::SeekOrigin::CurrentPosition); - - // Try to figure out the name - const auto name = GetEntryNameByType(entry.id); - if (name == "param.sfo") { - sfo.clear(); - if (!file.Seek(entry.offset)) { - failreason = "Failed to seek to param.sfo offset"; - return false; - } - sfo.resize(entry.size); - file.ReadRaw(sfo.data(), entry.size); - } - } - file.Close(); - - return true; -} - -bool PKG::Extract(const std::filesystem::path& filepath, const std::filesystem::path& extract, - std::string& failreason) { - extract_path = extract; - pkgpath = filepath; - Common::FS::IOFile file(filepath, Common::FS::FileAccessMode::Read); - if (!file.IsOpen()) { - return false; - } - pkgSize = file.GetSize(); - file.ReadRaw(&pkgheader, sizeof(PKGHeader)); - - if (pkgheader.magic != 0x7F434E54) - return false; - - if (pkgheader.pkg_size > pkgSize) { - failreason = "PKG file size is different"; - return false; - } - if ((pkgheader.pkg_content_size + pkgheader.pkg_content_offset) > pkgheader.pkg_size) { - failreason = "Content size is bigger than pkg size"; - return false; - } - - u32 offset = pkgheader.pkg_table_entry_offset; - u32 n_files = pkgheader.pkg_table_entry_count; - - std::array concatenated_ivkey_dk3; - std::array seed_digest; - std::array, 7> digest1; - std::array, 7> key1; - std::array imgkeydata; - - if (!file.Seek(offset)) { - failreason = "Failed to seek to PKG table entry offset"; - return false; - } - - for (int i = 0; i < n_files; i++) { - PKGEntry entry{}; - file.Read(entry.id); - file.Read(entry.filename_offset); - file.Read(entry.flags1); - file.Read(entry.flags2); - file.Read(entry.offset); - file.Read(entry.size); - file.Seek(8, Common::FS::SeekOrigin::CurrentPosition); - - auto currentPos = file.Tell(); - - // Try to figure out the name - const auto name = GetEntryNameByType(entry.id); - const auto filepath = extract_path / "sce_sys" / name; - std::filesystem::create_directories(filepath.parent_path()); - - if (name.empty()) { - // Just print with id - Common::FS::IOFile out(extract_path / "sce_sys" / std::to_string(entry.id), - Common::FS::FileAccessMode::Write); - if (!file.Seek(entry.offset)) { - failreason = "Failed to seek to PKG entry offset"; - return false; - } - - std::vector data; - data.resize(entry.size); - file.ReadRaw(data.data(), entry.size); - out.WriteRaw(data.data(), entry.size); - out.Close(); - - file.Seek(currentPos); - continue; - } - - if (entry.id == 0x1) { // DIGESTS, seek; - // file.Seek(entry.offset, fsSeekSet); - } else if (entry.id == 0x10) { // ENTRY_KEYS, seek; - file.Seek(entry.offset); - file.Read(seed_digest); - - for (int i = 0; i < 7; i++) { - file.Read(digest1[i]); - } - - for (int i = 0; i < 7; i++) { - file.Read(key1[i]); - } - - PKG::crypto.RSA2048Decrypt(dk3_, key1[3], true); // decrypt DK3 - } else if (entry.id == 0x20) { // IMAGE_KEY, seek; IV_KEY - file.Seek(entry.offset); - file.Read(imgkeydata); - - // The Concatenated iv + dk3 imagekey for HASH256 - std::memcpy(concatenated_ivkey_dk3.data(), &entry, sizeof(entry)); - std::memcpy(concatenated_ivkey_dk3.data() + sizeof(entry), dk3_.data(), sizeof(dk3_)); - - PKG::crypto.ivKeyHASH256(concatenated_ivkey_dk3, ivKey); // ivkey_ - // imgkey_ to use for last step to get ekpfs - PKG::crypto.aesCbcCfb128Decrypt(ivKey, imgkeydata, imgKey); - // ekpfs key to get data and tweak keys. - PKG::crypto.RSA2048Decrypt(ekpfsKey, imgKey, false); - } else if (entry.id == 0x80) { - // GENERAL_DIGESTS, seek; - // file.Seek(entry.offset, fsSeekSet); - } - - Common::FS::IOFile out(extract_path / "sce_sys" / name, Common::FS::FileAccessMode::Write); - if (!file.Seek(entry.offset)) { - failreason = "Failed to seek to PKG entry offset"; - return false; - } - - std::vector data; - data.resize(entry.size); - file.ReadRaw(data.data(), entry.size); - out.WriteRaw(data.data(), entry.size); - out.Close(); - - // Decrypt Np stuff and overwrite. - if (entry.id == 0x400 || entry.id == 0x401 || entry.id == 0x402 || - entry.id == 0x403) { // somehow 0x401 is not decrypting - decNp.resize(entry.size); - if (!file.Seek(entry.offset)) { - failreason = "Failed to seek to PKG entry offset"; - return false; - } - - std::vector data; - data.resize(entry.size); - file.ReadRaw(data.data(), entry.size); - - std::span cipherNp(data.data(), entry.size); - std::array concatenated_ivkey_dk3_; - std::memcpy(concatenated_ivkey_dk3_.data(), &entry, sizeof(entry)); - std::memcpy(concatenated_ivkey_dk3_.data() + sizeof(entry), dk3_.data(), sizeof(dk3_)); - PKG::crypto.ivKeyHASH256(concatenated_ivkey_dk3_, ivKey); - PKG::crypto.aesCbcCfb128DecryptEntry(ivKey, cipherNp, decNp); - - Common::FS::IOFile out(extract_path / "sce_sys" / name, - Common::FS::FileAccessMode::Write); - out.Write(decNp); - out.Close(); - } - - file.Seek(currentPos); - } - - // Read the seed - std::array seed; - if (!file.Seek(pkgheader.pfs_image_offset + 0x370)) { - failreason = "Failed to seek to PFS image offset"; - return false; - } - file.Read(seed); - - // Get data and tweak keys. - PKG::crypto.PfsGenCryptoKey(ekpfsKey, seed, dataKey, tweakKey); - const u32 length = pkgheader.pfs_cache_size * 0x2; // Seems to be ok. - - int num_blocks = 0; - std::vector pfsc(length); - if (length != 0) { - // Read encrypted pfs_image - std::vector pfs_encrypted(length); - file.Seek(pkgheader.pfs_image_offset); - file.Read(pfs_encrypted); - file.Close(); - // Decrypt the pfs_image. - std::vector pfs_decrypted(length); - PKG::crypto.decryptPFS(dataKey, tweakKey, pfs_encrypted, pfs_decrypted, 0); - - // Retrieve PFSC from decrypted pfs_image. - pfsc_offset = GetPFSCOffset(pfs_decrypted); - std::memcpy(pfsc.data(), pfs_decrypted.data() + pfsc_offset, length - pfsc_offset); - - PFSCHdr pfsChdr; - std::memcpy(&pfsChdr, pfsc.data(), sizeof(pfsChdr)); - - num_blocks = (int)(pfsChdr.data_length / pfsChdr.block_sz2); - sectorMap.resize(num_blocks + 1); // 8 bytes, need extra 1 to get the last offset. - - for (int i = 0; i < num_blocks + 1; i++) { - std::memcpy(§orMap[i], pfsc.data() + pfsChdr.block_offsets + i * 8, 8); - } - } - - u32 ent_size = 0; - u32 ndinode = 0; - int ndinode_counter = 0; - bool dinode_reached = false; - bool uroot_reached = false; - std::vector compressedData; - std::vector decompressedData(0x10000); - - // Get iNdoes and Dirents. - for (int i = 0; i < num_blocks; i++) { - const u64 sectorOffset = sectorMap[i]; - const u64 sectorSize = sectorMap[i + 1] - sectorOffset; - - compressedData.resize(sectorSize); - std::memcpy(compressedData.data(), pfsc.data() + sectorOffset, sectorSize); - - if (sectorSize == 0x10000) // Uncompressed data - std::memcpy(decompressedData.data(), compressedData.data(), 0x10000); - else if (sectorSize < 0x10000) // Compressed data - DecompressPFSC(compressedData, decompressedData); - - if (i == 0) { - std::memcpy(&ndinode, decompressedData.data() + 0x30, 4); // number of folders and files - } - - int occupied_blocks = - (ndinode * 0xA8) / 0x10000; // how many blocks(0x10000) are taken by iNodes. - if (((ndinode * 0xA8) % 0x10000) != 0) - occupied_blocks += 1; - - if (i >= 1 && i <= occupied_blocks) { // Get all iNodes, gives type, file size and location. - for (int p = 0; p < 0x10000; p += 0xA8) { - Inode node; - std::memcpy(&node, &decompressedData[p], sizeof(node)); - if (node.Mode == 0) { - break; - } - iNodeBuf.push_back(node); - } - } - - // 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; - } - - if (uroot_reached) { - for (int i = 0; i < 0x10000; i += ent_size) { - Dirent dirent; - std::memcpy(&dirent, &decompressedData[i], sizeof(dirent)); - ent_size = dirent.entsize; - if (dirent.ino != 0) { - ndinode_counter++; - } else { - // Set the the folder according to the current inode. - // Can be 2 or more (rarely) - auto parent_path = extract_path.parent_path(); - auto title_id = GetTitleID(); - - if (parent_path.filename() != title_id && - !fmt::UTF(extract_path.u8string()).data.ends_with("-UPDATE")) { - extractPaths[ndinode_counter] = parent_path / title_id; - } else { - // DLCs path has different structure - extractPaths[ndinode_counter] = extract_path; - } - uroot_reached = false; - break; - } - } - } - - const char dot = decompressedData[0x10]; - const std::string_view dotdot(&decompressedData[0x28], 2); - if (dot == '.' && dotdot == "..") { - dinode_reached = true; - } - - // Get folder and file names. - bool end_reached = false; - if (dinode_reached) { - for (int j = 0; j < 0x10000; j += ent_size) { // Skip the first parent and child. - Dirent dirent; - std::memcpy(&dirent, &decompressedData[j], sizeof(dirent)); - - // Stop here and continue the main loop - if (dirent.ino == 0) { - break; - } - - ent_size = dirent.entsize; - auto& table = fsTable.emplace_back(); - table.name = std::string(dirent.name, dirent.namelen); - table.inode = dirent.ino; - table.type = dirent.type; - - if (table.type == PFS_CURRENT_DIR) { - current_dir = extractPaths[table.inode]; - } - extractPaths[table.inode] = current_dir / std::filesystem::path(table.name); - - if (table.type == PFS_FILE || table.type == PFS_DIR) { - if (table.type == PFS_DIR) { // Create dirs. - std::filesystem::create_directory(extractPaths[table.inode]); - } - ndinode_counter++; - if ((ndinode_counter + 1) == ndinode) // 1 for the image itself (root). - end_reached = true; - } - } - if (end_reached) { - break; - } - } - } - return true; -} - -void PKG::ExtractFiles(const int index) { - int inode_number = fsTable[index].inode; - int inode_type = fsTable[index].type; - std::string inode_name = fsTable[index].name; - - if (inode_type == PFS_FILE) { - int sector_loc = iNodeBuf[inode_number].loc; - int nblocks = iNodeBuf[inode_number].Blocks; - int bsize = iNodeBuf[inode_number].Size; - - Common::FS::IOFile inflated; - inflated.Open(extractPaths[inode_number], Common::FS::FileAccessMode::Write); - - Common::FS::IOFile pkgFile; // Open the file for each iteration to avoid conflict. - pkgFile.Open(pkgpath, Common::FS::FileAccessMode::Read); - - int size_decompressed = 0; - std::vector compressedData; - std::vector decompressedData(0x10000); - - u64 pfsc_buf_size = 0x11000; // extra 0x1000 - std::vector pfsc(pfsc_buf_size); - std::vector pfs_decrypted(pfsc_buf_size); - - for (int j = 0; j < nblocks; j++) { - u64 sectorOffset = - sectorMap[sector_loc + j]; // offset into PFSC_image and not pfs_image. - u64 sectorSize = sectorMap[sector_loc + j + 1] - - sectorOffset; // indicates if data is compressed or not. - u64 fileOffset = (pkgheader.pfs_image_offset + pfsc_offset + sectorOffset); - u64 currentSector1 = - (pfsc_offset + sectorOffset) / 0x1000; // block size is 0x1000 for xts decryption. - - int sectorOffsetMask = (sectorOffset + pfsc_offset) & 0xFFFFF000; - int previousData = (sectorOffset + pfsc_offset) - sectorOffsetMask; - - pkgFile.Seek(fileOffset - previousData); - pkgFile.Read(pfsc); - - PKG::crypto.decryptPFS(dataKey, tweakKey, pfsc, pfs_decrypted, currentSector1); - - compressedData.resize(sectorSize); - std::memcpy(compressedData.data(), pfs_decrypted.data() + previousData, sectorSize); - - if (sectorSize == 0x10000) // Uncompressed data - std::memcpy(decompressedData.data(), compressedData.data(), 0x10000); - else if (sectorSize < 0x10000) // Compressed data - DecompressPFSC(compressedData, decompressedData); - - size_decompressed += 0x10000; - - if (j < nblocks - 1) { - inflated.WriteRaw(decompressedData.data(), decompressedData.size()); - } else { - // This is to remove the zeros at the end of the file. - const u32 write_size = decompressedData.size() - (size_decompressed - bsize); - inflated.WriteRaw(decompressedData.data(), write_size); - } - } - pkgFile.Close(); - inflated.Close(); - } -} diff --git a/src/core/file_format/pkg.h b/src/core/file_format/pkg.h deleted file mode 100644 index a488a2df8..000000000 --- a/src/core/file_format/pkg.h +++ /dev/null @@ -1,174 +0,0 @@ -// SPDX-FileCopyrightText: Copyright 2024 shadPS4 Emulator Project -// SPDX-License-Identifier: GPL-2.0-or-later - -#pragma once - -#include -#include -#include -#include -#include -#include "common/endian.h" -#include "core/crypto/crypto.h" -#include "pfs.h" -#include "trp.h" - -struct PKGHeader { - u32_be magic; // Magic - u32_be pkg_type; - u32_be pkg_0x8; // unknown field - u32_be pkg_file_count; - u32_be pkg_table_entry_count; - u16_be pkg_sc_entry_count; - u16_be pkg_table_entry_count_2; // same as pkg_entry_count - u32_be pkg_table_entry_offset; // file table offset - u32_be pkg_sc_entry_data_size; - u64_be pkg_body_offset; // offset of PKG entries - u64_be pkg_body_size; // length of all PKG entries - u64_be pkg_content_offset; - u64_be pkg_content_size; - u8 pkg_content_id[0x24]; // packages' content ID as a 36-byte string - u8 pkg_padding[0xC]; // padding - u32_be pkg_drm_type; // DRM type - u32_be pkg_content_type; // Content type - u32_be pkg_content_flags; // Content flags - u32_be pkg_promote_size; - u32_be pkg_version_date; - u32_be pkg_version_hash; - u32_be pkg_0x088; - u32_be pkg_0x08C; - u32_be pkg_0x090; - u32_be pkg_0x094; - u32_be pkg_iro_tag; - u32_be pkg_drm_type_version; - - u8 pkg_zeroes_1[0x60]; - - /* Digest table */ - u8 digest_entries1[0x20]; // sha256 digest for main entry 1 - u8 digest_entries2[0x20]; // sha256 digest for main entry 2 - u8 digest_table_digest[0x20]; // sha256 digest for digest table - u8 digest_body_digest[0x20]; // sha256 digest for main table - - u8 pkg_zeroes_2[0x280]; - - u32_be pkg_0x400; - - u32_be pfs_image_count; // count of PFS images - u64_be pfs_image_flags; // PFS flags - u64_be pfs_image_offset; // offset to start of external PFS image - u64_be pfs_image_size; // size of external PFS image - u64_be mount_image_offset; - u64_be mount_image_size; - u64_be pkg_size; - u32_be pfs_signed_size; - u32_be pfs_cache_size; - u8 pfs_image_digest[0x20]; - u8 pfs_signed_digest[0x20]; - u64_be pfs_split_size_nth_0; - u64_be pfs_split_size_nth_1; - - u8 pkg_zeroes_3[0xB50]; - - u8 pkg_digest[0x20]; -}; - -enum class PKGContentFlag { - FIRST_PATCH = 0x100000, - PATCHGO = 0x200000, - REMASTER = 0x400000, - PS_CLOUD = 0x800000, - GD_AC = 0x2000000, - NON_GAME = 0x4000000, - UNKNOWN_0x8000000 = 0x8000000, - SUBSEQUENT_PATCH = 0x40000000, - DELTA_PATCH = 0x41000000, - CUMULATIVE_PATCH = 0x60000000 -}; - -struct PKGEntry { - u32_be id; // File ID, useful for files without a filename entry - u32_be filename_offset; // Offset into the filenames table (ID 0x200) where this file's name is - // located - u32_be flags1; // Flags including encrypted flag, etc - u32_be flags2; // Flags including encryption key index, etc - u32_be offset; // Offset into PKG to find the file - u32_be size; // Size of the file - u64_be padding; // blank padding -}; -static_assert(sizeof(PKGEntry) == 32); - -class PKG { -public: - PKG(); - ~PKG(); - - bool Open(const std::filesystem::path& filepath, std::string& failreason); - void ExtractFiles(const int index); - bool Extract(const std::filesystem::path& filepath, const std::filesystem::path& extract, - std::string& failreason); - - std::vector sfo; - - u32 GetNumberOfFiles() { - return fsTable.size(); - } - - u64 GetPkgSize() { - return pkgSize; - } - - std::string GetPkgFlags() { - return pkgFlags; - } - - std::string_view GetTitleID() { - return std::string_view(pkgTitleID, 9); - } - - PKGHeader GetPkgHeader() { - return pkgheader; - } - - static bool isFlagSet(u32_be variable, PKGContentFlag flag) { - return (variable) & static_cast(flag); - } - - static constexpr std::array, 10> flagNames = { - {{PKGContentFlag::FIRST_PATCH, "FIRST_PATCH"}, - {PKGContentFlag::PATCHGO, "PATCHGO"}, - {PKGContentFlag::REMASTER, "REMASTER"}, - {PKGContentFlag::PS_CLOUD, "PS_CLOUD"}, - {PKGContentFlag::GD_AC, "GD_AC"}, - {PKGContentFlag::NON_GAME, "NON_GAME"}, - {PKGContentFlag::UNKNOWN_0x8000000, "UNKNOWN_0x8000000"}, - {PKGContentFlag::SUBSEQUENT_PATCH, "SUBSEQUENT_PATCH"}, - {PKGContentFlag::DELTA_PATCH, "DELTA_PATCH"}, - {PKGContentFlag::CUMULATIVE_PATCH, "CUMULATIVE_PATCH"}}}; - -private: - Crypto crypto; - TRP trp; - u64 pkgSize = 0; - char pkgTitleID[9]; - PKGHeader pkgheader; - std::string pkgFlags; - - std::unordered_map extractPaths; - std::vector fsTable; - std::vector iNodeBuf; - std::vector sectorMap; - u64 pfsc_offset; - - std::array dk3_; - std::array ivKey; - std::array imgKey; - std::array ekpfsKey; - std::array dataKey; - std::array tweakKey; - std::vector decNp; - - std::filesystem::path pkgpath; - std::filesystem::path current_dir; - std::filesystem::path extract_path; -}; diff --git a/src/core/file_format/pkg_type.cpp b/src/core/file_format/pkg_type.cpp deleted file mode 100644 index 464f0b993..000000000 --- a/src/core/file_format/pkg_type.cpp +++ /dev/null @@ -1,638 +0,0 @@ -// SPDX-FileCopyrightText: Copyright 2024 shadPS4 Emulator Project -// SPDX-License-Identifier: GPL-2.0-or-later - -#include -#include -#include "pkg_type.h" - -struct PkgEntryValue { - u32 type; - std::string_view name; - - operator u32() const noexcept { - return type; - } -}; - -constexpr static std::array PkgEntries = {{ - {0x0001, "digests"}, - {0x0010, "entry_keys"}, - {0x0020, "image_key"}, - {0x0080, "general_digests"}, - {0x0100, "metas"}, - {0x0200, "entry_names"}, - {0x0400, "license.dat"}, - {0x0401, "license.info"}, - {0x0402, "nptitle.dat"}, - {0x0403, "npbind.dat"}, - {0x0404, "selfinfo.dat"}, - {0x0406, "imageinfo.dat"}, - {0x0407, "target-deltainfo.dat"}, - {0x0408, "origin-deltainfo.dat"}, - {0x0409, "psreserved.dat"}, - {0x1000, "param.sfo"}, - {0x1001, "playgo-chunk.dat"}, - {0x1002, "playgo-chunk.sha"}, - {0x1003, "playgo-manifest.xml"}, - {0x1004, "pronunciation.xml"}, - {0x1005, "pronunciation.sig"}, - {0x1006, "pic1.png"}, - {0x1007, "pubtoolinfo.dat"}, - {0x1008, "app/playgo-chunk.dat"}, - {0x1009, "app/playgo-chunk.sha"}, - {0x100A, "app/playgo-manifest.xml"}, - {0x100B, "shareparam.json"}, - {0x100C, "shareoverlayimage.png"}, - {0x100D, "save_data.png"}, - {0x100E, "shareprivacyguardimage.png"}, - {0x1200, "icon0.png"}, - {0x1201, "icon0_00.png"}, - {0x1202, "icon0_01.png"}, - {0x1203, "icon0_02.png"}, - {0x1204, "icon0_03.png"}, - {0x1205, "icon0_04.png"}, - {0x1206, "icon0_05.png"}, - {0x1207, "icon0_06.png"}, - {0x1208, "icon0_07.png"}, - {0x1209, "icon0_08.png"}, - {0x120A, "icon0_09.png"}, - {0x120B, "icon0_10.png"}, - {0x120C, "icon0_11.png"}, - {0x120D, "icon0_12.png"}, - {0x120E, "icon0_13.png"}, - {0x120F, "icon0_14.png"}, - {0x1210, "icon0_15.png"}, - {0x1211, "icon0_16.png"}, - {0x1212, "icon0_17.png"}, - {0x1213, "icon0_18.png"}, - {0x1214, "icon0_19.png"}, - {0x1215, "icon0_20.png"}, - {0x1216, "icon0_21.png"}, - {0x1217, "icon0_22.png"}, - {0x1218, "icon0_23.png"}, - {0x1219, "icon0_24.png"}, - {0x121A, "icon0_25.png"}, - {0x121B, "icon0_26.png"}, - {0x121C, "icon0_27.png"}, - {0x121D, "icon0_28.png"}, - {0x121E, "icon0_29.png"}, - {0x121F, "icon0_30.png"}, - {0x1220, "pic0.png"}, - {0x1240, "snd0.at9"}, - {0x1241, "pic1_00.png"}, - {0x1242, "pic1_01.png"}, - {0x1243, "pic1_02.png"}, - {0x1244, "pic1_03.png"}, - {0x1245, "pic1_04.png"}, - {0x1246, "pic1_05.png"}, - {0x1247, "pic1_06.png"}, - {0x1248, "pic1_07.png"}, - {0x1249, "pic1_08.png"}, - {0x124A, "pic1_09.png"}, - {0x124B, "pic1_10.png"}, - {0x124C, "pic1_11.png"}, - {0x124D, "pic1_12.png"}, - {0x124E, "pic1_13.png"}, - {0x124F, "pic1_14.png"}, - {0x1250, "pic1_15.png"}, - {0x1251, "pic1_16.png"}, - {0x1252, "pic1_17.png"}, - {0x1253, "pic1_18.png"}, - {0x1254, "pic1_19.png"}, - {0x1255, "pic1_20.png"}, - {0x1256, "pic1_21.png"}, - {0x1257, "pic1_22.png"}, - {0x1258, "pic1_23.png"}, - {0x1259, "pic1_24.png"}, - {0x125A, "pic1_25.png"}, - {0x125B, "pic1_26.png"}, - {0x125C, "pic1_27.png"}, - {0x125D, "pic1_28.png"}, - {0x125E, "pic1_29.png"}, - {0x125F, "pic1_30.png"}, - {0x1260, "changeinfo/changeinfo.xml"}, - {0x1261, "changeinfo/changeinfo_00.xml"}, - {0x1262, "changeinfo/changeinfo_01.xml"}, - {0x1263, "changeinfo/changeinfo_02.xml"}, - {0x1264, "changeinfo/changeinfo_03.xml"}, - {0x1265, "changeinfo/changeinfo_04.xml"}, - {0x1266, "changeinfo/changeinfo_05.xml"}, - {0x1267, "changeinfo/changeinfo_06.xml"}, - {0x1268, "changeinfo/changeinfo_07.xml"}, - {0x1269, "changeinfo/changeinfo_08.xml"}, - {0x126A, "changeinfo/changeinfo_09.xml"}, - {0x126B, "changeinfo/changeinfo_10.xml"}, - {0x126C, "changeinfo/changeinfo_11.xml"}, - {0x126D, "changeinfo/changeinfo_12.xml"}, - {0x126E, "changeinfo/changeinfo_13.xml"}, - {0x126F, "changeinfo/changeinfo_14.xml"}, - {0x1270, "changeinfo/changeinfo_15.xml"}, - {0x1271, "changeinfo/changeinfo_16.xml"}, - {0x1272, "changeinfo/changeinfo_17.xml"}, - {0x1273, "changeinfo/changeinfo_18.xml"}, - {0x1274, "changeinfo/changeinfo_19.xml"}, - {0x1275, "changeinfo/changeinfo_20.xml"}, - {0x1276, "changeinfo/changeinfo_21.xml"}, - {0x1277, "changeinfo/changeinfo_22.xml"}, - {0x1278, "changeinfo/changeinfo_23.xml"}, - {0x1279, "changeinfo/changeinfo_24.xml"}, - {0x127A, "changeinfo/changeinfo_25.xml"}, - {0x127B, "changeinfo/changeinfo_26.xml"}, - {0x127C, "changeinfo/changeinfo_27.xml"}, - {0x127D, "changeinfo/changeinfo_28.xml"}, - {0x127E, "changeinfo/changeinfo_29.xml"}, - {0x127F, "changeinfo/changeinfo_30.xml"}, - {0x1280, "icon0.dds"}, - {0x1281, "icon0_00.dds"}, - {0x1282, "icon0_01.dds"}, - {0x1283, "icon0_02.dds"}, - {0x1284, "icon0_03.dds"}, - {0x1285, "icon0_04.dds"}, - {0x1286, "icon0_05.dds"}, - {0x1287, "icon0_06.dds"}, - {0x1288, "icon0_07.dds"}, - {0x1289, "icon0_08.dds"}, - {0x128A, "icon0_09.dds"}, - {0x128B, "icon0_10.dds"}, - {0x128C, "icon0_11.dds"}, - {0x128D, "icon0_12.dds"}, - {0x128E, "icon0_13.dds"}, - {0x128F, "icon0_14.dds"}, - {0x1290, "icon0_15.dds"}, - {0x1291, "icon0_16.dds"}, - {0x1292, "icon0_17.dds"}, - {0x1293, "icon0_18.dds"}, - {0x1294, "icon0_19.dds"}, - {0x1295, "icon0_20.dds"}, - {0x1296, "icon0_21.dds"}, - {0x1297, "icon0_22.dds"}, - {0x1298, "icon0_23.dds"}, - {0x1299, "icon0_24.dds"}, - {0x129A, "icon0_25.dds"}, - {0x129B, "icon0_26.dds"}, - {0x129C, "icon0_27.dds"}, - {0x129D, "icon0_28.dds"}, - {0x129E, "icon0_29.dds"}, - {0x129F, "icon0_30.dds"}, - {0x12A0, "pic0.dds"}, - {0x12C0, "pic1.dds"}, - {0x12C1, "pic1_00.dds"}, - {0x12C2, "pic1_01.dds"}, - {0x12C3, "pic1_02.dds"}, - {0x12C4, "pic1_03.dds"}, - {0x12C5, "pic1_04.dds"}, - {0x12C6, "pic1_05.dds"}, - {0x12C7, "pic1_06.dds"}, - {0x12C8, "pic1_07.dds"}, - {0x12C9, "pic1_08.dds"}, - {0x12CA, "pic1_09.dds"}, - {0x12CB, "pic1_10.dds"}, - {0x12CC, "pic1_11.dds"}, - {0x12CD, "pic1_12.dds"}, - {0x12CE, "pic1_13.dds"}, - {0x12CF, "pic1_14.dds"}, - {0x12D0, "pic1_15.dds"}, - {0x12D1, "pic1_16.dds"}, - {0x12D2, "pic1_17.dds"}, - {0x12D3, "pic1_18.dds"}, - {0x12D4, "pic1_19.dds"}, - {0x12D5, "pic1_20.dds"}, - {0x12D6, "pic1_21.dds"}, - {0x12D7, "pic1_22.dds"}, - {0x12D8, "pic1_23.dds"}, - {0x12D9, "pic1_24.dds"}, - {0x12DA, "pic1_25.dds"}, - {0x12DB, "pic1_26.dds"}, - {0x12DC, "pic1_27.dds"}, - {0x12DD, "pic1_28.dds"}, - {0x12DE, "pic1_29.dds"}, - {0x12DF, "pic1_30.dds"}, - {0x1400, "trophy/trophy00.trp"}, - {0x1401, "trophy/trophy01.trp"}, - {0x1402, "trophy/trophy02.trp"}, - {0x1403, "trophy/trophy03.trp"}, - {0x1404, "trophy/trophy04.trp"}, - {0x1405, "trophy/trophy05.trp"}, - {0x1406, "trophy/trophy06.trp"}, - {0x1407, "trophy/trophy07.trp"}, - {0x1408, "trophy/trophy08.trp"}, - {0x1409, "trophy/trophy09.trp"}, - {0x140A, "trophy/trophy10.trp"}, - {0x140B, "trophy/trophy11.trp"}, - {0x140C, "trophy/trophy12.trp"}, - {0x140D, "trophy/trophy13.trp"}, - {0x140E, "trophy/trophy14.trp"}, - {0x140F, "trophy/trophy15.trp"}, - {0x1410, "trophy/trophy16.trp"}, - {0x1411, "trophy/trophy17.trp"}, - {0x1412, "trophy/trophy18.trp"}, - {0x1413, "trophy/trophy19.trp"}, - {0x1414, "trophy/trophy20.trp"}, - {0x1415, "trophy/trophy21.trp"}, - {0x1416, "trophy/trophy22.trp"}, - {0x1417, "trophy/trophy23.trp"}, - {0x1418, "trophy/trophy24.trp"}, - {0x1419, "trophy/trophy25.trp"}, - {0x141A, "trophy/trophy26.trp"}, - {0x141B, "trophy/trophy27.trp"}, - {0x141C, "trophy/trophy28.trp"}, - {0x141D, "trophy/trophy29.trp"}, - {0x141E, "trophy/trophy30.trp"}, - {0x141F, "trophy/trophy31.trp"}, - {0x1420, "trophy/trophy32.trp"}, - {0x1421, "trophy/trophy33.trp"}, - {0x1422, "trophy/trophy34.trp"}, - {0x1423, "trophy/trophy35.trp"}, - {0x1424, "trophy/trophy36.trp"}, - {0x1425, "trophy/trophy37.trp"}, - {0x1426, "trophy/trophy38.trp"}, - {0x1427, "trophy/trophy39.trp"}, - {0x1428, "trophy/trophy40.trp"}, - {0x1429, "trophy/trophy41.trp"}, - {0x142A, "trophy/trophy42.trp"}, - {0x142B, "trophy/trophy43.trp"}, - {0x142C, "trophy/trophy44.trp"}, - {0x142D, "trophy/trophy45.trp"}, - {0x142E, "trophy/trophy46.trp"}, - {0x142F, "trophy/trophy47.trp"}, - {0x1430, "trophy/trophy48.trp"}, - {0x1431, "trophy/trophy49.trp"}, - {0x1432, "trophy/trophy50.trp"}, - {0x1433, "trophy/trophy51.trp"}, - {0x1434, "trophy/trophy52.trp"}, - {0x1435, "trophy/trophy53.trp"}, - {0x1436, "trophy/trophy54.trp"}, - {0x1437, "trophy/trophy55.trp"}, - {0x1438, "trophy/trophy56.trp"}, - {0x1439, "trophy/trophy57.trp"}, - {0x143A, "trophy/trophy58.trp"}, - {0x143B, "trophy/trophy59.trp"}, - {0x143C, "trophy/trophy60.trp"}, - {0x143D, "trophy/trophy61.trp"}, - {0x143E, "trophy/trophy62.trp"}, - {0x143F, "trophy/trophy63.trp"}, - {0x1440, "trophy/trophy64.trp"}, - {0x1441, "trophy/trophy65.trp"}, - {0x1442, "trophy/trophy66.trp"}, - {0x1443, "trophy/trophy67.trp"}, - {0x1444, "trophy/trophy68.trp"}, - {0x1445, "trophy/trophy69.trp"}, - {0x1446, "trophy/trophy70.trp"}, - {0x1447, "trophy/trophy71.trp"}, - {0x1448, "trophy/trophy72.trp"}, - {0x1449, "trophy/trophy73.trp"}, - {0x144A, "trophy/trophy74.trp"}, - {0x144B, "trophy/trophy75.trp"}, - {0x144C, "trophy/trophy76.trp"}, - {0x144D, "trophy/trophy77.trp"}, - {0x144E, "trophy/trophy78.trp"}, - {0x144F, "trophy/trophy79.trp"}, - {0x1450, "trophy/trophy80.trp"}, - {0x1451, "trophy/trophy81.trp"}, - {0x1452, "trophy/trophy82.trp"}, - {0x1453, "trophy/trophy83.trp"}, - {0x1454, "trophy/trophy84.trp"}, - {0x1455, "trophy/trophy85.trp"}, - {0x1456, "trophy/trophy86.trp"}, - {0x1457, "trophy/trophy87.trp"}, - {0x1458, "trophy/trophy88.trp"}, - {0x1459, "trophy/trophy89.trp"}, - {0x145A, "trophy/trophy90.trp"}, - {0x145B, "trophy/trophy91.trp"}, - {0x145C, "trophy/trophy92.trp"}, - {0x145D, "trophy/trophy93.trp"}, - {0x145E, "trophy/trophy94.trp"}, - {0x145F, "trophy/trophy95.trp"}, - {0x1460, "trophy/trophy96.trp"}, - {0x1461, "trophy/trophy97.trp"}, - {0x1462, "trophy/trophy98.trp"}, - {0x1463, "trophy/trophy99.trp"}, - {0x1600, "keymap_rp/001.png"}, - {0x1601, "keymap_rp/002.png"}, - {0x1602, "keymap_rp/003.png"}, - {0x1603, "keymap_rp/004.png"}, - {0x1604, "keymap_rp/005.png"}, - {0x1605, "keymap_rp/006.png"}, - {0x1606, "keymap_rp/007.png"}, - {0x1607, "keymap_rp/008.png"}, - {0x1608, "keymap_rp/009.png"}, - {0x1609, "keymap_rp/010.png"}, - {0x1610, "keymap_rp/00/001.png"}, - {0x1611, "keymap_rp/00/002.png"}, - {0x1612, "keymap_rp/00/003.png"}, - {0x1613, "keymap_rp/00/004.png"}, - {0x1614, "keymap_rp/00/005.png"}, - {0x1615, "keymap_rp/00/006.png"}, - {0x1616, "keymap_rp/00/007.png"}, - {0x1617, "keymap_rp/00/008.png"}, - {0x1618, "keymap_rp/00/009.png"}, - {0x1619, "keymap_rp/00/010.png"}, - {0x1620, "keymap_rp/01/001.png"}, - {0x1621, "keymap_rp/01/002.png"}, - {0x1622, "keymap_rp/01/003.png"}, - {0x1623, "keymap_rp/01/004.png"}, - {0x1624, "keymap_rp/01/005.png"}, - {0x1625, "keymap_rp/01/006.png"}, - {0x1626, "keymap_rp/01/007.png"}, - {0x1627, "keymap_rp/01/008.png"}, - {0x1628, "keymap_rp/01/009.png"}, - {0x1629, "keymap_rp/01/010.png"}, - {0x1630, "keymap_rp/02/001.png"}, - {0x1631, "keymap_rp/02/002.png"}, - {0x1632, "keymap_rp/02/003.png"}, - {0x1633, "keymap_rp/02/004.png"}, - {0x1634, "keymap_rp/02/005.png"}, - {0x1635, "keymap_rp/02/006.png"}, - {0x1636, "keymap_rp/02/007.png"}, - {0x1637, "keymap_rp/02/008.png"}, - {0x1638, "keymap_rp/02/009.png"}, - {0x1639, "keymap_rp/02/010.png"}, - {0x1640, "keymap_rp/03/001.png"}, - {0x1641, "keymap_rp/03/002.png"}, - {0x1642, "keymap_rp/03/003.png"}, - {0x1643, "keymap_rp/03/004.png"}, - {0x1644, "keymap_rp/03/005.png"}, - {0x1645, "keymap_rp/03/006.png"}, - {0x1646, "keymap_rp/03/007.png"}, - {0x1647, "keymap_rp/03/008.png"}, - {0x1648, "keymap_rp/03/0010.png"}, - {0x1650, "keymap_rp/04/001.png"}, - {0x1651, "keymap_rp/04/002.png"}, - {0x1652, "keymap_rp/04/003.png"}, - {0x1653, "keymap_rp/04/004.png"}, - {0x1654, "keymap_rp/04/005.png"}, - {0x1655, "keymap_rp/04/006.png"}, - {0x1656, "keymap_rp/04/007.png"}, - {0x1657, "keymap_rp/04/008.png"}, - {0x1658, "keymap_rp/04/009.png"}, - {0x1659, "keymap_rp/04/010.png"}, - {0x1660, "keymap_rp/05/001.png"}, - {0x1661, "keymap_rp/05/002.png"}, - {0x1662, "keymap_rp/05/003.png"}, - {0x1663, "keymap_rp/05/004.png"}, - {0x1664, "keymap_rp/05/005.png"}, - {0x1665, "keymap_rp/05/006.png"}, - {0x1666, "keymap_rp/05/007.png"}, - {0x1667, "keymap_rp/05/008.png"}, - {0x1668, "keymap_rp/05/009.png"}, - {0x1669, "keymap_rp/05/010.png"}, - {0x1670, "keymap_rp/06/001.png"}, - {0x1671, "keymap_rp/06/002.png"}, - {0x1672, "keymap_rp/06/003.png"}, - {0x1673, "keymap_rp/06/004.png"}, - {0x1674, "keymap_rp/06/005.png"}, - {0x1675, "keymap_rp/06/006.png"}, - {0x1676, "keymap_rp/06/007.png"}, - {0x1677, "keymap_rp/06/008.png"}, - {0x1678, "keymap_rp/06/009.png"}, - {0x1679, "keymap_rp/06/010.png"}, - {0x1680, "keymap_rp/07/001.png"}, - {0x1681, "keymap_rp/07/002.png"}, - {0x1682, "keymap_rp/07/003.png"}, - {0x1683, "keymap_rp/07/004.png"}, - {0x1684, "keymap_rp/07/005.png"}, - {0x1685, "keymap_rp/07/006.png"}, - {0x1686, "keymap_rp/07/007.png"}, - {0x1687, "keymap_rp/07/008.png"}, - {0x1688, "keymap_rp/07/009.png"}, - {0x1689, "keymap_rp/07/010.png"}, - {0x1690, "keymap_rp/08/001.png"}, - {0x1691, "keymap_rp/08/002.png"}, - {0x1692, "keymap_rp/08/003.png"}, - {0x1693, "keymap_rp/08/004.png"}, - {0x1694, "keymap_rp/08/005.png"}, - {0x1695, "keymap_rp/08/006.png"}, - {0x1696, "keymap_rp/08/007.png"}, - {0x1697, "keymap_rp/08/008.png"}, - {0x1698, "keymap_rp/08/009.png"}, - {0x1699, "keymap_rp/08/010.png"}, - {0x16A0, "keymap_rp/09/001.png"}, - {0x16A1, "keymap_rp/09/002.png"}, - {0x16A2, "keymap_rp/09/003.png"}, - {0x16A3, "keymap_rp/09/004.png"}, - {0x16A4, "keymap_rp/09/005.png"}, - {0x16A5, "keymap_rp/09/006.png"}, - {0x16A6, "keymap_rp/09/007.png"}, - {0x16A7, "keymap_rp/09/008.png"}, - {0x16A8, "keymap_rp/09/009.png"}, - {0x16A9, "keymap_rp/09/010.png"}, - {0x16B0, "keymap_rp/10/001.png"}, - {0x16B1, "keymap_rp/10/002.png"}, - {0x16B2, "keymap_rp/10/003.png"}, - {0x16B3, "keymap_rp/10/004.png"}, - {0x16B4, "keymap_rp/10/005.png"}, - {0x16B5, "keymap_rp/10/006.png"}, - {0x16B6, "keymap_rp/10/007.png"}, - {0x16B7, "keymap_rp/10/008.png"}, - {0x16B8, "keymap_rp/10/009.png"}, - {0x16B9, "keymap_rp/10/010.png"}, - {0x16C0, "keymap_rp/11/001.png"}, - {0x16C1, "keymap_rp/11/002.png"}, - {0x16C2, "keymap_rp/11/003.png"}, - {0x16C3, "keymap_rp/11/004.png"}, - {0x16C4, "keymap_rp/11/005.png"}, - {0x16C5, "keymap_rp/11/006.png"}, - {0x16C6, "keymap_rp/11/007.png"}, - {0x16C7, "keymap_rp/11/008.png"}, - {0x16C8, "keymap_rp/11/009.png"}, - {0x16C9, "keymap_rp/11/010.png"}, - {0x16D0, "keymap_rp/12/001.png"}, - {0x16D1, "keymap_rp/12/002.png"}, - {0x16D2, "keymap_rp/12/003.png"}, - {0x16D3, "keymap_rp/12/004.png"}, - {0x16D4, "keymap_rp/12/005.png"}, - {0x16D5, "keymap_rp/12/006.png"}, - {0x16D6, "keymap_rp/12/007.png"}, - {0x16D7, "keymap_rp/12/008.png"}, - {0x16D8, "keymap_rp/12/009.png"}, - {0x16D9, "keymap_rp/12/010.png"}, - {0x16E0, "keymap_rp/13/001.png"}, - {0x16E1, "keymap_rp/13/002.png"}, - {0x16E2, "keymap_rp/13/003.png"}, - {0x16E3, "keymap_rp/13/004.png"}, - {0x16E4, "keymap_rp/13/005.png"}, - {0x16E5, "keymap_rp/13/006.png"}, - {0x16E6, "keymap_rp/13/007.png"}, - {0x16E7, "keymap_rp/13/008.png"}, - {0x16E8, "keymap_rp/13/009.png"}, - {0x16E9, "keymap_rp/13/010.png"}, - {0x16F0, "keymap_rp/14/001.png"}, - {0x16F1, "keymap_rp/14/002.png"}, - {0x16F2, "keymap_rp/14/003.png"}, - {0x16F3, "keymap_rp/14/004.png"}, - {0x16F4, "keymap_rp/14/005.png"}, - {0x16F5, "keymap_rp/14/006.png"}, - {0x16F6, "keymap_rp/14/007.png"}, - {0x16F7, "keymap_rp/14/008.png"}, - {0x16F8, "keymap_rp/14/009.png"}, - {0x16F9, "keymap_rp/14/010.png"}, - {0x1700, "keymap_rp/15/001.png"}, - {0x1701, "keymap_rp/15/002.png"}, - {0x1702, "keymap_rp/15/003.png"}, - {0x1703, "keymap_rp/15/004.png"}, - {0x1704, "keymap_rp/15/005.png"}, - {0x1705, "keymap_rp/15/006.png"}, - {0x1706, "keymap_rp/15/007.png"}, - {0x1707, "keymap_rp/15/008.png"}, - {0x1708, "keymap_rp/15/009.png"}, - {0x1709, "keymap_rp/15/010.png"}, - {0x1710, "keymap_rp/16/001.png"}, - {0x1711, "keymap_rp/16/002.png"}, - {0x1712, "keymap_rp/16/003.png"}, - {0x1713, "keymap_rp/16/004.png"}, - {0x1714, "keymap_rp/16/005.png"}, - {0x1715, "keymap_rp/16/006.png"}, - {0x1716, "keymap_rp/16/007.png"}, - {0x1717, "keymap_rp/16/008.png"}, - {0x1718, "keymap_rp/16/009.png"}, - {0x1719, "keymap_rp/16/010.png"}, - {0x1720, "keymap_rp/17/001.png"}, - {0x1721, "keymap_rp/17/002.png"}, - {0x1722, "keymap_rp/17/003.png"}, - {0x1723, "keymap_rp/17/004.png"}, - {0x1724, "keymap_rp/17/005.png"}, - {0x1725, "keymap_rp/17/006.png"}, - {0x1726, "keymap_rp/17/007.png"}, - {0x1727, "keymap_rp/17/008.png"}, - {0x1728, "keymap_rp/17/009.png"}, - {0x1729, "keymap_rp/17/010.png"}, - {0x1730, "keymap_rp/18/001.png"}, - {0x1731, "keymap_rp/18/002.png"}, - {0x1732, "keymap_rp/18/003.png"}, - {0x1733, "keymap_rp/18/004.png"}, - {0x1734, "keymap_rp/18/005.png"}, - {0x1735, "keymap_rp/18/006.png"}, - {0x1736, "keymap_rp/18/007.png"}, - {0x1737, "keymap_rp/18/008.png"}, - {0x1738, "keymap_rp/18/009.png"}, - {0x1739, "keymap_rp/18/010.png"}, - {0x1740, "keymap_rp/19/001.png"}, - {0x1741, "keymap_rp/19/002.png"}, - {0x1742, "keymap_rp/19/003.png"}, - {0x1743, "keymap_rp/19/004.png"}, - {0x1744, "keymap_rp/19/005.png"}, - {0x1745, "keymap_rp/19/006.png"}, - {0x1746, "keymap_rp/19/007.png"}, - {0x1747, "keymap_rp/19/008.png"}, - {0x1748, "keymap_rp/19/009.png"}, - {0x1749, "keymap_rp/19/010.png"}, - {0x1750, "keymap_rp/20/001.png"}, - {0x1751, "keymap_rp/20/002.png"}, - {0x1752, "keymap_rp/20/003.png"}, - {0x1753, "keymap_rp/20/004.png"}, - {0x1754, "keymap_rp/20/005.png"}, - {0x1755, "keymap_rp/20/006.png"}, - {0x1756, "keymap_rp/20/007.png"}, - {0x1757, "keymap_rp/20/008.png"}, - {0x1758, "keymap_rp/20/009.png"}, - {0x1759, "keymap_rp/20/010.png"}, - {0x1760, "keymap_rp/21/001.png"}, - {0x1761, "keymap_rp/21/002.png"}, - {0x1762, "keymap_rp/21/003.png"}, - {0x1763, "keymap_rp/21/004.png"}, - {0x1764, "keymap_rp/21/005.png"}, - {0x1765, "keymap_rp/21/006.png"}, - {0x1766, "keymap_rp/21/007.png"}, - {0x1767, "keymap_rp/21/008.png"}, - {0x1768, "keymap_rp/21/009.png"}, - {0x1769, "keymap_rp/21/010.png"}, - {0x1770, "keymap_rp/22/001.png"}, - {0x1771, "keymap_rp/22/002.png"}, - {0x1772, "keymap_rp/22/003.png"}, - {0x1773, "keymap_rp/22/004.png"}, - {0x1774, "keymap_rp/22/005.png"}, - {0x1775, "keymap_rp/22/006.png"}, - {0x1776, "keymap_rp/22/007.png"}, - {0x1777, "keymap_rp/22/008.png"}, - {0x1778, "keymap_rp/22/009.png"}, - {0x1779, "keymap_rp/22/010.png"}, - {0x1780, "keymap_rp/23/001.png"}, - {0x1781, "keymap_rp/23/002.png"}, - {0x1782, "keymap_rp/23/003.png"}, - {0x1783, "keymap_rp/23/004.png"}, - {0x1784, "keymap_rp/23/005.png"}, - {0x1785, "keymap_rp/23/006.png"}, - {0x1786, "keymap_rp/23/007.png"}, - {0x1787, "keymap_rp/23/008.png"}, - {0x1788, "keymap_rp/23/009.png"}, - {0x1789, "keymap_rp/23/010.png"}, - {0x1790, "keymap_rp/24/001.png"}, - {0x1791, "keymap_rp/24/002.png"}, - {0x1792, "keymap_rp/24/003.png"}, - {0x1793, "keymap_rp/24/004.png"}, - {0x1794, "keymap_rp/24/005.png"}, - {0x1795, "keymap_rp/24/006.png"}, - {0x1796, "keymap_rp/24/007.png"}, - {0x1797, "keymap_rp/24/008.png"}, - {0x1798, "keymap_rp/24/009.png"}, - {0x1799, "keymap_rp/24/010.png"}, - {0x17A0, "keymap_rp/25/001.png"}, - {0x17A1, "keymap_rp/25/002.png"}, - {0x17A2, "keymap_rp/25/003.png"}, - {0x17A3, "keymap_rp/25/004.png"}, - {0x17A4, "keymap_rp/25/005.png"}, - {0x17A5, "keymap_rp/25/006.png"}, - {0x17A6, "keymap_rp/25/007.png"}, - {0x17A7, "keymap_rp/25/008.png"}, - {0x17A8, "keymap_rp/25/009.png"}, - {0x17A9, "keymap_rp/25/010.png"}, - {0x17B0, "keymap_rp/26/001.png"}, - {0x17B1, "keymap_rp/26/002.png"}, - {0x17B2, "keymap_rp/26/003.png"}, - {0x17B3, "keymap_rp/26/004.png"}, - {0x17B4, "keymap_rp/26/005.png"}, - {0x17B5, "keymap_rp/26/006.png"}, - {0x17B6, "keymap_rp/26/007.png"}, - {0x17B7, "keymap_rp/26/008.png"}, - {0x17B8, "keymap_rp/26/009.png"}, - {0x17B9, "keymap_rp/26/010.png"}, - {0x17C0, "keymap_rp/27/001.png"}, - {0x17C1, "keymap_rp/27/002.png"}, - {0x17C2, "keymap_rp/27/003.png"}, - {0x17C3, "keymap_rp/27/004.png"}, - {0x17C4, "keymap_rp/27/005.png"}, - {0x17C5, "keymap_rp/27/006.png"}, - {0x17C6, "keymap_rp/27/007.png"}, - {0x17C7, "keymap_rp/27/008.png"}, - {0x17C8, "keymap_rp/27/009.png"}, - {0x17C9, "keymap_rp/27/010.png"}, - {0x17D0, "keymap_rp/28/001.png"}, - {0x17D1, "keymap_rp/28/002.png"}, - {0x17D2, "keymap_rp/28/003.png"}, - {0x17D3, "keymap_rp/28/004.png"}, - {0x17D4, "keymap_rp/28/005.png"}, - {0x17D5, "keymap_rp/28/006.png"}, - {0x17D6, "keymap_rp/28/007.png"}, - {0x17D7, "keymap_rp/28/008.png"}, - {0x17D8, "keymap_rp/28/009.png"}, - {0x17D9, "keymap_rp/28/010.png"}, - {0x17E0, "keymap_rp/29/001.png"}, - {0x17E1, "keymap_rp/29/002.png"}, - {0x17E2, "keymap_rp/29/003.png"}, - {0x17E3, "keymap_rp/29/004.png"}, - {0x17E4, "keymap_rp/29/005.png"}, - {0x17E5, "keymap_rp/29/006.png"}, - {0x17E6, "keymap_rp/29/007.png"}, - {0x17E7, "keymap_rp/29/008.png"}, - {0x17E8, "keymap_rp/29/009.png"}, - {0x17E9, "keymap_rp/29/010.png"}, - {0x17F0, "keymap_rp/30/001.png"}, - {0x17F1, "keymap_rp/30/002.png"}, - {0x17F2, "keymap_rp/30/003.png"}, - {0x17F3, "keymap_rp/30/004.png"}, - {0x17F4, "keymap_rp/30/005.png"}, - {0x17F5, "keymap_rp/30/006.png"}, - {0x17F6, "keymap_rp/30/007.png"}, - {0x17F7, "keymap_rp/30/008.png"}, - {0x17F8, "keymap_rp/30/009.png"}, - {0x17F9, "keymap_rp/30/010.png"}, -}}; - -std::string_view GetEntryNameByType(u32 type) { - const auto key = PkgEntryValue{type}; - const auto it = std::ranges::lower_bound(PkgEntries, key); - if (it != PkgEntries.end() && it->type == type) { - return it->name; - } - return ""; -} diff --git a/src/core/file_format/pkg_type.h b/src/core/file_format/pkg_type.h deleted file mode 100644 index 6b010e3a3..000000000 --- a/src/core/file_format/pkg_type.h +++ /dev/null @@ -1,10 +0,0 @@ -// SPDX-FileCopyrightText: Copyright 2024 shadPS4 Emulator Project -// SPDX-License-Identifier: GPL-2.0-or-later - -#pragma once - -#include -#include "common/types.h" - -/// Retrieves the PKG entry name from its type identifier. -std::string_view GetEntryNameByType(u32 type); diff --git a/src/core/file_format/splash.cpp b/src/core/file_format/splash.cpp deleted file mode 100644 index 4eb701cf7..000000000 --- a/src/core/file_format/splash.cpp +++ /dev/null @@ -1,38 +0,0 @@ -// SPDX-FileCopyrightText: Copyright 2024 shadPS4 Emulator Project -// SPDX-License-Identifier: GPL-2.0-or-later - -#include - -#include "common/assert.h" -#include "common/io_file.h" -#include "common/stb.h" -#include "splash.h" - -bool Splash::Open(const std::filesystem::path& filepath) { - ASSERT_MSG(filepath.extension().string() == ".png", "Unexpected file format passed"); - - Common::FS::IOFile file(filepath, Common::FS::FileAccessMode::Read); - if (!file.IsOpen()) { - return false; - } - - std::vector png_file{}; - const auto png_size = file.GetSize(); - png_file.resize(png_size); - file.Seek(0); - file.Read(png_file); - - auto* img_mem = stbi_load_from_memory(png_file.data(), png_file.size(), - reinterpret_cast(&img_info.width), - reinterpret_cast(&img_info.height), - reinterpret_cast(&img_info.num_channels), 4); - if (!img_mem) { - return false; - } - - const auto img_size = img_info.GetSizeBytes(); - img_data.resize(img_size); - std::memcpy(img_data.data(), img_mem, img_size); - stbi_image_free(img_mem); - return true; -} diff --git a/src/core/file_format/splash.h b/src/core/file_format/splash.h deleted file mode 100644 index 7c563f317..000000000 --- a/src/core/file_format/splash.h +++ /dev/null @@ -1,42 +0,0 @@ -// SPDX-FileCopyrightText: Copyright 2024 shadPS4 Emulator Project -// SPDX-License-Identifier: GPL-2.0-or-later - -#pragma once - -#include -#include -#include -#include "common/types.h" - -class Splash { -public: - struct ImageInfo { - u32 width; - u32 height; - u32 num_channels; - - u32 GetSizeBytes() const { - return width * height * 4; // we always forcing rgba8 for simplicity - } - }; - - Splash() = default; - ~Splash() = default; - - bool Open(const std::filesystem::path& filepath); - [[nodiscard]] bool IsLoaded() const { - return img_data.size(); - } - - const auto& GetImageData() const { - return img_data; - } - - ImageInfo GetImageInfo() const { - return img_info; - } - -private: - ImageInfo img_info{}; - std::vector img_data{}; -}; diff --git a/src/core/file_format/trp.cpp b/src/core/file_format/trp.cpp index d25c93c3f..a5d11b0eb 100644 --- a/src/core/file_format/trp.cpp +++ b/src/core/file_format/trp.cpp @@ -1,10 +1,25 @@ // SPDX-FileCopyrightText: Copyright 2024 shadPS4 Emulator Project // SPDX-License-Identifier: GPL-2.0-or-later +#include "common/aes.h" #include "common/config.h" #include "common/logging/log.h" #include "common/path_util.h" -#include "trp.h" +#include "core/file_format/trp.h" + +static void DecryptEFSM(std::span trophyKey, std::span NPcommID, + std::span efsmIv, std::span ciphertext, + std::span decrypted) { + // Step 1: Encrypt NPcommID + std::array trophyIv{}; + std::array trpKey; + aes::encrypt_cbc(NPcommID.data(), NPcommID.size(), trophyKey.data(), trophyKey.size(), + trophyIv.data(), trpKey.data(), trpKey.size(), false); + + // Step 2: Decrypt EFSM + aes::decrypt_cbc(ciphertext.data(), ciphertext.size(), trpKey.data(), trpKey.size(), + efsmIv.data(), decrypted.data(), decrypted.size(), nullptr); +} TRP::TRP() = default; TRP::~TRP() = default; @@ -54,7 +69,7 @@ bool TRP::Extract(const std::filesystem::path& trophyPath, const std::string tit return false; } - std::array user_key{}; + std::array user_key{}; hexToBytes(user_key_str.c_str(), user_key.data()); for (int index = 0; const auto& it : std::filesystem::directory_iterator(gameSysDir)) { @@ -115,7 +130,7 @@ bool TRP::Extract(const std::filesystem::path& trophyPath, const std::string tit return false; } file.Read(ESFM); - crypto.decryptEFSM(user_key, np_comm_id, esfmIv, ESFM, XML); // decrypt + DecryptEFSM(user_key, np_comm_id, esfmIv, ESFM, XML); // decrypt removePadding(XML); std::string xml_name = entry.entry_name; size_t pos = xml_name.find("ESFM"); diff --git a/src/core/file_format/trp.h b/src/core/file_format/trp.h index aec129f0e..01207475b 100644 --- a/src/core/file_format/trp.h +++ b/src/core/file_format/trp.h @@ -7,7 +7,6 @@ #include "common/endian.h" #include "common/io_file.h" #include "common/types.h" -#include "core/crypto/crypto.h" struct TrpHeader { u32_be magic; // (0xDCA24D00) @@ -37,10 +36,9 @@ public: void GetNPcommID(const std::filesystem::path& trophyPath, int index); private: - Crypto crypto; std::vector NPcommID = std::vector(12); std::array np_comm_id{}; std::array esfmIv{}; std::filesystem::path trpFilesPath; static constexpr int iv_len = 16; -}; \ No newline at end of file +}; diff --git a/src/core/file_sys/fs.cpp b/src/core/file_sys/fs.cpp index bf340e9e3..4dad44874 100644 --- a/src/core/file_sys/fs.cpp +++ b/src/core/file_sys/fs.cpp @@ -40,7 +40,8 @@ void MntPoints::UnmountAll() { m_mnt_pairs.clear(); } -std::filesystem::path MntPoints::GetHostPath(std::string_view path, bool* is_read_only) { +std::filesystem::path MntPoints::GetHostPath(std::string_view path, bool* is_read_only, + bool force_base_path) { // Evil games like Turok2 pass double slashes e.g /app0//game.kpf std::string corrected_path(path); size_t pos = corrected_path.find("//"); @@ -69,10 +70,14 @@ std::filesystem::path MntPoints::GetHostPath(std::string_view path, bool* is_rea std::filesystem::path host_path = mount->host_path / rel_path; std::filesystem::path patch_path = mount->host_path; patch_path += "-UPDATE"; + if (!std::filesystem::exists(patch_path)) { + patch_path = mount->host_path; + patch_path += "-patch"; + } patch_path /= rel_path; if ((corrected_path.starts_with("/app0") || corrected_path.starts_with("/hostapp")) && - std::filesystem::exists(patch_path)) { + !force_base_path && std::filesystem::exists(patch_path)) { return patch_path; } @@ -132,8 +137,10 @@ std::filesystem::path MntPoints::GetHostPath(std::string_view path, bool* is_rea return std::optional(current_path); }; - if (const auto path = search(patch_path)) { - return *path; + if (!force_base_path) { + if (const auto path = search(patch_path)) { + return *path; + } } if (const auto path = search(host_path)) { return *path; @@ -144,6 +151,39 @@ std::filesystem::path MntPoints::GetHostPath(std::string_view path, bool* is_rea return host_path; } +// TODO: Does not handle mount points inside mount points. +void MntPoints::IterateDirectory(std::string_view guest_directory, + const IterateDirectoryCallback& callback) { + const auto base_path = GetHostPath(guest_directory, nullptr, true); + const auto patch_path = GetHostPath(guest_directory, nullptr, false); + // Only need to consider patch path if it exists and does not resolve to the same as base. + const auto apply_patch = base_path != patch_path && std::filesystem::exists(patch_path); + + // Pass 1: Any files that existed in the base directory, using patch directory if needed. + if (std::filesystem::exists(base_path)) { + for (const auto& entry : std::filesystem::directory_iterator(base_path)) { + if (apply_patch) { + const auto patch_entry_path = patch_path / entry.path().filename(); + if (std::filesystem::exists(patch_entry_path)) { + callback(patch_entry_path, !std::filesystem::is_directory(patch_entry_path)); + continue; + } + } + callback(entry.path(), !entry.is_directory()); + } + } + + // Pass 2: Any files that exist only in the patch directory. + if (apply_patch) { + for (const auto& entry : std::filesystem::directory_iterator(patch_path)) { + const auto base_entry_path = base_path / entry.path().filename(); + if (!std::filesystem::exists(base_entry_path)) { + callback(entry.path(), !entry.is_directory()); + } + } + } +} + int HandleTable::CreateHandle() { std::scoped_lock lock{m_mutex}; @@ -197,7 +237,7 @@ void HandleTable::CreateStdHandles() { std::shared_ptr{reinterpret_cast(device)}; }; // order matters - setup("/dev/stdin", new Devices::NopDevice(0)); // stdin + setup("/dev/stdin", new Devices::Logger("stdin", false)); // stdin setup("/dev/stdout", new Devices::Logger("stdout", false)); // stdout setup("/dev/stderr", new Devices::Logger("stderr", true)); // stderr } diff --git a/src/core/file_sys/fs.h b/src/core/file_sys/fs.h index 56df32ad0..6638b48e8 100644 --- a/src/core/file_sys/fs.h +++ b/src/core/file_sys/fs.h @@ -36,7 +36,11 @@ public: void UnmountAll(); std::filesystem::path GetHostPath(std::string_view guest_directory, - bool* is_read_only = nullptr); + bool* is_read_only = nullptr, bool force_base_path = false); + using IterateDirectoryCallback = + std::function; + void IterateDirectory(std::string_view guest_directory, + const IterateDirectoryCallback& callback); const MntPair* GetMountFromHostPath(const std::string& host_path) { std::scoped_lock lock{m_mutex}; diff --git a/src/core/libraries/ajm/ajm_context.cpp b/src/core/libraries/ajm/ajm_context.cpp index 8992dd83b..0e2915f32 100644 --- a/src/core/libraries/ajm/ajm_context.cpp +++ b/src/core/libraries/ajm/ajm_context.cpp @@ -141,7 +141,12 @@ int AjmContext::BatchStartBuffer(u8* p_batch, u32 batch_size, const int priority *out_batch_id = batch_id.value(); batch_info->id = *out_batch_id; - batch_queue.EmplaceWait(batch_info); + if (!batch_info->jobs.empty()) { + batch_queue.EmplaceWait(batch_info); + } else { + // Empty batches are not submitted to the processor and are marked as finished + batch_info->finished.release(); + } return ORBIS_OK; } diff --git a/src/core/libraries/ajm/ajm_instance.cpp b/src/core/libraries/ajm/ajm_instance.cpp index 8af105c77..01b1d2b21 100644 --- a/src/core/libraries/ajm/ajm_instance.cpp +++ b/src/core/libraries/ajm/ajm_instance.cpp @@ -66,6 +66,7 @@ void AjmInstance::ExecuteJob(AjmJob& job) { LOG_TRACE(Lib_Ajm, "Initializing instance {}", job.instance_id); auto& params = job.input.init_params.value(); m_codec->Initialize(¶ms, sizeof(params)); + is_initialized = true; } if (job.input.resample_parameters.has_value()) { LOG_ERROR(Lib_Ajm, "Unimplemented: resample parameters"); @@ -89,6 +90,10 @@ void AjmInstance::ExecuteJob(AjmJob& job) { } } + if (!is_initialized) { + return; + } + if (!job.input.buffer.empty() && !job.output.buffers.empty()) { std::span in_buf(job.input.buffer); SparseOutputBuffer out_buf(job.output.buffers); diff --git a/src/core/libraries/ajm/ajm_instance.h b/src/core/libraries/ajm/ajm_instance.h index 9d0f6b9f3..e02ac6ffb 100644 --- a/src/core/libraries/ajm/ajm_instance.h +++ b/src/core/libraries/ajm/ajm_instance.h @@ -96,6 +96,7 @@ private: AjmSidebandResampleParameters m_resample_parameters{}; u32 m_total_samples{}; std::unique_ptr m_codec; + bool is_initialized = false; }; } // namespace Libraries::Ajm diff --git a/src/core/libraries/app_content/app_content.cpp b/src/core/libraries/app_content/app_content.cpp index 1d23e7f44..fad270e2b 100644 --- a/src/core/libraries/app_content/app_content.cpp +++ b/src/core/libraries/app_content/app_content.cpp @@ -12,6 +12,7 @@ #include "core/file_sys/fs.h" #include "core/libraries/app_content/app_content_error.h" #include "core/libraries/libs.h" +#include "core/libraries/system/systemservice.h" namespace Libraries::AppContent { @@ -262,6 +263,15 @@ int PS4_SYSV_ABI sceAppContentInitialize(const OrbisAppContentInitParam* initPar entitlement_label.copy(info.entitlement_label, sizeof(info.entitlement_label)); } } + + if (addcont_count > 0) { + SystemService::OrbisSystemServiceEvent event{}; + event.event_type = SystemService::OrbisSystemServiceEventType::EntitlementUpdate; + event.service_entitlement_update.user_id = 0; + event.service_entitlement_update.np_service_label = 0; + SystemService::PushSystemServiceEvent(event); + } + return ORBIS_OK; } @@ -313,7 +323,7 @@ int PS4_SYSV_ABI sceAppContentTemporaryDataMount2(OrbisAppContentTemporaryDataOp return ORBIS_APP_CONTENT_ERROR_PARAMETER; } static constexpr std::string_view TmpMount = "/temp0"; - TmpMount.copy(mountPoint->data, sizeof(mountPoint->data)); + TmpMount.copy(mountPoint->data, TmpMount.size()); LOG_INFO(Lib_AppContent, "sceAppContentTemporaryDataMount2: option = {}, mountPoint = {}", option, mountPoint->data); return ORBIS_OK; diff --git a/src/core/libraries/audio/audioout.cpp b/src/core/libraries/audio/audioout.cpp index f0ad59c3b..dea8115e9 100644 --- a/src/core/libraries/audio/audioout.cpp +++ b/src/core/libraries/audio/audioout.cpp @@ -89,6 +89,9 @@ int PS4_SYSV_ABI sceAudioOutChangeAppModuleState() { int PS4_SYSV_ABI sceAudioOutClose(s32 handle) { LOG_INFO(Lib_AudioOut, "handle = {}", handle); + if (audio == nullptr) { + return ORBIS_AUDIO_OUT_ERROR_NOT_INIT; + } if (handle < 1 || handle > SCE_AUDIO_OUT_NUM_PORTS) { return ORBIS_AUDIO_OUT_ERROR_INVALID_PORT; } @@ -171,6 +174,9 @@ int PS4_SYSV_ABI sceAudioOutGetLastOutputTime() { } int PS4_SYSV_ABI sceAudioOutGetPortState(s32 handle, OrbisAudioOutPortState* state) { + if (audio == nullptr) { + return ORBIS_AUDIO_OUT_ERROR_NOT_INIT; + } if (handle < 1 || handle > SCE_AUDIO_OUT_NUM_PORTS) { return ORBIS_AUDIO_OUT_ERROR_INVALID_PORT; } @@ -305,6 +311,10 @@ s32 PS4_SYSV_ABI sceAudioOutOpen(UserService::OrbisUserServiceUserId user_id, user_id, magic_enum::enum_name(port_type), index, length, sample_rate, magic_enum::enum_name(param_type.data_format.Value()), magic_enum::enum_name(param_type.attributes.Value())); + if (audio == nullptr) { + LOG_ERROR(Lib_AudioOut, "Audio out not initialized"); + return ORBIS_AUDIO_OUT_ERROR_NOT_INIT; + } if ((port_type < OrbisAudioOutPort::Main || port_type > OrbisAudioOutPort::Padspk) && (port_type != OrbisAudioOutPort::Aux)) { LOG_ERROR(Lib_AudioOut, "Invalid port type"); @@ -368,6 +378,9 @@ int PS4_SYSV_ABI sceAudioOutOpenEx() { } s32 PS4_SYSV_ABI sceAudioOutOutput(s32 handle, void* ptr) { + if (audio == nullptr) { + return ORBIS_AUDIO_OUT_ERROR_NOT_INIT; + } if (handle < 1 || handle > SCE_AUDIO_OUT_NUM_PORTS) { return ORBIS_AUDIO_OUT_ERROR_INVALID_PORT; } @@ -489,6 +502,9 @@ int PS4_SYSV_ABI sceAudioOutSetUsbVolume() { } s32 PS4_SYSV_ABI sceAudioOutSetVolume(s32 handle, s32 flag, s32* vol) { + if (audio == nullptr) { + return ORBIS_AUDIO_OUT_ERROR_NOT_INIT; + } if (handle < 1 || handle > SCE_AUDIO_OUT_NUM_PORTS) { return ORBIS_AUDIO_OUT_ERROR_INVALID_PORT; } diff --git a/src/core/libraries/audio/sdl_audio.cpp b/src/core/libraries/audio/sdl_audio.cpp index 762a9f682..9aee2b447 100644 --- a/src/core/libraries/audio/sdl_audio.cpp +++ b/src/core/libraries/audio/sdl_audio.cpp @@ -15,13 +15,6 @@ class SDLPortBackend : public PortBackend { public: explicit SDLPortBackend(const PortOut& port) : frame_size(port.format_info.FrameSize()), guest_buffer_size(port.BufferSize()) { - // We want the latency for delivering frames out to be as small as possible, - // so set the sample frames hint to the number of frames per buffer. - const auto samples_num_str = std::to_string(port.buffer_frames); - if (!SDL_SetHint(SDL_HINT_AUDIO_DEVICE_SAMPLE_FRAMES, samples_num_str.c_str())) { - LOG_WARNING(Lib_AudioOut, "Failed to set SDL audio sample frames hint to {}: {}", - samples_num_str, SDL_GetError()); - } const SDL_AudioSpec fmt = { .format = port.format_info.is_float ? SDL_AUDIO_F32LE : SDL_AUDIO_S16LE, .channels = port.format_info.num_channels, diff --git a/src/core/libraries/disc_map/disc_map.cpp b/src/core/libraries/disc_map/disc_map.cpp index bb566a149..e8b40e624 100644 --- a/src/core/libraries/disc_map/disc_map.cpp +++ b/src/core/libraries/disc_map/disc_map.cpp @@ -9,29 +9,29 @@ namespace Libraries::DiscMap { -int PS4_SYSV_ABI sceDiscMapGetPackageSize() { - LOG_WARNING(Lib_DiscMap, "(DUMMY) called"); +int PS4_SYSV_ABI sceDiscMapGetPackageSize(s64 fflags, int* ret1, int* ret2) { return ORBIS_DISC_MAP_ERROR_NO_BITMAP_INFO; } -int PS4_SYSV_ABI sceDiscMapIsRequestOnHDD() { - LOG_WARNING(Lib_DiscMap, "(DUMMY) called"); +int PS4_SYSV_ABI sceDiscMapIsRequestOnHDD(char* path, s64 offset, s64 nbytes, int* ret) { return ORBIS_DISC_MAP_ERROR_NO_BITMAP_INFO; } -int PS4_SYSV_ABI Func_7C980FFB0AA27E7A() { - LOG_ERROR(Lib_DiscMap, "(STUBBED) called"); +int PS4_SYSV_ABI Func_7C980FFB0AA27E7A(char* path, s64 offset, s64 nbytes, int* flags, int* ret1, + int* ret2) { + *flags = 0; + *ret1 = 0; + *ret2 = 0; return ORBIS_OK; } -int PS4_SYSV_ABI Func_8A828CAEE7EDD5E9() { - LOG_ERROR(Lib_DiscMap, "(STUBBED) called"); - return ORBIS_OK; +int PS4_SYSV_ABI Func_8A828CAEE7EDD5E9(char* path, s64 offset, s64 nbytes, int* flags, int* ret1, + int* ret2) { + return ORBIS_DISC_MAP_ERROR_NO_BITMAP_INFO; } int PS4_SYSV_ABI Func_E7EBCE96E92F91F8() { - LOG_ERROR(Lib_DiscMap, "(STUBBED) called"); - return ORBIS_OK; + return ORBIS_DISC_MAP_ERROR_NO_BITMAP_INFO; } void RegisterlibSceDiscMap(Core::Loader::SymbolsResolver* sym) { diff --git a/src/core/libraries/disc_map/disc_map.h b/src/core/libraries/disc_map/disc_map.h index 08abee632..dc8b875ac 100644 --- a/src/core/libraries/disc_map/disc_map.h +++ b/src/core/libraries/disc_map/disc_map.h @@ -10,10 +10,12 @@ class SymbolsResolver; } namespace Libraries::DiscMap { -int PS4_SYSV_ABI sceDiscMapGetPackageSize(); -int PS4_SYSV_ABI sceDiscMapIsRequestOnHDD(); -int PS4_SYSV_ABI Func_7C980FFB0AA27E7A(); -int PS4_SYSV_ABI Func_8A828CAEE7EDD5E9(); +int PS4_SYSV_ABI sceDiscMapGetPackageSize(s64 fflags, int* ret1, int* ret2); +int PS4_SYSV_ABI sceDiscMapIsRequestOnHDD(char* path, s64 offset, s64 nbytes, int* ret); +int PS4_SYSV_ABI Func_7C980FFB0AA27E7A(char* path, s64 offset, s64 nbytes, int* flags, int* ret1, + int* ret2); +int PS4_SYSV_ABI Func_8A828CAEE7EDD5E9(char* path, s64 offset, s64 nbytes, int* flags, int* ret1, + int* ret2); int PS4_SYSV_ABI Func_E7EBCE96E92F91F8(); void RegisterlibSceDiscMap(Core::Loader::SymbolsResolver* sym); diff --git a/src/core/libraries/fiber/fiber.cpp b/src/core/libraries/fiber/fiber.cpp index b77b5b5b6..345f0834d 100644 --- a/src/core/libraries/fiber/fiber.cpp +++ b/src/core/libraries/fiber/fiber.cpp @@ -37,8 +37,9 @@ extern "C" void PS4_SYSV_ABI _sceFiberForceQuit(u64 ret) { void PS4_SYSV_ABI _sceFiberCheckStackOverflow(OrbisFiberContext* ctx) { u64* stack_base = reinterpret_cast(ctx->current_fiber->addr_context); + u64 stack_size = ctx->current_fiber->size_context; if (stack_base && *stack_base != kFiberStackSignature) { - UNREACHABLE_MSG("Stack overflow detected in fiber."); + UNREACHABLE_MSG("Stack overflow detected in fiber with size = 0x{:x}", stack_size); } } diff --git a/src/core/libraries/gnmdriver/gnmdriver.cpp b/src/core/libraries/gnmdriver/gnmdriver.cpp index 805c9124e..e8560b2b8 100644 --- a/src/core/libraries/gnmdriver/gnmdriver.cpp +++ b/src/core/libraries/gnmdriver/gnmdriver.cpp @@ -12,6 +12,7 @@ #include "core/address_space.h" #include "core/debug_state.h" #include "core/libraries/gnmdriver/gnm_error.h" +#include "core/libraries/gnmdriver/gnmdriver_init.h" #include "core/libraries/kernel/orbis_error.h" #include "core/libraries/kernel/process.h" #include "core/libraries/libs.h" @@ -54,244 +55,11 @@ enum ShaderStages : u32 { static constexpr std::array indirect_sgpr_offsets{0u, 0u, 0x4cu, 0u, 0xccu, 0u, 0x14cu}; -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, - 0xc0016900u, 0x2f9u, 0x2du, - 0xc0016900u, 0x282u, 8u, - 0xc0016900u, 0x280u, 0x80008u, - 0xc0016900u, 0x281u, 0xffff0000u, - 0xc0016900u, 0x204u, 0u, - 0xc0016900u, 0x206u, 0x43fu, - 0xc0016900u, 0x83u, 0xffffu, - 0xc0016900u, 0x317u, 0x10u, - 0xc0016900u, 0x2fau, 0x3f800000u, - 0xc0016900u, 0x2fcu, 0x3f800000u, - 0xc0016900u, 0x2fbu, 0x3f800000u, - 0xc0016900u, 0x2fdu, 0x3f800000u, - 0xc0016900u, 0x202u, 0xcc0010u, - 0xc0016900u, 0x30eu, 0xffffffffu, - 0xc0016900u, 0x30fu, 0xffffffffu, - 0xc0002f00u, 1u, - 0xc0017600u, 7u, 0x1ffu, - 0xc0017600u, 0x46u, 0x1ffu, - 0xc0017600u, 0x87u, 0x1ffu, - 0xc0017600u, 0xc7u, 0x1ffu, - 0xc0017600u, 0x107u, 0u, - 0xc0017600u, 0x147u, 0x1ffu, - 0xc0016900u, 0x1b1u, 2u, - 0xc0016900u, 0x101u, 0u, - 0xc0016900u, 0x100u, 0xffffffffu, - 0xc0016900u, 0x103u, 0u, - 0xc0016900u, 0x284u, 0u, - 0xc0016900u, 0x290u, 0u, - 0xc0016900u, 0x2aeu, 0u, - 0xc0016900u, 0x292u, 0u, - 0xc0016900u, 0x293u, 0x6000000u, - 0xc0016900u, 0x2f8u, 0u, - 0xc0016900u, 0x2deu, 0x1e9u, - 0xc0036900u, 0x295u, 0x100u, 0x100u, 4u, - 0xc0017900u, 0x200u, 0xe0000000u, -}; -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, - 0xc0016900u, 0x2f9u, 0x2du, - 0xc0016900u, 0x282u, 8u, - 0xc0016900u, 0x280u, 0x80008u, - 0xc0016900u, 0x281u, 0xffff0000u, - 0xc0016900u, 0x204u, 0u, - 0xc0016900u, 0x206u, 0x43fu, - 0xc0016900u, 0x83u, 0xffffu, - 0xc0016900u, 0x317u, 0x10u, - 0xc0016900u, 0x2fau, 0x3f800000u, - 0xc0016900u, 0x2fcu, 0x3f800000u, - 0xc0016900u, 0x2fbu, 0x3f800000u, - 0xc0016900u, 0x2fdu, 0x3f800000u, - 0xc0016900u, 0x202u, 0xcc0010u, - 0xc0016900u, 0x30eu, 0xffffffffu, - 0xc0016900u, 0x30fu, 0xffffffffu, - 0xc0002f00u, 1u, - 0xc0017600u, 7u, 0x1ffu, - 0xc0017600u, 0x46u, 0x1ffu, - 0xc0017600u, 0x87u, 0x1ffu, - 0xc0017600u, 0xc7u, 0x1ffu, - 0xc0017600u, 0x107u, 0u, - 0xc0017600u, 0x147u, 0x1ffu, - 0xc0016900u, 0x1b1u, 2u, - 0xc0016900u, 0x101u, 0u, - 0xc0016900u, 0x100u, 0xffffffffu, - 0xc0016900u, 0x103u, 0u, - 0xc0016900u, 0x284u, 0u, - 0xc0016900u, 0x290u, 0u, - 0xc0016900u, 0x2aeu, 0u, - 0xc0016900u, 0x292u, 0u, - 0xc0016900u, 0x293u, 0x6020000u, - 0xc0016900u, 0x2f8u, 0u, - 0xc0016900u, 0x2deu, 0x1e9u, - 0xc0036900u, 0x295u, 0x100u, 0x100u, 4u, - 0xc0017900u, 0x200u, 0xe0000000u, -}; -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, - 0xc0016900u, 0x2f9u, 0x2du, - 0xc0016900u, 0x282u, 8u, - 0xc0016900u, 0x280u, 0x80008u, - 0xc0016900u, 0x281u, 0xffff0000u, - 0xc0016900u, 0x204u, 0u, - 0xc0016900u, 0x206u, 0x43fu, - 0xc0016900u, 0x83u, 0xffffu, - 0xc0016900u, 0x317u, 0x10u, - 0xc0016900u, 0x2fau, 0x3f800000u, - 0xc0016900u, 0x2fcu, 0x3f800000u, - 0xc0016900u, 0x2fbu, 0x3f800000u, - 0xc0016900u, 0x2fdu, 0x3f800000u, - 0xc0016900u, 0x202u, 0xcc0010u, - 0xc0016900u, 0x30eu, 0xffffffffu, - 0xc0016900u, 0x30fu, 0xffffffffu, - 0xc0002f00u, 1u, - 0xc0017600u, 7u, 0x1701ffu, - 0xc0017600u, 0x46u, 0x1701fdu, - 0xc0017600u, 0x87u, 0x1701ffu, - 0xc0017600u, 0xc7u, 0x1701fdu, - 0xc0017600u, 0x107u, 0x17u, - 0xc0017600u, 0x147u, 0x1701fdu, - 0xc0017600u, 0x47u, 0x1cu, - 0xc0016900u, 0x1b1u, 2u, - 0xc0016900u, 0x101u, 0u, - 0xc0016900u, 0x100u, 0xffffffffu, - 0xc0016900u, 0x103u, 0u, - 0xc0016900u, 0x284u, 0u, - 0xc0016900u, 0x290u, 0u, - 0xc0016900u, 0x2aeu, 0u, - 0xc0016900u, 0x292u, 0u, - 0xc0016900u, 0x293u, 0x6020000u, - 0xc0016900u, 0x2f8u, 0u, - 0xc0016900u, 0x2deu, 0x1e9u, - 0xc0036900u, 0x295u, 0x100u, 0x100u, 4u, - 0xc0017900u, 0x200u, 0xe0000000u, -}; -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, - 0xc0016900u, 0x2f9u, 0x2du, - 0xc0016900u, 0x282u, 8u, - 0xc0016900u, 0x280u, 0x80008u, - 0xc0016900u, 0x281u, 0xffff0000u, - 0xc0016900u, 0x204u, 0u, - 0xc0016900u, 0x206u, 0x43fu, - 0xc0016900u, 0x83u, 0xffffu, - 0xc0016900u, 0x317u, 0x10u, - 0xc0016900u, 0x2fau, 0x3f800000u, - 0xc0016900u, 0x2fcu, 0x3f800000u, - 0xc0016900u, 0x2fbu, 0x3f800000u, - 0xc0016900u, 0x2fdu, 0x3f800000u, - 0xc0016900u, 0x202u, 0xcc0010u, - 0xc0016900u, 0x30eu, 0xffffffffu, - 0xc0016900u, 0x30fu, 0xffffffffu, - 0xc0002f00u, 1u, - 0xc0017600u, 7u, 0x1701ffu, - 0xc0017600u, 0x46u, 0x1701fdu, - 0xc0017600u, 0x87u, 0x1701ffu, - 0xc0017600u, 0xc7u, 0x1701fdu, - 0xc0017600u, 0x107u, 0x17u, - 0xc0017600u, 0x147u, 0x1701fdu, - 0xc0017600u, 0x47u, 0x1cu, - 0xc0016900u, 0x1b1u, 2u, - 0xc0016900u, 0x101u, 0u, - 0xc0016900u, 0x100u, 0xffffffffu, - 0xc0016900u, 0x103u, 0u, - 0xc0016900u, 0x284u, 0u, - 0xc0016900u, 0x290u, 0u, - 0xc0016900u, 0x2aeu, 0u, - 0xc0016900u, 0x102u, 0u, - 0xc0016900u, 0x292u, 0u, - 0xc0016900u, 0x293u, 0x6020000u, - 0xc0016900u, 0x2f8u, 0u, - 0xc0016900u, 0x2deu, 0x1e9u, - 0xc0036900u, 0x295u, 0x100u, 0x100u, 4u, - 0xc0017900u, 0x200u, 0xe0000000u, - 0xc0016900u, 0x2aau, 0xffu, -}; -static_assert(InitSequence350.size() == 0x7c + 2); - -static constexpr std::array CtxInitSequence{ - 0xc0012800u, 0x80000000u, 0x80000000u, - 0xc0001200u, 0u, - 0xc0002f00u, 1u, - 0xc0016900u, 0x102u, 0u, - 0xc0016900u, 0x202u, 0xcc0010u, - 0xc0111000u, 0u -}; -static_assert(CtxInitSequence.size() == 0x0f); - -static constexpr std::array CtxInitSequence400{ - 0xc0012800u, 0x80000000u, 0x80000000u, - 0xc0001200u, 0u, - 0xc0016900u, 0x2f9u, 0x2du, - 0xc0016900u, 0x282u, 8u, - 0xc0016900u, 0x280u, 0x80008u, - 0xc0016900u, 0x281u, 0xffff0000u, - 0xc0016900u, 0x204u, 0u, - 0xc0016900u, 0x206u, 0x43fu, - 0xc0016900u, 0x83u, 0xffffu, - 0xc0016900u, 0x317u, 0x10u, - 0xc0016900u, 0x2fau, 0x3f800000u, - 0xc0016900u, 0x2fcu, 0x3f800000u, - 0xc0016900u, 0x2fbu, 0x3f800000u, - 0xc0016900u, 0x2fdu, 0x3f800000u, - 0xc0016900u, 0x202u, 0xcc0010u, - 0xc0016900u, 0x30eu, 0xffffffffu, - 0xc0016900u, 0x30fu, 0xffffffffu, - 0xc0002f00u, 1u, - 0xc0016900u, 0x1b1u, 2u, - 0xc0016900u, 0x101u, 0u, - 0xc0016900u, 0x100u, 0xffffffffu, - 0xc0016900u, 0x103u, 0u, - 0xc0016900u, 0x284u, 0u, - 0xc0016900u, 0x290u, 0u, - 0xc0016900u, 0x2aeu, 0u, - 0xc0016900u, 0x102u, 0u, - 0xc0016900u, 0x292u, 0u, - 0xc0016900u, 0x293u, 0x6020000u, - 0xc0016900u, 0x2f8u, 0u, - 0xc0016900u, 0x2deu, 0x1e9u, - 0xc0036900u, 0x295u, 0x100u, 0x100u, 4u, - 0xc0016900u, 0x2aau, 0xffu, - 0xc09e1000u, -}; -static_assert(CtxInitSequence400.size() == 0x61); -// clang-format on +// Gates use of what appear to be the neo-mode init sequences but with the older +// IA_MULTI_VGT_PARAM register address. No idea what this is for as the ioctl +// that controls it is still a mystery, but leaving the sequences in gated behind +// this flag in case we need it in the future. +static constexpr bool UseNeoCompatSequences = false; // In case if `submitDone` is issued we need to block submissions until GPU idle static u32 submission_lock{}; @@ -317,6 +85,14 @@ static void WaitGpuIdle() { cv_lock.wait(lock, [] { return submission_lock == 0; }); } +// Write a special ending NOP packet with N DWs data block +static inline u32* WriteTrailingNop(u32* cmdbuf, u32 data_block_size) { + auto* nop = reinterpret_cast(cmdbuf); + nop->header = PM4Type3Header{PM4ItOpcode::Nop, data_block_size - 1}; + nop->data_block[0] = 0u; // only one out of `data_block_size` is initialized + return cmdbuf + data_block_size + 1 /* header */; +} + // Write a special ending NOP packet with N DWs data block template static inline u32* WriteTrailingNop(u32* cmdbuf) { @@ -429,48 +205,57 @@ int PS4_SYSV_ABI sceGnmCreateWorkloadStream(u64 param1, u32* workload_stream) { } int PS4_SYSV_ABI sceGnmDebuggerGetAddressWatch() { - LOG_ERROR(Lib_GnmDriver, "(STUBBED) called"); - return ORBIS_OK; + LOG_TRACE(Lib_GnmDriver, "called"); + // Not available in retail firmware + return ORBIS_GNM_ERROR_FAILURE; } int PS4_SYSV_ABI sceGnmDebuggerHaltWavefront() { - LOG_ERROR(Lib_GnmDriver, "(STUBBED) called"); - return ORBIS_OK; + LOG_TRACE(Lib_GnmDriver, "called"); + // Not available in retail firmware + return ORBIS_GNM_ERROR_FAILURE; } int PS4_SYSV_ABI sceGnmDebuggerReadGds() { - LOG_ERROR(Lib_GnmDriver, "(STUBBED) called"); - return ORBIS_OK; + LOG_TRACE(Lib_GnmDriver, "called"); + // Not available in retail firmware + return ORBIS_GNM_ERROR_FAILURE; } int PS4_SYSV_ABI sceGnmDebuggerReadSqIndirectRegister() { - LOG_ERROR(Lib_GnmDriver, "(STUBBED) called"); - return ORBIS_OK; + LOG_TRACE(Lib_GnmDriver, "called"); + // Not available in retail firmware + return ORBIS_GNM_ERROR_FAILURE; } int PS4_SYSV_ABI sceGnmDebuggerResumeWavefront() { - LOG_ERROR(Lib_GnmDriver, "(STUBBED) called"); - return ORBIS_OK; + LOG_TRACE(Lib_GnmDriver, "called"); + // Not available in retail firmware + return ORBIS_GNM_ERROR_FAILURE; } int PS4_SYSV_ABI sceGnmDebuggerResumeWavefrontCreation() { - LOG_ERROR(Lib_GnmDriver, "(STUBBED) called"); - return ORBIS_OK; + LOG_TRACE(Lib_GnmDriver, "called"); + // Not available in retail firmware + return ORBIS_GNM_ERROR_FAILURE; } int PS4_SYSV_ABI sceGnmDebuggerSetAddressWatch() { - LOG_ERROR(Lib_GnmDriver, "(STUBBED) called"); - return ORBIS_OK; + LOG_TRACE(Lib_GnmDriver, "called"); + // Not available in retail firmware + return ORBIS_GNM_ERROR_FAILURE; } int PS4_SYSV_ABI sceGnmDebuggerWriteGds() { - LOG_ERROR(Lib_GnmDriver, "(STUBBED) called"); - return ORBIS_OK; + LOG_TRACE(Lib_GnmDriver, "called"); + // Not available in retail firmware + return ORBIS_GNM_ERROR_FAILURE; } int PS4_SYSV_ABI sceGnmDebuggerWriteSqIndirectRegister() { - LOG_ERROR(Lib_GnmDriver, "(STUBBED) called"); - return ORBIS_OK; + LOG_TRACE(Lib_GnmDriver, "called"); + // Not available in retail firmware + return ORBIS_GNM_ERROR_FAILURE; } int PS4_SYSV_ABI sceGnmDebugHardwareStatus() { @@ -607,9 +392,16 @@ s32 PS4_SYSV_ABI sceGnmDispatchIndirect(u32* cmdbuf, u32 size, u32 data_offset, return -1; } -int PS4_SYSV_ABI sceGnmDispatchIndirectOnMec() { - LOG_ERROR(Lib_GnmDriver, "(STUBBED) called"); - return ORBIS_OK; +s32 PS4_SYSV_ABI sceGnmDispatchIndirectOnMec(u32* cmdbuf, u32 size, VAddr args, u32 modifier) { + if (cmdbuf != nullptr && size == 8 && args != 0 && ((args & 3u) == 0)) { + cmdbuf[0] = 0xc0021602 | (modifier & 1u); + *(VAddr*)(&cmdbuf[1]) = args; + cmdbuf[3] = (modifier & 0x18) | 1u; + cmdbuf[4] = 0xc0021000; + cmdbuf[5] = 0; + return ORBIS_OK; + } + return ORBIS_FAIL; } u32 PS4_SYSV_ABI sceGnmDispatchInitDefaultHardwareState(u32* cmdbuf, u32 size) { @@ -619,17 +411,30 @@ u32 PS4_SYSV_ABI sceGnmDispatchInitDefaultHardwareState(u32* cmdbuf, u32 size) { return 0; } - cmdbuf = PM4CmdSetData::SetShReg(cmdbuf, 0x216u, - 0xffffffffu); // COMPUTE_STATIC_THREAD_MGMT_SE0 - cmdbuf = PM4CmdSetData::SetShReg(cmdbuf, 0x217u, - 0xffffffffu); // COMPUTE_STATIC_THREAD_MGMT_SE1 - cmdbuf = PM4CmdSetData::SetShReg(cmdbuf, 0x215u, 0x170u); // COMPUTE_RESOURCE_LIMITS + cmdbuf = PM4CmdSetData::SetShReg( + cmdbuf, 0x216u, + 0xffffffffu); // COMPUTE_STATIC_THREAD_MGMT_SE0 + cmdbuf = PM4CmdSetData::SetShReg( + cmdbuf, 0x217u, + 0xffffffffu); // COMPUTE_STATIC_THREAD_MGMT_SE1 + + if (sceKernelIsNeoMode()) { + cmdbuf = PM4CmdSetData::SetShReg( + cmdbuf, 0x219u, + 0xffffffffu); // COMPUTE_STATIC_THREAD_MGMT_SE2 + cmdbuf = PM4CmdSetData::SetShReg( + cmdbuf, 0x21au, + 0xffffffffu); // COMPUTE_STATIC_THREAD_MGMT_SE3 + } + + cmdbuf = PM4CmdSetData::SetShReg( + cmdbuf, 0x215u, 0x170u); // COMPUTE_RESOURCE_LIMITS cmdbuf = WriteHeader(cmdbuf, 6); - cmdbuf = WriteBody(cmdbuf, 0x28000000u, 0u, 0u, 0u, 0u, 0u); + cmdbuf = WriteBody(cmdbuf, 0x28000000u, 0u, 0u, 0u, 0u, 0xau); - cmdbuf = WriteHeader(cmdbuf, 0xef); - cmdbuf = WriteBody(cmdbuf, 0xau, 0u); + cmdbuf = WriteHeader(cmdbuf, sceKernelIsNeoMode() ? 0xe9 : 0xef); + cmdbuf = WriteBody(cmdbuf, 0u); return HwInitPacketSize; } @@ -646,7 +451,7 @@ s32 PS4_SYSV_ABI sceGnmDrawIndex(u32* cmdbuf, u32 size, u32 index_count, uintptr draw_index->index_base_lo = u32(index_addr); draw_index->index_base_hi = u32(index_addr >> 32); draw_index->index_count = index_count; - draw_index->draw_initiator = 0; + draw_index->draw_initiator = sceKernelIsNeoMode() ? flags & 0xe0000000u : 0; WriteTrailingNop<3>(cmdbuf + 6); return ORBIS_OK; @@ -659,8 +464,9 @@ s32 PS4_SYSV_ABI sceGnmDrawIndexAuto(u32* cmdbuf, u32 size, u32 index_count, u32 if (cmdbuf && (size == 7) && (flags & 0x1ffffffe) == 0) { // no predication will be set in the packet - cmdbuf = WritePacket(cmdbuf, PM4ShaderType::ShaderGraphics, - index_count, 2u); + cmdbuf = WritePacket( + cmdbuf, PM4ShaderType::ShaderGraphics, index_count, + sceKernelIsNeoMode() ? flags & 0xe0000000u | 2u : 2u); WriteTrailingNop<3>(cmdbuf); return ORBIS_OK; } @@ -684,7 +490,7 @@ s32 PS4_SYSV_ABI sceGnmDrawIndexIndirect(u32* cmdbuf, u32 size, u32 data_offset, cmdbuf[0] = data_offset; cmdbuf[1] = vertex_sgpr_offset == 0 ? 0 : (vertex_sgpr_offset & 0xffffu) + sgpr_offset; cmdbuf[2] = instance_sgpr_offset == 0 ? 0 : (instance_sgpr_offset & 0xffffu) + sgpr_offset; - cmdbuf[3] = 0; + cmdbuf[3] = sceKernelIsNeoMode() ? flags & 0xe0000000u : 0u; cmdbuf += 4; WriteTrailingNop<3>(cmdbuf); @@ -699,8 +505,9 @@ s32 PS4_SYSV_ABI sceGnmDrawIndexIndirectCountMulti(u32* cmdbuf, u32 size, u32 da u32 flags) { LOG_TRACE(Lib_GnmDriver, "called"); - if (cmdbuf && (size == 16) && (shader_stage < ShaderStages::Max) && - (vertex_sgpr_offset < 0x10u) && (instance_sgpr_offset < 0x10u)) { + if ((!sceKernelIsNeoMode() || !UseNeoCompatSequences) && !cmdbuf && (size == 16) && + (shader_stage < ShaderStages::Max) && (vertex_sgpr_offset < 0x10u) && + (instance_sgpr_offset < 0x10u)) { cmdbuf = WriteHeader(cmdbuf, 2); cmdbuf = WriteBody(cmdbuf, 0u); @@ -719,7 +526,7 @@ s32 PS4_SYSV_ABI sceGnmDrawIndexIndirectCountMulti(u32* cmdbuf, u32 size, u32 da cmdbuf[4] = max_count; *(u64*)(&cmdbuf[5]) = count_addr; cmdbuf[7] = sizeof(DrawIndexedIndirectArgs); - cmdbuf[8] = 0; + cmdbuf[8] = sceKernelIsNeoMode() ? flags & 0xe0000000u : 0; cmdbuf += 9; WriteTrailingNop<2>(cmdbuf); @@ -748,7 +555,8 @@ s32 PS4_SYSV_ABI sceGnmDrawIndexOffset(u32* cmdbuf, u32 size, u32 index_offset, const auto predicate = flags & 1 ? PM4Predicate::PredEnable : PM4Predicate::PredDisable; cmdbuf = WriteHeader( cmdbuf, 4, PM4ShaderType::ShaderGraphics, predicate); - cmdbuf = WriteBody(cmdbuf, index_count, index_offset, index_count, 0u); + cmdbuf = WriteBody(cmdbuf, index_count, index_offset, index_count, + sceKernelIsNeoMode() ? flags & 0xe0000000u : 0u); WriteTrailingNop<3>(cmdbuf); return ORBIS_OK; @@ -772,7 +580,7 @@ s32 PS4_SYSV_ABI sceGnmDrawIndirect(u32* cmdbuf, u32 size, u32 data_offset, u32 cmdbuf[0] = data_offset; cmdbuf[1] = vertex_sgpr_offset == 0 ? 0 : (vertex_sgpr_offset & 0xffffu) + sgpr_offset; cmdbuf[2] = instance_sgpr_offset == 0 ? 0 : (instance_sgpr_offset & 0xffffu) + sgpr_offset; - cmdbuf[3] = 2; // auto index + cmdbuf[3] = sceKernelIsNeoMode() ? flags & 0xe0000000u | 2u : 2u; // auto index cmdbuf += 4; WriteTrailingNop<3>(cmdbuf); @@ -801,6 +609,7 @@ u32 PS4_SYSV_ABI sceGnmDrawInitDefaultHardwareState(u32* cmdbuf, u32 size) { } const auto& SetupContext = [](u32* cmdbuf, u32 size, bool clear_state) { + const auto* cmdbuf_end = cmdbuf + HwInitPacketSize; if (clear_state) { cmdbuf = ClearContextState(cmdbuf); } @@ -808,10 +617,8 @@ u32 PS4_SYSV_ABI sceGnmDrawInitDefaultHardwareState(u32* cmdbuf, u32 size) { std::memcpy(cmdbuf, &InitSequence[2], (InitSequence.size() - 2) * 4); cmdbuf += InitSequence.size() - 2; - const auto cmdbuf_left = - HwInitPacketSize - (InitSequence.size() - 2) - (clear_state ? 0xc : 0) - 1; - cmdbuf = WriteHeader(cmdbuf, cmdbuf_left); - cmdbuf = WriteBody(cmdbuf, 0u); + const auto cmdbuf_left = cmdbuf_end - cmdbuf - 1; + WriteTrailingNop(cmdbuf, cmdbuf_left); return HwInitPacketSize; }; @@ -826,12 +633,13 @@ u32 PS4_SYSV_ABI sceGnmDrawInitDefaultHardwareState175(u32* cmdbuf, u32 size) { return 0; } + const auto* cmdbuf_end = cmdbuf + HwInitPacketSize; cmdbuf = ClearContextState(cmdbuf); std::memcpy(cmdbuf, &InitSequence175[2], (InitSequence175.size() - 2) * 4); cmdbuf += InitSequence175.size() - 2; - constexpr auto cmdbuf_left = HwInitPacketSize - (InitSequence175.size() - 2) - 0xc - 1; - WriteTrailingNop(cmdbuf); + const auto cmdbuf_left = cmdbuf_end - cmdbuf - 1; + WriteTrailingNop(cmdbuf, cmdbuf_left); return HwInitPacketSize; } @@ -844,17 +652,27 @@ u32 PS4_SYSV_ABI sceGnmDrawInitDefaultHardwareState200(u32* cmdbuf, u32 size) { } const auto& SetupContext200 = [](u32* cmdbuf, u32 size, bool clear_state) { + const auto* cmdbuf_end = cmdbuf + HwInitPacketSize; if (clear_state) { cmdbuf = ClearContextState(cmdbuf); } - std::memcpy(cmdbuf, &InitSequence200[2], (InitSequence200.size() - 2) * 4); - cmdbuf += InitSequence200.size() - 2; + if (sceKernelIsNeoMode()) { + if (!UseNeoCompatSequences) { + std::memcpy(cmdbuf, &InitSequence200Neo[2], (InitSequence200Neo.size() - 2) * 4); + cmdbuf += InitSequence200Neo.size() - 2; + } else { + std::memcpy(cmdbuf, &InitSequence200NeoCompat[2], + (InitSequence200NeoCompat.size() - 2) * 4); + cmdbuf += InitSequence200NeoCompat.size() - 2; + } + } else { + std::memcpy(cmdbuf, &InitSequence200[2], (InitSequence200.size() - 2) * 4); + cmdbuf += InitSequence200.size() - 2; + } - const auto cmdbuf_left = - HwInitPacketSize - (InitSequence200.size() - 2) - (clear_state ? 0xc : 0) - 1; - cmdbuf = WriteHeader(cmdbuf, cmdbuf_left); - cmdbuf = WriteBody(cmdbuf, 0u); + const auto cmdbuf_left = cmdbuf_end - cmdbuf - 1; + WriteTrailingNop(cmdbuf, cmdbuf_left); return HwInitPacketSize; }; @@ -870,17 +688,27 @@ u32 PS4_SYSV_ABI sceGnmDrawInitDefaultHardwareState350(u32* cmdbuf, u32 size) { } const auto& SetupContext350 = [](u32* cmdbuf, u32 size, bool clear_state) { + const auto* cmdbuf_end = cmdbuf + HwInitPacketSize; if (clear_state) { cmdbuf = ClearContextState(cmdbuf); } - std::memcpy(cmdbuf, &InitSequence350[2], (InitSequence350.size() - 2) * 4); - cmdbuf += InitSequence350.size() - 2; + if (sceKernelIsNeoMode()) { + if (!UseNeoCompatSequences) { + std::memcpy(cmdbuf, &InitSequence350Neo[2], (InitSequence350Neo.size() - 2) * 4); + cmdbuf += InitSequence350Neo.size() - 2; + } else { + std::memcpy(cmdbuf, &InitSequence350NeoCompat[2], + (InitSequence350NeoCompat.size() - 2) * 4); + cmdbuf += InitSequence350NeoCompat.size() - 2; + } + } else { + std::memcpy(cmdbuf, &InitSequence350[2], (InitSequence350.size() - 2) * 4); + cmdbuf += InitSequence350.size() - 2; + } - const auto cmdbuf_left = - HwInitPacketSize - (InitSequence350.size() - 2) - (clear_state ? 0xc : 0) - 1; - cmdbuf = WriteHeader(cmdbuf, cmdbuf_left); - cmdbuf = WriteBody(cmdbuf, 0u); + const auto cmdbuf_left = cmdbuf_end - cmdbuf - 1; + WriteTrailingNop(cmdbuf, cmdbuf_left); return HwInitPacketSize; }; @@ -896,7 +724,11 @@ u32 PS4_SYSV_ABI sceGnmDrawInitToDefaultContextState(u32* cmdbuf, u32 size) { return 0; } - std::memcpy(cmdbuf, CtxInitSequence.data(), CtxInitSequence.size() * 4); + if (sceKernelIsNeoMode()) { + std::memcpy(cmdbuf, CtxInitSequenceNeo.data(), CtxInitSequenceNeo.size() * 4); + } else { + std::memcpy(cmdbuf, CtxInitSequence.data(), CtxInitSequence.size() * 4); + } return CtxInitPacketSize; } @@ -908,7 +740,16 @@ u32 PS4_SYSV_ABI sceGnmDrawInitToDefaultContextState400(u32* cmdbuf, u32 size) { return 0; } - std::memcpy(cmdbuf, CtxInitSequence400.data(), CtxInitSequence400.size() * 4); + if (sceKernelIsNeoMode()) { + if (!UseNeoCompatSequences) { + std::memcpy(cmdbuf, CtxInitSequence400Neo.data(), CtxInitSequence400Neo.size() * 4); + } else { + std::memcpy(cmdbuf, CtxInitSequence400NeoCompat.data(), + CtxInitSequence400NeoCompat.size() * 4); + } + } else { + std::memcpy(cmdbuf, CtxInitSequence400.data(), CtxInitSequence400.size() * 4); + } return CtxInitPacketSize; } @@ -919,57 +760,68 @@ int PS4_SYSV_ABI sceGnmDrawOpaqueAuto() { bool PS4_SYSV_ABI sceGnmDriverCaptureInProgress() { LOG_TRACE(Lib_GnmDriver, "called"); + // Not available in retail firmware return false; } -int PS4_SYSV_ABI sceGnmDriverInternalRetrieveGnmInterface() { - LOG_ERROR(Lib_GnmDriver, "(STUBBED) called"); - return ORBIS_OK; +u32 PS4_SYSV_ABI sceGnmDriverInternalRetrieveGnmInterface() { + LOG_TRACE(Lib_GnmDriver, "called"); + // Not available in retail firmware + return 0x80000000; } -int PS4_SYSV_ABI sceGnmDriverInternalRetrieveGnmInterfaceForGpuDebugger() { - LOG_ERROR(Lib_GnmDriver, "(STUBBED) called"); - return ORBIS_OK; +u32 PS4_SYSV_ABI sceGnmDriverInternalRetrieveGnmInterfaceForGpuDebugger() { + LOG_TRACE(Lib_GnmDriver, "called"); + // Not available in retail firmware + return 0x80000000; } -int PS4_SYSV_ABI sceGnmDriverInternalRetrieveGnmInterfaceForGpuException() { - LOG_ERROR(Lib_GnmDriver, "(STUBBED) called"); - return ORBIS_OK; +u32 PS4_SYSV_ABI sceGnmDriverInternalRetrieveGnmInterfaceForGpuException() { + LOG_TRACE(Lib_GnmDriver, "called"); + // Not available in retail firmware + return 0x80000000; } -int PS4_SYSV_ABI sceGnmDriverInternalRetrieveGnmInterfaceForHDRScopes() { - LOG_ERROR(Lib_GnmDriver, "(STUBBED) called"); - return ORBIS_OK; +u32 PS4_SYSV_ABI sceGnmDriverInternalRetrieveGnmInterfaceForHDRScopes() { + LOG_TRACE(Lib_GnmDriver, "called"); + // Not available in retail firmware + return 0x80000000; } -int PS4_SYSV_ABI sceGnmDriverInternalRetrieveGnmInterfaceForReplay() { - LOG_ERROR(Lib_GnmDriver, "(STUBBED) called"); - return ORBIS_OK; +u32 PS4_SYSV_ABI sceGnmDriverInternalRetrieveGnmInterfaceForReplay() { + LOG_TRACE(Lib_GnmDriver, "called"); + // Not available in retail firmware + return 0x80000000; } -int PS4_SYSV_ABI sceGnmDriverInternalRetrieveGnmInterfaceForResourceRegistration() { - LOG_ERROR(Lib_GnmDriver, "(STUBBED) called"); - return ORBIS_OK; +u32 PS4_SYSV_ABI sceGnmDriverInternalRetrieveGnmInterfaceForResourceRegistration() { + LOG_TRACE(Lib_GnmDriver, "called"); + // Not available in retail firmware + return 0x80000000; } -int PS4_SYSV_ABI sceGnmDriverInternalRetrieveGnmInterfaceForValidation() { - LOG_ERROR(Lib_GnmDriver, "(STUBBED) called"); - return ORBIS_OK; +u32 PS4_SYSV_ABI sceGnmDriverInternalRetrieveGnmInterfaceForValidation() { + LOG_TRACE(Lib_GnmDriver, "called"); + // Not available in retail firmware + return 0x80000000; } int PS4_SYSV_ABI sceGnmDriverInternalVirtualQuery() { - LOG_ERROR(Lib_GnmDriver, "(STUBBED) called"); + LOG_TRACE(Lib_GnmDriver, "called"); + // Not available in retail firmware return ORBIS_OK; } -int PS4_SYSV_ABI sceGnmDriverTraceInProgress() { - LOG_ERROR(Lib_GnmDriver, "(STUBBED) called"); - return ORBIS_OK; +bool PS4_SYSV_ABI sceGnmDriverTraceInProgress() { + LOG_TRACE(Lib_GnmDriver, "called"); + // Not available in retail firmware + return false; } int PS4_SYSV_ABI sceGnmDriverTriggerCapture() { - LOG_ERROR(Lib_GnmDriver, "(STUBBED) called"); - return ORBIS_OK; + LOG_TRACE(Lib_GnmDriver, "called"); + // Not available in retail firmware + return ORBIS_GNM_ERROR_CAPTURE_RAZOR_NOT_LOADED; } int PS4_SYSV_ABI sceGnmEndWorkload(u64 workload) { @@ -981,7 +833,8 @@ int PS4_SYSV_ABI sceGnmEndWorkload(u64 workload) { s32 PS4_SYSV_ABI sceGnmFindResourcesPublic() { LOG_TRACE(Lib_GnmDriver, "called"); - return ORBIS_GNM_ERROR_FAILURE; // not available in retail FW + // Not available in retail firmware + return ORBIS_GNM_ERROR_FAILURE; } void PS4_SYSV_ABI sceGnmFlushGarlic() { @@ -1004,8 +857,9 @@ int PS4_SYSV_ABI sceGnmGetCoredumpProtectionFaultTimestamp() { } int PS4_SYSV_ABI sceGnmGetDbgGcHandle() { - LOG_ERROR(Lib_GnmDriver, "(STUBBED) called"); - return ORBIS_OK; + LOG_TRACE(Lib_GnmDriver, "called"); + // Not available in retail firmware + return -1; } int PS4_SYSV_ABI sceGnmGetDebugTimestamp() { @@ -1024,22 +878,26 @@ int PS4_SYSV_ABI sceGnmGetEqTimeStamp() { } int PS4_SYSV_ABI sceGnmGetGpuBlockStatus() { - LOG_ERROR(Lib_GnmDriver, "(STUBBED) called"); + LOG_TRACE(Lib_GnmDriver, "called"); + // Not available in retail firmware return ORBIS_OK; } u32 PS4_SYSV_ABI sceGnmGetGpuCoreClockFrequency() { LOG_TRACE(Lib_GnmDriver, "called"); - return Config::isNeoMode() ? 911'000'000 : 800'000'000; + // On console this uses an ioctl check, but we assume it is equal to just checking for neo mode. + return sceKernelIsNeoMode() ? 911'000'000 : 800'000'000; } int PS4_SYSV_ABI sceGnmGetGpuInfoStatus() { - LOG_ERROR(Lib_GnmDriver, "(STUBBED) called"); + LOG_TRACE(Lib_GnmDriver, "called"); + // Not available in retail firmware return ORBIS_OK; } int PS4_SYSV_ABI sceGnmGetLastWaitedAddress() { - LOG_ERROR(Lib_GnmDriver, "(STUBBED) called"); + LOG_TRACE(Lib_GnmDriver, "called"); + // Not available in retail firmware return ORBIS_OK; } @@ -1054,52 +912,62 @@ int PS4_SYSV_ABI sceGnmGetOffChipTessellationBufferSize() { } int PS4_SYSV_ABI sceGnmGetOwnerName() { - LOG_ERROR(Lib_GnmDriver, "(STUBBED) called"); - return ORBIS_OK; + LOG_TRACE(Lib_GnmDriver, "called"); + // Not available in retail firmware + return ORBIS_GNM_ERROR_FAILURE; } int PS4_SYSV_ABI sceGnmGetPhysicalCounterFromVirtualized() { - LOG_ERROR(Lib_GnmDriver, "(STUBBED) called"); - return ORBIS_OK; + LOG_TRACE(Lib_GnmDriver, "called"); + // Not available in retail firmware + return ORBIS_GNM_ERROR_FAILURE; } -int PS4_SYSV_ABI sceGnmGetProtectionFaultTimeStamp() { - LOG_ERROR(Lib_GnmDriver, "(STUBBED) called"); - return ORBIS_OK; +u32 PS4_SYSV_ABI sceGnmGetProtectionFaultTimeStamp() { + LOG_TRACE(Lib_GnmDriver, "called"); + // Not available in retail firmware + return 0; } int PS4_SYSV_ABI sceGnmGetResourceBaseAddressAndSizeInBytes() { - LOG_ERROR(Lib_GnmDriver, "(STUBBED) called"); - return ORBIS_OK; + LOG_TRACE(Lib_GnmDriver, "called"); + // Not available in retail firmware + return ORBIS_GNM_ERROR_FAILURE; } int PS4_SYSV_ABI sceGnmGetResourceName() { - LOG_ERROR(Lib_GnmDriver, "(STUBBED) called"); - return ORBIS_OK; + LOG_TRACE(Lib_GnmDriver, "called"); + // Not available in retail firmware + return ORBIS_GNM_ERROR_FAILURE; } int PS4_SYSV_ABI sceGnmGetResourceShaderGuid() { - LOG_ERROR(Lib_GnmDriver, "(STUBBED) called"); - return ORBIS_OK; + LOG_TRACE(Lib_GnmDriver, "called"); + // Not available in retail firmware + return ORBIS_GNM_ERROR_FAILURE; } int PS4_SYSV_ABI sceGnmGetResourceType() { - LOG_ERROR(Lib_GnmDriver, "(STUBBED) called"); - return ORBIS_OK; + LOG_TRACE(Lib_GnmDriver, "called"); + // Not available in retail firmware + return ORBIS_GNM_ERROR_FAILURE; } int PS4_SYSV_ABI sceGnmGetResourceUserData() { - LOG_ERROR(Lib_GnmDriver, "(STUBBED) called"); - return ORBIS_OK; + LOG_TRACE(Lib_GnmDriver, "called"); + // Not available in retail firmware + return ORBIS_GNM_ERROR_FAILURE; } int PS4_SYSV_ABI sceGnmGetShaderProgramBaseAddress() { - LOG_ERROR(Lib_GnmDriver, "(STUBBED) called"); + LOG_TRACE(Lib_GnmDriver, "called"); + // Not available in retail firmware return ORBIS_OK; } int PS4_SYSV_ABI sceGnmGetShaderStatus() { - LOG_ERROR(Lib_GnmDriver, "(STUBBED) called"); + LOG_TRACE(Lib_GnmDriver, "called"); + // Not available in retail firmware return ORBIS_OK; } @@ -1108,14 +976,14 @@ VAddr PS4_SYSV_ABI sceGnmGetTheTessellationFactorRingBufferBaseAddress() { return tessellation_factors_ring_addr; } -int PS4_SYSV_ABI sceGnmGpuPaDebugEnter() { - LOG_ERROR(Lib_GnmDriver, "(STUBBED) called"); - return ORBIS_OK; +void PS4_SYSV_ABI sceGnmGpuPaDebugEnter() { + LOG_TRACE(Lib_GnmDriver, "called"); + // Not available in retail firmware } -int PS4_SYSV_ABI sceGnmGpuPaDebugLeave() { - LOG_ERROR(Lib_GnmDriver, "(STUBBED) called"); - return ORBIS_OK; +void PS4_SYSV_ABI sceGnmGpuPaDebugLeave() { + LOG_TRACE(Lib_GnmDriver, "called"); + // Not available in retail firmware } int PS4_SYSV_ABI sceGnmInsertDingDongMarker() { @@ -1206,7 +1074,8 @@ s32 PS4_SYSV_ABI sceGnmInsertSetMarker(u32* cmdbuf, u32 size, const char* marker } int PS4_SYSV_ABI sceGnmInsertThreadTraceMarker() { - LOG_ERROR(Lib_GnmDriver, "(STUBBED) called"); + LOG_TRACE(Lib_GnmDriver, "called"); + // Not available in retail firmware return ORBIS_OK; } @@ -1218,7 +1087,8 @@ s32 PS4_SYSV_ABI sceGnmInsertWaitFlipDone(u32* cmdbuf, u32 size, s32 vo_handle, } uintptr_t label_addr{}; - VideoOut::sceVideoOutGetBufferLabelAddress(vo_handle, &label_addr); + ASSERT_MSG(VideoOut::sceVideoOutGetBufferLabelAddress(vo_handle, &label_addr) == 16, + "sceVideoOutGetBufferLabelAddress call failed"); auto* wait_reg_mem = reinterpret_cast(cmdbuf); wait_reg_mem->header = PM4Type3Header{PM4ItOpcode::WaitRegMem, 5}; @@ -1236,9 +1106,10 @@ int PS4_SYSV_ABI sceGnmIsCoredumpValid() { return ORBIS_OK; } -int PS4_SYSV_ABI sceGnmIsUserPaEnabled() { +bool PS4_SYSV_ABI sceGnmIsUserPaEnabled() { LOG_TRACE(Lib_GnmDriver, "called"); - return 0; // PA Debug is always disabled in retail FW + // Not available in retail firmware + return false; } int PS4_SYSV_ABI sceGnmLogicalCuIndexToPhysicalCuIndex() { @@ -1303,50 +1174,58 @@ int PS4_SYSV_ABI sceGnmMapComputeQueueWithPriority(u32 pipe_id, u32 queue_id, VA } int PS4_SYSV_ABI sceGnmPaDisableFlipCallbacks() { - LOG_ERROR(Lib_GnmDriver, "(STUBBED) called"); + LOG_TRACE(Lib_GnmDriver, "called"); + // Not available in retail firmware return ORBIS_OK; } int PS4_SYSV_ABI sceGnmPaEnableFlipCallbacks() { - LOG_ERROR(Lib_GnmDriver, "(STUBBED) called"); + LOG_TRACE(Lib_GnmDriver, "called"); + // Not available in retail firmware return ORBIS_OK; } int PS4_SYSV_ABI sceGnmPaHeartbeat() { - LOG_ERROR(Lib_GnmDriver, "(STUBBED) called"); + LOG_TRACE(Lib_GnmDriver, "called"); + // Not available in retail firmware return ORBIS_OK; } int PS4_SYSV_ABI sceGnmQueryResourceRegistrationUserMemoryRequirements() { - LOG_ERROR(Lib_GnmDriver, "(STUBBED) called"); - return ORBIS_OK; + LOG_TRACE(Lib_GnmDriver, "called"); + // Not available in retail firmware + return ORBIS_GNM_ERROR_FAILURE; } int PS4_SYSV_ABI sceGnmRaiseUserExceptionEvent() { - LOG_ERROR(Lib_GnmDriver, "(STUBBED) called"); + LOG_TRACE(Lib_GnmDriver, "called"); + // Not available in retail firmware return ORBIS_OK; } int PS4_SYSV_ABI sceGnmRegisterGdsResource() { - LOG_ERROR(Lib_GnmDriver, "(STUBBED) called"); - return ORBIS_OK; + LOG_TRACE(Lib_GnmDriver, "called"); + // Not available in retail firmware + return ORBIS_GNM_ERROR_FAILURE; } -int PS4_SYSV_ABI sceGnmRegisterGnmLiveCallbackConfig() { - LOG_ERROR(Lib_GnmDriver, "(STUBBED) called"); - return ORBIS_OK; +void PS4_SYSV_ABI sceGnmRegisterGnmLiveCallbackConfig() { + LOG_TRACE(Lib_GnmDriver, "called"); + // Not available in retail firmware } s32 PS4_SYSV_ABI sceGnmRegisterOwner(void* handle, const char* name) { LOG_TRACE(Lib_GnmDriver, "called"); - return ORBIS_GNM_ERROR_FAILURE; // PA Debug is always disabled in retail FW + // Not available in retail firmware + return ORBIS_GNM_ERROR_FAILURE; } s32 PS4_SYSV_ABI sceGnmRegisterResource(void* res_handle, void* owner_handle, const void* addr, size_t size, const char* name, int res_type, u64 user_data) { LOG_TRACE(Lib_GnmDriver, "called"); - return ORBIS_GNM_ERROR_FAILURE; // PA Debug is always disabled in retail FW + // Not available in retail firmware + return ORBIS_GNM_ERROR_FAILURE; } int PS4_SYSV_ABI sceGnmRequestFlipAndSubmitDone() { @@ -1369,48 +1248,64 @@ s32 PS4_SYSV_ABI sceGnmResetVgtControl(u32* cmdbuf, u32 size) { if (cmdbuf == nullptr || size != 3) { return -1; } - PM4CmdSetData::SetContextReg(cmdbuf, 0x2aau, 0xffu); // IA_MULTI_VGT_PARAM + if (sceKernelIsNeoMode()) { + if (!UseNeoCompatSequences) { + PM4CmdSetData::SetUconfigReg(cmdbuf, 0x40000258u, 0x6d007fu); // IA_MULTI_VGT_PARAM + } else { + PM4CmdSetData::SetContextReg(cmdbuf, 0x100002aau, 0xd00ffu); // IA_MULTI_VGT_PARAM + } + } else { + PM4CmdSetData::SetContextReg(cmdbuf, 0x2aau, 0xffu); // IA_MULTI_VGT_PARAM + } return ORBIS_OK; } int PS4_SYSV_ABI sceGnmSdmaClose() { - LOG_ERROR(Lib_GnmDriver, "(STUBBED) called"); - return ORBIS_OK; + LOG_TRACE(Lib_GnmDriver, "called"); + // Not available in retail firmware + return ORBIS_GNM_ERROR_FAILURE; } int PS4_SYSV_ABI sceGnmSdmaConstFill() { - LOG_ERROR(Lib_GnmDriver, "(STUBBED) called"); - return ORBIS_OK; + LOG_TRACE(Lib_GnmDriver, "called"); + // Not available in retail firmware + return ORBIS_GNM_ERROR_FAILURE; } int PS4_SYSV_ABI sceGnmSdmaCopyLinear() { - LOG_ERROR(Lib_GnmDriver, "(STUBBED) called"); - return ORBIS_OK; + LOG_TRACE(Lib_GnmDriver, "called"); + // Not available in retail firmware + return ORBIS_GNM_ERROR_FAILURE; } int PS4_SYSV_ABI sceGnmSdmaCopyTiled() { - LOG_ERROR(Lib_GnmDriver, "(STUBBED) called"); - return ORBIS_OK; + LOG_TRACE(Lib_GnmDriver, "called"); + // Not available in retail firmware + return ORBIS_GNM_ERROR_FAILURE; } int PS4_SYSV_ABI sceGnmSdmaCopyWindow() { - LOG_ERROR(Lib_GnmDriver, "(STUBBED) called"); - return ORBIS_OK; + LOG_TRACE(Lib_GnmDriver, "called"); + // Not available in retail firmware + return ORBIS_GNM_ERROR_FAILURE; } int PS4_SYSV_ABI sceGnmSdmaFlush() { - LOG_ERROR(Lib_GnmDriver, "(STUBBED) called"); - return ORBIS_OK; + LOG_TRACE(Lib_GnmDriver, "called"); + // Not available in retail firmware + return ORBIS_GNM_ERROR_FAILURE; } int PS4_SYSV_ABI sceGnmSdmaGetMinCmdSize() { - LOG_ERROR(Lib_GnmDriver, "(STUBBED) called"); - return ORBIS_OK; + LOG_TRACE(Lib_GnmDriver, "called"); + // Not available in retail firmware + return ORBIS_GNM_ERROR_FAILURE; } int PS4_SYSV_ABI sceGnmSdmaOpen() { - LOG_ERROR(Lib_GnmDriver, "(STUBBED) called"); - return ORBIS_OK; + LOG_TRACE(Lib_GnmDriver, "called"); + // Not available in retail firmware + return ORBIS_GNM_ERROR_FAILURE; } s32 PS4_SYSV_ABI sceGnmSetCsShader(u32* cmdbuf, u32 size, const u32* cs_regs) { @@ -1525,7 +1420,7 @@ s32 PS4_SYSV_ABI sceGnmSetEmbeddedPsShader(u32* cmdbuf, u32 size, u32 shader_id, // pointer to a stack memory, so the check will likely fail. To workaround it we will // repeat set shader functionality here as it is trivial. cmdbuf = PM4CmdSetData::SetShReg(cmdbuf, 8u, ps_regs[0], - 0u); // SPI_SHADER_PGM_LO_PS/SPI_SHADER_PGM_HI_PS + ps_regs[1]); // SPI_SHADER_PGM_LO_PS/SPI_SHADER_PGM_HI_PS cmdbuf = PM4CmdSetData::SetShReg(cmdbuf, 10u, ps_regs[2], ps_regs[3]); // SPI_SHADER_PGM_RSRC1_PS/SPI_SHADER_PGM_RSRC2_PS cmdbuf = PM4CmdSetData::SetContextReg(cmdbuf, 0x1c4u, ps_regs[4], @@ -1797,23 +1692,27 @@ s32 PS4_SYSV_ABI sceGnmSetPsShader350(u32* cmdbuf, u32 size, const u32* ps_regs) } int PS4_SYSV_ABI sceGnmSetResourceRegistrationUserMemory() { - LOG_ERROR(Lib_GnmDriver, "(STUBBED) called"); - return ORBIS_OK; + LOG_TRACE(Lib_GnmDriver, "called"); + // Not available in retail firmware + return ORBIS_GNM_ERROR_FAILURE; } int PS4_SYSV_ABI sceGnmSetResourceUserData() { - LOG_ERROR(Lib_GnmDriver, "(STUBBED) called"); - return ORBIS_OK; + LOG_TRACE(Lib_GnmDriver, "called"); + // Not available in retail firmware + return ORBIS_GNM_ERROR_FAILURE; } int PS4_SYSV_ABI sceGnmSetSpiEnableSqCounters() { - LOG_ERROR(Lib_GnmDriver, "(STUBBED) called"); - return ORBIS_OK; + LOG_TRACE(Lib_GnmDriver, "called"); + // Not available in retail firmware + return ORBIS_GNM_ERROR_FAILURE; } int PS4_SYSV_ABI sceGnmSetSpiEnableSqCountersForUnitInstance() { - LOG_ERROR(Lib_GnmDriver, "(STUBBED) called"); - return ORBIS_OK; + LOG_TRACE(Lib_GnmDriver, "called"); + // Not available in retail firmware + return ORBIS_GNM_ERROR_FAILURE; } int PS4_SYSV_ABI sceGnmSetupMipStatsReport() { @@ -1830,9 +1729,25 @@ s32 PS4_SYSV_ABI sceGnmSetVgtControl(u32* cmdbuf, u32 size, u32 prim_group_sz_mi return -1; } - const u32 reg_value = - ((partial_vs_wave_mode & 1) << 0x10) | (prim_group_sz_minus_one & 0xffffu); - PM4CmdSetData::SetContextReg(cmdbuf, 0x2aau, reg_value); // IA_MULTI_VGT_PARAM + if (sceKernelIsNeoMode()) { + const u32 wd_switch_on_eop = u32(wd_switch_only_on_eop_mode != 0) << 0x14; + const u32 switch_on_eoi = u32(wd_switch_only_on_eop_mode == 0) << 0x13; + const u32 reg_value = + wd_switch_only_on_eop_mode != 0 + ? (partial_vs_wave_mode & 1) << 0x10 | prim_group_sz_minus_one | wd_switch_on_eop | + switch_on_eoi | 0x40000u + : prim_group_sz_minus_one & 0x1cffffu | wd_switch_on_eop | switch_on_eoi | 0x50000u; + if (!UseNeoCompatSequences) { + PM4CmdSetData::SetUconfigReg(cmdbuf, 0x40000258u, + reg_value | 0x600000u); // IA_MULTI_VGT_PARAM + } else { + PM4CmdSetData::SetContextReg(cmdbuf, 0x100002aau, reg_value); // IA_MULTI_VGT_PARAM + } + } else { + const u32 reg_value = + ((partial_vs_wave_mode & 1) << 0x10) | (prim_group_sz_minus_one & 0xffffu); + PM4CmdSetData::SetContextReg(cmdbuf, 0x2aau, reg_value); // IA_MULTI_VGT_PARAM + } return ORBIS_OK; } @@ -1880,188 +1795,225 @@ int PS4_SYSV_ABI sceGnmSetWaveLimitMultipliers() { } int PS4_SYSV_ABI sceGnmSpmEndSpm() { - LOG_ERROR(Lib_GnmDriver, "(STUBBED) called"); - return ORBIS_OK; + LOG_TRACE(Lib_GnmDriver, "called"); + // Not available in retail firmware + return ORBIS_GNM_ERROR_FAILURE; } int PS4_SYSV_ABI sceGnmSpmInit() { - LOG_ERROR(Lib_GnmDriver, "(STUBBED) called"); - return ORBIS_OK; + LOG_TRACE(Lib_GnmDriver, "called"); + // Not available in retail firmware + return ORBIS_GNM_ERROR_FAILURE; } int PS4_SYSV_ABI sceGnmSpmInit2() { - LOG_ERROR(Lib_GnmDriver, "(STUBBED) called"); - return ORBIS_OK; + LOG_TRACE(Lib_GnmDriver, "called"); + // Not available in retail firmware + return ORBIS_GNM_ERROR_FAILURE; } int PS4_SYSV_ABI sceGnmSpmSetDelay() { - LOG_ERROR(Lib_GnmDriver, "(STUBBED) called"); - return ORBIS_OK; + LOG_TRACE(Lib_GnmDriver, "called"); + // Not available in retail firmware + return ORBIS_GNM_ERROR_FAILURE; } int PS4_SYSV_ABI sceGnmSpmSetMuxRam() { - LOG_ERROR(Lib_GnmDriver, "(STUBBED) called"); - return ORBIS_OK; + LOG_TRACE(Lib_GnmDriver, "called"); + // Not available in retail firmware + return ORBIS_GNM_ERROR_FAILURE; } int PS4_SYSV_ABI sceGnmSpmSetMuxRam2() { - LOG_ERROR(Lib_GnmDriver, "(STUBBED) called"); - return ORBIS_OK; + LOG_TRACE(Lib_GnmDriver, "called"); + // Not available in retail firmware + return ORBIS_GNM_ERROR_FAILURE; } int PS4_SYSV_ABI sceGnmSpmSetSelectCounter() { - LOG_ERROR(Lib_GnmDriver, "(STUBBED) called"); - return ORBIS_OK; + LOG_TRACE(Lib_GnmDriver, "called"); + // Not available in retail firmware + return ORBIS_GNM_ERROR_FAILURE; } int PS4_SYSV_ABI sceGnmSpmSetSpmSelects() { - LOG_ERROR(Lib_GnmDriver, "(STUBBED) called"); - return ORBIS_OK; + LOG_TRACE(Lib_GnmDriver, "called"); + // Not available in retail firmware + return ORBIS_GNM_ERROR_FAILURE; } int PS4_SYSV_ABI sceGnmSpmSetSpmSelects2() { - LOG_ERROR(Lib_GnmDriver, "(STUBBED) called"); - return ORBIS_OK; + LOG_TRACE(Lib_GnmDriver, "called"); + // Not available in retail firmware + return ORBIS_GNM_ERROR_FAILURE; } int PS4_SYSV_ABI sceGnmSpmStartSpm() { - LOG_ERROR(Lib_GnmDriver, "(STUBBED) called"); - return ORBIS_OK; + LOG_TRACE(Lib_GnmDriver, "called"); + // Not available in retail firmware + return ORBIS_GNM_ERROR_FAILURE; } int PS4_SYSV_ABI sceGnmSqttFini() { - LOG_ERROR(Lib_GnmDriver, "(STUBBED) called"); - return ORBIS_OK; + LOG_TRACE(Lib_GnmDriver, "called"); + // Not available in retail firmware + return ORBIS_GNM_ERROR_FAILURE; } int PS4_SYSV_ABI sceGnmSqttFinishTrace() { - LOG_ERROR(Lib_GnmDriver, "(STUBBED) called"); - return ORBIS_OK; + LOG_TRACE(Lib_GnmDriver, "called"); + // Not available in retail firmware + return ORBIS_GNM_ERROR_FAILURE; } int PS4_SYSV_ABI sceGnmSqttGetBcInfo() { - LOG_ERROR(Lib_GnmDriver, "(STUBBED) called"); - return ORBIS_OK; + LOG_TRACE(Lib_GnmDriver, "called"); + // Not available in retail firmware + return ORBIS_GNM_ERROR_FAILURE; } int PS4_SYSV_ABI sceGnmSqttGetGpuClocks() { - LOG_ERROR(Lib_GnmDriver, "(STUBBED) called"); - return ORBIS_OK; + LOG_TRACE(Lib_GnmDriver, "called"); + // Not available in retail firmware + return ORBIS_GNM_ERROR_FAILURE; } int PS4_SYSV_ABI sceGnmSqttGetHiWater() { - LOG_ERROR(Lib_GnmDriver, "(STUBBED) called"); - return ORBIS_OK; + LOG_TRACE(Lib_GnmDriver, "called"); + // Not available in retail firmware + return ORBIS_GNM_ERROR_FAILURE; } int PS4_SYSV_ABI sceGnmSqttGetStatus() { - LOG_ERROR(Lib_GnmDriver, "(STUBBED) called"); - return ORBIS_OK; + LOG_TRACE(Lib_GnmDriver, "called"); + // Not available in retail firmware + return ORBIS_GNM_ERROR_FAILURE; } int PS4_SYSV_ABI sceGnmSqttGetTraceCounter() { - LOG_ERROR(Lib_GnmDriver, "(STUBBED) called"); - return ORBIS_OK; + LOG_TRACE(Lib_GnmDriver, "called"); + // Not available in retail firmware + return ORBIS_GNM_ERROR_FAILURE; } int PS4_SYSV_ABI sceGnmSqttGetTraceWptr() { - LOG_ERROR(Lib_GnmDriver, "(STUBBED) called"); - return ORBIS_OK; + LOG_TRACE(Lib_GnmDriver, "called"); + // Not available in retail firmware + return ORBIS_GNM_ERROR_FAILURE; } int PS4_SYSV_ABI sceGnmSqttGetWrapCounts() { - LOG_ERROR(Lib_GnmDriver, "(STUBBED) called"); - return ORBIS_OK; + LOG_TRACE(Lib_GnmDriver, "called"); + // Not available in retail firmware + return ORBIS_GNM_ERROR_FAILURE; } int PS4_SYSV_ABI sceGnmSqttGetWrapCounts2() { - LOG_ERROR(Lib_GnmDriver, "(STUBBED) called"); - return ORBIS_OK; + LOG_TRACE(Lib_GnmDriver, "called"); + // Not available in retail firmware + return ORBIS_GNM_ERROR_FAILURE; } int PS4_SYSV_ABI sceGnmSqttGetWritebackLabels() { - LOG_ERROR(Lib_GnmDriver, "(STUBBED) called"); - return ORBIS_OK; + LOG_TRACE(Lib_GnmDriver, "called"); + // Not available in retail firmware + return ORBIS_GNM_ERROR_FAILURE; } int PS4_SYSV_ABI sceGnmSqttInit() { - LOG_ERROR(Lib_GnmDriver, "(STUBBED) called"); - return ORBIS_OK; + LOG_TRACE(Lib_GnmDriver, "called"); + // Not available in retail firmware + return ORBIS_GNM_ERROR_FAILURE; } int PS4_SYSV_ABI sceGnmSqttSelectMode() { - LOG_ERROR(Lib_GnmDriver, "(STUBBED) called"); - return ORBIS_OK; + LOG_TRACE(Lib_GnmDriver, "called"); + // Not available in retail firmware + return ORBIS_GNM_ERROR_FAILURE; } int PS4_SYSV_ABI sceGnmSqttSelectTarget() { - LOG_ERROR(Lib_GnmDriver, "(STUBBED) called"); - return ORBIS_OK; + LOG_TRACE(Lib_GnmDriver, "called"); + // Not available in retail firmware + return ORBIS_GNM_ERROR_FAILURE; } int PS4_SYSV_ABI sceGnmSqttSelectTokens() { - LOG_ERROR(Lib_GnmDriver, "(STUBBED) called"); - return ORBIS_OK; + LOG_TRACE(Lib_GnmDriver, "called"); + // Not available in retail firmware + return ORBIS_GNM_ERROR_FAILURE; } int PS4_SYSV_ABI sceGnmSqttSetCuPerfMask() { - LOG_ERROR(Lib_GnmDriver, "(STUBBED) called"); - return ORBIS_OK; + LOG_TRACE(Lib_GnmDriver, "called"); + // Not available in retail firmware + return ORBIS_GNM_ERROR_FAILURE; } int PS4_SYSV_ABI sceGnmSqttSetDceEventWrite() { - LOG_ERROR(Lib_GnmDriver, "(STUBBED) called"); - return ORBIS_OK; + LOG_TRACE(Lib_GnmDriver, "called"); + // Not available in retail firmware + return ORBIS_GNM_ERROR_FAILURE; } int PS4_SYSV_ABI sceGnmSqttSetHiWater() { - LOG_ERROR(Lib_GnmDriver, "(STUBBED) called"); - return ORBIS_OK; + LOG_TRACE(Lib_GnmDriver, "called"); + // Not available in retail firmware + return ORBIS_GNM_ERROR_FAILURE; } int PS4_SYSV_ABI sceGnmSqttSetTraceBuffer2() { - LOG_ERROR(Lib_GnmDriver, "(STUBBED) called"); - return ORBIS_OK; + LOG_TRACE(Lib_GnmDriver, "called"); + // Not available in retail firmware + return ORBIS_GNM_ERROR_FAILURE; } int PS4_SYSV_ABI sceGnmSqttSetTraceBuffers() { - LOG_ERROR(Lib_GnmDriver, "(STUBBED) called"); - return ORBIS_OK; + LOG_TRACE(Lib_GnmDriver, "called"); + // Not available in retail firmware + return ORBIS_GNM_ERROR_FAILURE; } int PS4_SYSV_ABI sceGnmSqttSetUserData() { - LOG_ERROR(Lib_GnmDriver, "(STUBBED) called"); - return ORBIS_OK; + LOG_TRACE(Lib_GnmDriver, "called"); + // Not available in retail firmware + return ORBIS_GNM_ERROR_FAILURE; } int PS4_SYSV_ABI sceGnmSqttSetUserdataTimer() { - LOG_ERROR(Lib_GnmDriver, "(STUBBED) called"); - return ORBIS_OK; + LOG_TRACE(Lib_GnmDriver, "called"); + // Not available in retail firmware + return ORBIS_GNM_ERROR_FAILURE; } int PS4_SYSV_ABI sceGnmSqttStartTrace() { - LOG_ERROR(Lib_GnmDriver, "(STUBBED) called"); - return ORBIS_OK; + LOG_TRACE(Lib_GnmDriver, "called"); + // Not available in retail firmware + return ORBIS_GNM_ERROR_FAILURE; } int PS4_SYSV_ABI sceGnmSqttStopTrace() { - LOG_ERROR(Lib_GnmDriver, "(STUBBED) called"); - return ORBIS_OK; + LOG_TRACE(Lib_GnmDriver, "called"); + // Not available in retail firmware + return ORBIS_GNM_ERROR_FAILURE; } int PS4_SYSV_ABI sceGnmSqttSwitchTraceBuffer() { - LOG_ERROR(Lib_GnmDriver, "(STUBBED) called"); - return ORBIS_OK; + LOG_TRACE(Lib_GnmDriver, "called"); + // Not available in retail firmware + return ORBIS_GNM_ERROR_FAILURE; } int PS4_SYSV_ABI sceGnmSqttSwitchTraceBuffer2() { - LOG_ERROR(Lib_GnmDriver, "(STUBBED) called"); - return ORBIS_OK; + LOG_TRACE(Lib_GnmDriver, "called"); + // Not available in retail firmware + return ORBIS_GNM_ERROR_FAILURE; } int PS4_SYSV_ABI sceGnmSqttWaitForEvent() { - LOG_ERROR(Lib_GnmDriver, "(STUBBED) called"); - return ORBIS_OK; + LOG_TRACE(Lib_GnmDriver, "called"); + // Not available in retail firmware + return ORBIS_GNM_ERROR_FAILURE; } static inline s32 PatchFlipRequest(u32* cmdbuf, u32 size, u32 vo_handle, u32 buf_idx, u32 flip_mode, @@ -2090,7 +2042,8 @@ static inline s32 PatchFlipRequest(u32* cmdbuf, u32 size, u32 vo_handle, u32 buf } uintptr_t label_addr{}; - VideoOut::sceVideoOutGetBufferLabelAddress(vo_handle, &label_addr); + ASSERT_MSG(VideoOut::sceVideoOutGetBufferLabelAddress(vo_handle, &label_addr) == 16, + "sceVideoOutGetBufferLabelAddress call failed"); // Write event to lock the VO surface auto* write_lock = reinterpret_cast(cmdbuf); @@ -2215,9 +2168,25 @@ int PS4_SYSV_ABI sceGnmSubmitCommandBuffersForWorkload(u32 workload, u32 count, if (sdk_version <= 0x1ffffffu) { liverpool->SubmitGfx(InitSequence, {}); } else if (sdk_version <= 0x3ffffffu) { - liverpool->SubmitGfx(InitSequence200, {}); + if (sceKernelIsNeoMode()) { + if (!UseNeoCompatSequences) { + liverpool->SubmitGfx(InitSequence200Neo, {}); + } else { + liverpool->SubmitGfx(InitSequence200NeoCompat, {}); + } + } else { + liverpool->SubmitGfx(InitSequence200, {}); + } } else { - liverpool->SubmitGfx(InitSequence350, {}); + if (sceKernelIsNeoMode()) { + if (!UseNeoCompatSequences) { + liverpool->SubmitGfx(InitSequence350Neo, {}); + } else { + liverpool->SubmitGfx(InitSequence350NeoCompat, {}); + } + } else { + liverpool->SubmitGfx(InitSequence350, {}); + } } send_init_packet = false; } @@ -2292,18 +2261,21 @@ int PS4_SYSV_ABI sceGnmUnmapComputeQueue() { } int PS4_SYSV_ABI sceGnmUnregisterAllResourcesForOwner() { - LOG_ERROR(Lib_GnmDriver, "(STUBBED) called"); - return ORBIS_OK; + LOG_TRACE(Lib_GnmDriver, "called"); + // Not available in retail firmware + return ORBIS_GNM_ERROR_FAILURE; } int PS4_SYSV_ABI sceGnmUnregisterOwnerAndResources() { - LOG_ERROR(Lib_GnmDriver, "(STUBBED) called"); - return ORBIS_OK; + LOG_TRACE(Lib_GnmDriver, "called"); + // Not available in retail firmware + return ORBIS_GNM_ERROR_FAILURE; } int PS4_SYSV_ABI sceGnmUnregisterResource() { - LOG_ERROR(Lib_GnmDriver, "(STUBBED) called"); - return ORBIS_OK; + LOG_TRACE(Lib_GnmDriver, "called"); + // Not available in retail firmware + return ORBIS_GNM_ERROR_FAILURE; } s32 PS4_SYSV_ABI sceGnmUpdateGsShader(u32* cmdbuf, u32 size, const u32* gs_regs) { @@ -2337,8 +2309,36 @@ s32 PS4_SYSV_ABI sceGnmUpdateGsShader(u32* cmdbuf, u32 size, const u32* gs_regs) return ORBIS_OK; } -int PS4_SYSV_ABI sceGnmUpdateHsShader() { - LOG_ERROR(Lib_GnmDriver, "(STUBBED) called"); +int PS4_SYSV_ABI sceGnmUpdateHsShader(u32* cmdbuf, u32 size, const u32* hs_regs, u32 ls_hs_config) { + LOG_TRACE(Lib_GnmDriver, "called"); + + if (!cmdbuf || size <= 0x1c) { + return -1; + } + + if (!hs_regs) { + LOG_ERROR(Lib_GnmDriver, "Null pointer passed as argument"); + return -1; + } + + if (hs_regs[1] != 0) { + LOG_ERROR(Lib_GnmDriver, "Invalid shader address"); + return -1; + } + + cmdbuf = PM4CmdSetData::SetShReg(cmdbuf, 0x108u, hs_regs[0], + 0u); // SPI_SHADER_PGM_LO_HS/SPI_SHADER_PGM_HI_HS + cmdbuf = PM4CmdSetData::SetShReg(cmdbuf, 0x10au, hs_regs[2], + hs_regs[3]); // SPI_SHADER_PGM_RSRC1_HS/SPI_SHADER_PGM_RSRC1_LS + cmdbuf = WritePacket( + cmdbuf, PM4ShaderType::ShaderGraphics, 0xc01e0286u, hs_regs[5], + hs_regs[6]); // VGT_HOS_MAX_TESS_LEVEL/VGT_HOS_MIN_TESS_LEVEL update + cmdbuf = WritePacket(cmdbuf, PM4ShaderType::ShaderGraphics, 0xc01e02dbu, + hs_regs[4]); // VGT_TF_PARAM update + cmdbuf = WritePacket(cmdbuf, PM4ShaderType::ShaderGraphics, 0xc01e02d6u, + ls_hs_config); // VGT_LS_HS_CONFIG update + + WriteTrailingNop<11>(cmdbuf); return ORBIS_OK; } @@ -2470,82 +2470,98 @@ s32 PS4_SYSV_ABI sceGnmUpdateVsShader(u32* cmdbuf, u32 size, const u32* vs_regs, s32 PS4_SYSV_ABI sceGnmValidateCommandBuffers() { LOG_TRACE(Lib_GnmDriver, "called"); - return ORBIS_GNM_ERROR_VALIDATION_NOT_ENABLED; // not available in retail FW; + // Not available in retail firmware + return ORBIS_GNM_ERROR_VALIDATION_NOT_ENABLED; } int PS4_SYSV_ABI sceGnmValidateDisableDiagnostics() { - LOG_ERROR(Lib_GnmDriver, "(STUBBED) called"); - return ORBIS_OK; + LOG_TRACE(Lib_GnmDriver, "called"); + // Not available in retail firmware + return ORBIS_GNM_ERROR_VALIDATION_NOT_ENABLED; } int PS4_SYSV_ABI sceGnmValidateDisableDiagnostics2() { - LOG_ERROR(Lib_GnmDriver, "(STUBBED) called"); - return ORBIS_OK; + LOG_TRACE(Lib_GnmDriver, "called"); + // Not available in retail firmware + return ORBIS_GNM_ERROR_VALIDATION_NOT_ENABLED; } int PS4_SYSV_ABI sceGnmValidateDispatchCommandBuffers() { - LOG_ERROR(Lib_GnmDriver, "(STUBBED) called"); - return ORBIS_OK; + LOG_TRACE(Lib_GnmDriver, "called"); + // Not available in retail firmware + return ORBIS_GNM_ERROR_VALIDATION_NOT_ENABLED; } int PS4_SYSV_ABI sceGnmValidateDrawCommandBuffers() { - LOG_ERROR(Lib_GnmDriver, "(STUBBED) called"); - return ORBIS_OK; + LOG_TRACE(Lib_GnmDriver, "called"); + // Not available in retail firmware + return ORBIS_GNM_ERROR_VALIDATION_NOT_ENABLED; } int PS4_SYSV_ABI sceGnmValidateGetDiagnosticInfo() { - LOG_ERROR(Lib_GnmDriver, "(STUBBED) called"); - return ORBIS_OK; + LOG_TRACE(Lib_GnmDriver, "called"); + // Not available in retail firmware + return ORBIS_GNM_ERROR_VALIDATION_NOT_ENABLED; } int PS4_SYSV_ABI sceGnmValidateGetDiagnostics() { - LOG_ERROR(Lib_GnmDriver, "(STUBBED) called"); - return ORBIS_OK; + LOG_TRACE(Lib_GnmDriver, "called"); + // Not available in retail firmware + return ORBIS_GNM_ERROR_VALIDATION_NOT_ENABLED; } int PS4_SYSV_ABI sceGnmValidateGetVersion() { - LOG_ERROR(Lib_GnmDriver, "(STUBBED) called"); - return ORBIS_OK; -} - -int PS4_SYSV_ABI sceGnmValidateOnSubmitEnabled() { LOG_TRACE(Lib_GnmDriver, "called"); + // Not available in retail firmware return 0; } +bool PS4_SYSV_ABI sceGnmValidateOnSubmitEnabled() { + LOG_TRACE(Lib_GnmDriver, "called"); + // Not available in retail firmware + return false; +} + int PS4_SYSV_ABI sceGnmValidateResetState() { - LOG_ERROR(Lib_GnmDriver, "(STUBBED) called"); - return ORBIS_OK; + LOG_TRACE(Lib_GnmDriver, "called"); + // Not available in retail firmware + return ORBIS_GNM_ERROR_VALIDATION_NOT_ENABLED; } int PS4_SYSV_ABI sceGnmValidationRegisterMemoryCheckCallback() { - LOG_ERROR(Lib_GnmDriver, "(STUBBED) called"); - return ORBIS_OK; + LOG_TRACE(Lib_GnmDriver, "called"); + // Not available in retail firmware + return ORBIS_GNM_ERROR_VALIDATION_NOT_ENABLED; } int PS4_SYSV_ABI sceRazorCaptureCommandBuffersOnlyImmediate() { - LOG_ERROR(Lib_GnmDriver, "(STUBBED) called"); - return ORBIS_OK; + LOG_TRACE(Lib_GnmDriver, "called"); + // Not available in retail firmware + return ORBIS_GNM_ERROR_CAPTURE_FAILED_INTERNAL; } int PS4_SYSV_ABI sceRazorCaptureCommandBuffersOnlySinceLastFlip() { - LOG_ERROR(Lib_GnmDriver, "(STUBBED) called"); - return ORBIS_OK; + LOG_TRACE(Lib_GnmDriver, "called"); + // Not available in retail firmware + return ORBIS_GNM_ERROR_CAPTURE_FAILED_INTERNAL; } int PS4_SYSV_ABI sceRazorCaptureImmediate() { - LOG_ERROR(Lib_GnmDriver, "(STUBBED) called"); - return ORBIS_OK; + LOG_TRACE(Lib_GnmDriver, "called"); + // Not available in retail firmware + return ORBIS_GNM_ERROR_CAPTURE_FAILED_INTERNAL; } int PS4_SYSV_ABI sceRazorCaptureSinceLastFlip() { - LOG_ERROR(Lib_GnmDriver, "(STUBBED) called"); - return ORBIS_OK; + LOG_TRACE(Lib_GnmDriver, "called"); + // Not available in retail firmware + return ORBIS_GNM_ERROR_CAPTURE_FAILED_INTERNAL; } -int PS4_SYSV_ABI sceRazorIsLoaded() { - LOG_ERROR(Lib_GnmDriver, "(STUBBED) called"); - return ORBIS_OK; +bool PS4_SYSV_ABI sceRazorIsLoaded() { + LOG_TRACE(Lib_GnmDriver, "called"); + // Not available in retail firmware + return false; } int PS4_SYSV_ABI Func_063D065A2D6359C3() { @@ -2714,13 +2730,15 @@ int PS4_SYSV_ABI Func_ECB4C6BA41FE3350() { } int PS4_SYSV_ABI sceGnmDebugModuleReset() { - LOG_ERROR(Lib_GnmDriver, "(STUBBED) called"); - return ORBIS_OK; + LOG_TRACE(Lib_GnmDriver, "called"); + // Not available in retail firmware + return ORBIS_GNM_ERROR_FAILURE; } int PS4_SYSV_ABI sceGnmDebugReset() { - LOG_ERROR(Lib_GnmDriver, "(STUBBED) called"); - return ORBIS_OK; + LOG_TRACE(Lib_GnmDriver, "called"); + // Not available in retail firmware + return ORBIS_GNM_ERROR_FAILURE; } int PS4_SYSV_ABI Func_C4C328B7CF3B4171() { @@ -2739,18 +2757,21 @@ int PS4_SYSV_ABI sceGnmDrawInitToDefaultContextStateInternalSize() { } int PS4_SYSV_ABI sceGnmFindResources() { - LOG_ERROR(Lib_GnmDriver, "(STUBBED) called"); - return ORBIS_OK; + LOG_TRACE(Lib_GnmDriver, "called"); + // Not available in retail firmware + return ORBIS_GNM_ERROR_FAILURE; } int PS4_SYSV_ABI sceGnmGetResourceRegistrationBuffers() { - LOG_ERROR(Lib_GnmDriver, "(STUBBED) called"); - return ORBIS_OK; + LOG_TRACE(Lib_GnmDriver, "called"); + // Not available in retail firmware + return ORBIS_GNM_ERROR_FAILURE; } int PS4_SYSV_ABI sceGnmRegisterOwnerForSystem() { - LOG_ERROR(Lib_GnmDriver, "(STUBBED) called"); - return ORBIS_OK; + LOG_TRACE(Lib_GnmDriver, "called"); + // Not available in retail firmware + return ORBIS_GNM_ERROR_FAILURE; } int PS4_SYSV_ABI Func_1C43886B16EE5530() { diff --git a/src/core/libraries/gnmdriver/gnmdriver.h b/src/core/libraries/gnmdriver/gnmdriver.h index d15483323..94d06c85f 100644 --- a/src/core/libraries/gnmdriver/gnmdriver.h +++ b/src/core/libraries/gnmdriver/gnmdriver.h @@ -39,7 +39,7 @@ int PS4_SYSV_ABI sceGnmDisableMipStatsReport(); s32 PS4_SYSV_ABI sceGnmDispatchDirect(u32* cmdbuf, u32 size, u32 threads_x, u32 threads_y, u32 threads_z, u32 flags); s32 PS4_SYSV_ABI sceGnmDispatchIndirect(u32* cmdbuf, u32 size, u32 data_offset, u32 flags); -int PS4_SYSV_ABI sceGnmDispatchIndirectOnMec(); +s32 PS4_SYSV_ABI sceGnmDispatchIndirectOnMec(u32* cmdbuf, u32 size, VAddr args, u32 modifier); u32 PS4_SYSV_ABI sceGnmDispatchInitDefaultHardwareState(u32* cmdbuf, u32 size); s32 PS4_SYSV_ABI sceGnmDrawIndex(u32* cmdbuf, u32 size, u32 index_count, uintptr_t index_addr, u32 flags, u32 type); @@ -67,15 +67,15 @@ u32 PS4_SYSV_ABI sceGnmDrawInitToDefaultContextState(u32* cmdbuf, u32 size); u32 PS4_SYSV_ABI sceGnmDrawInitToDefaultContextState400(u32* cmdbuf, u32 size); int PS4_SYSV_ABI sceGnmDrawOpaqueAuto(); bool PS4_SYSV_ABI sceGnmDriverCaptureInProgress(); -int PS4_SYSV_ABI sceGnmDriverInternalRetrieveGnmInterface(); -int PS4_SYSV_ABI sceGnmDriverInternalRetrieveGnmInterfaceForGpuDebugger(); -int PS4_SYSV_ABI sceGnmDriverInternalRetrieveGnmInterfaceForGpuException(); -int PS4_SYSV_ABI sceGnmDriverInternalRetrieveGnmInterfaceForHDRScopes(); -int PS4_SYSV_ABI sceGnmDriverInternalRetrieveGnmInterfaceForReplay(); -int PS4_SYSV_ABI sceGnmDriverInternalRetrieveGnmInterfaceForResourceRegistration(); -int PS4_SYSV_ABI sceGnmDriverInternalRetrieveGnmInterfaceForValidation(); +u32 PS4_SYSV_ABI sceGnmDriverInternalRetrieveGnmInterface(); +u32 PS4_SYSV_ABI sceGnmDriverInternalRetrieveGnmInterfaceForGpuDebugger(); +u32 PS4_SYSV_ABI sceGnmDriverInternalRetrieveGnmInterfaceForGpuException(); +u32 PS4_SYSV_ABI sceGnmDriverInternalRetrieveGnmInterfaceForHDRScopes(); +u32 PS4_SYSV_ABI sceGnmDriverInternalRetrieveGnmInterfaceForReplay(); +u32 PS4_SYSV_ABI sceGnmDriverInternalRetrieveGnmInterfaceForResourceRegistration(); +u32 PS4_SYSV_ABI sceGnmDriverInternalRetrieveGnmInterfaceForValidation(); int PS4_SYSV_ABI sceGnmDriverInternalVirtualQuery(); -int PS4_SYSV_ABI sceGnmDriverTraceInProgress(); +bool PS4_SYSV_ABI sceGnmDriverTraceInProgress(); int PS4_SYSV_ABI sceGnmDriverTriggerCapture(); int PS4_SYSV_ABI sceGnmEndWorkload(u64 workload); s32 PS4_SYSV_ABI sceGnmFindResourcesPublic(); @@ -95,7 +95,7 @@ int PS4_SYSV_ABI sceGnmGetNumTcaUnits(); int PS4_SYSV_ABI sceGnmGetOffChipTessellationBufferSize(); int PS4_SYSV_ABI sceGnmGetOwnerName(); int PS4_SYSV_ABI sceGnmGetPhysicalCounterFromVirtualized(); -int PS4_SYSV_ABI sceGnmGetProtectionFaultTimeStamp(); +u32 PS4_SYSV_ABI sceGnmGetProtectionFaultTimeStamp(); int PS4_SYSV_ABI sceGnmGetResourceBaseAddressAndSizeInBytes(); int PS4_SYSV_ABI sceGnmGetResourceName(); int PS4_SYSV_ABI sceGnmGetResourceShaderGuid(); @@ -104,8 +104,8 @@ int PS4_SYSV_ABI sceGnmGetResourceUserData(); int PS4_SYSV_ABI sceGnmGetShaderProgramBaseAddress(); int PS4_SYSV_ABI sceGnmGetShaderStatus(); VAddr PS4_SYSV_ABI sceGnmGetTheTessellationFactorRingBufferBaseAddress(); -int PS4_SYSV_ABI sceGnmGpuPaDebugEnter(); -int PS4_SYSV_ABI sceGnmGpuPaDebugLeave(); +void PS4_SYSV_ABI sceGnmGpuPaDebugEnter(); +void PS4_SYSV_ABI sceGnmGpuPaDebugLeave(); int PS4_SYSV_ABI sceGnmInsertDingDongMarker(); s32 PS4_SYSV_ABI sceGnmInsertPopMarker(u32* cmdbuf, u32 size); s32 PS4_SYSV_ABI sceGnmInsertPushColorMarker(u32* cmdbuf, u32 size, const char* marker, u32 color); @@ -115,7 +115,7 @@ s32 PS4_SYSV_ABI sceGnmInsertSetMarker(u32* cmdbuf, u32 size, const char* marker int PS4_SYSV_ABI sceGnmInsertThreadTraceMarker(); s32 PS4_SYSV_ABI sceGnmInsertWaitFlipDone(u32* cmdbuf, u32 size, s32 vo_handle, u32 buf_idx); int PS4_SYSV_ABI sceGnmIsCoredumpValid(); -int PS4_SYSV_ABI sceGnmIsUserPaEnabled(); +bool PS4_SYSV_ABI sceGnmIsUserPaEnabled(); int PS4_SYSV_ABI sceGnmLogicalCuIndexToPhysicalCuIndex(); int PS4_SYSV_ABI sceGnmLogicalCuMaskToPhysicalCuMask(); int PS4_SYSV_ABI sceGnmLogicalTcaUnitToPhysical(); @@ -130,7 +130,7 @@ int PS4_SYSV_ABI sceGnmPaHeartbeat(); int PS4_SYSV_ABI sceGnmQueryResourceRegistrationUserMemoryRequirements(); int PS4_SYSV_ABI sceGnmRaiseUserExceptionEvent(); int PS4_SYSV_ABI sceGnmRegisterGdsResource(); -int PS4_SYSV_ABI sceGnmRegisterGnmLiveCallbackConfig(); +void PS4_SYSV_ABI sceGnmRegisterGnmLiveCallbackConfig(); s32 PS4_SYSV_ABI sceGnmRegisterOwner(void* handle, const char* name); s32 PS4_SYSV_ABI sceGnmRegisterResource(void* res_handle, void* owner_handle, const void* addr, size_t size, const char* name, int res_type, u64 user_data); @@ -227,7 +227,7 @@ int PS4_SYSV_ABI sceGnmUnregisterAllResourcesForOwner(); int PS4_SYSV_ABI sceGnmUnregisterOwnerAndResources(); int PS4_SYSV_ABI sceGnmUnregisterResource(); s32 PS4_SYSV_ABI sceGnmUpdateGsShader(u32* cmdbuf, u32 size, const u32* gs_regs); -int PS4_SYSV_ABI sceGnmUpdateHsShader(); +int PS4_SYSV_ABI sceGnmUpdateHsShader(u32* cmdbuf, u32 size, const u32* ps_regs, u32 ls_hs_config); s32 PS4_SYSV_ABI sceGnmUpdatePsShader(u32* cmdbuf, u32 size, const u32* ps_regs); s32 PS4_SYSV_ABI sceGnmUpdatePsShader350(u32* cmdbuf, u32 size, const u32* ps_regs); s32 PS4_SYSV_ABI sceGnmUpdateVsShader(u32* cmdbuf, u32 size, const u32* vs_regs, @@ -240,14 +240,14 @@ int PS4_SYSV_ABI sceGnmValidateDrawCommandBuffers(); int PS4_SYSV_ABI sceGnmValidateGetDiagnosticInfo(); int PS4_SYSV_ABI sceGnmValidateGetDiagnostics(); int PS4_SYSV_ABI sceGnmValidateGetVersion(); -int PS4_SYSV_ABI sceGnmValidateOnSubmitEnabled(); +bool PS4_SYSV_ABI sceGnmValidateOnSubmitEnabled(); int PS4_SYSV_ABI sceGnmValidateResetState(); int PS4_SYSV_ABI sceGnmValidationRegisterMemoryCheckCallback(); int PS4_SYSV_ABI sceRazorCaptureCommandBuffersOnlyImmediate(); int PS4_SYSV_ABI sceRazorCaptureCommandBuffersOnlySinceLastFlip(); int PS4_SYSV_ABI sceRazorCaptureImmediate(); int PS4_SYSV_ABI sceRazorCaptureSinceLastFlip(); -int PS4_SYSV_ABI sceRazorIsLoaded(); +bool PS4_SYSV_ABI sceRazorIsLoaded(); int PS4_SYSV_ABI Func_063D065A2D6359C3(); int PS4_SYSV_ABI Func_0CABACAFB258429D(); int PS4_SYSV_ABI Func_150CF336FC2E99A3(); diff --git a/src/core/libraries/gnmdriver/gnmdriver_init.h b/src/core/libraries/gnmdriver/gnmdriver_init.h new file mode 100644 index 000000000..da6d65f32 --- /dev/null +++ b/src/core/libraries/gnmdriver/gnmdriver_init.h @@ -0,0 +1,542 @@ +// SPDX-FileCopyrightText: Copyright 2025 shadPS4 Emulator Project +// SPDX-License-Identifier: GPL-2.0-or-later + +#pragma once + +#include + +namespace Libraries::GnmDriver { + +constexpr auto HwInitPacketSize = 0x100u; + +// clang-format off +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, + 0xc0016900u, 0x2f9u, 0x2du, + 0xc0016900u, 0x282u, 8u, + 0xc0016900u, 0x280u, 0x80008u, + 0xc0016900u, 0x281u, 0xffff0000u, + 0xc0016900u, 0x204u, 0u, + 0xc0016900u, 0x206u, 0x43fu, + 0xc0016900u, 0x83u, 0xffffu, + 0xc0016900u, 0x317u, 0x10u, + 0xc0016900u, 0x2fau, 0x3f800000u, + 0xc0016900u, 0x2fcu, 0x3f800000u, + 0xc0016900u, 0x2fbu, 0x3f800000u, + 0xc0016900u, 0x2fdu, 0x3f800000u, + 0xc0016900u, 0x202u, 0xcc0010u, + 0xc0016900u, 0x30eu, 0xffffffffu, + 0xc0016900u, 0x30fu, 0xffffffffu, + 0xc0002f00u, 1u, + 0xc0017600u, 7u, 0x1ffu, + 0xc0017600u, 0x46u, 0x1ffu, + 0xc0017600u, 0x87u, 0x1ffu, + 0xc0017600u, 0xc7u, 0x1ffu, + 0xc0017600u, 0x107u, 0u, + 0xc0017600u, 0x147u, 0x1ffu, + 0xc0016900u, 0x1b1u, 2u, + 0xc0016900u, 0x101u, 0u, + 0xc0016900u, 0x100u, 0xffffffffu, + 0xc0016900u, 0x103u, 0u, + 0xc0016900u, 0x284u, 0u, + 0xc0016900u, 0x290u, 0u, + 0xc0016900u, 0x2aeu, 0u, + 0xc0016900u, 0x292u, 0u, + 0xc0016900u, 0x293u, 0x6000000u, + 0xc0016900u, 0x2f8u, 0u, + 0xc0016900u, 0x2deu, 0x1e9u, + 0xc0036900u, 0x295u, 0x100u, 0x100u, 4u, + 0xc0017900u, 0x200u, 0xe0000000u, +}; +static_assert(InitSequence.size() == 0x73 + 2); + +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, + 0xc0016900u, 0x2f9u, 0x2du, + 0xc0016900u, 0x282u, 8u, + 0xc0016900u, 0x280u, 0x80008u, + 0xc0016900u, 0x281u, 0xffff0000u, + 0xc0016900u, 0x204u, 0u, + 0xc0016900u, 0x206u, 0x43fu, + 0xc0016900u, 0x83u, 0xffffu, + 0xc0016900u, 0x317u, 0x10u, + 0xc0016900u, 0x2fau, 0x3f800000u, + 0xc0016900u, 0x2fcu, 0x3f800000u, + 0xc0016900u, 0x2fbu, 0x3f800000u, + 0xc0016900u, 0x2fdu, 0x3f800000u, + 0xc0016900u, 0x202u, 0xcc0010u, + 0xc0016900u, 0x30eu, 0xffffffffu, + 0xc0016900u, 0x30fu, 0xffffffffu, + 0xc0002f00u, 1u, + 0xc0017600u, 7u, 0x1ffu, + 0xc0017600u, 0x46u, 0x1ffu, + 0xc0017600u, 0x87u, 0x1ffu, + 0xc0017600u, 0xc7u, 0x1ffu, + 0xc0017600u, 0x107u, 0u, + 0xc0017600u, 0x147u, 0x1ffu, + 0xc0016900u, 0x1b1u, 2u, + 0xc0016900u, 0x101u, 0u, + 0xc0016900u, 0x100u, 0xffffffffu, + 0xc0016900u, 0x103u, 0u, + 0xc0016900u, 0x284u, 0u, + 0xc0016900u, 0x290u, 0u, + 0xc0016900u, 0x2aeu, 0u, + 0xc0016900u, 0x292u, 0u, + 0xc0016900u, 0x293u, 0x6020000u, + 0xc0016900u, 0x2f8u, 0u, + 0xc0016900u, 0x2deu, 0x1e9u, + 0xc0036900u, 0x295u, 0x100u, 0x100u, 4u, + 0xc0017900u, 0x200u, 0xe0000000u, +}; +static_assert(InitSequence175.size() == 0x73 + 2); + +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, + 0xc0016900u, 0x2f9u, 0x2du, + 0xc0016900u, 0x282u, 8u, + 0xc0016900u, 0x280u, 0x80008u, + 0xc0016900u, 0x281u, 0xffff0000u, + 0xc0016900u, 0x204u, 0u, + 0xc0016900u, 0x206u, 0x43fu, + 0xc0016900u, 0x83u, 0xffffu, + 0xc0016900u, 0x317u, 0x10u, + 0xc0016900u, 0x2fau, 0x3f800000u, + 0xc0016900u, 0x2fcu, 0x3f800000u, + 0xc0016900u, 0x2fbu, 0x3f800000u, + 0xc0016900u, 0x2fdu, 0x3f800000u, + 0xc0016900u, 0x202u, 0xcc0010u, + 0xc0016900u, 0x30eu, 0xffffffffu, + 0xc0016900u, 0x30fu, 0xffffffffu, + 0xc0002f00u, 1u, + 0xc0017600u, 7u, 0x1701ffu, + 0xc0017600u, 0x46u, 0x1701fdu, + 0xc0017600u, 0x87u, 0x1701ffu, + 0xc0017600u, 0xc7u, 0x1701fdu, + 0xc0017600u, 0x107u, 0x17u, + 0xc0017600u, 0x147u, 0x1701fdu, + 0xc0017600u, 0x47u, 0x1cu, + 0xc0016900u, 0x1b1u, 2u, + 0xc0016900u, 0x101u, 0u, + 0xc0016900u, 0x100u, 0xffffffffu, + 0xc0016900u, 0x103u, 0u, + 0xc0016900u, 0x284u, 0u, + 0xc0016900u, 0x290u, 0u, + 0xc0016900u, 0x2aeu, 0u, + 0xc0016900u, 0x292u, 0u, + 0xc0016900u, 0x293u, 0x6020000u, + 0xc0016900u, 0x2f8u, 0u, + 0xc0016900u, 0x2deu, 0x1e9u, + 0xc0036900u, 0x295u, 0x100u, 0x100u, 4u, + 0xc0017900u, 0x200u, 0xe0000000u, +}; +static_assert(InitSequence200.size() == 0x76 + 2); + +constexpr std::array InitSequence200Neo{ + // 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, 0x219u, 0xffffffffu, + 0xc0017600u, 0x21au, 0xffffffffu, + 0xc0017600u, 0x215u, 0u, + 0xc0016900u, 0x2f9u, 0x2du, + 0xc0016900u, 0x282u, 8u, + 0xc0016900u, 0x280u, 0x80008u, + 0xc0016900u, 0x281u, 0xffff0000u, + 0xc0016900u, 0x204u, 0u, + 0xc0016900u, 0x206u, 0x43fu, + 0xc0016900u, 0x83u, 0xffffu, + 0xc0016900u, 0x317u, 0x10u, + 0xc0016900u, 0x2fau, 0x3f800000u, + 0xc0016900u, 0x2fcu, 0x3f800000u, + 0xc0016900u, 0x2fbu, 0x3f800000u, + 0xc0016900u, 0x2fdu, 0x3f800000u, + 0xc0016900u, 0x202u, 0xcc0010u, + 0xc0016900u, 0x30eu, 0xffffffffu, + 0xc0016900u, 0x30fu, 0xffffffffu, + 0xc0002f00u, 1u, + 0xc0017600u, 7u, 0x1701ffu, + 0xc0017600u, 0x46u, 0x1701fdu, + 0xc0017600u, 0x87u, 0x1701ffu, + 0xc0017600u, 0xc7u, 0x1701fdu, + 0xc0017600u, 0x107u, 0x17u, + 0xc0017600u, 0x147u, 0x1701fdu, + 0xc0017600u, 0x47u, 0x1cu, + 0xc0016900u, 0x1b1u, 2u, + 0xc0016900u, 0x101u, 0u, + 0xc0016900u, 0x100u, 0xffffffffu, + 0xc0016900u, 0x103u, 0u, + 0xc0016900u, 0x284u, 0u, + 0xc0016900u, 0x290u, 0u, + 0xc0016900u, 0x2aeu, 0u, + 0xc0016900u, 0x292u, 0u, + 0xc0016900u, 0x293u, 0x6020000u, + 0xc0016900u, 0x2f8u, 0u, + 0xc0016900u, 0x2deu, 0x1e9u, + 0xc0026900u, 0xebu, 0xff00ff00u, 0xff00u, + 0xc0036900u, 0x295u, 0x100u, 0x100u, 4u, + 0xc0017900u, 0x200u, 0xe0000000u, + 0xc0017900u, 0x40000258u, 0x6d007fu, +}; +static_assert(InitSequence200Neo.size() == 0x83 + 2); + +constexpr std::array InitSequence200NeoCompat{ + // 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, 0x219u, 0xffffffffu, + 0xc0017600u, 0x21au, 0xffffffffu, + 0xc0017600u, 0x215u, 0u, + 0xc0016900u, 0x2f9u, 0x2du, + 0xc0016900u, 0x282u, 8u, + 0xc0016900u, 0x280u, 0x80008u, + 0xc0016900u, 0x281u, 0xffff0000u, + 0xc0016900u, 0x204u, 0u, + 0xc0016900u, 0x206u, 0x43fu, + 0xc0016900u, 0x83u, 0xffffu, + 0xc0016900u, 0x317u, 0x10u, + 0xc0016900u, 0x2fau, 0x3f800000u, + 0xc0016900u, 0x2fcu, 0x3f800000u, + 0xc0016900u, 0x2fbu, 0x3f800000u, + 0xc0016900u, 0x2fdu, 0x3f800000u, + 0xc0016900u, 0x202u, 0xcc0010u, + 0xc0016900u, 0x30eu, 0xffffffffu, + 0xc0016900u, 0x30fu, 0xffffffffu, + 0xc0002f00u, 1u, + 0xc0017600u, 7u, 0x1701ffu, + 0xc0017600u, 0x46u, 0x1701fdu, + 0xc0017600u, 0x87u, 0x1701ffu, + 0xc0017600u, 0xc7u, 0x1701fdu, + 0xc0017600u, 0x107u, 0x17u, + 0xc0017600u, 0x147u, 0x1701fdu, + 0xc0017600u, 0x47u, 0x1cu, + 0xc0016900u, 0x1b1u, 2u, + 0xc0016900u, 0x101u, 0u, + 0xc0016900u, 0x100u, 0xffffffffu, + 0xc0016900u, 0x103u, 0u, + 0xc0016900u, 0x284u, 0u, + 0xc0016900u, 0x290u, 0u, + 0xc0016900u, 0x2aeu, 0u, + 0xc0016900u, 0x292u, 0u, + 0xc0016900u, 0x293u, 0x6020000u, + 0xc0016900u, 0x2f8u, 0u, + 0xc0016900u, 0x2deu, 0x1e9u, + 0xc0026900u, 0xebu, 0xff00ff00u, 0xff00u, + 0xc0036900u, 0x295u, 0x100u, 0x100u, 4u, + 0xc0017900u, 0x200u, 0xe0000000u, + 0xc0016900u, 0x100002aau, 0xd00ffu, +}; +static_assert(InitSequence200NeoCompat.size() == 0x83 + 2); + +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, + 0xc0016900u, 0x2f9u, 0x2du, + 0xc0016900u, 0x282u, 8u, + 0xc0016900u, 0x280u, 0x80008u, + 0xc0016900u, 0x281u, 0xffff0000u, + 0xc0016900u, 0x204u, 0u, + 0xc0016900u, 0x206u, 0x43fu, + 0xc0016900u, 0x83u, 0xffffu, + 0xc0016900u, 0x317u, 0x10u, + 0xc0016900u, 0x2fau, 0x3f800000u, + 0xc0016900u, 0x2fcu, 0x3f800000u, + 0xc0016900u, 0x2fbu, 0x3f800000u, + 0xc0016900u, 0x2fdu, 0x3f800000u, + 0xc0016900u, 0x202u, 0xcc0010u, + 0xc0016900u, 0x30eu, 0xffffffffu, + 0xc0016900u, 0x30fu, 0xffffffffu, + 0xc0002f00u, 1u, + 0xc0017600u, 7u, 0x1701ffu, + 0xc0017600u, 0x46u, 0x1701fdu, + 0xc0017600u, 0x87u, 0x1701ffu, + 0xc0017600u, 0xc7u, 0x1701fdu, + 0xc0017600u, 0x107u, 0x17u, + 0xc0017600u, 0x147u, 0x1701fdu, + 0xc0017600u, 0x47u, 0x1cu, + 0xc0016900u, 0x1b1u, 2u, + 0xc0016900u, 0x101u, 0u, + 0xc0016900u, 0x100u, 0xffffffffu, + 0xc0016900u, 0x103u, 0u, + 0xc0016900u, 0x284u, 0u, + 0xc0016900u, 0x290u, 0u, + 0xc0016900u, 0x2aeu, 0u, + 0xc0016900u, 0x102u, 0u, + 0xc0016900u, 0x292u, 0u, + 0xc0016900u, 0x293u, 0x6020000u, + 0xc0016900u, 0x2f8u, 0u, + 0xc0016900u, 0x2deu, 0x1e9u, + 0xc0036900u, 0x295u, 0x100u, 0x100u, 4u, + 0xc0017900u, 0x200u, 0xe0000000u, + 0xc0016900u, 0x2aau, 0xffu, +}; +static_assert(InitSequence350.size() == 0x7c + 2); + +constexpr std::array InitSequence350Neo{ + // 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, 0x219u, 0xffffffffu, + 0xc0017600u, 0x21au, 0xffffffffu, + 0xc0017600u, 0x215u, 0u, + 0xc0016900u, 0x2f9u, 0x2du, + 0xc0016900u, 0x282u, 8u, + 0xc0016900u, 0x280u, 0x80008u, + 0xc0016900u, 0x281u, 0xffff0000u, + 0xc0016900u, 0x204u, 0u, + 0xc0016900u, 0x206u, 0x43fu, + 0xc0016900u, 0x83u, 0xffffu, + 0xc0016900u, 0x317u, 0x10u, + 0xc0016900u, 0x2fau, 0x3f800000u, + 0xc0016900u, 0x2fcu, 0x3f800000u, + 0xc0016900u, 0x2fbu, 0x3f800000u, + 0xc0016900u, 0x2fdu, 0x3f800000u, + 0xc0016900u, 0x202u, 0xcc0010u, + 0xc0016900u, 0x30eu, 0xffffffffu, + 0xc0016900u, 0x30fu, 0xffffffffu, + 0xc0002f00u, 1u, + 0xc0017600u, 7u, 0x1701ffu, + 0xc0017600u, 0x46u, 0x1701fdu, + 0xc0017600u, 0x87u, 0x1701ffu, + 0xc0017600u, 0xc7u, 0x1701fdu, + 0xc0017600u, 0x107u, 0x17u, + 0xc0017600u, 0x147u, 0x1701fdu, + 0xc0017600u, 0x47u, 0x1cu, + 0xc0016900u, 0x1b1u, 2u, + 0xc0016900u, 0x101u, 0u, + 0xc0016900u, 0x100u, 0xffffffffu, + 0xc0016900u, 0x103u, 0u, + 0xc0016900u, 0x284u, 0u, + 0xc0016900u, 0x290u, 0u, + 0xc0016900u, 0x2aeu, 0u, + 0xc0016900u, 0x102u, 0u, + 0xc0016900u, 0x292u, 0u, + 0xc0016900u, 0x293u, 0x6020000u, + 0xc0016900u, 0x2f8u, 0u, + 0xc0016900u, 0x2deu, 0x1e9u, + 0xc0026900u, 0xebu, 0xff00ff00u, 0xff00u, + 0xc0036900u, 0x295u, 0x100u, 0x100u, 4u, + 0xc0017900u, 0x200u, 0xe0000000u, + 0xc0017900u, 0x40000258u, 0x6d007fu, +}; +static_assert(InitSequence350Neo.size() == 0x86 + 2); + +constexpr std::array InitSequence350NeoCompat{ + // 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, 0x219u, 0xffffffffu, + 0xc0017600u, 0x21au, 0xffffffffu, + 0xc0017600u, 0x215u, 0u, + 0xc0016900u, 0x2f9u, 0x2du, + 0xc0016900u, 0x282u, 8u, + 0xc0016900u, 0x280u, 0x80008u, + 0xc0016900u, 0x281u, 0xffff0000u, + 0xc0016900u, 0x204u, 0u, + 0xc0016900u, 0x206u, 0x43fu, + 0xc0016900u, 0x83u, 0xffffu, + 0xc0016900u, 0x317u, 0x10u, + 0xc0016900u, 0x2fau, 0x3f800000u, + 0xc0016900u, 0x2fcu, 0x3f800000u, + 0xc0016900u, 0x2fbu, 0x3f800000u, + 0xc0016900u, 0x2fdu, 0x3f800000u, + 0xc0016900u, 0x202u, 0xcc0010u, + 0xc0016900u, 0x30eu, 0xffffffffu, + 0xc0016900u, 0x30fu, 0xffffffffu, + 0xc0002f00u, 1u, + 0xc0017600u, 7u, 0x1701ffu, + 0xc0017600u, 0x46u, 0x1701fdu, + 0xc0017600u, 0x87u, 0x1701ffu, + 0xc0017600u, 0xc7u, 0x1701fdu, + 0xc0017600u, 0x107u, 0x17u, + 0xc0017600u, 0x147u, 0x1701fdu, + 0xc0017600u, 0x47u, 0x1cu, + 0xc0016900u, 0x1b1u, 2u, + 0xc0016900u, 0x101u, 0u, + 0xc0016900u, 0x100u, 0xffffffffu, + 0xc0016900u, 0x103u, 0u, + 0xc0016900u, 0x284u, 0u, + 0xc0016900u, 0x290u, 0u, + 0xc0016900u, 0x2aeu, 0u, + 0xc0016900u, 0x102u, 0u, + 0xc0016900u, 0x292u, 0u, + 0xc0016900u, 0x293u, 0x6020000u, + 0xc0016900u, 0x2f8u, 0u, + 0xc0016900u, 0x2deu, 0x1e9u, + 0xc0026900u, 0xebu, 0xff00ff00u, 0xff00u, + 0xc0036900u, 0x295u, 0x100u, 0x100u, 4u, + 0xc0017900u, 0x200u, 0xe0000000u, + 0xc0016900u, 0x100002aau, 0xd00ffu, +}; +static_assert(InitSequence350NeoCompat.size() == 0x86 + 2); + +constexpr std::array CtxInitSequence{ + 0xc0012800u, 0x80000000u, 0x80000000u, + 0xc0001200u, 0u, + 0xc0002f00u, 1u, + 0xc0016900u, 0x102u, 0u, + 0xc0016900u, 0x202u, 0xcc0010u, + 0xc0111000u, 0u +}; +static_assert(CtxInitSequence.size() == 0x0f); + +constexpr std::array CtxInitSequenceNeo{ + 0xc0012800u, 0x80000000u, 0x80000000u, + 0xc0001200u, 0u, + 0xc0002f00u, 1u, + 0xc0016900u, 0x102u, 0u, + 0xc0016900u, 0x202u, 0xcc0010u, + 0xc0026900u, 0xebu, 0xff00ff00u, 0xff00u, + 0xc00d1000, 0u +}; +static_assert(CtxInitSequenceNeo.size() == 0x13); + +constexpr std::array CtxInitSequence400{ + 0xc0012800u, 0x80000000u, 0x80000000u, + 0xc0001200u, 0u, + 0xc0016900u, 0x2f9u, 0x2du, + 0xc0016900u, 0x282u, 8u, + 0xc0016900u, 0x280u, 0x80008u, + 0xc0016900u, 0x281u, 0xffff0000u, + 0xc0016900u, 0x204u, 0u, + 0xc0016900u, 0x206u, 0x43fu, + 0xc0016900u, 0x83u, 0xffffu, + 0xc0016900u, 0x317u, 0x10u, + 0xc0016900u, 0x2fau, 0x3f800000u, + 0xc0016900u, 0x2fcu, 0x3f800000u, + 0xc0016900u, 0x2fbu, 0x3f800000u, + 0xc0016900u, 0x2fdu, 0x3f800000u, + 0xc0016900u, 0x202u, 0xcc0010u, + 0xc0016900u, 0x30eu, 0xffffffffu, + 0xc0016900u, 0x30fu, 0xffffffffu, + 0xc0002f00u, 1u, + 0xc0016900u, 0x1b1u, 2u, + 0xc0016900u, 0x101u, 0u, + 0xc0016900u, 0x100u, 0xffffffffu, + 0xc0016900u, 0x103u, 0u, + 0xc0016900u, 0x284u, 0u, + 0xc0016900u, 0x290u, 0u, + 0xc0016900u, 0x2aeu, 0u, + 0xc0016900u, 0x102u, 0u, + 0xc0016900u, 0x292u, 0u, + 0xc0016900u, 0x293u, 0x6020000u, + 0xc0016900u, 0x2f8u, 0u, + 0xc0016900u, 0x2deu, 0x1e9u, + 0xc0036900u, 0x295u, 0x100u, 0x100u, 4u, + 0xc0016900u, 0x2aau, 0xffu, + 0xc09e1000u, +}; +static_assert(CtxInitSequence400.size() == 0x61); + +constexpr std::array CtxInitSequence400Neo{ + 0xc0012800u, 0x80000000u, 0x80000000u, + 0xc0001200u, 0u, + 0xc0016900u, 0x2f9u, 0x2du, + 0xc0016900u, 0x282u, 8u, + 0xc0016900u, 0x280u, 0x80008u, + 0xc0016900u, 0x281u, 0xffff0000u, + 0xc0016900u, 0x204u, 0u, + 0xc0016900u, 0x206u, 0x43fu, + 0xc0016900u, 0x83u, 0xffffu, + 0xc0016900u, 0x317u, 0x10u, + 0xc0016900u, 0x2fau, 0x3f800000u, + 0xc0016900u, 0x2fcu, 0x3f800000u, + 0xc0016900u, 0x2fbu, 0x3f800000u, + 0xc0016900u, 0x2fdu, 0x3f800000u, + 0xc0016900u, 0x202u, 0xcc0010u, + 0xc0016900u, 0x30eu, 0xffffffffu, + 0xc0016900u, 0x30fu, 0xffffffffu, + 0xc0002f00u, 1u, + 0xc0016900u, 0x1b1u, 2u, + 0xc0016900u, 0x101u, 0u, + 0xc0016900u, 0x100u, 0xffffffffu, + 0xc0016900u, 0x103u, 0u, + 0xc0016900u, 0x284u, 0u, + 0xc0016900u, 0x290u, 0u, + 0xc0016900u, 0x2aeu, 0u, + 0xc0016900u, 0x102u, 0u, + 0xc0016900u, 0x292u, 0u, + 0xc0016900u, 0x293u, 0x6020000u, + 0xc0016900u, 0x2f8u, 0u, + 0xc0016900u, 0x2deu, 0x1e9u, + 0xc0026900u, 0xebu, 0xff00ff00u, 0xff00u, + 0xc0036900u, 0x295u, 0x100u, 0x100u, 4u, + 0xc0017900u, 0x40000258u, 0x6d007fu, + 0xc09a1000u, +}; +static_assert(CtxInitSequence400Neo.size() == 0x65); + +constexpr std::array CtxInitSequence400NeoCompat{ + 0xc0012800u, 0x80000000u, 0x80000000u, + 0xc0001200u, 0u, + 0xc0016900u, 0x2f9u, 0x2du, + 0xc0016900u, 0x282u, 8u, + 0xc0016900u, 0x280u, 0x80008u, + 0xc0016900u, 0x281u, 0xffff0000u, + 0xc0016900u, 0x204u, 0u, + 0xc0016900u, 0x206u, 0x43fu, + 0xc0016900u, 0x83u, 0xffffu, + 0xc0016900u, 0x317u, 0x10u, + 0xc0016900u, 0x2fau, 0x3f800000u, + 0xc0016900u, 0x2fcu, 0x3f800000u, + 0xc0016900u, 0x2fbu, 0x3f800000u, + 0xc0016900u, 0x2fdu, 0x3f800000u, + 0xc0016900u, 0x202u, 0xcc0010u, + 0xc0016900u, 0x30eu, 0xffffffffu, + 0xc0016900u, 0x30fu, 0xffffffffu, + 0xc0002f00u, 1u, + 0xc0016900u, 0x1b1u, 2u, + 0xc0016900u, 0x101u, 0u, + 0xc0016900u, 0x100u, 0xffffffffu, + 0xc0016900u, 0x103u, 0u, + 0xc0016900u, 0x284u, 0u, + 0xc0016900u, 0x290u, 0u, + 0xc0016900u, 0x2aeu, 0u, + 0xc0016900u, 0x102u, 0u, + 0xc0016900u, 0x292u, 0u, + 0xc0016900u, 0x293u, 0x6020000u, + 0xc0016900u, 0x2f8u, 0u, + 0xc0016900u, 0x2deu, 0x1e9u, + 0xc0026900u, 0xebu, 0xff00ff00u, 0xff00u, + 0xc0036900u, 0x295u, 0x100u, 0x100u, 4u, + 0xc0016900u, 0x100002aau, 0xd00ffu, + 0xc09a1000u, +}; +static_assert(CtxInitSequence400Neo.size() == 0x65); +// clang-format on + +} // namespace Libraries::GnmDriver diff --git a/src/core/libraries/hmd/hmd.cpp b/src/core/libraries/hmd/hmd.cpp new file mode 100644 index 000000000..b43789822 --- /dev/null +++ b/src/core/libraries/hmd/hmd.cpp @@ -0,0 +1,1219 @@ +// SPDX-FileCopyrightText: Copyright 2024 shadPS4 Emulator Project +// SPDX-License-Identifier: GPL-2.0-or-later + +#include "common/logging/log.h" +#include "core/libraries/error_codes.h" +#include "core/libraries/hmd/hmd.h" +#include "core/libraries/libs.h" + +namespace Libraries::Hmd { + +s32 PS4_SYSV_ABI sceHmdReprojectionStartMultilayer() { + LOG_ERROR(Lib_Hmd, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI sceHmdDistortionGet2dVrCommand() { + LOG_ERROR(Lib_Hmd, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI sceHmdDistortionGetCompoundEyeCorrectionCommand() { + LOG_ERROR(Lib_Hmd, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI sceHmdDistortionGetCorrectionCommand() { + LOG_ERROR(Lib_Hmd, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI sceHmdDistortionGetWideNearCorrectionCommand() { + LOG_ERROR(Lib_Hmd, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI sceHmdDistortionGetWorkMemoryAlign() { + LOG_ERROR(Lib_Hmd, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI sceHmdDistortionGetWorkMemorySize() { + LOG_ERROR(Lib_Hmd, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI sceHmdDistortionInitialize() { + LOG_ERROR(Lib_Hmd, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI sceHmdDistortionSetOutputMinColor() { + LOG_ERROR(Lib_Hmd, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI Func_B26430EA74FC3DC0() { + LOG_ERROR(Lib_Hmd, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI sceHmdClose() { + LOG_ERROR(Lib_Hmd, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI sceHmdGet2DEyeOffset() { + LOG_ERROR(Lib_Hmd, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI sceHmdGet2dVrCommand() { + LOG_ERROR(Lib_Hmd, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI sceHmdGetAssyError() { + LOG_ERROR(Lib_Hmd, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI sceHmdGetDeviceInformation() { + LOG_ERROR(Lib_Hmd, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI sceHmdGetDeviceInformationByHandle() { + LOG_ERROR(Lib_Hmd, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI sceHmdGetDistortionCorrectionCommand() { + LOG_ERROR(Lib_Hmd, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI sceHmdGetDistortionParams() { + LOG_ERROR(Lib_Hmd, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI sceHmdGetDistortionWorkMemoryAlign() { + LOG_ERROR(Lib_Hmd, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI sceHmdGetDistortionWorkMemorySize() { + LOG_ERROR(Lib_Hmd, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI sceHmdGetFieldOfView() { + LOG_ERROR(Lib_Hmd, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI sceHmdGetInertialSensorData() { + LOG_ERROR(Lib_Hmd, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI sceHmdGetWideNearDistortionCorrectionCommand() { + LOG_ERROR(Lib_Hmd, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI sceHmdInitialize() { + LOG_ERROR(Lib_Hmd, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI sceHmdInitialize315() { + LOG_ERROR(Lib_Hmd, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI sceHmdInternal3dAudioClose() { + LOG_ERROR(Lib_Hmd, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI sceHmdInternal3dAudioOpen() { + LOG_ERROR(Lib_Hmd, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI sceHmdInternal3dAudioSendData() { + LOG_ERROR(Lib_Hmd, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI sceHmdInternalAnotherScreenClose() { + LOG_ERROR(Lib_Hmd, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI sceHmdInternalAnotherScreenGetAudioStatus() { + LOG_ERROR(Lib_Hmd, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI sceHmdInternalAnotherScreenGetFadeState() { + LOG_ERROR(Lib_Hmd, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI sceHmdInternalAnotherScreenGetVideoStatus() { + LOG_ERROR(Lib_Hmd, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI sceHmdInternalAnotherScreenOpen() { + LOG_ERROR(Lib_Hmd, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI sceHmdInternalAnotherScreenSendAudio() { + LOG_ERROR(Lib_Hmd, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI sceHmdInternalAnotherScreenSendVideo() { + LOG_ERROR(Lib_Hmd, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI sceHmdInternalAnotherScreenSetFadeAndSwitch() { + LOG_ERROR(Lib_Hmd, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI sceHmdInternalBindDeviceWithUserId() { + LOG_ERROR(Lib_Hmd, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI sceHmdInternalCheckDeviceModelMk3() { + LOG_ERROR(Lib_Hmd, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI sceHmdInternalCheckS3dPassModeAvailable() { + LOG_ERROR(Lib_Hmd, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI sceHmdInternalCrashReportCancel() { + LOG_ERROR(Lib_Hmd, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI sceHmdInternalCrashReportClose() { + LOG_ERROR(Lib_Hmd, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI sceHmdInternalCrashReportOpen() { + LOG_ERROR(Lib_Hmd, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI sceHmdInternalCrashReportReadData() { + LOG_ERROR(Lib_Hmd, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI sceHmdInternalCrashReportReadDataSize() { + LOG_ERROR(Lib_Hmd, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI sceHmdInternalCreateSharedMemory() { + LOG_ERROR(Lib_Hmd, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI sceHmdInternalDfuCheckAfterPvt() { + LOG_ERROR(Lib_Hmd, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI sceHmdInternalDfuCheckPartialUpdateAvailable() { + LOG_ERROR(Lib_Hmd, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI sceHmdInternalDfuClose() { + LOG_ERROR(Lib_Hmd, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI sceHmdInternalDfuGetStatus() { + LOG_ERROR(Lib_Hmd, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI sceHmdInternalDfuOpen() { + LOG_ERROR(Lib_Hmd, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI sceHmdInternalDfuReset() { + LOG_ERROR(Lib_Hmd, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI sceHmdInternalDfuSend() { + LOG_ERROR(Lib_Hmd, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI sceHmdInternalDfuSendSize() { + LOG_ERROR(Lib_Hmd, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI sceHmdInternalDfuSetMode() { + LOG_ERROR(Lib_Hmd, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI sceHmdInternalDfuStart() { + LOG_ERROR(Lib_Hmd, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI sceHmdInternalEventInitialize() { + LOG_ERROR(Lib_Hmd, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI sceHmdInternalGetBrightness() { + LOG_ERROR(Lib_Hmd, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI sceHmdInternalGetCrashDumpInfo() { + LOG_ERROR(Lib_Hmd, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI sceHmdInternalGetDebugMode() { + LOG_ERROR(Lib_Hmd, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI sceHmdInternalGetDebugSocialScreenMode() { + LOG_ERROR(Lib_Hmd, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI sceHmdInternalGetDebugTextMode() { + LOG_ERROR(Lib_Hmd, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI sceHmdInternalGetDefaultLedData() { + LOG_ERROR(Lib_Hmd, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI sceHmdInternalGetDemoMode() { + LOG_ERROR(Lib_Hmd, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI sceHmdInternalGetDeviceInformation() { + LOG_ERROR(Lib_Hmd, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI sceHmdInternalGetDeviceInformationByHandle() { + LOG_ERROR(Lib_Hmd, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI sceHmdInternalGetDeviceStatus() { + LOG_ERROR(Lib_Hmd, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI sceHmdInternalGetEyeStatus() { + LOG_ERROR(Lib_Hmd, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI sceHmdInternalGetHmuOpticalParam() { + LOG_ERROR(Lib_Hmd, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI sceHmdInternalGetHmuPowerStatusForDebug() { + LOG_ERROR(Lib_Hmd, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI sceHmdInternalGetHmuSerialNumber() { + LOG_ERROR(Lib_Hmd, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI sceHmdInternalGetIPD() { + LOG_ERROR(Lib_Hmd, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI sceHmdInternalGetIpdSettingEnableForSystemService() { + LOG_ERROR(Lib_Hmd, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI sceHmdInternalGetPuBuildNumber() { + LOG_ERROR(Lib_Hmd, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI sceHmdInternalGetPuPositionParam() { + LOG_ERROR(Lib_Hmd, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI sceHmdInternalGetPuRevision() { + LOG_ERROR(Lib_Hmd, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI sceHmdInternalGetPUSerialNumber() { + LOG_ERROR(Lib_Hmd, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI sceHmdInternalGetPUVersion() { + LOG_ERROR(Lib_Hmd, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI sceHmdInternalGetRequiredPUPVersion() { + LOG_ERROR(Lib_Hmd, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI sceHmdInternalGetStatusReport() { + LOG_ERROR(Lib_Hmd, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI sceHmdInternalGetTv4kCapability() { + LOG_ERROR(Lib_Hmd, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI sceHmdInternalGetVirtualDisplayDepth() { + LOG_ERROR(Lib_Hmd, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI sceHmdInternalGetVirtualDisplayHeight() { + LOG_ERROR(Lib_Hmd, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI sceHmdInternalGetVirtualDisplaySize() { + LOG_ERROR(Lib_Hmd, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI sceHmdInternalGetVr2dData() { + LOG_ERROR(Lib_Hmd, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI sceHmdInternalIsCommonDlgMiniAppVr2d() { + LOG_ERROR(Lib_Hmd, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI sceHmdInternalIsCommonDlgVr2d() { + LOG_ERROR(Lib_Hmd, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI sceHmdInternalIsGameVr2d() { + LOG_ERROR(Lib_Hmd, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI sceHmdInternalIsMiniAppVr2d() { + LOG_ERROR(Lib_Hmd, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI sceHmdInternalMapSharedMemory() { + LOG_ERROR(Lib_Hmd, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI sceHmdInternalMirroringModeSetAspect() { + LOG_ERROR(Lib_Hmd, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI sceHmdInternalMirroringModeSetAspectDebug() { + LOG_ERROR(Lib_Hmd, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI sceHmdInternalMmapGetCount() { + LOG_ERROR(Lib_Hmd, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI sceHmdInternalMmapGetModeId() { + LOG_ERROR(Lib_Hmd, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI sceHmdInternalMmapGetSensorCalibrationData() { + LOG_ERROR(Lib_Hmd, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI sceHmdInternalMmapIsConnect() { + LOG_ERROR(Lib_Hmd, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI sceHmdInternalPushVr2dData() { + LOG_ERROR(Lib_Hmd, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI sceHmdInternalRegisterEventCallback() { + LOG_ERROR(Lib_Hmd, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI sceHmdInternalResetInertialSensor() { + LOG_ERROR(Lib_Hmd, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI sceHmdInternalResetLedForVrTracker() { + LOG_ERROR(Lib_Hmd, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI sceHmdInternalResetLedForVsh() { + LOG_ERROR(Lib_Hmd, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI sceHmdInternalSeparateModeClose() { + LOG_ERROR(Lib_Hmd, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI sceHmdInternalSeparateModeGetAudioStatus() { + LOG_ERROR(Lib_Hmd, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI sceHmdInternalSeparateModeGetVideoStatus() { + LOG_ERROR(Lib_Hmd, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI sceHmdInternalSeparateModeOpen() { + LOG_ERROR(Lib_Hmd, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI sceHmdInternalSeparateModeSendAudio() { + LOG_ERROR(Lib_Hmd, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI sceHmdInternalSeparateModeSendVideo() { + LOG_ERROR(Lib_Hmd, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI sceHmdInternalSetBrightness() { + LOG_ERROR(Lib_Hmd, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI sceHmdInternalSetCrashReportCommand() { + LOG_ERROR(Lib_Hmd, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI sceHmdInternalSetDebugGpo() { + LOG_ERROR(Lib_Hmd, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI sceHmdInternalSetDebugMode() { + LOG_ERROR(Lib_Hmd, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI sceHmdInternalSetDebugSocialScreenMode() { + LOG_ERROR(Lib_Hmd, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI sceHmdInternalSetDebugTextMode() { + LOG_ERROR(Lib_Hmd, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI sceHmdInternalSetDefaultLedData() { + LOG_ERROR(Lib_Hmd, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI sceHmdInternalSetDemoMode() { + LOG_ERROR(Lib_Hmd, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI sceHmdInternalSetDeviceConnection() { + LOG_ERROR(Lib_Hmd, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI sceHmdInternalSetForcedCrash() { + LOG_ERROR(Lib_Hmd, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI sceHmdInternalSetHmuPowerControl() { + LOG_ERROR(Lib_Hmd, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI sceHmdInternalSetHmuPowerControlForDebug() { + LOG_ERROR(Lib_Hmd, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI sceHmdInternalSetIPD() { + LOG_ERROR(Lib_Hmd, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI sceHmdInternalSetIpdSettingEnableForSystemService() { + LOG_ERROR(Lib_Hmd, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI sceHmdInternalSetLedOn() { + LOG_ERROR(Lib_Hmd, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI sceHmdInternalSetM2LedBrightness() { + LOG_ERROR(Lib_Hmd, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI sceHmdInternalSetM2LedOn() { + LOG_ERROR(Lib_Hmd, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI sceHmdInternalSetPortConnection() { + LOG_ERROR(Lib_Hmd, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI sceHmdInternalSetPortStatus() { + LOG_ERROR(Lib_Hmd, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI sceHmdInternalSetS3dPassMode() { + LOG_ERROR(Lib_Hmd, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI sceHmdInternalSetSidetone() { + LOG_ERROR(Lib_Hmd, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI sceHmdInternalSetUserType() { + LOG_ERROR(Lib_Hmd, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI sceHmdInternalSetVirtualDisplayDepth() { + LOG_ERROR(Lib_Hmd, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI sceHmdInternalSetVirtualDisplayHeight() { + LOG_ERROR(Lib_Hmd, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI sceHmdInternalSetVirtualDisplaySize() { + LOG_ERROR(Lib_Hmd, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI sceHmdInternalSetVRMode() { + LOG_ERROR(Lib_Hmd, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI sceHmdInternalSocialScreenGetFadeState() { + LOG_ERROR(Lib_Hmd, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI sceHmdInternalSocialScreenSetFadeAndSwitch() { + LOG_ERROR(Lib_Hmd, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI sceHmdInternalSocialScreenSetOutput() { + LOG_ERROR(Lib_Hmd, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI sceHmdOpen() { + LOG_ERROR(Lib_Hmd, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI sceHmdReprojectionAddDisplayBuffer() { + LOG_ERROR(Lib_Hmd, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI sceHmdReprojectionClearUserEventEnd() { + LOG_ERROR(Lib_Hmd, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI sceHmdReprojectionClearUserEventStart() { + LOG_ERROR(Lib_Hmd, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI sceHmdReprojectionDebugGetLastInfo() { + LOG_ERROR(Lib_Hmd, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI sceHmdReprojectionDebugGetLastInfoMultilayer() { + LOG_ERROR(Lib_Hmd, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI sceHmdReprojectionFinalize() { + LOG_ERROR(Lib_Hmd, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI sceHmdReprojectionFinalizeCapture() { + LOG_ERROR(Lib_Hmd, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI sceHmdReprojectionInitialize() { + LOG_ERROR(Lib_Hmd, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI sceHmdReprojectionInitializeCapture() { + LOG_ERROR(Lib_Hmd, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI sceHmdReprojectionQueryGarlicBuffAlign() { + return 0x100; +} + +s32 PS4_SYSV_ABI sceHmdReprojectionQueryGarlicBuffSize() { + return 0x100000; +} + +s32 PS4_SYSV_ABI sceHmdReprojectionQueryOnionBuffAlign() { + return 0x100; +} + +s32 PS4_SYSV_ABI sceHmdReprojectionQueryOnionBuffSize() { + return 0x810; +} + +s32 PS4_SYSV_ABI sceHmdReprojectionSetCallback() { + LOG_ERROR(Lib_Hmd, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI sceHmdReprojectionSetDisplayBuffers() { + LOG_ERROR(Lib_Hmd, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI sceHmdReprojectionSetOutputMinColor() { + LOG_ERROR(Lib_Hmd, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI sceHmdReprojectionSetUserEventEnd() { + LOG_ERROR(Lib_Hmd, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI sceHmdReprojectionSetUserEventStart() { + LOG_ERROR(Lib_Hmd, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI sceHmdReprojectionStart() { + LOG_ERROR(Lib_Hmd, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI sceHmdReprojectionStart2dVr() { + LOG_ERROR(Lib_Hmd, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI sceHmdReprojectionStartCapture() { + LOG_ERROR(Lib_Hmd, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI sceHmdReprojectionStartLiveCapture() { + LOG_ERROR(Lib_Hmd, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI sceHmdReprojectionStartMultilayer2() { + LOG_ERROR(Lib_Hmd, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI sceHmdReprojectionStartWideNear() { + LOG_ERROR(Lib_Hmd, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI sceHmdReprojectionStartWideNearWithOverlay() { + LOG_ERROR(Lib_Hmd, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI sceHmdReprojectionStartWithOverlay() { + LOG_ERROR(Lib_Hmd, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI sceHmdReprojectionStop() { + LOG_ERROR(Lib_Hmd, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI sceHmdReprojectionStopCapture() { + LOG_ERROR(Lib_Hmd, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI sceHmdReprojectionStopLiveCapture() { + LOG_ERROR(Lib_Hmd, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI sceHmdReprojectionUnsetCallback() { + LOG_ERROR(Lib_Hmd, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI sceHmdReprojectionUnsetDisplayBuffers() { + LOG_ERROR(Lib_Hmd, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI sceHmdTerminate() { + LOG_ERROR(Lib_Hmd, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI Func_202D0D1A687FCD2F() { + LOG_ERROR(Lib_Hmd, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI Func_358DBF818A3D8A12() { + LOG_ERROR(Lib_Hmd, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI Func_5CCBADA76FE8F40E() { + LOG_ERROR(Lib_Hmd, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI Func_63D403167DC08CF0() { + LOG_ERROR(Lib_Hmd, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI Func_69383B2B4E3AEABF() { + LOG_ERROR(Lib_Hmd, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI Func_791560C32F4F6D68() { + LOG_ERROR(Lib_Hmd, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI Func_7C955961EA85B6D3() { + LOG_ERROR(Lib_Hmd, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI Func_9952277839236BA7() { + LOG_ERROR(Lib_Hmd, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI Func_9A276E739E54EEAF() { + LOG_ERROR(Lib_Hmd, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI Func_9E501994E289CBE7() { + LOG_ERROR(Lib_Hmd, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI Func_A31A0320D80EAD99() { + LOG_ERROR(Lib_Hmd, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI Func_A31F4DA8B3BD2E12() { + LOG_ERROR(Lib_Hmd, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI Func_A92D7C23AC364993() { + LOG_ERROR(Lib_Hmd, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI Func_ADCCC25CB876FDBE() { + LOG_ERROR(Lib_Hmd, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI Func_B16652641FE69F0E() { + LOG_ERROR(Lib_Hmd, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI Func_B614F290B67FB59B() { + LOG_ERROR(Lib_Hmd, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI Func_B9A6FA0735EC7E49() { + LOG_ERROR(Lib_Hmd, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI Func_FC193BD653F2AF2E() { + LOG_ERROR(Lib_Hmd, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI Func_FF2E0E53015FE231() { + LOG_ERROR(Lib_Hmd, "(STUBBED) called"); + return ORBIS_OK; +} + +void RegisterlibSceHmd(Core::Loader::SymbolsResolver* sym) { + LIB_FUNCTION("8gH1aLgty5I", "libsceHmdReprojectionMultilayer", 1, "libSceHmd", 1, 1, + sceHmdReprojectionStartMultilayer); + LIB_FUNCTION("gEokC+OGI8g", "libSceHmdDistortion", 1, "libSceHmd", 1, 1, + sceHmdDistortionGet2dVrCommand); + LIB_FUNCTION("ER2ar8yUmbk", "libSceHmdDistortion", 1, "libSceHmd", 1, 1, + sceHmdDistortionGetCompoundEyeCorrectionCommand); + LIB_FUNCTION("HT8qWOTOGmo", "libSceHmdDistortion", 1, "libSceHmd", 1, 1, + sceHmdDistortionGetCorrectionCommand); + LIB_FUNCTION("Vkkhy8RFIuk", "libSceHmdDistortion", 1, "libSceHmd", 1, 1, + sceHmdDistortionGetWideNearCorrectionCommand); + LIB_FUNCTION("1cS7W5J-v3k", "libSceHmdDistortion", 1, "libSceHmd", 1, 1, + sceHmdDistortionGetWorkMemoryAlign); + LIB_FUNCTION("36xDKk+Hw7o", "libSceHmdDistortion", 1, "libSceHmd", 1, 1, + sceHmdDistortionGetWorkMemorySize); + LIB_FUNCTION("ao8NZ+FRYJE", "libSceHmdDistortion", 1, "libSceHmd", 1, 1, + sceHmdDistortionInitialize); + LIB_FUNCTION("8A4T5ahi790", "libSceHmdDistortion", 1, "libSceHmd", 1, 1, + sceHmdDistortionSetOutputMinColor); + LIB_FUNCTION("smQw6nT8PcA", "libSceHmdDistortion", 1, "libSceHmd", 1, 1, Func_B26430EA74FC3DC0); + LIB_FUNCTION("6biw1XHTSqQ", "libSceHmd", 1, "libSceHmd", 1, 1, sceHmdClose); + LIB_FUNCTION("BWY-qKM5hxE", "libSceHmd", 1, "libSceHmd", 1, 1, sceHmdGet2DEyeOffset); + LIB_FUNCTION("za4xJfzCBcM", "libSceHmd", 1, "libSceHmd", 1, 1, sceHmdGet2dVrCommand); + LIB_FUNCTION("Yx+CuF11D3Q", "libSceHmd", 1, "libSceHmd", 1, 1, sceHmdGetAssyError); + LIB_FUNCTION("thDt9upZlp8", "libSceHmd", 1, "libSceHmd", 1, 1, sceHmdGetDeviceInformation); + LIB_FUNCTION("1pxQfif1rkE", "libSceHmd", 1, "libSceHmd", 1, 1, + sceHmdGetDeviceInformationByHandle); + LIB_FUNCTION("grCYks4m8Jw", "libSceHmd", 1, "libSceHmd", 1, 1, + sceHmdGetDistortionCorrectionCommand); + LIB_FUNCTION("mP2ZcYmDg-o", "libSceHmd", 1, "libSceHmd", 1, 1, sceHmdGetDistortionParams); + LIB_FUNCTION("8Ick-e6cDVY", "libSceHmd", 1, "libSceHmd", 1, 1, + sceHmdGetDistortionWorkMemoryAlign); + LIB_FUNCTION("D5JfdpJKvXk", "libSceHmd", 1, "libSceHmd", 1, 1, + sceHmdGetDistortionWorkMemorySize); + LIB_FUNCTION("NPQwYFqi0bs", "libSceHmd", 1, "libSceHmd", 1, 1, sceHmdGetFieldOfView); + LIB_FUNCTION("rU3HK9Q0r8o", "libSceHmd", 1, "libSceHmd", 1, 1, sceHmdGetInertialSensorData); + LIB_FUNCTION("goi5ASvH-V8", "libSceHmd", 1, "libSceHmd", 1, 1, + sceHmdGetWideNearDistortionCorrectionCommand); + LIB_FUNCTION("K4KnH0QkT2c", "libSceHmd", 1, "libSceHmd", 1, 1, sceHmdInitialize); + LIB_FUNCTION("s-J66ar9g50", "libSceHmd", 1, "libSceHmd", 1, 1, sceHmdInitialize315); + LIB_FUNCTION("riPQfAdebHk", "libSceHmd", 1, "libSceHmd", 1, 1, sceHmdInternal3dAudioClose); + LIB_FUNCTION("wHnZU1qtiqw", "libSceHmd", 1, "libSceHmd", 1, 1, sceHmdInternal3dAudioOpen); + LIB_FUNCTION("NuEjeN8WCBA", "libSceHmd", 1, "libSceHmd", 1, 1, sceHmdInternal3dAudioSendData); + LIB_FUNCTION("QasPTUPWVZE", "libSceHmd", 1, "libSceHmd", 1, 1, + sceHmdInternalAnotherScreenClose); + LIB_FUNCTION("Wr5KVtyVDG0", "libSceHmd", 1, "libSceHmd", 1, 1, + sceHmdInternalAnotherScreenGetAudioStatus); + LIB_FUNCTION("whRxl6Hhrzg", "libSceHmd", 1, "libSceHmd", 1, 1, + sceHmdInternalAnotherScreenGetFadeState); + LIB_FUNCTION("w8BEUsIYn8w", "libSceHmd", 1, "libSceHmd", 1, 1, + sceHmdInternalAnotherScreenGetVideoStatus); + LIB_FUNCTION("0cQDAbkOt2A", "libSceHmd", 1, "libSceHmd", 1, 1, sceHmdInternalAnotherScreenOpen); + LIB_FUNCTION("Asczi8gw1NM", "libSceHmd", 1, "libSceHmd", 1, 1, + sceHmdInternalAnotherScreenSendAudio); + LIB_FUNCTION("6+v7m1vwE+0", "libSceHmd", 1, "libSceHmd", 1, 1, + sceHmdInternalAnotherScreenSendVideo); + LIB_FUNCTION("E0BLvy57IiQ", "libSceHmd", 1, "libSceHmd", 1, 1, + sceHmdInternalAnotherScreenSetFadeAndSwitch); + LIB_FUNCTION("UTqrWB+1+SU", "libSceHmd", 1, "libSceHmd", 1, 1, + sceHmdInternalBindDeviceWithUserId); + LIB_FUNCTION("ego1YdqNGpI", "libSceHmd", 1, "libSceHmd", 1, 1, + sceHmdInternalCheckDeviceModelMk3); + LIB_FUNCTION("WR7XsLdjcqQ", "libSceHmd", 1, "libSceHmd", 1, 1, + sceHmdInternalCheckS3dPassModeAvailable); + LIB_FUNCTION("eMI1Hq+NEwY", "libSceHmd", 1, "libSceHmd", 1, 1, sceHmdInternalCrashReportCancel); + LIB_FUNCTION("dI3StPLQlMM", "libSceHmd", 1, "libSceHmd", 1, 1, sceHmdInternalCrashReportClose); + LIB_FUNCTION("lqPT-Bf1s4I", "libSceHmd", 1, "libSceHmd", 1, 1, sceHmdInternalCrashReportOpen); + LIB_FUNCTION("QxhJs6zHUmU", "libSceHmd", 1, "libSceHmd", 1, 1, + sceHmdInternalCrashReportReadData); + LIB_FUNCTION("A2jWOLPzHHE", "libSceHmd", 1, "libSceHmd", 1, 1, + sceHmdInternalCrashReportReadDataSize); + LIB_FUNCTION("E9scVxt0DNg", "libSceHmd", 1, "libSceHmd", 1, 1, + sceHmdInternalCreateSharedMemory); + LIB_FUNCTION("6RclvsKxr3I", "libSceHmd", 1, "libSceHmd", 1, 1, sceHmdInternalDfuCheckAfterPvt); + LIB_FUNCTION("cE99PJR6b8w", "libSceHmd", 1, "libSceHmd", 1, 1, + sceHmdInternalDfuCheckPartialUpdateAvailable); + LIB_FUNCTION("SuE90Qscg0s", "libSceHmd", 1, "libSceHmd", 1, 1, sceHmdInternalDfuClose); + LIB_FUNCTION("5f-6lp7L5cY", "libSceHmd", 1, "libSceHmd", 1, 1, sceHmdInternalDfuGetStatus); + LIB_FUNCTION("dv2RqD7ZBd4", "libSceHmd", 1, "libSceHmd", 1, 1, sceHmdInternalDfuOpen); + LIB_FUNCTION("pN0HjRU86Jo", "libSceHmd", 1, "libSceHmd", 1, 1, sceHmdInternalDfuReset); + LIB_FUNCTION("mdc++HCXSsQ", "libSceHmd", 1, "libSceHmd", 1, 1, sceHmdInternalDfuSend); + LIB_FUNCTION("gjyqnphjGZE", "libSceHmd", 1, "libSceHmd", 1, 1, sceHmdInternalDfuSendSize); + LIB_FUNCTION("bl4MkWNLxKs", "libSceHmd", 1, "libSceHmd", 1, 1, sceHmdInternalDfuSetMode); + LIB_FUNCTION("a1LmvXhZ6TM", "libSceHmd", 1, "libSceHmd", 1, 1, sceHmdInternalDfuStart); + LIB_FUNCTION("+UzzSnc0z9A", "libSceHmd", 1, "libSceHmd", 1, 1, sceHmdInternalEventInitialize); + LIB_FUNCTION("uQc9P8Hrr6U", "libSceHmd", 1, "libSceHmd", 1, 1, sceHmdInternalGetBrightness); + LIB_FUNCTION("nK1g+MwMV10", "libSceHmd", 1, "libSceHmd", 1, 1, sceHmdInternalGetCrashDumpInfo); + LIB_FUNCTION("L5WZgOTw41Y", "libSceHmd", 1, "libSceHmd", 1, 1, sceHmdInternalGetDebugMode); + LIB_FUNCTION("3w8SkMfCHY0", "libSceHmd", 1, "libSceHmd", 1, 1, + sceHmdInternalGetDebugSocialScreenMode); + LIB_FUNCTION("1Xmb76MHXug", "libSceHmd", 1, "libSceHmd", 1, 1, sceHmdInternalGetDebugTextMode); + LIB_FUNCTION("S0ITgPRkfUg", "libSceHmd", 1, "libSceHmd", 1, 1, sceHmdInternalGetDefaultLedData); + LIB_FUNCTION("mxjolbeBa78", "libSceHmd", 1, "libSceHmd", 1, 1, sceHmdInternalGetDemoMode); + LIB_FUNCTION("RFIi20Wp9j0", "libSceHmd", 1, "libSceHmd", 1, 1, + sceHmdInternalGetDeviceInformation); + LIB_FUNCTION("P04LQJQZ43Y", "libSceHmd", 1, "libSceHmd", 1, 1, + sceHmdInternalGetDeviceInformationByHandle); + LIB_FUNCTION("PPCqsD8B5uM", "libSceHmd", 1, "libSceHmd", 1, 1, sceHmdInternalGetDeviceStatus); + LIB_FUNCTION("-u82z1UhOq4", "libSceHmd", 1, "libSceHmd", 1, 1, sceHmdInternalGetEyeStatus); + LIB_FUNCTION("iINSFzCIaB8", "libSceHmd", 1, "libSceHmd", 1, 1, + sceHmdInternalGetHmuOpticalParam); + LIB_FUNCTION("Csuvq2MMXHU", "libSceHmd", 1, "libSceHmd", 1, 1, + sceHmdInternalGetHmuPowerStatusForDebug); + LIB_FUNCTION("UhFPniZvm8U", "libSceHmd", 1, "libSceHmd", 1, 1, + sceHmdInternalGetHmuSerialNumber); + LIB_FUNCTION("9exeDpk7JU8", "libSceHmd", 1, "libSceHmd", 1, 1, sceHmdInternalGetIPD); + LIB_FUNCTION("yNtYRsxZ6-A", "libSceHmd", 1, "libSceHmd", 1, 1, + sceHmdInternalGetIpdSettingEnableForSystemService); + LIB_FUNCTION("EKn+IFVsz0M", "libSceHmd", 1, "libSceHmd", 1, 1, sceHmdInternalGetPuBuildNumber); + LIB_FUNCTION("AxQ6HtktYfQ", "libSceHmd", 1, "libSceHmd", 1, 1, + sceHmdInternalGetPuPositionParam); + LIB_FUNCTION("ynKv9QCSbto", "libSceHmd", 1, "libSceHmd", 1, 1, sceHmdInternalGetPuRevision); + LIB_FUNCTION("3jcyx7XOm7A", "libSceHmd", 1, "libSceHmd", 1, 1, sceHmdInternalGetPUSerialNumber); + LIB_FUNCTION("+PDyXnclP5w", "libSceHmd", 1, "libSceHmd", 1, 1, sceHmdInternalGetPUVersion); + LIB_FUNCTION("67q17ERGBuw", "libSceHmd", 1, "libSceHmd", 1, 1, + sceHmdInternalGetRequiredPUPVersion); + LIB_FUNCTION("uGyN1CkvwYU", "libSceHmd", 1, "libSceHmd", 1, 1, sceHmdInternalGetStatusReport); + LIB_FUNCTION("p9lSvZujLuo", "libSceHmd", 1, "libSceHmd", 1, 1, sceHmdInternalGetTv4kCapability); + LIB_FUNCTION("-Z+-9u98m9o", "libSceHmd", 1, "libSceHmd", 1, 1, + sceHmdInternalGetVirtualDisplayDepth); + LIB_FUNCTION("df+b0FQnnVQ", "libSceHmd", 1, "libSceHmd", 1, 1, + sceHmdInternalGetVirtualDisplayHeight); + LIB_FUNCTION("i6yROd9ygJs", "libSceHmd", 1, "libSceHmd", 1, 1, + sceHmdInternalGetVirtualDisplaySize); + LIB_FUNCTION("Aajiktl6JXU", "libSceHmd", 1, "libSceHmd", 1, 1, sceHmdInternalGetVr2dData); + LIB_FUNCTION("GwFVF2KkIT4", "libSceHmd", 1, "libSceHmd", 1, 1, + sceHmdInternalIsCommonDlgMiniAppVr2d); + LIB_FUNCTION("LWQpWHOSUvk", "libSceHmd", 1, "libSceHmd", 1, 1, sceHmdInternalIsCommonDlgVr2d); + LIB_FUNCTION("YiIVBPLxmfE", "libSceHmd", 1, "libSceHmd", 1, 1, sceHmdInternalIsGameVr2d); + LIB_FUNCTION("LMlWs+oKHTg", "libSceHmd", 1, "libSceHmd", 1, 1, sceHmdInternalIsMiniAppVr2d); + LIB_FUNCTION("nBv4CKUGX0Y", "libSceHmd", 1, "libSceHmd", 1, 1, sceHmdInternalMapSharedMemory); + LIB_FUNCTION("4hTD8I3CyAk", "libSceHmd", 1, "libSceHmd", 1, 1, + sceHmdInternalMirroringModeSetAspect); + LIB_FUNCTION("EJwPtSSZykY", "libSceHmd", 1, "libSceHmd", 1, 1, + sceHmdInternalMirroringModeSetAspectDebug); + LIB_FUNCTION("r7f7M5q3snU", "libSceHmd", 1, "libSceHmd", 1, 1, sceHmdInternalMmapGetCount); + LIB_FUNCTION("gCjTEtEsOOw", "libSceHmd", 1, "libSceHmd", 1, 1, sceHmdInternalMmapGetModeId); + LIB_FUNCTION("HAr740Mt9Hs", "libSceHmd", 1, "libSceHmd", 1, 1, + sceHmdInternalMmapGetSensorCalibrationData); + LIB_FUNCTION("1PNiQR-7L6k", "libSceHmd", 1, "libSceHmd", 1, 1, sceHmdInternalMmapIsConnect); + LIB_FUNCTION("9-jaAXUNG-A", "libSceHmd", 1, "libSceHmd", 1, 1, sceHmdInternalPushVr2dData); + LIB_FUNCTION("1gkbLH5+kxU", "libSceHmd", 1, "libSceHmd", 1, 1, + sceHmdInternalRegisterEventCallback); + LIB_FUNCTION("6kHBllapJas", "libSceHmd", 1, "libSceHmd", 1, 1, + sceHmdInternalResetInertialSensor); + LIB_FUNCTION("k1W6RPkd0mc", "libSceHmd", 1, "libSceHmd", 1, 1, + sceHmdInternalResetLedForVrTracker); + LIB_FUNCTION("dp1wu22jSGc", "libSceHmd", 1, "libSceHmd", 1, 1, sceHmdInternalResetLedForVsh); + LIB_FUNCTION("d2TeoKeqM5U", "libSceHmd", 1, "libSceHmd", 1, 1, sceHmdInternalSeparateModeClose); + LIB_FUNCTION("WxsnAsjPF7Q", "libSceHmd", 1, "libSceHmd", 1, 1, + sceHmdInternalSeparateModeGetAudioStatus); + LIB_FUNCTION("eOOeG9SpEuc", "libSceHmd", 1, "libSceHmd", 1, 1, + sceHmdInternalSeparateModeGetVideoStatus); + LIB_FUNCTION("gA4Xnn+NSGk", "libSceHmd", 1, "libSceHmd", 1, 1, sceHmdInternalSeparateModeOpen); + LIB_FUNCTION("stQ7AsondmE", "libSceHmd", 1, "libSceHmd", 1, 1, + sceHmdInternalSeparateModeSendAudio); + LIB_FUNCTION("jfnS-OoDayM", "libSceHmd", 1, "libSceHmd", 1, 1, + sceHmdInternalSeparateModeSendVideo); + LIB_FUNCTION("roHN4ml+tB8", "libSceHmd", 1, "libSceHmd", 1, 1, sceHmdInternalSetBrightness); + LIB_FUNCTION("0z2qLqedQH0", "libSceHmd", 1, "libSceHmd", 1, 1, + sceHmdInternalSetCrashReportCommand); + LIB_FUNCTION("xhx5rVZEpnw", "libSceHmd", 1, "libSceHmd", 1, 1, sceHmdInternalSetDebugGpo); + LIB_FUNCTION("e7laRxRGCHc", "libSceHmd", 1, "libSceHmd", 1, 1, sceHmdInternalSetDebugMode); + LIB_FUNCTION("CRyJ7Q-ap3g", "libSceHmd", 1, "libSceHmd", 1, 1, + sceHmdInternalSetDebugSocialScreenMode); + LIB_FUNCTION("dG4XPW4juU4", "libSceHmd", 1, "libSceHmd", 1, 1, sceHmdInternalSetDebugTextMode); + LIB_FUNCTION("rAXmGoO-VmE", "libSceHmd", 1, "libSceHmd", 1, 1, sceHmdInternalSetDefaultLedData); + LIB_FUNCTION("lu9I7jnUvWQ", "libSceHmd", 1, "libSceHmd", 1, 1, sceHmdInternalSetDemoMode); + LIB_FUNCTION("hyATMTuQSoQ", "libSceHmd", 1, "libSceHmd", 1, 1, + sceHmdInternalSetDeviceConnection); + LIB_FUNCTION("c4mSi64bXUw", "libSceHmd", 1, "libSceHmd", 1, 1, sceHmdInternalSetForcedCrash); + LIB_FUNCTION("U9kPT4g1mFE", "libSceHmd", 1, "libSceHmd", 1, 1, + sceHmdInternalSetHmuPowerControl); + LIB_FUNCTION("dX-MVpXIPwQ", "libSceHmd", 1, "libSceHmd", 1, 1, + sceHmdInternalSetHmuPowerControlForDebug); + LIB_FUNCTION("4KIjvAf8PCA", "libSceHmd", 1, "libSceHmd", 1, 1, sceHmdInternalSetIPD); + LIB_FUNCTION("NbxTfUKO184", "libSceHmd", 1, "libSceHmd", 1, 1, + sceHmdInternalSetIpdSettingEnableForSystemService); + LIB_FUNCTION("NnRKjf+hxW4", "libSceHmd", 1, "libSceHmd", 1, 1, sceHmdInternalSetLedOn); + LIB_FUNCTION("4AP0X9qGhqw", "libSceHmd", 1, "libSceHmd", 1, 1, + sceHmdInternalSetM2LedBrightness); + LIB_FUNCTION("Mzzz2HPWM+8", "libSceHmd", 1, "libSceHmd", 1, 1, sceHmdInternalSetM2LedOn); + LIB_FUNCTION("LkBkse9Pit0", "libSceHmd", 1, "libSceHmd", 1, 1, sceHmdInternalSetPortConnection); + LIB_FUNCTION("v243mvYg0Y0", "libSceHmd", 1, "libSceHmd", 1, 1, sceHmdInternalSetPortStatus); + LIB_FUNCTION("EwXvkZpo9Go", "libSceHmd", 1, "libSceHmd", 1, 1, sceHmdInternalSetS3dPassMode); + LIB_FUNCTION("g3DKNOy1tYw", "libSceHmd", 1, "libSceHmd", 1, 1, sceHmdInternalSetSidetone); + LIB_FUNCTION("mjMsl838XM8", "libSceHmd", 1, "libSceHmd", 1, 1, sceHmdInternalSetUserType); + LIB_FUNCTION("8IS0KLkDNQY", "libSceHmd", 1, "libSceHmd", 1, 1, + sceHmdInternalSetVirtualDisplayDepth); + LIB_FUNCTION("afhK5KcJOJY", "libSceHmd", 1, "libSceHmd", 1, 1, + sceHmdInternalSetVirtualDisplayHeight); + LIB_FUNCTION("+zPvzIiB+BU", "libSceHmd", 1, "libSceHmd", 1, 1, + sceHmdInternalSetVirtualDisplaySize); + LIB_FUNCTION("9z8Lc64NF1c", "libSceHmd", 1, "libSceHmd", 1, 1, sceHmdInternalSetVRMode); + LIB_FUNCTION("s5EqYh5kbwM", "libSceHmd", 1, "libSceHmd", 1, 1, + sceHmdInternalSocialScreenGetFadeState); + LIB_FUNCTION("a1LMFZtK9b0", "libSceHmd", 1, "libSceHmd", 1, 1, + sceHmdInternalSocialScreenSetFadeAndSwitch); + LIB_FUNCTION("-6FjKlMA+Yc", "libSceHmd", 1, "libSceHmd", 1, 1, + sceHmdInternalSocialScreenSetOutput); + LIB_FUNCTION("d2g5Ij7EUzo", "libSceHmd", 1, "libSceHmd", 1, 1, sceHmdOpen); + LIB_FUNCTION("NTIbBpSH9ik", "libSceHmd", 1, "libSceHmd", 1, 1, + sceHmdReprojectionAddDisplayBuffer); + LIB_FUNCTION("94+Ggm38KCg", "libSceHmd", 1, "libSceHmd", 1, 1, + sceHmdReprojectionClearUserEventEnd); + LIB_FUNCTION("mdyFbaJj66M", "libSceHmd", 1, "libSceHmd", 1, 1, + sceHmdReprojectionClearUserEventStart); + LIB_FUNCTION("MdV0akauNow", "libSceHmd", 1, "libSceHmd", 1, 1, + sceHmdReprojectionDebugGetLastInfo); + LIB_FUNCTION("ymiwVjPB5+k", "libSceHmd", 1, "libSceHmd", 1, 1, + sceHmdReprojectionDebugGetLastInfoMultilayer); + LIB_FUNCTION("ZrV5YIqD09I", "libSceHmd", 1, "libSceHmd", 1, 1, sceHmdReprojectionFinalize); + LIB_FUNCTION("utHD2Ab-Ixo", "libSceHmd", 1, "libSceHmd", 1, 1, + sceHmdReprojectionFinalizeCapture); + LIB_FUNCTION("OuygGEWkins", "libSceHmd", 1, "libSceHmd", 1, 1, sceHmdReprojectionInitialize); + LIB_FUNCTION("BTrQnC6fcAk", "libSceHmd", 1, "libSceHmd", 1, 1, + sceHmdReprojectionInitializeCapture); + LIB_FUNCTION("TkcANcGM0s8", "libSceHmd", 1, "libSceHmd", 1, 1, + sceHmdReprojectionQueryGarlicBuffAlign); + LIB_FUNCTION("z0KtN1vqF2E", "libSceHmd", 1, "libSceHmd", 1, 1, + sceHmdReprojectionQueryGarlicBuffSize); + LIB_FUNCTION("IWybWbR-xvA", "libSceHmd", 1, "libSceHmd", 1, 1, + sceHmdReprojectionQueryOnionBuffAlign); + LIB_FUNCTION("kLUAkN6a1e8", "libSceHmd", 1, "libSceHmd", 1, 1, + sceHmdReprojectionQueryOnionBuffSize); + LIB_FUNCTION("6CRWGc-evO4", "libSceHmd", 1, "libSceHmd", 1, 1, sceHmdReprojectionSetCallback); + LIB_FUNCTION("E+dPfjeQLHI", "libSceHmd", 1, "libSceHmd", 1, 1, + sceHmdReprojectionSetDisplayBuffers); + LIB_FUNCTION("LjdLRysHU6Y", "libSceHmd", 1, "libSceHmd", 1, 1, + sceHmdReprojectionSetOutputMinColor); + LIB_FUNCTION("knyIhlkpLgE", "libSceHmd", 1, "libSceHmd", 1, 1, + sceHmdReprojectionSetUserEventEnd); + LIB_FUNCTION("7as0CjXW1B8", "libSceHmd", 1, "libSceHmd", 1, 1, + sceHmdReprojectionSetUserEventStart); + LIB_FUNCTION("dntZTJ7meIU", "libSceHmd", 1, "libSceHmd", 1, 1, sceHmdReprojectionStart); + LIB_FUNCTION("q3e8+nEguyE", "libSceHmd", 1, "libSceHmd", 1, 1, sceHmdReprojectionStart2dVr); + LIB_FUNCTION("RrvyU1pjb9A", "libSceHmd", 1, "libSceHmd", 1, 1, sceHmdReprojectionStartCapture); + LIB_FUNCTION("XZ5QUzb4ae0", "libSceHmd", 1, "libSceHmd", 1, 1, + sceHmdReprojectionStartLiveCapture); + LIB_FUNCTION("8gH1aLgty5I", "libSceHmd", 1, "libSceHmd", 1, 1, + sceHmdReprojectionStartMultilayer); + LIB_FUNCTION("gqAG7JYeE7A", "libSceHmd", 1, "libSceHmd", 1, 1, + sceHmdReprojectionStartMultilayer2); + LIB_FUNCTION("3JyuejcNhC0", "libSceHmd", 1, "libSceHmd", 1, 1, sceHmdReprojectionStartWideNear); + LIB_FUNCTION("mKa8scOc4-k", "libSceHmd", 1, "libSceHmd", 1, 1, + sceHmdReprojectionStartWideNearWithOverlay); + LIB_FUNCTION("kcldQ7zLYQQ", "libSceHmd", 1, "libSceHmd", 1, 1, + sceHmdReprojectionStartWithOverlay); + LIB_FUNCTION("vzMEkwBQciM", "libSceHmd", 1, "libSceHmd", 1, 1, sceHmdReprojectionStop); + LIB_FUNCTION("F7Sndm5teWw", "libSceHmd", 1, "libSceHmd", 1, 1, sceHmdReprojectionStopCapture); + LIB_FUNCTION("PAa6cUL5bR4", "libSceHmd", 1, "libSceHmd", 1, 1, + sceHmdReprojectionStopLiveCapture); + LIB_FUNCTION("0wnZViigP9o", "libSceHmd", 1, "libSceHmd", 1, 1, sceHmdReprojectionUnsetCallback); + LIB_FUNCTION("iGNNpDDjcwo", "libSceHmd", 1, "libSceHmd", 1, 1, + sceHmdReprojectionUnsetDisplayBuffers); + LIB_FUNCTION("z-RMILqP6tE", "libSceHmd", 1, "libSceHmd", 1, 1, sceHmdTerminate); + LIB_FUNCTION("IC0NGmh-zS8", "libSceHmd", 1, "libSceHmd", 1, 1, Func_202D0D1A687FCD2F); + LIB_FUNCTION("NY2-gYo9ihI", "libSceHmd", 1, "libSceHmd", 1, 1, Func_358DBF818A3D8A12); + LIB_FUNCTION("XMutp2-o9A4", "libSceHmd", 1, "libSceHmd", 1, 1, Func_5CCBADA76FE8F40E); + LIB_FUNCTION("Y9QDFn3AjPA", "libSceHmd", 1, "libSceHmd", 1, 1, Func_63D403167DC08CF0); + LIB_FUNCTION("aTg7K0466r8", "libSceHmd", 1, "libSceHmd", 1, 1, Func_69383B2B4E3AEABF); + LIB_FUNCTION("eRVgwy9PbWg", "libSceHmd", 1, "libSceHmd", 1, 1, Func_791560C32F4F6D68); + LIB_FUNCTION("fJVZYeqFttM", "libSceHmd", 1, "libSceHmd", 1, 1, Func_7C955961EA85B6D3); + LIB_FUNCTION("mVIneDkja6c", "libSceHmd", 1, "libSceHmd", 1, 1, Func_9952277839236BA7); + LIB_FUNCTION("miduc55U7q8", "libSceHmd", 1, "libSceHmd", 1, 1, Func_9A276E739E54EEAF); + LIB_FUNCTION("nlAZlOKJy+c", "libSceHmd", 1, "libSceHmd", 1, 1, Func_9E501994E289CBE7); + LIB_FUNCTION("oxoDINgOrZk", "libSceHmd", 1, "libSceHmd", 1, 1, Func_A31A0320D80EAD99); + LIB_FUNCTION("ox9NqLO9LhI", "libSceHmd", 1, "libSceHmd", 1, 1, Func_A31F4DA8B3BD2E12); + LIB_FUNCTION("qS18I6w2SZM", "libSceHmd", 1, "libSceHmd", 1, 1, Func_A92D7C23AC364993); + LIB_FUNCTION("rczCXLh2-b4", "libSceHmd", 1, "libSceHmd", 1, 1, Func_ADCCC25CB876FDBE); + LIB_FUNCTION("sWZSZB-mnw4", "libSceHmd", 1, "libSceHmd", 1, 1, Func_B16652641FE69F0E); + LIB_FUNCTION("thTykLZ-tZs", "libSceHmd", 1, "libSceHmd", 1, 1, Func_B614F290B67FB59B); + LIB_FUNCTION("uab6BzXsfkk", "libSceHmd", 1, "libSceHmd", 1, 1, Func_B9A6FA0735EC7E49); + LIB_FUNCTION("-Bk71lPyry4", "libSceHmd", 1, "libSceHmd", 1, 1, Func_FC193BD653F2AF2E); + LIB_FUNCTION("-y4OUwFf4jE", "libSceHmd", 1, "libSceHmd", 1, 1, Func_FF2E0E53015FE231); +}; + +} // namespace Libraries::Hmd \ No newline at end of file diff --git a/src/core/libraries/hmd/hmd.h b/src/core/libraries/hmd/hmd.h new file mode 100644 index 000000000..12f1ac70a --- /dev/null +++ b/src/core/libraries/hmd/hmd.h @@ -0,0 +1,203 @@ +// SPDX-FileCopyrightText: Copyright 2024 shadPS4 Emulator Project +// SPDX-License-Identifier: GPL-2.0-or-later + +#pragma once + +#include "common/types.h" + +namespace Core::Loader { +class SymbolsResolver; +} + +namespace Libraries::Hmd { + +s32 PS4_SYSV_ABI sceHmdReprojectionStartMultilayer(); +s32 PS4_SYSV_ABI sceHmdDistortionGet2dVrCommand(); +s32 PS4_SYSV_ABI sceHmdDistortionGetCompoundEyeCorrectionCommand(); +s32 PS4_SYSV_ABI sceHmdDistortionGetCorrectionCommand(); +s32 PS4_SYSV_ABI sceHmdDistortionGetWideNearCorrectionCommand(); +s32 PS4_SYSV_ABI sceHmdDistortionGetWorkMemoryAlign(); +s32 PS4_SYSV_ABI sceHmdDistortionGetWorkMemorySize(); +s32 PS4_SYSV_ABI sceHmdDistortionInitialize(); +s32 PS4_SYSV_ABI sceHmdDistortionSetOutputMinColor(); +s32 PS4_SYSV_ABI Func_B26430EA74FC3DC0(); +s32 PS4_SYSV_ABI sceHmdClose(); +s32 PS4_SYSV_ABI sceHmdGet2DEyeOffset(); +s32 PS4_SYSV_ABI sceHmdGet2dVrCommand(); +s32 PS4_SYSV_ABI sceHmdGetAssyError(); +s32 PS4_SYSV_ABI sceHmdGetDeviceInformation(); +s32 PS4_SYSV_ABI sceHmdGetDeviceInformationByHandle(); +s32 PS4_SYSV_ABI sceHmdGetDistortionCorrectionCommand(); +s32 PS4_SYSV_ABI sceHmdGetDistortionParams(); +s32 PS4_SYSV_ABI sceHmdGetDistortionWorkMemoryAlign(); +s32 PS4_SYSV_ABI sceHmdGetDistortionWorkMemorySize(); +s32 PS4_SYSV_ABI sceHmdGetFieldOfView(); +s32 PS4_SYSV_ABI sceHmdGetInertialSensorData(); +s32 PS4_SYSV_ABI sceHmdGetWideNearDistortionCorrectionCommand(); +s32 PS4_SYSV_ABI sceHmdInitialize(); +s32 PS4_SYSV_ABI sceHmdInitialize315(); +s32 PS4_SYSV_ABI sceHmdInternal3dAudioClose(); +s32 PS4_SYSV_ABI sceHmdInternal3dAudioOpen(); +s32 PS4_SYSV_ABI sceHmdInternal3dAudioSendData(); +s32 PS4_SYSV_ABI sceHmdInternalAnotherScreenClose(); +s32 PS4_SYSV_ABI sceHmdInternalAnotherScreenGetAudioStatus(); +s32 PS4_SYSV_ABI sceHmdInternalAnotherScreenGetFadeState(); +s32 PS4_SYSV_ABI sceHmdInternalAnotherScreenGetVideoStatus(); +s32 PS4_SYSV_ABI sceHmdInternalAnotherScreenOpen(); +s32 PS4_SYSV_ABI sceHmdInternalAnotherScreenSendAudio(); +s32 PS4_SYSV_ABI sceHmdInternalAnotherScreenSendVideo(); +s32 PS4_SYSV_ABI sceHmdInternalAnotherScreenSetFadeAndSwitch(); +s32 PS4_SYSV_ABI sceHmdInternalBindDeviceWithUserId(); +s32 PS4_SYSV_ABI sceHmdInternalCheckDeviceModelMk3(); +s32 PS4_SYSV_ABI sceHmdInternalCheckS3dPassModeAvailable(); +s32 PS4_SYSV_ABI sceHmdInternalCrashReportCancel(); +s32 PS4_SYSV_ABI sceHmdInternalCrashReportClose(); +s32 PS4_SYSV_ABI sceHmdInternalCrashReportOpen(); +s32 PS4_SYSV_ABI sceHmdInternalCrashReportReadData(); +s32 PS4_SYSV_ABI sceHmdInternalCrashReportReadDataSize(); +s32 PS4_SYSV_ABI sceHmdInternalCreateSharedMemory(); +s32 PS4_SYSV_ABI sceHmdInternalDfuCheckAfterPvt(); +s32 PS4_SYSV_ABI sceHmdInternalDfuCheckPartialUpdateAvailable(); +s32 PS4_SYSV_ABI sceHmdInternalDfuClose(); +s32 PS4_SYSV_ABI sceHmdInternalDfuGetStatus(); +s32 PS4_SYSV_ABI sceHmdInternalDfuOpen(); +s32 PS4_SYSV_ABI sceHmdInternalDfuReset(); +s32 PS4_SYSV_ABI sceHmdInternalDfuSend(); +s32 PS4_SYSV_ABI sceHmdInternalDfuSendSize(); +s32 PS4_SYSV_ABI sceHmdInternalDfuSetMode(); +s32 PS4_SYSV_ABI sceHmdInternalDfuStart(); +s32 PS4_SYSV_ABI sceHmdInternalEventInitialize(); +s32 PS4_SYSV_ABI sceHmdInternalGetBrightness(); +s32 PS4_SYSV_ABI sceHmdInternalGetCrashDumpInfo(); +s32 PS4_SYSV_ABI sceHmdInternalGetDebugMode(); +s32 PS4_SYSV_ABI sceHmdInternalGetDebugSocialScreenMode(); +s32 PS4_SYSV_ABI sceHmdInternalGetDebugTextMode(); +s32 PS4_SYSV_ABI sceHmdInternalGetDefaultLedData(); +s32 PS4_SYSV_ABI sceHmdInternalGetDemoMode(); +s32 PS4_SYSV_ABI sceHmdInternalGetDeviceInformation(); +s32 PS4_SYSV_ABI sceHmdInternalGetDeviceInformationByHandle(); +s32 PS4_SYSV_ABI sceHmdInternalGetDeviceStatus(); +s32 PS4_SYSV_ABI sceHmdInternalGetEyeStatus(); +s32 PS4_SYSV_ABI sceHmdInternalGetHmuOpticalParam(); +s32 PS4_SYSV_ABI sceHmdInternalGetHmuPowerStatusForDebug(); +s32 PS4_SYSV_ABI sceHmdInternalGetHmuSerialNumber(); +s32 PS4_SYSV_ABI sceHmdInternalGetIPD(); +s32 PS4_SYSV_ABI sceHmdInternalGetIpdSettingEnableForSystemService(); +s32 PS4_SYSV_ABI sceHmdInternalGetPuBuildNumber(); +s32 PS4_SYSV_ABI sceHmdInternalGetPuPositionParam(); +s32 PS4_SYSV_ABI sceHmdInternalGetPuRevision(); +s32 PS4_SYSV_ABI sceHmdInternalGetPUSerialNumber(); +s32 PS4_SYSV_ABI sceHmdInternalGetPUVersion(); +s32 PS4_SYSV_ABI sceHmdInternalGetRequiredPUPVersion(); +s32 PS4_SYSV_ABI sceHmdInternalGetStatusReport(); +s32 PS4_SYSV_ABI sceHmdInternalGetTv4kCapability(); +s32 PS4_SYSV_ABI sceHmdInternalGetVirtualDisplayDepth(); +s32 PS4_SYSV_ABI sceHmdInternalGetVirtualDisplayHeight(); +s32 PS4_SYSV_ABI sceHmdInternalGetVirtualDisplaySize(); +s32 PS4_SYSV_ABI sceHmdInternalGetVr2dData(); +s32 PS4_SYSV_ABI sceHmdInternalIsCommonDlgMiniAppVr2d(); +s32 PS4_SYSV_ABI sceHmdInternalIsCommonDlgVr2d(); +s32 PS4_SYSV_ABI sceHmdInternalIsGameVr2d(); +s32 PS4_SYSV_ABI sceHmdInternalIsMiniAppVr2d(); +s32 PS4_SYSV_ABI sceHmdInternalMapSharedMemory(); +s32 PS4_SYSV_ABI sceHmdInternalMirroringModeSetAspect(); +s32 PS4_SYSV_ABI sceHmdInternalMirroringModeSetAspectDebug(); +s32 PS4_SYSV_ABI sceHmdInternalMmapGetCount(); +s32 PS4_SYSV_ABI sceHmdInternalMmapGetModeId(); +s32 PS4_SYSV_ABI sceHmdInternalMmapGetSensorCalibrationData(); +s32 PS4_SYSV_ABI sceHmdInternalMmapIsConnect(); +s32 PS4_SYSV_ABI sceHmdInternalPushVr2dData(); +s32 PS4_SYSV_ABI sceHmdInternalRegisterEventCallback(); +s32 PS4_SYSV_ABI sceHmdInternalResetInertialSensor(); +s32 PS4_SYSV_ABI sceHmdInternalResetLedForVrTracker(); +s32 PS4_SYSV_ABI sceHmdInternalResetLedForVsh(); +s32 PS4_SYSV_ABI sceHmdInternalSeparateModeClose(); +s32 PS4_SYSV_ABI sceHmdInternalSeparateModeGetAudioStatus(); +s32 PS4_SYSV_ABI sceHmdInternalSeparateModeGetVideoStatus(); +s32 PS4_SYSV_ABI sceHmdInternalSeparateModeOpen(); +s32 PS4_SYSV_ABI sceHmdInternalSeparateModeSendAudio(); +s32 PS4_SYSV_ABI sceHmdInternalSeparateModeSendVideo(); +s32 PS4_SYSV_ABI sceHmdInternalSetBrightness(); +s32 PS4_SYSV_ABI sceHmdInternalSetCrashReportCommand(); +s32 PS4_SYSV_ABI sceHmdInternalSetDebugGpo(); +s32 PS4_SYSV_ABI sceHmdInternalSetDebugMode(); +s32 PS4_SYSV_ABI sceHmdInternalSetDebugSocialScreenMode(); +s32 PS4_SYSV_ABI sceHmdInternalSetDebugTextMode(); +s32 PS4_SYSV_ABI sceHmdInternalSetDefaultLedData(); +s32 PS4_SYSV_ABI sceHmdInternalSetDemoMode(); +s32 PS4_SYSV_ABI sceHmdInternalSetDeviceConnection(); +s32 PS4_SYSV_ABI sceHmdInternalSetForcedCrash(); +s32 PS4_SYSV_ABI sceHmdInternalSetHmuPowerControl(); +s32 PS4_SYSV_ABI sceHmdInternalSetHmuPowerControlForDebug(); +s32 PS4_SYSV_ABI sceHmdInternalSetIPD(); +s32 PS4_SYSV_ABI sceHmdInternalSetIpdSettingEnableForSystemService(); +s32 PS4_SYSV_ABI sceHmdInternalSetLedOn(); +s32 PS4_SYSV_ABI sceHmdInternalSetM2LedBrightness(); +s32 PS4_SYSV_ABI sceHmdInternalSetM2LedOn(); +s32 PS4_SYSV_ABI sceHmdInternalSetPortConnection(); +s32 PS4_SYSV_ABI sceHmdInternalSetPortStatus(); +s32 PS4_SYSV_ABI sceHmdInternalSetS3dPassMode(); +s32 PS4_SYSV_ABI sceHmdInternalSetSidetone(); +s32 PS4_SYSV_ABI sceHmdInternalSetUserType(); +s32 PS4_SYSV_ABI sceHmdInternalSetVirtualDisplayDepth(); +s32 PS4_SYSV_ABI sceHmdInternalSetVirtualDisplayHeight(); +s32 PS4_SYSV_ABI sceHmdInternalSetVirtualDisplaySize(); +s32 PS4_SYSV_ABI sceHmdInternalSetVRMode(); +s32 PS4_SYSV_ABI sceHmdInternalSocialScreenGetFadeState(); +s32 PS4_SYSV_ABI sceHmdInternalSocialScreenSetFadeAndSwitch(); +s32 PS4_SYSV_ABI sceHmdInternalSocialScreenSetOutput(); +s32 PS4_SYSV_ABI sceHmdOpen(); +s32 PS4_SYSV_ABI sceHmdReprojectionAddDisplayBuffer(); +s32 PS4_SYSV_ABI sceHmdReprojectionClearUserEventEnd(); +s32 PS4_SYSV_ABI sceHmdReprojectionClearUserEventStart(); +s32 PS4_SYSV_ABI sceHmdReprojectionDebugGetLastInfo(); +s32 PS4_SYSV_ABI sceHmdReprojectionDebugGetLastInfoMultilayer(); +s32 PS4_SYSV_ABI sceHmdReprojectionFinalize(); +s32 PS4_SYSV_ABI sceHmdReprojectionFinalizeCapture(); +s32 PS4_SYSV_ABI sceHmdReprojectionInitialize(); +s32 PS4_SYSV_ABI sceHmdReprojectionInitializeCapture(); +s32 PS4_SYSV_ABI sceHmdReprojectionQueryGarlicBuffAlign(); +s32 PS4_SYSV_ABI sceHmdReprojectionQueryGarlicBuffSize(); +s32 PS4_SYSV_ABI sceHmdReprojectionQueryOnionBuffAlign(); +s32 PS4_SYSV_ABI sceHmdReprojectionQueryOnionBuffSize(); +s32 PS4_SYSV_ABI sceHmdReprojectionSetCallback(); +s32 PS4_SYSV_ABI sceHmdReprojectionSetDisplayBuffers(); +s32 PS4_SYSV_ABI sceHmdReprojectionSetOutputMinColor(); +s32 PS4_SYSV_ABI sceHmdReprojectionSetUserEventEnd(); +s32 PS4_SYSV_ABI sceHmdReprojectionSetUserEventStart(); +s32 PS4_SYSV_ABI sceHmdReprojectionStart(); +s32 PS4_SYSV_ABI sceHmdReprojectionStart2dVr(); +s32 PS4_SYSV_ABI sceHmdReprojectionStartCapture(); +s32 PS4_SYSV_ABI sceHmdReprojectionStartLiveCapture(); +s32 PS4_SYSV_ABI sceHmdReprojectionStartMultilayer2(); +s32 PS4_SYSV_ABI sceHmdReprojectionStartWideNear(); +s32 PS4_SYSV_ABI sceHmdReprojectionStartWideNearWithOverlay(); +s32 PS4_SYSV_ABI sceHmdReprojectionStartWithOverlay(); +s32 PS4_SYSV_ABI sceHmdReprojectionStop(); +s32 PS4_SYSV_ABI sceHmdReprojectionStopCapture(); +s32 PS4_SYSV_ABI sceHmdReprojectionStopLiveCapture(); +s32 PS4_SYSV_ABI sceHmdReprojectionUnsetCallback(); +s32 PS4_SYSV_ABI sceHmdReprojectionUnsetDisplayBuffers(); +s32 PS4_SYSV_ABI sceHmdTerminate(); +s32 PS4_SYSV_ABI Func_202D0D1A687FCD2F(); +s32 PS4_SYSV_ABI Func_358DBF818A3D8A12(); +s32 PS4_SYSV_ABI Func_5CCBADA76FE8F40E(); +s32 PS4_SYSV_ABI Func_63D403167DC08CF0(); +s32 PS4_SYSV_ABI Func_69383B2B4E3AEABF(); +s32 PS4_SYSV_ABI Func_791560C32F4F6D68(); +s32 PS4_SYSV_ABI Func_7C955961EA85B6D3(); +s32 PS4_SYSV_ABI Func_9952277839236BA7(); +s32 PS4_SYSV_ABI Func_9A276E739E54EEAF(); +s32 PS4_SYSV_ABI Func_9E501994E289CBE7(); +s32 PS4_SYSV_ABI Func_A31A0320D80EAD99(); +s32 PS4_SYSV_ABI Func_A31F4DA8B3BD2E12(); +s32 PS4_SYSV_ABI Func_A92D7C23AC364993(); +s32 PS4_SYSV_ABI Func_ADCCC25CB876FDBE(); +s32 PS4_SYSV_ABI Func_B16652641FE69F0E(); +s32 PS4_SYSV_ABI Func_B614F290B67FB59B(); +s32 PS4_SYSV_ABI Func_B9A6FA0735EC7E49(); +s32 PS4_SYSV_ABI Func_FC193BD653F2AF2E(); +s32 PS4_SYSV_ABI Func_FF2E0E53015FE231(); + +void RegisterlibSceHmd(Core::Loader::SymbolsResolver* sym); +} // namespace Libraries::Hmd \ No newline at end of file diff --git a/src/core/libraries/ime/ime.cpp b/src/core/libraries/ime/ime.cpp index dfd659db8..1c61bc276 100644 --- a/src/core/libraries/ime/ime.cpp +++ b/src/core/libraries/ime/ime.cpp @@ -49,9 +49,9 @@ public: // Are we supposed to call the event handler on init with // ADD_OSK? - if (!ime_mode && False(m_param.key.option & OrbisImeKeyboardOption::AddOsk)) { + /* if (!ime_mode && False(m_param.key.option & OrbisImeKeyboardOption::AddOsk)) { Execute(nullptr, &openEvent, true); - } + }*/ if (ime_mode) { g_ime_state = ImeState(&m_param.ime); @@ -274,6 +274,13 @@ s32 PS4_SYSV_ABI sceImeKeyboardOpen(s32 userId, const OrbisImeKeyboardParam* par if (!param) { return ORBIS_IME_ERROR_INVALID_ADDRESS; } + if (!param->arg) { + return ORBIS_IME_ERROR_INVALID_ARG; + } + if (!param->handler) { + return ORBIS_IME_ERROR_INVALID_HANDLER; + } + if (g_keyboard_handler) { return ORBIS_IME_ERROR_BUSY; } diff --git a/src/core/libraries/ime/ime.h b/src/core/libraries/ime/ime.h index 448ee6896..fcf381048 100644 --- a/src/core/libraries/ime/ime.h +++ b/src/core/libraries/ime/ime.h @@ -20,7 +20,7 @@ enum class OrbisImeKeyboardOption : u32 { Repeat = 1, RepeatEachKey = 2, AddOsk = 4, - EffectiveWithTime = 8, + EffectiveWithIme = 8, DisableResume = 16, DisableCapslockWithoutShift = 32, }; diff --git a/src/core/libraries/kernel/aio.cpp b/src/core/libraries/kernel/aio.cpp new file mode 100644 index 000000000..e017010cb --- /dev/null +++ b/src/core/libraries/kernel/aio.cpp @@ -0,0 +1,339 @@ +// SPDX-FileCopyrightText: Copyright 2024 shadPS4 Emulator Project +// SPDX-License-Identifier: GPL-2.0-or-later + +#include + +#include "aio.h" +#include "common/assert.h" +#include "common/debug.h" +#include "common/logging/log.h" +#include "core/libraries/kernel/equeue.h" +#include "core/libraries/kernel/orbis_error.h" +#include "core/libraries/libs.h" +#include "file_system.h" + +namespace Libraries::Kernel { + +#define MAX_QUEUE 512 + +static s32* id_state; +static s32 id_index; + +s32 sceKernelAioInitializeImpl(void* p, s32 size) { + + return 0; +} + +s32 PS4_SYSV_ABI sceKernelAioDeleteRequest(OrbisKernelAioSubmitId id, s32* ret) { + if (ret == nullptr) { + return ORBIS_KERNEL_ERROR_EFAULT; + } + id_state[id] = ORBIS_KERNEL_AIO_STATE_ABORTED; + *ret = 0; + return 0; +} + +s32 PS4_SYSV_ABI sceKernelAioDeleteRequests(OrbisKernelAioSubmitId id[], s32 num, s32 ret[]) { + if (ret == nullptr) { + return ORBIS_KERNEL_ERROR_EFAULT; + } + for (s32 i = 0; i < num; i++) { + id_state[id[i]] = ORBIS_KERNEL_AIO_STATE_ABORTED; + ret[i] = 0; + } + + return 0; +} +s32 PS4_SYSV_ABI sceKernelAioPollRequest(OrbisKernelAioSubmitId id, s32* state) { + if (state == nullptr) { + return ORBIS_KERNEL_ERROR_EFAULT; + } + *state = id_state[id]; + return 0; +} + +s32 PS4_SYSV_ABI sceKernelAioPollRequests(OrbisKernelAioSubmitId id[], s32 num, s32 state[]) { + if (state == nullptr) { + return ORBIS_KERNEL_ERROR_EFAULT; + } + for (s32 i = 0; i < num; i++) { + state[i] = id_state[id[i]]; + } + + return 0; +} + +s32 PS4_SYSV_ABI sceKernelAioCancelRequest(OrbisKernelAioSubmitId id, s32* state) { + if (state == nullptr) { + return ORBIS_KERNEL_ERROR_EFAULT; + } + if (id) { + id_state[id] = ORBIS_KERNEL_AIO_STATE_ABORTED; + *state = ORBIS_KERNEL_AIO_STATE_ABORTED; + } else { + *state = ORBIS_KERNEL_AIO_STATE_PROCESSING; + } + return 0; +} + +s32 PS4_SYSV_ABI sceKernelAioCancelRequests(OrbisKernelAioSubmitId id[], s32 num, s32 state[]) { + if (state == nullptr) { + return ORBIS_KERNEL_ERROR_EFAULT; + } + for (s32 i = 0; i < num; i++) { + if (id[i]) { + id_state[id[i]] = ORBIS_KERNEL_AIO_STATE_ABORTED; + state[i] = ORBIS_KERNEL_AIO_STATE_ABORTED; + } else { + state[i] = ORBIS_KERNEL_AIO_STATE_PROCESSING; + } + } + + return 0; +} + +s32 PS4_SYSV_ABI sceKernelAioWaitRequest(OrbisKernelAioSubmitId id, s32* state, u32* usec) { + if (state == nullptr) { + return ORBIS_KERNEL_ERROR_EFAULT; + } + u32 timer = 0; + + s32 timeout = 0; + + while (id_state[id] == ORBIS_KERNEL_AIO_STATE_PROCESSING) { + sceKernelUsleep(10); + + timer += 10; + if (*usec) { + if (timer > *usec) { + timeout = 1; + break; + } + } + } + + *state = id_state[id]; + + if (timeout) + return ORBIS_KERNEL_ERROR_ETIMEDOUT; + return 0; +} + +s32 PS4_SYSV_ABI sceKernelAioWaitRequests(OrbisKernelAioSubmitId id[], s32 num, s32 state[], + u32 mode, u32* usec) { + if (state == nullptr) { + return ORBIS_KERNEL_ERROR_EFAULT; + } + u32 timer = 0; + s32 timeout = 0; + s32 completion = 0; + + for (s32 i = 0; i < num; i++) { + if (!completion && !timeout) { + while (id_state[id[i]] == ORBIS_KERNEL_AIO_STATE_PROCESSING) { + sceKernelUsleep(10); + timer += 10; + + if (*usec) { + if (timer > *usec) { + timeout = 1; + break; + } + } + } + } + + if (mode == 0x02) { + if (id_state[id[i]] == ORBIS_KERNEL_AIO_STATE_COMPLETED) + completion = 1; + } + + state[i] = id_state[id[i]]; + } + + if (timeout) + return ORBIS_KERNEL_ERROR_ETIMEDOUT; + + return 0; +} + +s32 PS4_SYSV_ABI sceKernelAioSubmitReadCommands(OrbisKernelAioRWRequest req[], s32 size, s32 prio, + OrbisKernelAioSubmitId* id) { + if (req == nullptr) { + return ORBIS_KERNEL_ERROR_EFAULT; + } + if (id == nullptr) { + return ORBIS_KERNEL_ERROR_EFAULT; + } + id_state[id_index] = ORBIS_KERNEL_AIO_STATE_PROCESSING; + + for (s32 i = 0; i < size; i++) { + + s64 ret = sceKernelPread(req[i].fd, req[i].buf, req[i].nbyte, req[i].offset); + + if (ret < 0) { + req[i].result->state = ORBIS_KERNEL_AIO_STATE_ABORTED; + req[i].result->returnValue = ret; + + } else { + req[i].result->state = ORBIS_KERNEL_AIO_STATE_COMPLETED; + req[i].result->returnValue = ret; + } + } + + id_state[id_index] = ORBIS_KERNEL_AIO_STATE_COMPLETED; + + *id = id_index; + + id_index = (id_index + 1) % MAX_QUEUE; + + if (!id_index) + id_index++; + + return 0; +} + +s32 PS4_SYSV_ABI sceKernelAioSubmitReadCommandsMultiple(OrbisKernelAioRWRequest req[], s32 size, + s32 prio, OrbisKernelAioSubmitId id[]) { + if (req == nullptr) { + return ORBIS_KERNEL_ERROR_EFAULT; + } + if (id == nullptr) { + return ORBIS_KERNEL_ERROR_EFAULT; + } + for (s32 i = 0; i < size; i++) { + id_state[id_index] = ORBIS_KERNEL_AIO_STATE_PROCESSING; + + s64 ret = sceKernelPread(req[i].fd, req[i].buf, req[i].nbyte, req[i].offset); + + if (ret < 0) { + req[i].result->state = ORBIS_KERNEL_AIO_STATE_ABORTED; + req[i].result->returnValue = ret; + + id_state[id_index] = ORBIS_KERNEL_AIO_STATE_ABORTED; + + } else { + req[i].result->state = ORBIS_KERNEL_AIO_STATE_COMPLETED; + req[i].result->returnValue = ret; + + id_state[id_index] = ORBIS_KERNEL_AIO_STATE_COMPLETED; + } + + id[i] = id_index; + + id_index = (id_index + 1) % MAX_QUEUE; + + if (!id_index) + id_index++; + } + + return 0; +} + +s32 PS4_SYSV_ABI sceKernelAioSubmitWriteCommands(OrbisKernelAioRWRequest req[], s32 size, s32 prio, + OrbisKernelAioSubmitId* id) { + if (req == nullptr) { + return ORBIS_KERNEL_ERROR_EFAULT; + } + if (id == nullptr) { + return ORBIS_KERNEL_ERROR_EFAULT; + } + for (s32 i = 0; i < size; i++) { + id_state[id_index] = ORBIS_KERNEL_AIO_STATE_PROCESSING; + + s64 ret = sceKernelPwrite(req[i].fd, req[i].buf, req[i].nbyte, req[i].offset); + + if (ret < 0) { + req[i].result->state = ORBIS_KERNEL_AIO_STATE_ABORTED; + req[i].result->returnValue = ret; + + id_state[id_index] = ORBIS_KERNEL_AIO_STATE_ABORTED; + + } else { + req[i].result->state = ORBIS_KERNEL_AIO_STATE_COMPLETED; + req[i].result->returnValue = ret; + + id_state[id_index] = ORBIS_KERNEL_AIO_STATE_COMPLETED; + } + } + + *id = id_index; + + id_index = (id_index + 1) % MAX_QUEUE; + + // skip id_index equals 0 , because sceKernelAioCancelRequest will submit id + // equal to 0 + if (!id_index) + id_index++; + + return 0; +} + +s32 PS4_SYSV_ABI sceKernelAioSubmitWriteCommandsMultiple(OrbisKernelAioRWRequest req[], s32 size, + s32 prio, OrbisKernelAioSubmitId id[]) { + if (req == nullptr) { + return ORBIS_KERNEL_ERROR_EFAULT; + } + if (id == nullptr) { + return ORBIS_KERNEL_ERROR_EFAULT; + } + for (s32 i = 0; i < size; i++) { + id_state[id_index] = ORBIS_KERNEL_AIO_STATE_PROCESSING; + s64 ret = sceKernelPwrite(req[i].fd, req[i].buf, req[i].nbyte, req[i].offset); + + if (ret < 0) { + req[i].result->state = ORBIS_KERNEL_AIO_STATE_ABORTED; + req[i].result->returnValue = ret; + + id_state[id_index] = ORBIS_KERNEL_AIO_STATE_ABORTED; + + } else { + req[i].result->state = ORBIS_KERNEL_AIO_STATE_COMPLETED; + req[i].result->returnValue = ret; + id_state[id_index] = ORBIS_KERNEL_AIO_STATE_COMPLETED; + } + + id[i] = id_index; + id_index = (id_index + 1) % MAX_QUEUE; + + if (!id_index) + id_index++; + } + return 0; +} + +s32 PS4_SYSV_ABI sceKernelAioSetParam() { + LOG_ERROR(Kernel, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI sceKernelAioInitializeParam() { + LOG_ERROR(Kernel, "(STUBBED) called"); + return ORBIS_OK; +} + +void RegisterAio(Core::Loader::SymbolsResolver* sym) { + id_index = 1; + id_state = (int*)malloc(sizeof(int) * MAX_QUEUE); + memset(id_state, 0, sizeof(sizeof(int) * MAX_QUEUE)); + + LIB_FUNCTION("fR521KIGgb8", "libkernel", 1, "libkernel", 1, 1, sceKernelAioCancelRequest); + LIB_FUNCTION("3Lca1XBrQdY", "libkernel", 1, "libkernel", 1, 1, sceKernelAioCancelRequests); + LIB_FUNCTION("5TgME6AYty4", "libkernel", 1, "libkernel", 1, 1, sceKernelAioDeleteRequest); + LIB_FUNCTION("Ft3EtsZzAoY", "libkernel", 1, "libkernel", 1, 1, sceKernelAioDeleteRequests); + LIB_FUNCTION("vYU8P9Td2Zo", "libkernel", 1, "libkernel", 1, 1, sceKernelAioInitializeImpl); + LIB_FUNCTION("nu4a0-arQis", "libkernel", 1, "libkernel", 1, 1, sceKernelAioInitializeParam); + LIB_FUNCTION("2pOuoWoCxdk", "libkernel", 1, "libkernel", 1, 1, sceKernelAioPollRequest); + LIB_FUNCTION("o7O4z3jwKzo", "libkernel", 1, "libkernel", 1, 1, sceKernelAioPollRequests); + LIB_FUNCTION("9WK-vhNXimw", "libkernel", 1, "libkernel", 1, 1, sceKernelAioSetParam); + LIB_FUNCTION("HgX7+AORI58", "libkernel", 1, "libkernel", 1, 1, sceKernelAioSubmitReadCommands); + LIB_FUNCTION("lXT0m3P-vs4", "libkernel", 1, "libkernel", 1, 1, + sceKernelAioSubmitReadCommandsMultiple); + LIB_FUNCTION("XQ8C8y+de+E", "libkernel", 1, "libkernel", 1, 1, sceKernelAioSubmitWriteCommands); + LIB_FUNCTION("xT3Cpz0yh6Y", "libkernel", 1, "libkernel", 1, 1, + sceKernelAioSubmitWriteCommandsMultiple); + LIB_FUNCTION("KOF-oJbQVvc", "libkernel", 1, "libkernel", 1, 1, sceKernelAioWaitRequest); + LIB_FUNCTION("lgK+oIWkJyA", "libkernel", 1, "libkernel", 1, 1, sceKernelAioWaitRequests); +} + +} // namespace Libraries::Kernel \ No newline at end of file diff --git a/src/core/libraries/kernel/aio.h b/src/core/libraries/kernel/aio.h new file mode 100644 index 000000000..0ad21e938 --- /dev/null +++ b/src/core/libraries/kernel/aio.h @@ -0,0 +1,43 @@ +// SPDX-FileCopyrightText: Copyright 2024 shadPS4 Emulator Project +// SPDX-License-Identifier: GPL-2.0-or-later + +#pragma once + +#include +#include +#include +#include +#include + +#include "common/types.h" + +namespace Core::Loader { +class SymbolsResolver; +} + +namespace Libraries::Kernel { + +enum AioState { + ORBIS_KERNEL_AIO_STATE_SUBMITTED = 1, + ORBIS_KERNEL_AIO_STATE_PROCESSING = 2, + ORBIS_KERNEL_AIO_STATE_COMPLETED = 3, + ORBIS_KERNEL_AIO_STATE_ABORTED = 4 +}; + +struct OrbisKernelAioResult { + s64 returnValue; + u32 state; +}; + +typedef s32 OrbisKernelAioSubmitId; + +struct OrbisKernelAioRWRequest { + s64 offset; + s64 nbyte; + void* buf; + OrbisKernelAioResult* result; + s32 fd; +}; + +void RegisterAio(Core::Loader::SymbolsResolver* sym); +} // namespace Libraries::Kernel \ No newline at end of file diff --git a/src/core/libraries/kernel/equeue.cpp b/src/core/libraries/kernel/equeue.cpp index 64d4966c0..a4916208a 100644 --- a/src/core/libraries/kernel/equeue.cpp +++ b/src/core/libraries/kernel/equeue.cpp @@ -84,7 +84,11 @@ bool EqueueInternal::TriggerEvent(u64 ident, s16 filter, void* trigger_data) { std::scoped_lock lock{m_mutex}; for (auto& event : m_events) { if (event.event.ident == ident && event.event.filter == filter) { - event.Trigger(trigger_data); + if (filter == SceKernelEvent::Filter::VideoOut) { + event.TriggerDisplay(trigger_data); + } else { + event.Trigger(trigger_data); + } has_found = true; } } diff --git a/src/core/libraries/kernel/equeue.h b/src/core/libraries/kernel/equeue.h index 2db5e6ca7..11c09bb37 100644 --- a/src/core/libraries/kernel/equeue.h +++ b/src/core/libraries/kernel/equeue.h @@ -9,6 +9,7 @@ #include #include +#include "common/rdtsc.h" #include "common/types.h" namespace Core::Loader { @@ -81,6 +82,25 @@ struct EqueueEvent { event.data = reinterpret_cast(data); } + void TriggerDisplay(void* data) { + is_triggered = true; + auto hint = reinterpret_cast(data); + if (hint != 0) { + auto hint_h = static_cast(hint >> 8) & 0xFFFFFF; + auto ident_h = static_cast(event.ident >> 40); + if ((static_cast(hint) & 0xFF) == event.ident && event.ident != 0xFE && + ((hint_h ^ ident_h) & 0xFF) == 0) { + auto time = Common::FencedRDTSC(); + auto mask = 0xF000; + if ((static_cast(event.data) & 0xF000) != 0xF000) { + mask = (static_cast(event.data) + 0x1000) & 0xF000; + } + event.data = (mask | static_cast(static_cast(time) & 0xFFF) | + (hint & 0xFFFFFFFFFFFF0000)); + } + } + } + bool IsTriggered() const { return is_triggered; } diff --git a/src/core/libraries/kernel/file_system.cpp b/src/core/libraries/kernel/file_system.cpp index 57efbb631..3321559ed 100644 --- a/src/core/libraries/kernel/file_system.cpp +++ b/src/core/libraries/kernel/file_system.cpp @@ -8,11 +8,17 @@ #include "common/logging/log.h" #include "common/scope_exit.h" #include "common/singleton.h" +#include "core/devices/console_device.h" +#include "core/devices/deci_tty6_device.h" #include "core/devices/logger.h" #include "core/devices/nop_device.h" +#include "core/devices/random_device.h" +#include "core/devices/srandom_device.h" +#include "core/devices/urandom_device.h" #include "core/file_sys/fs.h" #include "core/libraries/kernel/file_system.h" #include "core/libraries/kernel/orbis_error.h" +#include "core/libraries/kernel/posix_error.h" #include "core/libraries/libs.h" #include "core/memory.h" #include "kernel.h" @@ -41,23 +47,18 @@ static std::map available_device = { {"/dev/deci_stderr", GET_DEVICE_FD(2)}, {"/dev/null", GET_DEVICE_FD(0)}, // fd0 (stdin) is a nop device + + {"/dev/urandom", &D::URandomDevice::Create }, + {"/dev/random", &D::RandomDevice::Create }, + {"/dev/srandom", &D::SRandomDevice::Create }, + {"/dev/console", &D::ConsoleDevice::Create }, + {"/dev/deci_tty6",&D::DeciTty6Device::Create } // clang-format on }; namespace Libraries::Kernel { -auto GetDirectoryEntries(const std::filesystem::path& path) { - std::vector files; - for (const auto& entry : std::filesystem::directory_iterator(path)) { - auto& dir_entry = files.emplace_back(); - dir_entry.name = entry.path().filename().string(); - dir_entry.isFile = !std::filesystem::is_directory(entry.path().string()); - } - - return files; -} - -int PS4_SYSV_ABI sceKernelOpen(const char* raw_path, int flags, u16 mode) { +s32 PS4_SYSV_ABI open(const char* raw_path, s32 flags, u16 mode) { LOG_INFO(Kernel_Fs, "path = {} flags = {:#x} mode = {}", raw_path, flags, mode); auto* h = Common::Singleton::Instance(); auto* mnt = Common::Singleton::Instance(); @@ -78,17 +79,6 @@ int PS4_SYSV_ABI sceKernelOpen(const char* raw_path, int flags, u16 mode) { bool directory = (flags & ORBIS_KERNEL_O_DIRECTORY) != 0; std::string_view path{raw_path}; - - if (path == "/dev/console") { - return 2000; - } - if (path == "/dev/deci_tty6") { - return 2001; - } - if (path == "/dev/urandom") { - return 2003; - } - u32 handle = h->CreateHandle(); auto* file = h->GetFile(handle); @@ -110,76 +100,105 @@ int PS4_SYSV_ABI sceKernelOpen(const char* raw_path, int flags, u16 mode) { file->m_host_name = mnt->GetHostPath(file->m_guest_name); if (!std::filesystem::is_directory(file->m_host_name)) { // directory doesn't exist h->DeleteHandle(handle); - return ORBIS_KERNEL_ERROR_ENOTDIR; + *__Error() = POSIX_ENOENT; + return -1; } else { if (create) { return handle; // dir already exists } else { - file->dirents = GetDirectoryEntries(file->m_host_name); + mnt->IterateDirectory(file->m_guest_name, + [&file](const auto& ent_path, const auto ent_is_file) { + auto& dir_entry = file->dirents.emplace_back(); + dir_entry.name = ent_path.filename().string(); + dir_entry.isFile = ent_is_file; + }); file->dirents_index = 0; } } } else { file->m_guest_name = path; file->m_host_name = mnt->GetHostPath(file->m_guest_name); + bool exists = std::filesystem::exists(file->m_host_name); int e = 0; - if (read) { - e = file->f.Open(file->m_host_name, Common::FS::FileAccessMode::Read); - } else if (write && (create || truncate)) { - e = file->f.Open(file->m_host_name, Common::FS::FileAccessMode::Write); - } else if (write && create && append) { // CUSA04729 (appends app0/shaderlist.txt) - e = file->f.Open(file->m_host_name, Common::FS::FileAccessMode::Append); - } else if (rdwr) { - if (create) { // Create an empty file first. - Common::FS::IOFile out(file->m_host_name, Common::FS::FileAccessMode::Write); + + if (create) { + if (excl && exists) { + // Error if file exists + h->DeleteHandle(handle); + *__Error() = POSIX_EEXIST; + return -1; } - // RW, then scekernelWrite is called and savedata is written just fine now. - e = file->f.Open(file->m_host_name, Common::FS::FileAccessMode::ReadWrite); - } else if (write) { - e = file->f.Open(file->m_host_name, Common::FS::FileAccessMode::Write); - } else { - UNREACHABLE(); - } - if (e != 0) { + // Create file if it doesn't exist + Common::FS::IOFile out(file->m_host_name, Common::FS::FileAccessMode::Write); + } else if (!exists) { + // File to open doesn't exist, return ENOENT h->DeleteHandle(handle); - return ErrnoToSceKernelError(e); + *__Error() = POSIX_ENOENT; + return -1; + } + + if (read) { + // Read only + e = file->f.Open(file->m_host_name, Common::FS::FileAccessMode::Read); + } else if (write) { + // Write only + if (append) { + e = file->f.Open(file->m_host_name, Common::FS::FileAccessMode::Append); + } else { + e = file->f.Open(file->m_host_name, Common::FS::FileAccessMode::Write); + } + } else if (rdwr) { + // Read and write + if (append) { + e = file->f.Open(file->m_host_name, Common::FS::FileAccessMode::Append); + } else { + e = file->f.Open(file->m_host_name, Common::FS::FileAccessMode::ReadWrite); + } + } else { + // Invalid flags + *__Error() = POSIX_EINVAL; + return -1; + } + + if (truncate && e == 0) { + // If the file was opened successfully and truncate was enabled, reduce size to 0 + file->f.SetSize(0); + } + + if (e != 0) { + // Open failed in platform-specific code, errno needs to be converted. + h->DeleteHandle(handle); + SetPosixErrno(e); + return -1; } } file->is_opened = true; return handle; } -int PS4_SYSV_ABI posix_open(const char* path, int flags, /* SceKernelMode*/ u16 mode) { - LOG_INFO(Kernel_Fs, "posix open redirect to sceKernelOpen"); - int result = sceKernelOpen(path, flags, mode); - // Posix calls different only for their return values +s32 PS4_SYSV_ABI posix_open(const char* filename, s32 flags, u16 mode) { + return open(filename, flags, mode); +} + +s32 PS4_SYSV_ABI sceKernelOpen(const char* path, s32 flags, /* SceKernelMode*/ u16 mode) { + s32 result = open(path, flags, mode); if (result < 0) { - ErrSceToPosix(result); - return -1; + LOG_ERROR(Kernel_Fs, "error = {}", *__Error()); + return ErrnoToSceKernelError(*__Error()); } return result; } -int PS4_SYSV_ABI open(const char* filename, const char* mode) { - LOG_INFO(Kernel_Fs, "open redirect to sceKernelOpen"); - int result = sceKernelOpen(filename, ORBIS_KERNEL_O_RDWR, 0); - if (result < 0) { - return -1; - } - return result; -} - -int PS4_SYSV_ABI sceKernelClose(int d) { - if (d < 3) { // d probably hold an error code - return ORBIS_KERNEL_ERROR_EPERM; - } - if (d == 2003) { // dev/urandom case - return ORBIS_OK; +s32 PS4_SYSV_ABI close(s32 fd) { + if (fd < 3) { + // This is technically possible, but it's usually caused by some stubbed function instead. + LOG_WARNING(Kernel_Fs, "called on an std handle, fd = {}", fd); } auto* h = Common::Singleton::Instance(); - auto* file = h->GetFile(d); + auto* file = h->GetFile(fd); if (file == nullptr) { - return ORBIS_KERNEL_ERROR_EBADF; + *__Error() = POSIX_EBADF; + return -1; } if (file->type == Core::FileSys::FileType::Regular) { file->f.Close(); @@ -187,63 +206,54 @@ int PS4_SYSV_ABI sceKernelClose(int d) { file->is_opened = false; LOG_INFO(Kernel_Fs, "Closing {}", file->m_guest_name); // FIXME: Lock file mutex before deleting it? - h->DeleteHandle(d); + h->DeleteHandle(fd); return ORBIS_OK; } -int PS4_SYSV_ABI posix_close(int d) { - int result = sceKernelClose(d); +s32 PS4_SYSV_ABI posix_close(s32 fd) { + return close(fd); +} + +s32 PS4_SYSV_ABI sceKernelClose(s32 fd) { + s32 result = close(fd); if (result < 0) { - LOG_ERROR(Kernel_Pthread, "posix_close: error = {}", result); - ErrSceToPosix(result); - return -1; + LOG_ERROR(Kernel_Fs, "error = {}", *__Error()); + return ErrnoToSceKernelError(*__Error()); } return result; } -s64 PS4_SYSV_ABI sceKernelWrite(int d, const void* buf, size_t nbytes) { +s64 PS4_SYSV_ABI write(s32 fd, const void* buf, size_t nbytes) { auto* h = Common::Singleton::Instance(); - auto* file = h->GetFile(d); + auto* file = h->GetFile(fd); if (file == nullptr) { - return ORBIS_KERNEL_ERROR_EBADF; + *__Error() = POSIX_EBADF; + return -1; } std::scoped_lock lk{file->m_mutex}; if (file->type == Core::FileSys::FileType::Device) { - return file->device->write(buf, nbytes); + s64 result = file->device->write(buf, nbytes); + if (result < 0) { + ErrSceToPosix(result); + return -1; + } + return result; } return file->f.WriteRaw(buf, nbytes); } -int PS4_SYSV_ABI sceKernelUnlink(const char* path) { - if (path == nullptr) { - return ORBIS_KERNEL_ERROR_EINVAL; +s64 PS4_SYSV_ABI posix_write(s32 fd, const void* buf, size_t nbytes) { + return write(fd, buf, nbytes); +} + +s64 PS4_SYSV_ABI sceKernelWrite(s32 fd, const void* buf, size_t nbytes) { + s64 result = write(fd, buf, nbytes); + if (result < 0) { + LOG_ERROR(Kernel_Fs, "error = {}", *__Error()); + return ErrnoToSceKernelError(*__Error()); } - - auto* h = Common::Singleton::Instance(); - auto* mnt = Common::Singleton::Instance(); - - bool ro = false; - const auto host_path = mnt->GetHostPath(path, &ro); - if (host_path.empty()) { - return ORBIS_KERNEL_ERROR_EACCES; - } - - if (ro) { - return ORBIS_KERNEL_ERROR_EROFS; - } - - if (std::filesystem::is_directory(host_path)) { - return ORBIS_KERNEL_ERROR_EPERM; - } - - auto* file = h->GetFile(host_path); - if (file != nullptr) { - file->f.Unlink(); - } - - LOG_INFO(Kernel_Fs, "Unlinked {}", path); - return ORBIS_OK; + return result; } size_t ReadFile(Common::FS::IOFile& file, void* buf, size_t nbytes) { @@ -255,65 +265,97 @@ size_t ReadFile(Common::FS::IOFile& file, void* buf, size_t nbytes) { return file.ReadRaw(buf, nbytes); } -size_t PS4_SYSV_ABI _readv(int d, const SceKernelIovec* iov, int iovcnt) { +size_t PS4_SYSV_ABI readv(s32 fd, const SceKernelIovec* iov, s32 iovcnt) { auto* h = Common::Singleton::Instance(); - auto* file = h->GetFile(d); + auto* file = h->GetFile(fd); if (file == nullptr) { - return ORBIS_KERNEL_ERROR_EBADF; + *__Error() = POSIX_EBADF; + return -1; } std::scoped_lock lk{file->m_mutex}; if (file->type == Core::FileSys::FileType::Device) { - int r = file->device->readv(iov, iovcnt); - if (r < 0) { - ErrSceToPosix(r); + size_t result = file->device->readv(iov, iovcnt); + if (result < 0) { + ErrSceToPosix(result); return -1; } - return r; + return result; } size_t total_read = 0; - for (int i = 0; i < iovcnt; i++) { + for (s32 i = 0; i < iovcnt; i++) { total_read += ReadFile(file->f, iov[i].iov_base, iov[i].iov_len); } return total_read; } -size_t PS4_SYSV_ABI _writev(int fd, const SceKernelIovec* iov, int iovcn) { - if (fd == 1) { - size_t total_written = 0; - for (int i = 0; i < iovcn; i++) { - total_written += ::fwrite(iov[i].iov_base, 1, iov[i].iov_len, stdout); - } - return total_written; +size_t PS4_SYSV_ABI posix_readv(s32 fd, const SceKernelIovec* iov, s32 iovcnt) { + return readv(fd, iov, iovcnt); +} + +size_t PS4_SYSV_ABI sceKernelReadv(s32 fd, const SceKernelIovec* iov, s32 iovcnt) { + size_t result = readv(fd, iov, iovcnt); + if (result < 0) { + LOG_ERROR(Kernel_Fs, "error = {}", *__Error()); + return ErrnoToSceKernelError(*__Error()); } + return result; +} + +size_t PS4_SYSV_ABI writev(s32 fd, const SceKernelIovec* iov, s32 iovcnt) { auto* h = Common::Singleton::Instance(); auto* file = h->GetFile(fd); if (file == nullptr) { - return ORBIS_KERNEL_ERROR_EBADF; + *__Error() = POSIX_EBADF; + return -1; } std::scoped_lock lk{file->m_mutex}; if (file->type == Core::FileSys::FileType::Device) { - return file->device->writev(iov, iovcn); + size_t result = file->device->writev(iov, iovcnt); + if (result < 0) { + ErrSceToPosix(result); + return -1; + } + return result; } size_t total_written = 0; - for (int i = 0; i < iovcn; i++) { + for (s32 i = 0; i < iovcnt; i++) { total_written += file->f.WriteRaw(iov[i].iov_base, iov[i].iov_len); } return total_written; } -s64 PS4_SYSV_ABI sceKernelLseek(int d, s64 offset, int whence) { +size_t PS4_SYSV_ABI posix_writev(s32 fd, const SceKernelIovec* iov, s32 iovcnt) { + return writev(fd, iov, iovcnt); +} + +size_t PS4_SYSV_ABI sceKernelWritev(s32 fd, const SceKernelIovec* iov, s32 iovcnt) { + size_t result = writev(fd, iov, iovcnt); + if (result < 0) { + LOG_ERROR(Kernel_Fs, "error = {}", *__Error()); + return ErrnoToSceKernelError(*__Error()); + } + return result; +} + +s64 PS4_SYSV_ABI posix_lseek(s32 fd, s64 offset, s32 whence) { auto* h = Common::Singleton::Instance(); - auto* file = h->GetFile(d); + auto* file = h->GetFile(fd); if (file == nullptr) { - return ORBIS_KERNEL_ERROR_EBADF; + *__Error() = POSIX_EBADF; + return -1; } std::scoped_lock lk{file->m_mutex}; if (file->type == Core::FileSys::FileType::Device) { - return file->device->lseek(offset, whence); + s64 result = file->device->lseek(offset, whence); + if (result < 0) { + ErrSceToPosix(result); + return -1; + } + return result; } Common::FS::SeekOrigin origin{}; @@ -323,60 +365,82 @@ s64 PS4_SYSV_ABI sceKernelLseek(int d, s64 offset, int whence) { origin = Common::FS::SeekOrigin::CurrentPosition; } else if (whence == 2) { origin = Common::FS::SeekOrigin::End; + } else if (whence == 3) { + origin = Common::FS::SeekOrigin::SeekHole; + } else if (whence == 4) { + origin = Common::FS::SeekOrigin::SeekData; + } else { + // whence parameter is invalid + *__Error() = POSIX_EINVAL; + return -1; } if (!file->f.Seek(offset, origin)) { - LOG_CRITICAL(Kernel_Fs, "sceKernelLseek: failed to seek"); - return ORBIS_KERNEL_ERROR_EINVAL; + if (errno != 0) { + // Seek failed in platform-specific code, errno needs to be converted. + SetPosixErrno(errno); + return -1; + } + // Shouldn't be possible, but just in case. + return -1; } - return file->f.Tell(); -} -s64 PS4_SYSV_ABI posix_lseek(int d, s64 offset, int whence) { - s64 result = sceKernelLseek(d, offset, whence); + s64 result = file->f.Tell(); if (result < 0) { - LOG_ERROR(Kernel_Pthread, "posix_lseek: error = {}", result); - ErrSceToPosix(result); + // Tell failed in platform-specific code, errno needs to be converted. + SetPosixErrno(errno); return -1; } return result; } -s64 PS4_SYSV_ABI sceKernelRead(int d, void* buf, size_t nbytes) { - if (d == 2003) // dev urandom case - { - auto rbuf = static_cast(buf); - for (size_t i = 0; i < nbytes; i++) - rbuf[i] = std::rand() & 0xFF; - return nbytes; +s64 PS4_SYSV_ABI sceKernelLseek(s32 fd, s64 offset, s32 whence) { + s64 result = posix_lseek(fd, offset, whence); + if (result < 0) { + LOG_ERROR(Kernel_Fs, "error = {}", *__Error()); + return ErrnoToSceKernelError(*__Error()); } + return result; +} + +s64 PS4_SYSV_ABI read(s32 fd, void* buf, size_t nbytes) { auto* h = Common::Singleton::Instance(); - auto* file = h->GetFile(d); + auto* file = h->GetFile(fd); if (file == nullptr) { - return ORBIS_KERNEL_ERROR_EBADF; + *__Error() = POSIX_EBADF; + return -1; } std::scoped_lock lk{file->m_mutex}; if (file->type == Core::FileSys::FileType::Device) { - return file->device->read(buf, nbytes); + s64 result = file->device->read(buf, nbytes); + if (result < 0) { + ErrSceToPosix(result); + return -1; + } + return result; } return ReadFile(file->f, buf, nbytes); } -int PS4_SYSV_ABI posix_read(int d, void* buf, size_t nbytes) { - int result = sceKernelRead(d, buf, nbytes); +s64 PS4_SYSV_ABI posix_read(s32 fd, void* buf, size_t nbytes) { + return read(fd, buf, nbytes); +} + +s64 PS4_SYSV_ABI sceKernelRead(s32 fd, void* buf, size_t nbytes) { + s64 result = read(fd, buf, nbytes); if (result < 0) { - LOG_ERROR(Kernel_Pthread, "posix_read: error = {}", result); - ErrSceToPosix(result); - return -1; + LOG_ERROR(Kernel_Fs, "error = {}", *__Error()); + return ErrnoToSceKernelError(*__Error()); } return result; } -int PS4_SYSV_ABI sceKernelMkdir(const char* path, u16 mode) { +s32 PS4_SYSV_ABI posix_mkdir(const char* path, u16 mode) { LOG_INFO(Kernel_Fs, "path = {} mode = {}", path, mode); if (path == nullptr) { - return ORBIS_KERNEL_ERROR_EINVAL; + *__Error() = POSIX_ENOTDIR; + return -1; } auto* mnt = Common::Singleton::Instance(); @@ -384,88 +448,79 @@ int PS4_SYSV_ABI sceKernelMkdir(const char* path, u16 mode) { const auto dir_name = mnt->GetHostPath(path, &ro); if (std::filesystem::exists(dir_name)) { - return ORBIS_KERNEL_ERROR_EEXIST; + *__Error() = POSIX_EEXIST; + return -1; } if (ro) { - return ORBIS_KERNEL_ERROR_EROFS; + *__Error() = POSIX_EROFS; + return -1; } // CUSA02456: path = /aotl after sceSaveDataMount(mode = 1) std::error_code ec; if (dir_name.empty() || !std::filesystem::create_directory(dir_name, ec)) { - return ORBIS_KERNEL_ERROR_EIO; + *__Error() = POSIX_EIO; + return -1; } if (!std::filesystem::exists(dir_name)) { - return ORBIS_KERNEL_ERROR_ENOENT; + *__Error() = POSIX_ENOENT; + return -1; } return ORBIS_OK; } -int PS4_SYSV_ABI posix_mkdir(const char* path, u16 mode) { - int result = sceKernelMkdir(path, mode); +s32 PS4_SYSV_ABI sceKernelMkdir(const char* path, u16 mode) { + s32 result = posix_mkdir(path, mode); if (result < 0) { - LOG_ERROR(Kernel_Pthread, "posix_mkdir: error = {}", result); - ErrSceToPosix(result); - return -1; + LOG_ERROR(Kernel_Fs, "error = {}", *__Error()); + return ErrnoToSceKernelError(*__Error()); } return result; } -int PS4_SYSV_ABI sceKernelRmdir(const char* path) { +s32 PS4_SYSV_ABI posix_rmdir(const char* path) { auto* mnt = Common::Singleton::Instance(); bool ro = false; const std::filesystem::path dir_name = mnt->GetHostPath(path, &ro); - if (dir_name.empty()) { - LOG_ERROR(Kernel_Fs, "Failed to remove directory: {}, permission denied", - fmt::UTF(dir_name.u8string())); - return ORBIS_KERNEL_ERROR_EACCES; + if (dir_name.empty() || !std::filesystem::is_directory(dir_name)) { + *__Error() = POSIX_ENOTDIR; + return -1; } if (ro) { - LOG_ERROR(Kernel_Fs, "Failed to remove directory: {}, directory is read only", - fmt::UTF(dir_name.u8string())); - return ORBIS_KERNEL_ERROR_EROFS; - } - - if (!std::filesystem::is_directory(dir_name)) { - LOG_ERROR(Kernel_Fs, "Failed to remove directory: {}, path is not a directory", - fmt::UTF(dir_name.u8string())); - return ORBIS_KERNEL_ERROR_ENOTDIR; + *__Error() = POSIX_EROFS; + return -1; } if (!std::filesystem::exists(dir_name)) { - LOG_ERROR(Kernel_Fs, "Failed to remove directory: {}, no such file or directory", - fmt::UTF(dir_name.u8string())); - return ORBIS_KERNEL_ERROR_ENOENT; + *__Error() = POSIX_ENOENT; + return -1; } std::error_code ec; - int result = std::filesystem::remove_all(dir_name, ec); + s32 result = std::filesystem::remove_all(dir_name, ec); - if (!ec) { - LOG_INFO(Kernel_Fs, "Removed directory: {}", fmt::UTF(dir_name.u8string())); - return ORBIS_OK; + if (ec) { + *__Error() = POSIX_EIO; + return -1; } - LOG_ERROR(Kernel_Fs, "Failed to remove directory: {}, error_code={}", - fmt::UTF(dir_name.u8string()), ec.message()); - return ErrnoToSceKernelError(ec.value()); + return ORBIS_OK; } -int PS4_SYSV_ABI posix_rmdir(const char* path) { - int result = sceKernelRmdir(path); +s32 PS4_SYSV_ABI sceKernelRmdir(const char* path) { + s32 result = posix_rmdir(path); if (result < 0) { - LOG_ERROR(Kernel_Pthread, "posix_rmdir: error = {}", result); - ErrSceToPosix(result); - return -1; + LOG_ERROR(Kernel_Fs, "error = {}", *__Error()); + return ErrnoToSceKernelError(*__Error()); } return result; } -int PS4_SYSV_ABI sceKernelStat(const char* path, OrbisKernelStat* sb) { +s32 PS4_SYSV_ABI posix_stat(const char* path, OrbisKernelStat* sb) { LOG_INFO(Kernel_Fs, "(PARTIAL) path = {}", path); auto* mnt = Common::Singleton::Instance(); bool ro = false; @@ -474,7 +529,8 @@ int PS4_SYSV_ABI sceKernelStat(const char* path, OrbisKernelStat* sb) { const bool is_dir = std::filesystem::is_directory(path_name); const bool is_file = std::filesystem::is_regular_file(path_name); if (!is_dir && !is_file) { - return ORBIS_KERNEL_ERROR_ENOENT; + *__Error() = POSIX_ENOENT; + return -1; } if (std::filesystem::is_directory(path_name)) { sb->st_mode = 0000777u | 0040000u; @@ -484,7 +540,7 @@ int PS4_SYSV_ABI sceKernelStat(const char* path, OrbisKernelStat* sb) { // TODO incomplete } else { sb->st_mode = 0000777u | 0100000u; - sb->st_size = static_cast(std::filesystem::file_size(path_name)); + sb->st_size = static_cast(std::filesystem::file_size(path_name)); sb->st_blksize = 512; sb->st_blocks = (sb->st_size + 511) / 512; // TODO incomplete @@ -496,17 +552,16 @@ int PS4_SYSV_ABI sceKernelStat(const char* path, OrbisKernelStat* sb) { return ORBIS_OK; } -int PS4_SYSV_ABI posix_stat(const char* path, OrbisKernelStat* sb) { - int result = sceKernelStat(path, sb); +s32 PS4_SYSV_ABI sceKernelStat(const char* path, OrbisKernelStat* sb) { + s32 result = posix_stat(path, sb); if (result < 0) { - LOG_ERROR(Kernel_Pthread, "posix_stat: error = {}", result); - ErrSceToPosix(result); - return -1; + LOG_ERROR(Kernel_Fs, "error = {}", *__Error()); + return ErrnoToSceKernelError(*__Error()); } return result; } -int PS4_SYSV_ABI sceKernelCheckReachability(const char* path) { +s32 PS4_SYSV_ABI sceKernelCheckReachability(const char* path) { auto* mnt = Common::Singleton::Instance(); std::string_view guest_path{path}; for (const auto& prefix : available_device | std::views::keys) { @@ -521,23 +576,165 @@ int PS4_SYSV_ABI sceKernelCheckReachability(const char* path) { return ORBIS_OK; } -s64 PS4_SYSV_ABI sceKernelPreadv(int d, SceKernelIovec* iov, int iovcnt, s64 offset) { - if (d < 3) { - return ORBIS_KERNEL_ERROR_EPERM; +s32 PS4_SYSV_ABI fstat(s32 fd, OrbisKernelStat* sb) { + LOG_INFO(Kernel_Fs, "(PARTIAL) fd = {}", fd); + if (sb == nullptr) { + *__Error() = POSIX_EFAULT; + return -1; } + auto* h = Common::Singleton::Instance(); + auto* file = h->GetFile(fd); + if (file == nullptr) { + *__Error() = POSIX_EBADF; + return -1; + } + std::memset(sb, 0, sizeof(OrbisKernelStat)); + + switch (file->type) { + case Core::FileSys::FileType::Device: { + s32 result = file->device->fstat(sb); + if (result < 0) { + ErrSceToPosix(result); + return -1; + } + return result; + } + case Core::FileSys::FileType::Regular: { + sb->st_mode = 0000777u | 0100000u; + sb->st_size = file->f.GetSize(); + sb->st_blksize = 512; + sb->st_blocks = (sb->st_size + 511) / 512; + // TODO incomplete + break; + } + case Core::FileSys::FileType::Directory: { + sb->st_mode = 0000777u | 0040000u; + sb->st_size = 0; + sb->st_blksize = 512; + sb->st_blocks = 0; + // TODO incomplete + break; + } + default: + UNREACHABLE(); + } + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI posix_fstat(s32 fd, OrbisKernelStat* sb) { + return fstat(fd, sb); +} + +s32 PS4_SYSV_ABI sceKernelFstat(s32 fd, OrbisKernelStat* sb) { + s32 result = fstat(fd, sb); + if (result < 0) { + LOG_ERROR(Kernel_Fs, "error = {}", *__Error()); + return ErrnoToSceKernelError(*__Error()); + } + return result; +} + +s32 PS4_SYSV_ABI posix_ftruncate(s32 fd, s64 length) { + auto* h = Common::Singleton::Instance(); + auto* file = h->GetFile(fd); + + if (file == nullptr) { + *__Error() = POSIX_EBADF; + return -1; + } + + if (file->type == Core::FileSys::FileType::Device) { + s32 result = file->device->ftruncate(length); + if (result < 0) { + ErrSceToPosix(result); + return -1; + } + return result; + } + + if (file->m_host_name.empty()) { + *__Error() = POSIX_EACCES; + return -1; + } + + file->f.SetSize(length); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI sceKernelFtruncate(s32 fd, s64 length) { + s32 result = posix_ftruncate(fd, length); + if (result < 0) { + LOG_ERROR(Kernel_Fs, "error = {}", *__Error()); + return ErrnoToSceKernelError(*__Error()); + } + return result; +} + +s32 PS4_SYSV_ABI posix_rename(const char* from, const char* to) { + auto* mnt = Common::Singleton::Instance(); + bool ro = false; + const auto src_path = mnt->GetHostPath(from, &ro); + if (!std::filesystem::exists(src_path)) { + *__Error() = POSIX_ENOENT; + return -1; + } + if (ro) { + *__Error() = POSIX_EROFS; + return -1; + } + const auto dst_path = mnt->GetHostPath(to, &ro); + if (ro) { + *__Error() = POSIX_EROFS; + return -1; + } + const bool src_is_dir = std::filesystem::is_directory(src_path); + const bool dst_is_dir = std::filesystem::is_directory(dst_path); + if (src_is_dir && !dst_is_dir) { + *__Error() = POSIX_ENOTDIR; + return -1; + } + if (!src_is_dir && dst_is_dir) { + *__Error() = POSIX_EISDIR; + return -1; + } + if (dst_is_dir && !std::filesystem::is_empty(dst_path)) { + *__Error() = POSIX_ENOTEMPTY; + return -1; + } + std::filesystem::copy(src_path, dst_path, std::filesystem::copy_options::overwrite_existing); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI sceKernelRename(const char* from, const char* to) { + s32 result = posix_rename(from, to); + if (result < 0) { + LOG_ERROR(Kernel_Fs, "error = {}", *__Error()); + return ErrnoToSceKernelError(*__Error()); + } + return result; +} + +s64 PS4_SYSV_ABI posix_preadv(s32 fd, SceKernelIovec* iov, s32 iovcnt, s64 offset) { if (offset < 0) { - return ORBIS_KERNEL_ERROR_EINVAL; + *__Error() = POSIX_EINVAL; + return -1; } auto* h = Common::Singleton::Instance(); - auto* file = h->GetFile(d); + auto* file = h->GetFile(fd); if (file == nullptr) { - return ORBIS_KERNEL_ERROR_EBADF; + *__Error() = POSIX_EBADF; + return -1; } std::scoped_lock lk{file->m_mutex}; if (file->type == Core::FileSys::FileType::Device) { - return file->device->preadv(iov, iovcnt, offset); + s64 result = file->device->preadv(iov, iovcnt, offset); + if (result < 0) { + ErrSceToPosix(result); + return -1; + } + return result; } const s64 pos = file->f.Tell(); @@ -545,8 +742,8 @@ s64 PS4_SYSV_ABI sceKernelPreadv(int d, SceKernelIovec* iov, int iovcnt, s64 off file->f.Seek(pos); }; if (!file->f.Seek(offset)) { - LOG_CRITICAL(Kernel_Fs, "failed to seek"); - return ORBIS_KERNEL_ERROR_EINVAL; + *__Error() = POSIX_EIO; + return -1; } size_t total_read = 0; for (int i = 0; i < iovcnt; i++) { @@ -555,118 +752,72 @@ s64 PS4_SYSV_ABI sceKernelPreadv(int d, SceKernelIovec* iov, int iovcnt, s64 off return total_read; } -s64 PS4_SYSV_ABI sceKernelPread(int d, void* buf, size_t nbytes, s64 offset) { - SceKernelIovec iovec{buf, nbytes}; - return sceKernelPreadv(d, &iovec, 1, offset); -} - -int PS4_SYSV_ABI sceKernelFStat(int fd, OrbisKernelStat* sb) { - LOG_INFO(Kernel_Fs, "(PARTIAL) fd = {}", fd); - if (fd < 3) { - return ORBIS_KERNEL_ERROR_EPERM; - } - if (sb == nullptr) { - return ORBIS_KERNEL_ERROR_EFAULT; - } - auto* h = Common::Singleton::Instance(); - auto* file = h->GetFile(fd); - if (file == nullptr) { - return ORBIS_KERNEL_ERROR_EBADF; - } - std::memset(sb, 0, sizeof(OrbisKernelStat)); - - switch (file->type) { - case Core::FileSys::FileType::Device: - return file->device->fstat(sb); - case Core::FileSys::FileType::Regular: - sb->st_mode = 0000777u | 0100000u; - sb->st_size = file->f.GetSize(); - sb->st_blksize = 512; - sb->st_blocks = (sb->st_size + 511) / 512; - // TODO incomplete - break; - case Core::FileSys::FileType::Directory: - sb->st_mode = 0000777u | 0040000u; - sb->st_size = 0; - sb->st_blksize = 512; - sb->st_blocks = 0; - // TODO incomplete - break; - default: - UNREACHABLE(); - } - return ORBIS_OK; -} - -int PS4_SYSV_ABI posix_fstat(int fd, OrbisKernelStat* sb) { - int result = sceKernelFStat(fd, sb); +s64 PS4_SYSV_ABI sceKernelPreadv(s32 fd, SceKernelIovec* iov, s32 iovcnt, s64 offset) { + s64 result = posix_preadv(fd, iov, iovcnt, offset); if (result < 0) { - LOG_ERROR(Kernel_Pthread, "posix_fstat: error = {}", result); - ErrSceToPosix(result); - return -1; + LOG_ERROR(Kernel_Fs, "error = {}", *__Error()); + return ErrnoToSceKernelError(*__Error()); } return result; } -s32 PS4_SYSV_ABI sceKernelFsync(int fd) { +s64 PS4_SYSV_ABI posix_pread(s32 fd, void* buf, size_t nbytes, s64 offset) { + SceKernelIovec iovec{buf, nbytes}; + return posix_preadv(fd, &iovec, 1, offset); +} + +s64 PS4_SYSV_ABI sceKernelPread(s32 fd, void* buf, size_t nbytes, s64 offset) { + SceKernelIovec iovec{buf, nbytes}; + return sceKernelPreadv(fd, &iovec, 1, offset); +} + +s32 PS4_SYSV_ABI posix_fsync(s32 fd) { auto* h = Common::Singleton::Instance(); auto* file = h->GetFile(fd); if (file == nullptr) { - return ORBIS_KERNEL_ERROR_EBADF; + *__Error() = POSIX_EBADF; + return -1; } if (file->type == Core::FileSys::FileType::Device) { - return file->device->fsync(); + s32 result = file->device->fsync(); + if (result < 0) { + ErrSceToPosix(result); + return -1; + } + return result; } file->f.Flush(); return ORBIS_OK; } -s32 PS4_SYSV_ABI posix_fsync(int fd) { - s32 result = sceKernelFsync(fd); +s32 PS4_SYSV_ABI sceKernelFsync(s32 fd) { + s32 result = posix_fsync(fd); if (result < 0) { - LOG_ERROR(Kernel_Pthread, "posix_fsync: error = {}", result); - ErrSceToPosix(result); - return -1; + LOG_ERROR(Kernel_Fs, "error = {}", *__Error()); + return ErrnoToSceKernelError(*__Error()); } return result; } -int PS4_SYSV_ABI sceKernelFtruncate(int fd, s64 length) { - auto* h = Common::Singleton::Instance(); - auto* file = h->GetFile(fd); - - if (file == nullptr) { - return ORBIS_KERNEL_ERROR_EBADF; - } - - if (file->type == Core::FileSys::FileType::Device) { - return file->device->ftruncate(length); - } - - if (file->m_host_name.empty()) { - return ORBIS_KERNEL_ERROR_EACCES; - } - - file->f.SetSize(length); - return ORBIS_OK; -} - -static int GetDents(int fd, char* buf, int nbytes, s64* basep) { - if (fd < 3) { - return ORBIS_KERNEL_ERROR_EBADF; - } - +static s32 GetDents(s32 fd, char* buf, s32 nbytes, s64* basep) { if (buf == nullptr) { - return ORBIS_KERNEL_ERROR_EFAULT; + *__Error() = POSIX_EFAULT; + return -1; } auto* h = Common::Singleton::Instance(); auto* file = h->GetFile(fd); if (file == nullptr) { - return ORBIS_KERNEL_ERROR_EBADF; + *__Error() = POSIX_EBADF; + return -1; } if (file->type == Core::FileSys::FileType::Device) { - return file->device->getdents(buf, nbytes, basep); + s32 result = file->device->getdents(buf, nbytes, basep); + if (result < 0) { + ErrSceToPosix(result); + return -1; + } + return result; } if (file->dirents_index == file->dirents.size()) { @@ -674,7 +825,8 @@ static int GetDents(int fd, char* buf, int nbytes, s64* basep) { } if (file->type != Core::FileSys::FileType::Directory || nbytes < 512 || file->dirents_index > file->dirents.size()) { - return ORBIS_KERNEL_ERROR_EINVAL; + *__Error() = POSIX_EINVAL; + return -1; } const auto& entry = file->dirents.at(file->dirents_index++); auto str = entry.name; @@ -695,173 +847,178 @@ static int GetDents(int fd, char* buf, int nbytes, s64* basep) { return sizeof(OrbisKernelDirent); } -static int HandleSeparateUpdateDents(int fd, char* buf, int nbytes, s64* basep) { - int dir_entries = 0; - - auto* h = Common::Singleton::Instance(); - auto* mnt = Common::Singleton::Instance(); - auto* file = h->GetFile(fd); - auto update_dir_name = std::string{fmt::UTF(file->m_host_name.u8string()).data}; - auto mount = mnt->GetMountFromHostPath(update_dir_name); - auto suffix = std::string{fmt::UTF(mount->host_path.u8string()).data}; - - size_t pos = update_dir_name.find("-UPDATE"); - if (pos != std::string::npos) { - update_dir_name.erase(pos, 7); - auto guest_name = mount->mount + "/" + update_dir_name.substr(suffix.size() + 1); - int descriptor; - - auto existent_folder = h->GetFile(update_dir_name); - if (!existent_folder) { - u32 handle = h->CreateHandle(); - auto* new_file = h->GetFile(handle); - new_file->type = Core::FileSys::FileType::Directory; - new_file->m_guest_name = guest_name; - new_file->m_host_name = update_dir_name; - if (!std::filesystem::is_directory(new_file->m_host_name)) { - h->DeleteHandle(handle); - return dir_entries; - } else { - new_file->dirents = GetDirectoryEntries(new_file->m_host_name); - new_file->dirents_index = 0; - } - new_file->is_opened = true; - descriptor = h->GetFileDescriptor(new_file); - } else { - descriptor = h->GetFileDescriptor(existent_folder); - } - - dir_entries = GetDents(descriptor, buf, nbytes, basep); - if (dir_entries == ORBIS_OK && existent_folder) { - existent_folder->dirents_index = 0; - file->dirents_index = 0; - } - } - - return dir_entries; +s32 PS4_SYSV_ABI posix_getdents(s32 fd, char* buf, s32 nbytes) { + return GetDents(fd, buf, nbytes, nullptr); } -int PS4_SYSV_ABI sceKernelGetdents(int fd, char* buf, int nbytes) { - int a = GetDents(fd, buf, nbytes, nullptr); - if (a == ORBIS_OK) { - return HandleSeparateUpdateDents(fd, buf, nbytes, nullptr); +s32 PS4_SYSV_ABI sceKernelGetdents(s32 fd, char* buf, s32 nbytes) { + s32 result = GetDents(fd, buf, nbytes, nullptr); + if (result < 0) { + LOG_ERROR(Kernel_Fs, "error = {}", *__Error()); + return ErrnoToSceKernelError(*__Error()); } - return a; + return result; } -int PS4_SYSV_ABI sceKernelGetdirentries(int fd, char* buf, int nbytes, s64* basep) { - int a = GetDents(fd, buf, nbytes, basep); - if (a == ORBIS_OK) { - return HandleSeparateUpdateDents(fd, buf, nbytes, basep); - } - return a; +s32 PS4_SYSV_ABI getdirentries(s32 fd, char* buf, s32 nbytes, s64* basep) { + return GetDents(fd, buf, nbytes, basep); } -s64 PS4_SYSV_ABI sceKernelPwrite(int d, void* buf, size_t nbytes, s64 offset) { - if (d < 3) { - return ORBIS_KERNEL_ERROR_EPERM; +s32 PS4_SYSV_ABI posix_getdirentries(s32 fd, char* buf, s32 nbytes, s64* basep) { + return GetDents(fd, buf, nbytes, basep); +} + +s32 PS4_SYSV_ABI sceKernelGetdirentries(s32 fd, char* buf, s32 nbytes, s64* basep) { + s32 result = GetDents(fd, buf, nbytes, basep); + if (result < 0) { + LOG_ERROR(Kernel_Fs, "error = {}", *__Error()); + return ErrnoToSceKernelError(*__Error()); } + return result; +} + +s64 PS4_SYSV_ABI posix_pwrite(s32 fd, void* buf, size_t nbytes, s64 offset) { if (offset < 0) { - return ORBIS_KERNEL_ERROR_EINVAL; + *__Error() = POSIX_EINVAL; + return -1; } auto* h = Common::Singleton::Instance(); - auto* file = h->GetFile(d); + auto* file = h->GetFile(fd); if (file == nullptr) { - return ORBIS_KERNEL_ERROR_EBADF; + *__Error() = POSIX_EBADF; + return -1; } std::scoped_lock lk{file->m_mutex}; if (file->type == Core::FileSys::FileType::Device) { - return file->device->pwrite(buf, nbytes, offset); + s64 result = file->device->pwrite(buf, nbytes, offset); + if (result < 0) { + ErrSceToPosix(result); + return -1; + } + return result; } const s64 pos = file->f.Tell(); SCOPE_EXIT { file->f.Seek(pos); }; if (!file->f.Seek(offset)) { - LOG_CRITICAL(Kernel_Fs, "sceKernelPwrite: failed to seek"); - return ORBIS_KERNEL_ERROR_EINVAL; + *__Error() = POSIX_EIO; + return -1; } return file->f.WriteRaw(buf, nbytes); } -s32 PS4_SYSV_ABI sceKernelRename(const char* from, const char* to) { +s64 PS4_SYSV_ABI sceKernelPwrite(s32 fd, void* buf, size_t nbytes, s64 offset) { + s64 result = posix_pwrite(fd, buf, nbytes, offset); + if (result < 0) { + LOG_ERROR(Kernel_Fs, "error = {}", *__Error()); + return ErrnoToSceKernelError(*__Error()); + } + return result; +} + +s32 PS4_SYSV_ABI posix_unlink(const char* path) { + if (path == nullptr) { + *__Error() = POSIX_EINVAL; + return -1; + } + + auto* h = Common::Singleton::Instance(); auto* mnt = Common::Singleton::Instance(); + bool ro = false; - const auto src_path = mnt->GetHostPath(from, &ro); - if (!std::filesystem::exists(src_path)) { - return ORBIS_KERNEL_ERROR_ENOENT; + const auto host_path = mnt->GetHostPath(path, &ro); + if (host_path.empty()) { + *__Error() = POSIX_ENOENT; + return -1; } + if (ro) { - return ORBIS_KERNEL_ERROR_EROFS; + *__Error() = POSIX_EROFS; + return -1; } - const auto dst_path = mnt->GetHostPath(to, &ro); - if (ro) { - return ORBIS_KERNEL_ERROR_EROFS; + + if (std::filesystem::is_directory(host_path)) { + *__Error() = POSIX_EPERM; + return -1; } - const bool src_is_dir = std::filesystem::is_directory(src_path); - const bool dst_is_dir = std::filesystem::is_directory(dst_path); - if (src_is_dir && !dst_is_dir) { - return ORBIS_KERNEL_ERROR_ENOTDIR; + + auto* file = h->GetFile(host_path); + if (file == nullptr) { + // File to unlink hasn't been opened, manually open and unlink it. + Common::FS::IOFile file(host_path, Common::FS::FileAccessMode::ReadWrite); + file.Unlink(); + } else { + file->f.Unlink(); } - if (!src_is_dir && dst_is_dir) { - return ORBIS_KERNEL_ERROR_EISDIR; - } - if (dst_is_dir && !std::filesystem::is_empty(dst_path)) { - return ORBIS_KERNEL_ERROR_ENOTEMPTY; - } - std::filesystem::copy(src_path, dst_path, std::filesystem::copy_options::overwrite_existing); + + LOG_INFO(Kernel_Fs, "Unlinked {}", path); return ORBIS_OK; } -void RegisterFileSystem(Core::Loader::SymbolsResolver* sym) { - std::srand(std::time(nullptr)); - LIB_FUNCTION("1G3lF1Gg1k8", "libkernel", 1, "libkernel", 1, 1, sceKernelOpen); - LIB_FUNCTION("wuCroIGjt2g", "libScePosix", 1, "libkernel", 1, 1, posix_open); - LIB_FUNCTION("wuCroIGjt2g", "libkernel", 1, "libkernel", 1, 1, open); - LIB_FUNCTION("UK2Tl2DWUns", "libkernel", 1, "libkernel", 1, 1, sceKernelClose); - LIB_FUNCTION("bY-PO6JhzhQ", "libkernel", 1, "libkernel", 1, 1, posix_close); - LIB_FUNCTION("bY-PO6JhzhQ", "libScePosix", 1, "libkernel", 1, 1, posix_close); - LIB_FUNCTION("4wSze92BhLI", "libkernel", 1, "libkernel", 1, 1, sceKernelWrite); +s32 PS4_SYSV_ABI sceKernelUnlink(const char* path) { + s32 result = posix_unlink(path); + if (result < 0) { + LOG_ERROR(Kernel_Fs, "error = {}", *__Error()); + return ErrnoToSceKernelError(*__Error()); + } + return result; +} - LIB_FUNCTION("+WRlkKjZvag", "libkernel", 1, "libkernel", 1, 1, _readv); - LIB_FUNCTION("YSHRBRLn2pI", "libkernel", 1, "libkernel", 1, 1, _writev); - LIB_FUNCTION("Oy6IpwgtYOk", "libkernel", 1, "libkernel", 1, 1, posix_lseek); +void RegisterFileSystem(Core::Loader::SymbolsResolver* sym) { + LIB_FUNCTION("6c3rCVE-fTU", "libkernel", 1, "libkernel", 1, 1, open); + LIB_FUNCTION("wuCroIGjt2g", "libScePosix", 1, "libkernel", 1, 1, posix_open); + LIB_FUNCTION("wuCroIGjt2g", "libkernel", 1, "libkernel", 1, 1, posix_open); + LIB_FUNCTION("1G3lF1Gg1k8", "libkernel", 1, "libkernel", 1, 1, sceKernelOpen); + LIB_FUNCTION("NNtFaKJbPt0", "libkernel", 1, "libkernel", 1, 1, close); + LIB_FUNCTION("bY-PO6JhzhQ", "libScePosix", 1, "libkernel", 1, 1, posix_close); + LIB_FUNCTION("bY-PO6JhzhQ", "libkernel", 1, "libkernel", 1, 1, posix_close); + LIB_FUNCTION("UK2Tl2DWUns", "libkernel", 1, "libkernel", 1, 1, sceKernelClose); + LIB_FUNCTION("FxVZqBAA7ks", "libkernel", 1, "libkernel", 1, 1, write); + LIB_FUNCTION("FN4gaPmuFV8", "libScePosix", 1, "libkernel", 1, 1, posix_write); + LIB_FUNCTION("FN4gaPmuFV8", "libkernel", 1, "libkernel", 1, 1, posix_write); + LIB_FUNCTION("4wSze92BhLI", "libkernel", 1, "libkernel", 1, 1, sceKernelWrite); + LIB_FUNCTION("+WRlkKjZvag", "libkernel", 1, "libkernel", 1, 1, readv); + LIB_FUNCTION("YSHRBRLn2pI", "libkernel", 1, "libkernel", 1, 1, writev); LIB_FUNCTION("Oy6IpwgtYOk", "libScePosix", 1, "libkernel", 1, 1, posix_lseek); + LIB_FUNCTION("Oy6IpwgtYOk", "libkernel", 1, "libkernel", 1, 1, posix_lseek); LIB_FUNCTION("oib76F-12fk", "libkernel", 1, "libkernel", 1, 1, sceKernelLseek); - LIB_FUNCTION("Cg4srZ6TKbU", "libkernel", 1, "libkernel", 1, 1, sceKernelRead); + LIB_FUNCTION("DRuBt2pvICk", "libkernel", 1, "libkernel", 1, 1, read); LIB_FUNCTION("AqBioC2vF3I", "libScePosix", 1, "libkernel", 1, 1, posix_read); - LIB_FUNCTION("1-LFLmRFxxM", "libkernel", 1, "libkernel", 1, 1, sceKernelMkdir); + LIB_FUNCTION("AqBioC2vF3I", "libkernel", 1, "libkernel", 1, 1, posix_read); + LIB_FUNCTION("Cg4srZ6TKbU", "libkernel", 1, "libkernel", 1, 1, sceKernelRead); LIB_FUNCTION("JGMio+21L4c", "libScePosix", 1, "libkernel", 1, 1, posix_mkdir); LIB_FUNCTION("JGMio+21L4c", "libkernel", 1, "libkernel", 1, 1, posix_mkdir); - LIB_FUNCTION("naInUjYt3so", "libkernel", 1, "libkernel", 1, 1, sceKernelRmdir); + LIB_FUNCTION("1-LFLmRFxxM", "libkernel", 1, "libkernel", 1, 1, sceKernelMkdir); LIB_FUNCTION("c7ZnT7V1B98", "libScePosix", 1, "libkernel", 1, 1, posix_rmdir); LIB_FUNCTION("c7ZnT7V1B98", "libkernel", 1, "libkernel", 1, 1, posix_rmdir); - LIB_FUNCTION("eV9wAD2riIA", "libkernel", 1, "libkernel", 1, 1, sceKernelStat); - LIB_FUNCTION("kBwCPsYX-m4", "libkernel", 1, "libkernel", 1, 1, sceKernelFStat); - LIB_FUNCTION("mqQMh1zPPT8", "libScePosix", 1, "libkernel", 1, 1, posix_fstat); - LIB_FUNCTION("mqQMh1zPPT8", "libkernel", 1, "libkernel", 1, 1, posix_fstat); - LIB_FUNCTION("VW3TVZiM4-E", "libkernel", 1, "libkernel", 1, 1, sceKernelFtruncate); - LIB_FUNCTION("52NcYU9+lEo", "libkernel", 1, "libkernel", 1, 1, sceKernelRename); - + LIB_FUNCTION("naInUjYt3so", "libkernel", 1, "libkernel", 1, 1, sceKernelRmdir); LIB_FUNCTION("E6ao34wPw+U", "libScePosix", 1, "libkernel", 1, 1, posix_stat); LIB_FUNCTION("E6ao34wPw+U", "libkernel", 1, "libkernel", 1, 1, posix_stat); - LIB_FUNCTION("+r3rMFwItV4", "libkernel", 1, "libkernel", 1, 1, sceKernelPread); - LIB_FUNCTION("yTj62I7kw4s", "libkernel", 1, "libkernel", 1, 1, sceKernelPreadv); + LIB_FUNCTION("eV9wAD2riIA", "libkernel", 1, "libkernel", 1, 1, sceKernelStat); LIB_FUNCTION("uWyW3v98sU4", "libkernel", 1, "libkernel", 1, 1, sceKernelCheckReachability); - LIB_FUNCTION("fTx66l5iWIA", "libkernel", 1, "libkernel", 1, 1, sceKernelFsync); - LIB_FUNCTION("juWbTNM+8hw", "libkernel", 1, "libkernel", 1, 1, posix_fsync); + LIB_FUNCTION("mqQMh1zPPT8", "libScePosix", 1, "libkernel", 1, 1, posix_fstat); + LIB_FUNCTION("mqQMh1zPPT8", "libkernel", 1, "libkernel", 1, 1, posix_fstat); + LIB_FUNCTION("kBwCPsYX-m4", "libkernel", 1, "libkernel", 1, 1, sceKernelFstat); + LIB_FUNCTION("ih4CD9-gghM", "libkernel", 1, "libkernel", 1, 1, posix_ftruncate); + LIB_FUNCTION("VW3TVZiM4-E", "libkernel", 1, "libkernel", 1, 1, sceKernelFtruncate); + LIB_FUNCTION("52NcYU9+lEo", "libkernel", 1, "libkernel", 1, 1, sceKernelRename); + LIB_FUNCTION("yTj62I7kw4s", "libkernel", 1, "libkernel", 1, 1, sceKernelPreadv); + LIB_FUNCTION("ezv-RSBNKqI", "libScePosix", 1, "libkernel", 1, 1, posix_pread); + LIB_FUNCTION("ezv-RSBNKqI", "libkernel", 1, "libkernel", 1, 1, posix_pread); + LIB_FUNCTION("+r3rMFwItV4", "libkernel", 1, "libkernel", 1, 1, sceKernelPread); LIB_FUNCTION("juWbTNM+8hw", "libScePosix", 1, "libkernel", 1, 1, posix_fsync); + LIB_FUNCTION("juWbTNM+8hw", "libkernel", 1, "libkernel", 1, 1, posix_fsync); + LIB_FUNCTION("fTx66l5iWIA", "libkernel", 1, "libkernel", 1, 1, sceKernelFsync); LIB_FUNCTION("j2AIqSqJP0w", "libkernel", 1, "libkernel", 1, 1, sceKernelGetdents); + LIB_FUNCTION("sfKygSjIbI8", "libkernel", 1, "libkernel", 1, 1, getdirentries); LIB_FUNCTION("taRWhTJFTgE", "libkernel", 1, "libkernel", 1, 1, sceKernelGetdirentries); + LIB_FUNCTION("C2kJ-byS5rM", "libkernel", 1, "libkernel", 1, 1, posix_pwrite); LIB_FUNCTION("nKWi-N2HBV4", "libkernel", 1, "libkernel", 1, 1, sceKernelPwrite); LIB_FUNCTION("AUXVxWeJU-A", "libkernel", 1, "libkernel", 1, 1, sceKernelUnlink); - - // openOrbis (to check if it is valid out of OpenOrbis - LIB_FUNCTION("6c3rCVE-fTU", "libkernel", 1, "libkernel", 1, 1, - posix_open); // _open should be equal to open function } } // namespace Libraries::Kernel diff --git a/src/core/libraries/kernel/file_system.h b/src/core/libraries/kernel/file_system.h index 6443962ff..77ce3ec3d 100644 --- a/src/core/libraries/kernel/file_system.h +++ b/src/core/libraries/kernel/file_system.h @@ -65,9 +65,10 @@ constexpr int ORBIS_KERNEL_O_DSYNC = 0x1000; constexpr int ORBIS_KERNEL_O_DIRECT = 0x00010000; constexpr int ORBIS_KERNEL_O_DIRECTORY = 0x00020000; -s64 PS4_SYSV_ABI sceKernelWrite(int d, const void* buf, size_t nbytes); -s64 PS4_SYSV_ABI sceKernelRead(int d, void* buf, size_t nbytes); - +s64 PS4_SYSV_ABI sceKernelWrite(s32 fd, const void* buf, size_t nbytes); +s64 PS4_SYSV_ABI sceKernelRead(s32 fd, void* buf, size_t nbytes); +s64 PS4_SYSV_ABI sceKernelPread(s32 fd, void* buf, size_t nbytes, s64 offset); +s64 PS4_SYSV_ABI sceKernelPwrite(s32 fd, void* buf, size_t nbytes, s64 offset); void RegisterFileSystem(Core::Loader::SymbolsResolver* sym); } // namespace Libraries::Kernel diff --git a/src/core/libraries/kernel/kernel.cpp b/src/core/libraries/kernel/kernel.cpp index b05c96fad..9227cf45a 100644 --- a/src/core/libraries/kernel/kernel.cpp +++ b/src/core/libraries/kernel/kernel.cpp @@ -28,6 +28,7 @@ #include #endif #include +#include "aio.h" namespace Libraries::Kernel { @@ -59,7 +60,7 @@ static void KernelServiceThread(std::stop_token stoken) { } io_context.run(); - io_context.reset(); + io_context.restart(); asio_requests = 0; } @@ -84,17 +85,23 @@ int ErrnoToSceKernelError(int error) { } void SetPosixErrno(int e) { - // Some error numbers are different between supported OSes or the PS4 + // Some error numbers are different between supported OSes switch (e) { case EPERM: g_posix_errno = POSIX_EPERM; break; - case EAGAIN: - g_posix_errno = POSIX_EAGAIN; + case ENOENT: + g_posix_errno = POSIX_ENOENT; + break; + case EDEADLK: + g_posix_errno = POSIX_EDEADLK; break; case ENOMEM: g_posix_errno = POSIX_ENOMEM; break; + case EACCES: + g_posix_errno = POSIX_EACCES; + break; case EINVAL: g_posix_errno = POSIX_EINVAL; break; @@ -104,13 +111,14 @@ void SetPosixErrno(int e) { case ERANGE: g_posix_errno = POSIX_ERANGE; break; - case EDEADLK: - g_posix_errno = POSIX_EDEADLK; + case EAGAIN: + g_posix_errno = POSIX_EAGAIN; break; case ETIMEDOUT: g_posix_errno = POSIX_ETIMEDOUT; break; default: + LOG_WARNING(Kernel, "Unhandled errno {}", e); g_posix_errno = e; } } @@ -132,14 +140,6 @@ void PS4_SYSV_ABI sceLibcHeapGetTraceInfo(HeapInfoInfo* info) { info->getSegmentInfo = 0; } -s64 PS4_SYSV_ABI ps4__write(int d, const char* buf, std::size_t nbytes) { - return sceKernelWrite(d, buf, nbytes); -} - -s64 PS4_SYSV_ABI ps4__read(int d, void* buf, u64 nbytes) { - return sceKernelRead(d, buf, nbytes); -} - struct OrbisKernelUuid { u32 timeLow; u16 timeMid; @@ -218,6 +218,7 @@ void RegisterKernel(Core::Loader::SymbolsResolver* sym) { Libraries::Kernel::RegisterEventQueue(sym); Libraries::Kernel::RegisterProcess(sym); Libraries::Kernel::RegisterException(sym); + Libraries::Kernel::RegisterAio(sym); LIB_OBJ("f7uOxY9mM1U", "libkernel", 1, "libkernel", 1, 1, &g_stack_chk_guard); LIB_FUNCTION("PfccT7qURYE", "libkernel", 1, "libkernel", 1, 1, kernel_ioctl); @@ -227,13 +228,10 @@ void RegisterKernel(Core::Loader::SymbolsResolver* sym) { LIB_FUNCTION("Xjoosiw+XPI", "libkernel", 1, "libkernel", 1, 1, sceKernelUuidCreate); LIB_FUNCTION("Ou3iL1abvng", "libkernel", 1, "libkernel", 1, 1, stack_chk_fail); LIB_FUNCTION("9BcDykPmo1I", "libkernel", 1, "libkernel", 1, 1, __Error); - LIB_FUNCTION("DRuBt2pvICk", "libkernel", 1, "libkernel", 1, 1, ps4__read); LIB_FUNCTION("k+AXqu2-eBc", "libkernel", 1, "libkernel", 1, 1, posix_getpagesize); LIB_FUNCTION("k+AXqu2-eBc", "libScePosix", 1, "libkernel", 1, 1, posix_getpagesize); LIB_FUNCTION("NWtTN10cJzE", "libSceLibcInternalExt", 1, "libSceLibcInternal", 1, 1, sceLibcHeapGetTraceInfo); - LIB_FUNCTION("FxVZqBAA7ks", "libkernel", 1, "libkernel", 1, 1, ps4__write); - LIB_FUNCTION("FN4gaPmuFV8", "libScePosix", 1, "libkernel", 1, 1, ps4__write); } } // namespace Libraries::Kernel diff --git a/src/core/libraries/kernel/kernel.h b/src/core/libraries/kernel/kernel.h index 8e7f475ad..58911727d 100644 --- a/src/core/libraries/kernel/kernel.h +++ b/src/core/libraries/kernel/kernel.h @@ -5,6 +5,7 @@ #include #include +#include "common/string_literal.h" #include "common/types.h" #include "core/libraries/kernel/orbis_error.h" @@ -18,15 +19,6 @@ void ErrSceToPosix(int result); int ErrnoToSceKernelError(int e); void SetPosixErrno(int e); -template -struct StringLiteral { - constexpr StringLiteral(const char (&str)[N]) { - std::copy_n(str, N, value); - } - - char value[N]; -}; - template struct WrapperImpl; diff --git a/src/core/libraries/kernel/memory.cpp b/src/core/libraries/kernel/memory.cpp index 8deefb496..7b3ac5646 100644 --- a/src/core/libraries/kernel/memory.cpp +++ b/src/core/libraries/kernel/memory.cpp @@ -26,17 +26,20 @@ u64 PS4_SYSV_ABI sceKernelGetDirectMemorySize() { int PS4_SYSV_ABI sceKernelAllocateDirectMemory(s64 searchStart, s64 searchEnd, u64 len, u64 alignment, int memoryType, s64* physAddrOut) { - if (searchStart < 0 || searchEnd <= searchStart) { - LOG_ERROR(Kernel_Vmm, "Provided address range is invalid!"); + if (searchStart < 0 || searchEnd < 0) { + LOG_ERROR(Kernel_Vmm, "Invalid parameters!"); return ORBIS_KERNEL_ERROR_EINVAL; } - const bool is_in_range = searchEnd - searchStart >= len; - if (len <= 0 || !Common::Is16KBAligned(len) || !is_in_range) { - LOG_ERROR(Kernel_Vmm, "Provided address range is invalid!"); + if (len <= 0 || !Common::Is16KBAligned(len)) { + LOG_ERROR(Kernel_Vmm, "Length {:#x} is invalid!", len); return ORBIS_KERNEL_ERROR_EINVAL; } if (alignment != 0 && !Common::Is16KBAligned(alignment)) { - LOG_ERROR(Kernel_Vmm, "Alignment value is invalid!"); + LOG_ERROR(Kernel_Vmm, "Alignment {:#x} is invalid!", alignment); + return ORBIS_KERNEL_ERROR_EINVAL; + } + if (memoryType > 10) { + LOG_ERROR(Kernel_Vmm, "Memory type {:#x} is invalid!", memoryType); return ORBIS_KERNEL_ERROR_EINVAL; } if (physAddrOut == nullptr) { @@ -44,8 +47,21 @@ int PS4_SYSV_ABI sceKernelAllocateDirectMemory(s64 searchStart, s64 searchEnd, u return ORBIS_KERNEL_ERROR_EINVAL; } + const bool is_in_range = searchEnd - searchStart >= len; + if (searchEnd <= searchStart || searchEnd < len || !is_in_range) { + LOG_ERROR(Kernel_Vmm, + "Provided address range is too small!" + " searchStart = {:#x}, searchEnd = {:#x}, length = {:#x}", + searchStart, searchEnd, len); + return ORBIS_KERNEL_ERROR_EAGAIN; + } + auto* memory = Core::Memory::Instance(); PAddr phys_addr = memory->Allocate(searchStart, searchEnd, len, alignment, memoryType); + if (phys_addr == -1) { + return ORBIS_KERNEL_ERROR_EAGAIN; + } + *physAddrOut = static_cast(phys_addr); LOG_INFO(Kernel_Vmm, @@ -63,6 +79,9 @@ s32 PS4_SYSV_ABI sceKernelAllocateMainDirectMemory(size_t len, size_t alignment, } s32 PS4_SYSV_ABI sceKernelCheckedReleaseDirectMemory(u64 start, size_t len) { + if (len == 0) { + return ORBIS_OK; + } LOG_INFO(Kernel_Vmm, "called start = {:#x}, len = {:#x}", start, len); auto* memory = Core::Memory::Instance(); memory->Free(start, len); @@ -70,6 +89,9 @@ s32 PS4_SYSV_ABI sceKernelCheckedReleaseDirectMemory(u64 start, size_t len) { } s32 PS4_SYSV_ABI sceKernelReleaseDirectMemory(u64 start, size_t len) { + if (len == 0) { + return ORBIS_OK; + } auto* memory = Core::Memory::Instance(); memory->Free(start, len); return ORBIS_OK; @@ -147,6 +169,11 @@ s32 PS4_SYSV_ABI sceKernelReserveVirtualRange(void** addr, u64 len, int flags, u int PS4_SYSV_ABI sceKernelMapNamedDirectMemory(void** addr, u64 len, int prot, int flags, s64 directMemoryStart, u64 alignment, const char* name) { + LOG_INFO(Kernel_Vmm, + "in_addr = {}, len = {:#x}, prot = {:#x}, flags = {:#x}, " + "directMemoryStart = {:#x}, alignment = {:#x}, name = '{}'", + fmt::ptr(*addr), len, prot, flags, directMemoryStart, alignment, name); + if (len == 0 || !Common::Is16KBAligned(len)) { LOG_ERROR(Kernel_Vmm, "Map size is either zero or not 16KB aligned!"); return ORBIS_KERNEL_ERROR_EINVAL; @@ -165,17 +192,14 @@ int PS4_SYSV_ABI sceKernelMapNamedDirectMemory(void** addr, u64 len, int prot, i const VAddr in_addr = reinterpret_cast(*addr); const auto mem_prot = static_cast(prot); const auto map_flags = static_cast(flags); - SCOPE_EXIT { - LOG_INFO(Kernel_Vmm, - "in_addr = {:#x}, out_addr = {}, len = {:#x}, prot = {:#x}, flags = {:#x}, " - "directMemoryStart = {:#x}, " - "alignment = {:#x}", - in_addr, fmt::ptr(*addr), len, prot, flags, directMemoryStart, alignment); - }; auto* memory = Core::Memory::Instance(); - return memory->MapMemory(addr, in_addr, len, mem_prot, map_flags, Core::VMAType::Direct, "", - false, directMemoryStart, alignment); + const auto ret = + memory->MapMemory(addr, in_addr, len, mem_prot, map_flags, Core::VMAType::Direct, "", false, + directMemoryStart, alignment); + + LOG_INFO(Kernel_Vmm, "out_addr = {}", fmt::ptr(*addr)); + return ret; } int PS4_SYSV_ABI sceKernelMapDirectMemory(void** addr, u64 len, int prot, int flags, @@ -489,7 +513,7 @@ s32 PS4_SYSV_ABI sceKernelConfiguredFlexibleMemorySize(u64* sizeOut) { int PS4_SYSV_ABI sceKernelMunmap(void* addr, size_t len) { LOG_INFO(Kernel_Vmm, "addr = {}, len = {:#x}", fmt::ptr(addr), len); if (len == 0) { - return ORBIS_OK; + return ORBIS_KERNEL_ERROR_EINVAL; } auto* memory = Core::Memory::Instance(); return memory->UnmapMemory(std::bit_cast(addr), len); diff --git a/src/core/libraries/kernel/process.cpp b/src/core/libraries/kernel/process.cpp index 97cc01ebc..d61ee37ac 100644 --- a/src/core/libraries/kernel/process.cpp +++ b/src/core/libraries/kernel/process.cpp @@ -13,8 +13,8 @@ namespace Libraries::Kernel { int PS4_SYSV_ABI sceKernelIsNeoMode() { - LOG_DEBUG(Kernel_Sce, "called"); - return Config::isNeoMode(); + return Config::isNeoModeConsole() && + Common::ElfInfo::Instance().GetPSFAttributes().support_neo_mode; } int PS4_SYSV_ABI sceKernelGetCompiledSdkVersion(int* ver) { @@ -32,49 +32,52 @@ void* PS4_SYSV_ABI sceKernelGetProcParam() { return linker->GetProcParam(); } -s32 PS4_SYSV_ABI sceKernelLoadStartModule(const char* moduleFileName, size_t args, const void* argp, +s32 PS4_SYSV_ABI sceKernelLoadStartModule(const char* moduleFileName, u64 args, const void* argp, u32 flags, const void* pOpt, int* pRes) { LOG_INFO(Lib_Kernel, "called filename = {}, args = {}", moduleFileName, args); - - if (flags != 0) { - return ORBIS_KERNEL_ERROR_EINVAL; - } + ASSERT(flags == 0); auto* mnt = Common::Singleton::Instance(); - const auto path = mnt->GetHostPath(moduleFileName); - - // Load PRX module and relocate any modules that import it. auto* linker = Common::Singleton::Instance(); - u32 handle = linker->FindByName(path); - if (handle != -1) { - return handle; - } - handle = linker->LoadModule(path, true); - if (handle == -1) { - return ORBIS_KERNEL_ERROR_ESRCH; - } - auto* module = linker->GetModule(handle); - linker->RelocateAnyImports(module); - // If the new module has a TLS image, trigger its load when TlsGetAddr is called. - if (module->tls.image_size != 0) { - linker->AdvanceGenerationCounter(); + std::filesystem::path path; + std::string guest_path(moduleFileName); + + s32 handle = -1; + + if (guest_path[0] == '/') { + // try load /system/common/lib/ +path + // try load /system/priv/lib/ +path + path = mnt->GetHostPath(guest_path); + handle = linker->LoadAndStartModule(path, args, argp, pRes); + if (handle != -1) + return handle; + } else { + if (!guest_path.contains('/')) { + path = mnt->GetHostPath("/app0/" + guest_path); + handle = linker->LoadAndStartModule(path, args, argp, pRes); + if (handle != -1) + return handle; + // if ((flags & 0x10000) != 0) + // try load /system/priv/lib/ +basename + // try load /system/common/lib/ +basename + } else { + path = mnt->GetHostPath(guest_path); + handle = linker->LoadAndStartModule(path, args, argp, pRes); + if (handle != -1) + return handle; + } } - // Retrieve and verify proc param according to libkernel. - u64* param = module->GetProcParam(); - ASSERT_MSG(!param || param[0] >= 0x18, "Invalid module param size: {}", param[0]); - s32 ret = module->Start(args, argp, param); - if (pRes) { - *pRes = ret; - } - - return handle; + return ORBIS_KERNEL_ERROR_ENOENT; } s32 PS4_SYSV_ABI sceKernelDlsym(s32 handle, const char* symbol, void** addrp) { auto* linker = Common::Singleton::Instance(); auto* module = linker->GetModule(handle); + if (module == nullptr) { + return ORBIS_KERNEL_ERROR_ESRCH; + } *addrp = module->FindByName(symbol); if (*addrp == nullptr) { return ORBIS_KERNEL_ERROR_ESRCH; @@ -82,19 +85,7 @@ s32 PS4_SYSV_ABI sceKernelDlsym(s32 handle, const char* symbol, void** addrp) { return ORBIS_OK; } -static constexpr size_t ORBIS_DBG_MAX_NAME_LENGTH = 256; - -struct OrbisModuleInfoForUnwind { - u64 st_size; - std::array name; - VAddr eh_frame_hdr_addr; - VAddr eh_frame_addr; - u64 eh_frame_size; - VAddr seg0_addr; - u64 seg0_size; -}; - -s32 PS4_SYSV_ABI sceKernelGetModuleInfoForUnwind(VAddr addr, int flags, +s32 PS4_SYSV_ABI sceKernelGetModuleInfoForUnwind(VAddr addr, s32 flags, OrbisModuleInfoForUnwind* info) { if (flags >= 3) { std::memset(info, 0, sizeof(OrbisModuleInfoForUnwind)); diff --git a/src/core/libraries/kernel/process.h b/src/core/libraries/kernel/process.h index 0340a9793..09e4276fb 100644 --- a/src/core/libraries/kernel/process.h +++ b/src/core/libraries/kernel/process.h @@ -11,10 +11,25 @@ class SymbolsResolver; namespace Libraries::Kernel { +static constexpr size_t ORBIS_DBG_MAX_NAME_LENGTH = 256; + +struct OrbisModuleInfoForUnwind { + u64 st_size; + std::array name; + VAddr eh_frame_hdr_addr; + VAddr eh_frame_addr; + u64 eh_frame_size; + VAddr seg0_addr; + u64 seg0_size; +}; + int PS4_SYSV_ABI sceKernelIsNeoMode(); int PS4_SYSV_ABI sceKernelGetCompiledSdkVersion(int* ver); +s32 PS4_SYSV_ABI sceKernelGetModuleInfoForUnwind(VAddr addr, s32 flags, + OrbisModuleInfoForUnwind* info); + void RegisterProcess(Core::Loader::SymbolsResolver* sym); } // namespace Libraries::Kernel diff --git a/src/core/libraries/kernel/threads/condvar.cpp b/src/core/libraries/kernel/threads/condvar.cpp index 853526559..0b0545ace 100644 --- a/src/core/libraries/kernel/threads/condvar.cpp +++ b/src/core/libraries/kernel/threads/condvar.cpp @@ -339,6 +339,8 @@ int PS4_SYSV_ABI posix_pthread_condattr_setpshared(PthreadCondAttrT* attr, int p void RegisterCond(Core::Loader::SymbolsResolver* sym) { // Posix LIB_FUNCTION("mKoTx03HRWA", "libScePosix", 1, "libkernel", 1, 1, posix_pthread_condattr_init); + LIB_FUNCTION("dJcuQVn6-Iw", "libScePosix", 1, "libkernel", 1, 1, + posix_pthread_condattr_destroy); LIB_FUNCTION("0TyVk4MSLt0", "libScePosix", 1, "libkernel", 1, 1, posix_pthread_cond_init); LIB_FUNCTION("2MOy+rUfuhQ", "libScePosix", 1, "libkernel", 1, 1, posix_pthread_cond_signal); LIB_FUNCTION("RXXqi4CtF8w", "libScePosix", 1, "libkernel", 1, 1, posix_pthread_cond_destroy); @@ -347,8 +349,11 @@ void RegisterCond(Core::Loader::SymbolsResolver* sym) { LIB_FUNCTION("mkx2fVhNMsg", "libScePosix", 1, "libkernel", 1, 1, posix_pthread_cond_broadcast); // Posix-Kernel + LIB_FUNCTION("0TyVk4MSLt0", "libkernel", 1, "libkernel", 1, 1, posix_pthread_cond_init); LIB_FUNCTION("Op8TBGY5KHg", "libkernel", 1, "libkernel", 1, 1, posix_pthread_cond_wait); LIB_FUNCTION("mkx2fVhNMsg", "libkernel", 1, "libkernel", 1, 1, posix_pthread_cond_broadcast); + LIB_FUNCTION("mKoTx03HRWA", "libkernel", 1, "libkernel", 1, 1, posix_pthread_condattr_init); + LIB_FUNCTION("dJcuQVn6-Iw", "libkernel", 1, "libkernel", 1, 1, posix_pthread_condattr_destroy); // Orbis LIB_FUNCTION("2Tb92quprl0", "libkernel", 1, "libkernel", 1, 1, ORBIS(scePthreadCondInit)); diff --git a/src/core/libraries/kernel/threads/exception.cpp b/src/core/libraries/kernel/threads/exception.cpp index cc391e928..5e2f35d69 100644 --- a/src/core/libraries/kernel/threads/exception.cpp +++ b/src/core/libraries/kernel/threads/exception.cpp @@ -153,6 +153,11 @@ int PS4_SYSV_ABI sceKernelDebugRaiseException() { return 0; } +int PS4_SYSV_ABI sceKernelDebugRaiseExceptionOnReleaseMode() { + UNREACHABLE(); + return 0; +} + void RegisterException(Core::Loader::SymbolsResolver* sym) { LIB_FUNCTION("il03nluKfMk", "libkernel_unity", 1, "libkernel", 1, 1, sceKernelRaiseException); LIB_FUNCTION("WkwEd3N7w0Y", "libkernel_unity", 1, "libkernel", 1, 1, @@ -160,6 +165,8 @@ void RegisterException(Core::Loader::SymbolsResolver* sym) { LIB_FUNCTION("Qhv5ARAoOEc", "libkernel_unity", 1, "libkernel", 1, 1, sceKernelRemoveExceptionHandler) LIB_FUNCTION("OMDRKKAZ8I4", "libkernel", 1, "libkernel", 1, 1, sceKernelDebugRaiseException); + LIB_FUNCTION("zE-wXIZjLoM", "libkernel", 1, "libkernel", 1, 1, + sceKernelDebugRaiseExceptionOnReleaseMode); } } // namespace Libraries::Kernel diff --git a/src/core/libraries/kernel/threads/mutex.cpp b/src/core/libraries/kernel/threads/mutex.cpp index 4f11e32da..956e5ef65 100644 --- a/src/core/libraries/kernel/threads/mutex.cpp +++ b/src/core/libraries/kernel/threads/mutex.cpp @@ -438,8 +438,11 @@ void RegisterMutex(Core::Loader::SymbolsResolver* sym) { LIB_FUNCTION("K-jXhbt2gn4", "libScePosix", 1, "libkernel", 1, 1, posix_pthread_mutex_trylock); // Posix-Kernel + LIB_FUNCTION("ttHNfU+qDBU", "libkernel", 1, "libkernel", 1, 1, posix_pthread_mutex_init); LIB_FUNCTION("7H0iTOciTLo", "libkernel", 1, "libkernel", 1, 1, posix_pthread_mutex_lock); LIB_FUNCTION("2Z+PpY6CaJg", "libkernel", 1, "libkernel", 1, 1, posix_pthread_mutex_unlock); + LIB_FUNCTION("dQHWEsJtoE4", "libkernel", 1, "libkernel", 1, 1, posix_pthread_mutexattr_init); + LIB_FUNCTION("mDmgMOGVUqg", "libkernel", 1, "libkernel", 1, 1, posix_pthread_mutexattr_settype); // Orbis LIB_FUNCTION("cmo1RIYva9o", "libkernel", 1, "libkernel", 1, 1, ORBIS(scePthreadMutexInit)); diff --git a/src/core/libraries/kernel/threads/pthread.cpp b/src/core/libraries/kernel/threads/pthread.cpp index e81207a0d..c4127ecf2 100644 --- a/src/core/libraries/kernel/threads/pthread.cpp +++ b/src/core/libraries/kernel/threads/pthread.cpp @@ -386,6 +386,12 @@ int PS4_SYSV_ABI posix_sched_get_priority_min() { } int PS4_SYSV_ABI posix_pthread_rename_np(PthreadT thread, const char* name) { + if (thread == nullptr) { + return POSIX_EINVAL; + } + if (name == nullptr) { + return 0; + } LOG_INFO(Kernel_Pthread, "name = {}", name); Common::SetThreadName(reinterpret_cast(thread->native_thr.GetHandle()), name); thread->name = name; @@ -535,6 +541,7 @@ void RegisterThread(Core::Loader::SymbolsResolver* sym) { LIB_FUNCTION("6XG4B33N09g", "libScePosix", 1, "libkernel", 1, 1, sched_yield); // Posix-Kernel + LIB_FUNCTION("Z4QosVuAsA0", "libkernel", 1, "libkernel", 1, 1, posix_pthread_once); LIB_FUNCTION("EotR8a3ASf4", "libkernel", 1, "libkernel", 1, 1, posix_pthread_self); LIB_FUNCTION("OxhIB8LB-PQ", "libkernel", 1, "libkernel", 1, 1, posix_pthread_create); diff --git a/src/core/libraries/kernel/time.cpp b/src/core/libraries/kernel/time.cpp index 2565b8078..b7e4c1756 100644 --- a/src/core/libraries/kernel/time.cpp +++ b/src/core/libraries/kernel/time.cpp @@ -5,6 +5,7 @@ #include "common/assert.h" #include "common/native_clock.h" +#include "core/libraries/kernel/kernel.h" #include "core/libraries/kernel/orbis_error.h" #include "core/libraries/kernel/time.h" #include "core/libraries/libs.h" @@ -19,6 +20,7 @@ #if __APPLE__ #include #endif +#include #include #include #include @@ -93,44 +95,189 @@ u32 PS4_SYSV_ABI sceKernelSleep(u32 seconds) { return 0; } -int PS4_SYSV_ABI sceKernelClockGettime(s32 clock_id, OrbisKernelTimespec* tp) { - if (tp == nullptr) { +#ifdef _WIN64 +#ifndef CLOCK_REALTIME +#define CLOCK_REALTIME 0 +#endif +#ifndef CLOCK_MONOTONIC +#define CLOCK_MONOTONIC 1 +#endif +#ifndef CLOCK_PROCESS_CPUTIME_ID +#define CLOCK_PROCESS_CPUTIME_ID 2 +#endif +#ifndef CLOCK_THREAD_CPUTIME_ID +#define CLOCK_THREAD_CPUTIME_ID 3 +#endif +#ifndef CLOCK_REALTIME_COARSE +#define CLOCK_REALTIME_COARSE 5 +#endif +#ifndef CLOCK_MONOTONIC_COARSE +#define CLOCK_MONOTONIC_COARSE 6 +#endif + +#define DELTA_EPOCH_IN_100NS 116444736000000000ULL + +static u64 FileTimeTo100Ns(FILETIME& ft) { + return *reinterpret_cast(&ft); +} + +static s32 clock_gettime(u32 clock_id, struct timespec* ts) { + switch (clock_id) { + case CLOCK_REALTIME: + case CLOCK_REALTIME_COARSE: { + FILETIME ft; + GetSystemTimeAsFileTime(&ft); + const u64 ns = FileTimeTo100Ns(ft) - DELTA_EPOCH_IN_100NS; + ts->tv_sec = ns / 10'000'000; + ts->tv_nsec = (ns % 10'000'000) * 100; + return 0; + } + case CLOCK_MONOTONIC: + case CLOCK_MONOTONIC_COARSE: { + static LARGE_INTEGER pf = [] { + LARGE_INTEGER res{}; + QueryPerformanceFrequency(&pf); + return res; + }(); + + LARGE_INTEGER pc{}; + QueryPerformanceCounter(&pc); + ts->tv_sec = pc.QuadPart / pf.QuadPart; + ts->tv_nsec = ((pc.QuadPart % pf.QuadPart) * 1000'000'000) / pf.QuadPart; + return 0; + } + case CLOCK_PROCESS_CPUTIME_ID: { + FILETIME ct, et, kt, ut; + if (!GetProcessTimes(GetCurrentProcess(), &ct, &et, &kt, &ut)) { + return EFAULT; + } + const u64 ns = FileTimeTo100Ns(ut) + FileTimeTo100Ns(kt); + ts->tv_sec = ns / 10'000'000; + ts->tv_nsec = (ns % 10'000'000) * 100; + return 0; + } + case CLOCK_THREAD_CPUTIME_ID: { + FILETIME ct, et, kt, ut; + if (!GetThreadTimes(GetCurrentThread(), &ct, &et, &kt, &ut)) { + return EFAULT; + } + const u64 ns = FileTimeTo100Ns(ut) + FileTimeTo100Ns(kt); + ts->tv_sec = ns / 10'000'000; + ts->tv_nsec = (ns % 10'000'000) * 100; + return 0; + } + default: + return EINVAL; + } +} +#endif + +int PS4_SYSV_ABI orbis_clock_gettime(s32 clock_id, struct OrbisKernelTimespec* ts) { + if (ts == nullptr) { return ORBIS_KERNEL_ERROR_EFAULT; } - clockid_t pclock_id = CLOCK_REALTIME; + + clockid_t pclock_id = CLOCK_MONOTONIC; switch (clock_id) { case ORBIS_CLOCK_REALTIME: case ORBIS_CLOCK_REALTIME_PRECISE: - case ORBIS_CLOCK_REALTIME_FAST: pclock_id = CLOCK_REALTIME; break; case ORBIS_CLOCK_SECOND: + case ORBIS_CLOCK_REALTIME_FAST: +#ifndef __APPLE__ + pclock_id = CLOCK_REALTIME_COARSE; +#else + pclock_id = CLOCK_REALTIME; +#endif + break; + case ORBIS_CLOCK_UPTIME: + case ORBIS_CLOCK_UPTIME_PRECISE: case ORBIS_CLOCK_MONOTONIC: case ORBIS_CLOCK_MONOTONIC_PRECISE: - case ORBIS_CLOCK_MONOTONIC_FAST: pclock_id = CLOCK_MONOTONIC; break; - default: - LOG_ERROR(Lib_Kernel, "unsupported = {} using CLOCK_REALTIME", clock_id); + case ORBIS_CLOCK_UPTIME_FAST: + case ORBIS_CLOCK_MONOTONIC_FAST: +#ifndef __APPLE__ + pclock_id = CLOCK_MONOTONIC_COARSE; +#else + pclock_id = CLOCK_MONOTONIC; +#endif break; + case ORBIS_CLOCK_THREAD_CPUTIME_ID: + pclock_id = CLOCK_THREAD_CPUTIME_ID; + break; + case ORBIS_CLOCK_PROCTIME: { + const auto us = sceKernelGetProcessTime(); + ts->tv_sec = us / 1'000'000; + ts->tv_nsec = (us % 1'000'000) * 1000; + return 0; + } + case ORBIS_CLOCK_VIRTUAL: { +#ifdef _WIN64 + FILETIME ct, et, kt, ut; + if (!GetProcessTimes(GetCurrentProcess(), &ct, &et, &kt, &ut)) { + return EFAULT; + } + const u64 ns = FileTimeTo100Ns(ut); + ts->tv_sec = ns / 10'000'000; + ts->tv_nsec = (ns % 10'000'000) * 100; +#else + struct rusage ru; + const auto res = getrusage(RUSAGE_SELF, &ru); + if (res < 0) { + return res; + } + ts->tv_sec = ru.ru_utime.tv_sec; + ts->tv_nsec = ru.ru_utime.tv_usec * 1000; +#endif + return 0; + } + case ORBIS_CLOCK_PROF: { +#ifdef _WIN64 + FILETIME ct, et, kt, ut; + if (!GetProcessTimes(GetCurrentProcess(), &ct, &et, &kt, &ut)) { + return EFAULT; + } + const u64 ns = FileTimeTo100Ns(kt); + ts->tv_sec = ns / 10'000'000; + ts->tv_nsec = (ns % 10'000'000) * 100; +#else + struct rusage ru; + const auto res = getrusage(RUSAGE_SELF, &ru); + if (res < 0) { + return res; + } + ts->tv_sec = ru.ru_stime.tv_sec; + ts->tv_nsec = ru.ru_stime.tv_usec * 1000; +#endif + return 0; + } + case ORBIS_CLOCK_EXT_NETWORK: + case ORBIS_CLOCK_EXT_DEBUG_NETWORK: + case ORBIS_CLOCK_EXT_AD_NETWORK: + case ORBIS_CLOCK_EXT_RAW_NETWORK: + pclock_id = CLOCK_MONOTONIC; + LOG_ERROR(Lib_Kernel, "unsupported = {} using CLOCK_MONOTONIC", clock_id); + break; + default: + return EINVAL; } timespec t{}; int result = clock_gettime(pclock_id, &t); - tp->tv_sec = t.tv_sec; - tp->tv_nsec = t.tv_nsec; - if (result == 0) { - return ORBIS_OK; - } - return ORBIS_KERNEL_ERROR_EINVAL; + ts->tv_sec = t.tv_sec; + ts->tv_nsec = t.tv_nsec; + return result; } -int PS4_SYSV_ABI posix_clock_gettime(s32 clock_id, OrbisKernelTimespec* time) { - int result = sceKernelClockGettime(clock_id, time); - if (result < 0) { - UNREACHABLE(); // TODO return posix error code +int PS4_SYSV_ABI sceKernelClockGettime(s32 clock_id, OrbisKernelTimespec* tp) { + const auto res = orbis_clock_gettime(clock_id, tp); + if (res < 0) { + return ErrnoToSceKernelError(res); } - return result; + return ORBIS_OK; } int PS4_SYSV_ABI posix_nanosleep(const OrbisKernelTimespec* rqtp, OrbisKernelTimespec* rmtp) { @@ -316,11 +463,11 @@ void RegisterTime(Core::Loader::SymbolsResolver* sym) { LIB_FUNCTION("yS8U2TGCe1A", "libScePosix", 1, "libkernel", 1, 1, posix_nanosleep); LIB_FUNCTION("QBi7HCK03hw", "libkernel", 1, "libkernel", 1, 1, sceKernelClockGettime); LIB_FUNCTION("kOcnerypnQA", "libkernel", 1, "libkernel", 1, 1, sceKernelGettimezone); - LIB_FUNCTION("lLMT9vJAck0", "libkernel", 1, "libkernel", 1, 1, posix_clock_gettime); - LIB_FUNCTION("lLMT9vJAck0", "libScePosix", 1, "libkernel", 1, 1, posix_clock_gettime); + LIB_FUNCTION("lLMT9vJAck0", "libkernel", 1, "libkernel", 1, 1, orbis_clock_gettime); + LIB_FUNCTION("lLMT9vJAck0", "libScePosix", 1, "libkernel", 1, 1, orbis_clock_gettime); LIB_FUNCTION("smIj7eqzZE8", "libScePosix", 1, "libkernel", 1, 1, posix_clock_getres); LIB_FUNCTION("0NTHN1NKONI", "libkernel", 1, "libkernel", 1, 1, sceKernelConvertLocaltimeToUtc); LIB_FUNCTION("-o5uEDpN+oY", "libkernel", 1, "libkernel", 1, 1, sceKernelConvertUtcToLocaltime); } -} // namespace Libraries::Kernel +} // namespace Libraries::Kernel \ No newline at end of file diff --git a/src/core/libraries/kernel/time.h b/src/core/libraries/kernel/time.h index 6aa281aaf..407b6f9ed 100644 --- a/src/core/libraries/kernel/time.h +++ b/src/core/libraries/kernel/time.h @@ -82,6 +82,7 @@ int PS4_SYSV_ABI sceKernelConvertLocaltimeToUtc(time_t param_1, int64_t param_2, int PS4_SYSV_ABI sceKernelConvertUtcToLocaltime(time_t time, time_t* local_time, OrbisTimesec* st, u64* dst_sec); +int PS4_SYSV_ABI sceKernelUsleep(u32 microseconds); void RegisterTime(Core::Loader::SymbolsResolver* sym); diff --git a/src/core/libraries/libc_internal/libc_internal.cpp b/src/core/libraries/libc_internal/libc_internal.cpp index 8453a78b9..0b374c5a2 100644 --- a/src/core/libraries/libc_internal/libc_internal.cpp +++ b/src/core/libraries/libc_internal/libc_internal.cpp @@ -1,307 +1,24 @@ // SPDX-FileCopyrightText: Copyright 2024 shadPS4 Emulator Project // SPDX-License-Identifier: GPL-2.0-or-later -#include -#include - +#include #include "common/assert.h" #include "common/logging/log.h" +#include "core/libraries/error_codes.h" #include "core/libraries/libs.h" #include "libc_internal.h" +#include "libc_internal_io.h" +#include "libc_internal_math.h" +#include "libc_internal_memory.h" +#include "libc_internal_str.h" +#include "printf.h" namespace Libraries::LibcInternal { -void* PS4_SYSV_ABI internal_memset(void* s, int c, size_t n) { - return std::memset(s, c, n); -} - -void* PS4_SYSV_ABI internal_memcpy(void* dest, const void* src, size_t n) { - return std::memcpy(dest, src, n); -} - -int PS4_SYSV_ABI internal_memcpy_s(void* dest, size_t destsz, const void* src, size_t count) { -#ifdef _WIN64 - return memcpy_s(dest, destsz, src, count); -#else - std::memcpy(dest, src, count); - return 0; // ALL OK -#endif -} - -int PS4_SYSV_ABI internal_strcpy_s(char* dest, size_t dest_size, const char* src) { -#ifdef _WIN64 - return strcpy_s(dest, dest_size, src); -#else - std::strcpy(dest, src); - return 0; // ALL OK -#endif -} - -int PS4_SYSV_ABI internal_strcat_s(char* dest, size_t dest_size, const char* src) { -#ifdef _WIN64 - return strcat_s(dest, dest_size, src); -#else - std::strcat(dest, src); - return 0; // ALL OK -#endif -} - -int PS4_SYSV_ABI internal_memcmp(const void* s1, const void* s2, size_t n) { - return std::memcmp(s1, s2, n); -} - -int PS4_SYSV_ABI internal_strcmp(const char* str1, const char* str2) { - return std::strcmp(str1, str2); -} - -int PS4_SYSV_ABI internal_strncmp(const char* str1, const char* str2, size_t num) { - return std::strncmp(str1, str2, num); -} - -size_t PS4_SYSV_ABI internal_strlen(const char* str) { - return std::strlen(str); -} - -char* PS4_SYSV_ABI internal_strncpy(char* dest, const char* src, std::size_t count) { - return std::strncpy(dest, src, count); -} - -int PS4_SYSV_ABI internal_strncpy_s(char* dest, size_t destsz, const char* src, size_t count) { -#ifdef _WIN64 - return strncpy_s(dest, destsz, src, count); -#else - std::strcpy(dest, src); - return 0; -#endif -} - -char* PS4_SYSV_ABI internal_strcat(char* dest, const char* src) { - return std::strcat(dest, src); -} - -const char* PS4_SYSV_ABI internal_strchr(const char* str, int c) { - return std::strchr(str, c); -} - -double PS4_SYSV_ABI internal_sin(double x) { - return std::sin(x); -} - -float PS4_SYSV_ABI internal_sinf(float x) { - return std::sinf(x); -} - -double PS4_SYSV_ABI internal_cos(double x) { - return std::cos(x); -} - -float PS4_SYSV_ABI internal_cosf(float x) { - return std::cosf(x); -} - -void PS4_SYSV_ABI internal_sincos(double x, double* sinp, double* cosp) { - *sinp = std::sin(x); - *cosp = std::cos(x); -} - -void PS4_SYSV_ABI internal_sincosf(float x, float* sinp, float* cosp) { - *sinp = std::sinf(x); - *cosp = std::cosf(x); -} - -double PS4_SYSV_ABI internal_tan(double x) { - return std::tan(x); -} - -float PS4_SYSV_ABI internal_tanf(float x) { - return std::tanf(x); -} - -double PS4_SYSV_ABI internal_asin(double x) { - return std::asin(x); -} - -float PS4_SYSV_ABI internal_asinf(float x) { - return std::asinf(x); -} - -double PS4_SYSV_ABI internal_acos(double x) { - return std::acos(x); -} - -float PS4_SYSV_ABI internal_acosf(float x) { - return std::acosf(x); -} - -double PS4_SYSV_ABI internal_atan(double x) { - return std::atan(x); -} - -float PS4_SYSV_ABI internal_atanf(float x) { - return std::atanf(x); -} - -double PS4_SYSV_ABI internal_atan2(double y, double x) { - return std::atan2(y, x); -} - -float PS4_SYSV_ABI internal_atan2f(float y, float x) { - return std::atan2f(y, x); -} - -double PS4_SYSV_ABI internal_exp(double x) { - return std::exp(x); -} - -float PS4_SYSV_ABI internal_expf(float x) { - return std::expf(x); -} - -double PS4_SYSV_ABI internal_exp2(double x) { - return std::exp2(x); -} - -float PS4_SYSV_ABI internal_exp2f(float x) { - return std::exp2f(x); -} - -double PS4_SYSV_ABI internal_pow(double x, double y) { - return std::pow(x, y); -} - -float PS4_SYSV_ABI internal_powf(float x, float y) { - return std::powf(x, y); -} - -double PS4_SYSV_ABI internal_log(double x) { - return std::log(x); -} - -float PS4_SYSV_ABI internal_logf(float x) { - return std::logf(x); -} - -double PS4_SYSV_ABI internal_log10(double x) { - return std::log10(x); -} - -float PS4_SYSV_ABI internal_log10f(float x) { - return std::log10f(x); -} - -void* PS4_SYSV_ABI internal_malloc(size_t size) { - return std::malloc(size); -} - -void PS4_SYSV_ABI internal_free(void* ptr) { - std::free(ptr); -} - -void* PS4_SYSV_ABI internal_operator_new(size_t size) { - if (size == 0) { - // Size of 1 is used if 0 is provided. - size = 1; - } - void* ptr = std::malloc(size); - ASSERT_MSG(ptr, "Failed to allocate new object with size {}", size); - return ptr; -} - -void PS4_SYSV_ABI internal_operator_delete(void* ptr) { - if (ptr) { - std::free(ptr); - } -} - -int PS4_SYSV_ABI internal_posix_memalign(void** ptr, size_t alignment, size_t size) { -#ifdef _WIN64 - void* allocated = _aligned_malloc(size, alignment); - if (!allocated) { - return errno; - } - *ptr = allocated; - return 0; -#else - return posix_memalign(ptr, alignment, size); -#endif -} - void RegisterlibSceLibcInternal(Core::Loader::SymbolsResolver* sym) { - LIB_FUNCTION("NFLs+dRJGNg", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1, - internal_memcpy_s); - LIB_FUNCTION("Q3VBxCXhUHs", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1, - internal_memcpy); - LIB_FUNCTION("8zTFvBIAIN8", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1, - internal_memset); - LIB_FUNCTION("5Xa2ACNECdo", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1, - internal_strcpy_s); - LIB_FUNCTION("K+gcnFFJKVc", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1, - internal_strcat_s); - LIB_FUNCTION("DfivPArhucg", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1, - internal_memcmp); - LIB_FUNCTION("aesyjrHVWy4", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1, - internal_strcmp); - LIB_FUNCTION("Ovb2dSJOAuE", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1, - internal_strncmp); - LIB_FUNCTION("j4ViWNHEgww", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1, - internal_strlen); - LIB_FUNCTION("6sJWiWSRuqk", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1, - internal_strncpy); - LIB_FUNCTION("YNzNkJzYqEg", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1, - internal_strncpy_s); - LIB_FUNCTION("Ls4tzzhimqQ", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1, - internal_strcat); - LIB_FUNCTION("ob5xAW4ln-0", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1, - internal_strchr); - LIB_FUNCTION("H8ya2H00jbI", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1, internal_sin); - LIB_FUNCTION("Q4rRL34CEeE", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1, internal_sinf); - LIB_FUNCTION("2WE3BTYVwKM", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1, internal_cos); - LIB_FUNCTION("-P6FNMzk2Kc", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1, internal_cosf); - LIB_FUNCTION("jMB7EFyu30Y", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1, - internal_sincos); - LIB_FUNCTION("pztV4AF18iI", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1, - internal_sincosf); - LIB_FUNCTION("T7uyNqP7vQA", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1, internal_tan); - LIB_FUNCTION("ZE6RNL+eLbk", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1, internal_tanf); - LIB_FUNCTION("7Ly52zaL44Q", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1, internal_asin); - LIB_FUNCTION("GZWjF-YIFFk", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1, - internal_asinf); - LIB_FUNCTION("JBcgYuW8lPU", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1, internal_acos); - LIB_FUNCTION("QI-x0SL8jhw", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1, - internal_acosf); - LIB_FUNCTION("OXmauLdQ8kY", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1, internal_atan); - LIB_FUNCTION("weDug8QD-lE", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1, - internal_atanf); - LIB_FUNCTION("HUbZmOnT-Dg", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1, - internal_atan2); - LIB_FUNCTION("EH-x713A99c", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1, - internal_atan2f); - LIB_FUNCTION("NVadfnzQhHQ", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1, internal_exp); - LIB_FUNCTION("8zsu04XNsZ4", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1, internal_expf); - LIB_FUNCTION("dnaeGXbjP6E", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1, internal_exp2); - LIB_FUNCTION("wuAQt-j+p4o", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1, - internal_exp2f); - LIB_FUNCTION("9LCjpWyQ5Zc", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1, internal_pow); - LIB_FUNCTION("1D0H2KNjshE", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1, internal_powf); - LIB_FUNCTION("rtV7-jWC6Yg", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1, internal_log); - LIB_FUNCTION("RQXLbdT2lc4", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1, internal_logf); - LIB_FUNCTION("WuMbPBKN1TU", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1, - internal_log10); - LIB_FUNCTION("lhpd6Wk6ccs", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1, - internal_log10f); - LIB_FUNCTION("gQX+4GDQjpM", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1, - internal_malloc); - LIB_FUNCTION("tIhsqj0qsFE", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1, internal_free); - LIB_FUNCTION("fJnpuVVBbKk", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1, - internal_operator_new); - LIB_FUNCTION("hdm0YfMa7TQ", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1, - internal_operator_new); - LIB_FUNCTION("MLWl90SFWNE", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1, - internal_operator_delete); - LIB_FUNCTION("z+P+xCnWLBk", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1, - internal_operator_delete); - LIB_FUNCTION("cVSk9y8URbc", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1, - internal_posix_memalign); -}; - -} // namespace Libraries::LibcInternal + RegisterlibSceLibcInternalMath(sym); + RegisterlibSceLibcInternalStr(sym); + RegisterlibSceLibcInternalMemory(sym); + RegisterlibSceLibcInternalIo(sym); +} +} // namespace Libraries::LibcInternal \ No newline at end of file diff --git a/src/core/libraries/libc_internal/libc_internal.h b/src/core/libraries/libc_internal/libc_internal.h index 819c15b4f..4f77ab79a 100644 --- a/src/core/libraries/libc_internal/libc_internal.h +++ b/src/core/libraries/libc_internal/libc_internal.h @@ -10,12 +10,9 @@ class SymbolsResolver; } namespace Libraries::LibcInternal { -void* PS4_SYSV_ABI internal_memset(void* s, int c, size_t n); -void* PS4_SYSV_ABI internal_memcpy(void* dest, const void* src, size_t n); -int PS4_SYSV_ABI internal_memcpy_s(void* dest, size_t destsz, const void* src, size_t count); -int PS4_SYSV_ABI internal_strcpy_s(char* dest, size_t dest_size, const char* src); -int PS4_SYSV_ABI internal_memcmp(const void* s1, const void* s2, size_t n); -float PS4_SYSV_ABI internal_expf(float x); + +// I won't manage definitons of 3000+ functions, and they don't need to be accessed externally, +// so everything is just in the .cpp file void RegisterlibSceLibcInternal(Core::Loader::SymbolsResolver* sym); } // namespace Libraries::LibcInternal \ No newline at end of file diff --git a/src/core/libraries/libc_internal/libc_internal_io.cpp b/src/core/libraries/libc_internal/libc_internal_io.cpp new file mode 100644 index 000000000..8814fda28 --- /dev/null +++ b/src/core/libraries/libc_internal/libc_internal_io.cpp @@ -0,0 +1,24 @@ +// SPDX-FileCopyrightText: Copyright 2024 shadPS4 Emulator Project +// SPDX-License-Identifier: GPL-2.0-or-later + +#include +#include + +#include +#include "common/assert.h" +#include "common/logging/log.h" +#include "core/libraries/error_codes.h" +#include "core/libraries/libs.h" +#include "libc_internal_io.h" +#include "printf.h" + +namespace Libraries::LibcInternal { +int PS4_SYSV_ABI internal_snprintf(char* s, size_t n, VA_ARGS) { + VA_CTX(ctx); + return snprintf_ctx(s, n, &ctx); +} +void RegisterlibSceLibcInternalIo(Core::Loader::SymbolsResolver* sym) { + LIB_FUNCTION("eLdDw6l0-bU", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1, + internal_snprintf); +} +} // namespace Libraries::LibcInternal \ No newline at end of file diff --git a/src/core/libraries/libc_internal/libc_internal_io.h b/src/core/libraries/libc_internal/libc_internal_io.h new file mode 100644 index 000000000..f5291526b --- /dev/null +++ b/src/core/libraries/libc_internal/libc_internal_io.h @@ -0,0 +1,14 @@ +// SPDX-FileCopyrightText: Copyright 2024 shadPS4 Emulator Project +// SPDX-License-Identifier: GPL-2.0-or-later + +#pragma once + +#include "common/types.h" + +namespace Core::Loader { +class SymbolsResolver; +} + +namespace Libraries::LibcInternal { +void RegisterlibSceLibcInternalIo(Core::Loader::SymbolsResolver* sym); +} // namespace Libraries::LibcInternal \ No newline at end of file diff --git a/src/core/libraries/libc_internal/libc_internal_math.cpp b/src/core/libraries/libc_internal/libc_internal_math.cpp new file mode 100644 index 000000000..5a33c0992 --- /dev/null +++ b/src/core/libraries/libc_internal/libc_internal_math.cpp @@ -0,0 +1,156 @@ +// SPDX-FileCopyrightText: Copyright 2024 shadPS4 Emulator Project +// SPDX-License-Identifier: GPL-2.0-or-later + +#include "common/assert.h" +#include "common/logging/log.h" +#include "core/libraries/error_codes.h" +#include "core/libraries/libs.h" + +namespace Libraries::LibcInternal { + +double PS4_SYSV_ABI internal_sin(double x) { + return std::sin(x); +} + +float PS4_SYSV_ABI internal_sinf(float x) { + return std::sinf(x); +} + +double PS4_SYSV_ABI internal_cos(double x) { + return std::cos(x); +} + +float PS4_SYSV_ABI internal_cosf(float x) { + return std::cosf(x); +} + +void PS4_SYSV_ABI internal_sincos(double x, double* sinp, double* cosp) { + *sinp = std::sin(x); + *cosp = std::cos(x); +} + +void PS4_SYSV_ABI internal_sincosf(float x, float* sinp, float* cosp) { + *sinp = std::sinf(x); + *cosp = std::cosf(x); +} + +double PS4_SYSV_ABI internal_tan(double x) { + return std::tan(x); +} + +float PS4_SYSV_ABI internal_tanf(float x) { + return std::tanf(x); +} + +double PS4_SYSV_ABI internal_asin(double x) { + return std::asin(x); +} + +float PS4_SYSV_ABI internal_asinf(float x) { + return std::asinf(x); +} + +double PS4_SYSV_ABI internal_acos(double x) { + return std::acos(x); +} + +float PS4_SYSV_ABI internal_acosf(float x) { + return std::acosf(x); +} + +double PS4_SYSV_ABI internal_atan(double x) { + return std::atan(x); +} + +float PS4_SYSV_ABI internal_atanf(float x) { + return std::atanf(x); +} + +double PS4_SYSV_ABI internal_atan2(double y, double x) { + return std::atan2(y, x); +} + +float PS4_SYSV_ABI internal_atan2f(float y, float x) { + return std::atan2f(y, x); +} + +double PS4_SYSV_ABI internal_exp(double x) { + return std::exp(x); +} + +float PS4_SYSV_ABI internal_expf(float x) { + return std::expf(x); +} + +double PS4_SYSV_ABI internal_exp2(double x) { + return std::exp2(x); +} + +float PS4_SYSV_ABI internal_exp2f(float x) { + return std::exp2f(x); +} + +double PS4_SYSV_ABI internal_pow(double x, double y) { + return std::pow(x, y); +} + +float PS4_SYSV_ABI internal_powf(float x, float y) { + return std::powf(x, y); +} + +double PS4_SYSV_ABI internal_log(double x) { + return std::log(x); +} + +float PS4_SYSV_ABI internal_logf(float x) { + return std::logf(x); +} + +double PS4_SYSV_ABI internal_log10(double x) { + return std::log10(x); +} + +float PS4_SYSV_ABI internal_log10f(float x) { + return std::log10f(x); +} + +void RegisterlibSceLibcInternalMath(Core::Loader::SymbolsResolver* sym) { + LIB_FUNCTION("H8ya2H00jbI", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1, internal_sin); + LIB_FUNCTION("Q4rRL34CEeE", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1, internal_sinf); + LIB_FUNCTION("2WE3BTYVwKM", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1, internal_cos); + LIB_FUNCTION("-P6FNMzk2Kc", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1, internal_cosf); + LIB_FUNCTION("jMB7EFyu30Y", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1, + internal_sincos); + LIB_FUNCTION("pztV4AF18iI", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1, + internal_sincosf); + LIB_FUNCTION("T7uyNqP7vQA", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1, internal_tan); + LIB_FUNCTION("ZE6RNL+eLbk", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1, internal_tanf); + LIB_FUNCTION("7Ly52zaL44Q", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1, internal_asin); + LIB_FUNCTION("GZWjF-YIFFk", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1, + internal_asinf); + LIB_FUNCTION("JBcgYuW8lPU", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1, internal_acos); + LIB_FUNCTION("QI-x0SL8jhw", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1, + internal_acosf); + LIB_FUNCTION("OXmauLdQ8kY", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1, internal_atan); + LIB_FUNCTION("weDug8QD-lE", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1, + internal_atanf); + LIB_FUNCTION("HUbZmOnT-Dg", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1, + internal_atan2); + LIB_FUNCTION("EH-x713A99c", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1, + internal_atan2f); + LIB_FUNCTION("NVadfnzQhHQ", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1, internal_exp); + LIB_FUNCTION("8zsu04XNsZ4", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1, internal_expf); + LIB_FUNCTION("dnaeGXbjP6E", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1, internal_exp2); + LIB_FUNCTION("wuAQt-j+p4o", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1, + internal_exp2f); + LIB_FUNCTION("9LCjpWyQ5Zc", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1, internal_pow); + LIB_FUNCTION("1D0H2KNjshE", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1, internal_powf); + LIB_FUNCTION("rtV7-jWC6Yg", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1, internal_log); + LIB_FUNCTION("RQXLbdT2lc4", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1, internal_logf); + LIB_FUNCTION("WuMbPBKN1TU", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1, + internal_log10); + LIB_FUNCTION("lhpd6Wk6ccs", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1, + internal_log10f); +} + +} // namespace Libraries::LibcInternal diff --git a/src/core/libraries/libc_internal/libc_internal_math.h b/src/core/libraries/libc_internal/libc_internal_math.h new file mode 100644 index 000000000..89b765205 --- /dev/null +++ b/src/core/libraries/libc_internal/libc_internal_math.h @@ -0,0 +1,14 @@ +// SPDX-FileCopyrightText: Copyright 2024 shadPS4 Emulator Project +// SPDX-License-Identifier: GPL-2.0-or-later + +#pragma once + +#include "common/types.h" + +namespace Core::Loader { +class SymbolsResolver; +} + +namespace Libraries::LibcInternal { +void RegisterlibSceLibcInternalMath(Core::Loader::SymbolsResolver* sym); +} // namespace Libraries::LibcInternal \ No newline at end of file diff --git a/src/core/libraries/libc_internal/libc_internal_memory.cpp b/src/core/libraries/libc_internal/libc_internal_memory.cpp new file mode 100644 index 000000000..0d8c421af --- /dev/null +++ b/src/core/libraries/libc_internal/libc_internal_memory.cpp @@ -0,0 +1,45 @@ +// SPDX-FileCopyrightText: Copyright 2024 shadPS4 Emulator Project +// SPDX-License-Identifier: GPL-2.0-or-later + +#include "common/assert.h" +#include "common/logging/log.h" +#include "core/libraries/error_codes.h" +#include "core/libraries/libs.h" +#include "libc_internal_memory.h" + +namespace Libraries::LibcInternal { + +void* PS4_SYSV_ABI internal_memset(void* s, int c, size_t n) { + return std::memset(s, c, n); +} + +void* PS4_SYSV_ABI internal_memcpy(void* dest, const void* src, size_t n) { + return std::memcpy(dest, src, n); +} + +s32 PS4_SYSV_ABI internal_memcpy_s(void* dest, size_t destsz, const void* src, size_t count) { +#ifdef _WIN64 + return memcpy_s(dest, destsz, src, count); +#else + std::memcpy(dest, src, count); + return 0; // ALL OK +#endif +} + +s32 PS4_SYSV_ABI internal_memcmp(const void* s1, const void* s2, size_t n) { + return std::memcmp(s1, s2, n); +} + +void RegisterlibSceLibcInternalMemory(Core::Loader::SymbolsResolver* sym) { + + LIB_FUNCTION("NFLs+dRJGNg", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1, + internal_memcpy_s); + LIB_FUNCTION("Q3VBxCXhUHs", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1, + internal_memcpy); + LIB_FUNCTION("8zTFvBIAIN8", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1, + internal_memset); + LIB_FUNCTION("DfivPArhucg", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1, + internal_memcmp); +} + +} // namespace Libraries::LibcInternal diff --git a/src/core/libraries/libc_internal/libc_internal_memory.h b/src/core/libraries/libc_internal/libc_internal_memory.h new file mode 100644 index 000000000..995de935b --- /dev/null +++ b/src/core/libraries/libc_internal/libc_internal_memory.h @@ -0,0 +1,14 @@ +// SPDX-FileCopyrightText: Copyright 2024 shadPS4 Emulator Project +// SPDX-License-Identifier: GPL-2.0-or-later + +#pragma once + +#include "common/types.h" + +namespace Core::Loader { +class SymbolsResolver; +} + +namespace Libraries::LibcInternal { +void RegisterlibSceLibcInternalMemory(Core::Loader::SymbolsResolver* sym); +} // namespace Libraries::LibcInternal \ No newline at end of file diff --git a/src/core/libraries/libc_internal/libc_internal_str.cpp b/src/core/libraries/libc_internal/libc_internal_str.cpp new file mode 100644 index 000000000..3283822de --- /dev/null +++ b/src/core/libraries/libc_internal/libc_internal_str.cpp @@ -0,0 +1,84 @@ +// SPDX-FileCopyrightText: Copyright 2024 shadPS4 Emulator Project +// SPDX-License-Identifier: GPL-2.0-or-later + +#include "common/assert.h" +#include "common/logging/log.h" +#include "core/libraries/error_codes.h" +#include "core/libraries/libs.h" +#include "libc_internal_str.h" + +namespace Libraries::LibcInternal { + +s32 PS4_SYSV_ABI internal_strcpy_s(char* dest, size_t dest_size, const char* src) { +#ifdef _WIN64 + return strcpy_s(dest, dest_size, src); +#else + std::strcpy(dest, src); + return 0; // ALL OK +#endif +} + +s32 PS4_SYSV_ABI internal_strcat_s(char* dest, size_t dest_size, const char* src) { +#ifdef _WIN64 + return strcat_s(dest, dest_size, src); +#else + std::strcat(dest, src); + return 0; // ALL OK +#endif +} + +s32 PS4_SYSV_ABI internal_strcmp(const char* str1, const char* str2) { + return std::strcmp(str1, str2); +} + +s32 PS4_SYSV_ABI internal_strncmp(const char* str1, const char* str2, size_t num) { + return std::strncmp(str1, str2, num); +} + +size_t PS4_SYSV_ABI internal_strlen(const char* str) { + return std::strlen(str); +} + +char* PS4_SYSV_ABI internal_strncpy(char* dest, const char* src, std::size_t count) { + return std::strncpy(dest, src, count); +} + +s32 PS4_SYSV_ABI internal_strncpy_s(char* dest, size_t destsz, const char* src, size_t count) { +#ifdef _WIN64 + return strncpy_s(dest, destsz, src, count); +#else + std::strcpy(dest, src); + return 0; +#endif +} + +char* PS4_SYSV_ABI internal_strcat(char* dest, const char* src) { + return std::strcat(dest, src); +} + +const char* PS4_SYSV_ABI internal_strchr(const char* str, int c) { + return std::strchr(str, c); +} + +void RegisterlibSceLibcInternalStr(Core::Loader::SymbolsResolver* sym) { + LIB_FUNCTION("5Xa2ACNECdo", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1, + internal_strcpy_s); + LIB_FUNCTION("K+gcnFFJKVc", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1, + internal_strcat_s); + LIB_FUNCTION("aesyjrHVWy4", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1, + internal_strcmp); + LIB_FUNCTION("Ovb2dSJOAuE", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1, + internal_strncmp); + LIB_FUNCTION("j4ViWNHEgww", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1, + internal_strlen); + LIB_FUNCTION("6sJWiWSRuqk", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1, + internal_strncpy); + LIB_FUNCTION("YNzNkJzYqEg", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1, + internal_strncpy_s); + LIB_FUNCTION("Ls4tzzhimqQ", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1, + internal_strcat); + LIB_FUNCTION("ob5xAW4ln-0", "libSceLibcInternal", 1, "libSceLibcInternal", 1, 1, + internal_strchr); +} + +} // namespace Libraries::LibcInternal diff --git a/src/core/libraries/libc_internal/libc_internal_str.h b/src/core/libraries/libc_internal/libc_internal_str.h new file mode 100644 index 000000000..26023c40e --- /dev/null +++ b/src/core/libraries/libc_internal/libc_internal_str.h @@ -0,0 +1,14 @@ +// SPDX-FileCopyrightText: Copyright 2024 shadPS4 Emulator Project +// SPDX-License-Identifier: GPL-2.0-or-later + +#pragma once + +#include "common/types.h" + +namespace Core::Loader { +class SymbolsResolver; +} + +namespace Libraries::LibcInternal { +void RegisterlibSceLibcInternalStr(Core::Loader::SymbolsResolver* sym); +} // namespace Libraries::LibcInternal \ No newline at end of file diff --git a/src/core/libraries/libc_internal/printf.h b/src/core/libraries/libc_internal/printf.h new file mode 100644 index 000000000..fe63481a0 --- /dev/null +++ b/src/core/libraries/libc_internal/printf.h @@ -0,0 +1,763 @@ +// SPDX-FileCopyrightText: Copyright 2014-2018 Marco Paland (info@paland.com) +// SPDX-License-Identifier: MIT + +/////////////////////////////////////////////////////////////////////////////// +// \author (c) Marco Paland (info@paland.com) +// 2014-2018, PALANDesign Hannover, Germany +// +// \license The MIT License (MIT) +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. +// +// \brief Tiny printf, sprintf and snprintf implementation, optimized for speed on +// embedded systems with a very limited resources. +// Use this instead of bloated standard/newlib printf. +// These routines are thread safe and reentrant! +// +/////////////////////////////////////////////////////////////////////////////// +// Vita3K emulator project +// Copyright (C) 2023 Vita3K team +// +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 2 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License along +// with this program; if not, write to the Free Software Foundation, Inc., +// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + +// copied from Vita3k project at 6/10/2023 (latest update 30/06/2023) +// modifications for adapting va_args parameters + +#pragma once + +#include + +#include +#include +#include +#include +#include +#include + +#include "common/va_ctx.h" + +namespace Libraries::LibcInternal { +// ntoa conversion buffer size, this must be big enough to hold +// one converted numeric number including padded zeros (dynamically created on stack) +// 32 byte is a good default +#define PRINTF_NTOA_BUFFER_SIZE 32U + +// ftoa conversion buffer size, this must be big enough to hold +// one converted float number including padded zeros (dynamically created on stack) +// 32 byte is a good default +#define PRINTF_FTOA_BUFFER_SIZE 32U + +// define this to support floating point (%f) +#define PRINTF_SUPPORT_FLOAT + +// define this to support long long types (%llu or %p) +#define PRINTF_SUPPORT_LONG_LONG + +// define this to support the ptrdiff_t type (%t) +// ptrdiff_t is normally defined in as long or long long type +#define PRINTF_SUPPORT_PTRDIFF_T + +/////////////////////////////////////////////////////////////////////////////// + +// internal flag definitions +#define FLAGS_ZEROPAD (1U << 0U) +#define FLAGS_LEFT (1U << 1U) +#define FLAGS_PLUS (1U << 2U) +#define FLAGS_SPACE (1U << 3U) +#define FLAGS_HASH (1U << 4U) +#define FLAGS_UPPERCASE (1U << 5U) +#define FLAGS_CHAR (1U << 6U) +#define FLAGS_SHORT (1U << 7U) +#define FLAGS_LONG (1U << 8U) +#define FLAGS_LONG_LONG (1U << 9U) +#define FLAGS_PRECISION (1U << 10U) +#define FLAGS_WIDTH (1U << 11U) + +// output function type +typedef void (*out_fct_type)(char character, void* buffer, size_t idx, size_t maxlen); + +// wrapper (used as buffer) for output function type +typedef struct { + void (*fct)(char character, void* arg); + void* arg; +} out_fct_wrap_type; + +// internal buffer output +static inline void _out_buffer(char character, void* buffer, size_t idx, size_t maxlen) { + if (idx < maxlen) { + ((char*)buffer)[idx] = character; + } +} + +// internal null output +static inline void _out_null(char character, void* buffer, size_t idx, size_t maxlen) { + (void)character; + (void)buffer; + (void)idx; + (void)maxlen; +} + +// internal output function wrapper +static inline void _out_fct(char character, void* buffer, size_t idx, size_t maxlen) { + (void)idx; + (void)maxlen; + // buffer is the output fct pointer + ((out_fct_wrap_type*)buffer)->fct(character, ((out_fct_wrap_type*)buffer)->arg); +} + +// internal strlen +// \return The length of the string (excluding the terminating 0) +static inline unsigned int _strlen(const char* str) { + const char* s; + for (s = str; *s; ++s) + ; + return (unsigned int)(s - str); +} + +// internal test if char is a digit (0-9) +// \return true if char is a digit +static inline bool _is_digit(char ch) { + return (ch >= '0') && (ch <= '9'); +} + +// internal ASCII string to unsigned int conversion +static inline unsigned int _atoi(const char** str) { + unsigned int i = 0U; + while (_is_digit(**str)) { + i = i * 10U + (unsigned int)(*((*str)++) - '0'); + } + return i; +} + +// internal itoa format +static inline size_t _ntoa_format(out_fct_type out, char* buffer, size_t idx, size_t maxlen, + char* buf, size_t len, bool negative, unsigned int base, + unsigned int prec, unsigned int width, unsigned int flags) { + const size_t start_idx = idx; + + // pad leading zeros + while (!(flags & FLAGS_LEFT) && (len < prec) && (len < PRINTF_NTOA_BUFFER_SIZE)) { + buf[len++] = '0'; + } + while (!(flags & FLAGS_LEFT) && (flags & FLAGS_ZEROPAD) && (len < width) && + (len < PRINTF_NTOA_BUFFER_SIZE)) { + buf[len++] = '0'; + } + + // handle hash + if (flags & FLAGS_HASH) { + if (((len == prec) || (len == width)) && (len > 0U)) { + len--; + if ((base == 16U) && (len > 0U)) { + len--; + } + } + if ((base == 16U) && !(flags & FLAGS_UPPERCASE) && (len < PRINTF_NTOA_BUFFER_SIZE)) { + buf[len++] = 'x'; + } + if ((base == 16U) && (flags & FLAGS_UPPERCASE) && (len < PRINTF_NTOA_BUFFER_SIZE)) { + buf[len++] = 'X'; + } + if (len < PRINTF_NTOA_BUFFER_SIZE) { + buf[len++] = '0'; + } + } + + // handle sign + if ((len == width) && (negative || (flags & FLAGS_PLUS) || (flags & FLAGS_SPACE))) { + len--; + } + if (len < PRINTF_NTOA_BUFFER_SIZE) { + if (negative) { + buf[len++] = '-'; + } else if (flags & FLAGS_PLUS) { + buf[len++] = '+'; // ignore the space if the '+' exists + } else if (flags & FLAGS_SPACE) { + buf[len++] = ' '; + } + } + + // pad spaces up to given width + if (!(flags & FLAGS_LEFT) && !(flags & FLAGS_ZEROPAD)) { + for (size_t i = len; i < width; i++) { + out(' ', buffer, idx++, maxlen); + } + } + + // reverse string + for (size_t i = 0U; i < len; i++) { + out(buf[len - i - 1U], buffer, idx++, maxlen); + } + + // append pad spaces up to given width + if (flags & FLAGS_LEFT) { + while (idx - start_idx < width) { + out(' ', buffer, idx++, maxlen); + } + } + + return idx; +} + +// internal itoa for 'long' type +static inline size_t _ntoa_long(out_fct_type out, char* buffer, size_t idx, size_t maxlen, + unsigned long value, bool negative, unsigned long base, + unsigned int prec, unsigned int width, unsigned int flags) { + char buf[PRINTF_NTOA_BUFFER_SIZE]; + size_t len = 0U; + + // write if precision != 0 and value is != 0 + if (!(flags & FLAGS_PRECISION) || value) { + do { + const char digit = (char)(value % base); + buf[len++] = + digit < 10 ? '0' + digit : (flags & FLAGS_UPPERCASE ? 'A' : 'a') + digit - 10; + value /= base; + } while (value && (len < PRINTF_NTOA_BUFFER_SIZE)); + } + + return _ntoa_format(out, buffer, idx, maxlen, buf, len, negative, (unsigned int)base, prec, + width, flags); +} + +// internal itoa for 'long long' type +#if defined(PRINTF_SUPPORT_LONG_LONG) +static inline size_t _ntoa_long_long(out_fct_type out, char* buffer, size_t idx, size_t maxlen, + unsigned long long value, bool negative, + unsigned long long base, unsigned int prec, unsigned int width, + unsigned int flags) { + char buf[PRINTF_NTOA_BUFFER_SIZE]; + size_t len = 0U; + + // write if precision != 0 and value is != 0 + if (!(flags & FLAGS_PRECISION) || value) { + do { + const char digit = (char)(value % base); + buf[len++] = + digit < 10 ? '0' + digit : (flags & FLAGS_UPPERCASE ? 'A' : 'a') + digit - 10; + value /= base; + } while (value && (len < PRINTF_NTOA_BUFFER_SIZE)); + } + + return _ntoa_format(out, buffer, idx, maxlen, buf, len, negative, (unsigned int)base, prec, + width, flags); +} +#endif // PRINTF_SUPPORT_LONG_LONG + +#if defined(PRINTF_SUPPORT_FLOAT) +static inline size_t _ftoa(out_fct_type out, char* buffer, size_t idx, size_t maxlen, double value, + unsigned int prec, unsigned int width, unsigned int flags) { + char buf[PRINTF_FTOA_BUFFER_SIZE]; + size_t len = 0U; + double diff = 0.0; + + // if input is larger than thres_max, revert to exponential + const double thres_max = (double)0x7FFFFFFF; + + // powers of 10 + static const double pow10[] = {1, 10, 100, 1000, 10000, + 100000, 1000000, 10000000, 100000000, 1000000000}; + + // test for negative + bool negative = false; + if (value < 0) { + negative = true; + value = 0 - value; + } + + // set default precision to 6, if not set explicitly + if (!(flags & FLAGS_PRECISION)) { + prec = 6U; + } + // limit precision to 9, cause a prec >= 10 can lead to overflow errors + while ((len < PRINTF_FTOA_BUFFER_SIZE) && (prec > 9U)) { + buf[len++] = '0'; + prec--; + } + + int whole = (int)value; + double tmp = (value - whole) * pow10[prec]; + unsigned long frac = (unsigned long)tmp; + diff = tmp - frac; + + if (diff > 0.5) { + ++frac; + // handle rollover, e.g. case 0.99 with prec 1 is 1.0 + if (frac >= pow10[prec]) { + frac = 0; + ++whole; + } + } else if ((diff == 0.5) && ((frac == 0U) || (frac & 1U))) { + // if halfway, round up if odd, OR if last digit is 0 + ++frac; + } + + // TBD: for very large numbers switch back to native sprintf for exponentials. Anyone want to + // write code to replace this? Normal printf behavior is to print EVERY whole number digit which + // can be 100s of characters overflowing your buffers == bad + if (value > thres_max) { + return 0U; + } + + if (prec == 0U) { + diff = value - (double)whole; + if (diff > 0.5) { + // greater than 0.5, round up, e.g. 1.6 -> 2 + ++whole; + } else if ((diff == 0.5) && (whole & 1)) { + // exactly 0.5 and ODD, then round up + // 1.5 -> 2, but 2.5 -> 2 + ++whole; + } + } else { + unsigned int count = prec; + // now do fractional part, as an unsigned number + while (len < PRINTF_FTOA_BUFFER_SIZE) { + --count; + buf[len++] = (char)(48U + (frac % 10U)); + if (!(frac /= 10U)) { + break; + } + } + // add extra 0s + while ((len < PRINTF_FTOA_BUFFER_SIZE) && (count-- > 0U)) { + buf[len++] = '0'; + } + if (len < PRINTF_FTOA_BUFFER_SIZE) { + // add decimal + buf[len++] = '.'; + } + } + + // do whole part, number is reversed + while (len < PRINTF_FTOA_BUFFER_SIZE) { + buf[len++] = (char)(48 + (whole % 10)); + if (!(whole /= 10)) { + break; + } + } + + // pad leading zeros + while (!(flags & FLAGS_LEFT) && (flags & FLAGS_ZEROPAD) && (len < width) && + (len < PRINTF_FTOA_BUFFER_SIZE)) { + buf[len++] = '0'; + } + + // handle sign + if ((len == width) && (negative || (flags & FLAGS_PLUS) || (flags & FLAGS_SPACE))) { + len--; + } + if (len < PRINTF_FTOA_BUFFER_SIZE) { + if (negative) { + buf[len++] = '-'; + } else if (flags & FLAGS_PLUS) { + buf[len++] = '+'; // ignore the space if the '+' exists + } else if (flags & FLAGS_SPACE) { + buf[len++] = ' '; + } + } + + // pad spaces up to given width + if (!(flags & FLAGS_LEFT) && !(flags & FLAGS_ZEROPAD)) { + for (size_t i = len; i < width; i++) { + out(' ', buffer, idx++, maxlen); + } + } + + // reverse string + for (size_t i = 0U; i < len; i++) { + out(buf[len - i - 1U], buffer, idx++, maxlen); + } + + // append pad spaces up to given width + if (flags & FLAGS_LEFT) { + while (idx < width) { + out(' ', buffer, idx++, maxlen); + } + } + + return idx; +} +#endif // PRINTF_SUPPORT_FLOAT + +// internal vsnprintf +static inline int _vsnprintf(out_fct_type out, char* buffer, const char* format, + Common::VaList* va_list) { + unsigned int flags, width, precision, n; + size_t idx = 0U; + auto maxlen = static_cast(-1); + + if (!buffer) { + // use null output function + out = _out_null; + } + + while (*format) { + // format specifier? %[flags][width][.precision][length] + if (*format != '%') { + // no + out(*format, buffer, idx++, maxlen); + format++; + continue; + } else { + // yes, evaluate it + format++; + } + + // evaluate flags + flags = 0U; + do { + switch (*format) { + case '0': + flags |= FLAGS_ZEROPAD; + format++; + n = 1U; + break; + case '-': + flags |= FLAGS_LEFT; + format++; + n = 1U; + break; + case '+': + flags |= FLAGS_PLUS; + format++; + n = 1U; + break; + case ' ': + flags |= FLAGS_SPACE; + format++; + n = 1U; + break; + case '#': + flags |= FLAGS_HASH; + format++; + n = 1U; + break; + default: + n = 0U; + break; + } + } while (n); + + // evaluate width field + width = 0U; + if (_is_digit(*format)) { + width = _atoi(&format); + } else if (*format == '*') { + const int w = vaArgInteger(va_list); // const int w = va.next(cpu, mem); + + if (w < 0) { + flags |= FLAGS_LEFT; // reverse padding + width = (unsigned int)-w; + } else { + width = (unsigned int)w; + } + format++; + } + + // evaluate precision field + precision = 0U; + if (*format == '.') { + flags |= FLAGS_PRECISION; + format++; + if (_is_digit(*format)) { + precision = _atoi(&format); + } else if (*format == '*') { + precision = + vaArgInteger(va_list); // precision = (unsigned int)va.next(cpu, mem); + format++; + } + } + + // evaluate length field + switch (*format) { + case 'l': + flags |= FLAGS_LONG; + format++; + if (*format == 'l') { + flags |= FLAGS_LONG_LONG; + format++; + } + break; + case 'h': + flags |= FLAGS_SHORT; + format++; + if (*format == 'h') { + flags |= FLAGS_CHAR; + format++; + } + break; +#if defined(PRINTF_SUPPORT_PTRDIFF_T) + case 't': + flags |= (sizeof(ptrdiff_t) == sizeof(long) ? FLAGS_LONG : FLAGS_LONG_LONG); + format++; + break; +#endif + case 'j': + flags |= (sizeof(intmax_t) == sizeof(long) ? FLAGS_LONG : FLAGS_LONG_LONG); + format++; + break; + case 'z': + flags |= (sizeof(size_t) == sizeof(long) ? FLAGS_LONG : FLAGS_LONG_LONG); + format++; + break; + default: + break; + } + + // evaluate specifier + switch (*format) { + case 'd': + case 'i': + case 'u': + case 'x': + case 'X': + case 'o': + case 'b': { + // set the base + unsigned int base; + if (*format == 'x' || *format == 'X') { + base = 16U; + } else if (*format == 'o') { + base = 8U; + } else if (*format == 'b') { + base = 2U; + flags &= ~FLAGS_HASH; // no hash for bin format + } else { + base = 10U; + flags &= ~FLAGS_HASH; // no hash for dec format + } + // uppercase + if (*format == 'X') { + flags |= FLAGS_UPPERCASE; + } + + // no plus or space flag for u, x, X, o, b + if ((*format != 'i') && (*format != 'd')) { + flags &= ~(FLAGS_PLUS | FLAGS_SPACE); + } + + // convert the integer + if ((*format == 'i') || (*format == 'd')) { + // signed + if (flags & FLAGS_LONG_LONG) { +#if defined(PRINTF_SUPPORT_LONG_LONG) + auto value = vaArgLongLong( + va_list); // const long long value = va.next(cpu, mem); + idx = _ntoa_long_long(out, buffer, idx, maxlen, + (unsigned long long)(value > 0 ? value : 0 - value), + value < 0, base, precision, width, flags); +#endif + } else if (flags & FLAGS_LONG) { + auto value = vaArgLong(va_list); // const long value = va.next(cpu, mem); + idx = _ntoa_long(out, buffer, idx, maxlen, + (unsigned long)(value > 0 ? value : 0 - value), value < 0, + base, precision, width, flags); + } else { + // const int value = (flags & FLAGS_CHAR) ? (char)va.next(cpu, mem) : + // (flags & FLAGS_SHORT) ? (short int)va.next(cpu, mem): va.next(cpu, + // mem); + const int value = + (flags & FLAGS_CHAR) ? static_cast(vaArgInteger(va_list)) + : (flags & FLAGS_SHORT) ? static_cast(vaArgInteger(va_list)) + : vaArgInteger(va_list); + idx = _ntoa_long(out, buffer, idx, maxlen, + (unsigned int)(value > 0 ? value : 0 - value), value < 0, base, + precision, width, flags); + } + } else { + // unsigned + if (flags & FLAGS_LONG_LONG) { +#if defined(PRINTF_SUPPORT_LONG_LONG) + // idx = _ntoa_long_long(out, buffer, idx, maxlen, va.next(cpu, mem), false, base, precision, width, flags); + idx = _ntoa_long_long(out, buffer, idx, maxlen, + static_cast(vaArgLongLong(va_list)), false, base, + precision, width, flags); +#endif + } else if (flags & FLAGS_LONG) { + // idx = _ntoa_long(out, buffer, idx, maxlen, va.next(cpu, mem), + // false, base, precision, width, flags); + idx = _ntoa_long(out, buffer, idx, maxlen, static_cast(vaArgLong(va_list)), + false, base, precision, width, flags); + } else { + // const unsigned int value = (flags & FLAGS_CHAR) ? (unsigned + // char)va.next(cpu, mem) : (flags & FLAGS_SHORT) ? + // (unsigned short int)va.next(cpu, mem) : va.next(cpu, mem); + const unsigned int value = + (flags & FLAGS_CHAR) ? static_cast(vaArgInteger(va_list)) + : (flags & FLAGS_SHORT) ? static_cast(vaArgInteger(va_list)) + : static_cast(vaArgInteger(va_list)); + idx = _ntoa_long(out, buffer, idx, maxlen, value, false, base, precision, width, + flags); + } + } + format++; + break; + } +#if defined(PRINTF_SUPPORT_FLOAT) + case 'f': + case 'F': + // idx = _ftoa(out, buffer, idx, maxlen, va.next(cpu, mem), precision, width, + // flags); + idx = _ftoa(out, buffer, idx, maxlen, vaArgDouble(va_list), precision, width, flags); + format++; + break; +#endif // PRINTF_SUPPORT_FLOAT + case 'c': { + unsigned int l = 1U; + // pre padding + if (!(flags & FLAGS_LEFT)) { + while (l++ < width) { + out(' ', buffer, idx++, maxlen); + } + } + // char output + // out((char)va.next(cpu, mem), buffer, idx++, maxlen); + out(static_cast(vaArgInteger(va_list)), buffer, idx++, maxlen); + // post padding + if (flags & FLAGS_LEFT) { + while (l++ < width) { + out(' ', buffer, idx++, maxlen); + } + } + format++; + break; + } + + case 's': { + const char* p = vaArgPtr( + va_list); // const char *p = va.next>(cpu, mem).get(mem); + p = p != nullptr ? p : "(null)"; + unsigned int l = _strlen(p); + // pre padding + if (flags & FLAGS_PRECISION) { + l = (l < precision ? l : precision); + } + if (!(flags & FLAGS_LEFT)) { + while (l++ < width) { + out(' ', buffer, idx++, maxlen); + } + } + // string output + while ((*p != 0) && (!(flags & FLAGS_PRECISION) || precision--)) { + out(*(p++), buffer, idx++, maxlen); + } + // post padding + if (flags & FLAGS_LEFT) { + while (l++ < width) { + out(' ', buffer, idx++, maxlen); + } + } + format++; + break; + } + + case 'p': { + width = sizeof(void*) * 2U; + flags |= FLAGS_ZEROPAD | FLAGS_UPPERCASE; +#if defined(PRINTF_SUPPORT_LONG_LONG) + const bool is_ll = sizeof(uintptr_t) == sizeof(long long); + if (is_ll) { + // idx = _ntoa_long_long(out, buffer, idx, maxlen, + // (uintptr_t)va.next>(cpu, mem).address(), false, 16U, precision, width, + // flags); + idx = _ntoa_long_long(out, buffer, idx, maxlen, + reinterpret_cast(vaArgPtr(va_list)), false, + 16U, precision, width, flags); + } else { +#endif + // idx = _ntoa_long(out, buffer, idx, maxlen, (unsigned + // long)((uintptr_t)va.next>(cpu, mem).address()), false, 16U, precision, + // width, flags); + idx = _ntoa_long( + out, buffer, idx, maxlen, + static_cast(reinterpret_cast(vaArgPtr(va_list))), + false, 16U, precision, width, flags); +#if defined(PRINTF_SUPPORT_LONG_LONG) + } +#endif + format++; + break; + } + + case '%': + out('%', buffer, idx++, maxlen); + format++; + break; + + default: + out(*format, buffer, idx++, maxlen); + format++; + break; + } + } + + // termination + out((char)0, buffer, idx < maxlen ? idx : maxlen - 1U, maxlen); + + // return written chars without terminating \0 + return (int)idx; +} + +static int printf_ctx(Common::VaCtx* ctx) { + const char* format = vaArgPtr(&ctx->va_list); + char buffer[256]; + int result = _vsnprintf(_out_buffer, buffer, format, &ctx->va_list); + printf("%s", buffer); + return result; +} + +static int fprintf_ctx(Common::VaCtx* ctx, char* buf) { + const char* format = vaArgPtr(&ctx->va_list); + char buffer[256]; + int result = _vsnprintf(_out_buffer, buffer, format, &ctx->va_list); + std::strcpy(buf, buffer); + return result; +} + +static int vsnprintf_ctx(char* s, size_t n, const char* format, Common::VaList* arg) { + char buffer[n]; + int result = _vsnprintf(_out_buffer, buffer, format, arg); + std::strcpy(s, buffer); + return result; +} + +static int snprintf_ctx(char* s, size_t n, Common::VaCtx* ctx) { + const char* format = vaArgPtr(&ctx->va_list); + char buffer[n]; + int result = _vsnprintf(_out_buffer, buffer, format, &ctx->va_list); + std::strcpy(s, buffer); + return result; +} + +} // namespace Libraries::LibcInternal \ No newline at end of file diff --git a/src/core/libraries/libs.cpp b/src/core/libraries/libs.cpp index 49cd54a5b..cd0fe650b 100644 --- a/src/core/libraries/libs.cpp +++ b/src/core/libraries/libs.cpp @@ -11,6 +11,7 @@ #include "core/libraries/disc_map/disc_map.h" #include "core/libraries/game_live_streaming/gamelivestreaming.h" #include "core/libraries/gnmdriver/gnmdriver.h" +#include "core/libraries/hmd/hmd.h" #include "core/libraries/ime/error_dialog.h" #include "core/libraries/ime/ime.h" #include "core/libraries/ime/ime_dialog.h" @@ -18,14 +19,20 @@ #include "core/libraries/libc_internal/libc_internal.h" #include "core/libraries/libpng/pngdec.h" #include "core/libraries/libs.h" +#include "core/libraries/mouse/mouse.h" #include "core/libraries/move/move.h" #include "core/libraries/network/http.h" +#include "core/libraries/network/http2.h" #include "core/libraries/network/net.h" #include "core/libraries/network/netctl.h" #include "core/libraries/network/ssl.h" +#include "core/libraries/network/ssl2.h" +#include "core/libraries/np_common/np_common.h" #include "core/libraries/np_manager/np_manager.h" +#include "core/libraries/np_party/np_party.h" #include "core/libraries/np_score/np_score.h" #include "core/libraries/np_trophy/np_trophy.h" +#include "core/libraries/np_web_api/np_web_api.h" #include "core/libraries/pad/pad.h" #include "core/libraries/playgo/playgo.h" #include "core/libraries/playgo/playgo_dialog.h" @@ -47,6 +54,8 @@ #include "core/libraries/videodec/videodec.h" #include "core/libraries/videodec/videodec2.h" #include "core/libraries/videoout/video_out.h" +#include "core/libraries/web_browser_dialog/webbrowserdialog.h" +#include "core/libraries/zlib/zlib_sce.h" #include "fiber/fiber.h" #include "jpeg/jpegenc.h" @@ -63,17 +72,21 @@ void InitHLELibs(Core::Loader::SymbolsResolver* sym) { Libraries::MsgDialog::RegisterlibSceMsgDialog(sym); Libraries::AudioOut::RegisterlibSceAudioOut(sym); Libraries::Http::RegisterlibSceHttp(sym); + Libraries::Http2::RegisterlibSceHttp2(sym); Libraries::Net::RegisterlibSceNet(sym); Libraries::NetCtl::RegisterlibSceNetCtl(sym); Libraries::SaveData::RegisterlibSceSaveData(sym); Libraries::SaveData::Dialog::RegisterlibSceSaveDataDialog(sym); Libraries::Ssl::RegisterlibSceSsl(sym); + Libraries::Ssl2::RegisterlibSceSsl2(sym); Libraries::SysModule::RegisterlibSceSysmodule(sym); Libraries::Posix::Registerlibsceposix(sym); Libraries::AudioIn::RegisterlibSceAudioIn(sym); + Libraries::NpCommon::RegisterlibSceNpCommon(sym); Libraries::NpManager::RegisterlibSceNpManager(sym); Libraries::NpScore::RegisterlibSceNpScore(sym); Libraries::NpTrophy::RegisterlibSceNpTrophy(sym); + Libraries::NpWebApi::RegisterlibSceNpWebApi(sym); Libraries::ScreenShot::RegisterlibSceScreenShot(sym); Libraries::AppContent::RegisterlibSceAppContent(sym); Libraries::PngDec::RegisterlibScePngDec(sym); @@ -97,6 +110,12 @@ void InitHLELibs(Core::Loader::SymbolsResolver* sym) { Libraries::Move::RegisterlibSceMove(sym); Libraries::Fiber::RegisterlibSceFiber(sym); Libraries::JpegEnc::RegisterlibSceJpegEnc(sym); + Libraries::Mouse::RegisterlibSceMouse(sym); + Libraries::WebBrowserDialog::RegisterlibSceWebBrowserDialog(sym); + Libraries::NpParty::RegisterlibSceNpParty(sym); + Libraries::Zlib::RegisterlibSceZlib(sym); + Libraries::Hmd::RegisterlibSceHmd(sym); + Libraries::DiscMap::RegisterlibSceDiscMap(sym); } } // namespace Libraries diff --git a/src/core/libraries/mouse/mouse.cpp b/src/core/libraries/mouse/mouse.cpp new file mode 100644 index 000000000..dffd2346c --- /dev/null +++ b/src/core/libraries/mouse/mouse.cpp @@ -0,0 +1,99 @@ +// SPDX-FileCopyrightText: Copyright 2024 shadPS4 Emulator Project +// SPDX-License-Identifier: GPL-2.0-or-later + +// Generated By moduleGenerator +#include "common/logging/log.h" +#include "core/libraries/error_codes.h" +#include "core/libraries/libs.h" +#include "mouse.h" + +namespace Libraries::Mouse { + +int PS4_SYSV_ABI sceMouseClose() { + LOG_ERROR(Lib_Mouse, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI sceMouseConnectPort() { + LOG_ERROR(Lib_Mouse, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI sceMouseDebugGetDeviceId() { + LOG_ERROR(Lib_Mouse, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI sceMouseDeviceOpen() { + LOG_ERROR(Lib_Mouse, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI sceMouseDisconnectDevice() { + LOG_ERROR(Lib_Mouse, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI sceMouseDisconnectPort() { + LOG_ERROR(Lib_Mouse, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI sceMouseGetDeviceInfo() { + LOG_ERROR(Lib_Mouse, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI sceMouseInit() { + LOG_ERROR(Lib_Mouse, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI sceMouseMbusInit() { + LOG_ERROR(Lib_Mouse, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI sceMouseOpen() { + LOG_ERROR(Lib_Mouse, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI sceMouseRead() { + LOG_DEBUG(Lib_Mouse, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI sceMouseSetHandType() { + LOG_ERROR(Lib_Mouse, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI sceMouseSetPointerSpeed() { + LOG_ERROR(Lib_Mouse, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI sceMouseSetProcessPrivilege() { + LOG_ERROR(Lib_Mouse, "(STUBBED) called"); + return ORBIS_OK; +} + +void RegisterlibSceMouse(Core::Loader::SymbolsResolver* sym) { + LIB_FUNCTION("cAnT0Rw-IwU", "libSceMouse", 1, "libSceMouse", 1, 1, sceMouseClose); + LIB_FUNCTION("Ymyy1HSSJLQ", "libSceMouse", 1, "libSceMouse", 1, 1, sceMouseConnectPort); + LIB_FUNCTION("BRXOoXQtb+k", "libSceMouse", 1, "libSceMouse", 1, 1, sceMouseDebugGetDeviceId); + LIB_FUNCTION("WiGKINCZWkc", "libSceMouse", 1, "libSceMouse", 1, 1, sceMouseDeviceOpen); + LIB_FUNCTION("eDQTFHbgeTU", "libSceMouse", 1, "libSceMouse", 1, 1, sceMouseDisconnectDevice); + LIB_FUNCTION("jJP1vYMEPd4", "libSceMouse", 1, "libSceMouse", 1, 1, sceMouseDisconnectPort); + LIB_FUNCTION("QA9Qupz3Zjw", "libSceMouse", 1, "libSceMouse", 1, 1, sceMouseGetDeviceInfo); + LIB_FUNCTION("Qs0wWulgl7U", "libSceMouse", 1, "libSceMouse", 1, 1, sceMouseInit); + LIB_FUNCTION("1FeceR5YhAo", "libSceMouse", 1, "libSceMouse", 1, 1, sceMouseMbusInit); + LIB_FUNCTION("RaqxZIf6DvE", "libSceMouse", 1, "libSceMouse", 1, 1, sceMouseOpen); + LIB_FUNCTION("x8qnXqh-tiM", "libSceMouse", 1, "libSceMouse", 1, 1, sceMouseRead); + LIB_FUNCTION("crkFfp-cmFo", "libSceMouse", 1, "libSceMouse", 1, 1, sceMouseSetHandType); + LIB_FUNCTION("ghLUU2Z5Lcg", "libSceMouse", 1, "libSceMouse", 1, 1, sceMouseSetPointerSpeed); + LIB_FUNCTION("6aANndpS0Wo", "libSceMouse", 1, "libSceMouse", 1, 1, sceMouseSetProcessPrivilege); +}; + +} // namespace Libraries::Mouse \ No newline at end of file diff --git a/src/core/libraries/mouse/mouse.h b/src/core/libraries/mouse/mouse.h new file mode 100644 index 000000000..8264f62e0 --- /dev/null +++ b/src/core/libraries/mouse/mouse.h @@ -0,0 +1,29 @@ +// SPDX-FileCopyrightText: Copyright 2024 shadPS4 Emulator Project +// SPDX-License-Identifier: GPL-2.0-or-later + +#pragma once +#include "common/types.h" + +namespace Core::Loader { +class SymbolsResolver; +} + +namespace Libraries::Mouse { + +int PS4_SYSV_ABI sceMouseClose(); +int PS4_SYSV_ABI sceMouseConnectPort(); +int PS4_SYSV_ABI sceMouseDebugGetDeviceId(); +int PS4_SYSV_ABI sceMouseDeviceOpen(); +int PS4_SYSV_ABI sceMouseDisconnectDevice(); +int PS4_SYSV_ABI sceMouseDisconnectPort(); +int PS4_SYSV_ABI sceMouseGetDeviceInfo(); +int PS4_SYSV_ABI sceMouseInit(); +int PS4_SYSV_ABI sceMouseMbusInit(); +int PS4_SYSV_ABI sceMouseOpen(); +int PS4_SYSV_ABI sceMouseRead(); +int PS4_SYSV_ABI sceMouseSetHandType(); +int PS4_SYSV_ABI sceMouseSetPointerSpeed(); +int PS4_SYSV_ABI sceMouseSetProcessPrivilege(); + +void RegisterlibSceMouse(Core::Loader::SymbolsResolver* sym); +} // namespace Libraries::Mouse \ No newline at end of file diff --git a/src/core/libraries/network/http.cpp b/src/core/libraries/network/http.cpp index 8e06c76fa..dbb5b096a 100644 --- a/src/core/libraries/network/http.cpp +++ b/src/core/libraries/network/http.cpp @@ -5,6 +5,7 @@ #include "core/libraries/error_codes.h" #include "core/libraries/libs.h" #include "core/libraries/network/http.h" +#include "http_error.h" namespace Libraries::Http { @@ -566,17 +567,277 @@ int PS4_SYSV_ABI sceHttpUriMerge() { return ORBIS_OK; } -int PS4_SYSV_ABI sceHttpUriParse() { +int PS4_SYSV_ABI sceHttpUriParse(OrbisHttpUriElement* out, const char* srcUri, void* pool, + size_t* require, size_t prepare) { + LOG_INFO(Lib_Http, "srcUri = {}", std::string(srcUri)); + if (!srcUri) { + LOG_ERROR(Lib_Http, "invalid url"); + return ORBIS_HTTP_ERROR_INVALID_URL; + } + if (!out && !pool && !require) { + LOG_ERROR(Lib_Http, "invalid values"); + return ORBIS_HTTP_ERROR_INVALID_VALUE; + } + + if (out && pool) { + memset(out, 0, sizeof(OrbisHttpUriElement)); + out->scheme = (char*)pool; + } + + // Track the total required buffer size + size_t requiredSize = 0; + + // Parse the scheme (e.g., "http:", "https:", "file:") + size_t schemeLength = 0; + while (srcUri[schemeLength] && srcUri[schemeLength] != ':') { + if (!isalnum(srcUri[schemeLength])) { + LOG_ERROR(Lib_Http, "invalid url"); + return ORBIS_HTTP_ERROR_INVALID_URL; + } + schemeLength++; + } + + if (pool && prepare < schemeLength + 1) { + LOG_ERROR(Lib_Http, "out of memory"); + return ORBIS_HTTP_ERROR_OUT_OF_MEMORY; + } + + if (out && pool) { + memcpy(out->scheme, srcUri, schemeLength); + out->scheme[schemeLength] = '\0'; + } + + requiredSize += schemeLength + 1; + + // Move past the scheme and ':' character + size_t offset = schemeLength + 1; + + // Check if "//" appears after the scheme + if (strncmp(srcUri + offset, "//", 2) == 0) { + // "//" is present + if (out) { + out->opaque = false; + } + offset += 2; // Move past "//" + } else { + // "//" is not present + if (out) { + out->opaque = true; + } + } + + // Handle "file" scheme + if (strncmp(srcUri, "file", 4) == 0) { + // File URIs typically start with "file://" + if (out && !out->opaque) { + // Skip additional slashes (e.g., "////") + while (srcUri[offset] == '/') { + offset++; + } + + // Parse the path (everything after the slashes) + char* pathStart = (char*)srcUri + offset; + size_t pathLength = 0; + while (pathStart[pathLength] && pathStart[pathLength] != '?' && + pathStart[pathLength] != '#') { + pathLength++; + } + + // Ensure the path starts with '/' + if (pathLength > 0 && pathStart[0] != '/') { + // Prepend '/' to the path + requiredSize += pathLength + 2; // Include '/' and null terminator + + if (pool && prepare < requiredSize) { + LOG_ERROR(Lib_Http, "out of memory"); + return ORBIS_HTTP_ERROR_OUT_OF_MEMORY; + } + + if (out && pool) { + out->path = (char*)pool + (requiredSize - pathLength - 2); + out->path[0] = '/'; // Add leading '/' + memcpy(out->path + 1, pathStart, pathLength); + out->path[pathLength + 1] = '\0'; + } + } else { + // Path already starts with '/' + requiredSize += pathLength + 1; + + if (pool && prepare < requiredSize) { + LOG_ERROR(Lib_Http, "out of memory"); + return ORBIS_HTTP_ERROR_OUT_OF_MEMORY; + } + + if (out && pool) { + memcpy((char*)pool + (requiredSize - pathLength - 1), pathStart, pathLength); + out->path = (char*)pool + (requiredSize - pathLength - 1); + out->path[pathLength] = '\0'; + } + } + + // Move past the path + offset += pathLength; + } + } + + // Handle non-file schemes (e.g., "http", "https") + else { + // Parse the host and port + char* hostStart = (char*)srcUri + offset; + while (*hostStart == '/') { + hostStart++; + } + + size_t hostLength = 0; + while (hostStart[hostLength] && hostStart[hostLength] != '/' && + hostStart[hostLength] != '?' && hostStart[hostLength] != ':') { + hostLength++; + } + + requiredSize += hostLength + 1; + + if (pool && prepare < requiredSize) { + LOG_ERROR(Lib_Http, "out of memory"); + return ORBIS_HTTP_ERROR_OUT_OF_MEMORY; + } + + if (out && pool) { + memcpy((char*)pool + (requiredSize - hostLength - 1), hostStart, hostLength); + out->hostname = (char*)pool + (requiredSize - hostLength - 1); + out->hostname[hostLength] = '\0'; + } + + // Move past the host + offset += hostLength; + + // Parse the port (if present) + if (hostStart[hostLength] == ':') { + char* portStart = hostStart + hostLength + 1; + size_t portLength = 0; + while (portStart[portLength] && isdigit(portStart[portLength])) { + portLength++; + } + + requiredSize += portLength + 1; + + if (pool && prepare < requiredSize) { + LOG_ERROR(Lib_Http, "out of memory"); + return ORBIS_HTTP_ERROR_OUT_OF_MEMORY; + } + + // Convert the port string to a uint16_t + char portStr[6]; // Max length for a port number (65535) + if (portLength > 5) { + LOG_ERROR(Lib_Http, "invalid url"); + return ORBIS_HTTP_ERROR_INVALID_URL; + } + memcpy(portStr, portStart, portLength); + portStr[portLength] = '\0'; + + uint16_t port = (uint16_t)atoi(portStr); + if (port == 0 && portStr[0] != '0') { + LOG_ERROR(Lib_Http, "invalid url"); + return ORBIS_HTTP_ERROR_INVALID_URL; + } + + // Set the port in the output structure + if (out) { + out->port = port; + } + + // Move past the port + offset += portLength + 1; + } + } + + // Parse the path (if present) + if (srcUri[offset] == '/') { + char* pathStart = (char*)srcUri + offset; + size_t pathLength = 0; + while (pathStart[pathLength] && pathStart[pathLength] != '?' && + pathStart[pathLength] != '#') { + pathLength++; + } + + requiredSize += pathLength + 1; + + if (pool && prepare < requiredSize) { + LOG_ERROR(Lib_Http, "out of memory"); + return ORBIS_HTTP_ERROR_OUT_OF_MEMORY; + } + + if (out && pool) { + memcpy((char*)pool + (requiredSize - pathLength - 1), pathStart, pathLength); + out->path = (char*)pool + (requiredSize - pathLength - 1); + out->path[pathLength] = '\0'; + } + + // Move past the path + offset += pathLength; + } + + // Parse the query (if present) + if (srcUri[offset] == '?') { + char* queryStart = (char*)srcUri + offset + 1; + size_t queryLength = 0; + while (queryStart[queryLength] && queryStart[queryLength] != '#') { + queryLength++; + } + + requiredSize += queryLength + 1; + + if (pool && prepare < requiredSize) { + LOG_ERROR(Lib_Http, "out of memory"); + return ORBIS_HTTP_ERROR_OUT_OF_MEMORY; + } + + if (out && pool) { + memcpy((char*)pool + (requiredSize - queryLength - 1), queryStart, queryLength); + out->query = (char*)pool + (requiredSize - queryLength - 1); + out->query[queryLength] = '\0'; + } + + // Move past the query + offset += queryLength + 1; + } + + // Parse the fragment (if present) + if (srcUri[offset] == '#') { + char* fragmentStart = (char*)srcUri + offset + 1; + size_t fragmentLength = 0; + while (fragmentStart[fragmentLength]) { + fragmentLength++; + } + + requiredSize += fragmentLength + 1; + + if (pool && prepare < requiredSize) { + LOG_ERROR(Lib_Http, "out of memory"); + return ORBIS_HTTP_ERROR_OUT_OF_MEMORY; + } + + if (out && pool) { + memcpy((char*)pool + (requiredSize - fragmentLength - 1), fragmentStart, + fragmentLength); + out->fragment = (char*)pool + (requiredSize - fragmentLength - 1); + out->fragment[fragmentLength] = '\0'; + } + } + + // Calculate the total required buffer size + if (require) { + *require = requiredSize; // Update with actual required size + } + + return ORBIS_OK; +} + +int PS4_SYSV_ABI sceHttpUriSweepPath(char* dst, const char* src, size_t srcSize) { LOG_ERROR(Lib_Http, "(STUBBED) called"); return ORBIS_OK; } -int PS4_SYSV_ABI sceHttpUriSweepPath() { - LOG_ERROR(Lib_Http, "(STUBBED) called"); - return ORBIS_OK; -} - -int PS4_SYSV_ABI sceHttpUriUnescape() { +int PS4_SYSV_ABI sceHttpUriUnescape(char* out, size_t* require, size_t prepare, const char* in) { LOG_ERROR(Lib_Http, "(STUBBED) called"); return ORBIS_OK; } diff --git a/src/core/libraries/network/http.h b/src/core/libraries/network/http.h index 24bc83020..c687c60c4 100644 --- a/src/core/libraries/network/http.h +++ b/src/core/libraries/network/http.h @@ -11,6 +11,19 @@ class SymbolsResolver; namespace Libraries::Http { +struct OrbisHttpUriElement { + bool opaque; + char* scheme; + char* username; + char* password; + char* hostname; + char* path; + char* query; + char* fragment; + u16 port; + u8 reserved[10]; +}; + int PS4_SYSV_ABI sceHttpAbortRequest(); int PS4_SYSV_ABI sceHttpAbortRequestForce(); int PS4_SYSV_ABI sceHttpAbortWaitRequest(); @@ -122,9 +135,10 @@ int PS4_SYSV_ABI sceHttpUriBuild(); int PS4_SYSV_ABI sceHttpUriCopy(); int PS4_SYSV_ABI sceHttpUriEscape(); int PS4_SYSV_ABI sceHttpUriMerge(); -int PS4_SYSV_ABI sceHttpUriParse(); -int PS4_SYSV_ABI sceHttpUriSweepPath(); -int PS4_SYSV_ABI sceHttpUriUnescape(); +int PS4_SYSV_ABI sceHttpUriParse(OrbisHttpUriElement* out, const char* srcUri, void* pool, + size_t* require, size_t prepare); +int PS4_SYSV_ABI sceHttpUriSweepPath(char* dst, const char* src, size_t srcSize); +int PS4_SYSV_ABI sceHttpUriUnescape(char* out, size_t* require, size_t prepare, const char* in); int PS4_SYSV_ABI sceHttpWaitRequest(); void RegisterlibSceHttp(Core::Loader::SymbolsResolver* sym); diff --git a/src/core/libraries/network/http2.cpp b/src/core/libraries/network/http2.cpp new file mode 100644 index 000000000..52f73edc6 --- /dev/null +++ b/src/core/libraries/network/http2.cpp @@ -0,0 +1,360 @@ +// SPDX-FileCopyrightText: Copyright 2024 shadPS4 Emulator Project +// SPDX-License-Identifier: GPL-2.0-or-later + +#include "common/logging/log.h" +#include "core/libraries/error_codes.h" +#include "core/libraries/libs.h" +#include "core/libraries/network/http2.h" + +namespace Libraries::Http2 { + +int PS4_SYSV_ABI _Z5dummyv() { + LOG_ERROR(Lib_Http2, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI sceHttp2AbortRequest() { + LOG_ERROR(Lib_Http2, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI sceHttp2AddCookie() { + LOG_ERROR(Lib_Http2, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI sceHttp2AddRequestHeader() { + LOG_ERROR(Lib_Http2, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI sceHttp2AuthCacheFlush() { + LOG_ERROR(Lib_Http2, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI sceHttp2CookieExport() { + LOG_ERROR(Lib_Http2, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI sceHttp2CookieFlush() { + LOG_ERROR(Lib_Http2, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI sceHttp2CookieImport() { + LOG_ERROR(Lib_Http2, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI sceHttp2CreateCookieBox() { + LOG_ERROR(Lib_Http2, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI sceHttp2CreateRequestWithURL() { + LOG_ERROR(Lib_Http2, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI sceHttp2CreateTemplate() { + LOG_ERROR(Lib_Http2, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI sceHttp2DeleteCookieBox() { + LOG_ERROR(Lib_Http2, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI sceHttp2DeleteRequest() { + LOG_ERROR(Lib_Http2, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI sceHttp2DeleteTemplate() { + LOG_ERROR(Lib_Http2, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI sceHttp2GetAllResponseHeaders() { + LOG_ERROR(Lib_Http2, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI sceHttp2GetAuthEnabled() { + LOG_ERROR(Lib_Http2, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI sceHttp2GetAutoRedirect() { + LOG_ERROR(Lib_Http2, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI sceHttp2GetCookie() { + LOG_ERROR(Lib_Http2, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI sceHttp2GetCookieBox() { + LOG_ERROR(Lib_Http2, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI sceHttp2GetCookieStats() { + LOG_ERROR(Lib_Http2, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI sceHttp2GetMemoryPoolStats() { + LOG_ERROR(Lib_Http2, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI sceHttp2GetResponseContentLength() { + LOG_ERROR(Lib_Http2, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI sceHttp2GetStatusCode() { + LOG_ERROR(Lib_Http2, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI sceHttp2Init(int net_id, int ssl_id, size_t pool_size, int max_requests) { + LOG_ERROR(Lib_Http2, "(DUMMY) called"); + static int id = 0; + return ++id; +} + +int PS4_SYSV_ABI sceHttp2ReadData() { + LOG_ERROR(Lib_Http2, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI sceHttp2ReadDataAsync() { + LOG_ERROR(Lib_Http2, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI sceHttp2RedirectCacheFlush() { + LOG_ERROR(Lib_Http2, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI sceHttp2RemoveRequestHeader() { + LOG_ERROR(Lib_Http2, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI sceHttp2SendRequest() { + LOG_ERROR(Lib_Http2, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI sceHttp2SendRequestAsync() { + LOG_ERROR(Lib_Http2, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI sceHttp2SetAuthEnabled() { + LOG_ERROR(Lib_Http2, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI sceHttp2SetAuthInfoCallback() { + LOG_ERROR(Lib_Http2, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI sceHttp2SetAutoRedirect() { + LOG_ERROR(Lib_Http2, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI sceHttp2SetConnectionWaitTimeOut() { + LOG_ERROR(Lib_Http2, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI sceHttp2SetConnectTimeOut() { + LOG_ERROR(Lib_Http2, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI sceHttp2SetCookieBox() { + LOG_ERROR(Lib_Http2, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI sceHttp2SetCookieMaxNum() { + LOG_ERROR(Lib_Http2, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI sceHttp2SetCookieMaxNumPerDomain() { + LOG_ERROR(Lib_Http2, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI sceHttp2SetCookieMaxSize() { + LOG_ERROR(Lib_Http2, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI sceHttp2SetCookieRecvCallback() { + LOG_ERROR(Lib_Http2, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI sceHttp2SetCookieSendCallback() { + LOG_ERROR(Lib_Http2, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI sceHttp2SetInflateGZIPEnabled() { + LOG_ERROR(Lib_Http2, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI sceHttp2SetMinSslVersion() { + LOG_ERROR(Lib_Http2, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI sceHttp2SetPreSendCallback() { + LOG_ERROR(Lib_Http2, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI sceHttp2SetRecvTimeOut() { + LOG_ERROR(Lib_Http2, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI sceHttp2SetRedirectCallback() { + LOG_ERROR(Lib_Http2, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI sceHttp2SetRequestContentLength() { + LOG_ERROR(Lib_Http2, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI sceHttp2SetResolveRetry() { + LOG_ERROR(Lib_Http2, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI sceHttp2SetResolveTimeOut() { + LOG_ERROR(Lib_Http2, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI sceHttp2SetSendTimeOut() { + LOG_ERROR(Lib_Http2, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI sceHttp2SetSslCallback() { + LOG_ERROR(Lib_Http2, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI sceHttp2SetTimeOut() { + LOG_ERROR(Lib_Http2, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI sceHttp2SslDisableOption() { + LOG_ERROR(Lib_Http2, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI sceHttp2SslEnableOption() { + LOG_ERROR(Lib_Http2, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI sceHttp2Term() { + LOG_ERROR(Lib_Http2, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI sceHttp2WaitAsync() { + LOG_ERROR(Lib_Http2, "(STUBBED) called"); + return ORBIS_OK; +} + +void RegisterlibSceHttp2(Core::Loader::SymbolsResolver* sym) { + LIB_FUNCTION("AS45QoYHjc4", "libSceHttp2", 1, "libSceHttp2", 1, 1, _Z5dummyv); + LIB_FUNCTION("IZ-qjhRqvjk", "libSceHttp2", 1, "libSceHttp2", 1, 1, sceHttp2AbortRequest); + LIB_FUNCTION("flPxnowtvWY", "libSceHttp2", 1, "libSceHttp2", 1, 1, sceHttp2AddCookie); + LIB_FUNCTION("nrPfOE8TQu0", "libSceHttp2", 1, "libSceHttp2", 1, 1, sceHttp2AddRequestHeader); + LIB_FUNCTION("WeuDjj5m4YU", "libSceHttp2", 1, "libSceHttp2", 1, 1, sceHttp2AuthCacheFlush); + LIB_FUNCTION("JlFGR4v50Kw", "libSceHttp2", 1, "libSceHttp2", 1, 1, sceHttp2CookieExport); + LIB_FUNCTION("5VlQSzXW-SQ", "libSceHttp2", 1, "libSceHttp2", 1, 1, sceHttp2CookieFlush); + LIB_FUNCTION("B5ibZI5UlzU", "libSceHttp2", 1, "libSceHttp2", 1, 1, sceHttp2CookieImport); + LIB_FUNCTION("N4UfjvWJsMw", "libSceHttp2", 1, "libSceHttp2", 1, 1, sceHttp2CreateCookieBox); + LIB_FUNCTION("mmyOCxQMVYQ", "libSceHttp2", 1, "libSceHttp2", 1, 1, + sceHttp2CreateRequestWithURL); + LIB_FUNCTION("+wCt7fCijgk", "libSceHttp2", 1, "libSceHttp2", 1, 1, sceHttp2CreateTemplate); + LIB_FUNCTION("O9ync3F-JVI", "libSceHttp2", 1, "libSceHttp2", 1, 1, sceHttp2DeleteCookieBox); + LIB_FUNCTION("c8D9qIjo8EY", "libSceHttp2", 1, "libSceHttp2", 1, 1, sceHttp2DeleteRequest); + LIB_FUNCTION("pDom5-078DA", "libSceHttp2", 1, "libSceHttp2", 1, 1, sceHttp2DeleteTemplate); + LIB_FUNCTION("-rdXUi2XW90", "libSceHttp2", 1, "libSceHttp2", 1, 1, + sceHttp2GetAllResponseHeaders); + LIB_FUNCTION("m-OL13q8AI8", "libSceHttp2", 1, "libSceHttp2", 1, 1, sceHttp2GetAuthEnabled); + LIB_FUNCTION("od5QCZhZSfw", "libSceHttp2", 1, "libSceHttp2", 1, 1, sceHttp2GetAutoRedirect); + LIB_FUNCTION("GQFGj0rYX+A", "libSceHttp2", 1, "libSceHttp2", 1, 1, sceHttp2GetCookie); + LIB_FUNCTION("IX23slKvtQI", "libSceHttp2", 1, "libSceHttp2", 1, 1, sceHttp2GetCookieBox); + LIB_FUNCTION("eij7UzkUqK8", "libSceHttp2", 1, "libSceHttp2", 1, 1, sceHttp2GetCookieStats); + LIB_FUNCTION("otUQuZa-mv0", "libSceHttp2", 1, "libSceHttp2", 1, 1, sceHttp2GetMemoryPoolStats); + LIB_FUNCTION("o0DBQpFE13o", "libSceHttp2", 1, "libSceHttp2", 1, 1, + sceHttp2GetResponseContentLength); + LIB_FUNCTION("9XYJwCf3lEA", "libSceHttp2", 1, "libSceHttp2", 1, 1, sceHttp2GetStatusCode); + LIB_FUNCTION("3JCe3lCbQ8A", "libSceHttp2", 1, "libSceHttp2", 1, 1, sceHttp2Init); + LIB_FUNCTION("QygCNNmbGss", "libSceHttp2", 1, "libSceHttp2", 1, 1, sceHttp2ReadData); + LIB_FUNCTION("bGN-6zbo7ms", "libSceHttp2", 1, "libSceHttp2", 1, 1, sceHttp2ReadDataAsync); + LIB_FUNCTION("klwUy2Wg+q8", "libSceHttp2", 1, "libSceHttp2", 1, 1, sceHttp2RedirectCacheFlush); + LIB_FUNCTION("jHdP0CS4ZlA", "libSceHttp2", 1, "libSceHttp2", 1, 1, sceHttp2RemoveRequestHeader); + LIB_FUNCTION("rbqZig38AT8", "libSceHttp2", 1, "libSceHttp2", 1, 1, sceHttp2SendRequest); + LIB_FUNCTION("A+NVAFu4eCg", "libSceHttp2", 1, "libSceHttp2", 1, 1, sceHttp2SendRequestAsync); + LIB_FUNCTION("jjFahkBPCYs", "libSceHttp2", 1, "libSceHttp2", 1, 1, sceHttp2SetAuthEnabled); + LIB_FUNCTION("Wwj6HbB2mOo", "libSceHttp2", 1, "libSceHttp2", 1, 1, sceHttp2SetAuthInfoCallback); + LIB_FUNCTION("b9AvoIaOuHI", "libSceHttp2", 1, "libSceHttp2", 1, 1, sceHttp2SetAutoRedirect); + LIB_FUNCTION("n8hMLe31OPA", "libSceHttp2", 1, "libSceHttp2", 1, 1, + sceHttp2SetConnectionWaitTimeOut); + LIB_FUNCTION("-HIO4VT87v8", "libSceHttp2", 1, "libSceHttp2", 1, 1, sceHttp2SetConnectTimeOut); + LIB_FUNCTION("jrVHsKCXA0g", "libSceHttp2", 1, "libSceHttp2", 1, 1, sceHttp2SetCookieBox); + LIB_FUNCTION("mPKVhQqh2Es", "libSceHttp2", 1, "libSceHttp2", 1, 1, sceHttp2SetCookieMaxNum); + LIB_FUNCTION("o7+WXe4WadE", "libSceHttp2", 1, "libSceHttp2", 1, 1, + sceHttp2SetCookieMaxNumPerDomain); + LIB_FUNCTION("6a0N6GPD7RM", "libSceHttp2", 1, "libSceHttp2", 1, 1, sceHttp2SetCookieMaxSize); + LIB_FUNCTION("zdtXKn9X7no", "libSceHttp2", 1, "libSceHttp2", 1, 1, + sceHttp2SetCookieRecvCallback); + LIB_FUNCTION("McYmUpQ3-DY", "libSceHttp2", 1, "libSceHttp2", 1, 1, + sceHttp2SetCookieSendCallback); + LIB_FUNCTION("uRosf8GQbHQ", "libSceHttp2", 1, "libSceHttp2", 1, 1, + sceHttp2SetInflateGZIPEnabled); + LIB_FUNCTION("09tk+kIA1Ns", "libSceHttp2", 1, "libSceHttp2", 1, 1, sceHttp2SetMinSslVersion); + LIB_FUNCTION("UL4Fviw+IAM", "libSceHttp2", 1, "libSceHttp2", 1, 1, sceHttp2SetPreSendCallback); + LIB_FUNCTION("izvHhqgDt44", "libSceHttp2", 1, "libSceHttp2", 1, 1, sceHttp2SetRecvTimeOut); + LIB_FUNCTION("BJgi0CH7al4", "libSceHttp2", 1, "libSceHttp2", 1, 1, sceHttp2SetRedirectCallback); + LIB_FUNCTION("FSAFOzi0FpM", "libSceHttp2", 1, "libSceHttp2", 1, 1, + sceHttp2SetRequestContentLength); + LIB_FUNCTION("Gcjh+CisAZM", "libSceHttp2", 1, "libSceHttp2", 1, 1, sceHttp2SetResolveRetry); + LIB_FUNCTION("ACjtE27aErY", "libSceHttp2", 1, "libSceHttp2", 1, 1, sceHttp2SetResolveTimeOut); + LIB_FUNCTION("XPtW45xiLHk", "libSceHttp2", 1, "libSceHttp2", 1, 1, sceHttp2SetSendTimeOut); + LIB_FUNCTION("YrWX+DhPHQY", "libSceHttp2", 1, "libSceHttp2", 1, 1, sceHttp2SetSslCallback); + LIB_FUNCTION("VYMxTcBqSE0", "libSceHttp2", 1, "libSceHttp2", 1, 1, sceHttp2SetTimeOut); + LIB_FUNCTION("B37SruheQ5Y", "libSceHttp2", 1, "libSceHttp2", 1, 1, sceHttp2SslDisableOption); + LIB_FUNCTION("EWcwMpbr5F8", "libSceHttp2", 1, "libSceHttp2", 1, 1, sceHttp2SslEnableOption); + LIB_FUNCTION("YiBUtz-pGkc", "libSceHttp2", 1, "libSceHttp2", 1, 1, sceHttp2Term); + LIB_FUNCTION("MOp-AUhdfi8", "libSceHttp2", 1, "libSceHttp2", 1, 1, sceHttp2WaitAsync); +}; + +} // namespace Libraries::Http2 \ No newline at end of file diff --git a/src/core/libraries/network/http2.h b/src/core/libraries/network/http2.h new file mode 100644 index 000000000..aa1d0c5b4 --- /dev/null +++ b/src/core/libraries/network/http2.h @@ -0,0 +1,72 @@ +// SPDX-FileCopyrightText: Copyright 2024 shadPS4 Emulator Project +// SPDX-License-Identifier: GPL-2.0-or-later + +#pragma once + +#include "common/types.h" + +namespace Core::Loader { +class SymbolsResolver; +} + +namespace Libraries::Http2 { + +int PS4_SYSV_ABI _Z5dummyv(); +int PS4_SYSV_ABI sceHttp2AbortRequest(); +int PS4_SYSV_ABI sceHttp2AddCookie(); +int PS4_SYSV_ABI sceHttp2AddRequestHeader(); +int PS4_SYSV_ABI sceHttp2AuthCacheFlush(); +int PS4_SYSV_ABI sceHttp2CookieExport(); +int PS4_SYSV_ABI sceHttp2CookieFlush(); +int PS4_SYSV_ABI sceHttp2CookieImport(); +int PS4_SYSV_ABI sceHttp2CreateCookieBox(); +int PS4_SYSV_ABI sceHttp2CreateRequestWithURL(); +int PS4_SYSV_ABI sceHttp2CreateTemplate(); +int PS4_SYSV_ABI sceHttp2DeleteCookieBox(); +int PS4_SYSV_ABI sceHttp2DeleteRequest(); +int PS4_SYSV_ABI sceHttp2DeleteTemplate(); +int PS4_SYSV_ABI sceHttp2GetAllResponseHeaders(); +int PS4_SYSV_ABI sceHttp2GetAuthEnabled(); +int PS4_SYSV_ABI sceHttp2GetAutoRedirect(); +int PS4_SYSV_ABI sceHttp2GetCookie(); +int PS4_SYSV_ABI sceHttp2GetCookieBox(); +int PS4_SYSV_ABI sceHttp2GetCookieStats(); +int PS4_SYSV_ABI sceHttp2GetMemoryPoolStats(); +int PS4_SYSV_ABI sceHttp2GetResponseContentLength(); +int PS4_SYSV_ABI sceHttp2GetStatusCode(); +int PS4_SYSV_ABI sceHttp2Init(int net_id, int ssl_id, size_t pool_size, int max_requests); +int PS4_SYSV_ABI sceHttp2ReadData(); +int PS4_SYSV_ABI sceHttp2ReadDataAsync(); +int PS4_SYSV_ABI sceHttp2RedirectCacheFlush(); +int PS4_SYSV_ABI sceHttp2RemoveRequestHeader(); +int PS4_SYSV_ABI sceHttp2SendRequest(); +int PS4_SYSV_ABI sceHttp2SendRequestAsync(); +int PS4_SYSV_ABI sceHttp2SetAuthEnabled(); +int PS4_SYSV_ABI sceHttp2SetAuthInfoCallback(); +int PS4_SYSV_ABI sceHttp2SetAutoRedirect(); +int PS4_SYSV_ABI sceHttp2SetConnectionWaitTimeOut(); +int PS4_SYSV_ABI sceHttp2SetConnectTimeOut(); +int PS4_SYSV_ABI sceHttp2SetCookieBox(); +int PS4_SYSV_ABI sceHttp2SetCookieMaxNum(); +int PS4_SYSV_ABI sceHttp2SetCookieMaxNumPerDomain(); +int PS4_SYSV_ABI sceHttp2SetCookieMaxSize(); +int PS4_SYSV_ABI sceHttp2SetCookieRecvCallback(); +int PS4_SYSV_ABI sceHttp2SetCookieSendCallback(); +int PS4_SYSV_ABI sceHttp2SetInflateGZIPEnabled(); +int PS4_SYSV_ABI sceHttp2SetMinSslVersion(); +int PS4_SYSV_ABI sceHttp2SetPreSendCallback(); +int PS4_SYSV_ABI sceHttp2SetRecvTimeOut(); +int PS4_SYSV_ABI sceHttp2SetRedirectCallback(); +int PS4_SYSV_ABI sceHttp2SetRequestContentLength(); +int PS4_SYSV_ABI sceHttp2SetResolveRetry(); +int PS4_SYSV_ABI sceHttp2SetResolveTimeOut(); +int PS4_SYSV_ABI sceHttp2SetSendTimeOut(); +int PS4_SYSV_ABI sceHttp2SetSslCallback(); +int PS4_SYSV_ABI sceHttp2SetTimeOut(); +int PS4_SYSV_ABI sceHttp2SslDisableOption(); +int PS4_SYSV_ABI sceHttp2SslEnableOption(); +int PS4_SYSV_ABI sceHttp2Term(); +int PS4_SYSV_ABI sceHttp2WaitAsync(); + +void RegisterlibSceHttp2(Core::Loader::SymbolsResolver* sym); +} // namespace Libraries::Http2 \ No newline at end of file diff --git a/src/core/libraries/network/http_error.h b/src/core/libraries/network/http_error.h new file mode 100644 index 000000000..49cc89766 --- /dev/null +++ b/src/core/libraries/network/http_error.h @@ -0,0 +1,66 @@ +// SPDX-FileCopyrightText: Copyright 2024 shadPS4 Emulator Project +// SPDX-License-Identifier: GPL-2.0-or-later + +#pragma once + +#include "core/libraries/error_codes.h" + +constexpr int ORBIS_HTTP_ERROR_BEFORE_INIT = 0x80431001; +constexpr int ORBIS_HTTP_ERROR_ALREADY_INITED = 0x80431020; +constexpr int ORBIS_HTTP_ERROR_BUSY = 0x80431021; +constexpr int ORBIS_HTTP_ERROR_OUT_OF_MEMORY = 0x80431022; +constexpr int ORBIS_HTTP_ERROR_NOT_FOUND = 0x80431025; +constexpr int ORBIS_HTTP_ERROR_INVALID_VERSION = 0x8043106a; +constexpr int ORBIS_HTTP_ERROR_INVALID_ID = 0x80431100; +constexpr int ORBIS_HTTP_ERROR_OUT_OF_SIZE = 0x80431104; +constexpr int ORBIS_HTTP_ERROR_INVALID_VALUE = 0x804311fe; + +constexpr int ORBIS_HTTP_ERROR_INVALID_URL = 0x80433060; +constexpr int ORBIS_HTTP_ERROR_UNKNOWN_SCHEME = 0x80431061; +constexpr int ORBIS_HTTP_ERROR_NETWORK = 0x80431063; +constexpr int ORBIS_HTTP_ERROR_BAD_RESPONSE = 0x80431064; +constexpr int ORBIS_HTTP_ERROR_BEFORE_SEND = 0x80431065; +constexpr int ORBIS_HTTP_ERROR_AFTER_SEND = 0x80431066; +constexpr int ORBIS_HTTP_ERROR_TIMEOUT = 0x80431068; +constexpr int ORBIS_HTTP_ERROR_UNKNOWN_AUTH_TYPE = 0x80431069; +constexpr int ORBIS_HTTP_ERROR_UNKNOWN_METHOD = 0x8043106b; +constexpr int ORBIS_HTTP_ERROR_READ_BY_HEAD_METHOD = 0x8043106f; +constexpr int ORBIS_HTTP_ERROR_NOT_IN_COM = 0x80431070; +constexpr int ORBIS_HTTP_ERROR_NO_CONTENT_LENGTH = 0x80431071; +constexpr int ORBIS_HTTP_ERROR_CHUNK_ENC = 0x80431072; +constexpr int ORBIS_HTTP_ERROR_TOO_LARGE_RESPONSE_HEADER = 0x80431073; +constexpr int ORBIS_HTTP_ERROR_SSL = 0x80431075; +constexpr int ORBIS_HTTP_ERROR_INSUFFICIENT_STACKSIZE = 0x80431076; +constexpr int ORBIS_HTTP_ERROR_ABORTED = 0x80431080; +constexpr int ORBIS_HTTP_ERROR_UNKNOWN = 0x80431081; +constexpr int ORBIS_HTTP_ERROR_EAGAIN = 0x80431082; +constexpr int ORBIS_HTTP_ERROR_PROXY = 0x80431084; +constexpr int ORBIS_HTTP_ERROR_BROKEN = 0x80431085; + +constexpr int ORBIS_HTTP_ERROR_PARSE_HTTP_NOT_FOUND = 0x80432025; +constexpr int ORBIS_HTTP_ERROR_PARSE_HTTP_INVALID_RESPONSE = 0x80432060; +constexpr int ORBIS_HTTP_ERROR_PARSE_HTTP_INVALID_VALUE = 0x804321fe; + +constexpr int ORBIS_HTTP_ERROR_RESOLVER_EPACKET = 0x80436001; +constexpr int ORBIS_HTTP_ERROR_RESOLVER_ENODNS = 0x80436002; +constexpr int ORBIS_HTTP_ERROR_RESOLVER_ETIMEDOUT = 0x80436003; +constexpr int ORBIS_HTTP_ERROR_RESOLVER_ENOSUPPORT = 0x80436004; +constexpr int ORBIS_HTTP_ERROR_RESOLVER_EFORMAT = 0x80436005; +constexpr int ORBIS_HTTP_ERROR_RESOLVER_ESERVERFAILURE = 0x80436006; +constexpr int ORBIS_HTTP_ERROR_RESOLVER_ENOHOST = 0x80436007; +constexpr int ORBIS_HTTP_ERROR_RESOLVER_ENOTIMPLEMENTED = 0x80436008; +constexpr int ORBIS_HTTP_ERROR_RESOLVER_ESERVERREFUSED = 0x80436009; +constexpr int ORBIS_HTTP_ERROR_RESOLVER_ENORECORD = 0x8043600a; + +constexpr int ORBIS_HTTPS_ERROR_CERT = 0x80435060; +constexpr int ORBIS_HTTPS_ERROR_HANDSHAKE = 0x80435061; +constexpr int ORBIS_HTTPS_ERROR_IO = 0x80435062; +constexpr int ORBIS_HTTPS_ERROR_INTERNAL = 0x80435063; +constexpr int ORBIS_HTTPS_ERROR_PROXY = 0x80435064; + +constexpr int ORBIS_HTTPS_ERROR_SSL_INTERNAL = 0x01; +constexpr int ORBIS_HTTPS_ERROR_SSL_INVALID_CERT = 0x02; +constexpr int ORBIS_HTTPS_ERROR_SSL_CN_CHECK = 0x04; +constexpr int ORBIS_HTTPS_ERROR_SSL_NOT_AFTER_CHECK = 0x08; +constexpr int ORBIS_HTTPS_ERROR_SSL_NOT_BEFORE_CHECK = 0x10; +constexpr int ORBIS_HTTPS_ERROR_SSL_UNKNOWN_CA = 0x20; diff --git a/src/core/libraries/network/netctl.cpp b/src/core/libraries/network/netctl.cpp index b167d2789..00d980663 100644 --- a/src/core/libraries/network/netctl.cpp +++ b/src/core/libraries/network/netctl.cpp @@ -93,7 +93,7 @@ int PS4_SYSV_ABI sceNetCtlUnregisterCallbackV6() { } int PS4_SYSV_ABI sceNetCtlCheckCallback() { - netctl.CheckCallback(); + LOG_DEBUG(Lib_NetCtl, "(STUBBED) called"); return ORBIS_OK; } @@ -373,7 +373,7 @@ int PS4_SYSV_ABI Func_D8DCB6973537A3DC() { } int PS4_SYSV_ABI sceNetCtlCheckCallbackForNpToolkit() { - netctl.CheckNpToolkitCallback(); + LOG_DEBUG(Lib_NetCtl, "(STUBBED) called"); return ORBIS_OK; } diff --git a/src/core/libraries/network/ssl2.cpp b/src/core/libraries/network/ssl2.cpp new file mode 100644 index 000000000..8ca29526e --- /dev/null +++ b/src/core/libraries/network/ssl2.cpp @@ -0,0 +1,353 @@ +// SPDX-FileCopyrightText: Copyright 2024 shadPS4 Emulator Project +// SPDX-License-Identifier: GPL-2.0-or-later + +#include "common/logging/log.h" +#include "core/libraries/error_codes.h" +#include "core/libraries/libs.h" +#include "core/libraries/network/ssl2.h" + +namespace Libraries::Ssl2 { + +int PS4_SYSV_ABI CA_MGMT_extractKeyBlobEx() { + LOG_ERROR(Lib_Ssl2, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI CA_MGMT_extractPublicKeyInfo() { + LOG_ERROR(Lib_Ssl2, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI CA_MGMT_freeKeyBlob() { + LOG_ERROR(Lib_Ssl2, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI CRYPTO_initAsymmetricKey() { + LOG_ERROR(Lib_Ssl2, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI CRYPTO_uninitAsymmetricKey() { + LOG_ERROR(Lib_Ssl2, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI RSA_verifySignature() { + LOG_ERROR(Lib_Ssl2, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI sceSslCheckRecvPending() { + LOG_ERROR(Lib_Ssl2, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI sceSslClose() { + LOG_ERROR(Lib_Ssl2, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI sceSslConnect() { + LOG_ERROR(Lib_Ssl2, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI sceSslCreateConnection() { + LOG_ERROR(Lib_Ssl2, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI sceSslCreateSslConnection() { + LOG_ERROR(Lib_Ssl2, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI sceSslDeleteConnection() { + LOG_ERROR(Lib_Ssl2, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI sceSslDeleteSslConnection() { + LOG_ERROR(Lib_Ssl2, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI sceSslDisableOption() { + LOG_ERROR(Lib_Ssl2, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI sceSslDisableOptionInternal() { + LOG_ERROR(Lib_Ssl2, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI sceSslDisableOptionInternalInsecure() { + LOG_ERROR(Lib_Ssl2, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI sceSslDisableVerifyOption() { + LOG_ERROR(Lib_Ssl2, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI sceSslEnableOption() { + LOG_ERROR(Lib_Ssl2, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI sceSslEnableOptionInternal() { + LOG_ERROR(Lib_Ssl2, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI sceSslEnableVerifyOption() { + LOG_ERROR(Lib_Ssl2, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI sceSslFreeCaCerts() { + LOG_ERROR(Lib_Ssl2, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI sceSslFreeCaList() { + LOG_ERROR(Lib_Ssl2, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI sceSslFreeSslCertName() { + LOG_ERROR(Lib_Ssl2, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI sceSslGetAlpnSelected() { + LOG_ERROR(Lib_Ssl2, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI sceSslGetCaCerts() { + LOG_ERROR(Lib_Ssl2, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI sceSslGetCaList() { + LOG_ERROR(Lib_Ssl2, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI sceSslGetFingerprint() { + LOG_ERROR(Lib_Ssl2, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI sceSslGetIssuerName() { + LOG_ERROR(Lib_Ssl2, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI sceSslGetMemoryPoolStats() { + LOG_ERROR(Lib_Ssl2, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI sceSslGetNameEntryCount() { + LOG_ERROR(Lib_Ssl2, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI sceSslGetNameEntryInfo() { + LOG_ERROR(Lib_Ssl2, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI sceSslGetNanoSSLModuleId() { + LOG_ERROR(Lib_Ssl2, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI sceSslGetNotAfter() { + LOG_ERROR(Lib_Ssl2, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI sceSslGetNotBefore() { + LOG_ERROR(Lib_Ssl2, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI sceSslGetPeerCert() { + LOG_ERROR(Lib_Ssl2, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI sceSslGetPem() { + LOG_ERROR(Lib_Ssl2, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI sceSslGetSerialNumber() { + LOG_ERROR(Lib_Ssl2, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI sceSslGetSslError() { + LOG_ERROR(Lib_Ssl2, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI sceSslGetSubjectName() { + LOG_ERROR(Lib_Ssl2, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI sceSslInit(std::size_t poolSize) { + LOG_ERROR(Lib_Ssl2, "(DUMMY) called poolSize = {}", poolSize); + // return a value >1 + static int id = 0; + return ++id; +} + +int PS4_SYSV_ABI sceSslLoadCert() { + LOG_ERROR(Lib_Ssl2, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI sceSslLoadRootCACert() { + LOG_ERROR(Lib_Ssl2, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI sceSslRead() { + LOG_ERROR(Lib_Ssl2, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI sceSslRecv() { + LOG_ERROR(Lib_Ssl2, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI sceSslReuseConnection() { + LOG_ERROR(Lib_Ssl2, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI sceSslSend() { + LOG_ERROR(Lib_Ssl2, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI sceSslSetAlpn() { + LOG_ERROR(Lib_Ssl2, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI sceSslSetMinSslVersion() { + LOG_ERROR(Lib_Ssl2, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI sceSslSetSslVersion() { + LOG_ERROR(Lib_Ssl2, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI sceSslSetVerifyCallback() { + LOG_ERROR(Lib_Ssl2, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI sceSslTerm() { + LOG_ERROR(Lib_Ssl2, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI sceSslUnloadCert() { + LOG_ERROR(Lib_Ssl2, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI sceSslWrite() { + LOG_ERROR(Lib_Ssl2, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI VLONG_freeVlongQueue() { + LOG_ERROR(Lib_Ssl2, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_22E76E60BC0587D7() { + LOG_ERROR(Lib_Ssl2, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_28F8791A771D39C7() { + LOG_ERROR(Lib_Ssl2, "(STUBBED) called"); + return ORBIS_OK; +} + +void RegisterlibSceSsl2(Core::Loader::SymbolsResolver* sym) { + LIB_FUNCTION("Md+HYkCBZB4", "libSceSsl", 1, "libSceSsl", 2, 1, CA_MGMT_extractKeyBlobEx); + LIB_FUNCTION("9bKYzKP6kYU", "libSceSsl", 1, "libSceSsl", 2, 1, CA_MGMT_extractPublicKeyInfo); + LIB_FUNCTION("ipLIammTj2Q", "libSceSsl", 1, "libSceSsl", 2, 1, CA_MGMT_freeKeyBlob); + LIB_FUNCTION("PRWr3-ytpdg", "libSceSsl", 1, "libSceSsl", 2, 1, CRYPTO_initAsymmetricKey); + LIB_FUNCTION("cW7VCIMCh9A", "libSceSsl", 1, "libSceSsl", 2, 1, CRYPTO_uninitAsymmetricKey); + LIB_FUNCTION("pBwtarKd7eg", "libSceSsl", 1, "libSceSsl", 2, 1, RSA_verifySignature); + LIB_FUNCTION("1VM0h1JrUfA", "libSceSsl", 1, "libSceSsl", 2, 1, sceSslCheckRecvPending); + LIB_FUNCTION("viRXSHZYd0c", "libSceSsl", 1, "libSceSsl", 2, 1, sceSslClose); + LIB_FUNCTION("zXvd6iNyfgc", "libSceSsl", 1, "libSceSsl", 2, 1, sceSslConnect); + LIB_FUNCTION("tuscfitnhEo", "libSceSsl", 1, "libSceSsl", 2, 1, sceSslCreateConnection); + LIB_FUNCTION("P14ATpXc4J8", "libSceSsl", 1, "libSceSsl", 2, 1, sceSslCreateSslConnection); + LIB_FUNCTION("HJ1n138CQ2g", "libSceSsl", 1, "libSceSsl", 2, 1, sceSslDeleteConnection); + LIB_FUNCTION("hwrHV6Pprk4", "libSceSsl", 1, "libSceSsl", 2, 1, sceSslDeleteSslConnection); + LIB_FUNCTION("iLKz4+ukLqk", "libSceSsl", 1, "libSceSsl", 2, 1, sceSslDisableOption); + LIB_FUNCTION("-WqxBRAUVM4", "libSceSsl", 1, "libSceSsl", 2, 1, sceSslDisableOptionInternal); + LIB_FUNCTION("w1+L-27nYas", "libSceSsl", 1, "libSceSsl", 2, 1, + sceSslDisableOptionInternalInsecure); + LIB_FUNCTION("PwsHbErG+e8", "libSceSsl", 1, "libSceSsl", 2, 1, sceSslDisableVerifyOption); + LIB_FUNCTION("m-zPyAsIpco", "libSceSsl", 1, "libSceSsl", 2, 1, sceSslEnableOption); + LIB_FUNCTION("g-zCwUKstEQ", "libSceSsl", 1, "libSceSsl", 2, 1, sceSslEnableOptionInternal); + LIB_FUNCTION("po1X86mgHDU", "libSceSsl", 1, "libSceSsl", 2, 1, sceSslEnableVerifyOption); + LIB_FUNCTION("qIvLs0gYxi0", "libSceSsl", 1, "libSceSsl", 2, 1, sceSslFreeCaCerts); + LIB_FUNCTION("+DzXseDVkeI", "libSceSsl", 1, "libSceSsl", 2, 1, sceSslFreeCaList); + LIB_FUNCTION("RwXD8grHZHM", "libSceSsl", 1, "libSceSsl", 2, 1, sceSslFreeSslCertName); + LIB_FUNCTION("4O7+bRkRUe8", "libSceSsl", 1, "libSceSsl", 2, 1, sceSslGetAlpnSelected); + LIB_FUNCTION("TDfQqO-gMbY", "libSceSsl", 1, "libSceSsl", 2, 1, sceSslGetCaCerts); + LIB_FUNCTION("qOn+wm28wmA", "libSceSsl", 1, "libSceSsl", 2, 1, sceSslGetCaList); + LIB_FUNCTION("brRtwGBu4A8", "libSceSsl", 1, "libSceSsl", 2, 1, sceSslGetFingerprint); + LIB_FUNCTION("7whYpYfHP74", "libSceSsl", 1, "libSceSsl", 2, 1, sceSslGetIssuerName); + LIB_FUNCTION("-PoIzr3PEk0", "libSceSsl", 1, "libSceSsl", 2, 1, sceSslGetMemoryPoolStats); + LIB_FUNCTION("R1ePzopYPYM", "libSceSsl", 1, "libSceSsl", 2, 1, sceSslGetNameEntryCount); + LIB_FUNCTION("7RBSTKGrmDA", "libSceSsl", 1, "libSceSsl", 2, 1, sceSslGetNameEntryInfo); + LIB_FUNCTION("AzUipl-DpIw", "libSceSsl", 1, "libSceSsl", 2, 1, sceSslGetNanoSSLModuleId); + LIB_FUNCTION("xHpt6+2pGYk", "libSceSsl", 1, "libSceSsl", 2, 1, sceSslGetNotAfter); + LIB_FUNCTION("Eo0S65Jy28Q", "libSceSsl", 1, "libSceSsl", 2, 1, sceSslGetNotBefore); + LIB_FUNCTION("-TbZc8pwPNc", "libSceSsl", 1, "libSceSsl", 2, 1, sceSslGetPeerCert); + LIB_FUNCTION("kLB5aGoUJXg", "libSceSsl", 1, "libSceSsl", 2, 1, sceSslGetPem); + LIB_FUNCTION("DOwXL+FQMEY", "libSceSsl", 1, "libSceSsl", 2, 1, sceSslGetSerialNumber); + LIB_FUNCTION("0XcZknp7-Wc", "libSceSsl", 1, "libSceSsl", 2, 1, sceSslGetSslError); + LIB_FUNCTION("dQReuBX9sD8", "libSceSsl", 1, "libSceSsl", 2, 1, sceSslGetSubjectName); + LIB_FUNCTION("hdpVEUDFW3s", "libSceSsl", 1, "libSceSsl", 2, 1, sceSslInit); + LIB_FUNCTION("Ab7+DH+gYyM", "libSceSsl", 1, "libSceSsl", 2, 1, sceSslLoadCert); + LIB_FUNCTION("3-643mGVFJo", "libSceSsl", 1, "libSceSsl", 2, 1, sceSslLoadRootCACert); + LIB_FUNCTION("jltWpVKtetg", "libSceSsl", 1, "libSceSsl", 2, 1, sceSslRead); + LIB_FUNCTION("hi0veU3L2pU", "libSceSsl", 1, "libSceSsl", 2, 1, sceSslRecv); + LIB_FUNCTION("50R2xYaYZwE", "libSceSsl", 1, "libSceSsl", 2, 1, sceSslReuseConnection); + LIB_FUNCTION("p5bM5PPufFY", "libSceSsl", 1, "libSceSsl", 2, 1, sceSslSend); + LIB_FUNCTION("TL86glUrmUw", "libSceSsl", 1, "libSceSsl", 2, 1, sceSslSetAlpn); + LIB_FUNCTION("QWSxBzf6lAg", "libSceSsl", 1, "libSceSsl", 2, 1, sceSslSetMinSslVersion); + LIB_FUNCTION("bKaEtQnoUuQ", "libSceSsl", 1, "libSceSsl", 2, 1, sceSslSetSslVersion); + LIB_FUNCTION("E4a-ahM57QQ", "libSceSsl", 1, "libSceSsl", 2, 1, sceSslSetVerifyCallback); + LIB_FUNCTION("0K1yQ6Lv-Yc", "libSceSsl", 1, "libSceSsl", 2, 1, sceSslTerm); + LIB_FUNCTION("UQ+3Qu7v3cA", "libSceSsl", 1, "libSceSsl", 2, 1, sceSslUnloadCert); + LIB_FUNCTION("iNjkt9Poblw", "libSceSsl", 1, "libSceSsl", 2, 1, sceSslWrite); + LIB_FUNCTION("wcVuyTUr5ys", "libSceSsl", 1, "libSceSsl", 2, 1, VLONG_freeVlongQueue); + LIB_FUNCTION("IuduYLwFh9c", "libSceSsl", 1, "libSceSsl", 2, 1, Func_22E76E60BC0587D7); + LIB_FUNCTION("KPh5GncdOcc", "libSceSsl", 1, "libSceSsl", 2, 1, Func_28F8791A771D39C7); +}; + +} // namespace Libraries::Ssl2 \ No newline at end of file diff --git a/src/core/libraries/network/ssl2.h b/src/core/libraries/network/ssl2.h new file mode 100644 index 000000000..03ee3b86e --- /dev/null +++ b/src/core/libraries/network/ssl2.h @@ -0,0 +1,14 @@ +// SPDX-FileCopyrightText: Copyright 2024 shadPS4 Emulator Project +// SPDX-License-Identifier: GPL-2.0-or-later + +#pragma once + +#include "common/types.h" + +namespace Core::Loader { +class SymbolsResolver; +} + +namespace Libraries::Ssl2 { +void RegisterlibSceSsl2(Core::Loader::SymbolsResolver* sym); +} // namespace Libraries::Ssl2 \ No newline at end of file diff --git a/src/core/libraries/ngs2/ngs2.cpp b/src/core/libraries/ngs2/ngs2.cpp index 7eb663413..0b42e2471 100644 --- a/src/core/libraries/ngs2/ngs2.cpp +++ b/src/core/libraries/ngs2/ngs2.cpp @@ -5,21 +5,480 @@ #include "core/libraries/error_codes.h" #include "core/libraries/libs.h" #include "core/libraries/ngs2/ngs2.h" +#include "core/libraries/ngs2/ngs2_custom.h" #include "core/libraries/ngs2/ngs2_error.h" +#include "core/libraries/ngs2/ngs2_geom.h" #include "core/libraries/ngs2/ngs2_impl.h" +#include "core/libraries/ngs2/ngs2_pan.h" +#include "core/libraries/ngs2/ngs2_report.h" namespace Libraries::Ngs2 { -int PS4_SYSV_ABI sceNgs2CalcWaveformBlock() { - LOG_ERROR(Lib_Ngs2, "(STUBBED) called"); +// Ngs2 + +s32 PS4_SYSV_ABI sceNgs2CalcWaveformBlock(const OrbisNgs2WaveformFormat* format, u32 samplePos, + u32 numSamples, OrbisNgs2WaveformBlock* outBlock) { + LOG_INFO(Lib_Ngs2, "samplePos = {}, numSamples = {}", samplePos, numSamples); return ORBIS_OK; } -int PS4_SYSV_ABI sceNgs2CustomRackGetModuleInfo() { - LOG_ERROR(Lib_Ngs2, "(STUBBED) called"); +s32 PS4_SYSV_ABI sceNgs2GetWaveformFrameInfo(const OrbisNgs2WaveformFormat* format, + u32* outFrameSize, u32* outNumFrameSamples, + u32* outUnitsPerFrame, u32* outNumDelaySamples) { + LOG_INFO(Lib_Ngs2, "called"); return ORBIS_OK; } +s32 PS4_SYSV_ABI sceNgs2ParseWaveformData(const void* data, size_t dataSize, + OrbisNgs2WaveformInfo* outInfo) { + LOG_INFO(Lib_Ngs2, "dataSize = {}", dataSize); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI sceNgs2ParseWaveformFile(const char* path, u64 offset, + OrbisNgs2WaveformInfo* outInfo) { + LOG_INFO(Lib_Ngs2, "path = {}, offset = {}", path, offset); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI sceNgs2ParseWaveformUser(OrbisNgs2ParseReadHandler handler, uintptr_t userData, + OrbisNgs2WaveformInfo* outInfo) { + LOG_INFO(Lib_Ngs2, "userData = {}", userData); + if (!handler) { + LOG_ERROR(Lib_Ngs2, "handler is nullptr"); + return ORBIS_NGS2_ERROR_INVALID_HANDLE; + } + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI sceNgs2RackCreate(OrbisNgs2Handle systemHandle, u32 rackId, + const OrbisNgs2RackOption* option, + const OrbisNgs2ContextBufferInfo* bufferInfo, + OrbisNgs2Handle* outHandle) { + LOG_INFO(Lib_Ngs2, "rackId = {}", rackId); + if (!systemHandle) { + LOG_ERROR(Lib_Ngs2, "systemHandle is nullptr"); + return ORBIS_NGS2_ERROR_INVALID_SYSTEM_HANDLE; + } + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI sceNgs2RackCreateWithAllocator(OrbisNgs2Handle systemHandle, u32 rackId, + const OrbisNgs2RackOption* option, + const OrbisNgs2BufferAllocator* allocator, + OrbisNgs2Handle* outHandle) { + LOG_INFO(Lib_Ngs2, "rackId = {}", rackId); + if (!systemHandle) { + LOG_ERROR(Lib_Ngs2, "systemHandle is nullptr"); + return ORBIS_NGS2_ERROR_INVALID_SYSTEM_HANDLE; + } + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI sceNgs2RackDestroy(OrbisNgs2Handle rackHandle, + OrbisNgs2ContextBufferInfo* outBufferInfo) { + if (!rackHandle) { + LOG_ERROR(Lib_Ngs2, "rackHandle is nullptr"); + return ORBIS_NGS2_ERROR_INVALID_RACK_HANDLE; + } + LOG_INFO(Lib_Ngs2, "called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI sceNgs2RackGetInfo(OrbisNgs2Handle rackHandle, OrbisNgs2RackInfo* outInfo, + size_t infoSize) { + LOG_INFO(Lib_Ngs2, "infoSize = {}", infoSize); + if (!rackHandle) { + LOG_ERROR(Lib_Ngs2, "rackHandle is nullptr"); + return ORBIS_NGS2_ERROR_INVALID_RACK_HANDLE; + } + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI sceNgs2RackGetUserData(OrbisNgs2Handle rackHandle, uintptr_t* outUserData) { + if (!rackHandle) { + LOG_ERROR(Lib_Ngs2, "rackHandle is nullptr"); + return ORBIS_NGS2_ERROR_INVALID_RACK_HANDLE; + } + LOG_INFO(Lib_Ngs2, "called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI sceNgs2RackGetVoiceHandle(OrbisNgs2Handle rackHandle, u32 voiceIndex, + OrbisNgs2Handle* outHandle) { + LOG_INFO(Lib_Ngs2, "voiceIndex = {}", voiceIndex); + if (!rackHandle) { + LOG_ERROR(Lib_Ngs2, "rackHandle is nullptr"); + return ORBIS_NGS2_ERROR_INVALID_RACK_HANDLE; + } + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI sceNgs2RackLock(OrbisNgs2Handle rackHandle) { + if (!rackHandle) { + LOG_ERROR(Lib_Ngs2, "rackHandle is nullptr"); + return ORBIS_NGS2_ERROR_INVALID_RACK_HANDLE; + } + LOG_INFO(Lib_Ngs2, "called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI sceNgs2RackQueryBufferSize(u32 rackId, const OrbisNgs2RackOption* option, + OrbisNgs2ContextBufferInfo* outBufferInfo) { + LOG_INFO(Lib_Ngs2, "rackId = {}", rackId); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI sceNgs2RackSetUserData(OrbisNgs2Handle rackHandle, uintptr_t userData) { + LOG_INFO(Lib_Ngs2, "userData = {}", userData); + if (!rackHandle) { + LOG_ERROR(Lib_Ngs2, "rackHandle is nullptr"); + return ORBIS_NGS2_ERROR_INVALID_RACK_HANDLE; + } + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI sceNgs2RackUnlock(OrbisNgs2Handle rackHandle) { + if (!rackHandle) { + LOG_ERROR(Lib_Ngs2, "rackHandle is nullptr"); + return ORBIS_NGS2_ERROR_INVALID_RACK_HANDLE; + } + LOG_INFO(Lib_Ngs2, "called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI sceNgs2SystemCreate(const OrbisNgs2SystemOption* option, + const OrbisNgs2ContextBufferInfo* bufferInfo, + OrbisNgs2Handle* outHandle) { + s32 result; + OrbisNgs2ContextBufferInfo localInfo; + if (!bufferInfo || !outHandle) { + if (!bufferInfo) { + result = ORBIS_NGS2_ERROR_INVALID_BUFFER_INFO; + LOG_ERROR(Lib_Ngs2, "Invalid system buffer info {}", (void*)bufferInfo); + } else { + result = ORBIS_NGS2_ERROR_INVALID_OUT_ADDRESS; + LOG_ERROR(Lib_Ngs2, "Invalid system handle address {}", (void*)outHandle); + } + + // TODO: Report errors? + } else { + // Make bufferInfo copy + localInfo.hostBuffer = bufferInfo->hostBuffer; + localInfo.hostBufferSize = bufferInfo->hostBufferSize; + for (int i = 0; i < 5; i++) { + localInfo.reserved[i] = bufferInfo->reserved[i]; + } + localInfo.userData = bufferInfo->userData; + + result = SystemSetup(option, &localInfo, 0, outHandle); + } + + // TODO: API reporting? + + LOG_INFO(Lib_Ngs2, "called"); + return result; +} + +s32 PS4_SYSV_ABI sceNgs2SystemCreateWithAllocator(const OrbisNgs2SystemOption* option, + const OrbisNgs2BufferAllocator* allocator, + OrbisNgs2Handle* outHandle) { + s32 result; + if (allocator && allocator->allocHandler != 0) { + OrbisNgs2BufferAllocHandler hostAlloc = allocator->allocHandler; + if (outHandle) { + OrbisNgs2BufferFreeHandler hostFree = allocator->freeHandler; + OrbisNgs2ContextBufferInfo* bufferInfo = 0; + result = SystemSetup(option, bufferInfo, 0, 0); + if (result >= 0) { + uintptr_t sysUserData = allocator->userData; + result = hostAlloc(bufferInfo); + if (result >= 0) { + OrbisNgs2Handle* handleCopy = outHandle; + result = SystemSetup(option, bufferInfo, hostFree, handleCopy); + if (result < 0) { + if (hostFree) { + hostFree(bufferInfo); + } + } + } + } + } else { + result = ORBIS_NGS2_ERROR_INVALID_OUT_ADDRESS; + LOG_ERROR(Lib_Ngs2, "Invalid system handle address {}", (void*)outHandle); + } + } else { + result = ORBIS_NGS2_ERROR_INVALID_BUFFER_ALLOCATOR; + LOG_ERROR(Lib_Ngs2, "Invalid system buffer allocator {}", (void*)allocator); + } + LOG_INFO(Lib_Ngs2, "called"); + return result; +} + +s32 PS4_SYSV_ABI sceNgs2SystemDestroy(OrbisNgs2Handle systemHandle, + OrbisNgs2ContextBufferInfo* outBufferInfo) { + if (!systemHandle) { + LOG_ERROR(Lib_Ngs2, "systemHandle is nullptr"); + return ORBIS_NGS2_ERROR_INVALID_SYSTEM_HANDLE; + } + LOG_INFO(Lib_Ngs2, "called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI sceNgs2SystemEnumHandles(OrbisNgs2Handle* aOutHandle, u32 maxHandles) { + LOG_INFO(Lib_Ngs2, "maxHandles = {}", maxHandles); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI sceNgs2SystemEnumRackHandles(OrbisNgs2Handle systemHandle, + OrbisNgs2Handle* aOutHandle, u32 maxHandles) { + LOG_INFO(Lib_Ngs2, "maxHandles = {}", maxHandles); + if (!systemHandle) { + LOG_ERROR(Lib_Ngs2, "systemHandle is nullptr"); + return ORBIS_NGS2_ERROR_INVALID_SYSTEM_HANDLE; + } + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI sceNgs2SystemGetInfo(OrbisNgs2Handle rackHandle, OrbisNgs2SystemInfo* outInfo, + size_t infoSize) { + LOG_INFO(Lib_Ngs2, "infoSize = {}", infoSize); + if (!rackHandle) { + LOG_ERROR(Lib_Ngs2, "rackHandle is nullptr"); + return ORBIS_NGS2_ERROR_INVALID_RACK_HANDLE; + } + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI sceNgs2SystemGetUserData(OrbisNgs2Handle systemHandle, uintptr_t* outUserData) { + if (!systemHandle) { + LOG_ERROR(Lib_Ngs2, "systemHandle is nullptr"); + return ORBIS_NGS2_ERROR_INVALID_SYSTEM_HANDLE; + } + LOG_INFO(Lib_Ngs2, "called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI sceNgs2SystemLock(OrbisNgs2Handle systemHandle) { + if (!systemHandle) { + LOG_ERROR(Lib_Ngs2, "systemHandle is nullptr"); + return ORBIS_NGS2_ERROR_INVALID_SYSTEM_HANDLE; + } + LOG_INFO(Lib_Ngs2, "called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI sceNgs2SystemQueryBufferSize(const OrbisNgs2SystemOption* option, + OrbisNgs2ContextBufferInfo* outBufferInfo) { + s32 result; + if (outBufferInfo) { + result = SystemSetup(option, outBufferInfo, 0, 0); + LOG_INFO(Lib_Ngs2, "called"); + } else { + result = ORBIS_NGS2_ERROR_INVALID_OUT_ADDRESS; + LOG_ERROR(Lib_Ngs2, "Invalid system buffer info {}", (void*)outBufferInfo); + } + + return result; +} + +s32 PS4_SYSV_ABI sceNgs2SystemRender(OrbisNgs2Handle systemHandle, + const OrbisNgs2RenderBufferInfo* aBufferInfo, + u32 numBufferInfo) { + LOG_INFO(Lib_Ngs2, "numBufferInfo = {}", numBufferInfo); + if (!systemHandle) { + LOG_ERROR(Lib_Ngs2, "systemHandle is nullptr"); + return ORBIS_NGS2_ERROR_INVALID_SYSTEM_HANDLE; + } + return ORBIS_OK; +} + +static s32 PS4_SYSV_ABI sceNgs2SystemResetOption(OrbisNgs2SystemOption* outOption) { + static const OrbisNgs2SystemOption option = { + sizeof(OrbisNgs2SystemOption), "", 0, 512, 256, 48000, {0}}; + + if (!outOption) { + LOG_ERROR(Lib_Ngs2, "Invalid system option address {}", (void*)outOption); + return ORBIS_NGS2_ERROR_INVALID_OPTION_ADDRESS; + } + *outOption = option; + + LOG_INFO(Lib_Ngs2, "called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI sceNgs2SystemSetGrainSamples(OrbisNgs2Handle systemHandle, u32 numSamples) { + LOG_INFO(Lib_Ngs2, "numSamples = {}", numSamples); + if (!systemHandle) { + LOG_ERROR(Lib_Ngs2, "systemHandle is nullptr"); + return ORBIS_NGS2_ERROR_INVALID_SYSTEM_HANDLE; + } + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI sceNgs2SystemSetSampleRate(OrbisNgs2Handle systemHandle, u32 sampleRate) { + LOG_INFO(Lib_Ngs2, "sampleRate = {}", sampleRate); + if (!systemHandle) { + LOG_ERROR(Lib_Ngs2, "systemHandle is nullptr"); + return ORBIS_NGS2_ERROR_INVALID_SYSTEM_HANDLE; + } + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI sceNgs2SystemSetUserData(OrbisNgs2Handle systemHandle, uintptr_t userData) { + LOG_INFO(Lib_Ngs2, "userData = {}", userData); + if (!systemHandle) { + LOG_ERROR(Lib_Ngs2, "systemHandle is nullptr"); + return ORBIS_NGS2_ERROR_INVALID_SYSTEM_HANDLE; + } + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI sceNgs2SystemUnlock(OrbisNgs2Handle systemHandle) { + if (!systemHandle) { + LOG_ERROR(Lib_Ngs2, "systemHandle is nullptr"); + return ORBIS_NGS2_ERROR_INVALID_SYSTEM_HANDLE; + } + LOG_INFO(Lib_Ngs2, "called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI sceNgs2VoiceControl(OrbisNgs2Handle voiceHandle, + const OrbisNgs2VoiceParamHeader* paramList) { + if (!voiceHandle) { + LOG_ERROR(Lib_Ngs2, "voiceHandle is nullptr"); + return ORBIS_NGS2_ERROR_INVALID_VOICE_HANDLE; + } + LOG_INFO(Lib_Ngs2, "called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI sceNgs2VoiceGetMatrixInfo(OrbisNgs2Handle voiceHandle, u32 matrixId, + OrbisNgs2VoiceMatrixInfo* outInfo, size_t outInfoSize) { + LOG_INFO(Lib_Ngs2, "matrixId = {}, outInfoSize = {}", matrixId, outInfoSize); + if (!voiceHandle) { + LOG_ERROR(Lib_Ngs2, "voiceHandle is nullptr"); + return ORBIS_NGS2_ERROR_INVALID_VOICE_HANDLE; + } + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI sceNgs2VoiceGetOwner(OrbisNgs2Handle voiceHandle, OrbisNgs2Handle* outRackHandle, + u32* outVoiceId) { + if (!voiceHandle) { + LOG_ERROR(Lib_Ngs2, "voiceHandle is nullptr"); + return ORBIS_NGS2_ERROR_INVALID_VOICE_HANDLE; + } + LOG_INFO(Lib_Ngs2, "called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI sceNgs2VoiceGetPortInfo(OrbisNgs2Handle voiceHandle, u32 port, + OrbisNgs2VoicePortInfo* outInfo, size_t outInfoSize) { + LOG_INFO(Lib_Ngs2, "port = {}, outInfoSize = {}", port, outInfoSize); + if (!voiceHandle) { + LOG_ERROR(Lib_Ngs2, "voiceHandle is nullptr"); + return ORBIS_NGS2_ERROR_INVALID_VOICE_HANDLE; + } + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI sceNgs2VoiceGetState(OrbisNgs2Handle voiceHandle, OrbisNgs2VoiceState* outState, + size_t stateSize) { + LOG_INFO(Lib_Ngs2, "stateSize = {}", stateSize); + if (!voiceHandle) { + LOG_ERROR(Lib_Ngs2, "voiceHandle is nullptr"); + return ORBIS_NGS2_ERROR_INVALID_VOICE_HANDLE; + } + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI sceNgs2VoiceGetStateFlags(OrbisNgs2Handle voiceHandle, u32* outStateFlags) { + if (!voiceHandle) { + LOG_ERROR(Lib_Ngs2, "voiceHandle is nullptr"); + return ORBIS_NGS2_ERROR_INVALID_VOICE_HANDLE; + } + LOG_INFO(Lib_Ngs2, "called"); + return ORBIS_OK; +} + +// Ngs2Custom + +s32 PS4_SYSV_ABI sceNgs2CustomRackGetModuleInfo(OrbisNgs2Handle rackHandle, u32 moduleIndex, + OrbisNgs2CustomModuleInfo* outInfo, + size_t infoSize) { + LOG_INFO(Lib_Ngs2, "moduleIndex = {}, infoSize = {}", moduleIndex, infoSize); + if (!rackHandle) { + LOG_ERROR(Lib_Ngs2, "rackHandle is nullptr"); + return ORBIS_NGS2_ERROR_INVALID_RACK_HANDLE; + } + return ORBIS_OK; +} + +// Ngs2Geom + +s32 PS4_SYSV_ABI sceNgs2GeomResetListenerParam(OrbisNgs2GeomListenerParam* outListenerParam) { + LOG_INFO(Lib_Ngs2, "called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI sceNgs2GeomResetSourceParam(OrbisNgs2GeomSourceParam* outSourceParam) { + LOG_INFO(Lib_Ngs2, "called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI sceNgs2GeomCalcListener(const OrbisNgs2GeomListenerParam* param, + OrbisNgs2GeomListenerWork* outWork, u32 flags) { + LOG_INFO(Lib_Ngs2, "flags = {}", flags); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI sceNgs2GeomApply(const OrbisNgs2GeomListenerWork* listener, + const OrbisNgs2GeomSourceParam* source, + OrbisNgs2GeomAttribute* outAttrib, u32 flags) { + LOG_INFO(Lib_Ngs2, "flags = {}", flags); + return ORBIS_OK; +} + +// Ngs2Pan + +s32 PS4_SYSV_ABI sceNgs2PanInit(OrbisNgs2PanWork* work, const float* aSpeakerAngle, float unitAngle, + u32 numSpeakers) { + LOG_INFO(Lib_Ngs2, "aSpeakerAngle = {}, unitAngle = {}, numSpeakers = {}", *aSpeakerAngle, + unitAngle, numSpeakers); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI sceNgs2PanGetVolumeMatrix(OrbisNgs2PanWork* work, const OrbisNgs2PanParam* aParam, + u32 numParams, u32 matrixFormat, + float* outVolumeMatrix) { + LOG_INFO(Lib_Ngs2, "numParams = {}, matrixFormat = {}", numParams, matrixFormat); + return ORBIS_OK; +} + +// Ngs2Report + +s32 PS4_SYSV_ABI sceNgs2ReportRegisterHandler(u32 reportType, OrbisNgs2ReportHandler handler, + uintptr_t userData, OrbisNgs2Handle* outHandle) { + LOG_INFO(Lib_Ngs2, "reportType = {}, userData = {}", reportType, userData); + if (!handler) { + LOG_ERROR(Lib_Ngs2, "handler is nullptr"); + return ORBIS_NGS2_ERROR_INVALID_REPORT_HANDLE; + } + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI sceNgs2ReportUnregisterHandler(OrbisNgs2Handle reportHandle) { + if (!reportHandle) { + LOG_ERROR(Lib_Ngs2, "reportHandle is nullptr"); + return ORBIS_NGS2_ERROR_INVALID_REPORT_HANDLE; + } + LOG_INFO(Lib_Ngs2, "called"); + return ORBIS_OK; +} + +// Unknown + int PS4_SYSV_ABI sceNgs2FftInit() { LOG_ERROR(Lib_Ngs2, "(STUBBED) called"); return ORBIS_OK; @@ -35,31 +494,6 @@ int PS4_SYSV_ABI sceNgs2FftQuerySize() { return ORBIS_OK; } -int PS4_SYSV_ABI sceNgs2GeomApply() { - LOG_ERROR(Lib_Ngs2, "(STUBBED) called"); - return ORBIS_OK; -} - -int PS4_SYSV_ABI sceNgs2GeomCalcListener() { - LOG_ERROR(Lib_Ngs2, "(STUBBED) called"); - return ORBIS_OK; -} - -int PS4_SYSV_ABI sceNgs2GeomResetListenerParam() { - LOG_ERROR(Lib_Ngs2, "(STUBBED) called"); - return ORBIS_OK; -} - -int PS4_SYSV_ABI sceNgs2GeomResetSourceParam() { - LOG_ERROR(Lib_Ngs2, "(STUBBED) called"); - return ORBIS_OK; -} - -int PS4_SYSV_ABI sceNgs2GetWaveformFrameInfo() { - LOG_ERROR(Lib_Ngs2, "(STUBBED) called"); - return ORBIS_OK; -} - int PS4_SYSV_ABI sceNgs2JobSchedulerResetOption() { LOG_ERROR(Lib_Ngs2, "(STUBBED) called"); return ORBIS_OK; @@ -80,71 +514,6 @@ int PS4_SYSV_ABI sceNgs2ModuleQueueEnumItems() { return ORBIS_OK; } -int PS4_SYSV_ABI sceNgs2PanGetVolumeMatrix() { - LOG_ERROR(Lib_Ngs2, "(STUBBED) called"); - return ORBIS_OK; -} - -int PS4_SYSV_ABI sceNgs2PanInit() { - LOG_ERROR(Lib_Ngs2, "(STUBBED) called"); - return ORBIS_OK; -} - -int PS4_SYSV_ABI sceNgs2ParseWaveformData() { - LOG_ERROR(Lib_Ngs2, "(STUBBED) called"); - return ORBIS_OK; -} - -int PS4_SYSV_ABI sceNgs2ParseWaveformFile() { - LOG_ERROR(Lib_Ngs2, "(STUBBED) called"); - return ORBIS_OK; -} - -int PS4_SYSV_ABI sceNgs2ParseWaveformUser() { - LOG_ERROR(Lib_Ngs2, "(STUBBED) called"); - return ORBIS_OK; -} - -int PS4_SYSV_ABI sceNgs2RackCreate() { - LOG_ERROR(Lib_Ngs2, "(STUBBED) called"); - return ORBIS_OK; -} - -int PS4_SYSV_ABI sceNgs2RackCreateWithAllocator() { - LOG_ERROR(Lib_Ngs2, "(STUBBED) called"); - return ORBIS_OK; -} - -int PS4_SYSV_ABI sceNgs2RackDestroy() { - LOG_ERROR(Lib_Ngs2, "(STUBBED) called"); - return ORBIS_OK; -} - -int PS4_SYSV_ABI sceNgs2RackGetInfo() { - LOG_ERROR(Lib_Ngs2, "(STUBBED) called"); - return ORBIS_OK; -} - -int PS4_SYSV_ABI sceNgs2RackGetUserData() { - LOG_ERROR(Lib_Ngs2, "(STUBBED) called"); - return ORBIS_OK; -} - -int PS4_SYSV_ABI sceNgs2RackGetVoiceHandle() { - LOG_ERROR(Lib_Ngs2, "(STUBBED) called"); - return ORBIS_OK; -} - -int PS4_SYSV_ABI sceNgs2RackLock() { - LOG_ERROR(Lib_Ngs2, "(STUBBED) called"); - return ORBIS_OK; -} - -int PS4_SYSV_ABI sceNgs2RackQueryBufferSize() { - LOG_ERROR(Lib_Ngs2, "(STUBBED) called"); - return ORBIS_OK; -} - int PS4_SYSV_ABI sceNgs2RackQueryInfo() { LOG_ERROR(Lib_Ngs2, "(STUBBED) called"); return ORBIS_OK; @@ -155,116 +524,21 @@ int PS4_SYSV_ABI sceNgs2RackRunCommands() { return ORBIS_OK; } -int PS4_SYSV_ABI sceNgs2RackSetUserData() { - LOG_ERROR(Lib_Ngs2, "(STUBBED) called"); - return ORBIS_OK; -} - -int PS4_SYSV_ABI sceNgs2RackUnlock() { - LOG_ERROR(Lib_Ngs2, "(STUBBED) called"); - return ORBIS_OK; -} - -int PS4_SYSV_ABI sceNgs2ReportRegisterHandler() { - LOG_ERROR(Lib_Ngs2, "(STUBBED) called"); - return ORBIS_OK; -} - -int PS4_SYSV_ABI sceNgs2ReportUnregisterHandler() { - LOG_ERROR(Lib_Ngs2, "(STUBBED) called"); - return ORBIS_OK; -} - -int PS4_SYSV_ABI sceNgs2SystemCreate() { - LOG_ERROR(Lib_Ngs2, "(STUBBED) called"); - return ORBIS_OK; -} - -int PS4_SYSV_ABI sceNgs2SystemCreateWithAllocator() { - LOG_ERROR(Lib_Ngs2, "(STUBBED) called"); - return ORBIS_OK; -} - -int PS4_SYSV_ABI sceNgs2SystemDestroy() { - LOG_ERROR(Lib_Ngs2, "(STUBBED) called"); - return ORBIS_OK; -} - -int PS4_SYSV_ABI sceNgs2SystemEnumHandles() { - LOG_ERROR(Lib_Ngs2, "(STUBBED) called"); - return ORBIS_OK; -} - -int PS4_SYSV_ABI sceNgs2SystemEnumRackHandles() { - LOG_ERROR(Lib_Ngs2, "(STUBBED) called"); - return ORBIS_OK; -} - -int PS4_SYSV_ABI sceNgs2SystemGetInfo() { - LOG_ERROR(Lib_Ngs2, "(STUBBED) called"); - return ORBIS_OK; -} - -int PS4_SYSV_ABI sceNgs2SystemGetUserData() { - LOG_ERROR(Lib_Ngs2, "(STUBBED) called"); - return ORBIS_OK; -} - -int PS4_SYSV_ABI sceNgs2SystemLock() { - LOG_ERROR(Lib_Ngs2, "(STUBBED) called"); - return ORBIS_OK; -} - -int PS4_SYSV_ABI sceNgs2SystemQueryBufferSize() { - LOG_ERROR(Lib_Ngs2, "(STUBBED) called"); - return ORBIS_OK; -} - int PS4_SYSV_ABI sceNgs2SystemQueryInfo() { LOG_ERROR(Lib_Ngs2, "(STUBBED) called"); return ORBIS_OK; } -int PS4_SYSV_ABI sceNgs2SystemRender() { - LOG_ERROR(Lib_Ngs2, "(STUBBED) called"); - return ORBIS_OK; -} - -int PS4_SYSV_ABI sceNgs2SystemResetOption() { - LOG_ERROR(Lib_Ngs2, "(STUBBED) called"); - return ORBIS_OK; -} - int PS4_SYSV_ABI sceNgs2SystemRunCommands() { LOG_ERROR(Lib_Ngs2, "(STUBBED) called"); return ORBIS_OK; } -int PS4_SYSV_ABI sceNgs2SystemSetGrainSamples() { - LOG_ERROR(Lib_Ngs2, "(STUBBED) called"); - return ORBIS_OK; -} - int PS4_SYSV_ABI sceNgs2SystemSetLoudThreshold() { LOG_ERROR(Lib_Ngs2, "(STUBBED) called"); return ORBIS_OK; } -int PS4_SYSV_ABI sceNgs2SystemSetSampleRate() { - LOG_ERROR(Lib_Ngs2, "(STUBBED) called"); - return ORBIS_OK; -} - -int PS4_SYSV_ABI sceNgs2SystemSetUserData() { - LOG_ERROR(Lib_Ngs2, "(STUBBED) called"); - return ORBIS_OK; -} - -int PS4_SYSV_ABI sceNgs2SystemUnlock() { - LOG_ERROR(Lib_Ngs2, "(STUBBED) called"); - return ORBIS_OK; -} - int PS4_SYSV_ABI sceNgs2StreamCreate() { LOG_ERROR(Lib_Ngs2, "(STUBBED) called"); return ORBIS_OK; @@ -300,36 +574,6 @@ int PS4_SYSV_ABI sceNgs2StreamRunCommands() { return ORBIS_OK; } -int PS4_SYSV_ABI sceNgs2VoiceControl() { - LOG_ERROR(Lib_Ngs2, "(STUBBED) called"); - return ORBIS_OK; -} - -int PS4_SYSV_ABI sceNgs2VoiceGetMatrixInfo() { - LOG_ERROR(Lib_Ngs2, "(STUBBED) called"); - return ORBIS_OK; -} - -int PS4_SYSV_ABI sceNgs2VoiceGetOwner() { - LOG_ERROR(Lib_Ngs2, "(STUBBED) called"); - return ORBIS_OK; -} - -int PS4_SYSV_ABI sceNgs2VoiceGetPortInfo() { - LOG_ERROR(Lib_Ngs2, "(STUBBED) called"); - return ORBIS_OK; -} - -int PS4_SYSV_ABI sceNgs2VoiceGetState() { - LOG_ERROR(Lib_Ngs2, "(STUBBED) called"); - return ORBIS_OK; -} - -int PS4_SYSV_ABI sceNgs2VoiceGetStateFlags() { - LOG_ERROR(Lib_Ngs2, "(STUBBED) called"); - return ORBIS_OK; -} - int PS4_SYSV_ABI sceNgs2VoiceQueryInfo() { LOG_ERROR(Lib_Ngs2, "(STUBBED) called"); return ORBIS_OK; diff --git a/src/core/libraries/ngs2/ngs2.h b/src/core/libraries/ngs2/ngs2.h index a5f1f52a6..a34bf21d4 100644 --- a/src/core/libraries/ngs2/ngs2.h +++ b/src/core/libraries/ngs2/ngs2.h @@ -3,7 +3,11 @@ #pragma once +#include "core/libraries/ngs2/ngs2_impl.h" + #include +#include +#include #include "common/types.h" namespace Core::Loader { @@ -12,60 +16,253 @@ class SymbolsResolver; namespace Libraries::Ngs2 { -class Ngs2; +typedef s32 (*OrbisNgs2ParseReadHandler)(uintptr_t userData, u32 offset, void* data, size_t size); -using SceNgs2Handle = Ngs2*; - -enum class SceNgs2HandleType : u32 { - System = 0, +enum class OrbisNgs2HandleType : u32 { + Invalid = 0, + System = 1, + Rack = 2, + Voice = 3, + VoiceControl = 6 }; -struct Ngs2Handle { - void* selfPointer; - void* dataPointer; - std::atomic* atomicPtr; - u32 handleType; - u32 flags_unk; +static const int ORBIS_NGS2_MAX_VOICE_CHANNELS = 8; +static const int ORBIS_NGS2_WAVEFORM_INFO_MAX_BLOCKS = 4; +static const int ORBIS_NGS2_MAX_MATRIX_LEVELS = + (ORBIS_NGS2_MAX_VOICE_CHANNELS * ORBIS_NGS2_MAX_VOICE_CHANNELS); - u32 uid; - u16 maxGrainSamples; - u16 minGrainSamples; - u16 currentGrainSamples; - u16 numGrainSamples; - u16 unknown2; +struct OrbisNgs2WaveformFormat { + u32 waveformType; + u32 numChannels; u32 sampleRate; - u32 unknown3; - - void* flushMutex; - u32 flushMutexInitialized; - void* processMutex; - u32 processMutexInitialized; - - // Linked list pointers for system list - Ngs2Handle* prev; - Ngs2Handle* next; + u32 configData; + u32 frameOffset; + u32 frameMargin; }; -struct SystemOptions { - char padding[6]; - s32 maxGrainSamples; - s32 numGrainSamples; - s32 sampleRate; +struct OrbisNgs2WaveformBlock { + u32 dataOffset; + u32 dataSize; + u32 numRepeats; + u32 numSkipSamples; + u32 numSamples; + u32 reserved; + uintptr_t userData; }; -struct SystemState { - // TODO +struct OrbisNgs2WaveformInfo { + OrbisNgs2WaveformFormat format; + + u32 dataOffset; + u32 dataSize; + + u32 loopBeginPosition; + u32 loopEndPosition; + u32 numSamples; + + u32 audioUnitSize; + u32 numAudioUnitSamples; + u32 numAudioUnitPerFrame; + + u32 audioFrameSize; + u32 numAudioFrameSamples; + + u32 numDelaySamples; + + u32 numBlocks; + OrbisNgs2WaveformBlock aBlock[ORBIS_NGS2_WAVEFORM_INFO_MAX_BLOCKS]; }; -struct StackBuffer { - void** top; - void* base; - void* curr; - size_t usedSize; - size_t totalSize; - size_t alignment; - char isVerifyEnabled; - char padding[7]; +struct OrbisNgs2EnvelopePoint { + u32 curve; + u32 duration; + float height; +}; + +struct OrbisNgs2UserFxProcessContext { + float** aChannelData; + uintptr_t userData0; + uintptr_t userData1; + uintptr_t userData2; + u32 flags; + u32 numChannels; + u32 numGrainSamples; + u32 sampleRate; +}; + +typedef s32 (*OrbisNgs2UserFxProcessHandler)(OrbisNgs2UserFxProcessContext* context); + +struct OrbisNgs2UserFx2SetupContext { + void* common; + void* param; + void* work; + uintptr_t userData; + u32 maxVoices; + u32 voiceIndex; + u64 reserved[4]; +}; + +typedef s32 (*OrbisNgs2UserFx2SetupHandler)(OrbisNgs2UserFx2SetupContext* context); + +struct OrbisNgs2UserFx2CleanupContext { + void* common; + void* param; + void* work; + uintptr_t userData; + u32 maxVoices; + u32 voiceIndex; + u64 reserved[4]; +}; + +typedef s32 (*OrbisNgs2UserFx2CleanupHandler)(OrbisNgs2UserFx2CleanupContext* context); + +struct OrbisNgs2UserFx2ControlContext { + const void* data; + size_t dataSize; + void* common; + void* param; + uintptr_t userData; + u64 reserved[4]; +}; + +typedef s32 (*OrbisNgs2UserFx2ControlHandler)(OrbisNgs2UserFx2ControlContext* context); + +struct OrbisNgs2UserFx2ProcessContext { + float** aChannelData; + void* common; + const void* param; + void* work; + void* state; + uintptr_t userData; + u32 flags; + u32 numInputChannels; + u32 numOutputChannels; + u32 numGrainSamples; + u32 sampleRate; + u32 reserved; + u64 reserved2[4]; +}; + +typedef s32 (*OrbisNgs2UserFx2ProcessHandler)(OrbisNgs2UserFx2ProcessContext* context); + +struct OrbisNgs2BufferAllocator { + OrbisNgs2BufferAllocHandler allocHandler; + OrbisNgs2BufferFreeHandler freeHandler; + uintptr_t userData; +}; + +struct OrbisNgs2RenderBufferInfo { + void* buffer; + size_t bufferSize; + u32 waveformType; + u32 numChannels; +}; + +struct OrbisNgs2RackOption { + size_t size; + char name[ORBIS_NGS2_RACK_NAME_LENGTH]; + + u32 flags; + u32 maxGrainSamples; + u32 maxVoices; + u32 maxInputDelayBlocks; + u32 maxMatrices; + u32 maxPorts; + u32 aReserved[20]; +}; + +struct OrbisNgs2VoiceParamHeader { + u16 size; + s16 next; + u32 id; +}; + +struct OrbisNgs2VoiceMatrixLevelsParam { + OrbisNgs2VoiceParamHeader header; + + u32 matrixId; + u32 numLevels; + const float* aLevel; +}; + +struct OrbisNgs2VoicePortMatrixParam { + OrbisNgs2VoiceParamHeader header; + + u32 port; + s32 matrixId; +}; + +struct OrbisNgs2VoicePortVolumeParam { + OrbisNgs2VoiceParamHeader header; + + u32 port; + float level; +}; + +struct OrbisNgs2VoicePortDelayParam { + OrbisNgs2VoiceParamHeader header; + + u32 port; + u32 numSamples; +}; + +struct OrbisNgs2VoicePatchParam { + OrbisNgs2VoiceParamHeader header; + + u32 port; + u32 destInputId; + OrbisNgs2Handle destHandle; +}; + +struct OrbisNgs2VoiceEventParam { + OrbisNgs2VoiceParamHeader header; + + u32 eventId; +}; + +struct OrbisNgs2VoiceCallbackInfo { + uintptr_t callbackData; + OrbisNgs2Handle voiceHandle; + u32 flag; + u32 reserved; + union { + struct { + uintptr_t userData; + const void* data; + u32 dataSize; + u32 repeatedCount; + u32 attributeFlags; + u32 reserved2; + } waveformBlock; + } param; +}; + +typedef void (*OrbisNgs2VoiceCallbackHandler)(const OrbisNgs2VoiceCallbackInfo* info); + +struct OrbisNgs2VoiceCallbackParam { + OrbisNgs2VoiceParamHeader header; + OrbisNgs2VoiceCallbackHandler callbackHandler; + + uintptr_t callbackData; + u32 flags; + u32 reserved; +}; + +struct OrbisNgs2VoicePortInfo { + s32 matrixId; + float volume; + u32 numDelaySamples; + u32 destInputId; + OrbisNgs2Handle destHandle; +}; + +struct OrbisNgs2VoiceMatrixInfo { + u32 numLevels; + float aLevel[ORBIS_NGS2_MAX_MATRIX_LEVELS]; +}; + +struct OrbisNgs2VoiceState { + u32 stateFlags; }; void RegisterlibSceNgs2(Core::Loader::SymbolsResolver* sym); diff --git a/src/core/libraries/ngs2/ngs2_custom.cpp b/src/core/libraries/ngs2/ngs2_custom.cpp new file mode 100644 index 000000000..8c82e4e49 --- /dev/null +++ b/src/core/libraries/ngs2/ngs2_custom.cpp @@ -0,0 +1,12 @@ +// SPDX-FileCopyrightText: Copyright 2024 shadPS4 Emulator Project +// SPDX-License-Identifier: GPL-2.0-or-later + +#include "ngs2_error.h" +#include "ngs2_impl.h" + +#include "common/logging/log.h" +#include "core/libraries/error_codes.h" + +using namespace Libraries::Kernel; + +namespace Libraries::Ngs2 {} // namespace Libraries::Ngs2 diff --git a/src/core/libraries/ngs2/ngs2_custom.h b/src/core/libraries/ngs2/ngs2_custom.h new file mode 100644 index 000000000..0c45a5d81 --- /dev/null +++ b/src/core/libraries/ngs2/ngs2_custom.h @@ -0,0 +1,444 @@ +// SPDX-FileCopyrightText: Copyright 2024 shadPS4 Emulator Project +// SPDX-License-Identifier: GPL-2.0-or-later + +#pragma once + +#include "ngs2.h" +#include "ngs2_reverb.h" + +namespace Libraries::Ngs2 { + +class Ngs2Custom; + +static const int ORBIS_NGS2_CUSTOM_MAX_MODULES = 24; +static const int ORBIS_NGS2_CUSTOM_MAX_PORTS = 16; +static const int ORBIS_NGS2_CUSTOM_DELAY_MAX_TAPS = 8; + +struct OrbisNgs2CustomModuleOption { + u32 size; +}; + +struct OrbisNgs2CustomEnvelopeModuleOption { + OrbisNgs2CustomModuleOption customModuleOption; + + u32 maxPoints; + u32 reserved; +}; + +struct OrbisNgs2CustomReverbModuleOption { + OrbisNgs2CustomModuleOption customModuleOption; + + u32 reverbSize; + u32 reserved; +}; + +struct OrbisNgs2CustomChorusModuleOption { + OrbisNgs2CustomModuleOption customModuleOption; + + u32 maxPhases; + u32 reserved; +} OrbisNgs2CustomChorusModuleOption; + +struct OrbisNgs2CustomPeakMeterModuleOption { + OrbisNgs2CustomModuleOption customModuleOption; + u32 numBlocks; + u32 reserved; +}; + +struct OrbisNgs2CustomDelayModuleOption { + OrbisNgs2CustomModuleOption customModuleOption; + + u32 type; + u32 maxTaps; + float maxLength; + u32 reserved; +}; + +struct OrbisNgs2CustomPitchShiftModuleOption { + OrbisNgs2CustomModuleOption customModuleOption; + + u32 quality; +}; + +struct OrbisNgs2CustomUserFx2ModuleOption { + OrbisNgs2CustomModuleOption customModuleOption; + + OrbisNgs2UserFx2SetupHandler setupHandler; + OrbisNgs2UserFx2CleanupHandler cleanupHandler; + OrbisNgs2UserFx2ControlHandler controlHandler; + OrbisNgs2UserFx2ProcessHandler processHandler; + + size_t commonSize; + size_t paramSize; + size_t workSize; + uintptr_t userData; +}; + +struct OrbisNgs2CustomRackModuleInfo { + const OrbisNgs2CustomModuleOption* option; + + u32 moduleId; + u32 sourceBufferId; + u32 extraBufferId; + u32 destBufferId; + u32 stateOffset; + u32 stateSize; + u32 reserved; + u32 reserved2; +}; + +struct OrbisNgs2CustomRackPortInfo { + u32 sourceBufferId; + u32 reserved; +}; + +struct OrbisNgs2CustomRackOption { + OrbisNgs2RackOption rackOption; + u32 stateSize; + u32 numBuffers; + u32 numModules; + u32 reserved; + OrbisNgs2CustomRackModuleInfo aModule[ORBIS_NGS2_CUSTOM_MAX_MODULES]; + OrbisNgs2CustomRackPortInfo aPort[ORBIS_NGS2_CUSTOM_MAX_PORTS]; +}; + +struct OrbisNgs2CustomSamplerRackOption { + OrbisNgs2CustomRackOption customRackOption; + + u32 maxChannelWorks; + u32 maxWaveformBlocks; + u32 maxAtrac9Decoders; + u32 maxAtrac9ChannelWorks; + u32 maxAjmAtrac9Decoders; + u32 maxCodecCaches; +}; + +struct OrbisNgs2CustomSubmixerRackOption { + OrbisNgs2CustomRackOption customRackOption; + + u32 maxChannels; + u32 maxInputs; +}; + +struct OrbisNgs2CustomMasteringRackOption { + OrbisNgs2CustomRackOption customRackOption; + + u32 maxChannels; + u32 maxInputs; +}; + +struct OrbisNgs2CustomSamplerVoiceSetupParam { + OrbisNgs2VoiceParamHeader header; + OrbisNgs2WaveformFormat format; + u32 flags; + u32 reserved; +}; + +struct OrbisNgs2CustomSamplerVoiceWaveformBlocksParam { + OrbisNgs2VoiceParamHeader header; + const void* data; + u32 flags; + u32 numBlocks; + const OrbisNgs2WaveformBlock* aBlock; +}; + +struct OrbisNgs2CustomSamplerVoiceWaveformAddressParam { + OrbisNgs2VoiceParamHeader header; + const void* from; + const void* to; +}; + +struct OrbisNgs2CustomSamplerVoiceWaveformFrameOffsetParam { + OrbisNgs2VoiceParamHeader header; + u32 frameOffset; + u32 reserved; +}; + +struct OrbisNgs2CustomSamplerVoiceExitLoopParam { + OrbisNgs2VoiceParamHeader header; +}; + +struct OrbisNgs2CustomSamplerVoicePitchParam { + OrbisNgs2VoiceParamHeader header; + float ratio; + u32 reserved; +}; + +struct OrbisNgs2CustomSamplerVoiceState { + OrbisNgs2VoiceState voiceState; + char padding[32]; + const void* waveformData; + u64 numDecodedSamples; + u64 decodedDataSize; + u64 userData; + u32 reserved; + u32 reserved2; +}; + +struct OrbisNgs2CustomSubmixerVoiceSetupParam { + OrbisNgs2VoiceParamHeader header; + u32 numInputChannels; + u32 numOutputChannels; + u32 flags; + u32 reserved; +}; + +struct OrbisNgs2CustomSubmixerVoiceState { + OrbisNgs2VoiceState voiceState; // Voice state + u32 reserved; + u32 reserved2; +}; + +struct OrbisNgs2CustomMasteringVoiceSetupParam { + OrbisNgs2VoiceParamHeader header; + u32 numInputChannels; + u32 flags; +}; + +struct OrbisNgs2CustomMasteringVoiceOutputParam { + OrbisNgs2VoiceParamHeader header; + u32 outputId; + u32 reserved; +}; + +struct OrbisNgs2CustomMasteringVoiceState { + OrbisNgs2VoiceState voiceState; + u32 reserved; + u32 reserved2; +}; + +struct OrbisNgs2CustomVoiceEnvelopeParam { + OrbisNgs2VoiceParamHeader header; + u32 numForwardPoints; + u32 numReleasePoints; + const OrbisNgs2EnvelopePoint* aPoint; +}; + +struct OrbisNgs2CustomVoiceDistortionParam { + OrbisNgs2VoiceParamHeader header; + u32 flags; + float a; + float b; + float clip; + float gate; + float wetLevel; + float dryLevel; + u32 reserved; +}; + +struct OrbisNgs2CustomVoiceCompressorParam { + OrbisNgs2VoiceParamHeader header; + u32 flags; + float threshold; + float ratio; + float knee; + float attackTime; + float releaseTime; + float level; + u32 reserved; +}; + +struct OrbisNgs2CustomVoiceFilterParam { + OrbisNgs2VoiceParamHeader header; + u32 type; + u32 channelMask; + union { + struct { + float i0; + float i1; + float i2; + float o1; + float o2; + } direct; + struct { + float fc; + float q; + float level; + u32 reserved; + u32 reserved2; + } fcq; + } param; + u32 reserved3; +}; + +struct OrbisNgs2CustomVoiceLfeFilterParam { + OrbisNgs2VoiceParamHeader header; + u32 enableFlag; + u32 fc; +}; + +struct OrbisNgs2CustomVoiceGainParam { + OrbisNgs2VoiceParamHeader header; + float aLevel[ORBIS_NGS2_MAX_VOICE_CHANNELS]; +}; + +struct OrbisNgs2CustomVoiceMixerParam { + OrbisNgs2VoiceParamHeader header; + float aSourceLevel[ORBIS_NGS2_MAX_VOICE_CHANNELS]; + float aDestLevel[ORBIS_NGS2_MAX_VOICE_CHANNELS]; +}; + +struct OrbisNgs2CustomVoiceChannelMixerParam { + OrbisNgs2VoiceParamHeader header; + float aLevel[ORBIS_NGS2_MAX_VOICE_CHANNELS][ORBIS_NGS2_MAX_VOICE_CHANNELS]; +}; + +struct OrbisNgs2CustomVoiceUserFxParam { + OrbisNgs2VoiceParamHeader header; + OrbisNgs2UserFxProcessHandler handler; + + uintptr_t userData0; + uintptr_t userData1; + uintptr_t userData2; +}; + +struct OrbisNgs2CustomVoiceUserFx2Param { + OrbisNgs2VoiceParamHeader header; + const void* data; + size_t dataSize; +}; + +struct OrbisNgs2CustomVoiceOutputParam { + OrbisNgs2VoiceParamHeader header; + u32 outputId; + u32 reserved; +}; + +struct OrbisNgs2CustomVoicePeakMeterParam { + OrbisNgs2VoiceParamHeader header; + u32 enableFlag; + u32 reserved; +} OrbisNgs2CustomVoicePeakMeterParam; + +struct OrbisNgs2CustomVoiceReverbParam { + OrbisNgs2VoiceParamHeader header; + OrbisNgs2ReverbI3DL2Param i3dl2; +}; + +struct OrbisNgs2CustomVoiceChorusParam { + OrbisNgs2VoiceParamHeader header; + u32 flags; + u32 numPhases; + u32 channelMask; + float inputLevel; + float delayTime; + float modulationRatio; + float modulationDepth; + float feedbackLevel; + float wetLevel; + float dryLevel; +}; + +struct OrbisNgs2DelayTapInfo { + float tapLevel; + float delayTime; +}; + +struct OrbisNgs2CustomVoiceDelayParam { + OrbisNgs2VoiceParamHeader header; + float dryLevel; + float wetLevel; + float inputLevel; + float feedbackLevel; + float lowpassFc; + u32 numTaps; + OrbisNgs2DelayTapInfo aTap[ORBIS_NGS2_CUSTOM_DELAY_MAX_TAPS]; + float aInputMixLevel[ORBIS_NGS2_MAX_VOICE_CHANNELS]; + u32 channelMask; + u32 flags; +}; + +struct OrbisNgs2CustomVoiceNoiseGateParam { + OrbisNgs2VoiceParamHeader header; + u32 flags; + float threshold; + float attackTime; + float releaseTime; +}; + +struct OrbisNgs2CustomVoicePitchShiftParam { + OrbisNgs2VoiceParamHeader header; + s32 cent; +}; + +struct OrbisNgs2CustomEnvelopeModuleState { + float height; + u32 reserved; +}; + +struct OrbisNgs2CustomCompressorModuleState { + float peakHeight; + float compressorHeight; +}; + +struct OrbisNgs2CustomPeakMeterModuleState { + float peak; + float aChannelPeak[ORBIS_NGS2_MAX_VOICE_CHANNELS]; + u32 reserved; +}; + +struct OrbisNgs2CustomNoiseGateModuleState { + float gateHeight; +}; + +struct OrbisNgs2CustomRackInfo { + OrbisNgs2RackInfo rackInfo; + u32 stateSize; + u32 numBuffers; + u32 numModules; + u32 reserved; + OrbisNgs2CustomRackModuleInfo aModule[ORBIS_NGS2_CUSTOM_MAX_MODULES]; + OrbisNgs2CustomRackPortInfo aPort[ORBIS_NGS2_CUSTOM_MAX_PORTS]; +}; + +struct OrbisNgs2CustomSamplerRackInfo { + OrbisNgs2CustomRackInfo customRackInfo; + + u32 maxChannelWorks; + u32 maxWaveformBlocks; + u32 maxAtrac9Decoders; + u32 maxAtrac9ChannelWorks; + u32 maxAjmAtrac9Decoders; + u32 maxCodecCaches; +}; + +struct OrbisNgs2CustomSubmixerRackInfo { + OrbisNgs2CustomRackInfo customRackInfo; + + u32 maxChannels; + u32 maxInputs; +}; + +struct OrbisNgs2CustomMasteringRackInfo { + OrbisNgs2CustomRackInfo customRackInfo; + + u32 maxChannels; + u32 maxInputs; +}; + +struct OrbisNgs2CustomModuleInfo { + u32 moduleId; + u32 sourceBufferId; + u32 extraBufferId; + u32 destBufferId; + u32 stateOffset; + u32 stateSize; + u32 reserved; + u32 reserved2; +}; + +struct OrbisNgs2CustomEnvelopeModuleInfo { + OrbisNgs2CustomModuleInfo moduleInfo; + + u32 maxPoints; + u32 reserved; +}; + +struct OrbisNgs2CustomReverbModuleInfo { + OrbisNgs2CustomModuleInfo moduleInfo; + + u32 reverbSize; + u32 reserved; +}; + +} // namespace Libraries::Ngs2 diff --git a/src/core/libraries/ngs2/ngs2_eq.cpp b/src/core/libraries/ngs2/ngs2_eq.cpp new file mode 100644 index 000000000..8c82e4e49 --- /dev/null +++ b/src/core/libraries/ngs2/ngs2_eq.cpp @@ -0,0 +1,12 @@ +// SPDX-FileCopyrightText: Copyright 2024 shadPS4 Emulator Project +// SPDX-License-Identifier: GPL-2.0-or-later + +#include "ngs2_error.h" +#include "ngs2_impl.h" + +#include "common/logging/log.h" +#include "core/libraries/error_codes.h" + +using namespace Libraries::Kernel; + +namespace Libraries::Ngs2 {} // namespace Libraries::Ngs2 diff --git a/src/core/libraries/ngs2/ngs2_eq.h b/src/core/libraries/ngs2/ngs2_eq.h new file mode 100644 index 000000000..99688f24e --- /dev/null +++ b/src/core/libraries/ngs2/ngs2_eq.h @@ -0,0 +1,41 @@ +// SPDX-FileCopyrightText: Copyright 2024 shadPS4 Emulator Project +// SPDX-License-Identifier: GPL-2.0-or-later + +#pragma once + +#include "ngs2.h" + +namespace Libraries::Ngs2 { + +class Ngs2Eq; + +struct OrbisNgs2EqVoiceSetupParam { + u32 numChannels; +}; + +struct OrbisNgs2EqVoiceFilterParam { + u32 type; + u32 channelMask; + union { + struct { + float i0; + float i1; + float i2; + float o1; + float o2; + } direct; + struct { + float fc; + float q; + float level; + u32 reserved; + u32 reserved2; + } fcq; + } param; +}; + +struct OrbisNgs2EqVoiceState { + u32 stateFlags; +}; + +} // namespace Libraries::Ngs2 diff --git a/src/core/libraries/ngs2/ngs2_geom.cpp b/src/core/libraries/ngs2/ngs2_geom.cpp new file mode 100644 index 000000000..8c82e4e49 --- /dev/null +++ b/src/core/libraries/ngs2/ngs2_geom.cpp @@ -0,0 +1,12 @@ +// SPDX-FileCopyrightText: Copyright 2024 shadPS4 Emulator Project +// SPDX-License-Identifier: GPL-2.0-or-later + +#include "ngs2_error.h" +#include "ngs2_impl.h" + +#include "common/logging/log.h" +#include "core/libraries/error_codes.h" + +using namespace Libraries::Kernel; + +namespace Libraries::Ngs2 {} // namespace Libraries::Ngs2 diff --git a/src/core/libraries/ngs2/ngs2_geom.h b/src/core/libraries/ngs2/ngs2_geom.h new file mode 100644 index 000000000..93af99d8d --- /dev/null +++ b/src/core/libraries/ngs2/ngs2_geom.h @@ -0,0 +1,80 @@ +// SPDX-FileCopyrightText: Copyright 2024 shadPS4 Emulator Project +// SPDX-License-Identifier: GPL-2.0-or-later + +#pragma once + +#include "ngs2.h" + +namespace Libraries::Ngs2 { + +class Ngs2Geom; + +struct OrbisNgs2GeomVector { + float x; + float y; + float z; +}; + +struct OrbisNgs2GeomCone { + float innerLevel; + float innerAngle; + float outerLevel; + float outerAngle; +}; + +struct OrbisNgs2GeomRolloff { + u32 model; + float maxDistance; + float rolloffFactor; + float referenceDistance; +}; + +struct OrbisNgs2GeomListenerParam { + OrbisNgs2GeomVector position; + OrbisNgs2GeomVector orientFront; + OrbisNgs2GeomVector orientUp; + OrbisNgs2GeomVector velocity; + float soundSpeed; + u32 reserved[2]; +}; + +struct OrbisNgs2GeomListenerWork { + float matrix[4][4]; + OrbisNgs2GeomVector velocity; + float soundSpeed; + u32 coordinate; + u32 reserved[3]; +}; + +struct OrbisNgs2GeomSourceParam { + OrbisNgs2GeomVector position; + OrbisNgs2GeomVector velocity; + OrbisNgs2GeomVector direction; + OrbisNgs2GeomCone cone; + OrbisNgs2GeomRolloff rolloff; + float dopplerFactor; + float fbwLevel; + float lfeLevel; + float maxLevel; + float minLevel; + float radius; + u32 numSpeakers; + u32 matrixFormat; + u32 reserved[2]; +}; + +struct OrbisNgs2GeomA3dAttribute { + OrbisNgs2GeomVector position; + float volume; + u32 reserved[4]; +}; + +struct OrbisNgs2GeomAttribute { + float pitchRatio; + float aLevel[ORBIS_NGS2_MAX_VOICE_CHANNELS * ORBIS_NGS2_MAX_VOICE_CHANNELS]; + + OrbisNgs2GeomA3dAttribute a3dAttrib; + u32 reserved[4]; +}; + +} // namespace Libraries::Ngs2 diff --git a/src/core/libraries/ngs2/ngs2_impl.cpp b/src/core/libraries/ngs2/ngs2_impl.cpp index b358a05f7..1248f76d7 100644 --- a/src/core/libraries/ngs2/ngs2_impl.cpp +++ b/src/core/libraries/ngs2/ngs2_impl.cpp @@ -12,153 +12,171 @@ using namespace Libraries::Kernel; namespace Libraries::Ngs2 { -s32 Ngs2::ReportInvalid(Ngs2Handle* handle, u32 handle_type) const { - uintptr_t hAddress = reinterpret_cast(handle); - switch (handle_type) { +s32 HandleReportInvalid(OrbisNgs2Handle handle, u32 handleType) { + switch (handleType) { case 1: - LOG_ERROR(Lib_Ngs2, "Invalid system handle {}", hAddress); + LOG_ERROR(Lib_Ngs2, "Invalid system handle {}", handle); return ORBIS_NGS2_ERROR_INVALID_SYSTEM_HANDLE; case 2: - LOG_ERROR(Lib_Ngs2, "Invalid rack handle {}", hAddress); + LOG_ERROR(Lib_Ngs2, "Invalid rack handle {}", handle); return ORBIS_NGS2_ERROR_INVALID_RACK_HANDLE; case 4: - LOG_ERROR(Lib_Ngs2, "Invalid voice handle {}", hAddress); + LOG_ERROR(Lib_Ngs2, "Invalid voice handle {}", handle); return ORBIS_NGS2_ERROR_INVALID_VOICE_HANDLE; case 8: - LOG_ERROR(Lib_Ngs2, "Invalid report handle {}", hAddress); + LOG_ERROR(Lib_Ngs2, "Invalid report handle {}", handle); return ORBIS_NGS2_ERROR_INVALID_REPORT_HANDLE; default: - LOG_ERROR(Lib_Ngs2, "Invalid handle {}", hAddress); + LOG_ERROR(Lib_Ngs2, "Invalid handle {}", handle); return ORBIS_NGS2_ERROR_INVALID_HANDLE; } } -s32 Ngs2::HandleSetup(Ngs2Handle* handle, void* data, std::atomic* atomic, u32 type, - u32 flags) { - handle->dataPointer = data; - handle->atomicPtr = atomic; - handle->handleType = type; - handle->flags_unk = flags; - return ORBIS_OK; +void* MemoryClear(void* buffer, size_t size) { + return memset(buffer, 0, size); } -s32 Ngs2::HandleCleanup(Ngs2Handle* handle, u32 hType, void* dataOut) { - if (handle && handle->selfPointer == handle) { - std::atomic* tmp_atomic = handle->atomicPtr; - if (tmp_atomic && handle->handleType == hType) { - while (tmp_atomic->load() != 0) { - u32 expected = 1; - if (tmp_atomic->compare_exchange_strong(expected, 0)) { - if (dataOut) { - dataOut = handle->dataPointer; - } - // sceNgs2MemoryClear(handle, 32); - return ORBIS_OK; - } - tmp_atomic = handle->atomicPtr; - } - } - } - return this->ReportInvalid(handle, hType); -} - -s32 Ngs2::HandleEnter(Ngs2Handle* handle, u32 hType, Ngs2Handle* handleOut) { - if (!handle) { - return this->ReportInvalid(handle, 0); - } - - if (handle->selfPointer != handle || !handle->atomicPtr || !handle->dataPointer || - (~hType & handle->handleType)) { - return this->ReportInvalid(handle, handle->handleType); - } - - std::atomic* atomic = handle->atomicPtr; - while (true) { - u32 i = atomic->load(); - if (i == 0) { - return this->ReportInvalid(handle, handle->handleType); - } - if (atomic->compare_exchange_strong(i, i + 1)) { - break; - } - } - - if (handleOut) { - handleOut = handle; +s32 StackBufferClose(StackBuffer* stackBuffer, size_t* outTotalSize) { + if (outTotalSize) { + *outTotalSize = stackBuffer->usedSize + stackBuffer->alignment; } return ORBIS_OK; } -s32 Ngs2::HandleLeave(Ngs2Handle* handle) { - std::atomic* tmp_atomic; - u32 i; - do { - tmp_atomic = handle->atomicPtr; - i = tmp_atomic->load(); - } while (!tmp_atomic->compare_exchange_strong(i, i - 1)); - return ORBIS_OK; -} +s32 StackBufferOpen(StackBuffer* stackBuffer, void* bufferStart, size_t bufferSize, + void** outBuffer, u8 flags) { + stackBuffer->top = outBuffer; + stackBuffer->base = bufferStart; + stackBuffer->size = (size_t)bufferStart; + stackBuffer->currentOffset = (size_t)bufferStart; + stackBuffer->usedSize = 0; + stackBuffer->totalSize = bufferSize; + stackBuffer->alignment = 8; // this is a fixed value + stackBuffer->flags = flags; -s32 Ngs2::StackBufferOpen(StackBuffer* buf, void* base_addr, size_t size, void** stackTop, - bool verify) { - buf->top = stackTop; - buf->base = base_addr; - buf->curr = base_addr; - buf->usedSize = 0; - buf->totalSize = size; - buf->alignment = 8; - buf->isVerifyEnabled = verify; - - if (stackTop) { - *stackTop = nullptr; + if (outBuffer != NULL) { + *outBuffer = NULL; } return ORBIS_OK; } -s32 Ngs2::StackBufferClose(StackBuffer* buf, size_t* usedSize) { - if (usedSize) { - *usedSize = buf->usedSize + buf->alignment; +s32 SystemCleanup(OrbisNgs2Handle systemHandle, OrbisNgs2ContextBufferInfo* outInfo) { + if (!systemHandle) { + return ORBIS_NGS2_ERROR_INVALID_HANDLE; } + // TODO + return ORBIS_OK; } -s32 Ngs2::SystemSetupCore(StackBuffer* buf, SystemOptions* options, Ngs2Handle** sysOut) { +s32 SystemSetupCore(StackBuffer* stackBuffer, const OrbisNgs2SystemOption* option, + SystemInternal* outSystem) { u32 maxGrainSamples = 512; u32 numGrainSamples = 256; u32 sampleRate = 48000; - if (options) { - maxGrainSamples = options->maxGrainSamples; - numGrainSamples = options->numGrainSamples; - sampleRate = options->sampleRate; + if (option) { + sampleRate = option->sampleRate; + maxGrainSamples = option->maxGrainSamples; + numGrainSamples = option->numGrainSamples; } - // Validate maxGrainSamples - if (maxGrainSamples < 64 || maxGrainSamples > 1024 || (maxGrainSamples & 0x3F) != 0) { + if (maxGrainSamples < 64 || maxGrainSamples > 1024 || (maxGrainSamples & 63) != 0) { LOG_ERROR(Lib_Ngs2, "Invalid system option (maxGrainSamples={},x64)", maxGrainSamples); return ORBIS_NGS2_ERROR_INVALID_MAX_GRAIN_SAMPLES; } - // Validate numGrainSamples - if (numGrainSamples < 64 || numGrainSamples > 1024 || (numGrainSamples & 0x3F) != 0) { + if (numGrainSamples < 64 || numGrainSamples > 1024 || (numGrainSamples & 63) != 0) { LOG_ERROR(Lib_Ngs2, "Invalid system option (numGrainSamples={},x64)", numGrainSamples); return ORBIS_NGS2_ERROR_INVALID_NUM_GRAIN_SAMPLES; } - // Validate sampleRate if (sampleRate != 11025 && sampleRate != 12000 && sampleRate != 22050 && sampleRate != 24000 && - sampleRate != 44100 && sampleRate != 48000 && sampleRate != 88200 && sampleRate != 96000) { + sampleRate != 44100 && sampleRate != 48000 && sampleRate != 88200 && sampleRate != 96000 && + sampleRate != 176400 && sampleRate != 192000) { LOG_ERROR(Lib_Ngs2, "Invalid system option(sampleRate={}:44.1/48kHz series)", sampleRate); return ORBIS_NGS2_ERROR_INVALID_SAMPLE_RATE; } - int result = ORBIS_OK; + return ORBIS_OK; +} +s32 SystemSetup(const OrbisNgs2SystemOption* option, OrbisNgs2ContextBufferInfo* hostBufferInfo, + OrbisNgs2BufferFreeHandler hostFree, OrbisNgs2Handle* outHandle) { + u8 optionFlags = 0; + StackBuffer stackBuffer; + SystemInternal setupResult; + void* systemList = NULL; + size_t requiredBufferSize = 0; + u32 result = ORBIS_NGS2_ERROR_INVALID_BUFFER_SIZE; + + if (option) { + if (option->size != 64) { + LOG_ERROR(Lib_Ngs2, "Invalid system option size ({})", option->size); + return ORBIS_NGS2_ERROR_INVALID_OPTION_SIZE; + } + optionFlags = option->flags >> 31; + } + + // Init + StackBufferOpen(&stackBuffer, NULL, 0, NULL, optionFlags); + result = SystemSetupCore(&stackBuffer, option, 0); + + if (result < 0) { + return result; + } + + StackBufferClose(&stackBuffer, &requiredBufferSize); + + // outHandle unprovided + if (!outHandle) { + hostBufferInfo->hostBuffer = NULL; + hostBufferInfo->hostBufferSize = requiredBufferSize; + MemoryClear(&hostBufferInfo->reserved, sizeof(hostBufferInfo->reserved)); + return ORBIS_OK; + } + + if (!hostBufferInfo->hostBuffer) { + LOG_ERROR(Lib_Ngs2, "Invalid system buffer address ({})", hostBufferInfo->hostBuffer); + return ORBIS_NGS2_ERROR_INVALID_BUFFER_ADDRESS; + } + + if (hostBufferInfo->hostBufferSize < requiredBufferSize) { + LOG_ERROR(Lib_Ngs2, "Invalid system buffer size ({}<{}[byte])", + hostBufferInfo->hostBufferSize, requiredBufferSize); + return ORBIS_NGS2_ERROR_INVALID_BUFFER_SIZE; + } + + // Setup + StackBufferOpen(&stackBuffer, hostBufferInfo->hostBuffer, hostBufferInfo->hostBufferSize, + &systemList, optionFlags); + result = SystemSetupCore(&stackBuffer, option, &setupResult); + + if (result < 0) { + return result; + } + + StackBufferClose(&stackBuffer, &requiredBufferSize); + + // Copy buffer results + setupResult.bufferInfo = *hostBufferInfo; + setupResult.hostFree = hostFree; // TODO + // setupResult.systemList = systemList; - return result; // Success + OrbisNgs2Handle systemHandle = setupResult.systemHandle; + if (hostBufferInfo->hostBufferSize >= requiredBufferSize) { + *outHandle = systemHandle; + return ORBIS_OK; + } + + SystemCleanup(systemHandle, 0); + + LOG_ERROR(Lib_Ngs2, "Invalid system buffer size ({}<{}[byte])", hostBufferInfo->hostBufferSize, + requiredBufferSize); + return ORBIS_NGS2_ERROR_INVALID_BUFFER_SIZE; } } // namespace Libraries::Ngs2 diff --git a/src/core/libraries/ngs2/ngs2_impl.h b/src/core/libraries/ngs2/ngs2_impl.h index fea87c51c..7be0f89cc 100644 --- a/src/core/libraries/ngs2/ngs2_impl.h +++ b/src/core/libraries/ngs2/ngs2_impl.h @@ -3,23 +3,176 @@ #pragma once -#include "ngs2.h" +#include "core/libraries/kernel/threads/pthread.h" namespace Libraries::Ngs2 { -class Ngs2 { -public: - s32 ReportInvalid(Ngs2Handle* handle, u32 handle_type) const; - s32 HandleSetup(Ngs2Handle* handle, void* data, std::atomic* atomic, u32 type, u32 flags); - s32 HandleCleanup(Ngs2Handle* handle, u32 hType, void* dataOut); - s32 HandleEnter(Ngs2Handle* handle, u32 hType, Ngs2Handle* handleOut); - s32 HandleLeave(Ngs2Handle* handle); - s32 StackBufferOpen(StackBuffer* buf, void* base_addr, size_t size, void** stackTop, - bool verify); - s32 StackBufferClose(StackBuffer* buf, size_t* usedSize); - s32 SystemSetupCore(StackBuffer* buf, SystemOptions* options, Ngs2Handle** sysOut); +static const int ORBIS_NGS2_SYSTEM_NAME_LENGTH = 16; +static const int ORBIS_NGS2_RACK_NAME_LENGTH = 16; -private: +typedef uintptr_t OrbisNgs2Handle; + +struct OrbisNgs2ContextBufferInfo { + void* hostBuffer; + size_t hostBufferSize; + uintptr_t reserved[5]; + uintptr_t userData; }; +struct OrbisNgs2SystemOption { + size_t size; + char name[ORBIS_NGS2_SYSTEM_NAME_LENGTH]; + + u32 flags; + u32 maxGrainSamples; + u32 numGrainSamples; + u32 sampleRate; + u32 aReserved[6]; +}; + +typedef s32 (*OrbisNgs2BufferAllocHandler)(OrbisNgs2ContextBufferInfo* ioBufferInfo); +typedef s32 (*OrbisNgs2BufferFreeHandler)(OrbisNgs2ContextBufferInfo* ioBufferInfo); + +struct OrbisNgs2SystemInfo { + char name[ORBIS_NGS2_SYSTEM_NAME_LENGTH]; // 0 + + OrbisNgs2Handle systemHandle; // 16 + OrbisNgs2ContextBufferInfo bufferInfo; // 24 + + u32 uid; // 88 + u32 minGrainSamples; // 92 + u32 maxGrainSamples; // 96 + + u32 stateFlags; // 100 + u32 rackCount; // 104 + float lastRenderRatio; // 108 + s64 lastRenderTick; // 112 + s64 renderCount; // 120 + u32 sampleRate; // 128 + u32 numGrainSamples; // 132 +}; + +struct OrbisNgs2RackInfo { + char name[ORBIS_NGS2_RACK_NAME_LENGTH]; // 0 + + OrbisNgs2Handle rackHandle; // 16 + OrbisNgs2ContextBufferInfo bufferInfo; // 24 + + OrbisNgs2Handle ownerSystemHandle; // 88 + + u32 type; // 96 + u32 rackId; // 100 + u32 uid; // 104 + u32 minGrainSamples; // 108 + u32 maxGrainSamples; // 112 + u32 maxVoices; // 116 + u32 maxChannelWorks; // 120 + u32 maxInputs; // 124 + u32 maxMatrices; // 128 + u32 maxPorts; // 132 + + u32 stateFlags; // 136 + float lastProcessRatio; // 140 + u64 lastProcessTick; // 144 + u64 renderCount; // 152 + u32 activeVoiceCount; // 160 + u32 activeChannelWorkCount; // 164 +}; + +struct StackBuffer { + void** top; + void* base; + size_t size; + size_t currentOffset; + size_t usedSize; + size_t totalSize; + size_t alignment; + u8 flags; + char padding[7]; +}; + +struct SystemInternal { + // setup init + char name[ORBIS_NGS2_SYSTEM_NAME_LENGTH]; // 0 + OrbisNgs2ContextBufferInfo bufferInfo; // 16 + OrbisNgs2BufferFreeHandler hostFree; // 80 + OrbisNgs2Handle systemHandle; // 88 + void* unknown1; // 96 + void* unknown2; // 104 + OrbisNgs2Handle rackHandle; // 112 + uintptr_t* userData; // 120 + SystemInternal* systemList; // 128 + StackBuffer* stackBuffer; // 136 + OrbisNgs2SystemInfo ownerSystemInfo; // 144 + + struct rackList { + void* prev; + void* next; + void* unknown; + }; + + rackList rackListPreset; // 152 + rackList rackListNormal; // 176 + rackList rackListMaster; // 200 + + void* unknown3; // 208 + void* systemListPrev; // 216 + void* unknown4; // 224 + void* systemListNext; // 232 + void* rackFunction; // 240 + + Kernel::PthreadMutex processLock; // 248 + u32 hasProcessMutex; // 256 + u32 unknown5; // 260 + Kernel::PthreadMutex flushLock; // 264 + u32 hasFlushMutex; // 272 + u32 unknown6; // 276 + + // info + u64 lastRenderTick; // 280 + u64 renderCount; // 288 + u32 isActive; // 296 + std::atomic lockCount; // 300 + u32 uid; // 304 + u32 systemType; // 308 + + struct { + u8 isBufferValid : 1; + u8 isRendering : 1; + u8 isSorted : 1; + u8 isFlushReady : 1; + } flags; // 312 + + u16 currentMaxGrainSamples; // 316 + u16 minGrainSamples; // 318 + u16 maxGrainSamples; // 320 + u16 numGrainSamples; // 322 + u32 currentNumGrainSamples; // 324 + u32 sampleRate; // 328 + u32 currentSampleRate; // 332 + u32 rackCount; // 336 + float lastRenderRatio; // 340 + float cpuLoad; // 344 +}; + +struct HandleInternal { + HandleInternal* selfPtr; // 0 + SystemInternal* systemData; // 8 + std::atomic refCount; // 16 + u32 handleType; // 24 + u32 handleID; // 28 +}; + +s32 StackBufferClose(StackBuffer* stackBuffer, size_t* outTotalSize); +s32 StackBufferOpen(StackBuffer* stackBuffer, void* buffer, size_t bufferSize, void** outBuffer, + u8 flags); +s32 SystemSetupCore(StackBuffer* stackBuffer, const OrbisNgs2SystemOption* option, + SystemInternal* outSystem); + +s32 HandleReportInvalid(OrbisNgs2Handle handle, u32 handleType); +void* MemoryClear(void* buffer, size_t size); +s32 SystemCleanup(OrbisNgs2Handle systemHandle, OrbisNgs2ContextBufferInfo* outInfo); +s32 SystemSetup(const OrbisNgs2SystemOption* option, OrbisNgs2ContextBufferInfo* hostBufferInfo, + OrbisNgs2BufferFreeHandler hostFree, OrbisNgs2Handle* outHandle); + } // namespace Libraries::Ngs2 diff --git a/src/core/libraries/ngs2/ngs2_mastering.cpp b/src/core/libraries/ngs2/ngs2_mastering.cpp new file mode 100644 index 000000000..8c82e4e49 --- /dev/null +++ b/src/core/libraries/ngs2/ngs2_mastering.cpp @@ -0,0 +1,12 @@ +// SPDX-FileCopyrightText: Copyright 2024 shadPS4 Emulator Project +// SPDX-License-Identifier: GPL-2.0-or-later + +#include "ngs2_error.h" +#include "ngs2_impl.h" + +#include "common/logging/log.h" +#include "core/libraries/error_codes.h" + +using namespace Libraries::Kernel; + +namespace Libraries::Ngs2 {} // namespace Libraries::Ngs2 diff --git a/src/core/libraries/ngs2/ngs2_mastering.h b/src/core/libraries/ngs2/ngs2_mastering.h new file mode 100644 index 000000000..e0ba478c3 --- /dev/null +++ b/src/core/libraries/ngs2/ngs2_mastering.h @@ -0,0 +1,81 @@ +// SPDX-FileCopyrightText: Copyright 2024 shadPS4 Emulator Project +// SPDX-License-Identifier: GPL-2.0-or-later + +#pragma once + +#include "ngs2.h" + +namespace Libraries::Ngs2 { + +class Ngs2Mastering; + +struct OrbisNgs2MasteringRackOption { + OrbisNgs2RackOption rackOption; + u32 maxChannels; + u32 numPeakMeterBlocks; +}; + +struct OrbisNgs2MasteringVoiceSetupParam { + OrbisNgs2VoiceParamHeader header; + + u32 numInputChannels; + u32 flags; +}; + +struct OrbisNgs2MasteringVoiceMatrixParam { + OrbisNgs2VoiceParamHeader header; + + u32 type; + u32 numLevels; + const float* aLevel; +}; + +struct OrbisNgs2MasteringVoiceLfeParam { + OrbisNgs2VoiceParamHeader header; + + u32 enableFlag; + u32 fc; +}; + +struct OrbisNgs2MasteringVoiceLimiterParam { + OrbisNgs2VoiceParamHeader header; + + u32 enableFlag; + float threshold; +}; + +struct OrbisNgs2MasteringVoiceGainParam { + OrbisNgs2VoiceParamHeader header; + + float fbwLevel; + float lfeLevel; +}; + +struct OrbisNgs2MasteringVoiceOutputParam { + OrbisNgs2VoiceParamHeader header; + + u32 outputId; + u32 reserved; +}; + +struct OrbisNgs2MasteringVoicePeakMeterParam { + OrbisNgs2VoiceParamHeader header; + u32 enableFlag; + u32 reserved; +}; + +struct OrbisNgs2MasteringVoiceState { + OrbisNgs2VoiceState voiceState; + float limiterPeakLevel; + float limiterPressLevel; + float aInputPeakHeight[ORBIS_NGS2_MAX_VOICE_CHANNELS]; + float aOutputPeakHeight[ORBIS_NGS2_MAX_VOICE_CHANNELS]; +}; + +struct OrbisNgs2MasteringRackInfo { + OrbisNgs2RackInfo rackInfo; + u32 maxChannels; + u32 reserved; +}; + +} // namespace Libraries::Ngs2 diff --git a/src/core/libraries/ngs2/ngs2_pan.cpp b/src/core/libraries/ngs2/ngs2_pan.cpp new file mode 100644 index 000000000..8c82e4e49 --- /dev/null +++ b/src/core/libraries/ngs2/ngs2_pan.cpp @@ -0,0 +1,12 @@ +// SPDX-FileCopyrightText: Copyright 2024 shadPS4 Emulator Project +// SPDX-License-Identifier: GPL-2.0-or-later + +#include "ngs2_error.h" +#include "ngs2_impl.h" + +#include "common/logging/log.h" +#include "core/libraries/error_codes.h" + +using namespace Libraries::Kernel; + +namespace Libraries::Ngs2 {} // namespace Libraries::Ngs2 diff --git a/src/core/libraries/ngs2/ngs2_pan.h b/src/core/libraries/ngs2/ngs2_pan.h new file mode 100644 index 000000000..d39ec67cd --- /dev/null +++ b/src/core/libraries/ngs2/ngs2_pan.h @@ -0,0 +1,25 @@ +// SPDX-FileCopyrightText: Copyright 2024 shadPS4 Emulator Project +// SPDX-License-Identifier: GPL-2.0-or-later + +#pragma once + +#include "ngs2.h" + +namespace Libraries::Ngs2 { + +class Ngs2Pan; + +struct OrbisNgs2PanParam { + float angle; + float distance; + float fbwLevel; + float lfeLevel; +}; + +struct OrbisNgs2PanWork { + float aSpeakerAngle[ORBIS_NGS2_MAX_VOICE_CHANNELS]; + float unitAngle; + u32 numSpeakers; +}; + +} // namespace Libraries::Ngs2 diff --git a/src/core/libraries/ngs2/ngs2_report.cpp b/src/core/libraries/ngs2/ngs2_report.cpp new file mode 100644 index 000000000..8c82e4e49 --- /dev/null +++ b/src/core/libraries/ngs2/ngs2_report.cpp @@ -0,0 +1,12 @@ +// SPDX-FileCopyrightText: Copyright 2024 shadPS4 Emulator Project +// SPDX-License-Identifier: GPL-2.0-or-later + +#include "ngs2_error.h" +#include "ngs2_impl.h" + +#include "common/logging/log.h" +#include "core/libraries/error_codes.h" + +using namespace Libraries::Kernel; + +namespace Libraries::Ngs2 {} // namespace Libraries::Ngs2 diff --git a/src/core/libraries/ngs2/ngs2_report.h b/src/core/libraries/ngs2/ngs2_report.h new file mode 100644 index 000000000..88f6d1df0 --- /dev/null +++ b/src/core/libraries/ngs2/ngs2_report.h @@ -0,0 +1,78 @@ +// SPDX-FileCopyrightText: Copyright 2024 shadPS4 Emulator Project +// SPDX-License-Identifier: GPL-2.0-or-later + +#pragma once + +#include "ngs2.h" + +#include // va_list + +namespace Libraries::Ngs2 { + +class Ngs2Report; + +struct OrbisNgs2ReportDataHeader { + size_t size; + OrbisNgs2Handle handle; + u32 type; + s32 result; +}; + +typedef void (*OrbisNgs2ReportHandler)(const OrbisNgs2ReportDataHeader* data, uintptr_t userData); + +struct OrbisNgs2ReportMessageData { + OrbisNgs2ReportDataHeader header; + const char* message; +}; + +struct OrbisNgs2ReportApiData { + OrbisNgs2ReportDataHeader header; + const char* functionName; + const char* format; + va_list argument; +}; + +struct OrbisNgs2ReportControlData { + OrbisNgs2ReportDataHeader header; + const OrbisNgs2VoiceParamHeader* param; +}; + +struct OrbisNgs2ReportOutputData { + OrbisNgs2ReportDataHeader header; + const OrbisNgs2RenderBufferInfo* bufferInfo; + + u32 bufferIndex; + u32 sampleRate; + u32 numGrainSamples; + u32 reserved; +}; + +struct OrbisNgs2ReportCpuLoadData { + OrbisNgs2ReportDataHeader header; + float totalRatio; + float flushRatio; + float processRatio; + float feedbackRatio; +}; + +struct OrbisNgs2ReportRenderStateData { + OrbisNgs2ReportDataHeader header; + u32 state; + u32 reserved; +}; + +struct OrbisNgs2ReportVoiceWaveformData { + OrbisNgs2ReportDataHeader header; + u32 location; + u32 waveformType; + u32 numChannels; + u32 sampleRate; + u32 numGrainSamples; + u32 reserved; + void* const* aData; +}; + +s32 PS4_SYSV_ABI sceNgs2ReportRegisterHandler(u32 reportType, OrbisNgs2ReportHandler handler, + uintptr_t userData, OrbisNgs2Handle* outHandle); + +} // namespace Libraries::Ngs2 diff --git a/src/core/libraries/ngs2/ngs2_reverb.cpp b/src/core/libraries/ngs2/ngs2_reverb.cpp new file mode 100644 index 000000000..8c82e4e49 --- /dev/null +++ b/src/core/libraries/ngs2/ngs2_reverb.cpp @@ -0,0 +1,12 @@ +// SPDX-FileCopyrightText: Copyright 2024 shadPS4 Emulator Project +// SPDX-License-Identifier: GPL-2.0-or-later + +#include "ngs2_error.h" +#include "ngs2_impl.h" + +#include "common/logging/log.h" +#include "core/libraries/error_codes.h" + +using namespace Libraries::Kernel; + +namespace Libraries::Ngs2 {} // namespace Libraries::Ngs2 diff --git a/src/core/libraries/ngs2/ngs2_reverb.h b/src/core/libraries/ngs2/ngs2_reverb.h new file mode 100644 index 000000000..715d7480a --- /dev/null +++ b/src/core/libraries/ngs2/ngs2_reverb.h @@ -0,0 +1,61 @@ +// SPDX-FileCopyrightText: Copyright 2024 shadPS4 Emulator Project +// SPDX-License-Identifier: GPL-2.0-or-later + +#pragma once + +#include "ngs2.h" + +namespace Libraries::Ngs2 { + +class Ngs2Reverb; + +struct OrbisNgs2ReverbRackOption { + OrbisNgs2RackOption rackOption; + u32 maxChannels; + u32 reverbSize; +}; + +struct OrbisNgs2ReverbI3DL2Param { + float wet; + float dry; + s32 room; + s32 roomHF; + u32 reflectionPattern; + float decayTime; + float decayHFRatio; + s32 reflections; + float reflectionsDelay; + s32 reverb; + float reverbDelay; + float diffusion; + float density; + float HFReference; + u32 reserve[8]; +}; + +struct OrbisNgs2ReverbVoiceSetupParam { + OrbisNgs2VoiceParamHeader header; + + u32 numInputChannels; + u32 numOutputChannels; + u32 flags; + u32 reserved; +}; + +struct OrbisNgs2ReverbVoiceI3DL2Param { + OrbisNgs2VoiceParamHeader header; + + OrbisNgs2ReverbI3DL2Param i3dl2; +}; + +struct OrbisNgs2ReverbVoiceState { + OrbisNgs2VoiceState voiceState; +}; + +struct OrbisNgs2ReverbRackInfo { + OrbisNgs2RackInfo rackInfo; + u32 maxChannels; + u32 reverbSize; +}; + +} // namespace Libraries::Ngs2 diff --git a/src/core/libraries/ngs2/ngs2_sampler.cpp b/src/core/libraries/ngs2/ngs2_sampler.cpp new file mode 100644 index 000000000..8c82e4e49 --- /dev/null +++ b/src/core/libraries/ngs2/ngs2_sampler.cpp @@ -0,0 +1,12 @@ +// SPDX-FileCopyrightText: Copyright 2024 shadPS4 Emulator Project +// SPDX-License-Identifier: GPL-2.0-or-later + +#include "ngs2_error.h" +#include "ngs2_impl.h" + +#include "common/logging/log.h" +#include "core/libraries/error_codes.h" + +using namespace Libraries::Kernel; + +namespace Libraries::Ngs2 {} // namespace Libraries::Ngs2 diff --git a/src/core/libraries/ngs2/ngs2_sampler.h b/src/core/libraries/ngs2/ngs2_sampler.h new file mode 100644 index 000000000..0842b9cb2 --- /dev/null +++ b/src/core/libraries/ngs2/ngs2_sampler.h @@ -0,0 +1,162 @@ +// SPDX-FileCopyrightText: Copyright 2024 shadPS4 Emulator Project +// SPDX-License-Identifier: GPL-2.0-or-later + +#pragma once + +#include "ngs2.h" + +namespace Libraries::Ngs2 { + +class Ngs2Sampler; + +struct OrbisNgs2SamplerRackOption { + OrbisNgs2RackOption rackOption; + u32 maxChannelWorks; + u32 maxCodecCaches; + u32 maxWaveformBlocks; + u32 maxEnvelopePoints; + u32 maxFilters; + u32 maxAtrac9Decoders; + u32 maxAtrac9ChannelWorks; + u32 maxAjmAtrac9Decoders; + u32 numPeakMeterBlocks; +}; + +struct OrbisNgs2SamplerVoiceSetupParam { + OrbisNgs2VoiceParamHeader header; + + OrbisNgs2WaveformFormat format; + u32 flags; + u32 reserved; +}; + +struct OrbisNgs2SamplerVoiceWaveformBlocksParam { + OrbisNgs2VoiceParamHeader header; + + const void* data; + u32 flags; + u32 numBlocks; + const OrbisNgs2WaveformBlock* aBlock; + // Blocks +}; + +struct OrbisNgs2SamplerVoiceWaveformAddressParam { + OrbisNgs2VoiceParamHeader header; + + const void* from; + const void* to; +}; + +struct OrbisNgs2SamplerVoiceWaveformFrameOffsetParam { + OrbisNgs2VoiceParamHeader header; + + u32 frameOffset; + u32 reserved; +}; + +struct OrbisNgs2SamplerVoiceExitLoopParam { + OrbisNgs2VoiceParamHeader header; +}; + +struct OrbisNgs2SamplerVoicePitchParam { + OrbisNgs2VoiceParamHeader header; + + float ratio; + u32 reserved; +}; + +struct OrbisNgs2SamplerVoiceEnvelopeParam { + OrbisNgs2VoiceParamHeader header; + + u32 numForwardPoints; + u32 numReleasePoints; + const OrbisNgs2EnvelopePoint* aPoint; +}; + +struct OrbisNgs2SamplerVoiceDistortionParam { + OrbisNgs2VoiceParamHeader header; + + u32 flags; + float a; + float b; + float clip; + float gate; + float wetLevel; + float dryLevel; + u32 reserved; +}; + +struct OrbisNgs2SamplerVoiceUserFxParam { + OrbisNgs2VoiceParamHeader header; + + OrbisNgs2UserFxProcessHandler handler; + + uintptr_t userData0; + uintptr_t userData1; + uintptr_t userData2; +}; + +struct OrbisNgs2SamplerVoicePeakMeterParam { + OrbisNgs2VoiceParamHeader header; + + u32 enableFlag; + u32 reserved; +}; + +struct OrbisNgs2SamplerVoiceFilterParam { + OrbisNgs2VoiceParamHeader header; + + u32 index; + u32 location; + u32 type; + u32 channelMask; + union { + struct { + float i0; + float i1; + float i2; + float o1; + float o2; + } direct; + struct { + float fc; + float q; + float level; + u32 reserved; + u32 reserved2; + } fcq; + } param; + u32 reserved3; +}; + +struct OrbisNgs2SamplerVoiceNumFilters { + OrbisNgs2VoiceParamHeader header; + + u32 numFilters; + u32 reserved; +}; + +struct OrbisNgs2SamplerVoiceState { + OrbisNgs2VoiceState voiceState; + float envelopeHeight; + float peakHeight; + u32 reserved; + u64 numDecodedSamples; + u64 decodedDataSize; + u64 userData; + const void* waveformData; +}; + +struct OrbisNgs2SamplerRackInfo { + OrbisNgs2RackInfo rackInfo; + u32 maxChannelWorks; + u32 maxCodecCaches; + u32 maxWaveformBlocks; + u32 maxEnvelopePoints; + u32 maxFilters; + u32 maxAtrac9Decoders; + u32 maxAtrac9ChannelWorks; + u32 maxAjmAtrac9Decoders; +}; + +} // namespace Libraries::Ngs2 diff --git a/src/core/libraries/ngs2/ngs2_submixer.cpp b/src/core/libraries/ngs2/ngs2_submixer.cpp new file mode 100644 index 000000000..8c82e4e49 --- /dev/null +++ b/src/core/libraries/ngs2/ngs2_submixer.cpp @@ -0,0 +1,12 @@ +// SPDX-FileCopyrightText: Copyright 2024 shadPS4 Emulator Project +// SPDX-License-Identifier: GPL-2.0-or-later + +#include "ngs2_error.h" +#include "ngs2_impl.h" + +#include "common/logging/log.h" +#include "core/libraries/error_codes.h" + +using namespace Libraries::Kernel; + +namespace Libraries::Ngs2 {} // namespace Libraries::Ngs2 diff --git a/src/core/libraries/ngs2/ngs2_submixer.h b/src/core/libraries/ngs2/ngs2_submixer.h new file mode 100644 index 000000000..df2d8a835 --- /dev/null +++ b/src/core/libraries/ngs2/ngs2_submixer.h @@ -0,0 +1,126 @@ +// SPDX-FileCopyrightText: Copyright 2024 shadPS4 Emulator Project +// SPDX-License-Identifier: GPL-2.0-or-later + +#pragma once + +#include "ngs2.h" + +namespace Libraries::Ngs2 { + +class Ngs2Submixer; + +struct OrbisNgs2SubmixerRackOption { + OrbisNgs2RackOption rackOption; + u32 maxChannels; + u32 maxEnvelopePoints; + u32 maxFilters; + u32 maxInputs; + u32 numPeakMeterBlocks; +}; + +struct OrbisNgs2SubmixerVoiceSetupParam { + OrbisNgs2VoiceParamHeader header; + u32 numIoChannels; + u32 flags; +}; + +struct OrbisNgs2SubmixerVoiceEnvelopeParam { + OrbisNgs2VoiceParamHeader header; + + u32 numForwardPoints; + u32 numReleasePoints; + const OrbisNgs2EnvelopePoint* aPoint; +}; + +struct OrbisNgs2SubmixerVoiceCompressorParam { + OrbisNgs2VoiceParamHeader header; + + u32 flags; + float threshold; + float ratio; + float knee; + float attackTime; + float releaseTime; + float level; + u32 reserved; +}; + +struct OrbisNgs2SubmixerVoiceDistortionParam { + OrbisNgs2VoiceParamHeader header; + + u32 flags; + float a; + float b; + float clip; + float gate; + float wetLevel; + float dryLevel; + u32 reserved; +}; + +struct OrbisNgs2SubmixerVoiceUserFxParam { + OrbisNgs2VoiceParamHeader header; + + OrbisNgs2UserFxProcessHandler handler; + + uintptr_t userData0; + uintptr_t userData1; + uintptr_t userData2; +}; + +struct OrbisNgs2SubmixerVoicePeakMeterParam { + OrbisNgs2VoiceParamHeader header; + + u32 enableFlag; + u32 reserved; +}; + +struct OrbisNgs2SubmixerVoiceFilterParam { + OrbisNgs2VoiceParamHeader header; + + u32 index; + u32 location; + u32 type; + u32 channelMask; + union { + struct { + float i0; + float i1; + float i2; + float o1; + float o2; + } direct; + struct { + float fc; + float q; + float level; + u32 reserved; + u32 reserved2; + } fcq; + } param; + u32 reserved3; +}; + +struct OrbisNgs2SubmixerVoiceNumFilters { + OrbisNgs2VoiceParamHeader header; + + u32 numFilters; + u32 reserved; +}; + +struct OrbisNgs2SubmixerVoiceState { + OrbisNgs2VoiceState voiceState; + float envelopeHeight; + float peakHeight; + float compressorHeight; +}; + +struct OrbisNgs2SubmixerRackInfo { + OrbisNgs2RackInfo rackInfo; + u32 maxChannels; + u32 maxEnvelopePoints; + u32 maxFilters; + u32 maxInputs; +}; + +} // namespace Libraries::Ngs2 diff --git a/src/core/libraries/np_common/np_common.cpp b/src/core/libraries/np_common/np_common.cpp new file mode 100644 index 000000000..1234705cc --- /dev/null +++ b/src/core/libraries/np_common/np_common.cpp @@ -0,0 +1,7915 @@ +// SPDX-FileCopyrightText: Copyright 2024 shadPS4 Emulator Project +// SPDX-License-Identifier: GPL-2.0-or-later + +#include "common/logging/log.h" +#include "core/libraries/error_codes.h" +#include "core/libraries/libs.h" +#include "core/libraries/np_common/np_common.h" +#include "core/libraries/np_common/np_common_error.h" + +namespace Libraries::NpCommon { + +int PS4_SYSV_ABI sceNpCmpNpId(OrbisNpId* np_id1, OrbisNpId* np_id2) { + if (np_id1 == nullptr || np_id2 == nullptr) { + return ORBIS_NP_ERROR_INVALID_ARGUMENT; + } + + // Compare data + if (std::strncmp(np_id1->handle.data, np_id2->handle.data, ORBIS_NP_ONLINEID_MAX_LENGTH) != 0) { + return ORBIS_NP_UTIL_ERROR_NOT_MATCH; + } + + // Compare opt + for (u32 i = 0; i < 8; i++) { + if (np_id1->opt[i] != np_id2->opt[i]) { + return ORBIS_NP_UTIL_ERROR_NOT_MATCH; + } + } + + // Compare reserved + for (u32 i = 0; i < 8; i++) { + if (np_id1->reserved[i] != np_id2->reserved[i]) { + return ORBIS_NP_UTIL_ERROR_NOT_MATCH; + } + } + + return ORBIS_OK; +} + +int PS4_SYSV_ABI sceNpCmpNpIdInOrder(OrbisNpId* np_id1, OrbisNpId* np_id2, u32* out_result) { + if (np_id1 == nullptr || np_id2 == nullptr || out_result == nullptr) { + return ORBIS_NP_ERROR_INVALID_ARGUMENT; + } + + // Compare data + u32 compare = + std::strncmp(np_id1->handle.data, np_id2->handle.data, ORBIS_NP_ONLINEID_MAX_LENGTH); + if (compare < 0) { + *out_result = -1; + return ORBIS_OK; + } else if (compare > 0) { + *out_result = 1; + return ORBIS_OK; + } + + // Compare opt + for (u32 i = 0; i < 8; i++) { + if (np_id1->opt[i] < np_id2->opt[i]) { + *out_result = -1; + return ORBIS_OK; + } else if (np_id1->opt[i] > np_id2->opt[i]) { + *out_result = 1; + return ORBIS_OK; + } + } + + // Compare reserved + for (u32 i = 0; i < 8; i++) { + if (np_id1->reserved[i] < np_id2->reserved[i]) { + *out_result = -1; + return ORBIS_OK; + } else if (np_id1->reserved[i] > np_id2->reserved[i]) { + *out_result = 1; + return ORBIS_OK; + } + } + + *out_result = 0; + return ORBIS_OK; +} + +int PS4_SYSV_ABI sceNpCmpOnlineId(OrbisNpOnlineId* online_id1, OrbisNpOnlineId* online_id2) { + if (online_id1 == nullptr || online_id2 == nullptr) { + return ORBIS_NP_ERROR_INVALID_ARGUMENT; + } + + if (std::strncmp(online_id1->data, online_id2->data, ORBIS_NP_ONLINEID_MAX_LENGTH) != 0) { + return ORBIS_NP_UTIL_ERROR_NOT_MATCH; + } + return ORBIS_OK; +} + +int PS4_SYSV_ABI _sceNpAllocatorExConvertAllocator() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _sceNpAllocatorExFree() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _sceNpAllocatorExMalloc() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _sceNpAllocatorExRealloc() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _sceNpAllocatorExStrdup() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _sceNpAllocatorExStrndup() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _sceNpAllocatorFree() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _sceNpAllocatorMalloc() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _sceNpAllocatorRealloc() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _sceNpAllocatorStrdup() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _sceNpAllocatorStrndup() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _sceNpFree() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _sceNpHeapFree() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _sceNpHeapMalloc() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _sceNpHeapRealloc() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _sceNpHeapStrdup() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _sceNpHeapStrndup() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _sceNpMalloc() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _sceNpRealloc() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np10Cancelable10IsCanceledEv() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np10Cancelable10LockCancelEPKciS3_() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np10Cancelable11CheckCancelEPKciS3_() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np10Cancelable12UnlockCancelEPKciS3_() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np10Cancelable13SetCancelableEb() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np10Cancelable14SetupSubCancelEPS1_PKciS4_() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np10Cancelable16CleanupSubCancelEPS1_() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np10Cancelable4InitEv() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np10Cancelable6CancelEij() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np10Cancelable7DestroyEv() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np10CancelableC2Ev() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np10CancelableD0Ev() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np10CancelableD1Ev() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np10CancelableD2Ev() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np10CancelLock3EndEPKciS3_() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np10CancelLock5BeginEPNS0_6HandleEPKciS5_() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np10CancelLockC1Ev() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np10CancelLockC2Ev() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np10CancelLockD1Ev() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np10CancelLockD2Ev() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np10EventQueue10ClearAbortEt() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np10EventQueue10TryDequeueEPvm() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np10EventQueue4ctorEv() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np10EventQueue4dtorEv() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np10EventQueue4InitEPKcmm() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np10EventQueue5AbortEt() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np10EventQueue7DequeueEPvmj() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np10EventQueue7DestroyEv() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np10EventQueue7EnqueueEPKvmj() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np10EventQueueC2EP16SceNpAllocatorEx() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np10EventQueueD0Ev() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np10EventQueueD1Ev() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np10EventQueueD2Ev() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np10JsonNumber5ClearEv() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np10JsonNumber6SetNumEi() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np10JsonNumber6SetNumEj() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np10JsonNumber6SetNumEl() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np10JsonNumber6SetNumEm() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np10JsonNumber6SetNumEPKc() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np10JsonObject16DeleteFieldValueEPKc() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np10JsonObject5ClearEv() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np10JsonParser4InitEPK7JsonDefPNS1_12EventHandlerE() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np10JsonParser5ParseEPKcm() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np10JsonParserC2EP16SceNpAllocatorEx() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np10JsonParserD0Ev() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np10JsonParserD1Ev() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np10JsonParserD2Ev() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np10JsonString5ClearEv() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np10JsonString6SetStrEPKc() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np10MemoryFile4ReadEPNS0_6HandleEPvmPm() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np10MemoryFile4SyncEv() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np10MemoryFile5CloseEv() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np10MemoryFile5WriteEPNS0_6HandleEPKvmPm() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np10MemoryFile8TruncateEl() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np10MemoryFileC2EP16SceNpAllocatorEx() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np10MemoryFileD0Ev() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np10MemoryFileD1Ev() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np10MemoryFileD2Ev() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI +_ZN3sce2np12HttpTemplate19SetAuthInfoCallbackEPFii15SceHttpAuthTypePKcPcS5_iPPhPmPiPvESA_() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np12HttpTemplate4InitEiPKcib() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np12HttpTemplate7DestroyEv() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np12HttpTemplateC1Ev() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np12HttpTemplateC2Ev() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np12HttpTemplateD0Ev() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np12HttpTemplateD1Ev() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np12HttpTemplateD2Ev() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np12StreamBufferixEi() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np12StreamReader4ReadEPNS0_6HandleEPNS0_9StreamCtxEPvmPm() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np12StreamReader7ReadAllEPNS0_6HandleEPNS0_9StreamCtxEPvmPm() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np12StreamReader7ReadAllEPNS0_6HandleEPvmPm() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np12StreamReader8ReadDataEPNS0_6HandleEPNS0_9StreamCtxEPvmPm() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np12StreamReader8ReadDataEPNS0_6HandleEPvmPm() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np12StreamReader8SkipDataEPNS0_6HandleElPl() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np12StreamReader8SkipDataEPNS0_6HandleEPNS0_9StreamCtxElPl() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np12StreamWriter15WriteFilledDataEPNS0_6HandleEcl() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np12StreamWriter15WriteFilledDataEPNS0_6HandleEPNS0_9StreamCtxEcl() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np12StreamWriter5WriteEPNS0_6HandleEPNS0_9StreamCtxEPKvmPm() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np12StreamWriter9WriteDataEPNS0_6HandleEPKvmPm() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np12StreamWriter9WriteDataEPNS0_6HandleEPNS0_9StreamCtxEPKvmPm() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np12WorkerThread10ThreadMainEv() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np12WorkerThreadC1EPNS0_9WorkQueueE() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np12WorkerThreadC2EPNS0_9WorkQueueE() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np12WorkerThreadD0Ev() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np12WorkerThreadD1Ev() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np12WorkerThreadD2Ev() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np13JsonDocParser5ParseEPKcm() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np13JsonDocParser9GetResultEPPNS0_10JsonObjectE() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np13JsonDocParser9GetResultEPPNS0_9JsonValueE() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np13JsonDocParserC2EP16SceNpAllocatorExPK7JsonDef() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np13JsonDocParserD0Ev() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np13JsonDocParserD1Ev() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np13JsonDocParserD2Ev() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np13NpTitleSecret5ClearEv() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np13NpTitleSecretC1EPKvm() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np13NpTitleSecretC1ERK16SceNpTitleSecret() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np13NpTitleSecretC1ERKS1_() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np13NpTitleSecretC1Ev() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np13NpTitleSecretC2EPKvm() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np13NpTitleSecretC2ERK16SceNpTitleSecret() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np13NpTitleSecretC2ERKS1_() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np13NpTitleSecretC2Ev() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np13NpTitleSecretD0Ev() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np13NpTitleSecretD1Ev() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np13NpTitleSecretD2Ev() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np13RingBufMemory4ctorEv() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np13RingBufMemory4dtorEv() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np13RingBufMemory4InitEm() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np13RingBufMemory6ExpandEm() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np13RingBufMemory6IsInitEv() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np13RingBufMemory7DestroyEv() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np13RingBufMemoryC2EP16SceNpAllocatorEx() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np13RingBufMemoryD0Ev() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np13RingBufMemoryD1Ev() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np13RingBufMemoryD2Ev() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np14CalloutContext4InitEPKcimm() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np14CalloutContext4InitEPKNS1_5ParamE() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np14CalloutContext7DestroyEv() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np14CalloutContextC1Ev() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np14CalloutContextC2Ev() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np14CalloutContextD0Ev() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np14CalloutContextD1Ev() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np14CalloutContextD2Ev() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np14JsonDocBuilder12BuildBufSizeEv() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np14JsonDocBuilder16EscapeJsonStringEPKcPcmPm() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np14JsonDocBuilder23EscapeJsonStringBufSizeEPKc() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np14JsonDocBuilder5BuildEPcmPm() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np14JsonDocBuilderC1ERKNS0_9JsonValueE() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np14JsonDocBuilderC2ERKNS0_9JsonValueE() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np14JsonDocBuilderD0Ev() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np14JsonDocBuilderD1Ev() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np14JsonDocBuilderD2Ev() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np15CancelableScope3EndEiPKciS3_() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np15CancelableScope5BeginEPNS0_6HandleEPKciS5_() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np15CancelableScopeC2Ev() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np15CancelableScopeD0Ev() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np15CancelableScopeD1Ev() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np15CancelableScopeD2Ev() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np16StreamReadBufferC2EP16SceNpAllocatorEx() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np16StreamReadBufferD1Ev() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np16StreamReadBufferD2Ev() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np18HttpConnectionPool13InvalidateAllEv() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np18HttpConnectionPool4InitEi() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np18HttpConnectionPool7DestroyEv() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np18HttpConnectionPoolC1EP16SceNpAllocatorEx() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np18HttpConnectionPoolC2EP16SceNpAllocatorEx() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np18HttpConnectionPoolD0Ev() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np18HttpConnectionPoolD1Ev() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np18HttpConnectionPoolD2Ev() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np18MemoryStreamReader4ReadEPNS0_6HandleEPvmPm() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np18MemoryStreamReaderC1EPKvm() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np18MemoryStreamReaderC2EPKvm() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np18MemoryStreamReaderD0Ev() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np18MemoryStreamReaderD1Ev() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np18MemoryStreamReaderD2Ev() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np18MemoryStreamWriter5WriteEPNS0_6HandleEPKvmPm() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np18MemoryStreamWriterC1EPvm() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np18MemoryStreamWriterC2EPvm() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np18MemoryStreamWriterD0Ev() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np18MemoryStreamWriterD1Ev() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np18MemoryStreamWriterD2Ev() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np20BufferedStreamReader4ReadEPNS0_6HandleEPvmPm() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np20BufferedStreamReader5CloseEv() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np20BufferedStreamReaderC2EP16SceNpAllocatorEx() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np20BufferedStreamReaderD0Ev() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np20BufferedStreamReaderD1Ev() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np20BufferedStreamReaderD2Ev() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np3ipc10IpmiClient10DisconnectEv() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np3ipc10IpmiClient11IsConnectedEv() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np3ipc10IpmiClient16invokeSyncMethodEjPKvmPvPmm() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np3ipc10IpmiClient4ctorEv() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np3ipc10IpmiClient4dtorEv() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np3ipc10IpmiClient4InitEPKNS2_6ConfigE() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np3ipc10IpmiClient7ConnectEPKvm() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np3ipc10IpmiClient7DestroyEv() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np3ipc10IpmiClientC1Ev() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np3ipc10IpmiClientC2Ev() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np3ipc10IpmiClientD0Ev() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np3ipc10IpmiClientD1Ev() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np3ipc10IpmiClientD2Ev() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI +_ZN3sce2np3ipc13ServiceClientC1EPNS1_17ServiceIpmiClientEPKNS1_17ServiceClientInfoE() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI +_ZN3sce2np3ipc13ServiceClientC2EPNS1_17ServiceIpmiClientEPKNS1_17ServiceClientInfoE() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np3ipc17ServiceIpmiClient10DisconnectEv() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np3ipc17ServiceIpmiClient10EndRequestEii() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np3ipc17ServiceIpmiClient11findServiceEi() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np3ipc17ServiceIpmiClient11InitServiceEi() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np3ipc17ServiceIpmiClient11TermServiceEi() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np3ipc17ServiceIpmiClient11WaitRequestEiij() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np3ipc17ServiceIpmiClient12AbortRequestEii() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np3ipc17ServiceIpmiClient12BeginRequestEii() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np3ipc17ServiceIpmiClient13CreateRequestEPiiPKvm() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np3ipc17ServiceIpmiClient13DeleteRequestEii() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np3ipc17ServiceIpmiClient13PollEventFlagEijmjPm() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np3ipc17ServiceIpmiClient13WaitEventFlagEijmjPmj() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np3ipc17ServiceIpmiClient14PollEventQueueEiPvm() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np3ipc17ServiceIpmiClient15CancelEventFlagEijm() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np3ipc17ServiceIpmiClient15RegisterServiceEPKNS1_17ServiceClientInfoE() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np3ipc17ServiceIpmiClient16RegisterServicesEPKNS1_17ServiceClientInfoE() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np3ipc17ServiceIpmiClient17invokeInitServiceEi() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np3ipc17ServiceIpmiClient17invokeTermServiceEi() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np3ipc17ServiceIpmiClient17UnregisterServiceEi() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np3ipc17ServiceIpmiClient18EndRequestForAsyncEii() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np3ipc17ServiceIpmiClient19WaitRequestForAsyncEiij() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np3ipc17ServiceIpmiClient20AbortRequestForAsyncEii() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI +_ZN3sce2np3ipc17ServiceIpmiClient20BeginRequestForAsyncEiiPN4IPMI6Client12EventNotifeeE() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np3ipc17ServiceIpmiClient21CreateRequestForAsyncEPiiPKvm() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np3ipc17ServiceIpmiClient21DeleteRequestForAsyncEii() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np3ipc17ServiceIpmiClient4ctorEv() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np3ipc17ServiceIpmiClient4dtorEv() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np3ipc17ServiceIpmiClient4InitEPNS2_6ConfigE() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np3ipc17ServiceIpmiClient7ConnectEPKvm() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np3ipc17ServiceIpmiClient7DestroyEv() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np3ipc17ServiceIpmiClientC1Ev() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np3ipc17ServiceIpmiClientC2Ev() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np3ipc17ServiceIpmiClientD0Ev() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np3ipc17ServiceIpmiClientD1Ev() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np3ipc17ServiceIpmiClientD2Ev() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np4Cond4ctorEv() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np4Cond4dtorEv() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np4Cond4InitEPKcPNS0_5MutexE() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np4Cond4WaitEj() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np4Cond6SignalEv() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np4Cond7DestroyEv() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np4Cond9SignalAllEv() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np4CondC1Ev() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np4CondC2Ev() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np4CondD0Ev() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np4CondD1Ev() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np4CondD2Ev() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np4Path11BuildAppendEPcmcPKcm() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np4Path12AddDelimiterEPcmc() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np4Path5ClearEv() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np4Path6SetStrEPKcm() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np4PathD0Ev() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np4PathD1Ev() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np4PathD2Ev() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np4Time10AddMinutesEl() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np4Time10AddSecondsEl() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np4Time12GetUserClockEPS1_() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np4Time15AddMicroSecondsEl() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np4Time15GetNetworkClockEPS1_() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np4Time20GetDebugNetworkClockEPS1_() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np4Time7AddDaysEl() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np4Time8AddHoursEl() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np4TimeplERK10SceRtcTick() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np4TimeplERKS1_() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np5Mutex4ctorEv() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np5Mutex4dtorEv() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np5Mutex4InitEPKcj() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np5Mutex4LockEv() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np5Mutex6UnlockEv() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np5Mutex7DestroyEv() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np5Mutex7TryLockEv() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np5MutexC1Ev() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np5MutexC2Ev() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np5MutexD0Ev() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np5MutexD1Ev() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np5MutexD2Ev() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np5NpEnv8GetNpEnvEPS1_() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np6Handle10CancelImplEi() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np6Handle4InitEv() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np6Handle7DestroyEv() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np6HandleC1Ev() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np6HandleC2Ev() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np6HandleD0Ev() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np6HandleD1Ev() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np6HandleD2Ev() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np6ObjectdaEPv() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np6ObjectdaEPvR14SceNpAllocator() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np6ObjectdaEPvR16SceNpAllocatorEx() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np6ObjectdlEPv() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np6ObjectdlEPvR14SceNpAllocator() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np6ObjectdlEPvR16SceNpAllocatorEx() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np6ObjectnaEmR14SceNpAllocator() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np6ObjectnaEmR16SceNpAllocatorEx() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np6ObjectnwEmR14SceNpAllocator() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np6ObjectnwEmR16SceNpAllocatorEx() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np6Thread12DoThreadMainEv() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np6Thread4ctorEv() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np6Thread4dtorEv() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np6Thread4InitEPKcimm() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np6Thread4InitEPKNS1_5ParamE() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np6Thread4JoinEPi() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np6Thread5StartEv() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np6Thread7DestroyEv() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np6Thread9EntryFuncEPv() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np6Thread9GetResultEv() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np6Thread9IsRunningEv() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np6ThreadC2Ev() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np6ThreadD0Ev() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np6ThreadD1Ev() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np6ThreadD2Ev() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np7Callout10IsTimedoutEv() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np7Callout11CalloutFuncEPv() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np7Callout4StopEv() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np7Callout5StartEjPNS1_7HandlerE() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np7Callout5StartEmPNS1_7HandlerE() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np7Callout9IsStartedEv() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np7CalloutC1EPNS0_14CalloutContextE() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np7CalloutC2EPNS0_14CalloutContextE() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np7CalloutD0Ev() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np7CalloutD1Ev() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np7CalloutD2Ev() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np7HttpUri5BuildEPKS1_PcmPmj() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np7HttpUri5ParseEPS1_PKc() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np7HttpUriC1EP16SceNpAllocatorEx() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np7HttpUriC2EP16SceNpAllocatorEx() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np7HttpUriD0Ev() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np7HttpUriD1Ev() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np7HttpUriD2Ev() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np7RingBuf14CheckinForReadEm() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np7RingBuf15CheckinForWriteEm() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np7RingBuf15CheckoutForReadEPm() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np7RingBuf16CheckoutForWriteEPm() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np7RingBuf4ctorEv() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np7RingBuf4dtorEv() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np7RingBuf4InitEPvm() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np7RingBuf4PeekEmPvm() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np7RingBuf4ReadEPvm() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np7RingBuf5ClearEv() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np7RingBuf5WriteEPKvm() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np7RingBuf7DestroyEv() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np7RingBufC1Ev() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np7RingBufC2Ev() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np7RingBufD0Ev() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np7RingBufD1Ev() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np7RingBufD2Ev() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np8HttpFile4ReadEPNS0_6HandleEPvmPm() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np8HttpFile5CloseEv() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np8HttpFileC2EP16SceNpAllocatorEx() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np8HttpFileD0Ev() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np8HttpFileD1Ev() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np8HttpFileD2Ev() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np8JsonBool5ClearEv() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np8JsonBool7SetBoolEb() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np8JsonFile5CloseEv() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np8JsonFileD0Ev() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np8JsonFileD1Ev() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np8JsonFileD2Ev() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np8JsonNull5ClearEv() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np8NpCommId5BuildERKS1_Pcm() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np8NpCommId5ClearEv() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np8NpCommId5ParseEPS1_PKc() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np8NpCommId5ParseEPS1_PKcm() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np8NpCommIdC1ERK20SceNpCommunicationId() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np8NpCommIdC1ERKS1_() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np8NpCommIdC1Ev() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np8NpCommIdC2ERK20SceNpCommunicationId() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np8NpCommIdC2ERKS1_() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np8NpCommIdC2Ev() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np8NpCommIdD0Ev() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np8NpCommIdD1Ev() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np8NpCommIdD2Ev() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np8Selector4InitEPKc() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np8SelectorD0Ev() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np8SelectorD1Ev() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np8SelectorD2Ev() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np8WorkItem10SetPendingEv() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np8WorkItem10SetRunningEv() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np8WorkItem11SetFinishedEi() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np8WorkItem14FinishCallbackEv() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np8WorkItem15RemoveFromQueueEv() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np8WorkItem6CancelEi() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np8WorkItem9BindQueueEPNS0_9WorkQueueEi() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np8WorkItemC2EPKc() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np8WorkItemD0Ev() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np8WorkItemD1Ev() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np8WorkItemD2Ev() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np9EventFlag3SetEm() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np9EventFlag4ctorEv() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np9EventFlag4dtorEv() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np9EventFlag4OpenEPKc() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np9EventFlag4PollEmjPm() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np9EventFlag4WaitEmjPmj() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np9EventFlag5ClearEm() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np9EventFlag6CancelEm() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np9EventFlag6CreateEPKcj() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np9EventFlag7DestroyEv() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np9EventFlagC1Ev() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np9EventFlagC2Ev() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np9EventFlagD0Ev() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np9EventFlagD1Ev() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np9EventFlagD2Ev() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np9HttpTrans10SetTimeoutEPKNS1_12TimeoutParamE() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np9HttpTrans11SendRequestEPNS0_6HandleEPKvm() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np9HttpTrans12RecvResponseEPNS0_6HandleEPvmPm() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np9HttpTrans12SkipResponseEPNS0_6HandleE() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np9HttpTrans16AddRequestHeaderEPKcS3_() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np9HttpTrans16SetRequestHeaderEPKcS3_() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np9HttpTrans21GetResponseStatusCodeEPNS0_6HandleEPi() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np9HttpTrans21SetRequestContentTypeEPKc() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np9HttpTrans23SetRequestContentLengthEm() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np9HttpTrans24GetResponseContentLengthEPNS0_6HandleEPbPm() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np9HttpTrans4InitERKNS0_12HttpTemplateEPNS0_18HttpConnectionPoolEiPKcm() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI +_ZN3sce2np9HttpTrans4InitERKNS0_12HttpTemplateEPNS0_18HttpConnectionPoolEiPKcS8_tS8_m() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np9HttpTrans4ReadEPNS0_6HandleEPvmPm() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np9HttpTrans5WriteEPNS0_6HandleEPKvmPm() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np9HttpTrans7DestroyEv() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np9HttpTransC1EP16SceNpAllocatorEx() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np9HttpTransC2EP16SceNpAllocatorEx() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np9HttpTransD0Ev() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np9HttpTransD1Ev() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np9HttpTransD2Ev() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np9JsonArray12AddItemArrayEPPS1_() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np9JsonArray5ClearEv() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np9JsonValue12GetItemValueEi() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np9JsonValue13GetFieldValueEiPPKc() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np9JsonValue13GetFieldValueEPKc() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np9JsonValueD0Ev() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np9JsonValueD1Ev() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np9JsonValueD2Ev() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np9LocalFile4ReadEPNS0_6HandleEPvmPm() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np9LocalFile4SeekEliPl() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np9LocalFile4SyncEv() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np9LocalFile5CloseEv() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np9LocalFile5WriteEPNS0_6HandleEPKvmPm() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np9LocalFile6RemoveEPKc() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np9LocalFile8TruncateEl() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np9LocalFileC1Ev() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np9LocalFileC2Ev() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np9LocalFileD0Ev() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np9LocalFileD1Ev() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np9LocalFileD2Ev() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np9NpTitleId5BuildERKS1_Pcm() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np9NpTitleId5ClearEv() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np9NpTitleId5ParseEPS1_PKc() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np9NpTitleId5ParseEPS1_PKcm() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np9NpTitleIdC1ERK12SceNpTitleId() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np9NpTitleIdC1ERKS1_() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np9NpTitleIdC1Ev() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np9NpTitleIdC2ERK12SceNpTitleId() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np9NpTitleIdC2ERKS1_() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np9NpTitleIdC2Ev() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np9NpTitleIdD0Ev() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np9NpTitleIdD1Ev() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np9NpTitleIdD2Ev() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np9RefObject6AddRefEv() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np9RefObject7ReleaseEv() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np9RefObjectC1Ev() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np9RefObjectC2Ev() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np9RefObjectD0Ev() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np9RefObjectD1Ev() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np9RefObjectD2Ev() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np9Semaphore4OpenEPKc() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np9Semaphore4WaitEj() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np9Semaphore6CreateEiiPKc() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np9Semaphore6SignalEv() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np9Semaphore7DestroyEv() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np9SemaphoreC1Ev() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np9SemaphoreC2Ev() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np9SemaphoreD0Ev() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np9SemaphoreD1Ev() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np9SemaphoreD2Ev() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np9WorkQueue11GetItemByIdEi() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np9WorkQueue15GetFinishedItemENS0_14WorkItemStatusE() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np9WorkQueue16WorkItemFinishedEPNS0_8WorkItemEi() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np9WorkQueue17ProcFinishedItemsENS0_14WorkItemStatusE() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np9WorkQueue18RemoveFinishedItemEPNS0_8WorkItemE() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np9WorkQueue18WaitForPendingItemEPPNS0_8WorkItemEPb() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np9WorkQueue4ctorEv() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np9WorkQueue4dtorEv() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np9WorkQueue4InitEPKcimm() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np9WorkQueue4InitEPKNS0_6Thread5ParamE() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np9WorkQueue4StopEv() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np9WorkQueue5StartEv() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np9WorkQueue6CancelEii() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np9WorkQueue6IsInitEv() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np9WorkQueue7DestroyEv() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np9WorkQueue7EnqueueEiPNS0_8WorkItemE() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np9WorkQueue9CancelAllEi() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np9WorkQueue9IsRunningEv() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np9WorkQueueC1Ev() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np9WorkQueueC2Ev() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np9WorkQueueD0Ev() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np9WorkQueueD1Ev() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2np9WorkQueueD2Ev() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2npeqERK10SceRtcTickRKNS0_4TimeE() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2npeqERK12SceNpTitleIdRKNS0_9NpTitleIdE() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2npeqERK16SceNpTitleSecretRKNS0_13NpTitleSecretE() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2npeqERK20SceNpCommunicationIdRKNS0_8NpCommIdE() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2npeqERKNS0_13NpTitleSecretERK16SceNpTitleSecret() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2npeqERKNS0_13NpTitleSecretES3_() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2npeqERKNS0_4TimeERK10SceRtcTick() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2npeqERKNS0_4TimeES3_() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2npeqERKNS0_8NpCommIdERK20SceNpCommunicationId() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2npeqERKNS0_8NpCommIdES3_() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2npeqERKNS0_9NpTitleIdERK12SceNpTitleId() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2npeqERKNS0_9NpTitleIdES3_() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2npgeERK10SceRtcTickRKNS0_4TimeE() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2npgeERKNS0_4TimeERK10SceRtcTick() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2npgeERKNS0_4TimeES3_() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2npgtERK10SceRtcTickRKNS0_4TimeE() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2npgtERKNS0_4TimeERK10SceRtcTick() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2npgtERKNS0_4TimeES3_() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2npleERK10SceRtcTickRKNS0_4TimeE() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2npleERKNS0_4TimeERK10SceRtcTick() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2npleERKNS0_4TimeES3_() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2npltERK10SceRtcTickRKNS0_4TimeE() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2npltERKNS0_4TimeERK10SceRtcTick() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2npltERKNS0_4TimeES3_() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2npneERK10SceRtcTickRKNS0_4TimeE() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2npneERK12SceNpTitleIdRKNS0_9NpTitleIdE() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2npneERK16SceNpTitleSecretRKNS0_13NpTitleSecretE() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2npneERK20SceNpCommunicationIdRKNS0_8NpCommIdE() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2npneERKNS0_13NpTitleSecretERK16SceNpTitleSecret() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2npneERKNS0_13NpTitleSecretES3_() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2npneERKNS0_4TimeERK10SceRtcTick() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2npneERKNS0_4TimeES3_() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2npneERKNS0_8NpCommIdERK20SceNpCommunicationId() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2npneERKNS0_8NpCommIdES3_() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2npneERKNS0_9NpTitleIdERK12SceNpTitleId() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZN3sce2npneERKNS0_9NpTitleIdES3_() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZNK3sce2np10Cancelable6IsInitEv() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZNK3sce2np10EventQueue6IsInitEv() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZNK3sce2np10EventQueue7IsEmptyEv() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZNK3sce2np10JsonNumber5CloneEP16SceNpAllocatorEx() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZNK3sce2np10JsonNumber6GetNumEPcm() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZNK3sce2np10JsonNumber6GetNumEPi() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZNK3sce2np10JsonNumber6GetNumEPj() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZNK3sce2np10JsonNumber6GetNumEPl() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZNK3sce2np10JsonNumber6GetNumEPm() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZNK3sce2np10JsonNumber9GetNumStrEv() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZNK3sce2np10JsonObject5CloneEP16SceNpAllocatorEx() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZNK3sce2np10JsonString5CloneEP16SceNpAllocatorEx() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZNK3sce2np10JsonString6GetStrEPcm() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZNK3sce2np10JsonString6GetStrEv() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZNK3sce2np10JsonString9GetLengthEv() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZNK3sce2np12HttpTemplate6IsInitEv() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZNK3sce2np18HttpConnectionPool6IsInitEv() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZNK3sce2np3ipc10IpmiClient6IsInitEv() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZNK3sce2np3ipc17ServiceIpmiClient6IsInitEv() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZNK3sce2np4Cond6IsInitEv() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZNK3sce2np4Time18ConvertToPosixTimeEPl() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZNK3sce2np5Mutex6IsInitEv() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZNK3sce2np6Handle6IsInitEv() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZNK3sce2np6Thread6IsInitEv() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZNK3sce2np7RingBuf11GetDataSizeEv() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZNK3sce2np7RingBuf11GetFreeSizeEv() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZNK3sce2np7RingBuf6IsFullEv() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZNK3sce2np7RingBuf7IsEmptyEv() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZNK3sce2np8JsonBool5CloneEP16SceNpAllocatorEx() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZNK3sce2np8JsonBool7GetBoolEv() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZNK3sce2np8JsonNull5CloneEP16SceNpAllocatorEx() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZNK3sce2np8NpCommId7IsEmptyEv() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZNK3sce2np9EventFlag6IsInitEv() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZNK3sce2np9HttpTrans6IsInitEv() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZNK3sce2np9JsonArray5CloneEP16SceNpAllocatorEx() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZNK3sce2np9JsonValue12GetItemValueEi() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZNK3sce2np9NpTitleId7IsEmptyEv() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZNK3sce2np9Semaphore6IsInitEv() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZThn16_N3sce2np10MemoryFile5WriteEPNS0_6HandleEPKvmPm() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZThn16_N3sce2np10MemoryFileD0Ev() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZThn16_N3sce2np10MemoryFileD1Ev() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZThn16_N3sce2np9HttpTrans5WriteEPNS0_6HandleEPKvmPm() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZThn16_N3sce2np9HttpTransD0Ev() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZThn16_N3sce2np9HttpTransD1Ev() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZThn16_N3sce2np9LocalFile5WriteEPNS0_6HandleEPKvmPm() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZThn16_N3sce2np9LocalFileD0Ev() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZThn16_N3sce2np9LocalFileD1Ev() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZThn8_N3sce2np10MemoryFile4ReadEPNS0_6HandleEPvmPm() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZThn8_N3sce2np10MemoryFileD0Ev() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZThn8_N3sce2np10MemoryFileD1Ev() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZThn8_N3sce2np6Handle10CancelImplEi() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZThn8_N3sce2np6HandleD0Ev() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZThn8_N3sce2np6HandleD1Ev() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZThn8_N3sce2np9HttpTrans4ReadEPNS0_6HandleEPvmPm() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZThn8_N3sce2np9HttpTransD0Ev() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZThn8_N3sce2np9HttpTransD1Ev() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZThn8_N3sce2np9LocalFile4ReadEPNS0_6HandleEPvmPm() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZThn8_N3sce2np9LocalFileD0Ev() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZThn8_N3sce2np9LocalFileD1Ev() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZTVN3sce2np10JsonNumberE() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZTVN3sce2np10JsonObjectE() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZTVN3sce2np10JsonStringE() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZTVN3sce2np8JsonBoolE() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZTVN3sce2np8JsonNullE() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZTVN3sce2np8SelectorE() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZTVN3sce2np9JsonArrayE() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI _ZTVN3sce2np9JsonValueE() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI sceNpAllocateKernelMemoryNoAlignment() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI sceNpAllocateKernelMemoryWithAlignment() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI sceNpArchInit() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI sceNpArchTerm() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI sceNpAtomicCas32() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI sceNpAtomicDec32() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI sceNpAtomicInc32() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI sceNpBase64Decoder() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI sceNpBase64Encoder() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI sceNpBase64GetDecodeSize() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI sceNpBase64UrlDecoder() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI sceNpBase64UrlEncoder() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI sceNpBase64UrlGetDecodeSize() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI sceNpCalloutInitCtx() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI sceNpCalloutStartOnCtx() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI sceNpCalloutStartOnCtx64() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI sceNpCalloutStopOnCtx() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI sceNpCalloutTermCtx() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI sceNpCancelEventFlag() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI sceNpClearEventFlag() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI sceNpCloseEventFlag() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI sceNpCloseSema() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI sceNpCondDestroy() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI sceNpCondInit() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI sceNpCondSignal() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI sceNpCondSignalAll() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI sceNpCondSignalTo() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI sceNpCondTimedwait() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI sceNpCondWait() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI sceNpCreateEventFlag() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI sceNpCreateSema() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI sceNpCreateThread() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI sceNpDbgAssignDebugId() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI sceNpDbgDumpBinary() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI sceNpDbgDumpText() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI sceNpDeleteEventFlag() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI sceNpDeleteSema() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI sceNpEventGetCurrentNetworkTick() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI sceNpFreeKernelMemory() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI sceNpGetNavSdkVersion() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI sceNpGetPlatformType() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI sceNpGetProcessId() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI sceNpGetRandom() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI sceNpGetSdkVersion() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI sceNpGetSdkVersionUInt() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI sceNpGetSystemClockUsec() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI sceNpGlobalHeapGetAllocator() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI sceNpGlobalHeapGetAllocatorEx() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI sceNpGlobalHeapGetAllocatorExPtr() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI sceNpGlobalHeapGetAllocatorPtr() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI sceNpHeapDestroy() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI sceNpHeapGetAllocator() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI sceNpHeapGetStat() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI sceNpHeapInit() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI sceNpHeapShowStat() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI sceNpHexToInt() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI sceNpInt32ToStr() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI sceNpInt64ToStr() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI sceNpIntGetPlatformType() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI sceNpIntIsOnlineIdString() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI sceNpIntIsValidOnlineId() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI sceNpIntSetPlatformType() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI sceNpIntToHex() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI sceNpIpc2ClientInit() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI sceNpIpc2ClientTerm() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI sceNpJoinThread() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI sceNpJsonParse() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI sceNpJsonParseBuf() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI sceNpJsonParseBufInit() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI sceNpJsonParseEx() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI sceNpJsonParseExInit() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI sceNpJsonParseInit() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI sceNpLwCondDestroy() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI sceNpLwCondInit() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI sceNpLwCondSignal() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI sceNpLwCondSignalAll() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI sceNpLwCondSignalTo() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI sceNpLwCondWait() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI sceNpLwMutexDestroy() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI sceNpLwMutexInit() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI sceNpLwMutexLock() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI sceNpLwMutexTryLock() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI sceNpLwMutexUnlock() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI sceNpMemoryHeapDestroy() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI sceNpMemoryHeapGetAllocator() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI sceNpMemoryHeapGetAllocatorEx() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI sceNpMemoryHeapInit() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI sceNpMutexDestroy() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI sceNpMutexInit() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI sceNpMutexLock() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI sceNpMutexTryLock() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI sceNpMutexUnlock() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI sceNpOpenEventFlag() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI sceNpOpenSema() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI sceNpPanic() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI sceNpPollEventFlag() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI sceNpPollSema() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI sceNpRtcConvertToPosixTime() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI sceNpRtcFormatRFC3339() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI sceNpRtcParseRFC3339() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI sceNpServerErrorJsonGetErrorCode() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI sceNpServerErrorJsonMultiGetErrorCode() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI sceNpServerErrorJsonParse() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI sceNpServerErrorJsonParseInit() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI sceNpServerErrorJsonParseMultiInit() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI sceNpSetEventFlag() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI sceNpSetPlatformType() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI sceNpSignalSema() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI sceNpStrBuildHex() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI sceNpStrcpyToBuf() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI sceNpStrncpyToBuf() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI sceNpStrnParseHex() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI sceNpStrParseHex() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI sceNpStrToInt32() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI sceNpStrToInt64() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI sceNpStrToUInt32() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI sceNpStrToUInt64() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI sceNpThreadGetId() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI sceNpUInt32ToStr() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI sceNpUInt64ToStr() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI sceNpUserGetUserIdList() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI sceNpUtilBuildTitleId() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI sceNpUtilCanonicalizeNpIdForPs4() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI sceNpUtilCanonicalizeNpIdForPsp2() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI sceNpUtilCmpAccountId() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI sceNpUtilGetDateSetAuto() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI sceNpUtilGetDbgCommerce() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI sceNpUtilGetEnv() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI sceNpUtilGetFakeDisplayNameMode() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI sceNpUtilGetFakeRateLimit() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI sceNpUtilGetIgnoreNpTitleId() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI sceNpUtilGetNpDebug() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI sceNpUtilGetNpLanguageCode() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI sceNpUtilGetNpLanguageCode2() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI sceNpUtilGetNpLanguageCode2Str() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI sceNpUtilGetNpLanguageCodeStr() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI sceNpUtilGetNpTestPatch() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI sceNpUtilGetNthChar() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI sceNpUtilGetShareTitleCheck() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI sceNpUtilGetSystemLanguage() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI sceNpUtilGetTrcNotify() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI sceNpUtilGetWebApi2FakeRateLimit() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI sceNpUtilGetWebApi2FakeRateLimitTarget() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI sceNpUtilGetWebTraceSetting() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI sceNpUtilHttpUrlEncode() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI sceNpUtilJidToNpId() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI sceNpUtilJsonEscape() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI sceNpUtilJsonGetOneChar() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI sceNpUtilJsonUnescape() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI sceNpUtilNpIdToJid() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI sceNpUtilNumChars() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI sceNpUtilParseJid() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI sceNpUtilParseTitleId() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI sceNpUtilSerializeJid() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI sceNpUtilXmlEscape() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI sceNpUtilXmlGetOneChar() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI sceNpUtilXmlUnescape() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI sceNpWaitEventFlag() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI sceNpWaitSema() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI sceNpXmlParse() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI sceNpXmlParseInit() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_00FD578C2DD966DF() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_0131A2EA80689F4C() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_01443C54863BDD20() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_01BC55BDC5C0ADAD() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_01D1ECF5750F40E8() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_020A479A74F5FBAC() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_024AF5E1D9472AB5() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_027C5D488713A6B3() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_02FE9D94C6858355() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_041F34F1C70D15C1() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_0530B1D276114248() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_065DAA14E9C73AD9() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_06AFF4E5D042BC3E() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_06EE369299F73997() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_07C92D9F8D76B617() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_07E9117498F1E4BF() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_08F3E0AF3664F275() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_0A9937C01EF21375() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_0ACBE6ACCBA3876D() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_0AE07D3354510CE6() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_0AEC3C342AE67B7C() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_0B318420C11E7C23() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_0BB6C37B03F35D89() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_0BBE8A9ACDD90FDF() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_0C7B62905E224E9C() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_0D35913117241AF9() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_0D5EE95CEED879A7() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_0D6FB24B27AB1DA2() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_0DE8032D534AC41C() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_0DF4CCA9DCA9E742() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_0E7449B1D3D98C01() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_0E77094B7750CB37() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_0ECAB397B6D50603() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_0F1DE1D1EADA2948() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_0F8AFEFA1D26BF1A() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_11881710562A6BAD() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_11AFD88BBD0C70DB() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_11E704A30A4B8877() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_125014842452F94B() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_126F0071E11CAC46() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_12926DCF35994B01() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_12CC7ABFBF31618F() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_13C4E51F44592AA2() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_15330E7C56338254() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_1566B358CABF2612() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_1625818F268F45EF() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_16D32B40D28A9AC2() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_183F4483BDBD25CD() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_1887E9E95AF62F3D() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_18A3CE95FD893D3A() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_18B3665E4854E7E9() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_1923B003948AF47E() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_19B533DA4C59A532() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_1BB399772DB68E08() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_1C0AC612D3A2971B() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_1C5599B779990A43() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_1CCBB296B04317BE() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_1CD045542FB93002() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_1DECECA673AB77B7() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_1E03E024E26C1A7F() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_1F101732BB0D7E21() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_1F4D153EC3DD47BB() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_1F7C47F63FAF0CBE() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_1FBE2EE68C0F31B6() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_2038C1628914B9C9() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_203FCB56FDB86A74() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_20569C107C6CB08C() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_20AB2D734EDE55F0() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_22B1281180FB0A5E() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_22F1AADA66A449AE() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_238B215EFFDF3D30() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_24E8EC51D149FA15() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_25728E78A3962C02() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_25E649A1C6891C05() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_264B8A38B577705D() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_266ED08DC1C82A0E() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_27BB4DE62AB58BAD() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_283AA96A196EA2EA() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_285315A390A85A94() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_29049DBB1EF3194E() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_29F7BA9C3732CB47() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_2A732DF331ACCB37() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_2AA01660EC75B6FB() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_2B37CBCE941C1681() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_2CAA3B64D0544E55() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_2CCD79617EC10A75() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_2CD8B69716AC0667() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_2D74F7C0FF9B5E9C() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_2DCA5A8080544E95() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_2E69F2743CE7CE57() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_2EAF1F3BAFF0527D() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_31493E55BB4E8F66() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_317EDCAD00FB5F5E() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_31E01CFA8A18CDA2() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_32AFD782A061B526() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_32B5CDEB093B8189() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_34155152513C93AE() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_34E4EFFF8EF6C9FE() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_3572FA0D5C54563B() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_367C479B264E0DB9() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_36884FBC964B29CC() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_3860081BB7559949() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_39314F7E674AB132() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_3A02E780FCC556A5() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_3A17B885BA4849B6() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_3A38EACAEA5E23A4() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_3B34A5E07F0DBC1F() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_3B4E8FFC00FC7EA4() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_3BAB18FDA235107A() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_3BDF9996A0A33F11() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_3C1952F1A45CC37A() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_3CA37906CDB05F3B() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_3CDB2908ACEE3A6F() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_3D3ED165F2BDCD33() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_3DA4D7D1575FCDCE() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_3DDFB612CD0BC769() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_3E0415E167DEADC7() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_3E7E9F0F1581C1E6() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_3ED389DB8280ED65() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_3F0C7F6C0C35487D() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_3FDA7200389EF0D2() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_3FF3C258BA516E58() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_4029453F628A3C5D() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_405826DDB4AE538E() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_405A926759F25865() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_406608FDEE7AE88A() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_40DDA5558C17DDCF() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_419D12E52FF60664() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_4296E539474BE77F() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_42F41FC563CC3654() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_43CCC86F4C93026A() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_4409F60BDABC65E1() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_4563C70AEC675382() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_45E66370219BD05E() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_466A54F072785696() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_46CD2536976F209A() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_4863717BD2FDD157() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_4902EBD19A263149() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_4904F7FE8D83F40C() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_4A5E13F784ABFCE7() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_4B65EEB135C12781() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_4C19D49978DA85E2() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_4DE5D620FF66F136() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_4E170C12B57A8F9E() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_4E2F3FA405C3260C() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_4EA9350577513B4D() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_4F78EB6FC4B5F21F() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_50348BE4331117B7() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_508C7E8CDD281CAA() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_521C1D2C028F5A7E() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_522FF24A35E67291() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_5470FE90C25CDD4C() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_557F260F9A4ACD18() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_5586F97209F391EB() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_55B2C9B7ADA95C3C() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_55B488A3A540B936() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_5642DFE82AF43143() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_574E046F294AE187() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_578926EBF8AA6CBF() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_585DA5FC650896BC() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_58D6EB27349EC276() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_5906B7317949872D() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_5910B5614335BE70() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_593D7DA8911F08C9() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_59757FE6A93B0D53() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_598E60F862B1141E() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_5A45351666680DAF() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_5AABE9EA702E6A7F() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_5AEA4AE472355B80() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_5B20E53CDE598741() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_5B480B59FAE947E0() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_5B5EEC23690AB9BD() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_5C0AC5B0AF3EDAE0() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_5D2E999BEA0762D4() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_5D55BBFD45110E16() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_5DEE15403D2BB5FD() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_6020C708CA74B130() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_606E1415503C34D2() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_612140E8EE9A693E() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_61F13F551DAF61DF() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_6206D39131752328() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_621D4543EF0344DE() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_6259A9A8E56D0273() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_625F9C7016346F4E() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_62EF8DF746CD8C4A() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_636D2A99FD1E6B2B() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_68013EDF66FE7425() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_6971F7067DD639D1() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_69896ADB3AB410B2() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_6A1389AA6E561387() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_6A5560D89F12B2E7() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_6ABF99CF854ABCF1() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_6B4FDDC6500D8DCB() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_6CA11D5B49D1928A() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_6D6C0FB61E6D0715() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_6D750745FE1348F5() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_6E1AF3F9D09914BE() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_6E53ED4C08B2A521() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_6EF43ACA1ED6B968() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_6F6FA09F3E1B6A60() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_7035C340C7195901() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_7038E21CB5CF641B() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_706345DCDA5BA44D() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_7120714EBF10BF1F() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_713D28A91BC803DD() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_7153BD76A53AA012() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_715C625CC7041B6B() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_71E467BDB18711D0() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_720D17965C1F4E3F() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_734380C9BCF65B9A() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_73F4C08CCD4BBCCF() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_74403101B7B29D46() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_7525B081ACD66FF4() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_75BF4477C13A05CA() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_7609793F5987C6F7() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_7616ED01B04769AA() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_764F873D91A124D8() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_7706F1E123059565() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_77F2D07EB6D806E6() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_79C3704CDCD59E57() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_79DA0BBA21351545() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_79FA2447B5F3F0C4() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_7A4D6F65FF6195A5() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_7B3195CD114DECE7() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_7B3238F2301AD36D() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_7C77FC70750A3266() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_7D23A9DC459D6D18() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_7D5988C748D0A05F() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_7D9597147A99F4F4() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_7E2953F407DD8346() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_7EE34E5099709B32() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_80470E5511D5CA00() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_807179701C08F069() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_8096E81FFAF24E46() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_80B764F4F1B87042() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_80BF691438AD008B() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_80CF6CFC96012442() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_80EA772F8C0519FD() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_81D0AFD0084D327A() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_821EB8A72176FD67() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_82D2FAB54127273F() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_836AE669C42A59E9() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_8559A25BFEC3518C() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_85C1F66C767A49D2() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_8689ED1383F87BA7() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_8796CD9E5355D3A6() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_87D37EB6DDC19D99() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_880AA48F70F84FDD() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_897B07562093665B() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_8ACAF55F16368087() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_8AE8A5589B30D4E0() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_8AE997909831B331() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_8B2D640BE0D0FB99() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_8B3D9AB4668DAECB() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_8B5EFAAAACE0B46C() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_8C27943F40A988DB() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_8C54096C75F5F2D0() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_8D7663A0A5168814() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_8E618F509994FAD7() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_8F19E6CC064E2B98() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_8F6A8AEAEE922FF5() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_9010E1AD8EBBFBCA() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_90A955A0E7001AE9() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_90F9D6067FEECC05() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_9348F3D19546A1DA() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_93D3C011DB19388A() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_956E7A4FD9F89103() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_95F699E042C3E40F() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_96877B39AA0E8735() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_96CE07C49ED234EA() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_976BB178235B5681() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_978C0B25E588C4D6() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_98BA2612BEF238D6() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_995BDD4931AF9137() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_9966E39A926B7250() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_99C2306F18963464() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_99C92C613B776BA7() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_9A4E4B938CC8AD39() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_9B23F7B4B7F72081() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_9C0EAEEAE705A8DB() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_9D47AC59545DE9E8() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_A13052D8B1B2ACFA() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_A1AA43E3A78F6F62() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_A1E48CDF54649DC9() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_A2E7DEE5B0AF5D14() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_A2F5C7FD9FF113F5() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_A36296E2269D46BC() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_A3EE2A7B9F0D88AF() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_A4471F9F7E0BFA82() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_A449BBA521EA34E1() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_A48E666C334E726C() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_A49B7449B4DDE69C() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_A5748451125C9EA4() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_A690A28D648CC176() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_A6A86DE1B1CBB1D9() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_A8F2BB7B815740A1() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_A93F64C06A6F7397() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_AB35925FC97D6AA3() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_AC014AA2C991FA29() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_AC06E10901404AEB() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_AC75C68813523505() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_AD441BC497082C3E() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_AD4F25F021D354C3() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_ADFA04A85541A4FE() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_AE9610A6B5217A23() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_AF201923826F0A58() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_AFC021B4389CA3FA() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_B015E999A3373D8F() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_B0384B86107FC652() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_B0C630653B316563() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_B100DCCD88D5C73D() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_B11A3FEA5E4D9EA4() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_B2E7F8DC199C0B93() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_B3AB61A296F6DDC8() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_B3F32F6AE619EC82() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_B4227AB213BF8CF5() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_B4652BF42B604360() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_B536C1F13BFE97CB() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_B645CC264184BC89() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_B67E17B1582C6FBD() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_B6D047C5D7695A4D() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_B75ED8E1EA62EFC7() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_B7A9A944DBD7E100() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_B7C4E75BE94F31F3() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_B888B1F92C464121() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_B8DEC22564AA057B() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_B9BADD1CBBBAE4F8() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_BAA9F7169C85E59F() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_BAEE5C38908D62DB() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_BCC855EB25183F84() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_BD01F637029C7364() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_BDD29F5AC7077E53() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_BED83DD33ECAD50D() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_BEE7D5D098ABF728() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_C0DB15CCF59AE62C() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_C1C229FEE0FD60FA() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_C228B9AD68298E98() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_C298525CEF6FB283() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_C350F09351F6D6B5() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_C3742E80FA580319() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_C3C9853D5D4D45D4() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_C3F5DAD4FB9FC340() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_C45FB0E4CCE9AED6() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_C4979CB948B7E3C7() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_C49B25BA16CF0B8C() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_C551345D9631201E() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_C57A294421368298() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_C5DC91CAD721D628() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_C6DECEE589135357() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_C81F8B20D67AC78D() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_C820FA56FAC87BEA() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_C878EA9114C5E490() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_C8A813EBFF477509() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_C966A663D5A35482() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_C97C4C67FD3674D3() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_C990550F15848B07() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_CA59737A8EC1BBBE() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_CAC5FDE8F80D7B65() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_CB135B30D0639B83() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_CB8A1AAA61F64C3A() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_CB9E674672580757() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_CC2B9D25EAEAAB1D() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_CD1B252BBEDF5B53() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_CF003BE90CBE1A27() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_CF008E34884AC1E2() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_D0B8F4B3A3687AB2() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_D0EE19B8E91F60F5() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_D12B9294BD0E0F56() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_D1CC8626D8FA328B() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_D2FA2BB9EB8B63AC() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_D32197880CF93CEB() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_D326F5C26CC81B8E() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_D4FA06B95A321B7A() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_D52A37A901E04B21() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_D5504DFC399AB400() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_D56105CB27F8F5DC() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_D568AB19235ECB19() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_D6DF7BF6639FE611() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_D8608A903119D746() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_D9E8FC707D59914D() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_D9F079E62DEE5B29() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_DA17CE4F29748536() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_DA40B9EFD7F61185() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_DA6B274FEBC2666A() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_DAD01535C87A51FC() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_DB4511D448510EC4() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_DB8EF1FFFC66269C() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_DBB508FA1B9DA8F7() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_DC59C9B870B729A2() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_DC669ED6CBF6751C() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_DCB8A2849A41C991() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_DD8F9916D7F03AF7() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_DDC33F2F4E480C2A() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_DE0B420BDE8B22D7() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_E0C0BC29898FE370() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_E0CD893E46FB55BA() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_E25530164B7F659F() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_E3682F43FDF76C58() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_E38177E1C78A80FA() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_E3CA74CFF965DF0A() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_E45BB191B49B2ED9() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_E465B9D6B60E6D7D() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_E4D82876C296C38A() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_E4DDB5350FA5B538() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_E54BFF6FB72BC7BE() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_E592A93203020BBB() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_E5A44AF6D7D48AFD() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_E639A97CF9FF1430() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_E6AC0179E48A8927() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_E751596682775D83() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_E788B1E52EF82702() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_E94F17613F5C9D31() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_E9590113128D55E0() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_E9E0B0DD12560B16() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_EAF5C8ECE64C7B05() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_EB98BF5C42D4A7EB() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_EBABC4AAC43A468C() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_EBF00085F082CC8B() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_ECB659EE058D06AF() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_ECF096AB751487AE() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_EE5A271701DB33C0() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_EF64CB6A1625248E() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_EF6C8A357C7ED863() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_F00FE94F7E699994() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_F1A51DBA30329038() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_F216E766A90FDC12() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_F2A10584ABE5D82C() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_F2D99D395E5421A3() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_F38001E528BA1371() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_F39EC9C8FA7687B3() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_F3AFFFDCD632775C() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_F3B8DFF33748BFD3() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_F5E47F9550F7A147() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_F6E93714D1A939CF() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_F6FD19AD48E4EF09() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_F744EBFC620F7CBF() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_F76E4525ACBACC7F() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_F7957A48882F42CB() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_F7A80B07809BA838() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_F8571C6CC5B6B59D() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_F9787CFA873836FB() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_FA789F6D34D383F8() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_FABA574083AC1E6C() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_FC04FDBBAE368FB7() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_FD2DAFBF2E40EEE7() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_FD55EE6D35F950AD() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_FE55EE32098D0D58() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_FE79841022E1DA1C() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +int PS4_SYSV_ABI Func_FFF4A3E279FB44A7() { + LOG_ERROR(Lib_NpCommon, "(STUBBED) called"); + return ORBIS_OK; +} + +void RegisterlibSceNpCommon(Core::Loader::SymbolsResolver* sym) { + LIB_FUNCTION("i8UmXTSq7N4", "libSceNpCommonCompat", 1, "libSceNpCommon", 1, 1, sceNpCmpNpId); + LIB_FUNCTION("TcwEFnakiSc", "libSceNpCommonCompat", 1, "libSceNpCommon", 1, 1, + sceNpCmpNpIdInOrder); + LIB_FUNCTION("dj+O5aD2a0Q", "libSceNpCommonCompat", 1, "libSceNpCommon", 1, 1, + sceNpCmpOnlineId); + LIB_FUNCTION("0gdlCVNNHCI", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _sceNpAllocatorExConvertAllocator); + LIB_FUNCTION("Zh23aSLeeZo", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, _sceNpAllocatorExFree); + LIB_FUNCTION("a2qdVU8RWb4", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _sceNpAllocatorExMalloc); + LIB_FUNCTION("kKF3w-XkCWA", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _sceNpAllocatorExRealloc); + LIB_FUNCTION("Cmd4+m7V00c", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _sceNpAllocatorExStrdup); + LIB_FUNCTION("EziLjfyTnKI", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _sceNpAllocatorExStrndup); + LIB_FUNCTION("BztTl7QeYqE", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, _sceNpAllocatorFree); + LIB_FUNCTION("mzlILsFx0cU", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, _sceNpAllocatorMalloc); + LIB_FUNCTION("VWcTu8wKwlQ", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _sceNpAllocatorRealloc); + LIB_FUNCTION("c8-4aC9opYE", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, _sceNpAllocatorStrdup); + LIB_FUNCTION("vqA9bl6WsF0", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _sceNpAllocatorStrndup); + LIB_FUNCTION("z5kwfM5InpI", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, _sceNpFree); + LIB_FUNCTION("p1vvpKGRXe4", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, _sceNpHeapFree); + LIB_FUNCTION("kwW5qddf+Lo", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, _sceNpHeapMalloc); + LIB_FUNCTION("wsfyvM+VbUk", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, _sceNpHeapRealloc); + LIB_FUNCTION("atWcfgasESY", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, _sceNpHeapStrdup); + LIB_FUNCTION("RzLv+HR5E2A", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, _sceNpHeapStrndup); + LIB_FUNCTION("w2+qV1RJgcI", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, _sceNpMalloc); + LIB_FUNCTION("UmzxltBpiiY", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, _sceNpRealloc); + LIB_FUNCTION("LJvHO3uCNm4", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np10Cancelable10IsCanceledEv); + LIB_FUNCTION("fd+grYAEph0", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np10Cancelable10LockCancelEPKciS3_); + LIB_FUNCTION("IwDQAbQxvD0", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np10Cancelable11CheckCancelEPKciS3_); + LIB_FUNCTION("-zbpF68OGDs", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np10Cancelable12UnlockCancelEPKciS3_); + LIB_FUNCTION("bBLapYYwyr0", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np10Cancelable13SetCancelableEb); + LIB_FUNCTION("j4gLOIpHgNk", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np10Cancelable14SetupSubCancelEPS1_PKciS4_); + LIB_FUNCTION("vmt3ZOlQu3o", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np10Cancelable16CleanupSubCancelEPS1_); + LIB_FUNCTION("Y7f+qBjKxdo", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np10Cancelable4InitEv); + LIB_FUNCTION("Jhbrpz0YhHU", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np10Cancelable6CancelEij); + LIB_FUNCTION("v2yJZLY0w1U", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np10Cancelable7DestroyEv); + LIB_FUNCTION("vqekW3s-eFg", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np10CancelableC2Ev); + LIB_FUNCTION("kdOC-2AE06w", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np10CancelableD0Ev); + LIB_FUNCTION("upzdrzOYkS0", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np10CancelableD1Ev); + LIB_FUNCTION("vZXDqs2x7t0", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np10CancelableD2Ev); + LIB_FUNCTION("nleHqndSeQ0", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np10CancelLock3EndEPKciS3_); + LIB_FUNCTION("lJ2Efd9PUKI", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np10CancelLock5BeginEPNS0_6HandleEPKciS5_); + LIB_FUNCTION("Vq9LKkPXkIQ", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np10CancelLockC1Ev); + LIB_FUNCTION("MecB8wAHCfE", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np10CancelLockC2Ev); + LIB_FUNCTION("K7FjXiy2z+A", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np10CancelLockD1Ev); + LIB_FUNCTION("1iHBAKrdE90", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np10CancelLockD2Ev); + LIB_FUNCTION("aoas3bJANfY", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np10EventQueue10ClearAbortEt); + LIB_FUNCTION("QlP4t2SGZ4I", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np10EventQueue10TryDequeueEPvm); + LIB_FUNCTION("xu9qWN0YYC4", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np10EventQueue4ctorEv); + LIB_FUNCTION("N1gnYosdK7Q", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np10EventQueue4dtorEv); + LIB_FUNCTION("b20e017Ei94", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np10EventQueue4InitEPKcmm); + LIB_FUNCTION("slmKkuIoC28", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np10EventQueue5AbortEt); + LIB_FUNCTION("suxln7PooIo", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np10EventQueue7DequeueEPvmj); + LIB_FUNCTION("qvpEuKumIGM", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np10EventQueue7DestroyEv); + LIB_FUNCTION("AV5jHo8O3+E", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np10EventQueue7EnqueueEPKvmj); + LIB_FUNCTION("esiO4He2WTU", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np10EventQueueC2EP16SceNpAllocatorEx); + LIB_FUNCTION("E4uoqSdo8ek", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np10EventQueueD0Ev); + LIB_FUNCTION("lQXgvDXBGtA", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np10EventQueueD1Ev); + LIB_FUNCTION("8kUkQPQP7bA", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np10EventQueueD2Ev); + LIB_FUNCTION("YHNEgBCSL2o", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np10JsonNumber5ClearEv); + LIB_FUNCTION("UgmqDr1BCLw", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np10JsonNumber6SetNumEi); + LIB_FUNCTION("PccynQ5NdVQ", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np10JsonNumber6SetNumEj); + LIB_FUNCTION("MY0CSk24EcY", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np10JsonNumber6SetNumEl); + LIB_FUNCTION("qbW7qOvVafI", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np10JsonNumber6SetNumEm); + LIB_FUNCTION("VyCn9EVJGlU", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np10JsonNumber6SetNumEPKc); + LIB_FUNCTION("-WgnISXjJ7A", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np10JsonObject16DeleteFieldValueEPKc); + LIB_FUNCTION("DiHxx2k5zfM", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np10JsonObject5ClearEv); + LIB_FUNCTION("AGadQiCfKDY", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np10JsonParser4InitEPK7JsonDefPNS1_12EventHandlerE); + LIB_FUNCTION("CDzSgHA6hWg", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np10JsonParser5ParseEPKcm); + LIB_FUNCTION("ZJbPQt+FTnY", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np10JsonParserC2EP16SceNpAllocatorEx); + LIB_FUNCTION("u+A16O-TAHk", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np10JsonParserD0Ev); + LIB_FUNCTION("qJb7IXDg9xk", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np10JsonParserD1Ev); + LIB_FUNCTION("AvvE5A5A6ZA", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np10JsonParserD2Ev); + LIB_FUNCTION("kXE1imLw7yo", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np10JsonString5ClearEv); + LIB_FUNCTION("SN4IgvT26To", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np10JsonString6SetStrEPKc); + LIB_FUNCTION("EyhtbPFMWNA", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np10MemoryFile4ReadEPNS0_6HandleEPvmPm); + LIB_FUNCTION("AZTMWob-mog", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np10MemoryFile4SyncEv); + LIB_FUNCTION("dl6+SFHLke0", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np10MemoryFile5CloseEv); + LIB_FUNCTION("r2O0f9X-mqs", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np10MemoryFile5WriteEPNS0_6HandleEPKvmPm); + LIB_FUNCTION("1DtavqenQjg", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np10MemoryFile8TruncateEl); + LIB_FUNCTION("ev77AviWYu8", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np10MemoryFileC2EP16SceNpAllocatorEx); + LIB_FUNCTION("6Vst7HqJMXU", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np10MemoryFileD0Ev); + LIB_FUNCTION("ZUf92uPkRuA", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np10MemoryFileD1Ev); + LIB_FUNCTION("lGjyfcI++PY", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np10MemoryFileD2Ev); + LIB_FUNCTION( + "ezJnmv7hkAg", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np12HttpTemplate19SetAuthInfoCallbackEPFii15SceHttpAuthTypePKcPcS5_iPPhPmPiPvESA_); + LIB_FUNCTION("iOTsJTR6Y9U", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np12HttpTemplate4InitEiPKcib); + LIB_FUNCTION("73qbxKjBH0o", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np12HttpTemplate7DestroyEv); + LIB_FUNCTION("Vj7HiXK-tTg", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np12HttpTemplateC1Ev); + LIB_FUNCTION("hw-UPUK9T+w", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np12HttpTemplateC2Ev); + LIB_FUNCTION("cXYOwTVAuMs", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np12HttpTemplateD0Ev); + LIB_FUNCTION("Bm74HLvoNY4", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np12HttpTemplateD1Ev); + LIB_FUNCTION("h6XPsGpHAtc", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np12HttpTemplateD2Ev); + LIB_FUNCTION("jr0OcEeQJ8o", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np12StreamBufferixEi); + LIB_FUNCTION("rCRh3V03bPs", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np12StreamReader4ReadEPNS0_6HandleEPNS0_9StreamCtxEPvmPm); + LIB_FUNCTION("2SKuIvr9sYU", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np12StreamReader7ReadAllEPNS0_6HandleEPNS0_9StreamCtxEPvmPm); + LIB_FUNCTION("f1ncwa-JXlA", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np12StreamReader7ReadAllEPNS0_6HandleEPvmPm); + LIB_FUNCTION("z8qO7hql4Fs", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np12StreamReader8ReadDataEPNS0_6HandleEPNS0_9StreamCtxEPvmPm); + LIB_FUNCTION("oNqSobbGC80", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np12StreamReader8ReadDataEPNS0_6HandleEPvmPm); + LIB_FUNCTION("MSMPXUL5AuM", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np12StreamReader8SkipDataEPNS0_6HandleElPl); + LIB_FUNCTION("fJB07vDf7no", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np12StreamReader8SkipDataEPNS0_6HandleEPNS0_9StreamCtxElPl); + LIB_FUNCTION("etMUeqIhN+w", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np12StreamWriter15WriteFilledDataEPNS0_6HandleEcl); + LIB_FUNCTION("SP2010+gtqw", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np12StreamWriter15WriteFilledDataEPNS0_6HandleEPNS0_9StreamCtxEcl); + LIB_FUNCTION("Z1MRG-L+V0o", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np12StreamWriter5WriteEPNS0_6HandleEPNS0_9StreamCtxEPKvmPm); + LIB_FUNCTION("vHaV+tsSVu4", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np12StreamWriter9WriteDataEPNS0_6HandleEPKvmPm); + LIB_FUNCTION("u9s1aUWSZB0", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np12StreamWriter9WriteDataEPNS0_6HandleEPNS0_9StreamCtxEPKvmPm); + LIB_FUNCTION("gimH2zdBANg", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np12WorkerThread10ThreadMainEv); + LIB_FUNCTION("YKz2oBW3ZkM", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np12WorkerThreadC1EPNS0_9WorkQueueE); + LIB_FUNCTION("L9Ty-fG1IM4", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np12WorkerThreadC2EPNS0_9WorkQueueE); + LIB_FUNCTION("f5L6ax7EWHk", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np12WorkerThreadD0Ev); + LIB_FUNCTION("PvGTq9AGFfk", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np12WorkerThreadD1Ev); + LIB_FUNCTION("+qB+WcQlMio", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np12WorkerThreadD2Ev); + LIB_FUNCTION("4nCyBD9jBus", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np13JsonDocParser5ParseEPKcm); + LIB_FUNCTION("sgh9D+MBBKA", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np13JsonDocParser9GetResultEPPNS0_10JsonObjectE); + LIB_FUNCTION("lZWmdDoBDmI", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np13JsonDocParser9GetResultEPPNS0_9JsonValueE); + LIB_FUNCTION("yPmQcnrgR2Y", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np13JsonDocParserC2EP16SceNpAllocatorExPK7JsonDef); + LIB_FUNCTION("p5hRe1k4Wlg", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np13JsonDocParserD0Ev); + LIB_FUNCTION("iFOXfoXRHFQ", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np13JsonDocParserD1Ev); + LIB_FUNCTION("xS-Hjw1psYs", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np13JsonDocParserD2Ev); + LIB_FUNCTION("X0vEo7cZamA", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np13NpTitleSecret5ClearEv); + LIB_FUNCTION("IjOpzNzl57o", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np13NpTitleSecretC1EPKvm); + LIB_FUNCTION("bC4+qi0mqJE", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np13NpTitleSecretC1ERK16SceNpTitleSecret); + LIB_FUNCTION("fYr7Ahl-vNA", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np13NpTitleSecretC1ERKS1_); + LIB_FUNCTION("08AQ2wYpzpk", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np13NpTitleSecretC1Ev); + LIB_FUNCTION("Ft-VezxSErk", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np13NpTitleSecretC2EPKvm); + LIB_FUNCTION("9QN7g5mQgCU", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np13NpTitleSecretC2ERK16SceNpTitleSecret); + LIB_FUNCTION("JHG9CTmkdQw", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np13NpTitleSecretC2ERKS1_); + LIB_FUNCTION("K1+uzxxReX0", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np13NpTitleSecretC2Ev); + LIB_FUNCTION("dJRIc7d5iqU", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np13NpTitleSecretD0Ev); + LIB_FUNCTION("XBzzdzT3qyg", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np13NpTitleSecretD1Ev); + LIB_FUNCTION("QDlnJL6stA0", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np13NpTitleSecretD2Ev); + LIB_FUNCTION("RPv5L-o5qRQ", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np13RingBufMemory4ctorEv); + LIB_FUNCTION("NfhXX6LFmj8", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np13RingBufMemory4dtorEv); + LIB_FUNCTION("BkuxOAPlMMw", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np13RingBufMemory4InitEm); + LIB_FUNCTION("do0t--lEKMM", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np13RingBufMemory6ExpandEm); + LIB_FUNCTION("zdRXyt-65kA", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np13RingBufMemory6IsInitEv); + LIB_FUNCTION("Za00SEoNA2A", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np13RingBufMemory7DestroyEv); + LIB_FUNCTION("lGIw3qfqI60", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np13RingBufMemoryC2EP16SceNpAllocatorEx); + LIB_FUNCTION("70qFzq4z3UI", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np13RingBufMemoryD0Ev); + LIB_FUNCTION("C1TJsMv9wb8", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np13RingBufMemoryD1Ev); + LIB_FUNCTION("EaxLv8TfsrM", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np13RingBufMemoryD2Ev); + LIB_FUNCTION("j6CorpmdjRk", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np14CalloutContext4InitEPKcimm); + LIB_FUNCTION("oLpLfV2Ov9A", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np14CalloutContext4InitEPKNS1_5ParamE); + LIB_FUNCTION("C282U0P6Nwg", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np14CalloutContext7DestroyEv); + LIB_FUNCTION("dV+zK-Ce-2E", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np14CalloutContextC1Ev); + LIB_FUNCTION("j4IAvbKKTzw", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np14CalloutContextC2Ev); + LIB_FUNCTION("WR4mjQeqz6s", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np14CalloutContextD0Ev); + LIB_FUNCTION("S+a+rgnGX8A", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np14CalloutContextD1Ev); + LIB_FUNCTION("wY9g+hVxLTM", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np14CalloutContextD2Ev); + LIB_FUNCTION("PYBehFWVd60", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np14JsonDocBuilder12BuildBufSizeEv); + LIB_FUNCTION("cLdoHqi5Ezg", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np14JsonDocBuilder16EscapeJsonStringEPKcPcmPm); + LIB_FUNCTION("V5xX2eroaWY", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np14JsonDocBuilder23EscapeJsonStringBufSizeEPKc); + LIB_FUNCTION("irex3q-O6po", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np14JsonDocBuilder5BuildEPcmPm); + LIB_FUNCTION("ikFI73f3hP4", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np14JsonDocBuilderC1ERKNS0_9JsonValueE); + LIB_FUNCTION("dhJGQPKLmn0", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np14JsonDocBuilderC2ERKNS0_9JsonValueE); + LIB_FUNCTION("wDLaq7IgfIc", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np14JsonDocBuilderD0Ev); + LIB_FUNCTION("Kfv9jPxf7qA", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np14JsonDocBuilderD1Ev); + LIB_FUNCTION("MH0LyghLJEE", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np14JsonDocBuilderD2Ev); + LIB_FUNCTION("pCIB7QX5e1g", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np15CancelableScope3EndEiPKciS3_); + LIB_FUNCTION("Etvu03IpTEc", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np15CancelableScope5BeginEPNS0_6HandleEPKciS5_); + LIB_FUNCTION("pp88xnRgJrM", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np15CancelableScopeC2Ev); + LIB_FUNCTION("E8yuDNYbzl0", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np15CancelableScopeD0Ev); + LIB_FUNCTION("km5-rjNjSFk", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np15CancelableScopeD1Ev); + LIB_FUNCTION("xpLjHhJBhpo", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np15CancelableScopeD2Ev); + LIB_FUNCTION("LCk8T5b1h+4", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np16StreamReadBufferC2EP16SceNpAllocatorEx); + LIB_FUNCTION("ZufKqNXItD0", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np16StreamReadBufferD1Ev); + LIB_FUNCTION("bH7ljyLOsBw", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np16StreamReadBufferD2Ev); + LIB_FUNCTION("et05S+nkWG8", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np18HttpConnectionPool13InvalidateAllEv); + LIB_FUNCTION("Vzob5RCgfnY", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np18HttpConnectionPool4InitEi); + LIB_FUNCTION("iBdEFRdfpgg", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np18HttpConnectionPool7DestroyEv); + LIB_FUNCTION("PznfSvchYJ8", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np18HttpConnectionPoolC1EP16SceNpAllocatorEx); + LIB_FUNCTION("-2TYwZ4ERbM", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np18HttpConnectionPoolC2EP16SceNpAllocatorEx); + LIB_FUNCTION("5HWP63cOH+w", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np18HttpConnectionPoolD0Ev); + LIB_FUNCTION("kTfkKhcdW5Y", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np18HttpConnectionPoolD1Ev); + LIB_FUNCTION("3MVW8+eWnjs", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np18HttpConnectionPoolD2Ev); + LIB_FUNCTION("ELa6nMcCO9w", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np18MemoryStreamReader4ReadEPNS0_6HandleEPvmPm); + LIB_FUNCTION("UHj0GDTA2CU", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np18MemoryStreamReaderC1EPKvm); + LIB_FUNCTION("WXRruhGp9dI", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np18MemoryStreamReaderC2EPKvm); + LIB_FUNCTION("gA0CaCjJpg0", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np18MemoryStreamReaderD0Ev); + LIB_FUNCTION("oULMh4JVC4o", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np18MemoryStreamReaderD1Ev); + LIB_FUNCTION("rNJ1+3KoZP4", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np18MemoryStreamReaderD2Ev); + LIB_FUNCTION("VxKQGrudnzk", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np18MemoryStreamWriter5WriteEPNS0_6HandleEPKvmPm); + LIB_FUNCTION("Lkdm2yqZN1c", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np18MemoryStreamWriterC1EPvm); + LIB_FUNCTION("abQ7xd3yVXM", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np18MemoryStreamWriterC2EPvm); + LIB_FUNCTION("TXJnPiKuTf8", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np18MemoryStreamWriterD0Ev); + LIB_FUNCTION("3VdCUl+DkNw", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np18MemoryStreamWriterD1Ev); + LIB_FUNCTION("YmOVGwSJmzk", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np18MemoryStreamWriterD2Ev); + LIB_FUNCTION("INZSjlRcuyQ", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np20BufferedStreamReader4ReadEPNS0_6HandleEPvmPm); + LIB_FUNCTION("3Ku9r8b6gCg", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np20BufferedStreamReader5CloseEv); + LIB_FUNCTION("l6s7aomzWGA", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np20BufferedStreamReaderC2EP16SceNpAllocatorEx); + LIB_FUNCTION("i28bR54-QFQ", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np20BufferedStreamReaderD0Ev); + LIB_FUNCTION("Tgr66MThOxA", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np20BufferedStreamReaderD1Ev); + LIB_FUNCTION("PHWvRXbOnYs", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np20BufferedStreamReaderD2Ev); + LIB_FUNCTION("7dyKpPHU+Yk", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np3ipc10IpmiClient10DisconnectEv); + LIB_FUNCTION("prj9aMR74bA", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np3ipc10IpmiClient11IsConnectedEv); + LIB_FUNCTION("r7UpNm1Po9s", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np3ipc10IpmiClient16invokeSyncMethodEjPKvmPvPmm); + LIB_FUNCTION("+EQNga+wsPc", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np3ipc10IpmiClient4ctorEv); + LIB_FUNCTION("2h59YqPcrdM", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np3ipc10IpmiClient4dtorEv); + LIB_FUNCTION("iRH-NE2evR4", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np3ipc10IpmiClient4InitEPKNS2_6ConfigE); + LIB_FUNCTION("CGKtxL26XqI", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np3ipc10IpmiClient7ConnectEPKvm); + LIB_FUNCTION("+xvhXA8Ci4E", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np3ipc10IpmiClient7DestroyEv); + LIB_FUNCTION("6aKYLBS8Di8", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np3ipc10IpmiClientC1Ev); + LIB_FUNCTION("dqjlsaUX0sc", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np3ipc10IpmiClientC2Ev); + LIB_FUNCTION("3LuoWoXJ1WI", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np3ipc10IpmiClientD0Ev); + LIB_FUNCTION("DRbjyNom-BE", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np3ipc10IpmiClientD1Ev); + LIB_FUNCTION("J1lpiTKAEuk", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np3ipc10IpmiClientD2Ev); + LIB_FUNCTION( + "aQzxfON3l2Y", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np3ipc13ServiceClientC1EPNS1_17ServiceIpmiClientEPKNS1_17ServiceClientInfoE); + LIB_FUNCTION( + "Mx6wrcdGC2w", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np3ipc13ServiceClientC2EPNS1_17ServiceIpmiClientEPKNS1_17ServiceClientInfoE); + LIB_FUNCTION("uvYTUK5xYG8", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np3ipc17ServiceIpmiClient10DisconnectEv); + LIB_FUNCTION("fFGPlE0oNhw", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np3ipc17ServiceIpmiClient10EndRequestEii); + LIB_FUNCTION("F2xYmg5DiR4", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np3ipc17ServiceIpmiClient11findServiceEi); + LIB_FUNCTION("G4FYQtsjOX0", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np3ipc17ServiceIpmiClient11InitServiceEi); + LIB_FUNCTION("0rqwC4+sgzU", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np3ipc17ServiceIpmiClient11TermServiceEi); + LIB_FUNCTION("oCx3mVNvqzU", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np3ipc17ServiceIpmiClient11WaitRequestEiij); + LIB_FUNCTION("tQOrMf4KtIo", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np3ipc17ServiceIpmiClient12AbortRequestEii); + LIB_FUNCTION("9aiQo-uRPJY", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np3ipc17ServiceIpmiClient12BeginRequestEii); + LIB_FUNCTION("H35UsHYlhB4", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np3ipc17ServiceIpmiClient13CreateRequestEPiiPKvm); + LIB_FUNCTION("cMj7li0eXgw", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np3ipc17ServiceIpmiClient13DeleteRequestEii); + LIB_FUNCTION("+ZC8QYB-BA8", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np3ipc17ServiceIpmiClient13PollEventFlagEijmjPm); + LIB_FUNCTION("4GZ9O-OrfzE", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np3ipc17ServiceIpmiClient13WaitEventFlagEijmjPmj); + LIB_FUNCTION("q+uCQLffwQE", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np3ipc17ServiceIpmiClient14PollEventQueueEiPvm); + LIB_FUNCTION("bH08FzR5rFU", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np3ipc17ServiceIpmiClient15CancelEventFlagEijm); + LIB_FUNCTION("stUzNgtFmtY", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np3ipc17ServiceIpmiClient15RegisterServiceEPKNS1_17ServiceClientInfoE); + LIB_FUNCTION("fqAS9GQTmOU", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np3ipc17ServiceIpmiClient16RegisterServicesEPKNS1_17ServiceClientInfoE); + LIB_FUNCTION("BJCXJJCi0Zc", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np3ipc17ServiceIpmiClient17invokeInitServiceEi); + LIB_FUNCTION("GuruEy9Q-Zk", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np3ipc17ServiceIpmiClient17invokeTermServiceEi); + LIB_FUNCTION("k9jCtANC+QM", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np3ipc17ServiceIpmiClient17UnregisterServiceEi); + LIB_FUNCTION("8TpAxZoLLRw", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np3ipc17ServiceIpmiClient18EndRequestForAsyncEii); + LIB_FUNCTION("1ONFW86TETY", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np3ipc17ServiceIpmiClient19WaitRequestForAsyncEiij); + LIB_FUNCTION("nQm4o5iOye0", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np3ipc17ServiceIpmiClient20AbortRequestForAsyncEii); + LIB_FUNCTION( + "ktb6iOBLnd4", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np3ipc17ServiceIpmiClient20BeginRequestForAsyncEiiPN4IPMI6Client12EventNotifeeE); + LIB_FUNCTION("v5Z2LAKua28", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np3ipc17ServiceIpmiClient21CreateRequestForAsyncEPiiPKvm); + LIB_FUNCTION("7oJpAd+vJQA", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np3ipc17ServiceIpmiClient21DeleteRequestForAsyncEii); + LIB_FUNCTION("KxlKRHLf9AY", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np3ipc17ServiceIpmiClient4ctorEv); + LIB_FUNCTION("s+dG6iqG7j0", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np3ipc17ServiceIpmiClient4dtorEv); + LIB_FUNCTION("qFdG8Ucfeqg", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np3ipc17ServiceIpmiClient4InitEPNS2_6ConfigE); + LIB_FUNCTION("NTPZ5GZIA6U", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np3ipc17ServiceIpmiClient7ConnectEPKvm); + LIB_FUNCTION("IGngArGbzHo", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np3ipc17ServiceIpmiClient7DestroyEv); + LIB_FUNCTION("FubuBXanVWk", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np3ipc17ServiceIpmiClientC1Ev); + LIB_FUNCTION("zARyDXgocuk", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np3ipc17ServiceIpmiClientC2Ev); + LIB_FUNCTION("PmsH4f3z8Yk", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np3ipc17ServiceIpmiClientD0Ev); + LIB_FUNCTION("90XdvAqFFn8", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np3ipc17ServiceIpmiClientD1Ev); + LIB_FUNCTION("agYDXAyL-K8", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np3ipc17ServiceIpmiClientD2Ev); + LIB_FUNCTION("n9pzAHeCCVU", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np4Cond4ctorEv); + LIB_FUNCTION("BtXPJQEg41Y", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np4Cond4dtorEv); + LIB_FUNCTION("wWTqVcTnep8", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np4Cond4InitEPKcPNS0_5MutexE); + LIB_FUNCTION("SLPuaDLbeD4", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np4Cond4WaitEj); + LIB_FUNCTION("OQiPXR6gfj0", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np4Cond6SignalEv); + LIB_FUNCTION("I5uzTXxbziU", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np4Cond7DestroyEv); + LIB_FUNCTION("-hchsElmzXY", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np4Cond9SignalAllEv); + LIB_FUNCTION("3z5EPY-ph14", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, _ZN3sce2np4CondC1Ev); + LIB_FUNCTION("6nW8WXQYRgM", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, _ZN3sce2np4CondC2Ev); + LIB_FUNCTION("AKiHGWhC2KU", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, _ZN3sce2np4CondD0Ev); + LIB_FUNCTION("yX9ISVXv+0M", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, _ZN3sce2np4CondD1Ev); + LIB_FUNCTION("6RQRpTn+-cc", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, _ZN3sce2np4CondD2Ev); + LIB_FUNCTION("6r6ssbPbKc4", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np4Path11BuildAppendEPcmcPKcm); + LIB_FUNCTION("vfBKsg+lKWc", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np4Path12AddDelimiterEPcmc); + LIB_FUNCTION("BqFx1VLEMPk", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np4Path5ClearEv); + LIB_FUNCTION("AcG6blobOQE", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np4Path6SetStrEPKcm); + LIB_FUNCTION("0fwoTW7gqfM", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, _ZN3sce2np4PathD0Ev); + LIB_FUNCTION("-3UvpBs-26g", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, _ZN3sce2np4PathD1Ev); + LIB_FUNCTION("1nF0eXrBZYM", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, _ZN3sce2np4PathD2Ev); + LIB_FUNCTION("KhoD7EapiYI", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np4Time10AddMinutesEl); + LIB_FUNCTION("PgiCaoqRKKc", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np4Time10AddSecondsEl); + LIB_FUNCTION("vINvzJOaqws", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np4Time12GetUserClockEPS1_); + LIB_FUNCTION("dLNhHwYyt4c", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np4Time15AddMicroSecondsEl); + LIB_FUNCTION("WZqwoPoMzFA", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np4Time15GetNetworkClockEPS1_); + LIB_FUNCTION("fimORKx4RDg", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np4Time20GetDebugNetworkClockEPS1_); + LIB_FUNCTION("++qSDotsHuE", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np4Time7AddDaysEl); + LIB_FUNCTION("Zc+a6k6i7gY", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np4Time8AddHoursEl); + LIB_FUNCTION("Fgm7cz6AX4k", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np4TimeplERK10SceRtcTick); + LIB_FUNCTION("F9khEfgTmsE", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np4TimeplERKS1_); + LIB_FUNCTION("I1kBZV6keO4", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np5Mutex4ctorEv); + LIB_FUNCTION("mo+gaebiE+M", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np5Mutex4dtorEv); + LIB_FUNCTION("aTNOl9EB4V4", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np5Mutex4InitEPKcj); + LIB_FUNCTION("VM+CXTW4F-s", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np5Mutex4LockEv); + LIB_FUNCTION("eYgHIWx0Hco", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np5Mutex6UnlockEv); + LIB_FUNCTION("RgGW4f0ox1g", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np5Mutex7DestroyEv); + LIB_FUNCTION("TJNrs69haak", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np5Mutex7TryLockEv); + LIB_FUNCTION("O1AvlQU33pI", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, _ZN3sce2np5MutexC1Ev); + LIB_FUNCTION("2beu2bHw6qo", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, _ZN3sce2np5MutexC2Ev); + LIB_FUNCTION("omf1GoUEJCA", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, _ZN3sce2np5MutexD0Ev); + LIB_FUNCTION("9zi9FTPol74", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, _ZN3sce2np5MutexD1Ev); + LIB_FUNCTION("CI7ciM21NXs", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, _ZN3sce2np5MutexD2Ev); + LIB_FUNCTION("uuyEiBHghY4", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np5NpEnv8GetNpEnvEPS1_); + LIB_FUNCTION("-c9QK+CpQLg", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np6Handle10CancelImplEi); + LIB_FUNCTION("ifqJb-V1QZw", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np6Handle4InitEv); + LIB_FUNCTION("1atFu71dFAU", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np6Handle7DestroyEv); + LIB_FUNCTION("KUJtztDMJYY", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, _ZN3sce2np6HandleC1Ev); + LIB_FUNCTION("OhpofCxYOJc", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, _ZN3sce2np6HandleC2Ev); + LIB_FUNCTION("ZOHgNNSZq4Q", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, _ZN3sce2np6HandleD0Ev); + LIB_FUNCTION("YWt5S4-cg9c", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, _ZN3sce2np6HandleD1Ev); + LIB_FUNCTION("dt0A2cWjwLs", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, _ZN3sce2np6HandleD2Ev); + LIB_FUNCTION("1x0jThSUr4w", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np6ObjectdaEPv); + LIB_FUNCTION("4il4PZAZOnQ", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np6ObjectdaEPvR14SceNpAllocator); + LIB_FUNCTION("q2USyzLF4kI", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np6ObjectdaEPvR16SceNpAllocatorEx); + LIB_FUNCTION("CnDHI7sU+l0", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np6ObjectdlEPv); + LIB_FUNCTION("05KEwpDf4Ls", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np6ObjectdlEPvR14SceNpAllocator); + LIB_FUNCTION("iwDNdnEGyhI", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np6ObjectdlEPvR16SceNpAllocatorEx); + LIB_FUNCTION("V75N47uYdQc", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np6ObjectnaEmR14SceNpAllocator); + LIB_FUNCTION("bKMVqRcCQ1U", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np6ObjectnaEmR16SceNpAllocatorEx); + LIB_FUNCTION("0syNkhJANVw", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np6ObjectnwEmR14SceNpAllocator); + LIB_FUNCTION("orRb69nSo64", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np6ObjectnwEmR16SceNpAllocatorEx); + LIB_FUNCTION("Ehkz-BkTPwI", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np6Thread12DoThreadMainEv); + LIB_FUNCTION("3CJl5ewd7-0", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np6Thread4ctorEv); + LIB_FUNCTION("-3gV5N2u-sc", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np6Thread4dtorEv); + LIB_FUNCTION("EqX45DhWUpo", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np6Thread4InitEPKcimm); + LIB_FUNCTION("OoK0Ah0l1ko", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np6Thread4InitEPKNS1_5ParamE); + LIB_FUNCTION("ne77q1GOlF8", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np6Thread4JoinEPi); + LIB_FUNCTION("VNKdE2Dgp0Y", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np6Thread5StartEv); + LIB_FUNCTION("sPti0OkVM8c", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np6Thread7DestroyEv); + LIB_FUNCTION("uphWwLZAuXA", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np6Thread9EntryFuncEPv); + LIB_FUNCTION("gnwCmkY-V70", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np6Thread9GetResultEv); + LIB_FUNCTION("qy4V8O+snLU", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np6Thread9IsRunningEv); + LIB_FUNCTION("0f3ylOQJwqE", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, _ZN3sce2np6ThreadC2Ev); + LIB_FUNCTION("MEYMyfJxWXg", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, _ZN3sce2np6ThreadD0Ev); + LIB_FUNCTION("0Q5aKjYErBA", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, _ZN3sce2np6ThreadD1Ev); + LIB_FUNCTION("6750DaF5Pas", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, _ZN3sce2np6ThreadD2Ev); + LIB_FUNCTION("xxOTJpEyoj4", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np7Callout10IsTimedoutEv); + LIB_FUNCTION("Zw3QlKu49eM", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np7Callout11CalloutFuncEPv); + LIB_FUNCTION("14PDhhMEBKY", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np7Callout4StopEv); + LIB_FUNCTION("TDuC6To9HJ8", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np7Callout5StartEjPNS1_7HandlerE); + LIB_FUNCTION("r0PYNWZLZS8", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np7Callout5StartEmPNS1_7HandlerE); + LIB_FUNCTION("3ErXia+y89M", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np7Callout9IsStartedEv); + LIB_FUNCTION("XEXFdmQj5oI", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np7CalloutC1EPNS0_14CalloutContextE); + LIB_FUNCTION("Bpay3NjseSU", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np7CalloutC2EPNS0_14CalloutContextE); + LIB_FUNCTION("Fx2UwoQVVmo", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np7CalloutD0Ev); + LIB_FUNCTION("kUitiIVR43g", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np7CalloutD1Ev); + LIB_FUNCTION("ebomQLbpptw", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np7CalloutD2Ev); + LIB_FUNCTION("YtzL-Rso9bk", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np7HttpUri5BuildEPKS1_PcmPmj); + LIB_FUNCTION("Xp92SsA5atA", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np7HttpUri5ParseEPS1_PKc); + LIB_FUNCTION("LL9z5QvmwaA", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np7HttpUriC1EP16SceNpAllocatorEx); + LIB_FUNCTION("q4G7qxTJWps", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np7HttpUriC2EP16SceNpAllocatorEx); + LIB_FUNCTION("w+C8QXqZKSw", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np7HttpUriD0Ev); + LIB_FUNCTION("wSCKvDDBPy4", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np7HttpUriD1Ev); + LIB_FUNCTION("D-dT+vERWmU", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np7HttpUriD2Ev); + LIB_FUNCTION("oaSKGgwTWG0", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np7RingBuf14CheckinForReadEm); + LIB_FUNCTION("78yvwepeL7U", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np7RingBuf15CheckinForWriteEm); + LIB_FUNCTION("d8NGGmSEFfU", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np7RingBuf15CheckoutForReadEPm); + LIB_FUNCTION("E2QFpAcDPq4", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np7RingBuf16CheckoutForWriteEPm); + LIB_FUNCTION("1P-MUvbtyTM", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np7RingBuf4ctorEv); + LIB_FUNCTION("rvz8xYxhMW0", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np7RingBuf4dtorEv); + LIB_FUNCTION("IL3Wk7QuRhA", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np7RingBuf4InitEPvm); + LIB_FUNCTION("kDaQLJv89bs", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np7RingBuf4PeekEmPvm); + LIB_FUNCTION("Mg-IhL6SWfg", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np7RingBuf4ReadEPvm); + LIB_FUNCTION("IZOGdJ+LFFU", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np7RingBuf5ClearEv); + LIB_FUNCTION("8Y5OOBb0B5Y", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np7RingBuf5WriteEPKvm); + LIB_FUNCTION("u-TlLaJUJEA", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np7RingBuf7DestroyEv); + LIB_FUNCTION("L5BnZpuQImk", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np7RingBufC1Ev); + LIB_FUNCTION("e2a1ZA+lJC4", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np7RingBufC2Ev); + LIB_FUNCTION("hfJ1gGLgvq8", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np7RingBufD0Ev); + LIB_FUNCTION("7w+LeZ5ymys", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np7RingBufD1Ev); + LIB_FUNCTION("9+NmoosRoBA", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np7RingBufD2Ev); + LIB_FUNCTION("d+xJZ63-wrc", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np8HttpFile4ReadEPNS0_6HandleEPvmPm); + LIB_FUNCTION("jcPO4bt5i3o", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np8HttpFile5CloseEv); + LIB_FUNCTION("RXdPqxVnrvo", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np8HttpFileC2EP16SceNpAllocatorEx); + LIB_FUNCTION("T2w3ndcG-+Q", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np8HttpFileD0Ev); + LIB_FUNCTION("6fomUWNk6Xc", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np8HttpFileD1Ev); + LIB_FUNCTION("WAat5MtCKpc", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np8HttpFileD2Ev); + LIB_FUNCTION("uDyILPgHF9Q", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np8JsonBool5ClearEv); + LIB_FUNCTION("FdpYFbq5C3Q", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np8JsonBool7SetBoolEb); + LIB_FUNCTION("mFZezLIogNI", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np8JsonFile5CloseEv); + LIB_FUNCTION("hqPavTyQlNg", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np8JsonFileD0Ev); + LIB_FUNCTION("wzqAM7IYGzU", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np8JsonFileD1Ev); + LIB_FUNCTION("QFYVZvAJNC8", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np8JsonFileD2Ev); + LIB_FUNCTION("88GKkivBFhI", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np8JsonNull5ClearEv); + LIB_FUNCTION("WcLP8wPB9X4", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np8NpCommId5BuildERKS1_Pcm); + LIB_FUNCTION("LnjjzlJ+L5c", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np8NpCommId5ClearEv); + LIB_FUNCTION("1TjLUwirok0", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np8NpCommId5ParseEPS1_PKc); + LIB_FUNCTION("UrJocI5M8GY", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np8NpCommId5ParseEPS1_PKcm); + LIB_FUNCTION("To1XvNOzjo0", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np8NpCommIdC1ERK20SceNpCommunicationId); + LIB_FUNCTION("N6SkkX1GkFU", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np8NpCommIdC1ERKS1_); + LIB_FUNCTION("AQyiYChNI0c", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np8NpCommIdC1Ev); + LIB_FUNCTION("WywlusFissg", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np8NpCommIdC2ERK20SceNpCommunicationId); + LIB_FUNCTION("rB0oqLSjH6g", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np8NpCommIdC2ERKS1_); + LIB_FUNCTION("BBtBjx9-bMI", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np8NpCommIdC2Ev); + LIB_FUNCTION("XeCZTzqIk2k", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np8NpCommIdD0Ev); + LIB_FUNCTION("EPJbX73AVeU", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np8NpCommIdD1Ev); + LIB_FUNCTION("hP18CDS6eBU", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np8NpCommIdD2Ev); + LIB_FUNCTION("5WuiSZkU3mg", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np8Selector4InitEPKc); + LIB_FUNCTION("2HkOOhiWK3M", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np8SelectorD0Ev); + LIB_FUNCTION("asZdig1mPlA", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np8SelectorD1Ev); + LIB_FUNCTION("PA9VYFAVKIE", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np8SelectorD2Ev); + LIB_FUNCTION("2YbS+GhInZQ", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np8WorkItem10SetPendingEv); + LIB_FUNCTION("XUCjhejJvPc", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np8WorkItem10SetRunningEv); + LIB_FUNCTION("-91vFSqiuKw", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np8WorkItem11SetFinishedEi); + LIB_FUNCTION("zepqHjfGe0M", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np8WorkItem14FinishCallbackEv); + LIB_FUNCTION("3rGzxcMK-Mg", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np8WorkItem15RemoveFromQueueEv); + LIB_FUNCTION("Oq5aepLkEWg", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np8WorkItem6CancelEi); + LIB_FUNCTION("gnh2cpEgSS8", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np8WorkItem9BindQueueEPNS0_9WorkQueueEi); + LIB_FUNCTION("HldN461O2Dw", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np8WorkItemC2EPKc); + LIB_FUNCTION("Y-I66cSNp+A", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np8WorkItemD0Ev); + LIB_FUNCTION("dnwItoXLoy4", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np8WorkItemD1Ev); + LIB_FUNCTION("ga4OW9MGahU", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np8WorkItemD2Ev); + LIB_FUNCTION("8i-vOVRVt5w", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np9EventFlag3SetEm); + LIB_FUNCTION("vhbvgH7wWiE", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np9EventFlag4ctorEv); + LIB_FUNCTION("5nM4Yy92Qwg", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np9EventFlag4dtorEv); + LIB_FUNCTION("5Wy+JxpCBxg", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np9EventFlag4OpenEPKc); + LIB_FUNCTION("37Rd2JS+FCM", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np9EventFlag4PollEmjPm); + LIB_FUNCTION("1s+c3SG0WYc", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np9EventFlag4WaitEmjPmj); + LIB_FUNCTION("03UlDLFsTfw", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np9EventFlag5ClearEm); + LIB_FUNCTION("wJ-k9+UShJg", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np9EventFlag6CancelEm); + LIB_FUNCTION("amFi-Av19hU", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np9EventFlag6CreateEPKcj); + LIB_FUNCTION("QlaBcxSFPZI", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np9EventFlag7DestroyEv); + LIB_FUNCTION("cMOgkE2M2e8", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np9EventFlagC1Ev); + LIB_FUNCTION("Uv1IQpTWecw", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np9EventFlagC2Ev); + LIB_FUNCTION("uHOOEbuzjEQ", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np9EventFlagD0Ev); + LIB_FUNCTION("WWW4bvT-rSw", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np9EventFlagD1Ev); + LIB_FUNCTION("RpWWfCEs9xA", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np9EventFlagD2Ev); + LIB_FUNCTION("jDDvll2aQpQ", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np9HttpTrans10SetTimeoutEPKNS1_12TimeoutParamE); + LIB_FUNCTION("+hKyaJJCE+0", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np9HttpTrans11SendRequestEPNS0_6HandleEPKvm); + LIB_FUNCTION("EhLaOnhdcXo", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np9HttpTrans12RecvResponseEPNS0_6HandleEPvmPm); + LIB_FUNCTION("fV+Q5a6p+zQ", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np9HttpTrans12SkipResponseEPNS0_6HandleE); + LIB_FUNCTION("Qfsmqs-bHeY", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np9HttpTrans16AddRequestHeaderEPKcS3_); + LIB_FUNCTION("6bYsRATI3tQ", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np9HttpTrans16SetRequestHeaderEPKcS3_); + LIB_FUNCTION("WoFp77mNyw0", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np9HttpTrans21GetResponseStatusCodeEPNS0_6HandleEPi); + LIB_FUNCTION("RJOlguLEy-E", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np9HttpTrans21SetRequestContentTypeEPKc); + LIB_FUNCTION("ws3x3yjUyeE", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np9HttpTrans23SetRequestContentLengthEm); + LIB_FUNCTION("YW09CP0Vrtw", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np9HttpTrans24GetResponseContentLengthEPNS0_6HandleEPbPm); + LIB_FUNCTION("JEYp0T1VC58", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np9HttpTrans4InitERKNS0_12HttpTemplateEPNS0_18HttpConnectionPoolEiPKcm); + LIB_FUNCTION( + "O+FeLkOM7w0", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np9HttpTrans4InitERKNS0_12HttpTemplateEPNS0_18HttpConnectionPoolEiPKcS8_tS8_m); + LIB_FUNCTION("aWo+7jvpllY", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np9HttpTrans4ReadEPNS0_6HandleEPvmPm); + LIB_FUNCTION("cocNRQpq+NA", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np9HttpTrans5WriteEPNS0_6HandleEPKvmPm); + LIB_FUNCTION("2e9GLlHTKA4", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np9HttpTrans7DestroyEv); + LIB_FUNCTION("sqNxD6H5ZOQ", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np9HttpTransC1EP16SceNpAllocatorEx); + LIB_FUNCTION("HEeXBdgvJI4", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np9HttpTransC2EP16SceNpAllocatorEx); + LIB_FUNCTION("Pe9fHKX7krE", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np9HttpTransD0Ev); + LIB_FUNCTION("ls8yIODZmzc", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np9HttpTransD1Ev); + LIB_FUNCTION("GSVe-aaTiEg", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np9HttpTransD2Ev); + LIB_FUNCTION("4cIJxNKQK5g", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np9JsonArray12AddItemArrayEPPS1_); + LIB_FUNCTION("cWsZswBMjqg", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np9JsonArray5ClearEv); + LIB_FUNCTION("aCZjveAsynw", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np9JsonValue12GetItemValueEi); + LIB_FUNCTION("aIV+HI6llz4", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np9JsonValue13GetFieldValueEiPPKc); + LIB_FUNCTION("BDie4qEtKuA", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np9JsonValue13GetFieldValueEPKc); + LIB_FUNCTION("LotC9rVP3Lo", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np9JsonValueD0Ev); + LIB_FUNCTION("hBuLbn3mGBw", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np9JsonValueD1Ev); + LIB_FUNCTION("FfSNfBmn+K8", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np9JsonValueD2Ev); + LIB_FUNCTION("PsP6LYRZ7Dc", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np9LocalFile4ReadEPNS0_6HandleEPvmPm); + LIB_FUNCTION("Flyyg6hzUOM", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np9LocalFile4SeekEliPl); + LIB_FUNCTION("YtvLEI7uZRI", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np9LocalFile4SyncEv); + LIB_FUNCTION("9q+h2q5YprU", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np9LocalFile5CloseEv); + LIB_FUNCTION("0xL7AwgxphE", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np9LocalFile5WriteEPNS0_6HandleEPKvmPm); + LIB_FUNCTION("haDbtVOmaao", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np9LocalFile6RemoveEPKc); + LIB_FUNCTION("Sgo7wy9okFI", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np9LocalFile8TruncateEl); + LIB_FUNCTION("QWlZu1JZOww", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np9LocalFileC1Ev); + LIB_FUNCTION("HP4jsVYqBKg", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np9LocalFileC2Ev); + LIB_FUNCTION("-n0CR0QxhnY", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np9LocalFileD0Ev); + LIB_FUNCTION("3eoh4hjcYag", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np9LocalFileD1Ev); + LIB_FUNCTION("s-C88O6Y8iU", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np9LocalFileD2Ev); + LIB_FUNCTION("euE6Yo5hkrY", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np9NpTitleId5BuildERKS1_Pcm); + LIB_FUNCTION("a76a3D9Adts", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np9NpTitleId5ClearEv); + LIB_FUNCTION("4O8lYvForpk", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np9NpTitleId5ParseEPS1_PKc); + LIB_FUNCTION("-swgMjedLUQ", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np9NpTitleId5ParseEPS1_PKcm); + LIB_FUNCTION("Fcvdbqpwpnw", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np9NpTitleIdC1ERK12SceNpTitleId); + LIB_FUNCTION("wd+YWDKMTQE", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np9NpTitleIdC1ERKS1_); + LIB_FUNCTION("-Ja2aT6A3fg", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np9NpTitleIdC1Ev); + LIB_FUNCTION("9n60S+t4Cxs", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np9NpTitleIdC2ERK12SceNpTitleId); + LIB_FUNCTION("IefAhNUAivM", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np9NpTitleIdC2ERKS1_); + LIB_FUNCTION("OL7DU1kkm+4", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np9NpTitleIdC2Ev); + LIB_FUNCTION("rFcQRK+GMcQ", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np9NpTitleIdD0Ev); + LIB_FUNCTION("TGJ5bE+Fb1s", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np9NpTitleIdD1Ev); + LIB_FUNCTION("XKVRBLdw+7I", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np9NpTitleIdD2Ev); + LIB_FUNCTION("zurkNUps5o8", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np9RefObject6AddRefEv); + LIB_FUNCTION("5tYi1l9CXD0", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np9RefObject7ReleaseEv); + LIB_FUNCTION("brUrttJp6MM", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np9RefObjectC1Ev); + LIB_FUNCTION("JRtw5pROOiM", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np9RefObjectC2Ev); + LIB_FUNCTION("8DrClRz7Z2U", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np9RefObjectD0Ev); + LIB_FUNCTION("lPQzOhwPjuw", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np9RefObjectD1Ev); + LIB_FUNCTION("417JucZaE3g", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np9RefObjectD2Ev); + LIB_FUNCTION("EFffsPLsOio", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np9Semaphore4OpenEPKc); + LIB_FUNCTION("hQLw6eE4O44", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np9Semaphore4WaitEj); + LIB_FUNCTION("wcOCedFKan4", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np9Semaphore6CreateEiiPKc); + LIB_FUNCTION("b7qnGORh+H4", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np9Semaphore6SignalEv); + LIB_FUNCTION("Es-CwSVnalY", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np9Semaphore7DestroyEv); + LIB_FUNCTION("Tuth2BRl4x0", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np9SemaphoreC1Ev); + LIB_FUNCTION("8k1rNqvczTc", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np9SemaphoreC2Ev); + LIB_FUNCTION("S6luQz76AQ4", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np9SemaphoreD0Ev); + LIB_FUNCTION("nW9XeX3eokI", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np9SemaphoreD1Ev); + LIB_FUNCTION("OukNoRur97E", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np9SemaphoreD2Ev); + LIB_FUNCTION("F2umEBpQFHc", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np9WorkQueue11GetItemByIdEi); + LIB_FUNCTION("wM4q1JMisvA", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np9WorkQueue15GetFinishedItemENS0_14WorkItemStatusE); + LIB_FUNCTION("UYAD7sUQcYU", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np9WorkQueue16WorkItemFinishedEPNS0_8WorkItemEi); + LIB_FUNCTION("-9cU3y6rXVM", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np9WorkQueue17ProcFinishedItemsENS0_14WorkItemStatusE); + LIB_FUNCTION("ovc4ZvD0YjY", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np9WorkQueue18RemoveFinishedItemEPNS0_8WorkItemE); + LIB_FUNCTION("vPju3W13byw", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np9WorkQueue18WaitForPendingItemEPPNS0_8WorkItemEPb); + LIB_FUNCTION("XMIv42L5bEA", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np9WorkQueue4ctorEv); + LIB_FUNCTION("wESN-qrVhOU", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np9WorkQueue4dtorEv); + LIB_FUNCTION("+dGO+GS2ZXQ", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np9WorkQueue4InitEPKcimm); + LIB_FUNCTION("U0YoWwgg8aI", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np9WorkQueue4InitEPKNS0_6Thread5ParamE); + LIB_FUNCTION("4DE+nnCVRPA", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np9WorkQueue4StopEv); + LIB_FUNCTION("VnQolo6vTr4", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np9WorkQueue5StartEv); + LIB_FUNCTION("laqZEULcfgw", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np9WorkQueue6CancelEii); + LIB_FUNCTION("CznMfhTIvVY", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np9WorkQueue6IsInitEv); + LIB_FUNCTION("NeopmYshD0U", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np9WorkQueue7DestroyEv); + LIB_FUNCTION("KQSxXJBepQ4", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np9WorkQueue7EnqueueEiPNS0_8WorkItemE); + LIB_FUNCTION("zmOmSLnqlBQ", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np9WorkQueue9CancelAllEi); + LIB_FUNCTION("eTy3L1azX4E", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np9WorkQueue9IsRunningEv); + LIB_FUNCTION("X6NVkdpRnog", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np9WorkQueueC1Ev); + LIB_FUNCTION("p+bd65J177I", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np9WorkQueueC2Ev); + LIB_FUNCTION("uyNO0GnFhPw", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np9WorkQueueD0Ev); + LIB_FUNCTION("1QFKnDJxk3A", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np9WorkQueueD1Ev); + LIB_FUNCTION("AIDhc3KCK7w", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2np9WorkQueueD2Ev); + LIB_FUNCTION("XLpPRMl5jro", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2npeqERK10SceRtcTickRKNS0_4TimeE); + LIB_FUNCTION("6jHOZ6fItFU", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2npeqERK12SceNpTitleIdRKNS0_9NpTitleIdE); + LIB_FUNCTION("i+xzwYeeEtk", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2npeqERK16SceNpTitleSecretRKNS0_13NpTitleSecretE); + LIB_FUNCTION("ZWZ9KqoIvQY", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2npeqERK20SceNpCommunicationIdRKNS0_8NpCommIdE); + LIB_FUNCTION("Vsj50ZwNUFM", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2npeqERKNS0_13NpTitleSecretERK16SceNpTitleSecret); + LIB_FUNCTION("WM5DPO-LryU", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2npeqERKNS0_13NpTitleSecretES3_); + LIB_FUNCTION("ps246w9eXI8", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2npeqERKNS0_4TimeERK10SceRtcTick); + LIB_FUNCTION("UVLmT9lzRYA", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2npeqERKNS0_4TimeES3_); + LIB_FUNCTION("WaNQzws1ATU", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2npeqERKNS0_8NpCommIdERK20SceNpCommunicationId); + LIB_FUNCTION("E-mYAG-aa1A", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2npeqERKNS0_8NpCommIdES3_); + LIB_FUNCTION("FmDmhB16wwE", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2npeqERKNS0_9NpTitleIdERK12SceNpTitleId); + LIB_FUNCTION("niXN2N4o3yY", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2npeqERKNS0_9NpTitleIdES3_); + LIB_FUNCTION("gKruhA35EXQ", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2npgeERK10SceRtcTickRKNS0_4TimeE); + LIB_FUNCTION("1mnghWFX0wQ", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2npgeERKNS0_4TimeERK10SceRtcTick); + LIB_FUNCTION("svAQxJ3yow4", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2npgeERKNS0_4TimeES3_); + LIB_FUNCTION("oVZ6spoeeN0", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2npgtERK10SceRtcTickRKNS0_4TimeE); + LIB_FUNCTION("snloJp6qQCc", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2npgtERKNS0_4TimeERK10SceRtcTick); + LIB_FUNCTION("EFES6UR65oU", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2npgtERKNS0_4TimeES3_); + LIB_FUNCTION("UIrMxV07mL0", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2npleERK10SceRtcTickRKNS0_4TimeE); + LIB_FUNCTION("cAeFZE72SXU", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2npleERKNS0_4TimeERK10SceRtcTick); + LIB_FUNCTION("ttA9TcO06uA", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2npleERKNS0_4TimeES3_); + LIB_FUNCTION("rVtImV4rxSA", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2npltERK10SceRtcTickRKNS0_4TimeE); + LIB_FUNCTION("nVB1Nsjwpj0", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2npltERKNS0_4TimeERK10SceRtcTick); + LIB_FUNCTION("d0zSLZMER34", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2npltERKNS0_4TimeES3_); + LIB_FUNCTION("MVY+jtY-WiQ", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2npneERK10SceRtcTickRKNS0_4TimeE); + LIB_FUNCTION("tDs31ASQGV8", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2npneERK12SceNpTitleIdRKNS0_9NpTitleIdE); + LIB_FUNCTION("OwsjgCQyZUI", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2npneERK16SceNpTitleSecretRKNS0_13NpTitleSecretE); + LIB_FUNCTION("O5QkjyiPM4c", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2npneERK20SceNpCommunicationIdRKNS0_8NpCommIdE); + LIB_FUNCTION("7b5y1XSa+KQ", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2npneERKNS0_13NpTitleSecretERK16SceNpTitleSecret); + LIB_FUNCTION("zbliTwZKRyU", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2npneERKNS0_13NpTitleSecretES3_); + LIB_FUNCTION("yXMjXN--3rY", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2npneERKNS0_4TimeERK10SceRtcTick); + LIB_FUNCTION("cnoM7EjlLe4", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2npneERKNS0_4TimeES3_); + LIB_FUNCTION("SM7OEf11LCA", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2npneERKNS0_8NpCommIdERK20SceNpCommunicationId); + LIB_FUNCTION("QQCqBHk79sI", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2npneERKNS0_8NpCommIdES3_); + LIB_FUNCTION("ONgEITYl9mA", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2npneERKNS0_9NpTitleIdERK12SceNpTitleId); + LIB_FUNCTION("9pp9-dwqIHM", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZN3sce2npneERKNS0_9NpTitleIdES3_); + LIB_FUNCTION("KyDWNwpREH4", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZNK3sce2np10Cancelable6IsInitEv); + LIB_FUNCTION("VI8AHrfLdqY", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZNK3sce2np10EventQueue6IsInitEv); + LIB_FUNCTION("jxPY-0x8e-M", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZNK3sce2np10EventQueue7IsEmptyEv); + LIB_FUNCTION("COxqqhvLSyM", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZNK3sce2np10JsonNumber5CloneEP16SceNpAllocatorEx); + LIB_FUNCTION("m+dAaZ5pyO4", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZNK3sce2np10JsonNumber6GetNumEPcm); + LIB_FUNCTION("Sk8AdNQUDm8", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZNK3sce2np10JsonNumber6GetNumEPi); + LIB_FUNCTION("nHgo2VpnCB8", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZNK3sce2np10JsonNumber6GetNumEPj); + LIB_FUNCTION("Agsyrf4L8uA", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZNK3sce2np10JsonNumber6GetNumEPl); + LIB_FUNCTION("P2cGbJ5nD1w", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZNK3sce2np10JsonNumber6GetNumEPm); + LIB_FUNCTION("EcboqmwkrMY", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZNK3sce2np9JsonArray5CloneEP16SceNpAllocatorEx); + LIB_FUNCTION("JcAsZlyr3Mo", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZNK3sce2np9JsonValue12GetItemValueEi); + LIB_FUNCTION("XZTZqqSVGlY", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZNK3sce2np9NpTitleId7IsEmptyEv); + LIB_FUNCTION("sreH33xjV0A", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZNK3sce2np9Semaphore6IsInitEv); + LIB_FUNCTION("QwO4sr6XzSY", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZThn16_N3sce2np10MemoryFile5WriteEPNS0_6HandleEPKvmPm); + LIB_FUNCTION("ojBk-UJxzWw", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZThn16_N3sce2np10MemoryFileD0Ev); + LIB_FUNCTION("8S1mWU-N9kM", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZThn16_N3sce2np10MemoryFileD1Ev); + LIB_FUNCTION("eRlqlofFKYg", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZThn16_N3sce2np9HttpTrans5WriteEPNS0_6HandleEPKvmPm); + LIB_FUNCTION("zWIFe+d77PU", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZThn16_N3sce2np9HttpTransD0Ev); + LIB_FUNCTION("GG1Y+vBUkdU", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZThn16_N3sce2np9HttpTransD1Ev); + LIB_FUNCTION("+3ySpB1buMs", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZThn16_N3sce2np9LocalFile5WriteEPNS0_6HandleEPKvmPm); + LIB_FUNCTION("hSnLhjGefsU", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZThn16_N3sce2np9LocalFileD0Ev); + LIB_FUNCTION("q3s6++iIzjE", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZThn16_N3sce2np9LocalFileD1Ev); + LIB_FUNCTION("E6GYo9uzjds", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZThn8_N3sce2np10MemoryFile4ReadEPNS0_6HandleEPvmPm); + LIB_FUNCTION("7bzUdBtIQhE", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZThn8_N3sce2np10MemoryFileD0Ev); + LIB_FUNCTION("lNs-oTKpG9s", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZThn8_N3sce2np10MemoryFileD1Ev); + LIB_FUNCTION("xDrWJARfCbk", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZThn8_N3sce2np6Handle10CancelImplEi); + LIB_FUNCTION("YqMS-iAjFY8", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZThn8_N3sce2np6HandleD0Ev); + LIB_FUNCTION("lUsG1QfgVN4", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZThn8_N3sce2np6HandleD1Ev); + LIB_FUNCTION("G+v692ul7MA", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZThn8_N3sce2np9HttpTrans4ReadEPNS0_6HandleEPvmPm); + LIB_FUNCTION("sGhCzaJf+jQ", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZThn8_N3sce2np9HttpTransD0Ev); + LIB_FUNCTION("PUqCtFwnNvA", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZThn8_N3sce2np9HttpTransD1Ev); + LIB_FUNCTION("NtsHoOq2ao4", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZThn8_N3sce2np9LocalFile4ReadEPNS0_6HandleEPvmPm); + LIB_FUNCTION("Gh35wbyg4U8", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZThn8_N3sce2np9LocalFileD0Ev); + LIB_FUNCTION("kD3l0P19Wzg", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZThn8_N3sce2np9LocalFileD1Ev); + LIB_FUNCTION("IvTsS4VJq1w", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZTVN3sce2np10JsonNumberE); + LIB_FUNCTION("aLGD1kOLQXE", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZTVN3sce2np10JsonObjectE); + LIB_FUNCTION("1At86OClqtY", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZTVN3sce2np10JsonStringE); + LIB_FUNCTION("jsHe99x6l0w", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZTVN3sce2np8JsonBoolE); + LIB_FUNCTION("A742Lh-FnVE", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZTVN3sce2np8JsonNullE); + LIB_FUNCTION("FfXZGW1TMvo", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZTVN3sce2np8SelectorE); + LIB_FUNCTION("0qrLVqNUn2Y", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZTVN3sce2np9JsonArrayE); + LIB_FUNCTION("S8TLtKfZCfc", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + _ZTVN3sce2np9JsonValueE); + LIB_FUNCTION("MWPOkqzYss0", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + sceNpAllocateKernelMemoryNoAlignment); + LIB_FUNCTION("gMlY6eewr-c", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + sceNpAllocateKernelMemoryWithAlignment); + LIB_FUNCTION("jGF+MaB4b-M", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, sceNpArchInit); + LIB_FUNCTION("UskWpVWxSvg", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, sceNpArchTerm); + LIB_FUNCTION("+9+kKMY9YIw", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, sceNpAtomicCas32); + LIB_FUNCTION("Yohe0MMDfj0", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, sceNpAtomicDec32); + LIB_FUNCTION("pfJgSA4jO3M", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, sceNpAtomicInc32); + LIB_FUNCTION("l67qBmMmKP4", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, sceNpBase64Decoder); + LIB_FUNCTION("pu39pU8UgCo", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, sceNpBase64Encoder); + LIB_FUNCTION("a5IfPlpchXI", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + sceNpBase64GetDecodeSize); + LIB_FUNCTION("moGcgMNTHvQ", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, sceNpBase64UrlDecoder); + LIB_FUNCTION("IeNj+OcWgU8", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, sceNpBase64UrlEncoder); + LIB_FUNCTION("7BjZKcN+oZ4", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + sceNpBase64UrlGetDecodeSize); + LIB_FUNCTION("9+m5nRdJ-wQ", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, sceNpCalloutInitCtx); + LIB_FUNCTION("fClnlkZmA6k", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + sceNpCalloutStartOnCtx); + LIB_FUNCTION("lpr66Gby8dQ", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + sceNpCalloutStartOnCtx64); + LIB_FUNCTION("in19gH7G040", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, sceNpCalloutStopOnCtx); + LIB_FUNCTION("AqJ4xkWsV+I", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, sceNpCalloutTermCtx); + LIB_FUNCTION("kb2thTuS8t8", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, sceNpCancelEventFlag); + LIB_FUNCTION("9pLoHoPMxeg", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, sceNpClearEventFlag); + LIB_FUNCTION("+nmn+Z0nWDo", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, sceNpCloseEventFlag); + LIB_FUNCTION("8hPzfjZzV88", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, sceNpCloseSema); + LIB_FUNCTION("i8UmXTSq7N4", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, sceNpCmpNpId); + LIB_FUNCTION("TcwEFnakiSc", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, sceNpCmpNpIdInOrder); + LIB_FUNCTION("dj+O5aD2a0Q", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, sceNpCmpOnlineId); + LIB_FUNCTION("1a+iY5YUJcI", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, sceNpCondDestroy); + LIB_FUNCTION("q2tsVO3lM4A", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, sceNpCondInit); + LIB_FUNCTION("uMJFOA62mVU", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, sceNpCondSignal); + LIB_FUNCTION("bsjWg59A7aE", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, sceNpCondSignalAll); + LIB_FUNCTION("bAHIOyNnx5Y", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, sceNpCondSignalTo); + LIB_FUNCTION("ss2xO9IJxKQ", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, sceNpCondTimedwait); + LIB_FUNCTION("fZShld2PQ7w", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, sceNpCondWait); + LIB_FUNCTION("6jFWpAfqAcc", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, sceNpCreateEventFlag); + LIB_FUNCTION("LHZtCT2W1Pw", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, sceNpCreateSema); + LIB_FUNCTION("fhJ5uKzcn0w", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, sceNpCreateThread); + LIB_FUNCTION("90pmGqDK4BI", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, sceNpDbgAssignDebugId); + LIB_FUNCTION("Etq15-l9yko", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, sceNpDbgDumpBinary); + LIB_FUNCTION("ZaKa5x61hGA", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, sceNpDbgDumpText); + LIB_FUNCTION("sjnIeFCuTD0", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, sceNpDeleteEventFlag); + LIB_FUNCTION("xPrF2nGPBXQ", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, sceNpDeleteSema); + LIB_FUNCTION("OQTweRLgFr8", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + sceNpEventGetCurrentNetworkTick); + LIB_FUNCTION("vjwlDmsGtME", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, sceNpFreeKernelMemory); + LIB_FUNCTION("QmDEFikd3VA", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, sceNpGetNavSdkVersion); + LIB_FUNCTION("sXVQUIGmk2U", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, sceNpGetPlatformType); + LIB_FUNCTION("Z3mnqcGmf8E", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, sceNpGetProcessId); + LIB_FUNCTION("pJlGhXEt5CU", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, sceNpGetRandom); + LIB_FUNCTION("Pglk7zFj0DI", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, sceNpGetSdkVersion); + LIB_FUNCTION("ljqnF0hmLjo", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + sceNpGetSdkVersionUInt); + LIB_FUNCTION("PVVsRmMkO1g", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + sceNpGetSystemClockUsec); + LIB_FUNCTION("-gN6uE+zWng", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + sceNpGlobalHeapGetAllocator); + LIB_FUNCTION("VUHUasztbUY", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + sceNpGlobalHeapGetAllocatorEx); + LIB_FUNCTION("P4YpPziLBd4", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + sceNpGlobalHeapGetAllocatorExPtr); + LIB_FUNCTION("DI5n4aOdxmk", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + sceNpGlobalHeapGetAllocatorPtr); + LIB_FUNCTION("wVdn78HKc30", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, sceNpHeapDestroy); + LIB_FUNCTION("lvek8w7yqyE", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, sceNpHeapGetAllocator); + LIB_FUNCTION("2jdHoPpS+W0", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, sceNpHeapGetStat); + LIB_FUNCTION("B+yGIX1+BTI", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, sceNpHeapInit); + LIB_FUNCTION("evz0-93ucJc", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, sceNpHeapShowStat); + LIB_FUNCTION("Hvpr+otU4bo", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, sceNpHexToInt); + LIB_FUNCTION("5y0wMPQkaeU", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, sceNpInt32ToStr); + LIB_FUNCTION("HoPC33siDD4", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, sceNpInt64ToStr); + LIB_FUNCTION("G6qytFoBJ-w", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + sceNpIntGetPlatformType); + LIB_FUNCTION("fY4XQoA20i8", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + sceNpIntIsOnlineIdString); + LIB_FUNCTION("hkeX9iuCwlI", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + sceNpIntIsValidOnlineId); + LIB_FUNCTION("X6emt+LbSEI", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + sceNpIntSetPlatformType); + LIB_FUNCTION("TWPY1x1Atys", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, sceNpIntToHex); + LIB_FUNCTION("kgDwlmy78k0", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, sceNpIpc2ClientInit); + LIB_FUNCTION("CI2p6Viee9w", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, sceNpIpc2ClientTerm); + LIB_FUNCTION("EjMsfO3GCIA", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, sceNpJoinThread); + LIB_FUNCTION("vJGDnNh4I0g", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, sceNpJsonParse); + LIB_FUNCTION("RgfCYkjW7As", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, sceNpJsonParseBuf); + LIB_FUNCTION("SnAdybtBK3o", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, sceNpJsonParseBufInit); + LIB_FUNCTION("p5ZkSMRR7AU", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, sceNpJsonParseEx); + LIB_FUNCTION("nhgjiwPUIzI", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, sceNpJsonParseExInit); + LIB_FUNCTION("teVnFAL6GNY", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, sceNpJsonParseInit); + LIB_FUNCTION("zNb6IxegrCE", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, sceNpLwCondDestroy); + LIB_FUNCTION("++eqYdzB8Go", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, sceNpLwCondInit); + LIB_FUNCTION("Xkn6VoN-wuQ", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, sceNpLwCondSignal); + LIB_FUNCTION("FJ4DCt8VzVE", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, sceNpLwCondSignalAll); + LIB_FUNCTION("Bwi+EP8VQ+g", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, sceNpLwCondSignalTo); + LIB_FUNCTION("ExeLuE3EQCQ", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, sceNpLwCondWait); + LIB_FUNCTION("4zxevggtYrQ", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, sceNpLwMutexDestroy); + LIB_FUNCTION("1CiXI-MyEKs", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, sceNpLwMutexInit); + LIB_FUNCTION("18j+qk6dRwk", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, sceNpLwMutexLock); + LIB_FUNCTION("hp0kVgu5Fxw", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, sceNpLwMutexTryLock); + LIB_FUNCTION("CQG2oyx1-nM", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, sceNpLwMutexUnlock); + LIB_FUNCTION("dfXSH2Tsjkw", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + sceNpMemoryHeapDestroy); + LIB_FUNCTION("FaMNvjMA6to", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + sceNpMemoryHeapGetAllocator); + LIB_FUNCTION("xHAiSVEEjSI", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + sceNpMemoryHeapGetAllocatorEx); + LIB_FUNCTION("kZizwrFvWZY", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, sceNpMemoryHeapInit); + LIB_FUNCTION("lQ11BpMM4LU", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, sceNpMutexDestroy); + LIB_FUNCTION("uEwag-0YZPc", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, sceNpMutexInit); + LIB_FUNCTION("r9Bet+s6fKc", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, sceNpMutexLock); + LIB_FUNCTION("DuslmoqQ+nk", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, sceNpMutexTryLock); + LIB_FUNCTION("oZyb9ktuCpA", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, sceNpMutexUnlock); + LIB_FUNCTION("5DkyduAF2rs", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, sceNpOpenEventFlag); + LIB_FUNCTION("-blITIdtUd0", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, sceNpOpenSema); + LIB_FUNCTION("ZoXUrTiwKNw", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, sceNpPanic); + LIB_FUNCTION("9YmBJ8KF9eI", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, sceNpPollEventFlag); + LIB_FUNCTION("xmF0yIF4iXc", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, sceNpPollSema); + LIB_FUNCTION("VMjIo2Z-aW0", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + sceNpRtcConvertToPosixTime); + LIB_FUNCTION("W0YWLVDndx0", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, sceNpRtcFormatRFC3339); + LIB_FUNCTION("LtkeQwMIEWY", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, sceNpRtcParseRFC3339); + LIB_FUNCTION("0lZHbA-HRD0", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + sceNpServerErrorJsonGetErrorCode); + LIB_FUNCTION("cRabutqUG7c", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + sceNpServerErrorJsonMultiGetErrorCode); + LIB_FUNCTION("WSQxnAVLKgw", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + sceNpServerErrorJsonParse); + LIB_FUNCTION("UbStlMKTBeU", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + sceNpServerErrorJsonParseInit); + LIB_FUNCTION("hbe+DdooIi4", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + sceNpServerErrorJsonParseMultiInit); + LIB_FUNCTION("29ftOGIrUCo", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, sceNpSetEventFlag); + LIB_FUNCTION("m9JzZSoDVFY", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, sceNpSetPlatformType); + LIB_FUNCTION("-W28+9p1CKI", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, sceNpSignalSema); + LIB_FUNCTION("i5TP5NLmkoQ", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, sceNpStrBuildHex); + LIB_FUNCTION("ivnnssCwjGI", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, sceNpStrcpyToBuf); + LIB_FUNCTION("PHrpHMSU8Cs", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, sceNpStrncpyToBuf); + LIB_FUNCTION("h1SWCcBdImo", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, sceNpStrnParseHex); + LIB_FUNCTION("DUHzVPNlugg", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, sceNpStrParseHex); + LIB_FUNCTION("fElyBSn-l24", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, sceNpStrToInt32); + LIB_FUNCTION("CwqYdG4TrjA", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, sceNpStrToInt64); + LIB_FUNCTION("uj86YxCYid0", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, sceNpStrToUInt32); + LIB_FUNCTION("Ted2YU9lv94", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, sceNpStrToUInt64); + LIB_FUNCTION("yvaNTRiKXmo", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, sceNpThreadGetId); + LIB_FUNCTION("rRN89jBArEM", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, sceNpUInt32ToStr); + LIB_FUNCTION("QjNUYQbGoHA", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, sceNpUInt64ToStr); + LIB_FUNCTION("Gh74vNl06sg", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + sceNpUserGetUserIdList); + LIB_FUNCTION("N3tAHlBnowE", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, sceNpUtilBuildTitleId); + LIB_FUNCTION("4mEAk-UKVNw", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + sceNpUtilCanonicalizeNpIdForPs4); + LIB_FUNCTION("N3FB4r8JoRE", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + sceNpUtilCanonicalizeNpIdForPsp2); + LIB_FUNCTION("xPRHNaD3kTc", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, sceNpUtilCmpAccountId); + LIB_FUNCTION("owm52JoZ8uc", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + sceNpUtilGetDateSetAuto); + LIB_FUNCTION("1Gfhi+tZ9IE", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + sceNpUtilGetDbgCommerce); + LIB_FUNCTION("kBON3bAtfGs", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, sceNpUtilGetEnv); + LIB_FUNCTION("MUj0IV6XFGs", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + sceNpUtilGetFakeDisplayNameMode); + LIB_FUNCTION("O86rgZ2azfg", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + sceNpUtilGetFakeRateLimit); + LIB_FUNCTION("FrxliFYAO8Y", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + sceNpUtilGetIgnoreNpTitleId); + LIB_FUNCTION("GRvK1ZE+FEQ", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, sceNpUtilGetNpDebug); + LIB_FUNCTION("OFiFmfsADas", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + sceNpUtilGetNpLanguageCode); + LIB_FUNCTION("X9CqyP164Hc", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + sceNpUtilGetNpLanguageCode2); + LIB_FUNCTION("Fxux7Ob+Ynk", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + sceNpUtilGetNpLanguageCode2Str); + LIB_FUNCTION("RfiA17kV+xs", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + sceNpUtilGetNpLanguageCodeStr); + LIB_FUNCTION("OA8f3KF9JsM", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + sceNpUtilGetNpTestPatch); + LIB_FUNCTION("KCk4OGu8+sc", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, sceNpUtilGetNthChar); + LIB_FUNCTION("fB5hE65pzbU", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + sceNpUtilGetShareTitleCheck); + LIB_FUNCTION("SXUNKr9Zkv0", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + sceNpUtilGetSystemLanguage); + LIB_FUNCTION("AjzLvR0g5Zs", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, sceNpUtilGetTrcNotify); + LIB_FUNCTION("pmHBFJyju9E", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + sceNpUtilGetWebApi2FakeRateLimit); + LIB_FUNCTION("ZRxKp9vjcNc", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + sceNpUtilGetWebApi2FakeRateLimitTarget); + LIB_FUNCTION("4CqfNm3pisU", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + sceNpUtilGetWebTraceSetting); + LIB_FUNCTION("ajoqGz0D9Dw", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + sceNpUtilHttpUrlEncode); + LIB_FUNCTION("458yjI+OECI", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, sceNpUtilJidToNpId); + LIB_FUNCTION("EftEB4kmkSg", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, sceNpUtilJsonEscape); + LIB_FUNCTION("vj04qzp7uKY", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + sceNpUtilJsonGetOneChar); + LIB_FUNCTION("4YJ5gYtRAAE", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, sceNpUtilJsonUnescape); + LIB_FUNCTION("KyB1IAY2BiU", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, sceNpUtilNpIdToJid); + LIB_FUNCTION("c+ssxRf1Si0", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, sceNpUtilNumChars); + LIB_FUNCTION("oz2SlXNAnuI", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, sceNpUtilParseJid); + LIB_FUNCTION("EfnfZtjjyR0", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, sceNpUtilParseTitleId); + LIB_FUNCTION("okX7IjW0QsI", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, sceNpUtilSerializeJid); + LIB_FUNCTION("5bBPLZV49kY", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, sceNpUtilXmlEscape); + LIB_FUNCTION("Ls4eWDrbNmg", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, + sceNpUtilXmlGetOneChar); + LIB_FUNCTION("+0rj9KhmYb0", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, sceNpUtilXmlUnescape); + LIB_FUNCTION("ZbdPHUm7jOY", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, sceNpWaitEventFlag); + LIB_FUNCTION("6adrFGe2cpU", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, sceNpWaitSema); + LIB_FUNCTION("fEcrs9UPPyo", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, sceNpXmlParse); + LIB_FUNCTION("MCLGkfBmw4c", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, sceNpXmlParseInit); + LIB_FUNCTION("AP1XjC3ZZt8", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_00FD578C2DD966DF); + LIB_FUNCTION("ATGi6oBon0w", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_0131A2EA80689F4C); + LIB_FUNCTION("AUQ8VIY73SA", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_01443C54863BDD20); + LIB_FUNCTION("AbxVvcXAra0", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_01BC55BDC5C0ADAD); + LIB_FUNCTION("AdHs9XUPQOg", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_01D1ECF5750F40E8); + LIB_FUNCTION("AgpHmnT1+6w", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_020A479A74F5FBAC); + LIB_FUNCTION("Akr14dlHKrU", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_024AF5E1D9472AB5); + LIB_FUNCTION("AnxdSIcTprM", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_027C5D488713A6B3); + LIB_FUNCTION("Av6dlMaFg1U", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_02FE9D94C6858355); + LIB_FUNCTION("BB808ccNFcE", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_041F34F1C70D15C1); + LIB_FUNCTION("BTCx0nYRQkg", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_0530B1D276114248); + LIB_FUNCTION("Bl2qFOnHOtk", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_065DAA14E9C73AD9); + LIB_FUNCTION("Bq-05dBCvD4", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_06AFF4E5D042BC3E); + LIB_FUNCTION("Bu42kpn3OZc", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_06EE369299F73997); + LIB_FUNCTION("B8ktn412thc", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_07C92D9F8D76B617); + LIB_FUNCTION("B+kRdJjx5L8", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_07E9117498F1E4BF); + LIB_FUNCTION("CPPgrzZk8nU", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_08F3E0AF3664F275); + LIB_FUNCTION("Cpk3wB7yE3U", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_0A9937C01EF21375); + LIB_FUNCTION("CsvmrMujh20", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_0ACBE6ACCBA3876D); + LIB_FUNCTION("CuB9M1RRDOY", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_0AE07D3354510CE6); + LIB_FUNCTION("Cuw8NCrme3w", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_0AEC3C342AE67B7C); + LIB_FUNCTION("CzGEIMEefCM", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_0B318420C11E7C23); + LIB_FUNCTION("C7bDewPzXYk", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_0BB6C37B03F35D89); + LIB_FUNCTION("C76Kms3ZD98", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_0BBE8A9ACDD90FDF); + LIB_FUNCTION("DHtikF4iTpw", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_0C7B62905E224E9C); + LIB_FUNCTION("DTWRMRckGvk", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_0D35913117241AF9); + LIB_FUNCTION("DV7pXO7Yeac", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_0D5EE95CEED879A7); + LIB_FUNCTION("DW+ySyerHaI", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_0D6FB24B27AB1DA2); + LIB_FUNCTION("DegDLVNKxBw", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_0DE8032D534AC41C); + LIB_FUNCTION("DfTMqdyp50I", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_0DF4CCA9DCA9E742); + LIB_FUNCTION("DnRJsdPZjAE", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_0E7449B1D3D98C01); + LIB_FUNCTION("DncJS3dQyzc", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_0E77094B7750CB37); + LIB_FUNCTION("Dsqzl7bVBgM", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_0ECAB397B6D50603); + LIB_FUNCTION("Dx3h0eraKUg", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_0F1DE1D1EADA2948); + LIB_FUNCTION("D4r++h0mvxo", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_0F8AFEFA1D26BF1A); + LIB_FUNCTION("EYgXEFYqa60", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_11881710562A6BAD); + LIB_FUNCTION("Ea-Yi70McNs", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_11AFD88BBD0C70DB); + LIB_FUNCTION("EecEowpLiHc", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_11E704A30A4B8877); + LIB_FUNCTION("ElAUhCRS+Us", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_125014842452F94B); + LIB_FUNCTION("Em8AceEcrEY", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_126F0071E11CAC46); + LIB_FUNCTION("EpJtzzWZSwE", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_12926DCF35994B01); + LIB_FUNCTION("Esx6v78xYY8", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_12CC7ABFBF31618F); + LIB_FUNCTION("E8TlH0RZKqI", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_13C4E51F44592AA2); + LIB_FUNCTION("FTMOfFYzglQ", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_15330E7C56338254); + LIB_FUNCTION("FWazWMq-JhI", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_1566B358CABF2612); + LIB_FUNCTION("FiWBjyaPRe8", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_1625818F268F45EF); + LIB_FUNCTION("FtMrQNKKmsI", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_16D32B40D28A9AC2); + LIB_FUNCTION("GD9Eg729Jc0", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_183F4483BDBD25CD); + LIB_FUNCTION("GIfp6Vr2Lz0", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_1887E9E95AF62F3D); + LIB_FUNCTION("GKPOlf2JPTo", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_18A3CE95FD893D3A); + LIB_FUNCTION("GLNmXkhU5+k", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_18B3665E4854E7E9); + LIB_FUNCTION("GSOwA5SK9H4", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_1923B003948AF47E); + LIB_FUNCTION("GbUz2kxZpTI", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_19B533DA4C59A532); + LIB_FUNCTION("G7OZdy22jgg", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_1BB399772DB68E08); + LIB_FUNCTION("HArGEtOilxs", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_1C0AC612D3A2971B); + LIB_FUNCTION("HFWZt3mZCkM", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_1C5599B779990A43); + LIB_FUNCTION("HMuylrBDF74", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_1CCBB296B04317BE); + LIB_FUNCTION("HNBFVC+5MAI", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_1CD045542FB93002); + LIB_FUNCTION("HezspnOrd7c", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_1DECECA673AB77B7); + LIB_FUNCTION("HgPgJOJsGn8", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_1E03E024E26C1A7F); + LIB_FUNCTION("HxAXMrsNfiE", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_1F101732BB0D7E21); + LIB_FUNCTION("H00VPsPdR7s", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_1F4D153EC3DD47BB); + LIB_FUNCTION("H3xH9j+vDL4", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_1F7C47F63FAF0CBE); + LIB_FUNCTION("H74u5owPMbY", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_1FBE2EE68C0F31B6); + LIB_FUNCTION("IDjBYokUuck", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_2038C1628914B9C9); + LIB_FUNCTION("ID-LVv24anQ", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_203FCB56FDB86A74); + LIB_FUNCTION("IFacEHxssIw", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_20569C107C6CB08C); + LIB_FUNCTION("IKstc07eVfA", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_20AB2D734EDE55F0); + LIB_FUNCTION("IrEoEYD7Cl4", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_22B1281180FB0A5E); + LIB_FUNCTION("IvGq2makSa4", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_22F1AADA66A449AE); + LIB_FUNCTION("I4shXv-fPTA", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_238B215EFFDF3D30); + LIB_FUNCTION("JOjsUdFJ+hU", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_24E8EC51D149FA15); + LIB_FUNCTION("JXKOeKOWLAI", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_25728E78A3962C02); + LIB_FUNCTION("JeZJocaJHAU", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_25E649A1C6891C05); + LIB_FUNCTION("JkuKOLV3cF0", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_264B8A38B577705D); + LIB_FUNCTION("Jm7QjcHIKg4", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_266ED08DC1C82A0E); + LIB_FUNCTION("J7tN5iq1i60", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_27BB4DE62AB58BAD); + LIB_FUNCTION("KDqpahluouo", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_283AA96A196EA2EA); + LIB_FUNCTION("KFMVo5CoWpQ", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_285315A390A85A94); + LIB_FUNCTION("KQSdux7zGU4", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_29049DBB1EF3194E); + LIB_FUNCTION("Kfe6nDcyy0c", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_29F7BA9C3732CB47); + LIB_FUNCTION("KnMt8zGsyzc", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_2A732DF331ACCB37); + LIB_FUNCTION("KqAWYOx1tvs", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_2AA01660EC75B6FB); + LIB_FUNCTION("KzfLzpQcFoE", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_2B37CBCE941C1681); + LIB_FUNCTION("LKo7ZNBUTlU", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_2CAA3B64D0544E55); + LIB_FUNCTION("LM15YX7BCnU", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_2CCD79617EC10A75); + LIB_FUNCTION("LNi2lxasBmc", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_2CD8B69716AC0667); + LIB_FUNCTION("LXT3wP+bXpw", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_2D74F7C0FF9B5E9C); + LIB_FUNCTION("LcpagIBUTpU", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_2DCA5A8080544E95); + LIB_FUNCTION("LmnydDznzlc", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_2E69F2743CE7CE57); + LIB_FUNCTION("Lq8fO6-wUn0", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_2EAF1F3BAFF0527D); + LIB_FUNCTION("MUk+VbtOj2Y", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_31493E55BB4E8F66); + LIB_FUNCTION("MX7crQD7X14", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_317EDCAD00FB5F5E); + LIB_FUNCTION("MeAc+ooYzaI", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_31E01CFA8A18CDA2); + LIB_FUNCTION("Mq-XgqBhtSY", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_32AFD782A061B526); + LIB_FUNCTION("MrXN6wk7gYk", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_32B5CDEB093B8189); + LIB_FUNCTION("NBVRUlE8k64", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_34155152513C93AE); + LIB_FUNCTION("NOTv-472yf4", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_34E4EFFF8EF6C9FE); + LIB_FUNCTION("NXL6DVxUVjs", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_3572FA0D5C54563B); + LIB_FUNCTION("NnxHmyZODbk", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_367C479B264E0DB9); + LIB_FUNCTION("NohPvJZLKcw", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_36884FBC964B29CC); + LIB_FUNCTION("OGAIG7dVmUk", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_3860081BB7559949); + LIB_FUNCTION("OTFPfmdKsTI", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_39314F7E674AB132); + LIB_FUNCTION("OgLngPzFVqU", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_3A02E780FCC556A5); + LIB_FUNCTION("Ohe4hbpISbY", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_3A17B885BA4849B6); + LIB_FUNCTION("OjjqyupeI6Q", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_3A38EACAEA5E23A4); + LIB_FUNCTION("OzSl4H8NvB8", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_3B34A5E07F0DBC1F); + LIB_FUNCTION("O06P-AD8fqQ", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_3B4E8FFC00FC7EA4); + LIB_FUNCTION("O6sY-aI1EHo", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_3BAB18FDA235107A); + LIB_FUNCTION("O9+ZlqCjPxE", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_3BDF9996A0A33F11); + LIB_FUNCTION("PBlS8aRcw3o", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_3C1952F1A45CC37A); + LIB_FUNCTION("PKN5Bs2wXzs", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_3CA37906CDB05F3B); + LIB_FUNCTION("PNspCKzuOm8", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_3CDB2908ACEE3A6F); + LIB_FUNCTION("PT7RZfK9zTM", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_3D3ED165F2BDCD33); + LIB_FUNCTION("PaTX0Vdfzc4", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_3DA4D7D1575FCDCE); + LIB_FUNCTION("Pd+2Es0Lx2k", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_3DDFB612CD0BC769); + LIB_FUNCTION("PgQV4Wfercc", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_3E0415E167DEADC7); + LIB_FUNCTION("Pn6fDxWBweY", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_3E7E9F0F1581C1E6); + LIB_FUNCTION("PtOJ24KA7WU", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_3ED389DB8280ED65); + LIB_FUNCTION("Pwx-bAw1SH0", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_3F0C7F6C0C35487D); + LIB_FUNCTION("P9pyADie8NI", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_3FDA7200389EF0D2); + LIB_FUNCTION("P-PCWLpRblg", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_3FF3C258BA516E58); + LIB_FUNCTION("QClFP2KKPF0", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_4029453F628A3C5D); + LIB_FUNCTION("QFgm3bSuU44", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_405826DDB4AE538E); + LIB_FUNCTION("QFqSZ1nyWGU", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_405A926759F25865); + LIB_FUNCTION("QGYI-e566Io", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_406608FDEE7AE88A); + LIB_FUNCTION("QN2lVYwX3c8", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_40DDA5558C17DDCF); + LIB_FUNCTION("QZ0S5S-2BmQ", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_419D12E52FF60664); + LIB_FUNCTION("QpblOUdL538", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_4296E539474BE77F); + LIB_FUNCTION("QvQfxWPMNlQ", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_42F41FC563CC3654); + LIB_FUNCTION("Q8zIb0yTAmo", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_43CCC86F4C93026A); + LIB_FUNCTION("RAn2C9q8ZeE", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_4409F60BDABC65E1); + LIB_FUNCTION("RWPHCuxnU4I", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_4563C70AEC675382); + LIB_FUNCTION("ReZjcCGb0F4", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_45E66370219BD05E); + LIB_FUNCTION("RmpU8HJ4VpY", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_466A54F072785696); + LIB_FUNCTION("Rs0lNpdvIJo", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_46CD2536976F209A); + LIB_FUNCTION("SGNxe9L90Vc", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_4863717BD2FDD157); + LIB_FUNCTION("SQLr0ZomMUk", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_4902EBD19A263149); + LIB_FUNCTION("SQT3-o2D9Aw", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_4904F7FE8D83F40C); + LIB_FUNCTION("Sl4T94Sr-Oc", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_4A5E13F784ABFCE7); + LIB_FUNCTION("S2XusTXBJ4E", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_4B65EEB135C12781); + LIB_FUNCTION("TBnUmXjaheI", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_4C19D49978DA85E2); + LIB_FUNCTION("TeXWIP9m8TY", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_4DE5D620FF66F136); + LIB_FUNCTION("ThcMErV6j54", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_4E170C12B57A8F9E); + LIB_FUNCTION("Ti8-pAXDJgw", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_4E2F3FA405C3260C); + LIB_FUNCTION("Tqk1BXdRO00", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_4EA9350577513B4D); + LIB_FUNCTION("T3jrb8S18h8", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_4F78EB6FC4B5F21F); + LIB_FUNCTION("UDSL5DMRF7c", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_50348BE4331117B7); + LIB_FUNCTION("UIx+jN0oHKo", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_508C7E8CDD281CAA); + LIB_FUNCTION("UhwdLAKPWn4", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_521C1D2C028F5A7E); + LIB_FUNCTION("Ui-ySjXmcpE", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_522FF24A35E67291); + LIB_FUNCTION("VHD+kMJc3Uw", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_5470FE90C25CDD4C); + LIB_FUNCTION("VX8mD5pKzRg", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_557F260F9A4ACD18); + LIB_FUNCTION("VYb5cgnzkes", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_5586F97209F391EB); + LIB_FUNCTION("VbLJt62pXDw", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_55B2C9B7ADA95C3C); + LIB_FUNCTION("VbSIo6VAuTY", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_55B488A3A540B936); + LIB_FUNCTION("VkLf6Cr0MUM", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_5642DFE82AF43143); + LIB_FUNCTION("V04EbylK4Yc", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_574E046F294AE187); + LIB_FUNCTION("V4km6-iqbL8", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_578926EBF8AA6CBF); + LIB_FUNCTION("WF2l-GUIlrw", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_585DA5FC650896BC); + LIB_FUNCTION("WNbrJzSewnY", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_58D6EB27349EC276); + LIB_FUNCTION("WQa3MXlJhy0", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_5906B7317949872D); + LIB_FUNCTION("WRC1YUM1vnA", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_5910B5614335BE70); + LIB_FUNCTION("WT19qJEfCMk", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_593D7DA8911F08C9); + LIB_FUNCTION("WXV-5qk7DVM", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_59757FE6A93B0D53); + LIB_FUNCTION("WY5g+GKxFB4", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_598E60F862B1141E); + LIB_FUNCTION("WkU1FmZoDa8", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_5A45351666680DAF); + LIB_FUNCTION("Wqvp6nAuan8", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_5AABE9EA702E6A7F); + LIB_FUNCTION("WupK5HI1W4A", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_5AEA4AE472355B80); + LIB_FUNCTION("WyDlPN5Zh0E", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_5B20E53CDE598741); + LIB_FUNCTION("W0gLWfrpR+A", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_5B480B59FAE947E0); + LIB_FUNCTION("W17sI2kKub0", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_5B5EEC23690AB9BD); + LIB_FUNCTION("XArFsK8+2uA", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_5C0AC5B0AF3EDAE0); + LIB_FUNCTION("XS6Zm+oHYtQ", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_5D2E999BEA0762D4); + LIB_FUNCTION("XVW7-UURDhY", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_5D55BBFD45110E16); + LIB_FUNCTION("Xe4VQD0rtf0", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_5DEE15403D2BB5FD); + LIB_FUNCTION("YCDHCMp0sTA", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_6020C708CA74B130); + LIB_FUNCTION("YG4UFVA8NNI", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_606E1415503C34D2); + LIB_FUNCTION("YSFA6O6aaT4", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_612140E8EE9A693E); + LIB_FUNCTION("YfE-VR2vYd8", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_61F13F551DAF61DF); + LIB_FUNCTION("YgbTkTF1Iyg", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_6206D39131752328); + LIB_FUNCTION("Yh1FQ+8DRN4", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_621D4543EF0344DE); + LIB_FUNCTION("YlmpqOVtAnM", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_6259A9A8E56D0273); + LIB_FUNCTION("Yl+ccBY0b04", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_625F9C7016346F4E); + LIB_FUNCTION("Yu+N90bNjEo", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_62EF8DF746CD8C4A); + LIB_FUNCTION("Y20qmf0eays", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_636D2A99FD1E6B2B); + LIB_FUNCTION("aAE+32b+dCU", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_68013EDF66FE7425); + LIB_FUNCTION("aXH3Bn3WOdE", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_6971F7067DD639D1); + LIB_FUNCTION("aYlq2zq0ELI", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_69896ADB3AB410B2); + LIB_FUNCTION("ahOJqm5WE4c", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_6A1389AA6E561387); + LIB_FUNCTION("alVg2J8Ssuc", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_6A5560D89F12B2E7); + LIB_FUNCTION("ar+Zz4VKvPE", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_6ABF99CF854ABCF1); + LIB_FUNCTION("a0-dxlANjcs", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_6B4FDDC6500D8DCB); + LIB_FUNCTION("bKEdW0nRkoo", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_6CA11D5B49D1928A); + LIB_FUNCTION("bWwPth5tBxU", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_6D6C0FB61E6D0715); + LIB_FUNCTION("bXUHRf4TSPU", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_6D750745FE1348F5); + LIB_FUNCTION("bhrz+dCZFL4", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_6E1AF3F9D09914BE); + LIB_FUNCTION("blPtTAiypSE", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_6E53ED4C08B2A521); + LIB_FUNCTION("bvQ6yh7WuWg", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_6EF43ACA1ED6B968); + LIB_FUNCTION("b2+gnz4bamA", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_6F6FA09F3E1B6A60); + LIB_FUNCTION("cDXDQMcZWQE", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_7035C340C7195901); + LIB_FUNCTION("cDjiHLXPZBs", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_7038E21CB5CF641B); + LIB_FUNCTION("cGNF3NpbpE0", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_706345DCDA5BA44D); + LIB_FUNCTION("cSBxTr8Qvx8", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_7120714EBF10BF1F); + LIB_FUNCTION("cT0oqRvIA90", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_713D28A91BC803DD); + LIB_FUNCTION("cVO9dqU6oBI", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_7153BD76A53AA012); + LIB_FUNCTION("cVxiXMcEG2s", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_715C625CC7041B6B); + LIB_FUNCTION("ceRnvbGHEdA", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_71E467BDB18711D0); + LIB_FUNCTION("cg0XllwfTj8", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_720D17965C1F4E3F); + LIB_FUNCTION("c0OAybz2W5o", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_734380C9BCF65B9A); + LIB_FUNCTION("c-TAjM1LvM8", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_73F4C08CCD4BBCCF); + LIB_FUNCTION("dEAxAbeynUY", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_74403101B7B29D46); + LIB_FUNCTION("dSWwgazWb-Q", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_7525B081ACD66FF4); + LIB_FUNCTION("db9Ed8E6Bco", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_75BF4477C13A05CA); + LIB_FUNCTION("dgl5P1mHxvc", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_7609793F5987C6F7); + LIB_FUNCTION("dhbtAbBHaao", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_7616ED01B04769AA); + LIB_FUNCTION("dk+HPZGhJNg", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_764F873D91A124D8); + LIB_FUNCTION("dwbx4SMFlWU", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_7706F1E123059565); + LIB_FUNCTION("d-LQfrbYBuY", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_77F2D07EB6D806E6); + LIB_FUNCTION("ecNwTNzVnlc", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_79C3704CDCD59E57); + LIB_FUNCTION("edoLuiE1FUU", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_79DA0BBA21351545); + LIB_FUNCTION("efokR7Xz8MQ", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_79FA2447B5F3F0C4); + LIB_FUNCTION("ek1vZf9hlaU", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_7A4D6F65FF6195A5); + LIB_FUNCTION("ezGVzRFN7Oc", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_7B3195CD114DECE7); + LIB_FUNCTION("ezI48jAa020", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_7B3238F2301AD36D); + LIB_FUNCTION("fHf8cHUKMmY", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_7C77FC70750A3266); + LIB_FUNCTION("fSOp3EWdbRg", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_7D23A9DC459D6D18); + LIB_FUNCTION("fVmIx0jQoF8", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_7D5988C748D0A05F); + LIB_FUNCTION("fZWXFHqZ9PQ", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_7D9597147A99F4F4); + LIB_FUNCTION("filT9Afdg0Y", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_7E2953F407DD8346); + LIB_FUNCTION("fuNOUJlwmzI", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_7EE34E5099709B32); + LIB_FUNCTION("gEcOVRHVygA", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_80470E5511D5CA00); + LIB_FUNCTION("gHF5cBwI8Gk", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_807179701C08F069); + LIB_FUNCTION("gJboH-ryTkY", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_8096E81FFAF24E46); + LIB_FUNCTION("gLdk9PG4cEI", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_80B764F4F1B87042); + LIB_FUNCTION("gL9pFDitAIs", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_80BF691438AD008B); + LIB_FUNCTION("gM9s-JYBJEI", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_80CF6CFC96012442); + LIB_FUNCTION("gOp3L4wFGf0", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_80EA772F8C0519FD); + LIB_FUNCTION("gdCv0AhNMno", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_81D0AFD0084D327A); + LIB_FUNCTION("gh64pyF2-Wc", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_821EB8A72176FD67); + LIB_FUNCTION("gtL6tUEnJz8", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_82D2FAB54127273F); + LIB_FUNCTION("g2rmacQqWek", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_836AE669C42A59E9); + LIB_FUNCTION("hVmiW-7DUYw", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_8559A25BFEC3518C); + LIB_FUNCTION("hcH2bHZ6SdI", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_85C1F66C767A49D2); + LIB_FUNCTION("hontE4P4e6c", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_8689ED1383F87BA7); + LIB_FUNCTION("h5bNnlNV06Y", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_8796CD9E5355D3A6); + LIB_FUNCTION("h9N+tt3BnZk", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_87D37EB6DDC19D99); + LIB_FUNCTION("iAqkj3D4T90", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_880AA48F70F84FDD); + LIB_FUNCTION("iXsHViCTZls", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_897B07562093665B); + LIB_FUNCTION("isr1XxY2gIc", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_8ACAF55F16368087); + LIB_FUNCTION("iuilWJsw1OA", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_8AE8A5589B30D4E0); + LIB_FUNCTION("iumXkJgxszE", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_8AE997909831B331); + LIB_FUNCTION("iy1kC+DQ+5k", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_8B2D640BE0D0FB99); + LIB_FUNCTION("iz2atGaNrss", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_8B3D9AB4668DAECB); + LIB_FUNCTION("i176qqzgtGw", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_8B5EFAAAACE0B46C); + LIB_FUNCTION("jCeUP0CpiNs", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_8C27943F40A988DB); + LIB_FUNCTION("jFQJbHX18tA", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_8C54096C75F5F2D0); + LIB_FUNCTION("jXZjoKUWiBQ", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_8D7663A0A5168814); + LIB_FUNCTION("jmGPUJmU+tc", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_8E618F509994FAD7); + LIB_FUNCTION("jxnmzAZOK5g", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_8F19E6CC064E2B98); + LIB_FUNCTION("j2qK6u6SL-U", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_8F6A8AEAEE922FF5); + LIB_FUNCTION("kBDhrY67+8o", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_9010E1AD8EBBFBCA); + LIB_FUNCTION("kKlVoOcAGuk", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_90A955A0E7001AE9); + LIB_FUNCTION("kPnWBn-uzAU", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_90F9D6067FEECC05); + LIB_FUNCTION("k0jz0ZVGodo", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_9348F3D19546A1DA); + LIB_FUNCTION("k9PAEdsZOIo", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_93D3C011DB19388A); + LIB_FUNCTION("lW56T9n4kQM", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_956E7A4FD9F89103); + LIB_FUNCTION("lfaZ4ELD5A8", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_95F699E042C3E40F); + LIB_FUNCTION("lod7OaoOhzU", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_96877B39AA0E8735); + LIB_FUNCTION("ls4HxJ7SNOo", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_96CE07C49ED234EA); + LIB_FUNCTION("l2uxeCNbVoE", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_976BB178235B5681); + LIB_FUNCTION("l4wLJeWIxNY", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_978C0B25E588C4D6); + LIB_FUNCTION("mLomEr7yONY", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_98BA2612BEF238D6); + LIB_FUNCTION("mVvdSTGvkTc", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_995BDD4931AF9137); + LIB_FUNCTION("mWbjmpJrclA", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_9966E39A926B7250); + LIB_FUNCTION("mcIwbxiWNGQ", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_99C2306F18963464); + LIB_FUNCTION("mcksYTt3a6c", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_99C92C613B776BA7); + LIB_FUNCTION("mk5Lk4zIrTk", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_9A4E4B938CC8AD39); + LIB_FUNCTION("myP3tLf3IIE", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_9B23F7B4B7F72081); + LIB_FUNCTION("nA6u6ucFqNs", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_9C0EAEEAE705A8DB); + LIB_FUNCTION("nUesWVRd6eg", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_9D47AC59545DE9E8); + LIB_FUNCTION("oTBS2LGyrPo", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_A13052D8B1B2ACFA); + LIB_FUNCTION("oapD46ePb2I", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_A1AA43E3A78F6F62); + LIB_FUNCTION("oeSM31Rknck", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_A1E48CDF54649DC9); + LIB_FUNCTION("oufe5bCvXRQ", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_A2E7DEE5B0AF5D14); + LIB_FUNCTION("ovXH-Z-xE-U", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_A2F5C7FD9FF113F5); + LIB_FUNCTION("o2KW4iadRrw", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_A36296E2269D46BC); + LIB_FUNCTION("o+4qe58NiK8", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_A3EE2A7B9F0D88AF); + LIB_FUNCTION("pEcfn34L+oI", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_A4471F9F7E0BFA82); + LIB_FUNCTION("pEm7pSHqNOE", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_A449BBA521EA34E1); + LIB_FUNCTION("pI5mbDNOcmw", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_A48E666C334E726C); + LIB_FUNCTION("pJt0SbTd5pw", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_A49B7449B4DDE69C); + LIB_FUNCTION("pXSEURJcnqQ", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_A5748451125C9EA4); + LIB_FUNCTION("ppCijWSMwXY", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_A690A28D648CC176); + LIB_FUNCTION("pqht4bHLsdk", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_A6A86DE1B1CBB1D9); + LIB_FUNCTION("qPK7e4FXQKE", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_A8F2BB7B815740A1); + LIB_FUNCTION("qT9kwGpvc5c", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_A93F64C06A6F7397); + LIB_FUNCTION("qzWSX8l9aqM", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_AB35925FC97D6AA3); + LIB_FUNCTION("rAFKosmR+ik", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_AC014AA2C991FA29); + LIB_FUNCTION("rAbhCQFASus", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_AC06E10901404AEB); + LIB_FUNCTION("rHXGiBNSNQU", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_AC75C68813523505); + LIB_FUNCTION("rUQbxJcILD4", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_AD441BC497082C3E); + LIB_FUNCTION("rU8l8CHTVMM", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_AD4F25F021D354C3); + LIB_FUNCTION("rfoEqFVBpP4", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_ADFA04A85541A4FE); + LIB_FUNCTION("rpYQprUheiM", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_AE9610A6B5217A23); + LIB_FUNCTION("ryAZI4JvClg", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_AF201923826F0A58); + LIB_FUNCTION("r8AhtDico-o", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_AFC021B4389CA3FA); + LIB_FUNCTION("sBXpmaM3PY8", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_B015E999A3373D8F); + LIB_FUNCTION("sDhLhhB-xlI", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_B0384B86107FC652); + LIB_FUNCTION("sMYwZTsxZWM", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_B0C630653B316563); + LIB_FUNCTION("sQDczYjVxz0", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_B100DCCD88D5C73D); + LIB_FUNCTION("sRo-6l5NnqQ", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_B11A3FEA5E4D9EA4); + LIB_FUNCTION("suf43BmcC5M", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_B2E7F8DC199C0B93); + LIB_FUNCTION("s6thopb23cg", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_B3AB61A296F6DDC8); + LIB_FUNCTION("s-MvauYZ7II", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_B3F32F6AE619EC82); + LIB_FUNCTION("tCJ6shO-jPU", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_B4227AB213BF8CF5); + LIB_FUNCTION("tGUr9CtgQ2A", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_B4652BF42B604360); + LIB_FUNCTION("tTbB8Tv+l8s", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_B536C1F13BFE97CB); + LIB_FUNCTION("tkXMJkGEvIk", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_B645CC264184BC89); + LIB_FUNCTION("tn4XsVgsb70", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_B67E17B1582C6FBD); + LIB_FUNCTION("ttBHxddpWk0", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_B6D047C5D7695A4D); + LIB_FUNCTION("t17Y4epi78c", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_B75ED8E1EA62EFC7); + LIB_FUNCTION("t6mpRNvX4QA", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_B7A9A944DBD7E100); + LIB_FUNCTION("t8TnW+lPMfM", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_B7C4E75BE94F31F3); + LIB_FUNCTION("uIix+SxGQSE", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_B888B1F92C464121); + LIB_FUNCTION("uN7CJWSqBXs", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_B8DEC22564AA057B); + LIB_FUNCTION("ubrdHLu65Pg", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_B9BADD1CBBBAE4F8); + LIB_FUNCTION("uqn3FpyF5Z8", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_BAA9F7169C85E59F); + LIB_FUNCTION("uu5cOJCNYts", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_BAEE5C38908D62DB); + LIB_FUNCTION("vMhV6yUYP4Q", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_BCC855EB25183F84); + LIB_FUNCTION("vQH2NwKcc2Q", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_BD01F637029C7364); + LIB_FUNCTION("vdKfWscHflM", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_BDD29F5AC7077E53); + LIB_FUNCTION("vtg90z7K1Q0", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_BED83DD33ECAD50D); + LIB_FUNCTION("vufV0Jir9yg", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_BEE7D5D098ABF728); + LIB_FUNCTION("wNsVzPWa5iw", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_C0DB15CCF59AE62C); + LIB_FUNCTION("wcIp-uD9YPo", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_C1C229FEE0FD60FA); + LIB_FUNCTION("wii5rWgpjpg", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_C228B9AD68298E98); + LIB_FUNCTION("wphSXO9vsoM", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_C298525CEF6FB283); + LIB_FUNCTION("w1Dwk1H21rU", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_C350F09351F6D6B5); + LIB_FUNCTION("w3QugPpYAxk", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_C3742E80FA580319); + LIB_FUNCTION("w8mFPV1NRdQ", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_C3C9853D5D4D45D4); + LIB_FUNCTION("w-Xa1Pufw0A", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_C3F5DAD4FB9FC340); + LIB_FUNCTION("xF+w5MzprtY", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_C45FB0E4CCE9AED6); + LIB_FUNCTION("xJecuUi348c", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_C4979CB948B7E3C7); + LIB_FUNCTION("xJsluhbPC4w", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_C49B25BA16CF0B8C); + LIB_FUNCTION("xVE0XZYxIB4", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_C551345D9631201E); + LIB_FUNCTION("xXopRCE2gpg", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_C57A294421368298); + LIB_FUNCTION("xdyRytch1ig", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_C5DC91CAD721D628); + LIB_FUNCTION("xt7O5YkTU1c", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_C6DECEE589135357); + LIB_FUNCTION("yB+LINZ6x40", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_C81F8B20D67AC78D); + LIB_FUNCTION("yCD6VvrIe+o", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_C820FA56FAC87BEA); + LIB_FUNCTION("yHjqkRTF5JA", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_C878EA9114C5E490); + LIB_FUNCTION("yKgT6-9HdQk", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_C8A813EBFF477509); + LIB_FUNCTION("yWamY9WjVII", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_C966A663D5A35482); + LIB_FUNCTION("yXxMZ-02dNM", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_C97C4C67FD3674D3); + LIB_FUNCTION("yZBVDxWEiwc", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_C990550F15848B07); + LIB_FUNCTION("yllzeo7Bu74", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_CA59737A8EC1BBBE); + LIB_FUNCTION("ysX96PgNe2U", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_CAC5FDE8F80D7B65); + LIB_FUNCTION("yxNbMNBjm4M", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_CB135B30D0639B83); + LIB_FUNCTION("y4oaqmH2TDo", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_CB8A1AAA61F64C3A); + LIB_FUNCTION("y55nRnJYB1c", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_CB9E674672580757); + LIB_FUNCTION("zCudJerqqx0", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_CC2B9D25EAEAAB1D); + LIB_FUNCTION("zRslK77fW1M", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_CD1B252BBEDF5B53); + LIB_FUNCTION("zwA76Qy+Gic", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_CF003BE90CBE1A27); + LIB_FUNCTION("zwCONIhKweI", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_CF008E34884AC1E2); + LIB_FUNCTION("0Lj0s6NoerI", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_D0B8F4B3A3687AB2); + LIB_FUNCTION("0O4ZuOkfYPU", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_D0EE19B8E91F60F5); + LIB_FUNCTION("0SuSlL0OD1Y", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_D12B9294BD0E0F56); + LIB_FUNCTION("0cyGJtj6Mos", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_D1CC8626D8FA328B); + LIB_FUNCTION("0vorueuLY6w", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_D2FA2BB9EB8B63AC); + LIB_FUNCTION("0yGXiAz5POs", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_D32197880CF93CEB); + LIB_FUNCTION("0yb1wmzIG44", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_D326F5C26CC81B8E); + LIB_FUNCTION("1PoGuVoyG3o", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_D4FA06B95A321B7A); + LIB_FUNCTION("1So3qQHgSyE", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_D52A37A901E04B21); + LIB_FUNCTION("1VBN-DmatAA", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_D5504DFC399AB400); + LIB_FUNCTION("1WEFyyf49dw", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_D56105CB27F8F5DC); + LIB_FUNCTION("1WirGSNeyxk", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_D568AB19235ECB19); + LIB_FUNCTION("1t979mOf5hE", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_D6DF7BF6639FE611); + LIB_FUNCTION("2GCKkDEZ10Y", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_D8608A903119D746); + LIB_FUNCTION("2ej8cH1ZkU0", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_D9E8FC707D59914D); + LIB_FUNCTION("2fB55i3uWyk", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_D9F079E62DEE5B29); + LIB_FUNCTION("2hfOTyl0hTY", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_DA17CE4F29748536); + LIB_FUNCTION("2kC579f2EYU", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_DA40B9EFD7F61185); + LIB_FUNCTION("2msnT+vCZmo", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_DA6B274FEBC2666A); + LIB_FUNCTION("2tAVNch6Ufw", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_DAD01535C87A51FC); + LIB_FUNCTION("20UR1EhRDsQ", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_DB4511D448510EC4); + LIB_FUNCTION("247x--xmJpw", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_DB8EF1FFFC66269C); + LIB_FUNCTION("27UI+hudqPc", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_DBB508FA1B9DA8F7); + LIB_FUNCTION("3FnJuHC3KaI", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_DC59C9B870B729A2); + LIB_FUNCTION("3Gae1sv2dRw", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_DC669ED6CBF6751C); + LIB_FUNCTION("3LiihJpByZE", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_DCB8A2849A41C991); + LIB_FUNCTION("3Y+ZFtfwOvc", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_DD8F9916D7F03AF7); + LIB_FUNCTION("3cM-L05IDCo", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_DDC33F2F4E480C2A); + LIB_FUNCTION("3gtCC96LItc", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_DE0B420BDE8B22D7); + LIB_FUNCTION("4MC8KYmP43A", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_E0C0BC29898FE370); + LIB_FUNCTION("4M2JPkb7Vbo", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_E0CD893E46FB55BA); + LIB_FUNCTION("4lUwFkt-ZZ8", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_E25530164B7F659F); + LIB_FUNCTION("42gvQ-33bFg", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_E3682F43FDF76C58); + LIB_FUNCTION("44F34ceKgPo", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_E38177E1C78A80FA); + LIB_FUNCTION("48p0z-ll3wo", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_E3CA74CFF965DF0A); + LIB_FUNCTION("5FuxkbSbLtk", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_E45BB191B49B2ED9); + LIB_FUNCTION("5GW51rYObX0", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_E465B9D6B60E6D7D); + LIB_FUNCTION("5NgodsKWw4o", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_E4D82876C296C38A); + LIB_FUNCTION("5N21NQ+ltTg", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_E4DDB5350FA5B538); + LIB_FUNCTION("5Uv-b7crx74", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_E54BFF6FB72BC7BE); + LIB_FUNCTION("5ZKpMgMCC7s", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_E592A93203020BBB); + LIB_FUNCTION("5aRK9tfUiv0", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_E5A44AF6D7D48AFD); + LIB_FUNCTION("5jmpfPn-FDA", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_E639A97CF9FF1430); + LIB_FUNCTION("5qwBeeSKiSc", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_E6AC0179E48A8927); + LIB_FUNCTION("51FZZoJ3XYM", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_E751596682775D83); + LIB_FUNCTION("54ix5S74JwI", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_E788B1E52EF82702); + LIB_FUNCTION("6U8XYT9cnTE", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_E94F17613F5C9D31); + LIB_FUNCTION("6VkBExKNVeA", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_E9590113128D55E0); + LIB_FUNCTION("6eCw3RJWCxY", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_E9E0B0DD12560B16); + LIB_FUNCTION("6vXI7OZMewU", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_EAF5C8ECE64C7B05); + LIB_FUNCTION("65i-XELUp+s", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_EB98BF5C42D4A7EB); + LIB_FUNCTION("66vEqsQ6Row", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_EBABC4AAC43A468C); + LIB_FUNCTION("6-AAhfCCzIs", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_EBF00085F082CC8B); + LIB_FUNCTION("7LZZ7gWNBq8", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_ECB659EE058D06AF); + LIB_FUNCTION("7PCWq3UUh64", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_ECF096AB751487AE); + LIB_FUNCTION("7lonFwHbM8A", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_EE5A271701DB33C0); + LIB_FUNCTION("72TLahYlJI4", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_EF64CB6A1625248E); + LIB_FUNCTION("72yKNXx+2GM", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_EF6C8A357C7ED863); + LIB_FUNCTION("8A-pT35pmZQ", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_F00FE94F7E699994); + LIB_FUNCTION("8aUdujAykDg", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_F1A51DBA30329038); + LIB_FUNCTION("8hbnZqkP3BI", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_F216E766A90FDC12); + LIB_FUNCTION("8qEFhKvl2Cw", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_F2A10584ABE5D82C); + LIB_FUNCTION("8tmdOV5UIaM", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_F2D99D395E5421A3); + LIB_FUNCTION("84AB5Si6E3E", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_F38001E528BA1371); + LIB_FUNCTION("857JyPp2h7M", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_F39EC9C8FA7687B3); + LIB_FUNCTION("86--3NYyd1w", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_F3AFFFDCD632775C); + LIB_FUNCTION("87jf8zdIv9M", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_F3B8DFF33748BFD3); + LIB_FUNCTION("9eR-lVD3oUc", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_F5E47F9550F7A147); + LIB_FUNCTION("9uk3FNGpOc8", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_F6E93714D1A939CF); + LIB_FUNCTION("9v0ZrUjk7wk", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_F6FD19AD48E4EF09); + LIB_FUNCTION("90Tr-GIPfL8", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_F744EBFC620F7CBF); + LIB_FUNCTION("925FJay6zH8", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_F76E4525ACBACC7F); + LIB_FUNCTION("95V6SIgvQss", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_F7957A48882F42CB); + LIB_FUNCTION("96gLB4CbqDg", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_F7A80B07809BA838); + LIB_FUNCTION("+FccbMW2tZ0", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_F8571C6CC5B6B59D); + LIB_FUNCTION("+Xh8+oc4Nvs", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_F9787CFA873836FB); + LIB_FUNCTION("+nifbTTTg-g", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_FA789F6D34D383F8); + LIB_FUNCTION("+rpXQIOsHmw", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_FABA574083AC1E6C); + LIB_FUNCTION("-AT9u642j7c", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_FC04FDBBAE368FB7); + LIB_FUNCTION("-S2vvy5A7uc", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_FD2DAFBF2E40EEE7); + LIB_FUNCTION("-VXubTX5UK0", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_FD55EE6D35F950AD); + LIB_FUNCTION("-lXuMgmNDVg", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_FE55EE32098D0D58); + LIB_FUNCTION("-nmEECLh2hw", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_FE79841022E1DA1C); + LIB_FUNCTION("--Sj4nn7RKc", "libSceNpCommon", 1, "libSceNpCommon", 1, 1, Func_FFF4A3E279FB44A7); +}; + +} // namespace Libraries::NpCommon \ No newline at end of file diff --git a/src/core/libraries/np_common/np_common.h b/src/core/libraries/np_common/np_common.h new file mode 100644 index 000000000..886610ccc --- /dev/null +++ b/src/core/libraries/np_common/np_common.h @@ -0,0 +1,1245 @@ +// SPDX-FileCopyrightText: Copyright 2024 shadPS4 Emulator Project +// SPDX-License-Identifier: GPL-2.0-or-later + +#pragma once + +#include "common/types.h" + +namespace Core::Loader { +class SymbolsResolver; +} + +namespace Libraries::NpCommon { + +constexpr int ORBIS_NP_ONLINEID_MAX_LENGTH = 16; + +struct OrbisNpOnlineId { + char data[ORBIS_NP_ONLINEID_MAX_LENGTH]; + s8 term; + s8 dummy[3]; +}; + +struct OrbisNpId { + OrbisNpOnlineId handle; + u8 opt[8]; + u8 reserved[8]; +}; + +int PS4_SYSV_ABI sceNpCmpNpId(OrbisNpId* np_id1, OrbisNpId* np_id2); +int PS4_SYSV_ABI sceNpCmpNpIdInOrder(OrbisNpId* np_id1, OrbisNpId* np_id2, u32* out_result); +int PS4_SYSV_ABI sceNpCmpOnlineId(OrbisNpOnlineId* online_id1, OrbisNpOnlineId* online_id2); +int PS4_SYSV_ABI _sceNpAllocatorExConvertAllocator(); +int PS4_SYSV_ABI _sceNpAllocatorExFree(); +int PS4_SYSV_ABI _sceNpAllocatorExMalloc(); +int PS4_SYSV_ABI _sceNpAllocatorExRealloc(); +int PS4_SYSV_ABI _sceNpAllocatorExStrdup(); +int PS4_SYSV_ABI _sceNpAllocatorExStrndup(); +int PS4_SYSV_ABI _sceNpAllocatorFree(); +int PS4_SYSV_ABI _sceNpAllocatorMalloc(); +int PS4_SYSV_ABI _sceNpAllocatorRealloc(); +int PS4_SYSV_ABI _sceNpAllocatorStrdup(); +int PS4_SYSV_ABI _sceNpAllocatorStrndup(); +int PS4_SYSV_ABI _sceNpFree(); +int PS4_SYSV_ABI _sceNpHeapFree(); +int PS4_SYSV_ABI _sceNpHeapMalloc(); +int PS4_SYSV_ABI _sceNpHeapRealloc(); +int PS4_SYSV_ABI _sceNpHeapStrdup(); +int PS4_SYSV_ABI _sceNpHeapStrndup(); +int PS4_SYSV_ABI _sceNpMalloc(); +int PS4_SYSV_ABI _sceNpRealloc(); +int PS4_SYSV_ABI _ZN3sce2np10Cancelable10IsCanceledEv(); +int PS4_SYSV_ABI _ZN3sce2np10Cancelable10LockCancelEPKciS3_(); +int PS4_SYSV_ABI _ZN3sce2np10Cancelable11CheckCancelEPKciS3_(); +int PS4_SYSV_ABI _ZN3sce2np10Cancelable12UnlockCancelEPKciS3_(); +int PS4_SYSV_ABI _ZN3sce2np10Cancelable13SetCancelableEb(); +int PS4_SYSV_ABI _ZN3sce2np10Cancelable14SetupSubCancelEPS1_PKciS4_(); +int PS4_SYSV_ABI _ZN3sce2np10Cancelable16CleanupSubCancelEPS1_(); +int PS4_SYSV_ABI _ZN3sce2np10Cancelable4InitEv(); +int PS4_SYSV_ABI _ZN3sce2np10Cancelable6CancelEij(); +int PS4_SYSV_ABI _ZN3sce2np10Cancelable7DestroyEv(); +int PS4_SYSV_ABI _ZN3sce2np10CancelableC2Ev(); +int PS4_SYSV_ABI _ZN3sce2np10CancelableD0Ev(); +int PS4_SYSV_ABI _ZN3sce2np10CancelableD1Ev(); +int PS4_SYSV_ABI _ZN3sce2np10CancelableD2Ev(); +int PS4_SYSV_ABI _ZN3sce2np10CancelLock3EndEPKciS3_(); +int PS4_SYSV_ABI _ZN3sce2np10CancelLock5BeginEPNS0_6HandleEPKciS5_(); +int PS4_SYSV_ABI _ZN3sce2np10CancelLockC1Ev(); +int PS4_SYSV_ABI _ZN3sce2np10CancelLockC2Ev(); +int PS4_SYSV_ABI _ZN3sce2np10CancelLockD1Ev(); +int PS4_SYSV_ABI _ZN3sce2np10CancelLockD2Ev(); +int PS4_SYSV_ABI _ZN3sce2np10EventQueue10ClearAbortEt(); +int PS4_SYSV_ABI _ZN3sce2np10EventQueue10TryDequeueEPvm(); +int PS4_SYSV_ABI _ZN3sce2np10EventQueue4ctorEv(); +int PS4_SYSV_ABI _ZN3sce2np10EventQueue4dtorEv(); +int PS4_SYSV_ABI _ZN3sce2np10EventQueue4InitEPKcmm(); +int PS4_SYSV_ABI _ZN3sce2np10EventQueue5AbortEt(); +int PS4_SYSV_ABI _ZN3sce2np10EventQueue7DequeueEPvmj(); +int PS4_SYSV_ABI _ZN3sce2np10EventQueue7DestroyEv(); +int PS4_SYSV_ABI _ZN3sce2np10EventQueue7EnqueueEPKvmj(); +int PS4_SYSV_ABI _ZN3sce2np10EventQueueC2EP16SceNpAllocatorEx(); +int PS4_SYSV_ABI _ZN3sce2np10EventQueueD0Ev(); +int PS4_SYSV_ABI _ZN3sce2np10EventQueueD1Ev(); +int PS4_SYSV_ABI _ZN3sce2np10EventQueueD2Ev(); +int PS4_SYSV_ABI _ZN3sce2np10JsonNumber5ClearEv(); +int PS4_SYSV_ABI _ZN3sce2np10JsonNumber6SetNumEi(); +int PS4_SYSV_ABI _ZN3sce2np10JsonNumber6SetNumEj(); +int PS4_SYSV_ABI _ZN3sce2np10JsonNumber6SetNumEl(); +int PS4_SYSV_ABI _ZN3sce2np10JsonNumber6SetNumEm(); +int PS4_SYSV_ABI _ZN3sce2np10JsonNumber6SetNumEPKc(); +int PS4_SYSV_ABI _ZN3sce2np10JsonObject16DeleteFieldValueEPKc(); +int PS4_SYSV_ABI _ZN3sce2np10JsonObject5ClearEv(); +int PS4_SYSV_ABI _ZN3sce2np10JsonParser4InitEPK7JsonDefPNS1_12EventHandlerE(); +int PS4_SYSV_ABI _ZN3sce2np10JsonParser5ParseEPKcm(); +int PS4_SYSV_ABI _ZN3sce2np10JsonParserC2EP16SceNpAllocatorEx(); +int PS4_SYSV_ABI _ZN3sce2np10JsonParserD0Ev(); +int PS4_SYSV_ABI _ZN3sce2np10JsonParserD1Ev(); +int PS4_SYSV_ABI _ZN3sce2np10JsonParserD2Ev(); +int PS4_SYSV_ABI _ZN3sce2np10JsonString5ClearEv(); +int PS4_SYSV_ABI _ZN3sce2np10JsonString6SetStrEPKc(); +int PS4_SYSV_ABI _ZN3sce2np10MemoryFile4ReadEPNS0_6HandleEPvmPm(); +int PS4_SYSV_ABI _ZN3sce2np10MemoryFile4SyncEv(); +int PS4_SYSV_ABI _ZN3sce2np10MemoryFile5CloseEv(); +int PS4_SYSV_ABI _ZN3sce2np10MemoryFile5WriteEPNS0_6HandleEPKvmPm(); +int PS4_SYSV_ABI _ZN3sce2np10MemoryFile8TruncateEl(); +int PS4_SYSV_ABI _ZN3sce2np10MemoryFileC2EP16SceNpAllocatorEx(); +int PS4_SYSV_ABI _ZN3sce2np10MemoryFileD0Ev(); +int PS4_SYSV_ABI _ZN3sce2np10MemoryFileD1Ev(); +int PS4_SYSV_ABI _ZN3sce2np10MemoryFileD2Ev(); +int PS4_SYSV_ABI +_ZN3sce2np12HttpTemplate19SetAuthInfoCallbackEPFii15SceHttpAuthTypePKcPcS5_iPPhPmPiPvESA_(); +int PS4_SYSV_ABI _ZN3sce2np12HttpTemplate4InitEiPKcib(); +int PS4_SYSV_ABI _ZN3sce2np12HttpTemplate7DestroyEv(); +int PS4_SYSV_ABI _ZN3sce2np12HttpTemplateC1Ev(); +int PS4_SYSV_ABI _ZN3sce2np12HttpTemplateC2Ev(); +int PS4_SYSV_ABI _ZN3sce2np12HttpTemplateD0Ev(); +int PS4_SYSV_ABI _ZN3sce2np12HttpTemplateD1Ev(); +int PS4_SYSV_ABI _ZN3sce2np12HttpTemplateD2Ev(); +int PS4_SYSV_ABI _ZN3sce2np12StreamBufferixEi(); +int PS4_SYSV_ABI _ZN3sce2np12StreamReader4ReadEPNS0_6HandleEPNS0_9StreamCtxEPvmPm(); +int PS4_SYSV_ABI _ZN3sce2np12StreamReader7ReadAllEPNS0_6HandleEPNS0_9StreamCtxEPvmPm(); +int PS4_SYSV_ABI _ZN3sce2np12StreamReader7ReadAllEPNS0_6HandleEPvmPm(); +int PS4_SYSV_ABI _ZN3sce2np12StreamReader8ReadDataEPNS0_6HandleEPNS0_9StreamCtxEPvmPm(); +int PS4_SYSV_ABI _ZN3sce2np12StreamReader8ReadDataEPNS0_6HandleEPvmPm(); +int PS4_SYSV_ABI _ZN3sce2np12StreamReader8SkipDataEPNS0_6HandleElPl(); +int PS4_SYSV_ABI _ZN3sce2np12StreamReader8SkipDataEPNS0_6HandleEPNS0_9StreamCtxElPl(); +int PS4_SYSV_ABI _ZN3sce2np12StreamWriter15WriteFilledDataEPNS0_6HandleEcl(); +int PS4_SYSV_ABI _ZN3sce2np12StreamWriter15WriteFilledDataEPNS0_6HandleEPNS0_9StreamCtxEcl(); +int PS4_SYSV_ABI _ZN3sce2np12StreamWriter5WriteEPNS0_6HandleEPNS0_9StreamCtxEPKvmPm(); +int PS4_SYSV_ABI _ZN3sce2np12StreamWriter9WriteDataEPNS0_6HandleEPKvmPm(); +int PS4_SYSV_ABI _ZN3sce2np12StreamWriter9WriteDataEPNS0_6HandleEPNS0_9StreamCtxEPKvmPm(); +int PS4_SYSV_ABI _ZN3sce2np12WorkerThread10ThreadMainEv(); +int PS4_SYSV_ABI _ZN3sce2np12WorkerThreadC1EPNS0_9WorkQueueE(); +int PS4_SYSV_ABI _ZN3sce2np12WorkerThreadC2EPNS0_9WorkQueueE(); +int PS4_SYSV_ABI _ZN3sce2np12WorkerThreadD0Ev(); +int PS4_SYSV_ABI _ZN3sce2np12WorkerThreadD1Ev(); +int PS4_SYSV_ABI _ZN3sce2np12WorkerThreadD2Ev(); +int PS4_SYSV_ABI _ZN3sce2np13JsonDocParser5ParseEPKcm(); +int PS4_SYSV_ABI _ZN3sce2np13JsonDocParser9GetResultEPPNS0_10JsonObjectE(); +int PS4_SYSV_ABI _ZN3sce2np13JsonDocParser9GetResultEPPNS0_9JsonValueE(); +int PS4_SYSV_ABI _ZN3sce2np13JsonDocParserC2EP16SceNpAllocatorExPK7JsonDef(); +int PS4_SYSV_ABI _ZN3sce2np13JsonDocParserD0Ev(); +int PS4_SYSV_ABI _ZN3sce2np13JsonDocParserD1Ev(); +int PS4_SYSV_ABI _ZN3sce2np13JsonDocParserD2Ev(); +int PS4_SYSV_ABI _ZN3sce2np13NpTitleSecret5ClearEv(); +int PS4_SYSV_ABI _ZN3sce2np13NpTitleSecretC1EPKvm(); +int PS4_SYSV_ABI _ZN3sce2np13NpTitleSecretC1ERK16SceNpTitleSecret(); +int PS4_SYSV_ABI _ZN3sce2np13NpTitleSecretC1ERKS1_(); +int PS4_SYSV_ABI _ZN3sce2np13NpTitleSecretC1Ev(); +int PS4_SYSV_ABI _ZN3sce2np13NpTitleSecretC2EPKvm(); +int PS4_SYSV_ABI _ZN3sce2np13NpTitleSecretC2ERK16SceNpTitleSecret(); +int PS4_SYSV_ABI _ZN3sce2np13NpTitleSecretC2ERKS1_(); +int PS4_SYSV_ABI _ZN3sce2np13NpTitleSecretC2Ev(); +int PS4_SYSV_ABI _ZN3sce2np13NpTitleSecretD0Ev(); +int PS4_SYSV_ABI _ZN3sce2np13NpTitleSecretD1Ev(); +int PS4_SYSV_ABI _ZN3sce2np13NpTitleSecretD2Ev(); +int PS4_SYSV_ABI _ZN3sce2np13RingBufMemory4ctorEv(); +int PS4_SYSV_ABI _ZN3sce2np13RingBufMemory4dtorEv(); +int PS4_SYSV_ABI _ZN3sce2np13RingBufMemory4InitEm(); +int PS4_SYSV_ABI _ZN3sce2np13RingBufMemory6ExpandEm(); +int PS4_SYSV_ABI _ZN3sce2np13RingBufMemory6IsInitEv(); +int PS4_SYSV_ABI _ZN3sce2np13RingBufMemory7DestroyEv(); +int PS4_SYSV_ABI _ZN3sce2np13RingBufMemoryC2EP16SceNpAllocatorEx(); +int PS4_SYSV_ABI _ZN3sce2np13RingBufMemoryD0Ev(); +int PS4_SYSV_ABI _ZN3sce2np13RingBufMemoryD1Ev(); +int PS4_SYSV_ABI _ZN3sce2np13RingBufMemoryD2Ev(); +int PS4_SYSV_ABI _ZN3sce2np14CalloutContext4InitEPKcimm(); +int PS4_SYSV_ABI _ZN3sce2np14CalloutContext4InitEPKNS1_5ParamE(); +int PS4_SYSV_ABI _ZN3sce2np14CalloutContext7DestroyEv(); +int PS4_SYSV_ABI _ZN3sce2np14CalloutContextC1Ev(); +int PS4_SYSV_ABI _ZN3sce2np14CalloutContextC2Ev(); +int PS4_SYSV_ABI _ZN3sce2np14CalloutContextD0Ev(); +int PS4_SYSV_ABI _ZN3sce2np14CalloutContextD1Ev(); +int PS4_SYSV_ABI _ZN3sce2np14CalloutContextD2Ev(); +int PS4_SYSV_ABI _ZN3sce2np14JsonDocBuilder12BuildBufSizeEv(); +int PS4_SYSV_ABI _ZN3sce2np14JsonDocBuilder16EscapeJsonStringEPKcPcmPm(); +int PS4_SYSV_ABI _ZN3sce2np14JsonDocBuilder23EscapeJsonStringBufSizeEPKc(); +int PS4_SYSV_ABI _ZN3sce2np14JsonDocBuilder5BuildEPcmPm(); +int PS4_SYSV_ABI _ZN3sce2np14JsonDocBuilderC1ERKNS0_9JsonValueE(); +int PS4_SYSV_ABI _ZN3sce2np14JsonDocBuilderC2ERKNS0_9JsonValueE(); +int PS4_SYSV_ABI _ZN3sce2np14JsonDocBuilderD0Ev(); +int PS4_SYSV_ABI _ZN3sce2np14JsonDocBuilderD1Ev(); +int PS4_SYSV_ABI _ZN3sce2np14JsonDocBuilderD2Ev(); +int PS4_SYSV_ABI _ZN3sce2np15CancelableScope3EndEiPKciS3_(); +int PS4_SYSV_ABI _ZN3sce2np15CancelableScope5BeginEPNS0_6HandleEPKciS5_(); +int PS4_SYSV_ABI _ZN3sce2np15CancelableScopeC2Ev(); +int PS4_SYSV_ABI _ZN3sce2np15CancelableScopeD0Ev(); +int PS4_SYSV_ABI _ZN3sce2np15CancelableScopeD1Ev(); +int PS4_SYSV_ABI _ZN3sce2np15CancelableScopeD2Ev(); +int PS4_SYSV_ABI _ZN3sce2np16StreamReadBufferC2EP16SceNpAllocatorEx(); +int PS4_SYSV_ABI _ZN3sce2np16StreamReadBufferD1Ev(); +int PS4_SYSV_ABI _ZN3sce2np16StreamReadBufferD2Ev(); +int PS4_SYSV_ABI _ZN3sce2np18HttpConnectionPool13InvalidateAllEv(); +int PS4_SYSV_ABI _ZN3sce2np18HttpConnectionPool4InitEi(); +int PS4_SYSV_ABI _ZN3sce2np18HttpConnectionPool7DestroyEv(); +int PS4_SYSV_ABI _ZN3sce2np18HttpConnectionPoolC1EP16SceNpAllocatorEx(); +int PS4_SYSV_ABI _ZN3sce2np18HttpConnectionPoolC2EP16SceNpAllocatorEx(); +int PS4_SYSV_ABI _ZN3sce2np18HttpConnectionPoolD0Ev(); +int PS4_SYSV_ABI _ZN3sce2np18HttpConnectionPoolD1Ev(); +int PS4_SYSV_ABI _ZN3sce2np18HttpConnectionPoolD2Ev(); +int PS4_SYSV_ABI _ZN3sce2np18MemoryStreamReader4ReadEPNS0_6HandleEPvmPm(); +int PS4_SYSV_ABI _ZN3sce2np18MemoryStreamReaderC1EPKvm(); +int PS4_SYSV_ABI _ZN3sce2np18MemoryStreamReaderC2EPKvm(); +int PS4_SYSV_ABI _ZN3sce2np18MemoryStreamReaderD0Ev(); +int PS4_SYSV_ABI _ZN3sce2np18MemoryStreamReaderD1Ev(); +int PS4_SYSV_ABI _ZN3sce2np18MemoryStreamReaderD2Ev(); +int PS4_SYSV_ABI _ZN3sce2np18MemoryStreamWriter5WriteEPNS0_6HandleEPKvmPm(); +int PS4_SYSV_ABI _ZN3sce2np18MemoryStreamWriterC1EPvm(); +int PS4_SYSV_ABI _ZN3sce2np18MemoryStreamWriterC2EPvm(); +int PS4_SYSV_ABI _ZN3sce2np18MemoryStreamWriterD0Ev(); +int PS4_SYSV_ABI _ZN3sce2np18MemoryStreamWriterD1Ev(); +int PS4_SYSV_ABI _ZN3sce2np18MemoryStreamWriterD2Ev(); +int PS4_SYSV_ABI _ZN3sce2np20BufferedStreamReader4ReadEPNS0_6HandleEPvmPm(); +int PS4_SYSV_ABI _ZN3sce2np20BufferedStreamReader5CloseEv(); +int PS4_SYSV_ABI _ZN3sce2np20BufferedStreamReaderC2EP16SceNpAllocatorEx(); +int PS4_SYSV_ABI _ZN3sce2np20BufferedStreamReaderD0Ev(); +int PS4_SYSV_ABI _ZN3sce2np20BufferedStreamReaderD1Ev(); +int PS4_SYSV_ABI _ZN3sce2np20BufferedStreamReaderD2Ev(); +int PS4_SYSV_ABI _ZN3sce2np3ipc10IpmiClient10DisconnectEv(); +int PS4_SYSV_ABI _ZN3sce2np3ipc10IpmiClient11IsConnectedEv(); +int PS4_SYSV_ABI _ZN3sce2np3ipc10IpmiClient16invokeSyncMethodEjPKvmPvPmm(); +int PS4_SYSV_ABI _ZN3sce2np3ipc10IpmiClient4ctorEv(); +int PS4_SYSV_ABI _ZN3sce2np3ipc10IpmiClient4dtorEv(); +int PS4_SYSV_ABI _ZN3sce2np3ipc10IpmiClient4InitEPKNS2_6ConfigE(); +int PS4_SYSV_ABI _ZN3sce2np3ipc10IpmiClient7ConnectEPKvm(); +int PS4_SYSV_ABI _ZN3sce2np3ipc10IpmiClient7DestroyEv(); +int PS4_SYSV_ABI _ZN3sce2np3ipc10IpmiClientC1Ev(); +int PS4_SYSV_ABI _ZN3sce2np3ipc10IpmiClientC2Ev(); +int PS4_SYSV_ABI _ZN3sce2np3ipc10IpmiClientD0Ev(); +int PS4_SYSV_ABI _ZN3sce2np3ipc10IpmiClientD1Ev(); +int PS4_SYSV_ABI _ZN3sce2np3ipc10IpmiClientD2Ev(); +int PS4_SYSV_ABI +_ZN3sce2np3ipc13ServiceClientC1EPNS1_17ServiceIpmiClientEPKNS1_17ServiceClientInfoE(); +int PS4_SYSV_ABI +_ZN3sce2np3ipc13ServiceClientC2EPNS1_17ServiceIpmiClientEPKNS1_17ServiceClientInfoE(); +int PS4_SYSV_ABI _ZN3sce2np3ipc17ServiceIpmiClient10DisconnectEv(); +int PS4_SYSV_ABI _ZN3sce2np3ipc17ServiceIpmiClient10EndRequestEii(); +int PS4_SYSV_ABI _ZN3sce2np3ipc17ServiceIpmiClient11findServiceEi(); +int PS4_SYSV_ABI _ZN3sce2np3ipc17ServiceIpmiClient11InitServiceEi(); +int PS4_SYSV_ABI _ZN3sce2np3ipc17ServiceIpmiClient11TermServiceEi(); +int PS4_SYSV_ABI _ZN3sce2np3ipc17ServiceIpmiClient11WaitRequestEiij(); +int PS4_SYSV_ABI _ZN3sce2np3ipc17ServiceIpmiClient12AbortRequestEii(); +int PS4_SYSV_ABI _ZN3sce2np3ipc17ServiceIpmiClient12BeginRequestEii(); +int PS4_SYSV_ABI _ZN3sce2np3ipc17ServiceIpmiClient13CreateRequestEPiiPKvm(); +int PS4_SYSV_ABI _ZN3sce2np3ipc17ServiceIpmiClient13DeleteRequestEii(); +int PS4_SYSV_ABI _ZN3sce2np3ipc17ServiceIpmiClient13PollEventFlagEijmjPm(); +int PS4_SYSV_ABI _ZN3sce2np3ipc17ServiceIpmiClient13WaitEventFlagEijmjPmj(); +int PS4_SYSV_ABI _ZN3sce2np3ipc17ServiceIpmiClient14PollEventQueueEiPvm(); +int PS4_SYSV_ABI _ZN3sce2np3ipc17ServiceIpmiClient15CancelEventFlagEijm(); +int PS4_SYSV_ABI _ZN3sce2np3ipc17ServiceIpmiClient15RegisterServiceEPKNS1_17ServiceClientInfoE(); +int PS4_SYSV_ABI _ZN3sce2np3ipc17ServiceIpmiClient16RegisterServicesEPKNS1_17ServiceClientInfoE(); +int PS4_SYSV_ABI _ZN3sce2np3ipc17ServiceIpmiClient17invokeInitServiceEi(); +int PS4_SYSV_ABI _ZN3sce2np3ipc17ServiceIpmiClient17invokeTermServiceEi(); +int PS4_SYSV_ABI _ZN3sce2np3ipc17ServiceIpmiClient17UnregisterServiceEi(); +int PS4_SYSV_ABI _ZN3sce2np3ipc17ServiceIpmiClient18EndRequestForAsyncEii(); +int PS4_SYSV_ABI _ZN3sce2np3ipc17ServiceIpmiClient19WaitRequestForAsyncEiij(); +int PS4_SYSV_ABI _ZN3sce2np3ipc17ServiceIpmiClient20AbortRequestForAsyncEii(); +int PS4_SYSV_ABI +_ZN3sce2np3ipc17ServiceIpmiClient20BeginRequestForAsyncEiiPN4IPMI6Client12EventNotifeeE(); +int PS4_SYSV_ABI _ZN3sce2np3ipc17ServiceIpmiClient21CreateRequestForAsyncEPiiPKvm(); +int PS4_SYSV_ABI _ZN3sce2np3ipc17ServiceIpmiClient21DeleteRequestForAsyncEii(); +int PS4_SYSV_ABI _ZN3sce2np3ipc17ServiceIpmiClient4ctorEv(); +int PS4_SYSV_ABI _ZN3sce2np3ipc17ServiceIpmiClient4dtorEv(); +int PS4_SYSV_ABI _ZN3sce2np3ipc17ServiceIpmiClient4InitEPNS2_6ConfigE(); +int PS4_SYSV_ABI _ZN3sce2np3ipc17ServiceIpmiClient7ConnectEPKvm(); +int PS4_SYSV_ABI _ZN3sce2np3ipc17ServiceIpmiClient7DestroyEv(); +int PS4_SYSV_ABI _ZN3sce2np3ipc17ServiceIpmiClientC1Ev(); +int PS4_SYSV_ABI _ZN3sce2np3ipc17ServiceIpmiClientC2Ev(); +int PS4_SYSV_ABI _ZN3sce2np3ipc17ServiceIpmiClientD0Ev(); +int PS4_SYSV_ABI _ZN3sce2np3ipc17ServiceIpmiClientD1Ev(); +int PS4_SYSV_ABI _ZN3sce2np3ipc17ServiceIpmiClientD2Ev(); +int PS4_SYSV_ABI _ZN3sce2np4Cond4ctorEv(); +int PS4_SYSV_ABI _ZN3sce2np4Cond4dtorEv(); +int PS4_SYSV_ABI _ZN3sce2np4Cond4InitEPKcPNS0_5MutexE(); +int PS4_SYSV_ABI _ZN3sce2np4Cond4WaitEj(); +int PS4_SYSV_ABI _ZN3sce2np4Cond6SignalEv(); +int PS4_SYSV_ABI _ZN3sce2np4Cond7DestroyEv(); +int PS4_SYSV_ABI _ZN3sce2np4Cond9SignalAllEv(); +int PS4_SYSV_ABI _ZN3sce2np4CondC1Ev(); +int PS4_SYSV_ABI _ZN3sce2np4CondC2Ev(); +int PS4_SYSV_ABI _ZN3sce2np4CondD0Ev(); +int PS4_SYSV_ABI _ZN3sce2np4CondD1Ev(); +int PS4_SYSV_ABI _ZN3sce2np4CondD2Ev(); +int PS4_SYSV_ABI _ZN3sce2np4Path11BuildAppendEPcmcPKcm(); +int PS4_SYSV_ABI _ZN3sce2np4Path12AddDelimiterEPcmc(); +int PS4_SYSV_ABI _ZN3sce2np4Path5ClearEv(); +int PS4_SYSV_ABI _ZN3sce2np4Path6SetStrEPKcm(); +int PS4_SYSV_ABI _ZN3sce2np4PathD0Ev(); +int PS4_SYSV_ABI _ZN3sce2np4PathD1Ev(); +int PS4_SYSV_ABI _ZN3sce2np4PathD2Ev(); +int PS4_SYSV_ABI _ZN3sce2np4Time10AddMinutesEl(); +int PS4_SYSV_ABI _ZN3sce2np4Time10AddSecondsEl(); +int PS4_SYSV_ABI _ZN3sce2np4Time12GetUserClockEPS1_(); +int PS4_SYSV_ABI _ZN3sce2np4Time15AddMicroSecondsEl(); +int PS4_SYSV_ABI _ZN3sce2np4Time15GetNetworkClockEPS1_(); +int PS4_SYSV_ABI _ZN3sce2np4Time20GetDebugNetworkClockEPS1_(); +int PS4_SYSV_ABI _ZN3sce2np4Time7AddDaysEl(); +int PS4_SYSV_ABI _ZN3sce2np4Time8AddHoursEl(); +int PS4_SYSV_ABI _ZN3sce2np4TimeplERK10SceRtcTick(); +int PS4_SYSV_ABI _ZN3sce2np4TimeplERKS1_(); +int PS4_SYSV_ABI _ZN3sce2np5Mutex4ctorEv(); +int PS4_SYSV_ABI _ZN3sce2np5Mutex4dtorEv(); +int PS4_SYSV_ABI _ZN3sce2np5Mutex4InitEPKcj(); +int PS4_SYSV_ABI _ZN3sce2np5Mutex4LockEv(); +int PS4_SYSV_ABI _ZN3sce2np5Mutex6UnlockEv(); +int PS4_SYSV_ABI _ZN3sce2np5Mutex7DestroyEv(); +int PS4_SYSV_ABI _ZN3sce2np5Mutex7TryLockEv(); +int PS4_SYSV_ABI _ZN3sce2np5MutexC1Ev(); +int PS4_SYSV_ABI _ZN3sce2np5MutexC2Ev(); +int PS4_SYSV_ABI _ZN3sce2np5MutexD0Ev(); +int PS4_SYSV_ABI _ZN3sce2np5MutexD1Ev(); +int PS4_SYSV_ABI _ZN3sce2np5MutexD2Ev(); +int PS4_SYSV_ABI _ZN3sce2np5NpEnv8GetNpEnvEPS1_(); +int PS4_SYSV_ABI _ZN3sce2np6Handle10CancelImplEi(); +int PS4_SYSV_ABI _ZN3sce2np6Handle4InitEv(); +int PS4_SYSV_ABI _ZN3sce2np6Handle7DestroyEv(); +int PS4_SYSV_ABI _ZN3sce2np6HandleC1Ev(); +int PS4_SYSV_ABI _ZN3sce2np6HandleC2Ev(); +int PS4_SYSV_ABI _ZN3sce2np6HandleD0Ev(); +int PS4_SYSV_ABI _ZN3sce2np6HandleD1Ev(); +int PS4_SYSV_ABI _ZN3sce2np6HandleD2Ev(); +int PS4_SYSV_ABI _ZN3sce2np6ObjectdaEPv(); +int PS4_SYSV_ABI _ZN3sce2np6ObjectdaEPvR14SceNpAllocator(); +int PS4_SYSV_ABI _ZN3sce2np6ObjectdaEPvR16SceNpAllocatorEx(); +int PS4_SYSV_ABI _ZN3sce2np6ObjectdlEPv(); +int PS4_SYSV_ABI _ZN3sce2np6ObjectdlEPvR14SceNpAllocator(); +int PS4_SYSV_ABI _ZN3sce2np6ObjectdlEPvR16SceNpAllocatorEx(); +int PS4_SYSV_ABI _ZN3sce2np6ObjectnaEmR14SceNpAllocator(); +int PS4_SYSV_ABI _ZN3sce2np6ObjectnaEmR16SceNpAllocatorEx(); +int PS4_SYSV_ABI _ZN3sce2np6ObjectnwEmR14SceNpAllocator(); +int PS4_SYSV_ABI _ZN3sce2np6ObjectnwEmR16SceNpAllocatorEx(); +int PS4_SYSV_ABI _ZN3sce2np6Thread12DoThreadMainEv(); +int PS4_SYSV_ABI _ZN3sce2np6Thread4ctorEv(); +int PS4_SYSV_ABI _ZN3sce2np6Thread4dtorEv(); +int PS4_SYSV_ABI _ZN3sce2np6Thread4InitEPKcimm(); +int PS4_SYSV_ABI _ZN3sce2np6Thread4InitEPKNS1_5ParamE(); +int PS4_SYSV_ABI _ZN3sce2np6Thread4JoinEPi(); +int PS4_SYSV_ABI _ZN3sce2np6Thread5StartEv(); +int PS4_SYSV_ABI _ZN3sce2np6Thread7DestroyEv(); +int PS4_SYSV_ABI _ZN3sce2np6Thread9EntryFuncEPv(); +int PS4_SYSV_ABI _ZN3sce2np6Thread9GetResultEv(); +int PS4_SYSV_ABI _ZN3sce2np6Thread9IsRunningEv(); +int PS4_SYSV_ABI _ZN3sce2np6ThreadC2Ev(); +int PS4_SYSV_ABI _ZN3sce2np6ThreadD0Ev(); +int PS4_SYSV_ABI _ZN3sce2np6ThreadD1Ev(); +int PS4_SYSV_ABI _ZN3sce2np6ThreadD2Ev(); +int PS4_SYSV_ABI _ZN3sce2np7Callout10IsTimedoutEv(); +int PS4_SYSV_ABI _ZN3sce2np7Callout11CalloutFuncEPv(); +int PS4_SYSV_ABI _ZN3sce2np7Callout4StopEv(); +int PS4_SYSV_ABI _ZN3sce2np7Callout5StartEjPNS1_7HandlerE(); +int PS4_SYSV_ABI _ZN3sce2np7Callout5StartEmPNS1_7HandlerE(); +int PS4_SYSV_ABI _ZN3sce2np7Callout9IsStartedEv(); +int PS4_SYSV_ABI _ZN3sce2np7CalloutC1EPNS0_14CalloutContextE(); +int PS4_SYSV_ABI _ZN3sce2np7CalloutC2EPNS0_14CalloutContextE(); +int PS4_SYSV_ABI _ZN3sce2np7CalloutD0Ev(); +int PS4_SYSV_ABI _ZN3sce2np7CalloutD1Ev(); +int PS4_SYSV_ABI _ZN3sce2np7CalloutD2Ev(); +int PS4_SYSV_ABI _ZN3sce2np7HttpUri5BuildEPKS1_PcmPmj(); +int PS4_SYSV_ABI _ZN3sce2np7HttpUri5ParseEPS1_PKc(); +int PS4_SYSV_ABI _ZN3sce2np7HttpUriC1EP16SceNpAllocatorEx(); +int PS4_SYSV_ABI _ZN3sce2np7HttpUriC2EP16SceNpAllocatorEx(); +int PS4_SYSV_ABI _ZN3sce2np7HttpUriD0Ev(); +int PS4_SYSV_ABI _ZN3sce2np7HttpUriD1Ev(); +int PS4_SYSV_ABI _ZN3sce2np7HttpUriD2Ev(); +int PS4_SYSV_ABI _ZN3sce2np7RingBuf14CheckinForReadEm(); +int PS4_SYSV_ABI _ZN3sce2np7RingBuf15CheckinForWriteEm(); +int PS4_SYSV_ABI _ZN3sce2np7RingBuf15CheckoutForReadEPm(); +int PS4_SYSV_ABI _ZN3sce2np7RingBuf16CheckoutForWriteEPm(); +int PS4_SYSV_ABI _ZN3sce2np7RingBuf4ctorEv(); +int PS4_SYSV_ABI _ZN3sce2np7RingBuf4dtorEv(); +int PS4_SYSV_ABI _ZN3sce2np7RingBuf4InitEPvm(); +int PS4_SYSV_ABI _ZN3sce2np7RingBuf4PeekEmPvm(); +int PS4_SYSV_ABI _ZN3sce2np7RingBuf4ReadEPvm(); +int PS4_SYSV_ABI _ZN3sce2np7RingBuf5ClearEv(); +int PS4_SYSV_ABI _ZN3sce2np7RingBuf5WriteEPKvm(); +int PS4_SYSV_ABI _ZN3sce2np7RingBuf7DestroyEv(); +int PS4_SYSV_ABI _ZN3sce2np7RingBufC1Ev(); +int PS4_SYSV_ABI _ZN3sce2np7RingBufC2Ev(); +int PS4_SYSV_ABI _ZN3sce2np7RingBufD0Ev(); +int PS4_SYSV_ABI _ZN3sce2np7RingBufD1Ev(); +int PS4_SYSV_ABI _ZN3sce2np7RingBufD2Ev(); +int PS4_SYSV_ABI _ZN3sce2np8HttpFile4ReadEPNS0_6HandleEPvmPm(); +int PS4_SYSV_ABI _ZN3sce2np8HttpFile5CloseEv(); +int PS4_SYSV_ABI _ZN3sce2np8HttpFileC2EP16SceNpAllocatorEx(); +int PS4_SYSV_ABI _ZN3sce2np8HttpFileD0Ev(); +int PS4_SYSV_ABI _ZN3sce2np8HttpFileD1Ev(); +int PS4_SYSV_ABI _ZN3sce2np8HttpFileD2Ev(); +int PS4_SYSV_ABI _ZN3sce2np8JsonBool5ClearEv(); +int PS4_SYSV_ABI _ZN3sce2np8JsonBool7SetBoolEb(); +int PS4_SYSV_ABI _ZN3sce2np8JsonFile5CloseEv(); +int PS4_SYSV_ABI _ZN3sce2np8JsonFileD0Ev(); +int PS4_SYSV_ABI _ZN3sce2np8JsonFileD1Ev(); +int PS4_SYSV_ABI _ZN3sce2np8JsonFileD2Ev(); +int PS4_SYSV_ABI _ZN3sce2np8JsonNull5ClearEv(); +int PS4_SYSV_ABI _ZN3sce2np8NpCommId5BuildERKS1_Pcm(); +int PS4_SYSV_ABI _ZN3sce2np8NpCommId5ClearEv(); +int PS4_SYSV_ABI _ZN3sce2np8NpCommId5ParseEPS1_PKc(); +int PS4_SYSV_ABI _ZN3sce2np8NpCommId5ParseEPS1_PKcm(); +int PS4_SYSV_ABI _ZN3sce2np8NpCommIdC1ERK20SceNpCommunicationId(); +int PS4_SYSV_ABI _ZN3sce2np8NpCommIdC1ERKS1_(); +int PS4_SYSV_ABI _ZN3sce2np8NpCommIdC1Ev(); +int PS4_SYSV_ABI _ZN3sce2np8NpCommIdC2ERK20SceNpCommunicationId(); +int PS4_SYSV_ABI _ZN3sce2np8NpCommIdC2ERKS1_(); +int PS4_SYSV_ABI _ZN3sce2np8NpCommIdC2Ev(); +int PS4_SYSV_ABI _ZN3sce2np8NpCommIdD0Ev(); +int PS4_SYSV_ABI _ZN3sce2np8NpCommIdD1Ev(); +int PS4_SYSV_ABI _ZN3sce2np8NpCommIdD2Ev(); +int PS4_SYSV_ABI _ZN3sce2np8Selector4InitEPKc(); +int PS4_SYSV_ABI _ZN3sce2np8SelectorD0Ev(); +int PS4_SYSV_ABI _ZN3sce2np8SelectorD1Ev(); +int PS4_SYSV_ABI _ZN3sce2np8SelectorD2Ev(); +int PS4_SYSV_ABI _ZN3sce2np8WorkItem10SetPendingEv(); +int PS4_SYSV_ABI _ZN3sce2np8WorkItem10SetRunningEv(); +int PS4_SYSV_ABI _ZN3sce2np8WorkItem11SetFinishedEi(); +int PS4_SYSV_ABI _ZN3sce2np8WorkItem14FinishCallbackEv(); +int PS4_SYSV_ABI _ZN3sce2np8WorkItem15RemoveFromQueueEv(); +int PS4_SYSV_ABI _ZN3sce2np8WorkItem6CancelEi(); +int PS4_SYSV_ABI _ZN3sce2np8WorkItem9BindQueueEPNS0_9WorkQueueEi(); +int PS4_SYSV_ABI _ZN3sce2np8WorkItemC2EPKc(); +int PS4_SYSV_ABI _ZN3sce2np8WorkItemD0Ev(); +int PS4_SYSV_ABI _ZN3sce2np8WorkItemD1Ev(); +int PS4_SYSV_ABI _ZN3sce2np8WorkItemD2Ev(); +int PS4_SYSV_ABI _ZN3sce2np9EventFlag3SetEm(); +int PS4_SYSV_ABI _ZN3sce2np9EventFlag4ctorEv(); +int PS4_SYSV_ABI _ZN3sce2np9EventFlag4dtorEv(); +int PS4_SYSV_ABI _ZN3sce2np9EventFlag4OpenEPKc(); +int PS4_SYSV_ABI _ZN3sce2np9EventFlag4PollEmjPm(); +int PS4_SYSV_ABI _ZN3sce2np9EventFlag4WaitEmjPmj(); +int PS4_SYSV_ABI _ZN3sce2np9EventFlag5ClearEm(); +int PS4_SYSV_ABI _ZN3sce2np9EventFlag6CancelEm(); +int PS4_SYSV_ABI _ZN3sce2np9EventFlag6CreateEPKcj(); +int PS4_SYSV_ABI _ZN3sce2np9EventFlag7DestroyEv(); +int PS4_SYSV_ABI _ZN3sce2np9EventFlagC1Ev(); +int PS4_SYSV_ABI _ZN3sce2np9EventFlagC2Ev(); +int PS4_SYSV_ABI _ZN3sce2np9EventFlagD0Ev(); +int PS4_SYSV_ABI _ZN3sce2np9EventFlagD1Ev(); +int PS4_SYSV_ABI _ZN3sce2np9EventFlagD2Ev(); +int PS4_SYSV_ABI _ZN3sce2np9HttpTrans10SetTimeoutEPKNS1_12TimeoutParamE(); +int PS4_SYSV_ABI _ZN3sce2np9HttpTrans11SendRequestEPNS0_6HandleEPKvm(); +int PS4_SYSV_ABI _ZN3sce2np9HttpTrans12RecvResponseEPNS0_6HandleEPvmPm(); +int PS4_SYSV_ABI _ZN3sce2np9HttpTrans12SkipResponseEPNS0_6HandleE(); +int PS4_SYSV_ABI _ZN3sce2np9HttpTrans16AddRequestHeaderEPKcS3_(); +int PS4_SYSV_ABI _ZN3sce2np9HttpTrans16SetRequestHeaderEPKcS3_(); +int PS4_SYSV_ABI _ZN3sce2np9HttpTrans21GetResponseStatusCodeEPNS0_6HandleEPi(); +int PS4_SYSV_ABI _ZN3sce2np9HttpTrans21SetRequestContentTypeEPKc(); +int PS4_SYSV_ABI _ZN3sce2np9HttpTrans23SetRequestContentLengthEm(); +int PS4_SYSV_ABI _ZN3sce2np9HttpTrans24GetResponseContentLengthEPNS0_6HandleEPbPm(); +int PS4_SYSV_ABI _ZN3sce2np9HttpTrans4InitERKNS0_12HttpTemplateEPNS0_18HttpConnectionPoolEiPKcm(); +int PS4_SYSV_ABI +_ZN3sce2np9HttpTrans4InitERKNS0_12HttpTemplateEPNS0_18HttpConnectionPoolEiPKcS8_tS8_m(); +int PS4_SYSV_ABI _ZN3sce2np9HttpTrans4ReadEPNS0_6HandleEPvmPm(); +int PS4_SYSV_ABI _ZN3sce2np9HttpTrans5WriteEPNS0_6HandleEPKvmPm(); +int PS4_SYSV_ABI _ZN3sce2np9HttpTrans7DestroyEv(); +int PS4_SYSV_ABI _ZN3sce2np9HttpTransC1EP16SceNpAllocatorEx(); +int PS4_SYSV_ABI _ZN3sce2np9HttpTransC2EP16SceNpAllocatorEx(); +int PS4_SYSV_ABI _ZN3sce2np9HttpTransD0Ev(); +int PS4_SYSV_ABI _ZN3sce2np9HttpTransD1Ev(); +int PS4_SYSV_ABI _ZN3sce2np9HttpTransD2Ev(); +int PS4_SYSV_ABI _ZN3sce2np9JsonArray12AddItemArrayEPPS1_(); +int PS4_SYSV_ABI _ZN3sce2np9JsonArray5ClearEv(); +int PS4_SYSV_ABI _ZN3sce2np9JsonValue12GetItemValueEi(); +int PS4_SYSV_ABI _ZN3sce2np9JsonValue13GetFieldValueEiPPKc(); +int PS4_SYSV_ABI _ZN3sce2np9JsonValue13GetFieldValueEPKc(); +int PS4_SYSV_ABI _ZN3sce2np9JsonValueD0Ev(); +int PS4_SYSV_ABI _ZN3sce2np9JsonValueD1Ev(); +int PS4_SYSV_ABI _ZN3sce2np9JsonValueD2Ev(); +int PS4_SYSV_ABI _ZN3sce2np9LocalFile4ReadEPNS0_6HandleEPvmPm(); +int PS4_SYSV_ABI _ZN3sce2np9LocalFile4SeekEliPl(); +int PS4_SYSV_ABI _ZN3sce2np9LocalFile4SyncEv(); +int PS4_SYSV_ABI _ZN3sce2np9LocalFile5CloseEv(); +int PS4_SYSV_ABI _ZN3sce2np9LocalFile5WriteEPNS0_6HandleEPKvmPm(); +int PS4_SYSV_ABI _ZN3sce2np9LocalFile6RemoveEPKc(); +int PS4_SYSV_ABI _ZN3sce2np9LocalFile8TruncateEl(); +int PS4_SYSV_ABI _ZN3sce2np9LocalFileC1Ev(); +int PS4_SYSV_ABI _ZN3sce2np9LocalFileC2Ev(); +int PS4_SYSV_ABI _ZN3sce2np9LocalFileD0Ev(); +int PS4_SYSV_ABI _ZN3sce2np9LocalFileD1Ev(); +int PS4_SYSV_ABI _ZN3sce2np9LocalFileD2Ev(); +int PS4_SYSV_ABI _ZN3sce2np9NpTitleId5BuildERKS1_Pcm(); +int PS4_SYSV_ABI _ZN3sce2np9NpTitleId5ClearEv(); +int PS4_SYSV_ABI _ZN3sce2np9NpTitleId5ParseEPS1_PKc(); +int PS4_SYSV_ABI _ZN3sce2np9NpTitleId5ParseEPS1_PKcm(); +int PS4_SYSV_ABI _ZN3sce2np9NpTitleIdC1ERK12SceNpTitleId(); +int PS4_SYSV_ABI _ZN3sce2np9NpTitleIdC1ERKS1_(); +int PS4_SYSV_ABI _ZN3sce2np9NpTitleIdC1Ev(); +int PS4_SYSV_ABI _ZN3sce2np9NpTitleIdC2ERK12SceNpTitleId(); +int PS4_SYSV_ABI _ZN3sce2np9NpTitleIdC2ERKS1_(); +int PS4_SYSV_ABI _ZN3sce2np9NpTitleIdC2Ev(); +int PS4_SYSV_ABI _ZN3sce2np9NpTitleIdD0Ev(); +int PS4_SYSV_ABI _ZN3sce2np9NpTitleIdD1Ev(); +int PS4_SYSV_ABI _ZN3sce2np9NpTitleIdD2Ev(); +int PS4_SYSV_ABI _ZN3sce2np9RefObject6AddRefEv(); +int PS4_SYSV_ABI _ZN3sce2np9RefObject7ReleaseEv(); +int PS4_SYSV_ABI _ZN3sce2np9RefObjectC1Ev(); +int PS4_SYSV_ABI _ZN3sce2np9RefObjectC2Ev(); +int PS4_SYSV_ABI _ZN3sce2np9RefObjectD0Ev(); +int PS4_SYSV_ABI _ZN3sce2np9RefObjectD1Ev(); +int PS4_SYSV_ABI _ZN3sce2np9RefObjectD2Ev(); +int PS4_SYSV_ABI _ZN3sce2np9Semaphore4OpenEPKc(); +int PS4_SYSV_ABI _ZN3sce2np9Semaphore4WaitEj(); +int PS4_SYSV_ABI _ZN3sce2np9Semaphore6CreateEiiPKc(); +int PS4_SYSV_ABI _ZN3sce2np9Semaphore6SignalEv(); +int PS4_SYSV_ABI _ZN3sce2np9Semaphore7DestroyEv(); +int PS4_SYSV_ABI _ZN3sce2np9SemaphoreC1Ev(); +int PS4_SYSV_ABI _ZN3sce2np9SemaphoreC2Ev(); +int PS4_SYSV_ABI _ZN3sce2np9SemaphoreD0Ev(); +int PS4_SYSV_ABI _ZN3sce2np9SemaphoreD1Ev(); +int PS4_SYSV_ABI _ZN3sce2np9SemaphoreD2Ev(); +int PS4_SYSV_ABI _ZN3sce2np9WorkQueue11GetItemByIdEi(); +int PS4_SYSV_ABI _ZN3sce2np9WorkQueue15GetFinishedItemENS0_14WorkItemStatusE(); +int PS4_SYSV_ABI _ZN3sce2np9WorkQueue16WorkItemFinishedEPNS0_8WorkItemEi(); +int PS4_SYSV_ABI _ZN3sce2np9WorkQueue17ProcFinishedItemsENS0_14WorkItemStatusE(); +int PS4_SYSV_ABI _ZN3sce2np9WorkQueue18RemoveFinishedItemEPNS0_8WorkItemE(); +int PS4_SYSV_ABI _ZN3sce2np9WorkQueue18WaitForPendingItemEPPNS0_8WorkItemEPb(); +int PS4_SYSV_ABI _ZN3sce2np9WorkQueue4ctorEv(); +int PS4_SYSV_ABI _ZN3sce2np9WorkQueue4dtorEv(); +int PS4_SYSV_ABI _ZN3sce2np9WorkQueue4InitEPKcimm(); +int PS4_SYSV_ABI _ZN3sce2np9WorkQueue4InitEPKNS0_6Thread5ParamE(); +int PS4_SYSV_ABI _ZN3sce2np9WorkQueue4StopEv(); +int PS4_SYSV_ABI _ZN3sce2np9WorkQueue5StartEv(); +int PS4_SYSV_ABI _ZN3sce2np9WorkQueue6CancelEii(); +int PS4_SYSV_ABI _ZN3sce2np9WorkQueue6IsInitEv(); +int PS4_SYSV_ABI _ZN3sce2np9WorkQueue7DestroyEv(); +int PS4_SYSV_ABI _ZN3sce2np9WorkQueue7EnqueueEiPNS0_8WorkItemE(); +int PS4_SYSV_ABI _ZN3sce2np9WorkQueue9CancelAllEi(); +int PS4_SYSV_ABI _ZN3sce2np9WorkQueue9IsRunningEv(); +int PS4_SYSV_ABI _ZN3sce2np9WorkQueueC1Ev(); +int PS4_SYSV_ABI _ZN3sce2np9WorkQueueC2Ev(); +int PS4_SYSV_ABI _ZN3sce2np9WorkQueueD0Ev(); +int PS4_SYSV_ABI _ZN3sce2np9WorkQueueD1Ev(); +int PS4_SYSV_ABI _ZN3sce2np9WorkQueueD2Ev(); +int PS4_SYSV_ABI _ZN3sce2npeqERK10SceRtcTickRKNS0_4TimeE(); +int PS4_SYSV_ABI _ZN3sce2npeqERK12SceNpTitleIdRKNS0_9NpTitleIdE(); +int PS4_SYSV_ABI _ZN3sce2npeqERK16SceNpTitleSecretRKNS0_13NpTitleSecretE(); +int PS4_SYSV_ABI _ZN3sce2npeqERK20SceNpCommunicationIdRKNS0_8NpCommIdE(); +int PS4_SYSV_ABI _ZN3sce2npeqERKNS0_13NpTitleSecretERK16SceNpTitleSecret(); +int PS4_SYSV_ABI _ZN3sce2npeqERKNS0_13NpTitleSecretES3_(); +int PS4_SYSV_ABI _ZN3sce2npeqERKNS0_4TimeERK10SceRtcTick(); +int PS4_SYSV_ABI _ZN3sce2npeqERKNS0_4TimeES3_(); +int PS4_SYSV_ABI _ZN3sce2npeqERKNS0_8NpCommIdERK20SceNpCommunicationId(); +int PS4_SYSV_ABI _ZN3sce2npeqERKNS0_8NpCommIdES3_(); +int PS4_SYSV_ABI _ZN3sce2npeqERKNS0_9NpTitleIdERK12SceNpTitleId(); +int PS4_SYSV_ABI _ZN3sce2npeqERKNS0_9NpTitleIdES3_(); +int PS4_SYSV_ABI _ZN3sce2npgeERK10SceRtcTickRKNS0_4TimeE(); +int PS4_SYSV_ABI _ZN3sce2npgeERKNS0_4TimeERK10SceRtcTick(); +int PS4_SYSV_ABI _ZN3sce2npgeERKNS0_4TimeES3_(); +int PS4_SYSV_ABI _ZN3sce2npgtERK10SceRtcTickRKNS0_4TimeE(); +int PS4_SYSV_ABI _ZN3sce2npgtERKNS0_4TimeERK10SceRtcTick(); +int PS4_SYSV_ABI _ZN3sce2npgtERKNS0_4TimeES3_(); +int PS4_SYSV_ABI _ZN3sce2npleERK10SceRtcTickRKNS0_4TimeE(); +int PS4_SYSV_ABI _ZN3sce2npleERKNS0_4TimeERK10SceRtcTick(); +int PS4_SYSV_ABI _ZN3sce2npleERKNS0_4TimeES3_(); +int PS4_SYSV_ABI _ZN3sce2npltERK10SceRtcTickRKNS0_4TimeE(); +int PS4_SYSV_ABI _ZN3sce2npltERKNS0_4TimeERK10SceRtcTick(); +int PS4_SYSV_ABI _ZN3sce2npltERKNS0_4TimeES3_(); +int PS4_SYSV_ABI _ZN3sce2npneERK10SceRtcTickRKNS0_4TimeE(); +int PS4_SYSV_ABI _ZN3sce2npneERK12SceNpTitleIdRKNS0_9NpTitleIdE(); +int PS4_SYSV_ABI _ZN3sce2npneERK16SceNpTitleSecretRKNS0_13NpTitleSecretE(); +int PS4_SYSV_ABI _ZN3sce2npneERK20SceNpCommunicationIdRKNS0_8NpCommIdE(); +int PS4_SYSV_ABI _ZN3sce2npneERKNS0_13NpTitleSecretERK16SceNpTitleSecret(); +int PS4_SYSV_ABI _ZN3sce2npneERKNS0_13NpTitleSecretES3_(); +int PS4_SYSV_ABI _ZN3sce2npneERKNS0_4TimeERK10SceRtcTick(); +int PS4_SYSV_ABI _ZN3sce2npneERKNS0_4TimeES3_(); +int PS4_SYSV_ABI _ZN3sce2npneERKNS0_8NpCommIdERK20SceNpCommunicationId(); +int PS4_SYSV_ABI _ZN3sce2npneERKNS0_8NpCommIdES3_(); +int PS4_SYSV_ABI _ZN3sce2npneERKNS0_9NpTitleIdERK12SceNpTitleId(); +int PS4_SYSV_ABI _ZN3sce2npneERKNS0_9NpTitleIdES3_(); +int PS4_SYSV_ABI _ZNK3sce2np10Cancelable6IsInitEv(); +int PS4_SYSV_ABI _ZNK3sce2np10EventQueue6IsInitEv(); +int PS4_SYSV_ABI _ZNK3sce2np10EventQueue7IsEmptyEv(); +int PS4_SYSV_ABI _ZNK3sce2np10JsonNumber5CloneEP16SceNpAllocatorEx(); +int PS4_SYSV_ABI _ZNK3sce2np10JsonNumber6GetNumEPcm(); +int PS4_SYSV_ABI _ZNK3sce2np10JsonNumber6GetNumEPi(); +int PS4_SYSV_ABI _ZNK3sce2np10JsonNumber6GetNumEPj(); +int PS4_SYSV_ABI _ZNK3sce2np10JsonNumber6GetNumEPl(); +int PS4_SYSV_ABI _ZNK3sce2np10JsonNumber6GetNumEPm(); +int PS4_SYSV_ABI _ZNK3sce2np10JsonNumber9GetNumStrEv(); +int PS4_SYSV_ABI _ZNK3sce2np10JsonObject5CloneEP16SceNpAllocatorEx(); +int PS4_SYSV_ABI _ZNK3sce2np10JsonString5CloneEP16SceNpAllocatorEx(); +int PS4_SYSV_ABI _ZNK3sce2np10JsonString6GetStrEPcm(); +int PS4_SYSV_ABI _ZNK3sce2np10JsonString6GetStrEv(); +int PS4_SYSV_ABI _ZNK3sce2np10JsonString9GetLengthEv(); +int PS4_SYSV_ABI _ZNK3sce2np12HttpTemplate6IsInitEv(); +int PS4_SYSV_ABI _ZNK3sce2np18HttpConnectionPool6IsInitEv(); +int PS4_SYSV_ABI _ZNK3sce2np3ipc10IpmiClient6IsInitEv(); +int PS4_SYSV_ABI _ZNK3sce2np3ipc17ServiceIpmiClient6IsInitEv(); +int PS4_SYSV_ABI _ZNK3sce2np4Cond6IsInitEv(); +int PS4_SYSV_ABI _ZNK3sce2np4Time18ConvertToPosixTimeEPl(); +int PS4_SYSV_ABI _ZNK3sce2np5Mutex6IsInitEv(); +int PS4_SYSV_ABI _ZNK3sce2np6Handle6IsInitEv(); +int PS4_SYSV_ABI _ZNK3sce2np6Thread6IsInitEv(); +int PS4_SYSV_ABI _ZNK3sce2np7RingBuf11GetDataSizeEv(); +int PS4_SYSV_ABI _ZNK3sce2np7RingBuf11GetFreeSizeEv(); +int PS4_SYSV_ABI _ZNK3sce2np7RingBuf6IsFullEv(); +int PS4_SYSV_ABI _ZNK3sce2np7RingBuf7IsEmptyEv(); +int PS4_SYSV_ABI _ZNK3sce2np8JsonBool5CloneEP16SceNpAllocatorEx(); +int PS4_SYSV_ABI _ZNK3sce2np8JsonBool7GetBoolEv(); +int PS4_SYSV_ABI _ZNK3sce2np8JsonNull5CloneEP16SceNpAllocatorEx(); +int PS4_SYSV_ABI _ZNK3sce2np8NpCommId7IsEmptyEv(); +int PS4_SYSV_ABI _ZNK3sce2np9EventFlag6IsInitEv(); +int PS4_SYSV_ABI _ZNK3sce2np9HttpTrans6IsInitEv(); +int PS4_SYSV_ABI _ZNK3sce2np9JsonArray5CloneEP16SceNpAllocatorEx(); +int PS4_SYSV_ABI _ZNK3sce2np9JsonValue12GetItemValueEi(); +int PS4_SYSV_ABI _ZNK3sce2np9NpTitleId7IsEmptyEv(); +int PS4_SYSV_ABI _ZNK3sce2np9Semaphore6IsInitEv(); +int PS4_SYSV_ABI _ZThn16_N3sce2np10MemoryFile5WriteEPNS0_6HandleEPKvmPm(); +int PS4_SYSV_ABI _ZThn16_N3sce2np10MemoryFileD0Ev(); +int PS4_SYSV_ABI _ZThn16_N3sce2np10MemoryFileD1Ev(); +int PS4_SYSV_ABI _ZThn16_N3sce2np9HttpTrans5WriteEPNS0_6HandleEPKvmPm(); +int PS4_SYSV_ABI _ZThn16_N3sce2np9HttpTransD0Ev(); +int PS4_SYSV_ABI _ZThn16_N3sce2np9HttpTransD1Ev(); +int PS4_SYSV_ABI _ZThn16_N3sce2np9LocalFile5WriteEPNS0_6HandleEPKvmPm(); +int PS4_SYSV_ABI _ZThn16_N3sce2np9LocalFileD0Ev(); +int PS4_SYSV_ABI _ZThn16_N3sce2np9LocalFileD1Ev(); +int PS4_SYSV_ABI _ZThn8_N3sce2np10MemoryFile4ReadEPNS0_6HandleEPvmPm(); +int PS4_SYSV_ABI _ZThn8_N3sce2np10MemoryFileD0Ev(); +int PS4_SYSV_ABI _ZThn8_N3sce2np10MemoryFileD1Ev(); +int PS4_SYSV_ABI _ZThn8_N3sce2np6Handle10CancelImplEi(); +int PS4_SYSV_ABI _ZThn8_N3sce2np6HandleD0Ev(); +int PS4_SYSV_ABI _ZThn8_N3sce2np6HandleD1Ev(); +int PS4_SYSV_ABI _ZThn8_N3sce2np9HttpTrans4ReadEPNS0_6HandleEPvmPm(); +int PS4_SYSV_ABI _ZThn8_N3sce2np9HttpTransD0Ev(); +int PS4_SYSV_ABI _ZThn8_N3sce2np9HttpTransD1Ev(); +int PS4_SYSV_ABI _ZThn8_N3sce2np9LocalFile4ReadEPNS0_6HandleEPvmPm(); +int PS4_SYSV_ABI _ZThn8_N3sce2np9LocalFileD0Ev(); +int PS4_SYSV_ABI _ZThn8_N3sce2np9LocalFileD1Ev(); +int PS4_SYSV_ABI _ZTVN3sce2np10JsonNumberE(); +int PS4_SYSV_ABI _ZTVN3sce2np10JsonObjectE(); +int PS4_SYSV_ABI _ZTVN3sce2np10JsonStringE(); +int PS4_SYSV_ABI _ZTVN3sce2np8JsonBoolE(); +int PS4_SYSV_ABI _ZTVN3sce2np8JsonNullE(); +int PS4_SYSV_ABI _ZTVN3sce2np8SelectorE(); +int PS4_SYSV_ABI _ZTVN3sce2np9JsonArrayE(); +int PS4_SYSV_ABI _ZTVN3sce2np9JsonValueE(); +int PS4_SYSV_ABI sceNpAllocateKernelMemoryNoAlignment(); +int PS4_SYSV_ABI sceNpAllocateKernelMemoryWithAlignment(); +int PS4_SYSV_ABI sceNpArchInit(); +int PS4_SYSV_ABI sceNpArchTerm(); +int PS4_SYSV_ABI sceNpAtomicCas32(); +int PS4_SYSV_ABI sceNpAtomicDec32(); +int PS4_SYSV_ABI sceNpAtomicInc32(); +int PS4_SYSV_ABI sceNpBase64Decoder(); +int PS4_SYSV_ABI sceNpBase64Encoder(); +int PS4_SYSV_ABI sceNpBase64GetDecodeSize(); +int PS4_SYSV_ABI sceNpBase64UrlDecoder(); +int PS4_SYSV_ABI sceNpBase64UrlEncoder(); +int PS4_SYSV_ABI sceNpBase64UrlGetDecodeSize(); +int PS4_SYSV_ABI sceNpCalloutInitCtx(); +int PS4_SYSV_ABI sceNpCalloutStartOnCtx(); +int PS4_SYSV_ABI sceNpCalloutStartOnCtx64(); +int PS4_SYSV_ABI sceNpCalloutStopOnCtx(); +int PS4_SYSV_ABI sceNpCalloutTermCtx(); +int PS4_SYSV_ABI sceNpCancelEventFlag(); +int PS4_SYSV_ABI sceNpClearEventFlag(); +int PS4_SYSV_ABI sceNpCloseEventFlag(); +int PS4_SYSV_ABI sceNpCloseSema(); +int PS4_SYSV_ABI sceNpCondDestroy(); +int PS4_SYSV_ABI sceNpCondInit(); +int PS4_SYSV_ABI sceNpCondSignal(); +int PS4_SYSV_ABI sceNpCondSignalAll(); +int PS4_SYSV_ABI sceNpCondSignalTo(); +int PS4_SYSV_ABI sceNpCondTimedwait(); +int PS4_SYSV_ABI sceNpCondWait(); +int PS4_SYSV_ABI sceNpCreateEventFlag(); +int PS4_SYSV_ABI sceNpCreateSema(); +int PS4_SYSV_ABI sceNpCreateThread(); +int PS4_SYSV_ABI sceNpDbgAssignDebugId(); +int PS4_SYSV_ABI sceNpDbgDumpBinary(); +int PS4_SYSV_ABI sceNpDbgDumpText(); +int PS4_SYSV_ABI sceNpDeleteEventFlag(); +int PS4_SYSV_ABI sceNpDeleteSema(); +int PS4_SYSV_ABI sceNpEventGetCurrentNetworkTick(); +int PS4_SYSV_ABI sceNpFreeKernelMemory(); +int PS4_SYSV_ABI sceNpGetNavSdkVersion(); +int PS4_SYSV_ABI sceNpGetPlatformType(); +int PS4_SYSV_ABI sceNpGetProcessId(); +int PS4_SYSV_ABI sceNpGetRandom(); +int PS4_SYSV_ABI sceNpGetSdkVersion(); +int PS4_SYSV_ABI sceNpGetSdkVersionUInt(); +int PS4_SYSV_ABI sceNpGetSystemClockUsec(); +int PS4_SYSV_ABI sceNpGlobalHeapGetAllocator(); +int PS4_SYSV_ABI sceNpGlobalHeapGetAllocatorEx(); +int PS4_SYSV_ABI sceNpGlobalHeapGetAllocatorExPtr(); +int PS4_SYSV_ABI sceNpGlobalHeapGetAllocatorPtr(); +int PS4_SYSV_ABI sceNpHeapDestroy(); +int PS4_SYSV_ABI sceNpHeapGetAllocator(); +int PS4_SYSV_ABI sceNpHeapGetStat(); +int PS4_SYSV_ABI sceNpHeapInit(); +int PS4_SYSV_ABI sceNpHeapShowStat(); +int PS4_SYSV_ABI sceNpHexToInt(); +int PS4_SYSV_ABI sceNpInt32ToStr(); +int PS4_SYSV_ABI sceNpInt64ToStr(); +int PS4_SYSV_ABI sceNpIntGetPlatformType(); +int PS4_SYSV_ABI sceNpIntIsOnlineIdString(); +int PS4_SYSV_ABI sceNpIntIsValidOnlineId(); +int PS4_SYSV_ABI sceNpIntSetPlatformType(); +int PS4_SYSV_ABI sceNpIntToHex(); +int PS4_SYSV_ABI sceNpIpc2ClientInit(); +int PS4_SYSV_ABI sceNpIpc2ClientTerm(); +int PS4_SYSV_ABI sceNpJoinThread(); +int PS4_SYSV_ABI sceNpJsonParse(); +int PS4_SYSV_ABI sceNpJsonParseBuf(); +int PS4_SYSV_ABI sceNpJsonParseBufInit(); +int PS4_SYSV_ABI sceNpJsonParseEx(); +int PS4_SYSV_ABI sceNpJsonParseExInit(); +int PS4_SYSV_ABI sceNpJsonParseInit(); +int PS4_SYSV_ABI sceNpLwCondDestroy(); +int PS4_SYSV_ABI sceNpLwCondInit(); +int PS4_SYSV_ABI sceNpLwCondSignal(); +int PS4_SYSV_ABI sceNpLwCondSignalAll(); +int PS4_SYSV_ABI sceNpLwCondSignalTo(); +int PS4_SYSV_ABI sceNpLwCondWait(); +int PS4_SYSV_ABI sceNpLwMutexDestroy(); +int PS4_SYSV_ABI sceNpLwMutexInit(); +int PS4_SYSV_ABI sceNpLwMutexLock(); +int PS4_SYSV_ABI sceNpLwMutexTryLock(); +int PS4_SYSV_ABI sceNpLwMutexUnlock(); +int PS4_SYSV_ABI sceNpMemoryHeapDestroy(); +int PS4_SYSV_ABI sceNpMemoryHeapGetAllocator(); +int PS4_SYSV_ABI sceNpMemoryHeapGetAllocatorEx(); +int PS4_SYSV_ABI sceNpMemoryHeapInit(); +int PS4_SYSV_ABI sceNpMutexDestroy(); +int PS4_SYSV_ABI sceNpMutexInit(); +int PS4_SYSV_ABI sceNpMutexLock(); +int PS4_SYSV_ABI sceNpMutexTryLock(); +int PS4_SYSV_ABI sceNpMutexUnlock(); +int PS4_SYSV_ABI sceNpOpenEventFlag(); +int PS4_SYSV_ABI sceNpOpenSema(); +int PS4_SYSV_ABI sceNpPanic(); +int PS4_SYSV_ABI sceNpPollEventFlag(); +int PS4_SYSV_ABI sceNpPollSema(); +int PS4_SYSV_ABI sceNpRtcConvertToPosixTime(); +int PS4_SYSV_ABI sceNpRtcFormatRFC3339(); +int PS4_SYSV_ABI sceNpRtcParseRFC3339(); +int PS4_SYSV_ABI sceNpServerErrorJsonGetErrorCode(); +int PS4_SYSV_ABI sceNpServerErrorJsonMultiGetErrorCode(); +int PS4_SYSV_ABI sceNpServerErrorJsonParse(); +int PS4_SYSV_ABI sceNpServerErrorJsonParseInit(); +int PS4_SYSV_ABI sceNpServerErrorJsonParseMultiInit(); +int PS4_SYSV_ABI sceNpSetEventFlag(); +int PS4_SYSV_ABI sceNpSetPlatformType(); +int PS4_SYSV_ABI sceNpSignalSema(); +int PS4_SYSV_ABI sceNpStrBuildHex(); +int PS4_SYSV_ABI sceNpStrcpyToBuf(); +int PS4_SYSV_ABI sceNpStrncpyToBuf(); +int PS4_SYSV_ABI sceNpStrnParseHex(); +int PS4_SYSV_ABI sceNpStrParseHex(); +int PS4_SYSV_ABI sceNpStrToInt32(); +int PS4_SYSV_ABI sceNpStrToInt64(); +int PS4_SYSV_ABI sceNpStrToUInt32(); +int PS4_SYSV_ABI sceNpStrToUInt64(); +int PS4_SYSV_ABI sceNpThreadGetId(); +int PS4_SYSV_ABI sceNpUInt32ToStr(); +int PS4_SYSV_ABI sceNpUInt64ToStr(); +int PS4_SYSV_ABI sceNpUserGetUserIdList(); +int PS4_SYSV_ABI sceNpUtilBuildTitleId(); +int PS4_SYSV_ABI sceNpUtilCanonicalizeNpIdForPs4(); +int PS4_SYSV_ABI sceNpUtilCanonicalizeNpIdForPsp2(); +int PS4_SYSV_ABI sceNpUtilCmpAccountId(); +int PS4_SYSV_ABI sceNpUtilGetDateSetAuto(); +int PS4_SYSV_ABI sceNpUtilGetDbgCommerce(); +int PS4_SYSV_ABI sceNpUtilGetEnv(); +int PS4_SYSV_ABI sceNpUtilGetFakeDisplayNameMode(); +int PS4_SYSV_ABI sceNpUtilGetFakeRateLimit(); +int PS4_SYSV_ABI sceNpUtilGetIgnoreNpTitleId(); +int PS4_SYSV_ABI sceNpUtilGetNpDebug(); +int PS4_SYSV_ABI sceNpUtilGetNpLanguageCode(); +int PS4_SYSV_ABI sceNpUtilGetNpLanguageCode2(); +int PS4_SYSV_ABI sceNpUtilGetNpLanguageCode2Str(); +int PS4_SYSV_ABI sceNpUtilGetNpLanguageCodeStr(); +int PS4_SYSV_ABI sceNpUtilGetNpTestPatch(); +int PS4_SYSV_ABI sceNpUtilGetNthChar(); +int PS4_SYSV_ABI sceNpUtilGetShareTitleCheck(); +int PS4_SYSV_ABI sceNpUtilGetSystemLanguage(); +int PS4_SYSV_ABI sceNpUtilGetTrcNotify(); +int PS4_SYSV_ABI sceNpUtilGetWebApi2FakeRateLimit(); +int PS4_SYSV_ABI sceNpUtilGetWebApi2FakeRateLimitTarget(); +int PS4_SYSV_ABI sceNpUtilGetWebTraceSetting(); +int PS4_SYSV_ABI sceNpUtilHttpUrlEncode(); +int PS4_SYSV_ABI sceNpUtilJidToNpId(); +int PS4_SYSV_ABI sceNpUtilJsonEscape(); +int PS4_SYSV_ABI sceNpUtilJsonGetOneChar(); +int PS4_SYSV_ABI sceNpUtilJsonUnescape(); +int PS4_SYSV_ABI sceNpUtilNpIdToJid(); +int PS4_SYSV_ABI sceNpUtilNumChars(); +int PS4_SYSV_ABI sceNpUtilParseJid(); +int PS4_SYSV_ABI sceNpUtilParseTitleId(); +int PS4_SYSV_ABI sceNpUtilSerializeJid(); +int PS4_SYSV_ABI sceNpUtilXmlEscape(); +int PS4_SYSV_ABI sceNpUtilXmlGetOneChar(); +int PS4_SYSV_ABI sceNpUtilXmlUnescape(); +int PS4_SYSV_ABI sceNpWaitEventFlag(); +int PS4_SYSV_ABI sceNpWaitSema(); +int PS4_SYSV_ABI sceNpXmlParse(); +int PS4_SYSV_ABI sceNpXmlParseInit(); +int PS4_SYSV_ABI Func_00FD578C2DD966DF(); +int PS4_SYSV_ABI Func_0131A2EA80689F4C(); +int PS4_SYSV_ABI Func_01443C54863BDD20(); +int PS4_SYSV_ABI Func_01BC55BDC5C0ADAD(); +int PS4_SYSV_ABI Func_01D1ECF5750F40E8(); +int PS4_SYSV_ABI Func_020A479A74F5FBAC(); +int PS4_SYSV_ABI Func_024AF5E1D9472AB5(); +int PS4_SYSV_ABI Func_027C5D488713A6B3(); +int PS4_SYSV_ABI Func_02FE9D94C6858355(); +int PS4_SYSV_ABI Func_041F34F1C70D15C1(); +int PS4_SYSV_ABI Func_0530B1D276114248(); +int PS4_SYSV_ABI Func_065DAA14E9C73AD9(); +int PS4_SYSV_ABI Func_06AFF4E5D042BC3E(); +int PS4_SYSV_ABI Func_06EE369299F73997(); +int PS4_SYSV_ABI Func_07C92D9F8D76B617(); +int PS4_SYSV_ABI Func_07E9117498F1E4BF(); +int PS4_SYSV_ABI Func_08F3E0AF3664F275(); +int PS4_SYSV_ABI Func_0A9937C01EF21375(); +int PS4_SYSV_ABI Func_0ACBE6ACCBA3876D(); +int PS4_SYSV_ABI Func_0AE07D3354510CE6(); +int PS4_SYSV_ABI Func_0AEC3C342AE67B7C(); +int PS4_SYSV_ABI Func_0B318420C11E7C23(); +int PS4_SYSV_ABI Func_0BB6C37B03F35D89(); +int PS4_SYSV_ABI Func_0BBE8A9ACDD90FDF(); +int PS4_SYSV_ABI Func_0C7B62905E224E9C(); +int PS4_SYSV_ABI Func_0D35913117241AF9(); +int PS4_SYSV_ABI Func_0D5EE95CEED879A7(); +int PS4_SYSV_ABI Func_0D6FB24B27AB1DA2(); +int PS4_SYSV_ABI Func_0DE8032D534AC41C(); +int PS4_SYSV_ABI Func_0DF4CCA9DCA9E742(); +int PS4_SYSV_ABI Func_0E7449B1D3D98C01(); +int PS4_SYSV_ABI Func_0E77094B7750CB37(); +int PS4_SYSV_ABI Func_0ECAB397B6D50603(); +int PS4_SYSV_ABI Func_0F1DE1D1EADA2948(); +int PS4_SYSV_ABI Func_0F8AFEFA1D26BF1A(); +int PS4_SYSV_ABI Func_11881710562A6BAD(); +int PS4_SYSV_ABI Func_11AFD88BBD0C70DB(); +int PS4_SYSV_ABI Func_11E704A30A4B8877(); +int PS4_SYSV_ABI Func_125014842452F94B(); +int PS4_SYSV_ABI Func_126F0071E11CAC46(); +int PS4_SYSV_ABI Func_12926DCF35994B01(); +int PS4_SYSV_ABI Func_12CC7ABFBF31618F(); +int PS4_SYSV_ABI Func_13C4E51F44592AA2(); +int PS4_SYSV_ABI Func_15330E7C56338254(); +int PS4_SYSV_ABI Func_1566B358CABF2612(); +int PS4_SYSV_ABI Func_1625818F268F45EF(); +int PS4_SYSV_ABI Func_16D32B40D28A9AC2(); +int PS4_SYSV_ABI Func_183F4483BDBD25CD(); +int PS4_SYSV_ABI Func_1887E9E95AF62F3D(); +int PS4_SYSV_ABI Func_18A3CE95FD893D3A(); +int PS4_SYSV_ABI Func_18B3665E4854E7E9(); +int PS4_SYSV_ABI Func_1923B003948AF47E(); +int PS4_SYSV_ABI Func_19B533DA4C59A532(); +int PS4_SYSV_ABI Func_1BB399772DB68E08(); +int PS4_SYSV_ABI Func_1C0AC612D3A2971B(); +int PS4_SYSV_ABI Func_1C5599B779990A43(); +int PS4_SYSV_ABI Func_1CCBB296B04317BE(); +int PS4_SYSV_ABI Func_1CD045542FB93002(); +int PS4_SYSV_ABI Func_1DECECA673AB77B7(); +int PS4_SYSV_ABI Func_1E03E024E26C1A7F(); +int PS4_SYSV_ABI Func_1F101732BB0D7E21(); +int PS4_SYSV_ABI Func_1F4D153EC3DD47BB(); +int PS4_SYSV_ABI Func_1F7C47F63FAF0CBE(); +int PS4_SYSV_ABI Func_1FBE2EE68C0F31B6(); +int PS4_SYSV_ABI Func_2038C1628914B9C9(); +int PS4_SYSV_ABI Func_203FCB56FDB86A74(); +int PS4_SYSV_ABI Func_20569C107C6CB08C(); +int PS4_SYSV_ABI Func_20AB2D734EDE55F0(); +int PS4_SYSV_ABI Func_22B1281180FB0A5E(); +int PS4_SYSV_ABI Func_22F1AADA66A449AE(); +int PS4_SYSV_ABI Func_238B215EFFDF3D30(); +int PS4_SYSV_ABI Func_24E8EC51D149FA15(); +int PS4_SYSV_ABI Func_25728E78A3962C02(); +int PS4_SYSV_ABI Func_25E649A1C6891C05(); +int PS4_SYSV_ABI Func_264B8A38B577705D(); +int PS4_SYSV_ABI Func_266ED08DC1C82A0E(); +int PS4_SYSV_ABI Func_27BB4DE62AB58BAD(); +int PS4_SYSV_ABI Func_283AA96A196EA2EA(); +int PS4_SYSV_ABI Func_285315A390A85A94(); +int PS4_SYSV_ABI Func_29049DBB1EF3194E(); +int PS4_SYSV_ABI Func_29F7BA9C3732CB47(); +int PS4_SYSV_ABI Func_2A732DF331ACCB37(); +int PS4_SYSV_ABI Func_2AA01660EC75B6FB(); +int PS4_SYSV_ABI Func_2B37CBCE941C1681(); +int PS4_SYSV_ABI Func_2CAA3B64D0544E55(); +int PS4_SYSV_ABI Func_2CCD79617EC10A75(); +int PS4_SYSV_ABI Func_2CD8B69716AC0667(); +int PS4_SYSV_ABI Func_2D74F7C0FF9B5E9C(); +int PS4_SYSV_ABI Func_2DCA5A8080544E95(); +int PS4_SYSV_ABI Func_2E69F2743CE7CE57(); +int PS4_SYSV_ABI Func_2EAF1F3BAFF0527D(); +int PS4_SYSV_ABI Func_31493E55BB4E8F66(); +int PS4_SYSV_ABI Func_317EDCAD00FB5F5E(); +int PS4_SYSV_ABI Func_31E01CFA8A18CDA2(); +int PS4_SYSV_ABI Func_32AFD782A061B526(); +int PS4_SYSV_ABI Func_32B5CDEB093B8189(); +int PS4_SYSV_ABI Func_34155152513C93AE(); +int PS4_SYSV_ABI Func_34E4EFFF8EF6C9FE(); +int PS4_SYSV_ABI Func_3572FA0D5C54563B(); +int PS4_SYSV_ABI Func_367C479B264E0DB9(); +int PS4_SYSV_ABI Func_36884FBC964B29CC(); +int PS4_SYSV_ABI Func_3860081BB7559949(); +int PS4_SYSV_ABI Func_39314F7E674AB132(); +int PS4_SYSV_ABI Func_3A02E780FCC556A5(); +int PS4_SYSV_ABI Func_3A17B885BA4849B6(); +int PS4_SYSV_ABI Func_3A38EACAEA5E23A4(); +int PS4_SYSV_ABI Func_3B34A5E07F0DBC1F(); +int PS4_SYSV_ABI Func_3B4E8FFC00FC7EA4(); +int PS4_SYSV_ABI Func_3BAB18FDA235107A(); +int PS4_SYSV_ABI Func_3BDF9996A0A33F11(); +int PS4_SYSV_ABI Func_3C1952F1A45CC37A(); +int PS4_SYSV_ABI Func_3CA37906CDB05F3B(); +int PS4_SYSV_ABI Func_3CDB2908ACEE3A6F(); +int PS4_SYSV_ABI Func_3D3ED165F2BDCD33(); +int PS4_SYSV_ABI Func_3DA4D7D1575FCDCE(); +int PS4_SYSV_ABI Func_3DDFB612CD0BC769(); +int PS4_SYSV_ABI Func_3E0415E167DEADC7(); +int PS4_SYSV_ABI Func_3E7E9F0F1581C1E6(); +int PS4_SYSV_ABI Func_3ED389DB8280ED65(); +int PS4_SYSV_ABI Func_3F0C7F6C0C35487D(); +int PS4_SYSV_ABI Func_3FDA7200389EF0D2(); +int PS4_SYSV_ABI Func_3FF3C258BA516E58(); +int PS4_SYSV_ABI Func_4029453F628A3C5D(); +int PS4_SYSV_ABI Func_405826DDB4AE538E(); +int PS4_SYSV_ABI Func_405A926759F25865(); +int PS4_SYSV_ABI Func_406608FDEE7AE88A(); +int PS4_SYSV_ABI Func_40DDA5558C17DDCF(); +int PS4_SYSV_ABI Func_419D12E52FF60664(); +int PS4_SYSV_ABI Func_4296E539474BE77F(); +int PS4_SYSV_ABI Func_42F41FC563CC3654(); +int PS4_SYSV_ABI Func_43CCC86F4C93026A(); +int PS4_SYSV_ABI Func_4409F60BDABC65E1(); +int PS4_SYSV_ABI Func_4563C70AEC675382(); +int PS4_SYSV_ABI Func_45E66370219BD05E(); +int PS4_SYSV_ABI Func_466A54F072785696(); +int PS4_SYSV_ABI Func_46CD2536976F209A(); +int PS4_SYSV_ABI Func_4863717BD2FDD157(); +int PS4_SYSV_ABI Func_4902EBD19A263149(); +int PS4_SYSV_ABI Func_4904F7FE8D83F40C(); +int PS4_SYSV_ABI Func_4A5E13F784ABFCE7(); +int PS4_SYSV_ABI Func_4B65EEB135C12781(); +int PS4_SYSV_ABI Func_4C19D49978DA85E2(); +int PS4_SYSV_ABI Func_4DE5D620FF66F136(); +int PS4_SYSV_ABI Func_4E170C12B57A8F9E(); +int PS4_SYSV_ABI Func_4E2F3FA405C3260C(); +int PS4_SYSV_ABI Func_4EA9350577513B4D(); +int PS4_SYSV_ABI Func_4F78EB6FC4B5F21F(); +int PS4_SYSV_ABI Func_50348BE4331117B7(); +int PS4_SYSV_ABI Func_508C7E8CDD281CAA(); +int PS4_SYSV_ABI Func_521C1D2C028F5A7E(); +int PS4_SYSV_ABI Func_522FF24A35E67291(); +int PS4_SYSV_ABI Func_5470FE90C25CDD4C(); +int PS4_SYSV_ABI Func_557F260F9A4ACD18(); +int PS4_SYSV_ABI Func_5586F97209F391EB(); +int PS4_SYSV_ABI Func_55B2C9B7ADA95C3C(); +int PS4_SYSV_ABI Func_55B488A3A540B936(); +int PS4_SYSV_ABI Func_5642DFE82AF43143(); +int PS4_SYSV_ABI Func_574E046F294AE187(); +int PS4_SYSV_ABI Func_578926EBF8AA6CBF(); +int PS4_SYSV_ABI Func_585DA5FC650896BC(); +int PS4_SYSV_ABI Func_58D6EB27349EC276(); +int PS4_SYSV_ABI Func_5906B7317949872D(); +int PS4_SYSV_ABI Func_5910B5614335BE70(); +int PS4_SYSV_ABI Func_593D7DA8911F08C9(); +int PS4_SYSV_ABI Func_59757FE6A93B0D53(); +int PS4_SYSV_ABI Func_598E60F862B1141E(); +int PS4_SYSV_ABI Func_5A45351666680DAF(); +int PS4_SYSV_ABI Func_5AABE9EA702E6A7F(); +int PS4_SYSV_ABI Func_5AEA4AE472355B80(); +int PS4_SYSV_ABI Func_5B20E53CDE598741(); +int PS4_SYSV_ABI Func_5B480B59FAE947E0(); +int PS4_SYSV_ABI Func_5B5EEC23690AB9BD(); +int PS4_SYSV_ABI Func_5C0AC5B0AF3EDAE0(); +int PS4_SYSV_ABI Func_5D2E999BEA0762D4(); +int PS4_SYSV_ABI Func_5D55BBFD45110E16(); +int PS4_SYSV_ABI Func_5DEE15403D2BB5FD(); +int PS4_SYSV_ABI Func_6020C708CA74B130(); +int PS4_SYSV_ABI Func_606E1415503C34D2(); +int PS4_SYSV_ABI Func_612140E8EE9A693E(); +int PS4_SYSV_ABI Func_61F13F551DAF61DF(); +int PS4_SYSV_ABI Func_6206D39131752328(); +int PS4_SYSV_ABI Func_621D4543EF0344DE(); +int PS4_SYSV_ABI Func_6259A9A8E56D0273(); +int PS4_SYSV_ABI Func_625F9C7016346F4E(); +int PS4_SYSV_ABI Func_62EF8DF746CD8C4A(); +int PS4_SYSV_ABI Func_636D2A99FD1E6B2B(); +int PS4_SYSV_ABI Func_68013EDF66FE7425(); +int PS4_SYSV_ABI Func_6971F7067DD639D1(); +int PS4_SYSV_ABI Func_69896ADB3AB410B2(); +int PS4_SYSV_ABI Func_6A1389AA6E561387(); +int PS4_SYSV_ABI Func_6A5560D89F12B2E7(); +int PS4_SYSV_ABI Func_6ABF99CF854ABCF1(); +int PS4_SYSV_ABI Func_6B4FDDC6500D8DCB(); +int PS4_SYSV_ABI Func_6CA11D5B49D1928A(); +int PS4_SYSV_ABI Func_6D6C0FB61E6D0715(); +int PS4_SYSV_ABI Func_6D750745FE1348F5(); +int PS4_SYSV_ABI Func_6E1AF3F9D09914BE(); +int PS4_SYSV_ABI Func_6E53ED4C08B2A521(); +int PS4_SYSV_ABI Func_6EF43ACA1ED6B968(); +int PS4_SYSV_ABI Func_6F6FA09F3E1B6A60(); +int PS4_SYSV_ABI Func_7035C340C7195901(); +int PS4_SYSV_ABI Func_7038E21CB5CF641B(); +int PS4_SYSV_ABI Func_706345DCDA5BA44D(); +int PS4_SYSV_ABI Func_7120714EBF10BF1F(); +int PS4_SYSV_ABI Func_713D28A91BC803DD(); +int PS4_SYSV_ABI Func_7153BD76A53AA012(); +int PS4_SYSV_ABI Func_715C625CC7041B6B(); +int PS4_SYSV_ABI Func_71E467BDB18711D0(); +int PS4_SYSV_ABI Func_720D17965C1F4E3F(); +int PS4_SYSV_ABI Func_734380C9BCF65B9A(); +int PS4_SYSV_ABI Func_73F4C08CCD4BBCCF(); +int PS4_SYSV_ABI Func_74403101B7B29D46(); +int PS4_SYSV_ABI Func_7525B081ACD66FF4(); +int PS4_SYSV_ABI Func_75BF4477C13A05CA(); +int PS4_SYSV_ABI Func_7609793F5987C6F7(); +int PS4_SYSV_ABI Func_7616ED01B04769AA(); +int PS4_SYSV_ABI Func_764F873D91A124D8(); +int PS4_SYSV_ABI Func_7706F1E123059565(); +int PS4_SYSV_ABI Func_77F2D07EB6D806E6(); +int PS4_SYSV_ABI Func_79C3704CDCD59E57(); +int PS4_SYSV_ABI Func_79DA0BBA21351545(); +int PS4_SYSV_ABI Func_79FA2447B5F3F0C4(); +int PS4_SYSV_ABI Func_7A4D6F65FF6195A5(); +int PS4_SYSV_ABI Func_7B3195CD114DECE7(); +int PS4_SYSV_ABI Func_7B3238F2301AD36D(); +int PS4_SYSV_ABI Func_7C77FC70750A3266(); +int PS4_SYSV_ABI Func_7D23A9DC459D6D18(); +int PS4_SYSV_ABI Func_7D5988C748D0A05F(); +int PS4_SYSV_ABI Func_7D9597147A99F4F4(); +int PS4_SYSV_ABI Func_7E2953F407DD8346(); +int PS4_SYSV_ABI Func_7EE34E5099709B32(); +int PS4_SYSV_ABI Func_80470E5511D5CA00(); +int PS4_SYSV_ABI Func_807179701C08F069(); +int PS4_SYSV_ABI Func_8096E81FFAF24E46(); +int PS4_SYSV_ABI Func_80B764F4F1B87042(); +int PS4_SYSV_ABI Func_80BF691438AD008B(); +int PS4_SYSV_ABI Func_80CF6CFC96012442(); +int PS4_SYSV_ABI Func_80EA772F8C0519FD(); +int PS4_SYSV_ABI Func_81D0AFD0084D327A(); +int PS4_SYSV_ABI Func_821EB8A72176FD67(); +int PS4_SYSV_ABI Func_82D2FAB54127273F(); +int PS4_SYSV_ABI Func_836AE669C42A59E9(); +int PS4_SYSV_ABI Func_8559A25BFEC3518C(); +int PS4_SYSV_ABI Func_85C1F66C767A49D2(); +int PS4_SYSV_ABI Func_8689ED1383F87BA7(); +int PS4_SYSV_ABI Func_8796CD9E5355D3A6(); +int PS4_SYSV_ABI Func_87D37EB6DDC19D99(); +int PS4_SYSV_ABI Func_880AA48F70F84FDD(); +int PS4_SYSV_ABI Func_897B07562093665B(); +int PS4_SYSV_ABI Func_8ACAF55F16368087(); +int PS4_SYSV_ABI Func_8AE8A5589B30D4E0(); +int PS4_SYSV_ABI Func_8AE997909831B331(); +int PS4_SYSV_ABI Func_8B2D640BE0D0FB99(); +int PS4_SYSV_ABI Func_8B3D9AB4668DAECB(); +int PS4_SYSV_ABI Func_8B5EFAAAACE0B46C(); +int PS4_SYSV_ABI Func_8C27943F40A988DB(); +int PS4_SYSV_ABI Func_8C54096C75F5F2D0(); +int PS4_SYSV_ABI Func_8D7663A0A5168814(); +int PS4_SYSV_ABI Func_8E618F509994FAD7(); +int PS4_SYSV_ABI Func_8F19E6CC064E2B98(); +int PS4_SYSV_ABI Func_8F6A8AEAEE922FF5(); +int PS4_SYSV_ABI Func_9010E1AD8EBBFBCA(); +int PS4_SYSV_ABI Func_90A955A0E7001AE9(); +int PS4_SYSV_ABI Func_90F9D6067FEECC05(); +int PS4_SYSV_ABI Func_9348F3D19546A1DA(); +int PS4_SYSV_ABI Func_93D3C011DB19388A(); +int PS4_SYSV_ABI Func_956E7A4FD9F89103(); +int PS4_SYSV_ABI Func_95F699E042C3E40F(); +int PS4_SYSV_ABI Func_96877B39AA0E8735(); +int PS4_SYSV_ABI Func_96CE07C49ED234EA(); +int PS4_SYSV_ABI Func_976BB178235B5681(); +int PS4_SYSV_ABI Func_978C0B25E588C4D6(); +int PS4_SYSV_ABI Func_98BA2612BEF238D6(); +int PS4_SYSV_ABI Func_995BDD4931AF9137(); +int PS4_SYSV_ABI Func_9966E39A926B7250(); +int PS4_SYSV_ABI Func_99C2306F18963464(); +int PS4_SYSV_ABI Func_99C92C613B776BA7(); +int PS4_SYSV_ABI Func_9A4E4B938CC8AD39(); +int PS4_SYSV_ABI Func_9B23F7B4B7F72081(); +int PS4_SYSV_ABI Func_9C0EAEEAE705A8DB(); +int PS4_SYSV_ABI Func_9D47AC59545DE9E8(); +int PS4_SYSV_ABI Func_A13052D8B1B2ACFA(); +int PS4_SYSV_ABI Func_A1AA43E3A78F6F62(); +int PS4_SYSV_ABI Func_A1E48CDF54649DC9(); +int PS4_SYSV_ABI Func_A2E7DEE5B0AF5D14(); +int PS4_SYSV_ABI Func_A2F5C7FD9FF113F5(); +int PS4_SYSV_ABI Func_A36296E2269D46BC(); +int PS4_SYSV_ABI Func_A3EE2A7B9F0D88AF(); +int PS4_SYSV_ABI Func_A4471F9F7E0BFA82(); +int PS4_SYSV_ABI Func_A449BBA521EA34E1(); +int PS4_SYSV_ABI Func_A48E666C334E726C(); +int PS4_SYSV_ABI Func_A49B7449B4DDE69C(); +int PS4_SYSV_ABI Func_A5748451125C9EA4(); +int PS4_SYSV_ABI Func_A690A28D648CC176(); +int PS4_SYSV_ABI Func_A6A86DE1B1CBB1D9(); +int PS4_SYSV_ABI Func_A8F2BB7B815740A1(); +int PS4_SYSV_ABI Func_A93F64C06A6F7397(); +int PS4_SYSV_ABI Func_AB35925FC97D6AA3(); +int PS4_SYSV_ABI Func_AC014AA2C991FA29(); +int PS4_SYSV_ABI Func_AC06E10901404AEB(); +int PS4_SYSV_ABI Func_AC75C68813523505(); +int PS4_SYSV_ABI Func_AD441BC497082C3E(); +int PS4_SYSV_ABI Func_AD4F25F021D354C3(); +int PS4_SYSV_ABI Func_ADFA04A85541A4FE(); +int PS4_SYSV_ABI Func_AE9610A6B5217A23(); +int PS4_SYSV_ABI Func_AF201923826F0A58(); +int PS4_SYSV_ABI Func_AFC021B4389CA3FA(); +int PS4_SYSV_ABI Func_B015E999A3373D8F(); +int PS4_SYSV_ABI Func_B0384B86107FC652(); +int PS4_SYSV_ABI Func_B0C630653B316563(); +int PS4_SYSV_ABI Func_B100DCCD88D5C73D(); +int PS4_SYSV_ABI Func_B11A3FEA5E4D9EA4(); +int PS4_SYSV_ABI Func_B2E7F8DC199C0B93(); +int PS4_SYSV_ABI Func_B3AB61A296F6DDC8(); +int PS4_SYSV_ABI Func_B3F32F6AE619EC82(); +int PS4_SYSV_ABI Func_B4227AB213BF8CF5(); +int PS4_SYSV_ABI Func_B4652BF42B604360(); +int PS4_SYSV_ABI Func_B536C1F13BFE97CB(); +int PS4_SYSV_ABI Func_B645CC264184BC89(); +int PS4_SYSV_ABI Func_B67E17B1582C6FBD(); +int PS4_SYSV_ABI Func_B6D047C5D7695A4D(); +int PS4_SYSV_ABI Func_B75ED8E1EA62EFC7(); +int PS4_SYSV_ABI Func_B7A9A944DBD7E100(); +int PS4_SYSV_ABI Func_B7C4E75BE94F31F3(); +int PS4_SYSV_ABI Func_B888B1F92C464121(); +int PS4_SYSV_ABI Func_B8DEC22564AA057B(); +int PS4_SYSV_ABI Func_B9BADD1CBBBAE4F8(); +int PS4_SYSV_ABI Func_BAA9F7169C85E59F(); +int PS4_SYSV_ABI Func_BAEE5C38908D62DB(); +int PS4_SYSV_ABI Func_BCC855EB25183F84(); +int PS4_SYSV_ABI Func_BD01F637029C7364(); +int PS4_SYSV_ABI Func_BDD29F5AC7077E53(); +int PS4_SYSV_ABI Func_BED83DD33ECAD50D(); +int PS4_SYSV_ABI Func_BEE7D5D098ABF728(); +int PS4_SYSV_ABI Func_C0DB15CCF59AE62C(); +int PS4_SYSV_ABI Func_C1C229FEE0FD60FA(); +int PS4_SYSV_ABI Func_C228B9AD68298E98(); +int PS4_SYSV_ABI Func_C298525CEF6FB283(); +int PS4_SYSV_ABI Func_C350F09351F6D6B5(); +int PS4_SYSV_ABI Func_C3742E80FA580319(); +int PS4_SYSV_ABI Func_C3C9853D5D4D45D4(); +int PS4_SYSV_ABI Func_C3F5DAD4FB9FC340(); +int PS4_SYSV_ABI Func_C45FB0E4CCE9AED6(); +int PS4_SYSV_ABI Func_C4979CB948B7E3C7(); +int PS4_SYSV_ABI Func_C49B25BA16CF0B8C(); +int PS4_SYSV_ABI Func_C551345D9631201E(); +int PS4_SYSV_ABI Func_C57A294421368298(); +int PS4_SYSV_ABI Func_C5DC91CAD721D628(); +int PS4_SYSV_ABI Func_C6DECEE589135357(); +int PS4_SYSV_ABI Func_C81F8B20D67AC78D(); +int PS4_SYSV_ABI Func_C820FA56FAC87BEA(); +int PS4_SYSV_ABI Func_C878EA9114C5E490(); +int PS4_SYSV_ABI Func_C8A813EBFF477509(); +int PS4_SYSV_ABI Func_C966A663D5A35482(); +int PS4_SYSV_ABI Func_C97C4C67FD3674D3(); +int PS4_SYSV_ABI Func_C990550F15848B07(); +int PS4_SYSV_ABI Func_CA59737A8EC1BBBE(); +int PS4_SYSV_ABI Func_CAC5FDE8F80D7B65(); +int PS4_SYSV_ABI Func_CB135B30D0639B83(); +int PS4_SYSV_ABI Func_CB8A1AAA61F64C3A(); +int PS4_SYSV_ABI Func_CB9E674672580757(); +int PS4_SYSV_ABI Func_CC2B9D25EAEAAB1D(); +int PS4_SYSV_ABI Func_CD1B252BBEDF5B53(); +int PS4_SYSV_ABI Func_CF003BE90CBE1A27(); +int PS4_SYSV_ABI Func_CF008E34884AC1E2(); +int PS4_SYSV_ABI Func_D0B8F4B3A3687AB2(); +int PS4_SYSV_ABI Func_D0EE19B8E91F60F5(); +int PS4_SYSV_ABI Func_D12B9294BD0E0F56(); +int PS4_SYSV_ABI Func_D1CC8626D8FA328B(); +int PS4_SYSV_ABI Func_D2FA2BB9EB8B63AC(); +int PS4_SYSV_ABI Func_D32197880CF93CEB(); +int PS4_SYSV_ABI Func_D326F5C26CC81B8E(); +int PS4_SYSV_ABI Func_D4FA06B95A321B7A(); +int PS4_SYSV_ABI Func_D52A37A901E04B21(); +int PS4_SYSV_ABI Func_D5504DFC399AB400(); +int PS4_SYSV_ABI Func_D56105CB27F8F5DC(); +int PS4_SYSV_ABI Func_D568AB19235ECB19(); +int PS4_SYSV_ABI Func_D6DF7BF6639FE611(); +int PS4_SYSV_ABI Func_D8608A903119D746(); +int PS4_SYSV_ABI Func_D9E8FC707D59914D(); +int PS4_SYSV_ABI Func_D9F079E62DEE5B29(); +int PS4_SYSV_ABI Func_DA17CE4F29748536(); +int PS4_SYSV_ABI Func_DA40B9EFD7F61185(); +int PS4_SYSV_ABI Func_DA6B274FEBC2666A(); +int PS4_SYSV_ABI Func_DAD01535C87A51FC(); +int PS4_SYSV_ABI Func_DB4511D448510EC4(); +int PS4_SYSV_ABI Func_DB8EF1FFFC66269C(); +int PS4_SYSV_ABI Func_DBB508FA1B9DA8F7(); +int PS4_SYSV_ABI Func_DC59C9B870B729A2(); +int PS4_SYSV_ABI Func_DC669ED6CBF6751C(); +int PS4_SYSV_ABI Func_DCB8A2849A41C991(); +int PS4_SYSV_ABI Func_DD8F9916D7F03AF7(); +int PS4_SYSV_ABI Func_DDC33F2F4E480C2A(); +int PS4_SYSV_ABI Func_DE0B420BDE8B22D7(); +int PS4_SYSV_ABI Func_E0C0BC29898FE370(); +int PS4_SYSV_ABI Func_E0CD893E46FB55BA(); +int PS4_SYSV_ABI Func_E25530164B7F659F(); +int PS4_SYSV_ABI Func_E3682F43FDF76C58(); +int PS4_SYSV_ABI Func_E38177E1C78A80FA(); +int PS4_SYSV_ABI Func_E3CA74CFF965DF0A(); +int PS4_SYSV_ABI Func_E45BB191B49B2ED9(); +int PS4_SYSV_ABI Func_E465B9D6B60E6D7D(); +int PS4_SYSV_ABI Func_E4D82876C296C38A(); +int PS4_SYSV_ABI Func_E4DDB5350FA5B538(); +int PS4_SYSV_ABI Func_E54BFF6FB72BC7BE(); +int PS4_SYSV_ABI Func_E592A93203020BBB(); +int PS4_SYSV_ABI Func_E5A44AF6D7D48AFD(); +int PS4_SYSV_ABI Func_E639A97CF9FF1430(); +int PS4_SYSV_ABI Func_E6AC0179E48A8927(); +int PS4_SYSV_ABI Func_E751596682775D83(); +int PS4_SYSV_ABI Func_E788B1E52EF82702(); +int PS4_SYSV_ABI Func_E94F17613F5C9D31(); +int PS4_SYSV_ABI Func_E9590113128D55E0(); +int PS4_SYSV_ABI Func_E9E0B0DD12560B16(); +int PS4_SYSV_ABI Func_EAF5C8ECE64C7B05(); +int PS4_SYSV_ABI Func_EB98BF5C42D4A7EB(); +int PS4_SYSV_ABI Func_EBABC4AAC43A468C(); +int PS4_SYSV_ABI Func_EBF00085F082CC8B(); +int PS4_SYSV_ABI Func_ECB659EE058D06AF(); +int PS4_SYSV_ABI Func_ECF096AB751487AE(); +int PS4_SYSV_ABI Func_EE5A271701DB33C0(); +int PS4_SYSV_ABI Func_EF64CB6A1625248E(); +int PS4_SYSV_ABI Func_EF6C8A357C7ED863(); +int PS4_SYSV_ABI Func_F00FE94F7E699994(); +int PS4_SYSV_ABI Func_F1A51DBA30329038(); +int PS4_SYSV_ABI Func_F216E766A90FDC12(); +int PS4_SYSV_ABI Func_F2A10584ABE5D82C(); +int PS4_SYSV_ABI Func_F2D99D395E5421A3(); +int PS4_SYSV_ABI Func_F38001E528BA1371(); +int PS4_SYSV_ABI Func_F39EC9C8FA7687B3(); +int PS4_SYSV_ABI Func_F3AFFFDCD632775C(); +int PS4_SYSV_ABI Func_F3B8DFF33748BFD3(); +int PS4_SYSV_ABI Func_F5E47F9550F7A147(); +int PS4_SYSV_ABI Func_F6E93714D1A939CF(); +int PS4_SYSV_ABI Func_F6FD19AD48E4EF09(); +int PS4_SYSV_ABI Func_F744EBFC620F7CBF(); +int PS4_SYSV_ABI Func_F76E4525ACBACC7F(); +int PS4_SYSV_ABI Func_F7957A48882F42CB(); +int PS4_SYSV_ABI Func_F7A80B07809BA838(); +int PS4_SYSV_ABI Func_F8571C6CC5B6B59D(); +int PS4_SYSV_ABI Func_F9787CFA873836FB(); +int PS4_SYSV_ABI Func_FA789F6D34D383F8(); +int PS4_SYSV_ABI Func_FABA574083AC1E6C(); +int PS4_SYSV_ABI Func_FC04FDBBAE368FB7(); +int PS4_SYSV_ABI Func_FD2DAFBF2E40EEE7(); +int PS4_SYSV_ABI Func_FD55EE6D35F950AD(); +int PS4_SYSV_ABI Func_FE55EE32098D0D58(); +int PS4_SYSV_ABI Func_FE79841022E1DA1C(); +int PS4_SYSV_ABI Func_FFF4A3E279FB44A7(); + +void RegisterlibSceNpCommon(Core::Loader::SymbolsResolver* sym); +} // namespace Libraries::NpCommon \ No newline at end of file diff --git a/src/core/libraries/np_common/np_common_error.h b/src/core/libraries/np_common/np_common_error.h new file mode 100644 index 000000000..5da6e6a90 --- /dev/null +++ b/src/core/libraries/np_common/np_common_error.h @@ -0,0 +1,9 @@ +// SPDX-FileCopyrightText: Copyright 2024 shadPS4 Emulator Project +// SPDX-License-Identifier: GPL-2.0-or-later + +#pragma once + +#include "core/libraries/error_codes.h" + +constexpr int ORBIS_NP_ERROR_INVALID_ARGUMENT = 0x80550003; +constexpr int ORBIS_NP_UTIL_ERROR_NOT_MATCH = 0x80550609; \ No newline at end of file diff --git a/src/core/libraries/np_manager/np_manager.cpp b/src/core/libraries/np_manager/np_manager.cpp index 87d752c69..a60dcd86f 100644 --- a/src/core/libraries/np_manager/np_manager.cpp +++ b/src/core/libraries/np_manager/np_manager.cpp @@ -1,11 +1,11 @@ // SPDX-FileCopyrightText: Copyright 2024 shadPS4 Emulator Project // SPDX-License-Identifier: GPL-2.0-or-later -#include "common/config.h" #include "common/logging/log.h" #include "core/libraries/error_codes.h" #include "core/libraries/libs.h" #include "core/libraries/np_manager/np_manager.h" +#include "core/libraries/np_manager/np_manager_error.h" #include "core/tls.h" namespace Libraries::NpManager { @@ -936,14 +936,22 @@ int PS4_SYSV_ABI sceNpGetAccountDateOfBirthA() { return ORBIS_OK; } -int PS4_SYSV_ABI sceNpGetAccountId() { - LOG_ERROR(Lib_NpManager, "(STUBBED) called"); - return ORBIS_OK; +int PS4_SYSV_ABI sceNpGetAccountId(OrbisNpOnlineId* online_id, u64* account_id) { + LOG_DEBUG(Lib_NpManager, "called"); + if (online_id == nullptr || account_id == nullptr) { + return ORBIS_NP_ERROR_INVALID_ARGUMENT; + } + *account_id = 0; + return ORBIS_NP_ERROR_SIGNED_OUT; } -int PS4_SYSV_ABI sceNpGetAccountIdA() { - LOG_ERROR(Lib_NpManager, "(STUBBED) called"); - return ORBIS_OK; +int PS4_SYSV_ABI sceNpGetAccountIdA(OrbisUserServiceUserId user_id, u64* account_id) { + LOG_DEBUG(Lib_NpManager, "user_id {}", user_id); + if (account_id == nullptr) { + return ORBIS_NP_ERROR_INVALID_ARGUMENT; + } + *account_id = 0; + return ORBIS_NP_ERROR_SIGNED_OUT; } int PS4_SYSV_ABI sceNpGetAccountLanguage() { @@ -973,6 +981,9 @@ int PS4_SYSV_ABI sceNpGetGamePresenceStatusA() { int PS4_SYSV_ABI sceNpGetNpId(OrbisUserServiceUserId user_id, OrbisNpId* np_id) { LOG_DEBUG(Lib_NpManager, "user_id {}", user_id); + if (np_id == nullptr) { + return ORBIS_NP_ERROR_INVALID_ARGUMENT; + } return ORBIS_NP_ERROR_SIGNED_OUT; } @@ -981,8 +992,11 @@ int PS4_SYSV_ABI sceNpGetNpReachabilityState() { return ORBIS_OK; } -int PS4_SYSV_ABI sceNpGetOnlineId(s32 user_id, OrbisNpOnlineId* online_id) { +int PS4_SYSV_ABI sceNpGetOnlineId(OrbisUserServiceUserId user_id, OrbisNpOnlineId* online_id) { LOG_DEBUG(Lib_NpManager, "user_id {}", user_id); + if (online_id == nullptr) { + return ORBIS_NP_ERROR_INVALID_ARGUMENT; + } return ORBIS_NP_ERROR_SIGNED_OUT; } @@ -996,7 +1010,10 @@ int PS4_SYSV_ABI sceNpGetParentalControlInfoA() { return ORBIS_OK; } -int PS4_SYSV_ABI sceNpGetState(s32 userId, OrbisNpState* state) { +int PS4_SYSV_ABI sceNpGetState(OrbisUserServiceUserId user_id, OrbisNpState* state) { + if (state == nullptr) { + return ORBIS_NP_ERROR_INVALID_ARGUMENT; + } *state = OrbisNpState::SignedOut; LOG_DEBUG(Lib_NpManager, "Signed out"); return ORBIS_OK; @@ -1012,8 +1029,12 @@ int PS4_SYSV_ABI sceNpGetUserIdByOnlineId() { return ORBIS_OK; } -int PS4_SYSV_ABI sceNpHasSignedUp() { - LOG_ERROR(Lib_NpManager, "(STUBBED) called"); +int PS4_SYSV_ABI sceNpHasSignedUp(OrbisUserServiceUserId user_id, bool* has_signed_up) { + LOG_DEBUG(Lib_NpManager, "called"); + if (has_signed_up == nullptr) { + return ORBIS_NP_ERROR_INVALID_ARGUMENT; + } + *has_signed_up = false; return ORBIS_OK; } @@ -2510,7 +2531,7 @@ struct NpStateCallbackForNpToolkit { NpStateCallbackForNpToolkit NpStateCbForNp; int PS4_SYSV_ABI sceNpCheckCallbackForLib() { - Core::ExecuteGuest(NpStateCbForNp.func, 1, OrbisNpState::SignedOut, NpStateCbForNp.userdata); + LOG_DEBUG(Lib_NpManager, "(STUBBED) called"); return ORBIS_OK; } diff --git a/src/core/libraries/np_manager/np_manager.h b/src/core/libraries/np_manager/np_manager.h index 6ba588e5e..02a1a32f6 100644 --- a/src/core/libraries/np_manager/np_manager.h +++ b/src/core/libraries/np_manager/np_manager.h @@ -11,8 +11,6 @@ class SymbolsResolver; namespace Libraries::NpManager { -constexpr int ORBIS_NP_ERROR_SIGNED_OUT = 0x80550006; - enum class OrbisNpState : u32 { Unknown = 0, SignedOut, SignedIn }; using OrbisNpStateCallbackForNpToolkit = PS4_SYSV_ABI void (*)(s32 userId, OrbisNpState state, @@ -220,22 +218,22 @@ int PS4_SYSV_ABI sceNpGetAccountCountry(); int PS4_SYSV_ABI sceNpGetAccountCountryA(); int PS4_SYSV_ABI sceNpGetAccountDateOfBirth(); int PS4_SYSV_ABI sceNpGetAccountDateOfBirthA(); -int PS4_SYSV_ABI sceNpGetAccountId(); -int PS4_SYSV_ABI sceNpGetAccountIdA(); +int PS4_SYSV_ABI sceNpGetAccountId(OrbisNpOnlineId* online_id, u64* account_id); +int PS4_SYSV_ABI sceNpGetAccountIdA(OrbisUserServiceUserId user_id, u64* account_id); int PS4_SYSV_ABI sceNpGetAccountLanguage(); int PS4_SYSV_ABI sceNpGetAccountLanguage2(); int PS4_SYSV_ABI sceNpGetAccountLanguageA(); int PS4_SYSV_ABI sceNpGetGamePresenceStatus(); int PS4_SYSV_ABI sceNpGetGamePresenceStatusA(); -int PS4_SYSV_ABI sceNpGetNpId(OrbisUserServiceUserId userId, OrbisNpId* npId); +int PS4_SYSV_ABI sceNpGetNpId(OrbisUserServiceUserId user_id, OrbisNpId* np_id); int PS4_SYSV_ABI sceNpGetNpReachabilityState(); -int PS4_SYSV_ABI sceNpGetOnlineId(s32 userId, OrbisNpOnlineId* onlineId); +int PS4_SYSV_ABI sceNpGetOnlineId(OrbisUserServiceUserId user_id, OrbisNpOnlineId* online_id); int PS4_SYSV_ABI sceNpGetParentalControlInfo(); int PS4_SYSV_ABI sceNpGetParentalControlInfoA(); -int PS4_SYSV_ABI sceNpGetState(s32 userId, OrbisNpState* state); +int PS4_SYSV_ABI sceNpGetState(OrbisUserServiceUserId user_id, OrbisNpState* state); int PS4_SYSV_ABI sceNpGetUserIdByAccountId(); int PS4_SYSV_ABI sceNpGetUserIdByOnlineId(); -int PS4_SYSV_ABI sceNpHasSignedUp(); +int PS4_SYSV_ABI sceNpHasSignedUp(OrbisUserServiceUserId user_id, bool* has_signed_up); int PS4_SYSV_ABI sceNpIdMapperAbortRequest(); int PS4_SYSV_ABI sceNpIdMapperAccountIdToNpId(); int PS4_SYSV_ABI sceNpIdMapperAccountIdToOnlineId(); diff --git a/src/core/libraries/np_manager/np_manager_error.h b/src/core/libraries/np_manager/np_manager_error.h new file mode 100644 index 000000000..4af0d08ef --- /dev/null +++ b/src/core/libraries/np_manager/np_manager_error.h @@ -0,0 +1,9 @@ +// SPDX-FileCopyrightText: Copyright 2024 shadPS4 Emulator Project +// SPDX-License-Identifier: GPL-2.0-or-later + +#pragma once + +#include "core/libraries/error_codes.h" + +constexpr int ORBIS_NP_ERROR_INVALID_ARGUMENT = 0x80550003; +constexpr int ORBIS_NP_ERROR_SIGNED_OUT = 0x80550006; \ No newline at end of file diff --git a/src/core/libraries/np_party/np_party.cpp b/src/core/libraries/np_party/np_party.cpp new file mode 100644 index 000000000..8a66ccb22 --- /dev/null +++ b/src/core/libraries/np_party/np_party.cpp @@ -0,0 +1,195 @@ +// SPDX-FileCopyrightText: Copyright 2024 shadPS4 Emulator Project +// SPDX-License-Identifier: GPL-2.0-or-later + +#include "common/logging/log.h" +#include "core/libraries/error_codes.h" +#include "core/libraries/libs.h" +#include "core/libraries/np_party/np_party.h" + +namespace Libraries::NpParty { + +s32 PS4_SYSV_ABI sceNpPartyCheckCallback() { + LOG_ERROR(Lib_NpParty, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI sceNpPartyCreate() { + LOG_ERROR(Lib_NpParty, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI sceNpPartyCreateA() { + LOG_ERROR(Lib_NpParty, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI sceNpPartyGetId() { + LOG_ERROR(Lib_NpParty, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI sceNpPartyGetMemberInfo() { + LOG_ERROR(Lib_NpParty, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI sceNpPartyGetMemberInfoA() { + LOG_ERROR(Lib_NpParty, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI sceNpPartyGetMembers() { + LOG_ERROR(Lib_NpParty, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI sceNpPartyGetMembersA() { + LOG_ERROR(Lib_NpParty, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI sceNpPartyGetMemberSessionInfo() { + LOG_ERROR(Lib_NpParty, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI sceNpPartyGetMemberVoiceInfo() { + LOG_ERROR(Lib_NpParty, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI sceNpPartyGetState() { + LOG_ERROR(Lib_NpParty, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI sceNpPartyGetStateAsUser() { + LOG_ERROR(Lib_NpParty, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI sceNpPartyGetStateAsUserA() { + LOG_ERROR(Lib_NpParty, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI sceNpPartyGetVoiceChatPriority() { + LOG_ERROR(Lib_NpParty, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI sceNpPartyInitialize() { + LOG_ERROR(Lib_NpParty, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI sceNpPartyJoin() { + LOG_ERROR(Lib_NpParty, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI sceNpPartyLeave() { + LOG_ERROR(Lib_NpParty, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI sceNpPartyRegisterHandler() { + LOG_ERROR(Lib_NpParty, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI sceNpPartyRegisterHandlerA() { + LOG_ERROR(Lib_NpParty, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI sceNpPartyRegisterPrivateHandler() { + LOG_ERROR(Lib_NpParty, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI sceNpPartySendBinaryMessage() { + LOG_ERROR(Lib_NpParty, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI sceNpPartySetVoiceChatPriority() { + LOG_ERROR(Lib_NpParty, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI sceNpPartyShowInvitationList() { + LOG_ERROR(Lib_NpParty, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI sceNpPartyShowInvitationListA() { + LOG_ERROR(Lib_NpParty, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI sceNpPartyTerminate() { + LOG_ERROR(Lib_NpParty, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI sceNpPartyUnregisterPrivateHandler() { + LOG_ERROR(Lib_NpParty, "(STUBBED) called"); + return ORBIS_OK; +} + +void RegisterlibSceNpParty(Core::Loader::SymbolsResolver* sym) { + LIB_FUNCTION("3e4k2mzLkmc", "libSceNpParty", 1, "libSceNpParty", 1, 1, sceNpPartyCheckCallback); + LIB_FUNCTION("nOZRy-slBoA", "libSceNpParty", 1, "libSceNpParty", 1, 1, sceNpPartyCreate); + LIB_FUNCTION("XQSUbbnpPBA", "libSceNpParty", 1, "libSceNpParty", 1, 1, sceNpPartyCreateA); + LIB_FUNCTION("DRA3ay-1DFQ", "libSceNpParty", 1, "libSceNpParty", 1, 1, sceNpPartyGetId); + LIB_FUNCTION("F1P+-wpxQow", "libSceNpParty", 1, "libSceNpParty", 1, 1, sceNpPartyGetMemberInfo); + LIB_FUNCTION("v2RYVGrJDkM", "libSceNpParty", 1, "libSceNpParty", 1, 1, + sceNpPartyGetMemberInfoA); + LIB_FUNCTION("T2UOKf00ZN0", "libSceNpParty", 1, "libSceNpParty", 1, 1, sceNpPartyGetMembers); + LIB_FUNCTION("TaNw7W25QJw", "libSceNpParty", 1, "libSceNpParty", 1, 1, sceNpPartyGetMembersA); + LIB_FUNCTION("4gOMfNYzllw", "libSceNpParty", 1, "libSceNpParty", 1, 1, + sceNpPartyGetMemberSessionInfo); + LIB_FUNCTION("EKi1jx59SP4", "libSceNpParty", 1, "libSceNpParty", 1, 1, + sceNpPartyGetMemberVoiceInfo); + LIB_FUNCTION("aEzKdJzATZ0", "libSceNpParty", 1, "libSceNpParty", 1, 1, sceNpPartyGetState); + LIB_FUNCTION("o7grRhiGHYI", "libSceNpParty", 1, "libSceNpParty", 1, 1, + sceNpPartyGetStateAsUser); + LIB_FUNCTION("EjyAI+QNgFw", "libSceNpParty", 1, "libSceNpParty", 1, 1, + sceNpPartyGetStateAsUserA); + LIB_FUNCTION("-lc6XZnQXvM", "libSceNpParty", 1, "libSceNpParty", 1, 1, + sceNpPartyGetVoiceChatPriority); + LIB_FUNCTION("lhYCTQmBkds", "libSceNpParty", 1, "libSceNpParty", 1, 1, sceNpPartyInitialize); + LIB_FUNCTION("RXNCDw2GDEg", "libSceNpParty", 1, "libSceNpParty", 1, 1, sceNpPartyJoin); + LIB_FUNCTION("J8jAi-tfJHc", "libSceNpParty", 1, "libSceNpParty", 1, 1, sceNpPartyLeave); + LIB_FUNCTION("kA88gbv71ao", "libSceNpParty", 1, "libSceNpParty", 1, 1, + sceNpPartyRegisterHandler); + LIB_FUNCTION("+v4fVHMwFWc", "libSceNpParty", 1, "libSceNpParty", 1, 1, + sceNpPartyRegisterHandlerA); + LIB_FUNCTION("zo4G5WWYpKg", "libSceNpParty", 1, "libSceNpParty", 1, 1, + sceNpPartyRegisterPrivateHandler); + LIB_FUNCTION("U6VdUe-PNAY", "libSceNpParty", 1, "libSceNpParty", 1, 1, + sceNpPartySendBinaryMessage); + LIB_FUNCTION("nazKyHygHhY", "libSceNpParty", 1, "libSceNpParty", 1, 1, + sceNpPartySetVoiceChatPriority); + LIB_FUNCTION("-MFiL7hEnPE", "libSceNpParty", 1, "libSceNpParty", 1, 1, + sceNpPartyShowInvitationList); + LIB_FUNCTION("yARHEYLajs0", "libSceNpParty", 1, "libSceNpParty", 1, 1, + sceNpPartyShowInvitationListA); + LIB_FUNCTION("oLYkibiHqRA", "libSceNpParty", 1, "libSceNpParty", 1, 1, sceNpPartyTerminate); + LIB_FUNCTION("zQ7gIvt11Pc", "libSceNpParty", 1, "libSceNpParty", 1, 1, + sceNpPartyUnregisterPrivateHandler); + LIB_FUNCTION("nOZRy-slBoA", "libSceNpPartyCompat", 1, "libSceNpParty", 1, 1, sceNpPartyCreate); + LIB_FUNCTION("F1P+-wpxQow", "libSceNpPartyCompat", 1, "libSceNpParty", 1, 1, + sceNpPartyGetMemberInfo); + LIB_FUNCTION("T2UOKf00ZN0", "libSceNpPartyCompat", 1, "libSceNpParty", 1, 1, + sceNpPartyGetMembers); + LIB_FUNCTION("o7grRhiGHYI", "libSceNpPartyCompat", 1, "libSceNpParty", 1, 1, + sceNpPartyGetStateAsUser); + LIB_FUNCTION("kA88gbv71ao", "libSceNpPartyCompat", 1, "libSceNpParty", 1, 1, + sceNpPartyRegisterHandler); + LIB_FUNCTION("-MFiL7hEnPE", "libSceNpPartyCompat", 1, "libSceNpParty", 1, 1, + sceNpPartyShowInvitationList); +}; + +} // namespace Libraries::NpParty \ No newline at end of file diff --git a/src/core/libraries/np_party/np_party.h b/src/core/libraries/np_party/np_party.h new file mode 100644 index 000000000..d5f20e4f8 --- /dev/null +++ b/src/core/libraries/np_party/np_party.h @@ -0,0 +1,44 @@ +// SPDX-FileCopyrightText: Copyright 2024 shadPS4 Emulator Project +// SPDX-License-Identifier: GPL-2.0-or-later + +#pragma once + +#include "common/types.h" + +namespace Core::Loader { +class SymbolsResolver; +} + +namespace Libraries::NpParty { + +s32 PS4_SYSV_ABI sceNpPartyCheckCallback(); +s32 PS4_SYSV_ABI sceNpPartyCreate(); +s32 PS4_SYSV_ABI sceNpPartyCreateA(); +s32 PS4_SYSV_ABI sceNpPartyGetId(); +s32 PS4_SYSV_ABI sceNpPartyGetMemberInfo(); +s32 PS4_SYSV_ABI sceNpPartyGetMemberInfoA(); +s32 PS4_SYSV_ABI sceNpPartyGetMembers(); +s32 PS4_SYSV_ABI sceNpPartyGetMembersA(); +s32 PS4_SYSV_ABI sceNpPartyGetMemberSessionInfo(); +s32 PS4_SYSV_ABI sceNpPartyGetMemberVoiceInfo(); +s32 PS4_SYSV_ABI sceNpPartyGetState(); +s32 PS4_SYSV_ABI sceNpPartyGetStateAsUser(); +s32 PS4_SYSV_ABI sceNpPartyGetStateAsUserA(); +s32 PS4_SYSV_ABI sceNpPartyGetVoiceChatPriority(); +s32 PS4_SYSV_ABI sceNpPartyInitialize(); +s32 PS4_SYSV_ABI sceNpPartyJoin(); +s32 PS4_SYSV_ABI sceNpPartyLeave(); +s32 PS4_SYSV_ABI sceNpPartyRegisterHandler(); +s32 PS4_SYSV_ABI sceNpPartyRegisterHandlerA(); +s32 PS4_SYSV_ABI sceNpPartyRegisterPrivateHandler(); +s32 PS4_SYSV_ABI sceNpPartySendBinaryMessage(); +s32 PS4_SYSV_ABI sceNpPartySetVoiceChatPriority(); +s32 PS4_SYSV_ABI sceNpPartyShowInvitationList(); +s32 PS4_SYSV_ABI sceNpPartyShowInvitationListA(); +s32 PS4_SYSV_ABI sceNpPartyTerminate(); +s32 PS4_SYSV_ABI sceNpPartyUnregisterPrivateHandler(); +s32 PS4_SYSV_ABI module_start(); +s32 PS4_SYSV_ABI module_stop(); + +void RegisterlibSceNpParty(Core::Loader::SymbolsResolver* sym); +} // namespace Libraries::NpParty \ No newline at end of file diff --git a/src/core/libraries/np_trophy/np_trophy.cpp b/src/core/libraries/np_trophy/np_trophy.cpp index ccd8ab710..a951d5655 100644 --- a/src/core/libraries/np_trophy/np_trophy.cpp +++ b/src/core/libraries/np_trophy/np_trophy.cpp @@ -923,15 +923,16 @@ int PS4_SYSV_ABI sceNpTrophyUnlockTrophy(OrbisNpTrophyContext context, OrbisNpTr node.attribute("unlockstate").set_value("true"); } - Rtc::OrbisRtcTick trophyTimestamp; - Rtc::sceRtcGetCurrentTick(&trophyTimestamp); + auto trophyTimestamp = std::chrono::duration_cast( + std::chrono::system_clock::now().time_since_epoch()) + .count(); if (node.attribute("timestamp").empty()) { node.append_attribute("timestamp") = - std::to_string(trophyTimestamp.tick).c_str(); + std::to_string(trophyTimestamp).c_str(); } else { node.attribute("timestamp") - .set_value(std::to_string(trophyTimestamp.tick).c_str()); + .set_value(std::to_string(trophyTimestamp).c_str()); } std::string trophy_icon_file = "TROP"; @@ -941,7 +942,7 @@ int PS4_SYSV_ABI sceNpTrophyUnlockTrophy(OrbisNpTrophyContext context, OrbisNpTr std::filesystem::path current_icon_path = trophy_dir / "trophy00" / "Icons" / trophy_icon_file; - AddTrophyToQueue(current_icon_path, current_trophy_name); + AddTrophyToQueue(current_icon_path, current_trophy_name, current_trophy_type); } } } @@ -955,15 +956,16 @@ int PS4_SYSV_ABI sceNpTrophyUnlockTrophy(OrbisNpTrophyContext context, OrbisNpTr platinum_node.attribute("unlockstate").set_value("true"); } - Rtc::OrbisRtcTick trophyTimestamp; - Rtc::sceRtcGetCurrentTick(&trophyTimestamp); + auto trophyTimestamp = std::chrono::duration_cast( + std::chrono::system_clock::now().time_since_epoch()) + .count(); if (platinum_node.attribute("timestamp").empty()) { platinum_node.append_attribute("timestamp") = - std::to_string(trophyTimestamp.tick).c_str(); + std::to_string(trophyTimestamp).c_str(); } else { platinum_node.attribute("timestamp") - .set_value(std::to_string(trophyTimestamp.tick).c_str()); + .set_value(std::to_string(trophyTimestamp).c_str()); } int platinum_trophy_id = @@ -978,7 +980,7 @@ int PS4_SYSV_ABI sceNpTrophyUnlockTrophy(OrbisNpTrophyContext context, OrbisNpTr trophy_dir / "trophy00" / "Icons" / platinum_icon_file; *platinumId = platinum_trophy_id; - AddTrophyToQueue(platinum_icon_path, platinum_trophy_name); + AddTrophyToQueue(platinum_icon_path, platinum_trophy_name, "P"); } } diff --git a/src/core/libraries/np_trophy/trophy_ui.cpp b/src/core/libraries/np_trophy/trophy_ui.cpp index 4bb8c8240..3c9f883b3 100644 --- a/src/core/libraries/np_trophy/trophy_ui.cpp +++ b/src/core/libraries/np_trophy/trophy_ui.cpp @@ -2,14 +2,25 @@ // SPDX-License-Identifier: GPL-2.0-or-later #include +#include +#include #include +#include +#include #include + +#ifdef ENABLE_QT_GUI +#include +#endif + #include "common/assert.h" #include "common/config.h" #include "common/singleton.h" #include "imgui/imgui_std.h" #include "trophy_ui.h" +CMRC_DECLARE(res); +namespace fs = std::filesystem; using namespace ImGui; namespace Libraries::NpTrophy { @@ -17,15 +28,80 @@ std::optional current_trophy_ui; std::queue trophy_queue; std::mutex queueMtx; -TrophyUI::TrophyUI(const std::filesystem::path& trophyIconPath, const std::string& trophyName) - : trophy_name(trophyName) { +std::string side = "right"; + +double trophy_timer; + +TrophyUI::TrophyUI(const std::filesystem::path& trophyIconPath, const std::string& trophyName, + const std::string_view& rarity) + : trophy_name(trophyName), trophy_type(rarity) { + + side = Config::sideTrophy(); + + trophy_timer = Config::getTrophyNotificationDuration(); + if (std::filesystem::exists(trophyIconPath)) { trophy_icon = RefCountedTexture::DecodePngFile(trophyIconPath); } else { LOG_ERROR(Lib_NpTrophy, "Couldnt load trophy icon at {}", fmt::UTF(trophyIconPath.u8string())); } + + std::string pathString = "src/images/"; + + if (trophy_type == "P") { + pathString += "platinum.png"; + } else if (trophy_type == "G") { + pathString += "gold.png"; + } else if (trophy_type == "S") { + pathString += "silver.png"; + } else if (trophy_type == "B") { + pathString += "bronze.png"; + } + + const auto CustomTrophy_Dir = Common::FS::GetUserPath(Common::FS::PathType::CustomTrophy); + std::string customPath; + + if (trophy_type == "P" && fs::exists(CustomTrophy_Dir / "platinum.png")) { + customPath = (CustomTrophy_Dir / "platinum.png").string(); + } else if (trophy_type == "G" && fs::exists(CustomTrophy_Dir / "gold.png")) { + customPath = (CustomTrophy_Dir / "gold.png").string(); + } else if (trophy_type == "S" && fs::exists(CustomTrophy_Dir / "silver.png")) { + customPath = (CustomTrophy_Dir / "silver.png").string(); + } else if (trophy_type == "B" && fs::exists(CustomTrophy_Dir / "bronze.png")) { + customPath = (CustomTrophy_Dir / "bronze.png").string(); + } + + std::vector imgdata; + if (!customPath.empty()) { + std::ifstream file(customPath, std::ios::binary); + if (file) { + imgdata = std::vector(std::istreambuf_iterator(file), + std::istreambuf_iterator()); + } else { + LOG_ERROR(Lib_NpTrophy, "Could not open custom file for trophy in {}", customPath); + } + } else { + auto resource = cmrc::res::get_filesystem(); + auto file = resource.open(pathString); + imgdata = std::vector(file.begin(), file.end()); + } + + trophy_type_icon = RefCountedTexture::DecodePngTexture(imgdata); + AddLayer(this); + +#ifdef ENABLE_QT_GUI + QString musicPathWav = QString::fromStdString(CustomTrophy_Dir.string() + "/trophy.wav"); + QString musicPathMp3 = QString::fromStdString(CustomTrophy_Dir.string() + "/trophy.mp3"); + if (fs::exists(musicPathWav.toStdString())) { + BackgroundMusicPlayer::getInstance().setVolume(100); + BackgroundMusicPlayer::getInstance().playMusic(musicPathWav, false); + } else if (fs::exists(musicPathMp3.toStdString())) { + BackgroundMusicPlayer::getInstance().setVolume(100); + BackgroundMusicPlayer::getInstance().playMusic(musicPathMp3, false); + } +#endif } TrophyUI::~TrophyUI() { @@ -36,64 +112,178 @@ void TrophyUI::Finish() { RemoveLayer(this); } +float fade_opacity = 0.0f; // Initial opacity (invisible) +ImVec2 start_pos = ImVec2(1280.0f, 50.0f); // Starts off screen, right +ImVec2 target_pos = ImVec2(0.0f, 50.0f); // Final position +float animation_duration = 0.5f; // Animation duration +float elapsed_time = 0.0f; // Animation time +float fade_out_duration = 0.5f; // Final fade duration + void TrophyUI::Draw() { const auto& io = GetIO(); - float AdjustWidth = io.DisplaySize.x / 1280; - float AdjustHeight = io.DisplaySize.y / 720; + float AdjustWidth = io.DisplaySize.x / 1920; + float AdjustHeight = io.DisplaySize.y / 1080; const ImVec2 window_size{ - std::min(io.DisplaySize.x, (300 * AdjustWidth)), + std::min(io.DisplaySize.x, (350 * AdjustWidth)), std::min(io.DisplaySize.y, (70 * AdjustHeight)), }; + elapsed_time += io.DeltaTime; + float progress = std::min(elapsed_time / animation_duration, 1.0f); + + float final_pos_x, start_x; + float final_pos_y, start_y; + + if (side == "top") { + start_x = (io.DisplaySize.x - window_size.x) * 0.5f; + start_y = -window_size.y; + final_pos_x = start_x; + final_pos_y = 20 * AdjustHeight; + } else if (side == "left") { + start_x = -window_size.x; + start_y = 50 * AdjustHeight; + final_pos_x = 20 * AdjustWidth; + final_pos_y = start_y; + } else if (side == "right") { + start_x = io.DisplaySize.x; + start_y = 50 * AdjustHeight; + final_pos_x = io.DisplaySize.x - window_size.x - 20 * AdjustWidth; + final_pos_y = start_y; + } else if (side == "bottom") { + start_x = (io.DisplaySize.x - window_size.x) * 0.5f; + start_y = io.DisplaySize.y; + final_pos_x = start_x; + final_pos_y = io.DisplaySize.y - window_size.y - 20 * AdjustHeight; + } + + ImVec2 current_pos = ImVec2(start_x + (final_pos_x - start_x) * progress, + start_y + (final_pos_y - start_y) * progress); + + trophy_timer -= io.DeltaTime; + + ImGui::SetNextWindowPos(current_pos); + + // If the remaining time of the trophy is less than or equal to 1 second, the fade-out begins. + if (trophy_timer <= 1.0f) { + float fade_out_time = 1.0f - (trophy_timer / 1.0f); + fade_opacity = 1.0f - fade_out_time; + } else { + // Fade in , 0 to 1 + fade_opacity = progress; + } + + fade_opacity = std::max(0.0f, std::min(fade_opacity, 1.0f)); + SetNextWindowSize(window_size); + SetNextWindowPos(current_pos); SetNextWindowCollapsed(false); - SetNextWindowPos(ImVec2(io.DisplaySize.x - (300 * AdjustWidth), (50 * AdjustHeight))); KeepNavHighlight(); + PushStyleVar(ImGuiStyleVar_Alpha, fade_opacity); + if (Begin("Trophy Window", nullptr, ImGuiWindowFlags_NoDecoration | ImGuiWindowFlags_NoSavedSettings | ImGuiWindowFlags_NoInputs)) { - if (trophy_icon) { - Image(trophy_icon.GetTexture().im_id, ImVec2((50 * AdjustWidth), (50 * AdjustHeight))); + + // Displays the trophy icon + if (trophy_type_icon) { + SetCursorPosY((window_size.y * 0.5f) - (25 * AdjustHeight)); + Image(trophy_type_icon.GetTexture().im_id, + ImVec2((50 * AdjustWidth), (50 * AdjustHeight))); ImGui::SameLine(); } else { - // placeholder + // Placeholder const auto pos = GetCursorScreenPos(); - ImGui::GetWindowDrawList()->AddRectFilled(pos, pos + ImVec2{50.0f}, + ImGui::GetWindowDrawList()->AddRectFilled(pos, pos + ImVec2{50.0f * AdjustHeight}, GetColorU32(ImVec4{0.7f})); ImGui::Indent(60); } - SetWindowFontScale((1.2 * AdjustHeight)); + + // Displays the name of the trophy + const std::string combinedString = "Trophy earned!\n%s" + trophy_name; + const float wrap_width = + CalcWrapWidthForPos(GetCursorScreenPos(), (window_size.x - (60 * AdjustWidth))); + SetWindowFontScale(1.2 * AdjustHeight); + // If trophy name exceeds 1 line + if (CalcTextSize(trophy_name.c_str()).x > wrap_width) { + SetCursorPosY(5 * AdjustHeight); + if (CalcTextSize(trophy_name.c_str()).x > (wrap_width * 2)) { + SetWindowFontScale(0.95 * AdjustHeight); + } else { + SetWindowFontScale(1.1 * AdjustHeight); + } + } else { + const float text_height = ImGui::CalcTextSize(combinedString.c_str()).y; + SetCursorPosY((window_size.y - text_height) * 0.5); + } + + if (side == "top" || side == "bottom") { + float text_width = ImGui::CalcTextSize(trophy_name.c_str()).x; + float centered_x = (window_size.x - text_width) * 0.5f; + ImGui::SetCursorPosX(std::max(centered_x, 10.0f * AdjustWidth)); + } + + ImGui::PushTextWrapPos(window_size.x - (60 * AdjustWidth)); TextWrapped("Trophy earned!\n%s", trophy_name.c_str()); + ImGui::SameLine(window_size.x - (60 * AdjustWidth)); + + // Displays the trophy icon + if (trophy_icon) { + SetCursorPosY((window_size.y * 0.5f) - (25 * AdjustHeight)); + Image(trophy_icon.GetTexture().im_id, ImVec2((50 * AdjustWidth), (50 * AdjustHeight))); + } else { + // Placeholder + const auto pos = GetCursorScreenPos(); + ImGui::GetWindowDrawList()->AddRectFilled(pos, pos + ImVec2{50.0f * AdjustHeight}, + GetColorU32(ImVec4{0.7f})); + } } End(); - trophy_timer -= io.DeltaTime; + PopStyleVar(); + if (trophy_timer <= 0) { std::lock_guard lock(queueMtx); if (!trophy_queue.empty()) { TrophyInfo next_trophy = trophy_queue.front(); trophy_queue.pop(); - current_trophy_ui.emplace(next_trophy.trophy_icon_path, next_trophy.trophy_name); + current_trophy_ui.emplace(next_trophy.trophy_icon_path, next_trophy.trophy_name, + next_trophy.trophy_type); } else { current_trophy_ui.reset(); } } } -void AddTrophyToQueue(const std::filesystem::path& trophyIconPath, const std::string& trophyName) { +void AddTrophyToQueue(const std::filesystem::path& trophyIconPath, const std::string& trophyName, + const std::string_view& rarity) { std::lock_guard lock(queueMtx); if (Config::getisTrophyPopupDisabled()) { return; } else if (current_trophy_ui.has_value()) { - TrophyInfo new_trophy; - new_trophy.trophy_icon_path = trophyIconPath; - new_trophy.trophy_name = trophyName; - trophy_queue.push(new_trophy); - } else { - current_trophy_ui.emplace(trophyIconPath, trophyName); + current_trophy_ui.reset(); + } + + TrophyInfo new_trophy; + new_trophy.trophy_icon_path = trophyIconPath; + new_trophy.trophy_name = trophyName; + new_trophy.trophy_type = rarity; + trophy_queue.push(new_trophy); + + if (!current_trophy_ui.has_value()) { +#ifdef ENABLE_QT_GUI + BackgroundMusicPlayer::getInstance().stopMusic(); +#endif + // Resetting the animation for the next trophy + elapsed_time = 0.0f; // Resetting animation time + fade_opacity = 0.0f; // Starts invisible + start_pos = ImVec2(1280.0f, 50.0f); // Starts off screen, right + TrophyInfo next_trophy = trophy_queue.front(); + trophy_queue.pop(); + current_trophy_ui.emplace(next_trophy.trophy_icon_path, next_trophy.trophy_name, + next_trophy.trophy_type); } } -} // namespace Libraries::NpTrophy \ No newline at end of file +} // namespace Libraries::NpTrophy diff --git a/src/core/libraries/np_trophy/trophy_ui.h b/src/core/libraries/np_trophy/trophy_ui.h index ce7a1c63a..553c99f6f 100644 --- a/src/core/libraries/np_trophy/trophy_ui.h +++ b/src/core/libraries/np_trophy/trophy_ui.h @@ -17,7 +17,8 @@ namespace Libraries::NpTrophy { class TrophyUI final : public ImGui::Layer { public: - TrophyUI(const std::filesystem::path& trophyIconPath, const std::string& trophyName); + TrophyUI(const std::filesystem::path& trophyIconPath, const std::string& trophyName, + const std::string_view& rarity); ~TrophyUI() override; void Finish(); @@ -26,15 +27,18 @@ public: private: std::string trophy_name; - float trophy_timer = 5.0f; + std::string_view trophy_type; ImGui::RefCountedTexture trophy_icon; + ImGui::RefCountedTexture trophy_type_icon; }; struct TrophyInfo { std::filesystem::path trophy_icon_path; std::string trophy_name; + std::string_view trophy_type; }; -void AddTrophyToQueue(const std::filesystem::path& trophyIconPath, const std::string& trophyName); +void AddTrophyToQueue(const std::filesystem::path& trophyIconPath, const std::string& trophyName, + const std::string_view& rarity); -}; // namespace Libraries::NpTrophy \ No newline at end of file +}; // namespace Libraries::NpTrophy diff --git a/src/core/libraries/np_web_api/np_web_api.cpp b/src/core/libraries/np_web_api/np_web_api.cpp new file mode 100644 index 000000000..8a7979978 --- /dev/null +++ b/src/core/libraries/np_web_api/np_web_api.cpp @@ -0,0 +1,692 @@ +// SPDX-FileCopyrightText: Copyright 2024 shadPS4 Emulator Project +// SPDX-License-Identifier: GPL-2.0-or-later + +#include "common/logging/log.h" +#include "core/libraries/error_codes.h" +#include "core/libraries/libs.h" +#include "core/libraries/np_web_api/np_web_api.h" + +namespace Libraries::NpWebApi { + +s32 PS4_SYSV_ABI sceNpWebApiCreateContext() { + LOG_ERROR(Lib_NpWebApi, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI sceNpWebApiCreatePushEventFilter() { + LOG_ERROR(Lib_NpWebApi, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI sceNpWebApiCreateServicePushEventFilter() { + LOG_ERROR(Lib_NpWebApi, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI sceNpWebApiDeletePushEventFilter() { + LOG_ERROR(Lib_NpWebApi, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI sceNpWebApiDeleteServicePushEventFilter() { + LOG_ERROR(Lib_NpWebApi, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI sceNpWebApiRegisterExtdPushEventCallback() { + LOG_ERROR(Lib_NpWebApi, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI sceNpWebApiRegisterNotificationCallback() { + LOG_ERROR(Lib_NpWebApi, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI sceNpWebApiRegisterPushEventCallback() { + LOG_ERROR(Lib_NpWebApi, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI sceNpWebApiRegisterServicePushEventCallback() { + LOG_ERROR(Lib_NpWebApi, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI sceNpWebApiUnregisterNotificationCallback() { + LOG_ERROR(Lib_NpWebApi, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI sceNpWebApiUnregisterPushEventCallback() { + LOG_ERROR(Lib_NpWebApi, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI sceNpWebApiUnregisterServicePushEventCallback() { + LOG_ERROR(Lib_NpWebApi, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI sceNpWebApiAbortHandle() { + LOG_ERROR(Lib_NpWebApi, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI sceNpWebApiAbortRequest() { + LOG_ERROR(Lib_NpWebApi, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI sceNpWebApiAddHttpRequestHeader() { + LOG_ERROR(Lib_NpWebApi, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI sceNpWebApiAddMultipartPart() { + LOG_ERROR(Lib_NpWebApi, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI sceNpWebApiCheckTimeout() { + LOG_ERROR(Lib_NpWebApi, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI sceNpWebApiClearAllUnusedConnection() { + LOG_ERROR(Lib_NpWebApi, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI sceNpWebApiClearUnusedConnection() { + LOG_ERROR(Lib_NpWebApi, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI sceNpWebApiCreateContextA() { + LOG_ERROR(Lib_NpWebApi, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI sceNpWebApiCreateExtdPushEventFilter() { + LOG_ERROR(Lib_NpWebApi, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI sceNpWebApiCreateHandle() { + LOG_ERROR(Lib_NpWebApi, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI sceNpWebApiCreateMultipartRequest() { + LOG_ERROR(Lib_NpWebApi, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI sceNpWebApiCreateRequest() { + LOG_ERROR(Lib_NpWebApi, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI sceNpWebApiDeleteContext() { + LOG_ERROR(Lib_NpWebApi, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI sceNpWebApiDeleteExtdPushEventFilter() { + LOG_ERROR(Lib_NpWebApi, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI sceNpWebApiDeleteHandle() { + LOG_ERROR(Lib_NpWebApi, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI sceNpWebApiDeleteRequest() { + LOG_ERROR(Lib_NpWebApi, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI sceNpWebApiGetConnectionStats() { + LOG_ERROR(Lib_NpWebApi, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI sceNpWebApiGetErrorCode() { + LOG_ERROR(Lib_NpWebApi, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI sceNpWebApiGetHttpResponseHeaderValue() { + LOG_ERROR(Lib_NpWebApi, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI sceNpWebApiGetHttpResponseHeaderValueLength() { + LOG_ERROR(Lib_NpWebApi, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI sceNpWebApiGetHttpStatusCode() { + LOG_ERROR(Lib_NpWebApi, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI sceNpWebApiGetMemoryPoolStats() { + LOG_ERROR(Lib_NpWebApi, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI sceNpWebApiInitialize() { + LOG_ERROR(Lib_NpWebApi, "(DUMMY) called"); + static s32 id = 0; + return ++id; +} + +s32 PS4_SYSV_ABI sceNpWebApiInitializeForPresence() { + LOG_ERROR(Lib_NpWebApi, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI sceNpWebApiIntCreateCtxIndExtdPushEventFilter() { + LOG_ERROR(Lib_NpWebApi, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI sceNpWebApiIntCreateRequest() { + LOG_ERROR(Lib_NpWebApi, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI sceNpWebApiIntCreateServicePushEventFilter() { + LOG_ERROR(Lib_NpWebApi, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI sceNpWebApiIntInitialize() { + LOG_ERROR(Lib_NpWebApi, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI sceNpWebApiIntRegisterServicePushEventCallback() { + LOG_ERROR(Lib_NpWebApi, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI sceNpWebApiIntRegisterServicePushEventCallbackA() { + LOG_ERROR(Lib_NpWebApi, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI sceNpWebApiReadData() { + LOG_ERROR(Lib_NpWebApi, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI sceNpWebApiRegisterExtdPushEventCallbackA() { + LOG_ERROR(Lib_NpWebApi, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI sceNpWebApiSendMultipartRequest() { + LOG_ERROR(Lib_NpWebApi, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI sceNpWebApiSendMultipartRequest2() { + LOG_ERROR(Lib_NpWebApi, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI sceNpWebApiSendRequest() { + LOG_ERROR(Lib_NpWebApi, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI sceNpWebApiSendRequest2() { + LOG_ERROR(Lib_NpWebApi, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI sceNpWebApiSetHandleTimeout() { + LOG_ERROR(Lib_NpWebApi, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI sceNpWebApiSetMaxConnection() { + LOG_ERROR(Lib_NpWebApi, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI sceNpWebApiSetMultipartContentType() { + LOG_ERROR(Lib_NpWebApi, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI sceNpWebApiSetRequestTimeout() { + LOG_ERROR(Lib_NpWebApi, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI sceNpWebApiTerminate() { + LOG_ERROR(Lib_NpWebApi, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI sceNpWebApiUnregisterExtdPushEventCallback() { + LOG_ERROR(Lib_NpWebApi, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI sceNpWebApiUtilityParseNpId() { + LOG_ERROR(Lib_NpWebApi, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI sceNpWebApiVshInitialize() { + LOG_ERROR(Lib_NpWebApi, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI Func_064C4ED1EDBEB9E8() { + LOG_ERROR(Lib_NpWebApi, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI Func_0783955D4E9563DA() { + LOG_ERROR(Lib_NpWebApi, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI Func_1A6D77F3FD8323A8() { + LOG_ERROR(Lib_NpWebApi, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI Func_1E0693A26FE0F954() { + LOG_ERROR(Lib_NpWebApi, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI Func_24A9B5F1D77000CF() { + LOG_ERROR(Lib_NpWebApi, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI Func_24AAA6F50E4C2361() { + LOG_ERROR(Lib_NpWebApi, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI Func_24D8853D6B47FC79() { + LOG_ERROR(Lib_NpWebApi, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI Func_279B3E9C7C4A9DC5() { + LOG_ERROR(Lib_NpWebApi, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI Func_28461E29E9F8D697() { + LOG_ERROR(Lib_NpWebApi, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI Func_3C29624704FAB9E0() { + LOG_ERROR(Lib_NpWebApi, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI Func_3F027804ED2EC11E() { + LOG_ERROR(Lib_NpWebApi, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI Func_4066C94E782997CD() { + LOG_ERROR(Lib_NpWebApi, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI Func_47C85356815DBE90() { + LOG_ERROR(Lib_NpWebApi, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI Func_4FCE8065437E3B87() { + LOG_ERROR(Lib_NpWebApi, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI Func_536280BE3DABB521() { + LOG_ERROR(Lib_NpWebApi, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI Func_57A0E1BC724219F3() { + LOG_ERROR(Lib_NpWebApi, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI Func_5819749C040B6637() { + LOG_ERROR(Lib_NpWebApi, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI Func_6198D0C825E86319() { + LOG_ERROR(Lib_NpWebApi, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI Func_61F2B9E8AB093743() { + LOG_ERROR(Lib_NpWebApi, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI Func_6BC388E6113F0D44() { + LOG_ERROR(Lib_NpWebApi, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI Func_7500F0C4F8DC2D16() { + LOG_ERROR(Lib_NpWebApi, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI Func_75A03814C7E9039F() { + LOG_ERROR(Lib_NpWebApi, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI Func_789D6026C521416E() { + LOG_ERROR(Lib_NpWebApi, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI Func_7DED63D06399EFFF() { + LOG_ERROR(Lib_NpWebApi, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI Func_7E55A2DCC03D395A() { + LOG_ERROR(Lib_NpWebApi, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI Func_7E6C8F9FB86967F4() { + LOG_ERROR(Lib_NpWebApi, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI Func_7F04B7D4A7D41E80() { + LOG_ERROR(Lib_NpWebApi, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI Func_8E167252DFA5C957() { + LOG_ERROR(Lib_NpWebApi, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI Func_95D0046E504E3B09() { + LOG_ERROR(Lib_NpWebApi, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI Func_97284BFDA4F18FDF() { + LOG_ERROR(Lib_NpWebApi, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI Func_99E32C1F4737EAB4() { + LOG_ERROR(Lib_NpWebApi, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI Func_9CFF661EA0BCBF83() { + LOG_ERROR(Lib_NpWebApi, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI Func_9EB0E1F467AC3B29() { + LOG_ERROR(Lib_NpWebApi, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI Func_A2318FE6FBABFAA3() { + LOG_ERROR(Lib_NpWebApi, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI Func_BA07A2E1BF7B3971() { + LOG_ERROR(Lib_NpWebApi, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI Func_BD0803EEE0CC29A0() { + LOG_ERROR(Lib_NpWebApi, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI Func_BE6F4E5524BB135F() { + LOG_ERROR(Lib_NpWebApi, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI Func_C0D490EB481EA4D0() { + LOG_ERROR(Lib_NpWebApi, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI Func_C175D392CA6D084A() { + LOG_ERROR(Lib_NpWebApi, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI Func_CD0136AF165D2F2F() { + LOG_ERROR(Lib_NpWebApi, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI Func_D1C0ADB7B52FEAB5() { + LOG_ERROR(Lib_NpWebApi, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI Func_E324765D18EE4D12() { + LOG_ERROR(Lib_NpWebApi, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI Func_E789F980D907B653() { + LOG_ERROR(Lib_NpWebApi, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI Func_F9A32E8685627436() { + LOG_ERROR(Lib_NpWebApi, "(STUBBED) called"); + return ORBIS_OK; +} + +void RegisterlibSceNpWebApi(Core::Loader::SymbolsResolver* sym) { + LIB_FUNCTION("x1Y7yiYSk7c", "libSceNpWebApiCompat", 1, "libSceNpWebApi", 1, 1, + sceNpWebApiCreateContext); + LIB_FUNCTION("y5Ta5JCzQHY", "libSceNpWebApiCompat", 1, "libSceNpWebApi", 1, 1, + sceNpWebApiCreatePushEventFilter); + LIB_FUNCTION("sIFx734+xys", "libSceNpWebApiCompat", 1, "libSceNpWebApi", 1, 1, + sceNpWebApiCreateServicePushEventFilter); + LIB_FUNCTION("zE+R6Rcx3W0", "libSceNpWebApiCompat", 1, "libSceNpWebApi", 1, 1, + sceNpWebApiDeletePushEventFilter); + LIB_FUNCTION("PfQ+f6ws764", "libSceNpWebApiCompat", 1, "libSceNpWebApi", 1, 1, + sceNpWebApiDeleteServicePushEventFilter); + LIB_FUNCTION("vrM02A5Gy1M", "libSceNpWebApiCompat", 1, "libSceNpWebApi", 1, 1, + sceNpWebApiRegisterExtdPushEventCallback); + LIB_FUNCTION("HVgWmGIOKdk", "libSceNpWebApiCompat", 1, "libSceNpWebApi", 1, 1, + sceNpWebApiRegisterNotificationCallback); + LIB_FUNCTION("PfSTDCgNMgc", "libSceNpWebApiCompat", 1, "libSceNpWebApi", 1, 1, + sceNpWebApiRegisterPushEventCallback); + LIB_FUNCTION("kJQJE0uKm5w", "libSceNpWebApiCompat", 1, "libSceNpWebApi", 1, 1, + sceNpWebApiRegisterServicePushEventCallback); + LIB_FUNCTION("wjYEvo4xbcA", "libSceNpWebApiCompat", 1, "libSceNpWebApi", 1, 1, + sceNpWebApiUnregisterNotificationCallback); + LIB_FUNCTION("qK4o2656W4w", "libSceNpWebApiCompat", 1, "libSceNpWebApi", 1, 1, + sceNpWebApiUnregisterPushEventCallback); + LIB_FUNCTION("2edrkr0c-wg", "libSceNpWebApiCompat", 1, "libSceNpWebApi", 1, 1, + sceNpWebApiUnregisterServicePushEventCallback); + LIB_FUNCTION("WKcm4PeyJww", "libSceNpWebApi", 1, "libSceNpWebApi", 1, 1, + sceNpWebApiAbortHandle); + LIB_FUNCTION("JzhYTP2fG18", "libSceNpWebApi", 1, "libSceNpWebApi", 1, 1, + sceNpWebApiAbortRequest); + LIB_FUNCTION("joRjtRXTFoc", "libSceNpWebApi", 1, "libSceNpWebApi", 1, 1, + sceNpWebApiAddHttpRequestHeader); + LIB_FUNCTION("19KgfJXgM+U", "libSceNpWebApi", 1, "libSceNpWebApi", 1, 1, + sceNpWebApiAddMultipartPart); + LIB_FUNCTION("gVNNyxf-1Sg", "libSceNpWebApi", 1, "libSceNpWebApi", 1, 1, + sceNpWebApiCheckTimeout); + LIB_FUNCTION("KQIkDGf80PQ", "libSceNpWebApi", 1, "libSceNpWebApi", 1, 1, + sceNpWebApiClearAllUnusedConnection); + LIB_FUNCTION("f-pgaNSd1zc", "libSceNpWebApi", 1, "libSceNpWebApi", 1, 1, + sceNpWebApiClearUnusedConnection); + LIB_FUNCTION("x1Y7yiYSk7c", "libSceNpWebApi", 1, "libSceNpWebApi", 1, 1, + sceNpWebApiCreateContext); + LIB_FUNCTION("zk6c65xoyO0", "libSceNpWebApi", 1, "libSceNpWebApi", 1, 1, + sceNpWebApiCreateContextA); + LIB_FUNCTION("M2BUB+DNEGE", "libSceNpWebApi", 1, "libSceNpWebApi", 1, 1, + sceNpWebApiCreateExtdPushEventFilter); + LIB_FUNCTION("79M-JqvvGo0", "libSceNpWebApi", 1, "libSceNpWebApi", 1, 1, + sceNpWebApiCreateHandle); + LIB_FUNCTION("KBxgeNpoRIQ", "libSceNpWebApi", 1, "libSceNpWebApi", 1, 1, + sceNpWebApiCreateMultipartRequest); + LIB_FUNCTION("y5Ta5JCzQHY", "libSceNpWebApi", 1, "libSceNpWebApi", 1, 1, + sceNpWebApiCreatePushEventFilter); + LIB_FUNCTION("rdgs5Z1MyFw", "libSceNpWebApi", 1, "libSceNpWebApi", 1, 1, + sceNpWebApiCreateRequest); + LIB_FUNCTION("sIFx734+xys", "libSceNpWebApi", 1, "libSceNpWebApi", 1, 1, + sceNpWebApiCreateServicePushEventFilter); + LIB_FUNCTION("XUjdsSTTZ3U", "libSceNpWebApi", 1, "libSceNpWebApi", 1, 1, + sceNpWebApiDeleteContext); + LIB_FUNCTION("pfaJtb7SQ80", "libSceNpWebApi", 1, "libSceNpWebApi", 1, 1, + sceNpWebApiDeleteExtdPushEventFilter); + LIB_FUNCTION("5Mn7TYwpl30", "libSceNpWebApi", 1, "libSceNpWebApi", 1, 1, + sceNpWebApiDeleteHandle); + LIB_FUNCTION("zE+R6Rcx3W0", "libSceNpWebApi", 1, "libSceNpWebApi", 1, 1, + sceNpWebApiDeletePushEventFilter); + LIB_FUNCTION("noQgleu+KLE", "libSceNpWebApi", 1, "libSceNpWebApi", 1, 1, + sceNpWebApiDeleteRequest); + LIB_FUNCTION("PfQ+f6ws764", "libSceNpWebApi", 1, "libSceNpWebApi", 1, 1, + sceNpWebApiDeleteServicePushEventFilter); + LIB_FUNCTION("UJ8H+7kVQUE", "libSceNpWebApi", 1, "libSceNpWebApi", 1, 1, + sceNpWebApiGetConnectionStats); + LIB_FUNCTION("2qSZ0DgwTsc", "libSceNpWebApi", 1, "libSceNpWebApi", 1, 1, + sceNpWebApiGetErrorCode); + LIB_FUNCTION("VwJ5L0Higg0", "libSceNpWebApi", 1, "libSceNpWebApi", 1, 1, + sceNpWebApiGetHttpResponseHeaderValue); + LIB_FUNCTION("743ZzEBzlV8", "libSceNpWebApi", 1, "libSceNpWebApi", 1, 1, + sceNpWebApiGetHttpResponseHeaderValueLength); + LIB_FUNCTION("k210oKgP80Y", "libSceNpWebApi", 1, "libSceNpWebApi", 1, 1, + sceNpWebApiGetHttpStatusCode); + LIB_FUNCTION("3OnubUs02UM", "libSceNpWebApi", 1, "libSceNpWebApi", 1, 1, + sceNpWebApiGetMemoryPoolStats); + LIB_FUNCTION("G3AnLNdRBjE", "libSceNpWebApi", 1, "libSceNpWebApi", 1, 1, sceNpWebApiInitialize); + LIB_FUNCTION("FkuwsD64zoQ", "libSceNpWebApi", 1, "libSceNpWebApi", 1, 1, + sceNpWebApiInitializeForPresence); + LIB_FUNCTION("c1pKoztonB8", "libSceNpWebApi", 1, "libSceNpWebApi", 1, 1, + sceNpWebApiIntCreateCtxIndExtdPushEventFilter); + LIB_FUNCTION("N2Jbx4tIaQ4", "libSceNpWebApi", 1, "libSceNpWebApi", 1, 1, + sceNpWebApiIntCreateRequest); + LIB_FUNCTION("TZSep4xB4EY", "libSceNpWebApi", 1, "libSceNpWebApi", 1, 1, + sceNpWebApiIntCreateServicePushEventFilter); + LIB_FUNCTION("8Vjplhyyc44", "libSceNpWebApi", 1, "libSceNpWebApi", 1, 1, + sceNpWebApiIntInitialize); + LIB_FUNCTION("VjVukb2EWPc", "libSceNpWebApi", 1, "libSceNpWebApi", 1, 1, + sceNpWebApiIntRegisterServicePushEventCallback); + LIB_FUNCTION("sfq23ZVHVEw", "libSceNpWebApi", 1, "libSceNpWebApi", 1, 1, + sceNpWebApiIntRegisterServicePushEventCallbackA); + LIB_FUNCTION("CQtPRSF6Ds8", "libSceNpWebApi", 1, "libSceNpWebApi", 1, 1, sceNpWebApiReadData); + LIB_FUNCTION("vrM02A5Gy1M", "libSceNpWebApi", 1, "libSceNpWebApi", 1, 1, + sceNpWebApiRegisterExtdPushEventCallback); + LIB_FUNCTION("jhXKGQJ4egI", "libSceNpWebApi", 1, "libSceNpWebApi", 1, 1, + sceNpWebApiRegisterExtdPushEventCallbackA); + LIB_FUNCTION("HVgWmGIOKdk", "libSceNpWebApi", 1, "libSceNpWebApi", 1, 1, + sceNpWebApiRegisterNotificationCallback); + LIB_FUNCTION("PfSTDCgNMgc", "libSceNpWebApi", 1, "libSceNpWebApi", 1, 1, + sceNpWebApiRegisterPushEventCallback); + LIB_FUNCTION("kJQJE0uKm5w", "libSceNpWebApi", 1, "libSceNpWebApi", 1, 1, + sceNpWebApiRegisterServicePushEventCallback); + LIB_FUNCTION("KCItz6QkeGs", "libSceNpWebApi", 1, "libSceNpWebApi", 1, 1, + sceNpWebApiSendMultipartRequest); + LIB_FUNCTION("DsPOTEvSe7M", "libSceNpWebApi", 1, "libSceNpWebApi", 1, 1, + sceNpWebApiSendMultipartRequest2); + LIB_FUNCTION("kVbL4hL3K7w", "libSceNpWebApi", 1, "libSceNpWebApi", 1, 1, + sceNpWebApiSendRequest); + LIB_FUNCTION("KjNeZ-29ysQ", "libSceNpWebApi", 1, "libSceNpWebApi", 1, 1, + sceNpWebApiSendRequest2); + LIB_FUNCTION("6g6q-g1i4XU", "libSceNpWebApi", 1, "libSceNpWebApi", 1, 1, + sceNpWebApiSetHandleTimeout); + LIB_FUNCTION("gRiilVCvfAI", "libSceNpWebApi", 1, "libSceNpWebApi", 1, 1, + sceNpWebApiSetMaxConnection); + LIB_FUNCTION("i0dr6grIZyc", "libSceNpWebApi", 1, "libSceNpWebApi", 1, 1, + sceNpWebApiSetMultipartContentType); + LIB_FUNCTION("qWcbJkBj1Lg", "libSceNpWebApi", 1, "libSceNpWebApi", 1, 1, + sceNpWebApiSetRequestTimeout); + LIB_FUNCTION("asz3TtIqGF8", "libSceNpWebApi", 1, "libSceNpWebApi", 1, 1, sceNpWebApiTerminate); + LIB_FUNCTION("PqCY25FMzPs", "libSceNpWebApi", 1, "libSceNpWebApi", 1, 1, + sceNpWebApiUnregisterExtdPushEventCallback); + LIB_FUNCTION("wjYEvo4xbcA", "libSceNpWebApi", 1, "libSceNpWebApi", 1, 1, + sceNpWebApiUnregisterNotificationCallback); + LIB_FUNCTION("qK4o2656W4w", "libSceNpWebApi", 1, "libSceNpWebApi", 1, 1, + sceNpWebApiUnregisterPushEventCallback); + LIB_FUNCTION("2edrkr0c-wg", "libSceNpWebApi", 1, "libSceNpWebApi", 1, 1, + sceNpWebApiUnregisterServicePushEventCallback); + LIB_FUNCTION("or0e885BlXo", "libSceNpWebApi", 1, "libSceNpWebApi", 1, 1, + sceNpWebApiUtilityParseNpId); + LIB_FUNCTION("uRsskUhAfnM", "libSceNpWebApi", 1, "libSceNpWebApi", 1, 1, + sceNpWebApiVshInitialize); + LIB_FUNCTION("BkxO0e2+ueg", "libSceNpWebApi", 1, "libSceNpWebApi", 1, 1, Func_064C4ED1EDBEB9E8); + LIB_FUNCTION("B4OVXU6VY9o", "libSceNpWebApi", 1, "libSceNpWebApi", 1, 1, Func_0783955D4E9563DA); + LIB_FUNCTION("Gm138-2DI6g", "libSceNpWebApi", 1, "libSceNpWebApi", 1, 1, Func_1A6D77F3FD8323A8); + LIB_FUNCTION("HgaTom-g+VQ", "libSceNpWebApi", 1, "libSceNpWebApi", 1, 1, Func_1E0693A26FE0F954); + LIB_FUNCTION("JKm18ddwAM8", "libSceNpWebApi", 1, "libSceNpWebApi", 1, 1, Func_24A9B5F1D77000CF); + LIB_FUNCTION("JKqm9Q5MI2E", "libSceNpWebApi", 1, "libSceNpWebApi", 1, 1, Func_24AAA6F50E4C2361); + LIB_FUNCTION("JNiFPWtH-Hk", "libSceNpWebApi", 1, "libSceNpWebApi", 1, 1, Func_24D8853D6B47FC79); + LIB_FUNCTION("J5s+nHxKncU", "libSceNpWebApi", 1, "libSceNpWebApi", 1, 1, Func_279B3E9C7C4A9DC5); + LIB_FUNCTION("KEYeKen41pc", "libSceNpWebApi", 1, "libSceNpWebApi", 1, 1, Func_28461E29E9F8D697); + LIB_FUNCTION("PCliRwT6ueA", "libSceNpWebApi", 1, "libSceNpWebApi", 1, 1, Func_3C29624704FAB9E0); + LIB_FUNCTION("PwJ4BO0uwR4", "libSceNpWebApi", 1, "libSceNpWebApi", 1, 1, Func_3F027804ED2EC11E); + LIB_FUNCTION("QGbJTngpl80", "libSceNpWebApi", 1, "libSceNpWebApi", 1, 1, Func_4066C94E782997CD); + LIB_FUNCTION("R8hTVoFdvpA", "libSceNpWebApi", 1, "libSceNpWebApi", 1, 1, Func_47C85356815DBE90); + LIB_FUNCTION("T86AZUN+O4c", "libSceNpWebApi", 1, "libSceNpWebApi", 1, 1, Func_4FCE8065437E3B87); + LIB_FUNCTION("U2KAvj2rtSE", "libSceNpWebApi", 1, "libSceNpWebApi", 1, 1, Func_536280BE3DABB521); + LIB_FUNCTION("V6DhvHJCGfM", "libSceNpWebApi", 1, "libSceNpWebApi", 1, 1, Func_57A0E1BC724219F3); + LIB_FUNCTION("WBl0nAQLZjc", "libSceNpWebApi", 1, "libSceNpWebApi", 1, 1, Func_5819749C040B6637); + LIB_FUNCTION("YZjQyCXoYxk", "libSceNpWebApi", 1, "libSceNpWebApi", 1, 1, Func_6198D0C825E86319); + LIB_FUNCTION("YfK56KsJN0M", "libSceNpWebApi", 1, "libSceNpWebApi", 1, 1, Func_61F2B9E8AB093743); + LIB_FUNCTION("a8OI5hE-DUQ", "libSceNpWebApi", 1, "libSceNpWebApi", 1, 1, Func_6BC388E6113F0D44); + LIB_FUNCTION("dQDwxPjcLRY", "libSceNpWebApi", 1, "libSceNpWebApi", 1, 1, Func_7500F0C4F8DC2D16); + LIB_FUNCTION("daA4FMfpA58", "libSceNpWebApi", 1, "libSceNpWebApi", 1, 1, Func_75A03814C7E9039F); + LIB_FUNCTION("eJ1gJsUhQW4", "libSceNpWebApi", 1, "libSceNpWebApi", 1, 1, Func_789D6026C521416E); + LIB_FUNCTION("fe1j0GOZ7-8", "libSceNpWebApi", 1, "libSceNpWebApi", 1, 1, Func_7DED63D06399EFFF); + LIB_FUNCTION("flWi3MA9OVo", "libSceNpWebApi", 1, "libSceNpWebApi", 1, 1, Func_7E55A2DCC03D395A); + LIB_FUNCTION("fmyPn7hpZ-Q", "libSceNpWebApi", 1, "libSceNpWebApi", 1, 1, Func_7E6C8F9FB86967F4); + LIB_FUNCTION("fwS31KfUHoA", "libSceNpWebApi", 1, "libSceNpWebApi", 1, 1, Func_7F04B7D4A7D41E80); + LIB_FUNCTION("jhZyUt+lyVc", "libSceNpWebApi", 1, "libSceNpWebApi", 1, 1, Func_8E167252DFA5C957); + LIB_FUNCTION("ldAEblBOOwk", "libSceNpWebApi", 1, "libSceNpWebApi", 1, 1, Func_95D0046E504E3B09); + LIB_FUNCTION("lyhL-aTxj98", "libSceNpWebApi", 1, "libSceNpWebApi", 1, 1, Func_97284BFDA4F18FDF); + LIB_FUNCTION("meMsH0c36rQ", "libSceNpWebApi", 1, "libSceNpWebApi", 1, 1, Func_99E32C1F4737EAB4); + LIB_FUNCTION("nP9mHqC8v4M", "libSceNpWebApi", 1, "libSceNpWebApi", 1, 1, Func_9CFF661EA0BCBF83); + LIB_FUNCTION("nrDh9GesOyk", "libSceNpWebApi", 1, "libSceNpWebApi", 1, 1, Func_9EB0E1F467AC3B29); + LIB_FUNCTION("ojGP5vur+qM", "libSceNpWebApi", 1, "libSceNpWebApi", 1, 1, Func_A2318FE6FBABFAA3); + LIB_FUNCTION("ugei4b97OXE", "libSceNpWebApi", 1, "libSceNpWebApi", 1, 1, Func_BA07A2E1BF7B3971); + LIB_FUNCTION("vQgD7uDMKaA", "libSceNpWebApi", 1, "libSceNpWebApi", 1, 1, Func_BD0803EEE0CC29A0); + LIB_FUNCTION("vm9OVSS7E18", "libSceNpWebApi", 1, "libSceNpWebApi", 1, 1, Func_BE6F4E5524BB135F); + LIB_FUNCTION("wNSQ60gepNA", "libSceNpWebApi", 1, "libSceNpWebApi", 1, 1, Func_C0D490EB481EA4D0); + LIB_FUNCTION("wXXTksptCEo", "libSceNpWebApi", 1, "libSceNpWebApi", 1, 1, Func_C175D392CA6D084A); + LIB_FUNCTION("zQE2rxZdLy8", "libSceNpWebApi", 1, "libSceNpWebApi", 1, 1, Func_CD0136AF165D2F2F); + LIB_FUNCTION("0cCtt7Uv6rU", "libSceNpWebApi", 1, "libSceNpWebApi", 1, 1, Func_D1C0ADB7B52FEAB5); + LIB_FUNCTION("4yR2XRjuTRI", "libSceNpWebApi", 1, "libSceNpWebApi", 1, 1, Func_E324765D18EE4D12); + LIB_FUNCTION("54n5gNkHtlM", "libSceNpWebApi", 1, "libSceNpWebApi", 1, 1, Func_E789F980D907B653); + LIB_FUNCTION("+aMuhoVidDY", "libSceNpWebApi", 1, "libSceNpWebApi", 1, 1, Func_F9A32E8685627436); +}; + +} // namespace Libraries::NpWebApi \ No newline at end of file diff --git a/src/core/libraries/np_web_api/np_web_api.h b/src/core/libraries/np_web_api/np_web_api.h new file mode 100644 index 000000000..cc007394f --- /dev/null +++ b/src/core/libraries/np_web_api/np_web_api.h @@ -0,0 +1,116 @@ +// SPDX-FileCopyrightText: Copyright 2024 shadPS4 Emulator Project +// SPDX-License-Identifier: GPL-2.0-or-later + +#pragma once + +#include "common/types.h" + +namespace Core::Loader { +class SymbolsResolver; +} + +namespace Libraries::NpWebApi { + +s32 PS4_SYSV_ABI sceNpWebApiCreateContext(); +s32 PS4_SYSV_ABI sceNpWebApiCreatePushEventFilter(); +s32 PS4_SYSV_ABI sceNpWebApiCreateServicePushEventFilter(); +s32 PS4_SYSV_ABI sceNpWebApiDeletePushEventFilter(); +s32 PS4_SYSV_ABI sceNpWebApiDeleteServicePushEventFilter(); +s32 PS4_SYSV_ABI sceNpWebApiRegisterExtdPushEventCallback(); +s32 PS4_SYSV_ABI sceNpWebApiRegisterNotificationCallback(); +s32 PS4_SYSV_ABI sceNpWebApiRegisterPushEventCallback(); +s32 PS4_SYSV_ABI sceNpWebApiRegisterServicePushEventCallback(); +s32 PS4_SYSV_ABI sceNpWebApiUnregisterNotificationCallback(); +s32 PS4_SYSV_ABI sceNpWebApiUnregisterPushEventCallback(); +s32 PS4_SYSV_ABI sceNpWebApiUnregisterServicePushEventCallback(); +s32 PS4_SYSV_ABI sceNpWebApiAbortHandle(); +s32 PS4_SYSV_ABI sceNpWebApiAbortRequest(); +s32 PS4_SYSV_ABI sceNpWebApiAddHttpRequestHeader(); +s32 PS4_SYSV_ABI sceNpWebApiAddMultipartPart(); +s32 PS4_SYSV_ABI sceNpWebApiCheckTimeout(); +s32 PS4_SYSV_ABI sceNpWebApiClearAllUnusedConnection(); +s32 PS4_SYSV_ABI sceNpWebApiClearUnusedConnection(); +s32 PS4_SYSV_ABI sceNpWebApiCreateContextA(); +s32 PS4_SYSV_ABI sceNpWebApiCreateExtdPushEventFilter(); +s32 PS4_SYSV_ABI sceNpWebApiCreateHandle(); +s32 PS4_SYSV_ABI sceNpWebApiCreateMultipartRequest(); +s32 PS4_SYSV_ABI sceNpWebApiCreateRequest(); +s32 PS4_SYSV_ABI sceNpWebApiDeleteContext(); +s32 PS4_SYSV_ABI sceNpWebApiDeleteExtdPushEventFilter(); +s32 PS4_SYSV_ABI sceNpWebApiDeleteHandle(); +s32 PS4_SYSV_ABI sceNpWebApiDeleteRequest(); +s32 PS4_SYSV_ABI sceNpWebApiGetConnectionStats(); +s32 PS4_SYSV_ABI sceNpWebApiGetErrorCode(); +s32 PS4_SYSV_ABI sceNpWebApiGetHttpResponseHeaderValue(); +s32 PS4_SYSV_ABI sceNpWebApiGetHttpResponseHeaderValueLength(); +s32 PS4_SYSV_ABI sceNpWebApiGetHttpStatusCode(); +s32 PS4_SYSV_ABI sceNpWebApiGetMemoryPoolStats(); +s32 PS4_SYSV_ABI sceNpWebApiInitialize(); +s32 PS4_SYSV_ABI sceNpWebApiInitializeForPresence(); +s32 PS4_SYSV_ABI sceNpWebApiIntCreateCtxIndExtdPushEventFilter(); +s32 PS4_SYSV_ABI sceNpWebApiIntCreateRequest(); +s32 PS4_SYSV_ABI sceNpWebApiIntCreateServicePushEventFilter(); +s32 PS4_SYSV_ABI sceNpWebApiIntInitialize(); +s32 PS4_SYSV_ABI sceNpWebApiIntRegisterServicePushEventCallback(); +s32 PS4_SYSV_ABI sceNpWebApiIntRegisterServicePushEventCallbackA(); +s32 PS4_SYSV_ABI sceNpWebApiReadData(); +s32 PS4_SYSV_ABI sceNpWebApiRegisterExtdPushEventCallbackA(); +s32 PS4_SYSV_ABI sceNpWebApiSendMultipartRequest(); +s32 PS4_SYSV_ABI sceNpWebApiSendMultipartRequest2(); +s32 PS4_SYSV_ABI sceNpWebApiSendRequest(); +s32 PS4_SYSV_ABI sceNpWebApiSendRequest2(); +s32 PS4_SYSV_ABI sceNpWebApiSetHandleTimeout(); +s32 PS4_SYSV_ABI sceNpWebApiSetMaxConnection(); +s32 PS4_SYSV_ABI sceNpWebApiSetMultipartContentType(); +s32 PS4_SYSV_ABI sceNpWebApiSetRequestTimeout(); +s32 PS4_SYSV_ABI sceNpWebApiTerminate(); +s32 PS4_SYSV_ABI sceNpWebApiUnregisterExtdPushEventCallback(); +s32 PS4_SYSV_ABI sceNpWebApiUtilityParseNpId(); +s32 PS4_SYSV_ABI sceNpWebApiVshInitialize(); +s32 PS4_SYSV_ABI Func_064C4ED1EDBEB9E8(); +s32 PS4_SYSV_ABI Func_0783955D4E9563DA(); +s32 PS4_SYSV_ABI Func_1A6D77F3FD8323A8(); +s32 PS4_SYSV_ABI Func_1E0693A26FE0F954(); +s32 PS4_SYSV_ABI Func_24A9B5F1D77000CF(); +s32 PS4_SYSV_ABI Func_24AAA6F50E4C2361(); +s32 PS4_SYSV_ABI Func_24D8853D6B47FC79(); +s32 PS4_SYSV_ABI Func_279B3E9C7C4A9DC5(); +s32 PS4_SYSV_ABI Func_28461E29E9F8D697(); +s32 PS4_SYSV_ABI Func_3C29624704FAB9E0(); +s32 PS4_SYSV_ABI Func_3F027804ED2EC11E(); +s32 PS4_SYSV_ABI Func_4066C94E782997CD(); +s32 PS4_SYSV_ABI Func_47C85356815DBE90(); +s32 PS4_SYSV_ABI Func_4FCE8065437E3B87(); +s32 PS4_SYSV_ABI Func_536280BE3DABB521(); +s32 PS4_SYSV_ABI Func_57A0E1BC724219F3(); +s32 PS4_SYSV_ABI Func_5819749C040B6637(); +s32 PS4_SYSV_ABI Func_6198D0C825E86319(); +s32 PS4_SYSV_ABI Func_61F2B9E8AB093743(); +s32 PS4_SYSV_ABI Func_6BC388E6113F0D44(); +s32 PS4_SYSV_ABI Func_7500F0C4F8DC2D16(); +s32 PS4_SYSV_ABI Func_75A03814C7E9039F(); +s32 PS4_SYSV_ABI Func_789D6026C521416E(); +s32 PS4_SYSV_ABI Func_7DED63D06399EFFF(); +s32 PS4_SYSV_ABI Func_7E55A2DCC03D395A(); +s32 PS4_SYSV_ABI Func_7E6C8F9FB86967F4(); +s32 PS4_SYSV_ABI Func_7F04B7D4A7D41E80(); +s32 PS4_SYSV_ABI Func_8E167252DFA5C957(); +s32 PS4_SYSV_ABI Func_95D0046E504E3B09(); +s32 PS4_SYSV_ABI Func_97284BFDA4F18FDF(); +s32 PS4_SYSV_ABI Func_99E32C1F4737EAB4(); +s32 PS4_SYSV_ABI Func_9CFF661EA0BCBF83(); +s32 PS4_SYSV_ABI Func_9EB0E1F467AC3B29(); +s32 PS4_SYSV_ABI Func_A2318FE6FBABFAA3(); +s32 PS4_SYSV_ABI Func_BA07A2E1BF7B3971(); +s32 PS4_SYSV_ABI Func_BD0803EEE0CC29A0(); +s32 PS4_SYSV_ABI Func_BE6F4E5524BB135F(); +s32 PS4_SYSV_ABI Func_C0D490EB481EA4D0(); +s32 PS4_SYSV_ABI Func_C175D392CA6D084A(); +s32 PS4_SYSV_ABI Func_CD0136AF165D2F2F(); +s32 PS4_SYSV_ABI Func_D1C0ADB7B52FEAB5(); +s32 PS4_SYSV_ABI Func_E324765D18EE4D12(); +s32 PS4_SYSV_ABI Func_E789F980D907B653(); +s32 PS4_SYSV_ABI Func_F9A32E8685627436(); + +void RegisterlibSceNpWebApi(Core::Loader::SymbolsResolver* sym); +} // namespace Libraries::NpWebApi \ No newline at end of file diff --git a/src/core/libraries/pad/pad.cpp b/src/core/libraries/pad/pad.cpp index 7eb628a90..2e5973144 100644 --- a/src/core/libraries/pad/pad.cpp +++ b/src/core/libraries/pad/pad.cpp @@ -11,6 +11,8 @@ namespace Libraries::Pad { +using Input::GameController; + int PS4_SYSV_ABI scePadClose(s32 handle) { LOG_ERROR(Lib_Pad, "(STUBBED) called"); return ORBIS_OK; @@ -93,8 +95,8 @@ int PS4_SYSV_ABI scePadGetControllerInformation(s32 handle, OrbisPadControllerIn pInfo->touchPadInfo.pixelDensity = 1; pInfo->touchPadInfo.resolution.x = 1920; pInfo->touchPadInfo.resolution.y = 950; - pInfo->stickInfo.deadZoneLeft = 2; - pInfo->stickInfo.deadZoneRight = 2; + pInfo->stickInfo.deadZoneLeft = 1; + pInfo->stickInfo.deadZoneRight = 1; pInfo->connectionType = ORBIS_PAD_PORT_TYPE_STANDARD; pInfo->connectedCount = 1; pInfo->connected = false; @@ -104,8 +106,8 @@ int PS4_SYSV_ABI scePadGetControllerInformation(s32 handle, OrbisPadControllerIn pInfo->touchPadInfo.pixelDensity = 1; pInfo->touchPadInfo.resolution.x = 1920; pInfo->touchPadInfo.resolution.y = 950; - pInfo->stickInfo.deadZoneLeft = 2; - pInfo->stickInfo.deadZoneRight = 2; + pInfo->stickInfo.deadZoneLeft = 1; + pInfo->stickInfo.deadZoneRight = 1; pInfo->connectionType = ORBIS_PAD_PORT_TYPE_STANDARD; pInfo->connectedCount = 1; pInfo->connected = true; @@ -259,6 +261,7 @@ int PS4_SYSV_ABI scePadOpen(s32 userId, s32 type, s32 index, const OrbisPadOpenP if (type != ORBIS_PAD_PORT_TYPE_STANDARD && type != ORBIS_PAD_PORT_TYPE_REMOTE_CONTROL) return ORBIS_PAD_ERROR_DEVICE_NOT_CONNECTED; } + scePadResetLightBar(1); return 1; // dummy } @@ -290,7 +293,8 @@ int PS4_SYSV_ABI scePadRead(s32 handle, OrbisPadData* pData, s32 num) { int connected_count = 0; bool connected = false; Input::State states[64]; - auto* controller = Common::Singleton::Instance(); + auto* controller = Common::Singleton::Instance(); + const auto* engine = controller->GetEngine(); int ret_num = controller->ReadStates(states, num, &connected, &connected_count); if (!connected) { @@ -311,9 +315,15 @@ int PS4_SYSV_ABI scePadRead(s32 handle, OrbisPadData* pData, s32 num) { pData[i].angularVelocity.x = states[i].angularVelocity.x; pData[i].angularVelocity.y = states[i].angularVelocity.y; pData[i].angularVelocity.z = states[i].angularVelocity.z; - Input::GameController::CalculateOrientation(pData[i].acceleration, pData[i].angularVelocity, - 1.0f / controller->accel_poll_rate, - pData[i].orientation); + pData[i].orientation = {0.0f, 0.0f, 0.0f, 1.0f}; + if (engine) { + const auto gyro_poll_rate = engine->GetAccelPollRate(); + if (gyro_poll_rate != 0.0f) { + GameController::CalculateOrientation(pData[i].acceleration, + pData[i].angularVelocity, + 1.0f / gyro_poll_rate, pData[i].orientation); + } + } 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; @@ -356,7 +366,8 @@ int PS4_SYSV_ABI scePadReadState(s32 handle, OrbisPadData* pData) { if (handle == ORBIS_PAD_ERROR_DEVICE_NO_HANDLE) { return ORBIS_PAD_ERROR_INVALID_HANDLE; } - auto* controller = Common::Singleton::Instance(); + auto* controller = Common::Singleton::Instance(); + const auto* engine = controller->GetEngine(); int connectedCount = 0; bool isConnected = false; Input::State state; @@ -374,9 +385,14 @@ int PS4_SYSV_ABI scePadReadState(s32 handle, OrbisPadData* pData) { pData->angularVelocity.x = state.angularVelocity.x; pData->angularVelocity.y = state.angularVelocity.y; pData->angularVelocity.z = state.angularVelocity.z; - Input::GameController::CalculateOrientation(pData->acceleration, pData->angularVelocity, - 1.0f / controller->accel_poll_rate, - pData->orientation); + pData->orientation = {0.0f, 0.0f, 0.0f, 1.0f}; + if (engine) { + const auto gyro_poll_rate = engine->GetAccelPollRate(); + if (gyro_poll_rate != 0.0f) { + GameController::CalculateOrientation(pData->acceleration, pData->angularVelocity, + 1.0f / gyro_poll_rate, pData->orientation); + } + } pData->touchData.touchNum = (state.touchpad[0].state ? 1 : 0) + (state.touchpad[1].state ? 1 : 0); pData->touchData.touch[0].x = state.touchpad[0].x; @@ -399,7 +415,13 @@ int PS4_SYSV_ABI scePadReadStateExt() { } int PS4_SYSV_ABI scePadResetLightBar(s32 handle) { - LOG_ERROR(Lib_Pad, "(STUBBED) called"); + LOG_INFO(Lib_Pad, "(DUMMY) called"); + if (handle != 1) { + return ORBIS_PAD_ERROR_INVALID_HANDLE; + } + auto* controller = Common::Singleton::Instance(); + int* rgb = Config::GetControllerCustomColor(); + controller->SetLightBarRGB(rgb[0], rgb[1], rgb[2]); return ORBIS_OK; } @@ -459,16 +481,19 @@ int PS4_SYSV_ABI scePadSetForceIntercepted() { } int PS4_SYSV_ABI scePadSetLightBar(s32 handle, const OrbisPadLightBarParam* pParam) { + if (Config::GetOverrideControllerColor()) { + return ORBIS_OK; + } if (pParam != nullptr) { - LOG_INFO(Lib_Pad, "scePadSetLightBar called handle = {} rgb = {} {} {}", handle, pParam->r, - pParam->g, pParam->b); + LOG_DEBUG(Lib_Pad, "called handle = {} rgb = {} {} {}", handle, pParam->r, pParam->g, + pParam->b); if (pParam->r < 0xD && pParam->g < 0xD && pParam->b < 0xD) { LOG_INFO(Lib_Pad, "Invalid lightbar setting"); return ORBIS_PAD_ERROR_INVALID_LIGHTBAR_SETTING; } - auto* controller = Common::Singleton::Instance(); + auto* controller = Common::Singleton::Instance(); controller->SetLightBarRGB(pParam->r, pParam->g, pParam->b); return ORBIS_OK; } @@ -536,7 +561,7 @@ int PS4_SYSV_ABI scePadSetVibration(s32 handle, const OrbisPadVibrationParam* pP if (pParam != nullptr) { LOG_DEBUG(Lib_Pad, "scePadSetVibration called handle = {} data = {} , {}", handle, pParam->smallMotor, pParam->largeMotor); - auto* controller = Common::Singleton::Instance(); + auto* controller = Common::Singleton::Instance(); controller->SetVibration(pParam->smallMotor, pParam->largeMotor); return ORBIS_OK; } diff --git a/src/core/libraries/playgo/playgo.cpp b/src/core/libraries/playgo/playgo.cpp index 848533ff7..aec32e139 100644 --- a/src/core/libraries/playgo/playgo.cpp +++ b/src/core/libraries/playgo/playgo.cpp @@ -137,9 +137,6 @@ s32 PS4_SYSV_ABI scePlayGoGetLanguageMask(OrbisPlayGoHandle handle, s32 PS4_SYSV_ABI scePlayGoGetLocus(OrbisPlayGoHandle handle, const OrbisPlayGoChunkId* chunkIds, uint32_t numberOfEntries, OrbisPlayGoLocus* outLoci) { - LOG_DEBUG(Lib_PlayGo, "called handle = {}, chunkIds = {}, numberOfEntries = {}", handle, - *chunkIds, numberOfEntries); - if (handle != PlaygoHandle) { return ORBIS_PLAYGO_ERROR_BAD_HANDLE; } @@ -149,6 +146,10 @@ s32 PS4_SYSV_ABI scePlayGoGetLocus(OrbisPlayGoHandle handle, const OrbisPlayGoCh if (numberOfEntries == 0) { return ORBIS_PLAYGO_ERROR_BAD_SIZE; } + + LOG_DEBUG(Lib_PlayGo, "called handle = {}, chunkIds = {}, numberOfEntries = {}", handle, + *chunkIds, numberOfEntries); + if (!playgo) { return ORBIS_PLAYGO_ERROR_NOT_INITIALIZED; } @@ -157,7 +158,7 @@ s32 PS4_SYSV_ABI scePlayGoGetLocus(OrbisPlayGoHandle handle, const OrbisPlayGoCh } for (int i = 0; i < numberOfEntries; i++) { - if (chunkIds[i] <= playgo->chunks.size()) { + if (chunkIds[i] < playgo->chunks.size()) { outLoci[i] = OrbisPlayGoLocus::LocalFast; } else { outLoci[i] = OrbisPlayGoLocus::NotDownloaded; diff --git a/src/core/libraries/save_data/save_backup.cpp b/src/core/libraries/save_data/save_backup.cpp index 5261cdb11..f85845f70 100644 --- a/src/core/libraries/save_data/save_backup.cpp +++ b/src/core/libraries/save_data/save_backup.cpp @@ -121,15 +121,17 @@ static void BackupThreadBody() { std::scoped_lock lk{g_backup_queue_mutex}; g_backup_queue.front().done = true; } - std::this_thread::sleep_for(std::chrono::seconds(5)); // Don't backup too often { std::scoped_lock lk{g_backup_queue_mutex}; g_backup_queue.pop_front(); - g_result_queue.push_back(std::move(req)); - if (g_result_queue.size() > 20) { - g_result_queue.pop_front(); + if (req.origin != OrbisSaveDataEventType::__DO_NOT_SAVE) { + g_result_queue.push_back(std::move(req)); + if (g_result_queue.size() > 20) { + g_result_queue.pop_front(); + } } } + std::this_thread::sleep_for(std::chrono::seconds(5)); // Don't backup too often } g_backup_status = WorkerStatus::NotStarted; } @@ -141,6 +143,15 @@ void StartThread() { LOG_DEBUG(Lib_SaveData, "Starting backup thread"); g_backup_status = WorkerStatus::Waiting; g_backup_thread = std::jthread{BackupThreadBody}; + static std::once_flag flag; + std::call_once(flag, [] { + std::at_quick_exit([] { + StopThread(); + while (GetWorkerStatus() != WorkerStatus::NotStarted) { + std::this_thread::sleep_for(std::chrono::milliseconds(100)); + } + }); + }); } void StopThread() { @@ -148,12 +159,12 @@ void StopThread() { return; } LOG_DEBUG(Lib_SaveData, "Stopping backup thread"); + g_backup_status = WorkerStatus::Stopping; { std::scoped_lock lk{g_backup_queue_mutex}; g_backup_queue.emplace_back(BackupRequest{}); } g_backup_thread_semaphore.release(); - g_backup_status = WorkerStatus::Stopping; } bool NewRequest(OrbisUserServiceUserId user_id, std::string_view title_id, diff --git a/src/core/libraries/save_data/save_backup.h b/src/core/libraries/save_data/save_backup.h index e49c69f60..83a263c9b 100644 --- a/src/core/libraries/save_data/save_backup.h +++ b/src/core/libraries/save_data/save_backup.h @@ -25,6 +25,8 @@ enum class OrbisSaveDataEventType : u32 { UMOUNT_BACKUP = 1, BACKUP = 2, SAVE_DATA_MEMORY_SYNC = 3, + + __DO_NOT_SAVE = 1000000, // This value is only for the backup thread }; struct BackupRequest { diff --git a/src/core/libraries/save_data/save_instance.cpp b/src/core/libraries/save_data/save_instance.cpp index 99daf83cc..a7ce3d35f 100644 --- a/src/core/libraries/save_data/save_instance.cpp +++ b/src/core/libraries/save_data/save_instance.cpp @@ -10,6 +10,7 @@ #include "common/path_util.h" #include "common/singleton.h" #include "core/file_sys/fs.h" +#include "save_backup.h" #include "save_instance.h" constexpr auto OrbisSaveDataBlocksMin2 = 96; // 3MiB @@ -23,17 +24,17 @@ namespace fs = std::filesystem; // clang-format off static const std::unordered_map default_title = { {"ja_JP", "セーブデータ"}, - {"en", "Saved Data"}, - {"fr", "Données sauvegardées"}, + {"en_US", "Saved Data"}, + {"fr_FR", "Données sauvegardées"}, {"es_ES", "Datos guardados"}, - {"de", "Gespeicherte Daten"}, - {"it", "Dati salvati"}, - {"nl", "Opgeslagen data"}, + {"de_DE", "Gespeicherte Daten"}, + {"it_IT", "Dati salvati"}, + {"nl_NL", "Opgeslagen data"}, {"pt_PT", "Dados guardados"}, - {"ru", "Сохраненные данные"}, + {"ru_RU", "Сохраненные данные"}, {"ko_KR", "저장 데이터"}, {"zh_CN", "保存数据"}, - {"fi", "Tallennetut tiedot"}, + {"fi_FI", "Tallennetut tiedot"}, {"sv_SE", "Sparade data"}, {"da_DK", "Gemte data"}, {"no_NO", "Lagrede data"}, @@ -45,17 +46,14 @@ static const std::unordered_map default_title = { namespace Libraries::SaveData { -std::filesystem::path SaveInstance::MakeTitleSavePath(OrbisUserServiceUserId user_id, - std::string_view game_serial) { - return Common::FS::GetUserPath(Common::FS::PathType::SaveDataDir) / std::to_string(user_id) / - game_serial; +fs::path SaveInstance::MakeTitleSavePath(OrbisUserServiceUserId user_id, + std::string_view game_serial) { + return Config::GetSaveDataPath() / std::to_string(user_id) / game_serial; } -std::filesystem::path SaveInstance::MakeDirSavePath(OrbisUserServiceUserId user_id, - std::string_view game_serial, - std::string_view dir_name) { - return Common::FS::GetUserPath(Common::FS::PathType::SaveDataDir) / std::to_string(user_id) / - game_serial / dir_name; +fs::path SaveInstance::MakeDirSavePath(OrbisUserServiceUserId user_id, std::string_view game_serial, + std::string_view dir_name) { + return Config::GetSaveDataPath() / std::to_string(user_id) / game_serial / dir_name; } uint64_t SaveInstance::GetMaxBlockFromSFO(const PSF& psf) { @@ -67,7 +65,7 @@ uint64_t SaveInstance::GetMaxBlockFromSFO(const PSF& psf) { return *(uint64_t*)value.data(); } -std::filesystem::path SaveInstance::GetParamSFOPath(const std::filesystem::path& dir_path) { +fs::path SaveInstance::GetParamSFOPath(const fs::path& dir_path) { return dir_path / sce_sys / "param.sfo"; } @@ -75,7 +73,7 @@ void SaveInstance::SetupDefaultParamSFO(PSF& param_sfo, std::string dir_name, std::string game_serial) { std::string locale = Config::getEmulatorLanguage(); if (!default_title.contains(locale)) { - locale = "en"; + locale = "en_US"; } #define P(type, key, ...) param_sfo.Add##type(std::string{key}, __VA_ARGS__) @@ -131,7 +129,6 @@ SaveInstance& SaveInstance::operator=(SaveInstance&& other) noexcept { save_path = std::move(other.save_path); param_sfo_path = std::move(other.param_sfo_path); corrupt_file_path = std::move(other.corrupt_file_path); - corrupt_file = std::move(other.corrupt_file); param_sfo = std::move(other.param_sfo); mount_point = std::move(other.mount_point); max_blocks = other.max_blocks; @@ -144,7 +141,8 @@ SaveInstance& SaveInstance::operator=(SaveInstance&& other) noexcept { return *this; } -void SaveInstance::SetupAndMount(bool read_only, bool copy_icon, bool ignore_corrupt) { +void SaveInstance::SetupAndMount(bool read_only, bool copy_icon, bool ignore_corrupt, + bool dont_restore_backup) { if (mounted) { UNREACHABLE_MSG("Save instance is already mounted"); } @@ -163,25 +161,27 @@ void SaveInstance::SetupAndMount(bool read_only, bool copy_icon, bool ignore_cor } exists = true; } else { + std::optional err; if (!ignore_corrupt && fs::exists(corrupt_file_path)) { - throw std::filesystem::filesystem_error( - "Corrupted save data", corrupt_file_path, - std::make_error_code(std::errc::illegal_byte_sequence)); + err = fs::filesystem_error("Corrupted save data", corrupt_file_path, + std::make_error_code(std::errc::illegal_byte_sequence)); + } else if (!param_sfo.Open(param_sfo_path)) { + err = fs::filesystem_error("Failed to read param.sfo", param_sfo_path, + std::make_error_code(std::errc::illegal_byte_sequence)); } - if (!param_sfo.Open(param_sfo_path)) { - throw std::filesystem::filesystem_error( - "Failed to read param.sfo", param_sfo_path, - std::make_error_code(std::errc::illegal_byte_sequence)); + if (err.has_value()) { + if (dont_restore_backup) { + throw err.value(); + } + if (Backup::Restore(save_path)) { + return SetupAndMount(read_only, copy_icon, ignore_corrupt, true); + } } } if (!ignore_corrupt && !read_only) { - int err = corrupt_file.Open(corrupt_file_path, Common::FS::FileAccessMode::Write); - if (err != 0) { - throw std::filesystem::filesystem_error( - "Failed to open corrupted file", corrupt_file_path, - std::make_error_code(std::errc::illegal_byte_sequence)); - } + Common::FS::IOFile f(corrupt_file_path, Common::FS::FileAccessMode::Write); + f.Close(); } max_blocks = static_cast(GetMaxBlockFromSFO(param_sfo)); @@ -199,12 +199,11 @@ void SaveInstance::Umount() { mounted = false; const bool ok = param_sfo.Encode(param_sfo_path); if (!ok) { - throw std::filesystem::filesystem_error("Failed to write param.sfo", param_sfo_path, - std::make_error_code(std::errc::permission_denied)); + throw fs::filesystem_error("Failed to write param.sfo", param_sfo_path, + std::make_error_code(std::errc::permission_denied)); } param_sfo = PSF(); - corrupt_file.Close(); fs::remove(corrupt_file_path); g_mnt->Unmount(save_path, mount_point); } @@ -218,9 +217,9 @@ void SaveInstance::CreateFiles() { const bool ok = param_sfo.Encode(param_sfo_path); if (!ok) { - throw std::filesystem::filesystem_error("Failed to write param.sfo", param_sfo_path, - std::make_error_code(std::errc::permission_denied)); + throw fs::filesystem_error("Failed to write param.sfo", param_sfo_path, + std::make_error_code(std::errc::permission_denied)); } } -} // namespace Libraries::SaveData \ No newline at end of file +} // namespace Libraries::SaveData diff --git a/src/core/libraries/save_data/save_instance.h b/src/core/libraries/save_data/save_instance.h index 3be5c4595..6e7ac8f66 100644 --- a/src/core/libraries/save_data/save_instance.h +++ b/src/core/libraries/save_data/save_instance.h @@ -42,8 +42,6 @@ class SaveInstance { std::filesystem::path param_sfo_path; std::filesystem::path corrupt_file_path; - Common::FS::IOFile corrupt_file; - PSF param_sfo; std::string mount_point; @@ -80,7 +78,8 @@ public: SaveInstance& operator=(const SaveInstance& other) = delete; SaveInstance& operator=(SaveInstance&& other) noexcept; - void SetupAndMount(bool read_only = false, bool copy_icon = false, bool ignore_corrupt = false); + void SetupAndMount(bool read_only = false, bool copy_icon = false, bool ignore_corrupt = false, + bool dont_restore_backup = false); void Umount(); diff --git a/src/core/libraries/save_data/save_memory.cpp b/src/core/libraries/save_data/save_memory.cpp index 84179bc27..13e122c60 100644 --- a/src/core/libraries/save_data/save_memory.cpp +++ b/src/core/libraries/save_data/save_memory.cpp @@ -6,14 +6,16 @@ #include #include #include +#include #include #include #include #include "common/assert.h" +#include "common/elf_info.h" #include "common/logging/log.h" -#include "common/polyfill_thread.h" +#include "common/path_util.h" #include "common/singleton.h" #include "common/thread.h" #include "core/file_sys/fs.h" @@ -23,265 +25,202 @@ using Common::FS::IOFile; namespace fs = std::filesystem; constexpr std::string_view sce_sys = "sce_sys"; // system folder inside save -constexpr std::string_view DirnameSaveDataMemory = "sce_sdmemory"; +constexpr std::string_view StandardDirnameSaveDataMemory = "sce_sdmemory"; constexpr std::string_view FilenameSaveDataMemory = "memory.dat"; +constexpr std::string_view IconName = "icon0.png"; +constexpr std::string_view CorruptFileName = "corrupted"; namespace Libraries::SaveData::SaveMemory { static Core::FileSys::MntPoints* g_mnt = Common::Singleton::Instance(); -static OrbisUserServiceUserId g_user_id{}; -static std::string g_game_serial{}; -static std::filesystem::path g_save_path{}; -static std::filesystem::path g_param_sfo_path{}; -static PSF g_param_sfo; +struct SlotData { + OrbisUserServiceUserId user_id; + std::string game_serial; + std::filesystem::path folder_path; + PSF sfo; + std::vector memory_cache; +}; -static bool g_save_memory_initialized = false; -static std::mutex g_saving_memory_mutex; -static std::vector g_save_memory; +static std::mutex g_slot_mtx; +static std::unordered_map g_attached_slots; -static std::filesystem::path g_icon_path; -static std::vector g_icon_memory; +void PersistMemory(u32 slot_id, bool lock) { + std::unique_lock lck{g_slot_mtx, std::defer_lock}; + if (lock) { + lck.lock(); + } + auto& data = g_attached_slots[slot_id]; + auto memoryPath = data.folder_path / FilenameSaveDataMemory; + fs::create_directories(memoryPath.parent_path()); -static std::condition_variable g_trigger_save_memory; -static std::atomic_bool g_saving_memory = false; -static std::atomic_bool g_save_event = false; -static std::jthread g_save_memory_thread; - -static std::atomic_bool g_memory_dirty = false; -static std::atomic_bool g_param_dirty = false; -static std::atomic_bool g_icon_dirty = false; - -static void SaveFileSafe(void* buf, size_t count, const std::filesystem::path& path) { - const auto& dir = path.parent_path(); - const auto& name = path.filename(); - const auto tmp_path = dir / (name.string() + ".tmp"); - - IOFile file(tmp_path, Common::FS::FileAccessMode::Write); - file.WriteRaw(buf, count); - file.Close(); - - fs::remove(path); - fs::rename(tmp_path, path); -} - -[[noreturn]] void SaveThreadLoop() { - Common::SetCurrentThreadName("shadPS4:SaveData:SaveDataMemoryThread"); - std::mutex mtx; - while (true) { - { - std::unique_lock lk{mtx}; - g_trigger_save_memory.wait(lk); - } - // Save the memory - g_saving_memory = true; - std::scoped_lock lk{g_saving_memory_mutex}; + int n = 0; + std::string errMsg; + while (n++ < 10) { try { - LOG_DEBUG(Lib_SaveData, "Saving save data memory {}", fmt::UTF(g_save_path.u8string())); - - if (g_memory_dirty) { - g_memory_dirty = false; - SaveFileSafe(g_save_memory.data(), g_save_memory.size(), - g_save_path / FilenameSaveDataMemory); + IOFile f; + int r = f.Open(memoryPath, Common::FS::FileAccessMode::Write); + if (f.IsOpen()) { + f.WriteRaw(data.memory_cache.data(), data.memory_cache.size()); + f.Close(); + return; } - if (g_param_dirty) { - g_param_dirty = false; - static std::vector buf; - g_param_sfo.Encode(buf); - SaveFileSafe(buf.data(), buf.size(), g_param_sfo_path); - } - if (g_icon_dirty) { - g_icon_dirty = false; - SaveFileSafe(g_icon_memory.data(), g_icon_memory.size(), g_icon_path); - } - - if (g_save_event) { - Backup::PushBackupEvent(Backup::BackupRequest{ - .user_id = g_user_id, - .title_id = g_game_serial, - .dir_name = std::string{DirnameSaveDataMemory}, - .origin = Backup::OrbisSaveDataEventType::SAVE_DATA_MEMORY_SYNC, - .save_path = g_save_path, - }); - g_save_event = false; - } - } catch (const fs::filesystem_error& e) { - LOG_ERROR(Lib_SaveData, "Failed to save save data memory: {}", e.what()); - MsgDialog::ShowMsgDialog(MsgDialog::MsgDialogState{ - MsgDialog::MsgDialogState::UserState{ - .type = MsgDialog::ButtonType::OK, - .msg = fmt::format("Failed to save save data memory.\nCode: <{}>\n{}", - e.code().message(), e.what()), - }, - }); + const auto err = std::error_code{r, std::iostream_category()}; + throw std::filesystem::filesystem_error{err.message(), err}; + } catch (const std::filesystem::filesystem_error& e) { + errMsg = std::string{e.what()}; + std::this_thread::sleep_for(std::chrono::seconds(1)); } - g_saving_memory = false; } + const MsgDialog::MsgDialogState dialog{MsgDialog::MsgDialogState::UserState{ + .type = MsgDialog::ButtonType::OK, + .msg = "Failed to persist save memory:\n" + errMsg + "\nat " + + Common::FS::PathToUTF8String(memoryPath), + }}; + MsgDialog::ShowMsgDialog(dialog); } -void SetDirectories(OrbisUserServiceUserId user_id, std::string _game_serial) { - g_user_id = user_id; - g_game_serial = std::move(_game_serial); - g_save_path = SaveInstance::MakeDirSavePath(user_id, g_game_serial, DirnameSaveDataMemory); - g_param_sfo_path = SaveInstance::GetParamSFOPath(g_save_path); - g_param_sfo = PSF(); - g_icon_path = g_save_path / sce_sys / "icon0.png"; +std::string GetSaveDir(u32 slot_id) { + std::string dir(StandardDirnameSaveDataMemory); + if (slot_id > 0) { + dir += std::to_string(slot_id); + } + return dir; } -const std::filesystem::path& GetSavePath() { - return g_save_path; +std::filesystem::path GetSavePath(OrbisUserServiceUserId user_id, u32 slot_id, + std::string_view game_serial) { + std::string dir(StandardDirnameSaveDataMemory); + if (slot_id > 0) { + dir += std::to_string(slot_id); + } + return SaveInstance::MakeDirSavePath(user_id, Common::ElfInfo::Instance().GameSerial(), dir); } -size_t CreateSaveMemory(size_t memory_size) { - size_t existed_size = 0; +size_t SetupSaveMemory(OrbisUserServiceUserId user_id, u32 slot_id, std::string_view game_serial) { + std::lock_guard lck{g_slot_mtx}; - static std::once_flag init_save_thread_flag; - std::call_once(init_save_thread_flag, - [] { g_save_memory_thread = std::jthread{SaveThreadLoop}; }); + const auto save_dir = GetSavePath(user_id, slot_id, game_serial); - g_save_memory.resize(memory_size); - SaveInstance::SetupDefaultParamSFO(g_param_sfo, std::string{DirnameSaveDataMemory}, - g_game_serial); + auto& data = g_attached_slots[slot_id]; + data = SlotData{ + .user_id = user_id, + .game_serial = std::string{game_serial}, + .folder_path = save_dir, + .sfo = {}, + .memory_cache = {}, + }; - g_save_memory_initialized = true; + SaveInstance::SetupDefaultParamSFO(data.sfo, GetSaveDir(slot_id), std::string{game_serial}); - if (!fs::exists(g_param_sfo_path)) { - // Create save memory - fs::create_directories(g_save_path / sce_sys); - - IOFile memory_file{g_save_path / FilenameSaveDataMemory, Common::FS::FileAccessMode::Write}; - bool ok = memory_file.SetSize(memory_size); - if (!ok) { - LOG_ERROR(Lib_SaveData, "Failed to set memory size"); - throw std::filesystem::filesystem_error( - "Failed to set save memory size", g_save_path / FilenameSaveDataMemory, - std::make_error_code(std::errc::no_space_on_device)); - } - memory_file.Close(); - } else { - // Load save memory - - bool ok = g_param_sfo.Open(g_param_sfo_path); - if (!ok) { - LOG_ERROR(Lib_SaveData, "Failed to open SFO at {}", - fmt::UTF(g_param_sfo_path.u8string())); - throw std::filesystem::filesystem_error( - "failed to open SFO", g_param_sfo_path, - std::make_error_code(std::errc::illegal_byte_sequence)); - } - - IOFile memory_file{g_save_path / FilenameSaveDataMemory, Common::FS::FileAccessMode::Read}; - if (!memory_file.IsOpen()) { - LOG_ERROR(Lib_SaveData, "Failed to open save memory"); - throw std::filesystem::filesystem_error( - "failed to open save memory", g_save_path / FilenameSaveDataMemory, - std::make_error_code(std::errc::permission_denied)); - } - size_t save_size = memory_file.GetSize(); - existed_size = save_size; - memory_file.Seek(0); - memory_file.ReadRaw(g_save_memory.data(), std::min(save_size, memory_size)); - memory_file.Close(); + auto param_sfo_path = SaveInstance::GetParamSFOPath(save_dir); + if (!fs::exists(param_sfo_path)) { + return 0; } - return existed_size; + if (!data.sfo.Open(param_sfo_path) || fs::exists(save_dir / CorruptFileName)) { + if (!Backup::Restore(save_dir)) { // Could not restore the backup + return 0; + } + } + + const auto memory = save_dir / FilenameSaveDataMemory; + if (fs::exists(memory)) { + return fs::file_size(memory); + } + + return 0; } -void SetIcon(void* buf, size_t buf_size) { +void SetIcon(u32 slot_id, void* buf, size_t buf_size) { + std::lock_guard lck{g_slot_mtx}; + const auto& data = g_attached_slots[slot_id]; + const auto icon_path = data.folder_path / sce_sys / "icon0.png"; if (buf == nullptr) { const auto& src_icon = g_mnt->GetHostPath("/app0/sce_sys/save_data.png"); - if (fs::exists(src_icon)) { - if (fs::exists(g_icon_path)) { - fs::remove(g_icon_path); - } - fs::copy_file(src_icon, g_icon_path); + if (fs::exists(icon_path)) { + fs::remove(icon_path); } - if (fs::exists(g_icon_path)) { - IOFile file(g_icon_path, Common::FS::FileAccessMode::Read); - size_t size = file.GetSize(); - file.Seek(0); - g_icon_memory.resize(size); - file.ReadRaw(g_icon_memory.data(), size); - file.Close(); + if (fs::exists(src_icon)) { + fs::create_directories(icon_path.parent_path()); + fs::copy_file(src_icon, icon_path); } } else { - g_icon_memory.resize(buf_size); - std::memcpy(g_icon_memory.data(), buf, buf_size); - IOFile file(g_icon_path, Common::FS::FileAccessMode::Write); - file.Seek(0); - file.WriteRaw(g_icon_memory.data(), buf_size); + IOFile file(icon_path, Common::FS::FileAccessMode::Write); + file.WriteRaw(buf, buf_size); file.Close(); } } -void WriteIcon(void* buf, size_t buf_size) { - if (buf_size != g_icon_memory.size()) { - g_icon_memory.resize(buf_size); +bool IsSaveMemoryInitialized(u32 slot_id) { + std::lock_guard lck{g_slot_mtx}; + return g_attached_slots.contains(slot_id); +} + +PSF& GetParamSFO(u32 slot_id) { + std::lock_guard lck{g_slot_mtx}; + auto& data = g_attached_slots[slot_id]; + return data.sfo; +} + +std::vector GetIcon(u32 slot_id) { + std::lock_guard lck{g_slot_mtx}; + auto& data = g_attached_slots[slot_id]; + const auto icon_path = data.folder_path / sce_sys / "icon0.png"; + IOFile f{icon_path, Common::FS::FileAccessMode::Read}; + if (!f.IsOpen()) { + return {}; } - std::memcpy(g_icon_memory.data(), buf, buf_size); - g_icon_dirty = true; + const u64 size = f.GetSize(); + std::vector ret; + ret.resize(size); + f.ReadSpan(std::span{ret}); + return ret; } -bool IsSaveMemoryInitialized() { - return g_save_memory_initialized; -} - -PSF& GetParamSFO() { - return g_param_sfo; -} - -std::span GetIcon() { - return {g_icon_memory}; -} - -void SaveSFO(bool sync) { - if (!sync) { - g_param_dirty = true; - return; - } - const bool ok = g_param_sfo.Encode(g_param_sfo_path); +void SaveSFO(u32 slot_id) { + std::lock_guard lck{g_slot_mtx}; + const auto& data = g_attached_slots[slot_id]; + const auto sfo_path = SaveInstance::GetParamSFOPath(data.folder_path); + fs::create_directories(sfo_path.parent_path()); + const bool ok = data.sfo.Encode(sfo_path); if (!ok) { LOG_ERROR(Lib_SaveData, "Failed to encode param.sfo"); - throw std::filesystem::filesystem_error("Failed to write param.sfo", g_param_sfo_path, + throw std::filesystem::filesystem_error("Failed to write param.sfo", sfo_path, std::make_error_code(std::errc::permission_denied)); } } -bool IsSaving() { - return g_saving_memory; + +void ReadMemory(u32 slot_id, void* buf, size_t buf_size, int64_t offset) { + std::lock_guard lk{g_slot_mtx}; + auto& data = g_attached_slots[slot_id]; + auto& memory = data.memory_cache; + if (memory.empty()) { // Load file + IOFile f{data.folder_path / FilenameSaveDataMemory, Common::FS::FileAccessMode::Read}; + if (f.IsOpen()) { + memory.resize(f.GetSize()); + f.Seek(0); + f.ReadSpan(std::span{memory}); + } + } + s64 read_size = buf_size; + if (read_size + offset > memory.size()) { + read_size = memory.size() - offset; + } + std::memcpy(buf, memory.data() + offset, read_size); } -bool TriggerSaveWithoutEvent() { - if (g_saving_memory) { - return false; +void WriteMemory(u32 slot_id, void* buf, size_t buf_size, int64_t offset) { + std::lock_guard lk{g_slot_mtx}; + auto& data = g_attached_slots[slot_id]; + auto& memory = data.memory_cache; + if (offset + buf_size > memory.size()) { + memory.resize(offset + buf_size); } - g_trigger_save_memory.notify_one(); - return true; -} - -bool TriggerSave() { - if (g_saving_memory) { - return false; - } - g_save_event = true; - g_trigger_save_memory.notify_one(); - return true; -} - -void ReadMemory(void* buf, size_t buf_size, int64_t offset) { - std::scoped_lock lk{g_saving_memory_mutex}; - if (offset + buf_size > g_save_memory.size()) { - UNREACHABLE_MSG("ReadMemory out of bounds"); - } - std::memcpy(buf, g_save_memory.data() + offset, buf_size); -} - -void WriteMemory(void* buf, size_t buf_size, int64_t offset) { - std::scoped_lock lk{g_saving_memory_mutex}; - if (offset + buf_size > g_save_memory.size()) { - g_save_memory.resize(offset + buf_size); - } - std::memcpy(g_save_memory.data() + offset, buf, buf_size); - g_memory_dirty = true; + std::memcpy(memory.data() + offset, buf, buf_size); + PersistMemory(slot_id, false); + Backup::NewRequest(data.user_id, data.game_serial, GetSaveDir(slot_id), + Backup::OrbisSaveDataEventType::__DO_NOT_SAVE); } } // namespace Libraries::SaveData::SaveMemory \ No newline at end of file diff --git a/src/core/libraries/save_data/save_memory.h b/src/core/libraries/save_data/save_memory.h index 04eeaa652..681865634 100644 --- a/src/core/libraries/save_data/save_memory.h +++ b/src/core/libraries/save_data/save_memory.h @@ -3,7 +3,7 @@ #pragma once -#include +#include #include "save_backup.h" class PSF; @@ -14,36 +14,30 @@ using OrbisUserServiceUserId = s32; namespace Libraries::SaveData::SaveMemory { -void SetDirectories(OrbisUserServiceUserId user_id, std::string game_serial); +void PersistMemory(u32 slot_id, bool lock = true); -[[nodiscard]] const std::filesystem::path& GetSavePath(); +[[nodiscard]] std::string GetSaveDir(u32 slot_id); -// returns the size of the existed save memory -size_t CreateSaveMemory(size_t memory_size); +[[nodiscard]] std::filesystem::path GetSavePath(OrbisUserServiceUserId user_id, u32 slot_id, + std::string_view game_serial); -// Initialize the icon. Set buf to null to read the standard icon. -void SetIcon(void* buf, size_t buf_size); +// returns the size of the save memory if exists +size_t SetupSaveMemory(OrbisUserServiceUserId user_id, u32 slot_id, std::string_view game_serial); -// Update the icon -void WriteIcon(void* buf, size_t buf_size); +// Write the icon. Set buf to null to read the standard icon. +void SetIcon(u32 slot_id, void* buf = nullptr, size_t buf_size = 0); -[[nodiscard]] bool IsSaveMemoryInitialized(); +[[nodiscard]] bool IsSaveMemoryInitialized(u32 slot_id); -[[nodiscard]] PSF& GetParamSFO(); +[[nodiscard]] PSF& GetParamSFO(u32 slot_id); -[[nodiscard]] std::span GetIcon(); +[[nodiscard]] std::vector GetIcon(u32 slot_id); // Save now or wait for the background thread to save -void SaveSFO(bool sync = false); +void SaveSFO(u32 slot_id); -[[nodiscard]] bool IsSaving(); +void ReadMemory(u32 slot_id, void* buf, size_t buf_size, int64_t offset); -bool TriggerSaveWithoutEvent(); - -bool TriggerSave(); - -void ReadMemory(void* buf, size_t buf_size, int64_t offset); - -void WriteMemory(void* buf, size_t buf_size, int64_t offset); +void WriteMemory(u32 slot_id, void* buf, size_t buf_size, int64_t offset); } // namespace Libraries::SaveData::SaveMemory \ No newline at end of file diff --git a/src/core/libraries/save_data/savedata.cpp b/src/core/libraries/save_data/savedata.cpp index b573ded1e..e9ad77d69 100644 --- a/src/core/libraries/save_data/savedata.cpp +++ b/src/core/libraries/save_data/savedata.cpp @@ -177,7 +177,8 @@ struct OrbisSaveDataMemoryGet2 { OrbisSaveDataMemoryData* data; OrbisSaveDataParam* param; OrbisSaveDataIcon* icon; - std::array _reserved; + u32 slotId; + std::array _reserved; }; struct OrbisSaveDataMemorySet2 { @@ -186,6 +187,8 @@ struct OrbisSaveDataMemorySet2 { const OrbisSaveDataMemoryData* data; const OrbisSaveDataParam* param; const OrbisSaveDataIcon* icon; + u32 dataNum; + u32 slotId; std::array _reserved; }; @@ -198,7 +201,8 @@ struct OrbisSaveDataMemorySetup2 { const OrbisSaveDataParam* initParam; // +4.5 const OrbisSaveDataIcon* initIcon; - std::array _reserved; + u32 slotId; + std::array _reserved; }; struct OrbisSaveDataMemorySetupResult { @@ -206,9 +210,16 @@ struct OrbisSaveDataMemorySetupResult { std::array _reserved; }; +enum OrbisSaveDataMemorySyncOption : u32 { + NONE = 0, + BLOCKING = 1, +}; + struct OrbisSaveDataMemorySync { OrbisUserServiceUserId userId; - std::array _reserved; + u32 slotId; + OrbisSaveDataMemorySyncOption option; + std::array _reserved; }; struct OrbisSaveDataMount2 { @@ -327,6 +338,7 @@ static void initialize() { g_initialized = true; g_game_serial = ElfInfo::Instance().GameSerial(); g_fw_ver = ElfInfo::Instance().FirmwareVer(); + Backup::StartThread(); } // game_00other | game*other @@ -558,7 +570,6 @@ Error PS4_SYSV_ABI sceSaveDataBackup(const OrbisSaveDataBackup* backup) { } } - Backup::StartThread(); Backup::NewRequest(backup->userId, title, dir_name, OrbisSaveDataEventType::BACKUP); return Error::OK; @@ -1136,22 +1147,27 @@ Error PS4_SYSV_ABI sceSaveDataGetSaveDataMemory2(OrbisSaveDataMemoryGet2* getPar LOG_INFO(Lib_SaveData, "called with invalid parameter"); return Error::PARAMETER; } - if (!SaveMemory::IsSaveMemoryInitialized()) { + + u32 slot_id = 0; + if (g_fw_ver > ElfInfo::FW_50) { + slot_id = getParam->slotId; + } + if (!SaveMemory::IsSaveMemoryInitialized(slot_id)) { LOG_INFO(Lib_SaveData, "called without save memory initialized"); return Error::MEMORY_NOT_READY; } LOG_DEBUG(Lib_SaveData, "called"); auto data = getParam->data; if (data != nullptr) { - SaveMemory::ReadMemory(data->buf, data->bufSize, data->offset); + SaveMemory::ReadMemory(slot_id, data->buf, data->bufSize, data->offset); } auto param = getParam->param; if (param != nullptr) { - param->FromSFO(SaveMemory::GetParamSFO()); + param->FromSFO(SaveMemory::GetParamSFO(slot_id)); } auto icon = getParam->icon; if (icon != nullptr) { - auto icon_mem = SaveMemory::GetIcon(); + auto icon_mem = SaveMemory::GetIcon(slot_id); size_t total = std::min(icon->bufSize, icon_mem.size()); std::memcpy(icon->buf, icon_mem.data(), total); icon->dataSize = total; @@ -1494,36 +1510,37 @@ Error PS4_SYSV_ABI sceSaveDataSetSaveDataMemory2(const OrbisSaveDataMemorySet2* LOG_INFO(Lib_SaveData, "called with invalid parameter"); return Error::PARAMETER; } - if (!SaveMemory::IsSaveMemoryInitialized()) { + u32 slot_id = 0; + u32 data_num = 1; + if (g_fw_ver > ElfInfo::FW_50) { + slot_id = setParam->slotId; + if (setParam->dataNum > 1) { + data_num = setParam->dataNum; + } + } + if (!SaveMemory::IsSaveMemoryInitialized(slot_id)) { LOG_INFO(Lib_SaveData, "called without save memory initialized"); return Error::MEMORY_NOT_READY; } - if (SaveMemory::IsSaving()) { - int count = 0; - while (++count < 100 && SaveMemory::IsSaving()) { // try for more 10 seconds - std::this_thread::sleep_for(chrono::milliseconds(100)); - } - if (SaveMemory::IsSaving()) { - LOG_TRACE(Lib_SaveData, "called while saving"); - return Error::BUSY_FOR_SAVING; - } - } + LOG_DEBUG(Lib_SaveData, "called"); auto data = setParam->data; if (data != nullptr) { - SaveMemory::WriteMemory(data->buf, data->bufSize, data->offset); + for (int i = 0; i < data_num; i++) { + SaveMemory::WriteMemory(slot_id, data[i].buf, data[i].bufSize, data[i].offset); + } } auto param = setParam->param; if (param != nullptr) { - param->ToSFO(SaveMemory::GetParamSFO()); - SaveMemory::SaveSFO(); - } - auto icon = setParam->icon; - if (icon != nullptr) { - SaveMemory::WriteIcon(icon->buf, icon->bufSize); + param->ToSFO(SaveMemory::GetParamSFO(slot_id)); + SaveMemory::SaveSFO(slot_id); + } + + auto icon = setParam->icon; + if (icon != nullptr) { + SaveMemory::SetIcon(slot_id, icon->buf, icon->bufSize); } - SaveMemory::TriggerSaveWithoutEvent(); return Error::OK; } @@ -1563,9 +1580,12 @@ Error PS4_SYSV_ABI sceSaveDataSetupSaveDataMemory2(const OrbisSaveDataMemorySetu } LOG_DEBUG(Lib_SaveData, "called"); - SaveMemory::SetDirectories(setupParam->userId, g_game_serial); + u32 slot_id = 0; + if (g_fw_ver > ElfInfo::FW_50) { + slot_id = setupParam->slotId; + } - const auto& save_path = SaveMemory::GetSavePath(); + const auto& save_path = SaveMemory::GetSavePath(setupParam->userId, slot_id, g_game_serial); for (const auto& instance : g_mount_slots) { if (instance.has_value() && instance->GetSavePath() == save_path) { return Error::BUSY; @@ -1573,21 +1593,21 @@ Error PS4_SYSV_ABI sceSaveDataSetupSaveDataMemory2(const OrbisSaveDataMemorySetu } try { - size_t existed_size = SaveMemory::CreateSaveMemory(setupParam->memorySize); + size_t existed_size = + SaveMemory::SetupSaveMemory(setupParam->userId, slot_id, g_game_serial); if (existed_size == 0) { // Just created if (g_fw_ver >= ElfInfo::FW_45 && setupParam->initParam != nullptr) { - auto& sfo = SaveMemory::GetParamSFO(); + auto& sfo = SaveMemory::GetParamSFO(slot_id); setupParam->initParam->ToSFO(sfo); } - SaveMemory::SaveSFO(); + SaveMemory::SaveSFO(slot_id); auto init_icon = setupParam->initIcon; if (g_fw_ver >= ElfInfo::FW_45 && init_icon != nullptr) { - SaveMemory::SetIcon(init_icon->buf, init_icon->bufSize); + SaveMemory::SetIcon(slot_id, init_icon->buf, init_icon->bufSize); } else { - SaveMemory::SetIcon(nullptr, 0); + SaveMemory::SetIcon(slot_id); } - SaveMemory::TriggerSaveWithoutEvent(); } if (g_fw_ver >= ElfInfo::FW_45 && result != nullptr) { result->existedMemorySize = existed_size; @@ -1631,15 +1651,23 @@ Error PS4_SYSV_ABI sceSaveDataSyncSaveDataMemory(OrbisSaveDataMemorySync* syncPa LOG_INFO(Lib_SaveData, "called with invalid parameter"); return Error::PARAMETER; } - if (!SaveMemory::IsSaveMemoryInitialized()) { + + u32 slot_id = 0; + if (g_fw_ver > ElfInfo::FW_50) { + slot_id = syncParam->slotId; + } + + if (!SaveMemory::IsSaveMemoryInitialized(slot_id)) { LOG_INFO(Lib_SaveData, "called without save memory initialized"); return Error::MEMORY_NOT_READY; } LOG_DEBUG(Lib_SaveData, "called"); - bool ok = SaveMemory::TriggerSave(); - if (!ok) { - return Error::BUSY_FOR_SAVING; - } + + SaveMemory::PersistMemory(slot_id); + const auto& save_path = SaveMemory::GetSaveDir(slot_id); + Backup::NewRequest(syncParam->userId, g_game_serial, save_path, + OrbisSaveDataEventType::SAVE_DATA_MEMORY_SYNC); + return Error::OK; } diff --git a/src/core/libraries/system/sysmodule.cpp b/src/core/libraries/system/sysmodule.cpp index 350f1317b..6c73764f2 100644 --- a/src/core/libraries/system/sysmodule.cpp +++ b/src/core/libraries/system/sysmodule.cpp @@ -7,6 +7,7 @@ #include "common/logging/log.h" #include "core/libraries/error_codes.h" +#include "core/libraries/kernel/process.h" #include "core/libraries/libs.h" #include "core/libraries/system/sysmodule.h" #include "core/libraries/system/system_error.h" @@ -18,9 +19,12 @@ int PS4_SYSV_ABI sceSysmoduleGetModuleHandleInternal() { return ORBIS_OK; } -int PS4_SYSV_ABI sceSysmoduleGetModuleInfoForUnwind() { +s32 PS4_SYSV_ABI sceSysmoduleGetModuleInfoForUnwind(VAddr addr, s32 flags, void* info) { LOG_ERROR(Lib_SysModule, "(STUBBED) called"); - return ORBIS_OK; + Kernel::OrbisModuleInfoForUnwind module_info; + module_info.st_size = 0x130; + s32 res = Kernel::sceKernelGetModuleInfoForUnwind(addr, flags, &module_info); + return res; } int PS4_SYSV_ABI sceSysmoduleIsCalledFromSysModule() { diff --git a/src/core/libraries/system/sysmodule.h b/src/core/libraries/system/sysmodule.h index 3630fb58e..dfbdca162 100644 --- a/src/core/libraries/system/sysmodule.h +++ b/src/core/libraries/system/sysmodule.h @@ -152,7 +152,7 @@ enum class OrbisSysModuleInternal : u32 { }; int PS4_SYSV_ABI sceSysmoduleGetModuleHandleInternal(); -int PS4_SYSV_ABI sceSysmoduleGetModuleInfoForUnwind(); +s32 PS4_SYSV_ABI sceSysmoduleGetModuleInfoForUnwind(VAddr addr, s32 flags, void* info); int PS4_SYSV_ABI sceSysmoduleIsCalledFromSysModule(); int PS4_SYSV_ABI sceSysmoduleIsCameraPreloaded(); int PS4_SYSV_ABI sceSysmoduleIsLoaded(OrbisSysModule id); diff --git a/src/core/libraries/system/systemservice.cpp b/src/core/libraries/system/systemservice.cpp index ebb9f4392..9dc9dd781 100644 --- a/src/core/libraries/system/systemservice.cpp +++ b/src/core/libraries/system/systemservice.cpp @@ -10,6 +10,8 @@ namespace Libraries::SystemService { bool g_splash_status{true}; +std::queue g_event_queue; +std::mutex g_event_queue_mutex; bool IsSplashVisible() { return Config::showSplash() && g_splash_status; @@ -1772,7 +1774,9 @@ s32 PS4_SYSV_ABI sceSystemServiceGetStatus(OrbisSystemServiceStatus* status) { LOG_ERROR(Lib_SystemService, "OrbisSystemServiceStatus is null"); return ORBIS_SYSTEM_SERVICE_ERROR_PARAMETER; } - status->event_num = 0; + + std::lock_guard lock(g_event_queue_mutex); + status->event_num = static_cast(g_event_queue.size()); status->is_system_ui_overlaid = false; status->is_in_background_execution = false; status->is_cpu_mode7_cpu_normal = true; @@ -1889,7 +1893,7 @@ int PS4_SYSV_ABI sceSystemServiceNavigateToGoHome() { s32 PS4_SYSV_ABI sceSystemServiceParamGetInt(OrbisSystemServiceParamId param_id, int* value) { // TODO this probably should be stored in config for UI configuration - LOG_INFO(Lib_SystemService, "called param_id {}", u32(param_id)); + LOG_DEBUG(Lib_SystemService, "called param_id {}", u32(param_id)); if (value == nullptr) { LOG_ERROR(Lib_SystemService, "value is null"); return ORBIS_SYSTEM_SERVICE_ERROR_PARAMETER; @@ -1940,11 +1944,19 @@ int PS4_SYSV_ABI sceSystemServiceRaiseExceptionLocalProcess() { } s32 PS4_SYSV_ABI sceSystemServiceReceiveEvent(OrbisSystemServiceEvent* event) { - LOG_ERROR(Lib_SystemService, "(STUBBED) called"); + LOG_TRACE(Lib_SystemService, "called"); if (event == nullptr) { return ORBIS_SYSTEM_SERVICE_ERROR_PARAMETER; } - return ORBIS_SYSTEM_SERVICE_ERROR_NO_EVENT; + + std::lock_guard lock(g_event_queue_mutex); + if (g_event_queue.empty()) { + return ORBIS_SYSTEM_SERVICE_ERROR_NO_EVENT; + } + + *event = g_event_queue.front(); + g_event_queue.pop(); + return ORBIS_OK; } int PS4_SYSV_ABI sceSystemServiceReenableMusicPlayer() { @@ -2412,6 +2424,11 @@ int PS4_SYSV_ABI Func_CB5E885E225F69F0() { return ORBIS_OK; } +void PushSystemServiceEvent(const OrbisSystemServiceEvent& event) { + std::lock_guard lock(g_event_queue_mutex); + g_event_queue.push(event); +} + void RegisterlibSceSystemService(Core::Loader::SymbolsResolver* sym) { LIB_FUNCTION("alZfRdr2RP8", "libSceAppMessaging", 1, "libSceSystemService", 1, 1, sceAppMessagingClearEventFlag); diff --git a/src/core/libraries/system/systemservice.h b/src/core/libraries/system/systemservice.h index cdd3c15e8..c22ccc88f 100644 --- a/src/core/libraries/system/systemservice.h +++ b/src/core/libraries/system/systemservice.h @@ -4,6 +4,8 @@ // https://github.com/OpenOrbis/OpenOrbis-PS4-Toolchain/blob/master/include/orbis/_types/sys_service.h #pragma once +#include +#include #include "common/types.h" namespace Core::Loader { @@ -603,5 +605,7 @@ int PS4_SYSV_ABI sceSystemServiceReenableVoiceRecognition(); int PS4_SYSV_ABI Func_6B1CDB955F0EBD65(); int PS4_SYSV_ABI Func_CB5E885E225F69F0(); +void PushSystemServiceEvent(const OrbisSystemServiceEvent& event); + void RegisterlibSceSystemService(Core::Loader::SymbolsResolver* sym); } // namespace Libraries::SystemService diff --git a/src/core/libraries/system/userservice.cpp b/src/core/libraries/system/userservice.cpp index e1f9f75e8..b4bf189ea 100644 --- a/src/core/libraries/system/userservice.cpp +++ b/src/core/libraries/system/userservice.cpp @@ -1043,7 +1043,7 @@ int PS4_SYSV_ABI sceUserServiceGetTraditionalChineseInputType() { s32 PS4_SYSV_ABI sceUserServiceGetUserColor(int user_id, OrbisUserServiceUserColor* color) { // TODO fix me better - LOG_INFO(Lib_UserService, "called user_id = {}", user_id); + LOG_DEBUG(Lib_UserService, "called user_id = {}", user_id); if (color == nullptr) { LOG_ERROR(Lib_UserService, "color is null"); return ORBIS_USER_SERVICE_ERROR_INVALID_ARGUMENT; @@ -1068,7 +1068,7 @@ int PS4_SYSV_ABI sceUserServiceGetUserGroupNum() { } s32 PS4_SYSV_ABI sceUserServiceGetUserName(int user_id, char* user_name, std::size_t size) { - LOG_INFO(Lib_UserService, "called user_id = {} ,size = {} ", user_id, size); + LOG_DEBUG(Lib_UserService, "called user_id = {} ,size = {} ", user_id, size); if (user_name == nullptr) { LOG_ERROR(Lib_UserService, "user_name is null"); return ORBIS_USER_SERVICE_ERROR_INVALID_ARGUMENT; diff --git a/src/core/libraries/videodec/videodec.cpp b/src/core/libraries/videodec/videodec.cpp index 6c9a9b8c0..02ea61509 100644 --- a/src/core/libraries/videodec/videodec.cpp +++ b/src/core/libraries/videodec/videodec.cpp @@ -9,7 +9,7 @@ namespace Libraries::Videodec { -static constexpr u64 kMinimumMemorySize = 32_MB; ///> Fake minimum memory size for querying +static constexpr u64 kMinimumMemorySize = 16_MB; ///> Fake minimum memory size for querying int PS4_SYSV_ABI sceVideodecCreateDecoder(const OrbisVideodecConfigInfo* pCfgInfoIn, const OrbisVideodecResourceInfo* pRsrcInfoIn, diff --git a/src/core/libraries/videodec/videodec2.cpp b/src/core/libraries/videodec/videodec2.cpp index 07f7a274b..a7e520b41 100644 --- a/src/core/libraries/videodec/videodec2.cpp +++ b/src/core/libraries/videodec/videodec2.cpp @@ -10,7 +10,7 @@ namespace Libraries::Vdec2 { -static constexpr u64 kMinimumMemorySize = 32_MB; ///> Fake minimum memory size for querying +static constexpr u64 kMinimumMemorySize = 16_MB; ///> Fake minimum memory size for querying s32 PS4_SYSV_ABI sceVideodec2QueryComputeMemoryInfo(OrbisVideodec2ComputeMemoryInfo* computeMemInfo) { diff --git a/src/core/libraries/videoout/driver.cpp b/src/core/libraries/videoout/driver.cpp index f6c25afe3..8f725e549 100644 --- a/src/core/libraries/videoout/driver.cpp +++ b/src/core/libraries/videoout/driver.cpp @@ -1,8 +1,6 @@ // SPDX-FileCopyrightText: Copyright 2024 shadPS4 Emulator Project // SPDX-License-Identifier: GPL-2.0-or-later -#include - #include "common/assert.h" #include "common/config.h" #include "common/debug.h" @@ -11,6 +9,7 @@ #include "core/libraries/kernel/time.h" #include "core/libraries/videoout/driver.h" #include "core/libraries/videoout/videoout_error.h" +#include "imgui/renderer/imgui_core.h" #include "video_core/renderer_vulkan/vk_presenter.h" extern std::unique_ptr presenter; @@ -64,6 +63,7 @@ void VideoOutDriver::Close(s32 handle) { main_port.is_open = false; main_port.flip_rate = 0; + main_port.prev_index = -1; ASSERT(main_port.flip_events.empty()); } @@ -134,6 +134,10 @@ int VideoOutDriver::RegisterBuffers(VideoOutPort* port, s32 startIndex, void* co .address_right = 0, }; + // Reset flip label also when registering buffer + port->buffer_labels[startIndex + i] = 0; + port->SignalVoLabel(); + presenter->RegisterVideoOutSurface(group, address); LOG_INFO(Lib_VideoOut, "buffers[{}] = {:#x}", i + startIndex, address); } @@ -161,11 +165,8 @@ int VideoOutDriver::UnregisterBuffers(VideoOutPort* port, s32 attributeIndex) { } void VideoOutDriver::Flip(const Request& req) { - // Whatever the game is rendering show splash if it is active - if (!presenter->ShowSplash(req.frame)) { - // Present the frame. - presenter->Present(req.frame); - } + // Present the frame. + presenter->Present(req.frame); // Update flip status. auto* port = req.port; @@ -186,27 +187,35 @@ void VideoOutDriver::Flip(const Request& req) { // Trigger flip events for the port. for (auto& event : port->flip_events) { if (event != nullptr) { - event->TriggerEvent(u64(OrbisVideoOutEventId::Flip), - Kernel::SceKernelEvent::Filter::VideoOut, - reinterpret_cast(req.flip_arg)); + event->TriggerEvent( + static_cast(OrbisVideoOutInternalEventId::Flip), + Kernel::SceKernelEvent::Filter::VideoOut, + reinterpret_cast(static_cast(OrbisVideoOutInternalEventId::Flip) | + (req.flip_arg << 16))); } } - // Reset flip label - if (req.index != -1) { - port->buffer_labels[req.index] = 0; + // Reset prev flip label + if (port->prev_index != -1) { + port->buffer_labels[port->prev_index] = 0; port->SignalVoLabel(); } + // save to prev buf index + port->prev_index = req.index; } void VideoOutDriver::DrawBlankFrame() { - if (presenter->ShowSplash(nullptr)) { - return; - } const auto empty_frame = presenter->PrepareBlankFrame(false); presenter->Present(empty_frame); } +void VideoOutDriver::DrawLastFrame() { + const auto frame = presenter->PrepareLastFrame(); + if (frame != nullptr) { + presenter->Present(frame, true); + } +} + bool VideoOutDriver::SubmitFlip(VideoOutPort* port, s32 index, s64 flip_arg, bool is_eop /*= false*/) { { @@ -278,17 +287,26 @@ void VideoOutDriver::PresentThread(std::stop_token token) { return {}; }; - auto delay = std::chrono::microseconds{0}; while (!token.stop_requested()) { timer.Start(); + if (DebugState.IsGuestThreadsPaused()) { + DrawLastFrame(); + timer.End(); + continue; + } + // Check if it's time to take a request. auto& vblank_status = main_port.vblank_status; if (vblank_status.count % (main_port.flip_rate + 1) == 0) { const auto request = receive_request(); if (!request) { - if (!main_port.is_open || DebugState.IsGuestThreadsPaused()) { - DrawBlankFrame(); + if (timer.GetTotalWait().count() < 0) { // Dont draw too fast + if (!main_port.is_open) { + DrawBlankFrame(); + } else if (ImGui::Core::MustKeepDrawing()) { + DrawLastFrame(); + } } } else { Flip(request); @@ -308,7 +326,7 @@ void VideoOutDriver::PresentThread(std::stop_token token) { // Trigger flip events for the port. for (auto& event : main_port.vblank_events) { if (event != nullptr) { - event->TriggerEvent(u64(OrbisVideoOutEventId::Vblank), + event->TriggerEvent(static_cast(OrbisVideoOutInternalEventId::Vblank), Kernel::SceKernelEvent::Filter::VideoOut, nullptr); } } diff --git a/src/core/libraries/videoout/driver.h b/src/core/libraries/videoout/driver.h index ec01b621f..3b0df43b9 100644 --- a/src/core/libraries/videoout/driver.h +++ b/src/core/libraries/videoout/driver.h @@ -18,7 +18,6 @@ struct Frame; namespace Libraries::VideoOut { struct VideoOutPort { - bool is_open = false; SceVideoOutResolutionStatus resolution; std::array buffer_slots; std::array buffer_labels; // should be contiguous in memory @@ -33,6 +32,9 @@ struct VideoOutPort { std::condition_variable vo_cv; std::condition_variable vblank_cv; int flip_rate = 0; + int prev_index = -1; + bool is_open = false; + bool is_mode_changing = false; // Used to prevent flip during mode change s32 FindFreeGroup() const { s32 index = 0; @@ -102,7 +104,8 @@ private: }; void Flip(const Request& req); - void DrawBlankFrame(); // Used when there is no flip request to keep ImGui up to date + void DrawBlankFrame(); // Video port out not open + void DrawLastFrame(); // Used when there is no flip request void SubmitFlipInternal(VideoOutPort* port, s32 index, s64 flip_arg, bool is_eop = false); void PresentThread(std::stop_token token); diff --git a/src/core/libraries/videoout/video_out.cpp b/src/core/libraries/videoout/video_out.cpp index 78a2b11a4..219d0886b 100644 --- a/src/core/libraries/videoout/video_out.cpp +++ b/src/core/libraries/videoout/video_out.cpp @@ -3,6 +3,7 @@ #include "common/assert.h" #include "common/config.h" +#include "common/elf_info.h" #include "common/logging/log.h" #include "core/libraries/libs.h" #include "core/libraries/system/userservice.h" @@ -50,7 +51,7 @@ s32 PS4_SYSV_ABI sceVideoOutAddFlipEvent(Kernel::SceKernelEqueue eq, s32 handle, } Kernel::EqueueEvent event{}; - event.event.ident = u64(OrbisVideoOutEventId::Flip); + event.event.ident = static_cast(OrbisVideoOutInternalEventId::Flip); event.event.filter = Kernel::SceKernelEvent::Filter::VideoOut; event.event.flags = Kernel::SceKernelEvent::Flags::Add; event.event.udata = udata; @@ -63,6 +64,20 @@ s32 PS4_SYSV_ABI sceVideoOutAddFlipEvent(Kernel::SceKernelEqueue eq, s32 handle, return ORBIS_OK; } +s32 PS4_SYSV_ABI sceVideoOutDeleteFlipEvent(Kernel::SceKernelEqueue eq, s32 handle) { + auto* port = driver->GetPort(handle); + if (port == nullptr) { + return ORBIS_VIDEO_OUT_ERROR_INVALID_HANDLE; + } + + if (eq == nullptr) { + return ORBIS_VIDEO_OUT_ERROR_INVALID_EVENT_QUEUE; + } + eq->RemoveEvent(handle, Kernel::SceKernelEvent::Filter::VideoOut); + port->flip_events.erase(find(port->flip_events.begin(), port->flip_events.end(), eq)); + return ORBIS_OK; +} + s32 PS4_SYSV_ABI sceVideoOutAddVblankEvent(Kernel::SceKernelEqueue eq, s32 handle, void* udata) { LOG_INFO(Lib_VideoOut, "handle = {}", handle); @@ -76,7 +91,7 @@ s32 PS4_SYSV_ABI sceVideoOutAddVblankEvent(Kernel::SceKernelEqueue eq, s32 handl } Kernel::EqueueEvent event{}; - event.event.ident = u64(OrbisVideoOutEventId::Vblank); + event.event.ident = static_cast(OrbisVideoOutInternalEventId::Vblank); event.event.filter = Kernel::SceKernelEvent::Filter::VideoOut; event.event.flags = Kernel::SceKernelEvent::Flags::Add; event.event.udata = udata; @@ -156,9 +171,27 @@ int PS4_SYSV_ABI sceVideoOutGetEventId(const Kernel::SceKernelEvent* ev) { return ORBIS_VIDEO_OUT_ERROR_INVALID_ADDRESS; } if (ev->filter != Kernel::SceKernelEvent::Filter::VideoOut) { - return ORBIS_VIDEO_OUT_ERROR_INVALID_EVENT_QUEUE; + return ORBIS_VIDEO_OUT_ERROR_INVALID_EVENT; + } + + OrbisVideoOutInternalEventId internal_event_id = + static_cast(ev->ident); + switch (internal_event_id) { + case OrbisVideoOutInternalEventId::Flip: + return static_cast(OrbisVideoOutEventId::Flip); + case OrbisVideoOutInternalEventId::Vblank: + case OrbisVideoOutInternalEventId::SysVblank: + return static_cast(OrbisVideoOutEventId::Vblank); + case OrbisVideoOutInternalEventId::PreVblankStart: + return static_cast(OrbisVideoOutEventId::PreVblankStart); + case OrbisVideoOutInternalEventId::SetMode: + return static_cast(OrbisVideoOutEventId::SetMode); + case OrbisVideoOutInternalEventId::Position: + return static_cast(OrbisVideoOutEventId::Position); + default: { + return ORBIS_VIDEO_OUT_ERROR_INVALID_EVENT; + } } - return ev->ident; } int PS4_SYSV_ABI sceVideoOutGetEventData(const Kernel::SceKernelEvent* ev, int64_t* data) { @@ -166,10 +199,15 @@ int PS4_SYSV_ABI sceVideoOutGetEventData(const Kernel::SceKernelEvent* ev, int64 return ORBIS_VIDEO_OUT_ERROR_INVALID_ADDRESS; } if (ev->filter != Kernel::SceKernelEvent::Filter::VideoOut) { - return ORBIS_VIDEO_OUT_ERROR_INVALID_EVENT_QUEUE; + return ORBIS_VIDEO_OUT_ERROR_INVALID_EVENT; } - *data = ev->data; + auto event_data = ev->data >> 0x10; + if (ev->ident != static_cast(OrbisVideoOutInternalEventId::Flip) || ev->data == 0) { + *data = event_data; + } else { + *data = event_data | 0xFFFF000000000000; + } return ORBIS_OK; } @@ -257,10 +295,16 @@ s32 PS4_SYSV_ABI sceVideoOutUnregisterBuffers(s32 handle, s32 attributeIndex) { return driver->UnregisterBuffers(port, attributeIndex); } -void sceVideoOutGetBufferLabelAddress(s32 handle, uintptr_t* label_addr) { +s32 PS4_SYSV_ABI sceVideoOutGetBufferLabelAddress(s32 handle, uintptr_t* label_addr) { + if (label_addr == nullptr) { + return ORBIS_VIDEO_OUT_ERROR_INVALID_ADDRESS; + } auto* port = driver->GetPort(handle); - ASSERT(port); + if (!port) { + return ORBIS_VIDEO_OUT_ERROR_INVALID_HANDLE; + } *label_addr = reinterpret_cast(port->buffer_labels.data()); + return 16; } s32 sceVideoOutSubmitEopFlip(s32 handle, u32 buf_id, u32 mode, u32 arg, void** unk) { @@ -283,6 +327,12 @@ s32 sceVideoOutSubmitEopFlip(s32 handle, u32 buf_id, u32 mode, u32 arg, void** u s32 PS4_SYSV_ABI sceVideoOutGetDeviceCapabilityInfo( s32 handle, SceVideoOutDeviceCapabilityInfo* pDeviceCapabilityInfo) { pDeviceCapabilityInfo->capability = 0; + if (presenter->IsHDRSupported()) { + auto& game_info = Common::ElfInfo::Instance(); + if (game_info.GetPSFAttributes().support_hdr) { + pDeviceCapabilityInfo->capability |= ORBIS_VIDEO_OUT_DEVICE_CAPABILITY_BT2020_PQ; + } + } return ORBIS_OK; } @@ -316,7 +366,50 @@ s32 PS4_SYSV_ABI sceVideoOutAdjustColor(s32 handle, const SceVideoOutColorSettin return ORBIS_VIDEO_OUT_ERROR_INVALID_HANDLE; } - presenter->GetGammaRef() = settings->gamma; + presenter->GetPPSettingsRef().gamma = settings->gamma; + return ORBIS_OK; +} + +struct Mode { + u32 size; + u8 encoding; + u8 range; + u8 colorimetry; + u8 depth; + u64 refresh_rate; + u64 resolution; + u8 reserved[8]; +}; + +void PS4_SYSV_ABI sceVideoOutModeSetAny_(Mode* mode, u32 size) { + std::memset(mode, 0xff, size); + mode->size = size; +} + +s32 PS4_SYSV_ABI sceVideoOutConfigureOutputMode_(s32 handle, u32 reserved, const Mode* mode, + const void* options, u32 size_mode, + u32 size_options) { + auto* port = driver->GetPort(handle); + if (!port) { + return ORBIS_VIDEO_OUT_ERROR_INVALID_HANDLE; + } + + if (reserved != 0) { + return ORBIS_VIDEO_OUT_ERROR_INVALID_VALUE; + } + + if (mode->colorimetry != OrbisVideoOutColorimetry::Any) { + auto& game_info = Common::ElfInfo::Instance(); + if (mode->colorimetry == OrbisVideoOutColorimetry::Bt2020PQ && + game_info.GetPSFAttributes().support_hdr) { + port->is_mode_changing = true; + presenter->SetHDR(true); + port->is_mode_changing = false; + } else { + return ORBIS_VIDEO_OUT_ERROR_INVALID_VALUE; + } + } + return ORBIS_OK; } @@ -343,6 +436,8 @@ void RegisterLib(Core::Loader::SymbolsResolver* sym) { sceVideoOutIsFlipPending); LIB_FUNCTION("N5KDtkIjjJ4", "libSceVideoOut", 1, "libSceVideoOut", 0, 0, sceVideoOutUnregisterBuffers); + LIB_FUNCTION("OcQybQejHEY", "libSceVideoOut", 1, "libSceVideoOut", 0, 0, + sceVideoOutGetBufferLabelAddress); LIB_FUNCTION("uquVH4-Du78", "libSceVideoOut", 1, "libSceVideoOut", 0, 0, sceVideoOutClose); LIB_FUNCTION("1FZBKy8HeNU", "libSceVideoOut", 1, "libSceVideoOut", 0, 0, sceVideoOutGetVblankStatus); @@ -356,6 +451,12 @@ void RegisterLib(Core::Loader::SymbolsResolver* sym) { sceVideoOutColorSettingsSetGamma); LIB_FUNCTION("pv9CI5VC+R0", "libSceVideoOut", 1, "libSceVideoOut", 0, 0, sceVideoOutAdjustColor); + LIB_FUNCTION("-Ozn0F1AFRg", "libSceVideoOut", 1, "libSceVideoOut", 0, 0, + sceVideoOutDeleteFlipEvent); + LIB_FUNCTION("pjkDsgxli6c", "libSceVideoOut", 1, "libSceVideoOut", 0, 0, + sceVideoOutModeSetAny_); + LIB_FUNCTION("N1bEoJ4SRw4", "libSceVideoOut", 1, "libSceVideoOut", 0, 0, + sceVideoOutConfigureOutputMode_); // openOrbis appears to have libSceVideoOut_v1 module libSceVideoOut_v1.1 LIB_FUNCTION("Up36PTk687E", "libSceVideoOut", 1, "libSceVideoOut", 1, 1, sceVideoOutOpen); @@ -367,6 +468,8 @@ void RegisterLib(Core::Loader::SymbolsResolver* sym) { sceVideoOutSetBufferAttribute); LIB_FUNCTION("w3BY+tAEiQY", "libSceVideoOut", 1, "libSceVideoOut", 1, 1, sceVideoOutRegisterBuffers); + LIB_FUNCTION("OcQybQejHEY", "libSceVideoOut", 1, "libSceVideoOut", 1, 1, + sceVideoOutGetBufferLabelAddress); LIB_FUNCTION("U46NwOiJpys", "libSceVideoOut", 1, "libSceVideoOut", 1, 1, sceVideoOutSubmitFlip); LIB_FUNCTION("SbU3dwp80lQ", "libSceVideoOut", 1, "libSceVideoOut", 1, 1, sceVideoOutGetFlipStatus); diff --git a/src/core/libraries/videoout/video_out.h b/src/core/libraries/videoout/video_out.h index 5af9d550d..f3e661de4 100644 --- a/src/core/libraries/videoout/video_out.h +++ b/src/core/libraries/videoout/video_out.h @@ -40,7 +40,29 @@ constexpr int SCE_VIDEO_OUT_BUFFER_ATTRIBUTE_OPTION_NONE = 0; constexpr int SCE_VIDEO_OUT_BUFFER_ATTRIBUTE_OPTION_VR = 7; constexpr int SCE_VIDEO_OUT_BUFFER_ATTRIBUTE_OPTION_STRICT_COLORIMETRY = 8; -enum class OrbisVideoOutEventId : s16 { Flip = 0, Vblank = 1, PreVblankStart = 2 }; +constexpr int ORBIS_VIDEO_OUT_DEVICE_CAPABILITY_BT2020_PQ = 0x80; + +enum OrbisVideoOutColorimetry : u8 { + Bt2020PQ = 12, + Any = 0xFF, +}; + +enum class OrbisVideoOutEventId : s16 { + Flip = 0, + Vblank = 1, + PreVblankStart = 2, + SetMode = 8, + Position = 12, +}; + +enum class OrbisVideoOutInternalEventId : s16 { + Flip = 0x6, + Vblank = 0x7, + SetMode = 0x51, + Position = 0x58, + PreVblankStart = 0x59, + SysVblank = 0x63, +}; enum class AspectRatioMode : s32 { Ratio16_9 = 0, @@ -96,6 +118,7 @@ s32 PS4_SYSV_ABI sceVideoOutAddFlipEvent(Kernel::SceKernelEqueue eq, s32 handle, s32 PS4_SYSV_ABI sceVideoOutAddVblankEvent(Kernel::SceKernelEqueue eq, s32 handle, void* udata); s32 PS4_SYSV_ABI sceVideoOutRegisterBuffers(s32 handle, s32 startIndex, void* const* addresses, s32 bufferNum, const BufferAttribute* attribute); +s32 PS4_SYSV_ABI sceVideoOutGetBufferLabelAddress(s32 handle, uintptr_t* label_addr); s32 PS4_SYSV_ABI sceVideoOutSetFlipRate(s32 handle, s32 rate); s32 PS4_SYSV_ABI sceVideoOutIsFlipPending(s32 handle); s32 PS4_SYSV_ABI sceVideoOutWaitVblank(s32 handle); @@ -111,7 +134,6 @@ s32 PS4_SYSV_ABI sceVideoOutColorSettingsSetGamma(SceVideoOutColorSettings* sett s32 PS4_SYSV_ABI sceVideoOutAdjustColor(s32 handle, const SceVideoOutColorSettings* settings); // Internal system functions -void sceVideoOutGetBufferLabelAddress(s32 handle, uintptr_t* label_addr); s32 sceVideoOutSubmitEopFlip(s32 handle, u32 buf_id, u32 mode, u32 arg, void** unk); void RegisterLib(Core::Loader::SymbolsResolver* sym); diff --git a/src/core/libraries/web_browser_dialog/webbrowserdialog.cpp b/src/core/libraries/web_browser_dialog/webbrowserdialog.cpp new file mode 100644 index 000000000..ee434f96a --- /dev/null +++ b/src/core/libraries/web_browser_dialog/webbrowserdialog.cpp @@ -0,0 +1,112 @@ +// SPDX-FileCopyrightText: Copyright 2024 shadPS4 Emulator Project +// SPDX-License-Identifier: GPL-2.0-or-later + +#include "common/logging/log.h" +#include "core/libraries/error_codes.h" +#include "core/libraries/libs.h" +#include "core/libraries/web_browser_dialog/webbrowserdialog.h" + +namespace Libraries::WebBrowserDialog { + +s32 PS4_SYSV_ABI sceWebBrowserDialogClose() { + LOG_ERROR(Lib_WebBrowserDialog, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI sceWebBrowserDialogGetEvent() { + LOG_ERROR(Lib_WebBrowserDialog, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI sceWebBrowserDialogGetResult() { + LOG_ERROR(Lib_WebBrowserDialog, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI sceWebBrowserDialogGetStatus() { + LOG_ERROR(Lib_WebBrowserDialog, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI sceWebBrowserDialogInitialize() { + LOG_ERROR(Lib_WebBrowserDialog, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI sceWebBrowserDialogNavigate() { + LOG_ERROR(Lib_WebBrowserDialog, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI sceWebBrowserDialogOpen() { + LOG_ERROR(Lib_WebBrowserDialog, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI sceWebBrowserDialogOpenForPredeterminedContent() { + LOG_ERROR(Lib_WebBrowserDialog, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI sceWebBrowserDialogResetCookie() { + LOG_ERROR(Lib_WebBrowserDialog, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI sceWebBrowserDialogSetCookie() { + LOG_ERROR(Lib_WebBrowserDialog, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI sceWebBrowserDialogSetZoom() { + LOG_ERROR(Lib_WebBrowserDialog, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI sceWebBrowserDialogTerminate() { + LOG_ERROR(Lib_WebBrowserDialog, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI sceWebBrowserDialogUpdateStatus() { + LOG_ERROR(Lib_WebBrowserDialog, "(STUBBED) called"); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI Func_F2BE042771625F8C() { + LOG_ERROR(Lib_WebBrowserDialog, "(STUBBED) called"); + return ORBIS_OK; +} + +void RegisterlibSceWebBrowserDialog(Core::Loader::SymbolsResolver* sym) { + LIB_FUNCTION("PSK+Eik919Q", "libSceWebBrowserDialog", 1, "libSceWebBrowserDialog", 1, 1, + sceWebBrowserDialogClose); + LIB_FUNCTION("Wit4LjeoeX4", "libSceWebBrowserDialog", 1, "libSceWebBrowserDialog", 1, 1, + sceWebBrowserDialogGetEvent); + LIB_FUNCTION("vCaW0fgVQmc", "libSceWebBrowserDialog", 1, "libSceWebBrowserDialog", 1, 1, + sceWebBrowserDialogGetResult); + LIB_FUNCTION("CFTG6a8TjOU", "libSceWebBrowserDialog", 1, "libSceWebBrowserDialog", 1, 1, + sceWebBrowserDialogGetStatus); + LIB_FUNCTION("jqb7HntFQFc", "libSceWebBrowserDialog", 1, "libSceWebBrowserDialog", 1, 1, + sceWebBrowserDialogInitialize); + LIB_FUNCTION("uYELOMVnmNQ", "libSceWebBrowserDialog", 1, "libSceWebBrowserDialog", 1, 1, + sceWebBrowserDialogNavigate); + LIB_FUNCTION("FraP7debcdg", "libSceWebBrowserDialog", 1, "libSceWebBrowserDialog", 1, 1, + sceWebBrowserDialogOpen); + LIB_FUNCTION("O7dIZQrwVFY", "libSceWebBrowserDialog", 1, "libSceWebBrowserDialog", 1, 1, + sceWebBrowserDialogOpenForPredeterminedContent); + LIB_FUNCTION("Cya+jvTtPqg", "libSceWebBrowserDialog", 1, "libSceWebBrowserDialog", 1, 1, + sceWebBrowserDialogResetCookie); + LIB_FUNCTION("TZnDVkP91Rg", "libSceWebBrowserDialog", 1, "libSceWebBrowserDialog", 1, 1, + sceWebBrowserDialogSetCookie); + LIB_FUNCTION("RLhKBOoNyXY", "libSceWebBrowserDialog", 1, "libSceWebBrowserDialog", 1, 1, + sceWebBrowserDialogSetZoom); + LIB_FUNCTION("ocHtyBwHfys", "libSceWebBrowserDialog", 1, "libSceWebBrowserDialog", 1, 1, + sceWebBrowserDialogTerminate); + LIB_FUNCTION("h1dR-t5ISgg", "libSceWebBrowserDialog", 1, "libSceWebBrowserDialog", 1, 1, + sceWebBrowserDialogUpdateStatus); + LIB_FUNCTION("8r4EJ3FiX4w", "libSceWebBrowserDialogLimited", 1, "libSceWebBrowserDialog", 1, 1, + Func_F2BE042771625F8C); +}; + +} // namespace Libraries::WebBrowserDialog \ No newline at end of file diff --git a/src/core/libraries/web_browser_dialog/webbrowserdialog.h b/src/core/libraries/web_browser_dialog/webbrowserdialog.h new file mode 100644 index 000000000..aa118fe45 --- /dev/null +++ b/src/core/libraries/web_browser_dialog/webbrowserdialog.h @@ -0,0 +1,30 @@ +// SPDX-FileCopyrightText: Copyright 2024 shadPS4 Emulator Project +// SPDX-License-Identifier: GPL-2.0-or-later + +#pragma once + +#include "common/types.h" + +namespace Core::Loader { +class SymbolsResolver; +} + +namespace Libraries::WebBrowserDialog { + +s32 PS4_SYSV_ABI sceWebBrowserDialogClose(); +s32 PS4_SYSV_ABI sceWebBrowserDialogGetEvent(); +s32 PS4_SYSV_ABI sceWebBrowserDialogGetResult(); +s32 PS4_SYSV_ABI sceWebBrowserDialogGetStatus(); +s32 PS4_SYSV_ABI sceWebBrowserDialogInitialize(); +s32 PS4_SYSV_ABI sceWebBrowserDialogNavigate(); +s32 PS4_SYSV_ABI sceWebBrowserDialogOpen(); +s32 PS4_SYSV_ABI sceWebBrowserDialogOpenForPredeterminedContent(); +s32 PS4_SYSV_ABI sceWebBrowserDialogResetCookie(); +s32 PS4_SYSV_ABI sceWebBrowserDialogSetCookie(); +s32 PS4_SYSV_ABI sceWebBrowserDialogSetZoom(); +s32 PS4_SYSV_ABI sceWebBrowserDialogTerminate(); +s32 PS4_SYSV_ABI sceWebBrowserDialogUpdateStatus(); +s32 PS4_SYSV_ABI Func_F2BE042771625F8C(); + +void RegisterlibSceWebBrowserDialog(Core::Loader::SymbolsResolver* sym); +} // namespace Libraries::WebBrowserDialog \ No newline at end of file diff --git a/src/core/libraries/zlib/zlib.cpp b/src/core/libraries/zlib/zlib.cpp new file mode 100644 index 000000000..899cb5bf6 --- /dev/null +++ b/src/core/libraries/zlib/zlib.cpp @@ -0,0 +1,183 @@ +// SPDX-FileCopyrightText: Copyright 2024 shadPS4 Emulator Project +// SPDX-License-Identifier: GPL-2.0-or-later + +#include +#include +#include +#include +#include +#include + +#include "common/logging/log.h" +#include "common/thread.h" +#include "core/libraries/kernel/threads.h" +#include "core/libraries/libs.h" +#include "core/libraries/zlib/zlib_error.h" +#include "core/libraries/zlib/zlib_sce.h" + +namespace Libraries::Zlib { + +struct InflateTask { + u64 request_id; + const void* src; + u32 src_length; + void* dst; + u32 dst_length; +}; + +struct InflateResult { + u32 length; + s32 status; +}; + +static Kernel::Thread task_thread; + +static std::mutex mutex; +static std::queue task_queue; +static std::condition_variable_any task_queue_cv; +static std::queue done_queue; +static std::condition_variable_any done_queue_cv; +static std::unordered_map results; +static u64 next_request_id; + +void ZlibTaskThread(const std::stop_token& stop) { + Common::SetCurrentThreadName("shadPS4:ZlibTaskThread"); + + while (!stop.stop_requested()) { + InflateTask task; + { + // Lock and pop from the task queue, unless stop has been requested. + std::unique_lock lock(mutex); + if (!task_queue_cv.wait(lock, stop, [&] { return !task_queue.empty(); })) { + break; + } + task = task_queue.back(); + task_queue.pop(); + } + + uLongf decompressed_length = task.dst_length; + const auto ret = uncompress(static_cast(task.dst), &decompressed_length, + static_cast(task.src), task.src_length); + + { + // Lock, insert the new result, and push the finished request ID to the done queue. + std::unique_lock lock(mutex); + results[task.request_id] = InflateResult{ + .length = static_cast(decompressed_length), + .status = ret == Z_BUF_ERROR ? ORBIS_ZLIB_ERROR_NOSPACE + : ret == Z_OK ? ORBIS_OK + : ORBIS_ZLIB_ERROR_FATAL, + }; + done_queue.push(task.request_id); + } + done_queue_cv.notify_one(); + } +} + +s32 PS4_SYSV_ABI sceZlibInitialize(const void* buffer, u32 length) { + LOG_INFO(Lib_Zlib, "called"); + if (task_thread.Joinable()) { + return ORBIS_ZLIB_ERROR_ALREADY_INITIALIZED; + } + + // Initialize with empty task data + task_queue = std::queue(); + done_queue = std::queue(); + results.clear(); + next_request_id = 1; + + task_thread.Run([](const std::stop_token& stop) { ZlibTaskThread(stop); }); + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI sceZlibInflate(const void* src, u32 src_len, void* dst, u32 dst_len, + u64* request_id) { + LOG_DEBUG(Lib_Zlib, "(STUBBED) called"); + if (!task_thread.Joinable()) { + return ORBIS_ZLIB_ERROR_NOT_INITIALIZED; + } + if (!src || !src_len || !dst || !dst_len || !request_id || dst_len > 64_KB || + dst_len % 2_KB != 0) { + return ORBIS_ZLIB_ERROR_INVALID; + } + + { + std::unique_lock lock(mutex); + *request_id = next_request_id++; + task_queue.emplace(InflateTask{ + .request_id = *request_id, + .src = src, + .src_length = src_len, + .dst = dst, + .dst_length = dst_len, + }); + task_queue_cv.notify_one(); + } + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI sceZlibWaitForDone(u64* request_id, const u32* timeout) { + LOG_DEBUG(Lib_Zlib, "(STUBBED) called"); + if (!task_thread.Joinable()) { + return ORBIS_ZLIB_ERROR_NOT_INITIALIZED; + } + if (!request_id) { + return ORBIS_ZLIB_ERROR_INVALID; + } + + { + // Pop from the done queue, unless the timeout is reached. + std::unique_lock lock(mutex); + const auto pred = [] { return !done_queue.empty(); }; + if (timeout) { + if (!done_queue_cv.wait_for(lock, std::chrono::milliseconds(*timeout), pred)) { + return ORBIS_ZLIB_ERROR_TIMEDOUT; + } + } else { + done_queue_cv.wait(lock, pred); + } + *request_id = done_queue.back(); + done_queue.pop(); + } + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI sceZlibGetResult(const u64 request_id, u32* dst_length, s32* status) { + LOG_DEBUG(Lib_Zlib, "(STUBBED) called"); + if (!task_thread.Joinable()) { + return ORBIS_ZLIB_ERROR_NOT_INITIALIZED; + } + if (!dst_length || !status) { + return ORBIS_ZLIB_ERROR_INVALID; + } + + { + std::unique_lock lock(mutex); + if (!results.contains(request_id)) { + return ORBIS_ZLIB_ERROR_NOT_FOUND; + } + const auto result = results[request_id]; + *dst_length = result.length; + *status = result.status; + } + return ORBIS_OK; +} + +s32 PS4_SYSV_ABI sceZlibFinalize() { + LOG_INFO(Lib_Zlib, "called"); + if (!task_thread.Joinable()) { + return ORBIS_ZLIB_ERROR_NOT_INITIALIZED; + } + task_thread.Stop(); + return ORBIS_OK; +} + +void RegisterlibSceZlib(Core::Loader::SymbolsResolver* sym) { + LIB_FUNCTION("m1YErdIXCp4", "libSceZlib", 1, "libSceZlib", 1, 1, sceZlibInitialize); + LIB_FUNCTION("6na+Sa-B83w", "libSceZlib", 1, "libSceZlib", 1, 1, sceZlibFinalize); + LIB_FUNCTION("TLar1HULv1Q", "libSceZlib", 1, "libSceZlib", 1, 1, sceZlibInflate); + LIB_FUNCTION("uB8VlDD4e0s", "libSceZlib", 1, "libSceZlib", 1, 1, sceZlibWaitForDone); + LIB_FUNCTION("2eDcGHC0YaM", "libSceZlib", 1, "libSceZlib", 1, 1, sceZlibGetResult); +}; + +} // namespace Libraries::Zlib diff --git a/src/core/libraries/zlib/zlib_error.h b/src/core/libraries/zlib/zlib_error.h new file mode 100644 index 000000000..59574f0b2 --- /dev/null +++ b/src/core/libraries/zlib/zlib_error.h @@ -0,0 +1,18 @@ +// SPDX-FileCopyrightText: Copyright 2024 shadPS4 Emulator Project +// SPDX-License-Identifier: GPL-2.0-or-later + +#pragma once + +#include "core/libraries/error_codes.h" + +// Zlib library +constexpr int ORBIS_ZLIB_ERROR_NOT_FOUND = 0x81120002; +constexpr int ORBIS_ZLIB_ERROR_BUSY = 0x8112000B; +constexpr int ORBIS_ZLIB_ERROR_FAULT = 0x8112000E; +constexpr int ORBIS_ZLIB_ERROR_INVALID = 0x81120016; +constexpr int ORBIS_ZLIB_ERROR_NOSPACE = 0x8112001C; +constexpr int ORBIS_ZLIB_ERROR_NOT_SUPPORTED = 0x81120025; +constexpr int ORBIS_ZLIB_ERROR_TIMEDOUT = 0x81120027; +constexpr int ORBIS_ZLIB_ERROR_NOT_INITIALIZED = 0x81120032; +constexpr int ORBIS_ZLIB_ERROR_ALREADY_INITIALIZED = 0x81120033; +constexpr int ORBIS_ZLIB_ERROR_FATAL = 0x811200FF; diff --git a/src/core/libraries/zlib/zlib_sce.h b/src/core/libraries/zlib/zlib_sce.h new file mode 100644 index 000000000..6f8cf9468 --- /dev/null +++ b/src/core/libraries/zlib/zlib_sce.h @@ -0,0 +1,21 @@ +// SPDX-FileCopyrightText: Copyright 2024 shadPS4 Emulator Project +// SPDX-License-Identifier: GPL-2.0-or-later + +#pragma once + +#include "common/types.h" + +namespace Core::Loader { +class SymbolsResolver; +} +namespace Libraries::Zlib { + +s32 PS4_SYSV_ABI sceZlibInitialize(const void* buffer, u32 length); +s32 PS4_SYSV_ABI sceZlibInflate(const void* src, u32 src_len, void* dst, u32 dst_len, + u64* request_id); +s32 PS4_SYSV_ABI sceZlibWaitForDone(u64* request_id, const u32* timeout); +s32 PS4_SYSV_ABI sceZlibGetResult(u64 request_id, u32* dst_length, s32* status); +s32 PS4_SYSV_ABI sceZlibFinalize(); + +void RegisterlibSceZlib(Core::Loader::SymbolsResolver* sym); +} // namespace Libraries::Zlib \ No newline at end of file diff --git a/src/core/linker.cpp b/src/core/linker.cpp index 28d2eea7b..18ae62f4b 100644 --- a/src/core/linker.cpp +++ b/src/core/linker.cpp @@ -52,7 +52,7 @@ Linker::Linker() : memory{Memory::Instance()} {} Linker::~Linker() = default; -void Linker::Execute() { +void Linker::Execute(const std::vector args) { if (Config::debugDump()) { DebugDump(); } @@ -101,7 +101,7 @@ void Linker::Execute() { memory->SetupMemoryRegions(fmem_size, use_extended_mem1, use_extended_mem2); - main_thread.Run([this, module](std::stop_token) { + main_thread.Run([this, module, args](std::stop_token) { Common::SetCurrentThreadName("GAME_MainThread"); LoadSharedLibraries(); @@ -109,6 +109,12 @@ void Linker::Execute() { EntryParams params{}; params.argc = 1; params.argv[0] = "eboot.bin"; + if (!args.empty()) { + params.argc = args.size() + 1; + for (int i = 0; i < args.size() && i < 32; i++) { + params.argv[i + 1] = args[i].c_str(); + } + } params.entry_addr = module->GetEntryAddress(); RunMainEntry(¶ms); }); @@ -133,6 +139,35 @@ s32 Linker::LoadModule(const std::filesystem::path& elf_name, bool is_dynamic) { return m_modules.size() - 1; } +s32 Linker::LoadAndStartModule(const std::filesystem::path& path, u64 args, const void* argp, + int* pRes) { + u32 handle = FindByName(path); + if (handle != -1) { + return handle; + } + handle = LoadModule(path, true); + if (handle == -1) { + return -1; + } + auto* module = GetModule(handle); + RelocateAnyImports(module); + + // If the new module has a TLS image, trigger its load when TlsGetAddr is called. + if (module->tls.image_size != 0) { + AdvanceGenerationCounter(); + } + + // Retrieve and verify proc param according to libkernel. + u64* param = module->GetProcParam(); + ASSERT_MSG(!param || param[0] >= 0x18, "Invalid module param size: {}", param[0]); + s32 ret = module->Start(args, argp, param); + if (pRes) { + *pRes = ret; + } + + return handle; +} + Module* Linker::FindByAddress(VAddr address) { for (auto& module : m_modules) { const VAddr base = module->GetBaseAddress(); diff --git a/src/core/linker.h b/src/core/linker.h index 7ef13ae56..63dfc37e8 100644 --- a/src/core/linker.h +++ b/src/core/linker.h @@ -49,7 +49,7 @@ class Linker; struct EntryParams { int argc; u32 padding; - const char* argv[3]; + const char* argv[33]; VAddr entry_addr; }; @@ -83,7 +83,10 @@ public: } Module* GetModule(s32 index) const { - return m_modules.at(index).get(); + if (index >= 0 || index < m_modules.size()) { + return m_modules.at(index).get(); + } + return nullptr; } u32 FindByName(const std::filesystem::path& name) const { @@ -109,10 +112,13 @@ public: void RelocateAnyImports(Module* m) { Relocate(m); - for (auto& module : m_modules) { - const auto imports = module->GetImportModules(); - if (std::ranges::contains(imports, m->name, &ModuleInfo::name)) { - Relocate(module.get()); + const auto exports = m->GetExportModules(); + for (auto& export_mod : exports) { + for (auto& module : m_modules) { + const auto imports = module->GetImportModules(); + if (std::ranges::contains(imports, export_mod.name, &ModuleInfo::name)) { + Relocate(module.get()); + } } } } @@ -138,12 +144,14 @@ public: void FreeTlsForNonPrimaryThread(void* pointer); s32 LoadModule(const std::filesystem::path& elf_name, bool is_dynamic = false); + s32 LoadAndStartModule(const std::filesystem::path& path, u64 args, const void* argp, + int* pRes); Module* FindByAddress(VAddr address); void Relocate(Module* module); bool Resolve(const std::string& name, Loader::SymbolType type, Module* module, Loader::SymbolRecord* return_info); - void Execute(); + void Execute(const std::vector args = {}); void DebugDump(); private: diff --git a/src/core/loader.cpp b/src/core/loader.cpp deleted file mode 100644 index f80bfbb81..000000000 --- a/src/core/loader.cpp +++ /dev/null @@ -1,28 +0,0 @@ -// SPDX-FileCopyrightText: Copyright 2024 shadPS4 Emulator Project -// SPDX-License-Identifier: GPL-2.0-or-later - -#include "common/io_file.h" -#include "common/types.h" -#include "loader.h" - -namespace Loader { - -FileTypes DetectFileType(const std::filesystem::path& filepath) { - // No file loaded - if (filepath.empty()) { - return FileTypes::Unknown; - } - Common::FS::IOFile file; - file.Open(filepath, Common::FS::FileAccessMode::Read); - file.Seek(0); - u32 magic; - file.Read(magic); - file.Close(); - switch (magic) { - case PkgMagic: - return FileTypes::Pkg; - } - return FileTypes::Unknown; -} - -} // namespace Loader diff --git a/src/core/loader.h b/src/core/loader.h deleted file mode 100644 index 608970dca..000000000 --- a/src/core/loader.h +++ /dev/null @@ -1,18 +0,0 @@ -// SPDX-FileCopyrightText: Copyright 2024 shadPS4 Emulator Project -// SPDX-License-Identifier: GPL-2.0-or-later - -#pragma once - -#include - -namespace Loader { - -constexpr static u32 PkgMagic = 0x544e437f; - -enum class FileTypes { - Unknown, - Pkg, -}; - -FileTypes DetectFileType(const std::filesystem::path& filepath); -} // namespace Loader diff --git a/src/core/memory.cpp b/src/core/memory.cpp index 0a69ad773..8b108a654 100644 --- a/src/core/memory.cpp +++ b/src/core/memory.cpp @@ -7,6 +7,7 @@ #include "common/debug.h" #include "core/libraries/kernel/memory.h" #include "core/libraries/kernel/orbis_error.h" +#include "core/libraries/kernel/process.h" #include "core/memory.h" #include "video_core/renderer_vulkan/vk_rasterizer.h" @@ -35,8 +36,18 @@ MemoryManager::~MemoryManager() = default; void MemoryManager::SetupMemoryRegions(u64 flexible_size, bool use_extended_mem1, bool use_extended_mem2) { - const bool is_neo = Config::isNeoMode(); + const bool is_neo = ::Libraries::Kernel::sceKernelIsNeoMode(); auto total_size = is_neo ? SCE_KERNEL_TOTAL_MEM_PRO : SCE_KERNEL_TOTAL_MEM; + if (Config::isDevKitConsole()) { + const auto old_size = total_size; + // Assuming 2gb is neo for now, will need to link it with sceKernelIsDevKit + total_size += is_neo ? 2_GB : 768_MB; + LOG_WARNING(Kernel_Vmm, + "Config::isDevKitConsole is enabled! Added additional {:s} of direct memory.", + is_neo ? "2 GB" : "768 MB"); + LOG_WARNING(Kernel_Vmm, "Old Direct Size: {:#x} -> New Direct Size: {:#x}", old_size, + total_size); + } if (!use_extended_mem1 && is_neo) { total_size -= 256_MB; } @@ -55,6 +66,33 @@ void MemoryManager::SetupMemoryRegions(u64 flexible_size, bool use_extended_mem1 total_flexible_size, total_direct_size); } +u64 MemoryManager::ClampRangeSize(VAddr virtual_addr, u64 size) { + static constexpr u64 MinSizeToClamp = 512_MB; + // Dont bother with clamping if the size is small so we dont pay a map lookup on every buffer. + if (size < MinSizeToClamp) { + return size; + } + + // Clamp size to the remaining size of the current VMA. + auto vma = FindVMA(virtual_addr); + ASSERT_MSG(vma != vma_map.end(), "Attempted to access invalid GPU address {:#x}", virtual_addr); + u64 clamped_size = vma->second.base + vma->second.size - virtual_addr; + ++vma; + + // Keep adding to the size while there is contigious virtual address space. + while (!vma->second.IsFree() && clamped_size < size) { + clamped_size += vma->second.size; + ++vma; + } + clamped_size = std::min(clamped_size, size); + + if (size != clamped_size) { + LOG_WARNING(Kernel_Vmm, "Clamped requested buffer range addr={:#x}, size={:#x} to {:#x}", + virtual_addr, size, clamped_size); + } + return clamped_size; +} + bool MemoryManager::TryWriteBacking(void* address, const void* data, u32 num_bytes) { const VAddr virtual_addr = std::bit_cast(address); const auto& vma = FindVMA(virtual_addr)->second; @@ -116,7 +154,10 @@ PAddr MemoryManager::Allocate(PAddr search_start, PAddr search_end, size_t size, dmem_area->second.GetEnd() <= search_end) { ++dmem_area; } - ASSERT_MSG(is_suitable(), "Unable to find free direct memory area: size = {:#x}", size); + if (!is_suitable()) { + LOG_ERROR(Kernel_Vmm, "Unable to find free direct memory area: size = {:#x}", size); + return -1; + } // Align free position PAddr free_addr = dmem_area->second.base; @@ -170,10 +211,11 @@ int MemoryManager::PoolReserve(void** out_addr, VAddr virtual_addr, size_t size, // Fixed mapping means the virtual address must exactly match the provided one. if (True(flags & MemoryMapFlags::Fixed)) { - const auto& vma = FindVMA(mapped_addr)->second; + auto& vma = FindVMA(mapped_addr)->second; // If the VMA is mapped, unmap the region first. if (vma.IsMapped()) { UnmapMemoryImpl(mapped_addr, size); + vma = FindVMA(mapped_addr)->second; } const size_t remaining_size = vma.base + vma.size - mapped_addr; ASSERT_MSG(vma.type == VMAType::Free && remaining_size >= size); @@ -207,10 +249,11 @@ int MemoryManager::Reserve(void** out_addr, VAddr virtual_addr, size_t size, Mem // Fixed mapping means the virtual address must exactly match the provided one. if (True(flags & MemoryMapFlags::Fixed)) { - const auto& vma = FindVMA(mapped_addr)->second; + auto& vma = FindVMA(mapped_addr)->second; // If the VMA is mapped, unmap the region first. if (vma.IsMapped()) { UnmapMemoryImpl(mapped_addr, size); + vma = FindVMA(mapped_addr)->second; } const size_t remaining_size = vma.base + vma.size - mapped_addr; ASSERT_MSG(vma.type == VMAType::Free && remaining_size >= size); @@ -308,11 +351,11 @@ int MemoryManager::MapMemory(void** out_addr, VAddr virtual_addr, size_t size, M if (type == VMAType::Direct) { new_vma.phys_base = phys_addr; - rasterizer->MapMemory(mapped_addr, size); } if (type == VMAType::Flexible) { flexible_usage += size; } + rasterizer->MapMemory(mapped_addr, size); return ORBIS_OK; } @@ -386,41 +429,55 @@ s32 MemoryManager::UnmapMemory(VAddr virtual_addr, size_t size) { return UnmapMemoryImpl(virtual_addr, size); } -s32 MemoryManager::UnmapMemoryImpl(VAddr virtual_addr, size_t size) { - const auto it = FindVMA(virtual_addr); - const auto& vma_base = it->second; - ASSERT_MSG(vma_base.Contains(virtual_addr, size), - "Existing mapping does not contain requested unmap range"); - +u64 MemoryManager::UnmapBytesFromEntry(VAddr virtual_addr, VirtualMemoryArea vma_base, u64 size) { const auto vma_base_addr = vma_base.base; const auto vma_base_size = vma_base.size; + const auto type = vma_base.type; const auto phys_base = vma_base.phys_base; const bool is_exec = vma_base.is_exec; const auto start_in_vma = virtual_addr - vma_base_addr; - const auto type = vma_base.type; + const auto adjusted_size = + vma_base_size - start_in_vma < size ? vma_base_size - start_in_vma : size; const bool has_backing = type == VMAType::Direct || type == VMAType::File; - if (type == VMAType::Direct) { - rasterizer->UnmapMemory(virtual_addr, size); + + if (type == VMAType::Free) { + return adjusted_size; } if (type == VMAType::Flexible) { - flexible_usage -= size; + flexible_usage -= adjusted_size; } + rasterizer->UnmapMemory(virtual_addr, adjusted_size); // Mark region as free and attempt to coalesce it with neighbours. - const auto new_it = CarveVMA(virtual_addr, size); + const auto new_it = CarveVMA(virtual_addr, adjusted_size); auto& vma = new_it->second; vma.type = VMAType::Free; vma.prot = MemoryProt::NoAccess; vma.phys_base = 0; vma.disallow_merge = false; vma.name = ""; - MergeAdjacent(vma_map, new_it); - bool readonly_file = vma.prot == MemoryProt::CpuRead && type == VMAType::File; + const auto post_merge_it = MergeAdjacent(vma_map, new_it); + auto& post_merge_vma = post_merge_it->second; + bool readonly_file = post_merge_vma.prot == MemoryProt::CpuRead && type == VMAType::File; + if (type != VMAType::Reserved && type != VMAType::PoolReserved) { + // Unmap the memory region. + impl.Unmap(vma_base_addr, vma_base_size, start_in_vma, start_in_vma + adjusted_size, + phys_base, is_exec, has_backing, readonly_file); + TRACK_FREE(virtual_addr, "VMEM"); + } + return adjusted_size; +} - // Unmap the memory region. - impl.Unmap(vma_base_addr, vma_base_size, start_in_vma, start_in_vma + size, phys_base, is_exec, - has_backing, readonly_file); - TRACK_FREE(virtual_addr, "VMEM"); +s32 MemoryManager::UnmapMemoryImpl(VAddr virtual_addr, u64 size) { + u64 unmapped_bytes = 0; + do { + auto it = FindVMA(virtual_addr + unmapped_bytes); + auto& vma_base = it->second; + auto unmapped = + UnmapBytesFromEntry(virtual_addr + unmapped_bytes, vma_base, size - unmapped_bytes); + ASSERT_MSG(unmapped > 0, "Failed to unmap memory, progress is impossible"); + unmapped_bytes += unmapped; + } while (unmapped_bytes < size); return ORBIS_OK; } @@ -444,19 +501,14 @@ int MemoryManager::QueryProtection(VAddr addr, void** start, void** end, u32* pr return ORBIS_OK; } -int MemoryManager::Protect(VAddr addr, size_t size, MemoryProt prot) { - std::scoped_lock lk{mutex}; +s64 MemoryManager::ProtectBytes(VAddr addr, VirtualMemoryArea vma_base, size_t size, + MemoryProt prot) { + const auto start_in_vma = addr - vma_base.base; + const auto adjusted_size = + vma_base.size - start_in_vma < size ? vma_base.size - start_in_vma : size; - // Find the virtual memory area that contains the specified address range. - auto it = FindVMA(addr); - if (it == vma_map.end() || !it->second.Contains(addr, size)) { - LOG_ERROR(Core, "Address range not mapped"); - return ORBIS_KERNEL_ERROR_EINVAL; - } - - VirtualMemoryArea& vma = it->second; - if (vma.type == VMAType::Free) { - LOG_ERROR(Core, "Cannot change protection on free memory region"); + if (vma_base.type == VMAType::Free) { + LOG_ERROR(Kernel_Vmm, "Cannot change protection on free memory region"); return ORBIS_KERNEL_ERROR_EINVAL; } @@ -467,13 +519,13 @@ int MemoryManager::Protect(VAddr addr, size_t size, MemoryProt prot) { MemoryProt invalid_flags = prot & ~valid_flags; if (u32(invalid_flags) != 0 && u32(invalid_flags) != u32(MemoryProt::NoAccess)) { - LOG_ERROR(Core, "Invalid protection flags: prot = {:#x}, invalid flags = {:#x}", u32(prot), - u32(invalid_flags)); + LOG_ERROR(Kernel_Vmm, "Invalid protection flags: prot = {:#x}, invalid flags = {:#x}", + u32(prot), u32(invalid_flags)); return ORBIS_KERNEL_ERROR_EINVAL; } // Change protection - vma.prot = prot; + vma_base.prot = prot; // Set permissions Core::MemoryPermission perms{}; @@ -496,6 +548,24 @@ int MemoryManager::Protect(VAddr addr, size_t size, MemoryProt prot) { impl.Protect(addr, size, perms); + return adjusted_size; +} + +s32 MemoryManager::Protect(VAddr addr, size_t size, MemoryProt prot) { + std::scoped_lock lk{mutex}; + s64 protected_bytes = 0; + do { + auto it = FindVMA(addr + protected_bytes); + auto& vma_base = it->second; + auto result = 0; + result = ProtectBytes(addr + protected_bytes, vma_base, size - protected_bytes, prot); + if (result < 0) { + // ProtectBytes returned an error, return it + return result; + } + protected_bytes += result; + } while (protected_bytes < size); + return ORBIS_OK; } @@ -520,8 +590,8 @@ int MemoryManager::VirtualQuery(VAddr addr, int flags, info->is_flexible.Assign(vma.type == VMAType::Flexible); info->is_direct.Assign(vma.type == VMAType::Direct); info->is_stack.Assign(vma.type == VMAType::Stack); - info->is_pooled.Assign(vma.type == VMAType::PoolReserved); - info->is_committed.Assign(vma.type == VMAType::Pooled); + info->is_pooled.Assign(vma.type == VMAType::PoolReserved || vma.type == VMAType::Pooled); + info->is_committed.Assign(vma.IsMapped()); vma.name.copy(info->name.data(), std::min(info->name.size(), vma.name.size())); if (vma.type == VMAType::Direct) { const auto dmem_it = FindDmemArea(vma.phys_base); @@ -642,6 +712,12 @@ MemoryManager::VMAHandle MemoryManager::CarveVMA(VAddr virtual_addr, size_t size const VAddr start_in_vma = virtual_addr - vma.base; const VAddr end_in_vma = start_in_vma + size; + + if (start_in_vma == 0 && size == vma.size) { + // if requsting the whole VMA, return it + return vma_handle; + } + ASSERT_MSG(end_in_vma <= vma.size, "Mapping cannot fit inside free region"); if (end_in_vma != vma.size) { diff --git a/src/core/memory.h b/src/core/memory.h index 615ecc3eb..a6a55e288 100644 --- a/src/core/memory.h +++ b/src/core/memory.h @@ -164,6 +164,8 @@ public: return virtual_addr >= vma_map.begin()->first && virtual_addr < end_addr; } + u64 ClampRangeSize(VAddr virtual_addr, u64 size); + bool TryWriteBacking(void* address, const void* data, u32 num_bytes); void SetupMemoryRegions(u64 flexible_size, bool use_extended_mem1, bool use_extended_mem2); @@ -196,7 +198,9 @@ public: int QueryProtection(VAddr addr, void** start, void** end, u32* prot); - int Protect(VAddr addr, size_t size, MemoryProt prot); + s32 Protect(VAddr addr, size_t size, MemoryProt prot); + + s64 ProtectBytes(VAddr addr, VirtualMemoryArea vma_base, size_t size, MemoryProt prot); int VirtualQuery(VAddr addr, int flags, ::Libraries::Kernel::OrbisVirtualQueryInfo* info); @@ -252,7 +256,9 @@ private: DMemHandle Split(DMemHandle dmem_handle, size_t offset_in_area); - s32 UnmapMemoryImpl(VAddr virtual_addr, size_t size); + u64 UnmapBytesFromEntry(VAddr virtual_addr, VirtualMemoryArea vma_base, u64 size); + + s32 UnmapMemoryImpl(VAddr virtual_addr, u64 size); private: AddressSpace impl; diff --git a/src/core/module.cpp b/src/core/module.cpp index 70afb932c..1004f4404 100644 --- a/src/core/module.cpp +++ b/src/core/module.cpp @@ -1,13 +1,12 @@ // SPDX-FileCopyrightText: Copyright 2024 shadPS4 Emulator Project // SPDX-License-Identifier: GPL-2.0-or-later -#include - #include "common/alignment.h" #include "common/arch.h" #include "common/assert.h" #include "common/logging/log.h" #include "common/memory_patcher.h" +#include "common/sha1.h" #include "common/string_util.h" #include "core/aerolib/aerolib.h" #include "core/cpu_patches.h" @@ -65,11 +64,13 @@ static std::string StringToNid(std::string_view symbol) { std::memcpy(input.data(), symbol.data(), symbol.size()); std::memcpy(input.data() + symbol.size(), Salt.data(), Salt.size()); - std::array hash; - CryptoPP::SHA1().CalculateDigest(hash.data(), input.data(), input.size()); + sha1::SHA1::digest8_t hash; + sha1::SHA1 sha; + sha.processBytes(input.data(), input.size()); + sha.getDigestBytes(hash); u64 digest; - std::memcpy(&digest, hash.data(), sizeof(digest)); + std::memcpy(&digest, hash, sizeof(digest)); static constexpr std::string_view codes = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-"; @@ -94,7 +95,7 @@ Module::Module(Core::MemoryManager* memory_, const std::filesystem::path& file_, Module::~Module() = default; -s32 Module::Start(size_t args, const void* argp, void* param) { +s32 Module::Start(u64 args, const void* argp, void* param) { LOG_INFO(Core_Linker, "Module started : {}", name); const VAddr addr = dynamic_info.init_virtual_addr + GetBaseAddress(); return ExecuteGuest(reinterpret_cast(addr), args, argp, param); diff --git a/src/core/module.h b/src/core/module.h index 630c5d583..320680485 100644 --- a/src/core/module.h +++ b/src/core/module.h @@ -203,7 +203,7 @@ public: return (rela_bits[index >> 3] >> (index & 7)) & 1; } - s32 Start(size_t args, const void* argp, void* param); + s32 Start(u64 args, const void* argp, void* param); void LoadModuleToMemory(u32& max_tls_index); void LoadDynamicInfo(); void LoadSymbols(); diff --git a/src/core/signals.cpp b/src/core/signals.cpp index 89844ae25..e47a78cd2 100644 --- a/src/core/signals.cpp +++ b/src/core/signals.cpp @@ -111,7 +111,7 @@ SignalDispatch::SignalDispatch() { ASSERT_MSG(handle = AddVectoredExceptionHandler(0, SignalHandler), "Failed to register exception handler."); #else - struct sigaction action {}; + struct sigaction action{}; action.sa_sigaction = SignalHandler; action.sa_flags = SA_SIGINFO | SA_ONSTACK; sigemptyset(&action.sa_mask); @@ -130,7 +130,7 @@ SignalDispatch::~SignalDispatch() { #if defined(_WIN32) ASSERT_MSG(RemoveVectoredExceptionHandler(handle), "Failed to remove exception handler."); #else - struct sigaction action {}; + struct sigaction action{}; action.sa_handler = SIG_DFL; action.sa_flags = 0; sigemptyset(&action.sa_mask); diff --git a/src/emulator.cpp b/src/emulator.cpp index 4f0c61236..5f94f008a 100644 --- a/src/emulator.cpp +++ b/src/emulator.cpp @@ -24,17 +24,15 @@ #include "common/singleton.h" #include "common/version.h" #include "core/file_format/psf.h" -#include "core/file_format/splash.h" #include "core/file_format/trp.h" #include "core/file_sys/fs.h" #include "core/libraries/disc_map/disc_map.h" -#include "core/libraries/fiber/fiber.h" -#include "core/libraries/jpeg/jpegenc.h" #include "core/libraries/libc_internal/libc_internal.h" #include "core/libraries/libs.h" #include "core/libraries/ngs2/ngs2.h" #include "core/libraries/np_trophy/np_trophy.h" #include "core/libraries/rtc/rtc.h" +#include "core/libraries/save_data/save_backup.h" #include "core/linker.h" #include "core/memory.h" #include "emulator.h" @@ -51,27 +49,6 @@ Emulator::Emulator() { SetPriorityClass(GetCurrentProcess(), ABOVE_NORMAL_PRIORITY_CLASS); #endif - // Start logger. - Common::Log::Initialize(); - Common::Log::Start(); - LOG_INFO(Loader, "Starting shadps4 emulator v{} ", Common::VERSION); - LOG_INFO(Loader, "Revision {}", Common::g_scm_rev); - LOG_INFO(Loader, "Branch {}", Common::g_scm_branch); - LOG_INFO(Loader, "Description {}", Common::g_scm_desc); - - LOG_INFO(Config, "General Logtype: {}", Config::getLogType()); - LOG_INFO(Config, "General isNeo: {}", Config::isNeoMode()); - LOG_INFO(Config, "GPU isNullGpu: {}", Config::nullGpu()); - LOG_INFO(Config, "GPU shouldDumpShaders: {}", Config::dumpShaders()); - LOG_INFO(Config, "GPU vblankDivider: {}", Config::vblankDiv()); - LOG_INFO(Config, "Vulkan gpuId: {}", Config::getGpuId()); - LOG_INFO(Config, "Vulkan vkValidation: {}", Config::vkValidationEnabled()); - LOG_INFO(Config, "Vulkan vkValidationSync: {}", Config::vkValidationSyncEnabled()); - LOG_INFO(Config, "Vulkan vkValidationGpu: {}", Config::vkValidationGpuEnabled()); - LOG_INFO(Config, "Vulkan rdocEnable: {}", Config::isRdocEnabled()); - LOG_INFO(Config, "Vulkan rdocMarkersEnable: {}", Config::vkMarkersEnabled()); - LOG_INFO(Config, "Vulkan crashDiagnostics: {}", Config::vkCrashDiagnosticEnabled()); - // Create stdin/stdout/stderr Common::Singleton::Instance()->CreateStdHandles(); @@ -89,9 +66,8 @@ Emulator::Emulator() { const auto user_dir = Common::FS::GetUserPath(Common::FS::PathType::UserDir); QString filePath = QString::fromStdString((user_dir / "play_time.txt").string()); QFile file(filePath); - if (!file.open(QIODevice::ReadWrite | QIODevice::Text)) { - LOG_INFO(Loader, "Error opening or creating play_time.txt"); - } + ASSERT_MSG(file.open(QIODevice::ReadWrite | QIODevice::Text), + "Error opening or creating play_time.txt"); #endif } @@ -100,20 +76,25 @@ Emulator::~Emulator() { Config::saveMainWindow(config_dir / "config.toml"); } -void Emulator::Run(const std::filesystem::path& file) { - - // Use the eboot from the separated updates folder if it's there - std::filesystem::path game_patch_folder = file.parent_path(); - game_patch_folder += "-UPDATE"; - std::filesystem::path eboot_path = std::filesystem::exists(game_patch_folder / file.filename()) - ? game_patch_folder / file.filename() - : file; +void Emulator::Run(const std::filesystem::path& file, const std::vector args) { + const auto eboot_name = file.filename().string(); + auto game_folder = file.parent_path(); + if (const auto game_folder_name = game_folder.filename().string(); + game_folder_name.ends_with("-UPDATE") || game_folder_name.ends_with("-patch")) { + // If an executable was launched from a separate update directory, + // use the base game directory as the game folder. + const auto base_name = game_folder_name.substr(0, game_folder_name.size() - 7); + const auto base_path = game_folder.parent_path() / base_name; + if (std::filesystem::is_directory(base_path)) { + game_folder = base_path; + } + } // Applications expect to be run from /app0 so mount the file's parent path as app0. auto* mnt = Common::Singleton::Instance(); - mnt->Mount(file.parent_path(), "/app0"); + mnt->Mount(game_folder, "/app0"); // Certain games may use /hostapp as well such as CUSA001100 - mnt->Mount(file.parent_path(), "/hostapp"); + mnt->Mount(game_folder, "/hostapp"); auto& game_info = Common::ElfInfo::Instance(); @@ -122,52 +103,88 @@ void Emulator::Run(const std::filesystem::path& file) { std::string title; std::string app_version; u32 fw_version; + Common::PSFAttributes psf_attributes{}; - std::filesystem::path sce_sys_folder = eboot_path.parent_path() / "sce_sys"; - if (std::filesystem::is_directory(sce_sys_folder)) { - for (const auto& entry : std::filesystem::directory_iterator(sce_sys_folder)) { - if (entry.path().filename() == "param.sfo") { - auto* param_sfo = Common::Singleton::Instance(); - const bool success = param_sfo->Open(sce_sys_folder / "param.sfo"); - ASSERT_MSG(success, "Failed to open param.sfo"); - const auto content_id = param_sfo->GetString("CONTENT_ID"); - ASSERT_MSG(content_id.has_value(), "Failed to get CONTENT_ID"); - id = std::string(*content_id, 7, 9); - Libraries::NpTrophy::game_serial = id; - const auto trophyDir = - Common::FS::GetUserPath(Common::FS::PathType::MetaDataDir) / id / "TrophyFiles"; - if (!std::filesystem::exists(trophyDir)) { - TRP trp; - if (!trp.Extract(eboot_path.parent_path(), id)) { - LOG_ERROR(Loader, "Couldn't extract trophies"); - } - } -#ifdef ENABLE_QT_GUI - MemoryPatcher::g_game_serial = id; + const auto param_sfo_path = mnt->GetHostPath("/app0/sce_sys/param.sfo"); + if (!std::filesystem::exists(param_sfo_path) || !Config::getSeparateLogFilesEnabled()) { + Common::Log::Initialize(); + Common::Log::Start(); + } - // Timer for 'Play Time' - QTimer* timer = new QTimer(); - QObject::connect(timer, &QTimer::timeout, [this, id]() { - UpdatePlayTime(id); - start_time = std::chrono::steady_clock::now(); - }); - timer->start(60000); // 60000 ms = 1 minute -#endif - title = param_sfo->GetString("TITLE").value_or("Unknown title"); - LOG_INFO(Loader, "Game id: {} Title: {}", id, title); - fw_version = param_sfo->GetInteger("SYSTEM_VER").value_or(0x4700000); - app_version = param_sfo->GetString("APP_VER").value_or("Unknown version"); - LOG_INFO(Loader, "Fw: {:#x} App Version: {}", fw_version, app_version); - } else if (entry.path().filename() == "pic1.png") { - auto* splash = Common::Singleton::Instance(); - if (splash->IsLoaded()) { - continue; - } - if (!splash->Open(entry.path())) { - LOG_ERROR(Loader, "Game splash: unable to open file"); - } + if (std::filesystem::exists(param_sfo_path)) { + auto* param_sfo = Common::Singleton::Instance(); + const bool success = param_sfo->Open(param_sfo_path); + ASSERT_MSG(success, "Failed to open param.sfo"); + const auto content_id = param_sfo->GetString("CONTENT_ID"); + ASSERT_MSG(content_id.has_value(), "Failed to get CONTENT_ID"); + id = std::string(*content_id, 7, 9); + + if (Config::getSeparateLogFilesEnabled()) { + Common::Log::Initialize(id + ".log"); + Common::Log::Start(); + } + LOG_INFO(Loader, "Starting shadps4 emulator v{} ", Common::VERSION); + LOG_INFO(Loader, "Revision {}", Common::g_scm_rev); + LOG_INFO(Loader, "Branch {}", Common::g_scm_branch); + LOG_INFO(Loader, "Description {}", Common::g_scm_desc); + LOG_INFO(Loader, "Remote {}", Common::g_scm_remote_url); + + LOG_INFO(Config, "General LogType: {}", Config::getLogType()); + LOG_INFO(Config, "General isNeo: {}", Config::isNeoModeConsole()); + LOG_INFO(Config, "GPU isNullGpu: {}", Config::nullGpu()); + LOG_INFO(Config, "GPU shouldDumpShaders: {}", Config::dumpShaders()); + LOG_INFO(Config, "GPU vblankDivider: {}", Config::vblankDiv()); + LOG_INFO(Config, "Vulkan gpuId: {}", Config::getGpuId()); + LOG_INFO(Config, "Vulkan vkValidation: {}", Config::vkValidationEnabled()); + LOG_INFO(Config, "Vulkan vkValidationSync: {}", Config::vkValidationSyncEnabled()); + LOG_INFO(Config, "Vulkan vkValidationGpu: {}", Config::vkValidationGpuEnabled()); + LOG_INFO(Config, "Vulkan crashDiagnostics: {}", Config::getVkCrashDiagnosticEnabled()); + LOG_INFO(Config, "Vulkan hostMarkers: {}", Config::getVkHostMarkersEnabled()); + LOG_INFO(Config, "Vulkan guestMarkers: {}", Config::getVkGuestMarkersEnabled()); + LOG_INFO(Config, "Vulkan rdocEnable: {}", Config::isRdocEnabled()); + + Libraries::NpTrophy::game_serial = id; + const auto trophyDir = + Common::FS::GetUserPath(Common::FS::PathType::MetaDataDir) / id / "TrophyFiles"; + if (!std::filesystem::exists(trophyDir)) { + TRP trp; + if (!trp.Extract(game_folder, id)) { + LOG_ERROR(Loader, "Couldn't extract trophies"); } } +#ifdef ENABLE_QT_GUI + MemoryPatcher::g_game_serial = id; + + // Timer for 'Play Time' + QTimer* timer = new QTimer(); + QObject::connect(timer, &QTimer::timeout, [this, id]() { + UpdatePlayTime(id); + start_time = std::chrono::steady_clock::now(); + }); + timer->start(60000); // 60000 ms = 1 minute +#endif + title = param_sfo->GetString("TITLE").value_or("Unknown title"); + LOG_INFO(Loader, "Game id: {} Title: {}", id, title); + fw_version = param_sfo->GetInteger("SYSTEM_VER").value_or(0x4700000); + app_version = param_sfo->GetString("APP_VER").value_or("Unknown version"); + LOG_INFO(Loader, "Fw: {:#x} App Version: {}", fw_version, app_version); + if (const auto raw_attributes = param_sfo->GetInteger("ATTRIBUTE")) { + psf_attributes.raw = *raw_attributes; + } + if (!args.empty()) { + int argc = std::min(args.size(), 32); + for (int i = 0; i < argc; i++) { + LOG_INFO(Loader, "Game argument {}: {}", i, args[i]); + } + if (args.size() > 32) { + LOG_ERROR(Loader, "Too many game arguments, only passing the first 32"); + } + } + } + + const auto pic1_path = mnt->GetHostPath("/app0/sce_sys/pic1.png"); + if (std::filesystem::exists(pic1_path)) { + game_info.splash_path = pic1_path; } game_info.initialized = true; @@ -176,14 +193,27 @@ void Emulator::Run(const std::filesystem::path& file) { game_info.app_ver = app_version; game_info.firmware_ver = fw_version & 0xFFF00000; game_info.raw_firmware_ver = fw_version; + game_info.psf_attributes = psf_attributes; std::string game_title = fmt::format("{} - {} <{}>", id, title, app_version); std::string window_title = ""; if (Common::isRelease) { window_title = fmt::format("shadPS4 v{} | {}", Common::VERSION, game_title); } else { - window_title = fmt::format("shadPS4 v{} {} {} | {}", Common::VERSION, Common::g_scm_branch, - Common::g_scm_desc, game_title); + std::string remote_url(Common::g_scm_remote_url); + std::string remote_host; + try { + remote_host = remote_url.substr(19, remote_url.rfind('/') - 19); + } catch (...) { + remote_host = "unknown"; + } + if (remote_host == "shadps4-emu" || remote_url.length() == 0) { + window_title = fmt::format("shadPS4 v{} {} {} | {}", Common::VERSION, + Common::g_scm_branch, Common::g_scm_desc, game_title); + } else { + window_title = fmt::format("shadPS4 v{} {}/{} {} | {}", Common::VERSION, remote_host, + Common::g_scm_branch, Common::g_scm_desc, game_title); + } } window = std::make_unique( Config::getScreenWidth(), Config::getScreenHeight(), controller, window_title); @@ -219,42 +249,19 @@ void Emulator::Run(const std::filesystem::path& file) { Libraries::InitHLELibs(&linker->GetHLESymbols()); // Load the module with the linker + const auto eboot_path = mnt->GetHostPath("/app0/" + eboot_name); linker->LoadModule(eboot_path); // check if we have system modules to load - LoadSystemModules(eboot_path, game_info.game_serial); + LoadSystemModules(game_info.game_serial); // Load all prx from game's sce_module folder - std::vector modules_to_load; - std::filesystem::path game_module_folder = file.parent_path() / "sce_module"; - if (std::filesystem::is_directory(game_module_folder)) { - for (const auto& entry : std::filesystem::directory_iterator(game_module_folder)) { - if (entry.is_regular_file()) { - modules_to_load.push_back(entry.path()); - } + mnt->IterateDirectory("/app0/sce_module", [this](const auto& path, const auto is_file) { + if (is_file) { + LOG_INFO(Loader, "Loading {}", fmt::UTF(path.u8string())); + linker->LoadModule(path); } - } - - // Load all prx from separate update's sce_module folder - std::filesystem::path update_module_folder = game_patch_folder / "sce_module"; - if (std::filesystem::is_directory(update_module_folder)) { - for (const auto& entry : std::filesystem::directory_iterator(update_module_folder)) { - auto it = std::find_if(modules_to_load.begin(), modules_to_load.end(), - [&entry](const std::filesystem::path& p) { - return p.filename() == entry.path().filename(); - }); - if (it != modules_to_load.end()) { - *it = entry.path(); - } else { - modules_to_load.push_back(entry.path()); - } - } - } - - for (const auto& module_path : modules_to_load) { - LOG_INFO(Loader, "Loading {}", fmt::UTF(module_path.u8string())); - linker->LoadModule(module_path); - } + }); #ifdef ENABLE_DISCORD_RPC // Discord RPC @@ -267,7 +274,7 @@ void Emulator::Run(const std::filesystem::path& file) { } #endif - linker->Execute(); + linker->Execute(args); window->InitTimers(); while (window->IsOpen()) { @@ -278,17 +285,16 @@ void Emulator::Run(const std::filesystem::path& file) { UpdatePlayTime(id); #endif - std::exit(0); + std::quick_exit(0); } -void Emulator::LoadSystemModules(const std::filesystem::path& file, std::string game_serial) { - constexpr std::array ModulesToLoad{ +void Emulator::LoadSystemModules(const std::string& game_serial) { + constexpr std::array ModulesToLoad{ {{"libSceNgs2.sprx", &Libraries::Ngs2::RegisterlibSceNgs2}, {"libSceUlt.sprx", nullptr}, {"libSceJson.sprx", nullptr}, {"libSceJson2.sprx", nullptr}, {"libSceLibcInternal.sprx", &Libraries::LibcInternal::RegisterlibSceLibcInternal}, - {"libSceDiscMap.sprx", &Libraries::DiscMap::RegisterlibSceDiscMap}, {"libSceRtc.sprx", &Libraries::Rtc::RegisterlibSceRtc}, {"libSceCesCs.sprx", nullptr}, {"libSceFont.sprx", nullptr}, diff --git a/src/emulator.h b/src/emulator.h index e973e9022..08c2807a1 100644 --- a/src/emulator.h +++ b/src/emulator.h @@ -25,11 +25,11 @@ public: Emulator(); ~Emulator(); - void Run(const std::filesystem::path& file); + void Run(const std::filesystem::path& file, const std::vector args = {}); void UpdatePlayTime(const std::string& serial); private: - void LoadSystemModules(const std::filesystem::path& file, std::string game_serial); + void LoadSystemModules(const std::string& game_serial); Core::MemoryManager* memory; Input::GameController* controller; diff --git a/src/images/KBM.png b/src/images/KBM.png new file mode 100644 index 000000000..37f52d549 Binary files /dev/null and b/src/images/KBM.png differ diff --git a/src/images/bronze.png b/src/images/bronze.png new file mode 100644 index 000000000..65aa2fb69 Binary files /dev/null and b/src/images/bronze.png differ diff --git a/src/images/controller_icon.png b/src/images/controller_icon.png index 40c92a89b..0d5556329 100644 Binary files a/src/images/controller_icon.png and b/src/images/controller_icon.png differ diff --git a/src/images/fullscreen_icon.png b/src/images/fullscreen_icon.png new file mode 100644 index 000000000..719ffe4a1 Binary files /dev/null and b/src/images/fullscreen_icon.png differ diff --git a/src/images/gold.png b/src/images/gold.png new file mode 100644 index 000000000..1af7023f5 Binary files /dev/null and b/src/images/gold.png differ diff --git a/src/images/keyboard_icon.png b/src/images/keyboard_icon.png new file mode 100644 index 000000000..021db61ff Binary files /dev/null and b/src/images/keyboard_icon.png differ diff --git a/src/images/pause_icon.png b/src/images/pause_icon.png index 5375689b7..86bbc6acb 100644 Binary files a/src/images/pause_icon.png and b/src/images/pause_icon.png differ diff --git a/src/images/platinum.png b/src/images/platinum.png new file mode 100644 index 000000000..c217fdd02 Binary files /dev/null and b/src/images/platinum.png differ diff --git a/src/images/play_icon.png b/src/images/play_icon.png index 2815be39d..d50d404b7 100644 Binary files a/src/images/play_icon.png and b/src/images/play_icon.png differ diff --git a/src/images/ps4_controller.png b/src/images/ps4_controller.png new file mode 100644 index 000000000..0e2c1d4f1 Binary files /dev/null and b/src/images/ps4_controller.png differ diff --git a/src/images/refresh_icon.png b/src/images/refresh_icon.png deleted file mode 100644 index 00fe69c20..000000000 Binary files a/src/images/refresh_icon.png and /dev/null differ diff --git a/src/images/refreshlist_icon.png b/src/images/refreshlist_icon.png new file mode 100644 index 000000000..7de6685b2 Binary files /dev/null and b/src/images/refreshlist_icon.png differ diff --git a/src/images/restart_game_icon.png b/src/images/restart_game_icon.png new file mode 100644 index 000000000..1e549e101 Binary files /dev/null and b/src/images/restart_game_icon.png differ diff --git a/src/images/settings_icon.png b/src/images/settings_icon.png index c88cd7a6f..81127bfa3 100644 Binary files a/src/images/settings_icon.png and b/src/images/settings_icon.png differ diff --git a/src/images/silver.png b/src/images/silver.png new file mode 100644 index 000000000..0d9ff8ff6 Binary files /dev/null and b/src/images/silver.png differ diff --git a/src/images/stop_icon.png b/src/images/stop_icon.png index 74c615f65..55b6b01c7 100644 Binary files a/src/images/stop_icon.png and b/src/images/stop_icon.png differ diff --git a/src/images/trophy_icon.png b/src/images/trophy_icon.png new file mode 100644 index 000000000..559e7dbb2 Binary files /dev/null and b/src/images/trophy_icon.png differ diff --git a/src/imgui/imgui_config.h b/src/imgui/imgui_config.h index ccb084d94..7b03a4bab 100644 --- a/src/imgui/imgui_config.h +++ b/src/imgui/imgui_config.h @@ -30,6 +30,12 @@ extern void assert_fail_debug_msg(const char* msg); #define IM_VEC4_CLASS_EXTRA \ constexpr ImVec4(float _v) : x(_v), y(_v), z(_v), w(_v) {} +namespace ImGui { +struct Texture; +} +#define ImTextureID ImTextureID +using ImTextureID = ::ImGui::Texture*; + #ifdef IMGUI_USE_WCHAR32 #error "This project uses 16 bits wchar standard like Orbis" #endif \ No newline at end of file diff --git a/src/imgui/renderer/imgui_core.cpp b/src/imgui/renderer/imgui_core.cpp index 46391faef..50ce41ebf 100644 --- a/src/imgui/renderer/imgui_core.cpp +++ b/src/imgui/renderer/imgui_core.cpp @@ -6,6 +6,7 @@ #include "common/config.h" #include "common/path_util.h" +#include "core/debug_state.h" #include "core/devtools/layer.h" #include "imgui/imgui_layer.h" #include "imgui_core.h" @@ -117,6 +118,10 @@ void OnResize() { Sdl::OnResize(); } +void OnSurfaceFormatChange(vk::Format surface_format) { + Vulkan::OnSurfaceFormatChange(surface_format); +} + void Shutdown(const vk::Device& device) { auto result = device.waitIdle(); if (result != vk::Result::eSuccess) { @@ -147,7 +152,7 @@ bool ProcessEvent(SDL_Event* event) { case SDL_EVENT_MOUSE_BUTTON_DOWN: { const auto& io = GetIO(); return io.WantCaptureMouse && io.Ctx->NavWindow != nullptr && - io.Ctx->NavWindow->ID != dock_id; + (io.Ctx->NavWindow->Flags & ImGuiWindowFlags_NoNav) == 0; } case SDL_EVENT_TEXT_INPUT: case SDL_EVENT_KEY_DOWN: { @@ -167,7 +172,7 @@ bool ProcessEvent(SDL_Event* event) { } } -void NewFrame() { +ImGuiID NewFrame(bool is_reusing_frame) { { std::scoped_lock lock{change_layers_mutex}; while (!change_layers.empty()) { @@ -182,24 +187,32 @@ void NewFrame() { } } - Sdl::NewFrame(); + Sdl::NewFrame(is_reusing_frame); ImGui::NewFrame(); - DockSpaceOverViewport(0, GetMainViewport(), ImGuiDockNodeFlags_PassthruCentralNode); + ImGuiWindowFlags flags = + ImGuiDockNodeFlags_PassthruCentralNode | ImGuiDockNodeFlags_AutoHideTabBar; + if (!DebugState.IsShowingDebugMenuBar()) { + flags |= ImGuiDockNodeFlags_NoTabBar; + } + ImGuiID dockId = DockSpaceOverViewport(0, GetMainViewport(), flags); for (auto* layer : layers) { layer->Draw(); } + + return dockId; } -void Render(const vk::CommandBuffer& cmdbuf, ::Vulkan::Frame* frame) { +void Render(const vk::CommandBuffer& cmdbuf, const vk::ImageView& image_view, + const vk::Extent2D& extent) { ImGui::Render(); ImDrawData* draw_data = GetDrawData(); if (draw_data->CmdListsCount == 0) { return; } - if (Config::vkMarkersEnabled()) { + if (Config::getVkHostMarkersEnabled()) { cmdbuf.beginDebugUtilsLabelEXT(vk::DebugUtilsLabelEXT{ .pLabelName = "ImGui Render", }); @@ -207,16 +220,16 @@ void Render(const vk::CommandBuffer& cmdbuf, ::Vulkan::Frame* frame) { vk::RenderingAttachmentInfo color_attachments[1]{ { - .imageView = frame->image_view, + .imageView = image_view, .imageLayout = vk::ImageLayout::eColorAttachmentOptimal, - .loadOp = vk::AttachmentLoadOp::eLoad, + .loadOp = vk::AttachmentLoadOp::eClear, .storeOp = vk::AttachmentStoreOp::eStore, }, }; vk::RenderingInfo render_info{}; render_info.renderArea = vk::Rect2D{ .offset = {0, 0}, - .extent = {frame->width, frame->height}, + .extent = extent, }; render_info.layerCount = 1; render_info.colorAttachmentCount = 1; @@ -224,11 +237,15 @@ void Render(const vk::CommandBuffer& cmdbuf, ::Vulkan::Frame* frame) { cmdbuf.beginRendering(render_info); Vulkan::RenderDrawData(*draw_data, cmdbuf); cmdbuf.endRendering(); - if (Config::vkMarkersEnabled()) { + if (Config::getVkHostMarkersEnabled()) { cmdbuf.endDebugUtilsLabelEXT(); } } +bool MustKeepDrawing() { + return layers.size() > 1 || DebugState.IsShowingDebugMenuBar(); +} + } // namespace Core void Layer::AddLayer(Layer* layer) { diff --git a/src/imgui/renderer/imgui_core.h b/src/imgui/renderer/imgui_core.h index 9ad708f81..36ccff138 100644 --- a/src/imgui/renderer/imgui_core.h +++ b/src/imgui/renderer/imgui_core.h @@ -3,6 +3,8 @@ #pragma once +#include + #include "video_core/renderer_vulkan/vk_instance.h" #include "vulkan/vulkan_handles.hpp" @@ -20,12 +22,17 @@ void Initialize(const Vulkan::Instance& instance, const Frontend::WindowSDL& win void OnResize(); +void OnSurfaceFormatChange(vk::Format surface_format); + void Shutdown(const vk::Device& device); bool ProcessEvent(SDL_Event* event); -void NewFrame(); +ImGuiID NewFrame(bool is_reusing_frame = false); -void Render(const vk::CommandBuffer& cmdbuf, Vulkan::Frame* frame); +void Render(const vk::CommandBuffer& cmdbuf, const vk::ImageView& image_view, + const vk::Extent2D& extent); + +bool MustKeepDrawing(); // Force the emulator redraw } // namespace ImGui::Core diff --git a/src/imgui/renderer/imgui_impl_sdl3.cpp b/src/imgui/renderer/imgui_impl_sdl3.cpp index 60b440c24..ccd31d03a 100644 --- a/src/imgui/renderer/imgui_impl_sdl3.cpp +++ b/src/imgui/renderer/imgui_impl_sdl3.cpp @@ -5,13 +5,13 @@ #include #include "common/config.h" +#include "core/debug_state.h" #include "imgui_impl_sdl3.h" // SDL #include #if defined(__APPLE__) #include -#include #endif #ifdef _WIN32 #ifndef WIN32_LEAN_AND_MEAN @@ -27,6 +27,7 @@ struct SdlData { SDL_Window* window{}; SDL_WindowID window_id{}; Uint64 time{}; + Uint64 nonReusedtime{}; const char* clipboard_text_data{}; // IME handling @@ -45,6 +46,11 @@ struct SdlData { ImVector gamepads{}; GamepadMode gamepad_mode{}; bool want_update_gamepads_list{}; + + // Framerate counting (based on ImGui impl) + std::array framerateSecPerFrame; + int framerateSecPerFrameIdx{}; + float framerateSecPerFrameAcc{}; }; // Backend data stored in io.BackendPlatformUserData to allow support for multiple Dear ImGui @@ -72,33 +78,25 @@ static void PlatformSetImeData(ImGuiContext*, ImGuiViewport* viewport, ImGuiPlat auto window_id = (SDL_WindowID)(intptr_t)viewport->PlatformHandle; SDL_Window* window = SDL_GetWindowFromID(window_id); if ((!data->WantVisible || bd->ime_window != window) && bd->ime_window != nullptr) { - auto stop_input = [&bd] { SDL_StopTextInput(bd->ime_window); }; -#ifdef __APPLE__ - dispatch_sync(dispatch_get_main_queue(), ^{ - stop_input(); - }); -#else - stop_input(); -#endif + SDL_RunOnMainThread( + [](void* userdata) { SDL_StopTextInput(static_cast(userdata)); }, + bd->ime_window, true); bd->ime_window = nullptr; } if (data->WantVisible) { - SDL_Rect r; - r.x = (int)data->InputPos.x; - r.y = (int)data->InputPos.y; - r.w = 1; - r.h = (int)data->InputLineHeight; - const auto start_input = [&window, &r] { - SDL_SetTextInputArea(window, &r, 0); - SDL_StartTextInput(window); - }; -#ifdef __APPLE__ - dispatch_sync(dispatch_get_main_queue(), ^{ - start_input(); - }); -#else - start_input(); -#endif + std::pair usr_data; + usr_data.first = window; + usr_data.second.x = (int)data->InputPos.x; + usr_data.second.y = (int)data->InputPos.y; + usr_data.second.w = 1; + usr_data.second.h = (int)data->InputLineHeight; + SDL_RunOnMainThread( + [](void* userdata) { + auto* params = static_cast*>(userdata); + SDL_SetTextInputArea(params->first, ¶ms->second, 0); + SDL_StartTextInput(params->first); + }, + &usr_data, true); bd->ime_window = window; } } @@ -794,7 +792,7 @@ static void UpdateGamepads() { +thumb_dead_zone, +32767); } -void NewFrame() { +void NewFrame(bool is_reusing_frame) { SdlData* bd = GetBackendData(); IM_ASSERT(bd != nullptr && "No platform backend to shutdown, or already shutdown?"); ImGuiIO& io = ImGui::GetIO(); @@ -807,9 +805,29 @@ void NewFrame() { if (current_time <= bd->time) current_time = bd->time + 1; io.DeltaTime = bd->time > 0 ? (float)((double)(current_time - bd->time) / (double)frequency) - : (float)(1.0f / 60.0f); + : 1.0f / 60.0f; bd->time = current_time; + if (!is_reusing_frame) { + if (current_time <= bd->nonReusedtime) + current_time = bd->nonReusedtime + 1; + float deltaTime = + bd->nonReusedtime > 0 + ? (float)((double)(current_time - bd->nonReusedtime) / (double)frequency) + : 1.0f / 60.0f; + bd->nonReusedtime = current_time; + DebugState.FrameDeltaTime = deltaTime; + + int& frameIdx = bd->framerateSecPerFrameIdx; + float& framerateSec = bd->framerateSecPerFrame[frameIdx]; + float& acc = bd->framerateSecPerFrameAcc; + int count = bd->framerateSecPerFrame.size(); + acc += deltaTime - framerateSec; + framerateSec = deltaTime; + frameIdx = (frameIdx + 1) % count; + DebugState.Framerate = acc > 0.0f ? 1.0f / (acc / (float)count) : FLT_MAX; + } + if (bd->mouse_pending_leave_frame && bd->mouse_pending_leave_frame >= ImGui::GetFrameCount() && bd->mouse_buttons_down == 0) { bd->mouse_window_id = 0; diff --git a/src/imgui/renderer/imgui_impl_sdl3.h b/src/imgui/renderer/imgui_impl_sdl3.h index 59b1a6856..fe626a962 100644 --- a/src/imgui/renderer/imgui_impl_sdl3.h +++ b/src/imgui/renderer/imgui_impl_sdl3.h @@ -14,7 +14,7 @@ namespace ImGui::Sdl { bool Init(SDL_Window* window); void Shutdown(); -void NewFrame(); +void NewFrame(bool is_reusing); bool ProcessEvent(const SDL_Event* event); void OnResize(); diff --git a/src/imgui/renderer/imgui_impl_vulkan.cpp b/src/imgui/renderer/imgui_impl_vulkan.cpp index 7f7ade2a5..af523089d 100644 --- a/src/imgui/renderer/imgui_impl_vulkan.cpp +++ b/src/imgui/renderer/imgui_impl_vulkan.cpp @@ -57,11 +57,12 @@ struct VkData { vk::DeviceMemory font_memory{}; vk::Image font_image{}; vk::ImageView font_view{}; - vk::DescriptorSet font_descriptor_set{}; + ImTextureID font_texture{}; vk::CommandBuffer font_command_buffer{}; // Render buffers WindowRenderBuffers render_buffers{}; + bool enabled_blending{true}; VkData(const InitInfo init_info) : init_info(init_info) { render_buffers.count = init_info.image_count; @@ -252,8 +253,8 @@ void UploadTextureData::Destroy() { const InitInfo& v = bd->init_info; CheckVkErr(v.device.waitIdle()); - RemoveTexture(descriptor_set); - descriptor_set = VK_NULL_HANDLE; + RemoveTexture(im_texture); + im_texture = nullptr; v.device.destroyImageView(image_view, v.allocator); image_view = VK_NULL_HANDLE; @@ -264,8 +265,8 @@ void UploadTextureData::Destroy() { } // Register a texture -vk::DescriptorSet AddTexture(vk::ImageView image_view, vk::ImageLayout image_layout, - vk::Sampler sampler) { +ImTextureID AddTexture(vk::ImageView image_view, vk::ImageLayout image_layout, + vk::Sampler sampler) { VkData* bd = GetBackendData(); const InitInfo& v = bd->init_info; @@ -303,7 +304,9 @@ vk::DescriptorSet AddTexture(vk::ImageView image_view, vk::ImageLayout image_lay }; v.device.updateDescriptorSets({write_desc}, {}); } - return descriptor_set; + return new Texture{ + .descriptor_set = descriptor_set, + }; } UploadTextureData UploadTexture(const void* data, vk::Format format, u32 width, u32 height, size_t size) { @@ -370,7 +373,7 @@ UploadTextureData UploadTexture(const void* data, vk::Format format, u32 width, } // Create descriptor set (ImTextureID) - info.descriptor_set = AddTexture(info.image_view, vk::ImageLayout::eShaderReadOnlyOptimal); + info.im_texture = AddTexture(info.image_view, vk::ImageLayout::eShaderReadOnlyOptimal); // Create Upload Buffer { @@ -464,10 +467,12 @@ UploadTextureData UploadTexture(const void* data, vk::Format format, u32 width, return info; } -void RemoveTexture(vk::DescriptorSet descriptor_set) { +void RemoveTexture(ImTextureID texture) { + IM_ASSERT(texture != nullptr); VkData* bd = GetBackendData(); const InitInfo& v = bd->init_info; - v.device.freeDescriptorSets(bd->descriptor_pool, {descriptor_set}); + v.device.freeDescriptorSets(bd->descriptor_pool, {texture->descriptor_set}); + delete texture; } static void CreateOrResizeBuffer(RenderBuffer& rb, size_t new_size, vk::BufferUsageFlagBits usage) { @@ -679,13 +684,7 @@ void RenderDrawData(ImDrawData& draw_data, vk::CommandBuffer command_buffer, command_buffer.setScissor(0, 1, &scissor); // Bind DescriptorSet with font or user texture - vk::DescriptorSet desc_set[1]{(VkDescriptorSet)pcmd->TextureId}; - if (sizeof(ImTextureID) < sizeof(ImU64)) { - // We don't support texture switches if ImTextureID hasn't been redefined to be - // 64-bit. Do a flaky check that other textures haven't been used. - IM_ASSERT(pcmd->TextureId == (ImTextureID)bd->font_descriptor_set); - desc_set[0] = bd->font_descriptor_set; - } + vk::DescriptorSet desc_set[1]{pcmd->TextureId->descriptor_set}; command_buffer.bindDescriptorSets(vk::PipelineBindPoint::eGraphics, bd->pipeline_layout, 0, {desc_set}, {}); @@ -709,7 +708,7 @@ static bool CreateFontsTexture() { const InitInfo& v = bd->init_info; // Destroy existing texture (if any) - if (bd->font_view || bd->font_image || bd->font_memory || bd->font_descriptor_set) { + if (bd->font_view || bd->font_image || bd->font_memory || bd->font_texture) { CheckVkErr(v.queue.waitIdle()); DestroyFontsTexture(); } @@ -782,7 +781,7 @@ static bool CreateFontsTexture() { } // Create the Descriptor Set: - bd->font_descriptor_set = AddTexture(bd->font_view, vk::ImageLayout::eShaderReadOnlyOptimal); + bd->font_texture = AddTexture(bd->font_view, vk::ImageLayout::eShaderReadOnlyOptimal); // Create the Upload Buffer: vk::DeviceMemory upload_buffer_memory{}; @@ -874,7 +873,7 @@ static bool CreateFontsTexture() { } // Store our identifier - io.Fonts->SetTexID(bd->font_descriptor_set); + io.Fonts->SetTexID(bd->font_texture); // End command buffer vk::SubmitInfo end_info = {}; @@ -898,9 +897,9 @@ static void DestroyFontsTexture() { VkData* bd = GetBackendData(); const InitInfo& v = bd->init_info; - if (bd->font_descriptor_set) { - RemoveTexture(bd->font_descriptor_set); - bd->font_descriptor_set = VK_NULL_HANDLE; + if (bd->font_texture) { + RemoveTexture(bd->font_texture); + bd->font_texture = nullptr; io.Fonts->SetTexID(nullptr); } @@ -1266,4 +1265,20 @@ void Shutdown() { IM_DELETE(bd); } +void OnSurfaceFormatChange(vk::Format surface_format) { + VkData* bd = GetBackendData(); + const InitInfo& v = bd->init_info; + auto& pl_format = const_cast( + bd->init_info.pipeline_rendering_create_info.pColorAttachmentFormats[0]); + if (pl_format != surface_format) { + pl_format = surface_format; + if (bd->pipeline) { + v.device.destroyPipeline(bd->pipeline, v.allocator); + bd->pipeline = VK_NULL_HANDLE; + CreatePipeline(v.device, v.allocator, v.pipeline_cache, nullptr, &bd->pipeline, + v.subpass); + } + } +} + } // namespace ImGui::Vulkan diff --git a/src/imgui/renderer/imgui_impl_vulkan.h b/src/imgui/renderer/imgui_impl_vulkan.h index e325e2a8d..3e77627dd 100644 --- a/src/imgui/renderer/imgui_impl_vulkan.h +++ b/src/imgui/renderer/imgui_impl_vulkan.h @@ -10,6 +10,12 @@ struct ImDrawData; +namespace ImGui { +struct Texture { + vk::DescriptorSet descriptor_set{nullptr}; +}; +} // namespace ImGui + namespace ImGui::Vulkan { struct InitInfo { @@ -34,29 +40,33 @@ struct InitInfo { struct UploadTextureData { vk::Image image; vk::ImageView image_view; - vk::DescriptorSet descriptor_set; vk::DeviceMemory image_memory; vk::CommandBuffer command_buffer; // Submit to the queue vk::Buffer upload_buffer; vk::DeviceMemory upload_buffer_memory; + ImTextureID im_texture; + void Upload(); void Destroy(); }; -vk::DescriptorSet AddTexture(vk::ImageView image_view, vk::ImageLayout image_layout, - vk::Sampler sampler = VK_NULL_HANDLE); +ImTextureID AddTexture(vk::ImageView image_view, vk::ImageLayout image_layout, + vk::Sampler sampler = VK_NULL_HANDLE); UploadTextureData UploadTexture(const void* data, vk::Format format, u32 width, u32 height, size_t size); -void RemoveTexture(vk::DescriptorSet descriptor_set); +void RemoveTexture(ImTextureID descriptor_set); bool Init(InitInfo info); void Shutdown(); void RenderDrawData(ImDrawData& draw_data, vk::CommandBuffer command_buffer, vk::Pipeline pipeline = VK_NULL_HANDLE); -} // namespace ImGui::Vulkan \ No newline at end of file +void SetBlendEnabled(bool enabled); +void OnSurfaceFormatChange(vk::Format surface_format); + +} // namespace ImGui::Vulkan diff --git a/src/imgui/renderer/texture_manager.cpp b/src/imgui/renderer/texture_manager.cpp index f13c995be..49f912a92 100644 --- a/src/imgui/renderer/texture_manager.cpp +++ b/src/imgui/renderer/texture_manager.cpp @@ -4,6 +4,7 @@ #include #include +#include #include "common/assert.h" #include "common/config.h" #include "common/io_file.h" @@ -123,7 +124,7 @@ static std::deque g_upload_list; namespace Core::TextureManager { Inner::~Inner() { - if (upload_data.descriptor_set != nullptr) { + if (upload_data.im_texture != nullptr) { std::unique_lock lk{g_upload_mtx}; g_upload_list.emplace_back(UploadJob{ .data = this->upload_data, @@ -151,7 +152,7 @@ void WorkerLoop() { g_job_list.pop_front(); g_job_list_mtx.unlock(); - if (Config::vkCrashDiagnosticEnabled()) { + if (Config::getVkCrashDiagnosticEnabled()) { // FIXME: Crash diagnostic hangs when building the command buffer here continue; } @@ -174,6 +175,7 @@ void WorkerLoop() { auto texture = Vulkan::UploadTexture(pixels, vk::Format::eR8G8B8A8Unorm, width, height, width * height * 4 * sizeof(stbi_uc)); + stbi_image_free((void*)pixels); core->upload_data = texture; core->width = width; @@ -239,7 +241,7 @@ void Submit() { } if (upload.core != nullptr) { upload.core->upload_data.Upload(); - upload.core->texture_id = upload.core->upload_data.descriptor_set; + upload.core->texture_id = upload.core->upload_data.im_texture; if (upload.core->count.fetch_sub(1) == 1) { delete upload.core; } diff --git a/src/input/controller.cpp b/src/input/controller.cpp index daef9c940..bb8db9a7c 100644 --- a/src/input/controller.cpp +++ b/src/input/controller.cpp @@ -2,6 +2,7 @@ // SPDX-License-Identifier: GPL-2.0-or-later #include +#include "common/config.h" #include "common/logging/log.h" #include "core/libraries/kernel/time.h" #include "core/libraries/pad/pad.h" @@ -9,6 +10,55 @@ namespace Input { +using Libraries::Pad::OrbisPadButtonDataOffset; + +void State::OnButton(OrbisPadButtonDataOffset button, bool isPressed) { + if (isPressed) { + buttonsState |= button; + } else { + buttonsState &= ~button; + } +} + +void State::OnAxis(Axis axis, int value) { + const auto toggle = [&](const auto button) { + if (value > 0) { + buttonsState |= button; + } else { + buttonsState &= ~button; + } + }; + switch (axis) { + case Axis::TriggerLeft: + toggle(OrbisPadButtonDataOffset::L2); + break; + case Axis::TriggerRight: + toggle(OrbisPadButtonDataOffset::R2); + break; + default: + break; + } + axes[static_cast(axis)] = value; +} + +void State::OnTouchpad(int touchIndex, bool isDown, float x, float y) { + touchpad[touchIndex].state = isDown; + touchpad[touchIndex].x = static_cast(x * 1920); + touchpad[touchIndex].y = static_cast(y * 941); +} + +void State::OnGyro(const float gyro[3]) { + angularVelocity.x = gyro[0]; + angularVelocity.y = gyro[1]; + angularVelocity.z = gyro[2]; +} + +void State::OnAccel(const float accel[3]) { + acceleration.x = accel[0]; + acceleration.y = accel[1]; + acceleration.z = accel[2]; +} + GameController::GameController() { m_states_num = 0; m_last_state = State(); @@ -74,45 +124,22 @@ void GameController::AddState(const State& state) { m_states_num++; } -void GameController::CheckButton(int id, Libraries::Pad::OrbisPadButtonDataOffset button, - bool is_pressed) { +void GameController::CheckButton(int id, OrbisPadButtonDataOffset button, bool is_pressed) { std::scoped_lock lock{m_mutex}; auto state = GetLastState(); + state.time = Libraries::Kernel::sceKernelGetProcessTime(); - if (is_pressed) { - state.buttonsState |= button; - } else { - state.buttonsState &= ~button; - } + state.OnButton(button, is_pressed); AddState(state); } void GameController::Axis(int id, Input::Axis axis, int value) { - using Libraries::Pad::OrbisPadButtonDataOffset; - std::scoped_lock lock{m_mutex}; auto state = GetLastState(); state.time = Libraries::Kernel::sceKernelGetProcessTime(); - int axis_id = static_cast(axis); - state.axes[axis_id] = value; - - if (axis == Input::Axis::TriggerLeft) { - if (value > 0) { - state.buttonsState |= OrbisPadButtonDataOffset::L2; - } else { - state.buttonsState &= ~OrbisPadButtonDataOffset::L2; - } - } - - if (axis == Input::Axis::TriggerRight) { - if (value > 0) { - state.buttonsState |= OrbisPadButtonDataOffset::R2; - } else { - state.buttonsState &= ~OrbisPadButtonDataOffset::R2; - } - } + state.OnAxis(axis, value); AddState(state); } @@ -123,9 +150,7 @@ void GameController::Gyro(int id, const float gyro[3]) { state.time = Libraries::Kernel::sceKernelGetProcessTime(); // Update the angular velocity (gyro data) - state.angularVelocity.x = gyro[0]; // X-axis - state.angularVelocity.y = gyro[1]; // Y-axis - state.angularVelocity.z = gyro[2]; // Z-axis + state.OnGyro(gyro); AddState(state); } @@ -135,9 +160,7 @@ void GameController::Acceleration(int id, const float acceleration[3]) { state.time = Libraries::Kernel::sceKernelGetProcessTime(); // Update the acceleration values - state.acceleration.x = acceleration[0]; // X-axis - state.acceleration.y = acceleration[1]; // Y-axis - state.acceleration.z = acceleration[2]; // Z-axis + state.OnAccel(acceleration); AddState(state); } @@ -159,7 +182,7 @@ void GameController::CalculateOrientation(Libraries::Pad::OrbisFVector3& acceler // Normalize accelerometer measurement float norm = std::sqrt(ax * ax + ay * ay + az * az); - if (norm == 0.0f) + if (norm == 0.0f || deltaTime == 0.0f) return; // Handle NaN norm = 1.0f / norm; ax *= norm; @@ -189,11 +212,6 @@ void GameController::CalculateOrientation(Libraries::Pad::OrbisFVector3& acceler gz += Kp * ez + Ki * eInt[2]; //// Integrate rate of change of quaternion - // float pa = q2, pb = q3, pc = q4; - // q1 += (-q2 * gx - q3 * gy - q4 * gz) * (0.5f * deltaTime); - // q2 += (pa * gx + pb * gz - pc * gy) * (0.5f * deltaTime); - // q3 += (pb * gy - pa * gz + pc * gx) * (0.5f * deltaTime); - // q4 += (pc * gz + pa * gy - pb * gx) * (0.5f * deltaTime); q1 += (-q2 * gx - q3 * gy - q4 * gz) * (0.5f * deltaTime); q2 += (q1 * gx + q3 * gz - q4 * gy) * (0.5f * deltaTime); q3 += (q1 * gy - q2 * gz + q4 * gx) * (0.5f * deltaTime); @@ -215,58 +233,48 @@ void GameController::CalculateOrientation(Libraries::Pad::OrbisFVector3& acceler } void GameController::SetLightBarRGB(u8 r, u8 g, u8 b) { - if (m_sdl_gamepad != nullptr) { - SDL_SetGamepadLED(m_sdl_gamepad, r, g, b); + if (!m_engine) { + return; } + std::scoped_lock _{m_mutex}; + m_engine->SetLightBarRGB(r, g, b); } -bool GameController::SetVibration(u8 smallMotor, u8 largeMotor) { - if (m_sdl_gamepad != nullptr) { - return SDL_RumbleGamepad(m_sdl_gamepad, (smallMotor / 255.0f) * 0xFFFF, - (largeMotor / 255.0f) * 0xFFFF, -1); +void GameController::SetVibration(u8 smallMotor, u8 largeMotor) { + if (!m_engine) { + return; } - return true; + std::scoped_lock _{m_mutex}; + m_engine->SetVibration(smallMotor, largeMotor); } void GameController::SetTouchpadState(int touchIndex, bool touchDown, float x, float y) { if (touchIndex < 2) { 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 * 941); + state.time = Libraries::Kernel::sceKernelGetProcessTime(); + state.OnTouchpad(touchIndex, touchDown, x, y); 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; - if (SDL_SetGamepadSensorEnabled(m_sdl_gamepad, SDL_SENSOR_GYRO, true)) { - gyro_poll_rate = SDL_GetGamepadSensorDataRate(m_sdl_gamepad, SDL_SENSOR_GYRO); - LOG_INFO(Input, "Gyro initialized, poll rate: {}", gyro_poll_rate); - } else { - LOG_ERROR(Input, "Failed to initialize gyro controls for gamepad"); - } - if (SDL_SetGamepadSensorEnabled(m_sdl_gamepad, SDL_SENSOR_ACCEL, true)) { - accel_poll_rate = SDL_GetGamepadSensorDataRate(m_sdl_gamepad, SDL_SENSOR_ACCEL); - LOG_INFO(Input, "Accel initialized, poll rate: {}", accel_poll_rate); - } else { - LOG_ERROR(Input, "Failed to initialize accel controls for gamepad"); - } - SDL_free(gamepads); - - SetLightBarRGB(0, 0, 255); +void GameController::SetEngine(std::unique_ptr engine) { + std::scoped_lock _{m_mutex}; + m_engine = std::move(engine); + if (m_engine) { + m_engine->Init(); } } +Engine* GameController::GetEngine() { + return m_engine.get(); +} + u32 GameController::Poll() { if (m_connected) { + std::scoped_lock lock{m_mutex}; auto time = Libraries::Kernel::sceKernelGetProcessTime(); if (m_states_num == 0) { auto diff = (time - m_last_state.time) / 1000; diff --git a/src/input/controller.h b/src/input/controller.h index c6fc02c24..bbaed75ea 100644 --- a/src/input/controller.h +++ b/src/input/controller.h @@ -3,12 +3,12 @@ #pragma once +#include +#include #include #include "common/types.h" #include "core/libraries/pad/pad.h" -struct SDL_Gamepad; - namespace Input { enum class Axis { @@ -28,7 +28,14 @@ struct TouchpadEntry { u16 y{}; }; -struct State { +class State { +public: + void OnButton(Libraries::Pad::OrbisPadButtonDataOffset, bool); + void OnAxis(Axis, int); + void OnTouchpad(int touchIndex, bool isDown, float x, float y); + void OnGyro(const float[3]); + void OnAccel(const float[3]); + Libraries::Pad::OrbisPadButtonDataOffset buttonsState{}; u64 time = 0; int axes[static_cast(Axis::AxisMax)] = {128, 128, 128, 128, 0, 0}; @@ -38,12 +45,22 @@ struct State { Libraries::Pad::OrbisFQuaternion orientation = {0.0f, 0.0f, 0.0f, 1.0f}; }; +class Engine { +public: + virtual ~Engine() = default; + virtual void Init() = 0; + virtual void SetLightBarRGB(u8 r, u8 g, u8 b) = 0; + virtual void SetVibration(u8 smallMotor, u8 largeMotor) = 0; + virtual State ReadState() = 0; + virtual float GetAccelPollRate() const = 0; + virtual float GetGyroPollRate() const = 0; +}; + inline int GetAxis(int min, int max, int value) { - int v = (255 * (value - min)) / (max - min); - return (v < 0 ? 0 : (v > 255 ? 255 : v)); + return std::clamp((255 * (value - min)) / (max - min), 0, 255); } -constexpr u32 MAX_STATES = 64; +constexpr u32 MAX_STATES = 32; class GameController { public: @@ -59,13 +76,12 @@ public: void Gyro(int id, const float gyro[3]); void Acceleration(int id, const float acceleration[3]); void SetLightBarRGB(u8 r, u8 g, u8 b); - bool SetVibration(u8 smallMotor, u8 largeMotor); + void SetVibration(u8 smallMotor, u8 largeMotor); void SetTouchpadState(int touchIndex, bool touchDown, float x, float y); - void TryOpenSDLController(); + void SetEngine(std::unique_ptr); + Engine* GetEngine(); u32 Poll(); - float gyro_poll_rate; - float accel_poll_rate; static void CalculateOrientation(Libraries::Pad::OrbisFVector3& acceleration, Libraries::Pad::OrbisFVector3& angularVelocity, float deltaTime, @@ -85,7 +101,7 @@ private: std::array m_states; std::array m_private; - SDL_Gamepad* m_sdl_gamepad = nullptr; + std::unique_ptr m_engine = nullptr; }; } // namespace Input diff --git a/src/input/input_handler.cpp b/src/input/input_handler.cpp new file mode 100644 index 000000000..6e961043e --- /dev/null +++ b/src/input/input_handler.cpp @@ -0,0 +1,716 @@ +// SPDX-FileCopyrightText: Copyright 2024 shadPS4 Emulator Project +// SPDX-License-Identifier: GPL-2.0-or-later + +#include "input_handler.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "SDL3/SDL_events.h" +#include "SDL3/SDL_timer.h" + +#include "common/config.h" +#include "common/elf_info.h" +#include "common/io_file.h" +#include "common/path_util.h" +#include "common/version.h" +#include "input/controller.h" +#include "input/input_mouse.h" + +namespace Input { +/* +Project structure: +n to m connection between inputs and outputs +Keyup and keydown events update a dynamic list* of u32 'flags' (what is currently in the list is +'pressed') On every event, after flag updates, we check for every input binding -> controller output +pair if all their flags are 'on' If not, disable; if so, enable them. For axes, we gather their data +into a struct cumulatively from all inputs, then after we checked all of those, we update them all +at once. Wheel inputs generate a timer that doesn't turn off their outputs automatically, but push a +userevent to do so. + +What structs are needed? +InputBinding(key1, key2, key3) +ControllerOutput(button, axis) - we only need a const array of these, and one of the attr-s is +always 0 BindingConnection(inputBinding (member), controllerOutput (ref to the array element)) + +Things to always test before pushing like a dumbass: +Button outputs +Axis outputs +Input hierarchy +Multi key inputs +Mouse to joystick +Key toggle +Joystick halfmode + +Don't be an idiot and test only the changed part expecting everything else to not be broken +*/ + +bool leftjoystick_halfmode = false, rightjoystick_halfmode = false; +std::pair leftjoystick_deadzone, rightjoystick_deadzone, lefttrigger_deadzone, + righttrigger_deadzone; + +std::list> pressed_keys; +std::list toggled_keys; +static std::vector connections; + +auto output_array = std::array{ + // Important: these have to be the first, or else they will update in the wrong order + ControllerOutput(LEFTJOYSTICK_HALFMODE), + ControllerOutput(RIGHTJOYSTICK_HALFMODE), + ControllerOutput(KEY_TOGGLE), + + // Button mappings + ControllerOutput(SDL_GAMEPAD_BUTTON_NORTH), // Triangle + ControllerOutput(SDL_GAMEPAD_BUTTON_EAST), // Circle + ControllerOutput(SDL_GAMEPAD_BUTTON_SOUTH), // Cross + ControllerOutput(SDL_GAMEPAD_BUTTON_WEST), // Square + ControllerOutput(SDL_GAMEPAD_BUTTON_LEFT_SHOULDER), // L1 + ControllerOutput(SDL_GAMEPAD_BUTTON_LEFT_STICK), // L3 + ControllerOutput(SDL_GAMEPAD_BUTTON_RIGHT_SHOULDER), // R1 + ControllerOutput(SDL_GAMEPAD_BUTTON_RIGHT_STICK), // R3 + ControllerOutput(SDL_GAMEPAD_BUTTON_START), // Options + ControllerOutput(SDL_GAMEPAD_BUTTON_TOUCHPAD), // TouchPad + ControllerOutput(SDL_GAMEPAD_BUTTON_DPAD_UP), // Up + ControllerOutput(SDL_GAMEPAD_BUTTON_DPAD_DOWN), // Down + ControllerOutput(SDL_GAMEPAD_BUTTON_DPAD_LEFT), // Left + ControllerOutput(SDL_GAMEPAD_BUTTON_DPAD_RIGHT), // Right + + // Axis mappings + // ControllerOutput(SDL_GAMEPAD_BUTTON_INVALID, SDL_GAMEPAD_AXIS_LEFTX, false), + // ControllerOutput(SDL_GAMEPAD_BUTTON_INVALID, SDL_GAMEPAD_AXIS_LEFTY, false), + // ControllerOutput(SDL_GAMEPAD_BUTTON_INVALID, SDL_GAMEPAD_AXIS_RIGHTX, false), + // ControllerOutput(SDL_GAMEPAD_BUTTON_INVALID, SDL_GAMEPAD_AXIS_RIGHTY, false), + ControllerOutput(SDL_GAMEPAD_BUTTON_INVALID, SDL_GAMEPAD_AXIS_LEFTX), + ControllerOutput(SDL_GAMEPAD_BUTTON_INVALID, SDL_GAMEPAD_AXIS_LEFTY), + ControllerOutput(SDL_GAMEPAD_BUTTON_INVALID, SDL_GAMEPAD_AXIS_RIGHTX), + ControllerOutput(SDL_GAMEPAD_BUTTON_INVALID, SDL_GAMEPAD_AXIS_RIGHTY), + + ControllerOutput(SDL_GAMEPAD_BUTTON_INVALID, SDL_GAMEPAD_AXIS_LEFT_TRIGGER), + ControllerOutput(SDL_GAMEPAD_BUTTON_INVALID, SDL_GAMEPAD_AXIS_RIGHT_TRIGGER), + + ControllerOutput(SDL_GAMEPAD_BUTTON_INVALID, SDL_GAMEPAD_AXIS_INVALID), +}; + +void ControllerOutput::LinkJoystickAxes() { + // for (int i = 17; i < 23; i += 2) { + // delete output_array[i].new_param; + // output_array[i].new_param = output_array[i + 1].new_param; + // } +} + +static OrbisPadButtonDataOffset SDLGamepadToOrbisButton(u8 button) { + using OPBDO = OrbisPadButtonDataOffset; + + switch (button) { + case SDL_GAMEPAD_BUTTON_DPAD_DOWN: + return OPBDO::Down; + case SDL_GAMEPAD_BUTTON_DPAD_UP: + return OPBDO::Up; + case SDL_GAMEPAD_BUTTON_DPAD_LEFT: + return OPBDO::Left; + case SDL_GAMEPAD_BUTTON_DPAD_RIGHT: + return OPBDO::Right; + case SDL_GAMEPAD_BUTTON_SOUTH: + return OPBDO::Cross; + case SDL_GAMEPAD_BUTTON_NORTH: + return OPBDO::Triangle; + case SDL_GAMEPAD_BUTTON_WEST: + return OPBDO::Square; + case SDL_GAMEPAD_BUTTON_EAST: + return OPBDO::Circle; + case SDL_GAMEPAD_BUTTON_START: + return OPBDO::Options; + case SDL_GAMEPAD_BUTTON_TOUCHPAD: + return OPBDO::TouchPad; + case SDL_GAMEPAD_BUTTON_BACK: + return OPBDO::TouchPad; + case SDL_GAMEPAD_BUTTON_LEFT_SHOULDER: + return OPBDO::L1; + case SDL_GAMEPAD_BUTTON_RIGHT_SHOULDER: + return OPBDO::R1; + case SDL_GAMEPAD_BUTTON_LEFT_STICK: + return OPBDO::L3; + case SDL_GAMEPAD_BUTTON_RIGHT_STICK: + return OPBDO::R3; + default: + return OPBDO::None; + } +} + +Axis GetAxisFromSDLAxis(u8 sdl_axis) { + switch (sdl_axis) { + case SDL_GAMEPAD_AXIS_LEFTX: + return Axis::LeftX; + case SDL_GAMEPAD_AXIS_LEFTY: + return Axis::LeftY; + case SDL_GAMEPAD_AXIS_RIGHTX: + return Axis::RightX; + case SDL_GAMEPAD_AXIS_RIGHTY: + return Axis::RightY; + case SDL_GAMEPAD_AXIS_LEFT_TRIGGER: + return Axis::TriggerLeft; + case SDL_GAMEPAD_AXIS_RIGHT_TRIGGER: + return Axis::TriggerRight; + default: + return Axis::AxisMax; + } +} + +// syntax: 'name, name,name' or 'name,name' or 'name' +InputBinding GetBindingFromString(std::string& line) { + std::array keys = {InputID(), InputID(), InputID()}; + + // Check and process tokens + for (const auto token : std::views::split(line, ',')) { // Split by comma + const std::string t(token.begin(), token.end()); + InputID input; + + if (string_to_keyboard_key_map.find(t) != string_to_keyboard_key_map.end()) { + input = InputID(InputType::KeyboardMouse, string_to_keyboard_key_map.at(t)); + } else if (string_to_axis_map.find(t) != string_to_axis_map.end()) { + input = InputID(InputType::Axis, (u32)string_to_axis_map.at(t).axis); + } else if (string_to_cbutton_map.find(t) != string_to_cbutton_map.end()) { + input = InputID(InputType::Controller, string_to_cbutton_map.at(t)); + } else { + // Invalid token found; return default binding + LOG_DEBUG(Input, "Invalid token found: {}", t); + return InputBinding(); + } + + // Assign to the first available slot + for (auto& key : keys) { + if (!key.IsValid()) { + key = input; + break; + } + } + } + LOG_DEBUG(Input, "Parsed line: {}", InputBinding(keys[0], keys[1], keys[2]).ToString()); + return InputBinding(keys[0], keys[1], keys[2]); +} + +void ParseInputConfig(const std::string game_id = "") { + std::string config_type = Config::GetUseUnifiedInputConfig() ? "default" : game_id; + const auto config_file = Config::GetFoolproofKbmConfigFile(config_type); + + // we reset these here so in case the user fucks up or doesn't include some of these, + // we can fall back to default + connections.clear(); + float mouse_deadzone_offset = 0.5; + float mouse_speed = 1; + float mouse_speed_offset = 0.125; + + leftjoystick_deadzone = {1, 127}; + rightjoystick_deadzone = {1, 127}; + lefttrigger_deadzone = {1, 127}; + righttrigger_deadzone = {1, 127}; + + Config::SetOverrideControllerColor(false); + Config::SetControllerCustomColor(0, 0, 255); + + int lineCount = 0; + + std::ifstream file(config_file); + std::string line = ""; + while (std::getline(file, line)) { + lineCount++; + + // Strip the ; and whitespace + line.erase(std::remove_if(line.begin(), line.end(), + [](unsigned char c) { return std::isspace(c); }), + line.end()); + + if (line.empty()) { + continue; + } + // Truncate lines starting at # + std::size_t comment_pos = line.find('#'); + if (comment_pos != std::string::npos) { + line = line.substr(0, comment_pos); + } + // Remove trailing semicolon + if (!line.empty() && line[line.length() - 1] == ';') { + line = line.substr(0, line.length() - 1); + } + if (line.empty()) { + continue; + } + + // Split the line by '=' + std::size_t equal_pos = line.find('='); + if (equal_pos == std::string::npos) { + LOG_WARNING(Input, "Invalid format at line: {}, data: \"{}\", skipping line.", + lineCount, line); + continue; + } + + std::string output_string = line.substr(0, equal_pos); + std::string input_string = line.substr(equal_pos + 1); + std::size_t comma_pos = input_string.find(','); + + auto parseInt = [](const std::string& s) -> std::optional { + try { + return std::stoi(s); + } catch (...) { + return std::nullopt; + } + }; + + if (output_string == "mouse_to_joystick") { + if (input_string == "left") { + SetMouseToJoystick(1); + } else if (input_string == "right") { + SetMouseToJoystick(2); + } else { + LOG_WARNING(Input, "Invalid argument for mouse-to-joystick binding"); + SetMouseToJoystick(0); + } + continue; + } else if (output_string == "key_toggle") { + if (comma_pos != std::string::npos) { + // handle key-to-key toggling (separate list?) + InputBinding toggle_keys = GetBindingFromString(input_string); + if (toggle_keys.KeyCount() != 2) { + LOG_WARNING(Input, + "Syntax error: Please provide exactly 2 keys: " + "first is the toggler, the second is the key to toggle: {}", + line); + continue; + } + ControllerOutput* toggle_out = + &*std::ranges::find(output_array, ControllerOutput(KEY_TOGGLE)); + BindingConnection toggle_connection = BindingConnection( + InputBinding(toggle_keys.keys[0]), toggle_out, 0, toggle_keys.keys[1]); + connections.insert(connections.end(), toggle_connection); + continue; + } + LOG_WARNING(Input, "Invalid format at line: {}, data: \"{}\", skipping line.", + lineCount, line); + continue; + } else if (output_string == "mouse_movement_params") { + std::stringstream ss(input_string); + char comma; // To hold the comma separators between the floats + ss >> mouse_deadzone_offset >> comma >> mouse_speed >> comma >> mouse_speed_offset; + + // Check for invalid input (in case there's an unexpected format) + if (ss.fail()) { + LOG_WARNING(Input, "Failed to parse mouse movement parameters from line: {}", line); + continue; + } + SetMouseParams(mouse_deadzone_offset, mouse_speed, mouse_speed_offset); + continue; + } else if (output_string == "analog_deadzone") { + std::stringstream ss(input_string); + std::string device, inner_deadzone_str, outer_deadzone_str; + + if (!std::getline(ss, device, ',') || !std::getline(ss, inner_deadzone_str, ',') || + !std::getline(ss, outer_deadzone_str)) { + LOG_WARNING(Input, "Malformed deadzone config at line {}: \"{}\"", lineCount, line); + continue; + } + + auto inner_deadzone = parseInt(inner_deadzone_str); + auto outer_deadzone = parseInt(outer_deadzone_str); + + if (!inner_deadzone || !outer_deadzone) { + LOG_WARNING(Input, "Invalid deadzone values at line {}: \"{}\"", lineCount, line); + continue; + } + + std::pair deadzone = {*inner_deadzone, *outer_deadzone}; + + static std::unordered_map&> deadzone_map = { + {"leftjoystick", leftjoystick_deadzone}, + {"rightjoystick", rightjoystick_deadzone}, + {"l2", lefttrigger_deadzone}, + {"r2", righttrigger_deadzone}, + }; + + if (auto it = deadzone_map.find(device); it != deadzone_map.end()) { + it->second = deadzone; + LOG_DEBUG(Input, "Parsed deadzone: {} {} {}", device, inner_deadzone_str, + outer_deadzone_str); + } else { + LOG_WARNING(Input, "Invalid axis name at line {}: \"{}\", skipping line.", + lineCount, line); + } + continue; + } else if (output_string == "override_controller_color") { + std::stringstream ss(input_string); + std::string enable, r_s, g_s, b_s; + std::optional r, g, b; + if (!std::getline(ss, enable, ',') || !std::getline(ss, r_s, ',') || + !std::getline(ss, g_s, ',') || !std::getline(ss, b_s)) { + LOG_WARNING(Input, "Malformed controller color config at line {}: \"{}\"", + lineCount, line); + continue; + } + r = parseInt(r_s); + g = parseInt(g_s); + b = parseInt(b_s); + if (!r || !g || !b) { + LOG_WARNING(Input, "Invalid RGB values at line {}: \"{}\", skipping line.", + lineCount, line); + continue; + } + Config::SetOverrideControllerColor(enable == "true"); + Config::SetControllerCustomColor(*r, *g, *b); + LOG_DEBUG(Input, "Parsed color settings: {} {} {} {}", + enable == "true" ? "override" : "no override", *r, *b, *g); + continue; + } + + // normal cases + InputBinding binding = GetBindingFromString(input_string); + BindingConnection connection(InputID(), nullptr); + auto button_it = string_to_cbutton_map.find(output_string); + auto axis_it = string_to_axis_map.find(output_string); + + if (binding.IsEmpty()) { + LOG_WARNING(Input, "Invalid format at line: {}, data: \"{}\", skipping line.", + lineCount, line); + continue; + } + if (button_it != string_to_cbutton_map.end()) { + connection = BindingConnection( + binding, &*std::ranges::find(output_array, ControllerOutput(button_it->second))); + connections.insert(connections.end(), connection); + + } else if (axis_it != string_to_axis_map.end()) { + int value_to_set = binding.keys[2].type == InputType::Axis ? 0 : axis_it->second.value; + connection = BindingConnection( + binding, + &*std::ranges::find(output_array, ControllerOutput(SDL_GAMEPAD_BUTTON_INVALID, + axis_it->second.axis, + axis_it->second.value >= 0)), + value_to_set); + connections.insert(connections.end(), connection); + } else { + LOG_WARNING(Input, "Invalid format at line: {}, data: \"{}\", skipping line.", + lineCount, line); + continue; + } + LOG_DEBUG(Input, "Succesfully parsed line {}", lineCount); + } + file.close(); + std::sort(connections.begin(), connections.end()); + for (auto& c : connections) { + LOG_DEBUG(Input, "Binding: {} : {}", c.output->ToString(), c.binding.ToString()); + } + LOG_DEBUG(Input, "Done parsing the input config!"); +} + +u32 GetMouseWheelEvent(const SDL_Event& event) { + if (event.type != SDL_EVENT_MOUSE_WHEEL && event.type != SDL_EVENT_MOUSE_WHEEL_OFF) { + LOG_WARNING(Input, "Something went wrong with wheel input parsing!"); + return (u32)-1; + } + if (event.wheel.y > 0) { + return SDL_MOUSE_WHEEL_UP; + } else if (event.wheel.y < 0) { + return SDL_MOUSE_WHEEL_DOWN; + } else if (event.wheel.x > 0) { + return SDL_MOUSE_WHEEL_RIGHT; + } else if (event.wheel.x < 0) { + return SDL_MOUSE_WHEEL_LEFT; + } + return (u32)-1; +} + +InputEvent InputBinding::GetInputEventFromSDLEvent(const SDL_Event& e) { + switch (e.type) { + case SDL_EVENT_KEY_DOWN: + case SDL_EVENT_KEY_UP: + return InputEvent(InputType::KeyboardMouse, e.key.key, e.key.down, 0); + case SDL_EVENT_MOUSE_BUTTON_DOWN: + case SDL_EVENT_MOUSE_BUTTON_UP: + return InputEvent(InputType::KeyboardMouse, (u32)e.button.button, e.button.down, 0); + case SDL_EVENT_MOUSE_WHEEL: + case SDL_EVENT_MOUSE_WHEEL_OFF: + return InputEvent(InputType::KeyboardMouse, GetMouseWheelEvent(e), + e.type == SDL_EVENT_MOUSE_WHEEL, 0); + case SDL_EVENT_GAMEPAD_BUTTON_DOWN: + case SDL_EVENT_GAMEPAD_BUTTON_UP: + return InputEvent(InputType::Controller, (u32)e.gbutton.button, e.gbutton.down, 0); + case SDL_EVENT_GAMEPAD_AXIS_MOTION: + return InputEvent(InputType::Axis, (u32)e.gaxis.axis, true, e.gaxis.value / 256); + default: + return InputEvent(); + } +} + +GameController* ControllerOutput::controller = nullptr; +void ControllerOutput::SetControllerOutputController(GameController* c) { + ControllerOutput::controller = c; +} + +void ToggleKeyInList(InputID input) { + if (input.type == InputType::Axis) { + LOG_ERROR(Input, "Toggling analog inputs is not supported!"); + return; + } + auto it = std::find(toggled_keys.begin(), toggled_keys.end(), input); + if (it == toggled_keys.end()) { + toggled_keys.insert(toggled_keys.end(), input); + LOG_DEBUG(Input, "Added {} to toggled keys", input.ToString()); + } else { + toggled_keys.erase(it); + LOG_DEBUG(Input, "Removed {} from toggled keys", input.ToString()); + } +} + +void ControllerOutput::ResetUpdate() { + state_changed = false; + new_button_state = false; + *new_param = 0; // bruh +} +void ControllerOutput::AddUpdate(InputEvent event) { + if (button == KEY_TOGGLE) { + if (event.active) { + ToggleKeyInList(event.input); + } + } else if (button != SDL_GAMEPAD_BUTTON_INVALID) { + if (event.input.type == InputType::Axis) { + bool temp = event.axis_value * (positive_axis ? 1 : -1) > 0x40; + new_button_state |= event.active && event.axis_value * (positive_axis ? 1 : -1) > 0x40; + if (temp) { + LOG_DEBUG(Input, "Toggled a button from an axis"); + } + } else { + new_button_state |= event.active; + } + + } else if (axis != SDL_GAMEPAD_AXIS_INVALID) { + *new_param = (event.active ? event.axis_value : 0) + *new_param; + } +} +void ControllerOutput::FinalizeUpdate() { + state_changed = old_button_state != new_button_state || old_param != *new_param; + if (!state_changed) { + return; + } + old_button_state = new_button_state; + old_param = *new_param; + float touchpad_x = 0; + if (button != SDL_GAMEPAD_BUTTON_INVALID) { + switch (button) { + case SDL_GAMEPAD_BUTTON_TOUCHPAD: + touchpad_x = Config::getBackButtonBehavior() == "left" ? 0.25f + : Config::getBackButtonBehavior() == "right" ? 0.75f + : 0.5f; + controller->SetTouchpadState(0, new_button_state, touchpad_x, 0.5f); + controller->CheckButton(0, SDLGamepadToOrbisButton(button), new_button_state); + break; + case LEFTJOYSTICK_HALFMODE: + leftjoystick_halfmode = new_button_state; + break; + case RIGHTJOYSTICK_HALFMODE: + rightjoystick_halfmode = new_button_state; + break; + // KEY_TOGGLE isn't handled here anymore, as this function doesn't have the necessary data + // to do it, and it would be inconvenient to force it here, when AddUpdate does the job just + // fine, and a toggle doesn't have to checked against every input that's bound to it, it's + // enough that one is pressed + default: // is a normal key (hopefully) + controller->CheckButton(0, SDLGamepadToOrbisButton(button), new_button_state); + break; + } + } else if (axis != SDL_GAMEPAD_AXIS_INVALID && positive_axis) { + // avoid double-updating axes, but don't skip directional button bindings + auto ApplyDeadzone = [](s16* value, std::pair deadzone) { + if (std::abs(*value) <= deadzone.first || deadzone.first == deadzone.second) { + *value = 0; + } else { + *value = (*value >= 0 ? 1 : -1) * + std::clamp((int)((128.0 * (std::abs(*value) - deadzone.first)) / + (float)(deadzone.second - deadzone.first)), + 0, 128); + } + }; + float multiplier = 1.0; + Axis c_axis = GetAxisFromSDLAxis(axis); + switch (c_axis) { + case Axis::LeftX: + case Axis::LeftY: + ApplyDeadzone(new_param, leftjoystick_deadzone); + multiplier = leftjoystick_halfmode ? 0.5 : 1.0; + break; + case Axis::RightX: + case Axis::RightY: + ApplyDeadzone(new_param, rightjoystick_deadzone); + multiplier = rightjoystick_halfmode ? 0.5 : 1.0; + break; + case Axis::TriggerLeft: + ApplyDeadzone(new_param, lefttrigger_deadzone); + controller->Axis(0, c_axis, GetAxis(0x0, 0x80, *new_param)); + controller->CheckButton(0, OrbisPadButtonDataOffset::L2, *new_param > 0x20); + return; + case Axis::TriggerRight: + ApplyDeadzone(new_param, righttrigger_deadzone); + controller->Axis(0, c_axis, GetAxis(0x0, 0x80, *new_param)); + controller->CheckButton(0, OrbisPadButtonDataOffset::R2, *new_param > 0x20); + return; + default: + break; + } + controller->Axis(0, c_axis, GetAxis(-0x80, 0x80, *new_param * multiplier)); + } +} + +// Updates the list of pressed keys with the given input. +// Returns whether the list was updated or not. +bool UpdatePressedKeys(InputEvent event) { + // Skip invalid inputs + InputID input = event.input; + if (input.sdl_id == (u32)-1) { + return false; + } + if (input.type == InputType::Axis) { + // analog input, it gets added when it first sends an event, + // and from there, it only changes the parameter + auto it = std::lower_bound(pressed_keys.begin(), pressed_keys.end(), input, + [](const std::pair& e, InputID i) { + return std::tie(e.first.input.type, e.first.input.sdl_id) < + std::tie(i.type, i.sdl_id); + }); + if (it == pressed_keys.end() || it->first.input != input) { + pressed_keys.insert(it, {event, false}); + LOG_DEBUG(Input, "Added axis {} to the input list", event.input.sdl_id); + } else { + // noise filter + if (std::abs(it->first.axis_value - event.axis_value) <= 1) { + return false; + } + it->first.axis_value = event.axis_value; + } + return true; + } else if (event.active) { + // Find the correct position for insertion to maintain order + auto it = std::lower_bound(pressed_keys.begin(), pressed_keys.end(), input, + [](const std::pair& e, InputID i) { + return std::tie(e.first.input.type, e.first.input.sdl_id) < + std::tie(i.type, i.sdl_id); + }); + + // Insert only if 'value' is not already in the list + if (it == pressed_keys.end() || it->first.input != input) { + pressed_keys.insert(it, {event, false}); + return true; + } + } else { + // Remove 'value' from the list if it's not pressed + auto it = std::find_if( + pressed_keys.begin(), pressed_keys.end(), + [input](const std::pair& e) { return e.first.input == input; }); + if (it != pressed_keys.end()) { + pressed_keys.erase(it); + return true; + } + } + LOG_DEBUG(Input, "No change was made!"); + return false; +} +// Check if the binding's all keys are currently active. +// It also extracts the analog inputs' parameters, and updates the input hierarchy flags. +InputEvent BindingConnection::ProcessBinding() { + // the last key is always set (if the connection isn't empty), + // and the analog inputs are always the last one due to how they are sorted, + // so this signifies whether or not the input is analog + InputEvent event = InputEvent(binding.keys[0]); + if (pressed_keys.empty()) { + return event; + } + if (event.input.type != InputType::Axis) { + // for button inputs + event.axis_value = axis_param; + } + // it's a bit scuffed, but if the output is a toggle, then we put the key here + if (output->button == KEY_TOGGLE) { + event.input = toggle; + } + + // Extract keys from InputBinding and ignore unused or toggled keys + std::list input_keys = {binding.keys[0], binding.keys[1], binding.keys[2]}; + input_keys.remove(InputID()); + for (auto key = input_keys.begin(); key != input_keys.end();) { + if (std::find(toggled_keys.begin(), toggled_keys.end(), *key) != toggled_keys.end()) { + key = input_keys.erase(key); // Use the returned iterator + } else { + ++key; // Increment only if no erase happened + } + } + if (input_keys.empty()) { + LOG_DEBUG(Input, "No actual inputs to check, returning true"); + event.active = true; + return event; + } + + // Iterator for pressed_keys, starting from the beginning + auto pressed_it = pressed_keys.begin(); + + // Store pointers to flags in pressed_keys that need to be set if all keys are active + std::list flags_to_set; + + // Check if all keys in input_keys are active + for (InputID key : input_keys) { + bool key_found = false; + + while (pressed_it != pressed_keys.end()) { + if (pressed_it->first.input == key && (pressed_it->second == false)) { + key_found = true; + if (output->positive_axis) { + flags_to_set.push_back(&pressed_it->second); + } + if (pressed_it->first.input.type == InputType::Axis) { + event.axis_value = pressed_it->first.axis_value; + } + ++pressed_it; + break; + } + ++pressed_it; + } + if (!key_found) { + return event; + } + } + + for (bool* flag : flags_to_set) { + *flag = true; + } + if (binding.keys[0].type != InputType::Axis) { // the axes spam inputs, making this unreadable + LOG_DEBUG(Input, "Input found: {}", binding.ToString()); + } + event.active = true; + return event; // All keys are active +} + +void ActivateOutputsFromInputs() { + // Reset values and flags + for (auto& it : pressed_keys) { + it.second = false; + } + for (auto& it : output_array) { + it.ResetUpdate(); + } + + // Iterate over all inputs, and update their respecive outputs accordingly + for (auto& it : connections) { + it.output->AddUpdate(it.ProcessBinding()); + } + + // Update all outputs + for (auto& it : output_array) { + it.FinalizeUpdate(); + } +} + +} // namespace Input diff --git a/src/input/input_handler.h b/src/input/input_handler.h new file mode 100644 index 000000000..0178e7937 --- /dev/null +++ b/src/input/input_handler.h @@ -0,0 +1,407 @@ +// SPDX-FileCopyrightText: Copyright 2024 shadPS4 Emulator Project +// SPDX-License-Identifier: GPL-2.0-or-later + +#pragma once + +#include +#include +#include +#include + +#include "SDL3/SDL_events.h" +#include "SDL3/SDL_timer.h" + +#include "common/logging/log.h" +#include "common/types.h" +#include "core/libraries/pad/pad.h" +#include "fmt/format.h" +#include "input/controller.h" + +// +1 and +2 is taken +#define SDL_MOUSE_WHEEL_UP SDL_EVENT_MOUSE_WHEEL + 3 +#define SDL_MOUSE_WHEEL_DOWN SDL_EVENT_MOUSE_WHEEL + 4 +#define SDL_MOUSE_WHEEL_LEFT SDL_EVENT_MOUSE_WHEEL + 5 +#define SDL_MOUSE_WHEEL_RIGHT SDL_EVENT_MOUSE_WHEEL + 7 + +// idk who already used what where so I just chose a big number +#define SDL_EVENT_MOUSE_WHEEL_OFF SDL_EVENT_USER + 10 + +#define LEFTJOYSTICK_HALFMODE 0x00010000 +#define RIGHTJOYSTICK_HALFMODE 0x00020000 +#define BACK_BUTTON 0x00040000 + +#define KEY_TOGGLE 0x00200000 + +namespace Input { +using Input::Axis; +using Libraries::Pad::OrbisPadButtonDataOffset; + +struct AxisMapping { + u32 axis; + s16 value; + AxisMapping(SDL_GamepadAxis a, s16 v) : axis(a), value(v) {} +}; + +enum class InputType { Axis, KeyboardMouse, Controller, Count }; +const std::array input_type_names = {"Axis", "KBM", "Controller", "Unknown"}; + +class InputID { +public: + InputType type; + u32 sdl_id; + InputID(InputType d = InputType::Count, u32 i = (u32)-1) : type(d), sdl_id(i) {} + bool operator==(const InputID& o) const { + return type == o.type && sdl_id == o.sdl_id; + } + bool operator!=(const InputID& o) const { + return type != o.type || sdl_id != o.sdl_id; + } + bool operator<=(const InputID& o) const { + return type <= o.type && sdl_id <= o.sdl_id; + } + bool IsValid() const { + return *this != InputID(); + } + std::string ToString() { + return fmt::format("({}: {:x})", input_type_names[(u8)type], sdl_id); + } +}; + +class InputEvent { +public: + InputID input; + bool active; + s8 axis_value; + + InputEvent(InputID i = InputID(), bool a = false, s8 v = 0) + : input(i), active(a), axis_value(v) {} + InputEvent(InputType d, u32 i, bool a = false, s8 v = 0) + : input(d, i), active(a), axis_value(v) {} +}; + +// i strongly suggest you collapse these maps +const std::map string_to_cbutton_map = { + {"triangle", SDL_GAMEPAD_BUTTON_NORTH}, + {"circle", SDL_GAMEPAD_BUTTON_EAST}, + {"cross", SDL_GAMEPAD_BUTTON_SOUTH}, + {"square", SDL_GAMEPAD_BUTTON_WEST}, + {"l1", SDL_GAMEPAD_BUTTON_LEFT_SHOULDER}, + {"r1", SDL_GAMEPAD_BUTTON_RIGHT_SHOULDER}, + {"l3", SDL_GAMEPAD_BUTTON_LEFT_STICK}, + {"r3", SDL_GAMEPAD_BUTTON_RIGHT_STICK}, + {"pad_up", SDL_GAMEPAD_BUTTON_DPAD_UP}, + {"pad_down", SDL_GAMEPAD_BUTTON_DPAD_DOWN}, + {"pad_left", SDL_GAMEPAD_BUTTON_DPAD_LEFT}, + {"pad_right", SDL_GAMEPAD_BUTTON_DPAD_RIGHT}, + {"options", SDL_GAMEPAD_BUTTON_START}, + + // these are outputs only (touchpad can only be bound to itself) + {"touchpad", SDL_GAMEPAD_BUTTON_TOUCHPAD}, + {"leftjoystick_halfmode", LEFTJOYSTICK_HALFMODE}, + {"rightjoystick_halfmode", RIGHTJOYSTICK_HALFMODE}, + + // this is only for input + {"back", SDL_GAMEPAD_BUTTON_BACK}, +}; + +const std::map string_to_axis_map = { + {"axis_left_x_plus", {SDL_GAMEPAD_AXIS_LEFTX, 127}}, + {"axis_left_x_minus", {SDL_GAMEPAD_AXIS_LEFTX, -127}}, + {"axis_left_y_plus", {SDL_GAMEPAD_AXIS_LEFTY, 127}}, + {"axis_left_y_minus", {SDL_GAMEPAD_AXIS_LEFTY, -127}}, + {"axis_right_x_plus", {SDL_GAMEPAD_AXIS_RIGHTX, 127}}, + {"axis_right_x_minus", {SDL_GAMEPAD_AXIS_RIGHTX, -127}}, + {"axis_right_y_plus", {SDL_GAMEPAD_AXIS_RIGHTY, 127}}, + {"axis_right_y_minus", {SDL_GAMEPAD_AXIS_RIGHTY, -127}}, + + {"l2", {SDL_GAMEPAD_AXIS_LEFT_TRIGGER, 127}}, + {"r2", {SDL_GAMEPAD_AXIS_RIGHT_TRIGGER, 127}}, + + // should only use these to bind analog inputs to analog outputs + {"axis_left_x", {SDL_GAMEPAD_AXIS_LEFTX, 127}}, + {"axis_left_y", {SDL_GAMEPAD_AXIS_LEFTY, 127}}, + {"axis_right_x", {SDL_GAMEPAD_AXIS_RIGHTX, 127}}, + {"axis_right_y", {SDL_GAMEPAD_AXIS_RIGHTY, 127}}, +}; +const std::map string_to_keyboard_key_map = { + {"a", SDLK_A}, + {"b", SDLK_B}, + {"c", SDLK_C}, + {"d", SDLK_D}, + {"e", SDLK_E}, + {"f", SDLK_F}, + {"g", SDLK_G}, + {"h", SDLK_H}, + {"i", SDLK_I}, + {"j", SDLK_J}, + {"k", SDLK_K}, + {"l", SDLK_L}, + {"m", SDLK_M}, + {"n", SDLK_N}, + {"o", SDLK_O}, + {"p", SDLK_P}, + {"q", SDLK_Q}, + {"r", SDLK_R}, + {"s", SDLK_S}, + {"t", SDLK_T}, + {"u", SDLK_U}, + {"v", SDLK_V}, + {"w", SDLK_W}, + {"x", SDLK_X}, + {"y", SDLK_Y}, + {"z", SDLK_Z}, + {"0", SDLK_0}, + {"1", SDLK_1}, + {"2", SDLK_2}, + {"3", SDLK_3}, + {"4", SDLK_4}, + {"5", SDLK_5}, + {"6", SDLK_6}, + {"7", SDLK_7}, + {"8", SDLK_8}, + {"9", SDLK_9}, + {"kp0", SDLK_KP_0}, + {"kp1", SDLK_KP_1}, + {"kp2", SDLK_KP_2}, + {"kp3", SDLK_KP_3}, + {"kp4", SDLK_KP_4}, + {"kp5", SDLK_KP_5}, + {"kp6", SDLK_KP_6}, + {"kp7", SDLK_KP_7}, + {"kp8", SDLK_KP_8}, + {"kp9", SDLK_KP_9}, + {"comma", SDLK_COMMA}, + {"period", SDLK_PERIOD}, + {"question", SDLK_QUESTION}, + {"semicolon", SDLK_SEMICOLON}, + {"minus", SDLK_MINUS}, + {"underscore", SDLK_UNDERSCORE}, + {"lparenthesis", SDLK_LEFTPAREN}, + {"rparenthesis", SDLK_RIGHTPAREN}, + {"lbracket", SDLK_LEFTBRACKET}, + {"rbracket", SDLK_RIGHTBRACKET}, + {"lbrace", SDLK_LEFTBRACE}, + {"rbrace", SDLK_RIGHTBRACE}, + {"backslash", SDLK_BACKSLASH}, + {"dash", SDLK_SLASH}, + {"enter", SDLK_RETURN}, + {"space", SDLK_SPACE}, + {"tab", SDLK_TAB}, + {"backspace", SDLK_BACKSPACE}, + {"escape", SDLK_ESCAPE}, + {"left", SDLK_LEFT}, + {"right", SDLK_RIGHT}, + {"up", SDLK_UP}, + {"down", SDLK_DOWN}, + {"lctrl", SDLK_LCTRL}, + {"rctrl", SDLK_RCTRL}, + {"lshift", SDLK_LSHIFT}, + {"rshift", SDLK_RSHIFT}, + {"lalt", SDLK_LALT}, + {"ralt", SDLK_RALT}, + {"lmeta", SDLK_LGUI}, + {"rmeta", SDLK_RGUI}, + {"lwin", SDLK_LGUI}, + {"rwin", SDLK_RGUI}, + {"home", SDLK_HOME}, + {"end", SDLK_END}, + {"pgup", SDLK_PAGEUP}, + {"pgdown", SDLK_PAGEDOWN}, + {"leftbutton", SDL_BUTTON_LEFT}, + {"rightbutton", SDL_BUTTON_RIGHT}, + {"middlebutton", SDL_BUTTON_MIDDLE}, + {"sidebuttonback", SDL_BUTTON_X1}, + {"sidebuttonforward", SDL_BUTTON_X2}, + {"mousewheelup", SDL_MOUSE_WHEEL_UP}, + {"mousewheeldown", SDL_MOUSE_WHEEL_DOWN}, + {"mousewheelleft", SDL_MOUSE_WHEEL_LEFT}, + {"mousewheelright", SDL_MOUSE_WHEEL_RIGHT}, + {"kpperiod", SDLK_KP_PERIOD}, + {"kpcomma", SDLK_KP_COMMA}, + {"kpdivide", SDLK_KP_DIVIDE}, + {"kpmultiply", SDLK_KP_MULTIPLY}, + {"kpminus", SDLK_KP_MINUS}, + {"kpplus", SDLK_KP_PLUS}, + {"kpenter", SDLK_KP_ENTER}, + {"kpequals", SDLK_KP_EQUALS}, + {"capslock", SDLK_CAPSLOCK}, +}; + +void ParseInputConfig(const std::string game_id); + +class InputBinding { +public: + InputID keys[3]; + InputBinding(InputID k1 = InputID(), InputID k2 = InputID(), InputID k3 = InputID()) { + // we format the keys so comparing them will be very fast, because we will only have to + // compare 3 sorted elements, where the only possible duplicate item is 0 + + // duplicate entries get changed to one original, one null + if (k1 == k2 && k1 != InputID()) { + k2 = InputID(); + } + if (k1 == k3 && k1 != InputID()) { + k3 = InputID(); + } + if (k3 == k2 && k2 != InputID()) { + k2 = InputID(); + } + // this sorts them + if (k1 <= k2 && k1 <= k3) { + keys[0] = k1; + if (k2 <= k3) { + keys[1] = k2; + keys[2] = k3; + } else { + keys[1] = k3; + keys[2] = k2; + } + } else if (k2 <= k1 && k2 <= k3) { + keys[0] = k2; + if (k1 <= k3) { + keys[1] = k1; + keys[2] = k3; + } else { + keys[1] = k3; + keys[2] = k1; + } + } else { + keys[0] = k3; + if (k1 <= k2) { + keys[1] = k1; + keys[2] = k2; + } else { + keys[1] = k2; + keys[3] = k1; + } + } + } + // copy ctor + InputBinding(const InputBinding& o) { + keys[0] = o.keys[0]; + keys[1] = o.keys[1]; + keys[2] = o.keys[2]; + } + + inline bool operator==(const InputBinding& o) { + // InputID() signifies an unused slot + return (keys[0] == o.keys[0] || keys[0] == InputID() || o.keys[0] == InputID()) && + (keys[1] == o.keys[1] || keys[1] == InputID() || o.keys[1] == InputID()) && + (keys[2] == o.keys[2] || keys[2] == InputID() || o.keys[2] == InputID()); + // it is already very fast, + // but reverse order makes it check the actual keys first instead of possible 0-s, + // potenially skipping the later expressions of the three-way AND + } + inline int KeyCount() const { + return (keys[0].IsValid() ? 1 : 0) + (keys[1].IsValid() ? 1 : 0) + + (keys[2].IsValid() ? 1 : 0); + } + // Sorts by the amount of non zero keys - left side is 'bigger' here + bool operator<(const InputBinding& other) const { + return KeyCount() > other.KeyCount(); + } + inline bool IsEmpty() { + return !(keys[0].IsValid() || keys[1].IsValid() || keys[2].IsValid()); + } + std::string ToString() { // todo add device type + switch (KeyCount()) { + case 1: + return fmt::format("({})", keys[0].ToString()); + case 2: + return fmt::format("({}, {})", keys[0].ToString(), keys[1].ToString()); + case 3: + return fmt::format("({}, {}, {})", keys[0].ToString(), keys[1].ToString(), + keys[2].ToString()); + default: + return "Empty"; + } + } + + // returns an InputEvent based on the event type (keyboard, mouse buttons/wheel, or controller) + static InputEvent GetInputEventFromSDLEvent(const SDL_Event& e); +}; +class ControllerOutput { + static GameController* controller; + +public: + static void SetControllerOutputController(GameController* c); + static void LinkJoystickAxes(); + + u32 button; + u32 axis; + // these are only used as s8, + // but I added some padding to avoid overflow if it's activated by multiple inputs + // axis_plus and axis_minus pairs share a common new_param, the other outputs have their own + s16 old_param; + s16* new_param; + bool old_button_state, new_button_state, state_changed, positive_axis; + + ControllerOutput(const u32 b, u32 a = SDL_GAMEPAD_AXIS_INVALID, bool p = true) { + button = b; + axis = a; + new_param = new s16(0); + old_param = 0; + positive_axis = p; + } + ControllerOutput(const ControllerOutput& o) : button(o.button), axis(o.axis) { + new_param = new s16(*o.new_param); + } + ~ControllerOutput() { + delete new_param; + } + inline bool operator==(const ControllerOutput& o) const { // fucking consts everywhere + return button == o.button && axis == o.axis; + } + inline bool operator!=(const ControllerOutput& o) const { + return button != o.button || axis != o.axis; + } + std::string ToString() const { + return fmt::format("({}, {}, {})", (s32)button, (int)axis, old_param); + } + inline bool IsButton() const { + return axis == SDL_GAMEPAD_AXIS_INVALID && button != SDL_GAMEPAD_BUTTON_INVALID; + } + inline bool IsAxis() const { + return axis != SDL_GAMEPAD_AXIS_INVALID && button == SDL_GAMEPAD_BUTTON_INVALID; + } + + void ResetUpdate(); + void AddUpdate(InputEvent event); + void FinalizeUpdate(); +}; +class BindingConnection { +public: + InputBinding binding; + ControllerOutput* output; + u32 axis_param; + InputID toggle; + + BindingConnection(InputBinding b, ControllerOutput* out, u32 param = 0, InputID t = InputID()) { + binding = b; + axis_param = param; + output = out; + toggle = t; + } + bool operator<(const BindingConnection& other) const { + // a button is a higher priority than an axis, as buttons can influence axes + // (e.g. joystick_halfmode) + if (output->IsButton() && + (other.output->IsAxis() && (other.output->axis != SDL_GAMEPAD_AXIS_LEFT_TRIGGER && + other.output->axis != SDL_GAMEPAD_AXIS_RIGHT_TRIGGER))) { + return true; + } + if (binding < other.binding) { + return true; + } + return false; + } + InputEvent ProcessBinding(); +}; + +// Updates the list of pressed keys with the given input. +// Returns whether the list was updated or not. +bool UpdatePressedKeys(InputEvent event); + +void ActivateOutputsFromInputs(); + +} // namespace Input diff --git a/src/input/input_mouse.cpp b/src/input/input_mouse.cpp new file mode 100644 index 000000000..11feaeebb --- /dev/null +++ b/src/input/input_mouse.cpp @@ -0,0 +1,74 @@ +// SPDX-FileCopyrightText: Copyright 2024 shadPS4 Emulator Project +// SPDX-License-Identifier: GPL-2.0-or-later + +#include + +#include "common/types.h" +#include "input/controller.h" +#include "input_mouse.h" + +#include "SDL3/SDL.h" + +namespace Input { + +int mouse_joystick_binding = 0; +float mouse_deadzone_offset = 0.5, mouse_speed = 1, mouse_speed_offset = 0.1250; +Uint32 mouse_polling_id = 0; +bool mouse_enabled = false; + +// We had to go through 3 files of indirection just to update a flag +void ToggleMouseEnabled() { + mouse_enabled = !mouse_enabled; +} + +void SetMouseToJoystick(int joystick) { + mouse_joystick_binding = joystick; +} + +void SetMouseParams(float mdo, float ms, float mso) { + mouse_deadzone_offset = mdo; + mouse_speed = ms; + mouse_speed_offset = mso; +} + +Uint32 MousePolling(void* param, Uint32 id, Uint32 interval) { + auto* controller = (GameController*)param; + if (!mouse_enabled) + return interval; + + Axis axis_x, axis_y; + switch (mouse_joystick_binding) { + case 1: + axis_x = Axis::LeftX; + axis_y = Axis::LeftY; + break; + case 2: + axis_x = Axis::RightX; + axis_y = Axis::RightY; + break; + default: + return interval; // no update needed + } + + float d_x = 0, d_y = 0; + SDL_GetRelativeMouseState(&d_x, &d_y); + + float output_speed = + SDL_clamp((sqrt(d_x * d_x + d_y * d_y) + mouse_speed_offset * 128) * mouse_speed, + mouse_deadzone_offset * 128, 128.0); + + float angle = atan2(d_y, d_x); + float a_x = cos(angle) * output_speed, a_y = sin(angle) * output_speed; + + if (d_x != 0 && d_y != 0) { + controller->Axis(0, axis_x, GetAxis(-0x80, 0x80, a_x)); + controller->Axis(0, axis_y, GetAxis(-0x80, 0x80, a_y)); + } else { + controller->Axis(0, axis_x, GetAxis(-0x80, 0x80, 0)); + controller->Axis(0, axis_y, GetAxis(-0x80, 0x80, 0)); + } + + return interval; +} + +} // namespace Input diff --git a/src/input/input_mouse.h b/src/input/input_mouse.h new file mode 100644 index 000000000..da18ee04e --- /dev/null +++ b/src/input/input_mouse.h @@ -0,0 +1,18 @@ +// SPDX-FileCopyrightText: Copyright 2024 shadPS4 Emulator Project +// SPDX-License-Identifier: GPL-2.0-or-later + +#pragma once + +#include "SDL3/SDL.h" +#include "common/types.h" + +namespace Input { + +void ToggleMouseEnabled(); +void SetMouseToJoystick(int joystick); +void SetMouseParams(float mouse_deadzone_offset, float mouse_speed, float mouse_speed_offset); + +// Polls the mouse for changes, and simulates joystick movement from it. +Uint32 MousePolling(void* param, Uint32 id, Uint32 interval); + +} // namespace Input diff --git a/src/main.cpp b/src/main.cpp index bdbab89c9..6b334e446 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -29,6 +29,7 @@ int main(int argc, char* argv[]) { bool has_game_argument = false; std::string game_path; + std::vector game_args{}; // Map of argument strings to lambda functions std::unordered_map> arg_map = { @@ -37,6 +38,9 @@ int main(int argc, char* argv[]) { std::cout << "Usage: shadps4 [options] \n" "Options:\n" " -g, --game Specify game path to launch\n" + " -- ... Parameters passed to the game ELF. " + "Needs to be at the end of the line, and everything after \"--\" is a " + "game argument.\n" " -p, --patch Apply specified patch file\n" " -f, --fullscreen Specify window initial fullscreen " "state. Does not overwrite the config file.\n" @@ -86,7 +90,7 @@ int main(int argc, char* argv[]) { exit(1); } // Set fullscreen mode without saving it to config file - Config::setFullscreenMode(is_fullscreen); + Config::setIsFullscreen(is_fullscreen); }}, {"--fullscreen", [&](int& i) { arg_map["-f"](i); }}, {"--add-game-folder", @@ -126,6 +130,21 @@ int main(int argc, char* argv[]) { // Assume the last argument is the game file if not specified via -g/--game game_path = argv[i]; has_game_argument = true; + } else if (std::string(argv[i]) == "--") { + if (i + 1 == argc) { + std::cerr << "Warning: -- is set, but no game arguments are added!\n"; + break; + } + for (int j = i + 1; j < argc; j++) { + game_args.push_back(argv[j]); + } + break; + } else if (i + 1 < argc && std::string(argv[i + 1]) == "--") { + if (!has_game_argument) { + game_path = argv[i]; + has_game_argument = true; + } + break; } else { std::cerr << "Unknown argument: " << cur_arg << ", see --help for info.\n"; return 1; @@ -148,12 +167,12 @@ int main(int argc, char* argv[]) { // Check if the provided path is a valid file if (!std::filesystem::exists(eboot_path)) { - // If not a file, treat it as a game ID and search in install directories + // If not a file, treat it as a game ID and search in install directories recursively bool game_found = false; + const int max_depth = 5; for (const auto& install_dir : Config::getGameInstallDirs()) { - const auto candidate_path = install_dir / game_path / "eboot.bin"; - if (std::filesystem::exists(candidate_path)) { - eboot_path = candidate_path; + if (auto found_path = Common::FS::FindGameByID(install_dir, game_path, max_depth)) { + eboot_path = *found_path; game_found = true; break; } @@ -166,7 +185,7 @@ int main(int argc, char* argv[]) { // Run the emulator with the resolved eboot path Core::Emulator emulator; - emulator.Run(eboot_path); + emulator.Run(eboot_path, game_args); return 0; } diff --git a/src/qt_gui/about_dialog.ui b/src/qt_gui/about_dialog.ui index 19840e452..3842513a5 100644 --- a/src/qt_gui/about_dialog.ui +++ b/src/qt_gui/about_dialog.ui @@ -57,7 +57,7 @@ - shadPS4 + shadPS4 diff --git a/src/qt_gui/background_music_player.cpp b/src/qt_gui/background_music_player.cpp index a40c5bfae..e2b7177b3 100644 --- a/src/qt_gui/background_music_player.cpp +++ b/src/qt_gui/background_music_player.cpp @@ -7,7 +7,6 @@ BackgroundMusicPlayer::BackgroundMusicPlayer(QObject* parent) : QObject(parent) m_mediaPlayer = new QMediaPlayer(this); m_audioOutput = new QAudioOutput(this); m_mediaPlayer->setAudioOutput(m_audioOutput); - m_mediaPlayer->setLoops(QMediaPlayer::Infinite); } void BackgroundMusicPlayer::setVolume(int volume) { @@ -16,7 +15,7 @@ void BackgroundMusicPlayer::setVolume(int volume) { m_audioOutput->setVolume(linearVolume); } -void BackgroundMusicPlayer::playMusic(const QString& snd0path) { +void BackgroundMusicPlayer::playMusic(const QString& snd0path, bool loops) { if (snd0path.isEmpty()) { stopMusic(); return; @@ -28,6 +27,12 @@ void BackgroundMusicPlayer::playMusic(const QString& snd0path) { return; } + if (loops) { + m_mediaPlayer->setLoops(QMediaPlayer::Infinite); + } else { + m_mediaPlayer->setLoops(1); + } + m_currentMusic = newMusic; m_mediaPlayer->setSource(newMusic); m_mediaPlayer->play(); @@ -35,4 +40,5 @@ void BackgroundMusicPlayer::playMusic(const QString& snd0path) { void BackgroundMusicPlayer::stopMusic() { m_mediaPlayer->stop(); + m_mediaPlayer->setSource(QUrl("")); } diff --git a/src/qt_gui/background_music_player.h b/src/qt_gui/background_music_player.h index 6d70fe68c..078710a01 100644 --- a/src/qt_gui/background_music_player.h +++ b/src/qt_gui/background_music_player.h @@ -17,7 +17,7 @@ public: } void setVolume(int volume); - void playMusic(const QString& snd0path); + void playMusic(const QString& snd0path, bool loops = true); void stopMusic(); private: diff --git a/src/qt_gui/cheats_patches.cpp b/src/qt_gui/cheats_patches.cpp index 2fea0b6ea..7239affd5 100644 --- a/src/qt_gui/cheats_patches.cpp +++ b/src/qt_gui/cheats_patches.cpp @@ -26,8 +26,10 @@ #include #include #include -#include + #include "cheats_patches.h" +#include "common/config.h" +#include "common/logging/log.h" #include "common/memory_patcher.h" #include "common/path_util.h" #include "core/module.h" @@ -45,8 +47,13 @@ CheatsPatches::CheatsPatches(const QString& gameName, const QString& gameSerial, CheatsPatches::~CheatsPatches() {} void CheatsPatches::setupUI() { - defaultTextEdit = tr("defaultTextEdit_MSG"); - defaultTextEdit.replace("\\n", "\n"); + + // clang-format off + defaultTextEdit_MSG = tr("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:\\n").replace("\\n", "\n")+"https://github.com/shadps4-emu/ps4_cheats"; + CheatsNotFound_MSG = tr("No Cheats found for this game in this version of the selected repository,try another repository or a different version of the game."); + CheatsDownloadedSuccessfully_MSG = tr("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."); + DownloadComplete_MSG = tr("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. If the patch does not appear, it may be that it does not exist for the specific serial and version of the game."); + // clang-format on QString CHEATS_DIR_QString; Common::FS::PathToQString(CHEATS_DIR_QString, @@ -66,7 +73,8 @@ void CheatsPatches::setupUI() { QLabel* gameImageLabel = new QLabel(); if (!m_gameImage.isNull()) { - gameImageLabel->setPixmap(m_gameImage.scaled(275, 275, Qt::KeepAspectRatio)); + gameImageLabel->setPixmap( + m_gameImage.scaled(275, 275, Qt::KeepAspectRatio, Qt::SmoothTransformation)); } else { gameImageLabel->setText(tr("No Image Available")); } @@ -86,13 +94,15 @@ void CheatsPatches::setupUI() { gameVersionLabel->setAlignment(Qt::AlignLeft); gameInfoLayout->addWidget(gameVersionLabel); - QLabel* gameSizeLabel = new QLabel(tr("Size: ") + m_gameSize); - gameSizeLabel->setAlignment(Qt::AlignLeft); - gameInfoLayout->addWidget(gameSizeLabel); + if (Config::GetLoadGameSizeEnabled()) { + 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->setText(defaultTextEdit_MSG); instructionsTextEdit->setReadOnly(true); instructionsTextEdit->setFixedHeight(290); gameInfoLayout->addWidget(instructionsTextEdit); @@ -188,8 +198,12 @@ void CheatsPatches::setupUI() { } }); + QPushButton* closeButton = new QPushButton(tr("Close")); + connect(closeButton, &QPushButton::clicked, [this]() { QWidget::close(); }); + controlLayout->addWidget(downloadButton); controlLayout->addWidget(deleteCheatButton); + controlLayout->addWidget(closeButton); cheatsLayout->addLayout(controlLayout); cheatsTab->setLayout(cheatsLayout); @@ -464,6 +478,8 @@ void CheatsPatches::onSaveButtonClicked() { } else { QMessageBox::information(this, tr("Success"), tr("Options saved successfully.")); } + + QWidget::close(); } QCheckBox* CheatsPatches::findCheckBoxByName(const QString& name) { @@ -562,7 +578,7 @@ void CheatsPatches::downloadCheats(const QString& source, const QString& gameSer } else { QMessageBox::warning(this, tr("Error"), QString(tr("Failed to download file:") + - "%1\n\n" + tr("Error:") + "%2") + "%1\n\n" + tr("Error") + ":%2") .arg(fileUrl) .arg(fileReply->errorString())); } @@ -573,7 +589,7 @@ void CheatsPatches::downloadCheats(const QString& source, const QString& gameSer } } if (!foundFiles && showMessageBox) { - QMessageBox::warning(this, tr("Cheats Not Found"), tr("CheatsNotFound_MSG")); + QMessageBox::warning(this, tr("Cheats Not Found"), CheatsNotFound_MSG); } } else if (source == "GoldHEN" || source == "shadPS4") { QString textContent(jsonData); @@ -638,7 +654,7 @@ void CheatsPatches::downloadCheats(const QString& source, const QString& gameSer } else { QMessageBox::warning(this, tr("Error"), QString(tr("Failed to download file:") + - "%1\n\n" + tr("Error:") + "%2") + "%1\n\n" + tr("Error") + ":%2") .arg(fileUrl) .arg(fileReply->errorString())); } @@ -649,18 +665,18 @@ void CheatsPatches::downloadCheats(const QString& source, const QString& gameSer } } if (!foundFiles && showMessageBox) { - QMessageBox::warning(this, tr("Cheats Not Found"), tr("CheatsNotFound_MSG")); + QMessageBox::warning(this, tr("Cheats Not Found"), CheatsNotFound_MSG); } } if (foundFiles && showMessageBox) { QMessageBox::information(this, tr("Cheats Downloaded Successfully"), - tr("CheatsDownloadedSuccessfully_MSG")); + CheatsDownloadedSuccessfully_MSG); populateFileListCheats(); } } else { if (showMessageBox) { - QMessageBox::warning(this, tr("Cheats Not Found"), tr("CheatsNotFound_MSG")); + QMessageBox::warning(this, tr("Cheats Not Found"), CheatsNotFound_MSG); } } reply->deleteLater(); @@ -810,7 +826,7 @@ void CheatsPatches::downloadPatches(const QString repository, const bool showMes } if (showMessageBox) { QMessageBox::information(this, tr("Download Complete"), - QString(tr("DownloadComplete_MSG"))); + QString(DownloadComplete_MSG)); } // Create the files.json file with the identification of which file to open createFilesJson(repository); @@ -837,7 +853,7 @@ void CheatsPatches::compatibleVersionNotice(const QString repository) { foreach (const QString& xmlFile, xmlFiles) { QFile file(dir.filePath(xmlFile)); if (!file.open(QIODevice::ReadOnly | QIODevice::Text)) { - QMessageBox::warning(this, tr("ERROR"), + QMessageBox::warning(this, tr("Error"), QString(tr("Failed to open file:") + "\n%1").arg(xmlFile)); continue; } @@ -865,7 +881,7 @@ void CheatsPatches::compatibleVersionNotice(const QString repository) { } if (xmlReader.hasError()) { - QMessageBox::warning(this, tr("ERROR"), + QMessageBox::warning(this, tr("Error"), QString(tr("XML ERROR:") + "\n%1").arg(xmlReader.errorString())); } @@ -920,7 +936,7 @@ void CheatsPatches::createFilesJson(const QString& repository) { foreach (const QString& xmlFile, xmlFiles) { QFile file(dir.filePath(xmlFile)); if (!file.open(QIODevice::ReadOnly | QIODevice::Text)) { - QMessageBox::warning(this, tr("ERROR"), + QMessageBox::warning(this, tr("Error"), QString(tr("Failed to open file:") + "\n%1").arg(xmlFile)); continue; } @@ -938,7 +954,7 @@ void CheatsPatches::createFilesJson(const QString& repository) { } if (xmlReader.hasError()) { - QMessageBox::warning(this, tr("ERROR"), + QMessageBox::warning(this, tr("Error"), QString(tr("XML ERROR:") + "\n%1").arg(xmlReader.errorString())); } filesObject[xmlFile] = titleIdsArray; @@ -946,7 +962,7 @@ void CheatsPatches::createFilesJson(const QString& repository) { QFile jsonFile(dir.absolutePath() + "/files.json"); if (!jsonFile.open(QIODevice::WriteOnly)) { - QMessageBox::warning(this, tr("ERROR"), tr("Failed to open files.json for writing")); + QMessageBox::warning(this, tr("Error"), tr("Failed to open files.json for writing")); return; } @@ -1066,7 +1082,11 @@ void CheatsPatches::addCheatsToLayout(const QJsonArray& modsArray, const QJsonAr QLabel* creditsLabel = new QLabel(); QString creditsText = tr("Author: "); if (!creditsArray.isEmpty()) { - creditsText += creditsArray[0].toString(); + QStringList authors; + for (const QJsonValue& credit : creditsArray) { + authors << credit.toString(); + } + creditsText += authors.join(", "); } creditsLabel->setText(creditsText); creditsLabel->setAlignment(Qt::AlignLeft); @@ -1149,7 +1169,7 @@ void CheatsPatches::addPatchesToLayout(const QString& filePath) { QString fullPath = dir.filePath(folderPath); if (!dir.exists(fullPath)) { - QMessageBox::warning(this, tr("ERROR"), + QMessageBox::warning(this, tr("Error"), QString(tr("Directory does not exist:") + "\n%1").arg(fullPath)); return; } @@ -1159,7 +1179,7 @@ void CheatsPatches::addPatchesToLayout(const QString& filePath) { QFile jsonFile(filesJsonPath); if (!jsonFile.open(QIODevice::ReadOnly)) { - QMessageBox::warning(this, tr("ERROR"), tr("Failed to open files.json for reading.")); + QMessageBox::warning(this, tr("Error"), tr("Failed to open files.json for reading.")); return; } @@ -1183,7 +1203,7 @@ void CheatsPatches::addPatchesToLayout(const QString& filePath) { if (!xmlFile.open(QIODevice::ReadOnly)) { QMessageBox::warning( - this, tr("ERROR"), + this, tr("Error"), QString(tr("Failed to open file:") + "\n%1").arg(xmlFile.fileName())); continue; } @@ -1332,7 +1352,7 @@ void CheatsPatches::applyCheat(const QString& modName, bool enabled) { // Determine if the hint field is present bool isHintPresent = m_cheats[modName].hasHint; - MemoryPatcher::PatchMemory(modNameStr, offsetStr, valueStr, !isHintPresent, false); + MemoryPatcher::PatchMemory(modNameStr, offsetStr, valueStr, "", "", !isHintPresent, false); } } @@ -1354,28 +1374,23 @@ void CheatsPatches::applyPatch(const QString& patchName, bool enabled) { bool littleEndian = false; - if (type == "bytes16") { - littleEndian = true; - } else if (type == "bytes32") { - littleEndian = true; - } else if (type == "bytes64") { + if (type == "bytes16" || type == "bytes32" || type == "bytes64") { littleEndian = true; } MemoryPatcher::PatchMask patchMask = MemoryPatcher::PatchMask::None; int maskOffsetValue = 0; - if (type == "mask") { + 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 (type == "mask" || type == "mask_jump32" && !maskOffsetStr.toStdString().empty()) { + maskOffsetValue = std::stoi(maskOffsetStr.toStdString(), 0, 10); + } + if (MemoryPatcher::g_eboot_address == 0) { MemoryPatcher::patchInfo addingPatch; addingPatch.gameSerial = patchInfo.serial.toStdString(); @@ -1391,7 +1406,8 @@ void CheatsPatches::applyPatch(const QString& patchName, bool enabled) { continue; } MemoryPatcher::PatchMemory(patchName.toStdString(), address.toStdString(), - patchValue.toStdString(), false, littleEndian, patchMask); + patchValue.toStdString(), "", "", false, littleEndian, + patchMask); } } } @@ -1416,6 +1432,6 @@ void CheatsPatches::onPatchCheckBoxHovered(QCheckBox* checkBox, bool hovered) { updateNoteTextEdit(patchName.toString()); } } else { - instructionsTextEdit->setText(defaultTextEdit); + instructionsTextEdit->setText(defaultTextEdit_MSG); } -} \ No newline at end of file +} diff --git a/src/qt_gui/cheats_patches.h b/src/qt_gui/cheats_patches.h index 4217436f6..0f793b774 100644 --- a/src/qt_gui/cheats_patches.h +++ b/src/qt_gui/cheats_patches.h @@ -110,7 +110,11 @@ private: QComboBox* patchesComboBox; QListView* patchesListView; - QString defaultTextEdit; + // Strings + QString defaultTextEdit_MSG; + QString CheatsNotFound_MSG; + QString CheatsDownloadedSuccessfully_MSG; + QString DownloadComplete_MSG; }; #endif // CHEATS_PATCHES_H \ No newline at end of file diff --git a/src/qt_gui/check_update.cpp b/src/qt_gui/check_update.cpp index e3e019144..e73a66a71 100644 --- a/src/qt_gui/check_update.cpp +++ b/src/qt_gui/check_update.cpp @@ -19,7 +19,7 @@ #include #include #include -#include +#include #include #include #include @@ -67,8 +67,23 @@ void CheckUpdate::CheckForUpdates(const bool showMessage) { connect(reply, &QNetworkReply::finished, this, [this, reply, showMessage, updateChannel]() { if (reply->error() != QNetworkReply::NoError) { - QMessageBox::warning(this, tr("Error"), - QString(tr("Network error:") + "\n" + reply->errorString())); + if (reply->attribute(QNetworkRequest::HttpStatusCodeAttribute).toInt() == 403) { + QString response = reply->readAll(); + if (response.startsWith("{\"message\":\"API rate limit exceeded for")) { + QMessageBox::warning( + this, tr("Auto Updater"), + // clang-format off +tr("The Auto Updater allows up to 60 update checks per hour.\\nYou have reached this limit. Please try again later.").replace("\\n", "\n")); + // clang-format on + } else { + QMessageBox::warning( + this, tr("Error"), + QString(tr("Network error:") + "\n" + reply->errorString())); + } + } else { + QMessageBox::warning(this, tr("Error"), + QString(tr("Network error:") + "\n" + reply->errorString())); + } reply->deleteLater(); return; } @@ -146,14 +161,14 @@ void CheckUpdate::CheckForUpdates(const bool showMessage) { } QString currentRev = (updateChannel == "Nightly") - ? QString::fromStdString(Common::g_scm_rev).left(7) + ? QString::fromStdString(Common::g_scm_rev) : "v." + QString::fromStdString(Common::VERSION); QString currentDate = Common::g_scm_date; QDateTime dateTime = QDateTime::fromString(latestDate, Qt::ISODate); latestDate = dateTime.isValid() ? dateTime.toString("yyyy-MM-dd HH:mm:ss") : "Unknown date"; - if (latestRev == currentRev) { + if (latestRev == currentRev.left(7)) { if (showMessage) { QMessageBox::information(this, tr("Auto Updater"), tr("Your version is already up to date!")); @@ -186,29 +201,45 @@ void CheckUpdate::setupUI(const QString& downloadUrl, const QString& latestDate, QString updateChannel = QString::fromStdString(Config::getUpdateChannel()); - QString updateText = - QString("


" + tr("Update Channel") + ":
" + updateChannel + "
" + - tr("Current Version") + ": %1 (%2)
" + tr("Latest Version") + - ": %3 (%4)

" + tr("Do you want to update?") + "

") - .arg(currentRev, currentDate, latestRev, latestDate); + QString updateText = QString("

" + tr("Update Channel") + ": " + updateChannel + + "
" + "" + "" + "" + "" + "" + "" + "" + "" + "
" + + tr("Current Version") + + ":%1(%2)
" + + tr("Latest Version") + + ":%3(%4)

") + .arg(currentRev.left(7), currentDate, latestRev, latestDate); + QLabel* updateLabel = new QLabel(updateText, this); layout->addWidget(updateLabel); // Setup bottom layout with action buttons - QHBoxLayout* bottomLayout = new QHBoxLayout(); autoUpdateCheckBox = new QCheckBox(tr("Check for Updates at Startup"), this); + layout->addWidget(autoUpdateCheckBox); + + QHBoxLayout* updatePromptLayout = new QHBoxLayout(); + QLabel* updatePromptLabel = new QLabel(tr("Do you want to update?"), this); + updatePromptLayout->addWidget(updatePromptLabel); + yesButton = new QPushButton(tr("Update"), this); noButton = new QPushButton(tr("No"), this); yesButton->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Preferred); noButton->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Preferred); - bottomLayout->addWidget(autoUpdateCheckBox); QSpacerItem* spacer = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum); - bottomLayout->addItem(spacer); + updatePromptLayout->addItem(spacer); + updatePromptLayout->addWidget(yesButton); + updatePromptLayout->addWidget(noButton); - bottomLayout->addWidget(yesButton); - bottomLayout->addWidget(noButton); - layout->addLayout(bottomLayout); + layout->addLayout(updatePromptLayout); // Don't show changelog button if: // The current version is a pre-release and the version to be downloaded is a release. @@ -216,7 +247,7 @@ void CheckUpdate::setupUI(const QString& downloadUrl, const QString& latestDate, bool latest_isWIP = latestRev.endsWith("WIP", Qt::CaseInsensitive); if (current_isWIP && !latest_isWIP) { } else { - QTextEdit* textField = new QTextEdit(this); + QTextBrowser* textField = new QTextBrowser(this); textField->setReadOnly(true); textField->setFixedWidth(500); textField->setFixedHeight(200); @@ -229,19 +260,27 @@ void CheckUpdate::setupUI(const QString& downloadUrl, const QString& latestDate, connect(toggleButton, &QPushButton::clicked, [this, textField, toggleButton, currentRev, latestRev, downloadUrl, latestDate, currentDate]() { - QString updateChannel = QString::fromStdString(Config::getUpdateChannel()); if (!textField->isVisible()) { requestChangelog(currentRev, latestRev, downloadUrl, latestDate, currentDate); textField->setVisible(true); toggleButton->setText(tr("Hide Changelog")); adjustSize(); + textField->setFixedWidth(textField->width() + 20); } else { textField->setVisible(false); toggleButton->setText(tr("Show Changelog")); adjustSize(); } }); + + if (Config::alwaysShowChangelog()) { + requestChangelog(currentRev, latestRev, downloadUrl, latestDate, currentDate); + textField->setVisible(true); + toggleButton->setText(tr("Hide Changelog")); + adjustSize(); + textField->setFixedWidth(textField->width() + 20); + } } connect(yesButton, &QPushButton::clicked, this, [this, downloadUrl]() { @@ -310,8 +349,28 @@ void CheckUpdate::requestChangelog(const QString& currentRev, const QString& lat } // Update the text field with the changelog - QTextEdit* textField = findChild(); + QTextBrowser* textField = findChild(); if (textField) { + QRegularExpression re("\\(\\#(\\d+)\\)"); + QString newChanges; + int lastIndex = 0; + QRegularExpressionMatchIterator i = re.globalMatch(changes); + while (i.hasNext()) { + QRegularExpressionMatch match = i.next(); + newChanges += changes.mid(lastIndex, match.capturedStart() - lastIndex); + QString num = match.captured(1); + newChanges += + QString( + "(
#%1)") + .arg(num); + lastIndex = match.capturedEnd(); + } + + newChanges += changes.mid(lastIndex); + changes = newChanges; + + textField->setOpenExternalLinks(true); textField->setHtml("

" + tr("Changes") + ":

" + changes); } diff --git a/src/qt_gui/compatibility_info.cpp b/src/qt_gui/compatibility_info.cpp index 69fb3e377..da32f24ae 100644 --- a/src/qt_gui/compatibility_info.cpp +++ b/src/qt_gui/compatibility_info.cpp @@ -19,27 +19,34 @@ CompatibilityInfoClass::CompatibilityInfoClass() CompatibilityInfoClass::~CompatibilityInfoClass() = default; void CompatibilityInfoClass::UpdateCompatibilityDatabase(QWidget* parent, bool forced) { - if (!forced) - if (LoadCompatibilityFile()) - return; - - QNetworkReply* reply = FetchPage(1); - if (!WaitForReply(reply)) + if (!forced && LoadCompatibilityFile()) return; - QProgressDialog dialog(tr("Fetching compatibility data, please wait"), tr("Cancel"), 0, 0, + QUrl url("https://github.com/shadps4-emu/shadps4-game-compatibility/releases/latest/download/" + "compatibility_data.json"); + QNetworkRequest request(url); + QNetworkReply* reply = m_network_manager->get(request); + + QProgressDialog dialog(tr("Fetching compatibility data, please wait"), tr("Cancel"), 0, 100, parent); dialog.setWindowTitle(tr("Loading...")); + dialog.setWindowModality(Qt::WindowModal); + dialog.setMinimumDuration(0); + dialog.setValue(0); - int remaining_pages = 0; - if (reply->hasRawHeader("link")) { - QRegularExpression last_page_re("(\\d+)(?=>; rel=\"last\")"); - QRegularExpressionMatch last_page_match = - last_page_re.match(QString(reply->rawHeader("link"))); - if (last_page_match.hasMatch()) { - remaining_pages = last_page_match.captured(0).toInt() - 1; - } - } + connect(reply, &QNetworkReply::downloadProgress, + [&dialog](qint64 bytesReceived, qint64 bytesTotal) { + if (bytesTotal > 0) { + dialog.setMaximum(bytesTotal); + dialog.setValue(bytesReceived); + } + }); + + connect(&dialog, &QProgressDialog::canceled, reply, &QNetworkReply::abort); + + QEventLoop loop; + connect(reply, &QNetworkReply::finished, &loop, &QEventLoop::quit); + loop.exec(); if (reply->error() != QNetworkReply::NoError) { reply->deleteLater(); @@ -51,122 +58,58 @@ void CompatibilityInfoClass::UpdateCompatibilityDatabase(QWidget* parent, bool f return; } - ExtractCompatibilityInfo(reply->readAll()); - - QVector replies(remaining_pages); - QFutureWatcher future_watcher; - - for (int i = 0; i < remaining_pages; i++) { - replies[i] = FetchPage(i + 2); + QFile compatibility_file(m_compatibility_filename); + if (!compatibility_file.open(QIODevice::WriteOnly | QIODevice::Truncate | QIODevice::Text)) { + QMessageBox::critical(parent, tr("Error"), + tr("Unable to open compatibility_data.json for writing.")); + reply->deleteLater(); + return; } - future_watcher.setFuture(QtConcurrent::map(replies, WaitForReply)); - connect(&future_watcher, &QFutureWatcher::finished, [&]() { - for (int i = 0; i < remaining_pages; i++) { - if (replies[i]->bytesAvailable()) { - if (replies[i]->error() == QNetworkReply::NoError) { - ExtractCompatibilityInfo(replies[i]->readAll()); - } - replies[i]->deleteLater(); - } else { - // This means the request timed out - return; - } - } + // Writes the received data to the file. + QByteArray json_data = reply->readAll(); + compatibility_file.write(json_data); + compatibility_file.close(); + reply->deleteLater(); - QFile compatibility_file(m_compatibility_filename); - - if (!compatibility_file.open(QIODevice::WriteOnly | QIODevice::Truncate | - QIODevice::Text)) { - QMessageBox::critical(parent, tr("Error"), - tr("Unable to open compatibility.json for writing.")); - return; - } - - QJsonDocument json_doc; - m_compatibility_database["version"] = COMPAT_DB_VERSION; - - json_doc.setObject(m_compatibility_database); - compatibility_file.write(json_doc.toJson()); - compatibility_file.close(); - - dialog.reset(); - }); - connect(&future_watcher, &QFutureWatcher::canceled, [&]() { - // Cleanup if user cancels pulling data - for (int i = 0; i < remaining_pages; i++) { - if (!replies[i]->bytesAvailable()) { - replies[i]->deleteLater(); - } else if (!replies[i]->isFinished()) { - replies[i]->abort(); - } - } - }); - connect(&dialog, &QProgressDialog::canceled, &future_watcher, &QFutureWatcher::cancel); - dialog.setRange(0, remaining_pages); - connect(&future_watcher, &QFutureWatcher::progressValueChanged, &dialog, - &QProgressDialog::setValue); - dialog.exec(); + LoadCompatibilityFile(); } -QNetworkReply* CompatibilityInfoClass::FetchPage(int page_num) { - QUrl url = QUrl("https://api.github.com/repos/shadps4-emu/shadps4-game-compatibility/issues"); - QUrlQuery query; - query.addQueryItem("per_page", QString("100")); - query.addQueryItem( - "tags", QString("status-ingame status-playable status-nothing status-boots status-menus")); - query.addQueryItem("page", QString::number(page_num)); - url.setQuery(query); - - QNetworkRequest request(url); - QNetworkReply* reply = m_network_manager->get(request); - - return reply; -} - -bool CompatibilityInfoClass::WaitForReply(QNetworkReply* reply) { - // Returns true if reply succeeded, false if reply timed out - QTimer timer; - timer.setSingleShot(true); - - QEventLoop loop; - connect(reply, &QNetworkReply::finished, &loop, &QEventLoop::quit); - connect(&timer, SIGNAL(timeout()), &loop, SLOT(quit())); - timer.start(5000); - loop.exec(); - - if (timer.isActive()) { - timer.stop(); - return true; - } else { - disconnect(reply, SIGNAL(finished()), &loop, SLOT(quit())); - reply->abort(); - return false; - } -}; - CompatibilityEntry CompatibilityInfoClass::GetCompatibilityInfo(const std::string& serial) { QString title_id = QString::fromStdString(serial); if (m_compatibility_database.contains(title_id)) { - { - QJsonObject compatibility_obj = m_compatibility_database[title_id].toObject(); - for (int os_int = 0; os_int != static_cast(OSType::Last); os_int++) { - QString os_string = OSTypeToString.at(static_cast(os_int)); - if (compatibility_obj.contains(os_string)) { - QJsonObject compatibility_entry_obj = compatibility_obj[os_string].toObject(); - CompatibilityEntry compatibility_entry{ - LabelToCompatStatus.at(compatibility_entry_obj["status"].toString()), - compatibility_entry_obj["version"].toString(), - QDateTime::fromString(compatibility_entry_obj["last_tested"].toString(), - Qt::ISODate), - compatibility_entry_obj["url"].toString(), - compatibility_entry_obj["issue_number"].toInt()}; - return compatibility_entry; - } - } + QJsonObject compatibility_obj = m_compatibility_database[title_id].toObject(); + + // Set current_os automatically + QString current_os; +#ifdef Q_OS_WIN + current_os = "os-windows"; +#elif defined(Q_OS_MAC) + current_os = "os-macOS"; +#elif defined(Q_OS_LINUX) + current_os = "os-linux"; +#else + current_os = "os-unknown"; +#endif + // Check if the game is compatible with the current operating system + if (compatibility_obj.contains(current_os)) { + QJsonObject compatibility_entry_obj = compatibility_obj[current_os].toObject(); + CompatibilityEntry compatibility_entry{ + LabelToCompatStatus.at(compatibility_entry_obj["status"].toString()), + compatibility_entry_obj["version"].toString(), + QDateTime::fromString(compatibility_entry_obj["last_tested"].toString(), + Qt::ISODate), + compatibility_entry_obj["url"].toString(), + compatibility_entry_obj["issue_number"].toString()}; + return compatibility_entry; + } else { + // If there is no entry for the current operating system, return "Unknown" + return CompatibilityEntry{CompatibilityStatus::Unknown, "", + QDateTime::currentDateTime(), "", 0}; } } + // If title not found, return "Unknown" return CompatibilityEntry{CompatibilityStatus::Unknown, "", QDateTime::currentDateTime(), "", 0}; } @@ -193,14 +136,6 @@ bool CompatibilityInfoClass::LoadCompatibilityFile() { return false; } - // Check database version - int version_number; - if (json_doc.object()["version"].isDouble()) { - if (json_doc.object()["version"].toInt() < COMPAT_DB_VERSION) - return false; - } else - return false; - m_compatibility_database = json_doc.object(); return true; } @@ -260,3 +195,22 @@ void CompatibilityInfoClass::ExtractCompatibilityInfo(QByteArray response) { return; } + +const QString CompatibilityInfoClass::GetCompatStatusString(const CompatibilityStatus status) { + switch (status) { + case CompatibilityStatus::Unknown: + return tr("Unknown"); + case CompatibilityStatus::Nothing: + return tr("Nothing"); + case CompatibilityStatus::Boots: + return tr("Boots"); + case CompatibilityStatus::Menus: + return tr("Menus"); + case CompatibilityStatus::Ingame: + return tr("Ingame"); + case CompatibilityStatus::Playable: + return tr("Playable"); + default: + return tr("Unknown"); + } +} diff --git a/src/qt_gui/compatibility_info.h b/src/qt_gui/compatibility_info.h index 0c47c27ff..7e70e998b 100644 --- a/src/qt_gui/compatibility_info.h +++ b/src/qt_gui/compatibility_info.h @@ -11,8 +11,6 @@ #include "common/config.h" #include "core/file_format/psf.h" -static constexpr int COMPAT_DB_VERSION = 1; - enum class CompatibilityStatus { Unknown, Nothing, @@ -49,7 +47,7 @@ struct CompatibilityEntry { QString version; QDateTime last_tested; QString url; - int issue_number; + QString issue_number; }; class CompatibilityInfoClass : public QObject { @@ -69,13 +67,6 @@ public: {QStringLiteral("os-windows"), OSType::Win32}, }; - inline static const std::unordered_map CompatStatusToString = { - {CompatibilityStatus::Unknown, QStringLiteral("Unknown")}, - {CompatibilityStatus::Nothing, QStringLiteral("Nothing")}, - {CompatibilityStatus::Boots, QStringLiteral("Boots")}, - {CompatibilityStatus::Menus, QStringLiteral("Menus")}, - {CompatibilityStatus::Ingame, QStringLiteral("Ingame")}, - {CompatibilityStatus::Playable, QStringLiteral("Playable")}}; inline static const std::unordered_map OSTypeToString = { {OSType::Linux, QStringLiteral("os-linux")}, {OSType::macOS, QStringLiteral("os-macOS")}, @@ -87,9 +78,8 @@ public: void UpdateCompatibilityDatabase(QWidget* parent = nullptr, bool forced = false); bool LoadCompatibilityFile(); CompatibilityEntry GetCompatibilityInfo(const std::string& serial); + const QString GetCompatStatusString(const CompatibilityStatus status); void ExtractCompatibilityInfo(QByteArray response); - static bool WaitForReply(QNetworkReply* reply); - QNetworkReply* FetchPage(int page_num); private: QNetworkAccessManager* m_network_manager; diff --git a/src/qt_gui/control_settings.cpp b/src/qt_gui/control_settings.cpp new file mode 100644 index 000000000..4206e45b8 --- /dev/null +++ b/src/qt_gui/control_settings.cpp @@ -0,0 +1,592 @@ +// SPDX-FileCopyrightText: Copyright 2024 shadPS4 Emulator Project +// SPDX-License-Identifier: GPL-2.0-or-later + +#include +#include +#include +#include "common/path_util.h" +#include "control_settings.h" +#include "ui_control_settings.h" + +ControlSettings::ControlSettings(std::shared_ptr game_info_get, QWidget* parent) + : QDialog(parent), m_game_info(game_info_get), ui(new Ui::ControlSettings) { + + ui->setupUi(this); + ui->PerGameCheckBox->setChecked(!Config::GetUseUnifiedInputConfig()); + + AddBoxItems(); + SetUIValuestoMappings(); + UpdateLightbarColor(); + + connect(ui->buttonBox, &QDialogButtonBox::clicked, this, [this](QAbstractButton* button) { + if (button == ui->buttonBox->button(QDialogButtonBox::Save)) { + SaveControllerConfig(true); + } else if (button == ui->buttonBox->button(QDialogButtonBox::RestoreDefaults)) { + SetDefault(); + } else if (button == ui->buttonBox->button(QDialogButtonBox::Apply)) { + SaveControllerConfig(false); + } + }); + + ui->buttonBox->button(QDialogButtonBox::Save)->setText(tr("Save")); + ui->buttonBox->button(QDialogButtonBox::Apply)->setText(tr("Apply")); + ui->buttonBox->button(QDialogButtonBox::RestoreDefaults)->setText(tr("Restore Defaults")); + ui->buttonBox->button(QDialogButtonBox::Cancel)->setText(tr("Cancel")); + + connect(ui->buttonBox, &QDialogButtonBox::rejected, this, &QWidget::close); + + connect(ui->ProfileComboBox, &QComboBox::currentTextChanged, this, [this] { + GetGameTitle(); + SetUIValuestoMappings(); + }); + + connect(ui->LeftDeadzoneSlider, &QSlider::valueChanged, this, + [this](int value) { ui->LeftDeadzoneValue->setText(QString::number(value)); }); + connect(ui->RightDeadzoneSlider, &QSlider::valueChanged, this, + [this](int value) { ui->RightDeadzoneValue->setText(QString::number(value)); }); + + connect(ui->LStickUpBox, &QComboBox::currentIndexChanged, this, + [this](int value) { ui->LStickDownBox->setCurrentIndex(value); }); + connect(ui->LStickDownBox, &QComboBox::currentIndexChanged, this, + [this](int value) { ui->LStickUpBox->setCurrentIndex(value); }); + connect(ui->LStickRightBox, &QComboBox::currentIndexChanged, this, + [this](int value) { ui->LStickLeftBox->setCurrentIndex(value); }); + connect(ui->LStickLeftBox, &QComboBox::currentIndexChanged, this, + [this](int value) { ui->LStickRightBox->setCurrentIndex(value); }); + + connect(ui->RStickUpBox, &QComboBox::currentIndexChanged, this, + [this](int value) { ui->RStickDownBox->setCurrentIndex(value); }); + connect(ui->RStickDownBox, &QComboBox::currentIndexChanged, this, + [this](int value) { ui->RStickUpBox->setCurrentIndex(value); }); + connect(ui->RStickRightBox, &QComboBox::currentIndexChanged, this, + [this](int value) { ui->RStickLeftBox->setCurrentIndex(value); }); + connect(ui->RStickLeftBox, &QComboBox::currentIndexChanged, this, + [this](int value) { ui->RStickRightBox->setCurrentIndex(value); }); + + connect(ui->RSlider, &QSlider::valueChanged, this, [this](int value) { + QString RedValue = QString("%1").arg(value, 3, 10, QChar('0')); + QString RValue = tr("R:") + " " + RedValue; + ui->RLabel->setText(RValue); + UpdateLightbarColor(); + }); + + connect(ui->GSlider, &QSlider::valueChanged, this, [this](int value) { + QString GreenValue = QString("%1").arg(value, 3, 10, QChar('0')); + QString GValue = tr("G:") + " " + GreenValue; + ui->GLabel->setText(GValue); + UpdateLightbarColor(); + }); + + connect(ui->BSlider, &QSlider::valueChanged, this, [this](int value) { + QString BlueValue = QString("%1").arg(value, 3, 10, QChar('0')); + QString BValue = tr("B:") + " " + BlueValue; + ui->BLabel->setText(BValue); + UpdateLightbarColor(); + }); +} + +void ControlSettings::SaveControllerConfig(bool CloseOnSave) { + QList list; + list << ui->RStickUpBox << ui->RStickRightBox << ui->LStickUpBox << ui->LStickRightBox; + int count_axis_left_x = 0, count_axis_left_y = 0, count_axis_right_x = 0, + count_axis_right_y = 0; + for (const auto& i : list) { + if (i->currentText() == "axis_left_x") { + count_axis_left_x = count_axis_left_x + 1; + } else if (i->currentText() == "axis_left_y") { + count_axis_left_y = count_axis_left_y + 1; + } else if (i->currentText() == "axis_right_x") { + count_axis_right_x = count_axis_right_x + 1; + } else if (i->currentText() == "axis_right_y") { + count_axis_right_y = count_axis_right_y + 1; + } + } + + if (count_axis_left_x > 1 | count_axis_left_y > 1 | count_axis_right_x > 1 | + count_axis_right_y > 1) { + QMessageBox::StandardButton nosave; + nosave = QMessageBox::information(this, tr("Unable to Save"), + tr("Cannot bind axis values more than once")); + return; + } + + std::string config_id; + config_id = (ui->ProfileComboBox->currentText() == "Common Config") + ? "default" + : ui->ProfileComboBox->currentText().toStdString(); + const auto config_file = Config::GetFoolproofKbmConfigFile(config_id); + + int lineCount = 0; + std::string line; + std::vector lines; + std::string output_string = "", input_string = ""; + std::fstream file(config_file); + + while (std::getline(file, line)) { + lineCount++; + + std::size_t comment_pos = line.find('#'); + if (comment_pos != std::string::npos) { + if (!line.contains("Range of deadzones")) + lines.push_back(line); + continue; + } + + std::size_t equal_pos = line.find('='); + if (equal_pos == std::string::npos) { + lines.push_back(line); + continue; + } + + output_string = line.substr(0, equal_pos - 1); + input_string = line.substr(equal_pos + 2); + + if (std::find(ControllerInputs.begin(), ControllerInputs.end(), input_string) != + ControllerInputs.end() || + output_string == "analog_deadzone" || output_string == "override_controller_color") { + line.erase(); + continue; + } + lines.push_back(line); + } + + file.close(); + + input_string = "cross"; + output_string = ui->ABox->currentText().toStdString(); + lines.push_back(output_string + " = " + input_string); + + input_string = "circle"; + output_string = ui->BBox->currentText().toStdString(); + lines.push_back(output_string + " = " + input_string); + + input_string = "square"; + output_string = ui->XBox->currentText().toStdString(); + lines.push_back(output_string + " = " + input_string); + + input_string = "triangle"; + output_string = ui->YBox->currentText().toStdString(); + lines.push_back(output_string + " = " + input_string); + + lines.push_back(""); + + input_string = "l1"; + output_string = ui->LBBox->currentText().toStdString(); + lines.push_back(output_string + " = " + input_string); + + input_string = "r1"; + output_string = ui->RBBox->currentText().toStdString(); + lines.push_back(output_string + " = " + input_string); + + input_string = "l2"; + output_string = ui->LTBox->currentText().toStdString(); + lines.push_back(output_string + " = " + input_string); + + input_string = "r2"; + output_string = ui->RTBox->currentText().toStdString(); + lines.push_back(output_string + " = " + input_string); + + input_string = "l3"; + output_string = ui->LClickBox->currentText().toStdString(); + lines.push_back(output_string + " = " + input_string); + + input_string = "r3"; + output_string = ui->RClickBox->currentText().toStdString(); + lines.push_back(output_string + " = " + input_string); + + lines.push_back(""); + + input_string = "back"; + output_string = ui->BackBox->currentText().toStdString(); + lines.push_back(output_string + " = " + input_string); + + input_string = "options"; + output_string = ui->StartBox->currentText().toStdString(); + lines.push_back(output_string + " = " + input_string); + + lines.push_back(""); + + input_string = "pad_up"; + output_string = ui->DpadUpBox->currentText().toStdString(); + lines.push_back(output_string + " = " + input_string); + + input_string = "pad_down"; + output_string = ui->DpadDownBox->currentText().toStdString(); + lines.push_back(output_string + " = " + input_string); + + input_string = "pad_left"; + output_string = ui->DpadLeftBox->currentText().toStdString(); + lines.push_back(output_string + " = " + input_string); + + input_string = "pad_right"; + output_string = ui->DpadRightBox->currentText().toStdString(); + lines.push_back(output_string + " = " + input_string); + + lines.push_back(""); + + input_string = "axis_left_x"; + output_string = ui->LStickRightBox->currentText().toStdString(); + lines.push_back(output_string + " = " + input_string); + + input_string = "axis_left_y"; + output_string = ui->LStickUpBox->currentText().toStdString(); + lines.push_back(output_string + " = " + input_string); + + input_string = "axis_right_x"; + output_string = ui->RStickRightBox->currentText().toStdString(); + lines.push_back(output_string + " = " + input_string); + + input_string = "axis_right_y"; + output_string = ui->RStickUpBox->currentText().toStdString(); + lines.push_back(output_string + " = " + input_string); + + lines.push_back(""); + lines.push_back("# Range of deadzones: 1 (almost none) to 127 (max)"); + + std::string deadzonevalue = std::to_string(ui->LeftDeadzoneSlider->value()); + lines.push_back("analog_deadzone = leftjoystick, " + deadzonevalue + ", 127"); + + deadzonevalue = std::to_string(ui->RightDeadzoneSlider->value()); + lines.push_back("analog_deadzone = rightjoystick, " + deadzonevalue + ", 127"); + + lines.push_back(""); + std::string OverrideLB = ui->LightbarCheckBox->isChecked() ? "true" : "false"; + std::string LightBarR = std::to_string(ui->RSlider->value()); + std::string LightBarG = std::to_string(ui->GSlider->value()); + std::string LightBarB = std::to_string(ui->BSlider->value()); + lines.push_back("override_controller_color = " + OverrideLB + ", " + LightBarR + ", " + + LightBarG + ", " + LightBarB); + + std::vector save; + bool CurrentLineEmpty = false, LastLineEmpty = false; + for (auto const& line : lines) { + LastLineEmpty = CurrentLineEmpty ? true : false; + CurrentLineEmpty = line.empty() ? true : false; + if (!CurrentLineEmpty || !LastLineEmpty) + save.push_back(line); + } + + std::ofstream output_file(config_file); + for (auto const& line : save) { + output_file << line << '\n'; + } + output_file.close(); + + Config::SetUseUnifiedInputConfig(!ui->PerGameCheckBox->isChecked()); + Config::SetOverrideControllerColor(ui->LightbarCheckBox->isChecked()); + Config::SetControllerCustomColor(ui->RSlider->value(), ui->GSlider->value(), + ui->BSlider->value()); + Config::save(Common::FS::GetUserPath(Common::FS::PathType::UserDir) / "config.toml"); + + if (CloseOnSave) + QWidget::close(); +} + +void ControlSettings::SetDefault() { + ui->ABox->setCurrentIndex(0); + ui->BBox->setCurrentIndex(1); + ui->XBox->setCurrentIndex(2); + ui->YBox->setCurrentIndex(3); + ui->DpadUpBox->setCurrentIndex(11); + ui->DpadDownBox->setCurrentIndex(12); + ui->DpadLeftBox->setCurrentIndex(13); + ui->DpadRightBox->setCurrentIndex(14); + ui->LClickBox->setCurrentIndex(8); + ui->RClickBox->setCurrentIndex(9); + ui->LBBox->setCurrentIndex(4); + ui->RBBox->setCurrentIndex(5); + ui->LTBox->setCurrentIndex(6); + ui->RTBox->setCurrentIndex(7); + ui->StartBox->setCurrentIndex(10); + ui->BackBox->setCurrentIndex(15); + + ui->LStickUpBox->setCurrentIndex(1); + ui->LStickDownBox->setCurrentIndex(1); + ui->LStickLeftBox->setCurrentIndex(0); + ui->LStickRightBox->setCurrentIndex(0); + ui->RStickUpBox->setCurrentIndex(3); + ui->RStickDownBox->setCurrentIndex(3); + ui->RStickLeftBox->setCurrentIndex(2); + ui->RStickRightBox->setCurrentIndex(2); + + ui->LeftDeadzoneSlider->setValue(2); + ui->RightDeadzoneSlider->setValue(2); + + ui->RSlider->setValue(0); + ui->GSlider->setValue(0); + ui->BSlider->setValue(255); + ui->LightbarCheckBox->setChecked(false); + ui->PerGameCheckBox->setChecked(false); +} + +void ControlSettings::AddBoxItems() { + ui->DpadUpBox->addItems(ButtonOutputs); + ui->DpadDownBox->addItems(ButtonOutputs); + ui->DpadLeftBox->addItems(ButtonOutputs); + ui->DpadRightBox->addItems(ButtonOutputs); + ui->LBBox->addItems(ButtonOutputs); + ui->RBBox->addItems(ButtonOutputs); + ui->LTBox->addItems(ButtonOutputs); + ui->RTBox->addItems(ButtonOutputs); + ui->RClickBox->addItems(ButtonOutputs); + ui->LClickBox->addItems(ButtonOutputs); + ui->StartBox->addItems(ButtonOutputs); + ui->ABox->addItems(ButtonOutputs); + ui->BBox->addItems(ButtonOutputs); + ui->XBox->addItems(ButtonOutputs); + ui->YBox->addItems(ButtonOutputs); + ui->BackBox->addItems(ButtonOutputs); + + ui->LStickUpBox->addItems(StickOutputs); + ui->LStickDownBox->addItems(StickOutputs); + ui->LStickLeftBox->addItems(StickOutputs); + ui->LStickRightBox->addItems(StickOutputs); + ui->RStickUpBox->addItems(StickOutputs); + ui->RStickDownBox->addItems(StickOutputs); + ui->RStickLeftBox->addItems(StickOutputs); + ui->RStickRightBox->addItems(StickOutputs); + + ui->ProfileComboBox->addItem("Common Config"); + for (int i = 0; i < m_game_info->m_games.size(); i++) { + ui->ProfileComboBox->addItem(QString::fromStdString(m_game_info->m_games[i].serial)); + } + ui->ProfileComboBox->setCurrentText("Common Config"); + ui->TitleLabel->setText("Common Config"); +} + +void ControlSettings::SetUIValuestoMappings() { + std::string config_id; + config_id = (ui->ProfileComboBox->currentText() == "Common Config") + ? "default" + : ui->ProfileComboBox->currentText().toStdString(); + + const auto config_file = Config::GetFoolproofKbmConfigFile(config_id); + std::ifstream file(config_file); + + bool CrossExists = false, CircleExists = false, SquareExists = false, TriangleExists = false, + L1Exists = false, L2Exists = false, L3Exists = false, R1Exists = false, R2Exists = false, + R3Exists = false, DPadUpExists = false, DPadDownExists = false, DPadLeftExists = false, + DPadRightExists = false, StartExists = false, BackExists = false, LStickXExists = false, + LStickYExists = false, RStickXExists = false, RStickYExists = false; + int lineCount = 0; + std::string line = ""; + while (std::getline(file, line)) { + lineCount++; + + line.erase(std::remove(line.begin(), line.end(), ' '), line.end()); + if (line.empty()) + continue; + + std::size_t comment_pos = line.find('#'); + if (comment_pos != std::string::npos) + line = line.substr(0, comment_pos); + + std::size_t equal_pos = line.find('='); + if (equal_pos == std::string::npos) + continue; + + std::string output_string = line.substr(0, equal_pos); + std::string input_string = line.substr(equal_pos + 1); + + if (std::find(ControllerInputs.begin(), ControllerInputs.end(), input_string) != + ControllerInputs.end() || + output_string == "analog_deadzone" || output_string == "override_controller_color") { + if (input_string == "cross") { + ui->ABox->setCurrentText(QString::fromStdString(output_string)); + CrossExists = true; + } else if (input_string == "circle") { + ui->BBox->setCurrentText(QString::fromStdString(output_string)); + CircleExists = true; + } else if (input_string == "square") { + ui->XBox->setCurrentText(QString::fromStdString(output_string)); + SquareExists = true; + } else if (input_string == "triangle") { + ui->YBox->setCurrentText(QString::fromStdString(output_string)); + TriangleExists = true; + } else if (input_string == "l1") { + ui->LBBox->setCurrentText(QString::fromStdString(output_string)); + L1Exists = true; + } else if (input_string == "l2") { + ui->LTBox->setCurrentText(QString::fromStdString(output_string)); + L2Exists = true; + } else if (input_string == "r1") { + ui->RBBox->setCurrentText(QString::fromStdString(output_string)); + R1Exists = true; + } else if (input_string == "r2") { + ui->RTBox->setCurrentText(QString::fromStdString(output_string)); + R2Exists = true; + } else if (input_string == "l3") { + ui->LClickBox->setCurrentText(QString::fromStdString(output_string)); + L3Exists = true; + } else if (input_string == "r3") { + ui->RClickBox->setCurrentText(QString::fromStdString(output_string)); + R3Exists = true; + } else if (input_string == "pad_up") { + ui->DpadUpBox->setCurrentText(QString::fromStdString(output_string)); + DPadUpExists = true; + } else if (input_string == "pad_down") { + ui->DpadDownBox->setCurrentText(QString::fromStdString(output_string)); + DPadDownExists = true; + } else if (input_string == "pad_left") { + ui->DpadLeftBox->setCurrentText(QString::fromStdString(output_string)); + DPadLeftExists = true; + } else if (input_string == "pad_right") { + ui->DpadRightBox->setCurrentText(QString::fromStdString(output_string)); + DPadRightExists = true; + } else if (input_string == "options") { + ui->StartBox->setCurrentText(QString::fromStdString(output_string)); + StartExists = true; + } else if (input_string == "back") { + ui->BackBox->setCurrentText(QString::fromStdString(output_string)); + BackExists = true; + } else if (input_string == "axis_left_x") { + ui->LStickRightBox->setCurrentText(QString::fromStdString(output_string)); + ui->LStickLeftBox->setCurrentText(QString::fromStdString(output_string)); + LStickXExists = true; + } else if (input_string == "axis_left_y") { + ui->LStickUpBox->setCurrentText(QString::fromStdString(output_string)); + ui->LStickDownBox->setCurrentText(QString::fromStdString(output_string)); + LStickYExists = true; + } else if (input_string == "axis_right_x") { + ui->RStickRightBox->setCurrentText(QString::fromStdString(output_string)); + ui->RStickLeftBox->setCurrentText(QString::fromStdString(output_string)); + RStickXExists = true; + } else if (input_string == "axis_right_y") { + ui->RStickUpBox->setCurrentText(QString::fromStdString(output_string)); + ui->RStickDownBox->setCurrentText(QString::fromStdString(output_string)); + RStickYExists = true; + } else if (input_string.contains("leftjoystick")) { + std::size_t comma_pos = line.find(','); + if (comma_pos != std::string::npos) { + int deadzonevalue = std::stoi(line.substr(comma_pos + 1)); + ui->LeftDeadzoneSlider->setValue(deadzonevalue); + ui->LeftDeadzoneValue->setText(QString::number(deadzonevalue)); + } else { + ui->LeftDeadzoneSlider->setValue(2); + ui->LeftDeadzoneValue->setText("2"); + } + } else if (input_string.contains("rightjoystick")) { + std::size_t comma_pos = line.find(','); + if (comma_pos != std::string::npos) { + int deadzonevalue = std::stoi(line.substr(comma_pos + 1)); + ui->RightDeadzoneSlider->setValue(deadzonevalue); + ui->RightDeadzoneValue->setText(QString::number(deadzonevalue)); + } else { + ui->RightDeadzoneSlider->setValue(2); + ui->RightDeadzoneValue->setText("2"); + } + } else if (output_string == "override_controller_color") { + std::size_t comma_pos = line.find(','); + if (comma_pos != std::string::npos) { + std::string overridestring = line.substr(equal_pos + 1, comma_pos); + bool override = overridestring.contains("true") ? true : false; + ui->LightbarCheckBox->setChecked(override); + + std::string lightbarstring = line.substr(comma_pos + 1); + std::size_t comma_pos2 = lightbarstring.find(','); + if (comma_pos2 != std::string::npos) { + std::string Rstring = lightbarstring.substr(0, comma_pos2); + ui->RSlider->setValue(std::stoi(Rstring)); + QString RedValue = QString("%1").arg(std::stoi(Rstring), 3, 10, QChar('0')); + QString RValue = tr("R:") + " " + RedValue; + ui->RLabel->setText(RValue); + } + + std::string GBstring = lightbarstring.substr(comma_pos2 + 1); + std::size_t comma_pos3 = GBstring.find(','); + if (comma_pos3 != std::string::npos) { + std::string Gstring = GBstring.substr(0, comma_pos3); + ui->GSlider->setValue(std::stoi(Gstring)); + QString GreenValue = + QString("%1").arg(std::stoi(Gstring), 3, 10, QChar('0')); + QString GValue = tr("G:") + " " + GreenValue; + ui->GLabel->setText(GValue); + + std::string Bstring = GBstring.substr(comma_pos3 + 1); + ui->BSlider->setValue(std::stoi(Bstring)); + QString BlueValue = + QString("%1").arg(std::stoi(Bstring), 3, 10, QChar('0')); + QString BValue = tr("B:") + " " + BlueValue; + ui->BLabel->setText(BValue); + } + } + } + } + } + file.close(); + + // If an entry does not exist in the config file, we assume the user wants it unmapped + if (!CrossExists) + ui->ABox->setCurrentText("unmapped"); + if (!CircleExists) + ui->BBox->setCurrentText("unmapped"); + if (!SquareExists) + ui->XBox->setCurrentText("unmapped"); + if (!TriangleExists) + ui->YBox->setCurrentText("unmapped"); + if (!L1Exists) + ui->LBBox->setCurrentText("unmapped"); + if (!L2Exists) + ui->LTBox->setCurrentText("unmapped"); + if (!L3Exists) + ui->LClickBox->setCurrentText("unmapped"); + if (!R1Exists) + ui->RBBox->setCurrentText("unmapped"); + if (!R2Exists) + ui->RTBox->setCurrentText("unmapped"); + if (!R3Exists) + ui->RClickBox->setCurrentText("unmapped"); + if (!DPadUpExists) + ui->DpadUpBox->setCurrentText("unmapped"); + if (!DPadDownExists) + ui->DpadDownBox->setCurrentText("unmapped"); + if (!DPadLeftExists) + ui->DpadLeftBox->setCurrentText("unmapped"); + if (!DPadRightExists) + ui->DpadRightBox->setCurrentText("unmapped"); + if (!BackExists) + ui->BackBox->setCurrentText("unmapped"); + if (!StartExists) + ui->StartBox->setCurrentText("unmapped"); + + if (!LStickXExists) { + ui->LStickRightBox->setCurrentText("unmapped"); + ui->LStickLeftBox->setCurrentText("unmapped"); + } + if (!LStickYExists) { + ui->LStickUpBox->setCurrentText("unmapped"); + ui->LStickDownBox->setCurrentText("unmapped"); + } + if (!RStickXExists) { + ui->RStickRightBox->setCurrentText("unmapped"); + ui->RStickLeftBox->setCurrentText("unmapped"); + } + if (!RStickYExists) { + ui->RStickUpBox->setCurrentText("unmapped"); + ui->RStickDownBox->setCurrentText("unmapped"); + } +} + +void ControlSettings::GetGameTitle() { + if (ui->ProfileComboBox->currentText() == "Common Config") { + ui->TitleLabel->setText("Common Config"); + } else { + for (int i = 0; i < m_game_info->m_games.size(); i++) { + if (m_game_info->m_games[i].serial == + ui->ProfileComboBox->currentText().toStdString()) { + ui->TitleLabel->setText(QString::fromStdString(m_game_info->m_games[i].name)); + } + } + } +} + +void ControlSettings::UpdateLightbarColor() { + ui->LightbarColorFrame->setStyleSheet(""); + QString RValue = QString::number(ui->RSlider->value()); + QString GValue = QString::number(ui->GSlider->value()); + QString BValue = QString::number(ui->BSlider->value()); + QString colorstring = "background-color: rgb(" + RValue + "," + GValue + "," + BValue + ")"; + ui->LightbarColorFrame->setStyleSheet(colorstring); +} + +ControlSettings::~ControlSettings() {} diff --git a/src/qt_gui/control_settings.h b/src/qt_gui/control_settings.h new file mode 100644 index 000000000..e686f044d --- /dev/null +++ b/src/qt_gui/control_settings.h @@ -0,0 +1,53 @@ +// SPDX-FileCopyrightText: Copyright 2024 shadPS4 Emulator Project +// SPDX-License-Identifier: GPL-2.0-or-later + +#include +#include "game_info.h" + +namespace Ui { +class ControlSettings; +} + +class ControlSettings : public QDialog { + Q_OBJECT +public: + explicit ControlSettings(std::shared_ptr game_info_get, + QWidget* parent = nullptr); + ~ControlSettings(); + +private Q_SLOTS: + void SaveControllerConfig(bool CloseOnSave); + void SetDefault(); + void UpdateLightbarColor(); + +private: + std::unique_ptr ui; + std::shared_ptr m_game_info; + + void AddBoxItems(); + void SetUIValuestoMappings(); + void GetGameTitle(); + + const std::vector ControllerInputs = { + "cross", "circle", "square", "triangle", "l1", + "r1", "l2", "r2", "l3", + + "r3", "options", "pad_up", + + "pad_down", + + "pad_left", "pad_right", "axis_left_x", "axis_left_y", "axis_right_x", + "axis_right_y", "back"}; + + const QStringList ButtonOutputs = {"cross", "circle", "square", "triangle", "l1", + "r1", "l2", "r2", "l3", + + "r3", "options", "pad_up", + + "pad_down", + + "pad_left", "pad_right", "touchpad", "unmapped"}; + + const QStringList StickOutputs = {"axis_left_x", "axis_left_y", "axis_right_x", "axis_right_y", + "unmapped"}; +}; diff --git a/src/qt_gui/control_settings.ui b/src/qt_gui/control_settings.ui new file mode 100644 index 000000000..41fb005c6 --- /dev/null +++ b/src/qt_gui/control_settings.ui @@ -0,0 +1,1513 @@ + + + + ControlSettings + + + Qt::WindowModality::WindowModal + + + + 0 + 0 + 1043 + 792 + + + + Configure Controls + + + + :/rpcs3.ico:/rpcs3.ico + + + + + + true + + + + + 0 + 0 + 1019 + 732 + + + + + + 0 + 0 + 1021 + 731 + + + + + + + 5 + + + + + true + + + + 0 + 0 + + + + + 16777215 + 16777215 + + + + D-Pad + + + + 6 + + + 5 + + + 5 + + + 5 + + + 5 + + + + + + 0 + + + 0 + + + 0 + + + 0 + + + 0 + + + + + + 124 + 0 + + + + + 0 + 16777215 + + + + Up + + + + + + false + + + QComboBox::SizeAdjustPolicy::AdjustToContents + + + + + + + + + + + + + + + Left + + + + 5 + + + 5 + + + 5 + + + 5 + + + + + + + + + + + Right + + + + 5 + + + 5 + + + 5 + + + 5 + + + + + false + + + + + + + + + + + + + 0 + + + 0 + + + 0 + + + 0 + + + + + + 124 + 16777215 + + + + Down + + + + + + true + + + + 0 + 0 + + + + + 0 + 0 + + + + + + + + + + + + + + + + + Qt::Orientation::Vertical + + + QSizePolicy::Policy::Maximum + + + + 20 + 40 + + + + + + + + + 0 + 0 + + + + Left Stick Deadzone (def:2 max:127) + + + + + + + 0 + 0 + + + + Left Deadzone + + + Qt::AlignmentFlag::AlignRight|Qt::AlignmentFlag::AlignTrailing|Qt::AlignmentFlag::AlignVCenter + + + + + + + + 0 + 0 + + + + 1 + + + 127 + + + Qt::Orientation::Horizontal + + + + + + + + + + + 0 + 0 + + + + + 0 + 0 + + + + Left Stick + + + + 5 + + + 5 + + + 5 + + + 5 + + + + + + 16777215 + 2121 + + + + + 0 + + + 0 + + + 0 + + + 0 + + + + + + 0 + 0 + + + + + 124 + 16777215 + + + + Up + + + + + + true + + + + + + + + + + + + + + + Left + + + + 5 + + + 5 + + + 5 + + + 5 + + + + + true + + + + + + + + + + + 179 + 16777215 + + + + Right + + + + 5 + + + 5 + + + 5 + + + 5 + + + + + true + + + + + + + + + + + + + 0 + + + 0 + + + 0 + + + 0 + + + + + + 124 + 0 + + + + + 124 + 21212 + + + + Down + + + + + + true + + + false + + + false + + + + + + + + + + + + + + + + + + 0 + + + + + + 0 + 0 + + + + + 12 + true + + + + Config Selection + + + Qt::AlignmentFlag::AlignCenter + + + + + + + + + 9 + false + + + + + + + -1 + + + Common Config + + + + + + + + 10 + true + + + + Common Config + + + Qt::AlignmentFlag::AlignCenter + + + true + + + + + + + + + + 0 + 0 + + + + + 9 + false + + + + Use per-game configs + + + + + + + + + + 0 + + + + + + + L1 / LB + + + + 5 + + + 5 + + + 5 + + + 5 + + + + + + + + + + + L2 / LT + + + + 5 + + + 5 + + + 5 + + + 5 + + + + + + + + + + + + + + + Qt::Orientation::Vertical + + + QSizePolicy::Policy::Preferred + + + + 20 + 40 + + + + + + + + 10 + + + + + Back + + + + + + + + + + + + + + + + + + R1 / RB + + + + 5 + + + 5 + + + 5 + + + 5 + + + + + + + + + + + R2 / RT + + + + 5 + + + 5 + + + 5 + + + 5 + + + + + + + + + + + + + + + + 0 + 200 + + + + + 0 + + + 0 + + + 0 + + + 0 + + + + + + 415 + 256 + + + + :/images/ps4_controller.png + + + true + + + Qt::AlignmentFlag::AlignBottom|Qt::AlignmentFlag::AlignHCenter + + + + + + + + + + 10 + + + QLayout::SizeConstraint::SetDefaultConstraint + + + + + L3 + + + + 5 + + + 5 + + + 5 + + + 5 + + + + + + + + + + + Options / Start + + + + 5 + + + 5 + + + 5 + + + 5 + + + + + + + + + + + R3 + + + + 5 + + + 5 + + + 5 + + + 5 + + + + + + + + + + + + + + + + + + false + + + + Color Adjustment + + + + + + + + + false + + + + R: 000 + + + + + + + + 0 + 0 + + + + 255 + + + Qt::Orientation::Horizontal + + + + + + + + + + + + false + + + + G: 000 + + + + + + + + 0 + 0 + + + + 255 + + + Qt::Orientation::Horizontal + + + + + + + + + + + + false + + + + B: 255 + + + + + + + + 0 + 0 + + + + 255 + + + 255 + + + Qt::Orientation::Horizontal + + + + + + + + + + + + + + + + + false + + + + Override Lightbar Color + + + + + + + false + + + + Override Color + + + + + + + QFrame::Shape::StyledPanel + + + QFrame::Shadow::Raised + + + + + + + + + + + + + + + + 5 + + + + + + 0 + 0 + + + + Face Buttons + + + + 5 + + + 5 + + + 5 + + + 5 + + + + + + 0 + + + 0 + + + 0 + + + 0 + + + + + + 0 + 0 + + + + + 124 + 0 + + + + + 0 + 16777215 + + + + Triangle / Y + + + + + + true + + + + 0 + 0 + + + + + + + + + + + + + + + + Square / X + + + + 5 + + + 5 + + + 5 + + + 5 + + + + + + + + + + + Circle / B + + + + 5 + + + 5 + + + 5 + + + 5 + + + + + + + + + + + + + + 0 + + + 0 + + + 0 + + + 0 + + + + + + 124 + 0 + + + + + 124 + 16777215 + + + + Cross / A + + + + + + + + + + + + + + + + + + Qt::Orientation::Vertical + + + QSizePolicy::Policy::Maximum + + + + 20 + 40 + + + + + + + + + 0 + 0 + + + + Right Stick Deadzone (def:2, max:127) + + + + + + + 0 + 0 + + + + Right Deadzone + + + Qt::AlignmentFlag::AlignRight|Qt::AlignmentFlag::AlignTrailing|Qt::AlignmentFlag::AlignVCenter + + + + + + + + 0 + 0 + + + + 1 + + + 127 + + + Qt::Orientation::Horizontal + + + + + + + + + + + 0 + 0 + + + + + 0 + 0 + + + + Right Stick + + + + 5 + + + 5 + + + 5 + + + 5 + + + + + + 0 + + + 0 + + + 0 + + + 0 + + + + + + 0 + 0 + + + + + 0 + 0 + + + + + 124 + 1231321 + + + + Up + + + + + + true + + + + + + + + + + + + + + + Left + + + + 5 + + + 5 + + + 5 + + + 5 + + + + + true + + + + + + + + + + Right + + + + 5 + + + 5 + + + 5 + + + 5 + + + + + + + + + + + + + + 0 + + + 0 + + + 0 + + + 0 + + + + + + 124 + 0 + + + + + 124 + 2121 + + + + Down + + + + + + true + + + + + + + + + + + + + + + + + + + + + + + QDialogButtonBox::StandardButton::Apply|QDialogButtonBox::StandardButton::Cancel|QDialogButtonBox::StandardButton::RestoreDefaults|QDialogButtonBox::StandardButton::Save + + + false + + + + + + + + + + diff --git a/src/qt_gui/game_grid_frame.cpp b/src/qt_gui/game_grid_frame.cpp index 2ebb09e5d..e06fea090 100644 --- a/src/qt_gui/game_grid_frame.cpp +++ b/src/qt_gui/game_grid_frame.cpp @@ -38,17 +38,35 @@ GameGridFrame::GameGridFrame(std::shared_ptr game_info_get, void GameGridFrame::onCurrentCellChanged(int currentRow, int currentColumn, int previousRow, int previousColumn) { - cellClicked = true; - crtRow = currentRow; - crtColumn = currentColumn; - columnCnt = this->columnCount(); - - auto itemID = (crtRow * columnCnt) + currentColumn; - if (itemID > m_game_info->m_games.count() - 1) { + // Early exit for invalid indices + if (currentRow < 0 || currentColumn < 0) { + cellClicked = false; validCellSelected = false; BackgroundMusicPlayer::getInstance().stopMusic(); return; } + + crtRow = currentRow; + crtColumn = currentColumn; + columnCnt = this->columnCount(); + + // Prevent integer overflow + if (columnCnt <= 0 || crtRow > (std::numeric_limits::max() / columnCnt)) { + cellClicked = false; + validCellSelected = false; + BackgroundMusicPlayer::getInstance().stopMusic(); + return; + } + + auto itemID = (crtRow * columnCnt) + currentColumn; + if (itemID < 0 || itemID > m_game_info->m_games.count() - 1) { + cellClicked = false; + validCellSelected = false; + BackgroundMusicPlayer::getInstance().stopMusic(); + return; + } + + cellClicked = true; validCellSelected = true; SetGridBackgroundImage(crtRow, crtColumn); auto snd0Path = QString::fromStdString(m_game_info->m_games[itemID].snd0_path.string()); @@ -64,6 +82,8 @@ void GameGridFrame::PlayBackgroundMusic(QString path) { } void GameGridFrame::PopulateGameGrid(QVector m_games_search, bool fromSearch) { + this->crtRow = -1; + this->crtColumn = -1; QVector m_games_; this->clearContents(); if (fromSearch) @@ -97,7 +117,12 @@ void GameGridFrame::PopulateGameGrid(QVector m_games_search, bool from layout->addWidget(image_label); layout->addWidget(name_label); - name_label->setStyleSheet("color: white; font-size: 12px; font-weight: bold;"); + // Resizing of font-size. + float fontSize = (Config::getIconSizeGrid() / 5.5f); + QString styleSheet = + QString("color: white; font-weight: bold; font-size: %1px;").arg(fontSize); + name_label->setStyleSheet(styleSheet); + QGraphicsDropShadowEffect* shadowEffect = new QGraphicsDropShadowEffect(); shadowEffect->setBlurRadius(5); // Set the blur radius of the shadow shadowEffect->setColor(QColor(0, 0, 0, 160)); // Set the color and opacity of the shadow @@ -135,43 +160,62 @@ void GameGridFrame::PopulateGameGrid(QVector m_games_search, bool from } void GameGridFrame::SetGridBackgroundImage(int row, int column) { - int itemID = (row * this->columnCount()) + column; QWidget* item = this->cellWidget(row, column); - if (item) { - QString pic1Path; - Common::FS::PathToQString(pic1Path, (*m_games_shared)[itemID].pic_path); - const auto blurredPic1Path = Common::FS::GetUserPath(Common::FS::PathType::MetaDataDir) / - (*m_games_shared)[itemID].serial / "pic1.png"; - QString blurredPic1PathQt; - Common::FS::PathToQString(blurredPic1PathQt, blurredPic1Path); - - backgroundImage = QImage(blurredPic1PathQt); - if (backgroundImage.isNull()) { - QImage image(pic1Path); - backgroundImage = m_game_list_utils.BlurImage(image, image.rect(), 16); - - std::filesystem::path img_path = - Common::FS::GetUserPath(Common::FS::PathType::MetaDataDir) / - (*m_games_shared)[itemID].serial; - std::filesystem::create_directories(img_path); - if (!backgroundImage.save(blurredPic1PathQt, "PNG")) { - // qDebug() << "Error: Unable to save image."; - } - } - RefreshGridBackgroundImage(); + if (!item) { + // handle case where no item was clicked + return; } + + // If background images are hidden, clear the background image + if (!Config::getShowBackgroundImage()) { + backgroundImage = QImage(); + m_last_opacity = -1; // Reset opacity tracking when disabled + m_current_game_path.clear(); // Reset current game path + RefreshGridBackgroundImage(); + return; + } + + const auto& game = (*m_games_shared)[itemID]; + const int opacity = Config::getBackgroundImageOpacity(); + + // Recompute if opacity changed or we switched to a different game + if (opacity != m_last_opacity || game.pic_path != m_current_game_path) { + QImage original_image(QString::fromStdString(game.pic_path.string())); + if (!original_image.isNull()) { + backgroundImage = m_game_list_utils.ChangeImageOpacity( + original_image, original_image.rect(), opacity / 100.0f); + m_last_opacity = opacity; + m_current_game_path = game.pic_path; + } + } + + RefreshGridBackgroundImage(); } void GameGridFrame::RefreshGridBackgroundImage() { - if (!backgroundImage.isNull()) { - QPalette palette; - palette.setBrush(QPalette::Base, - QBrush(backgroundImage.scaled(size(), Qt::IgnoreAspectRatio))); - QColor transparentColor = QColor(135, 206, 235, 40); - palette.setColor(QPalette::Highlight, transparentColor); - this->setPalette(palette); + QPalette palette; + if (!backgroundImage.isNull() && Config::getShowBackgroundImage()) { + QSize widgetSize = size(); + QPixmap scaledPixmap = + QPixmap::fromImage(backgroundImage) + .scaled(widgetSize, Qt::KeepAspectRatioByExpanding, Qt::SmoothTransformation); + int x = (widgetSize.width() - scaledPixmap.width()) / 2; + int y = (widgetSize.height() - scaledPixmap.height()) / 2; + QPixmap finalPixmap(widgetSize); + finalPixmap.fill(Qt::transparent); + QPainter painter(&finalPixmap); + painter.drawPixmap(x, y, scaledPixmap); + palette.setBrush(QPalette::Base, QBrush(finalPixmap)); } + QColor transparentColor = QColor(135, 206, 235, 40); + palette.setColor(QPalette::Highlight, transparentColor); + this->setPalette(palette); +} + +void GameGridFrame::resizeEvent(QResizeEvent* event) { + QTableWidget::resizeEvent(event); + RefreshGridBackgroundImage(); } bool GameGridFrame::IsValidCellSelected() { diff --git a/src/qt_gui/game_grid_frame.h b/src/qt_gui/game_grid_frame.h index 4825d6daf..14596f8e1 100644 --- a/src/qt_gui/game_grid_frame.h +++ b/src/qt_gui/game_grid_frame.h @@ -3,6 +3,7 @@ #pragma once +#include #include #include "background_music_player.h" @@ -21,6 +22,7 @@ Q_SIGNALS: public Q_SLOTS: void SetGridBackgroundImage(int row, int column); void RefreshGridBackgroundImage(); + void resizeEvent(QResizeEvent* event); void PlayBackgroundMusic(QString path); void onCurrentCellChanged(int currentRow, int currentColumn, int previousRow, int previousColumn); @@ -33,6 +35,8 @@ private: std::shared_ptr m_compat_info; std::shared_ptr> m_games_shared; bool validCellSelected = false; + int m_last_opacity = -1; // Track last opacity to avoid unnecessary recomputation + std::filesystem::path m_current_game_path; // Track current game path to detect changes public: explicit GameGridFrame(std::shared_ptr game_info_get, diff --git a/src/qt_gui/game_info.cpp b/src/qt_gui/game_info.cpp index e4750fa1d..19b6adc1e 100644 --- a/src/qt_gui/game_info.cpp +++ b/src/qt_gui/game_info.cpp @@ -7,6 +7,33 @@ #include "compatibility_info.h" #include "game_info.h" +// Maximum depth to search for games in subdirectories +const int max_recursion_depth = 5; + +void ScanDirectoryRecursively(const QString& dir, QStringList& filePaths, int current_depth = 0) { + // Stop recursion if we've reached the maximum depth + if (current_depth >= max_recursion_depth) { + return; + } + + QDir directory(dir); + QFileInfoList entries = directory.entryInfoList(QDir::Dirs | QDir::NoDotAndDotDot); + + for (const auto& entry : entries) { + if (entry.fileName().endsWith("-UPDATE") || entry.fileName().endsWith("-patch")) { + continue; + } + + // Check if this directory contains a PS4 game (has sce_sys/param.sfo) + if (QFile::exists(entry.filePath() + "/sce_sys/param.sfo")) { + filePaths.append(entry.absoluteFilePath()); + } else { + // If not a game directory, recursively scan it with increased depth + ScanDirectoryRecursively(entry.absoluteFilePath(), filePaths, current_depth + 1); + } + } +} + GameInfoClass::GameInfoClass() = default; GameInfoClass::~GameInfoClass() = default; @@ -15,19 +42,16 @@ void GameInfoClass::GetGameInfo(QWidget* parent) { for (const auto& installLoc : Config::getGameInstallDirs()) { QString installDir; Common::FS::PathToQString(installDir, installLoc); - QDir parentFolder(installDir); - QFileInfoList fileList = parentFolder.entryInfoList(QDir::Dirs | QDir::NoDotAndDotDot); - for (const auto& fileInfo : fileList) { - if (fileInfo.isDir() && !fileInfo.filePath().endsWith("-UPDATE")) { - filePaths.append(fileInfo.absoluteFilePath()); - } - } + ScanDirectoryRecursively(installDir, filePaths, 0); } m_games = QtConcurrent::mapped(filePaths, [&](const QString& path) { return readGameInfo(Common::FS::PathFromQString(path)); }).results(); + // used to retrieve values after performing a search + m_games_backup = m_games; + // Progress bar, please be patient :) QProgressDialog dialog(tr("Loading game list, please wait :3"), tr("Cancel"), 0, 0, parent); dialog.setWindowTitle(tr("Loading...")); diff --git a/src/qt_gui/game_info.h b/src/qt_gui/game_info.h index 99805cd52..09e5a4557 100644 --- a/src/qt_gui/game_info.h +++ b/src/qt_gui/game_info.h @@ -17,9 +17,13 @@ public: ~GameInfoClass(); void GetGameInfo(QWidget* parent = nullptr); QVector m_games; + QVector m_games_backup; static bool CompareStrings(GameInfo& a, GameInfo& b) { - return a.name < b.name; + std::string name_a = a.name, name_b = b.name; + std::transform(name_a.begin(), name_a.end(), name_a.begin(), ::tolower); + std::transform(name_b.begin(), name_b.end(), name_b.begin(), ::tolower); + return name_a < name_b; } static GameInfo readGameInfo(const std::filesystem::path& filePath) { @@ -30,6 +34,12 @@ public: game_update_path += "-UPDATE"; if (std::filesystem::exists(game_update_path / "sce_sys" / "param.sfo")) { sce_folder_path = game_update_path / "sce_sys" / "param.sfo"; + } else { + game_update_path = filePath; + game_update_path += "-patch"; + if (std::filesystem::exists(game_update_path / "sce_sys" / "param.sfo")) { + sce_folder_path = game_update_path / "sce_sys" / "param.sfo"; + } } PSF psf; @@ -72,4 +82,4 @@ public: } return game; } -}; \ No newline at end of file +}; diff --git a/src/qt_gui/game_install_dialog.h b/src/qt_gui/game_install_dialog.h index 0a4e29357..938f0e1f3 100644 --- a/src/qt_gui/game_install_dialog.h +++ b/src/qt_gui/game_install_dialog.h @@ -11,6 +11,7 @@ class QLineEdit; class GameInstallDialog final : public QDialog { + Q_OBJECT public: GameInstallDialog(); ~GameInstallDialog(); diff --git a/src/qt_gui/game_list_frame.cpp b/src/qt_gui/game_list_frame.cpp index b1cd07216..170215f3d 100644 --- a/src/qt_gui/game_list_frame.cpp +++ b/src/qt_gui/game_list_frame.cpp @@ -69,7 +69,7 @@ GameListFrame::GameListFrame(std::shared_ptr game_info_get, ListSortedAsc = true; } this->clearContents(); - PopulateGameList(); + PopulateGameList(false); }); connect(this, &QTableWidget::customContextMenuRequested, this, [=, this](const QPoint& pos) { @@ -77,8 +77,10 @@ GameListFrame::GameListFrame(std::shared_ptr game_info_get, }); connect(this, &QTableWidget::cellClicked, this, [=, this](int row, int column) { - if (column == 2 && !m_game_info->m_games[row].compatibility.url.isEmpty()) { - QDesktopServices::openUrl(QUrl(m_game_info->m_games[row].compatibility.url)); + if (column == 2 && m_game_info->m_games[row].compatibility.issue_number != "") { + auto url_issues = "https://github.com/shadps4-emu/shadps4-game-compatibility/issues/"; + QDesktopServices::openUrl( + QUrl(url_issues + m_game_info->m_games[row].compatibility.issue_number)); } }); } @@ -89,6 +91,7 @@ void GameListFrame::onCurrentCellChanged(int currentRow, int currentColumn, int if (!item) { return; } + m_current_item = item; // Store current item SetListBackgroundImage(item); PlayBackgroundMusic(item); } @@ -103,12 +106,20 @@ void GameListFrame::PlayBackgroundMusic(QTableWidgetItem* item) { BackgroundMusicPlayer::getInstance().playMusic(snd0path); } -void GameListFrame::PopulateGameList() { +void GameListFrame::PopulateGameList(bool isInitialPopulation) { + this->m_current_item = nullptr; // Do not show status column if it is not enabled this->setColumnHidden(2, !Config::getCompatibilityEnabled()); + this->setColumnHidden(6, !Config::GetLoadGameSizeEnabled()); + this->setRowCount(m_game_info->m_games.size()); ResizeIcons(icon_size); + if (isInitialPopulation) { + SortNameAscending(1); // Column 1 = Name + ResizeIcons(icon_size); + } + for (int i = 0; i < m_game_info->m_games.size(); i++) { SetTableItem(i, 1, QString::fromStdString(m_game_info->m_games[i].name)); SetTableItem(i, 3, QString::fromStdString(m_game_info->m_games[i].serial)); @@ -160,38 +171,56 @@ void GameListFrame::SetListBackgroundImage(QTableWidgetItem* item) { return; } - QString pic1Path; - Common::FS::PathToQString(pic1Path, m_game_info->m_games[item->row()].pic_path); - const auto blurredPic1Path = Common::FS::GetUserPath(Common::FS::PathType::MetaDataDir) / - m_game_info->m_games[item->row()].serial / "pic1.png"; - QString blurredPic1PathQt; - Common::FS::PathToQString(blurredPic1PathQt, blurredPic1Path); + // If background images are hidden, clear the background image + if (!Config::getShowBackgroundImage()) { + backgroundImage = QImage(); + m_last_opacity = -1; // Reset opacity tracking when disabled + m_current_game_path.clear(); // Reset current game path + RefreshListBackgroundImage(); + return; + } - backgroundImage = QImage(blurredPic1PathQt); - if (backgroundImage.isNull()) { - QImage image(pic1Path); - backgroundImage = m_game_list_utils.BlurImage(image, image.rect(), 16); + const auto& game = m_game_info->m_games[item->row()]; + const int opacity = Config::getBackgroundImageOpacity(); - std::filesystem::path img_path = - Common::FS::GetUserPath(Common::FS::PathType::MetaDataDir) / - m_game_info->m_games[item->row()].serial; - std::filesystem::create_directories(img_path); - if (!backgroundImage.save(blurredPic1PathQt, "PNG")) { - // qDebug() << "Error: Unable to save image."; + // Recompute if opacity changed or we switched to a different game + if (opacity != m_last_opacity || game.pic_path != m_current_game_path) { + auto image_path = game.pic_path.u8string(); + QImage original_image(QString::fromStdString({image_path.begin(), image_path.end()})); + if (!original_image.isNull()) { + backgroundImage = m_game_list_utils.ChangeImageOpacity( + original_image, original_image.rect(), opacity / 100.0f); + m_last_opacity = opacity; + m_current_game_path = game.pic_path; } } + RefreshListBackgroundImage(); } void GameListFrame::RefreshListBackgroundImage() { - if (!backgroundImage.isNull()) { - QPalette palette; - palette.setBrush(QPalette::Base, - QBrush(backgroundImage.scaled(size(), Qt::IgnoreAspectRatio))); - QColor transparentColor = QColor(135, 206, 235, 40); - palette.setColor(QPalette::Highlight, transparentColor); - this->setPalette(palette); + QPalette palette; + if (!backgroundImage.isNull() && Config::getShowBackgroundImage()) { + QSize widgetSize = size(); + QPixmap scaledPixmap = + QPixmap::fromImage(backgroundImage) + .scaled(widgetSize, Qt::KeepAspectRatioByExpanding, Qt::SmoothTransformation); + int x = (widgetSize.width() - scaledPixmap.width()) / 2; + int y = (widgetSize.height() - scaledPixmap.height()) / 2; + QPixmap finalPixmap(widgetSize); + finalPixmap.fill(Qt::transparent); + QPainter painter(&finalPixmap); + painter.drawPixmap(x, y, scaledPixmap); + palette.setBrush(QPalette::Base, QBrush(finalPixmap)); } + QColor transparentColor = QColor(135, 206, 235, 40); + palette.setColor(QPalette::Highlight, transparentColor); + this->setPalette(palette); +} + +void GameListFrame::resizeEvent(QResizeEvent* event) { + QTableWidget::resizeEvent(event); + RefreshListBackgroundImage(); } void GameListFrame::SortNameAscending(int columnIndex) { @@ -266,7 +295,8 @@ void GameListFrame::SetCompatibilityItem(int row, int column, CompatibilityEntry tooltip_string = status_explanation; } else { tooltip_string = - "

" + tr("Click to go to issue") + "" + "
" + tr("Last updated") + + "

" + tr("Click to see details on github") + "" + "
" + + tr("Last updated") + QString(": %1 (%2)").arg(entry.last_tested.toString("yyyy-MM-dd"), entry.version) + "
" + status_explanation + "

"; } @@ -282,7 +312,8 @@ void GameListFrame::SetCompatibilityItem(int row, int column, CompatibilityEntry QLabel* dotLabel = new QLabel("", widget); dotLabel->setPixmap(circle_pixmap); - QLabel* label = new QLabel(m_compat_info->CompatStatusToString.at(entry.status), widget); + QLabel* label = new QLabel(m_compat_info->GetCompatStatusString(entry.status), widget); + this->horizontalHeader()->setSectionResizeMode(2, QHeaderView::ResizeToContents); label->setStyleSheet("color: white; font-size: 16px; font-weight: bold;"); @@ -385,3 +416,7 @@ QString GameListFrame::GetPlayTime(const std::string& serial) { file.close(); return playTime; } + +QTableWidgetItem* GameListFrame::GetCurrentItem() { + return m_current_item; +} \ No newline at end of file diff --git a/src/qt_gui/game_list_frame.h b/src/qt_gui/game_list_frame.h index 8c6fcb1e2..782db6bae 100644 --- a/src/qt_gui/game_list_frame.h +++ b/src/qt_gui/game_list_frame.h @@ -3,6 +3,9 @@ #pragma once +#include // std::transform +#include // std::tolower + #include #include #include @@ -27,6 +30,7 @@ Q_SIGNALS: public Q_SLOTS: void SetListBackgroundImage(QTableWidgetItem* item); void RefreshListBackgroundImage(); + void resizeEvent(QResizeEvent* event); void SortNameAscending(int columnIndex); void SortNameDescending(int columnIndex); void PlayBackgroundMusic(QTableWidgetItem* item); @@ -41,11 +45,14 @@ private: QList m_columnActs; GameInfoClass* game_inf_get = nullptr; bool ListSortedAsc = true; + QTableWidgetItem* m_current_item = nullptr; + int m_last_opacity = -1; // Track last opacity to avoid unnecessary recomputation + std::filesystem::path m_current_game_path; // Track current game path to detect changes public: - void PopulateGameList(); + void PopulateGameList(bool isInitialPopulation = true); void ResizeIcons(int iconSize); - + QTableWidgetItem* GetCurrentItem(); QImage backgroundImage; GameListUtils m_game_list_utils; GuiContextMenus m_gui_context_menus; @@ -65,8 +72,12 @@ public: static bool CompareStringsAscending(GameInfo a, GameInfo b, int columnIndex) { switch (columnIndex) { - case 1: - return a.name < b.name; + case 1: { + std::string name_a = a.name, name_b = b.name; + std::transform(name_a.begin(), name_a.end(), name_a.begin(), ::tolower); + std::transform(name_b.begin(), name_b.end(), name_b.begin(), ::tolower); + return name_a < name_b; + } case 2: return a.compatibility.status < b.compatibility.status; case 3: @@ -90,8 +101,12 @@ public: static bool CompareStringsDescending(GameInfo a, GameInfo b, int columnIndex) { switch (columnIndex) { - case 1: - return a.name > b.name; + case 1: { + std::string name_a = a.name, name_b = b.name; + std::transform(name_a.begin(), name_a.end(), name_a.begin(), ::tolower); + std::transform(name_b.begin(), name_b.end(), name_b.begin(), ::tolower); + return name_a > name_b; + } case 2: return a.compatibility.status > b.compatibility.status; case 3: diff --git a/src/qt_gui/game_list_utils.h b/src/qt_gui/game_list_utils.h index ab9233886..804f0e4b7 100644 --- a/src/qt_gui/game_list_utils.h +++ b/src/qt_gui/game_list_utils.h @@ -62,11 +62,50 @@ public: QDir dir(dirPath); QDirIterator it(dir.absolutePath(), QDirIterator::Subdirectories); qint64 total = 0; + + if (!Config::GetLoadGameSizeEnabled()) { + game.size = FormatSize(0).toStdString(); + return; + } + + // Cache path + QDir cacheDir = + QDir(Common::FS::GetUserPath(Common::FS::PathType::MetaDataDir) / game.serial); + if (!cacheDir.exists()) { + cacheDir.mkpath("."); + } + QFile size_cache_file(cacheDir.absoluteFilePath("size_cache.txt")); + QFileInfo cacheInfo(size_cache_file); + QFileInfo dirInfo(dirPath); + + // Check if cache file exists and is valid + if (size_cache_file.exists() && cacheInfo.lastModified() >= dirInfo.lastModified()) { + if (size_cache_file.open(QIODevice::ReadOnly | QIODevice::Text)) { + QTextStream in(&size_cache_file); + QString cachedSize = in.readLine(); + size_cache_file.close(); + + if (!cachedSize.isEmpty()) { + game.size = cachedSize.toStdString(); + return; + } + } + } + + // Cache is invalid or does not exist; calculate size while (it.hasNext()) { it.next(); total += it.fileInfo().size(); } + game.size = FormatSize(total).toStdString(); + + // Save new cache + if (size_cache_file.open(QIODevice::WriteOnly | QIODevice::Text)) { + QTextStream out(&size_cache_file); + out << QString::fromStdString(game.size) << "\n"; + size_cache_file.close(); + } } static QString GetRegion(char region) { @@ -166,4 +205,30 @@ public: return result; } + + // Opacity is a float between 0 and 1 + static QImage ChangeImageOpacity(const QImage& image, const QRect& rect, float opacity) { + // Convert to ARGB32 format to ensure alpha channel support + QImage result = image.convertToFormat(QImage::Format_ARGB32); + + // Ensure opacity is between 0 and 1 + opacity = std::clamp(opacity, 0.0f, 1.0f); + + // Convert opacity to integer alpha value (0-255) + int alpha = static_cast(opacity * 255); + + // Process only the specified rectangle area + for (int y = rect.top(); y <= rect.bottom(); ++y) { + QRgb* line = reinterpret_cast(result.scanLine(y)); + for (int x = rect.left(); x <= rect.right(); ++x) { + // Get current pixel + QRgb pixel = line[x]; + // Keep RGB values, but modify alpha while preserving relative transparency + int newAlpha = (qAlpha(pixel) * alpha) / 255; + line[x] = qRgba(qRed(pixel), qGreen(pixel), qBlue(pixel), newAlpha); + } + } + + return result; + } }; diff --git a/src/qt_gui/gui_context_menus.h b/src/qt_gui/gui_context_menus.h index bbc84c4fc..c13388bbc 100644 --- a/src/qt_gui/gui_context_menus.h +++ b/src/qt_gui/gui_context_menus.h @@ -7,11 +7,12 @@ #include #include #include -#include #include +#include #include "cheats_patches.h" #include "common/config.h" +#include "common/path_util.h" #include "common/version.h" #include "compatibility_info.h" #include "game_info.h" @@ -25,12 +26,11 @@ #include #include #endif -#include "common/path_util.h" class GuiContextMenus : public QObject { Q_OBJECT public: - void RequestGameMenu(const QPoint& pos, QVector m_games, + void RequestGameMenu(const QPoint& pos, QVector& m_games, std::shared_ptr m_compat_info, QTableWidget* widget, bool isList) { QPoint global_pos = widget->viewport()->mapToGlobal(pos); @@ -41,8 +41,8 @@ public: itemID = widget->currentRow() * widget->columnCount() + widget->currentColumn(); } - // Do not show the menu if an item is selected - if (itemID == -1) { + // Do not show the menu if no item is selected + if (itemID < 0 || itemID >= m_games.size()) { return; } @@ -52,10 +52,12 @@ public: // "Open Folder..." submenu QMenu* openFolderMenu = new QMenu(tr("Open Folder..."), widget); QAction* openGameFolder = new QAction(tr("Open Game Folder"), widget); + QAction* openUpdateFolder = new QAction(tr("Open Update Folder"), widget); QAction* openSaveDataFolder = new QAction(tr("Open Save Data Folder"), widget); QAction* openLogFolder = new QAction(tr("Open Log Folder"), widget); openFolderMenu->addAction(openGameFolder); + openFolderMenu->addAction(openUpdateFolder); openFolderMenu->addAction(openSaveDataFolder); openFolderMenu->addAction(openLogFolder); @@ -75,10 +77,16 @@ public: 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* copyVersion = new QAction(tr("Copy Version"), widget); + QAction* copySize = new QAction(tr("Copy Size"), widget); QAction* copyNameAll = new QAction(tr("Copy All"), widget); copyMenu->addAction(copyName); copyMenu->addAction(copySerial); + copyMenu->addAction(copyVersion); + if (Config::GetLoadGameSizeEnabled()) { + copyMenu->addAction(copySize); + } copyMenu->addAction(copyNameAll); menu.addMenu(copyMenu); @@ -87,11 +95,15 @@ public: QMenu* deleteMenu = new QMenu(tr("Delete..."), widget); QAction* deleteGame = new QAction(tr("Delete Game"), widget); QAction* deleteUpdate = new QAction(tr("Delete Update"), widget); + QAction* deleteSaveData = new QAction(tr("Delete Save Data"), widget); QAction* deleteDLC = new QAction(tr("Delete DLC"), widget); + QAction* deleteTrophy = new QAction(tr("Delete Trophy"), widget); deleteMenu->addAction(deleteGame); deleteMenu->addAction(deleteUpdate); + deleteMenu->addAction(deleteSaveData); deleteMenu->addAction(deleteDLC); + deleteMenu->addAction(deleteTrophy); menu.addMenu(deleteMenu); @@ -103,7 +115,9 @@ public: compatibilityMenu->addAction(updateCompatibility); compatibilityMenu->addAction(viewCompatibilityReport); - compatibilityMenu->addAction(submitCompatibilityReport); + if (Common::isRelease) { + compatibilityMenu->addAction(submitCompatibilityReport); + } menu.addMenu(compatibilityMenu); @@ -122,6 +136,24 @@ public: QDesktopServices::openUrl(QUrl::fromLocalFile(folderPath)); } + if (selected == openUpdateFolder) { + QString open_update_path; + Common::FS::PathToQString(open_update_path, m_games[itemID].path); + open_update_path += "-UPDATE"; + if (!std::filesystem::exists(Common::FS::PathFromQString(open_update_path))) { + QDesktopServices::openUrl(QUrl::fromLocalFile(open_update_path)); + } else { + Common::FS::PathToQString(open_update_path, m_games[itemID].path); + open_update_path += "-patch"; + if (!std::filesystem::exists(Common::FS::PathFromQString(open_update_path))) { + QDesktopServices::openUrl(QUrl::fromLocalFile(open_update_path)); + } else { + QMessageBox::critical(nullptr, tr("Error"), + QString(tr("This game has no update folder to open!"))); + } + } + } + if (selected == openSaveDataFolder) { QString userPath; Common::FS::PathToQString(userPath, @@ -133,19 +165,70 @@ public: } if (selected == openLogFolder) { - QString userPath; - Common::FS::PathToQString(userPath, - Common::FS::GetUserPath(Common::FS::PathType::UserDir)); - QDesktopServices::openUrl(QUrl::fromLocalFile(userPath + "/log")); + QString logPath; + Common::FS::PathToQString(logPath, + Common::FS::GetUserPath(Common::FS::PathType::LogDir)); + if (!Config::getSeparateLogFilesEnabled()) { + QDesktopServices::openUrl(QUrl::fromLocalFile(logPath)); + } else { + QString fileName = QString::fromStdString(m_games[itemID].serial) + ".log"; + QString filePath = logPath + "/" + fileName; + QStringList arguments; + if (QFile::exists(filePath)) { +#ifdef Q_OS_WIN + arguments << "/select," << filePath.replace("/", "\\"); + QProcess::startDetached("explorer", arguments); + +#elif defined(Q_OS_MAC) + arguments << "-R" << filePath; + QProcess::startDetached("open", arguments); + +#elif defined(Q_OS_LINUX) + QStringList arguments; + arguments << "--select" << filePath; + if (!QProcess::startDetached("nautilus", arguments)) { + // Failed to open Nautilus to select file + arguments.clear(); + arguments << logPath; + if (!QProcess::startDetached("xdg-open", arguments)) { + // Failed to open directory on Linux + } + } +#else + QDesktopServices::openUrl(QUrl::fromLocalFile(logPath)); +#endif + } else { + QMessageBox msgBox; + msgBox.setIcon(QMessageBox::Information); + msgBox.setText(tr("No log file found for this game!")); + + QPushButton* okButton = msgBox.addButton(QMessageBox::Ok); + QPushButton* openFolderButton = + msgBox.addButton(tr("Open Log Folder"), QMessageBox::ActionRole); + + msgBox.exec(); + + if (msgBox.clickedButton() == openFolderButton) { + QDesktopServices::openUrl(QUrl::fromLocalFile(logPath)); + } + } + } } if (selected == &openSfoViewer) { PSF psf; + QString gameName = QString::fromStdString(m_games[itemID].name); std::filesystem::path game_folder_path = m_games[itemID].path; std::filesystem::path game_update_path = game_folder_path; - game_update_path += "UPDATE"; + game_update_path += "-UPDATE"; if (std::filesystem::exists(game_update_path)) { game_folder_path = game_update_path; + } else { + game_update_path = game_folder_path; + game_update_path += "-patch"; + if (std::filesystem::exists(game_update_path)) { + game_folder_path = game_update_path; + } } if (psf.Open(game_folder_path / "sce_sys" / "param.sfo")) { int rows = psf.GetEntries().size(); @@ -214,7 +297,7 @@ public: tableWidget->horizontalHeader()->setVisible(false); tableWidget->horizontalHeader()->setSectionResizeMode(QHeaderView::Fixed); - tableWidget->setWindowTitle(tr("SFO Viewer")); + tableWidget->setWindowTitle(tr("SFO Viewer for ") + gameName); tableWidget->show(); } } @@ -238,7 +321,44 @@ public: QString trophyPath, gameTrpPath; Common::FS::PathToQString(trophyPath, m_games[itemID].serial); Common::FS::PathToQString(gameTrpPath, m_games[itemID].path); - TrophyViewer* trophyViewer = new TrophyViewer(trophyPath, gameTrpPath); + auto game_update_path = Common::FS::PathFromQString(gameTrpPath); + game_update_path += "-UPDATE"; + if (std::filesystem::exists(game_update_path)) { + Common::FS::PathToQString(gameTrpPath, game_update_path); + } else { + game_update_path = Common::FS::PathFromQString(gameTrpPath); + game_update_path += "-patch"; + if (std::filesystem::exists(game_update_path)) { + Common::FS::PathToQString(gameTrpPath, game_update_path); + } + } + + // Array with all games and their trophy information + QVector allTrophyGames; + for (const auto& game : m_games) { + TrophyGameInfo gameInfo; + gameInfo.name = QString::fromStdString(game.name); + Common::FS::PathToQString(gameInfo.trophyPath, game.serial); + Common::FS::PathToQString(gameInfo.gameTrpPath, game.path); + + auto update_path = Common::FS::PathFromQString(gameInfo.gameTrpPath); + update_path += "-UPDATE"; + if (std::filesystem::exists(update_path)) { + Common::FS::PathToQString(gameInfo.gameTrpPath, update_path); + } else { + update_path = Common::FS::PathFromQString(gameInfo.gameTrpPath); + update_path += "-patch"; + if (std::filesystem::exists(update_path)) { + Common::FS::PathToQString(gameInfo.gameTrpPath, update_path); + } + } + + allTrophyGames.append(gameInfo); + } + + QString gameName = QString::fromStdString(m_games[itemID].name); + TrophyViewer* trophyViewer = + new TrophyViewer(trophyPath, gameTrpPath, gameName, allTrophyGames); trophyViewer->show(); connect(widget->parent(), &QWidget::destroyed, trophyViewer, [trophyViewer]() { trophyViewer->deleteLater(); }); @@ -283,7 +403,7 @@ public: #ifdef Q_OS_WIN if (createShortcutWin(linkPath, ebootPath, icoPath, exePath)) { #else - if (createShortcutLinux(linkPath, ebootPath, iconPath)) { + if (createShortcutLinux(linkPath, m_games[itemID].name, ebootPath, iconPath)) { #endif QMessageBox::information( nullptr, tr("Shortcut creation"), @@ -301,7 +421,7 @@ public: #ifdef Q_OS_WIN if (createShortcutWin(linkPath, ebootPath, iconPath, exePath)) { #else - if (createShortcutLinux(linkPath, ebootPath, iconPath)) { + if (createShortcutLinux(linkPath, m_games[itemID].name, ebootPath, iconPath)) { #endif QMessageBox::information( nullptr, tr("Shortcut creation"), @@ -325,27 +445,58 @@ public: clipboard->setText(QString::fromStdString(m_games[itemID].serial)); } - if (selected == copyNameAll) { + if (selected == copyVersion) { QClipboard* clipboard = QGuiApplication::clipboard(); - QString combinedText = QString("Name:%1 | Serial:%2 | Version:%3 | Size:%4") + clipboard->setText(QString::fromStdString(m_games[itemID].version)); + } + + if (selected == copySize) { + QClipboard* clipboard = QGuiApplication::clipboard(); + clipboard->setText(QString::fromStdString(m_games[itemID].size)); + } + + if (selected == copyNameAll) { + QString GameSizeEnabled; + if (Config::GetLoadGameSizeEnabled()) { + GameSizeEnabled = " | Size:" + QString::fromStdString(m_games[itemID].size); + } + + QClipboard* clipboard = QGuiApplication::clipboard(); + QString combinedText = QString("Name:%1 | Serial:%2 | Version:%3%4") .arg(QString::fromStdString(m_games[itemID].name)) .arg(QString::fromStdString(m_games[itemID].serial)) .arg(QString::fromStdString(m_games[itemID].version)) - .arg(QString::fromStdString(m_games[itemID].size)); + .arg(GameSizeEnabled); + clipboard->setText(combinedText); } - if (selected == deleteGame || selected == deleteUpdate || selected == deleteDLC) { + if (selected == deleteGame || selected == deleteUpdate || selected == deleteDLC || + selected == deleteSaveData || selected == deleteTrophy) { bool error = false; - QString folder_path, game_update_path, dlc_path; + QString folder_path, game_update_path, dlc_path, save_data_path, trophy_data_path; Common::FS::PathToQString(folder_path, m_games[itemID].path); game_update_path = folder_path + "-UPDATE"; + if (!std::filesystem::exists(Common::FS::PathFromQString(game_update_path))) { + game_update_path = folder_path + "-patch"; + } Common::FS::PathToQString( dlc_path, Config::getAddonInstallDir() / Common::FS::PathFromQString(folder_path).parent_path().filename()); - QString message_type = tr("Game"); + Common::FS::PathToQString(save_data_path, + Common::FS::GetUserPath(Common::FS::PathType::UserDir) / + "savedata/1" / m_games[itemID].serial); - if (selected == deleteUpdate) { + Common::FS::PathToQString(trophy_data_path, + Common::FS::GetUserPath(Common::FS::PathType::MetaDataDir) / + m_games[itemID].serial / "TrophyFiles"); + + QString message_type; + + if (selected == deleteGame) { + BackgroundMusicPlayer::getInstance().stopMusic(); + message_type = tr("Game"); + } else if (selected == deleteUpdate) { if (!std::filesystem::exists(Common::FS::PathFromQString(game_update_path))) { QMessageBox::critical(nullptr, tr("Error"), QString(tr("This game has no update to delete!"))); @@ -363,6 +514,25 @@ public: folder_path = dlc_path; message_type = tr("DLC"); } + } else if (selected == deleteSaveData) { + if (!std::filesystem::exists(Common::FS::PathFromQString(save_data_path))) { + QMessageBox::critical(nullptr, tr("Error"), + QString(tr("This game has no save data to delete!"))); + error = true; + } else { + folder_path = save_data_path; + message_type = tr("Save Data"); + } + } else if (selected == deleteTrophy) { + if (!std::filesystem::exists(Common::FS::PathFromQString(trophy_data_path))) { + QMessageBox::critical( + nullptr, tr("Error"), + QString(tr("This game has no saved trophies to delete!"))); + error = true; + } else { + folder_path = trophy_data_path; + message_type = tr("Trophy"); + } } if (!error) { QString gameName = QString::fromStdString(m_games[itemID].name); @@ -374,7 +544,10 @@ public: QMessageBox::Yes | QMessageBox::No); if (reply == QMessageBox::Yes) { dir.removeRecursively(); - widget->removeRow(itemID); + if (selected == deleteGame) { + widget->removeRow(itemID); + m_games.removeAt(itemID); + } } } } @@ -396,7 +569,7 @@ public: "title", QString("%1 - %2").arg(QString::fromStdString(m_games[itemID].serial), QString::fromStdString(m_games[itemID].name))); query.addQueryItem("game-name", QString::fromStdString(m_games[itemID].name)); - query.addQueryItem("game-code", QString::fromStdString(m_games[itemID].serial)); + query.addQueryItem("game-serial", QString::fromStdString(m_games[itemID].serial)); query.addQueryItem("game-version", QString::fromStdString(m_games[itemID].version)); query.addQueryItem("emulator-version", QString(Common::VERSION)); url.setQuery(query); @@ -427,30 +600,6 @@ public: return -1; } - void RequestGameMenuPKGViewer( - const QPoint& pos, QStringList m_pkg_app_list, QTreeWidget* treeWidget, - std::function InstallDragDropPkg) { - QPoint global_pos = treeWidget->viewport()->mapToGlobal(pos); // context menu position - QTreeWidgetItem* currentItem = treeWidget->currentItem(); // current clicked item - int itemIndex = GetRowIndex(treeWidget, currentItem); // row - - QMenu menu(treeWidget); - QAction installPackage(tr("Install PKG"), treeWidget); - - menu.addAction(&installPackage); - - auto selected = menu.exec(global_pos); - if (!selected) { - return; - } - - if (selected == &installPackage) { - QStringList pkg_app_ = m_pkg_app_list[itemIndex].split(";;"); - std::filesystem::path path = Common::FS::PathFromQString(pkg_app_[9]); - InstallDragDropPkg(path, 1, 1); - } - } - private: bool convertPngToIco(const QString& pngFilePath, const QString& icoFilePath) { // Load the PNG image @@ -510,8 +659,8 @@ private: return SUCCEEDED(hres); } #else - bool createShortcutLinux(const QString& linkPath, const QString& targetPath, - const QString& iconPath) { + bool createShortcutLinux(const QString& linkPath, const std::string& name, + const QString& targetPath, const QString& iconPath) { QFile shortcutFile(linkPath); if (!shortcutFile.open(QIODevice::WriteOnly | QIODevice::Text)) { QMessageBox::critical(nullptr, "Error", @@ -522,7 +671,7 @@ private: QTextStream out(&shortcutFile); out << "[Desktop Entry]\n"; out << "Version=1.0\n"; - out << "Name=" << QFileInfo(linkPath).baseName() << "\n"; + out << "Name=" << QString::fromStdString(name) << "\n"; out << "Exec=" << QCoreApplication::applicationFilePath() << " \"" << targetPath << "\"\n"; out << "Icon=" << iconPath << "\n"; out << "Terminal=false\n"; diff --git a/src/qt_gui/install_dir_select.cpp b/src/qt_gui/install_dir_select.cpp deleted file mode 100644 index e0951b123..000000000 --- a/src/qt_gui/install_dir_select.cpp +++ /dev/null @@ -1,76 +0,0 @@ -// 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 "install_dir_select.h" - -InstallDirSelect::InstallDirSelect() : selected_dir() { - selected_dir = Config::getGameInstallDirs().empty() ? "" : Config::getGameInstallDirs().front(); - - if (!Config::getGameInstallDirs().empty() && Config::getGameInstallDirs().size() == 1) { - reject(); - } - - auto layout = new QVBoxLayout(this); - - layout->addWidget(SetupInstallDirList()); - layout->addStretch(); - layout->addWidget(SetupDialogActions()); - - setWindowTitle(tr("shadPS4 - Choose directory")); - setWindowIcon(QIcon(":images/shadps4.ico")); -} - -InstallDirSelect::~InstallDirSelect() {} - -QWidget* InstallDirSelect::SetupInstallDirList() { - auto group = new QGroupBox(tr("Select which directory you want to install to.")); - auto vlayout = new QVBoxLayout(); - - auto m_path_list = new QListWidget(); - QList qt_list; - for (const auto& str : Config::getGameInstallDirs()) { - QString installDirPath; - Common::FS::PathToQString(installDirPath, str); - qt_list.append(installDirPath); - } - m_path_list->insertItems(0, qt_list); - m_path_list->setSpacing(1); - - connect(m_path_list, &QListWidget::itemClicked, this, &InstallDirSelect::setSelectedDirectory); - connect(m_path_list, &QListWidget::itemActivated, this, - &InstallDirSelect::setSelectedDirectory); - - vlayout->addWidget(m_path_list); - - group->setLayout(vlayout); - return group; -} - -void InstallDirSelect::setSelectedDirectory(QListWidgetItem* item) { - if (item) { - const auto highlighted_path = Common::FS::PathFromQString(item->text()); - if (!highlighted_path.empty()) { - selected_dir = highlighted_path; - } - } -} - -QWidget* InstallDirSelect::SetupDialogActions() { - auto actions = new QDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Cancel); - - connect(actions, &QDialogButtonBox::accepted, this, &InstallDirSelect::accept); - connect(actions, &QDialogButtonBox::rejected, this, &InstallDirSelect::reject); - - return actions; -} diff --git a/src/qt_gui/install_dir_select.h b/src/qt_gui/install_dir_select.h deleted file mode 100644 index e3e81575a..000000000 --- a/src/qt_gui/install_dir_select.h +++ /dev/null @@ -1,30 +0,0 @@ -// SPDX-FileCopyrightText: Copyright 2024 shadPS4 Emulator Project -// SPDX-License-Identifier: GPL-2.0-or-later - -#pragma once - -#include -#include - -#include "common/config.h" -#include "common/path_util.h" - -class QLineEdit; - -class InstallDirSelect final : public QDialog { - Q_OBJECT - -public: - InstallDirSelect(); - ~InstallDirSelect(); - - std::filesystem::path getSelectedDirectory() { - return selected_dir; - } - -private: - QWidget* SetupInstallDirList(); - QWidget* SetupDialogActions(); - void setSelectedDirectory(QListWidgetItem* item); - std::filesystem::path selected_dir; -}; diff --git a/src/qt_gui/kbm_config_dialog.cpp b/src/qt_gui/kbm_config_dialog.cpp new file mode 100644 index 000000000..1851c591d --- /dev/null +++ b/src/qt_gui/kbm_config_dialog.cpp @@ -0,0 +1,239 @@ +// SPDX-FileCopyrightText: Copyright 2024 shadPS4 Emulator Project +// SPDX-License-Identifier: GPL-2.0-or-later + +#include "kbm_config_dialog.h" +#include "kbm_help_dialog.h" + +#include +#include +#include +#include "common/config.h" +#include "common/path_util.h" +#include "game_info.h" +#include "sdl_window.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +QString previous_game = "default"; +bool isHelpOpen = false; +HelpDialog* helpDialog; + +EditorDialog::EditorDialog(QWidget* parent) : QDialog(parent) { + + setWindowTitle(tr("Edit Keyboard + Mouse and Controller input bindings")); + resize(600, 400); + + // Create the editor widget + editor = new QPlainTextEdit(this); + editorFont.setPointSize(10); // Set default text size + editor->setFont(editorFont); // Apply font to the editor + + // Create the game selection combo box + gameComboBox = new QComboBox(this); + gameComboBox->addItem("default"); // Add default option + // Load all installed games + loadInstalledGames(); + + QCheckBox* unifiedInputCheckBox = new QCheckBox(tr("Use Per-Game configs"), this); + unifiedInputCheckBox->setChecked(!Config::GetUseUnifiedInputConfig()); + + // Connect checkbox signal + connect(unifiedInputCheckBox, &QCheckBox::toggled, this, [](bool checked) { + Config::SetUseUnifiedInputConfig(!checked); + Config::save(Common::FS::GetUserPath(Common::FS::PathType::UserDir) / "config.toml"); + }); + // Create Save, Cancel, and Help buttons + QPushButton* saveButton = new QPushButton("Save", this); + QPushButton* cancelButton = new QPushButton("Cancel", this); + QPushButton* helpButton = new QPushButton("Help", this); + QPushButton* defaultButton = new QPushButton("Default", this); + + // Layout for the game selection and buttons + QHBoxLayout* topLayout = new QHBoxLayout(); + topLayout->addWidget(unifiedInputCheckBox); + topLayout->addWidget(gameComboBox); + topLayout->addStretch(); + topLayout->addWidget(saveButton); + topLayout->addWidget(cancelButton); + topLayout->addWidget(defaultButton); + topLayout->addWidget(helpButton); + + // Main layout with editor and buttons + QVBoxLayout* layout = new QVBoxLayout(this); + layout->addLayout(topLayout); + layout->addWidget(editor); + + // Load the default config file content into the editor + loadFile(gameComboBox->currentText()); + + // Connect button and combo box signals + connect(saveButton, &QPushButton::clicked, this, &EditorDialog::onSaveClicked); + connect(cancelButton, &QPushButton::clicked, this, &EditorDialog::onCancelClicked); + connect(helpButton, &QPushButton::clicked, this, &EditorDialog::onHelpClicked); + connect(defaultButton, &QPushButton::clicked, this, &EditorDialog::onResetToDefaultClicked); + connect(gameComboBox, &QComboBox::currentTextChanged, this, + &EditorDialog::onGameSelectionChanged); +} + +void EditorDialog::loadFile(QString game) { + + const auto config_file = Config::GetFoolproofKbmConfigFile(game.toStdString()); + QFile file(config_file); + + if (file.open(QIODevice::ReadOnly | QIODevice::Text)) { + QTextStream in(&file); + editor->setPlainText(in.readAll()); + originalConfig = editor->toPlainText(); + file.close(); + } else { + QMessageBox::warning(this, tr("Error"), tr("Could not open the file for reading")); + } +} + +void EditorDialog::saveFile(QString game) { + + const auto config_file = Config::GetFoolproofKbmConfigFile(game.toStdString()); + QFile file(config_file); + + if (file.open(QIODevice::WriteOnly | QIODevice::Text)) { + QTextStream out(&file); + out << editor->toPlainText(); + file.close(); + } else { + QMessageBox::warning(this, tr("Error"), tr("Could not open the file for writing")); + } +} + +// Override the close event to show the save confirmation dialog only if changes were made +void EditorDialog::closeEvent(QCloseEvent* event) { + if (isHelpOpen) { + helpDialog->close(); + isHelpOpen = false; + // at this point I might have to add this flag and the help dialog to the class itself + } + if (hasUnsavedChanges()) { + QMessageBox::StandardButton reply; + reply = QMessageBox::question(this, tr("Save Changes"), tr("Do you want to save changes?"), + QMessageBox::Yes | QMessageBox::No | QMessageBox::Cancel); + + if (reply == QMessageBox::Yes) { + saveFile(gameComboBox->currentText()); + event->accept(); // Close the dialog + } else if (reply == QMessageBox::No) { + event->accept(); // Close the dialog without saving + } else { + event->ignore(); // Cancel the close event + } + } else { + event->accept(); // No changes, close the dialog without prompting + } +} +void EditorDialog::keyPressEvent(QKeyEvent* event) { + if (event->key() == Qt::Key_Escape) { + if (isHelpOpen) { + helpDialog->close(); + isHelpOpen = false; + } + close(); // Trigger the close action, same as pressing the close button + } else { + QDialog::keyPressEvent(event); // Call the base class implementation for other keys + } +} + +void EditorDialog::onSaveClicked() { + if (isHelpOpen) { + helpDialog->close(); + isHelpOpen = false; + } + saveFile(gameComboBox->currentText()); + reject(); // Close the dialog +} + +void EditorDialog::onCancelClicked() { + if (isHelpOpen) { + helpDialog->close(); + isHelpOpen = false; + } + reject(); // Close the dialog +} + +void EditorDialog::onHelpClicked() { + if (!isHelpOpen) { + helpDialog = new HelpDialog(&isHelpOpen, this); + helpDialog->setWindowTitle(tr("Help")); + helpDialog->setAttribute(Qt::WA_DeleteOnClose); // Clean up on close + // Get the position and size of the Config window + QRect configGeometry = this->geometry(); + int helpX = configGeometry.x() + configGeometry.width() + 10; // 10 pixels offset + int helpY = configGeometry.y(); + // Move the Help dialog to the right side of the Config window + helpDialog->move(helpX, helpY); + helpDialog->show(); + isHelpOpen = true; + } else { + helpDialog->close(); + isHelpOpen = false; + } +} + +void EditorDialog::onResetToDefaultClicked() { + bool default_default = gameComboBox->currentText() == "default"; + QString prompt = + default_default + ? tr("Do you want to reset your custom default config to the original default config?") + : tr("Do you want to reset this config to your custom default config?"); + QMessageBox::StandardButton reply = QMessageBox::question(this, tr("Reset to Default"), prompt, + QMessageBox::Yes | QMessageBox::No); + + if (reply == QMessageBox::Yes) { + if (default_default) { + const auto default_file = Config::GetFoolproofKbmConfigFile("default"); + std::filesystem::remove(default_file); + } + const auto config_file = Config::GetFoolproofKbmConfigFile("default"); + QFile file(config_file); + + if (file.open(QIODevice::ReadOnly | QIODevice::Text)) { + QTextStream in(&file); + editor->setPlainText(in.readAll()); + file.close(); + } else { + QMessageBox::warning(this, tr("Error"), tr("Could not open the file for reading")); + } + // saveFile(gameComboBox->currentText()); + } +} + +bool EditorDialog::hasUnsavedChanges() { + // Compare the current content with the original content to check if there are unsaved changes + return editor->toPlainText() != originalConfig; +} +void EditorDialog::loadInstalledGames() { + previous_game = "default"; + QStringList filePaths; + for (const auto& installLoc : Config::getGameInstallDirs()) { + QString installDir; + Common::FS::PathToQString(installDir, installLoc); + QDir parentFolder(installDir); + QFileInfoList fileList = parentFolder.entryInfoList(QDir::Dirs | QDir::NoDotAndDotDot); + for (const auto& fileInfo : fileList) { + if (fileInfo.isDir() && (!fileInfo.filePath().endsWith("-UPDATE") || + !fileInfo.filePath().endsWith("-patch"))) { + gameComboBox->addItem(fileInfo.fileName()); // Add game name to combo box + } + } + } +} +void EditorDialog::onGameSelectionChanged(const QString& game) { + saveFile(previous_game); + loadFile(gameComboBox->currentText()); // Reload file based on the selected game + previous_game = gameComboBox->currentText(); +} diff --git a/src/qt_gui/kbm_config_dialog.h b/src/qt_gui/kbm_config_dialog.h new file mode 100644 index 000000000..cc334b082 --- /dev/null +++ b/src/qt_gui/kbm_config_dialog.h @@ -0,0 +1,38 @@ +// SPDX-FileCopyrightText: Copyright 2024 shadPS4 Emulator Project +// SPDX-License-Identifier: GPL-2.0-or-later + +#pragma once + +#include +#include +#include +#include "string" + +class EditorDialog : public QDialog { +Q_OBJECT // Necessary for using Qt's meta-object system (signals/slots) + public : explicit EditorDialog(QWidget* parent = nullptr); // Constructor + +protected: + void closeEvent(QCloseEvent* event) override; // Override close event + void keyPressEvent(QKeyEvent* event) override; + +private: + QPlainTextEdit* editor; // Editor widget for the config file + QFont editorFont; // To handle the text size + QString originalConfig; // Starting config string + std::string gameId; + + QComboBox* gameComboBox; // Combo box for selecting game configurations + + void loadFile(QString game); // Function to load the config file + void saveFile(QString game); // Function to save the config file + void loadInstalledGames(); // Helper to populate gameComboBox + bool hasUnsavedChanges(); // Checks for unsaved changes + +private slots: + void onSaveClicked(); // Save button slot + void onCancelClicked(); // Slot for handling cancel button + void onHelpClicked(); // Slot for handling help button + void onResetToDefaultClicked(); + void onGameSelectionChanged(const QString& game); // Slot for game selection changes +}; diff --git a/src/qt_gui/kbm_gui.cpp b/src/qt_gui/kbm_gui.cpp new file mode 100644 index 000000000..8777dda95 --- /dev/null +++ b/src/qt_gui/kbm_gui.cpp @@ -0,0 +1,1050 @@ +// SPDX-FileCopyrightText: Copyright 2024 shadPS4 Emulator Project +// SPDX-License-Identifier: GPL-2.0-or-later + +#include +#include +#include +#include +#include +#include + +#include "common/path_util.h" +#include "kbm_config_dialog.h" +#include "kbm_gui.h" +#include "kbm_help_dialog.h" +#include "ui_kbm_gui.h" + +HelpDialog* HelpWindow; +KBMSettings::KBMSettings(std::shared_ptr game_info_get, QWidget* parent) + : QDialog(parent), m_game_info(game_info_get), ui(new Ui::KBMSettings) { + + ui->setupUi(this); + ui->PerGameCheckBox->setChecked(!Config::GetUseUnifiedInputConfig()); + ui->TextEditorButton->setFocus(); + this->setFocusPolicy(Qt::StrongFocus); + + ui->MouseJoystickBox->addItem("none"); + ui->MouseJoystickBox->addItem("right"); + ui->MouseJoystickBox->addItem("left"); + + ui->ProfileComboBox->addItem("Common Config"); + for (int i = 0; i < m_game_info->m_games.size(); i++) { + ui->ProfileComboBox->addItem(QString::fromStdString(m_game_info->m_games[i].serial)); + } + + ButtonsList = { + ui->CrossButton, ui->CircleButton, ui->TriangleButton, ui->SquareButton, + ui->L1Button, ui->R1Button, ui->L2Button, ui->R2Button, + ui->L3Button, ui->R3Button, ui->TouchpadButton, ui->OptionsButton, + ui->TouchpadButton, ui->DpadUpButton, ui->DpadDownButton, ui->DpadLeftButton, + ui->DpadRightButton, ui->LStickUpButton, ui->LStickDownButton, ui->LStickLeftButton, + ui->LStickRightButton, ui->RStickUpButton, ui->RStickDownButton, ui->RStickLeftButton, + ui->RStickRightButton, ui->LHalfButton, ui->RHalfButton}; + + ButtonConnects(); + SetUIValuestoMappings("default"); + installEventFilter(this); + + ui->ProfileComboBox->setCurrentText("Common Config"); + ui->TitleLabel->setText("Common Config"); + config_id = "default"; + + connect(ui->buttonBox, &QDialogButtonBox::clicked, this, [this](QAbstractButton* button) { + if (button == ui->buttonBox->button(QDialogButtonBox::Save)) { + if (HelpWindowOpen) { + HelpWindow->close(); + HelpWindowOpen = false; + } + SaveKBMConfig(true); + } else if (button == ui->buttonBox->button(QDialogButtonBox::RestoreDefaults)) { + SetDefault(); + } else if (button == ui->buttonBox->button(QDialogButtonBox::Apply)) { + SaveKBMConfig(false); + } + }); + + ui->buttonBox->button(QDialogButtonBox::Save)->setText(tr("Save")); + ui->buttonBox->button(QDialogButtonBox::Apply)->setText(tr("Apply")); + ui->buttonBox->button(QDialogButtonBox::RestoreDefaults)->setText(tr("Restore Defaults")); + ui->buttonBox->button(QDialogButtonBox::Cancel)->setText(tr("Cancel")); + + connect(ui->HelpButton, &QPushButton::clicked, this, &KBMSettings::onHelpClicked); + connect(ui->TextEditorButton, &QPushButton::clicked, this, [this]() { + auto kbmWindow = new EditorDialog(this); + kbmWindow->exec(); + SetUIValuestoMappings(config_id); + }); + + connect(ui->buttonBox, &QDialogButtonBox::rejected, this, [this] { + QWidget::close(); + if (HelpWindowOpen) { + HelpWindow->close(); + HelpWindowOpen = false; + } + }); + + connect(ui->ProfileComboBox, &QComboBox::currentTextChanged, this, [this] { + GetGameTitle(); + SetUIValuestoMappings(config_id); + }); + + connect(ui->CopyCommonButton, &QPushButton::clicked, this, [this] { + if (ui->ProfileComboBox->currentText() == "Common Config") { + QMessageBox::information(this, tr("Common Config Selected"), + // clang-format off +tr("This button copies mappings from the Common Config to the currently selected profile, and cannot be used when the currently selected profile is the Common Config.")); + // clang-format on + } else { + QMessageBox::StandardButton reply = + QMessageBox::question(this, tr("Copy values from Common Config"), + // clang-format off +tr("Do you want to overwrite existing mappings with the mappings from the Common Config?"), + // clang-format on + QMessageBox::Yes | QMessageBox::No); + if (reply == QMessageBox::Yes) { + SetUIValuestoMappings("default"); + } + } + }); + + connect(ui->DeadzoneOffsetSlider, &QSlider::valueChanged, this, [this](int value) { + QString DOSValue = QString::number(value / 100.0, 'f', 2); + QString DOSString = tr("Deadzone Offset (def 0.50):") + " " + DOSValue; + ui->DeadzoneOffsetLabel->setText(DOSString); + }); + + connect(ui->SpeedMultiplierSlider, &QSlider::valueChanged, this, [this](int value) { + QString SMSValue = QString::number(value / 10.0, 'f', 1); + QString SMSString = tr("Speed Multiplier (def 1.0):") + " " + SMSValue; + ui->SpeedMultiplierLabel->setText(SMSString); + }); + + connect(ui->SpeedOffsetSlider, &QSlider::valueChanged, this, [this](int value) { + QString SOSValue = QString::number(value / 1000.0, 'f', 3); + QString SOSString = tr("Speed Offset (def 0.125):") + " " + SOSValue; + ui->SpeedOffsetLabel->setText(SOSString); + }); +} + +void KBMSettings::ButtonConnects() { + connect(ui->CrossButton, &QPushButton::clicked, this, + [this]() { StartTimer(ui->CrossButton); }); + connect(ui->CircleButton, &QPushButton::clicked, this, + [this]() { StartTimer(ui->CircleButton); }); + connect(ui->TriangleButton, &QPushButton::clicked, this, + [this]() { StartTimer(ui->TriangleButton); }); + connect(ui->SquareButton, &QPushButton::clicked, this, + [this]() { StartTimer(ui->SquareButton); }); + + connect(ui->L1Button, &QPushButton::clicked, this, [this]() { StartTimer(ui->L1Button); }); + connect(ui->L2Button, &QPushButton::clicked, this, [this]() { StartTimer(ui->L2Button); }); + connect(ui->L3Button, &QPushButton::clicked, this, [this]() { StartTimer(ui->L3Button); }); + connect(ui->R1Button, &QPushButton::clicked, this, [this]() { StartTimer(ui->R1Button); }); + connect(ui->R2Button, &QPushButton::clicked, this, [this]() { StartTimer(ui->R2Button); }); + connect(ui->R3Button, &QPushButton::clicked, this, [this]() { StartTimer(ui->R3Button); }); + + connect(ui->TouchpadButton, &QPushButton::clicked, this, + [this]() { StartTimer(ui->TouchpadButton); }); + connect(ui->OptionsButton, &QPushButton::clicked, this, + [this]() { StartTimer(ui->OptionsButton); }); + + connect(ui->DpadUpButton, &QPushButton::clicked, this, + [this]() { StartTimer(ui->DpadUpButton); }); + connect(ui->DpadDownButton, &QPushButton::clicked, this, + [this]() { StartTimer(ui->DpadDownButton); }); + connect(ui->DpadLeftButton, &QPushButton::clicked, this, + [this]() { StartTimer(ui->DpadLeftButton); }); + connect(ui->DpadRightButton, &QPushButton::clicked, this, + [this]() { StartTimer(ui->DpadRightButton); }); + + connect(ui->LStickUpButton, &QPushButton::clicked, this, + [this]() { StartTimer(ui->LStickUpButton); }); + connect(ui->LStickDownButton, &QPushButton::clicked, this, + [this]() { StartTimer(ui->LStickDownButton); }); + connect(ui->LStickLeftButton, &QPushButton::clicked, this, + [this]() { StartTimer(ui->LStickLeftButton); }); + connect(ui->LStickRightButton, &QPushButton::clicked, this, + [this]() { StartTimer(ui->LStickRightButton); }); + + connect(ui->RStickUpButton, &QPushButton::clicked, this, + [this]() { StartTimer(ui->RStickUpButton); }); + connect(ui->RStickDownButton, &QPushButton::clicked, this, + [this]() { StartTimer(ui->RStickDownButton); }); + connect(ui->RStickLeftButton, &QPushButton::clicked, this, + [this]() { StartTimer(ui->RStickLeftButton); }); + connect(ui->RStickRightButton, &QPushButton::clicked, this, + [this]() { StartTimer(ui->RStickRightButton); }); + + connect(ui->LHalfButton, &QPushButton::clicked, this, + [this]() { StartTimer(ui->LHalfButton); }); + connect(ui->RHalfButton, &QPushButton::clicked, this, + [this]() { StartTimer(ui->RHalfButton); }); +} + +void KBMSettings::DisableMappingButtons() { + for (const auto& i : ButtonsList) { + i->setEnabled(false); + } +} + +void KBMSettings::EnableMappingButtons() { + for (const auto& i : ButtonsList) { + i->setEnabled(true); + } +} + +void KBMSettings::SaveKBMConfig(bool CloseOnSave) { + std::string output_string = "", input_string = ""; + std::vector lines, inputs; + + lines.push_back("#Feeling lost? Check out the Help section!"); + lines.push_back(""); + lines.push_back("#Keyboard bindings"); + lines.push_back(""); + + input_string = ui->CrossButton->text().toStdString(); + output_string = "cross"; + lines.push_back(output_string + " = " + input_string); + if (input_string != "unmapped") + inputs.push_back(input_string); + + input_string = ui->CircleButton->text().toStdString(); + output_string = "circle"; + lines.push_back(output_string + " = " + input_string); + if (input_string != "unmapped") + inputs.push_back(input_string); + + input_string = ui->TriangleButton->text().toStdString(); + output_string = "triangle"; + lines.push_back(output_string + " = " + input_string); + if (input_string != "unmapped") + inputs.push_back(input_string); + + input_string = ui->SquareButton->text().toStdString(); + output_string = "square"; + lines.push_back(output_string + " = " + input_string); + if (input_string != "unmapped") + inputs.push_back(input_string); + + lines.push_back(""); + + input_string = ui->DpadUpButton->text().toStdString(); + output_string = "pad_up"; + lines.push_back(output_string + " = " + input_string); + if (input_string != "unmapped") + inputs.push_back(input_string); + + input_string = ui->DpadDownButton->text().toStdString(); + output_string = "pad_down"; + lines.push_back(output_string + " = " + input_string); + if (input_string != "unmapped") + inputs.push_back(input_string); + + input_string = ui->DpadLeftButton->text().toStdString(); + output_string = "pad_left"; + lines.push_back(output_string + " = " + input_string); + if (input_string != "unmapped") + inputs.push_back(input_string); + + input_string = ui->DpadRightButton->text().toStdString(); + output_string = "pad_right"; + lines.push_back(output_string + " = " + input_string); + if (input_string != "unmapped") + inputs.push_back(input_string); + + lines.push_back(""); + + input_string = ui->L1Button->text().toStdString(); + output_string = "l1"; + lines.push_back(output_string + " = " + input_string); + if (input_string != "unmapped") + inputs.push_back(input_string); + + input_string = ui->R1Button->text().toStdString(); + output_string = "r1"; + lines.push_back(output_string + " = " + input_string); + if (input_string != "unmapped") + inputs.push_back(input_string); + + input_string = ui->L2Button->text().toStdString(); + output_string = "l2"; + lines.push_back(output_string + " = " + input_string); + if (input_string != "unmapped") + inputs.push_back(input_string); + + input_string = ui->R2Button->text().toStdString(); + output_string = "r2"; + lines.push_back(output_string + " = " + input_string); + if (input_string != "unmapped") + inputs.push_back(input_string); + + input_string = ui->L3Button->text().toStdString(); + output_string = "l3"; + lines.push_back(output_string + " = " + input_string); + if (input_string != "unmapped") + inputs.push_back(input_string); + + input_string = ui->R3Button->text().toStdString(); + output_string = "r3"; + lines.push_back(output_string + " = " + input_string); + if (input_string != "unmapped") + inputs.push_back(input_string); + + lines.push_back(""); + + input_string = ui->OptionsButton->text().toStdString(); + output_string = "options"; + lines.push_back(output_string + " = " + input_string); + if (input_string != "unmapped") + inputs.push_back(input_string); + + input_string = ui->TouchpadButton->text().toStdString(); + output_string = "touchpad"; + lines.push_back(output_string + " = " + input_string); + if (input_string != "unmapped") + inputs.push_back(input_string); + + lines.push_back(""); + + input_string = ui->LStickUpButton->text().toStdString(); + output_string = "axis_left_y_minus"; + lines.push_back(output_string + " = " + input_string); + if (input_string != "unmapped") + inputs.push_back(input_string); + + input_string = ui->LStickDownButton->text().toStdString(); + output_string = "axis_left_y_plus"; + lines.push_back(output_string + " = " + input_string); + if (input_string != "unmapped") + inputs.push_back(input_string); + + input_string = ui->LStickLeftButton->text().toStdString(); + output_string = "axis_left_x_minus"; + lines.push_back(output_string + " = " + input_string); + if (input_string != "unmapped") + inputs.push_back(input_string); + + input_string = ui->LStickRightButton->text().toStdString(); + output_string = "axis_left_x_plus"; + lines.push_back(output_string + " = " + input_string); + if (input_string != "unmapped") + inputs.push_back(input_string); + + lines.push_back(""); + + input_string = ui->RStickUpButton->text().toStdString(); + output_string = "axis_right_y_minus"; + lines.push_back(output_string + " = " + input_string); + if (input_string != "unmapped") + inputs.push_back(input_string); + + input_string = ui->RStickDownButton->text().toStdString(); + output_string = "axis_right_y_plus"; + lines.push_back(output_string + " = " + input_string); + if (input_string != "unmapped") + inputs.push_back(input_string); + + input_string = ui->RStickLeftButton->text().toStdString(); + output_string = "axis_right_x_minus"; + lines.push_back(output_string + " = " + input_string); + if (input_string != "unmapped") + inputs.push_back(input_string); + + input_string = ui->RStickRightButton->text().toStdString(); + output_string = "axis_right_x_plus"; + lines.push_back(output_string + " = " + input_string); + if (input_string != "unmapped") + inputs.push_back(input_string); + + lines.push_back(""); + + input_string = ui->MouseJoystickBox->currentText().toStdString(); + output_string = "mouse_to_joystick"; + if (input_string != "unmapped") + lines.push_back(output_string + " = " + input_string); + + input_string = ui->LHalfButton->text().toStdString(); + output_string = "leftjoystick_halfmode"; + lines.push_back(output_string + " = " + input_string); + if (input_string != "unmapped") + inputs.push_back(input_string); + + input_string = ui->RHalfButton->text().toStdString(); + output_string = "rightjoystick_halfmode"; + lines.push_back(output_string + " = " + input_string); + if (input_string != "unmapped") + inputs.push_back(input_string); + + std::string DOString = std::format("{:.2f}", (ui->DeadzoneOffsetSlider->value() / 100.f)); + std::string SMString = std::format("{:.1f}", (ui->SpeedMultiplierSlider->value() / 10.f)); + std::string SOString = std::format("{:.3f}", (ui->SpeedOffsetSlider->value() / 1000.f)); + input_string = DOString + ", " + SMString + ", " + SOString; + output_string = "mouse_movement_params"; + lines.push_back(output_string + " = " + input_string); + + lines.push_back(""); + const auto config_file = Config::GetFoolproofKbmConfigFile(config_id); + std::fstream file(config_file); + int lineCount = 0; + std::string line; + while (std::getline(file, line)) { + lineCount++; + + if (line.empty()) { + lines.push_back(line); + continue; + } + + std::size_t comment_pos = line.find('#'); + if (comment_pos != std::string::npos) { + if (!line.contains("Keyboard bindings") && !line.contains("Feeling lost") && + !line.contains("Alternatives for users")) + lines.push_back(line); + continue; + } + + std::size_t equal_pos = line.find('='); + if (equal_pos == std::string::npos) { + lines.push_back(line); + continue; + } + + output_string = line.substr(0, equal_pos - 1); + input_string = line.substr(equal_pos + 2); + + if (std::find(ControllerInputs.begin(), ControllerInputs.end(), input_string) != + ControllerInputs.end() || + output_string == "analog_deadzone" || output_string == "override_controller_color") { + lines.push_back(line); + } + } + file.close(); + + // Prevent duplicate inputs for KBM as this breaks the engine + for (auto it = inputs.begin(); it != inputs.end(); ++it) { + if (std::find(it + 1, inputs.end(), *it) != inputs.end()) { + QMessageBox::information(this, tr("Unable to Save"), + tr("Cannot bind any unique input more than once")); + return; + } + } + + std::vector save; + bool CurrentLineEmpty = false, LastLineEmpty = false; + for (auto const& line : lines) { + LastLineEmpty = CurrentLineEmpty ? true : false; + CurrentLineEmpty = line.empty() ? true : false; + if (!CurrentLineEmpty || !LastLineEmpty) + save.push_back(line); + } + + std::ofstream output_file(config_file); + for (auto const& line : save) { + output_file << line << '\n'; + } + output_file.close(); + + Config::SetUseUnifiedInputConfig(!ui->PerGameCheckBox->isChecked()); + Config::save(Common::FS::GetUserPath(Common::FS::PathType::UserDir) / "config.toml"); + + if (CloseOnSave) + QWidget::close(); +} + +void KBMSettings::SetDefault() { + ui->CrossButton->setText("kp2"); + ui->CircleButton->setText("kp6"); + ui->TriangleButton->setText("kp8"); + ui->SquareButton->setText("kp4"); + + ui->L1Button->setText("q"); + ui->L2Button->setText("e"); + ui->L3Button->setText("x"); + ui->R1Button->setText("u"); + ui->R2Button->setText("o"); + ui->R3Button->setText("m"); + + ui->TouchpadButton->setText("space"); + ui->OptionsButton->setText("enter"); + + ui->DpadUpButton->setText("up"); + ui->DpadDownButton->setText("down"); + ui->DpadLeftButton->setText("left"); + ui->DpadRightButton->setText("right"); + + ui->LStickUpButton->setText("w"); + ui->LStickDownButton->setText("s"); + ui->LStickLeftButton->setText("a"); + ui->LStickRightButton->setText("d"); + + ui->RStickUpButton->setText("i"); + ui->RStickDownButton->setText("k"); + ui->RStickLeftButton->setText("j"); + ui->RStickRightButton->setText("l"); + + ui->LHalfButton->setText("unmapped"); + ui->RHalfButton->setText("unmapped"); + + ui->MouseJoystickBox->setCurrentText("none"); + ui->DeadzoneOffsetSlider->setValue(50); + ui->SpeedMultiplierSlider->setValue(10); + ui->SpeedOffsetSlider->setValue(125); +} + +void KBMSettings::SetUIValuestoMappings(std::string config_id) { + const auto config_file = Config::GetFoolproofKbmConfigFile(config_id); + std::ifstream file(config_file); + + int lineCount = 0; + std::string line = ""; + while (std::getline(file, line)) { + lineCount++; + + std::size_t comment_pos = line.find('#'); + if (comment_pos != std::string::npos) + line = line.substr(0, comment_pos); + + std::size_t equal_pos = line.find('='); + if (equal_pos == std::string::npos) + continue; + + std::string output_string = line.substr(0, equal_pos - 1); + std::string input_string = line.substr(equal_pos + 2); + + if (std::find(ControllerInputs.begin(), ControllerInputs.end(), input_string) == + ControllerInputs.end()) { + + if (output_string == "cross") { + ui->CrossButton->setText(QString::fromStdString(input_string)); + } else if (output_string == "circle") { + ui->CircleButton->setText(QString::fromStdString(input_string)); + } else if (output_string == "square") { + ui->SquareButton->setText(QString::fromStdString(input_string)); + } else if (output_string == "triangle") { + ui->TriangleButton->setText(QString::fromStdString(input_string)); + } else if (output_string == "l1") { + ui->L1Button->setText(QString::fromStdString(input_string)); + } else if (output_string == "l2") { + ui->L2Button->setText(QString::fromStdString(input_string)); + } else if (output_string == "r1") { + ui->R1Button->setText(QString::fromStdString(input_string)); + } else if (output_string == "r2") { + ui->R2Button->setText(QString::fromStdString(input_string)); + } else if (output_string == "l3") { + ui->L3Button->setText(QString::fromStdString(input_string)); + } else if (output_string == "r3") { + ui->R3Button->setText(QString::fromStdString(input_string)); + } else if (output_string == "pad_up") { + ui->DpadUpButton->setText(QString::fromStdString(input_string)); + } else if (output_string == "pad_down") { + ui->DpadDownButton->setText(QString::fromStdString(input_string)); + } else if (output_string == "pad_left") { + ui->DpadLeftButton->setText(QString::fromStdString(input_string)); + } else if (output_string == "pad_right") { + ui->DpadRightButton->setText(QString::fromStdString(input_string)); + } else if (output_string == "options") { + ui->OptionsButton->setText(QString::fromStdString(input_string)); + } else if (output_string == "touchpad") { + ui->TouchpadButton->setText(QString::fromStdString(input_string)); + } else if (output_string == "axis_left_x_minus") { + ui->LStickLeftButton->setText(QString::fromStdString(input_string)); + } else if (output_string == "axis_left_x_plus") { + ui->LStickRightButton->setText(QString::fromStdString(input_string)); + } else if (output_string == "axis_left_y_minus") { + ui->LStickUpButton->setText(QString::fromStdString(input_string)); + } else if (output_string == "axis_left_y_plus") { + ui->LStickDownButton->setText(QString::fromStdString(input_string)); + } else if (output_string == "axis_right_x_minus") { + ui->RStickLeftButton->setText(QString::fromStdString(input_string)); + } else if (output_string == "axis_right_x_plus") { + ui->RStickRightButton->setText(QString::fromStdString(input_string)); + } else if (output_string == "axis_right_y_minus") { + ui->RStickUpButton->setText(QString::fromStdString(input_string)); + } else if (output_string == "axis_right_y_plus") { + ui->RStickDownButton->setText(QString::fromStdString(input_string)); + } else if (output_string == "mouse_to_joystick") { + ui->MouseJoystickBox->setCurrentText(QString::fromStdString(input_string)); + } else if (output_string == "leftjoystick_halfmode") { + ui->LHalfButton->setText(QString::fromStdString(input_string)); + } else if (output_string == "rightjoystick_halfmode") { + ui->RHalfButton->setText(QString::fromStdString(input_string)); + } else if (output_string.contains("mouse_movement_params")) { + std::size_t comma_pos = line.find(','); + if (comma_pos != std::string::npos) { + std::string DOstring = line.substr(equal_pos + 1, comma_pos); + float DOffsetValue = std::stof(DOstring) * 100.0; + int DOffsetInt = int(DOffsetValue); + ui->DeadzoneOffsetSlider->setValue(DOffsetInt); + QString LabelValue = QString::number(DOffsetInt / 100.0, 'f', 2); + QString LabelString = tr("Deadzone Offset (def 0.50):") + " " + LabelValue; + ui->DeadzoneOffsetLabel->setText(LabelString); + + std::string SMSOstring = line.substr(comma_pos + 1); + std::size_t comma_pos2 = SMSOstring.find(','); + if (comma_pos2 != std::string::npos) { + std::string SMstring = SMSOstring.substr(0, comma_pos2); + float SpeedMultValue = std::stof(SMstring) * 10.0; + int SpeedMultInt = int(SpeedMultValue); + if (SpeedMultInt < 1) + SpeedMultInt = 1; + if (SpeedMultInt > 50) + SpeedMultInt = 50; + ui->SpeedMultiplierSlider->setValue(SpeedMultInt); + LabelValue = QString::number(SpeedMultInt / 10.0, 'f', 1); + LabelString = tr("Speed Multiplier (def 1.0):") + " " + LabelValue; + ui->SpeedMultiplierLabel->setText(LabelString); + + std::string SOstring = SMSOstring.substr(comma_pos2 + 1); + float SOffsetValue = std::stof(SOstring) * 1000.0; + int SOffsetInt = int(SOffsetValue); + ui->SpeedOffsetSlider->setValue(SOffsetInt); + LabelValue = QString::number(SOffsetInt / 1000.0, 'f', 3); + LabelString = tr("Speed Offset (def 0.125):") + " " + LabelValue; + ui->SpeedOffsetLabel->setText(LabelString); + } + } + } + } + } + file.close(); +} + +void KBMSettings::GetGameTitle() { + if (ui->ProfileComboBox->currentText() == "Common Config") { + ui->TitleLabel->setText("Common Config"); + } else { + for (int i = 0; i < m_game_info->m_games.size(); i++) { + if (m_game_info->m_games[i].serial == + ui->ProfileComboBox->currentText().toStdString()) { + ui->TitleLabel->setText(QString::fromStdString(m_game_info->m_games[i].name)); + } + } + } + config_id = (ui->ProfileComboBox->currentText() == "Common Config") + ? "default" + : ui->ProfileComboBox->currentText().toStdString(); +} + +void KBMSettings::onHelpClicked() { + if (!HelpWindowOpen) { + HelpWindow = new HelpDialog(&HelpWindowOpen, this); + HelpWindow->setWindowTitle(tr("Help")); + HelpWindow->setAttribute(Qt::WA_DeleteOnClose); // Clean up on close + HelpWindow->show(); + HelpWindowOpen = true; + } else { + HelpWindow->close(); + HelpWindowOpen = false; + } +} + +void KBMSettings::StartTimer(QPushButton*& button) { + MappingTimer = 3; + EnableMapping = true; + MappingCompleted = false; + modifier = ""; + mapping = button->text(); + + DisableMappingButtons(); + button->setText(tr("Press a key") + " [" + QString::number(MappingTimer) + "]"); + timer = new QTimer(this); + MappingButton = button; + connect(timer, &QTimer::timeout, this, [this]() { CheckMapping(MappingButton); }); + timer->start(1000); +} + +void KBMSettings::CheckMapping(QPushButton*& button) { + MappingTimer -= 1; + button->setText(tr("Press a key") + " [" + QString::number(MappingTimer) + "]"); + + if (MappingCompleted) { + EnableMapping = false; + EnableMappingButtons(); + timer->stop(); + + if (mapping == "lshift" || mapping == "lalt" || mapping == "lctrl" || mapping == "lmeta" || + mapping == "lwin") { + modifier = ""; + } + + if (modifier != "") { + button->setText(modifier + ", " + mapping); + } else { + button->setText(mapping); + } + } + + if (MappingTimer <= 0) { + button->setText(mapping); + EnableMapping = false; + EnableMappingButtons(); + timer->stop(); + } +} + +void KBMSettings::SetMapping(QString input) { + mapping = input; + MappingCompleted = true; +} + +bool KBMSettings::eventFilter(QObject* obj, QEvent* event) { + if (event->type() == QEvent::Close) { + if (HelpWindowOpen) { + HelpWindow->close(); + HelpWindowOpen = false; + } + } + + if (EnableMapping) { + if (Qt::ShiftModifier & QApplication::keyboardModifiers()) { + modifier = "lshift"; + } else if (Qt::AltModifier & QApplication::keyboardModifiers()) { + modifier = "lalt"; + } else if (Qt::ControlModifier & QApplication::keyboardModifiers()) { + modifier = "lctrl"; + } else if (Qt::MetaModifier & QApplication::keyboardModifiers()) { +#ifdef _WIN32 + modifier = "lwin"; +#else + modifier = "lmeta"; +#endif + } + + if (event->type() == QEvent::KeyPress) { + QKeyEvent* keyEvent = static_cast(event); + + switch (keyEvent->key()) { + case Qt::Key_Space: + SetMapping("space"); + break; + case Qt::Key_Comma: + if (Qt::KeypadModifier & QApplication::keyboardModifiers()) { + SetMapping("kpcomma"); + } else { + SetMapping("comma"); + } + break; + case Qt::Key_Period: + if (Qt::KeypadModifier & QApplication::keyboardModifiers()) { + SetMapping("kpperiod"); + } else { + SetMapping("period"); + } + break; + case Qt::Key_Slash: + if (Qt::KeypadModifier & QApplication::keyboardModifiers()) + SetMapping("kpdivide"); + break; + case Qt::Key_Asterisk: + if (Qt::KeypadModifier & QApplication::keyboardModifiers()) + SetMapping("kpmultiply"); + break; + case Qt::Key_Question: + SetMapping("question"); + break; + case Qt::Key_Semicolon: + SetMapping("semicolon"); + break; + case Qt::Key_Minus: + if (Qt::KeypadModifier & QApplication::keyboardModifiers()) { + SetMapping("kpminus"); + } else { + SetMapping("minus"); + } + break; + case Qt::Key_Plus: + if (Qt::KeypadModifier & QApplication::keyboardModifiers()) { + SetMapping("kpplus"); + } else { + SetMapping("plus"); + } + break; + case Qt::Key_ParenLeft: + SetMapping("lparenthesis"); + break; + case Qt::Key_ParenRight: + SetMapping("rparenthesis"); + break; + case Qt::Key_BracketLeft: + SetMapping("lbracket"); + break; + case Qt::Key_BracketRight: + SetMapping("rbracket"); + break; + case Qt::Key_BraceLeft: + SetMapping("lbrace"); + break; + case Qt::Key_BraceRight: + SetMapping("rbrace"); + break; + case Qt::Key_Backslash: + SetMapping("backslash"); + break; + case Qt::Key_Tab: + SetMapping("tab"); + break; + case Qt::Key_Backspace: + SetMapping("backspace"); + break; + case Qt::Key_Return: + SetMapping("enter"); + break; + case Qt::Key_Enter: + SetMapping("kpenter"); + break; + case Qt::Key_Escape: + SetMapping("unmapped"); + break; + case Qt::Key_Shift: + SetMapping("lshift"); + break; + case Qt::Key_Alt: + SetMapping("lalt"); + break; + case Qt::Key_Control: + SetMapping("lctrl"); + break; + case Qt::Key_Meta: + activateWindow(); +#ifdef _WIN32 + SetMapping("lwin"); +#else + SetMapping("lmeta"); +#endif + case Qt::Key_1: + if (Qt::KeypadModifier & QApplication::keyboardModifiers()) { + SetMapping("kp1"); + } else { + SetMapping("1"); + } + break; + case Qt::Key_2: + if (Qt::KeypadModifier & QApplication::keyboardModifiers()) { + SetMapping("kp2"); + } else { + SetMapping("2"); + } + break; + case Qt::Key_3: + if (Qt::KeypadModifier & QApplication::keyboardModifiers()) { + SetMapping("kp3"); + } else { + SetMapping("3"); + } + break; + case Qt::Key_4: + if (Qt::KeypadModifier & QApplication::keyboardModifiers()) { + SetMapping("kp4"); + } else { + SetMapping("4"); + } + break; + case Qt::Key_5: + if (Qt::KeypadModifier & QApplication::keyboardModifiers()) { + SetMapping("kp5"); + } else { + SetMapping("5"); + } + break; + case Qt::Key_6: + if (Qt::KeypadModifier & QApplication::keyboardModifiers()) { + SetMapping("kp6"); + } else { + SetMapping("6"); + } + break; + case Qt::Key_7: + if (Qt::KeypadModifier & QApplication::keyboardModifiers()) { + SetMapping("kp7"); + } else { + SetMapping("7"); + } + break; + case Qt::Key_8: + if (Qt::KeypadModifier & QApplication::keyboardModifiers()) { + SetMapping("kp8"); + } else { + SetMapping("8"); + } + break; + case Qt::Key_9: + if (Qt::KeypadModifier & QApplication::keyboardModifiers()) { + SetMapping("kp9"); + } else { + SetMapping("9"); + } + break; + case Qt::Key_0: + if (Qt::KeypadModifier & QApplication::keyboardModifiers()) { + SetMapping("kp0"); + } else { + SetMapping("0"); + } + break; + case Qt::Key_Up: + activateWindow(); + SetMapping("up"); + break; + case Qt::Key_Down: + SetMapping("down"); + break; + case Qt::Key_Left: + SetMapping("left"); + break; + case Qt::Key_Right: + SetMapping("right"); + break; + case Qt::Key_A: + SetMapping("a"); + break; + case Qt::Key_B: + SetMapping("b"); + break; + case Qt::Key_C: + SetMapping("c"); + break; + case Qt::Key_D: + SetMapping("d"); + break; + case Qt::Key_E: + SetMapping("e"); + break; + case Qt::Key_F: + SetMapping("f"); + break; + case Qt::Key_G: + SetMapping("g"); + break; + case Qt::Key_H: + SetMapping("h"); + break; + case Qt::Key_I: + SetMapping("i"); + break; + case Qt::Key_J: + SetMapping("j"); + break; + case Qt::Key_K: + SetMapping("k"); + break; + case Qt::Key_L: + SetMapping("l"); + break; + case Qt::Key_M: + SetMapping("m"); + break; + case Qt::Key_N: + SetMapping("n"); + break; + case Qt::Key_O: + SetMapping("o"); + break; + case Qt::Key_P: + SetMapping("p"); + break; + case Qt::Key_Q: + SetMapping("q"); + break; + case Qt::Key_R: + SetMapping("r"); + break; + case Qt::Key_S: + SetMapping("s"); + break; + case Qt::Key_T: + SetMapping("t"); + break; + case Qt::Key_U: + SetMapping("u"); + break; + case Qt::Key_V: + SetMapping("v"); + break; + case Qt::Key_W: + SetMapping("w"); + break; + case Qt::Key_X: + SetMapping("x"); + break; + case Qt::Key_Y: + SetMapping("Y"); + break; + case Qt::Key_Z: + SetMapping("z"); + break; + default: + break; + } + return true; + } + + if (event->type() == QEvent::MouseButtonPress) { + QMouseEvent* mouseEvent = static_cast(event); + switch (mouseEvent->button()) { + case Qt::LeftButton: + SetMapping("leftbutton"); + break; + case Qt::RightButton: + SetMapping("rightbutton"); + break; + case Qt::MiddleButton: + SetMapping("middlebutton"); + break; + default: + break; + } + return true; + } + + const QList AxisList = { + ui->LStickUpButton, ui->LStickDownButton, ui->LStickLeftButton, ui->LStickRightButton, + ui->RStickUpButton, ui->LStickDownButton, ui->LStickLeftButton, ui->RStickRightButton}; + + if (event->type() == QEvent::Wheel) { + QWheelEvent* wheelEvent = static_cast(event); + if (wheelEvent->angleDelta().y() > 5) { + if (std::find(AxisList.begin(), AxisList.end(), MappingButton) == AxisList.end()) { + SetMapping("mousewheelup"); + } else { + QMessageBox::information(this, tr("Cannot set mapping"), + tr("Mousewheel cannot be mapped to stick outputs")); + } + } else if (wheelEvent->angleDelta().y() < -5) { + if (std::find(AxisList.begin(), AxisList.end(), MappingButton) == AxisList.end()) { + SetMapping("mousewheeldown"); + } else { + QMessageBox::information(this, tr("Cannot set mapping"), + tr("Mousewheel cannot be mapped to stick outputs")); + } + } + if (wheelEvent->angleDelta().x() > 5) { + if (std::find(AxisList.begin(), AxisList.end(), MappingButton) == AxisList.end()) { + // QT changes scrolling to horizontal for all widgets with the alt modifier + if (Qt::AltModifier & QApplication::keyboardModifiers()) { + SetMapping("mousewheelup"); + } else { + SetMapping("mousewheelright"); + } + } else { + QMessageBox::information(this, tr("Cannot set mapping"), + tr("Mousewheel cannot be mapped to stick outputs")); + } + } else if (wheelEvent->angleDelta().x() < -5) { + if (std::find(AxisList.begin(), AxisList.end(), MappingButton) == AxisList.end()) { + if (Qt::AltModifier & QApplication::keyboardModifiers()) { + SetMapping("mousewheeldown"); + } else { + SetMapping("mousewheelleft"); + } + } else { + QMessageBox::information(this, tr("Cannot set mapping"), + tr("Mousewheel cannot be mapped to stick outputs")); + } + } + return true; + } + } + return QDialog::eventFilter(obj, event); +} + +KBMSettings::~KBMSettings() {} diff --git a/src/qt_gui/kbm_gui.h b/src/qt_gui/kbm_gui.h new file mode 100644 index 000000000..06e58eef6 --- /dev/null +++ b/src/qt_gui/kbm_gui.h @@ -0,0 +1,56 @@ +// SPDX-FileCopyrightText: Copyright 2024 shadPS4 Emulator Project +// SPDX-License-Identifier: GPL-2.0-or-later + +#include +#include "game_info.h" + +namespace Ui { +class KBMSettings; +} + +class KBMSettings : public QDialog { + Q_OBJECT +public: + explicit KBMSettings(std::shared_ptr game_info_get, QWidget* parent = nullptr); + ~KBMSettings(); + +private Q_SLOTS: + void SaveKBMConfig(bool CloseOnSave); + void SetDefault(); + void CheckMapping(QPushButton*& button); + void StartTimer(QPushButton*& button); + void onHelpClicked(); + +private: + std::unique_ptr ui; + std::shared_ptr m_game_info; + + bool eventFilter(QObject* obj, QEvent* event) override; + void ButtonConnects(); + void SetUIValuestoMappings(std::string config_id); + void GetGameTitle(); + void DisableMappingButtons(); + void EnableMappingButtons(); + void SetMapping(QString input); + + bool EnableMapping = false; + bool MappingCompleted = false; + bool HelpWindowOpen = false; + QString mapping; + QString modifier; + int MappingTimer; + QTimer* timer; + QPushButton* MappingButton; + QList ButtonsList; + std::string config_id; + const std::vector ControllerInputs = { + "cross", "circle", "square", "triangle", "l1", + "r1", "l2", "r2", "l3", + + "r3", "options", "pad_up", + + "pad_down", + + "pad_left", "pad_right", "axis_left_x", "axis_left_y", "axis_right_x", + "axis_right_y", "back"}; +}; diff --git a/src/qt_gui/kbm_gui.ui b/src/qt_gui/kbm_gui.ui new file mode 100644 index 000000000..c8d63cd00 --- /dev/null +++ b/src/qt_gui/kbm_gui.ui @@ -0,0 +1,1942 @@ + + + + KBMSettings + + + Qt::WindowModality::WindowModal + + + + 0 + 0 + 1234 + 796 + + + + + 0 + 0 + + + + Qt::FocusPolicy::StrongFocus + + + Configure Controls + + + true + + + + + + Qt::FocusPolicy::NoFocus + + + true + + + + + 0 + 0 + 1214 + 746 + + + + + + 0 + 0 + 1211 + 741 + + + + + + + 5 + + + + + true + + + + 0 + 0 + + + + + 16777215 + 16777215 + + + + D-Pad + + + + 6 + + + 5 + + + 5 + + + 5 + + + 5 + + + + + + 0 + + + 0 + + + 0 + + + 0 + + + 0 + + + + + + 160 + 0 + + + + + 0 + 16777215 + + + + Up + + + + + + Qt::FocusPolicy::NoFocus + + + unmapped + + + + + + + + + + + + + + + + 160 + 0 + + + + Left + + + + 5 + + + 5 + + + 5 + + + 5 + + + + + Qt::FocusPolicy::NoFocus + + + unmapped + + + + + + + + + + + 160 + 0 + + + + Right + + + + 5 + + + 5 + + + 5 + + + 5 + + + + + Qt::FocusPolicy::NoFocus + + + unmapped + + + + + + + + + + + + + 0 + + + 0 + + + 0 + + + 0 + + + + + + 160 + 0 + + + + + 124 + 16777215 + + + + Down + + + + + + Qt::FocusPolicy::NoFocus + + + unmapped + + + + + + + + + + + + + + + + Qt::Orientation::Vertical + + + QSizePolicy::Policy::Maximum + + + + 20 + 40 + + + + + + + + + 0 + 0 + + + + + 344 + 16777215 + + + + Left Analog Halfmode + + + + + + Qt::FocusPolicy::NoFocus + + + unmapped + + + + + + + + true + + + + hold to move left stick at half-speed + + + + + + + + + + + 0 + 0 + + + + + 0 + 0 + + + + Left Stick + + + + 5 + + + 5 + + + 5 + + + 5 + + + + + + 16777215 + 2121 + + + + + 0 + + + 0 + + + 0 + + + 0 + + + + + + 160 + 0 + + + + + 124 + 16777215 + + + + Up + + + + + + Qt::FocusPolicy::NoFocus + + + unmapped + + + + + + + + + + + + + + + + 160 + 0 + + + + Left + + + + 5 + + + 5 + + + 5 + + + 5 + + + + + Qt::FocusPolicy::NoFocus + + + unmapped + + + + + + + + + + + 160 + 0 + + + + + 179 + 16777215 + + + + Right + + + + 5 + + + 5 + + + 5 + + + 5 + + + + + Qt::FocusPolicy::NoFocus + + + unmapped + + + + + + + + + + + + + 0 + + + 0 + + + 0 + + + 0 + + + + + + 160 + 0 + + + + + 124 + 21212 + + + + Down + + + + + + Qt::FocusPolicy::NoFocus + + + unmapped + + + + + + + + + + + + + + + + + + 0 + + + + + + 0 + 0 + + + + + 0 + 0 + + + + + 12 + true + + + + Config Selection + + + Qt::AlignmentFlag::AlignCenter + + + + + + + + + 9 + false + + + + Qt::FocusPolicy::NoFocus + + + + + + -1 + + + Common Config + + + + + + + + 10 + true + + + + Common Config + + + Qt::AlignmentFlag::AlignCenter + + + true + + + + + + + + + + + + 0 + 0 + + + + + 9 + false + + + + Qt::FocusPolicy::NoFocus + + + Use per-game configs + + + + + + + + 9 + false + + + + Qt::FocusPolicy::NoFocus + + + Copy from Common Config + + + + + + + + + + + + 0 + + + + + + + + 0 + 0 + + + + + 160 + 0 + + + + L1 + + + + 5 + + + 5 + + + 5 + + + 5 + + + + + + 0 + 0 + + + + Qt::FocusPolicy::NoFocus + + + unmapped + + + + + + + + + + + 0 + 0 + + + + + 160 + 0 + + + + L2 + + + + 5 + + + 5 + + + 5 + + + 5 + + + + + + 0 + 0 + + + + Qt::FocusPolicy::NoFocus + + + unmapped + + + + + + + + + + + + + + + 0 + 0 + + + + + 0 + 0 + + + + + true + + + + + + + + + + + 0 + 0 + + + + Qt::FocusPolicy::NoFocus + + + Text Editor + + + + + + + + 0 + 0 + + + + Qt::FocusPolicy::NoFocus + + + Help + + + + + + + + + + + + + + + 0 + 0 + + + + + 160 + 0 + + + + R1 + + + + 5 + + + 5 + + + 5 + + + 5 + + + + + + 0 + 0 + + + + Qt::FocusPolicy::NoFocus + + + unmapped + + + + + + + + + + + 0 + 0 + + + + + 160 + 0 + + + + R2 + + + + 5 + + + 5 + + + 5 + + + 5 + + + + + + 0 + 0 + + + + Qt::FocusPolicy::NoFocus + + + unmapped + + + + + + + + + + + + + + + 0 + 200 + + + + + 0 + + + 0 + + + 0 + + + 0 + + + + + + 500 + 200 + + + + :/images/KBM.png + + + true + + + Qt::AlignmentFlag::AlignBottom|Qt::AlignmentFlag::AlignHCenter + + + + + + + + + + 0 + + + QLayout::SizeConstraint::SetDefaultConstraint + + + + + + + + 0 + 0 + + + + + 160 + 0 + + + + L3 + + + + 5 + + + 5 + + + 5 + + + 5 + + + + + + 0 + 0 + + + + Qt::FocusPolicy::NoFocus + + + unmapped + + + + + + + + + + + 0 + 0 + + + + + 160 + 0 + + + + Touchpad Click + + + + + + + 0 + 0 + + + + Qt::FocusPolicy::NoFocus + + + unmapped + + + + + + + + + + + + + + + 0 + 0 + + + + + 0 + 0 + + + + Mouse to Joystick + + + + + + Qt::FocusPolicy::NoFocus + + + + + + + + true + + + + *press F7 ingame to activate + + + true + + + + + + + + + + + + + + + 0 + 0 + + + + + 160 + 0 + + + + R3 + + + + 5 + + + 5 + + + 5 + + + 5 + + + + + + 0 + 0 + + + + Qt::FocusPolicy::NoFocus + + + unmapped + + + + + + + + + + + 0 + 0 + + + + + 160 + 0 + + + + Options + + + + 5 + + + 5 + + + 5 + + + 5 + + + + + + 0 + 0 + + + + Qt::FocusPolicy::NoFocus + + + unmapped + + + + + + + + + + + + + + + + + + + 0 + 0 + + + + + false + + + + Mouse Movement Parameters + + + + + + + + + false + + + + Deadzone Offset (def 0.50): 0.50 + + + + + + + + 0 + 0 + + + + Qt::FocusPolicy::NoFocus + + + 100 + + + 50 + + + Qt::Orientation::Horizontal + + + + + + + + + + + + false + + + + Speed Multiplier (def 1.0): 1.0 + + + + + + + + 0 + 0 + + + + Qt::FocusPolicy::NoFocus + + + 1 + + + 50 + + + 5 + + + 10 + + + Qt::Orientation::Horizontal + + + + + + + + + + + + false + + + + Speed Offset (def 0.125): 0.125 + + + + + + + + 0 + 0 + + + + Qt::FocusPolicy::NoFocus + + + 1000 + + + 100 + + + 125 + + + Qt::Orientation::Horizontal + + + + + + + + + + 0 + 0 + + + + + true + false + + + + note: click Help Button/Special Keybindings for more information + + + + + + + + + + + + + + + + 5 + + + + + + 0 + 0 + + + + Face Buttons + + + + 5 + + + 5 + + + 5 + + + 5 + + + + + + 0 + + + 0 + + + 0 + + + 0 + + + + + + 0 + 0 + + + + + 160 + 0 + + + + + 0 + 16777215 + + + + Triangle + + + + + + Qt::FocusPolicy::NoFocus + + + unmapped + + + + + + + + + + + + + + + + 160 + 0 + + + + Square + + + + 5 + + + 5 + + + 5 + + + 5 + + + + + Qt::FocusPolicy::NoFocus + + + unmapped + + + + + + + + + + + 160 + 0 + + + + Circle + + + + 5 + + + 5 + + + 5 + + + 5 + + + + + Qt::FocusPolicy::NoFocus + + + unmapped + + + + + + + + + + + + + 0 + + + 0 + + + 0 + + + 0 + + + + + + 160 + 0 + + + + + 124 + 16777215 + + + + Cross + + + + + + Qt::FocusPolicy::NoFocus + + + unmapped + + + + + + + + + + + + + + + + Qt::Orientation::Vertical + + + QSizePolicy::Policy::Maximum + + + + 20 + 40 + + + + + + + + + 0 + 0 + + + + + 344 + 16777215 + + + + Right Analog Halfmode + + + + + + Qt::FocusPolicy::NoFocus + + + unmapped + + + + + + + + true + + + + hold to move right stick at half-speed + + + + + + + + + + + 0 + 0 + + + + + 0 + 0 + + + + Right Stick + + + + 5 + + + 5 + + + 5 + + + 5 + + + + + + 0 + + + 0 + + + 0 + + + 0 + + + + + + 0 + 0 + + + + + 160 + 0 + + + + + 124 + 1231321 + + + + Up + + + + + + + 0 + 0 + + + + Qt::FocusPolicy::NoFocus + + + unmapped + + + + + + + + + + + + + + + + 160 + 0 + + + + Left + + + + 5 + + + 5 + + + 5 + + + 5 + + + + + Qt::FocusPolicy::NoFocus + + + unmapped + + + + + + + + + + + 160 + 0 + + + + Right + + + + 5 + + + 5 + + + 5 + + + 5 + + + + + Qt::FocusPolicy::NoFocus + + + unmapped + + + + + + + + + + + + + 0 + + + 0 + + + 0 + + + 0 + + + + + + 160 + 0 + + + + + 124 + 2121 + + + + Down + + + + + + Qt::FocusPolicy::NoFocus + + + unmapped + + + + + + + + + + + + + + + + + + + + + + + QDialogButtonBox::StandardButton::Apply|QDialogButtonBox::StandardButton::Cancel|QDialogButtonBox::StandardButton::RestoreDefaults|QDialogButtonBox::StandardButton::Save + + + false + + + + + + + + + + diff --git a/src/qt_gui/kbm_help_dialog.cpp b/src/qt_gui/kbm_help_dialog.cpp new file mode 100644 index 000000000..c13e18b59 --- /dev/null +++ b/src/qt_gui/kbm_help_dialog.cpp @@ -0,0 +1,112 @@ +// SPDX-FileCopyrightText: Copyright 2024 shadPS4 Emulator Project +// SPDX-License-Identifier: GPL-2.0-or-later + +#include "kbm_help_dialog.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +ExpandableSection::ExpandableSection(const QString& title, const QString& content, + QWidget* parent = nullptr) + : QWidget(parent) { + QVBoxLayout* layout = new QVBoxLayout(this); + + // Button to toggle visibility of content + toggleButton = new QPushButton(title); + layout->addWidget(toggleButton); + + // QTextBrowser for content (initially hidden) + contentBrowser = new QTextBrowser(); + contentBrowser->setPlainText(content); + contentBrowser->setVisible(false); + + // Remove scrollbars from QTextBrowser + contentBrowser->setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff); + contentBrowser->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff); + + // Set size policy to allow vertical stretching only + contentBrowser->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Minimum); + + // Calculate and set initial height based on content + updateContentHeight(); + + layout->addWidget(contentBrowser); + + // Connect button click to toggle visibility + connect(toggleButton, &QPushButton::clicked, [this]() { + contentBrowser->setVisible(!contentBrowser->isVisible()); + if (contentBrowser->isVisible()) { + updateContentHeight(); // Update height when expanding + } + emit expandedChanged(); // Notify for layout adjustments + }); + + // Connect to update height if content changes + connect(contentBrowser->document(), &QTextDocument::contentsChanged, this, + &ExpandableSection::updateContentHeight); + + // Minimal layout settings for spacing + layout->setSpacing(2); + layout->setContentsMargins(0, 0, 0, 0); +} + +void HelpDialog::closeEvent(QCloseEvent* event) { + *help_open_ptr = false; + close(); +} +void HelpDialog::reject() { + *help_open_ptr = false; + close(); +} + +HelpDialog::HelpDialog(bool* open_flag, QWidget* parent) : QDialog(parent) { + help_open_ptr = open_flag; + // Main layout for the help dialog + QVBoxLayout* mainLayout = new QVBoxLayout(this); + + // Container widget for the scroll area + QWidget* containerWidget = new QWidget; + QVBoxLayout* containerLayout = new QVBoxLayout(containerWidget); + + // Add expandable sections to container layout + auto* quickstartSection = new ExpandableSection(tr("Quickstart"), quickstart()); + auto* faqSection = new ExpandableSection(tr("FAQ"), faq()); + auto* syntaxSection = new ExpandableSection(tr("Syntax"), syntax()); + auto* specialSection = new ExpandableSection(tr("Special Bindings"), special()); + auto* bindingsSection = new ExpandableSection(tr("Keybindings"), bindings()); + + containerLayout->addWidget(quickstartSection); + containerLayout->addWidget(faqSection); + containerLayout->addWidget(syntaxSection); + containerLayout->addWidget(specialSection); + containerLayout->addWidget(bindingsSection); + containerLayout->addStretch(1); + + // Scroll area wrapping the container + QScrollArea* scrollArea = new QScrollArea; + scrollArea->setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOn); + scrollArea->setWidgetResizable(true); + scrollArea->setWidget(containerWidget); + + // Add the scroll area to the main dialog layout + mainLayout->addWidget(scrollArea); + setLayout(mainLayout); + + // Minimum size for the dialog + setMinimumSize(500, 400); + + // Re-adjust dialog layout when any section expands/collapses + connect(quickstartSection, &ExpandableSection::expandedChanged, this, &HelpDialog::adjustSize); + connect(faqSection, &ExpandableSection::expandedChanged, this, &HelpDialog::adjustSize); + connect(syntaxSection, &ExpandableSection::expandedChanged, this, &HelpDialog::adjustSize); + connect(specialSection, &ExpandableSection::expandedChanged, this, &HelpDialog::adjustSize); + connect(bindingsSection, &ExpandableSection::expandedChanged, this, &HelpDialog::adjustSize); +} diff --git a/src/qt_gui/kbm_help_dialog.h b/src/qt_gui/kbm_help_dialog.h new file mode 100644 index 000000000..3e39d4397 --- /dev/null +++ b/src/qt_gui/kbm_help_dialog.h @@ -0,0 +1,176 @@ +// SPDX-FileCopyrightText: Copyright 2024 shadPS4 Emulator Project +// SPDX-License-Identifier: GPL-2.0-or-later + +#include +#include +#include +#include +#include +#include +#include +#include + +class ExpandableSection : public QWidget { + Q_OBJECT +public: + explicit ExpandableSection(const QString& title, const QString& content, QWidget* parent); + +signals: + void expandedChanged(); // Signal to indicate layout size change + +private: + QPushButton* toggleButton; + QTextBrowser* contentBrowser; // Changed from QLabel to QTextBrowser + QPropertyAnimation* animation; + int contentHeight; + void updateContentHeight() { + int contentHeight = contentBrowser->document()->size().height(); + contentBrowser->setMinimumHeight(contentHeight + 5); + contentBrowser->setMaximumHeight(contentHeight + 50); + } +}; + +class HelpDialog : public QDialog { + Q_OBJECT +public: + explicit HelpDialog(bool* open_flag = nullptr, QWidget* parent = nullptr); + +protected: + void closeEvent(QCloseEvent* event) override; + void reject() override; + +private: + bool* help_open_ptr; + + QString quickstart() { + return + R"(The keyboard and controller remapping backend, GUI and documentation have been written by kalaposfos + +In this section, you will find information about the project, its features and help on setting up your ideal setup. +To view the config file's syntax, check out the Syntax tab, for keybind names, visit Normal Keybinds and Special Bindings, and if you are here to view emulator-wide keybinds, you can find it in the FAQ section. +This project started out because I didn't like the original unchangeable keybinds, but rather than waiting for someone else to do it, I implemented this myself. From the default keybinds, you can clearly tell this was a project built for Bloodborne, but ovbiously you can make adjustments however you like. +)"; + } + QString faq() { + return + R"(Q: What are the emulator-wide keybinds? +A: -F12: Triggers Renderdoc capture +-F11: Toggles fullscreen +-F10: Toggles FPS counter +-Ctrl F10: Open the debug menu +-F9: Pauses emultor, if the debug menu is open +-F8: Reparses the config file while in-game +-F7: Toggles mouse capture and mouse input + +Q: How do I change between mouse and controller joystick input, and why is it even required? +A: You can switch between them with F7, and it is required, because mouse input is done with polling, which means mouse movement is checked every frame, and if it didn't move, the code manually sets the emulator's virtual controller to 0 (back to the center), even if other input devices would update it. + +Q: What happens if I accidentally make a typo in the config? +A: The code recognises the line as wrong, and skip it, so the rest of the file will get parsed, but that line in question will be treated like a comment line. You can find these lines in the log, if you search for 'input_handler'. + +Q: I want to bind to , but your code doesn't support ! +A: Some keys are intentionally omitted, but if you read the bindings through, and you're sure it is not there and isn't one of the intentionally disabled ones, open an issue on https://github.com/shadps4-emu/shadPS4. + +Q: What does default.ini do? +A: If you're using per-game configs, it's the base from which all new games generate their config file. If you use the unified config, then this is used for every game directly instead. + +Q: What does the use Per-game Config checkbox do? +A: It controls whether the config is loaded from CUSAXXXXX.ini for a game, or from default.ini. This way, if you only want to manage one set of bindings, you can do so, but if you want to use a different setup for every game, that's possible as well. +)"; + } + QString syntax() { + return + R"(This is the full list of currently supported mouse, keyboard and controller inputs, and how to use them. +Emulator-reserved keys: F1 through F12 + +Syntax (aka how a line can look like): +#Comment line + = , , ; + = , ; + = ; + +Examples: +#Interact +cross = e; +#Heavy attack (in BB) +r2 = leftbutton, lshift; +#Move forward +axis_left_y_minus = w; + +You can make a comment line by putting # as the first character. +Whitespace doesn't matter, =; is just as valid as = ; +';' at the ends of lines is also optional. +)"; + } + QString bindings() { + return + R"(The following names should be interpreted without the '' around them, and for inputs that have left and right versions, only the left one is shown, but the right can be inferred from that. +Example: 'lshift', 'rshift' + +Keyboard: +Alphabet: 'a', 'b', ..., 'z' +Numbers: '0', '1', ..., '9' +Keypad: 'kp0', kp1', ..., 'kp9', 'kpperiod', 'kpcomma', + 'kpdivide', 'kpmultiply', 'kpdivide', 'kpplus', 'kpminus', 'kpenter' +Punctuation and misc: + 'space', 'comma', 'period', 'question', 'semicolon', 'minus', 'plus', 'lparenthesis', 'lbracket', 'lbrace', 'backslash', 'dash', + 'enter', 'tab', backspace', 'escape' +Arrow keys: 'up', 'down', 'left', 'right' +Modifier keys: + 'lctrl', 'lshift', 'lalt', 'lwin' = 'lmeta' (same input, different names, so if you are not on Windows and don't like calling this the Windows key, there is an alternative) + +Mouse: + 'leftbutton', 'rightbutton', 'middlebutton', 'sidebuttonforward', 'sidebuttonback' + The following wheel inputs cannot be bound to axis input, only button: + 'mousewheelup', 'mousewheeldown', 'mousewheelleft', 'mousewheelright' + +Controller: + The touchpad currently can't be rebound to anything else, but you can bind buttons to it. + If you have a controller that has different names for buttons, it will still work, just look up what are the equivalent names for that controller + The same left-right rule still applies here. + Buttons: + 'triangle', 'circle', 'cross', 'square', 'l1', 'l3', + 'options', touchpad', 'up', 'down', 'left', 'right' + Axes if you bind them to a button input: + 'axis_left_x_plus', 'axis_left_x_minus', 'axis_left_y_plus', 'axis_left_y_minus', + 'axis_right_x_plus', ..., 'axis_right_y_minus', + 'l2' + Axes if you bind them to another axis input: + 'axis_left_x' 'axis_left_y' 'axis_right_x' 'axis_right_y', + 'l2' +)"; + } + QString special() { + return + R"(There are some extra bindings you can put into the config file, that don't correspond to a controller input, but rather something else. +You can find these here, with detailed comments, examples and suggestions for most of them. + +'leftjoystick_halfmode' and 'rightjoystick_halfmode' = ; + These are a pair of input modifiers, that change the way keyboard button bound axes work. By default, those push the joystick to the max in their respective direction, but if their respective joystick_halfmode modifier value is true, they only push it... halfway. With this, you can change from run to walk in games like Bloodborne. + +'mouse_to_joystick' = 'none', 'left' or 'right'; + This binds the mouse movement to either joystick. If it recieves a value that is not 'left' or 'right', it defaults to 'none'. + +'mouse_movement_params' = float, float, float; + (If you don't know what a float is, it is a data type that stores non-whole numbers.) + Default values: 0.5, 1, 0.125 + Let's break each parameter down: + 1st: mouse_deadzone_offset: this value should have a value between 0 and 1 (It gets clamped to that range anyway), with 0 being no offset and 1 being pushing the joystick to the max in the direction the mouse moved. + This controls the minimum distance the joystick gets moved, when moving the mouse. If set to 0, it will emulate raw mouse input, which doesn't work very well due to deadzones preventing input if the movement is not large enough. + 2nd: mouse_speed: It's just a standard multiplier to the mouse input speed. + If you input a negative number, the axis directions get reversed (Keep in mind that the offset can still push it back to positive, if it's big enough) + 3rd: mouse_speed_offset: This also should be in the 0 to 1 range, with 0 being no offset and 1 being offsetting to the max possible value. + This is best explained through an example: Let's set mouse_deadzone to 0.5, and this to 0: This means that if we move the mousevery slowly, it still inputs a half-strength joystick input, and if we increase the speed, it would stay that way until we move faster than half the max speed. If we instead set this to 0.25, we now only need to move the mouse faster than the 0.5-0.25=0.25=quarter of the max speed, to get an increase in joystick speed. If we set it to 0.5, then even moving the mouse at 1 pixel per frame will result in a faster-than-minimum speed. + +'key_toggle' = , ; + This assigns a key to another key, and if pressed, toggles that key's virtual value. If it's on, then it doesn't matter if the key is pressed or not, the input handler will treat it as if it's pressed. + You can make an input toggleable with this, for example: Let's say we want to be able to toggle l1 with t. You can then bind l1 to a key you won't use, like kpenter, then bind t to toggle that, so you will end up with this: + l1 = kpenter; + key_toggle = t, kpenter; +'analog_deadzone' = , , ; + Values go from 1 to 127 (no deadzone to max deadzone), first is the inner, second is the outer deadzone + If you only want inner or outer deadzone, set the other to 1 or 127, respectively + Devices: leftjoystick, rightjoystick, l2, r2 +)"; + } +}; \ No newline at end of file diff --git a/src/qt_gui/main.cpp b/src/qt_gui/main.cpp index ac731fdce..bd9dca6ce 100644 --- a/src/qt_gui/main.cpp +++ b/src/qt_gui/main.cpp @@ -26,6 +26,8 @@ int main(int argc, char* argv[]) { QApplication a(argc, argv); + QApplication::setDesktopFileName("net.shadps4.shadPS4"); + // Load configurations and initialize Qt application const auto user_dir = Common::FS::GetUserPath(Common::FS::PathType::UserDir); Config::load(user_dir / "config.toml"); @@ -33,6 +35,7 @@ int main(int argc, char* argv[]) { bool has_command_line_argument = argc > 1; bool show_gui = false, has_game_argument = false; std::string game_path; + std::vector game_args{}; // Map of argument strings to lambda functions std::unordered_map> arg_map = { @@ -43,6 +46,9 @@ int main(int argc, char* argv[]) { " No arguments: Opens the GUI.\n" " -g, --game Specify or " " to launch\n" + " -- ... Parameters passed to the game ELF. " + "Needs to be at the end of the line, and everything after \"--\" is a " + "game argument.\n" " -p, --patch Apply specified patch file\n" " -s, --show-gui Show the GUI\n" " -f, --fullscreen Specify window initial fullscreen " @@ -97,7 +103,7 @@ int main(int argc, char* argv[]) { exit(1); } // Set fullscreen mode without saving it to config file - Config::setFullscreenMode(is_fullscreen); + Config::setIsFullscreen(is_fullscreen); }}, {"--fullscreen", [&](int& i) { arg_map["-f"](i); }}, {"--add-game-folder", @@ -131,14 +137,28 @@ int main(int argc, char* argv[]) { // Assume the last argument is the game file if not specified via -g/--game game_path = argv[i]; has_game_argument = true; + } else if (std::string(argv[i]) == "--") { + if (i + 1 == argc) { + std::cerr << "Warning: -- is set, but no game arguments are added!\n"; + break; + } + for (int j = i + 1; j < argc; j++) { + game_args.push_back(argv[j]); + } + break; + } else if (i + 1 < argc && std::string(argv[i + 1]) == "--") { + if (!has_game_argument) { + game_path = argv[i]; + has_game_argument = true; + } } else { std::cerr << "Unknown argument: " << cur_arg << ", see --help for info.\n"; return 1; } } - // If no game directory is set and no command line argument, prompt for it - if (Config::getGameInstallDirs().empty() && !has_command_line_argument) { + // If no game directories are set and no command line argument, prompt for it + if (Config::getGameInstallDirsEnabled().empty() && !has_command_line_argument) { GameInstallDialog dlg; dlg.exec(); } @@ -163,12 +183,12 @@ int main(int argc, char* argv[]) { // Check if the provided path is a valid file if (!std::filesystem::exists(game_file_path)) { - // If not a file, treat it as a game ID and search in install directories + // If not a file, treat it as a game ID and search in install directories recursively bool game_found = false; + const int max_depth = 5; for (const auto& install_dir : Config::getGameInstallDirs()) { - auto potential_game_path = install_dir / game_path / "eboot.bin"; - if (std::filesystem::exists(potential_game_path)) { - game_file_path = potential_game_path; + if (auto found_path = Common::FS::FindGameByID(install_dir, game_path, max_depth)) { + game_file_path = *found_path; game_found = true; break; } @@ -181,7 +201,7 @@ int main(int argc, char* argv[]) { // Run the emulator with the resolved game path Core::Emulator emulator; - emulator.Run(game_file_path.string()); + emulator.Run(game_file_path.string(), game_args); if (!show_gui) { return 0; // Exit after running the emulator without showing the GUI } @@ -190,4 +210,4 @@ int main(int argc, char* argv[]) { // Show the main window and run the Qt application m_main_window->show(); return a.exec(); -} \ No newline at end of file +} diff --git a/src/qt_gui/main_window.cpp b/src/qt_gui/main_window.cpp index bd3c27809..5d8f8e717 100644 --- a/src/qt_gui/main_window.cpp +++ b/src/qt_gui/main_window.cpp @@ -1,9 +1,13 @@ // SPDX-FileCopyrightText: Copyright 2024 shadPS4 Emulator Project // SPDX-License-Identifier: GPL-2.0-or-later +#include "SDL3/SDL_events.h" + #include #include +#include #include +#include #include "about_dialog.h" #include "cheats_patches.h" @@ -15,12 +19,12 @@ #include "common/scm_rev.h" #include "common/string_util.h" #include "common/version.h" -#include "core/file_format/pkg.h" -#include "core/loader.h" +#include "control_settings.h" #include "game_install_dialog.h" -#include "install_dir_select.h" +#include "kbm_gui.h" #include "main_window.h" #include "settings_dialog.h" + #include "video_core/renderer_vulkan/vk_instance.h" #ifdef ENABLE_DISCORD_RPC #include "common/discord_rpc_handler.h" @@ -52,13 +56,25 @@ bool MainWindow::Init() { SetLastIconSizeBullet(); GetPhysicalDevices(); // show ui - setMinimumSize(350, minimumSizeHint().height()); + setMinimumSize(720, 405); std::string window_title = ""; if (Common::isRelease) { window_title = fmt::format("shadPS4 v{}", Common::VERSION); } else { - window_title = fmt::format("shadPS4 v{} {} {}", Common::VERSION, Common::g_scm_branch, - Common::g_scm_desc); + std::string remote_url(Common::g_scm_remote_url); + std::string remote_host; + try { + remote_host = remote_url.substr(19, remote_url.rfind('/') - 19); + } catch (...) { + remote_host = "unknown"; + } + if (remote_host == "shadps4-emu" || remote_url.length() == 0) { + window_title = fmt::format("shadPS4 v{} {} {}", Common::VERSION, Common::g_scm_branch, + Common::g_scm_desc); + } else { + window_title = fmt::format("shadPS4 v{} {}/{} {}", Common::VERSION, remote_host, + Common::g_scm_branch, Common::g_scm_desc); + } } setWindowTitle(QString::fromStdString(window_title)); this->show(); @@ -113,24 +129,163 @@ void MainWindow::CreateActions() { m_theme_act_group->addAction(ui->setThemeViolet); m_theme_act_group->addAction(ui->setThemeGruvbox); m_theme_act_group->addAction(ui->setThemeTokyoNight); + m_theme_act_group->addAction(ui->setThemeOled); +} + +void MainWindow::PauseGame() { + SDL_Event event; + SDL_memset(&event, 0, sizeof(event)); + event.type = SDL_EVENT_TOGGLE_PAUSE; + is_paused = !is_paused; + UpdateToolbarButtons(); + SDL_PushEvent(&event); +} + +void MainWindow::toggleLabelsUnderIcons() { + bool showLabels = ui->toggleLabelsAct->isChecked(); + Config::setShowLabelsUnderIcons(); + UpdateToolbarLabels(); + if (isGameRunning) { + UpdateToolbarButtons(); + } +} + +void MainWindow::toggleFullscreen() { + SDL_Event event; + SDL_memset(&event, 0, sizeof(event)); + event.type = SDL_EVENT_TOGGLE_FULLSCREEN; + SDL_PushEvent(&event); +} + +QWidget* MainWindow::createButtonWithLabel(QPushButton* button, const QString& labelText, + bool showLabel) { + QWidget* container = new QWidget(this); + QVBoxLayout* layout = new QVBoxLayout(container); + layout->setAlignment(Qt::AlignCenter | Qt::AlignBottom); + layout->setContentsMargins(0, 0, 0, 0); + layout->addWidget(button); + + QLabel* label = nullptr; + if (showLabel && ui->toggleLabelsAct->isChecked()) { + label = new QLabel(labelText, this); + label->setAlignment(Qt::AlignCenter | Qt::AlignBottom); + layout->addWidget(label); + button->setToolTip(""); + } else { + button->setToolTip(labelText); + } + + container->setLayout(layout); + container->setProperty("buttonLabel", QVariant::fromValue(label)); + return container; +} + +QWidget* createSpacer(QWidget* parent) { + QWidget* spacer = new QWidget(parent); + spacer->setFixedWidth(15); + spacer->setFixedHeight(15); + return spacer; } void MainWindow::AddUiWidgets() { // add toolbar widgets QApplication::setStyle("Fusion"); - ui->toolBar->setObjectName("mw_toolbar"); - ui->toolBar->addWidget(ui->playButton); - ui->toolBar->addWidget(ui->pauseButton); - ui->toolBar->addWidget(ui->stopButton); - ui->toolBar->addWidget(ui->refreshButton); - ui->toolBar->addWidget(ui->settingsButton); - ui->toolBar->addWidget(ui->controllerButton); + + bool showLabels = ui->toggleLabelsAct->isChecked(); + ui->toolBar->clear(); + + ui->toolBar->addWidget(createSpacer(this)); + ui->toolBar->addWidget(createButtonWithLabel(ui->playButton, tr("Play"), showLabels)); + ui->toolBar->addWidget(createButtonWithLabel(ui->pauseButton, tr("Pause"), showLabels)); + ui->toolBar->addWidget(createButtonWithLabel(ui->stopButton, tr("Stop"), showLabels)); + ui->toolBar->addWidget(createButtonWithLabel(ui->restartButton, tr("Restart"), showLabels)); + ui->toolBar->addWidget(createSpacer(this)); + ui->toolBar->addWidget(createButtonWithLabel(ui->settingsButton, tr("Settings"), showLabels)); + ui->toolBar->addWidget( + createButtonWithLabel(ui->fullscreenButton, tr("Full Screen"), showLabels)); + ui->toolBar->addWidget(createSpacer(this)); + ui->toolBar->addWidget( + createButtonWithLabel(ui->controllerButton, tr("Controllers"), showLabels)); + ui->toolBar->addWidget(createButtonWithLabel(ui->keyboardButton, tr("Keyboard"), showLabels)); + ui->toolBar->addWidget(createSpacer(this)); QFrame* line = new QFrame(this); - line->setFrameShape(QFrame::StyledPanel); + line->setFrameShape(QFrame::VLine); line->setFrameShadow(QFrame::Sunken); + line->setMinimumWidth(2); ui->toolBar->addWidget(line); - ui->toolBar->addWidget(ui->sizeSliderContainer); - ui->toolBar->addWidget(ui->mw_searchbar); + ui->toolBar->addWidget(createSpacer(this)); + if (showLabels) { + QLabel* pauseButtonLabel = ui->pauseButton->parentWidget()->findChild(); + if (pauseButtonLabel) { + pauseButtonLabel->setVisible(false); + } + } + ui->toolBar->addWidget( + createButtonWithLabel(ui->refreshButton, tr("Refresh List"), showLabels)); + ui->toolBar->addWidget(createSpacer(this)); + + QBoxLayout* toolbarLayout = new QBoxLayout(QBoxLayout::TopToBottom); + toolbarLayout->setSpacing(2); + toolbarLayout->setContentsMargins(2, 2, 2, 2); + ui->sizeSliderContainer->setFixedWidth(150); + + QWidget* searchSliderContainer = new QWidget(this); + QBoxLayout* searchSliderLayout = new QBoxLayout(QBoxLayout::TopToBottom); + searchSliderLayout->setContentsMargins(0, 0, 6, 6); + searchSliderLayout->setSpacing(2); + ui->mw_searchbar->setFixedWidth(150); + + searchSliderLayout->addWidget(ui->sizeSliderContainer); + searchSliderLayout->addWidget(ui->mw_searchbar); + + searchSliderContainer->setLayout(searchSliderLayout); + + ui->toolBar->addWidget(searchSliderContainer); + + if (!showLabels) { + toolbarLayout->addWidget(searchSliderContainer); + } + + ui->playButton->setVisible(true); + ui->pauseButton->setVisible(false); +} + +void MainWindow::UpdateToolbarButtons() { + // add toolbar widgets when game is running + bool showLabels = ui->toggleLabelsAct->isChecked(); + + ui->playButton->setVisible(false); + ui->pauseButton->setVisible(true); + + if (showLabels) { + QLabel* playButtonLabel = ui->playButton->parentWidget()->findChild(); + if (playButtonLabel) + playButtonLabel->setVisible(false); + } + + if (is_paused) { + ui->pauseButton->setIcon(ui->playButton->icon()); + ui->pauseButton->setToolTip(tr("Resume")); + } else { + if (isIconBlack) { + ui->pauseButton->setIcon(QIcon(":images/pause_icon.png")); + } else { + ui->pauseButton->setIcon(RecolorIcon(QIcon(":images/pause_icon.png"), isWhite)); + } + ui->pauseButton->setToolTip(tr("Pause")); + } + + if (showLabels) { + QLabel* pauseButtonLabel = ui->pauseButton->parentWidget()->findChild(); + if (pauseButtonLabel) { + pauseButtonLabel->setText(is_paused ? tr("Resume") : tr("Pause")); + pauseButtonLabel->setVisible(true); + } + } +} + +void MainWindow::UpdateToolbarLabels() { + AddUiWidgets(); } void MainWindow::CreateDockWindows() { @@ -185,10 +340,14 @@ void MainWindow::CreateDockWindows() { } void MainWindow::LoadGameLists() { + // Load compatibility database + if (Config::getCompatibilityEnabled()) + m_compat_info->LoadCompatibilityFile(); + // Update compatibility database - if (Config::getCheckCompatibilityOnStartup()) { + if (Config::getCheckCompatibilityOnStartup()) m_compat_info->UpdateCompatibilityDatabase(this); - } + // Get game info from game folders. m_game_info->GetGameInfo(this); if (isTableList) { @@ -231,6 +390,8 @@ void MainWindow::CreateConnects() { connect(ui->refreshButton, &QPushButton::clicked, this, &MainWindow::RefreshGameTable); connect(ui->showGameListAct, &QAction::triggered, this, &MainWindow::ShowGameList); connect(this, &MainWindow::ExtractionFinished, this, &MainWindow::RefreshGameTable); + connect(ui->toggleLabelsAct, &QAction::toggled, this, &MainWindow::toggleLabelsUnderIcons); + connect(ui->fullscreenButton, &QPushButton::clicked, this, &MainWindow::toggleFullscreen); connect(ui->sizeSlider, &QSlider::valueChanged, this, [this](int value) { if (isTableList) { @@ -247,7 +408,14 @@ void MainWindow::CreateConnects() { } }); + connect(ui->shadFolderAct, &QAction::triggered, this, [this]() { + QString userPath; + Common::FS::PathToQString(userPath, Common::FS::GetUserPath(Common::FS::PathType::UserDir)); + QDesktopServices::openUrl(QUrl::fromLocalFile(userPath)); + }); + connect(ui->playButton, &QPushButton::clicked, this, &MainWindow::StartGame); + connect(ui->pauseButton, &QPushButton::clicked, this, &MainWindow::PauseGame); connect(m_game_grid_frame.get(), &QTableWidget::cellDoubleClicked, this, &MainWindow::StartGame); connect(m_game_list_frame.get(), &QTableWidget::cellDoubleClicked, this, @@ -262,6 +430,27 @@ void MainWindow::CreateConnects() { connect(settingsDialog, &SettingsDialog::CompatibilityChanged, this, &MainWindow::RefreshGameTable); + connect(settingsDialog, &SettingsDialog::accepted, this, &MainWindow::RefreshGameTable); + connect(settingsDialog, &SettingsDialog::rejected, this, &MainWindow::RefreshGameTable); + connect(settingsDialog, &SettingsDialog::close, this, &MainWindow::RefreshGameTable); + + connect(settingsDialog, &SettingsDialog::BackgroundOpacityChanged, this, + [this](int opacity) { + Config::setBackgroundImageOpacity(opacity); + if (m_game_list_frame) { + QTableWidgetItem* current = m_game_list_frame->GetCurrentItem(); + if (current) { + m_game_list_frame->SetListBackgroundImage(current); + } + } + if (m_game_grid_frame) { + if (m_game_grid_frame->IsValidCellSelected()) { + m_game_grid_frame->SetGridBackgroundImage(m_game_grid_frame->crtRow, + m_game_grid_frame->crtColumn); + } + } + }); + settingsDialog->exec(); }); @@ -274,9 +463,40 @@ void MainWindow::CreateConnects() { connect(settingsDialog, &SettingsDialog::CompatibilityChanged, this, &MainWindow::RefreshGameTable); + connect(settingsDialog, &SettingsDialog::accepted, this, &MainWindow::RefreshGameTable); + connect(settingsDialog, &SettingsDialog::rejected, this, &MainWindow::RefreshGameTable); + connect(settingsDialog, &SettingsDialog::close, this, &MainWindow::RefreshGameTable); + + connect(settingsDialog, &SettingsDialog::BackgroundOpacityChanged, this, + [this](int opacity) { + Config::setBackgroundImageOpacity(opacity); + if (m_game_list_frame) { + QTableWidgetItem* current = m_game_list_frame->GetCurrentItem(); + if (current) { + m_game_list_frame->SetListBackgroundImage(current); + } + } + if (m_game_grid_frame) { + if (m_game_grid_frame->IsValidCellSelected()) { + m_game_grid_frame->SetGridBackgroundImage(m_game_grid_frame->crtRow, + m_game_grid_frame->crtColumn); + } + } + }); + settingsDialog->exec(); }); + connect(ui->controllerButton, &QPushButton::clicked, this, [this]() { + auto configWindow = new ControlSettings(m_game_info, this); + configWindow->exec(); + }); + + connect(ui->keyboardButton, &QPushButton::clicked, this, [this]() { + auto kbmWindow = new KBMSettings(m_game_info, this); + kbmWindow->exec(); + }); + #ifdef ENABLE_UPDATER connect(ui->updaterAct, &QAction::triggered, this, [this]() { auto checkUpdate = new CheckUpdate(true); @@ -357,6 +577,7 @@ void MainWindow::CreateConnects() { int slider_pos = Config::getSliderPosition(); ui->sizeSlider->setEnabled(true); ui->sizeSlider->setSliderPosition(slider_pos); + ui->mw_searchbar->setText(""); }); // Grid connect(ui->setlistModeGridAct, &QAction::triggered, m_dock_widget.data(), [this]() { @@ -374,6 +595,7 @@ void MainWindow::CreateConnects() { int slider_pos_grid = Config::getSliderPositionGrid(); ui->sizeSlider->setEnabled(true); ui->sizeSlider->setSliderPosition(slider_pos_grid); + ui->mw_searchbar->setText(""); }); // Elf Viewer connect(ui->setlistElfAct, &QAction::triggered, m_dock_widget.data(), [this]() { @@ -494,7 +716,6 @@ void MainWindow::CreateConnects() { }); // Package install. - connect(ui->bootInstallPkgAct, &QAction::triggered, this, &MainWindow::InstallPkg); connect(ui->bootGameAct, &QAction::triggered, this, &MainWindow::BootGame); connect(ui->gameInstallPathAct, &QAction::triggered, this, &MainWindow::InstallDirectory); @@ -502,13 +723,58 @@ void MainWindow::CreateConnects() { connect(ui->addElfFolderAct, &QAction::triggered, m_elf_viewer.data(), &ElfViewer::OpenElfFolder); - // Package Viewer. - connect(ui->pkgViewerAct, &QAction::triggered, this, [this]() { - PKGViewer* pkgViewer = new PKGViewer( - m_game_info, this, [this](std::filesystem::path file, int pkgNum, int nPkg) { - this->InstallDragDropPkg(file, pkgNum, nPkg); - }); - pkgViewer->show(); + // Trophy Viewer + connect(ui->trophyViewerAct, &QAction::triggered, this, [this]() { + if (m_game_info->m_games.empty()) { + QMessageBox::information( + this, tr("Trophy Viewer"), + tr("No games found. Please add your games to your library first.")); + return; + } + + const auto& firstGame = m_game_info->m_games[0]; + QString trophyPath, gameTrpPath; + Common::FS::PathToQString(trophyPath, firstGame.serial); + Common::FS::PathToQString(gameTrpPath, firstGame.path); + + auto game_update_path = Common::FS::PathFromQString(gameTrpPath); + game_update_path += "-UPDATE"; + if (std::filesystem::exists(game_update_path)) { + Common::FS::PathToQString(gameTrpPath, game_update_path); + } else { + game_update_path = Common::FS::PathFromQString(gameTrpPath); + game_update_path += "-patch"; + if (std::filesystem::exists(game_update_path)) { + Common::FS::PathToQString(gameTrpPath, game_update_path); + } + } + + QVector allTrophyGames; + for (const auto& game : m_game_info->m_games) { + TrophyGameInfo gameInfo; + gameInfo.name = QString::fromStdString(game.name); + Common::FS::PathToQString(gameInfo.trophyPath, game.serial); + Common::FS::PathToQString(gameInfo.gameTrpPath, game.path); + + auto update_path = Common::FS::PathFromQString(gameInfo.gameTrpPath); + update_path += "-UPDATE"; + if (std::filesystem::exists(update_path)) { + Common::FS::PathToQString(gameInfo.gameTrpPath, update_path); + } else { + update_path = Common::FS::PathFromQString(gameInfo.gameTrpPath); + update_path += "-patch"; + if (std::filesystem::exists(update_path)) { + Common::FS::PathToQString(gameInfo.gameTrpPath, update_path); + } + } + + allTrophyGames.append(gameInfo); + } + + QString gameName = QString::fromStdString(firstGame.name); + TrophyViewer* trophyViewer = + new TrophyViewer(trophyPath, gameTrpPath, gameName, allTrophyGames); + trophyViewer->show(); }); // Themes @@ -568,6 +834,14 @@ void MainWindow::CreateConnects() { isIconBlack = false; } }); + connect(ui->setThemeOled, &QAction::triggered, &m_window_themes, [this]() { + m_window_themes.SetWindowTheme(Theme::Oled, ui->mw_searchbar); + Config::setMainWindowTheme(static_cast(Theme::Oled)); + if (isIconBlack) { + SetUiIcons(false); + isIconBlack = false; + } + }); } void MainWindow::StartGame() { @@ -599,17 +873,29 @@ void MainWindow::StartGame() { return; } StartEmulator(path); + + UpdateToolbarButtons(); } } +bool isTable; void MainWindow::SearchGameTable(const QString& text) { if (isTableList) { + if (isTable != true) { + m_game_info->m_games = m_game_info->m_games_backup; + m_game_list_frame->PopulateGameList(); + isTable = true; + } for (int row = 0; row < m_game_list_frame->rowCount(); row++) { QString game_name = QString::fromStdString(m_game_info->m_games[row].name); bool match = (game_name.contains(text, Qt::CaseInsensitive)); // Check only in column 1 m_game_list_frame->setRowHidden(row, !match); } } else { + isTable = false; + m_game_info->m_games = m_game_info->m_games_backup; + m_game_grid_frame->PopulateGameGrid(m_game_info->m_games, false); + QVector filteredGames; for (const auto& gameInfo : m_game_info->m_games) { QString game_name = QString::fromStdString(gameInfo.name); @@ -618,6 +904,7 @@ void MainWindow::SearchGameTable(const QString& text) { } } std::sort(filteredGames.begin(), filteredGames.end(), m_game_info->CompareStrings); + m_game_info->m_games = filteredGames; m_game_grid_frame->PopulateGameGrid(filteredGames, true); } } @@ -666,22 +953,6 @@ void MainWindow::SaveWindowState() const { this->geometry().width(), this->geometry().height()); } -void MainWindow::InstallPkg() { - QFileDialog dialog; - dialog.setFileMode(QFileDialog::ExistingFiles); - dialog.setNameFilter(tr("PKG File (*.PKG *.pkg)")); - if (dialog.exec()) { - QStringList fileNames = dialog.selectedFiles(); - int nPkg = fileNames.size(); - int pkgNum = 0; - for (const QString& file : fileNames) { - ++pkgNum; - std::filesystem::path path = Common::FS::PathFromQString(file); - MainWindow::InstallDragDropPkg(path, pkgNum, nPkg); - } - } -} - void MainWindow::BootGame() { QFileDialog dialog; dialog.setFileMode(QFileDialog::ExistingFile); @@ -705,204 +976,6 @@ void MainWindow::BootGame() { } } -void MainWindow::InstallDragDropPkg(std::filesystem::path file, int pkgNum, int nPkg) { - if (Loader::DetectFileType(file) == Loader::FileTypes::Pkg) { - std::string failreason; - pkg = PKG(); - if (!pkg.Open(file, failreason)) { - QMessageBox::critical(this, tr("PKG ERROR"), QString::fromStdString(failreason)); - return; - } - if (!psf.Open(pkg.sfo)) { - QMessageBox::critical(this, tr("PKG ERROR"), - "Could not read SFO. Check log for details"); - return; - } - auto category = psf.GetString("CATEGORY"); - InstallDirSelect ids; - ids.exec(); - auto game_install_dir = ids.getSelectedDirectory(); - auto game_folder_path = game_install_dir / pkg.GetTitleID(); - QString pkgType = QString::fromStdString(pkg.GetPkgFlags()); - bool use_game_update = pkgType.contains("PATCH") && Config::getSeparateUpdateEnabled(); - auto game_update_path = use_game_update - ? game_install_dir / (std::string(pkg.GetTitleID()) + "-UPDATE") - : game_folder_path; - QString gameDirPath; - Common::FS::PathToQString(gameDirPath, game_folder_path); - QDir game_dir(gameDirPath); - if (game_dir.exists()) { - QMessageBox msgBox; - msgBox.setWindowTitle(tr("PKG Extraction")); - - std::string content_id; - if (auto value = psf.GetString("CONTENT_ID"); value.has_value()) { - content_id = std::string{*value}; - } else { - QMessageBox::critical(this, tr("PKG ERROR"), "PSF file there is no CONTENT_ID"); - return; - } - std::string entitlement_label = Common::SplitString(content_id, '-')[2]; - - auto addon_extract_path = - Config::getAddonInstallDir() / pkg.GetTitleID() / entitlement_label; - QString addonDirPath; - Common::FS::PathToQString(addonDirPath, addon_extract_path); - QDir addon_dir(addonDirPath); - - if (pkgType.contains("PATCH")) { - QString pkg_app_version; - if (auto app_ver = psf.GetString("APP_VER"); app_ver.has_value()) { - pkg_app_version = QString::fromStdString(std::string{*app_ver}); - } else { - QMessageBox::critical(this, tr("PKG ERROR"), "PSF file there is no APP_VER"); - return; - } - std::filesystem::path sce_folder_path = - std::filesystem::exists(game_update_path / "sce_sys" / "param.sfo") - ? game_update_path / "sce_sys" / "param.sfo" - : game_folder_path / "sce_sys" / "param.sfo"; - psf.Open(sce_folder_path); - QString game_app_version; - if (auto app_ver = psf.GetString("APP_VER"); app_ver.has_value()) { - game_app_version = QString::fromStdString(std::string{*app_ver}); - } else { - QMessageBox::critical(this, tr("PKG ERROR"), "PSF file there is no APP_VER"); - return; - } - double appD = game_app_version.toDouble(); - double pkgD = pkg_app_version.toDouble(); - if (pkgD == appD) { - msgBox.setText(QString(tr("Patch detected!") + "\n" + - tr("PKG and Game versions match: ") + pkg_app_version + - "\n" + tr("Would you like to overwrite?"))); - msgBox.setStandardButtons(QMessageBox::Yes | QMessageBox::No); - msgBox.setDefaultButton(QMessageBox::No); - } else if (pkgD < appD) { - msgBox.setText(QString(tr("Patch detected!") + "\n" + - tr("PKG Version %1 is older than installed version: ") - .arg(pkg_app_version) + - game_app_version + "\n" + - tr("Would you like to overwrite?"))); - msgBox.setStandardButtons(QMessageBox::Yes | QMessageBox::No); - msgBox.setDefaultButton(QMessageBox::No); - } else { - msgBox.setText(QString(tr("Patch detected!") + "\n" + - tr("Game is installed: ") + game_app_version + "\n" + - tr("Would you like to install Patch: ") + - pkg_app_version + " ?")); - msgBox.setStandardButtons(QMessageBox::Yes | QMessageBox::No); - msgBox.setDefaultButton(QMessageBox::No); - } - int result = msgBox.exec(); - if (result == QMessageBox::Yes) { - // Do nothing. - } else { - return; - } - } else if (category == "ac") { - if (!addon_dir.exists()) { - QMessageBox addonMsgBox; - addonMsgBox.setWindowTitle(tr("DLC Installation")); - addonMsgBox.setText(QString(tr("Would you like to install DLC: %1?")) - .arg(QString::fromStdString(entitlement_label))); - - addonMsgBox.setStandardButtons(QMessageBox::Yes | QMessageBox::No); - addonMsgBox.setDefaultButton(QMessageBox::No); - int result = addonMsgBox.exec(); - if (result == QMessageBox::Yes) { - game_update_path = addon_extract_path; - } else { - return; - } - } else { - msgBox.setText(QString(tr("DLC already installed:") + "\n" + addonDirPath + - "\n\n" + tr("Would you like to overwrite?"))); - msgBox.setStandardButtons(QMessageBox::Yes | QMessageBox::No); - msgBox.setDefaultButton(QMessageBox::No); - int result = msgBox.exec(); - if (result == QMessageBox::Yes) { - game_update_path = addon_extract_path; - } else { - return; - } - } - } else { - msgBox.setText(QString(tr("Game already installed") + "\n" + gameDirPath + "\n" + - tr("Would you like to overwrite?"))); - msgBox.setStandardButtons(QMessageBox::Yes | QMessageBox::No); - msgBox.setDefaultButton(QMessageBox::No); - int result = msgBox.exec(); - if (result == QMessageBox::Yes) { - // Do nothing. - } else { - return; - } - } - } else { - // Do nothing; - if (pkgType.contains("PATCH") || category == "ac") { - QMessageBox::information( - this, tr("PKG Extraction"), - tr("PKG is a patch or DLC, please install the game first!")); - return; - } - // what else? - } - if (!pkg.Extract(file, game_update_path, failreason)) { - QMessageBox::critical(this, tr("PKG ERROR"), QString::fromStdString(failreason)); - } else { - int nfiles = pkg.GetNumberOfFiles(); - - if (nfiles > 0) { - QVector indices; - for (int i = 0; i < nfiles; i++) { - indices.append(i); - } - - QProgressDialog dialog; - dialog.setWindowTitle(tr("PKG Extraction")); - dialog.setWindowModality(Qt::WindowModal); - QString extractmsg = QString(tr("Extracting PKG %1/%2")).arg(pkgNum).arg(nPkg); - dialog.setLabelText(extractmsg); - dialog.setAutoClose(true); - dialog.setRange(0, nfiles); - - QFutureWatcher futureWatcher; - connect(&futureWatcher, &QFutureWatcher::finished, this, [=, this]() { - if (pkgNum == nPkg) { - QString path; - Common::FS::PathToQString(path, game_install_dir); - QMessageBox extractMsgBox(this); - 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, - [&](QAbstractButton* button) { - if (extractMsgBox.button(QMessageBox::Ok) == button) { - extractMsgBox.close(); - emit ExtractionFinished(); - } - }); - extractMsgBox.exec(); - } - }); - connect(&dialog, &QProgressDialog::canceled, [&]() { futureWatcher.cancel(); }); - connect(&futureWatcher, &QFutureWatcher::progressValueChanged, &dialog, - &QProgressDialog::setValue); - futureWatcher.setFuture( - QtConcurrent::map(indices, [&](int index) { pkg.ExtractFiles(index); })); - dialog.exec(); - } - } - } else { - QMessageBox::critical(this, tr("PKG ERROR"), - tr("File doesn't appear to be a valid PKG file")); - } -} - void MainWindow::InstallDirectory() { GameInstallDialog dlg; dlg.exec(); @@ -948,6 +1021,11 @@ void MainWindow::SetLastUsedTheme() { isIconBlack = false; SetUiIcons(false); break; + case Theme::Oled: + ui->setThemeOled->setChecked(true); + isIconBlack = false; + SetUiIcons(false); + break; } } @@ -980,8 +1058,8 @@ QIcon MainWindow::RecolorIcon(const QIcon& icon, bool isWhite) { } void MainWindow::SetUiIcons(bool isWhite) { - ui->bootInstallPkgAct->setIcon(RecolorIcon(ui->bootInstallPkgAct->icon(), isWhite)); ui->bootGameAct->setIcon(RecolorIcon(ui->bootGameAct->icon(), isWhite)); + ui->shadFolderAct->setIcon(RecolorIcon(ui->shadFolderAct->icon(), isWhite)); ui->exitAct->setIcon(RecolorIcon(ui->exitAct->icon(), isWhite)); #ifdef ENABLE_UPDATER ui->updaterAct->setIcon(RecolorIcon(ui->updaterAct->icon(), isWhite)); @@ -1000,11 +1078,14 @@ void MainWindow::SetUiIcons(bool isWhite) { ui->pauseButton->setIcon(RecolorIcon(ui->pauseButton->icon(), isWhite)); ui->stopButton->setIcon(RecolorIcon(ui->stopButton->icon(), isWhite)); ui->refreshButton->setIcon(RecolorIcon(ui->refreshButton->icon(), isWhite)); + ui->restartButton->setIcon(RecolorIcon(ui->restartButton->icon(), isWhite)); ui->settingsButton->setIcon(RecolorIcon(ui->settingsButton->icon(), isWhite)); + ui->fullscreenButton->setIcon(RecolorIcon(ui->fullscreenButton->icon(), isWhite)); ui->controllerButton->setIcon(RecolorIcon(ui->controllerButton->icon(), isWhite)); + ui->keyboardButton->setIcon(RecolorIcon(ui->keyboardButton->icon(), isWhite)); ui->refreshGameListAct->setIcon(RecolorIcon(ui->refreshGameListAct->icon(), isWhite)); ui->menuGame_List_Mode->setIcon(RecolorIcon(ui->menuGame_List_Mode->icon(), isWhite)); - ui->pkgViewerAct->setIcon(RecolorIcon(ui->pkgViewerAct->icon(), isWhite)); + ui->trophyViewerAct->setIcon(RecolorIcon(ui->trophyViewerAct->icon(), isWhite)); ui->configureAct->setIcon(RecolorIcon(ui->configureAct->icon(), isWhite)); ui->addElfFolderAct->setIcon(RecolorIcon(ui->addElfFolderAct->icon(), isWhite)); } diff --git a/src/qt_gui/main_window.h b/src/qt_gui/main_window.h index f4163defa..5d05bfca4 100644 --- a/src/qt_gui/main_window.h +++ b/src/qt_gui/main_window.h @@ -5,6 +5,7 @@ #include #include +#include #include #include "background_music_player.h" @@ -21,7 +22,6 @@ #include "game_list_utils.h" #include "main_window_themes.h" #include "main_window_ui.h" -#include "pkg_viewer.h" class GameListFrame; @@ -35,9 +35,10 @@ public: explicit MainWindow(QWidget* parent = nullptr); ~MainWindow(); bool Init(); - void InstallDragDropPkg(std::filesystem::path file, int pkgNum, int nPkg); void InstallDirectory(); void StartGame(); + void PauseGame(); + bool showLabels; private Q_SLOTS: void ConfigureGuiFromSettings(); @@ -47,15 +48,21 @@ private Q_SLOTS: void RefreshGameTable(); void HandleResize(QResizeEvent* event); void OnLanguageChanged(const std::string& locale); + void toggleLabelsUnderIcons(); private: Ui_MainWindow* ui; void AddUiWidgets(); + void UpdateToolbarLabels(); + void UpdateToolbarButtons(); + QWidget* createButtonWithLabel(QPushButton* button, const QString& labelText, bool showLabel); void CreateActions(); + void toggleFullscreen(); void CreateRecentGameActions(); void CreateDockWindows(); void GetPhysicalDevices(); void LoadGameLists(); + #ifdef ENABLE_UPDATER void CheckUpdateMain(bool checkSave); #endif @@ -63,7 +70,6 @@ private: void SetLastUsedTheme(); void SetLastIconSizeBullet(); void SetUiIcons(bool isWhite); - void InstallPkg(); void BootGame(); void AddRecentFiles(QString filePath); void LoadTranslation(); @@ -73,11 +79,13 @@ private: bool isIconBlack = false; bool isTableList = true; bool isGameRunning = false; + bool isWhite = false; + bool is_paused = false; + QActionGroup* m_icon_size_act_group = nullptr; QActionGroup* m_list_mode_act_group = nullptr; QActionGroup* m_theme_act_group = nullptr; QActionGroup* m_recent_files_group = nullptr; - PKG pkg; // Dockable widget frames WindowThemes m_window_themes; GameListUtils m_game_list_utils; @@ -108,19 +116,9 @@ protected: } } - void dropEvent(QDropEvent* event1) override { - const QMimeData* mimeData = event1->mimeData(); - if (mimeData->hasUrls()) { - QList urlList = mimeData->urls(); - int pkgNum = 0; - int nPkg = urlList.size(); - for (const QUrl& url : urlList) { - pkgNum++; - std::filesystem::path path = Common::FS::PathFromQString(url.toLocalFile()); - InstallDragDropPkg(path, pkgNum, nPkg); - } - } - } - void resizeEvent(QResizeEvent* event) override; + + std::filesystem::path last_install_dir = ""; + bool delete_file_on_install = false; + bool use_for_all_queued = false; }; diff --git a/src/qt_gui/main_window_themes.cpp b/src/qt_gui/main_window_themes.cpp index 5fffd4c9e..624673cba 100644 --- a/src/qt_gui/main_window_themes.cpp +++ b/src/qt_gui/main_window_themes.cpp @@ -6,6 +6,7 @@ void WindowThemes::SetWindowTheme(Theme theme, QLineEdit* mw_searchbar) { QPalette themePalette; + qApp->setStyleSheet(""); switch (theme) { case Theme::Dark: mw_searchbar->setStyleSheet( @@ -18,7 +19,7 @@ void WindowThemes::SetWindowTheme(Theme theme, QLineEdit* mw_searchbar) { themePalette.setColor(QPalette::WindowText, Qt::white); themePalette.setColor(QPalette::Base, QColor(20, 20, 20)); themePalette.setColor(QPalette::AlternateBase, QColor(53, 53, 53)); - themePalette.setColor(QPalette::ToolTipBase, Qt::white); + themePalette.setColor(QPalette::ToolTipBase, QColor(20, 20, 20)); themePalette.setColor(QPalette::ToolTipText, Qt::white); themePalette.setColor(QPalette::Text, Qt::white); themePalette.setColor(QPalette::Button, QColor(53, 53, 53)); @@ -36,18 +37,18 @@ void WindowThemes::SetWindowTheme(Theme theme, QLineEdit* mw_searchbar) { "border-radius: 4px; padding: 5px; }" "QLineEdit:focus {" "border: 1px solid #2A82DA; }"); - themePalette.setColor(QPalette::Window, QColor(240, 240, 240)); // Light gray - themePalette.setColor(QPalette::WindowText, Qt::black); // Black - themePalette.setColor(QPalette::Base, QColor(230, 230, 230, 80)); // Grayish - themePalette.setColor(QPalette::ToolTipBase, Qt::black); // Black - themePalette.setColor(QPalette::ToolTipText, Qt::black); // Black - themePalette.setColor(QPalette::Text, Qt::black); // Black - themePalette.setColor(QPalette::Button, QColor(240, 240, 240)); // Light gray - themePalette.setColor(QPalette::ButtonText, Qt::black); // Black - themePalette.setColor(QPalette::BrightText, Qt::red); // Red - themePalette.setColor(QPalette::Link, QColor(42, 130, 218)); // Blue - themePalette.setColor(QPalette::Highlight, QColor(42, 130, 218)); // Blue - themePalette.setColor(QPalette::HighlightedText, Qt::white); // White + themePalette.setColor(QPalette::Window, QColor(240, 240, 240)); // Light gray + themePalette.setColor(QPalette::WindowText, Qt::black); // Black + themePalette.setColor(QPalette::Base, QColor(230, 230, 230, 80)); // Grayish + themePalette.setColor(QPalette::ToolTipBase, QColor(230, 230, 230, 80)); // Grayish + themePalette.setColor(QPalette::ToolTipText, Qt::black); // Black + themePalette.setColor(QPalette::Text, Qt::black); // Black + themePalette.setColor(QPalette::Button, QColor(240, 240, 240)); // Light gray + themePalette.setColor(QPalette::ButtonText, Qt::black); // Black + themePalette.setColor(QPalette::BrightText, Qt::red); // Red + themePalette.setColor(QPalette::Link, QColor(42, 130, 218)); // Blue + themePalette.setColor(QPalette::Highlight, QColor(42, 130, 218)); // Blue + themePalette.setColor(QPalette::HighlightedText, Qt::white); // White qApp->setPalette(themePalette); break; case Theme::Green: @@ -61,8 +62,9 @@ void WindowThemes::SetWindowTheme(Theme theme, QLineEdit* mw_searchbar) { themePalette.setColor(QPalette::WindowText, Qt::white); // White text themePalette.setColor(QPalette::Base, QColor(25, 40, 25)); // Darker green base themePalette.setColor(QPalette::AlternateBase, - QColor(53, 69, 53)); // Dark green alternate base - themePalette.setColor(QPalette::ToolTipBase, Qt::white); // White tooltip background + QColor(53, 69, 53)); // Dark green alternate base + themePalette.setColor(QPalette::ToolTipBase, + QColor(25, 40, 25)); // White tooltip background themePalette.setColor(QPalette::ToolTipText, Qt::white); // White tooltip text themePalette.setColor(QPalette::Text, Qt::white); // White text themePalette.setColor(QPalette::Button, QColor(53, 69, 53)); // Dark green button @@ -84,8 +86,9 @@ void WindowThemes::SetWindowTheme(Theme theme, QLineEdit* mw_searchbar) { themePalette.setColor(QPalette::WindowText, Qt::white); // White text themePalette.setColor(QPalette::Base, QColor(20, 40, 60)); // Darker blue base themePalette.setColor(QPalette::AlternateBase, - QColor(40, 60, 90)); // Dark blue alternate base - themePalette.setColor(QPalette::ToolTipBase, Qt::white); // White tooltip background + QColor(40, 60, 90)); // Dark blue alternate base + themePalette.setColor(QPalette::ToolTipBase, + QColor(20, 40, 60)); // White tooltip background themePalette.setColor(QPalette::ToolTipText, Qt::white); // White tooltip text themePalette.setColor(QPalette::Text, Qt::white); // White text themePalette.setColor(QPalette::Button, QColor(40, 60, 90)); // Dark blue button @@ -108,8 +111,9 @@ void WindowThemes::SetWindowTheme(Theme theme, QLineEdit* mw_searchbar) { themePalette.setColor(QPalette::WindowText, Qt::white); // White text themePalette.setColor(QPalette::Base, QColor(80, 30, 90)); // Darker violet base themePalette.setColor(QPalette::AlternateBase, - QColor(100, 50, 120)); // Violet alternate base - themePalette.setColor(QPalette::ToolTipBase, Qt::white); // White tooltip background + QColor(100, 50, 120)); // Violet alternate base + themePalette.setColor(QPalette::ToolTipBase, + QColor(80, 30, 90)); // White tooltip background themePalette.setColor(QPalette::ToolTipText, Qt::white); // White tooltip text themePalette.setColor(QPalette::Text, Qt::white); // White text themePalette.setColor(QPalette::Button, QColor(100, 50, 120)); // Violet button @@ -132,7 +136,7 @@ void WindowThemes::SetWindowTheme(Theme theme, QLineEdit* mw_searchbar) { themePalette.setColor(QPalette::WindowText, QColor(249, 245, 215)); themePalette.setColor(QPalette::Base, QColor(29, 32, 33)); themePalette.setColor(QPalette::AlternateBase, QColor(50, 48, 47)); - themePalette.setColor(QPalette::ToolTipBase, QColor(249, 245, 215)); + themePalette.setColor(QPalette::ToolTipBase, QColor(29, 32, 33)); themePalette.setColor(QPalette::ToolTipText, QColor(249, 245, 215)); themePalette.setColor(QPalette::Text, QColor(249, 245, 215)); themePalette.setColor(QPalette::Button, QColor(40, 40, 40)); @@ -154,7 +158,7 @@ void WindowThemes::SetWindowTheme(Theme theme, QLineEdit* mw_searchbar) { themePalette.setColor(QPalette::WindowText, QColor(192, 202, 245)); themePalette.setColor(QPalette::Base, QColor(25, 28, 39)); themePalette.setColor(QPalette::AlternateBase, QColor(36, 40, 59)); - themePalette.setColor(QPalette::ToolTipBase, QColor(192, 202, 245)); + themePalette.setColor(QPalette::ToolTipBase, QColor(25, 28, 39)); themePalette.setColor(QPalette::ToolTipText, QColor(192, 202, 245)); themePalette.setColor(QPalette::Text, QColor(192, 202, 245)); themePalette.setColor(QPalette::Button, QColor(30, 30, 41)); @@ -165,5 +169,29 @@ void WindowThemes::SetWindowTheme(Theme theme, QLineEdit* mw_searchbar) { themePalette.setColor(QPalette::HighlightedText, Qt::black); qApp->setPalette(themePalette); break; + case Theme::Oled: + mw_searchbar->setStyleSheet("QLineEdit:focus {" + "border: 1px solid #2A82DA; }"); + themePalette.setColor(QPalette::Window, Qt::black); + themePalette.setColor(QPalette::WindowText, Qt::white); + themePalette.setColor(QPalette::Base, Qt::black); + themePalette.setColor(QPalette::AlternateBase, Qt::black); + themePalette.setColor(QPalette::ToolTipBase, Qt::black); + themePalette.setColor(QPalette::ToolTipText, Qt::white); + themePalette.setColor(QPalette::Text, Qt::white); + themePalette.setColor(QPalette::Button, QColor(5, 5, 5)); + themePalette.setColor(QPalette::ButtonText, Qt::white); + themePalette.setColor(QPalette::BrightText, Qt::red); + themePalette.setColor(QPalette::Link, QColor(42, 130, 218)); + themePalette.setColor(QPalette::Highlight, QColor(42, 130, 218)); + themePalette.setColor(QPalette::HighlightedText, Qt::black); + qApp->setPalette(themePalette); + qApp->setStyleSheet("QLineEdit {" + "background-color: #000000; color: #ffffff; border: 1px solid #a0a0a0; " + "border-radius: 4px; padding: 5px; }" + + "QCheckBox::indicator:unchecked {" + "border: 1px solid #808080; border-radius: 4px; }"); + break; } } \ No newline at end of file diff --git a/src/qt_gui/main_window_themes.h b/src/qt_gui/main_window_themes.h index 0ec2cce58..babde0f27 100644 --- a/src/qt_gui/main_window_themes.h +++ b/src/qt_gui/main_window_themes.h @@ -7,7 +7,7 @@ #include #include -enum class Theme : int { Dark, Light, Green, Blue, Violet, Gruvbox, TokyoNight }; +enum class Theme : int { Dark, Light, Green, Blue, Violet, Gruvbox, TokyoNight, Oled }; class WindowThemes : public QObject { Q_OBJECT diff --git a/src/qt_gui/main_window_ui.h b/src/qt_gui/main_window_ui.h index 0d5038d7e..2c4d4480b 100644 --- a/src/qt_gui/main_window_ui.h +++ b/src/qt_gui/main_window_ui.h @@ -9,9 +9,9 @@ class Ui_MainWindow { public: - QAction* bootInstallPkgAct; QAction* bootGameAct; QAction* addElfFolderAct; + QAction* shadFolderAct; QAction* exitAct; QAction* showGameListAct; QAction* refreshGameListAct; @@ -19,13 +19,14 @@ public: QAction* setIconSizeSmallAct; QAction* setIconSizeMediumAct; QAction* setIconSizeLargeAct; + QAction* toggleLabelsAct; QAction* setlistModeListAct; QAction* setlistModeGridAct; QAction* setlistElfAct; QAction* gameInstallPathAct; QAction* downloadCheatsPatchesAct; QAction* dumpGameListAct; - QAction* pkgViewerAct; + QAction* trophyViewerAct; #ifdef ENABLE_UPDATER QAction* updaterAct; #endif @@ -38,6 +39,7 @@ public: QAction* setThemeViolet; QAction* setThemeGruvbox; QAction* setThemeTokyoNight; + QAction* setThemeOled; QWidget* centralWidget; QLineEdit* mw_searchbar; QPushButton* playButton; @@ -46,6 +48,9 @@ public: QPushButton* refreshButton; QPushButton* settingsButton; QPushButton* controllerButton; + QPushButton* keyboardButton; + QPushButton* fullscreenButton; + QPushButton* restartButton; QWidget* sizeSliderContainer; QHBoxLayout* sizeSliderContainer_layout; @@ -80,15 +85,15 @@ public: MainWindow->setDockNestingEnabled(true); MainWindow->setDockOptions(QMainWindow::AllowNestedDocks | QMainWindow::AllowTabbedDocks | QMainWindow::AnimatedDocks | QMainWindow::GroupedDragging); - bootInstallPkgAct = new QAction(MainWindow); - bootInstallPkgAct->setObjectName("bootInstallPkgAct"); - bootInstallPkgAct->setIcon(QIcon(":images/file_icon.png")); bootGameAct = new QAction(MainWindow); bootGameAct->setObjectName("bootGameAct"); bootGameAct->setIcon(QIcon(":images/play_icon.png")); addElfFolderAct = new QAction(MainWindow); addElfFolderAct->setObjectName("addElfFolderAct"); addElfFolderAct->setIcon(QIcon(":images/folder_icon.png")); + shadFolderAct = new QAction(MainWindow); + shadFolderAct->setObjectName("shadFolderAct"); + shadFolderAct->setIcon(QIcon(":images/folder_icon.png")); exitAct = new QAction(MainWindow); exitAct->setObjectName("exitAct"); exitAct->setIcon(QIcon(":images/exit_icon.png")); @@ -97,7 +102,15 @@ public: showGameListAct->setCheckable(true); refreshGameListAct = new QAction(MainWindow); refreshGameListAct->setObjectName("refreshGameListAct"); - refreshGameListAct->setIcon(QIcon(":images/refresh_icon.png")); + refreshGameListAct->setIcon(QIcon(":images/refreshlist_icon.png")); + + toggleLabelsAct = new QAction(MainWindow); + toggleLabelsAct->setObjectName("toggleLabelsAct"); + toggleLabelsAct->setText( + QCoreApplication::translate("MainWindow", "Show Labels Under Icons")); + toggleLabelsAct->setCheckable(true); + toggleLabelsAct->setChecked(Config::getShowLabelsUnderIcons()); + setIconSizeTinyAct = new QAction(MainWindow); setIconSizeTinyAct->setObjectName("setIconSizeTinyAct"); setIconSizeTinyAct->setCheckable(true); @@ -130,9 +143,10 @@ public: dumpGameListAct = new QAction(MainWindow); dumpGameListAct->setObjectName("dumpGameList"); dumpGameListAct->setIcon(QIcon(":images/dump_icon.png")); - pkgViewerAct = new QAction(MainWindow); - pkgViewerAct->setObjectName("pkgViewer"); - pkgViewerAct->setIcon(QIcon(":images/file_icon.png")); + trophyViewerAct = new QAction(MainWindow); + trophyViewerAct->setObjectName("trophyViewer"); + trophyViewerAct->setIcon(QIcon(":images/trophy_icon.png")); + #ifdef ENABLE_UPDATER updaterAct = new QAction(MainWindow); updaterAct->setObjectName("updaterAct"); @@ -166,6 +180,9 @@ public: setThemeTokyoNight = new QAction(MainWindow); setThemeTokyoNight->setObjectName("setThemeTokyoNight"); setThemeTokyoNight->setCheckable(true); + setThemeOled = new QAction(MainWindow); + setThemeOled->setObjectName("setThemeOled"); + setThemeOled->setCheckable(true); centralWidget = new QWidget(MainWindow); centralWidget->setObjectName("centralWidget"); sizePolicy.setHeightForWidth(centralWidget->sizePolicy().hasHeightForWidth()); @@ -196,16 +213,28 @@ public: stopButton->setIconSize(QSize(40, 40)); refreshButton = new QPushButton(centralWidget); refreshButton->setFlat(true); - refreshButton->setIcon(QIcon(":images/refresh_icon.png")); - refreshButton->setIconSize(QSize(32, 32)); + refreshButton->setIcon(QIcon(":images/refreshlist_icon.png")); + refreshButton->setIconSize(QSize(40, 40)); + fullscreenButton = new QPushButton(centralWidget); + fullscreenButton->setFlat(true); + fullscreenButton->setIcon(QIcon(":images/fullscreen_icon.png")); + fullscreenButton->setIconSize(QSize(38, 38)); settingsButton = new QPushButton(centralWidget); settingsButton->setFlat(true); settingsButton->setIcon(QIcon(":images/settings_icon.png")); - settingsButton->setIconSize(QSize(44, 44)); + settingsButton->setIconSize(QSize(40, 40)); controllerButton = new QPushButton(centralWidget); controllerButton->setFlat(true); controllerButton->setIcon(QIcon(":images/controller_icon.png")); - controllerButton->setIconSize(QSize(40, 40)); + controllerButton->setIconSize(QSize(55, 48)); + keyboardButton = new QPushButton(centralWidget); + keyboardButton->setFlat(true); + keyboardButton->setIcon(QIcon(":images/keyboard_icon.png")); + keyboardButton->setIconSize(QSize(50, 50)); + restartButton = new QPushButton(centralWidget); + restartButton->setFlat(true); + restartButton->setIcon(QIcon(":images/restart_game_icon.png")); + restartButton->setIconSize(QSize(40, 40)); sizeSliderContainer = new QWidget(centralWidget); sizeSliderContainer->setObjectName("sizeSliderContainer"); @@ -272,9 +301,10 @@ public: menuBar->addAction(menuView->menuAction()); menuBar->addAction(menuSettings->menuAction()); menuBar->addAction(menuHelp->menuAction()); - menuFile->addAction(bootInstallPkgAct); menuFile->addAction(bootGameAct); + menuFile->addSeparator(); menuFile->addAction(addElfFolderAct); + menuFile->addAction(shadFolderAct); menuFile->addSeparator(); menuFile->addAction(menuRecent->menuAction()); menuFile->addSeparator(); @@ -284,6 +314,7 @@ public: menuView->addAction(refreshGameListAct); menuView->addAction(menuGame_List_Mode->menuAction()); menuView->addAction(menuGame_List_Icons->menuAction()); + menuView->addAction(toggleLabelsAct); menuView->addAction(menuThemes->menuAction()); menuThemes->addAction(setThemeDark); menuThemes->addAction(setThemeLight); @@ -292,6 +323,7 @@ public: menuThemes->addAction(setThemeViolet); menuThemes->addAction(setThemeGruvbox); menuThemes->addAction(setThemeTokyoNight); + menuThemes->addAction(setThemeOled); menuGame_List_Icons->addAction(setIconSizeTinyAct); menuGame_List_Icons->addAction(setIconSizeSmallAct); menuGame_List_Icons->addAction(setIconSizeMediumAct); @@ -304,7 +336,7 @@ public: menuSettings->addAction(menuUtils->menuAction()); menuUtils->addAction(downloadCheatsPatchesAct); menuUtils->addAction(dumpGameListAct); - menuUtils->addAction(pkgViewerAct); + menuUtils->addAction(trophyViewerAct); #ifdef ENABLE_UPDATER menuHelp->addAction(updaterAct); #endif @@ -319,8 +351,6 @@ public: MainWindow->setWindowTitle(QCoreApplication::translate("MainWindow", "shadPS4", nullptr)); addElfFolderAct->setText( QCoreApplication::translate("MainWindow", "Open/Add Elf Folder", nullptr)); - bootInstallPkgAct->setText( - QCoreApplication::translate("MainWindow", "Install Packages (PKG)", nullptr)); bootGameAct->setText(QCoreApplication::translate("MainWindow", "Boot Game", nullptr)); #ifdef ENABLE_UPDATER updaterAct->setText( @@ -329,10 +359,10 @@ public: aboutAct->setText(QCoreApplication::translate("MainWindow", "About shadPS4", nullptr)); configureAct->setText(QCoreApplication::translate("MainWindow", "Configure...", nullptr)); #if QT_CONFIG(tooltip) - bootInstallPkgAct->setToolTip(QCoreApplication::translate( - "MainWindow", "Install application from a .pkg file", nullptr)); #endif // QT_CONFIG(tooltip) menuRecent->setTitle(QCoreApplication::translate("MainWindow", "Recent Games", nullptr)); + shadFolderAct->setText( + QCoreApplication::translate("MainWindow", "Open shadPS4 Folder", nullptr)); exitAct->setText(QCoreApplication::translate("MainWindow", "Exit", nullptr)); #if QT_CONFIG(tooltip) exitAct->setToolTip(QCoreApplication::translate("MainWindow", "Exit shadPS4", nullptr)); @@ -360,7 +390,8 @@ public: QCoreApplication::translate("MainWindow", "Download Cheats/Patches", nullptr)); dumpGameListAct->setText( QCoreApplication::translate("MainWindow", "Dump Game List", nullptr)); - pkgViewerAct->setText(QCoreApplication::translate("MainWindow", "PKG Viewer", nullptr)); + trophyViewerAct->setText( + QCoreApplication::translate("MainWindow", "Trophy Viewer", nullptr)); mw_searchbar->setPlaceholderText( QCoreApplication::translate("MainWindow", "Search...", nullptr)); menuFile->setTitle(QCoreApplication::translate("MainWindow", "File", nullptr)); @@ -380,10 +411,11 @@ public: setThemeViolet->setText(QCoreApplication::translate("MainWindow", "Violet", nullptr)); setThemeGruvbox->setText("Gruvbox"); setThemeTokyoNight->setText("Tokyo Night"); + setThemeOled->setText("OLED"); toolBar->setWindowTitle(QCoreApplication::translate("MainWindow", "toolBar", nullptr)); } // retranslateUi }; namespace Ui { class MainWindow : public Ui_MainWindow {}; -} // namespace Ui \ No newline at end of file +} // namespace Ui diff --git a/src/qt_gui/pkg_viewer.cpp b/src/qt_gui/pkg_viewer.cpp deleted file mode 100644 index 0ffb9b579..000000000 --- a/src/qt_gui/pkg_viewer.cpp +++ /dev/null @@ -1,223 +0,0 @@ -// SPDX-FileCopyrightText: Copyright 2024 shadPS4 Emulator Project -// SPDX-License-Identifier: GPL-2.0-or-later - -#include "pkg_viewer.h" - -PKGViewer::PKGViewer(std::shared_ptr game_info_get, QWidget* parent, - std::function InstallDragDropPkg) - : QMainWindow(), m_game_info(game_info_get) { - this->resize(1280, 720); - this->setAttribute(Qt::WA_DeleteOnClose); - dir_list_std = Config::getPkgViewer(); - dir_list.clear(); - for (const auto& str : dir_list_std) { - dir_list.append(QString::fromStdString(str)); - } - statusBar = new QStatusBar(treeWidget); - this->setStatusBar(statusBar); - treeWidget = new QTreeWidget(this); - treeWidget->setColumnCount(9); - QStringList headers; - headers << "Name" - << "Serial" - << "Installed" - << "Size" - << "Category" - << "Type" - << "App Ver" - << "FW" - << "Region" - << "Flags" - << "Path"; - treeWidget->setHeaderLabels(headers); - treeWidget->header()->setDefaultAlignment(Qt::AlignCenter); - treeWidget->setContextMenuPolicy(Qt::CustomContextMenu); - treeWidget->setColumnWidth(8, 170); - this->setCentralWidget(treeWidget); - QMenuBar* menuBar = new QMenuBar(this); - menuBar->setContextMenuPolicy(Qt::PreventContextMenu); - QMenu* fileMenu = menuBar->addMenu(tr("&File")); - QAction* openFolderAct = new QAction(tr("Open Folder"), this); - fileMenu->addAction(openFolderAct); - this->setMenuBar(menuBar); - CheckPKGFolders(); // Check for new PKG files in existing folders. - ProcessPKGInfo(); - - connect(openFolderAct, &QAction::triggered, this, &PKGViewer::OpenPKGFolder); - - connect(treeWidget, &QTreeWidget::customContextMenuRequested, this, - [=, this](const QPoint& pos) { - m_gui_context_menus.RequestGameMenuPKGViewer(pos, m_full_pkg_list, treeWidget, - InstallDragDropPkg); - }); - - connect(parent, &QWidget::destroyed, this, [this]() { this->deleteLater(); }); -} - -PKGViewer::~PKGViewer() {} - -void PKGViewer::OpenPKGFolder() { - QString folderPath = - QFileDialog::getExistingDirectory(this, tr("Open Folder"), QDir::homePath()); - if (!dir_list.contains(folderPath)) { - dir_list.append(folderPath); - QDir directory(folderPath); - QFileInfoList fileInfoList = directory.entryInfoList(QDir::Files); - for (const QFileInfo& fileInfo : fileInfoList) { - QString file_ext = fileInfo.suffix(); - if (fileInfo.isFile() && file_ext == "pkg") { - m_pkg_list.append(fileInfo.absoluteFilePath()); - } - } - std::sort(m_pkg_list.begin(), m_pkg_list.end()); - ProcessPKGInfo(); - dir_list_std.clear(); - for (auto dir : dir_list) { - dir_list_std.push_back(dir.toStdString()); - } - Config::setPkgViewer(dir_list_std); - } else { - // qDebug() << "Folder selection canceled."; - } -} - -void PKGViewer::CheckPKGFolders() { // Check for new PKG file additions. - m_pkg_list.clear(); - for (const QString& dir : dir_list) { - QDir directory(dir); - QFileInfoList fileInfoList = directory.entryInfoList(QDir::Files); - for (const QFileInfo& fileInfo : fileInfoList) { - QString file_ext = fileInfo.suffix(); - if (fileInfo.isFile() && file_ext == "pkg") { - m_pkg_list.append(fileInfo.absoluteFilePath()); - } - } - } - std::sort(m_pkg_list.begin(), m_pkg_list.end()); -} - -void PKGViewer::ProcessPKGInfo() { - treeWidget->clear(); - map_strings.clear(); - map_integers.clear(); - m_pkg_app_list.clear(); - m_pkg_patch_list.clear(); - m_full_pkg_list.clear(); - for (int i = 0; i < m_pkg_list.size(); i++) { - std::filesystem::path path = Common::FS::PathFromQString(m_pkg_list[i]); - std::string failreason; - if (!package.Open(path, failreason)) { - QMessageBox::critical(this, tr("PKG ERROR"), QString::fromStdString(failreason)); - return; - } - psf.Open(package.sfo); - QString title_name = - QString::fromStdString(std::string{psf.GetString("TITLE").value_or("Unknown")}); - QString title_id = - QString::fromStdString(std::string{psf.GetString("TITLE_ID").value_or("Unknown")}); - QString app_type = GameListUtils::GetAppType(psf.GetInteger("APP_TYPE").value_or(0)); - QString app_version = - QString::fromStdString(std::string{psf.GetString("APP_VER").value_or("Unknown")}); - QString title_category = - QString::fromStdString(std::string{psf.GetString("CATEGORY").value_or("Unknown")}); - QString pkg_size = GameListUtils::FormatSize(package.GetPkgHeader().pkg_size); - pkg_content_flag = package.GetPkgHeader().pkg_content_flags; - QString flagss = ""; - for (const auto& flag : package.flagNames) { - if (package.isFlagSet(pkg_content_flag, flag.first)) { - if (!flagss.isEmpty()) - flagss += (", "); - flagss += QString::fromStdString(flag.second.data()); - } - } - - QString fw_ = "Unknown"; - if (const auto fw_int_opt = psf.GetInteger("SYSTEM_VER"); fw_int_opt.has_value()) { - const u32 fw_int = *fw_int_opt; - if (fw_int == 0) { - fw_ = "0.00"; - } else { - QString fw = QString::number(fw_int, 16); - fw_ = fw.length() > 7 ? QString::number(fw_int, 16).left(3).insert(2, '.') - : fw.left(3).insert(1, '.'); - } - } - char region = package.GetPkgHeader().pkg_content_id[0]; - QString pkg_info = ""; - if (title_category == "gd" && !flagss.contains("PATCH")) { - title_category = "App"; - pkg_info = title_name + ";;" + title_id + ";;" + pkg_size + ";;" + title_category + - ";;" + app_type + ";;" + app_version + ";;" + fw_ + ";;" + - game_list_util.GetRegion(region) + ";;" + flagss + ";;" + m_pkg_list[i]; - m_pkg_app_list.append(pkg_info); - } else { - title_category = "Patch"; - pkg_info = title_name + ";;" + title_id + ";;" + pkg_size + ";;" + title_category + - ";;" + app_type + ";;" + app_version + ";;" + fw_ + ";;" + - game_list_util.GetRegion(region) + ";;" + flagss + ";;" + m_pkg_list[i]; - m_pkg_patch_list.append(pkg_info); - } - } - std::sort(m_pkg_app_list.begin(), m_pkg_app_list.end()); - for (int i = 0; i < m_pkg_app_list.size(); i++) { - QTreeWidgetItem* treeItem = new QTreeWidgetItem(treeWidget); - QStringList pkg_app_ = m_pkg_app_list[i].split(";;"); - m_full_pkg_list.append(m_pkg_app_list[i]); - treeItem->setExpanded(true); - treeItem->setText(0, pkg_app_[0]); - treeItem->setText(1, pkg_app_[1]); - treeItem->setText(3, pkg_app_[2]); - treeItem->setTextAlignment(3, Qt::AlignCenter); - treeItem->setText(4, pkg_app_[3]); - treeItem->setTextAlignment(4, Qt::AlignCenter); - treeItem->setText(5, pkg_app_[4]); - treeItem->setTextAlignment(5, Qt::AlignCenter); - treeItem->setText(6, pkg_app_[5]); - treeItem->setTextAlignment(6, Qt::AlignCenter); - treeItem->setText(7, pkg_app_[6]); - treeItem->setTextAlignment(7, Qt::AlignCenter); - treeItem->setText(8, pkg_app_[7]); - treeItem->setTextAlignment(8, Qt::AlignCenter); - treeItem->setText(9, pkg_app_[8]); - treeItem->setText(10, pkg_app_[9]); - for (const GameInfo& info : m_game_info->m_games) { // Check if game is installed. - if (info.serial == pkg_app_[1].toStdString()) { - treeItem->setText(2, QChar(0x2713)); - treeItem->setTextAlignment(2, Qt::AlignCenter); - } - } - for (const QString& item : m_pkg_patch_list) { - QStringList pkg_patch_ = item.split(";;"); - if (pkg_patch_[1] == pkg_app_[1]) { // check patches with serial. - m_full_pkg_list.append(item); - QTreeWidgetItem* childItem = new QTreeWidgetItem(treeItem); - childItem->setText(0, pkg_patch_[0]); - childItem->setText(1, pkg_patch_[1]); - childItem->setText(3, pkg_patch_[2]); - childItem->setTextAlignment(3, Qt::AlignCenter); - childItem->setText(4, pkg_patch_[3]); - childItem->setTextAlignment(4, Qt::AlignCenter); - childItem->setText(5, pkg_patch_[4]); - childItem->setTextAlignment(5, Qt::AlignCenter); - childItem->setText(6, pkg_patch_[5]); - childItem->setTextAlignment(6, Qt::AlignCenter); - childItem->setText(7, pkg_patch_[6]); - childItem->setTextAlignment(7, Qt::AlignCenter); - childItem->setText(8, pkg_patch_[7]); - childItem->setTextAlignment(8, Qt::AlignCenter); - childItem->setText(9, pkg_patch_[8]); - childItem->setText(10, pkg_patch_[9]); - } - } - } - - for (int column = 0; column < treeWidget->columnCount() - 2; ++column) { - // Resize the column to fit its contents - treeWidget->resizeColumnToContents(column); - } - // Update status bar. - statusBar->clearMessage(); - int numPkgs = m_pkg_list.size(); - QString statusMessage = QString::number(numPkgs) + " Package."; - statusBar->showMessage(statusMessage); -} \ No newline at end of file diff --git a/src/qt_gui/pkg_viewer.h b/src/qt_gui/pkg_viewer.h deleted file mode 100644 index 265a03b92..000000000 --- a/src/qt_gui/pkg_viewer.h +++ /dev/null @@ -1,62 +0,0 @@ -// SPDX-FileCopyrightText: Copyright 2024 shadPS4 Emulator Project -// SPDX-License-Identifier: GPL-2.0-or-later - -#pragma once - -#include -#include -#include - -#include "common/io_file.h" -#include "core/file_format/pkg.h" -#include "core/file_format/pkg_type.h" -#include "core/file_format/psf.h" -#include "game_info.h" -#include "game_list_utils.h" -#include "gui_context_menus.h" - -class PKGViewer : public QMainWindow { - Q_OBJECT -public: - explicit PKGViewer( - std::shared_ptr game_info_get, QWidget* parent, - std::function InstallDragDropPkg = nullptr); - ~PKGViewer(); - void OpenPKGFolder(); - void CheckPKGFolders(); - void ProcessPKGInfo(); - -private: - GuiContextMenus m_gui_context_menus; - PKG package; - PSF psf; - PKGHeader pkgheader; - PKGEntry entry; - PSFHeader header; - char pkgTitleID[9]; - std::vector pkg; - u64 pkgSize = 0; - std::unordered_map map_strings; - std::unordered_map map_integers; - - u32_be pkg_content_flag; - std::shared_ptr m_game_info; - GameListUtils game_list_util; - // Status bar - QStatusBar* statusBar; - - std::vector> appTypes = { - {0, "FULL APP"}, - {1, "UPGRADABLE"}, - {2, "DEMO"}, - {3, "FREEMIUM"}, - }; - - QStringList m_full_pkg_list; - QStringList m_pkg_app_list; - QStringList m_pkg_patch_list; - QStringList m_pkg_list; - QStringList dir_list; - std::vector dir_list_std; - QTreeWidget* treeWidget = nullptr; -}; \ No newline at end of file diff --git a/src/qt_gui/settings_dialog.cpp b/src/qt_gui/settings_dialog.cpp index 6d76a5318..383cad8fa 100644 --- a/src/qt_gui/settings_dialog.cpp +++ b/src/qt_gui/settings_dialog.cpp @@ -5,6 +5,7 @@ #include #include #include +#include #include #include "common/config.h" @@ -17,6 +18,7 @@ #ifdef ENABLE_UPDATER #include "check_update.h" #endif +#include #include #include "background_music_player.h" #include "common/logging/backend.h" @@ -57,6 +59,13 @@ QStringList languageNames = {"Arabic", const QVector languageIndexes = {21, 23, 14, 6, 18, 1, 12, 22, 2, 4, 25, 24, 29, 5, 0, 9, 15, 16, 17, 7, 26, 8, 11, 20, 3, 13, 27, 10, 19, 30, 28}; +QMap channelMap; +QMap logTypeMap; +QMap screenModeMap; +QMap chooseHomeTabMap; + +int backgroundImageOpacitySlider_backup; +int bgm_volume_backup; SettingsDialog::SettingsDialog(std::span physical_devices, std::shared_ptr m_compat_info, @@ -64,13 +73,24 @@ SettingsDialog::SettingsDialog(std::span physical_devices, : QDialog(parent), ui(new Ui::SettingsDialog) { ui->setupUi(this); ui->tabWidgetSettings->setUsesScrollButtons(false); + initialHeight = this->height(); const auto config_dir = Common::FS::GetUserPath(Common::FS::PathType::UserDir); ui->buttonBox->button(QDialogButtonBox::StandardButton::Close)->setFocus(); + channelMap = {{tr("Release"), "Release"}, {tr("Nightly"), "Nightly"}}; + logTypeMap = {{tr("async"), "async"}, {tr("sync"), "sync"}}; + screenModeMap = {{tr("Fullscreen (Borderless)"), "Fullscreen (Borderless)"}, + {tr("Windowed"), "Windowed"}, + {tr("Fullscreen"), "Fullscreen"}}; + chooseHomeTabMap = {{tr("General"), "General"}, {tr("GUI"), "GUI"}, + {tr("Graphics"), "Graphics"}, {tr("User"), "User"}, + {tr("Input"), "Input"}, {tr("Paths"), "Paths"}, + {tr("Debug"), "Debug"}}; + // Add list of available GPUs - ui->graphicsAdapterBox->addItem("Auto Select"); // -1, auto selection + ui->graphicsAdapterBox->addItem(tr("Auto Select")); // -1, auto selection for (const auto& device : physical_devices) { ui->graphicsAdapterBox->addItem(device); } @@ -101,6 +121,7 @@ SettingsDialog::SettingsDialog(std::span physical_devices, connect(ui->buttonBox, &QDialogButtonBox::clicked, this, [this, config_dir](QAbstractButton* button) { if (button == ui->buttonBox->button(QDialogButtonBox::Save)) { + is_saving = true; UpdateSettings(); Config::save(config_dir / "config.toml"); QWidget::close(); @@ -112,6 +133,10 @@ SettingsDialog::SettingsDialog(std::span physical_devices, Config::save(config_dir / "config.toml"); LoadValuesFromConfig(); } else if (button == ui->buttonBox->button(QDialogButtonBox::Close)) { + ui->backgroundImageOpacitySlider->setValue(backgroundImageOpacitySlider_backup); + emit BackgroundOpacityChanged(backgroundImageOpacitySlider_backup); + ui->BGMVolumeSlider->setValue(bgm_volume_backup); + BackgroundMusicPlayer::getInstance().setVolume(bgm_volume_backup); ResetInstallFolders(); } if (Common::Log::IsActive()) { @@ -135,13 +160,23 @@ SettingsDialog::SettingsDialog(std::span physical_devices, #if (QT_VERSION < QT_VERSION_CHECK(6, 7, 0)) connect(ui->updateCheckBox, &QCheckBox::stateChanged, this, [](int state) { Config::setAutoUpdate(state == Qt::Checked); }); + + connect(ui->changelogCheckBox, &QCheckBox::stateChanged, this, + [](int state) { Config::setAlwaysShowChangelog(state == Qt::Checked); }); #else connect(ui->updateCheckBox, &QCheckBox::checkStateChanged, this, [](Qt::CheckState state) { Config::setAutoUpdate(state == Qt::Checked); }); + + connect(ui->changelogCheckBox, &QCheckBox::checkStateChanged, this, + [](Qt::CheckState state) { Config::setAlwaysShowChangelog(state == Qt::Checked); }); #endif connect(ui->updateComboBox, &QComboBox::currentTextChanged, this, - [](const QString& channel) { Config::setUpdateChannel(channel.toStdString()); }); + [this](const QString& channel) { + if (channelMap.contains(channel)) { + Config::setUpdateChannel(channelMap.value(channel).toStdString()); + } + }); connect(ui->checkUpdateButton, &QPushButton::clicked, this, []() { auto checkUpdate = new CheckUpdate(true); @@ -149,7 +184,6 @@ SettingsDialog::SettingsDialog(std::span physical_devices, }); #else ui->updaterGroupBox->setVisible(false); - ui->GUIgroupBox->setMaximumSize(265, 16777215); #endif connect(ui->updateCompatibilityButton, &QPushButton::clicked, this, [this, parent, m_compat_info]() { @@ -158,13 +192,48 @@ SettingsDialog::SettingsDialog(std::span physical_devices, }); #if (QT_VERSION < QT_VERSION_CHECK(6, 7, 0)) - connect(ui->enableCompatibilityCheckBox, &QCheckBox::stateChanged, this, [this](int state) { + connect(ui->enableCompatibilityCheckBox, &QCheckBox::stateChanged, this, + [this, m_compat_info](int state) { #else connect(ui->enableCompatibilityCheckBox, &QCheckBox::checkStateChanged, this, - [this](Qt::CheckState state) { + [this, m_compat_info](Qt::CheckState state) { #endif - Config::setCompatibilityEnabled(state); - emit CompatibilityChanged(); + Config::setCompatibilityEnabled(state); + if (state) { + m_compat_info->LoadCompatibilityFile(); + } + emit CompatibilityChanged(); + }); + } + + // Gui TAB + { + connect(ui->backgroundImageOpacitySlider, &QSlider::valueChanged, this, + [this](int value) { emit BackgroundOpacityChanged(value); }); + + connect(ui->BGMVolumeSlider, &QSlider::valueChanged, this, + [](int value) { BackgroundMusicPlayer::getInstance().setVolume(value); }); + + connect(ui->chooseHomeTabComboBox, &QComboBox::currentTextChanged, this, + [](const QString& hometab) { Config::setChooseHomeTab(hometab.toStdString()); }); + +#if (QT_VERSION < QT_VERSION_CHECK(6, 7, 0)) + connect(ui->showBackgroundImageCheckBox, &QCheckBox::stateChanged, this, [](int state) { +#else + connect(ui->showBackgroundImageCheckBox, &QCheckBox::checkStateChanged, this, + [](Qt::CheckState state) { +#endif + Config::setShowBackgroundImage(state == Qt::Checked); + }); + } + + // User TAB + { + connect(ui->OpenCustomTrophyLocationButton, &QPushButton::clicked, this, []() { + QString userPath; + Common::FS::PathToQString(userPath, + Common::FS::GetUserPath(Common::FS::PathType::CustomTrophy)); + QDesktopServices::openUrl(QUrl::fromLocalFile(userPath)); }); } @@ -177,12 +246,13 @@ SettingsDialog::SettingsDialog(std::span physical_devices, // PATH TAB { connect(ui->addFolderButton, &QPushButton::clicked, this, [this]() { - const auto config_dir = Config::getGameInstallDirs(); QString file_path_string = QFileDialog::getExistingDirectory(this, tr("Directory to install games")); auto file_path = Common::FS::PathFromQString(file_path_string); - if (!file_path.empty() && Config::addGameInstallDir(file_path)) { + if (!file_path.empty() && Config::addGameInstallDir(file_path, true)) { QListWidgetItem* item = new QListWidgetItem(file_path_string); + item->setFlags(item->flags() | Qt::ItemIsUserCheckable); + item->setCheckState(Qt::Checked); ui->gameFoldersListWidget->addItem(item); } }); @@ -201,6 +271,46 @@ SettingsDialog::SettingsDialog(std::span physical_devices, delete selected_item; } }); + + connect(ui->browseButton, &QPushButton::clicked, this, [this]() { + const auto save_data_path = Config::GetSaveDataPath(); + QString initial_path; + Common::FS::PathToQString(initial_path, save_data_path); + + QString save_data_path_string = + QFileDialog::getExistingDirectory(this, tr("Directory to save data"), initial_path); + + auto file_path = Common::FS::PathFromQString(save_data_path_string); + if (!file_path.empty()) { + Config::setSaveDataPath(file_path); + ui->currentSaveDataPath->setText(save_data_path_string); + } + }); + + connect(ui->PortableUserButton, &QPushButton::clicked, this, []() { + QString userDir; + Common::FS::PathToQString(userDir, std::filesystem::current_path() / "user"); + if (std::filesystem::exists(std::filesystem::current_path() / "user")) { + QMessageBox::information(NULL, tr("Cannot create portable user folder"), + tr("%1 already exists").arg(userDir)); + } else { + std::filesystem::copy(Common::FS::GetUserPath(Common::FS::PathType::UserDir), + std::filesystem::current_path() / "user", + std::filesystem::copy_options::recursive); + QMessageBox::information(NULL, tr("Portable user folder created"), + tr("%1 successfully created.").arg(userDir)); + } + }); + } + + // DEBUG TAB + { + connect(ui->OpenLogLocationButton, &QPushButton::clicked, this, []() { + QString userPath; + Common::FS::PathToQString(userPath, + Common::FS::GetUserPath(Common::FS::PathType::LogDir)); + QDesktopServices::openUrl(QUrl::fromLocalFile(userPath)); + }); } // Descriptions @@ -208,7 +318,6 @@ SettingsDialog::SettingsDialog(std::span physical_devices, // General ui->consoleLanguageGroupBox->installEventFilter(this); ui->emulatorLanguageGroupBox->installEventFilter(this); - ui->fullscreenCheckBox->installEventFilter(this); ui->separateUpdatesCheckBox->installEventFilter(this); ui->showSplashCheckBox->installEventFilter(this); ui->discordRPCCheckbox->installEventFilter(this); @@ -220,12 +329,16 @@ SettingsDialog::SettingsDialog(std::span physical_devices, #ifdef ENABLE_UPDATER ui->updaterGroupBox->installEventFilter(this); #endif - ui->GUIgroupBox->installEventFilter(this); + ui->GUIBackgroundImageGroupBox->installEventFilter(this); + ui->GUIMusicGroupBox->installEventFilter(this); ui->disableTrophycheckBox->installEventFilter(this); ui->enableCompatibilityCheckBox->installEventFilter(this); ui->checkCompatibilityOnStartupCheckBox->installEventFilter(this); ui->updateCompatibilityButton->installEventFilter(this); + // User + ui->OpenCustomTrophyLocationButton->installEventFilter(this); + // Input ui->hideCursorGroupBox->installEventFilter(this); ui->idleTimeoutGroupBox->installEventFilter(this); @@ -233,11 +346,11 @@ SettingsDialog::SettingsDialog(std::span physical_devices, // Graphics ui->graphicsAdapterGroupBox->installEventFilter(this); - ui->widthGroupBox->installEventFilter(this); - ui->heightGroupBox->installEventFilter(this); + ui->windowSizeGroupBox->installEventFilter(this); ui->heightDivider->installEventFilter(this); ui->dumpShadersCheckBox->installEventFilter(this); ui->nullGpuCheckBox->installEventFilter(this); + ui->enableHDRCheckBox->installEventFilter(this); // Paths ui->gameFoldersGroupBox->installEventFilter(this); @@ -245,14 +358,34 @@ SettingsDialog::SettingsDialog(std::span physical_devices, ui->addFolderButton->installEventFilter(this); ui->removeFolderButton->installEventFilter(this); + ui->saveDataGroupBox->installEventFilter(this); + ui->currentSaveDataPath->installEventFilter(this); + ui->browseButton->installEventFilter(this); + ui->PortableUserFolderGroupBox->installEventFilter(this); + // Debug ui->debugDump->installEventFilter(this); ui->vkValidationCheckBox->installEventFilter(this); ui->vkSyncValidationCheckBox->installEventFilter(this); ui->rdocCheckBox->installEventFilter(this); + ui->crashDiagnosticsCheckBox->installEventFilter(this); + ui->guestMarkersCheckBox->installEventFilter(this); + ui->hostMarkersCheckBox->installEventFilter(this); + ui->collectShaderCheckBox->installEventFilter(this); + ui->copyGPUBuffersCheckBox->installEventFilter(this); } } +void SettingsDialog::closeEvent(QCloseEvent* event) { + if (!is_saving) { + ui->backgroundImageOpacitySlider->setValue(backgroundImageOpacitySlider_backup); + emit BackgroundOpacityChanged(backgroundImageOpacitySlider_backup); + ui->BGMVolumeSlider->setValue(bgm_volume_backup); + BackgroundMusicPlayer::getInstance().setVolume(bgm_volume_backup); + } + QDialog::closeEvent(event); +} + void SettingsDialog::LoadValuesFromConfig() { std::filesystem::path userdir = Common::FS::GetUserPath(Common::FS::PathType::UserDir); @@ -275,13 +408,18 @@ void SettingsDialog::LoadValuesFromConfig() { const QVector languageIndexes = {21, 23, 14, 6, 18, 1, 12, 22, 2, 4, 25, 24, 29, 5, 0, 9, 15, 16, 17, 7, 26, 8, 11, 20, 3, 13, 27, 10, 19, 30, 28}; + const auto save_data_path = Config::GetSaveDataPath(); + QString save_data_path_string; + Common::FS::PathToQString(save_data_path_string, save_data_path); + ui->currentSaveDataPath->setText(save_data_path_string); + ui->consoleLanguageComboBox->setCurrentIndex( std::distance(languageIndexes.begin(), std::find(languageIndexes.begin(), languageIndexes.end(), toml::find_or(data, "Settings", "consoleLanguage", 6))) % languageIndexes.size()); ui->emulatorLanguageComboBox->setCurrentIndex( - languages[toml::find_or(data, "GUI", "emulatorLanguage", "en")]); + languages[toml::find_or(data, "GUI", "emulatorLanguage", "en_US")]); ui->hideCursorComboBox->setCurrentIndex(toml::find_or(data, "Input", "cursorState", 1)); OnCursorStateChanged(toml::find_or(data, "Input", "cursorState", 1)); ui->idleTimeoutSpinBox->setValue(toml::find_or(data, "Input", "cursorHideTimeout", 5)); @@ -293,18 +431,33 @@ void SettingsDialog::LoadValuesFromConfig() { ui->vblankSpinBox->setValue(toml::find_or(data, "GPU", "vblankDivider", 1)); ui->dumpShadersCheckBox->setChecked(toml::find_or(data, "GPU", "dumpShaders", false)); ui->nullGpuCheckBox->setChecked(toml::find_or(data, "GPU", "nullGpu", false)); + ui->enableHDRCheckBox->setChecked(toml::find_or(data, "GPU", "allowHDR", false)); ui->playBGMCheckBox->setChecked(toml::find_or(data, "General", "playBGM", false)); ui->disableTrophycheckBox->setChecked( toml::find_or(data, "General", "isTrophyPopupDisabled", false)); + ui->popUpDurationSpinBox->setValue(Config::getTrophyNotificationDuration()); + + QString side = QString::fromStdString(Config::sideTrophy()); + + ui->radioButton_Left->setChecked(side == "left"); + ui->radioButton_Right->setChecked(side == "right"); + ui->radioButton_Top->setChecked(side == "top"); + ui->radioButton_Bottom->setChecked(side == "bottom"); + ui->BGMVolumeSlider->setValue(toml::find_or(data, "General", "BGMvolume", 50)); ui->discordRPCCheckbox->setChecked( toml::find_or(data, "General", "enableDiscordRPC", true)); - ui->fullscreenCheckBox->setChecked(toml::find_or(data, "General", "Fullscreen", false)); + QString translatedText_FullscreenMode = + screenModeMap.key(QString::fromStdString(Config::getFullscreenMode())); + ui->displayModeComboBox->setCurrentText(translatedText_FullscreenMode); ui->separateUpdatesCheckBox->setChecked( toml::find_or(data, "General", "separateUpdateEnabled", false)); + ui->gameSizeCheckBox->setChecked(toml::find_or(data, "GUI", "loadGameSizeEnabled", true)); ui->showSplashCheckBox->setChecked(toml::find_or(data, "General", "showSplash", false)); - ui->logTypeComboBox->setCurrentText( - QString::fromStdString(toml::find_or(data, "General", "logType", "async"))); + QString translatedText_logType = logTypeMap.key(QString::fromStdString(Config::getLogType())); + if (!translatedText_logType.isEmpty()) { + ui->logTypeComboBox->setCurrentText(translatedText_logType); + } ui->logFilterLineEdit->setText( QString::fromStdString(toml::find_or(data, "General", "logFilter", ""))); ui->userNameLineEdit->setText( @@ -313,10 +466,21 @@ void SettingsDialog::LoadValuesFromConfig() { QString::fromStdString(toml::find_or(data, "Keys", "TrophyKey", ""))); ui->trophyKeyLineEdit->setEchoMode(QLineEdit::Password); ui->debugDump->setChecked(toml::find_or(data, "Debug", "DebugDump", false)); + ui->separateLogFilesCheckbox->setChecked( + toml::find_or(data, "Debug", "isSeparateLogFilesEnabled", false)); ui->vkValidationCheckBox->setChecked(toml::find_or(data, "Vulkan", "validation", false)); ui->vkSyncValidationCheckBox->setChecked( toml::find_or(data, "Vulkan", "validation_sync", false)); ui->rdocCheckBox->setChecked(toml::find_or(data, "Vulkan", "rdocEnable", false)); + ui->crashDiagnosticsCheckBox->setChecked( + toml::find_or(data, "Vulkan", "crashDiagnostic", false)); + ui->guestMarkersCheckBox->setChecked( + toml::find_or(data, "Vulkan", "guestMarkers", false)); + ui->hostMarkersCheckBox->setChecked(toml::find_or(data, "Vulkan", "hostMarkers", false)); + ui->copyGPUBuffersCheckBox->setChecked( + toml::find_or(data, "GPU", "copyGPUBuffers", false)); + ui->collectShaderCheckBox->setChecked( + toml::find_or(data, "Debug", "CollectShader", false)); ui->enableCompatibilityCheckBox->setChecked( toml::find_or(data, "General", "compatibilityEnabled", false)); ui->checkCompatibilityOnStartupCheckBox->setChecked( @@ -324,24 +488,45 @@ void SettingsDialog::LoadValuesFromConfig() { #ifdef ENABLE_UPDATER ui->updateCheckBox->setChecked(toml::find_or(data, "General", "autoUpdate", false)); - std::string updateChannel = toml::find_or(data, "General", "updateChannel", ""); - if (updateChannel != "Release" && updateChannel != "Nightly") { - if (Common::isRelease) { - updateChannel = "Release"; - } else { - updateChannel = "Nightly"; - } - } - ui->updateComboBox->setCurrentText(QString::fromStdString(updateChannel)); + ui->changelogCheckBox->setChecked( + toml::find_or(data, "General", "alwaysShowChangelog", false)); + + QString updateChannel = QString::fromStdString(Config::getUpdateChannel()); + ui->updateComboBox->setCurrentText( + channelMap.key(updateChannel != "Release" && updateChannel != "Nightly" + ? (Common::isRelease ? "Release" : "Nightly") + : updateChannel)); #endif + std::string chooseHomeTab = + toml::find_or(data, "General", "chooseHomeTab", "General"); + QString translatedText = chooseHomeTabMap.key(QString::fromStdString(chooseHomeTab)); + if (translatedText.isEmpty()) { + translatedText = tr("General"); + } + ui->chooseHomeTabComboBox->setCurrentText(translatedText); + + QStringList tabNames = {tr("General"), tr("GUI"), tr("Graphics"), tr("User"), + tr("Input"), tr("Paths"), tr("Debug")}; + int indexTab = tabNames.indexOf(translatedText); + if (indexTab == -1) + indexTab = 0; + ui->tabWidgetSettings->setCurrentIndex(indexTab); + QString backButtonBehavior = QString::fromStdString( toml::find_or(data, "Input", "backButtonBehavior", "left")); int index = ui->backButtonBehaviorComboBox->findData(backButtonBehavior); ui->backButtonBehaviorComboBox->setCurrentIndex(index != -1 ? index : 0); + ui->motionControlsCheckBox->setChecked( + toml::find_or(data, "Input", "isMotionControlsEnabled", true)); ui->removeFolderButton->setEnabled(!ui->gameFoldersListWidget->selectedItems().isEmpty()); ResetInstallFolders(); + ui->backgroundImageOpacitySlider->setValue(Config::getBackgroundImageOpacity()); + ui->showBackgroundImageCheckBox->setChecked(Config::getShowBackgroundImage()); + + backgroundImageOpacitySlider_backup = Config::getBackgroundImageOpacity(); + bgm_volume_backup = Config::getBGMvolume(); } void SettingsDialog::InitializeEmulatorLanguages() { @@ -407,91 +592,115 @@ int SettingsDialog::exec() { SettingsDialog::~SettingsDialog() {} void SettingsDialog::updateNoteTextEdit(const QString& elementName) { - QString text; // texts are only in .ts translation files for better formatting + QString text; + // clang-format off // General if (elementName == "consoleLanguageGroupBox") { - text = tr("consoleLanguageGroupBox"); + text = tr("Console Language:\\nSets the language that the PS4 game uses.\\nIt's recommended to set this to a language the game supports, which will vary by region."); } else if (elementName == "emulatorLanguageGroupBox") { - text = tr("emulatorLanguageGroupBox"); - } else if (elementName == "fullscreenCheckBox") { - text = tr("fullscreenCheckBox"); + text = tr("Emulator Language:\\nSets the language of the emulator's user interface."); } else if (elementName == "separateUpdatesCheckBox") { - text = tr("separateUpdatesCheckBox"); + text = tr("Enable Separate Update Folder:\\nEnables installing game updates into a separate folder for easy management.\\nThis can be manually created by adding the extracted update to the game folder with the name \"CUSA00000-UPDATE\" where the CUSA ID matches the game's ID."); } else if (elementName == "showSplashCheckBox") { - text = tr("showSplashCheckBox"); + text = tr("Show Splash Screen:\\nShows the game's splash screen (a special image) while the game is starting."); } else if (elementName == "discordRPCCheckbox") { - text = tr("discordRPCCheckbox"); + text = tr("Enable Discord Rich Presence:\\nDisplays the emulator icon and relevant information on your Discord profile."); } else if (elementName == "userName") { - text = tr("userName"); - } else if (elementName == "label_Trophy") { - text = tr("TrophyKey"); - } else if (elementName == "trophyKeyLineEdit") { - text = tr("TrophyKey"); + text = tr("Username:\\nSets the PS4's account username, which may be displayed by some games."); + } else if (elementName == "label_Trophy" || elementName == "trophyKeyLineEdit") { + text = tr("Trophy Key:\\nKey used to decrypt trophies. Must be obtained from your jailbroken console.\\nMust contain only hex characters."); } else if (elementName == "logTypeGroupBox") { - text = tr("logTypeGroupBox"); + text = tr("Log Type:\\nSets whether to synchronize the output of the log window for performance. May have adverse effects on emulation."); } else if (elementName == "logFilter") { - text = tr("logFilter"); -#ifdef ENABLE_UPDATER + text = tr("Log Filter:\\nFilters the log to only print specific information.\\nExamples: \"Core:Trace\" \"Lib.Pad:Debug Common.Filesystem:Error\" \"*:Critical\"\\nLevels: Trace, Debug, Info, Warning, Error, Critical - in this order, a specific level silences all levels preceding it in the list and logs every level after it."); + #ifdef ENABLE_UPDATER } else if (elementName == "updaterGroupBox") { - text = tr("updaterGroupBox"); + text = tr("Update:\\nRelease: Official versions released every month that may be very outdated, but are more reliable and tested.\\nNightly: Development versions that have all the latest features and fixes, but may contain bugs and are less stable."); #endif - } else if (elementName == "GUIgroupBox") { - text = tr("GUIgroupBox"); + } else if (elementName == "GUIBackgroundImageGroupBox") { + text = tr("Background Image:\\nControl the opacity of the game background image."); + } else if (elementName == "GUIMusicGroupBox") { + text = tr("Play Title Music:\\nIf a game supports it, enable playing special music when selecting the game in the GUI."); + } else if (elementName == "enableHDRCheckBox") { + text = tr("Enable HDR:\\nEnables HDR in games that support it.\\nYour monitor must have support for the BT2020 PQ color space and the RGB10A2 swapchain format."); } else if (elementName == "disableTrophycheckBox") { - text = tr("disableTrophycheckBox"); + text = tr("Disable Trophy Pop-ups:\\nDisable in-game trophy notifications. Trophy progress can still be tracked using the Trophy Viewer (right-click the game in the main window)."); } else if (elementName == "enableCompatibilityCheckBox") { - text = tr("enableCompatibilityCheckBox"); + text = tr("Display Compatibility Data:\\nDisplays game compatibility information in table view. Enable \"Update Compatibility On Startup\" to get up-to-date information."); } else if (elementName == "checkCompatibilityOnStartupCheckBox") { - text = tr("checkCompatibilityOnStartupCheckBox"); + text = tr("Update Compatibility On Startup:\\nAutomatically update the compatibility database when shadPS4 starts."); } else if (elementName == "updateCompatibilityButton") { - text = tr("updateCompatibilityButton"); + text = tr("Update Compatibility Database:\\nImmediately update the compatibility database."); + } + + //User + if (elementName == "OpenCustomTrophyLocationButton") { + text = tr("Open the custom trophy images/sounds folder:\\nYou can add custom images to the trophies and an audio.\\nAdd the files to custom_trophy with the following names:\\ntrophy.wav OR trophy.mp3, bronze.png, gold.png, platinum.png, silver.png\\nNote: The sound will only work in QT versions."); } // Input if (elementName == "hideCursorGroupBox") { - text = tr("hideCursorGroupBox"); + text = tr("Hide Cursor:\\nChoose when the cursor will disappear:\\nNever: You will always see the mouse.\\nidle: Set a time for it to disappear after being idle.\\nAlways: you will never see the mouse."); } else if (elementName == "idleTimeoutGroupBox") { - text = tr("idleTimeoutGroupBox"); + text = tr("Hide Idle Cursor Timeout:\\nThe duration (seconds) after which the cursor that has been idle hides itself."); } else if (elementName == "backButtonBehaviorGroupBox") { - text = tr("backButtonBehaviorGroupBox"); + text = tr("Back Button Behavior:\\nSets the controller's back button to emulate tapping the specified position on the PS4 touchpad."); } // Graphics if (elementName == "graphicsAdapterGroupBox") { - text = tr("graphicsAdapterGroupBox"); - } else if (elementName == "widthGroupBox") { - text = tr("resolutionLayout"); - } else if (elementName == "heightGroupBox") { - text = tr("resolutionLayout"); + text = tr("Graphics Device:\\nOn multiple GPU systems, select the GPU the emulator will use from the drop down list,\\nor select \"Auto Select\" to automatically determine it."); + } else if (elementName == "windowSizeGroupBox") { + text = tr("Width/Height:\\nSets the size of the emulator window at launch, which can be resized during gameplay.\\nThis is different from the in-game resolution."); } else if (elementName == "heightDivider") { - text = tr("heightDivider"); + text = tr("Vblank Divider:\\nThe frame rate at which the emulator refreshes at is multiplied by this number. Changing this may have adverse effects, such as increasing the game speed, or breaking critical game functionality that does not expect this to change!"); } else if (elementName == "dumpShadersCheckBox") { - text = tr("dumpShadersCheckBox"); + text = tr("Enable Shaders Dumping:\\nFor the sake of technical debugging, saves the games shaders to a folder as they render."); } else if (elementName == "nullGpuCheckBox") { - text = tr("nullGpuCheckBox"); + text = tr("Enable Null GPU:\\nFor the sake of technical debugging, disables game rendering as if there were no graphics card."); } // Path if (elementName == "gameFoldersGroupBox" || elementName == "gameFoldersListWidget") { - text = tr("gameFoldersBox"); + text = tr("Game Folders:\\nThe list of folders to check for installed games."); } else if (elementName == "addFolderButton") { - text = tr("addFolderButton"); + text = tr("Add:\\nAdd a folder to the list."); } else if (elementName == "removeFolderButton") { - text = tr("removeFolderButton"); + text = tr("Remove:\\nRemove a folder from the list."); + } else if (elementName == "PortableUserFolderGroupBox") { + text = tr("Portable user folder:\\nStores shadPS4 settings and data that will be applied only to the shadPS4 build located in the current folder. Restart the app after creating the portable user folder to begin using it."); + } + + // Save Data + if (elementName == "saveDataGroupBox" || elementName == "currentSaveDataPath") { + text = tr("Save Data Path:\\nThe folder where game save data will be saved."); + } else if (elementName == "browseButton") { + text = tr("Browse:\\nBrowse for a folder to set as the save data path."); } // Debug if (elementName == "debugDump") { - text = tr("debugDump"); + text = tr("Enable Debug Dumping:\\nSaves the import and export symbols and file header information of the currently running PS4 program to a directory."); } else if (elementName == "vkValidationCheckBox") { - text = tr("vkValidationCheckBox"); + text = tr("Enable Vulkan Validation Layers:\\nEnables a system that validates the state of the Vulkan renderer and logs information about its internal state.\\nThis will reduce performance and likely change the behavior of emulation."); } else if (elementName == "vkSyncValidationCheckBox") { - text = tr("vkSyncValidationCheckBox"); + text = tr("Enable Vulkan Synchronization Validation:\\nEnables a system that validates the timing of Vulkan rendering tasks.\\nThis will reduce performance and likely change the behavior of emulation."); } else if (elementName == "rdocCheckBox") { - text = tr("rdocCheckBox"); - } - + text = tr("Enable RenderDoc Debugging:\\nIf enabled, the emulator will provide compatibility with Renderdoc to allow capture and analysis of the currently rendered frame."); + } else if (elementName == "crashDiagnosticsCheckBox") { + text = tr("Crash Diagnostics:\\nCreates a .yaml file with info about the Vulkan state at the time of crashing.\\nUseful for debugging 'Device lost' errors. If you have this enabled, you should enable Host AND Guest Debug Markers.\\nDoes not work on Intel GPUs.\\nYou need Vulkan Validation Layers enabled and the Vulkan SDK for this to work."); + } else if (elementName == "guestMarkersCheckBox") { + text = tr("Guest Debug Markers:\\nInserts any debug markers the game itself has added to the command buffer.\\nIf you have this enabled, you should enable Crash Diagnostics.\\nUseful for programs like RenderDoc."); + } else if (elementName == "hostMarkersCheckBox") { + text = tr("Host Debug Markers:\\nInserts emulator-side information like markers for specific AMDGPU commands around Vulkan commands, as well as giving resources debug names.\\nIf you have this enabled, you should enable Crash Diagnostics.\\nUseful for programs like RenderDoc."); + } else if (elementName == "copyGPUBuffersCheckBox") { + text = tr("Copy GPU Buffers:\\nGets around race conditions involving GPU submits.\\nMay or may not help with PM4 type 0 crashes."); + } else if (elementName == "collectShaderCheckBox") { + text = tr("Collect Shaders:\\nYou need this enabled to edit shaders with the debug menu (Ctrl + F10)."); + } else if (elementName == "separateLogFilesCheckbox") { + text = tr("Separate Log Files:\\nWrites a separate logfile for each game.");} + // clang-format on ui->descriptionText->setText(text.replace("\\n", "\n")); } @@ -506,22 +715,6 @@ bool SettingsDialog::eventFilter(QObject* obj, QEvent* event) { } else { ui->descriptionText->setText(defaultTextEdit); } - - // if the text exceeds the size of the box, it will increase the size - QRect currentGeometry = this->geometry(); - int newWidth = currentGeometry.width(); - - int documentHeight = ui->descriptionText->document()->size().height(); - int visibleHeight = ui->descriptionText->viewport()->height(); - if (documentHeight > visibleHeight) { - ui->descriptionText->setMaximumSize(16777215, 110); - this->setGeometry(currentGeometry.x(), currentGeometry.y(), newWidth, - currentGeometry.height() + 40); - } else { - ui->descriptionText->setMaximumSize(16777215, 70); - this->setGeometry(currentGeometry.x(), currentGeometry.y(), newWidth, - initialHeight); - } return true; } } @@ -532,10 +725,27 @@ void SettingsDialog::UpdateSettings() { const QVector TouchPadIndex = {"left", "center", "right", "none"}; Config::setBackButtonBehavior(TouchPadIndex[ui->backButtonBehaviorComboBox->currentIndex()]); - Config::setFullscreenMode(ui->fullscreenCheckBox->isChecked()); + Config::setIsFullscreen(screenModeMap.value(ui->displayModeComboBox->currentText()) != + "Windowed"); + Config::setFullscreenMode( + screenModeMap.value(ui->displayModeComboBox->currentText()).toStdString()); + Config::setIsMotionControlsEnabled(ui->motionControlsCheckBox->isChecked()); Config::setisTrophyPopupDisabled(ui->disableTrophycheckBox->isChecked()); + Config::setTrophyNotificationDuration(ui->popUpDurationSpinBox->value()); + + if (ui->radioButton_Top->isChecked()) { + Config::setSideTrophy("top"); + } else if (ui->radioButton_Left->isChecked()) { + Config::setSideTrophy("left"); + } else if (ui->radioButton_Right->isChecked()) { + Config::setSideTrophy("right"); + } else if (ui->radioButton_Bottom->isChecked()) { + Config::setSideTrophy("bottom"); + } + Config::setPlayBGM(ui->playBGMCheckBox->isChecked()); - Config::setLogType(ui->logTypeComboBox->currentText().toStdString()); + Config::setAllowHDR(ui->enableHDRCheckBox->isChecked()); + Config::setLogType(logTypeMap.value(ui->logTypeComboBox->currentText()).toStdString()); Config::setLogFilter(ui->logFilterLineEdit->text().toStdString()); Config::setUserName(ui->userNameLineEdit->text().toStdString()); Config::setTrophyKey(ui->trophyKeyLineEdit->text().toStdString()); @@ -551,15 +761,39 @@ void SettingsDialog::UpdateSettings() { Config::setDumpShaders(ui->dumpShadersCheckBox->isChecked()); Config::setNullGpu(ui->nullGpuCheckBox->isChecked()); Config::setSeparateUpdateEnabled(ui->separateUpdatesCheckBox->isChecked()); + Config::setLoadGameSizeEnabled(ui->gameSizeCheckBox->isChecked()); Config::setShowSplash(ui->showSplashCheckBox->isChecked()); Config::setDebugDump(ui->debugDump->isChecked()); + Config::setSeparateLogFilesEnabled(ui->separateLogFilesCheckbox->isChecked()); Config::setVkValidation(ui->vkValidationCheckBox->isChecked()); Config::setVkSyncValidation(ui->vkSyncValidationCheckBox->isChecked()); Config::setRdocEnabled(ui->rdocCheckBox->isChecked()); + Config::setVkHostMarkersEnabled(ui->hostMarkersCheckBox->isChecked()); + Config::setVkGuestMarkersEnabled(ui->guestMarkersCheckBox->isChecked()); + Config::setVkCrashDiagnosticEnabled(ui->crashDiagnosticsCheckBox->isChecked()); + Config::setCollectShaderForDebug(ui->collectShaderCheckBox->isChecked()); + Config::setCopyGPUCmdBuffers(ui->copyGPUBuffersCheckBox->isChecked()); Config::setAutoUpdate(ui->updateCheckBox->isChecked()); - Config::setUpdateChannel(ui->updateComboBox->currentText().toStdString()); + Config::setAlwaysShowChangelog(ui->changelogCheckBox->isChecked()); + Config::setUpdateChannel(channelMap.value(ui->updateComboBox->currentText()).toStdString()); + Config::setChooseHomeTab( + chooseHomeTabMap.value(ui->chooseHomeTabComboBox->currentText()).toStdString()); Config::setCompatibilityEnabled(ui->enableCompatibilityCheckBox->isChecked()); Config::setCheckCompatibilityOnStartup(ui->checkCompatibilityOnStartupCheckBox->isChecked()); + Config::setBackgroundImageOpacity(ui->backgroundImageOpacitySlider->value()); + emit BackgroundOpacityChanged(ui->backgroundImageOpacitySlider->value()); + Config::setShowBackgroundImage(ui->showBackgroundImageCheckBox->isChecked()); + + std::vector dirs_with_states; + for (int i = 0; i < ui->gameFoldersListWidget->count(); i++) { + QListWidgetItem* item = ui->gameFoldersListWidget->item(i); + QString path_string = item->text(); + auto path = Common::FS::PathFromQString(path_string); + bool enabled = (item->checkState() == Qt::Checked); + + dirs_with_states.push_back({path, enabled}); + } + Config::setAllGameInstallDirs(dirs_with_states); #ifdef ENABLE_DISCORD_RPC auto* rpc = Common::Singleton::Instance(); @@ -575,6 +809,7 @@ void SettingsDialog::UpdateSettings() { } void SettingsDialog::ResetInstallFolders() { + ui->gameFoldersListWidget->clear(); std::filesystem::path userdir = Common::FS::GetUserPath(Common::FS::PathType::UserDir); const toml::value data = toml::parse(userdir / "config.toml"); @@ -582,22 +817,37 @@ void SettingsDialog::ResetInstallFolders() { if (data.contains("GUI")) { const toml::value& gui = data.at("GUI"); const auto install_dir_array = - toml::find_or>(gui, "installDirs", {}); - std::vector settings_install_dirs_config = {}; + toml::find_or>(gui, "installDirs", {}); - for (const auto& dir : install_dir_array) { - if (std::find(settings_install_dirs_config.begin(), settings_install_dirs_config.end(), - dir) == settings_install_dirs_config.end()) { - settings_install_dirs_config.push_back(dir); - } + std::vector install_dirs_enabled; + try { + install_dirs_enabled = Config::getGameInstallDirsEnabled(); + } catch (...) { + // If it does not exist, assume that all are enabled. + install_dirs_enabled.resize(install_dir_array.size(), true); } - for (const auto& dir : settings_install_dirs_config) { + if (install_dirs_enabled.size() < install_dir_array.size()) { + install_dirs_enabled.resize(install_dir_array.size(), true); + } + + std::vector settings_install_dirs_config; + + for (size_t i = 0; i < install_dir_array.size(); i++) { + std::filesystem::path dir = install_dir_array[i]; + bool enabled = install_dirs_enabled[i]; + + settings_install_dirs_config.push_back({dir, enabled}); + QString path_string; Common::FS::PathToQString(path_string, dir); + QListWidgetItem* item = new QListWidgetItem(path_string); + item->setFlags(item->flags() | Qt::ItemIsUserCheckable); + item->setCheckState(enabled ? Qt::Checked : Qt::Unchecked); ui->gameFoldersListWidget->addItem(item); } - Config::setGameInstallDirs(settings_install_dirs_config); + + Config::setAllGameInstallDirs(settings_install_dirs_config); } } diff --git a/src/qt_gui/settings_dialog.h b/src/qt_gui/settings_dialog.h index 892e67671..09aa2b855 100644 --- a/src/qt_gui/settings_dialog.h +++ b/src/qt_gui/settings_dialog.h @@ -33,6 +33,7 @@ public: signals: void LanguageChanged(const std::string& locale); void CompatibilityChanged(); + void BackgroundOpacityChanged(int opacity); private: void LoadValuesFromConfig(); @@ -41,6 +42,7 @@ private: void InitializeEmulatorLanguages(); void OnLanguageChanged(int index); void OnCursorStateChanged(s16 index); + void closeEvent(QCloseEvent* event) override; std::unique_ptr ui; @@ -49,4 +51,6 @@ private: QString defaultTextEdit; int initialHeight; + + bool is_saving = false; }; diff --git a/src/qt_gui/settings_dialog.ui b/src/qt_gui/settings_dialog.ui index 2e7e3db37..5600a0db7 100644 --- a/src/qt_gui/settings_dialog.ui +++ b/src/qt_gui/settings_dialog.ui @@ -12,11 +12,11 @@ 0 0 970 - 670 + 750 - + 0 0 @@ -31,7 +31,7 @@ Settings - + :/images/shadps4.ico:/images/shadps4.ico @@ -52,8 +52,14 @@ 0 + + + 0 + 0 + + - 0 + 5 @@ -77,14 +83,115 @@ 0 - + + 6 + + + + + 0 + + + 0 + + + 0 + + + + + + 0 + 0 + + + + Emulator + + + false + + + false + + + + 6 + + + 9 + + + 9 + + + 9 + + + 9 + + + + + 10 + + + + + Enable Separate Update Folder + + + + + + + Show Splash + + + + + + + Enable Discord Rich Presence + + + + + + + + + + + + + 6 + + + 0 + + + + 0 + 0 + + + + + 0 + 0 + + System + + 70 + @@ -114,81 +221,46 @@ - - - - - - Emulator - - - - - - 10 - - - - - Enable Fullscreen - - - - - - - Enable Separate Update Folder - - - - - - - Show Splash - - - - - - - Enable Discord Rich Presence - - - - - - - - - 6 - - - 0 - - - - - - - Username - - - - - - - - - - - - - - - - + + + + Qt::Orientation::Vertical + + + + 20 + 40 + + + + + + + + Qt::Orientation::Vertical + + + + 20 + 40 + + + + + + Qt::Orientation::Vertical + + + + 20 + 40 + + + + + 6 @@ -231,18 +303,18 @@ Update - + - 10 + 6 - 1 + 9 - 11 + 9 - 11 + 80 @@ -309,7 +381,7 @@ - + 0 0 @@ -350,13 +422,377 @@ + + + + Always Show Changelog + + + - - + + + + + + + + true + + + GUI + + + + + 0 + 0 + 946 + 536 + + + + + + + 0 + + + 0 + + + + + 0 + + + + + + 0 + 0 + + + + + 0 + 0 + + + + GUI Settings + + + + 9 + + + 9 + + + + + Default tab when opening settings + + + + + + + 0 + 0 + + + + + General + + + + + GUI + + + + + Graphics + + + + + User + + + + + Input + + + + + Paths + + + + + Debug + + + + + + + + + + + Show Game Size In List + + + + + + + + 0 + 0 + + + + Background Image + + + + + + + 0 + 0 + + + + Show Background Image + + + + + + + 9 + + + + + + 0 + 0 + + + + Opacity + + + + + + + + 0 + 0 + + + + 0 + + + 100 + + + 50 + + + Qt::Orientation::Horizontal + + + + + + + + + + + + + 0 + 0 + + + + + 0 + 100 + + + + + 16777215 + 16777215 + + + + + 11 + false + true + + + + false + + + Title Music + + + false + + + + + 9 + 30 + 416 + 26 + + + + + 0 + 0 + + + + Play title music + + + + + + 0 + 50 + 431 + 47 + + + + + 9 + + + 9 + + + 9 + + + 9 + + + 9 + + + + + + 0 + 0 + + + + + 16777215 + 16777215 + + + + Volume + + + + + + + + 0 + 0 + + + + Set the volume of the background music. + + + 100 + + + 10 + + + 20 + + + 50 + + + Qt::Orientation::Horizontal + + + false + + + false + + + QSlider::TickPosition::NoTicks + + + 10 + + + + + + + + + + + + + + Qt::Orientation::Vertical + + + + 20 + 40 + + + + + + + + + + 6 + + + 0 + @@ -371,6 +807,12 @@ 0 + + + 0 + 0 + + Game Compatibility @@ -379,10 +821,10 @@ 10 - 1 + 9 - 11 + 9 @@ -426,164 +868,560 @@ - - - - - - - - 0 - 0 - + + + Qt::Orientation::Vertical - + - 0 - 0 + 20 + 40 + + + + + + + + + + + + true + + + Graphics + + + + + 0 + 0 + 946 + 536 + + + + + + + + + - GUI Settings + Graphics Device - - - 1 - - - 11 - + - - - - 0 - 0 - - + + + + - Play title music + Enable NULL GPU + + + + + + + + 0 + + + 0 + + + 0 + + + 0 + - - - 1 + + + Qt::Orientation::Vertical - - 0 + + + 20 + 40 + - - - - - 0 - 0 - - - - - 16777215 - 16777215 - - - - Volume - - - - - - - Set the volume of the background music. - - - 100 - - - 10 - - - 20 - - - 50 - - - Qt::Orientation::Horizontal - - - false - - - false - - - QSlider::TickPosition::NoTicks - - - 10 - - - - - - - 6 - - - 0 - - - - - - - Trophy - - - - - - Disable Trophy Pop-ups - - - - - - - Trophy Key - - - - - - - - 0 - 0 - - - - - - - - - - - - + + + + + + + Video + + + + 6 + + + 12 + + + + + Display Mode + + + + + + + 0 + 0 + + + + + Windowed + + + + + Fullscreen + + + + + Fullscreen (Borderless) + + + + + + + + + + + + + Window Size + + + + + + W: + + + + + + + true + + + QAbstractSpinBox::CorrectionMode::CorrectToNearestValue + + + false + + + 0 + + + 9999 + + + 1280 + + + + + + + H: + + + + + + + true + + + true + + + QAbstractSpinBox::CorrectionMode::CorrectToNearestValue + + + false + + + 0 + + + 9999 + + + 720 + + + + + + + + + + Vblank Divider + + + + + + true + + + true + + + QAbstractSpinBox::CorrectionMode::CorrectToNearestValue + + + false + + + 1 + + + 9999 + + + 1 + + + + + + + + + + + + Enable HDR + + + + + + + + + + Qt::Orientation::Vertical + + + + 20 + 40 + + + + + + + + + + 12 + + + 12 + + + + + Qt::Orientation::Vertical + + + + 20 + 40 + + + + + + + + + + Qt::Orientation::Vertical + + + + 20 + 40 + + + + + + + + + + true + + + User + + + + + 0 + 0 + 946 + 536 + + + + + + + 0 + + + 0 + + + + + + + Username + + + + + + + + + + + + + + Qt::Orientation::Horizontal + + + + 40 + 40 + + + + + + + + + + 6 + + + 0 + + + 50 + + + + + + + Trophy + + + + + + Disable Trophy Notification + + + + + + + 0 + + + + + + 0 + 0 + + + + Trophy Notification Position + + + + + + + Left + + + + + + + Right + + + + + + + Top + + + + + + + Bottom + + + + + + + + + 0 + + + + + + 0 + 0 + + + + Notification Duration + + + + + + + + + + Qt::Orientation::Horizontal + + + + 40 + 20 + + + + + + + + + + 0 + + + + + Trophy Key + + + + + + + + 0 + 0 + + + + + 10 + false + + + + + + + + + + Open the custom trophy images/sounds folder + + + + + + + + + + Qt::Orientation::Horizontal + + + + 40 + 20 + + + + + + + + + + + + Qt::Orientation::Vertical + + + QSizePolicy::Policy::MinimumExpanding + + + + 0 + 0 + + + + @@ -599,13 +1437,13 @@ 0 0 - 926 + 946 536 - + @@ -619,17 +1457,14 @@ Cursor - - - 0 - + 11 11 - + true @@ -656,7 +1491,7 @@ - + true @@ -791,7 +1626,7 @@ true - + 0 0 @@ -815,11 +1650,24 @@ + + + + Enable Motion Controls + + + true + + + 0 + 0 + + 0 @@ -833,23 +1681,6 @@ - - - - - - Qt::Orientation::Horizontal - - - - 40 - 20 - - - - - - @@ -878,257 +1709,6 @@ - - - true - - - Graphics - - - - - 0 - 0 - 926 - 536 - - - - - - - - - - - Graphics Device - - - - - - - - - - - - - 0 - - - 0 - - - 0 - - - 0 - - - - - - - - - - - - 6 - - - 0 - - - - - - - Width - - - - - - true - - - QAbstractSpinBox::CorrectionMode::CorrectToNearestValue - - - false - - - 0 - - - 9999 - - - 1280 - - - - - - - - - - Height - - - - - - true - - - true - - - QAbstractSpinBox::CorrectionMode::CorrectToNearestValue - - - false - - - 0 - - - 9999 - - - 720 - - - - - - - - - - - - - - 6 - - - 0 - - - - - - - Vblank Divider - - - - - - true - - - true - - - QAbstractSpinBox::CorrectionMode::CorrectToNearestValue - - - false - - - 1 - - - 9999 - - - 1 - - - - - - - - - - - - - - - - 12 - - - 12 - - - - - Advanced - - - Qt::AlignmentFlag::AlignLeading|Qt::AlignmentFlag::AlignLeft|Qt::AlignmentFlag::AlignVCenter - - - - - - Enable Shaders Dumping - - - - - - - Enable NULL GPU - - - - - - - - - - Qt::Orientation::Vertical - - - - 20 - 40 - - - - - - - - - - - - Qt::Orientation::Vertical - - - - 20 - 40 - - - - - - - true @@ -1141,63 +1721,132 @@ 0 0 - 926 + 946 536 - + - - - - - Game Folders - - + + + Game Folders + + + + - - - 0 + + + Add... - - - - Add... - - - - - - - Remove - - - - + - + + + Remove + + + + + + + Qt::Orientation::Horizontal + + + + 40 + 20 + + + - - - - - - Qt::Orientation::Horizontal - - - QSizePolicy::Policy::Preferred - - - - 40 - 20 - - - - - + + + + + + + + + + + Save Data Path + + + + + + + + true + + + + + + + Browse + + + + + + + + + + + + Portable User Folder + + + + + + + + Qt::Orientation::Horizontal + + + + 40 + 20 + + + + + + + + + 0 + 0 + + + + Create Portable User Folder from Common User Folder + + + + + + + Qt::Orientation::Horizontal + + + + 40 + 20 + + + + + + + + @@ -1214,13 +1863,13 @@ 0 0 - 926 + 946 536 - + - + 0 @@ -1228,7 +1877,7 @@ 0 - + @@ -1241,6 +1890,13 @@ Qt::AlignmentFlag::AlignLeading|Qt::AlignmentFlag::AlignLeft|Qt::AlignmentFlag::AlignTop + + + + Enable Shaders Dumping + + + @@ -1349,6 +2005,13 @@ + + + + Open Log Location + + + @@ -1357,20 +2020,68 @@ - - - Qt::Orientation::Vertical + + + + 0 + 0 + - - QSizePolicy::Policy::MinimumExpanding + + Advanced - - - 0 - 0 - + + Qt::AlignmentFlag::AlignLeading|Qt::AlignmentFlag::AlignLeft|Qt::AlignmentFlag::AlignTop - + + + + + + + Collect Shaders + + + + + + + Copy GPU Buffers + + + + + + + Enable Crash Diagnostics + + + + + + + Host Debug Markers + + + + + + + Guest Debug Markers + + + + + + + Separate Log Files + + + + + + + @@ -1386,10 +2097,16 @@ + + + 0 + 0 + + 16777215 - 70 + 120 @@ -1399,6 +2116,8 @@ - + + + diff --git a/src/qt_gui/translations/ar.ts b/src/qt_gui/translations/ar.ts deleted file mode 100644 index e851f59a7..000000000 --- a/src/qt_gui/translations/ar.ts +++ /dev/null @@ -1,1664 +0,0 @@ - - - - - - AboutDialog - - - About shadPS4 - حول shadPS4 - - - - shadPS4 - shadPS4 - - - - 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. - يجب عدم استخدام هذا البرنامج لتشغيل الألعاب التي لم تحصل عليها بشكل قانوني. - - - - ElfViewer - - - Open Folder - فتح المجلد - - - - GameInfoClass - - - Loading game list, please wait :3 - جارٍ تحميل قائمة الألعاب، يرجى الانتظار :3 - - - - Cancel - إلغاء - - - - Loading... - ...جارٍ التحميل - - - - InstallDirSelect - - - shadPS4 - Choose directory - shadPS4 - اختر المجلد - - - - Select which directory you want to install to. - Select which directory you want to install to. - - - - GameInstallDialog - - - shadPS4 - Choose directory - shadPS4 - اختر المجلد - - - - Directory to install games - مجلد تثبيت الألعاب - - - - Browse - تصفح - - - - Error - خطأ - - - - The value for location to install games is not valid. - قيمة موقع تثبيت الألعاب غير صالحة. - - - - GuiContextMenus - - - Create Shortcut - إنشاء اختصار - - - - Cheats / Patches - الغش / التصحيحات - - - - SFO Viewer - عارض SFO - - - - Trophy Viewer - عارض الجوائز - - - - Open Folder... - فتح المجلد... - - - - Open Game Folder - فتح مجلد اللعبة - - - - Open Save Data Folder - فتح مجلد بيانات الحفظ - - - - Open Log Folder - فتح مجلد السجل - - - - Copy info... - ...نسخ المعلومات - - - - Copy Name - نسخ الاسم - - - - Copy Serial - نسخ الرقم التسلسلي - - - - Copy All - نسخ الكل - - - - Delete... - Delete... - - - - Delete Game - Delete Game - - - - Delete Update - Delete Update - - - - Delete DLC - Delete DLC - - - - Compatibility... - Compatibility... - - - - Update database - Update database - - - - View report - View report - - - - Submit a report - Submit a report - - - - Shortcut creation - إنشاء اختصار - - - - Shortcut created successfully! - تم إنشاء الاختصار بنجاح! - - - - Error - خطأ - - - - Error creating shortcut! - خطأ في إنشاء الاختصار - - - - Install PKG - PKG تثبيت - - - - Game - Game - - - - requiresEnableSeparateUpdateFolder_MSG - This feature requires the 'Enable Separate Update Folder' config option to work. If you want to use this feature, please enable it. - - - - This game has no update to delete! - This game has no update to delete! - - - - Update - Update - - - - This game has no DLC to delete! - This game has no DLC to delete! - - - - DLC - DLC - - - - Delete %1 - Delete %1 - - - - Are you sure you want to delete %1's %2 directory? - Are you sure you want to delete %1's %2 directory? - - - - MainWindow - - - Open/Add Elf Folder - Elf فتح/إضافة مجلد - - - - Install Packages (PKG) - (PKG) تثبيت الحزم - - - - Boot Game - تشغيل اللعبة - - - - Check for Updates - تحقق من التحديثات - - - - About shadPS4 - shadPS4 حول - - - - Configure... - ...تكوين - - - - Install application from a .pkg file - .pkg تثبيت التطبيق من ملف - - - - Recent Games - الألعاب الأخيرة - - - - Exit - خروج - - - - Exit shadPS4 - الخروج من shadPS4 - - - - Exit the application. - الخروج من التطبيق. - - - - Show Game List - إظهار قائمة الألعاب - - - - Game List Refresh - تحديث قائمة الألعاب - - - - Tiny - صغير جدًا - - - - Small - صغير - - - - Medium - متوسط - - - - Large - كبير - - - - List View - عرض القائمة - - - - Grid View - عرض الشبكة - - - - Elf Viewer - عارض Elf - - - - Game Install Directory - دليل تثبيت اللعبة - - - - Download Cheats/Patches - تنزيل الغش/التصحيحات - - - - Dump Game List - تفريغ قائمة الألعاب - - - - PKG Viewer - عارض PKG - - - - Search... - ...بحث - - - - File - ملف - - - - View - عرض - - - - Game List Icons - أيقونات قائمة الألعاب - - - - Game List Mode - وضع قائمة الألعاب - - - - Settings - الإعدادات - - - - Utils - الأدوات - - - - Themes - السمات - - - - Help - مساعدة - - - - Dark - داكن - - - - Light - فاتح - - - - Green - أخضر - - - - Blue - أزرق - - - - Violet - بنفسجي - - - - toolBar - شريط الأدوات - - - - PKGViewer - - - Open Folder - فتح المجلد - - - - TrophyViewer - - - Trophy Viewer - عارض الجوائز - - - - SettingsDialog - - - Settings - الإعدادات - - - - General - عام - - - - System - النظام - - - - Console Language - لغة وحدة التحكم - - - - Emulator Language - لغة المحاكي - - - - Emulator - المحاكي - - - - Enable Fullscreen - تمكين ملء الشاشة - - - - Enable Separate Update Folder - Enable Separate Update Folder - - - - Show Splash - إظهار شاشة البداية - - - - Is PS4 Pro - PS4 Pro هل هو - - - - Enable Discord Rich Presence - تفعيل حالة الثراء في ديسكورد - - - - Username - اسم المستخدم - - - - Trophy Key - Trophy Key - - - - Trophy - Trophy - - - - Logger - المسجل - - - - Log Type - نوع السجل - - - - Log Filter - مرشح السجل - - - - Input - إدخال - - - - Cursor - مؤشر - - - - Hide Cursor - إخفاء المؤشر - - - - Hide Cursor Idle Timeout - مهلة إخفاء المؤشر عند الخمول - - - - s - s - - - - Controller - التحكم - - - - Back Button Behavior - سلوك زر العودة - - - - Graphics - الرسومات - - - - Graphics Device - جهاز الرسومات - - - - Width - العرض - - - - Height - الارتفاع - - - - Vblank Divider - Vblank مقسم - - - - Advanced - متقدم - - - - Enable Shaders Dumping - تمكين تفريغ الشيدرات - - - - Enable NULL GPU - تمكين وحدة معالجة الرسومات الفارغة - - - - Paths - المسارات - - - - Game Folders - مجلدات اللعبة - - - - Add... - إضافة... - - - - Remove - إزالة - - - - Debug - تصحيح الأخطاء - - - - Enable Debug Dumping - تمكين تفريغ التصحيح - - - - Enable Vulkan Validation Layers - Vulkan تمكين طبقات التحقق من - - - - Enable Vulkan Synchronization Validation - Vulkan تمكين التحقق من تزامن - - - - Enable RenderDoc Debugging - RenderDoc تمكين تصحيح أخطاء - - - - Update - تحديث - - - - Check for Updates at Startup - تحقق من التحديثات عند بدء التشغيل - - - - Update Channel - قناة التحديث - - - - Check for Updates - التحقق من التحديثات - - - - GUI Settings - إعدادات الواجهة - - - - Disable Trophy Pop-ups - Disable Trophy Pop-ups - - - - Play title music - تشغيل موسيقى العنوان - - - - Update Compatibility Database On Startup - Update Compatibility Database On Startup - - - - Game Compatibility - Game Compatibility - - - - Display Compatibility Data - Display Compatibility Data - - - - Update Compatibility Database - Update Compatibility Database - - - - Volume - الصوت - - - - Audio Backend - Audio Backend - - - - MainWindow - - - Game List - ققائمة الألعاب - - - - * 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! - تم اكتشاف تصحيح! - - - - PKG and Game versions match: - :واللعبة تتطابق إصدارات PKG - - - - Would you like to overwrite? - هل ترغب في الكتابة فوق الملف الموجود؟ - - - - PKG Version %1 is older than installed version: - :أقدم من الإصدار المثبت PKG Version %1 - - - - Game is installed: - :اللعبة مثبتة - - - - Would you like to install Patch: - :هل ترغب في تثبيت التصحيح - - - - DLC Installation - تثبيت المحتوى القابل للتنزيل - - - - Would you like to install DLC: %1? - هل ترغب في تثبيت المحتوى القابل للتنزيل: 1%؟ - - - - DLC already installed: - :المحتوى القابل للتنزيل مثبت بالفعل - - - - Game already installed - اللعبة مثبتة بالفعل - - - - 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 for - Cheats / Patches for - - - - 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. - فشل في تحليل بيانات JSON من HTML. - - - - Failed to retrieve HTML page. - .HTML فشل في استرجاع صفحة - - - - The game is in version: %1 - اللعبة في الإصدار: %1 - - - - The downloaded patch only works on version: %1 - الباتش الذي تم تنزيله يعمل فقط على الإصدار: %1 - - - - You may need to update your game. - قد تحتاج إلى تحديث لعبتك. - - - - Incompatibility Notice - إشعار عدم التوافق - - - - 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: - :الاسم - - - - Can't apply cheats before the game is started - لا يمكن تطبيق الغش قبل بدء اللعبة. - - - - SettingsDialog - - - Save - حفظ - - - - Apply - تطبيق - - - - Restore Defaults - استعادة الإعدادات الافتراضية - - - - Close - إغلاق - - - - Point your mouse at an option to display its description. - وجّه الماوس نحو خيار لعرض وصفه. - - - - consoleLanguageGroupBox - لغة الجهاز:\nتحدد لغة اللعبة التي يستخدمها جهاز PS4.\nيوصى بضبطها على لغة يدعمها الجهاز، والتي قد تختلف حسب المنطقة. - - - - emulatorLanguageGroupBox - لغة المحاكي:\nتحدد لغة واجهة المستخدم الخاصة بالمحاكي. - - - - fullscreenCheckBox - تمكين وضع ملء الشاشة:\nيجعل نافذة اللعبة تنتقل تلقائيًا إلى وضع ملء الشاشة.\nيمكن التبديل بالضغط على المفتاح F11. - - - - separateUpdatesCheckBox - Enable Separate Update Folder:\nEnables installing game updates into a separate folder for easy management. - - - - showSplashCheckBox - إظهار شاشة البداية:\nيعرض شاشة البداية الخاصة باللعبة (صورة خاصة) أثناء بدء التشغيل. - - - - ps4proCheckBox - هل هو PS4 Pro:\nيجعل المحاكي يعمل كـ PS4 PRO، مما قد يتيح ميزات خاصة في الألعاب التي تدعمه. - - - - discordRPCCheckbox - تفعيل حالة الثراء في ديسكورد:\nيعرض أيقونة المحاكي ومعلومات ذات صلة على ملفك الشخصي في ديسكورد. - - - - userName - اسم المستخدم:\nيضبط اسم حساب PS4، الذي قد يتم عرضه في بعض الألعاب. - - - - TrophyKey - Trophy Key:\nKey used to decrypt trophies. Must be obtained from your jailbroken console.\nMust contain only hex characters. - - - - logTypeGroupBox - نوع السجل:\nيضبط ما إذا كان سيتم مزامنة مخرجات نافذة السجل للأداء. قد يؤثر سلبًا على المحاكاة. - - - - logFilter - فلتر السجل:\nيقوم بتصفية السجل لطباعة معلومات محددة فقط.\nأمثلة: "Core:Trace" "Lib.Pad:Debug Common.Filesystem:Error" "*:Critical" المستويات: Trace, Debug, Info, Warning, Error, Critical - بالترتيب، مستوى محدد يخفي جميع المستويات التي تسبقه ويعرض جميع المستويات بعده. - - - - updaterGroupBox - تحديث: Release: إصدارات رسمية تصدر شهريًا، قد تكون قديمة بعض الشيء، لكنها أكثر استقرارًا واختبارًا. Nightly: إصدارات تطوير تحتوي على أحدث الميزات والإصلاحات، لكنها قد تحتوي على أخطاء وأقل استقرارًا. - - - - GUIgroupBox - تشغيل موسيقى العنوان:\nإذا كانت اللعبة تدعم ذلك، قم بتمكين تشغيل موسيقى خاصة عند اختيار اللعبة في واجهة المستخدم. - - - - disableTrophycheckBox - Disable Trophy Pop-ups:\nDisable in-game trophy notifications. Trophy progress can still be tracked using the Trophy Viewer (right-click the game in the main window). - - - - hideCursorGroupBox - إخفاء المؤشر:\nاختر متى سيختفي المؤشر:\nأبداً: سترى الفأرة دائماً.\nعاطل: حدد وقتاً لاختفائه بعد أن يكون غير مستخدم.\nدائماً: لن ترى الفأرة أبداً. - - - - idleTimeoutGroupBox - حدد وقتاً لاختفاء الفأرة بعد أن تكون غير مستخدم. - - - - backButtonBehaviorGroupBox - سلوك زر العودة:\nيضبط زر العودة في وحدة التحكم ليحاكي الضغط على الموضع المحدد على لوحة اللمس في PS4. - - - - enableCompatibilityCheckBox - Display Compatibility Data:\nDisplays game compatibility information in table view. Enable "Update Compatibility On Startup" to get up-to-date information. - - - - checkCompatibilityOnStartupCheckBox - Update Compatibility On Startup:\nAutomatically update the compatibility database when shadPS4 starts. - - - - updateCompatibilityButton - Update Compatibility Database:\nImmediately update the compatibility database. - - - - Never - أبداً - - - - Idle - خامل - - - - Always - دائماً - - - - Touchpad Left - لوحة اللمس اليسرى - - - - Touchpad Right - لوحة اللمس اليمنى - - - - Touchpad Center - وسط لوحة اللمس - - - - None - لا شيء - - - - graphicsAdapterGroupBox - جهاز الرسومات:\nعلى الأنظمة متعددة وحدات معالجة الرسومات، اختر وحدة معالجة الرسومات التي سيستخدمها المحاكي من قائمة منسدلة،\nأو اختر "Auto Select" لتحديدها تلقائيًا. - - - - resolutionLayout - العرض / الارتفاع:\nيضبط حجم نافذة المحاكي عند التشغيل، والذي يمكن تغيير حجمه أثناء اللعب.\nهذا يختلف عن دقة اللعبة نفسها. - - - - heightDivider - مقسم معدل التحديث:\nيتم مضاعفة معدل الإطارات الذي يتم تحديث المحاكي به بواسطة هذا الرقم. قد يؤدي تغيير هذا إلى آثار سلبية، مثل زيادة سرعة اللعبة أو كسر الوظائف الأساسية التي لا تتوقع هذا التغيير! - - - - dumpShadersCheckBox - تمكين تفريغ الـ Shaders:\nلأغراض تصحيح الأخطاء التقنية، يحفظ الـ Shaders الخاصة باللعبة في مجلد أثناء التشغيل. - - - - nullGpuCheckBox - تمكين GPU الافتراضية:\nلأغراض تصحيح الأخطاء التقنية، يقوم بتعطيل عرض اللعبة كما لو لم يكن هناك بطاقة رسومات. - - - - gameFoldersBox - مجلدات اللعبة:\nقائمة بالمجلدات للتحقق من الألعاب المثبتة. - - - - addFolderButton - إضافة:\nأضف مجلداً إلى القائمة. - - - - removeFolderButton - إزالة:\nأزل مجلداً من القائمة. - - - - debugDump - تمكين تفريغ التصحيح:\nيحفظ رموز الاستيراد والتصدير ومعلومات رأس الملف للبرنامج الحالي لجهاز PS4 إلى دليل. - - - - vkValidationCheckBox - تمكين طبقات التحقق من Vulkan:\nيتيح نظام يتحقق من حالة مشغل Vulkan ويسجل معلومات حول حالته الداخلية. سيؤدي هذا إلى تقليل الأداء ومن المحتمل تغيير سلوك المحاكاة. - - - - vkSyncValidationCheckBox - تمكين التحقق من تزامن Vulkan:\nيتيح نظام يتحقق من توقيت مهام عرض Vulkan. سيؤدي ذلك إلى تقليل الأداء ومن المحتمل تغيير سلوك المحاكاة. - - - - rdocCheckBox - تمكين تصحيح RenderDoc:\nإذا تم التمكين، سيوفر المحاكي توافقًا مع Renderdoc لالتقاط وتحليل الإطار الذي يتم عرضه حاليًا. - - - - GameListFrame - - - Icon - أيقونة - - - - Name - اسم - - - - Serial - سيريال - - - - Compatibility - Compatibility - - - - Region - منطقة - - - - Firmware - البرمجيات الثابتة - - - - Size - حجم - - - - Version - إصدار - - - - Path - مسار - - - - Play Time - وقت اللعب - - - - Never Played - Never Played - - - - h - h - - - - m - m - - - - s - s - - - - Compatibility is untested - Compatibility is untested - - - - Game does not initialize properly / crashes the emulator - Game does not initialize properly / crashes the emulator - - - - Game boots, but only displays a blank screen - Game boots, but only displays a blank screen - - - - Game displays an image but does not go past the menu - Game displays an image but does not go past the menu - - - - Game has game-breaking glitches or unplayable performance - Game has game-breaking glitches or unplayable performance - - - - Game can be completed with playable performance and no major glitches - Game can be completed with playable performance and no major glitches - - - - CheckUpdate - - - Auto Updater - محدث تلقائي - - - - Error - خطأ - - - - Network error: - خطأ في الشبكة: - - - - Failed to parse update information. - فشل في تحليل معلومات التحديث. - - - - No pre-releases found. - لم يتم العثور على أي إصدارات مسبقة. - - - - Invalid release data. - بيانات الإصدار غير صالحة. - - - - No download URL found for the specified asset. - لم يتم العثور على عنوان URL للتنزيل للأصل المحدد. - - - - Your version is already up to date! - نسختك محدثة بالفعل! - - - - Update Available - تحديث متاح - - - - Update Channel - قناة التحديث - - - - Current Version - الإصدار الحالي - - - - Latest Version - آخر إصدار - - - - Do you want to update? - هل تريد التحديث؟ - - - - Show Changelog - عرض سجل التغييرات - - - - Check for Updates at Startup - تحقق من التحديثات عند بدء التشغيل - - - - Update - تحديث - - - - No - لا - - - - Hide Changelog - إخفاء سجل التغييرات - - - - Changes - تغييرات - - - - Network error occurred while trying to access the URL - حدث خطأ في الشبكة أثناء محاولة الوصول إلى عنوان URL - - - - Download Complete - اكتمل التنزيل - - - - The update has been downloaded, press OK to install. - تم تنزيل التحديث، اضغط على OK للتثبيت. - - - - Failed to save the update file at - فشل في حفظ ملف التحديث في - - - - Starting Update... - بدء التحديث... - - - - Failed to create the update script file - فشل في إنشاء ملف سكريبت التحديث - - - - GameListUtils - - - B - B - - - - KB - KB - - - - MB - MB - - - - GB - GB - - - - TB - TB - - - \ No newline at end of file diff --git a/src/qt_gui/translations/ar_SA.ts b/src/qt_gui/translations/ar_SA.ts new file mode 100644 index 000000000..f5503e189 --- /dev/null +++ b/src/qt_gui/translations/ar_SA.ts @@ -0,0 +1,2089 @@ + + + + + + AboutDialog + + About shadPS4 + حول shadPS4 + + + 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. + يجب عدم استخدام هذا البرنامج لتشغيل الألعاب التي لم تحصل عليها بشكل قانوني. + + + + CheatsPatches + + Cheats / Patches for + الغِشّ / التصحيحات + + + 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:\n + الغش والتصحيحات هي ميزات تجريبية.\nاستخدمها بحذر.\n\nقم بتنزيل الغش بشكل فردي عن طريق اختيار المستودع والنقر على زر التنزيل.\nفي علامة تبويب التصحيحات، يمكنك تنزيل جميع التصحيحات دفعة واحدة، واختيار ما تريد استخدامه، وحفظ اختياراتك.\n\nنظرًا لأننا لا نقوم بتطوير الغش/التصحيحات،\nيرجى الإبلاغ عن أي مشاكل إلى مؤلف الغش.\n\nهل قمت بإنشاء غش جديد؟ قم بزيارة:\n + + + 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 + لم يتم العثور على الغش + + + 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 + تم تنزيل الغش بنجاح + + + 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 download: + :فشل في التنزيل + + + Download Complete + اكتمل التنزيل + + + 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. If the patch does not appear, it may be that it does not exist for the specific serial and version of the game. + تم تنزيل التصحيحات بنجاح! تم تنزيل جميع التصحيحات لجميع الألعاب، ولا داعي لتنزيلها بشكل فردي لكل لعبة كما هو الحال مع الغش. إذا لم يظهر التحديث، قد يكون السبب أنه غير متوفر للإصدار وسيريال اللعبة المحدد. + + + Failed to parse JSON data from HTML. + فشل في تحليل بيانات JSON من HTML. + + + Failed to retrieve HTML page. + .HTML فشل في استرجاع صفحة + + + The game is in version: %1 + اللعبة في الإصدار: %1 + + + The downloaded patch only works on version: %1 + الباتش الذي تم تنزيله يعمل فقط على الإصدار: %1 + + + You may need to update your game. + قد تحتاج إلى تحديث لعبتك. + + + Incompatibility Notice + إشعار عدم التوافق + + + 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: + :الاسم + + + Can't apply cheats before the game is started + لا يمكن تطبيق الغش قبل بدء اللعبة. + + + Close + إغلاق + + + + CheckUpdate + + Auto Updater + محدث تلقائي + + + Error + خطأ + + + Network error: + خطأ في الشبكة: + + + The Auto Updater allows up to 60 update checks per hour.\nYou have reached this limit. Please try again later. + يتيح التحديث التلقائي ما يصل إلى 60 عملية تحقق من التحديث في الساعة.\nلقد وصلت إلى هذا الحد. الرجاء المحاولة مرة أخرى لاحقًا. + + + Failed to parse update information. + فشل في تحليل معلومات التحديث. + + + No pre-releases found. + لم يتم العثور على أي إصدارات مسبقة. + + + Invalid release data. + بيانات الإصدار غير صالحة. + + + No download URL found for the specified asset. + لم يتم العثور على عنوان URL للتنزيل للأصل المحدد. + + + Your version is already up to date! + نسختك محدثة بالفعل! + + + Update Available + تحديث متاح + + + Update Channel + قناة التحديث + + + Current Version + الإصدار الحالي + + + Latest Version + آخر إصدار + + + Do you want to update? + هل تريد التحديث؟ + + + Show Changelog + عرض سجل التغييرات + + + Check for Updates at Startup + تحقق من التحديثات عند بدء التشغيل + + + Update + تحديث + + + No + لا + + + Hide Changelog + إخفاء سجل التغييرات + + + Changes + تغييرات + + + Network error occurred while trying to access the URL + حدث خطأ في الشبكة أثناء محاولة الوصول إلى عنوان URL + + + Download Complete + اكتمل التنزيل + + + The update has been downloaded, press OK to install. + تم تنزيل التحديث، اضغط على OK للتثبيت. + + + Failed to save the update file at + فشل في حفظ ملف التحديث في + + + Starting Update... + بدء التحديث... + + + Failed to create the update script file + فشل في إنشاء ملف سكريبت التحديث + + + + CompatibilityInfoClass + + Fetching compatibility data, please wait + جاري جلب بيانات التوافق، يرجى الانتظار + + + Cancel + إلغاء + + + Loading... + جاري التحميل... + + + Error + خطأ + + + Unable to update compatibility data! Try again later. + تعذر تحديث بيانات التوافق! حاول مرة أخرى لاحقاً. + + + Unable to open compatibility_data.json for writing. + تعذر فتح compatibility_data.json للكتابة. + + + Unknown + غير معروف + + + Nothing + لا شيء + + + Boots + أحذية + + + Menus + قوائم + + + Ingame + داخل اللعبة + + + Playable + قابل للعب + + + + ControlSettings + + Configure Controls + تعديل عناصر التحكم + + + D-Pad + الأسهم+عصا التحكم + + + Up + فوق + + + Left + يسار + + + Right + يمين + + + Down + تحت + + + Left Stick Deadzone (def:2 max:127) + مدى تسجيل الإدخال للعصا اليسرى (التلقائي:2 حد أقصى:127) + + + Left Deadzone + إعدادات مدى تسجيل الإدخال لعصا التحكم اليسرى + + + Left Stick + عصا التحكم اليسرى + + + Config Selection + تحديد الإعدادات + + + Common Config + إعدادات عامة + + + Use per-game configs + استخدام إعدادات كل لُعْبَة + + + L1 / LB + L1 / LB + + + L2 / LT + L2 / LT + + + Back + رجوع + + + R1 / RB + R1 / RB + + + R2 / RT + R2 / RT + + + L3 + L3 + + + Options / Start + الخيارات / البَدْء + + + R3 + R3 + + + Face Buttons + الأزرار + + + Triangle / Y + مثلث / Y + + + Square / X + مربع / X + + + Circle / B + دائرة / B + + + Cross / A + إكس / A + + + Right Stick Deadzone (def:2, max:127) + مدى تسجيل الإدخال للعصا اليمنى (التلقائي:2 حد أقصى:127) + + + Right Deadzone + إعدادات مدى تسجيل الإدخال لعصا التحكم اليمنى + + + Right Stick + عصا التحكم اليمنى + + + Color Adjustment + تعديل الألوان + + + R: + أحمر: + + + G: + أخضر: + + + B: + أزرق: + + + Override Lightbar Color + تجاوز لون شريط الإضاءة + + + Override Color + تجاوز اللون + + + Unable to Save + غير قادر على الحفظ + + + Cannot bind axis values more than once + لا يمكن ربط قيم المحور أكثر من مرة + + + Save + حفظ + + + Apply + تطبيق + + + Restore Defaults + استعادة الإعدادات الافتراضية + + + Cancel + إلغاء + + + + EditorDialog + + Edit Keyboard + Mouse and Controller input bindings + تحرير أزرار الإدخال للوحة المفاتيح و الفأرة ووحدة التحكم + + + Use Per-Game configs + استخدام إعدادات كل لُعْبَة + + + Error + خطأ + + + Could not open the file for reading + تعذر فتح المِلَفّ للقراءة + + + Could not open the file for writing + تعذر فتح المِلَفّ للكتابة + + + Save Changes + حفظ التغييرات + + + Do you want to save changes? + هل تريد حفظ التغييرات؟ + + + Help + المساعدة + + + Do you want to reset your custom default config to the original default config? + هل تريد إعادة تعيين الإعدادات الافتراضية المخصصة الخاصة بك إلى الإعدادات الافتراضية الأصلية؟ + + + Do you want to reset this config to your custom default config? + هل تريد إعادة تعيين هذا الإعداد إلى الإعداد الافتراضي المخصص لك؟ + + + Reset to Default + إعادة تعيين إلى الافتراضي + + + + ElfViewer + + Open Folder + فتح المجلد + + + + GameInfoClass + + Loading game list, please wait :3 + جارٍ تحميل قائمة الألعاب، يرجى الانتظار :3 + + + Cancel + إلغاء + + + Loading... + ...جارٍ التحميل + + + + GameInstallDialog + + shadPS4 - Choose directory + shadPS4 - اختر المجلد + + + Directory to install games + مجلد تثبيت الألعاب + + + Browse + تصفح + + + Error + خطأ + + + Directory to install DLC + مكان تثبيت حزمات DLC + + + + GameListFrame + + Icon + أيقونة + + + Name + اسم + + + Serial + سيريال + + + Compatibility + التوافق + + + Region + منطقة + + + Firmware + البرمجيات الثابتة + + + Size + حجم + + + Version + إصدار + + + Path + مسار + + + Play Time + وقت اللعب + + + Never Played + لم تلعب أبداً + + + h + ا + + + m + ة + + + s + ثانية/ثواني + + + Compatibility is untested + التوافق غير مختبر + + + Game does not initialize properly / crashes the emulator + اللعبة لا تهيئ بشكل صحيح / تعطل المحاكي + + + Game boots, but only displays a blank screen + اللعبة تبدأ بالعمل، ولكن فقط تعرض شاشة فارغة + + + Game displays an image but does not go past the menu + اللعبة تعرض صورة ولكن لا تتجاوز القائمة + + + Game has game-breaking glitches or unplayable performance + اللعبة بها قلتشات أو أداء غير قابل للتشغيل + + + Game can be completed with playable performance and no major glitches + يمكن الانتهاء من اللعبة مع الأداء القابل للتشغيل و لا توجد قلتشات كبيرة + + + Click to see details on github + انقر لرؤية التفاصيل على GitHub + + + Last updated + آخر تحديث + + + + GameListUtils + + B + بايت + + + KB + كيلو بايت + + + MB + ميغابايت + + + GB + جيجابايت + + + TB + تيرابايت + + + + GuiContextMenus + + Create Shortcut + إنشاء اختصار + + + Cheats / Patches + الغش / التصحيحات + + + SFO Viewer + عارض SFO + + + Trophy Viewer + عارض الجوائز + + + Open Folder... + فتح المجلد... + + + Open Game Folder + فتح مجلد اللعبة + + + Open Save Data Folder + فتح مجلد بيانات الحفظ + + + Open Log Folder + فتح مجلد السجل + + + Copy info... + ...نسخ المعلومات + + + Copy Name + نسخ الاسم + + + Copy Serial + نسخ الرقم التسلسلي + + + Copy Version + إصدار النسخة + + + Copy Size + حجم النسخة + + + Copy All + نسخ الكل + + + Delete... + حذف... + + + Delete Game + حذف اللعبة + + + Delete Update + حذف التحديث + + + Delete DLC + حذف DLC + + + Delete Trophy + حذف الكؤوس + + + Compatibility... + التوافق... + + + Update database + تحديث قاعدة البيانات + + + View report + عرض التقرير + + + Submit a report + إرسال بلاغ + + + Shortcut creation + إنشاء اختصار + + + Shortcut created successfully! + تم إنشاء الاختصار بنجاح! + + + Error + خطأ + + + Error creating shortcut! + خطأ في إنشاء الاختصار + + + Game + اللعبة + + + This game has no update to delete! + لا تحتوي اللعبة على تحديث لحذفه! + + + Update + تحديث + + + This game has no DLC to delete! + لا تحتوي اللعبة على DLC لحذفه! + + + DLC + DLC + + + Delete %1 + حذف %1 + + + Are you sure you want to delete %1's %2 directory? + هل أنت متأكد من أنك تريد حذف دليل %1's %2؟ + + + Open Update Folder + فتح مجلد التحديث + + + Delete Save Data + حذف التخزينه + + + This game has no update folder to open! + لا تحتوي اللعبة على تحديث لفتحه! + + + No log file found for this game! + لم يتم العثور على ملف سجل لهذه اللعبة! + + + Failed to convert icon. + فشل تحويل الأيقونة. + + + This game has no save data to delete! + هذه اللعبة لا تحتوي على أي تخزينات لحذفها! + + + This game has no saved trophies to delete! + هذه اللعبة ليس لديها كؤوس محفوظة للحذف! + + + Save Data + حفظ البيانات + + + Trophy + الكؤوس + + + SFO Viewer for + عارض SFO لـ + + + + HelpDialog + + Quickstart + التشغيل السريع + + + FAQ + الأسئلة الأكثر شيوعاً + + + Syntax + الصّيغة + + + Special Bindings + إدخالات خاصة + + + Keybindings + أزرار التحكم + + + + KBMSettings + + Configure Controls + تعديل عناصر التحكم + + + D-Pad + الأسهم+عصا التحكم + + + Up + أعلى + + + unmapped + غير معين + + + Left + يسار + + + Right + يمين + + + Down + أسفل + + + Left Analog Halfmode + تقليل سرعة عصا التحكم اليسرى للنصف + + + hold to move left stick at half-speed + الاستمرار للتحرك إلى اليسار بنصف السرعة + + + Left Stick + عصا التحكم اليسرى + + + Config Selection + تحديد الإعدادات + + + Common Config + إعدادات عامة + + + Use per-game configs + استخدام إعدادات كل لُعْبَة + + + L1 + L1 + + + L2 + L2 + + + Text Editor + محرر النص + + + Help + المساعدة + + + R1 + R1 + + + R2 + R2 + + + L3 + L3 + + + Touchpad Click + النقر على لوحة اللمس + + + Mouse to Joystick + الفأرة إلى عصا التحكم + + + *press F7 ingame to activate + * اضغط على F7 للتفعيل + + + R3 + R3 + + + Options + الخيارات + + + Mouse Movement Parameters + معطيات حركة الفأرة + + + note: click Help Button/Special Keybindings for more information + ملاحظة: انقر فوق زر المساعدة/روابط المفاتيح الخاصة للحصول على مزيد من المعلومات + + + Face Buttons + أزرار الوجه + + + Triangle + مثلث + + + Square + مربع + + + Circle + دائرة + + + Cross + اكس + + + Right Analog Halfmode + تقليل سرعة عصا التحكم اليمنى للنصف + + + hold to move right stick at half-speed + الضغط باستمرار لتحريك العصا اليمنى بنصف السرعة + + + Right Stick + عصا التحكم اليمنى + + + Speed Offset (def 0.125): + إزاحة السرعة (تلقائي 0.125): + + + Copy from Common Config + نسخ من الإعدادات الشائعة + + + Deadzone Offset (def 0.50): + Deadzone Offset (def 0.50): + + + Speed Multiplier (def 1.0): + معدل مضاعفة السرعة (التلقائي 1.0): + + + Common Config Selected + الإعدادات الشائعة محدده + + + This button copies mappings from the Common Config to the currently selected profile, and cannot be used when the currently selected profile is the Common Config. + This button copies mappings from the Common Config to the currently selected profile, and cannot be used when the currently selected profile is the Common Config. + + + Copy values from Common Config + نسخ من الإعدادات الشائعة + + + Do you want to overwrite existing mappings with the mappings from the Common Config? + Do you want to overwrite existing mappings with the mappings from the Common Config? + + + Unable to Save + غير قادر على الحفظ + + + Cannot bind any unique input more than once + لا يمكن ربط أي إدخال فريد أكثر من مرة + + + Press a key + اضغط على مفتاح + + + Cannot set mapping + لا يمكن تعيين الأزرار + + + Mousewheel cannot be mapped to stick outputs + عجلة الفأرة لا يمكن تعيينها لعصا التحكم + + + Save + حفظ + + + Apply + تطبيق + + + Restore Defaults + استعادة الإعدادات الافتراضية + + + Cancel + إلغاء + + + + MainWindow + + Open/Add Elf Folder + Elf فتح/إضافة مجلد + + + Boot Game + تشغيل اللعبة + + + Check for Updates + تحقق من التحديثات + + + About shadPS4 + shadPS4 حول + + + Configure... + ...تكوين + + + Recent Games + الألعاب الأخيرة + + + Open shadPS4 Folder + فتح مجلد shadPS4 + + + Exit + خروج + + + Exit shadPS4 + الخروج من shadPS4 + + + Exit the application. + الخروج من التطبيق. + + + Show Game List + إظهار قائمة الألعاب + + + Game List Refresh + تحديث قائمة الألعاب + + + Tiny + صغير جدًا + + + Small + صغير + + + Medium + متوسط + + + Large + كبير + + + List View + عرض القائمة + + + Grid View + عرض الشبكة + + + Elf Viewer + عارض Elf + + + Game Install Directory + دليل تثبيت اللعبة + + + Download Cheats/Patches + تنزيل الغش/التصحيحات + + + Dump Game List + تفريغ قائمة الألعاب + + + Trophy Viewer + عارض الجوائز + + + No games found. Please add your games to your library first. + لم يتم العثور على ألعاب. الرجاء إضافة ألعابك إلى مكتبتك أولاً. + + + Search... + ...بحث + + + File + ملف + + + View + عرض + + + Game List Icons + أيقونات قائمة الألعاب + + + Game List Mode + وضع قائمة الألعاب + + + Settings + الإعدادات + + + Utils + الأدوات + + + Themes + السمات + + + Help + مساعدة + + + Dark + داكن + + + Light + فاتح + + + Green + أخضر + + + Blue + أزرق + + + Violet + بنفسجي + + + toolBar + شريط الأدوات + + + Game List + ققائمة الألعاب + + + * 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: + :الألعاب + + + ELF files (*.bin *.elf *.oelf) + ELF (*.bin *.elf *.oelf) ملفات + + + Game Boot + تشغيل اللعبة + + + Only one file can be selected! + !يمكن تحديد ملف واحد فقط + + + Run Game + تشغيل اللعبة + + + Eboot.bin file not found + لم يتم العثور على ملف Eboot.bin + + + Game is already running! + اللعبة قيد التشغيل بالفعل! + + + shadPS4 + shadPS4 + + + Play + أبدأ اللعب + + + Pause + توقف مؤقت + + + Stop + إيقاف + + + Restart + إعادة تشغيل + + + Full Screen + وضع ملء الشاشة + + + Controllers + أذرعة التحكم + + + Keyboard + لوحة المفاتيح + + + Refresh List + تحديث القائمة + + + Resume + استئناف + + + Show Labels Under Icons + إظهار العلامات أسفل الأيقونات + + + + SettingsDialog + + Settings + الإعدادات + + + General + عام + + + System + النظام + + + Console Language + لغة وحدة التحكم + + + Emulator Language + لغة المحاكي + + + Emulator + المحاكي + + + Enable Separate Update Folder + Enable Separate Update Folder + + + Default tab when opening settings + علامة التبويب الافتراضية عند فتح الإعدادات + + + Show Game Size In List + عرض حجم اللعبة في القائمة + + + Show Splash + إظهار شاشة البداية + + + Enable Discord Rich Presence + تفعيل حالة الثراء في ديسكورد + + + Username + اسم المستخدم + + + Trophy Key + Trophy Key + + + Trophy + الكؤوس + + + Open the custom trophy images/sounds folder + Open the custom trophy images/sounds folder + + + Logger + المسجل + + + Log Type + نوع السجل + + + Log Filter + مرشح السجل + + + Open Log Location + افتح موقع السجل + + + Input + إدخال + + + Cursor + مؤشر + + + Hide Cursor + إخفاء المؤشر + + + Hide Cursor Idle Timeout + مهلة إخفاء المؤشر عند الخمول + + + s + s + + + Controller + التحكم + + + Back Button Behavior + سلوك زر العودة + + + Graphics + الرسومات + + + GUI + واجهة + + + User + مستخدم + + + Graphics Device + جهاز الرسومات + + + Vblank Divider + Vblank مقسم + + + Advanced + متقدم + + + Enable Shaders Dumping + تمكين تفريغ الشيدرات + + + Enable NULL GPU + تمكين وحدة معالجة الرسومات الفارغة + + + Enable HDR + Enable HDR + + + Paths + المسارات + + + Game Folders + مجلدات اللعبة + + + Add... + إضافة... + + + Remove + إزالة + + + Debug + تصحيح الأخطاء + + + Enable Debug Dumping + تمكين تفريغ التصحيح + + + Enable Vulkan Validation Layers + Vulkan تمكين طبقات التحقق من + + + Enable Vulkan Synchronization Validation + Vulkan تمكين التحقق من تزامن + + + Enable RenderDoc Debugging + RenderDoc تمكين تصحيح أخطاء + + + Enable Crash Diagnostics + Enable Crash Diagnostics + + + Collect Shaders + Collect Shaders + + + Copy GPU Buffers + Copy GPU Buffers + + + Host Debug Markers + Host Debug Markers + + + Guest Debug Markers + Guest Debug Markers + + + Update + تحديث + + + Check for Updates at Startup + تحقق من التحديثات عند بدء التشغيل + + + Always Show Changelog + Always Show Changelog + + + Update Channel + قناة التحديث + + + Check for Updates + التحقق من التحديثات + + + GUI Settings + إعدادات الواجهة + + + Title Music + Title Music + + + Disable Trophy Notification + Disable Trophy Notification + + + Background Image + Background Image + + + Show Background Image + Show Background Image + + + Opacity + Opacity + + + Play title music + تشغيل موسيقى العنوان + + + Update Compatibility Database On Startup + Update Compatibility Database On Startup + + + Game Compatibility + Game Compatibility + + + Display Compatibility Data + Display Compatibility Data + + + Update Compatibility Database + Update Compatibility Database + + + Volume + الصوت + + + Save + حفظ + + + Apply + تطبيق + + + Restore Defaults + استعادة الإعدادات الافتراضية + + + Close + إغلاق + + + Point your mouse at an option to display its description. + وجّه الماوس نحو خيار لعرض وصفه. + + + Console Language:\nSets the language that the PS4 game uses.\nIt's recommended to set this to a language the game supports, which will vary by region. + لغة الجهاز:\nتحدد لغة اللعبة التي يستخدمها جهاز PS4.\nيوصى بضبطها على لغة يدعمها الجهاز، والتي قد تختلف حسب المنطقة. + + + Emulator Language:\nSets the language of the emulator's user interface. + لغة المحاكي:\nتحدد لغة واجهة المستخدم الخاصة بالمحاكي. + + + Enable Separate Update Folder:\nEnables installing game updates into a separate folder for easy management.\nThis can be manually created by adding the extracted update to the game folder with the name "CUSA00000-UPDATE" where the CUSA ID matches the game's ID. + Enable Separate Update Folder:\nEnables installing game updates into a separate folder for easy management. + + + Show Splash Screen:\nShows the game's splash screen (a special image) while the game is starting. + إظهار شاشة البداية:\nيعرض شاشة البداية الخاصة باللعبة (صورة خاصة) أثناء بدء التشغيل. + + + Enable Discord Rich Presence:\nDisplays the emulator icon and relevant information on your Discord profile. + تفعيل حالة الثراء في ديسكورد:\nيعرض أيقونة المحاكي ومعلومات ذات صلة على ملفك الشخصي في ديسكورد. + + + Username:\nSets the PS4's account username, which may be displayed by some games. + اسم المستخدم:\nيضبط اسم حساب PS4، الذي قد يتم عرضه في بعض الألعاب. + + + Trophy Key:\nKey used to decrypt trophies. Must be obtained from your jailbroken console.\nMust contain only hex characters. + Trophy Key:\nKey used to decrypt trophies. Must be obtained from your jailbroken console.\nMust contain only hex characters. + + + Log Type:\nSets whether to synchronize the output of the log window for performance. May have adverse effects on emulation. + نوع السجل:\nيضبط ما إذا كان سيتم مزامنة مخرجات نافذة السجل للأداء. قد يؤثر سلبًا على المحاكاة. + + + Log Filter:\nFilters the log to only print specific information.\nExamples: "Core:Trace" "Lib.Pad:Debug Common.Filesystem:Error" "*:Critical"\nLevels: Trace, Debug, Info, Warning, Error, Critical - in this order, a specific level silences all levels preceding it in the list and logs every level after it. + فلتر السجل:\nيقوم بتصفية السجل لطباعة معلومات محددة فقط.\nأمثلة: "Core:Trace" "Lib.Pad:Debug Common.Filesystem:Error" "*:Critical" المستويات: Trace, Debug, Info, Warning, Error, Critical - بالترتيب، مستوى محدد يخفي جميع المستويات التي تسبقه ويعرض جميع المستويات بعده. + + + Update:\nRelease: Official versions released every month that may be very outdated, but are more reliable and tested.\nNightly: Development versions that have all the latest features and fixes, but may contain bugs and are less stable. + تحديث: Release: إصدارات رسمية تصدر شهريًا، قد تكون قديمة بعض الشيء، لكنها أكثر استقرارًا واختبارًا. Nightly: إصدارات تطوير تحتوي على أحدث الميزات والإصلاحات، لكنها قد تحتوي على أخطاء وأقل استقرارًا. + + + Background Image:\nControl the opacity of the game background image. + Background Image:\nControl the opacity of the game background image. + + + Play Title Music:\nIf a game supports it, enable playing special music when selecting the game in the GUI. + تشغيل موسيقى العنوان:\nإذا كانت اللعبة تدعم ذلك، قم بتمكين تشغيل موسيقى خاصة عند اختيار اللعبة في واجهة المستخدم. + + + Disable Trophy Pop-ups:\nDisable in-game trophy notifications. Trophy progress can still be tracked using the Trophy Viewer (right-click the game in the main window). + Disable Trophy Pop-ups:\nDisable in-game trophy notifications. Trophy progress can still be tracked using the Trophy Viewer (right-click the game in the main window). + + + Hide Cursor:\nChoose when the cursor will disappear:\nNever: You will always see the mouse.\nidle: Set a time for it to disappear after being idle.\nAlways: you will never see the mouse. + إخفاء المؤشر:\nاختر متى سيختفي المؤشر:\nأبداً: سترى الفأرة دائماً.\nعاطل: حدد وقتاً لاختفائه بعد أن يكون غير مستخدم.\nدائماً: لن ترى الفأرة أبداً. + + + Hide Idle Cursor Timeout:\nThe duration (seconds) after which the cursor that has been idle hides itself. + حدد وقتاً لاختفاء الفأرة بعد أن تكون غير مستخدم. + + + Back Button Behavior:\nSets the controller's back button to emulate tapping the specified position on the PS4 touchpad. + سلوك زر العودة:\nيضبط زر العودة في وحدة التحكم ليحاكي الضغط على الموضع المحدد على لوحة اللمس في PS4. + + + Display Compatibility Data:\nDisplays game compatibility information in table view. Enable "Update Compatibility On Startup" to get up-to-date information. + Display Compatibility Data:\nDisplays game compatibility information in table view. Enable "Update Compatibility On Startup" to get up-to-date information. + + + Update Compatibility On Startup:\nAutomatically update the compatibility database when shadPS4 starts. + Update Compatibility On Startup:\nAutomatically update the compatibility database when shadPS4 starts. + + + Update Compatibility Database:\nImmediately update the compatibility database. + Update Compatibility Database:\nImmediately update the compatibility database. + + + Never + أبداً + + + Idle + خامل + + + Always + دائماً + + + Touchpad Left + لوحة اللمس اليسرى + + + Touchpad Right + لوحة اللمس اليمنى + + + Touchpad Center + وسط لوحة اللمس + + + None + لا شيء + + + Graphics Device:\nOn multiple GPU systems, select the GPU the emulator will use from the drop down list,\nor select "Auto Select" to automatically determine it. + جهاز الرسومات:\nعلى الأنظمة متعددة وحدات معالجة الرسومات، اختر وحدة معالجة الرسومات التي سيستخدمها المحاكي من قائمة منسدلة،\nأو اختر "Auto Select" لتحديدها تلقائيًا. + + + Width/Height:\nSets the size of the emulator window at launch, which can be resized during gameplay.\nThis is different from the in-game resolution. + العرض / الارتفاع:\nيضبط حجم نافذة المحاكي عند التشغيل، والذي يمكن تغيير حجمه أثناء اللعب.\nهذا يختلف عن دقة اللعبة نفسها. + + + Vblank Divider:\nThe frame rate at which the emulator refreshes at is multiplied by this number. Changing this may have adverse effects, such as increasing the game speed, or breaking critical game functionality that does not expect this to change! + مقسم معدل التحديث:\nيتم مضاعفة معدل الإطارات الذي يتم تحديث المحاكي به بواسطة هذا الرقم. قد يؤدي تغيير هذا إلى آثار سلبية، مثل زيادة سرعة اللعبة أو كسر الوظائف الأساسية التي لا تتوقع هذا التغيير! + + + Enable Shaders Dumping:\nFor the sake of technical debugging, saves the games shaders to a folder as they render. + تمكين تفريغ الـ Shaders:\nلأغراض تصحيح الأخطاء التقنية، يحفظ الـ Shaders الخاصة باللعبة في مجلد أثناء التشغيل. + + + Enable Null GPU:\nFor the sake of technical debugging, disables game rendering as if there were no graphics card. + تمكين GPU الافتراضية:\nلأغراض تصحيح الأخطاء التقنية، يقوم بتعطيل عرض اللعبة كما لو لم يكن هناك بطاقة رسومات. + + + Enable HDR:\nEnables HDR in games that support it.\nYour monitor must have support for the BT2020 PQ color space and the RGB10A2 swapchain format. + Enable HDR:\nEnables HDR in games that support it.\nYour monitor must have support for the BT2020 PQ color space and the RGB10A2 swapchain format. + + + Game Folders:\nThe list of folders to check for installed games. + مجلدات اللعبة:\nقائمة بالمجلدات للتحقق من الألعاب المثبتة. + + + Add:\nAdd a folder to the list. + إضافة:\nأضف مجلداً إلى القائمة. + + + Remove:\nRemove a folder from the list. + إزالة:\nأزل مجلداً من القائمة. + + + Enable Debug Dumping:\nSaves the import and export symbols and file header information of the currently running PS4 program to a directory. + تمكين تفريغ التصحيح:\nيحفظ رموز الاستيراد والتصدير ومعلومات رأس الملف للبرنامج الحالي لجهاز PS4 إلى دليل. + + + Enable Vulkan Validation Layers:\nEnables a system that validates the state of the Vulkan renderer and logs information about its internal state.\nThis will reduce performance and likely change the behavior of emulation. + تمكين طبقات التحقق من Vulkan:\nيتيح نظام يتحقق من حالة مشغل Vulkan ويسجل معلومات حول حالته الداخلية. سيؤدي هذا إلى تقليل الأداء ومن المحتمل تغيير سلوك المحاكاة. + + + Enable Vulkan Synchronization Validation:\nEnables a system that validates the timing of Vulkan rendering tasks.\nThis will reduce performance and likely change the behavior of emulation. + تمكين التحقق من تزامن Vulkan:\nيتيح نظام يتحقق من توقيت مهام عرض Vulkan. سيؤدي ذلك إلى تقليل الأداء ومن المحتمل تغيير سلوك المحاكاة. + + + Enable RenderDoc Debugging:\nIf enabled, the emulator will provide compatibility with Renderdoc to allow capture and analysis of the currently rendered frame. + تمكين تصحيح RenderDoc:\nإذا تم التمكين، سيوفر المحاكي توافقًا مع Renderdoc لالتقاط وتحليل الإطار الذي يتم عرضه حاليًا. + + + Collect Shaders:\nYou need this enabled to edit shaders with the debug menu (Ctrl + F10). + Collect Shaders:\nYou need this enabled to edit shaders with the debug menu (Ctrl + F10). + + + Crash Diagnostics:\nCreates a .yaml file with info about the Vulkan state at the time of crashing.\nUseful for debugging 'Device lost' errors. If you have this enabled, you should enable Host AND Guest Debug Markers.\nDoes not work on Intel GPUs.\nYou need Vulkan Validation Layers enabled and the Vulkan SDK for this to work. + Crash Diagnostics:\nCreates a .yaml file with info about the Vulkan state at the time of crashing.\nUseful for debugging 'Device lost' errors. If you have this enabled, you should enable Host AND Guest Debug Markers.\nDoes not work on Intel GPUs.\nYou need Vulkan Validation Layers enabled and the Vulkan SDK for this to work. + + + Copy GPU Buffers:\nGets around race conditions involving GPU submits.\nMay or may not help with PM4 type 0 crashes. + Copy GPU Buffers:\nGets around race conditions involving GPU submits.\nMay or may not help with PM4 type 0 crashes. + + + Host Debug Markers:\nInserts emulator-side information like markers for specific AMDGPU commands around Vulkan commands, as well as giving resources debug names.\nIf you have this enabled, you should enable Crash Diagnostics.\nUseful for programs like RenderDoc. + Host Debug Markers:\nInserts emulator-side information like markers for specific AMDGPU commands around Vulkan commands, as well as giving resources debug names.\nIf you have this enabled, you should enable Crash Diagnostics.\nUseful for programs like RenderDoc. + + + Guest Debug Markers:\nInserts any debug markers the game itself has added to the command buffer.\nIf you have this enabled, you should enable Crash Diagnostics.\nUseful for programs like RenderDoc. + Guest Debug Markers:\nInserts any debug markers the game itself has added to the command buffer.\nIf you have this enabled, you should enable Crash Diagnostics.\nUseful for programs like RenderDoc. + + + Save Data Path:\nThe folder where game save data will be saved. + Save Data Path:\nThe folder where game save data will be saved. + + + Browse:\nBrowse for a folder to set as the save data path. + Browse:\nBrowse for a folder to set as the save data path. + + + Release + Release + + + Nightly + Nightly + + + Set the volume of the background music. + Set the volume of the background music. + + + Enable Motion Controls + Enable Motion Controls + + + Save Data Path + Save Data Path + + + Browse + تصفح + + + async + async + + + sync + sync + + + Auto Select + Auto Select + + + Directory to install games + مجلد تثبيت الألعاب + + + Directory to save data + Directory to save data + + + Video + Video + + + Display Mode + طريقة العرض + + + Windowed + نافذة + + + Fullscreen + شاشة كاملة + + + Fullscreen (Borderless) + شاشة كاملة (دون حدود) + + + Window Size + حجم النافذة + + + W: + W: + + + H: + H: + + + Separate Log Files + ملفات السجل المنفصل + + + Separate Log Files:\nWrites a separate logfile for each game. + Separate Log Files:\nWrites a separate logfile for each game. + + + Trophy Notification Position + موقع إشعار الكأس + + + Left + يسار + + + Right + يمين + + + Top + في الأعلى + + + Bottom + الأسفل + + + Notification Duration + مدة الإشعار + + + Portable User Folder + مجلد المستخدم المتنقل + + + Create Portable User Folder from Common User Folder + إنشاء مجلد مستخدم المتنقل من مجلد المستخدم الشائع + + + Portable user folder:\nStores shadPS4 settings and data that will be applied only to the shadPS4 build located in the current folder. Restart the app after creating the portable user folder to begin using it. + Portable user folder:\nStores shadPS4 settings and data that will be applied only to the shadPS4 build located in the current folder. Restart the app after creating the portable user folder to begin using it. + + + Cannot create portable user folder + لا يمكن إنشاء مجلد المستخدم المتنقل + + + %1 already exists + %1 موجود مسبقاً + + + Portable user folder created + Portable user folder created + + + %1 successfully created. + تم إنشاء %1 بنجاح. + + + Open the custom trophy images/sounds folder:\nYou can add custom images to the trophies and an audio.\nAdd the files to custom_trophy with the following names:\ntrophy.wav OR trophy.mp3, bronze.png, gold.png, platinum.png, silver.png\nNote: The sound will only work in QT versions. + Open the custom trophy images/sounds folder:\nYou can add custom images to the trophies and an audio.\nAdd the files to custom_trophy with the following names:\ntrophy.wav OR trophy.mp3, bronze.png, gold.png, platinum.png, silver.png\nNote: The sound will only work in QT versions. + + + + TrophyViewer + + Trophy Viewer + عارض الجوائز + + + Select Game: + اختر الُعْبَه: + + + Progress + مقدار التقدُّم + + + Show Earned Trophies + عرض الكؤوس المكتسبة + + + Show Not Earned Trophies + عرض الكؤوس غير المكتسبة + + + Show Hidden Trophies + عرض الكؤوس المخفية + + + diff --git a/src/qt_gui/translations/da_DK.ts b/src/qt_gui/translations/da_DK.ts index 41319c7ff..658ac118f 100644 --- a/src/qt_gui/translations/da_DK.ts +++ b/src/qt_gui/translations/da_DK.ts @@ -1,1664 +1,2089 @@ + - - - - 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... - - - - InstallDirSelect - - - shadPS4 - Choose directory - shadPS4 - Choose directory - - - - Select which directory you want to install to. - Select which directory you want to install to. - - - - 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 - - - - Cheats / Patches - Trick / Patches - - - - SFO Viewer - SFO Viewer - - - - Trophy Viewer - Trophy Viewer - - - - Open Folder... - Åbn Mappe... - - - - Open Game Folder - Åbn Spilmappe - - - - Open Save Data Folder - Åbn Gem Data Mappe - - - - Open Log Folder - Åbn Log Mappe - - - - Copy info... - Copy info... - - - - Copy Name - Copy Name - - - - Copy Serial - Copy Serial - - - - Copy All - Copy All - - - - Delete... - Delete... - - - - Delete Game - Delete Game - - - - Delete Update - Delete Update - - - - Delete DLC - Delete DLC - - - - Compatibility... - Compatibility... - - - - Update database - Update database - - - - View report - View report - - - - Submit a report - Submit a report - - - - Shortcut creation - Shortcut creation - - - - Shortcut created successfully! - Shortcut created successfully! - - - - Error - Error - - - - Error creating shortcut! - Error creating shortcut! - - - - Install PKG - Install PKG - - - - Game - Game - - - - requiresEnableSeparateUpdateFolder_MSG - This feature requires the 'Enable Separate Update Folder' config option to work. If you want to use this feature, please enable it. - - - - This game has no update to delete! - This game has no update to delete! - - - - Update - Update - - - - This game has no DLC to delete! - This game has no DLC to delete! - - - - DLC - DLC - - - - Delete %1 - Delete %1 - - - - Are you sure you want to delete %1's %2 directory? - Are you sure you want to delete %1's %2 directory? - - - - MainWindow - - - Open/Add Elf Folder - Open/Add Elf Folder - - - - Install Packages (PKG) - Install Packages (PKG) - - - - Boot Game - Boot Game - - - - Check for Updates - Tjek for opdateringer - - - - 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 - - - - Download Cheats/Patches - Download Tricks / Patches - - - - 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 - - - - Help - Hjælp - - - - 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 - - - - Enable Separate Update Folder - Enable Separate Update Folder - - - - Show Splash - Show Splash - - - - Is PS4 Pro - Is PS4 Pro - - - - Enable Discord Rich Presence - Aktiver Discord Rich Presence - - - - Username - Username - - - - Trophy Key - Trophy Key - - - - Trophy - Trophy - - - - Logger - Logger - - - - Log Type - Log Type - - - - Log Filter - Log Filter - - - - Input - Indtastning - - - - Cursor - Markør - - - - Hide Cursor - Skjul markør - - - - Hide Cursor Idle Timeout - Timeout for skjul markør ved inaktivitet - - - - s - s - - - - Controller - Controller - - - - Back Button Behavior - Tilbageknap adfærd - - - - 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 - - - - Paths - Stier - - - - Game Folders - Spilmapper - - - - Add... - Tilføj... - - - - Remove - Fjern - - - - 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 - - - - Update - Opdatering - - - - Check for Updates at Startup - Tjek for opdateringer ved start - - - - Update Channel - Opdateringskanal - - - - Check for Updates - Tjek for opdateringer - - - - GUI Settings - GUI-Indstillinger - - - - Disable Trophy Pop-ups - Disable Trophy Pop-ups - - - - Play title music - Afspil titelsang - - - - Update Compatibility Database On Startup - Update Compatibility Database On Startup - - - - Game Compatibility - Game Compatibility - - - - Display Compatibility Data - Display Compatibility Data - - - - Update Compatibility Database - Update Compatibility Database - - - - Volume - Lydstyrke - - - - Audio Backend - Audio Backend - - - - MainWindow - - - Game List - Spiloversigt - - - - * 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! - Opdatering detekteret! - - - - PKG and Game versions match: - PKG og spilversioner matcher: - - - - Would you like to overwrite? - Vil du overskrive? - - - - PKG Version %1 is older than installed version: - PKG Version %1 er ældre end den installerede version: - - - - Game is installed: - Spillet er installeret: - - - - Would you like to install Patch: - Vil du installere opdateringen: - - - - DLC Installation - DLC Installation - - - - Would you like to install DLC: %1? - Vil du installere DLC: %1? - - - - DLC already installed: - DLC allerede installeret: - - - - Game already installed - Spillet er allerede installeret - - - - 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 for - Cheats / Patches for - - - - 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. Hvis opdateringen ikke vises, kan det være, at den ikke findes for den specifikke serie og version af spillet. - - - - Failed to parse JSON data from HTML. - Kunne ikke analysere JSON-data fra HTML. - - - - Failed to retrieve HTML page. - Kunne ikke hente HTML-side. - - - - The game is in version: %1 - Spillet er i version: %1 - - - - The downloaded patch only works on version: %1 - Den downloadede patch fungerer kun på version: %1 - - - - You may need to update your game. - Du skal muligvis opdatere dit spil. - - - - Incompatibility Notice - Uforenelighedsmeddelelse - - - - 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: - - - - Can't apply cheats before the game is started - Kan ikke anvende snyd før spillet er startet. - - - - SettingsDialog - - - Save - Gem - - - - Apply - Anvend - - - - Restore Defaults - Gendan standardindstillinger - - - - Close - Luk - - - - Point your mouse at an option to display its description. - Peg musen over et valg for at vise dets beskrivelse. - - - - consoleLanguageGroupBox - Konsolsprog:\nIndstiller sproget, som PS4-spillet bruger.\nDet anbefales at indstille dette til et sprog, som spillet understøtter, hvilket kan variere efter region. - - - - emulatorLanguageGroupBox - Emulatorsprog:\nIndstiller sproget i emulatorens brugergrænseflade. - - - - fullscreenCheckBox - Aktiver fuld skærm:\nSætter automatisk spilvinduet i fuld skærm.\nDette kan skiftes ved at trykke på F11-tasten. - - - - separateUpdatesCheckBox - Enable Separate Update Folder:\nEnables installing game updates into a separate folder for easy management. - - - - showSplashCheckBox - Vis startskærm:\nViser en startskærm (speciel grafik) under opstarten. - - - - ps4proCheckBox - Er det en PS4 Pro:\nGør det muligt for emulatoren at fungere som en PS4 PRO, hvilket kan aktivere visse funktioner i spil, der understøtter det. - - - - discordRPCCheckbox - Aktiver Discord Rich Presence:\nViser emulatorikonet og relevante oplysninger på din Discord-profil. - - - - userName - Brugernavn:\nIndstiller PS4-kontoens navn, som kan blive vist i nogle spil. - - - - TrophyKey - Trophy Key:\nKey used to decrypt trophies. Must be obtained from your jailbroken console.\nMust contain only hex characters. - - - - logTypeGroupBox - Logtype:\nIndstiller, om logvinduets output vil blive synkroniseret for at øge ydeevnen. Dette kan påvirke emulatorens ydeevne negativt. - - - - logFilter - Logfilter:\nFiltrerer loggen for kun at udskrive bestemte oplysninger.\nEksempler: "Core:Trace" "Lib.Pad:Debug Common.Filesystem:Error" "*:Critical" Niveaus: Trace, Debug, Info, Warning, Error, Critical - i rækkefølge, et valgt niveau skjuler alle forudgående niveauer og viser alle efterfølgende niveauer. - - - - updaterGroupBox - Opdatering:\nRelease: Officielle builds, der frigives månedligt, som kan være meget ældre, men mere stabile og testet.\nNightly: Udviklerbuilds med de nyeste funktioner og rettelser, men som kan indeholde fejl og være mindre stabile. - - - - GUIgroupBox - Titelsmusikafspilning:\nHvis spillet understøtter det, aktiver speciel musik, når spillet vælges i brugergrænsefladen. - - - - disableTrophycheckBox - Disable Trophy Pop-ups:\nDisable in-game trophy notifications. Trophy progress can still be tracked using the Trophy Viewer (right-click the game in the main window). - - - - hideCursorGroupBox - Skjul Cursor:\nVælg hvornår cursoren skal forsvinde:\nAldrig: Du vil altid se musen.\nInaktiv: Indstil en tid for, hvornår den skal forsvinde efter at være inaktiv.\nAltid: du vil aldrig se musen. - - - - idleTimeoutGroupBox - Indstil en tid for, at musen skal forsvinde efter at være inaktiv. - - - - backButtonBehaviorGroupBox - Tilbageknap Adfærd:\nIndstiller controllerens tilbageknap til at efterligne tryk på den angivne position på PS4 berøringsflade. - - - - enableCompatibilityCheckBox - Display Compatibility Data:\nDisplays game compatibility information in table view. Enable "Update Compatibility On Startup" to get up-to-date information. - - - - checkCompatibilityOnStartupCheckBox - Update Compatibility On Startup:\nAutomatically update the compatibility database when shadPS4 starts. - - - - updateCompatibilityButton - Update Compatibility Database:\nImmediately update the compatibility database. - - - - Never - Aldrig - - - - Idle - Inaktiv - - - - Always - Altid - - - - Touchpad Left - Berøringsplade Venstre - - - - Touchpad Right - Berøringsplade Højre - - - - Touchpad Center - Berøringsplade Center - - - - None - Ingen - - - - graphicsAdapterGroupBox - Grafikadapter:\nPå systemer med flere GPU'er skal du vælge den GPU, emulatoren vil bruge fra en rullemenu,\neller vælge "Auto Select" for at vælge den automatisk. - - - - resolutionLayout - Skærmopløsning:\nIndstiller emulatorvinduets størrelse under afspilning, som kan ændres under afspilning.\nDette er forskelligt fra selve spillets opløsning. - - - - heightDivider - Opdateringshastighedsdeler:\nMultiplicerer den frekvens, som emulatoren opdaterer billedet med, med dette tal. Ændring af dette kan have negative effekter, såsom hurtigere spil eller ødelagte funktioner! - - - - dumpShadersCheckBox - Aktiver dumping af Shaders:\nTil teknisk fejlfinding gemmer det spillets shaders i en mappe under afspilning. - - - - nullGpuCheckBox - Aktiver virtuel GPU:\nTil teknisk fejlfinding deaktiverer det spilvisning, som om der ikke var et grafikkort. - - - - gameFoldersBox - Spilmappen:\nListen over mapper til at tjekke for installerede spil. - - - - addFolderButton - Tilføj:\nTilføj en mappe til listen. - - - - removeFolderButton - Fjern:\nFjern en mappe fra listen. - - - - debugDump - Aktiver debugging-dump:\nGemmer import/export-symboler og headeroplysninger for det aktuelle PS4-program til en mappe. - - - - vkValidationCheckBox - Aktiver Vulkan-valideringslag:\nAktiverer et system, der validerer Vulkan-driverens tilstand og logger oplysninger om dens interne tilstand. Dette vil reducere ydeevnen og kan muligvis ændre emulatorens adfærd. - - - - vkSyncValidationCheckBox - Aktiver Vulkan-synkroniseringsvalidering:\nAktiverer et system, der validerer tidspunktet for Vulkan's renderingsopgaver. Dette vil reducere ydeevnen og kan muligvis ændre emulatorens adfærd. - - - - rdocCheckBox - Aktiver RenderDoc-fejlfinding:\nHvis aktiveret, giver det emulatoren mulighed for kompatibilitet med Renderdoc til at fange og analysere det aktuelle gengivne billede. - - - - GameListFrame - - - Icon - Ikon - - - - Name - Navn - - - - Serial - Seriel - - - - Compatibility - Compatibility - - - - Region - Region - - - - Firmware - Firmware - - - - Size - Størrelse - - - - Version - Version - - - - Path - Sti - - - - Play Time - Spilletid - - - - Never Played - Never Played - - - - h - h - - - - m - m - - - - s - s - - - - Compatibility is untested - Compatibility is untested - - - - Game does not initialize properly / crashes the emulator - Game does not initialize properly / crashes the emulator - - - - Game boots, but only displays a blank screen - Game boots, but only displays a blank screen - - - - Game displays an image but does not go past the menu - Game displays an image but does not go past the menu - - - - Game has game-breaking glitches or unplayable performance - Game has game-breaking glitches or unplayable performance - - - - Game can be completed with playable performance and no major glitches - Game can be completed with playable performance and no major glitches - - - - CheckUpdate - - - Auto Updater - Automatisk opdatering - - - - Error - Fejl - - - - Network error: - Netsværksfejl: - - - - Failed to parse update information. - Kunne ikke analysere opdateringsoplysninger. - - - - No pre-releases found. - Ingen forhåndsudgivelser fundet. - - - - Invalid release data. - Ugyldige udgivelsesdata. - - - - No download URL found for the specified asset. - Ingen download-URL fundet for den specificerede aktiver. - - - - Your version is already up to date! - Din version er allerede opdateret! - - - - Update Available - Opdatering tilgængelig - - - - Update Channel - Opdateringskanal - - - - Current Version - Nuværende version - - - - Latest Version - Nyeste version - - - - Do you want to update? - Vil du opdatere? - - - - Show Changelog - Vis ændringslog - - - - Check for Updates at Startup - Tjek for opdateringer ved start - - - - Update - Opdater - - - - No - Nej - - - - Hide Changelog - Skjul ændringslog - - - - Changes - Ændringer - - - - Network error occurred while trying to access the URL - Netsværksfejl opstod, mens der blev forsøgt at få adgang til URL'en - - - - Download Complete - Download fuldført - - - - The update has been downloaded, press OK to install. - Opdateringen er blevet downloadet, tryk på OK for at installere. - - - - Failed to save the update file at - Kunne ikke gemme opdateringsfilen på - - - - Starting Update... - Starter opdatering... - - - - Failed to create the update script file - Kunne ikke oprette opdateringsscriptfilen - - - - GameListUtils - - - B - B - - - - KB - KB - - - - MB - MB - - - - GB - GB - - - - TB - TB - - - \ No newline at end of file + + + AboutDialog + + About shadPS4 + About 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. + + + + CheatsPatches + + Cheats / Patches for + Cheats / Patches for + + + 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:\n + 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:\n + + + 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 + + + No Cheats found for this game in this version of the selected repository,try another repository or a different version of the game. + 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 + + + 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. + 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 + + + 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. If the patch does not appear, it may be that it does not exist for the specific serial and version of the game. + 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. Hvis opdateringen ikke vises, kan det være, at den ikke findes for den specifikke serie og version af spillet. + + + Failed to parse JSON data from HTML. + Kunne ikke analysere JSON-data fra HTML. + + + Failed to retrieve HTML page. + Kunne ikke hente HTML-side. + + + The game is in version: %1 + Spillet er i version: %1 + + + The downloaded patch only works on version: %1 + Den downloadede patch fungerer kun på version: %1 + + + You may need to update your game. + Du skal muligvis opdatere dit spil. + + + Incompatibility Notice + Uforenelighedsmeddelelse + + + 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: + + + Can't apply cheats before the game is started + Kan ikke anvende snyd før spillet er startet. + + + Close + Luk + + + + CheckUpdate + + Auto Updater + Automatisk opdatering + + + Error + Fejl + + + Network error: + Netsværksfejl: + + + The Auto Updater allows up to 60 update checks per hour.\nYou have reached this limit. Please try again later. + Autoopdateren tillader op til 60 opdateringstjek i timen.\nDu har nået denne grænse. Prøv igen senere. + + + Failed to parse update information. + Kunne ikke analysere opdateringsoplysninger. + + + No pre-releases found. + Ingen forhåndsudgivelser fundet. + + + Invalid release data. + Ugyldige udgivelsesdata. + + + No download URL found for the specified asset. + Ingen download-URL fundet for den specificerede aktiver. + + + Your version is already up to date! + Din version er allerede opdateret! + + + Update Available + Opdatering tilgængelig + + + Update Channel + Opdateringskanal + + + Current Version + Nuværende version + + + Latest Version + Nyeste version + + + Do you want to update? + Vil du opdatere? + + + Show Changelog + Vis ændringslog + + + Check for Updates at Startup + Tjek for opdateringer ved start + + + Update + Opdater + + + No + Nej + + + Hide Changelog + Skjul ændringslog + + + Changes + Ændringer + + + Network error occurred while trying to access the URL + Netsværksfejl opstod, mens der blev forsøgt at få adgang til URL'en + + + Download Complete + Download fuldført + + + The update has been downloaded, press OK to install. + Opdateringen er blevet downloadet, tryk på OK for at installere. + + + Failed to save the update file at + Kunne ikke gemme opdateringsfilen på + + + Starting Update... + Starter opdatering... + + + Failed to create the update script file + Kunne ikke oprette opdateringsscriptfilen + + + + CompatibilityInfoClass + + Fetching compatibility data, please wait + Henter kompatibilitetsdata, vent venligst + + + Cancel + Annuller + + + Loading... + Indlæser... + + + Error + Fejl + + + Unable to update compatibility data! Try again later. + Kan ikke opdatere kompatibilitetsdata! Prøv igen senere. + + + Unable to open compatibility_data.json for writing. + Kan ikke åbne compatibility_data.json til skrivning. + + + Unknown + Ukendt + + + Nothing + Intet + + + Boots + Støvler + + + Menus + Menuer + + + Ingame + I spillet + + + Playable + Spilbar + + + + ControlSettings + + Configure Controls + Configure Controls + + + D-Pad + D-Pad + + + Up + Up + + + Left + Left + + + Right + Right + + + Down + Down + + + Left Stick Deadzone (def:2 max:127) + Left Stick Deadzone (def:2 max:127) + + + Left Deadzone + Left Deadzone + + + Left Stick + Left Stick + + + Config Selection + Config Selection + + + Common Config + Common Config + + + Use per-game configs + Use per-game configs + + + L1 / LB + L1 / LB + + + L2 / LT + L2 / LT + + + Back + Back + + + R1 / RB + R1 / RB + + + R2 / RT + R2 / RT + + + L3 + L3 + + + Options / Start + Options / Start + + + R3 + R3 + + + Face Buttons + Face Buttons + + + Triangle / Y + Triangle / Y + + + Square / X + Square / X + + + Circle / B + Circle / B + + + Cross / A + Cross / A + + + Right Stick Deadzone (def:2, max:127) + Right Stick Deadzone (def:2, max:127) + + + Right Deadzone + Right Deadzone + + + Right Stick + Right Stick + + + Color Adjustment + Color Adjustment + + + R: + R: + + + G: + G: + + + B: + B: + + + Override Lightbar Color + Override Lightbar Color + + + Override Color + Override Color + + + Unable to Save + Unable to Save + + + Cannot bind axis values more than once + Cannot bind axis values more than once + + + Save + Save + + + Apply + Apply + + + Restore Defaults + Restore Defaults + + + Cancel + Cancel + + + + EditorDialog + + Edit Keyboard + Mouse and Controller input bindings + Edit Keyboard + Mouse and Controller input bindings + + + Use Per-Game configs + Use Per-Game configs + + + Error + Error + + + Could not open the file for reading + Could not open the file for reading + + + Could not open the file for writing + Could not open the file for writing + + + Save Changes + Save Changes + + + Do you want to save changes? + Do you want to save changes? + + + Help + Help + + + Do you want to reset your custom default config to the original default config? + Do you want to reset your custom default config to the original default config? + + + Do you want to reset this config to your custom default config? + Do you want to reset this config to your custom default config? + + + Reset to Default + Reset to Default + + + + 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 + + + Directory to install DLC + Directory to install DLC + + + + GameListFrame + + Icon + Ikon + + + Name + Navn + + + Serial + Seriel + + + Compatibility + Compatibility + + + Region + Region + + + Firmware + Firmware + + + Size + Størrelse + + + Version + Version + + + Path + Sti + + + Play Time + Spilletid + + + Never Played + Never Played + + + h + h + + + m + m + + + s + s + + + Compatibility is untested + Compatibility is untested + + + Game does not initialize properly / crashes the emulator + Game does not initialize properly / crashes the emulator + + + Game boots, but only displays a blank screen + Game boots, but only displays a blank screen + + + Game displays an image but does not go past the menu + Game displays an image but does not go past the menu + + + Game has game-breaking glitches or unplayable performance + Game has game-breaking glitches or unplayable performance + + + Game can be completed with playable performance and no major glitches + Game can be completed with playable performance and no major glitches + + + Click to see details on github + Klik for at se detaljer på GitHub + + + Last updated + Sidst opdateret + + + + GameListUtils + + B + B + + + KB + KB + + + MB + MB + + + GB + GB + + + TB + TB + + + + GuiContextMenus + + Create Shortcut + Create Shortcut + + + Cheats / Patches + Trick / Patches + + + SFO Viewer + SFO Viewer + + + Trophy Viewer + Trophy Viewer + + + Open Folder... + Åbn Mappe... + + + Open Game Folder + Åbn Spilmappe + + + Open Save Data Folder + Åbn Gem Data Mappe + + + Open Log Folder + Åbn Log Mappe + + + Copy info... + Copy info... + + + Copy Name + Copy Name + + + Copy Serial + Copy Serial + + + Copy Version + Copy Version + + + Copy Size + Copy Size + + + Copy All + Copy All + + + Delete... + Delete... + + + Delete Game + Delete Game + + + Delete Update + Delete Update + + + Delete DLC + Delete DLC + + + Delete Trophy + Delete Trophy + + + Compatibility... + Compatibility... + + + Update database + Update database + + + View report + View report + + + Submit a report + Submit a report + + + Shortcut creation + Shortcut creation + + + Shortcut created successfully! + Shortcut created successfully! + + + Error + Error + + + Error creating shortcut! + Error creating shortcut! + + + Game + Game + + + This game has no update to delete! + This game has no update to delete! + + + Update + Update + + + This game has no DLC to delete! + This game has no DLC to delete! + + + DLC + DLC + + + Delete %1 + Delete %1 + + + Are you sure you want to delete %1's %2 directory? + Are you sure you want to delete %1's %2 directory? + + + Open Update Folder + Open Update Folder + + + Delete Save Data + Delete Save Data + + + This game has no update folder to open! + This game has no update folder to open! + + + No log file found for this game! + No log file found for this game! + + + Failed to convert icon. + Failed to convert icon. + + + This game has no save data to delete! + This game has no save data to delete! + + + This game has no saved trophies to delete! + This game has no saved trophies to delete! + + + Save Data + Save Data + + + Trophy + Trophy + + + SFO Viewer for + SFO Viewer for + + + + HelpDialog + + Quickstart + Quickstart + + + FAQ + FAQ + + + Syntax + Syntax + + + Special Bindings + Special Bindings + + + Keybindings + Keybindings + + + + KBMSettings + + Configure Controls + Configure Controls + + + D-Pad + D-Pad + + + Up + Up + + + unmapped + unmapped + + + Left + Left + + + Right + Right + + + Down + Down + + + Left Analog Halfmode + Left Analog Halfmode + + + hold to move left stick at half-speed + hold to move left stick at half-speed + + + Left Stick + Left Stick + + + Config Selection + Config Selection + + + Common Config + Common Config + + + Use per-game configs + Use per-game configs + + + L1 + L1 + + + L2 + L2 + + + Text Editor + Text Editor + + + Help + Help + + + R1 + R1 + + + R2 + R2 + + + L3 + L3 + + + Touchpad Click + Touchpad Click + + + Mouse to Joystick + Mouse to Joystick + + + *press F7 ingame to activate + *press F7 ingame to activate + + + R3 + R3 + + + Options + Options + + + Mouse Movement Parameters + Mouse Movement Parameters + + + note: click Help Button/Special Keybindings for more information + note: click Help Button/Special Keybindings for more information + + + Face Buttons + Face Buttons + + + Triangle + Triangle + + + Square + Square + + + Circle + Circle + + + Cross + Cross + + + Right Analog Halfmode + Right Analog Halfmode + + + hold to move right stick at half-speed + hold to move right stick at half-speed + + + Right Stick + Right Stick + + + Speed Offset (def 0.125): + Speed Offset (def 0.125): + + + Copy from Common Config + Copy from Common Config + + + Deadzone Offset (def 0.50): + Deadzone Offset (def 0.50): + + + Speed Multiplier (def 1.0): + Speed Multiplier (def 1.0): + + + Common Config Selected + Common Config Selected + + + This button copies mappings from the Common Config to the currently selected profile, and cannot be used when the currently selected profile is the Common Config. + This button copies mappings from the Common Config to the currently selected profile, and cannot be used when the currently selected profile is the Common Config. + + + Copy values from Common Config + Copy values from Common Config + + + Do you want to overwrite existing mappings with the mappings from the Common Config? + Do you want to overwrite existing mappings with the mappings from the Common Config? + + + Unable to Save + Unable to Save + + + Cannot bind any unique input more than once + Cannot bind any unique input more than once + + + Press a key + Press a key + + + Cannot set mapping + Cannot set mapping + + + Mousewheel cannot be mapped to stick outputs + Mousewheel cannot be mapped to stick outputs + + + Save + Save + + + Apply + Apply + + + Restore Defaults + Restore Defaults + + + Cancel + Cancel + + + + MainWindow + + Open/Add Elf Folder + Open/Add Elf Folder + + + Boot Game + Boot Game + + + Check for Updates + Tjek for opdateringer + + + About shadPS4 + About shadPS4 + + + Configure... + Configure... + + + Recent Games + Recent Games + + + Open shadPS4 Folder + Open shadPS4 Folder + + + 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 + + + Download Cheats/Patches + Download Tricks / Patches + + + Dump Game List + Dump Game List + + + Trophy Viewer + Trophy Viewer + + + No games found. Please add your games to your library first. + No games found. Please add your games to your library first. + + + Search... + Search... + + + File + File + + + View + View + + + Game List Icons + Game List Icons + + + Game List Mode + Game List Mode + + + Settings + Settings + + + Utils + Utils + + + Themes + Themes + + + Help + Hjælp + + + Dark + Dark + + + Light + Light + + + Green + Green + + + Blue + Blue + + + Violet + Violet + + + toolBar + toolBar + + + Game List + Spiloversigt + + + * 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: + + + 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! + + + Run Game + Run Game + + + Eboot.bin file not found + Eboot.bin file not found + + + Game is already running! + Game is already running! + + + shadPS4 + shadPS4 + + + Play + Play + + + Pause + Pause + + + Stop + Stop + + + Restart + Restart + + + Full Screen + Full Screen + + + Controllers + Controllers + + + Keyboard + Keyboard + + + Refresh List + Refresh List + + + Resume + Resume + + + Show Labels Under Icons + Show Labels Under Icons + + + + SettingsDialog + + Settings + Settings + + + General + General + + + System + System + + + Console Language + Console Language + + + Emulator Language + Emulator Language + + + Emulator + Emulator + + + Enable Separate Update Folder + Enable Separate Update Folder + + + Default tab when opening settings + Standardfaneblad ved åbning af indstillinger + + + Show Game Size In List + Vis vis spilstørrelse i listen + + + Show Splash + Show Splash + + + Enable Discord Rich Presence + Aktiver Discord Rich Presence + + + Username + Username + + + Trophy Key + Trophy Key + + + Trophy + Trophy + + + Open the custom trophy images/sounds folder + Open the custom trophy images/sounds folder + + + Logger + Logger + + + Log Type + Log Type + + + Log Filter + Log Filter + + + Open Log Location + Åbn logplacering + + + Input + Indtastning + + + Cursor + Markør + + + Hide Cursor + Skjul markør + + + Hide Cursor Idle Timeout + Timeout for skjul markør ved inaktivitet + + + s + s + + + Controller + Controller + + + Back Button Behavior + Tilbageknap adfærd + + + Graphics + Graphics + + + GUI + Interface + + + User + Bruger + + + Graphics Device + Graphics Device + + + Vblank Divider + Vblank Divider + + + Advanced + Advanced + + + Enable Shaders Dumping + Enable Shaders Dumping + + + Enable NULL GPU + Enable NULL GPU + + + Enable HDR + Enable HDR + + + Paths + Stier + + + Game Folders + Spilmapper + + + Add... + Tilføj... + + + Remove + Fjern + + + 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 + + + Enable Crash Diagnostics + Enable Crash Diagnostics + + + Collect Shaders + Collect Shaders + + + Copy GPU Buffers + Copy GPU Buffers + + + Host Debug Markers + Host Debug Markers + + + Guest Debug Markers + Guest Debug Markers + + + Update + Opdatering + + + Check for Updates at Startup + Tjek for opdateringer ved start + + + Always Show Changelog + Vis altid changelog + + + Update Channel + Opdateringskanal + + + Check for Updates + Tjek for opdateringer + + + GUI Settings + GUI-Indstillinger + + + Title Music + Title Music + + + Disable Trophy Notification + Disable Trophy Notification + + + Background Image + Background Image + + + Show Background Image + Show Background Image + + + Opacity + Opacity + + + Play title music + Afspil titelsang + + + Update Compatibility Database On Startup + Update Compatibility Database On Startup + + + Game Compatibility + Game Compatibility + + + Display Compatibility Data + Display Compatibility Data + + + Update Compatibility Database + Update Compatibility Database + + + Volume + Lydstyrke + + + Save + Gem + + + Apply + Anvend + + + Restore Defaults + Gendan standardindstillinger + + + Close + Luk + + + Point your mouse at an option to display its description. + Peg musen over et valg for at vise dets beskrivelse. + + + Console Language:\nSets the language that the PS4 game uses.\nIt's recommended to set this to a language the game supports, which will vary by region. + Konsolsprog:\nIndstiller sproget, som PS4-spillet bruger.\nDet anbefales at indstille dette til et sprog, som spillet understøtter, hvilket kan variere efter region. + + + Emulator Language:\nSets the language of the emulator's user interface. + Emulatorsprog:\nIndstiller sproget i emulatorens brugergrænseflade. + + + Enable Separate Update Folder:\nEnables installing game updates into a separate folder for easy management.\nThis can be manually created by adding the extracted update to the game folder with the name "CUSA00000-UPDATE" where the CUSA ID matches the game's ID. + Enable Separate Update Folder:\nEnables installing game updates into a separate folder for easy management. + + + Show Splash Screen:\nShows the game's splash screen (a special image) while the game is starting. + Vis startskærm:\nViser en startskærm (speciel grafik) under opstarten. + + + Enable Discord Rich Presence:\nDisplays the emulator icon and relevant information on your Discord profile. + Aktiver Discord Rich Presence:\nViser emulatorikonet og relevante oplysninger på din Discord-profil. + + + Username:\nSets the PS4's account username, which may be displayed by some games. + Brugernavn:\nIndstiller PS4-kontoens navn, som kan blive vist i nogle spil. + + + Trophy Key:\nKey used to decrypt trophies. Must be obtained from your jailbroken console.\nMust contain only hex characters. + Trophy Key:\nKey used to decrypt trophies. Must be obtained from your jailbroken console.\nMust contain only hex characters. + + + Log Type:\nSets whether to synchronize the output of the log window for performance. May have adverse effects on emulation. + Logtype:\nIndstiller, om logvinduets output vil blive synkroniseret for at øge ydeevnen. Dette kan påvirke emulatorens ydeevne negativt. + + + Log Filter:\nFilters the log to only print specific information.\nExamples: "Core:Trace" "Lib.Pad:Debug Common.Filesystem:Error" "*:Critical"\nLevels: Trace, Debug, Info, Warning, Error, Critical - in this order, a specific level silences all levels preceding it in the list and logs every level after it. + Logfilter:\nFiltrerer loggen for kun at udskrive bestemte oplysninger.\nEksempler: "Core:Trace" "Lib.Pad:Debug Common.Filesystem:Error" "*:Critical" Niveaus: Trace, Debug, Info, Warning, Error, Critical - i rækkefølge, et valgt niveau skjuler alle forudgående niveauer og viser alle efterfølgende niveauer. + + + Update:\nRelease: Official versions released every month that may be very outdated, but are more reliable and tested.\nNightly: Development versions that have all the latest features and fixes, but may contain bugs and are less stable. + Opdatering:\nRelease: Officielle builds, der frigives månedligt, som kan være meget ældre, men mere stabile og testet.\nNightly: Udviklerbuilds med de nyeste funktioner og rettelser, men som kan indeholde fejl og være mindre stabile. + + + Background Image:\nControl the opacity of the game background image. + Background Image:\nControl the opacity of the game background image. + + + Play Title Music:\nIf a game supports it, enable playing special music when selecting the game in the GUI. + Titelsmusikafspilning:\nHvis spillet understøtter det, aktiver speciel musik, når spillet vælges i brugergrænsefladen. + + + Disable Trophy Pop-ups:\nDisable in-game trophy notifications. Trophy progress can still be tracked using the Trophy Viewer (right-click the game in the main window). + Disable Trophy Pop-ups:\nDisable in-game trophy notifications. Trophy progress can still be tracked using the Trophy Viewer (right-click the game in the main window). + + + Hide Cursor:\nChoose when the cursor will disappear:\nNever: You will always see the mouse.\nidle: Set a time for it to disappear after being idle.\nAlways: you will never see the mouse. + Skjul Cursor:\nVælg hvornår cursoren skal forsvinde:\nAldrig: Du vil altid se musen.\nInaktiv: Indstil en tid for, hvornår den skal forsvinde efter at være inaktiv.\nAltid: du vil aldrig se musen. + + + Hide Idle Cursor Timeout:\nThe duration (seconds) after which the cursor that has been idle hides itself. + Indstil en tid for, at musen skal forsvinde efter at være inaktiv. + + + Back Button Behavior:\nSets the controller's back button to emulate tapping the specified position on the PS4 touchpad. + Tilbageknap Adfærd:\nIndstiller controllerens tilbageknap til at efterligne tryk på den angivne position på PS4 berøringsflade. + + + Display Compatibility Data:\nDisplays game compatibility information in table view. Enable "Update Compatibility On Startup" to get up-to-date information. + Display Compatibility Data:\nDisplays game compatibility information in table view. Enable "Update Compatibility On Startup" to get up-to-date information. + + + Update Compatibility On Startup:\nAutomatically update the compatibility database when shadPS4 starts. + Update Compatibility On Startup:\nAutomatically update the compatibility database when shadPS4 starts. + + + Update Compatibility Database:\nImmediately update the compatibility database. + Update Compatibility Database:\nImmediately update the compatibility database. + + + Never + Aldrig + + + Idle + Inaktiv + + + Always + Altid + + + Touchpad Left + Berøringsplade Venstre + + + Touchpad Right + Berøringsplade Højre + + + Touchpad Center + Berøringsplade Center + + + None + Ingen + + + Graphics Device:\nOn multiple GPU systems, select the GPU the emulator will use from the drop down list,\nor select "Auto Select" to automatically determine it. + Grafikadapter:\nPå systemer med flere GPU'er skal du vælge den GPU, emulatoren vil bruge fra en rullemenu,\neller vælge "Auto Select" for at vælge den automatisk. + + + Width/Height:\nSets the size of the emulator window at launch, which can be resized during gameplay.\nThis is different from the in-game resolution. + Skærmopløsning:\nIndstiller emulatorvinduets størrelse under afspilning, som kan ændres under afspilning.\nDette er forskelligt fra selve spillets opløsning. + + + Vblank Divider:\nThe frame rate at which the emulator refreshes at is multiplied by this number. Changing this may have adverse effects, such as increasing the game speed, or breaking critical game functionality that does not expect this to change! + Opdateringshastighedsdeler:\nMultiplicerer den frekvens, som emulatoren opdaterer billedet med, med dette tal. Ændring af dette kan have negative effekter, såsom hurtigere spil eller ødelagte funktioner! + + + Enable Shaders Dumping:\nFor the sake of technical debugging, saves the games shaders to a folder as they render. + Aktiver dumping af Shaders:\nTil teknisk fejlfinding gemmer det spillets shaders i en mappe under afspilning. + + + Enable Null GPU:\nFor the sake of technical debugging, disables game rendering as if there were no graphics card. + Aktiver virtuel GPU:\nTil teknisk fejlfinding deaktiverer det spilvisning, som om der ikke var et grafikkort. + + + Enable HDR:\nEnables HDR in games that support it.\nYour monitor must have support for the BT2020 PQ color space and the RGB10A2 swapchain format. + Enable HDR:\nEnables HDR in games that support it.\nYour monitor must have support for the BT2020 PQ color space and the RGB10A2 swapchain format. + + + Game Folders:\nThe list of folders to check for installed games. + Spilmappen:\nListen over mapper til at tjekke for installerede spil. + + + Add:\nAdd a folder to the list. + Tilføj:\nTilføj en mappe til listen. + + + Remove:\nRemove a folder from the list. + Fjern:\nFjern en mappe fra listen. + + + Enable Debug Dumping:\nSaves the import and export symbols and file header information of the currently running PS4 program to a directory. + Aktiver debugging-dump:\nGemmer import/export-symboler og headeroplysninger for det aktuelle PS4-program til en mappe. + + + Enable Vulkan Validation Layers:\nEnables a system that validates the state of the Vulkan renderer and logs information about its internal state.\nThis will reduce performance and likely change the behavior of emulation. + Aktiver Vulkan-valideringslag:\nAktiverer et system, der validerer Vulkan-driverens tilstand og logger oplysninger om dens interne tilstand. Dette vil reducere ydeevnen og kan muligvis ændre emulatorens adfærd. + + + Enable Vulkan Synchronization Validation:\nEnables a system that validates the timing of Vulkan rendering tasks.\nThis will reduce performance and likely change the behavior of emulation. + Aktiver Vulkan-synkroniseringsvalidering:\nAktiverer et system, der validerer tidspunktet for Vulkan's renderingsopgaver. Dette vil reducere ydeevnen og kan muligvis ændre emulatorens adfærd. + + + Enable RenderDoc Debugging:\nIf enabled, the emulator will provide compatibility with Renderdoc to allow capture and analysis of the currently rendered frame. + Aktiver RenderDoc-fejlfinding:\nHvis aktiveret, giver det emulatoren mulighed for kompatibilitet med Renderdoc til at fange og analysere det aktuelle gengivne billede. + + + Collect Shaders:\nYou need this enabled to edit shaders with the debug menu (Ctrl + F10). + Collect Shaders:\nYou need this enabled to edit shaders with the debug menu (Ctrl + F10). + + + Crash Diagnostics:\nCreates a .yaml file with info about the Vulkan state at the time of crashing.\nUseful for debugging 'Device lost' errors. If you have this enabled, you should enable Host AND Guest Debug Markers.\nDoes not work on Intel GPUs.\nYou need Vulkan Validation Layers enabled and the Vulkan SDK for this to work. + Crash Diagnostics:\nCreates a .yaml file with info about the Vulkan state at the time of crashing.\nUseful for debugging 'Device lost' errors. If you have this enabled, you should enable Host AND Guest Debug Markers.\nDoes not work on Intel GPUs.\nYou need Vulkan Validation Layers enabled and the Vulkan SDK for this to work. + + + Copy GPU Buffers:\nGets around race conditions involving GPU submits.\nMay or may not help with PM4 type 0 crashes. + Copy GPU Buffers:\nGets around race conditions involving GPU submits.\nMay or may not help with PM4 type 0 crashes. + + + Host Debug Markers:\nInserts emulator-side information like markers for specific AMDGPU commands around Vulkan commands, as well as giving resources debug names.\nIf you have this enabled, you should enable Crash Diagnostics.\nUseful for programs like RenderDoc. + Host Debug Markers:\nInserts emulator-side information like markers for specific AMDGPU commands around Vulkan commands, as well as giving resources debug names.\nIf you have this enabled, you should enable Crash Diagnostics.\nUseful for programs like RenderDoc. + + + Guest Debug Markers:\nInserts any debug markers the game itself has added to the command buffer.\nIf you have this enabled, you should enable Crash Diagnostics.\nUseful for programs like RenderDoc. + Guest Debug Markers:\nInserts any debug markers the game itself has added to the command buffer.\nIf you have this enabled, you should enable Crash Diagnostics.\nUseful for programs like RenderDoc. + + + Save Data Path:\nThe folder where game save data will be saved. + Save Data Path:\nThe folder where game save data will be saved. + + + Browse:\nBrowse for a folder to set as the save data path. + Browse:\nBrowse for a folder to set as the save data path. + + + Release + Release + + + Nightly + Nightly + + + Set the volume of the background music. + Set the volume of the background music. + + + Enable Motion Controls + Enable Motion Controls + + + Save Data Path + Save Data Path + + + Browse + Browse + + + async + async + + + sync + sync + + + Auto Select + Auto Select + + + Directory to install games + Directory to install games + + + Directory to save data + Directory to save data + + + Video + Video + + + Display Mode + Display Mode + + + Windowed + Windowed + + + Fullscreen + Fullscreen + + + Fullscreen (Borderless) + Fullscreen (Borderless) + + + Window Size + Window Size + + + W: + W: + + + H: + H: + + + Separate Log Files + Separate Log Files + + + Separate Log Files:\nWrites a separate logfile for each game. + Separate Log Files:\nWrites a separate logfile for each game. + + + Trophy Notification Position + Trophy Notification Position + + + Left + Left + + + Right + Right + + + Top + Top + + + Bottom + Bottom + + + Notification Duration + Notification Duration + + + Portable User Folder + Portable User Folder + + + Create Portable User Folder from Common User Folder + Create Portable User Folder from Common User Folder + + + Portable user folder:\nStores shadPS4 settings and data that will be applied only to the shadPS4 build located in the current folder. Restart the app after creating the portable user folder to begin using it. + Portable user folder:\nStores shadPS4 settings and data that will be applied only to the shadPS4 build located in the current folder. Restart the app after creating the portable user folder to begin using it. + + + Cannot create portable user folder + Cannot create portable user folder + + + %1 already exists + %1 already exists + + + Portable user folder created + Portable user folder created + + + %1 successfully created. + %1 successfully created. + + + Open the custom trophy images/sounds folder:\nYou can add custom images to the trophies and an audio.\nAdd the files to custom_trophy with the following names:\ntrophy.wav OR trophy.mp3, bronze.png, gold.png, platinum.png, silver.png\nNote: The sound will only work in QT versions. + Open the custom trophy images/sounds folder:\nYou can add custom images to the trophies and an audio.\nAdd the files to custom_trophy with the following names:\ntrophy.wav OR trophy.mp3, bronze.png, gold.png, platinum.png, silver.png\nNote: The sound will only work in QT versions. + + + + TrophyViewer + + Trophy Viewer + Trophy Viewer + + + Select Game: + Select Game: + + + Progress + Progress + + + Show Earned Trophies + Show Earned Trophies + + + Show Not Earned Trophies + Show Not Earned Trophies + + + Show Hidden Trophies + Show Hidden Trophies + + + diff --git a/src/qt_gui/translations/de.ts b/src/qt_gui/translations/de.ts deleted file mode 100644 index 62897fe24..000000000 --- a/src/qt_gui/translations/de.ts +++ /dev/null @@ -1,1664 +0,0 @@ - - - - - - AboutDialog - - - About shadPS4 - Über shadPS4 - - - - shadPS4 - shadPS4 - - - - shadPS4 is an experimental open-source emulator for the PlayStation 4. - shadPS4 ist ein experimenteller Open-Source-Emulator für die Playstation 4. - - - - This software should not be used to play games you have not legally obtained. - Diese Software soll nicht dazu benutzt werden illegal kopierte Spiele zu spielen. - - - - ElfViewer - - - Open Folder - Ordner öffnen - - - - GameInfoClass - - - Loading game list, please wait :3 - Lade Spielliste, bitte warten :3 - - - - Cancel - Abbrechen - - - - Loading... - Lade... - - - - InstallDirSelect - - - shadPS4 - Choose directory - shadPS4 - Wähle Ordner - - - - Select which directory you want to install to. - Select which directory you want to install to. - - - - GameInstallDialog - - - shadPS4 - Choose directory - shadPS4 - Wähle Ordner - - - - Directory to install games - Installationsverzeichnis für Spiele - - - - Browse - Durchsuchen - - - - Error - Fehler - - - - The value for location to install games is not valid. - Der ausgewählte Ordner ist nicht gültig. - - - - GuiContextMenus - - - Create Shortcut - Verknüpfung erstellen - - - - Cheats / Patches - Cheats / Patches - - - - SFO Viewer - SFO anzeigen - - - - Trophy Viewer - Trophäen anzeigen - - - - Open Folder... - Ordner öffnen... - - - - Open Game Folder - Spielordner öffnen - - - - Open Save Data Folder - Speicherordner öffnen - - - - Open Log Folder - Protokollordner öffnen - - - - Copy info... - Infos kopieren... - - - - Copy Name - Namen kopieren - - - - Copy Serial - Seriennummer kopieren - - - - Copy All - Alles kopieren - - - - Delete... - Delete... - - - - Delete Game - Delete Game - - - - Delete Update - Delete Update - - - - Delete DLC - Delete DLC - - - - Compatibility... - Compatibility... - - - - Update database - Update database - - - - View report - View report - - - - Submit a report - Submit a report - - - - Shortcut creation - Verknüpfungserstellung - - - - Shortcut created successfully! - Verknüpfung erfolgreich erstellt! - - - - Error - Fehler - - - - Error creating shortcut! - Fehler beim Erstellen der Verknüpfung! - - - - Install PKG - PKG installieren - - - - Game - Game - - - - requiresEnableSeparateUpdateFolder_MSG - This feature requires the 'Enable Separate Update Folder' config option to work. If you want to use this feature, please enable it. - - - - This game has no update to delete! - This game has no update to delete! - - - - Update - Update - - - - This game has no DLC to delete! - This game has no DLC to delete! - - - - DLC - DLC - - - - Delete %1 - Delete %1 - - - - Are you sure you want to delete %1's %2 directory? - Are you sure you want to delete %1's %2 directory? - - - - MainWindow - - - Open/Add Elf Folder - Elf-Ordner öffnen/hinzufügen - - - - Install Packages (PKG) - Pakete installieren (PKG) - - - - Boot Game - Spiel starten - - - - Check for Updates - Nach Updates suchen - - - - About shadPS4 - Über shadPS4 - - - - Configure... - Konfigurieren... - - - - Install application from a .pkg file - Installiere Anwendung aus .pkg-Datei - - - - Recent Games - Zuletzt gespielt - - - - Exit - Beenden - - - - Exit shadPS4 - shadPS4 beenden - - - - Exit the application. - Die Anwendung beenden. - - - - Show Game List - Spielliste anzeigen - - - - Game List Refresh - Spielliste aktualisieren - - - - Tiny - Winzig - - - - Small - Klein - - - - Medium - Mittel - - - - Large - Groß - - - - List View - Listenansicht - - - - Grid View - Gitteransicht - - - - Elf Viewer - Elf-Ansicht - - - - Game Install Directory - Installationsverzeichnis für Spiele - - - - Download Cheats/Patches - Cheats / Patches herunterladen - - - - Dump Game List - Spielliste ausgeben - - - - PKG Viewer - PKG-Ansicht - - - - Search... - Suchen... - - - - File - Datei - - - - View - Ansicht - - - - Game List Icons - Game List Icons - - - - Game List Mode - Spiellisten-Symoble - - - - Settings - Einstellungen - - - - Utils - Werkzeuge - - - - Themes - Stile - - - - Help - Hilfe - - - - Dark - Dunkel - - - - Light - Hell - - - - Green - Grün - - - - Blue - Blau - - - - Violet - Violett - - - - toolBar - toolBar - - - - PKGViewer - - - Open Folder - Ordner öffnen - - - - TrophyViewer - - - Trophy Viewer - Trophäenansicht - - - - SettingsDialog - - - Settings - Einstellungen - - - - General - Allgemein - - - - System - System - - - - Console Language - Konsolensprache - - - - Emulator Language - Emulatorsprache - - - - Emulator - Emulator - - - - Enable Fullscreen - Vollbild aktivieren - - - - Enable Separate Update Folder - Enable Separate Update Folder - - - - Show Splash - Startbildschirm anzeigen - - - - Is PS4 Pro - Ist PS4 Pro - - - - Enable Discord Rich Presence - Discord Rich Presence aktivieren - - - - Username - Benutzername - - - - Trophy Key - Trophy Key - - - - Trophy - Trophy - - - - Logger - Logger - - - - Log Type - Logtyp - - - - Log Filter - Log-Filter - - - - Input - Eingabe - - - - Cursor - Cursor - - - - Hide Cursor - Cursor ausblenden - - - - Hide Cursor Idle Timeout - Inaktivitätszeitüberschreitung zum Ausblenden des Cursors - - - - s - s - - - - Controller - Controller - - - - Back Button Behavior - Verhalten der Zurück-Taste - - - - Graphics - Grafik - - - - Graphics Device - Grafikgerät - - - - Width - Breite - - - - Height - Höhe - - - - Vblank Divider - Vblank-Teiler - - - - Advanced - Erweitert - - - - Enable Shaders Dumping - Shader-Dumping aktivieren - - - - Enable NULL GPU - NULL GPU aktivieren - - - - Paths - Pfad - - - - Game Folders - Spieleordner - - - - Add... - Hinzufügen... - - - - Remove - Entfernen - - - - Debug - Debug - - - - Enable Debug Dumping - Debug-Dumping aktivieren - - - - Enable Vulkan Validation Layers - Vulkan Validations-Ebenen aktivieren - - - - Enable Vulkan Synchronization Validation - Vulkan Synchronisations-Validierung aktivieren - - - - Enable RenderDoc Debugging - RenderDoc-Debugging aktivieren - - - - Update - Aktualisieren - - - - Check for Updates at Startup - Beim Start nach Updates suchen - - - - Update Channel - Update-Kanal - - - - Check for Updates - Nach Updates suchen - - - - GUI Settings - GUI-Einstellungen - - - - Disable Trophy Pop-ups - Disable Trophy Pop-ups - - - - Play title music - Titelmusik abspielen - - - - Update Compatibility Database On Startup - Update Compatibility Database On Startup - - - - Game Compatibility - Game Compatibility - - - - Display Compatibility Data - Display Compatibility Data - - - - Update Compatibility Database - Update Compatibility Database - - - - Volume - Lautstärke - - - - Audio Backend - Audio Backend - - - - MainWindow - - - Game List - Spieleliste - - - - * 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! - Patch erkannt! - - - - PKG and Game versions match: - PKG- und Spielversionen stimmen überein: - - - - Would you like to overwrite? - Willst du überschreiben? - - - - PKG Version %1 is older than installed version: - PKG-Version %1 ist älter als die installierte Version: - - - - Game is installed: - Spiel ist installiert: - - - - Would you like to install Patch: - Willst du den Patch installieren: - - - - DLC Installation - DLC-Installation - - - - Would you like to install DLC: %1? - Willst du den DLC installieren: %1? - - - - DLC already installed: - DLC bereits installiert: - - - - Game already installed - Spiel bereits installiert - - - - PKG is a patch, please install the game first! - PKG ist ein Patch, bitte installieren Sie zuerst das Spiel! - - - - PKG ERROR - PKG-FEHLER - - - - 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 for - Cheats / Patches for - - - - defaultTextEdit_MSG - Cheats/Patches sind experimentell.\nVerwende sie mit Vorsicht.\n\nLade Cheats einzeln herunter, indem du das Repository auswählst und auf die Download-Schaltfläche klickst.\nAuf der Registerkarte Patches kannst du alle Patches auf einmal herunterladen, auswählen, welche du verwenden möchtest, und die Auswahl speichern.\n\nDa wir die Cheats/Patches nicht entwickeln,\nbitte melde Probleme an den Cheat-Autor.\n\nHast du einen neuen Cheat erstellt? Besuche:\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. - Du kannst die Cheats, die du nicht möchtest, nach dem Herunterladen löschen. - - - - Do you want to delete the selected file?\n%1 - Willst du 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öchtest du 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. Versuche es mit einem anderen Repository oder einer anderen Version des Spiels. - - - - Cheats Downloaded Successfully - Cheats erfolgreich heruntergeladen - - - - CheatsDownloadedSuccessfully_MSG - Du hast erfolgreich Cheats für diese Version des Spiels aus dem gewählten Repository heruntergeladen. Du kannst auch versuchen, Cheats von einem anderen Repository herunterzuladen. Wenn verfügbar, kannst du sie auswählen, indem du die Datei aus der Liste auswählst. - - - - 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. Wenn der Patch nicht angezeigt wird, könnte es sein, dass er für die spezifische Seriennummer und Version des Spiels nicht existiert. - - - - 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. - - - - The game is in version: %1 - Das Spiel ist in der Version: %1 - - - - The downloaded patch only works on version: %1 - Der heruntergeladene Patch funktioniert nur in der Version: %1 - - - - You may need to update your game. - Sie müssen möglicherweise Ihr Spiel aktualisieren. - - - - Incompatibility Notice - Inkompatibilitätsbenachrichtigung - - - - 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: - - - - Can't apply cheats before the game is started - Kann keine Cheats anwenden, bevor das Spiel gestartet ist. - - - - SettingsDialog - - - Save - Speichern - - - - Apply - Übernehmen - - - - Restore Defaults - Werkseinstellungen wiederherstellen - - - - Close - Schließen - - - - Point your mouse at an option to display its description. - Bewege die Maus über eine Option, um deren Beschreibung anzuzeigen. - - - - consoleLanguageGroupBox - Konsolensprache:\nLegt die Sprache fest, die das PS4-Spiel verwendet.\nEs wird empfohlen, diese auf eine vom Spiel unterstützte Sprache einzustellen, die je nach Region unterschiedlich sein kann. - - - - emulatorLanguageGroupBox - Emulatorsprache:\nLegt die Sprache der Emulator-Benutzeroberfläche fest. - - - - fullscreenCheckBox - Vollbildmodus aktivieren:\nSchaltet das Spielfenster automatisch in den Vollbildmodus.\nKann durch Drücken der F11-Taste umgeschaltet werden. - - - - separateUpdatesCheckBox - Enable Separate Update Folder:\nEnables installing game updates into a separate folder for easy management. - - - - showSplashCheckBox - Startbildschirm anzeigen:\nZeigt beim Start einen speziellen Bildschirm (Splash) des Spiels an. - - - - ps4proCheckBox - Ist es eine PS4 Pro:\nErmöglicht es dem Emulator, als PS4 PRO zu arbeiten, was in Spielen, die dies unterstützen, spezielle Funktionen aktivieren kann. - - - - discordRPCCheckbox - Discord Rich Presence aktivieren:\nZeigt das Emulator-Icon und relevante Informationen in deinem Discord-Profil an. - - - - userName - Benutzername:\nLegt den Namen des PS4-Kontos fest, der in einigen Spielen angezeigt werden kann. - - - - TrophyKey - Trophy Key:\nKey used to decrypt trophies. Must be obtained from your jailbroken console.\nMust contain only hex characters. - - - - logTypeGroupBox - Protokolltyp:\nLegt fest, ob die Ausgabe des Protokollfensters synchronisiert wird, um die Leistung zu verbessern. Dies kann sich negativ auf die Emulation auswirken. - - - - logFilter - Protokollfilter:\nFiltert das Protokoll so, dass nur bestimmte Informationen ausgegeben werden.\nBeispiele: "Core:Trace" "Lib.Pad:Debug Common.Filesystem:Error" "*:Critical" Ebenen: Trace, Debug, Info, Warning, Error, Critical - in dieser Reihenfolge, ein ausgewähltes Level blendet alle vorherigen Ebenen aus und zeigt alle nachfolgenden an. - - - - updaterGroupBox - Update:\nRelease: Offizielle Builds, die monatlich veröffentlicht werden, können viel älter sein, aber stabiler und getestet.\nNightly: Entwickler-Builds, die die neuesten Funktionen und Fehlerbehebungen enthalten, aber Fehler enthalten und weniger stabil sein können. - - - - GUIgroupBox - Wiedergabe der Titelmusik:\nWenn das Spiel dies unterstützt, wird beim Auswählen des Spiels in der Benutzeroberfläche spezielle Musik abgespielt. - - - - disableTrophycheckBox - Disable Trophy Pop-ups:\nDisable in-game trophy notifications. Trophy progress can still be tracked using the Trophy Viewer (right-click the game in the main window). - - - - hideCursorGroupBox - Maus ausblenden:\nWählen Sie, wann der Cursor verschwinden soll:\nNie: Sie sehen die Maus immer.\nInaktiv: Legen Sie eine Zeit fest, nach der sie nach Inaktivität verschwindet.\nImmer: Sie sehen die Maus niemals. - - - - idleTimeoutGroupBox - Stellen Sie eine Zeit ein, nach der die Maus nach Inaktivität verschwinden soll. - - - - backButtonBehaviorGroupBox - Zurück-Button Verhalten:\nStellt die Zurück-Taste des Controllers so ein, dass sie das Antippen der angegebenen Position auf dem PS4-Touchpad emuliert. - - - - enableCompatibilityCheckBox - Display Compatibility Data:\nDisplays game compatibility information in table view. Enable "Update Compatibility On Startup" to get up-to-date information. - - - - checkCompatibilityOnStartupCheckBox - Update Compatibility On Startup:\nAutomatically update the compatibility database when shadPS4 starts. - - - - updateCompatibilityButton - Update Compatibility Database:\nImmediately update the compatibility database. - - - - Never - Niemals - - - - Idle - Im Leerlauf - - - - Always - Immer - - - - Touchpad Left - Touchpad Links - - - - Touchpad Right - Touchpad Rechts - - - - Touchpad Center - Touchpad Mitte - - - - None - Keine - - - - graphicsAdapterGroupBox - Grafikkarte:\nAuf Systemen mit mehreren GPUs wählen Sie aus einem Dropdown-Menü die GPU aus, die der Emulator verwenden wird,\noder wählen Sie "Auto Select", um sie automatisch auszuwählen. - - - - resolutionLayout - Auflösung:\nLegt die Größe des Emulator-Fensters während der Wiedergabe fest, die während der Wiedergabe geändert werden kann.\nDies unterscheidet sich von der tatsächlichen Spielauflösung. - - - - heightDivider - Framerate-Teiler:\nMultipliziert die Bildrate, mit der der Emulator aktualisiert wird, mit diesem Wert. Dies kann sich negativ auswirken, wie z.B. beschleunigtes Gameplay oder Funktionsstörungen! - - - - dumpShadersCheckBox - Shader-Dumping aktivieren:\nZum technischen Debuggen speichert es die Shaders des Spiels in einem Ordner während der Wiedergabe. - - - - nullGpuCheckBox - Virtuelle GPU aktivieren:\nFür das technische Debugging deaktiviert es die Spielanzeige, als ob keine Grafikkarte vorhanden wäre. - - - - gameFoldersBox - Spieleordner:\nDie Liste der Ordner, in denen nach installierten Spielen gesucht wird. - - - - addFolderButton - Hinzufügen:\nFügen Sie einen Ordner zur Liste hinzu. - - - - removeFolderButton - Entfernen:\nEntfernen Sie einen Ordner aus der Liste. - - - - debugDump - Debug-Dump aktivieren:\nSpeichert Import-/Exportsymbole und Headerinformationen des aktuellen PS4-Programms in einem Verzeichnis. - - - - vkValidationCheckBox - Vulkan-Validierungsebenen aktivieren:\nAktiviert ein System, das den Zustand des Vulkan-Treibers validiert und Informationen über dessen internen Zustand protokolliert. Dies verringert die Leistung und kann möglicherweise das Verhalten der Emulation ändern. - - - - vkSyncValidationCheckBox - Vulkan-Synchronisationsvalidierung aktivieren:\nAktiviert ein System, das die Zeitplanung der Rendering-Aufgaben von Vulkan validiert. Dies wird die Leistung verringern und kann möglicherweise das Verhalten der Emulation ändern. - - - - rdocCheckBox - RenderDoc-Debugging aktivieren:\nWenn aktiviert, bietet der Emulator Kompatibilität mit Renderdoc zur Erfassung und Analyse des aktuell gerenderten Frames. - - - - GameListFrame - - - Icon - Symbol - - - - Name - Name - - - - Serial - Seriennummer - - - - Compatibility - Compatibility - - - - Region - Region - - - - Firmware - Firmware - - - - Size - Größe - - - - Version - Version - - - - Path - Pfad - - - - Play Time - Spielzeit - - - - Never Played - Never Played - - - - h - h - - - - m - m - - - - s - s - - - - Compatibility is untested - Compatibility is untested - - - - Game does not initialize properly / crashes the emulator - Game does not initialize properly / crashes the emulator - - - - Game boots, but only displays a blank screen - Game boots, but only displays a blank screen - - - - Game displays an image but does not go past the menu - Game displays an image but does not go past the menu - - - - Game has game-breaking glitches or unplayable performance - Game has game-breaking glitches or unplayable performance - - - - Game can be completed with playable performance and no major glitches - Game can be completed with playable performance and no major glitches - - - - CheckUpdate - - - Auto Updater - Automatischer Aktualisierer - - - - Error - Fehler - - - - Network error: - Netzwerkfehler: - - - - Failed to parse update information. - Fehler beim Parsen der Aktualisierungsinformationen. - - - - No pre-releases found. - Keine Vorabveröffentlichungen gefunden. - - - - Invalid release data. - Ungültige Versionsdaten. - - - - No download URL found for the specified asset. - Keine Download-URL für das angegebene Asset gefunden. - - - - Your version is already up to date! - Ihre Version ist bereits aktuell! - - - - Update Available - Aktualisierung verfügbar - - - - Update Channel - Update-Kanal - - - - Current Version - Aktuelle Version - - - - Latest Version - Neueste Version - - - - Do you want to update? - Möchten Sie aktualisieren? - - - - Show Changelog - Änderungsprotokoll anzeigen - - - - Check for Updates at Startup - Beim Start nach Updates suchen - - - - Update - Aktualisieren - - - - No - Nein - - - - Hide Changelog - Änderungsprotokoll ausblenden - - - - Changes - Änderungen - - - - Network error occurred while trying to access the URL - Beim Zugriff auf die URL ist ein Netzwerkfehler aufgetreten - - - - Download Complete - Download abgeschlossen - - - - The update has been downloaded, press OK to install. - Die Aktualisierung wurde heruntergeladen, drücken Sie OK, um zu installieren. - - - - Failed to save the update file at - Fehler beim Speichern der Aktualisierungsdatei in - - - - Starting Update... - Aktualisierung wird gestartet... - - - - Failed to create the update script file - Fehler beim Erstellen der Aktualisierungs-Skriptdatei - - - - GameListUtils - - - B - B - - - - KB - KB - - - - MB - MB - - - - GB - GB - - - - TB - TB - - - \ No newline at end of file diff --git a/src/qt_gui/translations/de_DE.ts b/src/qt_gui/translations/de_DE.ts new file mode 100644 index 000000000..b6cd3105f --- /dev/null +++ b/src/qt_gui/translations/de_DE.ts @@ -0,0 +1,2089 @@ + + + + + + AboutDialog + + About shadPS4 + Über shadPS4 + + + shadPS4 is an experimental open-source emulator for the PlayStation 4. + shadPS4 ist ein experimenteller Open-Source-Emulator für die Playstation 4. + + + This software should not be used to play games you have not legally obtained. + Diese Software soll nicht dazu benutzt werden illegal kopierte Spiele zu spielen. + + + + CheatsPatches + + Cheats / Patches for + Cheats / Patches für + + + 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:\n + Cheats/Patches sind experimentell.\nVerwende sie mit Vorsicht.\n\nLade Cheats einzeln herunter, indem du das Repository auswählst und auf die Download-Schaltfläche klickst.\nAuf der Registerkarte Patches kannst du alle Patches auf einmal herunterladen, auswählen, welche du verwenden möchtest, und die Auswahl speichern.\n\nDa wir die Cheats/Patches nicht entwickeln,\nbitte melde Probleme an den Cheat-Autor.\n\nHast du einen neuen Cheat erstellt? Besuche:\n + + + No Image Available + Kein Bild verfügbar + + + Serial: + Seriennummer: + + + Version: + Version: + + + Size: + Größe: + + + Select Cheat File: + Cheat-Datei auswählen: + + + Repository: + Quellen: + + + 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. + Du kannst die Cheats, die du nicht möchtest, nach dem Herunterladen löschen. + + + Do you want to delete the selected file?\n%1 + Willst du 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öchtest du 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 + + + No Cheats found for this game in this version of the selected repository,try another repository or a different version of the game. + Keine Cheats für dieses Spiel in dieser Version des gewählten Repositories gefunden. Versuche es mit einem anderen Repository oder einer anderen Version des Spiels. + + + Cheats Downloaded Successfully + Cheats erfolgreich heruntergeladen + + + 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. + Du hast erfolgreich Cheats für diese Version des Spiels aus dem gewählten Repository heruntergeladen. Du kannst auch versuchen, Cheats von einem anderen Repository herunterzuladen. Wenn verfügbar, kannst du sie auswählen, indem du die Datei aus der Liste auswählst. + + + Failed to save: + Speichern fehlgeschlagen: + + + Failed to download: + Herunterladen fehlgeschlagen: + + + Download Complete + Download abgeschlossen + + + 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. If the patch does not appear, it may be that it does not exist for the specific serial and version of the game. + 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. Wenn der Patch nicht angezeigt wird, könnte es sein, dass er für die spezifische Seriennummer und Version des Spiels nicht existiert. + + + 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. + + + The game is in version: %1 + Das Spiel ist in der Version: %1 + + + The downloaded patch only works on version: %1 + Der heruntergeladene Patch funktioniert nur in der Version: %1 + + + You may need to update your game. + Sie müssen möglicherweise Ihr Spiel aktualisieren. + + + Incompatibility Notice + Inkompatibilitätsbenachrichtigung + + + Failed to open file: + Öffnung der Datei fehlgeschlagen: + + + 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: + + + Can't apply cheats before the game is started + Kann keine Cheats anwenden, bevor das Spiel gestartet ist. + + + Close + Schließen + + + + CheckUpdate + + Auto Updater + Automatischer Aktualisierer + + + Error + Fehler + + + Network error: + Netzwerkfehler: + + + The Auto Updater allows up to 60 update checks per hour.\nYou have reached this limit. Please try again later. + Der Auto-Updater erlaubt bis zu 60 Update-Überprüfungen pro Stunde.\nDu hast dieses Limit erreicht. Bitte versuche es später erneut. + + + Failed to parse update information. + Fehler beim Parsen der Aktualisierungsinformationen. + + + No pre-releases found. + Keine Vorabveröffentlichungen gefunden. + + + Invalid release data. + Ungültige Versionsdaten. + + + No download URL found for the specified asset. + Keine Download-URL für das angegebene Asset gefunden. + + + Your version is already up to date! + Ihre Version ist bereits aktuell! + + + Update Available + Aktualisierung verfügbar + + + Update Channel + Update-Kanal + + + Current Version + Aktuelle Version + + + Latest Version + Neueste Version + + + Do you want to update? + Möchten Sie aktualisieren? + + + Show Changelog + Änderungsprotokoll anzeigen + + + Check for Updates at Startup + Beim Start nach Updates suchen + + + Update + Aktualisieren + + + No + Nein + + + Hide Changelog + Änderungsprotokoll ausblenden + + + Changes + Änderungen + + + Network error occurred while trying to access the URL + Beim Zugriff auf die URL ist ein Netzwerkfehler aufgetreten + + + Download Complete + Download abgeschlossen + + + The update has been downloaded, press OK to install. + Die Aktualisierung wurde heruntergeladen, drücken Sie OK, um zu installieren. + + + Failed to save the update file at + Fehler beim Speichern der Aktualisierungsdatei in + + + Starting Update... + Aktualisierung wird gestartet... + + + Failed to create the update script file + Fehler beim Erstellen der Aktualisierungs-Skriptdatei + + + + CompatibilityInfoClass + + Fetching compatibility data, please wait + Lade Kompatibilitätsdaten, bitte warten + + + Cancel + Abbrechen + + + Loading... + Lädt... + + + Error + Fehler + + + Unable to update compatibility data! Try again later. + Kompatibilitätsdaten konnten nicht aktualisiert werden! Versuchen Sie es später erneut. + + + Unable to open compatibility_data.json for writing. + Kann compatibility_data.json nicht zum Schreiben öffnen. + + + Unknown + Unbekannt + + + Nothing + Nichts + + + Boots + Startet + + + Menus + Menüs + + + Ingame + ImSpiel + + + Playable + Spielbar + + + + ControlSettings + + Configure Controls + Steuerung einrichten + + + D-Pad + Steuerkreuz + + + Up + Oben + + + Left + Links + + + Right + Rechts + + + Down + Runter + + + Left Stick Deadzone (def:2 max:127) + Linker Stick tote Zone (def:2 max:127) + + + Left Deadzone + Linke Deadzone + + + Left Stick + Linker Analogstick + + + Config Selection + Konfigurationsauswahl + + + Common Config + Standard Konfiguration + + + Use per-game configs + Benutze Per-Game Einstellungen + + + L1 / LB + L1 / LB + + + L2 / LT + L2 / LT + + + Back + Zurück + + + R1 / RB + R1 / RB + + + R2 / RT + R2 / RT + + + L3 + L3 + + + Options / Start + Options / Start + + + R3 + R3 + + + Face Buttons + Aktionstasten + + + Triangle / Y + Dreieck / Y + + + Square / X + Quadrat / X + + + Circle / B + Kreis / B + + + Cross / A + Kreuz / A + + + Right Stick Deadzone (def:2, max:127) + Rechter Stick tote Zone (def:2, max:127) + + + Right Deadzone + Rechte tote Zone + + + Right Stick + Rechter Analogstick + + + Color Adjustment + Farbanpassung + + + R: + R: + + + G: + G: + + + B: + B: + + + Override Lightbar Color + Farbe der Leuchtleiste überschreiben + + + Override Color + Farbe überschreiben + + + Unable to Save + Speichern nicht möglich + + + Cannot bind axis values more than once + Achsenwerte können nicht mehr als einmal gebunden werden + + + Save + Speichern + + + Apply + Übernehmen + + + Restore Defaults + Werkseinstellungen wiederherstellen + + + Cancel + Abbrechen + + + + EditorDialog + + Edit Keyboard + Mouse and Controller input bindings + Tastatur + Maus und Controller Eingabezuordnungen bearbeiten + + + Use Per-Game configs + Benutze Per-Game Einstellungen + + + Error + Fehler + + + Could not open the file for reading + Datei konnte nicht zum Lesen geöffnet werden + + + Could not open the file for writing + Datei konnte nicht zum Schreiben geöffnet werden + + + Save Changes + Änderungen Speichern + + + Do you want to save changes? + Sollen die Änderungen gespeichert werden? + + + Help + Hilfe + + + Do you want to reset your custom default config to the original default config? + Möchten Sie Ihre eigene Standardkonfiguration auf die ursprüngliche Standardkonfiguration zurücksetzen? + + + Do you want to reset this config to your custom default config? + Möchten Sie diese Konfiguration auf Ihre eigene Standardkonfiguration zurücksetzen? + + + Reset to Default + Auf Standard zurücksetzen + + + + ElfViewer + + Open Folder + Ordner öffnen + + + + GameInfoClass + + Loading game list, please wait :3 + Lade Spielliste, bitte warten :3 + + + Cancel + Abbrechen + + + Loading... + Lade... + + + + GameInstallDialog + + shadPS4 - Choose directory + shadPS4 - Wähle Ordner + + + Directory to install games + Installationsverzeichnis für Spiele + + + Browse + Durchsuchen + + + Error + Fehler + + + Directory to install DLC + Verzeichnis zum Installieren von DLC + + + + GameListFrame + + Icon + Symbol + + + Name + Name + + + Serial + Seriennummer + + + Compatibility + Kompatibilität + + + Region + Region + + + Firmware + Firmware + + + Size + Größe + + + Version + Version + + + Path + Pfad + + + Play Time + Spielzeit + + + Never Played + Niemals gespielt + + + h + h + + + m + m + + + s + s + + + Compatibility is untested + Kompatibilität wurde noch nicht getested + + + Game does not initialize properly / crashes the emulator + Das Spiel wird nicht richtig initialisiert / stürzt den Emulator ab + + + Game boots, but only displays a blank screen + Spiel startet, aber zeigt nur einen blanken Bildschirm + + + Game displays an image but does not go past the menu + Spiel zeigt ein Bild aber geht nicht über das Menü hinaus + + + Game has game-breaking glitches or unplayable performance + Spiel hat spiel-brechende Störungen oder unspielbare Leistung + + + Game can be completed with playable performance and no major glitches + Spiel kann mit spielbarer Leistung und keinen großen Störungen abgeschlossen werden + + + Click to see details on github + Klicken Sie hier, um Details auf GitHub zu sehen + + + Last updated + Zuletzt aktualisiert + + + + GameListUtils + + B + B + + + KB + KB + + + MB + MB + + + GB + GB + + + TB + TB + + + + GuiContextMenus + + Create Shortcut + Verknüpfung erstellen + + + Cheats / Patches + Cheats / Patches + + + SFO Viewer + SFO anzeigen + + + Trophy Viewer + Trophäen anzeigen + + + Open Folder... + Ordner öffnen... + + + Open Game Folder + Spielordner öffnen + + + Open Save Data Folder + Speicherordner öffnen + + + Open Log Folder + Protokollordner öffnen + + + Copy info... + Infos kopieren... + + + Copy Name + Namen kopieren + + + Copy Serial + Seriennummer kopieren + + + Copy Version + Version kopieren + + + Copy Size + Größe kopieren + + + Copy All + Alles kopieren + + + Delete... + Löschen... + + + Delete Game + Lösche Spiel + + + Delete Update + Lösche Aktualisierung + + + Delete DLC + Lösche DLC + + + Delete Trophy + Trophäe löschen + + + Compatibility... + Kompatibilität... + + + Update database + Aktualisiere Datenbank + + + View report + Bericht ansehen + + + Submit a report + Einen Bericht einreichen + + + Shortcut creation + Verknüpfungserstellung + + + Shortcut created successfully! + Verknüpfung erfolgreich erstellt! + + + Error + Fehler + + + Error creating shortcut! + Fehler beim Erstellen der Verknüpfung! + + + Game + Spiel + + + This game has no update to delete! + Dieses Spiel hat keine Aktualisierung zum löschen! + + + Update + Aktualisieren + + + This game has no DLC to delete! + Dieses Spiel hat kein DLC zum aktualisieren! + + + DLC + DLC + + + Delete %1 + Lösche %1 + + + Are you sure you want to delete %1's %2 directory? + Sind Sie sicher dass Sie %1 %2 Ordner löschen wollen? + + + Open Update Folder + Öffne Update-Ordner + + + Delete Save Data + Lösche Speicherdaten + + + This game has no update folder to open! + Dieses Spiel hat keinen Update-Ordner zum öffnen! + + + No log file found for this game! + Keine Protokolldatei für dieses Spiel gefunden! + + + Failed to convert icon. + Fehler beim Konvertieren des Symbols. + + + This game has no save data to delete! + Dieses Spiel hat keine Speicherdaten zum Löschen! + + + This game has no saved trophies to delete! + Dieses Spiel hat keine gespeicherten Trophäen zum Löschen! + + + Save Data + Gespeicherte Daten + + + Trophy + Trophäe + + + SFO Viewer for + SFO-Betrachter für + + + + HelpDialog + + Quickstart + Schnellstart + + + FAQ + Häufig gestellte Fragen + + + Syntax + Syntax + + + Special Bindings + Spezielle Zuordnungen + + + Keybindings + Tastenbelegung + + + + KBMSettings + + Configure Controls + Steuerung konfigurieren + + + D-Pad + Steuerkreuz + + + Up + Oben + + + unmapped + nicht zugeordnet + + + Left + Links + + + Right + Rechts + + + Down + Runter + + + Left Analog Halfmode + Linker Analog-Halbmodus + + + hold to move left stick at half-speed + Halten um den linken Analogstick mit Halbgeschwindigkeit zu bewegen + + + Left Stick + Linker Analogstick + + + Config Selection + Konfigurationsauswahl + + + Common Config + Allgemeine Konfiguration + + + Use per-game configs + Benutze Per-Game Einstellungen + + + L1 + L1 + + + L2 + L2 + + + Text Editor + Textbearbeiter + + + Help + Hilfe + + + R1 + R1 + + + R2 + R2 + + + L3 + L3 + + + Touchpad Click + Touchpad-Klick + + + Mouse to Joystick + Maus zu Joystick + + + *press F7 ingame to activate + *Zum Aktivieren F7 ingame drücken + + + R3 + R3 + + + Options + Options + + + Mouse Movement Parameters + Mausbewegungsparameter + + + note: click Help Button/Special Keybindings for more information + Hinweis: Klicken Sie auf Hilfe-Button/Special Tastaturbelegungen für weitere Informationen + + + Face Buttons + Aktionstasten + + + Triangle + Dreieck + + + Square + Quadrat + + + Circle + Kreis + + + Cross + Kreuz + + + Right Analog Halfmode + Rechter Analog-Halbmodus + + + hold to move right stick at half-speed + Halten um den rechten Analogstick mit Halbgeschwindigkeit zu bewegen + + + Right Stick + Rechter Analogstick + + + Speed Offset (def 0.125): + Geschwindigkeitsversatz (Def 0.125): + + + Copy from Common Config + Von allgemeiner Konfiguration kopieren + + + Deadzone Offset (def 0.50): + Tote Zone Versatz (Def 0.50): + + + Speed Multiplier (def 1.0): + Geschwindigkeit Multiplikator (def 1.0): + + + Common Config Selected + Allgemeine Konfiguration ausgewählt + + + This button copies mappings from the Common Config to the currently selected profile, and cannot be used when the currently selected profile is the Common Config. + Diese Schaltfläche kopiert Zuordnungen aus der allgemeinen Konfiguration in das aktuell ausgewählte Profil, und kann nicht verwendet werden, wenn das aktuell ausgewählte Profil die allgemeine Konfiguration ist. + + + Copy values from Common Config + Werte von allgemeiner Konfiguration kopieren + + + Do you want to overwrite existing mappings with the mappings from the Common Config? + Möchten Sie die vorhandenen Zuordnungen mit den Zuordnungen der allgemeinen Konfigurationen überschreiben? + + + Unable to Save + Speichern nicht möglich + + + Cannot bind any unique input more than once + Kann keine eindeutige Eingabe mehr als einmal zuordnen + + + Press a key + Drücken Sie eine Taste + + + Cannot set mapping + Kann Zuordnung nicht festlegen + + + Mousewheel cannot be mapped to stick outputs + Mausrad kann nicht zu Analogstick Ausgabe zugeordnet werden + + + Save + Speichern + + + Apply + Übernehmen + + + Restore Defaults + Werkseinstellungen wiederherstellen + + + Cancel + Abbrechen + + + + MainWindow + + Open/Add Elf Folder + Elf-Ordner öffnen/hinzufügen + + + Boot Game + Spiel starten + + + Check for Updates + Nach Updates suchen + + + About shadPS4 + Über shadPS4 + + + Configure... + Konfigurieren... + + + Recent Games + Zuletzt gespielt + + + Open shadPS4 Folder + Öffne shadPS4 Ordner + + + Exit + Beenden + + + Exit shadPS4 + shadPS4 beenden + + + Exit the application. + Die Anwendung beenden. + + + Show Game List + Spielliste anzeigen + + + Game List Refresh + Spielliste aktualisieren + + + Tiny + Winzig + + + Small + Klein + + + Medium + Mittel + + + Large + Groß + + + List View + Listenansicht + + + Grid View + Gitteransicht + + + Elf Viewer + Elf-Ansicht + + + Game Install Directory + Installationsverzeichnis für Spiele + + + Download Cheats/Patches + Cheats/Patches herunterladen + + + Dump Game List + Spielliste ausgeben + + + Trophy Viewer + Trophy Viewer + + + No games found. Please add your games to your library first. + No games found. Please add your games to your library first. + + + Search... + Suchen... + + + File + Datei + + + View + Ansicht + + + Game List Icons + Spiellisten-Symbole + + + Game List Mode + Spiellisten-Modus + + + Settings + Einstellungen + + + Utils + Werkzeuge + + + Themes + Stile + + + Help + Hilfe + + + Dark + Dunkel + + + Light + Hell + + + Green + Grün + + + Blue + Blau + + + Violet + Violett + + + toolBar + Werkzeugleiste + + + Game List + Spieleliste + + + * 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: + + + 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! + + + Run Game + Spiel ausführen + + + Eboot.bin file not found + Eboot.bin Datei nicht gefunden + + + Game is already running! + Spiel läuft bereits! + + + shadPS4 + shadPS4 + + + Play + Play + + + Pause + Pause + + + Stop + Stop + + + Restart + Restart + + + Full Screen + Full Screen + + + Controllers + Controllers + + + Keyboard + Keyboard + + + Refresh List + Refresh List + + + Resume + Resume + + + Show Labels Under Icons + Show Labels Under Icons + + + + SettingsDialog + + Settings + Einstellungen + + + General + Allgemein + + + System + System + + + Console Language + Konsolensprache + + + Emulator Language + Emulatorsprache + + + Emulator + Emulator + + + Enable Separate Update Folder + Separaten Update-Ordner aktivieren + + + Default tab when opening settings + Standardregisterkarte beim Öffnen der Einstellungen + + + Show Game Size In List + Zeige Spielgröße in der Liste + + + Show Splash + Startbildschirm anzeigen + + + Enable Discord Rich Presence + Discord Rich Presence aktivieren + + + Username + Benutzername + + + Trophy Key + Trophäenschlüssel + + + Trophy + Trophäe + + + Open the custom trophy images/sounds folder + Öffne den benutzerdefinierten Ordner für Trophäenbilder/Sounds + + + Logger + Protokollführer + + + Log Type + Logtyp + + + Log Filter + Log-Filter + + + Open Log Location + Protokollspeicherort öffnen + + + Input + Eingabe + + + Cursor + Mauszeiger + + + Hide Cursor + Cursor ausblenden + + + Hide Cursor Idle Timeout + Inaktivitätszeitüberschreitung zum Ausblenden des Cursors + + + s + s + + + Controller + Kontroller + + + Back Button Behavior + Verhalten der Zurück-Taste + + + Graphics + Grafik + + + GUI + Benutzeroberfläche + + + User + Benutzer + + + Graphics Device + Grafikgerät + + + Vblank Divider + Vblank-Teiler + + + Advanced + Erweitert + + + Enable Shaders Dumping + Shader-Dumping aktivieren + + + Enable NULL GPU + NULL GPU aktivieren + + + Enable HDR + HDR aktivieren + + + Paths + Pfad + + + Game Folders + Spieleordner + + + Add... + Hinzufügen... + + + Remove + Entfernen + + + Debug + Debug + + + Enable Debug Dumping + Debug-Dumping aktivieren + + + Enable Vulkan Validation Layers + Vulkan Validations-Ebenen aktivieren + + + Enable Vulkan Synchronization Validation + Vulkan Synchronisations-Validierung aktivieren + + + Enable RenderDoc Debugging + RenderDoc-Debugging aktivieren + + + Enable Crash Diagnostics + Absturz-Diagnostik aktivieren + + + Collect Shaders + Sammle Shader + + + Copy GPU Buffers + Kopiere GPU Puffer + + + Host Debug Markers + Host-Debug-Markierer + + + Guest Debug Markers + Guest-Debug-Markierer + + + Update + Aktualisieren + + + Check for Updates at Startup + Beim Start nach Updates suchen + + + Always Show Changelog + Changelog immer anzeigen + + + Update Channel + Update-Kanal + + + Check for Updates + Nach Updates suchen + + + GUI Settings + GUI-Einstellungen + + + Title Music + Titelmusik + + + Disable Trophy Notification + Trophäen-Benachrichtigung deaktivieren + + + Background Image + Hintergrundbild + + + Show Background Image + Hintergrundbild anzeigen + + + Opacity + Transparenz + + + Play title music + Titelmusik abspielen + + + Update Compatibility Database On Startup + Aktualisiere Kompatibilitätsdatenbank beim Start + + + Game Compatibility + Spielkompatibilität + + + Display Compatibility Data + Zeige Kompatibilitätsdaten + + + Update Compatibility Database + Aktualisiere Kompatibilitätsdatenbank + + + Volume + Lautstärke + + + Save + Speichern + + + Apply + Übernehmen + + + Restore Defaults + Werkseinstellungen wiederherstellen + + + Close + Schließen + + + Point your mouse at an option to display its description. + Bewege die Maus über eine Option, um deren Beschreibung anzuzeigen. + + + Console Language:\nSets the language that the PS4 game uses.\nIt's recommended to set this to a language the game supports, which will vary by region. + Konsolensprache:\nLegt die Sprache fest, die das PS4-Spiel verwendet.\nEs wird empfohlen, diese auf eine vom Spiel unterstützte Sprache einzustellen, die je nach Region unterschiedlich sein kann. + + + Emulator Language:\nSets the language of the emulator's user interface. + Emulatorsprache:\nLegt die Sprache der Emulator-Benutzeroberfläche fest. + + + Enable Separate Update Folder:\nEnables installing game updates into a separate folder for easy management.\nThis can be manually created by adding the extracted update to the game folder with the name "CUSA00000-UPDATE" where the CUSA ID matches the game's ID. + Separaten Update-Ordner aktivieren:\nErmöglicht die Installation von Spielaktualiserungen in einem separaten Ordner zur einfachen Verwaltung. + + + Show Splash Screen:\nShows the game's splash screen (a special image) while the game is starting. + Startbildschirm anzeigen:\nZeigt beim Start einen speziellen Bildschirm (Splash) des Spiels an. + + + Enable Discord Rich Presence:\nDisplays the emulator icon and relevant information on your Discord profile. + Discord Rich Presence aktivieren:\nZeigt das Emulator-Icon und relevante Informationen in deinem Discord-Profil an. + + + Username:\nSets the PS4's account username, which may be displayed by some games. + Benutzername:\nLegt den Namen des PS4-Kontos fest, der in einigen Spielen angezeigt werden kann. + + + Trophy Key:\nKey used to decrypt trophies. Must be obtained from your jailbroken console.\nMust contain only hex characters. + Trophäenschlüssel:\nSchlüssel zum Entschlüsseln von Trophäen. Muss von Ihrer gejailbreakten Konsole abgerufen werden.\nDarf nur Hex-Zeichen enthalten. + + + Log Type:\nSets whether to synchronize the output of the log window for performance. May have adverse effects on emulation. + Protokolltyp:\nLegt fest, ob die Ausgabe des Protokollfensters synchronisiert wird, um die Leistung zu verbessern. Dies kann sich negativ auf die Emulation auswirken. + + + Log Filter:\nFilters the log to only print specific information.\nExamples: "Core:Trace" "Lib.Pad:Debug Common.Filesystem:Error" "*:Critical"\nLevels: Trace, Debug, Info, Warning, Error, Critical - in this order, a specific level silences all levels preceding it in the list and logs every level after it. + Protokollfilter:\nFiltert das Protokoll so, dass nur bestimmte Informationen ausgegeben werden.\nBeispiele: "Core:Trace" "Lib.Pad:Debug Common.Filesystem:Error" "*:Critical" Ebenen: Trace, Debug, Info, Warning, Error, Critical - in dieser Reihenfolge, ein ausgewähltes Level blendet alle vorherigen Ebenen aus und zeigt alle nachfolgenden an. + + + Update:\nRelease: Official versions released every month that may be very outdated, but are more reliable and tested.\nNightly: Development versions that have all the latest features and fixes, but may contain bugs and are less stable. + Update:\nRelease: Offizielle Builds, die monatlich veröffentlicht werden, können viel älter sein, aber stabiler und getestet.\nNightly: Entwickler-Builds, die die neuesten Funktionen und Fehlerbehebungen enthalten, aber Fehler enthalten und weniger stabil sein können. + + + Background Image:\nControl the opacity of the game background image. + Hintergrundbild:\nSteuere die Deckkraft des Spiel-Hintergrundbilds. + + + Play Title Music:\nIf a game supports it, enable playing special music when selecting the game in the GUI. + Wiedergabe der Titelmusik:\nWenn das Spiel dies unterstützt, wird beim Auswählen des Spiels in der Benutzeroberfläche spezielle Musik abgespielt. + + + Disable Trophy Pop-ups:\nDisable in-game trophy notifications. Trophy progress can still be tracked using the Trophy Viewer (right-click the game in the main window). + Trophäen-Popups deaktivieren:\nDeaktivieren Sie Trophäenbenachrichtigungen im Spiel. Der Trophäenfortschritt kann weiterhin mit dem Trophäen-Viewer verfolgt werden (klicken Sie mit der rechten Maustaste auf das Spiel im Hauptfenster).. + + + Hide Cursor:\nChoose when the cursor will disappear:\nNever: You will always see the mouse.\nidle: Set a time for it to disappear after being idle.\nAlways: you will never see the mouse. + Maus ausblenden:\nWählen Sie, wann der Cursor verschwinden soll:\nNie: Sie sehen die Maus immer.\nInaktiv: Legen Sie eine Zeit fest, nach der sie nach Inaktivität verschwindet.\nImmer: Sie sehen die Maus niemals. + + + Hide Idle Cursor Timeout:\nThe duration (seconds) after which the cursor that has been idle hides itself. + Stellen Sie eine Zeit ein, nach der die Maus nach Inaktivität verschwinden soll. + + + Back Button Behavior:\nSets the controller's back button to emulate tapping the specified position on the PS4 touchpad. + Zurück-Button Verhalten:\nStellt die Zurück-Taste des Controllers so ein, dass sie das Antippen der angegebenen Position auf dem PS4-Touchpad emuliert. + + + Display Compatibility Data:\nDisplays game compatibility information in table view. Enable "Update Compatibility On Startup" to get up-to-date information. + Kompatibilitätsdaten anzeigen:\nZeigt Spielkompatibilitätsinformationen in Tabellenansicht an. Aktivieren Sie „Aktualisiere Kompatibilitätsdatenbank beim Start“, um aktuelle Informationen zu erhalten. + + + Update Compatibility On Startup:\nAutomatically update the compatibility database when shadPS4 starts. + Kompatibilität beim Start aktualisieren:\nAktualisiert die Kompatibilitätsdatenbank automatisch, wenn shadPS4 startet. + + + Update Compatibility Database:\nImmediately update the compatibility database. + Aktualisiere Kompatibilitätsdatenbank:\nAktualisiere sofort die Kompatibilitätsdatenbank. + + + Never + Niemals + + + Idle + Im Leerlauf + + + Always + Immer + + + Touchpad Left + Touchpad Links + + + Touchpad Right + Touchpad Rechts + + + Touchpad Center + Touchpad Mitte + + + None + Keine + + + Graphics Device:\nOn multiple GPU systems, select the GPU the emulator will use from the drop down list,\nor select "Auto Select" to automatically determine it. + Grafikkarte:\nAuf Systemen mit mehreren GPUs wählen Sie aus einem Dropdown-Menü die GPU aus, die der Emulator verwenden wird,\noder wählen Sie "Auto Select", um sie automatisch auszuwählen. + + + Width/Height:\nSets the size of the emulator window at launch, which can be resized during gameplay.\nThis is different from the in-game resolution. + Auflösung:\nLegt die Größe des Emulator-Fensters während der Wiedergabe fest, die während der Wiedergabe geändert werden kann.\nDies unterscheidet sich von der tatsächlichen Spielauflösung. + + + Vblank Divider:\nThe frame rate at which the emulator refreshes at is multiplied by this number. Changing this may have adverse effects, such as increasing the game speed, or breaking critical game functionality that does not expect this to change! + Framerate-Teiler:\nMultipliziert die Bildrate, mit der der Emulator aktualisiert wird, mit diesem Wert. Dies kann sich negativ auswirken, wie z.B. beschleunigtes Gameplay oder Funktionsstörungen! + + + Enable Shaders Dumping:\nFor the sake of technical debugging, saves the games shaders to a folder as they render. + Shader-Dumping aktivieren:\nZum technischen Debuggen speichert es die Shaders des Spiels in einem Ordner während der Wiedergabe. + + + Enable Null GPU:\nFor the sake of technical debugging, disables game rendering as if there were no graphics card. + Virtuelle GPU aktivieren:\nFür das technische Debugging deaktiviert es die Spielanzeige, als ob keine Grafikkarte vorhanden wäre. + + + Enable HDR:\nEnables HDR in games that support it.\nYour monitor must have support for the BT2020 PQ color space and the RGB10A2 swapchain format. + HDR:\nAktiviert HDR in Spielen, die es unterstützen.\nIhr Monitor muss Unterstützung für den BT2020 PQ Farbraum und das RGB10A2 Swapchain Format haben. + + + Game Folders:\nThe list of folders to check for installed games. + Spieleordner:\nDie Liste der Ordner, in denen nach installierten Spielen gesucht wird. + + + Add:\nAdd a folder to the list. + Hinzufügen:\nFügen Sie einen Ordner zur Liste hinzu. + + + Remove:\nRemove a folder from the list. + Entfernen:\nEntfernen Sie einen Ordner aus der Liste. + + + Enable Debug Dumping:\nSaves the import and export symbols and file header information of the currently running PS4 program to a directory. + Debug-Dump aktivieren:\nSpeichert Import-/Exportsymbole und Headerinformationen des aktuellen PS4-Programms in einem Verzeichnis. + + + Enable Vulkan Validation Layers:\nEnables a system that validates the state of the Vulkan renderer and logs information about its internal state.\nThis will reduce performance and likely change the behavior of emulation. + Vulkan-Validierungsebenen aktivieren:\nAktiviert ein System, das den Zustand des Vulkan-Treibers validiert und Informationen über dessen internen Zustand protokolliert. Dies verringert die Leistung und kann möglicherweise das Verhalten der Emulation ändern. + + + Enable Vulkan Synchronization Validation:\nEnables a system that validates the timing of Vulkan rendering tasks.\nThis will reduce performance and likely change the behavior of emulation. + Vulkan-Synchronisationsvalidierung aktivieren:\nAktiviert ein System, das die Zeitplanung der Rendering-Aufgaben von Vulkan validiert. Dies wird die Leistung verringern und kann möglicherweise das Verhalten der Emulation ändern. + + + Enable RenderDoc Debugging:\nIf enabled, the emulator will provide compatibility with Renderdoc to allow capture and analysis of the currently rendered frame. + RenderDoc-Debugging aktivieren:\nWenn aktiviert, bietet der Emulator Kompatibilität mit Renderdoc zur Erfassung und Analyse des aktuell gerenderten Frames. + + + Collect Shaders:\nYou need this enabled to edit shaders with the debug menu (Ctrl + F10). + Shader sammeln:\nSie müssen diese Option aktivieren, um Shader mit dem Debug-Menü (Strg + F10) bearbeiten zu können. + + + Crash Diagnostics:\nCreates a .yaml file with info about the Vulkan state at the time of crashing.\nUseful for debugging 'Device lost' errors. If you have this enabled, you should enable Host AND Guest Debug Markers.\nDoes not work on Intel GPUs.\nYou need Vulkan Validation Layers enabled and the Vulkan SDK for this to work. + Absturzdiagnose:\nErstellt eine .yaml-Datei mit Informationen über den Vulkan-Status zum Zeitpunkt des Absturzes.\nNützlich zum Debuggen von „Gerät verloren“-Fehlern. Wenn Sie dies aktiviert haben, sollten Sie Host- UND Gast-Debug-Markierungen aktivieren.\nFunktioniert nicht auf Intel-GPUs.\nDamit dies funktioniert, müssen Vulkan Validationsschichten aktiviert und das Vulkan SDK installiert sein. + + + Copy GPU Buffers:\nGets around race conditions involving GPU submits.\nMay or may not help with PM4 type 0 crashes. + GPU-Puffer kopieren:\nUmgeht Race-Bedingungen mit GPU-Übermittlungen.\nKann bei PM4-Abstürzen vom Typ 0 hilfreich sein oder auch nicht. + + + Host Debug Markers:\nInserts emulator-side information like markers for specific AMDGPU commands around Vulkan commands, as well as giving resources debug names.\nIf you have this enabled, you should enable Crash Diagnostics.\nUseful for programs like RenderDoc. + Host-Debug-Marker:\nFügt emulatorseitige Informationen wie Marker für bestimmte AMDGPU-Befehle rund um Vulkan-Befehle ein und gibt Ressourcen-Debug-Namen an.\nWenn Sie dies aktiviert haben, sollten Sie die Absturzdiagnose aktivieren.\nNützlich für Programme wie RenderDoc. + + + Guest Debug Markers:\nInserts any debug markers the game itself has added to the command buffer.\nIf you have this enabled, you should enable Crash Diagnostics.\nUseful for programs like RenderDoc. + Gast-Debug-Markierer:\nFügt alle Debug-Markierer, die das Spiel selbst hinzugefügt hat, in den Befehlspuffer ein.\nWenn Sie dies aktiviert haben, sollten Sie die Absturzdiagnose aktivieren.\nNützlich für Programme wie RenderDoc. + + + Save Data Path:\nThe folder where game save data will be saved. + Datenpfad speichern:\nDer Ordner, in dem Spieldaten gespeichert werden. + + + Browse:\nBrowse for a folder to set as the save data path. + Durchsuchen:\nDurchsuchen eines Ordners, um den Speicherdatenpfad festzulegen. + + + Release + Veröffentlichung + + + Nightly + Nightly + + + Set the volume of the background music. + Legen Sie die Lautstärke der Hintergrundmusik fest. + + + Enable Motion Controls + Aktiviere Bewegungssteuerung + + + Save Data Path + Speicherdaten-Pfad + + + Browse + Durchsuchen + + + async + asynchron + + + sync + syncron + + + Auto Select + Auto-Wählen + + + Directory to install games + Installationsverzeichnis für Spiele + + + Directory to save data + Verzeichnis um Daten zu speichern + + + Video + Video + + + Display Mode + Anzeigemodus + + + Windowed + Fenster + + + Fullscreen + Vollbild + + + Fullscreen (Borderless) + Vollbild (randlos) + + + Window Size + Fenstergröße + + + W: + W: + + + H: + H: + + + Separate Log Files + Separate Protokolldateien + + + Separate Log Files:\nWrites a separate logfile for each game. + Separate Protokolldateien:\nSchreibt für jedes Spiel eine separate Logdatei. + + + Trophy Notification Position + Trophäen-Benachrichtigungsposition + + + Left + Links + + + Right + Rechts + + + Top + Zuoberst + + + Bottom + Zuunterst + + + Notification Duration + Benachrichtigungsdauer + + + Portable User Folder + Portable Benutzerordner + + + Create Portable User Folder from Common User Folder + Erstellen eines portablen Benutzerordners aus dem allgemeinen Benutzer Ordner + + + Portable user folder:\nStores shadPS4 settings and data that will be applied only to the shadPS4 build located in the current folder. Restart the app after creating the portable user folder to begin using it. + Portablen Benutzerordner:\nspeichert ShadPS4 Einstellungen und Daten, die nur auf den ShadPS4 Build im aktuellen Ordner angewendet werden. Starten Sie die App nach dem Erstellen des tragbaren Benutzerordners neu, um sie zu verwenden. + + + Cannot create portable user folder + Kann keinen portablen Benutzerordner erstellen + + + %1 already exists + %1 existiert bereits + + + Portable user folder created + Portablen Benutzerordner erstellt + + + %1 successfully created. + %1 erfolgreich erstellt. + + + Open the custom trophy images/sounds folder:\nYou can add custom images to the trophies and an audio.\nAdd the files to custom_trophy with the following names:\ntrophy.wav OR trophy.mp3, bronze.png, gold.png, platinum.png, silver.png\nNote: The sound will only work in QT versions. + Open the custom trophy images/sounds folder:\nYou can add custom images to the trophies and an audio.\nAdd the files to custom_trophy with the following names:\ntrophy.wav OR trophy.mp3, bronze.png, gold.png, platinum.png, silver.png\nNote: The sound will only work in QT versions. + + + + TrophyViewer + + Trophy Viewer + Trophäenansicht + + + Select Game: + Select Game: + + + Progress + Progress + + + Show Earned Trophies + Show Earned Trophies + + + Show Not Earned Trophies + Show Not Earned Trophies + + + Show Hidden Trophies + Show Hidden Trophies + + + diff --git a/src/qt_gui/translations/el.ts b/src/qt_gui/translations/el.ts deleted file mode 100644 index 43ed81c33..000000000 --- a/src/qt_gui/translations/el.ts +++ /dev/null @@ -1,1664 +0,0 @@ - - - - - - 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... - - - - InstallDirSelect - - - shadPS4 - Choose directory - shadPS4 - Choose directory - - - - Select which directory you want to install to. - Select which directory you want to install to. - - - - 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 - - - - Cheats / Patches - Kodikí / Enimeróseis - - - - SFO Viewer - SFO Viewer - - - - Trophy Viewer - Trophy Viewer - - - - Open Folder... - Άνοιγμα Φακέλου... - - - - Open Game Folder - Άνοιγμα Φακέλου Παιχνιδιού - - - - Open Save Data Folder - Άνοιγμα Φακέλου Αποθηκευμένων Δεδομένων - - - - Open Log Folder - Άνοιγμα Φακέλου Καταγραφής - - - - Copy info... - Copy info... - - - - Copy Name - Copy Name - - - - Copy Serial - Copy Serial - - - - Copy All - Copy All - - - - Delete... - Delete... - - - - Delete Game - Delete Game - - - - Delete Update - Delete Update - - - - Delete DLC - Delete DLC - - - - Compatibility... - Compatibility... - - - - Update database - Update database - - - - View report - View report - - - - Submit a report - Submit a report - - - - Shortcut creation - Shortcut creation - - - - Shortcut created successfully! - Shortcut created successfully! - - - - Error - Error - - - - Error creating shortcut! - Error creating shortcut! - - - - Install PKG - Install PKG - - - - Game - Game - - - - requiresEnableSeparateUpdateFolder_MSG - This feature requires the 'Enable Separate Update Folder' config option to work. If you want to use this feature, please enable it. - - - - This game has no update to delete! - This game has no update to delete! - - - - Update - Update - - - - This game has no DLC to delete! - This game has no DLC to delete! - - - - DLC - DLC - - - - Delete %1 - Delete %1 - - - - Are you sure you want to delete %1's %2 directory? - Are you sure you want to delete %1's %2 directory? - - - - MainWindow - - - Open/Add Elf Folder - Open/Add Elf Folder - - - - Install Packages (PKG) - Install Packages (PKG) - - - - Boot Game - Boot Game - - - - Check for Updates - Έλεγχος για ενημερώσεις - - - - 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 - - - - Download Cheats/Patches - Κατεβάστε Κωδικούς / Ενημερώσεις - - - - 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 - - - - Help - Βοήθεια - - - - 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 - - - - Enable Separate Update Folder - Enable Separate Update Folder - - - - Show Splash - Show Splash - - - - Is PS4 Pro - Is PS4 Pro - - - - Enable Discord Rich Presence - Ενεργοποίηση Discord Rich Presence - - - - Username - Username - - - - Trophy Key - Trophy Key - - - - Trophy - Trophy - - - - Logger - Logger - - - - Log Type - Log Type - - - - Log Filter - Log Filter - - - - Input - Είσοδος - - - - Cursor - Δείκτης - - - - Hide Cursor - Απόκρυψη δείκτη - - - - Hide Cursor Idle Timeout - Χρόνος αδράνειας απόκρυψης δείκτη - - - - s - s - - - - Controller - Controller - - - - Back Button Behavior - Συμπεριφορά κουμπιού επιστροφής - - - - 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 - - - - Paths - Διαδρομές - - - - Game Folders - Φάκελοι παιχνιδιών - - - - Add... - Προσθήκη... - - - - Remove - Αφαίρεση - - - - 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 - - - - Update - Ενημέρωση - - - - Check for Updates at Startup - Έλεγχος για ενημερώσεις κατά την εκκίνηση - - - - Update Channel - Κανάλι Ενημέρωσης - - - - Check for Updates - Έλεγχος για ενημερώσεις - - - - GUI Settings - Ρυθμίσεις GUI - - - - Disable Trophy Pop-ups - Disable Trophy Pop-ups - - - - Play title music - Αναπαραγωγή μουσικής τίτλου - - - - Update Compatibility Database On Startup - Update Compatibility Database On Startup - - - - Game Compatibility - Game Compatibility - - - - Display Compatibility Data - Display Compatibility Data - - - - Update Compatibility Database - Update Compatibility Database - - - - Volume - ένταση - - - - Audio Backend - Audio Backend - - - - MainWindow - - - Game List - Λίστα παιχνιδιών - - - - * 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! - Αναγνώριση ενημέρωσης! - - - - PKG and Game versions match: - Οι εκδόσεις PKG και παιχνιδιού ταιριάζουν: - - - - Would you like to overwrite? - Θέλετε να αντικαταστήσετε; - - - - PKG Version %1 is older than installed version: - Η έκδοση PKG %1 είναι παλαιότερη από την εγκατεστημένη έκδοση: - - - - Game is installed: - Το παιχνίδι είναι εγκατεστημένο: - - - - Would you like to install Patch: - Θέλετε να εγκαταστήσετε την ενημέρωση: - - - - DLC Installation - Εγκατάσταση DLC - - - - Would you like to install DLC: %1? - Θέλετε να εγκαταστήσετε το DLC: %1; - - - - DLC already installed: - DLC ήδη εγκατεστημένο: - - - - Game already installed - Παιχνίδι ήδη εγκατεστημένο - - - - 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 for - Cheats / Patches for - - - - 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. - - - - The game is in version: %1 - Το παιχνίδι είναι στην έκδοση: %1 - - - - The downloaded patch only works on version: %1 - Η ληφθείσα ενημέρωση λειτουργεί μόνο στην έκδοση: %1 - - - - You may need to update your game. - Μπορεί να χρειαστεί να ενημερώσετε το παιχνίδι σας. - - - - Incompatibility Notice - Ειδοποίηση ασυμβατότητας - - - - 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: - Όνομα: - - - - Can't apply cheats before the game is started - Δεν μπορείτε να εφαρμόσετε cheats πριν ξεκινήσει το παιχνίδι. - - - - SettingsDialog - - - Save - Αποθήκευση - - - - Apply - Εφαρμογή - - - - Restore Defaults - Επαναφορά Προεπιλογών - - - - Close - Κλείσιμο - - - - Point your mouse at an option to display its description. - Τοποθετήστε το ποντίκι σας πάνω σε μια επιλογή για να εμφανίσετε την περιγραφή της. - - - - consoleLanguageGroupBox - Γλώσσα Κονσόλας:\nΡυθμίζει τη γλώσσα που θα χρησιμοποιήσει το παιχνίδι PS4.\nΣυνιστάται να επιλέξετε μία από τις γλώσσες που υποστηρίζονται από το παιχνίδι, η οποία ενδέχεται να διαφέρει ανάλογα με την περιοχή. - - - - emulatorLanguageGroupBox - Γλώσσα Εξομοιωτή:\nΡυθμίζει τη γλώσσα του γραφικού περιβάλλοντος του εξομοιωτή. - - - - fullscreenCheckBox - Ενεργοποίηση Πλήρους Οθόνης:\nΑυτόματα μετατρέπει το παράθυρο του παιχνιδιού σε λειτουργία πλήρους οθόνης.\nΜπορεί να ενεργοποιηθεί/απενεργοποιηθεί πατώντας το πλήκτρο F11. - - - - separateUpdatesCheckBox - Enable Separate Update Folder:\nEnables installing game updates into a separate folder for easy management. - - - - showSplashCheckBox - Εμφάνιση Splash Screen:\nΕμφανίζει ειδική γραφική οθόνη κατά την εκκίνηση. - - - - ps4proCheckBox - Είναι PS4 Pro:\nΕπιτρέπει στον εξομοιωτή να λειτουργεί σαν PS4 PRO, κάτι που μπορεί να ενεργοποιήσει συγκεκριμένες λειτουργίες σε παιχνίδια που το υποστηρίζουν. - - - - discordRPCCheckbox - Ενεργοποίηση Discord Rich Presence:\nΕμφανίζει το εικονίδιο του emulator και σχετικές πληροφορίες στο προφίλ σας στο Discord. - - - - userName - Όνομα Χρήστη:\nΟρίζει το όνομα του λογαριασμού PS4, το οποίο μπορεί να εμφανιστεί σε ορισμένα παιχνίδια. - - - - TrophyKey - Trophy Key:\nKey used to decrypt trophies. Must be obtained from your jailbroken console.\nMust contain only hex characters. - - - - logTypeGroupBox - Τύπος Καταγραφής:\nΚαθορίζει αν η έξοδος του παραθύρου καταγραφής θα συγχρονιστεί για αύξηση της απόδοσης. Αυτό μπορεί να επηρεάσει αρνητικά τις επιδόσεις του εξομοιωτή. - - - - logFilter - Φίλτρο Καταγραφής:\nΦιλτράρει τις καταγραφές ώστε να εκτυπώνονται μόνο συγκεκριμένες πληροφορίες.\nΠαραδείγματα: "Core:Trace" "Lib.Pad:Debug Common.Filesystem:Error" "*:Critical" Επίπεδα: Trace, Debug, Info, Warning, Error, Critical - με τη σειρά αυτή, κάθε επίπεδο που επιλέγεται αποκλείει τα προηγούμενα και εμφανίζει τα επόμενα επίπεδα. - - - - updaterGroupBox - Ενημερώσεις:\nRelease: Επίσημες εκδόσεις που κυκλοφορούν μηνιαίως, είναι παλαιότερες αλλά πιο σταθερές και δοκιμασμένες.\nNightly: Εκδόσεις προγραμματιστών με νέες δυνατότητες και διορθώσεις, αλλά μπορεί να περιέχουν σφάλματα και να είναι λιγότερο σταθερές. - - - - GUIgroupBox - Αναπαραγωγή Μουσικής Τίτλων:\nΕάν το παιχνίδι το υποστηρίζει, ενεργοποιεί ειδική μουσική κατά την επιλογή του παιχνιδιού από τη διεπαφή χρήστη. - - - - disableTrophycheckBox - Disable Trophy Pop-ups:\nDisable in-game trophy notifications. Trophy progress can still be tracked using the Trophy Viewer (right-click the game in the main window). - - - - hideCursorGroupBox - Απόκρυψη Κέρσορα:\nΕπιλέξτε πότε θα εξαφανιστεί ο κέρσορας:\nΠοτέ: θα βλέπετε πάντα το ποντίκι.\nΑδρανές: ορίστε έναν χρόνο για να εξαφανιστεί μετά από αδράνεια.\nΠάντα: δεν θα δείτε ποτέ το ποντίκι. - - - - idleTimeoutGroupBox - Ορίστε έναν χρόνο για να εξαφανιστεί το ποντίκι μετά από αδράνεια. - - - - backButtonBehaviorGroupBox - Συμπεριφορά Κουμπιού Επιστροφής:\nΟρίζει το κουμπί επιστροφής του ελεγκτή να προσομοιώνει το πάτημα της καθορισμένης θέσης στην οθόνη αφής PS4. - - - - enableCompatibilityCheckBox - Display Compatibility Data:\nDisplays game compatibility information in table view. Enable "Update Compatibility On Startup" to get up-to-date information. - - - - checkCompatibilityOnStartupCheckBox - Update Compatibility On Startup:\nAutomatically update the compatibility database when shadPS4 starts. - - - - updateCompatibilityButton - Update Compatibility Database:\nImmediately update the compatibility database. - - - - Never - Ποτέ - - - - Idle - Αδρανής - - - - Always - Πάντα - - - - Touchpad Left - Touchpad Αριστερά - - - - Touchpad Right - Touchpad Δεξιά - - - - Touchpad Center - Κέντρο Touchpad - - - - None - Κανένα - - - - graphicsAdapterGroupBox - Προσαρμογέας Γραφικών:\nΣε συστήματα με πολλές GPU, επιλέξτε από το μενού την GPU που θα χρησιμοποιήσει ο εξομοιωτής,\nή επιλέξτε "Auto Select" για αυτόματη επιλογή. - - - - resolutionLayout - Ανάλυση Οθόνης:\nΚαθορίζει το μέγεθος του παραθύρου του εξομοιωτή κατά την αναπαραγωγή, το οποίο μπορεί να αλλάξει κατά τη διάρκεια του παιχνιδιού.\nΑυτό είναι διαφορετικό από την ανάλυση του ίδιου του παιχνιδιού. - - - - heightDivider - Διαιρέτης Συχνότητας Ανανέωσης:\nΠολλαπλασιάζει τον ρυθμό με τον οποίο ο εξομοιωτής ενημερώνει την εικόνα με αυτόν τον αριθμό. Η αλλαγή αυτής της ρύθμισης μπορεί να έχει αρνητικές επιπτώσεις, όπως ταχύτερο παιχνίδι ή σπασμένες λειτουργίες! - - - - dumpShadersCheckBox - Ενεργοποίηση Καταγραφής Σκιάσεων (Shaders):\nΓια τεχνικό εντοπισμό σφαλμάτων, αποθηκεύει τις σκιάσεις του παιχνιδιού σε φάκελο κατά τη διάρκεια της αναπαραγωγής. - - - - nullGpuCheckBox - Ενεργοποίηση Εικονικής GPU:\nΓια τεχνικό εντοπισμό σφαλμάτων, απενεργοποιεί την εμφάνιση του παιχνιδιού σαν να μην υπάρχει κάρτα γραφικών. - - - - gameFoldersBox - Φάκελοι Παιχνιδιών:\nΗ λίστα των φακέλων για έλεγχο των εγκατεστημένων παιχνιδιών. - - - - addFolderButton - Προσθήκη:\nΠροσθέστε έναν φάκελο στη λίστα. - - - - removeFolderButton - Αφαίρεση:\nΑφαιρέστε έναν φάκελο από τη λίστα. - - - - debugDump - Ενεργοποίηση Καταγραφής Αποσφαλμάτωσης:\nΑποθηκεύει τα σύμβολα εισαγωγής/εξαγωγής και τις κεφαλίδες πληροφοριών του τρέχοντος προγράμματος PS4 σε έναν φάκελο. - - - - vkValidationCheckBox - Ενεργοποίηση Επικύρωσης Vulkan:\nΕνεργοποιεί ένα σύστημα που επικυρώνει την κατάσταση του προγράμματος οδήγησης Vulkan και καταγράφει πληροφορίες για την εσωτερική του κατάσταση. Αυτό θα μειώσει την απόδοση και ενδέχεται να αλλάξει τη συμπεριφορά του εξομοιωτή. - - - - vkSyncValidationCheckBox - Ενεργοποίηση Επικύρωσης Συγχρονισμού Vulkan:\nΕνεργοποιεί ένα σύστημα που επικυρώνει τον συγχρονισμό των εργασιών απόδοσης του Vulkan. Αυτό θα μειώσει την απόδοση και ενδέχεται να αλλάξει τη συμπεριφορά του εξομοιωτή. - - - - rdocCheckBox - Ενεργοποίηση Καταγραφής RenderDoc:\nΌταν είναι ενεργοποιημένο, ο εξομοιωτής είναι συμβατός με το RenderDoc για τη λήψη και ανάλυση του τρέχοντος καρέ. - - - - GameListFrame - - - Icon - Εικονίδιο - - - - Name - Όνομα - - - - Serial - Σειριακός αριθμός - - - - Compatibility - Compatibility - - - - Region - Περιοχή - - - - Firmware - Λογισμικό - - - - Size - Μέγεθος - - - - Version - Έκδοση - - - - Path - Διαδρομή - - - - Play Time - Χρόνος παιχνιδιού - - - - Never Played - Never Played - - - - h - h - - - - m - m - - - - s - s - - - - Compatibility is untested - Compatibility is untested - - - - Game does not initialize properly / crashes the emulator - Game does not initialize properly / crashes the emulator - - - - Game boots, but only displays a blank screen - Game boots, but only displays a blank screen - - - - Game displays an image but does not go past the menu - Game displays an image but does not go past the menu - - - - Game has game-breaking glitches or unplayable performance - Game has game-breaking glitches or unplayable performance - - - - Game can be completed with playable performance and no major glitches - Game can be completed with playable performance and no major glitches - - - - CheckUpdate - - - Auto Updater - Αυτόματος Ενημερωτής - - - - Error - Σφάλμα - - - - Network error: - Σφάλμα δικτύου: - - - - Failed to parse update information. - Αποτυχία ανάλυσης πληροφοριών ενημέρωσης. - - - - No pre-releases found. - Δεν βρέθηκαν προ-κυκλοφορίες. - - - - Invalid release data. - Μη έγκυρα δεδομένα έκδοσης. - - - - No download URL found for the specified asset. - Δεν βρέθηκε URL λήψης για το συγκεκριμένο στοιχείο. - - - - Your version is already up to date! - Η έκδοσή σας είναι ήδη ενημερωμένη! - - - - Update Available - Διαθέσιμη Ενημέρωση - - - - Update Channel - Κανάλι Ενημέρωσης - - - - Current Version - Τρέχουσα Έκδοση - - - - Latest Version - Τελευταία Έκδοση - - - - Do you want to update? - Θέλετε να ενημερώσετε; - - - - Show Changelog - Εμφάνιση Ιστορικού Αλλαγών - - - - Check for Updates at Startup - Έλεγχος για ενημερώσεις κατά την εκκίνηση - - - - Update - Ενημέρωση - - - - No - Όχι - - - - Hide Changelog - Απόκρυψη Ιστορικού Αλλαγών - - - - Changes - Αλλαγές - - - - Network error occurred while trying to access the URL - Σφάλμα δικτύου κατά την προσπάθεια πρόσβασης στη διεύθυνση URL - - - - Download Complete - Λήψη ολοκληρώθηκε - - - - The update has been downloaded, press OK to install. - Η ενημέρωση έχει ληφθεί, πατήστε OK για να εγκαταστήσετε. - - - - Failed to save the update file at - Αποτυχία αποθήκευσης του αρχείου ενημέρωσης στο - - - - Starting Update... - Εκκίνηση Ενημέρωσης... - - - - Failed to create the update script file - Αποτυχία δημιουργίας του αρχείου σεναρίου ενημέρωσης - - - - GameListUtils - - - B - B - - - - KB - KB - - - - MB - MB - - - - GB - GB - - - - TB - TB - - - \ No newline at end of file diff --git a/src/qt_gui/translations/el_GR.ts b/src/qt_gui/translations/el_GR.ts new file mode 100644 index 000000000..d1cf0d4a6 --- /dev/null +++ b/src/qt_gui/translations/el_GR.ts @@ -0,0 +1,2089 @@ + + + + + + AboutDialog + + About shadPS4 + About 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. + + + + CheatsPatches + + Cheats / Patches for + Cheats / Patches for + + + 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:\n + Οι cheats/patches είναι πειραματικά.\nΧρησιμοποιήστε τα με προσοχή.\n\nΚατεβάστε τους cheats μεμονωμένα επιλέγοντας το αποθετήριο και κάνοντας κλικ στο κουμπί λήψης.\nΣτην καρτέλα Patches, μπορείτε να κατεβάσετε όλα τα patches ταυτόχρονα, να επιλέξετε ποια θέλετε να χρησιμοποιήσετε και να αποθηκεύσετε την επιλογή.\n\nΔεδομένου ότι δεν αναπτύσσουμε τους cheats/patches,\nπαρακαλώ αναφέρετε προβλήματα στον δημιουργό του cheat.\n\nΔημιουργήσατε ένα νέο cheat; Επισκεφθείτε:\n + + + 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 + + + No Cheats found for this game in this version of the selected repository,try another repository or a different version of the game. + Δεν βρέθηκαν cheats για αυτό το παιχνίδι στην τρέχουσα έκδοση του επιλεγμένου αποθετηρίου. Δοκιμάστε να κατεβάσετε από άλλο αποθετήριο ή άλλη έκδοση του παιχνιδιού. + + + Cheats Downloaded Successfully + Cheats κατεβάστηκαν επιτυχώς + + + 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. + Κατεβάσατε επιτυχώς cheats για αυτή την έκδοση του παιχνιδιού από το επιλεγμένο αποθετήριο. Μπορείτε να δοκιμάσετε να κατεβάσετε από άλλο αποθετήριο. Αν είναι διαθέσιμο, μπορείτε να το επιλέξετε επιλέγοντας το αρχείο από τη λίστα. + + + Failed to save: + Αποτυχία αποθήκευσης: + + + Failed to download: + Αποτυχία λήψης: + + + Download Complete + Η λήψη ολοκληρώθηκε + + + 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. If the patch does not appear, it may be that it does not exist for the specific serial and version of the game. + Τα Patches κατεβάστηκαν επιτυχώς! Όλα τα Patches για όλα τα παιχνίδια έχουν κατέβει, δεν είναι απαραίτητο να τα κατεβάσετε ένα-ένα για κάθε παιχνίδι, όπως με τα Cheats. Εάν η ενημέρωση δεν εμφανίζεται, μπορεί να μην υπάρχει για τον συγκεκριμένο σειριακό αριθμό και έκδοση του παιχνιδιού. + + + Failed to parse JSON data from HTML. + Αποτυχία ανάλυσης δεδομένων JSON από HTML. + + + Failed to retrieve HTML page. + Αποτυχία ανάκτησης σελίδας HTML. + + + The game is in version: %1 + Το παιχνίδι είναι στην έκδοση: %1 + + + The downloaded patch only works on version: %1 + Η ληφθείσα ενημέρωση λειτουργεί μόνο στην έκδοση: %1 + + + You may need to update your game. + Μπορεί να χρειαστεί να ενημερώσετε το παιχνίδι σας. + + + Incompatibility Notice + Ειδοποίηση ασυμβατότητας + + + 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: + Όνομα: + + + Can't apply cheats before the game is started + Δεν μπορείτε να εφαρμόσετε cheats πριν ξεκινήσει το παιχνίδι. + + + Close + Κλείσιμο + + + + CheckUpdate + + Auto Updater + Αυτόματος Ενημερωτής + + + Error + Σφάλμα + + + Network error: + Σφάλμα δικτύου: + + + The Auto Updater allows up to 60 update checks per hour.\nYou have reached this limit. Please try again later. + Ο Αυτόματος Ενημερωτής επιτρέπει έως και 60 ελέγχους ενημερώσεων ανά ώρα.\nΈχετε φτάσει αυτό το όριο. Παρακαλώ δοκιμάστε ξανά αργότερα. + + + Failed to parse update information. + Αποτυχία ανάλυσης πληροφοριών ενημέρωσης. + + + No pre-releases found. + Δεν βρέθηκαν προ-κυκλοφορίες. + + + Invalid release data. + Μη έγκυρα δεδομένα έκδοσης. + + + No download URL found for the specified asset. + Δεν βρέθηκε URL λήψης για το συγκεκριμένο στοιχείο. + + + Your version is already up to date! + Η έκδοσή σας είναι ήδη ενημερωμένη! + + + Update Available + Διαθέσιμη Ενημέρωση + + + Update Channel + Κανάλι Ενημέρωσης + + + Current Version + Τρέχουσα Έκδοση + + + Latest Version + Τελευταία Έκδοση + + + Do you want to update? + Θέλετε να ενημερώσετε; + + + Show Changelog + Εμφάνιση Ιστορικού Αλλαγών + + + Check for Updates at Startup + Έλεγχος για ενημερώσεις κατά την εκκίνηση + + + Update + Ενημέρωση + + + No + Όχι + + + Hide Changelog + Απόκρυψη Ιστορικού Αλλαγών + + + Changes + Αλλαγές + + + Network error occurred while trying to access the URL + Σφάλμα δικτύου κατά την προσπάθεια πρόσβασης στη διεύθυνση URL + + + Download Complete + Λήψη ολοκληρώθηκε + + + The update has been downloaded, press OK to install. + Η ενημέρωση έχει ληφθεί, πατήστε OK για να εγκαταστήσετε. + + + Failed to save the update file at + Αποτυχία αποθήκευσης του αρχείου ενημέρωσης στο + + + Starting Update... + Εκκίνηση Ενημέρωσης... + + + Failed to create the update script file + Αποτυχία δημιουργίας του αρχείου σεναρίου ενημέρωσης + + + + CompatibilityInfoClass + + Fetching compatibility data, please wait + Φόρτωση δεδομένων συμβατότητας, παρακαλώ περιμένετε + + + Cancel + Ακύρωση + + + Loading... + Φόρτωση... + + + Error + Σφάλμα + + + Unable to update compatibility data! Try again later. + Δεν ήταν δυνατή η ενημέρωση των δεδομένων συμβατότητας! Προσπαθήστε αργότερα. + + + Unable to open compatibility_data.json for writing. + Αδύνατο να ανοίξετε το compatibility_data.json για εγγραφή. + + + Unknown + Άγνωστο + + + Nothing + Τίποτα + + + Boots + Μπότες + + + Menus + Μενού + + + Ingame + Εντός παιχνιδιού + + + Playable + Παιχνιδεύσιμο + + + + ControlSettings + + Configure Controls + Configure Controls + + + D-Pad + D-Pad + + + Up + Up + + + Left + Left + + + Right + Right + + + Down + Down + + + Left Stick Deadzone (def:2 max:127) + Left Stick Deadzone (def:2 max:127) + + + Left Deadzone + Left Deadzone + + + Left Stick + Left Stick + + + Config Selection + Config Selection + + + Common Config + Common Config + + + Use per-game configs + Use per-game configs + + + L1 / LB + L1 / LB + + + L2 / LT + L2 / LT + + + Back + Back + + + R1 / RB + R1 / RB + + + R2 / RT + R2 / RT + + + L3 + L3 + + + Options / Start + Options / Start + + + R3 + R3 + + + Face Buttons + Face Buttons + + + Triangle / Y + Triangle / Y + + + Square / X + Square / X + + + Circle / B + Circle / B + + + Cross / A + Cross / A + + + Right Stick Deadzone (def:2, max:127) + Right Stick Deadzone (def:2, max:127) + + + Right Deadzone + Right Deadzone + + + Right Stick + Right Stick + + + Color Adjustment + Color Adjustment + + + R: + R: + + + G: + G: + + + B: + B: + + + Override Lightbar Color + Override Lightbar Color + + + Override Color + Override Color + + + Unable to Save + Unable to Save + + + Cannot bind axis values more than once + Cannot bind axis values more than once + + + Save + Save + + + Apply + Apply + + + Restore Defaults + Restore Defaults + + + Cancel + Cancel + + + + EditorDialog + + Edit Keyboard + Mouse and Controller input bindings + Edit Keyboard + Mouse and Controller input bindings + + + Use Per-Game configs + Use Per-Game configs + + + Error + Error + + + Could not open the file for reading + Could not open the file for reading + + + Could not open the file for writing + Could not open the file for writing + + + Save Changes + Save Changes + + + Do you want to save changes? + Do you want to save changes? + + + Help + Help + + + Do you want to reset your custom default config to the original default config? + Do you want to reset your custom default config to the original default config? + + + Do you want to reset this config to your custom default config? + Do you want to reset this config to your custom default config? + + + Reset to Default + Reset to Default + + + + 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 + + + Directory to install DLC + Directory to install DLC + + + + GameListFrame + + Icon + Εικονίδιο + + + Name + Όνομα + + + Serial + Σειριακός αριθμός + + + Compatibility + Compatibility + + + Region + Περιοχή + + + Firmware + Λογισμικό + + + Size + Μέγεθος + + + Version + Έκδοση + + + Path + Διαδρομή + + + Play Time + Χρόνος παιχνιδιού + + + Never Played + Never Played + + + h + h + + + m + m + + + s + s + + + Compatibility is untested + Compatibility is untested + + + Game does not initialize properly / crashes the emulator + Game does not initialize properly / crashes the emulator + + + Game boots, but only displays a blank screen + Game boots, but only displays a blank screen + + + Game displays an image but does not go past the menu + Game displays an image but does not go past the menu + + + Game has game-breaking glitches or unplayable performance + Game has game-breaking glitches or unplayable performance + + + Game can be completed with playable performance and no major glitches + Game can be completed with playable performance and no major glitches + + + Click to see details on github + Κάντε κλικ για να δείτε λεπτομέρειες στο GitHub + + + Last updated + Τελευταία ενημέρωση + + + + GameListUtils + + B + B + + + KB + KB + + + MB + MB + + + GB + GB + + + TB + TB + + + + GuiContextMenus + + Create Shortcut + Create Shortcut + + + Cheats / Patches + Kodikí / Enimeróseis + + + SFO Viewer + SFO Viewer + + + Trophy Viewer + Trophy Viewer + + + Open Folder... + Άνοιγμα Φακέλου... + + + Open Game Folder + Άνοιγμα Φακέλου Παιχνιδιού + + + Open Save Data Folder + Άνοιγμα Φακέλου Αποθηκευμένων Δεδομένων + + + Open Log Folder + Άνοιγμα Φακέλου Καταγραφής + + + Copy info... + Copy info... + + + Copy Name + Copy Name + + + Copy Serial + Copy Serial + + + Copy Version + Copy Version + + + Copy Size + Copy Size + + + Copy All + Copy All + + + Delete... + Delete... + + + Delete Game + Delete Game + + + Delete Update + Delete Update + + + Delete DLC + Delete DLC + + + Delete Trophy + Delete Trophy + + + Compatibility... + Compatibility... + + + Update database + Update database + + + View report + View report + + + Submit a report + Submit a report + + + Shortcut creation + Shortcut creation + + + Shortcut created successfully! + Shortcut created successfully! + + + Error + Error + + + Error creating shortcut! + Error creating shortcut! + + + Game + Game + + + This game has no update to delete! + This game has no update to delete! + + + Update + Update + + + This game has no DLC to delete! + This game has no DLC to delete! + + + DLC + DLC + + + Delete %1 + Delete %1 + + + Are you sure you want to delete %1's %2 directory? + Are you sure you want to delete %1's %2 directory? + + + Open Update Folder + Open Update Folder + + + Delete Save Data + Delete Save Data + + + This game has no update folder to open! + This game has no update folder to open! + + + No log file found for this game! + No log file found for this game! + + + Failed to convert icon. + Failed to convert icon. + + + This game has no save data to delete! + This game has no save data to delete! + + + This game has no saved trophies to delete! + This game has no saved trophies to delete! + + + Save Data + Save Data + + + Trophy + Trophy + + + SFO Viewer for + SFO Viewer for + + + + HelpDialog + + Quickstart + Quickstart + + + FAQ + FAQ + + + Syntax + Syntax + + + Special Bindings + Special Bindings + + + Keybindings + Keybindings + + + + KBMSettings + + Configure Controls + Configure Controls + + + D-Pad + D-Pad + + + Up + Up + + + unmapped + unmapped + + + Left + Left + + + Right + Right + + + Down + Down + + + Left Analog Halfmode + Left Analog Halfmode + + + hold to move left stick at half-speed + hold to move left stick at half-speed + + + Left Stick + Left Stick + + + Config Selection + Config Selection + + + Common Config + Common Config + + + Use per-game configs + Use per-game configs + + + L1 + L1 + + + L2 + L2 + + + Text Editor + Text Editor + + + Help + Help + + + R1 + R1 + + + R2 + R2 + + + L3 + L3 + + + Touchpad Click + Touchpad Click + + + Mouse to Joystick + Mouse to Joystick + + + *press F7 ingame to activate + *press F7 ingame to activate + + + R3 + R3 + + + Options + Options + + + Mouse Movement Parameters + Mouse Movement Parameters + + + note: click Help Button/Special Keybindings for more information + note: click Help Button/Special Keybindings for more information + + + Face Buttons + Face Buttons + + + Triangle + Triangle + + + Square + Square + + + Circle + Circle + + + Cross + Cross + + + Right Analog Halfmode + Right Analog Halfmode + + + hold to move right stick at half-speed + hold to move right stick at half-speed + + + Right Stick + Right Stick + + + Speed Offset (def 0.125): + Speed Offset (def 0.125): + + + Copy from Common Config + Copy from Common Config + + + Deadzone Offset (def 0.50): + Deadzone Offset (def 0.50): + + + Speed Multiplier (def 1.0): + Speed Multiplier (def 1.0): + + + Common Config Selected + Common Config Selected + + + This button copies mappings from the Common Config to the currently selected profile, and cannot be used when the currently selected profile is the Common Config. + This button copies mappings from the Common Config to the currently selected profile, and cannot be used when the currently selected profile is the Common Config. + + + Copy values from Common Config + Copy values from Common Config + + + Do you want to overwrite existing mappings with the mappings from the Common Config? + Do you want to overwrite existing mappings with the mappings from the Common Config? + + + Unable to Save + Unable to Save + + + Cannot bind any unique input more than once + Cannot bind any unique input more than once + + + Press a key + Press a key + + + Cannot set mapping + Cannot set mapping + + + Mousewheel cannot be mapped to stick outputs + Mousewheel cannot be mapped to stick outputs + + + Save + Save + + + Apply + Apply + + + Restore Defaults + Restore Defaults + + + Cancel + Cancel + + + + MainWindow + + Open/Add Elf Folder + Open/Add Elf Folder + + + Boot Game + Boot Game + + + Check for Updates + Έλεγχος για ενημερώσεις + + + About shadPS4 + About shadPS4 + + + Configure... + Configure... + + + Recent Games + Recent Games + + + Open shadPS4 Folder + Open shadPS4 Folder + + + 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 + + + Download Cheats/Patches + Κατεβάστε Κωδικούς / Ενημερώσεις + + + Dump Game List + Dump Game List + + + Trophy Viewer + Trophy Viewer + + + No games found. Please add your games to your library first. + No games found. Please add your games to your library first. + + + Search... + Search... + + + File + File + + + View + View + + + Game List Icons + Game List Icons + + + Game List Mode + Game List Mode + + + Settings + Settings + + + Utils + Utils + + + Themes + Themes + + + Help + Βοήθεια + + + Dark + Dark + + + Light + Light + + + Green + Green + + + Blue + Blue + + + Violet + Violet + + + toolBar + toolBar + + + Game List + Λίστα παιχνιδιών + + + * 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: + Παιχνίδια: + + + ELF files (*.bin *.elf *.oelf) + Αρχεία ELF (*.bin *.elf *.oelf) + + + Game Boot + Εκκίνηση παιχνιδιού + + + Only one file can be selected! + Μπορεί να επιλεγεί μόνο ένα αρχείο! + + + Run Game + Run Game + + + Eboot.bin file not found + Eboot.bin file not found + + + Game is already running! + Game is already running! + + + shadPS4 + shadPS4 + + + Play + Play + + + Pause + Pause + + + Stop + Stop + + + Restart + Restart + + + Full Screen + Full Screen + + + Controllers + Controllers + + + Keyboard + Keyboard + + + Refresh List + Refresh List + + + Resume + Resume + + + Show Labels Under Icons + Show Labels Under Icons + + + + SettingsDialog + + Settings + Settings + + + General + General + + + System + System + + + Console Language + Console Language + + + Emulator Language + Emulator Language + + + Emulator + Emulator + + + Enable Separate Update Folder + Enable Separate Update Folder + + + Default tab when opening settings + Προεπιλεγμένη καρτέλα κατά την ανοίγμα των ρυθμίσεων + + + Show Game Size In List + Εμφάνιση Μεγέθους Παιχνιδιού στη Λίστα + + + Show Splash + Show Splash + + + Enable Discord Rich Presence + Ενεργοποίηση Discord Rich Presence + + + Username + Username + + + Trophy Key + Trophy Key + + + Trophy + Trophy + + + Open the custom trophy images/sounds folder + Open the custom trophy images/sounds folder + + + Logger + Logger + + + Log Type + Log Type + + + Log Filter + Log Filter + + + Open Log Location + Άνοιγμα τοποθεσίας αρχείου καταγραφής + + + Input + Είσοδος + + + Cursor + Δείκτης + + + Hide Cursor + Απόκρυψη δείκτη + + + Hide Cursor Idle Timeout + Χρόνος αδράνειας απόκρυψης δείκτη + + + s + s + + + Controller + Controller + + + Back Button Behavior + Συμπεριφορά κουμπιού επιστροφής + + + Graphics + Graphics + + + GUI + Διεπαφή + + + User + Χρήστης + + + Graphics Device + Graphics Device + + + Vblank Divider + Vblank Divider + + + Advanced + Advanced + + + Enable Shaders Dumping + Enable Shaders Dumping + + + Enable NULL GPU + Enable NULL GPU + + + Enable HDR + Enable HDR + + + Paths + Διαδρομές + + + Game Folders + Φάκελοι παιχνιδιών + + + Add... + Προσθήκη... + + + Remove + Αφαίρεση + + + 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 + + + Enable Crash Diagnostics + Enable Crash Diagnostics + + + Collect Shaders + Collect Shaders + + + Copy GPU Buffers + Copy GPU Buffers + + + Host Debug Markers + Host Debug Markers + + + Guest Debug Markers + Guest Debug Markers + + + Update + Ενημέρωση + + + Check for Updates at Startup + Έλεγχος για ενημερώσεις κατά την εκκίνηση + + + Always Show Changelog + Πάντα εμφάνιση ιστορικού αλλαγών + + + Update Channel + Κανάλι Ενημέρωσης + + + Check for Updates + Έλεγχος για ενημερώσεις + + + GUI Settings + Ρυθμίσεις GUI + + + Title Music + Title Music + + + Disable Trophy Notification + Disable Trophy Notification + + + Background Image + Background Image + + + Show Background Image + Show Background Image + + + Opacity + Opacity + + + Play title music + Αναπαραγωγή μουσικής τίτλου + + + Update Compatibility Database On Startup + Update Compatibility Database On Startup + + + Game Compatibility + Game Compatibility + + + Display Compatibility Data + Display Compatibility Data + + + Update Compatibility Database + Update Compatibility Database + + + Volume + ένταση + + + Save + Αποθήκευση + + + Apply + Εφαρμογή + + + Restore Defaults + Επαναφορά Προεπιλογών + + + Close + Κλείσιμο + + + Point your mouse at an option to display its description. + Τοποθετήστε το ποντίκι σας πάνω σε μια επιλογή για να εμφανίσετε την περιγραφή της. + + + Console Language:\nSets the language that the PS4 game uses.\nIt's recommended to set this to a language the game supports, which will vary by region. + Γλώσσα Κονσόλας:\nΡυθμίζει τη γλώσσα που θα χρησιμοποιήσει το παιχνίδι PS4.\nΣυνιστάται να επιλέξετε μία από τις γλώσσες που υποστηρίζονται από το παιχνίδι, η οποία ενδέχεται να διαφέρει ανάλογα με την περιοχή. + + + Emulator Language:\nSets the language of the emulator's user interface. + Γλώσσα Εξομοιωτή:\nΡυθμίζει τη γλώσσα του γραφικού περιβάλλοντος του εξομοιωτή. + + + Enable Separate Update Folder:\nEnables installing game updates into a separate folder for easy management.\nThis can be manually created by adding the extracted update to the game folder with the name "CUSA00000-UPDATE" where the CUSA ID matches the game's ID. + Enable Separate Update Folder:\nEnables installing game updates into a separate folder for easy management.\nThis can be manually created by adding the extracted update to the game folder with the name "CUSA00000-UPDATE" where the CUSA ID matches the game's ID. + + + Show Splash Screen:\nShows the game's splash screen (a special image) while the game is starting. + Εμφάνιση Splash Screen:\nΕμφανίζει ειδική γραφική οθόνη κατά την εκκίνηση. + + + Enable Discord Rich Presence:\nDisplays the emulator icon and relevant information on your Discord profile. + Ενεργοποίηση Discord Rich Presence:\nΕμφανίζει το εικονίδιο του emulator και σχετικές πληροφορίες στο προφίλ σας στο Discord. + + + Username:\nSets the PS4's account username, which may be displayed by some games. + Όνομα Χρήστη:\nΟρίζει το όνομα του λογαριασμού PS4, το οποίο μπορεί να εμφανιστεί σε ορισμένα παιχνίδια. + + + Trophy Key:\nKey used to decrypt trophies. Must be obtained from your jailbroken console.\nMust contain only hex characters. + Trophy Key:\nKey used to decrypt trophies. Must be obtained from your jailbroken console.\nMust contain only hex characters. + + + Log Type:\nSets whether to synchronize the output of the log window for performance. May have adverse effects on emulation. + Τύπος Καταγραφής:\nΚαθορίζει αν η έξοδος του παραθύρου καταγραφής θα συγχρονιστεί για αύξηση της απόδοσης. Αυτό μπορεί να επηρεάσει αρνητικά τις επιδόσεις του εξομοιωτή. + + + Log Filter:\nFilters the log to only print specific information.\nExamples: "Core:Trace" "Lib.Pad:Debug Common.Filesystem:Error" "*:Critical"\nLevels: Trace, Debug, Info, Warning, Error, Critical - in this order, a specific level silences all levels preceding it in the list and logs every level after it. + Φίλτρο Καταγραφής:\nΦιλτράρει τις καταγραφές ώστε να εκτυπώνονται μόνο συγκεκριμένες πληροφορίες.\nΠαραδείγματα: "Core:Trace" "Lib.Pad:Debug Common.Filesystem:Error" "*:Critical" Επίπεδα: Trace, Debug, Info, Warning, Error, Critical - με τη σειρά αυτή, κάθε επίπεδο που επιλέγεται αποκλείει τα προηγούμενα και εμφανίζει τα επόμενα επίπεδα. + + + Update:\nRelease: Official versions released every month that may be very outdated, but are more reliable and tested.\nNightly: Development versions that have all the latest features and fixes, but may contain bugs and are less stable. + Ενημερώσεις:\nRelease: Επίσημες εκδόσεις που κυκλοφορούν μηνιαίως, είναι παλαιότερες αλλά πιο σταθερές και δοκιμασμένες.\nNightly: Εκδόσεις προγραμματιστών με νέες δυνατότητες και διορθώσεις, αλλά μπορεί να περιέχουν σφάλματα και να είναι λιγότερο σταθερές. + + + Background Image:\nControl the opacity of the game background image. + Background Image:\nControl the opacity of the game background image. + + + Play Title Music:\nIf a game supports it, enable playing special music when selecting the game in the GUI. + Αναπαραγωγή Μουσικής Τίτλων:\nΕάν το παιχνίδι το υποστηρίζει, ενεργοποιεί ειδική μουσική κατά την επιλογή του παιχνιδιού από τη διεπαφή χρήστη. + + + Disable Trophy Pop-ups:\nDisable in-game trophy notifications. Trophy progress can still be tracked using the Trophy Viewer (right-click the game in the main window). + Disable Trophy Pop-ups:\nDisable in-game trophy notifications. Trophy progress can still be tracked using the Trophy Viewer (right-click the game in the main window). + + + Hide Cursor:\nChoose when the cursor will disappear:\nNever: You will always see the mouse.\nidle: Set a time for it to disappear after being idle.\nAlways: you will never see the mouse. + Απόκρυψη Κέρσορα:\nΕπιλέξτε πότε θα εξαφανιστεί ο κέρσορας:\nΠοτέ: θα βλέπετε πάντα το ποντίκι.\nΑδρανές: ορίστε έναν χρόνο για να εξαφανιστεί μετά από αδράνεια.\nΠάντα: δεν θα δείτε ποτέ το ποντίκι. + + + Hide Idle Cursor Timeout:\nThe duration (seconds) after which the cursor that has been idle hides itself. + Ορίστε έναν χρόνο για να εξαφανιστεί το ποντίκι μετά από αδράνεια. + + + Back Button Behavior:\nSets the controller's back button to emulate tapping the specified position on the PS4 touchpad. + Συμπεριφορά Κουμπιού Επιστροφής:\nΟρίζει το κουμπί επιστροφής του ελεγκτή να προσομοιώνει το πάτημα της καθορισμένης θέσης στην οθόνη αφής PS4. + + + Display Compatibility Data:\nDisplays game compatibility information in table view. Enable "Update Compatibility On Startup" to get up-to-date information. + Display Compatibility Data:\nDisplays game compatibility information in table view. Enable "Update Compatibility On Startup" to get up-to-date information. + + + Update Compatibility On Startup:\nAutomatically update the compatibility database when shadPS4 starts. + Update Compatibility On Startup:\nAutomatically update the compatibility database when shadPS4 starts. + + + Update Compatibility Database:\nImmediately update the compatibility database. + Update Compatibility Database:\nImmediately update the compatibility database. + + + Never + Ποτέ + + + Idle + Αδρανής + + + Always + Πάντα + + + Touchpad Left + Touchpad Αριστερά + + + Touchpad Right + Touchpad Δεξιά + + + Touchpad Center + Κέντρο Touchpad + + + None + Κανένα + + + Graphics Device:\nOn multiple GPU systems, select the GPU the emulator will use from the drop down list,\nor select "Auto Select" to automatically determine it. + Προσαρμογέας Γραφικών:\nΣε συστήματα με πολλές GPU, επιλέξτε από το μενού την GPU που θα χρησιμοποιήσει ο εξομοιωτής,\nή επιλέξτε "Auto Select" για αυτόματη επιλογή. + + + Width/Height:\nSets the size of the emulator window at launch, which can be resized during gameplay.\nThis is different from the in-game resolution. + Ανάλυση Οθόνης:\nΚαθορίζει το μέγεθος του παραθύρου του εξομοιωτή κατά την αναπαραγωγή, το οποίο μπορεί να αλλάξει κατά τη διάρκεια του παιχνιδιού.\nΑυτό είναι διαφορετικό από την ανάλυση του ίδιου του παιχνιδιού. + + + Vblank Divider:\nThe frame rate at which the emulator refreshes at is multiplied by this number. Changing this may have adverse effects, such as increasing the game speed, or breaking critical game functionality that does not expect this to change! + Διαιρέτης Συχνότητας Ανανέωσης:\nΠολλαπλασιάζει τον ρυθμό με τον οποίο ο εξομοιωτής ενημερώνει την εικόνα με αυτόν τον αριθμό. Η αλλαγή αυτής της ρύθμισης μπορεί να έχει αρνητικές επιπτώσεις, όπως ταχύτερο παιχνίδι ή σπασμένες λειτουργίες! + + + Enable Shaders Dumping:\nFor the sake of technical debugging, saves the games shaders to a folder as they render. + Ενεργοποίηση Καταγραφής Σκιάσεων (Shaders):\nΓια τεχνικό εντοπισμό σφαλμάτων, αποθηκεύει τις σκιάσεις του παιχνιδιού σε φάκελο κατά τη διάρκεια της αναπαραγωγής. + + + Enable Null GPU:\nFor the sake of technical debugging, disables game rendering as if there were no graphics card. + Ενεργοποίηση Εικονικής GPU:\nΓια τεχνικό εντοπισμό σφαλμάτων, απενεργοποιεί την εμφάνιση του παιχνιδιού σαν να μην υπάρχει κάρτα γραφικών. + + + Enable HDR:\nEnables HDR in games that support it.\nYour monitor must have support for the BT2020 PQ color space and the RGB10A2 swapchain format. + Enable HDR:\nEnables HDR in games that support it.\nYour monitor must have support for the BT2020 PQ color space and the RGB10A2 swapchain format. + + + Game Folders:\nThe list of folders to check for installed games. + Φάκελοι Παιχνιδιών:\nΗ λίστα των φακέλων για έλεγχο των εγκατεστημένων παιχνιδιών. + + + Add:\nAdd a folder to the list. + Προσθήκη:\nΠροσθέστε έναν φάκελο στη λίστα. + + + Remove:\nRemove a folder from the list. + Αφαίρεση:\nΑφαιρέστε έναν φάκελο από τη λίστα. + + + Enable Debug Dumping:\nSaves the import and export symbols and file header information of the currently running PS4 program to a directory. + Ενεργοποίηση Καταγραφής Αποσφαλμάτωσης:\nΑποθηκεύει τα σύμβολα εισαγωγής/εξαγωγής και τις κεφαλίδες πληροφοριών του τρέχοντος προγράμματος PS4 σε έναν φάκελο. + + + Enable Vulkan Validation Layers:\nEnables a system that validates the state of the Vulkan renderer and logs information about its internal state.\nThis will reduce performance and likely change the behavior of emulation. + Ενεργοποίηση Επικύρωσης Vulkan:\nΕνεργοποιεί ένα σύστημα που επικυρώνει την κατάσταση του προγράμματος οδήγησης Vulkan και καταγράφει πληροφορίες για την εσωτερική του κατάσταση. Αυτό θα μειώσει την απόδοση και ενδέχεται να αλλάξει τη συμπεριφορά του εξομοιωτή. + + + Enable Vulkan Synchronization Validation:\nEnables a system that validates the timing of Vulkan rendering tasks.\nThis will reduce performance and likely change the behavior of emulation. + Ενεργοποίηση Επικύρωσης Συγχρονισμού Vulkan:\nΕνεργοποιεί ένα σύστημα που επικυρώνει τον συγχρονισμό των εργασιών απόδοσης του Vulkan. Αυτό θα μειώσει την απόδοση και ενδέχεται να αλλάξει τη συμπεριφορά του εξομοιωτή. + + + Enable RenderDoc Debugging:\nIf enabled, the emulator will provide compatibility with Renderdoc to allow capture and analysis of the currently rendered frame. + Ενεργοποίηση Καταγραφής RenderDoc:\nΌταν είναι ενεργοποιημένο, ο εξομοιωτής είναι συμβατός με το RenderDoc για τη λήψη και ανάλυση του τρέχοντος καρέ. + + + Collect Shaders:\nYou need this enabled to edit shaders with the debug menu (Ctrl + F10). + Collect Shaders:\nYou need this enabled to edit shaders with the debug menu (Ctrl + F10). + + + Crash Diagnostics:\nCreates a .yaml file with info about the Vulkan state at the time of crashing.\nUseful for debugging 'Device lost' errors. If you have this enabled, you should enable Host AND Guest Debug Markers.\nDoes not work on Intel GPUs.\nYou need Vulkan Validation Layers enabled and the Vulkan SDK for this to work. + Crash Diagnostics:\nCreates a .yaml file with info about the Vulkan state at the time of crashing.\nUseful for debugging 'Device lost' errors. If you have this enabled, you should enable Host AND Guest Debug Markers.\nDoes not work on Intel GPUs.\nYou need Vulkan Validation Layers enabled and the Vulkan SDK for this to work. + + + Copy GPU Buffers:\nGets around race conditions involving GPU submits.\nMay or may not help with PM4 type 0 crashes. + Copy GPU Buffers:\nGets around race conditions involving GPU submits.\nMay or may not help with PM4 type 0 crashes. + + + Host Debug Markers:\nInserts emulator-side information like markers for specific AMDGPU commands around Vulkan commands, as well as giving resources debug names.\nIf you have this enabled, you should enable Crash Diagnostics.\nUseful for programs like RenderDoc. + Host Debug Markers:\nInserts emulator-side information like markers for specific AMDGPU commands around Vulkan commands, as well as giving resources debug names.\nIf you have this enabled, you should enable Crash Diagnostics.\nUseful for programs like RenderDoc. + + + Guest Debug Markers:\nInserts any debug markers the game itself has added to the command buffer.\nIf you have this enabled, you should enable Crash Diagnostics.\nUseful for programs like RenderDoc. + Guest Debug Markers:\nInserts any debug markers the game itself has added to the command buffer.\nIf you have this enabled, you should enable Crash Diagnostics.\nUseful for programs like RenderDoc. + + + Save Data Path:\nThe folder where game save data will be saved. + Save Data Path:\nThe folder where game save data will be saved. + + + Browse:\nBrowse for a folder to set as the save data path. + Browse:\nBrowse for a folder to set as the save data path. + + + Release + Release + + + Nightly + Nightly + + + Set the volume of the background music. + Set the volume of the background music. + + + Enable Motion Controls + Enable Motion Controls + + + Save Data Path + Save Data Path + + + Browse + Browse + + + async + async + + + sync + sync + + + Auto Select + Auto Select + + + Directory to install games + Directory to install games + + + Directory to save data + Directory to save data + + + Video + Video + + + Display Mode + Display Mode + + + Windowed + Windowed + + + Fullscreen + Fullscreen + + + Fullscreen (Borderless) + Fullscreen (Borderless) + + + Window Size + Window Size + + + W: + W: + + + H: + H: + + + Separate Log Files + Separate Log Files + + + Separate Log Files:\nWrites a separate logfile for each game. + Separate Log Files:\nWrites a separate logfile for each game. + + + Trophy Notification Position + Trophy Notification Position + + + Left + Left + + + Right + Right + + + Top + Top + + + Bottom + Bottom + + + Notification Duration + Notification Duration + + + Portable User Folder + Portable User Folder + + + Create Portable User Folder from Common User Folder + Create Portable User Folder from Common User Folder + + + Portable user folder:\nStores shadPS4 settings and data that will be applied only to the shadPS4 build located in the current folder. Restart the app after creating the portable user folder to begin using it. + Portable user folder:\nStores shadPS4 settings and data that will be applied only to the shadPS4 build located in the current folder. Restart the app after creating the portable user folder to begin using it. + + + Cannot create portable user folder + Cannot create portable user folder + + + %1 already exists + %1 already exists + + + Portable user folder created + Portable user folder created + + + %1 successfully created. + %1 successfully created. + + + Open the custom trophy images/sounds folder:\nYou can add custom images to the trophies and an audio.\nAdd the files to custom_trophy with the following names:\ntrophy.wav OR trophy.mp3, bronze.png, gold.png, platinum.png, silver.png\nNote: The sound will only work in QT versions. + Open the custom trophy images/sounds folder:\nYou can add custom images to the trophies and an audio.\nAdd the files to custom_trophy with the following names:\ntrophy.wav OR trophy.mp3, bronze.png, gold.png, platinum.png, silver.png\nNote: The sound will only work in QT versions. + + + + TrophyViewer + + Trophy Viewer + Trophy Viewer + + + Select Game: + Select Game: + + + Progress + Progress + + + Show Earned Trophies + Show Earned Trophies + + + Show Not Earned Trophies + Show Not Earned Trophies + + + Show Hidden Trophies + Show Hidden Trophies + + + diff --git a/src/qt_gui/translations/en.ts b/src/qt_gui/translations/en.ts deleted file mode 100644 index 293b5fae7..000000000 --- a/src/qt_gui/translations/en.ts +++ /dev/null @@ -1,1664 +0,0 @@ - - - - - - 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... - - - - InstallDirSelect - - - shadPS4 - Choose directory - shadPS4 - Choose directory - - - - Select which directory you want to install to. - Select which directory you want to install to. - - - - 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 - - - - Cheats / Patches - Cheats / Patches - - - - SFO Viewer - SFO Viewer - - - - Trophy Viewer - Trophy Viewer - - - - Open Folder... - Open Folder... - - - - Open Game Folder - Open Game Folder - - - - Open Save Data Folder - Open Save Data Folder - - - - Open Log Folder - Open Log Folder - - - - Copy info... - Copy info... - - - - Copy Name - Copy Name - - - - Copy Serial - Copy Serial - - - - Copy All - Copy All - - - - Delete... - Delete... - - - - Delete Game - Delete Game - - - - Delete Update - Delete Update - - - - Delete DLC - Delete DLC - - - - Compatibility... - Compatibility... - - - - Update database - Update database - - - - View report - View report - - - - Submit a report - Submit a report - - - - Shortcut creation - Shortcut creation - - - - Shortcut created successfully! - Shortcut created successfully! - - - - Error - Error - - - - Error creating shortcut! - Error creating shortcut! - - - - Install PKG - Install PKG - - - - Game - Game - - - - requiresEnableSeparateUpdateFolder_MSG - This feature requires the 'Enable Separate Update Folder' config option to work. If you want to use this feature, please enable it. - - - - This game has no update to delete! - This game has no update to delete! - - - - Update - Update - - - - This game has no DLC to delete! - This game has no DLC to delete! - - - - DLC - DLC - - - - Delete %1 - Delete %1 - - - - Are you sure you want to delete %1's %2 directory? - Are you sure you want to delete %1's %2 directory? - - - - MainWindow - - - Open/Add Elf Folder - Open/Add Elf Folder - - - - Install Packages (PKG) - Install Packages (PKG) - - - - Boot Game - Boot Game - - - - Check for Updates - Check for Updates - - - - 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 - - - - Download Cheats/Patches - Download Cheats / Patches - - - - 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 - - - - Help - Help - - - - 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 - - - - Enable Separate Update Folder - Enable Separate Update Folder - - - - Show Splash - Show Splash - - - - Is PS4 Pro - Is PS4 Pro - - - - Enable Discord Rich Presence - Enable Discord Rich Presence - - - - Username - Username - - - - Trophy Key - Trophy Key - - - - Trophy - Trophy - - - - Logger - Logger - - - - Log Type - Log Type - - - - Log Filter - Log Filter - - - - Input - Input - - - - Cursor - Cursor - - - - Hide Cursor - Hide Cursor - - - - Hide Cursor Idle Timeout - Hide Cursor Idle Timeout - - - - s - s - - - - Controller - Controller - - - - Back Button Behavior - Back Button Behavior - - - - 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 - - - - Paths - Paths - - - - Game Folders - Game Folders - - - - Add... - Add... - - - - Remove - Remove - - - - 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 - - - - Update - Update - - - - Check for Updates at Startup - Check for Updates at Startup - - - - Update Channel - Update Channel - - - - Check for Updates - Check for Updates - - - - GUI Settings - GUI Settings - - - - Disable Trophy Pop-ups - Disable Trophy Pop-ups - - - - Play title music - Play title music - - - - Update Compatibility Database On Startup - Update Compatibility Database On Startup - - - - Game Compatibility - Game Compatibility - - - - Display Compatibility Data - Display Compatibility Data - - - - Update Compatibility Database - Update Compatibility Database - - - - Volume - Volume - - - - Audio Backend - Audio Backend - - - - MainWindow - - - Game List - Game List - - - - * 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! - Patch detected! - - - - PKG and Game versions match: - PKG and Game versions match: - - - - Would you like to overwrite? - Would you like to overwrite? - - - - PKG Version %1 is older than installed version: - PKG Version %1 is older than installed version: - - - - Game is installed: - Game is installed: - - - - Would you like to install Patch: - Would you like to install Patch: - - - - DLC Installation - DLC Installation - - - - Would you like to install DLC: %1? - Would you like to install DLC: %1? - - - - DLC already installed: - DLC already installed: - - - - Game already installed - Game already installed - - - - 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 for - Cheats / Patches for - - - - 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. If the patch does not appear, it may be that it does not exist for the specific serial and version of the game. - - - - Failed to parse JSON data from HTML. - Failed to parse JSON data from HTML. - - - - Failed to retrieve HTML page. - Failed to retrieve HTML page. - - - - The game is in version: %1 - The game is in version: %1 - - - - The downloaded patch only works on version: %1 - The downloaded patch only works on version: %1 - - - - You may need to update your game. - You may need to update your game. - - - - Incompatibility Notice - Incompatibility Notice - - - - 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: - - - - Can't apply cheats before the game is started - Can't apply cheats before the game is started. - - - - SettingsDialog - - - Save - Save - - - - Apply - Apply - - - - Restore Defaults - Restore Defaults - - - - Close - Close - - - - Point your mouse at an option to display its description. - Point your mouse at an option to display its description. - - - - consoleLanguageGroupBox - Console Language:\nSets the language that the PS4 game uses.\nIt's recommended to set this to a language the game supports, which will vary by region. - - - - emulatorLanguageGroupBox - Emulator Language:\nSets the language of the emulator's user interface. - - - - fullscreenCheckBox - Enable Full Screen:\nAutomatically puts the game window into full-screen mode.\nThis can be toggled by pressing the F11 key. - - - - separateUpdatesCheckBox - Enable Separate Update Folder:\nEnables installing game updates into a separate folder for easy management.\nThis can be manually created by adding the extracted update to the game folder with the name "CUSA00000-UPDATE" where the CUSA ID matches the game's ID. - - - - showSplashCheckBox - Show Splash Screen:\nShows the game's splash screen (a special image) while the game is starting. - - - - ps4proCheckBox - Is PS4 Pro:\nMakes the emulator act as a PS4 PRO, which may enable special features in games that support it. - - - - discordRPCCheckbox - Enable Discord Rich Presence:\nDisplays the emulator icon and relevant information on your Discord profile. - - - - userName - Username:\nSets the PS4's account username, which may be displayed by some games. - - - - TrophyKey - Trophy Key:\nKey used to decrypt trophies. Must be obtained from your jailbroken console.\nMust contain only hex characters. - - - - logTypeGroupBox - Log Type:\nSets whether to synchronize the output of the log window for performance. May have adverse effects on emulation. - - - - logFilter - Log Filter:\nFilters the log to only print specific information.\nExamples: "Core:Trace" "Lib.Pad:Debug Common.Filesystem:Error" "*:Critical"\nLevels: Trace, Debug, Info, Warning, Error, Critical - in this order, a specific level silences all levels preceding it in the list and logs every level after it. - - - - updaterGroupBox - Update:\nRelease: Official versions released every month that may be very outdated, but are more reliable and tested.\nNightly: Development versions that have all the latest features and fixes, but may contain bugs and are less stable. - - - - GUIgroupBox - Play Title Music:\nIf a game supports it, enable playing special music when selecting the game in the GUI. - - - - disableTrophycheckBox - Disable Trophy Pop-ups:\nDisable in-game trophy notifications. Trophy progress can still be tracked using the Trophy Viewer (right-click the game in the main window). - - - - hideCursorGroupBox - Hide Cursor:\nChoose when the cursor will disappear:\nNever: You will always see the mouse.\nidle: Set a time for it to disappear after being idle.\nAlways: you will never see the mouse. - - - - idleTimeoutGroupBox - Hide Idle Cursor Timeout:\nThe duration (seconds) after which the cursor that has been idle hides itself. - - - - backButtonBehaviorGroupBox - Back Button Behavior:\nSets the controller's back button to emulate tapping the specified position on the PS4 touchpad. - - - - enableCompatibilityCheckBox - Display Compatibility Data:\nDisplays game compatibility information in table view. Enable "Update Compatibility On Startup" to get up-to-date information. - - - - checkCompatibilityOnStartupCheckBox - Update Compatibility On Startup:\nAutomatically update the compatibility database when shadPS4 starts. - - - - updateCompatibilityButton - Update Compatibility Database:\nImmediately update the compatibility database. - - - - Never - Never - - - - Idle - Idle - - - - Always - Always - - - - Touchpad Left - Touchpad Left - - - - Touchpad Right - Touchpad Right - - - - Touchpad Center - Touchpad Center - - - - None - None - - - - graphicsAdapterGroupBox - Graphics Device:\nOn multiple GPU systems, select the GPU the emulator will use from the drop down list,\nor select "Auto Select" to automatically determine it. - - - - resolutionLayout - Width/Height:\nSets the size of the emulator window at launch, which can be resized during gameplay.\nThis is different from the in-game resolution. - - - - heightDivider - Vblank Divider:\nThe frame rate at which the emulator refreshes at is multiplied by this number. Changing this may have adverse effects, such as increasing the game speed, or breaking critical game functionality that does not expect this to change! - - - - dumpShadersCheckBox - Enable Shaders Dumping:\nFor the sake of technical debugging, saves the games shaders to a folder as they render. - - - - nullGpuCheckBox - Enable Null GPU:\nFor the sake of technical debugging, disables game rendering as if there were no graphics card. - - - - gameFoldersBox - Game Folders:\nThe list of folders to check for installed games. - - - - addFolderButton - Add:\nAdd a folder to the list. - - - - removeFolderButton - Remove:\nRemove a folder from the list. - - - - debugDump - Enable Debug Dumping:\nSaves the import and export symbols and file header information of the currently running PS4 program to a directory. - - - - vkValidationCheckBox - Enable Vulkan Validation Layers:\nEnables a system that validates the state of the Vulkan renderer and logs information about its internal state.\nThis will reduce performance and likely change the behavior of emulation. - - - - vkSyncValidationCheckBox - Enable Vulkan Synchronization Validation:\nEnables a system that validates the timing of Vulkan rendering tasks.\nThis will reduce performance and likely change the behavior of emulation. - - - - rdocCheckBox - Enable RenderDoc Debugging:\nIf enabled, the emulator will provide compatibility with Renderdoc to allow capture and analysis of the currently rendered frame. - - - - GameListFrame - - - Icon - Icon - - - - Name - Name - - - - Serial - Serial - - - - Compatibility - Compatibility - - - - Region - Region - - - - Firmware - Firmware - - - - Size - Size - - - - Version - Version - - - - Path - Path - - - - Play Time - Play Time - - - - Never Played - Never Played - - - - h - h - - - - m - m - - - - s - s - - - - Compatibility is untested - Compatibility is untested - - - - Game does not initialize properly / crashes the emulator - Game does not initialize properly / crashes the emulator - - - - Game boots, but only displays a blank screen - Game boots, but only displays a blank screen - - - - Game displays an image but does not go past the menu - Game displays an image but does not go past the menu - - - - Game has game-breaking glitches or unplayable performance - Game has game-breaking glitches or unplayable performance - - - - Game can be completed with playable performance and no major glitches - Game can be completed with playable performance and no major glitches - - - - CheckUpdate - - - Auto Updater - Auto Updater - - - - Error - Error - - - - Network error: - Network error: - - - - Failed to parse update information. - Failed to parse update information. - - - - No pre-releases found. - No pre-releases found. - - - - Invalid release data. - Invalid release data. - - - - No download URL found for the specified asset. - No download URL found for the specified asset. - - - - Your version is already up to date! - Your version is already up to date! - - - - Update Available - Update Available - - - - Update Channel - Update Channel - - - - Current Version - Current Version - - - - Latest Version - Latest Version - - - - Do you want to update? - Do you want to update? - - - - Show Changelog - Show Changelog - - - - Check for Updates at Startup - Check for Updates at Startup - - - - Update - Update - - - - No - No - - - - Hide Changelog - Hide Changelog - - - - Changes - Changes - - - - Network error occurred while trying to access the URL - Network error occurred while trying to access the URL - - - - Download Complete - Download Complete - - - - The update has been downloaded, press OK to install. - The update has been downloaded, press OK to install. - - - - Failed to save the update file at - Failed to save the update file at - - - - Starting Update... - Starting Update... - - - - Failed to create the update script file - Failed to create the update script file - - - - GameListUtils - - - B - B - - - - KB - KB - - - - MB - MB - - - - GB - GB - - - - TB - TB - - - \ No newline at end of file diff --git a/src/qt_gui/translations/en_US.ts b/src/qt_gui/translations/en_US.ts new file mode 100644 index 000000000..28d31b200 --- /dev/null +++ b/src/qt_gui/translations/en_US.ts @@ -0,0 +1,2089 @@ + + + + + + AboutDialog + + About shadPS4 + About 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. + + + + CheatsPatches + + Cheats / Patches for + Cheats / Patches for + + + 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:\n + 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:\n + + + 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 + + + No Cheats found for this game in this version of the selected repository,try another repository or a different version of the game. + 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 + + + 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. + 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 + + + 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. If the patch does not appear, it may be that it does not exist for the specific serial and version of the game. + 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. If the patch does not appear, it may be that it does not exist for the specific serial and version of the game. + + + Failed to parse JSON data from HTML. + Failed to parse JSON data from HTML. + + + Failed to retrieve HTML page. + Failed to retrieve HTML page. + + + The game is in version: %1 + The game is in version: %1 + + + The downloaded patch only works on version: %1 + The downloaded patch only works on version: %1 + + + You may need to update your game. + You may need to update your game. + + + Incompatibility Notice + Incompatibility Notice + + + 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: + + + Can't apply cheats before the game is started + Can't apply cheats before the game is started. + + + Close + Close + + + + CheckUpdate + + Auto Updater + Auto Updater + + + Error + Error + + + Network error: + Network error: + + + The Auto Updater allows up to 60 update checks per hour.\nYou have reached this limit. Please try again later. + The Auto Updater allows up to 60 update checks per hour.\nYou have reached this limit. Please try again later. + + + Failed to parse update information. + Failed to parse update information. + + + No pre-releases found. + No pre-releases found. + + + Invalid release data. + Invalid release data. + + + No download URL found for the specified asset. + No download URL found for the specified asset. + + + Your version is already up to date! + Your version is already up to date! + + + Update Available + Update Available + + + Update Channel + Update Channel + + + Current Version + Current Version + + + Latest Version + Latest Version + + + Do you want to update? + Do you want to update? + + + Show Changelog + Show Changelog + + + Check for Updates at Startup + Check for Updates at Startup + + + Update + Update + + + No + No + + + Hide Changelog + Hide Changelog + + + Changes + Changes + + + Network error occurred while trying to access the URL + Network error occurred while trying to access the URL + + + Download Complete + Download Complete + + + The update has been downloaded, press OK to install. + The update has been downloaded, press OK to install. + + + Failed to save the update file at + Failed to save the update file at + + + Starting Update... + Starting Update... + + + Failed to create the update script file + Failed to create the update script file + + + + CompatibilityInfoClass + + Fetching compatibility data, please wait + Fetching compatibility data, please wait + + + Cancel + Cancel + + + Loading... + Loading... + + + Error + Error + + + Unable to update compatibility data! Try again later. + Unable to update compatibility data! Try again later. + + + Unable to open compatibility_data.json for writing. + Unable to open compatibility_data.json for writing. + + + Unknown + Unknown + + + Nothing + Nothing + + + Boots + Boots + + + Menus + Menus + + + Ingame + Ingame + + + Playable + Playable + + + + ControlSettings + + Configure Controls + + + + D-Pad + + + + Up + + + + Left + Left + + + Right + Right + + + Down + + + + Left Stick Deadzone (def:2 max:127) + + + + Left Deadzone + + + + Left Stick + + + + Config Selection + + + + Common Config + + + + Use per-game configs + + + + L1 / LB + + + + L2 / LT + + + + Back + + + + R1 / RB + + + + R2 / RT + + + + L3 + + + + Options / Start + + + + R3 + + + + Face Buttons + + + + Triangle / Y + + + + Square / X + + + + Circle / B + + + + Cross / A + + + + Right Stick Deadzone (def:2, max:127) + + + + Right Deadzone + + + + Right Stick + + + + Color Adjustment + + + + R: + + + + G: + + + + B: + + + + Override Lightbar Color + + + + Override Color + + + + Unable to Save + + + + Cannot bind axis values more than once + + + + Save + Save + + + Apply + Apply + + + Restore Defaults + Restore Defaults + + + Cancel + Cancel + + + + EditorDialog + + Edit Keyboard + Mouse and Controller input bindings + + + + Use Per-Game configs + + + + Error + Error + + + Could not open the file for reading + + + + Could not open the file for writing + + + + Save Changes + + + + Do you want to save changes? + + + + Help + Help + + + Do you want to reset your custom default config to the original default config? + + + + Do you want to reset this config to your custom default config? + + + + Reset to Default + + + + + 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 + + + Directory to install DLC + + + + + GameListFrame + + Icon + Icon + + + Name + Name + + + Serial + Serial + + + Compatibility + Compatibility + + + Region + Region + + + Firmware + Firmware + + + Size + Size + + + Version + Version + + + Path + Path + + + Play Time + Play Time + + + Never Played + Never Played + + + h + h + + + m + m + + + s + s + + + Compatibility is untested + Compatibility is untested + + + Game does not initialize properly / crashes the emulator + Game does not initialize properly / crashes the emulator + + + Game boots, but only displays a blank screen + Game boots, but only displays a blank screen + + + Game displays an image but does not go past the menu + Game displays an image but does not go past the menu + + + Game has game-breaking glitches or unplayable performance + Game has game-breaking glitches or unplayable performance + + + Game can be completed with playable performance and no major glitches + Game can be completed with playable performance and no major glitches + + + Click to see details on github + Click to see details on GitHub + + + Last updated + Last updated + + + + GameListUtils + + B + B + + + KB + KB + + + MB + MB + + + GB + GB + + + TB + TB + + + + GuiContextMenus + + Create Shortcut + Create Shortcut + + + Cheats / Patches + Cheats / Patches + + + SFO Viewer + SFO Viewer + + + Trophy Viewer + Trophy Viewer + + + Open Folder... + Open Folder... + + + Open Game Folder + Open Game Folder + + + Open Save Data Folder + Open Save Data Folder + + + Open Log Folder + Open Log Folder + + + Copy info... + Copy info... + + + Copy Name + Copy Name + + + Copy Serial + Copy Serial + + + Copy Version + Copy Version + + + Copy Size + Copy Size + + + Copy All + Copy All + + + Delete... + Delete... + + + Delete Game + Delete Game + + + Delete Update + Delete Update + + + Delete DLC + Delete DLC + + + Delete Trophy + Delete Trophy + + + Compatibility... + Compatibility... + + + Update database + Update database + + + View report + View report + + + Submit a report + Submit a report + + + Shortcut creation + Shortcut creation + + + Shortcut created successfully! + Shortcut created successfully! + + + Error + Error + + + Error creating shortcut! + Error creating shortcut! + + + Game + Game + + + This game has no update to delete! + This game has no update to delete! + + + Update + Update + + + This game has no DLC to delete! + This game has no DLC to delete! + + + DLC + DLC + + + Delete %1 + Delete %1 + + + Are you sure you want to delete %1's %2 directory? + Are you sure you want to delete %1's %2 directory? + + + Open Update Folder + + + + Delete Save Data + + + + This game has no update folder to open! + + + + No log file found for this game! + + + + Failed to convert icon. + + + + This game has no save data to delete! + + + + This game has no saved trophies to delete! + + + + Save Data + + + + Trophy + Trophy + + + SFO Viewer for + + + + + HelpDialog + + Quickstart + + + + FAQ + + + + Syntax + + + + Special Bindings + + + + Keybindings + + + + + KBMSettings + + Configure Controls + + + + D-Pad + + + + Up + + + + unmapped + + + + Left + Left + + + Right + Right + + + Down + + + + Left Analog Halfmode + + + + hold to move left stick at half-speed + + + + Left Stick + + + + Config Selection + + + + Common Config + + + + Use per-game configs + + + + L1 + + + + L2 + + + + Text Editor + + + + Help + Help + + + R1 + + + + R2 + + + + L3 + + + + Touchpad Click + + + + Mouse to Joystick + + + + *press F7 ingame to activate + + + + R3 + + + + Options + + + + Mouse Movement Parameters + + + + note: click Help Button/Special Keybindings for more information + + + + Face Buttons + + + + Triangle + + + + Square + + + + Circle + + + + Cross + + + + Right Analog Halfmode + + + + hold to move right stick at half-speed + + + + Right Stick + + + + Speed Offset (def 0.125): + + + + Copy from Common Config + + + + Deadzone Offset (def 0.50): + + + + Speed Multiplier (def 1.0): + + + + Common Config Selected + + + + This button copies mappings from the Common Config to the currently selected profile, and cannot be used when the currently selected profile is the Common Config. + + + + Copy values from Common Config + + + + Do you want to overwrite existing mappings with the mappings from the Common Config? + + + + Unable to Save + + + + Cannot bind any unique input more than once + + + + Press a key + + + + Cannot set mapping + + + + Mousewheel cannot be mapped to stick outputs + + + + Save + Save + + + Apply + Apply + + + Restore Defaults + Restore Defaults + + + Cancel + Cancel + + + + MainWindow + + Open/Add Elf Folder + Open/Add Elf Folder + + + Boot Game + Boot Game + + + Check for Updates + Check for Updates + + + About shadPS4 + About shadPS4 + + + Configure... + Configure... + + + Recent Games + Recent Games + + + Open shadPS4 Folder + Open shadPS4 Folder + + + 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 + + + Download Cheats/Patches + Download Cheats / Patches + + + Dump Game List + Dump Game List + + + Trophy Viewer + Trophy Viewer + + + No games found. Please add your games to your library first. + No games found. Please add your games to your library first. + + + Search... + Search... + + + File + File + + + View + View + + + Game List Icons + Game List Icons + + + Game List Mode + Game List Mode + + + Settings + Settings + + + Utils + Utils + + + Themes + Themes + + + Help + Help + + + Dark + Dark + + + Light + Light + + + Green + Green + + + Blue + Blue + + + Violet + Violet + + + toolBar + toolBar + + + Game List + Game List + + + * 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: + + + 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! + + + Run Game + + + + Eboot.bin file not found + + + + Game is already running! + + + + shadPS4 + shadPS4 + + + Play + + + + Pause + + + + Stop + + + + Restart + + + + Full Screen + + + + Controllers + + + + Keyboard + + + + Refresh List + + + + Resume + + + + Show Labels Under Icons + + + + + SettingsDialog + + Settings + Settings + + + General + General + + + System + System + + + Console Language + Console Language + + + Emulator Language + Emulator Language + + + Emulator + Emulator + + + Enable Separate Update Folder + Enable Separate Update Folder + + + Default tab when opening settings + Default tab when opening settings + + + Show Game Size In List + Show Game Size In List + + + Show Splash + Show Splash + + + Enable Discord Rich Presence + Enable Discord Rich Presence + + + Username + Username + + + Trophy Key + Trophy Key + + + Trophy + Trophy + + + Open the custom trophy images/sounds folder + Open the custom trophy images/sounds folder + + + Logger + Logger + + + Log Type + Log Type + + + Log Filter + Log Filter + + + Open Log Location + Open Log Location + + + Input + Input + + + Cursor + Cursor + + + Hide Cursor + Hide Cursor + + + Hide Cursor Idle Timeout + Hide Cursor Idle Timeout + + + s + s + + + Controller + Controller + + + Back Button Behavior + Back Button Behavior + + + Graphics + Graphics + + + GUI + GUI + + + User + User + + + Graphics Device + Graphics Device + + + Vblank Divider + Vblank Divider + + + Advanced + Advanced + + + Enable Shaders Dumping + Enable Shaders Dumping + + + Enable NULL GPU + Enable NULL GPU + + + Enable HDR + Enable HDR + + + Paths + Paths + + + Game Folders + Game Folders + + + Add... + Add... + + + Remove + Remove + + + 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 + + + Enable Crash Diagnostics + Enable Crash Diagnostics + + + Collect Shaders + Collect Shaders + + + Copy GPU Buffers + Copy GPU Buffers + + + Host Debug Markers + Host Debug Markers + + + Guest Debug Markers + Guest Debug Markers + + + Update + Update + + + Check for Updates at Startup + Check for Updates at Startup + + + Always Show Changelog + Always Show Changelog + + + Update Channel + Update Channel + + + Check for Updates + Check for Updates + + + GUI Settings + GUI Settings + + + Title Music + Title Music + + + Disable Trophy Notification + Disable Trophy Notification + + + Background Image + Background Image + + + Show Background Image + Show Background Image + + + Opacity + Opacity + + + Play title music + Play title music + + + Update Compatibility Database On Startup + Update Compatibility Database On Startup + + + Game Compatibility + Game Compatibility + + + Display Compatibility Data + Display Compatibility Data + + + Update Compatibility Database + Update Compatibility Database + + + Volume + Volume + + + Save + Save + + + Apply + Apply + + + Restore Defaults + Restore Defaults + + + Close + Close + + + Point your mouse at an option to display its description. + Point your mouse at an option to display its description. + + + Console Language:\nSets the language that the PS4 game uses.\nIt's recommended to set this to a language the game supports, which will vary by region. + Console Language:\nSets the language that the PS4 game uses.\nIt's recommended to set this to a language the game supports, which will vary by region. + + + Emulator Language:\nSets the language of the emulator's user interface. + Emulator Language:\nSets the language of the emulator's user interface. + + + Enable Separate Update Folder:\nEnables installing game updates into a separate folder for easy management.\nThis can be manually created by adding the extracted update to the game folder with the name "CUSA00000-UPDATE" where the CUSA ID matches the game's ID. + Enable Separate Update Folder:\nEnables installing game updates into a separate folder for easy management.\nThis can be manually created by adding the extracted update to the game folder with the name "CUSA00000-UPDATE" where the CUSA ID matches the game's ID. + + + Show Splash Screen:\nShows the game's splash screen (a special image) while the game is starting. + Show Splash Screen:\nShows the game's splash screen (a special image) while the game is starting. + + + Enable Discord Rich Presence:\nDisplays the emulator icon and relevant information on your Discord profile. + Enable Discord Rich Presence:\nDisplays the emulator icon and relevant information on your Discord profile. + + + Username:\nSets the PS4's account username, which may be displayed by some games. + Username:\nSets the PS4's account username, which may be displayed by some games. + + + Trophy Key:\nKey used to decrypt trophies. Must be obtained from your jailbroken console.\nMust contain only hex characters. + Trophy Key:\nKey used to decrypt trophies. Must be obtained from your jailbroken console.\nMust contain only hex characters. + + + Log Type:\nSets whether to synchronize the output of the log window for performance. May have adverse effects on emulation. + Log Type:\nSets whether to synchronize the output of the log window for performance. May have adverse effects on emulation. + + + Log Filter:\nFilters the log to only print specific information.\nExamples: "Core:Trace" "Lib.Pad:Debug Common.Filesystem:Error" "*:Critical"\nLevels: Trace, Debug, Info, Warning, Error, Critical - in this order, a specific level silences all levels preceding it in the list and logs every level after it. + Log Filter:\nFilters the log to only print specific information.\nExamples: "Core:Trace" "Lib.Pad:Debug Common.Filesystem:Error" "*:Critical"\nLevels: Trace, Debug, Info, Warning, Error, Critical - in this order, a specific level silences all levels preceding it in the list and logs every level after it. + + + Update:\nRelease: Official versions released every month that may be very outdated, but are more reliable and tested.\nNightly: Development versions that have all the latest features and fixes, but may contain bugs and are less stable. + Update:\nRelease: Official versions released every month that may be very outdated, but are more reliable and tested.\nNightly: Development versions that have all the latest features and fixes, but may contain bugs and are less stable. + + + Background Image:\nControl the opacity of the game background image. + Background Image:\nControl the opacity of the game background image. + + + Play Title Music:\nIf a game supports it, enable playing special music when selecting the game in the GUI. + Play Title Music:\nIf a game supports it, enable playing special music when selecting the game in the GUI. + + + Disable Trophy Pop-ups:\nDisable in-game trophy notifications. Trophy progress can still be tracked using the Trophy Viewer (right-click the game in the main window). + Disable Trophy Pop-ups:\nDisable in-game trophy notifications. Trophy progress can still be tracked using the Trophy Viewer (right-click the game in the main window). + + + Hide Cursor:\nChoose when the cursor will disappear:\nNever: You will always see the mouse.\nidle: Set a time for it to disappear after being idle.\nAlways: you will never see the mouse. + Hide Cursor:\nChoose when the cursor will disappear:\nNever: You will always see the mouse.\nidle: Set a time for it to disappear after being idle.\nAlways: you will never see the mouse. + + + Hide Idle Cursor Timeout:\nThe duration (seconds) after which the cursor that has been idle hides itself. + Hide Idle Cursor Timeout:\nThe duration (seconds) after which the cursor that has been idle hides itself. + + + Back Button Behavior:\nSets the controller's back button to emulate tapping the specified position on the PS4 touchpad. + Back Button Behavior:\nSets the controller's back button to emulate tapping the specified position on the PS4 touchpad. + + + Display Compatibility Data:\nDisplays game compatibility information in table view. Enable "Update Compatibility On Startup" to get up-to-date information. + Display Compatibility Data:\nDisplays game compatibility information in table view. Enable "Update Compatibility On Startup" to get up-to-date information. + + + Update Compatibility On Startup:\nAutomatically update the compatibility database when shadPS4 starts. + Update Compatibility On Startup:\nAutomatically update the compatibility database when shadPS4 starts. + + + Update Compatibility Database:\nImmediately update the compatibility database. + Update Compatibility Database:\nImmediately update the compatibility database. + + + Never + Never + + + Idle + Idle + + + Always + Always + + + Touchpad Left + Touchpad Left + + + Touchpad Right + Touchpad Right + + + Touchpad Center + Touchpad Center + + + None + None + + + Graphics Device:\nOn multiple GPU systems, select the GPU the emulator will use from the drop down list,\nor select "Auto Select" to automatically determine it. + Graphics Device:\nOn multiple GPU systems, select the GPU the emulator will use from the drop down list,\nor select "Auto Select" to automatically determine it. + + + Width/Height:\nSets the size of the emulator window at launch, which can be resized during gameplay.\nThis is different from the in-game resolution. + Width/Height:\nSets the size of the emulator window at launch, which can be resized during gameplay.\nThis is different from the in-game resolution. + + + Vblank Divider:\nThe frame rate at which the emulator refreshes at is multiplied by this number. Changing this may have adverse effects, such as increasing the game speed, or breaking critical game functionality that does not expect this to change! + Vblank Divider:\nThe frame rate at which the emulator refreshes at is multiplied by this number. Changing this may have adverse effects, such as increasing the game speed, or breaking critical game functionality that does not expect this to change! + + + Enable Shaders Dumping:\nFor the sake of technical debugging, saves the games shaders to a folder as they render. + Enable Shaders Dumping:\nFor the sake of technical debugging, saves the games shaders to a folder as they render. + + + Enable Null GPU:\nFor the sake of technical debugging, disables game rendering as if there were no graphics card. + Enable Null GPU:\nFor the sake of technical debugging, disables game rendering as if there were no graphics card. + + + Enable HDR:\nEnables HDR in games that support it.\nYour monitor must have support for the BT2020 PQ color space and the RGB10A2 swapchain format. + Enable HDR:\nEnables HDR in games that support it.\nYour monitor must have support for the BT2020 PQ color space and the RGB10A2 swapchain format. + + + Game Folders:\nThe list of folders to check for installed games. + Game Folders:\nThe list of folders to check for installed games. + + + Add:\nAdd a folder to the list. + Add:\nAdd a folder to the list. + + + Remove:\nRemove a folder from the list. + Remove:\nRemove a folder from the list. + + + Enable Debug Dumping:\nSaves the import and export symbols and file header information of the currently running PS4 program to a directory. + Enable Debug Dumping:\nSaves the import and export symbols and file header information of the currently running PS4 program to a directory. + + + Enable Vulkan Validation Layers:\nEnables a system that validates the state of the Vulkan renderer and logs information about its internal state.\nThis will reduce performance and likely change the behavior of emulation. + Enable Vulkan Validation Layers:\nEnables a system that validates the state of the Vulkan renderer and logs information about its internal state.\nThis will reduce performance and likely change the behavior of emulation. + + + Enable Vulkan Synchronization Validation:\nEnables a system that validates the timing of Vulkan rendering tasks.\nThis will reduce performance and likely change the behavior of emulation. + Enable Vulkan Synchronization Validation:\nEnables a system that validates the timing of Vulkan rendering tasks.\nThis will reduce performance and likely change the behavior of emulation. + + + Enable RenderDoc Debugging:\nIf enabled, the emulator will provide compatibility with Renderdoc to allow capture and analysis of the currently rendered frame. + Enable RenderDoc Debugging:\nIf enabled, the emulator will provide compatibility with Renderdoc to allow capture and analysis of the currently rendered frame. + + + Collect Shaders:\nYou need this enabled to edit shaders with the debug menu (Ctrl + F10). + Collect Shaders:\nYou need this enabled to edit shaders with the debug menu (Ctrl + F10). + + + Crash Diagnostics:\nCreates a .yaml file with info about the Vulkan state at the time of crashing.\nUseful for debugging 'Device lost' errors. If you have this enabled, you should enable Host AND Guest Debug Markers.\nDoes not work on Intel GPUs.\nYou need Vulkan Validation Layers enabled and the Vulkan SDK for this to work. + Crash Diagnostics:\nCreates a .yaml file with info about the Vulkan state at the time of crashing.\nUseful for debugging 'Device lost' errors. If you have this enabled, you should enable Host AND Guest Debug Markers.\nDoes not work on Intel GPUs.\nYou need Vulkan Validation Layers enabled and the Vulkan SDK for this to work. + + + Copy GPU Buffers:\nGets around race conditions involving GPU submits.\nMay or may not help with PM4 type 0 crashes. + Copy GPU Buffers:\nGets around race conditions involving GPU submits.\nMay or may not help with PM4 type 0 crashes. + + + Host Debug Markers:\nInserts emulator-side information like markers for specific AMDGPU commands around Vulkan commands, as well as giving resources debug names.\nIf you have this enabled, you should enable Crash Diagnostics.\nUseful for programs like RenderDoc. + Host Debug Markers:\nInserts emulator-side information like markers for specific AMDGPU commands around Vulkan commands, as well as giving resources debug names.\nIf you have this enabled, you should enable Crash Diagnostics.\nUseful for programs like RenderDoc. + + + Guest Debug Markers:\nInserts any debug markers the game itself has added to the command buffer.\nIf you have this enabled, you should enable Crash Diagnostics.\nUseful for programs like RenderDoc. + Guest Debug Markers:\nInserts any debug markers the game itself has added to the command buffer.\nIf you have this enabled, you should enable Crash Diagnostics.\nUseful for programs like RenderDoc. + + + Save Data Path:\nThe folder where game save data will be saved. + Save Data Path:\nThe folder where game save data will be saved. + + + Browse:\nBrowse for a folder to set as the save data path. + Browse:\nBrowse for a folder to set as the save data path. + + + Release + + + + Nightly + + + + Set the volume of the background music. + + + + Enable Motion Controls + + + + Save Data Path + + + + Browse + Browse + + + async + + + + sync + + + + Auto Select + + + + Directory to install games + Directory to install games + + + Directory to save data + + + + Video + + + + Display Mode + + + + Windowed + + + + Fullscreen + + + + Fullscreen (Borderless) + + + + Window Size + + + + W: + + + + H: + + + + Separate Log Files + + + + Separate Log Files:\nWrites a separate logfile for each game. + + + + Trophy Notification Position + Trophy Notification Position + + + Left + Left + + + Right + Right + + + Top + Top + + + Bottom + Bottom + + + Notification Duration + Notification Duration + + + Portable User Folder + + + + Create Portable User Folder from Common User Folder + + + + Portable user folder:\nStores shadPS4 settings and data that will be applied only to the shadPS4 build located in the current folder. Restart the app after creating the portable user folder to begin using it. + + + + Cannot create portable user folder + + + + %1 already exists + + + + Portable user folder created + + + + %1 successfully created. + + + + Open the custom trophy images/sounds folder:\nYou can add custom images to the trophies and an audio.\nAdd the files to custom_trophy with the following names:\ntrophy.wav OR trophy.mp3, bronze.png, gold.png, platinum.png, silver.png\nNote: The sound will only work in QT versions. + + + + + TrophyViewer + + Trophy Viewer + Trophy Viewer + + + Select Game: + + + + Progress + + + + Show Earned Trophies + + + + Show Not Earned Trophies + + + + Show Hidden Trophies + + + + diff --git a/src/qt_gui/translations/es_ES.ts b/src/qt_gui/translations/es_ES.ts index 096e104e3..bbd49f61d 100644 --- a/src/qt_gui/translations/es_ES.ts +++ b/src/qt_gui/translations/es_ES.ts @@ -1,1664 +1,2089 @@ + - - - - AboutDialog - - - About shadPS4 - Acerca de shadPS4 - - - - shadPS4 - shadPS4 - - - - 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. - Este software no debe utilizarse para jugar juegos que hayas obtenido ilegalmente. - - - - ElfViewer - - - Open Folder - Abrir carpeta - - - - GameInfoClass - - - Loading game list, please wait :3 - Cargando lista de juegos, por favor espera :3 - - - - Cancel - Cancelar - - - - Loading... - Cargando... - - - - InstallDirSelect - - - shadPS4 - Choose directory - shadPS4 - Elegir carpeta - - - - Select which directory you want to install to. - Select which directory you want to install to. - - - - GameInstallDialog - - - shadPS4 - Choose directory - shadPS4 - Elegir carpeta - - - - Directory to install games - Carpeta para instalar juegos - - - - Browse - Buscar - - - - Error - Error - - - - 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. - - - - GuiContextMenus - - - Create Shortcut - Crear acceso directo - - - - Cheats / Patches - Trucos / Parches - - - - SFO Viewer - Vista SFO - - - - Trophy Viewer - Ver trofeos - - - - Open Folder... - Abrir Carpeta... - - - - Open Game Folder - Abrir Carpeta del Juego - - - - Open Save Data Folder - Abrir Carpeta de Datos Guardados - - - - Open Log Folder - Abrir Carpeta de Registros - - - - Copy info... - Copiar información... - - - - Copy Name - Copiar nombre - - - - Copy Serial - Copiar número de serie - - - - Copy All - Copiar todo - - - - Delete... - Delete... - - - - Delete Game - Delete Game - - - - Delete Update - Delete Update - - - - Delete DLC - Delete DLC - - - - Compatibility... - Compatibility... - - - - Update database - Update database - - - - View report - View report - - - - Submit a report - Submit a report - - - - Shortcut creation - Acceso directo creado - - - - Shortcut created successfully! - ¡Acceso directo creado con éxito! - - - - Error - Error - - - - Error creating shortcut! - ¡Error al crear el acceso directo! - - - - Install PKG - Instalar PKG - - - - Game - Game - - - - requiresEnableSeparateUpdateFolder_MSG - This feature requires the 'Enable Separate Update Folder' config option to work. If you want to use this feature, please enable it. - - - - This game has no update to delete! - This game has no update to delete! - - - - Update - Update - - - - This game has no DLC to delete! - This game has no DLC to delete! - - - - DLC - DLC - - - - Delete %1 - Delete %1 - - - - Are you sure you want to delete %1's %2 directory? - Are you sure you want to delete %1's %2 directory? - - - - MainWindow - - - Open/Add Elf Folder - Abrir/Agregar carpeta Elf - - - - Install Packages (PKG) - Instalar paquetes (PKG) - - - - Boot Game - Iniciar juego - - - - Check for Updates - Buscar actualizaciones - - - - About shadPS4 - Acerca de shadPS4 - - - - Configure... - Configurar... - - - - Install application from a .pkg file - Instalar aplicación desde un archivo .pkg - - - - Recent Games - Juegos recientes - - - - Exit - Salir - - - - Exit shadPS4 - Salir de shadPS4 - - - - Exit the application. - Salir de la aplicación. - - - - Show Game List - Mostrar lista de juegos - - - - Game List Refresh - Actualizar lista de juegos - - - - Tiny - Muy pequeño - - - - Small - Pequeño - - - - Medium - Mediano - - - - Large - Grande - - - - List View - Vista de lista - - - - Grid View - Vista de cuadrícula - - - - Elf Viewer - Vista Elf - - - - Game Install Directory - Carpeta de instalación de los juegos - - - - Download Cheats/Patches - Descargar Trucos / Parches - - - - Dump Game List - Volcar lista de juegos - - - - PKG Viewer - Vista PKG - - - - Search... - Buscar... - - - - File - Archivo - - - - View - Vista - - - - Game List Icons - Iconos de los juegos - - - - Game List Mode - Tipo de lista - - - - Settings - Configuración - - - - Utils - Utilidades - - - - Themes - Temas - - - - Help - Ayuda - - - - Dark - Oscuro - - - - Light - Claro - - - - Green - Verde - - - - Blue - Azul - - - - Violet - Violeta - - - - toolBar - Barra de herramientas - - - - PKGViewer - - - Open Folder - Abrir carpeta - - - - TrophyViewer - - - Trophy Viewer - Vista de trofeos - - - - SettingsDialog - - - Settings - Configuración - - - - General - General - - - - System - Sistema - - - - Console Language - Idioma de la consola - - - - Emulator Language - Idioma del emulador - - - - Emulator - Emulador - - - - Enable Fullscreen - Habilitar pantalla completa - - - - Enable Separate Update Folder - Enable Separate Update Folder - - - - Show Splash - Mostrar splash - - - - Is PS4 Pro - Modo PS4 Pro - - - - Enable Discord Rich Presence - Habilitar Discord Rich Presence - - - - Username - Nombre de usuario - - - - Trophy Key - Trophy Key - - - - Trophy - Trophy - - - - Logger - Registro - - - - Log Type - Tipo de registro - - - - Log Filter - Filtro de registro - - - - Input - Entrada - - - - Cursor - Cursor - - - - Hide Cursor - Ocultar cursor - - - - Hide Cursor Idle Timeout - Tiempo de espera para ocultar cursor inactivo - - - - s - s - - - - Controller - Controlador - - - - Back Button Behavior - Comportamiento del botón de retroceso - - - - Graphics - Gráficos - - - - Graphics Device - Dispositivo gráfico - - - - Width - Ancho - - - - Height - Alto - - - - Vblank Divider - Divisor de Vblank - - - - Advanced - Avanzado - - - - Enable Shaders Dumping - Habilitar volcado de shaders - - - - Enable NULL GPU - Habilitar GPU NULL - - - - Paths - Rutas - - - - Game Folders - Carpetas de juego - - - - Add... - Añadir... - - - - Remove - Eliminar - - - - Debug - Depuración - - - - Enable Debug Dumping - Habilitar volcado de depuración - - - - Enable Vulkan Validation Layers - Habilitar capas de validación de Vulkan - - - - Enable Vulkan Synchronization Validation - Habilitar validación de sincronización de Vulkan - - - - Enable RenderDoc Debugging - Habilitar depuración de RenderDoc - - - - Update - Actualización - - - - Check for Updates at Startup - Buscar actualizaciones al iniciar - - - - Update Channel - Canal de Actualización - - - - Check for Updates - Verificar actualizaciones - - - - GUI Settings - Configuraciones de la Interfaz - - - - Disable Trophy Pop-ups - Disable Trophy Pop-ups - - - - Play title music - Reproducir la música de apertura - - - - Update Compatibility Database On Startup - Update Compatibility Database On Startup - - - - Game Compatibility - Game Compatibility - - - - Display Compatibility Data - Display Compatibility Data - - - - Update Compatibility Database - Update Compatibility Database - - - - Volume - Volumen - - - - Audio Backend - Audio Backend - - - - MainWindow - - - Game List - Lista de juegos - - - - * 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 han sido descargados para todos los juegos. - - - - 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! - ¡Actualización detectada! - - - - PKG and Game versions match: - Las versiones de PKG y del juego coinciden: - - - - Would you like to overwrite? - ¿Desea sobrescribir? - - - - PKG Version %1 is older than installed version: - La versión de PKG %1 es más antigua que la versión instalada: - - - - Game is installed: - El juego está instalado: - - - - Would you like to install Patch: - ¿Desea instalar la actualización: - - - - DLC Installation - Instalación de DLC - - - - Would you like to install DLC: %1? - ¿Desea instalar el DLC: %1? - - - - DLC already installed: - DLC ya instalado: - - - - Game already installed - Juego ya instalado - - - - 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 parece no ser un archivo PKG válido - - - - CheatsPatches - - - Cheats / Patches for - Cheats / Patches for - - - - 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: - Número de 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 una vez descargados. - - - - 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 - Parches - - - - 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 el número de 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. Si el parche no aparece, puede ser que no exista para el número de serie y versión específicos del juego. - - - - 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. - - - - The game is in version: %1 - El juego está en la versión: %1 - - - - The downloaded patch only works on version: %1 - El parche descargado solo funciona en la versión: %1 - - - - You may need to update your game. - Puede que necesites actualizar tu juego. - - - - Incompatibility Notice - Aviso de incompatibilidad - - - - 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: - - - - Can't apply cheats before the game is started - No se pueden aplicar trucos antes de que se inicie el juego. - - - - SettingsDialog - - - Save - Guardar - - - - Apply - Aplicar - - - - Restore Defaults - Restaurar Valores Predeterminados - - - - Close - Cerrar - - - - Point your mouse at an option to display its description. - Coloque el mouse sobre una opción para mostrar su descripción. - - - - consoleLanguageGroupBox - Idioma de la Consola:\nEstablece el idioma que utiliza el juego de PS4.\nSe recomienda configurarlo a un idioma que el juego soporte, lo cual varía por región. - - - - emulatorLanguageGroupBox - Idioma del Emulador:\nConfigura el idioma de la interfaz de usuario del emulador. - - - - fullscreenCheckBox - Habilitar Pantalla Completa:\nColoca automáticamente la ventana del juego en modo de pantalla completa.\nEsto se puede alternar presionando la tecla F11. - - - - separateUpdatesCheckBox - Enable Separate Update Folder:\nEnables installing game updates into a separate folder for easy management. - - - - showSplashCheckBox - Mostrar Pantalla de Inicio:\nMuestra la pantalla de inicio del juego (una imagen especial) mientras el juego se está iniciando. - - - - ps4proCheckBox - Es PS4 Pro:\nHace que el emulador actúe como una PS4 PRO, lo que puede habilitar funciones especiales en los juegos que lo admitan. - - - - discordRPCCheckbox - Habilitar Discord Rich Presence:\nMuestra el ícono del emulador y la información relevante en tu perfil de Discord. - - - - userName - Nombre de Usuario:\nEstablece el nombre de usuario de la cuenta de PS4, que puede ser mostrado por algunos juegos. - - - - TrophyKey - Trophy Key:\nKey used to decrypt trophies. Must be obtained from your jailbroken console.\nMust contain only hex characters. - - - - logTypeGroupBox - Tipo de Registro:\nEstablece si sincronizar la salida de la ventana de registro para mejorar el rendimiento. Puede tener efectos adversos en la emulación. - - - - logFilter - Filtro de Registro:\nFiltra el registro para imprimir solo información específica.\nEjemplos: "Core:Trace" "Lib.Pad:Debug Common.Filesystem:Error" "*:Critical" Niveles: Trace, Debug, Info, Warning, Error, Critical - en este orden, un nivel específico silencia todos los niveles anteriores en la lista y registra cada nivel posterior. - - - - updaterGroupBox - Actualización:\nRelease: Versiones oficiales lanzadas cada mes que pueden estar muy desactualizadas, pero son más confiables y están probadas.\nNightly: Versiones de desarrollo que tienen todas las últimas funciones y correcciones, pero pueden contener errores y son menos estables. - - - - GUIgroupBox - Reproducir Música del Título:\nSi un juego lo admite, habilita la reproducción de música especial al seleccionar el juego en la interfaz gráfica. - - - - disableTrophycheckBox - Disable Trophy Pop-ups:\nDisable in-game trophy notifications. Trophy progress can still be tracked using the Trophy Viewer (right-click the game in the main window). - - - - hideCursorGroupBox - Ocultar Cursor:\nElija cuándo desaparecerá el cursor:\nNunca: Siempre verá el mouse.\nInactivo: Establezca un tiempo para que desaparezca después de estar inactivo.\nSiempre: nunca verá el mouse. - - - - idleTimeoutGroupBox - Establezca un tiempo para que el mouse desaparezca después de estar inactivo. - - - - backButtonBehaviorGroupBox - Comportamiento del Botón Atrás:\nEstablece el botón atrás del controlador para emular el toque en la posición especificada en el touchpad del PS4. - - - - enableCompatibilityCheckBox - Display Compatibility Data:\nDisplays game compatibility information in table view. Enable "Update Compatibility On Startup" to get up-to-date information. - - - - checkCompatibilityOnStartupCheckBox - Update Compatibility On Startup:\nAutomatically update the compatibility database when shadPS4 starts. - - - - updateCompatibilityButton - Update Compatibility Database:\nImmediately update the compatibility database. - - - - Never - Nunca - - - - Idle - Inactivo - - - - Always - Siempre - - - - Touchpad Left - Touchpad Izquierda - - - - Touchpad Right - Touchpad Derecha - - - - Touchpad Center - Centro del Touchpad - - - - None - Ninguno - - - - graphicsAdapterGroupBox - Dispositivo Gráfico:\nEn sistemas con múltiples GPU, selecciona la GPU que el emulador utilizará de la lista desplegable,\o selecciona "Auto Select" para determinarla automáticamente. - - - - resolutionLayout - Anchura/Altura:\nEstablece el tamaño de la ventana del emulador al iniciar, que se puede redimensionar durante el juego.\nEsto es diferente de la resolución en el juego. - - - - heightDivider - Divisor de Vblank:\nLa tasa de cuadros a la que se refresca el emulador se multiplica por este número. Cambiar esto puede tener efectos adversos, como aumentar la velocidad del juego, o romper la funcionalidad crítica del juego que no espera que esto cambie. - - - - dumpShadersCheckBox - Habilitar la Volcadura de Sombras:\nPor el bien de la depuración técnica, guarda las sombras del juego en una carpeta mientras se renderizan. - - - - nullGpuCheckBox - Habilitar GPU Nula:\nPor el bien de la depuración técnica, desactiva el renderizado del juego como si no hubiera tarjeta gráfica. - - - - gameFoldersBox - Carpetas de Juegos:\nLa lista de carpetas para verificar los juegos instalados. - - - - addFolderButton - Añadir:\nAgregar una carpeta a la lista. - - - - removeFolderButton - Eliminar:\nEliminar una carpeta de la lista. - - - - debugDump - Habilitar la Volcadura de Depuración:\nGuarda los símbolos de importación y exportación y la información del encabezado del archivo del programa de PS4 que se está ejecutando actualmente en un directorio. - - - - vkValidationCheckBox - Habilitar Capas de Validación de Vulkan:\nHabilita un sistema que valida el estado del renderizador de Vulkan y registra información sobre su estado interno. Esto reducirá el rendimiento y probablemente cambiará el comportamiento de la emulación. - - - - vkSyncValidationCheckBox - Habilitar Validación de Sincronización de Vulkan:\nHabilita un sistema que valida el tiempo de las tareas de renderizado de Vulkan. Esto reducirá el rendimiento y probablemente cambiará el comportamiento de la emulación. - - - - rdocCheckBox - Habilitar Depuración de RenderDoc:\nSi se habilita, el emulador proporcionará compatibilidad con Renderdoc para permitir la captura y análisis del fotograma actualmente renderizado. - - - - GameListFrame - - - Icon - Icono - - - - Name - Nombre - - - - Serial - Numero de serie - - - - Compatibility - Compatibility - - - - Region - Región - - - - Firmware - Firmware - - - - Size - Tamaño - - - - Version - Versión - - - - Path - Ruta - - - - Play Time - Tiempo de Juego - - - - Never Played - Never Played - - - - h - h - - - - m - m - - - - s - s - - - - Compatibility is untested - Compatibility is untested - - - - Game does not initialize properly / crashes the emulator - Game does not initialize properly / crashes the emulator - - - - Game boots, but only displays a blank screen - Game boots, but only displays a blank screen - - - - Game displays an image but does not go past the menu - Game displays an image but does not go past the menu - - - - Game has game-breaking glitches or unplayable performance - Game has game-breaking glitches or unplayable performance - - - - Game can be completed with playable performance and no major glitches - Game can be completed with playable performance and no major glitches - - - - CheckUpdate - - - Auto Updater - Actualizador Automático - - - - Error - Error - - - - Network error: - Error de red: - - - - Failed to parse update information. - Error al analizar la información de actualización. - - - - No pre-releases found. - No se encontraron prelanzamientos. - - - - Invalid release data. - Datos de versión no válidos. - - - - No download URL found for the specified asset. - No se encontró URL de descarga para el activo especificado. - - - - Your version is already up to date! - ¡Su versión ya está actualizada! - - - - Update Available - Actualización disponible - - - - Update Channel - Canal de Actualización - - - - Current Version - Versión actual - - - - Latest Version - Última versión - - - - Do you want to update? - ¿Quieres actualizar? - - - - Show Changelog - Mostrar registro de cambios - - - - Check for Updates at Startup - Buscar actualizaciones al iniciar - - - - Update - Actualizar - - - - No - No - - - - Hide Changelog - Ocultar registro de cambios - - - - Changes - Cambios - - - - Network error occurred while trying to access the URL - Se produjo un error de red al intentar acceder a la URL - - - - Download Complete - Descarga completa - - - - The update has been downloaded, press OK to install. - La actualización se ha descargado, presione Aceptar para instalar. - - - - Failed to save the update file at - No se pudo guardar el archivo de actualización en - - - - Starting Update... - Iniciando actualización... - - - - Failed to create the update script file - No se pudo crear el archivo del script de actualización - - - - GameListUtils - - - B - B - - - - KB - KB - - - - MB - MB - - - - GB - GB - - - - TB - TB - - - \ No newline at end of file + + + AboutDialog + + About shadPS4 + Acerca de shadPS4 + + + 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. + Este software no debe utilizarse para jugar juegos que hayas obtenido ilegalmente. + + + + CheatsPatches + + Cheats / Patches for + Trucos / Parches para + + + 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:\n + 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:\n + + + No Image Available + No hay imagen disponible + + + Serial: + Número de 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 una vez descargados. + + + 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 + Parches + + + 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 el número de 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 + + + No Cheats found for this game in this version of the selected repository,try another repository or a different version of the game. + 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 + + + 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. + 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 + + + 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. If the patch does not appear, it may be that it does not exist for the specific serial and version of the game. + ¡Parches descargados correctamente! Todos los parches disponibles para todos los juegos han sido descargados, no es necesario descargarlos individualmente para cada juego como ocurre con los trucos. Si el parche no aparece, puede ser que no exista para el número de serie y versión específicos del juego. + + + 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. + + + The game is in version: %1 + El juego está en la versión: %1 + + + The downloaded patch only works on version: %1 + El parche descargado solo funciona en la versión: %1 + + + You may need to update your game. + Puede que necesites actualizar tu juego. + + + Incompatibility Notice + Aviso de incompatibilidad + + + 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: + + + Can't apply cheats before the game is started + No se pueden aplicar trucos antes de que se inicie el juego. + + + Close + Cerrar + + + + CheckUpdate + + Auto Updater + Actualizador Automático + + + Error + Error + + + Network error: + Error de red: + + + The Auto Updater allows up to 60 update checks per hour.\nYou have reached this limit. Please try again later. + El actualizador automático permite hasta 60 comprobaciones de actualización por hora.\nHas alcanzado este límite. Por favor, inténtalo de nuevo más tarde. + + + Failed to parse update information. + Error al analizar la información de actualización. + + + No pre-releases found. + No se encontraron prelanzamientos. + + + Invalid release data. + Datos de versión no válidos. + + + No download URL found for the specified asset. + No se encontró URL de descarga para el activo especificado. + + + Your version is already up to date! + ¡Su versión ya está actualizada! + + + Update Available + Actualización disponible + + + Update Channel + Canal de Actualización + + + Current Version + Versión actual + + + Latest Version + Última versión + + + Do you want to update? + ¿Quieres actualizar? + + + Show Changelog + Mostrar registro de cambios + + + Check for Updates at Startup + Buscar actualizaciones al iniciar + + + Update + Actualizar + + + No + No + + + Hide Changelog + Ocultar registro de cambios + + + Changes + Cambios + + + Network error occurred while trying to access the URL + Se produjo un error de red al intentar acceder a la URL + + + Download Complete + Descarga completa + + + The update has been downloaded, press OK to install. + La actualización se ha descargado, presione Aceptar para instalar. + + + Failed to save the update file at + No se pudo guardar el archivo de actualización en + + + Starting Update... + Iniciando actualización... + + + Failed to create the update script file + No se pudo crear el archivo del script de actualización + + + + CompatibilityInfoClass + + Fetching compatibility data, please wait + Obteniendo datos de compatibilidad, por favor espera + + + Cancel + Cancelar + + + Loading... + Cargando... + + + Error + Error + + + Unable to update compatibility data! Try again later. + ¡No se pudo actualizar los datos de compatibilidad! Intenta de nuevo más tarde. + + + Unable to open compatibility_data.json for writing. + No se pudo abrir compatibility_data.json para escribir. + + + Unknown + Desconocido + + + Nothing + Nada + + + Boots + Inicia + + + Menus + Menús + + + Ingame + En el juego + + + Playable + Jugable + + + + ControlSettings + + Configure Controls + Configurar Controles + + + D-Pad + Botones de dirección + + + Up + Arriba + + + Left + Izquierda + + + Right + Derecha + + + Down + Abajo + + + Left Stick Deadzone (def:2 max:127) + Zona muerta del stick izquierdo (defecto: 2, máx.: 127) + + + Left Deadzone + Zona muerta del stick izquierdo + + + Left Stick + Stick izquierdo + + + Config Selection + Selección de Configuraciones + + + Common Config + Configuración Estándar + + + Use per-game configs + Usar configuraciones por juego + + + L1 / LB + L1/LB + + + L2 / LT + L2/LT + + + Back + Back + + + R1 / RB + R1/RB + + + R2 / RT + R2/RT + + + L3 + L3 + + + Options / Start + Options/Start + + + R3 + R3 + + + Face Buttons + Botones de acción + + + Triangle / Y + Triángulo/Y + + + Square / X + Cuadrado/X + + + Circle / B + Círculo/B + + + Cross / A + Cruz / A + + + Right Stick Deadzone (def:2, max:127) + Zona muerta del stick derecho (defecto: 2, máx.: 127) + + + Right Deadzone + Zona muerta del stick derecho + + + Right Stick + Stick derecho + + + Color Adjustment + Calibración de color + + + R: + R: + + + G: + V: + + + B: + A: + + + Override Lightbar Color + Reemplazar el Color de la Barra de Luz + + + Override Color + Reemplazar Color + + + Unable to Save + No se Pudo Guardar + + + Cannot bind axis values more than once + No se pueden vincular valores del eje más de una vez + + + Save + Guardar + + + Apply + Aplicar + + + Restore Defaults + Restaurar Valores Por Defecto + + + Cancel + Cancelar + + + + EditorDialog + + Edit Keyboard + Mouse and Controller input bindings + Editar Asignaciones de Teclado + Ratón y Mando + + + Use Per-Game configs + Usar Configuraciones por Juego + + + Error + Error + + + Could not open the file for reading + No se pudo abrir el archivo para la lectura + + + Could not open the file for writing + No se pudo abrir el archivo para escritura + + + Save Changes + Guardar Cambios + + + Do you want to save changes? + ¿Quieres guardar los cambios? + + + Help + Ayuda + + + Do you want to reset your custom default config to the original default config? + ¿Desea restablecer su configuración predeterminada personalizada a la configuración por defecto original? + + + Do you want to reset this config to your custom default config? + ¿Quieres restablecer esta configuración a tu configuración por defecto personalizada? + + + Reset to Default + Resetear A Valores Originales + + + + ElfViewer + + Open Folder + Abrir carpeta + + + + GameInfoClass + + Loading game list, please wait :3 + Cargando lista de juegos, por favor espera :3 + + + Cancel + Cancelar + + + Loading... + Cargando... + + + + GameInstallDialog + + shadPS4 - Choose directory + shadPS4 - Elegir carpeta + + + Directory to install games + Carpeta para instalar juegos + + + Browse + Buscar + + + Error + Error + + + Directory to install DLC + Carpeta para instalar DLC + + + + GameListFrame + + Icon + Icono + + + Name + Nombre + + + Serial + Numero de serie + + + Compatibility + Compatibilidad + + + Region + Región + + + Firmware + Firmware + + + Size + Tamaño + + + Version + Versión + + + Path + Ruta + + + Play Time + Tiempo de Juego + + + Never Played + Nunca Jugado + + + h + h + + + m + m + + + s + s + + + Compatibility is untested + Compatibilidad no comprobada + + + Game does not initialize properly / crashes the emulator + El juego no se inicia correctamente o cuelga el emulador + + + Game boots, but only displays a blank screen + El juego arranca, pero se queda en blanco + + + Game displays an image but does not go past the menu + El juego muestra imágenes, pero no va más allá de los menús + + + Game has game-breaking glitches or unplayable performance + El juego tiene fallos graves o un rendimiento que lo hace injugable + + + Game can be completed with playable performance and no major glitches + El juego puede completarse con un rendimiento jugable y sin errores de importancia + + + Click to see details on github + Haz clic para ver detalles en GitHub + + + Last updated + Última actualización + + + + GameListUtils + + B + B + + + KB + KB + + + MB + MB + + + GB + GB + + + TB + TB + + + + GuiContextMenus + + Create Shortcut + Crear acceso directo + + + Cheats / Patches + Trucos / Parches + + + SFO Viewer + Vista SFO + + + Trophy Viewer + Expositor de Trofeos + + + Open Folder... + Abrir Carpeta... + + + Open Game Folder + Abrir Carpeta del Juego + + + Open Save Data Folder + Abrir Carpeta de Datos Guardados + + + Open Log Folder + Abrir Carpeta de Registros + + + Copy info... + Copiar información... + + + Copy Name + Copiar nombre + + + Copy Serial + Copiar número de serie + + + Copy Version + Copiar versión + + + Copy Size + Copiar Tamaño + + + Copy All + Copiar todo + + + Delete... + Eliminar... + + + Delete Game + Eliminar juego + + + Delete Update + Eliminar Actualización + + + Delete DLC + Eliminar DLC + + + Delete Trophy + Eliminar Trofeo + + + Compatibility... + Compatibilidad... + + + Update database + Actualizar base de datos + + + View report + Ver informe + + + Submit a report + Enviar un informe + + + Shortcut creation + Acceso directo creado + + + Shortcut created successfully! + ¡Acceso directo creado con éxito! + + + Error + Error + + + Error creating shortcut! + ¡Error al crear el acceso directo! + + + Game + Juego + + + This game has no update to delete! + ¡Este juego no tiene actualizaciones! + + + Update + Actualización + + + This game has no DLC to delete! + ¡Este juego no tiene DLCs! + + + DLC + DLC + + + Delete %1 + Eliminar %1 + + + Are you sure you want to delete %1's %2 directory? + ¿Seguro que quieres eliminar el directorio %2 de %1? + + + Open Update Folder + Abrir carpeta de actualizaciones + + + Delete Save Data + Eliminar datos guardados + + + This game has no update folder to open! + ¡Este juego no tiene carpeta de actualizaciones! + + + No log file found for this game! + ¡No se encontró un archivo de registro para este juego! + + + Failed to convert icon. + Error al convertir el icono. + + + This game has no save data to delete! + ¡Este juego no tiene datos guardados! + + + This game has no saved trophies to delete! + ¡Este juego no tiene trofeos guardados para eliminar! + + + Save Data + Datos guardados + + + Trophy + Trofeo + + + SFO Viewer for + Visualizador de SFO para + + + + HelpDialog + + Quickstart + Inicio Rápido + + + FAQ + Preguntas Frecuentes (FAQ) + + + Syntax + Sintaxis + + + Special Bindings + Asignación de Teclas Especiales + + + Keybindings + Asignación de Teclas + + + + KBMSettings + + Configure Controls + Configurar Controles + + + D-Pad + Cruceta + + + Up + Arriba + + + unmapped + sin vincular + + + Left + Izquierda + + + Right + Derecha + + + Down + Abajo + + + Left Analog Halfmode + Modo Reducido del Stick Izquierdo + + + hold to move left stick at half-speed + manten para mover el stick izquierdo a la mitad de la velocidad + + + Left Stick + Stick Izquierdo + + + Config Selection + Selección de Configuraciones + + + Common Config + Configuración Estándar + + + Use per-game configs + Usar configuraciones por juego + + + L1 + L1 + + + L2 + L2 + + + Text Editor + Editor de Texto + + + Help + Ayuda + + + R1 + R1 + + + R2 + R2 + + + L3 + L3 + + + Touchpad Click + Clic de pantalla táctil + + + Mouse to Joystick + Ratón a Joystick + + + *press F7 ingame to activate + * presiona F7 en el juego para activar + + + R3 + R3 + + + Options + Opciones + + + Mouse Movement Parameters + Parámetros Movimiento del Ratón + + + note: click Help Button/Special Keybindings for more information + nota: haga clic en Botón de ayuda/Asignación de Teclas Especiales para más información + + + Face Buttons + Botones de Acción + + + Triangle + Triángulo + + + Square + Cuadrado + + + Circle + Círculo + + + Cross + Equis + + + Right Analog Halfmode + Modo Reducido del Stick Derecho + + + hold to move right stick at half-speed + manten para mover el stick derecho a la mitad de la velocidad + + + Right Stick + Stick Derecho + + + Speed Offset (def 0.125): + Compensación de Velocidad (def 0.125): + + + Copy from Common Config + Copiar desde la Configuración Estándar + + + Deadzone Offset (def 0.50): + Zona Muerta (def 0.50): + + + Speed Multiplier (def 1.0): + Multiplicador de Velocidad (def 1.0): + + + Common Config Selected + Configuración Estándar Seleccionada + + + This button copies mappings from the Common Config to the currently selected profile, and cannot be used when the currently selected profile is the Common Config. + Este botón copia mapeos de la Configuración Estándar al perfil seleccionado actualmente, y no se puede utilizar cuando el perfil seleccionado es la Configuración Estándar. + + + Copy values from Common Config + Copiar valores de la Configuración Estándar + + + Do you want to overwrite existing mappings with the mappings from the Common Config? + ¿Quiere sobrescribir los mapeos existentes con los mapeos de la Configuración Estándar? + + + Unable to Save + No se Pudo Guardar + + + Cannot bind any unique input more than once + No se puede vincular ninguna entrada única más de una vez + + + Press a key + Pulsa una tecla + + + Cannot set mapping + No se pudo asignar el mapeo + + + Mousewheel cannot be mapped to stick outputs + La rueda del ratón no puede ser mapeada al stick + + + Save + Guardar + + + Apply + Aplicar + + + Restore Defaults + Restaurar Valores Por Defecto + + + Cancel + Cancelar + + + + MainWindow + + Open/Add Elf Folder + Abrir/Agregar carpeta Elf + + + Boot Game + Iniciar juego + + + Check for Updates + Buscar actualizaciones + + + About shadPS4 + Acerca de shadPS4 + + + Configure... + Configurar... + + + Recent Games + Juegos recientes + + + Open shadPS4 Folder + Abrir carpeta de shadPS4 + + + Exit + Salir + + + Exit shadPS4 + Salir de shadPS4 + + + Exit the application. + Salir de la aplicación. + + + Show Game List + Mostrar lista de juegos + + + Game List Refresh + Actualizar lista de juegos + + + Tiny + Muy pequeño + + + Small + Pequeño + + + Medium + Mediano + + + Large + Grande + + + List View + Vista de Lista + + + Grid View + Vista de Cuadrícula + + + Elf Viewer + Vista Elf + + + Game Install Directory + Carpeta de Instalación de Juegos + + + Download Cheats/Patches + Descargar Trucos / Parches + + + Dump Game List + Volcar Lista de Juegos + + + Trophy Viewer + Expositor de Trofeos + + + No games found. Please add your games to your library first. + No se encontraron juegos. Por favor, añade tus juegos a tu biblioteca primero. + + + Search... + Buscar... + + + File + Archivo + + + View + Vista + + + Game List Icons + Iconos de Juegos + + + Game List Mode + Tipo de Lista + + + Settings + Configuración + + + Utils + Utilidades + + + Themes + Temas + + + Help + Ayuda + + + Dark + Oscuro + + + Light + Claro + + + Green + Verde + + + Blue + Azul + + + Violet + Violeta + + + toolBar + Barra de herramientas + + + Game List + Lista de Juegos + + + * 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 han sido descargados para todos los juegos. + + + Games: + Juegos: + + + 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! + + + Run Game + Ejecutar juego + + + Eboot.bin file not found + Archivo Eboot.bin no encontrado + + + Game is already running! + ¡El juego ya se está ejecutando! + + + shadPS4 + shadPS4 + + + Play + Jugar + + + Pause + Pausar + + + Stop + Detener + + + Restart + Reiniciar + + + Full Screen + Pantalla completa + + + Controllers + Controles + + + Keyboard + Teclado + + + Refresh List + Actualizar lista + + + Resume + Reanudar + + + Show Labels Under Icons + Mostrar etiquetas debajo de los iconos + + + + SettingsDialog + + Settings + Configuración + + + General + General + + + System + Sistema + + + Console Language + Idioma de la Consola + + + Emulator Language + Idioma del emulador + + + Emulator + Emulador + + + Enable Separate Update Folder + Habilitar Carpeta Independiente de Actualizaciones + + + Default tab when opening settings + Pestaña predeterminada al abrir la configuración + + + Show Game Size In List + Mostrar Tamaño del Juego en la Lista + + + Show Splash + Mostrar Pantalla de Bienvenida + + + Enable Discord Rich Presence + Habilitar Discord Rich Presence + + + Username + Nombre de Usuario + + + Trophy Key + Clave de Trofeos + + + Trophy + Trofeo + + + Open the custom trophy images/sounds folder + Abrir la carpeta de trofeos/sonidos personalizados + + + Logger + Registro + + + Log Type + Tipo de Registro + + + Log Filter + Filtro de Registro + + + Open Log Location + Abrir Ubicación del registro + + + Input + Entrada + + + Cursor + Cursor + + + Hide Cursor + Ocultar Cursor + + + Hide Cursor Idle Timeout + Tiempo de Espera para Ocultar Cursor Inactivo + + + s + s + + + Controller + Controlador + + + Back Button Behavior + Comportamiento del Botón de Retroceso + + + Graphics + Gráficos + + + GUI + Interfaz + + + User + Usuario + + + Graphics Device + Dispositivo Gráfico + + + Vblank Divider + Divisor de Vblank + + + Advanced + Avanzado + + + Enable Shaders Dumping + Habilitar volcado de Shaders + + + Enable NULL GPU + Habilitar GPU NULL + + + Enable HDR + Habilitar HDR + + + Paths + Rutas + + + Game Folders + Carpetas de Juegos + + + Add... + Añadir... + + + Remove + Eliminar + + + Debug + Depuración + + + Enable Debug Dumping + Habilitar Volcado de Depuración + + + Enable Vulkan Validation Layers + Habilitar Capas de Validación de Vulkan + + + Enable Vulkan Synchronization Validation + Habilitar Validación de Sincronización de Vulkan + + + Enable RenderDoc Debugging + Habilitar Depuración de RenderDoc + + + Enable Crash Diagnostics + Habilitar Diagnóstico de Fallos + + + Collect Shaders + Recopilar Shaders + + + Copy GPU Buffers + Copiar búferes de GPU + + + Host Debug Markers + Marcadores de Depuración del Host + + + Guest Debug Markers + Marcadores de Depuración del Invitado + + + Update + Actualización + + + Check for Updates at Startup + Buscar Actualizaciones al Iniciar + + + Always Show Changelog + Mostrar Siempre el Registro de Cambios + + + Update Channel + Canal de Actualización + + + Check for Updates + Buscar Actualizaciones + + + GUI Settings + Configuraciones de la Interfaz + + + Title Music + Música de título + + + Disable Trophy Notification + Desactivar Notificaciones de Trofeos + + + Background Image + Imagen de Fondo + + + Show Background Image + Mostrar Imagen de Fondo + + + Opacity + Opacidad + + + Play title music + Reproducir la música de apertura + + + Update Compatibility Database On Startup + Actualizar base de datos de compatibilidad al iniciar + + + Game Compatibility + Compatibilidad + + + Display Compatibility Data + Mostrar datos de compatibilidad + + + Update Compatibility Database + Actualizar base de datos de compatibilidad + + + Volume + Volumen + + + Save + Guardar + + + Apply + Aplicar + + + Restore Defaults + Restaurar Valores Predeterminados + + + Close + Cerrar + + + Point your mouse at an option to display its description. + Coloque el ratón sobre una opción para mostrar su descripción. + + + Console Language:\nSets the language that the PS4 game uses.\nIt's recommended to set this to a language the game supports, which will vary by region. + Idioma de la Consola:\nEstablece el idioma que utiliza el juego de PS4.\nSe recomienda configurarlo a un idioma que el juego soporte, lo cual varía por región. + + + Emulator Language:\nSets the language of the emulator's user interface. + Idioma del Emulador:\nConfigura el idioma de la interfaz de usuario del emulador. + + + Enable Separate Update Folder:\nEnables installing game updates into a separate folder for easy management.\nThis can be manually created by adding the extracted update to the game folder with the name "CUSA00000-UPDATE" where the CUSA ID matches the game's ID. + Habilitar Carpeta Independiente de Actualizaciónes:\nHabilita el instalar actualizaciones del juego en una carpeta separada para mas facilidad en la gestión.\nPuede crearse manualmente añadiendo la actualización extraída a la carpeta del juego con el nombre "CUSA00000-UPDATE" donde el CUSA ID coincide con el ID del juego. + + + Show Splash Screen:\nShows the game's splash screen (a special image) while the game is starting. + Mostrar Pantalla de Inicio:\nMuestra la pantalla de inicio del juego (una imagen especial) mientras el juego se está iniciando. + + + Enable Discord Rich Presence:\nDisplays the emulator icon and relevant information on your Discord profile. + Habilitar Discord Rich Presence:\nMuestra el ícono del emulador y la información relevante en tu perfil de Discord. + + + Username:\nSets the PS4's account username, which may be displayed by some games. + Nombre de Usuario:\nEstablece el nombre de usuario de la cuenta de PS4, que puede ser mostrado por algunos juegos. + + + Trophy Key:\nKey used to decrypt trophies. Must be obtained from your jailbroken console.\nMust contain only hex characters. + Clave de Trofeos:\nClave utilizada para descifrar trofeos. Debe obtenerse de tu consola desbloqueada.\nSolo debe contener caracteres hexadecimales. + + + Log Type:\nSets whether to synchronize the output of the log window for performance. May have adverse effects on emulation. + Tipo de Registro:\nEstablece si sincronizar la salida de la ventana de registro para mejorar el rendimiento. Puede tener efectos adversos en la emulación. + + + Log Filter:\nFilters the log to only print specific information.\nExamples: "Core:Trace" "Lib.Pad:Debug Common.Filesystem:Error" "*:Critical"\nLevels: Trace, Debug, Info, Warning, Error, Critical - in this order, a specific level silences all levels preceding it in the list and logs every level after it. + Filtro de Registro:\nFiltra el registro para imprimir solo información específica.\nEjemplos: "Core:Trace" "Lib.Pad:Debug Common.Filesystem:Error" "*:Critical" Niveles: Trace, Debug, Info, Warning, Error, Critical - en este orden, un nivel específico silencia todos los niveles anteriores en la lista y registra cada nivel posterior. + + + Update:\nRelease: Official versions released every month that may be very outdated, but are more reliable and tested.\nNightly: Development versions that have all the latest features and fixes, but may contain bugs and are less stable. + Actualización:\nRelease: Versiones oficiales lanzadas cada mes que pueden estar muy desactualizadas, pero son más confiables y están probadas.\nNightly: Versiones de desarrollo que tienen todas las últimas funciones y correcciones, pero pueden contener errores y son menos estables. + + + Background Image:\nControl the opacity of the game background image. + Imagen de fondo:\nControle la opacidad de la imagen de fondo del juego. + + + Play Title Music:\nIf a game supports it, enable playing special music when selecting the game in the GUI. + Reproducir Música del Título:\nSi un juego lo admite, habilita la reproducción de música especial al seleccionar el juego en la interfaz gráfica. + + + Disable Trophy Pop-ups:\nDisable in-game trophy notifications. Trophy progress can still be tracked using the Trophy Viewer (right-click the game in the main window). + Desactivar Notificaciones de trofeos:\nDesactiva las notificaciones de trofeos en el juego. El progreso de trofeos todavía puede ser rastreado usando el Expositor de Trofeos (haz clic derecho en el juego en la ventana principal). + + + Hide Cursor:\nChoose when the cursor will disappear:\nNever: You will always see the mouse.\nidle: Set a time for it to disappear after being idle.\nAlways: you will never see the mouse. + Ocultar Cursor:\nElija cuándo desaparecerá el cursor:\nNunca: Siempre verá el ratón.\nInactivo: Establezca un tiempo para que desaparezca después de estar inactivo.\nSiempre: nunca verá el ratón. + + + Hide Idle Cursor Timeout:\nThe duration (seconds) after which the cursor that has been idle hides itself. + Establezca un tiempo para que el ratón desaparezca después de estar inactivo. + + + Back Button Behavior:\nSets the controller's back button to emulate tapping the specified position on the PS4 touchpad. + Comportamiento del Botón Atrás:\nEstablece el botón atrás del controlador para emular el toque en la posición especificada en el touchpad del PS4. + + + Display Compatibility Data:\nDisplays game compatibility information in table view. Enable "Update Compatibility On Startup" to get up-to-date information. + Mostrar Datos de Compatibilidad:\nMuestra información de compatibilidad de juegos en vista de tabla. Habilite "Actualizar Compatibilidad al Iniciar" para obtener información actualizada. + + + Update Compatibility On Startup:\nAutomatically update the compatibility database when shadPS4 starts. + Actualizar Compatibilidad al Iniciar:\nActualiza automáticamente la base de datos de compatibilidad cuando shadPS4 se inicia. + + + Update Compatibility Database:\nImmediately update the compatibility database. + Actualizar Base de Datos de Compatibilidad:\nActualizar inmediatamente la base de datos de compatibilidad. + + + Never + Nunca + + + Idle + Inactivo + + + Always + Siempre + + + Touchpad Left + Touchpad Izquierda + + + Touchpad Right + Touchpad Derecha + + + Touchpad Center + Centro del Touchpad + + + None + Ninguno + + + Graphics Device:\nOn multiple GPU systems, select the GPU the emulator will use from the drop down list,\nor select "Auto Select" to automatically determine it. + Dispositivo Gráfico:\nEn sistemas con múltiples GPU, selecciona la GPU que el emulador utilizará de la lista desplegable,\o selecciona "Auto Select" para determinarla automáticamente. + + + Width/Height:\nSets the size of the emulator window at launch, which can be resized during gameplay.\nThis is different from the in-game resolution. + Anchura/Altura:\nEstablece el tamaño de la ventana del emulador al iniciar, que se puede redimensionar durante el juego.\nEsto es diferente de la resolución en el juego. + + + Vblank Divider:\nThe frame rate at which the emulator refreshes at is multiplied by this number. Changing this may have adverse effects, such as increasing the game speed, or breaking critical game functionality that does not expect this to change! + Divisor de Vblank:\nLa tasa de cuadros a la que se refresca el emulador se multiplica por este número. Cambiar esto puede tener efectos adversos, como aumentar la velocidad del juego, o romper la funcionalidad crítica del juego que no espera que esto cambie. + + + Enable Shaders Dumping:\nFor the sake of technical debugging, saves the games shaders to a folder as they render. + Habilitar la Volcadura de Shaders:\nPor el bien de la depuración técnica, guarda las sombras del juego en una carpeta mientras se renderizan. + + + Enable Null GPU:\nFor the sake of technical debugging, disables game rendering as if there were no graphics card. + Habilitar GPU Nula:\nPor el bien de la depuración técnica, desactiva el renderizado del juego como si no hubiera tarjeta gráfica. + + + Enable HDR:\nEnables HDR in games that support it.\nYour monitor must have support for the BT2020 PQ color space and the RGB10A2 swapchain format. + Habilitar HDR:\nHabilita HDR en juegos que lo soporten.\nTu monitor debe tener soporte para el espacio de color PQ BT2020 y el formato RGB10A2 de cadena de intercambio. + + + Game Folders:\nThe list of folders to check for installed games. + Carpetas de Juegos:\nLa lista de carpetas para verificar los juegos instalados. + + + Add:\nAdd a folder to the list. + Añadir:\nAgregar una carpeta a la lista. + + + Remove:\nRemove a folder from the list. + Eliminar:\nEliminar una carpeta de la lista. + + + Enable Debug Dumping:\nSaves the import and export symbols and file header information of the currently running PS4 program to a directory. + Habilitar la Volcadura de Depuración:\nGuarda los símbolos de importación y exportación y la información del encabezado del archivo del programa de PS4 que se está ejecutando actualmente en un directorio. + + + Enable Vulkan Validation Layers:\nEnables a system that validates the state of the Vulkan renderer and logs information about its internal state.\nThis will reduce performance and likely change the behavior of emulation. + Habilitar Capas de Validación de Vulkan:\nHabilita un sistema que valida el estado del renderizador de Vulkan y registra información sobre su estado interno. Esto reducirá el rendimiento y probablemente cambiará el comportamiento de la emulación. + + + Enable Vulkan Synchronization Validation:\nEnables a system that validates the timing of Vulkan rendering tasks.\nThis will reduce performance and likely change the behavior of emulation. + Habilitar Validación de Sincronización de Vulkan:\nHabilita un sistema que valida el tiempo de las tareas de renderizado de Vulkan. Esto reducirá el rendimiento y probablemente cambiará el comportamiento de la emulación. + + + Enable RenderDoc Debugging:\nIf enabled, the emulator will provide compatibility with Renderdoc to allow capture and analysis of the currently rendered frame. + Habilitar Depuración de RenderDoc:\nSi se habilita, el emulador proporcionará compatibilidad con Renderdoc para permitir la captura y análisis del fotograma actualmente renderizado. + + + Collect Shaders:\nYou need this enabled to edit shaders with the debug menu (Ctrl + F10). + Recopilar Shaders:\nNecesitas esto habilitado para editar shaders con el menú de depuración (Ctrl + F10). + + + Crash Diagnostics:\nCreates a .yaml file with info about the Vulkan state at the time of crashing.\nUseful for debugging 'Device lost' errors. If you have this enabled, you should enable Host AND Guest Debug Markers.\nDoes not work on Intel GPUs.\nYou need Vulkan Validation Layers enabled and the Vulkan SDK for this to work. + Diagnóstico de cuelgues:\nCrea un archivo .yaml con información sobre el estado de Vulkan en el momento del cuelgue.\nÚtil para depurar errores de tipo 'Dispositivo perdido' . Con esto activado, deberías habilitar los marcadores de depuración de Host E Invitado.\nNo funciona en GPUs de Intel.\nNecesitas activar las Capas de Validación de Vulkan y el SDK de Vulkan para que funcione. + + + Copy GPU Buffers:\nGets around race conditions involving GPU submits.\nMay or may not help with PM4 type 0 crashes. + Copiar Búferes de GPU:\nSortea condiciones de carrera que implican envíos de GPU.\nPuede o no ayudar con cuelgues del tipo 0 de PM4. + + + Host Debug Markers:\nInserts emulator-side information like markers for specific AMDGPU commands around Vulkan commands, as well as giving resources debug names.\nIf you have this enabled, you should enable Crash Diagnostics.\nUseful for programs like RenderDoc. + Marcadores de Depuración del Host:\n Inserta información del emulador como marcadores para comandos AMDGPU específicos, además de proporcionar nombres de depuración.\nCon esto activado, deberías habilitar el diagnóstico de fallos.\nUtil para programas como RenderDoc. + + + Guest Debug Markers:\nInserts any debug markers the game itself has added to the command buffer.\nIf you have this enabled, you should enable Crash Diagnostics.\nUseful for programs like RenderDoc. + Marcadores de Depuración del Invitado:\n Inserta cualquier marcador que el propio juego ha añadido al búfer de comandos.\nCon esto activado, deberías habilitar el diagnóstico de fallos.\nUtil para programas como RenderDoc. + + + Save Data Path:\nThe folder where game save data will be saved. + Ruta de Guardado de Datos:\nLa carpeta donde se guardarán los datos del juego. + + + Browse:\nBrowse for a folder to set as the save data path. + Buscar:\nBusque una carpeta para establecer como ruta de datos guardados. + + + Release + Principal + + + Nightly + Nightly + + + Set the volume of the background music. + Establece el volumen de la música de fondo. + + + Enable Motion Controls + Habilitar Controles de Movimiento + + + Save Data Path + Ruta de datos guardados + + + Browse + Buscar + + + async + asíncrono + + + sync + síncrono + + + Auto Select + Selección Automática + + + Directory to install games + Carpeta para instalar juegos + + + Directory to save data + Directorio para guardar datos + + + Video + Vídeo + + + Display Mode + Modo de Imagen + + + Windowed + Ventana + + + Fullscreen + Pantalla Completa + + + Fullscreen (Borderless) + Pantalla Completa (sin bordes) + + + Window Size + Tamaño de Ventana + + + W: + Ancho: + + + H: + Alto: + + + Separate Log Files + Archivos de Registro Independientes + + + Separate Log Files:\nWrites a separate logfile for each game. + Archivos de Registro Independientes:\nEscribe un archivo de registro separado para cada juego. + + + Trophy Notification Position + Posición de Notificación de Trofeos + + + Left + Izquierda + + + Right + Derecha + + + Top + Arriba + + + Bottom + Abajo + + + Notification Duration + Duración de Notificaciones + + + Portable User Folder + Carpeta Portable de Usuario + + + Create Portable User Folder from Common User Folder + Crear Carpeta Portable de Usuario a partir de la Carpeta de Usuario Estándar + + + Portable user folder:\nStores shadPS4 settings and data that will be applied only to the shadPS4 build located in the current folder. Restart the app after creating the portable user folder to begin using it. + Carpeta portable de usuario:\nAlmacena la configuración de shadPS4 y los datos que se aplicarán sólo a la compilación shadPS4 ubicada en la carpeta actual. Reinicia la aplicación después de crear la carpeta portable de usuario para empezar a usarla. + + + Cannot create portable user folder + No se pudo crear la carpeta portable de usuario + + + %1 already exists + %1 ya existe + + + Portable user folder created + Carpeta Portable de Usuario Creada + + + %1 successfully created. + %1 creado correctamente. + + + Open the custom trophy images/sounds folder:\nYou can add custom images to the trophies and an audio.\nAdd the files to custom_trophy with the following names:\ntrophy.wav OR trophy.mp3, bronze.png, gold.png, platinum.png, silver.png\nNote: The sound will only work in QT versions. + Abre la carpeta de trofeos/sonidos personalizados:\nPuedes añadir imágenes y un audio personalizados a los trofeos.\nAñade los archivos a custom_trophy con los siguientes nombres:\ntrophy.wav o trophy.mp3, bronze.png, gold.png, platinum.png, silver.png\nNota: El sonido sólo funcionará en versiones QT. + + + + TrophyViewer + + Trophy Viewer + Expositor de Trofeos + + + Select Game: + Selecciona un Juego: + + + Progress + Progreso + + + Show Earned Trophies + Mostrar Trofeos Obtenidos + + + Show Not Earned Trophies + Mostrar Trofeos No Obtenidos + + + Show Hidden Trophies + Mostrar Trofeos Ocultos + + + diff --git a/src/qt_gui/translations/fa_IR.ts b/src/qt_gui/translations/fa_IR.ts index 7b93c6769..f1f2c62ab 100644 --- a/src/qt_gui/translations/fa_IR.ts +++ b/src/qt_gui/translations/fa_IR.ts @@ -1,1664 +1,2089 @@ + - - - - AboutDialog - - - About shadPS4 - درباره ShadPS4 - - - - shadPS4 - ShadPS4 - - - - shadPS4 is an experimental open-source emulator for the PlayStation 4. - یک شبیه ساز متن باز برای پلی استیشن 4 است. - - - - This software should not be used to play games you have not legally obtained. - این برنامه نباید برای بازی هایی که شما به صورت غیرقانونی به دست آوردید استفاده شود. - - - - ElfViewer - - - Open Folder - فولدر را بازکن - - - - GameInfoClass - - - Loading game list, please wait :3 - درحال بارگیری لیست بازی ها,لطفا کمی صبرکنید :3 - - - - Cancel - لغو - - - - Loading... - ...درحال بارگیری - - - - InstallDirSelect - - - shadPS4 - Choose directory - ShadPS4 - انتخاب محل نصب بازی - - - - Select which directory you want to install to. - محلی را که می‌خواهید در آن نصب شود، انتخاب کنید. - - - - GameInstallDialog - - - shadPS4 - Choose directory - ShadPS4 - انتخاب محل نصب بازی - - - - Directory to install games - محل نصب بازی ها - - - - Browse - انتخاب دستی - - - - Error - ارور - - - - The value for location to install games is not valid. - .مکان داده شده برای نصب بازی درست نمی باشد - - - - GuiContextMenus - - - Create Shortcut - ایجاد میانبر - - - - Cheats / Patches - چیت/پچ ها - - - - SFO Viewer - SFO مشاهده - - - - Trophy Viewer - مشاهده جوایز - - - - Open Folder... - باز کردن پوشه... - - - - Open Game Folder - باز کردن پوشه بازی - - - - Open Save Data Folder - پوشه ذخیره داده را باز کنید - - - - Open Log Folder - باز کردن پوشه لاگ - - - - Copy info... - ...کپی کردن اطلاعات - - - - Copy Name - کپی کردن نام - - - - Copy Serial - کپی کردن سریال - - - - Copy All - کپی کردن تمامی مقادیر - - - - Delete... - حذف... - - - - Delete Game - حذف بازی - - - - Delete Update - حذف به‌روزرسانی - - - - Delete DLC - حذف محتوای اضافی (DLC) - - - - Compatibility... - Compatibility... - - - - Update database - Update database - - - - View report - View report - - - - Submit a report - Submit a report - - - - Shortcut creation - ایجاد میانبر - - - - Shortcut created successfully! - میانبر با موفقیت ساخته شد! - - - - Error - ارور - - - - Error creating shortcut! - مشکلی در هنگام ساخت میانبر بوجود آمد! - - - - Install PKG - نصب PKG - - - - Game - بازی - - - - requiresEnableSeparateUpdateFolder_MSG - این قابلیت نیازمند فعال‌سازی گزینه تنظیمات «ایجاد پوشه جداگانه برای به‌روزرسانی» است. در صورت تمایل به استفاده از این قابلیت، لطفاً آن را فعال کنید. - - - - This game has no update to delete! - این بازی به‌روزرسانی‌ای برای حذف ندارد! - - - - Update - به‌روزرسانی - - - - This game has no DLC to delete! - این بازی محتوای اضافی (DLC) برای حذف ندارد! - - - - DLC - DLC - - - - Delete %1 - حذف %1 - - - - Are you sure you want to delete %1's %2 directory? - Are you sure you want to delete %1's %2 directory? - - - - MainWindow - - - Open/Add Elf Folder - ELF بازکردن/ساختن پوشه - - - - Install Packages (PKG) - نصب بسته (PKG) - - - - Boot Game - اجرای بازی - - - - Check for Updates - به روز رسانی را بررسی کنید - - - - About shadPS4 - ShadPS4 درباره - - - - Configure... - ...تنظیمات - - - - Install application from a .pkg file - .PKG نصب بازی از فایل - - - - Recent Games - بازی های اخیر - - - - Exit - خروج - - - - Exit shadPS4 - ShadPS4 بستن - - - - Exit the application. - بستن برنامه - - - - Show Game List - نشان دادن بازی ها - - - - Game List Refresh - رفرش لیست بازی ها - - - - Tiny - کوچک ترین - - - - Small - کوچک - - - - Medium - متوسط - - - - Large - بزرگ - - - - List View - نمایش لیست - - - - Grid View - شبکه ای (چهارخونه) - - - - Elf Viewer - مشاهده گر Elf - - - - Game Install Directory - محل نصب بازی - - - - Download Cheats/Patches - دانلود چیت/پچ - - - - Dump Game List - استخراج لیست بازی ها - - - - PKG Viewer - PKG مشاهده گر - - - - Search... - جست و جو... - - - - File - فایل - - - - View - شخصی سازی - - - - Game List Icons - آیکون ها - - - - Game List Mode - حالت نمایش لیست بازی ها - - - - Settings - تنظیمات - - - - Utils - ابزارها - - - - Themes - تم ها - - - - Help - کمک - - - - Dark - تیره - - - - Light - روشن - - - - Green - سبز - - - - Blue - آبی - - - - Violet - بنفش - - - - toolBar - نوار ابزار - - - - PKGViewer - - - Open Folder - بازکردن پوشه - - - - TrophyViewer - - - Trophy Viewer - مشاهده جوایز - - - - SettingsDialog - - - Settings - تنظیمات - - - - General - عمومی - - - - System - سیستم - - - - Console Language - زبان کنسول - - - - Emulator Language - زبان شبیه ساز - - - - Emulator - شبیه ساز - - - - Enable Fullscreen - تمام صفحه - - - - Enable Separate Update Folder - فعال‌سازی پوشه جداگانه برای به‌روزرسانی - - - - Show Splash - Splash نمایش - - - - Is PS4 Pro - PS4 Pro حالت - - - - Enable Discord Rich Presence - Discord Rich Presence را فعال کنید - - - - Username - نام کاربری - - - - Trophy Key - Trophy Key - - - - Trophy - Trophy - - - - Logger - Logger - - - - Log Type - Log نوع - - - - Log Filter - Log فیلتر - - - - Input - ورودی - - - - Cursor - نشانگر - - - - Hide Cursor - پنهان کردن نشانگر - - - - Hide Cursor Idle Timeout - مخفی کردن زمان توقف مکان نما - - - - s - s - - - - Controller - دسته بازی - - - - Back Button Behavior - رفتار دکمه بازگشت - - - - Graphics - گرافیک - - - - Graphics Device - کارت گرافیک مورداستفاده - - - - Width - عرض - - - - Height - طول - - - - Vblank Divider - تقسیم‌کننده Vblank - - - - Advanced - ...بیشتر - - - - Enable Shaders Dumping - فعال‌سازی ذخیره‌سازی شیدرها - - - - Enable NULL GPU - NULL GPU فعال کردن - - - - Paths - مسیرها - - - - Game Folders - پوشه های بازی - - - - Add... - افزودن... - - - - Remove - حذف - - - - Debug - دیباگ - - - - Enable Debug Dumping - Debug Dumping - - - - Enable Vulkan Validation Layers - Vulkan Validation Layers - - - - Enable Vulkan Synchronization Validation - Vulkan Synchronization Validation - - - - Enable RenderDoc Debugging - RenderDoc Debugging - - - - Update - به‌روزرسانی - - - - Check for Updates at Startup - بررسی به‌روزرسانی‌ها در زمان راه‌اندازی - - - - Update Channel - کانال به‌روزرسانی - - - - Check for Updates - بررسی به‌روزرسانی‌ها - - - - GUI Settings - تنظیمات رابط کاربری - - - - Disable Trophy Pop-ups - غیرفعال کردن نمایش جوایز - - - - Play title music - پخش موسیقی عنوان - - - - Update Compatibility Database On Startup - به‌روزرسانی پایگاه داده سازگاری هنگام راه‌اندازی - - - - Game Compatibility - سازگاری بازی با سیستم - - - - Display Compatibility Data - نمایش داده‌های سازگاری - - - - Update Compatibility Database - به‌روزرسانی پایگاه داده سازگاری - - - - Volume - صدا - - - - Audio Backend - Audio Backend - - - - MainWindow - - - Game List - لیست بازی - - - - * 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! - پچ شناسایی شد! - - - - PKG and Game versions match: - و نسخه بازی همخوانی دارد PKG فایل: - - - - Would you like to overwrite? - آیا مایل به جایگزینی فایل هستید؟ - - - - PKG Version %1 is older than installed version: - نسخه فایل PKG %1 قدیمی تر از نسخه نصب شده است: - - - - Game is installed: - بازی نصب شد: - - - - Would you like to install Patch: - آیا مایل به نصب پچ هستید: - - - - DLC Installation - نصب DLC - - - - Would you like to install DLC: %1? - آیا مایل به نصب DLC هستید: %1 - - - - DLC already installed: - قبلا نصب شده DLC این: - - - - Game already installed - این بازی قبلا نصب شده - - - - PKG is a patch, please install the game first! - فایل انتخاب شده یک پچ است, لطفا اول بازی را نصب کنید - - - - 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 for - چیت / پچ برای - - - - defaultTextEdit_MSG - defaultTextEdit_MSG - - - - 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. - .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 - پچ ها با موفقیت بارگیری شدند! تمام وصله های موجود برای همه بازی ها دانلود شده اند، نیازی به دانلود جداگانه آنها برای هر بازی نیست، همانطور که در Cheats اتفاق می افتد. اگر پچ ظاهر نشد، ممکن است برای سریال و نسخه خاصی از بازی وجود نداشته باشد. - - - - Failed to parse JSON data from HTML. - HTML از JSON خطا در تجزیه اطلاعات. - - - - Failed to retrieve HTML page. - HTML خطا دربازیابی صفحه - - - - The game is in version: %1 - بازی در نسخه: %1 است - - - - The downloaded patch only works on version: %1 - وصله دانلود شده فقط در نسخه: %1 کار می کند - - - - You may need to update your game. - شاید لازم باشد بازی خود را به روز کنید. - - - - Incompatibility Notice - اطلاعیه عدم سازگاری - - - - Failed to open file: - خطا در اجرای فایل: - - - - XML ERROR: - XML ERROR: - - - - Failed to open files.json for writing - .json خطا در نوشتن فایل - - - - Author: - تولید کننده: - - - - Directory does not exist: - پوشه وجود ندارد: - - - - Failed to open files.json for reading. - .json خطا در خواندن فایل - - - - Name: - نام: - - - - Can't apply cheats before the game is started - قبل از شروع بازی نمی توانید تقلب ها را اعمال کنید. - - - - SettingsDialog - - - Save - ذخیره - - - - Apply - اعمال - - - - Restore Defaults - بازیابی پیش فرض ها - - - - Close - بستن - - - - Point your mouse at an option to display its description. - ماوس خود را بر روی یک گزینه قرار دهید تا توضیحات آن نمایش داده شود. - - - - consoleLanguageGroupBox - Console Language:\nSets the language that the PS4 game uses.\nIt's recommended to set this to a language the game supports, which will vary by region. - - - - emulatorLanguageGroupBox - زبان شبیه‌ساز:\nزبان رابط کاربری شبیه‌ساز را انتخاب می‌کند. - - - - fullscreenCheckBox - فعال‌سازی تمام صفحه:\nپنجره بازی را به‌طور خودکار به حالت تمام صفحه در می‌آورد.\nبرای تغییر این حالت می‌توانید کلید F11 را فشار دهید. - - - - separateUpdatesCheckBox - فعال‌سازی پوشه جداگانه برای به‌روزرسانی:\nامکان نصب به‌روزرسانی‌های بازی در یک پوشه جداگانه برای مدیریت راحت‌تر را فراهم می‌کند. - - - - showSplashCheckBox - نمایش صفحه شروع:\nصفحه شروع بازی (تصویری ویژه) را هنگام بارگذاری بازی نمایش می‌دهد. - - - - ps4proCheckBox - حالت PS4 Pro:\nشبیه‌ساز را به‌عنوان PS4 Pro شبیه‌سازی می‌کند که ممکن است ویژگی‌های ویژه‌ای را در بازی‌های پشتیبانی‌شده فعال کند. - - - - discordRPCCheckbox - فعال کردن Discord Rich Presence:\nآیکون شبیه ساز و اطلاعات مربوطه را در نمایه Discord شما نمایش می دهد. - - - - userName - نام کاربری:\nنام کاربری حساب PS4 را تنظیم می‌کند که ممکن است توسط برخی بازی‌ها نمایش داده شود. - - - - TrophyKey - Trophy Key:\nKey used to decrypt trophies. Must be obtained from your jailbroken console.\nMust contain only hex characters. - - - - logTypeGroupBox - نوع لاگ:\nتنظیم می‌کند که آیا خروجی پنجره لاگ برای بهبود عملکرد همگام‌سازی شود یا خیر. این ممکن است تأثیر منفی بر شبیه‌سازی داشته باشد. - - - - logFilter - Log Filter:\nFilters the log to only print specific information.\nExamples: "Core:Trace" "Lib.Pad:Debug Common.Filesystem:Error" "*:Critical" Levels: Trace, Debug, Info, Warning, Error, Critical - in this order, a specific level silences all levels preceding it in the list and logs every level after it. - - - - updaterGroupBox - به‌روزرسانی:\nانتشار: نسخه‌های رسمی که هر ماه منتشر می‌شوند و ممکن است بسیار قدیمی باشند، اما پایدارتر و تست‌ شده‌تر هستند.\nشبانه: نسخه‌های توسعه‌ای که شامل جدیدترین ویژگی‌ها و اصلاحات هستند، اما ممکن است دارای اشکال باشند و کمتر پایدار باشند. - - - - GUIgroupBox - پخش موسیقی عنوان:\nIدر صورتی که بازی از آن پشتیبانی کند، پخش موسیقی ویژه هنگام انتخاب بازی در رابط کاربری را فعال می‌کند. - - - - disableTrophycheckBox - غیرفعال کردن نمایش جوایز:\nنمایش اعلان‌های جوایز درون بازی را غیرفعال می‌کند. پیشرفت جوایز همچنان از طریق نمایشگر جوایز (کلیک راست روی بازی در پنجره اصلی) قابل پیگیری است.. - - - - hideCursorGroupBox - پنهان کردن نشانگر:\nانتخاب کنید که نشانگر چه زمانی ناپدید شود:\nهرگز: شما همیشه ماوس را خواهید دید.\nغیرفعال: زمانی را برای ناپدید شدن بعد از غیرفعالی تعیین کنید.\nهمیشه: شما هرگز ماوس را نخواهید دید. - - - - idleTimeoutGroupBox - زمانی را برای ناپدید شدن ماوس بعد از غیرفعالی تعیین کنید. - - - - backButtonBehaviorGroupBox - رفتار دکمه برگشت:\nدکمه برگشت کنترلر را طوری تنظیم می کند که ضربه زدن روی موقعیت مشخص شده روی صفحه لمسی PS4 را شبیه سازی کند. - - - - enableCompatibilityCheckBox - نمایش داده‌های سازگاری:\nاطلاعات سازگاری بازی را به صورت جدول نمایش می‌دهد. برای دریافت اطلاعات به‌روز، گزینه "به‌روزرسانی سازگاری هنگام راه‌اندازی" را فعال کنید. - - - - checkCompatibilityOnStartupCheckBox - به‌روزرسانی سازگاری هنگام راه‌اندازی:\nبه‌طور خودکار پایگاه داده سازگاری را هنگام راه‌اندازی ShadPS4 به‌روزرسانی می‌کند. - - - - updateCompatibilityButton - به‌روزرسانی پایگاه داده سازگاری:\nپایگاه داده سازگاری را بلافاصله به‌روزرسانی می‌کند. - - - - Never - هرگز - - - - Idle - بیکار - - - - Always - همیشه - - - - Touchpad Left - صفحه لمسی سمت چپ - - - - Touchpad Right - صفحه لمسی سمت راست - - - - Touchpad Center - مرکز صفحه لمسی - - - - None - هیچ کدام - - - - graphicsAdapterGroupBox - دستگاه گرافیکی:\nدر سیستم‌های با چندین پردازنده گرافیکی، از فهرست کشویی، پردازنده گرافیکی که شبیه‌ساز از آن استفاده می‌کند را انتخاب کنید، یا گزینه "انتخاب خودکار" را انتخاب کنید تا به طور خودکار تعیین شود. - - - - resolutionLayout - عرض/ارتفاع:\nاندازه پنجره شبیه‌ساز را در هنگام راه‌اندازی تنظیم می‌کند، که در حین بازی قابل تغییر اندازه است.\nاین با وضوح داخل بازی متفاوت است. - - - - heightDivider - تقسیم‌کننده Vblank:\nمیزان فریم ریت که شبیه‌ساز با آن به‌روزرسانی می‌شود، در این عدد ضرب می‌شود. تغییر این مقدار ممکن است تأثیرات منفی داشته باشد، مانند افزایش سرعت بازی یا خراب شدن عملکردهای حیاتی بازی که انتظار تغییر آن را ندارند! - - - - dumpShadersCheckBox - فعال‌سازی ذخیره‌سازی شیدرها:\nبه‌منظور اشکال‌زدایی فنی، شیدرهای بازی را هنگام رندر شدن در یک پوشه ذخیره می‌کند. - - - - nullGpuCheckBox - Enable Null GPU:\nFor the sake of technical debugging, disables game rendering as if there were no graphics card. - - - - gameFoldersBox - پوشه های بازی:\nلیست پوشه هایی که باید بازی های نصب شده را بررسی کنید. - - - - addFolderButton - اضافه کردن:\nیک پوشه به لیست اضافه کنید. - - - - removeFolderButton - حذف:\nیک پوشه را از لیست حذف کنید. - - - - debugDump - فعال‌سازی ذخیره‌سازی دیباگ:\nنمادهای import و export و اطلاعات هدر فایل برنامه در حال اجرای PS4 را در یک پوشه ذخیره می‌کند. - - - - vkValidationCheckBox - Enable Vulkan Validation Layers:\nEnables a system that validates the state of the Vulkan renderer and logs information about its internal state. This will reduce performance and likely change the behavior of emulation. - - - - vkSyncValidationCheckBox - Enable Vulkan Synchronization Validation:\nEnables a system that validates the timing of Vulkan rendering tasks. This will reduce performance and likely change the behavior of emulation. - - - - rdocCheckBox - Enable RenderDoc Debugging:\nIf enabled, the emulator will provide compatibility with Renderdoc to allow capture and analysis of the currently rendered frame. - - - - GameListFrame - - - Icon - آیکون - - - - Name - نام - - - - Serial - سریال - - - - Compatibility - سازگاری - - - - Region - منطقه - - - - Firmware - فریم‌ور - - - - Size - اندازه - - - - Version - نسخه - - - - Path - مسیر - - - - Play Time - زمان بازی - - - - Never Played - هرگز بازی نشده - - - - h - h - - - - m - m - - - - s - s - - - - Compatibility is untested - سازگاری تست نشده است - - - - Game does not initialize properly / crashes the emulator - بازی به درستی راه‌اندازی نمی‌شود / شبیه‌ساز کرش می‌کند - - - - Game boots, but only displays a blank screen - بازی اجرا می‌شود، اما فقط یک صفحه خالی نمایش داده می‌شود - - - - Game displays an image but does not go past the menu - بازی تصویری نمایش می‌دهد، اما از منو فراتر نمی‌رود - - - - Game has game-breaking glitches or unplayable performance - بازی دارای اشکالات بحرانی یا عملکرد غیرقابل بازی است - - - - Game can be completed with playable performance and no major glitches - بازی با عملکرد قابل قبول و بدون اشکالات عمده قابل بازی است. - - - - CheckUpdate - - - Auto Updater - به‌روزرسانی خودکار - - - - Error - خطا - - - - Network error: - خطای شبکه: - - - - Failed to parse update information. - خطا در تجزیه اطلاعات بهروزرسانی. - - - - No pre-releases found. - هیچ پیش انتشاری یافت نشد. - - - - Invalid release data. - داده های نسخه نامعتبر است. - - - - No download URL found for the specified asset. - هیچ URL دانلودی برای دارایی مشخص شده پیدا نشد. - - - - Your version is already up to date! - نسخه شما اکنون به روز شده است! - - - - Update Available - به روز رسانی موجود است - - - - Update Channel - کانال به‌روزرسانی - - - - Current Version - نسخه فعلی - - - - Latest Version - جدیدترین نسخه - - - - Do you want to update? - آیا می خواهید به روز رسانی کنید؟ - - - - Show Changelog - نمایش تغییرات - - - - Check for Updates at Startup - بررسی به‌روزرسانی هنگام شروع - - - - Update - به روز رسانی - - - - No - خیر - - - - Hide Changelog - مخفی کردن تغییرات - - - - Changes - تغییرات - - - - Network error occurred while trying to access the URL - در حین تلاش برای دسترسی به URL خطای شبکه رخ داد - - - - Download Complete - دانلود کامل شد - - - - The update has been downloaded, press OK to install. - به روز رسانی دانلود شده است، برای نصب OK را فشار دهید. - - - - Failed to save the update file at - فایل به روز رسانی ذخیره نشد - - - - Starting Update... - شروع به روز رسانی... - - - - Failed to create the update script file - فایل اسکریپت به روز رسانی ایجاد نشد - - - - GameListUtils - - - B - B - - - - KB - KB - - - - MB - MB - - - - GB - GB - - - - TB - TB - - + + + AboutDialog + + About shadPS4 + درباره ShadPS4 + + + shadPS4 is an experimental open-source emulator for the PlayStation 4. + یک شبیه ساز متن باز برای پلی استیشن 4 است. + + + This software should not be used to play games you have not legally obtained. + این برنامه نباید برای بازی هایی که شما به صورت غیرقانونی به دست آوردید استفاده شود. + + + + CheatsPatches + + Cheats / Patches for + چیت / پچ برای + + + 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:\n + 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:\n + + + 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. + .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 + چیت یافت نشد + + + 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 + دانلود چیت ها موفقیت آمیز بود✅ + + + 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 download: + خطا در دانلود❌ + + + Download Complete + دانلود کامل شد + + + 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. If the patch does not appear, it may be that it does not exist for the specific serial and version of the game. + پچ ها با موفقیت بارگیری شدند! تمام وصله های موجود برای همه بازی ها دانلود شده اند، نیازی به دانلود جداگانه آنها برای هر بازی نیست، همانطور که در Cheats اتفاق می افتد. اگر پچ ظاهر نشد، ممکن است برای سریال و نسخه خاصی از بازی وجود نداشته باشد. + + + Failed to parse JSON data from HTML. + HTML از JSON خطا در تجزیه اطلاعات. + + + Failed to retrieve HTML page. + HTML خطا دربازیابی صفحه + + + The game is in version: %1 + بازی در نسخه: %1 است + + + The downloaded patch only works on version: %1 + وصله دانلود شده فقط در نسخه: %1 کار می کند + + + You may need to update your game. + شاید لازم باشد بازی خود را به روز کنید. + + + Incompatibility Notice + اطلاعیه عدم سازگاری + + + Failed to open file: + خطا در اجرای فایل: + + + XML ERROR: + XML ERROR: + + + Failed to open files.json for writing + .json خطا در نوشتن فایل + + + Author: + تولید کننده: + + + Directory does not exist: + پوشه وجود ندارد: + + + Failed to open files.json for reading. + .json خطا در خواندن فایل + + + Name: + نام: + + + Can't apply cheats before the game is started + قبل از شروع بازی نمی توانید تقلب ها را اعمال کنید. + + + Close + بستن + + + + CheckUpdate + + Auto Updater + به‌روزرسانی خودکار + + + Error + خطا + + + Network error: + خطای شبکه: + + + The Auto Updater allows up to 60 update checks per hour.\nYou have reached this limit. Please try again later. + به‌روزرسانی خودکار حداکثر ۶۰ بررسی به‌روزرسانی در ساعت را مجاز می‌داند.\nشما به این محدودیت رسیده‌اید. لطفاً بعداً دوباره امتحان کنید. + + + Failed to parse update information. + خطا در تجزیه اطلاعات بهروزرسانی. + + + No pre-releases found. + هیچ پیش انتشاری یافت نشد. + + + Invalid release data. + داده های نسخه نامعتبر است. + + + No download URL found for the specified asset. + هیچ URL دانلودی برای دارایی مشخص شده پیدا نشد. + + + Your version is already up to date! + نسخه شما اکنون به روز شده است! + + + Update Available + به روز رسانی موجود است + + + Update Channel + کانال به‌روزرسانی + + + Current Version + نسخه فعلی + + + Latest Version + جدیدترین نسخه + + + Do you want to update? + آیا می خواهید به روز رسانی کنید؟ + + + Show Changelog + نمایش تغییرات + + + Check for Updates at Startup + بررسی به‌روزرسانی هنگام شروع + + + Update + به روز رسانی + + + No + خیر + + + Hide Changelog + مخفی کردن تغییرات + + + Changes + تغییرات + + + Network error occurred while trying to access the URL + در حین تلاش برای دسترسی به URL خطای شبکه رخ داد + + + Download Complete + دانلود کامل شد + + + The update has been downloaded, press OK to install. + به روز رسانی دانلود شده است، برای نصب OK را فشار دهید. + + + Failed to save the update file at + فایل به روز رسانی ذخیره نشد + + + Starting Update... + شروع به روز رسانی... + + + Failed to create the update script file + فایل اسکریپت به روز رسانی ایجاد نشد + + + + CompatibilityInfoClass + + Fetching compatibility data, please wait + در حال بارگذاری داده‌های سازگاری، لطفاً صبر کنید + + + Cancel + لغو + + + Loading... + در حال بارگذاری... + + + Error + خطا + + + Unable to update compatibility data! Try again later. + ناتوان از بروزرسانی داده‌های سازگاری! لطفاً بعداً دوباره تلاش کنید. + + + Unable to open compatibility_data.json for writing. + امکان باز کردن compatibility_data.json برای نوشتن وجود ندارد. + + + Unknown + ناشناخته + + + Nothing + هیچ چیز + + + Boots + چکمه‌ها + + + Menus + منوها + + + Ingame + داخل بازی + + + Playable + قابل بازی + + + + ControlSettings + + Configure Controls + Configure Controls + + + D-Pad + D-Pad + + + Up + Up + + + Left + Left + + + Right + Right + + + Down + Down + + + Left Stick Deadzone (def:2 max:127) + Left Stick Deadzone (def:2 max:127) + + + Left Deadzone + Left Deadzone + + + Left Stick + Left Stick + + + Config Selection + Config Selection + + + Common Config + Common Config + + + Use per-game configs + Use per-game configs + + + L1 / LB + L1 / LB + + + L2 / LT + L2 / LT + + + Back + Back + + + R1 / RB + R1 / RB + + + R2 / RT + R2 / RT + + + L3 + L3 + + + Options / Start + Options / Start + + + R3 + R3 + + + Face Buttons + Face Buttons + + + Triangle / Y + Triangle / Y + + + Square / X + Square / X + + + Circle / B + Circle / B + + + Cross / A + Cross / A + + + Right Stick Deadzone (def:2, max:127) + Right Stick Deadzone (def:2, max:127) + + + Right Deadzone + Right Deadzone + + + Right Stick + Right Stick + + + Color Adjustment + Color Adjustment + + + R: + R: + + + G: + G: + + + B: + B: + + + Override Lightbar Color + Override Lightbar Color + + + Override Color + Override Color + + + Unable to Save + Unable to Save + + + Cannot bind axis values more than once + Cannot bind axis values more than once + + + Save + Save + + + Apply + Apply + + + Restore Defaults + Restore Defaults + + + Cancel + Cancel + + + + EditorDialog + + Edit Keyboard + Mouse and Controller input bindings + Edit Keyboard + Mouse and Controller input bindings + + + Use Per-Game configs + Use Per-Game configs + + + Error + Error + + + Could not open the file for reading + Could not open the file for reading + + + Could not open the file for writing + Could not open the file for writing + + + Save Changes + Save Changes + + + Do you want to save changes? + Do you want to save changes? + + + Help + Help + + + Do you want to reset your custom default config to the original default config? + Do you want to reset your custom default config to the original default config? + + + Do you want to reset this config to your custom default config? + Do you want to reset this config to your custom default config? + + + Reset to Default + Reset to Default + + + + ElfViewer + + Open Folder + فولدر را بازکن + + + + GameInfoClass + + Loading game list, please wait :3 + درحال بارگیری لیست بازی ها,لطفا کمی صبرکنید :3 + + + Cancel + لغو + + + Loading... + ...درحال بارگیری + + + + GameInstallDialog + + shadPS4 - Choose directory + ShadPS4 - انتخاب محل نصب بازی + + + Directory to install games + محل نصب بازی ها + + + Browse + انتخاب دستی + + + Error + ارور + + + Directory to install DLC + Directory to install DLC + + + + GameListFrame + + Icon + آیکون + + + Name + نام + + + Serial + سریال + + + Compatibility + سازگاری + + + Region + منطقه + + + Firmware + فریم‌ور + + + Size + اندازه + + + Version + نسخه + + + Path + مسیر + + + Play Time + زمان بازی + + + Never Played + هرگز بازی نشده + + + h + h + + + m + m + + + s + s + + + Compatibility is untested + سازگاری تست نشده است + + + Game does not initialize properly / crashes the emulator + بازی به درستی راه‌اندازی نمی‌شود / شبیه‌ساز کرش می‌کند + + + Game boots, but only displays a blank screen + بازی اجرا می‌شود، اما فقط یک صفحه خالی نمایش داده می‌شود + + + Game displays an image but does not go past the menu + بازی تصویری نمایش می‌دهد، اما از منو فراتر نمی‌رود + + + Game has game-breaking glitches or unplayable performance + بازی دارای اشکالات بحرانی یا عملکرد غیرقابل بازی است + + + Game can be completed with playable performance and no major glitches + بازی با عملکرد قابل قبول و بدون اشکالات عمده قابل بازی است. + + + Click to see details on github + برای مشاهده جزئیات در GitHub کلیک کنید + + + Last updated + آخرین به‌روزرسانی + + + + GameListUtils + + B + B + + + KB + KB + + + MB + MB + + + GB + GB + + + TB + TB + + + + GuiContextMenus + + Create Shortcut + ایجاد میانبر + + + Cheats / Patches + چیت/پچ ها + + + SFO Viewer + SFO مشاهده + + + Trophy Viewer + مشاهده جوایز + + + Open Folder... + باز کردن پوشه... + + + Open Game Folder + باز کردن پوشه بازی + + + Open Save Data Folder + پوشه ذخیره داده را باز کنید + + + Open Log Folder + باز کردن پوشه لاگ + + + Copy info... + ...کپی کردن اطلاعات + + + Copy Name + کپی کردن نام + + + Copy Serial + کپی کردن سریال + + + Copy Version + Copy Version + + + Copy Size + Copy Size + + + Copy All + کپی کردن تمامی مقادیر + + + Delete... + حذف... + + + Delete Game + حذف بازی + + + Delete Update + حذف به‌روزرسانی + + + Delete DLC + حذف محتوای اضافی (DLC) + + + Delete Trophy + Delete Trophy + + + Compatibility... + Compatibility... + + + Update database + Update database + + + View report + View report + + + Submit a report + Submit a report + + + Shortcut creation + ایجاد میانبر + + + Shortcut created successfully! + میانبر با موفقیت ساخته شد! + + + Error + ارور + + + Error creating shortcut! + مشکلی در هنگام ساخت میانبر بوجود آمد! + + + Game + بازی + + + This game has no update to delete! + این بازی به‌روزرسانی‌ای برای حذف ندارد! + + + Update + به‌روزرسانی + + + This game has no DLC to delete! + این بازی محتوای اضافی (DLC) برای حذف ندارد! + + + DLC + DLC + + + Delete %1 + حذف %1 + + + Are you sure you want to delete %1's %2 directory? + Are you sure you want to delete %1's %2 directory? + + + Open Update Folder + Open Update Folder + + + Delete Save Data + Delete Save Data + + + This game has no update folder to open! + This game has no update folder to open! + + + No log file found for this game! + No log file found for this game! + + + Failed to convert icon. + Failed to convert icon. + + + This game has no save data to delete! + This game has no save data to delete! + + + This game has no saved trophies to delete! + This game has no saved trophies to delete! + + + Save Data + Save Data + + + Trophy + Trophy + + + SFO Viewer for + SFO Viewer for + + + + HelpDialog + + Quickstart + Quickstart + + + FAQ + FAQ + + + Syntax + Syntax + + + Special Bindings + Special Bindings + + + Keybindings + Keybindings + + + + KBMSettings + + Configure Controls + Configure Controls + + + D-Pad + D-Pad + + + Up + Up + + + unmapped + unmapped + + + Left + Left + + + Right + Right + + + Down + Down + + + Left Analog Halfmode + Left Analog Halfmode + + + hold to move left stick at half-speed + hold to move left stick at half-speed + + + Left Stick + Left Stick + + + Config Selection + Config Selection + + + Common Config + Common Config + + + Use per-game configs + Use per-game configs + + + L1 + L1 + + + L2 + L2 + + + Text Editor + Text Editor + + + Help + Help + + + R1 + R1 + + + R2 + R2 + + + L3 + L3 + + + Touchpad Click + Touchpad Click + + + Mouse to Joystick + Mouse to Joystick + + + *press F7 ingame to activate + *press F7 ingame to activate + + + R3 + R3 + + + Options + Options + + + Mouse Movement Parameters + Mouse Movement Parameters + + + note: click Help Button/Special Keybindings for more information + note: click Help Button/Special Keybindings for more information + + + Face Buttons + Face Buttons + + + Triangle + Triangle + + + Square + Square + + + Circle + Circle + + + Cross + Cross + + + Right Analog Halfmode + Right Analog Halfmode + + + hold to move right stick at half-speed + hold to move right stick at half-speed + + + Right Stick + Right Stick + + + Speed Offset (def 0.125): + Speed Offset (def 0.125): + + + Copy from Common Config + Copy from Common Config + + + Deadzone Offset (def 0.50): + Deadzone Offset (def 0.50): + + + Speed Multiplier (def 1.0): + Speed Multiplier (def 1.0): + + + Common Config Selected + Common Config Selected + + + This button copies mappings from the Common Config to the currently selected profile, and cannot be used when the currently selected profile is the Common Config. + This button copies mappings from the Common Config to the currently selected profile, and cannot be used when the currently selected profile is the Common Config. + + + Copy values from Common Config + Copy values from Common Config + + + Do you want to overwrite existing mappings with the mappings from the Common Config? + Do you want to overwrite existing mappings with the mappings from the Common Config? + + + Unable to Save + Unable to Save + + + Cannot bind any unique input more than once + Cannot bind any unique input more than once + + + Press a key + Press a key + + + Cannot set mapping + Cannot set mapping + + + Mousewheel cannot be mapped to stick outputs + Mousewheel cannot be mapped to stick outputs + + + Save + Save + + + Apply + Apply + + + Restore Defaults + Restore Defaults + + + Cancel + Cancel + + + + MainWindow + + Open/Add Elf Folder + ELF بازکردن/ساختن پوشه + + + Boot Game + اجرای بازی + + + Check for Updates + به روز رسانی را بررسی کنید + + + About shadPS4 + ShadPS4 درباره + + + Configure... + ...تنظیمات + + + Recent Games + بازی های اخیر + + + Open shadPS4 Folder + Open shadPS4 Folder + + + Exit + خروج + + + Exit shadPS4 + ShadPS4 بستن + + + Exit the application. + بستن برنامه + + + Show Game List + نشان دادن بازی ها + + + Game List Refresh + رفرش لیست بازی ها + + + Tiny + کوچک ترین + + + Small + کوچک + + + Medium + متوسط + + + Large + بزرگ + + + List View + نمایش لیست + + + Grid View + شبکه ای (چهارخونه) + + + Elf Viewer + مشاهده گر Elf + + + Game Install Directory + محل نصب بازی + + + Download Cheats/Patches + دانلود چیت/پچ + + + Dump Game List + استخراج لیست بازی ها + + + Trophy Viewer + Trophy Viewer + + + No games found. Please add your games to your library first. + No games found. Please add your games to your library first. + + + Search... + جست و جو... + + + File + فایل + + + View + شخصی سازی + + + Game List Icons + آیکون ها + + + Game List Mode + حالت نمایش لیست بازی ها + + + Settings + تنظیمات + + + Utils + ابزارها + + + Themes + تم ها + + + Help + کمک + + + Dark + تیره + + + Light + روشن + + + Green + سبز + + + Blue + آبی + + + Violet + بنفش + + + toolBar + نوار ابزار + + + Game List + لیست بازی + + + * 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: + بازی ها: + + + ELF files (*.bin *.elf *.oelf) + ELF فایل های (*.bin *.elf *.oelf) + + + Game Boot + اجرای بازی + + + Only one file can be selected! + فقط یک فایل انتخاب کنید! + + + Run Game + Run Game + + + Eboot.bin file not found + Eboot.bin file not found + + + Game is already running! + Game is already running! + + + shadPS4 + ShadPS4 + + + Play + Play + + + Pause + Pause + + + Stop + Stop + + + Restart + Restart + + + Full Screen + Full Screen + + + Controllers + Controllers + + + Keyboard + Keyboard + + + Refresh List + Refresh List + + + Resume + Resume + + + Show Labels Under Icons + Show Labels Under Icons + + + + SettingsDialog + + Settings + تنظیمات + + + General + عمومی + + + System + سیستم + + + Console Language + زبان کنسول + + + Emulator Language + زبان شبیه ساز + + + Emulator + شبیه ساز + + + Enable Separate Update Folder + فعال‌سازی پوشه جداگانه برای به‌روزرسانی + + + Default tab when opening settings + زبان پیش‌فرض هنگام باز کردن تنظیمات + + + Show Game Size In List + نمایش اندازه بازی در لیست + + + Show Splash + Splash نمایش + + + Enable Discord Rich Presence + Discord Rich Presence را فعال کنید + + + Username + نام کاربری + + + Trophy Key + Trophy Key + + + Trophy + Trophy + + + Open the custom trophy images/sounds folder + Open the custom trophy images/sounds folder + + + Logger + Logger + + + Log Type + Log نوع + + + Log Filter + Log فیلتر + + + Open Log Location + باز کردن مکان گزارش + + + Input + ورودی + + + Cursor + نشانگر + + + Hide Cursor + پنهان کردن نشانگر + + + Hide Cursor Idle Timeout + مخفی کردن زمان توقف مکان نما + + + s + s + + + Controller + دسته بازی + + + Back Button Behavior + رفتار دکمه بازگشت + + + Graphics + گرافیک + + + GUI + رابط کاربری + + + User + کاربر + + + Graphics Device + کارت گرافیک مورداستفاده + + + Vblank Divider + تقسیم‌کننده Vblank + + + Advanced + ...بیشتر + + + Enable Shaders Dumping + فعال‌سازی ذخیره‌سازی شیدرها + + + Enable NULL GPU + NULL GPU فعال کردن + + + Enable HDR + Enable HDR + + + Paths + مسیرها + + + Game Folders + پوشه های بازی + + + Add... + افزودن... + + + Remove + حذف + + + 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 + + + Enable Crash Diagnostics + Enable Crash Diagnostics + + + Collect Shaders + Collect Shaders + + + Copy GPU Buffers + Copy GPU Buffers + + + Host Debug Markers + Host Debug Markers + + + Guest Debug Markers + Guest Debug Markers + + + Update + به‌روزرسانی + + + Check for Updates at Startup + بررسی به‌روزرسانی‌ها در زمان راه‌اندازی + + + Always Show Changelog + نمایش دائم تاریخچه تغییرات + + + Update Channel + کانال به‌روزرسانی + + + Check for Updates + بررسی به‌روزرسانی‌ها + + + GUI Settings + تنظیمات رابط کاربری + + + Title Music + Title Music + + + Disable Trophy Notification + Disable Trophy Notification + + + Background Image + Background Image + + + Show Background Image + Show Background Image + + + Opacity + Opacity + + + Play title music + پخش موسیقی عنوان + + + Update Compatibility Database On Startup + به‌روزرسانی پایگاه داده سازگاری هنگام راه‌اندازی + + + Game Compatibility + سازگاری بازی با سیستم + + + Display Compatibility Data + نمایش داده‌های سازگاری + + + Update Compatibility Database + به‌روزرسانی پایگاه داده سازگاری + + + Volume + صدا + + + Save + ذخیره + + + Apply + اعمال + + + Restore Defaults + بازیابی پیش فرض ها + + + Close + بستن + + + Point your mouse at an option to display its description. + ماوس خود را بر روی یک گزینه قرار دهید تا توضیحات آن نمایش داده شود. + + + Console Language:\nSets the language that the PS4 game uses.\nIt's recommended to set this to a language the game supports, which will vary by region. + Console Language:\nSets the language that the PS4 game uses.\nIt's recommended to set this to a language the game supports, which will vary by region. + + + Emulator Language:\nSets the language of the emulator's user interface. + زبان شبیه‌ساز:\nزبان رابط کاربری شبیه‌ساز را انتخاب می‌کند. + + + Enable Separate Update Folder:\nEnables installing game updates into a separate folder for easy management.\nThis can be manually created by adding the extracted update to the game folder with the name "CUSA00000-UPDATE" where the CUSA ID matches the game's ID. + فعال‌سازی پوشه جداگانه برای به‌روزرسانی:\nامکان نصب به‌روزرسانی‌های بازی در یک پوشه جداگانه برای مدیریت راحت‌تر را فراهم می‌کند. + + + Show Splash Screen:\nShows the game's splash screen (a special image) while the game is starting. + نمایش صفحه شروع:\nصفحه شروع بازی (تصویری ویژه) را هنگام بارگذاری بازی نمایش می‌دهد. + + + Enable Discord Rich Presence:\nDisplays the emulator icon and relevant information on your Discord profile. + فعال کردن Discord Rich Presence:\nآیکون شبیه ساز و اطلاعات مربوطه را در نمایه Discord شما نمایش می دهد. + + + Username:\nSets the PS4's account username, which may be displayed by some games. + نام کاربری:\nنام کاربری حساب PS4 را تنظیم می‌کند که ممکن است توسط برخی بازی‌ها نمایش داده شود. + + + Trophy Key:\nKey used to decrypt trophies. Must be obtained from your jailbroken console.\nMust contain only hex characters. + Trophy Key:\nKey used to decrypt trophies. Must be obtained from your jailbroken console.\nMust contain only hex characters. + + + Log Type:\nSets whether to synchronize the output of the log window for performance. May have adverse effects on emulation. + نوع لاگ:\nتنظیم می‌کند که آیا خروجی پنجره لاگ برای بهبود عملکرد همگام‌سازی شود یا خیر. این ممکن است تأثیر منفی بر شبیه‌سازی داشته باشد. + + + Log Filter:\nFilters the log to only print specific information.\nExamples: "Core:Trace" "Lib.Pad:Debug Common.Filesystem:Error" "*:Critical"\nLevels: Trace, Debug, Info, Warning, Error, Critical - in this order, a specific level silences all levels preceding it in the list and logs every level after it. + Log Filter:\nFilters the log to only print specific information.\nExamples: "Core:Trace" "Lib.Pad:Debug Common.Filesystem:Error" "*:Critical"\nLevels: Trace, Debug, Info, Warning, Error, Critical - in this order, a specific level silences all levels preceding it in the list and logs every level after it. + + + Update:\nRelease: Official versions released every month that may be very outdated, but are more reliable and tested.\nNightly: Development versions that have all the latest features and fixes, but may contain bugs and are less stable. + به‌روزرسانی:\nانتشار: نسخه‌های رسمی که هر ماه منتشر می‌شوند و ممکن است بسیار قدیمی باشند، اما پایدارتر و تست‌ شده‌تر هستند.\nشبانه: نسخه‌های توسعه‌ای که شامل جدیدترین ویژگی‌ها و اصلاحات هستند، اما ممکن است دارای اشکال باشند و کمتر پایدار باشند. + + + Background Image:\nControl the opacity of the game background image. + Background Image:\nControl the opacity of the game background image. + + + Play Title Music:\nIf a game supports it, enable playing special music when selecting the game in the GUI. + پخش موسیقی عنوان:\nIدر صورتی که بازی از آن پشتیبانی کند، پخش موسیقی ویژه هنگام انتخاب بازی در رابط کاربری را فعال می‌کند. + + + Disable Trophy Pop-ups:\nDisable in-game trophy notifications. Trophy progress can still be tracked using the Trophy Viewer (right-click the game in the main window). + غیرفعال کردن نمایش جوایز:\nنمایش اعلان‌های جوایز درون بازی را غیرفعال می‌کند. پیشرفت جوایز همچنان از طریق نمایشگر جوایز (کلیک راست روی بازی در پنجره اصلی) قابل پیگیری است.. + + + Hide Cursor:\nChoose when the cursor will disappear:\nNever: You will always see the mouse.\nidle: Set a time for it to disappear after being idle.\nAlways: you will never see the mouse. + پنهان کردن نشانگر:\nانتخاب کنید که نشانگر چه زمانی ناپدید شود:\nهرگز: شما همیشه ماوس را خواهید دید.\nغیرفعال: زمانی را برای ناپدید شدن بعد از غیرفعالی تعیین کنید.\nهمیشه: شما هرگز ماوس را نخواهید دید. + + + Hide Idle Cursor Timeout:\nThe duration (seconds) after which the cursor that has been idle hides itself. + زمانی را برای ناپدید شدن ماوس بعد از غیرفعالی تعیین کنید. + + + Back Button Behavior:\nSets the controller's back button to emulate tapping the specified position on the PS4 touchpad. + رفتار دکمه برگشت:\nدکمه برگشت کنترلر را طوری تنظیم می کند که ضربه زدن روی موقعیت مشخص شده روی صفحه لمسی PS4 را شبیه سازی کند. + + + Display Compatibility Data:\nDisplays game compatibility information in table view. Enable "Update Compatibility On Startup" to get up-to-date information. + نمایش داده‌های سازگاری:\nاطلاعات سازگاری بازی را به صورت جدول نمایش می‌دهد. برای دریافت اطلاعات به‌روز، گزینه "به‌روزرسانی سازگاری هنگام راه‌اندازی" را فعال کنید. + + + Update Compatibility On Startup:\nAutomatically update the compatibility database when shadPS4 starts. + به‌روزرسانی سازگاری هنگام راه‌اندازی:\nبه‌طور خودکار پایگاه داده سازگاری را هنگام راه‌اندازی ShadPS4 به‌روزرسانی می‌کند. + + + Update Compatibility Database:\nImmediately update the compatibility database. + به‌روزرسانی پایگاه داده سازگاری:\nپایگاه داده سازگاری را بلافاصله به‌روزرسانی می‌کند. + + + Never + هرگز + + + Idle + بیکار + + + Always + همیشه + + + Touchpad Left + صفحه لمسی سمت چپ + + + Touchpad Right + صفحه لمسی سمت راست + + + Touchpad Center + مرکز صفحه لمسی + + + None + هیچ کدام + + + Graphics Device:\nOn multiple GPU systems, select the GPU the emulator will use from the drop down list,\nor select "Auto Select" to automatically determine it. + دستگاه گرافیکی:\nدر سیستم‌های با چندین پردازنده گرافیکی، از فهرست کشویی، پردازنده گرافیکی که شبیه‌ساز از آن استفاده می‌کند را انتخاب کنید، یا گزینه "انتخاب خودکار" را انتخاب کنید تا به طور خودکار تعیین شود. + + + Width/Height:\nSets the size of the emulator window at launch, which can be resized during gameplay.\nThis is different from the in-game resolution. + عرض/ارتفاع:\nاندازه پنجره شبیه‌ساز را در هنگام راه‌اندازی تنظیم می‌کند، که در حین بازی قابل تغییر اندازه است.\nاین با وضوح داخل بازی متفاوت است. + + + Vblank Divider:\nThe frame rate at which the emulator refreshes at is multiplied by this number. Changing this may have adverse effects, such as increasing the game speed, or breaking critical game functionality that does not expect this to change! + تقسیم‌کننده Vblank:\nمیزان فریم ریت که شبیه‌ساز با آن به‌روزرسانی می‌شود، در این عدد ضرب می‌شود. تغییر این مقدار ممکن است تأثیرات منفی داشته باشد، مانند افزایش سرعت بازی یا خراب شدن عملکردهای حیاتی بازی که انتظار تغییر آن را ندارند! + + + Enable Shaders Dumping:\nFor the sake of technical debugging, saves the games shaders to a folder as they render. + فعال‌سازی ذخیره‌سازی شیدرها:\nبه‌منظور اشکال‌زدایی فنی، شیدرهای بازی را هنگام رندر شدن در یک پوشه ذخیره می‌کند. + + + Enable Null GPU:\nFor the sake of technical debugging, disables game rendering as if there were no graphics card. + Enable Null GPU:\nFor the sake of technical debugging, disables game rendering as if there were no graphics card. + + + Enable HDR:\nEnables HDR in games that support it.\nYour monitor must have support for the BT2020 PQ color space and the RGB10A2 swapchain format. + Enable HDR:\nEnables HDR in games that support it.\nYour monitor must have support for the BT2020 PQ color space and the RGB10A2 swapchain format. + + + Game Folders:\nThe list of folders to check for installed games. + پوشه های بازی:\nلیست پوشه هایی که باید بازی های نصب شده را بررسی کنید. + + + Add:\nAdd a folder to the list. + اضافه کردن:\nیک پوشه به لیست اضافه کنید. + + + Remove:\nRemove a folder from the list. + حذف:\nیک پوشه را از لیست حذف کنید. + + + Enable Debug Dumping:\nSaves the import and export symbols and file header information of the currently running PS4 program to a directory. + فعال‌سازی ذخیره‌سازی دیباگ:\nنمادهای import و export و اطلاعات هدر فایل برنامه در حال اجرای PS4 را در یک پوشه ذخیره می‌کند. + + + Enable Vulkan Validation Layers:\nEnables a system that validates the state of the Vulkan renderer and logs information about its internal state.\nThis will reduce performance and likely change the behavior of emulation. + Enable Vulkan Validation Layers:\nEnables a system that validates the state of the Vulkan renderer and logs information about its internal state.\nThis will reduce performance and likely change the behavior of emulation. + + + Enable Vulkan Synchronization Validation:\nEnables a system that validates the timing of Vulkan rendering tasks.\nThis will reduce performance and likely change the behavior of emulation. + Enable Vulkan Synchronization Validation:\nEnables a system that validates the timing of Vulkan rendering tasks.\nThis will reduce performance and likely change the behavior of emulation. + + + Enable RenderDoc Debugging:\nIf enabled, the emulator will provide compatibility with Renderdoc to allow capture and analysis of the currently rendered frame. + Enable RenderDoc Debugging:\nIf enabled, the emulator will provide compatibility with Renderdoc to allow capture and analysis of the currently rendered frame. + + + Collect Shaders:\nYou need this enabled to edit shaders with the debug menu (Ctrl + F10). + Collect Shaders:\nYou need this enabled to edit shaders with the debug menu (Ctrl + F10). + + + Crash Diagnostics:\nCreates a .yaml file with info about the Vulkan state at the time of crashing.\nUseful for debugging 'Device lost' errors. If you have this enabled, you should enable Host AND Guest Debug Markers.\nDoes not work on Intel GPUs.\nYou need Vulkan Validation Layers enabled and the Vulkan SDK for this to work. + Crash Diagnostics:\nCreates a .yaml file with info about the Vulkan state at the time of crashing.\nUseful for debugging 'Device lost' errors. If you have this enabled, you should enable Host AND Guest Debug Markers.\nDoes not work on Intel GPUs.\nYou need Vulkan Validation Layers enabled and the Vulkan SDK for this to work. + + + Copy GPU Buffers:\nGets around race conditions involving GPU submits.\nMay or may not help with PM4 type 0 crashes. + Copy GPU Buffers:\nGets around race conditions involving GPU submits.\nMay or may not help with PM4 type 0 crashes. + + + Host Debug Markers:\nInserts emulator-side information like markers for specific AMDGPU commands around Vulkan commands, as well as giving resources debug names.\nIf you have this enabled, you should enable Crash Diagnostics.\nUseful for programs like RenderDoc. + Host Debug Markers:\nInserts emulator-side information like markers for specific AMDGPU commands around Vulkan commands, as well as giving resources debug names.\nIf you have this enabled, you should enable Crash Diagnostics.\nUseful for programs like RenderDoc. + + + Guest Debug Markers:\nInserts any debug markers the game itself has added to the command buffer.\nIf you have this enabled, you should enable Crash Diagnostics.\nUseful for programs like RenderDoc. + Guest Debug Markers:\nInserts any debug markers the game itself has added to the command buffer.\nIf you have this enabled, you should enable Crash Diagnostics.\nUseful for programs like RenderDoc. + + + Save Data Path:\nThe folder where game save data will be saved. + Save Data Path:\nThe folder where game save data will be saved. + + + Browse:\nBrowse for a folder to set as the save data path. + Browse:\nBrowse for a folder to set as the save data path. + + + Release + Release + + + Nightly + Nightly + + + Set the volume of the background music. + Set the volume of the background music. + + + Enable Motion Controls + Enable Motion Controls + + + Save Data Path + Save Data Path + + + Browse + انتخاب دستی + + + async + async + + + sync + sync + + + Auto Select + Auto Select + + + Directory to install games + محل نصب بازی ها + + + Directory to save data + Directory to save data + + + Video + Video + + + Display Mode + Display Mode + + + Windowed + Windowed + + + Fullscreen + Fullscreen + + + Fullscreen (Borderless) + Fullscreen (Borderless) + + + Window Size + Window Size + + + W: + W: + + + H: + H: + + + Separate Log Files + Separate Log Files + + + Separate Log Files:\nWrites a separate logfile for each game. + Separate Log Files:\nWrites a separate logfile for each game. + + + Trophy Notification Position + Trophy Notification Position + + + Left + Left + + + Right + Right + + + Top + Top + + + Bottom + Bottom + + + Notification Duration + Notification Duration + + + Portable User Folder + Portable User Folder + + + Create Portable User Folder from Common User Folder + Create Portable User Folder from Common User Folder + + + Portable user folder:\nStores shadPS4 settings and data that will be applied only to the shadPS4 build located in the current folder. Restart the app after creating the portable user folder to begin using it. + Portable user folder:\nStores shadPS4 settings and data that will be applied only to the shadPS4 build located in the current folder. Restart the app after creating the portable user folder to begin using it. + + + Cannot create portable user folder + Cannot create portable user folder + + + %1 already exists + %1 already exists + + + Portable user folder created + Portable user folder created + + + %1 successfully created. + %1 successfully created. + + + Open the custom trophy images/sounds folder:\nYou can add custom images to the trophies and an audio.\nAdd the files to custom_trophy with the following names:\ntrophy.wav OR trophy.mp3, bronze.png, gold.png, platinum.png, silver.png\nNote: The sound will only work in QT versions. + Open the custom trophy images/sounds folder:\nYou can add custom images to the trophies and an audio.\nAdd the files to custom_trophy with the following names:\ntrophy.wav OR trophy.mp3, bronze.png, gold.png, platinum.png, silver.png\nNote: The sound will only work in QT versions. + + + + TrophyViewer + + Trophy Viewer + مشاهده جوایز + + + Select Game: + Select Game: + + + Progress + Progress + + + Show Earned Trophies + Show Earned Trophies + + + Show Not Earned Trophies + Show Not Earned Trophies + + + Show Hidden Trophies + Show Hidden Trophies + + diff --git a/src/qt_gui/translations/fi.ts b/src/qt_gui/translations/fi.ts deleted file mode 100644 index cdf331796..000000000 --- a/src/qt_gui/translations/fi.ts +++ /dev/null @@ -1,1664 +0,0 @@ - - - - - - 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... - - - - InstallDirSelect - - - shadPS4 - Choose directory - shadPS4 - Choose directory - - - - Select which directory you want to install to. - Select which directory you want to install to. - - - - 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 - - - - Cheats / Patches - Huijaukset / Korjaukset - - - - SFO Viewer - SFO Viewer - - - - Trophy Viewer - Trophy Viewer - - - - Open Folder... - Avaa Kansio... - - - - Open Game Folder - Avaa Pelikansio - - - - Open Save Data Folder - Avaa Tallennustiedostokansio - - - - Open Log Folder - Avaa Lokikansio - - - - Copy info... - Copy info... - - - - Copy Name - Copy Name - - - - Copy Serial - Copy Serial - - - - Copy All - Copy All - - - - Delete... - Delete... - - - - Delete Game - Delete Game - - - - Delete Update - Delete Update - - - - Delete DLC - Delete DLC - - - - Compatibility... - Compatibility... - - - - Update database - Update database - - - - View report - View report - - - - Submit a report - Submit a report - - - - Shortcut creation - Shortcut creation - - - - Shortcut created successfully! - Shortcut created successfully! - - - - Error - Error - - - - Error creating shortcut! - Error creating shortcut! - - - - Install PKG - Install PKG - - - - Game - Game - - - - requiresEnableSeparateUpdateFolder_MSG - This feature requires the 'Enable Separate Update Folder' config option to work. If you want to use this feature, please enable it. - - - - This game has no update to delete! - This game has no update to delete! - - - - Update - Update - - - - This game has no DLC to delete! - This game has no DLC to delete! - - - - DLC - DLC - - - - Delete %1 - Delete %1 - - - - Are you sure you want to delete %1's %2 directory? - Are you sure you want to delete %1's %2 directory? - - - - MainWindow - - - Open/Add Elf Folder - Open/Add Elf Folder - - - - Install Packages (PKG) - Install Packages (PKG) - - - - Boot Game - Boot Game - - - - Check for Updates - Tarkista päivitykset - - - - 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 - - - - Download Cheats/Patches - Lataa Huijaukset / Korjaukset - - - - 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 - - - - Help - Apua - - - - 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 - - - - Enable Separate Update Folder - Enable Separate Update Folder - - - - Show Splash - Show Splash - - - - Is PS4 Pro - Is PS4 Pro - - - - Enable Discord Rich Presence - Ota käyttöön Discord Rich Presence - - - - Username - Username - - - - Trophy Key - Trophy Key - - - - Trophy - Trophy - - - - Logger - Logger - - - - Log Type - Log Type - - - - Log Filter - Log Filter - - - - Input - Syöttö - - - - Cursor - Kursori - - - - Hide Cursor - Piilota kursor - - - - Hide Cursor Idle Timeout - Inaktiivisuuden aikaraja kursorin piilottamiselle - - - - s - s - - - - Controller - Ohjain - - - - Back Button Behavior - Takaisin-painikkeen käyttäytyminen - - - - 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 - - - - Paths - Polut - - - - Game Folders - Pelihakemistot - - - - Add... - Lisää... - - - - Remove - Poista - - - - 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 - - - - Update - Päivitys - - - - Check for Updates at Startup - Tarkista päivitykset alussa - - - - Update Channel - Päivityskanava - - - - Check for Updates - Tarkista päivitykset - - - - GUI Settings - GUI-Asetukset - - - - Disable Trophy Pop-ups - Disable Trophy Pop-ups - - - - Play title music - Soita otsikkomusiikkia - - - - Update Compatibility Database On Startup - Update Compatibility Database On Startup - - - - Game Compatibility - Game Compatibility - - - - Display Compatibility Data - Display Compatibility Data - - - - Update Compatibility Database - Update Compatibility Database - - - - Volume - Äänenvoimakkuus - - - - Audio Backend - Audio Backend - - - - MainWindow - - - Game List - Pelilista - - - - * 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! - Päivitys havaittu! - - - - PKG and Game versions match: - PKG- ja peliversiot vastaavat: - - - - Would you like to overwrite? - Haluatko korvata? - - - - PKG Version %1 is older than installed version: - PKG-versio %1 on vanhempi kuin asennettu versio: - - - - Game is installed: - Peli on asennettu: - - - - Would you like to install Patch: - Haluatko asentaa päivityksen: - - - - DLC Installation - DLC-asennus - - - - Would you like to install DLC: %1? - Haluatko asentaa DLC:n: %1? - - - - DLC already installed: - DLC on jo asennettu: - - - - Game already installed - Peli on jo asennettu - - - - 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 for - Cheats / Patches for - - - - 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. Jos päivitystä ei näy, se saattaa olla, että sitä ei ole saatavilla tietylle sarjanumerolle ja peliversiolle. - - - - 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. - - - - The game is in version: %1 - Peli on versiossa: %1 - - - - The downloaded patch only works on version: %1 - ladattu päivitys toimii vain versiossa: %1 - - - - You may need to update your game. - Sinun on ehkä päivitettävä peliäsi. - - - - Incompatibility Notice - Yhteensopivuusilmoitus - - - - 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: - - - - Can't apply cheats before the game is started - Ei voi käyttää huijauksia ennen kuin peli on aloitettu. - - - - SettingsDialog - - - Save - Tallenna - - - - Apply - Ota käyttöön - - - - Restore Defaults - Palauta oletukset - - - - Close - Sulje - - - - Point your mouse at an option to display its description. - Siirrä hiiri vaihtoehdon päälle näyttämään sen kuvaus. - - - - consoleLanguageGroupBox - Konsoli Kieli:\nAseta PS4 pelin käyttämä kieli.\nOn suositeltavaa asettaa tämä kieleksi, jota peli tukee, mikä vaihtelee alueittain. - - - - emulatorLanguageGroupBox - Emulaattorin Kieli:\nAsettaa emulaattorin käyttöliittymän kielen. - - - - fullscreenCheckBox - Ota Täysikokoisuus käyttöön:\nSiirtää pelin ikkunan automaattisesti täysikokoiseen tilaan.\nTätä voidaan vaihtaa painamalla F11-näppäintä. - - - - separateUpdatesCheckBox - Enable Separate Update Folder:\nEnables installing game updates into a separate folder for easy management. - - - - showSplashCheckBox - Näytä Alkunäyttö:\nNäyttää pelin alkunäytön (erityinen kuva) pelin käynnistyessä. - - - - ps4proCheckBox - Onko PS4 Pro:\nAsettaa emulaattorin toimimaan PS4 PRO:na, mikä voi mahdollistaa erityisiä ominaisuuksia peleissä, jotka tukevat sitä. - - - - discordRPCCheckbox - Ota käyttöön Discord Rich Presence:\nNäyttää emulaattorin kuvakkeen ja asiaankuuluvat tiedot Discord-profiilissasi. - - - - userName - Käyttäjänimi:\nAsettaa PS4-tilin käyttäjänimen, joka voi näkyä joissakin peleissä. - - - - TrophyKey - Trophy Key:\nKey used to decrypt trophies. Must be obtained from your jailbroken console.\nMust contain only hex characters. - - - - logTypeGroupBox - Lokityyppi:\nAsettaa, synkronoidaanko loki-ikkunan ulostulo suorituskyvyn vuoksi. Tämä voi vaikuttaa haitallisesti emulointiin. - - - - logFilter - Lokifiltteri:\nSuodattaa lokia tulostamaan vain erityistä tietoa.\nEsimerkkejä: "Core:Trace" "Lib.Pad:Debug Common.Filesystem:Error" "*:Critical" Tasot: Jälki, Virheenkorjaus, Tieto, Varoitus, Virhe, Kriittinen - tällä järjestyksellä, tietty taso vaientaa kaikki edeltävät tasot luettelossa ja kirjaa kaikki tasot sen jälkeen. - - - - updaterGroupBox - Päivitys:\nRelease: Viralliset versiot, jotka julkaistaan joka kuukausi ja voivat olla hyvin vanhoja, mutta ovat luotettavampia ja testatumpia.\nNightly: Kehitysversiot, joissa on kaikki uusimmat ominaisuudet ja korjaukset, mutta ne voivat sisältää bugeja ja ovat vähemmän vakaita. - - - - GUIgroupBox - Soita Otsikkomusiikkia:\nJos peli tukee sitä, ota käyttöön erityisen musiikin soittaminen pelin valinnan yhteydessä käyttöliittymässä. - - - - disableTrophycheckBox - Disable Trophy Pop-ups:\nDisable in-game trophy notifications. Trophy progress can still be tracked using the Trophy Viewer (right-click the game in the main window). - - - - hideCursorGroupBox - Piilota kursori:\nValitse, milloin kursori häviää:\nEi koskaan: Näet hiiren aina.\nAktiivinen: Aseta aika, jolloin se häviää oltuaan aktiivinen.\nAina: et koskaan näe hiirtä. - - - - idleTimeoutGroupBox - Aseta aika, jolloin hiiri häviää oltuaan aktiivinen. - - - - backButtonBehaviorGroupBox - Takaisin-napin käyttäytyminen:\nAsettaa ohjaimen takaisin-napin jäljittelemään kosketusta PS4:n kosketuslevyn määritettyyn kohtaan. - - - - enableCompatibilityCheckBox - Display Compatibility Data:\nDisplays game compatibility information in table view. Enable "Update Compatibility On Startup" to get up-to-date information. - - - - checkCompatibilityOnStartupCheckBox - Update Compatibility On Startup:\nAutomatically update the compatibility database when shadPS4 starts. - - - - updateCompatibilityButton - Update Compatibility Database:\nImmediately update the compatibility database. - - - - Never - Ei koskaan - - - - Idle - Odotustila - - - - Always - aina - - - - Touchpad Left - Kosketuslevy Vasemmalla - - - - Touchpad Right - Kosketuslevy Oikealla - - - - Touchpad Center - Kosketuslevy Keskellä - - - - None - Ei mitään - - - - graphicsAdapterGroupBox - Kuvakortti:\nValitse GPU, jota emulaattori käyttää monigpu-järjestelmissä pudotusvalikosta,\n tai valitse "Auto Select" automaattiseen määrittämiseen. - - - - resolutionLayout - Leveys/Korkeus:\nAsettaa emulaattorin ikkunan koon käynnistyksen aikana, jota voidaan muuttaa pelin aikana.\nTämä on eri kuin pelin sisäinen resoluutio. - - - - heightDivider - Vblank Jakaja:\nEmulaattorin virkistystaajuus kerrotaan tällä numerolla. Tämän muuttaminen voi vaikuttaa haitallisesti, kuten pelin nopeuden lisääminen tai kriittisten pelitoimintojen rikkoutuminen, jotka eivät odota tämän muuttuvan! - - - - dumpShadersCheckBox - Ota Shadersin dumpaus käyttöön:\nTeknistä vianetsintää varten pelin shadereita tallennetaan kansioon niiden renderöinnin aikana. - - - - nullGpuCheckBox - Ota Null GPU käyttöön:\nTeknistä vianetsintää varten pelin renderöinti estetään niin, että ikään kuin grafiikkakorttia ei olisi. - - - - gameFoldersBox - Pelihakemistot:\nLuettelo hakemistoista asennettujen pelien tarkistamiseksi. - - - - addFolderButton - Lisää:\nLisää hakemisto luetteloon. - - - - removeFolderButton - Poista:\nPoista hakemisto luettelosta. - - - - debugDump - Ota Debug Dumpaus käyttöön:\nTallentaa käynnissä olevan PS4-ohjelman tuonti- ja vientisymbolit ja tiedosto-otsikkotiedot hakemistoon. - - - - vkValidationCheckBox - Ota Vulkanin Validointikerrokset käyttöön:\nAktivoi järjestelmä, joka validoi Vulkan-renderöijän tilan ja kirjaa tietoa sen sisäisestä tilasta. Tämä heikentää suorituskykyä ja todennäköisesti muuttaa emulaation käyttäytymistä. - - - - vkSyncValidationCheckBox - Ota Vulkanin Synkronointivalaistus käyttöön:\nAktivoi järjestelmä, joka validoi Vulkan-renderöinnin tehtävien aikataulutuksen. Tämä heikentää suorituskykyä ja todennäköisesti muuttaa emulaation käyttäytymistä. - - - - rdocCheckBox - Ota RenderDoc Debugging käyttöön:\nJos se on käytössä, emulaattori tarjoaa yhteensopivuuden Renderdocin kanssa, mikä mahdollistaa nykyisen renderöidyn kehyksen tallennuksen ja analysoinnin. - - - - GameListFrame - - - Icon - Ikoni - - - - Name - Nimi - - - - Serial - Sarjanumero - - - - Compatibility - Compatibility - - - - Region - Alue - - - - Firmware - Ohjelmisto - - - - Size - Koko - - - - Version - Versio - - - - Path - Polku - - - - Play Time - Peliaika - - - - Never Played - Never Played - - - - h - h - - - - m - m - - - - s - s - - - - Compatibility is untested - Compatibility is untested - - - - Game does not initialize properly / crashes the emulator - Game does not initialize properly / crashes the emulator - - - - Game boots, but only displays a blank screen - Game boots, but only displays a blank screen - - - - Game displays an image but does not go past the menu - Game displays an image but does not go past the menu - - - - Game has game-breaking glitches or unplayable performance - Game has game-breaking glitches or unplayable performance - - - - Game can be completed with playable performance and no major glitches - Game can be completed with playable performance and no major glitches - - - - CheckUpdate - - - Auto Updater - Automaattinen päivitys - - - - Error - Virhe - - - - Network error: - Verkkovirhe: - - - - Failed to parse update information. - Päivitysinformaation jäsentäminen epäonnistui. - - - - No pre-releases found. - Ennakkojulkaisuja ei löytynyt. - - - - Invalid release data. - Virheelliset julkaisutiedot. - - - - No download URL found for the specified asset. - Ei lataus-URL:ia löytynyt määritetylle omaisuudelle. - - - - Your version is already up to date! - Versiosi on jo ajan tasalla! - - - - Update Available - Päivitys saatavilla - - - - Update Channel - Päivityskanava - - - - Current Version - Nykyinen versio - - - - Latest Version - Uusin versio - - - - Do you want to update? - Haluatko päivittää? - - - - Show Changelog - Näytä muutospäiväkirja - - - - Check for Updates at Startup - Tarkista päivitykset alussa - - - - Update - Päivitä - - - - No - Ei - - - - Hide Changelog - Piilota muutospäiväkirja - - - - Changes - Muutos - - - - Network error occurred while trying to access the URL - Verkkovirhe tapahtui yrittäessäsi päästä URL-osoitteeseen - - - - Download Complete - Download valmis - - - - The update has been downloaded, press OK to install. - Päivitys on ladattu, paina OK asentaaksesi. - - - - Failed to save the update file at - Päivitystiedoston tallentaminen epäonnistui osoitteeseen - - - - Starting Update... - Aloitetaan päivitys... - - - - Failed to create the update script file - Päivitysskripttitiedoston luominen epäonnistui - - - - GameListUtils - - - B - B - - - - KB - KB - - - - MB - MB - - - - GB - GB - - - - TB - TB - - - \ No newline at end of file diff --git a/src/qt_gui/translations/fi_FI.ts b/src/qt_gui/translations/fi_FI.ts new file mode 100644 index 000000000..d07f82bd5 --- /dev/null +++ b/src/qt_gui/translations/fi_FI.ts @@ -0,0 +1,2089 @@ + + + + + + AboutDialog + + About shadPS4 + Tietoa shadPS4:sta + + + shadPS4 is an experimental open-source emulator for the PlayStation 4. + shadPS4 on kokeellinen avoimen lähdekoodin PlayStation 4 emulaattori. + + + This software should not be used to play games you have not legally obtained. + Tätä ohjelmistoa ei saa käyttää pelien pelaamiseen, joita et ole hankkinut laillisesti. + + + + CheatsPatches + + Cheats / Patches for + Huijaukset / Paikkaukset pelille + + + 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:\n + Huijaukset/Paikkaukset ovat kokeellisia.\nKäytä varoen.\n\nLataa huijaukset yksitellen valitsemalla repositorion ja napsauttamalla latauspainiketta.\nPaikkaukset-välilehdessä voit ladata kaikki paikkaukset kerralla, valita, mitä haluat käyttää ja tallentaa valinnan.\n\nKoska me emme kehitä Huijauksia/Paikkauksia,\nole hyvä ja ilmoita ongelmista huijauksen tekijälle.\n\nLoitko uuden huijauksen? Käy osoitteessa:\n + + + No Image Available + Kuvaa ei saatavilla + + + Serial: + Sarjanumero: + + + Version: + Versio: + + + Size: + Koko: + + + Select Cheat File: + Valitse Huijaustiedosto: + + + Repository: + Repositorio: + + + Download Cheats + Lataa Huijaukset + + + Delete File + Poista Tiedosto + + + No files selected. + Tiedostoja ei ole valittuna. + + + 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 Paikkaustiedosto: + + + Download Patches + Lataa Paikkaukset + + + Save + Tallenna + + + Cheats + Huijaukset + + + Patches + Paikkaukset + + + Error + Virhe + + + No patch selected. + Paikkausta ei ole valittuna. + + + 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 paikkaustiedostoa. + + + 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 + Onnistuminen + + + Options saved successfully. + Vaihtoehdot tallennettu onnistuneesti. + + + Invalid Source + Virheellinen Lähde + + + The selected source is invalid. + Valittu lähde on virheellinen. + + + File Exists + Olemassaoleva Tiedosto + + + 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 + + + No Cheats found for this game in this version of the selected repository,try another repository or a different version of the game. + Huijauksia ei löytynyt tälle pelin versiolle valitusta repositoriosta. Kokeile toista repositoriota tai eri versiota pelistä. + + + Cheats Downloaded Successfully + Huijaukset Ladattu Onnistuneesti + + + 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. + 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 listasta. + + + Failed to save: + Tallentaminen epäonnistui: + + + Failed to download: + Lataus epäonnistui: + + + Download Complete + Lataus valmis + + + 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. If the patch does not appear, it may be that it does not exist for the specific serial and version of the game. + Paikkaukset ladattu onnistuneesti! Kaikki saatavilla olevat paikkaukset kaikille peleille on ladattu, eikä niitä tarvitse ladata yksittäin jokaiselle pelille, kuten huijausten kohdalla. Jos paikkausta ei näy, saattaa olla, että sitä ei ole saatavilla kyseiselle sarjanumerolle ja peliversiolle. + + + 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. + + + The game is in version: %1 + Peli on versiossa: %1 + + + The downloaded patch only works on version: %1 + Ladattu paikkaus toimii vain versiossa: %1 + + + You may need to update your game. + Sinun on ehkä päivitettävä pelisi. + + + Incompatibility Notice + Yhteensopivuusilmoitus + + + 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: + Hakemistoa ei ole olemassa: + + + Failed to open files.json for reading. + Tiedostoa files.json ei voitu avata lukemista varten. + + + Name: + Nimi: + + + Can't apply cheats before the game is started + Huijauksia ei voi käyttää ennen kuin peli on käynnissä. + + + Close + Sulje + + + + CheckUpdate + + Auto Updater + Automaattinen Päivitys + + + Error + Virhe + + + Network error: + Verkkovirhe: + + + The Auto Updater allows up to 60 update checks per hour.\nYou have reached this limit. Please try again later. + Automaattinen päivitys sallii enintään 60 päivitystarkistusta tunnissa.\nOlet saavuttanut tämän rajan. Yritä myöhemmin uudelleen. + + + Failed to parse update information. + Päivitystietojen jäsentäminen epäonnistui. + + + No pre-releases found. + Ennakkojulkaisuja ei löytynyt. + + + Invalid release data. + Virheelliset julkaisutiedot. + + + No download URL found for the specified asset. + Lataus-URL:ia ei löytynyt määritetylle omaisuudelle. + + + Your version is already up to date! + Versiosi on jo ajan tasalla! + + + Update Available + Päivitys Saatavilla + + + Update Channel + Päivityskanava + + + Current Version + Nykyinen Versio + + + Latest Version + Uusin Versio + + + Do you want to update? + Haluatko päivittää? + + + Show Changelog + Näytä Muutoshistoria + + + Check for Updates at Startup + Tarkista Päivitykset Käynnistettäessä + + + Update + Päivitä + + + No + Ei + + + Hide Changelog + Piilota Muutoshistoria + + + Changes + Muutokset + + + Network error occurred while trying to access the URL + URL-osoitteeseen yhdistettäessä tapahtui verkkovirhe + + + Download Complete + Lataus Valmis + + + The update has been downloaded, press OK to install. + Päivitys on ladattu, paina OK asentaaksesi. + + + Failed to save the update file at + Päivitystiedoston tallentaminen epäonnistui sijaintiin + + + Starting Update... + Aloitetaan päivitystä... + + + Failed to create the update script file + Päivitysskripttitiedoston luominen epäonnistui + + + + CompatibilityInfoClass + + Fetching compatibility data, please wait + Haetaan yhteensopivuustietoja, odota + + + Cancel + Peruuta + + + Loading... + Ladataan... + + + Error + Virhe + + + Unable to update compatibility data! Try again later. + Yhteensopivuustietoja ei voitu päivittää! Yritä myöhemmin uudelleen. + + + Unable to open compatibility_data.json for writing. + Ei voitu avata compatibility_data.json-tiedostoa kirjoittamista varten. + + + Unknown + Tuntematon + + + Nothing + Ei mitään + + + Boots + Sahat + + + Menus + Valikot + + + Ingame + Pelin aikana + + + Playable + Pelattava + + + + ControlSettings + + Configure Controls + Määritä Kontrollit + + + D-Pad + D-Pad + + + Up + Ylös + + + Left + Vasen + + + Right + Oikea + + + Down + Alas + + + Left Stick Deadzone (def:2 max:127) + Vasemman Analogin Deadzone (oletus:2 max:127) + + + Left Deadzone + Vasen Deadzone + + + Left Stick + Vasen Analogi + + + Config Selection + Asetusten Valinta + + + Common Config + Yleinen Asetus + + + Use per-game configs + Käytä pelikohtaisia asetuksia + + + L1 / LB + L1 / LB + + + L2 / LT + L2 / LT + + + Back + Back + + + R1 / RB + R1 / RB + + + R2 / RT + R2 / RT + + + L3 + L3 + + + Options / Start + Options / Start + + + R3 + R3 + + + Face Buttons + Etunäppäimet + + + Triangle / Y + Kolmio / Y + + + Square / X + Neliö / X + + + Circle / B + Ympyrä / B + + + Cross / A + Rasti / A + + + Right Stick Deadzone (def:2, max:127) + Oikean Analogin Deadzone (oletus:2 max:127) + + + Right Deadzone + Oikea Deadzone + + + Right Stick + Oikea Analogi + + + Color Adjustment + Värinhallinta + + + R: + R: + + + G: + G: + + + B: + B: + + + Override Lightbar Color + Pakota Ohjaimen Valopalkin Väri + + + Override Color + Pakotettava Väri + + + Unable to Save + Tallentaminen Epäonnistui + + + Cannot bind axis values more than once + Akseliarvoja ei voi määrittää kertaa useammin + + + Save + Tallenna + + + Apply + Ota Käyttöön + + + Restore Defaults + Palauta Oletukset + + + Cancel + Peruuta + + + + EditorDialog + + Edit Keyboard + Mouse and Controller input bindings + Muokkaa Näppäimistön + Hiiren ja Ohjaimen näppäinasetuksia + + + Use Per-Game configs + Käytä Pelikohtaisia Asetuksia + + + Error + Virhe + + + Could not open the file for reading + Tiedostoa ei voitu avata luettavaksi + + + Could not open the file for writing + Tiedostoa ei voitu avata kirjoitettavaksi + + + Save Changes + Tallenna Muutokset + + + Do you want to save changes? + Haluatko tallentaa muutokset? + + + Help + Tietoa + + + Do you want to reset your custom default config to the original default config? + Haluatko nollata oletusasetuksiin tekemäsi muutokset? + + + Do you want to reset this config to your custom default config? + Haluato palauttaa nämä asetukset takaisin määrittämiisi oletuksiin? + + + Reset to Default + Reset to Default + + + + ElfViewer + + Open Folder + Avaa Hakemisto + + + + GameInfoClass + + Loading game list, please wait :3 + Ole hyvä ja odota, ladataan pelilistaa :3 + + + Cancel + Peruuta + + + Loading... + Ladataan... + + + + GameInstallDialog + + shadPS4 - Choose directory + shadPS4 - Valitse hakemisto + + + Directory to install games + Pelien asennushakemisto + + + Browse + Selaa + + + Error + Virhe + + + Directory to install DLC + Directory to install DLC + + + + GameListFrame + + Icon + Ikoni + + + Name + Nimi + + + Serial + Sarjanumero + + + Compatibility + Compatibility + + + Region + Alue + + + Firmware + Ohjelmisto + + + Size + Koko + + + Version + Versio + + + Path + Polku + + + Play Time + Peliaika + + + Never Played + Pelaamaton + + + h + h + + + m + m + + + s + s + + + Compatibility is untested + Yhteensopivuutta ei ole testattu + + + Game does not initialize properly / crashes the emulator + Peli ei alustaudu kunnolla / kaataa emulaattorin + + + Game boots, but only displays a blank screen + Peli käynnistyy, mutta näyttää vain tyhjän ruudun + + + Game displays an image but does not go past the menu + Peli näyttää kuvan mutta ei mene valikosta eteenpäin + + + Game has game-breaking glitches or unplayable performance + Pelissä on pelikokemusta rikkovia häiriöitä tai kelvoton suorituskyky + + + Game can be completed with playable performance and no major glitches + Pelillä on hyväksyttävä suorituskyky, eikä mitään suuria häiriöitä + + + Click to see details on github + Napsauta nähdäksesi lisätiedot GitHubissa + + + Last updated + Viimeksi päivitetty + + + + GameListUtils + + B + B + + + KB + KB + + + MB + MB + + + GB + GB + + + TB + TB + + + + GuiContextMenus + + Create Shortcut + Luo Pikakuvake + + + Cheats / Patches + Huijaukset / Korjaukset + + + SFO Viewer + SFO Selain + + + Trophy Viewer + Trophy Selain + + + Open Folder... + Avaa Hakemisto... + + + Open Game Folder + Avaa Pelihakemisto + + + Open Save Data Folder + Avaa Tallennustiedostohakemisto + + + Open Log Folder + Avaa Lokihakemisto + + + Copy info... + Kopioi tietoja... + + + Copy Name + Kopioi Nimi + + + Copy Serial + Kopioi Sarjanumero + + + Copy Version + Copy Version + + + Copy Size + Copy Size + + + Copy All + Kopioi kaikki + + + Delete... + Poista... + + + Delete Game + Poista Peli + + + Delete Update + Poista Päivitys + + + Delete DLC + Poista Lisäsisältö + + + Delete Trophy + Delete Trophy + + + Compatibility... + Yhteensopivuus... + + + Update database + Päivitä tietokanta + + + View report + Näytä raportti + + + Submit a report + Tee raportti + + + Shortcut creation + Pikakuvakkeen luonti + + + Shortcut created successfully! + Pikakuvake luotu onnistuneesti! + + + Error + Virhe + + + Error creating shortcut! + Virhe pikakuvakkeen luonnissa! + + + Game + Peli + + + This game has no update to delete! + Tällä pelillä ei ole poistettavaa päivitystä! + + + Update + Päivitä + + + This game has no DLC to delete! + Tällä pelillä ei ole poistettavaa lisäsisältöä! + + + DLC + Lisäsisältö + + + Delete %1 + Poista %1 + + + Are you sure you want to delete %1's %2 directory? + Haluatko varmasti poistaa %1n %2hakemiston? + + + Open Update Folder + Open Update Folder + + + Delete Save Data + Delete Save Data + + + This game has no update folder to open! + This game has no update folder to open! + + + No log file found for this game! + No log file found for this game! + + + Failed to convert icon. + Failed to convert icon. + + + This game has no save data to delete! + This game has no save data to delete! + + + This game has no saved trophies to delete! + This game has no saved trophies to delete! + + + Save Data + Save Data + + + Trophy + Trophy + + + SFO Viewer for + SFO Viewer for + + + + HelpDialog + + Quickstart + Quickstart + + + FAQ + FAQ + + + Syntax + Syntax + + + Special Bindings + Special Bindings + + + Keybindings + Keybindings + + + + KBMSettings + + Configure Controls + Configure Controls + + + D-Pad + D-Pad + + + Up + Up + + + unmapped + unmapped + + + Left + Left + + + Right + Right + + + Down + Down + + + Left Analog Halfmode + Left Analog Halfmode + + + hold to move left stick at half-speed + hold to move left stick at half-speed + + + Left Stick + Left Stick + + + Config Selection + Config Selection + + + Common Config + Common Config + + + Use per-game configs + Use per-game configs + + + L1 + L1 + + + L2 + L2 + + + Text Editor + Text Editor + + + Help + Help + + + R1 + R1 + + + R2 + R2 + + + L3 + L3 + + + Touchpad Click + Kosketuslevyn Klikkaus + + + Mouse to Joystick + Hiiri Joystickinä + + + *press F7 ingame to activate + *paina F7 pelissä aktivoidaksesi + + + R3 + R3 + + + Options + Options + + + Mouse Movement Parameters + Hiiren Liikkeen Parametrit + + + note: click Help Button/Special Keybindings for more information + huomio: klikkaa apunappia/näppäintä saadaksesi lisää tietoa + + + Face Buttons + Face Buttons + + + Triangle + Triangle + + + Square + Square + + + Circle + Circle + + + Cross + Cross + + + Right Analog Halfmode + Right Analog Halfmode + + + hold to move right stick at half-speed + hold to move right stick at half-speed + + + Right Stick + Right Stick + + + Speed Offset (def 0.125): + Speed Offset (def 0.125): + + + Copy from Common Config + Copy from Common Config + + + Deadzone Offset (def 0.50): + Deadzone Offset (def 0.50): + + + Speed Multiplier (def 1.0): + Speed Multiplier (def 1.0): + + + Common Config Selected + Common Config Selected + + + This button copies mappings from the Common Config to the currently selected profile, and cannot be used when the currently selected profile is the Common Config. + This button copies mappings from the Common Config to the currently selected profile, and cannot be used when the currently selected profile is the Common Config. + + + Copy values from Common Config + Copy values from Common Config + + + Do you want to overwrite existing mappings with the mappings from the Common Config? + Do you want to overwrite existing mappings with the mappings from the Common Config? + + + Unable to Save + Unable to Save + + + Cannot bind any unique input more than once + Cannot bind any unique input more than once + + + Press a key + Press a key + + + Cannot set mapping + Cannot set mapping + + + Mousewheel cannot be mapped to stick outputs + Mousewheel cannot be mapped to stick outputs + + + Save + Save + + + Apply + Apply + + + Restore Defaults + Restore Defaults + + + Cancel + Cancel + + + + MainWindow + + Open/Add Elf Folder + Avaa/Lisää Elf Hakemisto + + + Boot Game + Käynnistä Peli + + + Check for Updates + Tarkista Päivitykset + + + About shadPS4 + Tietoa shadPS4:sta + + + Configure... + Asetukset... + + + Recent Games + Viimeisimmät Pelit + + + Open shadPS4 Folder + Open shadPS4 Folder + + + Exit + Sulje + + + Exit shadPS4 + Sulje shadPS4 + + + Exit the application. + Sulje sovellus. + + + Show Game List + Avaa pelilista + + + Game List Refresh + Päivitä pelilista + + + Tiny + Hyvin pieni + + + Small + Pieni + + + Medium + Keskikokoinen + + + Large + Suuri + + + List View + Listanäkymä + + + Grid View + Ruudukkonäkymä + + + Elf Viewer + Elf Selain + + + Game Install Directory + Peliasennushakemisto + + + Download Cheats/Patches + Lataa Huijaukset / Korjaukset + + + Dump Game List + Kirjoita Pelilista Tiedostoon + + + Trophy Viewer + Trophy Viewer + + + No games found. Please add your games to your library first. + No games found. Please add your games to your library first. + + + Search... + Hae... + + + File + Tiedosto + + + View + Näkymä + + + Game List Icons + Pelilistan Ikonit + + + Game List Mode + Pelilistamuoto + + + Settings + Asetukset + + + Utils + Työkalut + + + Themes + Teemat + + + Help + Apua + + + Dark + Tumma + + + Light + Vaalea + + + Green + Vihreä + + + Blue + Sininen + + + Violet + Violetti + + + toolBar + Työkalupalkki + + + Game List + Pelilista + + + * Unsupported Vulkan Version + * Ei Tuettu Vulkan-versio + + + Download Cheats For All Installed Games + Lataa Huijaukset Kaikille Asennetuille Peleille + + + Download Patches For All Games + Lataa Paikkaukset 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! + Paikkaukset Ladattu Onnistuneesti! + + + All Patches available for all games have been downloaded. + Kaikki saatavilla olevat Paikkaukset kaikille peleille on ladattu. + + + Games: + Pelit: + + + ELF files (*.bin *.elf *.oelf) + ELF-tiedostot (*.bin *.elf *.oelf) + + + Game Boot + Pelin Käynnistys + + + Only one file can be selected! + Vain yksi tiedosto voi olla valittuna! + + + Run Game + Run Game + + + Eboot.bin file not found + Eboot.bin file not found + + + Game is already running! + Game is already running! + + + shadPS4 + shadPS4 + + + Play + Play + + + Pause + Pause + + + Stop + Stop + + + Restart + Restart + + + Full Screen + Full Screen + + + Controllers + Controllers + + + Keyboard + Keyboard + + + Refresh List + Refresh List + + + Resume + Resume + + + Show Labels Under Icons + Show Labels Under Icons + + + + SettingsDialog + + Settings + Asetukset + + + General + Yleinen + + + System + Järjestelmä + + + Console Language + Konsolin Kieli + + + Emulator Language + Emulaattorin Kieli + + + Emulator + Emulaattori + + + Enable Separate Update Folder + Ota Käyttöön Erillinen Päivityshakemisto + + + Default tab when opening settings + Oletusvälilehti avattaessa asetuksia + + + Show Game Size In List + Näytä pelin koko luettelossa + + + Show Splash + Näytä Aloitusnäyttö + + + Enable Discord Rich Presence + Ota käyttöön Discord Rich Presence + + + Username + Käyttäjänimi + + + Trophy Key + Trophy Avain + + + Trophy + Trophy + + + Open the custom trophy images/sounds folder + Open the custom trophy images/sounds folder + + + Logger + Lokinkerääjä + + + Log Type + Lokin Tyyppi + + + Log Filter + Lokisuodatin + + + Open Log Location + Avaa lokin sijainti + + + Input + Syöttö + + + Cursor + Kursori + + + Hide Cursor + Piilota Kursori + + + Hide Cursor Idle Timeout + Inaktiivisuuden Aikaraja Kursorin Piilottamiseen + + + s + s + + + Controller + Ohjain + + + Back Button Behavior + Takaisin-painikkeen Käyttäytyminen + + + Graphics + Grafiikka + + + GUI + Rajapinta + + + User + Käyttäjä + + + Graphics Device + Näytönohjain + + + Vblank Divider + Vblank jakaja + + + Advanced + Lisäasetukset + + + Enable Shaders Dumping + Ota Käyttöön Varjostinvedokset + + + Enable NULL GPU + Ota Käyttöön NULL GPU + + + Enable HDR + Enable HDR + + + Paths + Polut + + + Game Folders + Pelihakemistot + + + Add... + Lisää... + + + Remove + Poista + + + Debug + Virheenkorjaus + + + Enable Debug Dumping + Ota Käyttöön Virheenkorjausvedokset + + + Enable Vulkan Validation Layers + Ota Käyttöön Vulkan-validointikerrokset + + + Enable Vulkan Synchronization Validation + Ota Käyttöön Vulkan-synkronointivalidointi + + + Enable RenderDoc Debugging + Ota Käyttöön RenderDoc Virheenkorjaus + + + Enable Crash Diagnostics + Enable Crash Diagnostics + + + Collect Shaders + Collect Shaders + + + Copy GPU Buffers + Copy GPU Buffers + + + Host Debug Markers + Host Debug Markers + + + Guest Debug Markers + Guest Debug Markers + + + Update + Päivitys + + + Check for Updates at Startup + Tarkista Päivitykset Käynnistäessä + + + Always Show Changelog + Näytä aina muutoshistoria + + + Update Channel + Päivityskanava + + + Check for Updates + Tarkista Päivitykset + + + GUI Settings + GUI-asetukset + + + Title Music + Title Music + + + Disable Trophy Notification + Disable Trophy Notification + + + Background Image + Background Image + + + Show Background Image + Show Background Image + + + Opacity + Opacity + + + Play title music + Soita Otsikkomusiikkia + + + Update Compatibility Database On Startup + Päivitä Yhteensopivuustietokanta Käynnistäessä + + + Game Compatibility + Peliyhteensopivuus + + + Display Compatibility Data + Näytä Yhteensopivuustiedot + + + Update Compatibility Database + Päivitä Yhteensopivuustietokanta + + + Volume + Äänenvoimakkuus + + + Save + Tallenna + + + Apply + Ota käyttöön + + + Restore Defaults + Palauta Oletukset + + + Close + Sulje + + + Point your mouse at an option to display its description. + Siirrä hiiri vaihtoehdon päälle näyttääksesi sen kuvauksen. + + + Console Language:\nSets the language that the PS4 game uses.\nIt's recommended to set this to a language the game supports, which will vary by region. + Konsolin Kieli:\nAseta PS4-pelin käyttämä kieli.\nOn suositeltavaa asettaa tämä kieleksi, jota peli tukee, mikä vaihtelee alueittain. + + + Emulator Language:\nSets the language of the emulator's user interface. + Emulaattorin Kieli:\nAsettaa emulaattorin käyttöliittymän kielen. + + + Enable Separate Update Folder:\nEnables installing game updates into a separate folder for easy management.\nThis can be manually created by adding the extracted update to the game folder with the name "CUSA00000-UPDATE" where the CUSA ID matches the game's ID. + Ota Käyttöön Erillinen Päivityskansio:\nOttaa käyttöön päivitysten asennuksen erilliseen kansioon helpottamaan niiden hallintaa.\nTämä on tehtävissä manuaalisesti lisäämällä puretun päivityksen pelikansioon "CUSA00000-UPDATE" nimellä, missä CUSA ID vastaa pelin ID:tä. + + + Show Splash Screen:\nShows the game's splash screen (a special image) while the game is starting. + Näytä Aloitusnäyttö:\nNäyttää pelin aloitusnäytön (erityinen kuva) pelin käynnistyessä. + + + Enable Discord Rich Presence:\nDisplays the emulator icon and relevant information on your Discord profile. + Ota käyttöön Discord Rich Presence:\nNäyttää emulaattorin kuvakkeen ja asiaankuuluvat tiedot Discord-profiilissasi. + + + Username:\nSets the PS4's account username, which may be displayed by some games. + Käyttäjänimi:\nAsettaa PS4-tilin käyttäjänimen, joka voi näkyä joissain peleissä. + + + Trophy Key:\nKey used to decrypt trophies. Must be obtained from your jailbroken console.\nMust contain only hex characters. + Trophy Avain:\nThrophyjen dekryptoinnissa käytetty avain. Pitää hankkia jailbreakatusta konsolista.\nSaa sisältää vain hex-merkkejä. + + + Log Type:\nSets whether to synchronize the output of the log window for performance. May have adverse effects on emulation. + Lokityyppi:\nAsettaa, synkronoidaanko loki-ikkunan ulostulo suorituskyvyn vuoksi. Tämä voi vaikuttaa haitallisesti emulointiin. + + + Log Filter:\nFilters the log to only print specific information.\nExamples: "Core:Trace" "Lib.Pad:Debug Common.Filesystem:Error" "*:Critical"\nLevels: Trace, Debug, Info, Warning, Error, Critical - in this order, a specific level silences all levels preceding it in the list and logs every level after it. + Lokisuodatin:\nSuodattaa lokia tulostamaan vain määrättyä tietoa.\nEsimerkkejä: "Core:Trace" "Lib.Pad:Debug Common.Filesystem:Error" "*:Critical"\nTasot: Trace, Debug, Info, Warning, Error, Critical - tässä järjestyksessä. Valittu taso vaientaa kaikki edeltävät tasot luettelossa ja kirjaa kaikki tasot sen jälkeen. + + + Update:\nRelease: Official versions released every month that may be very outdated, but are more reliable and tested.\nNightly: Development versions that have all the latest features and fixes, but may contain bugs and are less stable. + Päivitys:\nRelease: Viralliset versiot, jotka julkaistaan kuukausittain ja saattavat olla hyvin vanhoja, mutta ovat luotettavampia ja testatumpia.\nNightly: Kehitysversiot, joissa on kaikki uusimmat ominaisuudet ja korjaukset, mutta ne saattavat sisältää virheitä ja ovat vähemmän vakaita. + + + Background Image:\nControl the opacity of the game background image. + Background Image:\nControl the opacity of the game background image. + + + Play Title Music:\nIf a game supports it, enable playing special music when selecting the game in the GUI. + Soita Otsikkomusiikkia:\nJos peli tukee sitä, ota käyttöön erityisen musiikin soittaminen pelin valinnan yhteydessä käyttöliittymässä. + + + Disable Trophy Pop-ups:\nDisable in-game trophy notifications. Trophy progress can still be tracked using the Trophy Viewer (right-click the game in the main window). + Poista Trophy Pop-upit Käytöstä:\nPoista trophy ilmoitukset pelin aikana. Trophyjen edistystä voi silti seurata Trophy Selainta käyttämällä (klikkaa peliä hiiren oikealla emulaattorin pääikkunassa). + + + Hide Cursor:\nChoose when the cursor will disappear:\nNever: You will always see the mouse.\nidle: Set a time for it to disappear after being idle.\nAlways: you will never see the mouse. + Piilota kursori:\nValitse, milloin kursori häviää:\nEi koskaan: Näet hiiren aina.\nInaktiivinen: Aseta aika, jolloin se häviää oltuaan aktiivinen.\nAina: et koskaan näe hiirtä. + + + Hide Idle Cursor Timeout:\nThe duration (seconds) after which the cursor that has been idle hides itself. + Aseta aika, milloin hiiri häviää oltuaan aktiivinen. + + + Back Button Behavior:\nSets the controller's back button to emulate tapping the specified position on the PS4 touchpad. + Takaisin-napin käyttäytyminen:\nAsettaa ohjaimen takaisin-napin jäljittelemään kosketusta PS4:n kosketuslevyn määritettyyn kohtaan. + + + Display Compatibility Data:\nDisplays game compatibility information in table view. Enable "Update Compatibility On Startup" to get up-to-date information. + Näytä Yhteensopivuustiedot:\nNäyttää pelien yhteensopivuustiedot listanäkymässä. Ota käyttöön "Päivitä Yhteensopivuustietokanta Käynnistäessä" saadaksesi ajantasaista tietoa. + + + Update Compatibility On Startup:\nAutomatically update the compatibility database when shadPS4 starts. + Päivitä Yhteensopivuustiedot Käynnistäessä:\nPäivitä yhteensopivuustiedot automaattisesti shadPS4:n käynnistyessä. + + + Update Compatibility Database:\nImmediately update the compatibility database. + Päivitä Yhteensopivuustietokanta:\nPäivitää yhteensopivuustietokannan heti. + + + Never + Ei koskaan + + + Idle + Inaktiivinen + + + Always + Aina + + + Touchpad Left + Kosketuslevyn Vasen Puoli + + + Touchpad Right + Kosketuslevyn Oikea Puoli + + + Touchpad Center + Kosketuslevyn Keskikohta + + + None + Ei mitään + + + Graphics Device:\nOn multiple GPU systems, select the GPU the emulator will use from the drop down list,\nor select "Auto Select" to automatically determine it. + Näytönohjain:\nUseamman näytönohjaimen järjestelmissä, valitse pudotusvalikosta, mitä näytönohjainta emulaattori käyttää,\n tai valitse "Auto Select" automaattiseen määritykseen. + + + Width/Height:\nSets the size of the emulator window at launch, which can be resized during gameplay.\nThis is different from the in-game resolution. + Leveys/Korkeus:\nAsettaa käynnistetyn emulaattori-ikkunan koon, jota voidaan muuttaa pelin aikana.\nTämä on eri, kuin pelin sisäinen resoluutio. + + + Vblank Divider:\nThe frame rate at which the emulator refreshes at is multiplied by this number. Changing this may have adverse effects, such as increasing the game speed, or breaking critical game functionality that does not expect this to change! + Vblank Jakaja:\nEmulaattorin virkistystaajuus kerrotaan tällä numerolla. Tämän muuttaminen voi vaikuttaa haitallisesti, kuten lisätä pelin nopeutta tai rikkoa kriittisiä pelitoimintoja, jotka eivät odota tämän muuttuvan! + + + Enable Shaders Dumping:\nFor the sake of technical debugging, saves the games shaders to a folder as they render. + Ota Käyttöön Varjostinvedokset:\nTeknistä vianetsintää varten. Pelin varjostimia tallennetaan hakemistoon niiden renderöityessä. + + + Enable Null GPU:\nFor the sake of technical debugging, disables game rendering as if there were no graphics card. + Ota Null GPU käyttöön:\nTeknistä vianetsintää varten. Pelin renderöinti estetään, ikään kuin näytönohjainta ei olisi. + + + Enable HDR:\nEnables HDR in games that support it.\nYour monitor must have support for the BT2020 PQ color space and the RGB10A2 swapchain format. + Enable HDR:\nEnables HDR in games that support it.\nYour monitor must have support for the BT2020 PQ color space and the RGB10A2 swapchain format. + + + Game Folders:\nThe list of folders to check for installed games. + Pelihakemistot:\nLista hakemistoista, joista pelejä haetaan. + + + Add:\nAdd a folder to the list. + Lisää:\nLisää hakemisto listalle. + + + Remove:\nRemove a folder from the list. + Poista:\nPoista hakemisto listalta. + + + Enable Debug Dumping:\nSaves the import and export symbols and file header information of the currently running PS4 program to a directory. + Ota Käyttöön Virheenkorjausvedokset:\nTallentaa käynnissä olevan PS4-ohjelman tuonti- ja vientisymbolit ja tiedosto-otsikkotiedot hakemistoon. + + + Enable Vulkan Validation Layers:\nEnables a system that validates the state of the Vulkan renderer and logs information about its internal state.\nThis will reduce performance and likely change the behavior of emulation. + Ota Käyttöön Vulkan-validointikerrokset:\nAktivoi järjestelmä, joka validoi Vulkan-renderöijän tilan ja kirjaa tietoa sen sisäisestä tilasta. Tämä heikentää suorituskykyä ja todennäköisesti muuttaa emulaation käyttäytymistä. + + + Enable Vulkan Synchronization Validation:\nEnables a system that validates the timing of Vulkan rendering tasks.\nThis will reduce performance and likely change the behavior of emulation. + Ota Käyttöön Vulkan-synkronointivalidointi:\nAktivoi järjestelmä, joka validoi Vulkan-renderöinnin tehtävien aikataulutuksen. Tämä heikentää suorituskykyä ja todennäköisesti muuttaa emulaation käyttäytymistä. + + + Enable RenderDoc Debugging:\nIf enabled, the emulator will provide compatibility with Renderdoc to allow capture and analysis of the currently rendered frame. + Ota Käyttöön RenderDoc Virheenkorjaus:\nJos käytössä, emulaattori tarjoaa Renderdoc-yhteensopivuuden, mikä mahdollistaa renderöidyn kehyksen tallennuksen ja analysoinnin. + + + Collect Shaders:\nYou need this enabled to edit shaders with the debug menu (Ctrl + F10). + Collect Shaders:\nYou need this enabled to edit shaders with the debug menu (Ctrl + F10). + + + Crash Diagnostics:\nCreates a .yaml file with info about the Vulkan state at the time of crashing.\nUseful for debugging 'Device lost' errors. If you have this enabled, you should enable Host AND Guest Debug Markers.\nDoes not work on Intel GPUs.\nYou need Vulkan Validation Layers enabled and the Vulkan SDK for this to work. + Crash Diagnostics:\nCreates a .yaml file with info about the Vulkan state at the time of crashing.\nUseful for debugging 'Device lost' errors. If you have this enabled, you should enable Host AND Guest Debug Markers.\nDoes not work on Intel GPUs.\nYou need Vulkan Validation Layers enabled and the Vulkan SDK for this to work. + + + Copy GPU Buffers:\nGets around race conditions involving GPU submits.\nMay or may not help with PM4 type 0 crashes. + Copy GPU Buffers:\nGets around race conditions involving GPU submits.\nMay or may not help with PM4 type 0 crashes. + + + Host Debug Markers:\nInserts emulator-side information like markers for specific AMDGPU commands around Vulkan commands, as well as giving resources debug names.\nIf you have this enabled, you should enable Crash Diagnostics.\nUseful for programs like RenderDoc. + Host Debug Markers:\nInserts emulator-side information like markers for specific AMDGPU commands around Vulkan commands, as well as giving resources debug names.\nIf you have this enabled, you should enable Crash Diagnostics.\nUseful for programs like RenderDoc. + + + Guest Debug Markers:\nInserts any debug markers the game itself has added to the command buffer.\nIf you have this enabled, you should enable Crash Diagnostics.\nUseful for programs like RenderDoc. + Guest Debug Markers:\nInserts any debug markers the game itself has added to the command buffer.\nIf you have this enabled, you should enable Crash Diagnostics.\nUseful for programs like RenderDoc. + + + Save Data Path:\nThe folder where game save data will be saved. + Save Data Path:\nThe folder where game save data will be saved. + + + Browse:\nBrowse for a folder to set as the save data path. + Browse:\nBrowse for a folder to set as the save data path. + + + Release + Release + + + Nightly + Nightly + + + Set the volume of the background music. + Set the volume of the background music. + + + Enable Motion Controls + Enable Motion Controls + + + Save Data Path + Save Data Path + + + Browse + Selaa + + + async + async + + + sync + sync + + + Auto Select + Auto Select + + + Directory to install games + Pelien asennushakemisto + + + Directory to save data + Directory to save data + + + Video + Video + + + Display Mode + Display Mode + + + Windowed + Windowed + + + Fullscreen + Fullscreen + + + Fullscreen (Borderless) + Fullscreen (Borderless) + + + Window Size + Window Size + + + W: + W: + + + H: + H: + + + Separate Log Files + Separate Log Files + + + Separate Log Files:\nWrites a separate logfile for each game. + Separate Log Files:\nWrites a separate logfile for each game. + + + Trophy Notification Position + Trophy Notification Position + + + Left + Left + + + Right + Right + + + Top + Top + + + Bottom + Bottom + + + Notification Duration + Notification Duration + + + Portable User Folder + Portable User Folder + + + Create Portable User Folder from Common User Folder + Create Portable User Folder from Common User Folder + + + Portable user folder:\nStores shadPS4 settings and data that will be applied only to the shadPS4 build located in the current folder. Restart the app after creating the portable user folder to begin using it. + Portable user folder:\nStores shadPS4 settings and data that will be applied only to the shadPS4 build located in the current folder. Restart the app after creating the portable user folder to begin using it. + + + Cannot create portable user folder + Cannot create portable user folder + + + %1 already exists + %1 already exists + + + Portable user folder created + Portable user folder created + + + %1 successfully created. + %1 successfully created. + + + Open the custom trophy images/sounds folder:\nYou can add custom images to the trophies and an audio.\nAdd the files to custom_trophy with the following names:\ntrophy.wav OR trophy.mp3, bronze.png, gold.png, platinum.png, silver.png\nNote: The sound will only work in QT versions. + Open the custom trophy images/sounds folder:\nYou can add custom images to the trophies and an audio.\nAdd the files to custom_trophy with the following names:\ntrophy.wav OR trophy.mp3, bronze.png, gold.png, platinum.png, silver.png\nNote: The sound will only work in QT versions. + + + + TrophyViewer + + Trophy Viewer + Trophy Selain + + + Select Game: + Select Game: + + + Progress + Progress + + + Show Earned Trophies + Show Earned Trophies + + + Show Not Earned Trophies + Show Not Earned Trophies + + + Show Hidden Trophies + Show Hidden Trophies + + + diff --git a/src/qt_gui/translations/fr.ts b/src/qt_gui/translations/fr.ts deleted file mode 100644 index 441eaddb1..000000000 --- a/src/qt_gui/translations/fr.ts +++ /dev/null @@ -1,1664 +0,0 @@ - - - - - - AboutDialog - - - About shadPS4 - À propos de shadPS4 - - - - shadPS4 - shadPS4 - - - - shadPS4 is an experimental open-source emulator for the PlayStation 4. - shadPS4 est un émulateur open-source expérimental de la PlayStation 4. - - - - 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. - - - - ElfViewer - - - Open Folder - Ouvrir un dossier - - - - GameInfoClass - - - Loading game list, please wait :3 - Chargement de la liste de jeu, veuillez patienter... - - - - Cancel - Annuler - - - - Loading... - Chargement... - - - - InstallDirSelect - - - shadPS4 - Choose directory - shadPS4 - Choisir un répertoire - - - - Select which directory you want to install to. - Sélectionnez le répertoire où vous souhaitez effectuer l'installation. - - - - GameInstallDialog - - - shadPS4 - Choose directory - shadPS4 - Choisir un répertoire - - - - Directory to install games - Répertoire d'installation des jeux - - - - Browse - Parcourir - - - - Error - Erreur - - - - The value for location to install games is not valid. - Le répertoire d'installation des jeux n'est pas valide. - - - - GuiContextMenus - - - Create Shortcut - Créer un raccourci - - - - Cheats / Patches - Cheats/Patchs - - - - SFO Viewer - Visionneuse SFO - - - - Trophy Viewer - Visionneuse de trophées - - - - Open Folder... - Ouvrir le Dossier... - - - - Open Game Folder - Ouvrir le Dossier du Jeu - - - - Open Save Data Folder - Ouvrir le Dossier des Données de Sauvegarde - - - - Open Log Folder - Ouvrir le Dossier des Logs - - - - Copy info... - Copier infos... - - - - Copy Name - Copier le nom - - - - Copy Serial - Copier le N° de série - - - - Copy All - Copier tout - - - - Delete... - Supprimer... - - - - Delete Game - Supprimer jeu - - - - Delete Update - Supprimer MÀJ - - - - Delete DLC - Supprimer DLC - - - - Compatibility... - Compatibility... - - - - Update database - Update database - - - - View report - View report - - - - Submit a report - Submit a report - - - - Shortcut creation - Création du raccourci - - - - Shortcut created successfully! - Raccourci créé avec succès ! - - - - Error - Erreur - - - - Error creating shortcut! - Erreur lors de la création du raccourci ! - - - - Install PKG - Installer un PKG - - - - Game - Jeu - - - - requiresEnableSeparateUpdateFolder_MSG - This feature requires the 'Enable Separate Update Folder' config option to work. If you want to use this feature, please enable it. - - - - This game has no update to delete! - Ce jeu n'a pas de mise à jour à supprimer! - - - - Update - Mise à jour - - - - This game has no DLC to delete! - Ce jeu n'a pas de DLC à supprimer! - - - - DLC - DLC - - - - Delete %1 - Supprime %1 - - - - Are you sure you want to delete %1's %2 directory? - Êtes vous sûr de vouloir supprimer le répertoire %1 %2 ? - - - - MainWindow - - - Open/Add Elf Folder - Ouvrir/Ajouter un dossier ELF - - - - Install Packages (PKG) - Installer des packages (PKG) - - - - Boot Game - Démarrer un jeu - - - - Check for Updates - Vérifier les mises à jour - - - - About shadPS4 - À propos de shadPS4 - - - - Configure... - Configurer... - - - - Install application from a .pkg file - Installer une application depuis un fichier .pkg - - - - Recent Games - Jeux récents - - - - Exit - Fermer - - - - Exit shadPS4 - Fermer shadPS4 - - - - Exit the application. - Fermer l'application. - - - - Show Game List - Afficher la liste de jeux - - - - Game List Refresh - Rafraîchir la liste de jeux - - - - Tiny - Très Petit - - - - Small - Petit - - - - Medium - Moyen - - - - Large - Grand - - - - List View - Mode liste - - - - Grid View - Mode grille - - - - Elf Viewer - Visionneuse ELF - - - - Game Install Directory - Répertoire des jeux - - - - Download Cheats/Patches - Télécharger Cheats/Patchs - - - - Dump Game List - Dumper la liste des jeux - - - - PKG Viewer - Visionneuse PKG - - - - Search... - Chercher... - - - - File - Fichier - - - - View - Affichage - - - - Game List Icons - Icônes des jeux - - - - Game List Mode - Mode d'affichage - - - - Settings - Paramètres - - - - Utils - Utilitaires - - - - Themes - Thèmes - - - - Help - Aide - - - - Dark - Sombre - - - - Light - Clair - - - - Green - Vert - - - - Blue - Bleu - - - - Violet - Violet - - - - toolBar - Bare d'outils - - - - PKGViewer - - - Open Folder - Ouvrir un dossier - - - - TrophyViewer - - - Trophy Viewer - Visionneuse de trophées - - - - SettingsDialog - - - Settings - Paramètres - - - - General - Général - - - - System - Système - - - - Console Language - Langage de la console - - - - Emulator Language - Langage de l'émulateur - - - - Emulator - Émulateur - - - - Enable Fullscreen - Plein écran - - - - Enable Separate Update Folder - Dossier séparé pour les mises à jours - - - - Show Splash - Afficher l'image du jeu - - - - Is PS4 Pro - Mode PS4 Pro - - - - Enable Discord Rich Presence - Activer la présence Discord - - - - Username - Nom d'utilisateur - - - - Trophy Key - Trophy Key - - - - Trophy - Trophy - - - - Logger - Journalisation - - - - Log Type - Type - - - - Log Filter - Filtre - - - - Input - Entrée - - - - Cursor - Curseur - - - - Hide Cursor - Masquer le curseur - - - - Hide Cursor Idle Timeout - Délai d'inactivité pour masquer le curseur - - - - s - s - - - - Controller - Manette - - - - Back Button Behavior - Comportement du bouton retour - - - - Graphics - Graphismes - - - - Graphics Device - Carte graphique - - - - Width - Largeur - - - - Height - Hauteur - - - - Vblank Divider - Vblank - - - - Advanced - Avancé - - - - Enable Shaders Dumping - Dumper les shaders - - - - Enable NULL GPU - NULL GPU - - - - Paths - Chemins - - - - Game Folders - Dossiers de jeu - - - - Add... - Ajouter... - - - - Remove - Supprimer - - - - Debug - Débogage - - - - Enable Debug Dumping - Activer le débogage - - - - Enable Vulkan Validation Layers - Activer la couche de validation Vulkan - - - - Enable Vulkan Synchronization Validation - Activer la synchronisation de la validation Vulkan - - - - Enable RenderDoc Debugging - Activer le débogage RenderDoc - - - - Update - Mise à jour - - - - Check for Updates at Startup - Vérif. maj au démarrage - - - - Update Channel - Canal de Mise à Jour - - - - Check for Updates - Vérifier les mises à jour - - - - GUI Settings - Paramètres de l'interface - - - - Disable Trophy Pop-ups - Disable Trophy Pop-ups - - - - Play title music - Lire la musique du titre - - - - Update Compatibility Database On Startup - Update Compatibility Database On Startup - - - - Game Compatibility - Game Compatibility - - - - Display Compatibility Data - Display Compatibility Data - - - - Update Compatibility Database - Update Compatibility Database - - - - Volume - Volume - - - - Audio Backend - Audio Backend - - - - MainWindow - - - Game List - Liste de jeux - - - - * Unsupported Vulkan Version - * Version de 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 patchs 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 installés. - - - - Patches Downloaded Successfully! - Patchs téléchargés avec succès ! - - - - All Patches available for all games have been downloaded. - Tous les patchs disponibles ont été téléchargés. - - - - Games: - Jeux: - - - - PKG File (*.PKG) - Fichiers PKG (*.PKG) - - - - ELF files (*.bin *.elf *.oelf) - Fichiers ELF (*.bin *.elf *.oelf) - - - - Game Boot - Démarrer un jeu - - - - Only one file can be selected! - Un seul fichier peut être sélectionné ! - - - - PKG Extraction - Extraction du PKG - - - - Patch detected! - Patch détecté ! - - - - PKG and Game versions match: - Les versions PKG et jeu correspondent: - - - - Would you like to overwrite? - Souhaitez-vous remplacer ? - - - - PKG Version %1 is older than installed version: - La version PKG %1 est plus ancienne que la version installée: - - - - Game is installed: - Jeu installé: - - - - Would you like to install Patch: - Souhaitez-vous installer le patch: - - - - DLC Installation - Installation du DLC - - - - Would you like to install DLC: %1? - Souhaitez-vous installer le DLC: %1 ? - - - - DLC already installed: - DLC déjà installé: - - - - Game already installed - Jeu déjà installé - - - - PKG is a patch, please install the game first! - Le 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 PKG valide - - - - CheatsPatches - - - Cheats / Patches for - Cheats/Patchs pour - - - - defaultTextEdit_MSG - 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 - - - - 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 patchs - - - - 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. Si le correctif n'apparaît pas, il se peut qu'il n'existe pas pour le numéro de série et la version spécifiques du jeu. - - - - 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. - - - - The game is in version: %1 - Le jeu est en version: %1 - - - - The downloaded patch only works on version: %1 - Le patch téléchargé ne fonctionne que sur la version: %1 - - - - You may need to update your game. - Vous devrez peut-être mettre à jour votre jeu. - - - - Incompatibility Notice - Avis d'incompatibilité - - - - 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: - - - - Can't apply cheats before the game is started - Impossible d'appliquer les Cheats avant que le jeu ne commence. - - - - SettingsDialog - - - Save - Enregistrer - - - - Apply - Appliquer - - - - Restore Defaults - Restaurer les paramètres par défaut - - - - Close - Fermer - - - - Point your mouse at an option to display its description. - Pointez votre souris sur une option pour afficher sa description. - - - - consoleLanguageGroupBox - Langue de la console:\nDéfinit la langue utilisée par le jeu PS4.\nIl est recommandé de le définir sur une langue que le jeu prend en charge, ce qui variera selon la région. - - - - emulatorLanguageGroupBox - Langue de l'émulateur:\nDéfinit la langue de l'interface utilisateur de l'émulateur. - - - - fullscreenCheckBox - Activer le mode plein écran:\nMet automatiquement la fenêtre du jeu en mode plein écran.\nCela peut être activé en appuyant sur la touche F11. - - - - separateUpdatesCheckBox - Dossier séparé pour les mises à jours:\nInstalle les mises à jours des jeux dans un dossier séparé pour une gestion plus facile. - - - - showSplashCheckBox - Afficher l'écran de démarrage:\nAffiche l'écran de démarrage du jeu (une image spéciale) lors du démarrage du jeu. - - - - ps4proCheckBox - Mode PS4 Pro:\nFait en sorte que l'émulateur se comporte comme un PS4 PRO, ce qui peut activer des fonctionnalités spéciales dans les jeux qui le prennent en charge. - - - - discordRPCCheckbox - Activer Discord Rich Presence:\nAffiche l'icône de l'émulateur et les informations pertinentes sur votre profil Discord. - - - - userName - Nom d'utilisateur:\nDéfinit le nom d'utilisateur du compte PS4, qui peut être affiché par certains jeux. - - - - TrophyKey - Trophy Key:\nKey used to decrypt trophies. Must be obtained from your jailbroken console.\nMust contain only hex characters. - - - - logTypeGroupBox - Type de journal:\nDétermine si la sortie de la fenêtre de journalisation est synchronisée pour des raisons de performance. Cela peut avoir un impact négatif sur l'émulation. - - - - logFilter - Filtre de journal:\n n'imprime que des informations spécifiques.\nExemples: "Core:Trace" "Lib.Pad:Debug Common.Filesystem:Error" "*:Critical" Niveaux: Trace, Debug, Info, Avertissement, Erreur, Critique - dans cet ordre, un niveau particulier désactive tous les niveaux précédents de la liste et enregistre tous les niveaux suivants. - - - - updaterGroupBox - Mise à jour:\nRelease: versions officielles publiées chaque mois qui peuvent être très anciennes, mais plus fiables et testées.\nNightly: versions de développement avec toutes les dernières fonctionnalités et correctifs, mais pouvant avoir des bogues et être moins stables. - - - - GUIgroupBox - Jouer de la musique de titre:\nSi le jeu le prend en charge, cela active la musique spéciale lorsque vous sélectionnez le jeu dans l'interface utilisateur. - - - - disableTrophycheckBox - Disable Trophy Pop-ups:\nDisable in-game trophy notifications. Trophy progress can still be tracked using the Trophy Viewer (right-click the game in the main window). - - - - hideCursorGroupBox - Masquer le curseur:\nChoisissez quand le curseur disparaîtra:\nJamais: Vous verrez toujours la souris.\nInactif: Définissez un temps pour qu'il disparaisse après inactivité.\nToujours: vous ne verrez jamais la souris. - - - - idleTimeoutGroupBox - Définissez un temps pour que la souris disparaisse après être inactif. - - - - backButtonBehaviorGroupBox - Comportement du bouton retour:\nDéfinit le bouton de retour de la manette pour imiter le toucher de la position spécifiée sur le pavé tactile PS4. - - - - enableCompatibilityCheckBox - Display Compatibility Data:\nDisplays game compatibility information in table view. Enable "Update Compatibility On Startup" to get up-to-date information. - - - - checkCompatibilityOnStartupCheckBox - Update Compatibility On Startup:\nAutomatically update the compatibility database when shadPS4 starts. - - - - updateCompatibilityButton - Update Compatibility Database:\nImmediately update the compatibility database. - - - - Never - Jamais - - - - Idle - Inactif - - - - Always - Toujours - - - - Touchpad Left - Pavé Tactile Gauche - - - - Touchpad Right - Pavé Tactile Droit - - - - Touchpad Center - Centre du Pavé Tactile - - - - None - Aucun - - - - graphicsAdapterGroupBox - Adaptateur graphique:\nSélectionnez le GPU que l'émulateur utilisera dans les systèmes multi-GPU à partir de la liste déroulante,\nou choisissez "Auto Select" pour le déterminer automatiquement. - - - - resolutionLayout - Largeur/Hauteur:\nDéfinit la taille de la fenêtre de l'émulateur au démarrage, qui peut être redimensionnée pendant le jeu.\nCela diffère de la résolution interne du jeu. - - - - heightDivider - Diviseur Vblank:\nLe taux de rafraîchissement de l'émulateur est multiplié par ce nombre. Changer cela peut avoir des effets négatifs, tels qu'une augmentation de la vitesse du jeu ou la rupture de fonctionnalités critiques du jeu qui ne s'attendent pas à ce changement ! - - - - dumpShadersCheckBox - Activer l'exportation de shaders:\nPour le débogage technique, les shaders du jeu sont enregistrés dans un dossier lors du rendu. - - - - nullGpuCheckBox - Activer le GPU nul:\nPour le débogage technique, désactive le rendu du jeu comme s'il n'y avait pas de carte graphique. - - - - gameFoldersBox - Dossiers de jeux:\nLa liste des dossiers à vérifier pour les jeux installés. - - - - addFolderButton - Ajouter:\nAjouter un dossier à la liste. - - - - removeFolderButton - Supprimer:\nSupprimer un dossier de la liste. - - - - debugDump - Activer l'exportation de débogage:\nEnregistre les symboles d'importation et d'exportation et les informations d'en-tête du fichier du programme PS4 actuel dans un répertoire. - - - - vkValidationCheckBox - Activer les couches de validation Vulkan:\nActive un système qui valide l'état du rendu Vulkan et enregistre des informations sur son état interne. Cela réduit les performances et peut changer le comportement de l'émulation. - - - - vkSyncValidationCheckBox - Activer la validation de synchronisation Vulkan:\nActive un système qui valide la planification des tâches de rendu Vulkan. Cela réduit les performances et peut changer le comportement de l'émulation. - - - - rdocCheckBox - Activer le débogage RenderDoc:\nS'il est activé, l'émulateur fournit une compatibilité avec Renderdoc, permettant d'enregistrer et d'analyser la trame rendue actuelle. - - - - GameListFrame - - - Icon - Icône - - - - Name - Nom - - - - Serial - Série - - - - Compatibility - Compatibility - - - - Region - Région - - - - Firmware - Firmware - - - - Size - Taille - - - - Version - Version - - - - Path - Répertoire - - - - Play Time - Temps de jeu - - - - Never Played - Jamais joué - - - - h - h - - - - m - m - - - - s - s - - - - Compatibility is untested - Compatibility is untested - - - - Game does not initialize properly / crashes the emulator - Game does not initialize properly / crashes the emulator - - - - Game boots, but only displays a blank screen - Game boots, but only displays a blank screen - - - - Game displays an image but does not go past the menu - Game displays an image but does not go past the menu - - - - Game has game-breaking glitches or unplayable performance - Game has game-breaking glitches or unplayable performance - - - - Game can be completed with playable performance and no major glitches - Game can be completed with playable performance and no major glitches - - - - CheckUpdate - - - Auto Updater - Mise à jour automatique - - - - Error - Erreur - - - - Network error: - Erreur réseau: - - - - Failed to parse update information. - Échec de l'analyse des informations de mise à jour. - - - - No pre-releases found. - Aucune pré-version trouvée. - - - - Invalid release data. - Données de version invalides. - - - - No download URL found for the specified asset. - Aucune URL de téléchargement trouvée pour l'élément spécifié. - - - - Your version is already up to date! - Votre version est déjà à jour ! - - - - Update Available - Mise à jour disponible - - - - Update Channel - Canal de Mise à Jour - - - - Current Version - Version actuelle - - - - Latest Version - Dernière version - - - - Do you want to update? - Voulez-vous mettre à jour ? - - - - Show Changelog - Afficher le journal des modifications - - - - Check for Updates at Startup - Vérif. maj au démarrage - - - - Update - Mettre à jour - - - - No - Non - - - - Hide Changelog - Cacher le journal des modifications - - - - Changes - Modifications - - - - Network error occurred while trying to access the URL - Une erreur réseau s'est produite en essayant d'accéder à l'URL - - - - Download Complete - Téléchargement terminé - - - - The update has been downloaded, press OK to install. - La mise à jour a été téléchargée, appuyez sur OK pour l'installer. - - - - Failed to save the update file at - Échec de la sauvegarde du fichier de mise à jour à - - - - Starting Update... - Démarrage de la mise à jour... - - - - Failed to create the update script file - Échec de la création du fichier de script de mise à jour - - - - GameListUtils - - - B - B - - - - KB - KB - - - - MB - MB - - - - GB - GB - - - - TB - TB - - - \ No newline at end of file diff --git a/src/qt_gui/translations/fr_FR.ts b/src/qt_gui/translations/fr_FR.ts new file mode 100644 index 000000000..89599e32c --- /dev/null +++ b/src/qt_gui/translations/fr_FR.ts @@ -0,0 +1,2089 @@ + + + + + + AboutDialog + + About shadPS4 + À propos de shadPS4 + + + shadPS4 is an experimental open-source emulator for the PlayStation 4. + shadPS4 est un émulateur open-source expérimental de la PlayStation 4. + + + 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. + + + + CheatsPatches + + Cheats / Patches for + Cheats / Patchs pour + + + 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:\n + 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:\n + + + No Image Available + Aucune image disponible + + + Serial: + Numéro de 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 patchs + + + 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 + + + No Cheats found for this game in this version of the selected repository,try another repository or a different version of the game. + 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 + + + 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. + 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é + + + 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. If the patch does not appear, it may be that it does not exist for the specific serial and version of the game. + 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. Si le correctif n'apparaît pas, il se peut qu'il n'existe pas pour la série et la version spécifiques du jeu. + + + 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. + + + The game is in version: %1 + Le jeu est en version: %1 + + + The downloaded patch only works on version: %1 + Le patch téléchargé ne fonctionne que sur la version: %1 + + + You may need to update your game. + Vous devriez peut-être mettre à jour votre jeu. + + + Incompatibility Notice + Avis d'incompatibilité + + + 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: + Le répertoire n'existe pas: + + + Failed to open files.json for reading. + Échec de l'ouverture de files.json pour la lecture. + + + Name: + Nom: + + + Can't apply cheats before the game is started + Impossible d'appliquer les cheats avant que le jeu ne soit lancé + + + Close + Fermer + + + + CheckUpdate + + Auto Updater + Mise à jour automatique + + + Error + Erreur + + + Network error: + Erreur réseau: + + + The Auto Updater allows up to 60 update checks per hour.\nYou have reached this limit. Please try again later. + Le programme de mise à jour automatique permet jusqu'à 60 vérifications de mise à jour par heure.\nVous avez atteint cette limite. Veuillez réessayer plus tard. + + + Failed to parse update information. + Échec de l'analyse des informations de mise à jour. + + + No pre-releases found. + Aucune pré-version trouvée. + + + Invalid release data. + Données de version invalides. + + + No download URL found for the specified asset. + Aucune URL de téléchargement trouvée pour l'élément spécifié. + + + Your version is already up to date! + Votre version est déjà à jour ! + + + Update Available + Mise à jour disponible + + + Update Channel + Canal de Mise à Jour + + + Current Version + Version actuelle + + + Latest Version + Dernière version + + + Do you want to update? + Voulez-vous mettre à jour ? + + + Show Changelog + Afficher le journal des modifications + + + Check for Updates at Startup + Vérif. maj au démarrage + + + Update + Mettre à jour + + + No + Non + + + Hide Changelog + Cacher le journal des modifications + + + Changes + Modifications + + + Network error occurred while trying to access the URL + Une erreur réseau s'est produite en essayant d'accéder à l'URL + + + Download Complete + Téléchargement terminé + + + The update has been downloaded, press OK to install. + La mise à jour a été téléchargée, appuyez sur OK pour l'installer. + + + Failed to save the update file at + Échec de la sauvegarde du fichier de mise à jour à + + + Starting Update... + Démarrage de la mise à jour... + + + Failed to create the update script file + Échec de la création du fichier de script de mise à jour + + + + CompatibilityInfoClass + + Fetching compatibility data, please wait + Récupération des données de compatibilité, veuillez patienter + + + Cancel + Annuler + + + Loading... + Chargement... + + + Error + Erreur + + + Unable to update compatibility data! Try again later. + Impossible de mettre à jour les données de compatibilité ! Essayez plus tard. + + + Unable to open compatibility_data.json for writing. + Impossible d'ouvrir compatibility_data.json en écriture. + + + Unknown + Inconnu + + + Nothing + Rien + + + Boots + Démarre + + + Menus + Menu + + + Ingame + En jeu + + + Playable + Jouable + + + + ControlSettings + + Configure Controls + Configurer les Commandes + + + D-Pad + Croix directionnelle + + + Up + Haut + + + Left + Gauche + + + Right + Droite + + + Down + Bas + + + Left Stick Deadzone (def:2 max:127) + Stick Gauche Deadzone (def:2 max:127) + + + Left Deadzone + Deadzone Gauche + + + Left Stick + Joystick gauche + + + Config Selection + Sélection de la Configuration + + + Common Config + Configuration Commune + + + Use per-game configs + Utiliser les configurations par jeu + + + L1 / LB + L1 / LB + + + L2 / LT + L2 / LT + + + Back + Retour + + + R1 / RB + R1 / RB + + + R2 / RT + R2 / RT + + + L3 + L3 + + + Options / Start + Options / Start + + + R3 + R3 + + + Face Buttons + Touches d'action + + + Triangle / Y + Triangle / Y + + + Square / X + Carré / X + + + Circle / B + Rond / B + + + Cross / A + Croix / A + + + Right Stick Deadzone (def:2, max:127) + Joystick Gauche Deadzone (def:2 max:127) + + + Right Deadzone + Deadzone Droit + + + Right Stick + Joystick Droit + + + Color Adjustment + Ajustement des couleurs + + + R: + R: + + + G: + G: + + + B: + B: + + + Override Lightbar Color + Remplacer la couleur de la barre de lumière + + + Override Color + Remplacer la couleur + + + Unable to Save + Impossible de sauvegarder + + + Cannot bind axis values more than once + Impossible de lier les valeurs de l'axe plusieurs fois + + + Save + Enregistrer + + + Apply + Appliquer + + + Restore Defaults + Réinitialiser par défaut + + + Cancel + Annuler + + + + EditorDialog + + Edit Keyboard + Mouse and Controller input bindings + Modifier les raccourcis d'entrée clavier + souris et contrôleur + + + Use Per-Game configs + Utiliser les configurations pour chaque jeu + + + Error + Erreur + + + Could not open the file for reading + Impossible d'ouvrir le fichier pour la lecture + + + Could not open the file for writing + Impossible d'ouvrir le fichier pour l'écriture + + + Save Changes + Enregistrer les Modifications + + + Do you want to save changes? + Voulez-vous sauvegarder les modifications? + + + Help + Aide + + + Do you want to reset your custom default config to the original default config? + Voulez-vous réinitialiser votre configuration par défaut personnalisée à la configuration par défaut d'origine ? + + + Do you want to reset this config to your custom default config? + Voulez-vous réinitialiser cette configuration à votre configuration personnalisée par défaut ? + + + Reset to Default + Rétablir par défaut + + + + ElfViewer + + Open Folder + Ouvrir un dossier + + + + GameInfoClass + + Loading game list, please wait :3 + Chargement de la liste de jeu, veuillez patienter... + + + Cancel + Annuler + + + Loading... + Chargement... + + + + GameInstallDialog + + shadPS4 - Choose directory + shadPS4 - Choisir un répertoire + + + Directory to install games + Répertoire d'installation des jeux + + + Browse + Parcourir + + + Error + Erreur + + + Directory to install DLC + Répertoire d'installation des DLC + + + + GameListFrame + + Icon + Icône + + + Name + Nom + + + Serial + Numéro de série + + + Compatibility + Compatibilité + + + Region + Région + + + Firmware + Firmware + + + Size + Taille + + + Version + Version + + + Path + Répertoire + + + Play Time + Temps de jeu + + + Never Played + Jamais joué + + + h + h + + + m + m + + + s + s + + + Compatibility is untested + La compatibilité n'a pas été testé + + + Game does not initialize properly / crashes the emulator + Le jeu ne se lance pas correctement / crash l'émulateur + + + Game boots, but only displays a blank screen + Le jeu démarre, mais n'affiche qu'un écran noir + + + Game displays an image but does not go past the menu + Le jeu affiche une image mais ne dépasse pas le menu + + + Game has game-breaking glitches or unplayable performance + Le jeu a des problèmes majeurs ou des performances qui le rendent injouable + + + Game can be completed with playable performance and no major glitches + Le jeu peut être terminé avec des performances acceptables et sans problèmes majeurs + + + Click to see details on github + Cliquez pour voir les détails sur GitHub + + + Last updated + Dernière mise à jour + + + + GameListUtils + + B + B + + + KB + Ko + + + MB + Mo + + + GB + Go + + + TB + To + + + + GuiContextMenus + + Create Shortcut + Créer un raccourci + + + Cheats / Patches + Cheats/Patchs + + + SFO Viewer + Visionneuse SFO + + + Trophy Viewer + Visionneuse de trophées + + + Open Folder... + Ouvrir le Dossier... + + + Open Game Folder + Ouvrir le Dossier du Jeu + + + Open Save Data Folder + Ouvrir le Dossier des Données de Sauvegarde + + + Open Log Folder + Ouvrir le Dossier des Logs + + + Copy info... + Copier infos... + + + Copy Name + Copier le nom + + + Copy Serial + Copier le N° de série + + + Copy Version + Copier la Version + + + Copy Size + Copier la Taille + + + Copy All + Copier tout + + + Delete... + Supprimer... + + + Delete Game + Supprimer jeu + + + Delete Update + Supprimer MÀJ + + + Delete DLC + Supprimer DLC + + + Delete Trophy + Supprimer Trophée + + + Compatibility... + Compatibilité... + + + Update database + Mettre à jour la base de données + + + View report + Voir rapport + + + Submit a report + Soumettre un rapport + + + Shortcut creation + Création du raccourci + + + Shortcut created successfully! + Raccourci créé avec succès ! + + + Error + Erreur + + + Error creating shortcut! + Erreur lors de la création du raccourci ! + + + Game + Jeu + + + This game has no update to delete! + Ce jeu n'a pas de mise à jour à supprimer! + + + Update + Mise à jour + + + This game has no DLC to delete! + Ce jeu n'a pas de DLC à supprimer! + + + DLC + DLC + + + Delete %1 + Supprime %1 + + + Are you sure you want to delete %1's %2 directory? + Êtes vous sûr de vouloir supprimer le répertoire %1 %2 ? + + + Open Update Folder + Ouvrir le Dossier de Mise à Jour + + + Delete Save Data + Supprimer les Données de Sauvegarde + + + This game has no update folder to open! + Ce jeu n'a pas de dossier de mise à jour à ouvrir! + + + No log file found for this game! + Aucun fichier journal trouvé pour ce jeu! + + + Failed to convert icon. + Échec de la conversion de l'icône. + + + This game has no save data to delete! + Ce jeu n'a pas de mise à jour à supprimer! + + + This game has no saved trophies to delete! + Ce jeu n'a aucun trophée sauvegardé à supprimer! + + + Save Data + Enregistrer les Données + + + Trophy + Trophée + + + SFO Viewer for + Visionneuse SFO pour + + + + HelpDialog + + Quickstart + Démarrage rapide + + + FAQ + FAQ + + + Syntax + Syntaxe + + + Special Bindings + Special bindings + + + Keybindings + Raccourcis + + + + KBMSettings + + Configure Controls + Configurer les Commandes + + + D-Pad + Croix directionnelle + + + Up + Haut + + + unmapped + non mappé + + + Left + Gauche + + + Right + Droite + + + Down + Bas + + + Left Analog Halfmode + Demi-mode analogique gauche + + + hold to move left stick at half-speed + maintenez pour déplacer le joystick gauche à mi-vitesse + + + Left Stick + Joystick gauche + + + Config Selection + Sélection de la Configuration + + + Common Config + Configuration Commune + + + Use per-game configs + Utiliser les configurations par jeu + + + L1 + L1 + + + L2 + L2 + + + Text Editor + Éditeur de Texte + + + Help + Aide + + + R1 + R1 + + + R2 + R2 + + + L3 + L3 + + + Touchpad Click + Clic tactile + + + Mouse to Joystick + Souris vers Joystick + + + *press F7 ingame to activate + *Appuyez sur F7 en jeu pour activer + + + R3 + R3 + + + Options + Options + + + Mouse Movement Parameters + Paramètres du mouvement de la souris + + + note: click Help Button/Special Keybindings for more information + remarque: cliquez sur le bouton Aide / Raccourcis spéciaux pour plus d'informations + + + Face Buttons + Touches d'action + + + Triangle + Triangle + + + Square + Carré + + + Circle + Rond + + + Cross + Croix + + + Right Analog Halfmode + Demi-mode analogique droit + + + hold to move right stick at half-speed + maintenez pour déplacer le joystick droit à mi-vitesse + + + Right Stick + Joystick Droit + + + Speed Offset (def 0.125): + Décalage de vitesse (def 0,125) : + + + Copy from Common Config + Copier à partir de la configuration commune + + + Deadzone Offset (def 0.50): + Deadzone Offset (def 0,50): + + + Speed Multiplier (def 1.0): + Multiplicateur de vitesse (def 1,0) : + + + Common Config Selected + Configuration courante sélectionnée + + + This button copies mappings from the Common Config to the currently selected profile, and cannot be used when the currently selected profile is the Common Config. + Ce bouton copie les mappings de la configuration commune vers le profil actuellement sélectionné, et ne peut pas être utilisé lorsque le profil actuellement sélectionné est la configuration commune. + + + Copy values from Common Config + Copier à partir de la configuration commune + + + Do you want to overwrite existing mappings with the mappings from the Common Config? + Voulez-vous remplacer les mappings existants par les mappings de la configuration commune ? + + + Unable to Save + Impossible de sauvegarder + + + Cannot bind any unique input more than once + Impossible de lier une entrée unique plus d'une fois + + + Press a key + Appuyez sur un bouton + + + Cannot set mapping + Impossible de définir le mapping + + + Mousewheel cannot be mapped to stick outputs + La molette de la souris ne peut pas être affectée aux sorties de la manette + + + Save + Enregistrer + + + Apply + Appliquer + + + Restore Defaults + Réinitialiser par défaut + + + Cancel + Annuler + + + + MainWindow + + Open/Add Elf Folder + Ouvrir/Ajouter un dossier ELF + + + Boot Game + Démarrer un jeu + + + Check for Updates + Vérifier les mises à jour + + + About shadPS4 + À propos de shadPS4 + + + Configure... + Configurer... + + + Recent Games + Jeux récents + + + Open shadPS4 Folder + Ouvrir le dossier de shadPS4 + + + Exit + Fermer + + + Exit shadPS4 + Fermer shadPS4 + + + Exit the application. + Fermer l'application. + + + Show Game List + Afficher la liste de jeux + + + Game List Refresh + Rafraîchir la liste de jeux + + + Tiny + Très Petit + + + Small + Petit + + + Medium + Moyen + + + Large + Grand + + + List View + Mode liste + + + Grid View + Mode grille + + + Elf Viewer + Visionneuse ELF + + + Game Install Directory + Répertoire des jeux + + + Download Cheats/Patches + Télécharger Cheats/Patchs + + + Dump Game List + Dumper la liste des jeux + + + Trophy Viewer + Visionneuse de trophées + + + No games found. Please add your games to your library first. + Aucun jeu trouvé. Veuillez d'abord ajouter vos jeux à votre bibliothèque. + + + Search... + Chercher... + + + File + Fichier + + + View + Affichage + + + Game List Icons + Icônes des jeux + + + Game List Mode + Mode d'affichage + + + Settings + Paramètres + + + Utils + Utilitaires + + + Themes + Thèmes + + + Help + Aide + + + Dark + Sombre + + + Light + Clair + + + Green + Vert + + + Blue + Bleu + + + Violet + Violet + + + toolBar + Barre d'outils + + + Game List + Liste de jeux + + + * Unsupported Vulkan Version + * Version de 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 patchs 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 installés. + + + Patches Downloaded Successfully! + Patchs téléchargés avec succès ! + + + All Patches available for all games have been downloaded. + Tous les patchs disponibles ont été téléchargés. + + + Games: + Jeux: + + + ELF files (*.bin *.elf *.oelf) + Fichiers ELF (*.bin *.elf *.oelf) + + + Game Boot + Démarrer un jeu + + + Only one file can be selected! + Un seul fichier peut être sélectionné ! + + + Run Game + Lancer le jeu + + + Eboot.bin file not found + Fichier Eboot.bin introuvable + + + Game is already running! + Le jeu est déjà en cours ! + + + shadPS4 + shadPS4 + + + Play + Jouer + + + Pause + Pause + + + Stop + Stop + + + Restart + Redémarrer + + + Full Screen + Plein écran + + + Controllers + Contrôleurs + + + Keyboard + Clavier + + + Refresh List + Rafraîchir la liste + + + Resume + Reprendre + + + Show Labels Under Icons + Afficher les libellés sous les icônes + + + + SettingsDialog + + Settings + Paramètres + + + General + Général + + + System + Système + + + Console Language + Langage de la console + + + Emulator Language + Langage de l'émulateur + + + Emulator + Émulateur + + + Enable Separate Update Folder + Dossier séparé pour les mises à jour + + + Default tab when opening settings + Onglet par défaut lors de l'ouverture des paramètres + + + Show Game Size In List + Afficher la taille des jeux dans la liste + + + Show Splash + Afficher l'image du jeu + + + Enable Discord Rich Presence + Activer la présence Discord + + + Username + Nom d'utilisateur + + + Trophy Key + Clé de trophée + + + Trophy + Trophée + + + Open the custom trophy images/sounds folder + Ouvrir le dossier des images/sons de trophée personnalisé + + + Logger + Journalisation + + + Log Type + Type de journal + + + Log Filter + Filtre du journal + + + Open Log Location + Ouvrir l'emplacement du journal + + + Input + Entrée + + + Cursor + Curseur + + + Hide Cursor + Masquer le curseur + + + Hide Cursor Idle Timeout + Délai d'inactivité pour masquer le curseur + + + s + s + + + Controller + Manette + + + Back Button Behavior + Comportement du bouton retour + + + Graphics + Graphismes + + + GUI + Interface + + + User + Utilisateur + + + Graphics Device + Carte graphique + + + Vblank Divider + Vblank + + + Advanced + Avancé + + + Enable Shaders Dumping + Dumper les shaders + + + Enable NULL GPU + NULL GPU + + + Enable HDR + Activer HDR + + + Paths + Chemins + + + Game Folders + Dossiers de jeu + + + Add... + Ajouter... + + + Remove + Supprimer + + + Debug + Débogage + + + Enable Debug Dumping + Activer le débogage + + + Enable Vulkan Validation Layers + Activer la couche de validation Vulkan + + + Enable Vulkan Synchronization Validation + Activer la synchronisation de la validation Vulkan + + + Enable RenderDoc Debugging + Activer le débogage RenderDoc + + + Enable Crash Diagnostics + Activer le diagnostic de crash + + + Collect Shaders + Collecter les shaders + + + Copy GPU Buffers + Copier la mémoire tampon GPU + + + Host Debug Markers + Marqueur de débogage hôte + + + Guest Debug Markers + Marqueur de débogage invité + + + Update + Mise à jour + + + Check for Updates at Startup + Vérif. maj au démarrage + + + Always Show Changelog + Afficher toujours le changelog + + + Update Channel + Canal de Mise à Jour + + + Check for Updates + Vérifier les mises à jour + + + GUI Settings + Paramètres de l'interface + + + Title Music + Musique du titre + + + Disable Trophy Notification + Désactiver la notification de trophée + + + Background Image + Image d'arrière-plan + + + Show Background Image + Afficher l'image d'arrière-plan + + + Opacity + Transparence + + + Play title music + Lire la musique du titre + + + Update Compatibility Database On Startup + Mettre à jour la base de données de compatibilité au lancement + + + Game Compatibility + Compatibilité du jeu + + + Display Compatibility Data + Afficher les données de compatibilité + + + Update Compatibility Database + Mettre à jour la base de données de compatibilité + + + Volume + Volume + + + Save + Enregistrer + + + Apply + Appliquer + + + Restore Defaults + Restaurer les paramètres par défaut + + + Close + Fermer + + + Point your mouse at an option to display its description. + Pointez votre souris sur une option pour afficher sa description. + + + Console Language:\nSets the language that the PS4 game uses.\nIt's recommended to set this to a language the game supports, which will vary by region. + Langue de la console:\nDéfinit la langue utilisée par le jeu PS4.\nIl est recommandé de le définir sur une langue que le jeu prend en charge, ce qui variera selon la région. + + + Emulator Language:\nSets the language of the emulator's user interface. + Langue de l'émulateur:\nDéfinit la langue de l'interface utilisateur de l'émulateur. + + + Enable Separate Update Folder:\nEnables installing game updates into a separate folder for easy management.\nThis can be manually created by adding the extracted update to the game folder with the name "CUSA00000-UPDATE" where the CUSA ID matches the game's ID. + Dossier séparé pour les mises à jour:\nInstalle les mises à jours des jeux dans un dossier séparé pour une gestion plus facile. + + + Show Splash Screen:\nShows the game's splash screen (a special image) while the game is starting. + Afficher l'écran de démarrage:\nAffiche l'écran de démarrage du jeu (une image spéciale) lors du démarrage du jeu. + + + Enable Discord Rich Presence:\nDisplays the emulator icon and relevant information on your Discord profile. + Activer Discord Rich Presence:\nAffiche l'icône de l'émulateur et les informations pertinentes sur votre profil Discord. + + + Username:\nSets the PS4's account username, which may be displayed by some games. + Nom d'utilisateur:\nDéfinit le nom d'utilisateur du compte PS4, qui peut être affiché par certains jeux. + + + Trophy Key:\nKey used to decrypt trophies. Must be obtained from your jailbroken console.\nMust contain only hex characters. + Clé de trophées:\nClé utilisée pour décrypter les trophées. Doit être obtenu à partir de votre console jailbreakée.\nDoit contenir des caractères hexadécimaux uniquement. + + + Log Type:\nSets whether to synchronize the output of the log window for performance. May have adverse effects on emulation. + Type de journal:\nDétermine si la sortie de la fenêtre de journalisation est synchronisée pour des raisons de performance. Cela peut avoir un impact négatif sur l'émulation. + + + Log Filter:\nFilters the log to only print specific information.\nExamples: "Core:Trace" "Lib.Pad:Debug Common.Filesystem:Error" "*:Critical"\nLevels: Trace, Debug, Info, Warning, Error, Critical - in this order, a specific level silences all levels preceding it in the list and logs every level after it. + Filtre de journal:\n n'imprime que des informations spécifiques.\nExemples: "Core:Trace" "Lib.Pad:Debug Common.Filesystem:Error" "*:Critical" Niveaux: Trace, Debug, Info, Avertissement, Erreur, Critique - dans cet ordre, un niveau particulier désactive tous les niveaux précédents de la liste et enregistre tous les niveaux suivants. + + + Update:\nRelease: Official versions released every month that may be very outdated, but are more reliable and tested.\nNightly: Development versions that have all the latest features and fixes, but may contain bugs and are less stable. + Mise à jour:\nRelease: versions officielles publiées chaque mois qui peuvent être très anciennes, mais plus fiables et testées.\nNightly: versions de développement avec toutes les dernières fonctionnalités et correctifs, mais pouvant avoir des bogues et être moins stables. + + + Background Image:\nControl the opacity of the game background image. + Image de fond :\nContrôle l'opacité de l'image de fond du jeu. + + + Play Title Music:\nIf a game supports it, enable playing special music when selecting the game in the GUI. + Jouer de la musique de titre:\nSi le jeu le prend en charge, cela active la musique spéciale lorsque vous sélectionnez le jeu dans l'interface utilisateur. + + + Disable Trophy Pop-ups:\nDisable in-game trophy notifications. Trophy progress can still be tracked using the Trophy Viewer (right-click the game in the main window). + Désactiver les notifications de trophées:\nDésactive les notifications de trophées en jeu. La progression des trophées peut toujours être suivie à l'aide de la Visionneuse de trophées (clique droit sur le jeu sur la fenêtre principale). + + + Hide Cursor:\nChoose when the cursor will disappear:\nNever: You will always see the mouse.\nidle: Set a time for it to disappear after being idle.\nAlways: you will never see the mouse. + Masquer le curseur:\nChoisissez quand le curseur disparaîtra:\nJamais: Vous verrez toujours la souris.\nInactif: Définissez un temps pour qu'il disparaisse après inactivité.\nToujours: vous ne verrez jamais la souris. + + + Hide Idle Cursor Timeout:\nThe duration (seconds) after which the cursor that has been idle hides itself. + Définissez un temps pour que la souris disparaisse après être inactif. + + + Back Button Behavior:\nSets the controller's back button to emulate tapping the specified position on the PS4 touchpad. + Comportement du bouton retour:\nDéfinit le bouton de retour de la manette pour imiter le toucher de la position spécifiée sur le pavé tactile PS4. + + + Display Compatibility Data:\nDisplays game compatibility information in table view. Enable "Update Compatibility On Startup" to get up-to-date information. + Afficher les données de compatibilité:\nAffiche les informations de compatibilité des jeux dans une colonne dédiée. Activez "Mettre à jour la compatibilité au démarrage" pour avoir des informations à jour. + + + Update Compatibility On Startup:\nAutomatically update the compatibility database when shadPS4 starts. + Mettre à jour la compatibilité au démarrage:\nMettre à jour automatiquement la base de données de compatibilité au démarrage de shadPS4. + + + Update Compatibility Database:\nImmediately update the compatibility database. + Mettre à jour la compatibilité au démarrage:\nMet à jour immédiatement la base de données de compatibilité. + + + Never + Jamais + + + Idle + Inactif + + + Always + Toujours + + + Touchpad Left + Pavé Tactile Gauche + + + Touchpad Right + Pavé Tactile Droit + + + Touchpad Center + Centre du Pavé Tactile + + + None + Aucun + + + Graphics Device:\nOn multiple GPU systems, select the GPU the emulator will use from the drop down list,\nor select "Auto Select" to automatically determine it. + Adaptateur graphique:\nSélectionnez le GPU que l'émulateur utilisera dans les systèmes multi-GPU à partir de la liste déroulante,\nou choisissez "Auto Select" pour le déterminer automatiquement. + + + Width/Height:\nSets the size of the emulator window at launch, which can be resized during gameplay.\nThis is different from the in-game resolution. + Largeur/Hauteur:\nDéfinit la taille de la fenêtre de l'émulateur au démarrage, qui peut être redimensionnée pendant le jeu.\nCela diffère de la résolution interne du jeu. + + + Vblank Divider:\nThe frame rate at which the emulator refreshes at is multiplied by this number. Changing this may have adverse effects, such as increasing the game speed, or breaking critical game functionality that does not expect this to change! + Diviseur Vblank:\nLe taux de rafraîchissement de l'émulateur est multiplié par ce nombre. Changer cela peut avoir des effets négatifs, tels qu'une augmentation de la vitesse du jeu ou la rupture de fonctionnalités critiques du jeu qui ne s'attendent pas à ce changement ! + + + Enable Shaders Dumping:\nFor the sake of technical debugging, saves the games shaders to a folder as they render. + Activer l'exportation de shaders:\nPour le débogage technique, les shaders du jeu sont enregistrés dans un dossier lors du rendu. + + + Enable Null GPU:\nFor the sake of technical debugging, disables game rendering as if there were no graphics card. + Activer le GPU nul:\nPour le débogage technique, désactive le rendu du jeu comme s'il n'y avait pas de carte graphique. + + + Enable HDR:\nEnables HDR in games that support it.\nYour monitor must have support for the BT2020 PQ color space and the RGB10A2 swapchain format. + Activer HDR:\nActive le HDR dans les jeux qui le supportent.\nVotre moniteur doit avoir la prise en charge de l'espace couleur PQ BT2020 et du format swapchain RGB10A2. + + + Game Folders:\nThe list of folders to check for installed games. + Dossiers de jeux:\nLa liste des dossiers à vérifier pour les jeux installés. + + + Add:\nAdd a folder to the list. + Ajouter:\nAjouter un dossier à la liste. + + + Remove:\nRemove a folder from the list. + Supprimer:\nSupprimer un dossier de la liste. + + + Enable Debug Dumping:\nSaves the import and export symbols and file header information of the currently running PS4 program to a directory. + Activer l'exportation de débogage:\nEnregistre les symboles d'importation et d'exportation et les informations d'en-tête du fichier du programme PS4 actuel dans un répertoire. + + + Enable Vulkan Validation Layers:\nEnables a system that validates the state of the Vulkan renderer and logs information about its internal state.\nThis will reduce performance and likely change the behavior of emulation. + Activer les couches de validation Vulkan:\nActive un système qui valide l'état du rendu Vulkan et enregistre des informations sur son état interne. Cela réduit les performances et peut changer le comportement de l'émulation. + + + Enable Vulkan Synchronization Validation:\nEnables a system that validates the timing of Vulkan rendering tasks.\nThis will reduce performance and likely change the behavior of emulation. + Activer la validation de synchronisation Vulkan:\nActive un système qui valide la planification des tâches de rendu Vulkan. Cela réduit les performances et peut changer le comportement de l'émulation. + + + Enable RenderDoc Debugging:\nIf enabled, the emulator will provide compatibility with Renderdoc to allow capture and analysis of the currently rendered frame. + Activer le débogage RenderDoc:\nS'il est activé, l'émulateur fournit une compatibilité avec Renderdoc, permettant d'enregistrer et d'analyser la trame rendue actuelle. + + + Collect Shaders:\nYou need this enabled to edit shaders with the debug menu (Ctrl + F10). + Collecter les Shaders:\nVous devez activer cette option pour modifier les shaders avec le menu de débogage (Ctrl + F10). + + + Crash Diagnostics:\nCreates a .yaml file with info about the Vulkan state at the time of crashing.\nUseful for debugging 'Device lost' errors. If you have this enabled, you should enable Host AND Guest Debug Markers.\nDoes not work on Intel GPUs.\nYou need Vulkan Validation Layers enabled and the Vulkan SDK for this to work. + Diagnostic de crash:\nCrée un fichier .yaml avec des informations sur l'état de Vulkan au moment du crash.\nUtile pour déboguer les erreurs "Device lost". Si cette option est activée, vous devez aussi activer Marqueur de débogage hôte ET invité.\nNe marche pas pour les GPUs Intel.\nVous devez activer la couche de validation Vulkan ainsi que le Vulkan SDK pour que cela fonctionne. + + + Copy GPU Buffers:\nGets around race conditions involving GPU submits.\nMay or may not help with PM4 type 0 crashes. + Copier la mémoire tampon GPU:\nContourne les conditions de course impliquant des soumissions GPU.\nPeut aider ou non en cas de crash PM4 type 0. + + + Host Debug Markers:\nInserts emulator-side information like markers for specific AMDGPU commands around Vulkan commands, as well as giving resources debug names.\nIf you have this enabled, you should enable Crash Diagnostics.\nUseful for programs like RenderDoc. + Marqueur de débogage hôte:\nInsère des informations côté émulateur telles que des marqueurs pour des commandes spécifiques AMDGPU autour des commandes Vulkan, ainsi que donner les noms de débogages des ressources.\nSi cette option est activée, vous devriez activer "Diagnostic de crash".\nUtile pour des programmes comme RenderDoc. + + + Guest Debug Markers:\nInserts any debug markers the game itself has added to the command buffer.\nIf you have this enabled, you should enable Crash Diagnostics.\nUseful for programs like RenderDoc. + Marqueur de débogage invité:\nInsère tous les marqueurs de débogage que le jeu a ajouté a la commande mémoire tampon.\nSi cette option est activée, vous devriez activer "Diagnostic de crash".\nUtile pour des programmes comme RenderDoc. + + + Save Data Path:\nThe folder where game save data will be saved. + Chemin de sauvegarde :\nLe dossier où les sauvegardes du jeu sont enregistré. + + + Browse:\nBrowse for a folder to set as the save data path. + Parcourir:\nNaviguez pour trouver un dossier pour définir le chemin des données de sauvegarde. + + + Release + Sortie + + + Nightly + Nocturne + + + Set the volume of the background music. + Volume de la musique de fond. + + + Enable Motion Controls + Activer les Mouvements + + + Save Data Path + Enregistrer le chemin vers les données + + + Browse + Parcourir + + + async + asynchrone + + + sync + synchrone + + + Auto Select + Sélection automatique + + + Directory to install games + Répertoire d'installation des jeux + + + Directory to save data + Répertoire d'enregistrement des données + + + Video + Vidéo + + + Display Mode + Mode d'affichage + + + Windowed + Fenêtré + + + Fullscreen + Plein écran + + + Fullscreen (Borderless) + Plein écran (sans bordure) + + + Window Size + Taille de fenêtre + + + W: + W: + + + H: + H: + + + Separate Log Files + Séparer les fichiers de log + + + Separate Log Files:\nWrites a separate logfile for each game. + Fichiers journaux séparés :\nÉcrit un fichier journal séparé pour chaque jeu. + + + Trophy Notification Position + Position de notification du trophée + + + Left + Gauche + + + Right + Droite + + + Top + Haut + + + Bottom + Bas + + + Notification Duration + Durée de la notification + + + Portable User Folder + Dossier d'utilisateur portable + + + Create Portable User Folder from Common User Folder + Créer un dossier utilisateur portable à partir du dossier utilisateur commun + + + Portable user folder:\nStores shadPS4 settings and data that will be applied only to the shadPS4 build located in the current folder. Restart the app after creating the portable user folder to begin using it. + Dossier utilisateur portable :\nStocke les paramètres et données shadPS4 qui seront appliqués uniquement à la version shadPS4 située dans le dossier actuel. Redémarrez l'application après avoir créé le dossier utilisateur portable pour commencer à l'utiliser. + + + Cannot create portable user folder + Impossible de créer le dossier utilisateur portable + + + %1 already exists + %1 existe déjà + + + Portable user folder created + Dossier utilisateur portable créé + + + %1 successfully created. + %1 a été créé avec succès. + + + Open the custom trophy images/sounds folder:\nYou can add custom images to the trophies and an audio.\nAdd the files to custom_trophy with the following names:\ntrophy.wav OR trophy.mp3, bronze.png, gold.png, platinum.png, silver.png\nNote: The sound will only work in QT versions. + Ouvrez le dossier des images/sons des trophées personnalisés:\nVous pouvez ajouter des images personnalisées aux trophées et aux sons.\nAjoutez les fichiers à custom_trophy avec les noms suivants:\ntrophy.wav OU trophy.mp3, bronze.png, gold.png, platinum.png, silver.png\nNote : Le son ne fonctionnera que dans les versions QT. + + + + TrophyViewer + + Trophy Viewer + Visionneuse de trophées + + + Select Game: + Sélectionnez un jeu: + + + Progress + Progression + + + Show Earned Trophies + Afficher les trophées gagnés + + + Show Not Earned Trophies + Afficher les trophées non gagnés + + + Show Hidden Trophies + Afficher les trophées cachés + + + diff --git a/src/qt_gui/translations/hu_HU.ts b/src/qt_gui/translations/hu_HU.ts index f6b853e4b..85b6f2c95 100644 --- a/src/qt_gui/translations/hu_HU.ts +++ b/src/qt_gui/translations/hu_HU.ts @@ -1,1664 +1,2089 @@ + - - - - AboutDialog - - - About shadPS4 - A shadPS4-ről - - - - shadPS4 - shadPS4 - - - - 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. - Ne használja ezt a szoftvert olyan játékokkal, amelyeket nem legális módon szerzett be. - - - - ElfViewer - - - Open Folder - Mappa megnyitása - - - - GameInfoClass - - - Loading game list, please wait :3 - Játék könyvtár betöltése, kérjük várjon :3 - - - - Cancel - Megszakítás - - - - Loading... - Betöltés.. - - - - InstallDirSelect - - - shadPS4 - Choose directory - shadPS4 - Mappa kiválasztása - - - - Select which directory you want to install to. - Válassza ki a mappát a játékok telepítésére. - - - - GameInstallDialog - - - shadPS4 - Choose directory - shadPS4 - Mappa kiválasztása - - - - Directory to install games - Mappa a játékok telepítésére - - - - Browse - Böngészés - - - - Error - Hiba - - - - The value for location to install games is not valid. - A játékok telepítéséhez megadott útvonal nem érvényes. - - - - GuiContextMenus - - - Create Shortcut - Parancsikon Létrehozása - - - - Cheats / Patches - Csalások / Javítások - - - - SFO Viewer - SFO Nézegető - - - - Trophy Viewer - Trófeák Megtekintése - - - - Open Folder... - Mappa megnyitása... - - - - Open Game Folder - Játék Mappa Megnyitása - - - - Open Save Data Folder - Mentési adatok mappa megnyitása - - - - Open Log Folder - Napló mappa megnyitása - - - - Copy info... - Információ Másolása... - - - - Copy Name - Név Másolása - - - - Copy Serial - Széria Másolása - - - - Copy All - Összes Másolása - - - - Delete... - Törlés... - - - - Delete Game - Játék törlése - - - - Delete Update - Frissítések törlése - - - - Delete DLC - DLC-k törlése - - - - Compatibility... - Compatibility... - - - - Update database - Update database - - - - View report - View report - - - - Submit a report - Submit a report - - - - Shortcut creation - Parancsikon létrehozása - - - - Shortcut created successfully! - Parancsikon sikeresen létrehozva! - - - - Error - Hiba - - - - Error creating shortcut! - Hiba a parancsikon létrehozásával! - - - - Install PKG - PKG telepítése - - - - Game - Játék - - - - requiresEnableSeparateUpdateFolder_MSG - Ehhez a funkcióhoz szükséges a 'Külön Frissítési Mappa Engedélyezése' opció, hogy működjön. Ha használni akarja, először engedélyezze azt. - - - - This game has no update to delete! - Ehhez a játékhoz nem tartozik törlendő frissítés! - - - - Update - Frissítés - - - - This game has no DLC to delete! - Ehhez a játékhoz nem tartozik törlendő DLC! - - - - DLC - DLC - - - - Delete %1 - Delete %1 - - - - Are you sure you want to delete %1's %2 directory? - Biztosan törölni akarja a %1's %2 mappát? - - - - MainWindow - - - Open/Add Elf Folder - ELF Mappa Megnyitása/Hozzáadása - - - - Install Packages (PKG) - PKG-k Telepítése (PKG) - - - - Boot Game - Játék Indítása - - - - Check for Updates - Frissítések keresése - - - - About shadPS4 - A shadPS4-ről - - - - Configure... - Konfigurálás... - - - - Install application from a .pkg file - Program telepítése egy .pkg fájlból - - - - Recent Games - Legutóbbi Játékok - - - - Exit - Kilépés - - - - Exit shadPS4 - Kilépés a shadPS4-ből - - - - Exit the application. - Lépjen ki a programból. - - - - Show Game List - Játék Könyvtár Megjelenítése - - - - Game List Refresh - Játék Könyvtár Újratöltése - - - - Tiny - Apró - - - - Small - Kicsi - - - - Medium - Közepes - - - - Large - Nagy - - - - List View - Lista Nézet - - - - Grid View - Rács Nézet - - - - Elf Viewer - Elf Nézegető - - - - Game Install Directory - Játék Telepítési Mappa - - - - Download Cheats/Patches - Csalások / Javítások letöltése - - - - Dump Game List - Játéklista Dumpolása - - - - PKG Viewer - PKG Nézegető - - - - Search... - Keresés... - - - - File - Fájl - - - - View - Nézet - - - - Game List Icons - Játékkönyvtár Ikonok - - - - Game List Mode - Játékkönyvtár Nézet - - - - Settings - Beállítások - - - - Utils - Segédeszközök - - - - Themes - Témák - - - - Help - Segítség - - - - Dark - Sötét - - - - Light - Világos - - - - Green - Zöld - - - - Blue - Kék - - - - Violet - Ibolya - - - - toolBar - Eszköztár - - - - PKGViewer - - - Open Folder - Mappa Megnyitása - - - - TrophyViewer - - - Trophy Viewer - Trófeák Megtekintése - - - - SettingsDialog - - - Settings - Beállítások - - - - General - Általános - - - - System - Rendszer - - - - Console Language - A Konzol Nyelvezete - - - - Emulator Language - Az Emulátor Nyelvezete - - - - Emulator - Emulátor - - - - Enable Fullscreen - Teljes Képernyő Engedélyezése - - - - Enable Separate Update Folder - Külön Frissítési Mappa Engedélyezése - - - - Show Splash - Indítóképernyő Mutatása - - - - Is PS4 Pro - PS4 Pro mód - - - - Enable Discord Rich Presence - A Discord Rich Presence engedélyezése - - - - Username - Felhasználónév - - - - Trophy Key - Trophy Key - - - - Trophy - Trophy - - - - Logger - Naplózó - - - - Log Type - Naplózási Típus - - - - Log Filter - Naplózási Filter - - - - Input - Bemenet - - - - Cursor - Kurzor - - - - Hide Cursor - Kurzor elrejtése - - - - Hide Cursor Idle Timeout - Kurzor inaktivitási időtúllépés - - - - s - s - - - - Controller - Kontroller - - - - Back Button Behavior - Vissza gomb Viselkedése - - - - Graphics - Grafika - - - - Graphics Device - Grafikai Eszköz - - - - Width - Szélesség - - - - Height - Magasság - - - - Vblank Divider - Vblank Elosztó - - - - Advanced - Haladó - - - - Enable Shaders Dumping - Shader Dumpolás Engedélyezése - - - - Enable NULL GPU - NULL GPU Engedélyezése - - - - Paths - Útvonalak - - - - Game Folders - Játékmappák - - - - Add... - Hozzáadás... - - - - Remove - Eltávolítás - - - - Debug - Debugolás - - - - Enable Debug Dumping - Debug Dumpolás Engedélyezése - - - - Enable Vulkan Validation Layers - Vulkan Validációs Rétegek Engedélyezése - - - - Enable Vulkan Synchronization Validation - Vulkan Szinkronizálás Validáció - - - - Enable RenderDoc Debugging - RenderDoc Debugolás Engedélyezése - - - - Update - Frissítés - - - - Check for Updates at Startup - Frissítések keresése indításkor - - - - Update Channel - Frissítési Csatorna - - - - Check for Updates - Frissítések keresése - - - - GUI Settings - GUI Beállítások - - - - Disable Trophy Pop-ups - Disable Trophy Pop-ups - - - - Play title music - Címzene lejátszása - - - - Update Compatibility Database On Startup - Update Compatibility Database On Startup - - - - Game Compatibility - Game Compatibility - - - - Display Compatibility Data - Display Compatibility Data - - - - Update Compatibility Database - Update Compatibility Database - - - - Volume - Hangerő - - - - Audio Backend - Audio Backend - - - - MainWindow - - - Game List - Játéklista - - - - * Unsupported Vulkan Version - * Nem támogatott Vulkan verzió - - - - Download Cheats For All Installed Games - Csalások letöltése minden telepített játékhoz - - - - Download Patches For All Games - Javítások letöltése minden játékhoz - - - - Download Complete - Letöltés befejezve - - - - You have downloaded cheats for all the games you have installed. - Minden elérhető csalás letöltődött az összes telepített játékhoz. - - - - Patches Downloaded Successfully! - Javítások sikeresen letöltve! - - - - All Patches available for all games have been downloaded. - Az összes játékhoz elérhető javí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! - Frissítés észlelve! - - - - PKG and Game versions match: - A PKG és a játék verziói egyeznek: - - - - Would you like to overwrite? - Szeretné felülírni? - - - - PKG Version %1 is older than installed version: - A(z) %1-es PKG verzió régebbi, mint a telepített verzió: - - - - Game is installed: - A játék telepítve van: - - - - Would you like to install Patch: - Szeretné telepíteni a frissítést: - - - - DLC Installation - DLC Telepítés - - - - Would you like to install DLC: %1? - Szeretné telepíteni a %1 DLC-t? - - - - DLC already installed: - DLC már telepítve: - - - - Game already installed - A játék már telepítve van - - - - 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 for - Cheats / Patches for - - - - defaultTextEdit_MSG - A csalások/javítások kísérleti jellegűek.\nHasználja őket óvatosan.\n\nTöltse le a csalásokat egyesével a tároló kiválasztásával és a letöltés gombra kattintással.\nA Javítások fül alatt egyszerre letöltheti az összes javítást, majd választhat, melyeket szeretné használni, és elmentheti a választását.\n\nMivel nem mi 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. Ha a javítások nem jelennek meg, lehet, hogy nem léteznek a játék adott sorozatszámához és verziójához. - - - - 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. - - - - The game is in version: %1 - A játék verziója: %1 - - - - The downloaded patch only works on version: %1 - A letöltött javításhoz a(z) %1 verzió működik - - - - You may need to update your game. - Lehet, hogy frissítened kell a játékodat. - - - - Incompatibility Notice - Inkompatibilitási értesítés - - - - 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 mappa nem létezik: - - - - Failed to open files.json for reading. - Nem sikerült megnyitni a files.json fájlt olvasásra. - - - - Name: - Név: - - - - Can't apply cheats before the game is started - Nem lehet csalásokat alkalmazni, mielőtt a játék elindul. - - - - SettingsDialog - - - Save - Mentés - - - - Apply - Alkalmaz - - - - Restore Defaults - Alapértelmezett értékek visszaállítása - - - - Close - Bezárás - - - - Point your mouse at an option to display its description. - Helyezze az egérmutatót egy lehetőség fölé, hogy megjelenítse annak leírását. - - - - consoleLanguageGroupBox - Konzol nyelve:\nBeállítja a PS4 játék nyelvét.\nAjánlott a játék által támogatott nyelvre állítani, amely régiónként változhat. - - - - emulatorLanguageGroupBox - Emulátor nyelve:\nBeállítja az emulátor felhasználói felületének nyelvét. - - - - fullscreenCheckBox - Teljes képernyő engedélyezése:\nAutomatikusan teljes képernyőre állítja a játék ablakát.\nEz a F11 billentyű megnyomásával kapcsolható ki/be. - - - - separateUpdatesCheckBox - Külön Frissítéi Mappa Engedélyezése:\nEngedélyezi a frissítések külön mappába helyezését, a könnyű kezelésük érdekében. - - - - showSplashCheckBox - Indítóképernyő megjelenítése:\nMegjeleníti a játék indítóképernyőjét (különleges képet) a játék elindításakor. - - - - ps4proCheckBox - PS4 Pro:\nAz emulátort PS4 PRO-ként kezeli, ami engedélyezhet speciális funkciókat olyan játékokban, amelyek támogatják azt. - - - - discordRPCCheckbox - A Discord Rich Presence engedélyezése:\nMegjeleníti az emulator ikonját és a kapcsolódó információkat a Discord profilján. - - - - userName - Felhasználónév:\nBeállítja a PS4 fiók felhasználónevét, amelyet egyes játékok megjeleníthetnek. - - - - TrophyKey - Trophy Key:\nKey used to decrypt trophies. Must be obtained from your jailbroken console.\nMust contain only hex characters. - - - - logTypeGroupBox - Napló típusa:\nBeállítja, hogy szinkronizálja-e a naplóablak kimenetét a teljesítmény érdekében. Ennek kedvezőtlen hatásai lehetnek az emulációra. - - - - logFilter - Napló szűrő:\nCsak bizonyos információk megjelenítésére szűri a naplót.\nPéldák: "Core:Trace" "Lib.Pad:Debug Common.Filesystem:Error" "*:Critical" Szintek: Trace, Debug, Info, Warning, Error, Critical - ebben a sorrendben, egy konkrét szint elnémítja az előtte lévő összes szintet, és naplózza az utána következő szinteket. - - - - updaterGroupBox - Frissítés:\nRelease: Hivatalos verziók, amelyeket havonta adnak ki, és amelyek nagyon elavultak lehetnek, de megbízhatóbbak és teszteltek.\nNightly: Fejlesztési verziók, amelyek az összes legújabb funkciót és javítást tartalmazzák, de hibákat tartalmazhatnak és kevésbé stabilak. - - - - GUIgroupBox - Játék címzene lejátszása:\nHa a játék támogatja, engedélyezze egy speciális zene lejátszását, amikor a játékot kiválasztja a GUI-ban. - - - - disableTrophycheckBox - Disable Trophy Pop-ups:\nDisable in-game trophy notifications. Trophy progress can still be tracked using the Trophy Viewer (right-click the game in the main window). - - - - hideCursorGroupBox - Kurzor elrejtése:\nVálassza ki, mikor tűnjön el az egérmutató:\nSoha: Az egér mindig látható.\nInaktív: Állítson be egy időt, amennyi idő mozdulatlanság után eltűnik.\nMindig: az egér mindig el lesz rejtve. - - - - idleTimeoutGroupBox - Állítson be egy időt, ami után egér inaktív állapotban eltűnik. - - - - backButtonBehaviorGroupBox - Vissza gomb viselkedés:\nBeállítja a vezérlő vissza gombját, hogy utánozza a PS4 érintőpadján megadott pozíció megérintését. - - - - enableCompatibilityCheckBox - Display Compatibility Data:\nDisplays game compatibility information in table view. Enable "Update Compatibility On Startup" to get up-to-date information. - - - - checkCompatibilityOnStartupCheckBox - Update Compatibility On Startup:\nAutomatically update the compatibility database when shadPS4 starts. - - - - updateCompatibilityButton - Update Compatibility Database:\nImmediately update the compatibility database. - - - - Never - Soha - - - - Idle - Inaktív - - - - Always - Mindig - - - - Touchpad Left - Érintőpad Bal - - - - Touchpad Right - Érintőpad Jobb - - - - Touchpad Center - Érintőpad Közép - - - - None - Semmi - - - - graphicsAdapterGroupBox - Grafikus eszköz:\nTöbb GPU-s rendszereken válassza ki, melyik GPU-t használja az emulátor a legördülő listából,\nvagy válassza az "Auto Select" lehetőséget, hogy automatikusan kiválassza azt. - - - - resolutionLayout - Szélesség/Magasság:\nBeállítja az emulátor ablakának méretét induláskor, amely a játék során átméretezhető.\nEz különbözik a játékbeli felbontástól. - - - - heightDivider - Vblank elosztó:\nAz emulátor frissítési sebessége e számot megszorozva működik. Ennek megváltoztatása kedvezőtlen hatásokat okozhat, például növelheti a játék sebességét, vagy megszakíthat kritikus játékfunkciókat, amelyek nem számítanak arra, hogy ez megváltozik! - - - - dumpShadersCheckBox - Shader dumping engedélyezése:\nMűszaki hibaelhárítás céljából a játékok shaderjeit elmenti egy mappába, ahogy renderelődnek. - - - - nullGpuCheckBox - Null GPU engedélyezése:\nMűszaki hibaelhárítás céljából letiltja a játék renderelését, mintha nem lenne grafikus kártya. - - - - gameFoldersBox - Játék mappák:\nA mappák listája, ahol telepített játékok vannak. - - - - addFolderButton - Hozzáadás:\nHozzon létre egy mappát a listában. - - - - removeFolderButton - Eltávolítás:\nTávolítson el egy mappát a listából. - - - - debugDump - Debug dumpolás engedélyezése:\nElmenti a futó PS4 program import- és exportszimbólumait, valamint a fájl fejlécinformációit egy könyvtárba. - - - - vkValidationCheckBox - Vulkan validációs rétegek engedélyezése:\nEngedélyezi a Vulkan renderelő állapotának validálását és információk naplózását annak belső állapotáról. Ez csökkenti a teljesítményt és valószínűleg megváltoztatja az emuláció viselkedését. - - - - vkSyncValidationCheckBox - Vulkan szinkronizációs validáció engedélyezése:\nEngedélyezi a Vulkan renderelési feladatok időzítésének validálását. Ez csökkenti a teljesítményt és valószínűleg megváltoztatja az emuláció viselkedését. - - - - rdocCheckBox - RenderDoc hibakeresés engedélyezése:\nHa engedélyezve van, az emulátor kompatibilitást biztosít a Renderdoc számára, hogy lehetővé tegye a jelenleg renderelt keret rögzítését és elemzését. - - - - GameListFrame - - - Icon - Ikon - - - - Name - Név - - - - Serial - Sorozatszám - - - - Compatibility - Compatibility - - - - Region - Régió - - - - Firmware - Firmware - - - - Size - Méret - - - - Version - Verzió - - - - Path - Útvonal - - - - Play Time - Játékidő - - - - Never Played - Never Played - - - - h - h - - - - m - m - - - - s - s - - - - Compatibility is untested - Compatibility is untested - - - - Game does not initialize properly / crashes the emulator - Game does not initialize properly / crashes the emulator - - - - Game boots, but only displays a blank screen - Game boots, but only displays a blank screen - - - - Game displays an image but does not go past the menu - Game displays an image but does not go past the menu - - - - Game has game-breaking glitches or unplayable performance - Game has game-breaking glitches or unplayable performance - - - - Game can be completed with playable performance and no major glitches - Game can be completed with playable performance and no major glitches - - - - CheckUpdate - - - Auto Updater - Automatikus frissítő - - - - Error - Hiba - - - - Network error: - Hálózati hiba: - - - - Failed to parse update information. - A frissítési információk elemzése sikertelen. - - - - No pre-releases found. - Nem található előzetes kiadás. - - - - Invalid release data. - Érvénytelen kiadási adatok. - - - - No download URL found for the specified asset. - Nincs letöltési URL a megadott eszközhöz. - - - - Your version is already up to date! - A verziód már naprakész! - - - - Update Available - Frissítés elérhető - - - - Update Channel - Frissítési Csatorna - - - - Current Version - Jelenlegi verzió - - - - Latest Version - Új verzió - - - - Do you want to update? - Szeretnéd frissíteni? - - - - Show Changelog - Változások megjelenítése - - - - Check for Updates at Startup - Frissítések keresése indításkor - - - - Update - Frissítés - - - - No - Mégse - - - - Hide Changelog - Változások elrejtése - - - - Changes - Változások - - - - Network error occurred while trying to access the URL - Hálózati hiba történt az URL elérésekor - - - - Download Complete - Letöltés kész - - - - The update has been downloaded, press OK to install. - A frissítés letöltődött, nyomja meg az OK gombot az telepítéshez. - - - - Failed to save the update file at - A frissítési fájl mentése nem sikerült a következő helyre - - - - Starting Update... - Frissítés indítása... - - - - Failed to create the update script file - A frissítési szkript fájl létrehozása nem sikerült - - - - GameListUtils - - - B - B - - - - KB - KB - - - - MB - MB - - - - GB - GB - - - - TB - TB - - - \ No newline at end of file + + + AboutDialog + + About shadPS4 + A shadPS4-ről + + + 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. + Ne használja ezt a szoftvert olyan játékokkal, amelyeket nem legális módon szerzett be. + + + + CheatsPatches + + Cheats / Patches for + Cheats / Patches for + + + 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:\n + A csalások/javítások kísérleti jellegűek.\nHasználja őket óvatosan.\n\nTöltse le a csalásokat egyesével a tároló kiválasztásával és a letöltés gombra kattintással.\nA Javítások fül alatt egyszerre letöltheti az összes javítást, majd választhat, melyeket szeretné használni, és elmentheti a választását.\n\nMivel nem mi 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:\n + + + 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 + + + No Cheats found for this game in this version of the selected repository,try another repository or a different version of the game. + 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 + + + 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. + 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 + + + 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. If the patch does not appear, it may be that it does not exist for the specific serial and version of the game. + 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. Ha a javítások nem jelennek meg, lehet, hogy nem léteznek a játék adott sorozatszámához és verziójához. + + + 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. + + + The game is in version: %1 + A játék verziója: %1 + + + The downloaded patch only works on version: %1 + A letöltött javításhoz a(z) %1 verzió működik + + + You may need to update your game. + Lehet, hogy frissítened kell a játékodat. + + + Incompatibility Notice + Inkompatibilitási értesítés + + + 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 mappa nem létezik: + + + Failed to open files.json for reading. + Nem sikerült megnyitni a files.json fájlt olvasásra. + + + Name: + Név: + + + Can't apply cheats before the game is started + Nem lehet csalásokat alkalmazni, mielőtt a játék elindul. + + + Close + Bezárás + + + + CheckUpdate + + Auto Updater + Automatikus frissítő + + + Error + Hiba + + + Network error: + Hálózati hiba: + + + The Auto Updater allows up to 60 update checks per hour.\nYou have reached this limit. Please try again later. + Az automatikus frissítő óránként legfeljebb 60 frissítésellenőrzést engedélyez.\nElérte ezt a korlátot. Kérjük, próbálja újra később. + + + Failed to parse update information. + A frissítési információk elemzése sikertelen. + + + No pre-releases found. + Nem található előzetes kiadás. + + + Invalid release data. + Érvénytelen kiadási adatok. + + + No download URL found for the specified asset. + Nincs letöltési URL a megadott eszközhöz. + + + Your version is already up to date! + A verziód már naprakész! + + + Update Available + Frissítés elérhető + + + Update Channel + Frissítési Csatorna + + + Current Version + Jelenlegi verzió + + + Latest Version + Új verzió + + + Do you want to update? + Szeretnéd frissíteni? + + + Show Changelog + Változások megjelenítése + + + Check for Updates at Startup + Frissítések keresése indításkor + + + Update + Frissítés + + + No + Mégse + + + Hide Changelog + Változások elrejtése + + + Changes + Változások + + + Network error occurred while trying to access the URL + Hálózati hiba történt az URL elérésekor + + + Download Complete + Letöltés kész + + + The update has been downloaded, press OK to install. + A frissítés letöltődött, nyomja meg az OK gombot az telepítéshez. + + + Failed to save the update file at + A frissítési fájl mentése nem sikerült a következő helyre + + + Starting Update... + Frissítés indítása... + + + Failed to create the update script file + A frissítési szkript fájl létrehozása nem sikerült + + + + CompatibilityInfoClass + + Fetching compatibility data, please wait + Kompatibilitási adatok betöltése, kérem várjon + + + Cancel + Megszakítás + + + Loading... + Betöltés... + + + Error + Hiba + + + Unable to update compatibility data! Try again later. + Nem sikerült frissíteni a kompatibilitási adatokat! Kérem próbálja újra később. + + + Unable to open compatibility_data.json for writing. + Nem sikerült megnyitni a compatibility_data.json fájlt írásra. + + + Unknown + Ismeretlen + + + Nothing + Semmi + + + Boots + Csizmák + + + Menus + Menük + + + Ingame + Játékban + + + Playable + Játszható + + + + ControlSettings + + Configure Controls + Configure Controls + + + D-Pad + D-Pad + + + Up + Up + + + Left + Left + + + Right + Right + + + Down + Down + + + Left Stick Deadzone (def:2 max:127) + Left Stick Deadzone (def:2 max:127) + + + Left Deadzone + Left Deadzone + + + Left Stick + Left Stick + + + Config Selection + Config Selection + + + Common Config + Common Config + + + Use per-game configs + Use per-game configs + + + L1 / LB + L1 / LB + + + L2 / LT + L2 / LT + + + Back + Back + + + R1 / RB + R1 / RB + + + R2 / RT + R2 / RT + + + L3 + L3 + + + Options / Start + Options / Start + + + R3 + R3 + + + Face Buttons + Face Buttons + + + Triangle / Y + Triangle / Y + + + Square / X + Square / X + + + Circle / B + Circle / B + + + Cross / A + Cross / A + + + Right Stick Deadzone (def:2, max:127) + Right Stick Deadzone (def:2, max:127) + + + Right Deadzone + Right Deadzone + + + Right Stick + Right Stick + + + Color Adjustment + Color Adjustment + + + R: + R: + + + G: + G: + + + B: + B: + + + Override Lightbar Color + Override Lightbar Color + + + Override Color + Override Color + + + Unable to Save + Unable to Save + + + Cannot bind axis values more than once + Cannot bind axis values more than once + + + Save + Save + + + Apply + Apply + + + Restore Defaults + Restore Defaults + + + Cancel + Cancel + + + + EditorDialog + + Edit Keyboard + Mouse and Controller input bindings + Edit Keyboard + Mouse and Controller input bindings + + + Use Per-Game configs + Use Per-Game configs + + + Error + Error + + + Could not open the file for reading + Could not open the file for reading + + + Could not open the file for writing + Could not open the file for writing + + + Save Changes + Save Changes + + + Do you want to save changes? + Do you want to save changes? + + + Help + Help + + + Do you want to reset your custom default config to the original default config? + Do you want to reset your custom default config to the original default config? + + + Do you want to reset this config to your custom default config? + Do you want to reset this config to your custom default config? + + + Reset to Default + Reset to Default + + + + ElfViewer + + Open Folder + Mappa megnyitása + + + + GameInfoClass + + Loading game list, please wait :3 + Játék könyvtár betöltése, kérjük várjon :3 + + + Cancel + Megszakítás + + + Loading... + Betöltés.. + + + + GameInstallDialog + + shadPS4 - Choose directory + shadPS4 - Mappa kiválasztása + + + Directory to install games + Mappa a játékok telepítésére + + + Browse + Böngészés + + + Error + Hiba + + + Directory to install DLC + Directory to install DLC + + + + GameListFrame + + Icon + Ikon + + + Name + Név + + + Serial + Sorozatszám + + + Compatibility + Compatibility + + + Region + Régió + + + Firmware + Firmware + + + Size + Méret + + + Version + Verzió + + + Path + Útvonal + + + Play Time + Játékidő + + + Never Played + Never Played + + + h + h + + + m + m + + + s + s + + + Compatibility is untested + Compatibility is untested + + + Game does not initialize properly / crashes the emulator + Game does not initialize properly / crashes the emulator + + + Game boots, but only displays a blank screen + Game boots, but only displays a blank screen + + + Game displays an image but does not go past the menu + Game displays an image but does not go past the menu + + + Game has game-breaking glitches or unplayable performance + Game has game-breaking glitches or unplayable performance + + + Game can be completed with playable performance and no major glitches + Game can be completed with playable performance and no major glitches + + + Click to see details on github + Kattintson a részletek megtekintéséhez a GitHubon + + + Last updated + Utoljára frissítve + + + + GameListUtils + + B + B + + + KB + KB + + + MB + MB + + + GB + GB + + + TB + TB + + + + GuiContextMenus + + Create Shortcut + Parancsikon Létrehozása + + + Cheats / Patches + Csalások / Javítások + + + SFO Viewer + SFO Nézegető + + + Trophy Viewer + Trófeák Megtekintése + + + Open Folder... + Mappa megnyitása... + + + Open Game Folder + Játék Mappa Megnyitása + + + Open Save Data Folder + Mentési adatok mappa megnyitása + + + Open Log Folder + Napló mappa megnyitása + + + Copy info... + Információ Másolása... + + + Copy Name + Név Másolása + + + Copy Serial + Széria Másolása + + + Copy Version + Copy Version + + + Copy Size + Copy Size + + + Copy All + Összes Másolása + + + Delete... + Törlés... + + + Delete Game + Játék törlése + + + Delete Update + Frissítések törlése + + + Delete DLC + DLC-k törlése + + + Delete Trophy + Delete Trophy + + + Compatibility... + Compatibility... + + + Update database + Update database + + + View report + View report + + + Submit a report + Submit a report + + + Shortcut creation + Parancsikon létrehozása + + + Shortcut created successfully! + Parancsikon sikeresen létrehozva! + + + Error + Hiba + + + Error creating shortcut! + Hiba a parancsikon létrehozásával! + + + Game + Játék + + + This game has no update to delete! + Ehhez a játékhoz nem tartozik törlendő frissítés! + + + Update + Frissítés + + + This game has no DLC to delete! + Ehhez a játékhoz nem tartozik törlendő DLC! + + + DLC + DLC + + + Delete %1 + Delete %1 + + + Are you sure you want to delete %1's %2 directory? + Biztosan törölni akarja a %1's %2 mappát? + + + Open Update Folder + Open Update Folder + + + Delete Save Data + Delete Save Data + + + This game has no update folder to open! + This game has no update folder to open! + + + No log file found for this game! + No log file found for this game! + + + Failed to convert icon. + Failed to convert icon. + + + This game has no save data to delete! + This game has no save data to delete! + + + This game has no saved trophies to delete! + This game has no saved trophies to delete! + + + Save Data + Save Data + + + Trophy + Trophy + + + SFO Viewer for + SFO Viewer for + + + + HelpDialog + + Quickstart + Quickstart + + + FAQ + FAQ + + + Syntax + Syntax + + + Special Bindings + Special Bindings + + + Keybindings + Keybindings + + + + KBMSettings + + Configure Controls + Configure Controls + + + D-Pad + D-Pad + + + Up + Up + + + unmapped + unmapped + + + Left + Left + + + Right + Right + + + Down + Down + + + Left Analog Halfmode + Left Analog Halfmode + + + hold to move left stick at half-speed + hold to move left stick at half-speed + + + Left Stick + Left Stick + + + Config Selection + Config Selection + + + Common Config + Common Config + + + Use per-game configs + Use per-game configs + + + L1 + L1 + + + L2 + L2 + + + Text Editor + Text Editor + + + Help + Help + + + R1 + R1 + + + R2 + R2 + + + L3 + L3 + + + Touchpad Click + Touchpad Click + + + Mouse to Joystick + Mouse to Joystick + + + *press F7 ingame to activate + *press F7 ingame to activate + + + R3 + R3 + + + Options + Options + + + Mouse Movement Parameters + Mouse Movement Parameters + + + note: click Help Button/Special Keybindings for more information + note: click Help Button/Special Keybindings for more information + + + Face Buttons + Face Buttons + + + Triangle + Triangle + + + Square + Square + + + Circle + Circle + + + Cross + Cross + + + Right Analog Halfmode + Right Analog Halfmode + + + hold to move right stick at half-speed + hold to move right stick at half-speed + + + Right Stick + Right Stick + + + Speed Offset (def 0.125): + Speed Offset (def 0.125): + + + Copy from Common Config + Copy from Common Config + + + Deadzone Offset (def 0.50): + Deadzone Offset (def 0.50): + + + Speed Multiplier (def 1.0): + Speed Multiplier (def 1.0): + + + Common Config Selected + Common Config Selected + + + This button copies mappings from the Common Config to the currently selected profile, and cannot be used when the currently selected profile is the Common Config. + This button copies mappings from the Common Config to the currently selected profile, and cannot be used when the currently selected profile is the Common Config. + + + Copy values from Common Config + Copy values from Common Config + + + Do you want to overwrite existing mappings with the mappings from the Common Config? + Do you want to overwrite existing mappings with the mappings from the Common Config? + + + Unable to Save + Unable to Save + + + Cannot bind any unique input more than once + Cannot bind any unique input more than once + + + Press a key + Press a key + + + Cannot set mapping + Cannot set mapping + + + Mousewheel cannot be mapped to stick outputs + Mousewheel cannot be mapped to stick outputs + + + Save + Save + + + Apply + Apply + + + Restore Defaults + Restore Defaults + + + Cancel + Cancel + + + + MainWindow + + Open/Add Elf Folder + ELF Mappa Megnyitása/Hozzáadása + + + Boot Game + Játék Indítása + + + Check for Updates + Frissítések keresése + + + About shadPS4 + A shadPS4-ről + + + Configure... + Konfigurálás... + + + Recent Games + Legutóbbi Játékok + + + Open shadPS4 Folder + Open shadPS4 Folder + + + Exit + Kilépés + + + Exit shadPS4 + Kilépés a shadPS4-ből + + + Exit the application. + Lépjen ki a programból. + + + Show Game List + Játék Könyvtár Megjelenítése + + + Game List Refresh + Játék Könyvtár Újratöltése + + + Tiny + Apró + + + Small + Kicsi + + + Medium + Közepes + + + Large + Nagy + + + List View + Lista Nézet + + + Grid View + Rács Nézet + + + Elf Viewer + Elf Nézegető + + + Game Install Directory + Játék Telepítési Mappa + + + Download Cheats/Patches + Csalások / Javítások letöltése + + + Dump Game List + Játéklista Dumpolása + + + Trophy Viewer + Trophy Viewer + + + No games found. Please add your games to your library first. + No games found. Please add your games to your library first. + + + Search... + Keresés... + + + File + Fájl + + + View + Nézet + + + Game List Icons + Játékkönyvtár Ikonok + + + Game List Mode + Játékkönyvtár Nézet + + + Settings + Beállítások + + + Utils + Segédeszközök + + + Themes + Témák + + + Help + Segítség + + + Dark + Sötét + + + Light + Világos + + + Green + Zöld + + + Blue + Kék + + + Violet + Ibolya + + + toolBar + Eszköztár + + + Game List + Játéklista + + + * Unsupported Vulkan Version + * Nem támogatott Vulkan verzió + + + Download Cheats For All Installed Games + Csalások letöltése minden telepített játékhoz + + + Download Patches For All Games + Javítások letöltése minden játékhoz + + + Download Complete + Letöltés befejezve + + + You have downloaded cheats for all the games you have installed. + Minden elérhető csalás letöltődött az összes telepített játékhoz. + + + Patches Downloaded Successfully! + Javítások sikeresen letöltve! + + + All Patches available for all games have been downloaded. + Az összes játékhoz elérhető javítás letöltésre került. + + + Games: + Játékok: + + + 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! + + + Run Game + Run Game + + + Eboot.bin file not found + Eboot.bin file not found + + + Game is already running! + Game is already running! + + + shadPS4 + shadPS4 + + + Play + Play + + + Pause + Pause + + + Stop + Stop + + + Restart + Restart + + + Full Screen + Full Screen + + + Controllers + Controllers + + + Keyboard + Keyboard + + + Refresh List + Refresh List + + + Resume + Resume + + + Show Labels Under Icons + Show Labels Under Icons + + + + SettingsDialog + + Settings + Beállítások + + + General + Általános + + + System + Rendszer + + + Console Language + A Konzol Nyelvezete + + + Emulator Language + Az Emulátor Nyelvezete + + + Emulator + Emulátor + + + Enable Separate Update Folder + Külön Frissítési Mappa Engedélyezése + + + Default tab when opening settings + Alapértelmezett fül a beállítások megnyitásakor + + + Show Game Size In List + Játékméret megjelenítése a listában + + + Show Splash + Indítóképernyő Mutatása + + + Enable Discord Rich Presence + A Discord Rich Presence engedélyezése + + + Username + Felhasználónév + + + Trophy Key + Trophy Key + + + Trophy + Trophy + + + Open the custom trophy images/sounds folder + Open the custom trophy images/sounds folder + + + Logger + Naplózó + + + Log Type + Naplózási Típus + + + Log Filter + Naplózási Filter + + + Open Log Location + Napló helyének megnyitása + + + Input + Bemenet + + + Cursor + Kurzor + + + Hide Cursor + Kurzor elrejtése + + + Hide Cursor Idle Timeout + Kurzor inaktivitási időtúllépés + + + s + s + + + Controller + Kontroller + + + Back Button Behavior + Vissza gomb Viselkedése + + + Graphics + Grafika + + + GUI + Felület + + + User + Felhasználó + + + Graphics Device + Grafikai Eszköz + + + Vblank Divider + Vblank Elosztó + + + Advanced + Haladó + + + Enable Shaders Dumping + Shader Dumpolás Engedélyezése + + + Enable NULL GPU + NULL GPU Engedélyezése + + + Enable HDR + Enable HDR + + + Paths + Útvonalak + + + Game Folders + Játékmappák + + + Add... + Hozzáadás... + + + Remove + Eltávolítás + + + Debug + Debugolás + + + Enable Debug Dumping + Debug Dumpolás Engedélyezése + + + Enable Vulkan Validation Layers + Vulkan Validációs Rétegek Engedélyezése + + + Enable Vulkan Synchronization Validation + Vulkan Szinkronizálás Validáció + + + Enable RenderDoc Debugging + RenderDoc Debugolás Engedélyezése + + + Enable Crash Diagnostics + Enable Crash Diagnostics + + + Collect Shaders + Collect Shaders + + + Copy GPU Buffers + Copy GPU Buffers + + + Host Debug Markers + Host Debug Markers + + + Guest Debug Markers + Guest Debug Markers + + + Update + Frissítés + + + Check for Updates at Startup + Frissítések keresése indításkor + + + Always Show Changelog + Mindig mutasd a változásnaplót + + + Update Channel + Frissítési Csatorna + + + Check for Updates + Frissítések keresése + + + GUI Settings + GUI Beállítások + + + Title Music + Title Music + + + Disable Trophy Notification + Disable Trophy Notification + + + Background Image + Background Image + + + Show Background Image + Show Background Image + + + Opacity + Opacity + + + Play title music + Címzene lejátszása + + + Update Compatibility Database On Startup + Update Compatibility Database On Startup + + + Game Compatibility + Game Compatibility + + + Display Compatibility Data + Display Compatibility Data + + + Update Compatibility Database + Update Compatibility Database + + + Volume + Hangerő + + + Save + Mentés + + + Apply + Alkalmaz + + + Restore Defaults + Alapértelmezett értékek visszaállítása + + + Close + Bezárás + + + Point your mouse at an option to display its description. + Helyezze az egérmutatót egy lehetőség fölé, hogy megjelenítse annak leírását. + + + Console Language:\nSets the language that the PS4 game uses.\nIt's recommended to set this to a language the game supports, which will vary by region. + Konzol nyelve:\nBeállítja a PS4 játék nyelvét.\nAjánlott a játék által támogatott nyelvre állítani, amely régiónként változhat. + + + Emulator Language:\nSets the language of the emulator's user interface. + Emulátor nyelve:\nBeállítja az emulátor felhasználói felületének nyelvét. + + + Enable Separate Update Folder:\nEnables installing game updates into a separate folder for easy management.\nThis can be manually created by adding the extracted update to the game folder with the name "CUSA00000-UPDATE" where the CUSA ID matches the game's ID. + Külön Frissítéi Mappa Engedélyezése:\nEngedélyezi a frissítések külön mappába helyezését, a könnyű kezelésük érdekében. + + + Show Splash Screen:\nShows the game's splash screen (a special image) while the game is starting. + Indítóképernyő megjelenítése:\nMegjeleníti a játék indítóképernyőjét (különleges képet) a játék elindításakor. + + + Enable Discord Rich Presence:\nDisplays the emulator icon and relevant information on your Discord profile. + A Discord Rich Presence engedélyezése:\nMegjeleníti az emulator ikonját és a kapcsolódó információkat a Discord profilján. + + + Username:\nSets the PS4's account username, which may be displayed by some games. + Felhasználónév:\nBeállítja a PS4 fiók felhasználónevét, amelyet egyes játékok megjeleníthetnek. + + + Trophy Key:\nKey used to decrypt trophies. Must be obtained from your jailbroken console.\nMust contain only hex characters. + Trophy Key:\nKey used to decrypt trophies. Must be obtained from your jailbroken console.\nMust contain only hex characters. + + + Log Type:\nSets whether to synchronize the output of the log window for performance. May have adverse effects on emulation. + Napló típusa:\nBeállítja, hogy szinkronizálja-e a naplóablak kimenetét a teljesítmény érdekében. Ennek kedvezőtlen hatásai lehetnek az emulációra. + + + Log Filter:\nFilters the log to only print specific information.\nExamples: "Core:Trace" "Lib.Pad:Debug Common.Filesystem:Error" "*:Critical"\nLevels: Trace, Debug, Info, Warning, Error, Critical - in this order, a specific level silences all levels preceding it in the list and logs every level after it. + Napló szűrő:\nCsak bizonyos információk megjelenítésére szűri a naplót.\nPéldák: "Core:Trace" "Lib.Pad:Debug Common.Filesystem:Error" "*:Critical" Szintek: Trace, Debug, Info, Warning, Error, Critical - ebben a sorrendben, egy konkrét szint elnémítja az előtte lévő összes szintet, és naplózza az utána következő szinteket. + + + Update:\nRelease: Official versions released every month that may be very outdated, but are more reliable and tested.\nNightly: Development versions that have all the latest features and fixes, but may contain bugs and are less stable. + Frissítés:\nRelease: Hivatalos verziók, amelyeket havonta adnak ki, és amelyek nagyon elavultak lehetnek, de megbízhatóbbak és teszteltek.\nNightly: Fejlesztési verziók, amelyek az összes legújabb funkciót és javítást tartalmazzák, de hibákat tartalmazhatnak és kevésbé stabilak. + + + Background Image:\nControl the opacity of the game background image. + Background Image:\nControl the opacity of the game background image. + + + Play Title Music:\nIf a game supports it, enable playing special music when selecting the game in the GUI. + Játék címzene lejátszása:\nHa a játék támogatja, engedélyezze egy speciális zene lejátszását, amikor a játékot kiválasztja a GUI-ban. + + + Disable Trophy Pop-ups:\nDisable in-game trophy notifications. Trophy progress can still be tracked using the Trophy Viewer (right-click the game in the main window). + Disable Trophy Pop-ups:\nDisable in-game trophy notifications. Trophy progress can still be tracked using the Trophy Viewer (right-click the game in the main window). + + + Hide Cursor:\nChoose when the cursor will disappear:\nNever: You will always see the mouse.\nidle: Set a time for it to disappear after being idle.\nAlways: you will never see the mouse. + Kurzor elrejtése:\nVálassza ki, mikor tűnjön el az egérmutató:\nSoha: Az egér mindig látható.\nInaktív: Állítson be egy időt, amennyi idő mozdulatlanság után eltűnik.\nMindig: az egér mindig el lesz rejtve. + + + Hide Idle Cursor Timeout:\nThe duration (seconds) after which the cursor that has been idle hides itself. + Állítson be egy időt, ami után egér inaktív állapotban eltűnik. + + + Back Button Behavior:\nSets the controller's back button to emulate tapping the specified position on the PS4 touchpad. + Vissza gomb viselkedés:\nBeállítja a vezérlő vissza gombját, hogy utánozza a PS4 érintőpadján megadott pozíció megérintését. + + + Display Compatibility Data:\nDisplays game compatibility information in table view. Enable "Update Compatibility On Startup" to get up-to-date information. + Display Compatibility Data:\nDisplays game compatibility information in table view. Enable "Update Compatibility On Startup" to get up-to-date information. + + + Update Compatibility On Startup:\nAutomatically update the compatibility database when shadPS4 starts. + Update Compatibility On Startup:\nAutomatically update the compatibility database when shadPS4 starts. + + + Update Compatibility Database:\nImmediately update the compatibility database. + Update Compatibility Database:\nImmediately update the compatibility database. + + + Never + Soha + + + Idle + Inaktív + + + Always + Mindig + + + Touchpad Left + Érintőpad Bal + + + Touchpad Right + Érintőpad Jobb + + + Touchpad Center + Érintőpad Közép + + + None + Semmi + + + Graphics Device:\nOn multiple GPU systems, select the GPU the emulator will use from the drop down list,\nor select "Auto Select" to automatically determine it. + Grafikus eszköz:\nTöbb GPU-s rendszereken válassza ki, melyik GPU-t használja az emulátor a legördülő listából,\nvagy válassza az "Auto Select" lehetőséget, hogy automatikusan kiválassza azt. + + + Width/Height:\nSets the size of the emulator window at launch, which can be resized during gameplay.\nThis is different from the in-game resolution. + Szélesség/Magasság:\nBeállítja az emulátor ablakának méretét induláskor, amely a játék során átméretezhető.\nEz különbözik a játékbeli felbontástól. + + + Vblank Divider:\nThe frame rate at which the emulator refreshes at is multiplied by this number. Changing this may have adverse effects, such as increasing the game speed, or breaking critical game functionality that does not expect this to change! + Vblank elosztó:\nAz emulátor frissítési sebessége e számot megszorozva működik. Ennek megváltoztatása kedvezőtlen hatásokat okozhat, például növelheti a játék sebességét, vagy megszakíthat kritikus játékfunkciókat, amelyek nem számítanak arra, hogy ez megváltozik! + + + Enable Shaders Dumping:\nFor the sake of technical debugging, saves the games shaders to a folder as they render. + Shader dumping engedélyezése:\nMűszaki hibaelhárítás céljából a játékok shaderjeit elmenti egy mappába, ahogy renderelődnek. + + + Enable Null GPU:\nFor the sake of technical debugging, disables game rendering as if there were no graphics card. + Null GPU engedélyezése:\nMűszaki hibaelhárítás céljából letiltja a játék renderelését, mintha nem lenne grafikus kártya. + + + Enable HDR:\nEnables HDR in games that support it.\nYour monitor must have support for the BT2020 PQ color space and the RGB10A2 swapchain format. + Enable HDR:\nEnables HDR in games that support it.\nYour monitor must have support for the BT2020 PQ color space and the RGB10A2 swapchain format. + + + Game Folders:\nThe list of folders to check for installed games. + Játék mappák:\nA mappák listája, ahol telepített játékok vannak. + + + Add:\nAdd a folder to the list. + Hozzáadás:\nHozzon létre egy mappát a listában. + + + Remove:\nRemove a folder from the list. + Eltávolítás:\nTávolítson el egy mappát a listából. + + + Enable Debug Dumping:\nSaves the import and export symbols and file header information of the currently running PS4 program to a directory. + Debug dumpolás engedélyezése:\nElmenti a futó PS4 program import- és exportszimbólumait, valamint a fájl fejlécinformációit egy könyvtárba. + + + Enable Vulkan Validation Layers:\nEnables a system that validates the state of the Vulkan renderer and logs information about its internal state.\nThis will reduce performance and likely change the behavior of emulation. + Vulkan validációs rétegek engedélyezése:\nEngedélyezi a Vulkan renderelő állapotának validálását és információk naplózását annak belső állapotáról. Ez csökkenti a teljesítményt és valószínűleg megváltoztatja az emuláció viselkedését. + + + Enable Vulkan Synchronization Validation:\nEnables a system that validates the timing of Vulkan rendering tasks.\nThis will reduce performance and likely change the behavior of emulation. + Vulkan szinkronizációs validáció engedélyezése:\nEngedélyezi a Vulkan renderelési feladatok időzítésének validálását. Ez csökkenti a teljesítményt és valószínűleg megváltoztatja az emuláció viselkedését. + + + Enable RenderDoc Debugging:\nIf enabled, the emulator will provide compatibility with Renderdoc to allow capture and analysis of the currently rendered frame. + RenderDoc hibakeresés engedélyezése:\nHa engedélyezve van, az emulátor kompatibilitást biztosít a Renderdoc számára, hogy lehetővé tegye a jelenleg renderelt keret rögzítését és elemzését. + + + Collect Shaders:\nYou need this enabled to edit shaders with the debug menu (Ctrl + F10). + Collect Shaders:\nYou need this enabled to edit shaders with the debug menu (Ctrl + F10). + + + Crash Diagnostics:\nCreates a .yaml file with info about the Vulkan state at the time of crashing.\nUseful for debugging 'Device lost' errors. If you have this enabled, you should enable Host AND Guest Debug Markers.\nDoes not work on Intel GPUs.\nYou need Vulkan Validation Layers enabled and the Vulkan SDK for this to work. + Crash Diagnostics:\nCreates a .yaml file with info about the Vulkan state at the time of crashing.\nUseful for debugging 'Device lost' errors. If you have this enabled, you should enable Host AND Guest Debug Markers.\nDoes not work on Intel GPUs.\nYou need Vulkan Validation Layers enabled and the Vulkan SDK for this to work. + + + Copy GPU Buffers:\nGets around race conditions involving GPU submits.\nMay or may not help with PM4 type 0 crashes. + Copy GPU Buffers:\nGets around race conditions involving GPU submits.\nMay or may not help with PM4 type 0 crashes. + + + Host Debug Markers:\nInserts emulator-side information like markers for specific AMDGPU commands around Vulkan commands, as well as giving resources debug names.\nIf you have this enabled, you should enable Crash Diagnostics.\nUseful for programs like RenderDoc. + Host Debug Markers:\nInserts emulator-side information like markers for specific AMDGPU commands around Vulkan commands, as well as giving resources debug names.\nIf you have this enabled, you should enable Crash Diagnostics.\nUseful for programs like RenderDoc. + + + Guest Debug Markers:\nInserts any debug markers the game itself has added to the command buffer.\nIf you have this enabled, you should enable Crash Diagnostics.\nUseful for programs like RenderDoc. + Guest Debug Markers:\nInserts any debug markers the game itself has added to the command buffer.\nIf you have this enabled, you should enable Crash Diagnostics.\nUseful for programs like RenderDoc. + + + Save Data Path:\nThe folder where game save data will be saved. + Save Data Path:\nThe folder where game save data will be saved. + + + Browse:\nBrowse for a folder to set as the save data path. + Browse:\nBrowse for a folder to set as the save data path. + + + Release + Release + + + Nightly + Nightly + + + Set the volume of the background music. + Set the volume of the background music. + + + Enable Motion Controls + Enable Motion Controls + + + Save Data Path + Save Data Path + + + Browse + Böngészés + + + async + async + + + sync + sync + + + Auto Select + Auto Select + + + Directory to install games + Mappa a játékok telepítésére + + + Directory to save data + Directory to save data + + + Video + Video + + + Display Mode + Display Mode + + + Windowed + Windowed + + + Fullscreen + Fullscreen + + + Fullscreen (Borderless) + Fullscreen (Borderless) + + + Window Size + Window Size + + + W: + W: + + + H: + H: + + + Separate Log Files + Separate Log Files + + + Separate Log Files:\nWrites a separate logfile for each game. + Separate Log Files:\nWrites a separate logfile for each game. + + + Trophy Notification Position + Trophy Notification Position + + + Left + Left + + + Right + Right + + + Top + Top + + + Bottom + Bottom + + + Notification Duration + Notification Duration + + + Portable User Folder + Portable User Folder + + + Create Portable User Folder from Common User Folder + Create Portable User Folder from Common User Folder + + + Portable user folder:\nStores shadPS4 settings and data that will be applied only to the shadPS4 build located in the current folder. Restart the app after creating the portable user folder to begin using it. + Portable user folder:\nStores shadPS4 settings and data that will be applied only to the shadPS4 build located in the current folder. Restart the app after creating the portable user folder to begin using it. + + + Cannot create portable user folder + Cannot create portable user folder + + + %1 already exists + %1 already exists + + + Portable user folder created + Portable user folder created + + + %1 successfully created. + %1 successfully created. + + + Open the custom trophy images/sounds folder:\nYou can add custom images to the trophies and an audio.\nAdd the files to custom_trophy with the following names:\ntrophy.wav OR trophy.mp3, bronze.png, gold.png, platinum.png, silver.png\nNote: The sound will only work in QT versions. + Open the custom trophy images/sounds folder:\nYou can add custom images to the trophies and an audio.\nAdd the files to custom_trophy with the following names:\ntrophy.wav OR trophy.mp3, bronze.png, gold.png, platinum.png, silver.png\nNote: The sound will only work in QT versions. + + + + TrophyViewer + + Trophy Viewer + Trófeák Megtekintése + + + Select Game: + Select Game: + + + Progress + Progress + + + Show Earned Trophies + Show Earned Trophies + + + Show Not Earned Trophies + Show Not Earned Trophies + + + Show Hidden Trophies + Show Hidden Trophies + + + diff --git a/src/qt_gui/translations/id.ts b/src/qt_gui/translations/id.ts deleted file mode 100644 index bee61083c..000000000 --- a/src/qt_gui/translations/id.ts +++ /dev/null @@ -1,1664 +0,0 @@ - - - - - - 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... - - - - InstallDirSelect - - - shadPS4 - Choose directory - shadPS4 - Choose directory - - - - Select which directory you want to install to. - Select which directory you want to install to. - - - - 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 - - - - Cheats / Patches - Cheat / Patch - - - - SFO Viewer - SFO Viewer - - - - Trophy Viewer - Trophy Viewer - - - - Open Folder... - Buka Folder... - - - - Open Game Folder - Buka Folder Game - - - - Open Save Data Folder - Buka Folder Data Simpanan - - - - Open Log Folder - Buka Folder Log - - - - Copy info... - Copy info... - - - - Copy Name - Copy Name - - - - Copy Serial - Copy Serial - - - - Copy All - Copy All - - - - Delete... - Delete... - - - - Delete Game - Delete Game - - - - Delete Update - Delete Update - - - - Delete DLC - Delete DLC - - - - Compatibility... - Compatibility... - - - - Update database - Update database - - - - View report - View report - - - - Submit a report - Submit a report - - - - Shortcut creation - Shortcut creation - - - - Shortcut created successfully! - Shortcut created successfully! - - - - Error - Error - - - - Error creating shortcut! - Error creating shortcut! - - - - Install PKG - Install PKG - - - - Game - Game - - - - requiresEnableSeparateUpdateFolder_MSG - This feature requires the 'Enable Separate Update Folder' config option to work. If you want to use this feature, please enable it. - - - - This game has no update to delete! - This game has no update to delete! - - - - Update - Update - - - - This game has no DLC to delete! - This game has no DLC to delete! - - - - DLC - DLC - - - - Delete %1 - Delete %1 - - - - Are you sure you want to delete %1's %2 directory? - Are you sure you want to delete %1's %2 directory? - - - - MainWindow - - - Open/Add Elf Folder - Open/Add Elf Folder - - - - Install Packages (PKG) - Install Packages (PKG) - - - - Boot Game - Boot Game - - - - Check for Updates - Periksa pembaruan - - - - 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 - - - - Download Cheats/Patches - Unduh Cheat / Patch - - - - 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 - - - - Help - Bantuan - - - - 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 - - - - Enable Separate Update Folder - Enable Separate Update Folder - - - - Show Splash - Show Splash - - - - Is PS4 Pro - Is PS4 Pro - - - - Enable Discord Rich Presence - Aktifkan Discord Rich Presence - - - - Username - Username - - - - Trophy Key - Trophy Key - - - - Trophy - Trophy - - - - Logger - Logger - - - - Log Type - Log Type - - - - Log Filter - Log Filter - - - - Input - Masukan - - - - Cursor - Kursor - - - - Hide Cursor - Sembunyikan kursor - - - - Hide Cursor Idle Timeout - Batas waktu sembunyikan kursor tidak aktif - - - - s - s - - - - Controller - Pengontrol - - - - Back Button Behavior - Perilaku tombol kembali - - - - 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 - - - - Paths - Jalur - - - - Game Folders - Folder Permainan - - - - Add... - Tambah... - - - - Remove - Hapus - - - - 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 - - - - Update - Pembaruan - - - - Check for Updates at Startup - Periksa pembaruan saat mulai - - - - Update Channel - Saluran Pembaruan - - - - Check for Updates - Periksa pembaruan - - - - GUI Settings - Pengaturan GUI - - - - Disable Trophy Pop-ups - Disable Trophy Pop-ups - - - - Play title music - Putar musik judul - - - - Update Compatibility Database On Startup - Update Compatibility Database On Startup - - - - Game Compatibility - Game Compatibility - - - - Display Compatibility Data - Display Compatibility Data - - - - Update Compatibility Database - Update Compatibility Database - - - - Volume - Volume - - - - Audio Backend - Audio Backend - - - - MainWindow - - - Game List - Daftar game - - - - * 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! - Patch terdeteksi! - - - - PKG and Game versions match: - Versi PKG dan Game cocok: - - - - Would you like to overwrite? - Apakah Anda ingin menimpa? - - - - PKG Version %1 is older than installed version: - Versi PKG %1 lebih lama dari versi yang terpasang: - - - - Game is installed: - Game telah terpasang: - - - - Would you like to install Patch: - Apakah Anda ingin menginstal patch: - - - - DLC Installation - Instalasi DLC - - - - Would you like to install DLC: %1? - Apakah Anda ingin menginstal DLC: %1? - - - - DLC already installed: - DLC sudah terpasang: - - - - Game already installed - Game sudah terpasang - - - - 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 for - Cheats / Patches for - - - - 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. Jika patch tidak muncul, mungkin patch tersebut tidak ada untuk nomor seri dan versi game yang spesifik. - - - - Failed to parse JSON data from HTML. - Gagal menganalisis data JSON dari HTML. - - - - Failed to retrieve HTML page. - Gagal mengambil halaman HTML. - - - - The game is in version: %1 - Permainan berada di versi: %1 - - - - The downloaded patch only works on version: %1 - Patch yang diunduh hanya berfungsi pada versi: %1 - - - - You may need to update your game. - Anda mungkin perlu memperbarui permainan Anda. - - - - Incompatibility Notice - Pemberitahuan Ketidakcocokan - - - - 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: - - - - Can't apply cheats before the game is started - Tidak bisa menerapkan cheat sebelum permainan dimulai. - - - - SettingsDialog - - - Save - Simpan - - - - Apply - Terapkan - - - - Restore Defaults - Kembalikan Pengaturan Default - - - - Close - Tutup - - - - Point your mouse at an option to display its description. - Arahkan mouse Anda pada opsi untuk menampilkan deskripsinya. - - - - consoleLanguageGroupBox - Bahasa Konsol:\nMenetapkan bahasa yang digunakan oleh permainan PS4.\nDisarankan untuk mengatur ini ke bahasa yang didukung oleh permainan, yang dapat bervariasi berdasarkan wilayah. - - - - emulatorLanguageGroupBox - Bahasa Emulator:\nMenetapkan bahasa antarmuka pengguna emulator. - - - - fullscreenCheckBox - Aktifkan Mode Layar Penuh:\nSecara otomatis menempatkan jendela permainan dalam mode layar penuh.\nIni dapat dinonaktifkan dengan menekan tombol F11. - - - - separateUpdatesCheckBox - Enable Separate Update Folder:\nEnables installing game updates into a separate folder for easy management. - - - - showSplashCheckBox - Tampilkan Layar Pembuka:\nMenampilkan layar pembuka permainan (gambar khusus) saat permainan dimulai. - - - - ps4proCheckBox - Adalah PS4 Pro:\nMembuat emulator berfungsi sebagai PS4 PRO, yang mungkin mengaktifkan fitur khusus dalam permainan yang mendukungnya. - - - - discordRPCCheckbox - Aktifkan Discord Rich Presence:\nMenampilkan ikon emulator dan informasi relevan di profil Discord Anda. - - - - userName - Nama Pengguna:\nMenetapkan nama pengguna akun PS4, yang mungkin ditampilkan oleh beberapa permainan. - - - - TrophyKey - Trophy Key:\nKey used to decrypt trophies. Must be obtained from your jailbroken console.\nMust contain only hex characters. - - - - logTypeGroupBox - Jenis Log:\nMenetapkan apakah untuk menyinkronkan output jendela log untuk kinerja. Dapat memiliki efek buruk pada emulasi. - - - - logFilter - Filter Log:\nMenyaring log untuk hanya mencetak informasi tertentu.\nContoh: "Core:Trace" "Lib.Pad:Debug Common.Filesystem:Error" "*:Critical" Tingkatan: Trace, Debug, Info, Warning, Error, Critical - dalam urutan ini, tingkat tertentu membungkam semua tingkat sebelumnya dalam daftar dan mencatat setiap tingkat setelahnya. - - - - updaterGroupBox - Pembaruan:\nRelease: Versi resmi yang dirilis setiap bulan yang mungkin sangat ketinggalan zaman, tetapi lebih dapat diandalkan dan teruji.\nNightly: Versi pengembangan yang memiliki semua fitur dan perbaikan terbaru, tetapi mungkin mengandung bug dan kurang stabil. - - - - GUIgroupBox - Putar Musik Judul Permainan:\nJika permainan mendukungnya, aktifkan pemutaran musik khusus saat memilih permainan di GUI. - - - - disableTrophycheckBox - Disable Trophy Pop-ups:\nDisable in-game trophy notifications. Trophy progress can still be tracked using the Trophy Viewer (right-click the game in the main window). - - - - hideCursorGroupBox - Sembunyikan Kursor:\nPilih kapan kursor akan menghilang:\nTidak Pernah: Anda akan selalu melihat mouse.\nTidak Aktif: Tetapkan waktu untuk menghilang setelah tidak aktif.\nSelalu: Anda tidak akan pernah melihat mouse. - - - - idleTimeoutGroupBox - Tetapkan waktu untuk mouse menghilang setelah tidak aktif. - - - - backButtonBehaviorGroupBox - Perilaku Tombol Kembali:\nMengatur tombol kembali pada pengontrol untuk meniru ketukan di posisi yang ditentukan di touchpad PS4. - - - - enableCompatibilityCheckBox - Display Compatibility Data:\nDisplays game compatibility information in table view. Enable "Update Compatibility On Startup" to get up-to-date information. - - - - checkCompatibilityOnStartupCheckBox - Update Compatibility On Startup:\nAutomatically update the compatibility database when shadPS4 starts. - - - - updateCompatibilityButton - Update Compatibility Database:\nImmediately update the compatibility database. - - - - Never - Tidak Pernah - - - - Idle - Diam - - - - Always - Selalu - - - - Touchpad Left - Touchpad Kiri - - - - Touchpad Right - Touchpad Kanan - - - - Touchpad Center - Pusat Touchpad - - - - None - Tidak Ada - - - - graphicsAdapterGroupBox - Perangkat Grafis:\nPada sistem GPU ganda, pilih GPU yang akan digunakan emulator dari daftar dropdown,\natau pilih "Auto Select" untuk menentukan secara otomatis. - - - - resolutionLayout - Lebar/Tinggi:\nMenetapkan ukuran jendela emulator saat diluncurkan, yang dapat diubah ukurannya selama permainan.\nIni berbeda dari resolusi dalam permainan. - - - - heightDivider - Pembagi Vblank:\nKecepatan bingkai di mana emulator menyegarkan dikalikan dengan angka ini. Mengubah ini dapat memiliki efek buruk, seperti meningkatkan kecepatan permainan, atau merusak fungsi kritis permainan yang tidak mengharapkan ini berubah! - - - - dumpShadersCheckBox - Aktifkan Pembuangan Shader:\nUntuk tujuan debugging teknis, menyimpan shader permainan ke folder saat mereka dirender. - - - - nullGpuCheckBox - Aktifkan GPU Null:\nUntuk tujuan debugging teknis, menonaktifkan rendering permainan seolah-olah tidak ada kartu grafis. - - - - gameFoldersBox - Folder Permainan:\nDaftar folder untuk memeriksa permainan yang diinstal. - - - - addFolderButton - Tambah:\nTambahkan folder ke daftar. - - - - removeFolderButton - Hapus:\nHapus folder dari daftar. - - - - debugDump - Aktifkan Pembuangan Debug:\nMenyimpan simbol impor dan ekspor serta informasi header file dari program PS4 yang sedang berjalan ke direktori. - - - - vkValidationCheckBox - Aktifkan Vulkan Validation Layers:\nMengaktifkan sistem yang memvalidasi status penggambaran Vulkan dan mencatat informasi tentang status internalnya. Ini akan mengurangi kinerja dan kemungkinan mengubah perilaku emulasi. - - - - vkSyncValidationCheckBox - Aktifkan Vulkan Synchronization Validation:\nMengaktifkan sistem yang memvalidasi waktu tugas penggambaran Vulkan. Ini akan mengurangi kinerja dan kemungkinan mengubah perilaku emulasi. - - - - rdocCheckBox - Aktifkan Debugging RenderDoc:\nJika diaktifkan, emulator akan menyediakan kompatibilitas dengan Renderdoc untuk memungkinkan pengambilan dan analisis bingkai yang sedang dirender. - - - - GameListFrame - - - Icon - Ikon - - - - Name - Nama - - - - Serial - Serial - - - - Compatibility - Compatibility - - - - Region - Wilayah - - - - Firmware - Firmware - - - - Size - Ukuran - - - - Version - Versi - - - - Path - Jalur - - - - Play Time - Waktu Bermain - - - - Never Played - Never Played - - - - h - h - - - - m - m - - - - s - s - - - - Compatibility is untested - Compatibility is untested - - - - Game does not initialize properly / crashes the emulator - Game does not initialize properly / crashes the emulator - - - - Game boots, but only displays a blank screen - Game boots, but only displays a blank screen - - - - Game displays an image but does not go past the menu - Game displays an image but does not go past the menu - - - - Game has game-breaking glitches or unplayable performance - Game has game-breaking glitches or unplayable performance - - - - Game can be completed with playable performance and no major glitches - Game can be completed with playable performance and no major glitches - - - - CheckUpdate - - - Auto Updater - Pembaruan Otomatis - - - - Error - Kesalahan - - - - Network error: - Kesalahan jaringan: - - - - Failed to parse update information. - Gagal memparse informasi pembaruan. - - - - No pre-releases found. - Tidak ada pra-rilis yang ditemukan. - - - - Invalid release data. - Data rilis tidak valid. - - - - No download URL found for the specified asset. - Tidak ada URL unduhan ditemukan untuk aset yang ditentukan. - - - - Your version is already up to date! - Versi Anda sudah terbaru! - - - - Update Available - Pembaruan Tersedia - - - - Update Channel - Saluran Pembaruan - - - - Current Version - Versi Saat Ini - - - - Latest Version - Versi Terbaru - - - - Do you want to update? - Apakah Anda ingin memperbarui? - - - - Show Changelog - Tampilkan Catatan Perubahan - - - - Check for Updates at Startup - Periksa pembaruan saat mulai - - - - Update - Perbarui - - - - No - Tidak - - - - Hide Changelog - Sembunyikan Catatan Perubahan - - - - Changes - Perubahan - - - - Network error occurred while trying to access the URL - Kesalahan jaringan terjadi saat mencoba mengakses URL - - - - Download Complete - Unduhan Selesai - - - - The update has been downloaded, press OK to install. - Pembaruan telah diunduh, tekan OK untuk menginstal. - - - - Failed to save the update file at - Gagal menyimpan file pembaruan di - - - - Starting Update... - Memulai Pembaruan... - - - - Failed to create the update script file - Gagal membuat file skrip pembaruan - - - - GameListUtils - - - B - B - - - - KB - KB - - - - MB - MB - - - - GB - GB - - - - TB - TB - - - \ No newline at end of file diff --git a/src/qt_gui/translations/id_ID.ts b/src/qt_gui/translations/id_ID.ts new file mode 100644 index 000000000..1858da2a7 --- /dev/null +++ b/src/qt_gui/translations/id_ID.ts @@ -0,0 +1,2089 @@ + + + + + + AboutDialog + + About shadPS4 + Tentang shadPS4 + + + shadPS4 is an experimental open-source emulator for the PlayStation 4. + shadPS4 adalah emulator sumber terbuka eksperimental untuk PlayStation 4. + + + This software should not be used to play games you have not legally obtained. + Perangkat lunak ini tidak boleh digunakan untuk memainkan permainan yang tidak Anda peroleh secara legal. + + + + CheatsPatches + + Cheats / Patches for + Kecurangan / Tambalan untuk + + + 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:\n + 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:\n + + + No Image Available + Tidak Ada Gambar Tersedia + + + Serial: + Seri: + + + 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 + + + No Cheats found for this game in this version of the selected repository,try another repository or a different version of the game. + 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 + + + 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. + 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 + + + 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. If the patch does not appear, it may be that it does not exist for the specific serial and version of the game. + Patch Berhasil Diunduh! Semua Patch yang tersedia untuk semua game telah diunduh, tidak perlu mengunduhnya satu per satu seperti yang terjadi pada Cheat. Jika patch tidak muncul, mungkin patch tersebut tidak ada untuk nomor seri dan versi game yang spesifik. + + + Failed to parse JSON data from HTML. + Gagal menganalisis data JSON dari HTML. + + + Failed to retrieve HTML page. + Gagal mengambil halaman HTML. + + + The game is in version: %1 + Permainan berada di versi: %1 + + + The downloaded patch only works on version: %1 + Patch yang diunduh hanya berfungsi pada versi: %1 + + + You may need to update your game. + Anda mungkin perlu memperbarui permainan Anda. + + + Incompatibility Notice + Pemberitahuan Ketidakcocokan + + + 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: + + + Can't apply cheats before the game is started + Tidak bisa menerapkan cheat sebelum permainan dimulai. + + + Close + Tutup + + + + CheckUpdate + + Auto Updater + Pembaruan Otomatis + + + Error + Kesalahan + + + Network error: + Kesalahan jaringan: + + + The Auto Updater allows up to 60 update checks per hour.\nYou have reached this limit. Please try again later. + Pembaruan Otomatis memungkinkan hingga 60 pemeriksaan pembaruan per jam.\nAnda telah mencapai batas ini. Silakan coba lagi nanti. + + + Failed to parse update information. + Gagal memparse informasi pembaruan. + + + No pre-releases found. + Tidak ada pra-rilis yang ditemukan. + + + Invalid release data. + Data rilis tidak valid. + + + No download URL found for the specified asset. + Tidak ada URL unduhan ditemukan untuk aset yang ditentukan. + + + Your version is already up to date! + Versi Anda sudah terbaru! + + + Update Available + Pembaruan Tersedia + + + Update Channel + Saluran Pembaruan + + + Current Version + Versi Saat Ini + + + Latest Version + Versi Terbaru + + + Do you want to update? + Apakah Anda ingin memperbarui? + + + Show Changelog + Tampilkan Catatan Perubahan + + + Check for Updates at Startup + Periksa pembaruan saat mulai + + + Update + Perbarui + + + No + Tidak + + + Hide Changelog + Sembunyikan Catatan Perubahan + + + Changes + Perubahan + + + Network error occurred while trying to access the URL + Kesalahan jaringan terjadi saat mencoba mengakses URL + + + Download Complete + Unduhan Selesai + + + The update has been downloaded, press OK to install. + Pembaruan telah diunduh, tekan OK untuk menginstal. + + + Failed to save the update file at + Gagal menyimpan file pembaruan di + + + Starting Update... + Memulai Pembaruan... + + + Failed to create the update script file + Gagal membuat file skrip pembaruan + + + + CompatibilityInfoClass + + Fetching compatibility data, please wait + Memuat data kompatibilitas, harap tunggu + + + Cancel + Batal + + + Loading... + Memuat... + + + Error + Kesalahan + + + Unable to update compatibility data! Try again later. + Tidak dapat memperbarui data kompatibilitas! Coba lagi nanti. + + + Unable to open compatibility_data.json for writing. + Tidak dapat membuka compatibility_data.json untuk menulis. + + + Unknown + Tidak Dikenal + + + Nothing + Tidak ada + + + Boots + Sepatu Bot + + + Menus + Menu + + + Ingame + Dalam Permainan + + + Playable + Dapat dimainkan + + + + ControlSettings + + Configure Controls + Konfigurasi Kontrol + + + D-Pad + Tombol arah + + + Up + Atas + + + Left + Kiri + + + Right + Kanan + + + Down + Bawah + + + Left Stick Deadzone (def:2 max:127) + Zona Mati Stik Kiri (standar: 2, maksimum: 127) + + + Left Deadzone + Left Deadzone + + + Left Stick + Left Stick + + + Config Selection + Config Selection + + + Common Config + Common Config + + + Use per-game configs + Use per-game configs + + + L1 / LB + L1 / LB + + + L2 / LT + L2 / LT + + + Back + Back + + + R1 / RB + R1 / RB + + + R2 / RT + R2 / RT + + + L3 + L3 + + + Options / Start + Options / Start + + + R3 + R3 + + + Face Buttons + Face Buttons + + + Triangle / Y + Triangle / Y + + + Square / X + Square / X + + + Circle / B + Circle / B + + + Cross / A + Cross / A + + + Right Stick Deadzone (def:2, max:127) + Right Stick Deadzone (def:2, max:127) + + + Right Deadzone + Right Deadzone + + + Right Stick + Right Stick + + + Color Adjustment + Color Adjustment + + + R: + R: + + + G: + G: + + + B: + B: + + + Override Lightbar Color + Override Lightbar Color + + + Override Color + Override Color + + + Unable to Save + Unable to Save + + + Cannot bind axis values more than once + Cannot bind axis values more than once + + + Save + Save + + + Apply + Apply + + + Restore Defaults + Restore Defaults + + + Cancel + Cancel + + + + EditorDialog + + Edit Keyboard + Mouse and Controller input bindings + Edit Keyboard + Mouse and Controller input bindings + + + Use Per-Game configs + Use Per-Game configs + + + Error + Error + + + Could not open the file for reading + Could not open the file for reading + + + Could not open the file for writing + Could not open the file for writing + + + Save Changes + Save Changes + + + Do you want to save changes? + Do you want to save changes? + + + Help + Help + + + Do you want to reset your custom default config to the original default config? + Do you want to reset your custom default config to the original default config? + + + Do you want to reset this config to your custom default config? + Do you want to reset this config to your custom default config? + + + Reset to Default + Reset to Default + + + + 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 + + + Directory to install DLC + Directory to install DLC + + + + GameListFrame + + Icon + Ikon + + + Name + Nama + + + Serial + Serial + + + Compatibility + Compatibility + + + Region + Wilayah + + + Firmware + Firmware + + + Size + Ukuran + + + Version + Versi + + + Path + Jalur + + + Play Time + Waktu Bermain + + + Never Played + Never Played + + + h + h + + + m + m + + + s + s + + + Compatibility is untested + Compatibility is untested + + + Game does not initialize properly / crashes the emulator + Game does not initialize properly / crashes the emulator + + + Game boots, but only displays a blank screen + Game boots, but only displays a blank screen + + + Game displays an image but does not go past the menu + Game displays an image but does not go past the menu + + + Game has game-breaking glitches or unplayable performance + Game has game-breaking glitches or unplayable performance + + + Game can be completed with playable performance and no major glitches + Game can be completed with playable performance and no major glitches + + + Click to see details on github + Klik untuk melihat detail di GitHub + + + Last updated + Terakhir diperbarui + + + + GameListUtils + + B + B + + + KB + KB + + + MB + MB + + + GB + GB + + + TB + TB + + + + GuiContextMenus + + Create Shortcut + Create Shortcut + + + Cheats / Patches + Cheat / Patch + + + SFO Viewer + SFO Viewer + + + Trophy Viewer + Trophy Viewer + + + Open Folder... + Buka Folder... + + + Open Game Folder + Buka Folder Game + + + Open Save Data Folder + Buka Folder Data Simpanan + + + Open Log Folder + Buka Folder Log + + + Copy info... + Copy info... + + + Copy Name + Copy Name + + + Copy Serial + Copy Serial + + + Copy Version + Copy Version + + + Copy Size + Copy Size + + + Copy All + Copy All + + + Delete... + Delete... + + + Delete Game + Delete Game + + + Delete Update + Delete Update + + + Delete DLC + Delete DLC + + + Delete Trophy + Delete Trophy + + + Compatibility... + Compatibility... + + + Update database + Update database + + + View report + View report + + + Submit a report + Submit a report + + + Shortcut creation + Shortcut creation + + + Shortcut created successfully! + Shortcut created successfully! + + + Error + Error + + + Error creating shortcut! + Error creating shortcut! + + + Game + Game + + + This game has no update to delete! + This game has no update to delete! + + + Update + Update + + + This game has no DLC to delete! + This game has no DLC to delete! + + + DLC + DLC + + + Delete %1 + Delete %1 + + + Are you sure you want to delete %1's %2 directory? + Are you sure you want to delete %1's %2 directory? + + + Open Update Folder + Open Update Folder + + + Delete Save Data + Delete Save Data + + + This game has no update folder to open! + This game has no update folder to open! + + + No log file found for this game! + No log file found for this game! + + + Failed to convert icon. + Failed to convert icon. + + + This game has no save data to delete! + This game has no save data to delete! + + + This game has no saved trophies to delete! + This game has no saved trophies to delete! + + + Save Data + Save Data + + + Trophy + Trophy + + + SFO Viewer for + SFO Viewer for + + + + HelpDialog + + Quickstart + Quickstart + + + FAQ + FAQ + + + Syntax + Syntax + + + Special Bindings + Special Bindings + + + Keybindings + Keybindings + + + + KBMSettings + + Configure Controls + Configure Controls + + + D-Pad + D-Pad + + + Up + Up + + + unmapped + unmapped + + + Left + Left + + + Right + Right + + + Down + Down + + + Left Analog Halfmode + Left Analog Halfmode + + + hold to move left stick at half-speed + hold to move left stick at half-speed + + + Left Stick + Left Stick + + + Config Selection + Config Selection + + + Common Config + Common Config + + + Use per-game configs + Use per-game configs + + + L1 + L1 + + + L2 + L2 + + + Text Editor + Text Editor + + + Help + Help + + + R1 + R1 + + + R2 + R2 + + + L3 + L3 + + + Touchpad Click + Touchpad Click + + + Mouse to Joystick + Mouse to Joystick + + + *press F7 ingame to activate + *press F7 ingame to activate + + + R3 + R3 + + + Options + Options + + + Mouse Movement Parameters + Mouse Movement Parameters + + + note: click Help Button/Special Keybindings for more information + note: click Help Button/Special Keybindings for more information + + + Face Buttons + Face Buttons + + + Triangle + Triangle + + + Square + Square + + + Circle + Circle + + + Cross + Cross + + + Right Analog Halfmode + Right Analog Halfmode + + + hold to move right stick at half-speed + hold to move right stick at half-speed + + + Right Stick + Right Stick + + + Speed Offset (def 0.125): + Speed Offset (def 0.125): + + + Copy from Common Config + Copy from Common Config + + + Deadzone Offset (def 0.50): + Deadzone Offset (def 0.50): + + + Speed Multiplier (def 1.0): + Speed Multiplier (def 1.0): + + + Common Config Selected + Common Config Selected + + + This button copies mappings from the Common Config to the currently selected profile, and cannot be used when the currently selected profile is the Common Config. + This button copies mappings from the Common Config to the currently selected profile, and cannot be used when the currently selected profile is the Common Config. + + + Copy values from Common Config + Copy values from Common Config + + + Do you want to overwrite existing mappings with the mappings from the Common Config? + Do you want to overwrite existing mappings with the mappings from the Common Config? + + + Unable to Save + Unable to Save + + + Cannot bind any unique input more than once + Cannot bind any unique input more than once + + + Press a key + Press a key + + + Cannot set mapping + Cannot set mapping + + + Mousewheel cannot be mapped to stick outputs + Mousewheel cannot be mapped to stick outputs + + + Save + Save + + + Apply + Apply + + + Restore Defaults + Restore Defaults + + + Cancel + Cancel + + + + MainWindow + + Open/Add Elf Folder + Open/Add Elf Folder + + + Boot Game + Boot Game + + + Check for Updates + Periksa pembaruan + + + About shadPS4 + About shadPS4 + + + Configure... + Configure... + + + Recent Games + Recent Games + + + Open shadPS4 Folder + Open shadPS4 Folder + + + 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 + + + Download Cheats/Patches + Unduh Cheat / Patch + + + Dump Game List + Dump Game List + + + Trophy Viewer + Trophy Viewer + + + No games found. Please add your games to your library first. + No games found. Please add your games to your library first. + + + Search... + Search... + + + File + File + + + View + View + + + Game List Icons + Game List Icons + + + Game List Mode + Game List Mode + + + Settings + Settings + + + Utils + Utils + + + Themes + Themes + + + Help + Bantuan + + + Dark + Dark + + + Light + Light + + + Green + Green + + + Blue + Blue + + + Violet + Violet + + + toolBar + toolBar + + + Game List + Daftar game + + + * 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: + + + 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! + + + Run Game + Run Game + + + Eboot.bin file not found + Eboot.bin file not found + + + Game is already running! + Game is already running! + + + shadPS4 + shadPS4 + + + Play + Play + + + Pause + Pause + + + Stop + Stop + + + Restart + Restart + + + Full Screen + Full Screen + + + Controllers + Controllers + + + Keyboard + Keyboard + + + Refresh List + Refresh List + + + Resume + Resume + + + Show Labels Under Icons + Show Labels Under Icons + + + + SettingsDialog + + Settings + Settings + + + General + General + + + System + System + + + Console Language + Console Language + + + Emulator Language + Emulator Language + + + Emulator + Emulator + + + Enable Separate Update Folder + Enable Separate Update Folder + + + Default tab when opening settings + Tab default saat membuka pengaturan + + + Show Game Size In List + Tampilkan Ukuran Game di Daftar + + + Show Splash + Show Splash + + + Enable Discord Rich Presence + Aktifkan Discord Rich Presence + + + Username + Username + + + Trophy Key + Trophy Key + + + Trophy + Trophy + + + Open the custom trophy images/sounds folder + Open the custom trophy images/sounds folder + + + Logger + Logger + + + Log Type + Log Type + + + Log Filter + Log Filter + + + Open Log Location + Buka Lokasi Log + + + Input + Masukan + + + Cursor + Kursor + + + Hide Cursor + Sembunyikan kursor + + + Hide Cursor Idle Timeout + Batas waktu sembunyikan kursor tidak aktif + + + s + s + + + Controller + Pengontrol + + + Back Button Behavior + Perilaku tombol kembali + + + Graphics + Graphics + + + GUI + Antarmuka + + + User + Pengguna + + + Graphics Device + Graphics Device + + + Vblank Divider + Vblank Divider + + + Advanced + Advanced + + + Enable Shaders Dumping + Enable Shaders Dumping + + + Enable NULL GPU + Enable NULL GPU + + + Enable HDR + Enable HDR + + + Paths + Jalur + + + Game Folders + Folder Permainan + + + Add... + Tambah... + + + Remove + Hapus + + + 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 + + + Enable Crash Diagnostics + Enable Crash Diagnostics + + + Collect Shaders + Collect Shaders + + + Copy GPU Buffers + Copy GPU Buffers + + + Host Debug Markers + Host Debug Markers + + + Guest Debug Markers + Guest Debug Markers + + + Update + Pembaruan + + + Check for Updates at Startup + Periksa pembaruan saat mulai + + + Always Show Changelog + Selalu Tampilkan Riwayat Perubahan + + + Update Channel + Saluran Pembaruan + + + Check for Updates + Periksa pembaruan + + + GUI Settings + Pengaturan GUI + + + Title Music + Title Music + + + Disable Trophy Notification + Disable Trophy Notification + + + Background Image + Background Image + + + Show Background Image + Show Background Image + + + Opacity + Opacity + + + Play title music + Putar musik judul + + + Update Compatibility Database On Startup + Update Compatibility Database On Startup + + + Game Compatibility + Game Compatibility + + + Display Compatibility Data + Display Compatibility Data + + + Update Compatibility Database + Update Compatibility Database + + + Volume + Volume + + + Save + Simpan + + + Apply + Terapkan + + + Restore Defaults + Kembalikan Pengaturan Default + + + Close + Tutup + + + Point your mouse at an option to display its description. + Arahkan mouse Anda pada opsi untuk menampilkan deskripsinya. + + + Console Language:\nSets the language that the PS4 game uses.\nIt's recommended to set this to a language the game supports, which will vary by region. + Bahasa Konsol:\nMenetapkan bahasa yang digunakan oleh permainan PS4.\nDisarankan untuk mengatur ini ke bahasa yang didukung oleh permainan, yang dapat bervariasi berdasarkan wilayah. + + + Emulator Language:\nSets the language of the emulator's user interface. + Bahasa Emulator:\nMenetapkan bahasa antarmuka pengguna emulator. + + + Enable Separate Update Folder:\nEnables installing game updates into a separate folder for easy management.\nThis can be manually created by adding the extracted update to the game folder with the name "CUSA00000-UPDATE" where the CUSA ID matches the game's ID. + Enable Separate Update Folder:\nEnables installing game updates into a separate folder for easy management. + + + Show Splash Screen:\nShows the game's splash screen (a special image) while the game is starting. + Tampilkan Layar Pembuka:\nMenampilkan layar pembuka permainan (gambar khusus) saat permainan dimulai. + + + Enable Discord Rich Presence:\nDisplays the emulator icon and relevant information on your Discord profile. + Aktifkan Discord Rich Presence:\nMenampilkan ikon emulator dan informasi relevan di profil Discord Anda. + + + Username:\nSets the PS4's account username, which may be displayed by some games. + Nama Pengguna:\nMenetapkan nama pengguna akun PS4, yang mungkin ditampilkan oleh beberapa permainan. + + + Trophy Key:\nKey used to decrypt trophies. Must be obtained from your jailbroken console.\nMust contain only hex characters. + Trophy Key:\nKey used to decrypt trophies. Must be obtained from your jailbroken console.\nMust contain only hex characters. + + + Log Type:\nSets whether to synchronize the output of the log window for performance. May have adverse effects on emulation. + Jenis Log:\nMenetapkan apakah untuk menyinkronkan output jendela log untuk kinerja. Dapat memiliki efek buruk pada emulasi. + + + Log Filter:\nFilters the log to only print specific information.\nExamples: "Core:Trace" "Lib.Pad:Debug Common.Filesystem:Error" "*:Critical"\nLevels: Trace, Debug, Info, Warning, Error, Critical - in this order, a specific level silences all levels preceding it in the list and logs every level after it. + Filter Log:\nMenyaring log untuk hanya mencetak informasi tertentu.\nContoh: "Core:Trace" "Lib.Pad:Debug Common.Filesystem:Error" "*:Critical" Tingkatan: Trace, Debug, Info, Warning, Error, Critical - dalam urutan ini, tingkat tertentu membungkam semua tingkat sebelumnya dalam daftar dan mencatat setiap tingkat setelahnya. + + + Update:\nRelease: Official versions released every month that may be very outdated, but are more reliable and tested.\nNightly: Development versions that have all the latest features and fixes, but may contain bugs and are less stable. + Pembaruan:\nRelease: Versi resmi yang dirilis setiap bulan yang mungkin sangat ketinggalan zaman, tetapi lebih dapat diandalkan dan teruji.\nNightly: Versi pengembangan yang memiliki semua fitur dan perbaikan terbaru, tetapi mungkin mengandung bug dan kurang stabil. + + + Background Image:\nControl the opacity of the game background image. + Background Image:\nControl the opacity of the game background image. + + + Play Title Music:\nIf a game supports it, enable playing special music when selecting the game in the GUI. + Putar Musik Judul Permainan:\nJika permainan mendukungnya, aktifkan pemutaran musik khusus saat memilih permainan di GUI. + + + Disable Trophy Pop-ups:\nDisable in-game trophy notifications. Trophy progress can still be tracked using the Trophy Viewer (right-click the game in the main window). + Disable Trophy Pop-ups:\nDisable in-game trophy notifications. Trophy progress can still be tracked using the Trophy Viewer (right-click the game in the main window). + + + Hide Cursor:\nChoose when the cursor will disappear:\nNever: You will always see the mouse.\nidle: Set a time for it to disappear after being idle.\nAlways: you will never see the mouse. + Sembunyikan Kursor:\nPilih kapan kursor akan menghilang:\nTidak Pernah: Anda akan selalu melihat mouse.\nTidak Aktif: Tetapkan waktu untuk menghilang setelah tidak aktif.\nSelalu: Anda tidak akan pernah melihat mouse. + + + Hide Idle Cursor Timeout:\nThe duration (seconds) after which the cursor that has been idle hides itself. + Tetapkan waktu untuk mouse menghilang setelah tidak aktif. + + + Back Button Behavior:\nSets the controller's back button to emulate tapping the specified position on the PS4 touchpad. + Perilaku Tombol Kembali:\nMengatur tombol kembali pada pengontrol untuk meniru ketukan di posisi yang ditentukan di touchpad PS4. + + + Display Compatibility Data:\nDisplays game compatibility information in table view. Enable "Update Compatibility On Startup" to get up-to-date information. + Display Compatibility Data:\nDisplays game compatibility information in table view. Enable "Update Compatibility On Startup" to get up-to-date information. + + + Update Compatibility On Startup:\nAutomatically update the compatibility database when shadPS4 starts. + Update Compatibility On Startup:\nAutomatically update the compatibility database when shadPS4 starts. + + + Update Compatibility Database:\nImmediately update the compatibility database. + Update Compatibility Database:\nImmediately update the compatibility database. + + + Never + Tidak Pernah + + + Idle + Diam + + + Always + Selalu + + + Touchpad Left + Touchpad Kiri + + + Touchpad Right + Touchpad Kanan + + + Touchpad Center + Pusat Touchpad + + + None + Tidak Ada + + + Graphics Device:\nOn multiple GPU systems, select the GPU the emulator will use from the drop down list,\nor select "Auto Select" to automatically determine it. + Perangkat Grafis:\nPada sistem GPU ganda, pilih GPU yang akan digunakan emulator dari daftar dropdown,\natau pilih "Auto Select" untuk menentukan secara otomatis. + + + Width/Height:\nSets the size of the emulator window at launch, which can be resized during gameplay.\nThis is different from the in-game resolution. + Lebar/Tinggi:\nMenetapkan ukuran jendela emulator saat diluncurkan, yang dapat diubah ukurannya selama permainan.\nIni berbeda dari resolusi dalam permainan. + + + Vblank Divider:\nThe frame rate at which the emulator refreshes at is multiplied by this number. Changing this may have adverse effects, such as increasing the game speed, or breaking critical game functionality that does not expect this to change! + Pembagi Vblank:\nKecepatan bingkai di mana emulator menyegarkan dikalikan dengan angka ini. Mengubah ini dapat memiliki efek buruk, seperti meningkatkan kecepatan permainan, atau merusak fungsi kritis permainan yang tidak mengharapkan ini berubah! + + + Enable Shaders Dumping:\nFor the sake of technical debugging, saves the games shaders to a folder as they render. + Aktifkan Pembuangan Shader:\nUntuk tujuan debugging teknis, menyimpan shader permainan ke folder saat mereka dirender. + + + Enable Null GPU:\nFor the sake of technical debugging, disables game rendering as if there were no graphics card. + Aktifkan GPU Null:\nUntuk tujuan debugging teknis, menonaktifkan rendering permainan seolah-olah tidak ada kartu grafis. + + + Enable HDR:\nEnables HDR in games that support it.\nYour monitor must have support for the BT2020 PQ color space and the RGB10A2 swapchain format. + Enable HDR:\nEnables HDR in games that support it.\nYour monitor must have support for the BT2020 PQ color space and the RGB10A2 swapchain format. + + + Game Folders:\nThe list of folders to check for installed games. + Folder Permainan:\nDaftar folder untuk memeriksa permainan yang diinstal. + + + Add:\nAdd a folder to the list. + Tambah:\nTambahkan folder ke daftar. + + + Remove:\nRemove a folder from the list. + Hapus:\nHapus folder dari daftar. + + + Enable Debug Dumping:\nSaves the import and export symbols and file header information of the currently running PS4 program to a directory. + Aktifkan Pembuangan Debug:\nMenyimpan simbol impor dan ekspor serta informasi header file dari program PS4 yang sedang berjalan ke direktori. + + + Enable Vulkan Validation Layers:\nEnables a system that validates the state of the Vulkan renderer and logs information about its internal state.\nThis will reduce performance and likely change the behavior of emulation. + Aktifkan Vulkan Validation Layers:\nMengaktifkan sistem yang memvalidasi status penggambaran Vulkan dan mencatat informasi tentang status internalnya. Ini akan mengurangi kinerja dan kemungkinan mengubah perilaku emulasi. + + + Enable Vulkan Synchronization Validation:\nEnables a system that validates the timing of Vulkan rendering tasks.\nThis will reduce performance and likely change the behavior of emulation. + Aktifkan Vulkan Synchronization Validation:\nMengaktifkan sistem yang memvalidasi waktu tugas penggambaran Vulkan. Ini akan mengurangi kinerja dan kemungkinan mengubah perilaku emulasi. + + + Enable RenderDoc Debugging:\nIf enabled, the emulator will provide compatibility with Renderdoc to allow capture and analysis of the currently rendered frame. + Aktifkan Debugging RenderDoc:\nJika diaktifkan, emulator akan menyediakan kompatibilitas dengan Renderdoc untuk memungkinkan pengambilan dan analisis bingkai yang sedang dirender. + + + Collect Shaders:\nYou need this enabled to edit shaders with the debug menu (Ctrl + F10). + Collect Shaders:\nYou need this enabled to edit shaders with the debug menu (Ctrl + F10). + + + Crash Diagnostics:\nCreates a .yaml file with info about the Vulkan state at the time of crashing.\nUseful for debugging 'Device lost' errors. If you have this enabled, you should enable Host AND Guest Debug Markers.\nDoes not work on Intel GPUs.\nYou need Vulkan Validation Layers enabled and the Vulkan SDK for this to work. + Crash Diagnostics:\nCreates a .yaml file with info about the Vulkan state at the time of crashing.\nUseful for debugging 'Device lost' errors. If you have this enabled, you should enable Host AND Guest Debug Markers.\nDoes not work on Intel GPUs.\nYou need Vulkan Validation Layers enabled and the Vulkan SDK for this to work. + + + Copy GPU Buffers:\nGets around race conditions involving GPU submits.\nMay or may not help with PM4 type 0 crashes. + Copy GPU Buffers:\nGets around race conditions involving GPU submits.\nMay or may not help with PM4 type 0 crashes. + + + Host Debug Markers:\nInserts emulator-side information like markers for specific AMDGPU commands around Vulkan commands, as well as giving resources debug names.\nIf you have this enabled, you should enable Crash Diagnostics.\nUseful for programs like RenderDoc. + Host Debug Markers:\nInserts emulator-side information like markers for specific AMDGPU commands around Vulkan commands, as well as giving resources debug names.\nIf you have this enabled, you should enable Crash Diagnostics.\nUseful for programs like RenderDoc. + + + Guest Debug Markers:\nInserts any debug markers the game itself has added to the command buffer.\nIf you have this enabled, you should enable Crash Diagnostics.\nUseful for programs like RenderDoc. + Guest Debug Markers:\nInserts any debug markers the game itself has added to the command buffer.\nIf you have this enabled, you should enable Crash Diagnostics.\nUseful for programs like RenderDoc. + + + Save Data Path:\nThe folder where game save data will be saved. + Save Data Path:\nThe folder where game save data will be saved. + + + Browse:\nBrowse for a folder to set as the save data path. + Browse:\nBrowse for a folder to set as the save data path. + + + Release + Release + + + Nightly + Nightly + + + Set the volume of the background music. + Set the volume of the background music. + + + Enable Motion Controls + Enable Motion Controls + + + Save Data Path + Save Data Path + + + Browse + Browse + + + async + async + + + sync + sync + + + Auto Select + Auto Select + + + Directory to install games + Directory to install games + + + Directory to save data + Directory to save data + + + Video + Video + + + Display Mode + Display Mode + + + Windowed + Windowed + + + Fullscreen + Fullscreen + + + Fullscreen (Borderless) + Fullscreen (Borderless) + + + Window Size + Window Size + + + W: + W: + + + H: + H: + + + Separate Log Files + Separate Log Files + + + Separate Log Files:\nWrites a separate logfile for each game. + Separate Log Files:\nWrites a separate logfile for each game. + + + Trophy Notification Position + Trophy Notification Position + + + Left + Left + + + Right + Right + + + Top + Top + + + Bottom + Bottom + + + Notification Duration + Notification Duration + + + Portable User Folder + Portable User Folder + + + Create Portable User Folder from Common User Folder + Create Portable User Folder from Common User Folder + + + Portable user folder:\nStores shadPS4 settings and data that will be applied only to the shadPS4 build located in the current folder. Restart the app after creating the portable user folder to begin using it. + Portable user folder:\nStores shadPS4 settings and data that will be applied only to the shadPS4 build located in the current folder. Restart the app after creating the portable user folder to begin using it. + + + Cannot create portable user folder + Cannot create portable user folder + + + %1 already exists + %1 already exists + + + Portable user folder created + Portable user folder created + + + %1 successfully created. + %1 successfully created. + + + Open the custom trophy images/sounds folder:\nYou can add custom images to the trophies and an audio.\nAdd the files to custom_trophy with the following names:\ntrophy.wav OR trophy.mp3, bronze.png, gold.png, platinum.png, silver.png\nNote: The sound will only work in QT versions. + Open the custom trophy images/sounds folder:\nYou can add custom images to the trophies and an audio.\nAdd the files to custom_trophy with the following names:\ntrophy.wav OR trophy.mp3, bronze.png, gold.png, platinum.png, silver.png\nNote: The sound will only work in QT versions. + + + + TrophyViewer + + Trophy Viewer + Trophy Viewer + + + Select Game: + Select Game: + + + Progress + Progress + + + Show Earned Trophies + Show Earned Trophies + + + Show Not Earned Trophies + Show Not Earned Trophies + + + Show Hidden Trophies + Show Hidden Trophies + + + diff --git a/src/qt_gui/translations/it.ts b/src/qt_gui/translations/it.ts deleted file mode 100644 index 9e375a45e..000000000 --- a/src/qt_gui/translations/it.ts +++ /dev/null @@ -1,1664 +0,0 @@ - - - - - - AboutDialog - - - About shadPS4 - Riguardo shadPS4 - - - - shadPS4 - shadPS4 - - - - 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. - Questo programma non dovrebbe essere utilizzato per riprodurre giochi che non vengono ottenuti legalmente. - - - - ElfViewer - - - Open Folder - Apri Cartella - - - - GameInfoClass - - - Loading game list, please wait :3 - Caricamento lista giochi, attendere :3 - - - - Cancel - Annulla - - - - Loading... - Caricamento... - - - - InstallDirSelect - - - shadPS4 - Choose directory - shadPS4 - Scegli cartella - - - - Select which directory you want to install to. - Seleziona in quale cartella vuoi effettuare l'installazione. - - - - GameInstallDialog - - - shadPS4 - Choose directory - shadPS4 - Scegli cartella - - - - Directory to install games - Cartella di installazione dei giochi - - - - Browse - Sfoglia - - - - Error - Errore - - - - The value for location to install games is not valid. - Il valore del percorso di installazione dei giochi non è valido. - - - - GuiContextMenus - - - Create Shortcut - Crea scorciatoia - - - - Cheats / Patches - Trucchi / Patch - - - - SFO Viewer - Visualizzatore SFO - - - - Trophy Viewer - Visualizzatore Trofei - - - - Open Folder... - Apri Cartella... - - - - Open Game Folder - Apri Cartella del Gioco - - - - Open Save Data Folder - Apri Cartella dei Dati di Salvataggio - - - - Open Log Folder - Apri Cartella dei Log - - - - Copy info... - Copia informazioni... - - - - Copy Name - Copia Nome - - - - Copy Serial - Copia Seriale - - - - Copy All - Copia Tutto - - - - Delete... - Elimina... - - - - Delete Game - Elimina Gioco - - - - Delete Update - Elimina Aggiornamento - - - - Delete DLC - Elimina DLC - - - - Compatibility... - Compatibility... - - - - Update database - Update database - - - - View report - View report - - - - Submit a report - Submit a report - - - - Shortcut creation - Creazione scorciatoia - - - - Shortcut created successfully! - Scorciatoia creata con successo! - - - - Error - Errore - - - - Error creating shortcut! - Errore nella creazione della scorciatoia! - - - - Install PKG - Installa PKG - - - - Game - Gioco - - - - requiresEnableSeparateUpdateFolder_MSG - Questa feature richiede che venga attivata l'opzione "Abilita Cartella Aggiornamenti Separata" per poter funzionare, per favore abilitala. - - - - This game has no update to delete! - Questo gioco non ha alcun aggiornamento da eliminare! - - - - Update - Update - - - - This game has no DLC to delete! - Questo gioco non ha alcun DLC da eliminare! - - - - DLC - DLC - - - - Delete %1 - Elimina %1 - - - - Are you sure you want to delete %1's %2 directory? - Sei sicuro di eliminale la cartella %2 di %1? - - - - MainWindow - - - Open/Add Elf Folder - Apri/Aggiungi cartella Elf - - - - Install Packages (PKG) - Installa Pacchetti (PKG) - - - - Boot Game - Avvia Gioco - - - - Check for Updates - Controlla aggiornamenti - - - - About shadPS4 - Riguardo a shadPS4 - - - - Configure... - Configura... - - - - Install application from a .pkg file - Installa applicazione da un file .pkg - - - - Recent Games - Giochi Recenti - - - - Exit - Uscita - - - - Exit shadPS4 - Esci da shadPS4 - - - - Exit the application. - Esci dall'applicazione. - - - - Show Game List - Mostra Lista Giochi - - - - Game List Refresh - Aggiorna Lista Giochi - - - - Tiny - Minuscolo - - - - Small - Piccolo - - - - Medium - Medio - - - - Large - Grande - - - - List View - Visualizzazione Lista - - - - Grid View - Visualizzazione Griglia - - - - Elf Viewer - Visualizzatore Elf - - - - Game Install Directory - Cartella Installazione Giochi - - - - Download Cheats/Patches - Scarica Trucchi/Patch - - - - Dump Game List - Scarica Lista Giochi - - - - PKG Viewer - Visualizzatore PKG - - - - Search... - Cerca... - - - - File - File - - - - View - Visualizza - - - - Game List Icons - Icone Lista Giochi - - - - Game List Mode - Modalità Lista Giochi - - - - Settings - Impostazioni - - - - Utils - Utilità - - - - Themes - Temi - - - - Help - Aiuto - - - - Dark - Scuro - - - - Light - Chiaro - - - - Green - Verde - - - - Blue - Blu - - - - Violet - Viola - - - - toolBar - Barra strumenti - - - - PKGViewer - - - Open Folder - Apri Cartella - - - - TrophyViewer - - - Trophy Viewer - Visualizzatore Trofei - - - - SettingsDialog - - - Settings - Impostazioni - - - - General - Generale - - - - System - Sistema - - - - Console Language - Lingua della console - - - - Emulator Language - Lingua dell'emulatore - - - - Emulator - Emulatore - - - - Enable Fullscreen - Abilita Schermo Intero - - - - Enable Separate Update Folder - Abilita Cartella Aggiornamenti Separata - - - - Show Splash - Mostra Schermata Iniziale - - - - Is PS4 Pro - Modalità Ps4 Pro - - - - Enable Discord Rich Presence - Abilita Discord Rich Presence - - - - Username - Nome Utente - - - - Trophy Key - Trophy Key - - - - Trophy - Trophy - - - - Logger - Logger - - - - Log Type - Tipo di Log - - - - Log Filter - Filtro Log - - - - Input - Input - - - - Cursor - Cursore - - - - Hide Cursor - Nascondi Cursore - - - - Hide Cursor Idle Timeout - Timeout inattività per nascondere il cursore - - - - s - s - - - - Controller - Controller - - - - Back Button Behavior - Comportamento del pulsante Indietro - - - - Graphics - Grafica - - - - Graphics Device - Scheda Grafica - - - - Width - Larghezza - - - - Height - Altezza - - - - Vblank Divider - Divisore Vblank - - - - Advanced - Avanzate - - - - Enable Shaders Dumping - Abilita Dump Shader - - - - Enable NULL GPU - Abilita NULL GPU - - - - Paths - Percorsi - - - - Game Folders - Cartelle di gioco - - - - Add... - Aggiungi... - - - - Remove - Rimuovi - - - - Debug - Debug - - - - Enable - Abilita Debug Dumping - - - - Enable Vulkan Validation Layers - Abilita Vulkan Validation Layers - - - - Enable Vulkan Synchronization Validation - Abilita Vulkan Synchronization Validation - - - - Enable RenderDoc Debugging - Abilita RenderDoc Debugging - - - - Update - Aggiornamento - - - - Check for Updates at Startup - Verifica aggiornamenti all’avvio - - - - Update Channel - Canale di Aggiornamento - - - - Check for Updates - Controlla aggiornamenti - - - - GUI Settings - Impostazioni GUI - - - - Disable Trophy Pop-ups - Disabilita Notifica Trofei - - - - Play title music - Riproduci musica del titolo - - - - Update Compatibility Database On Startup - Aggiorna Database Compatibilità all'Avvio - - - - Game Compatibility - Compatibilità Gioco - - - - Display Compatibility Data - Mostra Dati Compatibilità - - - - Update Compatibility Database - Aggiorna Database Compatibilità - - - - Volume - Volume - - - - Audio Backend - Audio Backend - - - - MainWindow - - - Game List - Elenco giochi - - - - * Unsupported Vulkan Version - * Versione Vulkan non supportata - - - - Download Cheats For All Installed Games - Scarica Trucchi per tutti i giochi installati - - - - Download Patches For All Games - Scarica Patch per tutti i giochi - - - - Download Complete - Download completato - - - - You have downloaded cheats for all the games you have installed. - Hai scaricato trucchi per tutti i giochi installati. - - - - Patches Downloaded Successfully! - Patch scaricate con successo! - - - - All Patches available for all games have been downloaded. - Tutte le patch disponibili per tutti i giochi sono state scaricate. - - - - Games: - Giochi: - - - - PKG File (*.PKG) - File PKG (*.PKG) - - - - ELF files (*.bin *.elf *.oelf) - File ELF (*.bin *.elf *.oelf) - - - - Game Boot - Avvia Gioco - - - - Only one file can be selected! - Si può selezionare solo un file! - - - - PKG Extraction - Estrazione file PKG - - - - Patch detected! - Patch rilevata! - - - - PKG and Game versions match: - Le versioni di PKG e del Gioco corrispondono: - - - - Would you like to overwrite? - Vuoi sovrascrivere? - - - - PKG Version %1 is older than installed version: - La versione PKG %1 è più vecchia rispetto alla versione installata: - - - - Game is installed: - Gioco installato: - - - - Would you like to install Patch: - Vuoi installare la patch: - - - - DLC Installation - Installazione DLC - - - - Would you like to install DLC: %1? - Vuoi installare il DLC: %1? - - - - DLC already installed: - DLC già installato: - - - - Game already installed - Gioco già installato - - - - PKG is a patch, please install the game first! - Questo file PKG contiene una patch. Per favore, installa prima il gioco! - - - - PKG ERROR - ERRORE PKG - - - - Extracting PKG %1/%2 - Estrazione file PKG %1/%2 - - - - Extraction Finished - Estrazione Completata - - - - Game successfully installed at %1 - Gioco installato correttamente in %1 - - - - File doesn't appear to be a valid PKG file - Il file sembra non essere un file PKG valido - - - - CheatsPatches - - - Cheats / Patches for - Cheats / Patches for - - - - defaultTextEdit_MSG - I trucchi e le patch sono sperimentali.\nUtilizzali con cautela.\n\nScarica i trucchi singolarmente selezionando l'archivio e cliccando sul pulsante di download.\nNella scheda Patch, puoi scaricare tutte le patch in una volta sola, scegliere quali vuoi utilizzare e salvare la tua selezione.\n\nPoiché non sviluppiamo i trucchi e le patch,\nper favore segnala i problemi all'autore dei trucchi.\n\nHai creato un nuovo trucco? Visita:\nhttps://github.com/shadps4-emu/ps4_cheats - - - - No Image Available - Nessuna immagine disponibile - - - - Serial: - Seriale: - - - - Version: - Versione: - - - - Size: - Dimensione: - - - - Select Cheat File: - Seleziona File Trucchi: - - - - Repository: - Archivio: - - - - Download Cheats - Scarica trucchi - - - - Delete File - Cancella File - - - - No files selected. - Nessun file selezionato. - - - - You can delete the cheats you don't want after downloading them. - Puoi cancellare i trucchi che non vuoi utilizzare dopo averli scaricati. - - - - Do you want to delete the selected file?\n%1 - Vuoi cancellare il file selezionato?\n%1 - - - - Select Patch File: - Seleziona File Patch: - - - - Download Patches - Scarica Patch - - - - Save - Salva - - - - Cheats - Trucchi - - - - Patches - Patch - - - - Error - Errore - - - - No patch selected. - Nessuna patch selezionata. - - - - Unable to open files.json for reading. - Impossibile aprire il file .json per la lettura. - - - - No patch file found for the current serial. - Nessun file patch trovato per il seriale selezionato. - - - - Unable to open the file for reading. - Impossibile aprire il file per la lettura. - - - - Unable to open the file for writing. - Impossibile aprire il file per la scrittura. - - - - Failed to parse XML: - Analisi XML fallita: - - - - Success - Successo - - - - Options saved successfully. - Opzioni salvate con successo. - - - - Invalid Source - Fonte non valida - - - - The selected source is invalid. - La fonte selezionata non è valida. - - - - File Exists - Il file è presente - - - - File already exists. Do you want to replace it? - Il file è già presente. Vuoi sostituirlo? - - - - Failed to save file: - Salvataggio file fallito: - - - - Failed to download file: - Scaricamento file fallito: - - - - Cheats Not Found - Trucchi non trovati - - - - CheatsNotFound_MSG - Non sono stati trovati trucchi per questa versione del gioco nell'archivio selezionato, prova un altro archivio o una versione diversa del gioco. - - - - Cheats Downloaded Successfully - Trucchi scaricati con successo! - - - - CheatsDownloadedSuccessfully_MSG - Hai scaricato con successo i trucchi per questa versione del gioco dall'archivio selezionato. Puoi provare a scaricare da un altro archivio, se disponibile, puoi anche utilizzarlo selezionando il file dall'elenco. - - - - Failed to save: - Salvataggio fallito: - - - - Failed to download: - Impossibile scaricare: - - - - Download Complete - Scaricamento completo - - - - DownloadComplete_MSG - Patch scaricata con successo! Vengono scaricate tutte le patch disponibili per tutti i giochi, non è necessario scaricarle singolarmente per ogni gioco come nel caso dei trucchi. Se la patch non appare, potrebbe essere che non esista per il numero di serie e la versione specifica del gioco. - - - - Failed to parse JSON data from HTML. - Impossibile analizzare i dati JSON dall'HTML. - - - - Failed to retrieve HTML page. - Impossibile recuperare la pagina HTML. - - - - The game is in version: %1 - Il gioco è nella versione: %1 - - - - The downloaded patch only works on version: %1 - La patch scaricata funziona solo sulla versione: %1 - - - - You may need to update your game. - Potresti aver bisogno di aggiornare il tuo gioco. - - - - Incompatibility Notice - Avviso di incompatibilità - - - - Failed to open file: - Impossibile aprire file: - - - - XML ERROR: - ERRORE XML: - - - - Failed to open files.json for writing - Impossibile aprire i file .json per la scrittura - - - - Author: - Autore: - - - - Directory does not exist: - La cartella non esiste: - - - - Failed to open files.json for reading. - Impossibile aprire i file .json per la lettura. - - - - Name: - Nome: - - - - Can't apply cheats before the game is started - Non è possibile applicare i trucchi prima dell'inizio del gioco. - - - - SettingsDialog - - - Save - Salva - - - - Apply - Applica - - - - Restore Defaults - Ripristina Impostazioni Predefinite - - - - Close - Chiudi - - - - Point your mouse at an option to display its description. - Sposta il mouse su un'opzione per visualizzarne la descrizione. - - - - consoleLanguageGroupBox - Lingua della Console:\nImposta la lingua utilizzata dal gioco PS4.\nÈ consigliabile impostare questa su una lingua supportata dal gioco, che può variare a seconda della regione. - - - - emulatorLanguageGroupBox - Lingua dell'Emulatore:\nImposta la lingua dell'interfaccia utente dell'emulatore. - - - - fullscreenCheckBox - Abilita Schermo Intero:\nMetti automaticamente la finestra di gioco in modalità schermo intero.\nQuesto può essere disattivato premendo il tasto F11. - - - - separateUpdatesCheckBox - Abilita Cartella Aggiornamenti Separata:\nAbilita l'installazione degli aggiornamenti in una cartella separata per una più facile gestione. - - - - showSplashCheckBox - Mostra Schermata di Avvio:\nMostra la schermata di avvio del gioco (un'immagine speciale) mentre il gioco si sta avviando. - - - - ps4proCheckBox - È PS4 Pro:\nFa sì che l'emulatore si comporti come una PS4 PRO, il che può abilitare funzionalità speciali in giochi che la supportano. - - - - discordRPCCheckbox - Abilita Discord Rich Presence:\nMostra l'icona dell'emulatore e informazioni pertinenti sul tuo profilo Discord. - - - - userName - Nome Utente:\nImposta il nome utente dell'account PS4, che potrebbe essere visualizzato da alcuni giochi. - - - - TrophyKey - Trophy Key:\nKey used to decrypt trophies. Must be obtained from your jailbroken console.\nMust contain only hex characters. - - - - logTypeGroupBox - Tipo di Log:\nImposta se sincronizzare l'output della finestra di log per le prestazioni. Potrebbe avere effetti avversi sull'emulazione. - - - - logFilter - Filtro Log:\nFiltra il log per stampare solo informazioni specifiche.\nEsempi: "Core:Trace" "Lib.Pad:Debug Common.Filesystem:Error" "*:Critical" Livelli: Trace, Debug, Info, Warning, Error, Critical - in questo ordine, un livello specifico silenzia tutti i livelli precedenti nell'elenco e registra ogni livello successivo. - - - - updaterGroupBox - Aggiornamento:\nRelease: Versioni ufficiali rilasciate ogni mese che potrebbero essere molto datate, ma sono più affidabili e testate.\nNightly: Versioni di sviluppo che hanno tutte le ultime funzionalità e correzioni, ma potrebbero contenere bug e sono meno stabili. - - - - GUIgroupBox - Riproduci Musica del Titolo:\nSe un gioco lo supporta, attiva la riproduzione di musica speciale quando selezioni il gioco nell'interfaccia grafica. - - - - disableTrophycheckBox - Disable Trophy Pop-ups:\nDisable in-game trophy notifications. Trophy progress can still be tracked using the Trophy Viewer (right-click the game in the main window). - - - - hideCursorGroupBox - Nascondi cursore:\nScegli quando il cursore scomparirà:\nMai: Vedrai sempre il mouse.\nInattivo: Imposta un tempo per farlo scomparire dopo essere stato inattivo.\nSempre: non vedrai mai il mouse. - - - - idleTimeoutGroupBox - Imposta un tempo affinché il mouse scompaia dopo essere stato inattivo. - - - - backButtonBehaviorGroupBox - Comportamento del pulsante Indietro:\nImposta il pulsante Indietro del controller per emulare il tocco sulla posizione specificata sul touchpad PS4. - - - - enableCompatibilityCheckBox - Mostra Dati Compatibilità:\nMostra informazioni sulla compatibilità del gioco nella visualizzazione lista. Abilita "Aggiorna Compatiblità all'Avvio" per ottenere informazioni aggiornate. - - - - checkCompatibilityOnStartupCheckBox - Aggiorna Compatibilità all'Avvio:\nAggiorna automaticamente il database della compatibilità quando si avvia shadps4. - - - - updateCompatibilityButton - Aggiorna Database Compatibilità:\nAggiorna immediatamente il database di compatibilità. - - - - Never - Mai - - - - Idle - Inattivo - - - - Always - Sempre - - - - Touchpad Left - Touchpad Sinistra - - - - Touchpad Right - Touchpad Destra - - - - Touchpad Center - Centro del Touchpad - - - - None - Nessuno - - - - graphicsAdapterGroupBox - Dispositivo Grafico:\nIn sistemi con più GPU, seleziona la GPU che l'emulatore utilizzerà dall'elenco a discesa,\no seleziona "Auto Select" per determinarlo automaticamente. - - - - resolutionLayout - Larghezza/Altezza:\nImposta la dimensione della finestra dell'emulatore all'avvio, che può essere ridimensionata durante il gioco.\nQuesto è diverso dalla risoluzione in gioco. - - - - heightDivider - Divisore Vblank:\nIl frame rate con cui l'emulatore si aggiorna viene moltiplicato per questo numero. Cambiare questo potrebbe avere effetti avversi, come aumentare la velocità del gioco o rompere funzionalità critiche del gioco che non si aspettano questa modifica! - - - - dumpShadersCheckBox - Abilita Pompaggio Shader:\nPer scopi di debug tecnico, salva gli shader dei giochi in una cartella mentre vengono resi. - - - - nullGpuCheckBox - Abilita GPU Null:\nPer scopi di debug tecnico, disabilita il rendering del gioco come se non ci fosse alcuna scheda grafica. - - - - gameFoldersBox - Cartelle di Gioco:\nL'elenco delle cartelle da controllare per i giochi installati. - - - - addFolderButton - Aggiungi:\nAggiungi una cartella all'elenco. - - - - removeFolderButton - Rimuovi:\nRimuovi una cartella dall'elenco. - - - - debugDump - Abilita Pompaggio di Debug:\nSalva i simboli di importazione ed esportazione e le informazioni sull'intestazione del file del programma PS4 attualmente in esecuzione in una directory. - - - - vkValidationCheckBox - Abilita Strati di Validazione Vulkan:\nAbilita un sistema che convalida lo stato del renderer Vulkan e registra informazioni sul suo stato interno. Ciò ridurrà le prestazioni e probabilmente cambierà il comportamento dell'emulazione. - - - - vkSyncValidationCheckBox - Abilita Validazione della Sincronizzazione Vulkan:\nAbilita un sistema che convalida il timing delle attività di rendering Vulkan. Ciò ridurrà le prestazioni e probabilmente cambierà il comportamento dell'emulazione. - - - - rdocCheckBox - Abilita Debugging RenderDoc:\nSe abilitato, l'emulatore fornirà compatibilità con Renderdoc per consentire la cattura e l'analisi del frame attualmente reso. - - - - GameListFrame - - - Icon - Icona - - - - Name - Nome - - - - Serial - Seriale - - - - Compatibility - Compatibilità - - - - Region - Regione - - - - Firmware - Firmware - - - - Size - Dimensione - - - - Version - Versione - - - - Path - Percorso - - - - Play Time - Tempo di Gioco - - - - Never Played - Mai Giocato - - - - h - h - - - - m - m - - - - s - s - - - - Compatibility is untested - Nessuna informazione sulla compatibilità - - - - Game does not initialize properly / crashes the emulator - Il gioco non si avvia in modo corretto / forza chiusura dell'emulatore - - - - Game boots, but only displays a blank screen - Il gioco si avvia, ma mostra solo una schermata nera - - - - Game displays an image but does not go past the menu - Il gioco mostra immagini ma non va oltre il menu - - - - Game has game-breaking glitches or unplayable performance - Il gioco ha problemi gravi di emulazione oppure framerate troppo basso - - - - Game can be completed with playable performance and no major glitches - Il gioco può essere completato con buone prestazioni e senza problemi gravi - - - - CheckUpdate - - - Auto Updater - Aggiornamento automatico - - - - Error - Errore - - - - Network error: - Errore di rete: - - - - Failed to parse update information. - Impossibile analizzare le informazioni di aggiornamento. - - - - No pre-releases found. - Nessuna anteprima trovata. - - - - Invalid release data. - Dati della release non validi. - - - - No download URL found for the specified asset. - Nessun URL di download trovato per l'asset specificato. - - - - Your version is already up to date! - La tua versione è già aggiornata! - - - - Update Available - Aggiornamento disponibile - - - - Update Channel - Canale di Aggiornamento - - - - Current Version - Versione attuale - - - - Latest Version - Ultima versione - - - - Do you want to update? - Vuoi aggiornare? - - - - Show Changelog - Mostra il Changelog - - - - Check for Updates at Startup - Controlla aggiornamenti all’avvio - - - - Update - Aggiorna - - - - No - No - - - - Hide Changelog - Nascondi il Changelog - - - - Changes - Modifiche - - - - Network error occurred while trying to access the URL - Si è verificato un errore di rete durante il tentativo di accesso all'URL - - - - Download Complete - Download completato - - - - The update has been downloaded, press OK to install. - L'aggiornamento è stato scaricato, premi OK per installare. - - - - Failed to save the update file at - Impossibile salvare il file di aggiornamento in - - - - Starting Update... - Inizio aggiornamento... - - - - Failed to create the update script file - Impossibile creare il file di script di aggiornamento - - - - GameListUtils - - - B - B - - - - KB - KB - - - - MB - MB - - - - GB - GB - - - - TB - TB - - - \ No newline at end of file diff --git a/src/qt_gui/translations/it_IT.ts b/src/qt_gui/translations/it_IT.ts new file mode 100644 index 000000000..af321bd92 --- /dev/null +++ b/src/qt_gui/translations/it_IT.ts @@ -0,0 +1,2089 @@ + + + + + + AboutDialog + + About shadPS4 + Riguardo shadPS4 + + + 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. + Questo programma non dovrebbe essere utilizzato per riprodurre giochi che non vengono ottenuti legalmente. + + + + CheatsPatches + + Cheats / Patches for + Cheats / Patch per + + + 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:\n + I trucchi e le patch sono sperimentali.\nUtilizzali con cautela.\n\nScarica i trucchi singolarmente selezionando l'archivio e cliccando sul pulsante di download.\nNella scheda Patch, puoi scaricare tutte le patch in una volta sola, scegliere quali vuoi utilizzare e salvare la tua selezione.\n\nPoiché non sviluppiamo i trucchi e le patch,\nper favore segnala i problemi all'autore dei trucchi.\n\nHai creato un nuovo trucco? Visita:\n + + + No Image Available + Nessuna immagine disponibile + + + Serial: + Seriale: + + + Version: + Versione: + + + Size: + Dimensione: + + + Select Cheat File: + Seleziona File Trucchi: + + + Repository: + Archivio: + + + Download Cheats + Scarica trucchi + + + Delete File + Cancella File + + + No files selected. + Nessun file selezionato. + + + You can delete the cheats you don't want after downloading them. + Puoi cancellare i trucchi che non vuoi utilizzare dopo averli scaricati. + + + Do you want to delete the selected file?\n%1 + Vuoi cancellare il file selezionato?\n%1 + + + Select Patch File: + Seleziona File Patch: + + + Download Patches + Scarica Patch + + + Save + Salva + + + Cheats + Trucchi + + + Patches + Patch + + + Error + Errore + + + No patch selected. + Nessuna patch selezionata. + + + Unable to open files.json for reading. + Impossibile aprire il file .json per la lettura. + + + No patch file found for the current serial. + Nessun file patch trovato per il seriale selezionato. + + + Unable to open the file for reading. + Impossibile aprire il file per la lettura. + + + Unable to open the file for writing. + Impossibile aprire il file per la scrittura. + + + Failed to parse XML: + Analisi XML fallita: + + + Success + Successo + + + Options saved successfully. + Opzioni salvate con successo. + + + Invalid Source + Fonte non valida + + + The selected source is invalid. + La fonte selezionata non è valida. + + + File Exists + Il file è presente + + + File already exists. Do you want to replace it? + Il file è già presente. Vuoi sostituirlo? + + + Failed to save file: + Salvataggio file fallito: + + + Failed to download file: + Scaricamento file fallito: + + + Cheats Not Found + Trucchi non trovati + + + No Cheats found for this game in this version of the selected repository,try another repository or a different version of the game. + Non sono stati trovati trucchi per questa versione del gioco nell'archivio selezionato, prova un altro archivio o una versione diversa del gioco. + + + Cheats Downloaded Successfully + Trucchi scaricati con successo! + + + 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. + Hai scaricato con successo i trucchi per questa versione del gioco dall'archivio selezionato. Puoi provare a scaricare da un altro archivio, se disponibile, puoi anche utilizzarlo selezionando il file dall'elenco. + + + Failed to save: + Salvataggio fallito: + + + Failed to download: + Impossibile scaricare: + + + Download Complete + Scaricamento completo + + + 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. If the patch does not appear, it may be that it does not exist for the specific serial and version of the game. + Patch scaricata con successo! Vengono scaricate tutte le patch disponibili per tutti i giochi, non è necessario scaricarle singolarmente per ogni gioco come nel caso dei trucchi. Se la patch non appare, potrebbe essere che non esista per il numero di serie e la versione specifica del gioco. + + + Failed to parse JSON data from HTML. + Impossibile analizzare i dati JSON dall'HTML. + + + Failed to retrieve HTML page. + Impossibile recuperare la pagina HTML. + + + The game is in version: %1 + Il gioco è nella versione: %1 + + + The downloaded patch only works on version: %1 + La patch scaricata funziona solo sulla versione: %1 + + + You may need to update your game. + Potresti aver bisogno di aggiornare il tuo gioco. + + + Incompatibility Notice + Avviso di incompatibilità + + + Failed to open file: + Impossibile aprire file: + + + XML ERROR: + ERRORE XML: + + + Failed to open files.json for writing + Impossibile aprire i file .json per la scrittura + + + Author: + Autore: + + + Directory does not exist: + La cartella non esiste: + + + Failed to open files.json for reading. + Impossibile aprire i file .json per la lettura. + + + Name: + Nome: + + + Can't apply cheats before the game is started + Non è possibile applicare i trucchi prima dell'inizio del gioco. + + + Close + Chiudi + + + + CheckUpdate + + Auto Updater + Aggiornamento automatico + + + Error + Errore + + + Network error: + Errore di rete: + + + The Auto Updater allows up to 60 update checks per hour.\nYou have reached this limit. Please try again later. + L'Aggiornamento Automatico consente fino a 60 controlli di aggiornamento all'ora.\nHai raggiunto questo limite. Riprova più tardi. + + + Failed to parse update information. + Impossibile analizzare le informazioni di aggiornamento. + + + No pre-releases found. + Nessuna anteprima trovata. + + + Invalid release data. + Dati della release non validi. + + + No download URL found for the specified asset. + Nessun URL di download trovato per l'asset specificato. + + + Your version is already up to date! + La tua versione è già aggiornata! + + + Update Available + Aggiornamento disponibile + + + Update Channel + Canale di Aggiornamento + + + Current Version + Versione attuale + + + Latest Version + Ultima versione + + + Do you want to update? + Vuoi aggiornare? + + + Show Changelog + Mostra il Changelog + + + Check for Updates at Startup + Controlla aggiornamenti all’avvio + + + Update + Aggiorna + + + No + No + + + Hide Changelog + Nascondi il Changelog + + + Changes + Modifiche + + + Network error occurred while trying to access the URL + Si è verificato un errore di rete durante il tentativo di accesso all'URL + + + Download Complete + Download Completato + + + The update has been downloaded, press OK to install. + L'aggiornamento è stato scaricato, premi OK per installare. + + + Failed to save the update file at + Impossibile salvare il file di aggiornamento in + + + Starting Update... + Inizio Aggiornamento... + + + Failed to create the update script file + Impossibile creare il file di script di aggiornamento + + + + CompatibilityInfoClass + + Fetching compatibility data, please wait + Recuperando dati di compatibilità, per favore attendere + + + Cancel + Annulla + + + Loading... + Caricamento... + + + Error + Errore + + + Unable to update compatibility data! Try again later. + Impossibile aggiornare i dati di compatibilità! Riprova più tardi. + + + Unable to open compatibility_data.json for writing. + Impossibile aprire compatibility_data.json per la scrittura. + + + Unknown + Sconosciuto + + + Nothing + Niente + + + Boots + Si Avvia + + + Menus + Menu + + + Ingame + In gioco + + + Playable + Giocabile + + + + ControlSettings + + Configure Controls + Configura Comandi + + + D-Pad + Croce direzionale + + + Up + Su + + + Left + Sinistra + + + Right + Destra + + + Down + Giù + + + Left Stick Deadzone (def:2 max:127) + Zona Morta Levetta Sinistra (def:2 max:127) + + + Left Deadzone + Zona Morta Sinistra + + + Left Stick + Levetta Sinistra + + + Config Selection + Selezione Configurazione + + + Common Config + Configurazione Comune + + + Use per-game configs + Usa configurazioni per gioco + + + L1 / LB + L1 / LB + + + L2 / LT + L2 / LT + + + Back + Indietro + + + R1 / RB + R1 / RB + + + R2 / RT + R2 / RT + + + L3 + L3 + + + Options / Start + Opzioni / Avvio + + + R3 + R3 + + + Face Buttons + Pulsanti Frontali + + + Triangle / Y + Triangolo / Y + + + Square / X + Quadrato / X + + + Circle / B + Cerchio / B + + + Cross / A + Croce / A + + + Right Stick Deadzone (def:2, max:127) + Zona Morta Levetta Destra (def:2 max:127) + + + Right Deadzone + Zona Morta Destra + + + Right Stick + Levetta Destra + + + Color Adjustment + Regolazione Colore + + + R: + R: + + + G: + V: + + + B: + B: + + + Override Lightbar Color + Sostituisci Colore Lightbar + + + Override Color + Sostituisci Colore + + + Unable to Save + Impossibile Salvare + + + Cannot bind axis values more than once + Impossibile associare i valori degli assi più di una volta + + + Save + Salva + + + Apply + Applica + + + Restore Defaults + Ripristina Impostazioni Predefinite + + + Cancel + Annulla + + + + EditorDialog + + Edit Keyboard + Mouse and Controller input bindings + Modifica le associazioni di input di tastiera + mouse e controller + + + Use Per-Game configs + Usa Configurazioni Per Gioco + + + Error + Errore + + + Could not open the file for reading + Impossibile aprire il file per la lettura + + + Could not open the file for writing + Impossibile aprire il file per la scrittura + + + Save Changes + Salva Modifiche + + + Do you want to save changes? + Vuoi salvare le modifiche? + + + Help + Aiuto + + + Do you want to reset your custom default config to the original default config? + Vuoi reimpostare la configurazione predefinita personalizzata alla configurazione predefinita originale? + + + Do you want to reset this config to your custom default config? + Vuoi reimpostare questa configurazione alla configurazione predefinita personalizzata? + + + Reset to Default + Ripristina a Predefinito + + + + ElfViewer + + Open Folder + Apri Cartella + + + + GameInfoClass + + Loading game list, please wait :3 + Caricamento lista giochi, attendere :3 + + + Cancel + Annulla + + + Loading... + Caricamento... + + + + GameInstallDialog + + shadPS4 - Choose directory + shadPS4 - Scegli cartella + + + Directory to install games + Cartella di installazione dei giochi + + + Browse + Sfoglia + + + Error + Errore + + + Directory to install DLC + Cartella di installazione DLC + + + + GameListFrame + + Icon + Icona + + + Name + Nome + + + Serial + Seriale + + + Compatibility + Compatibilità + + + Region + Regione + + + Firmware + Firmware + + + Size + Dimensione + + + Version + Versione + + + Path + Percorso + + + Play Time + Tempo di Gioco + + + Never Played + Mai Giocato + + + h + o + + + m + m + + + s + s + + + Compatibility is untested + Nessuna informazione sulla compatibilità + + + Game does not initialize properly / crashes the emulator + Il gioco non si avvia in modo corretto / forza chiusura dell'emulatore + + + Game boots, but only displays a blank screen + Il gioco si avvia, ma mostra solo una schermata nera + + + Game displays an image but does not go past the menu + Il gioco mostra immagini ma non va oltre il menu + + + Game has game-breaking glitches or unplayable performance + Il gioco ha problemi gravi di emulazione oppure framerate troppo basso + + + Game can be completed with playable performance and no major glitches + Il gioco può essere completato con buone prestazioni e senza problemi gravi + + + Click to see details on github + Fai clic per vedere i dettagli su GitHub + + + Last updated + Ultimo aggiornamento + + + + GameListUtils + + B + B + + + KB + KB + + + MB + MB + + + GB + GB + + + TB + TB + + + + GuiContextMenus + + Create Shortcut + Crea scorciatoia + + + Cheats / Patches + Trucchi / Patch + + + SFO Viewer + Visualizzatore SFO + + + Trophy Viewer + Visualizzatore Trofei + + + Open Folder... + Apri Cartella... + + + Open Game Folder + Apri Cartella del Gioco + + + Open Save Data Folder + Apri Cartella dei Dati di Salvataggio + + + Open Log Folder + Apri Cartella dei Log + + + Copy info... + Copia informazioni... + + + Copy Name + Copia Nome + + + Copy Serial + Copia Seriale + + + Copy Version + Copia Versione + + + Copy Size + Copia Dimensione + + + Copy All + Copia Tutto + + + Delete... + Elimina... + + + Delete Game + Elimina Gioco + + + Delete Update + Elimina Aggiornamento + + + Delete DLC + Elimina DLC + + + Delete Trophy + Elimina Trofei + + + Compatibility... + Compatibilità... + + + Update database + Aggiorna database + + + View report + Visualizza rapporto + + + Submit a report + Invia rapporto + + + Shortcut creation + Creazione scorciatoia + + + Shortcut created successfully! + Scorciatoia creata con successo! + + + Error + Errore + + + Error creating shortcut! + Errore nella creazione della scorciatoia! + + + Game + Gioco + + + This game has no update to delete! + Questo gioco non ha alcun aggiornamento da eliminare! + + + Update + Aggiornamento + + + This game has no DLC to delete! + Questo gioco non ha alcun DLC da eliminare! + + + DLC + DLC + + + Delete %1 + Elimina %1 + + + Are you sure you want to delete %1's %2 directory? + Sei sicuro di eliminale la cartella %2 di %1? + + + Open Update Folder + Apri Cartella Aggiornamento + + + Delete Save Data + Elimina Dati Salvataggio + + + This game has no update folder to open! + Questo gioco non ha nessuna cartella di aggiornamento da aprire! + + + No log file found for this game! + Nessun file di log trovato per questo gioco! + + + Failed to convert icon. + Impossibile convertire l'icona. + + + This game has no save data to delete! + Questo gioco non ha alcun salvataggio dati da eliminare! + + + This game has no saved trophies to delete! + Questo gioco non ha nessun trofeo salvato da eliminare! + + + Save Data + Dati Salvataggio + + + Trophy + Trofei + + + SFO Viewer for + Visualizzatore SFO per + + + + HelpDialog + + Quickstart + Avvio rapido + + + FAQ + FAQ + + + Syntax + Sintassi + + + Special Bindings + Associazioni Speciali + + + Keybindings + Associazioni dei pulsanti + + + + KBMSettings + + Configure Controls + Configura Comandi + + + D-Pad + Croce direzionale + + + Up + Su + + + unmapped + non mappato + + + Left + Sinistra + + + Right + Destra + + + Down + Giù + + + Left Analog Halfmode + Mezza Modalità Analogico Sinistra + + + hold to move left stick at half-speed + tieni premuto per muovere la levetta analogica sinistra a metà velocità + + + Left Stick + Levetta Sinistra + + + Config Selection + Selezione Configurazione + + + Common Config + Configurazione Comune + + + Use per-game configs + Usa configurazioni per gioco + + + L1 + L1 + + + L2 + L2 + + + Text Editor + Editor Testuale + + + Help + Aiuto + + + R1 + R1 + + + R2 + R2 + + + L3 + L3 + + + Touchpad Click + Click Touchpad + + + Mouse to Joystick + Mouse a Joystick + + + *press F7 ingame to activate + *premere F7 in gioco per attivare + + + R3 + R3 + + + Options + Opzioni + + + Mouse Movement Parameters + Parametri Movimento Del Mouse + + + note: click Help Button/Special Keybindings for more information + nota: cliccare sul Pulsante Aiuto/Associazioni Speciali dei Tasti per maggiori informazioni + + + Face Buttons + Pulsanti Frontali + + + Triangle + Triangolo + + + Square + Quadrato + + + Circle + Cerchio + + + Cross + Croce + + + Right Analog Halfmode + Mezza Modalità Analogico Destra + + + hold to move right stick at half-speed + tieni premuto per muovere la levetta analogica destra a metà velocità + + + Right Stick + Levetta Destra + + + Speed Offset (def 0.125): + Scostamento Velocità (def 0,125): + + + Copy from Common Config + Copia da Configurazione Comune + + + Deadzone Offset (def 0.50): + Scostamento Zona Morta (def 0,50): + + + Speed Multiplier (def 1.0): + Moltiplicatore Di Velocità (def 1,0): + + + Common Config Selected + Configurazione Comune Selezionata + + + This button copies mappings from the Common Config to the currently selected profile, and cannot be used when the currently selected profile is the Common Config. + Questo pulsante copia le mappature dalla Configurazione Comune al profilo attualmente selezionato, e non può essere usato quando il profilo attualmente selezionato è Configurazione Comune. + + + Copy values from Common Config + Copia valori da Configurazione Comune + + + Do you want to overwrite existing mappings with the mappings from the Common Config? + Vuoi sovrascrivere le mappature esistenti con le mappature dalla Configurazione Comune? + + + Unable to Save + Impossibile Salvare + + + Cannot bind any unique input more than once + Non è possibile associare qualsiasi input univoco più di una volta + + + Press a key + Premi un tasto + + + Cannot set mapping + Impossibile impostare la mappatura + + + Mousewheel cannot be mapped to stick outputs + La rotella del mouse non può essere associata ai comandi della levetta analogica + + + Save + Salva + + + Apply + Applica + + + Restore Defaults + Ripristina Impostazioni Predefinite + + + Cancel + Annulla + + + + MainWindow + + Open/Add Elf Folder + Apri/Aggiungi cartella Elf + + + Boot Game + Avvia Gioco + + + Check for Updates + Controlla aggiornamenti + + + About shadPS4 + Riguardo a shadPS4 + + + Configure... + Configura... + + + Recent Games + Giochi Recenti + + + Open shadPS4 Folder + Apri Cartella shadps4 + + + Exit + Uscita + + + Exit shadPS4 + Esci da shadPS4 + + + Exit the application. + Esci dall'applicazione. + + + Show Game List + Mostra Lista Giochi + + + Game List Refresh + Aggiorna Lista Giochi + + + Tiny + Minuscolo + + + Small + Piccolo + + + Medium + Medio + + + Large + Grande + + + List View + Visualizzazione Lista + + + Grid View + Visualizzazione Griglia + + + Elf Viewer + Visualizzatore Elf + + + Game Install Directory + Cartella Installazione Giochi + + + Download Cheats/Patches + Scarica Trucchi/Patch + + + Dump Game List + Scarica Lista Giochi + + + Trophy Viewer + Visualizzatore Trofei + + + No games found. Please add your games to your library first. + Nessun gioco trovato. Aggiungi prima i tuoi giochi alla tua libreria. + + + Search... + Cerca... + + + File + File + + + View + Visualizza + + + Game List Icons + Icone Lista Giochi + + + Game List Mode + Modalità Lista Giochi + + + Settings + Impostazioni + + + Utils + Utilità + + + Themes + Temi + + + Help + Aiuto + + + Dark + Scuro + + + Light + Chiaro + + + Green + Verde + + + Blue + Blu + + + Violet + Viola + + + toolBar + Barra strumenti + + + Game List + Elenco giochi + + + * Unsupported Vulkan Version + * Versione Vulkan non supportata + + + Download Cheats For All Installed Games + Scarica Trucchi per tutti i giochi installati + + + Download Patches For All Games + Scarica Patch per tutti i giochi + + + Download Complete + Download completato + + + You have downloaded cheats for all the games you have installed. + Hai scaricato trucchi per tutti i giochi installati. + + + Patches Downloaded Successfully! + Patch scaricate con successo! + + + All Patches available for all games have been downloaded. + Tutte le patch disponibili per tutti i giochi sono state scaricate. + + + Games: + Giochi: + + + ELF files (*.bin *.elf *.oelf) + File ELF (*.bin *.elf *.oelf) + + + Game Boot + Avvia Gioco + + + Only one file can be selected! + Si può selezionare solo un file! + + + Run Game + Esegui Gioco + + + Eboot.bin file not found + File Eboot.bin non trovato + + + Game is already running! + Il gioco è già in esecuzione! + + + shadPS4 + shadPS4 + + + Play + Play + + + Pause + Pause + + + Stop + Stop + + + Restart + Restart + + + Full Screen + Full Screen + + + Controllers + Controllers + + + Keyboard + Keyboard + + + Refresh List + Refresh List + + + Resume + Resume + + + Show Labels Under Icons + Show Labels Under Icons + + + + SettingsDialog + + Settings + Impostazioni + + + General + Generale + + + System + Sistema + + + Console Language + Lingua della console + + + Emulator Language + Lingua dell'emulatore + + + Emulator + Emulatore + + + Enable Separate Update Folder + Abilita Cartella Aggiornamenti Separata + + + Default tab when opening settings + Scheda predefinita all'apertura delle impostazioni + + + Show Game Size In List + Mostra la dimensione del gioco nell'elenco + + + Show Splash + Mostra Schermata Iniziale + + + Enable Discord Rich Presence + Abilita Discord Rich Presence + + + Username + Nome Utente + + + Trophy Key + Chiave Trofei + + + Trophy + Trofei + + + Open the custom trophy images/sounds folder + Apri la cartella personalizzata delle immagini/suoni dei trofei + + + Logger + Registro + + + Log Type + Tipo di Log + + + Log Filter + Filtro Log + + + Open Log Location + Apri posizione del registro + + + Input + Input + + + Cursor + Cursore + + + Hide Cursor + Nascondi Cursore + + + Hide Cursor Idle Timeout + Timeout inattività per nascondere il cursore + + + s + s + + + Controller + Controller + + + Back Button Behavior + Comportamento del pulsante Indietro + + + Graphics + Grafica + + + GUI + Interfaccia + + + User + Utente + + + Graphics Device + Scheda Grafica + + + Vblank Divider + Divisore Vblank + + + Advanced + Avanzate + + + Enable Shaders Dumping + Abilita Dump Shader + + + Enable NULL GPU + Abilita NULL GPU + + + Enable HDR + Abilita HDR + + + Paths + Percorsi + + + Game Folders + Cartelle di gioco + + + Add... + Aggiungi... + + + Remove + Rimuovi + + + Debug + Debug + + + Enable Debug Dumping + Abilita Debug Dumping + + + Enable Vulkan Validation Layers + Abilita Vulkan Validation Layers + + + Enable Vulkan Synchronization Validation + Abilita Vulkan Synchronization Validation + + + Enable RenderDoc Debugging + Abilita RenderDoc Debugging + + + Enable Crash Diagnostics + Abilita Diagnostica Crash + + + Collect Shaders + Raccogli Shaders + + + Copy GPU Buffers + Copia Buffer GPU + + + Host Debug Markers + Marcatori di Debug dell'Host + + + Guest Debug Markers + Marcatori di Debug del Guest + + + Update + Aggiornamento + + + Check for Updates at Startup + Verifica aggiornamenti all’avvio + + + Always Show Changelog + Mostra sempre il changelog + + + Update Channel + Canale di Aggiornamento + + + Check for Updates + Controlla aggiornamenti + + + GUI Settings + Impostazioni GUI + + + Title Music + Musica del Titolo + + + Disable Trophy Notification + Disabilita Notifiche Trofei + + + Background Image + Immagine di Sfondo + + + Show Background Image + Mostra l'Immagine dello Sfondo + + + Opacity + Opacità + + + Play title music + Riproduci musica del titolo + + + Update Compatibility Database On Startup + Aggiorna Database Compatibilità all'Avvio + + + Game Compatibility + Compatibilità Gioco + + + Display Compatibility Data + Mostra Dati Compatibilità + + + Update Compatibility Database + Aggiorna Database Compatibilità + + + Volume + Volume + + + Save + Salva + + + Apply + Applica + + + Restore Defaults + Ripristina Impostazioni Predefinite + + + Close + Chiudi + + + Point your mouse at an option to display its description. + Sposta il mouse su un'opzione per visualizzarne la descrizione. + + + Console Language:\nSets the language that the PS4 game uses.\nIt's recommended to set this to a language the game supports, which will vary by region. + Lingua della Console:\nImposta la lingua utilizzata dal gioco PS4.\nÈ consigliabile impostare questa su una lingua supportata dal gioco, che può variare a seconda della regione. + + + Emulator Language:\nSets the language of the emulator's user interface. + Lingua dell'Emulatore:\nImposta la lingua dell'interfaccia utente dell'emulatore. + + + Enable Separate Update Folder:\nEnables installing game updates into a separate folder for easy management.\nThis can be manually created by adding the extracted update to the game folder with the name "CUSA00000-UPDATE" where the CUSA ID matches the game's ID. + Abilita Cartella Aggiornamenti Separata:\nAbilita l'installazione degli aggiornamenti in una cartella separata per una più facile gestione. + + + Show Splash Screen:\nShows the game's splash screen (a special image) while the game is starting. + Mostra Schermata di Avvio:\nMostra la schermata di avvio del gioco (un'immagine speciale) mentre il gioco si sta avviando. + + + Enable Discord Rich Presence:\nDisplays the emulator icon and relevant information on your Discord profile. + Abilita Discord Rich Presence:\nMostra l'icona dell'emulatore e informazioni pertinenti sul tuo profilo Discord. + + + Username:\nSets the PS4's account username, which may be displayed by some games. + Nome Utente:\nImposta il nome utente dell'account PS4, che potrebbe essere visualizzato da alcuni giochi. + + + Trophy Key:\nKey used to decrypt trophies. Must be obtained from your jailbroken console.\nMust contain only hex characters. + Chiave Trofei:\nChiave utilizzata per la decrittazione dei trofei. Deve essere estratta dalla vostra console con jailbreak.\nDeve contenere solo caratteri esadecimali. + + + Log Type:\nSets whether to synchronize the output of the log window for performance. May have adverse effects on emulation. + Tipo di Log:\nImposta se sincronizzare l'output della finestra di log per le prestazioni. Potrebbe avere effetti avversi sull'emulazione. + + + Log Filter:\nFilters the log to only print specific information.\nExamples: "Core:Trace" "Lib.Pad:Debug Common.Filesystem:Error" "*:Critical"\nLevels: Trace, Debug, Info, Warning, Error, Critical - in this order, a specific level silences all levels preceding it in the list and logs every level after it. + Filtro Log:\nFiltra il log per stampare solo informazioni specifiche.\nEsempi: "Core:Trace" "Lib.Pad:Debug Common.Filesystem:Error" "*:Critical" Livelli: Trace, Debug, Info, Warning, Error, Critical - in questo ordine, un livello specifico silenzia tutti i livelli precedenti nell'elenco e registra ogni livello successivo. + + + Update:\nRelease: Official versions released every month that may be very outdated, but are more reliable and tested.\nNightly: Development versions that have all the latest features and fixes, but may contain bugs and are less stable. + Aggiornamento:\nRilascio: Versioni ufficiali rilasciate ogni mese che possono essere molto obsolete, ma sono più affidabili e testati.\nNotturno: Le versioni di sviluppo che hanno tutte le ultime funzionalità e correzioni, ma possono contenere bug e sono meno stabili. + + + Background Image:\nControl the opacity of the game background image. + Immagine di sfondo:\nControlla l'opacità dell'immagine di sfondo del gioco. + + + Play Title Music:\nIf a game supports it, enable playing special music when selecting the game in the GUI. + Riproduci Musica del Titolo:\nSe un gioco lo supporta, attiva la riproduzione di musica speciale quando selezioni il gioco nell'interfaccia grafica. + + + Disable Trophy Pop-ups:\nDisable in-game trophy notifications. Trophy progress can still be tracked using the Trophy Viewer (right-click the game in the main window). + Disabilita Notifica Trofei:\nDisabilita notifiche in gioco dei trofei. Il progresso dei Trofei può ancora essere controllato con il Visualizzatore Trofei (clicca tasto destro sul gioco nella finestra principale). + + + Hide Cursor:\nChoose when the cursor will disappear:\nNever: You will always see the mouse.\nidle: Set a time for it to disappear after being idle.\nAlways: you will never see the mouse. + Nascondi cursore:\nScegli quando il cursore scomparirà:\nMai: Vedrai sempre il mouse.\nInattivo: Imposta un tempo per farlo scomparire dopo essere stato inattivo.\nSempre: non vedrai mai il mouse. + + + Hide Idle Cursor Timeout:\nThe duration (seconds) after which the cursor that has been idle hides itself. + Imposta un tempo affinché il mouse scompaia dopo essere stato inattivo. + + + Back Button Behavior:\nSets the controller's back button to emulate tapping the specified position on the PS4 touchpad. + Comportamento del pulsante Indietro:\nImposta il pulsante Indietro del controller per emulare il tocco sulla posizione specificata sul touchpad PS4. + + + Display Compatibility Data:\nDisplays game compatibility information in table view. Enable "Update Compatibility On Startup" to get up-to-date information. + Mostra Dati Compatibilità:\nMostra informazioni sulla compatibilità del gioco nella visualizzazione lista. Abilita "Aggiorna Compatiblità all'Avvio" per ottenere informazioni aggiornate. + + + Update Compatibility On Startup:\nAutomatically update the compatibility database when shadPS4 starts. + Aggiorna Compatibilità all'Avvio:\nAggiorna automaticamente il database della compatibilità quando si avvia shadps4. + + + Update Compatibility Database:\nImmediately update the compatibility database. + Aggiorna Database Compatibilità:\nAggiorna immediatamente il database di compatibilità. + + + Never + Mai + + + Idle + Inattivo + + + Always + Sempre + + + Touchpad Left + Touchpad Sinistra + + + Touchpad Right + Touchpad Destra + + + Touchpad Center + Centro del Touchpad + + + None + Nessuno + + + Graphics Device:\nOn multiple GPU systems, select the GPU the emulator will use from the drop down list,\nor select "Auto Select" to automatically determine it. + Dispositivo Grafico:\nIn sistemi con più GPU, seleziona la GPU che l'emulatore utilizzerà dall'elenco a discesa,\no seleziona "Selezione Automatica" per determinarlo automaticamente. + + + Width/Height:\nSets the size of the emulator window at launch, which can be resized during gameplay.\nThis is different from the in-game resolution. + Larghezza/Altezza:\nImposta la dimensione della finestra dell'emulatore all'avvio, che può essere ridimensionata durante il gioco.\nQuesto è diverso dalla risoluzione in gioco. + + + Vblank Divider:\nThe frame rate at which the emulator refreshes at is multiplied by this number. Changing this may have adverse effects, such as increasing the game speed, or breaking critical game functionality that does not expect this to change! + Divisore Vblank:\nIl frame rate con cui l'emulatore si aggiorna viene moltiplicato per questo numero. Cambiare questo potrebbe avere effetti avversi, come aumentare la velocità del gioco o rompere funzionalità critiche del gioco che non si aspettano questa modifica! + + + Enable Shaders Dumping:\nFor the sake of technical debugging, saves the games shaders to a folder as they render. + Abilita Pompaggio Shader:\nPer scopi di debug tecnico, salva gli shader dei giochi in una cartella mentre vengono resi. + + + Enable Null GPU:\nFor the sake of technical debugging, disables game rendering as if there were no graphics card. + Abilita GPU Null:\nPer scopi di debug tecnico, disabilita il rendering del gioco come se non ci fosse alcuna scheda grafica. + + + Enable HDR:\nEnables HDR in games that support it.\nYour monitor must have support for the BT2020 PQ color space and the RGB10A2 swapchain format. + Abilita HDR:\nAbilita HDR nei giochi che lo supportano.\nIl tuo monitor deve avere il supporto per lo spazio colore BT2020 PQ e il formato swapchain RGB10A2. + + + Game Folders:\nThe list of folders to check for installed games. + Cartelle di Gioco:\nL'elenco delle cartelle da controllare per i giochi installati. + + + Add:\nAdd a folder to the list. + Aggiungi:\nAggiungi una cartella all'elenco. + + + Remove:\nRemove a folder from the list. + Rimuovi:\nRimuovi una cartella dall'elenco. + + + Enable Debug Dumping:\nSaves the import and export symbols and file header information of the currently running PS4 program to a directory. + Abilita Pompaggio di Debug:\nSalva i simboli di importazione ed esportazione e le informazioni sull'intestazione del file del programma PS4 attualmente in esecuzione in una directory. + + + Enable Vulkan Validation Layers:\nEnables a system that validates the state of the Vulkan renderer and logs information about its internal state.\nThis will reduce performance and likely change the behavior of emulation. + Abilita Strati di Validazione Vulkan:\nAbilita un sistema che convalida lo stato del renderer Vulkan e registra informazioni sul suo stato interno. Ciò ridurrà le prestazioni e probabilmente cambierà il comportamento dell'emulazione. + + + Enable Vulkan Synchronization Validation:\nEnables a system that validates the timing of Vulkan rendering tasks.\nThis will reduce performance and likely change the behavior of emulation. + Abilita Validazione della Sincronizzazione Vulkan:\nAbilita un sistema che convalida il timing delle attività di rendering Vulkan. Ciò ridurrà le prestazioni e probabilmente cambierà il comportamento dell'emulazione. + + + Enable RenderDoc Debugging:\nIf enabled, the emulator will provide compatibility with Renderdoc to allow capture and analysis of the currently rendered frame. + Abilita Debugging RenderDoc:\nSe abilitato, l'emulatore fornirà compatibilità con Renderdoc per consentire la cattura e l'analisi del frame attualmente reso. + + + Collect Shaders:\nYou need this enabled to edit shaders with the debug menu (Ctrl + F10). + Raccogli Shader:\nBisogna attivare questa opzione per poter modificare gli shader nel menu di debug (Ctrl + F10). + + + Crash Diagnostics:\nCreates a .yaml file with info about the Vulkan state at the time of crashing.\nUseful for debugging 'Device lost' errors. If you have this enabled, you should enable Host AND Guest Debug Markers.\nDoes not work on Intel GPUs.\nYou need Vulkan Validation Layers enabled and the Vulkan SDK for this to work. + Diagnostica Crash:\nCrea un file .yaml che contiene informazioni riguardo lo stato del renderer Vulkan nel momento in cui si verifica un crash.\nUtile per poter effettuare il debug degli errori di tipo "Device Lost". Se hai questa opzione attiva dovresti abilitare anche Marcatori di Debug Host e Guest.\nNon è funzionante su GPU Intel.\nVulkan Validation Layers deve essere abilitato e bisogna aver installato l'SDK Vulkan per poter utilizzare questa funzione. + + + Copy GPU Buffers:\nGets around race conditions involving GPU submits.\nMay or may not help with PM4 type 0 crashes. + Copia Buffer GPU:\nCerca di aggirare le race conditions che riguardano gli invii alla GPU.\nPotrebbe aiutare ad evitare crash che riguardano i PM4 di tipo 0. + + + Host Debug Markers:\nInserts emulator-side information like markers for specific AMDGPU commands around Vulkan commands, as well as giving resources debug names.\nIf you have this enabled, you should enable Crash Diagnostics.\nUseful for programs like RenderDoc. + Marcatori di Debug dell'Host:\nInserisce nel log informazioni ottenute dall'emulatore come ad esempio marcatori per comandi specifici AMDGPU quando si hanno comandi Vulkan e associa nomi di debug per le risorse.\nSe hai questa opzione abilitata dovresti abilitare anche Diagnostica Crash.\nUtile per programmi come RenderDoc. + + + Guest Debug Markers:\nInserts any debug markers the game itself has added to the command buffer.\nIf you have this enabled, you should enable Crash Diagnostics.\nUseful for programs like RenderDoc. + Marcatori di Debug del Guest:\nInserisce nel log marcatori di debug che il gioco stesso ha aggiunto al buffer dei comandi.\nSe hai abilitato questa opzione dovresti abilitare anche Diagnostica Crash.\nUtile per programmi come RenderDoc. + + + Save Data Path:\nThe folder where game save data will be saved. + Percorso Dati Salvataggio:\n La cartella dove verranno archiviati i salvataggi di gioco. + + + Browse:\nBrowse for a folder to set as the save data path. + Esplora:\nEsplora una cartella da impostare come percorso dati di salvataggio. + + + Release + Rilascio + + + Nightly + Nightly + + + Set the volume of the background music. + Imposta il volume della musica di sottofondo. + + + Enable Motion Controls + Abilita Controlli Di Movimento + + + Save Data Path + Percorso Dati Salvataggio + + + Browse + Sfoglia + + + async + Non sincronizzato + + + sync + Sincronizzato + + + Auto Select + Selezione Automatica + + + Directory to install games + Cartella di installazione dei giochi + + + Directory to save data + Cartella per salvare i dati + + + Video + Video + + + Display Mode + Modalità di visualizzazione + + + Windowed + In finestra + + + Fullscreen + Schermo Intero + + + Fullscreen (Borderless) + Schermo Intero (Senza Bordi) + + + Window Size + Dimensione Finestra + + + W: + L: + + + H: + A: + + + Separate Log Files + File Di Registro Separati + + + Separate Log Files:\nWrites a separate logfile for each game. + File di registro separati:\nScrive un file di registro separato per ogni gioco. + + + Trophy Notification Position + Posizione Notifica Trofei + + + Left + Sinistra + + + Right + Destra + + + Top + In alto + + + Bottom + In basso + + + Notification Duration + Durata Notifica + + + Portable User Folder + Cartella Utente Portatile + + + Create Portable User Folder from Common User Folder + Crea una Cartella Utente Portatile dalla Cartella Comune Utente + + + Portable user folder:\nStores shadPS4 settings and data that will be applied only to the shadPS4 build located in the current folder. Restart the app after creating the portable user folder to begin using it. + Cartella utente portatile:\nMemorizza le impostazioni e i dati shadPS4 che saranno applicati solo alla build shadPS4 situata nella cartella attuale. Riavviare l'applicazione dopo aver creato la cartella utente portatile per iniziare a usarla. + + + Cannot create portable user folder + Impossibile creare la cartella utente portatile + + + %1 already exists + %1: esiste già + + + Portable user folder created + Cartella utente portatile creata + + + %1 successfully created. + %1 creato con successo. + + + Open the custom trophy images/sounds folder:\nYou can add custom images to the trophies and an audio.\nAdd the files to custom_trophy with the following names:\ntrophy.wav OR trophy.mp3, bronze.png, gold.png, platinum.png, silver.png\nNote: The sound will only work in QT versions. + Apri la cartella personalizzata delle immagini/suoni trofei:\nÈ possibile aggiungere immagini personalizzate ai trofei e un audio.\nAggiungi i file a custom_trophy con i seguenti nomi:\ntrophy.wav OPPURE trophy.mp3, bronze.png, gold.png, platinum.png, silver.png\nNota: Il suono funzionerà solo nelle versioni QT. + + + + TrophyViewer + + Trophy Viewer + Visualizzatore Trofei + + + Select Game: + Seleziona Gioco: + + + Progress + Progresso + + + Show Earned Trophies + Mostra Trofei Guadagnati + + + Show Not Earned Trophies + Mostra Trofei Non Guadagnati + + + Show Hidden Trophies + Mostra Trofei Nascosti + + + diff --git a/src/qt_gui/translations/ja_JP.ts b/src/qt_gui/translations/ja_JP.ts index 409900ade..d4b8fa5b7 100644 --- a/src/qt_gui/translations/ja_JP.ts +++ b/src/qt_gui/translations/ja_JP.ts @@ -1,1664 +1,2089 @@ + - - - - AboutDialog - - - About shadPS4 - shadPS4について - - - - shadPS4 - shadPS4 - - - - 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. - このソフトウェアは、合法的に入手していないゲームをプレイするために使用するものではありません。 - - - - ElfViewer - - - Open Folder - フォルダを開く - - - - GameInfoClass - - - Loading game list, please wait :3 - ゲームリストを読み込み中です。お待ちください :3 - - - - Cancel - キャンセル - - - - Loading... - 読み込み中... - - - - InstallDirSelect - - - shadPS4 - Choose directory - shadPS4 - ディレクトリを選択 - - - - Select which directory you want to install to. - Select which directory you want to install to. - - - - GameInstallDialog - - - shadPS4 - Choose directory - shadPS4 - ディレクトリを選択 - - - - Directory to install games - ゲームをインストールするディレクトリ - - - - Browse - 参照 - - - - Error - エラー - - - - The value for location to install games is not valid. - ゲームをインストールする場所が無効です。 - - - - GuiContextMenus - - - Create Shortcut - ショートカットを作成 - - - - Cheats / Patches - チート / パッチ - - - - SFO Viewer - SFOビューワー - - - - Trophy Viewer - トロフィービューワー - - - - Open Folder... - フォルダを開く... - - - - Open Game Folder - ゲームフォルダを開く - - - - Open Save Data Folder - セーブデータフォルダを開く - - - - Open Log Folder - ログフォルダを開く - - - - Copy info... - 情報をコピー... - - - - Copy Name - 名前をコピー - - - - Copy Serial - シリアルをコピー - - - - Copy All - すべてコピー - - - - Delete... - Delete... - - - - Delete Game - Delete Game - - - - Delete Update - Delete Update - - - - Delete DLC - Delete DLC - - - - Compatibility... - Compatibility... - - - - Update database - Update database - - - - View report - View report - - - - Submit a report - Submit a report - - - - Shortcut creation - ショートカットの作成 - - - - Shortcut created successfully! - ショートカットが正常に作成されました! - - - - Error - エラー - - - - Error creating shortcut! - ショートカットの作成に失敗しました! - - - - Install PKG - PKGをインストール - - - - Game - Game - - - - requiresEnableSeparateUpdateFolder_MSG - This feature requires the 'Enable Separate Update Folder' config option to work. If you want to use this feature, please enable it. - - - - This game has no update to delete! - This game has no update to delete! - - - - Update - Update - - - - This game has no DLC to delete! - This game has no DLC to delete! - - - - DLC - DLC - - - - Delete %1 - Delete %1 - - - - Are you sure you want to delete %1's %2 directory? - Are you sure you want to delete %1's %2 directory? - - - - MainWindow - - - Open/Add Elf Folder - Elfフォルダを開く/追加する - - - - Install Packages (PKG) - パッケージをインストール (PKG) - - - - Boot Game - ゲームを起動 - - - - Check for Updates - 更新を確認する - - - - About shadPS4 - shadPS4について - - - - Configure... - 設定... - - - - Install application from a .pkg file - .pkgファイルからアプリケーションをインストールする - - - - Recent Games - 最近のゲーム - - - - Exit - 終了 - - - - Exit shadPS4 - shadPS4を終了 - - - - Exit the application. - アプリケーションを終了します。 - - - - Show Game List - ゲームリストを表示 - - - - Game List Refresh - ゲームリストの更新 - - - - Tiny - 極小 - - - - Small - - - - - Medium - - - - - Large - - - - - List View - リストビュー - - - - Grid View - グリッドビュー - - - - Elf Viewer - Elfビュワー - - - - Game Install Directory - ゲームインストールディレクトリ - - - - Download Cheats/Patches - チート / パッチをダウンロード - - - - Dump Game List - ゲームリストをダンプ - - - - PKG Viewer - PKGビューアー - - - - Search... - 検索... - - - - File - ファイル - - - - View - 表示 - - - - Game List Icons - ゲームリストアイコン - - - - Game List Mode - ゲームリストモード - - - - Settings - 設定 - - - - Utils - ユーティリティ - - - - Themes - テーマ - - - - Help - ヘルプ - - - - Dark - ダーク - - - - Light - ライト - - - - Green - グリーン - - - - Blue - ブルー - - - - Violet - バイオレット - - - - toolBar - ツールバー - - - - PKGViewer - - - Open Folder - フォルダーを開く - - - - TrophyViewer - - - Trophy Viewer - トロフィービューアー - - - - SettingsDialog - - - Settings - 設定 - - - - General - 一般 - - - - System - システム - - - - Console Language - コンソール言語 - - - - Emulator Language - エミュレーター言語 - - - - Emulator - エミュレーター - - - - Enable Fullscreen - フルスクリーンを有効にする - - - - Enable Separate Update Folder - Enable Separate Update Folder - - - - Show Splash - スプラッシュを表示する - - - - Is PS4 Pro - PS4 Proモード - - - - Enable Discord Rich Presence - Discord Rich Presenceを有効にする - - - - Username - ユーザー名 - - - - Trophy Key - Trophy Key - - - - Trophy - Trophy - - - - Logger - ロガー - - - - Log Type - ログタイプ - - - - Log Filter - ログフィルター - - - - Input - 入力 - - - - Cursor - カーソル - - - - Hide Cursor - カーソルを隠す - - - - Hide Cursor Idle Timeout - カーソル非アクティブタイムアウト - - - - s - s - - - - Controller - コントローラー - - - - Back Button Behavior - 戻るボタンの動作 - - - - Graphics - グラフィックス - - - - Graphics Device - グラフィックスデバイス - - - - Width - - - - - Height - 高さ - - - - Vblank Divider - Vblankディバイダー - - - - Advanced - 高度な設定 - - - - Enable Shaders Dumping - シェーダーのダンプを有効にする - - - - Enable NULL GPU - NULL GPUを有効にする - - - - Paths - パス - - - - Game Folders - ゲームフォルダ - - - - Add... - 追加... - - - - Remove - 削除 - - - - Debug - デバッグ - - - - Enable Debug Dumping - デバッグダンプを有効にする - - - - Enable Vulkan Validation Layers - Vulkan検証レイヤーを有効にする - - - - Enable Vulkan Synchronization Validation - Vulkan同期検証を有効にする - - - - Enable RenderDoc Debugging - RenderDocデバッグを有効にする - - - - Update - 更新 - - - - Check for Updates at Startup - 起動時に更新確認 - - - - Update Channel - アップデートチャネル - - - - Check for Updates - 更新を確認 - - - - GUI Settings - GUI設定 - - - - Disable Trophy Pop-ups - Disable Trophy Pop-ups - - - - Play title music - タイトル音楽を再生する - - - - Update Compatibility Database On Startup - Update Compatibility Database On Startup - - - - Game Compatibility - Game Compatibility - - - - Display Compatibility Data - Display Compatibility Data - - - - Update Compatibility Database - Update Compatibility Database - - - - Volume - 音量 - - - - Audio Backend - Audio Backend - - - - MainWindow - - - Game List - ゲームリスト - - - - * 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! - パッチが検出されました! - - - - PKG and Game versions match: - PKGとゲームのバージョンが一致しています: - - - - Would you like to overwrite? - 上書きしてもよろしいですか? - - - - PKG Version %1 is older than installed version: - PKGバージョン %1 はインストールされているバージョンよりも古いです: - - - - Game is installed: - ゲームはインストール済みです: - - - - Would you like to install Patch: - パッチをインストールしてもよろしいですか: - - - - DLC Installation - DLCのインストール - - - - Would you like to install DLC: %1? - DLCをインストールしてもよろしいですか: %1? - - - - DLC already installed: - DLCはすでにインストールされています: - - - - Game already installed - ゲームはすでにインストールされています - - - - 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 for - Cheats / Patches for - - - - 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ページの取得に失敗しました。 - - - - The game is in version: %1 - ゲームのバージョン: %1 - - - - The downloaded patch only works on version: %1 - ダウンロードしたパッチはバージョン: %1 のみ機能します - - - - You may need to update your game. - ゲームを更新する必要があるかもしれません。 - - - - Incompatibility Notice - 互換性のない通知 - - - - 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: - 名前: - - - - Can't apply cheats before the game is started - ゲームが開始される前にチートを適用することはできません。 - - - - SettingsDialog - - - Save - 保存 - - - - Apply - 適用 - - - - Restore Defaults - デフォルトに戻す - - - - Close - 閉じる - - - - Point your mouse at an option to display its description. - オプションにマウスをポイントすると、その説明が表示されます。 - - - - consoleLanguageGroupBox - コンソール言語:\nPS4ゲームが使用する言語を設定します。\nこれはゲームがサポートする言語に設定することをお勧めしますが、地域によって異なる場合があります。 - - - - emulatorLanguageGroupBox - エミュレーター言語:\nエミュレーターのユーザーインターフェースの言語を設定します。 - - - - fullscreenCheckBox - 全画面モードを有効にする:\nゲームウィンドウを自動的に全画面モードにします。\nF11キーを押すことで切り替えることができます。 - - - - separateUpdatesCheckBox - Enable Separate Update Folder:\nEnables installing game updates into a separate folder for easy management. - - - - showSplashCheckBox - スプラッシュスクリーンを表示:\nゲーム起動中にゲームのスプラッシュスクリーン(特別な画像)を表示します。 - - - - ps4proCheckBox - PS4 Proです:\nエミュレーターがPS4 PROとして動作するようにし、これをサポートするゲームで特別な機能を有効にする場合があります。 - - - - discordRPCCheckbox - Discord Rich Presenceを有効にする:\nエミュレーターのアイコンと関連情報をDiscordプロフィールに表示します。 - - - - userName - ユーザー名:\nPS4のアカウントユーザー名を設定します。これは、一部のゲームで表示される場合があります。 - - - - TrophyKey - Trophy Key:\nKey used to decrypt trophies. Must be obtained from your jailbroken console.\nMust contain only hex characters. - - - - logTypeGroupBox - ログタイプ:\nパフォーマンスのためにログウィンドウの出力を同期させるかどうかを設定します。エミュレーションに悪影響を及ぼす可能性があります。 - - - - logFilter - ログフィルター:\n特定の情報のみを印刷するようにログをフィルタリングします。\n例: "Core:Trace" "Lib.Pad:Debug Common.Filesystem:Error" "*:Critical" レベル: Trace, Debug, Info, Warning, Error, Critical - この順序で、特定のレベルはリスト内のすべての前のレベルをサイレンスし、その後のすべてのレベルをログに記録します。 - - - - updaterGroupBox - 更新:\nRelease: 非常に古いかもしれないが、より信頼性が高くテスト済みの公式バージョンを毎月リリースします。\nNightly: 最新の機能と修正がすべて含まれていますが、バグが含まれている可能性があり、安定性は低いです。 - - - - GUIgroupBox - タイトルミュージックを再生:\nゲームがそれをサポートしている場合、GUIでゲームを選択したときに特別な音楽を再生することを有効にします。 - - - - disableTrophycheckBox - Disable Trophy Pop-ups:\nDisable in-game trophy notifications. Trophy progress can still be tracked using the Trophy Viewer (right-click the game in the main window). - - - - hideCursorGroupBox - カーソルを隠す:\nカーソルが消えるタイミングを選択してください:\n決して: いつでもマウスが見えます。\nアイドル: アイダルの後に消えるまでの時間を設定します。\n常に: マウスは決して見えません。 - - - - idleTimeoutGroupBox - アイドル後にマウスが消えるまでの時間を設定します。 - - - - backButtonBehaviorGroupBox - 戻るボタンの動作:\nコントローラーの戻るボタンを、PS4のタッチパッドの指定された位置をタッチするように設定します。 - - - - enableCompatibilityCheckBox - Display Compatibility Data:\nDisplays game compatibility information in table view. Enable "Update Compatibility On Startup" to get up-to-date information. - - - - checkCompatibilityOnStartupCheckBox - Update Compatibility On Startup:\nAutomatically update the compatibility database when shadPS4 starts. - - - - updateCompatibilityButton - Update Compatibility Database:\nImmediately update the compatibility database. - - - - Never - 決して - - - - Idle - アイドル - - - - Always - 常に - - - - Touchpad Left - タッチパッド左 - - - - Touchpad Right - タッチパッド右 - - - - Touchpad Center - タッチパッド中央 - - - - None - なし - - - - graphicsAdapterGroupBox - グラフィックデバイス:\n複数のGPUシステムで、ドロップダウンリストからエミュレーターで使用するGPUを選択するか、\n「自動選択」を選択して自動的に決定します。 - - - - resolutionLayout - 幅/高さ:\n起動時にエミュレーターウィンドウのサイズを設定します。ゲーム中にサイズ変更できます。\nこれはゲーム内の解像度とは異なります。 - - - - heightDivider - Vblankディバイダー:\nエミュレーターが更新されるフレームレートにこの数を掛けます。これを変更すると、ゲームの速度が上がったり、想定外の変更がある場合、ゲームの重要な機能が壊れる可能性があります! - - - - dumpShadersCheckBox - シェーダーダンプを有効にする:\n技術的なデバッグの目的で、レンダリング中にゲームのシェーダーをフォルダーに保存します。 - - - - nullGpuCheckBox - Null GPUを有効にする:\n技術的なデバッグの目的で、グラフィックスカードがないかのようにゲームのレンダリングを無効にします。 - - - - gameFoldersBox - ゲームフォルダ:\nインストールされたゲームを確認するためのフォルダのリスト。 - - - - addFolderButton - 追加:\nリストにフォルダを追加します。 - - - - removeFolderButton - 削除:\nリストからフォルダを削除します。 - - - - debugDump - デバッグダンプを有効にする:\n現在実行中のPS4プログラムのインポートおよびエクスポートシンボルとファイルヘッダー情報をディレクトリに保存します。 - - - - vkValidationCheckBox - Vulkanバリデーションレイヤーを有効にする:\nVulkanのレンダリングステータスを検証し、内部状態に関する情報をログに記録するシステムを有効にします。これによりパフォーマンスが低下し、エミュレーションの動作が変わる可能性があります。 - - - - vkSyncValidationCheckBox - Vulkan同期バリデーションを有効にする:\nVulkanのレンダリングタスクのタイミングを検証するシステムを有効にします。これによりパフォーマンスが低下し、エミュレーションの動作が変わる可能性があります。 - - - - rdocCheckBox - RenderDocデバッグを有効にする:\n有効にすると、エミュレーターはRenderdocとの互換性を提供し、現在レンダリング中のフレームのキャプチャと分析を可能にします。 - - - - GameListFrame - - - Icon - アイコン - - - - Name - 名前 - - - - Serial - シリアル - - - - Compatibility - Compatibility - - - - Region - 地域 - - - - Firmware - ファームウェア - - - - Size - サイズ - - - - Version - バージョン - - - - Path - パス - - - - Play Time - プレイ時間 - - - - Never Played - Never Played - - - - h - h - - - - m - m - - - - s - s - - - - Compatibility is untested - Compatibility is untested - - - - Game does not initialize properly / crashes the emulator - Game does not initialize properly / crashes the emulator - - - - Game boots, but only displays a blank screen - Game boots, but only displays a blank screen - - - - Game displays an image but does not go past the menu - Game displays an image but does not go past the menu - - - - Game has game-breaking glitches or unplayable performance - Game has game-breaking glitches or unplayable performance - - - - Game can be completed with playable performance and no major glitches - Game can be completed with playable performance and no major glitches - - - - CheckUpdate - - - Auto Updater - 自動アップデーター - - - - Error - エラー - - - - Network error: - ネットワークエラー: - - - - Failed to parse update information. - アップデート情報の解析に失敗しました。 - - - - No pre-releases found. - プレリリースは見つかりませんでした。 - - - - Invalid release data. - リリースデータが無効です。 - - - - No download URL found for the specified asset. - 指定されたアセットのダウンロードURLが見つかりませんでした。 - - - - Your version is already up to date! - あなたのバージョンはすでに最新です! - - - - Update Available - アップデートがあります - - - - Update Channel - アップデートチャネル - - - - Current Version - 現在のバージョン - - - - Latest Version - 最新バージョン - - - - Do you want to update? - アップデートしますか? - - - - Show Changelog - 変更ログを表示 - - - - Check for Updates at Startup - 起動時に更新確認 - - - - Update - アップデート - - - - No - いいえ - - - - Hide Changelog - 変更ログを隠す - - - - Changes - 変更点 - - - - Network error occurred while trying to access the URL - URLにアクセス中にネットワークエラーが発生しました - - - - Download Complete - ダウンロード完了 - - - - The update has been downloaded, press OK to install. - アップデートがダウンロードされました。インストールするにはOKを押してください。 - - - - Failed to save the update file at - 更新ファイルの保存に失敗しました - - - - Starting Update... - アップデートを開始しています... - - - - Failed to create the update script file - アップデートスクリプトファイルの作成に失敗しました - - - - GameListUtils - - - B - B - - - - KB - KB - - - - MB - MB - - - - GB - GB - - - - TB - TB - - - \ No newline at end of file + + + AboutDialog + + About shadPS4 + shadPS4について + + + 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. + 非正規、非合法のゲームをプレイするためにこのソフトウェアを使用しないでください。 + + + + CheatsPatches + + Cheats / Patches for + のチート/パッチ + + + 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:\n + チート/パッチは実験的です。\n使用には注意してください。\n\nリポジトリを選択し、ダウンロードボタンをクリックしてチートを個別にダウンロードします。\n「Patches」タブでは、すべてのパッチを一度にダウンロードし、使用したいものを選択して選択を保存できます。\n\nチート/パッチは開発を行っていないため、\n問題があればチートの作者に報告してください。\n\n新しいチートを作成しましたか?\n を訪問してください。 + + + 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 + チートが見つかりません + + + 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 + チートが正常にダウンロードされました + + + 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 download: + ダウンロードに失敗しました: + + + Download Complete + ダウンロード完了 + + + 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. If the patch does not appear, it may be that it does not exist for the specific serial and version of the game. + パッチが正常にダウンロードされました! すべてのゲームに利用可能なパッチがダウンロードされました。チートとは異なり、各ゲームごとに個別にダウンロードする必要はありません。 パッチが表示されない場合、特定のシリアル番号とバージョンのゲームには存在しない可能性があります。 + + + Failed to parse JSON data from HTML. + HTMLからJSONデータの解析に失敗しました。 + + + Failed to retrieve HTML page. + HTMLページの取得に失敗しました。 + + + The game is in version: %1 + ゲームのバージョン: %1 + + + The downloaded patch only works on version: %1 + ダウンロードしたパッチはバージョン: %1 のみ機能します + + + You may need to update your game. + ゲームを更新する必要があるかもしれません。 + + + Incompatibility Notice + 互換性のない通知 + + + 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: + 名前: + + + Can't apply cheats before the game is started + ゲームが開始される前にチートを適用することはできません。 + + + Close + 閉じる + + + + CheckUpdate + + Auto Updater + 自動アップデーター + + + Error + エラー + + + Network error: + ネットワークエラー: + + + The Auto Updater allows up to 60 update checks per hour.\nYou have reached this limit. Please try again later. + 自動アップデーターは1時間に最大60回の更新チェックを許可します。\nこの制限に達しました。後でもう一度お試しください。 + + + Failed to parse update information. + アップデート情報の解析に失敗しました。 + + + No pre-releases found. + プレリリースは見つかりませんでした。 + + + Invalid release data. + リリースデータが無効です。 + + + No download URL found for the specified asset. + 指定されたアセットのダウンロードURLが見つかりませんでした。 + + + Your version is already up to date! + あなたのバージョンはすでに最新です! + + + Update Available + アップデートがあります + + + Update Channel + アップデートチャネル + + + Current Version + 現在のバージョン + + + Latest Version + 最新バージョン + + + Do you want to update? + アップデートしますか? + + + Show Changelog + 変更ログを表示 + + + Check for Updates at Startup + 起動時に更新確認 + + + Update + アップデート + + + No + いいえ + + + Hide Changelog + 変更ログを隠す + + + Changes + 変更点 + + + Network error occurred while trying to access the URL + URLにアクセス中にネットワークエラーが発生しました + + + Download Complete + ダウンロード完了 + + + The update has been downloaded, press OK to install. + アップデートがダウンロードされました。インストールするにはOKを押してください。 + + + Failed to save the update file at + 更新ファイルの保存に失敗しました + + + Starting Update... + アップデートを開始しています... + + + Failed to create the update script file + アップデートスクリプトファイルの作成に失敗しました + + + + CompatibilityInfoClass + + Fetching compatibility data, please wait + 互換性データを取得しています。少々お待ちください。 + + + Cancel + キャンセル + + + Loading... + 読み込み中... + + + Error + エラー + + + Unable to update compatibility data! Try again later. + 互換性データを更新できませんでした!後で再試行してください。 + + + Unable to open compatibility_data.json for writing. + compatibility_data.jsonを開いて書き込むことができませんでした。 + + + Unknown + 不明 + + + Nothing + 何もない + + + Boots + ブーツ + + + Menus + メニュー + + + Ingame + ゲーム内 + + + Playable + プレイ可能 + + + + ControlSettings + + Configure Controls + コントロール設定 + + + D-Pad + 十字キー + + + Up + + + + Left + + + + Right + + + + Down + + + + Left Stick Deadzone (def:2 max:127) + 左スティックデッドゾーン(既定:2 最大:127) + + + Left Deadzone + Left Deadzone + + + Left Stick + 左スティック + + + Config Selection + Config Selection + + + Common Config + Common Config + + + Use per-game configs + Use per-game configs + + + L1 / LB + L1 / LB + + + L2 / LT + L2 / LT + + + Back + Back + + + R1 / RB + R1 / RB + + + R2 / RT + R2 / RT + + + L3 + L3 + + + Options / Start + Options / Start + + + R3 + R3 + + + Face Buttons + Face Buttons + + + Triangle / Y + 三角 / Y + + + Square / X + 四角 / X + + + Circle / B + 丸 / B + + + Cross / A + バツ / A + + + Right Stick Deadzone (def:2, max:127) + 右スティックデッドゾーン(既定:2, 最大:127) + + + Right Deadzone + Right Deadzone + + + Right Stick + 右スティック + + + Color Adjustment + Color Adjustment + + + R: + R: + + + G: + G: + + + B: + B: + + + Override Lightbar Color + Override Lightbar Color + + + Override Color + Override Color + + + Unable to Save + Unable to Save + + + Cannot bind axis values more than once + Cannot bind axis values more than once + + + Save + Save + + + Apply + Apply + + + Restore Defaults + Restore Defaults + + + Cancel + Cancel + + + + EditorDialog + + Edit Keyboard + Mouse and Controller input bindings + Edit Keyboard + Mouse and Controller input bindings + + + Use Per-Game configs + Use Per-Game configs + + + Error + Error + + + Could not open the file for reading + Could not open the file for reading + + + Could not open the file for writing + Could not open the file for writing + + + Save Changes + Save Changes + + + Do you want to save changes? + Do you want to save changes? + + + Help + Help + + + Do you want to reset your custom default config to the original default config? + Do you want to reset your custom default config to the original default config? + + + Do you want to reset this config to your custom default config? + Do you want to reset this config to your custom default config? + + + Reset to Default + Reset to Default + + + + ElfViewer + + Open Folder + フォルダを開く + + + + GameInfoClass + + Loading game list, please wait :3 + ゲームリストを読み込み中です。しばらくお待ちください :3 + + + Cancel + キャンセル + + + Loading... + 読み込み中... + + + + GameInstallDialog + + shadPS4 - Choose directory + shadPS4 - ディレクトリを選択 + + + Directory to install games + ゲームをインストールするディレクトリ + + + Browse + 参照 + + + Error + エラー + + + Directory to install DLC + DLCをインストールするディレクトリ + + + + GameListFrame + + Icon + アイコン + + + Name + 名前 + + + Serial + シリアル + + + Compatibility + 互換性 + + + Region + 地域 + + + Firmware + ファームウェア + + + Size + サイズ + + + Version + バージョン + + + Path + パス + + + Play Time + プレイ時間 + + + Never Played + 未プレイ + + + h + 時間 + + + m + + + + s + + + + Compatibility is untested + 互換性は未検証です + + + Game does not initialize properly / crashes the emulator + ゲームが正常に初期化されない/エミュレーターがクラッシュする + + + Game boots, but only displays a blank screen + ゲームは起動しますが、空のスクリーンが表示されます + + + Game displays an image but does not go past the menu + 正常にゲーム画面が表示されますが、メニューから先に進むことができません + + + Game has game-breaking glitches or unplayable performance + ゲームを壊すような不具合や、プレイが不可能なほどのパフォーマンスの問題があります + + + Game can be completed with playable performance and no major glitches + パフォーマンスに問題はなく、大きな不具合なしでゲームをプレイすることができます + + + Click to see details on github + 詳細を見るにはGitHubをクリックしてください + + + Last updated + 最終更新 + + + + GameListUtils + + B + B + + + KB + KB + + + MB + MB + + + GB + GB + + + TB + TB + + + + GuiContextMenus + + Create Shortcut + ショートカットを作成 + + + Cheats / Patches + チート / パッチ + + + SFO Viewer + SFOビューワー + + + Trophy Viewer + トロフィービューワー + + + Open Folder... + フォルダを開く... + + + Open Game Folder + ゲームフォルダを開く + + + Open Save Data Folder + セーブデータフォルダを開く + + + Open Log Folder + ログフォルダを開く + + + Copy info... + 情報をコピー... + + + Copy Name + 名前をコピー + + + Copy Serial + シリアルをコピー + + + Copy Version + バージョンをコピー + + + Copy Size + サイズをコピー + + + Copy All + すべてコピー + + + Delete... + 削除... + + + Delete Game + ゲームを削除 + + + Delete Update + アップデートを削除 + + + Delete DLC + DLCを削除 + + + Delete Trophy + Delete Trophy + + + Compatibility... + 互換性... + + + Update database + データベースを更新 + + + View report + レポートを表示 + + + Submit a report + レポートを送信 + + + Shortcut creation + ショートカットの作成 + + + Shortcut created successfully! + ショートカットが正常に作成されました! + + + Error + エラー + + + Error creating shortcut! + ショートカットの作成に失敗しました! + + + Game + ゲーム + + + This game has no update to delete! + このゲームにはアップデートがないため削除することができません! + + + Update + アップデート + + + This game has no DLC to delete! + このゲームにはDLCがないため削除することができません! + + + DLC + DLC + + + Delete %1 + %1 を削除 + + + Are you sure you want to delete %1's %2 directory? + %1 の %2 ディレクトリを本当に削除しますか? + + + Open Update Folder + アップデートフォルダを開く + + + Delete Save Data + セーブデータを削除 + + + This game has no update folder to open! + このゲームにはアップデートフォルダがありません! + + + No log file found for this game! + No log file found for this game! + + + Failed to convert icon. + アイコンの変換に失敗しました。 + + + This game has no save data to delete! + このゲームには削除するセーブデータがありません! + + + This game has no saved trophies to delete! + This game has no saved trophies to delete! + + + Save Data + Save Data + + + Trophy + Trophy + + + SFO Viewer for + SFO Viewer for + + + + HelpDialog + + Quickstart + Quickstart + + + FAQ + FAQ + + + Syntax + Syntax + + + Special Bindings + Special Bindings + + + Keybindings + Keybindings + + + + KBMSettings + + Configure Controls + Configure Controls + + + D-Pad + D-Pad + + + Up + Up + + + unmapped + unmapped + + + Left + Left + + + Right + Right + + + Down + Down + + + Left Analog Halfmode + Left Analog Halfmode + + + hold to move left stick at half-speed + hold to move left stick at half-speed + + + Left Stick + Left Stick + + + Config Selection + Config Selection + + + Common Config + Common Config + + + Use per-game configs + Use per-game configs + + + L1 + L1 + + + L2 + L2 + + + Text Editor + Text Editor + + + Help + Help + + + R1 + R1 + + + R2 + R2 + + + L3 + L3 + + + Touchpad Click + Touchpad Click + + + Mouse to Joystick + Mouse to Joystick + + + *press F7 ingame to activate + *press F7 ingame to activate + + + R3 + R3 + + + Options + Options + + + Mouse Movement Parameters + Mouse Movement Parameters + + + note: click Help Button/Special Keybindings for more information + note: click Help Button/Special Keybindings for more information + + + Face Buttons + Face Buttons + + + Triangle + Triangle + + + Square + Square + + + Circle + Circle + + + Cross + Cross + + + Right Analog Halfmode + Right Analog Halfmode + + + hold to move right stick at half-speed + hold to move right stick at half-speed + + + Right Stick + Right Stick + + + Speed Offset (def 0.125): + Speed Offset (def 0.125): + + + Copy from Common Config + Copy from Common Config + + + Deadzone Offset (def 0.50): + Deadzone Offset (def 0.50): + + + Speed Multiplier (def 1.0): + Speed Multiplier (def 1.0): + + + Common Config Selected + Common Config Selected + + + This button copies mappings from the Common Config to the currently selected profile, and cannot be used when the currently selected profile is the Common Config. + This button copies mappings from the Common Config to the currently selected profile, and cannot be used when the currently selected profile is the Common Config. + + + Copy values from Common Config + Copy values from Common Config + + + Do you want to overwrite existing mappings with the mappings from the Common Config? + Do you want to overwrite existing mappings with the mappings from the Common Config? + + + Unable to Save + Unable to Save + + + Cannot bind any unique input more than once + Cannot bind any unique input more than once + + + Press a key + Press a key + + + Cannot set mapping + Cannot set mapping + + + Mousewheel cannot be mapped to stick outputs + Mousewheel cannot be mapped to stick outputs + + + Save + Save + + + Apply + Apply + + + Restore Defaults + Restore Defaults + + + Cancel + Cancel + + + + MainWindow + + Open/Add Elf Folder + Elfフォルダを開く/追加する + + + Boot Game + ゲームを起動 + + + Check for Updates + 更新を確認する + + + About shadPS4 + shadPS4について + + + Configure... + 設定... + + + Recent Games + 最近プレイしたゲーム + + + Open shadPS4 Folder + shadPS4フォルダを開く + + + Exit + 終了 + + + Exit shadPS4 + shadPS4を終了 + + + Exit the application. + アプリケーションを終了します。 + + + Show Game List + ゲームリストを表示 + + + Game List Refresh + ゲームリストの更新 + + + Tiny + 最小 + + + Small + + + + Medium + + + + Large + + + + List View + リストビュー + + + Grid View + グリッドビュー + + + Elf Viewer + Elfビューアー + + + Game Install Directory + ゲームインストールディレクトリ + + + Download Cheats/Patches + チート / パッチをダウンロード + + + Dump Game List + ゲームリストをダンプ + + + Trophy Viewer + Trophy Viewer + + + No games found. Please add your games to your library first. + No games found. Please add your games to your library first. + + + Search... + 検索... + + + File + ファイル + + + View + 表示 + + + Game List Icons + ゲームリストアイコン + + + Game List Mode + ゲームリストモード + + + Settings + 設定 + + + Utils + ユーティリティ + + + Themes + テーマ + + + Help + ヘルプ + + + Dark + ダーク + + + Light + ライト + + + Green + グリーン + + + Blue + ブルー + + + Violet + バイオレット + + + toolBar + ツールバー + + + Game List + ゲームリスト + + + * 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: + ゲーム: + + + ELF files (*.bin *.elf *.oelf) + ELFファイル (*.bin *.elf *.oelf) + + + Game Boot + ゲームブート + + + Only one file can be selected! + 1つのファイルしか選択できません! + + + Run Game + ゲームを実行 + + + Eboot.bin file not found + Eboot.bin ファイルが見つかりません + + + Game is already running! + ゲームは既に実行されています! + + + shadPS4 + shadPS4 + + + Play + Play + + + Pause + Pause + + + Stop + Stop + + + Restart + Restart + + + Full Screen + Full Screen + + + Controllers + Controllers + + + Keyboard + Keyboard + + + Refresh List + Refresh List + + + Resume + Resume + + + Show Labels Under Icons + Show Labels Under Icons + + + + SettingsDialog + + Settings + 設定 + + + General + 一般 + + + System + システム + + + Console Language + コンソールの言語 + + + Emulator Language + エミュレーターの言語 + + + Emulator + エミュレーター + + + Enable Separate Update Folder + アップデートフォルダの分離を有効化 + + + Default tab when opening settings + 設定を開くときのデフォルトタブ + + + Show Game Size In List + ゲームサイズをリストに表示 + + + Show Splash + スプラッシュ画面を表示する + + + Enable Discord Rich Presence + Discord Rich Presenceを有効にする + + + Username + ユーザー名 + + + Trophy Key + トロフィーキー + + + Trophy + トロフィー + + + Open the custom trophy images/sounds folder + Open the custom trophy images/sounds folder + + + Logger + ロガー + + + Log Type + ログタイプ + + + Log Filter + ログフィルター + + + Open Log Location + ログの場所を開く + + + Input + 入力 + + + Cursor + カーソル + + + Hide Cursor + カーソルを隠す + + + Hide Cursor Idle Timeout + カーソルを隠すまでの非アクティブ期間 + + + s + s + + + Controller + コントローラー + + + Back Button Behavior + 戻るボタンの動作 + + + Graphics + グラフィックス + + + GUI + インターフェース + + + User + ユーザー + + + Graphics Device + グラフィックスデバイス + + + Vblank Divider + Vblankディバイダー + + + Advanced + 高度な設定 + + + Enable Shaders Dumping + シェーダーのダンプを有効にする + + + Enable NULL GPU + NULL GPUを有効にする + + + Enable HDR + HDRを有効化 + + + Paths + パス + + + Game Folders + ゲームフォルダ + + + Add... + 追加... + + + Remove + 削除 + + + Debug + デバッグ + + + Enable Debug Dumping + デバッグダンプを有効にする + + + Enable Vulkan Validation Layers + Vulkan検証レイヤーを有効にする + + + Enable Vulkan Synchronization Validation + Vulkan同期検証を有効にする + + + Enable RenderDoc Debugging + RenderDocデバッグを有効にする + + + Enable Crash Diagnostics + Enable Crash Diagnostics + + + Collect Shaders + Collect Shaders + + + Copy GPU Buffers + Copy GPU Buffers + + + Host Debug Markers + Host Debug Markers + + + Guest Debug Markers + Guest Debug Markers + + + Update + 更新 + + + Check for Updates at Startup + 起動時に更新確認 + + + Always Show Changelog + 常に変更履歴を表示 + + + Update Channel + アップデートチャネル + + + Check for Updates + 更新を確認 + + + GUI Settings + GUI設定 + + + Title Music + Title Music + + + Disable Trophy Notification + Disable Trophy Notification + + + Background Image + Background Image + + + Show Background Image + Show Background Image + + + Opacity + 透明度 + + + Play title music + タイトル音楽を再生する + + + Update Compatibility Database On Startup + 起動時に互換性データベースを更新する + + + Game Compatibility + ゲームの互換性 + + + Display Compatibility Data + 互換性に関するデータを表示 + + + Update Compatibility Database + 互換性データベースを更新 + + + Volume + 音量 + + + Save + 保存 + + + Apply + 適用 + + + Restore Defaults + デフォルトに戻す + + + Close + 閉じる + + + Point your mouse at an option to display its description. + 設定項目にマウスをホバーすると、説明が表示されます。 + + + Console Language:\nSets the language that the PS4 game uses.\nIt's recommended to set this to a language the game supports, which will vary by region. + コンソールの言語:\nPS4ゲームが使用する言語を設定します。\nゲームでサポートされている言語に設定することをお勧めしますが、地域によって異なる場合があります。 + + + Emulator Language:\nSets the language of the emulator's user interface. + エミュレーターの言語:\nエミュレーターのユーザーインターフェースの言語を設定します。 + + + Enable Separate Update Folder:\nEnables installing game updates into a separate folder for easy management.\nThis can be manually created by adding the extracted update to the game folder with the name "CUSA00000-UPDATE" where the CUSA ID matches the game's ID. + Enable Separate Update Folder:\nゲームのアップデートを別のフォルダにインストールすることで、管理が容易になります。 + + + Show Splash Screen:\nShows the game's splash screen (a special image) while the game is starting. + スプラッシュスクリーンを表示:\nゲーム起動中にゲームのスプラッシュスクリーン(特別な画像)を表示します。 + + + Enable Discord Rich Presence:\nDisplays the emulator icon and relevant information on your Discord profile. + Discord Rich Presenceを有効にする:\nエミュレーターのアイコンと関連情報をDiscordプロフィールに表示します。 + + + Username:\nSets the PS4's account username, which may be displayed by some games. + ユーザー名:\nPS4のアカウントユーザー名を設定します。これは、一部のゲームで表示される場合があります。 + + + Trophy Key:\nKey used to decrypt trophies. Must be obtained from your jailbroken console.\nMust contain only hex characters. + トロフィーキー:\nトロフィーの復号に使用されるキーです。脱獄済みのコンソールから取得することができます。\n16進数のみを受け入れます。 + + + Log Type:\nSets whether to synchronize the output of the log window for performance. May have adverse effects on emulation. + ログタイプ:\nパフォーマンスのためにログウィンドウの出力を同期させるかどうかを設定します。エミュレーションに悪影響を及ぼす可能性があります。 + + + Log Filter:\nFilters the log to only print specific information.\nExamples: "Core:Trace" "Lib.Pad:Debug Common.Filesystem:Error" "*:Critical"\nLevels: Trace, Debug, Info, Warning, Error, Critical - in this order, a specific level silences all levels preceding it in the list and logs every level after it. + ログフィルター:\n特定の情報のみを印刷するようにログをフィルタリングします。\n例: "Core:Trace" "Lib.Pad:Debug Common.Filesystem:Error" "*:Critical" \nレベル: Trace, Debug, Info, Warning, Error, Critical - レベルはこの並び通りに処理され、指定されたレベルより前のレベル ログを抑制し、それ以外のすべてのレベルをログに記録します。 + + + Update:\nRelease: Official versions released every month that may be very outdated, but are more reliable and tested.\nNightly: Development versions that have all the latest features and fixes, but may contain bugs and are less stable. + 更新:\nRelease: 最新の機能を利用できない可能性がありますが、より信頼性が高くテストされた公式バージョンが毎月リリースされます。\nNightly: 最新の機能と修正がすべて含まれていますが、バグが含まれている可能性があり、安定性は低いです。 + + + Background Image:\nControl the opacity of the game background image. + Background Image:\nControl the opacity of the game background image. + + + Play Title Music:\nIf a game supports it, enable playing special music when selecting the game in the GUI. + タイトルミュージックを再生:\nゲームでサポートされている場合に、GUIでゲームを選択したときに特別な音楽を再生する機能を有効にします。 + + + Disable Trophy Pop-ups:\nDisable in-game trophy notifications. Trophy progress can still be tracked using the Trophy Viewer (right-click the game in the main window). + トロフィーのポップアップを無効化:\nゲーム内でのトロフィー通知を無効化します。 トロフィーの進行状況は、トロフィービューアーを使用して確認できます。(メインウィンドウでゲームを右クリック) + + + Hide Cursor:\nChoose when the cursor will disappear:\nNever: You will always see the mouse.\nidle: Set a time for it to disappear after being idle.\nAlways: you will never see the mouse. + カーソルを隠す:\nカーソルが消えるタイミングを選択してください:\n無効: 常にカーソルが表示されます。\n非アクティブ時: カーソルの非アクティブ期間が指定した時間を超えた場合にカーソルを隠します。\n常に: カーソルは常に隠れた状態になります。 + + + Hide Idle Cursor Timeout:\nThe duration (seconds) after which the cursor that has been idle hides itself. + カーソルが非アクティブになってから隠すまでの時間を設定します。 + + + Back Button Behavior:\nSets the controller's back button to emulate tapping the specified position on the PS4 touchpad. + 戻るボタンの動作:\nコントローラーの戻るボタンを、PS4のタッチパッドの指定された位置をタッチするように設定します。 + + + Display Compatibility Data:\nDisplays game compatibility information in table view. Enable "Update Compatibility On Startup" to get up-to-date information. + 互換性に関するデータを表示:\nゲームの互換性に関する情報を表として表示します。常に最新情報を取得したい場合、"起動時に互換性データベースを更新する" を有効化してください。 + + + Update Compatibility On Startup:\nAutomatically update the compatibility database when shadPS4 starts. + 起動時に互換性データベースを更新する:\nshadPS4の起動時に自動で互換性データベースを更新します。 + + + Update Compatibility Database:\nImmediately update the compatibility database. + 互換性データベースを更新する:\n今すぐ互換性データベースを更新します。 + + + Never + 無効 + + + Idle + 非アクティブ時 + + + Always + 常に + + + Touchpad Left + 左タッチパッド + + + Touchpad Right + 右タッチパッド + + + Touchpad Center + タッチパッド中央 + + + None + なし + + + Graphics Device:\nOn multiple GPU systems, select the GPU the emulator will use from the drop down list,\nor select "Auto Select" to automatically determine it. + グラフィックデバイス:\nシステムに複数のGPUが搭載されている場合、ドロップダウンリストからエミュレーターで使用するGPUを選択するか、\n「自動選択」を選択して自動的に決定します。 + + + Width/Height:\nSets the size of the emulator window at launch, which can be resized during gameplay.\nThis is different from the in-game resolution. + 幅/高さ:\n起動時にエミュレーターウィンドウのサイズを設定します。ゲーム中でもサイズを変更することができます。\nこれはゲーム内の解像度とは異なります。 + + + Vblank Divider:\nThe frame rate at which the emulator refreshes at is multiplied by this number. Changing this may have adverse effects, such as increasing the game speed, or breaking critical game functionality that does not expect this to change! + Vblankディバイダー:\nエミュレーターが更新されるフレームレートにこの数を掛けます。これを変更すると、ゲームの速度が上がったり、想定外の変更がある場合、ゲームの重要な機能が壊れる可能性があります! + + + Enable Shaders Dumping:\nFor the sake of technical debugging, saves the games shaders to a folder as they render. + シェーダーダンプを有効にする:\n技術的なデバッグの目的で、レンダリング中にゲームのシェーダーをフォルダーに保存します。 + + + Enable Null GPU:\nFor the sake of technical debugging, disables game rendering as if there were no graphics card. + Null GPUを有効にする:\n技術的なデバッグの目的で、グラフィックスカードがないかのようにゲームのレンダリングを無効にします。 + + + Enable HDR:\nEnables HDR in games that support it.\nYour monitor must have support for the BT2020 PQ color space and the RGB10A2 swapchain format. + Enable HDR:\nEnables HDR in games that support it.\nYour monitor must have support for the BT2020 PQ color space and the RGB10A2 swapchain format. + + + Game Folders:\nThe list of folders to check for installed games. + ゲームフォルダ:\nインストールされたゲームを確認するためのフォルダのリスト。 + + + Add:\nAdd a folder to the list. + 追加:\nリストにフォルダを追加します。 + + + Remove:\nRemove a folder from the list. + 削除:\nリストからフォルダを削除します。 + + + Enable Debug Dumping:\nSaves the import and export symbols and file header information of the currently running PS4 program to a directory. + デバッグダンプを有効にする:\n現在実行中のPS4プログラムのインポートおよびエクスポートシンボルとファイルヘッダー情報をディレクトリに保存します。 + + + Enable Vulkan Validation Layers:\nEnables a system that validates the state of the Vulkan renderer and logs information about its internal state.\nThis will reduce performance and likely change the behavior of emulation. + Vulkanバリデーションレイヤーを有効にする:\nVulkanのレンダリングステータスを検証し、内部状態に関する情報をログに記録するシステムを有効にします。これによりパフォーマンスが低下し、エミュレーションの動作が変わる可能性があります。 + + + Enable Vulkan Synchronization Validation:\nEnables a system that validates the timing of Vulkan rendering tasks.\nThis will reduce performance and likely change the behavior of emulation. + Vulkan同期バリデーションを有効にする:\nVulkanのレンダリングタスクのタイミングを検証するシステムを有効にします。これによりパフォーマンスが低下し、エミュレーションの動作が変わる可能性があります。 + + + Enable RenderDoc Debugging:\nIf enabled, the emulator will provide compatibility with Renderdoc to allow capture and analysis of the currently rendered frame. + RenderDocデバッグを有効にする:\n有効にすると、エミュレーターはRenderdocとの互換性を提供し、現在レンダリング中のフレームのキャプチャと分析を可能にします。 + + + Collect Shaders:\nYou need this enabled to edit shaders with the debug menu (Ctrl + F10). + Collect Shaders:\nYou need this enabled to edit shaders with the debug menu (Ctrl + F10). + + + Crash Diagnostics:\nCreates a .yaml file with info about the Vulkan state at the time of crashing.\nUseful for debugging 'Device lost' errors. If you have this enabled, you should enable Host AND Guest Debug Markers.\nDoes not work on Intel GPUs.\nYou need Vulkan Validation Layers enabled and the Vulkan SDK for this to work. + Crash Diagnostics:\nCreates a .yaml file with info about the Vulkan state at the time of crashing.\nUseful for debugging 'Device lost' errors. If you have this enabled, you should enable Host AND Guest Debug Markers.\nDoes not work on Intel GPUs.\nYou need Vulkan Validation Layers enabled and the Vulkan SDK for this to work. + + + Copy GPU Buffers:\nGets around race conditions involving GPU submits.\nMay or may not help with PM4 type 0 crashes. + Copy GPU Buffers:\nGets around race conditions involving GPU submits.\nMay or may not help with PM4 type 0 crashes. + + + Host Debug Markers:\nInserts emulator-side information like markers for specific AMDGPU commands around Vulkan commands, as well as giving resources debug names.\nIf you have this enabled, you should enable Crash Diagnostics.\nUseful for programs like RenderDoc. + Host Debug Markers:\nInserts emulator-side information like markers for specific AMDGPU commands around Vulkan commands, as well as giving resources debug names.\nIf you have this enabled, you should enable Crash Diagnostics.\nUseful for programs like RenderDoc. + + + Guest Debug Markers:\nInserts any debug markers the game itself has added to the command buffer.\nIf you have this enabled, you should enable Crash Diagnostics.\nUseful for programs like RenderDoc. + Guest Debug Markers:\nInserts any debug markers the game itself has added to the command buffer.\nIf you have this enabled, you should enable Crash Diagnostics.\nUseful for programs like RenderDoc. + + + Save Data Path:\nThe folder where game save data will be saved. + Save Data Path:\nThe folder where game save data will be saved. + + + Browse:\nBrowse for a folder to set as the save data path. + Browse:\nBrowse for a folder to set as the save data path. + + + Release + Release + + + Nightly + Nightly + + + Set the volume of the background music. + バックグラウンドミュージックの音量を設定します。 + + + Enable Motion Controls + モーションコントロールを有効にする + + + Save Data Path + Save Data Path + + + Browse + 参照 + + + async + 非同期 + + + sync + 同期 + + + Auto Select + Auto Select + + + Directory to install games + ゲームをインストールするディレクトリ + + + Directory to save data + Directory to save data + + + Video + Video + + + Display Mode + Display Mode + + + Windowed + Windowed + + + Fullscreen + Fullscreen + + + Fullscreen (Borderless) + Fullscreen (Borderless) + + + Window Size + Window Size + + + W: + W: + + + H: + H: + + + Separate Log Files + Separate Log Files + + + Separate Log Files:\nWrites a separate logfile for each game. + Separate Log Files:\nWrites a separate logfile for each game. + + + Trophy Notification Position + Trophy Notification Position + + + Left + Left + + + Right + Right + + + Top + Top + + + Bottom + Bottom + + + Notification Duration + Notification Duration + + + Portable User Folder + Portable User Folder + + + Create Portable User Folder from Common User Folder + Create Portable User Folder from Common User Folder + + + Portable user folder:\nStores shadPS4 settings and data that will be applied only to the shadPS4 build located in the current folder. Restart the app after creating the portable user folder to begin using it. + Portable user folder:\nStores shadPS4 settings and data that will be applied only to the shadPS4 build located in the current folder. Restart the app after creating the portable user folder to begin using it. + + + Cannot create portable user folder + Cannot create portable user folder + + + %1 already exists + %1 already exists + + + Portable user folder created + Portable user folder created + + + %1 successfully created. + %1 successfully created. + + + Open the custom trophy images/sounds folder:\nYou can add custom images to the trophies and an audio.\nAdd the files to custom_trophy with the following names:\ntrophy.wav OR trophy.mp3, bronze.png, gold.png, platinum.png, silver.png\nNote: The sound will only work in QT versions. + Open the custom trophy images/sounds folder:\nYou can add custom images to the trophies and an audio.\nAdd the files to custom_trophy with the following names:\ntrophy.wav OR trophy.mp3, bronze.png, gold.png, platinum.png, silver.png\nNote: The sound will only work in QT versions. + + + + TrophyViewer + + Trophy Viewer + トロフィービューアー + + + Select Game: + Select Game: + + + Progress + Progress + + + Show Earned Trophies + Show Earned Trophies + + + Show Not Earned Trophies + Show Not Earned Trophies + + + Show Hidden Trophies + Show Hidden Trophies + + + diff --git a/src/qt_gui/translations/ko_KR.ts b/src/qt_gui/translations/ko_KR.ts index ab6404a7e..9d4b58c79 100644 --- a/src/qt_gui/translations/ko_KR.ts +++ b/src/qt_gui/translations/ko_KR.ts @@ -1,1664 +1,2089 @@ + - - - - 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... - - - - InstallDirSelect - - - shadPS4 - Choose directory - shadPS4 - Choose directory - - - - Select which directory you want to install to. - Select which directory you want to install to. - - - - 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 - - - - Cheats / Patches - 치트 / 패치 - - - - SFO Viewer - SFO Viewer - - - - Trophy Viewer - Trophy Viewer - - - - Open Folder... - Open Folder... - - - - Open Game Folder - Open Game Folder - - - - Open Save Data Folder - Open Save Data Folder - - - - Open Log Folder - Open Log Folder - - - - Copy info... - Copy info... - - - - Copy Name - Copy Name - - - - Copy Serial - Copy Serial - - - - Copy All - Copy All - - - - Delete... - Delete... - - - - Delete Game - Delete Game - - - - Delete Update - Delete Update - - - - Delete DLC - Delete DLC - - - - Compatibility... - Compatibility... - - - - Update database - Update database - - - - View report - View report - - - - Submit a report - Submit a report - - - - Shortcut creation - Shortcut creation - - - - Shortcut created successfully! - Shortcut created successfully! - - - - Error - Error - - - - Error creating shortcut! - Error creating shortcut! - - - - Install PKG - Install PKG - - - - Game - Game - - - - requiresEnableSeparateUpdateFolder_MSG - This feature requires the 'Enable Separate Update Folder' config option to work. If you want to use this feature, please enable it. - - - - This game has no update to delete! - This game has no update to delete! - - - - Update - Update - - - - This game has no DLC to delete! - This game has no DLC to delete! - - - - DLC - DLC - - - - Delete %1 - Delete %1 - - - - Are you sure you want to delete %1's %2 directory? - Are you sure you want to delete %1's %2 directory? - - - - MainWindow - - - Open/Add Elf Folder - Open/Add Elf Folder - - - - Install Packages (PKG) - Install Packages (PKG) - - - - Boot Game - Boot Game - - - - Check for Updates - Check for Updates - - - - 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 - - - - Download Cheats/Patches - 치트 / 패치 다운로드 - - - - 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 - - - - Help - Help - - - - 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 - - - - Enable Separate Update Folder - Enable Separate Update Folder - - - - Show Splash - Show Splash - - - - Is PS4 Pro - Is PS4 Pro - - - - Enable Discord Rich Presence - Enable Discord Rich Presence - - - - Username - Username - - - - Trophy Key - Trophy Key - - - - Trophy - Trophy - - - - Logger - Logger - - - - Log Type - Log Type - - - - Log Filter - Log Filter - - - - Input - Input - - - - Cursor - Cursor - - - - Hide Cursor - Hide Cursor - - - - Hide Cursor Idle Timeout - Hide Cursor Idle Timeout - - - - s - s - - - - Controller - Controller - - - - Back Button Behavior - Back Button Behavior - - - - 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 - - - - Paths - Paths - - - - Game Folders - Game Folders - - - - Add... - Add... - - - - Remove - Remove - - - - 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 - - - - Update - Update - - - - Check for Updates at Startup - Check for Updates at Startup - - - - Update Channel - Update Channel - - - - Check for Updates - Check for Updates - - - - GUI Settings - GUI Settings - - - - Disable Trophy Pop-ups - Disable Trophy Pop-ups - - - - Play title music - Play title music - - - - Update Compatibility Database On Startup - Update Compatibility Database On Startup - - - - Game Compatibility - Game Compatibility - - - - Display Compatibility Data - Display Compatibility Data - - - - Update Compatibility Database - Update Compatibility Database - - - - Volume - 음량 - - - - Audio Backend - Audio Backend - - - - MainWindow - - - Game List - Game List - - - - * 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! - Patch detected! - - - - PKG and Game versions match: - PKG and Game versions match: - - - - Would you like to overwrite? - Would you like to overwrite? - - - - PKG Version %1 is older than installed version: - PKG Version %1 is older than installed version: - - - - Game is installed: - Game is installed: - - - - Would you like to install Patch: - Would you like to install Patch: - - - - DLC Installation - DLC Installation - - - - Would you like to install DLC: %1? - Would you like to install DLC: %1? - - - - DLC already installed: - DLC already installed: - - - - Game already installed - Game already installed - - - - 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 for - Cheats / Patches for - - - - 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. If the patch does not appear, it may be that it does not exist for the specific serial and version of the game. - - - - Failed to parse JSON data from HTML. - Failed to parse JSON data from HTML. - - - - Failed to retrieve HTML page. - Failed to retrieve HTML page. - - - - The game is in version: %1 - The game is in version: %1 - - - - The downloaded patch only works on version: %1 - The downloaded patch only works on version: %1 - - - - You may need to update your game. - You may need to update your game. - - - - Incompatibility Notice - Incompatibility Notice - - - - 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: - - - - Can't apply cheats before the game is started - Can't apply cheats before the game is started. - - - - SettingsDialog - - - Save - Save - - - - Apply - Apply - - - - Restore Defaults - Restore Defaults - - - - Close - Close - - - - Point your mouse at an option to display its description. - Point your mouse at an option to display its description. - - - - consoleLanguageGroupBox - Console Language:\nSets the language that the PS4 game uses.\nIt's recommended to set this to a language the game supports, which will vary by region. - - - - emulatorLanguageGroupBox - Emulator Language:\nSets the language of the emulator's user interface. - - - - fullscreenCheckBox - Enable Full Screen:\nAutomatically puts the game window into full-screen mode.\nThis can be toggled by pressing the F11 key. - - - - separateUpdatesCheckBox - Enable Separate Update Folder:\nEnables installing game updates into a separate folder for easy management. - - - - showSplashCheckBox - Show Splash Screen:\nShows the game's splash screen (a special image) while the game is starting. - - - - ps4proCheckBox - Is PS4 Pro:\nMakes the emulator act as a PS4 PRO, which may enable special features in games that support it. - - - - discordRPCCheckbox - Discord Rich Presence 활성화:\nDiscord 프로필에 에뮬레이터 아이콘과 관련 정보를 표시합니다. - - - - userName - Username:\nSets the PS4's account username, which may be displayed by some games. - - - - TrophyKey - Trophy Key:\nKey used to decrypt trophies. Must be obtained from your jailbroken console.\nMust contain only hex characters. - - - - logTypeGroupBox - Log Type:\nSets whether to synchronize the output of the log window for performance. May have adverse effects on emulation. - - - - logFilter - Log Filter:\nFilters the log to only print specific information.\nExamples: "Core:Trace" "Lib.Pad:Debug Common.Filesystem:Error" "*:Critical" Levels: Trace, Debug, Info, Warning, Error, Critical - in this order, a specific level silences all levels preceding it in the list and logs every level after it. - - - - updaterGroupBox - Update:\nRelease: Official versions released every month that may be very outdated, but are more reliable and tested.\nNightly: Development versions that have all the latest features and fixes, but may contain bugs and are less stable. - - - - GUIgroupBox - Play Title Music:\nIf a game supports it, enable playing special music when selecting the game in the GUI. - - - - disableTrophycheckBox - Disable Trophy Pop-ups:\nDisable in-game trophy notifications. Trophy progress can still be tracked using the Trophy Viewer (right-click the game in the main window). - - - - hideCursorGroupBox - Hide Cursor:\nChoose when the cursor will disappear:\nNever: You will always see the mouse.\nidle: Set a time for it to disappear after being idle.\nAlways: you will never see the mouse. - - - - idleTimeoutGroupBox - Set a time for the mouse to disappear after being after being idle. - - - - backButtonBehaviorGroupBox - Back Button Behavior:\nSets the controller's back button to emulate tapping the specified position on the PS4 touchpad. - - - - enableCompatibilityCheckBox - Display Compatibility Data:\nDisplays game compatibility information in table view. Enable "Update Compatibility On Startup" to get up-to-date information. - - - - checkCompatibilityOnStartupCheckBox - Update Compatibility On Startup:\nAutomatically update the compatibility database when shadPS4 starts. - - - - updateCompatibilityButton - Update Compatibility Database:\nImmediately update the compatibility database. - - - - Never - Never - - - - Idle - Idle - - - - Always - Always - - - - Touchpad Left - Touchpad Left - - - - Touchpad Right - Touchpad Right - - - - Touchpad Center - Touchpad Center - - - - None - None - - - - graphicsAdapterGroupBox - Graphics Device:\nOn multiple GPU systems, select the GPU the emulator will use from the drop down list,\nor select "Auto Select" to automatically determine it. - - - - resolutionLayout - Width/Height:\nSets the size of the emulator window at launch, which can be resized during gameplay.\nThis is different from the in-game resolution. - - - - heightDivider - Vblank Divider:\nThe frame rate at which the emulator refreshes at is multiplied by this number. Changing this may have adverse effects, such as increasing the game speed, or breaking critical game functionality that does not expect this to change! - - - - dumpShadersCheckBox - Enable Shaders Dumping:\nFor the sake of technical debugging, saves the games shaders to a folder as they render. - - - - nullGpuCheckBox - Enable Null GPU:\nFor the sake of technical debugging, disables game rendering as if there were no graphics card. - - - - gameFoldersBox - Game Folders:\nThe list of folders to check for installed games. - - - - addFolderButton - Add:\nAdd a folder to the list. - - - - removeFolderButton - Remove:\nRemove a folder from the list. - - - - debugDump - Enable Debug Dumping:\nSaves the import and export symbols and file header information of the currently running PS4 program to a directory. - - - - vkValidationCheckBox - Enable Vulkan Validation Layers:\nEnables a system that validates the state of the Vulkan renderer and logs information about its internal state. This will reduce performance and likely change the behavior of emulation. - - - - vkSyncValidationCheckBox - Enable Vulkan Synchronization Validation:\nEnables a system that validates the timing of Vulkan rendering tasks. This will reduce performance and likely change the behavior of emulation. - - - - rdocCheckBox - Enable RenderDoc Debugging:\nIf enabled, the emulator will provide compatibility with Renderdoc to allow capture and analysis of the currently rendered frame. - - - - GameListFrame - - - Icon - Icon - - - - Name - Name - - - - Serial - Serial - - - - Compatibility - Compatibility - - - - Region - Region - - - - Firmware - Firmware - - - - Size - Size - - - - Version - Version - - - - Path - Path - - - - Play Time - Play Time - - - - Never Played - Never Played - - - - h - h - - - - m - m - - - - s - s - - - - Compatibility is untested - Compatibility is untested - - - - Game does not initialize properly / crashes the emulator - Game does not initialize properly / crashes the emulator - - - - Game boots, but only displays a blank screen - Game boots, but only displays a blank screen - - - - Game displays an image but does not go past the menu - Game displays an image but does not go past the menu - - - - Game has game-breaking glitches or unplayable performance - Game has game-breaking glitches or unplayable performance - - - - Game can be completed with playable performance and no major glitches - Game can be completed with playable performance and no major glitches - - - - CheckUpdate - - - Auto Updater - Auto Updater - - - - Error - Error - - - - Network error: - Network error: - - - - Failed to parse update information. - Failed to parse update information. - - - - No pre-releases found. - No pre-releases found. - - - - Invalid release data. - Invalid release data. - - - - No download URL found for the specified asset. - No download URL found for the specified asset. - - - - Your version is already up to date! - Your version is already up to date! - - - - Update Available - Update Available - - - - Update Channel - Update Channel - - - - Current Version - Current Version - - - - Latest Version - Latest Version - - - - Do you want to update? - Do you want to update? - - - - Show Changelog - Show Changelog - - - - Check for Updates at Startup - Check for Updates at Startup - - - - Update - Update - - - - No - No - - - - Hide Changelog - Hide Changelog - - - - Changes - Changes - - - - Network error occurred while trying to access the URL - Network error occurred while trying to access the URL - - - - Download Complete - Download Complete - - - - The update has been downloaded, press OK to install. - The update has been downloaded, press OK to install. - - - - Failed to save the update file at - Failed to save the update file at - - - - Starting Update... - Starting Update... - - - - Failed to create the update script file - Failed to create the update script file - - - - GameListUtils - - - B - B - - - - KB - KB - - - - MB - MB - - - - GB - GB - - - - TB - TB - - - \ No newline at end of file + + + AboutDialog + + About shadPS4 + About 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. + + + + CheatsPatches + + Cheats / Patches for + Cheats / Patches for + + + 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:\n + 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:\n + + + 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 + + + No Cheats found for this game in this version of the selected repository,try another repository or a different version of the game. + 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 + + + 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. + 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 + + + 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. If the patch does not appear, it may be that it does not exist for the specific serial and version of the game. + 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. If the patch does not appear, it may be that it does not exist for the specific serial and version of the game. + + + Failed to parse JSON data from HTML. + Failed to parse JSON data from HTML. + + + Failed to retrieve HTML page. + Failed to retrieve HTML page. + + + The game is in version: %1 + The game is in version: %1 + + + The downloaded patch only works on version: %1 + The downloaded patch only works on version: %1 + + + You may need to update your game. + You may need to update your game. + + + Incompatibility Notice + Incompatibility Notice + + + 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: + + + Can't apply cheats before the game is started + Can't apply cheats before the game is started + + + Close + Close + + + + CheckUpdate + + Auto Updater + Auto Updater + + + Error + Error + + + Network error: + Network error: + + + The Auto Updater allows up to 60 update checks per hour.\nYou have reached this limit. Please try again later. + 자동 업데이트는 시간당 최대 60회의 업데이트 확인을 허용합니다.\n이 제한에 도달했습니다. 나중에 다시 시도해 주세요. + + + Failed to parse update information. + Failed to parse update information. + + + No pre-releases found. + No pre-releases found. + + + Invalid release data. + Invalid release data. + + + No download URL found for the specified asset. + No download URL found for the specified asset. + + + Your version is already up to date! + Your version is already up to date! + + + Update Available + Update Available + + + Update Channel + Update Channel + + + Current Version + Current Version + + + Latest Version + Latest Version + + + Do you want to update? + Do you want to update? + + + Show Changelog + Show Changelog + + + Check for Updates at Startup + Check for Updates at Startup + + + Update + Update + + + No + No + + + Hide Changelog + Hide Changelog + + + Changes + Changes + + + Network error occurred while trying to access the URL + Network error occurred while trying to access the URL + + + Download Complete + Download Complete + + + The update has been downloaded, press OK to install. + The update has been downloaded, press OK to install. + + + Failed to save the update file at + Failed to save the update file at + + + Starting Update... + Starting Update... + + + Failed to create the update script file + Failed to create the update script file + + + + CompatibilityInfoClass + + Fetching compatibility data, please wait + 호환성 데이터를 가져오는 중, 잠시만 기다려 주세요 + + + Cancel + 취소 + + + Loading... + 로딩 중... + + + Error + 오류 + + + Unable to update compatibility data! Try again later. + 호환성 데이터를 업데이트할 수 없습니다! 나중에 다시 시도해 주세요. + + + Unable to open compatibility_data.json for writing. + compatibility_data.json을 열어 쓸 수 없습니다. + + + Unknown + 알 수 없음 + + + Nothing + 없음 + + + Boots + 부츠 + + + Menus + 메뉴 + + + Ingame + 게임 내 + + + Playable + 플레이 가능 + + + + ControlSettings + + Configure Controls + Configure Controls + + + D-Pad + D-Pad + + + Up + Up + + + Left + Left + + + Right + Right + + + Down + Down + + + Left Stick Deadzone (def:2 max:127) + Left Stick Deadzone (def:2 max:127) + + + Left Deadzone + Left Deadzone + + + Left Stick + Left Stick + + + Config Selection + Config Selection + + + Common Config + Common Config + + + Use per-game configs + Use per-game configs + + + L1 / LB + L1 / LB + + + L2 / LT + L2 / LT + + + Back + Back + + + R1 / RB + R1 / RB + + + R2 / RT + R2 / RT + + + L3 + L3 + + + Options / Start + Options / Start + + + R3 + R3 + + + Face Buttons + Face Buttons + + + Triangle / Y + Triangle / Y + + + Square / X + Square / X + + + Circle / B + Circle / B + + + Cross / A + Cross / A + + + Right Stick Deadzone (def:2, max:127) + Right Stick Deadzone (def:2, max:127) + + + Right Deadzone + Right Deadzone + + + Right Stick + Right Stick + + + Color Adjustment + Color Adjustment + + + R: + R: + + + G: + G: + + + B: + B: + + + Override Lightbar Color + Override Lightbar Color + + + Override Color + Override Color + + + Unable to Save + Unable to Save + + + Cannot bind axis values more than once + Cannot bind axis values more than once + + + Save + Save + + + Apply + Apply + + + Restore Defaults + Restore Defaults + + + Cancel + Cancel + + + + EditorDialog + + Edit Keyboard + Mouse and Controller input bindings + Edit Keyboard + Mouse and Controller input bindings + + + Use Per-Game configs + Use Per-Game configs + + + Error + Error + + + Could not open the file for reading + Could not open the file for reading + + + Could not open the file for writing + Could not open the file for writing + + + Save Changes + Save Changes + + + Do you want to save changes? + Do you want to save changes? + + + Help + Help + + + Do you want to reset your custom default config to the original default config? + Do you want to reset your custom default config to the original default config? + + + Do you want to reset this config to your custom default config? + Do you want to reset this config to your custom default config? + + + Reset to Default + Reset to Default + + + + 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 + + + Directory to install DLC + Directory to install DLC + + + + GameListFrame + + Icon + Icon + + + Name + Name + + + Serial + Serial + + + Compatibility + Compatibility + + + Region + Region + + + Firmware + Firmware + + + Size + Size + + + Version + Version + + + Path + Path + + + Play Time + Play Time + + + Never Played + Never Played + + + h + h + + + m + m + + + s + s + + + Compatibility is untested + Compatibility is untested + + + Game does not initialize properly / crashes the emulator + Game does not initialize properly / crashes the emulator + + + Game boots, but only displays a blank screen + Game boots, but only displays a blank screen + + + Game displays an image but does not go past the menu + Game displays an image but does not go past the menu + + + Game has game-breaking glitches or unplayable performance + Game has game-breaking glitches or unplayable performance + + + Game can be completed with playable performance and no major glitches + Game can be completed with playable performance and no major glitches + + + Click to see details on github + GitHub에서 세부 정보를 보려면 클릭하세요 + + + Last updated + 마지막 업데이트 + + + + GameListUtils + + B + B + + + KB + KB + + + MB + MB + + + GB + GB + + + TB + TB + + + + GuiContextMenus + + Create Shortcut + Create Shortcut + + + Cheats / Patches + 치트 / 패치 + + + SFO Viewer + SFO Viewer + + + Trophy Viewer + Trophy Viewer + + + Open Folder... + Open Folder... + + + Open Game Folder + Open Game Folder + + + Open Save Data Folder + Open Save Data Folder + + + Open Log Folder + Open Log Folder + + + Copy info... + Copy info... + + + Copy Name + Copy Name + + + Copy Serial + Copy Serial + + + Copy Version + Copy Version + + + Copy Size + Copy Size + + + Copy All + Copy All + + + Delete... + Delete... + + + Delete Game + Delete Game + + + Delete Update + Delete Update + + + Delete DLC + Delete DLC + + + Delete Trophy + Delete Trophy + + + Compatibility... + Compatibility... + + + Update database + Update database + + + View report + View report + + + Submit a report + Submit a report + + + Shortcut creation + Shortcut creation + + + Shortcut created successfully! + Shortcut created successfully! + + + Error + Error + + + Error creating shortcut! + Error creating shortcut! + + + Game + Game + + + This game has no update to delete! + This game has no update to delete! + + + Update + Update + + + This game has no DLC to delete! + This game has no DLC to delete! + + + DLC + DLC + + + Delete %1 + Delete %1 + + + Are you sure you want to delete %1's %2 directory? + Are you sure you want to delete %1's %2 directory? + + + Open Update Folder + Open Update Folder + + + Delete Save Data + Delete Save Data + + + This game has no update folder to open! + This game has no update folder to open! + + + No log file found for this game! + No log file found for this game! + + + Failed to convert icon. + Failed to convert icon. + + + This game has no save data to delete! + This game has no save data to delete! + + + This game has no saved trophies to delete! + This game has no saved trophies to delete! + + + Save Data + Save Data + + + Trophy + Trophy + + + SFO Viewer for + SFO Viewer for + + + + HelpDialog + + Quickstart + Quickstart + + + FAQ + FAQ + + + Syntax + Syntax + + + Special Bindings + Special Bindings + + + Keybindings + Keybindings + + + + KBMSettings + + Configure Controls + Configure Controls + + + D-Pad + D-Pad + + + Up + Up + + + unmapped + unmapped + + + Left + Left + + + Right + Right + + + Down + Down + + + Left Analog Halfmode + Left Analog Halfmode + + + hold to move left stick at half-speed + hold to move left stick at half-speed + + + Left Stick + Left Stick + + + Config Selection + Config Selection + + + Common Config + Common Config + + + Use per-game configs + Use per-game configs + + + L1 + L1 + + + L2 + L2 + + + Text Editor + Text Editor + + + Help + Help + + + R1 + R1 + + + R2 + R2 + + + L3 + L3 + + + Touchpad Click + Touchpad Click + + + Mouse to Joystick + Mouse to Joystick + + + *press F7 ingame to activate + *press F7 ingame to activate + + + R3 + R3 + + + Options + Options + + + Mouse Movement Parameters + Mouse Movement Parameters + + + note: click Help Button/Special Keybindings for more information + note: click Help Button/Special Keybindings for more information + + + Face Buttons + Face Buttons + + + Triangle + Triangle + + + Square + Square + + + Circle + Circle + + + Cross + Cross + + + Right Analog Halfmode + Right Analog Halfmode + + + hold to move right stick at half-speed + hold to move right stick at half-speed + + + Right Stick + Right Stick + + + Speed Offset (def 0.125): + Speed Offset (def 0.125): + + + Copy from Common Config + Copy from Common Config + + + Deadzone Offset (def 0.50): + Deadzone Offset (def 0.50): + + + Speed Multiplier (def 1.0): + Speed Multiplier (def 1.0): + + + Common Config Selected + Common Config Selected + + + This button copies mappings from the Common Config to the currently selected profile, and cannot be used when the currently selected profile is the Common Config. + This button copies mappings from the Common Config to the currently selected profile, and cannot be used when the currently selected profile is the Common Config. + + + Copy values from Common Config + Copy values from Common Config + + + Do you want to overwrite existing mappings with the mappings from the Common Config? + Do you want to overwrite existing mappings with the mappings from the Common Config? + + + Unable to Save + Unable to Save + + + Cannot bind any unique input more than once + Cannot bind any unique input more than once + + + Press a key + Press a key + + + Cannot set mapping + Cannot set mapping + + + Mousewheel cannot be mapped to stick outputs + Mousewheel cannot be mapped to stick outputs + + + Save + Save + + + Apply + Apply + + + Restore Defaults + Restore Defaults + + + Cancel + Cancel + + + + MainWindow + + Open/Add Elf Folder + Open/Add Elf Folder + + + Boot Game + Boot Game + + + Check for Updates + Check for Updates + + + About shadPS4 + About shadPS4 + + + Configure... + Configure... + + + Recent Games + Recent Games + + + Open shadPS4 Folder + Open shadPS4 Folder + + + 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 + + + Download Cheats/Patches + 치트 / 패치 다운로드 + + + Dump Game List + Dump Game List + + + Trophy Viewer + Trophy Viewer + + + No games found. Please add your games to your library first. + No games found. Please add your games to your library first. + + + Search... + Search... + + + File + File + + + View + View + + + Game List Icons + Game List Icons + + + Game List Mode + Game List Mode + + + Settings + Settings + + + Utils + Utils + + + Themes + Themes + + + Help + Help + + + Dark + Dark + + + Light + Light + + + Green + Green + + + Blue + Blue + + + Violet + Violet + + + toolBar + toolBar + + + Game List + Game List + + + * 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: + + + 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! + + + Run Game + Run Game + + + Eboot.bin file not found + Eboot.bin file not found + + + Game is already running! + Game is already running! + + + shadPS4 + shadPS4 + + + Play + Play + + + Pause + Pause + + + Stop + Stop + + + Restart + Restart + + + Full Screen + Full Screen + + + Controllers + Controllers + + + Keyboard + Keyboard + + + Refresh List + Refresh List + + + Resume + Resume + + + Show Labels Under Icons + Show Labels Under Icons + + + + SettingsDialog + + Settings + Settings + + + General + General + + + System + System + + + Console Language + Console Language + + + Emulator Language + Emulator Language + + + Emulator + Emulator + + + Enable Separate Update Folder + Enable Separate Update Folder + + + Default tab when opening settings + 설정 열기 시 기본 탭 + + + Show Game Size In List + 게임 크기를 목록에 표시 + + + Show Splash + Show Splash + + + Enable Discord Rich Presence + Enable Discord Rich Presence + + + Username + Username + + + Trophy Key + Trophy Key + + + Trophy + Trophy + + + Open the custom trophy images/sounds folder + Open the custom trophy images/sounds folder + + + Logger + Logger + + + Log Type + Log Type + + + Log Filter + Log Filter + + + Open Log Location + 로그 위치 열기 + + + Input + Input + + + Cursor + Cursor + + + Hide Cursor + Hide Cursor + + + Hide Cursor Idle Timeout + Hide Cursor Idle Timeout + + + s + s + + + Controller + Controller + + + Back Button Behavior + Back Button Behavior + + + Graphics + Graphics + + + GUI + 인터페이스 + + + User + 사용자 + + + Graphics Device + Graphics Device + + + Vblank Divider + Vblank Divider + + + Advanced + Advanced + + + Enable Shaders Dumping + Enable Shaders Dumping + + + Enable NULL GPU + Enable NULL GPU + + + Enable HDR + Enable HDR + + + Paths + Paths + + + Game Folders + Game Folders + + + Add... + Add... + + + Remove + Remove + + + 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 + + + Enable Crash Diagnostics + Enable Crash Diagnostics + + + Collect Shaders + Collect Shaders + + + Copy GPU Buffers + Copy GPU Buffers + + + Host Debug Markers + Host Debug Markers + + + Guest Debug Markers + Guest Debug Markers + + + Update + Update + + + Check for Updates at Startup + Check for Updates at Startup + + + Always Show Changelog + 항상 변경 사항 표시 + + + Update Channel + Update Channel + + + Check for Updates + Check for Updates + + + GUI Settings + GUI Settings + + + Title Music + Title Music + + + Disable Trophy Notification + Disable Trophy Notification + + + Background Image + Background Image + + + Show Background Image + Show Background Image + + + Opacity + Opacity + + + Play title music + Play title music + + + Update Compatibility Database On Startup + Update Compatibility Database On Startup + + + Game Compatibility + Game Compatibility + + + Display Compatibility Data + Display Compatibility Data + + + Update Compatibility Database + Update Compatibility Database + + + Volume + 음량 + + + Save + Save + + + Apply + Apply + + + Restore Defaults + Restore Defaults + + + Close + Close + + + Point your mouse at an option to display its description. + Point your mouse at an option to display its description. + + + Console Language:\nSets the language that the PS4 game uses.\nIt's recommended to set this to a language the game supports, which will vary by region. + Console Language:\nSets the language that the PS4 game uses.\nIt's recommended to set this to a language the game supports, which will vary by region. + + + Emulator Language:\nSets the language of the emulator's user interface. + Emulator Language:\nSets the language of the emulator's user interface. + + + Enable Separate Update Folder:\nEnables installing game updates into a separate folder for easy management.\nThis can be manually created by adding the extracted update to the game folder with the name "CUSA00000-UPDATE" where the CUSA ID matches the game's ID. + Enable Separate Update Folder:\nEnables installing game updates into a separate folder for easy management.\nThis can be manually created by adding the extracted update to the game folder with the name "CUSA00000-UPDATE" where the CUSA ID matches the game's ID. + + + Show Splash Screen:\nShows the game's splash screen (a special image) while the game is starting. + Show Splash Screen:\nShows the game's splash screen (a special image) while the game is starting. + + + Enable Discord Rich Presence:\nDisplays the emulator icon and relevant information on your Discord profile. + Discord Rich Presence 활성화:\nDiscord 프로필에 에뮬레이터 아이콘과 관련 정보를 표시합니다. + + + Username:\nSets the PS4's account username, which may be displayed by some games. + Username:\nSets the PS4's account username, which may be displayed by some games. + + + Trophy Key:\nKey used to decrypt trophies. Must be obtained from your jailbroken console.\nMust contain only hex characters. + Trophy Key:\nKey used to decrypt trophies. Must be obtained from your jailbroken console.\nMust contain only hex characters. + + + Log Type:\nSets whether to synchronize the output of the log window for performance. May have adverse effects on emulation. + Log Type:\nSets whether to synchronize the output of the log window for performance. May have adverse effects on emulation. + + + Log Filter:\nFilters the log to only print specific information.\nExamples: "Core:Trace" "Lib.Pad:Debug Common.Filesystem:Error" "*:Critical"\nLevels: Trace, Debug, Info, Warning, Error, Critical - in this order, a specific level silences all levels preceding it in the list and logs every level after it. + Log Filter:\nFilters the log to only print specific information.\nExamples: "Core:Trace" "Lib.Pad:Debug Common.Filesystem:Error" "*:Critical"\nLevels: Trace, Debug, Info, Warning, Error, Critical - in this order, a specific level silences all levels preceding it in the list and logs every level after it. + + + Update:\nRelease: Official versions released every month that may be very outdated, but are more reliable and tested.\nNightly: Development versions that have all the latest features and fixes, but may contain bugs and are less stable. + Update:\nRelease: Official versions released every month that may be very outdated, but are more reliable and tested.\nNightly: Development versions that have all the latest features and fixes, but may contain bugs and are less stable. + + + Background Image:\nControl the opacity of the game background image. + Background Image:\nControl the opacity of the game background image. + + + Play Title Music:\nIf a game supports it, enable playing special music when selecting the game in the GUI. + Play Title Music:\nIf a game supports it, enable playing special music when selecting the game in the GUI. + + + Disable Trophy Pop-ups:\nDisable in-game trophy notifications. Trophy progress can still be tracked using the Trophy Viewer (right-click the game in the main window). + Disable Trophy Pop-ups:\nDisable in-game trophy notifications. Trophy progress can still be tracked using the Trophy Viewer (right-click the game in the main window). + + + Hide Cursor:\nChoose when the cursor will disappear:\nNever: You will always see the mouse.\nidle: Set a time for it to disappear after being idle.\nAlways: you will never see the mouse. + Hide Cursor:\nChoose when the cursor will disappear:\nNever: You will always see the mouse.\nidle: Set a time for it to disappear after being idle.\nAlways: you will never see the mouse. + + + Hide Idle Cursor Timeout:\nThe duration (seconds) after which the cursor that has been idle hides itself. + Hide Idle Cursor Timeout:\nThe duration (seconds) after which the cursor that has been idle hides itself. + + + Back Button Behavior:\nSets the controller's back button to emulate tapping the specified position on the PS4 touchpad. + Back Button Behavior:\nSets the controller's back button to emulate tapping the specified position on the PS4 touchpad. + + + Display Compatibility Data:\nDisplays game compatibility information in table view. Enable "Update Compatibility On Startup" to get up-to-date information. + Display Compatibility Data:\nDisplays game compatibility information in table view. Enable "Update Compatibility On Startup" to get up-to-date information. + + + Update Compatibility On Startup:\nAutomatically update the compatibility database when shadPS4 starts. + Update Compatibility On Startup:\nAutomatically update the compatibility database when shadPS4 starts. + + + Update Compatibility Database:\nImmediately update the compatibility database. + Update Compatibility Database:\nImmediately update the compatibility database. + + + Never + Never + + + Idle + Idle + + + Always + Always + + + Touchpad Left + Touchpad Left + + + Touchpad Right + Touchpad Right + + + Touchpad Center + Touchpad Center + + + None + None + + + Graphics Device:\nOn multiple GPU systems, select the GPU the emulator will use from the drop down list,\nor select "Auto Select" to automatically determine it. + Graphics Device:\nOn multiple GPU systems, select the GPU the emulator will use from the drop down list,\nor select "Auto Select" to automatically determine it. + + + Width/Height:\nSets the size of the emulator window at launch, which can be resized during gameplay.\nThis is different from the in-game resolution. + Width/Height:\nSets the size of the emulator window at launch, which can be resized during gameplay.\nThis is different from the in-game resolution. + + + Vblank Divider:\nThe frame rate at which the emulator refreshes at is multiplied by this number. Changing this may have adverse effects, such as increasing the game speed, or breaking critical game functionality that does not expect this to change! + Vblank Divider:\nThe frame rate at which the emulator refreshes at is multiplied by this number. Changing this may have adverse effects, such as increasing the game speed, or breaking critical game functionality that does not expect this to change! + + + Enable Shaders Dumping:\nFor the sake of technical debugging, saves the games shaders to a folder as they render. + Enable Shaders Dumping:\nFor the sake of technical debugging, saves the games shaders to a folder as they render. + + + Enable Null GPU:\nFor the sake of technical debugging, disables game rendering as if there were no graphics card. + Enable Null GPU:\nFor the sake of technical debugging, disables game rendering as if there were no graphics card. + + + Enable HDR:\nEnables HDR in games that support it.\nYour monitor must have support for the BT2020 PQ color space and the RGB10A2 swapchain format. + Enable HDR:\nEnables HDR in games that support it.\nYour monitor must have support for the BT2020 PQ color space and the RGB10A2 swapchain format. + + + Game Folders:\nThe list of folders to check for installed games. + Game Folders:\nThe list of folders to check for installed games. + + + Add:\nAdd a folder to the list. + Add:\nAdd a folder to the list. + + + Remove:\nRemove a folder from the list. + Remove:\nRemove a folder from the list. + + + Enable Debug Dumping:\nSaves the import and export symbols and file header information of the currently running PS4 program to a directory. + Enable Debug Dumping:\nSaves the import and export symbols and file header information of the currently running PS4 program to a directory. + + + Enable Vulkan Validation Layers:\nEnables a system that validates the state of the Vulkan renderer and logs information about its internal state.\nThis will reduce performance and likely change the behavior of emulation. + Enable Vulkan Validation Layers:\nEnables a system that validates the state of the Vulkan renderer and logs information about its internal state.\nThis will reduce performance and likely change the behavior of emulation. + + + Enable Vulkan Synchronization Validation:\nEnables a system that validates the timing of Vulkan rendering tasks.\nThis will reduce performance and likely change the behavior of emulation. + Enable Vulkan Synchronization Validation:\nEnables a system that validates the timing of Vulkan rendering tasks.\nThis will reduce performance and likely change the behavior of emulation. + + + Enable RenderDoc Debugging:\nIf enabled, the emulator will provide compatibility with Renderdoc to allow capture and analysis of the currently rendered frame. + Enable RenderDoc Debugging:\nIf enabled, the emulator will provide compatibility with Renderdoc to allow capture and analysis of the currently rendered frame. + + + Collect Shaders:\nYou need this enabled to edit shaders with the debug menu (Ctrl + F10). + Collect Shaders:\nYou need this enabled to edit shaders with the debug menu (Ctrl + F10). + + + Crash Diagnostics:\nCreates a .yaml file with info about the Vulkan state at the time of crashing.\nUseful for debugging 'Device lost' errors. If you have this enabled, you should enable Host AND Guest Debug Markers.\nDoes not work on Intel GPUs.\nYou need Vulkan Validation Layers enabled and the Vulkan SDK for this to work. + Crash Diagnostics:\nCreates a .yaml file with info about the Vulkan state at the time of crashing.\nUseful for debugging 'Device lost' errors. If you have this enabled, you should enable Host AND Guest Debug Markers.\nDoes not work on Intel GPUs.\nYou need Vulkan Validation Layers enabled and the Vulkan SDK for this to work. + + + Copy GPU Buffers:\nGets around race conditions involving GPU submits.\nMay or may not help with PM4 type 0 crashes. + Copy GPU Buffers:\nGets around race conditions involving GPU submits.\nMay or may not help with PM4 type 0 crashes. + + + Host Debug Markers:\nInserts emulator-side information like markers for specific AMDGPU commands around Vulkan commands, as well as giving resources debug names.\nIf you have this enabled, you should enable Crash Diagnostics.\nUseful for programs like RenderDoc. + Host Debug Markers:\nInserts emulator-side information like markers for specific AMDGPU commands around Vulkan commands, as well as giving resources debug names.\nIf you have this enabled, you should enable Crash Diagnostics.\nUseful for programs like RenderDoc. + + + Guest Debug Markers:\nInserts any debug markers the game itself has added to the command buffer.\nIf you have this enabled, you should enable Crash Diagnostics.\nUseful for programs like RenderDoc. + Guest Debug Markers:\nInserts any debug markers the game itself has added to the command buffer.\nIf you have this enabled, you should enable Crash Diagnostics.\nUseful for programs like RenderDoc. + + + Save Data Path:\nThe folder where game save data will be saved. + Save Data Path:\nThe folder where game save data will be saved. + + + Browse:\nBrowse for a folder to set as the save data path. + Browse:\nBrowse for a folder to set as the save data path. + + + Release + Release + + + Nightly + Nightly + + + Set the volume of the background music. + Set the volume of the background music. + + + Enable Motion Controls + Enable Motion Controls + + + Save Data Path + Save Data Path + + + Browse + Browse + + + async + async + + + sync + sync + + + Auto Select + Auto Select + + + Directory to install games + Directory to install games + + + Directory to save data + Directory to save data + + + Video + Video + + + Display Mode + Display Mode + + + Windowed + Windowed + + + Fullscreen + Fullscreen + + + Fullscreen (Borderless) + Fullscreen (Borderless) + + + Window Size + Window Size + + + W: + W: + + + H: + H: + + + Separate Log Files + Separate Log Files + + + Separate Log Files:\nWrites a separate logfile for each game. + Separate Log Files:\nWrites a separate logfile for each game. + + + Trophy Notification Position + Trophy Notification Position + + + Left + Left + + + Right + Right + + + Top + Top + + + Bottom + Bottom + + + Notification Duration + Notification Duration + + + Portable User Folder + Portable User Folder + + + Create Portable User Folder from Common User Folder + Create Portable User Folder from Common User Folder + + + Portable user folder:\nStores shadPS4 settings and data that will be applied only to the shadPS4 build located in the current folder. Restart the app after creating the portable user folder to begin using it. + Portable user folder:\nStores shadPS4 settings and data that will be applied only to the shadPS4 build located in the current folder. Restart the app after creating the portable user folder to begin using it. + + + Cannot create portable user folder + Cannot create portable user folder + + + %1 already exists + %1 already exists + + + Portable user folder created + Portable user folder created + + + %1 successfully created. + %1 successfully created. + + + Open the custom trophy images/sounds folder:\nYou can add custom images to the trophies and an audio.\nAdd the files to custom_trophy with the following names:\ntrophy.wav OR trophy.mp3, bronze.png, gold.png, platinum.png, silver.png\nNote: The sound will only work in QT versions. + Open the custom trophy images/sounds folder:\nYou can add custom images to the trophies and an audio.\nAdd the files to custom_trophy with the following names:\ntrophy.wav OR trophy.mp3, bronze.png, gold.png, platinum.png, silver.png\nNote: The sound will only work in QT versions. + + + + TrophyViewer + + Trophy Viewer + Trophy Viewer + + + Select Game: + Select Game: + + + Progress + Progress + + + Show Earned Trophies + Show Earned Trophies + + + Show Not Earned Trophies + Show Not Earned Trophies + + + Show Hidden Trophies + Show Hidden Trophies + + + diff --git a/src/qt_gui/translations/lt_LT.ts b/src/qt_gui/translations/lt_LT.ts index 0b9c5b542..55a9fac0c 100644 --- a/src/qt_gui/translations/lt_LT.ts +++ b/src/qt_gui/translations/lt_LT.ts @@ -1,1664 +1,2089 @@ + - - - - 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... - - - - InstallDirSelect - - - shadPS4 - Choose directory - shadPS4 - Choose directory - - - - Select which directory you want to install to. - Select which directory you want to install to. - - - - 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 - - - - Apgaulės / Pleistrai - Cheats / Patches - - - - SFO Viewer - SFO Viewer - - - - Trophy Viewer - Trophy Viewer - - - - Open Folder... - Atidaryti Katalogą... - - - - Open Game Folder - Atidaryti Žaidimo Katalogą - - - - Open Save Data Folder - Atidaryti Išsaugotų Duomenų Katalogą - - - - Open Log Folder - Atidaryti Žurnalų Katalogą - - - - Copy info... - Copy info... - - - - Copy Name - Copy Name - - - - Copy Serial - Copy Serial - - - - Copy All - Copy All - - - - Delete... - Delete... - - - - Delete Game - Delete Game - - - - Delete Update - Delete Update - - - - Delete DLC - Delete DLC - - - - Compatibility... - Compatibility... - - - - Update database - Update database - - - - View report - View report - - - - Submit a report - Submit a report - - - - Shortcut creation - Shortcut creation - - - - Shortcut created successfully! - Shortcut created successfully! - - - - Error - Error - - - - Error creating shortcut! - Error creating shortcut! - - - - Install PKG - Install PKG - - - - Game - Game - - - - requiresEnableSeparateUpdateFolder_MSG - This feature requires the 'Enable Separate Update Folder' config option to work. If you want to use this feature, please enable it. - - - - This game has no update to delete! - This game has no update to delete! - - - - Update - Update - - - - This game has no DLC to delete! - This game has no DLC to delete! - - - - DLC - DLC - - - - Delete %1 - Delete %1 - - - - Are you sure you want to delete %1's %2 directory? - Are you sure you want to delete %1's %2 directory? - - - - MainWindow - - - Open/Add Elf Folder - Open/Add Elf Folder - - - - Install Packages (PKG) - Install Packages (PKG) - - - - Boot Game - Boot Game - - - - Check for Updates - Patikrinti atnaujinimus - - - - 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 - - - - Download Cheats/Patches - Atsisiųsti Apgaules / Pleistrus - - - - 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 - - - - Help - Pagalba - - - - 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 - - - - Enable Separate Update Folder - Enable Separate Update Folder - - - - Show Splash - Show Splash - - - - Is PS4 Pro - Is PS4 Pro - - - - Enable Discord Rich Presence - Įjungti Discord Rich Presence - - - - Username - Username - - - - Trophy Key - Trophy Key - - - - Trophy - Trophy - - - - Logger - Logger - - - - Log Type - Log Type - - - - Log Filter - Log Filter - - - - Input - Įvestis - - - - Cursor - Žymeklis - - - - Hide Cursor - Slėpti žymeklį - - - - Hide Cursor Idle Timeout - Žymeklio paslėpimo neveikimo laikas - - - - s - s - - - - Controller - Valdiklis - - - - Back Button Behavior - Atgal mygtuko elgsena - - - - 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 - - - - Paths - Keliai - - - - Game Folders - Žaidimų aplankai - - - - Add... - Pridėti... - - - - Remove - Pašalinti - - - - 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 - - - - Update - Atnaujinimas - - - - Check for Updates at Startup - Tikrinti naujinimus paleidus - - - - Update Channel - Atnaujinimo Kanalas - - - - Check for Updates - Patikrinkite atnaujinimus - - - - GUI Settings - GUI Nustatymai - - - - Disable Trophy Pop-ups - Disable Trophy Pop-ups - - - - Play title music - Groti antraštės muziką - - - - Update Compatibility Database On Startup - Update Compatibility Database On Startup - - - - Game Compatibility - Game Compatibility - - - - Display Compatibility Data - Display Compatibility Data - - - - Update Compatibility Database - Update Compatibility Database - - - - Volume - Garsumas - - - - Audio Backend - Audio Backend - - - - MainWindow - - - Game List - Žaidimų sąrašas - - - - * 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! - Rasta atnaujinimą! - - - - PKG and Game versions match: - PKG ir žaidimo versijos sutampa: - - - - Would you like to overwrite? - Ar norite perrašyti? - - - - PKG Version %1 is older than installed version: - PKG versija %1 yra senesnė nei įdiegta versija: - - - - Game is installed: - Žaidimas įdiegtas: - - - - Would you like to install Patch: - Ar norite įdiegti atnaujinimą: - - - - DLC Installation - DLC diegimas - - - - Would you like to install DLC: %1? - Ar norite įdiegti DLC: %1? - - - - DLC already installed: - DLC jau įdiegtas: - - - - Game already installed - Žaidimas jau įdiegtas - - - - 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 for - Cheats / Patches for - - - - 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. Jei pleistras nepasirodo, gali būti, kad jo nėra tam tikram žaidimo serijos numeriui ir versijai. - - - - Failed to parse JSON data from HTML. - Nepavyko išanalizuoti JSON duomenų iš HTML. - - - - Failed to retrieve HTML page. - Nepavyko gauti HTML puslapio. - - - - The game is in version: %1 - Žaidimas yra versijoje: %1 - - - - The downloaded patch only works on version: %1 - Parsisiųstas pataisas veikia tik versijoje: %1 - - - - You may need to update your game. - Gali tekti atnaujinti savo žaidimą. - - - - Incompatibility Notice - Suderinamumo pranešimas - - - - 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: - - - - Can't apply cheats before the game is started - Negalima taikyti sukčiavimų prieš pradedant žaidimą. - - - - SettingsDialog - - - Save - Įrašyti - - - - Apply - Taikyti - - - - Restore Defaults - Atkurti numatytuosius nustatymus - - - - Close - Uždaryti - - - - Point your mouse at an option to display its description. - Žymeklį nukreipkite ant pasirinkimo, kad pamatytumėte jo aprašymą. - - - - consoleLanguageGroupBox - Konsole kalba:\nNustato kalbą, kurią naudoja PS4 žaidimai.\nRekomenduojama nustatyti kalbą, kurią palaiko žaidimas, priklausomai nuo regiono. - - - - emulatorLanguageGroupBox - Emuliatoriaus kalba:\nNustato emuliatoriaus vartotojo sąsajos kalbą. - - - - fullscreenCheckBox - Įjungti visą ekraną:\nAutomatiškai perjungia žaidimo langą į viso ekrano režimą.\nTai galima išjungti paspaudus F11 klavišą. - - - - separateUpdatesCheckBox - Enable Separate Update Folder:\nEnables installing game updates into a separate folder for easy management. - - - - showSplashCheckBox - Rodyti paleidimo ekraną:\nPaleidimo metu rodo žaidimo paleidimo ekraną (ypatingą vaizdą). - - - - ps4proCheckBox - Ar PS4 Pro:\nPadaro, kad emuliatorius veiktų kaip PS4 PRO, kas gali įjungti specialias funkcijas žaidimuose, kurie tai palaiko. - - - - discordRPCCheckbox - Įjungti Discord Rich Presence:\nRodo emuliatoriaus ikoną ir susijusią informaciją jūsų Discord profilyje. - - - - userName - Vartotojo vardas:\nNustato PS4 paskyros vartotojo vardą, kuris gali būti rodomas kai kuriuose žaidimuose. - - - - TrophyKey - Trophy Key:\nKey used to decrypt trophies. Must be obtained from your jailbroken console.\nMust contain only hex characters. - - - - logTypeGroupBox - Žurnalo tipas:\nNustato, ar sinchronizuoti žurnalo lango išvestį našumui. Tai gali turėti neigiamą poveikį emuliacijai. - - - - logFilter - Žurnalo filtras:\nFiltruojamas žurnalas, kad būtų spausdinama tik konkreti informacija.\nPavyzdžiai: "Core:Trace" "Lib.Pad:Debug Common.Filesystem:Error" "*:Critical" Lygiai: Trace, Debug, Info, Warning, Error, Critical - šia tvarka, konkretus lygis nutildo visus ankstesnius lygius sąraše ir registruoja visus vėlesnius. - - - - updaterGroupBox - Atnaujinti:\nRelease: Oficialios versijos, išleidžiamos kiekvieną mėnesį, kurios gali būti labai pasenusios, tačiau yra patikimos ir išbandytos.\nNightly: Vystymo versijos, kuriose yra visos naujausios funkcijos ir taisymai, tačiau gali turėti klaidų ir būti mažiau stabilios. - - - - GUIgroupBox - Groti antraščių muziką:\nJei žaidimas tai palaiko, įjungia specialios muzikos grojimą, kai pasirinkite žaidimą GUI. - - - - disableTrophycheckBox - Disable Trophy Pop-ups:\nDisable in-game trophy notifications. Trophy progress can still be tracked using the Trophy Viewer (right-click the game in the main window). - - - - hideCursorGroupBox - Slėpti žymeklį:\nPasirinkite, kada žymeklis dings:\nNiekuomet: Visada matysite pelę.\nNeaktyvus: Nustatykite laiką, po kurio ji dings, kai bus neaktyvi.\nVisada: niekada nematysite pelės. - - - - idleTimeoutGroupBox - Nustatykite laiką, po kurio pelė dings, kai bus neaktyvi. - - - - backButtonBehaviorGroupBox - Atgal mygtuko elgesys:\nNustato valdiklio atgal mygtuką imituoti paspaudimą nurodytoje vietoje PS4 jutiklinėje plokštėje. - - - - enableCompatibilityCheckBox - Display Compatibility Data:\nDisplays game compatibility information in table view. Enable "Update Compatibility On Startup" to get up-to-date information. - - - - checkCompatibilityOnStartupCheckBox - Update Compatibility On Startup:\nAutomatically update the compatibility database when shadPS4 starts. - - - - updateCompatibilityButton - Update Compatibility Database:\nImmediately update the compatibility database. - - - - Never - Niekada - - - - Idle - Neaktyvus - - - - Always - Visada - - - - Touchpad Left - Jutiklinis Paviršius Kairėje - - - - Touchpad Right - Jutiklinis Paviršius Dešinėje - - - - Touchpad Center - Jutiklinis Paviršius Centre - - - - None - Nieko - - - - graphicsAdapterGroupBox - Grafikos įrenginys:\nDaugiagrafikėse sistemose pasirinkite GPU, kurį emuliatorius naudos iš išskleidžiamojo sąrašo,\n arba pasirinkite "Auto Select", kad jis būtų nustatytas automatiškai. - - - - resolutionLayout - Plotis/Aukštis:\nNustato emuliatoriaus lango dydį paleidimo metu, kurį galima keisti žaidimo metu.\nTai skiriasi nuo žaidimo rezoliucijos. - - - - heightDivider - Vblank daliklis:\nKadrų dažnis, kuriuo emuliatorius atnaujinamas, dauginamas iš šio skaičiaus. Pakeitus tai gali turėti neigiamą poveikį, pvz., padidinti žaidimo greitį arba sukelti kritinių žaidimo funkcijų sugadinimą, kurios to nesitikėjo! - - - - dumpShadersCheckBox - Įjungti šešėlių išmetimą:\nTechninio derinimo tikslais saugo žaidimo šešėlius į aplanką juos renderuojant. - - - - nullGpuCheckBox - Įjungti tuščią GPU:\nTechninio derinimo tikslais išjungia žaidimo renderiavimą, tarsi nebūtų grafikos plokštės. - - - - gameFoldersBox - Žaidimų aplankai:\nAplankų sąrašas, kurį reikia patikrinti, ar yra įdiegtų žaidimų. - - - - addFolderButton - Pridėti:\nPridėti aplanką į sąrašą. - - - - removeFolderButton - Pašalinti:\nPašalinti aplanką iš sąrašo. - - - - debugDump - Įjungti derinimo išmetimą:\nIšsaugo importo ir eksporto simbolius bei failo antraštės informaciją apie šiuo metu vykdomą PS4 programą į katalogą. - - - - vkValidationCheckBox - Įjungti Vulkan patvirtinimo sluoksnius:\nĮjungia sistemą, kuri patvirtina Vulkan renderio būseną ir registruoja informaciją apie jo vidinę būseną. Tai sumažins našumą ir tikriausiai pakeis emuliacijos elgesį. - - - - vkSyncValidationCheckBox - Įjungti Vulkan sinchronizacijos patvirtinimą:\nĮjungia sistemą, kuri patvirtina Vulkan renderavimo užduočių laiką. Tai sumažins našumą ir tikriausiai pakeis emuliacijos elgesį. - - - - rdocCheckBox - Įjungti RenderDoc derinimą:\nJei įjungta, emuliatorius suteiks suderinamumą su Renderdoc, kad būtų galima užfiksuoti ir analizuoti šiuo metu renderuojamą kadrą. - - - - GameListFrame - - - Icon - Ikona - - - - Name - Vardas - - - - Serial - Serijinis numeris - - - - Compatibility - Compatibility - - - - Region - Regionas - - - - Firmware - Firmvare - - - - Size - Dydis - - - - Version - Versija - - - - Path - Kelias - - - - Play Time - Žaidimo laikas - - - - Never Played - Never Played - - - - h - h - - - - m - m - - - - s - s - - - - Compatibility is untested - Compatibility is untested - - - - Game does not initialize properly / crashes the emulator - Game does not initialize properly / crashes the emulator - - - - Game boots, but only displays a blank screen - Game boots, but only displays a blank screen - - - - Game displays an image but does not go past the menu - Game displays an image but does not go past the menu - - - - Game has game-breaking glitches or unplayable performance - Game has game-breaking glitches or unplayable performance - - - - Game can be completed with playable performance and no major glitches - Game can be completed with playable performance and no major glitches - - - - CheckUpdate - - - Auto Updater - Automatinis atnaujinimas - - - - Error - Klaida - - - - Network error: - Tinklo klaida: - - - - Failed to parse update information. - Nepavyko išanalizuoti atnaujinimo informacijos. - - - - No pre-releases found. - Išankstinių leidimų nerasta. - - - - Invalid release data. - Neteisingi leidimo duomenys. - - - - No download URL found for the specified asset. - Nerasta atsisiuntimo URL nurodytam turtui. - - - - Your version is already up to date! - Jūsų versija jau atnaujinta! - - - - Update Available - Prieinama atnaujinimas - - - - Update Channel - Atnaujinimo Kanalas - - - - Current Version - Esama versija - - - - Latest Version - Paskutinė versija - - - - Do you want to update? - Ar norite atnaujinti? - - - - Show Changelog - Rodyti pakeitimų sąrašą - - - - Check for Updates at Startup - Tikrinti naujinimus paleidus - - - - Update - Atnaujinti - - - - No - Ne - - - - Hide Changelog - Slėpti pakeitimų sąrašą - - - - Changes - Pokyčiai - - - - Network error occurred while trying to access the URL - Tinklo klaida bandant pasiekti URL - - - - Download Complete - Atsisiuntimas baigtas - - - - The update has been downloaded, press OK to install. - Atnaujinimas buvo atsisiųstas, paspauskite OK, kad įdiegtumėte. - - - - Failed to save the update file at - Nepavyko išsaugoti atnaujinimo failo - - - - Starting Update... - Pradedama atnaujinimas... - - - - Failed to create the update script file - Nepavyko sukurti atnaujinimo scenarijaus failo - - - - GameListUtils - - - B - B - - - - KB - KB - - - - MB - MB - - - - GB - GB - - - - TB - TB - - - \ No newline at end of file + + + AboutDialog + + About shadPS4 + Apie 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. + Ši programa neturėtų būti naudojama žaidimams kurių neturite legaliai įsigiję. + + + + CheatsPatches + + Cheats / Patches for + Cheats / Patches for + + + 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:\n + 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:\n + + + 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 + + + No Cheats found for this game in this version of the selected repository,try another repository or a different version of the game. + 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 + + + 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. + 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 + + + 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. If the patch does not appear, it may be that it does not exist for the specific serial and version of the game. + 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. Jei pleistras nepasirodo, gali būti, kad jo nėra tam tikram žaidimo serijos numeriui ir versijai. + + + Failed to parse JSON data from HTML. + Nepavyko išanalizuoti JSON duomenų iš HTML. + + + Failed to retrieve HTML page. + Nepavyko gauti HTML puslapio. + + + The game is in version: %1 + Žaidimas yra versijoje: %1 + + + The downloaded patch only works on version: %1 + Parsisiųstas pataisas veikia tik versijoje: %1 + + + You may need to update your game. + Gali tekti atnaujinti savo žaidimą. + + + Incompatibility Notice + Suderinamumo pranešimas + + + 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: + + + Can't apply cheats before the game is started + Negalima taikyti sukčiavimų prieš pradedant žaidimą. + + + Close + Uždaryti + + + + CheckUpdate + + Auto Updater + Automatinis atnaujinimas + + + Error + Klaida + + + Network error: + Tinklo klaida: + + + The Auto Updater allows up to 60 update checks per hour.\nYou have reached this limit. Please try again later. + Automatinis atnaujinimas leidžia iki 60 atnaujinimų patikrinimų per valandą.\nJūs pasiekėte šią ribą. Bandykite dar kartą vėliau. + + + Failed to parse update information. + Nepavyko išanalizuoti atnaujinimo informacijos. + + + No pre-releases found. + Išankstinių leidimų nerasta. + + + Invalid release data. + Neteisingi leidimo duomenys. + + + No download URL found for the specified asset. + Nerasta atsisiuntimo URL nurodytam turtui. + + + Your version is already up to date! + Jūsų versija jau atnaujinta! + + + Update Available + Prieinama atnaujinimas + + + Update Channel + Atnaujinimo Kanalas + + + Current Version + Esama versija + + + Latest Version + Paskutinė versija + + + Do you want to update? + Ar norite atnaujinti? + + + Show Changelog + Rodyti pakeitimų sąrašą + + + Check for Updates at Startup + Tikrinti naujinimus paleidus + + + Update + Atnaujinti + + + No + Ne + + + Hide Changelog + Slėpti pakeitimų sąrašą + + + Changes + Pokyčiai + + + Network error occurred while trying to access the URL + Tinklo klaida bandant pasiekti URL + + + Download Complete + Atsisiuntimas baigtas + + + The update has been downloaded, press OK to install. + Atnaujinimas buvo atsisiųstas, paspauskite OK, kad įdiegtumėte. + + + Failed to save the update file at + Nepavyko išsaugoti atnaujinimo failo + + + Starting Update... + Pradedama atnaujinimas... + + + Failed to create the update script file + Nepavyko sukurti atnaujinimo scenarijaus failo + + + + CompatibilityInfoClass + + Fetching compatibility data, please wait + Naudojamos suderinamumo duomenis, prašome palaukti + + + Cancel + Atšaukti + + + Loading... + Kraunama... + + + Error + Klaida + + + Unable to update compatibility data! Try again later. + Negalima atnaujinti suderinamumo duomenų! Bandykite vėliau. + + + Unable to open compatibility_data.json for writing. + Negalima atidaryti compatibility_data.json failo rašymui. + + + Unknown + Nežinoma + + + Nothing + Nėra + + + Boots + Batai + + + Menus + Meniu + + + Ingame + Žaidime + + + Playable + Žaidžiamas + + + + ControlSettings + + Configure Controls + Configure Controls + + + D-Pad + D-Pad + + + Up + Up + + + Left + Left + + + Right + Right + + + Down + Down + + + Left Stick Deadzone (def:2 max:127) + Left Stick Deadzone (def:2 max:127) + + + Left Deadzone + Left Deadzone + + + Left Stick + Left Stick + + + Config Selection + Config Selection + + + Common Config + Common Config + + + Use per-game configs + Use per-game configs + + + L1 / LB + L1 / LB + + + L2 / LT + L2 / LT + + + Back + Atgal + + + R1 / RB + R1 / RB + + + R2 / RT + R2 / RT + + + L3 + L3 + + + Options / Start + Options / Start + + + R3 + R3 + + + Face Buttons + Face Buttons + + + Triangle / Y + Triangle / Y + + + Square / X + Square / X + + + Circle / B + Circle / B + + + Cross / A + Cross / A + + + Right Stick Deadzone (def:2, max:127) + Right Stick Deadzone (def:2, max:127) + + + Right Deadzone + Right Deadzone + + + Right Stick + Right Stick + + + Color Adjustment + Spalvų Reguliavimas + + + R: + R: + + + G: + G: + + + B: + B: + + + Override Lightbar Color + Override Lightbar Color + + + Override Color + Override Color + + + Unable to Save + Nepavyko Išsaugoti + + + Cannot bind axis values more than once + Cannot bind axis values more than once + + + Save + Save + + + Apply + Apply + + + Restore Defaults + Restore Defaults + + + Cancel + Atšaukti + + + + EditorDialog + + Edit Keyboard + Mouse and Controller input bindings + Edit Keyboard + Mouse and Controller input bindings + + + Use Per-Game configs + Use Per-Game configs + + + Error + Error + + + Could not open the file for reading + Could not open the file for reading + + + Could not open the file for writing + Could not open the file for writing + + + Save Changes + Išsaugoti Pakeitimus + + + Do you want to save changes? + Ar norite išsaugoti pakeitimus? + + + Help + Pagalba + + + Do you want to reset your custom default config to the original default config? + Do you want to reset your custom default config to the original default config? + + + Do you want to reset this config to your custom default config? + Do you want to reset this config to your custom default config? + + + Reset to Default + Reset to Default + + + + 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 + + + Directory to install DLC + Directory to install DLC + + + + GameListFrame + + Icon + Ikona + + + Name + Vardas + + + Serial + Serijinis numeris + + + Compatibility + Compatibility + + + Region + Regionas + + + Firmware + Firmvare + + + Size + Dydis + + + Version + Versija + + + Path + Kelias + + + Play Time + Žaidimo laikas + + + Never Played + Never Played + + + h + h + + + m + m + + + s + s + + + Compatibility is untested + Compatibility is untested + + + Game does not initialize properly / crashes the emulator + Game does not initialize properly / crashes the emulator + + + Game boots, but only displays a blank screen + Game boots, but only displays a blank screen + + + Game displays an image but does not go past the menu + Game displays an image but does not go past the menu + + + Game has game-breaking glitches or unplayable performance + Game has game-breaking glitches or unplayable performance + + + Game can be completed with playable performance and no major glitches + Game can be completed with playable performance and no major glitches + + + Click to see details on github + Spustelėkite, kad pamatytumėte detales GitHub + + + Last updated + Paskutinį kartą atnaujinta + + + + GameListUtils + + B + B + + + KB + KB + + + MB + MB + + + GB + GB + + + TB + TB + + + + GuiContextMenus + + Create Shortcut + Create Shortcut + + + Cheats / Patches + Cheats / Patches + + + SFO Viewer + SFO Viewer + + + Trophy Viewer + Trophy Viewer + + + Open Folder... + Atidaryti Katalogą... + + + Open Game Folder + Atidaryti Žaidimo Katalogą + + + Open Save Data Folder + Atidaryti Išsaugotų Duomenų Katalogą + + + Open Log Folder + Atidaryti Žurnalų Katalogą + + + Copy info... + Copy info... + + + Copy Name + Copy Name + + + Copy Serial + Copy Serial + + + Copy Version + Copy Version + + + Copy Size + Copy Size + + + Copy All + Copy All + + + Delete... + Delete... + + + Delete Game + Delete Game + + + Delete Update + Delete Update + + + Delete DLC + Delete DLC + + + Delete Trophy + Delete Trophy + + + Compatibility... + Compatibility... + + + Update database + Update database + + + View report + View report + + + Submit a report + Submit a report + + + Shortcut creation + Shortcut creation + + + Shortcut created successfully! + Shortcut created successfully! + + + Error + Klaida + + + Error creating shortcut! + Error creating shortcut! + + + Game + Žaidimas + + + This game has no update to delete! + This game has no update to delete! + + + Update + Update + + + This game has no DLC to delete! + This game has no DLC to delete! + + + DLC + DLC + + + Delete %1 + Delete %1 + + + Are you sure you want to delete %1's %2 directory? + Are you sure you want to delete %1's %2 directory? + + + Open Update Folder + Open Update Folder + + + Delete Save Data + Delete Save Data + + + This game has no update folder to open! + This game has no update folder to open! + + + No log file found for this game! + No log file found for this game! + + + Failed to convert icon. + Failed to convert icon. + + + This game has no save data to delete! + This game has no save data to delete! + + + This game has no saved trophies to delete! + This game has no saved trophies to delete! + + + Save Data + Save Data + + + Trophy + Trophy + + + SFO Viewer for + SFO Viewer for + + + + HelpDialog + + Quickstart + Quickstart + + + FAQ + FAQ + + + Syntax + Syntax + + + Special Bindings + Special Bindings + + + Keybindings + Keybindings + + + + KBMSettings + + Configure Controls + Configure Controls + + + D-Pad + D-Pad + + + Up + Up + + + unmapped + unmapped + + + Left + Left + + + Right + Right + + + Down + Down + + + Left Analog Halfmode + Left Analog Halfmode + + + hold to move left stick at half-speed + hold to move left stick at half-speed + + + Left Stick + Left Stick + + + Config Selection + Config Selection + + + Common Config + Common Config + + + Use per-game configs + Use per-game configs + + + L1 + L1 + + + L2 + L2 + + + Text Editor + Text Editor + + + Help + Help + + + R1 + R1 + + + R2 + R2 + + + L3 + L3 + + + Touchpad Click + Touchpad Click + + + Mouse to Joystick + Mouse to Joystick + + + *press F7 ingame to activate + *press F7 ingame to activate + + + R3 + R3 + + + Options + Options + + + Mouse Movement Parameters + Mouse Movement Parameters + + + note: click Help Button/Special Keybindings for more information + note: click Help Button/Special Keybindings for more information + + + Face Buttons + Face Buttons + + + Triangle + Triangle + + + Square + Square + + + Circle + Circle + + + Cross + Cross + + + Right Analog Halfmode + Right Analog Halfmode + + + hold to move right stick at half-speed + hold to move right stick at half-speed + + + Right Stick + Right Stick + + + Speed Offset (def 0.125): + Speed Offset (def 0.125): + + + Copy from Common Config + Copy from Common Config + + + Deadzone Offset (def 0.50): + Deadzone Offset (def 0.50): + + + Speed Multiplier (def 1.0): + Speed Multiplier (def 1.0): + + + Common Config Selected + Common Config Selected + + + This button copies mappings from the Common Config to the currently selected profile, and cannot be used when the currently selected profile is the Common Config. + This button copies mappings from the Common Config to the currently selected profile, and cannot be used when the currently selected profile is the Common Config. + + + Copy values from Common Config + Copy values from Common Config + + + Do you want to overwrite existing mappings with the mappings from the Common Config? + Do you want to overwrite existing mappings with the mappings from the Common Config? + + + Unable to Save + Unable to Save + + + Cannot bind any unique input more than once + Cannot bind any unique input more than once + + + Press a key + Press a key + + + Cannot set mapping + Cannot set mapping + + + Mousewheel cannot be mapped to stick outputs + Mousewheel cannot be mapped to stick outputs + + + Save + Save + + + Apply + Apply + + + Restore Defaults + Restore Defaults + + + Cancel + Cancel + + + + MainWindow + + Open/Add Elf Folder + Open/Add Elf Folder + + + Boot Game + Boot Game + + + Check for Updates + Patikrinti atnaujinimus + + + About shadPS4 + About shadPS4 + + + Configure... + Configure... + + + Recent Games + Recent Games + + + Open shadPS4 Folder + Open shadPS4 Folder + + + 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 + + + Download Cheats/Patches + Atsisiųsti Apgaules / Pleistrus + + + Dump Game List + Dump Game List + + + Trophy Viewer + Trophy Viewer + + + No games found. Please add your games to your library first. + No games found. Please add your games to your library first. + + + Search... + Search... + + + File + File + + + View + View + + + Game List Icons + Game List Icons + + + Game List Mode + Game List Mode + + + Settings + Settings + + + Utils + Utils + + + Themes + Themes + + + Help + Pagalba + + + Dark + Dark + + + Light + Light + + + Green + Green + + + Blue + Blue + + + Violet + Violet + + + toolBar + toolBar + + + Game List + Žaidimų sąrašas + + + * 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: + + + 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ą! + + + Run Game + Run Game + + + Eboot.bin file not found + Eboot.bin file not found + + + Game is already running! + Game is already running! + + + shadPS4 + shadPS4 + + + Play + Play + + + Pause + Pause + + + Stop + Stop + + + Restart + Restart + + + Full Screen + Full Screen + + + Controllers + Controllers + + + Keyboard + Keyboard + + + Refresh List + Refresh List + + + Resume + Resume + + + Show Labels Under Icons + Show Labels Under Icons + + + + SettingsDialog + + Settings + Settings + + + General + General + + + System + System + + + Console Language + Console Language + + + Emulator Language + Emulator Language + + + Emulator + Emulator + + + Enable Separate Update Folder + Enable Separate Update Folder + + + Default tab when opening settings + Numatytoji kortelė atidarius nustatymus + + + Show Game Size In List + Rodyti žaidimo dydį sąraše + + + Show Splash + Show Splash + + + Enable Discord Rich Presence + Įjungti Discord Rich Presence + + + Username + Username + + + Trophy Key + Trophy Key + + + Trophy + Trophy + + + Open the custom trophy images/sounds folder + Open the custom trophy images/sounds folder + + + Logger + Logger + + + Log Type + Log Type + + + Log Filter + Log Filter + + + Open Log Location + Atidaryti žurnalo vietą + + + Input + Įvestis + + + Cursor + Žymeklis + + + Hide Cursor + Slėpti žymeklį + + + Hide Cursor Idle Timeout + Žymeklio paslėpimo neveikimo laikas + + + s + s + + + Controller + Valdiklis + + + Back Button Behavior + Atgal mygtuko elgsena + + + Graphics + Graphics + + + GUI + Interfeisa + + + User + Naudotojas + + + Graphics Device + Graphics Device + + + Vblank Divider + Vblank Divider + + + Advanced + Advanced + + + Enable Shaders Dumping + Enable Shaders Dumping + + + Enable NULL GPU + Enable NULL GPU + + + Enable HDR + Enable HDR + + + Paths + Keliai + + + Game Folders + Žaidimų aplankai + + + Add... + Pridėti... + + + Remove + Pašalinti + + + 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 + + + Enable Crash Diagnostics + Enable Crash Diagnostics + + + Collect Shaders + Collect Shaders + + + Copy GPU Buffers + Copy GPU Buffers + + + Host Debug Markers + Host Debug Markers + + + Guest Debug Markers + Guest Debug Markers + + + Update + Atnaujinimas + + + Check for Updates at Startup + Tikrinti naujinimus paleidus + + + Always Show Changelog + Visada rodyti pakeitimų žurnalą + + + Update Channel + Atnaujinimo Kanalas + + + Check for Updates + Patikrinkite atnaujinimus + + + GUI Settings + GUI Nustatymai + + + Title Music + Title Music + + + Disable Trophy Notification + Disable Trophy Notification + + + Background Image + Background Image + + + Show Background Image + Show Background Image + + + Opacity + Opacity + + + Play title music + Groti antraštės muziką + + + Update Compatibility Database On Startup + Update Compatibility Database On Startup + + + Game Compatibility + Game Compatibility + + + Display Compatibility Data + Display Compatibility Data + + + Update Compatibility Database + Update Compatibility Database + + + Volume + Garsumas + + + Save + Įrašyti + + + Apply + Taikyti + + + Restore Defaults + Atkurti numatytuosius nustatymus + + + Close + Uždaryti + + + Point your mouse at an option to display its description. + Žymeklį nukreipkite ant pasirinkimo, kad pamatytumėte jo aprašymą. + + + Console Language:\nSets the language that the PS4 game uses.\nIt's recommended to set this to a language the game supports, which will vary by region. + Konsole kalba:\nNustato kalbą, kurią naudoja PS4 žaidimai.\nRekomenduojama nustatyti kalbą, kurią palaiko žaidimas, priklausomai nuo regiono. + + + Emulator Language:\nSets the language of the emulator's user interface. + Emuliatoriaus kalba:\nNustato emuliatoriaus vartotojo sąsajos kalbą. + + + Enable Separate Update Folder:\nEnables installing game updates into a separate folder for easy management.\nThis can be manually created by adding the extracted update to the game folder with the name "CUSA00000-UPDATE" where the CUSA ID matches the game's ID. + Enable Separate Update Folder:\nEnables installing game updates into a separate folder for easy management.\nThis can be manually created by adding the extracted update to the game folder with the name "CUSA00000-UPDATE" where the CUSA ID matches the game's ID. + + + Show Splash Screen:\nShows the game's splash screen (a special image) while the game is starting. + Rodyti paleidimo ekraną:\nPaleidimo metu rodo žaidimo paleidimo ekraną (ypatingą vaizdą). + + + Enable Discord Rich Presence:\nDisplays the emulator icon and relevant information on your Discord profile. + Įjungti Discord Rich Presence:\nRodo emuliatoriaus ikoną ir susijusią informaciją jūsų Discord profilyje. + + + Username:\nSets the PS4's account username, which may be displayed by some games. + Vartotojo vardas:\nNustato PS4 paskyros vartotojo vardą, kuris gali būti rodomas kai kuriuose žaidimuose. + + + Trophy Key:\nKey used to decrypt trophies. Must be obtained from your jailbroken console.\nMust contain only hex characters. + Trophy Key:\nKey used to decrypt trophies. Must be obtained from your jailbroken console.\nMust contain only hex characters. + + + Log Type:\nSets whether to synchronize the output of the log window for performance. May have adverse effects on emulation. + Žurnalo tipas:\nNustato, ar sinchronizuoti žurnalo lango išvestį našumui. Tai gali turėti neigiamą poveikį emuliacijai. + + + Log Filter:\nFilters the log to only print specific information.\nExamples: "Core:Trace" "Lib.Pad:Debug Common.Filesystem:Error" "*:Critical"\nLevels: Trace, Debug, Info, Warning, Error, Critical - in this order, a specific level silences all levels preceding it in the list and logs every level after it. + Žurnalo filtras:\nFiltruojamas žurnalas, kad būtų spausdinama tik konkreti informacija.\nPavyzdžiai: "Core:Trace" "Lib.Pad:Debug Common.Filesystem:Error" "*:Critical" Lygiai: Trace, Debug, Info, Warning, Error, Critical - šia tvarka, konkretus lygis nutildo visus ankstesnius lygius sąraše ir registruoja visus vėlesnius. + + + Update:\nRelease: Official versions released every month that may be very outdated, but are more reliable and tested.\nNightly: Development versions that have all the latest features and fixes, but may contain bugs and are less stable. + Atnaujinti:\nRelease: Oficialios versijos, išleidžiamos kiekvieną mėnesį, kurios gali būti labai pasenusios, tačiau yra patikimos ir išbandytos.\nNightly: Vystymo versijos, kuriose yra visos naujausios funkcijos ir taisymai, tačiau gali turėti klaidų ir būti mažiau stabilios. + + + Background Image:\nControl the opacity of the game background image. + Background Image:\nControl the opacity of the game background image. + + + Play Title Music:\nIf a game supports it, enable playing special music when selecting the game in the GUI. + Groti antraščių muziką:\nJei žaidimas tai palaiko, įjungia specialios muzikos grojimą, kai pasirinkite žaidimą GUI. + + + Disable Trophy Pop-ups:\nDisable in-game trophy notifications. Trophy progress can still be tracked using the Trophy Viewer (right-click the game in the main window). + Disable Trophy Pop-ups:\nDisable in-game trophy notifications. Trophy progress can still be tracked using the Trophy Viewer (right-click the game in the main window). + + + Hide Cursor:\nChoose when the cursor will disappear:\nNever: You will always see the mouse.\nidle: Set a time for it to disappear after being idle.\nAlways: you will never see the mouse. + Slėpti žymeklį:\nPasirinkite, kada žymeklis dings:\nNiekuomet: Visada matysite pelę.\nNeaktyvus: Nustatykite laiką, po kurio ji dings, kai bus neaktyvi.\nVisada: niekada nematysite pelės. + + + Hide Idle Cursor Timeout:\nThe duration (seconds) after which the cursor that has been idle hides itself. + Slėpti tuščiosios eigos žymeklio skirtąjį laiką:\nTrukmė (sekundėmis), po kurios neaktyvus žymeklis pasislepia. + + + Back Button Behavior:\nSets the controller's back button to emulate tapping the specified position on the PS4 touchpad. + Atgal mygtuko elgesys:\nNustato valdiklio atgal mygtuką imituoti paspaudimą nurodytoje vietoje PS4 jutiklinėje plokštėje. + + + Display Compatibility Data:\nDisplays game compatibility information in table view. Enable "Update Compatibility On Startup" to get up-to-date information. + Display Compatibility Data:\nDisplays game compatibility information in table view. Enable "Update Compatibility On Startup" to get up-to-date information. + + + Update Compatibility On Startup:\nAutomatically update the compatibility database when shadPS4 starts. + Update Compatibility On Startup:\nAutomatically update the compatibility database when shadPS4 starts. + + + Update Compatibility Database:\nImmediately update the compatibility database. + Update Compatibility Database:\nImmediately update the compatibility database. + + + Never + Niekada + + + Idle + Neaktyvus + + + Always + Visada + + + Touchpad Left + Jutiklinis Paviršius Kairėje + + + Touchpad Right + Jutiklinis Paviršius Dešinėje + + + Touchpad Center + Jutiklinis Paviršius Centre + + + None + Nieko + + + Graphics Device:\nOn multiple GPU systems, select the GPU the emulator will use from the drop down list,\nor select "Auto Select" to automatically determine it. + Grafikos įrenginys:\nDaugiagrafikėse sistemose pasirinkite GPU, kurį emuliatorius naudos iš išskleidžiamojo sąrašo,\n arba pasirinkite "Auto Select", kad jis būtų nustatytas automatiškai. + + + Width/Height:\nSets the size of the emulator window at launch, which can be resized during gameplay.\nThis is different from the in-game resolution. + Plotis/Aukštis:\nNustato emuliatoriaus lango dydį paleidimo metu, kurį galima keisti žaidimo metu.\nTai skiriasi nuo žaidimo rezoliucijos. + + + Vblank Divider:\nThe frame rate at which the emulator refreshes at is multiplied by this number. Changing this may have adverse effects, such as increasing the game speed, or breaking critical game functionality that does not expect this to change! + Vblank daliklis:\nKadrų dažnis, kuriuo emuliatorius atnaujinamas, dauginamas iš šio skaičiaus. Pakeitus tai gali turėti neigiamą poveikį, pvz., padidinti žaidimo greitį arba sukelti kritinių žaidimo funkcijų sugadinimą, kurios to nesitikėjo! + + + Enable Shaders Dumping:\nFor the sake of technical debugging, saves the games shaders to a folder as they render. + Įjungti šešėlių išmetimą:\nTechninio derinimo tikslais saugo žaidimo šešėlius į aplanką juos renderuojant. + + + Enable Null GPU:\nFor the sake of technical debugging, disables game rendering as if there were no graphics card. + Įjungti tuščią GPU:\nTechninio derinimo tikslais išjungia žaidimo renderiavimą, tarsi nebūtų grafikos plokštės. + + + Enable HDR:\nEnables HDR in games that support it.\nYour monitor must have support for the BT2020 PQ color space and the RGB10A2 swapchain format. + Enable HDR:\nEnables HDR in games that support it.\nYour monitor must have support for the BT2020 PQ color space and the RGB10A2 swapchain format. + + + Game Folders:\nThe list of folders to check for installed games. + Žaidimų aplankai:\nAplankų sąrašas, kurį reikia patikrinti, ar yra įdiegtų žaidimų. + + + Add:\nAdd a folder to the list. + Pridėti:\nPridėti aplanką į sąrašą. + + + Remove:\nRemove a folder from the list. + Pašalinti:\nPašalinti aplanką iš sąrašo. + + + Enable Debug Dumping:\nSaves the import and export symbols and file header information of the currently running PS4 program to a directory. + Įjungti derinimo išmetimą:\nIšsaugo importo ir eksporto simbolius bei failo antraštės informaciją apie šiuo metu vykdomą PS4 programą į katalogą. + + + Enable Vulkan Validation Layers:\nEnables a system that validates the state of the Vulkan renderer and logs information about its internal state.\nThis will reduce performance and likely change the behavior of emulation. + Įjungti Vulkan patvirtinimo sluoksnius:\nĮjungia sistemą, kuri patvirtina Vulkan renderio būseną ir registruoja informaciją apie jo vidinę būseną. Tai sumažins našumą ir tikriausiai pakeis emuliacijos elgesį. + + + Enable Vulkan Synchronization Validation:\nEnables a system that validates the timing of Vulkan rendering tasks.\nThis will reduce performance and likely change the behavior of emulation. + Įjungti Vulkan sinchronizacijos patvirtinimą:\nĮjungia sistemą, kuri patvirtina Vulkan renderavimo užduočių laiką.\nTai sumažins našumą ir tikriausiai pakeis emuliacijos elgesį. + + + Enable RenderDoc Debugging:\nIf enabled, the emulator will provide compatibility with Renderdoc to allow capture and analysis of the currently rendered frame. + Įjungti RenderDoc derinimą:\nJei įjungta, emuliatorius suteiks suderinamumą su Renderdoc, kad būtų galima užfiksuoti ir analizuoti šiuo metu renderuojamą kadrą. + + + Collect Shaders:\nYou need this enabled to edit shaders with the debug menu (Ctrl + F10). + Collect Shaders:\nYou need this enabled to edit shaders with the debug menu (Ctrl + F10). + + + Crash Diagnostics:\nCreates a .yaml file with info about the Vulkan state at the time of crashing.\nUseful for debugging 'Device lost' errors. If you have this enabled, you should enable Host AND Guest Debug Markers.\nDoes not work on Intel GPUs.\nYou need Vulkan Validation Layers enabled and the Vulkan SDK for this to work. + Crash Diagnostics:\nCreates a .yaml file with info about the Vulkan state at the time of crashing.\nUseful for debugging 'Device lost' errors. If you have this enabled, you should enable Host AND Guest Debug Markers.\nDoes not work on Intel GPUs.\nYou need Vulkan Validation Layers enabled and the Vulkan SDK for this to work. + + + Copy GPU Buffers:\nGets around race conditions involving GPU submits.\nMay or may not help with PM4 type 0 crashes. + Copy GPU Buffers:\nGets around race conditions involving GPU submits.\nMay or may not help with PM4 type 0 crashes. + + + Host Debug Markers:\nInserts emulator-side information like markers for specific AMDGPU commands around Vulkan commands, as well as giving resources debug names.\nIf you have this enabled, you should enable Crash Diagnostics.\nUseful for programs like RenderDoc. + Host Debug Markers:\nInserts emulator-side information like markers for specific AMDGPU commands around Vulkan commands, as well as giving resources debug names.\nIf you have this enabled, you should enable Crash Diagnostics.\nUseful for programs like RenderDoc. + + + Guest Debug Markers:\nInserts any debug markers the game itself has added to the command buffer.\nIf you have this enabled, you should enable Crash Diagnostics.\nUseful for programs like RenderDoc. + Guest Debug Markers:\nInserts any debug markers the game itself has added to the command buffer.\nIf you have this enabled, you should enable Crash Diagnostics.\nUseful for programs like RenderDoc. + + + Save Data Path:\nThe folder where game save data will be saved. + Save Data Path:\nThe folder where game save data will be saved. + + + Browse:\nBrowse for a folder to set as the save data path. + Browse:\nBrowse for a folder to set as the save data path. + + + Release + Release + + + Nightly + Nightly + + + Set the volume of the background music. + Set the volume of the background music. + + + Enable Motion Controls + Enable Motion Controls + + + Save Data Path + Save Data Path + + + Browse + Browse + + + async + async + + + sync + sync + + + Auto Select + Auto Select + + + Directory to install games + Directory to install games + + + Directory to save data + Directory to save data + + + Video + Video + + + Display Mode + Display Mode + + + Windowed + Windowed + + + Fullscreen + Fullscreen + + + Fullscreen (Borderless) + Fullscreen (Borderless) + + + Window Size + Window Size + + + W: + W: + + + H: + H: + + + Separate Log Files + Separate Log Files + + + Separate Log Files:\nWrites a separate logfile for each game. + Separate Log Files:\nWrites a separate logfile for each game. + + + Trophy Notification Position + Trophy Notification Position + + + Left + Left + + + Right + Right + + + Top + Top + + + Bottom + Bottom + + + Notification Duration + Notification Duration + + + Portable User Folder + Portable User Folder + + + Create Portable User Folder from Common User Folder + Create Portable User Folder from Common User Folder + + + Portable user folder:\nStores shadPS4 settings and data that will be applied only to the shadPS4 build located in the current folder. Restart the app after creating the portable user folder to begin using it. + Portable user folder:\nStores shadPS4 settings and data that will be applied only to the shadPS4 build located in the current folder. Restart the app after creating the portable user folder to begin using it. + + + Cannot create portable user folder + Cannot create portable user folder + + + %1 already exists + %1 already exists + + + Portable user folder created + Portable user folder created + + + %1 successfully created. + %1 successfully created. + + + Open the custom trophy images/sounds folder:\nYou can add custom images to the trophies and an audio.\nAdd the files to custom_trophy with the following names:\ntrophy.wav OR trophy.mp3, bronze.png, gold.png, platinum.png, silver.png\nNote: The sound will only work in QT versions. + Open the custom trophy images/sounds folder:\nYou can add custom images to the trophies and an audio.\nAdd the files to custom_trophy with the following names:\ntrophy.wav OR trophy.mp3, bronze.png, gold.png, platinum.png, silver.png\nNote: The sound will only work in QT versions. + + + + TrophyViewer + + Trophy Viewer + Trophy Viewer + + + Select Game: + Select Game: + + + Progress + Progress + + + Show Earned Trophies + Show Earned Trophies + + + Show Not Earned Trophies + Show Not Earned Trophies + + + Show Hidden Trophies + Show Hidden Trophies + + + diff --git a/src/qt_gui/translations/nb.ts b/src/qt_gui/translations/nb.ts deleted file mode 100644 index 4d3c4f5af..000000000 --- a/src/qt_gui/translations/nb.ts +++ /dev/null @@ -1,1664 +0,0 @@ - - - - - - AboutDialog - - - About shadPS4 - Om shadPS4 - - - - shadPS4 - shadPS4 - - - - shadPS4 is an experimental open-source emulator for the PlayStation 4. - shadPS4 er en eksperimentell åpen kildekode-etterligner for PlayStation 4. - - - - This software should not be used to play games you have not legally obtained. - Denne programvaren skal ikke brukes til å spille spill du ikke har fått lovlig. - - - - ElfViewer - - - Open Folder - Åpne mappe - - - - GameInfoClass - - - Loading game list, please wait :3 - Laster spill-liste, vennligst vent :3 - - - - Cancel - Avbryt - - - - Loading... - Laster... - - - - InstallDirSelect - - - shadPS4 - Choose directory - shadPS4 - Velg mappe - - - - Select which directory you want to install to. - Velg hvilken mappe du vil installere til. - - - - GameInstallDialog - - - shadPS4 - Choose directory - shadPS4 - Velg mappe - - - - Directory to install games - Mappe for å installere spill - - - - Browse - Bla gjennom - - - - Error - Feil - - - - The value for location to install games is not valid. - Stien for å installere spillet er ikke gyldig. - - - - GuiContextMenus - - - Create Shortcut - Lag snarvei - - - - Cheats / Patches - Juks / Programrettelse - - - - SFO Viewer - SFO viser - - - - Trophy Viewer - Trofé viser - - - - Open Folder... - Åpne mappen... - - - - Open Game Folder - Åpne spillmappen - - - - Open Save Data Folder - Åpne lagrede datamappen - - - - Open Log Folder - Åpne loggmappen - - - - Copy info... - Kopier info... - - - - Copy Name - Kopier navn - - - - Copy Serial - Kopier serienummer - - - - Copy All - Kopier alle - - - - Delete... - Slett... - - - - Delete Game - Slett spill - - - - Delete Update - Slett oppdatering - - - - Delete DLC - Slett DLC - - - - Compatibility... - Compatibility... - - - - Update database - Update database - - - - View report - View report - - - - Submit a report - Submit a report - - - - Shortcut creation - Snarvei opprettelse - - - - Shortcut created successfully! - Snarvei opprettet! - - - - Error - Feil - - - - Error creating shortcut! - Feil ved opprettelse av snarvei! - - - - Install PKG - Installer PKG - - - - Game - Spill - - - - requiresEnableSeparateUpdateFolder_MSG - Denne funksjonen krever 'Aktiver seperat oppdateringsmappe' konfigurasjonsalternativet. Hvis du vil bruke denne funksjonen, må du aktiver den. - - - - This game has no update to delete! - Dette spillet har ingen oppdatering å slette! - - - - Update - Oppdater - - - - This game has no DLC to delete! - Dette spillet har ingen DLC å slette! - - - - DLC - DLC - - - - Delete %1 - Slett %1 - - - - Are you sure you want to delete %1's %2 directory? - Er du sikker på at du vil slette %1's %2 directory? - - - - MainWindow - - - Open/Add Elf Folder - Åpne/Legg til Elf-mappe - - - - Install Packages (PKG) - Installer pakker (PKG) - - - - Boot Game - Start spill - - - - Check for Updates - Se etter oppdateringer - - - - About shadPS4 - Om shadPS4 - - - - Configure... - Konfigurer... - - - - Install application from a .pkg file - Installer fra en .pkg fil - - - - Recent Games - Nylige spill - - - - Exit - Avslutt - - - - Exit shadPS4 - Avslutt shadPS4 - - - - Exit the application. - Avslutt programmet. - - - - Show Game List - Vis spill-listen - - - - Game List Refresh - Oppdater spill-listen - - - - Tiny - Bitteliten - - - - Small - Liten - - - - Medium - Medium - - - - Large - Stor - - - - List View - Liste-visning - - - - Grid View - Rute-visning - - - - Elf Viewer - Elf-visning - - - - Game Install Directory - Spillinstallasjons-mappe - - - - Download Cheats/Patches - Last ned juks/programrettelse - - - - Dump Game List - Dump spill-liste - - - - PKG Viewer - PKG viser - - - - Search... - Søk... - - - - File - Fil - - - - View - Oversikt - - - - Game List Icons - Spill-liste ikoner - - - - Game List Mode - Spill-liste modus - - - - Settings - Innstillinger - - - - Utils - Verktøy - - - - Themes - Tema - - - - Help - Hjelp - - - - Dark - Mørk - - - - Light - Lys - - - - Green - Grønn - - - - Blue - Blå - - - - Violet - Lilla - - - - toolBar - Verktøylinje - - - - PKGViewer - - - Open Folder - Åpne mappe - - - - TrophyViewer - - - Trophy Viewer - Trofé viser - - - - SettingsDialog - - - Settings - Innstillinger - - - - General - Generell - - - - System - System - - - - Console Language - Konsollspråk - - - - Emulator Language - Etterlignerspråk - - - - Emulator - Etterligner - - - - Enable Fullscreen - Aktiver fullskjerm - - - - Enable Separate Update Folder - Aktiver seperat oppdateringsmappe - - - - Show Splash - Vis velkomstbilde - - - - Is PS4 Pro - Er PS4 Pro - - - - Enable Discord Rich Presence - Aktiver Discord Rich Presence - - - - Username - Brukernavn - - - - Trophy Key - Trophy Key - - - - Trophy - Trophy - - - - Logger - Logger - - - - Log Type - Logg type - - - - Log Filter - Logg filter - - - - Input - Inndata - - - - Cursor - Musepeker - - - - Hide Cursor - Skjul musepeker - - - - Hide Cursor Idle Timeout - Skjul musepeker ved inaktivitet - - - - s - s - - - - Controller - Kontroller - - - - Back Button Behavior - Tilbakeknapp atferd - - - - Graphics - Grafikk - - - - Graphics Device - Grafikkenhet - - - - Width - Bredde - - - - Height - Høyde - - - - Vblank Divider - Vblank skillelinje - - - - Advanced - Avansert - - - - Enable Shaders Dumping - Aktiver dumping av skyggelegger - - - - Enable NULL GPU - Aktiver NULL GPU - - - - Paths - Stier - - - - Game Folders - Spillmapper - - - - Add... - Legg til... - - - - Remove - Fjern - - - - Debug - Feilretting - - - - Enable Debug Dumping - Aktiver dumping av feilretting - - - - Enable Vulkan Validation Layers - Aktiver Vulkan valideringslag - - - - Enable Vulkan Synchronization Validation - Aktiver Vulkan synkroniseringslag - - - - Enable RenderDoc Debugging - Aktiver RenderDoc feilretting - - - - Update - Oppdatering - - - - Check for Updates at Startup - Se etter oppdateringer ved oppstart - - - - Update Channel - Oppdateringskanal - - - - Check for Updates - Se etter oppdateringer - - - - GUI Settings - GUI-innstillinger - - - - Disable Trophy Pop-ups - Deaktiver trofé hurtigmeny - - - - Play title music - Spill tittelmusikk - - - - Update Compatibility Database On Startup - Oppdater kompatibilitets-database ved oppstart - - - - Game Compatibility - Spill kompatibilitet - - - - Display Compatibility Data - Vis kompatibilitets-data - - - - Update Compatibility Database - Oppdater kompatibilitets-database - - - - Volume - Volum - - - - Audio Backend - Audio Backend - - - - MainWindow - - - Game List - Spill-liste - - - - * Unsupported Vulkan Version - * Ustøttet Vulkan-versjon - - - - Download Cheats For All Installed Games - Last ned juks for alle installerte spill - - - - Download Patches For All Games - Last ned programrettelser for alle spill - - - - Download Complete - Nedlasting fullført - - - - You have downloaded cheats for all the games you have installed. - Du har lastet ned juks for alle spillene du har installert. - - - - Patches Downloaded Successfully! - Programrettelser ble lastet ned! - - - - All Patches available for all games have been downloaded. - Programrettelser tilgjengelige for alle spill 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-utpakking - - - - Patch detected! - Programrettelse oppdaget! - - - - PKG and Game versions match: - PKG og spillversjoner stemmer overens: - - - - Would you like to overwrite? - Ønsker du å overskrive? - - - - PKG Version %1 is older than installed version: - PKG-versjon %1 er eldre enn installert versjon: - - - - Game is installed: - Spillet er installert: - - - - Would you like to install Patch: - Ønsker du å installere programrettelsen: - - - - DLC Installation - DLC installasjon - - - - Would you like to install DLC: %1? - Ønsker du å installere DLC: %1? - - - - DLC already installed: - DLC allerede installert: - - - - Game already installed - Spillet er allerede installert - - - - PKG is a patch, please install the game first! - PKG er en programrettelse, vennligst installer spillet først! - - - - PKG ERROR - PKG FEIL - - - - Extracting PKG %1/%2 - Pakker ut PKG %1/%2 - - - - Extraction Finished - Utpakking fullført - - - - Game successfully installed at %1 - Spillet ble installert i %1 - - - - File doesn't appear to be a valid PKG file - Filen ser ikke ut til å være en gyldig PKG-fil - - - - CheatsPatches - - - Cheats / Patches for - Juks / Programrettelser for - - - - defaultTextEdit_MSG - Juks/programrettelse er eksperimentelle.\nBruk med forsiktighet.\n\nLast ned juks individuelt ved å velge pakkebrønn og klikke på nedlastingsknappen.\nPå fanen programrettelse kan du laste ned alle programrettelser samtidig, velge hvilke du ønsker å bruke, og lagre valget ditt.\n\nSiden vi ikke utvikler Juks/Programrettelse,\nvær vennlig å rapportere problemer til juks/programrettelse utvikleren.\n\nHar du laget en ny juks? 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 juksefil: - - - - Repository: - Pakkebrønn: - - - - Download Cheats - Last ned juks - - - - 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 juks 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 programrettelse-filen: - - - - Download Patches - Last ned programrettelser - - - - Save - Lagre - - - - Cheats - Juks - - - - Patches - Programrettelse - - - - Error - Feil - - - - No patch selected. - Ingen programrettelse valgt. - - - - Unable to open files.json for reading. - Kan ikke åpne files.json for lesing. - - - - No patch file found for the current serial. - Ingen programrettelse-fil 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 tolkning av XML: - - - - Success - Vellykket - - - - Options saved successfully. - Alternativer ble lagret. - - - - Invalid Source - Ugyldig kilde - - - - The selected source is invalid. - Den valgte kilden er ugyldig. - - - - File Exists - Filen eksisterer - - - - File already exists. Do you want to replace it? - Filen eksisterer allerede. Ønsker du å erstatte den? - - - - Failed to save file: - Kunne ikke lagre filen: - - - - Failed to download file: - Kunne ikke laste ned filen: - - - - Cheats Not Found - Fant ikke juks - - - - CheatsNotFound_MSG - Ingen juks funnet for dette spillet i denne versjonen av den valgte pakkebrønnen,prøv en annen pakkebrønn eller en annen versjon av spillet. - - - - Cheats Downloaded Successfully - Juks ble lastet ned - - - - CheatsDownloadedSuccessfully_MSG - Du har lastet ned juks for denne versjonen av spillet fra den valgte pakkebrønnen. Du kan prøve å laste ned fra en annen pakkebrønn, 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 - Programrettelser ble lastet ned! Alle programrettelsene tilgjengelige for alle spill har blitt lastet ned, det er ikke nødvendig å laste dem ned individuelt for hvert spill som skjer med juks. Hvis programrettelsen ikke vises, kan det hende at den ikke finnes for den spesifikke serienummeret og versjonen av spillet. - - - - Failed to parse JSON data from HTML. - Kunne ikke analysere JSON-data fra HTML. - - - - Failed to retrieve HTML page. - Kunne ikke hente HTML-side. - - - - The game is in version: %1 - Spillet er i versjon: %1 - - - - The downloaded patch only works on version: %1 - Den nedlastede programrettelsen fungerer bare på versjon: %1 - - - - You may need to update your game. - Du må kanskje oppdatere spillet ditt. - - - - Incompatibility Notice - Inkompatibilitets-varsel - - - - Failed to open file: - Kunne ikke åpne filen: - - - - XML ERROR: - XML FEIL: - - - - Failed to open files.json for writing - Kunne ikke åpne files.json for skriving - - - - Author: - Forfatter: - - - - Directory does not exist: - Mappen eksisterer ikke: - - - - Failed to open files.json for reading. - Kunne ikke åpne files.json for lesing. - - - - Name: - Navn: - - - - Can't apply cheats before the game is started - Kan ikke bruke juks før spillet er startet. - - - - SettingsDialog - - - Save - Lagre - - - - Apply - Bruk - - - - Restore Defaults - Gjenopprett standardinnstillinger - - - - Close - Lukk - - - - Point your mouse at an option to display its description. - Pek musen over et alternativ for å vise beskrivelsen. - - - - consoleLanguageGroupBox - Konsollspråk:\nAngir språket som PS4-spillet bruker.\nDet anbefales å sette dette til et språk som spillet støtter, noe som kan variere avhengig av region. - - - - emulatorLanguageGroupBox - Etterlignerspråket:\nAngir språket for etterlignerens brukergrensesnitt. - - - - fullscreenCheckBox - Aktiver fullskjerm:\nSetter spillvinduet automatisk i fullskjermmodus.\nDette kan slås av ved å trykke på F11-tasten. - - - - separateUpdatesCheckBox - Aktiver separat oppdateringsmappe:\nAktiverer installering av spill i en egen mappe for enkel administrasjon. - - - - showSplashCheckBox - Vis velkomstbilde:\nViser spillets velkomstbilde (et spesialbilde) når spillet starter. - - - - ps4proCheckBox - Er PS4 Pro:\nFår etterligneren til å fungere som en PS4 PRO, noe som kan aktivere spesielle funksjoner i spill som støtter dette. - - - - discordRPCCheckbox - Aktiver Discord Rich Presence:\nViser etterlignerikonet og relevant informasjon på Discord-profilen din. - - - - userName - Brukernavn:\nAngir brukernavnet for PS4-kontoen, som kan vises av enkelte spill. - - - - TrophyKey - Trophy Key:\nKey used to decrypt trophies. Must be obtained from your jailbroken console.\nMust contain only hex characters. - - - - logTypeGroupBox - Logg type:\nAngir om loggvinduets utdata skal synkroniseres for ytelse. Kan ha negative effekter for etterligneren. - - - - logFilter - Logg filter:\nFiltrerer loggen for å kun skrive ut spesifikk informasjon.\nEksempler: "Core:Trace" "Lib.Pad:Debug Common.Filesystem:Error" "*:Critical" Nivåer: Trace, Debug, Info, Warning, Error, Critical - i denne rekkefølgen, et spesifikt nivå demper alle tidligere nivåer i listen og logger alle nivåer etter det. - - - - updaterGroupBox - Oppdatering:\nRelease: Offisielle versjoner utgitt hver måned som kan være veldig utdaterte, men er mer pålitelige og testet.\nNightly: Utviklingsversjoner som har alle de nyeste funksjonene og feilrettingene, men som kan inneholde feil og er mindre stabile. - - - - GUIgroupBox - Spille tittelmusikk:\nHvis et spill støtter det, så aktiveres det spesiell musikk når du velger spillet i menyen. - - - - disableTrophycheckBox - Deaktiver trofé hurtigmeny:\nDeaktiver trofévarsler i spillet. Trofé-fremgang kan fortsatt ved help av troféviseren (høyreklikk på spillet i hovedvinduet). - - - - hideCursorGroupBox - Skjul musepeker:\nVelg når musepekeren skal forsvinne:\nAldri: Du vil alltid se musepekeren.\nInaktiv: Sett en tid for at den skal forsvinne etter å ha vært inaktiv.\nAlltid: du vil aldri se musepekeren. - - - - idleTimeoutGroupBox - Sett en tid for når musepekeren forsvinner etter å ha vært inaktiv. - - - - backButtonBehaviorGroupBox - Atferd for tilbaketasten:\nSetter tilbaketasten på kontrolleren til å imitere et trykk på den angitte posisjonen på PS4s berøringsplate. - - - - enableCompatibilityCheckBox - Vis kompatibilitets-data:\nViser informasjon om spillkompatibilitet i tabellvisning. Aktiver "Oppdater kompatibilitets-data ved oppstart" for oppdatert informasjon. - - - - checkCompatibilityOnStartupCheckBox - Oppdater kompatibilitets-data ved oppstart:\nOppdaterer kompatibilitets-databasen automatisk når shadPS4 starter. - - - - updateCompatibilityButton - Oppdater kompatibilitets-database:\nOppdater kompatibilitets-databasen nå. - - - - Never - Aldri - - - - Idle - Inaktiv - - - - Always - Alltid - - - - Touchpad Left - Berøringsplate Venstre - - - - Touchpad Right - Berøringsplate Høyre - - - - Touchpad Center - Berøringsplate Midt - - - - None - Ingen - - - - graphicsAdapterGroupBox - Grafikkenhet:\nI systemer med flere GPU-er, velg GPU-en etterligneren skal bruke fra rullegardinlisten,\neller velg "Auto Select" for å velge automatisk. - - - - resolutionLayout - Bredde/Høyde:\nAngir størrelsen på etterlignerkvinduet ved oppstart, som kan endres under spillingen.\nDette er forskjellig fra oppløsningen i spillet. - - - - heightDivider - Vblank skillelinje:\nBildehastigheten som etterligneren oppdaterer ved, multipliseres med dette tallet. Endring av dette kan ha negative effekter, som å øke hastigheten av spillet, eller ødelegge kritisk spillfunksjonalitet som ikke forventer at dette endres! - - - - dumpShadersCheckBox - Aktiver dumping av skyggelegger:\nFor teknisk feilsøking lagrer skyggeleggerne fra spillet i en mappe mens de gjengis. - - - - nullGpuCheckBox - Aktiver Null GPU:\nFor teknisk feilsøking deaktiverer spillets-gjengivelse som om det ikke var noe grafikkort. - - - - gameFoldersBox - Spillmapper:\nListen over mapper som brukes for å se etter installerte spill. - - - - addFolderButton - Legg til:\nLegg til en mappe til listen. - - - - removeFolderButton - Fjern:\nFjern en mappe fra listen. - - - - debugDump - Aktiver dumping av feilsøking:\nLagrer import- og eksport-symbolene og filoverskriftsinformasjonen til det nåværende kjørende PS4-programmet i en katalog. - - - - vkValidationCheckBox - Aktiver Vulkan valideringslag:\nAktiverer et system som validerer tilstanden til Vulkan-gjengiveren og logger informasjon om dens indre tilstand. Dette vil redusere ytelsen og sannsynligvis endre etterlignerens atferd. - - - - vkSyncValidationCheckBox - Aktiver Vulkan synkronisering validering:\nAktiverer et system som validerer frekvens tiden av Vulkan-gjengivelsensoppgaver. Dette vil redusere ytelsen og sannsynligvis endre etterlignerens atferd. - - - - rdocCheckBox - Aktiver RenderDoc feilsøking:\nHvis aktivert, vil etterligneren gi kompatibilitet med Renderdoc for å tillate opptak og analyse av det nåværende gjengitte bildet. - - - - GameListFrame - - - Icon - Ikon - - - - Name - Navn - - - - Serial - Serienummer - - - - Compatibility - Kompatibilitet - - - - Region - Region - - - - Firmware - Fastvare - - - - Size - Størrelse - - - - Version - Versjon - - - - Path - Sti - - - - Play Time - Spilletid - - - - Never Played - Aldri spilt - - - - h - h - - - - m - m - - - - s - s - - - - Compatibility is untested - kompatibilitet er utestet - - - - Game does not initialize properly / crashes the emulator - Spillet initialiseres ikke riktig / krasjer etterligneren - - - - Game boots, but only displays a blank screen - Spillet starter, men viser bare en tom skjerm - - - - Game displays an image but does not go past the menu - Spillet viser et bilde, men går ikke forbi menyen - - - - Game has game-breaking glitches or unplayable performance - Spillet har spillbrytende feil eller uspillbar ytelse - - - - Game can be completed with playable performance and no major glitches - Spillet kan fullføres med spillbar ytelse og ingen store feil - - - - CheckUpdate - - - Auto Updater - Automatisk oppdatering - - - - Error - Feil - - - - Network error: - Nettverksfeil: - - - - Failed to parse update information. - Kunne ikke analysere oppdaterings-informasjonen. - - - - No pre-releases found. - Fant ingen forhåndsutgivelser. - - - - Invalid release data. - Ugyldige utgivelsesdata. - - - - No download URL found for the specified asset. - Ingen nedlastings-URL funnet for den spesifiserte ressursen. - - - - Your version is already up to date! - Din versjon er allerede oppdatert! - - - - Update Available - Oppdatering tilgjengelig - - - - Update Channel - Oppdateringskanal - - - - Current Version - Gjeldende versjon - - - - Latest Version - Nyeste versjon - - - - Do you want to update? - Vil du oppdatere? - - - - Show Changelog - Vis endringslogg - - - - Check for Updates at Startup - Se etter oppdateringer ved oppstart - - - - Update - Oppdater - - - - No - Nei - - - - Hide Changelog - Skjul endringslogg - - - - Changes - Endringer - - - - Network error occurred while trying to access the URL - Nettverksfeil oppstod mens vi prøvde å få tilgang til URL - - - - Download Complete - Nedlasting fullført - - - - The update has been downloaded, press OK to install. - Oppdateringen har blitt lastet ned, trykk OK for å installere. - - - - Failed to save the update file at - Kunne ikke lagre oppdateringsfilen på - - - - Starting Update... - Starter oppdatering... - - - - Failed to create the update script file - Kunne ikke opprette oppdateringsskriptfilen - - - - GameListUtils - - - B - B - - - - KB - KB - - - - MB - MB - - - - GB - GB - - - - TB - TB - - - \ No newline at end of file diff --git a/src/qt_gui/translations/nb_NO.ts b/src/qt_gui/translations/nb_NO.ts new file mode 100644 index 000000000..4a0835c1c --- /dev/null +++ b/src/qt_gui/translations/nb_NO.ts @@ -0,0 +1,2089 @@ + + + + + + AboutDialog + + About shadPS4 + Om shadPS4 + + + shadPS4 is an experimental open-source emulator for the PlayStation 4. + shadPS4 er en eksperimentell åpen kildekode-emulator for PlayStation 4. + + + This software should not be used to play games you have not legally obtained. + Denne programvaren skal ikke brukes til å spille spill du ikke har fått lovlig. + + + + CheatsPatches + + Cheats / Patches for + Juks og programrettelser for + + + 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:\n + Juks og programrettelser er eksperimentelle.\nBruk med forsiktighet.\n\nLast ned juks individuelt ved å velge pakkebrønn og trykke på nedlastingsknappen.\nPå fanen programrettelser kan du laste ned alle programrettelser samtidig, velg hvilke du ønsker å bruke, og lagre valget ditt.\n\nSiden vi ikke utvikler juks eller programrettelser,\nmeld fra om feil til jukse eller programrettelse utvikleren.\n\nHar du utviklet en ny juks? Besøk:\n + + + No Image Available + Ingen bilde tilgjengelig + + + Serial: + Serienummer: + + + Version: + Versjon: + + + Size: + Størrelse: + + + Select Cheat File: + Velg juksefil: + + + Repository: + Pakkebrønn: + + + Download Cheats + Last ned juks + + + 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 juks du ikke ønsker etter å ha lastet dem ned. + + + Do you want to delete the selected file?\n%1 + Ønsker du å slette den valgte fila?\n%1 + + + Select Patch File: + Velg programrettelse-fila: + + + Download Patches + Last ned programrettelser + + + Save + Lagre + + + Cheats + Juks + + + Patches + Programrettelser + + + Error + Feil + + + No patch selected. + Ingen programrettelse valgt. + + + Unable to open files.json for reading. + Klarte ikke åpne files.json for lesing. + + + No patch file found for the current serial. + Ingen programrettelse-fil funnet for det aktuelle serienummeret. + + + Unable to open the file for reading. + Klarte ikke åpne fila for lesing. + + + Unable to open the file for writing. + Klarte ikke åpne fila for skriving. + + + Failed to parse XML: + Feil ved tolkning av XML: + + + Success + Vellykket + + + Options saved successfully. + Alternativer ble lagret. + + + Invalid Source + Ugyldig kilde + + + The selected source is invalid. + Den valgte kilden er ugyldig. + + + File Exists + Fila eksisterer + + + File already exists. Do you want to replace it? + Fila eksisterer allerede. Ønsker du å erstatte den? + + + Failed to save file: + Klarte ikke lagre fila: + + + Failed to download file: + Klarte ikke laste ned fila: + + + Cheats Not Found + Fant ikke juks + + + No Cheats found for this game in this version of the selected repository,try another repository or a different version of the game. + Ingen juks funnet for dette spillet i denne versjonen av den valgte pakkebrønnen,prøv en annen pakkebrønn eller en annen versjon av spillet. + + + Cheats Downloaded Successfully + Juks ble lastet ned + + + 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. + Du har lastet ned juks for denne versjonen av spillet fra den valgte pakkebrønnen. Du kan prøve å laste ned fra en annen pakkebrønn, hvis det er tilgjengelig, vil det også være mulig å bruke det ved å velge fila fra lista. + + + Failed to save: + Klarte ikke lagre: + + + Failed to download: + Klarte ikke laste ned: + + + Download Complete + Nedlasting fullført + + + 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. If the patch does not appear, it may be that it does not exist for the specific serial and version of the game. + Programrettelser ble lastet ned! Alle programrettelsene tilgjengelige for alle spill har blitt lastet ned, det er ikke nødvendig å laste dem ned individuelt for hvert spill som skjer med juks. Hvis programrettelsen ikke vises, kan det hende at den ikke finnes for den spesifikke serienummeret og versjonen av spillet. + + + Failed to parse JSON data from HTML. + Klarte ikke analysere JSON-data fra HTML. + + + Failed to retrieve HTML page. + Klarte ikke hente HTML-siden. + + + The game is in version: %1 + Spillet er i versjon: %1 + + + The downloaded patch only works on version: %1 + Den nedlastede programrettelsen fungerer bare på versjon: %1 + + + You may need to update your game. + Du må kanskje oppdatere spillet ditt. + + + Incompatibility Notice + Inkompatibilitets-varsel + + + Failed to open file: + Klarte ikke åpne fila: + + + XML ERROR: + XML FEIL: + + + Failed to open files.json for writing + Kunne ikke åpne files.json for skriving + + + Author: + Forfatter: + + + Directory does not exist: + Mappa eksisterer ikke: + + + Failed to open files.json for reading. + Klarte ikke åpne files.json for lesing. + + + Name: + Navn: + + + Can't apply cheats before the game is started + Kan ikke bruke juks før spillet er startet. + + + Close + Lukk + + + + CheckUpdate + + Auto Updater + Automatisk oppdatering + + + Error + Feil + + + Network error: + Nettverksfeil: + + + The Auto Updater allows up to 60 update checks per hour.\nYou have reached this limit. Please try again later. + Den automatiske oppdateringen tillater opptil 60 oppdateringssjekker per time.\nDu har nådd denne grensen. Prøv igjen senere. + + + Failed to parse update information. + Klarte ikke analysere oppdateringsinformasjon. + + + No pre-releases found. + Fant ingen forhåndsutgivelser. + + + Invalid release data. + Ugyldige utgivelsesdata. + + + No download URL found for the specified asset. + Ingen nedlastings-URL funnet for den spesifiserte ressursen. + + + Your version is already up to date! + Din versjon er allerede oppdatert! + + + Update Available + Oppdatering tilgjengelig + + + Update Channel + Oppdateringskanal + + + Current Version + Gjeldende versjon + + + Latest Version + Nyeste versjon + + + Do you want to update? + Vil du oppdatere? + + + Show Changelog + Vis endringslogg + + + Check for Updates at Startup + Se etter oppdateringer ved oppstart + + + Update + Oppdater + + + No + Nei + + + Hide Changelog + Skjul endringslogg + + + Changes + Endringer + + + Network error occurred while trying to access the URL + Nettverksfeil oppstod mens vi prøvde å få tilgang til URL + + + Download Complete + Nedlasting fullført + + + The update has been downloaded, press OK to install. + Oppdateringen ble lastet ned, trykk OK for å installere. + + + Failed to save the update file at + Klarte ikke lagre oppdateringsfila på + + + Starting Update... + Starter oppdatering … + + + Failed to create the update script file + Klarte ikke opprette oppdateringsskriptfila + + + + CompatibilityInfoClass + + Fetching compatibility data, please wait + Henter kompatibilitetsdata, vent litt. + + + Cancel + Avbryt + + + Loading... + Laster … + + + Error + Feil + + + Unable to update compatibility data! Try again later. + Klarte ikke oppdatere kompatibilitetsdata! Prøv igjen senere. + + + Unable to open compatibility_data.json for writing. + Klarte ikke åpne compatibility_data.json for skriving. + + + Unknown + Ukjent + + + Nothing + Ingenting + + + Boots + Starter opp + + + Menus + Menyene + + + Ingame + I spill + + + Playable + Spillbar + + + + ControlSettings + + Configure Controls + Kontrolleroppsett + + + D-Pad + Navigasjonsknapper + + + Up + Opp + + + Left + Venstre + + + Right + Høyre + + + Down + Ned + + + Left Stick Deadzone (def:2 max:127) + Venstre analog dødsone (def:2, maks:127) + + + Left Deadzone + Venstre dødsone + + + Left Stick + Venstre analog + + + Config Selection + Valg av oppsett + + + Common Config + Felles oppsett + + + Use per-game configs + Bruk oppsett per spill + + + L1 / LB + L1 / LB + + + L2 / LT + L2 / LT + + + Back + Tilbake + + + R1 / RB + R1 / RB + + + R2 / RT + R2 / RT + + + L3 + L3 + + + Options / Start + Options / Start + + + R3 + R3 + + + Face Buttons + Handlingsknapper + + + Triangle / Y + Triangel / Y + + + Square / X + Firkant / X + + + Circle / B + Sirkel / B + + + Cross / A + Kryss / A + + + Right Stick Deadzone (def:2, max:127) + Høyre analog dødsone (def:2, maks:127) + + + Right Deadzone + Høyre dødsone + + + Right Stick + Høyre analog + + + Color Adjustment + Fargejustering + + + R: + R: + + + G: + G: + + + B: + B: + + + Override Lightbar Color + Overstyr farge på lyslinja + + + Override Color + Overstyr farge + + + Unable to Save + Klarte ikke lagre + + + Cannot bind axis values more than once + Kan ikke tildele akseverdier mer enn en gang + + + Save + Lagre + + + Apply + Bruk + + + Restore Defaults + Gjenopprett standardinnstillinger + + + Cancel + Avbryt + + + + EditorDialog + + Edit Keyboard + Mouse and Controller input bindings + Rediger oppsett for tastatur, mus og kontroller + + + Use Per-Game configs + Bruk oppsett per spill + + + Error + Feil + + + Could not open the file for reading + Klarte ikke åpne fila for lesing + + + Could not open the file for writing + Klarte ikke åpne fila for skriving + + + Save Changes + Lagre endringer + + + Do you want to save changes? + Vil du lagre endringene? + + + Help + Hjelp + + + Do you want to reset your custom default config to the original default config? + Vil du tilbakestille alle dine tilpassede innstillinger til standarden? + + + Do you want to reset this config to your custom default config? + Vil du tilbakestille dette oppsettet til standard oppsett? + + + Reset to Default + Tilbakestill + + + + ElfViewer + + Open Folder + Åpne mappe + + + + GameInfoClass + + Loading game list, please wait :3 + Laster spilliste, vent litt :3 + + + Cancel + Avbryt + + + Loading... + Laster … + + + + GameInstallDialog + + shadPS4 - Choose directory + shadPS4 - Velg mappe + + + Directory to install games + Mappe for installering av spill + + + Browse + Bla gjennom + + + Error + Feil + + + Directory to install DLC + Mappe for installering av DLC + + + + GameListFrame + + Icon + Ikon + + + Name + Navn + + + Serial + Serienummer + + + Compatibility + Kompatibilitet + + + Region + Region + + + Firmware + Fastvare + + + Size + Størrelse + + + Version + Versjon + + + Path + Adresse + + + Play Time + Spilletid + + + Never Played + Aldri spilt + + + h + h + + + m + m + + + s + s + + + Compatibility is untested + kompatibilitet er utestet + + + Game does not initialize properly / crashes the emulator + Spillet initialiseres ikke riktig eller krasjer emulatoren + + + Game boots, but only displays a blank screen + Spillet starter, men viser bare en tom skjerm + + + Game displays an image but does not go past the menu + Spillet viser et bilde, men går ikke forbi menyen + + + Game has game-breaking glitches or unplayable performance + Spillet har spillbrytende feil eller uspillbar ytelse + + + Game can be completed with playable performance and no major glitches + Spillet kan fullføres med spillbar ytelse og uten store feil + + + Click to see details on github + Trykk for å se detaljer på GitHub + + + Last updated + Sist oppdatert + + + + GameListUtils + + B + B + + + KB + KB + + + MB + MB + + + GB + GB + + + TB + TB + + + + GuiContextMenus + + Create Shortcut + Lag snarvei + + + Cheats / Patches + Juks og programrettelser + + + SFO Viewer + SFO-viser + + + Trophy Viewer + Troféviser + + + Open Folder... + Åpne mappe … + + + Open Game Folder + Åpne spillmappa + + + Open Save Data Folder + Åpne lagrede datamappa + + + Open Log Folder + Åpne loggmappa + + + Copy info... + Kopier info … + + + Copy Name + Kopier navn + + + Copy Serial + Kopier serienummer + + + Copy Version + Kopier versjon + + + Copy Size + Kopier størrelse + + + Copy All + Kopier alt + + + Delete... + Slett … + + + Delete Game + Slett spill + + + Delete Update + Slett oppdatering + + + Delete DLC + Slett DLC + + + Delete Trophy + Slett trofé + + + Compatibility... + Kompatibilitet … + + + Update database + Oppdater database + + + View report + Vis rapport + + + Submit a report + Send inn en rapport + + + Shortcut creation + Snarvei opprettelse + + + Shortcut created successfully! + Snarvei opprettet! + + + Error + Feil + + + Error creating shortcut! + Feil ved opprettelse av snarvei! + + + Game + Spill + + + This game has no update to delete! + Dette spillet har ingen oppdatering å slette! + + + Update + Oppdater + + + This game has no DLC to delete! + Dette spillet har ingen DLC å slette! + + + DLC + DLC + + + Delete %1 + Slett %1 + + + Are you sure you want to delete %1's %2 directory? + Er du sikker på at du vil slette %1's %2 mappa? + + + Open Update Folder + Åpne oppdateringsmappa + + + Delete Save Data + Slett lagret data + + + This game has no update folder to open! + Dette spillet har ingen oppdateringsmappe å åpne! + + + No log file found for this game! + Fant ingen loggfil for dette spillet! + + + Failed to convert icon. + Klarte ikke konvertere ikon. + + + This game has no save data to delete! + Dette spillet har ingen lagret data å slette! + + + This game has no saved trophies to delete! + Dette spillet har ingen lagrede trofeer å slette! + + + Save Data + Lagret data + + + Trophy + Trofé + + + SFO Viewer for + SFO-viser for + + + + HelpDialog + + Quickstart + Hurtigstart + + + FAQ + Ofte stilte spørsmål + + + Syntax + Syntaks + + + Special Bindings + Spesielle hurtigtaster + + + Keybindings + Hurtigtast + + + + KBMSettings + + Configure Controls + Tastaturoppsett + + + D-Pad + Navigasjonsknapper + + + Up + Opp + + + unmapped + Ikke satt opp + + + Left + Venstre + + + Right + Høyre + + + Down + Ned + + + Left Analog Halfmode + Venstre analog halvmodus + + + hold to move left stick at half-speed + Hold for å bevege venstre analog med halv hastighet + + + Left Stick + Venstre analog + + + Config Selection + Valg av oppsett + + + Common Config + Felles oppsett + + + Use per-game configs + Bruk oppsett per spill + + + L1 + L1 + + + L2 + L2 + + + Text Editor + Skriveprogram + + + Help + Hjelp + + + R1 + R1 + + + R2 + R2 + + + L3 + L3 + + + Touchpad Click + Berøringsplateknapp + + + Mouse to Joystick + Mus til styrespak + + + *press F7 ingame to activate + Trykk F7 i spillet for å bruke + + + R3 + R3 + + + Options + Options + + + Mouse Movement Parameters + Oppsett av musebevegelse + + + note: click Help Button/Special Keybindings for more information + Merk: Trykk på hjelpeknappen for mer informasjon + + + Face Buttons + Handlingsknapper + + + Triangle + Triangel + + + Square + Firkant + + + Circle + Sirkel + + + Cross + Kryss + + + Right Analog Halfmode + Høyre analog halvmodus + + + hold to move right stick at half-speed + Hold for å bevege høyre analog med halv hastighet + + + Right Stick + Høyre analog + + + Speed Offset (def 0.125): + Hastighetsforskyvning (def 0.125): + + + Copy from Common Config + Kopier fra felles oppsettet + + + Deadzone Offset (def 0.50): + Dødsoneforskyvning (def 0.50): + + + Speed Multiplier (def 1.0): + Hastighetsmultiplikator (def 1.0): + + + Common Config Selected + Felles oppsett valgt + + + This button copies mappings from the Common Config to the currently selected profile, and cannot be used when the currently selected profile is the Common Config. + Denne knappen kopierer oppsettet fra felles oppsettet til den valgte profilen, og kan ikke brukes når den gjeldende brukte profilen er felles oppsettet. + + + Copy values from Common Config + Kopier verdier fra felles oppsettet + + + Do you want to overwrite existing mappings with the mappings from the Common Config? + Vil du overskrive eksisterende valg av oppsett med felles oppsettet? + + + Unable to Save + Klarte ikke lagre + + + Cannot bind any unique input more than once + Kan ikke tildele unike oppsett mer enn en gang + + + Press a key + Trykk på en tast + + + Cannot set mapping + Klarte ikke tildele + + + Mousewheel cannot be mapped to stick outputs + Musehjulet kan ikke tildeles analogstikkene + + + Save + Lagre + + + Apply + Bruk + + + Restore Defaults + Gjenopprett standardinnstillinger + + + Cancel + Avbryt + + + + MainWindow + + Open/Add Elf Folder + Åpne eller legg til Elf-mappe + + + Boot Game + Start spill + + + Check for Updates + Se etter oppdateringer + + + About shadPS4 + Om shadPS4 + + + Configure... + Sett opp … + + + Recent Games + Nylige spill + + + Open shadPS4 Folder + Åpne shadPS4 mappa + + + Exit + Avslutt + + + Exit shadPS4 + Avslutt shadPS4 + + + Exit the application. + Avslutt programmet. + + + Show Game List + Vis spilliste + + + Game List Refresh + Oppdater spillista + + + Tiny + Bitteliten + + + Small + Liten + + + Medium + Middels + + + Large + Stor + + + List View + Liste-visning + + + Grid View + Rute-visning + + + Elf Viewer + Elf-visning + + + Game Install Directory + Spillinstallasjons-mappe + + + Download Cheats/Patches + Last ned juks og programrettelser + + + Dump Game List + Dump spilliste + + + Trophy Viewer + Troféviser + + + No games found. Please add your games to your library first. + Fant ingen spill. Legg til spillene dine i biblioteket først. + + + Search... + Søk … + + + File + Fil + + + View + Oversikt + + + Game List Icons + Spilliste ikoner + + + Game List Mode + Spilliste modus + + + Settings + Innstillinger + + + Utils + Verktøy + + + Themes + Tema + + + Help + Hjelp + + + Dark + Mørk + + + Light + Lys + + + Green + Grønn + + + Blue + Blå + + + Violet + Lilla + + + toolBar + Verktøylinje + + + Game List + Spilliste + + + * Unsupported Vulkan Version + * Ustøttet Vulkan-versjon + + + Download Cheats For All Installed Games + Last ned juks for alle installerte spill + + + Download Patches For All Games + Last ned programrettelser for alle spill + + + Download Complete + Nedlasting fullført + + + You have downloaded cheats for all the games you have installed. + Du har lastet ned juks for alle spillene du har installert. + + + Patches Downloaded Successfully! + Programrettelser ble lastet ned! + + + All Patches available for all games have been downloaded. + Programrettelser tilgjengelige for alle spill har blitt lastet ned. + + + Games: + Spill: + + + ELF files (*.bin *.elf *.oelf) + ELF-filer (*.bin *.elf *.oelf) + + + Game Boot + Spilloppstart + + + Only one file can be selected! + Kun én fil kan velges! + + + Run Game + Kjør spill + + + Eboot.bin file not found + Klarte ikke finne Eboot.bin-fila + + + Game is already running! + Spillet kjører allerede! + + + shadPS4 + shadPS4 + + + Play + Spill + + + Pause + Pause + + + Stop + Stopp + + + Restart + Start på nytt + + + Full Screen + Fullskjerm + + + Controllers + Kontroller + + + Keyboard + Tastatur + + + Refresh List + Oppdater lista + + + Resume + Gjenoppta + + + Show Labels Under Icons + Vis merkelapp under ikoner + + + + SettingsDialog + + Settings + Innstillinger + + + General + Generelt + + + System + System + + + Console Language + Konsollspråk + + + Emulator Language + Emulatorspråk + + + Emulator + Emulator + + + Enable Separate Update Folder + Bruk separat oppdateringsmappe + + + Default tab when opening settings + Standardfanen når innstillingene åpnes + + + Show Game Size In List + Vis spillstørrelse i lista + + + Show Splash + Vis velkomstbilde + + + Enable Discord Rich Presence + Bruk Discord Rich Presence + + + Username + Brukernavn + + + Trophy Key + Trofénøkkel + + + Trophy + Trofé + + + Open the custom trophy images/sounds folder + Åpne mappa med tilpassede bilder og lyder for trofé + + + Logger + Loggføring + + + Log Type + Loggføringstype + + + Log Filter + Loggfilter + + + Open Log Location + Åpne loggplassering + + + Input + Inndata + + + Cursor + Musepeker + + + Hide Cursor + Skjul musepeker + + + Hide Cursor Idle Timeout + Skjul musepeker ved inaktivitet + + + s + s + + + Controller + Kontroller + + + Back Button Behavior + Tilbakeknapp atferd + + + Graphics + Grafikk + + + GUI + Grensesnitt + + + User + Bruker + + + Graphics Device + Grafikkenhet + + + Vblank Divider + Vblank skillelinje + + + Advanced + Avansert + + + Enable Shaders Dumping + Bruk skyggeleggerdumping + + + Enable NULL GPU + Bruk NULL GPU + + + Enable HDR + Bruk HDR + + + Paths + Mapper + + + Game Folders + Spillmapper + + + Add... + Legg til … + + + Remove + Fjern + + + Debug + Feilsøking + + + Enable Debug Dumping + Bruk feilsøkingsdumping + + + Enable Vulkan Validation Layers + Bruk Vulkan Validation Layers + + + Enable Vulkan Synchronization Validation + Bruk Vulkan Synchronization Validation + + + Enable RenderDoc Debugging + Bruk RenderDoc feilsøking + + + Enable Crash Diagnostics + Bruk krasjdiagnostikk + + + Collect Shaders + Lagre skyggeleggere + + + Copy GPU Buffers + Kopier GPU-buffere + + + Host Debug Markers + Vertsfeilsøkingsmarkører + + + Guest Debug Markers + Gjestefeilsøkingsmarkører + + + Update + Oppdatering + + + Check for Updates at Startup + Se etter oppdateringer ved oppstart + + + Always Show Changelog + Vis alltid endringsloggen + + + Update Channel + Oppdateringskanal + + + Check for Updates + Se etter oppdateringer + + + GUI Settings + Grensesnitt-innstillinger + + + Title Music + Tittelmusikk + + + Disable Trophy Notification + Slå av trofévarsler + + + Background Image + Bakgrunnsbilde + + + Show Background Image + Vis bakgrunnsbilde + + + Opacity + Synlighet + + + Play title music + Spill av tittelmusikk + + + Update Compatibility Database On Startup + Oppdater database ved oppstart + + + Game Compatibility + Spill kompatibilitet + + + Display Compatibility Data + Vis kompatibilitets-data + + + Update Compatibility Database + Oppdater kompatibilitets-database + + + Volume + Volum + + + Save + Lagre + + + Apply + Bruk + + + Restore Defaults + Gjenopprett standardinnstillinger + + + Close + Lukk + + + Point your mouse at an option to display its description. + Pek musen over et alternativ for å vise beskrivelsen. + + + Console Language:\nSets the language that the PS4 game uses.\nIt's recommended to set this to a language the game supports, which will vary by region. + Konsollspråk:\nAngir språket som PS4-spillet bruker.\nDet anbefales å sette dette til et språk som spillet støtter, noe som kan variere avhengig av region. + + + Emulator Language:\nSets the language of the emulator's user interface. + Emulatorspråket:\nAngir språket for emulatorens brukergrensesnitt. + + + Enable Separate Update Folder:\nEnables installing game updates into a separate folder for easy management.\nThis can be manually created by adding the extracted update to the game folder with the name "CUSA00000-UPDATE" where the CUSA ID matches the game's ID. + Bruk separat oppdateringsmappe:\n Gjør det mulig å installere spilloppdateringer i en egen mappe for enkel administrasjon.\nDette kan gjøres manuelt ved å legge til den utpakkede oppdateringen, til spillmappa med navnet "CUSA00000-UPDATE" der CUSA-ID-en samsvarer med spillets-ID. + + + Show Splash Screen:\nShows the game's splash screen (a special image) while the game is starting. + Vis velkomstbilde:\nViser spillets velkomstbilde (et spesialbilde) når spillet starter. + + + Enable Discord Rich Presence:\nDisplays the emulator icon and relevant information on your Discord profile. + Bruk Discord Rich Presence:\nViser emulatorikonet og relevant informasjon på Discord-profilen din. + + + Username:\nSets the PS4's account username, which may be displayed by some games. + Brukernavn:\nAngir brukernavnet for PS4-kontoen, som kan vises av enkelte spill. + + + Trophy Key:\nKey used to decrypt trophies. Must be obtained from your jailbroken console.\nMust contain only hex characters. + Trofénøkkel:\nNøkkel brukes til å dekryptere trofeer. Må hentes fra din konsoll (jailbroken).\nMå bare inneholde sekskantede tegn. + + + Log Type:\nSets whether to synchronize the output of the log window for performance. May have adverse effects on emulation. + Loggføringstype:\nAngir om loggvinduets utdata skal synkroniseres for ytelse. Kan ha negative effekter for emulatoren. + + + Log Filter:\nFilters the log to only print specific information.\nExamples: "Core:Trace" "Lib.Pad:Debug Common.Filesystem:Error" "*:Critical"\nLevels: Trace, Debug, Info, Warning, Error, Critical - in this order, a specific level silences all levels preceding it in the list and logs every level after it. + Loggfilter:\nFiltrerer loggen for å kun skrive ut spesifikk informasjon.\nEksempler: "Core:Trace" "Lib.Pad:Debug Common.Filesystem:Error" "*:Critical" \nNivåer: Trace, Debug, Info, Warning, Error, Critical - i denne rekkefølgen, et spesifikt nivå demper alle tidligere nivåer i lista og loggfører alle nivåer etter det. + + + Update:\nRelease: Official versions released every month that may be very outdated, but are more reliable and tested.\nNightly: Development versions that have all the latest features and fixes, but may contain bugs and are less stable. + Oppdatering:\nOffisiell: Offisielle versjoner utgitt hver måned som kan være veldig utdaterte, men er mer pålitelige og testet.\nNattlig: Utviklingsversjoner som har alle de nyeste funksjonene og feilrettingene, men som kan inneholde feil og er mindre stabile. + + + Background Image:\nControl the opacity of the game background image. + Bakgrunnsbilde:\nEndrer synligheten til spillets bakgrunnsbilde. + + + Play Title Music:\nIf a game supports it, enable playing special music when selecting the game in the GUI. + Spill av tittelmusikk:\nHvis et spill støtter det, så brukes det spesiell musikk når du velger spillet i menyen. + + + Disable Trophy Pop-ups:\nDisable in-game trophy notifications. Trophy progress can still be tracked using the Trophy Viewer (right-click the game in the main window). + Slå av trofévarsler:\nFjerner trofévarsler i spillet. Troféfremgang kan fortsatt vises ved hjelp av troféviseren (høyreklikk på spillet i hovedvinduet). + + + Hide Cursor:\nChoose when the cursor will disappear:\nNever: You will always see the mouse.\nidle: Set a time for it to disappear after being idle.\nAlways: you will never see the mouse. + Skjul musepeker:\nVelg når musepekeren skal forsvinne:\nAldri: Du vil alltid se musepekeren.\nInaktiv: Sett en tid for at den skal forsvinne etter å ha vært inaktiv.\nAlltid: du vil aldri se musepekeren. + + + Hide Idle Cursor Timeout:\nThe duration (seconds) after which the cursor that has been idle hides itself. + Sett en tid for når musepekeren forsvinner etter å ha vært inaktiv. + + + Back Button Behavior:\nSets the controller's back button to emulate tapping the specified position on the PS4 touchpad. + Atferd for tilbaketasten:\nSetter tilbaketasten på kontrolleren til å imitere et trykk på den angitte posisjonen på PS4s berøringsplate. + + + Display Compatibility Data:\nDisplays game compatibility information in table view. Enable "Update Compatibility On Startup" to get up-to-date information. + Vis kompatibilitets-data:\nViser informasjon om spillkompatibilitet i tabellvisning. Bruk "Oppdater kompatibilitets-data ved oppstart" for oppdatert informasjon. + + + Update Compatibility On Startup:\nAutomatically update the compatibility database when shadPS4 starts. + Oppdater database ved oppstart:\nOppdaterer kompatibilitets-databasen automatisk når shadPS4 starter. + + + Update Compatibility Database:\nImmediately update the compatibility database. + Oppdater kompatibilitets-database:\nOppdater kompatibilitets-databasen nå. + + + Never + Aldri + + + Idle + Inaktiv + + + Always + Alltid + + + Touchpad Left + Berøringsplate venstre + + + Touchpad Right + Berøringsplate høyre + + + Touchpad Center + Berøringsplate midten + + + None + Ingen + + + Graphics Device:\nOn multiple GPU systems, select the GPU the emulator will use from the drop down list,\nor select "Auto Select" to automatically determine it. + Grafikkenhet:\nSystemer med flere GPU-er, kan emulatoren velge hvilken enhet som skal brukes fra rullegardinlista,\neller velg "Velg automatisk". + + + Width/Height:\nSets the size of the emulator window at launch, which can be resized during gameplay.\nThis is different from the in-game resolution. + Bredde / Høyde:\nAngir størrelsen på emulatorvinduet ved oppstart, som kan endres under spillingen.\nDette er annerledes fra oppløsningen i spillet. + + + Vblank Divider:\nThe frame rate at which the emulator refreshes at is multiplied by this number. Changing this may have adverse effects, such as increasing the game speed, or breaking critical game functionality that does not expect this to change! + Vblank skillelinje:\nBildehastigheten som emulatoren oppdaterer ved, multipliseres med dette tallet. Endring av dette kan ha negative effekter, som å øke hastigheten av spillet, eller ødelegge kritisk spillfunksjonalitet som ikke forventer at dette endres! + + + Enable Shaders Dumping:\nFor the sake of technical debugging, saves the games shaders to a folder as they render. + Bruk skyggeleggerdumping:\nFor teknisk feilsøking lagrer skyggeleggerne fra spillet i en mappe mens de gjengis. + + + Enable Null GPU:\nFor the sake of technical debugging, disables game rendering as if there were no graphics card. + Bruk Null GPU:\nFor teknisk feilsøking deaktiverer spillets-gjengivelse som om det ikke var noen grafikkort. + + + Enable HDR:\nEnables HDR in games that support it.\nYour monitor must have support for the BT2020 PQ color space and the RGB10A2 swapchain format. + Bruk HDR:\nTillater bruk av HDR i spill som støtter det.\nSkjermen din må ha støtte for BT2020 PQ fargerom og RGB10A2 swapchain-format. + + + Game Folders:\nThe list of folders to check for installed games. + Spillmapper:\nListe over mapper som brukes for å se etter installerte spill. + + + Add:\nAdd a folder to the list. + Legg til:\nLegg til en mappe til lista. + + + Remove:\nRemove a folder from the list. + Fjern:\nFjern en mappe fra lista. + + + Enable Debug Dumping:\nSaves the import and export symbols and file header information of the currently running PS4 program to a directory. + Bruk feilsøkingsdumping:\nLagrer import- og eksport-symbolene og filoverskrifts-informasjonen til det nåværende kjørende PS4-programmet i en mappe. + + + Enable Vulkan Validation Layers:\nEnables a system that validates the state of the Vulkan renderer and logs information about its internal state.\nThis will reduce performance and likely change the behavior of emulation. + Bruk Vulkan Validation Layers:\nAktiverer et system som bekrefter tilstanden til Vulkan-gjengiveren og loggfører informasjon om dens indre tilstand.\n Dette vil redusere ytelsen og sannsynligvis endre emulatorens atferd. + + + Enable Vulkan Synchronization Validation:\nEnables a system that validates the timing of Vulkan rendering tasks.\nThis will reduce performance and likely change the behavior of emulation. + Bruk Vulkan Synchronization Validation:\nEt system som bekrefter frekvens tiden av Vulkan-gjengivelseoppgaver.\nDette vil redusere ytelsen og sannsynligvis endre emulatorens atferd. + + + Enable RenderDoc Debugging:\nIf enabled, the emulator will provide compatibility with Renderdoc to allow capture and analysis of the currently rendered frame. + Bruk RenderDoc feilsøking:\nHvis brukt, vil emulatoren gi kompatibilitet med RenderDoc for å tillate opptak og analyse av det nåværende gjengitte bildet. + + + Collect Shaders:\nYou need this enabled to edit shaders with the debug menu (Ctrl + F10). + Lagre skyggeleggere:\nDu trenger dette for å redigere skyggeleggerne med feilsøkingsmenyen (Ctrl + F10). + + + Crash Diagnostics:\nCreates a .yaml file with info about the Vulkan state at the time of crashing.\nUseful for debugging 'Device lost' errors. If you have this enabled, you should enable Host AND Guest Debug Markers.\nDoes not work on Intel GPUs.\nYou need Vulkan Validation Layers enabled and the Vulkan SDK for this to work. + Krasjdiagnostikk:\nOppretter en .yaml-fil med informasjon om Vulkan-tilstanden ved krasj.\nNyttig for feilsøking 'Device lost' feil. Hvis dette brukes, burde du aktivere vert OG gjestefeilsøkingsmarkører.\nFunker ikke med Intel GPU-er.\nDu trenger Vulkan Validation Layers og Vulkan SDK for at dette skal fungere. + + + Copy GPU Buffers:\nGets around race conditions involving GPU submits.\nMay or may not help with PM4 type 0 crashes. + Kopier GPU-buffere:\nKommer rundt løpsforhold som involverer GPU-innsendinger.\nKan muligens hjelpe med PM4 type 0 krasj. + + + Host Debug Markers:\nInserts emulator-side information like markers for specific AMDGPU commands around Vulkan commands, as well as giving resources debug names.\nIf you have this enabled, you should enable Crash Diagnostics.\nUseful for programs like RenderDoc. + Vertsfeilsøkingsmarkører:\nSetter inn emulator-side informasjon som markører for spesifikke AMDGPU-kommandoer rundt Vulkan-kommandoer, i tillegg til å gi ressurser feilrettingsnavn.\nHvis dette brukes, burde du også bruke krasjdiagnostikk.\nNyttig for programmer som RenderDoc. + + + Guest Debug Markers:\nInserts any debug markers the game itself has added to the command buffer.\nIf you have this enabled, you should enable Crash Diagnostics.\nUseful for programs like RenderDoc. + Gjestefeilsøkingsmarkører:\nSetter inn eventuelle feilsøkingsmarkører spillet selv har lagt til kommandobufferen.\nHvis dette brukes, burde du også bruke krasjdiagnostikk.\nNyttig for programmer som RenderDoc. + + + Save Data Path:\nThe folder where game save data will be saved. + Lagrede datamappe:\nListe over data shadPS4 lagrer. + + + Browse:\nBrowse for a folder to set as the save data path. + Endre mappe:\nEndrer hvilken mappe shadPS4 skal lagre data til. + + + Release + Offisiell + + + Nightly + Nattlig + + + Set the volume of the background music. + Sett volumet til bakgrunnsmusikken. + + + Enable Motion Controls + Bruk bevegelsesstyring + + + Save Data Path + Lagrede datamappe + + + Browse + Endre mappe + + + async + asynkron + + + sync + synkron + + + Auto Select + Velg automatisk + + + Directory to install games + Mappe for installering av spill + + + Directory to save data + Mappe for lagring av data + + + Video + Video + + + Display Mode + Skjermmodus + + + Windowed + I vindu + + + Fullscreen + Fullskjerm + + + Fullscreen (Borderless) + Fullskjerm i vindu + + + Window Size + Vindustørrelse + + + W: + B: + + + H: + H: + + + Separate Log Files + Separate loggfiler + + + Separate Log Files:\nWrites a separate logfile for each game. + Separate loggfiler:\nOppretter en separat loggfil for hvert spill. + + + Trophy Notification Position + Trofévarsel plassering + + + Left + Venstre + + + Right + Høyre + + + Top + Øverst + + + Bottom + Nederst + + + Notification Duration + Varslingsvarighet + + + Portable User Folder + Separat brukermappe + + + Create Portable User Folder from Common User Folder + Lag ny separat brukermappe fra fellesbrukermappa + + + Portable user folder:\nStores shadPS4 settings and data that will be applied only to the shadPS4 build located in the current folder. Restart the app after creating the portable user folder to begin using it. + Separat brukermappe:\n Lagrer shadPS4-innstillinger og data som kun brukes til shadPS4 programmet i gjeldende mappe. Start programmet på nytt etter opprettelsen av mappa for å ta den i bruk. + + + Cannot create portable user folder + Klarte ikke opprette separat brukermappe + + + %1 already exists + %1 finnes allerede + + + Portable user folder created + Separat brukermappe opprettet + + + %1 successfully created. + %1 opprettet. + + + Open the custom trophy images/sounds folder:\nYou can add custom images to the trophies and an audio.\nAdd the files to custom_trophy with the following names:\ntrophy.wav OR trophy.mp3, bronze.png, gold.png, platinum.png, silver.png\nNote: The sound will only work in QT versions. + Åpne mappa med tilpassede bilder og lyder for trofé:\nDu kan legge til tilpassede bilder til trofeer og en lyd.\nLegg filene til custom_trophy med følgende navn:\ntrophy.wav ELLER trophy.mp3, bronze.png, gold.png, platinum.png, silver.png\nMerk: Lyden avspilles kun i Qt-versjonen. + + + + TrophyViewer + + Trophy Viewer + Troféviser + + + Select Game: + Velg spill: + + + Progress + Fremdrift + + + Show Earned Trophies + Vis opptjente trofeer + + + Show Not Earned Trophies + Vis ikke opptjente trofeer + + + Show Hidden Trophies + Vis skjulte trofeer + + + diff --git a/src/qt_gui/translations/nl.ts b/src/qt_gui/translations/nl.ts deleted file mode 100644 index 0cb890186..000000000 --- a/src/qt_gui/translations/nl.ts +++ /dev/null @@ -1,1664 +0,0 @@ - - - - - - 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... - - - - InstallDirSelect - - - shadPS4 - Choose directory - shadPS4 - Choose directory - - - - Select which directory you want to install to. - Select which directory you want to install to. - - - - 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 - - - - Cheats / Patches - Cheats / Patches - - - - SFO Viewer - SFO Viewer - - - - Trophy Viewer - Trophy Viewer - - - - Open Folder... - Map openen... - - - - Open Game Folder - Open Spelmap - - - - Open Save Data Folder - Open Map voor Opslagdata - - - - Open Log Folder - Open Logmap - - - - Copy info... - Copy info... - - - - Copy Name - Copy Name - - - - Copy Serial - Copy Serial - - - - Copy All - Copy All - - - - Delete... - Delete... - - - - Delete Game - Delete Game - - - - Delete Update - Delete Update - - - - Delete DLC - Delete DLC - - - - Compatibility... - Compatibility... - - - - Update database - Update database - - - - View report - View report - - - - Submit a report - Submit a report - - - - Shortcut creation - Shortcut creation - - - - Shortcut created successfully! - Shortcut created successfully! - - - - Error - Error - - - - Error creating shortcut! - Error creating shortcut! - - - - Install PKG - Install PKG - - - - Game - Game - - - - requiresEnableSeparateUpdateFolder_MSG - This feature requires the 'Enable Separate Update Folder' config option to work. If you want to use this feature, please enable it. - - - - This game has no update to delete! - This game has no update to delete! - - - - Update - Update - - - - This game has no DLC to delete! - This game has no DLC to delete! - - - - DLC - DLC - - - - Delete %1 - Delete %1 - - - - Are you sure you want to delete %1's %2 directory? - Are you sure you want to delete %1's %2 directory? - - - - MainWindow - - - Open/Add Elf Folder - Open/Add Elf Folder - - - - Install Packages (PKG) - Install Packages (PKG) - - - - Boot Game - Boot Game - - - - Check for Updates - Controleren op updates - - - - 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 - - - - Download Cheats/Patches - Download Cheats/Patches - - - - 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 - - - - Help - Help - - - - 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 - - - - Enable Separate Update Folder - Enable Separate Update Folder - - - - Show Splash - Show Splash - - - - Is PS4 Pro - Is PS4 Pro - - - - Enable Discord Rich Presence - Discord Rich Presence inschakelen - - - - Username - Username - - - - Trophy Key - Trophy Key - - - - Trophy - Trophy - - - - Logger - Logger - - - - Log Type - Log Type - - - - Log Filter - Log Filter - - - - Input - Invoer - - - - Cursor - Cursor - - - - Hide Cursor - Cursor verbergen - - - - Hide Cursor Idle Timeout - Inactiviteit timeout voor het verbergen van de cursor - - - - s - s - - - - Controller - Controller - - - - Back Button Behavior - Achterknop gedrag - - - - 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 - - - - Paths - Pad - - - - Game Folders - Spelmappen - - - - Add... - Toevoegen... - - - - Remove - Verwijderen - - - - 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 - - - - Update - Bijwerken - - - - Check for Updates at Startup - Bij opstart op updates controleren - - - - Update Channel - Updatekanaal - - - - Check for Updates - Controleren op updates - - - - GUI Settings - GUI-Instellingen - - - - Disable Trophy Pop-ups - Disable Trophy Pop-ups - - - - Play title music - Titelmuziek afspelen - - - - Update Compatibility Database On Startup - Update Compatibility Database On Startup - - - - Game Compatibility - Game Compatibility - - - - Display Compatibility Data - Display Compatibility Data - - - - Update Compatibility Database - Update Compatibility Database - - - - Volume - Volume - - - - Audio Backend - Audio Backend - - - - MainWindow - - - Game List - Lijst met spellen - - - - * 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! - Patch gedetecteerd! - - - - PKG and Game versions match: - PKG- en gameversies komen overeen: - - - - Would you like to overwrite? - Wilt u overschrijven? - - - - PKG Version %1 is older than installed version: - PKG-versie %1 is ouder dan de geïnstalleerde versie: - - - - Game is installed: - Game is geïnstalleerd: - - - - Would you like to install Patch: - Wilt u de patch installeren: - - - - DLC Installation - DLC-installatie - - - - Would you like to install DLC: %1? - Wilt u DLC installeren: %1? - - - - DLC already installed: - DLC al geïnstalleerd: - - - - Game already installed - Game al geïnstalleerd - - - - 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 for - Cheats / Patches for - - - - 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. Als de patch niet verschijnt, kan het zijn dat deze niet bestaat voor het specifieke serienummer en de versie van het spel. - - - - Failed to parse JSON data from HTML. - Kan JSON-gegevens uit HTML niet parseren. - - - - Failed to retrieve HTML page. - Kan HTML-pagina niet ophalen. - - - - The game is in version: %1 - Het spel is in versie: %1 - - - - The downloaded patch only works on version: %1 - De gedownloade patch werkt alleen op versie: %1 - - - - You may need to update your game. - Misschien moet je je spel bijwerken. - - - - Incompatibility Notice - Incompatibiliteitsmelding - - - - 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: - - - - Can't apply cheats before the game is started - Je kunt geen cheats toepassen voordat het spel is gestart. - - - - SettingsDialog - - - Save - Opslaan - - - - Apply - Toepassen - - - - Restore Defaults - Standaardinstellingen herstellen - - - - Close - Sluiten - - - - Point your mouse at an option to display its description. - Wijzig de muisaanwijzer naar een optie om de beschrijving weer te geven. - - - - consoleLanguageGroupBox - Console Taal:\nStelt de taal in die het PS4-spel gebruikt.\nHet wordt aanbevolen om dit in te stellen op een taal die het spel ondersteunt, wat kan variëren per regio. - - - - emulatorLanguageGroupBox - Emulator Taal:\nStelt de taal van de gebruikersinterface van de emulator in. - - - - fullscreenCheckBox - Volledig scherm inschakelen:\nZet het gamevenster automatisch in de volledig scherm modus.\nDit kan worden omgeschakeld door op de F11-toets te drukken. - - - - separateUpdatesCheckBox - Enable Separate Update Folder:\nEnables installing game updates into a separate folder for easy management. - - - - showSplashCheckBox - Opstartscherm weergeven:\nToont het opstartscherm van het spel (een speciale afbeelding) tijdens het starten van het spel. - - - - ps4proCheckBox - Is PS4 Pro:\nLaat de emulator zich gedragen als een PS4 PRO, wat speciale functies kan inschakelen in games die dit ondersteunen. - - - - discordRPCCheckbox - Discord Rich Presence inschakelen:\nToont het emulatoricoon en relevante informatie op je Discord-profiel. - - - - userName - Gebruikersnaam:\nStelt de gebruikersnaam van het PS4-account in, die door sommige games kan worden weergegeven. - - - - TrophyKey - Trophy Key:\nKey used to decrypt trophies. Must be obtained from your jailbroken console.\nMust contain only hex characters. - - - - logTypeGroupBox - Logtype:\nStelt in of de uitvoer van het logvenster moet worden gesynchroniseerd voor prestaties. Kan nadelige effecten hebben op emulatie. - - - - logFilter - Logfilter:\nFiltert het logboek om alleen specifieke informatie af te drukken.\nVoorbeelden: "Core:Trace" "Lib.Pad:Debug Common.Filesystem:Error" "*:Critical" Niveaus: Trace, Debug, Info, Waarschuwing, Fout, Kritiek - in deze volgorde, een specifiek niveau dempt alle voorgaande niveaus in de lijst en logt alle niveaus daarna. - - - - updaterGroupBox - Updateren:\nRelease: Officiële versies die elke maand worden uitgebracht, die zeer verouderd kunnen zijn, maar betrouwbaar en getest zijn.\nNightly: Ontwikkelingsversies die alle nieuwste functies en bugfixes bevatten, maar mogelijk bugs bevatten en minder stabiel zijn. - - - - GUIgroupBox - Speel titelsong:\nAls een game dit ondersteunt, wordt speciale muziek afgespeeld wanneer je het spel in de GUI selecteert. - - - - disableTrophycheckBox - Disable Trophy Pop-ups:\nDisable in-game trophy notifications. Trophy progress can still be tracked using the Trophy Viewer (right-click the game in the main window). - - - - hideCursorGroupBox - Verberg cursor:\nKies wanneer de cursor verdwijnt:\nNooit: Je ziet altijd de muis.\nInactief: Stel een tijd in waarna deze verdwijnt na inactiviteit.\nAltijd: je ziet de muis nooit. - - - - idleTimeoutGroupBox - Stel een tijd in voor wanneer de muis verdwijnt na inactiviteit. - - - - backButtonBehaviorGroupBox - Gedrag van de terugknop:\nStelt de terugknop van de controller in om een aanraking op de opgegeven positie op de PS4-touchpad na te bootsen. - - - - enableCompatibilityCheckBox - Display Compatibility Data:\nDisplays game compatibility information in table view. Enable "Update Compatibility On Startup" to get up-to-date information. - - - - checkCompatibilityOnStartupCheckBox - Update Compatibility On Startup:\nAutomatically update the compatibility database when shadPS4 starts. - - - - updateCompatibilityButton - Update Compatibility Database:\nImmediately update the compatibility database. - - - - Never - Nooit - - - - Idle - Inactief - - - - Always - Altijd - - - - Touchpad Left - Touchpad Links - - - - Touchpad Right - Touchpad Rechts - - - - Touchpad Center - Touchpad Midden - - - - None - Geen - - - - graphicsAdapterGroupBox - Grafische adapter:\nIn systemen met meerdere GPU's, kies de GPU die de emulator uit de vervolgkeuzelijst moet gebruiken,\nof kies "Auto Select" om dit automatisch in te stellen. - - - - resolutionLayout - Breedte/Hoogte:\nStelt de grootte van het emulatorvenster bij het opstarten in, wat tijdens het spelen kan worden gewijzigd.\nDit is anders dan de resolutie in de game. - - - - heightDivider - Vblank deler:\nDe frame-rate waartegen de emulator wordt vernieuwd, vermenigvuldigd met dit getal. Dit veranderen kan nadelige effecten hebben, zoals het versnellen van het spel of het verpesten van kritieke gamefunctionaliteiten die niet verwachtten dat dit zou veranderen! - - - - dumpShadersCheckBox - Shaderdump inschakelen:\nVoor technische foutopsporing slaat het de shaders van de game op in een map terwijl ze worden gerenderd. - - - - nullGpuCheckBox - Null GPU inschakelen:\nVoor technische foutopsporing schakelt de game-rendering uit alsof er geen grafische kaart is. - - - - gameFoldersBox - Spelmap:\nDe lijst met mappen om te controleren op geïnstalleerde spellen. - - - - addFolderButton - Toevoegen:\nVoeg een map toe aan de lijst. - - - - removeFolderButton - Verwijderen:\nVerwijder een map uit de lijst. - - - - debugDump - Foutopsporing dump inschakelen:\nSlaat de import- en export-symbolen en de bestandsheaderinformatie van de momenteel draaiende PS4-toepassing op in een map. - - - - vkValidationCheckBox - Vulkan validatielaag inschakelen:\nSchakelt een systeem in dat de status van de Vulkan-renderer valideert en informatie over de interne status ervan logt. Dit zal de prestaties verlagen en waarschijnlijk het emulatiegedrag veranderen. - - - - vkSyncValidationCheckBox - Vulkan synchronisatievalidatie inschakelen:\nSchakelt een systeem in dat de timing van Vulkan-renderingtaken valideert. Dit zal de prestaties verlagen en waarschijnlijk het emulatiegedrag veranderen. - - - - rdocCheckBox - RenderDoc foutopsporing inschakelen:\nAls ingeschakeld, biedt de emulator compatibiliteit met Renderdoc om de momenteel gerenderde frame vast te leggen en te analyseren. - - - - GameListFrame - - - Icon - Pictogram - - - - Name - Naam - - - - Serial - Serienummer - - - - Compatibility - Compatibility - - - - Region - Regio - - - - Firmware - Firmware - - - - Size - Grootte - - - - Version - Versie - - - - Path - Pad - - - - Play Time - Speeltijd - - - - Never Played - Never Played - - - - h - h - - - - m - m - - - - s - s - - - - Compatibility is untested - Compatibility is untested - - - - Game does not initialize properly / crashes the emulator - Game does not initialize properly / crashes the emulator - - - - Game boots, but only displays a blank screen - Game boots, but only displays a blank screen - - - - Game displays an image but does not go past the menu - Game displays an image but does not go past the menu - - - - Game has game-breaking glitches or unplayable performance - Game has game-breaking glitches or unplayable performance - - - - Game can be completed with playable performance and no major glitches - Game can be completed with playable performance and no major glitches - - - - CheckUpdate - - - Auto Updater - Automatische updater - - - - Error - Fout - - - - Network error: - Netwerkfout: - - - - Failed to parse update information. - Kon update-informatie niet parseren. - - - - No pre-releases found. - Geen pre-releases gevonden. - - - - Invalid release data. - Ongeldige releasegegevens. - - - - No download URL found for the specified asset. - Geen download-URL gevonden voor het opgegeven bestand. - - - - Your version is already up to date! - Uw versie is al up-to-date! - - - - Update Available - Update beschikbaar - - - - Update Channel - Updatekanaal - - - - Current Version - Huidige versie - - - - Latest Version - Laatste versie - - - - Do you want to update? - Wilt u updaten? - - - - Show Changelog - Toon changelog - - - - Check for Updates at Startup - Bij opstart op updates controleren - - - - Update - Bijwerken - - - - No - Nee - - - - Hide Changelog - Verberg changelog - - - - Changes - Wijzigingen - - - - Network error occurred while trying to access the URL - Netwerkfout opgetreden tijdens toegang tot de URL - - - - Download Complete - Download compleet - - - - The update has been downloaded, press OK to install. - De update is gedownload, druk op OK om te installeren. - - - - Failed to save the update file at - Kon het updatebestand niet opslaan op - - - - Starting Update... - Starten van update... - - - - Failed to create the update script file - Kon het update-scriptbestand niet maken - - - - GameListUtils - - - B - B - - - - KB - KB - - - - MB - MB - - - - GB - GB - - - - TB - TB - - - \ No newline at end of file diff --git a/src/qt_gui/translations/nl_NL.ts b/src/qt_gui/translations/nl_NL.ts new file mode 100644 index 000000000..918da6a67 --- /dev/null +++ b/src/qt_gui/translations/nl_NL.ts @@ -0,0 +1,2089 @@ + + + + + + AboutDialog + + About shadPS4 + About 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. + + + + CheatsPatches + + Cheats / Patches for + Cheats / Patches for + + + 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:\n + 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:\n + + + 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 + + + No Cheats found for this game in this version of the selected repository,try another repository or a different version of the game. + 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 + + + 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. + 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 + + + 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. If the patch does not appear, it may be that it does not exist for the specific serial and version of the game. + 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. Als de patch niet verschijnt, kan het zijn dat deze niet bestaat voor het specifieke serienummer en de versie van het spel. + + + Failed to parse JSON data from HTML. + Kan JSON-gegevens uit HTML niet parseren. + + + Failed to retrieve HTML page. + Kan HTML-pagina niet ophalen. + + + The game is in version: %1 + Het spel is in versie: %1 + + + The downloaded patch only works on version: %1 + De gedownloade patch werkt alleen op versie: %1 + + + You may need to update your game. + Misschien moet je je spel bijwerken. + + + Incompatibility Notice + Incompatibiliteitsmelding + + + 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: + + + Can't apply cheats before the game is started + Je kunt geen cheats toepassen voordat het spel is gestart. + + + Close + Sluiten + + + + CheckUpdate + + Auto Updater + Automatische updater + + + Error + Fout + + + Network error: + Netwerkfout: + + + The Auto Updater allows up to 60 update checks per hour.\nYou have reached this limit. Please try again later. + De automatische updater staat tot 60 updatecontroles per uur toe.\nJe hebt deze limiet bereikt. Probeer het later opnieuw. + + + Failed to parse update information. + Kon update-informatie niet parseren. + + + No pre-releases found. + Geen pre-releases gevonden. + + + Invalid release data. + Ongeldige releasegegevens. + + + No download URL found for the specified asset. + Geen download-URL gevonden voor het opgegeven bestand. + + + Your version is already up to date! + Uw versie is al up-to-date! + + + Update Available + Update beschikbaar + + + Update Channel + Updatekanaal + + + Current Version + Huidige versie + + + Latest Version + Laatste versie + + + Do you want to update? + Wilt u updaten? + + + Show Changelog + Toon changelog + + + Check for Updates at Startup + Bij opstart op updates controleren + + + Update + Bijwerken + + + No + Nee + + + Hide Changelog + Verberg changelog + + + Changes + Wijzigingen + + + Network error occurred while trying to access the URL + Netwerkfout opgetreden tijdens toegang tot de URL + + + Download Complete + Download compleet + + + The update has been downloaded, press OK to install. + De update is gedownload, druk op OK om te installeren. + + + Failed to save the update file at + Kon het updatebestand niet opslaan op + + + Starting Update... + Starten van update... + + + Failed to create the update script file + Kon het update-scriptbestand niet maken + + + + CompatibilityInfoClass + + Fetching compatibility data, please wait + Compatibiliteitsgegevens ophalen, even geduld + + + Cancel + Annuleren + + + Loading... + Laden... + + + Error + Fout + + + Unable to update compatibility data! Try again later. + Kan compatibiliteitsgegevens niet bijwerken! Probeer het later opnieuw. + + + Unable to open compatibility_data.json for writing. + Kan compatibility_data.json niet openen voor schrijven. + + + Unknown + Onbekend + + + Nothing + Niets + + + Boots + Laarsjes + + + Menus + Menu's + + + Ingame + In het spel + + + Playable + Speelbaar + + + + ControlSettings + + Configure Controls + Configure Controls + + + D-Pad + D-Pad + + + Up + Up + + + Left + Left + + + Right + Right + + + Down + Down + + + Left Stick Deadzone (def:2 max:127) + Left Stick Deadzone (def:2 max:127) + + + Left Deadzone + Left Deadzone + + + Left Stick + Left Stick + + + Config Selection + Config Selection + + + Common Config + Common Config + + + Use per-game configs + Use per-game configs + + + L1 / LB + L1 / LB + + + L2 / LT + L2 / LT + + + Back + Back + + + R1 / RB + R1 / RB + + + R2 / RT + R2 / RT + + + L3 + L3 + + + Options / Start + Options / Start + + + R3 + R3 + + + Face Buttons + Face Buttons + + + Triangle / Y + Triangle / Y + + + Square / X + Square / X + + + Circle / B + Circle / B + + + Cross / A + Cross / A + + + Right Stick Deadzone (def:2, max:127) + Right Stick Deadzone (def:2, max:127) + + + Right Deadzone + Right Deadzone + + + Right Stick + Right Stick + + + Color Adjustment + Color Adjustment + + + R: + R: + + + G: + G: + + + B: + B: + + + Override Lightbar Color + Override Lightbar Color + + + Override Color + Override Color + + + Unable to Save + Unable to Save + + + Cannot bind axis values more than once + Cannot bind axis values more than once + + + Save + Save + + + Apply + Apply + + + Restore Defaults + Restore Defaults + + + Cancel + Cancel + + + + EditorDialog + + Edit Keyboard + Mouse and Controller input bindings + Edit Keyboard + Mouse and Controller input bindings + + + Use Per-Game configs + Use Per-Game configs + + + Error + Error + + + Could not open the file for reading + Could not open the file for reading + + + Could not open the file for writing + Could not open the file for writing + + + Save Changes + Save Changes + + + Do you want to save changes? + Do you want to save changes? + + + Help + Help + + + Do you want to reset your custom default config to the original default config? + Do you want to reset your custom default config to the original default config? + + + Do you want to reset this config to your custom default config? + Do you want to reset this config to your custom default config? + + + Reset to Default + Reset to Default + + + + 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 + + + Directory to install DLC + Directory to install DLC + + + + GameListFrame + + Icon + Pictogram + + + Name + Naam + + + Serial + Serienummer + + + Compatibility + Compatibility + + + Region + Regio + + + Firmware + Firmware + + + Size + Grootte + + + Version + Versie + + + Path + Pad + + + Play Time + Speeltijd + + + Never Played + Never Played + + + h + h + + + m + m + + + s + s + + + Compatibility is untested + Compatibility is untested + + + Game does not initialize properly / crashes the emulator + Game does not initialize properly / crashes the emulator + + + Game boots, but only displays a blank screen + Game boots, but only displays a blank screen + + + Game displays an image but does not go past the menu + Game displays an image but does not go past the menu + + + Game has game-breaking glitches or unplayable performance + Game has game-breaking glitches or unplayable performance + + + Game can be completed with playable performance and no major glitches + Game can be completed with playable performance and no major glitches + + + Click to see details on github + Klik om details op GitHub te bekijken + + + Last updated + Laatst bijgewerkt + + + + GameListUtils + + B + B + + + KB + KB + + + MB + MB + + + GB + GB + + + TB + TB + + + + GuiContextMenus + + Create Shortcut + Create Shortcut + + + Cheats / Patches + Cheats / Patches + + + SFO Viewer + SFO Viewer + + + Trophy Viewer + Trophy Viewer + + + Open Folder... + Map openen... + + + Open Game Folder + Open Spelmap + + + Open Save Data Folder + Open Map voor Opslagdata + + + Open Log Folder + Open Logmap + + + Copy info... + Copy info... + + + Copy Name + Copy Name + + + Copy Serial + Copy Serial + + + Copy Version + Copy Version + + + Copy Size + Copy Size + + + Copy All + Copy All + + + Delete... + Delete... + + + Delete Game + Delete Game + + + Delete Update + Delete Update + + + Delete DLC + Delete DLC + + + Delete Trophy + Delete Trophy + + + Compatibility... + Compatibility... + + + Update database + Update database + + + View report + View report + + + Submit a report + Submit a report + + + Shortcut creation + Shortcut creation + + + Shortcut created successfully! + Shortcut created successfully! + + + Error + Error + + + Error creating shortcut! + Error creating shortcut! + + + Game + Game + + + This game has no update to delete! + This game has no update to delete! + + + Update + Update + + + This game has no DLC to delete! + This game has no DLC to delete! + + + DLC + DLC + + + Delete %1 + Delete %1 + + + Are you sure you want to delete %1's %2 directory? + Are you sure you want to delete %1's %2 directory? + + + Open Update Folder + Open Update Folder + + + Delete Save Data + Delete Save Data + + + This game has no update folder to open! + This game has no update folder to open! + + + No log file found for this game! + No log file found for this game! + + + Failed to convert icon. + Failed to convert icon. + + + This game has no save data to delete! + This game has no save data to delete! + + + This game has no saved trophies to delete! + This game has no saved trophies to delete! + + + Save Data + Save Data + + + Trophy + Trophy + + + SFO Viewer for + SFO Viewer for + + + + HelpDialog + + Quickstart + Quickstart + + + FAQ + FAQ + + + Syntax + Syntax + + + Special Bindings + Special Bindings + + + Keybindings + Keybindings + + + + KBMSettings + + Configure Controls + Configure Controls + + + D-Pad + D-Pad + + + Up + Up + + + unmapped + unmapped + + + Left + Left + + + Right + Right + + + Down + Down + + + Left Analog Halfmode + Left Analog Halfmode + + + hold to move left stick at half-speed + hold to move left stick at half-speed + + + Left Stick + Left Stick + + + Config Selection + Config Selection + + + Common Config + Common Config + + + Use per-game configs + Use per-game configs + + + L1 + L1 + + + L2 + L2 + + + Text Editor + Text Editor + + + Help + Help + + + R1 + R1 + + + R2 + R2 + + + L3 + L3 + + + Touchpad Click + Touchpad Click + + + Mouse to Joystick + Mouse to Joystick + + + *press F7 ingame to activate + *press F7 ingame to activate + + + R3 + R3 + + + Options + Options + + + Mouse Movement Parameters + Mouse Movement Parameters + + + note: click Help Button/Special Keybindings for more information + note: click Help Button/Special Keybindings for more information + + + Face Buttons + Face Buttons + + + Triangle + Triangle + + + Square + Square + + + Circle + Circle + + + Cross + Cross + + + Right Analog Halfmode + Right Analog Halfmode + + + hold to move right stick at half-speed + hold to move right stick at half-speed + + + Right Stick + Right Stick + + + Speed Offset (def 0.125): + Speed Offset (def 0.125): + + + Copy from Common Config + Copy from Common Config + + + Deadzone Offset (def 0.50): + Deadzone Offset (def 0.50): + + + Speed Multiplier (def 1.0): + Speed Multiplier (def 1.0): + + + Common Config Selected + Common Config Selected + + + This button copies mappings from the Common Config to the currently selected profile, and cannot be used when the currently selected profile is the Common Config. + This button copies mappings from the Common Config to the currently selected profile, and cannot be used when the currently selected profile is the Common Config. + + + Copy values from Common Config + Copy values from Common Config + + + Do you want to overwrite existing mappings with the mappings from the Common Config? + Do you want to overwrite existing mappings with the mappings from the Common Config? + + + Unable to Save + Unable to Save + + + Cannot bind any unique input more than once + Cannot bind any unique input more than once + + + Press a key + Press a key + + + Cannot set mapping + Cannot set mapping + + + Mousewheel cannot be mapped to stick outputs + Mousewheel cannot be mapped to stick outputs + + + Save + Save + + + Apply + Apply + + + Restore Defaults + Restore Defaults + + + Cancel + Cancel + + + + MainWindow + + Open/Add Elf Folder + Open/Add Elf Folder + + + Boot Game + Boot Game + + + Check for Updates + Controleren op updates + + + About shadPS4 + About shadPS4 + + + Configure... + Configure... + + + Recent Games + Recent Games + + + Open shadPS4 Folder + Open shadPS4 Folder + + + 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 + + + Download Cheats/Patches + Download Cheats/Patches + + + Dump Game List + Dump Game List + + + Trophy Viewer + Trophy Viewer + + + No games found. Please add your games to your library first. + No games found. Please add your games to your library first. + + + Search... + Search... + + + File + File + + + View + View + + + Game List Icons + Game List Icons + + + Game List Mode + Game List Mode + + + Settings + Settings + + + Utils + Utils + + + Themes + Themes + + + Help + Help + + + Dark + Dark + + + Light + Light + + + Green + Green + + + Blue + Blue + + + Violet + Violet + + + toolBar + toolBar + + + Game List + Lijst met spellen + + + * 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: + + + 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! + + + Run Game + Run Game + + + Eboot.bin file not found + Eboot.bin file not found + + + Game is already running! + Game is already running! + + + shadPS4 + shadPS4 + + + Play + Play + + + Pause + Pause + + + Stop + Stop + + + Restart + Restart + + + Full Screen + Full Screen + + + Controllers + Controllers + + + Keyboard + Keyboard + + + Refresh List + Refresh List + + + Resume + Resume + + + Show Labels Under Icons + Show Labels Under Icons + + + + SettingsDialog + + Settings + Settings + + + General + General + + + System + System + + + Console Language + Console Language + + + Emulator Language + Emulator Language + + + Emulator + Emulator + + + Enable Separate Update Folder + Enable Separate Update Folder + + + Default tab when opening settings + Standaardtabblad bij het openen van instellingen + + + Show Game Size In List + Toon grootte van het spel in de lijst + + + Show Splash + Show Splash + + + Enable Discord Rich Presence + Discord Rich Presence inschakelen + + + Username + Username + + + Trophy Key + Trophy Key + + + Trophy + Trophy + + + Open the custom trophy images/sounds folder + Open the custom trophy images/sounds folder + + + Logger + Logger + + + Log Type + Log Type + + + Log Filter + Log Filter + + + Open Log Location + Loglocatie openen + + + Input + Invoer + + + Cursor + Cursor + + + Hide Cursor + Cursor verbergen + + + Hide Cursor Idle Timeout + Inactiviteit timeout voor het verbergen van de cursor + + + s + s + + + Controller + Controller + + + Back Button Behavior + Achterknop gedrag + + + Graphics + Graphics + + + GUI + Interface + + + User + Gebruiker + + + Graphics Device + Graphics Device + + + Vblank Divider + Vblank Divider + + + Advanced + Advanced + + + Enable Shaders Dumping + Enable Shaders Dumping + + + Enable NULL GPU + Enable NULL GPU + + + Enable HDR + Enable HDR + + + Paths + Pad + + + Game Folders + Spelmappen + + + Add... + Toevoegen... + + + Remove + Verwijderen + + + 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 + + + Enable Crash Diagnostics + Enable Crash Diagnostics + + + Collect Shaders + Collect Shaders + + + Copy GPU Buffers + Copy GPU Buffers + + + Host Debug Markers + Host Debug Markers + + + Guest Debug Markers + Guest Debug Markers + + + Update + Bijwerken + + + Check for Updates at Startup + Bij opstart op updates controleren + + + Always Show Changelog + Altijd changelog tonen + + + Update Channel + Updatekanaal + + + Check for Updates + Controleren op updates + + + GUI Settings + GUI-Instellingen + + + Title Music + Title Music + + + Disable Trophy Notification + Disable Trophy Notification + + + Background Image + Background Image + + + Show Background Image + Show Background Image + + + Opacity + Opacity + + + Play title music + Titelmuziek afspelen + + + Update Compatibility Database On Startup + Update Compatibility Database On Startup + + + Game Compatibility + Game Compatibility + + + Display Compatibility Data + Display Compatibility Data + + + Update Compatibility Database + Update Compatibility Database + + + Volume + Volume + + + Save + Opslaan + + + Apply + Toepassen + + + Restore Defaults + Standaardinstellingen herstellen + + + Close + Sluiten + + + Point your mouse at an option to display its description. + Wijzig de muisaanwijzer naar een optie om de beschrijving weer te geven. + + + Console Language:\nSets the language that the PS4 game uses.\nIt's recommended to set this to a language the game supports, which will vary by region. + Console Taal:\nStelt de taal in die het PS4-spel gebruikt.\nHet wordt aanbevolen om dit in te stellen op een taal die het spel ondersteunt, wat kan variëren per regio. + + + Emulator Language:\nSets the language of the emulator's user interface. + Emulator Taal:\nStelt de taal van de gebruikersinterface van de emulator in. + + + Enable Separate Update Folder:\nEnables installing game updates into a separate folder for easy management.\nThis can be manually created by adding the extracted update to the game folder with the name "CUSA00000-UPDATE" where the CUSA ID matches the game's ID. + Enable Separate Update Folder:\nEnables installing game updates into a separate folder for easy management. + + + Show Splash Screen:\nShows the game's splash screen (a special image) while the game is starting. + Opstartscherm weergeven:\nToont het opstartscherm van het spel (een speciale afbeelding) tijdens het starten van het spel. + + + Enable Discord Rich Presence:\nDisplays the emulator icon and relevant information on your Discord profile. + Discord Rich Presence inschakelen:\nToont het emulatoricoon en relevante informatie op je Discord-profiel. + + + Username:\nSets the PS4's account username, which may be displayed by some games. + Gebruikersnaam:\nStelt de gebruikersnaam van het PS4-account in, die door sommige games kan worden weergegeven. + + + Trophy Key:\nKey used to decrypt trophies. Must be obtained from your jailbroken console.\nMust contain only hex characters. + Trophy Key:\nKey used to decrypt trophies. Must be obtained from your jailbroken console.\nMust contain only hex characters. + + + Log Type:\nSets whether to synchronize the output of the log window for performance. May have adverse effects on emulation. + Logtype:\nStelt in of de uitvoer van het logvenster moet worden gesynchroniseerd voor prestaties. Kan nadelige effecten hebben op emulatie. + + + Log Filter:\nFilters the log to only print specific information.\nExamples: "Core:Trace" "Lib.Pad:Debug Common.Filesystem:Error" "*:Critical"\nLevels: Trace, Debug, Info, Warning, Error, Critical - in this order, a specific level silences all levels preceding it in the list and logs every level after it. + Logfilter:\nFiltert het logboek om alleen specifieke informatie af te drukken.\nVoorbeelden: "Core:Trace" "Lib.Pad:Debug Common.Filesystem:Error" "*:Critical" Niveaus: Trace, Debug, Info, Waarschuwing, Fout, Kritiek - in deze volgorde, een specifiek niveau dempt alle voorgaande niveaus in de lijst en logt alle niveaus daarna. + + + Update:\nRelease: Official versions released every month that may be very outdated, but are more reliable and tested.\nNightly: Development versions that have all the latest features and fixes, but may contain bugs and are less stable. + Updateren:\nRelease: Officiële versies die elke maand worden uitgebracht, die zeer verouderd kunnen zijn, maar betrouwbaar en getest zijn.\nNightly: Ontwikkelingsversies die alle nieuwste functies en bugfixes bevatten, maar mogelijk bugs bevatten en minder stabiel zijn. + + + Background Image:\nControl the opacity of the game background image. + Background Image:\nControl the opacity of the game background image. + + + Play Title Music:\nIf a game supports it, enable playing special music when selecting the game in the GUI. + Speel titelsong:\nAls een game dit ondersteunt, wordt speciale muziek afgespeeld wanneer je het spel in de GUI selecteert. + + + Disable Trophy Pop-ups:\nDisable in-game trophy notifications. Trophy progress can still be tracked using the Trophy Viewer (right-click the game in the main window). + Disable Trophy Pop-ups:\nDisable in-game trophy notifications. Trophy progress can still be tracked using the Trophy Viewer (right-click the game in the main window). + + + Hide Cursor:\nChoose when the cursor will disappear:\nNever: You will always see the mouse.\nidle: Set a time for it to disappear after being idle.\nAlways: you will never see the mouse. + Verberg cursor:\nKies wanneer de cursor verdwijnt:\nNooit: Je ziet altijd de muis.\nInactief: Stel een tijd in waarna deze verdwijnt na inactiviteit.\nAltijd: je ziet de muis nooit. + + + Hide Idle Cursor Timeout:\nThe duration (seconds) after which the cursor that has been idle hides itself. + Stel een tijd in voor wanneer de muis verdwijnt na inactiviteit. + + + Back Button Behavior:\nSets the controller's back button to emulate tapping the specified position on the PS4 touchpad. + Gedrag van de terugknop:\nStelt de terugknop van de controller in om een aanraking op de opgegeven positie op de PS4-touchpad na te bootsen. + + + Display Compatibility Data:\nDisplays game compatibility information in table view. Enable "Update Compatibility On Startup" to get up-to-date information. + Display Compatibility Data:\nDisplays game compatibility information in table view. Enable "Update Compatibility On Startup" to get up-to-date information. + + + Update Compatibility On Startup:\nAutomatically update the compatibility database when shadPS4 starts. + Update Compatibility On Startup:\nAutomatically update the compatibility database when shadPS4 starts. + + + Update Compatibility Database:\nImmediately update the compatibility database. + Update Compatibility Database:\nImmediately update the compatibility database. + + + Never + Nooit + + + Idle + Inactief + + + Always + Altijd + + + Touchpad Left + Touchpad Links + + + Touchpad Right + Touchpad Rechts + + + Touchpad Center + Touchpad Midden + + + None + Geen + + + Graphics Device:\nOn multiple GPU systems, select the GPU the emulator will use from the drop down list,\nor select "Auto Select" to automatically determine it. + Grafische adapter:\nIn systemen met meerdere GPU's, kies de GPU die de emulator uit de vervolgkeuzelijst moet gebruiken,\nof kies "Auto Select" om dit automatisch in te stellen. + + + Width/Height:\nSets the size of the emulator window at launch, which can be resized during gameplay.\nThis is different from the in-game resolution. + Breedte/Hoogte:\nStelt de grootte van het emulatorvenster bij het opstarten in, wat tijdens het spelen kan worden gewijzigd.\nDit is anders dan de resolutie in de game. + + + Vblank Divider:\nThe frame rate at which the emulator refreshes at is multiplied by this number. Changing this may have adverse effects, such as increasing the game speed, or breaking critical game functionality that does not expect this to change! + Vblank deler:\nDe frame-rate waartegen de emulator wordt vernieuwd, vermenigvuldigd met dit getal. Dit veranderen kan nadelige effecten hebben, zoals het versnellen van het spel of het verpesten van kritieke gamefunctionaliteiten die niet verwachtten dat dit zou veranderen! + + + Enable Shaders Dumping:\nFor the sake of technical debugging, saves the games shaders to a folder as they render. + Shaderdump inschakelen:\nVoor technische foutopsporing slaat het de shaders van de game op in een map terwijl ze worden gerenderd. + + + Enable Null GPU:\nFor the sake of technical debugging, disables game rendering as if there were no graphics card. + Null GPU inschakelen:\nVoor technische foutopsporing schakelt de game-rendering uit alsof er geen grafische kaart is. + + + Enable HDR:\nEnables HDR in games that support it.\nYour monitor must have support for the BT2020 PQ color space and the RGB10A2 swapchain format. + Enable HDR:\nEnables HDR in games that support it.\nYour monitor must have support for the BT2020 PQ color space and the RGB10A2 swapchain format. + + + Game Folders:\nThe list of folders to check for installed games. + Spelmap:\nDe lijst met mappen om te controleren op geïnstalleerde spellen. + + + Add:\nAdd a folder to the list. + Toevoegen:\nVoeg een map toe aan de lijst. + + + Remove:\nRemove a folder from the list. + Verwijderen:\nVerwijder een map uit de lijst. + + + Enable Debug Dumping:\nSaves the import and export symbols and file header information of the currently running PS4 program to a directory. + Foutopsporing dump inschakelen:\nSlaat de import- en export-symbolen en de bestandsheaderinformatie van de momenteel draaiende PS4-toepassing op in een map. + + + Enable Vulkan Validation Layers:\nEnables a system that validates the state of the Vulkan renderer and logs information about its internal state.\nThis will reduce performance and likely change the behavior of emulation. + Vulkan validatielaag inschakelen:\nSchakelt een systeem in dat de status van de Vulkan-renderer valideert en informatie over de interne status ervan logt. Dit zal de prestaties verlagen en waarschijnlijk het emulatiegedrag veranderen. + + + Enable Vulkan Synchronization Validation:\nEnables a system that validates the timing of Vulkan rendering tasks.\nThis will reduce performance and likely change the behavior of emulation. + Vulkan synchronisatievalidatie inschakelen:\nSchakelt een systeem in dat de timing van Vulkan-renderingtaken valideert. Dit zal de prestaties verlagen en waarschijnlijk het emulatiegedrag veranderen. + + + Enable RenderDoc Debugging:\nIf enabled, the emulator will provide compatibility with Renderdoc to allow capture and analysis of the currently rendered frame. + RenderDoc foutopsporing inschakelen:\nAls ingeschakeld, biedt de emulator compatibiliteit met Renderdoc om de momenteel gerenderde frame vast te leggen en te analyseren. + + + Collect Shaders:\nYou need this enabled to edit shaders with the debug menu (Ctrl + F10). + Collect Shaders:\nYou need this enabled to edit shaders with the debug menu (Ctrl + F10). + + + Crash Diagnostics:\nCreates a .yaml file with info about the Vulkan state at the time of crashing.\nUseful for debugging 'Device lost' errors. If you have this enabled, you should enable Host AND Guest Debug Markers.\nDoes not work on Intel GPUs.\nYou need Vulkan Validation Layers enabled and the Vulkan SDK for this to work. + Crash Diagnostics:\nCreates a .yaml file with info about the Vulkan state at the time of crashing.\nUseful for debugging 'Device lost' errors. If you have this enabled, you should enable Host AND Guest Debug Markers.\nDoes not work on Intel GPUs.\nYou need Vulkan Validation Layers enabled and the Vulkan SDK for this to work. + + + Copy GPU Buffers:\nGets around race conditions involving GPU submits.\nMay or may not help with PM4 type 0 crashes. + Copy GPU Buffers:\nGets around race conditions involving GPU submits.\nMay or may not help with PM4 type 0 crashes. + + + Host Debug Markers:\nInserts emulator-side information like markers for specific AMDGPU commands around Vulkan commands, as well as giving resources debug names.\nIf you have this enabled, you should enable Crash Diagnostics.\nUseful for programs like RenderDoc. + Host Debug Markers:\nInserts emulator-side information like markers for specific AMDGPU commands around Vulkan commands, as well as giving resources debug names.\nIf you have this enabled, you should enable Crash Diagnostics.\nUseful for programs like RenderDoc. + + + Guest Debug Markers:\nInserts any debug markers the game itself has added to the command buffer.\nIf you have this enabled, you should enable Crash Diagnostics.\nUseful for programs like RenderDoc. + Guest Debug Markers:\nInserts any debug markers the game itself has added to the command buffer.\nIf you have this enabled, you should enable Crash Diagnostics.\nUseful for programs like RenderDoc. + + + Save Data Path:\nThe folder where game save data will be saved. + Save Data Path:\nThe folder where game save data will be saved. + + + Browse:\nBrowse for a folder to set as the save data path. + Browse:\nBrowse for a folder to set as the save data path. + + + Release + Release + + + Nightly + Nightly + + + Set the volume of the background music. + Set the volume of the background music. + + + Enable Motion Controls + Enable Motion Controls + + + Save Data Path + Save Data Path + + + Browse + Browse + + + async + async + + + sync + sync + + + Auto Select + Auto Select + + + Directory to install games + Directory to install games + + + Directory to save data + Directory to save data + + + Video + Video + + + Display Mode + Display Mode + + + Windowed + Windowed + + + Fullscreen + Fullscreen + + + Fullscreen (Borderless) + Fullscreen (Borderless) + + + Window Size + Window Size + + + W: + W: + + + H: + H: + + + Separate Log Files + Separate Log Files + + + Separate Log Files:\nWrites a separate logfile for each game. + Separate Log Files:\nWrites a separate logfile for each game. + + + Trophy Notification Position + Trophy Notification Position + + + Left + Left + + + Right + Right + + + Top + Top + + + Bottom + Bottom + + + Notification Duration + Notification Duration + + + Portable User Folder + Portable User Folder + + + Create Portable User Folder from Common User Folder + Create Portable User Folder from Common User Folder + + + Portable user folder:\nStores shadPS4 settings and data that will be applied only to the shadPS4 build located in the current folder. Restart the app after creating the portable user folder to begin using it. + Portable user folder:\nStores shadPS4 settings and data that will be applied only to the shadPS4 build located in the current folder. Restart the app after creating the portable user folder to begin using it. + + + Cannot create portable user folder + Cannot create portable user folder + + + %1 already exists + %1 already exists + + + Portable user folder created + Portable user folder created + + + %1 successfully created. + %1 successfully created. + + + Open the custom trophy images/sounds folder:\nYou can add custom images to the trophies and an audio.\nAdd the files to custom_trophy with the following names:\ntrophy.wav OR trophy.mp3, bronze.png, gold.png, platinum.png, silver.png\nNote: The sound will only work in QT versions. + Open the custom trophy images/sounds folder:\nYou can add custom images to the trophies and an audio.\nAdd the files to custom_trophy with the following names:\ntrophy.wav OR trophy.mp3, bronze.png, gold.png, platinum.png, silver.png\nNote: The sound will only work in QT versions. + + + + TrophyViewer + + Trophy Viewer + Trophy Viewer + + + Select Game: + Select Game: + + + Progress + Progress + + + Show Earned Trophies + Show Earned Trophies + + + Show Not Earned Trophies + Show Not Earned Trophies + + + Show Hidden Trophies + Show Hidden Trophies + + + diff --git a/src/qt_gui/translations/pl_PL.ts b/src/qt_gui/translations/pl_PL.ts index 1aed08394..39950d6ec 100644 --- a/src/qt_gui/translations/pl_PL.ts +++ b/src/qt_gui/translations/pl_PL.ts @@ -1,1664 +1,2089 @@ + - - - - 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... - - - - InstallDirSelect - - - shadPS4 - Choose directory - shadPS4 - Wybierz katalog - - - - Select which directory you want to install to. - Select which directory you want to install to. - - - - 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 - - - - Cheats / Patches - Kody / poprawki - - - - SFO Viewer - Menedżer plików SFO - - - - Trophy Viewer - Menedżer trofeów - - - - Open Folder... - Otwórz Folder... - - - - Open Game Folder - Otwórz Katalog Gry - - - - Open Save Data Folder - Otwórz Folder Danych Zapisów - - - - Open Log Folder - Otwórz Folder Dziennika - - - - Copy info... - Kopiuj informacje... - - - - Copy Name - Kopiuj nazwę - - - - Copy Serial - Kopiuj numer seryjny - - - - Copy All - Kopiuj wszystko - - - - Delete... - Delete... - - - - Delete Game - Delete Game - - - - Delete Update - Delete Update - - - - Delete DLC - Delete DLC - - - - Compatibility... - Compatibility... - - - - Update database - Update database - - - - View report - View report - - - - Submit a report - Submit a report - - - - Shortcut creation - Tworzenie skrótu - - - - Shortcut created successfully! - Utworzenie skrótu zakończone pomyślnie! - - - - Error - Błąd - - - - Error creating shortcut! - Utworzenie skrótu zakończone niepowodzeniem! - - - - Install PKG - Zainstaluj PKG - - - - Game - Game - - - - requiresEnableSeparateUpdateFolder_MSG - This feature requires the 'Enable Separate Update Folder' config option to work. If you want to use this feature, please enable it. - - - - This game has no update to delete! - This game has no update to delete! - - - - Update - Update - - - - This game has no DLC to delete! - This game has no DLC to delete! - - - - DLC - DLC - - - - Delete %1 - Delete %1 - - - - Are you sure you want to delete %1's %2 directory? - Are you sure you want to delete %1's %2 directory? - - - - MainWindow - - - Open/Add Elf Folder - Otwórz/Dodaj folder Elf - - - - Install Packages (PKG) - Zainstaluj paczkę (PKG) - - - - Boot Game - Uruchom grę - - - - Check for Updates - Sprawdź aktualizacje - - - - 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 zainstalowanych gier - - - - Download Cheats/Patches - Pobierz kody / poprawki - - - - 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 - - - - Help - Pomoc - - - - Dark - Ciemny - - - - Light - Jasny - - - - Green - Zielony - - - - Blue - Niebieski - - - - Violet - Fioletowy - - - - toolBar - Pasek narzędzi - - - - PKGViewer - - - Open Folder - Otwórz 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 - - - - Enable Separate Update Folder - Enable Separate Update Folder - - - - Show Splash - Pokaż ekran powitania - - - - Is PS4 Pro - Emulacja PS4 Pro - - - - Enable Discord Rich Presence - Włącz Discord Rich Presence - - - - Username - Nazwa użytkownika - - - - Trophy Key - Trophy Key - - - - Trophy - Trophy - - - - Logger - Dziennik zdarzeń - - - - Log Type - Typ dziennika - - - - Log Filter - Filtrowanie dziennika - - - - Input - Wejście - - - - Cursor - Kursor - - - - Hide Cursor - Ukryj kursor - - - - Hide Cursor Idle Timeout - Czas oczekiwania na ukrycie kursora przy bezczynności - - - - s - s - - - - Controller - Kontroler - - - - Back Button Behavior - Zachowanie przycisku wstecz - - - - Graphics - Grafika - - - - Graphics Device - Karta graficzna - - - - Width - Szerokość - - - - Height - Wysokość - - - - Vblank Divider - Dzielnik przerwy pionowej (Vblank) - - - - Advanced - Zaawansowane - - - - Enable Shaders Dumping - Włącz zgrywanie cieni - - - - Enable NULL GPU - Wyłącz kartę graficzną - - - - Paths - Ścieżki - - - - Game Folders - Foldery gier - - - - Add... - Dodaj... - - - - Remove - Usuń - - - - 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 - - - - Update - Aktualizacja - - - - Check for Updates at Startup - Sprawdź aktualizacje przy starcie - - - - Update Channel - Kanał Aktualizacji - - - - Check for Updates - Sprawdź aktualizacje - - - - GUI Settings - Ustawienia Interfejsu - - - - Disable Trophy Pop-ups - Disable Trophy Pop-ups - - - - Play title music - Odtwórz muzykę tytułową - - - - Update Compatibility Database On Startup - Update Compatibility Database On Startup - - - - Game Compatibility - Game Compatibility - - - - Display Compatibility Data - Display Compatibility Data - - - - Update Compatibility Database - Update Compatibility Database - - - - Volume - Głośność - - - - Audio Backend - Audio Backend - - - - MainWindow - - - Game List - Lista gier - - - - * 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 - Wypakowywanie PKG - - - - Patch detected! - Wykryto łatkę! - - - - PKG and Game versions match: - Wersje PKG i gry są zgodne: - - - - Would you like to overwrite? - Czy chcesz nadpisać? - - - - PKG Version %1 is older than installed version: - Wersja PKG %1 jest starsza niż zainstalowana wersja: - - - - Game is installed: - Gra jest zainstalowana: - - - - Would you like to install Patch: - Czy chcesz zainstalować łatkę: - - - - DLC Installation - Instalacja DLC - - - - Would you like to install DLC: %1? - Czy chcesz zainstalować DLC: %1? - - - - DLC already installed: - DLC już zainstalowane: - - - - Game already installed - Gra już zainstalowana - - - - 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 - Wypakowywanie PKG %1/%2 - - - - Extraction Finished - Wypakowywanie zakończone - - - - 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 for - Cheats / Patches for - - - - 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ę przeanalizować 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. Jeśli poprawka się nie pojawia, możliwe, że nie istnieje dla konkretnego numeru seryjnego i wersji gry. - - - - Failed to parse JSON data from HTML. - Nie udało się przeanalizować danych JSON z HTML. - - - - Failed to retrieve HTML page. - Nie udało się pobrać strony HTML. - - - - The game is in version: %1 - Gra jest w wersji: %1 - - - - The downloaded patch only works on version: %1 - Pobrana łatka działa tylko w wersji: %1 - - - - You may need to update your game. - Możesz potrzebować zaktualizować swoją grę. - - - - Incompatibility Notice - Powiadomienie o niezgodności - - - - 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ę przeanlizować JSON: - - - - Can't apply cheats before the game is started - Nie można zastosować kodów przed uruchomieniem gry. - - - - SettingsDialog - - - Save - Zapisz - - - - Apply - Zastosuj - - - - Restore Defaults - Przywróć ustawienia domyślne - - - - Close - Zamknij - - - - Point your mouse at an option to display its description. - Najedź kursorem na opcję, aby wyświetlić jej opis. - - - - consoleLanguageGroupBox - Język konsoli:\nUstala język, który używa gra PS4.\nZaleca się ustawienie tego na język, który obsługuje gra, co może się różnić w zależności od regionu. - - - - emulatorLanguageGroupBox - Język emulatora:\nUstala język interfejsu użytkownika emulatora. - - - - fullscreenCheckBox - Włącz tryb pełnoekranowy:\nAutomatycznie przełącza okno gry w tryb pełnoekranowy.\nMożna to wyłączyć naciskając klawisz F11. - - - - separateUpdatesCheckBox - Enable Separate Update Folder:\nEnables installing game updates into a separate folder for easy management. - - - - showSplashCheckBox - Wyświetl ekran powitalny:\nPodczas uruchamiania gry wyświetla ekran powitalny (specjalny obraz). - - - - ps4proCheckBox - Czy PS4 Pro:\nSprawia, że emulator działa jak PS4 PRO, co może aktywować specjalne funkcje w grach, które to obsługują. - - - - discordRPCCheckbox - Włącz Discord Rich Presence:\nWyświetla ikonę emuladora i odpowiednie informacje na twoim profilu Discord. - - - - userName - Nazwa użytkownika:\nUstala nazwę użytkownika konta PS4, która może być wyświetlana w niektórych grach. - - - - TrophyKey - Trophy Key:\nKey used to decrypt trophies. Must be obtained from your jailbroken console.\nMust contain only hex characters. - - - - logTypeGroupBox - Typ logu:\nUstala, czy synchronizować wyjście okna dziennika dla wydajności. Może to mieć negatywny wpływ na emulację. - - - - logFilter - Filtr logu:\nFiltruje dziennik, aby drukować tylko określone informacje.\nPrzykłady: "Core:Trace" "Lib.Pad:Debug Common.Filesystem:Error" "*:Critical" Poziomy: Trace, Debug, Info, Warning, Error, Critical - w tej kolejności, konkretny poziom wycisza wszystkie wcześniejsze poziomy w liście i rejestruje wszystkie poziomy później. - - - - updaterGroupBox - Aktualizator:\nRelease: Oficjalne wersje wydawane co miesiąc, które mogą być bardzo przestarzałe, ale są niezawodne i przetestowane.\nNightly: Wersje rozwojowe, które zawierają wszystkie najnowsze funkcje i poprawki błędów, ale mogą mieć błędy i być mniej stabilne. - - - - GUIgroupBox - Odtwórz muzykę tytułową:\nJeśli gra to obsługuje, aktywuje odtwarzanie specjalnej muzyki podczas wybierania gry w GUI. - - - - disableTrophycheckBox - Disable Trophy Pop-ups:\nDisable in-game trophy notifications. Trophy progress can still be tracked using the Trophy Viewer (right-click the game in the main window). - - - - hideCursorGroupBox - Ukryj kursor:\nWybierz, kiedy kursor zniknie:\nNigdy: Zawsze będziesz widział myszkę.\nNieaktywny: Ustaw czas, po którym zniknie po bezczynności.\nZawsze: nigdy nie zobaczysz myszki. - - - - idleTimeoutGroupBox - Ustaw czas, po którym mysz zniknie po bezczynności. - - - - backButtonBehaviorGroupBox - Zachowanie przycisku Wstecz:\nUstawia przycisk Wstecz kontrolera tak, aby emulował dotknięcie określonego miejsca na panelu dotykowym PS4. - - - - enableCompatibilityCheckBox - Display Compatibility Data:\nDisplays game compatibility information in table view. Enable "Update Compatibility On Startup" to get up-to-date information. - - - - checkCompatibilityOnStartupCheckBox - Update Compatibility On Startup:\nAutomatically update the compatibility database when shadPS4 starts. - - - - updateCompatibilityButton - Update Compatibility Database:\nImmediately update the compatibility database. - - - - Never - Nigdy - - - - Idle - Bezczynny - - - - Always - Zawsze - - - - Touchpad Left - Touchpad Lewy - - - - Touchpad Right - Touchpad Prawy - - - - Touchpad Center - Touchpad Środkowy - - - - None - Brak - - - - graphicsAdapterGroupBox - Urządzenie graficzne:\nW systemach z wieloma GPU, wybierz GPU, który emulator ma używać z rozwijanego menu,\n lub wybierz "Auto Select", aby ustawić go automatycznie. - - - - resolutionLayout - Szerokość/Wysokość:\nUstala rozmiar okna emulatora podczas uruchamiania, który może być zmieniany w trakcie gry.\nTo różni się od rozdzielczości w grze. - - - - heightDivider - Dzielnik Vblank:\nWskaźnik klatek, z jakim emulator jest odświeżany, pomnożony przez tę liczbę. Zmiana tego może mieć negatywne skutki, takie jak przyspieszenie gry lub zniszczenie krytycznej funkcjonalności gry, która nie spodziewa się, że to zostanie zmienione! - - - - dumpShadersCheckBox - Włącz zrzucanie shaderów:\nDla technicznego debugowania zapisuje shadery z gry w folderze podczas renderowania. - - - - nullGpuCheckBox - Włącz Null GPU:\nDla technicznego debugowania dezaktywuje renderowanie gry tak, jakby nie było karty graficznej. - - - - gameFoldersBox - Foldery gier:\nLista folderów do sprawdzenia zainstalowanych gier. - - - - addFolderButton - Dodaj:\nDodaj folder do listy. - - - - removeFolderButton - Usuń:\nUsuń folder z listy. - - - - debugDump - Włącz zrzut debugowania:\nZapisuje symbole importu i eksportu oraz informacje nagłówkowe pliku dla aktualnie działającej aplikacji PS4 w katalogu. - - - - vkValidationCheckBox - Włącz warstwę walidacji Vulkan:\nWłącza system, który waliduje stan renderera Vulkan i loguje informacje o jego wewnętrznym stanie. Zmniejszy to wydajność i prawdopodobnie zmieni zachowanie emulacji. - - - - vkSyncValidationCheckBox - Włącz walidację synchronizacji Vulkan:\nWłącza system, który waliduje timing zadań renderowania Vulkan. Zmniejszy to wydajność i prawdopodobnie zmieni zachowanie emulacji. - - - - rdocCheckBox - Włącz debugowanie RenderDoc:\nJeśli włączone, emulator zapewnia kompatybilność z Renderdoc, aby umożliwić nagrywanie i analizowanie aktualnie renderowanej klatki. - - - - GameListFrame - - - Icon - Ikona - - - - Name - Nazwa - - - - Serial - Numer seryjny - - - - Compatibility - Compatibility - - - - Region - Region - - - - Firmware - Oprogramowanie - - - - Size - Rozmiar - - - - Version - Wersja - - - - Path - Ścieżka - - - - Play Time - Czas gry - - - - Never Played - Never Played - - - - h - h - - - - m - m - - - - s - s - - - - Compatibility is untested - Compatibility is untested - - - - Game does not initialize properly / crashes the emulator - Game does not initialize properly / crashes the emulator - - - - Game boots, but only displays a blank screen - Game boots, but only displays a blank screen - - - - Game displays an image but does not go past the menu - Game displays an image but does not go past the menu - - - - Game has game-breaking glitches or unplayable performance - Game has game-breaking glitches or unplayable performance - - - - Game can be completed with playable performance and no major glitches - Game can be completed with playable performance and no major glitches - - - - CheckUpdate - - - Auto Updater - Automatyczne aktualizacje - - - - Error - Błąd - - - - Network error: - Błąd sieci: - - - - Failed to parse update information. - Nie udało się sparsować informacji o aktualizacji. - - - - No pre-releases found. - Nie znaleziono wersji przedpremierowych. - - - - Invalid release data. - Nieprawidłowe dane wydania. - - - - No download URL found for the specified asset. - Nie znaleziono adresu URL do pobrania dla określonego zasobu. - - - - Your version is already up to date! - Twoja wersja jest już aktualna! - - - - Update Available - Dostępna aktualizacja - - - - Update Channel - Kanał Aktualizacji - - - - Current Version - Aktualna wersja - - - - Latest Version - Ostatnia wersja - - - - Do you want to update? - Czy chcesz zaktualizować? - - - - Show Changelog - Pokaż zmiany - - - - Check for Updates at Startup - Sprawdź aktualizacje przy starcie - - - - Update - Aktualizuj - - - - No - Nie - - - - Hide Changelog - Ukryj zmiany - - - - Changes - Zmiany - - - - Network error occurred while trying to access the URL - Błąd sieci wystąpił podczas próby uzyskania dostępu do URL - - - - Download Complete - Pobieranie zakończone - - - - The update has been downloaded, press OK to install. - Aktualizacja została pobrana, naciśnij OK, aby zainstalować. - - - - Failed to save the update file at - Nie udało się zapisać pliku aktualizacji w - - - - Starting Update... - Rozpoczynanie aktualizacji... - - - - Failed to create the update script file - Nie udało się utworzyć pliku skryptu aktualizacji - - - - GameListUtils - - - B - B - - - - KB - KB - - - - MB - MB - - - - GB - GB - - - - TB - TB - - - \ No newline at end of file + + + AboutDialog + + About shadPS4 + O programie + + + 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. + + + + CheatsPatches + + Cheats / Patches for + Kody / Poprawki dla + + + 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:\n + 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ź:\n + + + 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 + + + Delete File + Usuń plik + + + No files selected. + Nie wybrano pliku. + + + You can delete the cheats you don't want after downloading them. + Możesz usunąć kody, których nie chcesz po ich pobraniu. + + + 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ę przeanalizować 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 + + + No Cheats found for this game in this version of the selected repository,try another repository or a different version of the game. + 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 + + + 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. + 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 + + + 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. If the patch does not appear, it may be that it does not exist for the specific serial and version of the game. + 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. Jeśli poprawka się nie pojawia, możliwe, że nie istnieje dla konkretnego numeru seryjnego i wersji gry. + + + Failed to parse JSON data from HTML. + Nie udało się przeanalizować danych JSON z HTML. + + + Failed to retrieve HTML page. + Nie udało się pobrać strony HTML. + + + The game is in version: %1 + Gra jest w wersji: %1 + + + The downloaded patch only works on version: %1 + Pobrana łatka działa tylko w wersji: %1 + + + You may need to update your game. + Może być konieczne uaktualnienie gry. + + + Incompatibility Notice + Powiadomienie o niezgodności + + + 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: + + + Failed to open files.json for reading. + Nie można otworzyć pliku files.json do odczytu. + + + Name: + Nazwa: + + + Can't apply cheats before the game is started + Nie można zastosować kodów przed uruchomieniem gry. + + + Close + Zamknij + + + + CheckUpdate + + Auto Updater + Asystent aktualizacji + + + Error + Błąd + + + Network error: + Błąd sieci: + + + The Auto Updater allows up to 60 update checks per hour.\nYou have reached this limit. Please try again later. + Automatyczna aktualizacja umożliwia maksymalnie 60 sprawdzeń aktualizacji na godzinę.\nOsiągnąłeś ten limit. Spróbuj ponownie później. + + + Failed to parse update information. + Nie udało się sparsować informacji o aktualizacji. + + + No pre-releases found. + Nie znaleziono wersji przedpremierowych. + + + Invalid release data. + Nieprawidłowe dane wydania. + + + No download URL found for the specified asset. + Nie znaleziono adresu URL do pobrania dla określonego zasobu. + + + Your version is already up to date! + Twoja wersja jest już aktualna! + + + Update Available + Dostępna aktualizacja + + + Update Channel + Kanał aktualizacji + + + Current Version + Aktualna wersja + + + Latest Version + Najnowsza wersja + + + Do you want to update? + Czy chcesz zaktualizować? + + + Show Changelog + Pokaż zmiany + + + Check for Updates at Startup + Sprawdź aktualizacje przy starcie + + + Update + Aktualizuj + + + No + Nie + + + Hide Changelog + Ukryj zmiany + + + Changes + Zmiany + + + Network error occurred while trying to access the URL + Błąd sieci wystąpił podczas próby uzyskania dostępu do URL + + + Download Complete + Pobieranie zakończone + + + The update has been downloaded, press OK to install. + Aktualizacja została pobrana, naciśnij OK, aby zainstalować. + + + Failed to save the update file at + Nie udało się zapisać pliku aktualizacji w + + + Starting Update... + Rozpoczynanie aktualizacji... + + + Failed to create the update script file + Nie udało się utworzyć pliku skryptu aktualizacji + + + + CompatibilityInfoClass + + Fetching compatibility data, please wait + Pobieranie danych o kompatybilności, proszę czekać + + + Cancel + Anuluj + + + Loading... + Ładowanie... + + + Error + Błąd + + + Unable to update compatibility data! Try again later. + Nie można zaktualizować danych o kompatybilności! Spróbuj ponownie później. + + + Unable to open compatibility_data.json for writing. + Nie można otworzyć pliku compatibility_data.json do zapisu. + + + Unknown + Nieznany + + + Nothing + Nic + + + Boots + Uruchamia się + + + Menus + Menu + + + Ingame + W grze + + + Playable + Grywalne + + + + ControlSettings + + Configure Controls + Skonfiguruj sterowanie + + + D-Pad + Krzyżak + + + Up + Góra + + + Left + Lewo + + + Right + Prawo + + + Down + Dół + + + Left Stick Deadzone (def:2 max:127) + Martwa strefa lewego drążka (def:2 max:127) + + + Left Deadzone + Martwa strefa lewego drążka + + + Left Stick + Lewy drążek + + + Config Selection + Wybór konfiguracji + + + Common Config + Typowa konfiguracja + + + Use per-game configs + Użyj osobnej konfiguracji dla każdej gry + + + L1 / LB + L1 / LB + + + L2 / LT + L2 / LT + + + Back + Wstecz + + + R1 / RB + R1 / RB + + + R2 / RT + R2 / RT + + + L3 + L3 + + + Options / Start + Opcje / Start + + + R3 + R3 + + + Face Buttons + Przyciski akcji + + + Triangle / Y + Trójkąt / Y + + + Square / X + Kwadrat / X + + + Circle / B + Kółko / B + + + Cross / A + Krzyżyk / A + + + Right Stick Deadzone (def:2, max:127) + Martwa strefa prawego drążka (def:2 max:127) + + + Right Deadzone + Martwa strefa prawego drążka + + + Right Stick + Prawy drążek + + + Color Adjustment + Dostosowanie koloru + + + R: + Czerwony: + + + G: + Zielony: + + + B: + Niebieski: + + + Override Lightbar Color + Zastąp kolor paska świetlnego + + + Override Color + Zastąp kolor + + + Unable to Save + Zapisywanie nie powiodło się + + + Cannot bind axis values more than once + Nie można powiązać wartości osi więcej niż raz + + + Save + Zapisz + + + Apply + Zastosuj + + + Restore Defaults + Przywróć ustawienia domyślne + + + Cancel + Anuluj + + + + EditorDialog + + Edit Keyboard + Mouse and Controller input bindings + Edytuj przypisanie klawiszy klawiatury + myszy oraz kontrolera + + + Use Per-Game configs + Użyj osobnej konfiguracji dla każdej gry + + + Error + Błąd + + + Could not open the file for reading + Nie można otworzyć pliku do odczytu + + + Could not open the file for writing + Nie można otworzyć pliku do zapisu + + + Save Changes + Zapisać zmiany + + + Do you want to save changes? + Czy chcesz zapisać zmiany? + + + Help + Pomóc + + + Do you want to reset your custom default config to the original default config? + Czy chcesz zresetować Twoją domyślną konfigurację do oryginalnej domyślnej konfiguracji? + + + Do you want to reset this config to your custom default config? + Czy chcesz zresetować tę konfigurację do Twojej domyślnej konfiguracji? + + + Reset to Default + Zresetować do domyślnych + + + + 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 + + + Directory to install DLC + Katalog do instalacji dodatkowej zawartości (DLC) + + + + GameListFrame + + Icon + Ikona + + + Name + Nazwa + + + Serial + Numer seryjny + + + Compatibility + Kompatybilność + + + Region + Region + + + Firmware + Oprogramowanie + + + Size + Rozmiar + + + Version + Wersja + + + Path + Ścieżka + + + Play Time + Czas gry + + + Never Played + Nigdy nie grane + + + h + godz. + + + m + min + + + s + s + + + Compatibility is untested + Kompatybilność nie została przetestowana + + + Game does not initialize properly / crashes the emulator + Gra nie inicjuje się poprawnie / zawiesza się emulator + + + Game boots, but only displays a blank screen + Gra uruchamia się, ale wyświetla tylko pusty ekran + + + Game displays an image but does not go past the menu + Gra wyświetla obraz, ale nie przechodzi do menu + + + Game has game-breaking glitches or unplayable performance + Gra ma usterki przerywające rozgrywkę lub niegrywalną wydajność + + + Game can be completed with playable performance and no major glitches + Grę można ukończyć z grywalną wydajnością i bez większych usterek + + + Click to see details on github + Kliknij, aby zobaczyć szczegóły na GitHub + + + Last updated + Ostatnia aktualizacja + + + + GameListUtils + + B + B + + + KB + KB + + + MB + MB + + + GB + GB + + + TB + TB + + + + GuiContextMenus + + Create Shortcut + Utwórz skrót + + + Cheats / Patches + Kody / poprawki + + + SFO Viewer + Menedżer plików SFO + + + Trophy Viewer + Menedżer trofeów + + + Open Folder... + Otwórz Folder... + + + Open Game Folder + Otwórz Katalog Gry + + + Open Save Data Folder + Otwórz folder zapisanych danych + + + Open Log Folder + Otwórz Folder Dziennika + + + Copy info... + Kopiuj informacje... + + + Copy Name + Kopiuj nazwę + + + Copy Serial + Kopiuj numer seryjny + + + Copy Version + Kopiuj wersję + + + Copy Size + Kopiuj rozmiar + + + Copy All + Kopiuj wszystko + + + Delete... + Usuń... + + + Delete Game + Usuń grę + + + Delete Update + Usuń aktualizację + + + Delete DLC + Usuń dodatkową zawartość (DLC) + + + Delete Trophy + Usuń trofeum + + + Compatibility... + Kompatybilność... + + + Update database + Zaktualizuj bazę danych + + + View report + Wyświetl zgłoszenie + + + Submit a report + Wyślij zgłoszenie + + + Shortcut creation + Tworzenie skrótu + + + Shortcut created successfully! + Utworzenie skrótu zakończone pomyślnie! + + + Error + Błąd + + + Error creating shortcut! + Utworzenie skrótu zakończone niepowodzeniem! + + + Game + Gra + + + This game has no update to delete! + Ta gra nie ma aktualizacji do usunięcia! + + + Update + Aktualizacja + + + This game has no DLC to delete! + Ta gra nie ma dodatkowej zawartości (DLC) do usunięcia! + + + DLC + Dodatkowa zawartość (DLC) + + + Delete %1 + Usuń %1 + + + Are you sure you want to delete %1's %2 directory? + Czy na pewno chcesz usunąć katalog %1 z %2? + + + Open Update Folder + Otwórz folder aktualizacji + + + Delete Save Data + Usuń zapisane dane + + + This game has no update folder to open! + Ta gra nie ma folderu aktualizacji do otwarcia! + + + No log file found for this game! + Nie znaleziono pliku dziennika dla tej gry! + + + Failed to convert icon. + Nie udało się przekonwertować ikony. + + + This game has no save data to delete! + Ta gra nie ma zapisów do usunięcia! + + + This game has no saved trophies to delete! + Ta gra nie ma zapisanych trofeuów do usunięcia! + + + Save Data + Zapisane dane + + + Trophy + Trofeum + + + SFO Viewer for + Menedżer plików SFO dla + + + + HelpDialog + + Quickstart + Szybki start + + + FAQ + Najczęściej zadawane pytania + + + Syntax + Składnia + + + Special Bindings + Specjalne wiązania + + + Keybindings + Przypisanie klawiszy + + + + KBMSettings + + Configure Controls + Skonfiguruj sterowanie + + + D-Pad + Krzyżak + + + Up + Strzałka w górę + + + unmapped + nieprzypisane + + + Left + Strzałka w lewo + + + Right + Strzałka w prawo + + + Down + Strzałka w dół + + + Left Analog Halfmode + Połowiczny tryb lewego drążka + + + hold to move left stick at half-speed + przytrzymaj, aby przesuwać lewy drążek dwa razy wolniej + + + Left Stick + Lewy drążek + + + Config Selection + Wybór konfiguracji + + + Common Config + Typowa konfiguracja + + + Use per-game configs + Użyj osobnej konfiguracji dla każdej gry + + + L1 + L1 + + + L2 + L2 + + + Text Editor + Edytor tekstu + + + Help + Pomoc + + + R1 + R1 + + + R2 + R2 + + + L3 + L3 + + + Touchpad Click + Kliknięcie Touchpada + + + Mouse to Joystick + Mysz na Joystick + + + *press F7 ingame to activate + *naciśnij F7 w grze aby aktywować + + + R3 + R3 + + + Options + Opcje + + + Mouse Movement Parameters + Parametry ruchu myszy + + + note: click Help Button/Special Keybindings for more information + uwaga: kliknij przycisk Pomoc/Specjalne skróty klawiszowe, aby uzyskać więcej informacji + + + Face Buttons + Przednie przyciski + + + Triangle + Trójkąt + + + Square + Kwadrat + + + Circle + Kółko + + + Cross + Krzyżyk + + + Right Analog Halfmode + Połowiczny tryb prawego drążka + + + hold to move right stick at half-speed + przytrzymaj, aby przesuwać prawy drążek dwa razy wolniej + + + Right Stick + Prawy drążek + + + Speed Offset (def 0.125): + Offset prędkości (def 0,125): + + + Copy from Common Config + Kopiuj z typowej konfiguracji + + + Deadzone Offset (def 0.50): + Offset martwych stref (def 0,50): + + + Speed Multiplier (def 1.0): + Mnożnik prędkości (def1.0): + + + Common Config Selected + Wybrano typową konfigurację + + + This button copies mappings from the Common Config to the currently selected profile, and cannot be used when the currently selected profile is the Common Config. + Przycisk ten kopiuje mapowanie z typowej konfiguracji do aktualnie wybranego profilu, i nie może być użyty, gdy aktualnie wybranym profilem jest typowa konfiguracja. + + + Copy values from Common Config + Kopiuj z typowej konfiguracji + + + Do you want to overwrite existing mappings with the mappings from the Common Config? + Czy chcesz nadpisać istniejące mapowania mapowaniem z typowej konfiguracji? + + + Unable to Save + Zapisywanie nie powiodło się + + + Cannot bind any unique input more than once + Nie można powiązać żadnych unikalnych danych wejściowych więcej niż raz + + + Press a key + Naciśnij klawisz + + + Cannot set mapping + Nie można ustawić mapowania + + + Mousewheel cannot be mapped to stick outputs + Kółko myszy nie może być przypisane do sterowania drążkiem + + + Save + Zapisz + + + Apply + Zastosuj + + + Restore Defaults + Przywróć ustawienia domyślne + + + Cancel + Anuluj + + + + MainWindow + + Open/Add Elf Folder + Otwórz/Dodaj folder Elf + + + Boot Game + Uruchom grę + + + Check for Updates + Sprawdź aktualizacje + + + About shadPS4 + O programie + + + Configure... + Konfiguruj... + + + Recent Games + Ostatnie gry + + + Open shadPS4 Folder + Otwórz folder shadPS4 + + + 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 zainstalowanych gier + + + Download Cheats/Patches + Pobierz kody / poprawki + + + Dump Game List + Zgraj listę gier + + + Trophy Viewer + Menedżer trofeów + + + No games found. Please add your games to your library first. + Nie znaleziono gier. Najpierw dodaj swoje gry do swojej biblioteki. + + + 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 + + + Help + Pomoc + + + Dark + Ciemny + + + Light + Jasny + + + Green + Zielony + + + Blue + Niebieski + + + Violet + Fioletowy + + + toolBar + Pasek narzędzi + + + Game List + Lista gier + + + * 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: + + + 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! + + + Run Game + Uruchom grę + + + Eboot.bin file not found + Nie znaleziono pliku EBOOT.BIN + + + Game is already running! + Gra jest już uruchomiona! + + + shadPS4 + shadPS4 + + + Play + Play + + + Pause + Pause + + + Stop + Stop + + + Restart + Restart + + + Full Screen + Full Screen + + + Controllers + Controllers + + + Keyboard + Keyboard + + + Refresh List + Refresh List + + + Resume + Resume + + + Show Labels Under Icons + Show Labels Under Icons + + + + SettingsDialog + + Settings + Ustawienia + + + General + Ogólne + + + System + System + + + Console Language + Język konsoli + + + Emulator Language + Język emulatora + + + Emulator + Emulator + + + Enable Separate Update Folder + Włącz oddzielny folder aktualizacji + + + Default tab when opening settings + Domyślna zakładka podczas otwierania ustawień + + + Show Game Size In List + Pokaż rozmiar gry na liście + + + Show Splash + Pokaż ekran powitania + + + Enable Discord Rich Presence + Włącz Discord Rich Presence + + + Username + Nazwa użytkownika + + + Trophy Key + Klucz trofeów + + + Trophy + Trofea + + + Open the custom trophy images/sounds folder + Otwórz niestandardowy folder obrazów/dźwięków trofeów + + + Logger + Dziennik zdarzeń + + + Log Type + Typ dziennika + + + Log Filter + Filtrowanie dziennika + + + Open Log Location + Otwórz lokalizację dziennika + + + Input + Sterowanie + + + Cursor + Kursor + + + Hide Cursor + Ukryj kursor + + + Hide Cursor Idle Timeout + Czas oczekiwania na ukrycie kursora przy bezczynności + + + s + s + + + Controller + Kontroler + + + Back Button Behavior + Zachowanie przycisku wstecz + + + Graphics + Grafika + + + GUI + Interfejs + + + User + Użytkownik + + + Graphics Device + Karta graficzna + + + Vblank Divider + Dzielnik przerwy pionowej (Vblank) + + + Advanced + Zaawansowane + + + Enable Shaders Dumping + Włącz zgrywanie cieni + + + Enable NULL GPU + Wyłącz kartę graficzną + + + Enable HDR + Włącz HDR + + + Paths + Ścieżki + + + Game Folders + Foldery gier + + + Add... + Dodaj... + + + Remove + Usuń + + + 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 + + + Enable Crash Diagnostics + Włącz diagnostykę awarii + + + Collect Shaders + Zbieraj cienie + + + Copy GPU Buffers + Kopiuj bufory GPU + + + Host Debug Markers + Znaczniki diagnostyczne gospodarza + + + Guest Debug Markers + Znaczniki diagnostyczne gościa + + + Update + Aktualizacja + + + Check for Updates at Startup + Sprawdź aktualizacje przy starcie + + + Always Show Changelog + Zawsze pokazuj dziennik zmian + + + Update Channel + Kanał Aktualizacji + + + Check for Updates + Sprawdź aktualizacje + + + GUI Settings + Ustawienia Interfejsu + + + Title Music + Muzyka tytułowa + + + Disable Trophy Notification + Wyłącz powiadomienia o trofeach + + + Background Image + Obraz tła + + + Show Background Image + Pokaż obraz tła + + + Opacity + Przezroczystość + + + Play title music + Odtwórz muzykę tytułową + + + Update Compatibility Database On Startup + Aktualizuj bazę danych zgodności podczas uruchamiania + + + Game Compatibility + Kompatybilność gier + + + Display Compatibility Data + Wyświetl dane zgodności + + + Update Compatibility Database + Aktualizuj bazę danych zgodności + + + Volume + Głośność + + + Save + Zapisz + + + Apply + Zastosuj + + + Restore Defaults + Przywróć ustawienia domyślne + + + Close + Zamknij + + + Point your mouse at an option to display its description. + Najedź kursorem na opcję, aby wyświetlić jej opis. + + + Console Language:\nSets the language that the PS4 game uses.\nIt's recommended to set this to a language the game supports, which will vary by region. + Język konsoli:\nUstala język, który używa gra PS4.\nZaleca się ustawienie tego na język, który obsługuje gra, co może się różnić w zależności od regionu. + + + Emulator Language:\nSets the language of the emulator's user interface. + Język emulatora:\nUstala język interfejsu użytkownika emulatora. + + + Enable Separate Update Folder:\nEnables installing game updates into a separate folder for easy management.\nThis can be manually created by adding the extracted update to the game folder with the name "CUSA00000-UPDATE" where the CUSA ID matches the game's ID. + Włącz oddzielny folder aktualizacji:\nUmożliwia instalowanie aktualizacji gier w oddzielnym folderze w celu łatwego zarządzania. + + + Show Splash Screen:\nShows the game's splash screen (a special image) while the game is starting. + Wyświetl ekran powitalny:\nPodczas uruchamiania gry wyświetla ekran powitalny (specjalny obraz). + + + Enable Discord Rich Presence:\nDisplays the emulator icon and relevant information on your Discord profile. + Włącz Discord Rich Presence:\nWyświetla ikonę emulatora i odpowiednie informacje na twoim profilu Discord. + + + Username:\nSets the PS4's account username, which may be displayed by some games. + Nazwa użytkownika:\nUstala nazwę użytkownika konta PS4, która może być wyświetlana w niektórych grach. + + + Trophy Key:\nKey used to decrypt trophies. Must be obtained from your jailbroken console.\nMust contain only hex characters. + Klucz trofeów:\nKlucz używany do odszyfrowywania trofeów. Musi być uzyskany z konsoli po jailbreaku. Musi zawierać tylko znaki w kodzie szesnastkowym. + + + Log Type:\nSets whether to synchronize the output of the log window for performance. May have adverse effects on emulation. + Typ logu:\nUstala, czy synchronizować wyjście okna dziennika dla wydajności. Może to mieć negatywny wpływ na emulację. + + + Log Filter:\nFilters the log to only print specific information.\nExamples: "Core:Trace" "Lib.Pad:Debug Common.Filesystem:Error" "*:Critical"\nLevels: Trace, Debug, Info, Warning, Error, Critical - in this order, a specific level silences all levels preceding it in the list and logs every level after it. + Filtr logu:\nFiltruje dziennik, aby drukować tylko określone informacje.\nPrzykłady: "Core:Trace" "Lib.Pad:Debug Common.Filesystem:Error" "*:Critical" Poziomy: Trace, Debug, Info, Warning, Error, Critical - w tej kolejności, konkretny poziom wycisza wszystkie wcześniejsze poziomy w liście i rejestruje wszystkie poziomy później. + + + Update:\nRelease: Official versions released every month that may be very outdated, but are more reliable and tested.\nNightly: Development versions that have all the latest features and fixes, but may contain bugs and are less stable. + Aktualizator:\nRelease: Oficjalne wersje wydawane co miesiąc, które mogą być bardzo przestarzałe, ale są niezawodne i przetestowane.\nNightly: Wersje rozwojowe, które zawierają wszystkie najnowsze funkcje i poprawki błędów, ale mogą mieć błędy i być mniej stabilne. + + + Background Image:\nControl the opacity of the game background image. + Obraz tła:\nKontroluj przezroczystość obrazu tła gry. + + + Play Title Music:\nIf a game supports it, enable playing special music when selecting the game in the GUI. + Odtwórz muzykę tytułową:\nJeśli gra to obsługuje, aktywuje odtwarzanie specjalnej muzyki podczas wybierania gry w GUI. + + + Disable Trophy Pop-ups:\nDisable in-game trophy notifications. Trophy progress can still be tracked using the Trophy Viewer (right-click the game in the main window). + Wyłącz wyskakujące okienka trofeów:\nWyłącz powiadomienia o trofeach w grze. Postępy w zdobywaniu trofeów można nadal śledzić za pomocą przeglądarki trofeów (kliknij prawym przyciskiem myszy grę w oknie głównym). + + + Hide Cursor:\nChoose when the cursor will disappear:\nNever: You will always see the mouse.\nidle: Set a time for it to disappear after being idle.\nAlways: you will never see the mouse. + Ukryj kursor:\nWybierz, kiedy kursor zniknie:\nNigdy: Zawsze będziesz widział myszkę.\nNieaktywny: Ustaw czas, po którym zniknie po bezczynności.\nZawsze: nigdy nie zobaczysz myszki. + + + Hide Idle Cursor Timeout:\nThe duration (seconds) after which the cursor that has been idle hides itself. + Ustaw czas, po którym mysz zniknie po bezczynności. + + + Back Button Behavior:\nSets the controller's back button to emulate tapping the specified position on the PS4 touchpad. + Zachowanie przycisku Wstecz:\nUstawia przycisk Wstecz kontrolera tak, aby emulował dotknięcie określonego miejsca na panelu dotykowym PS4. + + + Display Compatibility Data:\nDisplays game compatibility information in table view. Enable "Update Compatibility On Startup" to get up-to-date information. + Wyświetl dane zgodności:\nWyświetla informacje o kompatybilności gry w widoku tabeli. Włącz opcję „Aktualizuj zgodność przy uruchomieniu”, aby uzyskać aktualne informacje. + + + Update Compatibility On Startup:\nAutomatically update the compatibility database when shadPS4 starts. + Aktualizuj zgodność przy uruchomieniu:\nAutomatycznie aktualizuj bazę danych kompatybilności podczas uruchamiania shadPS4. + + + Update Compatibility Database:\nImmediately update the compatibility database. + Zaktualizuj bazę danych zgodności:\nNatychmiast zaktualizuj bazę danych zgodności. + + + Never + Nigdy + + + Idle + Bezczynny + + + Always + Zawsze + + + Touchpad Left + Touchpad Lewy + + + Touchpad Right + Touchpad Prawy + + + Touchpad Center + Touchpad Środkowy + + + None + Brak + + + Graphics Device:\nOn multiple GPU systems, select the GPU the emulator will use from the drop down list,\nor select "Auto Select" to automatically determine it. + Urządzenie graficzne:\nW systemach z wieloma GPU, wybierz GPU, który emulator ma używać z rozwijanego menu,\n lub wybierz "Auto Select", aby ustawić go automatycznie. + + + Width/Height:\nSets the size of the emulator window at launch, which can be resized during gameplay.\nThis is different from the in-game resolution. + Szerokość/Wysokość:\nUstala rozmiar okna emulatora podczas uruchamiania, który może być zmieniany w trakcie gry.\nTo różni się od rozdzielczości w grze. + + + Vblank Divider:\nThe frame rate at which the emulator refreshes at is multiplied by this number. Changing this may have adverse effects, such as increasing the game speed, or breaking critical game functionality that does not expect this to change! + Dzielnik Vblank:\nWskaźnik klatek, z jakim emulator jest odświeżany, pomnożony przez tę liczbę. Zmiana tego może mieć negatywne skutki, takie jak przyspieszenie gry lub zniszczenie krytycznej funkcjonalności gry, która nie spodziewa się, że to zostanie zmienione! + + + Enable Shaders Dumping:\nFor the sake of technical debugging, saves the games shaders to a folder as they render. + Włącz zrzucanie shaderów:\nDla technicznego debugowania zapisuje shadery z gry w folderze podczas renderowania. + + + Enable Null GPU:\nFor the sake of technical debugging, disables game rendering as if there were no graphics card. + Włącz Null GPU:\nDla technicznego debugowania dezaktywuje renderowanie gry tak, jakby nie było karty graficznej. + + + Enable HDR:\nEnables HDR in games that support it.\nYour monitor must have support for the BT2020 PQ color space and the RGB10A2 swapchain format. + Włącz HDR:\nWłącza HDR w grach, które go wspierają.\nTwój monitor musi mieć wsparcie dla przestrzeni kolorów BT2020 PQ oraz formatu RGB10A2 swapchain. + + + Game Folders:\nThe list of folders to check for installed games. + Foldery gier:\nLista folderów do sprawdzenia zainstalowanych gier. + + + Add:\nAdd a folder to the list. + Dodaj:\nDodaj folder do listy. + + + Remove:\nRemove a folder from the list. + Usuń:\nUsuń folder z listy. + + + Enable Debug Dumping:\nSaves the import and export symbols and file header information of the currently running PS4 program to a directory. + Włącz zrzut debugowania:\nZapisuje symbole importu i eksportu oraz informacje nagłówkowe pliku dla aktualnie działającej aplikacji PS4 w katalogu. + + + Enable Vulkan Validation Layers:\nEnables a system that validates the state of the Vulkan renderer and logs information about its internal state.\nThis will reduce performance and likely change the behavior of emulation. + Włącz warstwę walidacji Vulkan:\nWłącza system, który waliduje stan renderera Vulkan i loguje informacje o jego wewnętrznym stanie. Zmniejszy to wydajność i prawdopodobnie zmieni zachowanie emulacji. + + + Enable Vulkan Synchronization Validation:\nEnables a system that validates the timing of Vulkan rendering tasks.\nThis will reduce performance and likely change the behavior of emulation. + Włącz walidację synchronizacji Vulkan:\nWłącza system, który waliduje timing zadań renderowania Vulkan. Zmniejszy to wydajność i prawdopodobnie zmieni zachowanie emulacji. + + + Enable RenderDoc Debugging:\nIf enabled, the emulator will provide compatibility with Renderdoc to allow capture and analysis of the currently rendered frame. + Włącz debugowanie RenderDoc:\nJeśli włączone, emulator zapewnia kompatybilność z Renderdoc, aby umożliwić nagrywanie i analizowanie aktualnie renderowanej klatki. + + + Collect Shaders:\nYou need this enabled to edit shaders with the debug menu (Ctrl + F10). + Zbieranie cieni:\nPotrzebujesz tej opcji aby edytować cienie za pomocą menu debugowania (Ctrl + F10). + + + Crash Diagnostics:\nCreates a .yaml file with info about the Vulkan state at the time of crashing.\nUseful for debugging 'Device lost' errors. If you have this enabled, you should enable Host AND Guest Debug Markers.\nDoes not work on Intel GPUs.\nYou need Vulkan Validation Layers enabled and the Vulkan SDK for this to work. + Diagnostyka awarii:\nTworzy plik .yaml z informacjami o stanie Vulkan w momencie awarii.\nPrzydatne do debugowania błędów 'DEVICE LOST' . Jeśli ta opcja jest włączona, powinieneś włączyć "Znaczniki błędów gospodarza" oraz "Znaczniki błędów gościa".\nNie działa na kartach graficznych Intela.\nOpcja "Włącz warstwy walidacji Vulkan" i Vulkan SDK jest wymagana do działania. + + + Copy GPU Buffers:\nGets around race conditions involving GPU submits.\nMay or may not help with PM4 type 0 crashes. + Kopiowanie buforów karty graficznej:\nOmija problemy wyścigów związane z przesyłaniem danych do karty graficznej.\nMoże, ale nie musi, pomóc w przypadku awarii typu PM4 0. + + + Host Debug Markers:\nInserts emulator-side information like markers for specific AMDGPU commands around Vulkan commands, as well as giving resources debug names.\nIf you have this enabled, you should enable Crash Diagnostics.\nUseful for programs like RenderDoc. + Wskaźniki debugowania gospodarza:\nWstawia informacje emulatora, takie jak znaczniki dla konkretnych poleceń AMDGPU wokół poleceń Vulkan, a także nadaje nazwy debugowania zasobów.\nJeśli ta opcja jest włączona, powinieneś włączyć diagnostykę awarii.\nPrzydatne dla programów takich jak RenderDoc. + + + Guest Debug Markers:\nInserts any debug markers the game itself has added to the command buffer.\nIf you have this enabled, you should enable Crash Diagnostics.\nUseful for programs like RenderDoc. + Znaczniki debugowania gościa:\nWstawia wszystkie znaczniki debugowania, które gra dodała do buforu poleceń.\nJeśli ta opcja jest włączona, powinieneś włączyć diagnostykę awarii.\nPrzydatne dla programów takich jak RenderDoc. + + + Save Data Path:\nThe folder where game save data will be saved. + Ścieżka zapisu danych:\nFolder, w którym zapisywane będą dane gry. + + + Browse:\nBrowse for a folder to set as the save data path. + Przeglądaj:\nPrzeglądaj folder, aby ustawić ścieżkę zapisywania danych. + + + Release + Wersja stablina + + + Nightly + Wersja rozwojowa + + + Set the volume of the background music. + Wybierz poziom głośności muzyki w tle. + + + Enable Motion Controls + Włącz sterowanie ruchem + + + Save Data Path + Ścieżka zapisanych danych + + + Browse + Przeglądaj + + + async + asynchroniczny + + + sync + synchroniczny + + + Auto Select + Wybór automatyczny + + + Directory to install games + Katalog do instalacji gier + + + Directory to save data + Katalog do zapisywania danych + + + Video + Wyświetlanie + + + Display Mode + Tryb wyświetlania + + + Windowed + Tryb okna + + + Fullscreen + Tryb pełnoekranowy + + + Fullscreen (Borderless) + Tryb pełnoekranowy (bez obramowania) + + + Window Size + Rozmiar okna + + + W: + Szerokość: + + + H: + Wysokość: + + + Separate Log Files + Oddzielne pliki dziennika + + + Separate Log Files:\nWrites a separate logfile for each game. + Oddzielne pliki dziennika:\nZapisuje oddzielny plik dziennika dla każdej gry. + + + Trophy Notification Position + Pozycja powiadomień trofeów + + + Left + Z lewej + + + Right + Z prawej + + + Top + Z góry + + + Bottom + Z dołu + + + Notification Duration + Czas trwania powiadomienia + + + Portable User Folder + Przenośny folder użytkownika + + + Create Portable User Folder from Common User Folder + Utwórz przenośny folder użytkownika ze zwykłego folderu użytkownika + + + Portable user folder:\nStores shadPS4 settings and data that will be applied only to the shadPS4 build located in the current folder. Restart the app after creating the portable user folder to begin using it. + Przenośny folder użytkownika:\nPrzechowuje ustawienia shadPS4 i dane, które zostaną zastosowane tylko do kompilacji shadPS4 znajdującej się w bieżącym folderze. Uruchom ponownie aplikację po utworzeniu przenośnego folderu użytkownika, aby zacząć z niego korzystać. + + + Cannot create portable user folder + Nie można utworzyć przenośnego folderu użytkownika + + + %1 already exists + %1 już istnieje + + + Portable user folder created + Utworzono przenośny folder użytkownika + + + %1 successfully created. + %1 prawidłowo utworzony. + + + Open the custom trophy images/sounds folder:\nYou can add custom images to the trophies and an audio.\nAdd the files to custom_trophy with the following names:\ntrophy.wav OR trophy.mp3, bronze.png, gold.png, platinum.png, silver.png\nNote: The sound will only work in QT versions. + Otwórz niestandardowy folder obrazów/dźwięków:\nMożesz dodać własne obrazy dla trofeów i ich dźwięki.\nDodaj pliki do custom_trophy o następujących nazwach:\ntrophy.wav LUB trophy.mp3, bronze.png, gold.png, platinum.png, silver.png\nUwaga: Dźwięki działają tylko w wersji QT. + + + + TrophyViewer + + Trophy Viewer + Menedżer trofeów + + + Select Game: + Wybierz grę: + + + Progress + Postęp + + + Show Earned Trophies + Pokaż zdobyte trofea + + + Show Not Earned Trophies + Pokaż niezdobyte trofea + + + Show Hidden Trophies + Pokaż ukryte trofea + + + diff --git a/src/qt_gui/translations/pt_BR.ts b/src/qt_gui/translations/pt_BR.ts index cce66c105..5d1582b5a 100644 --- a/src/qt_gui/translations/pt_BR.ts +++ b/src/qt_gui/translations/pt_BR.ts @@ -1,1664 +1,2089 @@ + - - - - AboutDialog - - - About shadPS4 - Sobre o shadPS4 - - - - shadPS4 - shadPS4 - - - - 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. - Este software não deve ser usado para jogar jogos piratas. - - - - ElfViewer - - - Open Folder - Abrir Pasta - - - - GameInfoClass - - - Loading game list, please wait :3 - Carregando a lista de jogos, por favor aguarde :3 - - - - Cancel - Cancelar - - - - Loading... - Carregando... - - - - InstallDirSelect - - - shadPS4 - Choose directory - shadPS4 - Escolha o diretório - - - - Select which directory you want to install to. - Selecione o diretório em que você deseja instalar. - - - - GameInstallDialog - - - shadPS4 - Choose directory - shadPS4 - Escolha o diretório - - - - Directory to install games - Diretório para instalar jogos - - - - Browse - Procurar - - - - Error - Erro - - - - The value for location to install games is not valid. - O diretório da instalação dos jogos não é válido. - - - - GuiContextMenus - - - Create Shortcut - Criar Atalho - - - - Cheats / Patches - Cheats / Patches - - - - SFO Viewer - Visualizador de SFO - - - - Trophy Viewer - Visualizador de Troféu - - - - Open Folder... - Abrir Pasta... - - - - Open Game Folder - Abrir Pasta do Jogo - - - - Open Save Data Folder - Abrir Pasta de Save - - - - Open Log Folder - Abrir Pasta de Log - - - - Copy info... - Copiar informação... - - - - Copy Name - Copiar Nome - - - - Copy Serial - Copiar Serial - - - - Copy All - Copiar Tudo - - - - Delete... - Deletar... - - - - Delete Game - Deletar Jogo - - - - Delete Update - Deletar Atualização - - - - Delete DLC - Deletar DLC - - - - Compatibility... - Compatibilidade... - - - - Update database - Atualizar banco de dados - - - - View report - Ver status - - - - Submit a report - Enviar status - - - - Shortcut creation - Criação de atalho - - - - Shortcut created successfully! - Atalho criado com sucesso! - - - - Error - Erro - - - - Error creating shortcut! - Erro ao criar atalho! - - - - Install PKG - Instalar PKG - - - - Game - Jogo - - - - requiresEnableSeparateUpdateFolder_MSG - Este recurso requer a opção de configuração 'Habilitar Pasta de Atualização Separada' para funcionar. Se você quiser usar este recurso, habilite-o. - - - - This game has no update to delete! - Este jogo não tem atualização para excluir! - - - - Update - Atualização - - - - This game has no DLC to delete! - Este jogo não tem DLC para excluir! - - - - DLC - DLC - - - - Delete %1 - Deletar %1 - - - - Are you sure you want to delete %1's %2 directory? - Tem certeza de que deseja excluir o diretório %2 de %1 ? - - - - MainWindow - - - Open/Add Elf Folder - Abrir/Adicionar pasta Elf - - - - Install Packages (PKG) - Instalar Pacotes (PKG) - - - - Boot Game - Iniciar Jogo - - - - Check for Updates - Verificar atualizações - - - - About shadPS4 - Sobre o shadPS4 - - - - Configure... - Configurar... - - - - Install application from a .pkg file - Instalar aplicação de um arquivo .pkg - - - - Recent Games - Jogos Recentes - - - - Exit - Sair - - - - Exit shadPS4 - Sair do shadPS4 - - - - Exit the application. - Sair da aplicação. - - - - Show Game List - Mostrar Lista de Jogos - - - - Game List Refresh - Atualizar Lista de Jogos - - - - Tiny - Muito pequeno - - - - Small - Pequeno - - - - Medium - Médio - - - - Large - Grande - - - - List View - Visualizar em Lista - - - - Grid View - Visualizar em Grade - - - - Elf Viewer - Visualizador de Elf - - - - Game Install Directory - Diretório de Instalação de Jogos - - - - Download Cheats/Patches - Baixar Cheats/Patches - - - - Dump Game List - Dumpar Lista de Jogos - - - - PKG Viewer - Visualizador de PKG - - - - Search... - Pesquisar... - - - - File - Arquivo - - - - View - Ver - - - - Game List Icons - Ícones da Lista de Jogos - - - - Game List Mode - Modo da Lista de Jogos - - - - Settings - Configurações - - - - Utils - Utilitários - - - - Themes - Temas - - - - Help - Ajuda - - - - Dark - Escuro - - - - Light - Claro - - - - Green - Verde - - - - Blue - Azul - - - - Violet - Violeta - - - - toolBar - Barra de Ferramentas - - - - PKGViewer - - - Open Folder - Abrir Pasta - - - - TrophyViewer - - - Trophy Viewer - Visualizador de Troféu - - - - SettingsDialog - - - Settings - Configurações - - - - General - Geral - - - - System - Sistema - - - - Console Language - Idioma do Console - - - - Emulator Language - Idioma do Emulador - - - - Emulator - Emulador - - - - Enable Fullscreen - Ativar Tela Cheia - - - - Enable Separate Update Folder - Habilitar pasta de atualização separada - - - - Show Splash - Mostrar Splash Inicial - - - - Is PS4 Pro - Modo PS4 Pro - - - - Enable Discord Rich Presence - Ativar Discord Rich Presence - - - - Username - Nome de usuário - - - - Trophy Key - Trophy Key - - - - Trophy - Troféus - - - - Logger - Registro - - - - Log Type - Tipo de Registro - - - - Log Filter - Filtro do Registro - - - - Input - Entradas - - - - Cursor - Cursor - - - - Hide Cursor - Ocultar Cursor - - - - Hide Cursor Idle Timeout - Tempo de Inatividade para Ocultar Cursor - - - - s - s - - - - Controller - Controle - - - - Back Button Behavior - Comportamento do botão Voltar - - - - Graphics - Gráficos - - - - Graphics Device - Placa de Vídeo - - - - Width - Largura - - - - Height - Altura - - - - Vblank Divider - Divisor Vblank - - - - Advanced - Avançado - - - - Enable Shaders Dumping - Ativar Dumping de Shaders - - - - Enable NULL GPU - Ativar GPU NULA - - - - Paths - Pastas - - - - Game Folders - Pastas dos Jogos - - - - Add... - Adicionar... - - - - Remove - Remover - - - - Debug - Depuração - - - - Enable Debug Dumping - Ativar Depuração de Dumping - - - - Enable Vulkan Validation Layers - Ativar Camadas de Validação do Vulkan - - - - Enable Vulkan Synchronization Validation - Ativar Validação de Sincronização do Vulkan - - - - Enable RenderDoc Debugging - Ativar Depuração por RenderDoc - - - - Update - Atualização - - - - Check for Updates at Startup - Verificar Atualizações ao Iniciar - - - - Update Channel - Canal de Atualização - - - - Check for Updates - Verificar atualizações - - - - GUI Settings - Configurações da Interface - - - - Disable Trophy Pop-ups - Desabilitar Pop-ups dos Troféus - - - - Play title music - Reproduzir música de abertura - - - - Update Compatibility Database On Startup - Atualizar Compatibilidade ao Inicializar - - - - Game Compatibility - Compatibilidade dos Jogos - - - - Display Compatibility Data - Exibir Dados de Compatibilidade - - - - Update Compatibility Database - Atualizar Lista de Compatibilidade - - - - Volume - Volume - - - - Audio Backend - Backend de Áudio - - - - MainWindow - - - Game List - Lista de Jogos - - - - * Unsupported Vulkan Version - * Versão Vulkan não suportada - - - - Download Cheats For All Installed Games - Baixar Cheats 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 cheats 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! - Atualização detectada! - - - - PKG and Game versions match: - As versões do PKG e do Jogo são igual: - - - - Would you like to overwrite? - Gostaria de substituir? - - - - PKG Version %1 is older than installed version: - Versão do PKG %1 é mais antiga do que a versão instalada: - - - - Game is installed: - Jogo instalado: - - - - Would you like to install Patch: - Você gostaria de instalar a atualização: - - - - DLC Installation - Instalação de DLC - - - - Would you like to install DLC: %1? - Você gostaria de instalar o DLC: %1? - - - - DLC already installed: - DLC já instalada: - - - - Game already installed - O jogo já está instalado: - - - - PKG is a patch, please install the game first! - O PKG é um patch, por favor, instale o jogo primeiro! - - - - PKG ERROR - ERRO de 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 for - Cheats / Patches para - - - - defaultTextEdit_MSG - Cheats/Patches são experimentais.\nUse com cautela.\n\nBaixe os cheats individualmente selecionando o repositório e clicando no botão de download.\nNa aba Patches, você pode baixar todos os Patches de uma vez, escolha qual deseja usar e salve a opção.\n\nComo não desenvolvemos os Cheats/Patches,\npor favor, reporte problemas relacionados ao autor do cheat.\n\nCriou um novo cheat? Visite:\nhttps://github.com/shadps4-emu/ps4_cheats - - - - No Image Available - Imagem Não Disponível - - - - Serial: - Serial: - - - - Version: - Versão: - - - - Size: - Tamanho: - - - - Select Cheat File: - Selecione o Arquivo de Cheat: - - - - Repository: - Repositório: - - - - Download Cheats - Baixar Cheats - - - - 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 os cheats 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 - Cheats - - - - 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 o serial 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 - Cheats Não Encontrados - - - - CheatsNotFound_MSG - Nenhum cheat encontrado para este jogo nesta versão do repositório selecionado, tente outro repositório ou uma versão diferente do jogo. - - - - Cheats Downloaded Successfully - Cheats Baixados com Sucesso - - - - CheatsDownloadedSuccessfully_MSG - Você baixou os cheats 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 os Cheats. Se o patch não aparecer, pode ser que ele não exista para o número de série e a versão específicos do jogo. - - - - 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. - - - - The game is in version: %1 - O jogo está na versão: %1 - - - - The downloaded patch only works on version: %1 - O patch baixado só funciona na versão: %1 - - - - You may need to update your game. - Talvez você precise atualizar seu jogo. - - - - Incompatibility Notice - Aviso de incompatibilidade - - - - Failed to open file: - Falha ao abrir o arquivo: - - - - XML ERROR: - ERRO de XML: - - - - Failed to open files.json for writing - Falha ao abrir files.json para gravação - - - - Author: - Autor: - - - - Directory does not exist: - O Diretório não existe: - - - - Failed to open files.json for reading. - Falha ao abrir files.json para leitura. - - - - Name: - Nome: - - - - Can't apply cheats before the game is started - Não é possível aplicar cheats antes que o jogo comece. - - - - SettingsDialog - - - Save - Salvar - - - - Apply - Aplicar - - - - Restore Defaults - Restaurar Padrões - - - - Close - Fechar - - - - Point your mouse at an option to display its description. - Passe o mouse sobre uma opção para exibir sua descrição. - - - - consoleLanguageGroupBox - Idioma do console:\nDefine o idioma usado pelo jogo no PS4.\nRecomenda-se configurá-lo para um idioma que o jogo suporte, o que pode variar conforme a região. - - - - emulatorLanguageGroupBox - Idioma do emulador:\nDefine o idioma da interface do emulador. - - - - fullscreenCheckBox - Ativar Tela Cheia:\nMove automaticamente a janela do jogo para o modo tela cheia.\nIsso pode ser alterado pressionando a tecla F11. - - - - separateUpdatesCheckBox - Habilitar pasta de atualização separada:\nPermite instalar atualizações de jogos em uma pasta separada para fácil gerenciamento. - - - - showSplashCheckBox - Mostrar Splash Inicial:\nExibe a tela inicial do jogo (imagem especial) ao iniciar o jogo. - - - - ps4proCheckBox - Modo PS4 Pro:\nFaz o emulador agir como um PS4 PRO, o que pode ativar recursos especiais em jogos que o suportam. - - - - discordRPCCheckbox - Ativar Discord Rich Presence:\nExibe o ícone do emulador e informações relevantes no seu perfil do Discord. - - - - userName - Nome de usuário:\nDefine o nome de usuário da conta PS4 que pode ser exibido por alguns jogos. - - - - TrophyKey - Trophy Key:\nKey used to decrypt trophies. Must be obtained from your jailbroken console.\nMust contain only hex characters. - - - - logTypeGroupBox - Tipo de Registro:\nDefine se a saída da janela de log deve ser sincronizada para melhorar o desempenho. Isso pode impactar negativamente a emulação. - - - - logFilter - Filtro de Registro:\nImprime apenas informações específicas.\nExemplos: "Core:Trace" "Lib.Pad:Debug Common.Filesystem:Error" "*:Critical"\nNíveis: Trace, Debug, Info, Warning, Error, Critical - assim, um nível específico desativa todos os níveis anteriores na lista e registra todos os níveis subsequentes. - - - - updaterGroupBox - Atualizações:\nRelease: Versões oficiais que são lançadas todo mês e podem ser bastante antigas, mas são mais confiáveis e testadas.\nNightly: Versões de desenvolvimento que têm todos os novos recursos e correções, mas podem ter bugs e ser instáveis. - - - - GUIgroupBox - Reproduzir música de abertura:\nSe o jogo suportar, ativa a reprodução de uma música especial ao selecionar o jogo na interface do menu. - - - - disableTrophycheckBox - Desabilitar pop-ups dos troféus:\nDesabilite notificações de troféus no jogo. O progresso do troféu ainda pode ser rastreado usando o Trophy Viewer (clique com o botão direito do mouse no jogo na janela principal). - - - - hideCursorGroupBox - Ocultar Cursor:\nEscolha quando o cursor desaparecerá:\nNunca: Você sempre verá o mouse.\nParado: Defina um tempo para ele desaparecer após ficar inativo.\nSempre: Você nunca verá o mouse. - - - - idleTimeoutGroupBox - Defina um tempo em segundos para o mouse desaparecer após ficar inativo. - - - - backButtonBehaviorGroupBox - Comportamento do botão Voltar:\nDefine o botão Voltar do controle para emular o toque na posição especificada no touchpad do PS4. - - - - enableCompatibilityCheckBox - Exibir Dados de Compatibilidade:\nExibe informações de compatibilidade dos jogos na janela principal.\nHabilitar "Atualizar Compatibilidade ao Inicializar" para obter informações atualizadas. - - - - checkCompatibilityOnStartupCheckBox - Atualizar Compatibilidade ao inicializar:\nAtualiza automaticamente o banco de dados de compatibilidade quando o SHADPS4 é iniciado. - - - - updateCompatibilityButton - Atualizar Lista de Compatibilidade:\nAtualizar imediatamente o banco de dados de compatibilidade. - - - - Never - Nunca - - - - Idle - Parado - - - - Always - Sempre - - - - Touchpad Left - Touchpad Esquerdo - - - - Touchpad Right - Touchpad Direito - - - - Touchpad Center - Touchpad Centro - - - - None - Nenhum - - - - graphicsAdapterGroupBox - Placa de Vídeo:\nEm sistemas com múltiplas GPUs, escolha qual GPU o emulador usará da lista suspensa,\nou escolha "Auto Select" para que ele determine automaticamente. - - - - resolutionLayout - Largura/Altura:\nDefine o tamanho da janela do emulador no momento da inicialização, que pode ser redimensionado durante o jogo.\nIsso é diferente da resolução dentro do jogo. - - - - heightDivider - Divisor Vblank:\nA taxa de quadros que o emulador atualiza é multiplicada por este número. Mudar isso pode ter efeitos negativos, como aumentar a velocidade do jogo ou quebrar funções vitais do jogo que não esperam que isso mude! - - - - dumpShadersCheckBox - Ativar Dumping de Shaders:\nArmazena os shaders do jogo em uma pasta durante a renderização para fins de depuração técnica. - - - - nullGpuCheckBox - Ativar GPU NULA:\nDesativa a renderização do jogo para fins de depuração técnica, como se não houvesse nenhuma placa gráfica. - - - - gameFoldersBox - Pastas dos jogos:\nA lista de pastas para verificar se há jogos instalados. - - - - addFolderButton - Adicionar:\nAdicione uma pasta à lista. - - - - removeFolderButton - Remover:\nRemove uma pasta da lista. - - - - debugDump - Ativar Depuração de Dumping:\nArmazena os símbolos de importação e exportação e as informações do cabeçalho do arquivo do programa PS4 atual em um diretório. - - - - vkValidationCheckBox - Ativar Camadas de Validação do Vulkan:\nAtiva um sistema que valida o estado do renderizador Vulkan e registra informações sobre seu estado interno.\nIsso diminui o desempenho e pode alterar o comportamento da emulação. - - - - vkSyncValidationCheckBox - Ativar Validação de Sincronização do Vulkan:\nAtiva um sistema que valida o agendamento de tarefas de renderização Vulkan.\nIsso diminui o desempenho e pode alterar o comportamento da emulação. - - - - rdocCheckBox - Ativar depuração por RenderDoc:\nSe ativado, permite que o emulador tenha compatibilidade com RenderDoc para gravação e análise do quadro renderizado atual. - - - - GameListFrame - - - Icon - Icone - - - - Name - Nome - - - - Serial - Serial - - - - Compatibility - Compatibilidade - - - - Region - Região - - - - Firmware - Firmware - - - - Size - Tamanho - - - - Version - Versão - - - - Path - Diretório - - - - Play Time - Tempo Jogado - - - - Never Played - Nunca jogado - - - - h - h - - - - m - m - - - - s - s - - - - Compatibility is untested - Compatibilidade não testada - - - - Game does not initialize properly / crashes the emulator - Jogo não inicializa corretamente / trava o emulador - - - - Game boots, but only displays a blank screen - O jogo inicializa, mas exibe apenas uma tela vazia - - - - Game displays an image but does not go past the menu - Jogo exibe imagem mas não passa do menu - - - - Game has game-breaking glitches or unplayable performance - O jogo tem falhas que interrompem o jogo ou desempenho injogável - - - - Game can be completed with playable performance and no major glitches - O jogo pode ser concluído com desempenho jogável e sem grandes falhas - - - - CheckUpdate - - - Auto Updater - Atualizador automático - - - - Error - Erro - - - - Network error: - Erro de rede: - - - - Failed to parse update information. - Falha ao analisar as informações de atualização. - - - - No pre-releases found. - Nenhuma pre-release encontrada. - - - - Invalid release data. - Dados da release inválidos. - - - - No download URL found for the specified asset. - Nenhuma URL de download encontrada para o asset especificado. - - - - Your version is already up to date! - Sua versão já está atualizada! - - - - Update Available - Atualização disponível - - - - Update Channel - Canal de Atualização - - - - Current Version - Versão atual - - - - Latest Version - Última versão - - - - Do you want to update? - Você quer atualizar? - - - - Show Changelog - Mostrar Changelog - - - - Check for Updates at Startup - Verificar Atualizações ao Iniciar - - - - Update - Atualizar - - - - No - Não - - - - Hide Changelog - Ocultar Changelog - - - - Changes - Alterações - - - - Network error occurred while trying to access the URL - Ocorreu um erro de rede ao tentar acessar o URL - - - - Download Complete - Download Completo - - - - The update has been downloaded, press OK to install. - A atualização foi baixada, pressione OK para instalar. - - - - Failed to save the update file at - Falha ao salvar o arquivo de atualização em - - - - Starting Update... - Iniciando atualização... - - - - Failed to create the update script file - Falha ao criar o arquivo de script de atualização - - - - GameListUtils - - - B - B - - - - KB - KB - - - - MB - MB - - - - GB - GB - - - - TB - TB - - - \ No newline at end of file + + + AboutDialog + + About shadPS4 + Sobre o shadPS4 + + + shadPS4 is an experimental open-source emulator for the PlayStation 4. + O 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. + Este programa não deve ser usado para executar jogos que tenham sido obtidos ilegalmente. + + + + CheatsPatches + + Cheats / Patches for + Trapaças / Modificações para + + + 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:\n + As Trapaças/Modificações são experimentais.\nUse com cautela.\n\nBaixe as trapaças individualmente selecionando o repositório e clicando no botão de baixar.\nNa aba Modificações, você pode baixar todas as modificações de uma vez, escolha qual deseja usar e salve a opção.\n\nComo não desenvolvemos as Trapaças/Modificações,\npor favor, reporte os problemas relacionados ao autor da trapaça.\n\nCriou uma nova trapaça? Visite:\n + + + No Image Available + Nenhuma Imagem Disponível + + + Serial: + Serial: + + + 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 Modificações + + + Save + Salvar + + + Cheats + Trapaças + + + Patches + Modificações + + + 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 o serial 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 o 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 já 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 + + + No Cheats found for this game in this version of the selected repository,try another repository or a different version of the game. + 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 + + + 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. + Você baixou as trapaças para esta versão do jogo do repositório selecionado com sucesso. É possível tentar baixar de outro repositório, se estiver disponível, também será possível utilizá-lo selecionando o arquivo da lista. + + + Failed to save: + Falha ao salvar: + + + Failed to download: + Falha ao baixar: + + + Download Complete + Download Concluído + + + 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. If the patch does not appear, it may be that it does not exist for the specific serial and version of the game. + Modificações Baixados com Sucesso! Todos as modificações disponíveis para todos os jogos foram baixados, não é necessário baixá-los individualmente para cada jogo como acontece em trapaças. Se a modificação não aparecer, pode ser que ela não exista para o serial e versão específicas do jogo. + + + Failed to parse JSON data from HTML. + Falha ao analisar os dados JSON do HTML. + + + Failed to retrieve HTML page. + Falha ao recuperar a página HTML. + + + The game is in version: %1 + O jogo está na versão: %1 + + + The downloaded patch only works on version: %1 + O patch baixado só funciona na versão: %1 + + + You may need to update your game. + Talvez você precise atualizar seu jogo. + + + Incompatibility Notice + Aviso de Incompatibilidade + + + Failed to open file: + Falha ao abrir o arquivo: + + + XML ERROR: + ERRO DE XML: + + + Failed to open files.json for writing + Falha ao abrir files.json para gravação + + + Author: + Autor: + + + Directory does not exist: + O Diretório não existe: + + + Failed to open files.json for reading. + Falha ao abrir files.json para leitura. + + + Name: + Nome: + + + Can't apply cheats before the game is started + Não é possível aplicar trapaças antes de começar o jogo. + + + Close + Fechar + + + + CheckUpdate + + Auto Updater + Atualização Automática + + + Error + Erro + + + Network error: + Erro de rede: + + + The Auto Updater allows up to 60 update checks per hour.\nYou have reached this limit. Please try again later. + O Atualizador Automático permite até 60 verificações de atualização por hora.\nVocê atingiu esse limite. Por favor, tente novamente mais tarde. + + + Failed to parse update information. + Falha ao analisar as informações de atualização. + + + No pre-releases found. + Nenhum Pre-Release encontrado. + + + Invalid release data. + Dados do release inválidos. + + + No download URL found for the specified asset. + Nenhuma URL de download encontrada para o recurso especificado. + + + Your version is already up to date! + Sua versão já está atualizada! + + + Update Available + Atualização Disponível + + + Update Channel + Canal de Atualização + + + Current Version + Versão Atual + + + Latest Version + Última Versão + + + Do you want to update? + Você quer atualizar? + + + Show Changelog + Mostrar Mudanças + + + Check for Updates at Startup + Verificar por Atualizações ao Iniciar + + + Update + Atualizar + + + No + Não + + + Hide Changelog + Ocultar Mudanças + + + Changes + Alterações + + + Network error occurred while trying to access the URL + Ocorreu um erro de rede ao tentar acessar o URL + + + Download Complete + Download Concluído + + + The update has been downloaded, press OK to install. + A atualização foi baixada, pressione OK para instalar. + + + Failed to save the update file at + Falha ao salvar o arquivo de atualização em + + + Starting Update... + Iniciando Atualização... + + + Failed to create the update script file + Falha ao criar o arquivo de script de atualização + + + + CompatibilityInfoClass + + Fetching compatibility data, please wait + Obtendo dados de compatibilidade, por favor aguarde + + + Cancel + Cancelar + + + Loading... + Carregando... + + + Error + Erro + + + Unable to update compatibility data! Try again later. + Não foi possível atualizar os dados de compatibilidade! Tente novamente mais tarde. + + + Unable to open compatibility_data.json for writing. + Não foi possível abrir o compatibility_data.json para gravação. + + + Unknown + Desconhecido + + + Nothing + Nada + + + Boots + Inicia + + + Menus + Menus + + + Ingame + Em jogo + + + Playable + Jogável + + + + ControlSettings + + Configure Controls + Configurar Controles + + + D-Pad + Direcional + + + Up + Cima + + + Left + Esquerda + + + Right + Direita + + + Down + Baixo + + + Left Stick Deadzone (def:2 max:127) + Zona Morta do Analógico Esquerdo (Pad: 2, Máx: 127) + + + Left Deadzone + Zona Morta Esquerda + + + Left Stick + Analógico Esquerdo + + + Config Selection + Seleção de Configuração + + + Common Config + Configuração Comum + + + Use per-game configs + Usar configurações por jogo + + + L1 / LB + L1 / LB + + + L2 / LT + L2 / LT + + + Back + Voltar + + + R1 / RB + R1 / RB + + + R2 / RT + R2 / RT + + + L3 + L3 + + + Options / Start + Options / Start + + + R3 + R3 + + + Face Buttons + Botões de Ação + + + Triangle / Y + Triângulo / Y + + + Square / X + Quadrado / X + + + Circle / B + Círculo / B + + + Cross / A + Cruz / A + + + Right Stick Deadzone (def:2, max:127) + Zona Morta do Analógico Direito (Pad: 2, Máx: 127) + + + Right Deadzone + Zona Morta Direita + + + Right Stick + Analógico Direito + + + Color Adjustment + Ajuste de Cores + + + R: + R: + + + G: + G: + + + B: + B: + + + Override Lightbar Color + Substituir Cor da Barra de Luz + + + Override Color + Substituir a Cor + + + Unable to Save + Não foi possível salvar + + + Cannot bind axis values more than once + Não é possível vincular os valores do eixo mais de uma vez + + + Save + Salvar + + + Apply + Aplicar + + + Restore Defaults + Restaurar Padrões + + + Cancel + Cancelar + + + + EditorDialog + + Edit Keyboard + Mouse and Controller input bindings + Editar atalhos de entrada do Teclado + Mouse e do Controle + + + Use Per-Game configs + Usar configurações por jogo + + + Error + Erro + + + Could not open the file for reading + Não foi possível abrir o arquivo para leitura + + + Could not open the file for writing + Não foi possível abrir o arquivo para gravação + + + Save Changes + Salvar Alterações + + + Do you want to save changes? + Gostaria de salvar as alterações? + + + Help + Ajuda + + + Do you want to reset your custom default config to the original default config? + Você gostaria de redefinir sua configuração padrão personalizada de volta para a configuração padrão original? + + + Do you want to reset this config to your custom default config? + Você gostaria de redefinir esta configuração para a sua configuração padrão personalizada? + + + Reset to Default + Redefinir ao Padrão + + + + ElfViewer + + Open Folder + Abrir Pasta + + + + GameInfoClass + + Loading game list, please wait :3 + Carregando a lista de jogos, por favor aguarde :3 + + + Cancel + Cancelar + + + Loading... + Carregando... + + + + GameInstallDialog + + shadPS4 - Choose directory + shadPS4 - Escolha de diretório + + + Directory to install games + Diretório onde os jogos serão instalados + + + Browse + Procurar + + + Error + Erro + + + Directory to install DLC + Diretório para instalar DLC + + + + GameListFrame + + Icon + Ícone + + + Name + Nome + + + Serial + Serial + + + Compatibility + Compatibilidade + + + Region + Região + + + Firmware + Firmware + + + Size + Tamanho + + + Version + Versão + + + Path + Diretório + + + Play Time + Tempo de Jogo + + + Never Played + Nunca Jogado + + + h + h + + + m + m + + + s + s + + + Compatibility is untested + Compatibilidade não testada + + + Game does not initialize properly / crashes the emulator + O jogo não inicializa corretamente ou trava o emulador + + + Game boots, but only displays a blank screen + O jogo inicializa, mas exibe apenas uma tela vazia + + + Game displays an image but does not go past the menu + O jogo exibe imagem mas não passa do menu + + + Game has game-breaking glitches or unplayable performance + O jogo tem defeitos que interrompem o jogo ou desempenho injogável + + + Game can be completed with playable performance and no major glitches + O jogo pode ser concluído com desempenho jogável e sem grandes defeitos + + + Click to see details on github + Clique para ver detalhes no github + + + Last updated + Última atualização + + + + GameListUtils + + B + B + + + KB + KB + + + MB + MB + + + GB + GB + + + TB + TB + + + + GuiContextMenus + + Create Shortcut + Criar Atalho + + + Cheats / Patches + Trapaças / Modificações + + + SFO Viewer + Visualizador de SFO + + + Trophy Viewer + Visualizador de Troféus + + + Open Folder... + Abrir Pasta... + + + Open Game Folder + Abrir Pasta do Jogo + + + Open Save Data Folder + Abrir Pasta de Dados Salvos + + + Open Log Folder + Abrir Pasta de Log + + + Copy info... + Copiar informação... + + + Copy Name + Copiar Nome + + + Copy Serial + Copiar Serial + + + Copy Version + Copiar Versão + + + Copy Size + Copiar Tamanho + + + Copy All + Copiar Tudo + + + Delete... + Excluir... + + + Delete Game + Excluir Jogo + + + Delete Update + Excluir Atualização + + + Delete DLC + Excluir DLC + + + Delete Trophy + Excluir Troféu + + + Compatibility... + Compatibilidade... + + + Update database + Atualizar banco de dados + + + View report + Ver status + + + Submit a report + Enviar status + + + Shortcut creation + Criação de atalho + + + Shortcut created successfully! + Atalho criado com sucesso! + + + Error + Erro + + + Error creating shortcut! + Erro ao criar atalho! + + + Game + Jogo + + + This game has no update to delete! + Este jogo não tem atualização para excluir! + + + Update + Atualização + + + This game has no DLC to delete! + Este jogo não tem DLC para excluir! + + + DLC + DLC + + + Delete %1 + Excluir %1 + + + Are you sure you want to delete %1's %2 directory? + Tem certeza de que deseja excluir o diretório do %2 %1? + + + Open Update Folder + Abrir Pasta da Atualização + + + Delete Save Data + Excluir Dados Salvos + + + This game has no update folder to open! + Este jogo não possui pasta de atualização para abrir! + + + No log file found for this game! + Nenhum arquivo de registro foi encontrado para este jogo! + + + Failed to convert icon. + Falha ao converter o ícone. + + + This game has no save data to delete! + Este jogo não tem dados salvos para excluir! + + + This game has no saved trophies to delete! + Este jogo não tem troféus salvos para excluir! + + + Save Data + Dados Salvos + + + Trophy + Troféus + + + SFO Viewer for + Visualizador de SFO para + + + + HelpDialog + + Quickstart + Introdução + + + FAQ + Perguntas frequentes + + + Syntax + Sintaxe + + + Special Bindings + Atalhos Especiais + + + Keybindings + Teclas de atalho + + + + KBMSettings + + Configure Controls + Configurar Controles + + + D-Pad + Direcional + + + Up + Cima + + + unmapped + não mapeado + + + Left + Esquerda + + + Right + Direita + + + Down + Baixo + + + Left Analog Halfmode + Meio Analógico Esquerdo + + + hold to move left stick at half-speed + Segure para mover o analógico esquerdo pela metade da velocidade + + + Left Stick + Analógico Esquerdo + + + Config Selection + Seleção de Configuração + + + Common Config + Configuração Comum + + + Use per-game configs + Usar configurações por jogo + + + L1 + L1 + + + L2 + L2 + + + Text Editor + Editor de Texto + + + Help + Ajuda + + + R1 + R1 + + + R2 + R2 + + + L3 + L3 + + + Touchpad Click + Clique do Touchpad + + + Mouse to Joystick + Mouse para Analógico + + + *press F7 ingame to activate + *Pressione F7 no jogo para ativar + + + R3 + R3 + + + Options + Opções + + + Mouse Movement Parameters + Parâmetros de Movimento do Mouse + + + note: click Help Button/Special Keybindings for more information + Nota: clique no botão de Ajuda e Atalhos Especiais para obter mais informações + + + Face Buttons + Botões de Ação + + + Triangle + Triângulo + + + Square + Quadrado + + + Circle + Círculo + + + Cross + Cruz + + + Right Analog Halfmode + Meio Analógico Direito + + + hold to move right stick at half-speed + Segure para mover o analógico direito pela metade da velocidade + + + Right Stick + Analógico Direito + + + Speed Offset (def 0.125): + Deslocamento de Velocidade (Pad 0,125): + + + Copy from Common Config + Copiar da Configuração Comum + + + Deadzone Offset (def 0.50): + Deslocamento da Zona Morta (Pad 0,50): + + + Speed Multiplier (def 1.0): + Multiplicador de Velocidade (Pad 1,0): + + + Common Config Selected + Configuração Comum Selecionada + + + This button copies mappings from the Common Config to the currently selected profile, and cannot be used when the currently selected profile is the Common Config. + Este botão copia os mapeamentos da Configuração Comum para o perfil atualmente selecionado, e não pode ser usado quando o perfil atualmente selecionado é a Configuração Comum. + + + Copy values from Common Config + Copiar valores da Configuração Comum + + + Do you want to overwrite existing mappings with the mappings from the Common Config? + Você deseja substituir os mapeamentos existentes com os mapeamentos da Configuração Comum? + + + Unable to Save + Não foi possível salvar + + + Cannot bind any unique input more than once + Não é possível vincular qualquer entrada única mais de uma vez + + + Press a key + Aperte uma tecla + + + Cannot set mapping + Não é possível definir o mapeamento + + + Mousewheel cannot be mapped to stick outputs + A rolagem do mouse não pode ser mapeada para saídas do analógico + + + Save + Salvar + + + Apply + Aplicar + + + Restore Defaults + Restaurar Padrões + + + Cancel + Cancelar + + + + MainWindow + + Open/Add Elf Folder + Abrir/Adicionar pasta Elf + + + Boot Game + Iniciar Jogo + + + Check for Updates + Verificar Atualizações + + + About shadPS4 + Sobre o shadPS4 + + + Configure... + Configurar... + + + Recent Games + Jogos Recentes + + + Open shadPS4 Folder + Abrir Pasta do shadPS4 + + + Exit + Sair + + + Exit shadPS4 + Sair do shadPS4 + + + Exit the application. + Sair do aplicativo. + + + Show Game List + Mostrar Lista de Jogos + + + Game List Refresh + Atualizar Lista de Jogos + + + Tiny + Muito pequeno + + + Small + Pequeno + + + Medium + Médio + + + Large + Grande + + + List View + Visualização em Lista + + + Grid View + Visualização em Grade + + + Elf Viewer + Visualizador de Elf + + + Game Install Directory + Diretório de Instalação de Jogos + + + Download Cheats/Patches + Baixar Trapaças/Modificações + + + Dump Game List + Exportar Lista de Jogos + + + Trophy Viewer + Visualizador de Troféus + + + No games found. Please add your games to your library first. + Nenhum jogo encontrado. Adicione seus jogos à sua biblioteca primeiro. + + + Search... + Pesquisar... + + + File + Arquivo + + + View + Ver + + + Game List Icons + Ícones da Lista de Jogos + + + Game List Mode + Modo da Lista de Jogos + + + Settings + Configurações + + + Utils + Utilitários + + + Themes + Temas + + + Help + Ajuda + + + Dark + Escuro + + + Light + Claro + + + Green + Verde + + + Blue + Azul + + + Violet + Violeta + + + toolBar + Barra de Ferramentas + + + Game List + Lista de Jogos + + + * 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 Modificações para Todos os Jogos + + + Download Complete + Download Concluído + + + You have downloaded cheats for all the games you have installed. + Você baixou trapaças para todos os jogos que instalou. + + + Patches Downloaded Successfully! + Modificações Baixadas com Sucesso! + + + All Patches available for all games have been downloaded. + Todos as modificações disponíveis para todos os jogos foram baixadas. + + + Games: + Jogos: + + + 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! + + + Run Game + Executar Jogo + + + Eboot.bin file not found + Arquivo Eboot.bin não encontrado + + + Game is already running! + O jogo já está executando! + + + shadPS4 + shadPS4 + + + Play + Jogar + + + Pause + Pausar + + + Stop + Parar + + + Restart + Reiniciar + + + Full Screen + Tela Cheia + + + Controllers + Controles + + + Keyboard + Teclado + + + Refresh List + Atualizar Lista + + + Resume + Continuar + + + Show Labels Under Icons + Mostrar Rótulos Sob Ícones + + + + SettingsDialog + + Settings + Configurações + + + General + Geral + + + System + Sistema + + + Console Language + Idioma do Console + + + Emulator Language + Idioma do Emulador + + + Emulator + Emulador + + + Enable Separate Update Folder + Ativar Pasta de Atualização Separada + + + Default tab when opening settings + Aba padrão ao abrir as configurações + + + Show Game Size In List + Mostrar Tamanho do Jogo na Lista + + + Show Splash + Mostrar Splash Inicial + + + Enable Discord Rich Presence + Ativar Discord Rich Presence + + + Username + Nome de usuário + + + Trophy Key + Chave de Troféu + + + Trophy + Troféu + + + Open the custom trophy images/sounds folder + Abrir a pasta de imagens e sons de troféus personalizados + + + Logger + Log/Registro + + + Log Type + Tipo de Registro + + + Log Filter + Filtro do Registro + + + Open Log Location + Abrir Local do Registro + + + Input + Entradas + + + Cursor + Cursor + + + Hide Cursor + Ocultar Cursor + + + Hide Cursor Idle Timeout + Tempo de Inatividade para Ocultar Cursor + + + s + s + + + Controller + Controle + + + Back Button Behavior + Comportamento do Botão Voltar + + + Graphics + Gráficos + + + GUI + Interface + + + User + Usuário + + + Graphics Device + Placa de Vídeo + + + Vblank Divider + Divisor Vblank + + + Advanced + Avançado + + + Enable Shaders Dumping + Ativar Exportação de Shaders + + + Enable NULL GPU + Ativar GPU NULA + + + Enable HDR + Ativar HDR + + + Paths + Pastas + + + Game Folders + Pastas de Jogos + + + Add... + Adicionar... + + + Remove + Remover + + + Debug + Depuração + + + Enable Debug Dumping + Ativar Exportação de Depuração + + + Enable Vulkan Validation Layers + Ativar Camadas de Validação do Vulkan + + + Enable Vulkan Synchronization Validation + Ativar Validação de Sincronização do Vulkan + + + Enable RenderDoc Debugging + Ativar Depuração por RenderDoc + + + Enable Crash Diagnostics + Ativar Diagnóstico de Falhas + + + Collect Shaders + Coletar Shaders + + + Copy GPU Buffers + Copiar Buffers de GPU + + + Host Debug Markers + Marcadores de Depuração do Host + + + Guest Debug Markers + Marcadores de Depuração do Convidado + + + Update + Atualização + + + Check for Updates at Startup + Verificar por Atualizações ao Iniciar + + + Always Show Changelog + Sempre Mostrar o Histórico de Mudanças + + + Update Channel + Canal de Atualização + + + Check for Updates + Verificar Atualizações + + + GUI Settings + Configurações da Interface + + + Title Music + Música no Menu + + + Disable Trophy Notification + Desativar Notificações de Troféu + + + Background Image + Imagem de Fundo + + + Show Background Image + Exibir Imagem de Fundo + + + Opacity + Transparência + + + Play title music + Reproduzir Música do Título + + + Update Compatibility Database On Startup + Atualizar Banco de Dados de Compatibilidade ao Inicializar + + + Game Compatibility + Compatibilidade dos Jogos + + + Display Compatibility Data + Exibir Dados de Compatibilidade + + + Update Compatibility Database + Atualizar Lista de Compatibilidade + + + Volume + Volume + + + Save + Salvar + + + Apply + Aplicar + + + Restore Defaults + Restaurar Padrões + + + Close + Fechar + + + Point your mouse at an option to display its description. + Passe o mouse sobre uma opção para exibir sua descrição. + + + Console Language:\nSets the language that the PS4 game uses.\nIt's recommended to set this to a language the game supports, which will vary by region. + Idioma do Console:\nDefine o idioma usado pelo jogo do PS4.\nRecomenda-se configurá-lo para um idioma que o jogo suporte, o que pode variar conforme a região. + + + Emulator Language:\nSets the language of the emulator's user interface. + Idioma do Emulador:\nDefine o idioma da interface do emulador. + + + Enable Separate Update Folder:\nEnables installing game updates into a separate folder for easy management.\nThis can be manually created by adding the extracted update to the game folder with the name "CUSA00000-UPDATE" where the CUSA ID matches the game's ID. + Ativar Pasta de Atualização Separada:\nPermite instalar atualizações de jogos em uma pasta separada para fácil gerenciamento.\nIsso pode ser manualmente criado adicionando a atualização extraída à pasta do jogo com o nome "CUSA00000-UPDATE" onde o ID do CUSA corresponde ao ID do jogo. + + + Show Splash Screen:\nShows the game's splash screen (a special image) while the game is starting. + Mostrar Splash Inicial:\nExibe a tela inicial do jogo (imagem especial) ao iniciar o jogo. + + + Enable Discord Rich Presence:\nDisplays the emulator icon and relevant information on your Discord profile. + Ativar Discord Rich Presence:\nExibe o ícone do emulador e informações relevantes no seu perfil do Discord. + + + Username:\nSets the PS4's account username, which may be displayed by some games. + Nome de usuário:\nDefine o nome de usuário da conta do PS4, que pode ser exibido por alguns jogos. + + + Trophy Key:\nKey used to decrypt trophies. Must be obtained from your jailbroken console.\nMust contain only hex characters. + Chave de Troféu:\nChave usada para descriptografar troféus. Deve ser obtida a partir do seu console desbloqueado.\nDeve conter apenas caracteres hexadecimais. + + + Log Type:\nSets whether to synchronize the output of the log window for performance. May have adverse effects on emulation. + Tipo de Registro:\nDetermina se a saída da janela de registro deve ser sincronizada por motivos de desempenho. Pode impactar negativamente na emulação. + + + Log Filter:\nFilters the log to only print specific information.\nExamples: "Core:Trace" "Lib.Pad:Debug Common.Filesystem:Error" "*:Critical"\nLevels: Trace, Debug, Info, Warning, Error, Critical - in this order, a specific level silences all levels preceding it in the list and logs every level after it. + Filtro do Registro:\nFiltra o registro para exibir apenas informações específicas.\nExemplos: "Core:Trace" "Lib.Pad:Debug Common.Filesystem:Error" "*:Critical"\nNíveis: Trace, Debug, Info, Warning, Error, Critical - nesta ordem, um nível específico silencia todos os níveis anteriores na lista e registra todos os níveis após este. + + + Update:\nRelease: Official versions released every month that may be very outdated, but are more reliable and tested.\nNightly: Development versions that have all the latest features and fixes, but may contain bugs and are less stable. + Atualizações:\nRelease: Versões oficiais lançadas todos os meses que podem estar muito desatualizadas, mas são mais confiáveis e testadas.\nNightly: Versões de desenvolvimento que têm todos os novos recursos e correções, mas podem conter bugs e são menos estáveis. + + + Background Image:\nControl the opacity of the game background image. + Imagem de Fundo:\nControla a transparência da imagem de fundo do jogo. + + + Play Title Music:\nIf a game supports it, enable playing special music when selecting the game in the GUI. + Reproduzir Música do Título:\nSe o jogo suportar, ativa a reprodução de uma música especial ao selecionar o jogo na interface de usuário. + + + Disable Trophy Pop-ups:\nDisable in-game trophy notifications. Trophy progress can still be tracked using the Trophy Viewer (right-click the game in the main window). + Desabilitar Pop-ups dos Troféus:\nDesabilite notificações de troféus em jogo. O progresso do troféu ainda pode ser rastreado usando o Visualizador de Troféus (clique com o botão direito do mouse no jogo na janela principal). + + + Hide Cursor:\nChoose when the cursor will disappear:\nNever: You will always see the mouse.\nidle: Set a time for it to disappear after being idle.\nAlways: you will never see the mouse. + Ocultar Cursor:\nEscolha quando o cursor desaparecerá:\nNunca: Você sempre verá o mouse.\nParado: Defina um tempo para ele desaparecer após ficar inativo.\nSempre: Você nunca verá o mouse. + + + Hide Idle Cursor Timeout:\nThe duration (seconds) after which the cursor that has been idle hides itself. + Tempo de Inatividade para Ocultar Cursor:\nDefina um tempo em segundos para o mouse desaparecer após ficar inativo. + + + Back Button Behavior:\nSets the controller's back button to emulate tapping the specified position on the PS4 touchpad. + Comportamento do Botão Voltar:\nDefine o botão voltar do controle para emular o toque na posição especificada no touchpad do PS4. + + + Display Compatibility Data:\nDisplays game compatibility information in table view. Enable "Update Compatibility On Startup" to get up-to-date information. + Exibir Dados de Compatibilidade:\nExibe informações de compatibilidade dos jogos na visualização de tabela.\nAtive "Atualizar Compatibilidade ao Inicializar" para obter informações atualizadas. + + + Update Compatibility On Startup:\nAutomatically update the compatibility database when shadPS4 starts. + Atualizar Compatibilidade ao Inicializar:\nAtualiza automaticamente o banco de dados de compatibilidade quando o shadPS4 é iniciado. + + + Update Compatibility Database:\nImmediately update the compatibility database. + Atualizar Lista de Compatibilidade:\nAtualiza imediatamente o banco de dados de compatibilidade. + + + Never + Nunca + + + Idle + Parado + + + Always + Sempre + + + Touchpad Left + Touchpad Esquerdo + + + Touchpad Right + Touchpad Direito + + + Touchpad Center + Centro do Touchpad + + + None + Nenhum + + + Graphics Device:\nOn multiple GPU systems, select the GPU the emulator will use from the drop down list,\nor select "Auto Select" to automatically determine it. + Placa de Vídeo:\nEm sistemas com múltiplas GPUs, escolha qual GPU o emulador utilizará da lista suspensa,\nou escolha "Seleção Automática" para escolher automaticamente o mesmo. + + + Width/Height:\nSets the size of the emulator window at launch, which can be resized during gameplay.\nThis is different from the in-game resolution. + Largura/Altura:\nDefine o tamanho da janela do emulador na inicialização, que pode ser redimensionado enquanto joga.\nIsso difere da resolução do jogo. + + + Vblank Divider:\nThe frame rate at which the emulator refreshes at is multiplied by this number. Changing this may have adverse effects, such as increasing the game speed, or breaking critical game functionality that does not expect this to change! + Divisor Vblank:\nA taxa de quadros em que o emulador atualiza é multiplicada por este número. Mudar isso pode ter efeitos negativos, como aumentar a velocidade do jogo ou quebrar a funcionalidade vital do jogo que não espera que isso mude! + + + Enable Shaders Dumping:\nFor the sake of technical debugging, saves the games shaders to a folder as they render. + Ativar Exportação de Shaders:\nArmazena os shaders do jogo em uma pasta durante a renderização para fins de depuração técnica. + + + Enable Null GPU:\nFor the sake of technical debugging, disables game rendering as if there were no graphics card. + Ativar GPU NULA:\nDesativa a renderização do jogo para fins de depuração técnica, como se não houvesse placa de vídeo. + + + Enable HDR:\nEnables HDR in games that support it.\nYour monitor must have support for the BT2020 PQ color space and the RGB10A2 swapchain format. + Ativar HDR:\nAtiva o HDR em jogos que o suportem.\nSeu monitor deve possuir suporte para o espaço de cores BT2020 PQ e ao formato de swapchain RGB10A2. + + + Game Folders:\nThe list of folders to check for installed games. + Pastas de Jogos:\nLista de pastas para verificar por jogos instalados. + + + Add:\nAdd a folder to the list. + Adicionar:\nAdiciona uma pasta à lista. + + + Remove:\nRemove a folder from the list. + Remover:\nRemove uma pasta da lista. + + + Enable Debug Dumping:\nSaves the import and export symbols and file header information of the currently running PS4 program to a directory. + Ativar Exportação de Depuração:\nArmazena os símbolos de importação, exportação e informações do cabeçalho do arquivo do programa PS4 atual em um diretório. + + + Enable Vulkan Validation Layers:\nEnables a system that validates the state of the Vulkan renderer and logs information about its internal state.\nThis will reduce performance and likely change the behavior of emulation. + Ativar Camadas de Validação do Vulkan:\nAtiva um sistema que valida o estado do renderizador Vulkan e registra informações sobre seu estado interno.\nIsso diminuirá o desempenho e provavelmente mudará o comportamento da emulação. + + + Enable Vulkan Synchronization Validation:\nEnables a system that validates the timing of Vulkan rendering tasks.\nThis will reduce performance and likely change the behavior of emulation. + Ativar Validação de Sincronização do Vulkan:\nAtiva um sistema que valida o agendamento de tarefas de renderização Vulkan.\nIsso diminuirá o desempenho e provavelmente mudará o comportamento da emulação. + + + Enable RenderDoc Debugging:\nIf enabled, the emulator will provide compatibility with Renderdoc to allow capture and analysis of the currently rendered frame. + Ativar Depuração por RenderDoc:\nSe habilitado, o emulador fornecerá compatibilidade com RenderDoc para permitir a captura e análise do quadro atualmente renderizado. + + + Collect Shaders:\nYou need this enabled to edit shaders with the debug menu (Ctrl + F10). + Coletar Shaders:\nVocê precisa dessa opção ativada para editar shaders com o menu de depuração (Ctrl + F10). + + + Crash Diagnostics:\nCreates a .yaml file with info about the Vulkan state at the time of crashing.\nUseful for debugging 'Device lost' errors. If you have this enabled, you should enable Host AND Guest Debug Markers.\nDoes not work on Intel GPUs.\nYou need Vulkan Validation Layers enabled and the Vulkan SDK for this to work. + Diagnóstico de Falhas:\nCria um arquivo .yaml com informações sobre o estado do Vulkan no momento da falha.\nÚtil para depuração de erros de 'Device lost'. Se isto estiver ativado, você deve habilitar os Marcadores de Depuração de Host E DE Convidado.\nNão funciona em GPUs Intel.\nVocê precisa ter as Camadas de Validação Vulkan habilitadas e o Vulkan SDK para que isso funcione. + + + Copy GPU Buffers:\nGets around race conditions involving GPU submits.\nMay or may not help with PM4 type 0 crashes. + Copiar Buffers de GPU:\nContorna condições de corrida envolvendo envios de GPU.\nPode ou não ajudar com travamentos do PM4 tipo 0. + + + Host Debug Markers:\nInserts emulator-side information like markers for specific AMDGPU commands around Vulkan commands, as well as giving resources debug names.\nIf you have this enabled, you should enable Crash Diagnostics.\nUseful for programs like RenderDoc. + Marcadores de Depuração do Host:\nInsere informações vindo do emulador como marcadores para comandos AMDGPU específicos em torno de comandos Vulkan, além de fornecer nomes de depuração aos recursos.\nSe isso estiver habilitado, ative os Diagnósticos de Falhas.\nÚtil para programas como o RenderDoc. + + + Guest Debug Markers:\nInserts any debug markers the game itself has added to the command buffer.\nIf you have this enabled, you should enable Crash Diagnostics.\nUseful for programs like RenderDoc. + Marcadores de Depuração do Convidado:\nInsere quaisquer marcadores de depuração que o próprio jogo adicionou ao buffer de comando.\nSe isso estiver habilitado, ative os Diagnósticos de Falhas.\nÚtil para programas como o RenderDoc. + + + Save Data Path:\nThe folder where game save data will be saved. + Caminho dos Dados Salvos:\nA pasta que onde os dados de salvamento de jogo serão salvos. + + + Browse:\nBrowse for a folder to set as the save data path. + Procurar:\nProcure uma pasta para definir como o caminho para salvar dados. + + + Release + Release + + + Nightly + Nightly + + + Set the volume of the background music. + Defina o volume da música de fundo. + + + Enable Motion Controls + Ativar Controles de Movimento + + + Save Data Path + Caminho dos Dados Salvos + + + Browse + Procurar + + + async + assíncrono + + + sync + síncrono + + + Auto Select + Seleção Automática + + + Directory to install games + Diretório para instalar jogos + + + Directory to save data + Diretório para salvar dados + + + Video + Vídeo + + + Display Mode + Modo de Exibição + + + Windowed + Em Janela + + + Fullscreen + Tela Cheia + + + Fullscreen (Borderless) + Tela Cheia (Sem Bordas) + + + Window Size + Tamanho da Janela + + + W: + L: + + + H: + A: + + + Separate Log Files + Separar Arquivos de Registro + + + Separate Log Files:\nWrites a separate logfile for each game. + Separar Arquivos de Registro:\nGrava um arquivo de registro para cada jogo. + + + Trophy Notification Position + Posição da Notificação do Troféu + + + Left + Esquerda + + + Right + Direita + + + Top + Acima + + + Bottom + Abaixo + + + Notification Duration + Duração da Notificação + + + Portable User Folder + Pasta Portátil do Usuário + + + Create Portable User Folder from Common User Folder + Criar Pasta Portátil do Usuário a partir da Pasta Comum do Usuário + + + Portable user folder:\nStores shadPS4 settings and data that will be applied only to the shadPS4 build located in the current folder. Restart the app after creating the portable user folder to begin using it. + Pasta Portátil do Usuário:\nArmazena as configurações e dados do shadPS4 que serão aplicados apenas à compilação do shadPS4 localizada na pasta atual. Reinicie o aplicativo após criar a pasta portátil do usuário para começar a usá-la. + + + Cannot create portable user folder + Não é possível criar a pasta portátil do usuário + + + %1 already exists + %1 já existe + + + Portable user folder created + Pasta portátil do usuário criada + + + %1 successfully created. + %1 criado com sucesso. + + + Open the custom trophy images/sounds folder:\nYou can add custom images to the trophies and an audio.\nAdd the files to custom_trophy with the following names:\ntrophy.wav OR trophy.mp3, bronze.png, gold.png, platinum.png, silver.png\nNote: The sound will only work in QT versions. + Abrir a pasta de imagens e sons de troféus personalizados:\nVocê pode adicionar imagens personalizadas aos troféus e um áudio.\nAdicione os arquivos na pasta custom_trophy com os seguintes nomes:\ntrophy.wav OU trophy.mp3, bronze.png, gold.png, platinum.png, silver.png\nObservação: O som funcionará apenas em versões Qt. + + + + TrophyViewer + + Trophy Viewer + Visualizador de Troféus + + + Select Game: + Selecionar Jogo: + + + Progress + Progresso + + + Show Earned Trophies + Mostrar Troféus Conquistados + + + Show Not Earned Trophies + Mostrar Troféus Não Conquistados + + + Show Hidden Trophies + Mostrar Troféus Ocultos + + + diff --git a/src/qt_gui/translations/pt_PT.ts b/src/qt_gui/translations/pt_PT.ts new file mode 100644 index 000000000..a155a6324 --- /dev/null +++ b/src/qt_gui/translations/pt_PT.ts @@ -0,0 +1,2089 @@ + + + + + + AboutDialog + + About shadPS4 + Sobre o shadPS4 + + + shadPS4 is an experimental open-source emulator for the PlayStation 4. + shadPS4 é um emulador de código aberto experimental para o PlayStation 4. + + + This software should not be used to play games you have not legally obtained. + Este programa não deve ser usado para jogar títulos não obtidos legalmente. + + + + CheatsPatches + + Cheats / Patches for + Cheats / Patches para + + + 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:\n + Cheats/Patches são experimentais.\nUse com caução.\n\nTransfira os cheats individualmente selecionando o repositório e clicando no botão de transferência.\nNa aba Patches, poderá transferir todos os Patches de uma vez, escolher o qual deseja usar e guardar as suas definições.\n\nComo nós não desenvolvemos os Cheats/Patches,\npor favor, reporte os problemas relacionados com o cheat ao autor deste.\n\nCriou um novo cheat? Visite:\n + + + No Image Available + Nenhuma Imagem Disponível + + + Serial: + Número de série: + + + Version: + Versão: + + + Size: + Tamanho: + + + Select Cheat File: + Selecionar Ficheiro de Cheat: + + + Repository: + Repositório: + + + Download Cheats + Transferir Cheats + + + Delete File + Eliminar Ficheiro + + + No files selected. + Nenhum ficheiro selecionado. + + + You can delete the cheats you don't want after downloading them. + Poderá eliminar os cheats que não deseja após os transferir. + + + Do you want to delete the selected file?\n%1 + Pretende eliminar o ficheiro selecionado?\n%1 + + + Select Patch File: + Selecionar Ficheiro de Patch: + + + Download Patches + Transferir Patches + + + Save + Guardar + + + Cheats + Cheats + + + 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 ficheiro de patch encontrado para o número de série atual. + + + Unable to open the file for reading. + Não foi possível abrir o ficheiro para leitura. + + + Unable to open the file for writing. + Não foi possível abrir o ficheiro para escrita. + + + Failed to parse XML: + Erro ao interpretar XML: + + + Success + Sucesso + + + Options saved successfully. + Opções guardadas com sucesso. + + + Invalid Source + Fonte Inválida + + + The selected source is invalid. + A fonte selecionada é inválida. + + + File Exists + O Ficheiro já Existe + + + File already exists. Do you want to replace it? + O ficheiro já existe. Deseja substituí-lo? + + + Failed to save file: + Erro ao guardar o ficheiro: + + + Failed to download file: + Erro ao transferir o ficheiro: + + + Cheats Not Found + Cheats Não Encontrados + + + No Cheats found for this game in this version of the selected repository,try another repository or a different version of the game. + Não foi encontrado nenhum Cheat para esta versão do jogo no repositório selecionado, tente outro repositório ou uma versão diferente do jogo. + + + Cheats Downloaded Successfully + Cheats Transferidos com Sucesso + + + 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. + Transferiu os cheats para esta versão do jogo através do repositório selecionado com sucesso. Poderá tentar transferir de outro repositório, e se disponível, será possível utilizá-lo selecionando o ficheiro a partir da lista. + + + Failed to save: + Erro ao guardar: + + + Failed to download: + Erro ao transferir: + + + Download Complete + Transferência Concluída + + + 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. If the patch does not appear, it may be that it does not exist for the specific serial and version of the game. + Patches Transferidos com Sucesso! Foram transferidos todos os patches disponíveis para todos os jogos, não sendo necessário transferir individualmente para cada jogo como acontece com os Cheats. Se o patch não aparecer, pode ser que não esteja disponível para o número de série e versão específicos do jogo. + + + Failed to parse JSON data from HTML. + Falha ao interpretar dados JSON através do HTML. + + + Failed to retrieve HTML page. + Falha ao recuperar a página HTML. + + + The game is in version: %1 + O jogo está na versão: %1 + + + The downloaded patch only works on version: %1 + O patch transferido só funciona na versão: %1 + + + You may need to update your game. + Talvez seja necessário atualizar o seu jogo. + + + Incompatibility Notice + Aviso de Incompatibilidade + + + Failed to open file: + Erro ao abrir o ficheiro: + + + XML ERROR: + ERRO XML: + + + Failed to open files.json for writing + Não foi possível abrir files.json para escrita + + + Author: + Autor: + + + Directory does not exist: + A pasta não existe: + + + Failed to open files.json for reading. + Não foi possível abrir files.json para leitura. + + + Name: + Nome: + + + Can't apply cheats before the game is started + Não é possível aplicar cheats antes de iniciar o jogo + + + Close + Fechar + + + + CheckUpdate + + Auto Updater + Atualizador Automático + + + Error + Erro + + + Network error: + Erro de rede: + + + The Auto Updater allows up to 60 update checks per hour.\nYou have reached this limit. Please try again later. + O Atualizador Automático permite até 60 verificações de atualização por hora.\nJá atingiu este limite. Por favor, tente novamente mais tarde. + + + Failed to parse update information. + Falha ao interpretar as informações de atualização. + + + No pre-releases found. + Nenhuma versão de pré-lançamento encontrada. + + + Invalid release data. + Dados de lançamento inválidos. + + + No download URL found for the specified asset. + Nenhum URL de transferência encontrado para o recurso especificado. + + + Your version is already up to date! + A sua versão já é a mais recente! + + + Update Available + Atualização Disponível + + + Update Channel + Canal de Atualização + + + Current Version + Versão Atual + + + Latest Version + Última Versão + + + Do you want to update? + Deseja atualizar? + + + Show Changelog + Mostrar Lista de Alterações + + + Check for Updates at Startup + Procurar Atualizações ao Iniciar + + + Update + Atualizar + + + No + Não + + + Hide Changelog + Ocultar Lista de Alterações + + + Changes + Alterações + + + Network error occurred while trying to access the URL + Ocorreu um erro de rede ao tentar aceder ao URL + + + Download Complete + Transferência Concluída + + + The update has been downloaded, press OK to install. + A atualização foi transferida, pressione OK para instalar. + + + Failed to save the update file at + Erro ao guardar o ficheiro de atualização em + + + Starting Update... + A Iniciar Atualização... + + + Failed to create the update script file + Erro ao criar o ficheiro de script de atualização + + + + CompatibilityInfoClass + + Fetching compatibility data, please wait + A obter dados de compatibilidade, por favor aguarde + + + Cancel + Cancelar + + + Loading... + A Carregar... + + + Error + Erro + + + Unable to update compatibility data! Try again later. + Não foi possível atualizar os dados de compatibilidade! Tente novamente mais tarde. + + + Unable to open compatibility_data.json for writing. + Não foi possível abrir compatibility_data.json para escrita. + + + Unknown + Desconhecido + + + Nothing + Nada + + + Boots + Arranca + + + Menus + Menus + + + Ingame + Em Jogo + + + Playable + Jogável + + + + ControlSettings + + Configure Controls + Configurar Comandos + + + D-Pad + Botões de Direção + + + Up + Cima + + + Left + Esquerda + + + Right + Direita + + + Down + Baixo + + + Left Stick Deadzone (def:2 max:127) + Zona Morta do Manípulo Esquerdo (def: 2, max: 127) + + + Left Deadzone + Zona Morta Esquerda + + + Left Stick + Manípulo Esquerdo + + + Config Selection + Seleção de Configuração + + + Common Config + Configuração Comum + + + Use per-game configs + Utilizar configurações por jogo + + + L1 / LB + L1 / LB + + + L2 / LT + L2 / LT + + + Back + Voltar + + + R1 / RB + R1 / RB + + + R2 / RT + R2 / RT + + + L3 + L3 + + + Options / Start + Opções / Start + + + R3 + R3 + + + Face Buttons + Botões Frontais + + + Triangle / Y + Triângulo / Y + + + Square / X + Quadrado / X + + + Circle / B + Círculo / B + + + Cross / A + Cruz / A + + + Right Stick Deadzone (def:2, max:127) + Zona Morta do Manípulo Direito (def: 2, max: 127) + + + Right Deadzone + Zona Morta Direita + + + Right Stick + Manípulo Direito + + + Color Adjustment + Ajuste de Cores + + + R: + R: + + + G: + G: + + + B: + B: + + + Override Lightbar Color + Substituir cor da Lightbar + + + Override Color + Substituir Cor + + + Unable to Save + Não é possível salvar + + + Cannot bind axis values more than once + Não foi possível atribuir os valores do eixo X ou Y mais de uma vez + + + Save + Salvar + + + Apply + Aplicar + + + Restore Defaults + Restaurar o Padrão + + + Cancel + Cancelar + + + + EditorDialog + + Edit Keyboard + Mouse and Controller input bindings + Editar comandos do Teclado + Mouse e do Controle + + + Use Per-Game configs + Use uma configuração para cada jogo + + + Error + Erro + + + Could not open the file for reading + Não foi possível abrir o arquivo para ler + + + Could not open the file for writing + Não foi possível abrir o arquivo para escrever + + + Save Changes + Salvar mudanças + + + Do you want to save changes? + Salvar as mudanças? + + + Help + Ajuda + + + Do you want to reset your custom default config to the original default config? + Restaurar a configuração customizada padrão para a configuração original padrão? + + + Do you want to reset this config to your custom default config? + Deseja redefinir esta configuração para a configuração padrão personalizada? + + + Reset to Default + Resetar ao Padrão + + + + ElfViewer + + Open Folder + Abrir Pasta + + + + GameInfoClass + + Loading game list, please wait :3 + A carregar a lista de jogos, por favor aguarde :3 + + + Cancel + Cancelar + + + Loading... + A Carregar... + + + + GameInstallDialog + + shadPS4 - Choose directory + shadPS4 - Escolher diretório + + + Directory to install games + Diretório onde instalar os jogos + + + Browse + Procurar + + + Error + Erro + + + Directory to install DLC + Diretório onde instalar os DLC + + + + GameListFrame + + Icon + Ícone + + + Name + Nome + + + Serial + Número de Série + + + Compatibility + Compatibilidade + + + Region + Região + + + Firmware + Firmware + + + Size + Tamanho + + + Version + Versão + + + Path + Caminho + + + Play Time + Tempo de Jogo + + + Never Played + Nunca Jogado + + + h + h + + + m + m + + + s + s + + + Compatibility is untested + A compatibilidade não foi testada + + + Game does not initialize properly / crashes the emulator + O jogo não arranca corretamente / bloqueia o emulador + + + Game boots, but only displays a blank screen + O jogo arranca, mas não exibe nada + + + Game displays an image but does not go past the menu + O jogo exibe imagem, mas não passa do menu + + + Game has game-breaking glitches or unplayable performance + O jogo tem falhas ou desempenho que o tornam injogável + + + Game can be completed with playable performance and no major glitches + O jogo pode ser concluído com desempenho jogável e sem grandes problemas + + + Click to see details on github + Clique para ver os detalhes no github + + + Last updated + Última atualização + + + + GameListUtils + + B + B + + + KB + KB + + + MB + MB + + + GB + GB + + + TB + TB + + + + GuiContextMenus + + Create Shortcut + Criar Atalho + + + Cheats / Patches + Cheats / Patches + + + SFO Viewer + Visualizador SFO + + + Trophy Viewer + Visualizador de Troféus + + + Open Folder... + Abrir Pasta... + + + Open Game Folder + Abrir Pasta do Jogo + + + Open Save Data Folder + Abrir Pasta de Dados Guardados + + + Open Log Folder + Abrir Pasta de Registo + + + Copy info... + Copiar informação... + + + Copy Name + Copiar Nome + + + Copy Serial + Copiar Número de Série + + + Copy Version + Copiar Versão + + + Copy Size + Copiar Tamanho + + + Copy All + Copiar Tudo + + + Delete... + Eliminar... + + + Delete Game + Eliminar Jogo + + + Delete Update + Eliminar Atualização + + + Delete DLC + Eliminar DLC + + + Delete Trophy + Eliminar Troféu + + + Compatibility... + Compatibilidade... + + + Update database + Atualizar Base de Dados + + + View report + Ver relatório + + + Submit a report + Submeter um relatório + + + Shortcut creation + Criação de atalho + + + Shortcut created successfully! + Atalho criado com sucesso! + + + Error + Erro + + + Error creating shortcut! + Erro ao criar atalho! + + + Game + Jogo + + + This game has no update to delete! + Este jogo não tem nenhuma atualização para eliminar! + + + Update + Atualizar + + + This game has no DLC to delete! + Este jogo não tem nenhum DLC para eliminar! + + + DLC + DLC + + + Delete %1 + Eliminar %1 + + + Are you sure you want to delete %1's %2 directory? + Tem certeza de que deseja eliminar o diretório %2 de %1? + + + Open Update Folder + Abrir Pasta da Atualização + + + Delete Save Data + Eliminar Dados Guardados + + + This game has no update folder to open! + Este jogo não tem nenhuma pasta de atualização para abrir! + + + No log file found for this game! + Não foi encontrado nenhum ficheiro de registo para este jogo! + + + Failed to convert icon. + Falha ao converter ícone. + + + This game has no save data to delete! + Este jogo não tem dados guardados para eliminar! + + + This game has no saved trophies to delete! + Este jogo não tem troféus guardados para eliminar! + + + Save Data + Dados Guardados + + + Trophy + Troféus + + + SFO Viewer for + Visualizador SFO para + + + + HelpDialog + + Quickstart + Início Rápido + + + FAQ + Perguntas Frequentes + + + Syntax + Sintaxe + + + Special Bindings + Atalhos Especiais + + + Keybindings + Combinações de Teclas + + + + KBMSettings + + Configure Controls + Configurar Comandos + + + D-Pad + Botões de Direção + + + Up + Cima + + + unmapped + não mapeado + + + Left + Esquerda + + + Right + Direita + + + Down + Baixo + + + Left Analog Halfmode + Meio Modo do Manípulo Esquerdo + + + hold to move left stick at half-speed + mantenha pressionado para mover o manípulo esquerdo à metade da velocidade + + + Left Stick + Manípulo Esquerdo + + + Config Selection + Seleção de Configuração + + + Common Config + Configuração Comum + + + Use per-game configs + Utilizar configurações por jogo + + + L1 + L1 + + + L2 + L2 + + + Text Editor + Editor de Texto + + + Help + Ajuda + + + R1 + R1 + + + R2 + R2 + + + L3 + L3 + + + Touchpad Click + Clique do Touchpad + + + Mouse to Joystick + Rato para Manípulo + + + *press F7 ingame to activate + *pressione F7 em jogo para ativar + + + R3 + R3 + + + Options + Opções + + + Mouse Movement Parameters + Parâmetros de Movimento do Rato + + + note: click Help Button/Special Keybindings for more information + nota: clique no Botão de Ajuda/Special Keybindings para obter mais informações + + + Face Buttons + Botões Frontais + + + Triangle + Triângulo + + + Square + Quadrado + + + Circle + Círculo + + + Cross + Cruz + + + Right Analog Halfmode + Meio Modo do Manípulo Direito + + + hold to move right stick at half-speed + mantenha pressionado para mover o manípulo direito à metade da velocidade + + + Right Stick + Manípulo Direito + + + Speed Offset (def 0.125): + Deslocamento de Velocidade (def 0,125): + + + Copy from Common Config + Copiar da Configuração Comum + + + Deadzone Offset (def 0.50): + Deslocamento da Zona Morta (def 0,50): + + + Speed Multiplier (def 1.0): + Multiplicador de Velocidade (def 1,0): + + + Common Config Selected + Configuração Comum Selecionada + + + This button copies mappings from the Common Config to the currently selected profile, and cannot be used when the currently selected profile is the Common Config. + Este botão copia mapeamentos da Configuração Comum para o perfil atualmente selecionado, e não pode ser usado quando o perfil atualmente selecionado é a Configuração Comum. + + + Copy values from Common Config + Copiar valores da Configuração Comum + + + Do you want to overwrite existing mappings with the mappings from the Common Config? + Substituir mapeamentos existentes com os mapeamentos da Configuração Comum? + + + Unable to Save + Não é possível salvar + + + Cannot bind any unique input more than once + Não é possível vincular qualquer entrada única mais de uma vez + + + Press a key + Pressione uma tecla + + + Cannot set mapping + Não é possível definir o mapeamento + + + Mousewheel cannot be mapped to stick outputs + Roda do rato não pode ser mapeada para saídas empates + + + Save + Salvar + + + Apply + Aplicar + + + Restore Defaults + Restaurar Definições + + + Cancel + Cancelar + + + + MainWindow + + Open/Add Elf Folder + Abrir/Adicionar pasta Elf + + + Boot Game + Iniciar Jogo + + + Check for Updates + Procurar Atualizações + + + About shadPS4 + Sobre o shadPS4 + + + Configure... + Configurar... + + + Recent Games + Jogos Recentes + + + Open shadPS4 Folder + Abrir Pasta do shadPS4 + + + Exit + Sair + + + Exit shadPS4 + Sair do shadPS4 + + + Exit the application. + Sair da aplicação. + + + Show Game List + Mostrar Lista de Jogos + + + Game List Refresh + Atualizar Lista de Jogos + + + Tiny + Muito Pequeno + + + Small + Pequeno + + + Medium + Médio + + + Large + Grande + + + List View + Visualizar em Lista + + + Grid View + Visualizar em Grelha + + + Elf Viewer + Visualizador Elf + + + Game Install Directory + Diretório de Instalação dos Jogos + + + Download Cheats/Patches + Transferir Cheats/Patches + + + Dump Game List + Exportar Lista de Jogos + + + Trophy Viewer + Visualizador de Troféus + + + No games found. Please add your games to your library first. + Nenhum jogo encontrado. Por favor, adicione os seus jogos à sua biblioteca primeiro. + + + Search... + Procurar... + + + File + Ficheiro + + + View + Ver + + + Game List Icons + Ícones da Lista de Jogos + + + Game List Mode + Modo da Lista de Jogos + + + Settings + Definições + + + Utils + Utilidades + + + Themes + Temas + + + Help + Ajuda + + + Dark + Escuro + + + Light + Claro + + + Green + Verde + + + Blue + Azul + + + Violet + Violeta + + + toolBar + Barra de Ferramentas + + + Game List + Lista de Jogos + + + * Unsupported Vulkan Version + * Versão do Vulkan não suportada + + + Download Cheats For All Installed Games + Transferir Cheats para Todos os Jogos Instalados + + + Download Patches For All Games + Transferir Patches para Todos os Jogos + + + Download Complete + Transferência Concluída + + + You have downloaded cheats for all the games you have installed. + Transferiu cheats para todos os jogos instalados. + + + Patches Downloaded Successfully! + Patches Transferidos com Sucesso! + + + All Patches available for all games have been downloaded. + Foram transferidos todos os Patches disponíveis para os jogos. + + + Games: + Jogos: + + + ELF files (*.bin *.elf *.oelf) + Ficheiros ELF (*.bin *.elf *.oelf) + + + Game Boot + Arranque do Jogo + + + Only one file can be selected! + Apenas um ficheiro pode ser selecionado! + + + Run Game + Executar Jogo + + + Eboot.bin file not found + Ficheiro eboot.bin não encontrado + + + Game is already running! + O jogo já está a ser executado! + + + shadPS4 + shadPS4 + + + Play + Play + + + Pause + Pause + + + Stop + Stop + + + Restart + Restart + + + Full Screen + Full Screen + + + Controllers + Controllers + + + Keyboard + Keyboard + + + Refresh List + Refresh List + + + Resume + Resume + + + Show Labels Under Icons + Show Labels Under Icons + + + + SettingsDialog + + Settings + Definições + + + General + Geral + + + System + Sistema + + + Console Language + Idioma da Consola + + + Emulator Language + Idioma do Emulador + + + Emulator + Emulador + + + Enable Separate Update Folder + Ativar Pasta de Atualizações Separada + + + Default tab when opening settings + Aba padrão ao abrir as definições + + + Show Game Size In List + Mostrar Tamanho do Jogo na Lista + + + Show Splash + Mostrar Splash + + + Enable Discord Rich Presence + Ativar Discord Rich Presence + + + Username + Nome de Utilizador + + + Trophy Key + Chave de Troféus + + + Trophy + Troféus + + + Open the custom trophy images/sounds folder + Abrir a pasta de imagens/sons de troféus personalizados + + + Logger + Registos + + + Log Type + Tipo de Registo + + + Log Filter + Filtro do Registo + + + Open Log Location + Abrir Localização do Registo + + + Input + Entrada + + + Cursor + Cursor + + + Hide Cursor + Ocultar Cursor + + + Hide Cursor Idle Timeout + Tempo de Espera para Ocultar Cursor + + + s + s + + + Controller + Comando + + + Back Button Behavior + Comportamento do Botão Voltar + + + Graphics + Gráficos + + + GUI + GUI + + + User + Utilizador + + + Graphics Device + Placa Gráfica + + + Vblank Divider + Divisor Vblank + + + Advanced + Avançado + + + Enable Shaders Dumping + Ativar Dumping de Shaders + + + Enable NULL GPU + Ativar GPU NULL + + + Enable HDR + Ativar HDR + + + Paths + Caminhos + + + Game Folders + Pastas de Jogos + + + Add... + Adicionar... + + + Remove + Remover + + + Debug + Depuração + + + Enable Debug Dumping + Ativar Dumping da Depuração + + + Enable Vulkan Validation Layers + Ativar Camadas de Validação do Vulkan + + + Enable Vulkan Synchronization Validation + Ativar Validação da Sincronização do Vulkan + + + Enable RenderDoc Debugging + Ativar Depuração por RenderDoc + + + Enable Crash Diagnostics + Ativar Diagnóstico de Falhas + + + Collect Shaders + Recolher Shaders + + + Copy GPU Buffers + Copiar Buffers da GPU + + + Host Debug Markers + Marcadores de Depuração do Host + + + Guest Debug Markers + Marcadores de Depuração do Cliente + + + Update + Atualização + + + Check for Updates at Startup + Procurar Atualizações ao Iniciar + + + Always Show Changelog + Mostrar Sempre o Histórico de Mudanças + + + Update Channel + Canal de Atualização + + + Check for Updates + Procurar Atualizações + + + GUI Settings + Definições da Interface + + + Title Music + Música de Título + + + Disable Trophy Notification + Desativar Notificações de Troféus + + + Background Image + Imagem de Fundo + + + Show Background Image + Mostrar Imagem de Fundo + + + Opacity + Opacidade + + + Play title music + Reproduzir Música de Título + + + Update Compatibility Database On Startup + Atualizar Base de Dados de Compatibilidade no Arranque + + + Game Compatibility + Compatibilidade dos Jogos + + + Display Compatibility Data + Exibir Dados de Compatibilidade + + + Update Compatibility Database + Atualizar Base de Dados de Compatibilidade + + + Volume + Volume + + + Save + Guardar + + + Apply + Aplicar + + + Restore Defaults + Restaurar Predefinições + + + Close + Fechar + + + Point your mouse at an option to display its description. + Passe o ponteiro do rato sobre uma opção para exibir a sua descrição. + + + Console Language:\nSets the language that the PS4 game uses.\nIt's recommended to set this to a language the game supports, which will vary by region. + Idioma da consola:\nDefine o idioma usado pelo jogo PS4.\nRecomenda-se configurar isto para um idioma que o jogo suporte, o que pode variar conforme a região. + + + Emulator Language:\nSets the language of the emulator's user interface. + Idioma do Emulador:\nDefine o idioma da interface gráfica do emulador. + + + Enable Separate Update Folder:\nEnables installing game updates into a separate folder for easy management.\nThis can be manually created by adding the extracted update to the game folder with the name "CUSA00000-UPDATE" where the CUSA ID matches the game's ID. + Ativar Pasta de Atualização Separada:\nPermite instalar as atualizações dos jogos numa pasta separada para uma fácil gestão.\nIsto pode ser manualmente criado adicionando a atualização extraída à pasta do jogo com o nome "CUSA00000-UPDATE" onde o ID do CUSA corresponde ao ID do jogo. + + + Show Splash Screen:\nShows the game's splash screen (a special image) while the game is starting. + Mostrar Splash Inicial:\nExibe o ecrã inicial do jogo (uma imagem especial) enquanto o jogo inicia. + + + Enable Discord Rich Presence:\nDisplays the emulator icon and relevant information on your Discord profile. + Ativar Discord Rich Presence:\nExibe o ícone do emulador e informações relevantes no seu perfil do Discord. + + + Username:\nSets the PS4's account username, which may be displayed by some games. + Nome de utilizador:\nDefine o nome de utilizador da conta PS4, que poderá ser exibido por alguns jogos. + + + Trophy Key:\nKey used to decrypt trophies. Must be obtained from your jailbroken console.\nMust contain only hex characters. + Chave de Troféu:\nChave usada para decifrar os troféus. Deverá ser obtida a partir da sua consola desbloqueada.\nDeve conter apenas caracteres hexadecimais. + + + Log Type:\nSets whether to synchronize the output of the log window for performance. May have adverse effects on emulation. + Tipo de Registo:\nDetermina se a saída da janela de registo deve ser sincronizada por motivos de desempenho. Pode impactar negativamente a emulação. + + + Log Filter:\nFilters the log to only print specific information.\nExamples: "Core:Trace" "Lib.Pad:Debug Common.Filesystem:Error" "*:Critical"\nLevels: Trace, Debug, Info, Warning, Error, Critical - in this order, a specific level silences all levels preceding it in the list and logs every level after it. + Filtro de Registo:\nFiltra o registo de modo a exibir apenas informações específicas.\nExemplos: "Core:Trace" "Lib.Pad:Debug Common.Filesystem:Error" "*:Critical"\nNíveis: Trace, Debug, Info, Warning, Error, Critical - nesta ordem, um nível específico silencia todos os níveis anteriores na lista e regista todos os níveis após ele. + + + Update:\nRelease: Official versions released every month that may be very outdated, but are more reliable and tested.\nNightly: Development versions that have all the latest features and fixes, but may contain bugs and are less stable. + Atualização:\nLançamento: Versões oficiais lançadas todos os meses que podem estar desatualizadas, mas são mais estáveis e testadas.\nNightly: Versões de desenvolvimento que têm todos os últimos recursos e correções, mas podem conter bugs e são menos estáveis. + + + Background Image:\nControl the opacity of the game background image. + Imagem de Fundo:\nControla a transparência da imagem de fundo do jogo. + + + Play Title Music:\nIf a game supports it, enable playing special music when selecting the game in the GUI. + Reproduzir Música de Título:\nSe o jogo suportar, ativa a reprodução de uma música especial ao selecionar o jogo na interface de utilizador. + + + Disable Trophy Pop-ups:\nDisable in-game trophy notifications. Trophy progress can still be tracked using the Trophy Viewer (right-click the game in the main window). + Desativar Pop-ups dos Troféus:\nDesativa notificações de troféus em jogo. O progresso do troféu ainda poderá ser rastreado ao usar o Visualizador de Troféus (clique com o botão direito do rato no jogo na janela principal). + + + Hide Cursor:\nChoose when the cursor will disappear:\nNever: You will always see the mouse.\nidle: Set a time for it to disappear after being idle.\nAlways: you will never see the mouse. + Ocultar Cursor:\nEscolha quando o cursor desaparecerá:\nNunca: Verá sempre o rato.\nParado: Defina um tempo para desaparecer após ficar inativo.\nSempre: Nunca verá o rato. + + + Hide Idle Cursor Timeout:\nThe duration (seconds) after which the cursor that has been idle hides itself. + Tempo de Espera para Ocultar o Cursor:\nDefine o tempo em segundos para o rato desaparecer após ficar inativo. + + + Back Button Behavior:\nSets the controller's back button to emulate tapping the specified position on the PS4 touchpad. + Comportamento do Botão Voltar:\nConfigura o botão Voltar do comando para emular um toque na posição especificada no touchpad do PS4. + + + Display Compatibility Data:\nDisplays game compatibility information in table view. Enable "Update Compatibility On Startup" to get up-to-date information. + Exibir Dados de Compatibilidade:\nExibe informações de compatibilidade dos jogos em visualização de tabela.\nAtivar "Atualizar Base de Dados de Compatibilidade no Arranque" para obter informações atualizadas. + + + Update Compatibility On Startup:\nAutomatically update the compatibility database when shadPS4 starts. + Atualizar Base de Dados de Compatibilidade no Arranque:\nAtualiza automaticamente a base de dados de compatibilidade quando o shadPS4 é iniciado. + + + Update Compatibility Database:\nImmediately update the compatibility database. + Atualizar Base de Dados de Compatibilidade:\nAtualiza imediatamente a base de dados de compatibilidade. + + + Never + Nunca + + + Idle + Inativo + + + Always + Sempre + + + Touchpad Left + Esquerda do Touchpad + + + Touchpad Right + Direita do Touchpad + + + Touchpad Center + Centro do Touchpad + + + None + Nenhum + + + Graphics Device:\nOn multiple GPU systems, select the GPU the emulator will use from the drop down list,\nor select "Auto Select" to automatically determine it. + Placa Gráfica:\nEm sistemas com múltiplas GPUs, escolha qual GPU da lista o emulador utilizará,\nou escolha "Seleção Automática" para escolher automaticamente a mesma. + + + Width/Height:\nSets the size of the emulator window at launch, which can be resized during gameplay.\nThis is different from the in-game resolution. + Largura/Altura:\nDefine o tamanho da janela do emulador no arranque, que poderá ser redimensionada enquanto joga.\nIsto difere da resolução do jogo. + + + Vblank Divider:\nThe frame rate at which the emulator refreshes at is multiplied by this number. Changing this may have adverse effects, such as increasing the game speed, or breaking critical game functionality that does not expect this to change! + Divisor Vblank:\nA taxa de quadros em que o emulador atualiza é multiplicada por este número. Mudar isto poderá ter efeitos negativos, como aumentar a velocidade ou causar problemas na funcionalidade vital de jogo que não esteja à espera que isto mude! + + + Enable Shaders Dumping:\nFor the sake of technical debugging, saves the games shaders to a folder as they render. + Ativar Dumping de Shaders:\nArmazena as shaders do jogo numa pasta durante a renderização para fins de depuração técnica. + + + Enable Null GPU:\nFor the sake of technical debugging, disables game rendering as if there were no graphics card. + Ativar GPU NULL:\nDesativa a renderização do jogo para fins de depuração técnica, como se não existisse uma placa gráfica. + + + Enable HDR:\nEnables HDR in games that support it.\nYour monitor must have support for the BT2020 PQ color space and the RGB10A2 swapchain format. + Ativar HDR:\nAtiva o HDR em jogos que o suportem.\nO seu monitor deverá ter suporte para o espaço de cores BT2020 PQ e para o formato de swapchain RGB10A2. + + + Game Folders:\nThe list of folders to check for installed games. + Pastas de Jogos:\nLista de pastas onde procurar jogos instalados. + + + Add:\nAdd a folder to the list. + Adicionar:\nAdicionar uma pasta à lista. + + + Remove:\nRemove a folder from the list. + Remover:\nRemover uma pasta da lista. + + + Enable Debug Dumping:\nSaves the import and export symbols and file header information of the currently running PS4 program to a directory. + Ativar Dumping da Depuração:\nArmazena os símbolos de importação, exportação e informações do cabeçalho de ficheiros do atual programa PS4 num diretório. + + + Enable Vulkan Validation Layers:\nEnables a system that validates the state of the Vulkan renderer and logs information about its internal state.\nThis will reduce performance and likely change the behavior of emulation. + Ativar Camadas de Validação do Vulkan:\nAtiva um sistema que valida o estado do renderizador Vulkan e regista informações sobre o seu estado interno.\nIsto irá diminuir o desempenho e provavelmente mudará o comportamento da emulação. + + + Enable Vulkan Synchronization Validation:\nEnables a system that validates the timing of Vulkan rendering tasks.\nThis will reduce performance and likely change the behavior of emulation. + Ativar Validação da Sincronização do Vulkan:\nAtiva um sistema que valida o agendamento de tarefas de renderização Vulkan.\nIsto irá diminuir o desempenho e provavelmente mudará o comportamento da emulação. + + + Enable RenderDoc Debugging:\nIf enabled, the emulator will provide compatibility with Renderdoc to allow capture and analysis of the currently rendered frame. + Ativar Depuração por RenderDoc:\nSe ativado, o emulador fornecerá compatibilidade com o RenderDoc para permitir a captura e análise do quadro atualmente renderizado. + + + Collect Shaders:\nYou need this enabled to edit shaders with the debug menu (Ctrl + F10). + Recolher Shaders:\nIrá precisar desta opção ativada para editar shaders com o menu de depuração (Ctrl + F10). + + + Crash Diagnostics:\nCreates a .yaml file with info about the Vulkan state at the time of crashing.\nUseful for debugging 'Device lost' errors. If you have this enabled, you should enable Host AND Guest Debug Markers.\nDoes not work on Intel GPUs.\nYou need Vulkan Validation Layers enabled and the Vulkan SDK for this to work. + Diagnóstico de Falhas:\nCria um ficheiro .yaml com informações sobre o estado do Vulkan no momento da falha.\nÚtil para depuração de erros de 'Device lost'. Se isto estiver ativado, deverá ativar os Marcadores de Depuração de Host E DE Convidado.\nNão funciona em GPUs Intel.\nPrecisa também de ter as Camadas de Validação Vulkan ativadas e o Vulkan SDK instalado para funcionar. + + + Copy GPU Buffers:\nGets around race conditions involving GPU submits.\nMay or may not help with PM4 type 0 crashes. + Copiar Buffers da GPU:\nContorna condições de corrida envolvendo envios de GPU.\nPode ou não ajudar com bloqueios do PM4 tipo 0. + + + Host Debug Markers:\nInserts emulator-side information like markers for specific AMDGPU commands around Vulkan commands, as well as giving resources debug names.\nIf you have this enabled, you should enable Crash Diagnostics.\nUseful for programs like RenderDoc. + Marcadores de Depuração do Host:\nInsere informações vindas do lado do emulador como marcadores para comandos AMDGPU específicos em torno de comandos Vulkan, além de fornecer nomes de depuração aos recursos.\nSe isto estiver ativado, ative os Diagnósticos de Falha.\nÚtil para programas como o RenderDoc. + + + Guest Debug Markers:\nInserts any debug markers the game itself has added to the command buffer.\nIf you have this enabled, you should enable Crash Diagnostics.\nUseful for programs like RenderDoc. + Marcadores de Depuração do Cliente:\nInsere quaisquer marcadores de depuração que o próprio jogo adicionou ao buffer de comando.\nSe isto estiver ativado, ative os Diagnósticos de Falha.\nÚtil para programas como o RenderDoc. + + + Save Data Path:\nThe folder where game save data will be saved. + Caminho dos Dados Guardados:\nA pasta onde os dados de utilizador dos jogos serão guardados. + + + Browse:\nBrowse for a folder to set as the save data path. + Procurar:\nProcure uma pasta para definir como o caminho para guardar os dados. + + + Release + Lançamento + + + Nightly + Nightly + + + Set the volume of the background music. + Definir o volume da música de fundo. + + + Enable Motion Controls + Ativar Comandos de Movimento + + + Save Data Path + Caminho dos Dados Guardados + + + Browse + Procurar + + + async + assíncrono + + + sync + síncrono + + + Auto Select + Seleção Automática + + + Directory to install games + Diretório onde instalar os jogos + + + Directory to save data + Diretório onde guardar os dados + + + Video + Vídeo + + + Display Mode + Modo de Exibição + + + Windowed + Em Janela + + + Fullscreen + Ecrã inteiro + + + Fullscreen (Borderless) + Ecrã Inteiro (Sem Bordas) + + + Window Size + Tamanho da Janela + + + W: + L: + + + H: + A: + + + Separate Log Files + Separar Ficheiros de Registo + + + Separate Log Files:\nWrites a separate logfile for each game. + Separar Ficheiros de Registo:\nEscreve um ficheiro de registo para cada jogo. + + + Trophy Notification Position + Posição da Notificação do Troféu + + + Left + Esquerda + + + Right + Direita + + + Top + Acima + + + Bottom + Abaixo + + + Notification Duration + Duração da Notificação + + + Portable User Folder + Pasta de Utilizador Portátil + + + Create Portable User Folder from Common User Folder + Criar Pasta de Utilizador Portátil a partir da Pasta de Utilizador Comum + + + Portable user folder:\nStores shadPS4 settings and data that will be applied only to the shadPS4 build located in the current folder. Restart the app after creating the portable user folder to begin using it. + Pasta de utilizador portátil:\nArmazena as definições e dados do shadPS4 que serão aplicados apenas na compilação do shadPS4 localizada na pasta atual. Reinicie a aplicação após criar a pasta de utilizador portátil para começar a usá-la. + + + Cannot create portable user folder + Não é possível criar pasta de utilizador portátil + + + %1 already exists + %1 já existe + + + Portable user folder created + Pasta de utilizador portátil criada + + + %1 successfully created. + %1 criado com sucesso. + + + Open the custom trophy images/sounds folder:\nYou can add custom images to the trophies and an audio.\nAdd the files to custom_trophy with the following names:\ntrophy.wav OR trophy.mp3, bronze.png, gold.png, platinum.png, silver.png\nNote: The sound will only work in QT versions. + Abra a pasta de imagens/sons de troféus personalizados:\nPoderá adicionar imagens personalizadas aos troféus e um áudio.\nAdicione os arquivos na pasta custom_trophy com os seguintes nomes:\ntrophy.mp3 ou trophy.wav, bronze.png, gold.png, platinum.png, silver.png\nObservação: O som funcionará apenas nas versões Qt. + + + + TrophyViewer + + Trophy Viewer + Visualizador de Troféus + + + Select Game: + Escolha o Jogo: + + + Progress + Progresso + + + Show Earned Trophies + Mostrar Troféus Conquistados + + + Show Not Earned Trophies + Mostrar Troféus Não Conquistados + + + Show Hidden Trophies + Mostrar Troféus Ocultos + + + diff --git a/src/qt_gui/translations/ro_RO.ts b/src/qt_gui/translations/ro_RO.ts index 63df2ff80..18121a204 100644 --- a/src/qt_gui/translations/ro_RO.ts +++ b/src/qt_gui/translations/ro_RO.ts @@ -1,1664 +1,2089 @@ + - - - - 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... - - - - InstallDirSelect - - - shadPS4 - Choose directory - shadPS4 - Choose directory - - - - Select which directory you want to install to. - Select which directory you want to install to. - - - - 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 - - - - Trapaças / Patches - Coduri / Patch-uri - - - - SFO Viewer - SFO Viewer - - - - Trophy Viewer - Trophy Viewer - - - - Open Folder... - Deschide Folder... - - - - Open Game Folder - Deschide Folder Joc - - - - Open Save Data Folder - Deschide Folder Date Salvate - - - - Open Log Folder - Deschide Folder Jurnal - - - - Copy info... - Copy info... - - - - Copy Name - Copy Name - - - - Copy Serial - Copy Serial - - - - Copy All - Copy All - - - - Delete... - Delete... - - - - Delete Game - Delete Game - - - - Delete Update - Delete Update - - - - Delete DLC - Delete DLC - - - - Compatibility... - Compatibility... - - - - Update database - Update database - - - - View report - View report - - - - Submit a report - Submit a report - - - - Shortcut creation - Shortcut creation - - - - Shortcut created successfully! - Shortcut created successfully! - - - - Error - Error - - - - Error creating shortcut! - Error creating shortcut! - - - - Install PKG - Install PKG - - - - Game - Game - - - - requiresEnableSeparateUpdateFolder_MSG - This feature requires the 'Enable Separate Update Folder' config option to work. If you want to use this feature, please enable it. - - - - This game has no update to delete! - This game has no update to delete! - - - - Update - Update - - - - This game has no DLC to delete! - This game has no DLC to delete! - - - - DLC - DLC - - - - Delete %1 - Delete %1 - - - - Are you sure you want to delete %1's %2 directory? - Are you sure you want to delete %1's %2 directory? - - - - MainWindow - - - Open/Add Elf Folder - Open/Add Elf Folder - - - - Install Packages (PKG) - Install Packages (PKG) - - - - Boot Game - Boot Game - - - - Check for Updates - Verifică actualizările - - - - 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 - - - - Download Cheats/Patches - Descarcă Coduri / Patch-uri - - - - 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 - - - - Help - Ajutor - - - - 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 - - - - Enable Separate Update Folder - Enable Separate Update Folder - - - - Show Splash - Show Splash - - - - Is PS4 Pro - Is PS4 Pro - - - - Enable Discord Rich Presence - Activați Discord Rich Presence - - - - Username - Username - - - - Trophy Key - Trophy Key - - - - Trophy - Trophy - - - - Logger - Logger - - - - Log Type - Log Type - - - - Log Filter - Log Filter - - - - Input - Introducere - - - - Cursor - Cursor - - - - Hide Cursor - Ascunde cursorul - - - - Hide Cursor Idle Timeout - Timeout pentru ascunderea cursorului inactiv - - - - s - s - - - - Controller - Controler - - - - Back Button Behavior - Comportament buton înapoi - - - - 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 - - - - Paths - Trasee - - - - Game Folders - Dosare de joc - - - - Add... - Adaugă... - - - - Remove - Eliminare - - - - 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 - - - - Update - Actualizare - - - - Check for Updates at Startup - Verifică actualizări la pornire - - - - Update Channel - Canal de Actualizare - - - - Check for Updates - Verifică actualizări - - - - GUI Settings - Setări GUI - - - - Disable Trophy Pop-ups - Disable Trophy Pop-ups - - - - Play title music - Redă muzica titlului - - - - Update Compatibility Database On Startup - Update Compatibility Database On Startup - - - - Game Compatibility - Game Compatibility - - - - Display Compatibility Data - Display Compatibility Data - - - - Update Compatibility Database - Update Compatibility Database - - - - Volume - Volum - - - - Audio Backend - Audio Backend - - - - MainWindow - - - Game List - Lista jocurilor - - - - * 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! - Patch detectat! - - - - PKG and Game versions match: - Versiunile PKG și ale jocului sunt compatibile: - - - - Would you like to overwrite? - Doriți să suprascrieți? - - - - PKG Version %1 is older than installed version: - Versiunea PKG %1 este mai veche decât versiunea instalată: - - - - Game is installed: - Jocul este instalat: - - - - Would you like to install Patch: - Doriți să instalați patch-ul: - - - - DLC Installation - Instalare DLC - - - - Would you like to install DLC: %1? - Doriți să instalați DLC-ul: %1? - - - - DLC already installed: - DLC deja instalat: - - - - Game already installed - Jocul deja instalat - - - - 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 for - Cheats / Patches for - - - - 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. Dacă patch-ul nu apare, este posibil să nu existe pentru seria și versiunea specifică a jocului. - - - - 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. - - - - The game is in version: %1 - Jocul este în versiunea: %1 - - - - The downloaded patch only works on version: %1 - Patch-ul descărcat funcționează doar pe versiunea: %1 - - - - You may need to update your game. - Este posibil să trebuiască să actualizezi jocul tău. - - - - Incompatibility Notice - Avertizare de incompatibilitate - - - - 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: - - - - Can't apply cheats before the game is started - Nu poți aplica cheats înainte ca jocul să înceapă. - - - - SettingsDialog - - - Save - Salvează - - - - Apply - Aplică - - - - Restore Defaults - Restabilește Impozitivele - - - - Close - Închide - - - - Point your mouse at an option to display its description. - Indicați mouse-ul asupra unei opțiuni pentru a afișa descrierea acesteia. - - - - consoleLanguageGroupBox - Limba consolei:\nSetează limba pe care o folosește jocul PS4.\nSe recomandă să setezi această opțiune pe o limbă pe care jocul o suportă, ceea ce poate varia în funcție de regiune. - - - - emulatorLanguageGroupBox - Limba emulatorului:\nSetează limba interfeței utilizatorului a emulatorului. - - - - fullscreenCheckBox - Activează modul pe ecran complet:\nPune automat fereastra jocului în modul pe ecran complet.\nAceasta poate fi dezactivată apăsând tasta F11. - - - - separateUpdatesCheckBox - Enable Separate Update Folder:\nEnables installing game updates into a separate folder for easy management. - - - - showSplashCheckBox - Afișează ecranul de încărcare:\nAfișează ecranul de încărcare al jocului (o imagine specială) în timp ce jocul pornește. - - - - ps4proCheckBox - Este PS4 Pro:\nFace ca emulatorul să se comporte ca un PS4 PRO, ceea ce poate activa funcții speciale în jocurile care o suportă. - - - - discordRPCCheckbox - Activați Discord Rich Presence:\nAfișează pictograma emulatorului și informații relevante pe profilul dumneavoastră Discord. - - - - userName - Nume utilizator:\nSetează numele de utilizator al contului PS4, care poate fi afișat de unele jocuri. - - - - TrophyKey - Trophy Key:\nKey used to decrypt trophies. Must be obtained from your jailbroken console.\nMust contain only hex characters. - - - - logTypeGroupBox - Tip jurnal:\nSetează dacă să sincronizezi ieșirea ferestrei de jurnal pentru performanță. Aceasta poate avea efecte adverse asupra emulării. - - - - logFilter - Filtrul jurnalului:\nFiltrează jurnalul pentru a imprima doar informații specifice.\nExemple: "Core:Trace" "Lib.Pad:Debug Common.Filesystem:Error" "*:Critical" Niveluri: Trace, Debug, Info, Warning, Error, Critical - în această ordine, un nivel specific reduce toate nivelurile anterioare din listă și înregistrează toate nivelurile ulterioare. - - - - updaterGroupBox - Actualizare:\nRelease: Versiuni oficiale lansate în fiecare lună, care pot fi foarte învechite, dar sunt mai fiabile și testate.\nNightly: Versiuni de dezvoltare care conțin toate cele mai recente funcții și corecții, dar pot conține erori și sunt mai puțin stabile. - - - - GUIgroupBox - Redă muzica titlului:\nDacă un joc o suportă, activează redarea muzicii speciale când selectezi jocul în GUI. - - - - disableTrophycheckBox - Disable Trophy Pop-ups:\nDisable in-game trophy notifications. Trophy progress can still be tracked using the Trophy Viewer (right-click the game in the main window). - - - - hideCursorGroupBox - Ascunde cursorul:\nAlegeți când va dispărea cursorul:\nNiciodată: Vei vedea întotdeauna mouse-ul.\nInactiv: Setează un timp pentru a dispărea după inactivitate.\nÎntotdeauna: nu vei vedea niciodată mouse-ul. - - - - idleTimeoutGroupBox - Setați un timp pentru ca mouse-ul să dispară după ce a fost inactiv. - - - - backButtonBehaviorGroupBox - Comportamentul butonului înapoi:\nSetează butonul înapoi al controlerului să imite atingerea poziției specificate pe touchpad-ul PS4. - - - - enableCompatibilityCheckBox - Display Compatibility Data:\nDisplays game compatibility information in table view. Enable "Update Compatibility On Startup" to get up-to-date information. - - - - checkCompatibilityOnStartupCheckBox - Update Compatibility On Startup:\nAutomatically update the compatibility database when shadPS4 starts. - - - - updateCompatibilityButton - Update Compatibility Database:\nImmediately update the compatibility database. - - - - Never - Niciodată - - - - Idle - Inactiv - - - - Always - Întotdeauna - - - - Touchpad Left - Touchpad Stânga - - - - Touchpad Right - Touchpad Dreapta - - - - Touchpad Center - Centru Touchpad - - - - None - Niciunul - - - - graphicsAdapterGroupBox - Dispozitiv grafic:\nPe sistemele cu mai multe GPU-uri, alege GPU-ul pe care emulatorul îl va folosi din lista derulantă,\nsau selectează "Auto Select" pentru a-l determina automat. - - - - resolutionLayout - Lățime/Înălțime:\nSetează dimensiunea ferestrei emulatorului la lansare, care poate fi redimensionată în timpul jocului.\nAceasta este diferită de rezoluția din joc. - - - - heightDivider - Împărțitor Vblank:\nRata de cadre cu care emulatorul se reîmprospătează este multiplicată cu acest număr. Schimbarea acestuia poate avea efecte adverse, cum ar fi creșterea vitezei jocului sau distrugerea funcționalității critice a jocului care nu se așteaptă ca aceasta să se schimbe! - - - - dumpShadersCheckBox - Activează salvarea shaderelor:\nÎn scopuri de depanare tehnică, salvează shader-urile jocului într-un folder pe măsură ce sunt randate. - - - - nullGpuCheckBox - Activează GPU Null:\nÎn scopuri de depanare tehnică, dezactivează redarea jocului ca și cum nu ar exista o placă grafică. - - - - gameFoldersBox - Folderele jocurilor:\nLista folderelor pentru a verifica jocurile instalate. - - - - addFolderButton - Adăugați:\nAdăugați un folder la listă. - - - - removeFolderButton - Eliminați:\nÎndepărtați un folder din listă. - - - - debugDump - Activează salvarea pentru depanare:\nSalvează simbolurile de import și export și informațiile din antetul fișierului pentru aplicația PS4 care rulează în prezent într-un director. - - - - vkValidationCheckBox - Activează straturile de validare Vulkan:\nActivează un sistem care validează starea renderer-ului Vulkan și înregistrează informații despre starea sa internă. Aceasta va reduce performanța și probabil va schimba comportamentul emulării. - - - - vkSyncValidationCheckBox - Activează validarea sincronizării Vulkan:\nActivează un sistem care validează sincronizarea sarcinilor de redare Vulkan. Aceasta va reduce performanța și probabil va schimba comportamentul emulării. - - - - rdocCheckBox - Activează depanarea RenderDoc:\nDacă este activat, emulatorul va oferi compatibilitate cu Renderdoc pentru a permite capturarea și analiza cadrului redat în prezent. - - - - GameListFrame - - - Icon - Icon - - - - Name - Nume - - - - Serial - Serie - - - - Compatibility - Compatibility - - - - Region - Regiune - - - - Firmware - Firmware - - - - Size - Dimensiune - - - - Version - Versiune - - - - Path - Drum - - - - Play Time - Timp de Joacă - - - - Never Played - Never Played - - - - h - h - - - - m - m - - - - s - s - - - - Compatibility is untested - Compatibility is untested - - - - Game does not initialize properly / crashes the emulator - Game does not initialize properly / crashes the emulator - - - - Game boots, but only displays a blank screen - Game boots, but only displays a blank screen - - - - Game displays an image but does not go past the menu - Game displays an image but does not go past the menu - - - - Game has game-breaking glitches or unplayable performance - Game has game-breaking glitches or unplayable performance - - - - Game can be completed with playable performance and no major glitches - Game can be completed with playable performance and no major glitches - - - - CheckUpdate - - - Auto Updater - Actualizator automat - - - - Error - Eroare - - - - Network error: - Eroare de rețea: - - - - Failed to parse update information. - Nu s-au putut analiza informațiile de actualizare. - - - - No pre-releases found. - Nu au fost găsite pre-lansări. - - - - Invalid release data. - Datele versiunii sunt invalide. - - - - No download URL found for the specified asset. - Nu s-a găsit URL de descărcare pentru resursa specificată. - - - - Your version is already up to date! - Versiunea ta este deja actualizată! - - - - Update Available - Actualizare disponibilă - - - - Update Channel - Canal de Actualizare - - - - Current Version - Versiunea curentă - - - - Latest Version - Ultima versiune - - - - Do you want to update? - Doriți să actualizați? - - - - Show Changelog - Afișați jurnalul de modificări - - - - Check for Updates at Startup - Verifică actualizări la pornire - - - - Update - Actualizare - - - - No - Nu - - - - Hide Changelog - Ascunde jurnalul de modificări - - - - Changes - Modificări - - - - Network error occurred while trying to access the URL - A apărut o eroare de rețea în timpul încercării de a accesa URL-ul - - - - Download Complete - Descărcare completă - - - - The update has been downloaded, press OK to install. - Actualizarea a fost descărcată, apăsați OK pentru a instala. - - - - Failed to save the update file at - Nu s-a putut salva fișierul de actualizare la - - - - Starting Update... - Încep actualizarea... - - - - Failed to create the update script file - Nu s-a putut crea fișierul script de actualizare - - - - GameListUtils - - - B - B - - - - KB - KB - - - - MB - MB - - - - GB - GB - - - - TB - TB - - - \ No newline at end of file + + + AboutDialog + + About shadPS4 + Despre 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. + + + + CheatsPatches + + Cheats / Patches for + Cheats / Patches for + + + 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:\n + 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ă:\n + + + 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 + + + No Cheats found for this game in this version of the selected repository,try another repository or a different version of the game. + 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 + + + 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. + 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ă + + + 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. If the patch does not appear, it may be that it does not exist for the specific serial and version of the game. + 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. Dacă patch-ul nu apare, este posibil să nu existe pentru seria și versiunea specifică a jocului. + + + 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. + + + The game is in version: %1 + Jocul este în versiunea: %1 + + + The downloaded patch only works on version: %1 + Patch-ul descărcat funcționează doar pe versiunea: %1 + + + You may need to update your game. + Este posibil să trebuiască să actualizezi jocul tău. + + + Incompatibility Notice + Avertizare de incompatibilitate + + + 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: + + + Can't apply cheats before the game is started + Nu poți aplica cheats înainte ca jocul să înceapă. + + + Close + Închide + + + + CheckUpdate + + Auto Updater + Actualizator automat + + + Error + Eroare + + + Network error: + Eroare de rețea: + + + The Auto Updater allows up to 60 update checks per hour.\nYou have reached this limit. Please try again later. + Actualizatorul automat permite până la 60 de verificări de actualizare pe oră.\nAți atins această limită. Vă rugăm să încercați din nou mai târziu. + + + Failed to parse update information. + Nu s-au putut analiza informațiile de actualizare. + + + No pre-releases found. + Nu au fost găsite pre-lansări. + + + Invalid release data. + Datele versiunii sunt invalide. + + + No download URL found for the specified asset. + Nu s-a găsit URL de descărcare pentru resursa specificată. + + + Your version is already up to date! + Versiunea ta este deja actualizată! + + + Update Available + Actualizare disponibilă + + + Update Channel + Canal de Actualizare + + + Current Version + Versiunea curentă + + + Latest Version + Ultima versiune + + + Do you want to update? + Doriți să actualizați? + + + Show Changelog + Afișați jurnalul de modificări + + + Check for Updates at Startup + Verifică actualizări la pornire + + + Update + Actualizare + + + No + Nu + + + Hide Changelog + Ascunde jurnalul de modificări + + + Changes + Modificări + + + Network error occurred while trying to access the URL + A apărut o eroare de rețea în timpul încercării de a accesa URL-ul + + + Download Complete + Descărcare completă + + + The update has been downloaded, press OK to install. + Actualizarea a fost descărcată, apăsați OK pentru a instala. + + + Failed to save the update file at + Nu s-a putut salva fișierul de actualizare la + + + Starting Update... + Încep actualizarea... + + + Failed to create the update script file + Nu s-a putut crea fișierul script de actualizare + + + + CompatibilityInfoClass + + Fetching compatibility data, please wait + Se colectează datele de compatibilitate, vă rugăm să așteptați + + + Cancel + Anulează + + + Loading... + Se încarcă... + + + Error + Eroare + + + Unable to update compatibility data! Try again later. + Nu se poate actualiza datele de compatibilitate! Încercați din nou mai târziu. + + + Unable to open compatibility_data.json for writing. + Nu se poate deschide compatibility_data.json pentru scriere. + + + Unknown + Necunoscut + + + Nothing + Nimic + + + Boots + Botine + + + Menus + Meniuri + + + Ingame + În joc + + + Playable + Jucabil + + + + ControlSettings + + Configure Controls + Configure Controls + + + D-Pad + D-Pad + + + Up + Up + + + Left + Left + + + Right + Right + + + Down + Down + + + Left Stick Deadzone (def:2 max:127) + Left Stick Deadzone (def:2 max:127) + + + Left Deadzone + Left Deadzone + + + Left Stick + Left Stick + + + Config Selection + Config Selection + + + Common Config + Common Config + + + Use per-game configs + Use per-game configs + + + L1 / LB + L1 / LB + + + L2 / LT + L2 / LT + + + Back + Back + + + R1 / RB + R1 / RB + + + R2 / RT + R2 / RT + + + L3 + L3 + + + Options / Start + Options / Start + + + R3 + R3 + + + Face Buttons + Face Buttons + + + Triangle / Y + Triangle / Y + + + Square / X + Square / X + + + Circle / B + Circle / B + + + Cross / A + Cross / A + + + Right Stick Deadzone (def:2, max:127) + Right Stick Deadzone (def:2, max:127) + + + Right Deadzone + Right Deadzone + + + Right Stick + Right Stick + + + Color Adjustment + Color Adjustment + + + R: + R: + + + G: + G: + + + B: + B: + + + Override Lightbar Color + Override Lightbar Color + + + Override Color + Override Color + + + Unable to Save + Unable to Save + + + Cannot bind axis values more than once + Cannot bind axis values more than once + + + Save + Save + + + Apply + Apply + + + Restore Defaults + Restore Defaults + + + Cancel + Cancel + + + + EditorDialog + + Edit Keyboard + Mouse and Controller input bindings + Edit Keyboard + Mouse and Controller input bindings + + + Use Per-Game configs + Use Per-Game configs + + + Error + Error + + + Could not open the file for reading + Could not open the file for reading + + + Could not open the file for writing + Could not open the file for writing + + + Save Changes + Save Changes + + + Do you want to save changes? + Do you want to save changes? + + + Help + Help + + + Do you want to reset your custom default config to the original default config? + Do you want to reset your custom default config to the original default config? + + + Do you want to reset this config to your custom default config? + Do you want to reset this config to your custom default config? + + + Reset to Default + Reset to Default + + + + 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 + + + Directory to install DLC + Director pentru a instala DLC + + + + GameListFrame + + Icon + Icon + + + Name + Nume + + + Serial + Serie + + + Compatibility + Compatibility + + + Region + Regiune + + + Firmware + Firmware + + + Size + Dimensiune + + + Version + Versiune + + + Path + Drum + + + Play Time + Timp de Joacă + + + Never Played + Never Played + + + h + h + + + m + m + + + s + s + + + Compatibility is untested + Compatibility is untested + + + Game does not initialize properly / crashes the emulator + Game does not initialize properly / crashes the emulator + + + Game boots, but only displays a blank screen + Game boots, but only displays a blank screen + + + Game displays an image but does not go past the menu + Game displays an image but does not go past the menu + + + Game has game-breaking glitches or unplayable performance + Game has game-breaking glitches or unplayable performance + + + Game can be completed with playable performance and no major glitches + Game can be completed with playable performance and no major glitches + + + Click to see details on github + Faceți clic pentru a vedea detalii pe GitHub + + + Last updated + Ultima actualizare + + + + GameListUtils + + B + B + + + KB + KB + + + MB + MB + + + GB + GB + + + TB + TB + + + + GuiContextMenus + + Create Shortcut + Create Shortcut + + + Cheats / Patches + Cheats / Patches + + + SFO Viewer + SFO Viewer + + + Trophy Viewer + Trophy Viewer + + + Open Folder... + Deschide Folder... + + + Open Game Folder + Deschide Folder Joc + + + Open Save Data Folder + Deschide Folder Date Salvate + + + Open Log Folder + Deschide Folder Jurnal + + + Copy info... + Copy info... + + + Copy Name + Copy Name + + + Copy Serial + Copy Serial + + + Copy Version + Copy Version + + + Copy Size + Copy Size + + + Copy All + Copy All + + + Delete... + Delete... + + + Delete Game + Delete Game + + + Delete Update + Delete Update + + + Delete DLC + Delete DLC + + + Delete Trophy + Delete Trophy + + + Compatibility... + Compatibility... + + + Update database + Update database + + + View report + View report + + + Submit a report + Submit a report + + + Shortcut creation + Shortcut creation + + + Shortcut created successfully! + Shortcut created successfully! + + + Error + Error + + + Error creating shortcut! + Error creating shortcut! + + + Game + Game + + + This game has no update to delete! + This game has no update to delete! + + + Update + Update + + + This game has no DLC to delete! + This game has no DLC to delete! + + + DLC + DLC + + + Delete %1 + Delete %1 + + + Are you sure you want to delete %1's %2 directory? + Are you sure you want to delete %1's %2 directory? + + + Open Update Folder + Open Update Folder + + + Delete Save Data + Șterge Salvare Date + + + This game has no update folder to open! + Acest joc nu are folderul de actualizări pentru a fi deschis! + + + No log file found for this game! + No log file found for this game! + + + Failed to convert icon. + Failed to convert icon. + + + This game has no save data to delete! + This game has no save data to delete! + + + This game has no saved trophies to delete! + This game has no saved trophies to delete! + + + Save Data + Save Data + + + Trophy + Trophy + + + SFO Viewer for + SFO Viewer for + + + + HelpDialog + + Quickstart + Quickstart + + + FAQ + FAQ + + + Syntax + Syntax + + + Special Bindings + Special Bindings + + + Keybindings + Keybindings + + + + KBMSettings + + Configure Controls + Configure Controls + + + D-Pad + D-Pad + + + Up + Up + + + unmapped + unmapped + + + Left + Left + + + Right + Right + + + Down + Down + + + Left Analog Halfmode + Left Analog Halfmode + + + hold to move left stick at half-speed + hold to move left stick at half-speed + + + Left Stick + Left Stick + + + Config Selection + Config Selection + + + Common Config + Common Config + + + Use per-game configs + Use per-game configs + + + L1 + L1 + + + L2 + L2 + + + Text Editor + Text Editor + + + Help + Help + + + R1 + R1 + + + R2 + R2 + + + L3 + L3 + + + Touchpad Click + Touchpad Click + + + Mouse to Joystick + Mouse to Joystick + + + *press F7 ingame to activate + *press F7 ingame to activate + + + R3 + R3 + + + Options + Options + + + Mouse Movement Parameters + Mouse Movement Parameters + + + note: click Help Button/Special Keybindings for more information + note: click Help Button/Special Keybindings for more information + + + Face Buttons + Face Buttons + + + Triangle + Triangle + + + Square + Square + + + Circle + Circle + + + Cross + Cross + + + Right Analog Halfmode + Right Analog Halfmode + + + hold to move right stick at half-speed + hold to move right stick at half-speed + + + Right Stick + Right Stick + + + Speed Offset (def 0.125): + Speed Offset (def 0.125): + + + Copy from Common Config + Copy from Common Config + + + Deadzone Offset (def 0.50): + Deadzone Offset (def 0.50): + + + Speed Multiplier (def 1.0): + Speed Multiplier (def 1.0): + + + Common Config Selected + Common Config Selected + + + This button copies mappings from the Common Config to the currently selected profile, and cannot be used when the currently selected profile is the Common Config. + This button copies mappings from the Common Config to the currently selected profile, and cannot be used when the currently selected profile is the Common Config. + + + Copy values from Common Config + Copy values from Common Config + + + Do you want to overwrite existing mappings with the mappings from the Common Config? + Do you want to overwrite existing mappings with the mappings from the Common Config? + + + Unable to Save + Unable to Save + + + Cannot bind any unique input more than once + Cannot bind any unique input more than once + + + Press a key + Press a key + + + Cannot set mapping + Cannot set mapping + + + Mousewheel cannot be mapped to stick outputs + Mousewheel cannot be mapped to stick outputs + + + Save + Save + + + Apply + Apply + + + Restore Defaults + Restore Defaults + + + Cancel + Cancel + + + + MainWindow + + Open/Add Elf Folder + Open/Add Elf Folder + + + Boot Game + Boot Game + + + Check for Updates + Verifică actualizările + + + About shadPS4 + About shadPS4 + + + Configure... + Configure... + + + Recent Games + Recent Games + + + Open shadPS4 Folder + Open shadPS4 Folder + + + 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 + + + Download Cheats/Patches + Descarcă Coduri / Patch-uri + + + Dump Game List + Dump Game List + + + Trophy Viewer + Trophy Viewer + + + No games found. Please add your games to your library first. + No games found. Please add your games to your library first. + + + Search... + Search... + + + File + File + + + View + View + + + Game List Icons + Game List Icons + + + Game List Mode + Game List Mode + + + Settings + Settings + + + Utils + Utils + + + Themes + Themes + + + Help + Ajutor + + + Dark + Dark + + + Light + Light + + + Green + Green + + + Blue + Blue + + + Violet + Violet + + + toolBar + toolBar + + + Game List + Lista jocurilor + + + * 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: + + + 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! + + + Run Game + Run Game + + + Eboot.bin file not found + Eboot.bin file not found + + + Game is already running! + Game is already running! + + + shadPS4 + shadPS4 + + + Play + Play + + + Pause + Pause + + + Stop + Stop + + + Restart + Restart + + + Full Screen + Full Screen + + + Controllers + Controllers + + + Keyboard + Keyboard + + + Refresh List + Refresh List + + + Resume + Resume + + + Show Labels Under Icons + Show Labels Under Icons + + + + SettingsDialog + + Settings + Settings + + + General + General + + + System + System + + + Console Language + Console Language + + + Emulator Language + Emulator Language + + + Emulator + Emulator + + + Enable Separate Update Folder + Enable Separate Update Folder + + + Default tab when opening settings + Tab-ul implicit la deschiderea setărilor + + + Show Game Size In List + Afișează dimensiunea jocului în listă + + + Show Splash + Show Splash + + + Enable Discord Rich Presence + Activați Discord Rich Presence + + + Username + Username + + + Trophy Key + Trophy Key + + + Trophy + Trophy + + + Open the custom trophy images/sounds folder + Open the custom trophy images/sounds folder + + + Logger + Logger + + + Log Type + Log Type + + + Log Filter + Log Filter + + + Open Log Location + Deschide locația jurnalului + + + Input + Introducere + + + Cursor + Cursor + + + Hide Cursor + Ascunde cursorul + + + Hide Cursor Idle Timeout + Timeout pentru ascunderea cursorului inactiv + + + s + s + + + Controller + Controler + + + Back Button Behavior + Comportament buton înapoi + + + Graphics + Graphics + + + GUI + Interfață + + + User + Utilizator + + + Graphics Device + Graphics Device + + + Vblank Divider + Vblank Divider + + + Advanced + Advanced + + + Enable Shaders Dumping + Enable Shaders Dumping + + + Enable NULL GPU + Enable NULL GPU + + + Enable HDR + Enable HDR + + + Paths + Trasee + + + Game Folders + Dosare de joc + + + Add... + Adaugă... + + + Remove + Eliminare + + + 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 + + + Enable Crash Diagnostics + Enable Crash Diagnostics + + + Collect Shaders + Collect Shaders + + + Copy GPU Buffers + Copy GPU Buffers + + + Host Debug Markers + Host Debug Markers + + + Guest Debug Markers + Guest Debug Markers + + + Update + Actualizare + + + Check for Updates at Startup + Verifică actualizări la pornire + + + Always Show Changelog + Arată întotdeauna jurnalul modificărilor + + + Update Channel + Canal de Actualizare + + + Check for Updates + Verifică actualizări + + + GUI Settings + Setări GUI + + + Title Music + Title Music + + + Disable Trophy Notification + Disable Trophy Notification + + + Background Image + Background Image + + + Show Background Image + Show Background Image + + + Opacity + Opacity + + + Play title music + Redă muzica titlului + + + Update Compatibility Database On Startup + Update Compatibility Database On Startup + + + Game Compatibility + Game Compatibility + + + Display Compatibility Data + Display Compatibility Data + + + Update Compatibility Database + Update Compatibility Database + + + Volume + Volum + + + Save + Salvează + + + Apply + Aplică + + + Restore Defaults + Restabilește Impozitivele + + + Close + Închide + + + Point your mouse at an option to display its description. + Indicați mouse-ul asupra unei opțiuni pentru a afișa descrierea acesteia. + + + Console Language:\nSets the language that the PS4 game uses.\nIt's recommended to set this to a language the game supports, which will vary by region. + Limba consolei:\nSetează limba pe care o folosește jocul PS4.\nSe recomandă să setezi această opțiune pe o limbă pe care jocul o suportă, ceea ce poate varia în funcție de regiune. + + + Emulator Language:\nSets the language of the emulator's user interface. + Limba emulatorului:\nSetează limba interfeței utilizatorului a emulatorului. + + + Enable Separate Update Folder:\nEnables installing game updates into a separate folder for easy management.\nThis can be manually created by adding the extracted update to the game folder with the name "CUSA00000-UPDATE" where the CUSA ID matches the game's ID. + Enable Separate Update Folder:\nEnables installing game updates into a separate folder for easy management.\nThis can be manually created by adding the extracted update to the game folder with the name "CUSA00000-UPDATE" where the CUSA ID matches the game's ID. + + + Show Splash Screen:\nShows the game's splash screen (a special image) while the game is starting. + Afișează ecranul de încărcare:\nAfișează ecranul de încărcare al jocului (o imagine specială) în timp ce jocul pornește. + + + Enable Discord Rich Presence:\nDisplays the emulator icon and relevant information on your Discord profile. + Activați Discord Rich Presence:\nAfișează pictograma emulatorului și informații relevante pe profilul dumneavoastră Discord. + + + Username:\nSets the PS4's account username, which may be displayed by some games. + Nume utilizator:\nSetează numele de utilizator al contului PS4, care poate fi afișat de unele jocuri. + + + Trophy Key:\nKey used to decrypt trophies. Must be obtained from your jailbroken console.\nMust contain only hex characters. + Trophy Key:\nKey used to decrypt trophies. Must be obtained from your jailbroken console.\nMust contain only hex characters. + + + Log Type:\nSets whether to synchronize the output of the log window for performance. May have adverse effects on emulation. + Tip jurnal:\nSetează dacă să sincronizezi ieșirea ferestrei de jurnal pentru performanță. Aceasta poate avea efecte adverse asupra emulării. + + + Log Filter:\nFilters the log to only print specific information.\nExamples: "Core:Trace" "Lib.Pad:Debug Common.Filesystem:Error" "*:Critical"\nLevels: Trace, Debug, Info, Warning, Error, Critical - in this order, a specific level silences all levels preceding it in the list and logs every level after it. + Filtrul jurnalului:\nFiltrează jurnalul pentru a imprima doar informații specifice.\nExemple: "Core:Trace" "Lib.Pad:Debug Common.Filesystem:Error" "*:Critical" Niveluri: Trace, Debug, Info, Warning, Error, Critical - în această ordine, un nivel specific reduce toate nivelurile anterioare din listă și înregistrează toate nivelurile ulterioare. + + + Update:\nRelease: Official versions released every month that may be very outdated, but are more reliable and tested.\nNightly: Development versions that have all the latest features and fixes, but may contain bugs and are less stable. + Actualizare:\nRelease: Versiuni oficiale lansate în fiecare lună, care pot fi foarte învechite, dar sunt mai fiabile și testate.\nNightly: Versiuni de dezvoltare care conțin toate cele mai recente funcții și corecții, dar pot conține erori și sunt mai puțin stabile. + + + Background Image:\nControl the opacity of the game background image. + Background Image:\nControl the opacity of the game background image. + + + Play Title Music:\nIf a game supports it, enable playing special music when selecting the game in the GUI. + Redă muzica titlului:\nDacă un joc o suportă, activează redarea muzicii speciale când selectezi jocul în GUI. + + + Disable Trophy Pop-ups:\nDisable in-game trophy notifications. Trophy progress can still be tracked using the Trophy Viewer (right-click the game in the main window). + Disable Trophy Pop-ups:\nDisable in-game trophy notifications. Trophy progress can still be tracked using the Trophy Viewer (right-click the game in the main window). + + + Hide Cursor:\nChoose when the cursor will disappear:\nNever: You will always see the mouse.\nidle: Set a time for it to disappear after being idle.\nAlways: you will never see the mouse. + Ascunde cursorul:\nAlegeți când va dispărea cursorul:\nNiciodată: Vei vedea întotdeauna mouse-ul.\nInactiv: Setează un timp pentru a dispărea după inactivitate.\nÎntotdeauna: nu vei vedea niciodată mouse-ul. + + + Hide Idle Cursor Timeout:\nThe duration (seconds) after which the cursor that has been idle hides itself. + Setați un timp pentru ca mouse-ul să dispară după ce a fost inactiv. + + + Back Button Behavior:\nSets the controller's back button to emulate tapping the specified position on the PS4 touchpad. + Comportamentul butonului înapoi:\nSetează butonul înapoi al controlerului să imite atingerea poziției specificate pe touchpad-ul PS4. + + + Display Compatibility Data:\nDisplays game compatibility information in table view. Enable "Update Compatibility On Startup" to get up-to-date information. + Display Compatibility Data:\nDisplays game compatibility information in table view. Enable "Update Compatibility On Startup" to get up-to-date information. + + + Update Compatibility On Startup:\nAutomatically update the compatibility database when shadPS4 starts. + Update Compatibility On Startup:\nAutomatically update the compatibility database when shadPS4 starts. + + + Update Compatibility Database:\nImmediately update the compatibility database. + Update Compatibility Database:\nImmediately update the compatibility database. + + + Never + Niciodată + + + Idle + Inactiv + + + Always + Întotdeauna + + + Touchpad Left + Touchpad Stânga + + + Touchpad Right + Touchpad Dreapta + + + Touchpad Center + Centru Touchpad + + + None + Niciunul + + + Graphics Device:\nOn multiple GPU systems, select the GPU the emulator will use from the drop down list,\nor select "Auto Select" to automatically determine it. + Dispozitiv grafic:\nPe sistemele cu mai multe GPU-uri, alege GPU-ul pe care emulatorul îl va folosi din lista derulantă,\nsau selectează "Auto Select" pentru a-l determina automat. + + + Width/Height:\nSets the size of the emulator window at launch, which can be resized during gameplay.\nThis is different from the in-game resolution. + Lățime/Înălțime:\nSetează dimensiunea ferestrei emulatorului la lansare, care poate fi redimensionată în timpul jocului.\nAceasta este diferită de rezoluția din joc. + + + Vblank Divider:\nThe frame rate at which the emulator refreshes at is multiplied by this number. Changing this may have adverse effects, such as increasing the game speed, or breaking critical game functionality that does not expect this to change! + Împărțitor Vblank:\nRata de cadre cu care emulatorul se reîmprospătează este multiplicată cu acest număr. Schimbarea acestuia poate avea efecte adverse, cum ar fi creșterea vitezei jocului sau distrugerea funcționalității critice a jocului care nu se așteaptă ca aceasta să se schimbe! + + + Enable Shaders Dumping:\nFor the sake of technical debugging, saves the games shaders to a folder as they render. + Activează salvarea shaderelor:\nÎn scopuri de depanare tehnică, salvează shader-urile jocului într-un folder pe măsură ce sunt randate. + + + Enable Null GPU:\nFor the sake of technical debugging, disables game rendering as if there were no graphics card. + Activează GPU Null:\nÎn scopuri de depanare tehnică, dezactivează redarea jocului ca și cum nu ar exista o placă grafică. + + + Enable HDR:\nEnables HDR in games that support it.\nYour monitor must have support for the BT2020 PQ color space and the RGB10A2 swapchain format. + Enable HDR:\nEnables HDR in games that support it.\nYour monitor must have support for the BT2020 PQ color space and the RGB10A2 swapchain format. + + + Game Folders:\nThe list of folders to check for installed games. + Folderele jocurilor:\nLista folderelor pentru a verifica jocurile instalate. + + + Add:\nAdd a folder to the list. + Adăugați:\nAdăugați un folder la listă. + + + Remove:\nRemove a folder from the list. + Eliminați:\nÎndepărtați un folder din listă. + + + Enable Debug Dumping:\nSaves the import and export symbols and file header information of the currently running PS4 program to a directory. + Activează salvarea pentru depanare:\nSalvează simbolurile de import și export și informațiile din antetul fișierului pentru aplicația PS4 care rulează în prezent într-un director. + + + Enable Vulkan Validation Layers:\nEnables a system that validates the state of the Vulkan renderer and logs information about its internal state.\nThis will reduce performance and likely change the behavior of emulation. + Activează straturile de validare Vulkan:\nActivează un sistem care validează starea renderer-ului Vulkan și înregistrează informații despre starea sa internă. Aceasta va reduce performanța și probabil va schimba comportamentul emulării. + + + Enable Vulkan Synchronization Validation:\nEnables a system that validates the timing of Vulkan rendering tasks.\nThis will reduce performance and likely change the behavior of emulation. + Activează validarea sincronizării Vulkan:\nActivează un sistem care validează sincronizarea sarcinilor de redare Vulkan. Aceasta va reduce performanța și probabil va schimba comportamentul emulării. + + + Enable RenderDoc Debugging:\nIf enabled, the emulator will provide compatibility with Renderdoc to allow capture and analysis of the currently rendered frame. + Activează depanarea RenderDoc:\nDacă este activat, emulatorul va oferi compatibilitate cu Renderdoc pentru a permite capturarea și analiza cadrului redat în prezent. + + + Collect Shaders:\nYou need this enabled to edit shaders with the debug menu (Ctrl + F10). + Collect Shaders:\nYou need this enabled to edit shaders with the debug menu (Ctrl + F10). + + + Crash Diagnostics:\nCreates a .yaml file with info about the Vulkan state at the time of crashing.\nUseful for debugging 'Device lost' errors. If you have this enabled, you should enable Host AND Guest Debug Markers.\nDoes not work on Intel GPUs.\nYou need Vulkan Validation Layers enabled and the Vulkan SDK for this to work. + Crash Diagnostics:\nCreates a .yaml file with info about the Vulkan state at the time of crashing.\nUseful for debugging 'Device lost' errors. If you have this enabled, you should enable Host AND Guest Debug Markers.\nDoes not work on Intel GPUs.\nYou need Vulkan Validation Layers enabled and the Vulkan SDK for this to work. + + + Copy GPU Buffers:\nGets around race conditions involving GPU submits.\nMay or may not help with PM4 type 0 crashes. + Copy GPU Buffers:\nGets around race conditions involving GPU submits.\nMay or may not help with PM4 type 0 crashes. + + + Host Debug Markers:\nInserts emulator-side information like markers for specific AMDGPU commands around Vulkan commands, as well as giving resources debug names.\nIf you have this enabled, you should enable Crash Diagnostics.\nUseful for programs like RenderDoc. + Host Debug Markers:\nInserts emulator-side information like markers for specific AMDGPU commands around Vulkan commands, as well as giving resources debug names.\nIf you have this enabled, you should enable Crash Diagnostics.\nUseful for programs like RenderDoc. + + + Guest Debug Markers:\nInserts any debug markers the game itself has added to the command buffer.\nIf you have this enabled, you should enable Crash Diagnostics.\nUseful for programs like RenderDoc. + Guest Debug Markers:\nInserts any debug markers the game itself has added to the command buffer.\nIf you have this enabled, you should enable Crash Diagnostics.\nUseful for programs like RenderDoc. + + + Save Data Path:\nThe folder where game save data will be saved. + Save Data Path:\nThe folder where game save data will be saved. + + + Browse:\nBrowse for a folder to set as the save data path. + Browse:\nBrowse for a folder to set as the save data path. + + + Release + Release + + + Nightly + Nightly + + + Set the volume of the background music. + Set the volume of the background music. + + + Enable Motion Controls + Enable Motion Controls + + + Save Data Path + Save Data Path + + + Browse + Browse + + + async + async + + + sync + sync + + + Auto Select + Auto Select + + + Directory to install games + Directory to install games + + + Directory to save data + Directory to save data + + + Video + Video + + + Display Mode + Display Mode + + + Windowed + Windowed + + + Fullscreen + Fullscreen + + + Fullscreen (Borderless) + Fullscreen (Borderless) + + + Window Size + Window Size + + + W: + W: + + + H: + H: + + + Separate Log Files + Separate Log Files + + + Separate Log Files:\nWrites a separate logfile for each game. + Separate Log Files:\nWrites a separate logfile for each game. + + + Trophy Notification Position + Trophy Notification Position + + + Left + Left + + + Right + Right + + + Top + Top + + + Bottom + Bottom + + + Notification Duration + Notification Duration + + + Portable User Folder + Portable User Folder + + + Create Portable User Folder from Common User Folder + Create Portable User Folder from Common User Folder + + + Portable user folder:\nStores shadPS4 settings and data that will be applied only to the shadPS4 build located in the current folder. Restart the app after creating the portable user folder to begin using it. + Portable user folder:\nStores shadPS4 settings and data that will be applied only to the shadPS4 build located in the current folder. Restart the app after creating the portable user folder to begin using it. + + + Cannot create portable user folder + Cannot create portable user folder + + + %1 already exists + %1 already exists + + + Portable user folder created + Portable user folder created + + + %1 successfully created. + %1 successfully created. + + + Open the custom trophy images/sounds folder:\nYou can add custom images to the trophies and an audio.\nAdd the files to custom_trophy with the following names:\ntrophy.wav OR trophy.mp3, bronze.png, gold.png, platinum.png, silver.png\nNote: The sound will only work in QT versions. + Open the custom trophy images/sounds folder:\nYou can add custom images to the trophies and an audio.\nAdd the files to custom_trophy with the following names:\ntrophy.wav OR trophy.mp3, bronze.png, gold.png, platinum.png, silver.png\nNote: The sound will only work in QT versions. + + + + TrophyViewer + + Trophy Viewer + Trophy Viewer + + + Select Game: + Select Game: + + + Progress + Progress + + + Show Earned Trophies + Show Earned Trophies + + + Show Not Earned Trophies + Show Not Earned Trophies + + + Show Hidden Trophies + Show Hidden Trophies + + + diff --git a/src/qt_gui/translations/ru_RU.ts b/src/qt_gui/translations/ru_RU.ts index 88eff1aeb..3944af589 100644 --- a/src/qt_gui/translations/ru_RU.ts +++ b/src/qt_gui/translations/ru_RU.ts @@ -1,1664 +1,2089 @@ + - - - - AboutDialog - - - About shadPS4 - О shadPS4 - - - - shadPS4 - shadPS4 - - - - 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. - Это програмное обеспечение не должно использоваться для запуска игр, которые вы получили нелегально. - - - - ElfViewer - - - Open Folder - Открыть папку - - - - GameInfoClass - - - Loading game list, please wait :3 - Загрузка списка игр, пожалуйста подождите :3 - - - - Cancel - Отмена - - - - Loading... - Загрузка... - - - - InstallDirSelect - - - shadPS4 - Choose directory - shadPS4 - Выберите папку - - - - Select which directory you want to install to. - Выберите папку, в которую вы хотите установить. - - - - GameInstallDialog - - - shadPS4 - Choose directory - shadPS4 - Выберите папку - - - - Directory to install games - Папка для установки игр - - - - Browse - Обзор - - - - Error - Ошибка - - - - The value for location to install games is not valid. - Недопустимое значение местоположения для установки игр. - - - - GuiContextMenus - - - Create Shortcut - Создать ярлык - - - - Cheats / Patches - Читы и патчи - - - - SFO Viewer - Просмотр SFO - - - - Trophy Viewer - Просмотр трофеев - - - - Open Folder... - Открыть папку... - - - - Open Game Folder - Открыть папку с игрой - - - - Open Save Data Folder - Открыть папку сохранений - - - - Open Log Folder - Открыть папку логов - - - - Copy info... - Копировать информацию... - - - - Copy Name - Копировать имя - - - - Copy Serial - Копировать серийный номер - - - - Copy All - Копировать все - - - - Delete... - Удаление... - - - - Delete Game - Удалить игру - - - - Delete Update - Удалить обновление - - - - Delete DLC - Удалить DLC - - - - Compatibility... - Совместимость... - - - - Update database - Обновить базу данных - - - - View report - Посмотреть отчет - - - - Submit a report - Отправить отчет - - - - Shortcut creation - Создание ярлыка - - - - Shortcut created successfully! - Ярлык создан успешно! - - - - Error - Ошибка - - - - Error creating shortcut! - Ошибка создания ярлыка! - - - - Install PKG - Установить PKG - - - - Game - Игры - - - - requiresEnableSeparateUpdateFolder_MSG - Эта функция требует включения настройки 'Отдельная папка обновлений'. Если вы хотите использовать эту функцию, пожалуйста включите её. - - - - This game has no update to delete! - У этой игры нет обновлений для удаления! - - - - Update - Обновления - - - - This game has no DLC to delete! - У этой игры нет DLC для удаления! - - - - DLC - DLC - - - - Delete %1 - Удалить %1 - - - - Are you sure you want to delete %1's %2 directory? - Вы уверены, что хотите удалить папку %2 %1? - - - - MainWindow - - - Open/Add Elf Folder - Открыть/Добавить папку Elf - - - - Install Packages (PKG) - Установить пакеты (PKG) - - - - Boot Game - Запустить игру - - - - Check for Updates - Проверить обновления - - - - About shadPS4 - О shadPS4 - - - - Configure... - Настроить... - - - - Install application from a .pkg file - Установить приложение из файла .pkg - - - - Recent Games - Недавние игры - - - - Exit - Выход - - - - Exit shadPS4 - Выйти из shadPS4 - - - - Exit the application. - Выйти из приложения. - - - - Show Game List - Показать список игр - - - - Game List Refresh - Обновить список игр - - - - Tiny - Крошечный - - - - Small - Маленький - - - - Medium - Средний - - - - Large - Большой - - - - List View - Список - - - - Grid View - Сетка - - - - Elf Viewer - Elf - - - - Game Install Directory - Каталог установки игры - - - - Download Cheats/Patches - Скачать читы или патчи - - - - Dump Game List - Дамп списка игр - - - - PKG Viewer - Просмотр PKG - - - - Search... - Поиск... - - - - File - Файл - - - - View - Вид - - - - Game List Icons - Размер иконок списка игр - - - - Game List Mode - Вид списка игр - - - - Settings - Настройки - - - - Utils - Утилиты - - - - Themes - Темы - - - - Help - Помощь - - - - Dark - Темная - - - - Light - Светлая - - - - Green - Зеленая - - - - Blue - Синяя - - - - Violet - Фиолетовая - - - - toolBar - Панель инструментов - - - - PKGViewer - - - Open Folder - Открыть папку - - - - TrophyViewer - - - Trophy Viewer - Просмотр трофеев - - - - SettingsDialog - - - Settings - Настройки - - - - General - Общее - - - - System - Система - - - - Console Language - Язык консоли - - - - Emulator Language - Язык эмулятора - - - - Emulator - Эмулятор - - - - Enable Fullscreen - Полноэкранный режим - - - - Enable Separate Update Folder - Отдельная папка обновлений - - - - Show Splash - Показывать заставку - - - - Is PS4 Pro - Режим PS4 Pro - - - - Enable Discord Rich Presence - Включить Discord Rich Presence - - - - Username - Имя пользователя - - - - Trophy Key - Trophy Key - - - - Trophy - Trophy - - - - Logger - Логирование - - - - Log Type - Тип логов - - - - Log Filter - Фильтр логов - - - - Input - Ввод - - - - Cursor - Курсор мыши - - - - Hide Cursor - Скрывать курсор - - - - Hide Cursor Idle Timeout - Время скрытия курсора при бездействии - - - - s - сек - - - - Controller - Контроллер - - - - Back Button Behavior - Поведение кнопки назад - - - - Graphics - Графика - - - - Graphics Device - Графическое устройство - - - - Width - Ширина - - - - Height - Высота - - - - Vblank Divider - Делитель Vblank - - - - Advanced - Продвинутые - - - - Enable Shaders Dumping - Включить дамп шейдеров - - - - Enable NULL GPU - Включить NULL GPU - - - - Paths - Пути - - - - Game Folders - Игровые папки - - - - Add... - Добавить... - - - - Remove - Удалить - - - - Debug - Отладка - - - - Enable Debug Dumping - Включить отладочные дампы - - - - Enable Vulkan Validation Layers - Включить слои валидации Vulkan - - - - Enable Vulkan Synchronization Validation - Включить валидацию синхронизации Vulkan - - - - Enable RenderDoc Debugging - Включить отладку RenderDoc - - - - Update - Обновление - - - - Check for Updates at Startup - Проверка при запуске - - - - Update Channel - Канал обновления - - - - Check for Updates - Проверить обновления - - - - GUI Settings - Интерфейс - - - - Disable Trophy Pop-ups - Отключить уведомления о трофеях - - - - Play title music - Играть заглавную музыку - - - - Update Compatibility Database On Startup - Обновлять базу совместимости при запуске - - - - Game Compatibility - Совместимость игр - - - - Display Compatibility Data - Показывать данные совместимости - - - - Update Compatibility Database - Обновить базу совместимости - - - - Volume - Громкость - - - - Audio Backend - Звуковая Подсистема - - - - MainWindow - - - Game List - Список игр - - - - * 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! - Обнаружен патч! - - - - PKG and Game versions match: - Версии PKG и игры совпадают: - - - - Would you like to overwrite? - Хотите перезаписать? - - - - PKG Version %1 is older than installed version: - Версия PKG %1 старее установленной версии: - - - - Game is installed: - Игра установлена: - - - - Would you like to install Patch: - Хотите установить патч: - - - - DLC Installation - Установка DLC - - - - Would you like to install DLC: %1? - Вы хотите установить DLC: %1? - - - - DLC already installed: - DLC уже установлен: - - - - Game already installed - Игра уже установлена - - - - 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 for - Читы и патчи для - - - - 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. - Не удалось разобрать данные JSON из HTML. - - - - Failed to retrieve HTML page. - Не удалось получить HTML-страницу. - - - - The game is in version: %1 - Игра в версии: %1 - - - - The downloaded patch only works on version: %1 - Скачанный патч работает только на версии: %1 - - - - You may need to update your game. - Вам может понадобиться обновить игру. - - - - Incompatibility Notice - Уведомление о несовместимости - - - - 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: - Имя: - - - - Can't apply cheats before the game is started - Невозможно применить читы до начала игры - - - - SettingsDialog - - - Save - Сохранить - - - - Apply - Применить - - - - Restore Defaults - По умолчанию - - - - Close - Закрыть - - - - Point your mouse at an option to display its description. - Наведите указатель мыши на опцию, чтобы отобразить ее описание. - - - - consoleLanguageGroupBox - Язык консоли:\nУстановите язык, который будет использоваться в играх PS4.\nРекомендуется устанавливать язык который поддерживается игрой, так как он может отличаться в зависимости от региона. - - - - emulatorLanguageGroupBox - Язык эмулятора:\nУстановите язык пользовательского интерфейса эмулятора. - - - - fullscreenCheckBox - Полноэкранный режим:\nАвтоматически переводит игровое окно в полноэкранный режим.\nВы можете отключить это, нажав клавишу F11. - - - - separateUpdatesCheckBox - Отдельная папка обновлений:\nПозволяет устанавливать обновления игры в отдельную папку для удобства. - - - - showSplashCheckBox - Показывать заставку:\nОтображает заставку игры (специальное изображение) во время запуска. - - - - ps4proCheckBox - Режим PS4 Pro:\nЗаставляет эмулятор работать как PS4 Pro, что может включить специальные функции в играх, поддерживающих это. - - - - discordRPCCheckbox - Включить Discord Rich Presence:\nОтображает значок эмулятора и соответствующую информацию в вашем профиле Discord. - - - - userName - Имя пользователя:\nУстановите имя пользователя аккаунта PS4. Это может отображаться в некоторых играх. - - - - TrophyKey - Trophy Key:\nKey used to decrypt trophies. Must be obtained from your jailbroken console.\nMust contain only hex characters. - - - - logTypeGroupBox - Тип логов:\nУстановите, синхронизировать ли вывод окна логов ради производительности. Это может негативно сказаться на эмуляции. - - - - logFilter - Фильтр логов:\nФильтрует логи, чтобы показывать только определенную информацию.\nПримеры: "Core:Trace" "Lib.Pad:Debug Common.Filesystem:Error" "*:Critical" Уровни: Trace, Debug, Info, Warning, Error, Critical - в этом порядке, конкретный уровень глушит все предыдущие уровни в списке и показывает все последующие уровни. - - - - updaterGroupBox - Обновление:\nRelease: Официальные версии, которые выпускаются каждый месяц и могут быть очень старыми, но они более надежные и проверенные.\nNightly: Версии разработки, которые содержат все последние функции и исправления, но могут содержать ошибки и менее стабильны. - - - - GUIgroupBox - Играть заглавную музыку:\nВключает воспроизведение специальной музыки при выборе игры в списке, если она это поддерживает. - - - - disableTrophycheckBox - Отключить уведомления о трофеях:\nОтключает внутриигровые уведомления о трофеях. Прогресс трофеев по прежнему можно отслеживать в меню Просмотр трофеев (правая кнопка мыши по игре в главном окне). - - - - hideCursorGroupBox - Скрывать курсор:\nВыберите, когда курсор будет скрыт:\nНикогда: Вы всегда будете видеть курсор.\nПри бездействии: Установите время, через которое курсор будет скрыт при бездействии.\nВсегда: Курсор всегда будет скрыт. - - - - idleTimeoutGroupBox - Установите время, через которое курсор исчезнет при бездействии. - - - - backButtonBehaviorGroupBox - Поведение кнопки «Назад»:\nНастраивает кнопку «Назад» контроллера на эмуляцию нажатия на указанную область на сенсорной панели контроллера PS4. - - - - enableCompatibilityCheckBox - Показывать данные совместимости:\nПоказывает информацию о совместимости игр в таблице. Включите «Обновлять базу совместимости при запуске» для получения актуальной информации. - - - - checkCompatibilityOnStartupCheckBox - Обновлять базу совместимости при запуске:\nАвтоматически обновлять базу данных совместимости при запуске shadPS4. - - - - updateCompatibilityButton - Обновить базу совместимости:\nНемедленно обновить базу данных совместимости. - - - - Never - Никогда - - - - Idle - При бездействии - - - - Always - Всегда - - - - Touchpad Left - Тачпад слева - - - - Touchpad Right - Тачпад справа - - - - Touchpad Center - Центр тачпада - - - - None - Нет - - - - graphicsAdapterGroupBox - Графическое устройство:\nВ системах с несколькими GPU выберите GPU, который будет использовать эмулятор.\nВыберите "Auto Select", чтобы определить его автоматически. - - - - resolutionLayout - Ширина/Высота:\nУстановите размер окна эмулятора при запуске, который может быть изменен во время игры.\nЭто отличается от разрешения в игре. - - - - heightDivider - Делитель Vblank:\nЧастота кадров, с которой обновляется эмулятор, умножается на это число. Изменение этого параметра может иметь негативные последствия, такие как увеличение скорости игры или нарушение критических функций игры, которые этого не ожидают! - - - - dumpShadersCheckBox - Включить дамп шейдеров:\nДля технической отладки сохраняет шейдеры игр в папку во время рендеринга. - - - - nullGpuCheckBox - Включить NULL GPU:\nДля технической отладки отключает рендеринг игры так, как будто графической карты нет. - - - - gameFoldersBox - Игровые папки:\nСписок папок для проверки установленных игр. - - - - addFolderButton - Добавить:\nДобавить папку в список. - - - - removeFolderButton - Удалить:\nУдалить папку из списка. - - - - debugDump - Включить отладочные дампы:\nСохраняет символы импорта, экспорта и информацию о заголовке файла текущей исполняемой программы PS4 в папку. - - - - vkValidationCheckBox - Включить слои валидации Vulkan:\nВключает систему, которая проверяет состояние рендерера Vulkan и логирует информацию о его внутреннем состоянии. Это снизит производительность и, вероятно, изменит поведение эмуляции. - - - - vkSyncValidationCheckBox - Включить валидацию синхронизации Vulkan:\nВключает систему, которая проверяет тайминг задач рендеринга Vulkan. Это снизит производительность и, вероятно, изменит поведение эмуляции. - - - - rdocCheckBox - Включить отладку RenderDoc:\nЕсли включено, эмулятор обеспечит совместимость с Renderdoc, позволяя захватывать и анализировать текущие кадры во время рендеринга. - - - - GameListFrame - - - Icon - Иконка - - - - Name - Название - - - - Serial - Серийный номер - - - - Compatibility - Совместимость - - - - Region - Регион - - - - Firmware - Прошивка - - - - Size - Размер - - - - Version - Версия - - - - Path - Путь - - - - Play Time - Времени в игре - - - - Never Played - Вы не играли - - - - h - ч - - - - m - м - - - - s - с - - - - Compatibility is untested - Совместимость не проверена - - - - Game does not initialize properly / crashes the emulator - Игра не иницализируется правильно / крашит эмулятор - - - - Game boots, but only displays a blank screen - Игра запускается, но показывает только пустой экран - - - - Game displays an image but does not go past the menu - Игра показывает картинку, но не проходит дальше меню - - - - Game has game-breaking glitches or unplayable performance - Игра имеет ломающие игру глюки или плохую производительность - - - - Game can be completed with playable performance and no major glitches - Игра может быть пройдена с хорошей производительностью и без серьезных сбоев - - - - CheckUpdate - - - Auto Updater - Автообновление - - - - Error - Ошибка - - - - Network error: - Сетевая ошибка: - - - - Failed to parse update information. - Не удалось разобрать информацию об обновлении. - - - - No pre-releases found. - Предварительных версий не найдено. - - - - Invalid release data. - Недопустимые данные релиза. - - - - No download URL found for the specified asset. - Не найден URL для загрузки указанного ресурса. - - - - Your version is already up to date! - Ваша версия уже обновлена! - - - - Update Available - Доступно обновление - - - - Update Channel - Канал обновления - - - - Current Version - Текущая версия - - - - Latest Version - Последняя версия - - - - Do you want to update? - Вы хотите обновиться? - - - - Show Changelog - Показать журнал изменений - - - - Check for Updates at Startup - Проверка при запуске - - - - Update - Обновить - - - - No - Нет - - - - Hide Changelog - Скрыть журнал изменений - - - - Changes - Журнал изменений - - - - Network error occurred while trying to access the URL - Произошла сетевая ошибка при попытке доступа к URL - - - - Download Complete - Скачивание завершено - - - - The update has been downloaded, press OK to install. - Обновление загружено, нажмите OK для установки. - - - - Failed to save the update file at - Не удалось сохранить файл обновления в - - - - Starting Update... - Начало обновления... - - - - Failed to create the update script file - Не удалось создать файл скрипта обновления - - - - GameListUtils - - - B - Б - - - - KB - КБ - - - - MB - МБ - - - - GB - ГБ - - - - TB - ТБ - - - \ No newline at end of file + + + AboutDialog + + About shadPS4 + О shadPS4 + + + 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. + Это программное обеспечение не должно использоваться для запуска игр, которые вы получили нелегально. + + + + CheatsPatches + + Cheats / Patches for + Читы и патчи для + + + 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:\n + Читы и патчи экспериментальны.\nИспользуйте с осторожностью.\n\nСкачивайте читы, выбрав репозиторий и нажав на кнопку загрузки.\nВо вкладке "Патчи" вы можете скачать все патчи сразу, выбирать какие вы хотите использовать, и сохранять выбор.\n\nПоскольку мы не разрабатываем читы/патчи,\nпожалуйста сообщайте о проблемах автору чита/патча.\n\nСоздали новый чит? Посетите:\n + + + 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 + Читы не найдены + + + 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 + Читы успешно скачаны + + + 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 download: + Не удалось скачать: + + + Download Complete + Скачивание завершено + + + 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. If the patch does not appear, it may be that it does not exist for the specific serial and version of the game. + Патчи успешно скачаны! Все доступные патчи для всех игр были скачаны, нет необходимости скачивать их по отдельности для каждой игры, как это происходит с читами. Если патч не появляется, возможно, его не существует для конкретного серийного номера и версии игры. + + + Failed to parse JSON data from HTML. + Не удалось разобрать данные JSON из HTML. + + + Failed to retrieve HTML page. + Не удалось получить HTML-страницу. + + + The game is in version: %1 + Игра в версии: %1 + + + The downloaded patch only works on version: %1 + Скачанный патч работает только на версии: %1 + + + You may need to update your game. + Вам может понадобиться обновить игру. + + + Incompatibility Notice + Уведомление о несовместимости + + + 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: + Имя: + + + Can't apply cheats before the game is started + Невозможно применить читы до начала игры + + + Close + Закрыть + + + + CheckUpdate + + Auto Updater + Автообновление + + + Error + Ошибка + + + Network error: + Сетевая ошибка: + + + The Auto Updater allows up to 60 update checks per hour.\nYou have reached this limit. Please try again later. + Автообновление позволяет выполнять до 60 проверок обновлений в час.\nВы достигли этого лимита. Пожалуйста, попробуйте позже. + + + Failed to parse update information. + Не удалось разобрать информацию об обновлении. + + + No pre-releases found. + Предварительных версий не найдено. + + + Invalid release data. + Недопустимые данные релиза. + + + No download URL found for the specified asset. + Не найден URL для загрузки указанного ресурса. + + + Your version is already up to date! + Ваша версия уже обновлена! + + + Update Available + Доступно обновление + + + Update Channel + Канал обновления + + + Current Version + Текущая версия + + + Latest Version + Последняя версия + + + Do you want to update? + Вы хотите обновиться? + + + Show Changelog + Показать журнал изменений + + + Check for Updates at Startup + Проверка при запуске + + + Update + Обновить + + + No + Нет + + + Hide Changelog + Скрыть журнал изменений + + + Changes + Журнал изменений + + + Network error occurred while trying to access the URL + Произошла сетевая ошибка при попытке доступа к URL + + + Download Complete + Скачивание завершено + + + The update has been downloaded, press OK to install. + Обновление загружено, нажмите OK для установки. + + + Failed to save the update file at + Не удалось сохранить файл обновления в + + + Starting Update... + Начинаем обновление... + + + Failed to create the update script file + Не удалось создать файл скрипта обновления + + + + CompatibilityInfoClass + + Fetching compatibility data, please wait + Загрузка данных о совместимости, пожалуйста, подождите + + + Cancel + Отмена + + + Loading... + Загрузка... + + + Error + Ошибка + + + Unable to update compatibility data! Try again later. + Не удалось обновить данные совместимости! Повторите попытку позже. + + + Unable to open compatibility_data.json for writing. + Не удалось открыть файл compatibility_data.json для записи. + + + Unknown + Неизвестно + + + Nothing + Ничего + + + Boots + Запускается + + + Menus + В меню + + + Ingame + В игре + + + Playable + Играбельно + + + + ControlSettings + + Configure Controls + Настроить управление + + + D-Pad + Крестовина + + + Up + Вверх + + + Left + Влево + + + Right + Вправо + + + Down + Вниз + + + Left Stick Deadzone (def:2 max:127) + Мёртвая зона левого стика (по умолч:2 макс:127) + + + Left Deadzone + Левая мёртвая зона + + + Left Stick + Левый стик + + + Config Selection + Выбор конфига + + + Common Config + Общий конфиг + + + Use per-game configs + Использовать настройки для каждой игры + + + L1 / LB + L1 / LB + + + L2 / LT + L2 / LT + + + Back + Назад + + + R1 / RB + R1 / RB + + + R2 / RT + R2 / RT + + + L3 + L3 + + + Options / Start + Options / Start + + + R3 + R3 + + + Face Buttons + Кнопки действий + + + Triangle / Y + Треугольник / Y + + + Square / X + Квадрат / X + + + Circle / B + Круг / B + + + Cross / A + Крест / A + + + Right Stick Deadzone (def:2, max:127) + Мёртвая зона правого стика (по умолч:2 макс:127) + + + Right Deadzone + Правая мёртвая зона + + + Right Stick + Правый стик + + + Color Adjustment + Настройка цвета + + + R: + R: + + + G: + G: + + + B: + B: + + + Override Lightbar Color + Заменить цвет световой панели + + + Override Color + Заменить цвет + + + Unable to Save + Не удаётся сохранить + + + Cannot bind axis values more than once + Невозможно привязать значения оси более одного раза + + + Save + Сохранить + + + Apply + Применить + + + Restore Defaults + По умолчанию + + + Cancel + Отмена + + + + EditorDialog + + Edit Keyboard + Mouse and Controller input bindings + Редактировать бинды клавиатуры + мыши и контроллера + + + Use Per-Game configs + Использовать настройки для каждой игры + + + Error + Ошибка + + + Could not open the file for reading + Не удалось открыть файл для чтения + + + Could not open the file for writing + Не удалось открыть файл для записи + + + Save Changes + Сохранить изменения + + + Do you want to save changes? + Хотите сохранить изменения? + + + Help + Помощь + + + Do you want to reset your custom default config to the original default config? + Хотите ли вы сбросить ваш пользовательский конфиг по умолчанию к первоначальному конфигу по умолчанию? + + + Do you want to reset this config to your custom default config? + Хотите ли вы сбросить этот конфиг к вашему пользовательскому конфигу по умолчанию? + + + Reset to Default + Сбросить по умолчанию + + + + ElfViewer + + Open Folder + Открыть папку + + + + GameInfoClass + + Loading game list, please wait :3 + Загрузка списка игр, пожалуйста подождите :3 + + + Cancel + Отмена + + + Loading... + Загрузка... + + + + GameInstallDialog + + shadPS4 - Choose directory + shadPS4 - Выберите папку + + + Directory to install games + Каталог для установки игр + + + Browse + Обзор + + + Error + Ошибка + + + Directory to install DLC + Каталог для установки DLC + + + + GameListFrame + + Icon + Иконка + + + Name + Название + + + Serial + Серийный номер + + + Compatibility + Совместимость + + + Region + Регион + + + Firmware + Прошивка + + + Size + Размер + + + Version + Версия + + + Path + Путь + + + Play Time + Время в игре + + + Never Played + Нет + + + h + ч + + + m + м + + + s + с + + + Compatibility is untested + Совместимость не проверена + + + Game does not initialize properly / crashes the emulator + Игра не инициализируется правильно / эмулятор вылетает + + + Game boots, but only displays a blank screen + Игра запускается, но показывает только пустой экран + + + Game displays an image but does not go past the menu + Игра показывает картинку, но не проходит дальше меню + + + Game has game-breaking glitches or unplayable performance + Игра имеет ломающие игру глюки или плохую производительность + + + Game can be completed with playable performance and no major glitches + Игра может быть пройдена с хорошей производительностью и без серьезных сбоев + + + Click to see details on github + Нажмите, чтобы увидеть детали на GitHub + + + Last updated + Последнее обновление + + + + GameListUtils + + B + Б + + + KB + КБ + + + MB + МБ + + + GB + ГБ + + + TB + ТБ + + + + GuiContextMenus + + Create Shortcut + Создать ярлык + + + Cheats / Patches + Читы и патчи + + + SFO Viewer + Просмотр SFO + + + Trophy Viewer + Просмотр трофеев + + + Open Folder... + Открыть папку... + + + Open Game Folder + Открыть папку с игрой + + + Open Save Data Folder + Открыть папку сохранений + + + Open Log Folder + Открыть папку логов + + + Copy info... + Копировать информацию... + + + Copy Name + Копировать имя + + + Copy Serial + Копировать серийный номер + + + Copy Version + Скопировать версию + + + Copy Size + Скопирать размер + + + Copy All + Копировать всё + + + Delete... + Удалить... + + + Delete Game + Удалить игру + + + Delete Update + Удалить обновление + + + Delete DLC + Удалить DLC + + + Delete Trophy + Удалить трофей + + + Compatibility... + Совместимость... + + + Update database + Обновить базу данных + + + View report + Посмотреть отчет + + + Submit a report + Отправить отчёт + + + Shortcut creation + Создание ярлыка + + + Shortcut created successfully! + Ярлык создан успешно! + + + Error + Ошибка + + + Error creating shortcut! + Ошибка создания ярлыка! + + + Game + Игры + + + This game has no update to delete! + У этой игры нет обновлений для удаления! + + + Update + Обновления + + + This game has no DLC to delete! + У этой игры нет DLC для удаления! + + + DLC + DLC + + + Delete %1 + Удалить %1 + + + Are you sure you want to delete %1's %2 directory? + Вы уверены, что хотите удалить папку %2 %1? + + + Open Update Folder + Открыть папку обновлений + + + Delete Save Data + Удалить сохранения + + + This game has no update folder to open! + У этой игры нет папки обновлений, которую можно открыть! + + + No log file found for this game! + Не найден файл логов для этой игры! + + + Failed to convert icon. + Не удалось преобразовать иконку. + + + This game has no save data to delete! + У этой игры нет сохранений, которые можно удалить! + + + This game has no saved trophies to delete! + У этой игры нет сохраненных трофеев для удаления! + + + Save Data + Сохранения + + + Trophy + Трофей + + + SFO Viewer for + Просмотр SFO для + + + + HelpDialog + + Quickstart + Быстрый старт + + + FAQ + ЧАВО + + + Syntax + Синтаксис + + + Special Bindings + Специальные бинды + + + Keybindings + Бинды клавиш + + + + KBMSettings + + Configure Controls + Настроить управление + + + D-Pad + Крестовина + + + Up + Вверх + + + unmapped + не назначено + + + Left + Влево + + + Right + Вправо + + + Down + Вниз + + + Left Analog Halfmode + Левый стик вполовину + + + hold to move left stick at half-speed + удерживайте для перемещения левого стика вполовину меньше + + + Left Stick + Левый стик + + + Config Selection + Выбор конфига + + + Common Config + Общий конфиг + + + Use per-game configs + Использовать настройки для каждой игры + + + L1 + L1 + + + L2 + L2 + + + Text Editor + Текстовый редактор + + + Help + Помощь + + + R1 + R1 + + + R2 + R2 + + + L3 + L3 + + + Touchpad Click + Нажатие на тачпад + + + Mouse to Joystick + Мышь в джойстик + + + *press F7 ingame to activate + *нажмите F7 в игре для активации + + + R3 + R3 + + + Options + Options + + + Mouse Movement Parameters + Параметры движения мыши + + + note: click Help Button/Special Keybindings for more information + примечание: нажмите кнопку Помощь/Специальные бинды для получения дополнительной информации + + + Face Buttons + Кнопки действий + + + Triangle + Треугольник + + + Square + Квадрат + + + Circle + Круг + + + Cross + Крест + + + Right Analog Halfmode + Правый стик вполовину + + + hold to move right stick at half-speed + удерживайте для перемещения правого стика вполовину меньше + + + Right Stick + Правый стик + + + Speed Offset (def 0.125): + Смещение скорости (по умолч 0.125): + + + Copy from Common Config + Копировать из общего конфига + + + Deadzone Offset (def 0.50): + Смещение мёртвой зоны (по умолч 0.50) + + + Speed Multiplier (def 1.0): + Множитель скорости (по умолч 1.0) + + + Common Config Selected + Выбран общий конфиг + + + This button copies mappings from the Common Config to the currently selected profile, and cannot be used when the currently selected profile is the Common Config. + Эта кнопка копирует настройки из общего конфига в текущий выбранный профиль, и не может быть использован, когда выбранный профиль это общий конфиг. + + + Copy values from Common Config + Копировать значения из общего конфига + + + Do you want to overwrite existing mappings with the mappings from the Common Config? + Вы хотите перезаписать существующие настройки настройками из общего конфига? + + + Unable to Save + Не удаётся сохранить + + + Cannot bind any unique input more than once + Невозможно привязать уникальный ввод более одного раза + + + Press a key + Нажмите кнопку + + + Cannot set mapping + Не удаётся задать настройки + + + Mousewheel cannot be mapped to stick outputs + Колесо не может быть назначено для вывода стиков + + + Save + Сохранить + + + Apply + Применить + + + Restore Defaults + По умолчанию + + + Cancel + Отмена + + + + MainWindow + + Open/Add Elf Folder + Открыть/Добавить папку Elf + + + Boot Game + Запустить игру + + + Check for Updates + Проверить обновления + + + About shadPS4 + О shadPS4 + + + Configure... + Настроить... + + + Recent Games + Недавние игры + + + Open shadPS4 Folder + Открыть папку shadPS4 + + + Exit + Выход + + + Exit shadPS4 + Выйти из shadPS4 + + + Exit the application. + Выйти из приложения. + + + Show Game List + Показать список игр + + + Game List Refresh + Обновить список игр + + + Tiny + Крошечный + + + Small + Маленький + + + Medium + Средний + + + Large + Большой + + + List View + Список + + + Grid View + Сетка + + + Elf Viewer + Исполняемый файл + + + Game Install Directory + Каталог установки игры + + + Download Cheats/Patches + Скачать читы или патчи + + + Dump Game List + Дамп списка игр + + + Trophy Viewer + Просмотр трофеев + + + No games found. Please add your games to your library first. + Не найдено ни одной игры. Пожалуйста, сначала добавьте игры в библиотеку. + + + Search... + Поиск... + + + File + Файл + + + View + Вид + + + Game List Icons + Размер иконок списка игр + + + Game List Mode + Вид списка игр + + + Settings + Настройки + + + Utils + Утилиты + + + Themes + Темы + + + Help + Помощь + + + Dark + Темная + + + Light + Светлая + + + Green + Зеленая + + + Blue + Синяя + + + Violet + Фиолетовая + + + toolBar + Панель инструментов + + + Game List + Список игр + + + * 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: + Игры: + + + ELF files (*.bin *.elf *.oelf) + Файлы ELF (*.bin *.elf *.oelf) + + + Game Boot + Запуск игры + + + Only one file can be selected! + Можно выбрать только один файл! + + + Run Game + Запустить игру + + + Eboot.bin file not found + Файл eboot.bin не найден + + + Game is already running! + Игра уже запущена! + + + shadPS4 + shadPS4 + + + Play + Играть + + + Pause + Пауза + + + Stop + Остановить + + + Restart + Перезапустить + + + Full Screen + Полный экран + + + Controllers + Контроллеры + + + Keyboard + Клавиатура + + + Refresh List + Обновить список + + + Resume + Продолжить + + + Show Labels Under Icons + Показывать метки под значками + + + + SettingsDialog + + Settings + Настройки + + + General + Общее + + + System + Система + + + Console Language + Язык консоли + + + Emulator Language + Язык эмулятора + + + Emulator + Эмулятор + + + Enable Separate Update Folder + Отдельная папка обновлений + + + Default tab when opening settings + Вкладка по умолчанию при открытии настроек + + + Show Game Size In List + Показать размер игры в списке + + + Show Splash + Показывать заставку + + + Enable Discord Rich Presence + Включить Discord Rich Presence + + + Username + Имя пользователя + + + Trophy Key + Ключ трофеев + + + Trophy + Трофеи + + + Open the custom trophy images/sounds folder + Открыть папку с пользовательскими изображениями/звуками трофеев + + + Logger + Логирование + + + Log Type + Тип логов + + + Log Filter + Фильтр логов + + + Open Log Location + Открыть местоположение логов + + + Input + Ввод + + + Cursor + Курсор мыши + + + Hide Cursor + Скрывать курсор + + + Hide Cursor Idle Timeout + Время скрытия курсора при бездействии + + + s + сек + + + Controller + Контроллер + + + Back Button Behavior + Поведение кнопки назад + + + Graphics + Графика + + + GUI + Интерфейс + + + User + Пользователь + + + Graphics Device + Графическое устройство + + + Vblank Divider + Делитель Vblank + + + Advanced + Продвинутые + + + Enable Shaders Dumping + Включить дамп шейдеров + + + Enable NULL GPU + Включить NULL GPU + + + Enable HDR + Включить HDR + + + Paths + Пути + + + Game Folders + Игровые папки + + + Add... + Добавить... + + + Remove + Удалить + + + Debug + Отладка + + + Enable Debug Dumping + Включить отладочные дампы + + + Enable Vulkan Validation Layers + Включить слои валидации Vulkan + + + Enable Vulkan Synchronization Validation + Включить валидацию синхронизации Vulkan + + + Enable RenderDoc Debugging + Включить отладку RenderDoc + + + Enable Crash Diagnostics + Включить диагностику сбоев + + + Collect Shaders + Собирать шейдеры + + + Copy GPU Buffers + Копировать буферы GPU + + + Host Debug Markers + Маркеры отладки хоста + + + Guest Debug Markers + Маркеры отладки гостя + + + Update + Обновление + + + Check for Updates at Startup + Проверка при запуске + + + Always Show Changelog + Всегда показывать журнал изменений + + + Update Channel + Канал обновления + + + Check for Updates + Проверить обновления + + + GUI Settings + Настройки интерфейса + + + Title Music + Заглавная музыка + + + Disable Trophy Notification + Отключить уведомления о трофее + + + Background Image + Фоновое изображение + + + Show Background Image + Показывать фоновое изображение + + + Opacity + Прозрачность + + + Play title music + Играть заглавную музыку + + + Update Compatibility Database On Startup + Обновлять базу совместимости при запуске + + + Game Compatibility + Совместимость игр + + + Display Compatibility Data + Показывать данные совместимости + + + Update Compatibility Database + Обновить базу совместимости + + + Volume + Громкость + + + Save + Сохранить + + + Apply + Применить + + + Restore Defaults + По умолчанию + + + Close + Закрыть + + + Point your mouse at an option to display its description. + Наведите указатель мыши на опцию, чтобы отобразить ее описание. + + + Console Language:\nSets the language that the PS4 game uses.\nIt's recommended to set this to a language the game supports, which will vary by region. + Язык консоли:\nУстанавливает язык, который будет использоваться в играх PS4.\nРекомендуется устанавливать язык, который поддерживается игрой, так как он может отличаться в зависимости от региона. + + + Emulator Language:\nSets the language of the emulator's user interface. + Язык эмулятора:\nУстанавливает язык пользовательского интерфейса эмулятора. + + + Enable Separate Update Folder:\nEnables installing game updates into a separate folder for easy management.\nThis can be manually created by adding the extracted update to the game folder with the name "CUSA00000-UPDATE" where the CUSA ID matches the game's ID. + Отдельная папка обновлений:\nПозволяет устанавливать обновления игры в отдельную папку для удобства.\nМожно создать вручную, добавив извлеченное обновление в папку с игрой с именем "CUSA00000-UPDATE", где идентификатор CUSA совпадает с идентификатором игры. + + + Show Splash Screen:\nShows the game's splash screen (a special image) while the game is starting. + Показывать заставку:\nОтображает заставку игры (специальное изображение) во время запуска. + + + Enable Discord Rich Presence:\nDisplays the emulator icon and relevant information on your Discord profile. + Включить Discord Rich Presence:\nОтображает значок эмулятора и соответствующую информацию в вашем профиле Discord. + + + Username:\nSets the PS4's account username, which may be displayed by some games. + Имя пользователя:\nУстанавливает имя пользователя аккаунта PS4. Это может отображаться в некоторых играх. + + + Trophy Key:\nKey used to decrypt trophies. Must be obtained from your jailbroken console.\nMust contain only hex characters. + Ключ трофеев:\nКлюч, используемый для расшифровки трофеев. Должен быть получен из вашей взломанной консоли.\nДолжен содержать только шестнадцатеричные символы. + + + Log Type:\nSets whether to synchronize the output of the log window for performance. May have adverse effects on emulation. + Тип логов:\nУстановите, синхронизировать ли вывод окна логов ради производительности. Это может негативно сказаться на эмуляции. + + + Log Filter:\nFilters the log to only print specific information.\nExamples: "Core:Trace" "Lib.Pad:Debug Common.Filesystem:Error" "*:Critical"\nLevels: Trace, Debug, Info, Warning, Error, Critical - in this order, a specific level silences all levels preceding it in the list and logs every level after it. + Фильтр логов:\nФильтрует логи, чтобы показывать только определенную информацию.\nПримеры: "Core:Trace" "Lib.Pad:Debug Common.Filesystem:Error" "*:Critical"\nУровни: Trace, Debug, Info, Warning, Error, Critical - в этом порядке, конкретный уровень глушит все предыдущие уровни в списке и показывает все последующие уровни. + + + Update:\nRelease: Official versions released every month that may be very outdated, but are more reliable and tested.\nNightly: Development versions that have all the latest features and fixes, but may contain bugs and are less stable. + Обновление:\nRelease: Официальные версии, которые выпускаются каждый месяц и могут быть очень старыми, но они более надежные и проверенные.\nNightly: Версии разработки, которые содержат все последние функции и исправления, но могут содержать ошибки и менее стабильны. + + + Background Image:\nControl the opacity of the game background image. + Фоновое изображение:\nКонтролируйте непрозрачность фона игры. + + + Play Title Music:\nIf a game supports it, enable playing special music when selecting the game in the GUI. + Играть заглавную музыку:\nВключает воспроизведение специальной музыки при выборе игры в списке, если она это поддерживает. + + + Disable Trophy Pop-ups:\nDisable in-game trophy notifications. Trophy progress can still be tracked using the Trophy Viewer (right-click the game in the main window). + Отключить уведомления о трофеях:\nОтключает внутриигровые уведомления о трофеях. Прогресс трофеев по-прежнему можно отслеживать в меню просмотра трофеев (правая кнопка мыши по игре в главном окне). + + + Hide Cursor:\nChoose when the cursor will disappear:\nNever: You will always see the mouse.\nidle: Set a time for it to disappear after being idle.\nAlways: you will never see the mouse. + Скрывать курсор:\nВыберите, когда курсор будет скрыт:\nНикогда: Вы всегда будете видеть курсор.\nПри бездействии: Установите время, через которое курсор будет скрыт при бездействии.\nВсегда: Курсор всегда будет скрыт. + + + Hide Idle Cursor Timeout:\nThe duration (seconds) after which the cursor that has been idle hides itself. + Время скрытия курсора при бездействии:\nВремя (в секундах), через которое курсор исчезнет при бездействии. + + + Back Button Behavior:\nSets the controller's back button to emulate tapping the specified position on the PS4 touchpad. + Поведение кнопки «Назад»:\nНастраивает кнопку «Назад» контроллера на эмуляцию нажатия на указанную область на сенсорной панели контроллера PS4. + + + Display Compatibility Data:\nDisplays game compatibility information in table view. Enable "Update Compatibility On Startup" to get up-to-date information. + Показывать данные совместимости:\nПоказывает информацию о совместимости игр в таблице. Включите «Обновлять базу совместимости при запуске» для получения актуальной информации. + + + Update Compatibility On Startup:\nAutomatically update the compatibility database when shadPS4 starts. + Обновлять базу совместимости при запуске:\nАвтоматически обновлять базу данных совместимости при запуске shadPS4. + + + Update Compatibility Database:\nImmediately update the compatibility database. + Обновить базу совместимости:\nНемедленно обновить базу данных совместимости. + + + Never + Никогда + + + Idle + При бездействии + + + Always + Всегда + + + Touchpad Left + Тачпад слева + + + Touchpad Right + Тачпад справа + + + Touchpad Center + Центр тачпада + + + None + Нет + + + Graphics Device:\nOn multiple GPU systems, select the GPU the emulator will use from the drop down list,\nor select "Auto Select" to automatically determine it. + Графическое устройство:\nВ системах с несколькими GPU выберите тот, который будет использовать эмулятор.\nВыберите "Автовыбор", чтобы определить GPU автоматически. + + + Width/Height:\nSets the size of the emulator window at launch, which can be resized during gameplay.\nThis is different from the in-game resolution. + Ширина/Высота:\nУстановите размер окна эмулятора при запуске, который может быть изменен во время игры.\nЭто отличается от разрешения в игре. + + + Vblank Divider:\nThe frame rate at which the emulator refreshes at is multiplied by this number. Changing this may have adverse effects, such as increasing the game speed, or breaking critical game functionality that does not expect this to change! + Делитель Vblank:\nЧастота кадров, с которой обновляется эмулятор, умножается на это число. Изменение этого параметра может иметь негативные последствия, такие как увеличение скорости игры или нарушение критических функций игры, которые этого не ожидают! + + + Enable Shaders Dumping:\nFor the sake of technical debugging, saves the games shaders to a folder as they render. + Включить дамп шейдеров:\nДля технической отладки сохраняет шейдеры игр в папку во время рендеринга. + + + Enable Null GPU:\nFor the sake of technical debugging, disables game rendering as if there were no graphics card. + Включить NULL GPU:\nДля технической отладки отключает рендеринг игры так, как будто графической карты нет. + + + Enable HDR:\nEnables HDR in games that support it.\nYour monitor must have support for the BT2020 PQ color space and the RGB10A2 swapchain format. + Включить HDR:\nВключает HDR в играх, которые его поддерживают.\nВаш монитор должен иметь поддержку цветового пространства BT2020 PQ и формата swapchain RGB10A2. + + + Game Folders:\nThe list of folders to check for installed games. + Игровые папки:\nСписок папок для проверки установленных игр. + + + Add:\nAdd a folder to the list. + Добавить:\nДобавить папку в список. + + + Remove:\nRemove a folder from the list. + Удалить:\nУдалить папку из списка. + + + Enable Debug Dumping:\nSaves the import and export symbols and file header information of the currently running PS4 program to a directory. + Включить отладочные дампы:\nСохраняет символы импорта, экспорта и информацию о заголовке файла текущей исполняемой программы PS4 в папку. + + + Enable Vulkan Validation Layers:\nEnables a system that validates the state of the Vulkan renderer and logs information about its internal state.\nThis will reduce performance and likely change the behavior of emulation. + Включить слои валидации Vulkan:\nВключает систему, которая проверяет состояние рендерера Vulkan и логирует информацию о его внутреннем состоянии. Это снизит производительность и, вероятно, изменит поведение эмуляции. + + + Enable Vulkan Synchronization Validation:\nEnables a system that validates the timing of Vulkan rendering tasks.\nThis will reduce performance and likely change the behavior of emulation. + Включить валидацию синхронизации Vulkan:\nВключает систему, которая проверяет тайминг задач рендеринга Vulkan.\nЭто снизит производительность и, вероятно, изменит поведение эмуляции. + + + Enable RenderDoc Debugging:\nIf enabled, the emulator will provide compatibility with Renderdoc to allow capture and analysis of the currently rendered frame. + Включить отладку RenderDoc:\nЕсли включено, эмулятор обеспечит совместимость с RenderDoc, позволяя захватывать и анализировать текущие кадры во время рендеринга. + + + Collect Shaders:\nYou need this enabled to edit shaders with the debug menu (Ctrl + F10). + Собирать шейдеры:\nВам необходимо включить эту функцию для редактирования шейдеров с помощью меню отладки (Ctrl + F10). + + + Crash Diagnostics:\nCreates a .yaml file with info about the Vulkan state at the time of crashing.\nUseful for debugging 'Device lost' errors. If you have this enabled, you should enable Host AND Guest Debug Markers.\nDoes not work on Intel GPUs.\nYou need Vulkan Validation Layers enabled and the Vulkan SDK for this to work. + Диагностика сбоев:\nСоздает .yaml-файл с информацией о состоянии Vulkan в момент падения.\nПолезно для отладки ошибок 'Device lost'. Если эта функция включена, вам следует включить Маркеры отладки хоста и Гостя.\nНе работает на видеокартах Intel.\nДля работы вам необходимо включить Слои валидации Vulkan и установить Vulkan SDK. + + + Copy GPU Buffers:\nGets around race conditions involving GPU submits.\nMay or may not help with PM4 type 0 crashes. + Копировать буферы GPU:\nПозволяет обойти состояния гонки, связанные с отправками GPU.\nМожет помочь или не помочь при сбоях PM4 типа 0. + + + Host Debug Markers:\nInserts emulator-side information like markers for specific AMDGPU commands around Vulkan commands, as well as giving resources debug names.\nIf you have this enabled, you should enable Crash Diagnostics.\nUseful for programs like RenderDoc. + Маркеры отладки хоста:\nДобавляет информацию на стороне эмулятора, например маркеры для определенных команд AMDGPU, вокруг команд Vulkan, а также присваивает ресурсам отладочные имена.\nЕсли эта функция включена, вам следует включить Диагностику сбоев.\nПолезно для таких программ, как RenderDoc. + + + Guest Debug Markers:\nInserts any debug markers the game itself has added to the command buffer.\nIf you have this enabled, you should enable Crash Diagnostics.\nUseful for programs like RenderDoc. + Маркеры отладки гостя:\nДобавляет любые отладочные маркеры, добавленные самой игрой, в буфер команд.\nЕсли эта функция включена, вам следует включить Диагностику сбоев.\nПолезно для таких программ, как RenderDoc. + + + Save Data Path:\nThe folder where game save data will be saved. + Путь сохранений:\nПапка, в которой будут храниться сохранения игр. + + + Browse:\nBrowse for a folder to set as the save data path. + Обзор:\nНайдите папку, которую можно указать в качестве пути для сохранений. + + + Release + Релиз + + + Nightly + Nightly + + + Set the volume of the background music. + Установите громкость фоновой музыки. + + + Enable Motion Controls + Включить управление движением + + + Save Data Path + Путь сохранений + + + Browse + Обзор + + + async + асинхронный + + + sync + синхронный + + + Auto Select + Автовыбор + + + Directory to install games + Каталог для установки игр + + + Directory to save data + Каталог для сохранений + + + Video + Видео + + + Display Mode + Режим отображения + + + Windowed + Оконный + + + Fullscreen + Полный экран + + + Fullscreen (Borderless) + Полный экран (без рамок) + + + Window Size + Размер окна + + + W: + Ш: + + + H: + В: + + + Separate Log Files + Отдельные файлы логов + + + Separate Log Files:\nWrites a separate logfile for each game. + Отдельные файлы логов:\nПишет отдельный файл логов для каждой игры. + + + Trophy Notification Position + Местоположение уведомления о трофее + + + Left + Слева + + + Right + Справа + + + Top + Сверху + + + Bottom + Снизу + + + Notification Duration + Продолжительность уведомления + + + Portable User Folder + Портативная папка пользователя + + + Create Portable User Folder from Common User Folder + Создать портативную папку пользователя из общей папки пользователя + + + Portable user folder:\nStores shadPS4 settings and data that will be applied only to the shadPS4 build located in the current folder. Restart the app after creating the portable user folder to begin using it. + Портативная папка пользователя:\nХранит настройки и данные shadPS4, которые будут применяться только к билду shadPS4, расположенному в этой папке. Перезагрузите приложение после создания портативной папки пользователя чтобы начать использовать её. + + + Cannot create portable user folder + Невозможно создать папку для портативной папки пользователя + + + %1 already exists + %1 уже существует + + + Portable user folder created + Портативная папка пользователя создана + + + %1 successfully created. + %1 успешно создано. + + + Open the custom trophy images/sounds folder:\nYou can add custom images to the trophies and an audio.\nAdd the files to custom_trophy with the following names:\ntrophy.wav OR trophy.mp3, bronze.png, gold.png, platinum.png, silver.png\nNote: The sound will only work in QT versions. + Открыть папку с пользовательскими изображениями/звуками трофеев:\nВы можете добавить пользовательские изображения к трофеям и аудио.\nДобавьте файлы в custom_trophy со следующими именами:\ntrophy.wav ИЛИ trophy.mp3, bronze.png, gold.png, platinum.png, silver.png\nПримечание: звук будет работать только в QT-версии. + + + + TrophyViewer + + Trophy Viewer + Просмотр трофеев + + + Select Game: + Выберите игру: + + + Progress + Прогресс + + + Show Earned Trophies + Показать заработанные трофеи + + + Show Not Earned Trophies + Показать не заработанные трофеи + + + Show Hidden Trophies + Показать скрытые трофеи + + + diff --git a/src/qt_gui/translations/sq.ts b/src/qt_gui/translations/sq.ts deleted file mode 100644 index 1df2a40e2..000000000 --- a/src/qt_gui/translations/sq.ts +++ /dev/null @@ -1,1664 +0,0 @@ - - - - - - AboutDialog - - - About shadPS4 - Rreth shadPS4 - - - - shadPS4 - shadPS4 - - - - shadPS4 is an experimental open-source emulator for the PlayStation 4. - shadPS4 është një emulator eksperimental me burim të hapur për PlayStation 4. - - - - This software should not be used to play games you have not legally obtained. - Ky program nuk duhet përdorur për të luajtur lojëra që nuk ke marrë ligjërisht. - - - - ElfViewer - - - Open Folder - Hap Dosjen - - - - GameInfoClass - - - Loading game list, please wait :3 - Po ngarkohet lista e lojërave, të lutem prit :3 - - - - Cancel - Anulo - - - - Loading... - Duke ngarkuar... - - - - InstallDirSelect - - - shadPS4 - Choose directory - shadPS4 - Përzgjidh dosjen - - - - Select which directory you want to install to. - Përzgjidh në cilën dosje do që të instalosh. - - - - GameInstallDialog - - - shadPS4 - Choose directory - shadPS4 - Përzgjidh dosjen - - - - Directory to install games - Dosja ku do instalohen lojërat - - - - Browse - Shfleto - - - - Error - Gabim - - - - The value for location to install games is not valid. - Vlera për vendndodhjen e instalimit të lojërave nuk është e vlefshme. - - - - GuiContextMenus - - - Create Shortcut - Krijo Shkurtore - - - - Cheats / Patches - Mashtrime / Arna - - - - SFO Viewer - Shikuesi i SFO - - - - Trophy Viewer - Shikuesi i Trofeve - - - - Open Folder... - Hap Dosjen... - - - - Open Game Folder - Hap Dosjen e Lojës - - - - Open Save Data Folder - Hap Dosjen e të Dhënave të Ruajtura - - - - Open Log Folder - Hap Dosjen e Ditarit - - - - Copy info... - Kopjo informacionin... - - - - Copy Name - Kopjo Emrin - - - - Copy Serial - Kopjo Serikun - - - - Copy All - Kopjo të Gjitha - - - - Delete... - Fshi... - - - - Delete Game - Fshi lojën - - - - Delete Update - Fshi përditësimin - - - - Delete DLC - Fshi DLC-në - - - - Compatibility... - Compatibility... - - - - Update database - Update database - - - - View report - View report - - - - Submit a report - Submit a report - - - - Shortcut creation - Krijimi i shkurtores - - - - Shortcut created successfully! - Shkurtorja u krijua me sukses! - - - - Error - Gabim - - - - Error creating shortcut! - Gabim në krijimin e shkurtores! - - - - Install PKG - Instalo PKG - - - - Game - Loja - - - - requiresEnableSeparateUpdateFolder_MSG - Kjo veçori kërkon cilësimin 'Aktivizo dosjen e ndarë të përditësimit' për të punuar. Në qoftë se do ta përdorësh këtë veçori, të lutem aktivizoje. - - - - This game has no update to delete! - Kjo lojë nuk ka përditësim për të fshirë! - - - - Update - Përditësim - - - - This game has no DLC to delete! - Kjo lojë nuk ka DLC për të fshirë! - - - - DLC - DLC - - - - Delete %1 - Fshi %1 - - - - Are you sure you want to delete %1's %2 directory? - Je i sigurt që do të fsish dosjen %2 të %1? - - - - MainWindow - - - Open/Add Elf Folder - Hap/Shto Dosje ELF - - - - Install Packages (PKG) - Instalo Paketat (PKG) - - - - Boot Game - Nis Lojën - - - - Check for Updates - Kontrollo për përditësime - - - - About shadPS4 - Rreth shadPS4 - - - - Configure... - Konfiguro... - - - - Install application from a .pkg file - Instalo aplikacionin nga një skedar .pkg - - - - Recent Games - Lojërat e fundit - - - - Exit - Dil - - - - Exit shadPS4 - Dil nga shadPS4 - - - - Exit the application. - Dil nga aplikacioni. - - - - Show Game List - Shfaq Listën e Lojërave - - - - Game List Refresh - Rifresko Listën e Lojërave - - - - Tiny - Të vockla - - - - Small - Të vogla - - - - Medium - Të mesme - - - - Large - Të mëdha - - - - List View - Pamja e Listës - - - - Grid View - Pamja e Rrjetës - - - - Elf Viewer - Shikuesi i Elf - - - - Game Install Directory - Dosja e Instalimit të Lojës - - - - Download Cheats/Patches - Shkarko Mashtrime/Arna - - - - Dump Game List - Zbraz Listën e Lojërave - - - - PKG Viewer - Shikuesi i PKG - - - - Search... - Kërko... - - - - File - Skedari - - - - View - Pamja - - - - Game List Icons - Ikonat e Listës së Lojërave - - - - Game List Mode - Mënyra e Listës së Lojërave - - - - Settings - Cilësimet - - - - Utils - Shërbimet - - - - Themes - Motivet - - - - Help - Ndihmë - - - - Dark - E errët - - - - Light - E çelët - - - - Green - E gjelbër - - - - Blue - E kaltër - - - - Violet - Vjollcë - - - - toolBar - Shiriti i veglave - - - - PKGViewer - - - Open Folder - Hap Dosjen - - - - TrophyViewer - - - Trophy Viewer - Shikuesi i Trofeve - - - - SettingsDialog - - - Settings - Cilësimet - - - - General - Të përgjithshme - - - - System - Sistemi - - - - Console Language - Gjuha e Konsolës - - - - Emulator Language - Gjuha e emulatorit - - - - Emulator - Emulatori - - - - Enable Fullscreen - Aktivizo Ekranin e plotë - - - - Enable Separate Update Folder - Aktivizo dosjen e ndarë të përditësimit - - - - Show Splash - Shfaq Pamjen e nisjes - - - - Is PS4 Pro - Mënyra PS4 Pro - - - - Enable Discord Rich Presence - Aktivizo Discord Rich Presence - - - - Username - Përdoruesi - - - - Trophy Key - Trophy Key - - - - Trophy - Trophy - - - - Logger - Regjistruesi i ditarit - - - - Log Type - Lloji i Ditarit - - - - Log Filter - Filtri i Ditarit - - - - Input - Hyrja - - - - Cursor - Kursori - - - - Hide Cursor - Fshih kursorin - - - - Hide Cursor Idle Timeout - Koha për fshehjen e kursorit joaktiv - - - - s - s - - - - Controller - Dorezë - - - - Back Button Behavior - Sjellja e butonit mbrapa - - - - Graphics - Grafika - - - - Graphics Device - Pajisja e Grafikës - - - - Width - Gjerësia - - - - Height - Lartësia - - - - Vblank Divider - Ndarës Vblank - - - - Advanced - Të përparuara - - - - Enable Shaders Dumping - Aktivizo Zbrazjen e Shaders-ave - - - - Enable NULL GPU - Aktivizo GPU-në NULL - - - - Paths - Shtigjet - - - - Game Folders - Dosjet e lojës - - - - Add... - Shto... - - - - Remove - Hiq - - - - Debug - Korrigjim - - - - Enable Debug Dumping - Aktivizo Zbrazjen për Korrigjim - - - - Enable Vulkan Validation Layers - Aktivizo Shtresat e Vlefshmërisë Vulkan - - - - Enable Vulkan Synchronization Validation - Aktivizo Vërtetimin e Sinkronizimit Vulkan - - - - Enable RenderDoc Debugging - Aktivizo Korrigjimin RenderDoc - - - - Update - Përditëso - - - - Check for Updates at Startup - Kontrollo për përditësime në nisje - - - - Update Channel - Kanali i përditësimit - - - - Check for Updates - Kontrollo për përditësime - - - - GUI Settings - Cilësimet e GUI - - - - Disable Trophy Pop-ups - Çaktivizo njoftimet për Trofetë - - - - Play title music - Luaj muzikën e titullit - - - - Update Compatibility Database On Startup - Përditëso bazën e të dhënave të përputhshmërisë gjatë nisjes - - - - Game Compatibility - Përputhshmëria e lojës - - - - Display Compatibility Data - Shfaq të dhënat e përputhshmërisë - - - - Update Compatibility Database - Përditëso bazën e të dhënave të përputhshmërisë - - - - Volume - Vëllimi i zërit - - - - Audio Backend - Audio Backend - - - - MainWindow - - - Game List - Lista e lojërave - - - - * Unsupported Vulkan Version - * Version i pambështetur i Vulkan - - - - Download Cheats For All Installed Games - Shkarko Mashtrime Për Të Gjitha Lojërat e Instaluara - - - - Download Patches For All Games - Shkarko Arna Për Të Gjitha Lojërat e Instaluara - - - - Download Complete - Shkarkimi Përfundoi - - - - You have downloaded cheats for all the games you have installed. - Ke shkarkuar mashtrimet për të gjitha lojërat që ke instaluar. - - - - Patches Downloaded Successfully! - Arnat u shkarkuan me sukses! - - - - All Patches available for all games have been downloaded. - Të gjitha arnat e ofruara për të gjitha lojërat janë shkarkuar. - - - - Games: - Lojërat: - - - - PKG File (*.PKG) - Skedar PKG (*.PKG) - - - - ELF files (*.bin *.elf *.oelf) - Skedarë ELF (*.bin *.elf *.oelf) - - - - Game Boot - Nis Lojën - - - - Only one file can be selected! - Mund të përzgjidhet vetëm një skedar! - - - - PKG Extraction - Nxjerrja e PKG-së - - - - Patch detected! - U zbulua një arnë! - - - - PKG and Game versions match: - PKG-ja dhe versioni i Lojës përputhen: - - - - Would you like to overwrite? - Dëshiron të mbishkruash? - - - - PKG Version %1 is older than installed version: - Versioni %1 i PKG-së është më i vjetër se versioni i instaluar: - - - - Game is installed: - Loja është instaluar: - - - - Would you like to install Patch: - Dëshiron të instalosh Arnën: - - - - DLC Installation - Instalimi i DLC-ve - - - - Would you like to install DLC: %1? - Dëshiron të instalosh DLC-në: %1? - - - - DLC already installed: - DLC-ja është instaluar tashmë: - - - - Game already installed - Loja është instaluar tashmë - - - - PKG is a patch, please install the game first! - PKG-ja është një arnë, të lutem instalo lojën fillimisht! - - - - PKG ERROR - GABIM PKG - - - - Extracting PKG %1/%2 - Po nxirret PKG-ja %1/%2 - - - - Extraction Finished - Nxjerrja Përfundoi - - - - Game successfully installed at %1 - Loja u instalua me sukses në %1 - - - - File doesn't appear to be a valid PKG file - Skedari nuk duket si skedar PKG i vlefshëm - - - - CheatsPatches - - - Cheats / Patches for - Mashtrime / Arna për - - - - defaultTextEdit_MSG - Mashtrimet/Arnat janë eksperimentale.\nPërdori me kujdes.\n\nShkarko mashtrimet individualisht duke zgjedhur depon dhe duke klikuar butonin e shkarkimit.\nNë skedën Arna, mund t'i shkarkosh të gjitha arnat menjëherë, të zgjidhësh cilat dëshiron të përdorësh dhe të ruash zgjedhjen tënde.\n\nMeqenëse ne nuk zhvillojmë Mashtrimet/Arnat,\ntë lutem raporto problemet te autori i mashtrimit.\n\nKe krijuar një mashtrim të ri? Vizito:\nhttps://github.com/shadps4-emu/ps4_cheats - - - - No Image Available - Nuk ofrohet asnjë imazh - - - - Serial: - Seriku: - - - - Version: - Versioni: - - - - Size: - Madhësia: - - - - Select Cheat File: - Përzgjidh Skedarin e Mashtrimit: - - - - Repository: - Depo: - - - - Download Cheats - Shkarko Mashtrimet - - - - Delete File - Fshi Skedarin - - - - No files selected. - Nuk u zgjodh asnjë skedar. - - - - You can delete the cheats you don't want after downloading them. - Mund t'i fshish mashtrimet që nuk dëshiron pasi t'i kesh shkarkuar. - - - - Do you want to delete the selected file?\n%1 - Dëshiron të fshish skedarin e përzgjedhur?\n%1 - - - - Select Patch File: - Përzgjidh Skedarin e Arnës: - - - - Download Patches - Shkarko Arnat - - - - Save - Ruaj - - - - Cheats - Mashtrime - - - - Patches - Arna - - - - Error - Gabim - - - - No patch selected. - Asnjë arnë e përzgjedhur. - - - - Unable to open files.json for reading. - files.json nuk mund të hapet për lexim. - - - - No patch file found for the current serial. - Nuk u gjet asnjë skedar patch për serikun aktual. - - - - Unable to open the file for reading. - Skedari nuk mund të hapet për lexim. - - - - Unable to open the file for writing. - Skedari nuk mund të hapet për shkrim. - - - - Failed to parse XML: - Analiza e XML-së dështoi: - - - - Success - Sukses - - - - Options saved successfully. - Rregullimet u ruajtën me sukses. - - - - Invalid Source - Burim i pavlefshëm - - - - The selected source is invalid. - Burimi i përzgjedhur është i pavlefshëm. - - - - File Exists - Skedari Ekziston - - - - File already exists. Do you want to replace it? - Skedari ekziston tashmë. Dëshiron ta zëvendësosh? - - - - Failed to save file: - Ruajtja e skedarit dështoi: - - - - Failed to download file: - Shkarkimi i skedarit dështoi: - - - - Cheats Not Found - Mashtrimet nuk u gjetën - - - - CheatsNotFound_MSG - Nuk u gjetën mashtrime për këtë lojë në këtë version të depove të përzgjedhura, provo një depo tjetër ose një version tjetër të lojës. - - - - Cheats Downloaded Successfully - Mashtrimet u shkarkuan me sukses - - - - CheatsDownloadedSuccessfully_MSG - Ke shkarkuar me sukses mashtrimet për këtë version të lojës nga depoja e përzgjedhur. Mund të provosh të shkarkosh nga një depo tjetër, nëse ofrohet do të jetë e mundur gjithashtu ta përdorësh duke përzgjedhur skedarin nga lista. - - - - Failed to save: - Ruajtja dështoi: - - - - Failed to download: - Shkarkimi dështoi: - - - - Download Complete - Shkarkimi përfundoi - - - - DownloadComplete_MSG - Arnat u shkarkuan me sukses! Të gjitha arnat e ofruara për të gjitha lojërat janë shkarkuar, nuk ka nevojë t'i shkarkosh ato individualisht për secilën lojë siç ndodh me Mashtrimet. Nëse arna nuk shfaqet, mund të mos ekzistojë për numrin e serikut dhe versionin specifik të lojës. - - - - Failed to parse JSON data from HTML. - Analiza e të dhënave JSON nga HTML dështoi. - - - - Failed to retrieve HTML page. - Gjetja e faqes HTML dështoi. - - - - The game is in version: %1 - Loja është në versionin: %1 - - - - The downloaded patch only works on version: %1 - Arna e shkarkuar funksionon vetëm në versionin: %1 - - - - You may need to update your game. - Mund të duhet të përditësosh lojën tënde. - - - - Incompatibility Notice - Njoftim për papajtueshmëri - - - - Failed to open file: - Hapja e skedarit dështoi: - - - - XML ERROR: - GABIM XML: - - - - Failed to open files.json for writing - Hapja e files.json për shkrim dështoi - - - - Author: - Autori: - - - - Directory does not exist: - Dosja nuk ekziston: - - - - Failed to open files.json for reading. - Hapja e files.json për lexim dështoi. - - - - Name: - Emri: - - - - Can't apply cheats before the game is started - Nuk mund të zbatohen mashtrime para fillimit të lojës. - - - - SettingsDialog - - - Save - Ruaj - - - - Apply - Zbato - - - - Restore Defaults - Rikthe paracaktimet - - - - Close - Mbyll - - - - Point your mouse at an option to display its description. - Vendos miun mbi një rregullim për të shfaqur përshkrimin e tij. - - - - consoleLanguageGroupBox - Gjuha e konsolës:\nPërcakton gjuhën që përdor loja PS4.\nKëshillohet të caktosh një gjuhë që loja mbështet, e cila do të ndryshojë sipas rajonit. - - - - emulatorLanguageGroupBox - Gjuha e emulatorit:\nPërcakton gjuhën e ndërfaqes së përdoruesit të emulatorit. - - - - fullscreenCheckBox - Aktivizo ekranin e plotë:\nVendos automatikisht dritaren e lojës në mënyrën e ekranit të plotë.\nKjo mund të aktivizohet duke shtypur tastin F11. - - - - separateUpdatesCheckBox - Aktivizo dosjen e ndarë të përditësimit:\nAktivizon instalimin e përditësimeve të lojërave në dosje të veçanta për menaxhim më të lehtë.\nKjo mund të krijohet manualisht duke shtuar përditësimin e shpaketuar në dosjen e lojës me emrin "CUSA00000-UPDATE" ku ID-ja CUSA përputhet me ID-në e lojës. - - - - showSplashCheckBox - Shfaq ekranin e ngarkesës:\nShfaq ekranin e ngarkesës së lojës (një pamje e veçantë) gjatë fillimit të lojës. - - - - ps4proCheckBox - Është PS4 Pro:\nBën që emulatori të veprojë si një PS4 PRO, gjë që mund të aktivizojë veçori të veçanta në lojrat që e mbështesin. - - - - discordRPCCheckbox - Aktivizo Discord Rich Presence:\nShfaq ikonën e emulatorit dhe informacionin përkatës në profilin tënd në Discord. - - - - userName - Përdoruesi:\nPërcakton emrin e përdoruesit të llogarisë PS4, i cili mund të shfaqet nga disa lojra. - - - - TrophyKey - Trophy Key:\nKey used to decrypt trophies. Must be obtained from your jailbroken console.\nMust contain only hex characters. - - - - logTypeGroupBox - Lloji i ditarit:\nPërcakton nëse të sinkronizohet dalja e dritares së ditarit për performancë. Mund të ketë efekte të këqija në emulim. - - - - logFilter - Filtri i ditarit:\nFiltron ditarin për të shfaqur vetëm informacione specifike.\nShembuj: "Core:Trace" "Lib.Pad:Debug Common.Filesystem:Error" "*:Critical" Nivelet: Trace, Debug, Info, Warning, Error, Critical - në këtë rend, një nivel specifik hesht të gjitha nivelet përpara në listë dhe regjistron çdo nivel pas atij. - - - - updaterGroupBox - Përditësimi:\nRelease: Versionet zyrtare të lëshuara çdo muaj që mund të jenë shumë të vjetra, por janë më të besueshme dhe të provuara.\nNightly: Versionet e zhvillimit që kanë të gjitha veçoritë dhe rregullimet më të fundit, por mund të përmbajnë gabime dhe janë më pak të qëndrueshme. - - - - GUIgroupBox - Luaj muzikën e titullit:\nNëse një lojë e mbështet, aktivizohet luajtja e muzikës të veçantë kur të zgjidhësh lojën në GUI. - - - - disableTrophycheckBox - Çaktivizo njoftimet për Trofetë:\nÇaktivizo njoftimet për trofetë gjatë lojës. Përparimi i trofeve mund të ndiqet duke përdorur Shikuesin e Trofeve (kliko me të djathtën mbi lojën në dritaren kryesore). - - - - hideCursorGroupBox - Fsheh kursorin:\nZgjidh kur do të fshihet kursori:\nKurrë: Do ta shohësh gjithmonë miun.\nInaktiv: Vendos një kohë për ta fshehur pas mosveprimit.\nGjithmonë: nuk do ta shohësh kurrë miun. - - - - idleTimeoutGroupBox - Koha për fshehjen e kursorit joaktiv:\nKohëzgjatja (në sekonda) pas së cilës kursori që nuk ka qënë në veprim fshihet. - - - - backButtonBehaviorGroupBox - Sjellja e butonit mbrapa:\nLejon të përcaktohet se në cilën pjesë të tastierës prekëse do të imitojë një prekje butoni mprapa. - - - - enableCompatibilityCheckBox - Shfaq të dhënat e përputhshmërisë:\nShfaq informacionin e përputhshmërisë së lojës në formë tabele. Aktivizo 'Përditëso përputhshmërinë gjatë nisjes' për të marrë informacion të përditësuar. - - - - checkCompatibilityOnStartupCheckBox - Përditëso përputhshmërinë gjatë nisjes:\nPërditëson automatikisht bazën e të dhënave të përputhshmërisë kur shadPS4 niset. - - - - updateCompatibilityButton - Përditëso bazën e të dhënave të përputhshmërisë:\nPërditëso menjëherë bazën e të dhënave të përputhshmërisë. - - - - Never - Kurrë - - - - Idle - Joaktiv - - - - Always - Gjithmonë - - - - Touchpad Left - Tastiera prekëse majtas - - - - Touchpad Right - Tastiera prekëse djathtas - - - - Touchpad Center - Tastiera prekëse në qendër - - - - None - Asnjë - - - - graphicsAdapterGroupBox - Pajisja grafike:\nNë sistemet me GPU të shumëfishta, zgjidh GPU-në që do të përdorë emulatori nga lista rënëse,\nose zgjidh "Auto Select" për ta përcaktuar automatikisht. - - - - resolutionLayout - Gjerësia/Lartësia:\nPërcakton madhësinë e dritares së emulatorit në nisje, e cila mund të rregullohet gjatë lojës.\nKjo është ndryshe nga rezolucioni në lojë. - - - - heightDivider - Ndarësi Vblank:\nFrekuenca pamore me të cilën rifreskohet emulatori shumëzohet me këtë numër. Ndryshimi i këtij mund të ketë efekte të këqija, si rritja e shpejtësisë së lojës ose prishja e punimit thelbësor të lojës që nuk e pret këtë ndryshim! - - - - dumpShadersCheckBox - Aktivizo zbrazjen e shaders-ave:\nPër qëllime të korrigjimit teknik, ruan shaders-at e lojës në një dosje ndërsa ato pasqyrohen. - - - - nullGpuCheckBox - Aktivizo GPU-në Null:\nPër qëllime të korrigjimit teknik, çaktivizon pasqyrimin e lojës sikur nuk ka një kartë grafike. - - - - gameFoldersBox - Dosjet e lojërave:\nLista e dosjeve për të kontrolluar lojërat e instaluara. - - - - addFolderButton - Shto:\nShto një dosje në listë. - - - - removeFolderButton - Hiq:\nHiq një dosje nga lista. - - - - debugDump - Aktivizo zbrazjen për korrigjim:\nRuan simbolet e importit dhe eksportit dhe informacionin e kreut të skedarit për aplikacionin PS4 që po ekzekutohet në një dosje. - - - - vkValidationCheckBox - Aktivizo shtresat e vlefshmërisë Vulkan:\nAktivizon një sistem që vërteton gjendjen e pasqyruesit Vulkan dhe regjistron informacionin në lidhje me gjendjen e tij të brendshme. Kjo do të ul performancën dhe ndoshta do të ndryshojë sjelljen e emulimit. - - - - vkSyncValidationCheckBox - Aktivizo vërtetimin e sinkronizimit Vulkan:\nAktivizon një sistem që vërteton kohën e detyrave të pasqyrimit Vulkan. Kjo do të ul performancën dhe ndoshta do të ndryshojë sjelljen e emulimit. - - - - rdocCheckBox - Aktivizo korrigjimin RenderDoc:\nNëse aktivizohet, emulatori do të ofrojë pajtueshmëri me Renderdoc për të lejuar kapjen dhe analizën e pamjes të pasqyruar në moment. - - - - GameListFrame - - - Icon - Ikona - - - - Name - Emri - - - - Serial - Seriku - - - - Compatibility - Përputhshmëria - - - - Region - Rajoni - - - - Firmware - Firmueri - - - - Size - Madhësia - - - - Version - Versioni - - - - Path - Shtegu - - - - Play Time - Koha e luajtjes - - - - Never Played - Nuk është luajtur kurrë - - - - h - h - - - - m - m - - - - s - s - - - - Compatibility is untested - Përputhshmëria nuk është e testuar - - - - Game does not initialize properly / crashes the emulator - Loja nuk niset siç duhet / rrëzon emulatorin - - - - Game boots, but only displays a blank screen - Loja niset, por shfaq vetëm një ekran të zbrazët - - - - Game displays an image but does not go past the menu - Loja shfaq një imazh, por nuk kalon përtej menysë - - - - Game has game-breaking glitches or unplayable performance - Loja ka probleme kritike ose performancë të papërshtatshme për lojë - - - - Game can be completed with playable performance and no major glitches - Loja mund të përfundohet me performancë të luajtshme dhe pa probleme të mëdha - - - - CheckUpdate - - - Auto Updater - Përditësues automatik - - - - Error - Gabim - - - - Network error: - Gabim rrjeti: - - - - Failed to parse update information. - Analizimi i informacionit të përditësimit deshtoi. - - - - No pre-releases found. - Nuk u gjetën botime paraprake. - - - - Invalid release data. - Të dhënat e lëshimit janë të pavlefshme. - - - - No download URL found for the specified asset. - Nuk u gjet URL-ja e shkarkimit për burimin e specifikuar. - - - - Your version is already up to date! - Versioni jotë është i përditësuar tashmë! - - - - Update Available - Ofrohet një përditësim - - - - Update Channel - Kanali i përditësimit - - - - Current Version - Versioni i tanishëm - - - - Latest Version - Versioni më i fundit - - - - Do you want to update? - Do të përditësosh? - - - - Show Changelog - Trego ndryshimet - - - - Check for Updates at Startup - Kontrollo për përditësime në nisje - - - - Update - Përditëso - - - - No - Jo - - - - Hide Changelog - Fshih ndryshimet - - - - Changes - Ndryshimet - - - - Network error occurred while trying to access the URL - Ka ndodhur një gabim rrjeti gjatë përpjekjes për të qasur në URL-në - - - - Download Complete - Shkarkimi përfundoi - - - - The update has been downloaded, press OK to install. - Përditësimi është shkarkuar, shtyp OK për ta instaluar. - - - - Failed to save the update file at - Dështoi ruajtja e skedarit të përditësimit në - - - - Starting Update... - Po fillon përditësimi... - - - - Failed to create the update script file - Krijimi i skedarit skript të përditësimit dështoi - - - - GameListUtils - - - B - B - - - - KB - KB - - - - MB - MB - - - - GB - GB - - - - TB - TB - - - diff --git a/src/qt_gui/translations/sq_AL.ts b/src/qt_gui/translations/sq_AL.ts new file mode 100644 index 000000000..d59fd8c3e --- /dev/null +++ b/src/qt_gui/translations/sq_AL.ts @@ -0,0 +1,2089 @@ + + + + + + AboutDialog + + About shadPS4 + Rreth shadPS4 + + + shadPS4 is an experimental open-source emulator for the PlayStation 4. + shadPS4 është një emulator eksperimental me burim të hapur për PlayStation 4. + + + This software should not be used to play games you have not legally obtained. + Ky program nuk duhet përdorur për të luajtur lojëra që nuk ke marrë ligjërisht. + + + + CheatsPatches + + Cheats / Patches for + Mashtrime / Arna për + + + 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:\n + Mashtrimet/Arnat janë eksperimentale.\nPërdori me kujdes.\n\nShkarko mashtrimet individualisht duke zgjedhur depon dhe duke klikuar butonin e shkarkimit.\nNë skedën Arna, mund t'i shkarkosh të gjitha arnat menjëherë, të zgjidhësh cilat dëshiron të përdorësh dhe të ruash zgjedhjen tënde.\n\nMeqenëse ne nuk zhvillojmë Mashtrimet/Arnat,\ntë lutem raporto problemet te autori i mashtrimit.\n\nKe krijuar një mashtrim të ri? Vizito:\n + + + No Image Available + Nuk ofrohet asnjë imazh + + + Serial: + Seriku: + + + Version: + Versioni: + + + Size: + Madhësia: + + + Select Cheat File: + Përzgjidh Skedarin e Mashtrimit: + + + Repository: + Depo: + + + Download Cheats + Shkarko Mashtrimet + + + Delete File + Fshi Skedarin + + + No files selected. + Nuk u zgjodh asnjë skedar. + + + You can delete the cheats you don't want after downloading them. + Mund t'i fshish mashtrimet që nuk dëshiron pasi t'i kesh shkarkuar. + + + Do you want to delete the selected file?\n%1 + Dëshiron të fshish skedarin e përzgjedhur?\n%1 + + + Select Patch File: + Përzgjidh skedarin e arnës: + + + Download Patches + Shkarko Arnat + + + Save + Ruaj + + + Cheats + Mashtrime + + + Patches + Arna + + + Error + Gabim + + + No patch selected. + Asnjë arnë e përzgjedhur. + + + Unable to open files.json for reading. + files.json nuk mund të hapet për lexim. + + + No patch file found for the current serial. + Nuk u gjet asnjë skedar patch për serikun aktual. + + + Unable to open the file for reading. + Skedari nuk mund të hapet për lexim. + + + Unable to open the file for writing. + Skedari nuk mund të hapet për shkrim. + + + Failed to parse XML: + Analiza e XML-së dështoi: + + + Success + Sukses + + + Options saved successfully. + Rregullimet u ruajtën me sukses. + + + Invalid Source + Burim i pavlefshëm + + + The selected source is invalid. + Burimi i përzgjedhur është i pavlefshëm. + + + File Exists + Skedari ekziston + + + File already exists. Do you want to replace it? + Skedari ekziston tashmë. Dëshiron ta zëvendësosh? + + + Failed to save file: + Ruajtja e skedarit dështoi: + + + Failed to download file: + Shkarkimi i skedarit dështoi: + + + Cheats Not Found + Mashtrimet nuk u gjetën + + + No Cheats found for this game in this version of the selected repository,try another repository or a different version of the game. + Nuk u gjetën mashtrime për këtë lojë në këtë version të depove të përzgjedhura, provo një depo tjetër ose një version tjetër të lojës. + + + Cheats Downloaded Successfully + Mashtrimet u shkarkuan me sukses + + + 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. + Ke shkarkuar me sukses mashtrimet për këtë version të lojës nga depoja e përzgjedhur. Mund të provosh të shkarkosh nga një depo tjetër, nëse ofrohet do të jetë e mundur gjithashtu ta përdorësh duke përzgjedhur skedarin nga lista. + + + Failed to save: + Ruajtja dështoi: + + + Failed to download: + Shkarkimi dështoi: + + + Download Complete + Shkarkimi përfundoi + + + 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. If the patch does not appear, it may be that it does not exist for the specific serial and version of the game. + Arnat u shkarkuan me sukses! Të gjitha arnat e ofruara për të gjitha lojërat janë shkarkuar, nuk ka nevojë t'i shkarkosh ato individualisht për secilën lojë siç ndodh me Mashtrimet. Nëse arna nuk shfaqet, mund të mos ekzistojë për numrin e serikut dhe versionin specifik të lojës. + + + Failed to parse JSON data from HTML. + Analiza e të dhënave JSON nga HTML dështoi. + + + Failed to retrieve HTML page. + Gjetja e faqes HTML dështoi. + + + The game is in version: %1 + Loja është në versionin: %1 + + + The downloaded patch only works on version: %1 + Arna e shkarkuar funksionon vetëm në versionin: %1 + + + You may need to update your game. + Mund të duhet të përditësosh lojën tënde. + + + Incompatibility Notice + Njoftim për mospërputhje + + + Failed to open file: + Hapja e skedarit dështoi: + + + XML ERROR: + GABIM XML: + + + Failed to open files.json for writing + Hapja e files.json për shkrim dështoi + + + Author: + Autori: + + + Directory does not exist: + Dosja nuk ekziston: + + + Failed to open files.json for reading. + Hapja e files.json për lexim dështoi. + + + Name: + Emri: + + + Can't apply cheats before the game is started + Nuk mund të zbatohen mashtrime para fillimit të lojës. + + + Close + Mbyll + + + + CheckUpdate + + Auto Updater + Përditësues automatik + + + Error + Gabim + + + Network error: + Gabim rrjeti: + + + The Auto Updater allows up to 60 update checks per hour.\nYou have reached this limit. Please try again later. + Përditësuesi Automatik lejon deri në 60 kontrolle për përditësime në orë.\nKe arritur këtë kufi. Të lutem provo përsëri më vonë. + + + Failed to parse update information. + Analizimi i informacionit të përditësimit deshtoi. + + + No pre-releases found. + Nuk u gjetën botime paraprake. + + + Invalid release data. + Të dhënat e lëshimit janë të pavlefshme. + + + No download URL found for the specified asset. + Nuk u gjet URL-ja e shkarkimit për burimin e specifikuar. + + + Your version is already up to date! + Versioni jotë është i përditësuar tashmë! + + + Update Available + Ofrohet një përditësim + + + Update Channel + Kanali i përditësimit + + + Current Version + Versioni i tanishëm + + + Latest Version + Versioni më i fundit + + + Do you want to update? + Do të përditësosh? + + + Show Changelog + Trego ndryshimet + + + Check for Updates at Startup + Kontrollo për përditësime në nisje + + + Update + Përditëso + + + No + Jo + + + Hide Changelog + Fshih Ndryshimet + + + Changes + Ndryshimet + + + Network error occurred while trying to access the URL + Ka ndodhur një gabim rrjeti gjatë përpjekjes për të qasur në URL-në + + + Download Complete + Shkarkimi përfundoi + + + The update has been downloaded, press OK to install. + Përditësimi është shkarkuar, shtyp OK për ta instaluar. + + + Failed to save the update file at + Dështoi ruajtja e skedarit të përditësimit në + + + Starting Update... + Po fillon përditësimi... + + + Failed to create the update script file + Krijimi i skedarit skript të përditësimit dështoi + + + + CompatibilityInfoClass + + Fetching compatibility data, please wait + Duke marrë të dhënat e përputhshmërisë, të lutem prit + + + Cancel + Anulo + + + Loading... + Po ngarkohet... + + + Error + Gabim + + + Unable to update compatibility data! Try again later. + Nuk mund të përditësohen të dhënat e përputhshmërisë! Provo përsëri më vonë. + + + Unable to open compatibility_data.json for writing. + Nuk mund të hapet compatibility_data.json për të shkruar. + + + Unknown + E panjohur + + + Nothing + Asgjë + + + Boots + Niset + + + Menus + Meny + + + Ingame + Në lojë + + + Playable + E luajtshme + + + + ControlSettings + + Configure Controls + Konfiguro kontrollet + + + D-Pad + Shigjetat + + + Up + Lartë + + + Left + Majtas + + + Right + Djathtas + + + Down + Poshtë + + + Left Stick Deadzone (def:2 max:127) + Zona e vdekur e levës së majtë (def:2 max:127) + + + Left Deadzone + Zona e vdekur e majtë + + + Left Stick + Leva e majtë + + + Config Selection + Zgjedhja e konfigurimit + + + Common Config + Konfigurim i përbashkët + + + Use per-game configs + Përdor konfigurime të veçanta për secilën lojë + + + L1 / LB + L1 / LB + + + L2 / LT + L2 / LT + + + Back + Mbrapa + + + R1 / RB + R1 / RB + + + R2 / RT + R2 / RT + + + L3 + L3 + + + Options / Start + Options / Start + + + R3 + R3 + + + Face Buttons + Butonat kryesore + + + Triangle / Y + Trekëndësh / Y + + + Square / X + Katror / X + + + Circle / B + Rreth / B + + + Cross / A + Kryq / A + + + Right Stick Deadzone (def:2, max:127) + Zona e vdekur e levës së djathtë (def:2, max:127) + + + Right Deadzone + Zona e vdekur e djathtë + + + Right Stick + Leva e djathtë + + + Color Adjustment + Rregullimi i Ngjyrave + + + R: + R: + + + G: + G: + + + B: + B: + + + Override Lightbar Color + Zëvendëso Ngjyrën e Shiritit të ndriçimit + + + Override Color + Zëvendëso Ngjyrën + + + Unable to Save + Ruajtja Dështoi + + + Cannot bind axis values more than once + Nuk mund të caktohen vlerat e boshtit më shumë se një herë + + + Save + Ruaj + + + Apply + Zbato + + + Restore Defaults + Rikthe Paracaktimet + + + Cancel + Anulo + + + + EditorDialog + + Edit Keyboard + Mouse and Controller input bindings + Redakto caktimet e hyrjeve për Tastierën + Miun dhe Dorezën + + + Use Per-Game configs + Përdor konfigurime për secilën lojë + + + Error + Gabim + + + Could not open the file for reading + Skedari nuk mund të hapet për lexim + + + Could not open the file for writing + Skedari nuk mund të hapet për shkrim + + + Save Changes + Ruaj Ndryshimet + + + Do you want to save changes? + Do të ruash ndryshimet? + + + Help + Ndihmë + + + Do you want to reset your custom default config to the original default config? + A do ta rivendosësh konfigurimin tënd të paracaktuar të personalizuar te konfigurimi i paracaktuar origjinal? + + + Do you want to reset this config to your custom default config? + A do ta rivendosësh këtë konfigurim në konfigurimin tënd të paracaktuar të personalizuar? + + + Reset to Default + Rivendos në të Paracaktuarit + + + + ElfViewer + + Open Folder + Hap Dosjen + + + + GameInfoClass + + Loading game list, please wait :3 + Po ngarkohet lista e lojërave, të lutem prit :3 + + + Cancel + Anulo + + + Loading... + Duke ngarkuar... + + + + GameInstallDialog + + shadPS4 - Choose directory + shadPS4 - Përzgjidh dosjen + + + Directory to install games + Dosja ku do instalohen lojërat + + + Browse + Shfleto + + + Error + Gabim + + + Directory to install DLC + Dosja ku do instalohen DLC-t + + + + GameListFrame + + Icon + Ikona + + + Name + Emri + + + Serial + Seriku + + + Compatibility + Përputhshmëria + + + Region + Rajoni + + + Firmware + Firmueri + + + Size + Madhësia + + + Version + Versioni + + + Path + Shtegu + + + Play Time + Koha e luajtjes + + + Never Played + Nuk është luajtur kurrë + + + h + o + + + m + m + + + s + s + + + Compatibility is untested + Përputhshmëria nuk është e testuar + + + Game does not initialize properly / crashes the emulator + Loja nuk niset siç duhet / rrëzon emulatorin + + + Game boots, but only displays a blank screen + Loja niset, por shfaq vetëm një ekran të zbrazët + + + Game displays an image but does not go past the menu + Loja shfaq një imazh, por nuk kalon përtej menysë + + + Game has game-breaking glitches or unplayable performance + Loja ka probleme kritike ose performancë të papërshtatshme për lojë + + + Game can be completed with playable performance and no major glitches + Loja mund të përfundohet me performancë të luajtshme dhe pa probleme të mëdha + + + Click to see details on github + Kliko për të parë detajet në GitHub + + + Last updated + Përditësuar për herë të fundit + + + + GameListUtils + + B + B + + + KB + KB + + + MB + MB + + + GB + GB + + + TB + TB + + + + GuiContextMenus + + Create Shortcut + Krijo Shkurtore + + + Cheats / Patches + Mashtrime / Arna + + + SFO Viewer + Shikuesi i SFO + + + Trophy Viewer + Shikuesi i Trofeve + + + Open Folder... + Hap Dosjen... + + + Open Game Folder + Hap Dosjen e Lojës + + + Open Save Data Folder + Hap Dosjen e të Dhënave të Ruajtura + + + Open Log Folder + Hap Dosjen e Ditarit + + + Copy info... + Kopjo informacionin... + + + Copy Name + Kopjo Emrin + + + Copy Serial + Kopjo Serikun + + + Copy Version + Kopjo Versionin + + + Copy Size + Kopjo Madhësinë + + + Copy All + Kopjo të Gjitha + + + Delete... + Fshi... + + + Delete Game + Fshi Lojën + + + Delete Update + Fshi Përditësimin + + + Delete DLC + Fshi DLC-në + + + Delete Trophy + Fshi Trofeun + + + Compatibility... + Përputhshmëria... + + + Update database + Përditëso bazën e të dhënave + + + View report + Shiko raportin + + + Submit a report + Paraqit një raport + + + Shortcut creation + Krijimi i shkurtores + + + Shortcut created successfully! + Shkurtorja u krijua me sukses! + + + Error + Gabim + + + Error creating shortcut! + Gabim në krijimin e shkurtores! + + + Game + Loja + + + This game has no update to delete! + Kjo lojë nuk ka përditësim për të fshirë! + + + Update + Përditësim + + + This game has no DLC to delete! + Kjo lojë nuk ka DLC për të fshirë! + + + DLC + DLC + + + Delete %1 + Fshi %1 + + + Are you sure you want to delete %1's %2 directory? + Je i sigurt që do të fsish dosjen %2 të %1? + + + Open Update Folder + Hap Dosjen e Përditësimit + + + Delete Save Data + Fshi të Dhënat e Ruajtjes + + + This game has no update folder to open! + Kjo lojë nuk ka dosje përditësimi për të hapur! + + + No log file found for this game! + Nuk u gjet asnjë skedar ditari për këtë lojë! + + + Failed to convert icon. + Konvertimi i ikonës dështoi. + + + This game has no save data to delete! + Kjo lojë nuk ka të dhëna ruajtje për të fshirë! + + + This game has no saved trophies to delete! + Kjo lojë nuk ka trofe të ruajtur për të fshirë! + + + Save Data + Të dhënat e ruajtjes + + + Trophy + Trofeu + + + SFO Viewer for + Shikuesi SFO për + + + + HelpDialog + + Quickstart + Nisje e shpejtë + + + FAQ + Pyetje të Shpeshta + + + Syntax + Sintaksa + + + Special Bindings + Caktimet e Veçantë + + + Keybindings + Caktimet e Tasteve + + + + KBMSettings + + Configure Controls + Konfiguro Kontrollet + + + D-Pad + Shigjetat + + + Up + Lartë + + + unmapped + pacaktuar + + + Left + Majtas + + + Right + Djathtas + + + Down + Poshtë + + + Left Analog Halfmode + Mënyra e gjysmuar për levën e majtë + + + hold to move left stick at half-speed + mbaj shtypur për të lëvizur levën e majtë me gjysmën e shpejtësisë + + + Left Stick + Leva e Majtë + + + Config Selection + Zgjedhja e Konfigurimit + + + Common Config + Konfigurim i Përbashkët + + + Use per-game configs + Përdor konfigurime për secilën lojë + + + L1 + L1 + + + L2 + L2 + + + Text Editor + Redaktuesi i Tekstit + + + Help + Ndihmë + + + R1 + R1 + + + R2 + R2 + + + L3 + L3 + + + Touchpad Click + Klikim i Panelit me Prekje + + + Mouse to Joystick + Miu në Levë + + + *press F7 ingame to activate + *shtyp F7 gjatë lojës për ta aktivizuar + + + R3 + R3 + + + Options + Rregullime + + + Mouse Movement Parameters + Parametrat e Lëvizjes së Miut + + + note: click Help Button/Special Keybindings for more information + shënim: kliko Butonin e Ndihmës/Caktimet e Tasteve të Veçantë për më shumë informacion + + + Face Buttons + Butonat Kryesore + + + Triangle + Trekëndësh + + + Square + Katror + + + Circle + Rreth + + + Cross + Kryq + + + Right Analog Halfmode + Mënyra e gjysmuar për levën e djathtë + + + hold to move right stick at half-speed + mbaj shtypur për të lëvizur levën e djathtë me gjysmën e shpejtësisë + + + Right Stick + Leva e Djathtë + + + Speed Offset (def 0.125): + Ofset i Shpejtësisë (paracaktuar 0.125): + + + Copy from Common Config + Kopjo nga Konfigurimi i Përbashkët + + + Deadzone Offset (def 0.50): + Ofseti i Zonës së Vdekur (paracaktuar 0.50): + + + Speed Multiplier (def 1.0): + Shumëzuesi i Shpejtësisë (paracaktuar 1.0): + + + Common Config Selected + Konfigurimi i Përbashkët i Zgjedhur + + + This button copies mappings from the Common Config to the currently selected profile, and cannot be used when the currently selected profile is the Common Config. + Ky buton kopjon caktimet nga Konfigurimi i Përbashkët në profilin e zgjedhur aktualisht, dhe nuk mund të përdoret kur profili i zgjedhur aktualisht është Konfigurimi i Përbashkët. + + + Copy values from Common Config + Kopjo vlerat nga Konfigurimi i Përbashkët + + + Do you want to overwrite existing mappings with the mappings from the Common Config? + A dëshiron të mbishkruash caktimet ekzistuese me ato nga Konfigurimi i Përbashkët? + + + Unable to Save + Ruajtja Dështoi + + + Cannot bind any unique input more than once + Asnjë hyrje unike nuk mund të caktohet më shumë se një herë + + + Press a key + Shtyp një tast + + + Cannot set mapping + Caktimi nuk u vendos dot + + + Mousewheel cannot be mapped to stick outputs + Rrota e miut nuk mund të caktohet për daljet e levës + + + Save + Ruaj + + + Apply + Zbato + + + Restore Defaults + Rikthe Paracaktimet + + + Cancel + Anulo + + + + MainWindow + + Open/Add Elf Folder + Hap/Shto Dosje ELF + + + Boot Game + Nis Lojën + + + Check for Updates + Kontrollo për përditësime + + + About shadPS4 + Rreth shadPS4 + + + Configure... + Konfiguro... + + + Recent Games + Lojërat e fundit + + + Open shadPS4 Folder + Hap Dosjen e shadPS4 + + + Exit + Dil + + + Exit shadPS4 + Dil nga shadPS4 + + + Exit the application. + Dil nga aplikacioni. + + + Show Game List + Shfaq Listën e Lojërave + + + Game List Refresh + Rifresko Listën e Lojërave + + + Tiny + Të vockla + + + Small + Të vogla + + + Medium + Të mesme + + + Large + Të mëdha + + + List View + Pamja me List + + + Grid View + Pamja me Rrjetë + + + Elf Viewer + Shikuesi i ELF + + + Game Install Directory + Dosja e Instalimit të Lojës + + + Download Cheats/Patches + Shkarko Mashtrime/Arna + + + Dump Game List + Zbraz Listën e Lojërave + + + Trophy Viewer + Shikuesi i Trofeve + + + No games found. Please add your games to your library first. + Nuk u gjetën lojëra. Shto lojërat në librarinë tënde fillimisht. + + + Search... + Kërko... + + + File + Skedari + + + View + Pamja + + + Game List Icons + Ikonat e Listës së Lojërave + + + Game List Mode + Mënyra e Listës së Lojërave + + + Settings + Cilësimet + + + Utils + Shërbimet + + + Themes + Motivet + + + Help + Ndihmë + + + Dark + E errët + + + Light + E çelët + + + Green + E gjelbër + + + Blue + E kaltër + + + Violet + Vjollcë + + + toolBar + Shiriti i veglave + + + Game List + Lista e lojërave + + + * Unsupported Vulkan Version + * Version i pambështetur i Vulkan + + + Download Cheats For All Installed Games + Shkarko mashtrime për të gjitha lojërat e instaluara + + + Download Patches For All Games + Shkarko arna për të gjitha lojërat e instaluara + + + Download Complete + Shkarkimi përfundoi + + + You have downloaded cheats for all the games you have installed. + Ke shkarkuar mashtrimet për të gjitha lojërat që ke instaluar. + + + Patches Downloaded Successfully! + Arnat u shkarkuan me sukses! + + + All Patches available for all games have been downloaded. + Të gjitha arnat e ofruara për të gjitha lojërat janë shkarkuar. + + + Games: + Lojërat: + + + ELF files (*.bin *.elf *.oelf) + Skedarë ELF (*.bin *.elf *.oelf) + + + Game Boot + Nis Lojën + + + Only one file can be selected! + Mund të përzgjidhet vetëm një skedar! + + + Run Game + Ekzekuto lojën + + + Eboot.bin file not found + Skedari Eboot.bin nuk u gjet + + + Game is already running! + Loja tashmë është duke u ekzekutuar! + + + shadPS4 + shadPS4 + + + Play + Play + + + Pause + Pause + + + Stop + Stop + + + Restart + Restart + + + Full Screen + Full Screen + + + Controllers + Controllers + + + Keyboard + Keyboard + + + Refresh List + Refresh List + + + Resume + Resume + + + Show Labels Under Icons + Show Labels Under Icons + + + + SettingsDialog + + Settings + Cilësimet + + + General + Të përgjithshme + + + System + Sistemi + + + Console Language + Gjuha e Konsolës + + + Emulator Language + Gjuha e Emulatorit + + + Emulator + Emulatori + + + Enable Separate Update Folder + Aktivizo dosjen e ndarë të përditësimit + + + Default tab when opening settings + Skeda e paracaktuar kur hapen cilësimet + + + Show Game Size In List + Shfaq madhësinë e lojës në listë + + + Show Splash + Shfaq Pamjen e nisjes + + + Enable Discord Rich Presence + Aktivizo Discord Rich Presence + + + Username + Përdoruesi + + + Trophy Key + Çelësi i Trofeve + + + Trophy + Trofeu + + + Open the custom trophy images/sounds folder + Hap dosjen e imazheve/tingujve të trofeve të personalizuar + + + Logger + Regjistruesi i ditarit + + + Log Type + Lloji i Ditarit + + + Log Filter + Filtri i Ditarit + + + Open Log Location + Hap vendndodhjen e Ditarit + + + Input + Hyrja + + + Cursor + Kursori + + + Hide Cursor + Fshih kursorin + + + Hide Cursor Idle Timeout + Koha për fshehjen e kursorit joaktiv + + + s + s + + + Controller + Dorezë + + + Back Button Behavior + Sjellja e butonit mbrapa + + + Graphics + Grafika + + + GUI + Ndërfaqja + + + User + Përdoruesi + + + Graphics Device + Pajisja e Grafikës + + + Vblank Divider + Ndarës Vblank + + + Advanced + Të përparuara + + + Enable Shaders Dumping + Aktivizo Zbrazjen e Shader-ave + + + Enable NULL GPU + Aktivizo GPU-në NULL + + + Enable HDR + Aktivizo HDR + + + Paths + Shtigjet + + + Game Folders + Dosjet e lojës + + + Add... + Shto... + + + Remove + Hiq + + + Debug + Korrigjim + + + Enable Debug Dumping + Aktivizo Zbrazjen për Korrigjim + + + Enable Vulkan Validation Layers + Aktivizo Shtresat e Vlefshmërisë Vulkan + + + Enable Vulkan Synchronization Validation + Aktivizo Vërtetimin e Sinkronizimit Vulkan + + + Enable RenderDoc Debugging + Aktivizo Korrigjimin RenderDoc + + + Enable Crash Diagnostics + Aktivizo Diagnozën e Rënies + + + Collect Shaders + Mblidh Shader-at + + + Copy GPU Buffers + Kopjo buffer-ët e GPU-së + + + Host Debug Markers + Shënjuesit e korrigjimit të host-it + + + Guest Debug Markers + Shënjuesit e korrigjimit të guest-it + + + Update + Përditëso + + + Check for Updates at Startup + Kontrollo për përditësime në nisje + + + Always Show Changelog + Shfaq gjithmonë ditarin e ndryshimeve + + + Update Channel + Kanali i përditësimit + + + Check for Updates + Kontrollo për përditësime + + + GUI Settings + Cilësimet e GUI-së + + + Title Music + Muzika e titullit + + + Disable Trophy Notification + Çaktivizo Njoftimin e Trofeut + + + Background Image + Imazhi i sfondit + + + Show Background Image + Shfaq imazhin e sfondit + + + Opacity + Tejdukshmëria + + + Play title music + Luaj muzikën e titullit + + + Update Compatibility Database On Startup + Përditëso bazën e të dhënave të përputhshmërisë gjatë nisjes + + + Game Compatibility + Përputhshmëria e lojës + + + Display Compatibility Data + Shfaq të dhënat e përputhshmërisë + + + Update Compatibility Database + Përditëso bazën e të dhënave të përputhshmërisë + + + Volume + Vëllimi i zërit + + + Save + Ruaj + + + Apply + Zbato + + + Restore Defaults + Rikthe Paracaktimet + + + Close + Mbyll + + + Point your mouse at an option to display its description. + Vendos miun mbi një rregullim për të shfaqur përshkrimin e tij. + + + Console Language:\nSets the language that the PS4 game uses.\nIt's recommended to set this to a language the game supports, which will vary by region. + Gjuha e konsolës:\nPërcakton gjuhën që përdor loja PS4.\nKëshillohet të caktosh një gjuhë që loja mbështet, e cila do të ndryshojë sipas rajonit. + + + Emulator Language:\nSets the language of the emulator's user interface. + Gjuha e emulatorit:\nPërcakton gjuhën e ndërfaqes së përdoruesit të emulatorit. + + + Enable Separate Update Folder:\nEnables installing game updates into a separate folder for easy management.\nThis can be manually created by adding the extracted update to the game folder with the name "CUSA00000-UPDATE" where the CUSA ID matches the game's ID. + Aktivizo dosjen e ndarë të përditësimit:\nAktivizon instalimin e përditësimeve të lojërave në dosje të veçanta për menaxhim më të lehtë.\nKjo mund të krijohet manualisht duke shtuar përditësimin e shpaketuar në dosjen e lojës me emrin "CUSA00000-UPDATE" ku ID-ja CUSA përputhet me ID-në e lojës. + + + Show Splash Screen:\nShows the game's splash screen (a special image) while the game is starting. + Shfaq ekranin e ngarkesës:\nShfaq ekranin e ngarkesës së lojës (një pamje e veçantë) gjatë fillimit të lojës. + + + Enable Discord Rich Presence:\nDisplays the emulator icon and relevant information on your Discord profile. + Aktivizo Discord Rich Presence:\nShfaq ikonën e emulatorit dhe informacionin përkatës në profilin tënd në Discord. + + + Username:\nSets the PS4's account username, which may be displayed by some games. + Përdoruesi:\nPërcakton emrin e përdoruesit të llogarisë PS4, i cili mund të shfaqet nga disa lojëra. + + + Trophy Key:\nKey used to decrypt trophies. Must be obtained from your jailbroken console.\nMust contain only hex characters. + Çelësi i Trofeve:\nÇelësi përdoret për të deshifruar trofetë. Duhet të merret nga konsola jote me jailbreak.\nDuhet të përmbajë vetëm karaktere hex. + + + Log Type:\nSets whether to synchronize the output of the log window for performance. May have adverse effects on emulation. + Lloji i ditarit:\nPërcakton nëse të sinkronizohet dalja e dritares së ditarit për performancë. Mund të ketë efekte të këqija në emulim. + + + Log Filter:\nFilters the log to only print specific information.\nExamples: "Core:Trace" "Lib.Pad:Debug Common.Filesystem:Error" "*:Critical"\nLevels: Trace, Debug, Info, Warning, Error, Critical - in this order, a specific level silences all levels preceding it in the list and logs every level after it. + Filtri i ditarit:\nFiltron ditarin për të shfaqur vetëm informacione specifike.\nShembuj: "Core:Trace" "Lib.Pad:Debug Common.Filesystem:Error" "*:Critical"\nNivelet: Trace, Debug, Info, Warning, Error, Critical - në këtë rend, një nivel specifik hesht të gjitha nivelet përpara në listë dhe regjistron çdo nivel pas atij. + + + Update:\nRelease: Official versions released every month that may be very outdated, but are more reliable and tested.\nNightly: Development versions that have all the latest features and fixes, but may contain bugs and are less stable. + Përditësimi:\nRelease: Versionet zyrtare të botuara çdo muaj që mund të jenë shumë të vjetra, por janë më të besueshme dhe të provuara.\nNightly: Versionet e zhvillimit që kanë të gjitha veçoritë dhe rregullimet më të fundit, por mund të përmbajnë gabime dhe janë më pak të qëndrueshme. + + + Background Image:\nControl the opacity of the game background image. + Imazhi i Sfondit:\nKontrollo tejdukshmërinë e imazhit të sfondit të lojës. + + + Play Title Music:\nIf a game supports it, enable playing special music when selecting the game in the GUI. + Luaj muzikën e titullit:\nNëse një lojë e mbështet, aktivizohet luajtja e muzikës të veçantë kur të zgjidhësh lojën në ndërfaqe. + + + Disable Trophy Pop-ups:\nDisable in-game trophy notifications. Trophy progress can still be tracked using the Trophy Viewer (right-click the game in the main window). + Çaktivizo njoftimet për Trofetë:\nÇaktivizo njoftimet për trofetë gjatë lojës. Përparimi i trofeve mund të ndiqet duke përdorur Shikuesin e Trofeve (kliko me të djathtën mbi lojën në dritaren kryesore). + + + Hide Cursor:\nChoose when the cursor will disappear:\nNever: You will always see the mouse.\nidle: Set a time for it to disappear after being idle.\nAlways: you will never see the mouse. + Fsheh kursorin:\nZgjidh kur do të fshihet kursori:\nKurrë: Do ta shohësh gjithmonë miun.\nJoaktiv: Vendos një kohë për ta fshehur pas mosveprimit.\nGjithmonë: nuk do ta shohësh kurrë miun. + + + Hide Idle Cursor Timeout:\nThe duration (seconds) after which the cursor that has been idle hides itself. + Koha për fshehjen e kursorit joaktiv:\nKohëzgjatja (në sekonda) pas së cilës kursori që nuk ka qënë në veprim fshihet. + + + Back Button Behavior:\nSets the controller's back button to emulate tapping the specified position on the PS4 touchpad. + Sjellja e butonit mbrapa:\nLejon të përcaktohet se në cilën pjesë të panelit me prekje të dorezës do të imitojë një prekje butoni mbrapa. + + + Display Compatibility Data:\nDisplays game compatibility information in table view. Enable "Update Compatibility On Startup" to get up-to-date information. + Shfaq të dhënat e përputhshmërisë:\nShfaq informacionin e përputhshmërisë së lojës në formë tabele. Aktivizo "Përditëso përputhshmërinë gjatë nisjes" për të marrë informacion të përditësuar. + + + Update Compatibility On Startup:\nAutomatically update the compatibility database when shadPS4 starts. + Përditëso përputhshmërinë gjatë nisjes:\nPërditëson automatikisht bazën e të dhënave të përputhshmërisë kur shadPS4 niset. + + + Update Compatibility Database:\nImmediately update the compatibility database. + Përditëso bazën e të dhënave të përputhshmërisë:\nPërditëso menjëherë bazën e të dhënave të përputhshmërisë. + + + Never + Kurrë + + + Idle + Joaktiv + + + Always + Gjithmonë + + + Touchpad Left + Paneli me Prekje Majtas + + + Touchpad Right + Paneli me Prekje Djathtas + + + Touchpad Center + Paneli me Prekje në Qendër + + + None + Asnjë + + + Graphics Device:\nOn multiple GPU systems, select the GPU the emulator will use from the drop down list,\nor select "Auto Select" to automatically determine it. + Pajisja grafike:\nNë sistemet me GPU të shumëfishta, zgjidh GPU-në që do të përdorë emulatori nga lista rënëse,\nose zgjidh "Auto Select" për ta përcaktuar automatikisht. + + + Width/Height:\nSets the size of the emulator window at launch, which can be resized during gameplay.\nThis is different from the in-game resolution. + Gjerësia/Lartësia:\nPërcakton madhësinë e dritares së emulatorit në nisje, e cila mund të rregullohet gjatë lojës.\nKjo është ndryshe nga rezolucioni në lojë. + + + Vblank Divider:\nThe frame rate at which the emulator refreshes at is multiplied by this number. Changing this may have adverse effects, such as increasing the game speed, or breaking critical game functionality that does not expect this to change! + Ndarësi Vblank:\nFrekuenca pamore me të cilën rifreskohet emulatori shumëzohet me këtë numër. Ndryshimi i këtij mund të ketë efekte të këqija, si rritja e shpejtësisë së lojës ose prishja e punimit thelbësor të lojës që nuk e pret këtë ndryshim! + + + Enable Shaders Dumping:\nFor the sake of technical debugging, saves the games shaders to a folder as they render. + Aktivizo zbrazjen e shader-ave:\nPër qëllime të korrigjimit teknik, ruan shader-at e lojës në një dosje ndërsa ato pasqyrohen. + + + Enable Null GPU:\nFor the sake of technical debugging, disables game rendering as if there were no graphics card. + Aktivizo GPU-në Null:\nPër qëllime të korrigjimit teknik, çaktivizon pasqyrimin e lojës sikur nuk ka një kartë grafike. + + + Enable HDR:\nEnables HDR in games that support it.\nYour monitor must have support for the BT2020 PQ color space and the RGB10A2 swapchain format. + Aktivizo HDR:\nAktivizon HDR në lojërat që e mbështesin.\nMonitori jotë duhet të mbështesë hapësirën e ngjyrave BT2020 PQ dhe formatin e zinxhirit të ndërrimit (swapchain) RGB10A2. + + + Game Folders:\nThe list of folders to check for installed games. + Dosjet e lojërave:\nLista e dosjeve për të kontrolluar lojërat e instaluara. + + + Add:\nAdd a folder to the list. + Shto:\nShto një dosje në listë. + + + Remove:\nRemove a folder from the list. + Hiq:\nHiq një dosje nga lista. + + + Enable Debug Dumping:\nSaves the import and export symbols and file header information of the currently running PS4 program to a directory. + Aktivizo zbrazjen për korrigjim:\nRuan simbolet e importit dhe eksportit dhe informacionin e kreut të skedarit për aplikacionin PS4 që po ekzekutohet në një dosje. + + + Enable Vulkan Validation Layers:\nEnables a system that validates the state of the Vulkan renderer and logs information about its internal state.\nThis will reduce performance and likely change the behavior of emulation. + Aktivizo shtresat e vlefshmërisë Vulkan:\nAktivizon një sistem që vërteton gjendjen e pasqyruesit Vulkan dhe regjistron informacionin në lidhje me gjendjen e tij të brendshme.\nKjo do të ul performancën dhe ndoshta do të ndryshojë sjelljen e emulimit. + + + Enable Vulkan Synchronization Validation:\nEnables a system that validates the timing of Vulkan rendering tasks.\nThis will reduce performance and likely change the behavior of emulation. + Aktivizo vërtetimin e sinkronizimit Vulkan:\nAktivizon një sistem që vërteton kohën e detyrave të pasqyrimit Vulkan.\nKjo do të ul performancën dhe ndoshta do të ndryshojë sjelljen e emulimit. + + + Enable RenderDoc Debugging:\nIf enabled, the emulator will provide compatibility with Renderdoc to allow capture and analysis of the currently rendered frame. + Aktivizo korrigjimin RenderDoc:\nNëse aktivizohet, emulatori do të ofrojë pajtueshmëri me Renderdoc për të lejuar kapjen dhe analizën e pamjes të pasqyruar në moment. + + + Collect Shaders:\nYou need this enabled to edit shaders with the debug menu (Ctrl + F10). + Mblidh Shader-at:\nDuhet ta aktivizosh këtë për të redaktuar shader-at me menynë e korrigjimit (Ctrl + F10). + + + Crash Diagnostics:\nCreates a .yaml file with info about the Vulkan state at the time of crashing.\nUseful for debugging 'Device lost' errors. If you have this enabled, you should enable Host AND Guest Debug Markers.\nDoes not work on Intel GPUs.\nYou need Vulkan Validation Layers enabled and the Vulkan SDK for this to work. + Diagnoza e rënies:\nKrijon një skedar .yaml me informacion rreth gjendjes së Vulkan-it në momentin e rënies.\nE dobishme për zgjidhjen e gabimeve 'Device lost'. Nëse e ke aktivizuar këtë, duhet të aktivizosh Shënjuesit e korrigjimit të host-it DHE të guest-it.\nNuk punon me GPU-t Intel.\nDuhet të kesh aktivizuar Shtresat e Vlefshmërisë Vulkan dhe Vulkan SDK që kjo të punojë. + + + Copy GPU Buffers:\nGets around race conditions involving GPU submits.\nMay or may not help with PM4 type 0 crashes. + Kopjo buffer-ët e GPU-së:\nShmang kushtet e garës (race conditions) që lidhen me dërgimet e GPU-së.\nMund të ndihmojë, ose jo, në rast rëniesh të llojit PM4 0. + + + Host Debug Markers:\nInserts emulator-side information like markers for specific AMDGPU commands around Vulkan commands, as well as giving resources debug names.\nIf you have this enabled, you should enable Crash Diagnostics.\nUseful for programs like RenderDoc. + Shënjuesit e korrigjimit të host-it:\nShton informacion nga ana e emulatorit, si shënjues për komandat specifike AMDGPU rreth komandave Vulkan, si dhe jep burimeve emra korrigjimi.\nNëse e ke aktivizuar këtë, duhet të aktivizosh diagnozën e rënieve.\nE dobishme për programe si RenderDoc. + + + Guest Debug Markers:\nInserts any debug markers the game itself has added to the command buffer.\nIf you have this enabled, you should enable Crash Diagnostics.\nUseful for programs like RenderDoc. + Shënjuesit e korrigjimit të guest-it:\nShton çdo shënjues për korrigjim që loja vetë ka shtuar në buffer-in e komandave.\nNëse e ke aktivizuar këtë, duhet të aktivizosh diagnozën e rënieve.\nE dobishme për programe si RenderDoc. + + + Save Data Path:\nThe folder where game save data will be saved. + Shtegu i Ruajtjes së të Dhënave:\nDosja ku do të ruhen të dhënat e ruajtjes së lojës. + + + Browse:\nBrowse for a folder to set as the save data path. + Shfleto:\nShfleto për të vendosur një dosje si shteg të ruajtjes së të dhënave. + + + Release + Release + + + Nightly + Nightly + + + Set the volume of the background music. + Vendos vëllimin e zërit të muzikës së sfondit. + + + Enable Motion Controls + Aktivizo kontrollet me lëvizje + + + Save Data Path + Shtegu i të dhënave të ruajtjes + + + Browse + Shfleto + + + async + async + + + sync + sync + + + Auto Select + Auto Select + + + Directory to install games + Dosja ku do instalohen lojërat + + + Directory to save data + Dosja për të ruajtur të dhënat + + + Video + Video + + + Display Mode + Mënyra e Shfaqjes + + + Windowed + Dritare + + + Fullscreen + Ekran të plotë + + + Fullscreen (Borderless) + Ekran të plotë (Pa kufij) + + + Window Size + Masa e Dritares + + + W: + Gjer: + + + H: + Lart: + + + Separate Log Files + Skedarë të Ditarit të Ndarë + + + Separate Log Files:\nWrites a separate logfile for each game. + Skedarë të Ditarit të Ndarë:\nShkruan një skedar të ditarit të veçuar për secilën lojë. + + + Trophy Notification Position + Pozicioni i Njoftimit të Trofeve + + + Left + Majtas + + + Right + Djathtas + + + Top + Sipër + + + Bottom + Poshtë + + + Notification Duration + Kohëzgjatja e Njoftimit + + + Portable User Folder + Dosja Portative e Përdoruesit + + + Create Portable User Folder from Common User Folder + Krijo Dosje Portative të Përdoruesit nga Dosja e Përbashkët e Përdoruesit + + + Portable user folder:\nStores shadPS4 settings and data that will be applied only to the shadPS4 build located in the current folder. Restart the app after creating the portable user folder to begin using it. + Dosja portative e përdoruesit:\nRuan cilësimet dhe të dhënat të shadPS4 që do të zbatohen vetëm për konstruktin e shadPS4 të vendosur në dosjen aktuale. Rinis aplikacionin pasi të krijosh dosjen portative te përdoruesit për ta përdorur. + + + Cannot create portable user folder + Dosja portative e përdoruesit nuk u krijua dot + + + %1 already exists + %1 tashmë ekziston + + + Portable user folder created + Dosja portative e përdoruesit u krijua + + + %1 successfully created. + %1 u krijua me sukses. + + + Open the custom trophy images/sounds folder:\nYou can add custom images to the trophies and an audio.\nAdd the files to custom_trophy with the following names:\ntrophy.wav OR trophy.mp3, bronze.png, gold.png, platinum.png, silver.png\nNote: The sound will only work in QT versions. + Hap dosjen e imazheve/tingujve të trofeve të personalizuar:\nMund të shtosh imazhe të personalizuara për trofetë dhe një audio.\nShto skedarët në dosjen custom_trophy me emrat që vijojnë:\ntrophy.wav ose trophy.mp3, bronze.png, gold.png, platinum.png, silver.png\nShënim: Tingulli do të punojë vetëm në versionet QT. + + + + TrophyViewer + + Trophy Viewer + Shikuesi i Trofeve + + + Select Game: + Zgjidh Lojën: + + + Progress + Ecuria + + + Show Earned Trophies + Shfaq Trofetë që janë fituar + + + Show Not Earned Trophies + Shfaq Trofetë që nuk janë fituar + + + Show Hidden Trophies + Shfaq Trofetë e Fshehur + + + diff --git a/src/qt_gui/translations/sv_SE.ts b/src/qt_gui/translations/sv_SE.ts new file mode 100644 index 000000000..b570c420e --- /dev/null +++ b/src/qt_gui/translations/sv_SE.ts @@ -0,0 +1,2089 @@ + + + + + + AboutDialog + + About shadPS4 + Om shadPS4 + + + shadPS4 is an experimental open-source emulator for the PlayStation 4. + shadPS4 är en experimentell emulator för PlayStation 4 baserad på öppen källkod. + + + This software should not be used to play games you have not legally obtained. + Denna programvara bör inte användas för att spela spel som du inte legalt äger. + + + + CheatsPatches + + Cheats / Patches for + Fusk / Patchar för + + + 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:\n + Fusk/Patchar är experimentella.\nAnvänd med försiktighet.\n\nHämta fusk individuellt genom att välja förrådet och klicka på hämtningsknappen.\nUnder Patchar-fliken kan du hämta alla patchar på en gång, välj vilken du vill använda och spara ditt val.\n\nEftersom vi inte utvecklar fusk eller patchar,\nrapportera gärna problem till fuskets upphovsperson.\n\nSkapat ett nytt fusk? Besök:\n + + + No Image Available + Ingen bild tillgänglig + + + Serial: + Serienummer: + + + Version: + Version: + + + Size: + Storlek: + + + Select Cheat File: + Välj fuskfil: + + + Repository: + Förråd: + + + Download Cheats + Hämta fusk + + + Delete File + Ta bort fil + + + No files selected. + Inga filer valda. + + + You can delete the cheats you don't want after downloading them. + Du kan ta bort fusk som du inte vill ha efter de hämtats ner. + + + Do you want to delete the selected file?\n%1 + Vill du ta bort markerade filen?\n%1 + + + Select Patch File: + Välj patchfil: + + + Download Patches + Hämta patchar + + + Save + Spara + + + Cheats + Fusk + + + Patches + Patchar + + + Error + Fel + + + No patch selected. + Ingen patch vald. + + + Unable to open files.json for reading. + Kunde inte öppna files.json för läsning. + + + No patch file found for the current serial. + Ingen patchfil hittades för aktuella serienumret. + + + Unable to open the file for reading. + Kunde inte öppna filen för läsning. + + + Unable to open the file for writing. + Kunde inte öppna filen för skrivning. + + + Failed to parse XML: + Misslyckades med att tolka XML: + + + Success + Lyckades + + + Options saved successfully. + Inställningarna sparades. + + + Invalid Source + Ogiltig källa + + + The selected source is invalid. + Vald källa är ogiltig. + + + File Exists + Filen finns + + + File already exists. Do you want to replace it? + Filen finns redan. Vill du ersätta den? + + + Failed to save file: + Misslyckades med att spara fil: + + + Failed to download file: + Misslyckades med att hämta filen: + + + Cheats Not Found + Fusk hittades inte + + + No Cheats found for this game in this version of the selected repository,try another repository or a different version of the game. + Inga fusk hittades för detta spel i denna version av det valda förrådet. Prova ett annat förråd eller en annan version av spelet + + + Cheats Downloaded Successfully + Fusk hämtades ner + + + 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. + Du har hämtat ner fusken för denna version av spelet från valt förråd. Du kan försöka att hämta från andra förråd, om de är tillgängliga så kan det vara möjligt att använda det genom att välja det genom att välja filen från listan + + + Failed to save: + Misslyckades med att spara: + + + Failed to download: + Misslyckades med att hämta: + + + Download Complete + Hämtning färdig + + + 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. If the patch does not appear, it may be that it does not exist for the specific serial and version of the game. + Patchhämtningen är färdig! Alla patchar tillgängliga för alla spel har hämtats och de behövs inte hämtas individuellt för varje spel som med fusk. Om patchen inte dyker upp kan det bero på att den inte finns för det specifika serienumret och versionen av spelet + + + Failed to parse JSON data from HTML. + Misslyckades med att tolka JSON-data från HTML. + + + Failed to retrieve HTML page. + Misslyckades med att hämta HTML-sida. + + + The game is in version: %1 + Spelet är i version: %1 + + + The downloaded patch only works on version: %1 + Hämtad patch fungerar endast på version: %1 + + + You may need to update your game. + Du kan behöva uppdatera ditt spel. + + + Incompatibility Notice + Meddelande om inkompatibilitet + + + Failed to open file: + Misslyckades med att öppna filen: + + + XML ERROR: + XML-FEL: + + + Failed to open files.json for writing + Misslyckades med att öppna files.json för skrivning + + + Author: + Upphovsperson: + + + Directory does not exist: + Katalogen finns inte: + + + Failed to open files.json for reading. + Misslyckades med att öppna files.json för läsning. + + + Name: + Namn: + + + Can't apply cheats before the game is started + Kan inte tillämpa fusk innan spelet är startat + + + Close + Stäng + + + + CheckUpdate + + Auto Updater + Automatisk uppdatering + + + Error + Fel + + + Network error: + Nätverksfel: + + + The Auto Updater allows up to 60 update checks per hour.\nYou have reached this limit. Please try again later. + Den automatiska uppdateraren tillåter upp till 60 uppdateringskontroller per timme.\nDu har uppnått denna gräns. Försök igen senare + + + Failed to parse update information. + Misslyckades med att tolka uppdateringsinformationen. + + + No pre-releases found. + Inga förutgåva hittades. + + + Invalid release data. + Ogiltig release-data. + + + No download URL found for the specified asset. + Ingen hämtnings-URL hittades för angiven tillgång. + + + Your version is already up to date! + Din version är redan den senaste! + + + Update Available + Uppdatering tillgänglig + + + Update Channel + Uppdateringskanal + + + Current Version + Aktuell version + + + Latest Version + Senaste version + + + Do you want to update? + Vill du uppdatera? + + + Show Changelog + Visa ändringslogg + + + Check for Updates at Startup + Leta efter uppdateringar vid uppstart + + + Update + Uppdatera + + + No + Nej + + + Hide Changelog + Dölj ändringslogg + + + Changes + Ändringar + + + Network error occurred while trying to access the URL + Nätverksfel inträffade vid försök att komma åt URL:en + + + Download Complete + Hämtning färdig + + + The update has been downloaded, press OK to install. + Uppdateringen har hämtats. Tryck på Ok för att installera. + + + Failed to save the update file at + Misslyckades med att spara uppdateringsfilen i + + + Starting Update... + Startar uppdatering... + + + Failed to create the update script file + Misslyckades med att skapa uppdateringsskriptfil + + + + CompatibilityInfoClass + + Fetching compatibility data, please wait + Hämtar kompatibilitetsdata, vänta + + + Cancel + Avbryt + + + Loading... + Läser in... + + + Error + Fel + + + Unable to update compatibility data! Try again later. + Kunde inte uppdatera kompatibilitetsdata! Försök igen senare. + + + Unable to open compatibility_data.json for writing. + Kunde inte öppna compatibility_data.json för skrivning. + + + Unknown + Okänt + + + Nothing + Ingenting + + + Boots + Startar upp + + + Menus + Menyer + + + Ingame + Problem + + + Playable + Spelbart + + + + ControlSettings + + Configure Controls + Konfigurera kontroller + + + D-Pad + Riktningsknappar + + + Up + Upp + + + Left + Vänster + + + Right + Höger + + + Down + Ner + + + Left Stick Deadzone (def:2 max:127) + Dödläge för vänster spak (standard:2 max:127) + + + Left Deadzone + Vänster dödläge + + + Left Stick + Vänster spak + + + Config Selection + Konfigurationsval + + + Common Config + Allmän konfiguration + + + Use per-game configs + Använd konfigurationer per spel + + + L1 / LB + L1 / LB + + + L2 / LT + L2 / LT + + + Back + Bakåt + + + R1 / RB + R1 / RB + + + R2 / RT + R2 / RT + + + L3 + L3 + + + Options / Start + Options / Start + + + R3 + R3 + + + Face Buttons + Handlingsknappar + + + Triangle / Y + Triangel / Y + + + Square / X + Fyrkant / X + + + Circle / B + Cirkel / B + + + Cross / A + Kryss / A + + + Right Stick Deadzone (def:2, max:127) + Dödläge för höger spak (standard:2, max:127) + + + Right Deadzone + Höger dödläge + + + Right Stick + Höger spak + + + Color Adjustment + Färgjustering + + + R: + R: + + + G: + G: + + + B: + B: + + + Override Lightbar Color + Åsidosätt ljusrampens färg + + + Override Color + Åsidosätt färg + + + Unable to Save + Kunde inte spara + + + Cannot bind axis values more than once + Kan inte binda axelvärden fler än en gång + + + Save + Spara + + + Apply + Tillämpa + + + Restore Defaults + Återställ till standard + + + Cancel + Avbryt + + + + EditorDialog + + Edit Keyboard + Mouse and Controller input bindings + Redigera inmatningsbindningar för tangentbord + mus och kontroller + + + Use Per-Game configs + Använd konfigurationer per-spel + + + Error + Fel + + + Could not open the file for reading + Kunde inte öppna filen för läsning + + + Could not open the file for writing + Kunde inte öppna filen för skrivning + + + Save Changes + Spara ändringar + + + Do you want to save changes? + Vill du spara ändringarna? + + + Help + Hjälp + + + Do you want to reset your custom default config to the original default config? + Vill du återställa din anpassade standardkonfiguration till ursprungliga standardkonfigurationen? + + + Do you want to reset this config to your custom default config? + Vill du återställa denna konfiguration till din anpassade standardkonfiguration? + + + Reset to Default + Återställ till standard + + + + ElfViewer + + Open Folder + Öppna mapp + + + + GameInfoClass + + Loading game list, please wait :3 + Läser in spellistan, vänta :3 + + + Cancel + Avbryt + + + Loading... + Läser in... + + + + GameInstallDialog + + shadPS4 - Choose directory + shadPS4 - Välj katalog + + + Directory to install games + Katalog att installera spel till + + + Browse + Bläddra + + + Error + Fel + + + Directory to install DLC + Katalog för att installera DLC + + + + GameListFrame + + Icon + Ikon + + + Name + Namn + + + Serial + Serienummer + + + Compatibility + Kompatibilitet + + + Region + Region + + + Firmware + Firmware + + + Size + Storlek + + + Version + Version + + + Path + Sökväg + + + Play Time + Speltid + + + Never Played + Aldrig spelat + + + h + h + + + m + m + + + s + s + + + Compatibility is untested + Kompatibilitet är otestat + + + Game does not initialize properly / crashes the emulator + Spelet initierar inte korrekt / kraschar emulatorn + + + Game boots, but only displays a blank screen + Spelet startar men visar endast en blank skärm + + + Game displays an image but does not go past the menu + Spelet visar en bild men kommer inte förbi menyn + + + Game has game-breaking glitches or unplayable performance + Spelet har allvarliga problem eller ospelbar prestanda + + + Game can be completed with playable performance and no major glitches + Spelet kan spelas klart med spelbar prestanda och utan större problem + + + Click to see details on github + Klicka för att se detaljer på Github + + + Last updated + Senast uppdaterad + + + + GameListUtils + + B + B + + + KB + KB + + + MB + MB + + + GB + GB + + + TB + TB + + + + GuiContextMenus + + Create Shortcut + Skapa genväg + + + Cheats / Patches + Fusk / Patchar + + + SFO Viewer + SFO-visare + + + Trophy Viewer + Trofé-visare + + + Open Folder... + Öppna mapp... + + + Open Game Folder + Öppna spelmapp + + + Open Save Data Folder + Öppna mapp för sparat data + + + Open Log Folder + Öppna loggmapp + + + Copy info... + Kopiera till... + + + Copy Name + Kopiera namn + + + Copy Serial + Kopiera serienummer + + + Copy Version + Kopiera version + + + Copy Size + Kopiera storlek + + + Copy All + Kopiera alla + + + Delete... + Ta bort... + + + Delete Game + Ta bort spel + + + Delete Update + Ta bort uppdatering + + + Delete DLC + Ta bort DLC + + + Delete Trophy + Ta bort trofé + + + Compatibility... + Kompatibilitet... + + + Update database + Uppdatera databasen + + + View report + Visa rapport + + + Submit a report + Skicka en rapport + + + Shortcut creation + Skapa genväg + + + Shortcut created successfully! + Genvägen skapades! + + + Error + Fel + + + Error creating shortcut! + Fel vid skapandet av genväg! + + + Game + Spel + + + This game has no update to delete! + Detta spel har ingen uppdatering att ta bort! + + + Update + Uppdatera + + + This game has no DLC to delete! + Detta spel har inga DLC att ta bort! + + + DLC + DLC + + + Delete %1 + Ta bort %1 + + + Are you sure you want to delete %1's %2 directory? + Är du säker på att du vill ta bort %1s %2-katalog? + + + Open Update Folder + Öppna uppdateringsmapp + + + Delete Save Data + Ta bort sparat data + + + This game has no update folder to open! + Detta spel har ingen uppdateringsmapp att öppna! + + + No log file found for this game! + Ingen loggfil hittades för detta spel! + + + Failed to convert icon. + Misslyckades med att konvertera ikon. + + + This game has no save data to delete! + Detta spel har inget sparat data att ta bort! + + + This game has no saved trophies to delete! + Detta spel har inga sparade troféer att ta bort! + + + Save Data + Sparat data + + + Trophy + Trofé + + + SFO Viewer for + SFO-visare för + + + + HelpDialog + + Quickstart + Snabbstart + + + FAQ + Frågor och svar + + + Syntax + Syntax + + + Special Bindings + Speciella bindningar + + + Keybindings + Tangentbindningar + + + + KBMSettings + + Configure Controls + Konfigurera kontroller + + + D-Pad + Riktningsknappar + + + Up + Upp + + + unmapped + inte mappad + + + Left + Vänster + + + Right + Höger + + + Down + Ner + + + Left Analog Halfmode + Halvläge för vänster analog + + + hold to move left stick at half-speed + håll ner för att flytta vänster spak i halvfart + + + Left Stick + Vänster spak + + + Config Selection + Konfigurationsval + + + Common Config + Gemensam konfiguration + + + Use per-game configs + Använd konfiguration per-spel + + + L1 + L1 + + + L2 + L2 + + + Text Editor + Textredigerare + + + Help + Hjälp + + + R1 + R1 + + + R2 + R2 + + + L3 + L3 + + + Touchpad Click + Klick på styrplatta + + + Mouse to Joystick + Mus till styrspak + + + *press F7 ingame to activate + *tryck F7 i spelet för att aktivera + + + R3 + R3 + + + Options + Alternativ + + + Mouse Movement Parameters + Parametrar för musrörelse + + + note: click Help Button/Special Keybindings for more information + observera: klicka på Hjälp-knapp/Speciella tangentbindningar för mer information + + + Face Buttons + Handlingsknappar + + + Triangle + Triangel + + + Square + Fyrkant + + + Circle + Cirkel + + + Cross + Kryss + + + Right Analog Halfmode + Halvläge för höger analog + + + hold to move right stick at half-speed + håll ner för att flytta höger spak i halvfart + + + Right Stick + Höger spak + + + Speed Offset (def 0.125): + Offset för hastighet (standard 0.125): + + + Copy from Common Config + Kopiera från gemensam konfiguration + + + Deadzone Offset (def 0.50): + Offset för dödläge (standard 0.50): + + + Speed Multiplier (def 1.0): + Hastighetsmultiplikator (standard 1.0): + + + Common Config Selected + Gemensam konfiguration valdes + + + This button copies mappings from the Common Config to the currently selected profile, and cannot be used when the currently selected profile is the Common Config. + Den här knappen kopierar mappningar från gemensam konfiguration till den aktuella valda profilen och kan inte användas när den aktuella valda profilen är gemensam konfiguration. + + + Copy values from Common Config + Kopiera värden från gemensam konfiguration + + + Do you want to overwrite existing mappings with the mappings from the Common Config? + Vill du skriva över befintliga mappningar med mappningarna från gemensam konfiguration? + + + Unable to Save + Kunde inte spara + + + Cannot bind any unique input more than once + Kan inte binda någon unik inmatning fler än en gång + + + Press a key + Tryck på en tangent + + + Cannot set mapping + Kan inte ställa in mappning + + + Mousewheel cannot be mapped to stick outputs + Mushjulet kan inte mappas till spakutmatningar + + + Save + Spara + + + Apply + Tillämpa + + + Restore Defaults + Återställ till standard + + + Cancel + Avbryt + + + + MainWindow + + Open/Add Elf Folder + Öppna/Lägg till Elf-mapp + + + Boot Game + Starta spel + + + Check for Updates + Leta efter uppdateringar + + + About shadPS4 + Om shadPS4 + + + Configure... + Konfigurera... + + + Recent Games + Senaste spel + + + Open shadPS4 Folder + Öppna shadPS4-mapp + + + Exit + Avsluta + + + Exit shadPS4 + Avsluta shadPS4 + + + Exit the application. + Avsluta programmet. + + + Show Game List + Visa spellista + + + Game List Refresh + Uppdatera spellista + + + Tiny + Mycket små + + + Small + Små + + + Medium + Medelstora + + + Large + Stora + + + List View + Listvy + + + Grid View + Rutnätsvy + + + Elf Viewer + Elf-visare + + + Game Install Directory + Installationskatalog för spel + + + Download Cheats/Patches + Hämta fusk/patchar + + + Dump Game List + Dumpa spellista + + + Trophy Viewer + Trofévisare + + + No games found. Please add your games to your library first. + Inga spel hittades. Lägg till dina spel till biblioteket först. + + + Search... + Sök... + + + File + Arkiv + + + View + Visa + + + Game List Icons + Ikoner för spellista + + + Game List Mode + Läge för spellista + + + Settings + Inställningar + + + Utils + Verktyg + + + Themes + Teman + + + Help + Hjälp + + + Dark + Mörkt + + + Light + Ljust + + + Green + Grönt + + + Blue + Blått + + + Violet + Lila + + + toolBar + Verktygsrad + + + Game List + Spellista + + + * Unsupported Vulkan Version + * Vulkan-versionen stöds inte + + + Download Cheats For All Installed Games + Hämta fusk för alla installerade spel + + + Download Patches For All Games + Hämta patchar för alla spel + + + Download Complete + Hämtning färdig + + + You have downloaded cheats for all the games you have installed. + Du har hämtat fusk till alla spelen som du har installerade. + + + Patches Downloaded Successfully! + Patchar hämtades ner! + + + All Patches available for all games have been downloaded. + Alla patchar tillgängliga för alla spel har hämtats ner. + + + Games: + Spel: + + + ELF files (*.bin *.elf *.oelf) + ELF-filer (*.bin *.elf *.oelf) + + + Game Boot + Starta spel + + + Only one file can be selected! + Endast en fil kan väljas! + + + Run Game + Kör spel + + + Eboot.bin file not found + Filen eboot.bin hittades inte + + + Game is already running! + Spelet är redan igång! + + + shadPS4 + shadPS4 + + + Play + Spela + + + Pause + Paus + + + Stop + Stoppa + + + Restart + Starta om + + + Full Screen + Helskärm + + + Controllers + Kontroller + + + Keyboard + Tangentbord + + + Refresh List + Uppdatera lista + + + Resume + Återuppta + + + Show Labels Under Icons + Visa etiketter under ikoner + + + + SettingsDialog + + Settings + Inställningar + + + General + Allmänt + + + System + System + + + Console Language + Konsollspråk + + + Emulator Language + Emulatorspråk + + + Emulator + Emulator + + + Enable Separate Update Folder + Aktivera separat uppdateringsmapp + + + Default tab when opening settings + Standardflik när inställningar öppnas + + + Show Game Size In List + Visa spelstorlek i listan + + + Show Splash + Visa startskärm + + + Enable Discord Rich Presence + Aktivera Discord Rich Presence + + + Username + Användarnamn + + + Trophy Key + Trofényckel + + + Trophy + Troféer + + + Open the custom trophy images/sounds folder + Öppna mappen för anpassade trofébilder/ljud + + + Logger + Loggning + + + Log Type + Loggtyp + + + Log Filter + Loggfilter + + + Open Log Location + Öppna loggplats + + + Input + Inmatning + + + Cursor + Muspekare + + + Hide Cursor + Dölj muspekare + + + Hide Cursor Idle Timeout + Dölj muspekare vid overksam + + + s + s + + + Controller + Handkontroller + + + Back Button Behavior + Beteende för bakåtknapp + + + Graphics + Grafik + + + GUI + Gränssnitt + + + User + Användare + + + Graphics Device + Grafikenhet + + + Vblank Divider + Vblank Divider + + + Advanced + Avancerat + + + Enable Shaders Dumping + Aktivera Shaders Dumping + + + Enable NULL GPU + Aktivera NULL GPU + + + Enable HDR + Aktivera HDR + + + Paths + Sökvägar + + + Game Folders + Spelmappar + + + Add... + Lägg till... + + + Remove + Ta bort + + + Debug + Felsök + + + Enable Debug Dumping + Aktivera felsökningsdumpning + + + Enable Vulkan Validation Layers + Aktivera Vulkan Validation Layers + + + Enable Vulkan Synchronization Validation + Aktivera Vulkan Synchronization Validation + + + Enable RenderDoc Debugging + Aktivera RenderDoc-felsökning + + + Enable Crash Diagnostics + Aktivera kraschdiagnostik + + + Collect Shaders + Samla shaders + + + Copy GPU Buffers + Kopiera GPU-buffertar + + + Host Debug Markers + Felsökningsmarkörer för värd + + + Guest Debug Markers + Felsökningsmarkörer för gäst + + + Update + Uppdatera + + + Check for Updates at Startup + Leta efter uppdateringar vid uppstart + + + Always Show Changelog + Visa alltid ändringsloggen + + + Update Channel + Uppdateringskanal + + + Check for Updates + Leta efter uppdateringar + + + GUI Settings + Gränssnittsinställningar + + + Title Music + Titelmusik + + + Disable Trophy Notification + Inaktivera troféaviseringar + + + Background Image + Bakgrundsbild + + + Show Background Image + Visa bakgrundsbild + + + Opacity + Opacitet + + + Play title music + Spela titelmusik + + + Update Compatibility Database On Startup + Uppdatera databas vid uppstart + + + Game Compatibility + Spelkompatibilitet + + + Display Compatibility Data + Visa kompatibilitetsdata + + + Update Compatibility Database + Uppdatera kompatibilitetsdatabasen + + + Volume + Volym + + + Save + Spara + + + Apply + Verkställ + + + Restore Defaults + Återställ till standard + + + Close + Stäng + + + Point your mouse at an option to display its description. + Flytta muspekaren till ett alternativ för att visa dess beskrivning. + + + Console Language:\nSets the language that the PS4 game uses.\nIt's recommended to set this to a language the game supports, which will vary by region. + Konsollspråk:\nStäller in språket som PS4-spelet använder.\nDet rekommenderas att ställa in detta till ett språk som spelet har stöd för, vilket kan skilja sig mellan regioner + + + Emulator Language:\nSets the language of the emulator's user interface. + Emulatorspråk:\nStäller in språket för emulatorns användargränssnitt + + + Enable Separate Update Folder:\nEnables installing game updates into a separate folder for easy management.\nThis can be manually created by adding the extracted update to the game folder with the name "CUSA00000-UPDATE" where the CUSA ID matches the game's ID. + Aktivera separat uppdateringsmapp:\nAktiverar installation av speluppdateringar i en separat mapp för enkel hantering.\nDetta kan skapas manuellt genom att lägga till uppackad uppdatering till spelmappen med namnet "CUSA00000-UPDATE" där CUSA ID matchar spelets id + + + Show Splash Screen:\nShows the game's splash screen (a special image) while the game is starting. + Visa startskärm:\nVisar spelets startskärm (en speciell bild) när spelet startas + + + Enable Discord Rich Presence:\nDisplays the emulator icon and relevant information on your Discord profile. + Aktivera Discord Rich Presence:\nVisar emulatorikonen och relevant information på din Discord-profil + + + Username:\nSets the PS4's account username, which may be displayed by some games. + Användarnamn:\nStäller in PS4ans användarkonto, som kan visas av vissa spel + + + Trophy Key:\nKey used to decrypt trophies. Must be obtained from your jailbroken console.\nMust contain only hex characters. + Trofényckel:\nNyckel som används för att avkryptera troféer. Måste hämtas från din konsoll (jailbroken).\nMåste innehålla endast hex-tecken + + + Log Type:\nSets whether to synchronize the output of the log window for performance. May have adverse effects on emulation. + Loggtyp:\nStäller in huruvida synkronisering av utdata för loggfönstret för prestanda. Kan ha inverkan på emulationen + + + Log Filter:\nFilters the log to only print specific information.\nExamples: "Core:Trace" "Lib.Pad:Debug Common.Filesystem:Error" "*:Critical"\nLevels: Trace, Debug, Info, Warning, Error, Critical - in this order, a specific level silences all levels preceding it in the list and logs every level after it. + Loggfilter:\nFiltrera loggen till att endast skriva ut specifik information.\nExempel: "Core:Trace" "Lib.Pad:Debug Common.Filesystem:Error" "*:Critical"\nNivåer: Trace, Debug, Info, Warning, Error, Critical - i den ordningen, en specifik nivå som tystar alla nivåer före den i listan och loggar allting efter den + + + Update:\nRelease: Official versions released every month that may be very outdated, but are more reliable and tested.\nNightly: Development versions that have all the latest features and fixes, but may contain bugs and are less stable. + Uppdatering:\nRelease: Officiella versioner som släpps varje månad som kan vara mycket utdaterade, men är mer pålitliga och testade.\nNightly: Utvecklingsversioner som har de senaste funktionerna och fixarna, men kan innehålla fel och är mindre stabila + + + Background Image:\nControl the opacity of the game background image. + Bakgrundsbild:\nKontrollerar opaciteten för spelets bakgrundsbild + + + Play Title Music:\nIf a game supports it, enable playing special music when selecting the game in the GUI. + Spela upp titelmusik:\nOm ett spel har stöd för det kan speciell musik spelas upp från spelet i gränssnittet + + + Disable Trophy Pop-ups:\nDisable in-game trophy notifications. Trophy progress can still be tracked using the Trophy Viewer (right-click the game in the main window). + Inaktivera popup för troféer:\nInaktivera troféeaviseringar i spel. Troféförlopp kan fortfarande följas med Troféevisaren (högerklicka på spelet i huvudfönstret) + + + Hide Cursor:\nChoose when the cursor will disappear:\nNever: You will always see the mouse.\nidle: Set a time for it to disappear after being idle.\nAlways: you will never see the mouse. + Dölj pekare:\nVälj när muspekaren ska försvinna:\nAldrig: Du kommer alltid se muspekaren.\nOverksam: Ställ in en tid för när den ska försvinna efter den inte använts.\nAlltid: du kommer aldrig se muspekaren + + + Hide Idle Cursor Timeout:\nThe duration (seconds) after which the cursor that has been idle hides itself. + Dölj pekare vid overksam:\nLängden (sekunder) efter vilken som muspekaren som har varit overksam döljer sig själv + + + Back Button Behavior:\nSets the controller's back button to emulate tapping the specified position on the PS4 touchpad. + Beteende för bakåtknapp:\nStäller in handkontrollerns bakåtknapp för att emulera ett tryck på angivna positionen på PS4ns touchpad + + + Display Compatibility Data:\nDisplays game compatibility information in table view. Enable "Update Compatibility On Startup" to get up-to-date information. + Visa kompatibilitetsdata:\nVisar information om spelkompatibilitet i tabellvyn. Aktivera "Uppdatera kompatibilitet vid uppstart" för att få uppdaterad information + + + Update Compatibility On Startup:\nAutomatically update the compatibility database when shadPS4 starts. + Uppdatera kompatibilitet vid uppstart:\nUppdatera automatiskt kompatibilitetsdatabasen när shadPS4 startar + + + Update Compatibility Database:\nImmediately update the compatibility database. + Uppdatera kompatibilitetsdatabasen:\nUppdaterar kompatibilitetsdatabasen direkt + + + Never + Aldrig + + + Idle + Overksam + + + Always + Alltid + + + Touchpad Left + Touchpad vänster + + + Touchpad Right + Touchpad höger + + + Touchpad Center + Touchpad mitten + + + None + Ingen + + + Graphics Device:\nOn multiple GPU systems, select the GPU the emulator will use from the drop down list,\nor select "Auto Select" to automatically determine it. + Grafikenhet:\nFör system med flera GPUer kan du välja den GPU som emulatorn ska använda från rullgardinsmenyn,\neller välja "Auto Select" för att automatiskt bestämma det + + + Width/Height:\nSets the size of the emulator window at launch, which can be resized during gameplay.\nThis is different from the in-game resolution. + Bredd/Höjd:\nStäller in storleken för emulatorfönstret vid uppstart, som kan storleksändras under spelning.\nDetta är inte det samma som spelupplösningen + + + Vblank Divider:\nThe frame rate at which the emulator refreshes at is multiplied by this number. Changing this may have adverse effects, such as increasing the game speed, or breaking critical game functionality that does not expect this to change! + Vblank Divider:\nBildfrekvensen som emulatorn uppdaterar vid multipliceras med detta tal. Ändra detta kan ha inverkan på saker, såsom ökad spelhastighet eller göra sönder kritisk spelfunktionalitet, som inte förväntar sig denna ändring + + + Enable Shaders Dumping:\nFor the sake of technical debugging, saves the games shaders to a folder as they render. + Aktivera Shaders Dumping:\nFör teknisk felsökning, sparar spelets shaders till en mapp när de renderas + + + Enable Null GPU:\nFor the sake of technical debugging, disables game rendering as if there were no graphics card. + Aktivera Null GPU:\nFör teknisk felsökning, inaktiverar spelrenderingen som om det inte fanns något grafikkort + + + Enable HDR:\nEnables HDR in games that support it.\nYour monitor must have support for the BT2020 PQ color space and the RGB10A2 swapchain format. + Aktivera HDR:\nAktiverar HDR i spel som har stöd för det.\nDin skärm måste ha stöd för färgrymden BT2020 PQ samt swapchain-formatet RGB10A2. + + + Game Folders:\nThe list of folders to check for installed games. + Spelmappar:\nListan över mappar att leta i efter installerade spel + + + Add:\nAdd a folder to the list. + Aktivera separat uppdateringsmapp:\nAktiverar installation av speluppdateringar till en separat mapp för enkel hantering.\nDetta kan manuellt skapas genom att lägga till den uppackade uppdateringen till spelmappen med namnet "CUSA00000-UPDATE" där CUSA ID matchar spelets id + + + Remove:\nRemove a folder from the list. + Ta bort:\nTa bort en mapp från listan + + + Enable Debug Dumping:\nSaves the import and export symbols and file header information of the currently running PS4 program to a directory. + Aktivera felsökningsdumpning:\nSparar import och export av symboler och fil-header-information för aktuellt körande PS4-program till en katalog + + + Enable Vulkan Validation Layers:\nEnables a system that validates the state of the Vulkan renderer and logs information about its internal state.\nThis will reduce performance and likely change the behavior of emulation. + Aktivera Vulkan Validation Layers:\nAktiverar ett system som validerar tillståndet för Vulkan renderer och loggar information om dess interna tillstånd.\nDetta kommer minska prestandan och antagligen ändra beteendet för emuleringen + + + Enable Vulkan Synchronization Validation:\nEnables a system that validates the timing of Vulkan rendering tasks.\nThis will reduce performance and likely change the behavior of emulation. + Aktivera Vulkan Synchronization Validation:\nAktiverar ett system som validerar timing för Vulkan rendering tasks.\nDetta kommer minska prestandan och antagligen ändra beteendet för emuleringen + + + Enable RenderDoc Debugging:\nIf enabled, the emulator will provide compatibility with Renderdoc to allow capture and analysis of the currently rendered frame. + Aktivera RenderDoc-felsökning:\nOm aktiverad kommer emulatorn att tillhandahålla kompatibilitet med Renderdoc för att tillåta fångst och analys för aktuell renderad bildruta + + + Collect Shaders:\nYou need this enabled to edit shaders with the debug menu (Ctrl + F10). + Samla shaders:\nDu behöver aktivera detta för att redigera shaders med felsökningsmenyn (Ctrl + F10) + + + Crash Diagnostics:\nCreates a .yaml file with info about the Vulkan state at the time of crashing.\nUseful for debugging 'Device lost' errors. If you have this enabled, you should enable Host AND Guest Debug Markers.\nDoes not work on Intel GPUs.\nYou need Vulkan Validation Layers enabled and the Vulkan SDK for this to work. + Krashdiagnostik:\nSkapar en .yaml-fil med information om Vulkan-tillståndet vid tid för kraschen.\nAnvändbart för felsökning av 'Device lost'-fel. Om du har aktiverat detta bör du aktivera felsökningsmarkörer för Värd OCH Gäst.\nFungerar inte på Intel GPUer.\nDu behöver aktivera Vulkan Validation Layers och Vulkan SDK för att detta ska fungera + + + Copy GPU Buffers:\nGets around race conditions involving GPU submits.\nMay or may not help with PM4 type 0 crashes. + Kopiera GPU-buffertar:\nGör att man kan komma runt race conditions som involverar GPU submits.\nKan eller kan inte hjälpa med PM4 type 0-kraschar + + + Host Debug Markers:\nInserts emulator-side information like markers for specific AMDGPU commands around Vulkan commands, as well as giving resources debug names.\nIf you have this enabled, you should enable Crash Diagnostics.\nUseful for programs like RenderDoc. + Felsökningsmarkörer för värd:\nInfogar informationsliknande markörer i emulatorn för specifika AMDGPU-kommandon runt Vulkan-kommandon, så väl som ger resurser felsökningsnamn.\nOm du har detta aktiverat bör du aktivera Kraschdiagnostik.\nAnvändbart för program som RenderDoc + + + Guest Debug Markers:\nInserts any debug markers the game itself has added to the command buffer.\nIf you have this enabled, you should enable Crash Diagnostics.\nUseful for programs like RenderDoc. + Felsökningsmarkörer för gäst:\nInfogar felsökningsmarkörer som själva spelet har lagt till i kommandobufferten.\nOm du har aktiverat detta bör du aktivera Kraschdiagnostik.\nAnvändbart för program som RenderDoc + + + Save Data Path:\nThe folder where game save data will be saved. + Sökväg för sparat data:\nSökvägen där spelets sparade data kommer att sparas + + + Browse:\nBrowse for a folder to set as the save data path. + Bläddra:\nBläddra efter en mapp att ställa in som sökväg för sparat data + + + Release + Release + + + Nightly + Nightly + + + Set the volume of the background music. + Ställ in volymen för bakgrundsmusiken. + + + Enable Motion Controls + Aktivera rörelsekontroller + + + Save Data Path + Sökväg för sparat data + + + Browse + Bläddra + + + async + asynk + + + sync + synk + + + Auto Select + Välj automatiskt + + + Directory to install games + Katalog att installera spel till + + + Directory to save data + Katalog för sparat data + + + Video + Video + + + Display Mode + Visningsläge + + + Windowed + Fönster + + + Fullscreen + Helskärm + + + Fullscreen (Borderless) + Helskärm (kantlöst) + + + Window Size + Fönsterstorlek + + + W: + B: + + + H: + H: + + + Separate Log Files + Separata loggfiler + + + Separate Log Files:\nWrites a separate logfile for each game. + Separata loggfiler:\nSkriver en separat loggfil för varje spel. + + + Trophy Notification Position + Aviseringsposition för trofé + + + Left + Vänster + + + Right + Höger + + + Top + Överst + + + Bottom + Nederst + + + Notification Duration + Varaktighet för avisering + + + Portable User Folder + Portabel användarmapp + + + Create Portable User Folder from Common User Folder + Skapa portabel användarmapp från gemensam användarmapp + + + Portable user folder:\nStores shadPS4 settings and data that will be applied only to the shadPS4 build located in the current folder. Restart the app after creating the portable user folder to begin using it. + Portabel användarmapp:\nLagrar shadPS4-inställningar och data som endast tillämpas på den shadPS4-version som finns i den aktuella mappen. Starta om appen efter att du har skapat den portabla användarmappen för att börja använda den. + + + Cannot create portable user folder + Kan inte skapa portabel användarmapp + + + %1 already exists + %1 finns redan + + + Portable user folder created + Portabel användarmapp skapad + + + %1 successfully created. + %1 skapades. + + + Open the custom trophy images/sounds folder:\nYou can add custom images to the trophies and an audio.\nAdd the files to custom_trophy with the following names:\ntrophy.wav OR trophy.mp3, bronze.png, gold.png, platinum.png, silver.png\nNote: The sound will only work in QT versions. + Öppna mappen för anpassade trofébilder/ljud:\nDu kan lägga till egna bilder till troféerna och ett ljud.\nLägg till filerna i custom_trophy med följande namn:\ntrophy.wav ELLER trophy.mp3, bronze.png, gold.png, platinum.png, silver.png\nObservera: Ljudet fungerar endast i QT-versioner. + + + + TrophyViewer + + Trophy Viewer + Trofé-visare + + + Select Game: + Välj spel: + + + Progress + Förlopp + + + Show Earned Trophies + Visa förtjänade troféer + + + Show Not Earned Trophies + Visa icke-förtjänade troféer + + + Show Hidden Trophies + Visa dolda troféer + + + diff --git a/src/qt_gui/translations/tr_TR.ts b/src/qt_gui/translations/tr_TR.ts index a03a48660..d2d018116 100644 --- a/src/qt_gui/translations/tr_TR.ts +++ b/src/qt_gui/translations/tr_TR.ts @@ -1,1664 +1,2089 @@ + - - - - AboutDialog - - - About shadPS4 - shadPS4 Hakkında - - - - shadPS4 - shadPS4 - - - - 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. - Bu yazılım, yasal olarak edinmediğiniz oyunları oynamak için kullanılmamalıdır. - - - - ElfViewer - - - Open Folder - Klasörü Aç - - - - GameInfoClass - - - Loading game list, please wait :3 - Oyun listesi yükleniyor, lütfen bekleyin :3 - - - - Cancel - İptal - - - - Loading... - Yükleniyor... - - - - InstallDirSelect - - - shadPS4 - Choose directory - shadPS4 - Klasörü Seç - - - - Select which directory you want to install to. - Select which directory you want to install to. - - - - GameInstallDialog - - - shadPS4 - Choose directory - shadPS4 - Klasörü Seç - - - - Directory to install games - Oyunların yükleneceği klasör - - - - Browse - Gözat - - - - Error - Hata - - - - 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. - - - - GuiContextMenus - - - Create Shortcut - Kısayol Oluştur - - - - Cheats / Patches - Hileler / Yamanlar - - - - SFO Viewer - SFO Görüntüleyici - - - - Trophy Viewer - Kupa Görüntüleyici - - - - Open Folder... - Klasörü Aç... - - - - Open Game Folder - Oyun Klasörünü Aç - - - - Open Save Data Folder - Kaydetme Verileri Klasörünü Aç - - - - Open Log Folder - Log Klasörünü Aç - - - - Copy info... - Bilgiyi Kopyala... - - - - Copy Name - Adı Kopyala - - - - Copy Serial - Seri Numarasını Kopyala - - - - Copy All - Tümünü Kopyala - - - - Delete... - Delete... - - - - Delete Game - Delete Game - - - - Delete Update - Delete Update - - - - Delete DLC - Delete DLC - - - - Compatibility... - Compatibility... - - - - Update database - Update database - - - - View report - View report - - - - Submit a report - Submit a report - - - - Shortcut creation - Kısayol oluşturma - - - - Shortcut created successfully! - Kısayol başarıyla oluşturuldu! - - - - Error - Hata - - - - Error creating shortcut! - Kısayol oluşturulurken hata oluştu! - - - - Install PKG - PKG Yükle - - - - Game - Game - - - - requiresEnableSeparateUpdateFolder_MSG - This feature requires the 'Enable Separate Update Folder' config option to work. If you want to use this feature, please enable it. - - - - This game has no update to delete! - This game has no update to delete! - - - - Update - Update - - - - This game has no DLC to delete! - This game has no DLC to delete! - - - - DLC - DLC - - - - Delete %1 - Delete %1 - - - - Are you sure you want to delete %1's %2 directory? - Are you sure you want to delete %1's %2 directory? - - - - MainWindow - - - Open/Add Elf Folder - Elf Klasörünü Aç/Ekle - - - - Install Packages (PKG) - Paketleri Kur (PKG) - - - - Boot Game - Oyunu Başlat - - - - Check for Updates - Güncellemeleri kontrol et - - - - About shadPS4 - shadPS4 Hakkında - - - - Configure... - Yapılandır... - - - - Install application from a .pkg file - .pkg dosyasından uygulama yükle - - - - Recent Games - Son Oyunlar - - - - Exit - Çıkış - - - - Exit shadPS4 - shadPS4'ten Çık - - - - Exit the application. - Uygulamadan çık. - - - - Show Game List - Oyun Listesini Göster - - - - Game List Refresh - Oyun Listesini Yenile - - - - Tiny - Küçük - - - - Small - Ufak - - - - Medium - Orta - - - - Large - Büyük - - - - List View - Liste Görünümü - - - - Grid View - Izgara Görünümü - - - - Elf Viewer - Elf Görüntüleyici - - - - Game Install Directory - Oyun Kurulum Klasörü - - - - Download Cheats/Patches - Hileleri/Yamaları İndir - - - - Dump Game List - Oyun Listesini Kaydet - - - - PKG Viewer - PKG Görüntüleyici - - - - Search... - Ara... - - - - File - Dosya - - - - View - Görünüm - - - - Game List Icons - Oyun Listesi Simgeleri - - - - Game List Mode - Oyun Listesi Modu - - - - Settings - Ayarlar - - - - Utils - Yardımcı Araçlar - - - - Themes - Temalar - - - - Help - Yardım - - - - Dark - Koyu - - - - Light - Açık - - - - Green - Yeşil - - - - Blue - Mavi - - - - Violet - Mor - - - - toolBar - Araç Çubuğu - - - - PKGViewer - - - Open Folder - Klasörü Aç - - - - TrophyViewer - - - Trophy Viewer - Kupa Görüntüleyici - - - - SettingsDialog - - - Settings - Ayarlar - - - - General - Genel - - - - System - Sistem - - - - Console Language - Konsol Dili - - - - Emulator Language - Emülatör Dili - - - - Emulator - Emülatör - - - - Enable Fullscreen - Tam Ekranı Etkinleştir - - - - Enable Separate Update Folder - Enable Separate Update Folder - - - - Show Splash - Başlangıç Ekranını Göster - - - - Is PS4 Pro - PS4 Pro - - - - Enable Discord Rich Presence - Discord Rich Presence'i etkinleştir - - - - Username - Kullanıcı Adı - - - - Trophy Key - Trophy Key - - - - Trophy - Trophy - - - - Logger - Kayıt Tutucu - - - - Log Type - Kayıt Türü - - - - Log Filter - Kayıt Filtresi - - - - Input - Girdi - - - - Cursor - İmleç - - - - Hide Cursor - İmleci Gizle - - - - Hide Cursor Idle Timeout - İmleç İçin Hareketsizlik Zaman Aşımı - - - - s - s - - - - Controller - Kontrolcü - - - - Back Button Behavior - Geri Dön Butonu Davranışı - - - - Graphics - Grafikler - - - - Graphics Device - Grafik Cihazı - - - - Width - Genişlik - - - - Height - Yükseklik - - - - Vblank Divider - Vblank Bölücü - - - - Advanced - Gelişmiş - - - - Enable Shaders Dumping - Shader Kaydını Etkinleştir - - - - Enable NULL GPU - NULL GPU'yu Etkinleştir - - - - Paths - Yollar - - - - Game Folders - Oyun Klasörleri - - - - Add... - Ekle... - - - - Remove - Kaldır - - - - Debug - Hata Ayıklama - - - - Enable Debug Dumping - Hata Ayıklama Dökümü Etkinleştir - - - - Enable Vulkan Validation Layers - Vulkan Doğrulama Katmanlarını Etkinleştir - - - - Enable Vulkan Synchronization Validation - Vulkan Senkronizasyon Doğrulamasını Etkinleştir - - - - Enable RenderDoc Debugging - RenderDoc Hata Ayıklamayı Etkinleştir - - - - Update - Güncelle - - - - Check for Updates at Startup - Başlangıçta güncellemeleri kontrol et - - - - Update Channel - Güncelleme Kanalı - - - - Check for Updates - Güncellemeleri Kontrol Et - - - - GUI Settings - GUI Ayarları - - - - Disable Trophy Pop-ups - Disable Trophy Pop-ups - - - - Play title music - Başlık müziğini çal - - - - Update Compatibility Database On Startup - Update Compatibility Database On Startup - - - - Game Compatibility - Game Compatibility - - - - Display Compatibility Data - Display Compatibility Data - - - - Update Compatibility Database - Update Compatibility Database - - - - Volume - Ses seviyesi - - - - Audio Backend - Audio Backend - - - - MainWindow - - - Game List - Oyun Listesi - - - - * 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 Yamaları İ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! - Yama tespit edildi! - - - - PKG and Game versions match: - PKG ve oyun sürümleri uyumlu: - - - - Would you like to overwrite? - Üzerine yazmak ister misiniz? - - - - PKG Version %1 is older than installed version: - PKG Sürümü %1, kurulu sürümden daha eski: - - - - Game is installed: - Oyun yüklendi: - - - - Would you like to install Patch: - Yamanın yüklenmesini ister misiniz: - - - - DLC Installation - DLC Yükleme - - - - Would you like to install DLC: %1? - DLC'yi yüklemek ister misiniz: %1? - - - - DLC already installed: - DLC zaten yüklü: - - - - Game already installed - Oyun zaten yüklü - - - - 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 for - Cheats / Patches for - - - - 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 - - - - Delete File - Dosyayı Sil - - - - No files selected. - Hiçbir dosya seçilmedi. - - - - 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ı 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. Yamanın görünmemesi durumunda, belirli seri numarası ve oyun sürümü için mevcut olmayabilir. - - - - Failed to parse JSON data from HTML. - HTML'den JSON verileri ayrıştırılamadı. - - - - Failed to retrieve HTML page. - HTML sayfası alınamadı. - - - - The game is in version: %1 - Oyun sürümde: %1 - - - - The downloaded patch only works on version: %1 - İndirilen yamanın sadece sürümde çalışıyor: %1 - - - - You may need to update your game. - Oyunuzu güncellemeniz gerekebilir. - - - - Incompatibility Notice - Uyumsuzluk Bildirimi - - - - 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: - - - - Can't apply cheats before the game is started - Hileleri oyuna başlamadan önce uygulayamazsınız. - - - - SettingsDialog - - - Save - Kaydet - - - - Apply - Uygula - - - - Restore Defaults - Varsayılanları Geri Yükle - - - - Close - Kapat - - - - Point your mouse at an option to display its description. - Seçenek üzerinde farenizi tutarak açıklamasını görüntüleyin. - - - - consoleLanguageGroupBox - Konsol Dili:\nPS4 oyununun kullandığı dili ayarlar.\nBu seçeneği, oyunun desteklediği bir dilde ayarlamanız önerilir; bu durum bölgeye göre değişebilir. - - - - emulatorLanguageGroupBox - Emülatör Dili:\nEmülatörün kullanıcı arayüzünün dilini ayarlar. - - - - fullscreenCheckBox - Tam Ekranı Etkinleştir:\nOyun penceresini otomatik olarak tam ekran moduna alır.\nBu, F11 tuşuna basarak geçiş yapılabilir. - - - - separateUpdatesCheckBox - Enable Separate Update Folder:\nEnables installing game updates into a separate folder for easy management. - - - - showSplashCheckBox - Açılış Ekranını Göster:\nOyun açılırken (özel bir görüntü) açılış ekranını gösterir. - - - - ps4proCheckBox - PS4 Pro:\nEmülatörü bir PS4 PRO gibi çalıştırır; bu, bunu destekleyen oyunlarda özel özellikleri etkinleştirebilir. - - - - discordRPCCheckbox - Discord Rich Presence'i etkinleştir:\nEmülatör simgesini ve Discord profilinizdeki ilgili bilgileri gösterir. - - - - userName - Kullanıcı Adı:\nBazı oyunlar tarafından gösterilebilen PS4 hesabının kullanıcı adını ayarlar. - - - - TrophyKey - Trophy Key:\nKey used to decrypt trophies. Must be obtained from your jailbroken console.\nMust contain only hex characters. - - - - logTypeGroupBox - Günlük Türü:\nPerformans için günlük penceresi çıkışını senkronize etme durumunu ayarlar. Bu, emülasyonda olumsuz etkilere yol açabilir. - - - - logFilter - Günlük Filtre:\nSadece belirli bilgileri yazdırmak için günlüğü filtreler.\nÖrnekler: "Core:Trace" "Lib.Pad:Debug Common.Filesystem:Error" "*:Critical" Düzeyler: Trace, Debug, Info, Warning, Error, Critical - bu sırada, belirli bir seviye listede önceki tüm seviyeleri susturur ve sonraki tüm seviyeleri kaydeder. - - - - updaterGroupBox - Güncelleme:\nRelease: Her ay yayınlanan resmi sürümler; çok eski olabilirler, ancak daha güvenilirdir ve test edilmiştir.\nNightly: Tüm en son özellikler ve düzeltmeler ile birlikte geliştirme sürümleri; hatalar içerebilir ve daha az kararlıdırlar. - - - - GUIgroupBox - Başlık Müziklerini Çal:\nEğer bir oyun bunu destekliyorsa, GUI'de oyunu seçtiğinizde özel müziklerin çalmasını etkinleştirir. - - - - disableTrophycheckBox - Disable Trophy Pop-ups:\nDisable in-game trophy notifications. Trophy progress can still be tracked using the Trophy Viewer (right-click the game in the main window). - - - - hideCursorGroupBox - İmleci gizle:\nİmlecin ne zaman kaybolacağını seçin:\nAsla: Fareyi her zaman göreceksiniz.\nPasif: Hareketsiz kaldıktan sonra kaybolması için bir süre belirleyin.\nHer zaman: fareyi asla göremeyeceksiniz. - - - - idleTimeoutGroupBox - Hareket etmeden sonra imlecin kaybolacağı süreyi ayarlayın. - - - - backButtonBehaviorGroupBox - Geri düğmesi davranışı:\nKontrol cihazındaki geri düğmesini, PS4'ün dokunmatik panelindeki belirlenen noktaya dokunmak için ayarlar. - - - - enableCompatibilityCheckBox - Display Compatibility Data:\nDisplays game compatibility information in table view. Enable "Update Compatibility On Startup" to get up-to-date information. - - - - checkCompatibilityOnStartupCheckBox - Update Compatibility On Startup:\nAutomatically update the compatibility database when shadPS4 starts. - - - - updateCompatibilityButton - Update Compatibility Database:\nImmediately update the compatibility database. - - - - Never - Asla - - - - Idle - Boşta - - - - Always - Her zaman - - - - Touchpad Left - Dokunmatik Yüzey Sol - - - - Touchpad Right - Dokunmatik Yüzey Sağ - - - - Touchpad Center - Dokunmatik Yüzey Orta - - - - None - Yok - - - - graphicsAdapterGroupBox - Grafik Aygıtı:\nBirden fazla GPU'ya sahip sistemlerde, emülatörün kullanacağı GPU'yu açılır listeden seçin,\nor "Auto Select" seçeneğini seçerek otomatik olarak belirlenmesini sağlayın. - - - - resolutionLayout - Genişlik/Yükseklik:\nEmülatör penceresinin açılışta boyutunu ayarlar; bu, oyun sırasında yeniden boyutlandırılabilir.\nBu, oyundaki çözünürlükten farklıdır. - - - - heightDivider - Vblank Bölücü:\nEmülatörün yenileme hızı bu sayı ile çarpılır. Bu değerin değiştirilmesi olumsuz etkilere yol açabilir; oyun hızını artırabilir veya oyunun beklemediği kritik işlevselliği bozabilir! - - - - dumpShadersCheckBox - Shader'ları Dışa Aktarmayı Etkinleştir:\nTeknik hata ayıklama amacıyla, shader'ları render edildikçe bir klasöre kaydeder. - - - - nullGpuCheckBox - Null GPU'yu Etkinleştir:\nTeknik hata ayıklama amacıyla, oyunun render edilmesini grafik kartı yokmuş gibi devre dışı bırakır. - - - - gameFoldersBox - Oyun klasörleri:\nYüklenmiş oyunları kontrol etmek için klasörlerin listesi. - - - - addFolderButton - Ekle:\nListeye bir klasör ekle. - - - - removeFolderButton - Kaldır:\nListeden bir klasörü kaldır. - - - - debugDump - Hata Ayıklama için Dışa Aktarmayı Etkinleştir:\nŞu anda çalışan PS4 uygulaması için içe aktarılan ve dışa aktarılan sembolleri ve dosya başlık bilgilerini bir dizine kaydedin. - - - - vkValidationCheckBox - Vulkan Doğrulama Katmanlarını Etkinleştir:\nVulkan renderlayıcısının durumunu doğrulayan ve iç durum hakkında bilgi kaydeden bir sistemi etkinleştirir. Bu, performansı düşürür ve muhtemelen emülasyon davranışını değiştirir. - - - - vkSyncValidationCheckBox - Vulkan Senkronizasyon Doğrulamasını Etkinleştir:\nVulkan renderlama görevlerinin senkronizasyonunu doğrulayan bir sistemi etkinleştirir. Bu, performansı düşürür ve muhtemelen emülasyon davranışını değiştirir. - - - - rdocCheckBox - RenderDoc Hata Ayıklamayı Etkinleştir:\nEğer etkinleştirilirse, emülatör mevcut render edilmiş çerçeveyi yakalamak ve analiz etmek için Renderdoc ile uyumluluk sunar. - - - - GameListFrame - - - Icon - Simge - - - - Name - Ad - - - - Serial - Seri Numarası - - - - Compatibility - Compatibility - - - - Region - Bölge - - - - Firmware - Yazılım - - - - Size - Boyut - - - - Version - Sürüm - - - - Path - Yol - - - - Play Time - Oynama Süresi - - - - Never Played - Never Played - - - - h - h - - - - m - m - - - - s - s - - - - Compatibility is untested - Compatibility is untested - - - - Game does not initialize properly / crashes the emulator - Game does not initialize properly / crashes the emulator - - - - Game boots, but only displays a blank screen - Game boots, but only displays a blank screen - - - - Game displays an image but does not go past the menu - Game displays an image but does not go past the menu - - - - Game has game-breaking glitches or unplayable performance - Game has game-breaking glitches or unplayable performance - - - - Game can be completed with playable performance and no major glitches - Game can be completed with playable performance and no major glitches - - - - CheckUpdate - - - Auto Updater - Otomatik Güncelleyici - - - - Error - Hata - - - - Network error: - Ağ hatası: - - - - Failed to parse update information. - Güncelleme bilgilerini ayrıştırma başarısız oldu. - - - - No pre-releases found. - Ön sürüm bulunamadı. - - - - Invalid release data. - Geçersiz sürüm verisi. - - - - No download URL found for the specified asset. - Belirtilen varlık için hiçbir indirme URL'si bulunamadı. - - - - Your version is already up to date! - Versiyonunuz zaten güncel! - - - - Update Available - Güncelleme Mevcut - - - - Update Channel - Güncelleme Kanalı - - - - Current Version - Mevcut Versiyon - - - - Latest Version - Son Versiyon - - - - Do you want to update? - Güncellemek istiyor musunuz? - - - - Show Changelog - Değişiklik Günlüğünü Göster - - - - Check for Updates at Startup - Başlangıçta güncellemeleri kontrol et - - - - Update - Güncelle - - - - No - Hayır - - - - Hide Changelog - Değişiklik Günlüğünü Gizle - - - - Changes - Değişiklikler - - - - Network error occurred while trying to access the URL - URL'ye erişmeye çalışırken bir ağ hatası oluştu - - - - Download Complete - İndirme Tamamlandı - - - - The update has been downloaded, press OK to install. - Güncelleme indirildi, yüklemek için Tamam'a basın. - - - - Failed to save the update file at - Güncelleme dosyası kaydedilemedi - - - - Starting Update... - Güncelleme Başlatılıyor... - - - - Failed to create the update script file - Güncelleme betiği dosyası oluşturulamadı - - - - GameListUtils - - - B - B - - - - KB - KB - - - - MB - MB - - - - GB - GB - - - - TB - TB - - - \ No newline at end of file + + + AboutDialog + + About shadPS4 + shadPS4 Hakkında + + + 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. + Bu yazılım, yasal olarak edinmediğiniz oyunları oynamak için kullanılmamalıdır. + + + + CheatsPatches + + Cheats / Patches for + Hileler / Yamalar: + + + 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:\n + Hileler/Yamalar deneysel özelliklerdir.\nDikkatli kullanın.\n\nHileleri depo seçerek ve indirme düğmesine tıklayarak ayrı ayrı indirin.\nYamalar sekmesinde tüm yamaları tek seferde indirebilir, hangi yamaları kullanmak istediğinizi seçebilir ve seçiminizi kaydedebilirsiniz.\n\nHileleri ve yamaları biz geliştirmediğimiz için\nsorunlarınızı hile geliştiricisine bildirin.\n\nYeni bir hile oluşturduysanız şu adresi ziyaret edin:\n + + + No Image Available + Kaynak 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 + + + Delete File + Dosyayı Sil + + + No files selected. + Hiçbir dosya seçilmedi. + + + 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çili 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ı 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ılı + + + 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 mevcut + + + File already exists. Do you want to replace it? + Dosya zaten mevcut. Var olan dosyayı değiştirmek istiyor musunuz? + + + Failed to save file: + Dosya kaydedilemedi: + + + Failed to download file: + Dosya indirilemedi: + + + Cheats Not Found + Hileler Bulunamadı + + + No Cheats found for this game in this version of the selected repository,try another repository or a different version of the game. + 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 + + + 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. + 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ı + + + 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. If the patch does not appear, it may be that it does not exist for the specific serial and version of the game. + 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. Yamanın görünmemesi durumunda, belirli seri numarası ve oyun sürümü için mevcut olmayabilir. + + + Failed to parse JSON data from HTML. + HTML'den JSON verileri ayrıştırılamadı. + + + Failed to retrieve HTML page. + HTML sayfası alınamadı. + + + The game is in version: %1 + Oyun sürümü: %1 + + + The downloaded patch only works on version: %1 + İndirilen yama sadece şu sürümde çalışıyor: %1 + + + You may need to update your game. + Oyunuzu güncellemeniz gerekebilir. + + + Incompatibility Notice + Uyumsuzluk Bildirimi + + + 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: + Dizin mevcut değil: + + + Failed to open files.json for reading. + files.json dosyası okumak için açılamadı. + + + Name: + İsim: + + + Can't apply cheats before the game is started + Hileleri oyuna başlamadan önce uygulayamazsınız. + + + Close + Kapat + + + + CheckUpdate + + Auto Updater + Otomatik Güncelleyici + + + Error + Hata + + + Network error: + Ağ hatası: + + + The Auto Updater allows up to 60 update checks per hour.\nYou have reached this limit. Please try again later. + Otomatik Güncelleyici, saat başına en fazla 60 güncelleme kontrolüne izin verir.\nBu sınıra ulaştınız. Lütfen daha sonra tekrar deneyin. + + + Failed to parse update information. + Güncelleme bilgilerini ayrıştırma başarısız oldu. + + + No pre-releases found. + Ön sürüm bulunamadı. + + + Invalid release data. + Geçersiz sürüm verisi. + + + No download URL found for the specified asset. + Belirtilen varlık için hiçbir indirme URL'si bulunamadı. + + + Your version is already up to date! + Sürümünüz zaten güncel! + + + Update Available + Güncelleme Mevcut + + + Update Channel + Güncelleme Kanalı + + + Current Version + Mevcut Sürüm + + + Latest Version + Son Sürüm + + + Do you want to update? + Güncellemek istiyor musunuz? + + + Show Changelog + Değişiklik Günlüğünü Göster + + + Check for Updates at Startup + Başlangıçta güncellemeleri kontrol et + + + Update + Güncelle + + + No + Hayır + + + Hide Changelog + Değişiklik Günlüğünü Gizle + + + Changes + Değişiklikler + + + Network error occurred while trying to access the URL + URL'ye erişmeye çalışırken bir ağ hatası oluştu + + + Download Complete + İndirme Tamamlandı + + + The update has been downloaded, press OK to install. + Güncelleme indirildi, yüklemek için Tamam'a basın. + + + Failed to save the update file at + Güncelleme dosyası kaydedilemedi + + + Starting Update... + Güncelleme Başlatılıyor... + + + Failed to create the update script file + Güncelleme komut dosyası oluşturulamadı + + + + CompatibilityInfoClass + + Fetching compatibility data, please wait + Uyumluluk verileri alınıyor, lütfen bekleyin + + + Cancel + İptal + + + Loading... + Yükleniyor... + + + Error + Hata + + + Unable to update compatibility data! Try again later. + Uyumluluk verileri güncellenemedi! Lütfen daha sonra tekrar deneyin. + + + Unable to open compatibility_data.json for writing. + compatibility_data.json dosyasını yazmak için açamadık. + + + Unknown + Bilinmeyen + + + Nothing + Hiçbir şey + + + Boots + Botlar + + + Menus + Menüler + + + Ingame + Oyunda + + + Playable + Oynanabilir + + + + ControlSettings + + Configure Controls + Kontrolleri Yapılandır + + + D-Pad + Yön Düğmeleri + + + Up + Yukarı + + + Left + Sol + + + Right + Sağ + + + Down + Aşağı + + + Left Stick Deadzone (def:2 max:127) + Sol Analog Ölü Bölgesi (varsayılan: 2, en çok: 127) + + + Left Deadzone + Sol Ölü Bölge + + + Left Stick + Sol Analog + + + Config Selection + Yapılandırma Seçimi + + + Common Config + Ortak Yapılandırma + + + Use per-game configs + Oyuna özel yapılandırma kullan + + + L1 / LB + L1 / LB + + + L2 / LT + L2 / LT + + + Back + Geri + + + R1 / RB + R1 / RB + + + R2 / RT + R2 / RT + + + L3 + L3 + + + Options / Start + Seçenekler / Başlat + + + R3 + R3 + + + Face Buttons + Eylem Düğmeleri + + + Triangle / Y + Üçgen / Y + + + Square / X + Kare / X + + + Circle / B + Daire / B + + + Cross / A + Çarpı / A + + + Right Stick Deadzone (def:2, max:127) + Sağ Analog Ölü Bölgesi (varsayılan: 2, en çok: 127) + + + Right Deadzone + Sağ Ölü Bölge + + + Right Stick + Sağ Analog + + + Color Adjustment + Renk Ayarları + + + R: + K: + + + G: + Y: + + + B: + M: + + + Override Lightbar Color + Işıklı Çubuk Rengini Geçersiz Kıl + + + Override Color + Rengi Geçersiz Kıl + + + Unable to Save + Kaydedilemedi + + + Cannot bind axis values more than once + Eksen değerleri birden fazla kez bağlanamaz + + + Save + Kaydet + + + Apply + Uygula + + + Restore Defaults + Varsayılanlara Sıfırla + + + Cancel + İptal + + + + EditorDialog + + Edit Keyboard + Mouse and Controller input bindings + Klavye + Fare ve Kontrolcü tuş atamalarını düzenle + + + Use Per-Game configs + Oyuna özel yapılandırma kullan + + + Error + Hata + + + Could not open the file for reading + Dosya okumak için açılamadı + + + Could not open the file for writing + Dosya yazmak için açılamadı + + + Save Changes + Değişiklikleri Kaydet + + + Do you want to save changes? + Değişiklikleri kaydetmek istiyor musunuz? + + + Help + Yardım + + + Do you want to reset your custom default config to the original default config? + Özel varsayılan yapılandırmanızı, orijinal varsayılan yapılandırmaya sıfırlamak istiyor musunuz? + + + Do you want to reset this config to your custom default config? + Bu yapılandırmayı özel varsayılan yapılandırmanıza sıfırlamak istiyor musunuz? + + + Reset to Default + Varsayılanlara Sıfırla + + + + ElfViewer + + Open Folder + Klasörü Aç + + + + GameInfoClass + + Loading game list, please wait :3 + Oyun listesi yükleniyor, lütfen bekleyin :3 + + + Cancel + İptal + + + Loading... + Yükleniyor... + + + + GameInstallDialog + + shadPS4 - Choose directory + shadPS4 - Klasörü Seç + + + Directory to install games + Oyunların yükleneceği dizin + + + Browse + Gözat + + + Error + Hata + + + Directory to install DLC + DLC'lerin yükleneceği dizin + + + + GameListFrame + + Icon + Simge + + + Name + Ad + + + Serial + Seri Numarası + + + Compatibility + Uyumluluk + + + Region + Bölge + + + Firmware + Yazılım + + + Size + Boyut + + + Version + Sürüm + + + Path + Yol + + + Play Time + Oynama Süresi + + + Never Played + Hiç Oynanmadı + + + h + sa + + + m + dk + + + s + sn + + + Compatibility is untested + Uyumluluk test edilmemiş + + + Game does not initialize properly / crashes the emulator + Oyun düzgün bir şekilde başlatılamıyor / emülatörü çökertiyor + + + Game boots, but only displays a blank screen + Oyun başlatılabiliyor ancak yalnızca boş bir ekran gösteriyor + + + Game displays an image but does not go past the menu + Oyun bir resim gösteriyor ancak menüleri geçemiyor + + + Game has game-breaking glitches or unplayable performance + Oyunu bozan hatalar ya da oynanamayan performans + + + Game can be completed with playable performance and no major glitches + Oyun, oynanabilir performansla tamamlanabilir ve büyük aksaklık yok + + + Click to see details on github + Detayları görmek için GitHub’a tıklayın + + + Last updated + Son güncelleme + + + + GameListUtils + + B + B + + + KB + KB + + + MB + MB + + + GB + GB + + + TB + TB + + + + GuiContextMenus + + Create Shortcut + Kısayol Oluştur + + + Cheats / Patches + Hileler / Yamalar + + + SFO Viewer + SFO Görüntüleyici + + + Trophy Viewer + Kupa Görüntüleyici + + + Open Folder... + Klasörü Aç... + + + Open Game Folder + Oyun Klasörünü Aç + + + Open Save Data Folder + Kaydetme Verileri Klasörünü Aç + + + Open Log Folder + Günlük Klasörünü Aç + + + Copy info... + Bilgiyi Kopyala... + + + Copy Name + Adı Kopyala + + + Copy Serial + Seri Numarasını Kopyala + + + Copy Version + Sürümü Kopyala + + + Copy Size + Boyutu Kopyala + + + Copy All + Tümünü Kopyala + + + Delete... + Sil... + + + Delete Game + Oyunu Sil + + + Delete Update + Güncellemeyi Sil + + + Delete DLC + DLC'yi Sil + + + Delete Trophy + Kupayı Sil + + + Compatibility... + Uyumluluk... + + + Update database + Veri tabanını güncelle + + + View report + Raporu görüntüle + + + Submit a report + Rapor gönder + + + Shortcut creation + Kısayol oluşturma + + + Shortcut created successfully! + Kısayol başarıyla oluşturuldu! + + + Error + Hata + + + Error creating shortcut! + Kısayol oluşturulurken hata oluştu! + + + Game + Oyun + + + This game has no update to delete! + Bu oyunun silinecek güncellemesi yok! + + + Update + Güncelleme + + + This game has no DLC to delete! + Bu oyunun silinecek DLC'si yok! + + + DLC + DLC + + + Delete %1 + Sil: %1 + + + Are you sure you want to delete %1's %2 directory? + %1%2 adlı oyunun dizinini silmek istediğinize emin misiniz? + + + Open Update Folder + Güncelleme Klasörünü Aç + + + Delete Save Data + Kayıt Verilerini Sil + + + This game has no update folder to open! + Bu oyunun açılacak güncelleme klasörü yok! + + + No log file found for this game! + Bu oyun için günlük dosyası bulunamadı! + + + Failed to convert icon. + Simge dönüştürülemedi. + + + This game has no save data to delete! + Bu oyunun silinecek kayıt verisi yok! + + + This game has no saved trophies to delete! + Bu oyunun silinecek kupası yok! + + + Save Data + Kayıt Verisi + + + Trophy + Kupa + + + SFO Viewer for + SFO Görüntüleyici: + + + + HelpDialog + + Quickstart + Hızlı Başlangıç + + + FAQ + SSS + + + Syntax + Sözdizimi + + + Special Bindings + Özel Atamalar + + + Keybindings + Tuş Atamaları + + + + KBMSettings + + Configure Controls + Kontrolleri Yapılandır + + + D-Pad + Yön Düğmeleri + + + Up + Yukarı + + + unmapped + atanmamış + + + Left + Sol + + + Right + Sağ + + + Down + Aşağı + + + Left Analog Halfmode + Sol Analog Yarı Modu + + + hold to move left stick at half-speed + sol analogu yarı hızda hareket ettirmek için basılı tutun + + + Left Stick + Sol Analog + + + Config Selection + Yapılandırma Seçimi + + + Common Config + Ortak Yapılandırma + + + Use per-game configs + Oyuna özel yapılandırma kullan + + + L1 + L1 + + + L2 + L2 + + + Text Editor + Metin Düzenleyici + + + Help + Yardım + + + R1 + R1 + + + R2 + R2 + + + L3 + L3 + + + Touchpad Click + Dokunmatik Yüzey Tıklaması + + + Mouse to Joystick + Mouse'dan Kontrolcü + + + *press F7 ingame to activate + *Etkinleştirmek için oyundayken F7'ye basın + + + R3 + R3 + + + Options + Seçenekler + + + Mouse Movement Parameters + Mouse Hızı Değişkenleri + + + note: click Help Button/Special Keybindings for more information + Not: Daha fazla bilgi için Yardım ya da Özel Atamalar'a tıklayın + + + Face Buttons + Eylem Düğmeleri + + + Triangle + Üçgen + + + Square + Kare + + + Circle + Daire + + + Cross + Çarpı + + + Right Analog Halfmode + Sağ Analog Yarı Modu + + + hold to move right stick at half-speed + sağ analogu yarı hızda hareket ettirmek için basılı tutun + + + Right Stick + Sağ Analog + + + Speed Offset (def 0.125): + Hız Sapması (varsayılan 0.125): + + + Copy from Common Config + Ortak Yapılandırmadan Kopyala + + + Deadzone Offset (def 0.50): + Ölü Bölge Sapması (varsayılan 0.50): + + + Speed Multiplier (def 1.0): + Hız Çarpanı (varsayılan 1.0): + + + Common Config Selected + Ortak Yapılandırma Seçildi + + + This button copies mappings from the Common Config to the currently selected profile, and cannot be used when the currently selected profile is the Common Config. + Bu tuş, Ortak Yapılandırma'daki atamaları seçili profile kopyalar ve seçili profil Ortak Yapılandırma ise kullanılamaz. + + + Copy values from Common Config + Ortak Yapılandırmadan Değerleri Kopyala + + + Do you want to overwrite existing mappings with the mappings from the Common Config? + Mevcut atamaların üzerine ortak yapılandırmadaki atamaları yazmak istiyor musunuz? + + + Unable to Save + Kaydedilemedi + + + Cannot bind any unique input more than once + Herhangi bir benzersiz girdi birden fazla kez bağlanamaz + + + Press a key + Bir tuşa basın + + + Cannot set mapping + Atama ayarlanamıyor + + + Mousewheel cannot be mapped to stick outputs + Mouse tekerleği analog çıkışlarına atanamaz + + + Save + Kaydet + + + Apply + Uygula + + + Restore Defaults + Varsayılanlara Sıfırla + + + Cancel + İptal + + + + MainWindow + + Open/Add Elf Folder + Elf Klasörü Aç/Ekle + + + Boot Game + Oyunu Başlat + + + Check for Updates + Güncellemeleri kontrol et + + + About shadPS4 + shadPS4 Hakkında + + + Configure... + Yapılandır... + + + Recent Games + Son Oyunlar + + + Open shadPS4 Folder + shadPS4 Klasörünü Aç + + + Exit + Çıkış + + + Exit shadPS4 + shadPS4'ten Çık + + + Exit the application. + Uygulamadan çık. + + + Show Game List + Oyun Listesini Göster + + + Game List Refresh + Oyun Listesini Yenile + + + Tiny + Minik + + + Small + Küçük + + + Medium + Orta + + + Large + Büyük + + + List View + Liste Görünümü + + + Grid View + Izgara Görünümü + + + Elf Viewer + Elf Görüntüleyici + + + Game Install Directory + Oyun Kurulum Dizini + + + Download Cheats/Patches + Hileleri/Yamaları İndir + + + Dump Game List + Oyun Listesini Kaydet + + + Trophy Viewer + Kupa Görüntüleyici + + + No games found. Please add your games to your library first. + Oyun bulunamadı. Oyunlarınızı lütfen önce kütüphanenize ekleyin. + + + Search... + Ara... + + + File + Dosya + + + View + Görünüm + + + Game List Icons + Oyun Listesi Simgeleri + + + Game List Mode + Oyun Listesi Görünümü + + + Settings + Ayarlar + + + Utils + Yardımcı Araçlar + + + Themes + Temalar + + + Help + Yardım + + + Dark + Koyu + + + Light + Açık + + + Green + Yeşil + + + Blue + Mavi + + + Violet + Mor + + + toolBar + Araç Çubuğu + + + Game List + Oyun Listesi + + + * 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 Yamaları İ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: + + + 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! + + + Run Game + Oyunu Çalıştır + + + Eboot.bin file not found + Eboot.bin dosyası bulunamadı + + + Game is already running! + Oyun zaten çalışıyor! + + + shadPS4 + shadPS4 + + + Play + Başlat + + + Pause + Duraklat + + + Stop + Durdur + + + Restart + Yeniden Başlat + + + Full Screen + Tam Ekran + + + Controllers + Kontrolcüler + + + Keyboard + Klavye + + + Refresh List + Listeyi Yenile + + + Resume + Devam Et + + + Show Labels Under Icons + Simgelerin Altında Etiketleri Göster + + + + SettingsDialog + + Settings + Ayarlar + + + General + Genel + + + System + Sistem + + + Console Language + Konsol Dili + + + Emulator Language + Emülatör Dili + + + Emulator + Emülatör + + + Enable Separate Update Folder + Ayrı Güncelleme Klasörünü Etkinleştir + + + Default tab when opening settings + Ayarlar açıldığında varsayılan sekme + + + Show Game Size In List + Oyun Boyutunu Listede Göster + + + Show Splash + Başlangıç Ekranını Göster + + + Enable Discord Rich Presence + Discord Rich Presence'i etkinleştir + + + Username + Kullanıcı Adı + + + Trophy Key + Kupa Anahtarı + + + Trophy + Kupa + + + Open the custom trophy images/sounds folder + Özel kupa görüntüleri/sesleri klasörünü aç + + + Logger + Kayıt Tutucu + + + Log Type + Kayıt Türü + + + Log Filter + Kayıt Filtresi + + + Open Log Location + Günlük Konumunu Aç + + + Input + Girdi + + + Cursor + İmleç + + + Hide Cursor + İmleci Gizle + + + Hide Cursor Idle Timeout + İmleç İçin Hareketsizlik Zaman Aşımı + + + s + sn + + + Controller + Kontrolcü + + + Back Button Behavior + Geri Dönme Butonu Davranışı + + + Graphics + Grafikler + + + GUI + Arayüz + + + User + Kullanıcı + + + Graphics Device + Grafik Cihazı + + + Vblank Divider + Vblank Bölücü + + + Advanced + Gelişmiş + + + Enable Shaders Dumping + Shader Kaydını Etkinleştir + + + Enable NULL GPU + NULL GPU'yu Etkinleştir + + + Enable HDR + HDR + + + Paths + Yollar + + + Game Folders + Oyun Klasörleri + + + Add... + Ekle... + + + Remove + Kaldır + + + Debug + Hata Ayıklama + + + Enable Debug Dumping + Hata Ayıklama Dökümü Etkinleştir + + + Enable Vulkan Validation Layers + Vulkan Doğrulama Katmanlarını Etkinleştir + + + Enable Vulkan Synchronization Validation + Vulkan Senkronizasyon Doğrulamasını Etkinleştir + + + Enable RenderDoc Debugging + RenderDoc Hata Ayıklamayı Etkinleştir + + + Enable Crash Diagnostics + Çökme Tanılamalarını Etkinleştir + + + Collect Shaders + Gölgelendiricileri Topla + + + Copy GPU Buffers + GPU Arabelleklerini Kopyala + + + Host Debug Markers + Ana Bilgisayar Hata Ayıklama İşaretleyicileri + + + Guest Debug Markers + Konuk Hata Ayıklama İşaretleyicileri + + + Update + Güncelle + + + Check for Updates at Startup + Başlangıçta güncellemeleri kontrol et + + + Always Show Changelog + Her zaman değişiklik günlüğünü göster + + + Update Channel + Güncelleme Kanalı + + + Check for Updates + Güncellemeleri Kontrol Et + + + GUI Settings + Arayüz Ayarları + + + Title Music + Oyun Müziği + + + Disable Trophy Notification + Kupa Bildirimini Devre Dışı Bırak + + + Background Image + Arka Plan Resmi + + + Show Background Image + Arka Plan Resmini Göster + + + Opacity + Görünürlük + + + Play title music + Oyun müziğini çal + + + Update Compatibility Database On Startup + Başlangıçta Uyumluluk Veritabanını Güncelle + + + Game Compatibility + Oyun Uyumluluğu + + + Display Compatibility Data + Uyumluluk Verilerini Göster + + + Update Compatibility Database + Uyumluluk Veritabanını Güncelle + + + Volume + Ses Seviyesi + + + Save + Kaydet + + + Apply + Uygula + + + Restore Defaults + Varsayılanları Geri Yükle + + + Close + Kapat + + + Point your mouse at an option to display its description. + Açıklamasını görüntülemek için mouse'unuzu bir seçeneğin üzerine getirin. + + + Console Language:\nSets the language that the PS4 game uses.\nIt's recommended to set this to a language the game supports, which will vary by region. + Konsol Dili:\nPS4 oyununun kullandığı dili ayarlar.\nBu seçeneği, oyunun desteklediği bir dilde ayarlamanız önerilir; bu durum bölgeye göre değişebilir. + + + Emulator Language:\nSets the language of the emulator's user interface. + Emülatör Dili:\nEmülatörün kullanıcı arayüzünün dilini ayarlar. + + + Enable Separate Update Folder:\nEnables installing game updates into a separate folder for easy management.\nThis can be manually created by adding the extracted update to the game folder with the name "CUSA00000-UPDATE" where the CUSA ID matches the game's ID. + Enable Separate Update Folder:\nEnables installing game updates into a separate folder for easy management. + + + Show Splash Screen:\nShows the game's splash screen (a special image) while the game is starting. + Açılış Ekranını Göster:\nOyun açılırken (özel bir görüntü) açılış ekranını gösterir. + + + Enable Discord Rich Presence:\nDisplays the emulator icon and relevant information on your Discord profile. + Discord Rich Presence'i etkinleştir:\nEmülatör simgesini ve Discord profilinizdeki ilgili bilgileri gösterir. + + + Username:\nSets the PS4's account username, which may be displayed by some games. + Kullanıcı Adı:\nBazı oyunlar tarafından gösterilebilen PS4 hesabının kullanıcı adını ayarlar. + + + Trophy Key:\nKey used to decrypt trophies. Must be obtained from your jailbroken console.\nMust contain only hex characters. + Kupa Anahtarı:\nKupaların şifresini çözmek için kullanılan anahtardır. Jailbreak yapılmış konsolunuzdan alınmalıdır.\nYalnızca onaltılık karakterler içermelidir. + + + Log Type:\nSets whether to synchronize the output of the log window for performance. May have adverse effects on emulation. + Günlük Türü:\nPerformans için günlük penceresi çıkışını senkronize etme durumunu ayarlar. Bu, emülasyonda olumsuz etkilere yol açabilir. + + + Log Filter:\nFilters the log to only print specific information.\nExamples: "Core:Trace" "Lib.Pad:Debug Common.Filesystem:Error" "*:Critical"\nLevels: Trace, Debug, Info, Warning, Error, Critical - in this order, a specific level silences all levels preceding it in the list and logs every level after it. + Günlük Filtre:\nSadece belirli bilgileri yazdırmak için günlüğü filtreler.\nÖrnekler: "Core:Trace" "Lib.Pad:Debug Common.Filesystem:Error" "*:Critical" Düzeyler: Trace, Debug, Info, Warning, Error, Critical - bu sırada, belirli bir seviye listede önceki tüm seviyeleri susturur ve sonraki tüm seviyeleri kaydeder. + + + Update:\nRelease: Official versions released every month that may be very outdated, but are more reliable and tested.\nNightly: Development versions that have all the latest features and fixes, but may contain bugs and are less stable. + Güncelleme:\nRelease: Her ay yayınlanan resmi sürümler; çok eski olabilirler, ancak daha güvenilirdir ve test edilmiştir.\nNightly: Tüm en son özellikler ve düzeltmeler ile birlikte geliştirme sürümleri; hatalar içerebilir ve daha az kararlıdırlar. + + + Background Image:\nControl the opacity of the game background image. + Arka Plan Resmi:\nOyunun arka plan resmi görünürlüğünü ayarlayın. + + + Play Title Music:\nIf a game supports it, enable playing special music when selecting the game in the GUI. + Oyun Müziklerini Çal:\nEğer oyun destekliyorsa, arayüzde oyunu seçtiğinizde özel müzik çalmasını etkinleştirir. + + + Disable Trophy Pop-ups:\nDisable in-game trophy notifications. Trophy progress can still be tracked using the Trophy Viewer (right-click the game in the main window). + Kupa Açılır Pencerelerini Devre Dışı Bırak:\nOyun için kupa bildirimlerini devre dışı bırakın. Kupa ilerlemesi hala Kupa Görüntüleyicisi kullanılarak takip edilebilir (ana menüde oyuna sağ tıklayın). + + + Hide Cursor:\nChoose when the cursor will disappear:\nNever: You will always see the mouse.\nidle: Set a time for it to disappear after being idle.\nAlways: you will never see the mouse. + İmleci gizle:\nİmlecin ne zaman kaybolacağını seçin:\nAsla: Fareyi her zaman göreceksiniz.\nPasif: Hareketsiz kaldıktan sonra kaybolması için bir süre belirleyin.\nHer zaman: fareyi asla göremeyeceksiniz. + + + Hide Idle Cursor Timeout:\nThe duration (seconds) after which the cursor that has been idle hides itself. + İmleç İçin Hareketsizlik Zaman Aşımı:\nBoşta kalan imlecin kendini kaç saniye sonra gizleyeceğidir. + + + Back Button Behavior:\nSets the controller's back button to emulate tapping the specified position on the PS4 touchpad. + Geri düğmesi davranışı:\nKontrol cihazındaki geri düğmesini, PS4'ün dokunmatik panelindeki belirlenen noktaya dokunmak için ayarlar. + + + Display Compatibility Data:\nDisplays game compatibility information in table view. Enable "Update Compatibility On Startup" to get up-to-date information. + Uyumluluk Verilerini Göster:\nOyun uyumluluk bilgilerini tablo görünümünde görüntüler. Güncel bilgileri almak için "Başlangıçta Uyumluluk Veritabanını Güncelle"yi etkinleştirin. + + + Update Compatibility On Startup:\nAutomatically update the compatibility database when shadPS4 starts. + Başlangıçta Uyumluluk Veritabanını Güncelle:\nshadPS4 başlatıldığında uyumluluk veritabanını otomatik olarak güncelleyin. + + + Update Compatibility Database:\nImmediately update the compatibility database. + Uyumluluk Veritabanını Güncelle:\nUyumluluk veri tabanını hemen güncelleyin. + + + Never + Asla + + + Idle + Boşta + + + Always + Her zaman + + + Touchpad Left + Dokunmatik Yüzey Sol + + + Touchpad Right + Dokunmatik Yüzey Sağ + + + Touchpad Center + Dokunmatik Yüzey Orta + + + None + Yok + + + Graphics Device:\nOn multiple GPU systems, select the GPU the emulator will use from the drop down list,\nor select "Auto Select" to automatically determine it. + Grafik Aygıtı:\nBirden fazla GPU'ya sahip sistemlerde, emülatörün kullanacağı GPU'yu açılır listeden seçin,\nor "Auto Select" seçeneğini seçerek otomatik olarak belirlenmesini sağlayın. + + + Width/Height:\nSets the size of the emulator window at launch, which can be resized during gameplay.\nThis is different from the in-game resolution. + Genişlik/Yükseklik:\nEmülatör penceresinin açılışta boyutunu ayarlar; bu, oyun sırasında yeniden boyutlandırılabilir.\nBu, oyundaki çözünürlükten farklıdır. + + + Vblank Divider:\nThe frame rate at which the emulator refreshes at is multiplied by this number. Changing this may have adverse effects, such as increasing the game speed, or breaking critical game functionality that does not expect this to change! + Vblank Bölücü:\nEmülatörün yenileme hızı bu sayı ile çarpılır. Bu değerin değiştirilmesi olumsuz etkilere yol açabilir; oyun hızını artırabilir veya oyunun beklemediği kritik işlevselliği bozabilir! + + + Enable Shaders Dumping:\nFor the sake of technical debugging, saves the games shaders to a folder as they render. + Shader'ları Dışa Aktarmayı Etkinleştir:\nTeknik hata ayıklama amacıyla, shader'ları render edildikçe bir klasöre kaydeder. + + + Enable Null GPU:\nFor the sake of technical debugging, disables game rendering as if there were no graphics card. + Null GPU'yu Etkinleştir:\nTeknik hata ayıklama amacıyla, oyunun render edilmesini grafik kartı yokmuş gibi devre dışı bırakır. + + + Enable HDR:\nEnables HDR in games that support it.\nYour monitor must have support for the BT2020 PQ color space and the RGB10A2 swapchain format. + HDR'yi Etkinleştir:\nDestekleyen oyunlarda HDR'yi etkinleştirir.\nMonitörünüz, BT2020 PQ renk alanını ve RGB10A2 takas zinciri biçimini desteklemelidir. + + + Game Folders:\nThe list of folders to check for installed games. + Oyun klasörleri:\nYüklenmiş oyunları kontrol etmek için klasörlerin listesi. + + + Add:\nAdd a folder to the list. + Ekle:\nListeye bir klasör ekle. + + + Remove:\nRemove a folder from the list. + Kaldır:\nListeden bir klasörü kaldır. + + + Enable Debug Dumping:\nSaves the import and export symbols and file header information of the currently running PS4 program to a directory. + Hata Ayıklama için Dışa Aktarmayı Etkinleştir:\nŞu anda çalışan PS4 uygulaması için içe aktarılan ve dışa aktarılan sembolleri ve dosya başlık bilgilerini bir dizine kaydedin. + + + Enable Vulkan Validation Layers:\nEnables a system that validates the state of the Vulkan renderer and logs information about its internal state.\nThis will reduce performance and likely change the behavior of emulation. + Vulkan Doğrulama Katmanlarını Etkinleştir:\nVulkan renderlayıcısının durumunu doğrulayan ve iç durum hakkında bilgi kaydeden bir sistemi etkinleştirir. Bu, performansı düşürür ve muhtemelen emülasyon davranışını değiştirir. + + + Enable Vulkan Synchronization Validation:\nEnables a system that validates the timing of Vulkan rendering tasks.\nThis will reduce performance and likely change the behavior of emulation. + Vulkan Senkronizasyon Doğrulamasını Etkinleştir:\nVulkan renderlama görevlerinin senkronizasyonunu doğrulayan bir sistemi etkinleştirir. Bu, performansı düşürür ve muhtemelen emülasyon davranışını değiştirir. + + + Enable RenderDoc Debugging:\nIf enabled, the emulator will provide compatibility with Renderdoc to allow capture and analysis of the currently rendered frame. + RenderDoc Hata Ayıklamayı Etkinleştir:\nEğer etkinleştirilirse, emülatör mevcut render edilmiş çerçeveyi yakalamak ve analiz etmek için Renderdoc ile uyumluluk sunar. + + + Collect Shaders:\nYou need this enabled to edit shaders with the debug menu (Ctrl + F10). + Gölgelendiricileri Topla:\nHata ayıklama menüsüyle (Ctrl + F10) gölgelendiricileri düzenlemek için bunun etkinleştirilmesi gerekir. + + + Crash Diagnostics:\nCreates a .yaml file with info about the Vulkan state at the time of crashing.\nUseful for debugging 'Device lost' errors. If you have this enabled, you should enable Host AND Guest Debug Markers.\nDoes not work on Intel GPUs.\nYou need Vulkan Validation Layers enabled and the Vulkan SDK for this to work. + Çökme Tanılamaları:\nÇökme anındaki Vulkan durumu hakkında bilgi içeren bir .yaml dosyası oluşturur.\n'Cihaz kayıp' hatalarını ayıklamak için kullanışlıdır. Bunu etkinleştirdiyseniz, Ana Bilgisayar ve Konuk Hata Ayıklama İşaretleyicileri'ni etkinleştirmelisiniz.\nIntel GPU'lar üzerinde çalışmaz.\nÇalışabilmesi için Vulkan Doğrulama Katmanları'nın etkinleştirilmesine ve Vulkan SDK'sine ihtiyacınız vardır. + + + Copy GPU Buffers:\nGets around race conditions involving GPU submits.\nMay or may not help with PM4 type 0 crashes. + GPU Arabelleklerini Kopyala:\nGPU gönderimlerini içeren yarış koşullarının etrafından dolaşır.\nPM4 tip 0 çökmelerine yardımcı olabilir veya olmayabilir. + + + Host Debug Markers:\nInserts emulator-side information like markers for specific AMDGPU commands around Vulkan commands, as well as giving resources debug names.\nIf you have this enabled, you should enable Crash Diagnostics.\nUseful for programs like RenderDoc. + Ana Bilgisayar Hata Ayıklama Göstergeleri:\nVulkan komutlarının etrafına belirli AMDGPU komutları için göstergeler gibi emülatör tarafı bilgileri ekler ve kaynaklara hata ayıklama adları verir.\nBunu etkinleştirdiyseniz, Çökme Tanılamaları'nı etkinleştirmelisiniz.\nRenderDoc gibi programlar için faydalıdır. + + + Guest Debug Markers:\nInserts any debug markers the game itself has added to the command buffer.\nIf you have this enabled, you should enable Crash Diagnostics.\nUseful for programs like RenderDoc. + Konuk Hata Ayıklama İşaretleyicileri\nOyunun kendisinin komut arabelleğine eklediği tüm hata ayıklama işaretlerini ekler.\nBunu etkinleştirdiyseniz, Çökme Tanılamalarını etkinleştirmeniz gerekir.\nRenderDoc gibi programlar için kullanışlıdır. + + + Save Data Path:\nThe folder where game save data will be saved. + Kayıt Verileri Yolu:\nOyun kayıt verilerinin kaydedileceği klasördür. + + + Browse:\nBrowse for a folder to set as the save data path. + Gözat:\nVerileri kaydetme yolu olarak ayarlamak için bir klasöre göz atın. + + + Release + Kararlı + + + Nightly + Günlük + + + Set the volume of the background music. + Arka plan müziğinin ses seviyesini ayarlayın. + + + Enable Motion Controls + Hareket Kontrollerini Etkinleştir + + + Save Data Path + Kayıt Verileri Yolu + + + Browse + Gözat + + + async + asenkronize + + + sync + senkronize + + + Auto Select + Otomatik Seç + + + Directory to install games + Oyunların yükleneceği dizin + + + Directory to save data + Kayıt verilerinin tutulacağı dizin + + + Video + Görüntü + + + Display Mode + Görüntü Modu + + + Windowed + Pencereli + + + Fullscreen + Tam Ekran + + + Fullscreen (Borderless) + Tam Ekran (Kenarlıksız) + + + Window Size + Pencere Boyutu + + + W: + G: + + + H: + Y: + + + Separate Log Files + Ayrı Günlük Dosyaları + + + Separate Log Files:\nWrites a separate logfile for each game. + Ayrı Günlük Dosyaları:\nHer oyun için ayrı bir günlük dosyası yazar. + + + Trophy Notification Position + Kupa Bildirim Konumu + + + Left + Sol + + + Right + Sağ + + + Top + Üst + + + Bottom + Alt + + + Notification Duration + Bildirim Süresi + + + Portable User Folder + Taşınabilir Kullanıcı Klasörü + + + Create Portable User Folder from Common User Folder + Ortak Kullanıcı Klasöründen Taşınabilir Kullanıcı Klasörü Oluştur + + + Portable user folder:\nStores shadPS4 settings and data that will be applied only to the shadPS4 build located in the current folder. Restart the app after creating the portable user folder to begin using it. + Taşınabilir kullanıcı klasörü:\nYalnızca geçerli klasörde bulunan shadPS4 derlemesine uygulanacak shadPS4 ayarlarını ve verilerini depolar. Kullanmaya başlamak için taşınabilir kullanıcı klasörünü oluşturduktan sonra uygulamayı yeniden başlatın. + + + Cannot create portable user folder + Taşınabilir kullanıcı klasörü oluşturulamıyor + + + %1 already exists + %1 zaten mevcut + + + Portable user folder created + Taşınabilir kullanıcı klasörü oluşturuldu + + + %1 successfully created. + %1 başarıyla oluşturuldu. + + + Open the custom trophy images/sounds folder:\nYou can add custom images to the trophies and an audio.\nAdd the files to custom_trophy with the following names:\ntrophy.wav OR trophy.mp3, bronze.png, gold.png, platinum.png, silver.png\nNote: The sound will only work in QT versions. + Özel kupa görüntüleri/sesleri klasörünü aç:\nKupalara özel görüntüler ve sesler ekleyebilirsiniz.\nDosyaları aşağıdaki adlarla custom_trophy'ye ekleyin:\ntrophy.wav ya da trophy.mp3, bronze.png, gold.png, platinum.png, silver.png\nNot: Ses yalnızca QT sürümlerinde çalışacaktır. + + + + TrophyViewer + + Trophy Viewer + Kupa Görüntüleyici + + + Select Game: + Oyun Seç: + + + Progress + İlerleme + + + Show Earned Trophies + Kazanılmış Kupaları Göster + + + Show Not Earned Trophies + Kazanılmamış Kupaları Göster + + + Show Hidden Trophies + Gizli Kupaları Göster + + + diff --git a/src/qt_gui/translations/uk_UA.ts b/src/qt_gui/translations/uk_UA.ts index 7e0a58ffb..890fa163e 100644 --- a/src/qt_gui/translations/uk_UA.ts +++ b/src/qt_gui/translations/uk_UA.ts @@ -1,1664 +1,2089 @@ + - - - - AboutDialog - - - About shadPS4 - Про shadPS4 - - - - shadPS4 - shadPS4 - - - - 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. - Це програмне забезпечення не повинно використовуватися для запуску ігор, котрі ви отримали не легально. - - - - ElfViewer - - - Open Folder - Відкрити папку - - - - GameInfoClass - - - Loading game list, please wait :3 - Завантажуємо список ігор, будь ласка, зачекайте :3 - - - - Cancel - Відмінити - - - - Loading... - Завантаження... - - - - InstallDirSelect - - - shadPS4 - Choose directory - shadPS4 - Виберіть папку - - - - Select which directory you want to install to. - Виберіть папку, до якої ви хочете встановити. - - - - GameInstallDialog - - - shadPS4 - Choose directory - shadPS4 - Виберіть папку - - - - Directory to install games - Папка для встановлення ігор - - - - Browse - Обрати - - - - Error - Помилка - - - - The value for location to install games is not valid. - Не коректне значення розташування для встановлення ігор. - - - - GuiContextMenus - - - Create Shortcut - Створити Ярлик - - - - Cheats / Patches - Чити та Патчі - - - - SFO Viewer - Перегляд SFO - - - - Trophy Viewer - Перегляд трофеїв - - - - Open Folder... - Відкрити Папку... - - - - Open Game Folder - Відкрити папку з грою - - - - Open Save Data Folder - Відкрити Папку Збережених Даних - - - - Open Log Folder - Відкрити Папку Логів - - - - Copy info... - Копіювати інформацію... - - - - Copy Name - Копіювати Ім’я - - - - Copy Serial - Копіювати серійний номер - - - - Copy All - Копіювати все - - - - Delete... - Видалення... - - - - Delete Game - Видалити гру - - - - Delete Update - Видалити оновлення - - - - Delete DLC - Видалити DLC - - - - Compatibility... - Compatibility... - - - - Update database - Update database - - - - View report - View report - - - - Submit a report - Submit a report - - - - Shortcut creation - Створення ярлика - - - - Shortcut created successfully! - Ярлик створений успішно! - - - - Error - Помилка - - - - Error creating shortcut! - Помилка при створенні ярлика! - - - - Install PKG - Встановити PKG - - - - Game - Ігри - - - - requiresEnableSeparateUpdateFolder_MSG - Ця функція потребує увімкнути опцію 'Окрема папка оновлень'. Якщо ви хочете використовувати цю функцію, будь ласка, увімкніть її. - - - - This game has no update to delete! - Ця гра не має оновлень для видалення! - - - - Update - Оновлення - - - - This game has no DLC to delete! - Ця гра не має DLC для видалення! - - - - DLC - DLC - - - - Delete %1 - Видалити %1 - - - - Are you sure you want to delete %1's %2 directory? - Ви впевнені, що хочете видалити папку %1 з папки %2?? - - - - MainWindow - - - Open/Add Elf Folder - Відкрити/Додати папку Elf - - - - Install Packages (PKG) - Встановити пакети (PKG) - - - - Boot Game - Запустити гру - - - - Check for Updates - Перевити наявність оновлень - - - - About shadPS4 - Про shadPS4 - - - - Configure... - Налаштувати... - - - - Install application from a .pkg file - Встановити додаток з файлу .pkg - - - - Recent Games - Нещодавні ігри - - - - Exit - Вихід - - - - Exit shadPS4 - Вийти з shadPS4 - - - - Exit the application. - Вийти з додатку. - - - - Show Game List - Показати список ігор - - - - Game List Refresh - Оновити список ігор - - - - Tiny - Крихітний - - - - Small - Маленький - - - - Medium - Середній - - - - Large - Великий - - - - List View - Список - - - - Grid View - Сітка - - - - Elf Viewer - Elf - - - - Game Install Directory - Каталог встановлення гри - - - - Download Cheats/Patches - Завантажити Чити або Патчі - - - - Dump Game List - Дамп списку ігор - - - - PKG Viewer - Перегляд PKG - - - - Search... - Пошук... - - - - File - Файл - - - - View - Вид - - - - Game List Icons - Розмір значків списку игр - - - - Game List Mode - Вид списку ігор - - - - Settings - Налаштування - - - - Utils - Утиліти - - - - Themes - Теми - - - - Help - Допомога - - - - Dark - Темна - - - - Light - Світла - - - - Green - Зелена - - - - Blue - Синя - - - - Violet - Фіолетова - - - - toolBar - Панель інструментів - - - - PKGViewer - - - Open Folder - Відкрити папку - - - - TrophyViewer - - - Trophy Viewer - Трофеї - - - - SettingsDialog - - - Settings - Налаштування - - - - General - Загальні - - - - System - Система - - - - Console Language - Мова консолі - - - - Emulator Language - Мова емулятора - - - - Emulator - Емулятор - - - - Enable Fullscreen - Увімкнути повноекранний режим - - - - Enable Separate Update Folder - Увімкнути окрему папку оновлень - - - - Show Splash - Показувати заставку - - - - Is PS4 Pro - Режим PS4 Pro - - - - Enable Discord Rich Presence - Увімкнути Discord Rich Presence - - - - Username - Ім'я користувача - - - - Trophy Key - Trophy Key - - - - Trophy - Trophy - - - - Logger - Логування - - - - Log Type - Тип логів - - - - Log Filter - Фільтр логів - - - - Input - Введення - - - - Cursor - Курсор миші - - - - Hide Cursor - Приховати курсор - - - - Hide Cursor Idle Timeout - Тайм-аут приховування курсора при бездіяльності - - - - s - s - - - - Controller - Контролер - - - - Back Button Behavior - Поведінка кнопки назад - - - - Graphics - Графіка - - - - Graphics Device - Графічний пристрій - - - - Width - Ширина - - - - Height - Висота - - - - Vblank Divider - Розділювач Vblank - - - - Advanced - Розширені - - - - Enable Shaders Dumping - Увімкнути дамп шейдерів - - - - Enable NULL GPU - Увімкнути NULL GPU - - - - Paths - Шляхи - - - - Game Folders - Ігрові папки - - - - Add... - Додати... - - - - Remove - Видалити - - - - Debug - Налагодження - - - - Enable Debug Dumping - Увімкнути налагоджувальні дампи - - - - Enable Vulkan Validation Layers - Увімкнути шари валідації Vulkan - - - - Enable Vulkan Synchronization Validation - Увімкнути валідацію синхронізації Vulkan - - - - Enable RenderDoc Debugging - Увімкнути налагодження RenderDoc - - - - Update - Оновлення - - - - Check for Updates at Startup - Перевірка оновлень під час запуску - - - - Update Channel - Канал оновлення - - - - Check for Updates - Перевірити оновлення - - - - GUI Settings - Інтерфейс - - - - Disable Trophy Pop-ups - Disable Trophy Pop-ups - - - - Play title music - Програвати заголовну музику - - - - Update Compatibility Database On Startup - Update Compatibility Database On Startup - - - - Game Compatibility - Game Compatibility - - - - Display Compatibility Data - Display Compatibility Data - - - - Update Compatibility Database - Update Compatibility Database - - - - Volume - Гучність - - - - Audio Backend - Audio Backend - - - - MainWindow - - - Game List - Список ігор - - - - * 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! - Виявлено патч! - - - - PKG and Game versions match: - Версії PKG та гри збігаються: - - - - Would you like to overwrite? - Бажаєте перезаписати? - - - - PKG Version %1 is older than installed version: - Версія PKG %1 старіша за встановлену версію: - - - - Game is installed: - Гра встановлена: - - - - Would you like to install Patch: - Бажаєте встановити патч: - - - - DLC Installation - Встановлення DLC - - - - Would you like to install DLC: %1? - Ви бажаєте встановити DLC: %1?? - - - - DLC already installed: - DLC вже встановлено: - - - - Game already installed - Гра вже встановлена - - - - 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 for - Cheats / Patches for - - - - 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. - Не вдалося розібрати JSON-дані з HTML. - - - - Failed to retrieve HTML page. - Не вдалося отримати HTML-сторінку. - - - - The game is in version: %1 - Гра у версії: %1 - - - - The downloaded patch only works on version: %1 - Завантажений патч працює лише на версії: %1 - - - - You may need to update your game. - Можливо, вам потрібно оновити гру. - - - - Incompatibility Notice - Повідомлення про несумісність - - - - 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: - Ім'я: - - - - Can't apply cheats before the game is started - Неможливо застосовувати чити до початку гри. - - - - SettingsDialog - - - Save - Зберегти - - - - Apply - Застосувати - - - - Restore Defaults - За замовчуванням - - - - Close - Закрити - - - - Point your mouse at an option to display its description. - Наведіть курсор миші на опцію, щоб відобразити її опис. - - - - consoleLanguageGroupBox - Мова консолі:\nВстановіть мову, яка буде використовуватись у іграх PS4.\nРекомендується встановити мову котра підтримується грою, оскільки вона може відрізнятися в залежності від регіону. - - - - emulatorLanguageGroupBox - Мова емулятора:\nВстановіть мову користувацького інтерфейсу емулятора. - - - - fullscreenCheckBox - Повноекранний режим:\nАвтоматично переводить вікно гри у повноекранний режим.\nВи можете відключити це, натиснувши клавішу F11. - - - - separateUpdatesCheckBox - Окрема папка для оновлень:\nДає змогу встановлювати оновлення гри в окрему папку для зручності. - - - - showSplashCheckBox - Показувати заставку:\nВідображає заставку гри (спеціальне зображення) під час запуску гри. - - - - ps4proCheckBox - Режим PS4 Pro:\nЗмушує емулятор працювати як PS4 Pro, що може ввімкнути спеціальні функції в іграх, які підтримують це. - - - - discordRPCCheckbox - Увімкнути Discord Rich Presence:\nВідображає значок емулятора та відповідну інформацію у вашому профілі Discord. - - - - userName - Ім'я користувача:\nВстановіть ім'я користувача акаунта PS4. Це може відображатися в деяких іграх. - - - - TrophyKey - Trophy Key:\nKey used to decrypt trophies. Must be obtained from your jailbroken console.\nMust contain only hex characters. - - - - logTypeGroupBox - Тип логів:\nВстановіть, чи синхронізувати виведення вікна логів заради продуктивності. Це може негативно вплинути на емуляцію. - - - - logFilter - Фільтр логів:\nФільтрує логи, щоб показувати тільки певну інформацію.\nПриклади: "Core:Trace" "Lib.Pad:Debug Common.Filesystem:Error" "*:Critical" Рівні: Trace, Debug, Info, Warning, Error, Critical - у цьому порядку, конкретний рівень глушить усі попередні рівні у списку і показує всі наступні рівні. - - - - updaterGroupBox - Оновлення:\nRelease: Офіційні версії, які випускаються щомісяця і можуть бути дуже старими, але вони більш надійні та перевірені.\nNightly: Версії для розробників, які мають усі найновіші функції та виправлення, але можуть містити помилки та є менш стабільними. - - - - GUIgroupBox - Грати заголовну музику:\nВмикає відтворення спеціальної музики під час вибору гри в списку, якщо вона це підтримує. - - - - disableTrophycheckBox - Disable Trophy Pop-ups:\nDisable in-game trophy notifications. Trophy progress can still be tracked using the Trophy Viewer (right-click the game in the main window). - - - - hideCursorGroupBox - Приховувати курсор:\nВиберіть, коли курсор зникне:\nНіколи: Ви завжди будете бачити мишу.\nПри бездіяльності: Встановіть час, через який курсор зникне в разі бездіяльності.\nЗавжди: Ви ніколи не будете бачити мишу. - - - - idleTimeoutGroupBox - Встановіть час, через який курсор зникне в разі бездіяльності. - - - - backButtonBehaviorGroupBox - Поведінка кнопки «Назад»:\nНалаштовує кнопку «Назад» контролера на емуляцію натискання на зазначену область на сенсорній панелі контролера PS4. - - - - enableCompatibilityCheckBox - Display Compatibility Data:\nDisplays game compatibility information in table view. Enable "Update Compatibility On Startup" to get up-to-date information. - - - - checkCompatibilityOnStartupCheckBox - Update Compatibility On Startup:\nAutomatically update the compatibility database when shadPS4 starts. - - - - updateCompatibilityButton - Update Compatibility Database:\nImmediately update the compatibility database. - - - - Never - Ніколи - - - - Idle - При бездіяльності - - - - Always - Завжди - - - - Touchpad Left - Тачпад ліворуч - - - - Touchpad Right - Тачпад праворуч - - - - Touchpad Center - Тачпад по центру - - - - None - Ні - - - - graphicsAdapterGroupBox - Графічний пристрій:\nУ системах із кількома GPU виберіть з випадаючого списку GPU, який буде використовувати емулятор,\nабо виберіть "Auto Select", щоб визначити його автоматично. - - - - resolutionLayout - Ширина/Висота:\nВстановіть розмір вікна емулятора під час запуску, який може бути змінений під час гри.\nЦе відрізняється від роздільної здатності в грі. - - - - heightDivider - Розділювач Vblank:\nЧастота кадрів, з якою оновлюється емулятор, множиться на це число. Зміна цього параметра може мати негативні наслідки, такі як збільшення швидкості гри або порушення критичних функцій гри, які цього не очікують! - - - - dumpShadersCheckBox - Увімкнути дамп шейдерів:\nДля технічного налагодження зберігає шейдери ігор у папку під час рендерингу. - - - - nullGpuCheckBox - Увімкнути NULL GPU:\nДля технічного налагодження відключає рендеринг гри так, ніби графічної карти немає. - - - - gameFoldersBox - Ігрові папки:\nСписок папок для перевірки встановлених ігор. - - - - addFolderButton - Додати:\nДодати папку в список. - - - - removeFolderButton - Видалити:\nВидалити папку зі списку. - - - - debugDump - Увімкнути налагоджувальні дампи:\nЗберігає символи імпорту, експорту та інформацію про заголовок файлу поточної виконуваної програми PS4 у папку. - - - - vkValidationCheckBox - Увімкнути шари валідації Vulkan:\nВключає систему, яка перевіряє стан рендерера Vulkan і логує інформацію про його внутрішній стан. Це знизить продуктивність і, ймовірно, змінить поведінку емуляції. - - - - vkSyncValidationCheckBox - Увімкнути валідацію синхронізації Vulkan:\nВключає систему, яка перевіряє таймінг завдань рендерингу Vulkan. Це знизить продуктивність і, ймовірно, змінить поведінку емуляції. - - - - rdocCheckBox - Увімкнути налагодження RenderDoc:\nЯкщо увімкнено, емулятор забезпечить сумісність із Renderdoc, даючи змогу захоплювати й аналізувати поточні кадри під час рендерингу. - - - - GameListFrame - - - Icon - Значок - - - - Name - Назва - - - - Serial - Серійний номер - - - - Compatibility - Compatibility - - - - Region - Регіон - - - - Firmware - Прошивка - - - - Size - Розмір - - - - Version - Версія - - - - Path - Шлях - - - - Play Time - Час у грі - - - - Never Played - Never Played - - - - h - h - - - - m - m - - - - s - s - - - - Compatibility is untested - Compatibility is untested - - - - Game does not initialize properly / crashes the emulator - Game does not initialize properly / crashes the emulator - - - - Game boots, but only displays a blank screen - Game boots, but only displays a blank screen - - - - Game displays an image but does not go past the menu - Game displays an image but does not go past the menu - - - - Game has game-breaking glitches or unplayable performance - Game has game-breaking glitches or unplayable performance - - - - Game can be completed with playable performance and no major glitches - Game can be completed with playable performance and no major glitches - - - - CheckUpdate - - - Auto Updater - Автооновлення - - - - Error - Помилка - - - - Network error: - Мережева помилка: - - - - Failed to parse update information. - Не вдалося розібрати інформацію про оновлення. - - - - No pre-releases found. - Попередніх версій не знайдено. - - - - Invalid release data. - Неприпустимі дані релізу. - - - - No download URL found for the specified asset. - Не знайдено URL для завантаження зазначеного ресурсу. - - - - Your version is already up to date! - Вашу версію вже оновлено! - - - - Update Available - Доступне оновлення - - - - Update Channel - Канал оновлення - - - - Current Version - Поточна версія - - - - Latest Version - Остання версія - - - - Do you want to update? - Ви хочете оновитися? - - - - Show Changelog - Показати журнал змін - - - - Check for Updates at Startup - Перевірка оновлень під час запуску - - - - Update - Оновитись - - - - No - Ні - - - - Hide Changelog - Приховати журнал змін - - - - Changes - Журнал змін - - - - Network error occurred while trying to access the URL - Сталася мережева помилка під час спроби доступу до URL - - - - Download Complete - Завантаження завершено - - - - The update has been downloaded, press OK to install. - Оновлення завантажено, натисніть OK для встановлення. - - - - Failed to save the update file at - Не вдалося зберегти файл оновлення в - - - - Starting Update... - Початок оновлення... - - - - Failed to create the update script file - Не вдалося створити файл скрипта оновлення - - - - GameListUtils - - - B - B - - - - KB - KB - - - - MB - MB - - - - GB - GB - - - - TB - TB - - - \ No newline at end of file + + + AboutDialog + + About shadPS4 + Про shadPS4 + + + 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. + Це програмне забезпечення не повинно використовуватися для запуску ігор, котрі ви отримали не легально. + + + + CheatsPatches + + Cheats / Patches for + Чити та Патчі для + + + 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:\n + Чити та Патчі є експериментальними.\nВикористовуйте з обережністю.\n\nЗавантажуйте чити окремо, вибравши репозиторій і натиснувши кнопку завантаження.\nУ вкладці "Патчі" ви можете завантажити всі патчі відразу, вибрати, які з них ви хочете використовувати, і зберегти свій вибір.\n\nОскільки ми не займаємося розробкою читів/патчів,\nбудь ласка, повідомляйте про проблеми автору чита/патча.\n\nСтворили новий чит? Відвідайте:\n + + + 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 + Читів не знайдено + + + 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 + Чити успішно завантажено + + + 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 download: + Не вдалося завантажити: + + + Download Complete + Заватнаження завершено + + + 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. If the patch does not appear, it may be that it does not exist for the specific serial and version of the game. + Патчі успішно завантажено! Всі доступні патчі для усіх ігор, завантажено, немає необхідності завантажувати їх окремо для кожної гри, як це відбувається у випадку з читами. Якщо патч не з’являється, можливо, його не існує для конкретного серійного номера та версії гри. Можливо, необхідно оновити гру. + + + Failed to parse JSON data from HTML. + Не вдалося розібрати JSON-дані з HTML. + + + Failed to retrieve HTML page. + Не вдалося отримати HTML-сторінку. + + + The game is in version: %1 + Версія гри: %1 + + + The downloaded patch only works on version: %1 + Завантажений патч працює лише на версії: %1 + + + You may need to update your game. + Можливо, вам потрібно оновити гру. + + + Incompatibility Notice + Повідомлення про несумісність + + + 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: + Назва: + + + Can't apply cheats before the game is started + Неможливо застосовувати чити до початку гри. + + + Close + Закрити + + + + CheckUpdate + + Auto Updater + Автооновлення + + + Error + Помилка + + + Network error: + Мережева помилка: + + + The Auto Updater allows up to 60 update checks per hour.\nYou have reached this limit. Please try again later. + Автооновлення дозволяє до 60 перевірок оновлень на годину.\nВи досягли цього ліміту. Будь ласка, спробуйте пізніше. + + + Failed to parse update information. + Не вдалося розібрати інформацію про оновлення. + + + No pre-releases found. + Попередніх версій не знайдено. + + + Invalid release data. + Некоректні дані про випуск. + + + No download URL found for the specified asset. + Не знайдено URL для завантаження зазначеного ресурсу. + + + Your version is already up to date! + У вас актуальна версія! + + + Update Available + Доступне оновлення + + + Update Channel + Канал оновлення + + + Current Version + Поточна версія + + + Latest Version + Остання версія + + + Do you want to update? + Ви хочете оновитися? + + + Show Changelog + Показати журнал змін + + + Check for Updates at Startup + Перевірка оновлень під час запуску + + + Update + Оновитись + + + No + Ні + + + Hide Changelog + Приховати журнал змін + + + Changes + Журнал змін + + + Network error occurred while trying to access the URL + Сталася мережева помилка під час спроби доступу до URL + + + Download Complete + Завантаження завершено + + + The update has been downloaded, press OK to install. + Оновлення завантажено, натисніть OK для встановлення. + + + Failed to save the update file at + Не вдалося зберегти файл оновлення в + + + Starting Update... + Початок оновлення... + + + Failed to create the update script file + Не вдалося створити файл скрипта оновлення + + + + CompatibilityInfoClass + + Fetching compatibility data, please wait + Отримання даних про сумісність. Будь ласка, зачекайте + + + Cancel + Відмінити + + + Loading... + Завантаження... + + + Error + Помилка + + + Unable to update compatibility data! Try again later. + Не вдалося оновити дані про сумісність! Спробуйте ще раз пізніше. + + + Unable to open compatibility_data.json for writing. + Не вдалося відкрити файл compatibility_data.json для запису. + + + Unknown + Невідомо + + + Nothing + Не працює + + + Boots + Запускається + + + Menus + У меню + + + Ingame + У грі + + + Playable + Іграбельно + + + + ControlSettings + + Configure Controls + Налаштування елементів керування + + + D-Pad + Хрестовина + + + Up + Вгору + + + Left + Ліворуч + + + Right + Праворуч + + + Down + Вниз + + + Left Stick Deadzone (def:2 max:127) + Мертва зона лівого стику (за замов.: 2, максимум: 127) + + + Left Deadzone + Ліва мертва зона + + + Left Stick + Лівий стік + + + Config Selection + Вибір конфігурації + + + Common Config + Загальна конфігурація + + + Use per-game configs + Використовувати ігрові конфігурації + + + L1 / LB + L1 / Лівий Бампер + + + L2 / LT + L2 / Лівий Тригер + + + Back + Назад + + + R1 / RB + R1 / Правий Бампер + + + R2 / RT + R2 / Правий Тригер + + + L3 + Кнопка лівого стику + + + Options / Start + Опції / Старт + + + R3 + Кнопка правого стику + + + Face Buttons + Лицьові кнопки + + + Triangle / Y + Трикутник / Y + + + Square / X + Квадрат / X + + + Circle / B + Коло / B + + + Cross / A + Хрест / A + + + Right Stick Deadzone (def:2, max:127) + Мертва зона правого стику (за замов.: 2, максимум: 127) + + + Right Deadzone + Права мертва зона + + + Right Stick + Правий стик + + + Color Adjustment + Налаштування Кольору + + + R: + R: + + + G: + G: + + + B: + B: + + + Override Lightbar Color + Змінити колір підсвітки + + + Override Color + Змінити колір + + + Unable to Save + Не вдалося зберегти + + + Cannot bind axis values more than once + Неможливо пере назначити кнопку більше одного разу + + + Save + Зберегти + + + Apply + Застосувати + + + Restore Defaults + За замовчуванням + + + Cancel + Відмінити + + + + EditorDialog + + Edit Keyboard + Mouse and Controller input bindings + Налаштування клавіатури, миші та перевизначення кнопок контролеру + + + Use Per-Game configs + Використовувати ігрові конфігурації + + + Error + Помилка + + + Could not open the file for reading + Не вдалося відкрити файл для читання + + + Could not open the file for writing + Не вдалось відкрити файл для запису + + + Save Changes + Зберегти зміни + + + Do you want to save changes? + Бажаєте зберегти зміни? + + + Help + Допомога + + + Do you want to reset your custom default config to the original default config? + Ви бажаєте скинути ваші налаштування за замовчуванням до початкової конфігурації? + + + Do you want to reset this config to your custom default config? + Ви бажаєте скинути ці налаштування до вашої конфігурації за замовчуванням? + + + Reset to Default + Відновити налаштування за замовчанням + + + + ElfViewer + + Open Folder + Відкрити папку + + + + GameInfoClass + + Loading game list, please wait :3 + Завантажуємо список ігор, будь ласка, зачекайте :3 + + + Cancel + Відмінити + + + Loading... + Завантаження... + + + + GameInstallDialog + + shadPS4 - Choose directory + shadPS4 - Виберіть папку + + + Directory to install games + Папка для встановлення ігор + + + Browse + Обрати + + + Error + Помилка + + + Directory to install DLC + Папка для встановлення DLC + + + + GameListFrame + + Icon + Значок + + + Name + Назва + + + Serial + Серійний номер + + + Compatibility + Сумісність + + + Region + Регіон + + + Firmware + Прошивка + + + Size + Розмір + + + Version + Версія + + + Path + Шлях + + + Play Time + Час у грі + + + Never Played + Ніколи не запускалась + + + h + год + + + m + хв + + + s + сек + + + Compatibility is untested + Сумісність не перевірена + + + Game does not initialize properly / crashes the emulator + Гра не ініціалізується належним чином або спричиняє збій емулятора. + + + Game boots, but only displays a blank screen + Гра запускається, але відображає лише чорний екран. + + + Game displays an image but does not go past the menu + Гра відображає зображення, але не проходить далі меню. + + + Game has game-breaking glitches or unplayable performance + У грі є критичні баги або погана продуктивність + + + Game can be completed with playable performance and no major glitches + Гру можна пройти з хорошою продуктивністю та без серйозних глюків. + + + Click to see details on github + Натисніть, щоб переглянути деталі на GitHub + + + Last updated + Останнє оновлення + + + + GameListUtils + + B + Б + + + KB + КБ + + + MB + + + + GB + ГБ + + + TB + ТБ + + + + GuiContextMenus + + Create Shortcut + Створити Ярлик + + + Cheats / Patches + Чити та Патчі + + + SFO Viewer + Перегляд SFO + + + Trophy Viewer + Перегляд трофеїв + + + Open Folder... + Відкрити Папку... + + + Open Game Folder + Відкрити папку гри + + + Open Save Data Folder + Відкрити папку збережень гри + + + Open Log Folder + Відкрити папку логів + + + Copy info... + Копіювати інформацію... + + + Copy Name + Копіювати назву гри + + + Copy Serial + Копіювати серійний номер + + + Copy Version + Копіювати версію + + + Copy Size + Копіювати розмір + + + Copy All + Копіювати все + + + Delete... + Видалити... + + + Delete Game + Видалити гру + + + Delete Update + Видалити оновлення + + + Delete DLC + Видалити DLC + + + Delete Trophy + Видалити трофей + + + Compatibility... + Сумісність... + + + Update database + Оновити базу даних + + + View report + Переглянути звіт + + + Submit a report + Створити звіт + + + Shortcut creation + Створення ярлика + + + Shortcut created successfully! + Ярлик створений успішно! + + + Error + Помилка + + + Error creating shortcut! + Помилка при створенні ярлика! + + + Game + гри + + + This game has no update to delete! + Ця гра не має оновлень для видалення! + + + Update + Оновлення + + + This game has no DLC to delete! + Ця гра не має DLC для видалення! + + + DLC + DLC + + + Delete %1 + Видалення %1 + + + Are you sure you want to delete %1's %2 directory? + Ви впевнені, що хочете видалити %1 з папки %2? + + + Open Update Folder + Відкрити папку оновлень + + + Delete Save Data + Видалити збереження + + + This game has no update folder to open! + Ця гра не має папки оновленнь, щоб відкрити її! + + + No log file found for this game! + Файл звіту для цієї гри не знайдено! + + + Failed to convert icon. + Не вдалося конвертувати значок. + + + This game has no save data to delete! + Ця гра не містить збережень, які можна видалити! + + + This game has no saved trophies to delete! + Ця гра немає збережених трофеїв для видалення! + + + Save Data + Збереження + + + Trophy + Трофеї + + + SFO Viewer for + Перегляд SFO + + + + HelpDialog + + Quickstart + Швидкий старт + + + FAQ + ЧаПи + + + Syntax + Синтаксис + + + Special Bindings + Спеціальні прив'язки + + + Keybindings + Призначення клавіш + + + + KBMSettings + + Configure Controls + Налаштування елементів керування + + + D-Pad + Хрестовина + + + Up + Вгору + + + unmapped + не назначено + + + Left + Ліворуч + + + Right + Праворуч + + + Down + Вниз + + + Left Analog Halfmode + Напіврежим лівого аналогового стику + + + hold to move left stick at half-speed + утримуйте щоб рухати лівий стик в половину швидкості + + + Left Stick + Лівий стик + + + Config Selection + Вибір конфігурації + + + Common Config + Загальна конфігурація + + + Use per-game configs + Використовувати ігрові конфігурації + + + L1 + L1 / Лівий Бампер + + + L2 + L2 / Лівий Тригер + + + Text Editor + Текстовий редактор + + + Help + Довідка + + + R1 + R1 / Правий Бампер + + + R2 + R2 / Правий Тригер + + + L3 + Кнопка лівого стику + + + Touchpad Click + Натискання на сенсорну панель + + + Mouse to Joystick + Миша в джойстик + + + *press F7 ingame to activate + *натисніть F7 у грі для увімкнення + + + R3 + Кнопка правого стику + + + Options + Опції + + + Mouse Movement Parameters + Параметри руху миші + + + note: click Help Button/Special Keybindings for more information + замітка: натисніть кнопку Довідки/Спеціального Призначення клавіш для отримання додаткової інформації + + + Face Buttons + Лицьові кнопки + + + Triangle + Трикутник + + + Square + Квадрат + + + Circle + Коло + + + Cross + Хрест + + + Right Analog Halfmode + Напіврежим правого аналогового стику + + + hold to move right stick at half-speed + утримуйте щоб рухати правий стик в половину швидкості + + + Right Stick + Правий стик + + + Speed Offset (def 0.125): + Зміщення швидкості (замовч 0,125): + + + Copy from Common Config + Копіювати з Загальної конфігурації + + + Deadzone Offset (def 0.50): + Зміщення мертвої зони (замовч 0,50): + + + Speed Multiplier (def 1.0): + Модифікатор швидкості (замовч 1,0): + + + Common Config Selected + Вибрані Загальні налаштування + + + This button copies mappings from the Common Config to the currently selected profile, and cannot be used when the currently selected profile is the Common Config. + Ця кнопка копіює перепризначення кнопок із Загальної конфігурації до поточного вибраного профілю, і не може бути використана, якщо поточний вибраний профіль є загальною конфігурацією. + + + Copy values from Common Config + Копіювати значення з Загальної конфігурації + + + Do you want to overwrite existing mappings with the mappings from the Common Config? + Ви бажаєте перезаписати наявні перепризначення кнопок з загальної конфігурації? + + + Unable to Save + Не вдалося зберегти + + + Cannot bind any unique input more than once + Не можна прив'язати кнопку вводу більш ніж один раз + + + Press a key + Натисніть клавішу + + + Cannot set mapping + Не вдалося встановити прив'язку + + + Mousewheel cannot be mapped to stick outputs + Коліщатко миші не можна прив'язати зі значенням стиків + + + Save + Зберегти + + + Apply + Застосувати + + + Restore Defaults + За замовчуванням + + + Cancel + Відмінити + + + + MainWindow + + Open/Add Elf Folder + Відкрити/Додати папку Elf + + + Boot Game + Запустити гру + + + Check for Updates + Перевірити наявність оновлень + + + About shadPS4 + Про shadPS4 + + + Configure... + Налаштувати... + + + Recent Games + Нещодавні ігри + + + Open shadPS4 Folder + Відкрити папку shadPS4 + + + Exit + Вихід + + + Exit shadPS4 + Вийти з shadPS4 + + + Exit the application. + Вийти з додатку. + + + Show Game List + Показати список ігор + + + Game List Refresh + Оновити список ігор + + + Tiny + Крихітний + + + Small + Маленький + + + Medium + Середній + + + Large + Великий + + + List View + Список + + + Grid View + Сітка + + + Elf Viewer + Виконуваний файл + + + Game Install Directory + Каталоги встановлення ігор та оновлень + + + Download Cheats/Patches + Завантажити Чити/Патчі + + + Dump Game List + Дамп списку ігор + + + Trophy Viewer + Trophy Viewer + + + No games found. Please add your games to your library first. + No games found. Please add your games to your library first. + + + Search... + Пошук... + + + File + Файл + + + View + Вид + + + Game List Icons + Розмір значків списку ігор + + + Game List Mode + Вид списку ігор + + + Settings + Налаштування + + + Utils + Утиліти + + + Themes + Теми + + + Help + Допомога + + + Dark + Темна + + + Light + Світла + + + Green + Зелена + + + Blue + Синя + + + Violet + Фіолетова + + + toolBar + Панель інструментів + + + Game List + Список ігор + + + * 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: + Ігри: + + + ELF files (*.bin *.elf *.oelf) + Файли ELF (*.bin *.elf *.oelf) + + + Game Boot + Запуск гри + + + Only one file can be selected! + Можна вибрати лише один файл! + + + Run Game + Запустити гру + + + Eboot.bin file not found + Файл Boot.bin не знайдено + + + Game is already running! + Гра вже запущена! + + + shadPS4 + shadPS4 + + + Play + Play + + + Pause + Pause + + + Stop + Stop + + + Restart + Restart + + + Full Screen + Full Screen + + + Controllers + Controllers + + + Keyboard + Keyboard + + + Refresh List + Refresh List + + + Resume + Resume + + + Show Labels Under Icons + Show Labels Under Icons + + + + SettingsDialog + + Settings + Налаштування + + + General + Загальні + + + System + Система + + + Console Language + Мова консолі + + + Emulator Language + Мова емулятора + + + Emulator + Емулятор + + + Enable Separate Update Folder + Увімкнути окрему папку оновлень + + + Default tab when opening settings + Вкладка за замовчуванням при відкритті налаштувань + + + Show Game Size In List + Показати розмір гри у списку + + + Show Splash + Показувати заставку + + + Enable Discord Rich Presence + Увімкнути Discord Rich Presence + + + Username + Ім'я користувача + + + Trophy Key + Ключ трофеїв + + + Trophy + Трофеї + + + Open the custom trophy images/sounds folder + Відкрити папку користувацьких зображень трофеїв/звуків + + + Logger + Логування + + + Log Type + Тип логів + + + Log Filter + Фільтр логів + + + Open Log Location + Відкрити місце розташування журналу + + + Input + Введення + + + Cursor + Курсор миші + + + Hide Cursor + Приховати курсор + + + Hide Cursor Idle Timeout + Тайм-аут приховування курсора при бездіяльності + + + s + сек + + + Controller + Контролер + + + Back Button Behavior + Перепризначення кнопки назад + + + Graphics + Графіка + + + GUI + Інтерфейс + + + User + Користувач + + + Graphics Device + Графічний пристрій + + + Vblank Divider + Розділювач Vblank + + + Advanced + Розширені + + + Enable Shaders Dumping + Увімкнути дамп шейдерів + + + Enable NULL GPU + Увімкнути NULL GPU + + + Enable HDR + Увімкнути HDR + + + Paths + Шляхи + + + Game Folders + Ігрові папки + + + Add... + Додати... + + + Remove + Вилучити + + + Debug + Налагодження + + + Enable Debug Dumping + Увімкнути налагоджувальні дампи + + + Enable Vulkan Validation Layers + Увімкнути шари валідації Vulkan + + + Enable Vulkan Synchronization Validation + Увімкнути валідацію синхронізації Vulkan + + + Enable RenderDoc Debugging + Увімкнути налагодження RenderDoc + + + Enable Crash Diagnostics + Увімкнути діагностику збоїв + + + Collect Shaders + Збирати шейдери + + + Copy GPU Buffers + Копіювати буфери GPU + + + Host Debug Markers + Хостові маркери налагодження + + + Guest Debug Markers + Гостьові маркери налагодження + + + Update + Оновлення + + + Check for Updates at Startup + Перевіряти оновлення під час запуску + + + Always Show Changelog + Завжди показувати журнал змін + + + Update Channel + Канал оновлення + + + Check for Updates + Перевірити оновлення + + + GUI Settings + Інтерфейс + + + Title Music + Титульна музика + + + Disable Trophy Notification + Вимкнути сповіщення про отримання трофею + + + Background Image + Фонове зображення + + + Show Background Image + Показувати фонове зображення + + + Opacity + Непрозорість + + + Play title music + Програвати титульну музику + + + Update Compatibility Database On Startup + Оновлення даних ігрової сумісності під час запуску + + + Game Compatibility + Сумісність з іграми + + + Display Compatibility Data + Відображати данні ігрової сумістністі + + + Update Compatibility Database + Оновити данні ігрової сумістності + + + Volume + Гучність + + + Save + Зберегти + + + Apply + Застосувати + + + Restore Defaults + За замовчуванням + + + Close + Закрити + + + Point your mouse at an option to display its description. + Наведіть курсор миші на опцію, щоб відобразити її опис. + + + Console Language:\nSets the language that the PS4 game uses.\nIt's recommended to set this to a language the game supports, which will vary by region. + Мова консолі:\nВстановіть мову, яка буде використовуватись у іграх PS4.\nРекомендується встановити мову котра підтримується грою, оскільки вона може відрізнятися в залежності від регіону. + + + Emulator Language:\nSets the language of the emulator's user interface. + Мова емулятора:\nВстановіть мову користувацького інтерфейсу емулятора. + + + Enable Separate Update Folder:\nEnables installing game updates into a separate folder for easy management.\nThis can be manually created by adding the extracted update to the game folder with the name "CUSA00000-UPDATE" where the CUSA ID matches the game's ID. + Окрема папка для оновлень:\nДає змогу встановлювати оновлення гри в окрему папку для зручності. + + + Show Splash Screen:\nShows the game's splash screen (a special image) while the game is starting. + Показувати заставку:\nВідображає заставку гри (спеціальне зображення) під час запуску гри. + + + Enable Discord Rich Presence:\nDisplays the emulator icon and relevant information on your Discord profile. + Увімкнути Discord Rich Presence:\nВідображає значок емулятора та відповідну інформацію у вашому профілі Discord. + + + Username:\nSets the PS4's account username, which may be displayed by some games. + Ім'я користувача:\nВстановіть ім'я користувача акаунта PS4. Воно може відображатися в деяких іграх. + + + Trophy Key:\nKey used to decrypt trophies. Must be obtained from your jailbroken console.\nMust contain only hex characters. + Ключ трофеїв:\nКлюч для розшифровки трофеїв. Може бути отриманий зі зламаної консолі.\nПовинен містити лише шістнадцяткові символи. + + + Log Type:\nSets whether to synchronize the output of the log window for performance. May have adverse effects on emulation. + Тип логів:\nВстановіть, чи синхронізувати виведення вікна логів заради продуктивності. Це може негативно вплинути на емуляцію. + + + Log Filter:\nFilters the log to only print specific information.\nExamples: "Core:Trace" "Lib.Pad:Debug Common.Filesystem:Error" "*:Critical"\nLevels: Trace, Debug, Info, Warning, Error, Critical - in this order, a specific level silences all levels preceding it in the list and logs every level after it. + Фільтр логів:\nФільтрує логи, щоб показувати тільки певну інформацію.\nПриклади: "Core:Trace" "Lib.Pad:Debug Common.Filesystem:Error" "*:Critical" Рівні: Trace, Debug, Info, Warning, Error, Critical - у цьому порядку, конкретний рівень глушить усі попередні рівні у списку і показує всі наступні рівні. + + + Update:\nRelease: Official versions released every month that may be very outdated, but are more reliable and tested.\nNightly: Development versions that have all the latest features and fixes, but may contain bugs and are less stable. + Оновлення:\nРелізний: Офіційні версії, які випускаються щомісяця і можуть бути дуже старими, але вони більш надійні та перевірені.\nТестовий: Версії для розробників, які мають усі найновіші функції та виправлення, але можуть містити помилки та є менш стабільними. + + + Background Image:\nControl the opacity of the game background image. + Фонове зображення:\nКерує непрозорістю фонового зображення гри. + + + Play Title Music:\nIf a game supports it, enable playing special music when selecting the game in the GUI. + Грати титульну музику:\nВмикає відтворення спеціальної музики під час вибору гри в списку, якщо вона це підтримує. + + + Disable Trophy Pop-ups:\nDisable in-game trophy notifications. Trophy progress can still be tracked using the Trophy Viewer (right-click the game in the main window). + Вимкнути спливаючі вікна трофеїв:\nВимикає сповіщення про ігрові трофеї. Прогрес трофея все ще можна відстежувати за допомогою "Перегляд трофеїв" (клацніть правою кнопкою миші на грі у головному вікні). + + + Hide Cursor:\nChoose when the cursor will disappear:\nNever: You will always see the mouse.\nidle: Set a time for it to disappear after being idle.\nAlways: you will never see the mouse. + Приховувати курсор:\nВиберіть, коли курсор зникатиме:\nНіколи: Курсор миші завжди буде видимий.\nПри бездіяльності: Встановіть час, через який курсор зникне в разі бездіяльності.\nЗавжди: Курсор миші завжди буде прихований. + + + Hide Idle Cursor Timeout:\nThe duration (seconds) after which the cursor that has been idle hides itself. + Встановіть час, через який курсор зникне в разі бездіяльності. + + + Back Button Behavior:\nSets the controller's back button to emulate tapping the specified position on the PS4 touchpad. + Перепризначення кнопки «Назад»:\nНалаштовує кнопку «Назад» контролера на емуляцію натискання на зазначену область на сенсорній панелі контролера PS4. + + + Display Compatibility Data:\nDisplays game compatibility information in table view. Enable "Update Compatibility On Startup" to get up-to-date information. + Відображати данні ігрової сумістністі:\nВідображає інформацію про сумісність ігор у вигляді таблиці. Увімкніть "Оновлення даних ігрової сумісності під час запуску" для отримання актуальної інформації. + + + Update Compatibility On Startup:\nAutomatically update the compatibility database when shadPS4 starts. + Оновлення даних ігрової сумісності під час запуску:\nАвтоматично оновлює базу даних ігрової сумісності під час запуску shadPS4. + + + Update Compatibility Database:\nImmediately update the compatibility database. + Оновити данні ігрової сумістності:\nНегайно оновить базу даних ігрової сумісності. + + + Never + Ніколи + + + Idle + При бездіяльності + + + Always + Завжди + + + Touchpad Left + Ліва сторона тачпаду + + + Touchpad Right + Права сторона тачпаду + + + Touchpad Center + Середина тачпаду + + + None + Без змін + + + Graphics Device:\nOn multiple GPU systems, select the GPU the emulator will use from the drop down list,\nor select "Auto Select" to automatically determine it. + Графічний пристрій:\nУ системах із кількома GPU виберіть з випадаючого списку GPU, який буде використовувати емулятор,\nабо виберіть "Автовибір", щоб визначити його автоматично. + + + Width/Height:\nSets the size of the emulator window at launch, which can be resized during gameplay.\nThis is different from the in-game resolution. + Ширина/Висота:\nВстановіть розмір вікна емулятора під час запуску, який може бути змінений під час гри.\nЦе відрізняється від роздільної здатності в грі. + + + Vblank Divider:\nThe frame rate at which the emulator refreshes at is multiplied by this number. Changing this may have adverse effects, such as increasing the game speed, or breaking critical game functionality that does not expect this to change! + Розділювач Vblank:\nЧастота кадрів, з якою оновлюється емулятор, множиться на це число. Зміна цього параметра може мати негативні наслідки, такі як збільшення швидкості гри або порушення критичних функцій гри, які цього не очікують! + + + Enable Shaders Dumping:\nFor the sake of technical debugging, saves the games shaders to a folder as they render. + Увімкнути дамп шейдерів:\nДля технічного налагодження зберігає шейдери ігор у папку під час рендерингу. + + + Enable Null GPU:\nFor the sake of technical debugging, disables game rendering as if there were no graphics card. + Увімкнути NULL GPU:\nДля технічного налагодження відключає рендеринг гри так, ніби графічної карти немає. + + + Enable HDR:\nEnables HDR in games that support it.\nYour monitor must have support for the BT2020 PQ color space and the RGB10A2 swapchain format. + Увімкнути HDR:\nУвімкнути HDR в іграх, які його підтримують.\nВаш монітор повинен мати колірний простір BT2020 PQ та формат swapchain RGB10A2. + + + Game Folders:\nThe list of folders to check for installed games. + Ігрові папки:\nСписок папок, що скануватимуться для виявлення ігор. + + + Add:\nAdd a folder to the list. + Додати:\nДодати папку в список. + + + Remove:\nRemove a folder from the list. + Вилучити:\nВилучити папку зі списку. + + + Enable Debug Dumping:\nSaves the import and export symbols and file header information of the currently running PS4 program to a directory. + Увімкнути налагоджувальні дампи:\nЗберігає символи імпорту, експорту та інформацію про заголовок файлу поточної виконуваної програми PS4 у папку. + + + Enable Vulkan Validation Layers:\nEnables a system that validates the state of the Vulkan renderer and logs information about its internal state.\nThis will reduce performance and likely change the behavior of emulation. + Увімкнути шари валідації Vulkan:\nВключає систему, яка перевіряє стан рендерера Vulkan і логує інформацію про його внутрішній стан. Це знизить продуктивність і, ймовірно, змінить поведінку емуляції. + + + Enable Vulkan Synchronization Validation:\nEnables a system that validates the timing of Vulkan rendering tasks.\nThis will reduce performance and likely change the behavior of emulation. + Увімкнути валідацію синхронізації Vulkan:\nВключає систему, яка перевіряє таймінг завдань рендерингу Vulkan. Це знизить продуктивність і, ймовірно, змінить поведінку емуляції. + + + Enable RenderDoc Debugging:\nIf enabled, the emulator will provide compatibility with Renderdoc to allow capture and analysis of the currently rendered frame. + Увімкнути налагодження RenderDoc:\nЯкщо увімкнено, емулятор забезпечить сумісність із Renderdoc, даючи змогу захоплювати й аналізувати поточні кадри під час рендерингу. + + + Collect Shaders:\nYou need this enabled to edit shaders with the debug menu (Ctrl + F10). + Збирати шейдери:\nВам потрібно увімкнути цю опцію, щоб редагувати шейдери за допомогою меню налагодження (Ctrl + F10). + + + Crash Diagnostics:\nCreates a .yaml file with info about the Vulkan state at the time of crashing.\nUseful for debugging 'Device lost' errors. If you have this enabled, you should enable Host AND Guest Debug Markers.\nDoes not work on Intel GPUs.\nYou need Vulkan Validation Layers enabled and the Vulkan SDK for this to work. + Діагностика збоїв:\nСтворює .yaml файл з інформацією про стан Vulkan на момент збою.\nКорисно для налагодження помилок 'Device lost'. Якщо у вас увімкнено цей параметр, вам слід увімкнути маркери налагодження Хоста ТА Гостя.\nНе працює на графічних процесорах Intel.\nДля цього вам потрібно увімкнути шари валідації Vulkan і мати Vulkan SDK. + + + Copy GPU Buffers:\nGets around race conditions involving GPU submits.\nMay or may not help with PM4 type 0 crashes. + Копіювати буфери GPU:\nДозволяє обійти проблеми синхронізації, пов'язані з відправленням даних на GPU\nМоже як допомогти, так і не вплинути на збої типу PM4 (тип 0). + + + Host Debug Markers:\nInserts emulator-side information like markers for specific AMDGPU commands around Vulkan commands, as well as giving resources debug names.\nIf you have this enabled, you should enable Crash Diagnostics.\nUseful for programs like RenderDoc. + Хостові маркери налагодження:\nДодає інформацію емулятора, наприклад маркери для конкретних команд AMDGPU у Vulkan, також присвоює ресурсам налагоджувані назви.\nЯкщо ця опція увімкнена, рекомендується також активувати діагностику збоїв.\nКорисно для програм на кшталт RenderDoc. + + + Guest Debug Markers:\nInserts any debug markers the game itself has added to the command buffer.\nIf you have this enabled, you should enable Crash Diagnostics.\nUseful for programs like RenderDoc. + Гостьові маркери налагодження:\nВставляє налагоджувані маркери, які сама гра додала до командного буфера.\nЯкщо ця опція увімкнена, рекомендується також активувати діагностику збоїв.\nКорисно для програм на кшталт RenderDoc. + + + Save Data Path:\nThe folder where game save data will be saved. + Шлях до файлів збережень:\nПапка, де будуть зберігатися ігрові збереження. + + + Browse:\nBrowse for a folder to set as the save data path. + Вибрати:\nВиберіть папку для ігрових збережень. + + + Release + Релізний + + + Nightly + Тестовий + + + Set the volume of the background music. + Налаштування гучності фонової музики. + + + Enable Motion Controls + Увімкнути керування рухом + + + Save Data Path + Шлях до файлів збережень + + + Browse + Обрати + + + async + Асинхронний + + + sync + Синхронний + + + Auto Select + Автовибір + + + Directory to install games + Папка для встановлення ігор + + + Directory to save data + Папка для збереження даних + + + Video + Відео + + + Display Mode + Режим відображення + + + Windowed + У вікні + + + Fullscreen + Повноекранний + + + Fullscreen (Borderless) + Повний екран (без рамок) + + + Window Size + Розмір вікна + + + W: + Висота: + + + H: + Ширина: + + + Separate Log Files + Окремі файли журналу + + + Separate Log Files:\nWrites a separate logfile for each game. + Окремі файли журналу:\nЗаписує окремий файл журналу для кожної гри. + + + Trophy Notification Position + Розміщення сповіщень про трофеї + + + Left + Ліворуч + + + Right + Праворуч + + + Top + Вгорі + + + Bottom + Внизу + + + Notification Duration + Тривалість сповіщення + + + Portable User Folder + Портативна папка користувача + + + Create Portable User Folder from Common User Folder + Створити портативну папку користувача з загальної папки + + + Portable user folder:\nStores shadPS4 settings and data that will be applied only to the shadPS4 build located in the current folder. Restart the app after creating the portable user folder to begin using it. + Портативна папка користувача:\nЗберігає налаштування та дані shadPS4, які будуть застосовані лише до збірки shadPS4, розташованої у поточній теці. Перезапустіть програму після створення портативної теки користувача, щоб почати користуватися нею. + + + Cannot create portable user folder + Не вдалося створити портативну папку користувача + + + %1 already exists + %1 вже існує + + + Portable user folder created + Портативна папка користувача створена + + + %1 successfully created. + %1 успішно створено. + + + Open the custom trophy images/sounds folder:\nYou can add custom images to the trophies and an audio.\nAdd the files to custom_trophy with the following names:\ntrophy.wav OR trophy.mp3, bronze.png, gold.png, platinum.png, silver.png\nNote: The sound will only work in QT versions. + Відкрити папку користувацьких зображень трофеїв/звуків:\nВи можете додати користувацькі зображення до трофеїв та звук.\nДодайте файли до теки custom_trophy з такими назвами:\ntrophy.wav АБО trophy.mp3, bronze.png, gold.png, platinum.png, silver.png\nПримітка: Звук буде працювати лише у версіях ShadPS4 з графічним інтерфейсом. + + + + TrophyViewer + + Trophy Viewer + Трофеї + + + Select Game: + Select Game: + + + Progress + Прогрес + + + Show Earned Trophies + Показати отримані трофеї + + + Show Not Earned Trophies + Показати не отримані трофеї + + + Show Hidden Trophies + Показати приховані трофеї + + + diff --git a/src/qt_gui/translations/update_translation.sh b/src/qt_gui/translations/update_translation.sh new file mode 100755 index 000000000..e1f70b993 --- /dev/null +++ b/src/qt_gui/translations/update_translation.sh @@ -0,0 +1,13 @@ +#!/bin/bash + +SCRIPTDIR=$(dirname "${BASH_SOURCE[0]}") + +OPTS="-tr-function-alias QT_TRANSLATE_NOOP+=TRANSLATE,QT_TRANSLATE_NOOP+=TRANSLATE_SV,QT_TRANSLATE_NOOP+=TRANSLATE_STR,QT_TRANSLATE_NOOP+=TRANSLATE_FS,QT_TRANSLATE_N_NOOP3+=TRANSLATE_FMT,QT_TRANSLATE_NOOP+=TRANSLATE_NOOP,translate+=TRANSLATE_PLURAL_STR,translate+=TRANSLATE_PLURAL_FS -no-obsolete" +SRCDIRS=$(realpath "$SCRIPTDIR/..")/\ $(realpath "$SCRIPTDIR/../..")/ +OUTDIR=$(realpath "$SCRIPTDIR") + +lupdate $SRCDIRS $OPTS -locations none -source-language en_US -ts "$OUTDIR/en_US.ts" + +if ! head -n 2 "$OUTDIR/en_US.ts" | grep -q "SPDX-FileCopyrightText"; then + sed -i '2i\' "$OUTDIR/en_US.ts" +fi diff --git a/src/qt_gui/translations/vi_VN.ts b/src/qt_gui/translations/vi_VN.ts index 997c3d3f9..b8c1759be 100644 --- a/src/qt_gui/translations/vi_VN.ts +++ b/src/qt_gui/translations/vi_VN.ts @@ -1,1664 +1,2089 @@ + - - - - 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... - - - - InstallDirSelect - - - shadPS4 - Choose directory - shadPS4 - Choose directory - - - - Select which directory you want to install to. - Select which directory you want to install to. - - - - 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 - - - - Cheats / Patches - Mẹo / Bản vá - - - - SFO Viewer - SFO Viewer - - - - Trophy Viewer - Trophy Viewer - - - - Open Folder... - Mở Thư Mục... - - - - Open Game Folder - Mở Thư Mục Trò Chơi - - - - Open Save Data Folder - Mở Thư Mục Dữ Liệu Lưu - - - - Open Log Folder - Mở Thư Mục Nhật Ký - - - - Copy info... - Copy info... - - - - Copy Name - Copy Name - - - - Copy Serial - Copy Serial - - - - Copy All - Copy All - - - - Delete... - Delete... - - - - Delete Game - Delete Game - - - - Delete Update - Delete Update - - - - Delete DLC - Delete DLC - - - - Compatibility... - Compatibility... - - - - Update database - Update database - - - - View report - View report - - - - Submit a report - Submit a report - - - - Shortcut creation - Shortcut creation - - - - Shortcut created successfully! - Shortcut created successfully! - - - - Error - Error - - - - Error creating shortcut! - Error creating shortcut! - - - - Install PKG - Install PKG - - - - Game - Game - - - - requiresEnableSeparateUpdateFolder_MSG - This feature requires the 'Enable Separate Update Folder' config option to work. If you want to use this feature, please enable it. - - - - This game has no update to delete! - This game has no update to delete! - - - - Update - Update - - - - This game has no DLC to delete! - This game has no DLC to delete! - - - - DLC - DLC - - - - Delete %1 - Delete %1 - - - - Are you sure you want to delete %1's %2 directory? - Are you sure you want to delete %1's %2 directory? - - - - MainWindow - - - Open/Add Elf Folder - Open/Add Elf Folder - - - - Install Packages (PKG) - Install Packages (PKG) - - - - Boot Game - Boot Game - - - - Check for Updates - Kiểm tra bản cập nhật - - - - 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 - - - - Download Cheats/Patches - Tải Mẹo / Bản vá - - - - 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 - - - - Help - Giúp đỡ - - - - 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 - - - - Enable Separate Update Folder - Enable Separate Update Folder - - - - Show Splash - Show Splash - - - - Is PS4 Pro - Is PS4 Pro - - - - Enable Discord Rich Presence - Bật Discord Rich Presence - - - - Username - Username - - - - Trophy Key - Trophy Key - - - - Trophy - Trophy - - - - Logger - Logger - - - - Log Type - Log Type - - - - Log Filter - Log Filter - - - - Input - Đầu vào - - - - Cursor - Con trỏ - - - - Hide Cursor - Ẩn con trỏ - - - - Hide Cursor Idle Timeout - Thời gian chờ ẩn con trỏ - - - - s - s - - - - Controller - Điều khiển - - - - Back Button Behavior - Hành vi nút quay lại - - - - 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 - - - - Paths - Đường dẫn - - - - Game Folders - Thư mục trò chơi - - - - Add... - Thêm... - - - - Remove - Xóa - - - - 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 - - - - Update - Cập nhật - - - - Check for Updates at Startup - Kiểm tra cập nhật khi khởi động - - - - Update Channel - Kênh Cập Nhật - - - - Check for Updates - Kiểm tra cập nhật - - - - GUI Settings - Cài đặt GUI - - - - Disable Trophy Pop-ups - Disable Trophy Pop-ups - - - - Play title music - Phát nhạc tiêu đề - - - - Update Compatibility Database On Startup - Update Compatibility Database On Startup - - - - Game Compatibility - Game Compatibility - - - - Display Compatibility Data - Display Compatibility Data - - - - Update Compatibility Database - Update Compatibility Database - - - - Volume - Âm lượng - - - - Audio Backend - Audio Backend - - - - MainWindow - - - Game List - Danh sách trò chơi - - - - * 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! - Đã phát hiện bản vá! - - - - PKG and Game versions match: - Các phiên bản PKG và trò chơi khớp nhau: - - - - Would you like to overwrite? - Bạn có muốn ghi đè không? - - - - PKG Version %1 is older than installed version: - Phiên bản PKG %1 cũ hơn phiên bản đã cài đặt: - - - - Game is installed: - Trò chơi đã được cài đặt: - - - - Would you like to install Patch: - Bạn có muốn cài đặt bản vá: - - - - DLC Installation - Cài đặt DLC - - - - Would you like to install DLC: %1? - Bạn có muốn cài đặt DLC: %1? - - - - DLC already installed: - DLC đã được cài đặt: - - - - Game already installed - Trò chơi đã được cài đặt - - - - 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 for - Cheats / Patches for - - - - 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. Nếu bản vá không xuất hiện, có thể là nó không tồn tại cho số seri và phiên bản cụ thể của trò chơi. - - - - 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. - - - - The game is in version: %1 - Trò chơi đang ở phiên bản: %1 - - - - The downloaded patch only works on version: %1 - Patch đã tải về chỉ hoạt động trên phiên bản: %1 - - - - You may need to update your game. - Bạn có thể cần cập nhật trò chơi của mình. - - - - Incompatibility Notice - Thông báo không tương thích - - - - 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: - - - - Can't apply cheats before the game is started - Không thể áp dụng cheat trước khi trò chơi bắt đầu. - - - - SettingsDialog - - - Save - Lưu - - - - Apply - Áp dụng - - - - Restore Defaults - Khôi phục cài đặt mặc định - - - - Close - Đóng - - - - Point your mouse at an option to display its description. - Di chuyển chuột đến tùy chọn để hiển thị mô tả của nó. - - - - consoleLanguageGroupBox - Ngôn ngữ console:\nChọn ngôn ngữ mà trò chơi PS4 sẽ sử dụng.\nKhuyên bạn nên đặt tùy chọn này thành một ngôn ngữ mà trò chơi hỗ trợ, có thể thay đổi tùy theo vùng. - - - - emulatorLanguageGroupBox - Ngôn ngữ của trình giả lập:\nChọn ngôn ngữ của giao diện người dùng của trình giả lập. - - - - fullscreenCheckBox - Bật chế độ toàn màn hình:\nTự động đặt cửa sổ trò chơi ở chế độ toàn màn hình.\nĐiều này có thể bị vô hiệu hóa bằng cách nhấn phím F11. - - - - separateUpdatesCheckBox - Enable Separate Update Folder:\nEnables installing game updates into a separate folder for easy management. - - - - showSplashCheckBox - Hiển thị màn hình khởi động:\nHiển thị màn hình khởi động của trò chơi (một hình ảnh đặc biệt) trong khi trò chơi khởi động. - - - - ps4proCheckBox - Là PS4 Pro:\nKhiến trình giả lập hoạt động như một PS4 PRO, điều này có thể kích hoạt các tính năng đặc biệt trong các trò chơi hỗ trợ điều này. - - - - discordRPCCheckbox - Bật Discord Rich Presence:\nHiển thị biểu tượng trình giả lập và thông tin liên quan trên hồ sơ Discord của bạn. - - - - userName - Tên người dùng:\nChọn tên người dùng của tài khoản PS4, có thể được một số trò chơi hiển thị. - - - - TrophyKey - Trophy Key:\nKey used to decrypt trophies. Must be obtained from your jailbroken console.\nMust contain only hex characters. - - - - logTypeGroupBox - Loại nhật ký:\nChọn xem có đồng bộ hóa đầu ra cửa sổ nhật ký cho hiệu suất hay không. Điều này có thể có tác động tiêu cực đến việc giả lập. - - - - logFilter - Bộ lọc nhật ký:\nLọc nhật ký để in chỉ thông tin cụ thể.\nVí dụ: "Core:Trace" "Lib.Pad:Debug Common.Filesystem:Error" "*:Critical" Các mức: Trace, Debug, Info, Warning, Error, Critical - theo thứ tự này, một mức cụ thể làm tắt tất cả các mức trước trong danh sách và ghi lại tất cả các mức sau đó. - - - - updaterGroupBox - Cập nhật:\nRelease: Các phiên bản chính thức được phát hành hàng tháng; có thể khá cũ nhưng đáng tin cậy hơn và đã được thử nghiệm.\nNightly: Các phiên bản phát triển có tất cả các tính năng và sửa lỗi mới nhất; có thể có lỗi và ít ổn định hơn. - - - - GUIgroupBox - Phát nhạc tiêu đề trò chơi:\nNếu một trò chơi hỗ trợ điều này, hãy kích hoạt phát nhạc đặc biệt khi bạn chọn trò chơi trong GUI. - - - - disableTrophycheckBox - Disable Trophy Pop-ups:\nDisable in-game trophy notifications. Trophy progress can still be tracked using the Trophy Viewer (right-click the game in the main window). - - - - hideCursorGroupBox - Ẩn con trỏ:\nChọn khi nào con trỏ sẽ biến mất:\nKhông bao giờ: Bạn sẽ luôn thấy chuột.\nKhông hoạt động: Đặt một khoảng thời gian để nó biến mất sau khi không hoạt động.\nLuôn luôn: bạn sẽ không bao giờ thấy chuột. - - - - idleTimeoutGroupBox - Đặt thời gian để chuột biến mất sau khi không hoạt động. - - - - backButtonBehaviorGroupBox - Hành vi nút quay lại:\nĐặt nút quay lại của tay cầm để mô phỏng việc chạm vào vị trí đã chỉ định trên touchpad của PS4. - - - - enableCompatibilityCheckBox - Display Compatibility Data:\nDisplays game compatibility information in table view. Enable "Update Compatibility On Startup" to get up-to-date information. - - - - checkCompatibilityOnStartupCheckBox - Update Compatibility On Startup:\nAutomatically update the compatibility database when shadPS4 starts. - - - - updateCompatibilityButton - Update Compatibility Database:\nImmediately update the compatibility database. - - - - Never - Không bao giờ - - - - Idle - Nhàn rỗi - - - - Always - Luôn luôn - - - - Touchpad Left - Touchpad Trái - - - - Touchpad Right - Touchpad Phải - - - - Touchpad Center - Giữa Touchpad - - - - None - Không có - - - - graphicsAdapterGroupBox - Thiết bị đồ họa:\nTrên các hệ thống có GPU đa năng, hãy chọn GPU mà trình giả lập sẽ sử dụng từ danh sách thả xuống,\hoặc chọn "Auto Select" để tự động xác định. - - - - resolutionLayout - Chiều rộng/Cao:\nChọn kích thước cửa sổ của trình giả lập khi khởi động, có thể điều chỉnh trong quá trình chơi.\nĐiều này khác với độ phân giải trong trò chơi. - - - - heightDivider - Bộ chia Vblank:\nTốc độ khung hình mà trình giả lập làm mới được nhân với số này. Thay đổi này có thể có tác động tiêu cực như tăng tốc độ trò chơi hoặc làm hỏng chức năng quan trọng mà trò chơi không mong đợi thay đổi điều này! - - - - dumpShadersCheckBox - Bật xuất shader:\nĐể mục đích gỡ lỗi kỹ thuật, lưu shader của trò chơi vào một thư mục khi chúng được kết xuất. - - - - nullGpuCheckBox - Bật GPU Null:\nĐể mục đích gỡ lỗi kỹ thuật, vô hiệu hóa việc kết xuất trò chơi như thể không có card đồ họa. - - - - gameFoldersBox - Thư mục trò chơi:\nDanh sách các thư mục để kiểm tra các trò chơi đã cài đặt. - - - - addFolderButton - Thêm:\nThêm một thư mục vào danh sách. - - - - removeFolderButton - Xóa:\nXóa một thư mục khỏi danh sách. - - - - debugDump - Bật xuất gỡ lỗi:\nLưu biểu tượng nhập và xuất và thông tin tiêu đề tệp cho ứng dụng PS4 hiện đang chạy vào một thư mục. - - - - vkValidationCheckBox - Bật lớp xác thực Vulkan:\nKích hoạt một hệ thống xác thực trạng thái của bộ kết xuất Vulkan và ghi lại thông tin về trạng thái nội bộ của nó. Điều này sẽ giảm hiệu suất và có thể thay đổi hành vi của việc giả lập. - - - - vkSyncValidationCheckBox - Bật xác thực đồng bộ Vulkan:\nKích hoạt một hệ thống xác thực thời gian của nhiệm vụ kết xuất Vulkan. Điều này sẽ giảm hiệu suất và có thể thay đổi hành vi của việc giả lập. - - - - rdocCheckBox - Bật gỡ lỗi RenderDoc:\nNếu được kích hoạt, trình giả lập sẽ cung cấp tính tương thích với Renderdoc để cho phép bắt và phân tích khung hình hiện tại đang được kết xuất. - - - - GameListFrame - - - Icon - Biểu tượng - - - - Name - Tên - - - - Serial - Số seri - - - - Compatibility - Compatibility - - - - Region - Khu vực - - - - Firmware - Phần mềm - - - - Size - Kích thước - - - - Version - Phiên bản - - - - Path - Đường dẫn - - - - Play Time - Thời gian chơi - - - - Never Played - Never Played - - - - h - h - - - - m - m - - - - s - s - - - - Compatibility is untested - Compatibility is untested - - - - Game does not initialize properly / crashes the emulator - Game does not initialize properly / crashes the emulator - - - - Game boots, but only displays a blank screen - Game boots, but only displays a blank screen - - - - Game displays an image but does not go past the menu - Game displays an image but does not go past the menu - - - - Game has game-breaking glitches or unplayable performance - Game has game-breaking glitches or unplayable performance - - - - Game can be completed with playable performance and no major glitches - Game can be completed with playable performance and no major glitches - - - - CheckUpdate - - - Auto Updater - Trình cập nhật tự động - - - - Error - Lỗi - - - - Network error: - Lỗi mạng: - - - - Failed to parse update information. - Không thể phân tích thông tin cập nhật. - - - - No pre-releases found. - Không tìm thấy bản phát hành trước. - - - - Invalid release data. - Dữ liệu bản phát hành không hợp lệ. - - - - No download URL found for the specified asset. - Không tìm thấy URL tải xuống cho tài sản đã chỉ định. - - - - Your version is already up to date! - Phiên bản của bạn đã được cập nhật! - - - - Update Available - Có bản cập nhật - - - - Update Channel - Kênh Cập Nhật - - - - Current Version - Phiên bản hiện tại - - - - Latest Version - Phiên bản mới nhất - - - - Do you want to update? - Bạn có muốn cập nhật không? - - - - Show Changelog - Hiện nhật ký thay đổi - - - - Check for Updates at Startup - Kiểm tra cập nhật khi khởi động - - - - Update - Cập nhật - - - - No - Không - - - - Hide Changelog - Ẩn nhật ký thay đổi - - - - Changes - Thay đổi - - - - Network error occurred while trying to access the URL - Xảy ra lỗi mạng khi cố gắng truy cập URL - - - - Download Complete - Tải xuống hoàn tất - - - - The update has been downloaded, press OK to install. - Bản cập nhật đã được tải xuống, nhấn OK để cài đặt. - - - - Failed to save the update file at - Không thể lưu tệp cập nhật tại - - - - Starting Update... - Đang bắt đầu cập nhật... - - - - Failed to create the update script file - Không thể tạo tệp kịch bản cập nhật - - - - GameListUtils - - - B - B - - - - KB - KB - - - - MB - MB - - - - GB - GB - - - - TB - TB - - - \ No newline at end of file + + + AboutDialog + + About shadPS4 + Về shadPS4 + + + shadPS4 is an experimental open-source emulator for the PlayStation 4. + shadPS4 là một trình giả lập thử nghiệm mã nguồn mở cho PlayStation 4. + + + This software should not be used to play games you have not legally obtained. + Không sử dụng phần mềm này để chơi những trò chơi mà bạn không sở hữu một cách hợp pháp. + + + + CheatsPatches + + Cheats / Patches for + Cheats / Patches for + + + 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:\n + 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:\n + + + 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 + + + No Cheats found for this game in this version of the selected repository,try another repository or a different version of the game. + 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 + + + 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. + 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 + + + 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. If the patch does not appear, it may be that it does not exist for the specific serial and version of the game. + 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. Nếu bản vá không xuất hiện, có thể là nó không tồn tại cho số seri và phiên bản cụ thể của trò chơi. + + + 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. + + + The game is in version: %1 + Trò chơi đang ở phiên bản: %1 + + + The downloaded patch only works on version: %1 + Patch đã tải về chỉ hoạt động trên phiên bản: %1 + + + You may need to update your game. + Bạn có thể cần cập nhật trò chơi của mình. + + + Incompatibility Notice + Thông báo không tương thích + + + 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: + + + Can't apply cheats before the game is started + Không thể áp dụng cheat trước khi trò chơi bắt đầu. + + + Close + Đóng + + + + CheckUpdate + + Auto Updater + Trình cập nhật tự động + + + Error + Lỗi + + + Network error: + Lỗi mạng: + + + The Auto Updater allows up to 60 update checks per hour.\nYou have reached this limit. Please try again later. + Trình cập nhật tự động cho phép tối đa 60 lần kiểm tra cập nhật mỗi giờ.\nBạn đã đạt đến giới hạn này. Vui lòng thử lại sau. + + + Failed to parse update information. + Không thể phân tích thông tin cập nhật. + + + No pre-releases found. + Không tìm thấy bản phát hành trước. + + + Invalid release data. + Dữ liệu bản phát hành không hợp lệ. + + + No download URL found for the specified asset. + Không tìm thấy URL tải xuống cho tài sản đã chỉ định. + + + Your version is already up to date! + Phiên bản của bạn đã được cập nhật! + + + Update Available + Có bản cập nhật + + + Update Channel + Kênh Cập Nhật + + + Current Version + Phiên bản hiện tại + + + Latest Version + Phiên bản mới nhất + + + Do you want to update? + Bạn có muốn cập nhật không? + + + Show Changelog + Hiện nhật ký thay đổi + + + Check for Updates at Startup + Kiểm tra cập nhật khi khởi động + + + Update + Cập nhật + + + No + Không + + + Hide Changelog + Ẩn nhật ký thay đổi + + + Changes + Thay đổi + + + Network error occurred while trying to access the URL + Xảy ra lỗi mạng khi cố gắng truy cập URL + + + Download Complete + Tải xuống hoàn tất + + + The update has been downloaded, press OK to install. + Bản cập nhật đã được tải xuống, nhấn OK để cài đặt. + + + Failed to save the update file at + Không thể lưu tệp cập nhật tại + + + Starting Update... + Đang bắt đầu cập nhật... + + + Failed to create the update script file + Không thể tạo tệp kịch bản cập nhật + + + + CompatibilityInfoClass + + Fetching compatibility data, please wait + Đang tải dữ liệu tương thích, vui lòng chờ + + + Cancel + Hủy bỏ + + + Loading... + Đang tải... + + + Error + Lỗi + + + Unable to update compatibility data! Try again later. + Không thể cập nhật dữ liệu tương thích! Vui lòng thử lại sau. + + + Unable to open compatibility_data.json for writing. + Không thể mở compatibility_data.json để ghi. + + + Unknown + Không xác định + + + Nothing + Không có gì + + + Boots + Giày ủng + + + Menus + Menu + + + Ingame + Trong game + + + Playable + Có thể chơi + + + + ControlSettings + + Configure Controls + Cấu hình điều khiển + + + D-Pad + D-Pad + + + Up + Up + + + Left + Left + + + Right + Right + + + Down + Down + + + Left Stick Deadzone (def:2 max:127) + Left Stick Deadzone (def:2 max:127) + + + Left Deadzone + Left Deadzone + + + Left Stick + Left Stick + + + Config Selection + Config Selection + + + Common Config + Common Config + + + Use per-game configs + Use per-game configs + + + L1 / LB + L1 / LB + + + L2 / LT + L2 / LT + + + Back + Back + + + R1 / RB + R1 / RB + + + R2 / RT + R2 / RT + + + L3 + L3 + + + Options / Start + Options / Start + + + R3 + R3 + + + Face Buttons + Face Buttons + + + Triangle / Y + Triangle / Y + + + Square / X + Square / X + + + Circle / B + Circle / B + + + Cross / A + Cross / A + + + Right Stick Deadzone (def:2, max:127) + Right Stick Deadzone (def:2, max:127) + + + Right Deadzone + Right Deadzone + + + Right Stick + Right Stick + + + Color Adjustment + Color Adjustment + + + R: + R: + + + G: + G: + + + B: + B: + + + Override Lightbar Color + Override Lightbar Color + + + Override Color + Override Color + + + Unable to Save + Unable to Save + + + Cannot bind axis values more than once + Cannot bind axis values more than once + + + Save + Save + + + Apply + Apply + + + Restore Defaults + Restore Defaults + + + Cancel + Cancel + + + + EditorDialog + + Edit Keyboard + Mouse and Controller input bindings + Edit Keyboard + Mouse and Controller input bindings + + + Use Per-Game configs + Use Per-Game configs + + + Error + Error + + + Could not open the file for reading + Could not open the file for reading + + + Could not open the file for writing + Could not open the file for writing + + + Save Changes + Save Changes + + + Do you want to save changes? + Do you want to save changes? + + + Help + Help + + + Do you want to reset your custom default config to the original default config? + Do you want to reset your custom default config to the original default config? + + + Do you want to reset this config to your custom default config? + Do you want to reset this config to your custom default config? + + + Reset to Default + Reset to Default + + + + 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 - Chọn thư mục + + + Directory to install games + Thư mục để cài các trò chơi + + + Browse + Duyệt + + + Error + Lỗi + + + Directory to install DLC + Thư mục để cài DLC + + + + GameListFrame + + Icon + Biểu tượng + + + Name + Tên + + + Serial + Số seri + + + Compatibility + Khả năng tương thích + + + Region + Khu vực + + + Firmware + Phần mềm + + + Size + Kích thước + + + Version + Phiên bản + + + Path + Đường dẫn + + + Play Time + Thời gian chơi + + + Never Played + Chưa chơi + + + h + h + + + m + m + + + s + s + + + Compatibility is untested + Chưa kiểm tra khả năng tương thích + + + Game does not initialize properly / crashes the emulator + Game does not initialize properly / crashes the emulator + + + Game boots, but only displays a blank screen + Game boots, but only displays a blank screen + + + Game displays an image but does not go past the menu + Game displays an image but does not go past the menu + + + Game has game-breaking glitches or unplayable performance + Game has game-breaking glitches or unplayable performance + + + Game can be completed with playable performance and no major glitches + Game can be completed with playable performance and no major glitches + + + Click to see details on github + Nhấp để xem chi tiết trên GitHub + + + Last updated + Cập nhật lần cuối + + + + GameListUtils + + B + B + + + KB + KB + + + MB + MB + + + GB + GB + + + TB + TB + + + + GuiContextMenus + + Create Shortcut + Tạo phím tắt + + + Cheats / Patches + Mẹo / Bản vá + + + SFO Viewer + Trình xem SFO + + + Trophy Viewer + Trình xem chiến tích + + + Open Folder... + Mở Thư Mục... + + + Open Game Folder + Mở Thư Mục Trò Chơi + + + Open Save Data Folder + Mở Thư Mục Dữ Liệu Lưu + + + Open Log Folder + Mở Thư Mục Nhật Ký + + + Copy info... + Sao chép thông tin... + + + Copy Name + Sao chép tên + + + Copy Serial + Copy Serial + + + Copy Version + Copy Version + + + Copy Size + Copy Size + + + Copy All + Copy All + + + Delete... + Delete... + + + Delete Game + Delete Game + + + Delete Update + Delete Update + + + Delete DLC + Delete DLC + + + Delete Trophy + Delete Trophy + + + Compatibility... + Compatibility... + + + Update database + Update database + + + View report + View report + + + Submit a report + Submit a report + + + Shortcut creation + Shortcut creation + + + Shortcut created successfully! + Shortcut created successfully! + + + Error + Error + + + Error creating shortcut! + Error creating shortcut! + + + Game + Game + + + This game has no update to delete! + This game has no update to delete! + + + Update + Update + + + This game has no DLC to delete! + This game has no DLC to delete! + + + DLC + DLC + + + Delete %1 + Delete %1 + + + Are you sure you want to delete %1's %2 directory? + Are you sure you want to delete %1's %2 directory? + + + Open Update Folder + Open Update Folder + + + Delete Save Data + Delete Save Data + + + This game has no update folder to open! + This game has no update folder to open! + + + No log file found for this game! + No log file found for this game! + + + Failed to convert icon. + Failed to convert icon. + + + This game has no save data to delete! + This game has no save data to delete! + + + This game has no saved trophies to delete! + This game has no saved trophies to delete! + + + Save Data + Save Data + + + Trophy + Trophy + + + SFO Viewer for + SFO Viewer for + + + + HelpDialog + + Quickstart + Quickstart + + + FAQ + FAQ + + + Syntax + Syntax + + + Special Bindings + Special Bindings + + + Keybindings + Keybindings + + + + KBMSettings + + Configure Controls + Configure Controls + + + D-Pad + D-Pad + + + Up + Up + + + unmapped + unmapped + + + Left + Left + + + Right + Right + + + Down + Down + + + Left Analog Halfmode + Left Analog Halfmode + + + hold to move left stick at half-speed + hold to move left stick at half-speed + + + Left Stick + Left Stick + + + Config Selection + Config Selection + + + Common Config + Common Config + + + Use per-game configs + Use per-game configs + + + L1 + L1 + + + L2 + L2 + + + Text Editor + Text Editor + + + Help + Help + + + R1 + R1 + + + R2 + R2 + + + L3 + L3 + + + Touchpad Click + Touchpad Click + + + Mouse to Joystick + Mouse to Joystick + + + *press F7 ingame to activate + *press F7 ingame to activate + + + R3 + R3 + + + Options + Options + + + Mouse Movement Parameters + Mouse Movement Parameters + + + note: click Help Button/Special Keybindings for more information + note: click Help Button/Special Keybindings for more information + + + Face Buttons + Face Buttons + + + Triangle + Triangle + + + Square + Square + + + Circle + Circle + + + Cross + Cross + + + Right Analog Halfmode + Right Analog Halfmode + + + hold to move right stick at half-speed + hold to move right stick at half-speed + + + Right Stick + Right Stick + + + Speed Offset (def 0.125): + Speed Offset (def 0.125): + + + Copy from Common Config + Copy from Common Config + + + Deadzone Offset (def 0.50): + Deadzone Offset (def 0.50): + + + Speed Multiplier (def 1.0): + Speed Multiplier (def 1.0): + + + Common Config Selected + Common Config Selected + + + This button copies mappings from the Common Config to the currently selected profile, and cannot be used when the currently selected profile is the Common Config. + This button copies mappings from the Common Config to the currently selected profile, and cannot be used when the currently selected profile is the Common Config. + + + Copy values from Common Config + Copy values from Common Config + + + Do you want to overwrite existing mappings with the mappings from the Common Config? + Do you want to overwrite existing mappings with the mappings from the Common Config? + + + Unable to Save + Unable to Save + + + Cannot bind any unique input more than once + Cannot bind any unique input more than once + + + Press a key + Press a key + + + Cannot set mapping + Cannot set mapping + + + Mousewheel cannot be mapped to stick outputs + Mousewheel cannot be mapped to stick outputs + + + Save + Save + + + Apply + Apply + + + Restore Defaults + Restore Defaults + + + Cancel + Cancel + + + + MainWindow + + Open/Add Elf Folder + Open/Add Elf Folder + + + Boot Game + Boot Game + + + Check for Updates + Kiểm tra bản cập nhật + + + About shadPS4 + About shadPS4 + + + Configure... + Configure... + + + Recent Games + Recent Games + + + Open shadPS4 Folder + Open shadPS4 Folder + + + 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 + + + Download Cheats/Patches + Tải Mẹo / Bản vá + + + Dump Game List + Dump Game List + + + Trophy Viewer + Trophy Viewer + + + No games found. Please add your games to your library first. + No games found. Please add your games to your library first. + + + Search... + Search... + + + File + File + + + View + View + + + Game List Icons + Game List Icons + + + Game List Mode + Game List Mode + + + Settings + Settings + + + Utils + Utils + + + Themes + Themes + + + Help + Giúp đỡ + + + Dark + Dark + + + Light + Light + + + Green + Green + + + Blue + Blue + + + Violet + Violet + + + toolBar + toolBar + + + Game List + Danh sách trò chơi + + + * 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: + + + 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! + + + Run Game + Run Game + + + Eboot.bin file not found + Eboot.bin file not found + + + Game is already running! + Game is already running! + + + shadPS4 + shadPS4 + + + Play + Play + + + Pause + Pause + + + Stop + Stop + + + Restart + Restart + + + Full Screen + Full Screen + + + Controllers + Controllers + + + Keyboard + Keyboard + + + Refresh List + Refresh List + + + Resume + Resume + + + Show Labels Under Icons + Show Labels Under Icons + + + + SettingsDialog + + Settings + Cài đặt + + + General + Chung + + + System + Hệ thống + + + Console Language + Ngôn ngữ của console + + + Emulator Language + Ngôn ngữ trình giả lập + + + Emulator + Trình giả lập + + + Enable Separate Update Folder + Bật thư mục cập nhật riêng + + + Default tab when opening settings + Tab mặc định khi mở cài đặt + + + Show Game Size In List + Hiển thị Kích thước Game trong Danh sách + + + Show Splash + Hiển thị splash + + + Enable Discord Rich Presence + Bật Discord Rich Presence + + + Username + Tên người dùng + + + Trophy Key + Trophy Key + + + Trophy + Trophy + + + Open the custom trophy images/sounds folder + Open the custom trophy images/sounds folder + + + Logger + Logger + + + Log Type + Log Type + + + Log Filter + Log Filter + + + Open Log Location + Mở vị trí nhật ký + + + Input + Đầu vào + + + Cursor + Con trỏ + + + Hide Cursor + Ẩn con trỏ + + + Hide Cursor Idle Timeout + Thời gian chờ ẩn con trỏ + + + s + s + + + Controller + Điều khiển + + + Back Button Behavior + Hành vi nút quay lại + + + Graphics + Đồ họa + + + GUI + Giao diện + + + User + Người dùng + + + Graphics Device + Thiết bị đồ họa + + + Vblank Divider + Vblank Divider + + + Advanced + Nâng cao + + + Enable Shaders Dumping + Enable Shaders Dumping + + + Enable NULL GPU + Enable NULL GPU + + + Enable HDR + Enable HDR + + + Paths + Đường dẫn + + + Game Folders + Thư mục trò chơi + + + Add... + Thêm... + + + Remove + Xóa + + + Debug + Gỡ lỗi + + + 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 + + + Enable Crash Diagnostics + Enable Crash Diagnostics + + + Collect Shaders + Collect Shaders + + + Copy GPU Buffers + Copy GPU Buffers + + + Host Debug Markers + Host Debug Markers + + + Guest Debug Markers + Guest Debug Markers + + + Update + Cập nhật + + + Check for Updates at Startup + Kiểm tra cập nhật khi khởi động + + + Always Show Changelog + Luôn hiển thị nhật ký thay đổi + + + Update Channel + Kênh Cập Nhật + + + Check for Updates + Kiểm tra cập nhật + + + GUI Settings + Cài đặt GUI + + + Title Music + Title Music + + + Disable Trophy Notification + Disable Trophy Notification + + + Background Image + Hình nền + + + Show Background Image + Hiển thị hình nền + + + Opacity + Độ mờ đục + + + Play title music + Phát nhạc tiêu đề + + + Update Compatibility Database On Startup + Cập nhật cơ sở dữ liệu tương thích khi khởi động + + + Game Compatibility + Khả năng tương thích của trò chơi + + + Display Compatibility Data + Hiển thị dữ liệu tương thích + + + Update Compatibility Database + Cập nhật cơ sở dữ liệu tương thích + + + Volume + Âm lượng + + + Save + Lưu + + + Apply + Áp dụng + + + Restore Defaults + Khôi phục cài đặt mặc định + + + Close + Đóng + + + Point your mouse at an option to display its description. + Di chuyển chuột đến tùy chọn để hiển thị mô tả của nó. + + + Console Language:\nSets the language that the PS4 game uses.\nIt's recommended to set this to a language the game supports, which will vary by region. + Ngôn ngữ console:\nChọn ngôn ngữ mà trò chơi PS4 sẽ sử dụng.\nKhuyên bạn nên đặt tùy chọn này thành một ngôn ngữ mà trò chơi hỗ trợ, có thể thay đổi tùy theo vùng. + + + Emulator Language:\nSets the language of the emulator's user interface. + Ngôn ngữ của trình giả lập:\nChọn ngôn ngữ của giao diện người dùng của trình giả lập. + + + Enable Separate Update Folder:\nEnables installing game updates into a separate folder for easy management.\nThis can be manually created by adding the extracted update to the game folder with the name "CUSA00000-UPDATE" where the CUSA ID matches the game's ID. + Enable Separate Update Folder:\nEnables installing game updates into a separate folder for easy management. + + + Show Splash Screen:\nShows the game's splash screen (a special image) while the game is starting. + Hiển thị màn hình khởi động:\nHiển thị màn hình khởi động của trò chơi (một hình ảnh đặc biệt) trong khi trò chơi khởi động. + + + Enable Discord Rich Presence:\nDisplays the emulator icon and relevant information on your Discord profile. + Bật Discord Rich Presence:\nHiển thị biểu tượng trình giả lập và thông tin liên quan trên hồ sơ Discord của bạn. + + + Username:\nSets the PS4's account username, which may be displayed by some games. + Tên người dùng:\nChọn tên người dùng của tài khoản PS4, có thể được một số trò chơi hiển thị. + + + Trophy Key:\nKey used to decrypt trophies. Must be obtained from your jailbroken console.\nMust contain only hex characters. + Trophy Key:\nKey used to decrypt trophies. Must be obtained from your jailbroken console.\nMust contain only hex characters. + + + Log Type:\nSets whether to synchronize the output of the log window for performance. May have adverse effects on emulation. + Loại nhật ký:\nChọn xem có đồng bộ hóa đầu ra cửa sổ nhật ký cho hiệu suất hay không. Điều này có thể có tác động tiêu cực đến việc giả lập. + + + Log Filter:\nFilters the log to only print specific information.\nExamples: "Core:Trace" "Lib.Pad:Debug Common.Filesystem:Error" "*:Critical"\nLevels: Trace, Debug, Info, Warning, Error, Critical - in this order, a specific level silences all levels preceding it in the list and logs every level after it. + Bộ lọc nhật ký:\nLọc nhật ký để in chỉ thông tin cụ thể.\nVí dụ: "Core:Trace" "Lib.Pad:Debug Common.Filesystem:Error" "*:Critical" Các mức: Trace, Debug, Info, Warning, Error, Critical - theo thứ tự này, một mức cụ thể làm tắt tất cả các mức trước trong danh sách và ghi lại tất cả các mức sau đó. + + + Update:\nRelease: Official versions released every month that may be very outdated, but are more reliable and tested.\nNightly: Development versions that have all the latest features and fixes, but may contain bugs and are less stable. + Cập nhật:\nRelease: Các phiên bản chính thức được phát hành hàng tháng; có thể khá cũ nhưng đáng tin cậy hơn và đã được thử nghiệm.\nNightly: Các phiên bản phát triển có tất cả các tính năng và sửa lỗi mới nhất; có thể có lỗi và ít ổn định hơn. + + + Background Image:\nControl the opacity of the game background image. + Background Image:\nControl the opacity of the game background image. + + + Play Title Music:\nIf a game supports it, enable playing special music when selecting the game in the GUI. + Phát nhạc tiêu đề trò chơi:\nNếu một trò chơi hỗ trợ điều này, hãy kích hoạt phát nhạc đặc biệt khi bạn chọn trò chơi trong GUI. + + + Disable Trophy Pop-ups:\nDisable in-game trophy notifications. Trophy progress can still be tracked using the Trophy Viewer (right-click the game in the main window). + Disable Trophy Pop-ups:\nDisable in-game trophy notifications. Trophy progress can still be tracked using the Trophy Viewer (right-click the game in the main window). + + + Hide Cursor:\nChoose when the cursor will disappear:\nNever: You will always see the mouse.\nidle: Set a time for it to disappear after being idle.\nAlways: you will never see the mouse. + Ẩn con trỏ:\nChọn khi nào con trỏ sẽ biến mất:\nKhông bao giờ: Bạn sẽ luôn thấy chuột.\nKhông hoạt động: Đặt một khoảng thời gian để nó biến mất sau khi không hoạt động.\nLuôn luôn: bạn sẽ không bao giờ thấy chuột. + + + Hide Idle Cursor Timeout:\nThe duration (seconds) after which the cursor that has been idle hides itself. + Đặt thời gian để chuột biến mất sau khi không hoạt động. + + + Back Button Behavior:\nSets the controller's back button to emulate tapping the specified position on the PS4 touchpad. + Hành vi nút quay lại:\nĐặt nút quay lại của tay cầm để mô phỏng việc chạm vào vị trí đã chỉ định trên touchpad của PS4. + + + Display Compatibility Data:\nDisplays game compatibility information in table view. Enable "Update Compatibility On Startup" to get up-to-date information. + Display Compatibility Data:\nDisplays game compatibility information in table view. Enable "Update Compatibility On Startup" to get up-to-date information. + + + Update Compatibility On Startup:\nAutomatically update the compatibility database when shadPS4 starts. + Update Compatibility On Startup:\nAutomatically update the compatibility database when shadPS4 starts. + + + Update Compatibility Database:\nImmediately update the compatibility database. + Update Compatibility Database:\nImmediately update the compatibility database. + + + Never + Không bao giờ + + + Idle + Nhàn rỗi + + + Always + Luôn luôn + + + Touchpad Left + Touchpad Trái + + + Touchpad Right + Touchpad Phải + + + Touchpad Center + Giữa Touchpad + + + None + Không có + + + Graphics Device:\nOn multiple GPU systems, select the GPU the emulator will use from the drop down list,\nor select "Auto Select" to automatically determine it. + Thiết bị đồ họa:\nTrên các hệ thống có GPU đa năng, hãy chọn GPU mà trình giả lập sẽ sử dụng từ danh sách thả xuống,\hoặc chọn "Auto Select" để tự động xác định. + + + Width/Height:\nSets the size of the emulator window at launch, which can be resized during gameplay.\nThis is different from the in-game resolution. + Chiều rộng/Cao:\nChọn kích thước cửa sổ của trình giả lập khi khởi động, có thể điều chỉnh trong quá trình chơi.\nĐiều này khác với độ phân giải trong trò chơi. + + + Vblank Divider:\nThe frame rate at which the emulator refreshes at is multiplied by this number. Changing this may have adverse effects, such as increasing the game speed, or breaking critical game functionality that does not expect this to change! + Bộ chia Vblank:\nTốc độ khung hình mà trình giả lập làm mới được nhân với số này. Thay đổi này có thể có tác động tiêu cực như tăng tốc độ trò chơi hoặc làm hỏng chức năng quan trọng mà trò chơi không mong đợi thay đổi điều này! + + + Enable Shaders Dumping:\nFor the sake of technical debugging, saves the games shaders to a folder as they render. + Bật xuất shader:\nĐể mục đích gỡ lỗi kỹ thuật, lưu shader của trò chơi vào một thư mục khi chúng được kết xuất. + + + Enable Null GPU:\nFor the sake of technical debugging, disables game rendering as if there were no graphics card. + Bật GPU Null:\nĐể mục đích gỡ lỗi kỹ thuật, vô hiệu hóa việc kết xuất trò chơi như thể không có card đồ họa. + + + Enable HDR:\nEnables HDR in games that support it.\nYour monitor must have support for the BT2020 PQ color space and the RGB10A2 swapchain format. + Enable HDR:\nEnables HDR in games that support it.\nYour monitor must have support for the BT2020 PQ color space and the RGB10A2 swapchain format. + + + Game Folders:\nThe list of folders to check for installed games. + Thư mục trò chơi:\nDanh sách các thư mục để kiểm tra các trò chơi đã cài đặt. + + + Add:\nAdd a folder to the list. + Thêm:\nThêm một thư mục vào danh sách. + + + Remove:\nRemove a folder from the list. + Xóa:\nXóa một thư mục khỏi danh sách. + + + Enable Debug Dumping:\nSaves the import and export symbols and file header information of the currently running PS4 program to a directory. + Bật xuất gỡ lỗi:\nLưu biểu tượng nhập và xuất và thông tin tiêu đề tệp cho ứng dụng PS4 hiện đang chạy vào một thư mục. + + + Enable Vulkan Validation Layers:\nEnables a system that validates the state of the Vulkan renderer and logs information about its internal state.\nThis will reduce performance and likely change the behavior of emulation. + Bật lớp xác thực Vulkan:\nKích hoạt một hệ thống xác thực trạng thái của bộ kết xuất Vulkan và ghi lại thông tin về trạng thái nội bộ của nó. Điều này sẽ giảm hiệu suất và có thể thay đổi hành vi của việc giả lập. + + + Enable Vulkan Synchronization Validation:\nEnables a system that validates the timing of Vulkan rendering tasks.\nThis will reduce performance and likely change the behavior of emulation. + Bật xác thực đồng bộ Vulkan:\nKích hoạt một hệ thống xác thực thời gian của nhiệm vụ kết xuất Vulkan. Điều này sẽ giảm hiệu suất và có thể thay đổi hành vi của việc giả lập. + + + Enable RenderDoc Debugging:\nIf enabled, the emulator will provide compatibility with Renderdoc to allow capture and analysis of the currently rendered frame. + Bật gỡ lỗi RenderDoc:\nNếu được kích hoạt, trình giả lập sẽ cung cấp tính tương thích với Renderdoc để cho phép bắt và phân tích khung hình hiện tại đang được kết xuất. + + + Collect Shaders:\nYou need this enabled to edit shaders with the debug menu (Ctrl + F10). + Collect Shaders:\nYou need this enabled to edit shaders with the debug menu (Ctrl + F10). + + + Crash Diagnostics:\nCreates a .yaml file with info about the Vulkan state at the time of crashing.\nUseful for debugging 'Device lost' errors. If you have this enabled, you should enable Host AND Guest Debug Markers.\nDoes not work on Intel GPUs.\nYou need Vulkan Validation Layers enabled and the Vulkan SDK for this to work. + Crash Diagnostics:\nCreates a .yaml file with info about the Vulkan state at the time of crashing.\nUseful for debugging 'Device lost' errors. If you have this enabled, you should enable Host AND Guest Debug Markers.\nDoes not work on Intel GPUs.\nYou need Vulkan Validation Layers enabled and the Vulkan SDK for this to work. + + + Copy GPU Buffers:\nGets around race conditions involving GPU submits.\nMay or may not help with PM4 type 0 crashes. + Copy GPU Buffers:\nGets around race conditions involving GPU submits.\nMay or may not help with PM4 type 0 crashes. + + + Host Debug Markers:\nInserts emulator-side information like markers for specific AMDGPU commands around Vulkan commands, as well as giving resources debug names.\nIf you have this enabled, you should enable Crash Diagnostics.\nUseful for programs like RenderDoc. + Host Debug Markers:\nInserts emulator-side information like markers for specific AMDGPU commands around Vulkan commands, as well as giving resources debug names.\nIf you have this enabled, you should enable Crash Diagnostics.\nUseful for programs like RenderDoc. + + + Guest Debug Markers:\nInserts any debug markers the game itself has added to the command buffer.\nIf you have this enabled, you should enable Crash Diagnostics.\nUseful for programs like RenderDoc. + Guest Debug Markers:\nInserts any debug markers the game itself has added to the command buffer.\nIf you have this enabled, you should enable Crash Diagnostics.\nUseful for programs like RenderDoc. + + + Save Data Path:\nThe folder where game save data will be saved. + Save Data Path:\nThe folder where game save data will be saved. + + + Browse:\nBrowse for a folder to set as the save data path. + Browse:\nBrowse for a folder to set as the save data path. + + + Release + Release + + + Nightly + Nightly + + + Set the volume of the background music. + Đặt âm lượng nhạc nền + + + Enable Motion Controls + Bật điều khiển bằng cử chỉ + + + Save Data Path + Đường dẫn để lưu dữ liệu + + + Browse + Duyệt + + + async + async + + + sync + sync + + + Auto Select + Chọn tự động + + + Directory to install games + Thư mục để cài các trò chơi + + + Directory to save data + Thư mục để lưu dữ liệu + + + Video + Video + + + Display Mode + Display Mode + + + Windowed + Windowed + + + Fullscreen + Fullscreen + + + Fullscreen (Borderless) + Fullscreen (Borderless) + + + Window Size + Window Size + + + W: + W: + + + H: + H: + + + Separate Log Files + Separate Log Files + + + Separate Log Files:\nWrites a separate logfile for each game. + Separate Log Files:\nWrites a separate logfile for each game. + + + Trophy Notification Position + Trophy Notification Position + + + Left + Left + + + Right + Right + + + Top + Top + + + Bottom + Bottom + + + Notification Duration + Notification Duration + + + Portable User Folder + Portable User Folder + + + Create Portable User Folder from Common User Folder + Create Portable User Folder from Common User Folder + + + Portable user folder:\nStores shadPS4 settings and data that will be applied only to the shadPS4 build located in the current folder. Restart the app after creating the portable user folder to begin using it. + Portable user folder:\nStores shadPS4 settings and data that will be applied only to the shadPS4 build located in the current folder. Restart the app after creating the portable user folder to begin using it. + + + Cannot create portable user folder + Cannot create portable user folder + + + %1 already exists + %1 already exists + + + Portable user folder created + Portable user folder created + + + %1 successfully created. + %1 successfully created. + + + Open the custom trophy images/sounds folder:\nYou can add custom images to the trophies and an audio.\nAdd the files to custom_trophy with the following names:\ntrophy.wav OR trophy.mp3, bronze.png, gold.png, platinum.png, silver.png\nNote: The sound will only work in QT versions. + Open the custom trophy images/sounds folder:\nYou can add custom images to the trophies and an audio.\nAdd the files to custom_trophy with the following names:\ntrophy.wav OR trophy.mp3, bronze.png, gold.png, platinum.png, silver.png\nNote: The sound will only work in QT versions. + + + + TrophyViewer + + Trophy Viewer + Trình xem chiến tích + + + Select Game: + Select Game: + + + Progress + Progress + + + Show Earned Trophies + Show Earned Trophies + + + Show Not Earned Trophies + Show Not Earned Trophies + + + Show Hidden Trophies + Show Hidden Trophies + + + diff --git a/src/qt_gui/translations/zh_CN.ts b/src/qt_gui/translations/zh_CN.ts index fecb8857f..7d414a493 100644 --- a/src/qt_gui/translations/zh_CN.ts +++ b/src/qt_gui/translations/zh_CN.ts @@ -1,1664 +1,2089 @@ + - - - - AboutDialog - - - About shadPS4 - 关于 shadPS4 - - - - shadPS4 - shadPS4 - - - - 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. - 本软件不得用于运行未经合法授权而获得的游戏。 - - - - ElfViewer - - - Open Folder - 打开文件夹 - - - - GameInfoClass - - - Loading game list, please wait :3 - 加载游戏列表中, 请稍等 :3 - - - - Cancel - 取消 - - - - Loading... - 加载中... - - - - InstallDirSelect - - - shadPS4 - Choose directory - shadPS4 - 选择文件目录 - - - - Select which directory you want to install to. - 选择你想要安装到的目录。 - - - - GameInstallDialog - - - shadPS4 - Choose directory - shadPS4 - 选择文件目录 - - - - Directory to install games - 要安装游戏的目录 - - - - Browse - 浏览 - - - - Error - 错误 - - - - The value for location to install games is not valid. - 游戏安装位置无效。 - - - - GuiContextMenus - - - Create Shortcut - 创建快捷方式 - - - - Cheats / Patches - 作弊码/补丁 - - - - SFO Viewer - SFO 查看器 - - - - Trophy Viewer - 奖杯查看器 - - - - Open Folder... - 打开文件夹... - - - - Open Game Folder - 打开游戏文件夹 - - - - Open Save Data Folder - 打开存档数据文件夹 - - - - Open Log Folder - 打开日志文件夹 - - - - Copy info... - 复制信息... - - - - Copy Name - 复制名称 - - - - Copy Serial - 复制序列号 - - - - Copy All - 复制全部 - - - - Delete... - 删除... - - - - Delete Game - 删除游戏 - - - - Delete Update - 删除更新 - - - - Delete DLC - 删除 DLC - - - - Compatibility... - 兼容性... - - - - Update database - 更新数据库 - - - - View report - 查看报告 - - - - Submit a report - 提交报告 - - - - Shortcut creation - 创建快捷方式 - - - - Shortcut created successfully! - 创建快捷方式成功! - - - - Error - 错误 - - - - Error creating shortcut! - 创建快捷方式出错! - - - - Install PKG - 安装 PKG - - - - Game - 游戏 - - - - requiresEnableSeparateUpdateFolder_MSG - 这个功能需要“启用单独的更新目录”配置选项才能正常运行,如果你想要使用这个功能,请启用它。 - - - - This game has no update to delete! - 这个游戏没有更新可以删除! - - - - Update - 更新 - - - - This game has no DLC to delete! - 这个游戏没有 DLC 可以删除! - - - - DLC - DLC - - - - Delete %1 - 删除 %1 - - - - Are you sure you want to delete %1's %2 directory? - 你确定要删除 %1 的%2目录? - - - - MainWindow - - - Open/Add Elf Folder - 打开/添加 Elf 文件夹 - - - - Install Packages (PKG) - 安装 Packages (PKG) - - - - Boot Game - 启动游戏 - - - - Check for Updates - 检查更新 - - - - About shadPS4 - 关于 shadPS4 - - - - Configure... - 设置... - - - - Install application from a .pkg file - 从 .pkg 文件安装应用程序 - - - - Recent Games - 最近启动的游戏 - - - - Exit - 退出 - - - - Exit shadPS4 - 退出 shadPS4 - - - - Exit the application. - 退出应用程序。 - - - - Show Game List - 显示游戏列表 - - - - Game List Refresh - 刷新游戏列表 - - - - Tiny - 微小 - - - - Small - - - - - Medium - - - - - Large - - - - - List View - 列表视图 - - - - Grid View - 表格视图 - - - - Elf Viewer - Elf 查看器 - - - - Game Install Directory - 游戏安装目录 - - - - Download Cheats/Patches - 下载作弊码/补丁 - - - - Dump Game List - 导出游戏列表 - - - - PKG Viewer - PKG 查看器 - - - - Search... - 搜索... - - - - File - 文件 - - - - View - 显示 - - - - Game List Icons - 游戏列表图标 - - - - Game List Mode - 游戏列表模式 - - - - Settings - 设置 - - - - Utils - 工具 - - - - Themes - 主题 - - - - Help - 帮助 - - - - Dark - Dark - - - - Light - Light - - - - Green - Green - - - - Blue - Blue - - - - Violet - Violet - - - - toolBar - 工具栏 - - - - PKGViewer - - - Open Folder - 打开文件夹 - - - - TrophyViewer - - - Trophy Viewer - 奖杯查看器 - - - - SettingsDialog - - - Settings - 设置 - - - - General - 常规 - - - - System - 系统 - - - - Console Language - 主机语言 - - - - Emulator Language - 模拟器语言 - - - - Emulator - 模拟器 - - - - Enable Fullscreen - 启用全屏 - - - - Enable Separate Update Folder - 启用单独的更新目录 - - - - Show Splash - 显示启动画面 - - - - Is PS4 Pro - 模拟 PS4 Pro - - - - Enable Discord Rich Presence - 启用 Discord Rich Presence - - - - Username - 用户名 - - - - Trophy Key - Trophy Key - - - - Trophy - Trophy - - - - Logger - 日志 - - - - Log Type - 日志类型 - - - - Log Filter - 日志过滤 - - - - Input - 输入 - - - - Cursor - 光标 - - - - Hide Cursor - 隐藏光标 - - - - Hide Cursor Idle Timeout - 光标隐藏闲置时长 - - - - s - - - - - Controller - 手柄 - - - - Back Button Behavior - 返回按钮行为 - - - - Graphics - 图像 - - - - Graphics Device - 图形设备 - - - - Width - 宽度 - - - - Height - 高度 - - - - Vblank Divider - Vblank Divider - - - - Advanced - 高级 - - - - Enable Shaders Dumping - 启用着色器转储 - - - - Enable NULL GPU - 启用 NULL GPU - - - - Paths - 路径 - - - - Game Folders - 游戏文件夹 - - - - Add... - 添加... - - - - Remove - 删除 - - - - Debug - 调试 - - - - Enable Debug Dumping - 启用调试转储 - - - - Enable Vulkan Validation Layers - 启用 Vulkan 验证层 - - - - Enable Vulkan Synchronization Validation - 启用 Vulkan 同步验证 - - - - Enable RenderDoc Debugging - 启用 RenderDoc 调试 - - - - Update - 更新 - - - - Check for Updates at Startup - 启动时检查更新 - - - - Update Channel - 更新频道 - - - - Check for Updates - 检查更新 - - - - GUI Settings - 界面设置 - - - - Disable Trophy Pop-ups - 禁止弹出奖杯 - - - - Play title music - 播放标题音乐 - - - - Update Compatibility Database On Startup - 启动时更新兼容性数据库 - - - - Game Compatibility - 游戏兼容性 - - - - Display Compatibility Data - 显示兼容性数据 - - - - Update Compatibility Database - 更新兼容性数据库 - - - - Volume - 音量 - - - - Audio Backend - 音频后端 - - - - MainWindow - - - Game List - 游戏列表 - - - - * 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! - 检测到补丁! - - - - PKG and Game versions match: - PKG 和游戏版本匹配: - - - - Would you like to overwrite? - 您想要覆盖吗? - - - - PKG Version %1 is older than installed version: - PKG 版本 %1 比已安装版本更旧: - - - - Game is installed: - 游戏已安装: - - - - Would you like to install Patch: - 您想安装补丁吗: - - - - DLC Installation - DLC 安装 - - - - Would you like to install DLC: %1? - 您想安装 DLC:%1 吗? - - - - DLC already installed: - DLC 已经安装: - - - - Game already installed - 游戏已经安装 - - - - 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 for - 作弊码/补丁: - - - - 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 页面。 - - - - The game is in version: %1 - 游戏版本:%1 - - - - The downloaded patch only works on version: %1 - 下载的补丁仅适用于版本:%1 - - - - You may need to update your game. - 您可能需要更新您的游戏。 - - - - Incompatibility Notice - 不兼容通知 - - - - 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: - 名称: - - - - Can't apply cheats before the game is started - 在游戏启动之前无法应用作弊码。 - - - - SettingsDialog - - - Save - 保存 - - - - Apply - 应用 - - - - Restore Defaults - 恢复默认 - - - - Close - 关闭 - - - - Point your mouse at an option to display its description. - 将鼠标指针指向选项以显示其描述。 - - - - consoleLanguageGroupBox - 主机语言:\n设置 PS4 游戏中使用的语言。\n建议设置为支持的语言,这将因地区而异。 - - - - emulatorLanguageGroupBox - 模拟器语言:\n设置模拟器用户界面的语言。 - - - - fullscreenCheckBox - 启用全屏:\n以全屏模式启动游戏。\n您可以按 F11 键切换回窗口模式。 - - - - separateUpdatesCheckBox - 启用单独的更新目录:\n启用安装游戏更新到一个单独的目录中以更便于管理。 - - - - showSplashCheckBox - 显示启动画面:\n在游戏启动时显示游戏的启动画面(特殊图像)。 - - - - ps4proCheckBox - 模拟 PS4 Pro:\n使模拟器作为 PS4 Pro 运行,可以在支持的游戏中激活特殊功能。 - - - - discordRPCCheckbox - 启用 Discord Rich Presence:\n在您的 Discord 个人资料上显示模拟器图标和相关信息。 - - - - userName - 用户名:\n设置 PS4 帐户的用户名,某些游戏中可能会显示此名称。 - - - - TrophyKey - Trophy Key:\nKey used to decrypt trophies. Must be obtained from your jailbroken console.\nMust contain only hex characters. - - - - logTypeGroupBox - 日志类型:\n设置日志窗口输出的同步方式以提高性能。可能会对模拟产生不良影响。 - - - - logFilter - 日志过滤器:\n过滤日志,仅打印特定信息。\n例如:"Core:Trace" "Lib.Pad:Debug Common.Filesystem:Error" "*:Critical" 级别: Trace, Debug, Info, Warning, Error, Critical - 按此顺序,特定级别将静默列表中所有先前的级别,并记录所有后续级别。 - - - - updaterGroupBox - 更新:\nRelease:每月发布的官方版本可能非常过时,但更可靠且经过测试。\nNightly:包含所有最新功能和修复的开发版本,但可能包含错误且稳定性较低。 - - - - GUIgroupBox - 播放标题音乐:\n如果游戏支持,在图形界面选择游戏时播放特殊音乐。 - - - - disableTrophycheckBox - 禁止弹出奖杯:\n禁用游戏内奖杯通知。可以在奖杯查看器中继续跟踪奖杯进度(在主窗口中右键点击游戏)。 - - - - hideCursorGroupBox - 隐藏光标:\n选择光标何时消失:\n从不: 始终显示光标。\闲置: 光标在闲置若干秒后消失。\n始终: 始终显示光标。 - - - - idleTimeoutGroupBox - 光标隐藏闲置时长:\n光标自动隐藏之前的闲置时长。 - - - - backButtonBehaviorGroupBox - 返回按钮行为:\n设置手柄的返回按钮模拟在 PS4 触控板上指定位置的点击。 - - - - enableCompatibilityCheckBox - 显示兼容性数据:\n在列表视图中显示游戏兼容性信息。启用“启动时更新兼容性数据库”以获取最新信息。 - - - - checkCompatibilityOnStartupCheckBox - 启动时更新兼容性数据库:\n当 shadPS4 启动时自动更新兼容性数据库。 - - - - updateCompatibilityButton - 更新兼容性数据库:\n立即更新兼容性数据库。 - - - - Never - 从不 - - - - Idle - 闲置 - - - - Always - 始终 - - - - Touchpad Left - 触控板左侧 - - - - Touchpad Right - 触控板右侧 - - - - Touchpad Center - 触控板中间 - - - - None - - - - - graphicsAdapterGroupBox - 图形设备:\n在具有多个 GPU 的系统中,从下拉列表中选择要使用的 GPU,\n或者选择“自动选择”由模拟器决定。 - - - - resolutionLayout - 宽度/高度:\n设置启动游戏时的窗口大小,游戏过程中可以调整。\n这与游戏内的分辨率不同。 - - - - heightDivider - Vblank Divider:\n模拟器刷新的帧率会乘以此数字。改变此项可能会导致游戏速度加快,或破坏游戏中不期望此变化的关键功能! - - - - dumpShadersCheckBox - 启用着色器转储:\n用于技术调试,在渲染期间将游戏着色器保存到文件夹中。 - - - - nullGpuCheckBox - 启用 NULL GPU:\n用于技术调试,禁用游戏渲染,就像没有显卡一样。 - - - - gameFoldersBox - 游戏文件夹:\n检查已安装游戏的文件夹列表。 - - - - addFolderButton - 添加:\n将文件夹添加到列表。 - - - - removeFolderButton - 移除:\n从列表中移除文件夹。 - - - - debugDump - 启用调试转储:\n将当前正在运行的 PS4 程序的导入和导出符号及文件头信息保存到目录中。 - - - - vkValidationCheckBox - 启用 Vulkan 验证层:\n启用一个系统来验证 Vulkan 渲染器的状态并记录其内部状态的信息。\n这将降低性能并可能改变模拟的行为。 - - - - vkSyncValidationCheckBox - 启用 Vulkan 同步验证:\n启用一个系统来验证 Vulkan 渲染任务的时间。\n这将降低性能并可能改变模拟的行为。 - - - - rdocCheckBox - 启用 RenderDoc 调试:\n启用后模拟器将提供与 Renderdoc 的兼容性,允许在渲染过程中捕获和分析当前渲染的帧。 - - - - GameListFrame - - - Icon - 图标 - - - - Name - 名称 - - - - Serial - 序列号 - - - - Compatibility - 兼容性 - - - - Region - 区域 - - - - Firmware - 固件 - - - - Size - 大小 - - - - Version - 版本 - - - - Path - 路径 - - - - Play Time - 游戏时间 - - - - Never Played - 未玩过 - - - - h - 小时 - - - - m - 分钟 - - - - s - - - - - Compatibility is untested - 兼容性未经测试 - - - - Game does not initialize properly / crashes the emulator - 游戏无法正确初始化/模拟器崩溃 - - - - Game boots, but only displays a blank screen - 游戏启动,但只显示白屏 - - - - Game displays an image but does not go past the menu - 游戏显示图像但无法通过菜单页面 - - - - Game has game-breaking glitches or unplayable performance - 游戏有严重的 Bug 或太卡无法游玩 - - - - Game can be completed with playable performance and no major glitches - 游戏能在可玩的性能下完成且没有重大 Bug - - - - CheckUpdate - - - Auto Updater - 自动更新程序 - - - - Error - 错误 - - - - Network error: - 网络错误: - - - - Failed to parse update information. - 无法解析更新信息。 - - - - No pre-releases found. - 未找到预发布版本。 - - - - Invalid release data. - 无效的发布数据。 - - - - No download URL found for the specified asset. - 未找到指定资源的下载地址。 - - - - Your version is already up to date! - 您的版本已经是最新的! - - - - Update Available - 可用更新 - - - - Update Channel - 更新频道 - - - - Current Version - 当前版本 - - - - Latest Version - 最新版本 - - - - Do you want to update? - 您想要更新吗? - - - - Show Changelog - 显示更新日志 - - - - Check for Updates at Startup - 启动时检查更新 - - - - Update - 更新 - - - - No - - - - - Hide Changelog - 隐藏更新日志 - - - - Changes - 更新日志 - - - - Network error occurred while trying to access the URL - 尝试访问网址时发生网络错误 - - - - Download Complete - 下载完成 - - - - The update has been downloaded, press OK to install. - 更新已下载,请按 OK 安装。 - - - - Failed to save the update file at - 无法保存更新文件到 - - - - Starting Update... - 正在开始更新... - - - - Failed to create the update script file - 无法创建更新脚本文件 - - - - GameListUtils - - - B - B - - - - KB - KB - - - - MB - MB - - - - GB - GB - - - - TB - TB - - + + + AboutDialog + + About shadPS4 + 关于 shadPS4 + + + 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. + 本软件不得用于运行未经合法授权而获得的游戏。 + + + + CheatsPatches + + Cheats / Patches for + 作弊码/补丁: + + + 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:\n + 作弊码/补丁是实验性的,\n请小心使用。\n\n通过选择存储库并点击下载按钮,下载该游戏的作弊码。\n在“补丁”选项卡中,您可以一次性下载所有补丁,选择要使用的补丁并保存选择。\n\n由于我们不开发作弊码/补丁,\n请将问题报告给作弊码/补丁的作者。\n\n创建了新的作弊码/补丁?欢迎提交到我们的仓库:\n + + + 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 + 未找到作弊码 + + + 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 + 作弊码下载成功 + + + 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 download: + 下载失败: + + + Download Complete + 下载完成 + + + 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. If the patch does not appear, it may be that it does not exist for the specific serial and version of the game. + 补丁下载成功!所有可用的补丁已下载完成,无需像作弊码那样单独下载每个游戏的补丁。如果补丁没有出现,可能是该补丁不适用于当前游戏的序列号和版本。 + + + Failed to parse JSON data from HTML. + 无法解析 HTML 中的 JSON 数据。 + + + Failed to retrieve HTML page. + 无法获取 HTML 页面。 + + + The game is in version: %1 + 游戏版本:%1 + + + The downloaded patch only works on version: %1 + 下载的补丁仅适用于版本:%1 + + + You may need to update your game. + 您可能需要更新您的游戏。 + + + Incompatibility Notice + 不兼容通知 + + + 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: + 名称: + + + Can't apply cheats before the game is started + 在游戏启动之前无法应用作弊码。 + + + Close + 关闭 + + + + CheckUpdate + + Auto Updater + 自动更新程序 + + + Error + 错误 + + + Network error: + 网络错误: + + + The Auto Updater allows up to 60 update checks per hour.\nYou have reached this limit. Please try again later. + 自动更新程序每小时最多允许 60 次更新检查。\n您已达到此限制。请稍后再试。 + + + Failed to parse update information. + 无法解析更新信息。 + + + No pre-releases found. + 未找到预发布版本。 + + + Invalid release data. + 无效的发布数据。 + + + No download URL found for the specified asset. + 未找到指定资源的下载地址。 + + + Your version is already up to date! + 您的版本已经是最新的! + + + Update Available + 可用更新 + + + Update Channel + 更新频道 + + + Current Version + 当前版本 + + + Latest Version + 最新版本 + + + Do you want to update? + 您想要更新吗? + + + Show Changelog + 显示更新日志 + + + Check for Updates at Startup + 启动时检查更新 + + + Update + 更新 + + + No + + + + Hide Changelog + 隐藏更新日志 + + + Changes + 更新日志 + + + Network error occurred while trying to access the URL + 尝试访问网址时发生网络错误 + + + Download Complete + 下载完成 + + + The update has been downloaded, press OK to install. + 更新已下载,请按 OK 安装。 + + + Failed to save the update file at + 无法保存更新文件到 + + + Starting Update... + 正在开始更新... + + + Failed to create the update script file + 无法创建更新脚本文件 + + + + CompatibilityInfoClass + + Fetching compatibility data, please wait + 正在获取兼容性数据,请稍等 + + + Cancel + 取消 + + + Loading... + 加载中... + + + Error + 错误 + + + Unable to update compatibility data! Try again later. + 无法更新兼容性数据!稍后再试。 + + + Unable to open compatibility_data.json for writing. + 无法打开 compatibility_data.json 进行写入。 + + + Unknown + 未知 + + + Nothing + 无法启动 + + + Boots + 可启动 + + + Menus + 可进入菜单 + + + Ingame + 可进入游戏内 + + + Playable + 可通关 + + + + ControlSettings + + Configure Controls + 配置按键 + + + D-Pad + 十字键 + + + Up + + + + Left + + + + Right + + + + Down + + + + Left Stick Deadzone (def:2 max:127) + 左摇杆死区(默认:2 最大:127) + + + Left Deadzone + 左死区 + + + Left Stick + 左摇杆 + + + Config Selection + 配置选择 + + + Common Config + 通用配置 + + + Use per-game configs + 使用每个游戏的配置 + + + L1 / LB + L1 / LB + + + L2 / LT + L2 / LT + + + Back + Back + + + R1 / RB + R1 / RB + + + R2 / RT + R2 / RT + + + L3 + L3 + + + Options / Start + Options / Start + + + R3 + R3 + + + Face Buttons + 功能键(动作键) + + + Triangle / Y + 三角 / Y + + + Square / X + 方框 / X + + + Circle / B + 圈 / B + + + Cross / A + 叉 / A + + + Right Stick Deadzone (def:2, max:127) + 右摇杆死区(默认:2 最大:127) + + + Right Deadzone + 右死区 + + + Right Stick + 右摇杆 + + + Color Adjustment + 颜色调整 + + + R: + 红: + + + G: + 绿: + + + B: + 蓝: + + + Override Lightbar Color + 覆盖灯条颜色 + + + Override Color + 覆盖颜色 + + + Unable to Save + 无法保存 + + + Cannot bind axis values more than once + 摇杆 X/Y 轴的操作绑定不在同一直线 + + + Save + 保存 + + + Apply + 应用 + + + Restore Defaults + 恢复默认设置 + + + Cancel + 取消 + + + + EditorDialog + + Edit Keyboard + Mouse and Controller input bindings + 编辑键盘鼠标和手柄按键绑定 + + + Use Per-Game configs + 每个游戏使用单独的配置 + + + Error + 错误 + + + Could not open the file for reading + 无法打开文件进行读取 + + + Could not open the file for writing + 无法打开文件进行读取 + + + Save Changes + 保存更改 + + + Do you want to save changes? + 您要保存更改吗? + + + Help + 帮助 + + + Do you want to reset your custom default config to the original default config? + 您要将自定义默认配置重置为默认配置吗? + + + Do you want to reset this config to your custom default config? + 您想要将此配置重置为自定义默认配置吗? + + + Reset to Default + 重置为默认 + + + + ElfViewer + + Open Folder + 打开文件夹 + + + + GameInfoClass + + Loading game list, please wait :3 + 加载游戏列表中, 请稍等 :3 + + + Cancel + 取消 + + + Loading... + 加载中... + + + + GameInstallDialog + + shadPS4 - Choose directory + shadPS4 - 选择文件目录 + + + Directory to install games + 要安装游戏的目录 + + + Browse + 浏览 + + + Error + 错误 + + + Directory to install DLC + 安装 DLC 的目录 + + + + GameListFrame + + Icon + 图标 + + + Name + 名称 + + + Serial + 序列号 + + + Compatibility + 兼容性 + + + Region + 区域 + + + Firmware + 固件 + + + Size + 大小 + + + Version + 版本 + + + Path + 路径 + + + Play Time + 游戏时间 + + + Never Played + 未玩过 + + + h + 小时 + + + m + 分钟 + + + s + + + + Compatibility is untested + 兼容性未经测试 + + + Game does not initialize properly / crashes the emulator + 游戏无法正确初始化/模拟器崩溃 + + + Game boots, but only displays a blank screen + 游戏启动,但只显示白屏 + + + Game displays an image but does not go past the menu + 游戏显示图像但无法通过菜单页面 + + + Game has game-breaking glitches or unplayable performance + 游戏有严重的 Bug 或太卡无法游玩 + + + Game can be completed with playable performance and no major glitches + 游戏能在可玩的性能下通关且没有重大 Bug + + + Click to see details on github + 点击查看 GitHub 上的详细信息 + + + Last updated + 最后更新 + + + + GameListUtils + + B + B + + + KB + KB + + + MB + MB + + + GB + GB + + + TB + TB + + + + GuiContextMenus + + Create Shortcut + 创建快捷方式 + + + Cheats / Patches + 作弊码/补丁 + + + SFO Viewer + SFO 查看器 + + + Trophy Viewer + 奖杯查看器 + + + Open Folder... + 打开文件夹... + + + Open Game Folder + 打开游戏文件夹 + + + Open Save Data Folder + 打开存档数据文件夹 + + + Open Log Folder + 打开日志文件夹 + + + Copy info... + 复制信息... + + + Copy Name + 复制名称 + + + Copy Serial + 复制序列号 + + + Copy Version + 复制版本 + + + Copy Size + 复制大小 + + + Copy All + 复制全部 + + + Delete... + 删除... + + + Delete Game + 删除游戏 + + + Delete Update + 删除更新 + + + Delete DLC + 删除 DLC + + + Delete Trophy + 删除奖杯 + + + Compatibility... + 兼容性... + + + Update database + 更新数据库 + + + View report + 查看报告 + + + Submit a report + 提交报告 + + + Shortcut creation + 创建快捷方式 + + + Shortcut created successfully! + 创建快捷方式成功! + + + Error + 错误 + + + Error creating shortcut! + 创建快捷方式出错! + + + Game + 游戏 + + + This game has no update to delete! + 这个游戏没有更新可以删除! + + + Update + 更新 + + + This game has no DLC to delete! + 这个游戏没有 DLC 可以删除! + + + DLC + DLC + + + Delete %1 + 删除 %1 + + + Are you sure you want to delete %1's %2 directory? + 您确定要删除 %1 的%2目录? + + + Open Update Folder + 打开更新文件夹 + + + Delete Save Data + 删除存档数据 + + + This game has no update folder to open! + 这个游戏没有可打开的更新文件夹! + + + No log file found for this game! + 没有找到这个游戏的日志文件! + + + Failed to convert icon. + 转换图标失败。 + + + This game has no save data to delete! + 这个游戏没有更新可以删除! + + + This game has no saved trophies to delete! + 这个游戏没有保存的奖杯可删除! + + + Save Data + 存档数据 + + + Trophy + 奖杯 + + + SFO Viewer for + SFO 查看器 - + + + + HelpDialog + + Quickstart + 快速入门 + + + FAQ + 常见问题 + + + Syntax + 语法 + + + Special Bindings + 特殊绑定 + + + Keybindings + 按键绑定 + + + + KBMSettings + + Configure Controls + 配置键鼠 + + + D-Pad + 十字键 + + + Up + + + + unmapped + 未映射 + + + Left + + + + Right + + + + Down + + + + Left Analog Halfmode + 左摇杆半速模式 + + + hold to move left stick at half-speed + 按住以半速移动左摇杆 + + + Left Stick + 左摇杆 + + + Config Selection + 配置选择 + + + Common Config + 通用配置 + + + Use per-game configs + 每个游戏使用单独的配置 + + + L1 + L1 + + + L2 + L2 + + + Text Editor + 文本编辑器 + + + Help + 帮助 + + + R1 + R1 + + + R2 + R2 + + + L3 + L3 + + + Touchpad Click + 触摸板点击 + + + Mouse to Joystick + 鼠标控制摇杆 + + + *press F7 ingame to activate + * 按 F7 键激活 + + + R3 + R3 + + + Options + 选项设置 + + + Mouse Movement Parameters + 鼠标移动参数 + + + note: click Help Button/Special Keybindings for more information + 注意:点击帮助按钮 -> 获取更多关于映射特殊键位的信息 + + + Face Buttons + 功能键(动作键) + + + Triangle + 三角 + + + Square + 方框 + + + Circle + + + + Cross + + + + Right Analog Halfmode + 右摇杆半速模式 + + + hold to move right stick at half-speed + 按住以半速移动右摇杆 + + + Right Stick + 右摇杆 + + + Speed Offset (def 0.125): + 速度偏移量(默认 0.125): + + + Copy from Common Config + 从通用配置中复制 + + + Deadzone Offset (def 0.50): + 死区偏移量(默认 0.50): + + + Speed Multiplier (def 1.0): + 速度系数(默认 1.0): + + + Common Config Selected + 已选中通用配置 + + + This button copies mappings from the Common Config to the currently selected profile, and cannot be used when the currently selected profile is the Common Config. + 此按钮用于将通用配置中的映射复制到当前选定的配置文件,当前选定的配置文件为通用配置时无法使用。 + + + Copy values from Common Config + 从通用配置中复制配置 + + + Do you want to overwrite existing mappings with the mappings from the Common Config? + 您想要用通用配置的映射覆盖现有映射吗? + + + Unable to Save + 无法保存 + + + Cannot bind any unique input more than once + 不能绑定重复的按键 + + + Press a key + 按下按键 + + + Cannot set mapping + 无法设置映射 + + + Mousewheel cannot be mapped to stick outputs + 鼠标滚轮无法映射到摇杆 + + + Save + 保存 + + + Apply + 应用 + + + Restore Defaults + 恢复默认设置 + + + Cancel + 取消 + + + + MainWindow + + Open/Add Elf Folder + 打开/添加 Elf 文件夹 + + + Boot Game + 启动游戏 + + + Check for Updates + 检查更新 + + + About shadPS4 + 关于 shadPS4 + + + Configure... + 设置... + + + Recent Games + 最近启动的游戏 + + + Open shadPS4 Folder + 打开 shadPS4 文件夹 + + + Exit + 退出 + + + Exit shadPS4 + 退出 shadPS4 + + + Exit the application. + 退出应用程序。 + + + Show Game List + 显示游戏列表 + + + Game List Refresh + 刷新游戏列表 + + + Tiny + 微小 + + + Small + + + + Medium + + + + Large + + + + List View + 列表视图 + + + Grid View + 表格视图 + + + Elf Viewer + Elf 查看器 + + + Game Install Directory + 游戏安装目录 + + + Download Cheats/Patches + 下载作弊码/补丁 + + + Dump Game List + 导出游戏列表 + + + Trophy Viewer + 奖杯查看器 + + + No games found. Please add your games to your library first. + 未找到游戏。请先将您的游戏添加到您的资料库。 + + + Search... + 搜索... + + + File + 文件 + + + View + 显示 + + + Game List Icons + 游戏列表图标 + + + Game List Mode + 游戏列表模式 + + + Settings + 设置 + + + Utils + 工具 + + + Themes + 主题 + + + Help + 帮助 + + + Dark + 深色 + + + Light + 浅色 + + + Green + 绿色 + + + Blue + 蓝色 + + + Violet + 紫色 + + + toolBar + 工具栏 + + + Game List + 游戏列表 + + + * 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: + 游戏: + + + ELF files (*.bin *.elf *.oelf) + ELF 文件 (*.bin *.elf *.oelf) + + + Game Boot + 启动游戏 + + + Only one file can be selected! + 只能选择一个文件! + + + Run Game + 运行游戏 + + + Eboot.bin file not found + 找不到 Eboot.bin 文件 + + + Game is already running! + 游戏已经在运行中! + + + shadPS4 + shadPS4 + + + Play + 开始游戏 + + + Pause + 暂停 + + + Stop + 关闭 + + + Restart + 重新启动 + + + Full Screen + 全屏 + + + Controllers + 控制器 + + + Keyboard + 键盘 + + + Refresh List + 刷新列表 + + + Resume + 继续游戏 + + + Show Labels Under Icons + 显示图标下的标签 + + + + SettingsDialog + + Settings + 设置 + + + General + 常规 + + + System + 系统 + + + Console Language + 主机语言 + + + Emulator Language + 模拟器语言 + + + Emulator + 模拟器 + + + Enable Separate Update Folder + 启用单独的更新目录 + + + Default tab when opening settings + 打开设置时的默认选项卡 + + + Show Game Size In List + 在列表中显示游戏大小 + + + Show Splash + 显示启动画面 + + + Enable Discord Rich Presence + 启用 Discord Rich Presence + + + Username + 用户名 + + + Trophy Key + 奖杯密钥 + + + Trophy + 奖杯 + + + Open the custom trophy images/sounds folder + 打开自定义奖杯图像/声音文件夹 + + + Logger + 日志 + + + Log Type + 日志类型 + + + Log Filter + 日志过滤 + + + Open Log Location + 打开日志位置 + + + Input + 输入 + + + Cursor + 光标 + + + Hide Cursor + 隐藏光标 + + + Hide Cursor Idle Timeout + 光标隐藏闲置时长 + + + s + + + + Controller + 手柄 + + + Back Button Behavior + 返回按钮行为 + + + Graphics + 图像 + + + GUI + 界面 + + + User + 用户 + + + Graphics Device + 图形设备 + + + Vblank Divider + Vblank Divider + + + Advanced + 高级 + + + Enable Shaders Dumping + 启用着色器转储 + + + Enable NULL GPU + 启用 NULL GPU + + + Enable HDR + 启用 HDR + + + Paths + 路径 + + + Game Folders + 游戏文件夹 + + + Add... + 添加... + + + Remove + 删除 + + + Debug + 调试 + + + Enable Debug Dumping + 启用调试转储 + + + Enable Vulkan Validation Layers + 启用 Vulkan 验证层 + + + Enable Vulkan Synchronization Validation + 启用 Vulkan 同步验证 + + + Enable RenderDoc Debugging + 启用 RenderDoc 调试 + + + Enable Crash Diagnostics + 启用崩溃诊断 + + + Collect Shaders + 收集着色器 + + + Copy GPU Buffers + 复制 GPU 缓冲区 + + + Host Debug Markers + Host 调试标记 + + + Guest Debug Markers + Geust 调试标记 + + + Update + 更新 + + + Check for Updates at Startup + 启动时检查更新 + + + Always Show Changelog + 始终显示变更日志 + + + Update Channel + 更新频道 + + + Check for Updates + 检查更新 + + + GUI Settings + 界面设置 + + + Title Music + 标题音乐 + + + Disable Trophy Notification + 禁用奖杯通知 + + + Background Image + 背景图片 + + + Show Background Image + 显示背景图片 + + + Opacity + 可见度 + + + Play title music + 播放标题音乐 + + + Update Compatibility Database On Startup + 启动时更新兼容性数据库 + + + Game Compatibility + 游戏兼容性 + + + Display Compatibility Data + 显示兼容性数据 + + + Update Compatibility Database + 更新兼容性数据库 + + + Volume + 音量 + + + Save + 保存 + + + Apply + 应用 + + + Restore Defaults + 恢复默认 + + + Close + 关闭 + + + Point your mouse at an option to display its description. + 将鼠标指针指向选项以显示其描述。 + + + Console Language:\nSets the language that the PS4 game uses.\nIt's recommended to set this to a language the game supports, which will vary by region. + 主机语言:\n设置 PS4 游戏中使用的语言。\n建议设置为支持的语言,这将因地区而异。 + + + Emulator Language:\nSets the language of the emulator's user interface. + 模拟器语言:\n设置模拟器用户界面的语言。 + + + Enable Separate Update Folder:\nEnables installing game updates into a separate folder for easy management.\nThis can be manually created by adding the extracted update to the game folder with the name "CUSA00000-UPDATE" where the CUSA ID matches the game's ID. + 启用单独的更新目录:\n启用安装游戏更新到一个单独的目录中以更便于管理。 + + + Show Splash Screen:\nShows the game's splash screen (a special image) while the game is starting. + 显示启动画面:\n在游戏启动时显示游戏的启动画面(特殊图像)。 + + + Enable Discord Rich Presence:\nDisplays the emulator icon and relevant information on your Discord profile. + 启用 Discord Rich Presence:\n在您的 Discord 个人资料上显示模拟器图标和相关信息。 + + + Username:\nSets the PS4's account username, which may be displayed by some games. + 用户名:\n设置 PS4 帐户的用户名,某些游戏中可能会显示此名称。 + + + Trophy Key:\nKey used to decrypt trophies. Must be obtained from your jailbroken console.\nMust contain only hex characters. + 奖杯密钥:\n用于解密奖杯的密钥。必须从您的越狱主机中获得。\n仅包含十六进制字符。 + + + Log Type:\nSets whether to synchronize the output of the log window for performance. May have adverse effects on emulation. + 日志类型:\n设置日志窗口输出的同步方式以提高性能。可能会对模拟产生不良影响。 + + + Log Filter:\nFilters the log to only print specific information.\nExamples: "Core:Trace" "Lib.Pad:Debug Common.Filesystem:Error" "*:Critical"\nLevels: Trace, Debug, Info, Warning, Error, Critical - in this order, a specific level silences all levels preceding it in the list and logs every level after it. + 日志过滤器:\n过滤日志,仅打印特定信息。\n例如:"Core:Trace" "Lib.Pad:Debug Common.Filesystem:Error" "*:Critical" 级别: Trace, Debug, Info, Warning, Error, Critical - 按此顺序,特定级别将静默列表中所有先前的级别,并记录所有后续级别。 + + + Update:\nRelease: Official versions released every month that may be very outdated, but are more reliable and tested.\nNightly: Development versions that have all the latest features and fixes, but may contain bugs and are less stable. + 更新:\nRelease:每月发布的官方版本可能非常过时,但更可靠且经过测试。\nNightly:包含所有最新功能和修复的开发版本,但可能包含错误且稳定性较低。 + + + Background Image:\nControl the opacity of the game background image. + 背景图片:\n控制游戏背景图片的可见度。 + + + Play Title Music:\nIf a game supports it, enable playing special music when selecting the game in the GUI. + 播放标题音乐:\n如果游戏支持,在图形界面选择游戏时播放特殊音乐。 + + + Disable Trophy Pop-ups:\nDisable in-game trophy notifications. Trophy progress can still be tracked using the Trophy Viewer (right-click the game in the main window). + 禁止弹出奖杯:\n禁用游戏内奖杯通知。可以在奖杯查看器中继续跟踪奖杯进度(在主窗口中右键点击游戏)。 + + + Hide Cursor:\nChoose when the cursor will disappear:\nNever: You will always see the mouse.\nidle: Set a time for it to disappear after being idle.\nAlways: you will never see the mouse. + 隐藏光标:\n选择光标何时消失:\n从不: 从不隐藏光标。\n闲置:光标在闲置若干秒后消失。\n始终:始终隐藏光标。 + + + Hide Idle Cursor Timeout:\nThe duration (seconds) after which the cursor that has been idle hides itself. + 光标隐藏闲置时长:\n光标自动隐藏之前的闲置时长。 + + + Back Button Behavior:\nSets the controller's back button to emulate tapping the specified position on the PS4 touchpad. + 返回按钮行为:\n设置手柄的返回按钮模拟在 PS4 触控板上指定位置的点击。 + + + Display Compatibility Data:\nDisplays game compatibility information in table view. Enable "Update Compatibility On Startup" to get up-to-date information. + 显示兼容性数据:\n在列表视图中显示游戏兼容性信息。启用“启动时更新兼容性数据库”以获取最新信息。 + + + Update Compatibility On Startup:\nAutomatically update the compatibility database when shadPS4 starts. + 启动时更新兼容性数据库:\n当 shadPS4 启动时自动更新兼容性数据库。 + + + Update Compatibility Database:\nImmediately update the compatibility database. + 更新兼容性数据库:\n立即更新兼容性数据库。 + + + Never + 从不 + + + Idle + 闲置 + + + Always + 始终 + + + Touchpad Left + 触控板左侧 + + + Touchpad Right + 触控板右侧 + + + Touchpad Center + 触控板中间 + + + None + + + + Graphics Device:\nOn multiple GPU systems, select the GPU the emulator will use from the drop down list,\nor select "Auto Select" to automatically determine it. + 图形设备:\n在具有多个 GPU 的系统中,从下拉列表中选择要使用的 GPU,\n或者选择“自动选择”由模拟器决定。 + + + Width/Height:\nSets the size of the emulator window at launch, which can be resized during gameplay.\nThis is different from the in-game resolution. + 宽度/高度:\n设置启动游戏时的窗口大小,游戏过程中可以调整。\n这与游戏内的分辨率不同。 + + + Vblank Divider:\nThe frame rate at which the emulator refreshes at is multiplied by this number. Changing this may have adverse effects, such as increasing the game speed, or breaking critical game functionality that does not expect this to change! + Vblank Divider:\n模拟器刷新的帧率会乘以此数字。改变此项可能会导致游戏速度加快,或破坏游戏中不期望此变化的关键功能! + + + Enable Shaders Dumping:\nFor the sake of technical debugging, saves the games shaders to a folder as they render. + 启用着色器转储:\n用于技术调试,在渲染期间将游戏着色器保存到文件夹中。 + + + Enable Null GPU:\nFor the sake of technical debugging, disables game rendering as if there were no graphics card. + 启用 NULL GPU:\n用于技术调试,禁用游戏渲染,就像没有显卡一样。 + + + Enable HDR:\nEnables HDR in games that support it.\nYour monitor must have support for the BT2020 PQ color space and the RGB10A2 swapchain format. + 启用 HDR:\n在支持 HDR 的游戏中启用 HDR。\n您的显示器必须支持 BT2020 PQ 色彩空间和 RGB10A2 交换链格式。 + + + Game Folders:\nThe list of folders to check for installed games. + 游戏文件夹:\n检查已安装游戏的文件夹列表。 + + + Add:\nAdd a folder to the list. + 添加:\n将文件夹添加到列表。 + + + Remove:\nRemove a folder from the list. + 移除:\n从列表中移除文件夹。 + + + Enable Debug Dumping:\nSaves the import and export symbols and file header information of the currently running PS4 program to a directory. + 启用调试转储:\n将当前正在运行的 PS4 程序的导入和导出符号及文件头信息保存到目录中。 + + + Enable Vulkan Validation Layers:\nEnables a system that validates the state of the Vulkan renderer and logs information about its internal state.\nThis will reduce performance and likely change the behavior of emulation. + 启用 Vulkan 验证层:\n启用一个系统来验证 Vulkan 渲染器的状态并记录其内部状态的信息。\n这将降低性能并可能改变模拟的行为。 + + + Enable Vulkan Synchronization Validation:\nEnables a system that validates the timing of Vulkan rendering tasks.\nThis will reduce performance and likely change the behavior of emulation. + 启用 Vulkan 同步验证:\n启用一个系统来验证 Vulkan 渲染任务的时间。\n这将降低性能并可能改变模拟的行为。 + + + Enable RenderDoc Debugging:\nIf enabled, the emulator will provide compatibility with Renderdoc to allow capture and analysis of the currently rendered frame. + 启用 RenderDoc 调试:\n启用后模拟器将提供与 Renderdoc 的兼容性,允许在渲染过程中捕获和分析当前渲染的帧。 + + + Collect Shaders:\nYou need this enabled to edit shaders with the debug menu (Ctrl + F10). + 收集着色器:\n您需要启用此功能才能使用调试菜单(Ctrl + F10)编辑着色器。 + + + Crash Diagnostics:\nCreates a .yaml file with info about the Vulkan state at the time of crashing.\nUseful for debugging 'Device lost' errors. If you have this enabled, you should enable Host AND Guest Debug Markers.\nDoes not work on Intel GPUs.\nYou need Vulkan Validation Layers enabled and the Vulkan SDK for this to work. + 崩溃诊断:\n创建一个包含崩溃时 Vulkan 状态的 .yaml 文件。\n对于调试“Device lost”错误很有用。如果您启用了此功能,您应该同时启用 Host 和 Guest 调试标记。\n此功能在 Intel 显卡上不可用。\n您需要启用 Vulkan 验证层并安装 Vulkan SDK 才能使用此功能。 + + + Copy GPU Buffers:\nGets around race conditions involving GPU submits.\nMay or may not help with PM4 type 0 crashes. + 复制 GPU 缓冲区:\n绕过涉及 GPU 提交的竞态条件。\n对于 PM4 type 0 崩溃可能有帮助,也可能没有帮助。 + + + Host Debug Markers:\nInserts emulator-side information like markers for specific AMDGPU commands around Vulkan commands, as well as giving resources debug names.\nIf you have this enabled, you should enable Crash Diagnostics.\nUseful for programs like RenderDoc. + Host 调试标记:\n在 Vulkan 命令周围插入模拟器端信息,如特定 AMD GPU 命令的标记,以及为资源提供调试名称。\n如果您已启用此功能,应同时启用崩溃诊断。\n对 RenderDoc 等程序很有用。 + + + Guest Debug Markers:\nInserts any debug markers the game itself has added to the command buffer.\nIf you have this enabled, you should enable Crash Diagnostics.\nUseful for programs like RenderDoc. + Guest 调试标记:\n在命令缓冲区中插入游戏本身添加的任何调试标记。\n如果您已启用此功能,应同时启用崩溃诊断。\n对 RenderDoc 等程序很有用。 + + + Save Data Path:\nThe folder where game save data will be saved. + 存档数据路径:\n保存游戏存档数据的目录。 + + + Browse:\nBrowse for a folder to set as the save data path. + 浏览:\n选择一个目录保存游戏存档数据。 + + + Release + 稳定版 + + + Nightly + 预览版 + + + Set the volume of the background music. + 设置背景音乐的音量。 + + + Enable Motion Controls + 启用体感控制 + + + Save Data Path + 保存数据路径 + + + Browse + 浏览 + + + async + 异步 + + + sync + 同步 + + + Auto Select + 自动选择 + + + Directory to install games + 要安装游戏的目录 + + + Directory to save data + 存档数据目录 + + + Video + 显示 + + + Display Mode + 显示模式 + + + Windowed + 窗口 + + + Fullscreen + 全屏 + + + Fullscreen (Borderless) + 无边框全屏 + + + Window Size + 窗口大小 + + + W: + 宽: + + + H: + 高: + + + Separate Log Files + 独立日志文件 + + + Separate Log Files:\nWrites a separate logfile for each game. + 独立日志文件:\n每个游戏使用单独的日志文件。 + + + Trophy Notification Position + 奖杯通知位置 + + + Left + 左边 + + + Right + 右边 + + + Top + 顶部 + + + Bottom + 底部 + + + Notification Duration + 通知显示持续时间 + + + Portable User Folder + 本地用户文件夹 + + + Create Portable User Folder from Common User Folder + 从公共用户文件夹创建本地用户文件夹 + + + Portable user folder:\nStores shadPS4 settings and data that will be applied only to the shadPS4 build located in the current folder. Restart the app after creating the portable user folder to begin using it. + 本地用户文件夹:\n存储 shadPS4 设置和数据,这些设置和数据仅应用于当前运行的 shadPS4。创建本地用户文件夹后,重启应用即可开始使用。 + + + Cannot create portable user folder + 无法创建本地用户文件夹 + + + %1 already exists + %1 已存在 + + + Portable user folder created + 本地用户文件夹已创建 + + + %1 successfully created. + %1 创建成功。 + + + Open the custom trophy images/sounds folder:\nYou can add custom images to the trophies and an audio.\nAdd the files to custom_trophy with the following names:\ntrophy.wav OR trophy.mp3, bronze.png, gold.png, platinum.png, silver.png\nNote: The sound will only work in QT versions. + 打开自定义奖杯图像/声音文件夹:\n您可以自定义奖杯图像和声音。\n将文件添加到 custom_trophy 文件夹中,文件名如下:\ntrophy.wav 或 trophy.mp3、bronze.png、gold.png、platinum.png、silver.png。\n注意:自定义声音只能在 QT 版本中生效。 + + + + TrophyViewer + + Trophy Viewer + 奖杯查看器 + + + Select Game: + 选择游戏: + + + Progress + 进度 + + + Show Earned Trophies + 显示获得的奖杯 + + + Show Not Earned Trophies + 显示未获得的奖杯 + + + Show Hidden Trophies + 显示隐藏奖杯 + + diff --git a/src/qt_gui/translations/zh_TW.ts b/src/qt_gui/translations/zh_TW.ts index 293ed81a6..08aa812fb 100644 --- a/src/qt_gui/translations/zh_TW.ts +++ b/src/qt_gui/translations/zh_TW.ts @@ -1,1664 +1,2089 @@ + - - - - 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... - - - - InstallDirSelect - - - shadPS4 - Choose directory - shadPS4 - Choose directory - - - - Select which directory you want to install to. - Select which directory you want to install to. - - - - 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 - - - - Cheats / Patches - Zuòbì / Xiūbǔ chéngshì - - - - SFO Viewer - SFO Viewer - - - - Trophy Viewer - Trophy Viewer - - - - Open Folder... - 打開資料夾... - - - - Open Game Folder - 打開遊戲資料夾 - - - - Open Save Data Folder - 打開存檔資料夾 - - - - Open Log Folder - 打開日誌資料夾 - - - - Copy info... - Copy info... - - - - Copy Name - Copy Name - - - - Copy Serial - Copy Serial - - - - Copy All - Copy All - - - - Delete... - Delete... - - - - Delete Game - Delete Game - - - - Delete Update - Delete Update - - - - Delete DLC - Delete DLC - - - - Compatibility... - Compatibility... - - - - Update database - Update database - - - - View report - View report - - - - Submit a report - Submit a report - - - - Shortcut creation - Shortcut creation - - - - Shortcut created successfully! - Shortcut created successfully! - - - - Error - Error - - - - Error creating shortcut! - Error creating shortcut! - - - - Install PKG - Install PKG - - - - Game - Game - - - - requiresEnableSeparateUpdateFolder_MSG - This feature requires the 'Enable Separate Update Folder' config option to work. If you want to use this feature, please enable it. - - - - This game has no update to delete! - This game has no update to delete! - - - - Update - Update - - - - This game has no DLC to delete! - This game has no DLC to delete! - - - - DLC - DLC - - - - Delete %1 - Delete %1 - - - - Are you sure you want to delete %1's %2 directory? - Are you sure you want to delete %1's %2 directory? - - - - MainWindow - - - Open/Add Elf Folder - Open/Add Elf Folder - - - - Install Packages (PKG) - Install Packages (PKG) - - - - Boot Game - Boot Game - - - - Check for Updates - 檢查更新 - - - - 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 - - - - Download Cheats/Patches - Xiàzài Zuòbì / Xiūbǔ chéngshì - - - - 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 - - - - Help - 幫助 - - - - 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 - - - - Enable Separate Update Folder - Enable Separate Update Folder - - - - Show Splash - Show Splash - - - - Is PS4 Pro - Is PS4 Pro - - - - Enable Discord Rich Presence - 啟用 Discord Rich Presence - - - - Username - Username - - - - Trophy Key - Trophy Key - - - - Trophy - Trophy - - - - Logger - Logger - - - - Log Type - Log Type - - - - Log Filter - Log Filter - - - - Input - 輸入 - - - - Cursor - 游標 - - - - Hide Cursor - 隱藏游標 - - - - Hide Cursor Idle Timeout - 游標空閒超時隱藏 - - - - s - s - - - - Controller - 控制器 - - - - Back Button Behavior - 返回按鈕行為 - - - - 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 - - - - Paths - 路徑 - - - - Game Folders - 遊戲資料夾 - - - - Add... - 添加... - - - - Remove - 刪除 - - - - 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 - - - - Update - 更新 - - - - Check for Updates at Startup - 啟動時檢查更新 - - - - Update Channel - 更新頻道 - - - - Check for Updates - 檢查更新 - - - - GUI Settings - 介面設置 - - - - Disable Trophy Pop-ups - Disable Trophy Pop-ups - - - - Play title music - 播放標題音樂 - - - - Update Compatibility Database On Startup - Update Compatibility Database On Startup - - - - Game Compatibility - Game Compatibility - - - - Display Compatibility Data - Display Compatibility Data - - - - Update Compatibility Database - Update Compatibility Database - - - - Volume - 音量 - - - - Audio Backend - Audio Backend - - - - MainWindow - - - Game List - 遊戲列表 - - - - * 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! - 檢測到補丁! - - - - PKG and Game versions match: - PKG 和遊戲版本匹配: - - - - Would you like to overwrite? - 您想要覆蓋嗎? - - - - PKG Version %1 is older than installed version: - PKG 版本 %1 比已安裝版本更舊: - - - - Game is installed: - 遊戲已安裝: - - - - Would you like to install Patch: - 您想要安裝補丁嗎: - - - - DLC Installation - DLC 安裝 - - - - Would you like to install DLC: %1? - 您想要安裝 DLC: %1 嗎? - - - - DLC already installed: - DLC 已經安裝: - - - - Game already installed - 遊戲已經安裝 - - - - 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 for - Cheats / Patches for - - - - 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 頁面。 - - - - The game is in version: %1 - 遊戲版本: %1 - - - - The downloaded patch only works on version: %1 - 下載的補丁僅適用於版本: %1 - - - - You may need to update your game. - 您可能需要更新遊戲。 - - - - Incompatibility Notice - 不相容通知 - - - - 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: - 名稱: - - - - Can't apply cheats before the game is started - 在遊戲開始之前無法應用作弊。 - - - - SettingsDialog - - - Save - 儲存 - - - - Apply - 應用 - - - - Restore Defaults - 還原預設值 - - - - Close - 關閉 - - - - Point your mouse at an option to display its description. - 將鼠標指向選項以顯示其描述。 - - - - consoleLanguageGroupBox - 主機語言:\n設定PS4遊戲使用的語言。\n建議將其設置為遊戲支持的語言,這會因地區而異。 - - - - emulatorLanguageGroupBox - 模擬器語言:\n設定模擬器的用戶介面的語言。 - - - - fullscreenCheckBox - 啟用全螢幕:\n自動將遊戲視窗設置為全螢幕模式。\n可以按F11鍵進行切換。 - - - - separateUpdatesCheckBox - Enable Separate Update Folder:\nEnables installing game updates into a separate folder for easy management. - - - - showSplashCheckBox - 顯示啟動畫面:\n在遊戲啟動時顯示遊戲的啟動畫面(特殊圖片)。 - - - - ps4proCheckBox - 為PS4 Pro:\n讓模擬器像PS4 PRO一樣運作,這可能啟用支持此功能的遊戲中的特殊功能。 - - - - discordRPCCheckbox - 啟用 Discord Rich Presence:\n在您的 Discord 個人檔案上顯示模擬器圖標和相關信息。 - - - - userName - 用戶名:\n設定PS4帳號的用戶名,某些遊戲中可能會顯示。 - - - - TrophyKey - Trophy Key:\nKey used to decrypt trophies. Must be obtained from your jailbroken console.\nMust contain only hex characters. - - - - logTypeGroupBox - 日誌類型:\n設定是否同步日誌窗口的輸出以提高性能。可能對模擬產生不良影響。 - - - - logFilter - 日誌過濾器:\n過濾日誌以僅打印特定信息。\n範例:"Core:Trace" "Lib.Pad:Debug Common.Filesystem:Error" "*:Critical" 等級: Trace, Debug, Info, Warning, Error, Critical - 以此順序,特定級別靜音所有前面的級別,並記錄其後的每個級別。 - - - - updaterGroupBox - 更新:\nRelease: 每月發布的官方版本,可能非常舊,但更可靠且經過測試。\nNightly: 開發版本,擁有所有最新的功能和修復,但可能包含錯誤,穩定性較差。 - - - - GUIgroupBox - 播放標題音樂:\n如果遊戲支持,啟用在GUI中選擇遊戲時播放特殊音樂。 - - - - disableTrophycheckBox - Disable Trophy Pop-ups:\nDisable in-game trophy notifications. Trophy progress can still be tracked using the Trophy Viewer (right-click the game in the main window). - - - - hideCursorGroupBox - 隱藏游標:\n選擇游標何時消失:\n從不: 您將始終看到滑鼠。\n閒置: 設定在閒置後消失的時間。\n始終: 您將永遠看不到滑鼠。 - - - - idleTimeoutGroupBox - 設定滑鼠在閒置後消失的時間。 - - - - backButtonBehaviorGroupBox - 返回按鈕行為:\n設定控制器的返回按鈕模擬在 PS4 觸控板上指定位置的觸碰。 - - - - enableCompatibilityCheckBox - Display Compatibility Data:\nDisplays game compatibility information in table view. Enable "Update Compatibility On Startup" to get up-to-date information. - - - - checkCompatibilityOnStartupCheckBox - Update Compatibility On Startup:\nAutomatically update the compatibility database when shadPS4 starts. - - - - updateCompatibilityButton - Update Compatibility Database:\nImmediately update the compatibility database. - - - - Never - 從不 - - - - Idle - 閒置 - - - - Always - 始終 - - - - Touchpad Left - 觸控板左側 - - - - Touchpad Right - 觸控板右側 - - - - Touchpad Center - 觸控板中間 - - - - None - - - - - graphicsAdapterGroupBox - 圖形設備:\n在多GPU系統中,從下拉列表中選擇模擬器將使用的GPU,\n或選擇「自動選擇」以自動確定。 - - - - resolutionLayout - 寬度/高度:\n設定模擬器啟動時的窗口大小,可以在遊戲過程中調整。\n這與遊戲內解析度不同。 - - - - heightDivider - Vblank分隔符:\n模擬器的幀速率將乘以這個數字。更改此數字可能會有不良影響,例如增加遊戲速度,或破壞不預期此變化的關鍵遊戲功能! - - - - dumpShadersCheckBox - 啟用著色器轉儲:\n為了技術調試,將遊戲的著色器在渲染時保存到文件夾中。 - - - - nullGpuCheckBox - 啟用空GPU:\n為了技術調試,禁用遊戲渲染,彷彿沒有顯示卡。 - - - - gameFoldersBox - 遊戲資料夾:\n檢查已安裝遊戲的資料夾列表。 - - - - addFolderButton - 添加:\n將資料夾添加到列表。 - - - - removeFolderButton - 移除:\n從列表中移除資料夾。 - - - - debugDump - 啟用調試轉儲:\n將當前運行的PS4程序的輸入和輸出符號及文件頭信息保存到目錄中。 - - - - vkValidationCheckBox - 啟用Vulkan驗證層:\n啟用一個系統來驗證Vulkan渲染器的狀態並記錄其內部狀態的信息。這將降低性能並可能改變模擬行為。 - - - - vkSyncValidationCheckBox - 啟用Vulkan同步驗證:\n啟用一個系統來驗證Vulkan渲染任務的時間。這將降低性能並可能改變模擬行為。 - - - - rdocCheckBox - 啟用RenderDoc調試:\n如果啟用,模擬器將提供與Renderdoc的兼容性,以允許捕獲和分析當前渲染的幀。 - - - - GameListFrame - - - Icon - 圖示 - - - - Name - 名稱 - - - - Serial - 序號 - - - - Compatibility - Compatibility - - - - Region - 區域 - - - - Firmware - 固件 - - - - Size - 大小 - - - - Version - 版本 - - - - Path - 路徑 - - - - Play Time - 遊玩時間 - - - - Never Played - Never Played - - - - h - h - - - - m - m - - - - s - s - - - - Compatibility is untested - Compatibility is untested - - - - Game does not initialize properly / crashes the emulator - Game does not initialize properly / crashes the emulator - - - - Game boots, but only displays a blank screen - Game boots, but only displays a blank screen - - - - Game displays an image but does not go past the menu - Game displays an image but does not go past the menu - - - - Game has game-breaking glitches or unplayable performance - Game has game-breaking glitches or unplayable performance - - - - Game can be completed with playable performance and no major glitches - Game can be completed with playable performance and no major glitches - - - - CheckUpdate - - - Auto Updater - 自動更新程式 - - - - Error - 錯誤 - - - - Network error: - 網路錯誤: - - - - Failed to parse update information. - 無法解析更新資訊。 - - - - No pre-releases found. - 未找到預發布版本。 - - - - Invalid release data. - 無效的發行數據。 - - - - No download URL found for the specified asset. - 未找到指定資產的下載 URL。 - - - - Your version is already up to date! - 您的版本已經是最新的! - - - - Update Available - 可用更新 - - - - Update Channel - 更新頻道 - - - - Current Version - 當前版本 - - - - Latest Version - 最新版本 - - - - Do you want to update? - 您想要更新嗎? - - - - Show Changelog - 顯示變更日誌 - - - - Check for Updates at Startup - 啟動時檢查更新 - - - - Update - 更新 - - - - No - - - - - Hide Changelog - 隱藏變更日誌 - - - - Changes - 變更 - - - - Network error occurred while trying to access the URL - 嘗試訪問 URL 時發生網路錯誤 - - - - Download Complete - 下載完成 - - - - The update has been downloaded, press OK to install. - 更新已下載,按 OK 安裝。 - - - - Failed to save the update file at - 無法將更新文件保存到 - - - - Starting Update... - 正在開始更新... - - - - Failed to create the update script file - 無法創建更新腳本文件 - - - - GameListUtils - - - B - B - - - - KB - KB - - - - MB - MB - - - - GB - GB - - - - TB - TB - - - \ No newline at end of file + + + AboutDialog + + About shadPS4 + About 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. + + + + CheatsPatches + + Cheats / Patches for + Cheats / Patches for + + + 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:\n + 作弊/補丁為實驗性功能。\n請小心使用。\n\n透過選擇儲存庫並點擊下載按鈕來單獨下載作弊程式。\n在“補丁”標籤頁中,您可以一次下載所有補丁,選擇要使用的補丁並保存您的選擇。\n\n由於我們不開發作弊/補丁,\n請將問題報告給作弊程式的作者。\n\n創建了新的作弊程式?請訪問:\n + + + 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 + 未找到作弊碼 + + + 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 + 作弊碼下載成功 + + + 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 download: + 下載失敗: + + + Download Complete + 下載完成 + + + 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. If the patch does not appear, it may be that it does not exist for the specific serial and version of the game. + 修補檔下載成功!所有遊戲的修補檔已下載完成,無需像作弊碼那樣為每個遊戲單獨下載。如果補丁未顯示,可能是該補丁不適用於特定的序號和遊戲版本。 + + + Failed to parse JSON data from HTML. + 無法從 HTML 解析 JSON 數據。 + + + Failed to retrieve HTML page. + 無法檢索 HTML 頁面。 + + + The game is in version: %1 + 遊戲版本: %1 + + + The downloaded patch only works on version: %1 + 下載的補丁僅適用於版本: %1 + + + You may need to update your game. + 您可能需要更新遊戲。 + + + Incompatibility Notice + 不相容通知 + + + 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: + 名稱: + + + Can't apply cheats before the game is started + 在遊戲開始之前無法應用作弊。 + + + Close + 關閉 + + + + CheckUpdate + + Auto Updater + 自動更新程式 + + + Error + 錯誤 + + + Network error: + 網路錯誤: + + + The Auto Updater allows up to 60 update checks per hour.\nYou have reached this limit. Please try again later. + 自動更新程式每小時最多允許 60 次更新檢查。\n您已達到此限制。請稍後再試。 + + + Failed to parse update information. + 無法解析更新資訊。 + + + No pre-releases found. + 未找到預發布版本。 + + + Invalid release data. + 無效的發行數據。 + + + No download URL found for the specified asset. + 未找到指定資產的下載 URL。 + + + Your version is already up to date! + 您的版本已經是最新的! + + + Update Available + 可用更新 + + + Update Channel + 更新頻道 + + + Current Version + 當前版本 + + + Latest Version + 最新版本 + + + Do you want to update? + 您想要更新嗎? + + + Show Changelog + 顯示變更日誌 + + + Check for Updates at Startup + 啟動時檢查更新 + + + Update + 更新 + + + No + + + + Hide Changelog + 隱藏變更日誌 + + + Changes + 變更 + + + Network error occurred while trying to access the URL + 嘗試訪問 URL 時發生網路錯誤 + + + Download Complete + 下載完成 + + + The update has been downloaded, press OK to install. + 更新已下載,按 OK 安裝。 + + + Failed to save the update file at + 無法將更新文件保存到 + + + Starting Update... + 正在開始更新... + + + Failed to create the update script file + 無法創建更新腳本文件 + + + + CompatibilityInfoClass + + Fetching compatibility data, please wait + 正在取得相容性資料,請稍候 + + + Cancel + 取消 + + + Loading... + 載入中... + + + Error + 錯誤 + + + Unable to update compatibility data! Try again later. + 無法更新相容性資料!請稍後再試。 + + + Unable to open compatibility_data.json for writing. + 無法開啟 compatibility_data.json 進行寫入。 + + + Unknown + 未知 + + + Nothing + + + + Boots + 靴子 + + + Menus + 選單 + + + Ingame + 遊戲內 + + + Playable + 可玩 + + + + ControlSettings + + Configure Controls + 操控設定 + + + D-Pad + D-Pad + + + Up + Up + + + Left + Left + + + Right + Right + + + Down + Down + + + Left Stick Deadzone (def:2 max:127) + Left Stick Deadzone (def:2 max:127) + + + Left Deadzone + Left Deadzone + + + Left Stick + Left Stick + + + Config Selection + Config Selection + + + Common Config + Common Config + + + Use per-game configs + Use per-game configs + + + L1 / LB + L1 / LB + + + L2 / LT + L2 / LT + + + Back + Back + + + R1 / RB + R1 / RB + + + R2 / RT + R2 / RT + + + L3 + L3 + + + Options / Start + Options / Start + + + R3 + R3 + + + Face Buttons + Face Buttons + + + Triangle / Y + Triangle / Y + + + Square / X + Square / X + + + Circle / B + Circle / B + + + Cross / A + Cross / A + + + Right Stick Deadzone (def:2, max:127) + Right Stick Deadzone (def:2, max:127) + + + Right Deadzone + Right Deadzone + + + Right Stick + Right Stick + + + Color Adjustment + 色彩調整 + + + R: + R: + + + G: + G: + + + B: + B: + + + Override Lightbar Color + Override Lightbar Color + + + Override Color + Override Color + + + Unable to Save + 無法保存 + + + Cannot bind axis values more than once + Cannot bind axis values more than once + + + Save + 保存 + + + Apply + 套用 + + + Restore Defaults + Restore Defaults + + + Cancel + 取消 + + + + EditorDialog + + Edit Keyboard + Mouse and Controller input bindings + Edit Keyboard + Mouse and Controller input bindings + + + Use Per-Game configs + Use Per-Game configs + + + Error + 錯誤 + + + Could not open the file for reading + Could not open the file for reading + + + Could not open the file for writing + Could not open the file for writing + + + Save Changes + 儲存變更 + + + Do you want to save changes? + Do you want to save changes? + + + Help + Help + + + Do you want to reset your custom default config to the original default config? + Do you want to reset your custom default config to the original default config? + + + Do you want to reset this config to your custom default config? + Do you want to reset this config to your custom default config? + + + Reset to Default + Reset to Default + + + + 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 + + + Directory to install DLC + Directory to install DLC + + + + GameListFrame + + Icon + 圖示 + + + Name + 名稱 + + + Serial + 序號 + + + Compatibility + Compatibility + + + Region + 區域 + + + Firmware + 固件 + + + Size + 大小 + + + Version + 版本 + + + Path + 路徑 + + + Play Time + 遊玩時間 + + + Never Played + Never Played + + + h + h + + + m + m + + + s + s + + + Compatibility is untested + Compatibility is untested + + + Game does not initialize properly / crashes the emulator + Game does not initialize properly / crashes the emulator + + + Game boots, but only displays a blank screen + Game boots, but only displays a blank screen + + + Game displays an image but does not go past the menu + Game displays an image but does not go past the menu + + + Game has game-breaking glitches or unplayable performance + Game has game-breaking glitches or unplayable performance + + + Game can be completed with playable performance and no major glitches + Game can be completed with playable performance and no major glitches + + + Click to see details on github + 點擊查看 GitHub 上的詳細資訊 + + + Last updated + 最後更新 + + + + GameListUtils + + B + B + + + KB + KB + + + MB + MB + + + GB + GB + + + TB + TB + + + + GuiContextMenus + + Create Shortcut + Create Shortcut + + + Cheats / Patches + Zuòbì / Xiūbǔ chéngshì + + + SFO Viewer + SFO Viewer + + + Trophy Viewer + Trophy Viewer + + + Open Folder... + 打開資料夾... + + + Open Game Folder + 打開遊戲資料夾 + + + Open Save Data Folder + 打開存檔資料夾 + + + Open Log Folder + 打開日誌資料夾 + + + Copy info... + Copy info... + + + Copy Name + Copy Name + + + Copy Serial + Copy Serial + + + Copy Version + Copy Version + + + Copy Size + Copy Size + + + Copy All + Copy All + + + Delete... + Delete... + + + Delete Game + Delete Game + + + Delete Update + Delete Update + + + Delete DLC + Delete DLC + + + Delete Trophy + Delete Trophy + + + Compatibility... + Compatibility... + + + Update database + Update database + + + View report + View report + + + Submit a report + Submit a report + + + Shortcut creation + Shortcut creation + + + Shortcut created successfully! + Shortcut created successfully! + + + Error + Error + + + Error creating shortcut! + Error creating shortcut! + + + Game + Game + + + This game has no update to delete! + This game has no update to delete! + + + Update + Update + + + This game has no DLC to delete! + This game has no DLC to delete! + + + DLC + DLC + + + Delete %1 + Delete %1 + + + Are you sure you want to delete %1's %2 directory? + Are you sure you want to delete %1's %2 directory? + + + Open Update Folder + Open Update Folder + + + Delete Save Data + Delete Save Data + + + This game has no update folder to open! + This game has no update folder to open! + + + No log file found for this game! + No log file found for this game! + + + Failed to convert icon. + Failed to convert icon. + + + This game has no save data to delete! + This game has no save data to delete! + + + This game has no saved trophies to delete! + This game has no saved trophies to delete! + + + Save Data + Save Data + + + Trophy + Trophy + + + SFO Viewer for + SFO Viewer for + + + + HelpDialog + + Quickstart + Quickstart + + + FAQ + FAQ + + + Syntax + Syntax + + + Special Bindings + Special Bindings + + + Keybindings + Keybindings + + + + KBMSettings + + Configure Controls + Configure Controls + + + D-Pad + D-Pad + + + Up + Up + + + unmapped + unmapped + + + Left + Left + + + Right + Right + + + Down + Down + + + Left Analog Halfmode + Left Analog Halfmode + + + hold to move left stick at half-speed + hold to move left stick at half-speed + + + Left Stick + Left Stick + + + Config Selection + Config Selection + + + Common Config + Common Config + + + Use per-game configs + Use per-game configs + + + L1 + L1 + + + L2 + L2 + + + Text Editor + Text Editor + + + Help + Help + + + R1 + R1 + + + R2 + R2 + + + L3 + L3 + + + Touchpad Click + Touchpad Click + + + Mouse to Joystick + Mouse to Joystick + + + *press F7 ingame to activate + *press F7 ingame to activate + + + R3 + R3 + + + Options + Options + + + Mouse Movement Parameters + Mouse Movement Parameters + + + note: click Help Button/Special Keybindings for more information + note: click Help Button/Special Keybindings for more information + + + Face Buttons + Face Buttons + + + Triangle + Triangle + + + Square + Square + + + Circle + Circle + + + Cross + Cross + + + Right Analog Halfmode + Right Analog Halfmode + + + hold to move right stick at half-speed + hold to move right stick at half-speed + + + Right Stick + Right Stick + + + Speed Offset (def 0.125): + Speed Offset (def 0.125): + + + Copy from Common Config + Copy from Common Config + + + Deadzone Offset (def 0.50): + Deadzone Offset (def 0.50): + + + Speed Multiplier (def 1.0): + Speed Multiplier (def 1.0): + + + Common Config Selected + Common Config Selected + + + This button copies mappings from the Common Config to the currently selected profile, and cannot be used when the currently selected profile is the Common Config. + This button copies mappings from the Common Config to the currently selected profile, and cannot be used when the currently selected profile is the Common Config. + + + Copy values from Common Config + Copy values from Common Config + + + Do you want to overwrite existing mappings with the mappings from the Common Config? + Do you want to overwrite existing mappings with the mappings from the Common Config? + + + Unable to Save + Unable to Save + + + Cannot bind any unique input more than once + Cannot bind any unique input more than once + + + Press a key + Press a key + + + Cannot set mapping + Cannot set mapping + + + Mousewheel cannot be mapped to stick outputs + Mousewheel cannot be mapped to stick outputs + + + Save + Save + + + Apply + Apply + + + Restore Defaults + Restore Defaults + + + Cancel + Cancel + + + + MainWindow + + Open/Add Elf Folder + Open/Add Elf Folder + + + Boot Game + Boot Game + + + Check for Updates + 檢查更新 + + + About shadPS4 + About shadPS4 + + + Configure... + Configure... + + + Recent Games + Recent Games + + + Open shadPS4 Folder + Open shadPS4 Folder + + + 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 + + + Download Cheats/Patches + Xiàzài Zuòbì / Xiūbǔ chéngshì + + + Dump Game List + Dump Game List + + + Trophy Viewer + Trophy Viewer + + + No games found. Please add your games to your library first. + No games found. Please add your games to your library first. + + + Search... + Search... + + + File + File + + + View + View + + + Game List Icons + Game List Icons + + + Game List Mode + Game List Mode + + + Settings + Settings + + + Utils + Utils + + + Themes + Themes + + + Help + 幫助 + + + Dark + Dark + + + Light + Light + + + Green + Green + + + Blue + Blue + + + Violet + Violet + + + toolBar + toolBar + + + Game List + 遊戲列表 + + + * 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: + 遊戲: + + + ELF files (*.bin *.elf *.oelf) + ELF 檔案 (*.bin *.elf *.oelf) + + + Game Boot + 遊戲啟動 + + + Only one file can be selected! + 只能選擇一個檔案! + + + Run Game + Run Game + + + Eboot.bin file not found + Eboot.bin file not found + + + Game is already running! + Game is already running! + + + shadPS4 + shadPS4 + + + Play + Play + + + Pause + Pause + + + Stop + Stop + + + Restart + Restart + + + Full Screen + Full Screen + + + Controllers + Controllers + + + Keyboard + Keyboard + + + Refresh List + Refresh List + + + Resume + Resume + + + Show Labels Under Icons + Show Labels Under Icons + + + + SettingsDialog + + Settings + Settings + + + General + General + + + System + System + + + Console Language + Console Language + + + Emulator Language + Emulator Language + + + Emulator + Emulator + + + Enable Separate Update Folder + Enable Separate Update Folder + + + Default tab when opening settings + 打開設置時的默認選項卡 + + + Show Game Size In List + 顯示遊戲大小在列表中 + + + Show Splash + Show Splash + + + Enable Discord Rich Presence + 啟用 Discord Rich Presence + + + Username + Username + + + Trophy Key + Trophy Key + + + Trophy + Trophy + + + Open the custom trophy images/sounds folder + Open the custom trophy images/sounds folder + + + Logger + Logger + + + Log Type + Log Type + + + Log Filter + Log Filter + + + Open Log Location + 開啟日誌位置 + + + Input + 輸入 + + + Cursor + 游標 + + + Hide Cursor + 隱藏游標 + + + Hide Cursor Idle Timeout + 游標空閒超時隱藏 + + + s + s + + + Controller + 控制器 + + + Back Button Behavior + 返回按鈕行為 + + + Graphics + Graphics + + + GUI + 介面 + + + User + 使用者 + + + Graphics Device + Graphics Device + + + Vblank Divider + Vblank Divider + + + Advanced + Advanced + + + Enable Shaders Dumping + Enable Shaders Dumping + + + Enable NULL GPU + Enable NULL GPU + + + Enable HDR + Enable HDR + + + Paths + 路徑 + + + Game Folders + 遊戲資料夾 + + + Add... + 添加... + + + Remove + 刪除 + + + 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 + + + Enable Crash Diagnostics + Enable Crash Diagnostics + + + Collect Shaders + Collect Shaders + + + Copy GPU Buffers + Copy GPU Buffers + + + Host Debug Markers + Host Debug Markers + + + Guest Debug Markers + Guest Debug Markers + + + Update + 更新 + + + Check for Updates at Startup + 啟動時檢查更新 + + + Always Show Changelog + 始終顯示變更紀錄 + + + Update Channel + 更新頻道 + + + Check for Updates + 檢查更新 + + + GUI Settings + 介面設置 + + + Title Music + Title Music + + + Disable Trophy Notification + Disable Trophy Notification + + + Background Image + Background Image + + + Show Background Image + Show Background Image + + + Opacity + Opacity + + + Play title music + 播放標題音樂 + + + Update Compatibility Database On Startup + Update Compatibility Database On Startup + + + Game Compatibility + Game Compatibility + + + Display Compatibility Data + Display Compatibility Data + + + Update Compatibility Database + Update Compatibility Database + + + Volume + 音量 + + + Save + 儲存 + + + Apply + 應用 + + + Restore Defaults + 還原預設值 + + + Close + 關閉 + + + Point your mouse at an option to display its description. + 將鼠標指向選項以顯示其描述。 + + + Console Language:\nSets the language that the PS4 game uses.\nIt's recommended to set this to a language the game supports, which will vary by region. + 主機語言:\n設定PS4遊戲使用的語言。\n建議將其設置為遊戲支持的語言,這會因地區而異。 + + + Emulator Language:\nSets the language of the emulator's user interface. + 模擬器語言:\n設定模擬器的用戶介面的語言。 + + + Enable Separate Update Folder:\nEnables installing game updates into a separate folder for easy management.\nThis can be manually created by adding the extracted update to the game folder with the name "CUSA00000-UPDATE" where the CUSA ID matches the game's ID. + Enable Separate Update Folder:\nEnables installing game updates into a separate folder for easy management. + + + Show Splash Screen:\nShows the game's splash screen (a special image) while the game is starting. + 顯示啟動畫面:\n在遊戲啟動時顯示遊戲的啟動畫面(特殊圖片)。 + + + Enable Discord Rich Presence:\nDisplays the emulator icon and relevant information on your Discord profile. + 啟用 Discord Rich Presence:\n在您的 Discord 個人檔案上顯示模擬器圖標和相關信息。 + + + Username:\nSets the PS4's account username, which may be displayed by some games. + 用戶名:\n設定PS4帳號的用戶名,某些遊戲中可能會顯示。 + + + Trophy Key:\nKey used to decrypt trophies. Must be obtained from your jailbroken console.\nMust contain only hex characters. + Trophy Key:\nKey used to decrypt trophies. Must be obtained from your jailbroken console.\nMust contain only hex characters. + + + Log Type:\nSets whether to synchronize the output of the log window for performance. May have adverse effects on emulation. + 日誌類型:\n設定是否同步日誌窗口的輸出以提高性能。可能對模擬產生不良影響。 + + + Log Filter:\nFilters the log to only print specific information.\nExamples: "Core:Trace" "Lib.Pad:Debug Common.Filesystem:Error" "*:Critical"\nLevels: Trace, Debug, Info, Warning, Error, Critical - in this order, a specific level silences all levels preceding it in the list and logs every level after it. + 日誌過濾器:\n過濾日誌以僅打印特定信息。\n範例:"Core:Trace" "Lib.Pad:Debug Common.Filesystem:Error" "*:Critical" 等級: Trace, Debug, Info, Warning, Error, Critical - 以此順序,特定級別靜音所有前面的級別,並記錄其後的每個級別。 + + + Update:\nRelease: Official versions released every month that may be very outdated, but are more reliable and tested.\nNightly: Development versions that have all the latest features and fixes, but may contain bugs and are less stable. + 更新:\nRelease: 每月發布的官方版本,可能非常舊,但更可靠且經過測試。\nNightly: 開發版本,擁有所有最新的功能和修復,但可能包含錯誤,穩定性較差。 + + + Background Image:\nControl the opacity of the game background image. + Background Image:\nControl the opacity of the game background image. + + + Play Title Music:\nIf a game supports it, enable playing special music when selecting the game in the GUI. + 播放標題音樂:\n如果遊戲支持,啟用在GUI中選擇遊戲時播放特殊音樂。 + + + Disable Trophy Pop-ups:\nDisable in-game trophy notifications. Trophy progress can still be tracked using the Trophy Viewer (right-click the game in the main window). + Disable Trophy Pop-ups:\nDisable in-game trophy notifications. Trophy progress can still be tracked using the Trophy Viewer (right-click the game in the main window). + + + Hide Cursor:\nChoose when the cursor will disappear:\nNever: You will always see the mouse.\nidle: Set a time for it to disappear after being idle.\nAlways: you will never see the mouse. + 隱藏游標:\n選擇游標何時消失:\n從不: 您將始終看到滑鼠。\n閒置: 設定在閒置後消失的時間。\n始終: 您將永遠看不到滑鼠。 + + + Hide Idle Cursor Timeout:\nThe duration (seconds) after which the cursor that has been idle hides itself. + 設定滑鼠在閒置後消失的時間。 + + + Back Button Behavior:\nSets the controller's back button to emulate tapping the specified position on the PS4 touchpad. + 返回按鈕行為:\n設定控制器的返回按鈕模擬在 PS4 觸控板上指定位置的觸碰。 + + + Display Compatibility Data:\nDisplays game compatibility information in table view. Enable "Update Compatibility On Startup" to get up-to-date information. + Display Compatibility Data:\nDisplays game compatibility information in table view. Enable "Update Compatibility On Startup" to get up-to-date information. + + + Update Compatibility On Startup:\nAutomatically update the compatibility database when shadPS4 starts. + Update Compatibility On Startup:\nAutomatically update the compatibility database when shadPS4 starts. + + + Update Compatibility Database:\nImmediately update the compatibility database. + Update Compatibility Database:\nImmediately update the compatibility database. + + + Never + 從不 + + + Idle + 閒置 + + + Always + 始終 + + + Touchpad Left + 觸控板左側 + + + Touchpad Right + 觸控板右側 + + + Touchpad Center + 觸控板中間 + + + None + + + + Graphics Device:\nOn multiple GPU systems, select the GPU the emulator will use from the drop down list,\nor select "Auto Select" to automatically determine it. + 圖形設備:\n在多GPU系統中,從下拉列表中選擇模擬器將使用的GPU,\n或選擇「自動選擇」以自動確定。 + + + Width/Height:\nSets the size of the emulator window at launch, which can be resized during gameplay.\nThis is different from the in-game resolution. + 寬度/高度:\n設定模擬器啟動時的窗口大小,可以在遊戲過程中調整。\n這與遊戲內解析度不同。 + + + Vblank Divider:\nThe frame rate at which the emulator refreshes at is multiplied by this number. Changing this may have adverse effects, such as increasing the game speed, or breaking critical game functionality that does not expect this to change! + Vblank分隔符:\n模擬器的幀速率將乘以這個數字。更改此數字可能會有不良影響,例如增加遊戲速度,或破壞不預期此變化的關鍵遊戲功能! + + + Enable Shaders Dumping:\nFor the sake of technical debugging, saves the games shaders to a folder as they render. + 啟用著色器轉儲:\n為了技術調試,將遊戲的著色器在渲染時保存到文件夾中。 + + + Enable Null GPU:\nFor the sake of technical debugging, disables game rendering as if there were no graphics card. + 啟用空GPU:\n為了技術調試,禁用遊戲渲染,彷彿沒有顯示卡。 + + + Enable HDR:\nEnables HDR in games that support it.\nYour monitor must have support for the BT2020 PQ color space and the RGB10A2 swapchain format. + Enable HDR:\nEnables HDR in games that support it.\nYour monitor must have support for the BT2020 PQ color space and the RGB10A2 swapchain format. + + + Game Folders:\nThe list of folders to check for installed games. + 遊戲資料夾:\n檢查已安裝遊戲的資料夾列表。 + + + Add:\nAdd a folder to the list. + 添加:\n將資料夾添加到列表。 + + + Remove:\nRemove a folder from the list. + 移除:\n從列表中移除資料夾。 + + + Enable Debug Dumping:\nSaves the import and export symbols and file header information of the currently running PS4 program to a directory. + 啟用調試轉儲:\n將當前運行的PS4程序的輸入和輸出符號及文件頭信息保存到目錄中。 + + + Enable Vulkan Validation Layers:\nEnables a system that validates the state of the Vulkan renderer and logs information about its internal state.\nThis will reduce performance and likely change the behavior of emulation. + 啟用Vulkan驗證層:\n啟用一個系統來驗證Vulkan渲染器的狀態並記錄其內部狀態的信息。這將降低性能並可能改變模擬行為。 + + + Enable Vulkan Synchronization Validation:\nEnables a system that validates the timing of Vulkan rendering tasks.\nThis will reduce performance and likely change the behavior of emulation. + 啟用Vulkan同步驗證:\n啟用一個系統來驗證Vulkan渲染任務的時間。這將降低性能並可能改變模擬行為。 + + + Enable RenderDoc Debugging:\nIf enabled, the emulator will provide compatibility with Renderdoc to allow capture and analysis of the currently rendered frame. + 啟用RenderDoc調試:\n如果啟用,模擬器將提供與Renderdoc的兼容性,以允許捕獲和分析當前渲染的幀。 + + + Collect Shaders:\nYou need this enabled to edit shaders with the debug menu (Ctrl + F10). + Collect Shaders:\nYou need this enabled to edit shaders with the debug menu (Ctrl + F10). + + + Crash Diagnostics:\nCreates a .yaml file with info about the Vulkan state at the time of crashing.\nUseful for debugging 'Device lost' errors. If you have this enabled, you should enable Host AND Guest Debug Markers.\nDoes not work on Intel GPUs.\nYou need Vulkan Validation Layers enabled and the Vulkan SDK for this to work. + Crash Diagnostics:\nCreates a .yaml file with info about the Vulkan state at the time of crashing.\nUseful for debugging 'Device lost' errors. If you have this enabled, you should enable Host AND Guest Debug Markers.\nDoes not work on Intel GPUs.\nYou need Vulkan Validation Layers enabled and the Vulkan SDK for this to work. + + + Copy GPU Buffers:\nGets around race conditions involving GPU submits.\nMay or may not help with PM4 type 0 crashes. + Copy GPU Buffers:\nGets around race conditions involving GPU submits.\nMay or may not help with PM4 type 0 crashes. + + + Host Debug Markers:\nInserts emulator-side information like markers for specific AMDGPU commands around Vulkan commands, as well as giving resources debug names.\nIf you have this enabled, you should enable Crash Diagnostics.\nUseful for programs like RenderDoc. + Host Debug Markers:\nInserts emulator-side information like markers for specific AMDGPU commands around Vulkan commands, as well as giving resources debug names.\nIf you have this enabled, you should enable Crash Diagnostics.\nUseful for programs like RenderDoc. + + + Guest Debug Markers:\nInserts any debug markers the game itself has added to the command buffer.\nIf you have this enabled, you should enable Crash Diagnostics.\nUseful for programs like RenderDoc. + Guest Debug Markers:\nInserts any debug markers the game itself has added to the command buffer.\nIf you have this enabled, you should enable Crash Diagnostics.\nUseful for programs like RenderDoc. + + + Save Data Path:\nThe folder where game save data will be saved. + Save Data Path:\nThe folder where game save data will be saved. + + + Browse:\nBrowse for a folder to set as the save data path. + Browse:\nBrowse for a folder to set as the save data path. + + + Release + Release + + + Nightly + Nightly + + + Set the volume of the background music. + Set the volume of the background music. + + + Enable Motion Controls + Enable Motion Controls + + + Save Data Path + Save Data Path + + + Browse + Browse + + + async + async + + + sync + sync + + + Auto Select + Auto Select + + + Directory to install games + Directory to install games + + + Directory to save data + Directory to save data + + + Video + Video + + + Display Mode + Display Mode + + + Windowed + Windowed + + + Fullscreen + Fullscreen + + + Fullscreen (Borderless) + Fullscreen (Borderless) + + + Window Size + Window Size + + + W: + W: + + + H: + H: + + + Separate Log Files + Separate Log Files + + + Separate Log Files:\nWrites a separate logfile for each game. + Separate Log Files:\nWrites a separate logfile for each game. + + + Trophy Notification Position + Trophy Notification Position + + + Left + Left + + + Right + Right + + + Top + Top + + + Bottom + Bottom + + + Notification Duration + Notification Duration + + + Portable User Folder + Portable User Folder + + + Create Portable User Folder from Common User Folder + Create Portable User Folder from Common User Folder + + + Portable user folder:\nStores shadPS4 settings and data that will be applied only to the shadPS4 build located in the current folder. Restart the app after creating the portable user folder to begin using it. + Portable user folder:\nStores shadPS4 settings and data that will be applied only to the shadPS4 build located in the current folder. Restart the app after creating the portable user folder to begin using it. + + + Cannot create portable user folder + Cannot create portable user folder + + + %1 already exists + %1 already exists + + + Portable user folder created + Portable user folder created + + + %1 successfully created. + %1 successfully created. + + + Open the custom trophy images/sounds folder:\nYou can add custom images to the trophies and an audio.\nAdd the files to custom_trophy with the following names:\ntrophy.wav OR trophy.mp3, bronze.png, gold.png, platinum.png, silver.png\nNote: The sound will only work in QT versions. + Open the custom trophy images/sounds folder:\nYou can add custom images to the trophies and an audio.\nAdd the files to custom_trophy with the following names:\ntrophy.wav OR trophy.mp3, bronze.png, gold.png, platinum.png, silver.png\nNote: The sound will only work in QT versions. + + + + TrophyViewer + + Trophy Viewer + Trophy Viewer + + + Select Game: + Select Game: + + + Progress + Progress + + + Show Earned Trophies + Show Earned Trophies + + + Show Not Earned Trophies + Show Not Earned Trophies + + + Show Hidden Trophies + Show Hidden Trophies + + + diff --git a/src/qt_gui/trophy_viewer.cpp b/src/qt_gui/trophy_viewer.cpp index 49fb993eb..bed487605 100644 --- a/src/qt_gui/trophy_viewer.cpp +++ b/src/qt_gui/trophy_viewer.cpp @@ -1,23 +1,267 @@ // SPDX-FileCopyrightText: Copyright 2024 shadPS4 Emulator Project // SPDX-License-Identifier: GPL-2.0-or-later +#include +#include +#include +#include +#include +#include +#include #include "common/path_util.h" +#include "main_window_themes.h" #include "trophy_viewer.h" -TrophyViewer::TrophyViewer(QString trophyPath, QString gameTrpPath) : QMainWindow() { - this->setWindowTitle(tr("Trophy Viewer")); +namespace fs = std::filesystem; + +CMRC_DECLARE(res); + +// true: European format; false: American format +bool useEuropeanDateFormat = true; + +void TrophyViewer::updateTrophyInfo() { + int total = 0; + int unlocked = 0; + + // Cycles through each tab (table) of the QTabWidget + for (int i = 0; i < tabWidget->count(); i++) { + QTableWidget* table = qobject_cast(tabWidget->widget(i)); + if (table) { + total += table->rowCount(); + for (int row = 0; row < table->rowCount(); ++row) { + QString cellText; + // The "Unlocked" column can be a widget or a simple item + QWidget* widget = table->cellWidget(row, 0); + if (widget) { + // Looks for the QLabel inside the widget (as defined in SetTableItem) + QLabel* label = widget->findChild(); + if (label) { + cellText = label->text(); + } + } else { + QTableWidgetItem* item = table->item(row, 0); + if (item) { + cellText = item->text(); + } + } + if (cellText == "unlocked") + unlocked++; + } + } + } + int progress = (total > 0) ? (unlocked * 100 / total) : 0; + trophyInfoLabel->setText( + QString(tr("Progress") + ": %1% (%2/%3)").arg(progress).arg(unlocked).arg(total)); +} + +void TrophyViewer::updateTableFilters() { + bool showEarned = showEarnedCheck->isChecked(); + bool showNotEarned = showNotEarnedCheck->isChecked(); + bool showHidden = showHiddenCheck->isChecked(); + + // Cycles through each tab of the QTabWidget + for (int i = 0; i < tabWidget->count(); ++i) { + QTableWidget* table = qobject_cast(tabWidget->widget(i)); + if (!table) + continue; + for (int row = 0; row < table->rowCount(); ++row) { + QString unlockedText; + // Gets the text of the "Unlocked" column (index 0) + QWidget* widget = table->cellWidget(row, 0); + if (widget) { + QLabel* label = widget->findChild(); + if (label) + unlockedText = label->text(); + } else { + QTableWidgetItem* item = table->item(row, 0); + if (item) + unlockedText = item->text(); + } + + QString hiddenText; + // Gets the text of the "Hidden" column (index 7) + QWidget* hiddenWidget = table->cellWidget(row, 7); + if (hiddenWidget) { + QLabel* label = hiddenWidget->findChild(); + if (label) + hiddenText = label->text(); + } else { + QTableWidgetItem* item = table->item(row, 7); + if (item) + hiddenText = item->text(); + } + + bool visible = true; + if (unlockedText == "unlocked" && !showEarned) + visible = false; + if (unlockedText == "locked" && !showNotEarned) + visible = false; + if (hiddenText.toLower() == "yes" && !showHidden) + visible = false; + + table->setRowHidden(row, !visible); + } + } +} + +TrophyViewer::TrophyViewer(QString trophyPath, QString gameTrpPath, QString gameName, + const QVector& allTrophyGames) + : QMainWindow(), allTrophyGames_(allTrophyGames), currentGameName_(gameName) { + this->setWindowTitle(tr("Trophy Viewer") + " - " + currentGameName_); this->setAttribute(Qt::WA_DeleteOnClose); tabWidget = new QTabWidget(this); + + auto lan = Config::getEmulatorLanguage(); + if (lan == "en_US" || lan == "zh_CN" || lan == "zh_TW" || lan == "ja_JP" || lan == "ko_KR" || + lan == "lt_LT" || lan == "nb_NO" || lan == "nl_NL") { + useEuropeanDateFormat = false; + } + gameTrpPath_ = gameTrpPath; headers << "Unlocked" << "Trophy" << "Name" << "Description" + << "Time Unlocked" + << "Type" << "ID" << "Hidden" - << "Type" << "PID"; PopulateTrophyWidget(trophyPath); + + trophyInfoDock = new QDockWidget("", this); + QWidget* dockWidget = new QWidget(trophyInfoDock); + QVBoxLayout* dockLayout = new QVBoxLayout(dockWidget); + dockLayout->setAlignment(Qt::AlignTop); + + // ComboBox for game selection + if (!allTrophyGames_.isEmpty()) { + QLabel* gameSelectionLabel = new QLabel(tr("Select Game:"), dockWidget); + dockLayout->addWidget(gameSelectionLabel); + + gameSelectionComboBox = new QComboBox(dockWidget); + for (const auto& game : allTrophyGames_) { + gameSelectionComboBox->addItem(game.name); + } + + // Select current game in ComboBox + if (!currentGameName_.isEmpty()) { + int index = gameSelectionComboBox->findText(currentGameName_); + if (index >= 0) { + gameSelectionComboBox->setCurrentIndex(index); + } + } + + dockLayout->addWidget(gameSelectionComboBox); + + connect(gameSelectionComboBox, QOverload::of(&QComboBox::currentIndexChanged), this, + &TrophyViewer::onGameSelectionChanged); + + QFrame* line = new QFrame(dockWidget); + line->setFrameShape(QFrame::HLine); + line->setFrameShadow(QFrame::Sunken); + dockLayout->addWidget(line); + } + + trophyInfoLabel = new QLabel(tr("Progress") + ": 0% (0/0)", dockWidget); + trophyInfoLabel->setStyleSheet( + "font-weight: bold; font-size: 16px; color: white; background: #333; padding: 5px;"); + dockLayout->addWidget(trophyInfoLabel); + + // Creates QCheckBox to filter trophies + showEarnedCheck = new QCheckBox(tr("Show Earned Trophies"), dockWidget); + showNotEarnedCheck = new QCheckBox(tr("Show Not Earned Trophies"), dockWidget); + showHiddenCheck = new QCheckBox(tr("Show Hidden Trophies"), dockWidget); + + // Defines the initial states (all checked) + showEarnedCheck->setChecked(true); + showNotEarnedCheck->setChecked(true); + showHiddenCheck->setChecked(false); + + // Adds checkboxes to the layout + dockLayout->addWidget(showEarnedCheck); + dockLayout->addWidget(showNotEarnedCheck); + dockLayout->addWidget(showHiddenCheck); + + dockWidget->setLayout(dockLayout); + trophyInfoDock->setWidget(dockWidget); + + // Adds the dock to the left area + this->addDockWidget(Qt::LeftDockWidgetArea, trophyInfoDock); + + expandButton = new QPushButton(">>", this); + expandButton->setGeometry(80, 0, 27, 27); + expandButton->hide(); + + connect(expandButton, &QPushButton::clicked, this, [this] { + trophyInfoDock->setVisible(true); + expandButton->hide(); + }); + + // Connects checkbox signals to update trophy display +#if (QT_VERSION < QT_VERSION_CHECK(6, 7, 0)) + connect(showEarnedCheck, &QCheckBox::stateChanged, this, &TrophyViewer::updateTableFilters); + connect(showNotEarnedCheck, &QCheckBox::stateChanged, this, &TrophyViewer::updateTableFilters); + connect(showHiddenCheck, &QCheckBox::stateChanged, this, &TrophyViewer::updateTableFilters); +#else + connect(showEarnedCheck, &QCheckBox::checkStateChanged, this, + &TrophyViewer::updateTableFilters); + connect(showNotEarnedCheck, &QCheckBox::checkStateChanged, this, + &TrophyViewer::updateTableFilters); + connect(showHiddenCheck, &QCheckBox::checkStateChanged, this, + &TrophyViewer::updateTableFilters); +#endif + + updateTrophyInfo(); + updateTableFilters(); + + connect(trophyInfoDock, &QDockWidget::topLevelChanged, this, [this] { + if (!trophyInfoDock->isVisible()) { + expandButton->show(); + } + }); + + connect(trophyInfoDock, &QDockWidget::visibilityChanged, this, [this] { + if (!trophyInfoDock->isVisible()) { + expandButton->show(); + } else { + expandButton->hide(); + } + }); +} + +void TrophyViewer::onGameSelectionChanged(int index) { + if (index < 0 || index >= allTrophyGames_.size()) { + return; + } + + while (tabWidget->count() > 0) { + QWidget* widget = tabWidget->widget(0); + tabWidget->removeTab(0); + delete widget; + } + + const TrophyGameInfo& selectedGame = allTrophyGames_[index]; + currentGameName_ = selectedGame.name; + gameTrpPath_ = selectedGame.gameTrpPath; + + this->setWindowTitle(tr("Trophy Viewer") + " - " + currentGameName_); + + PopulateTrophyWidget(selectedGame.trophyPath); + + updateTrophyInfo(); + updateTableFilters(); +} + +void TrophyViewer::onDockClosed() { + if (!trophyInfoDock->isVisible()) { + reopenButton->setVisible(true); + } +} + +void TrophyViewer::reopenLeftDock() { + trophyInfoDock->show(); + reopenButton->setVisible(false); } void TrophyViewer::PopulateTrophyWidget(QString title) { @@ -29,8 +273,13 @@ void TrophyViewer::PopulateTrophyWidget(QString title) { QDir dir(trophyDirQt); if (!dir.exists()) { std::filesystem::path path = Common::FS::PathFromQString(gameTrpPath_); - if (!trp.Extract(path, title.toStdString())) + if (!trp.Extract(path, title.toStdString())) { + QMessageBox::critical(this, "Trophy Data Extraction Error", + "Unable to extract Trophy data, please ensure you have " + "inputted a trophy key in the settings menu."); + QWidget::close(); return; + } } QFileInfoList dirList = dir.entryInfoList(QDir::Dirs | QDir::NoDotAndDotDot); if (dirList.isEmpty()) @@ -59,6 +308,7 @@ void TrophyViewer::PopulateTrophyWidget(QString title) { QStringList trpPid; QStringList trophyNames; QStringList trophyDetails; + QStringList trpTimeUnlocked; QString xmlPath = trpDir + "/Xml/TROP.XML"; QFile file(xmlPath); @@ -75,14 +325,35 @@ void TrophyViewer::PopulateTrophyWidget(QString title) { trpHidden.append(reader.attributes().value("hidden").toString()); trpType.append(reader.attributes().value("ttype").toString()); trpPid.append(reader.attributes().value("pid").toString()); + if (reader.attributes().hasAttribute("unlockstate")) { if (reader.attributes().value("unlockstate").toString() == "true") { trpUnlocked.append("unlocked"); } else { trpUnlocked.append("locked"); } + if (reader.attributes().hasAttribute("timestamp")) { + QString ts = reader.attributes().value("timestamp").toString(); + if (ts.length() > 10) + trpTimeUnlocked.append("unknown"); + else { + bool ok; + qint64 timestampInt = ts.toLongLong(&ok); + if (ok) { + QDateTime dt = QDateTime::fromSecsSinceEpoch(timestampInt); + QString format = useEuropeanDateFormat ? "dd/MM/yyyy HH:mm:ss" + : "MM/dd/yyyy HH:mm:ss"; + trpTimeUnlocked.append(dt.toString(format)); + } else { + trpTimeUnlocked.append("unknown"); + } + } + } else { + trpTimeUnlocked.append(""); + } } else { trpUnlocked.append("locked"); + trpTimeUnlocked.append(""); } } @@ -96,7 +367,7 @@ void TrophyViewer::PopulateTrophyWidget(QString title) { } QTableWidget* tableWidget = new QTableWidget(this); tableWidget->setShowGrid(false); - tableWidget->setColumnCount(8); + tableWidget->setColumnCount(9); tableWidget->setHorizontalHeaderLabels(headers); tableWidget->setSelectionBehavior(QAbstractItemView::SelectRows); tableWidget->setSelectionMode(QAbstractItemView::SingleSelection); @@ -104,56 +375,101 @@ void TrophyViewer::PopulateTrophyWidget(QString title) { tableWidget->horizontalHeader()->setStretchLastSection(true); tableWidget->verticalHeader()->setVisible(false); tableWidget->setRowCount(icons.size()); + tableWidget->setSortingEnabled(true); + for (int row = 0; auto& icon : icons) { QTableWidgetItem* item = new QTableWidgetItem(); item->setData(Qt::DecorationRole, icon); item->setFlags(item->flags() & ~Qt::ItemIsEditable); tableWidget->setItem(row, 1, item); + + const std::string filename = GetTrpType(trpType[row].at(0)); + QTableWidgetItem* typeitem = new QTableWidgetItem(); + + const auto CustomTrophy_Dir = + Common::FS::GetUserPath(Common::FS::PathType::CustomTrophy); + std::string customPath; + + if (fs::exists(CustomTrophy_Dir / filename)) { + customPath = (CustomTrophy_Dir / filename).string(); + } + + std::vector imgdata; + + if (!customPath.empty()) { + std::ifstream file(customPath, std::ios::binary); + if (file) { + imgdata = std::vector(std::istreambuf_iterator(file), + std::istreambuf_iterator()); + } + } else { + auto resource = cmrc::res::get_filesystem(); + std::string resourceString = "src/images/" + filename; + auto file = resource.open(resourceString); + imgdata = std::vector(file.begin(), file.end()); + } + + QImage type_icon = QImage::fromData(imgdata).scaled( + QSize(100, 100), Qt::KeepAspectRatio, Qt::SmoothTransformation); + typeitem->setData(Qt::DecorationRole, type_icon); + typeitem->setFlags(typeitem->flags() & ~Qt::ItemIsEditable); + tableWidget->setItem(row, 5, typeitem); + + std::string detailString = trophyDetails[row].toStdString(); + std::size_t newline_pos = 0; + while ((newline_pos = detailString.find("\n", newline_pos)) != std::string::npos) { + detailString.replace(newline_pos, 1, " "); + ++newline_pos; + } + if (!trophyNames.isEmpty() && !trophyDetails.isEmpty()) { SetTableItem(tableWidget, row, 0, trpUnlocked[row]); SetTableItem(tableWidget, row, 2, trophyNames[row]); - SetTableItem(tableWidget, row, 3, trophyDetails[row]); - SetTableItem(tableWidget, row, 4, trpId[row]); - SetTableItem(tableWidget, row, 5, trpHidden[row]); - SetTableItem(tableWidget, row, 6, GetTrpType(trpType[row].at(0))); - SetTableItem(tableWidget, row, 7, trpPid[row]); + SetTableItem(tableWidget, row, 3, QString::fromStdString(detailString)); + SetTableItem(tableWidget, row, 4, trpTimeUnlocked[row]); + SetTableItem(tableWidget, row, 6, trpId[row]); + SetTableItem(tableWidget, row, 7, trpHidden[row]); + SetTableItem(tableWidget, row, 8, trpPid[row]); } tableWidget->verticalHeader()->resizeSection(row, icon.height()); row++; } tableWidget->horizontalHeader()->setSectionResizeMode(QHeaderView::ResizeToContents); int width = 16; - for (int i = 0; i < 8; i++) { + for (int i = 0; i < 9; i++) { width += tableWidget->horizontalHeader()->sectionSize(i); } tableWidget->resize(width, 720); tabWidget->addTab(tableWidget, tabName.insert(6, " ").replace(0, 1, tabName.at(0).toUpper())); - this->resize(width + 20, 720); + + if (!this->isMaximized()) { + this->resize(width + 400, 720); + QSize mainWindowSize = QApplication::activeWindow()->size(); + this->resize(mainWindowSize.width() * 0.8, mainWindowSize.height() * 0.8); + } + this->show(); + + tableWidget->horizontalHeader()->setSectionResizeMode(3, QHeaderView::Fixed); + tableWidget->setColumnWidth(3, 500); } this->setCentralWidget(tabWidget); } void TrophyViewer::SetTableItem(QTableWidget* parent, int row, int column, QString str) { - QWidget* widget = new QWidget(); - QVBoxLayout* layout = new QVBoxLayout(); - QLabel* label = new QLabel(str); - QTableWidgetItem* item = new QTableWidgetItem(); - label->setWordWrap(true); - label->setStyleSheet("color: white; font-size: 15px; font-weight: bold;"); + QTableWidgetItem* item = new QTableWidgetItem(str); - // Create shadow effect - QGraphicsDropShadowEffect* shadowEffect = new QGraphicsDropShadowEffect(); - shadowEffect->setBlurRadius(5); // Set the blur radius of the shadow - shadowEffect->setColor(QColor(0, 0, 0, 160)); // Set the color and opacity of the shadow - shadowEffect->setOffset(2, 2); // Set the offset of the shadow + if (column != 1 && column != 2 && column != 3) + item->setTextAlignment(Qt::AlignCenter); + item->setFont(QFont("Arial", 12, QFont::Bold)); - label->setGraphicsEffect(shadowEffect); // Apply shadow effect to the QLabel + Theme theme = static_cast(Config::getMainWindowTheme()); + + if (theme == Theme::Light) { + item->setForeground(QBrush(Qt::black)); + } else { + item->setForeground(QBrush(Qt::white)); + } - layout->addWidget(label); - if (column != 1 && column != 2) - layout->setAlignment(Qt::AlignCenter); - widget->setLayout(layout); parent->setItem(row, column, item); - parent->setCellWidget(row, column, widget); } diff --git a/src/qt_gui/trophy_viewer.h b/src/qt_gui/trophy_viewer.h index 81b9b1adc..c63171774 100644 --- a/src/qt_gui/trophy_viewer.h +++ b/src/qt_gui/trophy_viewer.h @@ -4,24 +4,46 @@ #pragma once #include +#include +#include #include +#include #include #include #include #include #include +#include +#include #include #include #include +#include #include #include "common/types.h" #include "core/file_format/trp.h" +struct TrophyGameInfo { + QString name; + QString trophyPath; + QString gameTrpPath; +}; + class TrophyViewer : public QMainWindow { Q_OBJECT public: - explicit TrophyViewer(QString trophyPath, QString gameTrpPath); + explicit TrophyViewer( + QString trophyPath, QString gameTrpPath, QString gameName = "", + const QVector& allTrophyGames = QVector()); + + void updateTrophyInfo(); + void updateTableFilters(); + void onDockClosed(); + void reopenLeftDock(); + +private slots: + void onGameSelectionChanged(int index); private: void PopulateTrophyWidget(QString title); @@ -30,19 +52,29 @@ private: QTabWidget* tabWidget = nullptr; QStringList headers; QString gameTrpPath_; + QString currentGameName_; TRP trp; + QLabel* trophyInfoLabel; + QCheckBox* showEarnedCheck; + QCheckBox* showNotEarnedCheck; + QCheckBox* showHiddenCheck; + QComboBox* gameSelectionComboBox; + QPushButton* expandButton; + QDockWidget* trophyInfoDock; + QPushButton* reopenButton; + QVector allTrophyGames_; - QString GetTrpType(const QChar trp_) { + std::string GetTrpType(const QChar trp_) { switch (trp_.toLatin1()) { case 'B': - return "Bronze"; + return "bronze.png"; case 'S': - return "Silver"; + return "silver.png"; case 'G': - return "Gold"; + return "gold.png"; case 'P': - return "Platinum"; + return "platinum.png"; } return "Unknown"; } -}; \ No newline at end of file +}; diff --git a/src/sdl_window.cpp b/src/sdl_window.cpp index d694b0939..fcdde7240 100644 --- a/src/sdl_window.cpp +++ b/src/sdl_window.cpp @@ -1,66 +1,255 @@ // SPDX-FileCopyrightText: Copyright 2024 shadPS4 Emulator Project // SPDX-License-Identifier: GPL-2.0-or-later -#include -#include -#include -#include -#include -#include - +#include "SDL3/SDL_events.h" +#include "SDL3/SDL_hints.h" +#include "SDL3/SDL_init.h" +#include "SDL3/SDL_properties.h" +#include "SDL3/SDL_timer.h" +#include "SDL3/SDL_video.h" #include "common/assert.h" #include "common/config.h" +#include "common/elf_info.h" +#include "common/version.h" +#include "core/debug_state.h" +#include "core/libraries/kernel/time.h" #include "core/libraries/pad/pad.h" #include "imgui/renderer/imgui_core.h" #include "input/controller.h" +#include "input/input_handler.h" +#include "input/input_mouse.h" #include "sdl_window.h" #include "video_core/renderdoc.h" #ifdef __APPLE__ -#include +#include "SDL3/SDL_metal.h" #endif +namespace Input { + +using Libraries::Pad::OrbisPadButtonDataOffset; + +static OrbisPadButtonDataOffset SDLGamepadToOrbisButton(u8 button) { + using OPBDO = OrbisPadButtonDataOffset; + + switch (button) { + case SDL_GAMEPAD_BUTTON_DPAD_DOWN: + return OPBDO::Down; + case SDL_GAMEPAD_BUTTON_DPAD_UP: + return OPBDO::Up; + case SDL_GAMEPAD_BUTTON_DPAD_LEFT: + return OPBDO::Left; + case SDL_GAMEPAD_BUTTON_DPAD_RIGHT: + return OPBDO::Right; + case SDL_GAMEPAD_BUTTON_SOUTH: + return OPBDO::Cross; + case SDL_GAMEPAD_BUTTON_NORTH: + return OPBDO::Triangle; + case SDL_GAMEPAD_BUTTON_WEST: + return OPBDO::Square; + case SDL_GAMEPAD_BUTTON_EAST: + return OPBDO::Circle; + case SDL_GAMEPAD_BUTTON_START: + return OPBDO::Options; + case SDL_GAMEPAD_BUTTON_TOUCHPAD: + return OPBDO::TouchPad; + case SDL_GAMEPAD_BUTTON_BACK: + return OPBDO::TouchPad; + case SDL_GAMEPAD_BUTTON_LEFT_SHOULDER: + return OPBDO::L1; + case SDL_GAMEPAD_BUTTON_RIGHT_SHOULDER: + return OPBDO::R1; + case SDL_GAMEPAD_BUTTON_LEFT_STICK: + return OPBDO::L3; + case SDL_GAMEPAD_BUTTON_RIGHT_STICK: + return OPBDO::R3; + default: + return OPBDO::None; + } +} + +static SDL_GamepadAxis InputAxisToSDL(Axis axis) { + switch (axis) { + case Axis::LeftX: + return SDL_GAMEPAD_AXIS_LEFTX; + case Axis::LeftY: + return SDL_GAMEPAD_AXIS_LEFTY; + case Axis::RightX: + return SDL_GAMEPAD_AXIS_RIGHTX; + case Axis::RightY: + return SDL_GAMEPAD_AXIS_RIGHTY; + case Axis::TriggerLeft: + return SDL_GAMEPAD_AXIS_LEFT_TRIGGER; + case Axis::TriggerRight: + return SDL_GAMEPAD_AXIS_RIGHT_TRIGGER; + default: + UNREACHABLE(); + } +} + +SDLInputEngine::~SDLInputEngine() { + if (m_gamepad) { + SDL_CloseGamepad(m_gamepad); + } +} + +void SDLInputEngine::Init() { + if (m_gamepad) { + SDL_CloseGamepad(m_gamepad); + m_gamepad = nullptr; + } + + int gamepad_count; + SDL_JoystickID* gamepads = SDL_GetGamepads(&gamepad_count); + if (!gamepads) { + LOG_ERROR(Input, "Cannot get gamepad list: {}", SDL_GetError()); + return; + } + if (gamepad_count == 0) { + LOG_INFO(Input, "No gamepad found!"); + SDL_free(gamepads); + return; + } + + LOG_INFO(Input, "Got {} gamepads. Opening the first one.", gamepad_count); + m_gamepad = SDL_OpenGamepad(gamepads[0]); + if (!m_gamepad) { + LOG_ERROR(Input, "Failed to open gamepad 0: {}", SDL_GetError()); + SDL_free(gamepads); + return; + } + + SDL_Joystick* joystick = SDL_GetGamepadJoystick(m_gamepad); + Uint16 vendor = SDL_GetJoystickVendor(joystick); + Uint16 product = SDL_GetJoystickProduct(joystick); + + bool isDualSense = (vendor == 0x054C && product == 0x0CE6); + + LOG_INFO(Input, "Gamepad Vendor: {:04X}, Product: {:04X}", vendor, product); + if (isDualSense) { + LOG_INFO(Input, "Detected DualSense Controller"); + } + + if (Config::getIsMotionControlsEnabled()) { + if (SDL_SetGamepadSensorEnabled(m_gamepad, SDL_SENSOR_GYRO, true)) { + m_gyro_poll_rate = SDL_GetGamepadSensorDataRate(m_gamepad, SDL_SENSOR_GYRO); + LOG_INFO(Input, "Gyro initialized, poll rate: {}", m_gyro_poll_rate); + } else { + LOG_ERROR(Input, "Failed to initialize gyro controls for gamepad, error: {}", + SDL_GetError()); + SDL_SetGamepadSensorEnabled(m_gamepad, SDL_SENSOR_GYRO, false); + } + if (SDL_SetGamepadSensorEnabled(m_gamepad, SDL_SENSOR_ACCEL, true)) { + m_accel_poll_rate = SDL_GetGamepadSensorDataRate(m_gamepad, SDL_SENSOR_ACCEL); + LOG_INFO(Input, "Accel initialized, poll rate: {}", m_accel_poll_rate); + } else { + LOG_ERROR(Input, "Failed to initialize accel controls for gamepad, error: {}", + SDL_GetError()); + SDL_SetGamepadSensorEnabled(m_gamepad, SDL_SENSOR_ACCEL, false); + } + } + + SDL_free(gamepads); + + int* rgb = Config::GetControllerCustomColor(); + + if (isDualSense) { + if (SDL_SetJoystickLED(joystick, rgb[0], rgb[1], rgb[2]) == 0) { + LOG_INFO(Input, "Set DualSense LED to R:{} G:{} B:{}", rgb[0], rgb[1], rgb[2]); + } else { + LOG_ERROR(Input, "Failed to set DualSense LED: {}", SDL_GetError()); + } + } else { + SetLightBarRGB(rgb[0], rgb[1], rgb[2]); + } +} + +void SDLInputEngine::SetLightBarRGB(u8 r, u8 g, u8 b) { + if (m_gamepad) { + SDL_SetGamepadLED(m_gamepad, r, g, b); + } +} + +void SDLInputEngine::SetVibration(u8 smallMotor, u8 largeMotor) { + if (m_gamepad) { + const auto low_freq = (smallMotor / 255.0f) * 0xFFFF; + const auto high_freq = (largeMotor / 255.0f) * 0xFFFF; + SDL_RumbleGamepad(m_gamepad, low_freq, high_freq, -1); + } +} + +State SDLInputEngine::ReadState() { + State state{}; + state.time = Libraries::Kernel::sceKernelGetProcessTime(); + + // Buttons + for (u8 i = 0; i < SDL_GAMEPAD_BUTTON_COUNT; ++i) { + auto orbisButton = SDLGamepadToOrbisButton(i); + if (orbisButton == OrbisPadButtonDataOffset::None) { + continue; + } + state.OnButton(orbisButton, SDL_GetGamepadButton(m_gamepad, (SDL_GamepadButton)i)); + } + + // Axes + for (int i = 0; i < static_cast(Axis::AxisMax); ++i) { + const auto axis = static_cast(i); + const auto value = SDL_GetGamepadAxis(m_gamepad, InputAxisToSDL(axis)); + switch (axis) { + case Axis::TriggerLeft: + case Axis::TriggerRight: + state.OnAxis(axis, GetAxis(0, 0x8000, value)); + break; + default: + state.OnAxis(axis, GetAxis(-0x8000, 0x8000, value)); + break; + } + } + + // Touchpad + if (SDL_GetNumGamepadTouchpads(m_gamepad) > 0) { + for (int finger = 0; finger < 2; ++finger) { + bool down; + float x, y; + if (SDL_GetGamepadTouchpadFinger(m_gamepad, 0, finger, &down, &x, &y, NULL)) { + state.OnTouchpad(finger, down, x, y); + } + } + } + + // Gyro + if (SDL_GamepadHasSensor(m_gamepad, SDL_SENSOR_GYRO)) { + float gyro[3]; + if (SDL_GetGamepadSensorData(m_gamepad, SDL_SENSOR_GYRO, gyro, 3)) { + state.OnGyro(gyro); + } + } + + // Accel + if (SDL_GamepadHasSensor(m_gamepad, SDL_SENSOR_ACCEL)) { + float accel[3]; + if (SDL_GetGamepadSensorData(m_gamepad, SDL_SENSOR_ACCEL, accel, 3)) { + state.OnAccel(accel); + } + } + + return state; +} + +float SDLInputEngine::GetGyroPollRate() const { + return m_gyro_poll_rate; +} + +float SDLInputEngine::GetAccelPollRate() const { + return m_accel_poll_rate; +} + +} // namespace Input + namespace Frontend { using namespace Libraries::Pad; -static OrbisPadButtonDataOffset SDLGamepadToOrbisButton(u8 button) { - switch (button) { - case SDL_GAMEPAD_BUTTON_DPAD_DOWN: - return OrbisPadButtonDataOffset::Down; - case SDL_GAMEPAD_BUTTON_DPAD_UP: - return OrbisPadButtonDataOffset::Up; - case SDL_GAMEPAD_BUTTON_DPAD_LEFT: - return OrbisPadButtonDataOffset::Left; - case SDL_GAMEPAD_BUTTON_DPAD_RIGHT: - return OrbisPadButtonDataOffset::Right; - case SDL_GAMEPAD_BUTTON_SOUTH: - return OrbisPadButtonDataOffset::Cross; - case SDL_GAMEPAD_BUTTON_NORTH: - return OrbisPadButtonDataOffset::Triangle; - case SDL_GAMEPAD_BUTTON_WEST: - return OrbisPadButtonDataOffset::Square; - case SDL_GAMEPAD_BUTTON_EAST: - return OrbisPadButtonDataOffset::Circle; - case SDL_GAMEPAD_BUTTON_START: - return OrbisPadButtonDataOffset::Options; - case SDL_GAMEPAD_BUTTON_TOUCHPAD: - return OrbisPadButtonDataOffset::TouchPad; - case SDL_GAMEPAD_BUTTON_BACK: - return OrbisPadButtonDataOffset::TouchPad; - case SDL_GAMEPAD_BUTTON_LEFT_SHOULDER: - return OrbisPadButtonDataOffset::L1; - case SDL_GAMEPAD_BUTTON_RIGHT_SHOULDER: - return OrbisPadButtonDataOffset::R1; - case SDL_GAMEPAD_BUTTON_LEFT_STICK: - return OrbisPadButtonDataOffset::L3; - case SDL_GAMEPAD_BUTTON_RIGHT_STICK: - return OrbisPadButtonDataOffset::R3; - default: - return OrbisPadButtonDataOffset::None; - } -} - static Uint32 SDLCALL PollController(void* userdata, SDL_TimerID timer_id, Uint32 interval) { auto* controller = reinterpret_cast(userdata); return controller->Poll(); @@ -93,10 +282,26 @@ WindowSDL::WindowSDL(s32 width_, s32 height_, Input::GameController* controller_ } SDL_SetWindowMinimumSize(window, 640, 360); - SDL_SetWindowFullscreen(window, Config::isFullscreenMode()); + + bool error = false; + const SDL_DisplayID displayIndex = SDL_GetDisplayForWindow(window); + if (displayIndex < 0) { + LOG_ERROR(Frontend, "Error getting display index: {}", SDL_GetError()); + error = true; + } + const SDL_DisplayMode* displayMode; + if ((displayMode = SDL_GetCurrentDisplayMode(displayIndex)) == 0) { + LOG_ERROR(Frontend, "Error getting display mode: {}", SDL_GetError()); + error = true; + } + if (!error) { + SDL_SetWindowFullscreenMode( + window, Config::getFullscreenMode() == "Fullscreen" ? displayMode : NULL); + } + SDL_SetWindowFullscreen(window, Config::getIsFullscreen()); SDL_InitSubSystem(SDL_INIT_GAMEPAD); - controller->TryOpenSDLController(); + controller->SetEngine(std::make_unique()); #if defined(SDL_PLATFORM_WIN32) window_info.type = WindowSystemType::Windows; @@ -120,6 +325,10 @@ WindowSDL::WindowSDL(s32 width_, s32 height_, Input::GameController* controller_ window_info.type = WindowSystemType::Metal; window_info.render_surface = SDL_Metal_GetLayer(SDL_Metal_CreateView(window)); #endif + // input handler init-s + Input::ControllerOutput::SetControllerOutputController(controller); + Input::ControllerOutput::LinkJoystickAxes(); + Input::ParseInputConfig(std::string(Common::ElfInfo::Instance().GameSerial())); } WindowSDL::~WindowSDL() = default; @@ -147,18 +356,28 @@ void WindowSDL::WaitEvent() { is_shown = event.type == SDL_EVENT_WINDOW_EXPOSED; OnResize(); break; + case SDL_EVENT_MOUSE_BUTTON_DOWN: + case SDL_EVENT_MOUSE_BUTTON_UP: + case SDL_EVENT_MOUSE_WHEEL: + case SDL_EVENT_MOUSE_WHEEL_OFF: case SDL_EVENT_KEY_DOWN: case SDL_EVENT_KEY_UP: - OnKeyPress(&event); + OnKeyboardMouseInput(&event); + break; + case SDL_EVENT_GAMEPAD_ADDED: + case SDL_EVENT_GAMEPAD_REMOVED: + controller->SetEngine(std::make_unique()); + 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: 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; // i really would have appreciated ANY KIND OF DOCUMENTATION ON THIS @@ -178,6 +397,25 @@ void WindowSDL::WaitEvent() { case SDL_EVENT_QUIT: is_open = false; break; + case SDL_EVENT_TOGGLE_FULLSCREEN: { + if (SDL_GetWindowFlags(window) & SDL_WINDOW_FULLSCREEN) { + SDL_SetWindowFullscreen(window, 0); + } else { + SDL_SetWindowFullscreen(window, SDL_WINDOW_FULLSCREEN); + } + break; + } + case SDL_EVENT_TOGGLE_PAUSE: + SDL_Log("Received SDL_EVENT_TOGGLE_PAUSE"); + + if (DebugState.IsGuestThreadsPaused()) { + SDL_Log("Game Resumed"); + DebugState.ResumeGuestThreads(); + } else { + SDL_Log("Game Paused"); + DebugState.PauseGuestThreads(); + } + break; default: break; } @@ -185,11 +423,14 @@ void WindowSDL::WaitEvent() { void WindowSDL::InitTimers() { SDL_AddTimer(100, &PollController, controller); + SDL_AddTimer(33, Input::MousePolling, (void*)controller); } void WindowSDL::RequestKeyboard() { if (keyboard_grab == 0) { - SDL_StartTextInput(window); + SDL_RunOnMainThread( + [](void* userdata) { SDL_StartTextInput(static_cast(userdata)); }, window, + true); } keyboard_grab++; } @@ -198,7 +439,9 @@ void WindowSDL::ReleaseKeyboard() { ASSERT(keyboard_grab > 0); keyboard_grab--; if (keyboard_grab == 0) { - SDL_StopTextInput(window); + SDL_RunOnMainThread( + [](void* userdata) { SDL_StopTextInput(static_cast(userdata)); }, window, + true); } } @@ -207,248 +450,87 @@ void WindowSDL::OnResize() { ImGui::Core::OnResize(); } -void WindowSDL::OnKeyPress(const SDL_Event* event) { -#ifdef __APPLE__ - // Use keys that are more friendly for keyboards without a keypad. - // Once there are key binding options this won't be necessary. - constexpr SDL_Keycode CrossKey = SDLK_N; - constexpr SDL_Keycode CircleKey = SDLK_B; - constexpr SDL_Keycode SquareKey = SDLK_V; - constexpr SDL_Keycode TriangleKey = SDLK_C; -#else - constexpr SDL_Keycode CrossKey = SDLK_KP_2; - constexpr SDL_Keycode CircleKey = SDLK_KP_6; - constexpr SDL_Keycode SquareKey = SDLK_KP_4; - constexpr SDL_Keycode TriangleKey = SDLK_KP_8; -#endif +Uint32 wheelOffCallback(void* og_event, Uint32 timer_id, Uint32 interval) { + SDL_Event off_event = *(SDL_Event*)og_event; + off_event.type = SDL_EVENT_MOUSE_WHEEL_OFF; + SDL_PushEvent(&off_event); + delete (SDL_Event*)og_event; + return 0; +} - auto button = OrbisPadButtonDataOffset::None; - Input::Axis axis = Input::Axis::AxisMax; - int axisvalue = 0; - int ax = 0; - std::string backButtonBehavior = Config::getBackButtonBehavior(); - switch (event->key.key) { - case SDLK_UP: - button = OrbisPadButtonDataOffset::Up; - break; - case SDLK_DOWN: - button = OrbisPadButtonDataOffset::Down; - break; - case SDLK_LEFT: - button = OrbisPadButtonDataOffset::Left; - break; - case SDLK_RIGHT: - button = OrbisPadButtonDataOffset::Right; - break; - case TriangleKey: - button = OrbisPadButtonDataOffset::Triangle; - break; - case CircleKey: - button = OrbisPadButtonDataOffset::Circle; - break; - case CrossKey: - button = OrbisPadButtonDataOffset::Cross; - break; - case SquareKey: - button = OrbisPadButtonDataOffset::Square; - break; - case SDLK_RETURN: - button = OrbisPadButtonDataOffset::Options; - break; - case SDLK_A: - axis = Input::Axis::LeftX; - if (event->type == SDL_EVENT_KEY_DOWN) { - axisvalue += -127; - } else { - axisvalue = 0; +void WindowSDL::OnKeyboardMouseInput(const SDL_Event* event) { + using Libraries::Pad::OrbisPadButtonDataOffset; + + // get the event's id, if it's keyup or keydown + const bool input_down = event->type == SDL_EVENT_KEY_DOWN || + event->type == SDL_EVENT_MOUSE_BUTTON_DOWN || + event->type == SDL_EVENT_MOUSE_WHEEL; + Input::InputEvent input_event = Input::InputBinding::GetInputEventFromSDLEvent(*event); + + // Handle window controls outside of the input maps + if (event->type == SDL_EVENT_KEY_DOWN) { + u32 input_id = input_event.input.sdl_id; + // Reparse kbm inputs + if (input_id == SDLK_F8) { + Input::ParseInputConfig(std::string(Common::ElfInfo::Instance().GameSerial())); + return; } - ax = Input::GetAxis(-0x80, 0x80, axisvalue); - break; - case SDLK_D: - axis = Input::Axis::LeftX; - if (event->type == SDL_EVENT_KEY_DOWN) { - axisvalue += 127; - } else { - axisvalue = 0; + // Toggle mouse capture and movement input + else if (input_id == SDLK_F7) { + Input::ToggleMouseEnabled(); + SDL_SetWindowRelativeMouseMode(this->GetSDLWindow(), + !SDL_GetWindowRelativeMouseMode(this->GetSDLWindow())); + return; } - ax = Input::GetAxis(-0x80, 0x80, axisvalue); - break; - case SDLK_W: - axis = Input::Axis::LeftY; - if (event->type == SDL_EVENT_KEY_DOWN) { - axisvalue += -127; - } else { - axisvalue = 0; + // Toggle fullscreen + else if (input_id == SDLK_F11) { + SDL_WindowFlags flag = SDL_GetWindowFlags(window); + bool is_fullscreen = flag & SDL_WINDOW_FULLSCREEN; + SDL_SetWindowFullscreen(window, !is_fullscreen); + return; } - ax = Input::GetAxis(-0x80, 0x80, axisvalue); - break; - case SDLK_S: - axis = Input::Axis::LeftY; - if (event->type == SDL_EVENT_KEY_DOWN) { - axisvalue += 127; - } else { - axisvalue = 0; - } - ax = Input::GetAxis(-0x80, 0x80, axisvalue); - break; - case SDLK_J: - axis = Input::Axis::RightX; - if (event->type == SDL_EVENT_KEY_DOWN) { - axisvalue += -127; - } else { - axisvalue = 0; - } - ax = Input::GetAxis(-0x80, 0x80, axisvalue); - break; - case SDLK_L: - axis = Input::Axis::RightX; - if (event->type == SDL_EVENT_KEY_DOWN) { - axisvalue += 127; - } else { - axisvalue = 0; - } - ax = Input::GetAxis(-0x80, 0x80, axisvalue); - break; - case SDLK_I: - axis = Input::Axis::RightY; - if (event->type == SDL_EVENT_KEY_DOWN) { - axisvalue += -127; - } else { - axisvalue = 0; - } - ax = Input::GetAxis(-0x80, 0x80, axisvalue); - break; - case SDLK_K: - axis = Input::Axis::RightY; - if (event->type == SDL_EVENT_KEY_DOWN) { - axisvalue += 127; - } else { - axisvalue = 0; - } - ax = Input::GetAxis(-0x80, 0x80, axisvalue); - break; - case SDLK_X: - button = OrbisPadButtonDataOffset::L3; - break; - case SDLK_M: - button = OrbisPadButtonDataOffset::R3; - break; - case SDLK_Q: - button = OrbisPadButtonDataOffset::L1; - break; - case SDLK_U: - button = OrbisPadButtonDataOffset::R1; - break; - case SDLK_E: - button = OrbisPadButtonDataOffset::L2; - axis = Input::Axis::TriggerLeft; - if (event->type == SDL_EVENT_KEY_DOWN) { - axisvalue += 255; - } else { - axisvalue = 0; - } - ax = Input::GetAxis(0, 0x80, axisvalue); - break; - case SDLK_O: - button = OrbisPadButtonDataOffset::R2; - axis = Input::Axis::TriggerRight; - if (event->type == SDL_EVENT_KEY_DOWN) { - axisvalue += 255; - } else { - axisvalue = 0; - } - ax = Input::GetAxis(0, 0x80, axisvalue); - break; - case SDLK_SPACE: - if (backButtonBehavior != "none") { - float x = backButtonBehavior == "left" ? 0.25f - : (backButtonBehavior == "right" ? 0.75f : 0.5f); - // trigger a touchpad event so that the touchpad emulation for back button works - controller->SetTouchpadState(0, true, x, 0.5f); - button = OrbisPadButtonDataOffset::TouchPad; - } else { - button = {}; - } - 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; - case SDLK_F12: - if (event->type == SDL_EVENT_KEY_DOWN) { - // Trigger rdoc capture + // Trigger rdoc capture + else if (input_id == SDLK_F12) { VideoCore::TriggerCapture(); + return; } - break; - default: - break; } - if (button != OrbisPadButtonDataOffset::None) { - controller->CheckButton(0, button, event->type == SDL_EVENT_KEY_DOWN); + + // if it's a wheel event, make a timer that turns it off after a set time + if (event->type == SDL_EVENT_MOUSE_WHEEL) { + const SDL_Event* copy = new SDL_Event(*event); + SDL_AddTimer(33, wheelOffCallback, (void*)copy); } - if (axis != Input::Axis::AxisMax) { - controller->Axis(0, axis, ax); + + // add/remove it from the list + bool inputs_changed = Input::UpdatePressedKeys(input_event); + + // update bindings + if (inputs_changed) { + Input::ActivateOutputsFromInputs(); } } void WindowSDL::OnGamepadEvent(const SDL_Event* event) { - auto button = OrbisPadButtonDataOffset::None; - 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); - if (button == OrbisPadButtonDataOffset::None) { - break; - } - if (event->gbutton.button != SDL_GAMEPAD_BUTTON_BACK) { - controller->CheckButton(0, button, event->type == SDL_EVENT_GAMEPAD_BUTTON_DOWN); - break; - } - const auto backButtonBehavior = Config::getBackButtonBehavior(); - if (backButtonBehavior != "none") { - float x = backButtonBehavior == "left" ? 0.25f - : (backButtonBehavior == "right" ? 0.75f : 0.5f); - // trigger a touchpad event so that the touchpad emulation for back button works - controller->SetTouchpadState(0, true, x, 0.5f); - controller->CheckButton(0, button, event->type == SDL_EVENT_GAMEPAD_BUTTON_DOWN); - } - break; - } - case SDL_EVENT_GAMEPAD_AXIS_MOTION: - axis = event->gaxis.axis == SDL_GAMEPAD_AXIS_LEFTX ? Input::Axis::LeftX - : event->gaxis.axis == SDL_GAMEPAD_AXIS_LEFTY ? Input::Axis::LeftY - : event->gaxis.axis == SDL_GAMEPAD_AXIS_RIGHTX ? Input::Axis::RightX - : event->gaxis.axis == SDL_GAMEPAD_AXIS_RIGHTY ? Input::Axis::RightY - : event->gaxis.axis == SDL_GAMEPAD_AXIS_LEFT_TRIGGER ? Input::Axis::TriggerLeft - : event->gaxis.axis == SDL_GAMEPAD_AXIS_RIGHT_TRIGGER ? Input::Axis::TriggerRight - : Input::Axis::AxisMax; - if (axis != Input::Axis::AxisMax) { - if (event->gaxis.axis == SDL_GAMEPAD_AXIS_LEFT_TRIGGER || - event->gaxis.axis == SDL_GAMEPAD_AXIS_RIGHT_TRIGGER) { - controller->Axis(0, axis, Input::GetAxis(0, 0x8000, event->gaxis.value)); - } else { - controller->Axis(0, axis, Input::GetAxis(-0x8000, 0x8000, event->gaxis.value)); - } - } - break; + bool input_down = event->type == SDL_EVENT_GAMEPAD_AXIS_MOTION || + event->type == SDL_EVENT_GAMEPAD_BUTTON_DOWN; + Input::InputEvent input_event = Input::InputBinding::GetInputEventFromSDLEvent(*event); + + // the touchpad button shouldn't be rebound to anything else, + // as it would break the entire touchpad handling + // You can still bind other things to it though + if (event->gbutton.button == SDL_GAMEPAD_BUTTON_TOUCHPAD) { + controller->CheckButton(0, OrbisPadButtonDataOffset::TouchPad, input_down); + return; + } + + // add/remove it from the list + bool inputs_changed = Input::UpdatePressedKeys(input_event); + + // update bindings + if (inputs_changed) { + Input::ActivateOutputsFromInputs(); } } diff --git a/src/sdl_window.h b/src/sdl_window.h index 78d4bbc39..48a9be58c 100644 --- a/src/sdl_window.h +++ b/src/sdl_window.h @@ -3,16 +3,37 @@ #pragma once -#include #include "common/types.h" +#include "core/libraries/pad/pad.h" +#include "input/controller.h" +#include "string" +#define SDL_EVENT_TOGGLE_FULLSCREEN (SDL_EVENT_USER + 1) +#define SDL_EVENT_TOGGLE_PAUSE (SDL_EVENT_USER + 2) struct SDL_Window; struct SDL_Gamepad; union SDL_Event; namespace Input { -class GameController; -} + +class SDLInputEngine : public Engine { +public: + ~SDLInputEngine() override; + void Init() override; + void SetLightBarRGB(u8 r, u8 g, u8 b) override; + void SetVibration(u8 smallMotor, u8 largeMotor) override; + float GetGyroPollRate() const override; + float GetAccelPollRate() const override; + State ReadState() override; + +private: + SDL_Gamepad* m_gamepad = nullptr; + + float m_gyro_poll_rate = 0.0f; + float m_accel_poll_rate = 0.0f; +}; + +} // namespace Input namespace Frontend { @@ -76,7 +97,7 @@ public: private: void OnResize(); - void OnKeyPress(const SDL_Event* event); + void OnKeyboardMouseInput(const SDL_Event* event); void OnGamepadEvent(const SDL_Event* event); private: diff --git a/src/shader_recompiler/backend/spirv/emit_spirv.cpp b/src/shader_recompiler/backend/spirv/emit_spirv.cpp index f0cf15af0..036df24d8 100644 --- a/src/shader_recompiler/backend/spirv/emit_spirv.cpp +++ b/src/shader_recompiler/backend/spirv/emit_spirv.cpp @@ -32,6 +32,8 @@ static constexpr spv::ExecutionMode GetInputPrimitiveType(AmdGpu::PrimitiveType return spv::ExecutionMode::Triangles; case AmdGpu::PrimitiveType::AdjTriangleList: return spv::ExecutionMode::InputTrianglesAdjacency; + case AmdGpu::PrimitiveType::AdjLineList: + return spv::ExecutionMode::InputLinesAdjacency; default: UNREACHABLE_MSG("Unknown input primitive type {}", u32(type)); } @@ -242,15 +244,18 @@ void SetupCapabilities(const Info& info, const Profile& profile, EmitContext& ct ctx.AddCapability(spv::Capability::Image1D); ctx.AddCapability(spv::Capability::Sampled1D); ctx.AddCapability(spv::Capability::ImageQuery); + ctx.AddCapability(spv::Capability::Int8); + ctx.AddCapability(spv::Capability::Int16); + ctx.AddCapability(spv::Capability::Int64); + ctx.AddCapability(spv::Capability::UniformAndStorageBuffer8BitAccess); + ctx.AddCapability(spv::Capability::UniformAndStorageBuffer16BitAccess); if (info.uses_fp16) { ctx.AddCapability(spv::Capability::Float16); - ctx.AddCapability(spv::Capability::Int16); } if (info.uses_fp64) { ctx.AddCapability(spv::Capability::Float64); } - ctx.AddCapability(spv::Capability::Int64); - if (info.has_storage_images || info.has_image_buffers) { + if (info.has_storage_images) { ctx.AddCapability(spv::Capability::StorageImageExtendedFormats); ctx.AddCapability(spv::Capability::StorageImageReadWithoutFormat); ctx.AddCapability(spv::Capability::StorageImageWriteWithoutFormat); @@ -259,12 +264,6 @@ void SetupCapabilities(const Info& info, const Profile& profile, EmitContext& ct ctx.AddCapability(spv::Capability::ImageReadWriteLodAMD); } } - if (info.has_texel_buffers) { - ctx.AddCapability(spv::Capability::SampledBuffer); - } - if (info.has_image_buffers) { - ctx.AddCapability(spv::Capability::ImageBuffer); - } if (info.has_image_gather) { ctx.AddCapability(spv::Capability::ImageGatherExtended); } @@ -372,7 +371,12 @@ void SetupFloatMode(EmitContext& ctx, const Profile& profile, const RuntimeInfo& LOG_WARNING(Render_Vulkan, "Unknown FP denorm mode {}", u32(fp_denorm_mode)); } const auto fp_round_mode = runtime_info.fp_round_mode32; - if (fp_round_mode != AmdGpu::FpRoundMode::NearestEven) { + if (fp_round_mode == AmdGpu::FpRoundMode::ToZero) { + if (profile.support_fp32_round_to_zero) { + ctx.AddCapability(spv::Capability::RoundingModeRTZ); + ctx.AddExecutionMode(main_func, spv::ExecutionMode::RoundingModeRTZ, 32U); + } + } else if (fp_round_mode != AmdGpu::FpRoundMode::NearestEven) { LOG_WARNING(Render_Vulkan, "Unknown FP rounding mode {}", u32(fp_round_mode)); } } diff --git a/src/shader_recompiler/backend/spirv/emit_spirv_atomic.cpp b/src/shader_recompiler/backend/spirv/emit_spirv_atomic.cpp index ce65a5ccb..4faa99fe8 100644 --- a/src/shader_recompiler/backend/spirv/emit_spirv_atomic.cpp +++ b/src/shader_recompiler/backend/spirv/emit_spirv_atomic.cpp @@ -21,14 +21,41 @@ Id SharedAtomicU32(EmitContext& ctx, Id offset, Id value, return (ctx.*atomic_func)(ctx.U32[1], pointer, scope, semantics, value); } +Id BufferAtomicU32BoundsCheck(EmitContext& ctx, Id index, Id buffer_size, auto emit_func) { + if (Sirit::ValidId(buffer_size)) { + // Bounds checking enabled, wrap in a conditional branch to make sure that + // the atomic is not mistakenly executed when the index is out of bounds. + const Id in_bounds = ctx.OpULessThan(ctx.U1[1], index, buffer_size); + const Id ib_label = ctx.OpLabel(); + const Id oob_label = ctx.OpLabel(); + const Id end_label = ctx.OpLabel(); + ctx.OpBranchConditional(in_bounds, ib_label, oob_label); + ctx.AddLabel(ib_label); + const Id ib_result = emit_func(); + ctx.OpBranch(end_label); + ctx.AddLabel(oob_label); + const Id oob_result = ctx.u32_zero_value; + ctx.OpBranch(end_label); + ctx.AddLabel(end_label); + return ctx.OpPhi(ctx.U32[1], ib_result, ib_label, oob_result, oob_label); + } + // Bounds checking not enabled, just perform the atomic operation. + return emit_func(); +} + Id BufferAtomicU32(EmitContext& ctx, IR::Inst* inst, u32 handle, Id address, Id value, Id (Sirit::Module::*atomic_func)(Id, Id, Id, Id, Id)) { - auto& buffer = ctx.buffers[handle]; - address = ctx.OpIAdd(ctx.U32[1], address, buffer.offset); + const auto& buffer = ctx.buffers[handle]; + if (Sirit::ValidId(buffer.offset)) { + address = ctx.OpIAdd(ctx.U32[1], address, buffer.offset); + } const Id index = ctx.OpShiftRightLogical(ctx.U32[1], address, ctx.ConstU32(2u)); - const Id ptr = ctx.OpAccessChain(buffer.pointer_type, buffer.id, ctx.u32_zero_value, index); + const auto [id, pointer_type] = buffer[EmitContext::BufferAlias::U32]; + const Id ptr = ctx.OpAccessChain(pointer_type, id, ctx.u32_zero_value, index); const auto [scope, semantics]{AtomicArgs(ctx)}; - return (ctx.*atomic_func)(ctx.U32[1], ptr, scope, semantics, value); + return BufferAtomicU32BoundsCheck(ctx, index, buffer.size_dwords, [&] { + return (ctx.*atomic_func)(ctx.U32[1], ptr, scope, semantics, value); + }); } Id ImageAtomicU32(EmitContext& ctx, IR::Inst* inst, u32 handle, Id coords, Id value, @@ -165,17 +192,17 @@ Id EmitImageAtomicExchange32(EmitContext& ctx, IR::Inst* inst, u32 handle, Id co } Id EmitDataAppend(EmitContext& ctx, u32 gds_addr, u32 binding) { - auto& buffer = ctx.buffers[binding]; - const Id ptr = ctx.OpAccessChain(buffer.pointer_type, buffer.id, ctx.u32_zero_value, - ctx.ConstU32(gds_addr)); + const auto& buffer = ctx.buffers[binding]; + const auto [id, pointer_type] = buffer[EmitContext::BufferAlias::U32]; + const Id ptr = ctx.OpAccessChain(pointer_type, id, ctx.u32_zero_value, ctx.ConstU32(gds_addr)); const auto [scope, semantics]{AtomicArgs(ctx)}; return ctx.OpAtomicIIncrement(ctx.U32[1], ptr, scope, semantics); } Id EmitDataConsume(EmitContext& ctx, u32 gds_addr, u32 binding) { - auto& buffer = ctx.buffers[binding]; - const Id ptr = ctx.OpAccessChain(buffer.pointer_type, buffer.id, ctx.u32_zero_value, - ctx.ConstU32(gds_addr)); + const auto& buffer = ctx.buffers[binding]; + const auto [id, pointer_type] = buffer[EmitContext::BufferAlias::U32]; + const Id ptr = ctx.OpAccessChain(pointer_type, id, ctx.u32_zero_value, ctx.ConstU32(gds_addr)); const auto [scope, semantics]{AtomicArgs(ctx)}; return ctx.OpAtomicIDecrement(ctx.U32[1], ptr, scope, semantics); } diff --git a/src/shader_recompiler/backend/spirv/emit_spirv_bitwise_conversion.cpp b/src/shader_recompiler/backend/spirv/emit_spirv_bitwise_conversion.cpp index 02ac74e19..56a6abc05 100644 --- a/src/shader_recompiler/backend/spirv/emit_spirv_bitwise_conversion.cpp +++ b/src/shader_recompiler/backend/spirv/emit_spirv_bitwise_conversion.cpp @@ -6,6 +6,56 @@ namespace Shader::Backend::SPIRV { +struct R { + R(u32 a, u32 b) : offset(a), size(b) {} + u32 offset; + u32 size; +}; +template +static std::array ExtractBitFields(EmitContext& ctx, const Id value, + const Args... args) { + const auto op_func = + is_signed ? &EmitContext::OpBitFieldSExtract : &EmitContext::OpBitFieldUExtract; + std::array result{}; + u32 i = 0; + ( + [&] { + result[i++] = (ctx.*op_func)(ctx.U32[1], value, ctx.ConstU32(args.offset), + ctx.ConstU32(args.size)); + }(), + ...); + return result; +} + +template +static Id InsertBitFields(EmitContext& ctx, const std::initializer_list values, + const Args... args) { + Id result{}; + auto it = values.begin(); + ( + [&] { + if (it == values.begin()) { + result = *it; + } else { + result = ctx.OpBitFieldInsert(ctx.U32[1], result, *it, ctx.ConstU32(args.offset), + ctx.ConstU32(args.size)); + } + ++it; + }(), + ...); + return result; +} + +template +static std::array ExtractComposite(EmitContext& ctx, const VectorIds type, + const Id value) { + std::array result{}; + for (u32 i = 0; i < num_components; i++) { + result[i] = ctx.OpCompositeExtract(type[1], value, i); + } + return result; +} + Id EmitBitCastU16F16(EmitContext& ctx, Id value) { return ctx.OpBitcast(ctx.U16, value); } @@ -42,12 +92,42 @@ Id EmitPackFloat2x32(EmitContext& ctx, Id value) { return ctx.OpBitcast(ctx.F64[1], value); } -Id EmitPackFloat2x16(EmitContext& ctx, Id value) { - return ctx.OpBitcast(ctx.U32[1], value); +Id EmitPackUnorm2x16(EmitContext& ctx, Id value) { + return ctx.OpPackUnorm2x16(ctx.U32[1], value); } -Id EmitUnpackFloat2x16(EmitContext& ctx, Id value) { - return ctx.OpBitcast(ctx.F16[2], value); +Id EmitUnpackUnorm2x16(EmitContext& ctx, Id value) { + return ctx.OpUnpackUnorm2x16(ctx.F32[2], value); +} + +Id EmitPackSnorm2x16(EmitContext& ctx, Id value) { + return ctx.OpPackSnorm2x16(ctx.U32[1], value); +} + +Id EmitUnpackSnorm2x16(EmitContext& ctx, Id value) { + return ctx.OpUnpackSnorm2x16(ctx.F32[2], value); +} + +Id EmitPackUint2x16(EmitContext& ctx, Id value) { + const auto unpacked{ctx.OpBitcast(ctx.U32[2], value)}; + const auto [x, y] = ExtractComposite<2>(ctx, ctx.U32, unpacked); + return InsertBitFields(ctx, {x, y}, R(0, 16), R(16, 16)); +} + +Id EmitUnpackUint2x16(EmitContext& ctx, Id value) { + const auto [x, y] = ExtractBitFields(ctx, value, R(0, 16), R(16, 16)); + const auto unpacked{ctx.OpCompositeConstruct(ctx.U32[2], x, y)}; + return ctx.OpBitcast(ctx.F32[2], unpacked); +} + +Id EmitPackSint2x16(EmitContext& ctx, Id value) { + return EmitPackUint2x16(ctx, value); +} + +Id EmitUnpackSint2x16(EmitContext& ctx, Id value) { + const auto [x, y] = ExtractBitFields(ctx, value, R(0, 16), R(16, 16)); + const auto unpacked{ctx.OpCompositeConstruct(ctx.U32[2], x, y)}; + return ctx.OpBitcast(ctx.F32[2], unpacked); } Id EmitPackHalf2x16(EmitContext& ctx, Id value) { @@ -58,4 +138,128 @@ Id EmitUnpackHalf2x16(EmitContext& ctx, Id value) { return ctx.OpUnpackHalf2x16(ctx.F32[2], value); } +Id EmitPackUnorm4x8(EmitContext& ctx, Id value) { + return ctx.OpPackUnorm4x8(ctx.U32[1], value); +} + +Id EmitUnpackUnorm4x8(EmitContext& ctx, Id value) { + return ctx.OpUnpackUnorm4x8(ctx.F32[4], value); +} + +Id EmitPackSnorm4x8(EmitContext& ctx, Id value) { + return ctx.OpPackSnorm4x8(ctx.U32[1], value); +} + +Id EmitUnpackSnorm4x8(EmitContext& ctx, Id value) { + return ctx.OpUnpackSnorm4x8(ctx.F32[4], value); +} + +Id EmitPackUint4x8(EmitContext& ctx, Id value) { + const auto unpacked{ctx.OpBitcast(ctx.U32[4], value)}; + const auto [x, y, z, w] = ExtractComposite<4>(ctx, ctx.U32, unpacked); + return InsertBitFields(ctx, {x, y, z, w}, R(0, 8), R(8, 8), R(16, 8), R(24, 8)); +} + +Id EmitUnpackUint4x8(EmitContext& ctx, Id value) { + const auto [x, y, z, w] = + ExtractBitFields(ctx, value, R(0, 8), R(8, 8), R(16, 8), R(24, 8)); + const auto unpacked{ctx.OpCompositeConstruct(ctx.U32[4], x, y, z, w)}; + return ctx.OpBitcast(ctx.F32[4], unpacked); +} + +Id EmitPackSint4x8(EmitContext& ctx, Id value) { + return EmitPackUint4x8(ctx, value); +} + +Id EmitUnpackSint4x8(EmitContext& ctx, Id value) { + const auto [x, y, z, w] = + ExtractBitFields(ctx, value, R(0, 8), R(8, 8), R(16, 8), R(24, 8)); + const auto unpacked{ctx.OpCompositeConstruct(ctx.U32[4], x, y, z, w)}; + return ctx.OpBitcast(ctx.F32[4], unpacked); +} + +Id EmitPackUfloat10_11_11(EmitContext& ctx, Id value) { + const auto [x, y, z] = ExtractComposite<3>(ctx, ctx.F32, value); + const auto cvt_x{ctx.OpFunctionCall(ctx.U32[1], ctx.f32_to_uf11, x)}; + const auto cvt_y{ctx.OpFunctionCall(ctx.U32[1], ctx.f32_to_uf11, y)}; + const auto cvt_z{ctx.OpFunctionCall(ctx.U32[1], ctx.f32_to_uf10, z)}; + return InsertBitFields(ctx, {cvt_x, cvt_y, cvt_z}, R(0, 11), R(11, 11), R(22, 10)); +} + +Id EmitUnpackUfloat10_11_11(EmitContext& ctx, Id value) { + const auto [x, y, z] = ExtractBitFields(ctx, value, R(0, 11), R(11, 11), R(22, 10)); + const auto cvt_x{ctx.OpFunctionCall(ctx.F32[1], ctx.uf11_to_f32, x)}; + const auto cvt_y{ctx.OpFunctionCall(ctx.F32[1], ctx.uf11_to_f32, y)}; + const auto cvt_z{ctx.OpFunctionCall(ctx.F32[1], ctx.uf10_to_f32, z)}; + return ctx.OpCompositeConstruct(ctx.F32[3], cvt_x, cvt_y, cvt_z); +} + +Id EmitPackUnorm2_10_10_10(EmitContext& ctx, Id value) { + const auto unorm_min{ctx.ConstantComposite(ctx.F32[4], ctx.ConstF32(0.f), ctx.ConstF32(0.f), + ctx.ConstF32(0.f), ctx.ConstF32(0.f))}; + const auto unorm_max{ctx.ConstantComposite(ctx.F32[4], ctx.ConstF32(1.f), ctx.ConstF32(1.f), + ctx.ConstF32(1.f), ctx.ConstF32(1.f))}; + const auto clamped{ctx.OpFClamp(ctx.F32[4], value, unorm_min, unorm_max)}; + const auto unorm_mul{ctx.ConstantComposite(ctx.F32[4], ctx.ConstF32(1023.f), + ctx.ConstF32(1023.f), ctx.ConstF32(1023.f), + ctx.ConstF32(3.f))}; + const auto as_float{ctx.OpFMul(ctx.F32[4], clamped, unorm_mul)}; + const auto as_uint{ctx.OpConvertFToU(ctx.U32[4], ctx.OpRoundEven(ctx.F32[4], as_float))}; + return EmitPackUint2_10_10_10(ctx, ctx.OpBitcast(ctx.F32[4], as_uint)); +} + +Id EmitUnpackUnorm2_10_10_10(EmitContext& ctx, Id value) { + const auto unpacked{ctx.OpBitcast(ctx.U32[4], EmitUnpackUint2_10_10_10(ctx, value))}; + const auto as_float{ctx.OpConvertUToF(ctx.F32[4], unpacked)}; + const auto unorm_div{ctx.ConstantComposite(ctx.F32[4], ctx.ConstF32(1023.f), + ctx.ConstF32(1023.f), ctx.ConstF32(1023.f), + ctx.ConstF32(3.f))}; + return ctx.OpFDiv(ctx.F32[4], as_float, unorm_div); +} + +Id EmitPackSnorm2_10_10_10(EmitContext& ctx, Id value) { + const auto snorm_min{ctx.ConstantComposite(ctx.F32[4], ctx.ConstF32(-1.f), ctx.ConstF32(-1.f), + ctx.ConstF32(-1.f), ctx.ConstF32(-1.f))}; + const auto snorm_max{ctx.ConstantComposite(ctx.F32[4], ctx.ConstF32(1.f), ctx.ConstF32(1.f), + ctx.ConstF32(1.f), ctx.ConstF32(1.f))}; + const auto clamped{ctx.OpFClamp(ctx.F32[4], value, snorm_min, snorm_max)}; + const auto snorm_mul{ctx.ConstantComposite(ctx.F32[4], ctx.ConstF32(511.f), ctx.ConstF32(511.f), + ctx.ConstF32(511.f), ctx.ConstF32(1.f))}; + const auto as_float{ctx.OpFMul(ctx.F32[4], clamped, snorm_mul)}; + const auto as_sint{ctx.OpConvertFToS(ctx.U32[4], ctx.OpRoundEven(ctx.F32[4], as_float))}; + return EmitPackSint2_10_10_10(ctx, ctx.OpBitcast(ctx.F32[4], as_sint)); +} + +Id EmitUnpackSnorm2_10_10_10(EmitContext& ctx, Id value) { + const auto unpacked{ctx.OpBitcast(ctx.U32[4], EmitUnpackSint2_10_10_10(ctx, value))}; + const auto as_float{ctx.OpConvertSToF(ctx.F32[4], unpacked)}; + const auto snorm_div{ctx.ConstantComposite(ctx.F32[4], ctx.ConstF32(511.f), ctx.ConstF32(511.f), + ctx.ConstF32(511.f), ctx.ConstF32(1.f))}; + return ctx.OpFDiv(ctx.F32[4], as_float, snorm_div); +} + +Id EmitPackUint2_10_10_10(EmitContext& ctx, Id value) { + const auto unpacked{ctx.OpBitcast(ctx.U32[4], value)}; + const auto [x, y, z, w] = ExtractComposite<4>(ctx, ctx.U32, unpacked); + return InsertBitFields(ctx, {x, y, z, w}, R(0, 10), R(10, 10), R(20, 10), R(30, 2)); +} + +Id EmitUnpackUint2_10_10_10(EmitContext& ctx, Id value) { + const auto [x, y, z, w] = + ExtractBitFields(ctx, value, R(0, 10), R(10, 10), R(20, 10), R(30, 2)); + const auto unpacked{ctx.OpCompositeConstruct(ctx.U32[4], x, y, z, w)}; + return ctx.OpBitcast(ctx.F32[4], unpacked); +} + +Id EmitPackSint2_10_10_10(EmitContext& ctx, Id value) { + return EmitPackUint2_10_10_10(ctx, value); +} + +Id EmitUnpackSint2_10_10_10(EmitContext& ctx, Id value) { + const auto [x, y, z, w] = + ExtractBitFields(ctx, value, R(0, 10), R(10, 10), R(20, 10), R(30, 2)); + const auto unpacked{ctx.OpCompositeConstruct(ctx.U32[4], x, y, z, w)}; + return ctx.OpBitcast(ctx.F32[4], unpacked); +} + } // namespace Shader::Backend::SPIRV diff --git a/src/shader_recompiler/backend/spirv/emit_spirv_composite.cpp b/src/shader_recompiler/backend/spirv/emit_spirv_composite.cpp index d064b5d05..4f9e6040e 100644 --- a/src/shader_recompiler/backend/spirv/emit_spirv_composite.cpp +++ b/src/shader_recompiler/backend/spirv/emit_spirv_composite.cpp @@ -24,6 +24,10 @@ Id EmitCompositeConstructU32x4(EmitContext& ctx, IR::Inst* inst, Id e1, Id e2, I return EmitCompositeConstruct(ctx, inst, ctx.U32[4], e1, e2, e3, e4); } +Id EmitCompositeConstructU32x2x2(EmitContext& ctx, IR::Inst* inst, Id e1, Id e2) { + return EmitCompositeConstruct(ctx, inst, ctx.U32[4], e1, e2); +} + Id EmitCompositeExtractU32x2(EmitContext& ctx, Id composite, u32 index) { return ctx.OpCompositeExtract(ctx.U32[1], composite, index); } @@ -124,6 +128,10 @@ Id EmitCompositeConstructF32x4(EmitContext& ctx, IR::Inst* inst, Id e1, Id e2, I return EmitCompositeConstruct(ctx, inst, ctx.F32[4], e1, e2, e3, e4); } +Id EmitCompositeConstructF32x2x2(EmitContext& ctx, IR::Inst* inst, Id e1, Id e2) { + return EmitCompositeConstruct(ctx, inst, ctx.F32[4], e1, e2); +} + Id EmitCompositeExtractF32x2(EmitContext& ctx, Id composite, u32 index) { return ctx.OpCompositeExtract(ctx.F32[1], composite, index); } 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 4550440bb..e4071bb95 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 @@ -160,31 +160,42 @@ void EmitGetGotoVariable(EmitContext&) { UNREACHABLE_MSG("Unreachable instruction"); } +using BufferAlias = EmitContext::BufferAlias; + Id EmitReadConst(EmitContext& ctx, IR::Inst* inst) { - u32 flatbuf_off_dw = inst->Flags(); - ASSERT(ctx.srt_flatbuf.binding >= 0); - ASSERT(flatbuf_off_dw > 0); - Id index = ctx.ConstU32(flatbuf_off_dw); - auto& buffer = ctx.srt_flatbuf; - const Id ptr{ctx.OpAccessChain(buffer.pointer_type, buffer.id, ctx.u32_zero_value, index)}; + const u32 flatbuf_off_dw = inst->Flags(); + const auto& srt_flatbuf = ctx.buffers.back(); + ASSERT(srt_flatbuf.binding >= 0 && flatbuf_off_dw > 0 && + srt_flatbuf.buffer_type == BufferType::ReadConstUbo); + const auto [id, pointer_type] = srt_flatbuf[BufferAlias::U32]; + const Id ptr{ + ctx.OpAccessChain(pointer_type, id, ctx.u32_zero_value, ctx.ConstU32(flatbuf_off_dw))}; return ctx.OpLoad(ctx.U32[1], ptr); } Id EmitReadConstBuffer(EmitContext& ctx, u32 handle, Id index) { - auto& buffer = ctx.buffers[handle]; + const auto& buffer = ctx.buffers[handle]; index = ctx.OpIAdd(ctx.U32[1], index, buffer.offset_dwords); - const Id ptr{ctx.OpAccessChain(buffer.pointer_type, buffer.id, ctx.u32_zero_value, index)}; - return ctx.OpLoad(buffer.data_types->Get(1), ptr); + const auto [id, pointer_type] = buffer[BufferAlias::U32]; + const Id ptr{ctx.OpAccessChain(pointer_type, id, ctx.u32_zero_value, index)}; + const Id result{ctx.OpLoad(ctx.U32[1], ptr)}; + + if (Sirit::ValidId(buffer.size_dwords)) { + const Id in_bounds = ctx.OpULessThan(ctx.U1[1], index, buffer.size_dwords); + return ctx.OpSelect(ctx.U32[1], in_bounds, result, ctx.u32_zero_value); + } else { + return result; + } } Id EmitReadStepRate(EmitContext& ctx, int rate_idx) { + const auto index{rate_idx == 0 ? PushData::Step0Index : PushData::Step1Index}; return ctx.OpLoad( ctx.U32[1], ctx.OpAccessChain(ctx.TypePointer(spv::StorageClass::PushConstant, ctx.U32[1]), - ctx.push_data_block, - rate_idx == 0 ? ctx.u32_zero_value : ctx.u32_one_value)); + ctx.push_data_block, ctx.ConstU32(index))); } -Id EmitGetAttributeForGeometry(EmitContext& ctx, IR::Attribute attr, u32 comp, Id index) { +static Id EmitGetAttributeForGeometry(EmitContext& ctx, IR::Attribute attr, u32 comp, Id index) { if (IR::IsPosition(attr)) { ASSERT(attr == IR::Attribute::Position0); const auto position_arr_ptr = ctx.TypePointer(spv::StorageClass::Input, ctx.F32[4]); @@ -285,6 +296,8 @@ Id EmitGetAttributeU32(EmitContext& ctx, IR::Attribute attr, u32 comp) { return EmitReadStepRate(ctx, 0); case IR::Attribute::InstanceId1: return EmitReadStepRate(ctx, 1); + case IR::Attribute::WorkgroupIndex: + return ctx.workgroup_index_id; case IR::Attribute::WorkgroupId: return ctx.OpCompositeExtract(ctx.U32[1], ctx.OpLoad(ctx.U32[3], ctx.workgroup_id), comp); case IR::Attribute::LocalInvocationId: @@ -397,99 +410,235 @@ void EmitSetPatch(EmitContext& ctx, IR::Patch patch, Id value) { } template -static Id EmitLoadBufferU32xN(EmitContext& ctx, u32 handle, Id address) { - auto& buffer = ctx.buffers[handle]; - address = ctx.OpIAdd(ctx.U32[1], address, buffer.offset); - const Id index = ctx.OpShiftRightLogical(ctx.U32[1], address, ctx.ConstU32(2u)); - if constexpr (N == 1) { - const Id ptr{ctx.OpAccessChain(buffer.pointer_type, buffer.id, ctx.u32_zero_value, index)}; - return ctx.OpLoad(buffer.data_types->Get(1), ptr); - } else { - boost::container::static_vector ids; - for (u32 i = 0; i < N; i++) { - const Id index_i = ctx.OpIAdd(ctx.U32[1], index, ctx.ConstU32(i)); - const Id ptr{ - ctx.OpAccessChain(buffer.pointer_type, buffer.id, ctx.u32_zero_value, index_i)}; - ids.push_back(ctx.OpLoad(buffer.data_types->Get(1), ptr)); +static Id EmitLoadBufferBoundsCheck(EmitContext& ctx, Id index, Id buffer_size, Id result, + bool is_float) { + if (Sirit::ValidId(buffer_size)) { + // Bounds checking enabled, wrap in a select. + const auto result_type = is_float ? ctx.F32[N] : ctx.U32[N]; + auto compare_index = index; + auto zero_value = is_float ? ctx.f32_zero_value : ctx.u32_zero_value; + if (N > 1) { + compare_index = ctx.OpIAdd(ctx.U32[1], index, ctx.ConstU32(N - 1)); + std::array zero_ids; + zero_ids.fill(zero_value); + zero_value = ctx.ConstantComposite(result_type, zero_ids); } - return ctx.OpCompositeConstruct(buffer.data_types->Get(N), ids); + const Id in_bounds = ctx.OpULessThan(ctx.U1[1], compare_index, buffer_size); + return ctx.OpSelect(result_type, in_bounds, result, zero_value); } + // Bounds checking not enabled, just return the plain value. + return result; } -Id EmitLoadBufferU32(EmitContext& ctx, IR::Inst*, u32 handle, Id address) { - return EmitLoadBufferU32xN<1>(ctx, handle, address); +template +static Id EmitLoadBufferB32xN(EmitContext& ctx, IR::Inst* inst, u32 handle, Id address) { + const auto flags = inst->Flags(); + const auto& spv_buffer = ctx.buffers[handle]; + if (Sirit::ValidId(spv_buffer.offset)) { + address = ctx.OpIAdd(ctx.U32[1], address, spv_buffer.offset); + } + const Id index = ctx.OpShiftRightLogical(ctx.U32[1], address, ctx.ConstU32(2u)); + const auto& data_types = alias == BufferAlias::U32 ? ctx.U32 : ctx.F32; + const auto [id, pointer_type] = spv_buffer[alias]; + + boost::container::static_vector ids; + for (u32 i = 0; i < N; i++) { + const Id index_i = i == 0 ? index : ctx.OpIAdd(ctx.U32[1], index, ctx.ConstU32(i)); + const Id ptr_i = ctx.OpAccessChain(pointer_type, id, ctx.u32_zero_value, index_i); + const Id result_i = ctx.OpLoad(data_types[1], ptr_i); + if (!flags.typed) { + // Untyped loads have bounds checking per-component. + ids.push_back(EmitLoadBufferBoundsCheck<1>(ctx, index_i, spv_buffer.size_dwords, + result_i, alias == BufferAlias::F32)); + } else { + ids.push_back(result_i); + } + } + + const Id result = N == 1 ? ids[0] : ctx.OpCompositeConstruct(data_types[N], ids); + if (flags.typed) { + // Typed loads have single bounds check for the whole load. + return EmitLoadBufferBoundsCheck(ctx, index, spv_buffer.size_dwords, result, + alias == BufferAlias::F32); + } + return result; } -Id EmitLoadBufferU32x2(EmitContext& ctx, IR::Inst*, u32 handle, Id address) { - return EmitLoadBufferU32xN<2>(ctx, handle, address); +Id EmitLoadBufferU8(EmitContext& ctx, IR::Inst* inst, u32 handle, Id address) { + const auto& spv_buffer = ctx.buffers[handle]; + if (Sirit::ValidId(spv_buffer.offset)) { + address = ctx.OpIAdd(ctx.U32[1], address, spv_buffer.offset); + } + const auto [id, pointer_type] = spv_buffer[BufferAlias::U8]; + const Id ptr{ctx.OpAccessChain(pointer_type, id, ctx.u32_zero_value, address)}; + const Id result{ctx.OpUConvert(ctx.U32[1], ctx.OpLoad(ctx.U8, ptr))}; + return EmitLoadBufferBoundsCheck<1>(ctx, address, spv_buffer.size, result, false); } -Id EmitLoadBufferU32x3(EmitContext& ctx, IR::Inst*, u32 handle, Id address) { - return EmitLoadBufferU32xN<3>(ctx, handle, address); +Id EmitLoadBufferU16(EmitContext& ctx, IR::Inst* inst, u32 handle, Id address) { + const auto& spv_buffer = ctx.buffers[handle]; + if (Sirit::ValidId(spv_buffer.offset)) { + address = ctx.OpIAdd(ctx.U32[1], address, spv_buffer.offset); + } + const auto [id, pointer_type] = spv_buffer[BufferAlias::U16]; + const Id index = ctx.OpShiftRightLogical(ctx.U32[1], address, ctx.ConstU32(1u)); + const Id ptr{ctx.OpAccessChain(pointer_type, id, ctx.u32_zero_value, index)}; + const Id result{ctx.OpUConvert(ctx.U32[1], ctx.OpLoad(ctx.U16, ptr))}; + return EmitLoadBufferBoundsCheck<1>(ctx, index, spv_buffer.size_shorts, result, false); } -Id EmitLoadBufferU32x4(EmitContext& ctx, IR::Inst*, u32 handle, Id address) { - return EmitLoadBufferU32xN<4>(ctx, handle, address); +Id EmitLoadBufferU32(EmitContext& ctx, IR::Inst* inst, u32 handle, Id address) { + return EmitLoadBufferB32xN<1, BufferAlias::U32>(ctx, inst, handle, address); +} + +Id EmitLoadBufferU32x2(EmitContext& ctx, IR::Inst* inst, u32 handle, Id address) { + return EmitLoadBufferB32xN<2, BufferAlias::U32>(ctx, inst, handle, address); +} + +Id EmitLoadBufferU32x3(EmitContext& ctx, IR::Inst* inst, u32 handle, Id address) { + return EmitLoadBufferB32xN<3, BufferAlias::U32>(ctx, inst, handle, address); +} + +Id EmitLoadBufferU32x4(EmitContext& ctx, IR::Inst* inst, u32 handle, Id address) { + return EmitLoadBufferB32xN<4, BufferAlias::U32>(ctx, inst, handle, address); +} + +Id EmitLoadBufferF32(EmitContext& ctx, IR::Inst* inst, u32 handle, Id address) { + return EmitLoadBufferB32xN<1, BufferAlias::F32>(ctx, inst, handle, address); +} + +Id EmitLoadBufferF32x2(EmitContext& ctx, IR::Inst* inst, u32 handle, Id address) { + return EmitLoadBufferB32xN<2, BufferAlias::F32>(ctx, inst, handle, address); +} + +Id EmitLoadBufferF32x3(EmitContext& ctx, IR::Inst* inst, u32 handle, Id address) { + return EmitLoadBufferB32xN<3, BufferAlias::F32>(ctx, inst, handle, address); +} + +Id EmitLoadBufferF32x4(EmitContext& ctx, IR::Inst* inst, u32 handle, Id address) { + return EmitLoadBufferB32xN<4, BufferAlias::F32>(ctx, inst, handle, address); } Id EmitLoadBufferFormatF32(EmitContext& ctx, IR::Inst* inst, u32 handle, Id address) { - const auto& buffer = ctx.texture_buffers[handle]; - const Id tex_buffer = ctx.OpLoad(buffer.image_type, buffer.id); - const Id coord = - ctx.OpIAdd(ctx.U32[1], ctx.OpShiftLeftLogical(ctx.U32[1], address, buffer.coord_shift), - buffer.coord_offset); - Id texel = buffer.is_storage ? ctx.OpImageRead(buffer.result_type, tex_buffer, coord) - : ctx.OpImageFetch(buffer.result_type, tex_buffer, coord); - if (buffer.is_integer) { - texel = ctx.OpBitcast(ctx.F32[4], texel); - } - return texel; + UNREACHABLE_MSG("SPIR-V instruction"); } template -static void EmitStoreBufferU32xN(EmitContext& ctx, u32 handle, Id address, Id value) { - auto& buffer = ctx.buffers[handle]; - address = ctx.OpIAdd(ctx.U32[1], address, buffer.offset); - const Id index = ctx.OpShiftRightLogical(ctx.U32[1], address, ctx.ConstU32(2u)); - if constexpr (N == 1) { - const Id ptr{ctx.OpAccessChain(buffer.pointer_type, buffer.id, ctx.u32_zero_value, index)}; - ctx.OpStore(ptr, value); - } else { - for (u32 i = 0; i < N; i++) { - const Id index_i = ctx.OpIAdd(ctx.U32[1], index, ctx.ConstU32(i)); - const Id ptr = - ctx.OpAccessChain(buffer.pointer_type, buffer.id, ctx.u32_zero_value, index_i); - ctx.OpStore(ptr, ctx.OpCompositeExtract(buffer.data_types->Get(1), value, i)); +void EmitStoreBufferBoundsCheck(EmitContext& ctx, Id index, Id buffer_size, auto emit_func) { + if (Sirit::ValidId(buffer_size)) { + // Bounds checking enabled, wrap in a conditional branch. + auto compare_index = index; + if (N > 1) { + index = ctx.OpIAdd(ctx.U32[1], index, ctx.ConstU32(N - 1)); } + const Id in_bounds = ctx.OpULessThan(ctx.U1[1], compare_index, buffer_size); + const Id in_bounds_label = ctx.OpLabel(); + const Id merge_label = ctx.OpLabel(); + ctx.OpSelectionMerge(merge_label, spv::SelectionControlMask::MaskNone); + ctx.OpBranchConditional(in_bounds, in_bounds_label, merge_label); + ctx.AddLabel(in_bounds_label); + emit_func(); + ctx.OpBranch(merge_label); + ctx.AddLabel(merge_label); + return; } + // Bounds checking not enabled, just perform the store. + emit_func(); +} + +template +static void EmitStoreBufferB32xN(EmitContext& ctx, IR::Inst* inst, u32 handle, Id address, + Id value) { + const auto flags = inst->Flags(); + const auto& spv_buffer = ctx.buffers[handle]; + if (Sirit::ValidId(spv_buffer.offset)) { + address = ctx.OpIAdd(ctx.U32[1], address, spv_buffer.offset); + } + const Id index = ctx.OpShiftRightLogical(ctx.U32[1], address, ctx.ConstU32(2u)); + const auto& data_types = alias == BufferAlias::U32 ? ctx.U32 : ctx.F32; + const auto [id, pointer_type] = spv_buffer[alias]; + + auto store = [&] { + for (u32 i = 0; i < N; i++) { + const Id index_i = i == 0 ? index : ctx.OpIAdd(ctx.U32[1], index, ctx.ConstU32(i)); + const Id ptr_i = ctx.OpAccessChain(pointer_type, id, ctx.u32_zero_value, index_i); + const Id value_i = N == 1 ? value : ctx.OpCompositeExtract(data_types[1], value, i); + auto store_i = [&]() { ctx.OpStore(ptr_i, value_i); }; + if (!flags.typed) { + // Untyped stores have bounds checking per-component. + EmitStoreBufferBoundsCheck<1>(ctx, index_i, spv_buffer.size_dwords, store_i); + } else { + store_i(); + } + } + }; + + if (flags.typed) { + // Typed stores have single bounds check for the whole store. + EmitStoreBufferBoundsCheck(ctx, index, spv_buffer.size_dwords, store); + } else { + store(); + } +} + +void EmitStoreBufferU8(EmitContext& ctx, IR::Inst*, u32 handle, Id address, Id value) { + const auto& spv_buffer = ctx.buffers[handle]; + if (Sirit::ValidId(spv_buffer.offset)) { + address = ctx.OpIAdd(ctx.U32[1], address, spv_buffer.offset); + } + const auto [id, pointer_type] = spv_buffer[BufferAlias::U8]; + const Id ptr{ctx.OpAccessChain(pointer_type, id, ctx.u32_zero_value, address)}; + const Id result{ctx.OpUConvert(ctx.U8, value)}; + EmitStoreBufferBoundsCheck<1>(ctx, address, spv_buffer.size, [&] { ctx.OpStore(ptr, result); }); +} + +void EmitStoreBufferU16(EmitContext& ctx, IR::Inst*, u32 handle, Id address, Id value) { + const auto& spv_buffer = ctx.buffers[handle]; + if (Sirit::ValidId(spv_buffer.offset)) { + address = ctx.OpIAdd(ctx.U32[1], address, spv_buffer.offset); + } + const auto [id, pointer_type] = spv_buffer[BufferAlias::U16]; + const Id index = ctx.OpShiftRightLogical(ctx.U32[1], address, ctx.ConstU32(1u)); + const Id ptr{ctx.OpAccessChain(pointer_type, id, ctx.u32_zero_value, index)}; + const Id result{ctx.OpUConvert(ctx.U16, value)}; + EmitStoreBufferBoundsCheck<1>(ctx, index, spv_buffer.size_shorts, + [&] { ctx.OpStore(ptr, result); }); } void EmitStoreBufferU32(EmitContext& ctx, IR::Inst* inst, u32 handle, Id address, Id value) { - EmitStoreBufferU32xN<1>(ctx, handle, address, value); + EmitStoreBufferB32xN<1, BufferAlias::U32>(ctx, inst, handle, address, value); } void EmitStoreBufferU32x2(EmitContext& ctx, IR::Inst* inst, u32 handle, Id address, Id value) { - EmitStoreBufferU32xN<2>(ctx, handle, address, value); + EmitStoreBufferB32xN<2, BufferAlias::U32>(ctx, inst, handle, address, value); } void EmitStoreBufferU32x3(EmitContext& ctx, IR::Inst* inst, u32 handle, Id address, Id value) { - EmitStoreBufferU32xN<3>(ctx, handle, address, value); + EmitStoreBufferB32xN<3, BufferAlias::U32>(ctx, inst, handle, address, value); } void EmitStoreBufferU32x4(EmitContext& ctx, IR::Inst* inst, u32 handle, Id address, Id value) { - EmitStoreBufferU32xN<4>(ctx, handle, address, value); + EmitStoreBufferB32xN<4, BufferAlias::U32>(ctx, inst, handle, address, value); +} + +void EmitStoreBufferF32(EmitContext& ctx, IR::Inst* inst, u32 handle, Id address, Id value) { + EmitStoreBufferB32xN<1, BufferAlias::F32>(ctx, inst, handle, address, value); +} + +void EmitStoreBufferF32x2(EmitContext& ctx, IR::Inst* inst, u32 handle, Id address, Id value) { + EmitStoreBufferB32xN<2, BufferAlias::F32>(ctx, inst, handle, address, value); +} + +void EmitStoreBufferF32x3(EmitContext& ctx, IR::Inst* inst, u32 handle, Id address, Id value) { + EmitStoreBufferB32xN<3, BufferAlias::F32>(ctx, inst, handle, address, value); +} + +void EmitStoreBufferF32x4(EmitContext& ctx, IR::Inst* inst, u32 handle, Id address, Id value) { + EmitStoreBufferB32xN<4, BufferAlias::F32>(ctx, inst, handle, address, value); } void EmitStoreBufferFormatF32(EmitContext& ctx, IR::Inst* inst, u32 handle, Id address, Id value) { - const auto& buffer = ctx.texture_buffers[handle]; - const Id tex_buffer = ctx.OpLoad(buffer.image_type, buffer.id); - const Id coord = - ctx.OpIAdd(ctx.U32[1], ctx.OpShiftLeftLogical(ctx.U32[1], address, buffer.coord_shift), - buffer.coord_offset); - if (buffer.is_integer) { - value = ctx.OpBitcast(buffer.result_type, value); - } - ctx.OpImageWrite(tex_buffer, coord, value); + UNREACHABLE_MSG("SPIR-V instruction"); } } // namespace Shader::Backend::SPIRV diff --git a/src/shader_recompiler/backend/spirv/emit_spirv_image.cpp b/src/shader_recompiler/backend/spirv/emit_spirv_image.cpp index c3d937fe7..e2a969b61 100644 --- a/src/shader_recompiler/backend/spirv/emit_spirv_image.cpp +++ b/src/shader_recompiler/backend/spirv/emit_spirv_image.cpp @@ -172,20 +172,18 @@ Id EmitImageQueryDimensions(EmitContext& ctx, IR::Inst* inst, u32 handle, Id lod const auto& texture = ctx.images[handle & 0xFFFF]; const Id image = ctx.OpLoad(texture.image_type, texture.id); const auto sharp = ctx.info.images[handle & 0xFFFF].GetSharp(ctx.info); - const auto type = sharp.GetBoundType(); const Id zero = ctx.u32_zero_value; const auto mips{[&] { return has_mips ? ctx.OpImageQueryLevels(ctx.U32[1], image) : zero; }}; - const bool uses_lod{type != AmdGpu::ImageType::Color2DMsaa && !texture.is_storage}; + const bool uses_lod{texture.view_type != AmdGpu::ImageType::Color2DMsaa && !texture.is_storage}; const auto query{[&](Id type) { return uses_lod ? ctx.OpImageQuerySizeLod(type, image, lod) : ctx.OpImageQuerySize(type, image); }}; - switch (type) { + switch (texture.view_type) { case AmdGpu::ImageType::Color1D: return ctx.OpCompositeConstruct(ctx.U32[4], query(ctx.U32[1]), zero, zero, mips()); case AmdGpu::ImageType::Color1DArray: case AmdGpu::ImageType::Color2D: - case AmdGpu::ImageType::Cube: case AmdGpu::ImageType::Color2DMsaa: return ctx.OpCompositeConstruct(ctx.U32[4], query(ctx.U32[2]), zero, mips()); case AmdGpu::ImageType::Color2DArray: @@ -257,4 +255,12 @@ void EmitImageWrite(EmitContext& ctx, IR::Inst* inst, u32 handle, Id coords, Id ctx.OpImageWrite(image, coords, texel, operands.mask, operands.operands); } +Id EmitCubeFaceIndex(EmitContext& ctx, IR::Inst* inst, Id cube_coords) { + if (ctx.profile.supports_native_cube_calc) { + return ctx.OpCubeFaceIndexAMD(ctx.F32[1], cube_coords); + } else { + UNREACHABLE_MSG("SPIR-V Instruction"); + } +} + } // namespace Shader::Backend::SPIRV diff --git a/src/shader_recompiler/backend/spirv/emit_spirv_instructions.h b/src/shader_recompiler/backend/spirv/emit_spirv_instructions.h index 0d9fcff46..aaa2bb526 100644 --- a/src/shader_recompiler/backend/spirv/emit_spirv_instructions.h +++ b/src/shader_recompiler/backend/spirv/emit_spirv_instructions.h @@ -63,15 +63,27 @@ void EmitGetGotoVariable(EmitContext& ctx); void EmitSetScc(EmitContext& ctx); Id EmitReadConst(EmitContext& ctx, IR::Inst* inst); Id EmitReadConstBuffer(EmitContext& ctx, u32 handle, Id index); +Id EmitLoadBufferU8(EmitContext& ctx, IR::Inst* inst, u32 handle, Id address); +Id EmitLoadBufferU16(EmitContext& ctx, IR::Inst* inst, u32 handle, Id address); Id EmitLoadBufferU32(EmitContext& ctx, IR::Inst* inst, u32 handle, Id address); Id EmitLoadBufferU32x2(EmitContext& ctx, IR::Inst* inst, u32 handle, Id address); Id EmitLoadBufferU32x3(EmitContext& ctx, IR::Inst* inst, u32 handle, Id address); Id EmitLoadBufferU32x4(EmitContext& ctx, IR::Inst* inst, u32 handle, Id address); +Id EmitLoadBufferF32(EmitContext& ctx, IR::Inst* inst, u32 handle, Id address); +Id EmitLoadBufferF32x2(EmitContext& ctx, IR::Inst* inst, u32 handle, Id address); +Id EmitLoadBufferF32x3(EmitContext& ctx, IR::Inst* inst, u32 handle, Id address); +Id EmitLoadBufferF32x4(EmitContext& ctx, IR::Inst* inst, u32 handle, Id address); Id EmitLoadBufferFormatF32(EmitContext& ctx, IR::Inst* inst, u32 handle, Id address); +void EmitStoreBufferU8(EmitContext& ctx, IR::Inst* inst, u32 handle, Id address, Id value); +void EmitStoreBufferU16(EmitContext& ctx, IR::Inst* inst, u32 handle, Id address, Id value); void EmitStoreBufferU32(EmitContext& ctx, IR::Inst* inst, u32 handle, Id address, Id value); void EmitStoreBufferU32x2(EmitContext& ctx, IR::Inst* inst, u32 handle, Id address, Id value); void EmitStoreBufferU32x3(EmitContext& ctx, IR::Inst* inst, u32 handle, Id address, Id value); void EmitStoreBufferU32x4(EmitContext& ctx, IR::Inst* inst, u32 handle, Id address, Id value); +void EmitStoreBufferF32(EmitContext& ctx, IR::Inst* inst, u32 handle, Id address, Id value); +void EmitStoreBufferF32x2(EmitContext& ctx, IR::Inst* inst, u32 handle, Id address, Id value); +void EmitStoreBufferF32x3(EmitContext& ctx, IR::Inst* inst, u32 handle, Id address, Id value); +void EmitStoreBufferF32x4(EmitContext& ctx, IR::Inst* inst, u32 handle, Id address, Id value); void EmitStoreBufferFormatF32(EmitContext& ctx, IR::Inst* inst, u32 handle, Id address, Id value); Id EmitBufferAtomicIAdd32(EmitContext& ctx, IR::Inst* inst, u32 handle, Id address, Id value); Id EmitBufferAtomicSMin32(EmitContext& ctx, IR::Inst* inst, u32 handle, Id address, Id value); @@ -108,10 +120,8 @@ Id EmitUndefU32(EmitContext& ctx); Id EmitUndefU64(EmitContext& ctx); Id EmitLoadSharedU32(EmitContext& ctx, Id offset); Id EmitLoadSharedU64(EmitContext& ctx, Id offset); -Id EmitLoadSharedU128(EmitContext& ctx, Id offset); void EmitWriteSharedU32(EmitContext& ctx, Id offset, Id value); void EmitWriteSharedU64(EmitContext& ctx, Id offset, Id value); -void EmitWriteSharedU128(EmitContext& ctx, Id offset, Id value); Id EmitSharedAtomicIAdd32(EmitContext& ctx, Id offset, Id value); Id EmitSharedAtomicUMax32(EmitContext& ctx, Id offset, Id value); Id EmitSharedAtomicSMax32(EmitContext& ctx, Id offset, Id value); @@ -123,6 +133,7 @@ Id EmitSharedAtomicXor32(EmitContext& ctx, Id offset, Id value); Id EmitCompositeConstructU32x2(EmitContext& ctx, IR::Inst* inst, Id e1, Id e2); Id EmitCompositeConstructU32x3(EmitContext& ctx, IR::Inst* inst, Id e1, Id e2, Id e3); Id EmitCompositeConstructU32x4(EmitContext& ctx, IR::Inst* inst, Id e1, Id e2, Id e3, Id e4); +Id EmitCompositeConstructU32x2x2(EmitContext& ctx, IR::Inst* inst, Id e1, Id e2); Id EmitCompositeExtractU32x2(EmitContext& ctx, Id composite, u32 index); Id EmitCompositeExtractU32x3(EmitContext& ctx, Id composite, u32 index); Id EmitCompositeExtractU32x4(EmitContext& ctx, Id composite, u32 index); @@ -151,6 +162,7 @@ Id EmitCompositeShuffleF16x4(EmitContext& ctx, Id composite1, Id composite2, u32 Id EmitCompositeConstructF32x2(EmitContext& ctx, IR::Inst* inst, Id e1, Id e2); Id EmitCompositeConstructF32x3(EmitContext& ctx, IR::Inst* inst, Id e1, Id e2, Id e3); Id EmitCompositeConstructF32x4(EmitContext& ctx, IR::Inst* inst, Id e1, Id e2, Id e3, Id e4); +Id EmitCompositeConstructF32x2x2(EmitContext& ctx, IR::Inst* inst, Id e1, Id e2); Id EmitCompositeExtractF32x2(EmitContext& ctx, Id composite, u32 index); Id EmitCompositeExtractF32x3(EmitContext& ctx, Id composite, u32 index); Id EmitCompositeExtractF32x4(EmitContext& ctx, Id composite, u32 index); @@ -193,10 +205,34 @@ void EmitBitCastF64U64(EmitContext& ctx); Id EmitPackUint2x32(EmitContext& ctx, Id value); Id EmitUnpackUint2x32(EmitContext& ctx, Id value); Id EmitPackFloat2x32(EmitContext& ctx, Id value); -Id EmitPackFloat2x16(EmitContext& ctx, Id value); -Id EmitUnpackFloat2x16(EmitContext& ctx, Id value); +Id EmitPackUnorm2x16(EmitContext& ctx, Id value); +Id EmitUnpackUnorm2x16(EmitContext& ctx, Id value); +Id EmitPackSnorm2x16(EmitContext& ctx, Id value); +Id EmitUnpackSnorm2x16(EmitContext& ctx, Id value); +Id EmitPackUint2x16(EmitContext& ctx, Id value); +Id EmitUnpackUint2x16(EmitContext& ctx, Id value); +Id EmitPackSint2x16(EmitContext& ctx, Id value); +Id EmitUnpackSint2x16(EmitContext& ctx, Id value); Id EmitPackHalf2x16(EmitContext& ctx, Id value); Id EmitUnpackHalf2x16(EmitContext& ctx, Id value); +Id EmitPackUnorm4x8(EmitContext& ctx, Id value); +Id EmitUnpackUnorm4x8(EmitContext& ctx, Id value); +Id EmitPackSnorm4x8(EmitContext& ctx, Id value); +Id EmitUnpackSnorm4x8(EmitContext& ctx, Id value); +Id EmitPackUint4x8(EmitContext& ctx, Id value); +Id EmitUnpackUint4x8(EmitContext& ctx, Id value); +Id EmitPackSint4x8(EmitContext& ctx, Id value); +Id EmitUnpackSint4x8(EmitContext& ctx, Id value); +Id EmitPackUfloat10_11_11(EmitContext& ctx, Id value); +Id EmitUnpackUfloat10_11_11(EmitContext& ctx, Id value); +Id EmitPackUnorm2_10_10_10(EmitContext& ctx, Id value); +Id EmitUnpackUnorm2_10_10_10(EmitContext& ctx, Id value); +Id EmitPackSnorm2_10_10_10(EmitContext& ctx, Id value); +Id EmitUnpackSnorm2_10_10_10(EmitContext& ctx, Id value); +Id EmitPackUint2_10_10_10(EmitContext& ctx, Id value); +Id EmitUnpackUint2_10_10_10(EmitContext& ctx, Id value); +Id EmitPackSint2_10_10_10(EmitContext& ctx, Id value); +Id EmitUnpackSint2_10_10_10(EmitContext& ctx, Id value); Id EmitFPAbs16(EmitContext& ctx, Id value); Id EmitFPAbs32(EmitContext& ctx, Id value); Id EmitFPAbs64(EmitContext& ctx, Id value); @@ -348,7 +384,8 @@ Id EmitSLessThanEqual(EmitContext& ctx, Id lhs, Id rhs); Id EmitULessThanEqual(EmitContext& ctx, Id lhs, Id rhs); Id EmitSGreaterThan(EmitContext& ctx, Id lhs, Id rhs); Id EmitUGreaterThan(EmitContext& ctx, Id lhs, Id rhs); -Id EmitINotEqual(EmitContext& ctx, Id lhs, Id rhs); +Id EmitINotEqual32(EmitContext& ctx, Id lhs, Id rhs); +Id EmitINotEqual64(EmitContext& ctx, Id lhs, Id rhs); Id EmitSGreaterThanEqual(EmitContext& ctx, Id lhs, Id rhs); Id EmitUGreaterThanEqual(EmitContext& ctx, Id lhs, Id rhs); Id EmitLogicalOr(EmitContext& ctx, Id a, Id b); @@ -439,6 +476,7 @@ Id EmitImageAtomicAnd32(EmitContext& ctx, IR::Inst* inst, u32 handle, Id coords, Id EmitImageAtomicOr32(EmitContext& ctx, IR::Inst* inst, u32 handle, Id coords, Id value); Id EmitImageAtomicXor32(EmitContext& ctx, IR::Inst* inst, u32 handle, Id coords, Id value); Id EmitImageAtomicExchange32(EmitContext& ctx, IR::Inst* inst, u32 handle, Id coords, Id value); +Id EmitCubeFaceIndex(EmitContext& ctx, IR::Inst* inst, Id cube_coords); Id EmitLaneId(EmitContext& ctx); Id EmitWarpId(EmitContext& ctx); Id EmitQuadShuffle(EmitContext& ctx, Id value, Id index); diff --git a/src/shader_recompiler/backend/spirv/emit_spirv_integer.cpp b/src/shader_recompiler/backend/spirv/emit_spirv_integer.cpp index 70411ecec..9f8784797 100644 --- a/src/shader_recompiler/backend/spirv/emit_spirv_integer.cpp +++ b/src/shader_recompiler/backend/spirv/emit_spirv_integer.cpp @@ -236,7 +236,7 @@ Id EmitFindILsb64(EmitContext& ctx, Id value) { const Id hi{ctx.OpCompositeExtract(ctx.U32[1], unpacked, 1U)}; const Id lo_lsb{ctx.OpFindILsb(ctx.U32[1], lo)}; const Id hi_lsb{ctx.OpFindILsb(ctx.U32[1], hi)}; - const Id found_lo{ctx.OpINotEqual(ctx.U32[1], lo_lsb, ctx.ConstU32(u32(-1)))}; + const Id found_lo{ctx.OpINotEqual(ctx.U1[1], lo_lsb, ctx.ConstU32(u32(-1)))}; return ctx.OpSelect(ctx.U32[1], found_lo, lo_lsb, hi_lsb); } @@ -324,7 +324,11 @@ Id EmitUGreaterThan(EmitContext& ctx, Id lhs, Id rhs) { return ctx.OpUGreaterThan(ctx.U1[1], lhs, rhs); } -Id EmitINotEqual(EmitContext& ctx, Id lhs, Id rhs) { +Id EmitINotEqual32(EmitContext& ctx, Id lhs, Id rhs) { + return ctx.OpINotEqual(ctx.U1[1], lhs, rhs); +} + +Id EmitINotEqual64(EmitContext& ctx, Id lhs, Id rhs) { return ctx.OpINotEqual(ctx.U1[1], lhs, rhs); } diff --git a/src/shader_recompiler/backend/spirv/emit_spirv_quad_rect.cpp b/src/shader_recompiler/backend/spirv/emit_spirv_quad_rect.cpp index 74a807c57..48aa9f870 100644 --- a/src/shader_recompiler/backend/spirv/emit_spirv_quad_rect.cpp +++ b/src/shader_recompiler/backend/spirv/emit_spirv_quad_rect.cpp @@ -13,8 +13,7 @@ constexpr u32 SPIRV_VERSION_1_5 = 0x00010500; struct QuadRectListEmitter : public Sirit::Module { explicit QuadRectListEmitter(const FragmentRuntimeInfo& fs_info_) - : Sirit::Module{SPIRV_VERSION_1_5}, fs_info{fs_info_}, inputs{fs_info_.num_inputs}, - outputs{fs_info_.num_inputs} { + : Sirit::Module{SPIRV_VERSION_1_5}, fs_info{fs_info_} { void_id = TypeVoid(); bool_id = TypeBool(); float_id = TypeFloat(32); @@ -253,11 +252,16 @@ private: } else { gl_per_vertex = AddOutput(gl_per_vertex_type); } + outputs.reserve(fs_info.num_inputs); for (int i = 0; i < fs_info.num_inputs; i++) { - outputs[i] = AddOutput(model == spv::ExecutionModel::TessellationControl - ? TypeArray(vec4_id, Int(4)) - : vec4_id); - Decorate(outputs[i], spv::Decoration::Location, fs_info.inputs[i].param_index); + const auto& input = fs_info.inputs[i]; + if (input.IsDefault()) { + continue; + } + outputs.emplace_back(AddOutput(model == spv::ExecutionModel::TessellationControl + ? TypeArray(vec4_id, Int(4)) + : vec4_id)); + Decorate(outputs.back(), spv::Decoration::Location, input.param_index); } } @@ -272,9 +276,14 @@ private: const Id gl_per_vertex_array{TypeArray(gl_per_vertex_type, Constant(uint_id, 32U))}; gl_in = AddInput(gl_per_vertex_array); const Id float_arr{TypeArray(vec4_id, Int(32))}; + inputs.reserve(fs_info.num_inputs); for (int i = 0; i < fs_info.num_inputs; i++) { - inputs[i] = AddInput(float_arr); - Decorate(inputs[i], spv::Decoration::Location, fs_info.inputs[i].param_index); + const auto& input = fs_info.inputs[i]; + if (input.IsDefault()) { + continue; + } + inputs.emplace_back(AddInput(float_arr)); + Decorate(inputs.back(), spv::Decoration::Location, input.param_index); } } @@ -326,4 +335,4 @@ std::vector EmitAuxilaryTessShader(AuxShaderType type, const FragmentRuntim return ctx.Assemble(); } -} // namespace Shader::Backend::SPIRV \ No newline at end of file +} // namespace Shader::Backend::SPIRV diff --git a/src/shader_recompiler/backend/spirv/emit_spirv_shared_memory.cpp b/src/shader_recompiler/backend/spirv/emit_spirv_shared_memory.cpp index 57ea476f1..8b1610d61 100644 --- a/src/shader_recompiler/backend/spirv/emit_spirv_shared_memory.cpp +++ b/src/shader_recompiler/backend/spirv/emit_spirv_shared_memory.cpp @@ -9,7 +9,7 @@ namespace Shader::Backend::SPIRV { Id EmitLoadSharedU32(EmitContext& ctx, Id offset) { const Id shift_id{ctx.ConstU32(2U)}; const Id index{ctx.OpShiftRightArithmetic(ctx.U32[1], offset, shift_id)}; - const Id pointer{ctx.OpAccessChain(ctx.shared_u32, ctx.shared_memory_u32, index)}; + const Id pointer = ctx.OpAccessChain(ctx.shared_u32, ctx.shared_memory_u32, index); return ctx.OpLoad(ctx.U32[1], pointer); } @@ -23,18 +23,6 @@ Id EmitLoadSharedU64(EmitContext& ctx, Id offset) { ctx.OpLoad(ctx.U32[1], rhs_pointer)); } -Id EmitLoadSharedU128(EmitContext& ctx, Id offset) { - const Id shift_id{ctx.ConstU32(2U)}; - const Id base_index{ctx.OpShiftRightArithmetic(ctx.U32[1], offset, shift_id)}; - std::array values{}; - for (u32 i = 0; i < 4; ++i) { - const Id index{i == 0 ? base_index : ctx.OpIAdd(ctx.U32[1], base_index, ctx.ConstU32(i))}; - const Id pointer{ctx.OpAccessChain(ctx.shared_u32, ctx.shared_memory_u32, index)}; - values[i] = ctx.OpLoad(ctx.U32[1], pointer); - } - return ctx.OpCompositeConstruct(ctx.U32[4], values); -} - void EmitWriteSharedU32(EmitContext& ctx, Id offset, Id value) { const Id shift{ctx.ConstU32(2U)}; const Id word_offset{ctx.OpShiftRightArithmetic(ctx.U32[1], offset, shift)}; @@ -52,14 +40,4 @@ void EmitWriteSharedU64(EmitContext& ctx, Id offset, Id value) { ctx.OpStore(rhs_pointer, ctx.OpCompositeExtract(ctx.U32[1], value, 1U)); } -void EmitWriteSharedU128(EmitContext& ctx, Id offset, Id value) { - const Id shift{ctx.ConstU32(2U)}; - const Id base_index{ctx.OpShiftRightArithmetic(ctx.U32[1], offset, shift)}; - for (u32 i = 0; i < 4; ++i) { - const Id index{i == 0 ? base_index : ctx.OpIAdd(ctx.U32[1], base_index, ctx.ConstU32(i))}; - const Id pointer{ctx.OpAccessChain(ctx.shared_u32, ctx.shared_memory_u32, index)}; - ctx.OpStore(pointer, ctx.OpCompositeExtract(ctx.U32[1], value, i)); - } -} - } // namespace Shader::Backend::SPIRV diff --git a/src/shader_recompiler/backend/spirv/emit_spirv_special.cpp b/src/shader_recompiler/backend/spirv/emit_spirv_special.cpp index 4a22ba09f..fe7bd3356 100644 --- a/src/shader_recompiler/backend/spirv/emit_spirv_special.cpp +++ b/src/shader_recompiler/backend/spirv/emit_spirv_special.cpp @@ -11,7 +11,10 @@ void EmitPrologue(EmitContext& ctx) { if (ctx.stage == Stage::Fragment) { ctx.DefineInterpolatedAttribs(); } - ctx.DefineBufferOffsets(); + if (ctx.info.loads.Get(IR::Attribute::WorkgroupIndex)) { + ctx.DefineWorkgroupIndex(); + } + ctx.DefineBufferProperties(); } void ConvertDepthMode(EmitContext& ctx) { @@ -24,10 +27,48 @@ void ConvertDepthMode(EmitContext& ctx) { ctx.OpStore(ctx.output_position, vector); } +void ConvertPositionToClipSpace(EmitContext& ctx) { + const Id type{ctx.F32[1]}; + Id position{ctx.OpLoad(ctx.F32[4], ctx.output_position)}; + const Id x{ctx.OpCompositeExtract(type, position, 0u)}; + const Id y{ctx.OpCompositeExtract(type, position, 1u)}; + const Id z{ctx.OpCompositeExtract(type, position, 2u)}; + const Id w{ctx.OpCompositeExtract(type, position, 3u)}; + const Id xoffset_ptr{ctx.OpAccessChain(ctx.TypePointer(spv::StorageClass::PushConstant, type), + ctx.push_data_block, + ctx.ConstU32(PushData::XOffsetIndex))}; + const Id xoffset{ctx.OpLoad(type, xoffset_ptr)}; + const Id yoffset_ptr{ctx.OpAccessChain(ctx.TypePointer(spv::StorageClass::PushConstant, type), + ctx.push_data_block, + ctx.ConstU32(PushData::YOffsetIndex))}; + const Id yoffset{ctx.OpLoad(type, yoffset_ptr)}; + const Id xscale_ptr{ctx.OpAccessChain(ctx.TypePointer(spv::StorageClass::PushConstant, type), + ctx.push_data_block, + ctx.ConstU32(PushData::XScaleIndex))}; + const Id xscale{ctx.OpLoad(type, xscale_ptr)}; + const Id yscale_ptr{ctx.OpAccessChain(ctx.TypePointer(spv::StorageClass::PushConstant, type), + ctx.push_data_block, + ctx.ConstU32(PushData::YScaleIndex))}; + const Id yscale{ctx.OpLoad(type, yscale_ptr)}; + const Id vport_w = + ctx.Constant(type, float(std::min(ctx.profile.max_viewport_width / 2, 8_KB))); + const Id wnd_x = ctx.OpFAdd(type, ctx.OpFMul(type, x, xscale), xoffset); + const Id ndc_x = ctx.OpFSub(type, ctx.OpFDiv(type, wnd_x, vport_w), ctx.Constant(type, 1.f)); + const Id vport_h = + ctx.Constant(type, float(std::min(ctx.profile.max_viewport_height / 2, 8_KB))); + const Id wnd_y = ctx.OpFAdd(type, ctx.OpFMul(type, y, yscale), yoffset); + const Id ndc_y = ctx.OpFSub(type, ctx.OpFDiv(type, wnd_y, vport_h), ctx.Constant(type, 1.f)); + const Id vector{ctx.OpCompositeConstruct(ctx.F32[4], std::array({ndc_x, ndc_y, z, w}))}; + ctx.OpStore(ctx.output_position, vector); +} + void EmitEpilogue(EmitContext& ctx) { if (ctx.stage == Stage::Vertex && ctx.runtime_info.vs_info.emulate_depth_negative_one_to_one) { ConvertDepthMode(ctx); } + if (ctx.stage == Stage::Vertex && ctx.runtime_info.vs_info.clip_disable) { + ConvertPositionToClipSpace(ctx); + } } void EmitDiscard(EmitContext& ctx) { diff --git a/src/shader_recompiler/backend/spirv/spirv_emit_context.cpp b/src/shader_recompiler/backend/spirv/spirv_emit_context.cpp index 575bf91f7..e20cfeae2 100644 --- a/src/shader_recompiler/backend/spirv/spirv_emit_context.cpp +++ b/src/shader_recompiler/backend/spirv/spirv_emit_context.cpp @@ -5,7 +5,6 @@ #include "common/div_ceil.h" #include "shader_recompiler/backend/spirv/spirv_emit_context.h" #include "shader_recompiler/frontend/fetch_shader.h" -#include "shader_recompiler/ir/passes/srt.h" #include "shader_recompiler/runtime_info.h" #include "video_core/amdgpu/types.h" @@ -51,6 +50,8 @@ static constexpr u32 NumVertices(AmdGpu::PrimitiveType type) { return 3u; case AmdGpu::PrimitiveType::AdjTriangleList: return 6u; + case AmdGpu::PrimitiveType::AdjLineList: + return 4u; default: UNREACHABLE(); } @@ -65,17 +66,17 @@ void Name(EmitContext& ctx, Id object, std::string_view format_str, Args&&... ar } // Anonymous namespace -EmitContext::EmitContext(const Profile& profile_, const RuntimeInfo& runtime_info_, - const Info& info_, Bindings& binding_) +EmitContext::EmitContext(const Profile& profile_, const RuntimeInfo& runtime_info_, Info& info_, + Bindings& binding_) : Sirit::Module(profile_.supported_spirv), info{info_}, runtime_info{runtime_info_}, profile{profile_}, stage{info.stage}, l_stage{info.l_stage}, binding{binding_} { AddCapability(spv::Capability::Shader); DefineArithmeticTypes(); DefineInterfaces(); - DefineBuffers(); - DefineTextureBuffers(); - DefineImagesAndSamplers(); DefineSharedMemory(); + DefineBuffers(); + DefineImagesAndSamplers(); + DefineFunctions(); } EmitContext::~EmitContext() = default; @@ -107,6 +108,8 @@ Id EmitContext::Def(const IR::Value& value) { void EmitContext::DefineArithmeticTypes() { void_id = Name(TypeVoid(), "void_id"); U1[1] = Name(TypeBool(), "bool_id"); + U8 = Name(TypeUInt(8), "u8_id"); + U16 = Name(TypeUInt(16), "u16_id"); if (info.uses_fp16) { F16[1] = Name(TypeFloat(16), "f16_id"); U16 = Name(TypeUInt(16), "u16_id"); @@ -191,8 +194,30 @@ EmitContext::SpirvAttribute EmitContext::GetAttributeInfo(AmdGpu::NumberFormat f UNREACHABLE_MSG("Invalid attribute type {}", fmt); } -void EmitContext::DefineBufferOffsets() { - for (BufferDefinition& buffer : buffers) { +Id EmitContext::GetBufferSize(const u32 sharp_idx) { + const auto& srt_flatbuf = buffers.back(); + ASSERT(srt_flatbuf.buffer_type == BufferType::ReadConstUbo); + const auto [id, pointer_type] = srt_flatbuf[BufferAlias::U32]; + + const auto rsrc1{ + OpLoad(U32[1], OpAccessChain(pointer_type, id, u32_zero_value, ConstU32(sharp_idx + 1)))}; + const auto rsrc2{ + OpLoad(U32[1], OpAccessChain(pointer_type, id, u32_zero_value, ConstU32(sharp_idx + 2)))}; + + const auto stride{OpBitFieldUExtract(U32[1], rsrc1, ConstU32(16u), ConstU32(14u))}; + const auto num_records{rsrc2}; + + const auto stride_zero{OpIEqual(U1[1], stride, u32_zero_value)}; + const auto stride_size{OpIMul(U32[1], num_records, stride)}; + return OpSelect(U32[1], stride_zero, num_records, stride_size); +} + +void EmitContext::DefineBufferProperties() { + for (u32 i = 0; i < buffers.size(); i++) { + BufferDefinition& buffer = buffers[i]; + if (buffer.buffer_type != BufferType::Guest) { + continue; + } const u32 binding = buffer.binding; const u32 half = PushData::BufOffsetIndex + (binding >> 4); const u32 comp = (binding & 0xf) >> 2; @@ -204,19 +229,22 @@ void EmitContext::DefineBufferOffsets() { Name(buffer.offset, fmt::format("buf{}_off", binding)); buffer.offset_dwords = OpShiftRightLogical(U32[1], buffer.offset, ConstU32(2U)); Name(buffer.offset_dwords, fmt::format("buf{}_dword_off", binding)); - } - for (TextureBufferDefinition& tex_buffer : texture_buffers) { - const u32 binding = tex_buffer.binding; - const u32 half = PushData::BufOffsetIndex + (binding >> 4); - const u32 comp = (binding & 0xf) >> 2; - const u32 offset = (binding & 0x3) << 3; - const Id ptr{OpAccessChain(TypePointer(spv::StorageClass::PushConstant, U32[1]), - push_data_block, ConstU32(half), ConstU32(comp))}; - const Id value{OpLoad(U32[1], ptr)}; - tex_buffer.coord_offset = OpBitFieldUExtract(U32[1], value, ConstU32(offset), ConstU32(6U)); - tex_buffer.coord_shift = - OpBitFieldUExtract(U32[1], value, ConstU32(offset + 6U), ConstU32(2U)); - Name(tex_buffer.coord_offset, fmt::format("texbuf{}_off", binding)); + + // Only need to load size if performing bounds checks and the buffer is both guest and not + // inline. + if (!profile.supports_robust_buffer_access && buffer.buffer_type == BufferType::Guest) { + const BufferResource& desc = info.buffers[i]; + if (desc.sharp_idx == std::numeric_limits::max()) { + buffer.size = ConstU32(desc.inline_cbuf.GetSize()); + } else { + buffer.size = GetBufferSize(desc.sharp_idx); + } + Name(buffer.size, fmt::format("buf{}_size", binding)); + buffer.size_shorts = OpShiftRightLogical(U32[1], buffer.size, ConstU32(1U)); + Name(buffer.size_shorts, fmt::format("buf{}_short_size", binding)); + buffer.size_dwords = OpShiftRightLogical(U32[1], buffer.size, ConstU32(2U)); + Name(buffer.size_dwords, fmt::format("buf{}_dword_size", binding)); + } } } @@ -224,8 +252,7 @@ void EmitContext::DefineInterpolatedAttribs() { if (!profile.needs_manual_interpolation) { return; } - // Iterate all input attributes, load them and manually interpolate with barycentric - // coordinates. + // Iterate all input attributes, load them and manually interpolate. for (s32 i = 0; i < runtime_info.fs_info.num_inputs; i++) { const auto& input = runtime_info.fs_info.inputs[i]; const u32 semantic = input.param_index; @@ -250,6 +277,20 @@ void EmitContext::DefineInterpolatedAttribs() { } } +void EmitContext::DefineWorkgroupIndex() { + const Id workgroup_id_val{OpLoad(U32[3], workgroup_id)}; + const Id workgroup_x{OpCompositeExtract(U32[1], workgroup_id_val, 0)}; + const Id workgroup_y{OpCompositeExtract(U32[1], workgroup_id_val, 1)}; + const Id workgroup_z{OpCompositeExtract(U32[1], workgroup_id_val, 2)}; + const Id num_workgroups{OpLoad(U32[3], num_workgroups_id)}; + const Id num_workgroups_x{OpCompositeExtract(U32[1], num_workgroups, 0)}; + const Id num_workgroups_y{OpCompositeExtract(U32[1], num_workgroups, 1)}; + workgroup_index_id = + OpIAdd(U32[1], OpIAdd(U32[1], workgroup_x, OpIMul(U32[1], workgroup_y, num_workgroups_x)), + OpIMul(U32[1], workgroup_z, OpIMul(U32[1], num_workgroups_x, num_workgroups_y))); + Name(workgroup_index_id, "workgroup_index"); +} + Id MakeDefaultValue(EmitContext& ctx, u32 default_value) { switch (default_value) { case 0: @@ -318,9 +359,16 @@ void EmitContext::DefineInputs() { break; } case LogicalStage::Fragment: - frag_coord = DefineVariable(F32[4], spv::BuiltIn::FragCoord, spv::StorageClass::Input); - frag_depth = DefineVariable(F32[1], spv::BuiltIn::FragDepth, spv::StorageClass::Output); - front_facing = DefineVariable(U1[1], spv::BuiltIn::FrontFacing, spv::StorageClass::Input); + if (info.loads.GetAny(IR::Attribute::FragCoord)) { + frag_coord = DefineVariable(F32[4], spv::BuiltIn::FragCoord, spv::StorageClass::Input); + } + if (info.stores.Get(IR::Attribute::Depth)) { + frag_depth = DefineVariable(F32[1], spv::BuiltIn::FragDepth, spv::StorageClass::Output); + } + if (info.loads.Get(IR::Attribute::IsFrontFace)) { + front_facing = + DefineVariable(U1[1], spv::BuiltIn::FrontFacing, spv::StorageClass::Input); + } if (profile.needs_manual_interpolation) { gl_bary_coord_id = DefineVariable(F32[3], spv::BuiltIn::BaryCoordKHR, spv::StorageClass::Input); @@ -329,7 +377,7 @@ void EmitContext::DefineInputs() { const auto& input = runtime_info.fs_info.inputs[i]; const u32 semantic = input.param_index; ASSERT(semantic < IR::NumParams); - if (input.is_default && !input.is_flat) { + if (input.IsDefault()) { input_params[semantic] = { MakeDefaultValue(*this, input.default_value), input_f32, F32[1], 4, false, true, }; @@ -355,9 +403,19 @@ void EmitContext::DefineInputs() { } break; case LogicalStage::Compute: - workgroup_id = DefineVariable(U32[3], spv::BuiltIn::WorkgroupId, spv::StorageClass::Input); - local_invocation_id = - DefineVariable(U32[3], spv::BuiltIn::LocalInvocationId, spv::StorageClass::Input); + if (info.loads.GetAny(IR::Attribute::WorkgroupIndex) || + info.loads.GetAny(IR::Attribute::WorkgroupId)) { + workgroup_id = + DefineVariable(U32[3], spv::BuiltIn::WorkgroupId, spv::StorageClass::Input); + } + if (info.loads.GetAny(IR::Attribute::WorkgroupIndex)) { + num_workgroups_id = + DefineVariable(U32[3], spv::BuiltIn::NumWorkgroups, spv::StorageClass::Input); + } + if (info.loads.GetAny(IR::Attribute::LocalInvocationId)) { + local_invocation_id = + DefineVariable(U32[3], spv::BuiltIn::LocalInvocationId, spv::StorageClass::Input); + } break; case LogicalStage::Geometry: { primitive_id = DefineVariable(U32[1], spv::BuiltIn::PrimitiveId, spv::StorageClass::Input); @@ -395,7 +453,7 @@ void EmitContext::DefineInputs() { DefineVariable(U32[1], spv::BuiltIn::PatchVertices, spv::StorageClass::Input); primitive_id = DefineVariable(U32[1], spv::BuiltIn::PrimitiveId, spv::StorageClass::Input); - const u32 num_attrs = runtime_info.hs_info.ls_stride >> 4; + const u32 num_attrs = Common::AlignUp(runtime_info.hs_info.ls_stride, 16) >> 4; if (num_attrs > 0) { const Id per_vertex_type{TypeArray(F32[4], ConstU32(num_attrs))}; // The input vertex count isn't statically known, so make length 32 (what glslang does) @@ -409,7 +467,7 @@ void EmitContext::DefineInputs() { tess_coord = DefineInput(F32[3], std::nullopt, spv::BuiltIn::TessCoord); primitive_id = DefineVariable(U32[1], spv::BuiltIn::PrimitiveId, spv::StorageClass::Input); - const u32 num_attrs = runtime_info.vs_info.hs_output_cp_stride >> 4; + const u32 num_attrs = Common::AlignUp(runtime_info.vs_info.hs_output_cp_stride, 16) >> 4; if (num_attrs > 0) { const Id per_vertex_type{TypeArray(F32[4], ConstU32(num_attrs))}; // The input vertex count isn't statically known, so make length 32 (what glslang does) @@ -418,7 +476,7 @@ void EmitContext::DefineInputs() { Name(input_attr_array, "in_attrs"); } - u32 patch_base_location = runtime_info.vs_info.hs_output_cp_stride >> 4; + const u32 patch_base_location = num_attrs; for (size_t index = 0; index < 30; ++index) { if (!(info.uses_patches & (1U << index))) { continue; @@ -453,7 +511,7 @@ void EmitContext::DefineOutputs() { DefineVariable(type, spv::BuiltIn::CullDistance, spv::StorageClass::Output); } if (stage == Shader::Stage::Local && runtime_info.ls_info.links_with_tcs) { - const u32 num_attrs = runtime_info.ls_info.ls_stride >> 4; + const u32 num_attrs = Common::AlignUp(runtime_info.ls_info.ls_stride, 16) >> 4; if (num_attrs > 0) { const Id type{TypeArray(F32[4], ConstU32(num_attrs))}; output_attr_array = DefineOutput(type, 0); @@ -488,7 +546,7 @@ void EmitContext::DefineOutputs() { Decorate(output_tess_level_inner, spv::Decoration::Patch); } - const u32 num_attrs = runtime_info.hs_info.hs_output_cp_stride >> 4; + const u32 num_attrs = Common::AlignUp(runtime_info.hs_info.hs_output_cp_stride, 16) >> 4; if (num_attrs > 0) { const Id per_vertex_type{TypeArray(F32[4], ConstU32(num_attrs))}; // The input vertex count isn't statically known, so make length 32 (what glslang does) @@ -498,7 +556,7 @@ void EmitContext::DefineOutputs() { Name(output_attr_array, "out_attrs"); } - u32 patch_base_location = runtime_info.hs_info.hs_output_cp_stride >> 4; + const u32 patch_base_location = num_attrs; for (size_t index = 0; index < 30; ++index) { if (!(info.uses_patches & (1U << index))) { continue; @@ -568,128 +626,117 @@ void EmitContext::DefineOutputs() { void EmitContext::DefinePushDataBlock() { // Create push constants block for instance steps rates - const Id struct_type{Name( - TypeStruct(U32[1], U32[1], U32[4], U32[4], U32[4], U32[4], U32[4], U32[4]), "AuxData")}; + const Id struct_type{Name(TypeStruct(U32[1], U32[1], F32[1], F32[1], F32[1], F32[1], U32[4], + U32[4], U32[4], U32[4], U32[4], U32[4]), + "AuxData")}; Decorate(struct_type, spv::Decoration::Block); - MemberName(struct_type, 0, "sr0"); - MemberName(struct_type, 1, "sr1"); - MemberName(struct_type, 2, "buf_offsets0"); - MemberName(struct_type, 3, "buf_offsets1"); - MemberName(struct_type, 4, "ud_regs0"); - MemberName(struct_type, 5, "ud_regs1"); - MemberName(struct_type, 6, "ud_regs2"); - MemberName(struct_type, 7, "ud_regs3"); - MemberDecorate(struct_type, 0, spv::Decoration::Offset, 0U); - MemberDecorate(struct_type, 1, spv::Decoration::Offset, 4U); - MemberDecorate(struct_type, 2, spv::Decoration::Offset, 8U); - MemberDecorate(struct_type, 3, spv::Decoration::Offset, 24U); - MemberDecorate(struct_type, 4, spv::Decoration::Offset, 40U); - MemberDecorate(struct_type, 5, spv::Decoration::Offset, 56U); - MemberDecorate(struct_type, 6, spv::Decoration::Offset, 72U); - MemberDecorate(struct_type, 7, spv::Decoration::Offset, 88U); + MemberName(struct_type, PushData::Step0Index, "sr0"); + MemberName(struct_type, PushData::Step1Index, "sr1"); + MemberName(struct_type, PushData::XOffsetIndex, "xoffset"); + MemberName(struct_type, PushData::YOffsetIndex, "yoffset"); + MemberName(struct_type, PushData::XScaleIndex, "xscale"); + MemberName(struct_type, PushData::YScaleIndex, "yscale"); + MemberName(struct_type, PushData::UdRegsIndex + 0, "ud_regs0"); + MemberName(struct_type, PushData::UdRegsIndex + 1, "ud_regs1"); + MemberName(struct_type, PushData::UdRegsIndex + 2, "ud_regs2"); + MemberName(struct_type, PushData::UdRegsIndex + 3, "ud_regs3"); + MemberName(struct_type, PushData::BufOffsetIndex + 0, "buf_offsets0"); + MemberName(struct_type, PushData::BufOffsetIndex + 1, "buf_offsets1"); + MemberDecorate(struct_type, PushData::Step0Index, spv::Decoration::Offset, 0U); + MemberDecorate(struct_type, PushData::Step1Index, spv::Decoration::Offset, 4U); + MemberDecorate(struct_type, PushData::XOffsetIndex, spv::Decoration::Offset, 8U); + MemberDecorate(struct_type, PushData::YOffsetIndex, spv::Decoration::Offset, 12U); + MemberDecorate(struct_type, PushData::XScaleIndex, spv::Decoration::Offset, 16U); + MemberDecorate(struct_type, PushData::YScaleIndex, spv::Decoration::Offset, 20U); + MemberDecorate(struct_type, PushData::UdRegsIndex + 0, spv::Decoration::Offset, 24U); + MemberDecorate(struct_type, PushData::UdRegsIndex + 1, spv::Decoration::Offset, 40U); + MemberDecorate(struct_type, PushData::UdRegsIndex + 2, spv::Decoration::Offset, 56U); + MemberDecorate(struct_type, PushData::UdRegsIndex + 3, spv::Decoration::Offset, 72U); + MemberDecorate(struct_type, PushData::BufOffsetIndex + 0, spv::Decoration::Offset, 88U); + MemberDecorate(struct_type, PushData::BufOffsetIndex + 1, spv::Decoration::Offset, 104U); push_data_block = DefineVar(struct_type, spv::StorageClass::PushConstant); Name(push_data_block, "push_data"); interfaces.push_back(push_data_block); } -void EmitContext::DefineBuffers() { - boost::container::small_vector type_ids; - const auto define_struct = [&](Id record_array_type, bool is_instance_data, - std::optional explicit_name = {}) { - const Id struct_type{TypeStruct(record_array_type)}; - if (std::ranges::find(type_ids, record_array_type.value, &Id::value) != type_ids.end()) { - return struct_type; - } - Decorate(record_array_type, spv::Decoration::ArrayStride, 4); - auto name = is_instance_data ? fmt::format("{}_instance_data_f32", stage) - : fmt::format("{}_cbuf_block_f32", stage); - name = explicit_name.value_or(name); - Name(struct_type, name); +EmitContext::BufferSpv EmitContext::DefineBuffer(bool is_storage, bool is_written, u32 elem_shift, + BufferType buffer_type, Id data_type) { + // Define array type. + const Id max_num_items = ConstU32(u32(profile.max_ubo_size) >> elem_shift); + const Id record_array_type{is_storage ? TypeRuntimeArray(data_type) + : TypeArray(data_type, max_num_items)}; + // Define block struct type. Don't perform decorations twice on the same Id. + const Id struct_type{TypeStruct(record_array_type)}; + if (std::ranges::find(buf_type_ids, record_array_type.value, &Id::value) == + buf_type_ids.end()) { + Decorate(record_array_type, spv::Decoration::ArrayStride, 1 << elem_shift); Decorate(struct_type, spv::Decoration::Block); MemberName(struct_type, 0, "data"); MemberDecorate(struct_type, 0, spv::Decoration::Offset, 0U); - type_ids.push_back(record_array_type); - return struct_type; - }; - - if (info.has_readconst) { - const Id data_type = U32[1]; - const auto storage_class = spv::StorageClass::Uniform; - const Id pointer_type = TypePointer(storage_class, data_type); - const Id record_array_type{ - TypeArray(U32[1], ConstU32(static_cast(info.flattened_ud_buf.size())))}; - - const Id struct_type{define_struct(record_array_type, false, "srt_flatbuf_ty")}; - - const Id struct_pointer_type{TypePointer(storage_class, struct_type)}; - const Id id{AddGlobalVariable(struct_pointer_type, storage_class)}; - Decorate(id, spv::Decoration::Binding, binding.unified++); - Decorate(id, spv::Decoration::DescriptorSet, 0U); + buf_type_ids.push_back(record_array_type); + } + // Define buffer binding interface. + const auto storage_class = + is_storage ? spv::StorageClass::StorageBuffer : spv::StorageClass::Uniform; + const Id struct_pointer_type{TypePointer(storage_class, struct_type)}; + const Id pointer_type = TypePointer(storage_class, data_type); + const Id id{AddGlobalVariable(struct_pointer_type, storage_class)}; + Decorate(id, spv::Decoration::Binding, binding.unified); + Decorate(id, spv::Decoration::DescriptorSet, 0U); + if (is_storage && !is_written) { + Decorate(id, spv::Decoration::NonWritable); + } + switch (buffer_type) { + case Shader::BufferType::GdsBuffer: + Name(id, "gds_buffer"); + break; + case Shader::BufferType::ReadConstUbo: Name(id, "srt_flatbuf_ubo"); - - srt_flatbuf = { - .id = id, - .binding = binding.buffer++, - .pointer_type = pointer_type, - }; - interfaces.push_back(id); + break; + case Shader::BufferType::SharedMemory: + Name(id, "ssbo_shmem"); + break; + default: + Name(id, fmt::format("{}_{}", is_storage ? "ssbo" : "ubo", binding.buffer)); + break; } + interfaces.push_back(id); + return {id, pointer_type}; +}; +void EmitContext::DefineBuffers() { + if (!profile.supports_robust_buffer_access && !info.has_readconst) { + // In case ReadConstUbo has not already been bound by IR and is needed + // to query buffer sizes, bind it now. + info.buffers.push_back({ + .used_types = IR::Type::U32, + .inline_cbuf = AmdGpu::Buffer::Null(), + .buffer_type = BufferType::ReadConstUbo, + }); + } for (const auto& desc : info.buffers) { - const auto sharp = desc.GetSharp(info); - const bool is_storage = desc.IsStorage(sharp); - const u32 array_size = sharp.NumDwords() != 0 ? sharp.NumDwords() : MaxUboDwords; - const auto* data_types = True(desc.used_types & IR::Type::F32) ? &F32 : &U32; - const Id data_type = (*data_types)[1]; - const Id record_array_type{is_storage ? TypeRuntimeArray(data_type) - : TypeArray(data_type, ConstU32(array_size))}; - const Id struct_type{define_struct(record_array_type, desc.is_instance_data)}; + const auto buf_sharp = desc.GetSharp(info); + const bool is_storage = desc.IsStorage(buf_sharp, profile); - const auto storage_class = - is_storage ? spv::StorageClass::StorageBuffer : spv::StorageClass::Uniform; - const Id struct_pointer_type{TypePointer(storage_class, struct_type)}; - const Id pointer_type = TypePointer(storage_class, data_type); - const Id id{AddGlobalVariable(struct_pointer_type, storage_class)}; - Decorate(id, spv::Decoration::Binding, binding.unified++); - Decorate(id, spv::Decoration::DescriptorSet, 0U); - if (is_storage && !desc.is_written) { - Decorate(id, spv::Decoration::NonWritable); + // Define aliases depending on the shader usage. + auto& spv_buffer = buffers.emplace_back(binding.buffer++, desc.buffer_type); + if (True(desc.used_types & IR::Type::U32)) { + spv_buffer[BufferAlias::U32] = + DefineBuffer(is_storage, desc.is_written, 2, desc.buffer_type, U32[1]); } - Name(id, fmt::format("{}_{}", is_storage ? "ssbo" : "cbuf", desc.sharp_idx)); - - buffers.push_back({ - .id = id, - .binding = binding.buffer++, - .data_types = data_types, - .pointer_type = pointer_type, - }); - interfaces.push_back(id); - } -} - -void EmitContext::DefineTextureBuffers() { - for (const auto& desc : info.texture_buffers) { - const auto sharp = desc.GetSharp(info); - const auto nfmt = sharp.GetNumberFmt(); - const bool is_integer = AmdGpu::IsInteger(nfmt); - const VectorIds& sampled_type{GetAttributeType(*this, nfmt)}; - const u32 sampled = desc.is_written ? 2 : 1; - const Id image_type{TypeImage(sampled_type[1], spv::Dim::Buffer, false, false, false, - sampled, spv::ImageFormat::Unknown)}; - const Id pointer_type{TypePointer(spv::StorageClass::UniformConstant, image_type)}; - const Id id{AddGlobalVariable(pointer_type, spv::StorageClass::UniformConstant)}; - Decorate(id, spv::Decoration::Binding, binding.unified++); - Decorate(id, spv::Decoration::DescriptorSet, 0U); - Name(id, fmt::format("{}_{}", desc.is_written ? "imgbuf" : "texbuf", desc.sharp_idx)); - texture_buffers.push_back({ - .id = id, - .binding = binding.buffer++, - .image_type = image_type, - .result_type = sampled_type[4], - .is_integer = is_integer, - .is_storage = desc.is_written, - }); - interfaces.push_back(id); + if (True(desc.used_types & IR::Type::F32)) { + spv_buffer[BufferAlias::F32] = + DefineBuffer(is_storage, desc.is_written, 2, desc.buffer_type, F32[1]); + } + if (True(desc.used_types & IR::Type::U16)) { + spv_buffer[BufferAlias::U16] = + DefineBuffer(is_storage, desc.is_written, 1, desc.buffer_type, U16); + } + if (True(desc.used_types & IR::Type::U8)) { + spv_buffer[BufferAlias::U8] = + DefineBuffer(is_storage, desc.is_written, 0, desc.buffer_type, U8); + } + ++binding.unified; } } @@ -773,8 +820,8 @@ spv::ImageFormat GetFormat(const AmdGpu::Image& image) { Id ImageType(EmitContext& ctx, const ImageResource& desc, Id sampled_type) { const auto image = desc.GetSharp(ctx.info); const auto format = desc.is_atomic ? GetFormat(image) : spv::ImageFormat::Unknown; - const auto type = image.GetBoundType(); - const u32 sampled = desc.IsStorage(image) ? 2 : 1; + const auto type = image.GetViewType(desc.is_array); + const u32 sampled = desc.is_written ? 2 : 1; switch (type) { case AmdGpu::ImageType::Color1D: return ctx.TypeImage(sampled_type, spv::Dim::Dim1D, false, false, false, sampled, format); @@ -788,9 +835,6 @@ Id ImageType(EmitContext& ctx, const ImageResource& desc, Id sampled_type) { return ctx.TypeImage(sampled_type, spv::Dim::Dim2D, false, false, true, sampled, format); case AmdGpu::ImageType::Color3D: return ctx.TypeImage(sampled_type, spv::Dim::Dim3D, false, false, false, sampled, format); - case AmdGpu::ImageType::Cube: - return ctx.TypeImage(sampled_type, spv::Dim::Cube, false, desc.is_array, false, sampled, - format); default: break; } @@ -802,7 +846,7 @@ void EmitContext::DefineImagesAndSamplers() { const auto sharp = image_desc.GetSharp(info); const auto nfmt = sharp.GetNumberFmt(); const bool is_integer = AmdGpu::IsInteger(nfmt); - const bool is_storage = image_desc.IsStorage(sharp); + const bool is_storage = image_desc.is_written; const VectorIds& data_types = GetAttributeType(*this, nfmt); const Id sampled_type = data_types[1]; const Id image_type{ImageType(*this, image_desc, sampled_type)}; @@ -817,6 +861,7 @@ void EmitContext::DefineImagesAndSamplers() { .sampled_type = is_storage ? sampled_type : TypeSampledImage(image_type), .pointer_type = pointer_type, .image_type = image_type, + .view_type = sharp.GetViewType(image_desc.is_array), .is_integer = is_integer, .is_storage = is_storage, }); @@ -841,20 +886,131 @@ void EmitContext::DefineImagesAndSamplers() { } void EmitContext::DefineSharedMemory() { - static constexpr size_t DefaultSharedMemSize = 2_KB; if (!info.uses_shared) { return; } - u32 shared_memory_size = runtime_info.cs_info.shared_memory_size; - if (shared_memory_size == 0) { - shared_memory_size = DefaultSharedMemSize; - } + ASSERT(info.stage == Stage::Compute); + const u32 shared_memory_size = runtime_info.cs_info.shared_memory_size; const u32 num_elements{Common::DivCeil(shared_memory_size, 4U)}; const Id type{TypeArray(U32[1], ConstU32(num_elements))}; shared_memory_u32_type = TypePointer(spv::StorageClass::Workgroup, type); shared_u32 = TypePointer(spv::StorageClass::Workgroup, U32[1]); shared_memory_u32 = AddGlobalVariable(shared_memory_u32_type, spv::StorageClass::Workgroup); + Name(shared_memory_u32, "shared_mem"); interfaces.push_back(shared_memory_u32); } +Id EmitContext::DefineFloat32ToUfloatM5(u32 mantissa_bits, const std::string_view name) { + // https://gitlab.freedesktop.org/mesa/mesa/-/blob/main/src/util/format_r11g11b10f.h + const auto func_type{TypeFunction(U32[1], F32[1])}; + const auto func{OpFunction(U32[1], spv::FunctionControlMask::MaskNone, func_type)}; + const auto value{OpFunctionParameter(F32[1])}; + Name(func, name); + AddLabel(); + + const auto raw_value{OpBitcast(U32[1], value)}; + const auto exponent{ + OpBitcast(S32[1], OpBitFieldSExtract(U32[1], raw_value, ConstU32(23U), ConstU32(8U)))}; + const auto sign{OpBitFieldUExtract(U32[1], raw_value, ConstU32(31U), ConstU32(1U))}; + + const auto is_zero{OpLogicalOr(U1[1], OpIEqual(U1[1], raw_value, ConstU32(0U)), + OpIEqual(U1[1], sign, ConstU32(1U)))}; + const auto is_nan{OpIsNan(U1[1], value)}; + const auto is_inf{OpIsInf(U1[1], value)}; + const auto is_denorm{OpSLessThanEqual(U1[1], exponent, ConstS32(-15))}; + + const auto denorm_mantissa{OpConvertFToU( + U32[1], + OpRoundEven(F32[1], OpFMul(F32[1], value, + ConstF32(static_cast(1 << (mantissa_bits + 14))))))}; + const auto denorm_overflow{ + OpINotEqual(U1[1], OpShiftRightLogical(U32[1], denorm_mantissa, ConstU32(mantissa_bits)), + ConstU32(0U))}; + const auto denorm{ + OpSelect(U32[1], denorm_overflow, ConstU32(1U << mantissa_bits), denorm_mantissa)}; + + const auto norm_mantissa{OpConvertFToU( + U32[1], + OpRoundEven(F32[1], + OpLdexp(F32[1], value, + OpISub(S32[1], ConstS32(static_cast(mantissa_bits)), exponent))))}; + const auto norm_overflow{ + OpUGreaterThanEqual(U1[1], norm_mantissa, ConstU32(2U << mantissa_bits))}; + const auto norm_final_mantissa{OpBitwiseAnd( + U32[1], + OpSelect(U32[1], norm_overflow, OpShiftRightLogical(U32[1], norm_mantissa, ConstU32(1U)), + norm_mantissa), + ConstU32((1U << mantissa_bits) - 1))}; + const auto norm_final_exponent{OpBitcast( + U32[1], + OpIAdd(S32[1], + OpSelect(S32[1], norm_overflow, OpIAdd(S32[1], exponent, ConstS32(1)), exponent), + ConstS32(15)))}; + const auto norm{OpBitFieldInsert(U32[1], norm_final_mantissa, norm_final_exponent, + ConstU32(mantissa_bits), ConstU32(5U))}; + + const auto result{OpSelect(U32[1], is_zero, ConstU32(0U), + OpSelect(U32[1], is_nan, ConstU32(31u << mantissa_bits | 1U), + OpSelect(U32[1], is_inf, ConstU32(31U << mantissa_bits), + OpSelect(U32[1], is_denorm, denorm, norm))))}; + + OpReturnValue(result); + OpFunctionEnd(); + return func; +} + +Id EmitContext::DefineUfloatM5ToFloat32(u32 mantissa_bits, const std::string_view name) { + // https://gitlab.freedesktop.org/mesa/mesa/-/blob/main/src/util/format_r11g11b10f.h + const auto func_type{TypeFunction(F32[1], U32[1])}; + const auto func{OpFunction(F32[1], spv::FunctionControlMask::MaskNone, func_type)}; + const auto value{OpFunctionParameter(U32[1])}; + Name(func, name); + AddLabel(); + + const auto raw_mantissa{ + OpBitFieldUExtract(U32[1], value, ConstU32(0U), ConstU32(mantissa_bits))}; + const auto mantissa{OpConvertUToF(F32[1], raw_mantissa)}; + const auto exponent{OpBitcast( + S32[1], OpBitFieldSExtract(U32[1], value, ConstU32(mantissa_bits), ConstU32(5U)))}; + + const auto is_exp_neg_one{OpIEqual(U1[1], exponent, ConstS32(-1))}; + const auto is_exp_zero{OpIEqual(U1[1], exponent, ConstS32(0))}; + + const auto is_zero{OpIEqual(U1[1], value, ConstU32(0u))}; + const auto is_nan{ + OpLogicalAnd(U1[1], is_exp_neg_one, OpINotEqual(U1[1], raw_mantissa, ConstU32(0u)))}; + const auto is_inf{ + OpLogicalAnd(U1[1], is_exp_neg_one, OpIEqual(U1[1], raw_mantissa, ConstU32(0u)))}; + const auto is_denorm{ + OpLogicalAnd(U1[1], is_exp_zero, OpINotEqual(U1[1], raw_mantissa, ConstU32(0u)))}; + + const auto denorm{OpFMul(F32[1], mantissa, ConstF32(1.f / (1 << 20)))}; + const auto norm{OpLdexp( + F32[1], + OpFAdd(F32[1], + OpFMul(F32[1], mantissa, ConstF32(1.f / static_cast(1 << mantissa_bits))), + ConstF32(1.f)), + exponent)}; + + const auto result{OpSelect(F32[1], is_zero, ConstF32(0.f), + OpSelect(F32[1], is_nan, ConstF32(NAN), + OpSelect(F32[1], is_inf, ConstF32(INFINITY), + OpSelect(F32[1], is_denorm, denorm, norm))))}; + + OpReturnValue(result); + OpFunctionEnd(); + return func; +} + +void EmitContext::DefineFunctions() { + if (info.uses_pack_10_11_11) { + f32_to_uf11 = DefineFloat32ToUfloatM5(6, "f32_to_uf11"); + f32_to_uf10 = DefineFloat32ToUfloatM5(5, "f32_to_uf10"); + } + if (info.uses_unpack_10_11_11) { + uf11_to_f32 = DefineUfloatM5ToFloat32(6, "uf11_to_f32"); + uf10_to_f32 = DefineUfloatM5ToFloat32(5, "uf10_to_f32"); + } +} + } // namespace Shader::Backend::SPIRV diff --git a/src/shader_recompiler/backend/spirv/spirv_emit_context.h b/src/shader_recompiler/backend/spirv/spirv_emit_context.h index 583d96b99..784748658 100644 --- a/src/shader_recompiler/backend/spirv/spirv_emit_context.h +++ b/src/shader_recompiler/backend/spirv/spirv_emit_context.h @@ -8,7 +8,7 @@ #include "shader_recompiler/backend/bindings.h" #include "shader_recompiler/info.h" -#include "shader_recompiler/ir/program.h" +#include "shader_recompiler/ir/value.h" #include "shader_recompiler/profile.h" namespace Shader::Backend::SPIRV { @@ -37,14 +37,15 @@ struct VectorIds { class EmitContext final : public Sirit::Module { public: - explicit EmitContext(const Profile& profile, const RuntimeInfo& runtime_info, const Info& info, + explicit EmitContext(const Profile& profile, const RuntimeInfo& runtime_info, Info& info, Bindings& binding); ~EmitContext(); Id Def(const IR::Value& value); - void DefineBufferOffsets(); + void DefineBufferProperties(); void DefineInterpolatedAttribs(); + void DefineWorkgroupIndex(); [[nodiscard]] Id DefineInput(Id type, std::optional location = std::nullopt, std::optional builtin = std::nullopt) { @@ -132,7 +133,7 @@ public: return ConstantComposite(type, constituents); } - const Info& info; + Info& info; const RuntimeInfo& runtime_info; const Profile& profile; Stage stage; @@ -200,8 +201,10 @@ public: std::array patches{}; Id workgroup_id{}; + Id num_workgroups_id{}; + Id workgroup_index_id{}; Id local_invocation_id{}; - Id invocation_id{}; // for instanced geoshaders or output vertices within TCS patch + Id invocation_id{}; Id subgroup_local_invocation_id{}; Id image_u32{}; @@ -222,33 +225,46 @@ public: Id sampled_type; Id pointer_type; Id image_type; + AmdGpu::ImageType view_type; bool is_integer = false; bool is_storage = false; }; + enum class BufferAlias : u32 { + U8, + U16, + U32, + F32, + NumAlias, + }; + + struct BufferSpv { + Id id; + Id pointer_type; + }; + struct BufferDefinition { - Id id; + u32 binding; + BufferType buffer_type; Id offset; Id offset_dwords; - u32 binding; - const VectorIds* data_types; - Id pointer_type; - }; - struct TextureBufferDefinition { - Id id; - Id coord_offset; - Id coord_shift; - u32 binding; - Id image_type; - Id result_type; - bool is_integer = false; - bool is_storage = false; + Id size; + Id size_shorts; + Id size_dwords; + std::array aliases; + + const BufferSpv& operator[](BufferAlias alias) const { + return aliases[u32(alias)]; + } + + BufferSpv& operator[](BufferAlias alias) { + return aliases[u32(alias)]; + } }; Bindings& binding; + boost::container::small_vector buf_type_ids; boost::container::small_vector buffers; - boost::container::small_vector texture_buffers; - BufferDefinition srt_flatbuf; boost::container::small_vector images; boost::container::small_vector samplers; @@ -270,6 +286,11 @@ public: std::array output_params{}; std::array frag_outputs{}; + Id uf11_to_f32{}; + Id f32_to_uf11{}; + Id uf10_to_f32{}; + Id f32_to_uf10{}; + private: void DefineArithmeticTypes(); void DefineInterfaces(); @@ -277,12 +298,20 @@ private: void DefineOutputs(); void DefinePushDataBlock(); void DefineBuffers(); - void DefineTextureBuffers(); void DefineImagesAndSamplers(); void DefineSharedMemory(); + void DefineFunctions(); SpirvAttribute GetAttributeInfo(AmdGpu::NumberFormat fmt, Id id, u32 num_components, bool output); + + BufferSpv DefineBuffer(bool is_storage, bool is_written, u32 elem_shift, BufferType buffer_type, + Id data_type); + + Id DefineFloat32ToUfloatM5(u32 mantissa_bits, std::string_view name); + Id DefineUfloatM5ToFloat32(u32 mantissa_bits, std::string_view name); + + Id GetBufferSize(u32 sharp_idx); }; } // namespace Shader::Backend::SPIRV diff --git a/src/shader_recompiler/frontend/control_flow_graph.cpp b/src/shader_recompiler/frontend/control_flow_graph.cpp index 0816ec088..cf1882b8c 100644 --- a/src/shader_recompiler/frontend/control_flow_graph.cpp +++ b/src/shader_recompiler/frontend/control_flow_graph.cpp @@ -2,6 +2,7 @@ // SPDX-License-Identifier: GPL-2.0-or-later #include +#include #include "common/assert.h" #include "shader_recompiler/frontend/control_flow_graph.h" @@ -39,21 +40,31 @@ static IR::Condition MakeCondition(const GcnInst& inst) { return IR::Condition::Execz; case Opcode::S_CBRANCH_EXECNZ: return IR::Condition::Execnz; - case Opcode::S_AND_SAVEEXEC_B64: - case Opcode::S_ANDN2_B64: - return IR::Condition::Execnz; default: return IR::Condition::True; } } -static bool IgnoresExecMask(Opcode opcode) { - switch (opcode) { - case Opcode::V_WRITELANE_B32: +static bool IgnoresExecMask(const GcnInst& inst) { + // EXEC mask does not affect scalar instructions or branches. + switch (inst.category) { + case InstCategory::ScalarALU: + case InstCategory::ScalarMemory: + case InstCategory::FlowControl: return true; default: - return false; + break; } + // Read/Write Lane instructions are not affected either. + switch (inst.opcode) { + case Opcode::V_READLANE_B32: + case Opcode::V_WRITELANE_B32: + case Opcode::V_READFIRSTLANE_B32: + return true; + default: + break; + } + return false; } static constexpr size_t LabelReserveSize = 32; @@ -63,9 +74,9 @@ CFG::CFG(Common::ObjectPool& block_pool_, std::span inst_l index_to_pc.resize(inst_list.size() + 1); labels.reserve(LabelReserveSize); EmitLabels(); - EmitDivergenceLabels(); EmitBlocks(); LinkBlocks(); + SplitDivergenceScopes(); } void CFG::EmitLabels() { @@ -99,7 +110,7 @@ void CFG::EmitLabels() { std::ranges::sort(labels); } -void CFG::EmitDivergenceLabels() { +void CFG::SplitDivergenceScopes() { const auto is_open_scope = [](const GcnInst& inst) { // An open scope instruction is an instruction that modifies EXEC // but also saves the previous value to restore later. This indicates @@ -123,22 +134,13 @@ void CFG::EmitDivergenceLabels() { (inst.opcode == Opcode::S_ANDN2_B64 && inst.dst[0].field == OperandField::ExecLo); }; - // Since we will be adding new labels, avoid iterating those as well. - const size_t end_size = labels.size(); - for (u32 l = 0; l < end_size; l++) { - const Label start = labels[l]; - // Stop if we reached end of existing labels. - if (l == end_size - 1) { - break; - } - const Label end = labels[l + 1]; - const size_t end_index = GetIndex(end); - + for (auto blk = blocks.begin(); blk != blocks.end(); blk++) { + auto next_blk = std::next(blk); s32 curr_begin = -1; - for (size_t index = GetIndex(start); index < end_index; index++) { + for (size_t index = blk->begin_index; index <= blk->end_index; index++) { const auto& inst = inst_list[index]; const bool is_close = is_close_scope(inst); - if ((is_close || index == end_index - 1) && curr_begin != -1) { + if ((is_close || index == blk->end_index) && curr_begin != -1) { // If there are no instructions inside scope don't do anything. if (index - curr_begin == 1) { curr_begin = -1; @@ -147,23 +149,72 @@ void CFG::EmitDivergenceLabels() { // If all instructions in the scope ignore exec masking, we shouldn't insert a // scope. const auto start = inst_list.begin() + curr_begin + 1; - if (!std::ranges::all_of(start, inst_list.begin() + index, IgnoresExecMask, - &GcnInst::opcode)) { - // Add a label to the instruction right after the open scope call. - // It is the start of a new basic block. - const auto& save_inst = inst_list[curr_begin]; - const Label label = index_to_pc[curr_begin] + save_inst.length; - AddLabel(label); - // Add a label to the close scope instruction. - // There are 3 cases where we need to close a scope. - // * Close scope instruction inside the block - // * Close scope instruction at the end of the block (cbranch or endpgm) - // * Normal instruction at the end of the block - // For the last case we must NOT add a label as that would cause - // the instruction to be separated into its own basic block. - if (is_close) { - AddLabel(index_to_pc[index]); + if (!std::ranges::all_of(start, inst_list.begin() + index, IgnoresExecMask)) { + // Determine the first instruction affected by the exec mask. + do { + ++curr_begin; + } while (IgnoresExecMask(inst_list[curr_begin])); + + // Determine the last instruction affected by the exec mask. + s32 curr_end = index; + while (IgnoresExecMask(inst_list[curr_end])) { + --curr_end; } + + // Create a new block for the divergence scope. + Block* block = block_pool.Create(); + block->begin = index_to_pc[curr_begin]; + block->end = index_to_pc[curr_end]; + block->begin_index = curr_begin; + block->end_index = curr_end; + block->end_inst = inst_list[curr_end]; + blocks.insert_before(next_blk, *block); + + // If we are inside the parent block, make an epilogue block and jump to it. + if (curr_end != blk->end_index) { + Block* epi_block = block_pool.Create(); + epi_block->begin = index_to_pc[curr_end + 1]; + epi_block->end = blk->end; + epi_block->begin_index = curr_end + 1; + epi_block->end_index = blk->end_index; + epi_block->end_inst = blk->end_inst; + epi_block->cond = blk->cond; + epi_block->end_class = blk->end_class; + epi_block->branch_true = blk->branch_true; + epi_block->branch_false = blk->branch_false; + blocks.insert_before(next_blk, *epi_block); + + // Have divergence block always jump to epilogue block. + block->cond = IR::Condition::True; + block->branch_true = epi_block; + block->branch_false = nullptr; + + // If the parent block fails to enter divergence block make it jump to + // epilogue too + blk->branch_false = epi_block; + } else { + // No epilogue block is needed since the divergence block + // also ends the parent block. Inherit the end condition. + auto& parent_blk = *blk; + ASSERT(blk->cond == IR::Condition::True && blk->branch_true); + block->cond = IR::Condition::True; + block->branch_true = blk->branch_true; + block->branch_false = nullptr; + + // If the parent block didn't enter the divergence scope + // have it jump directly to the next one + blk->branch_false = blk->branch_true; + } + + // Shrink parent block to end right before curr_begin + // and make it jump to divergence block + --curr_begin; + blk->end = index_to_pc[curr_begin]; + blk->end_index = curr_begin; + blk->end_inst = inst_list[curr_begin]; + blk->cond = IR::Condition::Execnz; + blk->end_class = EndClass::Branch; + blk->branch_true = block; } // Reset scope begin. curr_begin = -1; @@ -174,9 +225,6 @@ void CFG::EmitDivergenceLabels() { } } } - - // Sort labels to make sure block insertion is correct. - std::ranges::sort(labels); } void CFG::EmitBlocks() { @@ -217,22 +265,6 @@ void CFG::LinkBlocks() { for (auto it = blocks.begin(); it != blocks.end(); it++) { auto& block = *it; const auto end_inst{block.end_inst}; - // Handle divergence block inserted here. - if (end_inst.opcode == Opcode::S_AND_SAVEEXEC_B64 || - end_inst.opcode == Opcode::S_ANDN2_B64 || end_inst.IsCmpx()) { - // Blocks are stored ordered by address in the set - auto next_it = std::next(it); - auto* target_block = &(*next_it); - ++target_block->num_predecessors; - block.branch_true = target_block; - - auto merge_it = std::next(next_it); - auto* merge_block = &(*merge_it); - ++merge_block->num_predecessors; - block.branch_false = merge_block; - block.end_class = EndClass::Branch; - continue; - } // If the block doesn't end with a branch we simply // need to link with the next block. diff --git a/src/shader_recompiler/frontend/control_flow_graph.h b/src/shader_recompiler/frontend/control_flow_graph.h index d98d4b05d..0acce3306 100644 --- a/src/shader_recompiler/frontend/control_flow_graph.h +++ b/src/shader_recompiler/frontend/control_flow_graph.h @@ -57,9 +57,9 @@ public: private: void EmitLabels(); - void EmitDivergenceLabels(); void EmitBlocks(); void LinkBlocks(); + void SplitDivergenceScopes(); void AddLabel(Label address) { const auto it = std::ranges::find(labels, address); diff --git a/src/shader_recompiler/frontend/decode.cpp b/src/shader_recompiler/frontend/decode.cpp index a5187aebd..20b78e869 100644 --- a/src/shader_recompiler/frontend/decode.cpp +++ b/src/shader_recompiler/frontend/decode.cpp @@ -259,9 +259,9 @@ void GcnDecodeContext::updateInstructionMeta(InstEncoding encoding) { ASSERT_MSG(instFormat.src_type != ScalarType::Undefined && instFormat.dst_type != ScalarType::Undefined, - "Instruction format table incomplete for opcode {} ({}, encoding = {})", + "Instruction format table incomplete for opcode {} ({}, encoding = 0x{:x})", magic_enum::enum_name(m_instruction.opcode), u32(m_instruction.opcode), - magic_enum::enum_name(encoding)); + u32(encoding)); m_instruction.inst_class = instFormat.inst_class; m_instruction.category = instFormat.inst_category; diff --git a/src/shader_recompiler/frontend/fetch_shader.cpp b/src/shader_recompiler/frontend/fetch_shader.cpp index 8ae664d79..55508b0f2 100644 --- a/src/shader_recompiler/frontend/fetch_shader.cpp +++ b/src/shader_recompiler/frontend/fetch_shader.cpp @@ -9,6 +9,12 @@ namespace Shader::Gcn { +const u32* GetFetchShaderCode(const Info& info, u32 sgpr_base) { + const u32* code; + std::memcpy(&code, &info.user_data[sgpr_base], sizeof(code)); + return code; +} + /** * s_load_dwordx4 s[8:11], s[2:3], 0x00 * s_load_dwordx4 s[12:15], s[2:3], 0x04 @@ -38,9 +44,8 @@ std::optional ParseFetchShader(const Shader::Info& info) { if (!info.has_fetch_shader) { return std::nullopt; } - const u32* code; - std::memcpy(&code, &info.user_data[info.fetch_shader_sgpr_base], sizeof(code)); + const auto* code = GetFetchShaderCode(info, info.fetch_shader_sgpr_base); FetchShaderData data{.code = code}; GcnCodeSlice code_slice(code, code + std::numeric_limits::max()); GcnDecodeContext decoder; diff --git a/src/shader_recompiler/frontend/fetch_shader.h b/src/shader_recompiler/frontend/fetch_shader.h index 080b0eb22..837caafa0 100644 --- a/src/shader_recompiler/frontend/fetch_shader.h +++ b/src/shader_recompiler/frontend/fetch_shader.h @@ -64,6 +64,8 @@ struct FetchShaderData { } }; +const u32* GetFetchShaderCode(const Info& info, u32 sgpr_base); + std::optional ParseFetchShader(const Shader::Info& info); } // namespace Shader::Gcn diff --git a/src/shader_recompiler/frontend/format.cpp b/src/shader_recompiler/frontend/format.cpp index 9677be3e5..76b1cc818 100644 --- a/src/shader_recompiler/frontend/format.cpp +++ b/src/shader_recompiler/frontend/format.cpp @@ -1836,7 +1836,9 @@ constexpr std::array InstructionFormatVOP1 = {{ {InstClass::VectorConv, InstCategory::VectorALU, 1, 1, ScalarType::Float64, ScalarType::Uint32}, // 22 = V_CVT_F64_U32 {InstClass::VectorConv, InstCategory::VectorALU, 1, 1, ScalarType::Uint32, ScalarType::Float64}, - {}, + // 23 = V_TRUNC_F64 + {InstClass::VectorConv, InstCategory::VectorALU, 1, 1, ScalarType::Float64, + ScalarType::Float64}, {}, {}, {}, @@ -3420,8 +3422,8 @@ constexpr std::array InstructionFormatMIMG = {{ {InstClass::VectorMemImgUt, InstCategory::VectorMemory, 4, 1, ScalarType::Uint32, ScalarType::Uint32}, // 15 = IMAGE_ATOMIC_SWAP - {InstClass::VectorMemImgNoSmp, InstCategory::VectorMemory, 4, 1, ScalarType::Undefined, - ScalarType::Undefined}, + {InstClass::VectorMemImgNoSmp, InstCategory::VectorMemory, 4, 1, ScalarType::Uint32, + ScalarType::Uint32}, // 16 = IMAGE_ATOMIC_CMPSWAP {InstClass::VectorMemImgNoSmp, InstCategory::VectorMemory, 4, 1, ScalarType::Undefined, ScalarType::Undefined}, diff --git a/src/shader_recompiler/frontend/translate/data_share.cpp b/src/shader_recompiler/frontend/translate/data_share.cpp index 62c0423dd..22f5b8644 100644 --- a/src/shader_recompiler/frontend/translate/data_share.cpp +++ b/src/shader_recompiler/frontend/translate/data_share.cpp @@ -61,6 +61,8 @@ void Translator::EmitDataShare(const GcnInst& inst) { return DS_WRITE(64, false, false, false, inst); case Opcode::DS_WRITE2_B64: return DS_WRITE(64, false, true, false, inst); + case Opcode::DS_WRITE2ST64_B64: + return DS_WRITE(64, false, true, true, inst); case Opcode::DS_READ_B64: return DS_READ(64, false, false, false, inst); case Opcode::DS_READ2_B64: @@ -176,6 +178,13 @@ void Translator::DS_WRITE(int bit_size, bool is_signed, bool is_pair, bool strid const IR::U32 addr{ir.GetVectorReg(IR::VectorReg(inst.src[0].code))}; const IR::VectorReg data0{inst.src[1].code}; const IR::VectorReg data1{inst.src[2].code}; + const u32 offset = (inst.control.ds.offset1 << 8u) + inst.control.ds.offset0; + if (info.stage == Stage::Fragment) { + ASSERT_MSG(!is_pair && bit_size == 32 && offset % 256 == 0, + "Unexpected shared memory offset alignment: {}", offset); + ir.SetVectorReg(GetScratchVgpr(offset), ir.GetVectorReg(data0)); + return; + } if (is_pair) { const u32 adj = (bit_size == 32 ? 4 : 8) * (stride64 ? 64 : 1); const IR::U32 addr0 = ir.IAdd(addr, ir.Imm32(u32(inst.control.ds.offset0 * adj))); @@ -195,14 +204,12 @@ void Translator::DS_WRITE(int bit_size, bool is_signed, bool is_pair, bool strid addr1); } } else if (bit_size == 64) { - const IR::U32 addr0 = ir.IAdd( - addr, ir.Imm32((u32(inst.control.ds.offset1) << 8u) + u32(inst.control.ds.offset0))); + const IR::U32 addr0 = ir.IAdd(addr, ir.Imm32(offset)); const IR::Value data = ir.CompositeConstruct(ir.GetVectorReg(data0), ir.GetVectorReg(data0 + 1)); ir.WriteShared(bit_size, data, addr0); } else { - const IR::U32 addr0 = ir.IAdd( - addr, ir.Imm32((u32(inst.control.ds.offset1) << 8u) + u32(inst.control.ds.offset0))); + const IR::U32 addr0 = ir.IAdd(addr, ir.Imm32(offset)); ir.WriteShared(bit_size, ir.GetVectorReg(data0), addr0); } } @@ -223,6 +230,13 @@ void Translator::DS_READ(int bit_size, bool is_signed, bool is_pair, bool stride const GcnInst& inst) { const IR::U32 addr{ir.GetVectorReg(IR::VectorReg(inst.src[0].code))}; IR::VectorReg dst_reg{inst.dst[0].code}; + const u32 offset = (inst.control.ds.offset1 << 8u) + inst.control.ds.offset0; + if (info.stage == Stage::Fragment) { + ASSERT_MSG(!is_pair && bit_size == 32 && offset % 256 == 0, + "Unexpected shared memory offset alignment: {}", offset); + ir.SetVectorReg(dst_reg, ir.GetVectorReg(GetScratchVgpr(offset))); + return; + } if (is_pair) { // Pair loads are either 32 or 64-bit const u32 adj = (bit_size == 32 ? 4 : 8) * (stride64 ? 64 : 1); @@ -243,14 +257,12 @@ void Translator::DS_READ(int bit_size, bool is_signed, bool is_pair, bool stride ir.SetVectorReg(dst_reg++, IR::U32{ir.CompositeExtract(data1, 1)}); } } else if (bit_size == 64) { - const IR::U32 addr0 = ir.IAdd( - addr, ir.Imm32((u32(inst.control.ds.offset1) << 8u) + u32(inst.control.ds.offset0))); + const IR::U32 addr0 = ir.IAdd(addr, ir.Imm32(offset)); const IR::Value data = ir.LoadShared(bit_size, is_signed, addr0); ir.SetVectorReg(dst_reg, IR::U32{ir.CompositeExtract(data, 0)}); ir.SetVectorReg(dst_reg + 1, IR::U32{ir.CompositeExtract(data, 1)}); } else { - const IR::U32 addr0 = ir.IAdd( - addr, ir.Imm32((u32(inst.control.ds.offset1) << 8u) + u32(inst.control.ds.offset0))); + const IR::U32 addr0 = ir.IAdd(addr, ir.Imm32(offset)); const IR::U32 data = IR::U32{ir.LoadShared(bit_size, is_signed, addr0)}; ir.SetVectorReg(dst_reg, data); } diff --git a/src/shader_recompiler/frontend/translate/export.cpp b/src/shader_recompiler/frontend/translate/export.cpp index 83240e17f..0abef2e81 100644 --- a/src/shader_recompiler/frontend/translate/export.cpp +++ b/src/shader_recompiler/frontend/translate/export.cpp @@ -2,10 +2,130 @@ // SPDX-License-Identifier: GPL-2.0-or-later #include "shader_recompiler/frontend/translate/translate.h" +#include "shader_recompiler/ir/reinterpret.h" #include "shader_recompiler/runtime_info.h" namespace Shader::Gcn { +u32 SwizzleMrtComponent(const PsColorBuffer& color_buffer, u32 comp) { + const auto [r, g, b, a] = color_buffer.swizzle; + const std::array swizzle_array = {r, g, b, a}; + const auto swizzled_comp_type = static_cast(swizzle_array[comp]); + constexpr auto min_comp_type = static_cast(AmdGpu::CompSwizzle::Red); + return swizzled_comp_type >= min_comp_type ? swizzled_comp_type - min_comp_type : comp; +} + +void Translator::ExportMrtValue(IR::Attribute attribute, u32 comp, const IR::F32& value, + const PsColorBuffer& color_buffer) { + auto converted = ApplyWriteNumberConversion(ir, value, color_buffer.num_conversion); + if (color_buffer.needs_unorm_fixup) { + // FIXME: Fix-up for GPUs where float-to-unorm rounding is off from expected. + converted = ir.FPSub(converted, ir.Imm32(1.f / 127500.f)); + } + ir.SetAttribute(attribute, converted, comp); +} + +void Translator::ExportMrtCompressed(IR::Attribute attribute, u32 idx, const IR::U32& value) { + const u32 color_buffer_idx = + static_cast(attribute) - static_cast(IR::Attribute::RenderTarget0); + const auto color_buffer = runtime_info.fs_info.color_buffers[color_buffer_idx]; + + AmdGpu::NumberFormat num_format; + switch (color_buffer.export_format) { + case AmdGpu::Liverpool::ShaderExportFormat::Zero: + // No export + return; + case AmdGpu::Liverpool::ShaderExportFormat::ABGR_FP16: + num_format = AmdGpu::NumberFormat::Float; + break; + case AmdGpu::Liverpool::ShaderExportFormat::ABGR_UNORM16: + num_format = AmdGpu::NumberFormat::Unorm; + break; + case AmdGpu::Liverpool::ShaderExportFormat::ABGR_SNORM16: + num_format = AmdGpu::NumberFormat::Snorm; + break; + case AmdGpu::Liverpool::ShaderExportFormat::ABGR_UINT16: + num_format = AmdGpu::NumberFormat::Uint; + break; + case AmdGpu::Liverpool::ShaderExportFormat::ABGR_SINT16: + num_format = AmdGpu::NumberFormat::Sint; + break; + default: + UNREACHABLE_MSG("Unimplemented compressed MRT export format {}", + static_cast(color_buffer.export_format)); + break; + } + + const auto unpacked_value = ir.Unpack2x16(num_format, value); + const IR::F32 r = IR::F32{ir.CompositeExtract(unpacked_value, 0)}; + const IR::F32 g = IR::F32{ir.CompositeExtract(unpacked_value, 1)}; + + const auto swizzled_r = SwizzleMrtComponent(color_buffer, idx * 2); + const auto swizzled_g = SwizzleMrtComponent(color_buffer, idx * 2 + 1); + + ExportMrtValue(attribute, swizzled_r, r, color_buffer); + ExportMrtValue(attribute, swizzled_g, g, color_buffer); +} + +void Translator::ExportMrtUncompressed(IR::Attribute attribute, u32 comp, const IR::F32& value) { + const u32 color_buffer_idx = + static_cast(attribute) - static_cast(IR::Attribute::RenderTarget0); + const auto color_buffer = runtime_info.fs_info.color_buffers[color_buffer_idx]; + const auto swizzled_comp = SwizzleMrtComponent(color_buffer, comp); + + switch (color_buffer.export_format) { + case AmdGpu::Liverpool::ShaderExportFormat::Zero: + // No export + return; + case AmdGpu::Liverpool::ShaderExportFormat::R_32: + // Red only + if (swizzled_comp != 0) { + return; + } + break; + case AmdGpu::Liverpool::ShaderExportFormat::GR_32: + // Red and Green only + if (swizzled_comp != 0 && swizzled_comp != 1) { + return; + } + break; + case AmdGpu::Liverpool::ShaderExportFormat::AR_32: + // Red and Alpha only + if (swizzled_comp != 0 && swizzled_comp != 3) { + return; + } + break; + case AmdGpu::Liverpool::ShaderExportFormat::ABGR_32: + // All components + break; + default: + UNREACHABLE_MSG("Unimplemented uncompressed MRT export format {}", + static_cast(color_buffer.export_format)); + break; + } + ExportMrtValue(attribute, swizzled_comp, value, color_buffer); +} + +void Translator::ExportCompressed(IR::Attribute attribute, u32 idx, const IR::U32& value) { + if (IsMrt(attribute)) { + ExportMrtCompressed(attribute, idx, value); + return; + } + const IR::Value unpacked_value = ir.Unpack2x16(AmdGpu::NumberFormat::Float, value); + const IR::F32 r = IR::F32{ir.CompositeExtract(unpacked_value, 0)}; + const IR::F32 g = IR::F32{ir.CompositeExtract(unpacked_value, 1)}; + ir.SetAttribute(attribute, r, idx * 2); + ir.SetAttribute(attribute, g, idx * 2 + 1); +} + +void Translator::ExportUncompressed(IR::Attribute attribute, u32 comp, const IR::F32& value) { + if (IsMrt(attribute)) { + ExportMrtUncompressed(attribute, comp, value); + return; + } + ir.SetAttribute(attribute, value, comp); +} + void Translator::EmitExport(const GcnInst& inst) { if (ir.block->has_multiple_predecessors && info.stage == Stage::Fragment) { ir.Discard(ir.LogicalNot(ir.GetExec())); @@ -25,39 +145,15 @@ void Translator::EmitExport(const GcnInst& inst) { IR::VectorReg(inst.src[3].code), }; - const auto set_attribute = [&](u32 comp, IR::F32 value) { - if (!IR::IsMrt(attrib)) { - ir.SetAttribute(attrib, value, comp); - return; - } - const u32 index = u32(attrib) - u32(IR::Attribute::RenderTarget0); - const auto [r, g, b, a] = runtime_info.fs_info.color_buffers[index].swizzle; - const std::array swizzle_array = {r, g, b, a}; - const auto swizzled_comp = swizzle_array[comp]; - if (u32(swizzled_comp) < u32(AmdGpu::CompSwizzle::Red)) { - ir.SetAttribute(attrib, value, comp); - return; - } - ir.SetAttribute(attrib, value, u32(swizzled_comp) - u32(AmdGpu::CompSwizzle::Red)); - }; - - const auto unpack = [&](u32 idx) { - const IR::Value value = ir.UnpackHalf2x16(ir.GetVectorReg(vsrc[idx])); - const IR::F32 r = IR::F32{ir.CompositeExtract(value, 0)}; - const IR::F32 g = IR::F32{ir.CompositeExtract(value, 1)}; - set_attribute(idx * 2, r); - set_attribute(idx * 2 + 1, g); - }; - // Components are float16 packed into a VGPR if (exp.compr) { // Export R, G if (exp.en & 1) { - unpack(0); + ExportCompressed(attrib, 0, ir.GetVectorReg(vsrc[0])); } // Export B, A if ((exp.en >> 2) & 1) { - unpack(1); + ExportCompressed(attrib, 1, ir.GetVectorReg(vsrc[1])); } } else { // Components are float32 into separate VGPRS @@ -66,8 +162,7 @@ void Translator::EmitExport(const GcnInst& inst) { if ((mask & 1) == 0) { continue; } - const IR::F32 comp = ir.GetVectorReg(vsrc[i]); - set_attribute(i, comp); + ExportUncompressed(attrib, i, ir.GetVectorReg(vsrc[i])); } } if (IR::IsMrt(attrib)) { diff --git a/src/shader_recompiler/frontend/translate/scalar_alu.cpp b/src/shader_recompiler/frontend/translate/scalar_alu.cpp index e18cda012..39f972848 100644 --- a/src/shader_recompiler/frontend/translate/scalar_alu.cpp +++ b/src/shader_recompiler/frontend/translate/scalar_alu.cpp @@ -27,7 +27,7 @@ void Translator::EmitScalarAlu(const GcnInst& inst) { case Opcode::S_ADD_I32: return S_ADD_I32(inst); case Opcode::S_SUB_I32: - return S_SUB_U32(inst); + return S_SUB_I32(inst); case Opcode::S_ADDC_U32: return S_ADDC_U32(inst); case Opcode::S_MIN_I32: @@ -72,10 +72,14 @@ void Translator::EmitScalarAlu(const GcnInst& inst) { return S_OR_B64(NegateMode::Result, true, inst); case Opcode::S_LSHL_B32: return S_LSHL_B32(inst); + case Opcode::S_LSHL_B64: + return S_LSHL_B64(inst); case Opcode::S_LSHR_B32: return S_LSHR_B32(inst); case Opcode::S_ASHR_I32: return S_ASHR_I32(inst); + case Opcode::S_ASHR_I64: + return S_ASHR_I64(inst); case Opcode::S_BFM_B32: return S_BFM_B32(inst); case Opcode::S_MUL_I32: @@ -106,6 +110,10 @@ void Translator::EmitScalarAlu(const GcnInst& inst) { return S_FF1_I32_B32(inst); case Opcode::S_FF1_I32_B64: return S_FF1_I32_B64(inst); + case Opcode::S_BITSET0_B32: + return S_BITSET_B32(inst, 0); + case Opcode::S_BITSET1_B32: + return S_BITSET_B32(inst, 1); case Opcode::S_AND_SAVEEXEC_B64: return S_SAVEEXEC_B64(NegateMode::None, false, inst); case Opcode::S_ORN2_SAVEEXEC_B64: @@ -208,24 +216,52 @@ void Translator::EmitSOPK(const GcnInst& inst) { void Translator::S_ADD_U32(const GcnInst& inst) { const IR::U32 src0{GetSrc(inst.src[0])}; const IR::U32 src1{GetSrc(inst.src[1])}; - SetDst(inst.dst[0], ir.IAdd(src0, src1)); - // TODO: Carry out - ir.SetScc(ir.Imm1(false)); + const IR::U32 result{ir.IAdd(src0, src1)}; + SetDst(inst.dst[0], result); + + // SCC = tmp >= 0x100000000ULL ? 1'1U : 1'0U; + // The above assumes tmp is a 64-bit value. + // It should be enough however to test that the truncated result is less than at least one + // of the operands. In unsigned addition the result is always bigger than both the operands, + // except in the case of overflow where the truncated result is less than both. + ir.SetScc(ir.ILessThan(result, src0, false)); } void Translator::S_SUB_U32(const GcnInst& inst) { const IR::U32 src0{GetSrc(inst.src[0])}; const IR::U32 src1{GetSrc(inst.src[1])}; SetDst(inst.dst[0], ir.ISub(src0, src1)); - // TODO: Carry out - ir.SetScc(ir.Imm1(false)); + + // SCC = S1.u > S0.u ? 1'1U : 1'0U; + ir.SetScc(ir.IGreaterThan(src1, src0, false)); } void Translator::S_ADD_I32(const GcnInst& inst) { const IR::U32 src0{GetSrc(inst.src[0])}; const IR::U32 src1{GetSrc(inst.src[1])}; - SetDst(inst.dst[0], ir.IAdd(src0, src1)); - // TODO: Overflow flag + const IR::U32 result{ir.IAdd(src0, src1)}; + SetDst(inst.dst[0], result); + + // SCC = ((S0.u[31] == S1.u[31]) && (S0.u[31] != Result.u[31])); + const IR::U32 shift{ir.Imm32(31)}; + const IR::U32 sign0{ir.ShiftRightLogical(src0, shift)}; + const IR::U32 sign1{ir.ShiftRightLogical(src1, shift)}; + const IR::U32 signr{ir.ShiftRightLogical(result, shift)}; + ir.SetScc(ir.LogicalAnd(ir.IEqual(sign0, sign1), ir.INotEqual(sign0, signr))); +} + +void Translator::S_SUB_I32(const GcnInst& inst) { + const IR::U32 src0{GetSrc(inst.src[0])}; + const IR::U32 src1{GetSrc(inst.src[1])}; + const IR::U32 result{ir.ISub(src0, src1)}; + SetDst(inst.dst[0], result); + + // SCC = ((S0.u[31] != S1.u[31]) && (S0.u[31] != tmp.u[31])); + const IR::U32 shift{ir.Imm32(31)}; + const IR::U32 sign0{ir.ShiftRightLogical(src0, shift)}; + const IR::U32 sign1{ir.ShiftRightLogical(src1, shift)}; + const IR::U32 signr{ir.ShiftRightLogical(result, shift)}; + ir.SetScc(ir.LogicalAnd(ir.INotEqual(sign0, sign1), ir.INotEqual(sign0, signr))); } void Translator::S_ADDC_U32(const GcnInst& inst) { @@ -416,10 +452,19 @@ void Translator::S_LSHL_B32(const GcnInst& inst) { ir.SetScc(ir.INotEqual(result, ir.Imm32(0))); } +void Translator::S_LSHL_B64(const GcnInst& inst) { + const IR::U64 src0{GetSrc64(inst.src[0])}; + const IR::U64 src1{GetSrc64(inst.src[1])}; + const IR::U64 result = ir.ShiftLeftLogical(src0, ir.BitwiseAnd(src1, ir.Imm64(u64(0x3F)))); + SetDst64(inst.dst[0], result); + ir.SetScc(ir.INotEqual(result, ir.Imm64(u64(0)))); +} + void Translator::S_LSHR_B32(const GcnInst& inst) { const IR::U32 src0{GetSrc(inst.src[0])}; const IR::U32 src1{GetSrc(inst.src[1])}; - const IR::U32 result{ir.ShiftRightLogical(src0, src1)}; + const IR::U32 shift_amt = ir.BitwiseAnd(src1, ir.Imm32(0x1F)); + const IR::U32 result = ir.ShiftRightLogical(src0, shift_amt); SetDst(inst.dst[0], result); ir.SetScc(ir.INotEqual(result, ir.Imm32(0))); } @@ -427,11 +472,19 @@ void Translator::S_LSHR_B32(const GcnInst& inst) { void Translator::S_ASHR_I32(const GcnInst& inst) { const IR::U32 src0{GetSrc(inst.src[0])}; const IR::U32 src1{GetSrc(inst.src[1])}; - const IR::U32 result{ir.ShiftRightArithmetic(src0, src1)}; + const IR::U32 result{ir.ShiftRightArithmetic(src0, ir.BitwiseAnd(src1, ir.Imm32(0x1F)))}; SetDst(inst.dst[0], result); ir.SetScc(ir.INotEqual(result, ir.Imm32(0))); } +void Translator::S_ASHR_I64(const GcnInst& inst) { + const IR::U64 src0{GetSrc64(inst.src[0])}; + const IR::U64 src1{GetSrc64(inst.src[1])}; + const IR::U64 result{ir.ShiftRightArithmetic(src0, ir.BitwiseAnd(src1, ir.Imm64(u64(0x3F))))}; + SetDst64(inst.dst[0], result); + ir.SetScc(ir.INotEqual(result, ir.Imm64(u64(0)))); +} + void Translator::S_BFM_B32(const GcnInst& inst) { const IR::U32 src0{ir.BitwiseAnd(GetSrc(inst.src[0]), ir.Imm32(0x1F))}; const IR::U32 src1{ir.BitwiseAnd(GetSrc(inst.src[1]), ir.Imm32(0x1F))}; @@ -607,6 +660,13 @@ void Translator::S_FF1_I32_B64(const GcnInst& inst) { SetDst(inst.dst[0], result); } +void Translator::S_BITSET_B32(const GcnInst& inst, u32 bit_value) { + const IR::U32 old_value{GetSrc(inst.dst[0])}; + const IR::U32 offset{ir.BitFieldExtract(GetSrc(inst.src[0]), ir.Imm32(0U), ir.Imm32(5U))}; + const IR::U32 result{ir.BitFieldInsert(old_value, ir.Imm32(bit_value), offset, ir.Imm32(1U))}; + SetDst(inst.dst[0], result); +} + void Translator::S_SAVEEXEC_B64(NegateMode negate, bool is_or, 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 diff --git a/src/shader_recompiler/frontend/translate/translate.cpp b/src/shader_recompiler/frontend/translate/translate.cpp index 7f5504663..230f3917f 100644 --- a/src/shader_recompiler/frontend/translate/translate.cpp +++ b/src/shader_recompiler/frontend/translate/translate.cpp @@ -4,7 +4,7 @@ #include "common/config.h" #include "common/io_file.h" #include "common/path_util.h" -#include "shader_recompiler/exception.h" +#include "shader_recompiler/frontend/decode.h" #include "shader_recompiler/frontend/fetch_shader.h" #include "shader_recompiler/frontend/translate/translate.h" #include "shader_recompiler/info.h" @@ -21,9 +21,14 @@ namespace Shader::Gcn { +static u32 next_vgpr_num; +static std::unordered_map vgpr_map; + Translator::Translator(IR::Block* block_, Info& info_, const RuntimeInfo& runtime_info_, const Profile& profile_) - : ir{*block_, block_->begin()}, info{info_}, runtime_info{runtime_info_}, profile{profile_} {} + : ir{*block_, block_->begin()}, info{info_}, runtime_info{runtime_info_}, profile{profile_} { + next_vgpr_num = vgpr_map.empty() ? runtime_info.num_allocated_vgprs : next_vgpr_num; +} void Translator::EmitPrologue() { ir.Prologue(); @@ -179,8 +184,21 @@ void Translator::EmitPrologue() { default: UNREACHABLE_MSG("Unknown shader stage"); } + + // Clear any scratch vgpr mappings for next shader. + vgpr_map.clear(); } +IR::VectorReg Translator::GetScratchVgpr(u32 offset) { + const auto [it, is_new] = vgpr_map.try_emplace(offset); + if (is_new) { + ASSERT_MSG(next_vgpr_num < 256, "Out of VGPRs"); + const auto new_vgpr = static_cast(next_vgpr_num++); + it->second = new_vgpr; + } + return it->second; +}; + template T Translator::GetSrc(const InstOperand& operand) { constexpr bool is_float = std::is_same_v; @@ -453,8 +471,29 @@ void Translator::SetDst64(const InstOperand& operand, const IR::U64F64& value_ra void Translator::EmitFetch(const GcnInst& inst) { // Read the pointer to the fetch shader assembly. + const auto code_sgpr_base = inst.src[0].code; + if (!profile.supports_robust_buffer_access) { + // The fetch shader must be inlined to access as regular buffers, so that + // bounds checks can be emitted to emulate robust buffer access. + const auto* code = GetFetchShaderCode(info, code_sgpr_base); + GcnCodeSlice slice(code, code + std::numeric_limits::max()); + GcnDecodeContext decoder; + + // Decode and save instructions + u32 sub_pc = 0; + while (!slice.atEnd()) { + const auto sub_inst = decoder.decodeInstruction(slice); + if (sub_inst.opcode == Opcode::S_SETPC_B64) { + // Assume we're swapping back to the main shader. + break; + } + TranslateInstruction(sub_inst, sub_pc++); + } + return; + } + info.has_fetch_shader = true; - info.fetch_shader_sgpr_base = inst.src[0].code; + info.fetch_shader_sgpr_base = code_sgpr_base; const auto fetch_data = ParseFetchShader(info); ASSERT(fetch_data.has_value()); @@ -490,7 +529,6 @@ void Translator::EmitFetch(const GcnInst& inst) { info.buffers.push_back({ .sharp_idx = info.srt_info.ReserveSharp(attrib.sgpr_base, attrib.dword_offset, 4), .used_types = IR::Type::F32, - .is_instance_data = true, .instance_attrib = attrib.semantic, }); } @@ -504,6 +542,40 @@ void Translator::LogMissingOpcode(const GcnInst& inst) { info.translation_failed = true; } +void Translator::TranslateInstruction(const GcnInst& inst, const u32 pc) { + // Emit instructions for each category. + switch (inst.category) { + case InstCategory::DataShare: + EmitDataShare(inst); + break; + case InstCategory::VectorInterpolation: + EmitVectorInterpolation(inst); + break; + case InstCategory::ScalarMemory: + EmitScalarMemory(inst); + break; + case InstCategory::VectorMemory: + EmitVectorMemory(inst); + break; + case InstCategory::Export: + EmitExport(inst); + break; + case InstCategory::FlowControl: + EmitFlowControl(pc, inst); + break; + case InstCategory::ScalarALU: + EmitScalarAlu(inst); + break; + case InstCategory::VectorALU: + EmitVectorAlu(inst); + break; + case InstCategory::DebugProfile: + break; + default: + UNREACHABLE(); + } +} + void Translate(IR::Block* block, u32 pc, std::span inst_list, Info& info, const RuntimeInfo& runtime_info, const Profile& profile) { if (inst_list.empty()) { @@ -521,37 +593,7 @@ void Translate(IR::Block* block, u32 pc, std::span inst_list, Inf continue; } - // Emit instructions for each category. - switch (inst.category) { - case InstCategory::DataShare: - translator.EmitDataShare(inst); - break; - case InstCategory::VectorInterpolation: - translator.EmitVectorInterpolation(inst); - break; - case InstCategory::ScalarMemory: - translator.EmitScalarMemory(inst); - break; - case InstCategory::VectorMemory: - translator.EmitVectorMemory(inst); - break; - case InstCategory::Export: - translator.EmitExport(inst); - break; - case InstCategory::FlowControl: - translator.EmitFlowControl(pc, inst); - break; - case InstCategory::ScalarALU: - translator.EmitScalarAlu(inst); - break; - case InstCategory::VectorALU: - translator.EmitVectorAlu(inst); - break; - case InstCategory::DebugProfile: - break; - default: - UNREACHABLE(); - } + translator.TranslateInstruction(inst, pc); } } diff --git a/src/shader_recompiler/frontend/translate/translate.h b/src/shader_recompiler/frontend/translate/translate.h index 9da0844e4..2fd48a051 100644 --- a/src/shader_recompiler/frontend/translate/translate.h +++ b/src/shader_recompiler/frontend/translate/translate.h @@ -58,6 +58,8 @@ public: explicit Translator(IR::Block* block_, Info& info, const RuntimeInfo& runtime_info, const Profile& profile); + void TranslateInstruction(const GcnInst& inst, u32 pc); + // Instruction categories void EmitPrologue(); void EmitFetch(const GcnInst& inst); @@ -79,6 +81,7 @@ public: void S_ADD_U32(const GcnInst& inst); void S_SUB_U32(const GcnInst& inst); void S_ADD_I32(const GcnInst& inst); + void S_SUB_I32(const GcnInst& inst); void S_ADDC_U32(const GcnInst& inst); void S_MIN_U32(bool is_signed, const GcnInst& inst); void S_MAX_U32(bool is_signed, const GcnInst& inst); @@ -90,8 +93,10 @@ public: void S_OR_B64(NegateMode negate, bool is_xor, const GcnInst& inst); void S_XOR_B32(const GcnInst& inst); void S_LSHL_B32(const GcnInst& inst); + void S_LSHL_B64(const GcnInst& inst); void S_LSHR_B32(const GcnInst& inst); void S_ASHR_I32(const GcnInst& inst); + void S_ASHR_I64(const GcnInst& inst); void S_BFM_B32(const GcnInst& inst); void S_MUL_I32(const GcnInst& inst); void S_BFE(const GcnInst& inst, bool is_signed); @@ -114,6 +119,7 @@ public: void S_BCNT1_I32_B64(const GcnInst& inst); void S_FF1_I32_B32(const GcnInst& inst); void S_FF1_I32_B64(const GcnInst& inst); + void S_BITSET_B32(const GcnInst& inst, u32 bit_value); void S_GETPC_B64(u32 pc, const GcnInst& inst); void S_SAVEEXEC_B64(NegateMode negate, bool is_or, const GcnInst& inst); void S_ABS_I32(const GcnInst& inst); @@ -167,6 +173,7 @@ public: void V_SUBBREV_U32(const GcnInst& inst); void V_LDEXP_F32(const GcnInst& inst); void V_CVT_PKNORM_U16_F32(const GcnInst& inst); + void V_CVT_PKNORM_I16_F32(const GcnInst& inst); void V_CVT_PKRTZ_F16_F32(const GcnInst& inst); // VOP1 @@ -241,6 +248,7 @@ public: void V_SAD(const GcnInst& inst); void V_SAD_U32(const GcnInst& inst); void V_CVT_PK_U16_U32(const GcnInst& inst); + void V_CVT_PK_I16_I32(const GcnInst& inst); void V_CVT_PK_U8_F32(const GcnInst& inst); void V_LSHL_B64(const GcnInst& inst); void V_MUL_F64(const GcnInst& inst); @@ -270,10 +278,9 @@ public: // Buffer Memory // MUBUF / MTBUF - void BUFFER_LOAD(u32 num_dwords, bool is_typed, const GcnInst& inst); - void BUFFER_LOAD_FORMAT(u32 num_dwords, const GcnInst& inst); - void BUFFER_STORE(u32 num_dwords, bool is_typed, const GcnInst& inst); - void BUFFER_STORE_FORMAT(u32 num_dwords, const GcnInst& inst); + void BUFFER_LOAD(u32 num_dwords, bool is_inst_typed, bool is_buffer_typed, const GcnInst& inst); + void BUFFER_STORE(u32 num_dwords, bool is_inst_typed, bool is_buffer_typed, + const GcnInst& inst); void BUFFER_ATOMIC(AtomicOp op, const GcnInst& inst); // Image Memory @@ -300,8 +307,20 @@ private: IR::U32 VMovRelSHelper(u32 src_vgprno, const IR::U32 m0); void VMovRelDHelper(u32 dst_vgprno, const IR::U32 src_val, const IR::U32 m0); + IR::F32 SelectCubeResult(const IR::F32& x, const IR::F32& y, const IR::F32& z, + const IR::F32& x_res, const IR::F32& y_res, const IR::F32& z_res); + + void ExportMrtValue(IR::Attribute attribute, u32 comp, const IR::F32& value, + const PsColorBuffer& color_buffer); + void ExportMrtCompressed(IR::Attribute attribute, u32 idx, const IR::U32& value); + void ExportMrtUncompressed(IR::Attribute attribute, u32 comp, const IR::F32& value); + void ExportCompressed(IR::Attribute attribute, u32 idx, const IR::U32& value); + void ExportUncompressed(IR::Attribute attribute, u32 comp, const IR::F32& value); + void LogMissingOpcode(const GcnInst& inst); + IR::VectorReg GetScratchVgpr(u32 offset); + private: IR::IREmitter ir; Info& info; diff --git a/src/shader_recompiler/frontend/translate/vector_alu.cpp b/src/shader_recompiler/frontend/translate/vector_alu.cpp index 2b32ca2ce..56e903052 100644 --- a/src/shader_recompiler/frontend/translate/vector_alu.cpp +++ b/src/shader_recompiler/frontend/translate/vector_alu.cpp @@ -3,6 +3,7 @@ #include "shader_recompiler/frontend/opcodes.h" #include "shader_recompiler/frontend/translate/translate.h" +#include "shader_recompiler/profile.h" namespace Shader::Gcn { @@ -95,6 +96,8 @@ void Translator::EmitVectorAlu(const GcnInst& inst) { return V_LDEXP_F32(inst); case Opcode::V_CVT_PKNORM_U16_F32: return V_CVT_PKNORM_U16_F32(inst); + case Opcode::V_CVT_PKNORM_I16_F32: + return V_CVT_PKNORM_I16_F32(inst); case Opcode::V_CVT_PKRTZ_F16_F32: return V_CVT_PKRTZ_F16_F32(inst); @@ -375,6 +378,8 @@ void Translator::EmitVectorAlu(const GcnInst& inst) { return V_SAD_U32(inst); case Opcode::V_CVT_PK_U16_U32: return V_CVT_PK_U16_U32(inst); + case Opcode::V_CVT_PK_I16_I32: + return V_CVT_PK_I16_I32(inst); case Opcode::V_CVT_PK_U8_F32: return V_CVT_PK_U8_F32(inst); case Opcode::V_LSHL_B64: @@ -644,18 +649,21 @@ void Translator::V_LDEXP_F32(const GcnInst& inst) { } void Translator::V_CVT_PKNORM_U16_F32(const GcnInst& inst) { - const IR::F32 src0{GetSrc(inst.src[0])}; - const IR::F32 src1{GetSrc(inst.src[1])}; - const IR::U32 dst0 = ir.ConvertFToU(32, ir.FPMul(src0, ir.Imm32(65535.f))); - const IR::U32 dst1 = ir.ConvertFToU(32, ir.FPMul(src1, ir.Imm32(65535.f))); - const IR::VectorReg dst_reg{inst.dst[0].code}; - ir.SetVectorReg(dst_reg, ir.BitFieldInsert(dst0, dst1, ir.Imm32(16), ir.Imm32(16))); + const IR::Value vec_f32 = + ir.CompositeConstruct(GetSrc(inst.src[0]), GetSrc(inst.src[1])); + SetDst(inst.dst[0], ir.Pack2x16(AmdGpu::NumberFormat::Unorm, vec_f32)); +} + +void Translator::V_CVT_PKNORM_I16_F32(const GcnInst& inst) { + const IR::Value vec_f32 = + ir.CompositeConstruct(GetSrc(inst.src[0]), GetSrc(inst.src[1])); + SetDst(inst.dst[0], ir.Pack2x16(AmdGpu::NumberFormat::Snorm, vec_f32)); } void Translator::V_CVT_PKRTZ_F16_F32(const GcnInst& inst) { const IR::Value vec_f32 = ir.CompositeConstruct(GetSrc(inst.src[0]), GetSrc(inst.src[1])); - SetDst(inst.dst[0], ir.PackHalf2x16(vec_f32)); + SetDst(inst.dst[0], ir.Pack2x16(AmdGpu::NumberFormat::Float, vec_f32)); } // VOP1 @@ -843,7 +851,7 @@ void Translator::V_FREXP_MANT_F64(const GcnInst& inst) { } void Translator::V_FRACT_F64(const GcnInst& inst) { - const IR::F32 src0{GetSrc64(inst.src[0])}; + const IR::F64 src0{GetSrc64(inst.src[0])}; SetDst64(inst.dst[0], ir.FPFract(src0)); } @@ -904,7 +912,7 @@ void Translator::V_CMP_F32(ConditionOp op, bool set_exec, const GcnInst& inst) { case ConditionOp::GE: return ir.FPGreaterThanEqual(src0, src1); case ConditionOp::U: - return ir.LogicalNot(ir.LogicalAnd(ir.FPIsNan(src0), ir.FPIsNan(src1))); + return ir.LogicalOr(ir.FPIsNan(src0), ir.FPIsNan(src1)); default: UNREACHABLE(); } @@ -1042,20 +1050,81 @@ void Translator::V_MAD_U32_U24(const GcnInst& inst) { V_MAD_I32_I24(inst, false); } +IR::F32 Translator::SelectCubeResult(const IR::F32& x, const IR::F32& y, const IR::F32& z, + const IR::F32& x_res, const IR::F32& y_res, + const IR::F32& z_res) { + const auto abs_x = ir.FPAbs(x); + const auto abs_y = ir.FPAbs(y); + const auto abs_z = ir.FPAbs(z); + + const auto z_face_cond{ + ir.LogicalAnd(ir.FPGreaterThanEqual(abs_z, abs_x), ir.FPGreaterThanEqual(abs_z, abs_y))}; + const auto y_face_cond{ir.FPGreaterThanEqual(abs_y, abs_x)}; + + return IR::F32{ir.Select(z_face_cond, z_res, ir.Select(y_face_cond, y_res, x_res))}; +} + void Translator::V_CUBEID_F32(const GcnInst& inst) { - SetDst(inst.dst[0], GetSrc(inst.src[2])); + const auto x = GetSrc(inst.src[0]); + const auto y = GetSrc(inst.src[1]); + const auto z = GetSrc(inst.src[2]); + + IR::F32 result; + if (profile.supports_native_cube_calc) { + result = ir.CubeFaceIndex(ir.CompositeConstruct(x, y, z)); + } else { + const auto x_neg_cond{ir.FPLessThan(x, ir.Imm32(0.f))}; + const auto y_neg_cond{ir.FPLessThan(y, ir.Imm32(0.f))}; + const auto z_neg_cond{ir.FPLessThan(z, ir.Imm32(0.f))}; + const IR::F32 x_face{ir.Select(x_neg_cond, ir.Imm32(1.f), ir.Imm32(0.f))}; + const IR::F32 y_face{ir.Select(y_neg_cond, ir.Imm32(3.f), ir.Imm32(2.f))}; + const IR::F32 z_face{ir.Select(z_neg_cond, ir.Imm32(5.f), ir.Imm32(4.f))}; + + result = SelectCubeResult(x, y, z, x_face, y_face, z_face); + } + SetDst(inst.dst[0], result); } void Translator::V_CUBESC_F32(const GcnInst& inst) { - SetDst(inst.dst[0], GetSrc(inst.src[0])); + const auto x = GetSrc(inst.src[0]); + const auto y = GetSrc(inst.src[1]); + const auto z = GetSrc(inst.src[2]); + + const auto x_neg_cond{ir.FPLessThan(x, ir.Imm32(0.f))}; + const auto z_neg_cond{ir.FPLessThan(z, ir.Imm32(0.f))}; + const IR::F32 x_sc{ir.Select(x_neg_cond, z, ir.FPNeg(z))}; + const IR::F32 y_sc{x}; + const IR::F32 z_sc{ir.Select(z_neg_cond, ir.FPNeg(x), x)}; + + const auto result{SelectCubeResult(x, y, z, x_sc, y_sc, z_sc)}; + SetDst(inst.dst[0], result); } void Translator::V_CUBETC_F32(const GcnInst& inst) { - SetDst(inst.dst[0], GetSrc(inst.src[1])); + const auto x = GetSrc(inst.src[0]); + const auto y = GetSrc(inst.src[1]); + const auto z = GetSrc(inst.src[2]); + + const auto y_neg_cond{ir.FPLessThan(y, ir.Imm32(0.f))}; + const IR::F32 x_z_tc{ir.FPNeg(y)}; + const IR::F32 y_tc{ir.Select(y_neg_cond, ir.FPNeg(z), z)}; + + const auto result{SelectCubeResult(x, y, z, x_z_tc, y_tc, x_z_tc)}; + SetDst(inst.dst[0], result); } void Translator::V_CUBEMA_F32(const GcnInst& inst) { - SetDst(inst.dst[0], ir.Imm32(1.f)); + const auto x = GetSrc(inst.src[0]); + const auto y = GetSrc(inst.src[1]); + const auto z = GetSrc(inst.src[2]); + + const auto two{ir.Imm32(2.f)}; + const IR::F32 x_major_axis{ir.FPMul(x, two)}; + const IR::F32 y_major_axis{ir.FPMul(y, two)}; + const IR::F32 z_major_axis{ir.FPMul(z, two)}; + + const auto result{SelectCubeResult(x, y, z, x_major_axis, y_major_axis, z_major_axis)}; + SetDst(inst.dst[0], result); } void Translator::V_BFE_U32(bool is_signed, const GcnInst& inst) { @@ -1175,11 +1244,17 @@ void Translator::V_SAD_U32(const GcnInst& inst) { } void Translator::V_CVT_PK_U16_U32(const GcnInst& inst) { - const IR::U32 src0{GetSrc(inst.src[0])}; - const IR::U32 src1{GetSrc(inst.src[1])}; - const IR::U32 lo = ir.IMin(src0, ir.Imm32(0xFFFF), false); - const IR::U32 hi = ir.IMin(src1, ir.Imm32(0xFFFF), false); - SetDst(inst.dst[0], ir.BitFieldInsert(lo, hi, ir.Imm32(16), ir.Imm32(16))); + const IR::Value vec_u32 = + ir.CompositeConstruct(ir.BitCast(GetSrc(inst.src[0])), + ir.BitCast(GetSrc(inst.src[1]))); + SetDst(inst.dst[0], ir.Pack2x16(AmdGpu::NumberFormat::Uint, vec_u32)); +} + +void Translator::V_CVT_PK_I16_I32(const GcnInst& inst) { + const IR::Value vec_u32 = + ir.CompositeConstruct(ir.BitCast(GetSrc(inst.src[0])), + ir.BitCast(GetSrc(inst.src[1]))); + SetDst(inst.dst[0], ir.Pack2x16(AmdGpu::NumberFormat::Sint, vec_u32)); } void Translator::V_CVT_PK_U8_F32(const GcnInst& inst) { @@ -1195,24 +1270,7 @@ void Translator::V_CVT_PK_U8_F32(const GcnInst& inst) { 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}; - if (src0.IsImmediate()) { - if (src0.U64() == -1) { - // If src0 is a fixed -1, the result will always be -1. - ir.SetVectorReg(dst_reg, ir.Imm32(0xFFFFFFFF)); - ir.SetVectorReg(dst_reg + 1, ir.Imm32(0xFFFFFFFF)); - return; - } - if (src1.IsImmediate()) { - // If both src0 and src1 are immediates, we can calculate the result now. - // Note that according to the manual, only bits 4:0 are used from src1. - const u64 result = src0.U64() << (src1.U64() & 0x1F); - ir.SetVectorReg(dst_reg, ir.Imm32(static_cast(result))); - ir.SetVectorReg(dst_reg + 1, ir.Imm32(static_cast(result >> 32))); - return; - } - } - UNREACHABLE_MSG("Unimplemented V_LSHL_B64 arguments"); + SetDst64(inst.dst[0], ir.ShiftLeftLogical(src0, ir.BitwiseAnd(src1, ir.Imm64(u64(0x3F))))); } void Translator::V_MUL_F64(const GcnInst& inst) { diff --git a/src/shader_recompiler/frontend/translate/vector_memory.cpp b/src/shader_recompiler/frontend/translate/vector_memory.cpp index c5be08b7d..ed7788d8c 100644 --- a/src/shader_recompiler/frontend/translate/vector_memory.cpp +++ b/src/shader_recompiler/frontend/translate/vector_memory.cpp @@ -11,59 +11,59 @@ void Translator::EmitVectorMemory(const GcnInst& inst) { // Buffer load operations case Opcode::TBUFFER_LOAD_FORMAT_X: - return BUFFER_LOAD(1, true, inst); + return BUFFER_LOAD(1, true, false, inst); case Opcode::TBUFFER_LOAD_FORMAT_XY: - return BUFFER_LOAD(2, true, inst); + return BUFFER_LOAD(2, true, false, inst); case Opcode::TBUFFER_LOAD_FORMAT_XYZ: - return BUFFER_LOAD(3, true, inst); + return BUFFER_LOAD(3, true, false, inst); case Opcode::TBUFFER_LOAD_FORMAT_XYZW: - return BUFFER_LOAD(4, true, inst); + return BUFFER_LOAD(4, true, false, inst); case Opcode::BUFFER_LOAD_FORMAT_X: - return BUFFER_LOAD_FORMAT(1, inst); + return BUFFER_LOAD(1, false, true, inst); case Opcode::BUFFER_LOAD_FORMAT_XY: - return BUFFER_LOAD_FORMAT(2, inst); + return BUFFER_LOAD(2, false, true, inst); case Opcode::BUFFER_LOAD_FORMAT_XYZ: - return BUFFER_LOAD_FORMAT(3, inst); + return BUFFER_LOAD(3, false, true, inst); case Opcode::BUFFER_LOAD_FORMAT_XYZW: - return BUFFER_LOAD_FORMAT(4, inst); + return BUFFER_LOAD(4, false, true, inst); case Opcode::BUFFER_LOAD_DWORD: - return BUFFER_LOAD(1, false, inst); + return BUFFER_LOAD(1, false, false, inst); case Opcode::BUFFER_LOAD_DWORDX2: - return BUFFER_LOAD(2, false, inst); + return BUFFER_LOAD(2, false, false, inst); case Opcode::BUFFER_LOAD_DWORDX3: - return BUFFER_LOAD(3, false, inst); + return BUFFER_LOAD(3, false, false, inst); case Opcode::BUFFER_LOAD_DWORDX4: - return BUFFER_LOAD(4, false, inst); + return BUFFER_LOAD(4, false, false, inst); // Buffer store operations case Opcode::BUFFER_STORE_FORMAT_X: - return BUFFER_STORE_FORMAT(1, inst); + return BUFFER_STORE(1, false, true, inst); case Opcode::BUFFER_STORE_FORMAT_XY: - return BUFFER_STORE_FORMAT(2, inst); + return BUFFER_STORE(2, false, true, inst); case Opcode::BUFFER_STORE_FORMAT_XYZ: - return BUFFER_STORE_FORMAT(3, inst); + return BUFFER_STORE(3, false, true, inst); case Opcode::BUFFER_STORE_FORMAT_XYZW: - return BUFFER_STORE_FORMAT(4, inst); + return BUFFER_STORE(4, false, true, inst); case Opcode::TBUFFER_STORE_FORMAT_X: - return BUFFER_STORE(1, true, inst); + return BUFFER_STORE(1, true, false, inst); case Opcode::TBUFFER_STORE_FORMAT_XY: - return BUFFER_STORE(2, true, inst); + return BUFFER_STORE(2, true, false, inst); case Opcode::TBUFFER_STORE_FORMAT_XYZ: - return BUFFER_STORE(3, true, inst); + return BUFFER_STORE(3, true, false, inst); case Opcode::TBUFFER_STORE_FORMAT_XYZW: - return BUFFER_STORE(4, true, inst); + return BUFFER_STORE(4, true, false, inst); case Opcode::BUFFER_STORE_DWORD: - return BUFFER_STORE(1, false, inst); + return BUFFER_STORE(1, false, false, inst); case Opcode::BUFFER_STORE_DWORDX2: - return BUFFER_STORE(2, false, inst); + return BUFFER_STORE(2, false, false, inst); case Opcode::BUFFER_STORE_DWORDX3: - return BUFFER_STORE(3, false, inst); + return BUFFER_STORE(3, false, false, inst); case Opcode::BUFFER_STORE_DWORDX4: - return BUFFER_STORE(4, false, inst); + return BUFFER_STORE(4, false, false, inst); // Buffer atomic operations case Opcode::BUFFER_ATOMIC_ADD: @@ -107,6 +107,8 @@ void Translator::EmitVectorMemory(const GcnInst& inst) { return IMAGE_GET_RESINFO(inst); // Image atomic operations + case Opcode::IMAGE_ATOMIC_SWAP: + return IMAGE_ATOMIC(AtomicOp::Swap, inst); case Opcode::IMAGE_ATOMIC_ADD: return IMAGE_ATOMIC(AtomicOp::Add, inst); case Opcode::IMAGE_ATOMIC_SMIN: @@ -163,9 +165,10 @@ void Translator::EmitVectorMemory(const GcnInst& inst) { } } -void Translator::BUFFER_LOAD(u32 num_dwords, bool is_typed, const GcnInst& inst) { - const auto& mtbuf = inst.control.mtbuf; - const bool is_ring = mtbuf.glc && mtbuf.slc; +void Translator::BUFFER_LOAD(u32 num_dwords, bool is_inst_typed, bool is_buffer_typed, + const GcnInst& inst) { + const auto& mubuf = inst.control.mubuf; + const bool is_ring = mubuf.glc && mubuf.slc; const IR::VectorReg vaddr{inst.src[0].code}; const IR::ScalarReg sharp{inst.src[2].code * 4}; const IR::Value soffset{GetSrc(inst.src[3])}; @@ -178,74 +181,55 @@ void Translator::BUFFER_LOAD(u32 num_dwords, bool is_typed, const GcnInst& inst) if (is_ring) { return ir.CompositeConstruct(ir.GetVectorReg(vaddr), soffset); } - if (mtbuf.idxen && mtbuf.offen) { + if (mubuf.idxen && mubuf.offen) { return ir.CompositeConstruct(ir.GetVectorReg(vaddr), ir.GetVectorReg(vaddr + 1)); } - if (mtbuf.idxen || mtbuf.offen) { + if (mubuf.idxen || mubuf.offen) { return ir.GetVectorReg(vaddr); } return {}; }(); IR::BufferInstInfo buffer_info{}; - buffer_info.index_enable.Assign(mtbuf.idxen); - buffer_info.offset_enable.Assign(mtbuf.offen); - buffer_info.inst_offset.Assign(mtbuf.offset); - buffer_info.globally_coherent.Assign(mtbuf.glc); - buffer_info.system_coherent.Assign(mtbuf.slc); - if (is_typed) { - const auto dmft = static_cast(mtbuf.dfmt); - const auto nfmt = static_cast(mtbuf.nfmt); - ASSERT(nfmt == AmdGpu::NumberFormat::Float && - (dmft == AmdGpu::DataFormat::Format32_32_32_32 || - dmft == AmdGpu::DataFormat::Format32_32_32 || - dmft == AmdGpu::DataFormat::Format32_32 || dmft == AmdGpu::DataFormat::Format32)); + buffer_info.index_enable.Assign(mubuf.idxen); + buffer_info.offset_enable.Assign(mubuf.offen); + buffer_info.inst_offset.Assign(mubuf.offset); + buffer_info.globally_coherent.Assign(mubuf.glc); + buffer_info.system_coherent.Assign(mubuf.slc); + buffer_info.typed.Assign(is_inst_typed || is_buffer_typed); + if (is_inst_typed) { + const auto& mtbuf = inst.control.mtbuf; + buffer_info.inst_data_fmt.Assign(static_cast(mtbuf.dfmt)); + buffer_info.inst_num_fmt.Assign(static_cast(mtbuf.nfmt)); + } else { + buffer_info.inst_data_fmt.Assign(AmdGpu::DataFormat::FormatInvalid); } const IR::Value handle = ir.CompositeConstruct(ir.GetScalarReg(sharp), ir.GetScalarReg(sharp + 1), ir.GetScalarReg(sharp + 2), ir.GetScalarReg(sharp + 3)); - const IR::Value value = ir.LoadBuffer(num_dwords, handle, address, buffer_info); const IR::VectorReg dst_reg{inst.src[1].code}; - if (num_dwords == 1) { - ir.SetVectorReg(dst_reg, IR::U32{value}); - return; - } - for (u32 i = 0; i < num_dwords; i++) { - ir.SetVectorReg(dst_reg + i, IR::U32{ir.CompositeExtract(value, i)}); - } -} - -void Translator::BUFFER_LOAD_FORMAT(u32 num_dwords, const GcnInst& inst) { - const auto& mubuf = inst.control.mubuf; - const IR::VectorReg vaddr{inst.src[0].code}; - const IR::ScalarReg sharp{inst.src[2].code * 4}; - ASSERT_MSG(!mubuf.offen && mubuf.offset == 0, "Offsets for image buffers are not supported"); - const IR::Value address = [&] -> IR::Value { - if (mubuf.idxen) { - return ir.GetVectorReg(vaddr); + if (buffer_info.typed) { + const IR::Value value = ir.LoadBufferFormat(handle, address, buffer_info); + for (u32 i = 0; i < num_dwords; i++) { + ir.SetVectorReg(dst_reg + i, IR::F32{ir.CompositeExtract(value, i)}); + } + } else { + const IR::Value value = ir.LoadBufferU32(num_dwords, handle, address, buffer_info); + if (num_dwords == 1) { + ir.SetVectorReg(dst_reg, IR::U32{value}); + return; + } + for (u32 i = 0; i < num_dwords; i++) { + ir.SetVectorReg(dst_reg + i, IR::U32{ir.CompositeExtract(value, i)}); } - return {}; - }(); - const IR::Value soffset{GetSrc(inst.src[3])}; - ASSERT_MSG(soffset.IsImmediate() && soffset.U32() == 0, "Non immediate offset not supported"); - - IR::BufferInstInfo info{}; - info.index_enable.Assign(mubuf.idxen); - - const IR::Value handle = - ir.CompositeConstruct(ir.GetScalarReg(sharp), ir.GetScalarReg(sharp + 1), - ir.GetScalarReg(sharp + 2), ir.GetScalarReg(sharp + 3)); - const IR::Value value = ir.LoadBufferFormat(handle, address, info); - const IR::VectorReg dst_reg{inst.src[1].code}; - for (u32 i = 0; i < num_dwords; i++) { - ir.SetVectorReg(dst_reg + i, IR::F32{ir.CompositeExtract(value, i)}); } } -void Translator::BUFFER_STORE(u32 num_dwords, bool is_typed, const GcnInst& inst) { - const auto& mtbuf = inst.control.mtbuf; - const bool is_ring = mtbuf.glc && mtbuf.slc; +void Translator::BUFFER_STORE(u32 num_dwords, bool is_inst_typed, bool is_buffer_typed, + const GcnInst& inst) { + const auto& mubuf = inst.control.mubuf; + const bool is_ring = mubuf.glc && mubuf.slc; const IR::VectorReg vaddr{inst.src[0].code}; const IR::ScalarReg sharp{inst.src[2].code * 4}; const IR::Value soffset{GetSrc(inst.src[3])}; @@ -259,86 +243,53 @@ void Translator::BUFFER_STORE(u32 num_dwords, bool is_typed, const GcnInst& inst if (is_ring) { return ir.CompositeConstruct(ir.GetVectorReg(vaddr), soffset); } - if (mtbuf.idxen && mtbuf.offen) { + if (mubuf.idxen && mubuf.offen) { return ir.CompositeConstruct(ir.GetVectorReg(vaddr), ir.GetVectorReg(vaddr + 1)); } - if (mtbuf.idxen || mtbuf.offen) { + if (mubuf.idxen || mubuf.offen) { return ir.GetVectorReg(vaddr); } return {}; }(); IR::BufferInstInfo buffer_info{}; - buffer_info.index_enable.Assign(mtbuf.idxen); - buffer_info.offset_enable.Assign(mtbuf.offen); - buffer_info.inst_offset.Assign(mtbuf.offset); - buffer_info.globally_coherent.Assign(mtbuf.glc); - buffer_info.system_coherent.Assign(mtbuf.slc); - if (is_typed) { - const auto dmft = static_cast(mtbuf.dfmt); - const auto nfmt = static_cast(mtbuf.nfmt); - ASSERT(nfmt == AmdGpu::NumberFormat::Float && - (dmft == AmdGpu::DataFormat::Format32_32_32_32 || - dmft == AmdGpu::DataFormat::Format32_32_32 || - dmft == AmdGpu::DataFormat::Format32_32 || dmft == AmdGpu::DataFormat::Format32)); + buffer_info.index_enable.Assign(mubuf.idxen); + buffer_info.offset_enable.Assign(mubuf.offen); + buffer_info.inst_offset.Assign(mubuf.offset); + buffer_info.globally_coherent.Assign(mubuf.glc); + buffer_info.system_coherent.Assign(mubuf.slc); + buffer_info.typed.Assign(is_inst_typed || is_buffer_typed); + if (is_inst_typed) { + const auto& mtbuf = inst.control.mtbuf; + buffer_info.inst_data_fmt.Assign(static_cast(mtbuf.dfmt)); + buffer_info.inst_num_fmt.Assign(static_cast(mtbuf.nfmt)); + } else { + buffer_info.inst_data_fmt.Assign(AmdGpu::DataFormat::FormatInvalid); } - IR::Value value{}; - const IR::VectorReg src_reg{inst.src[1].code}; - switch (num_dwords) { - case 1: - value = ir.GetVectorReg(src_reg); - break; - case 2: - value = ir.CompositeConstruct(ir.GetVectorReg(src_reg), ir.GetVectorReg(src_reg + 1)); - break; - case 3: - value = ir.CompositeConstruct(ir.GetVectorReg(src_reg), ir.GetVectorReg(src_reg + 1), - ir.GetVectorReg(src_reg + 2)); - break; - case 4: - value = ir.CompositeConstruct(ir.GetVectorReg(src_reg), ir.GetVectorReg(src_reg + 1), - ir.GetVectorReg(src_reg + 2), ir.GetVectorReg(src_reg + 3)); - break; - } const IR::Value handle = ir.CompositeConstruct(ir.GetScalarReg(sharp), ir.GetScalarReg(sharp + 1), ir.GetScalarReg(sharp + 2), ir.GetScalarReg(sharp + 3)); - ir.StoreBuffer(num_dwords, handle, address, value, buffer_info); -} - -void Translator::BUFFER_STORE_FORMAT(u32 num_dwords, const GcnInst& inst) { - const auto& mubuf = inst.control.mubuf; - const IR::VectorReg vaddr{inst.src[0].code}; - const IR::ScalarReg sharp{inst.src[2].code * 4}; - ASSERT_MSG(!mubuf.offen && mubuf.offset == 0, "Offsets for image buffers are not supported"); - const IR::Value address = [&] -> IR::Value { - if (mubuf.idxen) { - return ir.GetVectorReg(vaddr); - } - return {}; - }(); - const IR::Value soffset{GetSrc(inst.src[3])}; - ASSERT_MSG(soffset.IsImmediate() && soffset.U32() == 0, "Non immediate offset not supported"); - - IR::BufferInstInfo info{}; - info.index_enable.Assign(mubuf.idxen); - const IR::VectorReg src_reg{inst.src[1].code}; - std::array comps{}; + boost::container::static_vector comps; for (u32 i = 0; i < num_dwords; i++) { - comps[i] = ir.GetVectorReg(src_reg + i); + const auto src_reg_i = src_reg + i; + if (buffer_info.typed) { + comps.push_back(ir.GetVectorReg(src_reg_i)); + } else { + comps.push_back(ir.GetVectorReg(src_reg_i)); + } } - for (u32 i = num_dwords; i < 4; i++) { - comps[i] = ir.Imm32(0.f); + if (buffer_info.typed) { + for (u32 i = num_dwords; i < 4; i++) { + comps.push_back(ir.Imm32(0.f)); + } + ir.StoreBufferFormat(handle, address, ir.CompositeConstruct(comps), buffer_info); + } else { + const auto value = num_dwords == 1 ? comps[0] : ir.CompositeConstruct(comps); + ir.StoreBufferU32(num_dwords, handle, address, value, buffer_info); } - - const IR::Value value = ir.CompositeConstruct(comps[0], comps[1], comps[2], comps[3]); - const IR::Value handle = - ir.CompositeConstruct(ir.GetScalarReg(sharp), ir.GetScalarReg(sharp + 1), - ir.GetScalarReg(sharp + 2), ir.GetScalarReg(sharp + 3)); - ir.StoreBufferFormat(handle, address, value, info); } void Translator::BUFFER_ATOMIC(AtomicOp op, const GcnInst& inst) { @@ -358,10 +309,12 @@ void Translator::BUFFER_ATOMIC(AtomicOp op, const GcnInst& inst) { const IR::U32 soffset{GetSrc(inst.src[3])}; ASSERT_MSG(soffset.IsImmediate() && soffset.U32() == 0, "Non immediate offset not supported"); - IR::BufferInstInfo info{}; - info.index_enable.Assign(mubuf.idxen); - info.inst_offset.Assign(mubuf.offset); - info.offset_enable.Assign(mubuf.offen); + IR::BufferInstInfo buffer_info{}; + buffer_info.index_enable.Assign(mubuf.idxen); + buffer_info.offset_enable.Assign(mubuf.offen); + buffer_info.inst_offset.Assign(mubuf.offset); + buffer_info.globally_coherent.Assign(mubuf.glc); + buffer_info.system_coherent.Assign(mubuf.slc); IR::Value vdata_val = ir.GetVectorReg(vdata); const IR::Value handle = @@ -371,27 +324,27 @@ void Translator::BUFFER_ATOMIC(AtomicOp op, const GcnInst& inst) { const IR::Value original_val = [&] { switch (op) { case AtomicOp::Swap: - return ir.BufferAtomicSwap(handle, address, vdata_val, info); + return ir.BufferAtomicSwap(handle, address, vdata_val, buffer_info); case AtomicOp::Add: - return ir.BufferAtomicIAdd(handle, address, vdata_val, info); + return ir.BufferAtomicIAdd(handle, address, vdata_val, buffer_info); case AtomicOp::Smin: - return ir.BufferAtomicIMin(handle, address, vdata_val, true, info); + return ir.BufferAtomicIMin(handle, address, vdata_val, true, buffer_info); case AtomicOp::Umin: - return ir.BufferAtomicIMin(handle, address, vdata_val, false, info); + return ir.BufferAtomicIMin(handle, address, vdata_val, false, buffer_info); case AtomicOp::Smax: - return ir.BufferAtomicIMax(handle, address, vdata_val, true, info); + return ir.BufferAtomicIMax(handle, address, vdata_val, true, buffer_info); case AtomicOp::Umax: - return ir.BufferAtomicIMax(handle, address, vdata_val, false, info); + return ir.BufferAtomicIMax(handle, address, vdata_val, false, buffer_info); case AtomicOp::And: - return ir.BufferAtomicAnd(handle, address, vdata_val, info); + return ir.BufferAtomicAnd(handle, address, vdata_val, buffer_info); case AtomicOp::Or: - return ir.BufferAtomicOr(handle, address, vdata_val, info); + return ir.BufferAtomicOr(handle, address, vdata_val, buffer_info); case AtomicOp::Xor: - return ir.BufferAtomicXor(handle, address, vdata_val, info); + return ir.BufferAtomicXor(handle, address, vdata_val, buffer_info); case AtomicOp::Inc: - return ir.BufferAtomicInc(handle, address, vdata_val, info); + return ir.BufferAtomicInc(handle, address, vdata_val, buffer_info); case AtomicOp::Dec: - return ir.BufferAtomicDec(handle, address, vdata_val, info); + return ir.BufferAtomicDec(handle, address, vdata_val, buffer_info); default: UNREACHABLE(); } @@ -418,6 +371,7 @@ void Translator::IMAGE_LOAD(bool has_mip, const GcnInst& inst) { IR::TextureInstInfo info{}; info.has_lod.Assign(has_mip); + info.is_array.Assign(mimg.da); const IR::Value texel = ir.ImageRead(handle, body, {}, {}, info); for (u32 i = 0; i < 4; i++) { @@ -442,6 +396,7 @@ void Translator::IMAGE_STORE(bool has_mip, const GcnInst& inst) { IR::TextureInstInfo info{}; info.has_lod.Assign(has_mip); + info.is_array.Assign(mimg.da); boost::container::static_vector comps; for (u32 i = 0; i < 4; i++) { @@ -456,13 +411,18 @@ void Translator::IMAGE_STORE(bool has_mip, const GcnInst& inst) { } void Translator::IMAGE_GET_RESINFO(const GcnInst& inst) { + const auto& mimg = inst.control.mimg; IR::VectorReg dst_reg{inst.dst[0].code}; const IR::ScalarReg tsharp_reg{inst.src[2].code * 4}; const auto flags = ImageResFlags(inst.control.mimg.dmask); const bool has_mips = flags.test(ImageResComponent::MipCount); const IR::U32 lod = ir.GetVectorReg(IR::VectorReg(inst.src[0].code)); const IR::Value tsharp = ir.GetScalarReg(tsharp_reg); - const IR::Value size = ir.ImageQueryDimension(tsharp, lod, ir.Imm1(has_mips)); + + IR::TextureInstInfo info{}; + info.is_array.Assign(mimg.da); + + const IR::Value size = ir.ImageQueryDimension(tsharp, lod, ir.Imm1(has_mips), info); if (flags.test(ImageResComponent::Width)) { ir.SetVectorReg(dst_reg++, IR::U32{ir.CompositeExtract(size, 0)}); @@ -484,6 +444,9 @@ void Translator::IMAGE_ATOMIC(AtomicOp op, const GcnInst& inst) { IR::VectorReg addr_reg{inst.src[0].code}; const IR::ScalarReg tsharp_reg{inst.src[2].code * 4}; + IR::TextureInstInfo info{}; + info.is_array.Assign(mimg.da); + const IR::Value value = ir.GetVectorReg(val_reg); const IR::Value handle = ir.GetScalarReg(tsharp_reg); const IR::Value body = @@ -494,25 +457,25 @@ void Translator::IMAGE_ATOMIC(AtomicOp op, const GcnInst& inst) { case AtomicOp::Swap: return ir.ImageAtomicExchange(handle, body, value, {}); case AtomicOp::Add: - return ir.ImageAtomicIAdd(handle, body, value, {}); + return ir.ImageAtomicIAdd(handle, body, value, info); case AtomicOp::Smin: - return ir.ImageAtomicIMin(handle, body, value, true, {}); + return ir.ImageAtomicIMin(handle, body, value, true, info); case AtomicOp::Umin: - return ir.ImageAtomicUMin(handle, body, value, {}); + return ir.ImageAtomicUMin(handle, body, value, info); case AtomicOp::Smax: - return ir.ImageAtomicIMax(handle, body, value, true, {}); + return ir.ImageAtomicIMax(handle, body, value, true, info); case AtomicOp::Umax: - return ir.ImageAtomicUMax(handle, body, value, {}); + return ir.ImageAtomicUMax(handle, body, value, info); case AtomicOp::And: - return ir.ImageAtomicAnd(handle, body, value, {}); + return ir.ImageAtomicAnd(handle, body, value, info); case AtomicOp::Or: - return ir.ImageAtomicOr(handle, body, value, {}); + return ir.ImageAtomicOr(handle, body, value, info); case AtomicOp::Xor: - return ir.ImageAtomicXor(handle, body, value, {}); + return ir.ImageAtomicXor(handle, body, value, info); case AtomicOp::Inc: - return ir.ImageAtomicInc(handle, body, value, {}); + return ir.ImageAtomicInc(handle, body, value, info); case AtomicOp::Dec: - return ir.ImageAtomicDec(handle, body, value, {}); + return ir.ImageAtomicDec(handle, body, value, info); default: UNREACHABLE(); } @@ -643,11 +606,14 @@ void Translator::IMAGE_GET_LOD(const GcnInst& inst) { IR::VectorReg addr_reg{inst.src[0].code}; const IR::ScalarReg tsharp_reg{inst.src[2].code * 4}; + IR::TextureInstInfo info{}; + info.is_array.Assign(mimg.da); + const IR::Value handle = ir.GetScalarReg(tsharp_reg); const IR::Value body = ir.CompositeConstruct( ir.GetVectorReg(addr_reg), ir.GetVectorReg(addr_reg + 1), ir.GetVectorReg(addr_reg + 2), ir.GetVectorReg(addr_reg + 3)); - const IR::Value lod = ir.ImageQueryLod(handle, body, {}); + const IR::Value lod = ir.ImageQueryLod(handle, body, info); ir.SetVectorReg(dst_reg++, IR::F32{ir.CompositeExtract(lod, 0)}); ir.SetVectorReg(dst_reg++, IR::F32{ir.CompositeExtract(lod, 1)}); } diff --git a/src/shader_recompiler/info.h b/src/shader_recompiler/info.h index b6ac12785..8dcf9c5c4 100644 --- a/src/shader_recompiler/info.h +++ b/src/shader_recompiler/info.h @@ -2,7 +2,6 @@ // SPDX-License-Identifier: GPL-2.0-or-later #pragma once -#include #include #include #include @@ -17,15 +16,17 @@ #include "shader_recompiler/ir/reg.h" #include "shader_recompiler/ir/type.h" #include "shader_recompiler/params.h" +#include "shader_recompiler/profile.h" #include "shader_recompiler/runtime_info.h" -#include "video_core/amdgpu/liverpool.h" #include "video_core/amdgpu/resource.h" namespace Shader { static constexpr size_t NumUserDataRegs = 16; -static constexpr size_t MaxUboSize = 65536; -static constexpr size_t MaxUboDwords = MaxUboSize >> 2; +static constexpr size_t NumImages = 64; +static constexpr size_t NumBuffers = 32; +static constexpr size_t NumSamplers = 16; +static constexpr size_t NumFMasks = 8; enum class TextureType : u32 { Color1D, @@ -38,49 +39,46 @@ enum class TextureType : u32 { }; constexpr u32 NUM_TEXTURE_TYPES = 7; +enum class BufferType : u32 { + Guest, + ReadConstUbo, + GdsBuffer, + SharedMemory, +}; + struct Info; struct BufferResource { u32 sharp_idx; IR::Type used_types; AmdGpu::Buffer inline_cbuf; - bool is_gds_buffer{}; - bool is_instance_data{}; + BufferType buffer_type; u8 instance_attrib{}; bool is_written{}; + bool is_formatted{}; - [[nodiscard]] bool IsStorage(const AmdGpu::Buffer& buffer) const noexcept { - return buffer.GetSize() > MaxUboSize || is_written || is_gds_buffer; + bool IsSpecial() const noexcept { + return buffer_type != BufferType::Guest; + } + + bool IsStorage(const AmdGpu::Buffer& buffer, const Profile& profile) const noexcept { + return buffer.GetSize() > profile.max_ubo_size || is_written; } [[nodiscard]] constexpr AmdGpu::Buffer GetSharp(const Info& info) const noexcept; }; -using BufferResourceList = boost::container::small_vector; - -struct TextureBufferResource { - u32 sharp_idx; - bool is_written{}; - - [[nodiscard]] constexpr AmdGpu::Buffer GetSharp(const Info& info) const noexcept; -}; -using TextureBufferResourceList = boost::container::small_vector; +using BufferResourceList = boost::container::small_vector; struct ImageResource { u32 sharp_idx; bool is_depth{}; bool is_atomic{}; bool is_array{}; - bool is_read{}; bool is_written{}; - [[nodiscard]] bool IsStorage(const AmdGpu::Image& image) const noexcept { - // Need cube as storage when used with ImageRead. - return is_written || (is_read && image.GetBoundType() == AmdGpu::ImageType::Cube); - } - [[nodiscard]] constexpr AmdGpu::Image GetSharp(const Info& info) const noexcept; }; -using ImageResourceList = boost::container::small_vector; +using ImageResourceList = boost::container::small_vector; struct SamplerResource { u32 sharp_idx; @@ -90,33 +88,38 @@ struct SamplerResource { constexpr AmdGpu::Sampler GetSharp(const Info& info) const noexcept; }; -using SamplerResourceList = boost::container::small_vector; +using SamplerResourceList = boost::container::small_vector; struct FMaskResource { u32 sharp_idx; constexpr AmdGpu::Image GetSharp(const Info& info) const noexcept; }; -using FMaskResourceList = boost::container::small_vector; +using FMaskResourceList = boost::container::small_vector; struct PushData { - static constexpr u32 BufOffsetIndex = 2; - static constexpr u32 UdRegsIndex = 4; + static constexpr u32 Step0Index = 0; + static constexpr u32 Step1Index = 1; + static constexpr u32 XOffsetIndex = 2; + static constexpr u32 YOffsetIndex = 3; + static constexpr u32 XScaleIndex = 4; + static constexpr u32 YScaleIndex = 5; + static constexpr u32 UdRegsIndex = 6; + static constexpr u32 BufOffsetIndex = UdRegsIndex + NumUserDataRegs / 4; u32 step0; u32 step1; - std::array buf_offsets; + float xoffset; + float yoffset; + float xscale; + float yscale; std::array ud_regs; + std::array buf_offsets; void AddOffset(u32 binding, u32 offset) { ASSERT(offset < 256 && binding < buf_offsets.size()); buf_offsets[binding] = offset; } - - void AddTexelOffset(u32 binding, u32 multiplier, u32 texel_offset) { - ASSERT(texel_offset < 64 && multiplier < 16); - buf_offsets[binding] = texel_offset | ((std::bit_width(multiplier) - 1) << 6); - } }; static_assert(sizeof(PushData) <= 128, "PushData size is greater than minimum size guaranteed by Vulkan spec"); @@ -173,7 +176,6 @@ struct Info { u32 uses_patches{}; BufferResourceList buffers; - TextureBufferResourceList texture_buffers; ImageResourceList images; SamplerResourceList samplers; FMaskResourceList fmasks; @@ -191,8 +193,6 @@ struct Info { u64 pgm_hash{}; VAddr pgm_base; bool has_storage_images{}; - bool has_image_buffers{}; - bool has_texel_buffers{}; bool has_discard{}; bool has_image_gather{}; bool has_image_query{}; @@ -202,9 +202,11 @@ struct Info { bool uses_shared{}; bool uses_fp16{}; bool uses_fp64{}; + bool uses_pack_10_11_11{}; + bool uses_unpack_10_11_11{}; bool stores_tess_level_outer{}; bool stores_tess_level_inner{}; - bool translation_failed{}; // indicates that shader has unsupported instructions + bool translation_failed{}; bool has_readconst{}; u8 mrt_mask{0u}; bool has_fetch_shader{false}; @@ -242,10 +244,8 @@ struct Info { } void AddBindings(Backend::Bindings& bnd) const { - const auto total_buffers = - buffers.size() + texture_buffers.size() + (has_readconst ? 1 : 0); - bnd.buffer += total_buffers; - bnd.unified += total_buffers + images.size() + samplers.size(); + bnd.buffer += buffers.size(); + bnd.unified += buffers.size() + images.size() + samplers.size(); bnd.user_data += ud_mask.NumRegs(); } @@ -274,10 +274,6 @@ constexpr AmdGpu::Buffer BufferResource::GetSharp(const Info& info) const noexce return inline_cbuf ? inline_cbuf : info.ReadUdSharp(sharp_idx); } -constexpr AmdGpu::Buffer TextureBufferResource::GetSharp(const Info& info) const noexcept { - return info.ReadUdSharp(sharp_idx); -} - constexpr AmdGpu::Image ImageResource::GetSharp(const Info& info) const noexcept { const auto image = info.ReadUdSharp(sharp_idx); if (!image.Valid()) { @@ -296,14 +292,3 @@ constexpr AmdGpu::Image FMaskResource::GetSharp(const Info& info) const noexcept } } // namespace Shader - -template <> -struct fmt::formatter { - constexpr auto parse(format_parse_context& ctx) { - return ctx.begin(); - } - auto format(const Shader::Stage stage, format_context& ctx) const { - constexpr static std::array names = {"fs", "vs", "gs", "es", "hs", "ls", "cs"}; - return fmt::format_to(ctx.out(), "{}", names[static_cast(stage)]); - } -}; diff --git a/src/shader_recompiler/ir/attribute.h b/src/shader_recompiler/ir/attribute.h index bcb2b44a9..5117f5650 100644 --- a/src/shader_recompiler/ir/attribute.h +++ b/src/shader_recompiler/ir/attribute.h @@ -69,16 +69,17 @@ enum class Attribute : u64 { SampleIndex = 72, GlobalInvocationId = 73, WorkgroupId = 74, - LocalInvocationId = 75, - LocalInvocationIndex = 76, - FragCoord = 77, - InstanceId0 = 78, // step rate 0 - InstanceId1 = 79, // step rate 1 - InvocationId = 80, // TCS id in output patch and instanced geometry shader id - PatchVertices = 81, - TessellationEvaluationPointU = 82, - TessellationEvaluationPointV = 83, - PackedHullInvocationInfo = 84, // contains patch id within the VGT and invocation ID + WorkgroupIndex = 75, + LocalInvocationId = 76, + LocalInvocationIndex = 77, + FragCoord = 78, + InstanceId0 = 79, // step rate 0 + InstanceId1 = 80, // step rate 1 + InvocationId = 81, // TCS id in output patch and instanced geometry shader id + PatchVertices = 82, + TessellationEvaluationPointU = 83, + TessellationEvaluationPointV = 84, + PackedHullInvocationInfo = 85, // contains patch id within the VGT and invocation ID Max, }; diff --git a/src/shader_recompiler/ir/breadth_first_search.h b/src/shader_recompiler/ir/breadth_first_search.h index 390dffb5c..9deeb2363 100644 --- a/src/shader_recompiler/ir/breadth_first_search.h +++ b/src/shader_recompiler/ir/breadth_first_search.h @@ -14,8 +14,8 @@ namespace Shader::IR { // Use typename Instruction so the function can be used to return either const or mutable // Insts depending on the context. template -auto BreadthFirstSearch(Instruction* inst, - Pred&& pred) -> std::invoke_result_t { +auto BreadthFirstSearch(Instruction* inst, Pred&& pred) + -> std::invoke_result_t { // Most often case the instruction is the desired already. if (std::optional result = pred(inst)) { return result; @@ -53,8 +53,8 @@ auto BreadthFirstSearch(Instruction* inst, } template -auto BreadthFirstSearch(const Value& value, - Pred&& pred) -> std::invoke_result_t { +auto BreadthFirstSearch(const Value& value, Pred&& pred) + -> std::invoke_result_t { if (value.IsImmediate()) { // Nothing to do with immediates return std::nullopt; diff --git a/src/shader_recompiler/ir/ir_emitter.cpp b/src/shader_recompiler/ir/ir_emitter.cpp index 823f9bdcd..3615e8cbb 100644 --- a/src/shader_recompiler/ir/ir_emitter.cpp +++ b/src/shader_recompiler/ir/ir_emitter.cpp @@ -308,8 +308,6 @@ Value IREmitter::LoadShared(int bit_size, bool is_signed, const U32& offset) { return Inst(Opcode::LoadSharedU32, offset); case 64: return Inst(Opcode::LoadSharedU64, offset); - case 128: - return Inst(Opcode::LoadSharedU128, offset); default: UNREACHABLE_MSG("Invalid bit size {}", bit_size); } @@ -323,9 +321,6 @@ void IREmitter::WriteShared(int bit_size, const Value& value, const U32& offset) case 64: Inst(Opcode::WriteSharedU64, offset, value); break; - case 128: - Inst(Opcode::WriteSharedU128, offset, value); - break; default: UNREACHABLE_MSG("Invalid bit size {}", bit_size); } @@ -370,8 +365,16 @@ U32 IREmitter::ReadConstBuffer(const Value& handle, const U32& index) { return Inst(Opcode::ReadConstBuffer, handle, index); } -Value IREmitter::LoadBuffer(int num_dwords, const Value& handle, const Value& address, - BufferInstInfo info) { +U32 IREmitter::LoadBufferU8(const Value& handle, const Value& address, BufferInstInfo info) { + return Inst(Opcode::LoadBufferU8, Flags{info}, handle, address); +} + +U32 IREmitter::LoadBufferU16(const Value& handle, const Value& address, BufferInstInfo info) { + return Inst(Opcode::LoadBufferU16, Flags{info}, handle, address); +} + +Value IREmitter::LoadBufferU32(int num_dwords, const Value& handle, const Value& address, + BufferInstInfo info) { switch (num_dwords) { case 1: return Inst(Opcode::LoadBufferU32, Flags{info}, handle, address); @@ -386,12 +389,38 @@ Value IREmitter::LoadBuffer(int num_dwords, const Value& handle, const Value& ad } } +Value IREmitter::LoadBufferF32(int num_dwords, const Value& handle, const Value& address, + BufferInstInfo info) { + switch (num_dwords) { + case 1: + return Inst(Opcode::LoadBufferF32, Flags{info}, handle, address); + case 2: + return Inst(Opcode::LoadBufferF32x2, Flags{info}, handle, address); + case 3: + return Inst(Opcode::LoadBufferF32x3, Flags{info}, handle, address); + case 4: + return Inst(Opcode::LoadBufferF32x4, Flags{info}, handle, address); + default: + UNREACHABLE_MSG("Invalid number of dwords {}", num_dwords); + } +} + Value IREmitter::LoadBufferFormat(const Value& handle, const Value& address, BufferInstInfo info) { return Inst(Opcode::LoadBufferFormatF32, Flags{info}, handle, address); } -void IREmitter::StoreBuffer(int num_dwords, const Value& handle, const Value& address, - const Value& data, BufferInstInfo info) { +void IREmitter::StoreBufferU8(const Value& handle, const Value& address, const U32& data, + BufferInstInfo info) { + Inst(Opcode::StoreBufferU8, Flags{info}, handle, address, data); +} + +void IREmitter::StoreBufferU16(const Value& handle, const Value& address, const U32& data, + BufferInstInfo info) { + Inst(Opcode::StoreBufferU16, Flags{info}, handle, address, data); +} + +void IREmitter::StoreBufferU32(int num_dwords, const Value& handle, const Value& address, + const Value& data, BufferInstInfo info) { switch (num_dwords) { case 1: Inst(Opcode::StoreBufferU32, Flags{info}, handle, address, data); @@ -410,6 +439,31 @@ void IREmitter::StoreBuffer(int num_dwords, const Value& handle, const Value& ad } } +void IREmitter::StoreBufferF32(int num_dwords, const Value& handle, const Value& address, + const Value& data, BufferInstInfo info) { + switch (num_dwords) { + case 1: + Inst(Opcode::StoreBufferF32, Flags{info}, handle, address, data); + break; + case 2: + Inst(Opcode::StoreBufferF32x2, Flags{info}, handle, address, data); + break; + case 3: + Inst(Opcode::StoreBufferF32x3, Flags{info}, handle, address, data); + break; + case 4: + Inst(Opcode::StoreBufferF32x4, Flags{info}, handle, address, data); + break; + default: + UNREACHABLE_MSG("Invalid number of dwords {}", num_dwords); + } +} + +void IREmitter::StoreBufferFormat(const Value& handle, const Value& address, const Value& data, + BufferInstInfo info) { + Inst(Opcode::StoreBufferFormatF32, Flags{info}, handle, address, data); +} + Value IREmitter::BufferAtomicIAdd(const Value& handle, const Value& address, const Value& value, BufferInstInfo info) { return Inst(Opcode::BufferAtomicIAdd32, Flags{info}, handle, address, value); @@ -457,11 +511,6 @@ Value IREmitter::BufferAtomicSwap(const Value& handle, const Value& address, con return Inst(Opcode::BufferAtomicSwap32, Flags{info}, handle, address, value); } -void IREmitter::StoreBufferFormat(const Value& handle, const Value& address, const Value& data, - BufferInstInfo info) { - Inst(Opcode::StoreBufferFormatF32, Flags{info}, handle, address, data); -} - U32 IREmitter::DataAppend(const U32& counter) { return Inst(Opcode::DataAppend, counter, Imm32(0)); } @@ -527,10 +576,14 @@ Value IREmitter::CompositeConstruct(const Value& e1, const Value& e2) { switch (e1.Type()) { case Type::U32: return Inst(Opcode::CompositeConstructU32x2, e1, e2); + case Type::U32x2: + return Inst(Opcode::CompositeConstructU32x2x2, e1, e2); case Type::F16: return Inst(Opcode::CompositeConstructF16x2, e1, e2); case Type::F32: return Inst(Opcode::CompositeConstructF32x2, e1, e2); + case Type::F32x2: + return Inst(Opcode::CompositeConstructF32x2x2, e1, e2); case Type::F64: return Inst(Opcode::CompositeConstructF64x2, e1, e2); default: @@ -585,7 +638,8 @@ Value IREmitter::CompositeConstruct(std::span elements) { case 4: return CompositeConstruct(elements[0], elements[1], elements[2], elements[3]); default: - UNREACHABLE_MSG("Composite construct with greater than 4 elements"); + UNREACHABLE_MSG("Composite construct with {} elements, only 2-4 are supported", + elements.size()); } } @@ -779,20 +833,116 @@ F64 IREmitter::PackFloat2x32(const Value& vector) { return Inst(Opcode::PackFloat2x32, vector); } -U32 IREmitter::PackFloat2x16(const Value& vector) { - return Inst(Opcode::PackFloat2x16, vector); +U32 IREmitter::Pack2x16(const AmdGpu::NumberFormat number_format, const Value& vector) { + switch (number_format) { + case AmdGpu::NumberFormat::Unorm: + return Inst(Opcode::PackUnorm2x16, vector); + case AmdGpu::NumberFormat::Snorm: + return Inst(Opcode::PackSnorm2x16, vector); + case AmdGpu::NumberFormat::Uint: + return Inst(Opcode::PackUint2x16, vector); + case AmdGpu::NumberFormat::Sint: + return Inst(Opcode::PackSint2x16, vector); + case AmdGpu::NumberFormat::Float: + return Inst(Opcode::PackHalf2x16, vector); + default: + UNREACHABLE_MSG("Unsupported 2x16 number format: {}", number_format); + } } -Value IREmitter::UnpackFloat2x16(const U32& value) { - return Inst(Opcode::UnpackFloat2x16, value); +Value IREmitter::Unpack2x16(const AmdGpu::NumberFormat number_format, const U32& value) { + switch (number_format) { + case AmdGpu::NumberFormat::Unorm: + return Inst(Opcode::UnpackUnorm2x16, value); + case AmdGpu::NumberFormat::Snorm: + return Inst(Opcode::UnpackSnorm2x16, value); + case AmdGpu::NumberFormat::Uint: + return Inst(Opcode::UnpackUint2x16, value); + case AmdGpu::NumberFormat::Sint: + return Inst(Opcode::UnpackSint2x16, value); + case AmdGpu::NumberFormat::Float: + return Inst(Opcode::UnpackHalf2x16, value); + default: + UNREACHABLE_MSG("Unsupported 2x16 number format: {}", number_format); + } } -U32 IREmitter::PackHalf2x16(const Value& vector) { - return Inst(Opcode::PackHalf2x16, vector); +U32 IREmitter::Pack4x8(const AmdGpu::NumberFormat number_format, const Value& vector) { + switch (number_format) { + case AmdGpu::NumberFormat::Unorm: + return Inst(Opcode::PackUnorm4x8, vector); + case AmdGpu::NumberFormat::Snorm: + return Inst(Opcode::PackSnorm4x8, vector); + case AmdGpu::NumberFormat::Uint: + return Inst(Opcode::PackUint4x8, vector); + case AmdGpu::NumberFormat::Sint: + return Inst(Opcode::PackSint4x8, vector); + default: + UNREACHABLE_MSG("Unsupported 4x8 number format: {}", number_format); + } } -Value IREmitter::UnpackHalf2x16(const U32& value) { - return Inst(Opcode::UnpackHalf2x16, value); +Value IREmitter::Unpack4x8(const AmdGpu::NumberFormat number_format, const U32& value) { + switch (number_format) { + case AmdGpu::NumberFormat::Unorm: + return Inst(Opcode::UnpackUnorm4x8, value); + case AmdGpu::NumberFormat::Snorm: + return Inst(Opcode::UnpackSnorm4x8, value); + case AmdGpu::NumberFormat::Uint: + return Inst(Opcode::UnpackUint4x8, value); + case AmdGpu::NumberFormat::Sint: + return Inst(Opcode::UnpackSint4x8, value); + default: + UNREACHABLE_MSG("Unsupported 4x8 number format: {}", number_format); + } +} + +U32 IREmitter::Pack10_11_11(const AmdGpu::NumberFormat number_format, const Value& vector) { + switch (number_format) { + case AmdGpu::NumberFormat::Float: + return Inst(Opcode::PackUfloat10_11_11, vector); + default: + UNREACHABLE_MSG("Unsupported 10_11_11 number format: {}", number_format); + } +} + +U32 IREmitter::Pack2_10_10_10(const AmdGpu::NumberFormat number_format, const Value& vector) { + switch (number_format) { + case AmdGpu::NumberFormat::Unorm: + return Inst(Opcode::PackUnorm2_10_10_10, vector); + case AmdGpu::NumberFormat::Snorm: + return Inst(Opcode::PackSnorm2_10_10_10, vector); + case AmdGpu::NumberFormat::Uint: + return Inst(Opcode::PackUint2_10_10_10, vector); + case AmdGpu::NumberFormat::Sint: + return Inst(Opcode::PackSint2_10_10_10, vector); + default: + UNREACHABLE_MSG("Unsupported 2_10_10_10 number format: {}", number_format); + } +} + +Value IREmitter::Unpack2_10_10_10(const AmdGpu::NumberFormat number_format, const U32& value) { + switch (number_format) { + case AmdGpu::NumberFormat::Unorm: + return Inst(Opcode::UnpackUnorm2_10_10_10, value); + case AmdGpu::NumberFormat::Snorm: + return Inst(Opcode::UnpackSnorm2_10_10_10, value); + case AmdGpu::NumberFormat::Uint: + return Inst(Opcode::UnpackUint2_10_10_10, value); + case AmdGpu::NumberFormat::Sint: + return Inst(Opcode::UnpackSint2_10_10_10, value); + default: + UNREACHABLE_MSG("Unsupported 2_10_10_10 number format: {}", number_format); + } +} + +Value IREmitter::Unpack10_11_11(const AmdGpu::NumberFormat number_format, const U32& value) { + switch (number_format) { + case AmdGpu::NumberFormat::Float: + return Inst(Opcode::UnpackUfloat10_11_11, value); + default: + UNREACHABLE_MSG("Unsupported 10_11_11 number format: {}", number_format); + } } F32F64 IREmitter::FPMul(const F32F64& a, const F32F64& b) { @@ -1461,8 +1611,18 @@ U1 IREmitter::IGreaterThan(const U32& lhs, const U32& rhs, bool is_signed) { return Inst(is_signed ? Opcode::SGreaterThan : Opcode::UGreaterThan, lhs, rhs); } -U1 IREmitter::INotEqual(const U32& lhs, const U32& rhs) { - return Inst(Opcode::INotEqual, lhs, rhs); +U1 IREmitter::INotEqual(const U32U64& lhs, const U32U64& rhs) { + if (lhs.Type() != rhs.Type()) { + UNREACHABLE_MSG("Mismatching types {} and {}", lhs.Type(), rhs.Type()); + } + switch (lhs.Type()) { + case Type::U32: + return Inst(Opcode::INotEqual32, lhs, rhs); + case Type::U64: + return Inst(Opcode::INotEqual64, lhs, rhs); + default: + ThrowInvalidType(lhs.Type()); + } } U1 IREmitter::IGreaterThanEqual(const U32& lhs, const U32& rhs, bool is_signed) { @@ -1732,11 +1892,6 @@ Value IREmitter::ImageGatherDref(const Value& handle, const Value& coords, const return Inst(Opcode::ImageGatherDref, Flags{info}, handle, coords, offset, dref); } -Value IREmitter::ImageQueryDimension(const Value& handle, const IR::U32& lod, - const IR::U1& skip_mips) { - return Inst(Opcode::ImageQueryDimensions, handle, lod, skip_mips); -} - Value IREmitter::ImageQueryDimension(const Value& handle, const IR::U32& lod, const IR::U1& skip_mips, TextureInstInfo info) { return Inst(Opcode::ImageQueryDimensions, Flags{info}, handle, lod, skip_mips); @@ -1763,6 +1918,10 @@ void IREmitter::ImageWrite(const Value& handle, const Value& coords, const U32& Inst(Opcode::ImageWrite, Flags{info}, handle, coords, lod, multisampling, color); } +[[nodiscard]] F32 IREmitter::CubeFaceIndex(const Value& cube_coords) { + return Inst(Opcode::CubeFaceIndex, cube_coords); +} + // Debug print maps to SPIRV's NonSemantic DebugPrintf instruction // Renderdoc will hook in its own implementation of the SPIRV instruction // Renderdoc accepts format specifiers, e.g. %u, listed here: diff --git a/src/shader_recompiler/ir/ir_emitter.h b/src/shader_recompiler/ir/ir_emitter.h index 9aab9459b..7ac75bf70 100644 --- a/src/shader_recompiler/ir/ir_emitter.h +++ b/src/shader_recompiler/ir/ir_emitter.h @@ -109,12 +109,22 @@ public: [[nodiscard]] U32 ReadConst(const Value& base, const U32& offset); [[nodiscard]] U32 ReadConstBuffer(const Value& handle, const U32& index); - [[nodiscard]] Value LoadBuffer(int num_dwords, const Value& handle, const Value& address, - BufferInstInfo info); + [[nodiscard]] U32 LoadBufferU8(const Value& handle, const Value& address, BufferInstInfo info); + [[nodiscard]] U32 LoadBufferU16(const Value& handle, const Value& address, BufferInstInfo info); + [[nodiscard]] Value LoadBufferU32(int num_dwords, const Value& handle, const Value& address, + BufferInstInfo info); + [[nodiscard]] Value LoadBufferF32(int num_dwords, const Value& handle, const Value& address, + BufferInstInfo info); [[nodiscard]] Value LoadBufferFormat(const Value& handle, const Value& address, BufferInstInfo info); - void StoreBuffer(int num_dwords, const Value& handle, const Value& address, const Value& data, - BufferInstInfo info); + void StoreBufferU8(const Value& handle, const Value& address, const U32& data, + BufferInstInfo info); + void StoreBufferU16(const Value& handle, const Value& address, const U32& data, + BufferInstInfo info); + void StoreBufferU32(int num_dwords, const Value& handle, const Value& address, + const Value& data, BufferInstInfo info); + void StoreBufferF32(int num_dwords, const Value& handle, const Value& address, + const Value& data, BufferInstInfo info); void StoreBufferFormat(const Value& handle, const Value& address, const Value& data, BufferInstInfo info); @@ -167,14 +177,19 @@ public: [[nodiscard]] U64 PackUint2x32(const Value& vector); [[nodiscard]] Value UnpackUint2x32(const U64& value); - [[nodiscard]] F64 PackFloat2x32(const Value& vector); - [[nodiscard]] U32 PackFloat2x16(const Value& vector); - [[nodiscard]] Value UnpackFloat2x16(const U32& value); + [[nodiscard]] U32 Pack2x16(AmdGpu::NumberFormat number_format, const Value& vector); + [[nodiscard]] Value Unpack2x16(AmdGpu::NumberFormat number_format, const U32& value); - [[nodiscard]] U32 PackHalf2x16(const Value& vector); - [[nodiscard]] Value UnpackHalf2x16(const U32& value); + [[nodiscard]] U32 Pack4x8(AmdGpu::NumberFormat number_format, const Value& vector); + [[nodiscard]] Value Unpack4x8(AmdGpu::NumberFormat number_format, const U32& value); + + [[nodiscard]] U32 Pack10_11_11(AmdGpu::NumberFormat number_format, const Value& vector); + [[nodiscard]] Value Unpack10_11_11(AmdGpu::NumberFormat number_format, const U32& value); + + [[nodiscard]] U32 Pack2_10_10_10(AmdGpu::NumberFormat number_format, const Value& vector); + [[nodiscard]] Value Unpack2_10_10_10(AmdGpu::NumberFormat number_format, const U32& value); [[nodiscard]] F32F64 FPAdd(const F32F64& a, const F32F64& b); [[nodiscard]] F32F64 FPSub(const F32F64& a, const F32F64& b); @@ -258,7 +273,7 @@ public: [[nodiscard]] U1 IEqual(const U32U64& lhs, const U32U64& rhs); [[nodiscard]] U1 ILessThanEqual(const U32& lhs, const U32& rhs, bool is_signed); [[nodiscard]] U1 IGreaterThan(const U32& lhs, const U32& rhs, bool is_signed); - [[nodiscard]] U1 INotEqual(const U32& lhs, const U32& rhs); + [[nodiscard]] U1 INotEqual(const U32U64& lhs, const U32U64& rhs); [[nodiscard]] U1 IGreaterThanEqual(const U32& lhs, const U32& rhs, bool is_signed); [[nodiscard]] U1 LogicalOr(const U1& a, const U1& b); @@ -324,8 +339,6 @@ public: const F32& dref, const F32& lod, const Value& offset, TextureInstInfo info); - [[nodiscard]] Value ImageQueryDimension(const Value& handle, const U32& lod, - const U1& skip_mips); [[nodiscard]] Value ImageQueryDimension(const Value& handle, const U32& lod, const U1& skip_mips, TextureInstInfo info); @@ -344,6 +357,8 @@ public: void ImageWrite(const Value& handle, const Value& coords, const U32& lod, const U32& multisampling, const Value& color, TextureInstInfo info); + [[nodiscard]] F32 CubeFaceIndex(const Value& cube_coords); + void EmitVertex(); void EmitPrimitive(); diff --git a/src/shader_recompiler/ir/microinstruction.cpp b/src/shader_recompiler/ir/microinstruction.cpp index 6e7bbe661..580156f5b 100644 --- a/src/shader_recompiler/ir/microinstruction.cpp +++ b/src/shader_recompiler/ir/microinstruction.cpp @@ -54,10 +54,16 @@ bool Inst::MayHaveSideEffects() const noexcept { case Opcode::SetAttribute: case Opcode::SetTcsGenericAttribute: case Opcode::SetPatch: + case Opcode::StoreBufferU8: + case Opcode::StoreBufferU16: case Opcode::StoreBufferU32: case Opcode::StoreBufferU32x2: case Opcode::StoreBufferU32x3: case Opcode::StoreBufferU32x4: + case Opcode::StoreBufferF32: + case Opcode::StoreBufferF32x2: + case Opcode::StoreBufferF32x3: + case Opcode::StoreBufferF32x4: case Opcode::StoreBufferFormatF32: case Opcode::BufferAtomicIAdd32: case Opcode::BufferAtomicSMin32: @@ -72,7 +78,6 @@ bool Inst::MayHaveSideEffects() const noexcept { case Opcode::BufferAtomicSwap32: case Opcode::DataAppend: case Opcode::DataConsume: - case Opcode::WriteSharedU128: case Opcode::WriteSharedU64: case Opcode::WriteSharedU32: case Opcode::SharedAtomicIAdd32: diff --git a/src/shader_recompiler/ir/opcodes.h b/src/shader_recompiler/ir/opcodes.h index cd73ace7e..f3d16da4a 100644 --- a/src/shader_recompiler/ir/opcodes.h +++ b/src/shader_recompiler/ir/opcodes.h @@ -53,7 +53,7 @@ constexpr Type F64x3{Type::F64x3}; constexpr Type F64x4{Type::F64x4}; constexpr Type StringLiteral{Type::StringLiteral}; -constexpr OpcodeMeta META_TABLE[] { +constexpr OpcodeMeta META_TABLE[]{ #define OPCODE(name_token, type_token, ...) \ { \ .name{#name_token}, \ diff --git a/src/shader_recompiler/ir/opcodes.inc b/src/shader_recompiler/ir/opcodes.inc index 6242a230e..d5e17631b 100644 --- a/src/shader_recompiler/ir/opcodes.inc +++ b/src/shader_recompiler/ir/opcodes.inc @@ -32,10 +32,8 @@ OPCODE(EmitPrimitive, Void, // Shared memory operations OPCODE(LoadSharedU32, U32, U32, ) OPCODE(LoadSharedU64, U32x2, U32, ) -OPCODE(LoadSharedU128, U32x4, U32, ) OPCODE(WriteSharedU32, Void, U32, U32, ) OPCODE(WriteSharedU64, Void, U32, U32x2, ) -OPCODE(WriteSharedU128, Void, U32, U32x4, ) // Shared atomic operations OPCODE(SharedAtomicIAdd32, U32, U32, U32, ) @@ -90,15 +88,27 @@ OPCODE(UndefU32, U32, OPCODE(UndefU64, U64, ) // Buffer operations +OPCODE(LoadBufferU8, U32, Opaque, Opaque, ) +OPCODE(LoadBufferU16, U32, Opaque, Opaque, ) OPCODE(LoadBufferU32, U32, Opaque, Opaque, ) OPCODE(LoadBufferU32x2, U32x2, Opaque, Opaque, ) OPCODE(LoadBufferU32x3, U32x3, Opaque, Opaque, ) OPCODE(LoadBufferU32x4, U32x4, Opaque, Opaque, ) +OPCODE(LoadBufferF32, F32, Opaque, Opaque, ) +OPCODE(LoadBufferF32x2, F32x2, Opaque, Opaque, ) +OPCODE(LoadBufferF32x3, F32x3, Opaque, Opaque, ) +OPCODE(LoadBufferF32x4, F32x4, Opaque, Opaque, ) OPCODE(LoadBufferFormatF32, F32x4, Opaque, Opaque, ) +OPCODE(StoreBufferU8, Void, Opaque, Opaque, U32, ) +OPCODE(StoreBufferU16, Void, Opaque, Opaque, U32, ) OPCODE(StoreBufferU32, Void, Opaque, Opaque, U32, ) OPCODE(StoreBufferU32x2, Void, Opaque, Opaque, U32x2, ) OPCODE(StoreBufferU32x3, Void, Opaque, Opaque, U32x3, ) OPCODE(StoreBufferU32x4, Void, Opaque, Opaque, U32x4, ) +OPCODE(StoreBufferF32, Void, Opaque, Opaque, F32, ) +OPCODE(StoreBufferF32x2, Void, Opaque, Opaque, F32x2, ) +OPCODE(StoreBufferF32x3, Void, Opaque, Opaque, F32x3, ) +OPCODE(StoreBufferF32x4, Void, Opaque, Opaque, F32x4, ) OPCODE(StoreBufferFormatF32, Void, Opaque, Opaque, F32x4, ) // Buffer atomic operations @@ -118,6 +128,7 @@ OPCODE(BufferAtomicSwap32, U32, Opaq OPCODE(CompositeConstructU32x2, U32x2, U32, U32, ) OPCODE(CompositeConstructU32x3, U32x3, U32, U32, U32, ) OPCODE(CompositeConstructU32x4, U32x4, U32, U32, U32, U32, ) +OPCODE(CompositeConstructU32x2x2, U32x4, U32x2, U32x2, ) OPCODE(CompositeExtractU32x2, U32, U32x2, U32, ) OPCODE(CompositeExtractU32x3, U32, U32x3, U32, ) OPCODE(CompositeExtractU32x4, U32, U32x4, U32, ) @@ -142,6 +153,7 @@ OPCODE(CompositeShuffleF16x4, F16x4, F16x OPCODE(CompositeConstructF32x2, F32x2, F32, F32, ) OPCODE(CompositeConstructF32x3, F32x3, F32, F32, F32, ) OPCODE(CompositeConstructF32x4, F32x4, F32, F32, F32, F32, ) +OPCODE(CompositeConstructF32x2x2, F32x4, F32x2, F32x2, ) OPCODE(CompositeExtractF32x2, F32, F32x2, U32, ) OPCODE(CompositeExtractF32x3, F32, F32x3, U32, ) OPCODE(CompositeExtractF32x4, F32, F32x4, U32, ) @@ -180,14 +192,43 @@ OPCODE(BitCastU64F64, U64, F64, OPCODE(BitCastF16U16, F16, U16, ) OPCODE(BitCastF32U32, F32, U32, ) OPCODE(BitCastF64U64, F64, U64, ) + OPCODE(PackUint2x32, U64, U32x2, ) OPCODE(UnpackUint2x32, U32x2, U64, ) OPCODE(PackFloat2x32, F64, F32x2, ) -OPCODE(PackFloat2x16, U32, F16x2, ) -OPCODE(UnpackFloat2x16, F16x2, U32, ) + +OPCODE(PackUnorm2x16, U32, F32x2, ) +OPCODE(UnpackUnorm2x16, F32x2, U32, ) +OPCODE(PackSnorm2x16, U32, F32x2, ) +OPCODE(UnpackSnorm2x16, F32x2, U32, ) +OPCODE(PackUint2x16, U32, F32x2, ) +OPCODE(UnpackUint2x16, F32x2, U32, ) +OPCODE(PackSint2x16, U32, F32x2, ) +OPCODE(UnpackSint2x16, F32x2, U32, ) OPCODE(PackHalf2x16, U32, F32x2, ) OPCODE(UnpackHalf2x16, F32x2, U32, ) +OPCODE(PackUnorm4x8, U32, F32x4, ) +OPCODE(UnpackUnorm4x8, F32x4, U32, ) +OPCODE(PackSnorm4x8, U32, F32x4, ) +OPCODE(UnpackSnorm4x8, F32x4, U32, ) +OPCODE(PackUint4x8, U32, F32x4, ) +OPCODE(UnpackUint4x8, F32x4, U32, ) +OPCODE(PackSint4x8, U32, F32x4, ) +OPCODE(UnpackSint4x8, F32x4, U32, ) + +OPCODE(PackUfloat10_11_11, U32, F32x3, ) +OPCODE(UnpackUfloat10_11_11, F32x3, U32, ) + +OPCODE(PackUnorm2_10_10_10, U32, F32x4, ) +OPCODE(UnpackUnorm2_10_10_10, F32x4, U32, ) +OPCODE(PackSnorm2_10_10_10, U32, F32x4, ) +OPCODE(UnpackSnorm2_10_10_10, F32x4, U32, ) +OPCODE(PackUint2_10_10_10, U32, F32x4, ) +OPCODE(UnpackUint2_10_10_10, F32x4, U32, ) +OPCODE(PackSint2_10_10_10, U32, F32x4, ) +OPCODE(UnpackSint2_10_10_10, F32x4, U32, ) + // Floating-point operations OPCODE(FPAbs32, F32, F32, ) OPCODE(FPAbs64, F64, F64, ) @@ -321,7 +362,8 @@ OPCODE(SLessThanEqual, U1, U32, OPCODE(ULessThanEqual, U1, U32, U32, ) OPCODE(SGreaterThan, U1, U32, U32, ) OPCODE(UGreaterThan, U1, U32, U32, ) -OPCODE(INotEqual, U1, U32, U32, ) +OPCODE(INotEqual32, U1, U32, U32, ) +OPCODE(INotEqual64, U1, U64, U64, ) OPCODE(SGreaterThanEqual, U1, U32, U32, ) OPCODE(UGreaterThanEqual, U1, U32, U32, ) @@ -374,6 +416,9 @@ OPCODE(ImageAtomicOr32, U32, Opaq OPCODE(ImageAtomicXor32, U32, Opaque, Opaque, U32, ) OPCODE(ImageAtomicExchange32, U32, Opaque, Opaque, U32, ) +// Cube operations - optional, usable if profile.supports_native_cube_calc +OPCODE(CubeFaceIndex, F32, F32x3, ) + // Warp operations OPCODE(LaneId, U32, ) OPCODE(WarpId, U32, ) diff --git a/src/shader_recompiler/ir/passes/constant_propagation_pass.cpp b/src/shader_recompiler/ir/passes/constant_propagation_pass.cpp index fcf2f7d9f..5c66b1115 100644 --- a/src/shader_recompiler/ir/passes/constant_propagation_pass.cpp +++ b/src/shader_recompiler/ir/passes/constant_propagation_pass.cpp @@ -222,9 +222,15 @@ void FoldMul(IR::Block& block, IR::Inst& inst) { return; } const IR::Value rhs{inst.Arg(1)}; - if (rhs.IsImmediate() && Arg(rhs) == 0) { - inst.ReplaceUsesWithAndRemove(IR::Value(0u)); - return; + if (rhs.IsImmediate()) { + if (Arg(rhs) == 0) { + inst.ReplaceUsesWithAndRemove(IR::Value(0u)); + return; + } + if (Arg(rhs) == 1) { + inst.ReplaceUsesWithAndRemove(inst.Arg(0)); + return; + } } } @@ -245,54 +251,6 @@ void FoldCmpClass(IR::Block& block, IR::Inst& inst) { } } -void FoldReadLane(IR::Block& block, IR::Inst& inst) { - const u32 lane = inst.Arg(1).U32(); - IR::Inst* prod = inst.Arg(0).InstRecursive(); - - const auto search_chain = [lane](const IR::Inst* prod) -> IR::Value { - while (prod->GetOpcode() == IR::Opcode::WriteLane) { - if (prod->Arg(2).U32() == lane) { - return prod->Arg(1); - } - prod = prod->Arg(0).InstRecursive(); - } - return {}; - }; - - if (prod->GetOpcode() == IR::Opcode::WriteLane) { - if (const IR::Value value = search_chain(prod); !value.IsEmpty()) { - inst.ReplaceUsesWith(value); - } - return; - } - - if (prod->GetOpcode() == IR::Opcode::Phi) { - boost::container::small_vector phi_args; - for (size_t arg_index = 0; arg_index < prod->NumArgs(); ++arg_index) { - const IR::Inst* arg{prod->Arg(arg_index).InstRecursive()}; - if (arg->GetOpcode() != IR::Opcode::WriteLane) { - return; - } - const IR::Value value = search_chain(arg); - if (value.IsEmpty()) { - continue; - } - phi_args.emplace_back(value); - } - if (std::ranges::all_of(phi_args, [&](IR::Value value) { return value == phi_args[0]; })) { - inst.ReplaceUsesWith(phi_args[0]); - return; - } - const auto insert_point = IR::Block::InstructionList::s_iterator_to(*prod); - IR::Inst* const new_phi{&*block.PrependNewInst(insert_point, IR::Opcode::Phi)}; - new_phi->SetFlags(IR::Type::U32); - for (size_t arg_index = 0; arg_index < phi_args.size(); arg_index++) { - new_phi->AddPhiOperand(prod->PhiBlock(arg_index), phi_args[arg_index]); - } - inst.ReplaceUsesWith(IR::Value{new_phi}); - } -} - void ConstantPropagation(IR::Block& block, IR::Inst& inst) { switch (inst.GetOpcode()) { case IR::Opcode::IAdd32: @@ -334,14 +292,66 @@ void ConstantPropagation(IR::Block& block, IR::Inst& inst) { return FoldBitCast(inst, IR::Opcode::BitCastU32F32); case IR::Opcode::BitCastU32F32: return FoldBitCast(inst, IR::Opcode::BitCastF32U32); + // 2x16 + case IR::Opcode::PackUnorm2x16: + return FoldInverseFunc(inst, IR::Opcode::UnpackUnorm2x16); + case IR::Opcode::UnpackUnorm2x16: + return FoldInverseFunc(inst, IR::Opcode::PackUnorm2x16); + case IR::Opcode::PackSnorm2x16: + return FoldInverseFunc(inst, IR::Opcode::UnpackSnorm2x16); + case IR::Opcode::UnpackSnorm2x16: + return FoldInverseFunc(inst, IR::Opcode::PackSnorm2x16); + case IR::Opcode::PackUint2x16: + return FoldInverseFunc(inst, IR::Opcode::UnpackUint2x16); + case IR::Opcode::UnpackUint2x16: + return FoldInverseFunc(inst, IR::Opcode::PackUint2x16); + case IR::Opcode::PackSint2x16: + return FoldInverseFunc(inst, IR::Opcode::UnpackSint2x16); + case IR::Opcode::UnpackSint2x16: + return FoldInverseFunc(inst, IR::Opcode::PackSint2x16); case IR::Opcode::PackHalf2x16: return FoldInverseFunc(inst, IR::Opcode::UnpackHalf2x16); case IR::Opcode::UnpackHalf2x16: return FoldInverseFunc(inst, IR::Opcode::PackHalf2x16); - case IR::Opcode::PackFloat2x16: - return FoldInverseFunc(inst, IR::Opcode::UnpackFloat2x16); - case IR::Opcode::UnpackFloat2x16: - return FoldInverseFunc(inst, IR::Opcode::PackFloat2x16); + // 4x8 + case IR::Opcode::PackUnorm4x8: + return FoldInverseFunc(inst, IR::Opcode::UnpackUnorm4x8); + case IR::Opcode::UnpackUnorm4x8: + return FoldInverseFunc(inst, IR::Opcode::PackUnorm4x8); + case IR::Opcode::PackSnorm4x8: + return FoldInverseFunc(inst, IR::Opcode::UnpackSnorm4x8); + case IR::Opcode::UnpackSnorm4x8: + return FoldInverseFunc(inst, IR::Opcode::PackSnorm4x8); + case IR::Opcode::PackUint4x8: + return FoldInverseFunc(inst, IR::Opcode::UnpackUint4x8); + case IR::Opcode::UnpackUint4x8: + return FoldInverseFunc(inst, IR::Opcode::PackUint4x8); + case IR::Opcode::PackSint4x8: + return FoldInverseFunc(inst, IR::Opcode::UnpackSint4x8); + case IR::Opcode::UnpackSint4x8: + return FoldInverseFunc(inst, IR::Opcode::PackSint4x8); + // 10_11_11 + case IR::Opcode::PackUfloat10_11_11: + return FoldInverseFunc(inst, IR::Opcode::UnpackUfloat10_11_11); + case IR::Opcode::UnpackUfloat10_11_11: + return FoldInverseFunc(inst, IR::Opcode::PackUfloat10_11_11); + // 2_10_10_10 + case IR::Opcode::PackUnorm2_10_10_10: + return FoldInverseFunc(inst, IR::Opcode::UnpackUnorm2_10_10_10); + case IR::Opcode::UnpackUnorm2_10_10_10: + return FoldInverseFunc(inst, IR::Opcode::PackUnorm2_10_10_10); + case IR::Opcode::PackSnorm2_10_10_10: + return FoldInverseFunc(inst, IR::Opcode::UnpackSnorm2_10_10_10); + case IR::Opcode::UnpackSnorm2_10_10_10: + return FoldInverseFunc(inst, IR::Opcode::PackSnorm2_10_10_10); + case IR::Opcode::PackUint2_10_10_10: + return FoldInverseFunc(inst, IR::Opcode::UnpackUint2_10_10_10); + case IR::Opcode::UnpackUint2_10_10_10: + return FoldInverseFunc(inst, IR::Opcode::PackUint2_10_10_10); + case IR::Opcode::PackSint2_10_10_10: + return FoldInverseFunc(inst, IR::Opcode::UnpackSint2_10_10_10); + case IR::Opcode::UnpackSint2_10_10_10: + return FoldInverseFunc(inst, IR::Opcode::PackSint2_10_10_10); case IR::Opcode::SelectU1: case IR::Opcode::SelectU8: case IR::Opcode::SelectU16: @@ -350,8 +360,6 @@ void ConstantPropagation(IR::Block& block, IR::Inst& inst) { case IR::Opcode::SelectF32: case IR::Opcode::SelectF64: return FoldSelect(inst); - case IR::Opcode::ReadLane: - return FoldReadLane(block, inst); case IR::Opcode::FPNeg32: FoldWhenAllImmediates(inst, [](f32 a) { return -a; }); return; @@ -397,9 +405,12 @@ void ConstantPropagation(IR::Block& block, IR::Inst& inst) { case IR::Opcode::IEqual64: FoldWhenAllImmediates(inst, [](u64 a, u64 b) { return a == b; }); return; - case IR::Opcode::INotEqual: + case IR::Opcode::INotEqual32: FoldWhenAllImmediates(inst, [](u32 a, u32 b) { return a != b; }); return; + case IR::Opcode::INotEqual64: + FoldWhenAllImmediates(inst, [](u64 a, u64 b) { return a != b; }); + return; case IR::Opcode::BitwiseAnd32: FoldWhenAllImmediates(inst, [](u32 a, u32 b) { return a & b; }); return; diff --git a/src/shader_recompiler/ir/passes/flatten_extended_userdata_pass.cpp b/src/shader_recompiler/ir/passes/flatten_extended_userdata_pass.cpp index ef9319891..bbf3fe8fb 100644 --- a/src/shader_recompiler/ir/passes/flatten_extended_userdata_pass.cpp +++ b/src/shader_recompiler/ir/passes/flatten_extended_userdata_pass.cpp @@ -219,7 +219,7 @@ void FlattenExtendedUserdataPass(IR::Program& program) { }; auto base0 = IR::BreadthFirstSearch(ptr_composite->Arg(0), pred); auto base1 = IR::BreadthFirstSearch(ptr_composite->Arg(1), pred); - ASSERT_MSG(base0 && base1 && "ReadConst not from constant memory"); + ASSERT_MSG(base0 && base1, "ReadConst not from constant memory"); IR::Inst* ptr_lo = base0.value(); ptr_lo = pass_info.DeduplicateInstruction(ptr_lo); @@ -250,4 +250,4 @@ void FlattenExtendedUserdataPass(IR::Program& program) { info.RefreshFlatBuf(); } -} // namespace Shader::Optimization \ No newline at end of file +} // namespace Shader::Optimization diff --git a/src/shader_recompiler/ir/passes/hull_shader_transform.cpp b/src/shader_recompiler/ir/passes/hull_shader_transform.cpp index 6164fec12..5cf8a1525 100644 --- a/src/shader_recompiler/ir/passes/hull_shader_transform.cpp +++ b/src/shader_recompiler/ir/passes/hull_shader_transform.cpp @@ -1,11 +1,13 @@ // SPDX-FileCopyrightText: Copyright 2024 shadPS4 Emulator Project // SPDX-License-Identifier: GPL-2.0-or-later + #include "common/assert.h" #include "shader_recompiler/info.h" #include "shader_recompiler/ir/attribute.h" #include "shader_recompiler/ir/breadth_first_search.h" #include "shader_recompiler/ir/ir_emitter.h" #include "shader_recompiler/ir/opcodes.h" +#include "shader_recompiler/ir/passes/ir_passes.h" #include "shader_recompiler/ir/pattern_matching.h" #include "shader_recompiler/ir/program.h" #include "shader_recompiler/runtime_info.h" @@ -75,10 +77,12 @@ namespace Shader::Optimization { * * output_patch_stride and output_cp_stride are usually compile time constants in the gcn * - * Hull shaders can probably also read output control points corresponding to other threads, like - * shared memory (but we havent seen this yet). - * ^ This is an UNREACHABLE for now. We may need to insert additional barriers if this happens. - * They should also be able to read PatchConst values, + * Hull shaders can also read output control points corresponding to other threads. + * In HLSL style, this should only be possible in the Patch Constant function. + * TODO we may need to insert additional barriers if sync is free/more permissive + * on AMD LDS HW + + * They should also be able to read output PatchConst values, * although not sure if this happens in practice. * * To determine which type of attribute (input, output, patchconst) we the check the users of @@ -101,22 +105,22 @@ namespace Shader::Optimization { * layout (location = 0) in vec4 in_attrs[][NUM_INPUT_ATTRIBUTES]; * * Here the NUM_INPUT_ATTRIBUTES is derived from the ls_stride member of the TessConstants V#. - * We divide ls_stride (in bytes) by 16 to get the number of vec4 attributes. - * For TES, the number of attributes comes from hs_cp_stride / 16. + * We take ALIGN_UP(ls_stride, 16) / 16 to get the number of vec4 attributes. + * For TES, NUM_INPUT_ATTRIBUTES is ALIGN_UP(hs_cp_stride, 16) / 16. * The first (outer) dimension is unsized but corresponds to the number of vertices in the hs input * patch (for Hull) or the hs output patch (for Domain). * * For input reads in TCS or TES, we emit SPIR-V like: - * float value = in_attrs[addr / ls_stride][(addr % ls_stride) >> 4][(addr & 0xF) >> 2]; + * float value = in_attrs[addr / ls_stride][(addr % ls_stride) >> 4][(addr % ls_stride) >> 2]; * * For output writes, we assume the control point index is InvocationId, since high level languages * impose that restriction (although maybe it's technically possible on hardware). So SPIR-V looks * like this: * layout (location = 0) in vec4 in_attrs[][NUM_OUTPUT_ATTRIBUTES]; - * out_attrs[InvocationId][(addr % hs_cp_stride) >> 4][(addr & 0xF) >> 2] = value; + * out_attrs[InvocationId][(addr % hs_cp_stride) >> 4][(addr % hs_cp_stride) >> 2] = value; * - * NUM_OUTPUT_ATTRIBUTES is derived by hs_cp_stride / 16, so it can link with the TES in_attrs - * variable. + * NUM_OUTPUT_ATTRIBUTES is derived by ALIGN_UP(hs_cp_stride, 16) / 16, so it matches + * NUM_INPUT_ATTRIBUTES of the TES. * * Another challenge is the fact that the GCN shader needs to address attributes from LDS as a whole * which contains the attributes from many patches. On the other hand, higher level shading @@ -225,10 +229,8 @@ private: switch (use.user->GetOpcode()) { case IR::Opcode::LoadSharedU32: case IR::Opcode::LoadSharedU64: - case IR::Opcode::LoadSharedU128: case IR::Opcode::WriteSharedU32: - case IR::Opcode::WriteSharedU64: - case IR::Opcode::WriteSharedU128: { + case IR::Opcode::WriteSharedU64: { u32 counter = inst->Flags(); inst->SetFlags(counter + inc); // Stop here @@ -237,12 +239,11 @@ private: case IR::Opcode::Phi: { struct PhiCounter { u16 seq_num; - u8 unique_edge; - u8 counter; + u16 unique_edge; }; PhiCounter count = inst->Flags(); - ASSERT_MSG(count.counter == 0 || count.unique_edge == use.operand); + ASSERT_MSG(count.seq_num == 0 || count.unique_edge == use.operand); // the point of seq_num is to tell us if we've already traversed this // phi on the current walk. Alternatively we could keep a set of phi's // seen on the current walk. This is to handle phi cycles @@ -251,13 +252,11 @@ private: count.seq_num = seq_num; // Mark the phi as having been traversed originally through this edge count.unique_edge = use.operand; - count.counter = inc; } else if (count.seq_num < seq_num) { count.seq_num = seq_num; // For now, assume we are visiting this phi via the same edge // as on other walks. If not, some dataflow analysis might be necessary ASSERT(count.unique_edge == use.operand); - count.counter += inc; } else { // count.seq_num == seq_num // there's a cycle, and we've already been here on this walk @@ -349,11 +348,11 @@ static IR::F32 ReadTessControlPointAttribute(IR::U32 addr, const u32 stride, IR: addr = ir.IAdd(addr, ir.Imm32(off_dw)); } const IR::U32 control_point_index = ir.IDiv(addr, ir.Imm32(stride)); - const IR::U32 addr_for_attrs = TryOptimizeAddressModulo(addr, stride, ir); - const IR::U32 attr_index = - ir.ShiftRightLogical(ir.IMod(addr_for_attrs, ir.Imm32(stride)), ir.Imm32(4u)); + const IR::U32 opt_addr = TryOptimizeAddressModulo(addr, stride, ir); + const IR::U32 offset = ir.IMod(opt_addr, ir.Imm32(stride)); + const IR::U32 attr_index = ir.ShiftRightLogical(offset, ir.Imm32(4u)); const IR::U32 comp_index = - ir.ShiftRightLogical(ir.BitwiseAnd(addr_for_attrs, ir.Imm32(0xFU)), ir.Imm32(2u)); + ir.ShiftRightLogical(ir.BitwiseAnd(offset, ir.Imm32(0xFU)), ir.Imm32(2u)); if (is_output_read_in_tcs) { return ir.ReadTcsGenericOuputAttribute(control_point_index, attr_index, comp_index); } else { @@ -435,12 +434,9 @@ void HullShaderTransform(IR::Program& program, RuntimeInfo& runtime_info) { } case IR::Opcode::WriteSharedU32: - case IR::Opcode::WriteSharedU64: - case IR::Opcode::WriteSharedU128: { + case IR::Opcode::WriteSharedU64: { IR::IREmitter ir{*block, IR::Block::InstructionList::s_iterator_to(inst)}; - const u32 num_dwords = opcode == IR::Opcode::WriteSharedU32 - ? 1 - : (opcode == IR::Opcode::WriteSharedU64 ? 2 : 4); + const u32 num_dwords = opcode == IR::Opcode::WriteSharedU32 ? 1 : 2; const IR::U32 addr{inst.Arg(0)}; const IR::U32 data{inst.Arg(1).Resolve()}; @@ -452,13 +448,13 @@ void HullShaderTransform(IR::Program& program, RuntimeInfo& runtime_info) { if (off_dw > 0) { addr = ir.IAdd(addr, ir.Imm32(off_dw)); } - u32 stride = runtime_info.hs_info.hs_output_cp_stride; + const u32 stride = runtime_info.hs_info.hs_output_cp_stride; // Invocation ID array index is implicit, handled by SPIRV backend - const IR::U32 addr_for_attrs = TryOptimizeAddressModulo(addr, stride, ir); - const IR::U32 attr_index = ir.ShiftRightLogical( - ir.IMod(addr_for_attrs, ir.Imm32(stride)), ir.Imm32(4u)); + const IR::U32 opt_addr = TryOptimizeAddressModulo(addr, stride, ir); + const IR::U32 offset = ir.IMod(opt_addr, ir.Imm32(stride)); + const IR::U32 attr_index = ir.ShiftRightLogical(offset, ir.Imm32(4u)); const IR::U32 comp_index = ir.ShiftRightLogical( - ir.BitwiseAnd(addr_for_attrs, ir.Imm32(0xFU)), ir.Imm32(2u)); + ir.BitwiseAnd(offset, ir.Imm32(0xFU)), ir.Imm32(2u)); ir.SetTcsGenericAttribute(data_component, attr_index, comp_index); } else { ASSERT(output_kind == AttributeRegion::PatchConst); @@ -480,15 +476,12 @@ void HullShaderTransform(IR::Program& program, RuntimeInfo& runtime_info) { break; } - case IR::Opcode::LoadSharedU32: { - case IR::Opcode::LoadSharedU64: - case IR::Opcode::LoadSharedU128: + case IR::Opcode::LoadSharedU32: + case IR::Opcode::LoadSharedU64: { IR::IREmitter ir{*block, IR::Block::InstructionList::s_iterator_to(inst)}; const IR::U32 addr{inst.Arg(0)}; const AttributeRegion region = GetAttributeRegionKind(&inst, info, runtime_info); - const u32 num_dwords = opcode == IR::Opcode::LoadSharedU32 - ? 1 - : (opcode == IR::Opcode::LoadSharedU64 ? 2 : 4); + const u32 num_dwords = opcode == IR::Opcode::LoadSharedU32 ? 1 : 2; ASSERT_MSG(region == AttributeRegion::InputCP || region == AttributeRegion::OutputCP, "Unhandled read of patchconst attribute in hull shader"); @@ -535,8 +528,7 @@ void HullShaderTransform(IR::Program& program, RuntimeInfo& runtime_info) { // ... IR::IREmitter ir{*entry_block, it}; - ASSERT(runtime_info.hs_info.ls_stride % 16 == 0); - u32 num_attributes = runtime_info.hs_info.ls_stride / 16; + u32 num_attributes = Common::AlignUp(runtime_info.hs_info.ls_stride, 16) >> 4; const auto invocation_id = ir.GetAttributeU32(IR::Attribute::InvocationId); for (u32 attr_no = 0; attr_no < num_attributes; attr_no++) { for (u32 comp = 0; comp < 4; comp++) { @@ -563,14 +555,11 @@ void DomainShaderTransform(IR::Program& program, RuntimeInfo& runtime_info) { IR::IREmitter ir{*block, IR::Block::InstructionList::s_iterator_to(inst)}; const auto opcode = inst.GetOpcode(); switch (inst.GetOpcode()) { - case IR::Opcode::LoadSharedU32: { - case IR::Opcode::LoadSharedU64: - case IR::Opcode::LoadSharedU128: + case IR::Opcode::LoadSharedU32: + case IR::Opcode::LoadSharedU64: { const IR::U32 addr{inst.Arg(0)}; AttributeRegion region = GetAttributeRegionKind(&inst, info, runtime_info); - const u32 num_dwords = opcode == IR::Opcode::LoadSharedU32 - ? 1 - : (opcode == IR::Opcode::LoadSharedU64 ? 2 : 4); + const u32 num_dwords = opcode == IR::Opcode::LoadSharedU32 ? 1 : 2; const auto GetInput = [&](IR::U32 addr, u32 off_dw) -> IR::F32 { if (region == AttributeRegion::OutputCP) { return ReadTessControlPointAttribute( @@ -612,10 +601,8 @@ void TessellationPreprocess(IR::Program& program, RuntimeInfo& runtime_info) { switch (inst.GetOpcode()) { case IR::Opcode::LoadSharedU32: case IR::Opcode::LoadSharedU64: - case IR::Opcode::LoadSharedU128: case IR::Opcode::WriteSharedU32: - case IR::Opcode::WriteSharedU64: - case IR::Opcode::WriteSharedU128: { + case IR::Opcode::WriteSharedU64: { IR::Value addr = inst.Arg(0); auto read_const_buffer = IR::BreadthFirstSearch( addr, [](IR::Inst* maybe_tess_const) -> std::optional { @@ -749,6 +736,8 @@ void TessellationPreprocess(IR::Program& program, RuntimeInfo& runtime_info) { } } } + + ConstantPropagationPass(program.post_order_blocks); } } // namespace Shader::Optimization diff --git a/src/shader_recompiler/ir/passes/ir_passes.h b/src/shader_recompiler/ir/passes/ir_passes.h index 8a71d9e1f..760dbb112 100644 --- a/src/shader_recompiler/ir/passes/ir_passes.h +++ b/src/shader_recompiler/ir/passes/ir_passes.h @@ -17,14 +17,17 @@ void IdentityRemovalPass(IR::BlockList& program); void DeadCodeEliminationPass(IR::Program& program); void ConstantPropagationPass(IR::BlockList& program); void FlattenExtendedUserdataPass(IR::Program& program); +void ReadLaneEliminationPass(IR::Program& program); void ResourceTrackingPass(IR::Program& program); void CollectShaderInfoPass(IR::Program& program); -void LowerSharedMemToRegisters(IR::Program& program); -void RingAccessElimination(const IR::Program& program, const RuntimeInfo& runtime_info, - Stage stage); +void LowerBufferFormatToRaw(IR::Program& program); +void RingAccessElimination(const IR::Program& program, const RuntimeInfo& runtime_info); void TessellationPreprocess(IR::Program& program, RuntimeInfo& runtime_info); void HullShaderTransform(IR::Program& program, RuntimeInfo& runtime_info); void DomainShaderTransform(IR::Program& program, RuntimeInfo& runtime_info); -void SharedMemoryBarrierPass(IR::Program& program, const Profile& profile); +void SharedMemoryBarrierPass(IR::Program& program, const RuntimeInfo& runtime_info, + const Profile& profile); +void SharedMemoryToStoragePass(IR::Program& program, const RuntimeInfo& runtime_info, + const Profile& profile); } // namespace Shader::Optimization diff --git a/src/shader_recompiler/ir/passes/lower_buffer_format_to_raw.cpp b/src/shader_recompiler/ir/passes/lower_buffer_format_to_raw.cpp new file mode 100644 index 000000000..3fdc6f0cd --- /dev/null +++ b/src/shader_recompiler/ir/passes/lower_buffer_format_to_raw.cpp @@ -0,0 +1,230 @@ +// SPDX-FileCopyrightText: Copyright 2025 shadPS4 Emulator Project +// SPDX-License-Identifier: GPL-2.0-or-later + +#include "shader_recompiler/info.h" +#include "shader_recompiler/ir/basic_block.h" +#include "shader_recompiler/ir/ir_emitter.h" +#include "shader_recompiler/ir/program.h" +#include "shader_recompiler/ir/reinterpret.h" +#include "video_core/amdgpu/resource.h" + +namespace Shader::Optimization { + +struct FormatInfo { + AmdGpu::DataFormat data_format; + AmdGpu::NumberFormat num_format; + AmdGpu::CompMapping swizzle; + AmdGpu::NumberConversion num_conversion; + int num_components; +}; + +static bool IsBufferFormatLoad(const IR::Inst& inst) { + return inst.GetOpcode() == IR::Opcode::LoadBufferFormatF32; +} + +static bool IsBufferFormatStore(const IR::Inst& inst) { + return inst.GetOpcode() == IR::Opcode::StoreBufferFormatF32; +} + +static IR::Value LoadBufferFormat(IR::IREmitter& ir, const IR::Value handle, const IR::U32 address, + const IR::BufferInstInfo info, const FormatInfo& format_info) { + IR::Value interpreted; + switch (format_info.data_format) { + case AmdGpu::DataFormat::FormatInvalid: + interpreted = ir.Imm32(0.f); + break; + case AmdGpu::DataFormat::Format8: { + const auto unpacked = + ir.Unpack4x8(format_info.num_format, ir.LoadBufferU8(handle, address, info)); + interpreted = ir.CompositeExtract(unpacked, 0); + break; + } + case AmdGpu::DataFormat::Format8_8: { + const auto raw = ir.LoadBufferU16(handle, address, info); + const auto unpacked = ir.Unpack4x8(format_info.num_format, raw); + interpreted = ir.CompositeConstruct(ir.CompositeExtract(unpacked, 0), + ir.CompositeExtract(unpacked, 1)); + break; + } + case AmdGpu::DataFormat::Format8_8_8_8: + interpreted = ir.Unpack4x8(format_info.num_format, + IR::U32{ir.LoadBufferU32(1, handle, address, info)}); + break; + case AmdGpu::DataFormat::Format16: { + const auto unpacked = + ir.Unpack2x16(format_info.num_format, ir.LoadBufferU16(handle, address, info)); + interpreted = ir.CompositeExtract(unpacked, 0); + break; + } + case AmdGpu::DataFormat::Format16_16: + interpreted = ir.Unpack2x16(format_info.num_format, + IR::U32{ir.LoadBufferU32(1, handle, address, info)}); + break; + case AmdGpu::DataFormat::Format10_11_11: + interpreted = ir.Unpack10_11_11(format_info.num_format, + IR::U32{ir.LoadBufferU32(1, handle, address, info)}); + break; + case AmdGpu::DataFormat::Format2_10_10_10: + interpreted = ir.Unpack2_10_10_10(format_info.num_format, + IR::U32{ir.LoadBufferU32(1, handle, address, info)}); + break; + case AmdGpu::DataFormat::Format16_16_16_16: { + const auto raw = ir.LoadBufferU32(2, handle, address, info); + interpreted = ir.CompositeConstruct( + ir.Unpack2x16(format_info.num_format, IR::U32{ir.CompositeExtract(raw, 0)}), + ir.Unpack2x16(format_info.num_format, IR::U32{ir.CompositeExtract(raw, 1)})); + break; + } + case AmdGpu::DataFormat::Format32: + case AmdGpu::DataFormat::Format32_32: + case AmdGpu::DataFormat::Format32_32_32: + case AmdGpu::DataFormat::Format32_32_32_32: { + ASSERT(format_info.num_format == AmdGpu::NumberFormat::Uint || + format_info.num_format == AmdGpu::NumberFormat::Sint || + format_info.num_format == AmdGpu::NumberFormat::Float); + interpreted = ir.LoadBufferF32(format_info.num_components, handle, address, info); + break; + } + default: + UNREACHABLE_MSG("Unsupported buffer data format: {}", format_info.data_format); + } + + // Pad to 4 components and apply additional modifications. + boost::container::static_vector components; + for (u32 i = 0; i < 4; i++) { + if (i < format_info.num_components) { + const auto component = + IR::F32{format_info.num_components == 1 ? interpreted + : ir.CompositeExtract(interpreted, i)}; + components.push_back( + ApplyReadNumberConversion(ir, component, format_info.num_conversion)); + } else { + components.push_back(ir.Imm32(0.f)); + } + } + const auto swizzled = ApplySwizzle(ir, ir.CompositeConstruct(components), format_info.swizzle); + return swizzled; +} + +static void StoreBufferFormat(IR::IREmitter& ir, const IR::Value handle, const IR::U32 address, + const IR::Value& value, const IR::BufferInstInfo info, + const FormatInfo& format_info) { + // Extract actual number of components and apply additional modifications. + const auto swizzled = ApplySwizzle(ir, value, format_info.swizzle.Inverse()); + boost::container::static_vector components; + for (u32 i = 0; i < format_info.num_components; i++) { + const auto component = IR::F32{ir.CompositeExtract(swizzled, i)}; + components.push_back(ApplyWriteNumberConversion(ir, component, format_info.num_conversion)); + } + const auto real_value = + components.size() == 1 ? components[0] : ir.CompositeConstruct(components); + + switch (format_info.data_format) { + case AmdGpu::DataFormat::FormatInvalid: + break; + case AmdGpu::DataFormat::Format8: { + const auto packed = + ir.Pack4x8(format_info.num_format, ir.CompositeConstruct(real_value, ir.Imm32(0.f), + ir.Imm32(0.f), ir.Imm32(0.f))); + ir.StoreBufferU8(handle, address, packed, info); + break; + } + case AmdGpu::DataFormat::Format8_8: { + const auto packed = ir.Pack4x8(format_info.num_format, + ir.CompositeConstruct(ir.CompositeExtract(real_value, 0), + ir.CompositeExtract(real_value, 1), + ir.Imm32(0.f), ir.Imm32(0.f))); + ir.StoreBufferU16(handle, address, packed, info); + break; + } + case AmdGpu::DataFormat::Format8_8_8_8: { + auto packed = ir.Pack4x8(format_info.num_format, real_value); + ir.StoreBufferU32(1, handle, address, packed, info); + break; + } + case AmdGpu::DataFormat::Format16: { + const auto packed = + ir.Pack2x16(format_info.num_format, ir.CompositeConstruct(real_value, ir.Imm32(0.f))); + ir.StoreBufferU16(handle, address, packed, info); + break; + } + case AmdGpu::DataFormat::Format16_16: { + const auto packed = ir.Pack2x16(format_info.num_format, real_value); + ir.StoreBufferU32(1, handle, address, packed, info); + break; + } + case AmdGpu::DataFormat::Format10_11_11: { + const auto packed = ir.Pack10_11_11(format_info.num_format, real_value); + ir.StoreBufferU32(1, handle, address, packed, info); + break; + } + case AmdGpu::DataFormat::Format2_10_10_10: { + const auto packed = ir.Pack2_10_10_10(format_info.num_format, real_value); + ir.StoreBufferU32(1, handle, address, packed, info); + break; + } + case AmdGpu::DataFormat::Format16_16_16_16: { + const auto packed = ir.CompositeConstruct( + ir.Pack2x16(format_info.num_format, + ir.CompositeConstruct(ir.CompositeExtract(real_value, 0), + ir.CompositeExtract(real_value, 1))), + ir.Pack2x16(format_info.num_format, + ir.CompositeConstruct(ir.CompositeExtract(real_value, 2), + ir.CompositeExtract(real_value, 3)))); + ir.StoreBufferU32(2, handle, address, packed, info); + break; + } + case AmdGpu::DataFormat::Format32: + case AmdGpu::DataFormat::Format32_32: + case AmdGpu::DataFormat::Format32_32_32: + case AmdGpu::DataFormat::Format32_32_32_32: { + ASSERT(format_info.num_format == AmdGpu::NumberFormat::Uint || + format_info.num_format == AmdGpu::NumberFormat::Sint || + format_info.num_format == AmdGpu::NumberFormat::Float); + ir.StoreBufferF32(format_info.num_components, handle, address, real_value, info); + break; + } + default: + UNREACHABLE_MSG("Unsupported buffer data format: {}", format_info.data_format); + } +} + +static void LowerBufferFormatInst(IR::Block& block, IR::Inst& inst, Info& info) { + IR::IREmitter ir{block, IR::Block::InstructionList::s_iterator_to(inst)}; + const auto flags = inst.Flags(); + const auto desc{info.buffers[inst.Arg(0).U32()]}; + const auto buffer{desc.GetSharp(info)}; + + const auto is_inst_typed = flags.inst_data_fmt != AmdGpu::DataFormat::FormatInvalid; + const auto data_format = is_inst_typed ? flags.inst_data_fmt.Value() : buffer.GetDataFmt(); + const auto num_format = is_inst_typed ? flags.inst_num_fmt.Value() : buffer.GetNumberFmt(); + const auto format_info = FormatInfo{ + .data_format = data_format, + .num_format = num_format, + .swizzle = is_inst_typed ? AmdGpu::IdentityMapping : buffer.DstSelect(), + .num_conversion = AmdGpu::MapNumberConversion(num_format), + .num_components = AmdGpu::NumComponents(data_format), + }; + + if (IsBufferFormatLoad(inst)) { + const auto interpreted = + LoadBufferFormat(ir, inst.Arg(0), IR::U32{inst.Arg(1)}, flags, format_info); + inst.ReplaceUsesWithAndRemove(interpreted); + } else if (IsBufferFormatStore(inst)) { + StoreBufferFormat(ir, inst.Arg(0), IR::U32{inst.Arg(1)}, inst.Arg(2), flags, format_info); + inst.Invalidate(); + } +} + +void LowerBufferFormatToRaw(IR::Program& program) { + auto& info = program.info; + for (IR::Block* const block : program.blocks) { + for (IR::Inst& inst : block->Instructions()) { + if (IsBufferFormatLoad(inst) || IsBufferFormatStore(inst)) { + LowerBufferFormatInst(*block, inst, info); + } + } + } +} + +} // namespace Shader::Optimization diff --git a/src/shader_recompiler/ir/passes/lower_shared_mem_to_registers.cpp b/src/shader_recompiler/ir/passes/lower_shared_mem_to_registers.cpp deleted file mode 100644 index c109f3595..000000000 --- a/src/shader_recompiler/ir/passes/lower_shared_mem_to_registers.cpp +++ /dev/null @@ -1,38 +0,0 @@ -// SPDX-FileCopyrightText: Copyright 2024 shadPS4 Emulator Project -// SPDX-License-Identifier: GPL-2.0-or-later - -#include -#include "shader_recompiler/ir/program.h" - -namespace Shader::Optimization { - -void LowerSharedMemToRegisters(IR::Program& program) { - boost::container::small_vector ds_writes; - Info& info{program.info}; - for (IR::Block* const block : program.blocks) { - for (IR::Inst& inst : block->Instructions()) { - const auto opcode = inst.GetOpcode(); - if (opcode == IR::Opcode::WriteSharedU32 || opcode == IR::Opcode::WriteSharedU64) { - ds_writes.emplace_back(&inst); - continue; - } - if (opcode == IR::Opcode::LoadSharedU32 || opcode == IR::Opcode::LoadSharedU64) { - // Search for write instruction with same offset - const IR::Inst* prod = inst.Arg(0).InstRecursive(); - const auto it = std::ranges::find_if(ds_writes, [&](const IR::Inst* write) { - const IR::Inst* write_prod = write->Arg(0).InstRecursive(); - return write_prod->Arg(1).U32() == prod->Arg(1).U32(); - }); - ASSERT(it != ds_writes.end()); - // Replace data read with value written. - inst.ReplaceUsesWithAndRemove((*it)->Arg(1)); - } - } - } - // We should have eliminated everything. Invalidate data write instructions. - for (const auto inst : ds_writes) { - inst->Invalidate(); - } -} - -} // namespace Shader::Optimization diff --git a/src/shader_recompiler/ir/passes/readlane_elimination_pass.cpp b/src/shader_recompiler/ir/passes/readlane_elimination_pass.cpp new file mode 100644 index 000000000..fbe382d41 --- /dev/null +++ b/src/shader_recompiler/ir/passes/readlane_elimination_pass.cpp @@ -0,0 +1,115 @@ +// SPDX-FileCopyrightText: Copyright 2025 shadPS4 Emulator Project +// SPDX-License-Identifier: GPL-2.0-or-later + +#include "shader_recompiler/ir/program.h" + +namespace Shader::Optimization { + +static IR::Inst* SearchChain(IR::Inst* inst, u32 lane) { + while (inst->GetOpcode() == IR::Opcode::WriteLane) { + if (inst->Arg(2).U32() == lane) { + // We found a possible write lane source, return it. + return inst; + } + inst = inst->Arg(0).InstRecursive(); + } + return inst; +} + +static bool IsPossibleToEliminate(IR::Inst* inst, u32 lane) { + // Breadth-first search visiting the right most arguments first + boost::container::small_vector visited; + std::queue queue; + queue.push(inst); + + while (!queue.empty()) { + // Pop one instruction from the queue + IR::Inst* inst{queue.front()}; + queue.pop(); + + // If it's a WriteLane search for possible candidates + if (inst = SearchChain(inst, lane); inst->GetOpcode() == IR::Opcode::WriteLane) { + // We found a possible write lane source, stop looking here. + continue; + } + // If there are other instructions in-between that use the value we can't eliminate. + if (inst->GetOpcode() != IR::Opcode::ReadLane && inst->GetOpcode() != IR::Opcode::Phi) { + return false; + } + // Visit the right most arguments first + for (size_t arg = inst->NumArgs(); arg--;) { + auto arg_value{inst->Arg(arg)}; + if (arg_value.IsImmediate()) { + continue; + } + // Queue instruction if it hasn't been visited + IR::Inst* arg_inst{arg_value.InstRecursive()}; + if (std::ranges::find(visited, arg_inst) == visited.end()) { + visited.push_back(arg_inst); + queue.push(arg_inst); + } + } + } + return true; +} + +using PhiMap = std::unordered_map; + +static IR::Value GetRealValue(PhiMap& phi_map, IR::Inst* inst, u32 lane) { + // If this is a WriteLane op search the chain for a possible candidate. + if (inst = SearchChain(inst, lane); inst->GetOpcode() == IR::Opcode::WriteLane) { + return inst->Arg(1); + } + + // If this is a phi, duplicate it and populate its arguments with real values. + if (inst->GetOpcode() == IR::Opcode::Phi) { + // We are in a phi cycle, use the already duplicated phi. + const auto [it, is_new_phi] = phi_map.try_emplace(inst); + if (!is_new_phi) { + return IR::Value{it->second}; + } + + // Create new phi and insert it right before the old one. + const auto insert_point = IR::Block::InstructionList::s_iterator_to(*inst); + IR::Block* block = inst->GetParent(); + IR::Inst* new_phi{&*block->PrependNewInst(insert_point, IR::Opcode::Phi)}; + new_phi->SetFlags(IR::Type::U32); + it->second = new_phi; + + // Gather all arguments. + for (size_t arg_index = 0; arg_index < inst->NumArgs(); arg_index++) { + IR::Inst* arg_prod = inst->Arg(arg_index).InstRecursive(); + const IR::Value arg = GetRealValue(phi_map, arg_prod, lane); + new_phi->AddPhiOperand(inst->PhiBlock(arg_index), arg); + } + return IR::Value{new_phi}; + } + UNREACHABLE(); +} + +void ReadLaneEliminationPass(IR::Program& program) { + PhiMap phi_map; + for (IR::Block* const block : program.blocks) { + for (IR::Inst& inst : block->Instructions()) { + if (inst.GetOpcode() != IR::Opcode::ReadLane) { + continue; + } + const u32 lane = inst.Arg(1).U32(); + IR::Inst* prod = inst.Arg(0).InstRecursive(); + + // Check simple case of no control flow and phis + if (prod = SearchChain(prod, lane); prod->GetOpcode() == IR::Opcode::WriteLane) { + inst.ReplaceUsesWith(prod->Arg(1)); + continue; + } + + // Traverse the phi tree to see if it's possible to eliminate + if (prod->GetOpcode() == IR::Opcode::Phi && IsPossibleToEliminate(prod, lane)) { + inst.ReplaceUsesWith(GetRealValue(phi_map, prod, lane)); + phi_map.clear(); + } + } + } +} + +} // namespace Shader::Optimization diff --git a/src/shader_recompiler/ir/passes/resource_tracking_pass.cpp b/src/shader_recompiler/ir/passes/resource_tracking_pass.cpp index 636752912..c5bfe5796 100644 --- a/src/shader_recompiler/ir/passes/resource_tracking_pass.cpp +++ b/src/shader_recompiler/ir/passes/resource_tracking_pass.cpp @@ -1,8 +1,6 @@ // SPDX-FileCopyrightText: Copyright 2024 shadPS4 Emulator Project // SPDX-License-Identifier: GPL-2.0-or-later -#include -#include #include "shader_recompiler/info.h" #include "shader_recompiler/ir/basic_block.h" #include "shader_recompiler/ir/breadth_first_search.h" @@ -37,10 +35,17 @@ bool IsBufferAtomic(const IR::Inst& inst) { bool IsBufferStore(const IR::Inst& inst) { switch (inst.GetOpcode()) { + case IR::Opcode::StoreBufferU8: + case IR::Opcode::StoreBufferU16: case IR::Opcode::StoreBufferU32: case IR::Opcode::StoreBufferU32x2: case IR::Opcode::StoreBufferU32x3: case IR::Opcode::StoreBufferU32x4: + case IR::Opcode::StoreBufferF32: + case IR::Opcode::StoreBufferF32x2: + case IR::Opcode::StoreBufferF32x3: + case IR::Opcode::StoreBufferF32x4: + case IR::Opcode::StoreBufferFormatF32: return true; default: return IsBufferAtomic(inst); @@ -49,10 +54,17 @@ bool IsBufferStore(const IR::Inst& inst) { bool IsBufferInstruction(const IR::Inst& inst) { switch (inst.GetOpcode()) { + case IR::Opcode::LoadBufferU8: + case IR::Opcode::LoadBufferU16: case IR::Opcode::LoadBufferU32: case IR::Opcode::LoadBufferU32x2: case IR::Opcode::LoadBufferU32x3: case IR::Opcode::LoadBufferU32x4: + case IR::Opcode::LoadBufferF32: + case IR::Opcode::LoadBufferF32x2: + case IR::Opcode::LoadBufferF32x3: + case IR::Opcode::LoadBufferF32x4: + case IR::Opcode::LoadBufferFormatF32: case IR::Opcode::ReadConstBuffer: return true; default: @@ -65,36 +77,21 @@ bool IsDataRingInstruction(const IR::Inst& inst) { inst.GetOpcode() == IR::Opcode::DataConsume; } -bool IsTextureBufferInstruction(const IR::Inst& inst) { - return inst.GetOpcode() == IR::Opcode::LoadBufferFormatF32 || - inst.GetOpcode() == IR::Opcode::StoreBufferFormatF32; -} - -bool UseFP16(AmdGpu::DataFormat data_format, AmdGpu::NumberFormat num_format) { - switch (num_format) { - case AmdGpu::NumberFormat::Float: - switch (data_format) { - case AmdGpu::DataFormat::Format16: - case AmdGpu::DataFormat::Format16_16: - case AmdGpu::DataFormat::Format16_16_16_16: - return true; - default: - return false; - } - case AmdGpu::NumberFormat::Unorm: - case AmdGpu::NumberFormat::Snorm: - case AmdGpu::NumberFormat::Uscaled: - case AmdGpu::NumberFormat::Sscaled: - case AmdGpu::NumberFormat::Uint: - case AmdGpu::NumberFormat::Sint: - case AmdGpu::NumberFormat::SnormNz: - default: - return false; - } -} - IR::Type BufferDataType(const IR::Inst& inst, AmdGpu::NumberFormat num_format) { - return IR::Type::U32; + switch (inst.GetOpcode()) { + case IR::Opcode::LoadBufferU8: + case IR::Opcode::StoreBufferU8: + return IR::Type::U8; + case IR::Opcode::LoadBufferU16: + case IR::Opcode::StoreBufferU16: + return IR::Type::U16; + case IR::Opcode::LoadBufferFormatF32: + case IR::Opcode::StoreBufferFormatF32: + // Formatted buffer loads can use a variety of types. + return IR::Type::U32 | IR::Type::F32 | IR::Type::U16 | IR::Type::U8; + default: + return IR::Type::U32; + } } bool IsImageAtomicInstruction(const IR::Inst& inst) { @@ -132,39 +129,28 @@ bool IsImageInstruction(const IR::Inst& inst) { class Descriptors { public: explicit Descriptors(Info& info_) - : info{info_}, buffer_resources{info_.buffers}, - texture_buffer_resources{info_.texture_buffers}, image_resources{info_.images}, + : info{info_}, buffer_resources{info_.buffers}, image_resources{info_.images}, sampler_resources{info_.samplers}, fmask_resources(info_.fmasks) {} u32 Add(const BufferResource& desc) { const u32 index{Add(buffer_resources, desc, [&desc](const auto& existing) { - // Only one GDS binding can exist. - if (desc.is_gds_buffer && existing.is_gds_buffer) { - return true; - } - return desc.sharp_idx == existing.sharp_idx && desc.inline_cbuf == existing.inline_cbuf; + return desc.sharp_idx == existing.sharp_idx && + desc.inline_cbuf == existing.inline_cbuf && + desc.buffer_type == existing.buffer_type; })}; auto& buffer = buffer_resources[index]; buffer.used_types |= desc.used_types; buffer.is_written |= desc.is_written; - return index; - } - - u32 Add(const TextureBufferResource& desc) { - const u32 index{Add(texture_buffer_resources, desc, [&desc](const auto& existing) { - return desc.sharp_idx == existing.sharp_idx; - })}; - auto& buffer = texture_buffer_resources[index]; - buffer.is_written |= desc.is_written; + buffer.is_formatted |= desc.is_formatted; return index; } u32 Add(const ImageResource& desc) { const u32 index{Add(image_resources, desc, [&desc](const auto& existing) { - return desc.sharp_idx == existing.sharp_idx; + return desc.sharp_idx == existing.sharp_idx && desc.is_array == existing.is_array; })}; auto& image = image_resources[index]; - image.is_read |= desc.is_read; + image.is_atomic |= desc.is_atomic; image.is_written |= desc.is_written; return index; } @@ -196,7 +182,6 @@ private: const Info& info; BufferResourceList& buffer_resources; - TextureBufferResourceList& texture_buffer_resources; ImageResourceList& image_resources; SamplerResourceList& sampler_resources; FMaskResourceList& fmask_resources; @@ -298,11 +283,11 @@ s32 TryHandleInlineCbuf(IR::Inst& inst, Info& info, Descriptors& descriptors, .sharp_idx = std::numeric_limits::max(), .used_types = BufferDataType(inst, cbuf.GetNumberFmt()), .inline_cbuf = cbuf, + .buffer_type = BufferType::Guest, }); } -void PatchBufferInstruction(IR::Block& block, IR::Inst& inst, Info& info, - Descriptors& descriptors) { +void PatchBufferSharp(IR::Block& block, IR::Inst& inst, Info& info, Descriptors& descriptors) { s32 binding{}; AmdGpu::Buffer buffer; if (binding = TryHandleInlineCbuf(inst, info, descriptors, buffer); binding == -1) { @@ -313,135 +298,253 @@ void PatchBufferInstruction(IR::Block& block, IR::Inst& inst, Info& info, binding = descriptors.Add(BufferResource{ .sharp_idx = sharp, .used_types = BufferDataType(inst, buffer.GetNumberFmt()), + .buffer_type = BufferType::Guest, .is_written = IsBufferStore(inst), + .is_formatted = inst.GetOpcode() == IR::Opcode::LoadBufferFormatF32 || + inst.GetOpcode() == IR::Opcode::StoreBufferFormatF32, }); } - // Update buffer descriptor format. - const auto inst_info = inst.Flags(); - // Replace handle with binding index in buffer resource list. IR::IREmitter ir{block, IR::Block::InstructionList::s_iterator_to(inst)}; inst.SetArg(0, ir.Imm32(binding)); - ASSERT(!buffer.add_tid_enable); +} - // Address of constant buffer reads can be calculated at IR emittion time. +void PatchImageSharp(IR::Block& block, IR::Inst& inst, Info& info, Descriptors& descriptors) { + const auto pred = [](const IR::Inst* inst) -> std::optional { + const auto opcode = inst->GetOpcode(); + if (opcode == IR::Opcode::CompositeConstructU32x2 || // IMAGE_SAMPLE (image+sampler) + opcode == IR::Opcode::ReadConst || // IMAGE_LOAD (image only) + opcode == IR::Opcode::GetUserData) { + return inst; + } + return std::nullopt; + }; + const auto result = IR::BreadthFirstSearch(&inst, pred); + ASSERT_MSG(result, "Unable to find image sharp source"); + const IR::Inst* producer = result.value(); + const bool has_sampler = producer->GetOpcode() == IR::Opcode::CompositeConstructU32x2; + const auto tsharp_handle = has_sampler ? producer->Arg(0).InstRecursive() : producer; + + // Read image sharp. + const auto tsharp = TrackSharp(tsharp_handle, info); + const auto inst_info = inst.Flags(); + auto image = info.ReadUdSharp(tsharp); + if (!image.Valid()) { + LOG_ERROR(Render_Vulkan, "Shader compiled with unbound image!"); + image = AmdGpu::Image::Null(); + } + ASSERT(image.GetType() != AmdGpu::ImageType::Invalid); + const bool is_written = inst.GetOpcode() == IR::Opcode::ImageWrite; + + // Patch image instruction if image is FMask. + if (image.IsFmask()) { + ASSERT_MSG(!is_written, "FMask storage instructions are not supported"); + + IR::IREmitter ir{block, IR::Block::InstructionList::s_iterator_to(inst)}; + switch (inst.GetOpcode()) { + case IR::Opcode::ImageRead: + case IR::Opcode::ImageSampleRaw: { + IR::F32 fmaskx = ir.BitCast(ir.Imm32(0x76543210)); + IR::F32 fmasky = ir.BitCast(ir.Imm32(0xfedcba98)); + inst.ReplaceUsesWith(ir.CompositeConstruct(fmaskx, fmasky)); + return; + } + case IR::Opcode::ImageQueryLod: + inst.ReplaceUsesWith(ir.Imm32(1)); + return; + case IR::Opcode::ImageQueryDimensions: { + IR::Value dims = ir.CompositeConstruct(ir.Imm32(static_cast(image.width)), // x + ir.Imm32(static_cast(image.width)), // y + ir.Imm32(1), ir.Imm32(1)); // depth, mip + inst.ReplaceUsesWith(dims); + + // Track FMask resource to do specialization. + descriptors.Add(FMaskResource{ + .sharp_idx = tsharp, + }); + return; + } + default: + UNREACHABLE_MSG("Can't patch fmask instruction {}", inst.GetOpcode()); + } + } + + u32 image_binding = descriptors.Add(ImageResource{ + .sharp_idx = tsharp, + .is_depth = bool(inst_info.is_depth), + .is_atomic = IsImageAtomicInstruction(inst), + .is_array = bool(inst_info.is_array), + .is_written = is_written, + }); + + IR::IREmitter ir{block, IR::Block::InstructionList::s_iterator_to(inst)}; + + if (inst.GetOpcode() == IR::Opcode::ImageSampleRaw) { + // Read sampler sharp. + const auto [sampler_binding, sampler] = [&] -> std::pair { + ASSERT(producer->GetOpcode() == IR::Opcode::CompositeConstructU32x2); + const IR::Value& handle = producer->Arg(1); + // Inline sampler resource. + if (handle.IsImmediate()) { + LOG_WARNING(Render_Vulkan, "Inline sampler detected"); + const auto inline_sampler = AmdGpu::Sampler{.raw0 = handle.U32()}; + const auto binding = descriptors.Add(SamplerResource{ + .sharp_idx = std::numeric_limits::max(), + .inline_sampler = inline_sampler, + }); + return {binding, inline_sampler}; + } + // Normal sampler resource. + const auto ssharp_handle = handle.InstRecursive(); + const auto& [ssharp_ud, disable_aniso] = TryDisableAnisoLod0(ssharp_handle); + const auto ssharp = TrackSharp(ssharp_ud, info); + const auto binding = descriptors.Add(SamplerResource{ + .sharp_idx = ssharp, + .associated_image = image_binding, + .disable_aniso = disable_aniso, + }); + return {binding, info.ReadUdSharp(ssharp)}; + }(); + // Patch image and sampler handle. + inst.SetArg(0, ir.Imm32(image_binding | sampler_binding << 16)); + } else { + // Patch image handle. + inst.SetArg(0, ir.Imm32(image_binding)); + } +} + +void PatchDataRingAccess(IR::Block& block, IR::Inst& inst, Info& info, Descriptors& descriptors) { + const u32 binding = descriptors.Add(BufferResource{ + .used_types = IR::Type::U32, + .inline_cbuf = AmdGpu::Buffer::Null(), + .buffer_type = BufferType::GdsBuffer, + .is_written = true, + }); + + const auto pred = [](const IR::Inst* inst) -> std::optional { + if (inst->GetOpcode() == IR::Opcode::GetUserData) { + return inst; + } + return std::nullopt; + }; + + // Attempt to deduce the GDS address of counter at compile time. + u32 gds_addr = 0; + const IR::Value& gds_offset = inst.Arg(0); + if (gds_offset.IsImmediate()) { + // Nothing to do, offset is known. + gds_addr = gds_offset.U32() & 0xFFFF; + } else { + const auto result = IR::BreadthFirstSearch(&inst, pred); + ASSERT_MSG(result, "Unable to track M0 source"); + + // M0 must be set by some user data register. + const IR::Inst* prod = gds_offset.InstRecursive(); + const u32 ud_reg = u32(result.value()->Arg(0).ScalarReg()); + u32 m0_val = info.user_data[ud_reg] >> 16; + if (prod->GetOpcode() == IR::Opcode::IAdd32) { + m0_val += prod->Arg(1).U32(); + } + gds_addr = m0_val & 0xFFFF; + } + + // Patch instruction. + IR::IREmitter ir{block, IR::Block::InstructionList::s_iterator_to(inst)}; + inst.SetArg(0, ir.Imm32(gds_addr >> 2)); + inst.SetArg(1, ir.Imm32(binding)); +} + +IR::U32 CalculateBufferAddress(IR::IREmitter& ir, const IR::Inst& inst, const Info& info, + const AmdGpu::Buffer& buffer, u32 stride) { + const auto inst_info = inst.Flags(); + + // index = (inst_idxen ? vgpr_index : 0) + (const_add_tid_enable ? thread_id[5:0] : 0) + IR::U32 index = ir.Imm32(0U); + if (inst_info.index_enable) { + const IR::U32 vgpr_index{inst_info.offset_enable + ? IR::U32{ir.CompositeExtract(inst.Arg(1), 0)} + : IR::U32{inst.Arg(1)}}; + index = ir.IAdd(index, vgpr_index); + } + if (buffer.add_tid_enable) { + ASSERT_MSG(info.l_stage == LogicalStage::Compute, + "Thread ID buffer addressing is not supported outside of compute."); + const IR::U32 thread_id{ir.LaneId()}; + index = ir.IAdd(index, thread_id); + } + // offset = (inst_offen ? vgpr_offset : 0) + inst_offset + IR::U32 offset = ir.Imm32(inst_info.inst_offset.Value()); + if (inst_info.offset_enable) { + const IR::U32 vgpr_offset = inst_info.index_enable + ? IR::U32{ir.CompositeExtract(inst.Arg(1), 1)} + : IR::U32{inst.Arg(1)}; + offset = ir.IAdd(offset, vgpr_offset); + } + const IR::U32 const_stride = ir.Imm32(stride); + IR::U32 buffer_offset; + if (buffer.swizzle_enable) { + const IR::U32 const_index_stride = ir.Imm32(buffer.GetIndexStride()); + const IR::U32 const_element_size = ir.Imm32(buffer.GetElementSize()); + // index_msb = index / const_index_stride + const IR::U32 index_msb{ir.IDiv(index, const_index_stride)}; + // index_lsb = index % const_index_stride + const IR::U32 index_lsb{ir.IMod(index, const_index_stride)}; + // offset_msb = offset / const_element_size + const IR::U32 offset_msb{ir.IDiv(offset, const_element_size)}; + // offset_lsb = offset % const_element_size + const IR::U32 offset_lsb{ir.IMod(offset, const_element_size)}; + // buffer_offset = + // (index_msb * const_stride + offset_msb * const_element_size) * const_index_stride + // + index_lsb * const_element_size + offset_lsb + const IR::U32 buffer_offset_msb = ir.IMul( + ir.IAdd(ir.IMul(index_msb, const_stride), ir.IMul(offset_msb, const_element_size)), + const_index_stride); + const IR::U32 buffer_offset_lsb = + ir.IAdd(ir.IMul(index_lsb, const_element_size), offset_lsb); + buffer_offset = ir.IAdd(buffer_offset_msb, buffer_offset_lsb); + } else { + // buffer_offset = index * const_stride + offset + buffer_offset = ir.IAdd(ir.IMul(index, const_stride), offset); + } + return buffer_offset; +} + +void PatchBufferArgs(IR::Block& block, IR::Inst& inst, Info& info) { + const auto handle = inst.Arg(0); + const auto buffer_res = info.buffers[handle.U32()]; + const auto buffer = buffer_res.GetSharp(info); + + // Address of constant buffer reads can be calculated at IR emission time. if (inst.GetOpcode() == IR::Opcode::ReadConstBuffer) { return; } - const IR::U32 index_stride = ir.Imm32(buffer.index_stride); - const IR::U32 element_size = ir.Imm32(buffer.element_size); - - // Compute address of the buffer using the stride. - IR::U32 address = ir.Imm32(inst_info.inst_offset.Value()); - if (inst_info.index_enable) { - const IR::U32 index = inst_info.offset_enable ? IR::U32{ir.CompositeExtract(inst.Arg(1), 0)} - : IR::U32{inst.Arg(1)}; - if (buffer.swizzle_enable) { - const IR::U32 stride_index_stride = - ir.Imm32(static_cast(buffer.stride * buffer.index_stride)); - const IR::U32 index_msb = ir.IDiv(index, index_stride); - const IR::U32 index_lsb = ir.IMod(index, index_stride); - address = ir.IAdd(address, ir.IAdd(ir.IMul(index_msb, stride_index_stride), - ir.IMul(index_lsb, element_size))); - } else { - address = ir.IAdd(address, ir.IMul(index, ir.Imm32(buffer.GetStride()))); - } - } - if (inst_info.offset_enable) { - const IR::U32 offset = inst_info.index_enable ? IR::U32{ir.CompositeExtract(inst.Arg(1), 1)} - : IR::U32{inst.Arg(1)}; - if (buffer.swizzle_enable) { - const IR::U32 element_size_index_stride = - ir.Imm32(buffer.element_size * buffer.index_stride); - const IR::U32 offset_msb = ir.IDiv(offset, element_size); - const IR::U32 offset_lsb = ir.IMod(offset, element_size); - address = ir.IAdd(address, - ir.IAdd(ir.IMul(offset_msb, element_size_index_stride), offset_lsb)); - } else { - address = ir.IAdd(address, offset); - } - } - inst.SetArg(1, address); -} - -void PatchTextureBufferInstruction(IR::Block& block, IR::Inst& inst, Info& info, - Descriptors& descriptors) { - const IR::Inst* handle = inst.Arg(0).InstRecursive(); - const IR::Inst* producer = handle->Arg(0).InstRecursive(); - const auto sharp = TrackSharp(producer, info); - const auto buffer = info.ReadUdSharp(sharp); - const s32 binding = descriptors.Add(TextureBufferResource{ - .sharp_idx = sharp, - .is_written = inst.GetOpcode() == IR::Opcode::StoreBufferFormatF32, - }); - - // Replace handle with binding index in texture buffer resource list. IR::IREmitter ir{block, IR::Block::InstructionList::s_iterator_to(inst)}; - inst.SetArg(0, ir.Imm32(binding)); - ASSERT(!buffer.swizzle_enable && !buffer.add_tid_enable); + inst.SetArg(1, CalculateBufferAddress(ir, inst, info, buffer, buffer.stride)); } -IR::Value PatchCubeCoord(IR::IREmitter& ir, const IR::Value& s, const IR::Value& t, - const IR::Value& z, bool is_written, bool is_array) { - // When cubemap is written with imageStore it is treated like 2DArray. - if (is_written) { - return ir.CompositeConstruct(s, t, z); - } - - ASSERT(s.Type() == IR::Type::F32); // in case of fetched image need to adjust the code below - - // We need to fix x and y coordinate, - // because the s and t coordinate will be scaled and plus 1.5 by v_madak_f32. - // We already force the scale value to be 1.0 when handling v_cubema_f32, - // here we subtract 1.5 to recover the original value. - const IR::Value x = ir.FPSub(IR::F32{s}, ir.Imm32(1.5f)); - const IR::Value y = ir.FPSub(IR::F32{t}, ir.Imm32(1.5f)); - if (is_array) { - const IR::U32 array_index = ir.ConvertFToU(32, IR::F32{z}); - const IR::U32 face_id = ir.BitwiseAnd(array_index, ir.Imm32(7u)); - const IR::U32 slice_id = ir.ShiftRightLogical(array_index, ir.Imm32(3u)); - return ir.CompositeConstruct(x, y, ir.ConvertIToF(32, 32, false, face_id), - ir.ConvertIToF(32, 32, false, slice_id)); - } else { - return ir.CompositeConstruct(x, y, z); +IR::Value FixCubeCoords(IR::IREmitter& ir, const AmdGpu::Image& image, const IR::Value& x, + const IR::Value& y, const IR::Value& face) { + if (!image.IsCube()) { + return ir.CompositeConstruct(x, y, face); } + // AMD cube math results in coordinates in the range [1.0, 2.0]. We need + // to convert this to the range [0.0, 1.0] to get correct results. + const auto fixed_x = ir.FPSub(IR::F32{x}, ir.Imm32(1.f)); + const auto fixed_y = ir.FPSub(IR::F32{y}, ir.Imm32(1.f)); + return ir.CompositeConstruct(fixed_x, fixed_y, face); } -void PatchImageSampleInstruction(IR::Block& block, IR::Inst& inst, Info& info, - Descriptors& descriptors, const IR::Inst* producer, - const u32 image_binding, const AmdGpu::Image& image) { - // Read sampler sharp. This doesn't exist for IMAGE_LOAD/IMAGE_STORE instructions - const auto [sampler_binding, sampler] = [&] -> std::pair { - ASSERT(producer->GetOpcode() == IR::Opcode::CompositeConstructU32x2); - const IR::Value& handle = producer->Arg(1); - // Inline sampler resource. - if (handle.IsImmediate()) { - LOG_WARNING(Render_Vulkan, "Inline sampler detected"); - const auto inline_sampler = AmdGpu::Sampler{.raw0 = handle.U32()}; - const auto binding = descriptors.Add(SamplerResource{ - .sharp_idx = std::numeric_limits::max(), - .inline_sampler = inline_sampler, - }); - return {binding, inline_sampler}; - } - // Normal sampler resource. - const auto ssharp_handle = handle.InstRecursive(); - const auto& [ssharp_ud, disable_aniso] = TryDisableAnisoLod0(ssharp_handle); - const auto ssharp = TrackSharp(ssharp_ud, info); - const auto binding = descriptors.Add(SamplerResource{ - .sharp_idx = ssharp, - .associated_image = image_binding, - .disable_aniso = disable_aniso, - }); - return {binding, info.ReadUdSharp(ssharp)}; - }(); +void PatchImageSampleArgs(IR::Block& block, IR::Inst& inst, Info& info, + const ImageResource& image_res, const AmdGpu::Image& image) { + const auto handle = inst.Arg(0); + const auto sampler_res = info.samplers[(handle.U32() >> 16) & 0xFFFF]; + auto sampler = sampler_res.GetSharp(info); IR::IREmitter ir{block, IR::Block::InstructionList::s_iterator_to(inst)}; - const auto inst_info = inst.Flags(); - const IR::U32 handle = ir.Imm32(image_binding | sampler_binding << 16); + const auto view_type = image.GetViewType(image_res.is_array); IR::Inst* body1 = inst.Arg(1).InstRecursive(); IR::Inst* body2 = inst.Arg(2).InstRecursive(); @@ -488,16 +591,15 @@ void PatchImageSampleInstruction(IR::Block& block, IR::Inst& inst, Info& info, return ir.BitFieldExtract(IR::U32{arg}, ir.Imm32(off), ir.Imm32(6), true); }; - switch (image.GetType()) { + switch (view_type) { case AmdGpu::ImageType::Color1D: case AmdGpu::ImageType::Color1DArray: return read(0); case AmdGpu::ImageType::Color2D: - case AmdGpu::ImageType::Color2DArray: case AmdGpu::ImageType::Color2DMsaa: + case AmdGpu::ImageType::Color2DArray: return ir.CompositeConstruct(read(0), read(8)); case AmdGpu::ImageType::Color3D: - case AmdGpu::ImageType::Cube: return ir.CompositeConstruct(read(0), read(8), read(16)); default: UNREACHABLE(); @@ -509,21 +611,20 @@ void PatchImageSampleInstruction(IR::Block& block, IR::Inst& inst, Info& info, if (!inst_info.has_derivatives) { return {}; } - switch (image.GetType()) { + switch (view_type) { case AmdGpu::ImageType::Color1D: case AmdGpu::ImageType::Color1DArray: // du/dx, du/dy addr_reg = addr_reg + 2; return {get_addr_reg(addr_reg - 2), get_addr_reg(addr_reg - 1)}; case AmdGpu::ImageType::Color2D: - case AmdGpu::ImageType::Color2DArray: case AmdGpu::ImageType::Color2DMsaa: + case AmdGpu::ImageType::Color2DArray: // (du/dx, dv/dx), (du/dy, dv/dy) addr_reg = addr_reg + 4; return {ir.CompositeConstruct(get_addr_reg(addr_reg - 4), get_addr_reg(addr_reg - 3)), ir.CompositeConstruct(get_addr_reg(addr_reg - 2), get_addr_reg(addr_reg - 1))}; case AmdGpu::ImageType::Color3D: - case AmdGpu::ImageType::Cube: // (du/dx, dv/dx, dw/dx), (du/dy, dv/dy, dw/dy) addr_reg = addr_reg + 6; return {ir.CompositeConstruct(get_addr_reg(addr_reg - 6), get_addr_reg(addr_reg - 5), @@ -539,7 +640,7 @@ void PatchImageSampleInstruction(IR::Block& block, IR::Inst& inst, Info& info, // Query dimensions of image if needed for normalization. // We can't use the image sharp because it could be bound to a different image later. const auto dimensions = - unnormalized ? ir.ImageQueryDimension(ir.Imm32(image_binding), ir.Imm32(0u), ir.Imm1(false)) + unnormalized ? ir.ImageQueryDimension(handle, ir.Imm32(0u), ir.Imm1(false), inst_info) : IR::Value{}; const auto get_coord = [&](u32 coord_idx, u32 dim_idx) -> IR::Value { const auto coord = get_addr_reg(coord_idx); @@ -554,7 +655,7 @@ void PatchImageSampleInstruction(IR::Block& block, IR::Inst& inst, Info& info, // Now we can load body components as noted in Table 8.9 Image Opcodes with Sampler const IR::Value coords = [&] -> IR::Value { - switch (image.GetType()) { + switch (view_type) { case AmdGpu::ImageType::Color1D: // x addr_reg = addr_reg + 1; return get_coord(addr_reg - 1, 0); @@ -563,20 +664,17 @@ void PatchImageSampleInstruction(IR::Block& block, IR::Inst& inst, Info& info, case AmdGpu::ImageType::Color2D: // x, y addr_reg = addr_reg + 2; return ir.CompositeConstruct(get_coord(addr_reg - 2, 0), get_coord(addr_reg - 1, 1)); - case AmdGpu::ImageType::Color2DArray: // x, y, slice - [[fallthrough]]; case AmdGpu::ImageType::Color2DMsaa: // x, y, frag + [[fallthrough]]; + case AmdGpu::ImageType::Color2DArray: // x, y, slice addr_reg = addr_reg + 3; - return ir.CompositeConstruct(get_coord(addr_reg - 3, 0), get_coord(addr_reg - 2, 1), - get_addr_reg(addr_reg - 1)); + // Note we can use FixCubeCoords with fallthrough cases since it checks for image type. + return FixCubeCoords(ir, image, get_coord(addr_reg - 3, 0), get_coord(addr_reg - 2, 1), + get_addr_reg(addr_reg - 1)); case AmdGpu::ImageType::Color3D: // x, y, z addr_reg = addr_reg + 3; return ir.CompositeConstruct(get_coord(addr_reg - 3, 0), get_coord(addr_reg - 2, 1), get_coord(addr_reg - 1, 2)); - case AmdGpu::ImageType::Cube: // x, y, face - addr_reg = addr_reg + 3; - return PatchCubeCoord(ir, get_coord(addr_reg - 3, 0), get_coord(addr_reg - 2, 1), - get_addr_reg(addr_reg - 1), false, inst_info.is_array); default: UNREACHABLE(); } @@ -589,7 +687,7 @@ void PatchImageSampleInstruction(IR::Block& block, IR::Inst& inst, Info& info, : IR::F32{}; const IR::F32 lod_clamp = inst_info.has_lod_clamp ? get_addr_reg(addr_reg++) : IR::F32{}; - auto new_inst = [&] -> IR::Value { + auto texel = [&] -> IR::Value { if (inst_info.is_gather) { if (inst_info.is_depth) { return ir.ImageGatherDref(handle, coords, offset, dref, inst_info); @@ -611,98 +709,35 @@ void PatchImageSampleInstruction(IR::Block& block, IR::Inst& inst, Info& info, } return ir.ImageSampleImplicitLod(handle, coords, bias, offset, inst_info); }(); - inst.ReplaceUsesWithAndRemove(new_inst); + + const auto converted = ApplyReadNumberConversionVec4(ir, texel, image.GetNumberConversion()); + inst.ReplaceUsesWith(converted); } -void PatchImageInstruction(IR::Block& block, IR::Inst& inst, Info& info, Descriptors& descriptors) { - const auto pred = [](const IR::Inst* inst) -> std::optional { - const auto opcode = inst->GetOpcode(); - if (opcode == IR::Opcode::CompositeConstructU32x2 || // IMAGE_SAMPLE (image+sampler) - opcode == IR::Opcode::ReadConst || // IMAGE_LOAD (image only) - opcode == IR::Opcode::GetUserData) { - return inst; - } - return std::nullopt; - }; - const auto result = IR::BreadthFirstSearch(&inst, pred); - ASSERT_MSG(result, "Unable to find image sharp source"); - const IR::Inst* producer = result.value(); - const bool has_sampler = producer->GetOpcode() == IR::Opcode::CompositeConstructU32x2; - const auto tsharp_handle = has_sampler ? producer->Arg(0).InstRecursive() : producer; - - // Read image sharp. - const auto tsharp = TrackSharp(tsharp_handle, info); - const auto inst_info = inst.Flags(); - auto image = info.ReadUdSharp(tsharp); - if (!image.Valid()) { - LOG_ERROR(Render_Vulkan, "Shader compiled with unbound image!"); - image = AmdGpu::Image::Null(); - } - ASSERT(image.GetType() != AmdGpu::ImageType::Invalid); - const bool is_read = inst.GetOpcode() == IR::Opcode::ImageRead; - const bool is_written = inst.GetOpcode() == IR::Opcode::ImageWrite; - - // Patch image instruction if image is FMask. - if (image.IsFmask()) { - ASSERT_MSG(!is_written, "FMask storage instructions are not supported"); - - IR::IREmitter ir{block, IR::Block::InstructionList::s_iterator_to(inst)}; - switch (inst.GetOpcode()) { - case IR::Opcode::ImageRead: - case IR::Opcode::ImageSampleRaw: { - IR::F32 fmaskx = ir.BitCast(ir.Imm32(0x76543210)); - IR::F32 fmasky = ir.BitCast(ir.Imm32(0xfedcba98)); - inst.ReplaceUsesWith(ir.CompositeConstruct(fmaskx, fmasky)); - return; - } - case IR::Opcode::ImageQueryLod: - inst.ReplaceUsesWith(ir.Imm32(1)); - return; - case IR::Opcode::ImageQueryDimensions: { - IR::Value dims = ir.CompositeConstruct(ir.Imm32(static_cast(image.width)), // x - ir.Imm32(static_cast(image.width)), // y - ir.Imm32(1), ir.Imm32(1)); // depth, mip - inst.ReplaceUsesWith(dims); - - // Track FMask resource to do specialization. - descriptors.Add(FMaskResource{ - .sharp_idx = tsharp, - }); - return; - } - default: - UNREACHABLE_MSG("Can't patch fmask instruction {}", inst.GetOpcode()); - } - } - - u32 image_binding = descriptors.Add(ImageResource{ - .sharp_idx = tsharp, - .is_depth = bool(inst_info.is_depth), - .is_atomic = IsImageAtomicInstruction(inst), - .is_array = bool(inst_info.is_array), - .is_read = is_read, - .is_written = is_written, - }); - - // Sample instructions must be resolved into a new instruction using address register data. - if (inst.GetOpcode() == IR::Opcode::ImageSampleRaw) { - PatchImageSampleInstruction(block, inst, info, descriptors, producer, image_binding, image); - return; - } - - // Patch image handle - IR::IREmitter ir{block, IR::Block::InstructionList::s_iterator_to(inst)}; - inst.SetArg(0, ir.Imm32(image_binding)); - - // No need to patch coordinates if we are just querying. +void PatchImageArgs(IR::Block& block, IR::Inst& inst, Info& info) { + // Nothing to patch for dimension query. if (inst.GetOpcode() == IR::Opcode::ImageQueryDimensions) { return; } + const auto handle = inst.Arg(0); + const auto image_res = info.images[handle.U32() & 0xFFFF]; + auto image = image_res.GetSharp(info); + + // Sample instructions must be handled separately using address register data. + if (inst.GetOpcode() == IR::Opcode::ImageSampleRaw) { + PatchImageSampleArgs(block, inst, info, image_res, image); + return; + } + + IR::IREmitter ir{block, IR::Block::InstructionList::s_iterator_to(inst)}; + const auto inst_info = inst.Flags(); + const auto view_type = image.GetViewType(image_res.is_array); + // Now that we know the image type, adjust texture coordinate vector. IR::Inst* body = inst.Arg(1).InstRecursive(); const auto [coords, arg] = [&] -> std::pair { - switch (image.GetType()) { + switch (view_type) { case AmdGpu::ImageType::Color1D: // x, [lod] return {body->Arg(0), body->Arg(1)}; case AmdGpu::ImageType::Color1DArray: // x, slice, [lod] @@ -718,153 +753,70 @@ void PatchImageInstruction(IR::Block& block, IR::Inst& inst, Info& info, Descrip [[fallthrough]]; case AmdGpu::ImageType::Color3D: // x, y, z, [lod] return {ir.CompositeConstruct(body->Arg(0), body->Arg(1), body->Arg(2)), body->Arg(3)}; - case AmdGpu::ImageType::Cube: // x, y, face, [lod] - return {PatchCubeCoord(ir, body->Arg(0), body->Arg(1), body->Arg(2), is_written, - inst_info.is_array), - body->Arg(3)}; default: - UNREACHABLE_MSG("Unknown image type {}", image.GetType()); + UNREACHABLE_MSG("Unknown image type {}", view_type); } }(); - inst.SetArg(1, coords); - if (inst_info.has_lod) { - ASSERT(inst.GetOpcode() == IR::Opcode::ImageRead || - inst.GetOpcode() == IR::Opcode::ImageWrite); - ASSERT(image.GetType() != AmdGpu::ImageType::Color2DMsaa && - image.GetType() != AmdGpu::ImageType::Color2DMsaaArray); - inst.SetArg(2, arg); - } else if ((image.GetType() == AmdGpu::ImageType::Color2DMsaa || - image.GetType() == AmdGpu::ImageType::Color2DMsaaArray) && - (inst.GetOpcode() == IR::Opcode::ImageRead || - inst.GetOpcode() == IR::Opcode::ImageWrite)) { - inst.SetArg(3, arg); - } -} + const auto has_ms = view_type == AmdGpu::ImageType::Color2DMsaa || + view_type == AmdGpu::ImageType::Color2DMsaaArray; + ASSERT(!inst_info.has_lod || !has_ms); + const auto lod = inst_info.has_lod ? IR::U32{arg} : IR::U32{}; + const auto ms = has_ms ? IR::U32{arg} : IR::U32{}; -void PatchTextureBufferInterpretation(IR::Block& block, IR::Inst& inst, Info& info) { - const auto binding = inst.Arg(0).U32(); - const auto buffer_res = info.texture_buffers[binding]; - const auto buffer = buffer_res.GetSharp(info); - if (!buffer.Valid()) { - // Don't need to swizzle invalid buffer. - return; - } - - IR::IREmitter ir{block, IR::Block::InstructionList::s_iterator_to(inst)}; - if (inst.GetOpcode() == IR::Opcode::StoreBufferFormatF32) { - inst.SetArg(2, ApplySwizzle(ir, inst.Arg(2), buffer.DstSelect())); - } else if (inst.GetOpcode() == IR::Opcode::LoadBufferFormatF32) { - const auto inst_info = inst.Flags(); - const auto texel = ir.LoadBufferFormat(inst.Arg(0), inst.Arg(1), inst_info); - const auto swizzled = ApplySwizzle(ir, texel, buffer.DstSelect()); - inst.ReplaceUsesWith(swizzled); - } -} - -void PatchImageInterpretation(IR::Block& block, IR::Inst& inst, Info& info) { - const auto binding = inst.Arg(0).U32(); - const auto image_res = info.images[binding & 0xFFFF]; - const auto image = image_res.GetSharp(info); - if (!image.Valid() || !image_res.IsStorage(image)) { - // Don't need to swizzle invalid or non-storage image. - return; - } - - IR::IREmitter ir{block, IR::Block::InstructionList::s_iterator_to(inst)}; - if (inst.GetOpcode() == IR::Opcode::ImageWrite) { - inst.SetArg(4, ApplySwizzle(ir, inst.Arg(4), image.DstSelect())); - } else if (inst.GetOpcode() == IR::Opcode::ImageRead) { - const auto inst_info = inst.Flags(); - const auto lod = inst.Arg(2); - const auto ms = inst.Arg(3); - const auto texel = - ir.ImageRead(inst.Arg(0), inst.Arg(1), lod.IsEmpty() ? IR::U32{} : IR::U32{lod}, - ms.IsEmpty() ? IR::U32{} : IR::U32{ms}, inst_info); - const auto swizzled = ApplySwizzle(ir, texel, image.DstSelect()); - inst.ReplaceUsesWith(swizzled); - } -} - -void PatchDataRingInstruction(IR::Block& block, IR::Inst& inst, Info& info, - Descriptors& descriptors) { - // Insert gds binding in the shader if it doesn't exist already. - // The buffer is used for append/consume counters. - constexpr static AmdGpu::Buffer GdsSharp{.base_address = 1}; - const u32 binding = descriptors.Add(BufferResource{ - .used_types = IR::Type::U32, - .inline_cbuf = GdsSharp, - .is_gds_buffer = true, - .is_written = true, - }); - - const auto pred = [](const IR::Inst* inst) -> std::optional { - if (inst->GetOpcode() == IR::Opcode::GetUserData) { - return inst; + const auto is_storage = image_res.is_written; + if (inst.GetOpcode() == IR::Opcode::ImageRead) { + auto texel = ir.ImageRead(handle, coords, lod, ms, inst_info); + if (is_storage) { + // Storage image requires shader swizzle. + texel = ApplySwizzle(ir, texel, image.DstSelect()); } - return std::nullopt; - }; + const auto converted = + ApplyReadNumberConversionVec4(ir, texel, image.GetNumberConversion()); + inst.ReplaceUsesWith(converted); + } else { + inst.SetArg(1, coords); + if (inst.GetOpcode() == IR::Opcode::ImageWrite) { + inst.SetArg(2, lod); + inst.SetArg(3, ms); - // Attempt to deduce the GDS address of counter at compile time. - const u32 gds_addr = [&] { - const IR::Value& gds_offset = inst.Arg(0); - if (gds_offset.IsImmediate()) { - // Nothing to do, offset is known. - return gds_offset.U32() & 0xFFFF; + auto texel = inst.Arg(4); + if (is_storage) { + // Storage image requires shader swizzle. + texel = ApplySwizzle(ir, texel, image.DstSelect().Inverse()); + } + const auto converted = + ApplyWriteNumberConversionVec4(ir, texel, image.GetNumberConversion()); + inst.SetArg(4, converted); } - const auto result = IR::BreadthFirstSearch(&inst, pred); - ASSERT_MSG(result, "Unable to track M0 source"); - - // M0 must be set by some user data register. - const IR::Inst* prod = gds_offset.InstRecursive(); - const u32 ud_reg = u32(result.value()->Arg(0).ScalarReg()); - u32 m0_val = info.user_data[ud_reg] >> 16; - if (prod->GetOpcode() == IR::Opcode::IAdd32) { - m0_val += prod->Arg(1).U32(); - } - return m0_val & 0xFFFF; - }(); - - // Patch instruction. - IR::IREmitter ir{block, IR::Block::InstructionList::s_iterator_to(inst)}; - inst.SetArg(0, ir.Imm32(gds_addr >> 2)); - inst.SetArg(1, ir.Imm32(binding)); + } } void ResourceTrackingPass(IR::Program& program) { // Iterate resource instructions and patch them after finding the sharp. auto& info = program.info; + // Pass 1: Track resource sharps Descriptors descriptors{info}; for (IR::Block* const block : program.blocks) { for (IR::Inst& inst : block->Instructions()) { if (IsBufferInstruction(inst)) { - PatchBufferInstruction(*block, inst, info, descriptors); - continue; - } - if (IsTextureBufferInstruction(inst)) { - PatchTextureBufferInstruction(*block, inst, info, descriptors); - continue; - } - if (IsImageInstruction(inst)) { - PatchImageInstruction(*block, inst, info, descriptors); - continue; - } - if (IsDataRingInstruction(inst)) { - PatchDataRingInstruction(*block, inst, info, descriptors); + PatchBufferSharp(*block, inst, info, descriptors); + } else if (IsImageInstruction(inst)) { + PatchImageSharp(*block, inst, info, descriptors); + } else if (IsDataRingInstruction(inst)) { + PatchDataRingAccess(*block, inst, info, descriptors); } } } - // Second pass to reinterpret format read/write where needed, since we now know - // the bindings and their properties. + + // Pass 2: Patch instruction args for (IR::Block* const block : program.blocks) { for (IR::Inst& inst : block->Instructions()) { - if (IsTextureBufferInstruction(inst)) { - PatchTextureBufferInterpretation(*block, inst, info); - continue; - } - if (IsImageInstruction(inst)) { - PatchImageInterpretation(*block, inst, info); + if (IsBufferInstruction(inst)) { + PatchBufferArgs(*block, inst, info); + } else if (IsImageInstruction(inst)) { + PatchImageArgs(*block, inst, info); } } } diff --git a/src/shader_recompiler/ir/passes/ring_access_elimination.cpp b/src/shader_recompiler/ir/passes/ring_access_elimination.cpp index d6f1efb12..071b94ac0 100644 --- a/src/shader_recompiler/ir/passes/ring_access_elimination.cpp +++ b/src/shader_recompiler/ir/passes/ring_access_elimination.cpp @@ -11,8 +11,7 @@ namespace Shader::Optimization { -void RingAccessElimination(const IR::Program& program, const RuntimeInfo& runtime_info, - Stage stage) { +void RingAccessElimination(const IR::Program& program, const RuntimeInfo& runtime_info) { auto& info = program.info; const auto& ForEachInstruction = [&](auto func) { @@ -24,7 +23,7 @@ void RingAccessElimination(const IR::Program& program, const RuntimeInfo& runtim } }; - switch (stage) { + switch (program.info.stage) { case Stage::Local: { ForEachInstruction([=](IR::IREmitter& ir, IR::Inst& inst) { const auto opcode = inst.GetOpcode(); diff --git a/src/shader_recompiler/ir/passes/shader_info_collection_pass.cpp b/src/shader_recompiler/ir/passes/shader_info_collection_pass.cpp index c34b59b88..219378a6c 100644 --- a/src/shader_recompiler/ir/passes/shader_info_collection_pass.cpp +++ b/src/shader_recompiler/ir/passes/shader_info_collection_pass.cpp @@ -5,7 +5,7 @@ namespace Shader::Optimization { -void Visit(Info& info, IR::Inst& inst) { +void Visit(Info& info, const IR::Inst& inst) { switch (inst.GetOpcode()) { case IR::Opcode::GetAttribute: case IR::Opcode::GetAttributeU32: @@ -50,12 +50,6 @@ void Visit(Info& info, IR::Inst& inst) { case IR::Opcode::ImageWrite: info.has_storage_images = true; break; - case IR::Opcode::LoadBufferFormatF32: - info.has_texel_buffers = true; - break; - case IR::Opcode::StoreBufferFormatF32: - info.has_image_buffers = true; - break; case IR::Opcode::QuadShuffle: info.uses_group_quad = true; break; @@ -80,7 +74,20 @@ void Visit(Info& info, IR::Inst& inst) { info.uses_lane_id = true; break; case IR::Opcode::ReadConst: - info.has_readconst = true; + if (!info.has_readconst) { + info.buffers.push_back({ + .used_types = IR::Type::U32, + .inline_cbuf = AmdGpu::Buffer::Null(), + .buffer_type = BufferType::ReadConstUbo, + }); + info.has_readconst = true; + } + break; + case IR::Opcode::PackUfloat10_11_11: + info.uses_pack_10_11_11 = true; + break; + case IR::Opcode::UnpackUfloat10_11_11: + info.uses_unpack_10_11_11 = true; break; default: break; @@ -88,10 +95,9 @@ void Visit(Info& info, IR::Inst& inst) { } void CollectShaderInfoPass(IR::Program& program) { - Info& info{program.info}; for (IR::Block* const block : program.post_order_blocks) { for (IR::Inst& inst : block->Instructions()) { - Visit(info, inst); + Visit(program.info, inst); } } } diff --git a/src/shader_recompiler/ir/passes/shared_memory_barrier_pass.cpp b/src/shader_recompiler/ir/passes/shared_memory_barrier_pass.cpp index ec7d7e986..baf6ad0d1 100644 --- a/src/shader_recompiler/ir/passes/shared_memory_barrier_pass.cpp +++ b/src/shader_recompiler/ir/passes/shared_memory_barrier_pass.cpp @@ -8,37 +8,50 @@ namespace Shader::Optimization { +static bool IsLoadShared(const IR::Inst& inst) { + return inst.GetOpcode() == IR::Opcode::LoadSharedU32 || + inst.GetOpcode() == IR::Opcode::LoadSharedU64; +} + +static bool IsWriteShared(const IR::Inst& inst) { + return inst.GetOpcode() == IR::Opcode::WriteSharedU32 || + inst.GetOpcode() == IR::Opcode::WriteSharedU64; +} + +// Inserts barriers when a shared memory write and read occur in the same basic block. static void EmitBarrierInBlock(IR::Block* block) { - // This is inteded to insert a barrier when shared memory write and read - // occur in the same basic block. Also checks if branch depth is zero as - // we don't want to insert barrier in potentially divergent code. - bool emit_barrier_on_write = false; - bool emit_barrier_on_read = false; - const auto emit_barrier = [block](bool& emit_cond, IR::Inst& inst) { - if (emit_cond) { - IR::IREmitter ir{*block, IR::Block::InstructionList::s_iterator_to(inst)}; - ir.Barrier(); - emit_cond = false; - } + enum class BarrierAction : u32 { + None, + BarrierOnWrite, + BarrierOnRead, }; + BarrierAction action{}; for (IR::Inst& inst : block->Instructions()) { - if (inst.GetOpcode() == IR::Opcode::LoadSharedU32 || - inst.GetOpcode() == IR::Opcode::LoadSharedU64) { - emit_barrier(emit_barrier_on_read, inst); - emit_barrier_on_write = true; + if (IsLoadShared(inst)) { + if (action == BarrierAction::BarrierOnRead) { + IR::IREmitter ir{*block, IR::Block::InstructionList::s_iterator_to(inst)}; + ir.Barrier(); + } + action = BarrierAction::BarrierOnWrite; + continue; } - if (inst.GetOpcode() == IR::Opcode::WriteSharedU32 || - inst.GetOpcode() == IR::Opcode::WriteSharedU64) { - emit_barrier(emit_barrier_on_write, inst); - emit_barrier_on_read = true; + if (IsWriteShared(inst)) { + if (action == BarrierAction::BarrierOnWrite) { + IR::IREmitter ir{*block, IR::Block::InstructionList::s_iterator_to(inst)}; + ir.Barrier(); + } + action = BarrierAction::BarrierOnRead; } } + if (action != BarrierAction::None) { + IR::IREmitter ir{*block, --block->end()}; + ir.Barrier(); + } } +// Inserts a barrier after divergent conditional blocks to avoid undefined +// behavior when some threads write and others read from shared memory. static void EmitBarrierInMergeBlock(const IR::AbstractSyntaxNode::Data& data) { - // Insert a barrier after divergent conditional blocks. - // This avoids potential softlocks and crashes when some threads - // initialize shared memory and others read from it. const IR::U1 cond = data.if_node.cond; const auto insert_barrier = IR::BreadthFirstSearch(cond, [](IR::Inst* inst) -> std::optional { @@ -56,8 +69,21 @@ static void EmitBarrierInMergeBlock(const IR::AbstractSyntaxNode::Data& data) { } } -void SharedMemoryBarrierPass(IR::Program& program, const Profile& profile) { - if (!program.info.uses_shared || !profile.needs_lds_barriers) { +static constexpr u32 GcnSubgroupSize = 64; + +void SharedMemoryBarrierPass(IR::Program& program, const RuntimeInfo& runtime_info, + const Profile& profile) { + if (program.info.stage != Stage::Compute) { + return; + } + const auto& cs_info = runtime_info.cs_info; + const u32 shared_memory_size = cs_info.shared_memory_size; + const u32 threadgroup_size = + cs_info.workgroup_size[0] * cs_info.workgroup_size[1] * cs_info.workgroup_size[2]; + // The compiler can only omit barriers when the local workgroup size is the same as the HW + // subgroup. + if (shared_memory_size == 0 || threadgroup_size != GcnSubgroupSize || + !profile.needs_lds_barriers) { return; } using Type = IR::AbstractSyntaxNode::Type; @@ -67,6 +93,8 @@ void SharedMemoryBarrierPass(IR::Program& program, const Profile& profile) { --branch_depth; continue; } + // Check if branch depth is zero, we don't want to insert barrier in potentially divergent + // code. if (node.type == Type::If && branch_depth++ == 0) { EmitBarrierInMergeBlock(node.data); continue; diff --git a/src/shader_recompiler/ir/passes/shared_memory_to_storage_pass.cpp b/src/shader_recompiler/ir/passes/shared_memory_to_storage_pass.cpp new file mode 100644 index 000000000..25aaf257c --- /dev/null +++ b/src/shader_recompiler/ir/passes/shared_memory_to_storage_pass.cpp @@ -0,0 +1,117 @@ +// SPDX-FileCopyrightText: Copyright 2024 shadPS4 Emulator Project +// SPDX-License-Identifier: GPL-2.0-or-later + +#include "shader_recompiler/ir/ir_emitter.h" +#include "shader_recompiler/ir/program.h" +#include "shader_recompiler/profile.h" + +namespace Shader::Optimization { + +static bool IsSharedAccess(const IR::Inst& inst) { + const auto opcode = inst.GetOpcode(); + switch (opcode) { + case IR::Opcode::LoadSharedU32: + case IR::Opcode::LoadSharedU64: + case IR::Opcode::WriteSharedU32: + case IR::Opcode::WriteSharedU64: + case IR::Opcode::SharedAtomicAnd32: + case IR::Opcode::SharedAtomicIAdd32: + case IR::Opcode::SharedAtomicOr32: + case IR::Opcode::SharedAtomicSMax32: + case IR::Opcode::SharedAtomicUMax32: + case IR::Opcode::SharedAtomicSMin32: + case IR::Opcode::SharedAtomicUMin32: + case IR::Opcode::SharedAtomicXor32: + return true; + default: + return false; + } +} + +void SharedMemoryToStoragePass(IR::Program& program, const RuntimeInfo& runtime_info, + const Profile& profile) { + if (program.info.stage != Stage::Compute) { + return; + } + // Only perform the transform if the host shared memory is insufficient. + const u32 shared_memory_size = runtime_info.cs_info.shared_memory_size; + if (shared_memory_size <= profile.max_shared_memory_size) { + return; + } + // Add buffer binding for shared memory storage buffer. + const u32 binding = static_cast(program.info.buffers.size()); + program.info.buffers.push_back({ + .used_types = IR::Type::U32, + .inline_cbuf = AmdGpu::Buffer::Null(), + .buffer_type = BufferType::SharedMemory, + .is_written = true, + }); + for (IR::Block* const block : program.blocks) { + for (IR::Inst& inst : block->Instructions()) { + if (!IsSharedAccess(inst)) { + continue; + } + IR::IREmitter ir{*block, IR::Block::InstructionList::s_iterator_to(inst)}; + const IR::U32 handle = ir.Imm32(binding); + // Replace shared atomics first + switch (inst.GetOpcode()) { + case IR::Opcode::SharedAtomicAnd32: + inst.ReplaceUsesWithAndRemove( + ir.BufferAtomicAnd(handle, inst.Arg(0), inst.Arg(1), {})); + continue; + case IR::Opcode::SharedAtomicIAdd32: + inst.ReplaceUsesWithAndRemove( + ir.BufferAtomicIAdd(handle, inst.Arg(0), inst.Arg(1), {})); + continue; + case IR::Opcode::SharedAtomicOr32: + inst.ReplaceUsesWithAndRemove( + ir.BufferAtomicOr(handle, inst.Arg(0), inst.Arg(1), {})); + continue; + case IR::Opcode::SharedAtomicSMax32: + case IR::Opcode::SharedAtomicUMax32: { + const bool is_signed = inst.GetOpcode() == IR::Opcode::SharedAtomicSMax32; + inst.ReplaceUsesWithAndRemove( + ir.BufferAtomicIMax(handle, inst.Arg(0), inst.Arg(1), is_signed, {})); + continue; + } + case IR::Opcode::SharedAtomicSMin32: + case IR::Opcode::SharedAtomicUMin32: { + const bool is_signed = inst.GetOpcode() == IR::Opcode::SharedAtomicSMin32; + inst.ReplaceUsesWithAndRemove( + ir.BufferAtomicIMin(handle, inst.Arg(0), inst.Arg(1), is_signed, {})); + continue; + } + case IR::Opcode::SharedAtomicXor32: + inst.ReplaceUsesWithAndRemove( + ir.BufferAtomicXor(handle, inst.Arg(0), inst.Arg(1), {})); + continue; + default: + break; + } + // Replace shared operations. + const IR::U32 offset = ir.IMul(ir.GetAttributeU32(IR::Attribute::WorkgroupIndex), + ir.Imm32(shared_memory_size)); + const IR::U32 address = ir.IAdd(IR::U32{inst.Arg(0)}, offset); + switch (inst.GetOpcode()) { + case IR::Opcode::LoadSharedU32: + inst.ReplaceUsesWithAndRemove(ir.LoadBufferU32(1, handle, address, {})); + break; + case IR::Opcode::LoadSharedU64: + inst.ReplaceUsesWithAndRemove(ir.LoadBufferU32(2, handle, address, {})); + break; + case IR::Opcode::WriteSharedU32: + ir.StoreBufferU32(1, handle, address, inst.Arg(1), {}); + inst.Invalidate(); + break; + case IR::Opcode::WriteSharedU64: + ir.StoreBufferU32(2, handle, address, inst.Arg(1), {}); + inst.Invalidate(); + break; + default: + break; + } + } + } +} + +} // namespace Shader::Optimization diff --git a/src/shader_recompiler/ir/reg.h b/src/shader_recompiler/ir/reg.h index 19e0da3dd..40c4b61c3 100644 --- a/src/shader_recompiler/ir/reg.h +++ b/src/shader_recompiler/ir/reg.h @@ -7,6 +7,7 @@ #include "common/bit_field.h" #include "common/enum.h" #include "common/types.h" +#include "video_core/amdgpu/types.h" namespace Shader::IR { @@ -51,6 +52,9 @@ union BufferInstInfo { BitField<2, 12, u32> inst_offset; BitField<14, 1, u32> system_coherent; BitField<15, 1, u32> globally_coherent; + BitField<16, 1, u32> typed; + BitField<17, 4, AmdGpu::DataFormat> inst_data_fmt; + BitField<21, 3, AmdGpu::NumberFormat> inst_num_fmt; }; enum class ScalarReg : u32 { diff --git a/src/shader_recompiler/ir/reinterpret.h b/src/shader_recompiler/ir/reinterpret.h index 73d587a56..b65b19928 100644 --- a/src/shader_recompiler/ir/reinterpret.h +++ b/src/shader_recompiler/ir/reinterpret.h @@ -4,7 +4,7 @@ #pragma once #include "shader_recompiler/ir/ir_emitter.h" -#include "video_core/amdgpu/resource.h" +#include "video_core/amdgpu/types.h" namespace Shader::IR { @@ -21,4 +21,66 @@ inline Value ApplySwizzle(IREmitter& ir, const Value& vector, const AmdGpu::Comp return swizzled; } +/// Applies a number conversion in the read direction. +inline F32 ApplyReadNumberConversion(IREmitter& ir, const F32& value, + const AmdGpu::NumberConversion& conversion) { + switch (conversion) { + case AmdGpu::NumberConversion::None: + return value; + case AmdGpu::NumberConversion::UintToUscaled: + return ir.ConvertUToF(32, 32, ir.BitCast(value)); + case AmdGpu::NumberConversion::SintToSscaled: + return ir.ConvertSToF(32, 32, ir.BitCast(value)); + case AmdGpu::NumberConversion::UnormToUbnorm: + // Convert 0...1 to -1...1 + return ir.FPSub(ir.FPMul(value, ir.Imm32(2.f)), ir.Imm32(1.f)); + default: + UNREACHABLE(); + } +} + +inline Value ApplyReadNumberConversionVec4(IREmitter& ir, const Value& value, + const AmdGpu::NumberConversion& conversion) { + if (conversion == AmdGpu::NumberConversion::None) { + return value; + } + const auto x = ApplyReadNumberConversion(ir, F32{ir.CompositeExtract(value, 0)}, conversion); + const auto y = ApplyReadNumberConversion(ir, F32{ir.CompositeExtract(value, 1)}, conversion); + const auto z = ApplyReadNumberConversion(ir, F32{ir.CompositeExtract(value, 2)}, conversion); + const auto w = ApplyReadNumberConversion(ir, F32{ir.CompositeExtract(value, 3)}, conversion); + return ir.CompositeConstruct(x, y, z, w); +} + +/// Applies a number conversion in the write direction. +inline F32 ApplyWriteNumberConversion(IREmitter& ir, const F32& value, + const AmdGpu::NumberConversion& conversion) { + switch (conversion) { + case AmdGpu::NumberConversion::None: + return value; + case AmdGpu::NumberConversion::UintToUscaled: + // Need to return float type to maintain IR semantics. + return ir.BitCast(U32{ir.ConvertFToU(32, value)}); + case AmdGpu::NumberConversion::SintToSscaled: + // Need to return float type to maintain IR semantics. + return ir.BitCast(U32{ir.ConvertFToS(32, value)}); + case AmdGpu::NumberConversion::UnormToUbnorm: + // Convert -1...1 to 0...1 + return ir.FPDiv(ir.FPAdd(value, ir.Imm32(1.f)), ir.Imm32(2.f)); + default: + UNREACHABLE(); + } +} + +inline Value ApplyWriteNumberConversionVec4(IREmitter& ir, const Value& value, + const AmdGpu::NumberConversion& conversion) { + if (conversion == AmdGpu::NumberConversion::None) { + return value; + } + const auto x = ApplyWriteNumberConversion(ir, F32{ir.CompositeExtract(value, 0)}, conversion); + const auto y = ApplyWriteNumberConversion(ir, F32{ir.CompositeExtract(value, 1)}, conversion); + const auto z = ApplyWriteNumberConversion(ir, F32{ir.CompositeExtract(value, 2)}, conversion); + const auto w = ApplyWriteNumberConversion(ir, F32{ir.CompositeExtract(value, 3)}, conversion); + return ir.CompositeConstruct(x, y, z, w); +} + } // namespace Shader::IR diff --git a/src/shader_recompiler/ir/srt_gvn_table.h b/src/shader_recompiler/ir/srt_gvn_table.h index 232ee6152..3baa1c7da 100644 --- a/src/shader_recompiler/ir/srt_gvn_table.h +++ b/src/shader_recompiler/ir/srt_gvn_table.h @@ -52,24 +52,16 @@ private: switch (inst->GetOpcode()) { case IR::Opcode::Phi: { - // hack to get to parity with main - // Need to fix ssa_rewrite pass to remove certain phis - std::optional source = TryRemoveTrivialPhi(inst); - if (!source) { - const auto pred = [](IR::Inst* inst) -> std::optional { - if (inst->GetOpcode() == IR::Opcode::GetUserData || - inst->GetOpcode() == IR::Opcode::CompositeConstructU32x2 || - inst->GetOpcode() == IR::Opcode::ReadConst) { - return inst; - } - return std::nullopt; - }; - source = IR::BreadthFirstSearch(inst, pred).transform([](auto inst) { - return IR::Value{inst}; - }); - ASSERT(source); - } - vn = GetValueNumber(source.value()); + const auto pred = [](IR::Inst* inst) -> std::optional { + if (inst->GetOpcode() == IR::Opcode::GetUserData || + inst->GetOpcode() == IR::Opcode::CompositeConstructU32x2 || + inst->GetOpcode() == IR::Opcode::ReadConst) { + return inst; + } + return std::nullopt; + }; + IR::Inst* source = IR::BreadthFirstSearch(inst, pred).value(); + vn = GetValueNumber(source); value_numbers[IR::Value(inst)] = vn; break; } @@ -117,30 +109,6 @@ private: return iv; } - // Temp workaround for something like this: - // [0000555558a5baf8] %297 = Phi [ %24, {Block $1} ], [ %297, {Block $5} ] (uses: 4) - // [0000555558a4e038] %305 = CompositeConstructU32x2 %297, %296 (uses: 4) - // [0000555558a4e0a8] %306 = ReadConst %305, #0 (uses: 2) - // Should probably be fixed in ssa_rewrite - std::optional TryRemoveTrivialPhi(IR::Inst* phi) { - IR::Value single_source{}; - - for (auto i = 0; i < phi->NumArgs(); i++) { - IR::Value v = phi->Arg(i).Resolve(); - if (v == IR::Value(phi)) { - continue; - } - if (!single_source.IsEmpty() && single_source != v) { - return std::nullopt; - } - single_source = v; - } - - ASSERT(!single_source.IsEmpty()); - phi->ReplaceUsesWith(single_source); - return single_source; - } - struct HashInstVector { size_t operator()(const InstVector& iv) const { u32 h = 0; diff --git a/src/shader_recompiler/ir/type.cpp b/src/shader_recompiler/ir/type.cpp index 08157f108..74c56740c 100644 --- a/src/shader_recompiler/ir/type.cpp +++ b/src/shader_recompiler/ir/type.cpp @@ -9,9 +9,10 @@ namespace Shader::IR { std::string NameOf(Type type) { static constexpr std::array names{ - "Opaque", "Label", "Reg", "Pred", "Attribute", "U1", "U8", "U16", "U32", - "U64", "F16", "F32", "F64", "U32x2", "U32x3", "U32x4", "F16x2", "F16x3", - "F16x4", "F32x2", "F32x3", "F32x4", "F64x2", "F64x3", "F64x4", "StringLiteral"}; + "Opaque", "ScalarReg", "VectorReg", "Attribute", "Patch", "U1", "U8", + "U16", "U32", "U64", "F16", "F32", "F64", "U32x2", + "U32x3", "U32x4", "F16x2", "F16x3", "F16x4", "F32x2", "F32x3", + "F32x4", "F64x2", "F64x3", "F64x4", "StringLiteral"}; const size_t bits{static_cast(type)}; if (bits == 0) { return "Void"; diff --git a/src/shader_recompiler/profile.h b/src/shader_recompiler/profile.h index fc8c5956e..1ceaea664 100644 --- a/src/shader_recompiler/profile.h +++ b/src/shader_recompiler/profile.h @@ -21,14 +21,21 @@ struct Profile { bool support_separate_rounding_mode{}; bool support_fp32_denorm_preserve{}; bool support_fp32_denorm_flush{}; + bool support_fp32_round_to_zero{}; bool support_explicit_workgroup_layout{}; bool support_legacy_vertex_attributes{}; bool supports_image_load_store_lod{}; + bool supports_native_cube_calc{}; + bool supports_robust_buffer_access{}; bool has_broken_spirv_clamp{}; bool lower_left_origin_mode{}; bool needs_manual_interpolation{}; bool needs_lds_barriers{}; u64 min_ssbo_alignment{}; + u64 max_ubo_size{}; + u32 max_viewport_width{}; + u32 max_viewport_height{}; + u32 max_shared_memory_size{}; }; } // namespace Shader diff --git a/src/shader_recompiler/recompiler.cpp b/src/shader_recompiler/recompiler.cpp index bb027a11e..5004e0beb 100644 --- a/src/shader_recompiler/recompiler.cpp +++ b/src/shader_recompiler/recompiler.cpp @@ -1,9 +1,6 @@ // SPDX-FileCopyrightText: Copyright 2024 shadPS4 Emulator Project // SPDX-License-Identifier: GPL-2.0-or-later -#include "common/config.h" -#include "common/io_file.h" -#include "common/path_util.h" #include "shader_recompiler/frontend/control_flow_graph.h" #include "shader_recompiler/frontend/decode.h" #include "shader_recompiler/frontend/structured_control_flow.h" @@ -63,35 +60,27 @@ IR::Program TranslateProgram(std::span code, Pools& pools, Info& info program.post_order_blocks = Shader::IR::PostOrder(program.syntax_list.front()); // Run optimization passes - const auto stage = program.info.stage; - Shader::Optimization::SsaRewritePass(program.post_order_blocks); + Shader::Optimization::ConstantPropagationPass(program.post_order_blocks); Shader::Optimization::IdentityRemovalPass(program.blocks); if (info.l_stage == LogicalStage::TessellationControl) { - // Tess passes require previous const prop passes for now (for simplicity). TODO allow - // fine grained folding or opportunistic folding we set an operand to an immediate - Shader::Optimization::ConstantPropagationPass(program.post_order_blocks); Shader::Optimization::TessellationPreprocess(program, runtime_info); - Shader::Optimization::ConstantPropagationPass(program.post_order_blocks); Shader::Optimization::HullShaderTransform(program, runtime_info); } else if (info.l_stage == LogicalStage::TessellationEval) { - Shader::Optimization::ConstantPropagationPass(program.post_order_blocks); Shader::Optimization::TessellationPreprocess(program, runtime_info); - Shader::Optimization::ConstantPropagationPass(program.post_order_blocks); Shader::Optimization::DomainShaderTransform(program, runtime_info); } - Shader::Optimization::ConstantPropagationPass(program.post_order_blocks); - Shader::Optimization::RingAccessElimination(program, runtime_info, stage); - if (stage != Stage::Compute) { - Shader::Optimization::LowerSharedMemToRegisters(program); - } - Shader::Optimization::ConstantPropagationPass(program.post_order_blocks); + Shader::Optimization::RingAccessElimination(program, runtime_info); + Shader::Optimization::ReadLaneEliminationPass(program); Shader::Optimization::FlattenExtendedUserdataPass(program); Shader::Optimization::ResourceTrackingPass(program); + Shader::Optimization::LowerBufferFormatToRaw(program); + Shader::Optimization::SharedMemoryToStoragePass(program, runtime_info, profile); + Shader::Optimization::SharedMemoryBarrierPass(program, runtime_info, profile); Shader::Optimization::IdentityRemovalPass(program.blocks); Shader::Optimization::DeadCodeEliminationPass(program); + Shader::Optimization::ConstantPropagationPass(program.post_order_blocks); Shader::Optimization::CollectShaderInfoPass(program); - Shader::Optimization::SharedMemoryBarrierPass(program, profile); return program; } diff --git a/src/shader_recompiler/runtime_info.h b/src/shader_recompiler/runtime_info.h index 781a0b14a..517392b98 100644 --- a/src/shader_recompiler/runtime_info.h +++ b/src/shader_recompiler/runtime_info.h @@ -84,6 +84,7 @@ struct VertexRuntimeInfo { u32 num_outputs; std::array outputs; bool emulate_depth_negative_one_to_one{}; + bool clip_disable{}; // Domain AmdGpu::TessellationType tess_type; AmdGpu::TessellationTopology tess_topology; @@ -92,7 +93,8 @@ struct VertexRuntimeInfo { bool operator==(const VertexRuntimeInfo& other) const noexcept { return emulate_depth_negative_one_to_one == other.emulate_depth_negative_one_to_one && - tess_type == other.tess_type && tess_topology == other.tess_topology && + clip_disable == other.clip_disable && tess_type == other.tess_type && + tess_topology == other.tess_topology && tess_partitioning == other.tess_partitioning && hs_output_cp_stride == other.hs_output_cp_stride; } @@ -165,6 +167,17 @@ enum class MrtSwizzle : u8 { }; static constexpr u32 MaxColorBuffers = 8; +struct PsColorBuffer { + AmdGpu::NumberFormat num_format : 4; + AmdGpu::NumberConversion num_conversion : 2; + AmdGpu::Liverpool::ShaderExportFormat export_format : 4; + u32 needs_unorm_fixup : 1; + u32 pad : 21; + AmdGpu::CompMapping swizzle; + + auto operator<=>(const PsColorBuffer&) const noexcept = default; +}; + struct FragmentRuntimeInfo { struct PsInput { u8 param_index; @@ -172,18 +185,16 @@ struct FragmentRuntimeInfo { bool is_flat; u8 default_value; + [[nodiscard]] bool IsDefault() const { + return is_default && !is_flat; + } + auto operator<=>(const PsInput&) const noexcept = default; }; AmdGpu::Liverpool::PsInput en_flags; AmdGpu::Liverpool::PsInput addr_flags; u32 num_inputs; std::array inputs; - struct PsColorBuffer { - AmdGpu::NumberFormat num_format; - AmdGpu::CompMapping swizzle; - - auto operator<=>(const PsColorBuffer&) const noexcept = default; - }; std::array color_buffers; bool operator==(const FragmentRuntimeInfo& other) const noexcept { @@ -255,3 +266,14 @@ struct RuntimeInfo { }; } // namespace Shader + +template <> +struct fmt::formatter { + constexpr auto parse(format_parse_context& ctx) { + return ctx.begin(); + } + auto format(const Shader::Stage stage, format_context& ctx) const { + constexpr static std::array names = {"fs", "vs", "gs", "es", "hs", "ls", "cs"}; + return fmt::format_to(ctx.out(), "{}", names[static_cast(stage)]); + } +}; diff --git a/src/shader_recompiler/specialization.h b/src/shader_recompiler/specialization.h index f8a86c63b..e40309aaf 100644 --- a/src/shader_recompiler/specialization.h +++ b/src/shader_recompiler/specialization.h @@ -13,34 +13,43 @@ namespace Shader { struct VsAttribSpecialization { + s32 num_components{}; AmdGpu::NumberClass num_class{}; + AmdGpu::CompMapping dst_select{}; auto operator<=>(const VsAttribSpecialization&) const = default; }; struct BufferSpecialization { - u16 stride : 14; - u16 is_storage : 1; - u32 size = 0; + u32 stride : 14; + u32 is_storage : 1; + u32 is_formatted : 1; + u32 swizzle_enable : 1; + u32 data_format : 6; + u32 num_format : 4; + u32 index_stride : 2; + u32 element_size : 2; + AmdGpu::CompMapping dst_select{}; + AmdGpu::NumberConversion num_conversion{}; bool operator==(const BufferSpecialization& other) const { return stride == other.stride && is_storage == other.is_storage && - (size >= other.is_storage || is_storage); + is_formatted == other.is_formatted && swizzle_enable == other.swizzle_enable && + (!is_formatted || + (data_format == other.data_format && num_format == other.num_format && + dst_select == other.dst_select && num_conversion == other.num_conversion)) && + (!swizzle_enable || + (index_stride == other.index_stride && element_size == other.element_size)); } }; -struct TextureBufferSpecialization { - bool is_integer = false; - AmdGpu::CompMapping dst_select{}; - - auto operator<=>(const TextureBufferSpecialization&) const = default; -}; - struct ImageSpecialization { AmdGpu::ImageType type = AmdGpu::ImageType::Color2D; bool is_integer = false; bool is_storage = false; + bool is_cube = false; AmdGpu::CompMapping dst_select{}; + AmdGpu::NumberConversion num_conversion{}; auto operator<=>(const ImageSpecialization&) const = default; }; @@ -73,49 +82,56 @@ struct StageSpecialization { boost::container::small_vector vs_attribs; std::bitset bitset{}; boost::container::small_vector buffers; - boost::container::small_vector tex_buffers; boost::container::small_vector images; boost::container::small_vector fmasks; boost::container::small_vector samplers; Backend::Bindings start{}; - explicit StageSpecialization(const Info& info_, RuntimeInfo runtime_info_, - const Profile& profile_, Backend::Bindings start_) + StageSpecialization(const Info& info_, RuntimeInfo runtime_info_, const Profile& profile_, + Backend::Bindings start_) : info{&info_}, runtime_info{runtime_info_}, start{start_} { fetch_shader_data = Gcn::ParseFetchShader(info_); - if (info_.stage == Stage::Vertex && fetch_shader_data && - !profile_.support_legacy_vertex_attributes) { + if (info_.stage == Stage::Vertex && fetch_shader_data) { // Specialize shader on VS input number types to follow spec. ForEachSharp(vs_attribs, fetch_shader_data->attributes, - [](auto& spec, const auto& desc, AmdGpu::Buffer sharp) { - spec.num_class = AmdGpu::GetNumberClass(sharp.GetNumberFmt()); + [&profile_](auto& spec, const auto& desc, AmdGpu::Buffer sharp) { + spec.num_components = desc.UsesStepRates() + ? AmdGpu::NumComponents(sharp.GetDataFmt()) + : 0; + spec.num_class = profile_.support_legacy_vertex_attributes + ? AmdGpu::NumberClass{} + : AmdGpu::GetNumberClass(sharp.GetNumberFmt()); + spec.dst_select = sharp.DstSelect(); }); } u32 binding{}; - if (info->has_readconst) { - binding++; - } ForEachSharp(binding, buffers, info->buffers, - [](auto& spec, const auto& desc, AmdGpu::Buffer sharp) { + [profile_](auto& spec, const auto& desc, AmdGpu::Buffer sharp) { spec.stride = sharp.GetStride(); - spec.is_storage = desc.IsStorage(sharp); - if (!spec.is_storage) { - spec.size = sharp.GetSize(); + spec.is_storage = desc.IsStorage(sharp, profile_); + spec.is_formatted = desc.is_formatted; + spec.swizzle_enable = sharp.swizzle_enable; + if (spec.is_formatted) { + spec.data_format = static_cast(sharp.GetDataFmt()); + spec.num_format = static_cast(sharp.GetNumberFmt()); + spec.dst_select = sharp.DstSelect(); + spec.num_conversion = sharp.GetNumberConversion(); + } + if (spec.swizzle_enable) { + spec.index_stride = sharp.index_stride; + spec.element_size = sharp.element_size; } - }); - ForEachSharp(binding, tex_buffers, info->texture_buffers, - [](auto& spec, const auto& desc, AmdGpu::Buffer sharp) { - spec.is_integer = AmdGpu::IsInteger(sharp.GetNumberFmt()); - spec.dst_select = sharp.DstSelect(); }); ForEachSharp(binding, images, info->images, [](auto& spec, const auto& desc, AmdGpu::Image sharp) { - spec.type = sharp.GetBoundType(); + spec.type = sharp.GetViewType(desc.is_array); spec.is_integer = AmdGpu::IsInteger(sharp.GetNumberFmt()); - spec.is_storage = desc.IsStorage(sharp); + spec.is_storage = desc.is_written; + spec.is_cube = sharp.IsCube(); if (spec.is_storage) { spec.dst_select = sharp.DstSelect(); } + spec.num_conversion = sharp.GetNumberConversion(); }); ForEachSharp(binding, fmasks, info->fmasks, [](auto& spec, const auto& desc, AmdGpu::Image sharp) { @@ -180,22 +196,11 @@ struct StageSpecialization { } } u32 binding{}; - if (info->has_readconst != other.info->has_readconst) { - return false; - } - if (info->has_readconst) { - binding++; - } for (u32 i = 0; i < buffers.size(); i++) { if (other.bitset[binding++] && buffers[i] != other.buffers[i]) { return false; } } - for (u32 i = 0; i < tex_buffers.size(); i++) { - if (other.bitset[binding++] && tex_buffers[i] != other.tex_buffers[i]) { - return false; - } - } for (u32 i = 0; i < images.size(); i++) { if (other.bitset[binding++] && images[i] != other.images[i]) { return false; diff --git a/src/shadps4.qrc b/src/shadps4.qrc index 30f234ed8..83dea01c4 100644 --- a/src/shadps4.qrc +++ b/src/shadps4.qrc @@ -1,34 +1,40 @@ - - images/shadps4.ico - images/about_icon.png - images/dump_icon.png - images/play_icon.png - images/pause_icon.png - images/stop_icon.png - images/utils_icon.png - images/file_icon.png - images/folder_icon.png - images/themes_icon.png - images/iconsize_icon.png - images/list_icon.png - images/grid_icon.png - images/exit_icon.png - images/settings_icon.png - images/controller_icon.png - images/refresh_icon.png - images/update_icon.png - images/list_mode_icon.png - images/flag_jp.png - images/flag_eu.png - images/flag_unk.png - images/flag_us.png - images/flag_world.png - images/flag_china.png - images/github.png - images/discord.png - images/ko-fi.png - images/youtube.png - images/website.png - + + images/shadps4.ico + images/about_icon.png + images/dump_icon.png + images/play_icon.png + images/pause_icon.png + images/stop_icon.png + images/utils_icon.png + images/file_icon.png + images/folder_icon.png + images/themes_icon.png + images/iconsize_icon.png + images/list_icon.png + images/grid_icon.png + images/exit_icon.png + images/settings_icon.png + images/controller_icon.png + images/restart_game_icon.png + images/update_icon.png + images/list_mode_icon.png + images/flag_jp.png + images/flag_eu.png + images/flag_unk.png + images/flag_us.png + images/flag_world.png + images/flag_china.png + images/github.png + images/discord.png + images/ko-fi.png + images/youtube.png + images/website.png + images/ps4_controller.png + images/keyboard_icon.png + images/KBM.png + images/fullscreen_icon.png + images/refreshlist_icon.png + images/trophy_icon.png + diff --git a/src/video_core/amdgpu/liverpool.cpp b/src/video_core/amdgpu/liverpool.cpp index 985f3c652..967b952c6 100644 --- a/src/video_core/amdgpu/liverpool.cpp +++ b/src/video_core/amdgpu/liverpool.cpp @@ -93,17 +93,14 @@ void Liverpool::Process(std::stop_token stoken) { // Process incoming commands with high priority while (num_commands) { - Common::UniqueFunction callback{}; { std::unique_lock lk{submit_mutex}; - callback = std::move(command_queue.back()); + callback = std::move(command_queue.front()); command_queue.pop(); + --num_commands; } - callback(); - - --num_commands; } curr_qid = (curr_qid + 1) % num_mapped_queues; @@ -260,7 +257,7 @@ Liverpool::Task Liverpool::ProcessGraphics(std::span dcb, std::span(&nop->data_block[1]), marker_sz}; if (rasterizer) { - rasterizer->ScopeMarkerBegin(label); + rasterizer->ScopeMarkerBegin(label, true); } break; } @@ -271,13 +268,13 @@ Liverpool::Task Liverpool::ProcessGraphics(std::span dcb, std::span( reinterpret_cast(&nop->data_block[1]) + marker_sz); if (rasterizer) { - rasterizer->ScopedMarkerInsertColor(label, color); + rasterizer->ScopedMarkerInsertColor(label, color, true); } break; } case PM4CmdNop::PayloadType::DebugMarkerPop: { if (rasterizer) { - rasterizer->ScopeMarkerEnd(); + rasterizer->ScopeMarkerEnd(true); } break; } @@ -395,6 +392,10 @@ Liverpool::Task Liverpool::ProcessGraphics(std::span dcb, std::span(header); regs.index_buffer_type.raw = index_type->raw; @@ -412,7 +413,7 @@ Liverpool::Task Liverpool::ProcessGraphics(std::span dcb, std::span(header); - rasterizer->ScopeMarkerBegin(fmt::format("dcb:{}:DrawIndex2", cmd_address)); + rasterizer->ScopeMarkerBegin(fmt::format("gfx:{}:DrawIndex2", cmd_address)); rasterizer->Draw(true); rasterizer->ScopeMarkerEnd(); } @@ -430,7 +431,7 @@ Liverpool::Task Liverpool::ProcessGraphics(std::span dcb, std::span(header); rasterizer->ScopeMarkerBegin( - fmt::format("dcb:{}:DrawIndexOffset2", cmd_address)); + fmt::format("gfx:{}:DrawIndexOffset2", cmd_address)); rasterizer->Draw(true, draw_index_off->index_offset); rasterizer->ScopeMarkerEnd(); } @@ -445,7 +446,7 @@ Liverpool::Task Liverpool::ProcessGraphics(std::span dcb, std::span(header); - rasterizer->ScopeMarkerBegin(fmt::format("dcb:{}:DrawIndexAuto", cmd_address)); + rasterizer->ScopeMarkerBegin(fmt::format("gfx:{}:DrawIndexAuto", cmd_address)); rasterizer->Draw(false); rasterizer->ScopeMarkerEnd(); } @@ -454,15 +455,14 @@ Liverpool::Task Liverpool::ProcessGraphics(std::span dcb, std::span(header); const auto offset = draw_indirect->data_offset; - const auto ib_address = mapped_queues[GfxQueueId].indirect_args_addr; const auto size = sizeof(DrawIndirectArgs); if (DebugState.DumpingCurrentReg()) { DebugState.PushRegsDump(base_addr, reinterpret_cast(header), regs); } if (rasterizer) { const auto cmd_address = reinterpret_cast(header); - rasterizer->ScopeMarkerBegin(fmt::format("dcb:{}:DrawIndirect", cmd_address)); - rasterizer->DrawIndirect(false, ib_address, offset, size, 1, 0); + rasterizer->ScopeMarkerBegin(fmt::format("gfx:{}:DrawIndirect", cmd_address)); + rasterizer->DrawIndirect(false, indirect_args_addr, offset, size, 1, 0); rasterizer->ScopeMarkerEnd(); } break; @@ -471,7 +471,6 @@ Liverpool::Task Liverpool::ProcessGraphics(std::span dcb, std::span(header); const auto offset = draw_index_indirect->data_offset; - const auto ib_address = mapped_queues[GfxQueueId].indirect_args_addr; const auto size = sizeof(DrawIndexedIndirectArgs); if (DebugState.DumpingCurrentReg()) { DebugState.PushRegsDump(base_addr, reinterpret_cast(header), regs); @@ -479,8 +478,8 @@ Liverpool::Task Liverpool::ProcessGraphics(std::span dcb, std::span(header); rasterizer->ScopeMarkerBegin( - fmt::format("dcb:{}:DrawIndexIndirect", cmd_address)); - rasterizer->DrawIndirect(true, ib_address, offset, size, 1, 0); + fmt::format("gfx:{}:DrawIndexIndirect", cmd_address)); + rasterizer->DrawIndirect(true, indirect_args_addr, offset, size, 1, 0); rasterizer->ScopeMarkerEnd(); } break; @@ -489,17 +488,16 @@ Liverpool::Task Liverpool::ProcessGraphics(std::span dcb, std::span(header); const auto offset = draw_index_indirect->data_offset; - const auto ib_address = mapped_queues[GfxQueueId].indirect_args_addr; if (DebugState.DumpingCurrentReg()) { DebugState.PushRegsDump(base_addr, reinterpret_cast(header), regs); } if (rasterizer) { const auto cmd_address = reinterpret_cast(header); rasterizer->ScopeMarkerBegin( - fmt::format("dcb:{}:DrawIndexIndirectCountMulti", cmd_address)); - rasterizer->DrawIndirect(true, ib_address, offset, draw_index_indirect->stride, - draw_index_indirect->count, - draw_index_indirect->countAddr); + fmt::format("gfx:{}:DrawIndexIndirectCountMulti", cmd_address)); + rasterizer->DrawIndirect( + true, indirect_args_addr, offset, draw_index_indirect->stride, + draw_index_indirect->count, draw_index_indirect->countAddr); rasterizer->ScopeMarkerEnd(); } break; @@ -517,7 +515,7 @@ Liverpool::Task Liverpool::ProcessGraphics(std::span dcb, std::span(header); - rasterizer->ScopeMarkerBegin(fmt::format("dcb:{}:Dispatch", cmd_address)); + rasterizer->ScopeMarkerBegin(fmt::format("gfx:{}:DispatchDirect", cmd_address)); rasterizer->DispatchDirect(); rasterizer->ScopeMarkerEnd(); } @@ -528,7 +526,6 @@ Liverpool::Task Liverpool::ProcessGraphics(std::span dcb, std::span(header); auto& cs_program = GetCsRegs(); const auto offset = dispatch_indirect->data_offset; - const auto ib_address = mapped_queues[GfxQueueId].indirect_args_addr; const auto size = sizeof(PM4CmdDispatchIndirect::GroupDimensions); if (DebugState.DumpingCurrentReg()) { DebugState.PushRegsDumpCompute(base_addr, reinterpret_cast(header), @@ -537,8 +534,8 @@ Liverpool::Task Liverpool::ProcessGraphics(std::span dcb, std::span(header); rasterizer->ScopeMarkerBegin( - fmt::format("dcb:{}:DispatchIndirect", cmd_address)); - rasterizer->DispatchIndirect(ib_address, offset, size); + fmt::format("gfx:{}:DispatchIndirect", cmd_address)); + rasterizer->DispatchIndirect(indirect_args_addr, offset, size); rasterizer->ScopeMarkerEnd(); } break; @@ -562,7 +559,7 @@ Liverpool::Task Liverpool::ProcessGraphics(std::span dcb, std::span(header); ASSERT(set_base->base_index == PM4CmdSetBase::BaseIndex::DrawIndexIndirPatchTable); - mapped_queues[GfxQueueId].indirect_args_addr = set_base->Address(); + indirect_args_addr = set_base->Address(); break; } case PM4ItOpcode::EventWrite: { @@ -605,20 +602,25 @@ Liverpool::Task Liverpool::ProcessGraphics(std::span dcb, std::spansrc_sel == DmaDataSrc::Data && dma_data->dst_sel == DmaDataDst::Gds) { rasterizer->InlineData(dma_data->dst_addr_lo, &dma_data->data, sizeof(u32), true); - } else if (dma_data->src_sel == DmaDataSrc::Memory && + } else if ((dma_data->src_sel == DmaDataSrc::Memory || + dma_data->src_sel == DmaDataSrc::MemoryUsingL2) && dma_data->dst_sel == DmaDataDst::Gds) { rasterizer->InlineData(dma_data->dst_addr_lo, dma_data->SrcAddress(), dma_data->NumBytes(), true); } else if (dma_data->src_sel == DmaDataSrc::Data && - dma_data->dst_sel == DmaDataDst::Memory) { + (dma_data->dst_sel == DmaDataDst::Memory || + dma_data->dst_sel == DmaDataDst::MemoryUsingL2)) { rasterizer->InlineData(dma_data->DstAddress(), &dma_data->data, sizeof(u32), false); } else if (dma_data->src_sel == DmaDataSrc::Gds && - dma_data->dst_sel == DmaDataDst::Memory) { + (dma_data->dst_sel == DmaDataDst::Memory || + dma_data->dst_sel == DmaDataDst::MemoryUsingL2)) { // LOG_WARNING(Render_Vulkan, "GDS memory read"); - } else if (dma_data->src_sel == DmaDataSrc::Memory && - dma_data->dst_sel == DmaDataDst::Memory) { + } else if ((dma_data->src_sel == DmaDataSrc::Memory || + dma_data->src_sel == DmaDataSrc::MemoryUsingL2) && + (dma_data->dst_sel == DmaDataDst::Memory || + dma_data->dst_sel == DmaDataDst::MemoryUsingL2)) { rasterizer->InlineData(dma_data->DstAddress(), dma_data->SrcAddress(), dma_data->NumBytes(), false); @@ -640,6 +642,18 @@ Liverpool::Task Liverpool::ProcessGraphics(std::span dcb, std::span(header); + if (mem_semaphore->IsSignaling()) { + mem_semaphore->Signal(); + } else { + while (!mem_semaphore->Signaled()) { + YIELD_GFX(); + } + mem_semaphore->Decrement(); + } + break; + } case PM4ItOpcode::AcquireMem: { // const auto* acquire_mem = reinterpret_cast(header); break; @@ -662,6 +676,7 @@ Liverpool::Task Liverpool::ProcessGraphics(std::span dcb, std::spanIsVoLabel(wait_addr) && num_submits == mapped_queues[GfxQueueId].submits.size()) { vo_port->WaitVoLabel([&] { return wait_reg_mem->Test(); }); + break; } while (!wait_reg_mem->Test()) { YIELD_GFX(); @@ -685,7 +700,7 @@ Liverpool::Task Liverpool::ProcessGraphics(std::span dcb, std::span dcb, std::span dcb, std::span -Liverpool::Task Liverpool::ProcessCompute(std::span acb, u32 vqid) { +Liverpool::Task Liverpool::ProcessCompute(const u32* acb, u32 acb_dwords, u32 vqid) { FIBER_ENTER(acb_task_name[vqid]); - const auto& queue = asc_queues[{vqid}]; + auto& queue = asc_queues[{vqid}]; - auto base_addr = reinterpret_cast(acb.data()); - while (!acb.empty()) { - const auto* header = reinterpret_cast(acb.data()); - const u32 type = header->type; - if (type != 3) { - // No other types of packets were spotted so far - UNREACHABLE_MSG("Invalid PM4 type {}", type); + auto base_addr = reinterpret_cast(acb); + while (acb_dwords > 0) { + auto* header = reinterpret_cast(acb); + u32 next_dw_off = header->type3.NumWords() + 1; + + // If we have a buffered packet, use it. + if (queue.tmp_dwords > 0) [[unlikely]] { + header = reinterpret_cast(queue.tmp_packet.data()); + next_dw_off = header->type3.NumWords() + 1 - queue.tmp_dwords; + std::memcpy(queue.tmp_packet.data() + queue.tmp_dwords, acb, next_dw_off * sizeof(u32)); + queue.tmp_dwords = 0; + } + + // If the packet is split across ring boundary, buffer until next submission + if (next_dw_off > acb_dwords) [[unlikely]] { + std::memcpy(queue.tmp_packet.data(), acb, acb_dwords * sizeof(u32)); + queue.tmp_dwords = acb_dwords; + if constexpr (!is_indirect) { + *queue.read_addr += acb_dwords; + *queue.read_addr %= queue.ring_size_dw; + } + break; + } + + if (header->type != 3) { + // No other types of packets were spotted so far + UNREACHABLE_MSG("Invalid PM4 type {}", header->type.Value()); } - const u32 count = header->type3.NumWords(); const PM4ItOpcode opcode = header->type3.opcode; const auto* it_body = reinterpret_cast(header) + 1; switch (opcode) { @@ -737,8 +773,8 @@ Liverpool::Task Liverpool::ProcessCompute(std::span acb, u32 vqid) { } case PM4ItOpcode::IndirectBuffer: { const auto* indirect_buffer = reinterpret_cast(header); - auto task = ProcessCompute( - {indirect_buffer->Address(), indirect_buffer->ib_size}, vqid); + auto task = ProcessCompute(indirect_buffer->Address(), + indirect_buffer->ib_size, vqid); RESUME_ASC(task, vqid); while (!task.handle.done()) { @@ -754,19 +790,24 @@ Liverpool::Task Liverpool::ProcessCompute(std::span acb, u32 vqid) { } if (dma_data->src_sel == DmaDataSrc::Data && dma_data->dst_sel == DmaDataDst::Gds) { rasterizer->InlineData(dma_data->dst_addr_lo, &dma_data->data, sizeof(u32), true); - } else if (dma_data->src_sel == DmaDataSrc::Memory && + } else if ((dma_data->src_sel == DmaDataSrc::Memory || + dma_data->src_sel == DmaDataSrc::MemoryUsingL2) && dma_data->dst_sel == DmaDataDst::Gds) { rasterizer->InlineData(dma_data->dst_addr_lo, dma_data->SrcAddress(), dma_data->NumBytes(), true); } else if (dma_data->src_sel == DmaDataSrc::Data && - dma_data->dst_sel == DmaDataDst::Memory) { + (dma_data->dst_sel == DmaDataDst::Memory || + dma_data->dst_sel == DmaDataDst::MemoryUsingL2)) { rasterizer->InlineData(dma_data->DstAddress(), &dma_data->data, sizeof(u32), false); } else if (dma_data->src_sel == DmaDataSrc::Gds && - dma_data->dst_sel == DmaDataDst::Memory) { + (dma_data->dst_sel == DmaDataDst::Memory || + dma_data->dst_sel == DmaDataDst::MemoryUsingL2)) { // LOG_WARNING(Render_Vulkan, "GDS memory read"); - } else if (dma_data->src_sel == DmaDataSrc::Memory && - dma_data->dst_sel == DmaDataDst::Memory) { + } else if ((dma_data->src_sel == DmaDataSrc::Memory || + dma_data->src_sel == DmaDataSrc::MemoryUsingL2) && + (dma_data->dst_sel == DmaDataDst::Memory || + dma_data->dst_sel == DmaDataDst::MemoryUsingL2)) { rasterizer->InlineData(dma_data->DstAddress(), dma_data->SrcAddress(), dma_data->NumBytes(), false); @@ -788,7 +829,7 @@ Liverpool::Task Liverpool::ProcessCompute(std::span acb, u32 vqid) { } case PM4ItOpcode::SetShReg: { const auto* set_data = reinterpret_cast(header); - const auto set_size = (count - 1) * sizeof(u32); + const auto set_size = (header->type3.NumWords() - 1) * sizeof(u32); if (set_data->reg_offset >= 0x200 && set_data->reg_offset <= (0x200 + sizeof(ComputeProgram) / 4)) { @@ -816,17 +857,17 @@ Liverpool::Task Liverpool::ProcessCompute(std::span acb, u32 vqid) { if (rasterizer && (cs_program.dispatch_initiator & 1)) { const auto cmd_address = reinterpret_cast(header); rasterizer->ScopeMarkerBegin( - fmt::format("acb[{}]:{}:DispatchIndirect", vqid, cmd_address)); + fmt::format("asc[{}]:{}:DispatchDirect", vqid, cmd_address)); rasterizer->DispatchDirect(); rasterizer->ScopeMarkerEnd(); } break; } case PM4ItOpcode::DispatchIndirect: { - const auto* dispatch_indirect = reinterpret_cast(header); + const auto* dispatch_indirect = + reinterpret_cast(header); auto& cs_program = GetCsRegs(); - const auto offset = dispatch_indirect->data_offset; - const auto ib_address = mapped_queues[vqid].indirect_args_addr; + const auto ib_address = dispatch_indirect->Address(); const auto size = sizeof(PM4CmdDispatchIndirect::GroupDimensions); if (DebugState.DumpingCurrentReg()) { DebugState.PushRegsDumpCompute(base_addr, reinterpret_cast(header), @@ -834,8 +875,9 @@ Liverpool::Task Liverpool::ProcessCompute(std::span acb, u32 vqid) { } if (rasterizer && (cs_program.dispatch_initiator & 1)) { const auto cmd_address = reinterpret_cast(header); - rasterizer->ScopeMarkerBegin(fmt::format("acb[{}]:{}:Dispatch", vqid, cmd_address)); - rasterizer->DispatchIndirect(ib_address, offset, size); + rasterizer->ScopeMarkerBegin( + fmt::format("asc[{}]:{}:DispatchIndirect", vqid, cmd_address)); + rasterizer->DispatchIndirect(ib_address, 0, size); rasterizer->ScopeMarkerEnd(); } break; @@ -851,6 +893,18 @@ Liverpool::Task Liverpool::ProcessCompute(std::span acb, u32 vqid) { } break; } + case PM4ItOpcode::MemSemaphore: { + const auto* mem_semaphore = reinterpret_cast(header); + if (mem_semaphore->IsSignaling()) { + mem_semaphore->Signal(); + } else { + while (!mem_semaphore->Signaled()) { + YIELD_ASC(vqid); + } + mem_semaphore->Decrement(); + } + break; + } case PM4ItOpcode::WaitRegMem: { const auto* wait_reg_mem = reinterpret_cast(header); ASSERT(wait_reg_mem->engine.Value() == PM4CmdWaitRegMem::Engine::Me); @@ -870,14 +924,14 @@ Liverpool::Task Liverpool::ProcessCompute(std::span acb, u32 vqid) { } default: UNREACHABLE_MSG("Unknown PM4 type 3 opcode {:#x} with count {}", - static_cast(opcode), count); + static_cast(opcode), header->type3.NumWords()); } - const auto packet_size_dw = header->type3.NumWords() + 1; - acb = NextPacket(acb, packet_size_dw); + acb += next_dw_off; + acb_dwords -= next_dw_off; if constexpr (!is_indirect) { - *queue.read_addr += packet_size_dw; + *queue.read_addr += next_dw_off; *queue.read_addr %= queue.ring_size_dw; } } @@ -944,7 +998,7 @@ void Liverpool::SubmitAsc(u32 gnm_vqid, std::span acb) { auto& queue = mapped_queues[gnm_vqid]; const auto vqid = gnm_vqid - 1; - const auto& task = ProcessCompute(acb, vqid); + const auto& task = ProcessCompute(acb.data(), acb.size(), vqid); { std::scoped_lock lock{queue.m_access}; queue.submits.emplace(task.handle); diff --git a/src/video_core/amdgpu/liverpool.h b/src/video_core/amdgpu/liverpool.h index d2d1aab3c..474c04ec2 100644 --- a/src/video_core/amdgpu/liverpool.h +++ b/src/video_core/amdgpu/liverpool.h @@ -20,9 +20,9 @@ #include "common/types.h" #include "common/unique_function.h" #include "shader_recompiler/params.h" -#include "types.h" #include "video_core/amdgpu/pixel_format.h" #include "video_core/amdgpu/resource.h" +#include "video_core/amdgpu/types.h" namespace Vulkan { class Rasterizer; @@ -83,8 +83,7 @@ struct Liverpool { u32 crc32; bool Valid() const { - return shader_hash && crc32 && - (std::memcmp(signature.data(), signature_ref, sizeof(signature_ref)) == 0); + return std::memcmp(signature.data(), signature_ref, sizeof(signature_ref)) == 0; } }; @@ -143,6 +142,11 @@ struct Liverpool { const u32 num_dwords = bininfo.length / sizeof(u32); return std::span{code, num_dwords}; } + + [[nodiscard]] u32 NumVgprs() const { + // Each increment allocates 4 registers, where 0 = 4 registers. + return (settings.num_vgprs + 1) * 4; + } }; struct HsTessFactorClamp { @@ -192,6 +196,10 @@ struct Liverpool { return settings.lds_dwords.Value() * 128 * 4; } + u32 NumWorkgroups() const noexcept { + return dim_x * dim_y * dim_z; + } + bool IsTgidEnabled(u32 i) const noexcept { return (settings.tgid_enable.Value() >> i) & 1; } @@ -266,6 +274,10 @@ struct Liverpool { BitField<20, 4, ShaderExportFormat> col5; BitField<24, 4, ShaderExportFormat> col6; BitField<28, 4, ShaderExportFormat> col7; + + [[nodiscard]] ShaderExportFormat GetFormat(const u32 buf_idx) const { + return static_cast((raw >> (buf_idx * 4)) & 0xfu); + } }; union VsOutputControl { @@ -429,11 +441,19 @@ struct Liverpool { } depth_slice; bool DepthValid() const { - return Address() != 0 && z_info.format != ZFormat::Invalid; + return DepthAddress() != 0 && z_info.format != ZFormat::Invalid; } bool StencilValid() const { - return Address() != 0 && stencil_info.format != StencilFormat::Invalid; + return StencilAddress() != 0 && stencil_info.format != StencilFormat::Invalid; + } + + bool DepthWriteValid() const { + return DepthWriteAddress() != 0 && z_info.format != ZFormat::Invalid; + } + + bool StencilWriteValid() const { + return StencilWriteAddress() != 0 && stencil_info.format != StencilFormat::Invalid; } u32 Pitch() const { @@ -444,7 +464,7 @@ struct Liverpool { return (depth_size.height_tile_max + 1) << 3; } - u64 Address() const { + u64 DepthAddress() const { return u64(z_read_base) << 8; } @@ -452,6 +472,14 @@ struct Liverpool { return u64(stencil_read_base) << 8; } + u64 DepthWriteAddress() const { + return u64(z_write_base) << 8; + } + + u64 StencilWriteAddress() const { + return u64(stencil_write_base) << 8; + } + u32 NumSamples() const { return 1u << z_info.num_samples; // spec doesn't say it is a log2 } @@ -814,7 +842,9 @@ struct Liverpool { BitField<26, 1, u32> fmask_compression_disable_ci; BitField<27, 1, u32> fmask_compress_1frag_only; BitField<28, 1, u32> dcc_enable; - BitField<29, 1, u32> cmask_addr_type; + BitField<29, 2, u32> cmask_addr_type; + /// Neo-mode only + BitField<31, 1, u32> alt_tile_mode; u32 u32all; } info; @@ -886,7 +916,7 @@ struct Liverpool { } bool IsTiled() const { - return !info.linear_general; + return GetTilingMode() != TilingMode::Display_Linear; } [[nodiscard]] DataFormat GetDataFmt() const { @@ -897,7 +927,12 @@ struct Liverpool { // There is a small difference between T# and CB number types, account for it. return RemapNumberFormat(info.number_type == NumberFormat::SnormNz ? NumberFormat::Srgb - : info.number_type.Value()); + : info.number_type.Value(), + info.format); + } + + [[nodiscard]] NumberConversion GetNumberConversion() const { + return MapNumberConversion(info.number_type); } [[nodiscard]] CompMapping Swizzle() const { @@ -936,7 +971,7 @@ struct Liverpool { const auto swap_idx = static_cast(info.comp_swap.Value()); const auto components_idx = NumComponents(info.format) - 1; const auto mrt_swizzle = mrt_swizzles[swap_idx][components_idx]; - return RemapComponents(info.format, mrt_swizzle); + return RemapSwizzle(info.format, mrt_swizzle); } }; @@ -1001,6 +1036,46 @@ struct Liverpool { } }; + enum class ForceEnable : u32 { + Off = 0, + Enable = 1, + Disable = 2, + }; + + enum class ForceSumm : u32 { + Off = 0, + MinZ = 1, + MaxZ = 2, + Both = 3, + }; + + union DepthRenderOverride { + u32 raw; + BitField<0, 2, ForceEnable> force_hiz_enable; + BitField<2, 2, ForceEnable> force_his_enable0; + BitField<4, 2, ForceEnable> force_his_enable1; + BitField<6, 1, u32> force_shader_z_order; + BitField<7, 1, u32> fast_z_disable; + BitField<8, 1, u32> fast_stencil_disable; + BitField<9, 1, u32> noop_cull_disable; + BitField<10, 1, u32> force_color_kill; + BitField<11, 1, u32> force_z_read; + BitField<12, 1, u32> force_stencil_read; + BitField<13, 2, ForceEnable> force_full_z_range; + BitField<15, 1, u32> force_qc_smask_conflict; + BitField<16, 1, u32> disable_viewport_clamp; + BitField<17, 1, u32> ignore_sc_zrange; + BitField<18, 1, u32> disable_fully_covered; + BitField<19, 2, ForceSumm> force_z_limit_summ; + BitField<21, 5, u32> max_tiles_in_dtt; + BitField<26, 1, u32> disable_tile_rate_tiles; + BitField<27, 1, u32> force_z_dirty; + BitField<28, 1, u32> force_stencil_dirty; + BitField<29, 1, u32> force_z_valid; + BitField<30, 1, u32> force_stencil_valid; + BitField<31, 1, u32> preserve_compression; + }; + union AaConfig { BitField<0, 3, u32> msaa_num_samples; BitField<4, 1, u32> aa_mask_centroid_dtmn; @@ -1202,7 +1277,8 @@ struct Liverpool { DepthRenderControl depth_render_control; INSERT_PADDING_WORDS(1); DepthView depth_view; - INSERT_PADDING_WORDS(2); + DepthRenderOverride depth_render_override; + INSERT_PADDING_WORDS(1); Address depth_htile_data_base; INSERT_PADDING_WORDS(2); float depth_bounds_min; @@ -1420,10 +1496,13 @@ public: } struct AscQueueInfo { + static constexpr size_t Pm4BufferSize = 1024; VAddr map_addr; u32* read_addr; u32 ring_size_dw; u32 pipe_id; + std::array tmp_packet; + u32 tmp_dwords; }; Common::SlotVector asc_queues{}; @@ -1465,7 +1544,7 @@ private: Task ProcessGraphics(std::span dcb, std::span ccb); Task ProcessCeUpdate(std::span ccb); template - Task ProcessCompute(std::span acb, u32 vqid); + Task ProcessCompute(const u32* acb, u32 acb_dwords, u32 vqid); void Process(std::stop_token stoken); @@ -1477,11 +1556,12 @@ private: std::vector ccb_buffer; std::queue submits{}; ComputeProgram cs_state{}; - VAddr indirect_args_addr{}; }; std::array mapped_queues{}; u32 num_mapped_queues{1u}; // GFX is always available + VAddr indirect_args_addr{}; + struct ConstantEngine { void Reset() { ce_count = 0; diff --git a/src/video_core/amdgpu/pixel_format.cpp b/src/video_core/amdgpu/pixel_format.cpp index b13fc2d11..881c33e44 100644 --- a/src/video_core/amdgpu/pixel_format.cpp +++ b/src/video_core/amdgpu/pixel_format.cpp @@ -100,7 +100,7 @@ std::string_view NameOf(NumberFormat fmt) { return "Srgb"; case NumberFormat::Ubnorm: return "Ubnorm"; - case NumberFormat::UbnromNz: + case NumberFormat::UbnormNz: return "UbnormNz"; case NumberFormat::Ubint: return "Ubint"; diff --git a/src/video_core/amdgpu/pm4_cmds.h b/src/video_core/amdgpu/pm4_cmds.h index 238e09fad..ae1d32e00 100644 --- a/src/video_core/amdgpu/pm4_cmds.h +++ b/src/video_core/amdgpu/pm4_cmds.h @@ -204,6 +204,11 @@ struct PM4CmdSetData { static constexpr u32* SetShReg(u32* cmdbuf, Args... data) { return WritePacket(cmdbuf, type, data...); } + + template + static constexpr u32* SetUconfigReg(u32* cmdbuf, Args... data) { + return WritePacket(cmdbuf, type, data...); + } }; struct PM4CmdNop { @@ -372,12 +377,14 @@ struct PM4CmdAcquireMem { enum class DmaDataDst : u32 { Memory = 0, Gds = 1, + MemoryUsingL2 = 3, }; enum class DmaDataSrc : u32 { Memory = 0, Gds = 1, Data = 2, + MemoryUsingL2 = 3, }; struct PM4DmaData { @@ -791,6 +798,18 @@ struct PM4CmdDispatchIndirect { u32 dispatch_initiator; ///< Dispatch Initiator Register }; +struct PM4CmdDispatchIndirectMec { + PM4Type3Header header; + u32 address0; + u32 address1; + u32 dispatch_initiator; ///< Dispatch Initiator Register + + template + T Address() const { + return std::bit_cast(address0 | (u64(address1 & 0xffff) << 32u)); + } +}; + struct DrawIndirectArgs { u32 vertex_count_per_instance; u32 instance_count; @@ -867,4 +886,65 @@ struct PM4CmdDrawIndexIndirectMulti { u32 draw_initiator; ///< Draw Initiator Register }; +struct PM4CmdMemSemaphore { + enum class ClientCode : u32 { + CommandProcessor = 0u, + CommandBuffer = 1u, + DataBuffer = 2u, + }; + enum class Select : u32 { + SignalSemaphore = 6u, + WaitSemaphore = 7u, + }; + enum class SignalType : u32 { + Increment = 0u, + Write = 1u, + }; + + PM4Type3Header header; ///< header + union { + u32 dw1; + BitField<3, 29, u32> addr_lo; ///< Semaphore address bits [31:3] + }; + union { + u32 dw2; + BitField<0, 8, u32> addr_hi; ///< Semaphore address bits [39:32] + BitField<16, 1, u32> use_mailbox; ///< Enables waiting until mailbox is written to + BitField<20, 1, SignalType> signal_type; ///< Indicates the type of signal sent + BitField<24, 2, ClientCode> client_code; + BitField<29, 3, Select> sem_sel; ///< Indicates whether to do a signal or wait operation + }; + + template + [[nodiscard]] T Address() const { + return std::bit_cast(u64(addr_lo) << 3 | (u64(addr_hi) << 32)); + } + + [[nodiscard]] bool IsSignaling() const { + return sem_sel == Select::SignalSemaphore; + } + + [[nodiscard]] bool Signaled() const { + return *Address() > 0; + } + + void Decrement() const { + *Address() -= 1; + } + + void Signal() const { + auto* ptr = Address(); + switch (signal_type) { + case SignalType::Increment: + *ptr += 1; + break; + case SignalType::Write: + *ptr = 1; + break; + default: + UNREACHABLE_MSG("Unknown signal type {}", static_cast(signal_type.Value())); + } + } +}; + } // namespace AmdGpu diff --git a/src/video_core/amdgpu/resource.h b/src/video_core/amdgpu/resource.h index 208f7f380..64a85c812 100644 --- a/src/video_core/amdgpu/resource.h +++ b/src/video_core/amdgpu/resource.h @@ -11,96 +11,6 @@ namespace AmdGpu { -enum class CompSwizzle : u32 { - Zero = 0, - One = 1, - Red = 4, - Green = 5, - Blue = 6, - Alpha = 7, -}; - -struct CompMapping { - CompSwizzle r : 3; - CompSwizzle g : 3; - CompSwizzle b : 3; - CompSwizzle a : 3; - - auto operator<=>(const CompMapping& other) const = default; - - template - [[nodiscard]] std::array Apply(const std::array& data) const { - return { - ApplySingle(data, r), - ApplySingle(data, g), - ApplySingle(data, b), - ApplySingle(data, a), - }; - } - -private: - template - T ApplySingle(const std::array& data, const CompSwizzle swizzle) const { - switch (swizzle) { - case CompSwizzle::Zero: - return T(0); - case CompSwizzle::One: - return T(1); - case CompSwizzle::Red: - return data[0]; - case CompSwizzle::Green: - return data[1]; - case CompSwizzle::Blue: - return data[2]; - case CompSwizzle::Alpha: - return data[3]; - default: - UNREACHABLE(); - } - } -}; - -inline DataFormat RemapDataFormat(const DataFormat format) { - switch (format) { - case DataFormat::Format11_11_10: - return DataFormat::Format10_11_11; - case DataFormat::Format10_10_10_2: - return DataFormat::Format2_10_10_10; - case DataFormat::Format5_5_5_1: - return DataFormat::Format1_5_5_5; - default: - return format; - } -} - -inline NumberFormat RemapNumberFormat(const NumberFormat format) { - return format; -} - -inline CompMapping RemapComponents(const DataFormat format, const CompMapping components) { - switch (format) { - case DataFormat::Format11_11_10: { - CompMapping result; - result.r = components.b; - result.g = components.g; - result.b = components.r; - result.a = components.a; - return result; - } - case DataFormat::Format10_10_10_2: - case DataFormat::Format5_5_5_1: { - CompMapping result; - result.r = components.a; - result.g = components.b; - result.b = components.g; - result.a = components.r; - return result; - } - default: - return components; - } -} - // Table 8.5 Buffer Resource Descriptor [Sea Islands Series Instruction Set Architecture] struct Buffer { u64 base_address : 44; @@ -121,6 +31,12 @@ struct Buffer { u32 _padding1 : 6; u32 type : 2; // overlaps with T# type, so should be 0 for buffer + static constexpr Buffer Null() { + Buffer buffer{}; + buffer.base_address = 1; + return buffer; + } + bool Valid() const { return type == 0u; } @@ -140,17 +56,21 @@ struct Buffer { .b = CompSwizzle(dst_sel_z), .a = CompSwizzle(dst_sel_w), }; - return RemapComponents(DataFormat(data_format), dst_sel); + return RemapSwizzle(DataFormat(data_format), dst_sel); } NumberFormat GetNumberFmt() const noexcept { - return RemapNumberFormat(NumberFormat(num_format)); + return RemapNumberFormat(NumberFormat(num_format), DataFormat(data_format)); } DataFormat GetDataFmt() const noexcept { return RemapDataFormat(DataFormat(data_format)); } + NumberConversion GetNumberConversion() const noexcept { + return MapNumberConversion(NumberFormat(num_format)); + } + u32 GetStride() const noexcept { return stride; } @@ -162,6 +82,16 @@ struct Buffer { u32 GetSize() const noexcept { return stride == 0 ? num_records : (stride * num_records); } + + u32 GetIndexStride() const noexcept { + // Index stride is 2 bits, meaning 8, 16, 32, or 64. + return 8 << index_stride; + } + + u32 GetElementSize() const noexcept { + // Element size is 2 bits, meaning 2, 4, 8, or 16. + return 2 << element_size; + } }; static_assert(sizeof(Buffer) == 16); // 128bits @@ -205,6 +135,7 @@ constexpr std::string_view NameOf(ImageType type) { enum class TilingMode : u32 { Depth_MacroTiled = 0u, Display_Linear = 0x8u, + Display_MicroTiled = 0x9u, Display_MacroTiled = 0xAu, Texture_MicroTiled = 0xDu, Texture_MacroTiled = 0xEu, @@ -217,6 +148,8 @@ constexpr std::string_view NameOf(TilingMode type) { return "Depth_MacroTiled"; case TilingMode::Display_Linear: return "Display_Linear"; + case TilingMode::Display_MicroTiled: + return "Display_MicroTiled"; case TilingMode::Display_MacroTiled: return "Display_MacroTiled"; case TilingMode::Texture_MicroTiled: @@ -263,7 +196,15 @@ struct Image { u64 min_lod_warn : 12; u64 counter_bank_id : 8; u64 lod_hw_cnt_en : 1; - u64 : 43; + /// Neo-mode only + u64 compression_en : 1; + /// Neo-mode only + u64 alpha_is_on_msb : 1; + /// Neo-mode only + u64 color_transform : 1; + /// Neo-mode only + u64 alt_tile_mode : 1; + u64 : 39; static constexpr Image Null() { Image image{}; @@ -297,22 +238,22 @@ struct Image { .b = CompSwizzle(dst_sel_z), .a = CompSwizzle(dst_sel_w), }; - return RemapComponents(DataFormat(data_format), dst_sel); + return RemapSwizzle(DataFormat(data_format), dst_sel); } u32 Pitch() const { return pitch + 1; } - u32 NumLayers(bool is_array) const { - u32 slices = GetType() == ImageType::Color3D ? 1 : depth + 1; - if (GetType() == ImageType::Cube) { - if (is_array) { - slices = last_array + 1; - ASSERT(slices % 6 == 0); - } else { - slices = 6; - } + [[nodiscard]] u32 NumLayers() const noexcept { + // Depth is the number of layers for Array images. + u32 slices = depth + 1; + if (GetType() == ImageType::Color3D) { + // Depth is the actual texture depth for 3D images. + slices = 1; + } else if (IsCube()) { + // Depth is the number of full cubes for Cube images. + slices *= 6; } if (pow2pad) { slices = std::bit_ceil(slices); @@ -334,8 +275,12 @@ struct Image { return 1; } + bool IsCube() const noexcept { + return static_cast(type) == ImageType::Cube; + } + ImageType GetType() const noexcept { - return static_cast(type); + return IsCube() ? ImageType::Color2DArray : static_cast(type); } DataFormat GetDataFmt() const noexcept { @@ -343,7 +288,11 @@ struct Image { } NumberFormat GetNumberFmt() const noexcept { - return RemapNumberFormat(NumberFormat(num_format)); + return RemapNumberFormat(NumberFormat(num_format), DataFormat(data_format)); + } + + NumberConversion GetNumberConversion() const noexcept { + return MapNumberConversion(NumberFormat(num_format)); } TilingMode GetTilingMode() const { @@ -363,13 +312,48 @@ struct Image { GetDataFmt() <= DataFormat::FormatFmask64_8; } - bool IsPartialCubemap() const { - const auto viewed_slice = last_array - base_array + 1; - return GetType() == ImageType::Cube && viewed_slice < 6; + [[nodiscard]] ImageType GetViewType(const bool is_array) const noexcept { + const auto base_type = GetType(); + if (IsCube()) { + // Cube needs to remain array type regardless of instruction array specifier. + return base_type; + } + if (base_type == ImageType::Color1DArray && !is_array) { + return ImageType::Color1D; + } + if (base_type == ImageType::Color2DArray && !is_array) { + return ImageType::Color2D; + } + if (base_type == ImageType::Color2DMsaaArray && !is_array) { + return ImageType::Color2DMsaa; + } + return base_type; } - ImageType GetBoundType() const noexcept { - return IsPartialCubemap() ? ImageType::Color2DArray : GetType(); + [[nodiscard]] u32 NumViewLevels(const bool is_array) const noexcept { + switch (GetViewType(is_array)) { + case ImageType::Color2DMsaa: + case ImageType::Color2DMsaaArray: + return 1; + default: + // Constrain to actual number of available levels. + const auto max_level = std::min(last_level + 1, NumLevels()); + return max_level > base_level ? max_level - base_level : 1; + } + } + + [[nodiscard]] u32 NumViewLayers(const bool is_array) const noexcept { + switch (GetViewType(is_array)) { + case ImageType::Color1D: + case ImageType::Color2D: + case ImageType::Color2DMsaa: + case ImageType::Color3D: + return 1; + default: + // Constrain to actual number of available layers. + const auto max_array = std::min(last_array + 1, NumLayers()); + return max_array > base_array ? max_array - base_array : 1; + } } }; static_assert(sizeof(Image) == 32); // 256bits diff --git a/src/video_core/amdgpu/types.h b/src/video_core/amdgpu/types.h index fa8491665..d1cf19076 100644 --- a/src/video_core/amdgpu/types.h +++ b/src/video_core/amdgpu/types.h @@ -5,6 +5,7 @@ #include #include +#include "common/assert.h" #include "common/types.h" namespace AmdGpu { @@ -177,11 +178,177 @@ enum class NumberFormat : u32 { Float = 7, Srgb = 9, Ubnorm = 10, - UbnromNz = 11, + UbnormNz = 11, Ubint = 12, Ubscaled = 13, }; +enum class CompSwizzle : u8 { + Zero = 0, + One = 1, + Red = 4, + Green = 5, + Blue = 6, + Alpha = 7, +}; + +enum class NumberConversion : u32 { + None = 0, + UintToUscaled = 1, + SintToSscaled = 2, + UnormToUbnorm = 3, +}; + +struct CompMapping { + CompSwizzle r; + CompSwizzle g; + CompSwizzle b; + CompSwizzle a; + + auto operator<=>(const CompMapping& other) const = default; + + template + [[nodiscard]] std::array Apply(const std::array& data) const { + return { + ApplySingle(data, r), + ApplySingle(data, g), + ApplySingle(data, b), + ApplySingle(data, a), + }; + } + + [[nodiscard]] CompMapping Inverse() const { + CompMapping result{}; + InverseSingle(result.r, CompSwizzle::Red); + InverseSingle(result.g, CompSwizzle::Green); + InverseSingle(result.b, CompSwizzle::Blue); + InverseSingle(result.a, CompSwizzle::Alpha); + return result; + } + +private: + template + T ApplySingle(const std::array& data, const CompSwizzle swizzle) const { + switch (swizzle) { + case CompSwizzle::Zero: + return T(0); + case CompSwizzle::One: + return T(1); + case CompSwizzle::Red: + return data[0]; + case CompSwizzle::Green: + return data[1]; + case CompSwizzle::Blue: + return data[2]; + case CompSwizzle::Alpha: + return data[3]; + default: + UNREACHABLE(); + } + } + + void InverseSingle(CompSwizzle& dst, const CompSwizzle target) const { + if (r == target) { + dst = CompSwizzle::Red; + } else if (g == target) { + dst = CompSwizzle::Green; + } else if (b == target) { + dst = CompSwizzle::Blue; + } else if (a == target) { + dst = CompSwizzle::Alpha; + } else { + dst = CompSwizzle::Zero; + } + } +}; + +static constexpr CompMapping IdentityMapping = { + .r = CompSwizzle::Red, + .g = CompSwizzle::Green, + .b = CompSwizzle::Blue, + .a = CompSwizzle::Alpha, +}; + +inline DataFormat RemapDataFormat(const DataFormat format) { + switch (format) { + case DataFormat::Format11_11_10: + return DataFormat::Format10_11_11; + case DataFormat::Format10_10_10_2: + return DataFormat::Format2_10_10_10; + case DataFormat::Format5_5_5_1: + return DataFormat::Format1_5_5_5; + default: + return format; + } +} + +inline NumberFormat RemapNumberFormat(const NumberFormat format, const DataFormat data_format) { + switch (format) { + case NumberFormat::Uscaled: + return NumberFormat::Uint; + case NumberFormat::Sscaled: + return NumberFormat::Sint; + case NumberFormat::Ubnorm: + return NumberFormat::Unorm; + case NumberFormat::Float: + if (data_format == DataFormat::Format8) { + // Games may ask for 8-bit float when they want to access the stencil component + // of a depth-stencil image. Change to unsigned int to match the stencil format. + // This is also the closest approximation to pass the bits through unconverted. + return NumberFormat::Uint; + } + [[fallthrough]]; + default: + return format; + } +} + +inline CompMapping RemapSwizzle(const DataFormat format, const CompMapping swizzle) { + switch (format) { + case DataFormat::Format1_5_5_5: + case DataFormat::Format11_11_10: { + CompMapping result; + result.r = swizzle.b; + result.g = swizzle.g; + result.b = swizzle.r; + result.a = swizzle.a; + return result; + } + case DataFormat::Format10_10_10_2: { + CompMapping result; + result.r = swizzle.a; + result.g = swizzle.b; + result.b = swizzle.g; + result.a = swizzle.r; + return result; + } + case DataFormat::Format4_4_4_4: { + // Remap to a more supported component order. + CompMapping result; + result.r = swizzle.g; + result.g = swizzle.b; + result.b = swizzle.a; + result.a = swizzle.r; + return result; + } + default: + return swizzle; + } +} + +inline NumberConversion MapNumberConversion(const NumberFormat format) { + switch (format) { + case NumberFormat::Uscaled: + return NumberConversion::UintToUscaled; + case NumberFormat::Sscaled: + return NumberConversion::SintToSscaled; + case NumberFormat::Ubnorm: + return NumberConversion::UnormToUbnorm; + default: + return NumberConversion::None; + } +} + } // namespace AmdGpu template <> diff --git a/src/video_core/buffer_cache/buffer.cpp b/src/video_core/buffer_cache/buffer.cpp index 5a049c185..15ef746cd 100644 --- a/src/video_core/buffer_cache/buffer.cpp +++ b/src/video_core/buffer_cache/buffer.cpp @@ -95,8 +95,7 @@ Buffer::Buffer(const Vulkan::Instance& instance_, Vulkan::Scheduler& scheduler_, // Create buffer object. const vk::BufferCreateInfo buffer_ci = { .size = size_bytes, - // When maintenance5 is not supported, use all flags since we can't add flags to views. - .usage = instance->IsMaintenance5Supported() ? flags : AllFlags, + .usage = flags, }; VmaAllocationInfo alloc_info{}; buffer.Create(buffer_ci, usage, &alloc_info); @@ -113,27 +112,6 @@ Buffer::Buffer(const Vulkan::Instance& instance_, Vulkan::Scheduler& scheduler_, is_coherent = property_flags & VK_MEMORY_PROPERTY_HOST_COHERENT_BIT; } -vk::BufferView Buffer::View(u32 offset, u32 size, bool is_written, AmdGpu::DataFormat dfmt, - AmdGpu::NumberFormat nfmt) { - const vk::BufferUsageFlags2CreateInfoKHR usage_flags = { - .usage = is_written ? vk::BufferUsageFlagBits2KHR::eStorageTexelBuffer - : vk::BufferUsageFlagBits2KHR::eUniformTexelBuffer, - }; - const vk::BufferViewCreateInfo view_ci = { - .pNext = instance->IsMaintenance5Supported() ? &usage_flags : nullptr, - .buffer = buffer.buffer, - .format = Vulkan::LiverpoolToVK::SurfaceFormat(dfmt, nfmt), - .offset = offset, - .range = size, - }; - const auto [view_result, view] = instance->GetDevice().createBufferView(view_ci); - ASSERT_MSG(view_result == vk::Result::eSuccess, "Failed to create buffer view: {}", - vk::to_string(view_result)); - scheduler->DeferOperation( - [view, device = instance->GetDevice()] { device.destroyBufferView(view); }); - return view; -} - constexpr u64 WATCHES_INITIAL_RESERVE = 0x4000; constexpr u64 WATCHES_RESERVE_CHUNK = 0x1000; diff --git a/src/video_core/buffer_cache/buffer.h b/src/video_core/buffer_cache/buffer.h index feeafd9bd..188b4b2ca 100644 --- a/src/video_core/buffer_cache/buffer.h +++ b/src/video_core/buffer_cache/buffer.h @@ -32,13 +32,12 @@ enum class MemoryUsage { }; constexpr vk::BufferUsageFlags ReadFlags = - vk::BufferUsageFlagBits::eTransferSrc | vk::BufferUsageFlagBits::eUniformTexelBuffer | - vk::BufferUsageFlagBits::eUniformBuffer | vk::BufferUsageFlagBits::eIndexBuffer | - vk::BufferUsageFlagBits::eVertexBuffer | vk::BufferUsageFlagBits::eIndirectBuffer; + vk::BufferUsageFlagBits::eTransferSrc | vk::BufferUsageFlagBits::eUniformBuffer | + vk::BufferUsageFlagBits::eIndexBuffer | vk::BufferUsageFlagBits::eVertexBuffer | + vk::BufferUsageFlagBits::eIndirectBuffer; -constexpr vk::BufferUsageFlags AllFlags = ReadFlags | vk::BufferUsageFlagBits::eTransferDst | - vk::BufferUsageFlagBits::eStorageTexelBuffer | - vk::BufferUsageFlagBits::eStorageBuffer; +constexpr vk::BufferUsageFlags AllFlags = + ReadFlags | vk::BufferUsageFlagBits::eTransferDst | vk::BufferUsageFlagBits::eStorageBuffer; struct UniqueBuffer { explicit UniqueBuffer(vk::Device device, VmaAllocator allocator); @@ -83,9 +82,6 @@ public: Buffer& operator=(Buffer&&) = default; Buffer(Buffer&&) = default; - vk::BufferView View(u32 offset, u32 size, bool is_written, AmdGpu::DataFormat dfmt, - AmdGpu::NumberFormat nfmt); - /// Increases the likeliness of this being a stream buffer void IncreaseStreamScore(int score) noexcept { stream_score += score; @@ -119,19 +115,23 @@ public: return buffer; } - std::optional GetBarrier(vk::AccessFlagBits2 dst_acess_mask, - vk::PipelineStageFlagBits2 dst_stage) { + std::optional GetBarrier( + vk::Flags dst_acess_mask, vk::PipelineStageFlagBits2 dst_stage, + u32 offset = 0) { if (dst_acess_mask == access_mask && stage == dst_stage) { return {}; } + DEBUG_ASSERT(offset < size_bytes); + auto barrier = vk::BufferMemoryBarrier2{ .srcStageMask = stage, .srcAccessMask = access_mask, .dstStageMask = dst_stage, .dstAccessMask = dst_acess_mask, .buffer = buffer.buffer, - .size = size_bytes, + .offset = offset, + .size = size_bytes - offset, }; access_mask = dst_acess_mask; stage = dst_stage; @@ -150,8 +150,10 @@ public: Vulkan::Scheduler* scheduler; MemoryUsage usage; UniqueBuffer buffer; - vk::AccessFlagBits2 access_mask{vk::AccessFlagBits2::eNone}; - vk::PipelineStageFlagBits2 stage{vk::PipelineStageFlagBits2::eNone}; + vk::Flags access_mask{ + vk::AccessFlagBits2::eMemoryRead | vk::AccessFlagBits2::eMemoryWrite | + vk::AccessFlagBits2::eTransferRead | vk::AccessFlagBits2::eTransferWrite}; + vk::PipelineStageFlagBits2 stage{vk::PipelineStageFlagBits2::eAllCommands}; }; class StreamBuffer : public Buffer { @@ -166,7 +168,7 @@ public: void Commit(); /// Maps and commits a memory region with user provided data - u64 Copy(VAddr src, size_t size, size_t alignment = 0) { + u64 Copy(auto src, size_t size, size_t alignment = 0) { const auto [data, offset] = Map(size, alignment); std::memcpy(data, reinterpret_cast(src), size); Commit(); diff --git a/src/video_core/buffer_cache/buffer_cache.cpp b/src/video_core/buffer_cache/buffer_cache.cpp index 3e43b4fbc..cdf736a89 100644 --- a/src/video_core/buffer_cache/buffer_cache.cpp +++ b/src/video_core/buffer_cache/buffer_cache.cpp @@ -5,21 +5,18 @@ #include "common/alignment.h" #include "common/scope_exit.h" #include "common/types.h" -#include "shader_recompiler/frontend/fetch_shader.h" -#include "shader_recompiler/info.h" #include "video_core/amdgpu/liverpool.h" #include "video_core/buffer_cache/buffer_cache.h" -#include "video_core/renderer_vulkan/liverpool_to_vk.h" +#include "video_core/renderer_vulkan/vk_graphics_pipeline.h" #include "video_core/renderer_vulkan/vk_instance.h" #include "video_core/renderer_vulkan/vk_scheduler.h" #include "video_core/texture_cache/texture_cache.h" namespace VideoCore { -static constexpr size_t NumVertexBuffers = 32; -static constexpr size_t GdsBufferSize = 64_KB; -static constexpr size_t StagingBufferSize = 1_GB; -static constexpr size_t UboStreamBufferSize = 64_MB; +static constexpr size_t DataShareBufferSize = 64_KB; +static constexpr size_t StagingBufferSize = 512_MB; +static constexpr size_t UboStreamBufferSize = 128_MB; BufferCache::BufferCache(const Vulkan::Instance& instance_, Vulkan::Scheduler& scheduler_, AmdGpu::Liverpool* liverpool_, TextureCache& texture_cache_, @@ -28,27 +25,16 @@ BufferCache::BufferCache(const Vulkan::Instance& instance_, Vulkan::Scheduler& s texture_cache{texture_cache_}, tracker{tracker_}, staging_buffer{instance, scheduler, MemoryUsage::Upload, StagingBufferSize}, stream_buffer{instance, scheduler, MemoryUsage::Stream, UboStreamBufferSize}, - gds_buffer{instance, scheduler, MemoryUsage::Stream, 0, AllFlags, GdsBufferSize}, + gds_buffer{instance, scheduler, MemoryUsage::Stream, 0, AllFlags, DataShareBufferSize}, memory_tracker{&tracker} { Vulkan::SetObjectName(instance.GetDevice(), gds_buffer.Handle(), "GDS Buffer"); // Ensure the first slot is used for the null buffer const auto null_id = - slot_buffers.insert(instance, scheduler, MemoryUsage::DeviceLocal, 0, ReadFlags, 1); + slot_buffers.insert(instance, scheduler, MemoryUsage::DeviceLocal, 0, AllFlags, 16); ASSERT(null_id.index == 0); const vk::Buffer& null_buffer = slot_buffers[null_id].buffer; Vulkan::SetObjectName(instance.GetDevice(), null_buffer, "Null Buffer"); - - const vk::BufferViewCreateInfo null_view_ci = { - .buffer = null_buffer, - .format = vk::Format::eR8Unorm, - .offset = 0, - .range = VK_WHOLE_SIZE, - }; - const auto [null_view_result, null_view] = instance.GetDevice().createBufferView(null_view_ci); - ASSERT_MSG(null_view_result == vk::Result::eSuccess, "Failed to create null buffer view."); - null_buffer_view = null_view; - Vulkan::SetObjectName(instance.GetDevice(), null_buffer_view, "Null Buffer View"); } BufferCache::~BufferCache() = default; @@ -100,35 +86,22 @@ void BufferCache::DownloadBufferMemory(Buffer& buffer, VAddr device_addr, u64 si } } -bool BufferCache::BindVertexBuffers( - const Shader::Info& vs_info, const std::optional& fetch_shader) { - boost::container::small_vector attributes; - boost::container::small_vector bindings; - SCOPE_EXIT { - if (instance.IsVertexInputDynamicState()) { - const auto cmdbuf = scheduler.CommandBuffer(); - cmdbuf.setVertexInputEXT(bindings, attributes); - } else if (bindings.empty()) { - // Required to call bindVertexBuffers2EXT at least once in the current command buffer - // with non-null strides without a non-dynamic stride pipeline in between. Thus even - // when nothing is bound we still need to make a dummy call. Non-null strides in turn - // requires a count greater than 0. - const auto cmdbuf = scheduler.CommandBuffer(); - const std::array null_buffers = {GetBuffer(NULL_BUFFER_ID).buffer.buffer}; - constexpr std::array null_offsets = {static_cast(0)}; - cmdbuf.bindVertexBuffers2EXT(0, null_buffers, null_offsets, null_offsets, null_offsets); - } - }; +void BufferCache::BindVertexBuffers(const Vulkan::GraphicsPipeline& pipeline) { + Vulkan::VertexInputs attributes; + Vulkan::VertexInputs bindings; + Vulkan::VertexInputs guest_buffers; + pipeline.GetVertexInputs(attributes, bindings, guest_buffers); - if (!fetch_shader || fetch_shader->attributes.empty()) { - return false; + if (instance.IsVertexInputDynamicState()) { + // Update current vertex inputs. + const auto cmdbuf = scheduler.CommandBuffer(); + cmdbuf.setVertexInputEXT(bindings, attributes); } - std::array host_buffers; - std::array host_offsets; - std::array host_sizes; - std::array host_strides; - boost::container::static_vector guest_buffers; + if (bindings.empty()) { + // If there are no bindings, there is nothing further to do. + return; + } struct BufferRange { VAddr base_address; @@ -136,61 +109,37 @@ bool BufferCache::BindVertexBuffers( vk::Buffer vk_buffer; u64 offset; - size_t GetSize() const { + [[nodiscard]] size_t GetSize() const { return end_address - base_address; } }; - // Calculate buffers memory overlaps - bool has_step_rate = false; - boost::container::static_vector ranges{}; - for (const auto& attrib : fetch_shader->attributes) { - if (attrib.UsesStepRates()) { - has_step_rate = true; - continue; + // Build list of ranges covering the requested buffers + Vulkan::VertexInputs ranges{}; + for (const auto& buffer : guest_buffers) { + if (buffer.GetSize() > 0) { + ranges.emplace_back(buffer.base_address, buffer.base_address + buffer.GetSize()); } + } - const auto& buffer = attrib.GetSharp(vs_info); - if (buffer.GetSize() == 0) { - continue; - } - guest_buffers.emplace_back(buffer); - ranges.emplace_back(buffer.base_address, buffer.base_address + buffer.GetSize()); - attributes.push_back({ - .location = attrib.semantic, - .binding = attrib.semantic, - .format = - Vulkan::LiverpoolToVK::SurfaceFormat(buffer.GetDataFmt(), buffer.GetNumberFmt()), - .offset = 0, + // Merge connecting ranges together + Vulkan::VertexInputs ranges_merged{}; + if (!ranges.empty()) { + std::ranges::sort(ranges, [](const BufferRange& lhv, const BufferRange& rhv) { + return lhv.base_address < rhv.base_address; }); - bindings.push_back({ - .binding = attrib.semantic, - .stride = buffer.GetStride(), - .inputRate = attrib.GetStepRate() == Shader::Gcn::VertexAttribute::InstanceIdType::None - ? vk::VertexInputRate::eVertex - : vk::VertexInputRate::eInstance, - .divisor = 1, - }); - } - if (ranges.empty()) { - return false; - } - - std::ranges::sort(ranges, [](const BufferRange& lhv, const BufferRange& rhv) { - return lhv.base_address < rhv.base_address; - }); - - boost::container::static_vector ranges_merged{ranges[0]}; - for (auto range : ranges) { - auto& prev_range = ranges_merged.back(); - if (prev_range.end_address < range.base_address) { - ranges_merged.emplace_back(range); - } else { - prev_range.end_address = std::max(prev_range.end_address, range.end_address); + ranges_merged.emplace_back(ranges[0]); + for (auto range : ranges) { + auto& prev_range = ranges_merged.back(); + if (prev_range.end_address < range.base_address) { + ranges_merged.emplace_back(range); + } else { + prev_range.end_address = std::max(prev_range.end_address, range.end_address); + } } } - // Map buffers + // Map buffers for merged ranges for (auto& range : ranges_merged) { const auto [buffer, offset] = ObtainBuffer(range.base_address, range.GetSize(), false); range.vk_buffer = buffer->buffer; @@ -198,32 +147,39 @@ bool BufferCache::BindVertexBuffers( } // Bind vertex buffers - const size_t num_buffers = guest_buffers.size(); - for (u32 i = 0; i < num_buffers; ++i) { - const auto& buffer = guest_buffers[i]; - const auto host_buffer = std::ranges::find_if(ranges_merged, [&](const BufferRange& range) { - return (buffer.base_address >= range.base_address && - buffer.base_address < range.end_address); - }); - ASSERT(host_buffer != ranges_merged.cend()); - - host_buffers[i] = host_buffer->vk_buffer; - host_offsets[i] = host_buffer->offset + buffer.base_address - host_buffer->base_address; - host_sizes[i] = buffer.GetSize(); - host_strides[i] = buffer.GetStride(); - } - - if (num_buffers > 0) { - const auto cmdbuf = scheduler.CommandBuffer(); - if (instance.IsVertexInputDynamicState()) { - cmdbuf.bindVertexBuffers(0, num_buffers, host_buffers.data(), host_offsets.data()); + Vulkan::VertexInputs host_buffers; + Vulkan::VertexInputs host_offsets; + Vulkan::VertexInputs host_sizes; + Vulkan::VertexInputs host_strides; + const auto null_buffer = + instance.IsNullDescriptorSupported() ? VK_NULL_HANDLE : GetBuffer(NULL_BUFFER_ID).Handle(); + for (const auto& buffer : guest_buffers) { + if (buffer.GetSize() > 0) { + const auto host_buffer_info = + std::ranges::find_if(ranges_merged, [&](const BufferRange& range) { + return buffer.base_address >= range.base_address && + buffer.base_address < range.end_address; + }); + ASSERT(host_buffer_info != ranges_merged.cend()); + host_buffers.emplace_back(host_buffer_info->vk_buffer); + host_offsets.push_back(host_buffer_info->offset + buffer.base_address - + host_buffer_info->base_address); } else { - cmdbuf.bindVertexBuffers2EXT(0, num_buffers, host_buffers.data(), host_offsets.data(), - host_sizes.data(), host_strides.data()); + host_buffers.emplace_back(null_buffer); + host_offsets.push_back(0); } + host_sizes.push_back(buffer.GetSize()); + host_strides.push_back(buffer.GetStride()); } - return has_step_rate; + const auto cmdbuf = scheduler.CommandBuffer(); + const auto num_buffers = guest_buffers.size(); + if (instance.IsVertexInputDynamicState()) { + cmdbuf.bindVertexBuffers(0, num_buffers, host_buffers.data(), host_offsets.data()); + } else { + cmdbuf.bindVertexBuffers2EXT(0, num_buffers, host_buffers.data(), host_offsets.data(), + host_sizes.data(), host_strides.data()); + } } void BufferCache::BindIndexBuffer(u32 index_offset) { @@ -251,7 +207,6 @@ void BufferCache::InlineData(VAddr address, const void* value, u32 num_bytes, bo return; } scheduler.EndRendering(); - const auto cmdbuf = scheduler.CommandBuffer(); const Buffer* buffer = [&] { if (is_gds) { return &gds_buffer; @@ -259,6 +214,7 @@ void BufferCache::InlineData(VAddr address, const void* value, u32 num_bytes, bo const BufferId buffer_id = FindBuffer(address, num_bytes); return &slot_buffers[buffer_id]; }(); + const auto cmdbuf = scheduler.CommandBuffer(); const vk::BufferMemoryBarrier2 pre_barrier = { .srcStageMask = vk::PipelineStageFlagBits2::eAllCommands, .srcAccessMask = vk::AccessFlagBits2::eMemoryRead, @@ -290,14 +246,6 @@ void BufferCache::InlineData(VAddr address, const void* value, u32 num_bytes, bo }); } -std::pair BufferCache::ObtainHostUBO(std::span data) { - static constexpr u64 StreamThreshold = CACHING_PAGESIZE; - ASSERT(data.size_bytes() <= StreamThreshold); - const u64 offset = stream_buffer.Copy(reinterpret_cast(data.data()), data.size_bytes(), - instance.UniformMinAlignment()); - return {&stream_buffer, offset}; -} - std::pair BufferCache::ObtainBuffer(VAddr device_addr, u32 size, bool is_written, bool is_texel_buffer, BufferId buffer_id) { // For small uniform buffers that have not been modified by gpu @@ -479,43 +427,36 @@ void BufferCache::JoinOverlap(BufferId new_buffer_id, BufferId overlap_id, }; scheduler.EndRendering(); const auto cmdbuf = scheduler.CommandBuffer(); - const std::array pre_barriers = { - vk::BufferMemoryBarrier2{ - .srcStageMask = vk::PipelineStageFlagBits2::eAllCommands, - .srcAccessMask = vk::AccessFlagBits2::eMemoryRead | vk::AccessFlagBits2::eMemoryWrite, - .dstStageMask = vk::PipelineStageFlagBits2::eTransfer, - .dstAccessMask = vk::AccessFlagBits2::eTransferRead, - .buffer = overlap.Handle(), - .offset = 0, - .size = overlap.SizeBytes(), - }, - }; - const std::array post_barriers = { - vk::BufferMemoryBarrier2{ - .srcStageMask = vk::PipelineStageFlagBits2::eTransfer, - .srcAccessMask = vk::AccessFlagBits2::eTransferRead, - .dstStageMask = vk::PipelineStageFlagBits2::eAllCommands, - .dstAccessMask = vk::AccessFlagBits2::eMemoryWrite, - .buffer = overlap.Handle(), - .offset = 0, - .size = overlap.SizeBytes(), - }, - vk::BufferMemoryBarrier2{ - .srcStageMask = vk::PipelineStageFlagBits2::eTransfer, - .srcAccessMask = vk::AccessFlagBits2::eTransferWrite, - .dstStageMask = vk::PipelineStageFlagBits2::eAllCommands, - .dstAccessMask = vk::AccessFlagBits2::eMemoryRead | vk::AccessFlagBits2::eMemoryWrite, - .buffer = new_buffer.Handle(), - .offset = dst_base_offset, - .size = overlap.SizeBytes(), - }, - }; + + boost::container::static_vector pre_barriers{}; + if (auto src_barrier = overlap.GetBarrier(vk::AccessFlagBits2::eTransferRead, + vk::PipelineStageFlagBits2::eTransfer)) { + pre_barriers.push_back(*src_barrier); + } + if (auto dst_barrier = + new_buffer.GetBarrier(vk::AccessFlagBits2::eTransferWrite, + vk::PipelineStageFlagBits2::eTransfer, dst_base_offset)) { + pre_barriers.push_back(*dst_barrier); + } cmdbuf.pipelineBarrier2(vk::DependencyInfo{ .dependencyFlags = vk::DependencyFlagBits::eByRegion, - .bufferMemoryBarrierCount = 1, + .bufferMemoryBarrierCount = static_cast(pre_barriers.size()), .pBufferMemoryBarriers = pre_barriers.data(), }); + cmdbuf.copyBuffer(overlap.Handle(), new_buffer.Handle(), copy); + + boost::container::static_vector post_barriers{}; + if (auto src_barrier = + overlap.GetBarrier(vk::AccessFlagBits2::eMemoryRead | vk::AccessFlagBits2::eMemoryWrite, + vk::PipelineStageFlagBits2::eAllCommands)) { + post_barriers.push_back(*src_barrier); + } + if (auto dst_barrier = new_buffer.GetBarrier( + vk::AccessFlagBits2::eMemoryRead | vk::AccessFlagBits2::eMemoryWrite, + vk::PipelineStageFlagBits2::eAllCommands, dst_base_offset)) { + post_barriers.push_back(*dst_barrier); + } cmdbuf.pipelineBarrier2(vk::DependencyInfo{ .dependencyFlags = vk::DependencyFlagBits::eByRegion, .bufferMemoryBarrierCount = static_cast(post_barriers.size()), @@ -626,7 +567,8 @@ void BufferCache::SynchronizeBuffer(Buffer& buffer, VAddr device_addr, u32 size, const auto cmdbuf = scheduler.CommandBuffer(); const vk::BufferMemoryBarrier2 pre_barrier = { .srcStageMask = vk::PipelineStageFlagBits2::eAllCommands, - .srcAccessMask = vk::AccessFlagBits2::eMemoryRead, + .srcAccessMask = vk::AccessFlagBits2::eMemoryRead | vk::AccessFlagBits2::eMemoryWrite | + vk::AccessFlagBits2::eTransferRead | vk::AccessFlagBits2::eTransferWrite, .dstStageMask = vk::PipelineStageFlagBits2::eTransfer, .dstAccessMask = vk::AccessFlagBits2::eTransferWrite, .buffer = buffer.Handle(), @@ -660,13 +602,18 @@ bool BufferCache::SynchronizeBufferFromImage(Buffer& buffer, VAddr device_addr, FindFlags::NoCreate | FindFlags::RelaxDim | FindFlags::RelaxFmt | FindFlags::RelaxSize; TextureCache::BaseDesc desc{}; desc.info.guest_address = device_addr; - desc.info.guest_size_bytes = size; + desc.info.guest_size = size; const ImageId image_id = texture_cache.FindImage(desc, find_flags); if (!image_id) { return false; } Image& image = texture_cache.GetImage(image_id); - if (False(image.flags & ImageFlagBits::GpuModified)) { + // Only perform sync if image is: + // - GPU modified; otherwise there are no changes to synchronize. + // - Not CPU dirty; otherwise we could overwrite CPU changes with stale GPU changes. + // - Not GPU dirty; otherwise we could overwrite GPU changes with stale image data. + if (False(image.flags & ImageFlagBits::GpuModified) || + True(image.flags & ImageFlagBits::Dirty)) { return false; } ASSERT_MSG(device_addr == image.info.guest_address, @@ -682,8 +629,8 @@ bool BufferCache::SynchronizeBufferFromImage(Buffer& buffer, VAddr device_addr, const u32 depth = image.info.props.is_volume ? std::max(image.info.size.depth >> m, 1u) : 1u; const auto& [mip_size, mip_pitch, mip_height, mip_ofs] = image.info.mips_layout[m]; - offset += mip_ofs * num_layers; - if (offset + (mip_size * num_layers) > max_offset) { + offset += mip_ofs; + if (offset + mip_size > max_offset) { break; } copies.push_back({ diff --git a/src/video_core/buffer_cache/buffer_cache.h b/src/video_core/buffer_cache/buffer_cache.h index c367795f1..71a6bed2a 100644 --- a/src/video_core/buffer_cache/buffer_cache.h +++ b/src/video_core/buffer_cache/buffer_cache.h @@ -5,8 +5,6 @@ #include #include -#include -#include #include "common/div_ceil.h" #include "common/slot_vector.h" #include "common/types.h" @@ -26,6 +24,10 @@ struct FetchShaderData; struct Info; } // namespace Shader +namespace Vulkan { +class GraphicsPipeline; +} + namespace VideoCore { using BufferId = Common::SlotId; @@ -66,21 +68,21 @@ public: return &gds_buffer; } + /// Retrieves the host visible device local stream buffer. + [[nodiscard]] StreamBuffer& GetStreamBuffer() noexcept { + return stream_buffer; + } + /// Retrieves the buffer with the specified id. [[nodiscard]] Buffer& GetBuffer(BufferId id) { return slot_buffers[id]; } - [[nodiscard]] vk::BufferView& NullBufferView() { - return null_buffer_view; - } - /// Invalidates any buffer in the logical page range. void InvalidateMemory(VAddr device_addr, u64 size); /// Binds host vertex buffers for the current draw. - bool BindVertexBuffers(const Shader::Info& vs_info, - const std::optional& fetch_shader); + void BindVertexBuffers(const Vulkan::GraphicsPipeline& pipeline); /// Bind host index buffer for the current draw. void BindIndexBuffer(u32 index_offset); @@ -88,8 +90,6 @@ public: /// Writes a value to GPU buffer. void InlineData(VAddr address, const void* value, u32 num_bytes, bool is_gds); - [[nodiscard]] std::pair ObtainHostUBO(std::span data); - /// Obtains a buffer for the specified region. [[nodiscard]] std::pair ObtainBuffer(VAddr gpu_addr, u32 size, bool is_written, bool is_texel_buffer = false, @@ -160,7 +160,6 @@ private: std::shared_mutex mutex; Common::SlotVector slot_buffers; RangeSet gpu_modified_ranges; - vk::BufferView null_buffer_view; MemoryTracker memory_tracker; PageTable page_table; }; diff --git a/src/video_core/buffer_cache/word_manager.h b/src/video_core/buffer_cache/word_manager.h index 7ad33d7a6..5ad724f96 100644 --- a/src/video_core/buffer_cache/word_manager.h +++ b/src/video_core/buffer_cache/word_manager.h @@ -8,6 +8,9 @@ #include #include +#ifdef __linux__ +#include "common/adaptive_mutex.h" +#endif #include "common/spin_lock.h" #include "common/types.h" #include "video_core/page_manager.h" @@ -272,7 +275,11 @@ private: } } +#ifdef PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP + Common::AdaptiveMutex lock; +#else Common::SpinLock lock; +#endif PageManager* tracker; VAddr cpu_addr = 0; WordsArray cpu; diff --git a/src/video_core/host_shaders/CMakeLists.txt b/src/video_core/host_shaders/CMakeLists.txt index c2a3b53fd..3001bf773 100644 --- a/src/video_core/host_shaders/CMakeLists.txt +++ b/src/video_core/host_shaders/CMakeLists.txt @@ -2,14 +2,17 @@ # SPDX-License-Identifier: GPL-2.0-or-later set(SHADER_FILES - detile_m8x1.comp - detile_m8x2.comp - detile_m32x1.comp - detile_m32x2.comp - detile_m32x4.comp - detile_macro32x1.comp - detile_macro32x2.comp + detilers/display_micro_64bpp.comp + detilers/macro_32bpp.comp + detilers/macro_64bpp.comp + detilers/macro_8bpp.comp + detilers/micro_128bpp.comp + detilers/micro_16bpp.comp + detilers/micro_32bpp.comp + detilers/micro_64bpp.comp + detilers/micro_8bpp.comp fs_tri.vert + fsr.comp post_process.frag ) diff --git a/src/video_core/host_shaders/StringShaderHeader.cmake b/src/video_core/host_shaders/StringShaderHeader.cmake index 9f7525535..798b43e6c 100644 --- a/src/video_core/host_shaders/StringShaderHeader.cmake +++ b/src/video_core/host_shaders/StringShaderHeader.cmake @@ -9,28 +9,31 @@ get_filename_component(CONTENTS_NAME ${SOURCE_FILE} NAME) string(REPLACE "." "_" CONTENTS_NAME ${CONTENTS_NAME}) string(TOUPPER ${CONTENTS_NAME} CONTENTS_NAME) -FILE(READ ${SOURCE_FILE} line_contents) +# Function to recursively parse #include directives and replace them with file contents +function(parse_includes file_path output_content) + file(READ ${file_path} file_content) + # This regex includes \n at the begin to (hackish) avoid including comments + string(REGEX MATCHALL "\n#include +\"[^\"]+\"" includes "${file_content}") -# Replace double quotes with single quotes, -# as double quotes will be used to wrap the lines -STRING(REGEX REPLACE "\"" "'" line_contents "${line_contents}") + set(parsed_content "${file_content}") + foreach (include_match ${includes}) + string(REGEX MATCH "\"([^\"]+)\"" _ "${include_match}") + set(include_file ${CMAKE_MATCH_1}) + get_filename_component(include_full_path "${file_path}" DIRECTORY) + set(include_full_path "${include_full_path}/${include_file}") -# CMake separates list elements with semicolons, but semicolons -# are used extensively in the shader code. -# Replace with a temporary marker, to be reverted later. -STRING(REGEX REPLACE ";" "{{SEMICOLON}}" line_contents "${line_contents}") + if (NOT EXISTS "${include_full_path}") + message(FATAL_ERROR "Included file not found: ${include_full_path} from ${file_path}") + endif () -# Make every line an individual element in the CMake list. -STRING(REGEX REPLACE "\n" ";" line_contents "${line_contents}") + parse_includes("${include_full_path}" sub_content) + string(REPLACE "${include_match}" "\n${sub_content}" parsed_content "${parsed_content}") + endforeach () + set(${output_content} "${parsed_content}" PARENT_SCOPE) +endfunction() -# Build the shader string, wrapping each line in double quotes. -foreach(line IN LISTS line_contents) - string(CONCAT CONTENTS "${CONTENTS}" \"${line}\\n\"\n) -endforeach() - -# Revert the original semicolons in the source. -STRING(REGEX REPLACE "{{SEMICOLON}}" ";" CONTENTS "${CONTENTS}") +parse_includes("${SOURCE_FILE}" CONTENTS) get_filename_component(OUTPUT_DIR ${HEADER_FILE} DIRECTORY) -make_directory(${OUTPUT_DIR}) +file(MAKE_DIRECTORY ${OUTPUT_DIR}) configure_file(${INPUT_FILE} ${HEADER_FILE} @ONLY) diff --git a/src/video_core/host_shaders/detilers/display_micro_64bpp.comp b/src/video_core/host_shaders/detilers/display_micro_64bpp.comp new file mode 100644 index 000000000..3e0485682 --- /dev/null +++ b/src/video_core/host_shaders/detilers/display_micro_64bpp.comp @@ -0,0 +1,60 @@ +// SPDX-FileCopyrightText: Copyright 2024 shadPS4 Emulator Project +// SPDX-License-Identifier: GPL-2.0-or-later + +#version 450 + +layout (local_size_x = 64, local_size_y = 1, local_size_z = 1) in; + +layout(std430, binding = 0) buffer input_buf { + uint in_data[]; +}; +layout(std430, binding = 1) buffer output_buf { + uint out_data[]; +}; + +layout(push_constant) uniform image_info { + uint num_levels; + uint pitch; + uint height; + uint c0; + uint c1; +} info; + +const uint lut_64bpp[16] = { + 0x05040100, 0x0d0c0908, + 0x07060302, 0x0f0e0b0a, + 0x15141110, 0x1d1c1918, + 0x17161312, 0x1f1e1b1a, + 0x25242120, 0x2d2c2928, + 0x27262322, 0x2f2e2b2a, + 0x35343130, 0x3d3c3938, + 0x37363332, 0x3f3e3b3a, +}; + +#define MICRO_TILE_DIM (8) +#define MICRO_TILE_SZ (512) +#define TEXELS_PER_ELEMENT (1) +#define BPP (64) + +void main() { + uint x = gl_GlobalInvocationID.x % info.pitch; + uint y = (gl_GlobalInvocationID.x / info.pitch) % info.height; + uint z = gl_GlobalInvocationID.x / (info.pitch * info.height); + + uint col = bitfieldExtract(x, 0, 3); + uint row = bitfieldExtract(y, 0, 3); + uint idx_dw = lut_64bpp[(col + row * MICRO_TILE_DIM) >> 2u]; + uint byte_ofs = gl_LocalInvocationID.x & 3u; + uint idx = bitfieldExtract(idx_dw >> (8 * byte_ofs), 0, 8); + + uint slice_offs = z * info.c1 * MICRO_TILE_SZ; + uint tile_row = y / MICRO_TILE_DIM; + uint tile_column = x / MICRO_TILE_DIM; + uint tile_offs = ((tile_row * info.c0) + tile_column) * MICRO_TILE_SZ; + uint offs = slice_offs + tile_offs + ((idx * BPP) / 8u); + + uint p0 = in_data[(offs >> 2) + 0]; + uint p1 = in_data[(offs >> 2) + 1]; + out_data[2 * gl_GlobalInvocationID.x + 0] = p0; + out_data[2 * gl_GlobalInvocationID.x + 1] = p1; +} diff --git a/src/video_core/host_shaders/detile_macro32x1.comp b/src/video_core/host_shaders/detilers/macro_32bpp.comp similarity index 100% rename from src/video_core/host_shaders/detile_macro32x1.comp rename to src/video_core/host_shaders/detilers/macro_32bpp.comp diff --git a/src/video_core/host_shaders/detile_macro32x2.comp b/src/video_core/host_shaders/detilers/macro_64bpp.comp similarity index 96% rename from src/video_core/host_shaders/detile_macro32x2.comp rename to src/video_core/host_shaders/detilers/macro_64bpp.comp index d161484c1..986acc963 100644 --- a/src/video_core/host_shaders/detile_macro32x2.comp +++ b/src/video_core/host_shaders/detilers/macro_64bpp.comp @@ -87,7 +87,7 @@ void main() { uint offs = slice_offs + tile_offs + (idx * BPP / 8); uint p0 = in_data[(offs >> 2) + 0]; - uint p1 = in_data[(offs >> 2) + 1]; + uint p1 = in_data[(offs >> 2) + 1]; out_data[2 * gl_GlobalInvocationID.x + 0] = p0; - out_data[2 * gl_GlobalInvocationID.x + 1] = p1; + out_data[2 * gl_GlobalInvocationID.x + 1] = p1; } diff --git a/src/video_core/host_shaders/detilers/macro_8bpp.comp b/src/video_core/host_shaders/detilers/macro_8bpp.comp new file mode 100644 index 000000000..cddc8af5b --- /dev/null +++ b/src/video_core/host_shaders/detilers/macro_8bpp.comp @@ -0,0 +1,101 @@ +// SPDX-FileCopyrightText: Copyright 2024 shadPS4 Emulator Project +// SPDX-License-Identifier: GPL-2.0-or-later + +#version 450 + +layout (local_size_x = 64, local_size_y = 1, local_size_z = 1) in; + +layout(std430, binding = 0) buffer input_buf { + uint in_data[]; +}; +layout(std430, binding = 1) buffer output_buf { + uint out_data[]; +}; + +layout(push_constant) uniform image_info { + uint num_levels; + uint pitch; + uint height; + uint c0; + uint c1; +} info; + +const uint lut_8bpp[][16] = { + { + 0x05040100, 0x45444140, + 0x07060302, 0x47464342, + 0x0d0c0908, 0x4d4c4948, + 0x0f0e0b0a, 0x4f4e4b4a, + 0x85848180, 0xc5c4c1c0, + 0x87868382, 0xc7c6c3c2, + 0x8d8c8988, 0xcdccc9c8, + 0x8f8e8b8a, 0xcfcecbca, + }, + { + 0x15141110, 0x55545150, + 0x17161312, 0x57565352, + 0x1d1c1918, 0x5d5c5958, + 0x1f1e1b1a, 0x5f5e5b5a, + 0x95949190, 0xd5d4d1d0, + 0x97969392, 0xd7d6d3d2, + 0x9d9c9998, 0xdddcd9d8, + 0x9f9e9b9a, 0xdfdedbda, + }, + { + 0x25242120, 0x65646160, + 0x27262322, 0x67666362, + 0x2d2c2928, 0x6d6c6968, + 0x2f2e2b2a, 0x6f6e6b6a, + 0xa5a4a1a0, 0xe5e4e1e0, + 0xa7a6a3a2, 0xe7e6e3e2, + 0xadaca9a8, 0xedece9e8, + 0xafaeabaa, 0xefeeebea, + }, + { + 0x35343130, 0x75747170, + 0x37363332, 0x77767372, + 0x3d3c3938, 0x7d7c7978, + 0x3f3e3b3a, 0x7f7e7b7a, + 0xb5b4b1b0, 0xf5f4f1f0, + 0xb7b6b3b2, 0xf7f6f3f2, + 0xbdbcb9b8, 0xfdfcf9f8, + 0xbfbebbba, 0xfffefbfa, + }, +}; + +#define MICRO_TILE_DIM (8) +#define MICRO_TILE_SZ (256) +#define TEXELS_PER_ELEMENT (1) +#define BPP (8) + +shared uint scratch[16]; + +void main() { + uint slot = gl_LocalInvocationID.x >> 2u; + atomicAnd(scratch[slot], 0); + + uint x = gl_GlobalInvocationID.x % info.pitch; + uint y = (gl_GlobalInvocationID.x / info.pitch) % info.height; + uint z = gl_GlobalInvocationID.x / (info.pitch * info.height); + + uint col = bitfieldExtract(x, 0, 3); + uint row = bitfieldExtract(y, 0, 3); + uint lut = bitfieldExtract(z, 0, 2); + uint idx_dw = lut_8bpp[lut][(col + row * MICRO_TILE_DIM) >> 2u]; + uint byte_ofs = (gl_LocalInvocationID.x & 3u) * 8; + uint idx = bitfieldExtract(idx_dw >> byte_ofs, 0, 8); + + uint slice_offs = (z >> 2u) * info.c1 * MICRO_TILE_SZ; + uint tile_row = y / MICRO_TILE_DIM; + uint tile_column = x / MICRO_TILE_DIM; + uint tile_offs = ((tile_row * info.c0) + tile_column) * MICRO_TILE_SZ; + uint offs = (slice_offs + tile_offs) + (idx * BPP / 8); + + uint p0 = in_data[offs >> 2u]; + uint byte = bitfieldExtract(p0 >> (offs * 8), 0, 8); + atomicOr(scratch[slot], byte << byte_ofs); + + if (byte_ofs == 0) { + out_data[gl_GlobalInvocationID.x >> 2u] = scratch[slot]; + } +} diff --git a/src/video_core/host_shaders/detile_m32x4.comp b/src/video_core/host_shaders/detilers/micro_128bpp.comp similarity index 100% rename from src/video_core/host_shaders/detile_m32x4.comp rename to src/video_core/host_shaders/detilers/micro_128bpp.comp diff --git a/src/video_core/host_shaders/detile_m8x2.comp b/src/video_core/host_shaders/detilers/micro_16bpp.comp similarity index 100% rename from src/video_core/host_shaders/detile_m8x2.comp rename to src/video_core/host_shaders/detilers/micro_16bpp.comp diff --git a/src/video_core/host_shaders/detile_m32x1.comp b/src/video_core/host_shaders/detilers/micro_32bpp.comp similarity index 100% rename from src/video_core/host_shaders/detile_m32x1.comp rename to src/video_core/host_shaders/detilers/micro_32bpp.comp diff --git a/src/video_core/host_shaders/detile_m32x2.comp b/src/video_core/host_shaders/detilers/micro_64bpp.comp similarity index 100% rename from src/video_core/host_shaders/detile_m32x2.comp rename to src/video_core/host_shaders/detilers/micro_64bpp.comp diff --git a/src/video_core/host_shaders/detile_m8x1.comp b/src/video_core/host_shaders/detilers/micro_8bpp.comp similarity index 100% rename from src/video_core/host_shaders/detile_m8x1.comp rename to src/video_core/host_shaders/detilers/micro_8bpp.comp diff --git a/src/video_core/host_shaders/fsr.comp b/src/video_core/host_shaders/fsr.comp new file mode 100644 index 000000000..105859e35 --- /dev/null +++ b/src/video_core/host_shaders/fsr.comp @@ -0,0 +1,91 @@ +// SPDX-FileCopyrightText: Copyright (c) 2021 Advanced Micro Devices, Inc. All rights reserved. +// SPDX-License-Identifier: MIT + +#version 450 +#extension GL_ARB_separate_shader_objects: enable +#extension GL_ARB_shading_language_420pack: enable + +// FidelityFX Super Resolution Sample +// +// Copyright (c) 2021 Advanced Micro Devices, Inc. All rights reserved. +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files(the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and / or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions : +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +layout (push_constant) uniform const_buffer +{ + uvec4 Const0; + uvec4 Const1; + uvec4 Const2; + uvec4 Const3; + uvec4 Sample; +}; + +#define A_GPU 1 +#define A_GLSL 1 + +#define A_HALF +#include "fsr/ffx_a.h" + +layout (set = 0, binding = 0) uniform texture2D InputTexture; +layout (set = 0, binding = 1, rgba16f) uniform image2D OutputTexture; +layout (set = 0, binding = 2) uniform sampler InputSampler; + +#if SAMPLE_EASU +#define FSR_EASU_H 1 +AH4 FsrEasuRH(AF2 p) { AH4 res = AH4(textureGather(sampler2D(InputTexture, InputSampler), p, 0)); return res; } +AH4 FsrEasuGH(AF2 p) { AH4 res = AH4(textureGather(sampler2D(InputTexture, InputSampler), p, 1)); return res; } +AH4 FsrEasuBH(AF2 p) { AH4 res = AH4(textureGather(sampler2D(InputTexture, InputSampler), p, 2)); return res; } +#endif// SAMPLE_EASU + +#if SAMPLE_RCAS +#define FSR_RCAS_H +AH4 FsrRcasLoadH(ASW2 p) { return AH4(texelFetch(sampler2D(InputTexture, InputSampler), ASU2(p), 0)); } +void FsrRcasInputH(inout AH1 r, inout AH1 g, inout AH1 b) { } +#endif// SAMPLE_RCAS + +#include "fsr/ffx_fsr1.h" + +void CurrFilter(AU2 pos) +{ + #if SAMPLE_EASU + AH3 c; + FsrEasuH(c, pos, Const0, Const1, Const2, Const3); + if (Sample.x == 1) + c *= c; + imageStore(OutputTexture, ASU2(pos), AH4(c, 1)); + #endif// SAMPLE_EASU +#if SAMPLE_RCAS + AH3 c; + FsrRcasH(c.r, c.g, c.b, pos, Const0); + if (Sample.x == 1) + c *= c; + imageStore(OutputTexture, ASU2(pos), AH4(c, 1)); + #endif// SAMPLE_RCAS +} + +layout (local_size_x = 64) in; +void main() +{ + // Do remapping of local xy in workgroup for a more PS-like swizzle pattern. + AU2 gxy = ARmp8x8(gl_LocalInvocationID.x) + AU2(gl_WorkGroupID.x << 4u, gl_WorkGroupID.y << 4u); + CurrFilter(gxy); + gxy.x += 8u; + CurrFilter(gxy); + gxy.y += 8u; + CurrFilter(gxy); + gxy.x -= 8u; + CurrFilter(gxy); +} \ No newline at end of file diff --git a/src/video_core/host_shaders/fsr/ffx_a.h b/src/video_core/host_shaders/fsr/ffx_a.h new file mode 100644 index 000000000..882b0381c --- /dev/null +++ b/src/video_core/host_shaders/fsr/ffx_a.h @@ -0,0 +1,2657 @@ +// clang-format off +//============================================================================================================================== +// +// [A] SHADER PORTABILITY 1.20210629 +// +//============================================================================================================================== +// FidelityFX Super Resolution Sample +// +// Copyright (c) 2021 Advanced Micro Devices, Inc. All rights reserved. +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files(the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and / or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions : +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. +//------------------------------------------------------------------------------------------------------------------------------ +// MIT LICENSE +// =========== +// Copyright (c) 2014 Michal Drobot (for concepts used in "FLOAT APPROXIMATIONS"). +// ----------- +// Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation +// files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, +// modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the +// Software is furnished to do so, subject to the following conditions: +// ----------- +// The above copyright notice and this permission notice shall be included in all copies or substantial portions of the +// Software. +// ----------- +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE +// WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +// COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +//------------------------------------------------------------------------------------------------------------------------------ +// ABOUT +// ===== +// Common central point for high-level shading language and C portability for various shader headers. +//------------------------------------------------------------------------------------------------------------------------------ +// DEFINES +// ======= +// A_CPU ..... Include the CPU related code. +// A_GPU ..... Include the GPU related code. +// A_GLSL .... Using GLSL. +// A_HLSL .... Using HLSL. +// A_HLSL_6_2 Using HLSL 6.2 with new 'uint16_t' and related types (requires '-enable-16bit-types'). +// A_NO_16_BIT_CAST Don't use instructions that are not availabe in SPIR-V (needed for running A_HLSL_6_2 on Vulkan) +// A_GCC ..... Using a GCC compatible compiler (else assume MSVC compatible compiler by default). +// ======= +// A_BYTE .... Support 8-bit integer. +// A_HALF .... Support 16-bit integer and floating point. +// A_LONG .... Support 64-bit integer. +// A_DUBL .... Support 64-bit floating point. +// ======= +// A_WAVE .... Support wave-wide operations. +//------------------------------------------------------------------------------------------------------------------------------ +// To get #include "ffx_a.h" working in GLSL use '#extension GL_GOOGLE_include_directive:require'. +//------------------------------------------------------------------------------------------------------------------------------ +// SIMPLIFIED TYPE SYSTEM +// ====================== +// - All ints will be unsigned with exception of when signed is required. +// - Type naming simplified and shortened "A<#components>", +// - H = 16-bit float (half) +// - F = 32-bit float (float) +// - D = 64-bit float (double) +// - P = 1-bit integer (predicate, not using bool because 'B' is used for byte) +// - B = 8-bit integer (byte) +// - W = 16-bit integer (word) +// - U = 32-bit integer (unsigned) +// - L = 64-bit integer (long) +// - Using "AS<#components>" for signed when required. +//------------------------------------------------------------------------------------------------------------------------------ +// TODO +// ==== +// - Make sure 'ALerp*(a,b,m)' does 'b*m+(-a*m+a)' (2 ops). +//------------------------------------------------------------------------------------------------------------------------------ +// CHANGE LOG +// ========== +// 20200914 - Expanded wave ops and prx code. +// 20200713 - Added [ZOL] section, fixed serious bugs in sRGB and Rec.709 color conversion code, etc. +//============================================================================================================================== +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +//_____________________________________________________________/\_______________________________________________________________ +//============================================================================================================================== +// COMMON +//============================================================================================================================== +#define A_2PI 6.28318530718 +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +//_____________________________________________________________/\_______________________________________________________________ +//============================================================================================================================== +// +// +// CPU +// +// +//============================================================================================================================== +#ifdef A_CPU + // Supporting user defined overrides. + #ifndef A_RESTRICT + #define A_RESTRICT __restrict + #endif +//------------------------------------------------------------------------------------------------------------------------------ + #ifndef A_STATIC + #define A_STATIC static + #endif +//------------------------------------------------------------------------------------------------------------------------------ + // Same types across CPU and GPU. + // Predicate uses 32-bit integer (C friendly bool). + typedef uint32_t AP1; + typedef float AF1; + typedef double AD1; + typedef uint8_t AB1; + typedef uint16_t AW1; + typedef uint32_t AU1; + typedef uint64_t AL1; + typedef int8_t ASB1; + typedef int16_t ASW1; + typedef int32_t ASU1; + typedef int64_t ASL1; +//------------------------------------------------------------------------------------------------------------------------------ + #define AD1_(a) ((AD1)(a)) + #define AF1_(a) ((AF1)(a)) + #define AL1_(a) ((AL1)(a)) + #define AU1_(a) ((AU1)(a)) +//------------------------------------------------------------------------------------------------------------------------------ + #define ASL1_(a) ((ASL1)(a)) + #define ASU1_(a) ((ASU1)(a)) +//------------------------------------------------------------------------------------------------------------------------------ + A_STATIC AU1 AU1_AF1(AF1 a){union{AF1 f;AU1 u;}bits;bits.f=a;return bits.u;} +//------------------------------------------------------------------------------------------------------------------------------ + #define A_TRUE 1 + #define A_FALSE 0 +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +//_____________________________________________________________/\_______________________________________________________________ +//============================================================================================================================== +// +// CPU/GPU PORTING +// +//------------------------------------------------------------------------------------------------------------------------------ +// Get CPU and GPU to share all setup code, without duplicate code paths. +// This uses a lower-case prefix for special vector constructs. +// - In C restrict pointers are used. +// - In the shading language, in/inout/out arguments are used. +// This depends on the ability to access a vector value in both languages via array syntax (aka color[2]). +//============================================================================================================================== +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +//_____________________________________________________________/\_______________________________________________________________ +//============================================================================================================================== +// VECTOR ARGUMENT/RETURN/INITIALIZATION PORTABILITY +//============================================================================================================================== + #define retAD2 AD1 *A_RESTRICT + #define retAD3 AD1 *A_RESTRICT + #define retAD4 AD1 *A_RESTRICT + #define retAF2 AF1 *A_RESTRICT + #define retAF3 AF1 *A_RESTRICT + #define retAF4 AF1 *A_RESTRICT + #define retAL2 AL1 *A_RESTRICT + #define retAL3 AL1 *A_RESTRICT + #define retAL4 AL1 *A_RESTRICT + #define retAU2 AU1 *A_RESTRICT + #define retAU3 AU1 *A_RESTRICT + #define retAU4 AU1 *A_RESTRICT +//------------------------------------------------------------------------------------------------------------------------------ + #define inAD2 AD1 *A_RESTRICT + #define inAD3 AD1 *A_RESTRICT + #define inAD4 AD1 *A_RESTRICT + #define inAF2 AF1 *A_RESTRICT + #define inAF3 AF1 *A_RESTRICT + #define inAF4 AF1 *A_RESTRICT + #define inAL2 AL1 *A_RESTRICT + #define inAL3 AL1 *A_RESTRICT + #define inAL4 AL1 *A_RESTRICT + #define inAU2 AU1 *A_RESTRICT + #define inAU3 AU1 *A_RESTRICT + #define inAU4 AU1 *A_RESTRICT +//------------------------------------------------------------------------------------------------------------------------------ + #define inoutAD2 AD1 *A_RESTRICT + #define inoutAD3 AD1 *A_RESTRICT + #define inoutAD4 AD1 *A_RESTRICT + #define inoutAF2 AF1 *A_RESTRICT + #define inoutAF3 AF1 *A_RESTRICT + #define inoutAF4 AF1 *A_RESTRICT + #define inoutAL2 AL1 *A_RESTRICT + #define inoutAL3 AL1 *A_RESTRICT + #define inoutAL4 AL1 *A_RESTRICT + #define inoutAU2 AU1 *A_RESTRICT + #define inoutAU3 AU1 *A_RESTRICT + #define inoutAU4 AU1 *A_RESTRICT +//------------------------------------------------------------------------------------------------------------------------------ + #define outAD2 AD1 *A_RESTRICT + #define outAD3 AD1 *A_RESTRICT + #define outAD4 AD1 *A_RESTRICT + #define outAF2 AF1 *A_RESTRICT + #define outAF3 AF1 *A_RESTRICT + #define outAF4 AF1 *A_RESTRICT + #define outAL2 AL1 *A_RESTRICT + #define outAL3 AL1 *A_RESTRICT + #define outAL4 AL1 *A_RESTRICT + #define outAU2 AU1 *A_RESTRICT + #define outAU3 AU1 *A_RESTRICT + #define outAU4 AU1 *A_RESTRICT +//------------------------------------------------------------------------------------------------------------------------------ + #define varAD2(x) AD1 x[2] + #define varAD3(x) AD1 x[3] + #define varAD4(x) AD1 x[4] + #define varAF2(x) AF1 x[2] + #define varAF3(x) AF1 x[3] + #define varAF4(x) AF1 x[4] + #define varAL2(x) AL1 x[2] + #define varAL3(x) AL1 x[3] + #define varAL4(x) AL1 x[4] + #define varAU2(x) AU1 x[2] + #define varAU3(x) AU1 x[3] + #define varAU4(x) AU1 x[4] +//------------------------------------------------------------------------------------------------------------------------------ + #define initAD2(x,y) {x,y} + #define initAD3(x,y,z) {x,y,z} + #define initAD4(x,y,z,w) {x,y,z,w} + #define initAF2(x,y) {x,y} + #define initAF3(x,y,z) {x,y,z} + #define initAF4(x,y,z,w) {x,y,z,w} + #define initAL2(x,y) {x,y} + #define initAL3(x,y,z) {x,y,z} + #define initAL4(x,y,z,w) {x,y,z,w} + #define initAU2(x,y) {x,y} + #define initAU3(x,y,z) {x,y,z} + #define initAU4(x,y,z,w) {x,y,z,w} +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +//_____________________________________________________________/\_______________________________________________________________ +//============================================================================================================================== +// SCALAR RETURN OPS +//------------------------------------------------------------------------------------------------------------------------------ +// TODO +// ==== +// - Replace transcendentals with manual versions. +//============================================================================================================================== + #ifdef A_GCC + A_STATIC AD1 AAbsD1(AD1 a){return __builtin_fabs(a);} + A_STATIC AF1 AAbsF1(AF1 a){return __builtin_fabsf(a);} + A_STATIC AU1 AAbsSU1(AU1 a){return AU1_(__builtin_abs(ASU1_(a)));} + A_STATIC AL1 AAbsSL1(AL1 a){return AL1_(__builtin_llabs(ASL1_(a)));} + #else + A_STATIC AD1 AAbsD1(AD1 a){return fabs(a);} + A_STATIC AF1 AAbsF1(AF1 a){return fabsf(a);} + A_STATIC AU1 AAbsSU1(AU1 a){return AU1_(abs(ASU1_(a)));} + A_STATIC AL1 AAbsSL1(AL1 a){return AL1_(labs((long)ASL1_(a)));} + #endif +//------------------------------------------------------------------------------------------------------------------------------ + #ifdef A_GCC + A_STATIC AD1 ACosD1(AD1 a){return __builtin_cos(a);} + A_STATIC AF1 ACosF1(AF1 a){return __builtin_cosf(a);} + #else + A_STATIC AD1 ACosD1(AD1 a){return cos(a);} + A_STATIC AF1 ACosF1(AF1 a){return cosf(a);} + #endif +//------------------------------------------------------------------------------------------------------------------------------ + A_STATIC AD1 ADotD2(inAD2 a,inAD2 b){return a[0]*b[0]+a[1]*b[1];} + A_STATIC AD1 ADotD3(inAD3 a,inAD3 b){return a[0]*b[0]+a[1]*b[1]+a[2]*b[2];} + A_STATIC AD1 ADotD4(inAD4 a,inAD4 b){return a[0]*b[0]+a[1]*b[1]+a[2]*b[2]+a[3]*b[3];} + A_STATIC AF1 ADotF2(inAF2 a,inAF2 b){return a[0]*b[0]+a[1]*b[1];} + A_STATIC AF1 ADotF3(inAF3 a,inAF3 b){return a[0]*b[0]+a[1]*b[1]+a[2]*b[2];} + A_STATIC AF1 ADotF4(inAF4 a,inAF4 b){return a[0]*b[0]+a[1]*b[1]+a[2]*b[2]+a[3]*b[3];} +//------------------------------------------------------------------------------------------------------------------------------ + #ifdef A_GCC + A_STATIC AD1 AExp2D1(AD1 a){return __builtin_exp2(a);} + A_STATIC AF1 AExp2F1(AF1 a){return __builtin_exp2f(a);} + #else + A_STATIC AD1 AExp2D1(AD1 a){return exp2(a);} + A_STATIC AF1 AExp2F1(AF1 a){return exp2f(a);} + #endif +//------------------------------------------------------------------------------------------------------------------------------ + #ifdef A_GCC + A_STATIC AD1 AFloorD1(AD1 a){return __builtin_floor(a);} + A_STATIC AF1 AFloorF1(AF1 a){return __builtin_floorf(a);} + #else + A_STATIC AD1 AFloorD1(AD1 a){return floor(a);} + A_STATIC AF1 AFloorF1(AF1 a){return floorf(a);} + #endif +//------------------------------------------------------------------------------------------------------------------------------ + A_STATIC AD1 ALerpD1(AD1 a,AD1 b,AD1 c){return b*c+(-a*c+a);} + A_STATIC AF1 ALerpF1(AF1 a,AF1 b,AF1 c){return b*c+(-a*c+a);} +//------------------------------------------------------------------------------------------------------------------------------ + #ifdef A_GCC + A_STATIC AD1 ALog2D1(AD1 a){return __builtin_log2(a);} + A_STATIC AF1 ALog2F1(AF1 a){return __builtin_log2f(a);} + #else + A_STATIC AD1 ALog2D1(AD1 a){return log2(a);} + A_STATIC AF1 ALog2F1(AF1 a){return log2f(a);} + #endif +//------------------------------------------------------------------------------------------------------------------------------ + A_STATIC AD1 AMaxD1(AD1 a,AD1 b){return a>b?a:b;} + A_STATIC AF1 AMaxF1(AF1 a,AF1 b){return a>b?a:b;} + A_STATIC AL1 AMaxL1(AL1 a,AL1 b){return a>b?a:b;} + A_STATIC AU1 AMaxU1(AU1 a,AU1 b){return a>b?a:b;} +//------------------------------------------------------------------------------------------------------------------------------ + // These follow the convention that A integer types don't have signage, until they are operated on. + A_STATIC AL1 AMaxSL1(AL1 a,AL1 b){return (ASL1_(a)>ASL1_(b))?a:b;} + A_STATIC AU1 AMaxSU1(AU1 a,AU1 b){return (ASU1_(a)>ASU1_(b))?a:b;} +//------------------------------------------------------------------------------------------------------------------------------ + A_STATIC AD1 AMinD1(AD1 a,AD1 b){return a>ASL1_(b));} + A_STATIC AU1 AShrSU1(AU1 a,AU1 b){return AU1_(ASU1_(a)>>ASU1_(b));} +//------------------------------------------------------------------------------------------------------------------------------ + #ifdef A_GCC + A_STATIC AD1 ASinD1(AD1 a){return __builtin_sin(a);} + A_STATIC AF1 ASinF1(AF1 a){return __builtin_sinf(a);} + #else + A_STATIC AD1 ASinD1(AD1 a){return sin(a);} + A_STATIC AF1 ASinF1(AF1 a){return sinf(a);} + #endif +//------------------------------------------------------------------------------------------------------------------------------ + #ifdef A_GCC + A_STATIC AD1 ASqrtD1(AD1 a){return __builtin_sqrt(a);} + A_STATIC AF1 ASqrtF1(AF1 a){return __builtin_sqrtf(a);} + #else + A_STATIC AD1 ASqrtD1(AD1 a){return sqrt(a);} + A_STATIC AF1 ASqrtF1(AF1 a){return sqrtf(a);} + #endif +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +//_____________________________________________________________/\_______________________________________________________________ +//============================================================================================================================== +// SCALAR RETURN OPS - DEPENDENT +//============================================================================================================================== + A_STATIC AD1 AClampD1(AD1 x,AD1 n,AD1 m){return AMaxD1(n,AMinD1(x,m));} + A_STATIC AF1 AClampF1(AF1 x,AF1 n,AF1 m){return AMaxF1(n,AMinF1(x,m));} +//------------------------------------------------------------------------------------------------------------------------------ + A_STATIC AD1 AFractD1(AD1 a){return a-AFloorD1(a);} + A_STATIC AF1 AFractF1(AF1 a){return a-AFloorF1(a);} +//------------------------------------------------------------------------------------------------------------------------------ + A_STATIC AD1 APowD1(AD1 a,AD1 b){return AExp2D1(b*ALog2D1(a));} + A_STATIC AF1 APowF1(AF1 a,AF1 b){return AExp2F1(b*ALog2F1(a));} +//------------------------------------------------------------------------------------------------------------------------------ + A_STATIC AD1 ARsqD1(AD1 a){return ARcpD1(ASqrtD1(a));} + A_STATIC AF1 ARsqF1(AF1 a){return ARcpF1(ASqrtF1(a));} +//------------------------------------------------------------------------------------------------------------------------------ + A_STATIC AD1 ASatD1(AD1 a){return AMinD1(1.0,AMaxD1(0.0,a));} + A_STATIC AF1 ASatF1(AF1 a){return AMinF1(1.0f,AMaxF1(0.0f,a));} +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +//_____________________________________________________________/\_______________________________________________________________ +//============================================================================================================================== +// VECTOR OPS +//------------------------------------------------------------------------------------------------------------------------------ +// These are added as needed for production or prototyping, so not necessarily a complete set. +// They follow a convention of taking in a destination and also returning the destination value to increase utility. +//============================================================================================================================== + A_STATIC retAD2 opAAbsD2(outAD2 d,inAD2 a){d[0]=AAbsD1(a[0]);d[1]=AAbsD1(a[1]);return d;} + A_STATIC retAD3 opAAbsD3(outAD3 d,inAD3 a){d[0]=AAbsD1(a[0]);d[1]=AAbsD1(a[1]);d[2]=AAbsD1(a[2]);return d;} + A_STATIC retAD4 opAAbsD4(outAD4 d,inAD4 a){d[0]=AAbsD1(a[0]);d[1]=AAbsD1(a[1]);d[2]=AAbsD1(a[2]);d[3]=AAbsD1(a[3]);return d;} +//------------------------------------------------------------------------------------------------------------------------------ + A_STATIC retAF2 opAAbsF2(outAF2 d,inAF2 a){d[0]=AAbsF1(a[0]);d[1]=AAbsF1(a[1]);return d;} + A_STATIC retAF3 opAAbsF3(outAF3 d,inAF3 a){d[0]=AAbsF1(a[0]);d[1]=AAbsF1(a[1]);d[2]=AAbsF1(a[2]);return d;} + A_STATIC retAF4 opAAbsF4(outAF4 d,inAF4 a){d[0]=AAbsF1(a[0]);d[1]=AAbsF1(a[1]);d[2]=AAbsF1(a[2]);d[3]=AAbsF1(a[3]);return d;} +//============================================================================================================================== + A_STATIC retAD2 opAAddD2(outAD2 d,inAD2 a,inAD2 b){d[0]=a[0]+b[0];d[1]=a[1]+b[1];return d;} + A_STATIC retAD3 opAAddD3(outAD3 d,inAD3 a,inAD3 b){d[0]=a[0]+b[0];d[1]=a[1]+b[1];d[2]=a[2]+b[2];return d;} + A_STATIC retAD4 opAAddD4(outAD4 d,inAD4 a,inAD4 b){d[0]=a[0]+b[0];d[1]=a[1]+b[1];d[2]=a[2]+b[2];d[3]=a[3]+b[3];return d;} +//------------------------------------------------------------------------------------------------------------------------------ + A_STATIC retAF2 opAAddF2(outAF2 d,inAF2 a,inAF2 b){d[0]=a[0]+b[0];d[1]=a[1]+b[1];return d;} + A_STATIC retAF3 opAAddF3(outAF3 d,inAF3 a,inAF3 b){d[0]=a[0]+b[0];d[1]=a[1]+b[1];d[2]=a[2]+b[2];return d;} + A_STATIC retAF4 opAAddF4(outAF4 d,inAF4 a,inAF4 b){d[0]=a[0]+b[0];d[1]=a[1]+b[1];d[2]=a[2]+b[2];d[3]=a[3]+b[3];return d;} +//============================================================================================================================== + A_STATIC retAD2 opAAddOneD2(outAD2 d,inAD2 a,AD1 b){d[0]=a[0]+b;d[1]=a[1]+b;return d;} + A_STATIC retAD3 opAAddOneD3(outAD3 d,inAD3 a,AD1 b){d[0]=a[0]+b;d[1]=a[1]+b;d[2]=a[2]+b;return d;} + A_STATIC retAD4 opAAddOneD4(outAD4 d,inAD4 a,AD1 b){d[0]=a[0]+b;d[1]=a[1]+b;d[2]=a[2]+b;d[3]=a[3]+b;return d;} +//------------------------------------------------------------------------------------------------------------------------------ + A_STATIC retAF2 opAAddOneF2(outAF2 d,inAF2 a,AF1 b){d[0]=a[0]+b;d[1]=a[1]+b;return d;} + A_STATIC retAF3 opAAddOneF3(outAF3 d,inAF3 a,AF1 b){d[0]=a[0]+b;d[1]=a[1]+b;d[2]=a[2]+b;return d;} + A_STATIC retAF4 opAAddOneF4(outAF4 d,inAF4 a,AF1 b){d[0]=a[0]+b;d[1]=a[1]+b;d[2]=a[2]+b;d[3]=a[3]+b;return d;} +//============================================================================================================================== + A_STATIC retAD2 opACpyD2(outAD2 d,inAD2 a){d[0]=a[0];d[1]=a[1];return d;} + A_STATIC retAD3 opACpyD3(outAD3 d,inAD3 a){d[0]=a[0];d[1]=a[1];d[2]=a[2];return d;} + A_STATIC retAD4 opACpyD4(outAD4 d,inAD4 a){d[0]=a[0];d[1]=a[1];d[2]=a[2];d[3]=a[3];return d;} +//------------------------------------------------------------------------------------------------------------------------------ + A_STATIC retAF2 opACpyF2(outAF2 d,inAF2 a){d[0]=a[0];d[1]=a[1];return d;} + A_STATIC retAF3 opACpyF3(outAF3 d,inAF3 a){d[0]=a[0];d[1]=a[1];d[2]=a[2];return d;} + A_STATIC retAF4 opACpyF4(outAF4 d,inAF4 a){d[0]=a[0];d[1]=a[1];d[2]=a[2];d[3]=a[3];return d;} +//============================================================================================================================== + A_STATIC retAD2 opALerpD2(outAD2 d,inAD2 a,inAD2 b,inAD2 c){d[0]=ALerpD1(a[0],b[0],c[0]);d[1]=ALerpD1(a[1],b[1],c[1]);return d;} + A_STATIC retAD3 opALerpD3(outAD3 d,inAD3 a,inAD3 b,inAD3 c){d[0]=ALerpD1(a[0],b[0],c[0]);d[1]=ALerpD1(a[1],b[1],c[1]);d[2]=ALerpD1(a[2],b[2],c[2]);return d;} + A_STATIC retAD4 opALerpD4(outAD4 d,inAD4 a,inAD4 b,inAD4 c){d[0]=ALerpD1(a[0],b[0],c[0]);d[1]=ALerpD1(a[1],b[1],c[1]);d[2]=ALerpD1(a[2],b[2],c[2]);d[3]=ALerpD1(a[3],b[3],c[3]);return d;} +//------------------------------------------------------------------------------------------------------------------------------ + A_STATIC retAF2 opALerpF2(outAF2 d,inAF2 a,inAF2 b,inAF2 c){d[0]=ALerpF1(a[0],b[0],c[0]);d[1]=ALerpF1(a[1],b[1],c[1]);return d;} + A_STATIC retAF3 opALerpF3(outAF3 d,inAF3 a,inAF3 b,inAF3 c){d[0]=ALerpF1(a[0],b[0],c[0]);d[1]=ALerpF1(a[1],b[1],c[1]);d[2]=ALerpF1(a[2],b[2],c[2]);return d;} + A_STATIC retAF4 opALerpF4(outAF4 d,inAF4 a,inAF4 b,inAF4 c){d[0]=ALerpF1(a[0],b[0],c[0]);d[1]=ALerpF1(a[1],b[1],c[1]);d[2]=ALerpF1(a[2],b[2],c[2]);d[3]=ALerpF1(a[3],b[3],c[3]);return d;} +//============================================================================================================================== + A_STATIC retAD2 opALerpOneD2(outAD2 d,inAD2 a,inAD2 b,AD1 c){d[0]=ALerpD1(a[0],b[0],c);d[1]=ALerpD1(a[1],b[1],c);return d;} + A_STATIC retAD3 opALerpOneD3(outAD3 d,inAD3 a,inAD3 b,AD1 c){d[0]=ALerpD1(a[0],b[0],c);d[1]=ALerpD1(a[1],b[1],c);d[2]=ALerpD1(a[2],b[2],c);return d;} + A_STATIC retAD4 opALerpOneD4(outAD4 d,inAD4 a,inAD4 b,AD1 c){d[0]=ALerpD1(a[0],b[0],c);d[1]=ALerpD1(a[1],b[1],c);d[2]=ALerpD1(a[2],b[2],c);d[3]=ALerpD1(a[3],b[3],c);return d;} +//------------------------------------------------------------------------------------------------------------------------------ + A_STATIC retAF2 opALerpOneF2(outAF2 d,inAF2 a,inAF2 b,AF1 c){d[0]=ALerpF1(a[0],b[0],c);d[1]=ALerpF1(a[1],b[1],c);return d;} + A_STATIC retAF3 opALerpOneF3(outAF3 d,inAF3 a,inAF3 b,AF1 c){d[0]=ALerpF1(a[0],b[0],c);d[1]=ALerpF1(a[1],b[1],c);d[2]=ALerpF1(a[2],b[2],c);return d;} + A_STATIC retAF4 opALerpOneF4(outAF4 d,inAF4 a,inAF4 b,AF1 c){d[0]=ALerpF1(a[0],b[0],c);d[1]=ALerpF1(a[1],b[1],c);d[2]=ALerpF1(a[2],b[2],c);d[3]=ALerpF1(a[3],b[3],c);return d;} +//============================================================================================================================== + A_STATIC retAD2 opAMaxD2(outAD2 d,inAD2 a,inAD2 b){d[0]=AMaxD1(a[0],b[0]);d[1]=AMaxD1(a[1],b[1]);return d;} + A_STATIC retAD3 opAMaxD3(outAD3 d,inAD3 a,inAD3 b){d[0]=AMaxD1(a[0],b[0]);d[1]=AMaxD1(a[1],b[1]);d[2]=AMaxD1(a[2],b[2]);return d;} + A_STATIC retAD4 opAMaxD4(outAD4 d,inAD4 a,inAD4 b){d[0]=AMaxD1(a[0],b[0]);d[1]=AMaxD1(a[1],b[1]);d[2]=AMaxD1(a[2],b[2]);d[3]=AMaxD1(a[3],b[3]);return d;} +//------------------------------------------------------------------------------------------------------------------------------ + A_STATIC retAF2 opAMaxF2(outAF2 d,inAF2 a,inAF2 b){d[0]=AMaxF1(a[0],b[0]);d[1]=AMaxF1(a[1],b[1]);return d;} + A_STATIC retAF3 opAMaxF3(outAF3 d,inAF3 a,inAF3 b){d[0]=AMaxF1(a[0],b[0]);d[1]=AMaxF1(a[1],b[1]);d[2]=AMaxF1(a[2],b[2]);return d;} + A_STATIC retAF4 opAMaxF4(outAF4 d,inAF4 a,inAF4 b){d[0]=AMaxF1(a[0],b[0]);d[1]=AMaxF1(a[1],b[1]);d[2]=AMaxF1(a[2],b[2]);d[3]=AMaxF1(a[3],b[3]);return d;} +//============================================================================================================================== + A_STATIC retAD2 opAMinD2(outAD2 d,inAD2 a,inAD2 b){d[0]=AMinD1(a[0],b[0]);d[1]=AMinD1(a[1],b[1]);return d;} + A_STATIC retAD3 opAMinD3(outAD3 d,inAD3 a,inAD3 b){d[0]=AMinD1(a[0],b[0]);d[1]=AMinD1(a[1],b[1]);d[2]=AMinD1(a[2],b[2]);return d;} + A_STATIC retAD4 opAMinD4(outAD4 d,inAD4 a,inAD4 b){d[0]=AMinD1(a[0],b[0]);d[1]=AMinD1(a[1],b[1]);d[2]=AMinD1(a[2],b[2]);d[3]=AMinD1(a[3],b[3]);return d;} +//------------------------------------------------------------------------------------------------------------------------------ + A_STATIC retAF2 opAMinF2(outAF2 d,inAF2 a,inAF2 b){d[0]=AMinF1(a[0],b[0]);d[1]=AMinF1(a[1],b[1]);return d;} + A_STATIC retAF3 opAMinF3(outAF3 d,inAF3 a,inAF3 b){d[0]=AMinF1(a[0],b[0]);d[1]=AMinF1(a[1],b[1]);d[2]=AMinF1(a[2],b[2]);return d;} + A_STATIC retAF4 opAMinF4(outAF4 d,inAF4 a,inAF4 b){d[0]=AMinF1(a[0],b[0]);d[1]=AMinF1(a[1],b[1]);d[2]=AMinF1(a[2],b[2]);d[3]=AMinF1(a[3],b[3]);return d;} +//============================================================================================================================== + A_STATIC retAD2 opAMulD2(outAD2 d,inAD2 a,inAD2 b){d[0]=a[0]*b[0];d[1]=a[1]*b[1];return d;} + A_STATIC retAD3 opAMulD3(outAD3 d,inAD3 a,inAD3 b){d[0]=a[0]*b[0];d[1]=a[1]*b[1];d[2]=a[2]*b[2];return d;} + A_STATIC retAD4 opAMulD4(outAD4 d,inAD4 a,inAD4 b){d[0]=a[0]*b[0];d[1]=a[1]*b[1];d[2]=a[2]*b[2];d[3]=a[3]*b[3];return d;} +//------------------------------------------------------------------------------------------------------------------------------ + A_STATIC retAF2 opAMulF2(outAF2 d,inAF2 a,inAF2 b){d[0]=a[0]*b[0];d[1]=a[1]*b[1];return d;} + A_STATIC retAF3 opAMulF3(outAF3 d,inAF3 a,inAF3 b){d[0]=a[0]*b[0];d[1]=a[1]*b[1];d[2]=a[2]*b[2];return d;} + A_STATIC retAF4 opAMulF4(outAF4 d,inAF4 a,inAF4 b){d[0]=a[0]*b[0];d[1]=a[1]*b[1];d[2]=a[2]*b[2];d[3]=a[3]*b[3];return d;} +//============================================================================================================================== + A_STATIC retAD2 opAMulOneD2(outAD2 d,inAD2 a,AD1 b){d[0]=a[0]*b;d[1]=a[1]*b;return d;} + A_STATIC retAD3 opAMulOneD3(outAD3 d,inAD3 a,AD1 b){d[0]=a[0]*b;d[1]=a[1]*b;d[2]=a[2]*b;return d;} + A_STATIC retAD4 opAMulOneD4(outAD4 d,inAD4 a,AD1 b){d[0]=a[0]*b;d[1]=a[1]*b;d[2]=a[2]*b;d[3]=a[3]*b;return d;} +//------------------------------------------------------------------------------------------------------------------------------ + A_STATIC retAF2 opAMulOneF2(outAF2 d,inAF2 a,AF1 b){d[0]=a[0]*b;d[1]=a[1]*b;return d;} + A_STATIC retAF3 opAMulOneF3(outAF3 d,inAF3 a,AF1 b){d[0]=a[0]*b;d[1]=a[1]*b;d[2]=a[2]*b;return d;} + A_STATIC retAF4 opAMulOneF4(outAF4 d,inAF4 a,AF1 b){d[0]=a[0]*b;d[1]=a[1]*b;d[2]=a[2]*b;d[3]=a[3]*b;return d;} +//============================================================================================================================== + A_STATIC retAD2 opANegD2(outAD2 d,inAD2 a){d[0]=-a[0];d[1]=-a[1];return d;} + A_STATIC retAD3 opANegD3(outAD3 d,inAD3 a){d[0]=-a[0];d[1]=-a[1];d[2]=-a[2];return d;} + A_STATIC retAD4 opANegD4(outAD4 d,inAD4 a){d[0]=-a[0];d[1]=-a[1];d[2]=-a[2];d[3]=-a[3];return d;} +//------------------------------------------------------------------------------------------------------------------------------ + A_STATIC retAF2 opANegF2(outAF2 d,inAF2 a){d[0]=-a[0];d[1]=-a[1];return d;} + A_STATIC retAF3 opANegF3(outAF3 d,inAF3 a){d[0]=-a[0];d[1]=-a[1];d[2]=-a[2];return d;} + A_STATIC retAF4 opANegF4(outAF4 d,inAF4 a){d[0]=-a[0];d[1]=-a[1];d[2]=-a[2];d[3]=-a[3];return d;} +//============================================================================================================================== + A_STATIC retAD2 opARcpD2(outAD2 d,inAD2 a){d[0]=ARcpD1(a[0]);d[1]=ARcpD1(a[1]);return d;} + A_STATIC retAD3 opARcpD3(outAD3 d,inAD3 a){d[0]=ARcpD1(a[0]);d[1]=ARcpD1(a[1]);d[2]=ARcpD1(a[2]);return d;} + A_STATIC retAD4 opARcpD4(outAD4 d,inAD4 a){d[0]=ARcpD1(a[0]);d[1]=ARcpD1(a[1]);d[2]=ARcpD1(a[2]);d[3]=ARcpD1(a[3]);return d;} +//------------------------------------------------------------------------------------------------------------------------------ + A_STATIC retAF2 opARcpF2(outAF2 d,inAF2 a){d[0]=ARcpF1(a[0]);d[1]=ARcpF1(a[1]);return d;} + A_STATIC retAF3 opARcpF3(outAF3 d,inAF3 a){d[0]=ARcpF1(a[0]);d[1]=ARcpF1(a[1]);d[2]=ARcpF1(a[2]);return d;} + A_STATIC retAF4 opARcpF4(outAF4 d,inAF4 a){d[0]=ARcpF1(a[0]);d[1]=ARcpF1(a[1]);d[2]=ARcpF1(a[2]);d[3]=ARcpF1(a[3]);return d;} +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +//_____________________________________________________________/\_______________________________________________________________ +//============================================================================================================================== +// HALF FLOAT PACKING +//============================================================================================================================== + // Convert float to half (in lower 16-bits of output). + // Same fast technique as documented here: ftp://ftp.fox-toolkit.org/pub/fasthalffloatconversion.pdf + // Supports denormals. + // Conversion rules are to make computations possibly "safer" on the GPU, + // -INF & -NaN -> -65504 + // +INF & +NaN -> +65504 + A_STATIC AU1 AU1_AH1_AF1(AF1 f){ + static AW1 base[512]={ + 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, + 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, + 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, + 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, + 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, + 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, + 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0001,0x0002,0x0004,0x0008,0x0010,0x0020,0x0040,0x0080,0x0100, + 0x0200,0x0400,0x0800,0x0c00,0x1000,0x1400,0x1800,0x1c00,0x2000,0x2400,0x2800,0x2c00,0x3000,0x3400,0x3800,0x3c00, + 0x4000,0x4400,0x4800,0x4c00,0x5000,0x5400,0x5800,0x5c00,0x6000,0x6400,0x6800,0x6c00,0x7000,0x7400,0x7800,0x7bff, + 0x7bff,0x7bff,0x7bff,0x7bff,0x7bff,0x7bff,0x7bff,0x7bff,0x7bff,0x7bff,0x7bff,0x7bff,0x7bff,0x7bff,0x7bff,0x7bff, + 0x7bff,0x7bff,0x7bff,0x7bff,0x7bff,0x7bff,0x7bff,0x7bff,0x7bff,0x7bff,0x7bff,0x7bff,0x7bff,0x7bff,0x7bff,0x7bff, + 0x7bff,0x7bff,0x7bff,0x7bff,0x7bff,0x7bff,0x7bff,0x7bff,0x7bff,0x7bff,0x7bff,0x7bff,0x7bff,0x7bff,0x7bff,0x7bff, + 0x7bff,0x7bff,0x7bff,0x7bff,0x7bff,0x7bff,0x7bff,0x7bff,0x7bff,0x7bff,0x7bff,0x7bff,0x7bff,0x7bff,0x7bff,0x7bff, + 0x7bff,0x7bff,0x7bff,0x7bff,0x7bff,0x7bff,0x7bff,0x7bff,0x7bff,0x7bff,0x7bff,0x7bff,0x7bff,0x7bff,0x7bff,0x7bff, + 0x7bff,0x7bff,0x7bff,0x7bff,0x7bff,0x7bff,0x7bff,0x7bff,0x7bff,0x7bff,0x7bff,0x7bff,0x7bff,0x7bff,0x7bff,0x7bff, + 0x7bff,0x7bff,0x7bff,0x7bff,0x7bff,0x7bff,0x7bff,0x7bff,0x7bff,0x7bff,0x7bff,0x7bff,0x7bff,0x7bff,0x7bff,0x7bff, + 0x8000,0x8000,0x8000,0x8000,0x8000,0x8000,0x8000,0x8000,0x8000,0x8000,0x8000,0x8000,0x8000,0x8000,0x8000,0x8000, + 0x8000,0x8000,0x8000,0x8000,0x8000,0x8000,0x8000,0x8000,0x8000,0x8000,0x8000,0x8000,0x8000,0x8000,0x8000,0x8000, + 0x8000,0x8000,0x8000,0x8000,0x8000,0x8000,0x8000,0x8000,0x8000,0x8000,0x8000,0x8000,0x8000,0x8000,0x8000,0x8000, + 0x8000,0x8000,0x8000,0x8000,0x8000,0x8000,0x8000,0x8000,0x8000,0x8000,0x8000,0x8000,0x8000,0x8000,0x8000,0x8000, + 0x8000,0x8000,0x8000,0x8000,0x8000,0x8000,0x8000,0x8000,0x8000,0x8000,0x8000,0x8000,0x8000,0x8000,0x8000,0x8000, + 0x8000,0x8000,0x8000,0x8000,0x8000,0x8000,0x8000,0x8000,0x8000,0x8000,0x8000,0x8000,0x8000,0x8000,0x8000,0x8000, + 0x8000,0x8000,0x8000,0x8000,0x8000,0x8000,0x8000,0x8001,0x8002,0x8004,0x8008,0x8010,0x8020,0x8040,0x8080,0x8100, + 0x8200,0x8400,0x8800,0x8c00,0x9000,0x9400,0x9800,0x9c00,0xa000,0xa400,0xa800,0xac00,0xb000,0xb400,0xb800,0xbc00, + 0xc000,0xc400,0xc800,0xcc00,0xd000,0xd400,0xd800,0xdc00,0xe000,0xe400,0xe800,0xec00,0xf000,0xf400,0xf800,0xfbff, + 0xfbff,0xfbff,0xfbff,0xfbff,0xfbff,0xfbff,0xfbff,0xfbff,0xfbff,0xfbff,0xfbff,0xfbff,0xfbff,0xfbff,0xfbff,0xfbff, + 0xfbff,0xfbff,0xfbff,0xfbff,0xfbff,0xfbff,0xfbff,0xfbff,0xfbff,0xfbff,0xfbff,0xfbff,0xfbff,0xfbff,0xfbff,0xfbff, + 0xfbff,0xfbff,0xfbff,0xfbff,0xfbff,0xfbff,0xfbff,0xfbff,0xfbff,0xfbff,0xfbff,0xfbff,0xfbff,0xfbff,0xfbff,0xfbff, + 0xfbff,0xfbff,0xfbff,0xfbff,0xfbff,0xfbff,0xfbff,0xfbff,0xfbff,0xfbff,0xfbff,0xfbff,0xfbff,0xfbff,0xfbff,0xfbff, + 0xfbff,0xfbff,0xfbff,0xfbff,0xfbff,0xfbff,0xfbff,0xfbff,0xfbff,0xfbff,0xfbff,0xfbff,0xfbff,0xfbff,0xfbff,0xfbff, + 0xfbff,0xfbff,0xfbff,0xfbff,0xfbff,0xfbff,0xfbff,0xfbff,0xfbff,0xfbff,0xfbff,0xfbff,0xfbff,0xfbff,0xfbff,0xfbff, + 0xfbff,0xfbff,0xfbff,0xfbff,0xfbff,0xfbff,0xfbff,0xfbff,0xfbff,0xfbff,0xfbff,0xfbff,0xfbff,0xfbff,0xfbff,0xfbff}; + static AB1 shift[512]={ + 0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18, + 0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18, + 0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18, + 0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18, + 0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18, + 0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18, + 0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x17,0x16,0x15,0x14,0x13,0x12,0x11,0x10,0x0f, + 0x0e,0x0d,0x0d,0x0d,0x0d,0x0d,0x0d,0x0d,0x0d,0x0d,0x0d,0x0d,0x0d,0x0d,0x0d,0x0d, + 0x0d,0x0d,0x0d,0x0d,0x0d,0x0d,0x0d,0x0d,0x0d,0x0d,0x0d,0x0d,0x0d,0x0d,0x0d,0x18, + 0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18, + 0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18, + 0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18, + 0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18, + 0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18, + 0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18, + 0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18, + 0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18, + 0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18, + 0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18, + 0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18, + 0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18, + 0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18, + 0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x17,0x16,0x15,0x14,0x13,0x12,0x11,0x10,0x0f, + 0x0e,0x0d,0x0d,0x0d,0x0d,0x0d,0x0d,0x0d,0x0d,0x0d,0x0d,0x0d,0x0d,0x0d,0x0d,0x0d, + 0x0d,0x0d,0x0d,0x0d,0x0d,0x0d,0x0d,0x0d,0x0d,0x0d,0x0d,0x0d,0x0d,0x0d,0x0d,0x18, + 0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18, + 0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18, + 0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18, + 0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18, + 0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18, + 0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18, + 0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18}; + union{AF1 f;AU1 u;}bits;bits.f=f;AU1 u=bits.u;AU1 i=u>>23;return (AU1)(base[i])+((u&0x7fffff)>>shift[i]);} +//------------------------------------------------------------------------------------------------------------------------------ + // Used to output packed constant. + A_STATIC AU1 AU1_AH2_AF2(inAF2 a){return AU1_AH1_AF1(a[0])+(AU1_AH1_AF1(a[1])<<16);} +#endif +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +//_____________________________________________________________/\_______________________________________________________________ +//============================================================================================================================== +// +// +// GLSL +// +// +//============================================================================================================================== +#if defined(A_GLSL) && defined(A_GPU) + #ifndef A_SKIP_EXT + #ifdef A_HALF + #extension GL_EXT_shader_16bit_storage:require + #extension GL_EXT_shader_explicit_arithmetic_types:require + #endif +//------------------------------------------------------------------------------------------------------------------------------ + #ifdef A_LONG + #extension GL_ARB_gpu_shader_int64:require + #extension GL_NV_shader_atomic_int64:require + #endif +//------------------------------------------------------------------------------------------------------------------------------ + #ifdef A_WAVE + #extension GL_KHR_shader_subgroup_arithmetic:require + #extension GL_KHR_shader_subgroup_ballot:require + #extension GL_KHR_shader_subgroup_quad:require + #extension GL_KHR_shader_subgroup_shuffle:require + #endif + #endif +//============================================================================================================================== + #define AP1 bool + #define AP2 bvec2 + #define AP3 bvec3 + #define AP4 bvec4 +//------------------------------------------------------------------------------------------------------------------------------ + #define AF1 float + #define AF2 vec2 + #define AF3 vec3 + #define AF4 vec4 +//------------------------------------------------------------------------------------------------------------------------------ + #define AU1 uint + #define AU2 uvec2 + #define AU3 uvec3 + #define AU4 uvec4 +//------------------------------------------------------------------------------------------------------------------------------ + #define ASU1 int + #define ASU2 ivec2 + #define ASU3 ivec3 + #define ASU4 ivec4 +//============================================================================================================================== + #define AF1_AU1(x) uintBitsToFloat(AU1(x)) + #define AF2_AU2(x) uintBitsToFloat(AU2(x)) + #define AF3_AU3(x) uintBitsToFloat(AU3(x)) + #define AF4_AU4(x) uintBitsToFloat(AU4(x)) +//------------------------------------------------------------------------------------------------------------------------------ + #define AU1_AF1(x) floatBitsToUint(AF1(x)) + #define AU2_AF2(x) floatBitsToUint(AF2(x)) + #define AU3_AF3(x) floatBitsToUint(AF3(x)) + #define AU4_AF4(x) floatBitsToUint(AF4(x)) +//------------------------------------------------------------------------------------------------------------------------------ + AU1 AU1_AH1_AF1_x(AF1 a){return packHalf2x16(AF2(a,0.0));} + #define AU1_AH1_AF1(a) AU1_AH1_AF1_x(AF1(a)) +//------------------------------------------------------------------------------------------------------------------------------ + #define AU1_AH2_AF2 packHalf2x16 + #define AU1_AW2Unorm_AF2 packUnorm2x16 + #define AU1_AB4Unorm_AF4 packUnorm4x8 +//------------------------------------------------------------------------------------------------------------------------------ + #define AF2_AH2_AU1 unpackHalf2x16 + #define AF2_AW2Unorm_AU1 unpackUnorm2x16 + #define AF4_AB4Unorm_AU1 unpackUnorm4x8 +//============================================================================================================================== + AF1 AF1_x(AF1 a){return AF1(a);} + AF2 AF2_x(AF1 a){return AF2(a,a);} + AF3 AF3_x(AF1 a){return AF3(a,a,a);} + AF4 AF4_x(AF1 a){return AF4(a,a,a,a);} + #define AF1_(a) AF1_x(AF1(a)) + #define AF2_(a) AF2_x(AF1(a)) + #define AF3_(a) AF3_x(AF1(a)) + #define AF4_(a) AF4_x(AF1(a)) +//------------------------------------------------------------------------------------------------------------------------------ + AU1 AU1_x(AU1 a){return AU1(a);} + AU2 AU2_x(AU1 a){return AU2(a,a);} + AU3 AU3_x(AU1 a){return AU3(a,a,a);} + AU4 AU4_x(AU1 a){return AU4(a,a,a,a);} + #define AU1_(a) AU1_x(AU1(a)) + #define AU2_(a) AU2_x(AU1(a)) + #define AU3_(a) AU3_x(AU1(a)) + #define AU4_(a) AU4_x(AU1(a)) +//============================================================================================================================== + AU1 AAbsSU1(AU1 a){return AU1(abs(ASU1(a)));} + AU2 AAbsSU2(AU2 a){return AU2(abs(ASU2(a)));} + AU3 AAbsSU3(AU3 a){return AU3(abs(ASU3(a)));} + AU4 AAbsSU4(AU4 a){return AU4(abs(ASU4(a)));} +//------------------------------------------------------------------------------------------------------------------------------ + AU1 ABfe(AU1 src,AU1 off,AU1 bits){return bitfieldExtract(src,ASU1(off),ASU1(bits));} + AU1 ABfi(AU1 src,AU1 ins,AU1 mask){return (ins&mask)|(src&(~mask));} + // Proxy for V_BFI_B32 where the 'mask' is set as 'bits', 'mask=(1<>ASU1(b));} + AU2 AShrSU2(AU2 a,AU2 b){return AU2(ASU2(a)>>ASU2(b));} + AU3 AShrSU3(AU3 a,AU3 b){return AU3(ASU3(a)>>ASU3(b));} + AU4 AShrSU4(AU4 a,AU4 b){return AU4(ASU4(a)>>ASU4(b));} +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +//_____________________________________________________________/\_______________________________________________________________ +//============================================================================================================================== +// GLSL BYTE +//============================================================================================================================== + #ifdef A_BYTE + #define AB1 uint8_t + #define AB2 u8vec2 + #define AB3 u8vec3 + #define AB4 u8vec4 +//------------------------------------------------------------------------------------------------------------------------------ + #define ASB1 int8_t + #define ASB2 i8vec2 + #define ASB3 i8vec3 + #define ASB4 i8vec4 +//------------------------------------------------------------------------------------------------------------------------------ + AB1 AB1_x(AB1 a){return AB1(a);} + AB2 AB2_x(AB1 a){return AB2(a,a);} + AB3 AB3_x(AB1 a){return AB3(a,a,a);} + AB4 AB4_x(AB1 a){return AB4(a,a,a,a);} + #define AB1_(a) AB1_x(AB1(a)) + #define AB2_(a) AB2_x(AB1(a)) + #define AB3_(a) AB3_x(AB1(a)) + #define AB4_(a) AB4_x(AB1(a)) + #endif +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +//_____________________________________________________________/\_______________________________________________________________ +//============================================================================================================================== +// GLSL HALF +//============================================================================================================================== + #ifdef A_HALF + #define AH1 float16_t + #define AH2 f16vec2 + #define AH3 f16vec3 + #define AH4 f16vec4 +//------------------------------------------------------------------------------------------------------------------------------ + #define AW1 uint16_t + #define AW2 u16vec2 + #define AW3 u16vec3 + #define AW4 u16vec4 +//------------------------------------------------------------------------------------------------------------------------------ + #define ASW1 int16_t + #define ASW2 i16vec2 + #define ASW3 i16vec3 + #define ASW4 i16vec4 +//============================================================================================================================== + #define AH2_AU1(x) unpackFloat2x16(AU1(x)) + AH4 AH4_AU2_x(AU2 x){return AH4(unpackFloat2x16(x.x),unpackFloat2x16(x.y));} + #define AH4_AU2(x) AH4_AU2_x(AU2(x)) + #define AW2_AU1(x) unpackUint2x16(AU1(x)) + #define AW4_AU2(x) unpackUint4x16(pack64(AU2(x))) +//------------------------------------------------------------------------------------------------------------------------------ + #define AU1_AH2(x) packFloat2x16(AH2(x)) + AU2 AU2_AH4_x(AH4 x){return AU2(packFloat2x16(x.xy),packFloat2x16(x.zw));} + #define AU2_AH4(x) AU2_AH4_x(AH4(x)) + #define AU1_AW2(x) packUint2x16(AW2(x)) + #define AU2_AW4(x) unpack32(packUint4x16(AW4(x))) +//============================================================================================================================== + #define AW1_AH1(x) halfBitsToUint16(AH1(x)) + #define AW2_AH2(x) halfBitsToUint16(AH2(x)) + #define AW3_AH3(x) halfBitsToUint16(AH3(x)) + #define AW4_AH4(x) halfBitsToUint16(AH4(x)) +//------------------------------------------------------------------------------------------------------------------------------ + #define AH1_AW1(x) uint16BitsToHalf(AW1(x)) + #define AH2_AW2(x) uint16BitsToHalf(AW2(x)) + #define AH3_AW3(x) uint16BitsToHalf(AW3(x)) + #define AH4_AW4(x) uint16BitsToHalf(AW4(x)) +//============================================================================================================================== + AH1 AH1_x(AH1 a){return AH1(a);} + AH2 AH2_x(AH1 a){return AH2(a,a);} + AH3 AH3_x(AH1 a){return AH3(a,a,a);} + AH4 AH4_x(AH1 a){return AH4(a,a,a,a);} + #define AH1_(a) AH1_x(AH1(a)) + #define AH2_(a) AH2_x(AH1(a)) + #define AH3_(a) AH3_x(AH1(a)) + #define AH4_(a) AH4_x(AH1(a)) +//------------------------------------------------------------------------------------------------------------------------------ + AW1 AW1_x(AW1 a){return AW1(a);} + AW2 AW2_x(AW1 a){return AW2(a,a);} + AW3 AW3_x(AW1 a){return AW3(a,a,a);} + AW4 AW4_x(AW1 a){return AW4(a,a,a,a);} + #define AW1_(a) AW1_x(AW1(a)) + #define AW2_(a) AW2_x(AW1(a)) + #define AW3_(a) AW3_x(AW1(a)) + #define AW4_(a) AW4_x(AW1(a)) +//============================================================================================================================== + AW1 AAbsSW1(AW1 a){return AW1(abs(ASW1(a)));} + AW2 AAbsSW2(AW2 a){return AW2(abs(ASW2(a)));} + AW3 AAbsSW3(AW3 a){return AW3(abs(ASW3(a)));} + AW4 AAbsSW4(AW4 a){return AW4(abs(ASW4(a)));} +//------------------------------------------------------------------------------------------------------------------------------ + AH1 AClampH1(AH1 x,AH1 n,AH1 m){return clamp(x,n,m);} + AH2 AClampH2(AH2 x,AH2 n,AH2 m){return clamp(x,n,m);} + AH3 AClampH3(AH3 x,AH3 n,AH3 m){return clamp(x,n,m);} + AH4 AClampH4(AH4 x,AH4 n,AH4 m){return clamp(x,n,m);} +//------------------------------------------------------------------------------------------------------------------------------ + AH1 AFractH1(AH1 x){return fract(x);} + AH2 AFractH2(AH2 x){return fract(x);} + AH3 AFractH3(AH3 x){return fract(x);} + AH4 AFractH4(AH4 x){return fract(x);} +//------------------------------------------------------------------------------------------------------------------------------ + AH1 ALerpH1(AH1 x,AH1 y,AH1 a){return mix(x,y,a);} + AH2 ALerpH2(AH2 x,AH2 y,AH2 a){return mix(x,y,a);} + AH3 ALerpH3(AH3 x,AH3 y,AH3 a){return mix(x,y,a);} + AH4 ALerpH4(AH4 x,AH4 y,AH4 a){return mix(x,y,a);} +//------------------------------------------------------------------------------------------------------------------------------ + // No packed version of max3. + AH1 AMax3H1(AH1 x,AH1 y,AH1 z){return max(x,max(y,z));} + AH2 AMax3H2(AH2 x,AH2 y,AH2 z){return max(x,max(y,z));} + AH3 AMax3H3(AH3 x,AH3 y,AH3 z){return max(x,max(y,z));} + AH4 AMax3H4(AH4 x,AH4 y,AH4 z){return max(x,max(y,z));} +//------------------------------------------------------------------------------------------------------------------------------ + AW1 AMaxSW1(AW1 a,AW1 b){return AW1(max(ASU1(a),ASU1(b)));} + AW2 AMaxSW2(AW2 a,AW2 b){return AW2(max(ASU2(a),ASU2(b)));} + AW3 AMaxSW3(AW3 a,AW3 b){return AW3(max(ASU3(a),ASU3(b)));} + AW4 AMaxSW4(AW4 a,AW4 b){return AW4(max(ASU4(a),ASU4(b)));} +//------------------------------------------------------------------------------------------------------------------------------ + // No packed version of min3. + AH1 AMin3H1(AH1 x,AH1 y,AH1 z){return min(x,min(y,z));} + AH2 AMin3H2(AH2 x,AH2 y,AH2 z){return min(x,min(y,z));} + AH3 AMin3H3(AH3 x,AH3 y,AH3 z){return min(x,min(y,z));} + AH4 AMin3H4(AH4 x,AH4 y,AH4 z){return min(x,min(y,z));} +//------------------------------------------------------------------------------------------------------------------------------ + AW1 AMinSW1(AW1 a,AW1 b){return AW1(min(ASU1(a),ASU1(b)));} + AW2 AMinSW2(AW2 a,AW2 b){return AW2(min(ASU2(a),ASU2(b)));} + AW3 AMinSW3(AW3 a,AW3 b){return AW3(min(ASU3(a),ASU3(b)));} + AW4 AMinSW4(AW4 a,AW4 b){return AW4(min(ASU4(a),ASU4(b)));} +//------------------------------------------------------------------------------------------------------------------------------ + AH1 ARcpH1(AH1 x){return AH1_(1.0)/x;} + AH2 ARcpH2(AH2 x){return AH2_(1.0)/x;} + AH3 ARcpH3(AH3 x){return AH3_(1.0)/x;} + AH4 ARcpH4(AH4 x){return AH4_(1.0)/x;} +//------------------------------------------------------------------------------------------------------------------------------ + AH1 ARsqH1(AH1 x){return AH1_(1.0)/sqrt(x);} + AH2 ARsqH2(AH2 x){return AH2_(1.0)/sqrt(x);} + AH3 ARsqH3(AH3 x){return AH3_(1.0)/sqrt(x);} + AH4 ARsqH4(AH4 x){return AH4_(1.0)/sqrt(x);} +//------------------------------------------------------------------------------------------------------------------------------ + AH1 ASatH1(AH1 x){return clamp(x,AH1_(0.0),AH1_(1.0));} + AH2 ASatH2(AH2 x){return clamp(x,AH2_(0.0),AH2_(1.0));} + AH3 ASatH3(AH3 x){return clamp(x,AH3_(0.0),AH3_(1.0));} + AH4 ASatH4(AH4 x){return clamp(x,AH4_(0.0),AH4_(1.0));} +//------------------------------------------------------------------------------------------------------------------------------ + AW1 AShrSW1(AW1 a,AW1 b){return AW1(ASW1(a)>>ASW1(b));} + AW2 AShrSW2(AW2 a,AW2 b){return AW2(ASW2(a)>>ASW2(b));} + AW3 AShrSW3(AW3 a,AW3 b){return AW3(ASW3(a)>>ASW3(b));} + AW4 AShrSW4(AW4 a,AW4 b){return AW4(ASW4(a)>>ASW4(b));} + #endif +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +//_____________________________________________________________/\_______________________________________________________________ +//============================================================================================================================== +// GLSL DOUBLE +//============================================================================================================================== + #ifdef A_DUBL + #define AD1 double + #define AD2 dvec2 + #define AD3 dvec3 + #define AD4 dvec4 +//------------------------------------------------------------------------------------------------------------------------------ + AD1 AD1_x(AD1 a){return AD1(a);} + AD2 AD2_x(AD1 a){return AD2(a,a);} + AD3 AD3_x(AD1 a){return AD3(a,a,a);} + AD4 AD4_x(AD1 a){return AD4(a,a,a,a);} + #define AD1_(a) AD1_x(AD1(a)) + #define AD2_(a) AD2_x(AD1(a)) + #define AD3_(a) AD3_x(AD1(a)) + #define AD4_(a) AD4_x(AD1(a)) +//============================================================================================================================== + AD1 AFractD1(AD1 x){return fract(x);} + AD2 AFractD2(AD2 x){return fract(x);} + AD3 AFractD3(AD3 x){return fract(x);} + AD4 AFractD4(AD4 x){return fract(x);} +//------------------------------------------------------------------------------------------------------------------------------ + AD1 ALerpD1(AD1 x,AD1 y,AD1 a){return mix(x,y,a);} + AD2 ALerpD2(AD2 x,AD2 y,AD2 a){return mix(x,y,a);} + AD3 ALerpD3(AD3 x,AD3 y,AD3 a){return mix(x,y,a);} + AD4 ALerpD4(AD4 x,AD4 y,AD4 a){return mix(x,y,a);} +//------------------------------------------------------------------------------------------------------------------------------ + AD1 ARcpD1(AD1 x){return AD1_(1.0)/x;} + AD2 ARcpD2(AD2 x){return AD2_(1.0)/x;} + AD3 ARcpD3(AD3 x){return AD3_(1.0)/x;} + AD4 ARcpD4(AD4 x){return AD4_(1.0)/x;} +//------------------------------------------------------------------------------------------------------------------------------ + AD1 ARsqD1(AD1 x){return AD1_(1.0)/sqrt(x);} + AD2 ARsqD2(AD2 x){return AD2_(1.0)/sqrt(x);} + AD3 ARsqD3(AD3 x){return AD3_(1.0)/sqrt(x);} + AD4 ARsqD4(AD4 x){return AD4_(1.0)/sqrt(x);} +//------------------------------------------------------------------------------------------------------------------------------ + AD1 ASatD1(AD1 x){return clamp(x,AD1_(0.0),AD1_(1.0));} + AD2 ASatD2(AD2 x){return clamp(x,AD2_(0.0),AD2_(1.0));} + AD3 ASatD3(AD3 x){return clamp(x,AD3_(0.0),AD3_(1.0));} + AD4 ASatD4(AD4 x){return clamp(x,AD4_(0.0),AD4_(1.0));} + #endif +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +//_____________________________________________________________/\_______________________________________________________________ +//============================================================================================================================== +// GLSL LONG +//============================================================================================================================== + #ifdef A_LONG + #define AL1 uint64_t + #define AL2 u64vec2 + #define AL3 u64vec3 + #define AL4 u64vec4 +//------------------------------------------------------------------------------------------------------------------------------ + #define ASL1 int64_t + #define ASL2 i64vec2 + #define ASL3 i64vec3 + #define ASL4 i64vec4 +//------------------------------------------------------------------------------------------------------------------------------ + #define AL1_AU2(x) packUint2x32(AU2(x)) + #define AU2_AL1(x) unpackUint2x32(AL1(x)) +//------------------------------------------------------------------------------------------------------------------------------ + AL1 AL1_x(AL1 a){return AL1(a);} + AL2 AL2_x(AL1 a){return AL2(a,a);} + AL3 AL3_x(AL1 a){return AL3(a,a,a);} + AL4 AL4_x(AL1 a){return AL4(a,a,a,a);} + #define AL1_(a) AL1_x(AL1(a)) + #define AL2_(a) AL2_x(AL1(a)) + #define AL3_(a) AL3_x(AL1(a)) + #define AL4_(a) AL4_x(AL1(a)) +//============================================================================================================================== + AL1 AAbsSL1(AL1 a){return AL1(abs(ASL1(a)));} + AL2 AAbsSL2(AL2 a){return AL2(abs(ASL2(a)));} + AL3 AAbsSL3(AL3 a){return AL3(abs(ASL3(a)));} + AL4 AAbsSL4(AL4 a){return AL4(abs(ASL4(a)));} +//------------------------------------------------------------------------------------------------------------------------------ + AL1 AMaxSL1(AL1 a,AL1 b){return AL1(max(ASU1(a),ASU1(b)));} + AL2 AMaxSL2(AL2 a,AL2 b){return AL2(max(ASU2(a),ASU2(b)));} + AL3 AMaxSL3(AL3 a,AL3 b){return AL3(max(ASU3(a),ASU3(b)));} + AL4 AMaxSL4(AL4 a,AL4 b){return AL4(max(ASU4(a),ASU4(b)));} +//------------------------------------------------------------------------------------------------------------------------------ + AL1 AMinSL1(AL1 a,AL1 b){return AL1(min(ASU1(a),ASU1(b)));} + AL2 AMinSL2(AL2 a,AL2 b){return AL2(min(ASU2(a),ASU2(b)));} + AL3 AMinSL3(AL3 a,AL3 b){return AL3(min(ASU3(a),ASU3(b)));} + AL4 AMinSL4(AL4 a,AL4 b){return AL4(min(ASU4(a),ASU4(b)));} + #endif +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +//_____________________________________________________________/\_______________________________________________________________ +//============================================================================================================================== +// WAVE OPERATIONS +//============================================================================================================================== + #ifdef A_WAVE + // Where 'x' must be a compile time literal. + AF1 AWaveXorF1(AF1 v,AU1 x){return subgroupShuffleXor(v,x);} + AF2 AWaveXorF2(AF2 v,AU1 x){return subgroupShuffleXor(v,x);} + AF3 AWaveXorF3(AF3 v,AU1 x){return subgroupShuffleXor(v,x);} + AF4 AWaveXorF4(AF4 v,AU1 x){return subgroupShuffleXor(v,x);} + AU1 AWaveXorU1(AU1 v,AU1 x){return subgroupShuffleXor(v,x);} + AU2 AWaveXorU2(AU2 v,AU1 x){return subgroupShuffleXor(v,x);} + AU3 AWaveXorU3(AU3 v,AU1 x){return subgroupShuffleXor(v,x);} + AU4 AWaveXorU4(AU4 v,AU1 x){return subgroupShuffleXor(v,x);} +//------------------------------------------------------------------------------------------------------------------------------ + #ifdef A_HALF + AH2 AWaveXorH2(AH2 v,AU1 x){return AH2_AU1(subgroupShuffleXor(AU1_AH2(v),x));} + AH4 AWaveXorH4(AH4 v,AU1 x){return AH4_AU2(subgroupShuffleXor(AU2_AH4(v),x));} + AW2 AWaveXorW2(AW2 v,AU1 x){return AW2_AU1(subgroupShuffleXor(AU1_AW2(v),x));} + AW4 AWaveXorW4(AW4 v,AU1 x){return AW4_AU2(subgroupShuffleXor(AU2_AW4(v),x));} + #endif + #endif +//============================================================================================================================== +#endif +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +//_____________________________________________________________/\_______________________________________________________________ +//============================================================================================================================== +// +// +// HLSL +// +// +//============================================================================================================================== +#if defined(A_HLSL) && defined(A_GPU) + #ifdef A_HLSL_6_2 + #define AP1 bool + #define AP2 bool2 + #define AP3 bool3 + #define AP4 bool4 +//------------------------------------------------------------------------------------------------------------------------------ + #define AF1 float32_t + #define AF2 float32_t2 + #define AF3 float32_t3 + #define AF4 float32_t4 +//------------------------------------------------------------------------------------------------------------------------------ + #define AU1 uint32_t + #define AU2 uint32_t2 + #define AU3 uint32_t3 + #define AU4 uint32_t4 +//------------------------------------------------------------------------------------------------------------------------------ + #define ASU1 int32_t + #define ASU2 int32_t2 + #define ASU3 int32_t3 + #define ASU4 int32_t4 + #else + #define AP1 bool + #define AP2 bool2 + #define AP3 bool3 + #define AP4 bool4 +//------------------------------------------------------------------------------------------------------------------------------ + #define AF1 float + #define AF2 float2 + #define AF3 float3 + #define AF4 float4 +//------------------------------------------------------------------------------------------------------------------------------ + #define AU1 uint + #define AU2 uint2 + #define AU3 uint3 + #define AU4 uint4 +//------------------------------------------------------------------------------------------------------------------------------ + #define ASU1 int + #define ASU2 int2 + #define ASU3 int3 + #define ASU4 int4 + #endif +//============================================================================================================================== + #define AF1_AU1(x) asfloat(AU1(x)) + #define AF2_AU2(x) asfloat(AU2(x)) + #define AF3_AU3(x) asfloat(AU3(x)) + #define AF4_AU4(x) asfloat(AU4(x)) +//------------------------------------------------------------------------------------------------------------------------------ + #define AU1_AF1(x) asuint(AF1(x)) + #define AU2_AF2(x) asuint(AF2(x)) + #define AU3_AF3(x) asuint(AF3(x)) + #define AU4_AF4(x) asuint(AF4(x)) +//------------------------------------------------------------------------------------------------------------------------------ + AU1 AU1_AH1_AF1_x(AF1 a){return f32tof16(a);} + #define AU1_AH1_AF1(a) AU1_AH1_AF1_x(AF1(a)) +//------------------------------------------------------------------------------------------------------------------------------ + AU1 AU1_AH2_AF2_x(AF2 a){return f32tof16(a.x)|(f32tof16(a.y)<<16);} + #define AU1_AH2_AF2(a) AU1_AH2_AF2_x(AF2(a)) + #define AU1_AB4Unorm_AF4(x) D3DCOLORtoUBYTE4(AF4(x)) +//------------------------------------------------------------------------------------------------------------------------------ + AF2 AF2_AH2_AU1_x(AU1 x){return AF2(f16tof32(x&0xFFFF),f16tof32(x>>16));} + #define AF2_AH2_AU1(x) AF2_AH2_AU1_x(AU1(x)) +//============================================================================================================================== + AF1 AF1_x(AF1 a){return AF1(a);} + AF2 AF2_x(AF1 a){return AF2(a,a);} + AF3 AF3_x(AF1 a){return AF3(a,a,a);} + AF4 AF4_x(AF1 a){return AF4(a,a,a,a);} + #define AF1_(a) AF1_x(AF1(a)) + #define AF2_(a) AF2_x(AF1(a)) + #define AF3_(a) AF3_x(AF1(a)) + #define AF4_(a) AF4_x(AF1(a)) +//------------------------------------------------------------------------------------------------------------------------------ + AU1 AU1_x(AU1 a){return AU1(a);} + AU2 AU2_x(AU1 a){return AU2(a,a);} + AU3 AU3_x(AU1 a){return AU3(a,a,a);} + AU4 AU4_x(AU1 a){return AU4(a,a,a,a);} + #define AU1_(a) AU1_x(AU1(a)) + #define AU2_(a) AU2_x(AU1(a)) + #define AU3_(a) AU3_x(AU1(a)) + #define AU4_(a) AU4_x(AU1(a)) +//============================================================================================================================== + AU1 AAbsSU1(AU1 a){return AU1(abs(ASU1(a)));} + AU2 AAbsSU2(AU2 a){return AU2(abs(ASU2(a)));} + AU3 AAbsSU3(AU3 a){return AU3(abs(ASU3(a)));} + AU4 AAbsSU4(AU4 a){return AU4(abs(ASU4(a)));} +//------------------------------------------------------------------------------------------------------------------------------ + AU1 ABfe(AU1 src,AU1 off,AU1 bits){AU1 mask=(1u<>off)&mask;} + AU1 ABfi(AU1 src,AU1 ins,AU1 mask){return (ins&mask)|(src&(~mask));} + AU1 ABfiM(AU1 src,AU1 ins,AU1 bits){AU1 mask=(1u<>ASU1(b));} + AU2 AShrSU2(AU2 a,AU2 b){return AU2(ASU2(a)>>ASU2(b));} + AU3 AShrSU3(AU3 a,AU3 b){return AU3(ASU3(a)>>ASU3(b));} + AU4 AShrSU4(AU4 a,AU4 b){return AU4(ASU4(a)>>ASU4(b));} +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +//_____________________________________________________________/\_______________________________________________________________ +//============================================================================================================================== +// HLSL BYTE +//============================================================================================================================== + #ifdef A_BYTE + #endif +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +//_____________________________________________________________/\_______________________________________________________________ +//============================================================================================================================== +// HLSL HALF +//============================================================================================================================== + #ifdef A_HALF + #ifdef A_HLSL_6_2 + #define AH1 float16_t + #define AH2 float16_t2 + #define AH3 float16_t3 + #define AH4 float16_t4 +//------------------------------------------------------------------------------------------------------------------------------ + #define AW1 uint16_t + #define AW2 uint16_t2 + #define AW3 uint16_t3 + #define AW4 uint16_t4 +//------------------------------------------------------------------------------------------------------------------------------ + #define ASW1 int16_t + #define ASW2 int16_t2 + #define ASW3 int16_t3 + #define ASW4 int16_t4 + #else + #define AH1 min16float + #define AH2 min16float2 + #define AH3 min16float3 + #define AH4 min16float4 +//------------------------------------------------------------------------------------------------------------------------------ + #define AW1 min16uint + #define AW2 min16uint2 + #define AW3 min16uint3 + #define AW4 min16uint4 +//------------------------------------------------------------------------------------------------------------------------------ + #define ASW1 min16int + #define ASW2 min16int2 + #define ASW3 min16int3 + #define ASW4 min16int4 + #endif +//============================================================================================================================== + // Need to use manual unpack to get optimal execution (don't use packed types in buffers directly). + // Unpack requires this pattern: https://gpuopen.com/first-steps-implementing-fp16/ + AH2 AH2_AU1_x(AU1 x){AF2 t=f16tof32(AU2(x&0xFFFF,x>>16));return AH2(t);} + AH4 AH4_AU2_x(AU2 x){return AH4(AH2_AU1_x(x.x),AH2_AU1_x(x.y));} + AW2 AW2_AU1_x(AU1 x){AU2 t=AU2(x&0xFFFF,x>>16);return AW2(t);} + AW4 AW4_AU2_x(AU2 x){return AW4(AW2_AU1_x(x.x),AW2_AU1_x(x.y));} + #define AH2_AU1(x) AH2_AU1_x(AU1(x)) + #define AH4_AU2(x) AH4_AU2_x(AU2(x)) + #define AW2_AU1(x) AW2_AU1_x(AU1(x)) + #define AW4_AU2(x) AW4_AU2_x(AU2(x)) +//------------------------------------------------------------------------------------------------------------------------------ + AU1 AU1_AH2_x(AH2 x){return f32tof16(x.x)+(f32tof16(x.y)<<16);} + AU2 AU2_AH4_x(AH4 x){return AU2(AU1_AH2_x(x.xy),AU1_AH2_x(x.zw));} + AU1 AU1_AW2_x(AW2 x){return AU1(x.x)+(AU1(x.y)<<16);} + AU2 AU2_AW4_x(AW4 x){return AU2(AU1_AW2_x(x.xy),AU1_AW2_x(x.zw));} + #define AU1_AH2(x) AU1_AH2_x(AH2(x)) + #define AU2_AH4(x) AU2_AH4_x(AH4(x)) + #define AU1_AW2(x) AU1_AW2_x(AW2(x)) + #define AU2_AW4(x) AU2_AW4_x(AW4(x)) +//============================================================================================================================== + #if defined(A_HLSL_6_2) && !defined(A_NO_16_BIT_CAST) + #define AW1_AH1(x) asuint16(x) + #define AW2_AH2(x) asuint16(x) + #define AW3_AH3(x) asuint16(x) + #define AW4_AH4(x) asuint16(x) + #else + #define AW1_AH1(a) AW1(f32tof16(AF1(a))) + #define AW2_AH2(a) AW2(AW1_AH1((a).x),AW1_AH1((a).y)) + #define AW3_AH3(a) AW3(AW1_AH1((a).x),AW1_AH1((a).y),AW1_AH1((a).z)) + #define AW4_AH4(a) AW4(AW1_AH1((a).x),AW1_AH1((a).y),AW1_AH1((a).z),AW1_AH1((a).w)) + #endif +//------------------------------------------------------------------------------------------------------------------------------ + #if defined(A_HLSL_6_2) && !defined(A_NO_16_BIT_CAST) + #define AH1_AW1(x) asfloat16(x) + #define AH2_AW2(x) asfloat16(x) + #define AH3_AW3(x) asfloat16(x) + #define AH4_AW4(x) asfloat16(x) + #else + #define AH1_AW1(a) AH1(f16tof32(AU1(a))) + #define AH2_AW2(a) AH2(AH1_AW1((a).x),AH1_AW1((a).y)) + #define AH3_AW3(a) AH3(AH1_AW1((a).x),AH1_AW1((a).y),AH1_AW1((a).z)) + #define AH4_AW4(a) AH4(AH1_AW1((a).x),AH1_AW1((a).y),AH1_AW1((a).z),AH1_AW1((a).w)) + #endif +//============================================================================================================================== + AH1 AH1_x(AH1 a){return AH1(a);} + AH2 AH2_x(AH1 a){return AH2(a,a);} + AH3 AH3_x(AH1 a){return AH3(a,a,a);} + AH4 AH4_x(AH1 a){return AH4(a,a,a,a);} + #define AH1_(a) AH1_x(AH1(a)) + #define AH2_(a) AH2_x(AH1(a)) + #define AH3_(a) AH3_x(AH1(a)) + #define AH4_(a) AH4_x(AH1(a)) +//------------------------------------------------------------------------------------------------------------------------------ + AW1 AW1_x(AW1 a){return AW1(a);} + AW2 AW2_x(AW1 a){return AW2(a,a);} + AW3 AW3_x(AW1 a){return AW3(a,a,a);} + AW4 AW4_x(AW1 a){return AW4(a,a,a,a);} + #define AW1_(a) AW1_x(AW1(a)) + #define AW2_(a) AW2_x(AW1(a)) + #define AW3_(a) AW3_x(AW1(a)) + #define AW4_(a) AW4_x(AW1(a)) +//============================================================================================================================== + AW1 AAbsSW1(AW1 a){return AW1(abs(ASW1(a)));} + AW2 AAbsSW2(AW2 a){return AW2(abs(ASW2(a)));} + AW3 AAbsSW3(AW3 a){return AW3(abs(ASW3(a)));} + AW4 AAbsSW4(AW4 a){return AW4(abs(ASW4(a)));} +//------------------------------------------------------------------------------------------------------------------------------ + AH1 AClampH1(AH1 x,AH1 n,AH1 m){return max(n,min(x,m));} + AH2 AClampH2(AH2 x,AH2 n,AH2 m){return max(n,min(x,m));} + AH3 AClampH3(AH3 x,AH3 n,AH3 m){return max(n,min(x,m));} + AH4 AClampH4(AH4 x,AH4 n,AH4 m){return max(n,min(x,m));} +//------------------------------------------------------------------------------------------------------------------------------ + // V_FRACT_F16 (note DX frac() is different). + AH1 AFractH1(AH1 x){return x-floor(x);} + AH2 AFractH2(AH2 x){return x-floor(x);} + AH3 AFractH3(AH3 x){return x-floor(x);} + AH4 AFractH4(AH4 x){return x-floor(x);} +//------------------------------------------------------------------------------------------------------------------------------ + AH1 ALerpH1(AH1 x,AH1 y,AH1 a){return lerp(x,y,a);} + AH2 ALerpH2(AH2 x,AH2 y,AH2 a){return lerp(x,y,a);} + AH3 ALerpH3(AH3 x,AH3 y,AH3 a){return lerp(x,y,a);} + AH4 ALerpH4(AH4 x,AH4 y,AH4 a){return lerp(x,y,a);} +//------------------------------------------------------------------------------------------------------------------------------ + AH1 AMax3H1(AH1 x,AH1 y,AH1 z){return max(x,max(y,z));} + AH2 AMax3H2(AH2 x,AH2 y,AH2 z){return max(x,max(y,z));} + AH3 AMax3H3(AH3 x,AH3 y,AH3 z){return max(x,max(y,z));} + AH4 AMax3H4(AH4 x,AH4 y,AH4 z){return max(x,max(y,z));} +//------------------------------------------------------------------------------------------------------------------------------ + AW1 AMaxSW1(AW1 a,AW1 b){return AW1(max(ASU1(a),ASU1(b)));} + AW2 AMaxSW2(AW2 a,AW2 b){return AW2(max(ASU2(a),ASU2(b)));} + AW3 AMaxSW3(AW3 a,AW3 b){return AW3(max(ASU3(a),ASU3(b)));} + AW4 AMaxSW4(AW4 a,AW4 b){return AW4(max(ASU4(a),ASU4(b)));} +//------------------------------------------------------------------------------------------------------------------------------ + AH1 AMin3H1(AH1 x,AH1 y,AH1 z){return min(x,min(y,z));} + AH2 AMin3H2(AH2 x,AH2 y,AH2 z){return min(x,min(y,z));} + AH3 AMin3H3(AH3 x,AH3 y,AH3 z){return min(x,min(y,z));} + AH4 AMin3H4(AH4 x,AH4 y,AH4 z){return min(x,min(y,z));} +//------------------------------------------------------------------------------------------------------------------------------ + AW1 AMinSW1(AW1 a,AW1 b){return AW1(min(ASU1(a),ASU1(b)));} + AW2 AMinSW2(AW2 a,AW2 b){return AW2(min(ASU2(a),ASU2(b)));} + AW3 AMinSW3(AW3 a,AW3 b){return AW3(min(ASU3(a),ASU3(b)));} + AW4 AMinSW4(AW4 a,AW4 b){return AW4(min(ASU4(a),ASU4(b)));} +//------------------------------------------------------------------------------------------------------------------------------ + AH1 ARcpH1(AH1 x){return rcp(x);} + AH2 ARcpH2(AH2 x){return rcp(x);} + AH3 ARcpH3(AH3 x){return rcp(x);} + AH4 ARcpH4(AH4 x){return rcp(x);} +//------------------------------------------------------------------------------------------------------------------------------ + AH1 ARsqH1(AH1 x){return rsqrt(x);} + AH2 ARsqH2(AH2 x){return rsqrt(x);} + AH3 ARsqH3(AH3 x){return rsqrt(x);} + AH4 ARsqH4(AH4 x){return rsqrt(x);} +//------------------------------------------------------------------------------------------------------------------------------ + AH1 ASatH1(AH1 x){return saturate(x);} + AH2 ASatH2(AH2 x){return saturate(x);} + AH3 ASatH3(AH3 x){return saturate(x);} + AH4 ASatH4(AH4 x){return saturate(x);} +//------------------------------------------------------------------------------------------------------------------------------ + AW1 AShrSW1(AW1 a,AW1 b){return AW1(ASW1(a)>>ASW1(b));} + AW2 AShrSW2(AW2 a,AW2 b){return AW2(ASW2(a)>>ASW2(b));} + AW3 AShrSW3(AW3 a,AW3 b){return AW3(ASW3(a)>>ASW3(b));} + AW4 AShrSW4(AW4 a,AW4 b){return AW4(ASW4(a)>>ASW4(b));} + #endif +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +//_____________________________________________________________/\_______________________________________________________________ +//============================================================================================================================== +// HLSL DOUBLE +//============================================================================================================================== + #ifdef A_DUBL + #ifdef A_HLSL_6_2 + #define AD1 float64_t + #define AD2 float64_t2 + #define AD3 float64_t3 + #define AD4 float64_t4 + #else + #define AD1 double + #define AD2 double2 + #define AD3 double3 + #define AD4 double4 + #endif +//------------------------------------------------------------------------------------------------------------------------------ + AD1 AD1_x(AD1 a){return AD1(a);} + AD2 AD2_x(AD1 a){return AD2(a,a);} + AD3 AD3_x(AD1 a){return AD3(a,a,a);} + AD4 AD4_x(AD1 a){return AD4(a,a,a,a);} + #define AD1_(a) AD1_x(AD1(a)) + #define AD2_(a) AD2_x(AD1(a)) + #define AD3_(a) AD3_x(AD1(a)) + #define AD4_(a) AD4_x(AD1(a)) +//============================================================================================================================== + AD1 AFractD1(AD1 a){return a-floor(a);} + AD2 AFractD2(AD2 a){return a-floor(a);} + AD3 AFractD3(AD3 a){return a-floor(a);} + AD4 AFractD4(AD4 a){return a-floor(a);} +//------------------------------------------------------------------------------------------------------------------------------ + AD1 ALerpD1(AD1 x,AD1 y,AD1 a){return lerp(x,y,a);} + AD2 ALerpD2(AD2 x,AD2 y,AD2 a){return lerp(x,y,a);} + AD3 ALerpD3(AD3 x,AD3 y,AD3 a){return lerp(x,y,a);} + AD4 ALerpD4(AD4 x,AD4 y,AD4 a){return lerp(x,y,a);} +//------------------------------------------------------------------------------------------------------------------------------ + AD1 ARcpD1(AD1 x){return rcp(x);} + AD2 ARcpD2(AD2 x){return rcp(x);} + AD3 ARcpD3(AD3 x){return rcp(x);} + AD4 ARcpD4(AD4 x){return rcp(x);} +//------------------------------------------------------------------------------------------------------------------------------ + AD1 ARsqD1(AD1 x){return rsqrt(x);} + AD2 ARsqD2(AD2 x){return rsqrt(x);} + AD3 ARsqD3(AD3 x){return rsqrt(x);} + AD4 ARsqD4(AD4 x){return rsqrt(x);} +//------------------------------------------------------------------------------------------------------------------------------ + AD1 ASatD1(AD1 x){return saturate(x);} + AD2 ASatD2(AD2 x){return saturate(x);} + AD3 ASatD3(AD3 x){return saturate(x);} + AD4 ASatD4(AD4 x){return saturate(x);} + #endif +//============================================================================================================================== +// HLSL WAVE +//============================================================================================================================== + #ifdef A_WAVE + // Where 'x' must be a compile time literal. + AF1 AWaveXorF1(AF1 v,AU1 x){return WaveReadLaneAt(v,WaveGetLaneIndex()^x);} + AF2 AWaveXorF2(AF2 v,AU1 x){return WaveReadLaneAt(v,WaveGetLaneIndex()^x);} + AF3 AWaveXorF3(AF3 v,AU1 x){return WaveReadLaneAt(v,WaveGetLaneIndex()^x);} + AF4 AWaveXorF4(AF4 v,AU1 x){return WaveReadLaneAt(v,WaveGetLaneIndex()^x);} + AU1 AWaveXorU1(AU1 v,AU1 x){return WaveReadLaneAt(v,WaveGetLaneIndex()^x);} + AU2 AWaveXorU1(AU2 v,AU1 x){return WaveReadLaneAt(v,WaveGetLaneIndex()^x);} + AU3 AWaveXorU1(AU3 v,AU1 x){return WaveReadLaneAt(v,WaveGetLaneIndex()^x);} + AU4 AWaveXorU1(AU4 v,AU1 x){return WaveReadLaneAt(v,WaveGetLaneIndex()^x);} +//------------------------------------------------------------------------------------------------------------------------------ + #ifdef A_HALF + AH2 AWaveXorH2(AH2 v,AU1 x){return AH2_AU1(WaveReadLaneAt(AU1_AH2(v),WaveGetLaneIndex()^x));} + AH4 AWaveXorH4(AH4 v,AU1 x){return AH4_AU2(WaveReadLaneAt(AU2_AH4(v),WaveGetLaneIndex()^x));} + AW2 AWaveXorW2(AW2 v,AU1 x){return AW2_AU1(WaveReadLaneAt(AU1_AW2(v),WaveGetLaneIndex()^x));} + AW4 AWaveXorW4(AW4 v,AU1 x){return AW4_AU1(WaveReadLaneAt(AU1_AW4(v),WaveGetLaneIndex()^x));} + #endif + #endif +//============================================================================================================================== +#endif +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +//_____________________________________________________________/\_______________________________________________________________ +//============================================================================================================================== +// +// +// GPU COMMON +// +// +//============================================================================================================================== +#ifdef A_GPU + // Negative and positive infinity. + #define A_INFP_F AF1_AU1(0x7f800000u) + #define A_INFN_F AF1_AU1(0xff800000u) +//------------------------------------------------------------------------------------------------------------------------------ + // Copy sign from 's' to positive 'd'. + AF1 ACpySgnF1(AF1 d,AF1 s){return AF1_AU1(AU1_AF1(d)|(AU1_AF1(s)&AU1_(0x80000000u)));} + AF2 ACpySgnF2(AF2 d,AF2 s){return AF2_AU2(AU2_AF2(d)|(AU2_AF2(s)&AU2_(0x80000000u)));} + AF3 ACpySgnF3(AF3 d,AF3 s){return AF3_AU3(AU3_AF3(d)|(AU3_AF3(s)&AU3_(0x80000000u)));} + AF4 ACpySgnF4(AF4 d,AF4 s){return AF4_AU4(AU4_AF4(d)|(AU4_AF4(s)&AU4_(0x80000000u)));} +//------------------------------------------------------------------------------------------------------------------------------ + // Single operation to return (useful to create a mask to use in lerp for branch free logic), + // m=NaN := 0 + // m>=0 := 0 + // m<0 := 1 + // Uses the following useful floating point logic, + // saturate(+a*(-INF)==-INF) := 0 + // saturate( 0*(-INF)== NaN) := 0 + // saturate(-a*(-INF)==+INF) := 1 + AF1 ASignedF1(AF1 m){return ASatF1(m*AF1_(A_INFN_F));} + AF2 ASignedF2(AF2 m){return ASatF2(m*AF2_(A_INFN_F));} + AF3 ASignedF3(AF3 m){return ASatF3(m*AF3_(A_INFN_F));} + AF4 ASignedF4(AF4 m){return ASatF4(m*AF4_(A_INFN_F));} +//------------------------------------------------------------------------------------------------------------------------------ + AF1 AGtZeroF1(AF1 m){return ASatF1(m*AF1_(A_INFP_F));} + AF2 AGtZeroF2(AF2 m){return ASatF2(m*AF2_(A_INFP_F));} + AF3 AGtZeroF3(AF3 m){return ASatF3(m*AF3_(A_INFP_F));} + AF4 AGtZeroF4(AF4 m){return ASatF4(m*AF4_(A_INFP_F));} +//============================================================================================================================== + #ifdef A_HALF + #ifdef A_HLSL_6_2 + #define A_INFP_H AH1_AW1((uint16_t)0x7c00u) + #define A_INFN_H AH1_AW1((uint16_t)0xfc00u) + #else + #define A_INFP_H AH1_AW1(0x7c00u) + #define A_INFN_H AH1_AW1(0xfc00u) + #endif + +//------------------------------------------------------------------------------------------------------------------------------ + AH1 ACpySgnH1(AH1 d,AH1 s){return AH1_AW1(AW1_AH1(d)|(AW1_AH1(s)&AW1_(0x8000u)));} + AH2 ACpySgnH2(AH2 d,AH2 s){return AH2_AW2(AW2_AH2(d)|(AW2_AH2(s)&AW2_(0x8000u)));} + AH3 ACpySgnH3(AH3 d,AH3 s){return AH3_AW3(AW3_AH3(d)|(AW3_AH3(s)&AW3_(0x8000u)));} + AH4 ACpySgnH4(AH4 d,AH4 s){return AH4_AW4(AW4_AH4(d)|(AW4_AH4(s)&AW4_(0x8000u)));} +//------------------------------------------------------------------------------------------------------------------------------ + AH1 ASignedH1(AH1 m){return ASatH1(m*AH1_(A_INFN_H));} + AH2 ASignedH2(AH2 m){return ASatH2(m*AH2_(A_INFN_H));} + AH3 ASignedH3(AH3 m){return ASatH3(m*AH3_(A_INFN_H));} + AH4 ASignedH4(AH4 m){return ASatH4(m*AH4_(A_INFN_H));} +//------------------------------------------------------------------------------------------------------------------------------ + AH1 AGtZeroH1(AH1 m){return ASatH1(m*AH1_(A_INFP_H));} + AH2 AGtZeroH2(AH2 m){return ASatH2(m*AH2_(A_INFP_H));} + AH3 AGtZeroH3(AH3 m){return ASatH3(m*AH3_(A_INFP_H));} + AH4 AGtZeroH4(AH4 m){return ASatH4(m*AH4_(A_INFP_H));} + #endif +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +//_____________________________________________________________/\_______________________________________________________________ +//============================================================================================================================== +// [FIS] FLOAT INTEGER SORTABLE +//------------------------------------------------------------------------------------------------------------------------------ +// Float to integer sortable. +// - If sign bit=0, flip the sign bit (positives). +// - If sign bit=1, flip all bits (negatives). +// Integer sortable to float. +// - If sign bit=1, flip the sign bit (positives). +// - If sign bit=0, flip all bits (negatives). +// Has nice side effects. +// - Larger integers are more positive values. +// - Float zero is mapped to center of integers (so clear to integer zero is a nice default for atomic max usage). +// Burns 3 ops for conversion {shift,or,xor}. +//============================================================================================================================== + AU1 AFisToU1(AU1 x){return x^(( AShrSU1(x,AU1_(31)))|AU1_(0x80000000));} + AU1 AFisFromU1(AU1 x){return x^((~AShrSU1(x,AU1_(31)))|AU1_(0x80000000));} +//------------------------------------------------------------------------------------------------------------------------------ + // Just adjust high 16-bit value (useful when upper part of 32-bit word is a 16-bit float value). + AU1 AFisToHiU1(AU1 x){return x^(( AShrSU1(x,AU1_(15)))|AU1_(0x80000000));} + AU1 AFisFromHiU1(AU1 x){return x^((~AShrSU1(x,AU1_(15)))|AU1_(0x80000000));} +//------------------------------------------------------------------------------------------------------------------------------ + #ifdef A_HALF + AW1 AFisToW1(AW1 x){return x^(( AShrSW1(x,AW1_(15)))|AW1_(0x8000));} + AW1 AFisFromW1(AW1 x){return x^((~AShrSW1(x,AW1_(15)))|AW1_(0x8000));} +//------------------------------------------------------------------------------------------------------------------------------ + AW2 AFisToW2(AW2 x){return x^(( AShrSW2(x,AW2_(15)))|AW2_(0x8000));} + AW2 AFisFromW2(AW2 x){return x^((~AShrSW2(x,AW2_(15)))|AW2_(0x8000));} + #endif +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +//_____________________________________________________________/\_______________________________________________________________ +//============================================================================================================================== +// [PERM] V_PERM_B32 +//------------------------------------------------------------------------------------------------------------------------------ +// Support for V_PERM_B32 started in the 3rd generation of GCN. +//------------------------------------------------------------------------------------------------------------------------------ +// yyyyxxxx - The 'i' input. +// 76543210 +// ======== +// HGFEDCBA - Naming on permutation. +//------------------------------------------------------------------------------------------------------------------------------ +// TODO +// ==== +// - Make sure compiler optimizes this. +//============================================================================================================================== + #ifdef A_HALF + AU1 APerm0E0A(AU2 i){return((i.x )&0xffu)|((i.y<<16)&0xff0000u);} + AU1 APerm0F0B(AU2 i){return((i.x>> 8)&0xffu)|((i.y<< 8)&0xff0000u);} + AU1 APerm0G0C(AU2 i){return((i.x>>16)&0xffu)|((i.y )&0xff0000u);} + AU1 APerm0H0D(AU2 i){return((i.x>>24)&0xffu)|((i.y>> 8)&0xff0000u);} +//------------------------------------------------------------------------------------------------------------------------------ + AU1 APermHGFA(AU2 i){return((i.x )&0x000000ffu)|(i.y&0xffffff00u);} + AU1 APermHGFC(AU2 i){return((i.x>>16)&0x000000ffu)|(i.y&0xffffff00u);} + AU1 APermHGAE(AU2 i){return((i.x<< 8)&0x0000ff00u)|(i.y&0xffff00ffu);} + AU1 APermHGCE(AU2 i){return((i.x>> 8)&0x0000ff00u)|(i.y&0xffff00ffu);} + AU1 APermHAFE(AU2 i){return((i.x<<16)&0x00ff0000u)|(i.y&0xff00ffffu);} + AU1 APermHCFE(AU2 i){return((i.x )&0x00ff0000u)|(i.y&0xff00ffffu);} + AU1 APermAGFE(AU2 i){return((i.x<<24)&0xff000000u)|(i.y&0x00ffffffu);} + AU1 APermCGFE(AU2 i){return((i.x<< 8)&0xff000000u)|(i.y&0x00ffffffu);} +//------------------------------------------------------------------------------------------------------------------------------ + AU1 APermGCEA(AU2 i){return((i.x)&0x00ff00ffu)|((i.y<<8)&0xff00ff00u);} + AU1 APermGECA(AU2 i){return(((i.x)&0xffu)|((i.x>>8)&0xff00u)|((i.y<<16)&0xff0000u)|((i.y<<8)&0xff000000u));} + #endif +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +//_____________________________________________________________/\_______________________________________________________________ +//============================================================================================================================== +// [BUC] BYTE UNSIGNED CONVERSION +//------------------------------------------------------------------------------------------------------------------------------ +// Designed to use the optimal conversion, enables the scaling to possibly be factored into other computation. +// Works on a range of {0 to A_BUC_<32,16>}, for <32-bit, and 16-bit> respectively. +//------------------------------------------------------------------------------------------------------------------------------ +// OPCODE NOTES +// ============ +// GCN does not do UNORM or SNORM for bytes in opcodes. +// - V_CVT_F32_UBYTE{0,1,2,3} - Unsigned byte to float. +// - V_CVT_PKACC_U8_F32 - Float to unsigned byte (does bit-field insert into 32-bit integer). +// V_PERM_B32 does byte packing with ability to zero fill bytes as well. +// - Can pull out byte values from two sources, and zero fill upper 8-bits of packed hi and lo. +//------------------------------------------------------------------------------------------------------------------------------ +// BYTE : FLOAT - ABuc{0,1,2,3}{To,From}U1() - Designed for V_CVT_F32_UBYTE* and V_CVT_PKACCUM_U8_F32 ops. +// ==== ===== +// 0 : 0 +// 1 : 1 +// ... +// 255 : 255 +// : 256 (just outside the encoding range) +//------------------------------------------------------------------------------------------------------------------------------ +// BYTE : FLOAT - ABuc{0,1,2,3}{To,From}U2() - Designed for 16-bit denormal tricks and V_PERM_B32. +// ==== ===== +// 0 : 0 +// 1 : 1/512 +// 2 : 1/256 +// ... +// 64 : 1/8 +// 128 : 1/4 +// 255 : 255/512 +// : 1/2 (just outside the encoding range) +//------------------------------------------------------------------------------------------------------------------------------ +// OPTIMAL IMPLEMENTATIONS ON AMD ARCHITECTURES +// ============================================ +// r=ABuc0FromU1(i) +// V_CVT_F32_UBYTE0 r,i +// -------------------------------------------- +// r=ABuc0ToU1(d,i) +// V_CVT_PKACCUM_U8_F32 r,i,0,d +// -------------------------------------------- +// d=ABuc0FromU2(i) +// Where 'k0' is an SGPR with 0x0E0A +// Where 'k1' is an SGPR with {32768.0} packed into the lower 16-bits +// V_PERM_B32 d,i.x,i.y,k0 +// V_PK_FMA_F16 d,d,k1.x,0 +// -------------------------------------------- +// r=ABuc0ToU2(d,i) +// Where 'k0' is an SGPR with {1.0/32768.0} packed into the lower 16-bits +// Where 'k1' is an SGPR with 0x???? +// Where 'k2' is an SGPR with 0x???? +// V_PK_FMA_F16 i,i,k0.x,0 +// V_PERM_B32 r.x,i,i,k1 +// V_PERM_B32 r.y,i,i,k2 +//============================================================================================================================== + // Peak range for 32-bit and 16-bit operations. + #define A_BUC_32 (255.0) + #define A_BUC_16 (255.0/512.0) +//============================================================================================================================== + #if 1 + // Designed to be one V_CVT_PKACCUM_U8_F32. + // The extra min is required to pattern match to V_CVT_PKACCUM_U8_F32. + AU1 ABuc0ToU1(AU1 d,AF1 i){return (d&0xffffff00u)|((min(AU1(i),255u) )&(0x000000ffu));} + AU1 ABuc1ToU1(AU1 d,AF1 i){return (d&0xffff00ffu)|((min(AU1(i),255u)<< 8)&(0x0000ff00u));} + AU1 ABuc2ToU1(AU1 d,AF1 i){return (d&0xff00ffffu)|((min(AU1(i),255u)<<16)&(0x00ff0000u));} + AU1 ABuc3ToU1(AU1 d,AF1 i){return (d&0x00ffffffu)|((min(AU1(i),255u)<<24)&(0xff000000u));} +//------------------------------------------------------------------------------------------------------------------------------ + // Designed to be one V_CVT_F32_UBYTE*. + AF1 ABuc0FromU1(AU1 i){return AF1((i )&255u);} + AF1 ABuc1FromU1(AU1 i){return AF1((i>> 8)&255u);} + AF1 ABuc2FromU1(AU1 i){return AF1((i>>16)&255u);} + AF1 ABuc3FromU1(AU1 i){return AF1((i>>24)&255u);} + #endif +//============================================================================================================================== + #ifdef A_HALF + // Takes {x0,x1} and {y0,y1} and builds {{x0,y0},{x1,y1}}. + AW2 ABuc01ToW2(AH2 x,AH2 y){x*=AH2_(1.0/32768.0);y*=AH2_(1.0/32768.0); + return AW2_AU1(APermGCEA(AU2(AU1_AW2(AW2_AH2(x)),AU1_AW2(AW2_AH2(y)))));} +//------------------------------------------------------------------------------------------------------------------------------ + // Designed for 3 ops to do SOA to AOS and conversion. + AU2 ABuc0ToU2(AU2 d,AH2 i){AU1 b=AU1_AW2(AW2_AH2(i*AH2_(1.0/32768.0))); + return AU2(APermHGFA(AU2(d.x,b)),APermHGFC(AU2(d.y,b)));} + AU2 ABuc1ToU2(AU2 d,AH2 i){AU1 b=AU1_AW2(AW2_AH2(i*AH2_(1.0/32768.0))); + return AU2(APermHGAE(AU2(d.x,b)),APermHGCE(AU2(d.y,b)));} + AU2 ABuc2ToU2(AU2 d,AH2 i){AU1 b=AU1_AW2(AW2_AH2(i*AH2_(1.0/32768.0))); + return AU2(APermHAFE(AU2(d.x,b)),APermHCFE(AU2(d.y,b)));} + AU2 ABuc3ToU2(AU2 d,AH2 i){AU1 b=AU1_AW2(AW2_AH2(i*AH2_(1.0/32768.0))); + return AU2(APermAGFE(AU2(d.x,b)),APermCGFE(AU2(d.y,b)));} +//------------------------------------------------------------------------------------------------------------------------------ + // Designed for 2 ops to do both AOS to SOA, and conversion. + AH2 ABuc0FromU2(AU2 i){return AH2_AW2(AW2_AU1(APerm0E0A(i)))*AH2_(32768.0);} + AH2 ABuc1FromU2(AU2 i){return AH2_AW2(AW2_AU1(APerm0F0B(i)))*AH2_(32768.0);} + AH2 ABuc2FromU2(AU2 i){return AH2_AW2(AW2_AU1(APerm0G0C(i)))*AH2_(32768.0);} + AH2 ABuc3FromU2(AU2 i){return AH2_AW2(AW2_AU1(APerm0H0D(i)))*AH2_(32768.0);} + #endif +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +//_____________________________________________________________/\_______________________________________________________________ +//============================================================================================================================== +// [BSC] BYTE SIGNED CONVERSION +//------------------------------------------------------------------------------------------------------------------------------ +// Similar to [BUC]. +// Works on a range of {-/+ A_BSC_<32,16>}, for <32-bit, and 16-bit> respectively. +//------------------------------------------------------------------------------------------------------------------------------ +// ENCODING (without zero-based encoding) +// ======== +// 0 = unused (can be used to mean something else) +// 1 = lowest value +// 128 = exact zero center (zero based encoding +// 255 = highest value +//------------------------------------------------------------------------------------------------------------------------------ +// Zero-based [Zb] flips the MSB bit of the byte (making 128 "exact zero" actually zero). +// This is useful if there is a desire for cleared values to decode as zero. +//------------------------------------------------------------------------------------------------------------------------------ +// BYTE : FLOAT - ABsc{0,1,2,3}{To,From}U2() - Designed for 16-bit denormal tricks and V_PERM_B32. +// ==== ===== +// 0 : -127/512 (unused) +// 1 : -126/512 +// 2 : -125/512 +// ... +// 128 : 0 +// ... +// 255 : 127/512 +// : 1/4 (just outside the encoding range) +//============================================================================================================================== + // Peak range for 32-bit and 16-bit operations. + #define A_BSC_32 (127.0) + #define A_BSC_16 (127.0/512.0) +//============================================================================================================================== + #if 1 + AU1 ABsc0ToU1(AU1 d,AF1 i){return (d&0xffffff00u)|((min(AU1(i+128.0),255u) )&(0x000000ffu));} + AU1 ABsc1ToU1(AU1 d,AF1 i){return (d&0xffff00ffu)|((min(AU1(i+128.0),255u)<< 8)&(0x0000ff00u));} + AU1 ABsc2ToU1(AU1 d,AF1 i){return (d&0xff00ffffu)|((min(AU1(i+128.0),255u)<<16)&(0x00ff0000u));} + AU1 ABsc3ToU1(AU1 d,AF1 i){return (d&0x00ffffffu)|((min(AU1(i+128.0),255u)<<24)&(0xff000000u));} +//------------------------------------------------------------------------------------------------------------------------------ + AU1 ABsc0ToZbU1(AU1 d,AF1 i){return ((d&0xffffff00u)|((min(AU1(trunc(i)+128.0),255u) )&(0x000000ffu)))^0x00000080u;} + AU1 ABsc1ToZbU1(AU1 d,AF1 i){return ((d&0xffff00ffu)|((min(AU1(trunc(i)+128.0),255u)<< 8)&(0x0000ff00u)))^0x00008000u;} + AU1 ABsc2ToZbU1(AU1 d,AF1 i){return ((d&0xff00ffffu)|((min(AU1(trunc(i)+128.0),255u)<<16)&(0x00ff0000u)))^0x00800000u;} + AU1 ABsc3ToZbU1(AU1 d,AF1 i){return ((d&0x00ffffffu)|((min(AU1(trunc(i)+128.0),255u)<<24)&(0xff000000u)))^0x80000000u;} +//------------------------------------------------------------------------------------------------------------------------------ + AF1 ABsc0FromU1(AU1 i){return AF1((i )&255u)-128.0;} + AF1 ABsc1FromU1(AU1 i){return AF1((i>> 8)&255u)-128.0;} + AF1 ABsc2FromU1(AU1 i){return AF1((i>>16)&255u)-128.0;} + AF1 ABsc3FromU1(AU1 i){return AF1((i>>24)&255u)-128.0;} +//------------------------------------------------------------------------------------------------------------------------------ + AF1 ABsc0FromZbU1(AU1 i){return AF1(((i )&255u)^0x80u)-128.0;} + AF1 ABsc1FromZbU1(AU1 i){return AF1(((i>> 8)&255u)^0x80u)-128.0;} + AF1 ABsc2FromZbU1(AU1 i){return AF1(((i>>16)&255u)^0x80u)-128.0;} + AF1 ABsc3FromZbU1(AU1 i){return AF1(((i>>24)&255u)^0x80u)-128.0;} + #endif +//============================================================================================================================== + #ifdef A_HALF + // Takes {x0,x1} and {y0,y1} and builds {{x0,y0},{x1,y1}}. + AW2 ABsc01ToW2(AH2 x,AH2 y){x=x*AH2_(1.0/32768.0)+AH2_(0.25/32768.0);y=y*AH2_(1.0/32768.0)+AH2_(0.25/32768.0); + return AW2_AU1(APermGCEA(AU2(AU1_AW2(AW2_AH2(x)),AU1_AW2(AW2_AH2(y)))));} +//------------------------------------------------------------------------------------------------------------------------------ + AU2 ABsc0ToU2(AU2 d,AH2 i){AU1 b=AU1_AW2(AW2_AH2(i*AH2_(1.0/32768.0)+AH2_(0.25/32768.0))); + return AU2(APermHGFA(AU2(d.x,b)),APermHGFC(AU2(d.y,b)));} + AU2 ABsc1ToU2(AU2 d,AH2 i){AU1 b=AU1_AW2(AW2_AH2(i*AH2_(1.0/32768.0)+AH2_(0.25/32768.0))); + return AU2(APermHGAE(AU2(d.x,b)),APermHGCE(AU2(d.y,b)));} + AU2 ABsc2ToU2(AU2 d,AH2 i){AU1 b=AU1_AW2(AW2_AH2(i*AH2_(1.0/32768.0)+AH2_(0.25/32768.0))); + return AU2(APermHAFE(AU2(d.x,b)),APermHCFE(AU2(d.y,b)));} + AU2 ABsc3ToU2(AU2 d,AH2 i){AU1 b=AU1_AW2(AW2_AH2(i*AH2_(1.0/32768.0)+AH2_(0.25/32768.0))); + return AU2(APermAGFE(AU2(d.x,b)),APermCGFE(AU2(d.y,b)));} +//------------------------------------------------------------------------------------------------------------------------------ + AU2 ABsc0ToZbU2(AU2 d,AH2 i){AU1 b=AU1_AW2(AW2_AH2(i*AH2_(1.0/32768.0)+AH2_(0.25/32768.0)))^0x00800080u; + return AU2(APermHGFA(AU2(d.x,b)),APermHGFC(AU2(d.y,b)));} + AU2 ABsc1ToZbU2(AU2 d,AH2 i){AU1 b=AU1_AW2(AW2_AH2(i*AH2_(1.0/32768.0)+AH2_(0.25/32768.0)))^0x00800080u; + return AU2(APermHGAE(AU2(d.x,b)),APermHGCE(AU2(d.y,b)));} + AU2 ABsc2ToZbU2(AU2 d,AH2 i){AU1 b=AU1_AW2(AW2_AH2(i*AH2_(1.0/32768.0)+AH2_(0.25/32768.0)))^0x00800080u; + return AU2(APermHAFE(AU2(d.x,b)),APermHCFE(AU2(d.y,b)));} + AU2 ABsc3ToZbU2(AU2 d,AH2 i){AU1 b=AU1_AW2(AW2_AH2(i*AH2_(1.0/32768.0)+AH2_(0.25/32768.0)))^0x00800080u; + return AU2(APermAGFE(AU2(d.x,b)),APermCGFE(AU2(d.y,b)));} +//------------------------------------------------------------------------------------------------------------------------------ + AH2 ABsc0FromU2(AU2 i){return AH2_AW2(AW2_AU1(APerm0E0A(i)))*AH2_(32768.0)-AH2_(0.25);} + AH2 ABsc1FromU2(AU2 i){return AH2_AW2(AW2_AU1(APerm0F0B(i)))*AH2_(32768.0)-AH2_(0.25);} + AH2 ABsc2FromU2(AU2 i){return AH2_AW2(AW2_AU1(APerm0G0C(i)))*AH2_(32768.0)-AH2_(0.25);} + AH2 ABsc3FromU2(AU2 i){return AH2_AW2(AW2_AU1(APerm0H0D(i)))*AH2_(32768.0)-AH2_(0.25);} +//------------------------------------------------------------------------------------------------------------------------------ + AH2 ABsc0FromZbU2(AU2 i){return AH2_AW2(AW2_AU1(APerm0E0A(i)^0x00800080u))*AH2_(32768.0)-AH2_(0.25);} + AH2 ABsc1FromZbU2(AU2 i){return AH2_AW2(AW2_AU1(APerm0F0B(i)^0x00800080u))*AH2_(32768.0)-AH2_(0.25);} + AH2 ABsc2FromZbU2(AU2 i){return AH2_AW2(AW2_AU1(APerm0G0C(i)^0x00800080u))*AH2_(32768.0)-AH2_(0.25);} + AH2 ABsc3FromZbU2(AU2 i){return AH2_AW2(AW2_AU1(APerm0H0D(i)^0x00800080u))*AH2_(32768.0)-AH2_(0.25);} + #endif +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +//_____________________________________________________________/\_______________________________________________________________ +//============================================================================================================================== +// HALF APPROXIMATIONS +//------------------------------------------------------------------------------------------------------------------------------ +// These support only positive inputs. +// Did not see value yet in specialization for range. +// Using quick testing, ended up mostly getting the same "best" approximation for various ranges. +// With hardware that can co-execute transcendentals, the value in approximations could be less than expected. +// However from a latency perspective, if execution of a transcendental is 4 clk, with no packed support, -> 8 clk total. +// And co-execution would require a compiler interleaving a lot of independent work for packed usage. +//------------------------------------------------------------------------------------------------------------------------------ +// The one Newton Raphson iteration form of rsq() was skipped (requires 6 ops total). +// Same with sqrt(), as this could be x*rsq() (7 ops). +//============================================================================================================================== + #ifdef A_HALF + // Minimize squared error across full positive range, 2 ops. + // The 0x1de2 based approximation maps {0 to 1} input maps to < 1 output. + AH1 APrxLoSqrtH1(AH1 a){return AH1_AW1((AW1_AH1(a)>>AW1_(1))+AW1_(0x1de2));} + AH2 APrxLoSqrtH2(AH2 a){return AH2_AW2((AW2_AH2(a)>>AW2_(1))+AW2_(0x1de2));} + AH3 APrxLoSqrtH3(AH3 a){return AH3_AW3((AW3_AH3(a)>>AW3_(1))+AW3_(0x1de2));} + AH4 APrxLoSqrtH4(AH4 a){return AH4_AW4((AW4_AH4(a)>>AW4_(1))+AW4_(0x1de2));} +//------------------------------------------------------------------------------------------------------------------------------ + // Lower precision estimation, 1 op. + // Minimize squared error across {smallest normal to 16384.0}. + AH1 APrxLoRcpH1(AH1 a){return AH1_AW1(AW1_(0x7784)-AW1_AH1(a));} + AH2 APrxLoRcpH2(AH2 a){return AH2_AW2(AW2_(0x7784)-AW2_AH2(a));} + AH3 APrxLoRcpH3(AH3 a){return AH3_AW3(AW3_(0x7784)-AW3_AH3(a));} + AH4 APrxLoRcpH4(AH4 a){return AH4_AW4(AW4_(0x7784)-AW4_AH4(a));} +//------------------------------------------------------------------------------------------------------------------------------ + // Medium precision estimation, one Newton Raphson iteration, 3 ops. + AH1 APrxMedRcpH1(AH1 a){AH1 b=AH1_AW1(AW1_(0x778d)-AW1_AH1(a));return b*(-b*a+AH1_(2.0));} + AH2 APrxMedRcpH2(AH2 a){AH2 b=AH2_AW2(AW2_(0x778d)-AW2_AH2(a));return b*(-b*a+AH2_(2.0));} + AH3 APrxMedRcpH3(AH3 a){AH3 b=AH3_AW3(AW3_(0x778d)-AW3_AH3(a));return b*(-b*a+AH3_(2.0));} + AH4 APrxMedRcpH4(AH4 a){AH4 b=AH4_AW4(AW4_(0x778d)-AW4_AH4(a));return b*(-b*a+AH4_(2.0));} +//------------------------------------------------------------------------------------------------------------------------------ + // Minimize squared error across {smallest normal to 16384.0}, 2 ops. + AH1 APrxLoRsqH1(AH1 a){return AH1_AW1(AW1_(0x59a3)-(AW1_AH1(a)>>AW1_(1)));} + AH2 APrxLoRsqH2(AH2 a){return AH2_AW2(AW2_(0x59a3)-(AW2_AH2(a)>>AW2_(1)));} + AH3 APrxLoRsqH3(AH3 a){return AH3_AW3(AW3_(0x59a3)-(AW3_AH3(a)>>AW3_(1)));} + AH4 APrxLoRsqH4(AH4 a){return AH4_AW4(AW4_(0x59a3)-(AW4_AH4(a)>>AW4_(1)));} + #endif +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +//_____________________________________________________________/\_______________________________________________________________ +//============================================================================================================================== +// FLOAT APPROXIMATIONS +//------------------------------------------------------------------------------------------------------------------------------ +// Michal Drobot has an excellent presentation on these: "Low Level Optimizations For GCN", +// - Idea dates back to SGI, then to Quake 3, etc. +// - https://michaldrobot.files.wordpress.com/2014/05/gcn_alu_opt_digitaldragons2014.pdf +// - sqrt(x)=rsqrt(x)*x +// - rcp(x)=rsqrt(x)*rsqrt(x) for positive x +// - https://github.com/michaldrobot/ShaderFastLibs/blob/master/ShaderFastMathLib.h +//------------------------------------------------------------------------------------------------------------------------------ +// These below are from perhaps less complete searching for optimal. +// Used FP16 normal range for testing with +4096 32-bit step size for sampling error. +// So these match up well with the half approximations. +//============================================================================================================================== + AF1 APrxLoSqrtF1(AF1 a){return AF1_AU1((AU1_AF1(a)>>AU1_(1))+AU1_(0x1fbc4639));} + AF1 APrxLoRcpF1(AF1 a){return AF1_AU1(AU1_(0x7ef07ebb)-AU1_AF1(a));} + AF1 APrxMedRcpF1(AF1 a){AF1 b=AF1_AU1(AU1_(0x7ef19fff)-AU1_AF1(a));return b*(-b*a+AF1_(2.0));} + AF1 APrxLoRsqF1(AF1 a){return AF1_AU1(AU1_(0x5f347d74)-(AU1_AF1(a)>>AU1_(1)));} +//------------------------------------------------------------------------------------------------------------------------------ + AF2 APrxLoSqrtF2(AF2 a){return AF2_AU2((AU2_AF2(a)>>AU2_(1))+AU2_(0x1fbc4639));} + AF2 APrxLoRcpF2(AF2 a){return AF2_AU2(AU2_(0x7ef07ebb)-AU2_AF2(a));} + AF2 APrxMedRcpF2(AF2 a){AF2 b=AF2_AU2(AU2_(0x7ef19fff)-AU2_AF2(a));return b*(-b*a+AF2_(2.0));} + AF2 APrxLoRsqF2(AF2 a){return AF2_AU2(AU2_(0x5f347d74)-(AU2_AF2(a)>>AU2_(1)));} +//------------------------------------------------------------------------------------------------------------------------------ + AF3 APrxLoSqrtF3(AF3 a){return AF3_AU3((AU3_AF3(a)>>AU3_(1))+AU3_(0x1fbc4639));} + AF3 APrxLoRcpF3(AF3 a){return AF3_AU3(AU3_(0x7ef07ebb)-AU3_AF3(a));} + AF3 APrxMedRcpF3(AF3 a){AF3 b=AF3_AU3(AU3_(0x7ef19fff)-AU3_AF3(a));return b*(-b*a+AF3_(2.0));} + AF3 APrxLoRsqF3(AF3 a){return AF3_AU3(AU3_(0x5f347d74)-(AU3_AF3(a)>>AU3_(1)));} +//------------------------------------------------------------------------------------------------------------------------------ + AF4 APrxLoSqrtF4(AF4 a){return AF4_AU4((AU4_AF4(a)>>AU4_(1))+AU4_(0x1fbc4639));} + AF4 APrxLoRcpF4(AF4 a){return AF4_AU4(AU4_(0x7ef07ebb)-AU4_AF4(a));} + AF4 APrxMedRcpF4(AF4 a){AF4 b=AF4_AU4(AU4_(0x7ef19fff)-AU4_AF4(a));return b*(-b*a+AF4_(2.0));} + AF4 APrxLoRsqF4(AF4 a){return AF4_AU4(AU4_(0x5f347d74)-(AU4_AF4(a)>>AU4_(1)));} +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +//_____________________________________________________________/\_______________________________________________________________ +//============================================================================================================================== +// PQ APPROXIMATIONS +//------------------------------------------------------------------------------------------------------------------------------ +// PQ is very close to x^(1/8). The functions below Use the fast float approximation method to do +// PQ<~>Gamma2 (4th power and fast 4th root) and PQ<~>Linear (8th power and fast 8th root). Maximum error is ~0.2%. +//============================================================================================================================== +// Helpers + AF1 Quart(AF1 a) { a = a * a; return a * a;} + AF1 Oct(AF1 a) { a = a * a; a = a * a; return a * a; } + AF2 Quart(AF2 a) { a = a * a; return a * a; } + AF2 Oct(AF2 a) { a = a * a; a = a * a; return a * a; } + AF3 Quart(AF3 a) { a = a * a; return a * a; } + AF3 Oct(AF3 a) { a = a * a; a = a * a; return a * a; } + AF4 Quart(AF4 a) { a = a * a; return a * a; } + AF4 Oct(AF4 a) { a = a * a; a = a * a; return a * a; } + //------------------------------------------------------------------------------------------------------------------------------ + AF1 APrxPQToGamma2(AF1 a) { return Quart(a); } + AF1 APrxPQToLinear(AF1 a) { return Oct(a); } + AF1 APrxLoGamma2ToPQ(AF1 a) { return AF1_AU1((AU1_AF1(a) >> AU1_(2)) + AU1_(0x2F9A4E46)); } + AF1 APrxMedGamma2ToPQ(AF1 a) { AF1 b = AF1_AU1((AU1_AF1(a) >> AU1_(2)) + AU1_(0x2F9A4E46)); AF1 b4 = Quart(b); return b - b * (b4 - a) / (AF1_(4.0) * b4); } + AF1 APrxHighGamma2ToPQ(AF1 a) { return sqrt(sqrt(a)); } + AF1 APrxLoLinearToPQ(AF1 a) { return AF1_AU1((AU1_AF1(a) >> AU1_(3)) + AU1_(0x378D8723)); } + AF1 APrxMedLinearToPQ(AF1 a) { AF1 b = AF1_AU1((AU1_AF1(a) >> AU1_(3)) + AU1_(0x378D8723)); AF1 b8 = Oct(b); return b - b * (b8 - a) / (AF1_(8.0) * b8); } + AF1 APrxHighLinearToPQ(AF1 a) { return sqrt(sqrt(sqrt(a))); } + //------------------------------------------------------------------------------------------------------------------------------ + AF2 APrxPQToGamma2(AF2 a) { return Quart(a); } + AF2 APrxPQToLinear(AF2 a) { return Oct(a); } + AF2 APrxLoGamma2ToPQ(AF2 a) { return AF2_AU2((AU2_AF2(a) >> AU2_(2)) + AU2_(0x2F9A4E46)); } + AF2 APrxMedGamma2ToPQ(AF2 a) { AF2 b = AF2_AU2((AU2_AF2(a) >> AU2_(2)) + AU2_(0x2F9A4E46)); AF2 b4 = Quart(b); return b - b * (b4 - a) / (AF1_(4.0) * b4); } + AF2 APrxHighGamma2ToPQ(AF2 a) { return sqrt(sqrt(a)); } + AF2 APrxLoLinearToPQ(AF2 a) { return AF2_AU2((AU2_AF2(a) >> AU2_(3)) + AU2_(0x378D8723)); } + AF2 APrxMedLinearToPQ(AF2 a) { AF2 b = AF2_AU2((AU2_AF2(a) >> AU2_(3)) + AU2_(0x378D8723)); AF2 b8 = Oct(b); return b - b * (b8 - a) / (AF1_(8.0) * b8); } + AF2 APrxHighLinearToPQ(AF2 a) { return sqrt(sqrt(sqrt(a))); } + //------------------------------------------------------------------------------------------------------------------------------ + AF3 APrxPQToGamma2(AF3 a) { return Quart(a); } + AF3 APrxPQToLinear(AF3 a) { return Oct(a); } + AF3 APrxLoGamma2ToPQ(AF3 a) { return AF3_AU3((AU3_AF3(a) >> AU3_(2)) + AU3_(0x2F9A4E46)); } + AF3 APrxMedGamma2ToPQ(AF3 a) { AF3 b = AF3_AU3((AU3_AF3(a) >> AU3_(2)) + AU3_(0x2F9A4E46)); AF3 b4 = Quart(b); return b - b * (b4 - a) / (AF1_(4.0) * b4); } + AF3 APrxHighGamma2ToPQ(AF3 a) { return sqrt(sqrt(a)); } + AF3 APrxLoLinearToPQ(AF3 a) { return AF3_AU3((AU3_AF3(a) >> AU3_(3)) + AU3_(0x378D8723)); } + AF3 APrxMedLinearToPQ(AF3 a) { AF3 b = AF3_AU3((AU3_AF3(a) >> AU3_(3)) + AU3_(0x378D8723)); AF3 b8 = Oct(b); return b - b * (b8 - a) / (AF1_(8.0) * b8); } + AF3 APrxHighLinearToPQ(AF3 a) { return sqrt(sqrt(sqrt(a))); } + //------------------------------------------------------------------------------------------------------------------------------ + AF4 APrxPQToGamma2(AF4 a) { return Quart(a); } + AF4 APrxPQToLinear(AF4 a) { return Oct(a); } + AF4 APrxLoGamma2ToPQ(AF4 a) { return AF4_AU4((AU4_AF4(a) >> AU4_(2)) + AU4_(0x2F9A4E46)); } + AF4 APrxMedGamma2ToPQ(AF4 a) { AF4 b = AF4_AU4((AU4_AF4(a) >> AU4_(2)) + AU4_(0x2F9A4E46)); AF4 b4 = Quart(b); return b - b * (b4 - a) / (AF1_(4.0) * b4); } + AF4 APrxHighGamma2ToPQ(AF4 a) { return sqrt(sqrt(a)); } + AF4 APrxLoLinearToPQ(AF4 a) { return AF4_AU4((AU4_AF4(a) >> AU4_(3)) + AU4_(0x378D8723)); } + AF4 APrxMedLinearToPQ(AF4 a) { AF4 b = AF4_AU4((AU4_AF4(a) >> AU4_(3)) + AU4_(0x378D8723)); AF4 b8 = Oct(b); return b - b * (b8 - a) / (AF1_(8.0) * b8); } + AF4 APrxHighLinearToPQ(AF4 a) { return sqrt(sqrt(sqrt(a))); } +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +//_____________________________________________________________/\_______________________________________________________________ +//============================================================================================================================== +// PARABOLIC SIN & COS +//------------------------------------------------------------------------------------------------------------------------------ +// Approximate answers to transcendental questions. +//------------------------------------------------------------------------------------------------------------------------------ +//============================================================================================================================== + #if 1 + // Valid input range is {-1 to 1} representing {0 to 2 pi}. + // Output range is {-1/4 to 1/4} representing {-1 to 1}. + AF1 APSinF1(AF1 x){return x*abs(x)-x;} // MAD. + AF2 APSinF2(AF2 x){return x*abs(x)-x;} + AF1 APCosF1(AF1 x){x=AFractF1(x*AF1_(0.5)+AF1_(0.75));x=x*AF1_(2.0)-AF1_(1.0);return APSinF1(x);} // 3x MAD, FRACT + AF2 APCosF2(AF2 x){x=AFractF2(x*AF2_(0.5)+AF2_(0.75));x=x*AF2_(2.0)-AF2_(1.0);return APSinF2(x);} + AF2 APSinCosF1(AF1 x){AF1 y=AFractF1(x*AF1_(0.5)+AF1_(0.75));y=y*AF1_(2.0)-AF1_(1.0);return APSinF2(AF2(x,y));} + #endif +//------------------------------------------------------------------------------------------------------------------------------ + #ifdef A_HALF + // For a packed {sin,cos} pair, + // - Native takes 16 clocks and 4 issue slots (no packed transcendentals). + // - Parabolic takes 8 clocks and 8 issue slots (only fract is non-packed). + AH1 APSinH1(AH1 x){return x*abs(x)-x;} + AH2 APSinH2(AH2 x){return x*abs(x)-x;} // AND,FMA + AH1 APCosH1(AH1 x){x=AFractH1(x*AH1_(0.5)+AH1_(0.75));x=x*AH1_(2.0)-AH1_(1.0);return APSinH1(x);} + AH2 APCosH2(AH2 x){x=AFractH2(x*AH2_(0.5)+AH2_(0.75));x=x*AH2_(2.0)-AH2_(1.0);return APSinH2(x);} // 3x FMA, 2xFRACT, AND + AH2 APSinCosH1(AH1 x){AH1 y=AFractH1(x*AH1_(0.5)+AH1_(0.75));y=y*AH1_(2.0)-AH1_(1.0);return APSinH2(AH2(x,y));} + #endif +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +//_____________________________________________________________/\_______________________________________________________________ +//============================================================================================================================== +// [ZOL] ZERO ONE LOGIC +//------------------------------------------------------------------------------------------------------------------------------ +// Conditional free logic designed for easy 16-bit packing, and backwards porting to 32-bit. +//------------------------------------------------------------------------------------------------------------------------------ +// 0 := false +// 1 := true +//------------------------------------------------------------------------------------------------------------------------------ +// AndNot(x,y) -> !(x&y) .... One op. +// AndOr(x,y,z) -> (x&y)|z ... One op. +// GtZero(x) -> x>0.0 ..... One op. +// Sel(x,y,z) -> x?y:z ..... Two ops, has no precision loss. +// Signed(x) -> x<0.0 ..... One op. +// ZeroPass(x,y) -> x?0:y ..... Two ops, 'y' is a pass through safe for aliasing as integer. +//------------------------------------------------------------------------------------------------------------------------------ +// OPTIMIZATION NOTES +// ================== +// - On Vega to use 2 constants in a packed op, pass in as one AW2 or one AH2 'k.xy' and use as 'k.xx' and 'k.yy'. +// For example 'a.xy*k.xx+k.yy'. +//============================================================================================================================== + #if 1 + AU1 AZolAndU1(AU1 x,AU1 y){return min(x,y);} + AU2 AZolAndU2(AU2 x,AU2 y){return min(x,y);} + AU3 AZolAndU3(AU3 x,AU3 y){return min(x,y);} + AU4 AZolAndU4(AU4 x,AU4 y){return min(x,y);} +//------------------------------------------------------------------------------------------------------------------------------ + AU1 AZolNotU1(AU1 x){return x^AU1_(1);} + AU2 AZolNotU2(AU2 x){return x^AU2_(1);} + AU3 AZolNotU3(AU3 x){return x^AU3_(1);} + AU4 AZolNotU4(AU4 x){return x^AU4_(1);} +//------------------------------------------------------------------------------------------------------------------------------ + AU1 AZolOrU1(AU1 x,AU1 y){return max(x,y);} + AU2 AZolOrU2(AU2 x,AU2 y){return max(x,y);} + AU3 AZolOrU3(AU3 x,AU3 y){return max(x,y);} + AU4 AZolOrU4(AU4 x,AU4 y){return max(x,y);} +//============================================================================================================================== + AU1 AZolF1ToU1(AF1 x){return AU1(x);} + AU2 AZolF2ToU2(AF2 x){return AU2(x);} + AU3 AZolF3ToU3(AF3 x){return AU3(x);} + AU4 AZolF4ToU4(AF4 x){return AU4(x);} +//------------------------------------------------------------------------------------------------------------------------------ + // 2 ops, denormals don't work in 32-bit on PC (and if they are enabled, OMOD is disabled). + AU1 AZolNotF1ToU1(AF1 x){return AU1(AF1_(1.0)-x);} + AU2 AZolNotF2ToU2(AF2 x){return AU2(AF2_(1.0)-x);} + AU3 AZolNotF3ToU3(AF3 x){return AU3(AF3_(1.0)-x);} + AU4 AZolNotF4ToU4(AF4 x){return AU4(AF4_(1.0)-x);} +//------------------------------------------------------------------------------------------------------------------------------ + AF1 AZolU1ToF1(AU1 x){return AF1(x);} + AF2 AZolU2ToF2(AU2 x){return AF2(x);} + AF3 AZolU3ToF3(AU3 x){return AF3(x);} + AF4 AZolU4ToF4(AU4 x){return AF4(x);} +//============================================================================================================================== + AF1 AZolAndF1(AF1 x,AF1 y){return min(x,y);} + AF2 AZolAndF2(AF2 x,AF2 y){return min(x,y);} + AF3 AZolAndF3(AF3 x,AF3 y){return min(x,y);} + AF4 AZolAndF4(AF4 x,AF4 y){return min(x,y);} +//------------------------------------------------------------------------------------------------------------------------------ + AF1 ASolAndNotF1(AF1 x,AF1 y){return (-x)*y+AF1_(1.0);} + AF2 ASolAndNotF2(AF2 x,AF2 y){return (-x)*y+AF2_(1.0);} + AF3 ASolAndNotF3(AF3 x,AF3 y){return (-x)*y+AF3_(1.0);} + AF4 ASolAndNotF4(AF4 x,AF4 y){return (-x)*y+AF4_(1.0);} +//------------------------------------------------------------------------------------------------------------------------------ + AF1 AZolAndOrF1(AF1 x,AF1 y,AF1 z){return ASatF1(x*y+z);} + AF2 AZolAndOrF2(AF2 x,AF2 y,AF2 z){return ASatF2(x*y+z);} + AF3 AZolAndOrF3(AF3 x,AF3 y,AF3 z){return ASatF3(x*y+z);} + AF4 AZolAndOrF4(AF4 x,AF4 y,AF4 z){return ASatF4(x*y+z);} +//------------------------------------------------------------------------------------------------------------------------------ + AF1 AZolGtZeroF1(AF1 x){return ASatF1(x*AF1_(A_INFP_F));} + AF2 AZolGtZeroF2(AF2 x){return ASatF2(x*AF2_(A_INFP_F));} + AF3 AZolGtZeroF3(AF3 x){return ASatF3(x*AF3_(A_INFP_F));} + AF4 AZolGtZeroF4(AF4 x){return ASatF4(x*AF4_(A_INFP_F));} +//------------------------------------------------------------------------------------------------------------------------------ + AF1 AZolNotF1(AF1 x){return AF1_(1.0)-x;} + AF2 AZolNotF2(AF2 x){return AF2_(1.0)-x;} + AF3 AZolNotF3(AF3 x){return AF3_(1.0)-x;} + AF4 AZolNotF4(AF4 x){return AF4_(1.0)-x;} +//------------------------------------------------------------------------------------------------------------------------------ + AF1 AZolOrF1(AF1 x,AF1 y){return max(x,y);} + AF2 AZolOrF2(AF2 x,AF2 y){return max(x,y);} + AF3 AZolOrF3(AF3 x,AF3 y){return max(x,y);} + AF4 AZolOrF4(AF4 x,AF4 y){return max(x,y);} +//------------------------------------------------------------------------------------------------------------------------------ + AF1 AZolSelF1(AF1 x,AF1 y,AF1 z){AF1 r=(-x)*z+z;return x*y+r;} + AF2 AZolSelF2(AF2 x,AF2 y,AF2 z){AF2 r=(-x)*z+z;return x*y+r;} + AF3 AZolSelF3(AF3 x,AF3 y,AF3 z){AF3 r=(-x)*z+z;return x*y+r;} + AF4 AZolSelF4(AF4 x,AF4 y,AF4 z){AF4 r=(-x)*z+z;return x*y+r;} +//------------------------------------------------------------------------------------------------------------------------------ + AF1 AZolSignedF1(AF1 x){return ASatF1(x*AF1_(A_INFN_F));} + AF2 AZolSignedF2(AF2 x){return ASatF2(x*AF2_(A_INFN_F));} + AF3 AZolSignedF3(AF3 x){return ASatF3(x*AF3_(A_INFN_F));} + AF4 AZolSignedF4(AF4 x){return ASatF4(x*AF4_(A_INFN_F));} +//------------------------------------------------------------------------------------------------------------------------------ + AF1 AZolZeroPassF1(AF1 x,AF1 y){return AF1_AU1((AU1_AF1(x)!=AU1_(0))?AU1_(0):AU1_AF1(y));} + AF2 AZolZeroPassF2(AF2 x,AF2 y){return AF2_AU2((AU2_AF2(x)!=AU2_(0))?AU2_(0):AU2_AF2(y));} + AF3 AZolZeroPassF3(AF3 x,AF3 y){return AF3_AU3((AU3_AF3(x)!=AU3_(0))?AU3_(0):AU3_AF3(y));} + AF4 AZolZeroPassF4(AF4 x,AF4 y){return AF4_AU4((AU4_AF4(x)!=AU4_(0))?AU4_(0):AU4_AF4(y));} + #endif +//============================================================================================================================== + #ifdef A_HALF + AW1 AZolAndW1(AW1 x,AW1 y){return min(x,y);} + AW2 AZolAndW2(AW2 x,AW2 y){return min(x,y);} + AW3 AZolAndW3(AW3 x,AW3 y){return min(x,y);} + AW4 AZolAndW4(AW4 x,AW4 y){return min(x,y);} +//------------------------------------------------------------------------------------------------------------------------------ + AW1 AZolNotW1(AW1 x){return x^AW1_(1);} + AW2 AZolNotW2(AW2 x){return x^AW2_(1);} + AW3 AZolNotW3(AW3 x){return x^AW3_(1);} + AW4 AZolNotW4(AW4 x){return x^AW4_(1);} +//------------------------------------------------------------------------------------------------------------------------------ + AW1 AZolOrW1(AW1 x,AW1 y){return max(x,y);} + AW2 AZolOrW2(AW2 x,AW2 y){return max(x,y);} + AW3 AZolOrW3(AW3 x,AW3 y){return max(x,y);} + AW4 AZolOrW4(AW4 x,AW4 y){return max(x,y);} +//============================================================================================================================== + // Uses denormal trick. + AW1 AZolH1ToW1(AH1 x){return AW1_AH1(x*AH1_AW1(AW1_(1)));} + AW2 AZolH2ToW2(AH2 x){return AW2_AH2(x*AH2_AW2(AW2_(1)));} + AW3 AZolH3ToW3(AH3 x){return AW3_AH3(x*AH3_AW3(AW3_(1)));} + AW4 AZolH4ToW4(AH4 x){return AW4_AH4(x*AH4_AW4(AW4_(1)));} +//------------------------------------------------------------------------------------------------------------------------------ + // AMD arch lacks a packed conversion opcode. + AH1 AZolW1ToH1(AW1 x){return AH1_AW1(x*AW1_AH1(AH1_(1.0)));} + AH2 AZolW2ToH2(AW2 x){return AH2_AW2(x*AW2_AH2(AH2_(1.0)));} + AH3 AZolW1ToH3(AW3 x){return AH3_AW3(x*AW3_AH3(AH3_(1.0)));} + AH4 AZolW2ToH4(AW4 x){return AH4_AW4(x*AW4_AH4(AH4_(1.0)));} +//============================================================================================================================== + AH1 AZolAndH1(AH1 x,AH1 y){return min(x,y);} + AH2 AZolAndH2(AH2 x,AH2 y){return min(x,y);} + AH3 AZolAndH3(AH3 x,AH3 y){return min(x,y);} + AH4 AZolAndH4(AH4 x,AH4 y){return min(x,y);} +//------------------------------------------------------------------------------------------------------------------------------ + AH1 ASolAndNotH1(AH1 x,AH1 y){return (-x)*y+AH1_(1.0);} + AH2 ASolAndNotH2(AH2 x,AH2 y){return (-x)*y+AH2_(1.0);} + AH3 ASolAndNotH3(AH3 x,AH3 y){return (-x)*y+AH3_(1.0);} + AH4 ASolAndNotH4(AH4 x,AH4 y){return (-x)*y+AH4_(1.0);} +//------------------------------------------------------------------------------------------------------------------------------ + AH1 AZolAndOrH1(AH1 x,AH1 y,AH1 z){return ASatH1(x*y+z);} + AH2 AZolAndOrH2(AH2 x,AH2 y,AH2 z){return ASatH2(x*y+z);} + AH3 AZolAndOrH3(AH3 x,AH3 y,AH3 z){return ASatH3(x*y+z);} + AH4 AZolAndOrH4(AH4 x,AH4 y,AH4 z){return ASatH4(x*y+z);} +//------------------------------------------------------------------------------------------------------------------------------ + AH1 AZolGtZeroH1(AH1 x){return ASatH1(x*AH1_(A_INFP_H));} + AH2 AZolGtZeroH2(AH2 x){return ASatH2(x*AH2_(A_INFP_H));} + AH3 AZolGtZeroH3(AH3 x){return ASatH3(x*AH3_(A_INFP_H));} + AH4 AZolGtZeroH4(AH4 x){return ASatH4(x*AH4_(A_INFP_H));} +//------------------------------------------------------------------------------------------------------------------------------ + AH1 AZolNotH1(AH1 x){return AH1_(1.0)-x;} + AH2 AZolNotH2(AH2 x){return AH2_(1.0)-x;} + AH3 AZolNotH3(AH3 x){return AH3_(1.0)-x;} + AH4 AZolNotH4(AH4 x){return AH4_(1.0)-x;} +//------------------------------------------------------------------------------------------------------------------------------ + AH1 AZolOrH1(AH1 x,AH1 y){return max(x,y);} + AH2 AZolOrH2(AH2 x,AH2 y){return max(x,y);} + AH3 AZolOrH3(AH3 x,AH3 y){return max(x,y);} + AH4 AZolOrH4(AH4 x,AH4 y){return max(x,y);} +//------------------------------------------------------------------------------------------------------------------------------ + AH1 AZolSelH1(AH1 x,AH1 y,AH1 z){AH1 r=(-x)*z+z;return x*y+r;} + AH2 AZolSelH2(AH2 x,AH2 y,AH2 z){AH2 r=(-x)*z+z;return x*y+r;} + AH3 AZolSelH3(AH3 x,AH3 y,AH3 z){AH3 r=(-x)*z+z;return x*y+r;} + AH4 AZolSelH4(AH4 x,AH4 y,AH4 z){AH4 r=(-x)*z+z;return x*y+r;} +//------------------------------------------------------------------------------------------------------------------------------ + AH1 AZolSignedH1(AH1 x){return ASatH1(x*AH1_(A_INFN_H));} + AH2 AZolSignedH2(AH2 x){return ASatH2(x*AH2_(A_INFN_H));} + AH3 AZolSignedH3(AH3 x){return ASatH3(x*AH3_(A_INFN_H));} + AH4 AZolSignedH4(AH4 x){return ASatH4(x*AH4_(A_INFN_H));} + #endif +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +//_____________________________________________________________/\_______________________________________________________________ +//============================================================================================================================== +// COLOR CONVERSIONS +//------------------------------------------------------------------------------------------------------------------------------ +// These are all linear to/from some other space (where 'linear' has been shortened out of the function name). +// So 'ToGamma' is 'LinearToGamma', and 'FromGamma' is 'LinearFromGamma'. +// These are branch free implementations. +// The AToSrgbF1() function is useful for stores for compute shaders for GPUs without hardware linear->sRGB store conversion. +//------------------------------------------------------------------------------------------------------------------------------ +// TRANSFER FUNCTIONS +// ================== +// 709 ..... Rec709 used for some HDTVs +// Gamma ... Typically 2.2 for some PC displays, or 2.4-2.5 for CRTs, or 2.2 FreeSync2 native +// Pq ...... PQ native for HDR10 +// Srgb .... The sRGB output, typical of PC displays, useful for 10-bit output, or storing to 8-bit UNORM without SRGB type +// Two ..... Gamma 2.0, fastest conversion (useful for intermediate pass approximations) +// Three ... Gamma 3.0, less fast, but good for HDR. +//------------------------------------------------------------------------------------------------------------------------------ +// KEEPING TO SPEC +// =============== +// Both Rec.709 and sRGB have a linear segment which as spec'ed would intersect the curved segment 2 times. +// (a.) For 8-bit sRGB, steps {0 to 10.3} are in the linear region (4% of the encoding range). +// (b.) For 8-bit 709, steps {0 to 20.7} are in the linear region (8% of the encoding range). +// Also there is a slight step in the transition regions. +// Precision of the coefficients in the spec being the likely cause. +// Main usage case of the sRGB code is to do the linear->sRGB converstion in a compute shader before store. +// This is to work around lack of hardware (typically only ROP does the conversion for free). +// To "correct" the linear segment, would be to introduce error, because hardware decode of sRGB->linear is fixed (and free). +// So this header keeps with the spec. +// For linear->sRGB transforms, the linear segment in some respects reduces error, because rounding in that region is linear. +// Rounding in the curved region in hardware (and fast software code) introduces error due to rounding in non-linear. +//------------------------------------------------------------------------------------------------------------------------------ +// FOR PQ +// ====== +// Both input and output is {0.0-1.0}, and where output 1.0 represents 10000.0 cd/m^2. +// All constants are only specified to FP32 precision. +// External PQ source reference, +// - https://github.com/ampas/aces-dev/blob/master/transforms/ctl/utilities/ACESlib.Utilities_Color.a1.0.1.ctl +//------------------------------------------------------------------------------------------------------------------------------ +// PACKED VERSIONS +// =============== +// These are the A*H2() functions. +// There is no PQ functions as FP16 seemed to not have enough precision for the conversion. +// The remaining functions are "good enough" for 8-bit, and maybe 10-bit if not concerned about a few 1-bit errors. +// Precision is lowest in the 709 conversion, higher in sRGB, higher still in Two and Gamma (when using 2.2 at least). +//------------------------------------------------------------------------------------------------------------------------------ +// NOTES +// ===== +// Could be faster for PQ conversions to be in ALU or a texture lookup depending on usage case. +//============================================================================================================================== + #if 1 + AF1 ATo709F1(AF1 c){AF3 j=AF3(0.018*4.5,4.5,0.45);AF2 k=AF2(1.099,-0.099); + return clamp(j.x ,c*j.y ,pow(c,j.z )*k.x +k.y );} + AF2 ATo709F2(AF2 c){AF3 j=AF3(0.018*4.5,4.5,0.45);AF2 k=AF2(1.099,-0.099); + return clamp(j.xx ,c*j.yy ,pow(c,j.zz )*k.xx +k.yy );} + AF3 ATo709F3(AF3 c){AF3 j=AF3(0.018*4.5,4.5,0.45);AF2 k=AF2(1.099,-0.099); + return clamp(j.xxx,c*j.yyy,pow(c,j.zzz)*k.xxx+k.yyy);} +//------------------------------------------------------------------------------------------------------------------------------ + // Note 'rcpX' is '1/x', where the 'x' is what would be used in AFromGamma(). + AF1 AToGammaF1(AF1 c,AF1 rcpX){return pow(c,AF1_(rcpX));} + AF2 AToGammaF2(AF2 c,AF1 rcpX){return pow(c,AF2_(rcpX));} + AF3 AToGammaF3(AF3 c,AF1 rcpX){return pow(c,AF3_(rcpX));} +//------------------------------------------------------------------------------------------------------------------------------ + AF1 AToPqF1(AF1 x){AF1 p=pow(x,AF1_(0.159302)); + return pow((AF1_(0.835938)+AF1_(18.8516)*p)/(AF1_(1.0)+AF1_(18.6875)*p),AF1_(78.8438));} + AF2 AToPqF1(AF2 x){AF2 p=pow(x,AF2_(0.159302)); + return pow((AF2_(0.835938)+AF2_(18.8516)*p)/(AF2_(1.0)+AF2_(18.6875)*p),AF2_(78.8438));} + AF3 AToPqF1(AF3 x){AF3 p=pow(x,AF3_(0.159302)); + return pow((AF3_(0.835938)+AF3_(18.8516)*p)/(AF3_(1.0)+AF3_(18.6875)*p),AF3_(78.8438));} +//------------------------------------------------------------------------------------------------------------------------------ + AF1 AToSrgbF1(AF1 c){AF3 j=AF3(0.0031308*12.92,12.92,1.0/2.4);AF2 k=AF2(1.055,-0.055); + return clamp(j.x ,c*j.y ,pow(c,j.z )*k.x +k.y );} + AF2 AToSrgbF2(AF2 c){AF3 j=AF3(0.0031308*12.92,12.92,1.0/2.4);AF2 k=AF2(1.055,-0.055); + return clamp(j.xx ,c*j.yy ,pow(c,j.zz )*k.xx +k.yy );} + AF3 AToSrgbF3(AF3 c){AF3 j=AF3(0.0031308*12.92,12.92,1.0/2.4);AF2 k=AF2(1.055,-0.055); + return clamp(j.xxx,c*j.yyy,pow(c,j.zzz)*k.xxx+k.yyy);} +//------------------------------------------------------------------------------------------------------------------------------ + AF1 AToTwoF1(AF1 c){return sqrt(c);} + AF2 AToTwoF2(AF2 c){return sqrt(c);} + AF3 AToTwoF3(AF3 c){return sqrt(c);} +//------------------------------------------------------------------------------------------------------------------------------ + AF1 AToThreeF1(AF1 c){return pow(c,AF1_(1.0/3.0));} + AF2 AToThreeF2(AF2 c){return pow(c,AF2_(1.0/3.0));} + AF3 AToThreeF3(AF3 c){return pow(c,AF3_(1.0/3.0));} + #endif +//============================================================================================================================== + #if 1 + // Unfortunately median won't work here. + AF1 AFrom709F1(AF1 c){AF3 j=AF3(0.081/4.5,1.0/4.5,1.0/0.45);AF2 k=AF2(1.0/1.099,0.099/1.099); + return AZolSelF1(AZolSignedF1(c-j.x ),c*j.y ,pow(c*k.x +k.y ,j.z ));} + AF2 AFrom709F2(AF2 c){AF3 j=AF3(0.081/4.5,1.0/4.5,1.0/0.45);AF2 k=AF2(1.0/1.099,0.099/1.099); + return AZolSelF2(AZolSignedF2(c-j.xx ),c*j.yy ,pow(c*k.xx +k.yy ,j.zz ));} + AF3 AFrom709F3(AF3 c){AF3 j=AF3(0.081/4.5,1.0/4.5,1.0/0.45);AF2 k=AF2(1.0/1.099,0.099/1.099); + return AZolSelF3(AZolSignedF3(c-j.xxx),c*j.yyy,pow(c*k.xxx+k.yyy,j.zzz));} +//------------------------------------------------------------------------------------------------------------------------------ + AF1 AFromGammaF1(AF1 c,AF1 x){return pow(c,AF1_(x));} + AF2 AFromGammaF2(AF2 c,AF1 x){return pow(c,AF2_(x));} + AF3 AFromGammaF3(AF3 c,AF1 x){return pow(c,AF3_(x));} +//------------------------------------------------------------------------------------------------------------------------------ + AF1 AFromPqF1(AF1 x){AF1 p=pow(x,AF1_(0.0126833)); + return pow(ASatF1(p-AF1_(0.835938))/(AF1_(18.8516)-AF1_(18.6875)*p),AF1_(6.27739));} + AF2 AFromPqF1(AF2 x){AF2 p=pow(x,AF2_(0.0126833)); + return pow(ASatF2(p-AF2_(0.835938))/(AF2_(18.8516)-AF2_(18.6875)*p),AF2_(6.27739));} + AF3 AFromPqF1(AF3 x){AF3 p=pow(x,AF3_(0.0126833)); + return pow(ASatF3(p-AF3_(0.835938))/(AF3_(18.8516)-AF3_(18.6875)*p),AF3_(6.27739));} +//------------------------------------------------------------------------------------------------------------------------------ + // Unfortunately median won't work here. + AF1 AFromSrgbF1(AF1 c){AF3 j=AF3(0.04045/12.92,1.0/12.92,2.4);AF2 k=AF2(1.0/1.055,0.055/1.055); + return AZolSelF1(AZolSignedF1(c-j.x ),c*j.y ,pow(c*k.x +k.y ,j.z ));} + AF2 AFromSrgbF2(AF2 c){AF3 j=AF3(0.04045/12.92,1.0/12.92,2.4);AF2 k=AF2(1.0/1.055,0.055/1.055); + return AZolSelF2(AZolSignedF2(c-j.xx ),c*j.yy ,pow(c*k.xx +k.yy ,j.zz ));} + AF3 AFromSrgbF3(AF3 c){AF3 j=AF3(0.04045/12.92,1.0/12.92,2.4);AF2 k=AF2(1.0/1.055,0.055/1.055); + return AZolSelF3(AZolSignedF3(c-j.xxx),c*j.yyy,pow(c*k.xxx+k.yyy,j.zzz));} +//------------------------------------------------------------------------------------------------------------------------------ + AF1 AFromTwoF1(AF1 c){return c*c;} + AF2 AFromTwoF2(AF2 c){return c*c;} + AF3 AFromTwoF3(AF3 c){return c*c;} +//------------------------------------------------------------------------------------------------------------------------------ + AF1 AFromThreeF1(AF1 c){return c*c*c;} + AF2 AFromThreeF2(AF2 c){return c*c*c;} + AF3 AFromThreeF3(AF3 c){return c*c*c;} + #endif +//============================================================================================================================== + #ifdef A_HALF + AH1 ATo709H1(AH1 c){AH3 j=AH3(0.018*4.5,4.5,0.45);AH2 k=AH2(1.099,-0.099); + return clamp(j.x ,c*j.y ,pow(c,j.z )*k.x +k.y );} + AH2 ATo709H2(AH2 c){AH3 j=AH3(0.018*4.5,4.5,0.45);AH2 k=AH2(1.099,-0.099); + return clamp(j.xx ,c*j.yy ,pow(c,j.zz )*k.xx +k.yy );} + AH3 ATo709H3(AH3 c){AH3 j=AH3(0.018*4.5,4.5,0.45);AH2 k=AH2(1.099,-0.099); + return clamp(j.xxx,c*j.yyy,pow(c,j.zzz)*k.xxx+k.yyy);} +//------------------------------------------------------------------------------------------------------------------------------ + AH1 AToGammaH1(AH1 c,AH1 rcpX){return pow(c,AH1_(rcpX));} + AH2 AToGammaH2(AH2 c,AH1 rcpX){return pow(c,AH2_(rcpX));} + AH3 AToGammaH3(AH3 c,AH1 rcpX){return pow(c,AH3_(rcpX));} +//------------------------------------------------------------------------------------------------------------------------------ + AH1 AToSrgbH1(AH1 c){AH3 j=AH3(0.0031308*12.92,12.92,1.0/2.4);AH2 k=AH2(1.055,-0.055); + return clamp(j.x ,c*j.y ,pow(c,j.z )*k.x +k.y );} + AH2 AToSrgbH2(AH2 c){AH3 j=AH3(0.0031308*12.92,12.92,1.0/2.4);AH2 k=AH2(1.055,-0.055); + return clamp(j.xx ,c*j.yy ,pow(c,j.zz )*k.xx +k.yy );} + AH3 AToSrgbH3(AH3 c){AH3 j=AH3(0.0031308*12.92,12.92,1.0/2.4);AH2 k=AH2(1.055,-0.055); + return clamp(j.xxx,c*j.yyy,pow(c,j.zzz)*k.xxx+k.yyy);} +//------------------------------------------------------------------------------------------------------------------------------ + AH1 AToTwoH1(AH1 c){return sqrt(c);} + AH2 AToTwoH2(AH2 c){return sqrt(c);} + AH3 AToTwoH3(AH3 c){return sqrt(c);} +//------------------------------------------------------------------------------------------------------------------------------ + AH1 AToThreeF1(AH1 c){return pow(c,AH1_(1.0/3.0));} + AH2 AToThreeF2(AH2 c){return pow(c,AH2_(1.0/3.0));} + AH3 AToThreeF3(AH3 c){return pow(c,AH3_(1.0/3.0));} + #endif +//============================================================================================================================== + #ifdef A_HALF + AH1 AFrom709H1(AH1 c){AH3 j=AH3(0.081/4.5,1.0/4.5,1.0/0.45);AH2 k=AH2(1.0/1.099,0.099/1.099); + return AZolSelH1(AZolSignedH1(c-j.x ),c*j.y ,pow(c*k.x +k.y ,j.z ));} + AH2 AFrom709H2(AH2 c){AH3 j=AH3(0.081/4.5,1.0/4.5,1.0/0.45);AH2 k=AH2(1.0/1.099,0.099/1.099); + return AZolSelH2(AZolSignedH2(c-j.xx ),c*j.yy ,pow(c*k.xx +k.yy ,j.zz ));} + AH3 AFrom709H3(AH3 c){AH3 j=AH3(0.081/4.5,1.0/4.5,1.0/0.45);AH2 k=AH2(1.0/1.099,0.099/1.099); + return AZolSelH3(AZolSignedH3(c-j.xxx),c*j.yyy,pow(c*k.xxx+k.yyy,j.zzz));} +//------------------------------------------------------------------------------------------------------------------------------ + AH1 AFromGammaH1(AH1 c,AH1 x){return pow(c,AH1_(x));} + AH2 AFromGammaH2(AH2 c,AH1 x){return pow(c,AH2_(x));} + AH3 AFromGammaH3(AH3 c,AH1 x){return pow(c,AH3_(x));} +//------------------------------------------------------------------------------------------------------------------------------ + AH1 AHromSrgbF1(AH1 c){AH3 j=AH3(0.04045/12.92,1.0/12.92,2.4);AH2 k=AH2(1.0/1.055,0.055/1.055); + return AZolSelH1(AZolSignedH1(c-j.x ),c*j.y ,pow(c*k.x +k.y ,j.z ));} + AH2 AHromSrgbF2(AH2 c){AH3 j=AH3(0.04045/12.92,1.0/12.92,2.4);AH2 k=AH2(1.0/1.055,0.055/1.055); + return AZolSelH2(AZolSignedH2(c-j.xx ),c*j.yy ,pow(c*k.xx +k.yy ,j.zz ));} + AH3 AHromSrgbF3(AH3 c){AH3 j=AH3(0.04045/12.92,1.0/12.92,2.4);AH2 k=AH2(1.0/1.055,0.055/1.055); + return AZolSelH3(AZolSignedH3(c-j.xxx),c*j.yyy,pow(c*k.xxx+k.yyy,j.zzz));} +//------------------------------------------------------------------------------------------------------------------------------ + AH1 AFromTwoH1(AH1 c){return c*c;} + AH2 AFromTwoH2(AH2 c){return c*c;} + AH3 AFromTwoH3(AH3 c){return c*c;} +//------------------------------------------------------------------------------------------------------------------------------ + AH1 AFromThreeH1(AH1 c){return c*c*c;} + AH2 AFromThreeH2(AH2 c){return c*c*c;} + AH3 AFromThreeH3(AH3 c){return c*c*c;} + #endif +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +//_____________________________________________________________/\_______________________________________________________________ +//============================================================================================================================== +// CS REMAP +//============================================================================================================================== + // Simple remap 64x1 to 8x8 with rotated 2x2 pixel quads in quad linear. + // 543210 + // ====== + // ..xxx. + // yy...y + AU2 ARmp8x8(AU1 a){return AU2(ABfe(a,1u,3u),ABfiM(ABfe(a,3u,3u),a,1u));} +//============================================================================================================================== + // More complex remap 64x1 to 8x8 which is necessary for 2D wave reductions. + // 543210 + // ====== + // .xx..x + // y..yy. + // Details, + // LANE TO 8x8 MAPPING + // =================== + // 00 01 08 09 10 11 18 19 + // 02 03 0a 0b 12 13 1a 1b + // 04 05 0c 0d 14 15 1c 1d + // 06 07 0e 0f 16 17 1e 1f + // 20 21 28 29 30 31 38 39 + // 22 23 2a 2b 32 33 3a 3b + // 24 25 2c 2d 34 35 3c 3d + // 26 27 2e 2f 36 37 3e 3f + AU2 ARmpRed8x8(AU1 a){return AU2(ABfiM(ABfe(a,2u,3u),a,1u),ABfiM(ABfe(a,3u,3u),ABfe(a,1u,2u),2u));} +//============================================================================================================================== + #ifdef A_HALF + AW2 ARmp8x8H(AU1 a){return AW2(ABfe(a,1u,3u),ABfiM(ABfe(a,3u,3u),a,1u));} + AW2 ARmpRed8x8H(AU1 a){return AW2(ABfiM(ABfe(a,2u,3u),a,1u),ABfiM(ABfe(a,3u,3u),ABfe(a,1u,2u),2u));} + #endif +#endif +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +//_____________________________________________________________/\_______________________________________________________________ +//============================================================================================================================== +// +// REFERENCE +// +//------------------------------------------------------------------------------------------------------------------------------ +// IEEE FLOAT RULES +// ================ +// - saturate(NaN)=0, saturate(-INF)=0, saturate(+INF)=1 +// - {+/-}0 * {+/-}INF = NaN +// - -INF + (+INF) = NaN +// - {+/-}0 / {+/-}0 = NaN +// - {+/-}INF / {+/-}INF = NaN +// - a<(-0) := sqrt(a) = NaN (a=-0.0 won't NaN) +// - 0 == -0 +// - 4/0 = +INF +// - 4/-0 = -INF +// - 4+INF = +INF +// - 4-INF = -INF +// - 4*(+INF) = +INF +// - 4*(-INF) = -INF +// - -4*(+INF) = -INF +// - sqrt(+INF) = +INF +//------------------------------------------------------------------------------------------------------------------------------ +// FP16 ENCODING +// ============= +// fedcba9876543210 +// ---------------- +// ......mmmmmmmmmm 10-bit mantissa (encodes 11-bit 0.5 to 1.0 except for denormals) +// .eeeee.......... 5-bit exponent +// .00000.......... denormals +// .00001.......... -14 exponent +// .11110.......... 15 exponent +// .111110000000000 infinity +// .11111nnnnnnnnnn NaN with n!=0 +// s............... sign +//------------------------------------------------------------------------------------------------------------------------------ +// FP16/INT16 ALIASING DENORMAL +// ============================ +// 11-bit unsigned integers alias with half float denormal/normal values, +// 1 = 2^(-24) = 1/16777216 ....................... first denormal value +// 2 = 2^(-23) +// ... +// 1023 = 2^(-14)*(1-2^(-10)) = 2^(-14)*(1-1/1024) ... last denormal value +// 1024 = 2^(-14) = 1/16384 .......................... first normal value that still maps to integers +// 2047 .............................................. last normal value that still maps to integers +// Scaling limits, +// 2^15 = 32768 ...................................... largest power of 2 scaling +// Largest pow2 conversion mapping is at *32768, +// 1 : 2^(-9) = 1/512 +// 2 : 1/256 +// 4 : 1/128 +// 8 : 1/64 +// 16 : 1/32 +// 32 : 1/16 +// 64 : 1/8 +// 128 : 1/4 +// 256 : 1/2 +// 512 : 1 +// 1024 : 2 +// 2047 : a little less than 4 +//============================================================================================================================== +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +//_____________________________________________________________/\_______________________________________________________________ +//============================================================================================================================== +// +// +// GPU/CPU PORTABILITY +// +// +//------------------------------------------------------------------------------------------------------------------------------ +// This is the GPU implementation. +// See the CPU implementation for docs. +//============================================================================================================================== +#ifdef A_GPU + #define A_TRUE true + #define A_FALSE false + #define A_STATIC +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +//_____________________________________________________________/\_______________________________________________________________ +//============================================================================================================================== +// VECTOR ARGUMENT/RETURN/INITIALIZATION PORTABILITY +//============================================================================================================================== + #define retAD2 AD2 + #define retAD3 AD3 + #define retAD4 AD4 + #define retAF2 AF2 + #define retAF3 AF3 + #define retAF4 AF4 + #define retAL2 AL2 + #define retAL3 AL3 + #define retAL4 AL4 + #define retAU2 AU2 + #define retAU3 AU3 + #define retAU4 AU4 +//------------------------------------------------------------------------------------------------------------------------------ + #define inAD2 in AD2 + #define inAD3 in AD3 + #define inAD4 in AD4 + #define inAF2 in AF2 + #define inAF3 in AF3 + #define inAF4 in AF4 + #define inAL2 in AL2 + #define inAL3 in AL3 + #define inAL4 in AL4 + #define inAU2 in AU2 + #define inAU3 in AU3 + #define inAU4 in AU4 +//------------------------------------------------------------------------------------------------------------------------------ + #define inoutAD2 inout AD2 + #define inoutAD3 inout AD3 + #define inoutAD4 inout AD4 + #define inoutAF2 inout AF2 + #define inoutAF3 inout AF3 + #define inoutAF4 inout AF4 + #define inoutAL2 inout AL2 + #define inoutAL3 inout AL3 + #define inoutAL4 inout AL4 + #define inoutAU2 inout AU2 + #define inoutAU3 inout AU3 + #define inoutAU4 inout AU4 +//------------------------------------------------------------------------------------------------------------------------------ + #define outAD2 out AD2 + #define outAD3 out AD3 + #define outAD4 out AD4 + #define outAF2 out AF2 + #define outAF3 out AF3 + #define outAF4 out AF4 + #define outAL2 out AL2 + #define outAL3 out AL3 + #define outAL4 out AL4 + #define outAU2 out AU2 + #define outAU3 out AU3 + #define outAU4 out AU4 +//------------------------------------------------------------------------------------------------------------------------------ + #define varAD2(x) AD2 x + #define varAD3(x) AD3 x + #define varAD4(x) AD4 x + #define varAF2(x) AF2 x + #define varAF3(x) AF3 x + #define varAF4(x) AF4 x + #define varAL2(x) AL2 x + #define varAL3(x) AL3 x + #define varAL4(x) AL4 x + #define varAU2(x) AU2 x + #define varAU3(x) AU3 x + #define varAU4(x) AU4 x +//------------------------------------------------------------------------------------------------------------------------------ + #define initAD2(x,y) AD2(x,y) + #define initAD3(x,y,z) AD3(x,y,z) + #define initAD4(x,y,z,w) AD4(x,y,z,w) + #define initAF2(x,y) AF2(x,y) + #define initAF3(x,y,z) AF3(x,y,z) + #define initAF4(x,y,z,w) AF4(x,y,z,w) + #define initAL2(x,y) AL2(x,y) + #define initAL3(x,y,z) AL3(x,y,z) + #define initAL4(x,y,z,w) AL4(x,y,z,w) + #define initAU2(x,y) AU2(x,y) + #define initAU3(x,y,z) AU3(x,y,z) + #define initAU4(x,y,z,w) AU4(x,y,z,w) +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +//_____________________________________________________________/\_______________________________________________________________ +//============================================================================================================================== +// SCALAR RETURN OPS +//============================================================================================================================== + #define AAbsD1(a) abs(AD1(a)) + #define AAbsF1(a) abs(AF1(a)) +//------------------------------------------------------------------------------------------------------------------------------ + #define ACosD1(a) cos(AD1(a)) + #define ACosF1(a) cos(AF1(a)) +//------------------------------------------------------------------------------------------------------------------------------ + #define ADotD2(a,b) dot(AD2(a),AD2(b)) + #define ADotD3(a,b) dot(AD3(a),AD3(b)) + #define ADotD4(a,b) dot(AD4(a),AD4(b)) + #define ADotF2(a,b) dot(AF2(a),AF2(b)) + #define ADotF3(a,b) dot(AF3(a),AF3(b)) + #define ADotF4(a,b) dot(AF4(a),AF4(b)) +//------------------------------------------------------------------------------------------------------------------------------ + #define AExp2D1(a) exp2(AD1(a)) + #define AExp2F1(a) exp2(AF1(a)) +//------------------------------------------------------------------------------------------------------------------------------ + #define AFloorD1(a) floor(AD1(a)) + #define AFloorF1(a) floor(AF1(a)) +//------------------------------------------------------------------------------------------------------------------------------ + #define ALog2D1(a) log2(AD1(a)) + #define ALog2F1(a) log2(AF1(a)) +//------------------------------------------------------------------------------------------------------------------------------ + #define AMaxD1(a,b) max(a,b) + #define AMaxF1(a,b) max(a,b) + #define AMaxL1(a,b) max(a,b) + #define AMaxU1(a,b) max(a,b) +//------------------------------------------------------------------------------------------------------------------------------ + #define AMinD1(a,b) min(a,b) + #define AMinF1(a,b) min(a,b) + #define AMinL1(a,b) min(a,b) + #define AMinU1(a,b) min(a,b) +//------------------------------------------------------------------------------------------------------------------------------ + #define ASinD1(a) sin(AD1(a)) + #define ASinF1(a) sin(AF1(a)) +//------------------------------------------------------------------------------------------------------------------------------ + #define ASqrtD1(a) sqrt(AD1(a)) + #define ASqrtF1(a) sqrt(AF1(a)) +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +//_____________________________________________________________/\_______________________________________________________________ +//============================================================================================================================== +// SCALAR RETURN OPS - DEPENDENT +//============================================================================================================================== + #define APowD1(a,b) pow(AD1(a),AF1(b)) + #define APowF1(a,b) pow(AF1(a),AF1(b)) +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +//_____________________________________________________________/\_______________________________________________________________ +//============================================================================================================================== +// VECTOR OPS +//------------------------------------------------------------------------------------------------------------------------------ +// These are added as needed for production or prototyping, so not necessarily a complete set. +// They follow a convention of taking in a destination and also returning the destination value to increase utility. +//============================================================================================================================== + #ifdef A_DUBL + AD2 opAAbsD2(outAD2 d,inAD2 a){d=abs(a);return d;} + AD3 opAAbsD3(outAD3 d,inAD3 a){d=abs(a);return d;} + AD4 opAAbsD4(outAD4 d,inAD4 a){d=abs(a);return d;} +//------------------------------------------------------------------------------------------------------------------------------ + AD2 opAAddD2(outAD2 d,inAD2 a,inAD2 b){d=a+b;return d;} + AD3 opAAddD3(outAD3 d,inAD3 a,inAD3 b){d=a+b;return d;} + AD4 opAAddD4(outAD4 d,inAD4 a,inAD4 b){d=a+b;return d;} +//------------------------------------------------------------------------------------------------------------------------------ + AD2 opAAddOneD2(outAD2 d,inAD2 a,AD1 b){d=a+AD2_(b);return d;} + AD3 opAAddOneD3(outAD3 d,inAD3 a,AD1 b){d=a+AD3_(b);return d;} + AD4 opAAddOneD4(outAD4 d,inAD4 a,AD1 b){d=a+AD4_(b);return d;} +//------------------------------------------------------------------------------------------------------------------------------ + AD2 opACpyD2(outAD2 d,inAD2 a){d=a;return d;} + AD3 opACpyD3(outAD3 d,inAD3 a){d=a;return d;} + AD4 opACpyD4(outAD4 d,inAD4 a){d=a;return d;} +//------------------------------------------------------------------------------------------------------------------------------ + AD2 opALerpD2(outAD2 d,inAD2 a,inAD2 b,inAD2 c){d=ALerpD2(a,b,c);return d;} + AD3 opALerpD3(outAD3 d,inAD3 a,inAD3 b,inAD3 c){d=ALerpD3(a,b,c);return d;} + AD4 opALerpD4(outAD4 d,inAD4 a,inAD4 b,inAD4 c){d=ALerpD4(a,b,c);return d;} +//------------------------------------------------------------------------------------------------------------------------------ + AD2 opALerpOneD2(outAD2 d,inAD2 a,inAD2 b,AD1 c){d=ALerpD2(a,b,AD2_(c));return d;} + AD3 opALerpOneD3(outAD3 d,inAD3 a,inAD3 b,AD1 c){d=ALerpD3(a,b,AD3_(c));return d;} + AD4 opALerpOneD4(outAD4 d,inAD4 a,inAD4 b,AD1 c){d=ALerpD4(a,b,AD4_(c));return d;} +//------------------------------------------------------------------------------------------------------------------------------ + AD2 opAMaxD2(outAD2 d,inAD2 a,inAD2 b){d=max(a,b);return d;} + AD3 opAMaxD3(outAD3 d,inAD3 a,inAD3 b){d=max(a,b);return d;} + AD4 opAMaxD4(outAD4 d,inAD4 a,inAD4 b){d=max(a,b);return d;} +//------------------------------------------------------------------------------------------------------------------------------ + AD2 opAMinD2(outAD2 d,inAD2 a,inAD2 b){d=min(a,b);return d;} + AD3 opAMinD3(outAD3 d,inAD3 a,inAD3 b){d=min(a,b);return d;} + AD4 opAMinD4(outAD4 d,inAD4 a,inAD4 b){d=min(a,b);return d;} +//------------------------------------------------------------------------------------------------------------------------------ + AD2 opAMulD2(outAD2 d,inAD2 a,inAD2 b){d=a*b;return d;} + AD3 opAMulD3(outAD3 d,inAD3 a,inAD3 b){d=a*b;return d;} + AD4 opAMulD4(outAD4 d,inAD4 a,inAD4 b){d=a*b;return d;} +//------------------------------------------------------------------------------------------------------------------------------ + AD2 opAMulOneD2(outAD2 d,inAD2 a,AD1 b){d=a*AD2_(b);return d;} + AD3 opAMulOneD3(outAD3 d,inAD3 a,AD1 b){d=a*AD3_(b);return d;} + AD4 opAMulOneD4(outAD4 d,inAD4 a,AD1 b){d=a*AD4_(b);return d;} +//------------------------------------------------------------------------------------------------------------------------------ + AD2 opANegD2(outAD2 d,inAD2 a){d=-a;return d;} + AD3 opANegD3(outAD3 d,inAD3 a){d=-a;return d;} + AD4 opANegD4(outAD4 d,inAD4 a){d=-a;return d;} +//------------------------------------------------------------------------------------------------------------------------------ + AD2 opARcpD2(outAD2 d,inAD2 a){d=ARcpD2(a);return d;} + AD3 opARcpD3(outAD3 d,inAD3 a){d=ARcpD3(a);return d;} + AD4 opARcpD4(outAD4 d,inAD4 a){d=ARcpD4(a);return d;} + #endif +//============================================================================================================================== + AF2 opAAbsF2(outAF2 d,inAF2 a){d=abs(a);return d;} + AF3 opAAbsF3(outAF3 d,inAF3 a){d=abs(a);return d;} + AF4 opAAbsF4(outAF4 d,inAF4 a){d=abs(a);return d;} +//------------------------------------------------------------------------------------------------------------------------------ + AF2 opAAddF2(outAF2 d,inAF2 a,inAF2 b){d=a+b;return d;} + AF3 opAAddF3(outAF3 d,inAF3 a,inAF3 b){d=a+b;return d;} + AF4 opAAddF4(outAF4 d,inAF4 a,inAF4 b){d=a+b;return d;} +//------------------------------------------------------------------------------------------------------------------------------ + AF2 opAAddOneF2(outAF2 d,inAF2 a,AF1 b){d=a+AF2_(b);return d;} + AF3 opAAddOneF3(outAF3 d,inAF3 a,AF1 b){d=a+AF3_(b);return d;} + AF4 opAAddOneF4(outAF4 d,inAF4 a,AF1 b){d=a+AF4_(b);return d;} +//------------------------------------------------------------------------------------------------------------------------------ + AF2 opACpyF2(outAF2 d,inAF2 a){d=a;return d;} + AF3 opACpyF3(outAF3 d,inAF3 a){d=a;return d;} + AF4 opACpyF4(outAF4 d,inAF4 a){d=a;return d;} +//------------------------------------------------------------------------------------------------------------------------------ + AF2 opALerpF2(outAF2 d,inAF2 a,inAF2 b,inAF2 c){d=ALerpF2(a,b,c);return d;} + AF3 opALerpF3(outAF3 d,inAF3 a,inAF3 b,inAF3 c){d=ALerpF3(a,b,c);return d;} + AF4 opALerpF4(outAF4 d,inAF4 a,inAF4 b,inAF4 c){d=ALerpF4(a,b,c);return d;} +//------------------------------------------------------------------------------------------------------------------------------ + AF2 opALerpOneF2(outAF2 d,inAF2 a,inAF2 b,AF1 c){d=ALerpF2(a,b,AF2_(c));return d;} + AF3 opALerpOneF3(outAF3 d,inAF3 a,inAF3 b,AF1 c){d=ALerpF3(a,b,AF3_(c));return d;} + AF4 opALerpOneF4(outAF4 d,inAF4 a,inAF4 b,AF1 c){d=ALerpF4(a,b,AF4_(c));return d;} +//------------------------------------------------------------------------------------------------------------------------------ + AF2 opAMaxF2(outAF2 d,inAF2 a,inAF2 b){d=max(a,b);return d;} + AF3 opAMaxF3(outAF3 d,inAF3 a,inAF3 b){d=max(a,b);return d;} + AF4 opAMaxF4(outAF4 d,inAF4 a,inAF4 b){d=max(a,b);return d;} +//------------------------------------------------------------------------------------------------------------------------------ + AF2 opAMinF2(outAF2 d,inAF2 a,inAF2 b){d=min(a,b);return d;} + AF3 opAMinF3(outAF3 d,inAF3 a,inAF3 b){d=min(a,b);return d;} + AF4 opAMinF4(outAF4 d,inAF4 a,inAF4 b){d=min(a,b);return d;} +//------------------------------------------------------------------------------------------------------------------------------ + AF2 opAMulF2(outAF2 d,inAF2 a,inAF2 b){d=a*b;return d;} + AF3 opAMulF3(outAF3 d,inAF3 a,inAF3 b){d=a*b;return d;} + AF4 opAMulF4(outAF4 d,inAF4 a,inAF4 b){d=a*b;return d;} +//------------------------------------------------------------------------------------------------------------------------------ + AF2 opAMulOneF2(outAF2 d,inAF2 a,AF1 b){d=a*AF2_(b);return d;} + AF3 opAMulOneF3(outAF3 d,inAF3 a,AF1 b){d=a*AF3_(b);return d;} + AF4 opAMulOneF4(outAF4 d,inAF4 a,AF1 b){d=a*AF4_(b);return d;} +//------------------------------------------------------------------------------------------------------------------------------ + AF2 opANegF2(outAF2 d,inAF2 a){d=-a;return d;} + AF3 opANegF3(outAF3 d,inAF3 a){d=-a;return d;} + AF4 opANegF4(outAF4 d,inAF4 a){d=-a;return d;} +//------------------------------------------------------------------------------------------------------------------------------ + AF2 opARcpF2(outAF2 d,inAF2 a){d=ARcpF2(a);return d;} + AF3 opARcpF3(outAF3 d,inAF3 a){d=ARcpF3(a);return d;} + AF4 opARcpF4(outAF4 d,inAF4 a){d=ARcpF4(a);return d;} +#endif diff --git a/src/video_core/host_shaders/fsr/ffx_fsr1.h b/src/video_core/host_shaders/fsr/ffx_fsr1.h new file mode 100644 index 000000000..b0fe75ea9 --- /dev/null +++ b/src/video_core/host_shaders/fsr/ffx_fsr1.h @@ -0,0 +1,1200 @@ +// clang-format off +//_____________________________________________________________/\_______________________________________________________________ +//============================================================================================================================== +// +// +// AMD FidelityFX SUPER RESOLUTION [FSR 1] ::: SPATIAL SCALING & EXTRAS - v1.20210629 +// +// +//------------------------------------------------------------------------------------------------------------------------------ +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +//------------------------------------------------------------------------------------------------------------------------------ +// FidelityFX Super Resolution Sample +// +// Copyright (c) 2021 Advanced Micro Devices, Inc. All rights reserved. +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files(the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and / or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions : +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. +//------------------------------------------------------------------------------------------------------------------------------ +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +//------------------------------------------------------------------------------------------------------------------------------ +// ABOUT +// ===== +// FSR is a collection of algorithms relating to generating a higher resolution image. +// This specific header focuses on single-image non-temporal image scaling, and related tools. +// +// The core functions are EASU and RCAS: +// [EASU] Edge Adaptive Spatial Upsampling ....... 1x to 4x area range spatial scaling, clamped adaptive elliptical filter. +// [RCAS] Robust Contrast Adaptive Sharpening .... A non-scaling variation on CAS. +// RCAS needs to be applied after EASU as a separate pass. +// +// Optional utility functions are: +// [LFGA] Linear Film Grain Applicator ........... Tool to apply film grain after scaling. +// [SRTM] Simple Reversible Tone-Mapper .......... Linear HDR {0 to FP16_MAX} to {0 to 1} and back. +// [TEPD] Temporal Energy Preserving Dither ...... Temporally energy preserving dithered {0 to 1} linear to gamma 2.0 conversion. +// See each individual sub-section for inline documentation. +//------------------------------------------------------------------------------------------------------------------------------ +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +//------------------------------------------------------------------------------------------------------------------------------ +// FUNCTION PERMUTATIONS +// ===================== +// *F() ..... Single item computation with 32-bit. +// *H() ..... Single item computation with 16-bit, with packing (aka two 16-bit ops in parallel) when possible. +// *Hx2() ... Processing two items in parallel with 16-bit, easier packing. +// Not all interfaces in this file have a *Hx2() form. +//============================================================================================================================== +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +//_____________________________________________________________/\_______________________________________________________________ +//============================================================================================================================== +// +// FSR - [EASU] EDGE ADAPTIVE SPATIAL UPSAMPLING +// +//------------------------------------------------------------------------------------------------------------------------------ +// EASU provides a high quality spatial-only scaling at relatively low cost. +// Meaning EASU is appropiate for laptops and other low-end GPUs. +// Quality from 1x to 4x area scaling is good. +//------------------------------------------------------------------------------------------------------------------------------ +// The scalar uses a modified fast approximation to the standard lanczos(size=2) kernel. +// EASU runs in a single pass, so it applies a directionally and anisotropically adaptive radial lanczos. +// This is also kept as simple as possible to have minimum runtime. +//------------------------------------------------------------------------------------------------------------------------------ +// The lanzcos filter has negative lobes, so by itself it will introduce ringing. +// To remove all ringing, the algorithm uses the nearest 2x2 input texels as a neighborhood, +// and limits output to the minimum and maximum of that neighborhood. +//------------------------------------------------------------------------------------------------------------------------------ +// Input image requirements: +// +// Color needs to be encoded as 3 channel[red, green, blue](e.g.XYZ not supported) +// Each channel needs to be in the range[0, 1] +// Any color primaries are supported +// Display / tonemapping curve needs to be as if presenting to sRGB display or similar(e.g.Gamma 2.0) +// There should be no banding in the input +// There should be no high amplitude noise in the input +// There should be no noise in the input that is not at input pixel granularity +// For performance purposes, use 32bpp formats +//------------------------------------------------------------------------------------------------------------------------------ +// Best to apply EASU at the end of the frame after tonemapping +// but before film grain or composite of the UI. +//------------------------------------------------------------------------------------------------------------------------------ +// Example of including this header for D3D HLSL : +// +// #define A_GPU 1 +// #define A_HLSL 1 +// #define A_HALF 1 +// #include "ffx_a.h" +// #define FSR_EASU_H 1 +// #define FSR_RCAS_H 1 +// //declare input callbacks +// #include "ffx_fsr1.h" +// +// Example of including this header for Vulkan GLSL : +// +// #define A_GPU 1 +// #define A_GLSL 1 +// #define A_HALF 1 +// #include "ffx_a.h" +// #define FSR_EASU_H 1 +// #define FSR_RCAS_H 1 +// //declare input callbacks +// #include "ffx_fsr1.h" +// +// Example of including this header for Vulkan HLSL : +// +// #define A_GPU 1 +// #define A_HLSL 1 +// #define A_HLSL_6_2 1 +// #define A_NO_16_BIT_CAST 1 +// #define A_HALF 1 +// #include "ffx_a.h" +// #define FSR_EASU_H 1 +// #define FSR_RCAS_H 1 +// //declare input callbacks +// #include "ffx_fsr1.h" +// +// Example of declaring the required input callbacks for GLSL : +// The callbacks need to gather4 for each color channel using the specified texture coordinate 'p'. +// EASU uses gather4 to reduce position computation logic and for free Arrays of Structures to Structures of Arrays conversion. +// +// AH4 FsrEasuRH(AF2 p){return AH4(textureGather(sampler2D(tex,sam),p,0));} +// AH4 FsrEasuGH(AF2 p){return AH4(textureGather(sampler2D(tex,sam),p,1));} +// AH4 FsrEasuBH(AF2 p){return AH4(textureGather(sampler2D(tex,sam),p,2));} +// ... +// The FsrEasuCon function needs to be called from the CPU or GPU to set up constants. +// The difference in viewport and input image size is there to support Dynamic Resolution Scaling. +// To use FsrEasuCon() on the CPU, define A_CPU before including ffx_a and ffx_fsr1. +// Including a GPU example here, the 'con0' through 'con3' values would be stored out to a constant buffer. +// AU4 con0,con1,con2,con3; +// FsrEasuCon(con0,con1,con2,con3, +// 1920.0,1080.0, // Viewport size (top left aligned) in the input image which is to be scaled. +// 3840.0,2160.0, // The size of the input image. +// 2560.0,1440.0); // The output resolution. +//============================================================================================================================== +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +//_____________________________________________________________/\_______________________________________________________________ +//============================================================================================================================== +// CONSTANT SETUP +//============================================================================================================================== +// Call to setup required constant values (works on CPU or GPU). +A_STATIC void FsrEasuCon( +outAU4 con0, +outAU4 con1, +outAU4 con2, +outAU4 con3, +// This the rendered image resolution being upscaled +AF1 inputViewportInPixelsX, +AF1 inputViewportInPixelsY, +// This is the resolution of the resource containing the input image (useful for dynamic resolution) +AF1 inputSizeInPixelsX, +AF1 inputSizeInPixelsY, +// This is the display resolution which the input image gets upscaled to +AF1 outputSizeInPixelsX, +AF1 outputSizeInPixelsY){ + // Output integer position to a pixel position in viewport. + con0[0]=AU1_AF1(inputViewportInPixelsX*ARcpF1(outputSizeInPixelsX)); + con0[1]=AU1_AF1(inputViewportInPixelsY*ARcpF1(outputSizeInPixelsY)); + con0[2]=AU1_AF1(AF1_(0.5)*inputViewportInPixelsX*ARcpF1(outputSizeInPixelsX)-AF1_(0.5)); + con0[3]=AU1_AF1(AF1_(0.5)*inputViewportInPixelsY*ARcpF1(outputSizeInPixelsY)-AF1_(0.5)); + // Viewport pixel position to normalized image space. + // This is used to get upper-left of 'F' tap. + con1[0]=AU1_AF1(ARcpF1(inputSizeInPixelsX)); + con1[1]=AU1_AF1(ARcpF1(inputSizeInPixelsY)); + // Centers of gather4, first offset from upper-left of 'F'. + // +---+---+ + // | | | + // +--(0)--+ + // | b | c | + // +---F---+---+---+ + // | e | f | g | h | + // +--(1)--+--(2)--+ + // | i | j | k | l | + // +---+---+---+---+ + // | n | o | + // +--(3)--+ + // | | | + // +---+---+ + con1[2]=AU1_AF1(AF1_( 1.0)*ARcpF1(inputSizeInPixelsX)); + con1[3]=AU1_AF1(AF1_(-1.0)*ARcpF1(inputSizeInPixelsY)); + // These are from (0) instead of 'F'. + con2[0]=AU1_AF1(AF1_(-1.0)*ARcpF1(inputSizeInPixelsX)); + con2[1]=AU1_AF1(AF1_( 2.0)*ARcpF1(inputSizeInPixelsY)); + con2[2]=AU1_AF1(AF1_( 1.0)*ARcpF1(inputSizeInPixelsX)); + con2[3]=AU1_AF1(AF1_( 2.0)*ARcpF1(inputSizeInPixelsY)); + con3[0]=AU1_AF1(AF1_( 0.0)*ARcpF1(inputSizeInPixelsX)); + con3[1]=AU1_AF1(AF1_( 4.0)*ARcpF1(inputSizeInPixelsY)); + con3[2]=con3[3]=0;} + +//If the an offset into the input image resource +A_STATIC void FsrEasuConOffset( + outAU4 con0, + outAU4 con1, + outAU4 con2, + outAU4 con3, + // This the rendered image resolution being upscaled + AF1 inputViewportInPixelsX, + AF1 inputViewportInPixelsY, + // This is the resolution of the resource containing the input image (useful for dynamic resolution) + AF1 inputSizeInPixelsX, + AF1 inputSizeInPixelsY, + // This is the display resolution which the input image gets upscaled to + AF1 outputSizeInPixelsX, + AF1 outputSizeInPixelsY, + // This is the input image offset into the resource containing it (useful for dynamic resolution) + AF1 inputOffsetInPixelsX, + AF1 inputOffsetInPixelsY) { + FsrEasuCon(con0, con1, con2, con3, inputViewportInPixelsX, inputViewportInPixelsY, inputSizeInPixelsX, inputSizeInPixelsY, outputSizeInPixelsX, outputSizeInPixelsY); + con0[2] = AU1_AF1(AF1_(0.5) * inputViewportInPixelsX * ARcpF1(outputSizeInPixelsX) - AF1_(0.5) + inputOffsetInPixelsX); + con0[3] = AU1_AF1(AF1_(0.5) * inputViewportInPixelsY * ARcpF1(outputSizeInPixelsY) - AF1_(0.5) + inputOffsetInPixelsY); +} +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +//_____________________________________________________________/\_______________________________________________________________ +//============================================================================================================================== +// NON-PACKED 32-BIT VERSION +//============================================================================================================================== +#if defined(A_GPU)&&defined(FSR_EASU_F) + // Input callback prototypes, need to be implemented by calling shader + AF4 FsrEasuRF(AF2 p); + AF4 FsrEasuGF(AF2 p); + AF4 FsrEasuBF(AF2 p); +//------------------------------------------------------------------------------------------------------------------------------ + // Filtering for a given tap for the scalar. + void FsrEasuTapF( + inout AF3 aC, // Accumulated color, with negative lobe. + inout AF1 aW, // Accumulated weight. + AF2 off, // Pixel offset from resolve position to tap. + AF2 dir, // Gradient direction. + AF2 len, // Length. + AF1 lob, // Negative lobe strength. + AF1 clp, // Clipping point. + AF3 c){ // Tap color. + // Rotate offset by direction. + AF2 v; + v.x=(off.x*( dir.x))+(off.y*dir.y); + v.y=(off.x*(-dir.y))+(off.y*dir.x); + // Anisotropy. + v*=len; + // Compute distance^2. + AF1 d2=v.x*v.x+v.y*v.y; + // Limit to the window as at corner, 2 taps can easily be outside. + d2=min(d2,clp); + // Approximation of lancos2 without sin() or rcp(), or sqrt() to get x. + // (25/16 * (2/5 * x^2 - 1)^2 - (25/16 - 1)) * (1/4 * x^2 - 1)^2 + // |_______________________________________| |_______________| + // base window + // The general form of the 'base' is, + // (a*(b*x^2-1)^2-(a-1)) + // Where 'a=1/(2*b-b^2)' and 'b' moves around the negative lobe. + AF1 wB=AF1_(2.0/5.0)*d2+AF1_(-1.0); + AF1 wA=lob*d2+AF1_(-1.0); + wB*=wB; + wA*=wA; + wB=AF1_(25.0/16.0)*wB+AF1_(-(25.0/16.0-1.0)); + AF1 w=wB*wA; + // Do weighted average. + aC+=c*w;aW+=w;} +//------------------------------------------------------------------------------------------------------------------------------ + // Accumulate direction and length. + void FsrEasuSetF( + inout AF2 dir, + inout AF1 len, + AF2 pp, + AP1 biS,AP1 biT,AP1 biU,AP1 biV, + AF1 lA,AF1 lB,AF1 lC,AF1 lD,AF1 lE){ + // Compute bilinear weight, branches factor out as predicates are compiler time immediates. + // s t + // u v + AF1 w = AF1_(0.0); + if(biS)w=(AF1_(1.0)-pp.x)*(AF1_(1.0)-pp.y); + if(biT)w= pp.x *(AF1_(1.0)-pp.y); + if(biU)w=(AF1_(1.0)-pp.x)* pp.y ; + if(biV)w= pp.x * pp.y ; + // Direction is the '+' diff. + // a + // b c d + // e + // Then takes magnitude from abs average of both sides of 'c'. + // Length converts gradient reversal to 0, smoothly to non-reversal at 1, shaped, then adding horz and vert terms. + AF1 dc=lD-lC; + AF1 cb=lC-lB; + AF1 lenX=max(abs(dc),abs(cb)); + lenX=APrxLoRcpF1(lenX); + AF1 dirX=lD-lB; + dir.x+=dirX*w; + lenX=ASatF1(abs(dirX)*lenX); + lenX*=lenX; + len+=lenX*w; + // Repeat for the y axis. + AF1 ec=lE-lC; + AF1 ca=lC-lA; + AF1 lenY=max(abs(ec),abs(ca)); + lenY=APrxLoRcpF1(lenY); + AF1 dirY=lE-lA; + dir.y+=dirY*w; + lenY=ASatF1(abs(dirY)*lenY); + lenY*=lenY; + len+=lenY*w;} +//------------------------------------------------------------------------------------------------------------------------------ + void FsrEasuF( + out AF3 pix, + AU2 ip, // Integer pixel position in output. + AU4 con0, // Constants generated by FsrEasuCon(). + AU4 con1, + AU4 con2, + AU4 con3){ +//------------------------------------------------------------------------------------------------------------------------------ + // Get position of 'f'. + AF2 pp=AF2(ip)*AF2_AU2(con0.xy)+AF2_AU2(con0.zw); + AF2 fp=floor(pp); + pp-=fp; +//------------------------------------------------------------------------------------------------------------------------------ + // 12-tap kernel. + // b c + // e f g h + // i j k l + // n o + // Gather 4 ordering. + // a b + // r g + // For packed FP16, need either {rg} or {ab} so using the following setup for gather in all versions, + // a b <- unused (z) + // r g + // a b a b + // r g r g + // a b + // r g <- unused (z) + // Allowing dead-code removal to remove the 'z's. + AF2 p0=fp*AF2_AU2(con1.xy)+AF2_AU2(con1.zw); + // These are from p0 to avoid pulling two constants on pre-Navi hardware. + AF2 p1=p0+AF2_AU2(con2.xy); + AF2 p2=p0+AF2_AU2(con2.zw); + AF2 p3=p0+AF2_AU2(con3.xy); + AF4 bczzR=FsrEasuRF(p0); + AF4 bczzG=FsrEasuGF(p0); + AF4 bczzB=FsrEasuBF(p0); + AF4 ijfeR=FsrEasuRF(p1); + AF4 ijfeG=FsrEasuGF(p1); + AF4 ijfeB=FsrEasuBF(p1); + AF4 klhgR=FsrEasuRF(p2); + AF4 klhgG=FsrEasuGF(p2); + AF4 klhgB=FsrEasuBF(p2); + AF4 zzonR=FsrEasuRF(p3); + AF4 zzonG=FsrEasuGF(p3); + AF4 zzonB=FsrEasuBF(p3); +//------------------------------------------------------------------------------------------------------------------------------ + // Simplest multi-channel approximate luma possible (luma times 2, in 2 FMA/MAD). + AF4 bczzL=bczzB*AF4_(0.5)+(bczzR*AF4_(0.5)+bczzG); + AF4 ijfeL=ijfeB*AF4_(0.5)+(ijfeR*AF4_(0.5)+ijfeG); + AF4 klhgL=klhgB*AF4_(0.5)+(klhgR*AF4_(0.5)+klhgG); + AF4 zzonL=zzonB*AF4_(0.5)+(zzonR*AF4_(0.5)+zzonG); + // Rename. + AF1 bL=bczzL.x; + AF1 cL=bczzL.y; + AF1 iL=ijfeL.x; + AF1 jL=ijfeL.y; + AF1 fL=ijfeL.z; + AF1 eL=ijfeL.w; + AF1 kL=klhgL.x; + AF1 lL=klhgL.y; + AF1 hL=klhgL.z; + AF1 gL=klhgL.w; + AF1 oL=zzonL.z; + AF1 nL=zzonL.w; + // Accumulate for bilinear interpolation. + AF2 dir=AF2_(0.0); + AF1 len=AF1_(0.0); + FsrEasuSetF(dir,len,pp,true, false,false,false,bL,eL,fL,gL,jL); + FsrEasuSetF(dir,len,pp,false,true ,false,false,cL,fL,gL,hL,kL); + FsrEasuSetF(dir,len,pp,false,false,true ,false,fL,iL,jL,kL,nL); + FsrEasuSetF(dir,len,pp,false,false,false,true ,gL,jL,kL,lL,oL); +//------------------------------------------------------------------------------------------------------------------------------ + // Normalize with approximation, and cleanup close to zero. + AF2 dir2=dir*dir; + AF1 dirR=dir2.x+dir2.y; + AP1 zro=dirR w = -m/(n+e+w+s) +// 1 == (w*(n+e+w+s)+m)/(4*w+1) -> w = (1-m)/(n+e+w+s-4*1) +// Then chooses the 'w' which results in no clipping, limits 'w', and multiplies by the 'sharp' amount. +// This solution above has issues with MSAA input as the steps along the gradient cause edge detection issues. +// So RCAS uses 4x the maximum and 4x the minimum (depending on equation)in place of the individual taps. +// As well as switching from 'm' to either the minimum or maximum (depending on side), to help in energy conservation. +// This stabilizes RCAS. +// RCAS does a simple highpass which is normalized against the local contrast then shaped, +// 0.25 +// 0.25 -1 0.25 +// 0.25 +// This is used as a noise detection filter, to reduce the effect of RCAS on grain, and focus on real edges. +// +// GLSL example for the required callbacks : +// +// AH4 FsrRcasLoadH(ASW2 p){return AH4(imageLoad(imgSrc,ASU2(p)));} +// void FsrRcasInputH(inout AH1 r,inout AH1 g,inout AH1 b) +// { +// //do any simple input color conversions here or leave empty if none needed +// } +// +// FsrRcasCon need to be called from the CPU or GPU to set up constants. +// Including a GPU example here, the 'con' value would be stored out to a constant buffer. +// +// AU4 con; +// FsrRcasCon(con, +// 0.0); // The scale is {0.0 := maximum sharpness, to N>0, where N is the number of stops (halving) of the reduction of sharpness}. +// --------------- +// RCAS sharpening supports a CAS-like pass-through alpha via, +// #define FSR_RCAS_PASSTHROUGH_ALPHA 1 +// RCAS also supports a define to enable a more expensive path to avoid some sharpening of noise. +// Would suggest it is better to apply film grain after RCAS sharpening (and after scaling) instead of using this define, +// #define FSR_RCAS_DENOISE 1 +//============================================================================================================================== +// This is set at the limit of providing unnatural results for sharpening. +#define FSR_RCAS_LIMIT (0.25-(1.0/16.0)) +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +//_____________________________________________________________/\_______________________________________________________________ +//============================================================================================================================== +// CONSTANT SETUP +//============================================================================================================================== +// Call to setup required constant values (works on CPU or GPU). +A_STATIC void FsrRcasCon( +outAU4 con, +// The scale is {0.0 := maximum, to N>0, where N is the number of stops (halving) of the reduction of sharpness}. +AF1 sharpness){ + // Transform from stops to linear value. + sharpness=AExp2F1(-sharpness); + varAF2(hSharp)=initAF2(sharpness,sharpness); + con[0]=AU1_AF1(sharpness); + con[1]=AU1_AH2_AF2(hSharp); + con[2]=0; + con[3]=0;} +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +//_____________________________________________________________/\_______________________________________________________________ +//============================================================================================================================== +// NON-PACKED 32-BIT VERSION +//============================================================================================================================== +#if defined(A_GPU)&&defined(FSR_RCAS_F) + // Input callback prototypes that need to be implemented by calling shader + AF4 FsrRcasLoadF(ASU2 p); + void FsrRcasInputF(inout AF1 r,inout AF1 g,inout AF1 b); +//------------------------------------------------------------------------------------------------------------------------------ + void FsrRcasF( + out AF1 pixR, // Output values, non-vector so port between RcasFilter() and RcasFilterH() is easy. + out AF1 pixG, + out AF1 pixB, + #ifdef FSR_RCAS_PASSTHROUGH_ALPHA + out AF1 pixA, + #endif + AU2 ip, // Integer pixel position in output. + AU4 con){ // Constant generated by RcasSetup(). + // Algorithm uses minimal 3x3 pixel neighborhood. + // b + // d e f + // h + ASU2 sp=ASU2(ip); + AF3 b=FsrRcasLoadF(sp+ASU2( 0,-1)).rgb; + AF3 d=FsrRcasLoadF(sp+ASU2(-1, 0)).rgb; + #ifdef FSR_RCAS_PASSTHROUGH_ALPHA + AF4 ee=FsrRcasLoadF(sp); + AF3 e=ee.rgb;pixA=ee.a; + #else + AF3 e=FsrRcasLoadF(sp).rgb; + #endif + AF3 f=FsrRcasLoadF(sp+ASU2( 1, 0)).rgb; + AF3 h=FsrRcasLoadF(sp+ASU2( 0, 1)).rgb; + // Rename (32-bit) or regroup (16-bit). + AF1 bR=b.r; + AF1 bG=b.g; + AF1 bB=b.b; + AF1 dR=d.r; + AF1 dG=d.g; + AF1 dB=d.b; + AF1 eR=e.r; + AF1 eG=e.g; + AF1 eB=e.b; + AF1 fR=f.r; + AF1 fG=f.g; + AF1 fB=f.b; + AF1 hR=h.r; + AF1 hG=h.g; + AF1 hB=h.b; + // Run optional input transform. + FsrRcasInputF(bR,bG,bB); + FsrRcasInputF(dR,dG,dB); + FsrRcasInputF(eR,eG,eB); + FsrRcasInputF(fR,fG,fB); + FsrRcasInputF(hR,hG,hB); + // Luma times 2. + AF1 bL=bB*AF1_(0.5)+(bR*AF1_(0.5)+bG); + AF1 dL=dB*AF1_(0.5)+(dR*AF1_(0.5)+dG); + AF1 eL=eB*AF1_(0.5)+(eR*AF1_(0.5)+eG); + AF1 fL=fB*AF1_(0.5)+(fR*AF1_(0.5)+fG); + AF1 hL=hB*AF1_(0.5)+(hR*AF1_(0.5)+hG); + // Noise detection. + AF1 nz=AF1_(0.25)*bL+AF1_(0.25)*dL+AF1_(0.25)*fL+AF1_(0.25)*hL-eL; + nz=ASatF1(abs(nz)*APrxMedRcpF1(AMax3F1(AMax3F1(bL,dL,eL),fL,hL)-AMin3F1(AMin3F1(bL,dL,eL),fL,hL))); + nz=AF1_(-0.5)*nz+AF1_(1.0); + // Min and max of ring. + AF1 mn4R=min(AMin3F1(bR,dR,fR),hR); + AF1 mn4G=min(AMin3F1(bG,dG,fG),hG); + AF1 mn4B=min(AMin3F1(bB,dB,fB),hB); + AF1 mx4R=max(AMax3F1(bR,dR,fR),hR); + AF1 mx4G=max(AMax3F1(bG,dG,fG),hG); + AF1 mx4B=max(AMax3F1(bB,dB,fB),hB); + // Immediate constants for peak range. + AF2 peakC=AF2(1.0,-1.0*4.0); + // Limiters, these need to be high precision RCPs. + AF1 hitMinR=min(mn4R,eR)*ARcpF1(AF1_(4.0)*mx4R); + AF1 hitMinG=min(mn4G,eG)*ARcpF1(AF1_(4.0)*mx4G); + AF1 hitMinB=min(mn4B,eB)*ARcpF1(AF1_(4.0)*mx4B); + AF1 hitMaxR=(peakC.x-max(mx4R,eR))*ARcpF1(AF1_(4.0)*mn4R+peakC.y); + AF1 hitMaxG=(peakC.x-max(mx4G,eG))*ARcpF1(AF1_(4.0)*mn4G+peakC.y); + AF1 hitMaxB=(peakC.x-max(mx4B,eB))*ARcpF1(AF1_(4.0)*mn4B+peakC.y); + AF1 lobeR=max(-hitMinR,hitMaxR); + AF1 lobeG=max(-hitMinG,hitMaxG); + AF1 lobeB=max(-hitMinB,hitMaxB); + AF1 lobe=max(AF1_(-FSR_RCAS_LIMIT),min(AMax3F1(lobeR,lobeG,lobeB),AF1_(0.0)))*AF1_AU1(con.x); + // Apply noise removal. + #ifdef FSR_RCAS_DENOISE + lobe*=nz; + #endif + // Resolve, which needs the medium precision rcp approximation to avoid visible tonality changes. + AF1 rcpL=APrxMedRcpF1(AF1_(4.0)*lobe+AF1_(1.0)); + pixR=(lobe*bR+lobe*dR+lobe*hR+lobe*fR+eR)*rcpL; + pixG=(lobe*bG+lobe*dG+lobe*hG+lobe*fG+eG)*rcpL; + pixB=(lobe*bB+lobe*dB+lobe*hB+lobe*fB+eB)*rcpL; + return;} +#endif +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +//_____________________________________________________________/\_______________________________________________________________ +//============================================================================================================================== +// NON-PACKED 16-BIT VERSION +//============================================================================================================================== +#if defined(A_GPU)&&defined(A_HALF)&&defined(FSR_RCAS_H) + // Input callback prototypes that need to be implemented by calling shader + AH4 FsrRcasLoadH(ASW2 p); + void FsrRcasInputH(inout AH1 r,inout AH1 g,inout AH1 b); +//------------------------------------------------------------------------------------------------------------------------------ + void FsrRcasH( + out AH1 pixR, // Output values, non-vector so port between RcasFilter() and RcasFilterH() is easy. + out AH1 pixG, + out AH1 pixB, + #ifdef FSR_RCAS_PASSTHROUGH_ALPHA + out AH1 pixA, + #endif + AU2 ip, // Integer pixel position in output. + AU4 con){ // Constant generated by RcasSetup(). + // Sharpening algorithm uses minimal 3x3 pixel neighborhood. + // b + // d e f + // h + ASW2 sp=ASW2(ip); + AH3 b=FsrRcasLoadH(sp+ASW2( 0,-1)).rgb; + AH3 d=FsrRcasLoadH(sp+ASW2(-1, 0)).rgb; + #ifdef FSR_RCAS_PASSTHROUGH_ALPHA + AH4 ee=FsrRcasLoadH(sp); + AH3 e=ee.rgb;pixA=ee.a; + #else + AH3 e=FsrRcasLoadH(sp).rgb; + #endif + AH3 f=FsrRcasLoadH(sp+ASW2( 1, 0)).rgb; + AH3 h=FsrRcasLoadH(sp+ASW2( 0, 1)).rgb; + // Rename (32-bit) or regroup (16-bit). + AH1 bR=b.r; + AH1 bG=b.g; + AH1 bB=b.b; + AH1 dR=d.r; + AH1 dG=d.g; + AH1 dB=d.b; + AH1 eR=e.r; + AH1 eG=e.g; + AH1 eB=e.b; + AH1 fR=f.r; + AH1 fG=f.g; + AH1 fB=f.b; + AH1 hR=h.r; + AH1 hG=h.g; + AH1 hB=h.b; + // Run optional input transform. + FsrRcasInputH(bR,bG,bB); + FsrRcasInputH(dR,dG,dB); + FsrRcasInputH(eR,eG,eB); + FsrRcasInputH(fR,fG,fB); + FsrRcasInputH(hR,hG,hB); + // Luma times 2. + AH1 bL=bB*AH1_(0.5)+(bR*AH1_(0.5)+bG); + AH1 dL=dB*AH1_(0.5)+(dR*AH1_(0.5)+dG); + AH1 eL=eB*AH1_(0.5)+(eR*AH1_(0.5)+eG); + AH1 fL=fB*AH1_(0.5)+(fR*AH1_(0.5)+fG); + AH1 hL=hB*AH1_(0.5)+(hR*AH1_(0.5)+hG); + // Noise detection. + AH1 nz=AH1_(0.25)*bL+AH1_(0.25)*dL+AH1_(0.25)*fL+AH1_(0.25)*hL-eL; + nz=ASatH1(abs(nz)*APrxMedRcpH1(AMax3H1(AMax3H1(bL,dL,eL),fL,hL)-AMin3H1(AMin3H1(bL,dL,eL),fL,hL))); + nz=AH1_(-0.5)*nz+AH1_(1.0); + // Min and max of ring. + AH1 mn4R=min(AMin3H1(bR,dR,fR),hR); + AH1 mn4G=min(AMin3H1(bG,dG,fG),hG); + AH1 mn4B=min(AMin3H1(bB,dB,fB),hB); + AH1 mx4R=max(AMax3H1(bR,dR,fR),hR); + AH1 mx4G=max(AMax3H1(bG,dG,fG),hG); + AH1 mx4B=max(AMax3H1(bB,dB,fB),hB); + // Immediate constants for peak range. + AH2 peakC=AH2(1.0,-1.0*4.0); + // Limiters, these need to be high precision RCPs. + AH1 hitMinR=min(mn4R,eR)*ARcpH1(AH1_(4.0)*mx4R); + AH1 hitMinG=min(mn4G,eG)*ARcpH1(AH1_(4.0)*mx4G); + AH1 hitMinB=min(mn4B,eB)*ARcpH1(AH1_(4.0)*mx4B); + AH1 hitMaxR=(peakC.x-max(mx4R,eR))*ARcpH1(AH1_(4.0)*mn4R+peakC.y); + AH1 hitMaxG=(peakC.x-max(mx4G,eG))*ARcpH1(AH1_(4.0)*mn4G+peakC.y); + AH1 hitMaxB=(peakC.x-max(mx4B,eB))*ARcpH1(AH1_(4.0)*mn4B+peakC.y); + AH1 lobeR=max(-hitMinR,hitMaxR); + AH1 lobeG=max(-hitMinG,hitMaxG); + AH1 lobeB=max(-hitMinB,hitMaxB); + AH1 lobe=max(AH1_(-FSR_RCAS_LIMIT),min(AMax3H1(lobeR,lobeG,lobeB),AH1_(0.0)))*AH2_AU1(con.y).x; + // Apply noise removal. + #ifdef FSR_RCAS_DENOISE + lobe*=nz; + #endif + // Resolve, which needs the medium precision rcp approximation to avoid visible tonality changes. + AH1 rcpL=APrxMedRcpH1(AH1_(4.0)*lobe+AH1_(1.0)); + pixR=(lobe*bR+lobe*dR+lobe*hR+lobe*fR+eR)*rcpL; + pixG=(lobe*bG+lobe*dG+lobe*hG+lobe*fG+eG)*rcpL; + pixB=(lobe*bB+lobe*dB+lobe*hB+lobe*fB+eB)*rcpL;} +#endif +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +//_____________________________________________________________/\_______________________________________________________________ +//============================================================================================================================== +// PACKED 16-BIT VERSION +//============================================================================================================================== +#if defined(A_GPU)&&defined(A_HALF)&&defined(FSR_RCAS_HX2) + // Input callback prototypes that need to be implemented by the calling shader + AH4 FsrRcasLoadHx2(ASW2 p); + void FsrRcasInputHx2(inout AH2 r,inout AH2 g,inout AH2 b); +//------------------------------------------------------------------------------------------------------------------------------ + // Can be used to convert from packed Structures of Arrays to Arrays of Structures for store. + void FsrRcasDepackHx2(out AH4 pix0,out AH4 pix1,AH2 pixR,AH2 pixG,AH2 pixB){ + #ifdef A_HLSL + // Invoke a slower path for DX only, since it won't allow uninitialized values. + pix0.a=pix1.a=0.0; + #endif + pix0.rgb=AH3(pixR.x,pixG.x,pixB.x); + pix1.rgb=AH3(pixR.y,pixG.y,pixB.y);} +//------------------------------------------------------------------------------------------------------------------------------ + void FsrRcasHx2( + // Output values are for 2 8x8 tiles in a 16x8 region. + // pix.x = left 8x8 tile + // pix.y = right 8x8 tile + // This enables later processing to easily be packed as well. + out AH2 pixR, + out AH2 pixG, + out AH2 pixB, + #ifdef FSR_RCAS_PASSTHROUGH_ALPHA + out AH2 pixA, + #endif + AU2 ip, // Integer pixel position in output. + AU4 con){ // Constant generated by RcasSetup(). + // No scaling algorithm uses minimal 3x3 pixel neighborhood. + ASW2 sp0=ASW2(ip); + AH3 b0=FsrRcasLoadHx2(sp0+ASW2( 0,-1)).rgb; + AH3 d0=FsrRcasLoadHx2(sp0+ASW2(-1, 0)).rgb; + #ifdef FSR_RCAS_PASSTHROUGH_ALPHA + AH4 ee0=FsrRcasLoadHx2(sp0); + AH3 e0=ee0.rgb;pixA.r=ee0.a; + #else + AH3 e0=FsrRcasLoadHx2(sp0).rgb; + #endif + AH3 f0=FsrRcasLoadHx2(sp0+ASW2( 1, 0)).rgb; + AH3 h0=FsrRcasLoadHx2(sp0+ASW2( 0, 1)).rgb; + ASW2 sp1=sp0+ASW2(8,0); + AH3 b1=FsrRcasLoadHx2(sp1+ASW2( 0,-1)).rgb; + AH3 d1=FsrRcasLoadHx2(sp1+ASW2(-1, 0)).rgb; + #ifdef FSR_RCAS_PASSTHROUGH_ALPHA + AH4 ee1=FsrRcasLoadHx2(sp1); + AH3 e1=ee1.rgb;pixA.g=ee1.a; + #else + AH3 e1=FsrRcasLoadHx2(sp1).rgb; + #endif + AH3 f1=FsrRcasLoadHx2(sp1+ASW2( 1, 0)).rgb; + AH3 h1=FsrRcasLoadHx2(sp1+ASW2( 0, 1)).rgb; + // Arrays of Structures to Structures of Arrays conversion. + AH2 bR=AH2(b0.r,b1.r); + AH2 bG=AH2(b0.g,b1.g); + AH2 bB=AH2(b0.b,b1.b); + AH2 dR=AH2(d0.r,d1.r); + AH2 dG=AH2(d0.g,d1.g); + AH2 dB=AH2(d0.b,d1.b); + AH2 eR=AH2(e0.r,e1.r); + AH2 eG=AH2(e0.g,e1.g); + AH2 eB=AH2(e0.b,e1.b); + AH2 fR=AH2(f0.r,f1.r); + AH2 fG=AH2(f0.g,f1.g); + AH2 fB=AH2(f0.b,f1.b); + AH2 hR=AH2(h0.r,h1.r); + AH2 hG=AH2(h0.g,h1.g); + AH2 hB=AH2(h0.b,h1.b); + // Run optional input transform. + FsrRcasInputHx2(bR,bG,bB); + FsrRcasInputHx2(dR,dG,dB); + FsrRcasInputHx2(eR,eG,eB); + FsrRcasInputHx2(fR,fG,fB); + FsrRcasInputHx2(hR,hG,hB); + // Luma times 2. + AH2 bL=bB*AH2_(0.5)+(bR*AH2_(0.5)+bG); + AH2 dL=dB*AH2_(0.5)+(dR*AH2_(0.5)+dG); + AH2 eL=eB*AH2_(0.5)+(eR*AH2_(0.5)+eG); + AH2 fL=fB*AH2_(0.5)+(fR*AH2_(0.5)+fG); + AH2 hL=hB*AH2_(0.5)+(hR*AH2_(0.5)+hG); + // Noise detection. + AH2 nz=AH2_(0.25)*bL+AH2_(0.25)*dL+AH2_(0.25)*fL+AH2_(0.25)*hL-eL; + nz=ASatH2(abs(nz)*APrxMedRcpH2(AMax3H2(AMax3H2(bL,dL,eL),fL,hL)-AMin3H2(AMin3H2(bL,dL,eL),fL,hL))); + nz=AH2_(-0.5)*nz+AH2_(1.0); + // Min and max of ring. + AH2 mn4R=min(AMin3H2(bR,dR,fR),hR); + AH2 mn4G=min(AMin3H2(bG,dG,fG),hG); + AH2 mn4B=min(AMin3H2(bB,dB,fB),hB); + AH2 mx4R=max(AMax3H2(bR,dR,fR),hR); + AH2 mx4G=max(AMax3H2(bG,dG,fG),hG); + AH2 mx4B=max(AMax3H2(bB,dB,fB),hB); + // Immediate constants for peak range. + AH2 peakC=AH2(1.0,-1.0*4.0); + // Limiters, these need to be high precision RCPs. + AH2 hitMinR=min(mn4R,eR)*ARcpH2(AH2_(4.0)*mx4R); + AH2 hitMinG=min(mn4G,eG)*ARcpH2(AH2_(4.0)*mx4G); + AH2 hitMinB=min(mn4B,eB)*ARcpH2(AH2_(4.0)*mx4B); + AH2 hitMaxR=(peakC.x-max(mx4R,eR))*ARcpH2(AH2_(4.0)*mn4R+peakC.y); + AH2 hitMaxG=(peakC.x-max(mx4G,eG))*ARcpH2(AH2_(4.0)*mn4G+peakC.y); + AH2 hitMaxB=(peakC.x-max(mx4B,eB))*ARcpH2(AH2_(4.0)*mn4B+peakC.y); + AH2 lobeR=max(-hitMinR,hitMaxR); + AH2 lobeG=max(-hitMinG,hitMaxG); + AH2 lobeB=max(-hitMinB,hitMaxB); + AH2 lobe=max(AH2_(-FSR_RCAS_LIMIT),min(AMax3H2(lobeR,lobeG,lobeB),AH2_(0.0)))*AH2_(AH2_AU1(con.y).x); + // Apply noise removal. + #ifdef FSR_RCAS_DENOISE + lobe*=nz; + #endif + // Resolve, which needs the medium precision rcp approximation to avoid visible tonality changes. + AH2 rcpL=APrxMedRcpH2(AH2_(4.0)*lobe+AH2_(1.0)); + pixR=(lobe*bR+lobe*dR+lobe*hR+lobe*fR+eR)*rcpL; + pixG=(lobe*bG+lobe*dG+lobe*hG+lobe*fG+eG)*rcpL; + pixB=(lobe*bB+lobe*dB+lobe*hB+lobe*fB+eB)*rcpL;} +#endif +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +//_____________________________________________________________/\_______________________________________________________________ +//============================================================================================================================== +// +// FSR - [LFGA] LINEAR FILM GRAIN APPLICATOR +// +//------------------------------------------------------------------------------------------------------------------------------ +// Adding output-resolution film grain after scaling is a good way to mask both rendering and scaling artifacts. +// Suggest using tiled blue noise as film grain input, with peak noise frequency set for a specific look and feel. +// The 'Lfga*()' functions provide a convenient way to introduce grain. +// These functions limit grain based on distance to signal limits. +// This is done so that the grain is temporally energy preserving, and thus won't modify image tonality. +// Grain application should be done in a linear colorspace. +// The grain should be temporally changing, but have a temporal sum per pixel that adds to zero (non-biased). +//------------------------------------------------------------------------------------------------------------------------------ +// Usage, +// FsrLfga*( +// color, // In/out linear colorspace color {0 to 1} ranged. +// grain, // Per pixel grain texture value {-0.5 to 0.5} ranged, input is 3-channel to support colored grain. +// amount); // Amount of grain (0 to 1} ranged. +//------------------------------------------------------------------------------------------------------------------------------ +// Example if grain texture is monochrome: 'FsrLfgaF(color,AF3_(grain),amount)' +//============================================================================================================================== +#if defined(A_GPU) + // Maximum grain is the minimum distance to the signal limit. + void FsrLfgaF(inout AF3 c,AF3 t,AF1 a){c+=(t*AF3_(a))*min(AF3_(1.0)-c,c);} +#endif +//============================================================================================================================== +#if defined(A_GPU)&&defined(A_HALF) + // Half precision version (slower). + void FsrLfgaH(inout AH3 c,AH3 t,AH1 a){c+=(t*AH3_(a))*min(AH3_(1.0)-c,c);} +//------------------------------------------------------------------------------------------------------------------------------ + // Packed half precision version (faster). + void FsrLfgaHx2(inout AH2 cR,inout AH2 cG,inout AH2 cB,AH2 tR,AH2 tG,AH2 tB,AH1 a){ + cR+=(tR*AH2_(a))*min(AH2_(1.0)-cR,cR);cG+=(tG*AH2_(a))*min(AH2_(1.0)-cG,cG);cB+=(tB*AH2_(a))*min(AH2_(1.0)-cB,cB);} +#endif +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +//_____________________________________________________________/\_______________________________________________________________ +//============================================================================================================================== +// +// FSR - [SRTM] SIMPLE REVERSIBLE TONE-MAPPER +// +//------------------------------------------------------------------------------------------------------------------------------ +// This provides a way to take linear HDR color {0 to FP16_MAX} and convert it into a temporary {0 to 1} ranged post-tonemapped linear. +// The tonemapper preserves RGB ratio, which helps maintain HDR color bleed during filtering. +//------------------------------------------------------------------------------------------------------------------------------ +// Reversible tonemapper usage, +// FsrSrtm*(color); // {0 to FP16_MAX} converted to {0 to 1}. +// FsrSrtmInv*(color); // {0 to 1} converted into {0 to 32768, output peak safe for FP16}. +//============================================================================================================================== +#if defined(A_GPU) + void FsrSrtmF(inout AF3 c){c*=AF3_(ARcpF1(AMax3F1(c.r,c.g,c.b)+AF1_(1.0)));} + // The extra max solves the c=1.0 case (which is a /0). + void FsrSrtmInvF(inout AF3 c){c*=AF3_(ARcpF1(max(AF1_(1.0/32768.0),AF1_(1.0)-AMax3F1(c.r,c.g,c.b))));} +#endif +//============================================================================================================================== +#if defined(A_GPU)&&defined(A_HALF) + void FsrSrtmH(inout AH3 c){c*=AH3_(ARcpH1(AMax3H1(c.r,c.g,c.b)+AH1_(1.0)));} + void FsrSrtmInvH(inout AH3 c){c*=AH3_(ARcpH1(max(AH1_(1.0/32768.0),AH1_(1.0)-AMax3H1(c.r,c.g,c.b))));} +//------------------------------------------------------------------------------------------------------------------------------ + void FsrSrtmHx2(inout AH2 cR,inout AH2 cG,inout AH2 cB){ + AH2 rcp=ARcpH2(AMax3H2(cR,cG,cB)+AH2_(1.0));cR*=rcp;cG*=rcp;cB*=rcp;} + void FsrSrtmInvHx2(inout AH2 cR,inout AH2 cG,inout AH2 cB){ + AH2 rcp=ARcpH2(max(AH2_(1.0/32768.0),AH2_(1.0)-AMax3H2(cR,cG,cB)));cR*=rcp;cG*=rcp;cB*=rcp;} +#endif +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +//_____________________________________________________________/\_______________________________________________________________ +//============================================================================================================================== +// +// FSR - [TEPD] TEMPORAL ENERGY PRESERVING DITHER +// +//------------------------------------------------------------------------------------------------------------------------------ +// Temporally energy preserving dithered {0 to 1} linear to gamma 2.0 conversion. +// Gamma 2.0 is used so that the conversion back to linear is just to square the color. +// The conversion comes in 8-bit and 10-bit modes, designed for output to 8-bit UNORM or 10:10:10:2 respectively. +// Given good non-biased temporal blue noise as dither input, +// the output dither will temporally conserve energy. +// This is done by choosing the linear nearest step point instead of perceptual nearest. +// See code below for details. +//------------------------------------------------------------------------------------------------------------------------------ +// DX SPEC RULES FOR FLOAT->UNORM 8-BIT CONVERSION +// =============================================== +// - Output is 'uint(floor(saturate(n)*255.0+0.5))'. +// - Thus rounding is to nearest. +// - NaN gets converted to zero. +// - INF is clamped to {0.0 to 1.0}. +//============================================================================================================================== +#if defined(A_GPU) + // Hand tuned integer position to dither value, with more values than simple checkerboard. + // Only 32-bit has enough precision for this compddation. + // Output is {0 to <1}. + AF1 FsrTepdDitF(AU2 p,AU1 f){ + AF1 x=AF1_(p.x+f); + AF1 y=AF1_(p.y); + // The 1.61803 golden ratio. + AF1 a=AF1_((1.0+sqrt(5.0))/2.0); + // Number designed to provide a good visual pattern. + AF1 b=AF1_(1.0/3.69); + x=x*a+(y*b); + return AFractF1(x);} +//------------------------------------------------------------------------------------------------------------------------------ + // This version is 8-bit gamma 2.0. + // The 'c' input is {0 to 1}. + // Output is {0 to 1} ready for image store. + void FsrTepdC8F(inout AF3 c,AF1 dit){ + AF3 n=sqrt(c); + n=floor(n*AF3_(255.0))*AF3_(1.0/255.0); + AF3 a=n*n; + AF3 b=n+AF3_(1.0/255.0);b=b*b; + // Ratio of 'a' to 'b' required to produce 'c'. + // APrxLoRcpF1() won't work here (at least for very high dynamic ranges). + // APrxMedRcpF1() is an IADD,FMA,MUL. + AF3 r=(c-b)*APrxMedRcpF3(a-b); + // Use the ratio as a cutoff to choose 'a' or 'b'. + // AGtZeroF1() is a MUL. + c=ASatF3(n+AGtZeroF3(AF3_(dit)-r)*AF3_(1.0/255.0));} +//------------------------------------------------------------------------------------------------------------------------------ + // This version is 10-bit gamma 2.0. + // The 'c' input is {0 to 1}. + // Output is {0 to 1} ready for image store. + void FsrTepdC10F(inout AF3 c,AF1 dit){ + AF3 n=sqrt(c); + n=floor(n*AF3_(1023.0))*AF3_(1.0/1023.0); + AF3 a=n*n; + AF3 b=n+AF3_(1.0/1023.0);b=b*b; + AF3 r=(c-b)*APrxMedRcpF3(a-b); + c=ASatF3(n+AGtZeroF3(AF3_(dit)-r)*AF3_(1.0/1023.0));} +#endif +//============================================================================================================================== +#if defined(A_GPU)&&defined(A_HALF) + AH1 FsrTepdDitH(AU2 p,AU1 f){ + AF1 x=AF1_(p.x+f); + AF1 y=AF1_(p.y); + AF1 a=AF1_((1.0+sqrt(5.0))/2.0); + AF1 b=AF1_(1.0/3.69); + x=x*a+(y*b); + return AH1(AFractF1(x));} +//------------------------------------------------------------------------------------------------------------------------------ + void FsrTepdC8H(inout AH3 c,AH1 dit){ + AH3 n=sqrt(c); + n=floor(n*AH3_(255.0))*AH3_(1.0/255.0); + AH3 a=n*n; + AH3 b=n+AH3_(1.0/255.0);b=b*b; + AH3 r=(c-b)*APrxMedRcpH3(a-b); + c=ASatH3(n+AGtZeroH3(AH3_(dit)-r)*AH3_(1.0/255.0));} +//------------------------------------------------------------------------------------------------------------------------------ + void FsrTepdC10H(inout AH3 c,AH1 dit){ + AH3 n=sqrt(c); + n=floor(n*AH3_(1023.0))*AH3_(1.0/1023.0); + AH3 a=n*n; + AH3 b=n+AH3_(1.0/1023.0);b=b*b; + AH3 r=(c-b)*APrxMedRcpH3(a-b); + c=ASatH3(n+AGtZeroH3(AH3_(dit)-r)*AH3_(1.0/1023.0));} +//============================================================================================================================== + // This computes dither for positions 'p' and 'p+{8,0}'. + AH2 FsrTepdDitHx2(AU2 p,AU1 f){ + AF2 x; + x.x=AF1_(p.x+f); + x.y=x.x+AF1_(8.0); + AF1 y=AF1_(p.y); + AF1 a=AF1_((1.0+sqrt(5.0))/2.0); + AF1 b=AF1_(1.0/3.69); + x=x*AF2_(a)+AF2_(y*b); + return AH2(AFractF2(x));} +//------------------------------------------------------------------------------------------------------------------------------ + void FsrTepdC8Hx2(inout AH2 cR,inout AH2 cG,inout AH2 cB,AH2 dit){ + AH2 nR=sqrt(cR); + AH2 nG=sqrt(cG); + AH2 nB=sqrt(cB); + nR=floor(nR*AH2_(255.0))*AH2_(1.0/255.0); + nG=floor(nG*AH2_(255.0))*AH2_(1.0/255.0); + nB=floor(nB*AH2_(255.0))*AH2_(1.0/255.0); + AH2 aR=nR*nR; + AH2 aG=nG*nG; + AH2 aB=nB*nB; + AH2 bR=nR+AH2_(1.0/255.0);bR=bR*bR; + AH2 bG=nG+AH2_(1.0/255.0);bG=bG*bG; + AH2 bB=nB+AH2_(1.0/255.0);bB=bB*bB; + AH2 rR=(cR-bR)*APrxMedRcpH2(aR-bR); + AH2 rG=(cG-bG)*APrxMedRcpH2(aG-bG); + AH2 rB=(cB-bB)*APrxMedRcpH2(aB-bB); + cR=ASatH2(nR+AGtZeroH2(dit-rR)*AH2_(1.0/255.0)); + cG=ASatH2(nG+AGtZeroH2(dit-rG)*AH2_(1.0/255.0)); + cB=ASatH2(nB+AGtZeroH2(dit-rB)*AH2_(1.0/255.0));} +//------------------------------------------------------------------------------------------------------------------------------ + void FsrTepdC10Hx2(inout AH2 cR,inout AH2 cG,inout AH2 cB,AH2 dit){ + AH2 nR=sqrt(cR); + AH2 nG=sqrt(cG); + AH2 nB=sqrt(cB); + nR=floor(nR*AH2_(1023.0))*AH2_(1.0/1023.0); + nG=floor(nG*AH2_(1023.0))*AH2_(1.0/1023.0); + nB=floor(nB*AH2_(1023.0))*AH2_(1.0/1023.0); + AH2 aR=nR*nR; + AH2 aG=nG*nG; + AH2 aB=nB*nB; + AH2 bR=nR+AH2_(1.0/1023.0);bR=bR*bR; + AH2 bG=nG+AH2_(1.0/1023.0);bG=bG*bG; + AH2 bB=nB+AH2_(1.0/1023.0);bB=bB*bB; + AH2 rR=(cR-bR)*APrxMedRcpH2(aR-bR); + AH2 rG=(cG-bG)*APrxMedRcpH2(aG-bG); + AH2 rB=(cB-bB)*APrxMedRcpH2(aB-bB); + cR=ASatH2(nR+AGtZeroH2(dit-rR)*AH2_(1.0/1023.0)); + cG=ASatH2(nG+AGtZeroH2(dit-rG)*AH2_(1.0/1023.0)); + cB=ASatH2(nB+AGtZeroH2(dit-rB)*AH2_(1.0/1023.0));} +#endif diff --git a/src/video_core/host_shaders/post_process.frag b/src/video_core/host_shaders/post_process.frag index d501e9813..fb0917528 100644 --- a/src/video_core/host_shaders/post_process.frag +++ b/src/video_core/host_shaders/post_process.frag @@ -8,18 +8,25 @@ layout (location = 0) out vec4 color; layout (binding = 0) uniform sampler2D texSampler; -layout(push_constant) uniform settings { +layout (push_constant) uniform settings { float gamma; + bool hdr; } pp; const float cutoff = 0.0031308, a = 1.055, b = 0.055, d = 12.92; -vec3 gamma(vec3 rgb) -{ - return mix(a * pow(rgb, vec3(1.0 / (2.4 + 1.0 - pp.gamma))) - b, d * rgb / pp.gamma, lessThan(rgb, vec3(cutoff))); +vec3 gamma(vec3 rgb) { + return mix( + a * pow(rgb, vec3(1.0 / (2.4 + 1.0 - pp.gamma))) - b, + d * rgb / pp.gamma, + lessThan(rgb, vec3(cutoff)) + ); } -void main() -{ +void main() { vec4 color_linear = texture(texSampler, uv); - color = vec4(gamma(color_linear.rgb), color_linear.a); + if (pp.hdr) { + color = color_linear; + } else { + color = vec4(gamma(color_linear.rgb), color_linear.a); + } } diff --git a/src/video_core/host_shaders/source_shader.h.in b/src/video_core/host_shaders/source_shader.h.in index 43bf5b0c5..3472b2837 100644 --- a/src/video_core/host_shaders/source_shader.h.in +++ b/src/video_core/host_shaders/source_shader.h.in @@ -7,8 +7,8 @@ namespace HostShaders { -constexpr std::string_view @CONTENTS_NAME@ = { +constexpr std::string_view @CONTENTS_NAME@ = R"shader_src( @CONTENTS@ -}; +)shader_src"; } // namespace HostShaders diff --git a/src/video_core/page_manager.h b/src/video_core/page_manager.h index f44307f92..f6bae9641 100644 --- a/src/video_core/page_manager.h +++ b/src/video_core/page_manager.h @@ -5,6 +5,9 @@ #include #include +#ifdef __linux__ +#include "common/adaptive_mutex.h" +#endif #include "common/spin_lock.h" #include "common/types.h" @@ -36,7 +39,11 @@ private: std::unique_ptr impl; Vulkan::Rasterizer* rasterizer; boost::icl::interval_map cached_pages; +#ifdef PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP + Common::AdaptiveMutex lock; +#else Common::SpinLock lock; +#endif }; } // namespace VideoCore diff --git a/src/video_core/renderer_vulkan/host_passes/fsr_pass.cpp b/src/video_core/renderer_vulkan/host_passes/fsr_pass.cpp new file mode 100644 index 000000000..1c54207e0 --- /dev/null +++ b/src/video_core/renderer_vulkan/host_passes/fsr_pass.cpp @@ -0,0 +1,445 @@ +// SPDX-FileCopyrightText: Copyright 2024 shadPS4 Emulator Project +// SPDX-License-Identifier: GPL-2.0-or-later + +#include "fsr_pass.h" + +#include "common/assert.h" +#include "video_core/host_shaders/fsr_comp.h" +#include "video_core/renderer_vulkan/vk_platform.h" +#include "video_core/renderer_vulkan/vk_shader_util.h" + +#define A_CPU +#include "core/debug_state.h" +#include "video_core/host_shaders/fsr/ffx_a.h" +#include "video_core/host_shaders/fsr/ffx_fsr1.h" + +typedef u32 uvec4[4]; + +struct FSRConstants { + uvec4 Const0; + uvec4 Const1; + uvec4 Const2; + uvec4 Const3; + uvec4 Sample; +}; + +namespace Vulkan::HostPasses { + +void FsrPass::Create(vk::Device device, VmaAllocator allocator, u32 num_images) { + this->device = device; + this->num_images = num_images; + + sampler = Check<"create upscaling sampler">(device.createSamplerUnique(vk::SamplerCreateInfo{ + .magFilter = vk::Filter::eLinear, + .minFilter = vk::Filter::eLinear, + .mipmapMode = vk::SamplerMipmapMode::eNearest, + .addressModeU = vk::SamplerAddressMode::eClampToEdge, + .addressModeV = vk::SamplerAddressMode::eClampToEdge, + .addressModeW = vk::SamplerAddressMode::eClampToEdge, + .maxAnisotropy = 1.0f, + .minLod = -1000.0f, + .maxLod = 1000.0f, + })); + + std::array layoutBindings{{ + { + .binding = 0, + .descriptorType = vk::DescriptorType::eSampledImage, + .descriptorCount = 1, + .stageFlags = vk::ShaderStageFlagBits::eCompute, + }, + { + .binding = 1, + .descriptorType = vk::DescriptorType::eStorageImage, + .descriptorCount = 1, + .stageFlags = vk::ShaderStageFlagBits::eCompute, + }, + { + .binding = 2, + .descriptorType = vk::DescriptorType::eSampler, + .descriptorCount = 1, + .stageFlags = vk::ShaderStageFlagBits::eCompute, + .pImmutableSamplers = &sampler.get(), + }, + }}; + + descriptor_set_layout = + Check<"create fsr descriptor set layout">(device.createDescriptorSetLayoutUnique({ + .flags = vk::DescriptorSetLayoutCreateFlagBits::ePushDescriptor, + .bindingCount = layoutBindings.size(), + .pBindings = layoutBindings.data(), + })); + + const vk::PushConstantRange push_constants{ + .stageFlags = vk::ShaderStageFlagBits::eCompute, + .offset = 0, + .size = sizeof(FSRConstants), + }; + + const auto& cs_easu_module = + Compile(HostShaders::FSR_COMP, vk::ShaderStageFlagBits::eCompute, device, + { + "SAMPLE_EASU=1", + }); + ASSERT(cs_easu_module); + SetObjectName(device, cs_easu_module, "fsr.comp [EASU]"); + + const auto& cs_rcas_module = + Compile(HostShaders::FSR_COMP, vk::ShaderStageFlagBits::eCompute, device, + { + "SAMPLE_RCAS=1", + }); + ASSERT(cs_rcas_module); + SetObjectName(device, cs_rcas_module, "fsr.comp [RCAS]"); + + pipeline_layout = Check<"fsp pipeline layout">(device.createPipelineLayoutUnique({ + .setLayoutCount = 1, + .pSetLayouts = &descriptor_set_layout.get(), + .pushConstantRangeCount = 1, + .pPushConstantRanges = &push_constants, + })); + SetObjectName(device, pipeline_layout.get(), "fsr pipeline layout"); + + const vk::ComputePipelineCreateInfo easu_pinfo{ + .stage{ + .stage = vk::ShaderStageFlagBits::eCompute, + .module = cs_easu_module, + .pName = "main", + }, + .layout = pipeline_layout.get(), + }; + easu_pipeline = + Check<"fsp easu compute pipelines">(device.createComputePipelineUnique({}, easu_pinfo)); + SetObjectName(device, easu_pipeline.get(), "fsr easu pipeline"); + + const vk::ComputePipelineCreateInfo rcas_pinfo{ + .stage{ + .stage = vk::ShaderStageFlagBits::eCompute, + .module = cs_rcas_module, + .pName = "main", + }, + .layout = pipeline_layout.get(), + }; + rcas_pipeline = + Check<"fsp rcas compute pipelines">(device.createComputePipelineUnique({}, rcas_pinfo)); + SetObjectName(device, rcas_pipeline.get(), "fsr rcas pipeline"); + + device.destroyShaderModule(cs_easu_module); + device.destroyShaderModule(cs_rcas_module); + + available_imgs.resize(num_images); + for (int i = 0; i < num_images; ++i) { + auto& img = available_imgs[i]; + img.id = i; + img.intermediary_image = VideoCore::UniqueImage(device, allocator); + img.output_image = VideoCore::UniqueImage(device, allocator); + } +} + +vk::ImageView FsrPass::Render(vk::CommandBuffer cmdbuf, vk::ImageView input, + vk::Extent2D input_size, vk::Extent2D output_size, Settings settings, + bool hdr) { + if (!settings.enable) { + DebugState.is_using_fsr = false; + return input; + } + if (input_size.width >= output_size.width && input_size.height >= output_size.height) { + DebugState.is_using_fsr = false; + return input; + } + + DebugState.is_using_fsr = true; + + if (output_size != cur_size) { + ResizeAndInvalidate(output_size.width, output_size.height); + } + auto [width, height] = cur_size; + + auto& img = available_imgs[cur_image]; + if (++cur_image >= available_imgs.size()) { + cur_image = 0; + } + + if (img.dirty) { + CreateImages(img); + } + + static const int thread_group_work_region_dim = 16; + int dispatch_x = (width + (thread_group_work_region_dim - 1)) / thread_group_work_region_dim; + int dispatch_y = (height + (thread_group_work_region_dim - 1)) / thread_group_work_region_dim; + + constexpr vk::ImageSubresourceRange simple_subresource = { + .aspectMask = vk::ImageAspectFlagBits::eColor, + .levelCount = 1, + .layerCount = 1, + }; + const std::array enter_barrier{ + vk::ImageMemoryBarrier2{ + .srcStageMask = vk::PipelineStageFlagBits2::eComputeShader, + .srcAccessMask = vk::AccessFlagBits2::eShaderRead, + .dstStageMask = vk::PipelineStageFlagBits2::eComputeShader, + .dstAccessMask = vk::AccessFlagBits2::eShaderWrite, + .oldLayout = vk::ImageLayout::eUndefined, + .newLayout = vk::ImageLayout::eGeneral, + .image = img.intermediary_image, + .subresourceRange = simple_subresource, + }, + }; + cmdbuf.pipelineBarrier2({ + .imageMemoryBarrierCount = enter_barrier.size(), + .pImageMemoryBarriers = enter_barrier.data(), + }); + + FSRConstants consts{}; + FsrEasuCon(reinterpret_cast(&consts.Const0), reinterpret_cast(&consts.Const1), + reinterpret_cast(&consts.Const2), reinterpret_cast(&consts.Const3), + static_cast(input_size.width), static_cast(input_size.height), + static_cast(input_size.width), static_cast(input_size.height), (AF1)width, + (AF1)height); + consts.Sample[0] = hdr && !settings.use_rcas ? 1 : 0; + + if (settings.use_rcas) { + + { // easu + std::array img_info{{ + { + .imageView = input, + .imageLayout = vk::ImageLayout::eShaderReadOnlyOptimal, + }, + { + .imageView = img.intermediary_image_view.get(), + .imageLayout = vk::ImageLayout::eGeneral, + }, + { + .sampler = sampler.get(), + }, + }}; + + std::array set_writes{{ + { + .dstBinding = 0, + .descriptorCount = 1, + .descriptorType = vk::DescriptorType::eSampledImage, + .pImageInfo = &img_info[0], + }, + { + .dstBinding = 1, + .descriptorCount = 1, + .descriptorType = vk::DescriptorType::eStorageImage, + .pImageInfo = &img_info[1], + }, + { + .dstBinding = 2, + .descriptorCount = 1, + .descriptorType = vk::DescriptorType::eSampler, + .pImageInfo = &img_info[2], + }, + }}; + + cmdbuf.bindPipeline(vk::PipelineBindPoint::eCompute, easu_pipeline.get()); + cmdbuf.pushDescriptorSetKHR(vk::PipelineBindPoint::eCompute, pipeline_layout.get(), 0, + set_writes); + cmdbuf.pushConstants(pipeline_layout.get(), vk::ShaderStageFlagBits::eCompute, 0, + sizeof(FSRConstants), &consts); + cmdbuf.dispatch(dispatch_x, dispatch_y, 1); + } + + std::array img_barrier{ + vk::ImageMemoryBarrier2{ + .srcStageMask = vk::PipelineStageFlagBits2::eComputeShader, + .srcAccessMask = vk::AccessFlagBits2::eShaderStorageWrite, + .dstStageMask = vk::PipelineStageFlagBits2::eComputeShader, + .dstAccessMask = vk::AccessFlagBits2::eShaderRead, + .oldLayout = vk::ImageLayout::eGeneral, + .newLayout = vk::ImageLayout::eShaderReadOnlyOptimal, + .image = img.intermediary_image, + .subresourceRange = simple_subresource, + }, + vk::ImageMemoryBarrier2{ + .srcStageMask = vk::PipelineStageFlagBits2::eTopOfPipe, + .srcAccessMask = vk::AccessFlagBits2::eNone, + .dstStageMask = vk::PipelineStageFlagBits2::eComputeShader, + .dstAccessMask = vk::AccessFlagBits2::eShaderStorageWrite, + .oldLayout = vk::ImageLayout::eUndefined, + .newLayout = vk::ImageLayout::eGeneral, + .image = img.output_image, + .subresourceRange = simple_subresource, + }, + }; + cmdbuf.pipelineBarrier2(vk::DependencyInfo{ + .imageMemoryBarrierCount = img_barrier.size(), + .pImageMemoryBarriers = img_barrier.data(), + }); + + { // rcas + consts = {}; + FsrRcasCon(reinterpret_cast(&consts.Const0), settings.rcas_attenuation); + consts.Sample[0] = hdr ? 1 : 0; + + std::array img_info{{ + { + .imageView = img.intermediary_image_view.get(), + .imageLayout = vk::ImageLayout::eShaderReadOnlyOptimal, + }, + { + .imageView = img.output_image_view.get(), + .imageLayout = vk::ImageLayout::eGeneral, + }, + { + .sampler = sampler.get(), + }, + }}; + + std::array set_writes{{ + { + .dstBinding = 0, + .descriptorCount = 1, + .descriptorType = vk::DescriptorType::eSampledImage, + .pImageInfo = &img_info[0], + }, + { + .dstBinding = 1, + .descriptorCount = 1, + .descriptorType = vk::DescriptorType::eStorageImage, + .pImageInfo = &img_info[1], + }, + { + .dstBinding = 2, + .descriptorCount = 1, + .descriptorType = vk::DescriptorType::eSampler, + .pImageInfo = &img_info[2], + }, + }}; + + cmdbuf.bindPipeline(vk::PipelineBindPoint::eCompute, rcas_pipeline.get()); + cmdbuf.pushDescriptorSetKHR(vk::PipelineBindPoint::eCompute, pipeline_layout.get(), 0, + set_writes); + cmdbuf.pushConstants(pipeline_layout.get(), vk::ShaderStageFlagBits::eCompute, 0, + sizeof(FSRConstants), &consts); + cmdbuf.dispatch(dispatch_x, dispatch_y, 1); + } + + } else { + // only easu + std::array img_info{{ + { + .imageView = input, + .imageLayout = vk::ImageLayout::eShaderReadOnlyOptimal, + }, + { + .imageView = img.output_image_view.get(), + .imageLayout = vk::ImageLayout::eGeneral, + }, + { + .sampler = sampler.get(), + }, + }}; + + std::array set_writes{{ + { + .dstBinding = 0, + .descriptorCount = 1, + .descriptorType = vk::DescriptorType::eSampledImage, + .pImageInfo = &img_info[0], + }, + { + .dstBinding = 1, + .descriptorCount = 1, + .descriptorType = vk::DescriptorType::eStorageImage, + .pImageInfo = &img_info[1], + }, + { + .dstBinding = 2, + .descriptorCount = 1, + .descriptorType = vk::DescriptorType::eSampler, + .pImageInfo = &img_info[2], + }, + }}; + + cmdbuf.bindPipeline(vk::PipelineBindPoint::eCompute, easu_pipeline.get()); + cmdbuf.pushDescriptorSetKHR(vk::PipelineBindPoint::eCompute, pipeline_layout.get(), 0, + set_writes); + cmdbuf.pushConstants(pipeline_layout.get(), vk::ShaderStageFlagBits::eCompute, 0, + sizeof(FSRConstants), &consts); + cmdbuf.dispatch(dispatch_x, dispatch_y, 1); + } + + const std::array return_barrier{ + vk::ImageMemoryBarrier2{ + .srcStageMask = vk::PipelineStageFlagBits2::eComputeShader, + .srcAccessMask = vk::AccessFlagBits2::eShaderStorageWrite, + .dstStageMask = vk::PipelineStageFlagBits2::eAllCommands, + .dstAccessMask = vk::AccessFlagBits2::eShaderRead, + .oldLayout = vk::ImageLayout::eGeneral, + .newLayout = vk::ImageLayout::eShaderReadOnlyOptimal, + .image = img.output_image, + .subresourceRange = simple_subresource, + }, + }; + cmdbuf.pipelineBarrier2({ + .imageMemoryBarrierCount = return_barrier.size(), + .pImageMemoryBarriers = return_barrier.data(), + }); + + return img.output_image_view.get(); +} + +void FsrPass::ResizeAndInvalidate(u32 width, u32 height) { + this->cur_size = vk::Extent2D{ + .width = width, + .height = height, + }; + for (int i = 0; i < num_images; ++i) { + available_imgs[i].dirty = true; + } +} + +void FsrPass::CreateImages(Img& img) const { + img.dirty = false; + + vk::ImageCreateInfo image_create_info{ + .imageType = vk::ImageType::e2D, + .format = vk::Format::eR16G16B16A16Sfloat, + .extent{ + .width = cur_size.width, + .height = cur_size.height, + .depth = 1, + }, + .mipLevels = 1, + .arrayLayers = 1, + .samples = vk::SampleCountFlagBits::e1, + // .tiling = vk::ImageTiling::eOptimal, + .usage = vk::ImageUsageFlagBits::eSampled | vk::ImageUsageFlagBits::eStorage, + .initialLayout = vk::ImageLayout::eUndefined, + }; + img.intermediary_image.Create(image_create_info); + SetObjectName(device, static_cast(img.intermediary_image), + "FSR Intermediary Image #{}", img.id); + image_create_info.usage = vk::ImageUsageFlagBits::eTransferSrc | + vk::ImageUsageFlagBits::eSampled | vk::ImageUsageFlagBits::eStorage | + vk::ImageUsageFlagBits::eColorAttachment; + img.output_image.Create(image_create_info); + SetObjectName(device, static_cast(img.output_image), "FSR Output Image #{}", img.id); + + vk::ImageViewCreateInfo image_view_create_info{ + .image = img.intermediary_image, + .viewType = vk::ImageViewType::e2D, + .format = vk::Format::eR16G16B16A16Sfloat, + .subresourceRange{ + .aspectMask = vk::ImageAspectFlagBits::eColor, + .levelCount = 1, + .layerCount = 1, + }, + }; + img.intermediary_image_view = Check<"create fsr intermediary image view">( + device.createImageViewUnique(image_view_create_info)); + SetObjectName(device, img.intermediary_image_view.get(), "FSR Intermediary ImageView #{}", + img.id); + + image_view_create_info.image = img.output_image; + img.output_image_view = + Check<"create fsr output image view">(device.createImageViewUnique(image_view_create_info)); + SetObjectName(device, img.output_image_view.get(), "FSR Output ImageView #{}", img.id); +} + +} // namespace Vulkan::HostPasses \ No newline at end of file diff --git a/src/video_core/renderer_vulkan/host_passes/fsr_pass.h b/src/video_core/renderer_vulkan/host_passes/fsr_pass.h new file mode 100644 index 000000000..3d48d85be --- /dev/null +++ b/src/video_core/renderer_vulkan/host_passes/fsr_pass.h @@ -0,0 +1,56 @@ +// SPDX-FileCopyrightText: Copyright 2024 shadPS4 Emulator Project +// SPDX-License-Identifier: GPL-2.0-or-later + +#pragma once + +#include "common/types.h" +#include "video_core/renderer_vulkan/vk_common.h" +#include "video_core/texture_cache/image.h" + +namespace Vulkan::HostPasses { + +class FsrPass { +public: + struct Settings { + bool enable{true}; + bool use_rcas{true}; + float rcas_attenuation{0.25f}; + }; + + void Create(vk::Device device, VmaAllocator allocator, u32 num_images); + + vk::ImageView Render(vk::CommandBuffer cmdbuf, vk::ImageView input, vk::Extent2D input_size, + vk::Extent2D output_size, Settings settings, bool hdr); + +private: + struct Img { + u8 id{}; + bool dirty{true}; + + VideoCore::UniqueImage intermediary_image; + vk::UniqueImageView intermediary_image_view; + + VideoCore::UniqueImage output_image; + vk::UniqueImageView output_image_view; + }; + + void ResizeAndInvalidate(u32 width, u32 height); + void CreateImages(Img& img) const; + + vk::Device device{}; + u32 num_images{}; + + vk::UniqueDescriptorSetLayout descriptor_set_layout{}; + vk::UniqueDescriptorSet easu_descriptor_set{}; + vk::UniqueDescriptorSet rcas_descriptor_set{}; + vk::UniqueSampler sampler{}; + vk::UniquePipelineLayout pipeline_layout{}; + vk::UniquePipeline easu_pipeline{}; + vk::UniquePipeline rcas_pipeline{}; + + vk::Extent2D cur_size{}; + u32 cur_image{}; + std::vector available_imgs; +}; + +} // namespace Vulkan::HostPasses diff --git a/src/video_core/renderer_vulkan/host_passes/pp_pass.cpp b/src/video_core/renderer_vulkan/host_passes/pp_pass.cpp new file mode 100644 index 000000000..c854e124f --- /dev/null +++ b/src/video_core/renderer_vulkan/host_passes/pp_pass.cpp @@ -0,0 +1,255 @@ +// SPDX-FileCopyrightText: Copyright 2024 shadPS4 Emulator Project +// SPDX-License-Identifier: GPL-2.0-or-later + +#include "pp_pass.h" + +#include "common/assert.h" +#include "video_core/host_shaders/fs_tri_vert.h" +#include "video_core/host_shaders/post_process_frag.h" +#include "video_core/renderer_vulkan/vk_platform.h" +#include "video_core/renderer_vulkan/vk_presenter.h" +#include "video_core/renderer_vulkan/vk_shader_util.h" + +#include + +namespace Vulkan::HostPasses { + +void PostProcessingPass::Create(vk::Device device) { + static const std::array pp_shaders{ + HostShaders::FS_TRI_VERT, + HostShaders::POST_PROCESS_FRAG, + }; + + boost::container::static_vector bindings{ + { + .binding = 0, + .descriptorType = vk::DescriptorType::eCombinedImageSampler, + .descriptorCount = 1, + .stageFlags = vk::ShaderStageFlagBits::eFragment, + }, + }; + + const vk::DescriptorSetLayoutCreateInfo desc_layout_ci{ + .flags = vk::DescriptorSetLayoutCreateFlagBits::ePushDescriptorKHR, + .bindingCount = static_cast(bindings.size()), + .pBindings = bindings.data(), + }; + + desc_set_layout = Check<"create pp descriptor set layout">( + device.createDescriptorSetLayoutUnique(desc_layout_ci)); + + const vk::PushConstantRange push_constants{ + .stageFlags = vk::ShaderStageFlagBits::eFragment, + .offset = 0, + .size = sizeof(Settings), + }; + + const auto& vs_module = Compile(pp_shaders[0], vk::ShaderStageFlagBits::eVertex, device); + ASSERT(vs_module); + SetObjectName(device, vs_module, "fs_tri.vert"); + + const auto& fs_module = Compile(pp_shaders[1], vk::ShaderStageFlagBits::eFragment, device); + ASSERT(fs_module); + SetObjectName(device, fs_module, "post_process.frag"); + + const std::array shaders_ci{ + vk::PipelineShaderStageCreateInfo{ + .stage = vk::ShaderStageFlagBits::eVertex, + .module = vs_module, + .pName = "main", + }, + vk::PipelineShaderStageCreateInfo{ + .stage = vk::ShaderStageFlagBits::eFragment, + .module = fs_module, + .pName = "main", + }, + }; + + const vk::PipelineLayoutCreateInfo layout_info{ + .setLayoutCount = 1U, + .pSetLayouts = &*desc_set_layout, + .pushConstantRangeCount = 1, + .pPushConstantRanges = &push_constants, + }; + + pipeline_layout = + Check<"create pp pipeline layout">(device.createPipelineLayoutUnique(layout_info)); + + const std::array pp_color_formats{ + vk::Format::eB8G8R8A8Unorm, // swapchain.GetSurfaceFormat().format, + }; + const vk::PipelineRenderingCreateInfoKHR pipeline_rendering_ci{ + .colorAttachmentCount = pp_color_formats.size(), + .pColorAttachmentFormats = pp_color_formats.data(), + }; + + const vk::PipelineVertexInputStateCreateInfo vertex_input_info{ + .vertexBindingDescriptionCount = 0u, + .vertexAttributeDescriptionCount = 0u, + }; + + const vk::PipelineInputAssemblyStateCreateInfo input_assembly{ + .topology = vk::PrimitiveTopology::eTriangleList, + }; + + const vk::Viewport viewport{ + .x = 0.0f, + .y = 0.0f, + .width = 1.0f, + .height = 1.0f, + .minDepth = 0.0f, + .maxDepth = 1.0f, + }; + + const vk::Rect2D scissor = { + .offset = {0, 0}, + .extent = {1, 1}, + }; + + const vk::PipelineViewportStateCreateInfo viewport_info{ + .viewportCount = 1, + .pViewports = &viewport, + .scissorCount = 1, + .pScissors = &scissor, + }; + + const vk::PipelineRasterizationStateCreateInfo raster_state{ + .depthClampEnable = false, + .rasterizerDiscardEnable = false, + .polygonMode = vk::PolygonMode::eFill, + .cullMode = vk::CullModeFlagBits::eBack, + .frontFace = vk::FrontFace::eClockwise, + .depthBiasEnable = false, + .lineWidth = 1.0f, + }; + + const vk::PipelineMultisampleStateCreateInfo multisampling{ + .rasterizationSamples = vk::SampleCountFlagBits::e1, + }; + + const std::array attachments{ + vk::PipelineColorBlendAttachmentState{ + .blendEnable = false, + .colorWriteMask = vk::ColorComponentFlagBits::eR | vk::ColorComponentFlagBits::eG | + vk::ColorComponentFlagBits::eB | vk::ColorComponentFlagBits::eA, + }, + }; + + const vk::PipelineColorBlendStateCreateInfo color_blending{ + .logicOpEnable = false, + .logicOp = vk::LogicOp::eCopy, + .attachmentCount = attachments.size(), + .pAttachments = attachments.data(), + .blendConstants = std::array{1.0f, 1.0f, 1.0f, 1.0f}, + }; + + const std::array dynamic_states{ + vk::DynamicState::eViewport, + vk::DynamicState::eScissor, + }; + + const vk::PipelineDynamicStateCreateInfo dynamic_info{ + .dynamicStateCount = dynamic_states.size(), + .pDynamicStates = dynamic_states.data(), + }; + + const vk::GraphicsPipelineCreateInfo pipeline_info{ + .pNext = &pipeline_rendering_ci, + .stageCount = shaders_ci.size(), + .pStages = shaders_ci.data(), + .pVertexInputState = &vertex_input_info, + .pInputAssemblyState = &input_assembly, + .pViewportState = &viewport_info, + .pRasterizationState = &raster_state, + .pMultisampleState = &multisampling, + .pColorBlendState = &color_blending, + .pDynamicState = &dynamic_info, + .layout = *pipeline_layout, + }; + + pipeline = Check<"create post process pipeline">(device.createGraphicsPipelineUnique( + /*pipeline_cache*/ {}, pipeline_info)); + + // Once pipeline is compiled, we don't need the shader module anymore + device.destroyShaderModule(vs_module); + device.destroyShaderModule(fs_module); + + // Create sampler resource + const vk::SamplerCreateInfo sampler_ci{ + .magFilter = vk::Filter::eLinear, + .minFilter = vk::Filter::eLinear, + .mipmapMode = vk::SamplerMipmapMode::eNearest, + .addressModeU = vk::SamplerAddressMode::eClampToEdge, + .addressModeV = vk::SamplerAddressMode::eClampToEdge, + }; + sampler = Check<"create pp sampler">(device.createSamplerUnique(sampler_ci)); +} + +void PostProcessingPass::Render(vk::CommandBuffer cmdbuf, vk::ImageView input, + vk::Extent2D input_size, Frame& frame, Settings settings) { + const std::array attachments{{ + { + .imageView = frame.image_view, + .imageLayout = vk::ImageLayout::eColorAttachmentOptimal, + .loadOp = vk::AttachmentLoadOp::eClear, + .storeOp = vk::AttachmentStoreOp::eStore, + }, + }}; + const vk::RenderingInfo rendering_info{ + .renderArea{ + .extent{ + .width = frame.width, + .height = frame.height, + }, + }, + .layerCount = 1, + .colorAttachmentCount = attachments.size(), + .pColorAttachments = attachments.data(), + }; + + vk::DescriptorImageInfo image_info{ + .sampler = *sampler, + .imageView = input, + .imageLayout = vk::ImageLayout::eShaderReadOnlyOptimal, + }; + + const std::array set_writes{ + vk::WriteDescriptorSet{ + .dstSet = VK_NULL_HANDLE, + .dstBinding = 0, + .dstArrayElement = 0, + .descriptorCount = 1, + .descriptorType = vk::DescriptorType::eCombinedImageSampler, + .pImageInfo = &image_info, + }, + }; + + cmdbuf.bindPipeline(vk::PipelineBindPoint::eGraphics, *pipeline); + + const std::array viewports = { + vk::Viewport{ + .width = static_cast(frame.width), + .height = static_cast(frame.height), + .minDepth = 0.0f, + .maxDepth = 1.0f, + }, + }; + + cmdbuf.setViewport(0, viewports); + cmdbuf.setScissor(0, vk::Rect2D{ + .extent{ + .width = frame.width, + .height = frame.height, + }, + }); + + cmdbuf.pushDescriptorSetKHR(vk::PipelineBindPoint::eGraphics, *pipeline_layout, 0, set_writes); + cmdbuf.pushConstants(*pipeline_layout, vk::ShaderStageFlagBits::eFragment, 0, sizeof(Settings), + &settings); + + cmdbuf.beginRendering(rendering_info); + cmdbuf.draw(3, 1, 0, 0); + cmdbuf.endRendering(); +} + +} // namespace Vulkan::HostPasses \ No newline at end of file diff --git a/src/video_core/renderer_vulkan/host_passes/pp_pass.h b/src/video_core/renderer_vulkan/host_passes/pp_pass.h new file mode 100644 index 000000000..6127bb5c1 --- /dev/null +++ b/src/video_core/renderer_vulkan/host_passes/pp_pass.h @@ -0,0 +1,34 @@ +// SPDX-FileCopyrightText: Copyright 2024 shadPS4 Emulator Project +// SPDX-License-Identifier: GPL-2.0-or-later + +#pragma once + +#include "common/types.h" +#include "video_core/renderer_vulkan/vk_common.h" + +namespace Vulkan { +class Frame; +} + +namespace Vulkan::HostPasses { + +class PostProcessingPass { +public: + struct Settings { + float gamma = 1.0f; + u32 hdr = 0; + }; + + void Create(vk::Device device); + + void Render(vk::CommandBuffer cmdbuf, vk::ImageView input, vk::Extent2D input_size, + Frame& output, Settings settings); + +private: + vk::UniquePipeline pipeline{}; + vk::UniquePipelineLayout pipeline_layout{}; + vk::UniqueDescriptorSetLayout desc_set_layout{}; + vk::UniqueSampler sampler{}; +}; + +} // namespace Vulkan::HostPasses diff --git a/src/video_core/renderer_vulkan/liverpool_to_vk.cpp b/src/video_core/renderer_vulkan/liverpool_to_vk.cpp index 690d26cfc..843bedb20 100644 --- a/src/video_core/renderer_vulkan/liverpool_to_vk.cpp +++ b/src/video_core/renderer_vulkan/liverpool_to_vk.cpp @@ -121,7 +121,7 @@ vk::PrimitiveTopology PrimitiveType(AmdGpu::PrimitiveType type) { case AmdGpu::PrimitiveType::RectList: return vk::PrimitiveTopology::ePatchList; default: - UNREACHABLE(); + UNREACHABLE_MSG("Unimplemented primitive type: {}", static_cast(type)); return vk::PrimitiveTopology::eTriangleList; } } @@ -352,12 +352,9 @@ vk::ComponentMapping ComponentMapping(AmdGpu::CompMapping comp_mapping) { }; } -static constexpr vk::FormatFeatureFlags2 BufferRead = - vk::FormatFeatureFlagBits2::eUniformTexelBuffer | vk::FormatFeatureFlagBits2::eVertexBuffer; -static constexpr vk::FormatFeatureFlags2 BufferWrite = - vk::FormatFeatureFlagBits2::eStorageTexelBuffer | - vk::FormatFeatureFlagBits2::eStorageReadWithoutFormat | - vk::FormatFeatureFlagBits2::eStorageWriteWithoutFormat; +// Texel buffer feature flags are not needed as format is interpreted in-shader. +static constexpr vk::FormatFeatureFlags2 BufferRead = vk::FormatFeatureFlagBits2::eVertexBuffer; +static constexpr vk::FormatFeatureFlags2 BufferWrite = static_cast(0); static constexpr vk::FormatFeatureFlags2 ImageRead = vk::FormatFeatureFlagBits2::eTransferSrc | vk::FormatFeatureFlagBits2::eTransferDst | vk::FormatFeatureFlagBits2::eSampledImage; @@ -447,7 +444,7 @@ static constexpr vk::FormatFeatureFlags2 GetNumberFormatFeatureFlags( case AmdGpu::NumberFormat::Srgb: return ImageRead | Mrt; case AmdGpu::NumberFormat::Ubnorm: - case AmdGpu::NumberFormat::UbnromNz: + case AmdGpu::NumberFormat::UbnormNz: case AmdGpu::NumberFormat::Ubint: case AmdGpu::NumberFormat::Ubscaled: return ImageRead; @@ -468,6 +465,7 @@ static constexpr SurfaceFormatInfo CreateSurfaceFormatInfo(const AmdGpu::DataFor } std::span SurfaceFormats() { + // Uscaled, Sscaled, and Ubnorm formats are automatically remapped and handled in shader. static constexpr std::array formats{ // Invalid CreateSurfaceFormatInfo(AmdGpu::DataFormat::FormatInvalid, AmdGpu::NumberFormat::Unorm, @@ -490,7 +488,7 @@ std::span SurfaceFormats() { vk::Format::eUndefined), CreateSurfaceFormatInfo(AmdGpu::DataFormat::FormatInvalid, AmdGpu::NumberFormat::Ubnorm, vk::Format::eUndefined), - CreateSurfaceFormatInfo(AmdGpu::DataFormat::FormatInvalid, AmdGpu::NumberFormat::UbnromNz, + CreateSurfaceFormatInfo(AmdGpu::DataFormat::FormatInvalid, AmdGpu::NumberFormat::UbnormNz, vk::Format::eUndefined), CreateSurfaceFormatInfo(AmdGpu::DataFormat::FormatInvalid, AmdGpu::NumberFormat::Ubint, vk::Format::eUndefined), @@ -501,10 +499,6 @@ std::span SurfaceFormats() { vk::Format::eR8Unorm), CreateSurfaceFormatInfo(AmdGpu::DataFormat::Format8, AmdGpu::NumberFormat::Snorm, vk::Format::eR8Snorm), - CreateSurfaceFormatInfo(AmdGpu::DataFormat::Format8, AmdGpu::NumberFormat::Uscaled, - vk::Format::eR8Uscaled), - CreateSurfaceFormatInfo(AmdGpu::DataFormat::Format8, AmdGpu::NumberFormat::Sscaled, - vk::Format::eR8Sscaled), CreateSurfaceFormatInfo(AmdGpu::DataFormat::Format8, AmdGpu::NumberFormat::Uint, vk::Format::eR8Uint), CreateSurfaceFormatInfo(AmdGpu::DataFormat::Format8, AmdGpu::NumberFormat::Sint, @@ -516,10 +510,6 @@ std::span SurfaceFormats() { vk::Format::eR16Unorm), CreateSurfaceFormatInfo(AmdGpu::DataFormat::Format16, AmdGpu::NumberFormat::Snorm, vk::Format::eR16Snorm), - CreateSurfaceFormatInfo(AmdGpu::DataFormat::Format16, AmdGpu::NumberFormat::Uscaled, - vk::Format::eR16Uscaled), - CreateSurfaceFormatInfo(AmdGpu::DataFormat::Format16, AmdGpu::NumberFormat::Sscaled, - vk::Format::eR16Sscaled), CreateSurfaceFormatInfo(AmdGpu::DataFormat::Format16, AmdGpu::NumberFormat::Uint, vk::Format::eR16Uint), CreateSurfaceFormatInfo(AmdGpu::DataFormat::Format16, AmdGpu::NumberFormat::Sint, @@ -531,10 +521,6 @@ std::span SurfaceFormats() { vk::Format::eR8G8Unorm), CreateSurfaceFormatInfo(AmdGpu::DataFormat::Format8_8, AmdGpu::NumberFormat::Snorm, vk::Format::eR8G8Snorm), - CreateSurfaceFormatInfo(AmdGpu::DataFormat::Format8_8, AmdGpu::NumberFormat::Uscaled, - vk::Format::eR8G8Uscaled), - CreateSurfaceFormatInfo(AmdGpu::DataFormat::Format8_8, AmdGpu::NumberFormat::Sscaled, - vk::Format::eR8G8Sscaled), CreateSurfaceFormatInfo(AmdGpu::DataFormat::Format8_8, AmdGpu::NumberFormat::Uint, vk::Format::eR8G8Uint), CreateSurfaceFormatInfo(AmdGpu::DataFormat::Format8_8, AmdGpu::NumberFormat::Sint, @@ -553,10 +539,6 @@ std::span SurfaceFormats() { vk::Format::eR16G16Unorm), CreateSurfaceFormatInfo(AmdGpu::DataFormat::Format16_16, AmdGpu::NumberFormat::Snorm, vk::Format::eR16G16Snorm), - CreateSurfaceFormatInfo(AmdGpu::DataFormat::Format16_16, AmdGpu::NumberFormat::Uscaled, - vk::Format::eR16G16Uscaled), - CreateSurfaceFormatInfo(AmdGpu::DataFormat::Format16_16, AmdGpu::NumberFormat::Sscaled, - vk::Format::eR16G16Sscaled), CreateSurfaceFormatInfo(AmdGpu::DataFormat::Format16_16, AmdGpu::NumberFormat::Uint, vk::Format::eR16G16Uint), CreateSurfaceFormatInfo(AmdGpu::DataFormat::Format16_16, AmdGpu::NumberFormat::Sint, @@ -573,10 +555,6 @@ std::span SurfaceFormats() { vk::Format::eA2B10G10R10UnormPack32), CreateSurfaceFormatInfo(AmdGpu::DataFormat::Format2_10_10_10, AmdGpu::NumberFormat::Snorm, vk::Format::eA2B10G10R10SnormPack32), - CreateSurfaceFormatInfo(AmdGpu::DataFormat::Format2_10_10_10, AmdGpu::NumberFormat::Uscaled, - vk::Format::eA2B10G10R10UscaledPack32), - CreateSurfaceFormatInfo(AmdGpu::DataFormat::Format2_10_10_10, AmdGpu::NumberFormat::Sscaled, - vk::Format::eA2B10G10R10SscaledPack32), CreateSurfaceFormatInfo(AmdGpu::DataFormat::Format2_10_10_10, AmdGpu::NumberFormat::Uint, vk::Format::eA2B10G10R10UintPack32), CreateSurfaceFormatInfo(AmdGpu::DataFormat::Format2_10_10_10, AmdGpu::NumberFormat::Sint, @@ -586,10 +564,6 @@ std::span SurfaceFormats() { vk::Format::eR8G8B8A8Unorm), CreateSurfaceFormatInfo(AmdGpu::DataFormat::Format8_8_8_8, AmdGpu::NumberFormat::Snorm, vk::Format::eR8G8B8A8Snorm), - CreateSurfaceFormatInfo(AmdGpu::DataFormat::Format8_8_8_8, AmdGpu::NumberFormat::Uscaled, - vk::Format::eR8G8B8A8Uscaled), - CreateSurfaceFormatInfo(AmdGpu::DataFormat::Format8_8_8_8, AmdGpu::NumberFormat::Sscaled, - vk::Format::eR8G8B8A8Sscaled), CreateSurfaceFormatInfo(AmdGpu::DataFormat::Format8_8_8_8, AmdGpu::NumberFormat::Uint, vk::Format::eR8G8B8A8Uint), CreateSurfaceFormatInfo(AmdGpu::DataFormat::Format8_8_8_8, AmdGpu::NumberFormat::Sint, @@ -608,10 +582,6 @@ std::span SurfaceFormats() { vk::Format::eR16G16B16A16Unorm), CreateSurfaceFormatInfo(AmdGpu::DataFormat::Format16_16_16_16, AmdGpu::NumberFormat::Snorm, vk::Format::eR16G16B16A16Snorm), - CreateSurfaceFormatInfo(AmdGpu::DataFormat::Format16_16_16_16, - AmdGpu::NumberFormat::Uscaled, vk::Format::eR16G16B16A16Uscaled), - CreateSurfaceFormatInfo(AmdGpu::DataFormat::Format16_16_16_16, - AmdGpu::NumberFormat::Sscaled, vk::Format::eR16G16B16A16Sscaled), CreateSurfaceFormatInfo(AmdGpu::DataFormat::Format16_16_16_16, AmdGpu::NumberFormat::Uint, vk::Format::eR16G16B16A16Uint), CreateSurfaceFormatInfo(AmdGpu::DataFormat::Format16_16_16_16, AmdGpu::NumberFormat::Sint, @@ -639,11 +609,13 @@ std::span SurfaceFormats() { vk::Format::eB5G6R5UnormPack16), // 1_5_5_5 CreateSurfaceFormatInfo(AmdGpu::DataFormat::Format1_5_5_5, AmdGpu::NumberFormat::Unorm, + vk::Format::eA1R5G5B5UnormPack16), + // 5_5_5_1 + CreateSurfaceFormatInfo(AmdGpu::DataFormat::Format5_5_5_1, AmdGpu::NumberFormat::Unorm, vk::Format::eR5G5B5A1UnormPack16), - // 5_5_5_1 - Remapped to 1_5_5_5. // 4_4_4_4 CreateSurfaceFormatInfo(AmdGpu::DataFormat::Format4_4_4_4, AmdGpu::NumberFormat::Unorm, - vk::Format::eR4G4B4A4UnormPack16), + vk::Format::eB4G4R4A4UnormPack16), // 8_24 // 24_8 // X24_8_32 diff --git a/src/video_core/renderer_vulkan/liverpool_to_vk.h b/src/video_core/renderer_vulkan/liverpool_to_vk.h index a68280e7d..42da7aa06 100644 --- a/src/video_core/renderer_vulkan/liverpool_to_vk.h +++ b/src/video_core/renderer_vulkan/liverpool_to_vk.h @@ -71,13 +71,40 @@ vk::ClearValue ColorBufferClearValue(const AmdGpu::Liverpool::ColorBuffer& color vk::SampleCountFlagBits NumSamples(u32 num_samples, vk::SampleCountFlags supported_flags); +static inline bool IsFormatDepthCompatible(vk::Format fmt) { + switch (fmt) { + // 32-bit float compatible + case vk::Format::eD32Sfloat: + case vk::Format::eR32Sfloat: + case vk::Format::eR32Uint: + // 16-bit unorm compatible + case vk::Format::eD16Unorm: + case vk::Format::eR16Unorm: + return true; + default: + return false; + } +} + +static inline bool IsFormatStencilCompatible(vk::Format fmt) { + switch (fmt) { + // 8-bit uint compatible + case vk::Format::eS8Uint: + case vk::Format::eR8Uint: + case vk::Format::eR8Unorm: + return true; + default: + return false; + } +} + static inline vk::Format PromoteFormatToDepth(vk::Format fmt) { - if (fmt == vk::Format::eR32Sfloat) { + if (fmt == vk::Format::eR32Sfloat || fmt == vk::Format::eR32Uint) { return vk::Format::eD32Sfloat; } else if (fmt == vk::Format::eR16Unorm) { return vk::Format::eD16Unorm; } - UNREACHABLE(); + UNREACHABLE_MSG("Unexpected depth format {}", vk::to_string(fmt)); } } // namespace Vulkan::LiverpoolToVK diff --git a/src/video_core/renderer_vulkan/vk_compute_pipeline.cpp b/src/video_core/renderer_vulkan/vk_compute_pipeline.cpp index 71659c06c..f6216f54f 100644 --- a/src/video_core/renderer_vulkan/vk_compute_pipeline.cpp +++ b/src/video_core/renderer_vulkan/vk_compute_pipeline.cpp @@ -3,21 +3,21 @@ #include -#include "video_core/buffer_cache/buffer_cache.h" #include "video_core/renderer_vulkan/vk_compute_pipeline.h" #include "video_core/renderer_vulkan/vk_instance.h" #include "video_core/renderer_vulkan/vk_scheduler.h" -#include "video_core/texture_cache/texture_cache.h" namespace Vulkan { -ComputePipeline::ComputePipeline(const Instance& instance_, Scheduler& scheduler_, - DescriptorHeap& desc_heap_, vk::PipelineCache pipeline_cache, - ComputePipelineKey compute_key_, const Shader::Info& info_, - vk::ShaderModule module) - : Pipeline{instance_, scheduler_, desc_heap_, pipeline_cache, true}, compute_key{compute_key_} { +ComputePipeline::ComputePipeline(const Instance& instance, Scheduler& scheduler, + DescriptorHeap& desc_heap, const Shader::Profile& profile, + vk::PipelineCache pipeline_cache, ComputePipelineKey compute_key_, + const Shader::Info& info_, vk::ShaderModule module) + : Pipeline{instance, scheduler, desc_heap, profile, pipeline_cache, true}, + compute_key{compute_key_} { auto& info = stages[int(Shader::LogicalStage::Compute)]; info = &info_; + const auto debug_str = GetDebugString(); const vk::PipelineShaderStageCreateInfo shader_ci = { .stage = vk::ShaderStageFlagBits::eCompute, @@ -27,30 +27,12 @@ ComputePipeline::ComputePipeline(const Instance& instance_, Scheduler& scheduler u32 binding{}; boost::container::small_vector bindings; - - if (info->has_readconst) { - bindings.push_back({ - .binding = binding++, - .descriptorType = vk::DescriptorType::eUniformBuffer, - .descriptorCount = 1, - .stageFlags = vk::ShaderStageFlagBits::eCompute, - }); - } for (const auto& buffer : info->buffers) { const auto sharp = buffer.GetSharp(*info); bindings.push_back({ .binding = binding++, - .descriptorType = buffer.IsStorage(sharp) ? vk::DescriptorType::eStorageBuffer - : vk::DescriptorType::eUniformBuffer, - .descriptorCount = 1, - .stageFlags = vk::ShaderStageFlagBits::eCompute, - }); - } - for (const auto& tex_buffer : info->texture_buffers) { - bindings.push_back({ - .binding = binding++, - .descriptorType = tex_buffer.is_written ? vk::DescriptorType::eStorageTexelBuffer - : vk::DescriptorType::eUniformTexelBuffer, + .descriptorType = buffer.IsStorage(sharp, profile) ? vk::DescriptorType::eStorageBuffer + : vk::DescriptorType::eUniformBuffer, .descriptorCount = 1, .stageFlags = vk::ShaderStageFlagBits::eCompute, }); @@ -58,9 +40,8 @@ ComputePipeline::ComputePipeline(const Instance& instance_, Scheduler& scheduler for (const auto& image : info->images) { bindings.push_back({ .binding = binding++, - .descriptorType = image.IsStorage(image.GetSharp(*info)) - ? vk::DescriptorType::eStorageImage - : vk::DescriptorType::eSampledImage, + .descriptorType = image.is_written ? vk::DescriptorType::eStorageImage + : vk::DescriptorType::eSampledImage, .descriptorCount = 1, .stageFlags = vk::ShaderStageFlagBits::eCompute, }); @@ -89,8 +70,9 @@ ComputePipeline::ComputePipeline(const Instance& instance_, Scheduler& scheduler .bindingCount = static_cast(bindings.size()), .pBindings = bindings.data(), }; + const auto device = instance.GetDevice(); auto [descriptor_set_result, descriptor_set] = - instance.GetDevice().createDescriptorSetLayoutUnique(desc_layout_ci); + device.createDescriptorSetLayoutUnique(desc_layout_ci); ASSERT_MSG(descriptor_set_result == vk::Result::eSuccess, "Failed to create compute descriptor set layout: {}", vk::to_string(descriptor_set_result)); @@ -107,6 +89,7 @@ ComputePipeline::ComputePipeline(const Instance& instance_, Scheduler& scheduler ASSERT_MSG(layout_result == vk::Result::eSuccess, "Failed to create compute pipeline layout: {}", vk::to_string(layout_result)); pipeline_layout = std::move(layout); + SetObjectName(device, *pipeline_layout, "Compute PipelineLayout {}", debug_str); const vk::ComputePipelineCreateInfo compute_pipeline_ci = { .stage = shader_ci, @@ -117,6 +100,7 @@ ComputePipeline::ComputePipeline(const Instance& instance_, Scheduler& scheduler ASSERT_MSG(pipeline_result == vk::Result::eSuccess, "Failed to create compute pipeline: {}", vk::to_string(pipeline_result)); pipeline = std::move(pipe); + SetObjectName(device, *pipeline, "Compute Pipeline {}", debug_str); } ComputePipeline::~ComputePipeline() = default; diff --git a/src/video_core/renderer_vulkan/vk_compute_pipeline.h b/src/video_core/renderer_vulkan/vk_compute_pipeline.h index 1c28e461c..79059b509 100644 --- a/src/video_core/renderer_vulkan/vk_compute_pipeline.h +++ b/src/video_core/renderer_vulkan/vk_compute_pipeline.h @@ -31,8 +31,9 @@ struct ComputePipelineKey { class ComputePipeline : public Pipeline { public: ComputePipeline(const Instance& instance, Scheduler& scheduler, DescriptorHeap& desc_heap, - vk::PipelineCache pipeline_cache, ComputePipelineKey compute_key, - const Shader::Info& info, vk::ShaderModule module); + const Shader::Profile& profile, vk::PipelineCache pipeline_cache, + ComputePipelineKey compute_key, const Shader::Info& info, + vk::ShaderModule module); ~ComputePipeline(); private: diff --git a/src/video_core/renderer_vulkan/vk_descriptor_update_queue.cpp b/src/video_core/renderer_vulkan/vk_descriptor_update_queue.cpp deleted file mode 100644 index 7699bea9d..000000000 --- a/src/video_core/renderer_vulkan/vk_descriptor_update_queue.cpp +++ /dev/null @@ -1,108 +0,0 @@ -// SPDX-FileCopyrightText: Copyright 2024 shadPS4 Emulator Project -// SPDX-License-Identifier: GPL-2.0-or-later - -#include "video_core/renderer_vulkan/vk_descriptor_update_queue.h" -#include "video_core/renderer_vulkan/vk_instance.h" - -namespace Vulkan { - -DescriptorUpdateQueue::DescriptorUpdateQueue(const Instance& instance, u32 descriptor_write_max_) - : device{instance.GetDevice()}, descriptor_write_max{descriptor_write_max_} { - descriptor_infos = std::make_unique(descriptor_write_max); - descriptor_writes = std::make_unique(descriptor_write_max); -} - -void DescriptorUpdateQueue::Flush() { - if (descriptor_write_end == 0) { - return; - } - device.updateDescriptorSets({std::span(descriptor_writes.get(), descriptor_write_end)}, {}); - descriptor_write_end = 0; -} - -void DescriptorUpdateQueue::AddStorageImage(vk::DescriptorSet target, u8 binding, - vk::ImageView image_view, - vk::ImageLayout image_layout) { - if (descriptor_write_end >= descriptor_write_max) [[unlikely]] { - Flush(); - } - - auto& image_info = descriptor_infos[descriptor_write_end].image_info; - image_info.sampler = VK_NULL_HANDLE; - image_info.imageView = image_view; - image_info.imageLayout = image_layout; - - descriptor_writes[descriptor_write_end++] = vk::WriteDescriptorSet{ - .dstSet = target, - .dstBinding = binding, - .dstArrayElement = 0, - .descriptorCount = 1, - .descriptorType = vk::DescriptorType::eStorageImage, - .pImageInfo = &image_info, - }; -} - -void DescriptorUpdateQueue::AddImageSampler(vk::DescriptorSet target, u8 binding, u8 array_index, - vk::ImageView image_view, vk::Sampler sampler, - vk::ImageLayout image_layout) { - if (descriptor_write_end >= descriptor_write_max) [[unlikely]] { - Flush(); - } - - auto& image_info = descriptor_infos[descriptor_write_end].image_info; - image_info.sampler = sampler; - image_info.imageView = image_view; - image_info.imageLayout = image_layout; - - descriptor_writes[descriptor_write_end++] = vk::WriteDescriptorSet{ - .dstSet = target, - .dstBinding = binding, - .dstArrayElement = array_index, - .descriptorCount = 1, - .descriptorType = - sampler ? vk::DescriptorType::eCombinedImageSampler : vk::DescriptorType::eSampledImage, - .pImageInfo = &image_info, - }; -} - -void DescriptorUpdateQueue::AddBuffer(vk::DescriptorSet target, u8 binding, vk::Buffer buffer, - vk::DeviceSize offset, vk::DeviceSize size, - vk::DescriptorType type) { - if (descriptor_write_end >= descriptor_write_max) [[unlikely]] { - Flush(); - } - - auto& buffer_info = descriptor_infos[descriptor_write_end].buffer_info; - buffer_info.buffer = buffer; - buffer_info.offset = offset; - buffer_info.range = size; - - descriptor_writes[descriptor_write_end++] = vk::WriteDescriptorSet{ - .dstSet = target, - .dstBinding = binding, - .dstArrayElement = 0, - .descriptorCount = 1, - .descriptorType = type, - .pBufferInfo = &buffer_info, - }; -} - -void DescriptorUpdateQueue::AddTexelBuffer(vk::DescriptorSet target, u8 binding, - vk::BufferView buffer_view) { - if (descriptor_write_end >= descriptor_write_max) [[unlikely]] { - Flush(); - } - - auto& buffer_info = descriptor_infos[descriptor_write_end].buffer_view; - buffer_info = buffer_view; - descriptor_writes[descriptor_write_end++] = vk::WriteDescriptorSet{ - .dstSet = target, - .dstBinding = binding, - .dstArrayElement = 0, - .descriptorCount = 1, - .descriptorType = vk::DescriptorType::eUniformTexelBuffer, - .pTexelBufferView = &buffer_info, - }; -} - -} // namespace Vulkan diff --git a/src/video_core/renderer_vulkan/vk_descriptor_update_queue.h b/src/video_core/renderer_vulkan/vk_descriptor_update_queue.h deleted file mode 100644 index 9e864db6e..000000000 --- a/src/video_core/renderer_vulkan/vk_descriptor_update_queue.h +++ /dev/null @@ -1,51 +0,0 @@ -// SPDX-FileCopyrightText: Copyright 2024 shadPS4 Emulator Project -// SPDX-License-Identifier: GPL-2.0-or-later - -#include - -#include "common/types.h" -#include "video_core/renderer_vulkan/vk_common.h" - -namespace Vulkan { - -class Instance; - -struct DescriptorInfoUnion { - DescriptorInfoUnion() {} - - union { - vk::DescriptorImageInfo image_info; - vk::DescriptorBufferInfo buffer_info; - vk::BufferView buffer_view; - }; -}; - -class DescriptorUpdateQueue { -public: - explicit DescriptorUpdateQueue(const Instance& instance, u32 descriptor_write_max = 2048); - ~DescriptorUpdateQueue() = default; - - void Flush(); - - void AddStorageImage(vk::DescriptorSet target, u8 binding, vk::ImageView image_view, - vk::ImageLayout image_layout = vk::ImageLayout::eGeneral); - - void AddImageSampler(vk::DescriptorSet target, u8 binding, u8 array_index, - vk::ImageView image_view, vk::Sampler sampler, - vk::ImageLayout imageLayout = vk::ImageLayout::eGeneral); - - void AddBuffer(vk::DescriptorSet target, u8 binding, vk::Buffer buffer, vk::DeviceSize offset, - vk::DeviceSize size = VK_WHOLE_SIZE, - vk::DescriptorType type = vk::DescriptorType::eUniformBufferDynamic); - - void AddTexelBuffer(vk::DescriptorSet target, u8 binding, vk::BufferView buffer_view); - -private: - const vk::Device device; - const u32 descriptor_write_max; - std::unique_ptr descriptor_infos; - std::unique_ptr descriptor_writes; - u32 descriptor_write_end = 0; -}; - -} // namespace Vulkan diff --git a/src/video_core/renderer_vulkan/vk_graphics_pipeline.cpp b/src/video_core/renderer_vulkan/vk_graphics_pipeline.cpp index ffa474a1c..901096259 100644 --- a/src/video_core/renderer_vulkan/vk_graphics_pipeline.cpp +++ b/src/video_core/renderer_vulkan/vk_graphics_pipeline.cpp @@ -7,38 +7,43 @@ #include #include "common/assert.h" -#include "common/io_file.h" -#include "common/scope_exit.h" #include "shader_recompiler/backend/spirv/emit_spirv_quad_rect.h" #include "shader_recompiler/frontend/fetch_shader.h" -#include "shader_recompiler/runtime_info.h" #include "video_core/amdgpu/resource.h" -#include "video_core/buffer_cache/buffer_cache.h" #include "video_core/renderer_vulkan/vk_graphics_pipeline.h" #include "video_core/renderer_vulkan/vk_instance.h" #include "video_core/renderer_vulkan/vk_scheduler.h" #include "video_core/renderer_vulkan/vk_shader_util.h" -#include "video_core/texture_cache/texture_cache.h" namespace Vulkan { using Shader::Backend::SPIRV::AuxShaderType; +static constexpr std::array LogicalStageToStageBit = { + vk::ShaderStageFlagBits::eFragment, + vk::ShaderStageFlagBits::eTessellationControl, + vk::ShaderStageFlagBits::eTessellationEvaluation, + vk::ShaderStageFlagBits::eVertex, + vk::ShaderStageFlagBits::eGeometry, + vk::ShaderStageFlagBits::eCompute, +}; + GraphicsPipeline::GraphicsPipeline( - const Instance& instance_, Scheduler& scheduler_, DescriptorHeap& desc_heap_, - const GraphicsPipelineKey& key_, vk::PipelineCache pipeline_cache, - std::span infos, + const Instance& instance, Scheduler& scheduler, DescriptorHeap& desc_heap, + const Shader::Profile& profile, const GraphicsPipelineKey& key_, + vk::PipelineCache pipeline_cache, std::span infos, std::span runtime_infos, std::optional fetch_shader_, std::span modules) - : Pipeline{instance_, scheduler_, desc_heap_, pipeline_cache}, key{key_}, + : Pipeline{instance, scheduler, desc_heap, profile, pipeline_cache}, key{key_}, fetch_shader{std::move(fetch_shader_)} { const vk::Device device = instance.GetDevice(); std::ranges::copy(infos, stages.begin()); BuildDescSetLayout(); + const auto debug_str = GetDebugString(); const vk::PushConstantRange push_constants = { - .stageFlags = gp_stage_flags, + .stageFlags = AllGraphicsStageBits, .offset = 0, .size = sizeof(Shader::PushData), }; @@ -54,36 +59,13 @@ GraphicsPipeline::GraphicsPipeline( ASSERT_MSG(layout_result == vk::Result::eSuccess, "Failed to create graphics pipeline layout: {}", vk::to_string(layout_result)); pipeline_layout = std::move(layout); + SetObjectName(device, *pipeline_layout, "Graphics PipelineLayout {}", debug_str); - boost::container::static_vector vertex_bindings; - boost::container::static_vector vertex_attributes; - if (fetch_shader && !instance.IsVertexInputDynamicState()) { - const auto& vs_info = GetStage(Shader::LogicalStage::Vertex); - for (const auto& attrib : fetch_shader->attributes) { - if (attrib.UsesStepRates()) { - // Skip attribute binding as the data will be pulled by shader - continue; - } - - const auto buffer = attrib.GetSharp(vs_info); - if (buffer.GetSize() == 0) { - continue; - } - vertex_attributes.push_back({ - .location = attrib.semantic, - .binding = attrib.semantic, - .format = LiverpoolToVK::SurfaceFormat(buffer.GetDataFmt(), buffer.GetNumberFmt()), - .offset = 0, - }); - vertex_bindings.push_back({ - .binding = attrib.semantic, - .stride = buffer.GetStride(), - .inputRate = - attrib.GetStepRate() == Shader::Gcn::VertexAttribute::InstanceIdType::None - ? vk::VertexInputRate::eVertex - : vk::VertexInputRate::eInstance, - }); - } + VertexInputs vertex_attributes; + VertexInputs vertex_bindings; + VertexInputs guest_buffers; + if (!instance.IsVertexInputDynamicState()) { + GetVertexInputs(vertex_attributes, vertex_bindings, guest_buffers); } const vk::PipelineVertexInputStateCreateInfo vertex_input_info = { @@ -153,13 +135,12 @@ GraphicsPipeline::GraphicsPipeline( vk::DynamicState::eStencilOpEXT, }; - if (instance.IsColorWriteEnableSupported()) { - dynamic_states.push_back(vk::DynamicState::eColorWriteEnableEXT); + if (instance.IsDynamicColorWriteMaskSupported()) { dynamic_states.push_back(vk::DynamicState::eColorWriteMaskEXT); } if (instance.IsVertexInputDynamicState()) { dynamic_states.push_back(vk::DynamicState::eVertexInputEXT); - } else { + } else if (!vertex_bindings.empty()) { dynamic_states.push_back(vk::DynamicState::eVertexInputBindingStrideEXT); } @@ -263,7 +244,7 @@ GraphicsPipeline::GraphicsPipeline( ? LiverpoolToVK::BlendOp(control.alpha_func) : color_blend, .colorWriteMask = - instance.IsColorWriteEnableSupported() + instance.IsDynamicColorWriteMaskSupported() ? vk::ColorComponentFlagBits::eR | vk::ColorComponentFlagBits::eG | vk::ColorComponentFlagBits::eB | vk::ColorComponentFlagBits::eA : key.write_masks[i], @@ -322,10 +303,56 @@ GraphicsPipeline::GraphicsPipeline( ASSERT_MSG(pipeline_result == vk::Result::eSuccess, "Failed to create graphics pipeline: {}", vk::to_string(pipeline_result)); pipeline = std::move(pipe); + SetObjectName(device, *pipeline, "Graphics Pipeline {}", debug_str); } GraphicsPipeline::~GraphicsPipeline() = default; +template +void GraphicsPipeline::GetVertexInputs(VertexInputs& attributes, + VertexInputs& bindings, + VertexInputs& guest_buffers) const { + if (!fetch_shader || fetch_shader->attributes.empty()) { + return; + } + const auto& vs_info = GetStage(Shader::LogicalStage::Vertex); + for (const auto& attrib : fetch_shader->attributes) { + if (attrib.UsesStepRates()) { + // Skip attribute binding as the data will be pulled by shader. + continue; + } + + const auto& buffer = attrib.GetSharp(vs_info); + attributes.push_back(Attribute{ + .location = attrib.semantic, + .binding = attrib.semantic, + .format = LiverpoolToVK::SurfaceFormat(buffer.GetDataFmt(), buffer.GetNumberFmt()), + .offset = 0, + }); + bindings.push_back(Binding{ + .binding = attrib.semantic, + .stride = buffer.GetStride(), + .inputRate = attrib.GetStepRate() == Shader::Gcn::VertexAttribute::InstanceIdType::None + ? vk::VertexInputRate::eVertex + : vk::VertexInputRate::eInstance, + }); + if constexpr (std::is_same_v) { + bindings.back().divisor = 1; + } + guest_buffers.emplace_back(buffer); + } +} + +// Declare templated GetVertexInputs for necessary types. +template void GraphicsPipeline::GetVertexInputs( + VertexInputs& attributes, + VertexInputs& bindings, + VertexInputs& guest_buffers) const; +template void GraphicsPipeline::GetVertexInputs( + VertexInputs& attributes, + VertexInputs& bindings, + VertexInputs& guest_buffers) const; + void GraphicsPipeline::BuildDescSetLayout() { boost::container::small_vector bindings; u32 binding{}; @@ -334,41 +361,25 @@ void GraphicsPipeline::BuildDescSetLayout() { if (!stage) { continue; } - if (stage->has_readconst) { - bindings.push_back({ - .binding = binding++, - .descriptorType = vk::DescriptorType::eUniformBuffer, - .descriptorCount = 1, - .stageFlags = gp_stage_flags, - }); - } + const auto stage_bit = LogicalStageToStageBit[u32(stage->l_stage)]; for (const auto& buffer : stage->buffers) { const auto sharp = buffer.GetSharp(*stage); bindings.push_back({ .binding = binding++, - .descriptorType = buffer.IsStorage(sharp) ? vk::DescriptorType::eStorageBuffer - : vk::DescriptorType::eUniformBuffer, + .descriptorType = buffer.IsStorage(sharp, profile) + ? vk::DescriptorType::eStorageBuffer + : vk::DescriptorType::eUniformBuffer, .descriptorCount = 1, - .stageFlags = gp_stage_flags, - }); - } - for (const auto& tex_buffer : stage->texture_buffers) { - bindings.push_back({ - .binding = binding++, - .descriptorType = tex_buffer.is_written ? vk::DescriptorType::eStorageTexelBuffer - : vk::DescriptorType::eUniformTexelBuffer, - .descriptorCount = 1, - .stageFlags = gp_stage_flags, + .stageFlags = stage_bit, }); } for (const auto& image : stage->images) { bindings.push_back({ .binding = binding++, - .descriptorType = image.IsStorage(image.GetSharp(*stage)) - ? vk::DescriptorType::eStorageImage - : vk::DescriptorType::eSampledImage, + .descriptorType = image.is_written ? vk::DescriptorType::eStorageImage + : vk::DescriptorType::eSampledImage, .descriptorCount = 1, - .stageFlags = gp_stage_flags, + .stageFlags = stage_bit, }); } for (const auto& sampler : stage->samplers) { @@ -376,7 +387,7 @@ void GraphicsPipeline::BuildDescSetLayout() { .binding = binding++, .descriptorType = vk::DescriptorType::eSampler, .descriptorCount = 1, - .stageFlags = gp_stage_flags, + .stageFlags = stage_bit, }); } } diff --git a/src/video_core/renderer_vulkan/vk_graphics_pipeline.h b/src/video_core/renderer_vulkan/vk_graphics_pipeline.h index c8f4999b1..e6596db2f 100644 --- a/src/video_core/renderer_vulkan/vk_graphics_pipeline.h +++ b/src/video_core/renderer_vulkan/vk_graphics_pipeline.h @@ -3,6 +3,7 @@ #pragma once +#include #include #include "common/types.h" @@ -27,23 +28,26 @@ class DescriptorHeap; using Liverpool = AmdGpu::Liverpool; +template +using VertexInputs = boost::container::static_vector; + struct GraphicsPipelineKey { std::array stage_hashes; u32 num_color_attachments; std::array color_formats; - std::array color_num_formats; - std::array color_swizzles; + std::array color_buffers; vk::Format depth_format; vk::Format stencil_format; struct { + bool clip_disable : 1; bool depth_test_enable : 1; bool depth_write_enable : 1; bool depth_bounds_test_enable : 1; bool depth_bias_enable : 1; bool stencil_test_enable : 1; // Must be named to be zero-initialized. - u8 _unused : 3; + u8 _unused : 2; }; vk::CompareOp depth_compare_op; @@ -70,7 +74,8 @@ struct GraphicsPipelineKey { class GraphicsPipeline : public Pipeline { public: GraphicsPipeline(const Instance& instance, Scheduler& scheduler, DescriptorHeap& desc_heap, - const GraphicsPipelineKey& key, vk::PipelineCache pipeline_cache, + const Shader::Profile& profile, const GraphicsPipelineKey& key, + vk::PipelineCache pipeline_cache, std::span stages, std::span runtime_infos, std::optional fetch_shader, @@ -89,6 +94,10 @@ public: return key.mrt_mask; } + auto IsClipDisabled() const { + return key.clip_disable; + } + [[nodiscard]] bool IsPrimitiveListTopology() const { return key.prim_type == AmdGpu::PrimitiveType::PointList || key.prim_type == AmdGpu::PrimitiveType::LineList || @@ -99,6 +108,11 @@ public: key.prim_type == AmdGpu::PrimitiveType::QuadList; } + /// Gets the attributes and bindings for vertex inputs. + template + void GetVertexInputs(VertexInputs& attributes, VertexInputs& bindings, + VertexInputs& guest_buffers) const; + private: void BuildDescSetLayout(); diff --git a/src/video_core/renderer_vulkan/vk_instance.cpp b/src/video_core/renderer_vulkan/vk_instance.cpp index 790e76400..ab8f074cd 100644 --- a/src/video_core/renderer_vulkan/vk_instance.cpp +++ b/src/video_core/renderer_vulkan/vk_instance.cpp @@ -1,14 +1,11 @@ // SPDX-FileCopyrightText: Copyright 2024 shadPS4 Emulator Project // SPDX-License-Identifier: GPL-2.0-or-later -#include -#include #include #include #include #include "common/assert.h" -#include "common/config.h" #include "common/debug.h" #include "sdl_window.h" #include "video_core/renderer_vulkan/liverpool_to_vk.h" @@ -207,31 +204,27 @@ std::string Instance::GetDriverVersionName() { bool Instance::CreateDevice() { const vk::StructureChain feature_chain = physical_device.getFeatures2< - vk::PhysicalDeviceFeatures2, vk::PhysicalDeviceExtendedDynamicStateFeaturesEXT, - vk::PhysicalDeviceExtendedDynamicState2FeaturesEXT, + vk::PhysicalDeviceFeatures2, vk::PhysicalDeviceVulkan11Features, + vk::PhysicalDeviceVulkan12Features, vk::PhysicalDeviceRobustness2FeaturesEXT, vk::PhysicalDeviceExtendedDynamicState3FeaturesEXT, - vk::PhysicalDeviceCustomBorderColorFeaturesEXT, - vk::PhysicalDeviceColorWriteEnableFeaturesEXT, vk::PhysicalDeviceVulkan12Features, - vk::PhysicalDeviceVulkan13Features, - vk::PhysicalDeviceWorkgroupMemoryExplicitLayoutFeaturesKHR, - vk::PhysicalDeviceDepthClipControlFeaturesEXT, vk::PhysicalDeviceRobustness2FeaturesEXT, + vk::PhysicalDevicePrimitiveTopologyListRestartFeaturesEXT, vk::PhysicalDevicePortabilitySubsetFeaturesKHR>(); - const vk::StructureChain properties_chain = physical_device.getProperties2< - vk::PhysicalDeviceProperties2, vk::PhysicalDevicePortabilitySubsetPropertiesKHR, - vk::PhysicalDeviceExternalMemoryHostPropertiesEXT, vk::PhysicalDeviceVulkan11Properties, - vk::PhysicalDevicePushDescriptorPropertiesKHR, vk::PhysicalDeviceVulkan12Properties>(); - subgroup_size = properties_chain.get().subgroupSize; - push_descriptor_props = properties_chain.get(); - vk12_props = properties_chain.get(); - LOG_INFO(Render_Vulkan, "Physical device subgroup size {}", subgroup_size); - features = feature_chain.get().features; + + const vk::StructureChain properties_chain = physical_device.getProperties2< + vk::PhysicalDeviceProperties2, vk::PhysicalDeviceVulkan11Properties, + vk::PhysicalDeviceVulkan12Properties, vk::PhysicalDevicePushDescriptorPropertiesKHR>(); + vk11_props = properties_chain.get(); + vk12_props = properties_chain.get(); + push_descriptor_props = properties_chain.get(); + LOG_INFO(Render_Vulkan, "Physical device subgroup size {}", vk11_props.subgroupSize); + if (available_extensions.empty()) { LOG_CRITICAL(Render_Vulkan, "No extensions supported by device."); return false; } - boost::container::static_vector enabled_extensions; + boost::container::static_vector enabled_extensions; const auto add_extension = [&](std::string_view extension) -> bool { const auto result = std::find_if(available_extensions.begin(), available_extensions.end(), @@ -247,44 +240,51 @@ bool Instance::CreateDevice() { return false; }; - add_extension(VK_KHR_SWAPCHAIN_EXTENSION_NAME); - shader_stencil_export = add_extension(VK_EXT_SHADER_STENCIL_EXPORT_EXTENSION_NAME); - external_memory_host = add_extension(VK_EXT_EXTERNAL_MEMORY_HOST_EXTENSION_NAME); - custom_border_color = add_extension(VK_EXT_CUSTOM_BORDER_COLOR_EXTENSION_NAME); - add_extension(VK_KHR_PUSH_DESCRIPTOR_EXTENSION_NAME); - depth_clip_control = add_extension(VK_EXT_DEPTH_CLIP_CONTROL_EXTENSION_NAME); - add_extension(VK_EXT_DEPTH_RANGE_UNRESTRICTED_EXTENSION_NAME); - workgroup_memory_explicit_layout = - add_extension(VK_KHR_WORKGROUP_MEMORY_EXPLICIT_LAYOUT_EXTENSION_NAME); - vertex_input_dynamic_state = add_extension(VK_EXT_VERTEX_INPUT_DYNAMIC_STATE_EXTENSION_NAME); - fragment_shader_barycentric = add_extension(VK_KHR_FRAGMENT_SHADER_BARYCENTRIC_EXTENSION_NAME); - - // The next two extensions are required to be available together in order to support write masks - color_write_en = add_extension(VK_EXT_COLOR_WRITE_ENABLE_EXTENSION_NAME); - color_write_en &= add_extension(VK_EXT_EXTENDED_DYNAMIC_STATE_3_EXTENSION_NAME); - const bool calibrated_timestamps = - TRACY_GPU_ENABLED ? add_extension(VK_EXT_CALIBRATED_TIMESTAMPS_EXTENSION_NAME) : false; - const bool robustness = add_extension(VK_EXT_ROBUSTNESS_2_EXTENSION_NAME); - list_restart = add_extension(VK_EXT_PRIMITIVE_TOPOLOGY_LIST_RESTART_EXTENSION_NAME); - maintenance5 = add_extension(VK_KHR_MAINTENANCE_5_EXTENSION_NAME); - legacy_vertex_attributes = add_extension(VK_EXT_LEGACY_VERTEX_ATTRIBUTES_EXTENSION_NAME); - image_load_store_lod = add_extension(VK_AMD_SHADER_IMAGE_LOAD_STORE_LOD_EXTENSION_NAME); - // These extensions are promoted by Vulkan 1.3, but for greater compatibility we use Vulkan 1.2 // with extensions. - if (Config::vkValidationEnabled() || Config::isRdocEnabled()) { - tooling_info = add_extension(VK_EXT_TOOLING_INFO_EXTENSION_NAME); - } - const bool maintenance4 = add_extension(VK_KHR_MAINTENANCE_4_EXTENSION_NAME); add_extension(VK_KHR_FORMAT_FEATURE_FLAGS_2_EXTENSION_NAME); add_extension(VK_KHR_DYNAMIC_RENDERING_EXTENSION_NAME); add_extension(VK_EXT_SHADER_DEMOTE_TO_HELPER_INVOCATION_EXTENSION_NAME); add_extension(VK_KHR_SYNCHRONIZATION_2_EXTENSION_NAME); add_extension(VK_EXT_EXTENDED_DYNAMIC_STATE_EXTENSION_NAME); + add_extension(VK_EXT_TOOLING_INFO_EXTENSION_NAME); + const bool maintenance4 = add_extension(VK_KHR_MAINTENANCE_4_EXTENSION_NAME); + + add_extension(VK_KHR_SWAPCHAIN_EXTENSION_NAME); + add_extension(VK_KHR_PUSH_DESCRIPTOR_EXTENSION_NAME); + add_extension(VK_EXT_DEPTH_RANGE_UNRESTRICTED_EXTENSION_NAME); + dynamic_state_3 = add_extension(VK_EXT_EXTENDED_DYNAMIC_STATE_3_EXTENSION_NAME); + if (dynamic_state_3) { + dynamic_state_3_features = + feature_chain.get(); + LOG_INFO(Render_Vulkan, "- extendedDynamicState3ColorWriteMask: {}", + dynamic_state_3_features.extendedDynamicState3ColorWriteMask); + } + robustness2 = add_extension(VK_EXT_ROBUSTNESS_2_EXTENSION_NAME); + if (robustness2) { + robustness2_features = feature_chain.get(); + LOG_INFO(Render_Vulkan, "- robustBufferAccess2: {}", + robustness2_features.robustBufferAccess2); + LOG_INFO(Render_Vulkan, "- nullDescriptor: {}", robustness2_features.nullDescriptor); + } + custom_border_color = add_extension(VK_EXT_CUSTOM_BORDER_COLOR_EXTENSION_NAME); + depth_clip_control = add_extension(VK_EXT_DEPTH_CLIP_CONTROL_EXTENSION_NAME); + vertex_input_dynamic_state = add_extension(VK_EXT_VERTEX_INPUT_DYNAMIC_STATE_EXTENSION_NAME); + list_restart = add_extension(VK_EXT_PRIMITIVE_TOPOLOGY_LIST_RESTART_EXTENSION_NAME); + fragment_shader_barycentric = add_extension(VK_KHR_FRAGMENT_SHADER_BARYCENTRIC_EXTENSION_NAME); + legacy_vertex_attributes = add_extension(VK_EXT_LEGACY_VERTEX_ATTRIBUTES_EXTENSION_NAME); + shader_stencil_export = add_extension(VK_EXT_SHADER_STENCIL_EXPORT_EXTENSION_NAME); + image_load_store_lod = add_extension(VK_AMD_SHADER_IMAGE_LOAD_STORE_LOD_EXTENSION_NAME); + amd_gcn_shader = add_extension(VK_AMD_GCN_SHADER_EXTENSION_NAME); + const bool calibrated_timestamps = + TRACY_GPU_ENABLED ? add_extension(VK_EXT_CALIBRATED_TIMESTAMPS_EXTENSION_NAME) : false; #ifdef __APPLE__ // Required by Vulkan spec if supported. - add_extension(VK_KHR_PORTABILITY_SUBSET_EXTENSION_NAME); + portability_subset = add_extension(VK_KHR_PORTABILITY_SUBSET_EXTENSION_NAME); + if (portability_subset) { + portability_features = feature_chain.get(); + } #endif const auto family_properties = physical_device.getQueueFamilyProperties(); @@ -307,14 +307,16 @@ bool Instance::CreateDevice() { return false; } - static constexpr std::array queue_priorities = {1.0f}; - + static constexpr std::array queue_priorities = {1.0f}; const vk::DeviceQueueCreateInfo queue_info = { .queueFamilyIndex = queue_family_index, .queueCount = static_cast(queue_priorities.size()), .pQueuePriorities = queue_priorities.data(), }; + const auto topology_list_restart_features = + feature_chain.get(); + const auto vk11_features = feature_chain.get(); const auto vk12_features = feature_chain.get(); vk::StructureChain device_chain = { vk::DeviceCreateInfo{ @@ -347,63 +349,62 @@ bool Instance::CreateDevice() { }, }, vk::PhysicalDeviceVulkan11Features{ - .shaderDrawParameters = true, + .storageBuffer16BitAccess = vk11_features.storageBuffer16BitAccess, + .uniformAndStorageBuffer16BitAccess = vk11_features.uniformAndStorageBuffer16BitAccess, + .shaderDrawParameters = vk11_features.shaderDrawParameters, }, vk::PhysicalDeviceVulkan12Features{ .samplerMirrorClampToEdge = vk12_features.samplerMirrorClampToEdge, .drawIndirectCount = vk12_features.drawIndirectCount, + .storageBuffer8BitAccess = vk12_features.storageBuffer8BitAccess, + .uniformAndStorageBuffer8BitAccess = vk12_features.uniformAndStorageBuffer8BitAccess, .shaderFloat16 = vk12_features.shaderFloat16, + .shaderInt8 = vk12_features.shaderInt8, .scalarBlockLayout = vk12_features.scalarBlockLayout, .uniformBufferStandardLayout = vk12_features.uniformBufferStandardLayout, .separateDepthStencilLayouts = vk12_features.separateDepthStencilLayouts, .hostQueryReset = vk12_features.hostQueryReset, .timelineSemaphore = vk12_features.timelineSemaphore, }, - vk::PhysicalDeviceMaintenance4FeaturesKHR{ - .maintenance4 = true, - }, - vk::PhysicalDeviceMaintenance5FeaturesKHR{ - .maintenance5 = true, - }, + // Vulkan 1.3 promoted extensions vk::PhysicalDeviceDynamicRenderingFeaturesKHR{ .dynamicRendering = true, }, vk::PhysicalDeviceShaderDemoteToHelperInvocationFeaturesEXT{ .shaderDemoteToHelperInvocation = true, }, - vk::PhysicalDeviceCustomBorderColorFeaturesEXT{ - .customBorderColors = true, - .customBorderColorWithoutFormat = true, - }, - vk::PhysicalDeviceColorWriteEnableFeaturesEXT{ - .colorWriteEnable = true, + vk::PhysicalDeviceSynchronization2Features{ + .synchronization2 = true, }, vk::PhysicalDeviceExtendedDynamicStateFeaturesEXT{ .extendedDynamicState = true, }, + vk::PhysicalDeviceMaintenance4FeaturesKHR{ + .maintenance4 = true, + }, + // Other extensions + vk::PhysicalDeviceCustomBorderColorFeaturesEXT{ + .customBorderColors = true, + .customBorderColorWithoutFormat = true, + }, vk::PhysicalDeviceExtendedDynamicState3FeaturesEXT{ - .extendedDynamicState3ColorWriteMask = true, + .extendedDynamicState3ColorWriteMask = + dynamic_state_3_features.extendedDynamicState3ColorWriteMask, }, vk::PhysicalDeviceDepthClipControlFeaturesEXT{ .depthClipControl = true, }, - vk::PhysicalDeviceWorkgroupMemoryExplicitLayoutFeaturesKHR{ - .workgroupMemoryExplicitLayout = true, - .workgroupMemoryExplicitLayoutScalarBlockLayout = true, - .workgroupMemoryExplicitLayout8BitAccess = true, - .workgroupMemoryExplicitLayout16BitAccess = true, - }, vk::PhysicalDeviceRobustness2FeaturesEXT{ - .nullDescriptor = true, - }, - vk::PhysicalDeviceSynchronization2Features{ - .synchronization2 = true, + .robustBufferAccess2 = robustness2_features.robustBufferAccess2, + .nullDescriptor = robustness2_features.nullDescriptor, }, vk::PhysicalDeviceVertexInputDynamicStateFeaturesEXT{ .vertexInputDynamicState = true, }, vk::PhysicalDevicePrimitiveTopologyListRestartFeaturesEXT{ .primitiveTopologyListRestart = true, + .primitiveTopologyPatchListRestart = + topology_list_restart_features.primitiveTopologyPatchListRestart, }, vk::PhysicalDeviceFragmentShaderBarycentricFeaturesKHR{ .fragmentShaderBarycentric = true, @@ -412,44 +413,31 @@ bool Instance::CreateDevice() { .legacyVertexAttributes = true, }, #ifdef __APPLE__ - feature_chain.get(), + portability_features, #endif }; if (!maintenance4) { device_chain.unlink(); } - if (!maintenance5) { - device_chain.unlink(); - } if (!custom_border_color) { device_chain.unlink(); } - if (!color_write_en) { - device_chain.unlink(); + if (!dynamic_state_3) { device_chain.unlink(); } if (!depth_clip_control) { device_chain.unlink(); } - if (!workgroup_memory_explicit_layout) { - device_chain.unlink(); - } - if (!list_restart) { - device_chain.unlink(); - } - if (robustness) { - null_descriptor = - feature_chain.get().nullDescriptor; - device_chain.get().nullDescriptor = - null_descriptor; - } else { - null_descriptor = false; + if (!robustness2) { device_chain.unlink(); } if (!vertex_input_dynamic_state) { device_chain.unlink(); } + if (!list_restart) { + device_chain.unlink(); + } if (!fragment_shader_barycentric) { device_chain.unlink(); } @@ -549,7 +537,8 @@ void Instance::CollectDeviceParameters() { } void Instance::CollectToolingInfo() { - if (!tooling_info) { + if (GetDriverID() == vk::DriverId::eAmdProprietary) { + // Currently causes issues with Reshade on AMD proprietary, disabled until fix released. return; } const auto [tools_result, tools] = physical_device.getToolPropertiesEXT(); @@ -561,8 +550,6 @@ void Instance::CollectToolingInfo() { for (const vk::PhysicalDeviceToolProperties& tool : tools) { const std::string_view name = tool.name; LOG_INFO(Render_Vulkan, "Attached debugging tool: {}", name); - has_renderdoc = has_renderdoc || name == "RenderDoc"; - has_nsight_graphics = has_nsight_graphics || name == "NVIDIA Nsight Graphics"; } } diff --git a/src/video_core/renderer_vulkan/vk_instance.h b/src/video_core/renderer_vulkan/vk_instance.h index 62838140c..3ccf89276 100644 --- a/src/video_core/renderer_vulkan/vk_instance.h +++ b/src/video_core/renderer_vulkan/vk_instance.h @@ -79,11 +79,6 @@ public: return profiler_context; } - /// Returns true when a known debugging tool is attached. - bool HasDebuggingToolAttached() const { - return has_renderdoc || has_nsight_graphics; - } - /// Returns true if anisotropic filtering is supported bool IsAnisotropicFilteringSupported() const { return features.samplerAnisotropy; @@ -94,34 +89,20 @@ public: return custom_border_color; } - /// Returns true when VK_EXT_fragment_shader_interlock is supported - bool IsFragmentShaderInterlockSupported() const { - return fragment_shader_interlock; - } - - /// Returns true when VK_EXT_pipeline_creation_cache_control is supported - bool IsPipelineCreationCacheControlSupported() const { - return pipeline_creation_cache_control; - } - /// Returns true when VK_EXT_shader_stencil_export is supported bool IsShaderStencilExportSupported() const { return shader_stencil_export; } - /// Returns true when VK_EXT_external_memory_host is supported - bool IsExternalMemoryHostSupported() const { - return external_memory_host; - } - /// Returns true when VK_EXT_depth_clip_control is supported bool IsDepthClipControlSupported() const { return depth_clip_control; } - /// Returns true when VK_EXT_color_write_enable is supported - bool IsColorWriteEnableSupported() const { - return color_write_en; + /// Returns true when the extendedDynamicState3ColorWriteMask feature of + /// VK_EXT_extended_dynamic_state3 is supported. + bool IsDynamicColorWriteMaskSupported() const { + return dynamic_state_3 && dynamic_state_3_features.extendedDynamicState3ColorWriteMask; } /// Returns true when VK_EXT_vertex_input_dynamic_state is supported. @@ -129,14 +110,14 @@ public: return vertex_input_dynamic_state; } - /// Returns true when the nullDescriptor feature of VK_EXT_robustness2 is supported. - bool IsNullDescriptorSupported() const { - return null_descriptor; + /// Returns true when the robustBufferAccess2 feature of VK_EXT_robustness2 is supported. + bool IsRobustBufferAccess2Supported() const { + return robustness2 && robustness2_features.robustBufferAccess2; } - /// Returns true when VK_KHR_maintenance5 is supported. - bool IsMaintenance5Supported() const { - return maintenance5; + /// Returns true when the nullDescriptor feature of VK_EXT_robustness2 is supported. + bool IsNullDescriptorSupported() const { + return robustness2 && robustness2_features.nullDescriptor; } /// Returns true when VK_KHR_fragment_shader_barycentric is supported. @@ -159,6 +140,11 @@ public: return image_load_store_lod; } + /// Returns true when VK_AMD_gcn_shader is supported. + bool IsAmdGcnShaderSupported() const { + return amd_gcn_shader; + } + /// Returns true when geometry shaders are supported by the device bool IsGeometryStageSupported() const { return features.geometryShader; @@ -169,6 +155,16 @@ public: return features.tessellationShader; } + /// Returns true when tessellation isolines are supported by the device + bool IsTessellationIsolinesSupported() const { + return !portability_subset || portability_features.tessellationIsolines; + } + + /// Returns true when tessellation point mode is supported by the device + bool IsTessellationPointModeSupported() const { + return !portability_subset || portability_features.tessellationPointMode; + } + /// Returns the vendor ID of the physical device u32 GetVendorID() const { return properties.vendorID; @@ -219,16 +215,16 @@ public: return properties.limits.minUniformBufferOffsetAlignment; } + /// Returns the maximum size of uniform buffers. + vk::DeviceSize UniformMaxSize() const { + return properties.limits.maxUniformBufferRange; + } + /// Returns the minimum required alignment for storage buffers vk::DeviceSize StorageMinAlignment() const { return properties.limits.minStorageBufferOffsetAlignment; } - /// Returns the minimum required alignment for texel buffers - vk::DeviceSize TexelBufferMinAlignment() const { - return properties.limits.minTexelBufferOffsetAlignment; - } - /// Returns the minimum alignemt required for accessing host-mapped device memory vk::DeviceSize NonCoherentAtomSize() const { return properties.limits.nonCoherentAtomSize; @@ -236,12 +232,12 @@ public: /// Returns the subgroup size of the selected physical device. u32 SubgroupSize() const { - return subgroup_size; + return vk11_props.subgroupSize; } - /// Returns the maximum supported elements in a texel buffer - u32 MaxTexelBufferElements() const { - return properties.limits.maxTexelBufferElements; + /// Returns the maximum size of compute shared memory. + u32 MaxComputeSharedMemorySize() const { + return properties.limits.maxComputeSharedMemorySize; } /// Returns the maximum sampler LOD bias. @@ -269,9 +265,14 @@ public: return features.shaderClipDistance; } - /// Returns the minimum imported host pointer alignment - u64 GetMinImportedHostPointerAlignment() const { - return min_imported_host_pointer_alignment; + /// Returns the maximim viewport width. + u32 GetMaxViewportWidth() const { + return properties.limits.maxViewportDimensions[0]; + } + + /// Returns the maximum viewport height. + u32 GetMaxViewportHeight() const { + return properties.limits.maxViewportDimensions[1]; } /// Returns the sample count flags supported by framebuffers. @@ -303,9 +304,13 @@ private: vk::PhysicalDevice physical_device; vk::UniqueDevice device; vk::PhysicalDeviceProperties properties; - vk::PhysicalDevicePushDescriptorPropertiesKHR push_descriptor_props; + vk::PhysicalDeviceVulkan11Properties vk11_props; vk::PhysicalDeviceVulkan12Properties vk12_props; + vk::PhysicalDevicePushDescriptorPropertiesKHR push_descriptor_props; vk::PhysicalDeviceFeatures features; + vk::PhysicalDevicePortabilitySubsetFeaturesKHR portability_features; + vk::PhysicalDeviceExtendedDynamicState3FeaturesEXT dynamic_state_3_features; + vk::PhysicalDeviceRobustness2FeaturesEXT robustness2_features; vk::DriverIdKHR driver_id; vk::UniqueDebugUtilsMessengerEXT debug_callback{}; std::string vendor_name; @@ -317,29 +322,18 @@ private: std::unordered_map format_properties; TracyVkCtx profiler_context{}; u32 queue_family_index{0}; - bool image_view_reinterpretation{true}; - bool timeline_semaphores{}; bool custom_border_color{}; - bool fragment_shader_interlock{}; - bool pipeline_creation_cache_control{}; bool fragment_shader_barycentric{}; - bool shader_stencil_export{}; - bool external_memory_host{}; bool depth_clip_control{}; - bool workgroup_memory_explicit_layout{}; - bool color_write_en{}; + bool dynamic_state_3{}; bool vertex_input_dynamic_state{}; - bool null_descriptor{}; - bool maintenance5{}; + bool robustness2{}; bool list_restart{}; bool legacy_vertex_attributes{}; + bool shader_stencil_export{}; bool image_load_store_lod{}; - u64 min_imported_host_pointer_alignment{}; - u32 subgroup_size{}; - bool tooling_info{}; - bool debug_utils_supported{}; - bool has_nsight_graphics{}; - bool has_renderdoc{}; + bool amd_gcn_shader{}; + bool portability_subset{}; }; } // namespace Vulkan diff --git a/src/video_core/renderer_vulkan/vk_pipeline_cache.cpp b/src/video_core/renderer_vulkan/vk_pipeline_cache.cpp index ba069dae1..4823b8ffe 100644 --- a/src/video_core/renderer_vulkan/vk_pipeline_cache.cpp +++ b/src/video_core/renderer_vulkan/vk_pipeline_cache.cpp @@ -29,8 +29,6 @@ using Shader::VsOutput; constexpr static std::array DescriptorHeapSizes = { vk::DescriptorPoolSize{vk::DescriptorType::eUniformBuffer, 8192}, vk::DescriptorPoolSize{vk::DescriptorType::eStorageBuffer, 1024}, - vk::DescriptorPoolSize{vk::DescriptorType::eUniformTexelBuffer, 128}, - vk::DescriptorPoolSize{vk::DescriptorType::eStorageTexelBuffer, 128}, vk::DescriptorPoolSize{vk::DescriptorType::eSampledImage, 8192}, vk::DescriptorPoolSize{vk::DescriptorType::eSampler, 1024}, }; @@ -86,7 +84,7 @@ const Shader::RuntimeInfo& PipelineCache::BuildRuntimeInfo(Stage stage, LogicalS const auto BuildCommon = [&](const auto& program) { info.num_user_data = program.settings.num_user_regs; info.num_input_vgprs = program.settings.vgpr_comp_cnt; - info.num_allocated_vgprs = program.settings.num_vgprs * 4; + info.num_allocated_vgprs = program.NumVgprs(); info.fp_denorm_mode32 = program.settings.fp_denorm_mode32; info.fp_round_mode32 = program.settings.fp_round_mode32; }; @@ -125,6 +123,7 @@ const Shader::RuntimeInfo& PipelineCache::BuildRuntimeInfo(Stage stage, LogicalS info.vs_info.emulate_depth_negative_one_to_one = !instance.IsDepthClipControlSupported() && regs.clipper_control.clip_space == Liverpool::ClipSpace::MinusWToW; + info.vs_info.clip_disable = graphics_key.clip_disable; if (l_stage == LogicalStage::TessellationEval) { info.vs_info.tess_type = regs.tess_config.type; info.vs_info.tess_topology = regs.tess_config.topology; @@ -166,10 +165,7 @@ const Shader::RuntimeInfo& PipelineCache::BuildRuntimeInfo(Stage stage, LogicalS }; } for (u32 i = 0; i < Shader::MaxColorBuffers; i++) { - info.fs_info.color_buffers[i] = { - .num_format = graphics_key.color_num_formats[i], - .swizzle = graphics_key.color_swizzles[i], - }; + info.fs_info.color_buffers[i] = graphics_key.color_buffers[i]; } break; } @@ -200,13 +196,23 @@ PipelineCache::PipelineCache(const Instance& instance_, Scheduler& scheduler_, .subgroup_size = instance.SubgroupSize(), .support_fp32_denorm_preserve = bool(vk12_props.shaderDenormPreserveFloat32), .support_fp32_denorm_flush = bool(vk12_props.shaderDenormFlushToZeroFloat32), + .support_fp32_round_to_zero = bool(vk12_props.shaderRoundingModeRTZFloat32), .support_explicit_workgroup_layout = true, .support_legacy_vertex_attributes = instance_.IsLegacyVertexAttributesSupported(), .supports_image_load_store_lod = instance_.IsImageLoadStoreLodSupported(), + .supports_native_cube_calc = instance_.IsAmdGcnShaderSupported(), + .supports_robust_buffer_access = instance_.IsRobustBufferAccess2Supported(), .needs_manual_interpolation = instance.IsFragmentShaderBarycentricSupported() && instance.GetDriverID() == vk::DriverId::eNvidiaProprietary, .needs_lds_barriers = instance.GetDriverID() == vk::DriverId::eNvidiaProprietary || instance.GetDriverID() == vk::DriverId::eMoltenvk, + // When binding a UBO, we calculate its size considering the offset in the larger buffer + // cache underlying resource. In some cases, it may produce sizes exceeding the system + // maximum allowed UBO range, so we need to reduce the threshold to prevent issues. + .max_ubo_size = instance.UniformMaxSize() - instance.UniformMinAlignment(), + .max_viewport_width = instance.GetMaxViewportWidth(), + .max_viewport_height = instance.GetMaxViewportHeight(), + .max_shared_memory_size = instance.MaxComputeSharedMemorySize(), }; auto [cache_result, cache] = instance.GetDevice().createPipelineCacheUnique({}); ASSERT_MSG(cache_result == vk::Result::eSuccess, "Failed to create pipeline cache: {}", @@ -222,7 +228,7 @@ const GraphicsPipeline* PipelineCache::GetGraphicsPipeline() { } const auto [it, is_new] = graphics_pipelines.try_emplace(graphics_key); if (is_new) { - it.value() = std::make_unique(instance, scheduler, desc_heap, + it.value() = std::make_unique(instance, scheduler, desc_heap, profile, graphics_key, *pipeline_cache, infos, runtime_infos, fetch_shader, modules); if (Config::collectShadersForDebug()) { @@ -243,8 +249,9 @@ const ComputePipeline* PipelineCache::GetComputePipeline() { } const auto [it, is_new] = compute_pipelines.try_emplace(compute_key); if (is_new) { - it.value() = std::make_unique( - instance, scheduler, desc_heap, *pipeline_cache, compute_key, *infos[0], modules[0]); + it.value() = + std::make_unique(instance, scheduler, desc_heap, profile, + *pipeline_cache, compute_key, *infos[0], modules[0]); if (Config::collectShadersForDebug()) { auto& m = modules[0]; module_related_pipelines[m].emplace_back(compute_key); @@ -259,6 +266,8 @@ bool PipelineCache::RefreshGraphicsKey() { auto& regs = liverpool->regs; auto& key = graphics_key; + key.clip_disable = + regs.clipper_control.clip_disable || regs.primitive_type == AmdGpu::PrimitiveType::RectList; key.depth_test_enable = regs.depth_control.depth_enable; key.depth_write_enable = regs.depth_control.depth_write_enable && !regs.depth_render_control.depth_clear_enable; @@ -301,10 +310,9 @@ bool PipelineCache::RefreshGraphicsKey() { // order. We need to do some arrays compaction at this stage key.num_color_attachments = 0; key.color_formats.fill(vk::Format::eUndefined); - key.color_num_formats.fill(AmdGpu::NumberFormat::Unorm); + key.color_buffers.fill({}); key.blend_controls.fill({}); key.write_masks.fill({}); - key.color_swizzles.fill({}); key.vertex_buffer_formats.fill(vk::Format::eUndefined); key.patch_control_points = 0; @@ -327,10 +335,25 @@ bool PipelineCache::RefreshGraphicsKey() { continue; } + // Metal seems to have an issue where 8-bit unorm/snorm/sRGB outputs to render target + // need a bias applied to round correctly; detect and set the flag for that here. + const auto needs_unorm_fixup = instance.GetDriverID() == vk::DriverId::eMoltenvk && + (col_buf.GetNumberFmt() == AmdGpu::NumberFormat::Unorm || + col_buf.GetNumberFmt() == AmdGpu::NumberFormat::Snorm || + col_buf.GetNumberFmt() == AmdGpu::NumberFormat::Srgb) && + (col_buf.GetDataFmt() == AmdGpu::DataFormat::Format8 || + col_buf.GetDataFmt() == AmdGpu::DataFormat::Format8_8 || + col_buf.GetDataFmt() == AmdGpu::DataFormat::Format8_8_8_8); + key.color_formats[remapped_cb] = LiverpoolToVK::SurfaceFormat(col_buf.GetDataFmt(), col_buf.GetNumberFmt()); - key.color_num_formats[remapped_cb] = col_buf.GetNumberFmt(); - key.color_swizzles[remapped_cb] = col_buf.Swizzle(); + key.color_buffers[remapped_cb] = Shader::PsColorBuffer{ + .num_format = col_buf.GetNumberFmt(), + .num_conversion = col_buf.GetNumberConversion(), + .export_format = regs.color_export_format.GetFormat(cb), + .needs_unorm_fixup = needs_unorm_fixup, + .swizzle = col_buf.Swizzle(), + }; } fetch_shader = std::nullopt; @@ -396,8 +419,10 @@ bool PipelineCache::RefreshGraphicsKey() { break; } case Liverpool::ShaderStageEnable::VgtStages::LsHs: { - if (!instance.IsTessellationSupported()) { - break; + if (!instance.IsTessellationSupported() || + (regs.tess_config.type == AmdGpu::TessellationType::Isoline && + !instance.IsTessellationIsolinesSupported())) { + return false; } if (!TryBindStage(Stage::Hull, LogicalStage::TessellationControl)) { return false; @@ -416,17 +441,17 @@ bool PipelineCache::RefreshGraphicsKey() { } } - const auto vs_info = infos[static_cast(Shader::LogicalStage::Vertex)]; + const auto* vs_info = infos[static_cast(Shader::LogicalStage::Vertex)]; if (vs_info && fetch_shader && !instance.IsVertexInputDynamicState()) { + // Without vertex input dynamic state, the pipeline needs to specialize on format. + // Stride will still be handled outside the pipeline using dynamic state. u32 vertex_binding = 0; for (const auto& attrib : fetch_shader->attributes) { if (attrib.UsesStepRates()) { + // Skip attribute binding as the data will be pulled by shader. continue; } const auto& buffer = attrib.GetSharp(*vs_info); - if (buffer.GetSize() == 0) { - continue; - } ASSERT(vertex_binding < MaxVertexBufferCount); key.vertex_buffer_formats[vertex_binding++] = Vulkan::LiverpoolToVK::SurfaceFormat(buffer.GetDataFmt(), buffer.GetNumberFmt()); @@ -446,7 +471,7 @@ bool PipelineCache::RefreshGraphicsKey() { // of the latter we need to change format to undefined, and either way we need to // increment the index for the null attachment binding. key.color_formats[remapped_cb] = vk::Format::eUndefined; - key.color_swizzles[remapped_cb] = {}; + key.color_buffers[remapped_cb] = {}; ++remapped_cb; continue; } diff --git a/src/video_core/renderer_vulkan/vk_pipeline_cache.h b/src/video_core/renderer_vulkan/vk_pipeline_cache.h index b3bccd513..ba3407b48 100644 --- a/src/video_core/renderer_vulkan/vk_pipeline_cache.h +++ b/src/video_core/renderer_vulkan/vk_pipeline_cache.h @@ -68,6 +68,10 @@ public: static std::string GetShaderName(Shader::Stage stage, u64 hash, std::optional perm = {}); + auto& GetProfile() const { + return profile; + } + private: bool RefreshGraphicsKey(); bool RefreshComputeKey(); diff --git a/src/video_core/renderer_vulkan/vk_pipeline_common.cpp b/src/video_core/renderer_vulkan/vk_pipeline_common.cpp index 6b48a40a0..96e19d6a1 100644 --- a/src/video_core/renderer_vulkan/vk_pipeline_common.cpp +++ b/src/video_core/renderer_vulkan/vk_pipeline_common.cpp @@ -6,6 +6,7 @@ #include "shader_recompiler/info.h" #include "video_core/buffer_cache/buffer_cache.h" #include "video_core/renderer_vulkan/vk_instance.h" +#include "video_core/renderer_vulkan/vk_pipeline_cache.h" #include "video_core/renderer_vulkan/vk_pipeline_common.h" #include "video_core/renderer_vulkan/vk_scheduler.h" #include "video_core/texture_cache/texture_cache.h" @@ -13,8 +14,10 @@ namespace Vulkan { Pipeline::Pipeline(const Instance& instance_, Scheduler& scheduler_, DescriptorHeap& desc_heap_, - vk::PipelineCache pipeline_cache, bool is_compute_ /*= false*/) - : instance{instance_}, scheduler{scheduler_}, desc_heap{desc_heap_}, is_compute{is_compute_} {} + const Shader::Profile& profile_, vk::PipelineCache pipeline_cache, + bool is_compute_ /*= false*/) + : instance{instance_}, scheduler{scheduler_}, desc_heap{desc_heap_}, profile{profile_}, + is_compute{is_compute_} {} Pipeline::~Pipeline() = default; @@ -34,7 +37,7 @@ void Pipeline::BindResources(DescriptorWrites& set_writes, const BufferBarriers& cmdbuf.pipelineBarrier2(dependencies); } - const auto stage_flags = IsCompute() ? vk::ShaderStageFlagBits::eCompute : gp_stage_flags; + const auto stage_flags = IsCompute() ? vk::ShaderStageFlagBits::eCompute : AllGraphicsStageBits; cmdbuf.pushConstants(*pipeline_layout, stage_flags, 0u, sizeof(push_data), &push_data); // Bind descriptor set. @@ -55,4 +58,19 @@ void Pipeline::BindResources(DescriptorWrites& set_writes, const BufferBarriers& cmdbuf.bindDescriptorSets(bind_point, *pipeline_layout, 0, desc_set, {}); } +std::string Pipeline::GetDebugString() const { + std::string stage_desc; + for (const auto& stage : stages) { + if (stage) { + const auto shader_name = PipelineCache::GetShaderName(stage->stage, stage->pgm_hash); + if (stage_desc.empty()) { + stage_desc = shader_name; + } else { + stage_desc = fmt::format("{},{}", stage_desc, shader_name); + } + } + } + return stage_desc; +} + } // namespace Vulkan diff --git a/src/video_core/renderer_vulkan/vk_pipeline_common.h b/src/video_core/renderer_vulkan/vk_pipeline_common.h index 1b13a1797..9633fc4ea 100644 --- a/src/video_core/renderer_vulkan/vk_pipeline_common.h +++ b/src/video_core/renderer_vulkan/vk_pipeline_common.h @@ -5,6 +5,7 @@ #include "shader_recompiler/backend/bindings.h" #include "shader_recompiler/info.h" +#include "shader_recompiler/profile.h" #include "video_core/renderer_vulkan/vk_common.h" #include "video_core/texture_cache/texture_cache.h" @@ -14,7 +15,7 @@ class BufferCache; namespace Vulkan { -static constexpr auto gp_stage_flags = +static constexpr auto AllGraphicsStageBits = vk::ShaderStageFlagBits::eVertex | vk::ShaderStageFlagBits::eTessellationControl | vk::ShaderStageFlagBits::eTessellationEvaluation | vk::ShaderStageFlagBits::eGeometry | vk::ShaderStageFlagBits::eFragment; @@ -26,7 +27,8 @@ class DescriptorHeap; class Pipeline { public: Pipeline(const Instance& instance, Scheduler& scheduler, DescriptorHeap& desc_heap, - vk::PipelineCache pipeline_cache, bool is_compute = false); + const Shader::Profile& profile, vk::PipelineCache pipeline_cache, + bool is_compute = false); virtual ~Pipeline(); vk::Pipeline Handle() const noexcept { @@ -61,9 +63,12 @@ public: const Shader::PushData& push_data) const; protected: + [[nodiscard]] std::string GetDebugString() const; + const Instance& instance; Scheduler& scheduler; DescriptorHeap& desc_heap; + const Shader::Profile& profile; vk::UniquePipeline pipeline; vk::UniquePipelineLayout pipeline_layout; vk::UniqueDescriptorSetLayout desc_layout; diff --git a/src/video_core/renderer_vulkan/vk_platform.cpp b/src/video_core/renderer_vulkan/vk_platform.cpp index 7f0bcb5d2..716473377 100644 --- a/src/video_core/renderer_vulkan/vk_platform.cpp +++ b/src/video_core/renderer_vulkan/vk_platform.cpp @@ -28,30 +28,19 @@ static const char* const VALIDATION_LAYER_NAME = "VK_LAYER_KHRONOS_validation"; static const char* const CRASH_DIAGNOSTIC_LAYER_NAME = "VK_LAYER_LUNARG_crash_diagnostic"; static VKAPI_ATTR VkBool32 VKAPI_CALL DebugUtilsCallback( - VkDebugUtilsMessageSeverityFlagBitsEXT severity, VkDebugUtilsMessageTypeFlagsEXT type, - const VkDebugUtilsMessengerCallbackDataEXT* callback_data, void* user_data) { - - switch (static_cast(callback_data->messageIdNumber)) { - case 0x609a13b: // Vertex attribute at location not consumed by shader - case 0xc81ad50e: - case 0xb7c39078: - case 0x32868fde: // vkCreateBufferView(): pCreateInfo->range does not equal VK_WHOLE_SIZE - case 0x1012616b: // `VK_FORMAT_UNDEFINED` does not match fragment shader output type - return VK_FALSE; - default: - break; - } + vk::DebugUtilsMessageSeverityFlagBitsEXT severity, vk::DebugUtilsMessageTypeFlagsEXT type, + const vk::DebugUtilsMessengerCallbackDataEXT* callback_data, void* user_data) { Common::Log::Level level{}; switch (severity) { - case VK_DEBUG_UTILS_MESSAGE_SEVERITY_ERROR_BIT_EXT: + case vk::DebugUtilsMessageSeverityFlagBitsEXT::eError: level = Common::Log::Level::Error; break; - case VK_DEBUG_UTILS_MESSAGE_SEVERITY_WARNING_BIT_EXT: + case vk::DebugUtilsMessageSeverityFlagBitsEXT::eWarning: level = Common::Log::Level::Info; break; - case VK_DEBUG_UTILS_MESSAGE_SEVERITY_INFO_BIT_EXT: - case VK_DEBUG_UTILS_MESSAGE_SEVERITY_VERBOSE_BIT_EXT: + case vk::DebugUtilsMessageSeverityFlagBitsEXT::eInfo: + case vk::DebugUtilsMessageSeverityFlagBitsEXT::eVerbose: level = Common::Log::Level::Debug; break; default: @@ -171,6 +160,10 @@ std::vector GetInstanceExtensions(Frontend::WindowSystemType window extensions.push_back(VK_KHR_SURFACE_EXTENSION_NAME); } + if (Config::allowHDR()) { + extensions.push_back(VK_EXT_SWAPCHAIN_COLOR_SPACE_EXTENSION_NAME); + } + if (enable_debug_utils) { extensions.push_back(VK_EXT_DEBUG_UTILS_EXTENSION_NAME); } @@ -285,6 +278,7 @@ vk::UniqueInstance CreateInstance(Frontend::WindowSystemType window_type, bool e vk::Bool32 enable_force_barriers = vk::True; #ifdef __APPLE__ const vk::Bool32 mvk_debug_mode = enable_crash_diagnostic ? vk::True : vk::False; + constexpr vk::Bool32 mvk_use_mtlheap = vk::True; #endif const std::array layer_setings = { @@ -360,7 +354,16 @@ vk::UniqueInstance CreateInstance(Frontend::WindowSystemType window_type, bool e .type = vk::LayerSettingTypeEXT::eBool32, .valueCount = 1, .pValues = &mvk_debug_mode, - } + }, + // Use MTLHeap to back device memory, which among other things allows us to + // use VK_IMAGE_CREATE_2D_ARRAY_COMPATIBLE_BIT via memory aliasing. + vk::LayerSettingEXT{ + .pLayerName = "MoltenVK", + .pSettingName = "MVK_CONFIG_USE_MTLHEAP", + .type = vk::LayerSettingTypeEXT::eBool32, + .valueCount = 1, + .pValues = &mvk_use_mtlheap, + }, #endif }; diff --git a/src/video_core/renderer_vulkan/vk_platform.h b/src/video_core/renderer_vulkan/vk_platform.h index 6b425b6d8..6a6ebeb15 100644 --- a/src/video_core/renderer_vulkan/vk_platform.h +++ b/src/video_core/renderer_vulkan/vk_platform.h @@ -3,11 +3,11 @@ #pragma once -#include -#include #include +#include "common/assert.h" #include "common/logging/log.h" +#include "common/string_literal.h" #include "common/types.h" #include "video_core/renderer_vulkan/vk_common.h" @@ -50,4 +50,25 @@ void SetObjectName(vk::Device device, const HandleType& handle, const char* form SetObjectName(device, handle, debug_name); } +template +static void Check(vk::Result r) { + if constexpr (msg.len <= 1) { + ASSERT_MSG(r == vk::Result::eSuccess, "vk::Result={}", vk::to_string(r)); + } else { + ASSERT_MSG(r == vk::Result::eSuccess, "Failed to {}: vk::Result={}", msg.value, + vk::to_string(r)); + } +} + +template +static T Check(vk::ResultValue r) { + if constexpr (msg.len <= 1) { + ASSERT_MSG(r.result == vk::Result::eSuccess, "vk::Result={}", vk::to_string(r.result)); + } else { + ASSERT_MSG(r.result == vk::Result::eSuccess, "Failed to {}: vk::Result={}", msg.value, + vk::to_string(r.result)); + } + return std::move(r.value); +} + } // namespace Vulkan diff --git a/src/video_core/renderer_vulkan/vk_presenter.cpp b/src/video_core/renderer_vulkan/vk_presenter.cpp index 93129842f..4a6a5c7c2 100644 --- a/src/video_core/renderer_vulkan/vk_presenter.cpp +++ b/src/video_core/renderer_vulkan/vk_presenter.cpp @@ -6,20 +6,24 @@ #include "common/singleton.h" #include "core/debug_state.h" #include "core/devtools/layer.h" -#include "core/file_format/splash.h" #include "core/libraries/system/systemservice.h" #include "imgui/renderer/imgui_core.h" #include "sdl_window.h" +#include "video_core/renderer_vulkan/vk_platform.h" #include "video_core/renderer_vulkan/vk_presenter.h" #include "video_core/renderer_vulkan/vk_rasterizer.h" #include "video_core/renderer_vulkan/vk_shader_util.h" #include "video_core/texture_cache/image.h" #include "video_core/host_shaders/fs_tri_vert.h" -#include "video_core/host_shaders/post_process_frag.h" #include +#include + +#include "common/elf_info.h" +#include "imgui/renderer/imgui_impl_vulkan.h" + namespace Vulkan { bool CanBlitToSwapchain(const vk::PhysicalDevice physical_device, vk::Format format) { @@ -103,206 +107,10 @@ static vk::Rect2D FitImage(s32 frame_width, s32 frame_height, s32 swapchain_widt dst_rect.offset.x, dst_rect.offset.y); } -static vk::Format FormatToUnorm(vk::Format fmt) { - switch (fmt) { - case vk::Format::eR8G8B8A8Srgb: - return vk::Format::eR8G8B8A8Unorm; - case vk::Format::eB8G8R8A8Srgb: - return vk::Format::eB8G8R8A8Unorm; - default: - UNREACHABLE(); - } -} - -void Presenter::CreatePostProcessPipeline() { - static const std::array pp_shaders{ - HostShaders::FS_TRI_VERT, - HostShaders::POST_PROCESS_FRAG, - }; - - boost::container::static_vector bindings{ - { - .binding = 0, - .descriptorType = vk::DescriptorType::eCombinedImageSampler, - .descriptorCount = 1, - .stageFlags = vk::ShaderStageFlagBits::eFragment, - }, - }; - - const vk::DescriptorSetLayoutCreateInfo desc_layout_ci = { - .flags = vk::DescriptorSetLayoutCreateFlagBits::ePushDescriptorKHR, - .bindingCount = static_cast(bindings.size()), - .pBindings = bindings.data(), - }; - auto desc_layout_result = instance.GetDevice().createDescriptorSetLayoutUnique(desc_layout_ci); - ASSERT_MSG(desc_layout_result.result == vk::Result::eSuccess, - "Failed to create descriptor set layout: {}", - vk::to_string(desc_layout_result.result)); - pp_desc_set_layout = std::move(desc_layout_result.value); - - const vk::PushConstantRange push_constants = { - .stageFlags = vk::ShaderStageFlagBits::eFragment, - .offset = 0, - .size = sizeof(PostProcessSettings), - }; - - const auto& vs_module = - Vulkan::Compile(pp_shaders[0], vk::ShaderStageFlagBits::eVertex, instance.GetDevice()); - ASSERT(vs_module); - Vulkan::SetObjectName(instance.GetDevice(), vs_module, "fs_tri.vert"); - - const auto& fs_module = - Vulkan::Compile(pp_shaders[1], vk::ShaderStageFlagBits::eFragment, instance.GetDevice()); - ASSERT(fs_module); - Vulkan::SetObjectName(instance.GetDevice(), fs_module, "post_process.frag"); - - const std::array shaders_ci{ - vk::PipelineShaderStageCreateInfo{ - .stage = vk::ShaderStageFlagBits::eVertex, - .module = vs_module, - .pName = "main", - }, - vk::PipelineShaderStageCreateInfo{ - .stage = vk::ShaderStageFlagBits::eFragment, - .module = fs_module, - .pName = "main", - }, - }; - - const vk::DescriptorSetLayout set_layout = *pp_desc_set_layout; - const vk::PipelineLayoutCreateInfo layout_info = { - .setLayoutCount = 1U, - .pSetLayouts = &set_layout, - .pushConstantRangeCount = 1, - .pPushConstantRanges = &push_constants, - }; - auto [layout_result, layout] = instance.GetDevice().createPipelineLayoutUnique(layout_info); - ASSERT_MSG(layout_result == vk::Result::eSuccess, "Failed to create pipeline layout: {}", - vk::to_string(layout_result)); - pp_pipeline_layout = std::move(layout); - - const std::array pp_color_formats{ - vk::Format::eB8G8R8A8Unorm, // swapchain.GetSurfaceFormat().format, - }; - const vk::PipelineRenderingCreateInfoKHR pipeline_rendering_ci = { - .colorAttachmentCount = 1u, - .pColorAttachmentFormats = pp_color_formats.data(), - }; - - const vk::PipelineVertexInputStateCreateInfo vertex_input_info = { - .vertexBindingDescriptionCount = 0u, - .vertexAttributeDescriptionCount = 0u, - }; - - const vk::PipelineInputAssemblyStateCreateInfo input_assembly = { - .topology = vk::PrimitiveTopology::eTriangleList, - }; - - const vk::Viewport viewport = { - .x = 0.0f, - .y = 0.0f, - .width = 1.0f, - .height = 1.0f, - .minDepth = 0.0f, - .maxDepth = 1.0f, - }; - - const vk::Rect2D scissor = { - .offset = {0, 0}, - .extent = {1, 1}, - }; - - const vk::PipelineViewportStateCreateInfo viewport_info = { - .viewportCount = 1, - .pViewports = &viewport, - .scissorCount = 1, - .pScissors = &scissor, - }; - - const vk::PipelineRasterizationStateCreateInfo raster_state = { - .depthClampEnable = false, - .rasterizerDiscardEnable = false, - .polygonMode = vk::PolygonMode::eFill, - .cullMode = vk::CullModeFlagBits::eBack, - .frontFace = vk::FrontFace::eClockwise, - .depthBiasEnable = false, - .lineWidth = 1.0f, - }; - - const vk::PipelineMultisampleStateCreateInfo multisampling = { - .rasterizationSamples = vk::SampleCountFlagBits::e1, - }; - - const std::array attachments{ - vk::PipelineColorBlendAttachmentState{ - .blendEnable = false, - .colorWriteMask = vk::ColorComponentFlagBits::eR | vk::ColorComponentFlagBits::eG | - vk::ColorComponentFlagBits::eB | vk::ColorComponentFlagBits::eA, - }, - }; - - const vk::PipelineColorBlendStateCreateInfo color_blending = { - .logicOpEnable = false, - .logicOp = vk::LogicOp::eCopy, - .attachmentCount = attachments.size(), - .pAttachments = attachments.data(), - .blendConstants = std::array{1.0f, 1.0f, 1.0f, 1.0f}, - }; - - const std::array dynamic_states = { - vk::DynamicState::eViewport, - vk::DynamicState::eScissor, - }; - - const vk::PipelineDynamicStateCreateInfo dynamic_info = { - .dynamicStateCount = static_cast(dynamic_states.size()), - .pDynamicStates = dynamic_states.data(), - }; - - const vk::GraphicsPipelineCreateInfo pipeline_info = { - .pNext = &pipeline_rendering_ci, - .stageCount = static_cast(shaders_ci.size()), - .pStages = shaders_ci.data(), - .pVertexInputState = &vertex_input_info, - .pInputAssemblyState = &input_assembly, - .pViewportState = &viewport_info, - .pRasterizationState = &raster_state, - .pMultisampleState = &multisampling, - .pColorBlendState = &color_blending, - .pDynamicState = &dynamic_info, - .layout = *pp_pipeline_layout, - }; - - auto result = instance.GetDevice().createGraphicsPipelineUnique( - /*pipeline_cache*/ {}, pipeline_info); - if (result.result == vk::Result::eSuccess) { - pp_pipeline = std::move(result.value); - } else { - UNREACHABLE_MSG("Post process pipeline creation failed!"); - } - - // Once pipeline is compiled, we don't need the shader module anymore - instance.GetDevice().destroyShaderModule(vs_module); - instance.GetDevice().destroyShaderModule(fs_module); - - // Create sampler resource - const vk::SamplerCreateInfo sampler_ci = { - .magFilter = vk::Filter::eLinear, - .minFilter = vk::Filter::eLinear, - .mipmapMode = vk::SamplerMipmapMode::eNearest, - .addressModeU = vk::SamplerAddressMode::eClampToEdge, - .addressModeV = vk::SamplerAddressMode::eClampToEdge, - }; - auto [sampler_result, smplr] = instance.GetDevice().createSamplerUnique(sampler_ci); - ASSERT_MSG(sampler_result == vk::Result::eSuccess, "Failed to create sampler: {}", - vk::to_string(sampler_result)); - pp_sampler = std::move(smplr); -} - Presenter::Presenter(Frontend::WindowSDL& window_, AmdGpu::Liverpool* liverpool_) : window{window_}, liverpool{liverpool_}, instance{window, Config::getGpuId(), Config::vkValidationEnabled(), - Config::vkCrashDiagnosticEnabled()}, + Config::getVkCrashDiagnosticEnabled()}, draw_scheduler{instance}, present_scheduler{instance}, flip_scheduler{instance}, swapchain{instance, window}, rasterizer{std::make_unique(instance, draw_scheduler, liverpool)}, @@ -314,19 +122,16 @@ Presenter::Presenter(Frontend::WindowSDL& window_, AmdGpu::Liverpool* liverpool_ present_frames.resize(num_images); for (u32 i = 0; i < num_images; i++) { Frame& frame = present_frames[i]; - auto [fence_result, fence] = - device.createFence({.flags = vk::FenceCreateFlagBits::eSignaled}); - ASSERT_MSG(fence_result == vk::Result::eSuccess, "Failed to create present done fence: {}", - vk::to_string(fence_result)); + frame.id = i; + auto fence = Check<"create present done fence">( + device.createFence({.flags = vk::FenceCreateFlagBits::eSignaled})); frame.present_done = fence; free_queue.push(&frame); } - CreatePostProcessPipeline(); + fsr_pass.Create(device, instance.GetAllocator(), num_images); + pp_pass.Create(device); - // Setup ImGui - ImGui::Core::Initialize(instance, window, num_images, - FormatToUnorm(swapchain.GetSurfaceFormat().format)); ImGui::Layer::AddLayer(Common::Singleton::Instance()); } @@ -344,6 +149,9 @@ Presenter::~Presenter() { void Presenter::RecreateFrame(Frame* frame, u32 width, u32 height) { const vk::Device device = instance.GetDevice(); + if (frame->imgui_texture) { + ImGui::Vulkan::RemoveTexture(frame->imgui_texture); + } if (frame->image_view) { device.destroyImageView(frame->image_view); } @@ -361,7 +169,7 @@ void Presenter::RecreateFrame(Frame* frame, u32 width, u32 height) { .arrayLayers = 1, .samples = vk::SampleCountFlagBits::e1, .usage = vk::ImageUsageFlagBits::eColorAttachment | vk::ImageUsageFlagBits::eTransferDst | - vk::ImageUsageFlagBits::eTransferSrc, + vk::ImageUsageFlagBits::eTransferSrc | vk::ImageUsageFlagBits::eSampled, }; const VmaAllocationCreateInfo alloc_info = { @@ -384,11 +192,12 @@ void Presenter::RecreateFrame(Frame* frame, u32 width, u32 height) { UNREACHABLE(); } frame->image = vk::Image{unsafe_image}; + SetObjectName(device, frame->image, "Frame image #{}", frame->id); const vk::ImageViewCreateInfo view_info = { .image = frame->image, .viewType = vk::ImageViewType::e2D, - .format = FormatToUnorm(format), + .format = format, .subresourceRange{ .aspectMask = vk::ImageAspectFlagBits::eColor, .baseMipLevel = 0, @@ -397,50 +206,39 @@ void Presenter::RecreateFrame(Frame* frame, u32 width, u32 height) { .layerCount = 1, }, }; - auto [view_result, view] = device.createImageView(view_info); - ASSERT_MSG(view_result == vk::Result::eSuccess, "Failed to create frame image view: {}", - vk::to_string(view_result)); + auto view = Check<"create frame image view">(device.createImageView(view_info)); frame->image_view = view; frame->width = width; frame->height = height; + + frame->imgui_texture = ImGui::Vulkan::AddTexture(view, vk::ImageLayout::eShaderReadOnlyOptimal); + frame->is_hdr = swapchain.GetHDR(); } -bool Presenter::ShowSplash(Frame* frame /*= nullptr*/) { - const auto* splash = Common::Singleton::Instance(); - if (splash->GetImageData().empty()) { - return false; +Frame* Presenter::PrepareLastFrame() { + if (last_submit_frame == nullptr) { + return nullptr; } - if (!Libraries::SystemService::IsSplashVisible()) { - return false; - } + Frame* frame = last_submit_frame; - draw_scheduler.EndRendering(); - const auto cmdbuf = draw_scheduler.CommandBuffer(); - - if (!frame) { - if (!splash_img.has_value()) { - VideoCore::ImageInfo info{}; - info.pixel_format = vk::Format::eR8G8B8A8Srgb; - info.type = vk::ImageType::e2D; - info.size = - VideoCore::Extent3D{splash->GetImageInfo().width, splash->GetImageInfo().height, 1}; - info.pitch = splash->GetImageInfo().width; - info.guest_address = VAddr(splash->GetImageData().data()); - info.guest_size_bytes = splash->GetImageData().size(); - info.mips_layout.emplace_back(splash->GetImageData().size(), - splash->GetImageInfo().width, - splash->GetImageInfo().height, 0); - splash_img.emplace(instance, present_scheduler, info); - texture_cache.RefreshImage(*splash_img); - - splash_img->Transit(vk::ImageLayout::eTransferSrcOptimal, - vk::AccessFlagBits2::eTransferRead, {}, cmdbuf); + while (true) { + vk::Result result = instance.GetDevice().waitForFences(frame->present_done, false, + std::numeric_limits::max()); + if (result == vk::Result::eSuccess) { + break; } - - frame = GetRenderFrame(); + if (result == vk::Result::eTimeout) { + continue; + } + ASSERT_MSG(result != vk::Result::eErrorDeviceLost, + "Device lost during waiting for a frame"); } + auto& scheduler = flip_scheduler; + scheduler.EndRendering(); + const auto cmdbuf = scheduler.CommandBuffer(); + const auto frame_subresources = vk::ImageSubresourceRange{ .aspectMask = vk::ImageAspectFlagBits::eColor, .baseMipLevel = 0, @@ -450,12 +248,12 @@ bool Presenter::ShowSplash(Frame* frame /*= nullptr*/) { }; const auto pre_barrier = - vk::ImageMemoryBarrier2{.srcStageMask = vk::PipelineStageFlagBits2::eTransfer, - .srcAccessMask = vk::AccessFlagBits2::eTransferRead, - .dstStageMask = vk::PipelineStageFlagBits2::eTransfer, - .dstAccessMask = vk::AccessFlagBits2::eTransferWrite, - .oldLayout = vk::ImageLayout::eUndefined, - .newLayout = vk::ImageLayout::eTransferDstOptimal, + vk::ImageMemoryBarrier2{.srcStageMask = vk::PipelineStageFlagBits2::eColorAttachmentOutput, + .srcAccessMask = vk::AccessFlagBits2::eColorAttachmentRead, + .dstStageMask = vk::PipelineStageFlagBits2::eColorAttachmentOutput, + .dstAccessMask = vk::AccessFlagBits2::eColorAttachmentWrite, + .oldLayout = vk::ImageLayout::eShaderReadOnlyOptimal, + .newLayout = vk::ImageLayout::eGeneral, .image = frame->image, .subresourceRange{frame_subresources}}; @@ -464,35 +262,12 @@ bool Presenter::ShowSplash(Frame* frame /*= nullptr*/) { .pImageMemoryBarriers = &pre_barrier, }); - cmdbuf.blitImage(splash_img->image, vk::ImageLayout::eTransferSrcOptimal, frame->image, - vk::ImageLayout::eTransferDstOptimal, - MakeImageBlitFit(splash->GetImageInfo().width, splash->GetImageInfo().height, - frame->width, frame->height), - vk::Filter::eLinear); - - const auto post_barrier = - vk::ImageMemoryBarrier2{.srcStageMask = vk::PipelineStageFlagBits2::eTransfer, - .srcAccessMask = vk::AccessFlagBits2::eTransferWrite, - .dstStageMask = vk::PipelineStageFlagBits2::eColorAttachmentOutput, - .dstAccessMask = vk::AccessFlagBits2::eColorAttachmentWrite, - .oldLayout = vk::ImageLayout::eTransferDstOptimal, - .newLayout = vk::ImageLayout::eGeneral, - .image = frame->image, - .subresourceRange{frame_subresources}}; - - cmdbuf.pipelineBarrier2(vk::DependencyInfo{ - .imageMemoryBarrierCount = 1, - .pImageMemoryBarriers = &post_barrier, - }); - // Flush frame creation commands. - frame->ready_semaphore = draw_scheduler.GetMasterSemaphore()->Handle(); - frame->ready_tick = draw_scheduler.CurrentTick(); + frame->ready_semaphore = scheduler.GetMasterSemaphore()->Handle(); + frame->ready_tick = scheduler.CurrentTick(); SubmitInfo info{}; - draw_scheduler.Flush(info); - - Present(frame); - return true; + scheduler.Flush(info); + return frame; } Frame* Presenter::PrepareFrameInternal(VideoCore::ImageId image_id, bool is_eop) { @@ -506,6 +281,14 @@ Frame* Presenter::PrepareFrameInternal(VideoCore::ImageId image_id, bool is_eop) scheduler.EndRendering(); const auto cmdbuf = scheduler.CommandBuffer(); + bool vk_host_markers_enabled = Config::getVkHostMarkersEnabled(); + if (vk_host_markers_enabled) { + const auto label = fmt::format("PrepareFrameInternal:{}", image_id.index); + cmdbuf.beginDebugUtilsLabelEXT(vk::DebugUtilsLabelEXT{ + .pLabelName = label.c_str(), + }); + } + const auto frame_subresources = vk::ImageSubresourceRange{ .aspectMask = vk::ImageAspectFlagBits::eColor, .baseMipLevel = 0, @@ -515,8 +298,8 @@ Frame* Presenter::PrepareFrameInternal(VideoCore::ImageId image_id, bool is_eop) }; const auto pre_barrier = - vk::ImageMemoryBarrier2{.srcStageMask = vk::PipelineStageFlagBits2::eTransfer, - .srcAccessMask = vk::AccessFlagBits2::eTransferRead, + vk::ImageMemoryBarrier2{.srcStageMask = vk::PipelineStageFlagBits2::eColorAttachmentOutput, + .srcAccessMask = vk::AccessFlagBits2::eColorAttachmentRead, .dstStageMask = vk::PipelineStageFlagBits2::eColorAttachmentOutput, .dstAccessMask = vk::AccessFlagBits2::eColorAttachmentWrite, .oldLayout = vk::ImageLayout::eUndefined, @@ -531,76 +314,72 @@ Frame* Presenter::PrepareFrameInternal(VideoCore::ImageId image_id, bool is_eop) if (image_id != VideoCore::NULL_IMAGE_ID) { auto& image = texture_cache.GetImage(image_id); + vk::Extent2D image_size = {image.info.size.width, image.info.size.height}; + float ratio = (float)image_size.width / (float)image_size.height; + if (ratio != expected_ratio) { + expected_ratio = ratio; + } + image.Transit(vk::ImageLayout::eShaderReadOnlyOptimal, vk::AccessFlagBits2::eShaderRead, {}, cmdbuf); - static vk::DescriptorImageInfo image_info{ - .sampler = *pp_sampler, - .imageLayout = vk::ImageLayout::eShaderReadOnlyOptimal, - }; - VideoCore::ImageViewInfo info{}; info.format = image.info.pixel_format; + // Exclude alpha from output frame to avoid blending with UI. + info.mapping = vk::ComponentMapping{ + .r = vk::ComponentSwizzle::eIdentity, + .g = vk::ComponentSwizzle::eIdentity, + .b = vk::ComponentSwizzle::eIdentity, + .a = vk::ComponentSwizzle::eOne, + }; + vk::ImageView imageView; if (auto view = image.FindView(info)) { - image_info.imageView = *texture_cache.GetImageView(view).image_view; + imageView = *texture_cache.GetImageView(view).image_view; } else { - image_info.imageView = *texture_cache.RegisterImageView(image_id, info).image_view; + imageView = *texture_cache.RegisterImageView(image_id, info).image_view; } - static const std::array set_writes{ - vk::WriteDescriptorSet{ - .dstSet = VK_NULL_HANDLE, - .dstBinding = 0, - .dstArrayElement = 0, - .descriptorCount = 1, - .descriptorType = vk::DescriptorType::eCombinedImageSampler, - .pImageInfo = &image_info, + if (vk_host_markers_enabled) { + cmdbuf.beginDebugUtilsLabelEXT(vk::DebugUtilsLabelEXT{ + .pLabelName = "Host/FSR", + }); + } + + imageView = fsr_pass.Render(cmdbuf, imageView, image_size, {frame->width, frame->height}, + fsr_settings, frame->is_hdr); + + if (vk_host_markers_enabled) { + cmdbuf.endDebugUtilsLabelEXT(); + cmdbuf.beginDebugUtilsLabelEXT(vk::DebugUtilsLabelEXT{ + .pLabelName = "Host/Post processing", + }); + } + pp_pass.Render(cmdbuf, imageView, image_size, *frame, pp_settings); + if (vk_host_markers_enabled) { + cmdbuf.endDebugUtilsLabelEXT(); + } + + DebugState.game_resolution = {image_size.width, image_size.height}; + DebugState.output_resolution = {frame->width, frame->height}; + } else { + // Fix display of garbage images on startup on some drivers + const std::array attachments = {{ + { + .imageView = frame->image_view, + .imageLayout = vk::ImageLayout::eColorAttachmentOptimal, + .loadOp = vk::AttachmentLoadOp::eClear, + .storeOp = vk::AttachmentStoreOp::eStore, }, - }; - - cmdbuf.bindPipeline(vk::PipelineBindPoint::eGraphics, *pp_pipeline); - - const auto& dst_rect = - FitImage(image.info.size.width, image.info.size.height, frame->width, frame->height); - - const std::array viewports = { - vk::Viewport{ - .x = 1.0f * dst_rect.offset.x, - .y = 1.0f * dst_rect.offset.y, - .width = 1.0f * dst_rect.extent.width, - .height = 1.0f * dst_rect.extent.height, - .minDepth = 0.0f, - .maxDepth = 1.0f, - }, - }; - - cmdbuf.setViewport(0, viewports); - cmdbuf.setScissor(0, {dst_rect}); - - cmdbuf.pushDescriptorSetKHR(vk::PipelineBindPoint::eGraphics, *pp_pipeline_layout, 0, - set_writes); - cmdbuf.pushConstants(*pp_pipeline_layout, vk::ShaderStageFlagBits::eFragment, 0, - sizeof(PostProcessSettings), &pp_settings); - - const std::array attachments = {vk::RenderingAttachmentInfo{ - .imageView = frame->image_view, - .imageLayout = vk::ImageLayout::eColorAttachmentOptimal, - .loadOp = vk::AttachmentLoadOp::eClear, - .storeOp = vk::AttachmentStoreOp::eStore, }}; - - vk::RenderingInfo rendering_info{ - .renderArea = - vk::Rect2D{ - .offset = {0, 0}, - .extent = {frame->width, frame->height}, - }, + const vk::RenderingInfo rendering_info{ + .renderArea{ + .extent{frame->width, frame->height}, + }, .layerCount = 1, .colorAttachmentCount = attachments.size(), .pColorAttachments = attachments.data(), }; cmdbuf.beginRendering(rendering_info); - cmdbuf.draw(3, 1, 0, 0); cmdbuf.endRendering(); } @@ -619,6 +398,10 @@ Frame* Presenter::PrepareFrameInternal(VideoCore::ImageId image_id, bool is_eop) .pImageMemoryBarriers = &post_barrier, }); + if (vk_host_markers_enabled) { + cmdbuf.endDebugUtilsLabelEXT(); + } + // Flush frame creation commands. frame->ready_semaphore = scheduler.GetMasterSemaphore()->Handle(); frame->ready_tick = scheduler.CurrentTick(); @@ -627,17 +410,19 @@ Frame* Presenter::PrepareFrameInternal(VideoCore::ImageId image_id, bool is_eop) return frame; } -void Presenter::Present(Frame* frame) { +void Presenter::Present(Frame* frame, bool is_reusing_frame) { // Free the frame for reuse const auto free_frame = [&] { - std::scoped_lock fl{free_mutex}; - free_queue.push(frame); - free_cv.notify_one(); + if (!is_reusing_frame) { + last_submit_frame = frame; + std::scoped_lock fl{free_mutex}; + free_queue.push(frame); + free_cv.notify_one(); + } }; // Recreate the swapchain if the window was resized. - if (window.GetWidth() != swapchain.GetExtent().width || - window.GetHeight() != swapchain.GetExtent().height) { + if (window.GetWidth() != swapchain.GetWidth() || window.GetHeight() != swapchain.GetHeight()) { swapchain.Recreate(window.GetWidth(), window.GetHeight()); } @@ -656,14 +441,19 @@ void Presenter::Present(Frame* frame) { // the frame's present fence and future GetRenderFrame() call will hang waiting for this frame. instance.GetDevice().resetFences(frame->present_done); - ImGui::Core::NewFrame(); + ImGuiID dockId = ImGui::Core::NewFrame(is_reusing_frame); const vk::Image swapchain_image = swapchain.Image(); + const vk::ImageView swapchain_image_view = swapchain.ImageView(); auto& scheduler = present_scheduler; const auto cmdbuf = scheduler.CommandBuffer(); - ImGui::Core::Render(cmdbuf, frame); + if (Config::getVkHostMarkersEnabled()) { + cmdbuf.beginDebugUtilsLabelEXT(vk::DebugUtilsLabelEXT{ + .pLabelName = "Present", + }); + } { auto* profiler_ctx = instance.GetProfilerContext(); @@ -674,9 +464,9 @@ void Presenter::Present(Frame* frame) { const std::array pre_barriers{ vk::ImageMemoryBarrier{ .srcAccessMask = vk::AccessFlagBits::eNone, - .dstAccessMask = vk::AccessFlagBits::eTransferWrite, + .dstAccessMask = vk::AccessFlagBits::eColorAttachmentWrite, .oldLayout = vk::ImageLayout::eUndefined, - .newLayout = vk::ImageLayout::eTransferDstOptimal, + .newLayout = vk::ImageLayout::eColorAttachmentOptimal, .srcQueueFamilyIndex = VK_QUEUE_FAMILY_IGNORED, .dstQueueFamilyIndex = VK_QUEUE_FAMILY_IGNORED, .image = swapchain_image, @@ -690,9 +480,9 @@ void Presenter::Present(Frame* frame) { }, vk::ImageMemoryBarrier{ .srcAccessMask = vk::AccessFlagBits::eColorAttachmentWrite, - .dstAccessMask = vk::AccessFlagBits::eTransferRead, + .dstAccessMask = vk::AccessFlagBits::eColorAttachmentRead, .oldLayout = vk::ImageLayout::eGeneral, - .newLayout = vk::ImageLayout::eTransferSrcOptimal, + .newLayout = vk::ImageLayout::eShaderReadOnlyOptimal, .srcQueueFamilyIndex = VK_QUEUE_FAMILY_IGNORED, .dstQueueFamilyIndex = VK_QUEUE_FAMILY_IGNORED, .image = frame->image, @@ -705,10 +495,11 @@ void Presenter::Present(Frame* frame) { }, }, }; + const vk::ImageMemoryBarrier post_barrier{ - .srcAccessMask = vk::AccessFlagBits::eTransferWrite, + .srcAccessMask = vk::AccessFlagBits::eColorAttachmentWrite, .dstAccessMask = vk::AccessFlagBits::eMemoryRead, - .oldLayout = vk::ImageLayout::eTransferDstOptimal, + .oldLayout = vk::ImageLayout::eColorAttachmentOptimal, .newLayout = vk::ImageLayout::ePresentSrcKHR, .srcQueueFamilyIndex = VK_QUEUE_FAMILY_IGNORED, .dstQueueFamilyIndex = VK_QUEUE_FAMILY_IGNORED, @@ -723,14 +514,59 @@ void Presenter::Present(Frame* frame) { }; cmdbuf.pipelineBarrier(vk::PipelineStageFlagBits::eColorAttachmentOutput, - vk::PipelineStageFlagBits::eTransfer, + vk::PipelineStageFlagBits::eColorAttachmentOutput, vk::DependencyFlagBits::eByRegion, {}, {}, pre_barriers); - cmdbuf.blitImage( - frame->image, vk::ImageLayout::eTransferSrcOptimal, swapchain_image, - vk::ImageLayout::eTransferDstOptimal, - MakeImageBlitStretch(frame->width, frame->height, extent.width, extent.height), - vk::Filter::eLinear); + { // Draw the game + ImGui::PushStyleVar(ImGuiStyleVar_WindowPadding, ImVec2{0.0f}); + ImGui::PushStyleVar(ImGuiStyleVar_WindowRounding, 0.0f); + ImGui::PushStyleVar(ImGuiStyleVar_WindowBorderSize, 0.0f); + ImGui::PushStyleColor(ImGuiCol_WindowBg, ImVec4(0.0f, 0.0f, 0.0f, 1.0f)); + ImGui::SetNextWindowDockID(dockId, ImGuiCond_Once); + ImGui::Begin("Display##game_display", nullptr, ImGuiWindowFlags_NoNav); + + auto game_texture = frame->imgui_texture; + auto game_width = frame->width; + auto game_height = frame->height; + + if (Libraries::SystemService::IsSplashVisible()) { // draw splash + if (!splash_img.has_value()) { + splash_img.emplace(); + auto splash_path = Common::ElfInfo::Instance().GetSplashPath(); + if (!splash_path.empty()) { + splash_img = ImGui::RefCountedTexture::DecodePngFile(splash_path); + } + } + if (auto& splash_image = this->splash_img.value()) { + auto [im_id, width, height] = splash_image.GetTexture(); + game_texture = im_id; + game_width = width; + game_height = height; + } + } + + ImVec2 contentArea = ImGui::GetContentRegionAvail(); + SetExpectedGameSize((s32)contentArea.x, (s32)contentArea.y); + + const auto imgRect = + FitImage(game_width, game_height, (s32)contentArea.x, (s32)contentArea.y); + ImVec2 offset{ + static_cast(imgRect.offset.x), + static_cast(imgRect.offset.y), + }; + ImVec2 size{ + static_cast(imgRect.extent.width), + static_cast(imgRect.extent.height), + }; + + ImGui::SetCursorPos(ImGui::GetCursorStartPos() + offset); + ImGui::Image(game_texture, size); + + ImGui::End(); + ImGui::PopStyleVar(3); + ImGui::PopStyleColor(); + } + ImGui::Core::Render(cmdbuf, swapchain_image_view, swapchain.GetExtent()); cmdbuf.pipelineBarrier(vk::PipelineStageFlagBits::eAllCommands, vk::PipelineStageFlagBits::eAllCommands, @@ -741,6 +577,10 @@ void Presenter::Present(Frame* frame) { } } + if (Config::getVkHostMarkersEnabled()) { + cmdbuf.endDebugUtilsLabelEXT(); + } + // Flush vulkan commands. SubmitInfo info{}; info.AddWait(swapchain.GetImageAcquiredSemaphore()); @@ -756,7 +596,9 @@ void Presenter::Present(Frame* frame) { } free_frame(); - DebugState.IncFlipFrameNum(); + if (!is_reusing_frame) { + DebugState.IncFlipFrameNum(); + } } Frame* Presenter::GetRenderFrame() { @@ -790,12 +632,24 @@ Frame* Presenter::GetRenderFrame() { } } - // If the window dimensions changed, recreate this frame - if (frame->width != window.GetWidth() || frame->height != window.GetHeight()) { - RecreateFrame(frame, window.GetWidth(), window.GetHeight()); + if (frame->width != expected_frame_width || frame->height != expected_frame_height || + frame->is_hdr != swapchain.GetHDR()) { + RecreateFrame(frame, expected_frame_width, expected_frame_height); } return frame; } +void Presenter::SetExpectedGameSize(s32 width, s32 height) { + const float ratio = (float)width / (float)height; + + expected_frame_height = height; + expected_frame_width = width; + if (ratio > expected_ratio) { + expected_frame_width = static_cast(height * expected_ratio); + } else { + expected_frame_height = static_cast(width / expected_ratio); + } +} + } // namespace Vulkan diff --git a/src/video_core/renderer_vulkan/vk_presenter.h b/src/video_core/renderer_vulkan/vk_presenter.h index 4c29af0f0..ad2708474 100644 --- a/src/video_core/renderer_vulkan/vk_presenter.h +++ b/src/video_core/renderer_vulkan/vk_presenter.h @@ -5,7 +5,11 @@ #include +#include "imgui/imgui_config.h" +#include "imgui/imgui_texture.h" #include "video_core/amdgpu/liverpool.h" +#include "video_core/renderer_vulkan/host_passes/fsr_pass.h" +#include "video_core/renderer_vulkan/host_passes/pp_pass.h" #include "video_core/renderer_vulkan/vk_instance.h" #include "video_core/renderer_vulkan/vk_scheduler.h" #include "video_core/renderer_vulkan/vk_swapchain.h" @@ -30,6 +34,10 @@ struct Frame { vk::Fence present_done; vk::Semaphore ready_semaphore; u64 ready_tick; + bool is_hdr{false}; + u8 id{}; + + ImTextureID imgui_texture; }; enum SchedulerType { @@ -41,16 +49,16 @@ enum SchedulerType { class Rasterizer; class Presenter { - struct PostProcessSettings { - float gamma = 1.0f; - }; - public: Presenter(Frontend::WindowSDL& window, AmdGpu::Liverpool* liverpool); ~Presenter(); - float& GetGammaRef() { - return pp_settings.gamma; + HostPasses::PostProcessingPass::Settings& GetPPSettingsRef() { + return pp_settings; + } + + HostPasses::FsrPass::Settings& GetFsrSettingsRef() { + return fsr_settings; } Frontend::WindowSDL& GetWindow() const { @@ -85,9 +93,9 @@ public: }) != vo_buffers_addr.cend(); } - bool ShowSplash(Frame* frame = nullptr); - void Present(Frame* frame); + void Present(Frame* frame, bool is_reusing_frame = false); void RecreateFrame(Frame* frame, u32 width, u32 height); + Frame* PrepareLastFrame(); void FlushDraw() { SubmitInfo info{}; @@ -98,17 +106,33 @@ public: return *rasterizer.get(); } + bool IsHDRSupported() const { + return swapchain.HasHDR(); + } + + void SetHDR(bool enable) { + if (!IsHDRSupported()) { + return; + } + swapchain.SetHDR(enable); + pp_settings.hdr = enable ? 1 : 0; + } + private: - void CreatePostProcessPipeline(); Frame* PrepareFrameInternal(VideoCore::ImageId image_id, bool is_eop = true); Frame* GetRenderFrame(); + void SetExpectedGameSize(s32 width, s32 height); + private: - PostProcessSettings pp_settings{}; - vk::UniquePipeline pp_pipeline{}; - vk::UniquePipelineLayout pp_pipeline_layout{}; - vk::UniqueDescriptorSetLayout pp_desc_set_layout{}; - vk::UniqueSampler pp_sampler{}; + float expected_ratio{1920.0 / 1080.0f}; + u32 expected_frame_width{1920}; + u32 expected_frame_height{1080}; + + HostPasses::FsrPass fsr_pass; + HostPasses::FsrPass::Settings fsr_settings{}; + HostPasses::PostProcessingPass::Settings pp_settings{}; + HostPasses::PostProcessingPass pp_pass; Frontend::WindowSDL& window; AmdGpu::Liverpool* liverpool; Instance instance; @@ -121,10 +145,11 @@ private: vk::UniqueCommandPool command_pool; std::vector present_frames; std::queue free_queue; + Frame* last_submit_frame; std::mutex free_mutex; std::condition_variable free_cv; std::condition_variable_any frame_cv; - std::optional splash_img; + std::optional splash_img; std::vector vo_buffers_addr; }; diff --git a/src/video_core/renderer_vulkan/vk_rasterizer.cpp b/src/video_core/renderer_vulkan/vk_rasterizer.cpp index 6e628239b..87d07a967 100644 --- a/src/video_core/renderer_vulkan/vk_rasterizer.cpp +++ b/src/video_core/renderer_vulkan/vk_rasterizer.cpp @@ -19,6 +19,20 @@ namespace Vulkan { +static Shader::PushData MakeUserData(const AmdGpu::Liverpool::Regs& regs) { + Shader::PushData push_data{}; + push_data.step0 = regs.vgt_instance_step_rate_0; + push_data.step1 = regs.vgt_instance_step_rate_1; + + // TODO(roamic): Add support for multiple viewports and geometry shaders when ViewportIndex + // is encountered and implemented in the recompiler. + push_data.xoffset = regs.viewport_control.xoffset_enable ? regs.viewports[0].xoffset : 0.f; + push_data.xscale = regs.viewport_control.xscale_enable ? regs.viewports[0].xscale : 1.f; + push_data.yoffset = regs.viewport_control.yoffset_enable ? regs.viewports[0].yoffset : 0.f; + push_data.yscale = regs.viewport_control.yscale_enable ? regs.viewports[0].yscale : 1.f; + return push_data; +} + Rasterizer::Rasterizer(const Instance& instance_, Scheduler& scheduler_, AmdGpu::Liverpool* liverpool_) : instance{instance_}, scheduler{scheduler_}, page_manager{this}, @@ -58,6 +72,7 @@ bool Rasterizer::FilterDraw() { if (regs.color_control.mode == Liverpool::ColorControl::OperationMode::FmaskDecompress) { // TODO: check for a valid MRT1 to promote the draw to the resolve pass. LOG_TRACE(Render_Vulkan, "FMask decompression pass skipped"); + ScopedMarkerInsert("FmaskDecompress"); return false; } if (regs.color_control.mode == Liverpool::ColorControl::OperationMode::Resolve) { @@ -67,6 +82,27 @@ bool Rasterizer::FilterDraw() { } if (regs.primitive_type == AmdGpu::PrimitiveType::None) { LOG_TRACE(Render_Vulkan, "Primitive type 'None' skipped"); + ScopedMarkerInsert("PrimitiveTypeNone"); + return false; + } + + const bool cb_disabled = + regs.color_control.mode == AmdGpu::Liverpool::ColorControl::OperationMode::Disable; + const auto depth_copy = + regs.depth_render_override.force_z_dirty && regs.depth_render_override.force_z_valid && + regs.depth_buffer.DepthValid() && regs.depth_buffer.DepthWriteValid() && + regs.depth_buffer.DepthAddress() != regs.depth_buffer.DepthWriteAddress(); + const auto stencil_copy = + regs.depth_render_override.force_stencil_dirty && + regs.depth_render_override.force_stencil_valid && regs.depth_buffer.StencilValid() && + regs.depth_buffer.StencilWriteValid() && + regs.depth_buffer.StencilAddress() != regs.depth_buffer.StencilWriteAddress(); + if (cb_disabled && (depth_copy || stencil_copy)) { + // Games may disable color buffer and enable force depth/stencil dirty and valid to + // do a copy from one depth-stencil surface to another, without a pixel shader. + // We need to detect this case and perform the copy, otherwise it will have no effect. + LOG_TRACE(Render_Vulkan, "Performing depth-stencil override copy"); + DepthStencilCopy(depth_copy, stencil_copy); return false; } @@ -153,7 +189,7 @@ RenderState Rasterizer::PrepareRenderState(u32 mrt_mask) { const bool is_depth_clear = regs.depth_render_control.depth_clear_enable || texture_cache.IsMetaCleared(htile_address, slice); const bool is_stencil_clear = regs.depth_render_control.stencil_clear_enable; - ASSERT(desc.view_info.range.extent.layers == 1); + ASSERT(desc.view_info.range.extent.levels == 1); state.width = std::min(state.width, image.info.size.width); state.height = std::min(state.height, image.info.size.height); @@ -224,10 +260,13 @@ void Rasterizer::EliminateFastClear() { .layerCount = col_buf.view.slice_max - col_buf.view.slice_start + 1, }; scheduler.EndRendering(); + ScopeMarkerBegin(fmt::format("EliminateFastClear:MRT={:#x}:M={:#x}", col_buf.Address(), + col_buf.CmaskAddress())); image.Transit(vk::ImageLayout::eTransferDstOptimal, vk::AccessFlagBits2::eTransferWrite, {}); scheduler.CommandBuffer().clearColorImage(image.image, image.last_state.layout, LiverpoolToVK::ColorBufferClearValue(col_buf).color, range); + ScopeMarkerEnd(); } void Rasterizer::Draw(bool is_indexed, u32 index_offset) { @@ -248,9 +287,7 @@ void Rasterizer::Draw(bool is_indexed, u32 index_offset) { return; } - const auto& vs_info = pipeline->GetStage(Shader::LogicalStage::Vertex); - const auto& fetch_shader = pipeline->GetFetchShader(); - buffer_cache.BindVertexBuffers(vs_info, fetch_shader); + buffer_cache.BindVertexBuffers(*pipeline); if (is_indexed) { buffer_cache.BindIndexBuffer(index_offset); } @@ -258,6 +295,8 @@ void Rasterizer::Draw(bool is_indexed, u32 index_offset) { BeginRendering(*pipeline, state); UpdateDynamicState(*pipeline); + const auto& vs_info = pipeline->GetStage(Shader::LogicalStage::Vertex); + const auto& fetch_shader = pipeline->GetFetchShader(); const auto [vertex_offset, instance_offset] = GetDrawOffsets(regs, vs_info, fetch_shader); const auto cmdbuf = scheduler.CommandBuffer(); @@ -292,9 +331,7 @@ void Rasterizer::DrawIndirect(bool is_indexed, VAddr arg_address, u32 offset, u3 return; } - const auto& vs_info = pipeline->GetStage(Shader::LogicalStage::Vertex); - const auto& fetch_shader = pipeline->GetFetchShader(); - buffer_cache.BindVertexBuffers(vs_info, fetch_shader); + buffer_cache.BindVertexBuffers(*pipeline); if (is_indexed) { buffer_cache.BindIndexBuffer(0); } @@ -403,148 +440,100 @@ void Rasterizer::Finish() { } bool Rasterizer::BindResources(const Pipeline* pipeline) { - buffer_infos.clear(); - buffer_views.clear(); - image_infos.clear(); - - const auto& regs = liverpool->regs; - - if (pipeline->IsCompute()) { - const auto& info = pipeline->GetStage(Shader::LogicalStage::Compute); - - // Most of the time when a metadata is updated with a shader it gets cleared. It means - // we can skip the whole dispatch and update the tracked state instead. Also, it is not - // intended to be consumed and in such rare cases (e.g. HTile introspection, CRAA) we - // will need its full emulation anyways. For cases of metadata read a warning will be - // logged. - const auto IsMetaUpdate = [&](const auto& desc) { - const auto sharp = desc.GetSharp(info); - const VAddr address = sharp.base_address; - if (desc.is_written) { - // Assume all slices were updates - if (texture_cache.ClearMeta(address)) { - LOG_TRACE(Render_Vulkan, "Metadata update skipped"); - return true; - } - } else { - if (texture_cache.IsMeta(address)) { - LOG_WARNING(Render_Vulkan, "Unexpected metadata read by a CS shader (buffer)"); - } - } - return false; - }; - - // Assume if a shader reads and writes metas at the same time, it is a copy shader. - bool meta_read = false; - for (const auto& desc : info.buffers) { - if (desc.is_gds_buffer) { - continue; - } - if (!desc.is_written) { - const VAddr address = desc.GetSharp(info).base_address; - meta_read = texture_cache.IsMeta(address); - } - } - - for (const auto& desc : info.texture_buffers) { - if (!desc.is_written) { - const VAddr address = desc.GetSharp(info).base_address; - meta_read = texture_cache.IsMeta(address); - } - } - - if (!meta_read) { - for (const auto& desc : info.buffers) { - if (IsMetaUpdate(desc)) { - return false; - } - } - - for (const auto& desc : info.texture_buffers) { - if (IsMetaUpdate(desc)) { - return false; - } - } - } + if (IsComputeMetaClear(pipeline)) { + return false; } set_writes.clear(); buffer_barriers.clear(); + buffer_infos.clear(); + image_infos.clear(); // Bind resource buffers and textures. - Shader::PushData push_data{}; Shader::Backend::Bindings binding{}; - + Shader::PushData push_data = MakeUserData(liverpool->regs); for (const auto* stage : pipeline->GetStages()) { if (!stage) { continue; } - push_data.step0 = regs.vgt_instance_step_rate_0; - push_data.step1 = regs.vgt_instance_step_rate_1; stage->PushUd(binding, push_data); - - BindBuffers(*stage, binding, push_data, set_writes, buffer_barriers); - BindTextures(*stage, binding, set_writes); + BindBuffers(*stage, binding, push_data); + BindTextures(*stage, binding); } pipeline->BindResources(set_writes, buffer_barriers, push_data); - return true; } +bool Rasterizer::IsComputeMetaClear(const Pipeline* pipeline) { + if (!pipeline->IsCompute()) { + return false; + } + + const auto& info = pipeline->GetStage(Shader::LogicalStage::Compute); + + // Assume if a shader reads and writes metas at the same time, it is a copy shader. + for (const auto& desc : info.buffers) { + const VAddr address = desc.GetSharp(info).base_address; + if (!desc.IsSpecial() && !desc.is_written && texture_cache.IsMeta(address)) { + return false; + } + } + + // Most of the time when a metadata is updated with a shader it gets cleared. It means + // we can skip the whole dispatch and update the tracked state instead. Also, it is not + // intended to be consumed and in such rare cases (e.g. HTile introspection, CRAA) we + // will need its full emulation anyways. + for (const auto& desc : info.buffers) { + const VAddr address = desc.GetSharp(info).base_address; + if (!desc.IsSpecial() && desc.is_written && texture_cache.ClearMeta(address)) { + // Assume all slices were updates + LOG_TRACE(Render_Vulkan, "Metadata update skipped"); + return true; + } + } + return false; +} + void Rasterizer::BindBuffers(const Shader::Info& stage, Shader::Backend::Bindings& binding, - Shader::PushData& push_data, Pipeline::DescriptorWrites& set_writes, - Pipeline::BufferBarriers& buffer_barriers) { + Shader::PushData& push_data) { buffer_bindings.clear(); for (const auto& desc : stage.buffers) { const auto vsharp = desc.GetSharp(stage); - if (!desc.is_gds_buffer && vsharp.base_address != 0 && vsharp.GetSize() > 0) { - const auto buffer_id = buffer_cache.FindBuffer(vsharp.base_address, vsharp.GetSize()); - buffer_bindings.emplace_back(buffer_id, vsharp); + if (!desc.IsSpecial() && vsharp.base_address != 0 && vsharp.GetSize() > 0) { + const u64 size = memory->ClampRangeSize(vsharp.base_address, vsharp.GetSize()); + const auto buffer_id = buffer_cache.FindBuffer(vsharp.base_address, size); + buffer_bindings.emplace_back(buffer_id, vsharp, size); } else { - buffer_bindings.emplace_back(VideoCore::BufferId{}, vsharp); + buffer_bindings.emplace_back(VideoCore::BufferId{}, vsharp, 0); } } - texbuffer_bindings.clear(); - - for (const auto& desc : stage.texture_buffers) { - const auto vsharp = desc.GetSharp(stage); - if (vsharp.base_address != 0 && vsharp.GetSize() > 0 && - vsharp.GetDataFmt() != AmdGpu::DataFormat::FormatInvalid) { - const auto buffer_id = buffer_cache.FindBuffer(vsharp.base_address, vsharp.GetSize()); - texbuffer_bindings.emplace_back(buffer_id, vsharp); - } else { - texbuffer_bindings.emplace_back(VideoCore::BufferId{}, vsharp); - } - } - - // Bind the flattened user data buffer as a UBO so it's accessible to the shader - if (stage.has_readconst) { - const auto [vk_buffer, offset] = buffer_cache.ObtainHostUBO(stage.flattened_ud_buf); - buffer_infos.emplace_back(vk_buffer->Handle(), offset, - stage.flattened_ud_buf.size() * sizeof(u32)); - set_writes.push_back({ - .dstSet = VK_NULL_HANDLE, - .dstBinding = binding.unified++, - .dstArrayElement = 0, - .descriptorCount = 1, - .descriptorType = vk::DescriptorType::eUniformBuffer, - .pBufferInfo = &buffer_infos.back(), - }); - ++binding.buffer; - } - // Second pass to re-bind buffers that were updated after binding for (u32 i = 0; i < buffer_bindings.size(); i++) { - const auto& [buffer_id, vsharp] = buffer_bindings[i]; + const auto& [buffer_id, vsharp, size] = buffer_bindings[i]; const auto& desc = stage.buffers[i]; - const bool is_storage = desc.IsStorage(vsharp); + const bool is_storage = desc.IsStorage(vsharp, pipeline_cache.GetProfile()); + // Buffer is not from the cache, either a special buffer or unbound. if (!buffer_id) { - if (desc.is_gds_buffer) { + if (desc.buffer_type == Shader::BufferType::GdsBuffer) { const auto* gds_buf = buffer_cache.GetGdsBuffer(); buffer_infos.emplace_back(gds_buf->Handle(), 0, gds_buf->SizeBytes()); + } else if (desc.buffer_type == Shader::BufferType::ReadConstUbo) { + auto& vk_buffer = buffer_cache.GetStreamBuffer(); + const u32 ubo_size = stage.flattened_ud_buf.size() * sizeof(u32); + const u64 offset = vk_buffer.Copy(stage.flattened_ud_buf.data(), ubo_size, + instance.UniformMinAlignment()); + buffer_infos.emplace_back(vk_buffer.Handle(), offset, ubo_size); + } else if (desc.buffer_type == Shader::BufferType::SharedMemory) { + auto& lds_buffer = buffer_cache.GetStreamBuffer(); + const auto& cs_program = liverpool->GetCsRegs(); + const auto lds_size = cs_program.SharedMemSize() * cs_program.NumWorkgroups(); + const auto [data, offset] = + lds_buffer.Map(lds_size, instance.StorageMinAlignment()); + std::memset(data, 0, lds_size); + buffer_infos.emplace_back(lds_buffer.Handle(), offset, lds_size); } else if (instance.IsNullDescriptorSupported()) { buffer_infos.emplace_back(VK_NULL_HANDLE, 0, VK_WHOLE_SIZE); } else { @@ -553,21 +542,23 @@ void Rasterizer::BindBuffers(const Shader::Info& stage, Shader::Backend::Binding } } else { const auto [vk_buffer, offset] = buffer_cache.ObtainBuffer( - vsharp.base_address, vsharp.GetSize(), desc.is_written, false, buffer_id); + vsharp.base_address, size, desc.is_written, desc.is_formatted, buffer_id); const u32 alignment = is_storage ? instance.StorageMinAlignment() : instance.UniformMinAlignment(); const u32 offset_aligned = Common::AlignDown(offset, alignment); const u32 adjust = offset - offset_aligned; ASSERT(adjust % 4 == 0); push_data.AddOffset(binding.buffer, adjust); - buffer_infos.emplace_back(vk_buffer->Handle(), offset_aligned, - vsharp.GetSize() + adjust); + buffer_infos.emplace_back(vk_buffer->Handle(), offset_aligned, size + adjust); if (auto barrier = vk_buffer->GetBarrier(desc.is_written ? vk::AccessFlagBits2::eShaderWrite : vk::AccessFlagBits2::eShaderRead, vk::PipelineStageFlagBits2::eAllCommands)) { buffer_barriers.emplace_back(*barrier); } + if (desc.is_written && desc.is_formatted) { + texture_cache.InvalidateMemoryFromGPU(vsharp.base_address, size); + } } set_writes.push_back({ @@ -581,54 +572,9 @@ void Rasterizer::BindBuffers(const Shader::Info& stage, Shader::Backend::Binding }); ++binding.buffer; } - - const auto null_buffer_view = - instance.IsNullDescriptorSupported() ? VK_NULL_HANDLE : buffer_cache.NullBufferView(); - for (u32 i = 0; i < texbuffer_bindings.size(); i++) { - const auto& [buffer_id, vsharp] = texbuffer_bindings[i]; - const auto& desc = stage.texture_buffers[i]; - vk::BufferView& buffer_view = buffer_views.emplace_back(null_buffer_view); - if (buffer_id) { - const u32 alignment = instance.TexelBufferMinAlignment(); - const auto [vk_buffer, offset] = buffer_cache.ObtainBuffer( - vsharp.base_address, vsharp.GetSize(), desc.is_written, true, buffer_id); - const u32 fmt_stride = AmdGpu::NumBits(vsharp.GetDataFmt()) >> 3; - const u32 buf_stride = vsharp.GetStride(); - ASSERT_MSG(buf_stride % fmt_stride == 0, - "Texel buffer stride must match format stride"); - const u32 offset_aligned = Common::AlignDown(offset, alignment); - const u32 adjust = offset - offset_aligned; - ASSERT(adjust % fmt_stride == 0); - push_data.AddTexelOffset(binding.buffer, buf_stride / fmt_stride, adjust / fmt_stride); - buffer_view = - vk_buffer->View(offset_aligned, vsharp.GetSize() + adjust, desc.is_written, - vsharp.GetDataFmt(), vsharp.GetNumberFmt()); - if (auto barrier = - vk_buffer->GetBarrier(desc.is_written ? vk::AccessFlagBits2::eShaderWrite - : vk::AccessFlagBits2::eShaderRead, - vk::PipelineStageFlagBits2::eAllCommands)) { - buffer_barriers.emplace_back(*barrier); - } - if (desc.is_written) { - texture_cache.InvalidateMemoryFromGPU(vsharp.base_address, vsharp.GetSize()); - } - } - - set_writes.push_back({ - .dstSet = VK_NULL_HANDLE, - .dstBinding = binding.unified++, - .dstArrayElement = 0, - .descriptorCount = 1, - .descriptorType = desc.is_written ? vk::DescriptorType::eStorageTexelBuffer - : vk::DescriptorType::eUniformTexelBuffer, - .pTexelBufferView = &buffer_view, - }); - ++binding.buffer; - } } -void Rasterizer::BindTextures(const Shader::Info& stage, Shader::Backend::Bindings& binding, - Pipeline::DescriptorWrites& set_writes) { +void Rasterizer::BindTextures(const Shader::Info& stage, Shader::Backend::Bindings& binding) { image_bindings.clear(); for (const auto& image_desc : stage.images) { @@ -655,7 +601,7 @@ void Rasterizer::BindTextures(const Shader::Info& stage, Shader::Backend::Bindin if (image->binding.is_bound) { // The image is already bound. In case if it is about to be used as storage we need // to force general layout on it. - image->binding.force_general |= image_desc.IsStorage(tsharp); + image->binding.force_general |= image_desc.is_written; } if (image->binding.is_target) { // The image is already bound as target. Since we read and output to it need to force @@ -762,8 +708,6 @@ void Rasterizer::BeginRendering(const GraphicsPipeline& pipeline, RenderState& s const auto mip = view.info.range.base.level; state.width = std::min(state.width, std::max(image.info.size.width >> mip, 1u)); state.height = std::min(state.height, std::max(image.info.size.height >> mip, 1u)); - ASSERT(old_img.info.size.width == state.width); - ASSERT(old_img.info.size.height == state.height); } auto& image = texture_cache.GetImage(image_id); if (image.binding.force_general) { @@ -818,8 +762,6 @@ void Rasterizer::BeginRendering(const GraphicsPipeline& pipeline, RenderState& s } void Rasterizer::Resolve() { - const auto cmdbuf = scheduler.CommandBuffer(); - // Read from MRT0, average all samples, and write to MRT1, which is one-sample const auto& mrt0_hint = liverpool->last_cb_extent[0]; const auto& mrt1_hint = liverpool->last_cb_extent[1]; @@ -839,9 +781,12 @@ void Rasterizer::Resolve() { mrt1_range.base.layer = liverpool->regs.color_buffers[1].view.slice_start; mrt1_range.extent.layers = liverpool->regs.color_buffers[1].NumSlices() - mrt1_range.base.layer; + ScopeMarkerBegin(fmt::format("Resolve:MRT0={:#x}:MRT1={:#x}", + liverpool->regs.color_buffers[0].Address(), + liverpool->regs.color_buffers[1].Address())); + mrt0_image.Transit(vk::ImageLayout::eTransferSrcOptimal, vk::AccessFlagBits2::eTransferRead, mrt0_range); - mrt1_image.Transit(vk::ImageLayout::eTransferDstOptimal, vk::AccessFlagBits2::eTransferWrite, mrt1_range); @@ -868,8 +813,9 @@ void Rasterizer::Resolve() { .dstOffset = {0, 0, 0}, .extent = {mrt1_image.info.size.width, mrt1_image.info.size.height, 1}, }; - cmdbuf.copyImage(mrt0_image.image, vk::ImageLayout::eTransferSrcOptimal, mrt1_image.image, - vk::ImageLayout::eTransferDstOptimal, region); + scheduler.CommandBuffer().copyImage(mrt0_image.image, vk::ImageLayout::eTransferSrcOptimal, + mrt1_image.image, vk::ImageLayout::eTransferDstOptimal, + region); } else { vk::ImageResolve region = { .srcSubresource = @@ -890,9 +836,72 @@ void Rasterizer::Resolve() { .dstOffset = {0, 0, 0}, .extent = {mrt1_image.info.size.width, mrt1_image.info.size.height, 1}, }; - cmdbuf.resolveImage(mrt0_image.image, vk::ImageLayout::eTransferSrcOptimal, - mrt1_image.image, vk::ImageLayout::eTransferDstOptimal, region); + scheduler.CommandBuffer().resolveImage( + mrt0_image.image, vk::ImageLayout::eTransferSrcOptimal, mrt1_image.image, + vk::ImageLayout::eTransferDstOptimal, region); } + + ScopeMarkerEnd(); +} + +void Rasterizer::DepthStencilCopy(bool is_depth, bool is_stencil) { + auto& regs = liverpool->regs; + + auto read_desc = VideoCore::TextureCache::DepthTargetDesc( + regs.depth_buffer, regs.depth_view, regs.depth_control, + regs.depth_htile_data_base.GetAddress(), liverpool->last_db_extent, false); + auto write_desc = VideoCore::TextureCache::DepthTargetDesc( + regs.depth_buffer, regs.depth_view, regs.depth_control, + regs.depth_htile_data_base.GetAddress(), liverpool->last_db_extent, true); + + auto& read_image = texture_cache.GetImage(texture_cache.FindImage(read_desc)); + auto& write_image = texture_cache.GetImage(texture_cache.FindImage(write_desc)); + + VideoCore::SubresourceRange sub_range; + sub_range.base.layer = liverpool->regs.depth_view.slice_start; + sub_range.extent.layers = liverpool->regs.depth_view.NumSlices() - sub_range.base.layer; + + ScopeMarkerBegin(fmt::format( + "DepthStencilCopy:DR={:#x}:SR={:#x}:DW={:#x}:SW={:#x}", regs.depth_buffer.DepthAddress(), + regs.depth_buffer.StencilAddress(), regs.depth_buffer.DepthWriteAddress(), + regs.depth_buffer.StencilWriteAddress())); + + read_image.Transit(vk::ImageLayout::eTransferSrcOptimal, vk::AccessFlagBits2::eTransferRead, + sub_range); + write_image.Transit(vk::ImageLayout::eTransferDstOptimal, vk::AccessFlagBits2::eTransferWrite, + sub_range); + + auto aspect_mask = vk::ImageAspectFlags(0); + if (is_depth) { + aspect_mask |= vk::ImageAspectFlagBits::eDepth; + } + if (is_stencil) { + aspect_mask |= vk::ImageAspectFlagBits::eStencil; + } + vk::ImageCopy region = { + .srcSubresource = + { + .aspectMask = aspect_mask, + .mipLevel = 0, + .baseArrayLayer = sub_range.base.layer, + .layerCount = sub_range.extent.layers, + }, + .srcOffset = {0, 0, 0}, + .dstSubresource = + { + .aspectMask = aspect_mask, + .mipLevel = 0, + .baseArrayLayer = sub_range.base.layer, + .layerCount = sub_range.extent.layers, + }, + .dstOffset = {0, 0, 0}, + .extent = {write_image.info.size.width, write_image.info.size.height, 1}, + }; + scheduler.CommandBuffer().copyImage(read_image.image, vk::ImageLayout::eTransferSrcOptimal, + write_image.image, vk::ImageLayout::eTransferDstOptimal, + region); + + ScopeMarkerEnd(); } void Rasterizer::InlineData(VAddr address, const void* value, u32 num_bytes, bool is_gds) { @@ -938,20 +947,14 @@ void Rasterizer::UnmapMemory(VAddr addr, u64 size) { } void Rasterizer::UpdateDynamicState(const GraphicsPipeline& pipeline) { - UpdateViewportScissorState(); + UpdateViewportScissorState(pipeline); auto& regs = liverpool->regs; const auto cmdbuf = scheduler.CommandBuffer(); cmdbuf.setBlendConstants(®s.blend_constants.red); - if (instance.IsColorWriteEnableSupported()) { - const auto& write_masks = pipeline.GetWriteMasks(); - std::array write_ens{}; - std::transform(write_masks.cbegin(), write_masks.cend(), write_ens.begin(), - [](auto in) { return in ? vk::True : vk::False; }); - - cmdbuf.setColorWriteEnableEXT(write_ens); - cmdbuf.setColorWriteMaskEXT(0, write_masks); + if (instance.IsDynamicColorWriteMaskSupported()) { + cmdbuf.setColorWriteMaskEXT(0, pipeline.GetWriteMasks()); } if (regs.depth_control.depth_bounds_enable) { cmdbuf.setDepthBounds(regs.depth_bounds_min, regs.depth_bounds_max); @@ -1018,7 +1021,7 @@ void Rasterizer::UpdateDynamicState(const GraphicsPipeline& pipeline) { } } -void Rasterizer::UpdateViewportScissorState() { +void Rasterizer::UpdateViewportScissorState(const GraphicsPipeline& pipeline) { const auto& regs = liverpool->regs; const auto combined_scissor_value_tl = [](s16 scr, s16 win, s16 gen, s16 win_offset) { @@ -1052,10 +1055,13 @@ void Rasterizer::UpdateViewportScissorState() { const auto& vp_ctl = regs.viewport_control; const float reduce_z = - instance.IsDepthClipControlSupported() && - regs.clipper_control.clip_space == AmdGpu::Liverpool::ClipSpace::MinusWToW - ? 1.0f - : 0.0f; + regs.clipper_control.clip_space == AmdGpu::Liverpool::ClipSpace::MinusWToW ? 1.0f : 0.0f; + + if (regs.polygon_control.enable_window_offset && + (regs.window_offset.window_x_offset != 0 || regs.window_offset.window_y_offset != 0)) { + LOG_ERROR(Render_Vulkan, + "PA_SU_SC_MODE_CNTL.VTX_WINDOW_OFFSET_ENABLE support is not yet implemented."); + } for (u32 i = 0; i < Liverpool::NumViewports; i++) { const auto& vp = regs.viewports[i]; @@ -1063,20 +1069,35 @@ void Rasterizer::UpdateViewportScissorState() { if (vp.xscale == 0) { continue; } - const auto xoffset = vp_ctl.xoffset_enable ? vp.xoffset : 0.f; - const auto xscale = vp_ctl.xscale_enable ? vp.xscale : 1.f; - const auto yoffset = vp_ctl.yoffset_enable ? vp.yoffset : 0.f; - const auto yscale = vp_ctl.yscale_enable ? vp.yscale : 1.f; + const auto zoffset = vp_ctl.zoffset_enable ? vp.zoffset : 0.f; const auto zscale = vp_ctl.zscale_enable ? vp.zscale : 1.f; - viewports.push_back({ - .x = xoffset - xscale, - .y = yoffset - yscale, - .width = xscale * 2.0f, - .height = yscale * 2.0f, - .minDepth = zoffset - zscale * reduce_z, - .maxDepth = zscale + zoffset, - }); + if (pipeline.IsClipDisabled()) { + // In case if clipping is disabled we patch the shader to convert vertex position + // from screen space coordinates to NDC by defining a render space as full hardware + // window range [0..16383, 0..16383] and setting the viewport to its size. + viewports.push_back({ + .x = 0.f, + .y = 0.f, + .width = float(std::min(instance.GetMaxViewportWidth(), 16_KB)), + .height = float(std::min(instance.GetMaxViewportHeight(), 16_KB)), + .minDepth = zoffset - zscale * reduce_z, + .maxDepth = zscale + zoffset, + }); + } else { + const auto xoffset = vp_ctl.xoffset_enable ? vp.xoffset : 0.f; + const auto xscale = vp_ctl.xscale_enable ? vp.xscale : 1.f; + const auto yoffset = vp_ctl.yoffset_enable ? vp.yoffset : 0.f; + const auto yscale = vp_ctl.yscale_enable ? vp.yscale : 1.f; + viewports.push_back({ + .x = xoffset - xscale, + .y = yoffset - yscale, + .width = xscale * 2.0f, + .height = yscale * 2.0f, + .minDepth = zoffset - zscale * reduce_z, + .maxDepth = zscale + zoffset, + }); + } auto vp_scsr = scsr; if (regs.mode_control.vport_scissor_enable) { @@ -1098,8 +1119,8 @@ void Rasterizer::UpdateViewportScissorState() { if (viewports.empty()) { // Vulkan requires providing at least one viewport. constexpr vk::Viewport empty_viewport = { - .x = 0.0f, - .y = 0.0f, + .x = -1.0f, + .y = -1.0f, .width = 1.0f, .height = 1.0f, .minDepth = 0.0f, @@ -1118,42 +1139,43 @@ void Rasterizer::UpdateViewportScissorState() { cmdbuf.setScissorWithCountEXT(scissors); } -void Rasterizer::ScopeMarkerBegin(const std::string_view& str) { - if (Config::nullGpu() || !Config::vkMarkersEnabled()) { +void Rasterizer::ScopeMarkerBegin(const std::string_view& str, bool from_guest) { + if ((from_guest && !Config::getVkGuestMarkersEnabled()) || + (!from_guest && !Config::getVkHostMarkersEnabled())) { return; } - const auto cmdbuf = scheduler.CommandBuffer(); cmdbuf.beginDebugUtilsLabelEXT(vk::DebugUtilsLabelEXT{ .pLabelName = str.data(), }); } -void Rasterizer::ScopeMarkerEnd() { - if (Config::nullGpu() || !Config::vkMarkersEnabled()) { +void Rasterizer::ScopeMarkerEnd(bool from_guest) { + if ((from_guest && !Config::getVkGuestMarkersEnabled()) || + (!from_guest && !Config::getVkHostMarkersEnabled())) { return; } - const auto cmdbuf = scheduler.CommandBuffer(); cmdbuf.endDebugUtilsLabelEXT(); } -void Rasterizer::ScopedMarkerInsert(const std::string_view& str) { - if (Config::nullGpu() || !Config::vkMarkersEnabled()) { +void Rasterizer::ScopedMarkerInsert(const std::string_view& str, bool from_guest) { + if ((from_guest && !Config::getVkGuestMarkersEnabled()) || + (!from_guest && !Config::getVkHostMarkersEnabled())) { return; } - const auto cmdbuf = scheduler.CommandBuffer(); cmdbuf.insertDebugUtilsLabelEXT(vk::DebugUtilsLabelEXT{ .pLabelName = str.data(), }); } -void Rasterizer::ScopedMarkerInsertColor(const std::string_view& str, const u32 color) { - if (Config::nullGpu() || !Config::vkMarkersEnabled()) { +void Rasterizer::ScopedMarkerInsertColor(const std::string_view& str, const u32 color, + bool from_guest) { + if ((from_guest && !Config::getVkGuestMarkersEnabled()) || + (!from_guest && !Config::getVkHostMarkersEnabled())) { return; } - const auto cmdbuf = scheduler.CommandBuffer(); cmdbuf.insertDebugUtilsLabelEXT(vk::DebugUtilsLabelEXT{ .pLabelName = str.data(), diff --git a/src/video_core/renderer_vulkan/vk_rasterizer.h b/src/video_core/renderer_vulkan/vk_rasterizer.h index 1bbb90b6c..2fac8c8da 100644 --- a/src/video_core/renderer_vulkan/vk_rasterizer.h +++ b/src/video_core/renderer_vulkan/vk_rasterizer.h @@ -47,10 +47,11 @@ public: void DispatchDirect(); void DispatchIndirect(VAddr address, u32 offset, u32 size); - void ScopeMarkerBegin(const std::string_view& str); - void ScopeMarkerEnd(); - void ScopedMarkerInsert(const std::string_view& str); - void ScopedMarkerInsertColor(const std::string_view& str, const u32 color); + void ScopeMarkerBegin(const std::string_view& str, bool from_guest = false); + void ScopeMarkerEnd(bool from_guest = false); + void ScopedMarkerInsert(const std::string_view& str, bool from_guest = false); + void ScopedMarkerInsertColor(const std::string_view& str, const u32 color, + bool from_guest = false); void InlineData(VAddr address, const void* value, u32 num_bytes, bool is_gds); u32 ReadDataFromGds(u32 gsd_offset); @@ -71,19 +72,18 @@ private: RenderState PrepareRenderState(u32 mrt_mask); void BeginRendering(const GraphicsPipeline& pipeline, RenderState& state); void Resolve(); + void DepthStencilCopy(bool is_depth, bool is_stencil); void EliminateFastClear(); void UpdateDynamicState(const GraphicsPipeline& pipeline); - void UpdateViewportScissorState(); + void UpdateViewportScissorState(const GraphicsPipeline& pipeline); bool FilterDraw(); void BindBuffers(const Shader::Info& stage, Shader::Backend::Bindings& binding, - Shader::PushData& push_data, Pipeline::DescriptorWrites& set_writes, - Pipeline::BufferBarriers& buffer_barriers); + Shader::PushData& push_data); - void BindTextures(const Shader::Info& stage, Shader::Backend::Bindings& binding, - Pipeline::DescriptorWrites& set_writes); + void BindTextures(const Shader::Info& stage, Shader::Backend::Bindings& binding); bool BindResources(const Pipeline* pipeline); void ResetBindings() { @@ -93,6 +93,8 @@ private: bound_images.clear(); } + bool IsComputeMetaClear(const Pipeline* pipeline); + private: const Instance& instance; Scheduler& scheduler; @@ -108,20 +110,17 @@ private: std::pair, 8> cb_descs; std::optional> db_desc; - boost::container::static_vector image_infos; - boost::container::static_vector buffer_views; - boost::container::static_vector buffer_infos; - boost::container::static_vector bound_images; + boost::container::static_vector image_infos; + boost::container::static_vector buffer_infos; + boost::container::static_vector bound_images; Pipeline::DescriptorWrites set_writes; Pipeline::BufferBarriers buffer_barriers; - using BufferBindingInfo = std::pair; - boost::container::static_vector buffer_bindings; - using TexBufferBindingInfo = std::pair; - boost::container::static_vector texbuffer_bindings; + using BufferBindingInfo = std::tuple; + boost::container::static_vector buffer_bindings; using ImageBindingInfo = std::pair; - boost::container::static_vector image_bindings; + boost::container::static_vector image_bindings; }; } // namespace Vulkan diff --git a/src/video_core/renderer_vulkan/vk_resource_pool.cpp b/src/video_core/renderer_vulkan/vk_resource_pool.cpp index 25a134528..5eae32e70 100644 --- a/src/video_core/renderer_vulkan/vk_resource_pool.cpp +++ b/src/video_core/renderer_vulkan/vk_resource_pool.cpp @@ -73,9 +73,7 @@ CommandPool::CommandPool(const Instance& instance, MasterSemaphore* master_semap ASSERT_MSG(pool_result == vk::Result::eSuccess, "Failed to create command pool: {}", vk::to_string(pool_result)); cmd_pool = std::move(pool); - if (instance.HasDebuggingToolAttached()) { - SetObjectName(device, *cmd_pool, "CommandPool"); - } + SetObjectName(device, *cmd_pool, "CommandPool"); } CommandPool::~CommandPool() = default; @@ -94,10 +92,8 @@ void CommandPool::Allocate(std::size_t begin, std::size_t end) { device.allocateCommandBuffers(&buffer_alloc_info, cmd_buffers.data() + begin); ASSERT(result == vk::Result::eSuccess); - if (instance.HasDebuggingToolAttached()) { - for (std::size_t i = begin; i < end; ++i) { - SetObjectName(device, cmd_buffers[i], "CommandPool: Command Buffer {}", i); - } + for (std::size_t i = begin; i < end; ++i) { + SetObjectName(device, cmd_buffers[i], "CommandPool: Command Buffer {}", i); } } @@ -153,7 +149,8 @@ vk::DescriptorSet DescriptorHeap::Commit(vk::DescriptorSetLayout set_layout) { } // The pool has run out. Record current tick and place it in pending list. - ASSERT_MSG(result == vk::Result::eErrorOutOfPoolMemory, + ASSERT_MSG(result == vk::Result::eErrorOutOfPoolMemory || + result == vk::Result::eErrorFragmentedPool, "Unexpected error during descriptor set allocation {}", vk::to_string(result)); pending_pools.emplace_back(curr_pool, master_semaphore->CurrentTick()); if (const auto [pool, tick] = pending_pools.front(); master_semaphore->IsFree(tick)) { diff --git a/src/video_core/renderer_vulkan/vk_shader_hle.cpp b/src/video_core/renderer_vulkan/vk_shader_hle.cpp index ff78f5d24..d73fdbeb1 100644 --- a/src/video_core/renderer_vulkan/vk_shader_hle.cpp +++ b/src/video_core/renderer_vulkan/vk_shader_hle.cpp @@ -19,9 +19,9 @@ static bool ExecuteCopyShaderHLE(const Shader::Info& info, auto& buffer_cache = rasterizer.GetBufferCache(); // Copy shader defines three formatted buffers as inputs: control, source, and destination. - const auto ctl_buf_sharp = info.texture_buffers[0].GetSharp(info); - const auto src_buf_sharp = info.texture_buffers[1].GetSharp(info); - const auto dst_buf_sharp = info.texture_buffers[2].GetSharp(info); + const auto ctl_buf_sharp = info.buffers[0].GetSharp(info); + const auto src_buf_sharp = info.buffers[1].GetSharp(info); + const auto dst_buf_sharp = info.buffers[2].GetSharp(info); const auto buf_stride = src_buf_sharp.GetStride(); ASSERT(buf_stride == dst_buf_sharp.GetStride()); @@ -95,12 +95,10 @@ static bool ExecuteCopyShaderHLE(const Shader::Info& info, } // Obtain buffers for the total source and destination ranges. - const auto [src_buf, src_buf_offset] = - buffer_cache.ObtainBuffer(src_buf_sharp.base_address + src_offset_min, - src_offset_max - src_offset_min, false, false); - const auto [dst_buf, dst_buf_offset] = - buffer_cache.ObtainBuffer(dst_buf_sharp.base_address + dst_offset_min, - dst_offset_max - dst_offset_min, true, false); + const auto [src_buf, src_buf_offset] = buffer_cache.ObtainBuffer( + src_buf_sharp.base_address + src_offset_min, src_offset_max - src_offset_min, false); + const auto [dst_buf, dst_buf_offset] = buffer_cache.ObtainBuffer( + dst_buf_sharp.base_address + dst_offset_min, dst_offset_max - dst_offset_min, true); // Apply found buffer base. const auto vk_copies = std::span{copies}.subspan(batch_start, batch_end - batch_start); diff --git a/src/video_core/renderer_vulkan/vk_shader_util.cpp b/src/video_core/renderer_vulkan/vk_shader_util.cpp index 08703c3de..1eb9b27c6 100644 --- a/src/video_core/renderer_vulkan/vk_shader_util.cpp +++ b/src/video_core/renderer_vulkan/vk_shader_util.cpp @@ -159,7 +159,8 @@ bool InitializeCompiler() { } } // Anonymous namespace -vk::ShaderModule Compile(std::string_view code, vk::ShaderStageFlagBits stage, vk::Device device) { +vk::ShaderModule Compile(std::string_view code, vk::ShaderStageFlagBits stage, vk::Device device, + std::vector defines) { if (!InitializeCompiler()) { return {}; } @@ -178,12 +179,46 @@ vk::ShaderModule Compile(std::string_view code, vk::ShaderStageFlagBits stage, v glslang::EShTargetLanguageVersion::EShTargetSpv_1_3); shader->setStringsWithLengths(&pass_source_code, &pass_source_code_length, 1); + std::string preambleString; + std::vector processes; + + for (auto& def : defines) { + processes.push_back("define-macro "); + processes.back().append(def); + + preambleString.append("#define "); + if (const size_t equal = def.find_first_of("="); equal != def.npos) { + def[equal] = ' '; + } + preambleString.append(def); + preambleString.append("\n"); + } + + shader->setPreamble(preambleString.c_str()); + shader->addProcesses(processes); + glslang::TShader::ForbidIncluder includer; + + std::string preprocessedStr; + if (!shader->preprocess(&DefaultTBuiltInResource, default_version, profile, false, true, + messages, &preprocessedStr, includer)) [[unlikely]] { + LOG_ERROR(Render_Vulkan, + "Shader preprocess error\n" + "Shader Info Log:\n" + "{}\n{}", + shader->getInfoLog(), shader->getInfoDebugLog()); + LOG_ERROR(Render_Vulkan, "Shader Source:\n{}", code); + return {}; + } + if (!shader->parse(&DefaultTBuiltInResource, default_version, profile, false, true, messages, includer)) [[unlikely]] { - LOG_INFO(Render_Vulkan, "Shader Info Log:\n{}\n{}", shader->getInfoLog(), - shader->getInfoDebugLog()); - LOG_INFO(Render_Vulkan, "Shader Source:\n{}", code); + LOG_ERROR(Render_Vulkan, + "Shader parse error\n" + "Shader Info Log:\n" + "{}\n{}", + shader->getInfoLog(), shader->getInfoDebugLog()); + LOG_ERROR(Render_Vulkan, "Shader Source:\n{}", code); return {}; } @@ -191,8 +226,11 @@ vk::ShaderModule Compile(std::string_view code, vk::ShaderStageFlagBits stage, v auto program = std::make_unique(); program->addShader(shader.get()); if (!program->link(messages)) { - LOG_INFO(Render_Vulkan, "Program Info Log:\n{}\n{}", program->getInfoLog(), - program->getInfoDebugLog()); + LOG_ERROR(Render_Vulkan, + "Shader link error\n" + "Program Info Log:\n" + "{}\n{}", + program->getInfoLog(), program->getInfoDebugLog()); return {}; } diff --git a/src/video_core/renderer_vulkan/vk_shader_util.h b/src/video_core/renderer_vulkan/vk_shader_util.h index 3a86acf2b..14b929782 100644 --- a/src/video_core/renderer_vulkan/vk_shader_util.h +++ b/src/video_core/renderer_vulkan/vk_shader_util.h @@ -16,7 +16,8 @@ namespace Vulkan { * @param stage The pipeline stage the shader will be used in. * @param device The vulkan device handle. */ -vk::ShaderModule Compile(std::string_view code, vk::ShaderStageFlagBits stage, vk::Device device); +vk::ShaderModule Compile(std::string_view code, vk::ShaderStageFlagBits stage, vk::Device device, + std::vector defines = {}); /** * @brief Creates a vulkan shader module from SPIR-V bytecode. diff --git a/src/video_core/renderer_vulkan/vk_swapchain.cpp b/src/video_core/renderer_vulkan/vk_swapchain.cpp index 44f4be6dd..de7bec894 100644 --- a/src/video_core/renderer_vulkan/vk_swapchain.cpp +++ b/src/video_core/renderer_vulkan/vk_swapchain.cpp @@ -4,17 +4,26 @@ #include #include #include "common/assert.h" +#include "common/config.h" #include "common/logging/log.h" +#include "imgui/renderer/imgui_core.h" #include "sdl_window.h" #include "video_core/renderer_vulkan/vk_instance.h" #include "video_core/renderer_vulkan/vk_swapchain.h" namespace Vulkan { -Swapchain::Swapchain(const Instance& instance_, const Frontend::WindowSDL& window) - : instance{instance_}, surface{CreateSurface(instance.GetInstance(), window)} { +static constexpr vk::SurfaceFormatKHR SURFACE_FORMAT_HDR = { + .format = vk::Format::eA2B10G10R10UnormPack32, + .colorSpace = vk::ColorSpaceKHR::eHdr10St2084EXT, +}; + +Swapchain::Swapchain(const Instance& instance_, const Frontend::WindowSDL& window_) + : instance{instance_}, window{window_}, surface{CreateSurface(instance.GetInstance(), window)} { FindPresentFormat(); - Create(window.GetWidth(), window.GetHeight(), surface); + + Create(window.GetWidth(), window.GetHeight()); + ImGui::Core::Initialize(instance, window, image_count, surface_format.format); } Swapchain::~Swapchain() { @@ -22,10 +31,9 @@ Swapchain::~Swapchain() { instance.GetInstance().destroySurfaceKHR(surface); } -void Swapchain::Create(u32 width_, u32 height_, vk::SurfaceKHR surface_) { +void Swapchain::Create(u32 width_, u32 height_) { width = width_; height = height_; - surface = surface_; needs_recreation = false; Destroy(); @@ -55,11 +63,12 @@ void Swapchain::Create(u32 width_, u32 height_, vk::SurfaceKHR surface_) { const u32 queue_family_indices_count = exclusive ? 1u : 2u; const vk::SharingMode sharing_mode = exclusive ? vk::SharingMode::eExclusive : vk::SharingMode::eConcurrent; + const auto format = needs_hdr ? SURFACE_FORMAT_HDR : surface_format; const vk::SwapchainCreateInfoKHR swapchain_info = { .surface = surface, .minImageCount = image_count, - .imageFormat = surface_format.format, - .imageColorSpace = surface_format.colorSpace, + .imageFormat = format.format, + .imageColorSpace = format.colorSpace, .imageExtent = extent, .imageArrayLayers = 1, .imageUsage = vk::ImageUsageFlagBits::eColorAttachment | @@ -84,8 +93,26 @@ void Swapchain::Create(u32 width_, u32 height_, vk::SurfaceKHR surface_) { } void Swapchain::Recreate(u32 width_, u32 height_) { - LOG_DEBUG(Render_Vulkan, "Recreate the swapchain: width={} height={}", width_, height_); - Create(width_, height_, surface); + LOG_DEBUG(Render_Vulkan, "Recreate the swapchain: width={} height={} HDR={}", width_, height_, + needs_hdr); + Create(width_, height_); +} + +void Swapchain::SetHDR(bool hdr) { + if (needs_hdr == hdr) { + return; + } + + auto result = instance.GetDevice().waitIdle(); + if (result != vk::Result::eSuccess) { + LOG_WARNING(ImGui, "Failed to wait for Vulkan device idle on mode change: {}", + vk::to_string(result)); + } + + needs_hdr = hdr; + Recreate(width, height); + ImGui::Core::OnSurfaceFormatChange(needs_hdr ? SURFACE_FORMAT_HDR.format + : surface_format.format); } bool Swapchain::AcquireNextImage() { @@ -142,10 +169,20 @@ void Swapchain::FindPresentFormat() { ASSERT_MSG(formats_result == vk::Result::eSuccess, "Failed to query surface formats: {}", vk::to_string(formats_result)); + // Check if the device supports HDR formats. Here we care of Rec.2020 PQ only as it is expected + // game output. Other variants as e.g. linear Rec.2020 will require additional color space + // rotation + supports_hdr = + std::find_if(formats.begin(), formats.end(), [](const vk::SurfaceFormatKHR& format) { + return format == SURFACE_FORMAT_HDR; + }) != formats.end(); + // Also make sure that user allowed us to use HDR + supports_hdr &= Config::allowHDR(); + // If there is a single undefined surface format, the device doesn't care, so we'll just use // RGBA sRGB. if (formats[0].format == vk::Format::eUndefined) { - surface_format.format = vk::Format::eR8G8B8A8Srgb; + surface_format.format = vk::Format::eR8G8B8A8Unorm; surface_format.colorSpace = vk::ColorSpaceKHR::eSrgbNonlinear; return; } @@ -153,7 +190,7 @@ void Swapchain::FindPresentFormat() { // Try to find a suitable format. for (const vk::SurfaceFormatKHR& sformat : formats) { vk::Format format = sformat.format; - if (format != vk::Format::eR8G8B8A8Srgb && format != vk::Format::eB8G8R8A8Srgb) { + if (format != vk::Format::eR8G8B8A8Unorm && format != vk::Format::eB8G8R8A8Unorm) { continue; } @@ -208,10 +245,14 @@ void Swapchain::Destroy() { if (swapchain) { device.destroySwapchainKHR(swapchain); } - for (u32 i = 0; i < image_count; i++) { - device.destroySemaphore(image_acquired[i]); - device.destroySemaphore(present_ready[i]); + + for (const auto& sem : image_acquired) { + device.destroySemaphore(sem); } + for (const auto& sem : present_ready) { + device.destroySemaphore(sem); + } + image_acquired.clear(); present_ready.clear(); } @@ -235,11 +276,9 @@ void Swapchain::RefreshSemaphores() { semaphore = sem; } - if (instance.HasDebuggingToolAttached()) { - for (u32 i = 0; i < image_count; ++i) { - SetObjectName(device, image_acquired[i], "Swapchain Semaphore: image_acquired {}", i); - SetObjectName(device, present_ready[i], "Swapchain Semaphore: present_ready {}", i); - } + for (u32 i = 0; i < image_count; ++i) { + SetObjectName(device, image_acquired[i], "Swapchain Semaphore: image_acquired {}", i); + SetObjectName(device, present_ready[i], "Swapchain Semaphore: present_ready {}", i); } } @@ -250,11 +289,30 @@ void Swapchain::SetupImages() { vk::to_string(images_result)); images = std::move(imgs); image_count = static_cast(images.size()); - - if (instance.HasDebuggingToolAttached()) { - for (u32 i = 0; i < image_count; ++i) { - SetObjectName(device, images[i], "Swapchain Image {}", i); + images_view.resize(image_count); + for (u32 i = 0; i < image_count; ++i) { + if (images_view[i]) { + device.destroyImageView(images_view[i]); } + auto [im_view_result, im_view] = device.createImageView(vk::ImageViewCreateInfo{ + .image = images[i], + .viewType = vk::ImageViewType::e2D, + .format = needs_hdr ? SURFACE_FORMAT_HDR.format : surface_format.format, + .subresourceRange = + { + .aspectMask = vk::ImageAspectFlagBits::eColor, + .levelCount = 1, + .layerCount = 1, + }, + }); + ASSERT_MSG(im_view_result == vk::Result::eSuccess, "Failed to create image view: {}", + vk::to_string(im_view_result)); + images_view[i] = im_view; + } + + for (u32 i = 0; i < image_count; ++i) { + SetObjectName(device, images[i], "Swapchain Image {}", i); + SetObjectName(device, images_view[i], "Swapchain ImageView {}", i); } } diff --git a/src/video_core/renderer_vulkan/vk_swapchain.h b/src/video_core/renderer_vulkan/vk_swapchain.h index 19ae9b2d2..7944566fa 100644 --- a/src/video_core/renderer_vulkan/vk_swapchain.h +++ b/src/video_core/renderer_vulkan/vk_swapchain.h @@ -23,7 +23,7 @@ public: ~Swapchain(); /// Creates (or recreates) the swapchain with a given size. - void Create(u32 width, u32 height, vk::SurfaceKHR surface); + void Create(u32 width, u32 height); /// Recreates the swapchain with a given size and current surface. void Recreate(u32 width, u32 height); @@ -42,6 +42,10 @@ public: return images[image_index]; } + vk::ImageView ImageView() const { + return images_view[image_index]; + } + vk::SurfaceFormatKHR GetSurfaceFormat() const { return surface_format; } @@ -78,6 +82,16 @@ public: return present_ready[image_index]; } + bool HasHDR() const { + return supports_hdr; + } + + void SetHDR(bool hdr); + + bool GetHDR() const { + return needs_hdr; + } + private: /// Selects the best available swapchain image format void FindPresentFormat(); @@ -96,13 +110,16 @@ private: private: const Instance& instance; + const Frontend::WindowSDL& window; vk::SwapchainKHR swapchain{}; vk::SurfaceKHR surface{}; vk::SurfaceFormatKHR surface_format; + vk::Format view_format; vk::Extent2D extent; vk::SurfaceTransformFlagBitsKHR transform; vk::CompositeAlphaFlagBitsKHR composite_alpha; std::vector images; + std::vector images_view; std::vector image_acquired; std::vector present_ready; u32 width = 0; @@ -111,6 +128,8 @@ private: u32 image_index = 0; u32 frame_index = 0; bool needs_recreation = true; + bool needs_hdr = false; // The game requested HDR swapchain + bool supports_hdr = false; // SC supports HDR output }; } // namespace Vulkan diff --git a/src/video_core/texture_cache/image.cpp b/src/video_core/texture_cache/image.cpp index 03339d280..522e6fd5b 100644 --- a/src/video_core/texture_cache/image.cpp +++ b/src/video_core/texture_cache/image.cpp @@ -113,6 +113,8 @@ static vk::FormatFeatureFlags2 FormatFeatureFlags(const vk::ImageUsageFlags usag return feature_flags; } +UniqueImage::UniqueImage() {} + UniqueImage::UniqueImage(vk::Device device_, VmaAllocator allocator_) : device{device_}, allocator{allocator_} {} @@ -123,6 +125,9 @@ UniqueImage::~UniqueImage() { } void UniqueImage::Create(const vk::ImageCreateInfo& image_ci) { + if (image) { + vmaDestroyImage(allocator, image, allocation); + } const VmaAllocationCreateInfo alloc_info = { .flags = VMA_ALLOCATION_CREATE_WITHIN_BUDGET_BIT, .usage = VMA_MEMORY_USAGE_AUTO_PREFER_DEVICE, @@ -153,13 +158,7 @@ Image::Image(const Vulkan::Instance& instance_, Vulkan::Scheduler& scheduler_, // the texture cache should re-create the resource with the usage requested vk::ImageCreateFlags flags{vk::ImageCreateFlagBits::eMutableFormat | vk::ImageCreateFlagBits::eExtendedUsage}; - const bool can_be_cube = - (info.type == vk::ImageType::e2D) && - ((info.props.is_pow2 ? (info.resources.layers % 8) : (info.resources.layers % 6)) == 0) && - (info.size.width == info.size.height); - if (info.props.is_cube || can_be_cube) { - flags |= vk::ImageCreateFlagBits::eCubeCompatible; - } else if (info.props.is_volume) { + if (info.props.is_volume) { flags |= vk::ImageCreateFlagBits::e2DArrayCompatible; } @@ -210,7 +209,7 @@ Image::Image(const Vulkan::Instance& instance_, Vulkan::Scheduler& scheduler_, Vulkan::SetObjectName(instance->GetDevice(), (vk::Image)image, "Image {}x{}x{} {:#x}:{:#x}", info.size.width, info.size.height, info.size.depth, info.guest_address, - info.guest_size_bytes); + info.guest_size); } boost::container::small_vector Image::GetBarriers( @@ -400,7 +399,7 @@ void Image::CopyImage(const Image& image) { vk::AccessFlagBits2::eShaderRead | vk::AccessFlagBits2::eTransferRead, {}); } -void Image::CopyMip(const Image& image, u32 mip) { +void Image::CopyMip(const Image& image, u32 mip, u32 slice) { scheduler->EndRendering(); Transit(vk::ImageLayout::eTransferDstOptimal, vk::AccessFlagBits2::eTransferWrite, {}); @@ -413,18 +412,19 @@ void Image::CopyMip(const Image& image, u32 mip) { ASSERT(mip_w == image.info.size.width); ASSERT(mip_h == image.info.size.height); + const u32 num_layers = std::min(image.info.resources.layers, info.resources.layers); const vk::ImageCopy image_copy{ .srcSubresource{ .aspectMask = image.aspect_mask, .mipLevel = 0, .baseArrayLayer = 0, - .layerCount = image.info.resources.layers, + .layerCount = num_layers, }, .dstSubresource{ .aspectMask = image.aspect_mask, .mipLevel = mip, - .baseArrayLayer = 0, - .layerCount = info.resources.layers, + .baseArrayLayer = slice, + .layerCount = num_layers, }, .extent = {mip_w, mip_h, mip_d}, }; diff --git a/src/video_core/texture_cache/image.h b/src/video_core/texture_cache/image.h index 473dd731e..404e25e88 100644 --- a/src/video_core/texture_cache/image.h +++ b/src/video_core/texture_cache/image.h @@ -35,6 +35,7 @@ enum ImageFlagBits : u32 { DECLARE_ENUM_FLAG_OPERATORS(ImageFlagBits) struct UniqueImage { + explicit UniqueImage(); explicit UniqueImage(vk::Device device, VmaAllocator allocator); ~UniqueImage(); @@ -80,7 +81,7 @@ struct Image { [[nodiscard]] bool Overlaps(VAddr overlap_cpu_addr, size_t overlap_size) const noexcept { const VAddr overlap_end = overlap_cpu_addr + overlap_size; const auto image_addr = info.guest_address; - const auto image_end = info.guest_address + info.guest_size_bytes; + const auto image_end = info.guest_address + info.guest_size; return image_addr < overlap_end && overlap_cpu_addr < image_end; } @@ -104,7 +105,7 @@ struct Image { void Upload(vk::Buffer buffer, u64 offset); void CopyImage(const Image& image); - void CopyMip(const Image& image, u32 mip); + void CopyMip(const Image& src_image, u32 mip, u32 slice); bool IsTracked() { return track_addr != 0 && track_addr_end != 0; diff --git a/src/video_core/texture_cache/image_info.cpp b/src/video_core/texture_cache/image_info.cpp index adc72c21f..26928eaf7 100644 --- a/src/video_core/texture_cache/image_info.cpp +++ b/src/video_core/texture_cache/image_info.cpp @@ -3,8 +3,10 @@ #include "common/assert.h" #include "common/config.h" +#include "core/libraries/kernel/process.h" #include "video_core/renderer_vulkan/liverpool_to_vk.h" #include "video_core/texture_cache/image_info.h" +#include "video_core/texture_cache/tile.h" namespace VideoCore { @@ -20,6 +22,7 @@ static vk::Format ConvertPixelFormat(const VideoOutFormat format) { return vk::Format::eR8G8B8A8Srgb; case VideoOutFormat::A2R10G10B10: case VideoOutFormat::A2R10G10B10Srgb: + case VideoOutFormat::A2R10G10B10Bt2020Pq: return vk::Format::eA2R10G10B10UnormPack32; default: break; @@ -35,7 +38,6 @@ static vk::ImageType ConvertImageType(AmdGpu::ImageType type) noexcept { return vk::ImageType::e1D; case AmdGpu::ImageType::Color2D: case AmdGpu::ImageType::Color2DMsaa: - case AmdGpu::ImageType::Cube: case AmdGpu::ImageType::Color2DArray: return vk::ImageType::e2D; case AmdGpu::ImageType::Color3D: @@ -45,195 +47,6 @@ static vk::ImageType ConvertImageType(AmdGpu::ImageType type) noexcept { } } -// clang-format off -// The table of macro tiles parameters for given tiling index (row) and bpp (column) -static constexpr std::array macro_tile_extents_x1{ - std::pair{256u, 128u}, std::pair{256u, 128u}, std::pair{256u, 128u}, std::pair{256u, 128u}, std::pair{256u, 128u}, // 00 - std::pair{256u, 128u}, std::pair{128u, 128u}, std::pair{128u, 128u}, std::pair{128u, 128u}, std::pair{128u, 128u}, // 01 - std::pair{256u, 128u}, std::pair{128u, 128u}, std::pair{128u, 64u}, std::pair{128u, 64u}, std::pair{128u, 64u}, // 02 - std::pair{256u, 128u}, std::pair{128u, 128u}, std::pair{128u, 64u}, std::pair{128u, 64u}, std::pair{128u, 64u}, // 03 - std::pair{256u, 128u}, std::pair{128u, 128u}, std::pair{128u, 64u}, std::pair{128u, 64u}, std::pair{64u, 64u}, // 04 - std::pair{0u, 0u}, std::pair{0u, 0u}, std::pair{0u, 0u}, std::pair{0u, 0u}, std::pair{0u, 0u}, // 05 - std::pair{256u, 256u}, std::pair{256u, 128u}, std::pair{128u, 128u}, std::pair{128u, 128u}, std::pair{128u, 128u}, // 06 - std::pair{256u, 256u}, std::pair{256u, 128u}, std::pair{128u, 128u}, std::pair{128u, 64u}, std::pair{64u, 64u}, // 07 - std::pair{0u, 0u}, std::pair{0u, 0u}, std::pair{0u, 0u}, std::pair{0u, 0u}, std::pair{0u, 0u}, // 08 - std::pair{0u, 0u}, std::pair{0u, 0u}, std::pair{0u, 0u}, std::pair{0u, 0u}, std::pair{0u, 0u}, // 09 - std::pair{256u, 128u}, std::pair{128u, 128u}, std::pair{128u, 64u}, std::pair{128u, 64u}, std::pair{64u, 64u}, // 0A - std::pair{256u, 256u}, std::pair{256u, 128u}, std::pair{128u, 128u}, std::pair{128u, 64u}, std::pair{64u, 64u}, // 0B - std::pair{256u, 256u}, std::pair{256u, 128u}, std::pair{128u, 128u}, std::pair{128u, 64u}, std::pair{128u, 64u}, // 0C - std::pair{0u, 0u}, std::pair{0u, 0u}, std::pair{0u, 0u}, std::pair{0u, 0u}, std::pair{0u, 0u}, // 0D - std::pair{256u, 128u}, std::pair{128u, 128u}, std::pair{128u, 64u}, std::pair{128u, 64u}, std::pair{64u, 64u}, // 0E - std::pair{256u, 128u}, std::pair{128u, 128u}, std::pair{128u, 64u}, std::pair{128u, 64u}, std::pair{64u, 64u}, // 0F - std::pair{256u, 256u}, std::pair{256u, 128u}, std::pair{128u, 128u}, std::pair{128u, 64u}, std::pair{64u, 64u}, // 10 - std::pair{256u, 256u}, std::pair{256u, 128u}, std::pair{128u, 128u}, std::pair{128u, 64u}, std::pair{64u, 64u}, // 11 - std::pair{256u, 256u}, std::pair{256u, 128u}, std::pair{128u, 128u}, std::pair{128u, 64u}, std::pair{64u, 64u}, // 12 - std::pair{0u, 0u}, std::pair{0u, 0u}, std::pair{0u, 0u}, std::pair{0u, 0u}, std::pair{0u, 0u}, // 13 - std::pair{128u, 64u}, std::pair{128u, 64u}, std::pair{64u, 64u}, std::pair{64u, 64u}, std::pair{64u, 64u}, // 14 - std::pair{128u, 64u}, std::pair{128u, 64u}, std::pair{64u, 64u}, std::pair{64u, 64u}, std::pair{64u, 64u}, // 15 - std::pair{128u, 128u}, std::pair{128u, 64u}, std::pair{64u, 64u}, std::pair{64u, 64u}, std::pair{64u, 64u}, // 16 - std::pair{128u, 128u}, std::pair{128u, 64u}, std::pair{64u, 64u}, std::pair{64u, 64u}, std::pair{64u, 64u}, // 17 - std::pair{128u, 128u}, std::pair{128u, 64u}, std::pair{64u, 64u}, std::pair{64u, 64u}, std::pair{64u, 64u}, // 18 - std::pair{128u, 64u}, std::pair{64u, 64u}, std::pair{64u, 64u}, std::pair{64u, 64u}, std::pair{64u, 64u}, // 19 - std::pair{128u, 64u}, std::pair{64u, 64u}, std::pair{64u, 64u}, std::pair{64u, 64u}, std::pair{64u, 64u}, // 1A -}; - -static constexpr std::array macro_tile_extents_x2{ - std::pair{256u, 128u}, std::pair{256u, 128u}, std::pair{256u, 128u}, std::pair{256u, 128u}, std::pair{256u, 128u}, // 00 - std::pair{128u, 128u}, std::pair{128u, 128u}, std::pair{128u, 128u}, std::pair{128u, 128u}, std::pair{128u, 128u}, // 01 - std::pair{128u, 128u}, std::pair{128u, 64u}, std::pair{128u, 64u}, std::pair{128u, 64u}, std::pair{128u, 64u}, // 02 - std::pair{128u, 128u}, std::pair{128u, 64u}, std::pair{128u, 64u}, std::pair{128u, 64u}, std::pair{128u, 64u}, // 03 - std::pair{128u, 128u}, std::pair{128u, 64u}, std::pair{128u, 64u}, std::pair{64u, 64u}, std::pair{64u, 64u}, // 04 - std::pair{0u, 0u}, std::pair{0u, 0u}, std::pair{0u, 0u}, std::pair{0u, 0u}, std::pair{0u, 0u}, // 05 - std::pair{256u, 128u}, std::pair{128u, 128u}, std::pair{128u, 128u}, std::pair{128u, 128u}, std::pair{128u, 128u}, // 06 - std::pair{256u, 128u}, std::pair{128u, 128u}, std::pair{128u, 64u}, std::pair{64u, 64u}, std::pair{64u, 64u}, // 07 - std::pair{0u, 0u}, std::pair{0u, 0u}, std::pair{0u, 0u}, std::pair{0u, 0u}, std::pair{0u, 0u}, // 08 - std::pair{0u, 0u}, std::pair{0u, 0u}, std::pair{0u, 0u}, std::pair{0u, 0u}, std::pair{0u, 0u}, // 09 - std::pair{128u, 128u}, std::pair{128u, 64u}, std::pair{128u, 64u}, std::pair{64u, 64u}, std::pair{64u, 64u}, // 0A - std::pair{256u, 128u}, std::pair{128u, 128u}, std::pair{128u, 64u}, std::pair{64u, 64u}, std::pair{64u, 64u}, // 0B - std::pair{256u, 128u}, std::pair{128u, 128u}, std::pair{128u, 64u}, std::pair{64u, 64u}, std::pair{64u, 64u}, // 0C - std::pair{0u, 0u}, std::pair{0u, 0u}, std::pair{0u, 0u}, std::pair{0u, 0u}, std::pair{0u, 0u}, // 0D - std::pair{128u, 128u}, std::pair{128u, 64u}, std::pair{128u, 64u}, std::pair{64u, 64u}, std::pair{64u, 64u}, // 0E - std::pair{128u, 128u}, std::pair{128u, 64u}, std::pair{128u, 64u}, std::pair{64u, 64u}, std::pair{64u, 64u}, // 0F - std::pair{256u, 128u}, std::pair{128u, 128u}, std::pair{128u, 64u}, std::pair{64u, 64u}, std::pair{64u, 64u}, // 10 - std::pair{256u, 128u}, std::pair{128u, 128u}, std::pair{128u, 64u}, std::pair{64u, 64u}, std::pair{64u, 64u}, // 11 - std::pair{256u, 128u}, std::pair{128u, 128u}, std::pair{128u, 64u}, std::pair{64u, 64u}, std::pair{64u, 64u}, // 12 - std::pair{0u, 0u}, std::pair{0u, 0u}, std::pair{0u, 0u}, std::pair{0u, 0u}, std::pair{0u, 0u}, // 13 - std::pair{128u, 64u}, std::pair{128u, 64u}, std::pair{64u, 64u}, std::pair{64u, 64u}, std::pair{64u, 64u}, // 14 - std::pair{128u, 64u}, std::pair{128u, 64u}, std::pair{64u, 64u}, std::pair{64u, 64u}, std::pair{64u, 64u}, // 15 - std::pair{128u, 128u}, std::pair{128u, 64u}, std::pair{64u, 64u}, std::pair{64u, 64u}, std::pair{64u, 64u}, // 16 - std::pair{128u, 128u}, std::pair{128u, 64u}, std::pair{64u, 64u}, std::pair{64u, 64u}, std::pair{64u, 64u}, // 17 - std::pair{128u, 128u}, std::pair{128u, 64u}, std::pair{64u, 64u}, std::pair{64u, 64u}, std::pair{64u, 64u}, // 18 - std::pair{128u, 64u}, std::pair{64u, 64u}, std::pair{64u, 64u}, std::pair{64u, 64u}, std::pair{64u, 64u}, // 19 - std::pair{128u, 64u}, std::pair{64u, 64u}, std::pair{64u, 64u}, std::pair{64u, 64u}, std::pair{64u, 64u}, // 1A -}; - -static constexpr std::array macro_tile_extents_x4{ - std::pair{256u, 128u}, std::pair{256u, 128u}, std::pair{256u, 128u}, std::pair{256u, 128u}, std::pair{256u, 128u}, // 00 - std::pair{128u, 128u}, std::pair{128u, 128u}, std::pair{128u, 128u}, std::pair{128u, 128u}, std::pair{128u, 128u}, // 01 - std::pair{128u, 64u}, std::pair{128u, 64u}, std::pair{128u, 64u}, std::pair{128u, 64u}, std::pair{128u, 64u}, // 02 - std::pair{128u, 64u}, std::pair{128u, 64u}, std::pair{128u, 64u}, std::pair{128u, 64u}, std::pair{128u, 64u}, // 03 - std::pair{128u, 64u}, std::pair{128u, 64u}, std::pair{64u, 64u}, std::pair{64u, 64u}, std::pair{64u, 64u}, // 04 - std::pair{0u, 0u}, std::pair{0u, 0u}, std::pair{0u, 0u}, std::pair{0u, 0u}, std::pair{0u, 0u}, // 05 - std::pair{128u, 128u}, std::pair{128u, 128u}, std::pair{128u, 128u}, std::pair{128u, 128u}, std::pair{128u, 128u}, // 06 - std::pair{128u, 128u}, std::pair{128u, 64u}, std::pair{64u, 64u}, std::pair{64u, 64u}, std::pair{64u, 64u}, // 07 - std::pair{0u, 0u}, std::pair{0u, 0u}, std::pair{0u, 0u}, std::pair{0u, 0u}, std::pair{0u, 0u}, // 08 - std::pair{0u, 0u}, std::pair{0u, 0u}, std::pair{0u, 0u}, std::pair{0u, 0u}, std::pair{0u, 0u}, // 09 - std::pair{128u, 64u}, std::pair{128u, 64u}, std::pair{128u, 64u}, std::pair{64u, 64u}, std::pair{64u, 64u}, // 0A - std::pair{128u, 128u}, std::pair{128u, 128u}, std::pair{128u, 64u}, std::pair{64u, 64u}, std::pair{64u, 64u}, // 0B - std::pair{128u, 128u}, std::pair{128u, 128u}, std::pair{128u, 64u}, std::pair{64u, 64u}, std::pair{64u, 64u}, // 0C - std::pair{0u, 0u}, std::pair{0u, 0u}, std::pair{0u, 0u}, std::pair{0u, 0u}, std::pair{0u, 0u}, // 0D - std::pair{128u, 64u}, std::pair{128u, 64u}, std::pair{128u, 64u}, std::pair{64u, 64u}, std::pair{64u, 64u}, // 0E - std::pair{128u, 64u}, std::pair{128u, 64u}, std::pair{128u, 64u}, std::pair{64u, 64u}, std::pair{64u, 64u}, // 0F - std::pair{128u, 128u}, std::pair{128u, 128u}, std::pair{128u, 64u}, std::pair{64u, 64u}, std::pair{64u, 64u}, // 10 - std::pair{128u, 128u}, std::pair{128u, 128u}, std::pair{128u, 64u}, std::pair{64u, 64u}, std::pair{64u, 64u}, // 11 - std::pair{128u, 128u}, std::pair{128u, 128u}, std::pair{128u, 64u}, std::pair{64u, 64u}, std::pair{64u, 64u}, // 12 - std::pair{0u, 0u}, std::pair{0u, 0u}, std::pair{0u, 0u}, std::pair{0u, 0u}, std::pair{0u, 0u}, // 13 - std::pair{128u, 64u}, std::pair{128u, 64u}, std::pair{64u, 64u}, std::pair{64u, 64u}, std::pair{64u, 64u}, // 14 - std::pair{128u, 64u}, std::pair{128u, 64u}, std::pair{64u, 64u}, std::pair{64u, 64u}, std::pair{64u, 64u}, // 15 - std::pair{128u, 128u}, std::pair{128u, 64u}, std::pair{64u, 64u}, std::pair{64u, 64u}, std::pair{64u, 64u}, // 16 - std::pair{128u, 128u}, std::pair{128u, 64u}, std::pair{64u, 64u}, std::pair{64u, 64u}, std::pair{64u, 64u}, // 17 - std::pair{128u, 128u}, std::pair{128u, 64u}, std::pair{64u, 64u}, std::pair{64u, 64u}, std::pair{64u, 64u}, // 18 - std::pair{128u, 64u}, std::pair{64u, 64u}, std::pair{64u, 64u}, std::pair{64u, 64u}, std::pair{64u, 64u}, // 19 - std::pair{128u, 64u}, std::pair{64u, 64u}, std::pair{64u, 64u}, std::pair{64u, 64u}, std::pair{64u, 64u}, // 1A -}; - -static constexpr std::array macro_tile_extents_x8{ - std::pair{256u, 128u}, std::pair{256u, 128u}, std::pair{256u, 128u}, std::pair{256u, 128u}, std::pair{256u, 128u}, // 00 - std::pair{128u, 128u}, std::pair{128u, 128u}, std::pair{128u, 128u}, std::pair{128u, 128u}, std::pair{128u, 128u}, // 01 - std::pair{128u, 64u}, std::pair{128u, 64u}, std::pair{128u, 64u}, std::pair{128u, 64u}, std::pair{128u, 64u}, // 02 - std::pair{128u, 64u}, std::pair{128u, 64u}, std::pair{128u, 64u}, std::pair{128u, 64u}, std::pair{128u, 64u}, // 03 - std::pair{128u, 64u}, std::pair{64u, 64u}, std::pair{64u, 64u}, std::pair{64u, 64u}, std::pair{64u, 64u}, // 04 - std::pair{0u, 0u}, std::pair{0u, 0u}, std::pair{0u, 0u}, std::pair{0u, 0u}, std::pair{0u, 0u}, // 05 - std::pair{128u, 128u}, std::pair{128u, 128u}, std::pair{128u, 128u}, std::pair{128u, 128u}, std::pair{128u, 128u}, // 06 - std::pair{128u, 64u}, std::pair{64u, 64u}, std::pair{64u, 64u}, std::pair{64u, 64u}, std::pair{64u, 64u}, // 07 - std::pair{0u, 0u}, std::pair{0u, 0u}, std::pair{0u, 0u}, std::pair{0u, 0u}, std::pair{0u, 0u}, // 08 - std::pair{0u, 0u}, std::pair{0u, 0u}, std::pair{0u, 0u}, std::pair{0u, 0u}, std::pair{0u, 0u}, // 09 - std::pair{128u, 64u}, std::pair{128u, 64u}, std::pair{128u, 64u}, std::pair{64u, 64u}, std::pair{64u, 64u}, // 0A - std::pair{128u, 128u}, std::pair{128u, 128u}, std::pair{128u, 64u}, std::pair{64u, 64u}, std::pair{64u, 64u}, // 0B - std::pair{128u, 128u}, std::pair{128u, 128u}, std::pair{128u, 64u}, std::pair{64u, 64u}, std::pair{64u, 64u}, // 0C - std::pair{0u, 0u}, std::pair{0u, 0u}, std::pair{0u, 0u}, std::pair{0u, 0u}, std::pair{0u, 0u}, // 0D - std::pair{128u, 64u}, std::pair{128u, 64u}, std::pair{128u, 64u}, std::pair{64u, 64u}, std::pair{64u, 64u}, // 0E - std::pair{128u, 64u}, std::pair{128u, 64u}, std::pair{128u, 64u}, std::pair{64u, 64u}, std::pair{64u, 64u}, // 0F - std::pair{128u, 128u}, std::pair{128u, 128u}, std::pair{128u, 64u}, std::pair{64u, 64u}, std::pair{64u, 64u}, // 10 - std::pair{128u, 128u}, std::pair{128u, 128u}, std::pair{128u, 64u}, std::pair{64u, 64u}, std::pair{64u, 64u}, // 11 - std::pair{128u, 128u}, std::pair{128u, 128u}, std::pair{128u, 64u}, std::pair{64u, 64u}, std::pair{64u, 64u}, // 12 - std::pair{0u, 0u}, std::pair{0u, 0u}, std::pair{0u, 0u}, std::pair{0u, 0u}, std::pair{0u, 0u}, // 13 - std::pair{128u, 64u}, std::pair{128u, 64u}, std::pair{64u, 64u}, std::pair{64u, 64u}, std::pair{64u, 64u}, // 14 - std::pair{128u, 64u}, std::pair{128u, 64u}, std::pair{64u, 64u}, std::pair{64u, 64u}, std::pair{64u, 64u}, // 15 - std::pair{128u, 128u}, std::pair{128u, 64u}, std::pair{64u, 64u}, std::pair{64u, 64u}, std::pair{64u, 64u}, // 16 - std::pair{128u, 128u}, std::pair{128u, 64u}, std::pair{64u, 64u}, std::pair{64u, 64u}, std::pair{64u, 64u}, // 17 - std::pair{128u, 128u}, std::pair{128u, 64u}, std::pair{64u, 64u}, std::pair{64u, 64u}, std::pair{64u, 64u}, // 18 - std::pair{128u, 64u}, std::pair{64u, 64u}, std::pair{64u, 64u}, std::pair{64u, 64u}, std::pair{64u, 64u}, // 19 - std::pair{128u, 64u}, std::pair{64u, 64u}, std::pair{64u, 64u}, std::pair{64u, 64u}, std::pair{64u, 64u}, // 1A -}; - -static constexpr std::array macro_tile_extents{ - macro_tile_extents_x1, - macro_tile_extents_x2, - macro_tile_extents_x4, - macro_tile_extents_x8, -}; -// clang-format on - -static constexpr std::pair micro_tile_extent{8u, 8u}; -static constexpr auto hw_pipe_interleave = 256u; - -static constexpr std::pair GetMacroTileExtents(u32 tiling_idx, u32 bpp, u32 num_samples) { - ASSERT(num_samples <= 8); - const auto row = tiling_idx * 5; - const auto column = std::bit_width(bpp) - 4; // bpps are 8, 16, 32, 64, 128 - return (macro_tile_extents[std::log2(num_samples)])[row + column]; -} - -static constexpr std::pair ImageSizeLinearAligned(u32 pitch, u32 height, u32 bpp, - u32 num_samples) { - const auto pitch_align = std::max(8u, 64u / ((bpp + 7) / 8)); - auto pitch_aligned = (pitch + pitch_align - 1) & ~(pitch_align - 1); - const auto height_aligned = height; - size_t log_sz = pitch_aligned * height_aligned * num_samples; - const auto slice_align = std::max(64u, 256u / ((bpp + 7) / 8)); - while (log_sz % slice_align) { - pitch_aligned += pitch_align; - log_sz = pitch_aligned * height_aligned * num_samples; - } - return {pitch_aligned, (log_sz * bpp + 7) / 8}; -} - -static constexpr std::pair ImageSizeMicroTiled(u32 pitch, u32 height, u32 bpp, - u32 num_samples) { - const auto& [pitch_align, height_align] = micro_tile_extent; - auto pitch_aligned = (pitch + pitch_align - 1) & ~(pitch_align - 1); - const auto height_aligned = (height + height_align - 1) & ~(height_align - 1); - size_t log_sz = (pitch_aligned * height_aligned * bpp * num_samples + 7) / 8; - while (log_sz % 256) { - pitch_aligned += 8; - log_sz = (pitch_aligned * height_aligned * bpp * num_samples + 7) / 8; - } - return {pitch_aligned, log_sz}; -} - -static constexpr std::pair ImageSizeMacroTiled(u32 pitch, u32 height, u32 bpp, - u32 num_samples, u32 tiling_idx, - u32 mip_n) { - const auto& [pitch_align, height_align] = GetMacroTileExtents(tiling_idx, bpp, num_samples); - ASSERT(pitch_align != 0 && height_align != 0); - bool downgrade_to_micro = false; - if (mip_n > 0) { - const bool is_less_than_tile = pitch < pitch_align || height < height_align; - // TODO: threshold check - downgrade_to_micro = is_less_than_tile; - } - - if (downgrade_to_micro) { - return ImageSizeMicroTiled(pitch, height, bpp, num_samples); - } - - const auto pitch_aligned = (pitch + pitch_align - 1) & ~(pitch_align - 1); - const auto height_aligned = (height + height_align - 1) & ~(height_align - 1); - const auto log_sz = pitch_aligned * height_aligned * num_samples; - return {pitch_aligned, (log_sz * bpp + 7) / 8}; -} - ImageInfo::ImageInfo(const Libraries::VideoOut::BufferAttributeGroup& group, VAddr cpu_address) noexcept { const auto& attrib = group.attrib; @@ -250,15 +63,15 @@ ImageInfo::ImageInfo(const Libraries::VideoOut::BufferAttributeGroup& group, guest_address = cpu_address; if (!props.is_tiled) { - guest_size_bytes = pitch * size.height * 4; + guest_size = pitch * size.height * 4; } else { - if (Config::isNeoMode()) { - guest_size_bytes = pitch * ((size.height + 127) & (~127)) * 4; + if (Libraries::Kernel::sceKernelIsNeoMode()) { + guest_size = pitch * ((size.height + 127) & (~127)) * 4; } else { - guest_size_bytes = pitch * ((size.height + 63) & (~63)) * 4; + guest_size = pitch * ((size.height + 63) & (~63)) * 4; } } - mips_layout.emplace_back(guest_size_bytes, pitch, 0); + mips_layout.emplace_back(guest_size, pitch, 0); } ImageInfo::ImageInfo(const AmdGpu::Liverpool::ColorBuffer& buffer, @@ -279,13 +92,15 @@ ImageInfo::ImageInfo(const AmdGpu::Liverpool::ColorBuffer& buffer, guest_address = buffer.Address(); const auto color_slice_sz = buffer.GetColorSliceSize(); - guest_size_bytes = color_slice_sz * buffer.NumSlices(); + guest_size = color_slice_sz * buffer.NumSlices(); mips_layout.emplace_back(color_slice_sz, pitch, 0); tiling_idx = static_cast(buffer.attrib.tile_mode_index.Value()); + alt_tile = Libraries::Kernel::sceKernelIsNeoMode() && buffer.info.alt_tile_mode; } ImageInfo::ImageInfo(const AmdGpu::Liverpool::DepthBuffer& buffer, u32 num_slices, - VAddr htile_address, const AmdGpu::Liverpool::CbDbExtent& hint) noexcept { + VAddr htile_address, const AmdGpu::Liverpool::CbDbExtent& hint, + bool write_buffer) noexcept { props.is_tiled = false; pixel_format = LiverpoolToVK::DepthFormat(buffer.z_info.format, buffer.stencil_info.format); type = vk::ImageType::e2D; @@ -298,12 +113,12 @@ ImageInfo::ImageInfo(const AmdGpu::Liverpool::DepthBuffer& buffer, u32 num_slice resources.layers = num_slices; meta_info.htile_addr = buffer.z_info.tile_surface_en ? htile_address : 0; - stencil_addr = buffer.StencilAddress(); + stencil_addr = write_buffer ? buffer.StencilWriteAddress() : buffer.StencilAddress(); stencil_size = pitch * size.height * sizeof(u8); - guest_address = buffer.Address(); + guest_address = write_buffer ? buffer.DepthWriteAddress() : buffer.DepthAddress(); const auto depth_slice_sz = buffer.GetDepthSliceSize(); - guest_size_bytes = depth_slice_sz * num_slices; + guest_size = depth_slice_sz * num_slices; mips_layout.emplace_back(depth_slice_sz, pitch, 0); } @@ -316,7 +131,6 @@ ImageInfo::ImageInfo(const AmdGpu::Image& image, const Shader::ImageResource& de } type = ConvertImageType(image.GetType()); props.is_tiled = image.IsTiled(); - props.is_cube = image.GetType() == AmdGpu::ImageType::Cube; props.is_volume = image.GetType() == AmdGpu::ImageType::Color3D; props.is_pow2 = image.pow2pad; props.is_block = IsBlockCoded(); @@ -325,7 +139,7 @@ ImageInfo::ImageInfo(const AmdGpu::Image& image, const Shader::ImageResource& de size.depth = props.is_volume ? image.depth + 1 : 1; pitch = image.Pitch(); resources.levels = image.NumLevels(); - resources.layers = image.NumLayers(desc.is_array); + resources.layers = image.NumLayers(); num_samples = image.NumSamples(); num_bits = NumBits(image.GetDataFmt()); @@ -333,13 +147,14 @@ ImageInfo::ImageInfo(const AmdGpu::Image& image, const Shader::ImageResource& de mips_layout.reserve(resources.levels); tiling_idx = image.tiling_index; + alt_tile = Libraries::Kernel::sceKernelIsNeoMode() && image.alt_tile_mode; UpdateSize(); } void ImageInfo::UpdateSize() { mips_layout.clear(); MipInfo mip_info{}; - guest_size_bytes = 0; + guest_size = 0; for (auto mip = 0u; mip < resources.levels; ++mip) { auto bpp = num_bits; auto mip_w = pitch >> mip; @@ -352,6 +167,7 @@ void ImageInfo::UpdateSize() { mip_w = std::max(mip_w, 1u); mip_h = std::max(mip_h, 1u); auto mip_d = std::max(size.depth >> mip, 1u); + auto thickness = 1; if (props.is_pow2) { mip_w = std::bit_ceil(mip_w); @@ -363,48 +179,48 @@ void ImageInfo::UpdateSize() { case AmdGpu::TilingMode::Display_Linear: { std::tie(mip_info.pitch, mip_info.size) = ImageSizeLinearAligned(mip_w, mip_h, bpp, num_samples); - mip_info.height = mip_h; break; } case AmdGpu::TilingMode::Texture_Volume: - mip_d += (-mip_d) & 3u; + thickness = 4; + mip_d += (-mip_d) & (thickness - 1); [[fallthrough]]; + case AmdGpu::TilingMode::Display_MicroTiled: case AmdGpu::TilingMode::Texture_MicroTiled: { std::tie(mip_info.pitch, mip_info.size) = - ImageSizeMicroTiled(mip_w, mip_h, bpp, num_samples); - mip_info.height = std::max(mip_h, 8u); - if (props.is_block) { - mip_info.pitch = std::max(mip_info.pitch * 4, 32u); - mip_info.height = std::max(mip_info.height * 4, 32u); - } + ImageSizeMicroTiled(mip_w, mip_h, thickness, bpp, num_samples); break; } case AmdGpu::TilingMode::Display_MacroTiled: case AmdGpu::TilingMode::Texture_MacroTiled: case AmdGpu::TilingMode::Depth_MacroTiled: { ASSERT(!props.is_block); - std::tie(mip_info.pitch, mip_info.size) = - ImageSizeMacroTiled(mip_w, mip_h, bpp, num_samples, tiling_idx, mip); + std::tie(mip_info.pitch, mip_info.size) = ImageSizeMacroTiled( + mip_w, mip_h, thickness, bpp, num_samples, tiling_idx, mip, alt_tile); break; } default: { UNREACHABLE(); } } - mip_info.size *= mip_d; - mip_info.offset = guest_size_bytes; + mip_info.height = mip_h; + if (props.is_block) { + mip_info.pitch = std::max(mip_info.pitch * 4, 32u); + mip_info.height = std::max(mip_info.height * 4, 32u); + } + mip_info.size *= mip_d * resources.layers; + mip_info.offset = guest_size; mips_layout.emplace_back(mip_info); - guest_size_bytes += mip_info.size; + guest_size += mip_info.size; } - guest_size_bytes *= resources.layers; } -int ImageInfo::IsMipOf(const ImageInfo& info) const { +s32 ImageInfo::MipOf(const ImageInfo& info) const { if (!IsCompatible(info)) { return -1; } - if (IsTilingCompatible(info.tiling_idx, tiling_idx)) { + if (!IsTilingCompatible(info.tiling_idx, tiling_idx)) { return -1; } @@ -420,7 +236,12 @@ int ImageInfo::IsMipOf(const ImageInfo& info) const { // Find mip auto mip = -1; for (auto m = 0; m < info.mips_layout.size(); ++m) { - if (guest_address == (info.guest_address + info.mips_layout[m].offset)) { + const auto& [mip_size, mip_pitch, mip_height, mip_ofs] = info.mips_layout[m]; + const VAddr mip_base = info.guest_address + mip_ofs; + const VAddr mip_end = mip_base + mip_size; + const u32 slice_size = mip_size / info.resources.layers; + if (guest_address >= mip_base && guest_address < mip_end && + (guest_address - mip_base) % slice_size == 0) { mip = m; break; } @@ -429,7 +250,6 @@ int ImageInfo::IsMipOf(const ImageInfo& info) const { if (mip < 0) { return -1; } - ASSERT(mip != 0); const auto mip_w = std::max(info.size.width >> mip, 1u); const auto mip_h = std::max(info.size.height >> mip, 1u); @@ -452,7 +272,7 @@ int ImageInfo::IsMipOf(const ImageInfo& info) const { return mip; } -int ImageInfo::IsSliceOf(const ImageInfo& info) const { +s32 ImageInfo::SliceOf(const ImageInfo& info, s32 mip) const { if (!IsCompatible(info)) { return -1; } @@ -463,23 +283,25 @@ int ImageInfo::IsSliceOf(const ImageInfo& info) const { } // 2D dimensions of both images should be the same. - if ((size.width != info.size.width) || (size.height != info.size.height)) { + const auto mip_w = std::max(info.size.width >> mip, 1u); + const auto mip_h = std::max(info.size.height >> mip, 1u); + if ((size.width != mip_w) || (size.height != mip_h)) { return -1; } // Check for size alignment. - const bool slice_size = info.guest_size_bytes / info.resources.layers; - if (guest_size_bytes % slice_size != 0) { + const u32 slice_size = info.mips_layout[mip].size / info.resources.layers; + if (guest_size % slice_size != 0) { return -1; } // Ensure that address is aligned too. - const auto addr_diff = guest_address - info.guest_address; - if ((addr_diff % guest_size_bytes) != 0) { + const auto addr_diff = guest_address - (info.guest_address + info.mips_layout[mip].offset); + if ((addr_diff % guest_size) != 0) { return -1; } - return addr_diff / guest_size_bytes; + return addr_diff / guest_size; } } // namespace VideoCore diff --git a/src/video_core/texture_cache/image_info.h b/src/video_core/texture_cache/image_info.h index a657310a8..ca4d9f5e9 100644 --- a/src/video_core/texture_cache/image_info.h +++ b/src/video_core/texture_cache/image_info.h @@ -19,7 +19,7 @@ struct ImageInfo { ImageInfo(const AmdGpu::Liverpool::ColorBuffer& buffer, const AmdGpu::Liverpool::CbDbExtent& hint = {}) noexcept; ImageInfo(const AmdGpu::Liverpool::DepthBuffer& buffer, u32 num_slices, VAddr htile_address, - const AmdGpu::Liverpool::CbDbExtent& hint = {}) noexcept; + const AmdGpu::Liverpool::CbDbExtent& hint = {}, bool write_buffer = false) noexcept; ImageInfo(const AmdGpu::Image& image, const Shader::ImageResource& desc) noexcept; bool IsTiled() const { @@ -30,8 +30,8 @@ struct ImageInfo { bool IsDepthStencil() const; bool HasStencil() const; - int IsMipOf(const ImageInfo& info) const; - int IsSliceOf(const ImageInfo& info) const; + s32 MipOf(const ImageInfo& info) const; + s32 SliceOf(const ImageInfo& info, s32 mip) const; /// Verifies if images are compatible for subresource merging. bool IsCompatible(const ImageInfo& info) const { @@ -61,7 +61,6 @@ struct ImageInfo { } meta_info{}; struct { - u32 is_cube : 1; u32 is_volume : 1; u32 is_tiled : 1; u32 is_pow2 : 1; @@ -84,8 +83,9 @@ struct ImageInfo { }; boost::container::small_vector mips_layout; VAddr guest_address{0}; - u32 guest_size_bytes{0}; + u32 guest_size{0}; u32 tiling_idx{0}; // TODO: merge with existing! + bool alt_tile{false}; VAddr stencil_addr{0}; u32 stencil_size{0}; diff --git a/src/video_core/texture_cache/image_view.cpp b/src/video_core/texture_cache/image_view.cpp index 68b116558..7befb5259 100644 --- a/src/video_core/texture_cache/image_view.cpp +++ b/src/video_core/texture_cache/image_view.cpp @@ -20,8 +20,6 @@ vk::ImageViewType ConvertImageViewType(AmdGpu::ImageType type) { case AmdGpu::ImageType::Color2D: case AmdGpu::ImageType::Color2DMsaa: return vk::ImageViewType::e2D; - case AmdGpu::ImageType::Cube: - return vk::ImageViewType::eCube; case AmdGpu::ImageType::Color2DArray: return vk::ImageViewType::e2DArray; case AmdGpu::ImageType::Color3D: @@ -32,7 +30,7 @@ vk::ImageViewType ConvertImageViewType(AmdGpu::ImageType type) { } ImageViewInfo::ImageViewInfo(const AmdGpu::Image& image, const Shader::ImageResource& desc) noexcept - : is_storage{desc.IsStorage(image)} { + : is_storage{desc.is_written} { const auto dfmt = image.GetDataFmt(); auto nfmt = image.GetNumberFmt(); if (is_storage && nfmt == AmdGpu::NumberFormat::Srgb) { @@ -42,30 +40,12 @@ ImageViewInfo::ImageViewInfo(const AmdGpu::Image& image, const Shader::ImageReso if (desc.is_depth) { format = Vulkan::LiverpoolToVK::PromoteFormatToDepth(format); } + range.base.level = image.base_level; range.base.layer = image.base_array; - if (image.GetType() == AmdGpu::ImageType::Color2DMsaa || - image.GetType() == AmdGpu::ImageType::Color2DMsaaArray) { - range.extent.levels = 1; - } else { - range.extent.levels = image.last_level - image.base_level + 1; - } - range.extent.layers = image.last_array - image.base_array + 1; - type = ConvertImageViewType(image.GetBoundType()); - - // Adjust view type for arrays - if (type == vk::ImageViewType::eCube) { - if (desc.is_array) { - type = vk::ImageViewType::eCubeArray; - } else { - // Some games try to bind an array of cubemaps while shader reads only single one. - range.extent.layers = std::min(range.extent.layers, 6u); - } - } - if (type == vk::ImageViewType::e3D && range.extent.layers > 1) { - // Some games pass incorrect layer count for 3D textures so we need to fixup it. - range.extent.layers = 1; - } + range.extent.levels = image.NumViewLevels(desc.is_array); + range.extent.layers = image.NumViewLayers(desc.is_array); + type = ConvertImageViewType(image.GetViewType(desc.is_array)); if (!is_storage) { mapping = Vulkan::LiverpoolToVK::ComponentMapping(image.DstSelect()); @@ -102,13 +82,12 @@ ImageView::ImageView(const Vulkan::Instance& instance, const ImageViewInfo& info vk::Format format = info.format; vk::ImageAspectFlags aspect = image.aspect_mask; if (image.aspect_mask & vk::ImageAspectFlagBits::eDepth && - (format == vk::Format::eR32Sfloat || format == vk::Format::eD32Sfloat || - format == vk::Format::eR16Unorm || format == vk::Format::eD16Unorm)) { + Vulkan::LiverpoolToVK::IsFormatDepthCompatible(format)) { format = image.info.pixel_format; aspect = vk::ImageAspectFlagBits::eDepth; } if (image.aspect_mask & vk::ImageAspectFlagBits::eStencil && - (format == vk::Format::eR8Uint || format == vk::Format::eR8Unorm)) { + Vulkan::LiverpoolToVK::IsFormatStencilCompatible(format)) { format = image.info.pixel_format; aspect = vk::ImageAspectFlagBits::eStencil; } @@ -131,6 +110,16 @@ ImageView::ImageView(const Vulkan::Instance& instance, const ImageViewInfo& info ASSERT_MSG(view_result == vk::Result::eSuccess, "Failed to create image view: {}", vk::to_string(view_result)); image_view = std::move(view); + + const auto view_aspect = aspect & vk::ImageAspectFlagBits::eDepth ? "Depth" + : aspect & vk::ImageAspectFlagBits::eStencil ? "Stencil" + : "Color"; + Vulkan::SetObjectName( + instance.GetDevice(), *image_view, "ImageView {}x{}x{} {:#x}:{:#x} {}:{} {}:{} ({})", + image.info.size.width, image.info.size.height, image.info.size.depth, + image.info.guest_address, image.info.guest_size, info.range.base.level, + info.range.base.level + info.range.extent.levels - 1, info.range.base.layer, + info.range.base.layer + info.range.extent.layers - 1, view_aspect); } ImageView::~ImageView() = default; diff --git a/src/video_core/texture_cache/texture_cache.cpp b/src/video_core/texture_cache/texture_cache.cpp index 291e1da7c..d41ee57cc 100644 --- a/src/video_core/texture_cache/texture_cache.cpp +++ b/src/video_core/texture_cache/texture_cache.cpp @@ -3,7 +3,9 @@ #include #include + #include "common/assert.h" +#include "common/debug.h" #include "video_core/buffer_cache/buffer_cache.h" #include "video_core/page_manager.h" #include "video_core/renderer_vulkan/vk_instance.h" @@ -34,7 +36,7 @@ TextureCache::TextureCache(const Vulkan::Instance& instance_, Vulkan::Scheduler& Vulkan::SetObjectName(instance.GetDevice(), null_image, "Null Image"); img.flags = ImageFlagBits::Empty; img.track_addr = img.info.guest_address; - img.track_addr_end = img.info.guest_address + img.info.guest_size_bytes; + img.track_addr_end = img.info.guest_address + img.info.guest_size; ImageViewInfo view_info; const auto null_view_id = @@ -50,7 +52,7 @@ void TextureCache::MarkAsMaybeDirty(ImageId image_id, Image& image) { if (image.hash == 0) { // Initialize hash const u8* addr = std::bit_cast(image.info.guest_address); - image.hash = XXH3_64bits(addr, image.info.guest_size_bytes); + image.hash = XXH3_64bits(addr, image.info.guest_size); } image.flags |= ImageFlagBits::MaybeCpuDirty; UntrackImage(image_id); @@ -58,15 +60,13 @@ void TextureCache::MarkAsMaybeDirty(ImageId image_id, Image& image) { void TextureCache::InvalidateMemory(VAddr addr, size_t size) { std::scoped_lock lock{mutex}; - const auto end = addr + size; const auto pages_start = PageManager::GetPageAddr(addr); const auto pages_end = PageManager::GetNextPageAddr(addr + size - 1); ForEachImageInRegion(pages_start, pages_end - pages_start, [&](ImageId image_id, Image& image) { const auto image_begin = image.info.guest_address; - const auto image_end = image.info.guest_address + image.info.guest_size_bytes; - if (image_begin < end && addr < image_end) { - // Start or end of the modified region is in the image, or the image is entirely within - // the modified region, so the image was definitely accessed by this page fault. + const auto image_end = image.info.guest_address + image.info.guest_size; + if (image.Overlaps(addr, size)) { + // Modified region overlaps image, so the image was definitely accessed by this fault. // Untrack the image, so that the range is unprotected and the guest can write freely. image.flags |= ImageFlagBits::CpuDirty; UntrackImage(image_id); @@ -201,7 +201,7 @@ std::tuple TextureCache::ResolveOverlap(const ImageInfo& imag } if (image_info.pixel_format != tex_cache_image.info.pixel_format || - image_info.guest_size_bytes <= tex_cache_image.info.guest_size_bytes) { + image_info.guest_size <= tex_cache_image.info.guest_size) { auto result_id = merged_image_id ? merged_image_id : cache_image_id; const auto& result_image = slot_images[result_id]; return { @@ -223,16 +223,13 @@ std::tuple TextureCache::ResolveOverlap(const ImageInfo& imag // Right overlap, the image requested is a possible subresource of the image from cache. if (image_info.guest_address > tex_cache_image.info.guest_address) { - if (auto mip = image_info.IsMipOf(tex_cache_image.info); mip >= 0) { - return {cache_image_id, mip, -1}; + if (auto mip = image_info.MipOf(tex_cache_image.info); mip >= 0) { + if (auto slice = image_info.SliceOf(tex_cache_image.info, mip); slice >= 0) { + return {cache_image_id, mip, slice}; + } } - if (auto slice = image_info.IsSliceOf(tex_cache_image.info); slice >= 0) { - return {cache_image_id, -1, slice}; - } - - // TODO: slice and mip - + // Image isn't a subresource but a chance overlap. if (safe_to_delete) { FreeImage(cache_image_id); } @@ -240,32 +237,34 @@ std::tuple TextureCache::ResolveOverlap(const ImageInfo& imag return {{}, -1, -1}; } else { // Left overlap, the image from cache is a possible subresource of the image requested - if (!merged_image_id) { - // We need to have a larger, already allocated image to copy this one into - return {{}, -1, -1}; - } + if (auto mip = tex_cache_image.info.MipOf(image_info); mip >= 0) { + if (auto slice = tex_cache_image.info.SliceOf(image_info, mip); slice >= 0) { + if (tex_cache_image.binding.is_target) { + // We have a larger image created and a separate one, representing a subres of + // it, bound as render target. In this case we need to rebind render target. + tex_cache_image.binding.needs_rebind = 1u; + if (merged_image_id) { + GetImage(merged_image_id).binding.is_target = 1u; + } - if (auto mip = tex_cache_image.info.IsMipOf(image_info); mip >= 0) { - if (tex_cache_image.binding.is_target) { - // We have a larger image created and a separate one, representing a subres of it, - // bound as render target. In this case we need to rebind render target. - tex_cache_image.binding.needs_rebind = 1u; - GetImage(merged_image_id).binding.is_target = 1u; + FreeImage(cache_image_id); + return {merged_image_id, -1, -1}; + } - FreeImage(cache_image_id); - return {merged_image_id, -1, -1}; + // We need to have a larger, already allocated image to copy this one into + if (merged_image_id) { + tex_cache_image.Transit(vk::ImageLayout::eTransferSrcOptimal, + vk::AccessFlagBits2::eTransferRead, {}); + + const auto num_mips_to_copy = tex_cache_image.info.resources.levels; + ASSERT(num_mips_to_copy == 1); + + auto& merged_image = slot_images[merged_image_id]; + merged_image.CopyMip(tex_cache_image, mip, slice); + + FreeImage(cache_image_id); + } } - - tex_cache_image.Transit(vk::ImageLayout::eTransferSrcOptimal, - vk::AccessFlagBits2::eTransferRead, {}); - - const auto num_mips_to_copy = tex_cache_image.info.resources.levels; - ASSERT(num_mips_to_copy == 1); - - auto& merged_image = slot_images[merged_image_id]; - merged_image.CopyMip(tex_cache_image, mip); - - FreeImage(cache_image_id); } } @@ -302,7 +301,7 @@ ImageId TextureCache::FindImage(BaseDesc& desc, FindFlags flags) { std::scoped_lock lock{mutex}; boost::container::small_vector image_ids; - ForEachImageInRegion(info.guest_address, info.guest_size_bytes, + ForEachImageInRegion(info.guest_address, info.guest_size, [&](ImageId image_id, Image& image) { image_ids.push_back(image_id); }); ImageId image_id{}; @@ -313,8 +312,7 @@ ImageId TextureCache::FindImage(BaseDesc& desc, FindFlags flags) { if (cache_image.info.guest_address != info.guest_address) { continue; } - if (False(flags & FindFlags::RelaxSize) && - cache_image.info.guest_size_bytes != info.guest_size_bytes) { + if (False(flags & FindFlags::RelaxSize) && cache_image.info.guest_size != info.guest_size) { continue; } if (False(flags & FindFlags::RelaxDim) && cache_image.info.size != info.size) { @@ -346,8 +344,13 @@ ImageId TextureCache::FindImage(BaseDesc& desc, FindFlags flags) { view_slice = -1; const auto& merged_info = image_id ? slot_images[image_id].info : info; - std::tie(image_id, view_mip, view_slice) = + auto [overlap_image_id, overlap_view_mip, overlap_view_slice] = ResolveOverlap(merged_info, desc.type, cache_id, image_id); + if (overlap_image_id) { + image_id = overlap_image_id; + view_mip = overlap_view_mip; + view_slice = overlap_view_slice; + } } } @@ -370,12 +373,16 @@ ImageId TextureCache::FindImage(BaseDesc& desc, FindFlags flags) { RegisterImage(image_id); } + Image& image = slot_images[image_id]; + image.tick_accessed_last = scheduler.CurrentTick(); + + // If the image requested is a subresource of the image from cache record its location. if (view_mip > 0) { desc.view_info.range.base.level = view_mip; } - - Image& image = slot_images[image_id]; - image.tick_accessed_last = scheduler.CurrentTick(); + if (view_slice > 0) { + desc.view_info.range.base.layer = view_slice; + } return image_id; } @@ -455,7 +462,7 @@ ImageView& TextureCache::FindDepthTarget(BaseDesc& desc) { if (!stencil_id) { ImageInfo info{}; info.guest_address = desc.info.stencil_addr; - info.guest_size_bytes = desc.info.stencil_size; + info.guest_size = desc.info.stencil_size; info.size = desc.info.size; stencil_id = slot_images.insert(instance, scheduler, info); RegisterImage(stencil_id); @@ -476,6 +483,9 @@ void TextureCache::RefreshImage(Image& image, Vulkan::Scheduler* custom_schedule return; } + RENDERER_TRACE; + TRACE_HINT(fmt::format("{:x}:{:x}", image.info.guest_address, image.info.guest_size)); + if (True(image.flags & ImageFlagBits::MaybeCpuDirty) && False(image.flags & ImageFlagBits::CpuDirty)) { // The image size should be less than page size to be considered MaybeCpuDirty @@ -519,7 +529,7 @@ void TextureCache::RefreshImage(Image& image, Vulkan::Scheduler* custom_schedule } image_copy.push_back({ - .bufferOffset = mip.offset * num_layers, + .bufferOffset = mip.offset, .bufferRowLength = static_cast(mip.pitch), .bufferImageHeight = static_cast(mip.height), .imageSubresource{ @@ -541,12 +551,12 @@ void TextureCache::RefreshImage(Image& image, Vulkan::Scheduler* custom_schedule auto* sched_ptr = custom_scheduler ? custom_scheduler : &scheduler; sched_ptr->EndRendering(); - const auto cmdbuf = sched_ptr->CommandBuffer(); const VAddr image_addr = image.info.guest_address; - const size_t image_size = image.info.guest_size_bytes; + const size_t image_size = image.info.guest_size; const auto [vk_buffer, buf_offset] = buffer_cache.ObtainViewBuffer(image_addr, image_size, is_gpu_dirty); + const auto cmdbuf = sched_ptr->CommandBuffer(); // The obtained buffer may be written by a shader so we need to emit a barrier to prevent RAW // hazard if (auto barrier = vk_buffer->GetBarrier(vk::AccessFlagBits2::eTransferRead, @@ -612,7 +622,7 @@ void TextureCache::RegisterImage(ImageId image_id) { ASSERT_MSG(False(image.flags & ImageFlagBits::Registered), "Trying to register an already registered image"); image.flags |= ImageFlagBits::Registered; - ForEachPage(image.info.guest_address, image.info.guest_size_bytes, + ForEachPage(image.info.guest_address, image.info.guest_size, [this, image_id](u64 page) { page_table[page].push_back(image_id); }); } @@ -621,7 +631,7 @@ void TextureCache::UnregisterImage(ImageId image_id) { ASSERT_MSG(True(image.flags & ImageFlagBits::Registered), "Trying to unregister an already unregistered image"); image.flags &= ~ImageFlagBits::Registered; - ForEachPage(image.info.guest_address, image.info.guest_size_bytes, [this, image_id](u64 page) { + ForEachPage(image.info.guest_address, image.info.guest_size, [this, image_id](u64 page) { const auto page_it = page_table.find(page); if (page_it == nullptr) { UNREACHABLE_MSG("Unregistering unregistered page=0x{:x}", page << PageShift); @@ -639,8 +649,11 @@ void TextureCache::UnregisterImage(ImageId image_id) { void TextureCache::TrackImage(ImageId image_id) { auto& image = slot_images[image_id]; + if (!(image.flags & ImageFlagBits::Registered)) { + return; + } const auto image_begin = image.info.guest_address; - const auto image_end = image.info.guest_address + image.info.guest_size_bytes; + const auto image_end = image.info.guest_address + image.info.guest_size; if (image_begin == image.track_addr && image_end == image.track_addr_end) { return; } @@ -649,7 +662,7 @@ void TextureCache::TrackImage(ImageId image_id) { // Re-track the whole image image.track_addr = image_begin; image.track_addr_end = image_end; - tracker.UpdatePagesCachedCount(image_begin, image.info.guest_size_bytes, 1); + tracker.UpdatePagesCachedCount(image_begin, image.info.guest_size, 1); } else { if (image_begin < image.track_addr) { TrackImageHead(image_id); @@ -662,6 +675,9 @@ void TextureCache::TrackImage(ImageId image_id) { void TextureCache::TrackImageHead(ImageId image_id) { auto& image = slot_images[image_id]; + if (!(image.flags & ImageFlagBits::Registered)) { + return; + } const auto image_begin = image.info.guest_address; if (image_begin == image.track_addr) { return; @@ -674,7 +690,10 @@ void TextureCache::TrackImageHead(ImageId image_id) { void TextureCache::TrackImageTail(ImageId image_id) { auto& image = slot_images[image_id]; - const auto image_end = image.info.guest_address + image.info.guest_size_bytes; + if (!(image.flags & ImageFlagBits::Registered)) { + return; + } + const auto image_end = image.info.guest_address + image.info.guest_size; if (image_end == image.track_addr_end) { return; } @@ -719,7 +738,7 @@ void TextureCache::UntrackImageHead(ImageId image_id) { void TextureCache::UntrackImageTail(ImageId image_id) { auto& image = slot_images[image_id]; - const auto image_end = image.info.guest_address + image.info.guest_size_bytes; + const auto image_end = image.info.guest_address + image.info.guest_size; if (!image.IsTracked() || image.track_addr_end < image_end) { return; } diff --git a/src/video_core/texture_cache/texture_cache.h b/src/video_core/texture_cache/texture_cache.h index 944f021df..f262768ea 100644 --- a/src/video_core/texture_cache/texture_cache.h +++ b/src/video_core/texture_cache/texture_cache.h @@ -65,7 +65,7 @@ public: struct TextureDesc : public BaseDesc { TextureDesc() = default; TextureDesc(const AmdGpu::Image& image, const Shader::ImageResource& desc) - : BaseDesc{desc.IsStorage(image) ? BindingType::Storage : BindingType::Texture, + : BaseDesc{desc.is_written ? BindingType::Storage : BindingType::Texture, ImageInfo{image, desc}, ImageViewInfo{image, desc}} {} }; @@ -79,9 +79,9 @@ public: DepthTargetDesc(const AmdGpu::Liverpool::DepthBuffer& buffer, const AmdGpu::Liverpool::DepthView& view, const AmdGpu::Liverpool::DepthControl& ctl, VAddr htile_address, - const AmdGpu::Liverpool::CbDbExtent& hint = {}) + const AmdGpu::Liverpool::CbDbExtent& hint = {}, bool write_buffer = false) : BaseDesc{BindingType::DepthTarget, - ImageInfo{buffer, view.NumSlices(), htile_address, hint}, + ImageInfo{buffer, view.NumSlices(), htile_address, hint, write_buffer}, ImageViewInfo{buffer, view, ctl}} {} }; @@ -118,6 +118,7 @@ public: /// Updates image contents if it was modified by CPU. void UpdateImage(ImageId image_id, Vulkan::Scheduler* custom_scheduler = nullptr) { + std::scoped_lock lock{mutex}; Image& image = slot_images[image_id]; TrackImage(image_id); RefreshImage(image, custom_scheduler); diff --git a/src/video_core/texture_cache/tile.h b/src/video_core/texture_cache/tile.h new file mode 100644 index 000000000..54938b801 --- /dev/null +++ b/src/video_core/texture_cache/tile.h @@ -0,0 +1,347 @@ +// SPDX-FileCopyrightText: Copyright 2025 shadPS4 Emulator Project +// SPDX-License-Identifier: GPL-2.0-or-later + +#pragma once + +#include "common/assert.h" +#include "common/types.h" + +namespace VideoCore { + +// clang-format off +// The table of macro tiles parameters for given tiling index (row) and bpp (column) +/* Calculation: + * - Inputs: + * TileMode, BytesPerPixel, NumFragments + * - Constants: + * MicroTileWidth = 8, MicroTileHeight = 8, + * Tile Mode LUTs: IsDepth(), IsPrt(), TileThickness(), TileSplit(), SampleSplit(), NumPipes() + * Macro Tile Mode LUTs: BankWidth(), BankHeight(), NumBanks(), MacroTileAspect() + * - Determine the macro tile mode: + * TileBytes = MicroTileWidth * MicroTileHeight * TileThickness(TileMode) * BytesPerPixel + * TileSplit = min(IsDepth(TileMode) ? TileSplit(TileMode) : max(TileBytes * SampleSplit(TileMode), 256), NumFragments * TileBytes, 1024) + * MacroTileModeIndex = log2(TileSplit / 64) + * MacroTileMode = IsPrt(TileMode) ? MacroTileModeIndex + 8 : MacroTileModeIndex + * - Calculate macro tile width and height: + * Width = NumPipes(TileMode) * BankWidth(MacroTileMode) * MicroTileWidth * MacroTileAspect(MacroTileMode, AltTileMode) + * Height = NumBanks(MacroTileMode, AltTileMode) * BankHeight(MacroTileMode, AltTileMode) * MicroTileHeight / MacroTileAspect(MacroTileMode, AltTileMode) + */ + +constexpr std::array macro_tile_extents_x1{ + std::pair{256u, 128u}, std::pair{256u, 128u}, std::pair{256u, 128u}, std::pair{256u, 128u}, std::pair{256u, 128u}, // 00 + std::pair{256u, 128u}, std::pair{128u, 128u}, std::pair{128u, 128u}, std::pair{128u, 128u}, std::pair{128u, 128u}, // 01 + std::pair{256u, 128u}, std::pair{128u, 128u}, std::pair{128u, 64u}, std::pair{128u, 64u}, std::pair{128u, 64u}, // 02 + std::pair{256u, 128u}, std::pair{128u, 128u}, std::pair{128u, 64u}, std::pair{128u, 64u}, std::pair{128u, 64u}, // 03 + std::pair{256u, 128u}, std::pair{128u, 128u}, std::pair{128u, 64u}, std::pair{128u, 64u}, std::pair{64u, 64u}, // 04 + std::pair{0u, 0u}, std::pair{0u, 0u}, std::pair{0u, 0u}, std::pair{0u, 0u}, std::pair{0u, 0u}, // 05 + std::pair{256u, 256u}, std::pair{256u, 128u}, std::pair{128u, 128u}, std::pair{128u, 128u}, std::pair{128u, 128u}, // 06 + std::pair{256u, 256u}, std::pair{256u, 128u}, std::pair{128u, 128u}, std::pair{128u, 64u}, std::pair{64u, 64u}, // 07 + std::pair{0u, 0u}, std::pair{0u, 0u}, std::pair{0u, 0u}, std::pair{0u, 0u}, std::pair{0u, 0u}, // 08 + std::pair{0u, 0u}, std::pair{0u, 0u}, std::pair{0u, 0u}, std::pair{0u, 0u}, std::pair{0u, 0u}, // 09 + std::pair{256u, 128u}, std::pair{128u, 128u}, std::pair{128u, 64u}, std::pair{128u, 64u}, std::pair{64u, 64u}, // 0A + std::pair{256u, 256u}, std::pair{256u, 128u}, std::pair{128u, 128u}, std::pair{128u, 64u}, std::pair{64u, 64u}, // 0B + std::pair{256u, 256u}, std::pair{256u, 128u}, std::pair{128u, 128u}, std::pair{128u, 64u}, std::pair{64u, 64u}, // 0C + std::pair{0u, 0u}, std::pair{0u, 0u}, std::pair{0u, 0u}, std::pair{0u, 0u}, std::pair{0u, 0u}, // 0D + std::pair{256u, 128u}, std::pair{128u, 128u}, std::pair{128u, 64u}, std::pair{128u, 64u}, std::pair{64u, 64u}, // 0E + std::pair{256u, 128u}, std::pair{128u, 128u}, std::pair{128u, 64u}, std::pair{128u, 64u}, std::pair{64u, 64u}, // 0F + std::pair{256u, 256u}, std::pair{256u, 128u}, std::pair{128u, 128u}, std::pair{128u, 64u}, std::pair{64u, 64u}, // 10 + std::pair{256u, 256u}, std::pair{256u, 128u}, std::pair{128u, 128u}, std::pair{128u, 64u}, std::pair{64u, 64u}, // 11 + std::pair{256u, 256u}, std::pair{256u, 128u}, std::pair{128u, 128u}, std::pair{128u, 64u}, std::pair{64u, 64u}, // 12 + std::pair{0u, 0u}, std::pair{0u, 0u}, std::pair{0u, 0u}, std::pair{0u, 0u}, std::pair{0u, 0u}, // 13 + std::pair{128u, 64u}, std::pair{128u, 64u}, std::pair{64u, 64u}, std::pair{64u, 64u}, std::pair{64u, 64u}, // 14 + std::pair{128u, 64u}, std::pair{128u, 64u}, std::pair{64u, 64u}, std::pair{64u, 64u}, std::pair{64u, 64u}, // 15 + std::pair{128u, 128u}, std::pair{128u, 64u}, std::pair{64u, 64u}, std::pair{64u, 64u}, std::pair{64u, 64u}, // 16 + std::pair{128u, 128u}, std::pair{128u, 64u}, std::pair{64u, 64u}, std::pair{64u, 64u}, std::pair{64u, 64u}, // 17 + std::pair{128u, 128u}, std::pair{128u, 64u}, std::pair{64u, 64u}, std::pair{64u, 64u}, std::pair{64u, 64u}, // 18 + std::pair{128u, 64u}, std::pair{64u, 64u}, std::pair{64u, 64u}, std::pair{64u, 64u}, std::pair{64u, 64u}, // 19 + std::pair{128u, 64u}, std::pair{64u, 64u}, std::pair{64u, 64u}, std::pair{64u, 64u}, std::pair{64u, 64u}, // 1A +}; + +constexpr std::array macro_tile_extents_x2{ + std::pair{256u, 128u}, std::pair{256u, 128u}, std::pair{256u, 128u}, std::pair{256u, 128u}, std::pair{256u, 128u}, // 00 + std::pair{128u, 128u}, std::pair{128u, 128u}, std::pair{128u, 128u}, std::pair{128u, 128u}, std::pair{128u, 128u}, // 01 + std::pair{128u, 128u}, std::pair{128u, 64u}, std::pair{128u, 64u}, std::pair{128u, 64u}, std::pair{128u, 64u}, // 02 + std::pair{128u, 128u}, std::pair{128u, 64u}, std::pair{128u, 64u}, std::pair{128u, 64u}, std::pair{128u, 64u}, // 03 + std::pair{128u, 128u}, std::pair{128u, 64u}, std::pair{128u, 64u}, std::pair{64u, 64u}, std::pair{64u, 64u}, // 04 + std::pair{0u, 0u}, std::pair{0u, 0u}, std::pair{0u, 0u}, std::pair{0u, 0u}, std::pair{0u, 0u}, // 05 + std::pair{256u, 128u}, std::pair{128u, 128u}, std::pair{128u, 128u}, std::pair{128u, 128u}, std::pair{128u, 128u}, // 06 + std::pair{256u, 128u}, std::pair{128u, 128u}, std::pair{128u, 64u}, std::pair{64u, 64u}, std::pair{64u, 64u}, // 07 + std::pair{0u, 0u}, std::pair{0u, 0u}, std::pair{0u, 0u}, std::pair{0u, 0u}, std::pair{0u, 0u}, // 08 + std::pair{0u, 0u}, std::pair{0u, 0u}, std::pair{0u, 0u}, std::pair{0u, 0u}, std::pair{0u, 0u}, // 09 + std::pair{128u, 128u}, std::pair{128u, 64u}, std::pair{128u, 64u}, std::pair{64u, 64u}, std::pair{64u, 64u}, // 0A + std::pair{256u, 128u}, std::pair{128u, 128u}, std::pair{128u, 64u}, std::pair{64u, 64u}, std::pair{64u, 64u}, // 0B + std::pair{256u, 128u}, std::pair{128u, 128u}, std::pair{128u, 64u}, std::pair{64u, 64u}, std::pair{64u, 64u}, // 0C + std::pair{0u, 0u}, std::pair{0u, 0u}, std::pair{0u, 0u}, std::pair{0u, 0u}, std::pair{0u, 0u}, // 0D + std::pair{128u, 128u}, std::pair{128u, 64u}, std::pair{128u, 64u}, std::pair{64u, 64u}, std::pair{64u, 64u}, // 0E + std::pair{128u, 128u}, std::pair{128u, 64u}, std::pair{128u, 64u}, std::pair{64u, 64u}, std::pair{64u, 64u}, // 0F + std::pair{256u, 128u}, std::pair{128u, 128u}, std::pair{128u, 64u}, std::pair{64u, 64u}, std::pair{64u, 64u}, // 10 + std::pair{256u, 128u}, std::pair{128u, 128u}, std::pair{128u, 64u}, std::pair{64u, 64u}, std::pair{64u, 64u}, // 11 + std::pair{256u, 128u}, std::pair{128u, 128u}, std::pair{128u, 64u}, std::pair{64u, 64u}, std::pair{64u, 64u}, // 12 + std::pair{0u, 0u}, std::pair{0u, 0u}, std::pair{0u, 0u}, std::pair{0u, 0u}, std::pair{0u, 0u}, // 13 + std::pair{128u, 64u}, std::pair{128u, 64u}, std::pair{64u, 64u}, std::pair{64u, 64u}, std::pair{64u, 64u}, // 14 + std::pair{128u, 64u}, std::pair{128u, 64u}, std::pair{64u, 64u}, std::pair{64u, 64u}, std::pair{64u, 64u}, // 15 + std::pair{128u, 128u}, std::pair{128u, 64u}, std::pair{64u, 64u}, std::pair{64u, 64u}, std::pair{64u, 64u}, // 16 + std::pair{128u, 128u}, std::pair{128u, 64u}, std::pair{64u, 64u}, std::pair{64u, 64u}, std::pair{64u, 64u}, // 17 + std::pair{128u, 128u}, std::pair{128u, 64u}, std::pair{64u, 64u}, std::pair{64u, 64u}, std::pair{64u, 64u}, // 18 + std::pair{128u, 64u}, std::pair{64u, 64u}, std::pair{64u, 64u}, std::pair{64u, 64u}, std::pair{64u, 64u}, // 19 + std::pair{128u, 64u}, std::pair{64u, 64u}, std::pair{64u, 64u}, std::pair{64u, 64u}, std::pair{64u, 64u}, // 1A +}; + +constexpr std::array macro_tile_extents_x4{ + std::pair{256u, 128u}, std::pair{256u, 128u}, std::pair{256u, 128u}, std::pair{256u, 128u}, std::pair{256u, 128u}, // 00 + std::pair{128u, 128u}, std::pair{128u, 128u}, std::pair{128u, 128u}, std::pair{128u, 128u}, std::pair{128u, 128u}, // 01 + std::pair{128u, 64u}, std::pair{128u, 64u}, std::pair{128u, 64u}, std::pair{128u, 64u}, std::pair{128u, 64u}, // 02 + std::pair{128u, 64u}, std::pair{128u, 64u}, std::pair{128u, 64u}, std::pair{128u, 64u}, std::pair{128u, 64u}, // 03 + std::pair{128u, 64u}, std::pair{128u, 64u}, std::pair{64u, 64u}, std::pair{64u, 64u}, std::pair{64u, 64u}, // 04 + std::pair{0u, 0u}, std::pair{0u, 0u}, std::pair{0u, 0u}, std::pair{0u, 0u}, std::pair{0u, 0u}, // 05 + std::pair{128u, 128u}, std::pair{128u, 128u}, std::pair{128u, 128u}, std::pair{128u, 128u}, std::pair{128u, 128u}, // 06 + std::pair{128u, 128u}, std::pair{128u, 64u}, std::pair{64u, 64u}, std::pair{64u, 64u}, std::pair{64u, 64u}, // 07 + std::pair{0u, 0u}, std::pair{0u, 0u}, std::pair{0u, 0u}, std::pair{0u, 0u}, std::pair{0u, 0u}, // 08 + std::pair{0u, 0u}, std::pair{0u, 0u}, std::pair{0u, 0u}, std::pair{0u, 0u}, std::pair{0u, 0u}, // 09 + std::pair{128u, 64u}, std::pair{128u, 64u}, std::pair{128u, 64u}, std::pair{64u, 64u}, std::pair{64u, 64u}, // 0A + std::pair{128u, 128u}, std::pair{128u, 128u}, std::pair{128u, 64u}, std::pair{64u, 64u}, std::pair{64u, 64u}, // 0B + std::pair{128u, 128u}, std::pair{128u, 128u}, std::pair{128u, 64u}, std::pair{64u, 64u}, std::pair{64u, 64u}, // 0C + std::pair{0u, 0u}, std::pair{0u, 0u}, std::pair{0u, 0u}, std::pair{0u, 0u}, std::pair{0u, 0u}, // 0D + std::pair{128u, 64u}, std::pair{128u, 64u}, std::pair{128u, 64u}, std::pair{64u, 64u}, std::pair{64u, 64u}, // 0E + std::pair{128u, 64u}, std::pair{128u, 64u}, std::pair{128u, 64u}, std::pair{64u, 64u}, std::pair{64u, 64u}, // 0F + std::pair{128u, 128u}, std::pair{128u, 128u}, std::pair{128u, 64u}, std::pair{64u, 64u}, std::pair{64u, 64u}, // 10 + std::pair{128u, 128u}, std::pair{128u, 128u}, std::pair{128u, 64u}, std::pair{64u, 64u}, std::pair{64u, 64u}, // 11 + std::pair{128u, 128u}, std::pair{128u, 128u}, std::pair{128u, 64u}, std::pair{64u, 64u}, std::pair{64u, 64u}, // 12 + std::pair{0u, 0u}, std::pair{0u, 0u}, std::pair{0u, 0u}, std::pair{0u, 0u}, std::pair{0u, 0u}, // 13 + std::pair{128u, 64u}, std::pair{128u, 64u}, std::pair{64u, 64u}, std::pair{64u, 64u}, std::pair{64u, 64u}, // 14 + std::pair{128u, 64u}, std::pair{128u, 64u}, std::pair{64u, 64u}, std::pair{64u, 64u}, std::pair{64u, 64u}, // 15 + std::pair{128u, 128u}, std::pair{128u, 64u}, std::pair{64u, 64u}, std::pair{64u, 64u}, std::pair{64u, 64u}, // 16 + std::pair{128u, 128u}, std::pair{128u, 64u}, std::pair{64u, 64u}, std::pair{64u, 64u}, std::pair{64u, 64u}, // 17 + std::pair{128u, 128u}, std::pair{128u, 64u}, std::pair{64u, 64u}, std::pair{64u, 64u}, std::pair{64u, 64u}, // 18 + std::pair{128u, 64u}, std::pair{64u, 64u}, std::pair{64u, 64u}, std::pair{64u, 64u}, std::pair{64u, 64u}, // 19 + std::pair{128u, 64u}, std::pair{64u, 64u}, std::pair{64u, 64u}, std::pair{64u, 64u}, std::pair{64u, 64u}, // 1A +}; + +constexpr std::array macro_tile_extents_x8{ + std::pair{256u, 128u}, std::pair{256u, 128u}, std::pair{256u, 128u}, std::pair{256u, 128u}, std::pair{256u, 128u}, // 00 + std::pair{128u, 128u}, std::pair{128u, 128u}, std::pair{128u, 128u}, std::pair{128u, 128u}, std::pair{128u, 128u}, // 01 + std::pair{128u, 64u}, std::pair{128u, 64u}, std::pair{128u, 64u}, std::pair{128u, 64u}, std::pair{128u, 64u}, // 02 + std::pair{128u, 64u}, std::pair{128u, 64u}, std::pair{128u, 64u}, std::pair{128u, 64u}, std::pair{128u, 64u}, // 03 + std::pair{128u, 64u}, std::pair{64u, 64u}, std::pair{64u, 64u}, std::pair{64u, 64u}, std::pair{64u, 64u}, // 04 + std::pair{0u, 0u}, std::pair{0u, 0u}, std::pair{0u, 0u}, std::pair{0u, 0u}, std::pair{0u, 0u}, // 05 + std::pair{128u, 128u}, std::pair{128u, 128u}, std::pair{128u, 128u}, std::pair{128u, 128u}, std::pair{128u, 128u}, // 06 + std::pair{128u, 64u}, std::pair{64u, 64u}, std::pair{64u, 64u}, std::pair{64u, 64u}, std::pair{64u, 64u}, // 07 + std::pair{0u, 0u}, std::pair{0u, 0u}, std::pair{0u, 0u}, std::pair{0u, 0u}, std::pair{0u, 0u}, // 08 + std::pair{0u, 0u}, std::pair{0u, 0u}, std::pair{0u, 0u}, std::pair{0u, 0u}, std::pair{0u, 0u}, // 09 + std::pair{128u, 64u}, std::pair{128u, 64u}, std::pair{128u, 64u}, std::pair{64u, 64u}, std::pair{64u, 64u}, // 0A + std::pair{128u, 128u}, std::pair{128u, 128u}, std::pair{128u, 64u}, std::pair{64u, 64u}, std::pair{64u, 64u}, // 0B + std::pair{128u, 128u}, std::pair{128u, 128u}, std::pair{128u, 64u}, std::pair{64u, 64u}, std::pair{64u, 64u}, // 0C + std::pair{0u, 0u}, std::pair{0u, 0u}, std::pair{0u, 0u}, std::pair{0u, 0u}, std::pair{0u, 0u}, // 0D + std::pair{128u, 64u}, std::pair{128u, 64u}, std::pair{128u, 64u}, std::pair{64u, 64u}, std::pair{64u, 64u}, // 0E + std::pair{128u, 64u}, std::pair{128u, 64u}, std::pair{128u, 64u}, std::pair{64u, 64u}, std::pair{64u, 64u}, // 0F + std::pair{128u, 128u}, std::pair{128u, 128u}, std::pair{128u, 64u}, std::pair{64u, 64u}, std::pair{64u, 64u}, // 10 + std::pair{128u, 128u}, std::pair{128u, 128u}, std::pair{128u, 64u}, std::pair{64u, 64u}, std::pair{64u, 64u}, // 11 + std::pair{128u, 128u}, std::pair{128u, 128u}, std::pair{128u, 64u}, std::pair{64u, 64u}, std::pair{64u, 64u}, // 12 + std::pair{0u, 0u}, std::pair{0u, 0u}, std::pair{0u, 0u}, std::pair{0u, 0u}, std::pair{0u, 0u}, // 13 + std::pair{128u, 64u}, std::pair{128u, 64u}, std::pair{64u, 64u}, std::pair{64u, 64u}, std::pair{64u, 64u}, // 14 + std::pair{128u, 64u}, std::pair{128u, 64u}, std::pair{64u, 64u}, std::pair{64u, 64u}, std::pair{64u, 64u}, // 15 + std::pair{128u, 128u}, std::pair{128u, 64u}, std::pair{64u, 64u}, std::pair{64u, 64u}, std::pair{64u, 64u}, // 16 + std::pair{128u, 128u}, std::pair{128u, 64u}, std::pair{64u, 64u}, std::pair{64u, 64u}, std::pair{64u, 64u}, // 17 + std::pair{128u, 128u}, std::pair{128u, 64u}, std::pair{64u, 64u}, std::pair{64u, 64u}, std::pair{64u, 64u}, // 18 + std::pair{128u, 64u}, std::pair{64u, 64u}, std::pair{64u, 64u}, std::pair{64u, 64u}, std::pair{64u, 64u}, // 19 + std::pair{128u, 64u}, std::pair{64u, 64u}, std::pair{64u, 64u}, std::pair{64u, 64u}, std::pair{64u, 64u}, // 1A +}; + +constexpr std::array macro_tile_extents_alt_x1{ + std::pair{256u, 128u}, std::pair{256u, 128u}, std::pair{256u, 128u}, std::pair{256u, 128u}, std::pair{256u, 128u}, // 00 + std::pair{256u, 128u}, std::pair{256u, 128u}, std::pair{256u, 128u}, std::pair{256u, 128u}, std::pair{256u, 128u}, // 01 + std::pair{256u, 128u}, std::pair{256u, 128u}, std::pair{128u, 128u}, std::pair{128u, 128u}, std::pair{128u, 128u}, // 02 + std::pair{256u, 128u}, std::pair{256u, 128u}, std::pair{128u, 128u}, std::pair{128u, 128u}, std::pair{128u, 128u}, // 03 + std::pair{256u, 128u}, std::pair{256u, 128u}, std::pair{128u, 128u}, std::pair{128u, 128u}, std::pair{128u, 64u}, // 04 + std::pair{0u, 0u}, std::pair{0u, 0u}, std::pair{0u, 0u}, std::pair{0u, 0u}, std::pair{0u, 0u}, // 05 + std::pair{256u, 256u}, std::pair{256u, 128u}, std::pair{128u, 128u}, std::pair{128u, 128u}, std::pair{128u, 128u}, // 06 + std::pair{256u, 256u}, std::pair{256u, 128u}, std::pair{128u, 128u}, std::pair{128u, 64u}, std::pair{128u, 32u}, // 07 + std::pair{0u, 0u}, std::pair{0u, 0u}, std::pair{0u, 0u}, std::pair{0u, 0u}, std::pair{0u, 0u}, // 08 + std::pair{0u, 0u}, std::pair{0u, 0u}, std::pair{0u, 0u}, std::pair{0u, 0u}, std::pair{0u, 0u}, // 09 + std::pair{256u, 128u}, std::pair{256u, 128u}, std::pair{128u, 128u}, std::pair{128u, 128u}, std::pair{128u, 64u}, // 0A + std::pair{256u, 256u}, std::pair{256u, 128u}, std::pair{128u, 128u}, std::pair{128u, 64u}, std::pair{128u, 32u}, // 0B + std::pair{256u, 256u}, std::pair{256u, 128u}, std::pair{128u, 128u}, std::pair{128u, 64u}, std::pair{128u, 32u}, // 0C + std::pair{0u, 0u}, std::pair{0u, 0u}, std::pair{0u, 0u}, std::pair{0u, 0u}, std::pair{0u, 0u}, // 0D + std::pair{256u, 128u}, std::pair{256u, 128u}, std::pair{128u, 128u}, std::pair{128u, 128u}, std::pair{128u, 64u}, // 0E + std::pair{256u, 128u}, std::pair{256u, 128u}, std::pair{128u, 128u}, std::pair{128u, 128u}, std::pair{128u, 64u}, // 0F + std::pair{256u, 256u}, std::pair{256u, 128u}, std::pair{128u, 128u}, std::pair{128u, 64u}, std::pair{128u, 32u}, // 10 + std::pair{256u, 256u}, std::pair{256u, 128u}, std::pair{128u, 128u}, std::pair{128u, 64u}, std::pair{128u, 32u}, // 11 + std::pair{256u, 256u}, std::pair{256u, 128u}, std::pair{128u, 128u}, std::pair{128u, 64u}, std::pair{128u, 32u}, // 12 + std::pair{0u, 0u}, std::pair{0u, 0u}, std::pair{0u, 0u}, std::pair{0u, 0u}, std::pair{0u, 0u}, // 13 + std::pair{128u, 128u}, std::pair{128u, 128u}, std::pair{128u, 64u}, std::pair{128u, 64u}, std::pair{128u, 64u}, // 14 + std::pair{128u, 128u}, std::pair{128u, 128u}, std::pair{128u, 64u}, std::pair{128u, 64u}, std::pair{128u, 64u}, // 15 + std::pair{128u, 128u}, std::pair{128u, 64u}, std::pair{128u, 32u}, std::pair{128u, 32u}, std::pair{128u, 32u}, // 16 + std::pair{128u, 128u}, std::pair{128u, 64u}, std::pair{128u, 32u}, std::pair{128u, 32u}, std::pair{128u, 32u}, // 17 + std::pair{128u, 128u}, std::pair{128u, 64u}, std::pair{128u, 32u}, std::pair{128u, 32u}, std::pair{128u, 32u}, // 18 + std::pair{128u, 128u}, std::pair{128u, 64u}, std::pair{128u, 64u}, std::pair{128u, 64u}, std::pair{128u, 64u}, // 19 + std::pair{128u, 128u}, std::pair{128u, 64u}, std::pair{128u, 64u}, std::pair{128u, 64u}, std::pair{128u, 64u}, // 1A +}; + +constexpr std::array macro_tile_extents_alt_x2{ + std::pair{256u, 128u}, std::pair{256u, 128u}, std::pair{256u, 128u}, std::pair{256u, 128u}, std::pair{256u, 128u}, // 00 + std::pair{256u, 128u}, std::pair{256u, 128u}, std::pair{256u, 128u}, std::pair{256u, 128u}, std::pair{256u, 128u}, // 01 + std::pair{256u, 128u}, std::pair{128u, 128u}, std::pair{128u, 128u}, std::pair{128u, 128u}, std::pair{128u, 128u}, // 02 + std::pair{256u, 128u}, std::pair{128u, 128u}, std::pair{128u, 128u}, std::pair{128u, 128u}, std::pair{128u, 128u}, // 03 + std::pair{256u, 128u}, std::pair{128u, 128u}, std::pair{128u, 128u}, std::pair{128u, 64u}, std::pair{128u, 64u}, // 04 + std::pair{0u, 0u}, std::pair{0u, 0u}, std::pair{0u, 0u}, std::pair{0u, 0u}, std::pair{0u, 0u}, // 05 + std::pair{256u, 128u}, std::pair{128u, 128u}, std::pair{128u, 128u}, std::pair{128u, 128u}, std::pair{128u, 128u}, // 06 + std::pair{256u, 128u}, std::pair{128u, 128u}, std::pair{128u, 64u}, std::pair{128u, 32u}, std::pair{128u, 32u}, // 07 + std::pair{0u, 0u}, std::pair{0u, 0u}, std::pair{0u, 0u}, std::pair{0u, 0u}, std::pair{0u, 0u}, // 08 + std::pair{0u, 0u}, std::pair{0u, 0u}, std::pair{0u, 0u}, std::pair{0u, 0u}, std::pair{0u, 0u}, // 09 + std::pair{256u, 128u}, std::pair{128u, 128u}, std::pair{128u, 128u}, std::pair{128u, 64u}, std::pair{128u, 64u}, // 0A + std::pair{256u, 128u}, std::pair{128u, 128u}, std::pair{128u, 64u}, std::pair{128u, 32u}, std::pair{128u, 32u}, // 0B + std::pair{256u, 128u}, std::pair{128u, 128u}, std::pair{128u, 64u}, std::pair{128u, 32u}, std::pair{128u, 32u}, // 0C + std::pair{0u, 0u}, std::pair{0u, 0u}, std::pair{0u, 0u}, std::pair{0u, 0u}, std::pair{0u, 0u}, // 0D + std::pair{256u, 128u}, std::pair{128u, 128u}, std::pair{128u, 128u}, std::pair{128u, 64u}, std::pair{128u, 64u}, // 0E + std::pair{256u, 128u}, std::pair{128u, 128u}, std::pair{128u, 128u}, std::pair{128u, 64u}, std::pair{128u, 64u}, // 0F + std::pair{256u, 128u}, std::pair{128u, 128u}, std::pair{128u, 64u}, std::pair{128u, 32u}, std::pair{128u, 32u}, // 10 + std::pair{256u, 128u}, std::pair{128u, 128u}, std::pair{128u, 64u}, std::pair{128u, 32u}, std::pair{128u, 32u}, // 11 + std::pair{256u, 128u}, std::pair{128u, 128u}, std::pair{128u, 64u}, std::pair{128u, 32u}, std::pair{128u, 32u}, // 12 + std::pair{0u, 0u}, std::pair{0u, 0u}, std::pair{0u, 0u}, std::pair{0u, 0u}, std::pair{0u, 0u}, // 13 + std::pair{128u, 128u}, std::pair{128u, 128u}, std::pair{128u, 64u}, std::pair{128u, 64u}, std::pair{128u, 64u}, // 14 + std::pair{128u, 128u}, std::pair{128u, 128u}, std::pair{128u, 64u}, std::pair{128u, 64u}, std::pair{128u, 64u}, // 15 + std::pair{128u, 128u}, std::pair{128u, 64u}, std::pair{128u, 32u}, std::pair{128u, 32u}, std::pair{128u, 32u}, // 16 + std::pair{128u, 128u}, std::pair{128u, 64u}, std::pair{128u, 32u}, std::pair{128u, 32u}, std::pair{128u, 32u}, // 17 + std::pair{128u, 128u}, std::pair{128u, 64u}, std::pair{128u, 32u}, std::pair{128u, 32u}, std::pair{128u, 32u}, // 18 + std::pair{128u, 128u}, std::pair{128u, 64u}, std::pair{128u, 64u}, std::pair{128u, 64u}, std::pair{128u, 64u}, // 19 + std::pair{128u, 128u}, std::pair{128u, 64u}, std::pair{128u, 64u}, std::pair{128u, 64u}, std::pair{128u, 64u}, // 1A +}; + +constexpr std::array macro_tile_extents_alt_x4{ + std::pair{256u, 128u}, std::pair{256u, 128u}, std::pair{256u, 128u}, std::pair{256u, 128u}, std::pair{256u, 128u}, // 00 + std::pair{256u, 128u}, std::pair{256u, 128u}, std::pair{256u, 128u}, std::pair{256u, 128u}, std::pair{256u, 128u}, // 01 + std::pair{128u, 128u}, std::pair{128u, 128u}, std::pair{128u, 128u}, std::pair{128u, 128u}, std::pair{128u, 128u}, // 02 + std::pair{128u, 128u}, std::pair{128u, 128u}, std::pair{128u, 128u}, std::pair{128u, 128u}, std::pair{128u, 128u}, // 03 + std::pair{128u, 128u}, std::pair{128u, 128u}, std::pair{128u, 64u}, std::pair{128u, 64u}, std::pair{128u, 64u}, // 04 + std::pair{0u, 0u}, std::pair{0u, 0u}, std::pair{0u, 0u}, std::pair{0u, 0u}, std::pair{0u, 0u}, // 05 + std::pair{128u, 128u}, std::pair{128u, 128u}, std::pair{128u, 128u}, std::pair{128u, 128u}, std::pair{128u, 128u}, // 06 + std::pair{128u, 128u}, std::pair{128u, 64u}, std::pair{128u, 32u}, std::pair{128u, 32u}, std::pair{128u, 32u}, // 07 + std::pair{0u, 0u}, std::pair{0u, 0u}, std::pair{0u, 0u}, std::pair{0u, 0u}, std::pair{0u, 0u}, // 08 + std::pair{0u, 0u}, std::pair{0u, 0u}, std::pair{0u, 0u}, std::pair{0u, 0u}, std::pair{0u, 0u}, // 09 + std::pair{128u, 128u}, std::pair{128u, 128u}, std::pair{128u, 128u}, std::pair{128u, 64u}, std::pair{128u, 64u}, // 0A + std::pair{128u, 128u}, std::pair{128u, 128u}, std::pair{128u, 64u}, std::pair{128u, 32u}, std::pair{128u, 32u}, // 0B + std::pair{128u, 128u}, std::pair{128u, 128u}, std::pair{128u, 64u}, std::pair{128u, 32u}, std::pair{128u, 32u}, // 0C + std::pair{0u, 0u}, std::pair{0u, 0u}, std::pair{0u, 0u}, std::pair{0u, 0u}, std::pair{0u, 0u}, // 0D + std::pair{128u, 128u}, std::pair{128u, 128u}, std::pair{128u, 128u}, std::pair{128u, 64u}, std::pair{128u, 64u}, // 0E + std::pair{128u, 128u}, std::pair{128u, 128u}, std::pair{128u, 128u}, std::pair{128u, 64u}, std::pair{128u, 64u}, // 0F + std::pair{128u, 128u}, std::pair{128u, 128u}, std::pair{128u, 64u}, std::pair{128u, 32u}, std::pair{128u, 32u}, // 10 + std::pair{128u, 128u}, std::pair{128u, 128u}, std::pair{128u, 64u}, std::pair{128u, 32u}, std::pair{128u, 32u}, // 11 + std::pair{128u, 128u}, std::pair{128u, 128u}, std::pair{128u, 64u}, std::pair{128u, 32u}, std::pair{128u, 32u}, // 12 + std::pair{0u, 0u}, std::pair{0u, 0u}, std::pair{0u, 0u}, std::pair{0u, 0u}, std::pair{0u, 0u}, // 13 + std::pair{128u, 128u}, std::pair{128u, 128u}, std::pair{128u, 64u}, std::pair{128u, 64u}, std::pair{128u, 64u}, // 14 + std::pair{128u, 128u}, std::pair{128u, 128u}, std::pair{128u, 64u}, std::pair{128u, 64u}, std::pair{128u, 64u}, // 15 + std::pair{128u, 128u}, std::pair{128u, 64u}, std::pair{128u, 32u}, std::pair{128u, 32u}, std::pair{128u, 32u}, // 16 + std::pair{128u, 128u}, std::pair{128u, 64u}, std::pair{128u, 32u}, std::pair{128u, 32u}, std::pair{128u, 32u}, // 17 + std::pair{128u, 128u}, std::pair{128u, 64u}, std::pair{128u, 32u}, std::pair{128u, 32u}, std::pair{128u, 32u}, // 18 + std::pair{128u, 128u}, std::pair{128u, 64u}, std::pair{128u, 64u}, std::pair{128u, 64u}, std::pair{128u, 64u}, // 19 + std::pair{128u, 128u}, std::pair{128u, 64u}, std::pair{128u, 64u}, std::pair{128u, 64u}, std::pair{128u, 64u}, // 1A +}; + +constexpr std::array macro_tile_extents_alt_x8{ + std::pair{256u, 128u}, std::pair{256u, 128u}, std::pair{256u, 128u}, std::pair{256u, 128u}, std::pair{256u, 128u}, // 00 + std::pair{256u, 128u}, std::pair{256u, 128u}, std::pair{256u, 128u}, std::pair{256u, 128u}, std::pair{256u, 128u}, // 01 + std::pair{128u, 128u}, std::pair{128u, 128u}, std::pair{128u, 128u}, std::pair{128u, 128u}, std::pair{128u, 128u}, // 02 + std::pair{128u, 128u}, std::pair{128u, 128u}, std::pair{128u, 128u}, std::pair{128u, 128u}, std::pair{128u, 128u}, // 03 + std::pair{128u, 128u}, std::pair{128u, 64u}, std::pair{128u, 64u}, std::pair{128u, 64u}, std::pair{128u, 64u}, // 04 + std::pair{0u, 0u}, std::pair{0u, 0u}, std::pair{0u, 0u}, std::pair{0u, 0u}, std::pair{0u, 0u}, // 05 + std::pair{128u, 128u}, std::pair{128u, 128u}, std::pair{128u, 128u}, std::pair{128u, 128u}, std::pair{128u, 128u}, // 06 + std::pair{128u, 64u}, std::pair{128u, 32u}, std::pair{128u, 32u}, std::pair{128u, 32u}, std::pair{128u, 32u}, // 07 + std::pair{0u, 0u}, std::pair{0u, 0u}, std::pair{0u, 0u}, std::pair{0u, 0u}, std::pair{0u, 0u}, // 08 + std::pair{0u, 0u}, std::pair{0u, 0u}, std::pair{0u, 0u}, std::pair{0u, 0u}, std::pair{0u, 0u}, // 09 + std::pair{128u, 128u}, std::pair{128u, 128u}, std::pair{128u, 128u}, std::pair{128u, 64u}, std::pair{128u, 64u}, // 0A + std::pair{128u, 128u}, std::pair{128u, 128u}, std::pair{128u, 64u}, std::pair{128u, 32u}, std::pair{128u, 32u}, // 0B + std::pair{128u, 128u}, std::pair{128u, 128u}, std::pair{128u, 64u}, std::pair{128u, 32u}, std::pair{128u, 32u}, // 0C + std::pair{0u, 0u}, std::pair{0u, 0u}, std::pair{0u, 0u}, std::pair{0u, 0u}, std::pair{0u, 0u}, // 0D + std::pair{128u, 128u}, std::pair{128u, 128u}, std::pair{128u, 128u}, std::pair{128u, 64u}, std::pair{128u, 64u}, // 0E + std::pair{128u, 128u}, std::pair{128u, 128u}, std::pair{128u, 128u}, std::pair{128u, 64u}, std::pair{128u, 64u}, // 0F + std::pair{128u, 128u}, std::pair{128u, 128u}, std::pair{128u, 64u}, std::pair{128u, 32u}, std::pair{128u, 32u}, // 10 + std::pair{128u, 128u}, std::pair{128u, 128u}, std::pair{128u, 64u}, std::pair{128u, 32u}, std::pair{128u, 32u}, // 11 + std::pair{128u, 128u}, std::pair{128u, 128u}, std::pair{128u, 64u}, std::pair{128u, 32u}, std::pair{128u, 32u}, // 12 + std::pair{0u, 0u}, std::pair{0u, 0u}, std::pair{0u, 0u}, std::pair{0u, 0u}, std::pair{0u, 0u}, // 13 + std::pair{128u, 128u}, std::pair{128u, 128u}, std::pair{128u, 64u}, std::pair{128u, 64u}, std::pair{128u, 64u}, // 14 + std::pair{128u, 128u}, std::pair{128u, 128u}, std::pair{128u, 64u}, std::pair{128u, 64u}, std::pair{128u, 64u}, // 15 + std::pair{128u, 128u}, std::pair{128u, 64u}, std::pair{128u, 32u}, std::pair{128u, 32u}, std::pair{128u, 32u}, // 16 + std::pair{128u, 128u}, std::pair{128u, 64u}, std::pair{128u, 32u}, std::pair{128u, 32u}, std::pair{128u, 32u}, // 17 + std::pair{128u, 128u}, std::pair{128u, 64u}, std::pair{128u, 32u}, std::pair{128u, 32u}, std::pair{128u, 32u}, // 18 + std::pair{128u, 128u}, std::pair{128u, 64u}, std::pair{128u, 64u}, std::pair{128u, 64u}, std::pair{128u, 64u}, // 19 + std::pair{128u, 128u}, std::pair{128u, 64u}, std::pair{128u, 64u}, std::pair{128u, 64u}, std::pair{128u, 64u}, // 1A +}; + +constexpr std::array macro_tile_extents{ + macro_tile_extents_x1, + macro_tile_extents_x2, + macro_tile_extents_x4, + macro_tile_extents_x8, +}; + +constexpr std::array macro_tile_extents_alt{ + macro_tile_extents_alt_x1, + macro_tile_extents_alt_x2, + macro_tile_extents_alt_x4, + macro_tile_extents_alt_x8, +}; +// clang-format on + +constexpr std::pair micro_tile_extent{8u, 8u}; +constexpr auto hw_pipe_interleave = 256u; + +constexpr std::pair GetMacroTileExtents(u32 tiling_idx, u32 bpp, u32 num_samples, + bool alt) { + ASSERT(num_samples <= 8); + const auto samples_log = static_cast(std::log2(num_samples)); + const auto row = tiling_idx * 5; + const auto column = std::bit_width(bpp) - 4; // bpps are 8, 16, 32, 64, 128 + return (alt ? macro_tile_extents_alt : macro_tile_extents)[samples_log][row + column]; +} + +constexpr std::pair ImageSizeLinearAligned(u32 pitch, u32 height, u32 bpp, + u32 num_samples) { + const auto pitch_align = std::max(8u, 64u / ((bpp + 7) / 8)); + auto pitch_aligned = (pitch + pitch_align - 1) & ~(pitch_align - 1); + const auto height_aligned = height; + size_t log_sz = pitch_aligned * height_aligned * num_samples; + const auto slice_align = std::max(64u, 256u / ((bpp + 7) / 8)); + while (log_sz % slice_align) { + pitch_aligned += pitch_align; + log_sz = pitch_aligned * height_aligned * num_samples; + } + return {pitch_aligned, (log_sz * bpp + 7) / 8}; +} + +constexpr std::pair ImageSizeMicroTiled(u32 pitch, u32 height, u32 thickness, u32 bpp, + u32 num_samples) { + const auto& [pitch_align, height_align] = micro_tile_extent; + auto pitch_aligned = (pitch + pitch_align - 1) & ~(pitch_align - 1); + const auto height_aligned = (height + height_align - 1) & ~(height_align - 1); + size_t log_sz = (pitch_aligned * height_aligned * bpp * num_samples + 7) / 8; + while ((log_sz * thickness) % 256) { + pitch_aligned += pitch_align; + log_sz = (pitch_aligned * height_aligned * bpp * num_samples + 7) / 8; + } + return {pitch_aligned, log_sz}; +} + +constexpr std::pair ImageSizeMacroTiled(u32 pitch, u32 height, u32 thickness, u32 bpp, + u32 num_samples, u32 tiling_idx, u32 mip_n, + bool alt) { + const auto& [pitch_align, height_align] = + GetMacroTileExtents(tiling_idx, bpp, num_samples, alt); + ASSERT(pitch_align != 0 && height_align != 0); + bool downgrade_to_micro = false; + if (mip_n > 0) { + const bool is_less_than_tile = pitch < pitch_align || height < height_align; + // TODO: threshold check + downgrade_to_micro = is_less_than_tile; + } + + if (downgrade_to_micro) { + return ImageSizeMicroTiled(pitch, height, thickness, bpp, num_samples); + } + + const auto pitch_aligned = (pitch + pitch_align - 1) & ~(pitch_align - 1); + const auto height_aligned = (height + height_align - 1) & ~(height_align - 1); + const auto log_sz = pitch_aligned * height_aligned * num_samples; + return {pitch_aligned, (log_sz * bpp + 7) / 8}; +} + +} // namespace VideoCore diff --git a/src/video_core/texture_cache/tile_manager.cpp b/src/video_core/texture_cache/tile_manager.cpp index c1243dafb..d7fc54338 100644 --- a/src/video_core/texture_cache/tile_manager.cpp +++ b/src/video_core/texture_cache/tile_manager.cpp @@ -8,110 +8,56 @@ #include "video_core/texture_cache/image_view.h" #include "video_core/texture_cache/tile_manager.h" -#include "video_core/host_shaders/detile_m32x1_comp.h" -#include "video_core/host_shaders/detile_m32x2_comp.h" -#include "video_core/host_shaders/detile_m32x4_comp.h" -#include "video_core/host_shaders/detile_m8x1_comp.h" -#include "video_core/host_shaders/detile_m8x2_comp.h" -#include "video_core/host_shaders/detile_macro32x1_comp.h" -#include "video_core/host_shaders/detile_macro32x2_comp.h" +#include "video_core/host_shaders/detilers/display_micro_64bpp_comp.h" +#include "video_core/host_shaders/detilers/macro_32bpp_comp.h" +#include "video_core/host_shaders/detilers/macro_64bpp_comp.h" +#include "video_core/host_shaders/detilers/macro_8bpp_comp.h" +#include "video_core/host_shaders/detilers/micro_128bpp_comp.h" +#include "video_core/host_shaders/detilers/micro_16bpp_comp.h" +#include "video_core/host_shaders/detilers/micro_32bpp_comp.h" +#include "video_core/host_shaders/detilers/micro_64bpp_comp.h" +#include "video_core/host_shaders/detilers/micro_8bpp_comp.h" -#include +// #include #include #include namespace VideoCore { -static vk::Format DemoteImageFormatForDetiling(vk::Format format) { - switch (format) { - case vk::Format::eR8Uint: - case vk::Format::eR8Unorm: - case vk::Format::eR8Snorm: - return vk::Format::eR8Uint; - case vk::Format::eR4G4B4A4UnormPack16: - case vk::Format::eB5G6R5UnormPack16: - case vk::Format::eR5G5B5A1UnormPack16: - case vk::Format::eR8G8Unorm: - case vk::Format::eR16Sfloat: - case vk::Format::eR16Uint: - case vk::Format::eR16Unorm: - case vk::Format::eD16Unorm: - return vk::Format::eR8G8Uint; - case vk::Format::eR8G8B8A8Srgb: - case vk::Format::eB8G8R8A8Srgb: - case vk::Format::eB8G8R8A8Unorm: - case vk::Format::eR8G8B8A8Unorm: - case vk::Format::eR8G8B8A8Snorm: - case vk::Format::eR8G8B8A8Uint: - case vk::Format::eR32Sfloat: - case vk::Format::eD32Sfloat: - case vk::Format::eR32Uint: - case vk::Format::eR16G16Sfloat: - case vk::Format::eR16G16Unorm: - case vk::Format::eR16G16Snorm: - case vk::Format::eB10G11R11UfloatPack32: - case vk::Format::eA2B10G10R10UnormPack32: - return vk::Format::eR32Uint; - case vk::Format::eBc1RgbaSrgbBlock: - case vk::Format::eBc1RgbaUnormBlock: - case vk::Format::eBc4UnormBlock: - case vk::Format::eR32G32Sfloat: - case vk::Format::eR32G32Uint: - case vk::Format::eR16G16B16A16Unorm: - case vk::Format::eR16G16B16A16Uint: - case vk::Format::eR16G16B16A16Sfloat: - return vk::Format::eR32G32Uint; - case vk::Format::eBc2SrgbBlock: - case vk::Format::eBc2UnormBlock: - case vk::Format::eBc3SrgbBlock: - case vk::Format::eBc3UnormBlock: - case vk::Format::eBc5UnormBlock: - case vk::Format::eBc5SnormBlock: - case vk::Format::eBc7SrgbBlock: - case vk::Format::eBc7UnormBlock: - case vk::Format::eBc6HUfloatBlock: - case vk::Format::eR32G32B32A32Uint: - case vk::Format::eR32G32B32A32Sfloat: - return vk::Format::eR32G32B32A32Uint; - default: - break; - } - - // Log missing formats only once to avoid spamming the log. - static constexpr size_t MaxFormatIndex = 256; - static std::array logged_formats{}; - if (const u32 index = u32(format); !logged_formats[index]) { - LOG_ERROR(Render_Vulkan, "Unexpected format for demotion {}", vk::to_string(format)); - logged_formats[index] = true; - } - return format; -} - const DetilerContext* TileManager::GetDetiler(const ImageInfo& info) const { - const auto format = DemoteImageFormatForDetiling(info.pixel_format); - + const auto bpp = info.num_bits * (info.props.is_block ? 16 : 1); switch (info.tiling_mode) { case AmdGpu::TilingMode::Texture_MicroTiled: - switch (format) { - case vk::Format::eR8Uint: - return &detilers[DetilerType::Micro8x1]; - case vk::Format::eR8G8Uint: - return &detilers[DetilerType::Micro8x2]; - case vk::Format::eR32Uint: - return &detilers[DetilerType::Micro32x1]; - case vk::Format::eR32G32Uint: - return &detilers[DetilerType::Micro32x2]; - case vk::Format::eR32G32B32A32Uint: - return &detilers[DetilerType::Micro32x4]; + switch (bpp) { + case 8: + return &detilers[DetilerType::Micro8]; + case 16: + return &detilers[DetilerType::Micro16]; + case 32: + return &detilers[DetilerType::Micro32]; + case 64: + return &detilers[DetilerType::Micro64]; + case 128: + return &detilers[DetilerType::Micro128]; default: return nullptr; } case AmdGpu::TilingMode::Texture_Volume: - switch (format) { - case vk::Format::eR32Uint: - return &detilers[DetilerType::Macro32x1]; - case vk::Format::eR32G32Uint: - return &detilers[DetilerType::Macro32x2]; + switch (bpp) { + case 8: + return &detilers[DetilerType::Macro8]; + case 32: + return &detilers[DetilerType::Macro32]; + case 64: + return &detilers[DetilerType::Macro64]; + default: + return nullptr; + } + break; + case AmdGpu::TilingMode::Display_MicroTiled: + switch (bpp) { + case 64: + return &detilers[DetilerType::Display_Micro64]; default: return nullptr; } @@ -131,10 +77,11 @@ struct DetilerParams { TileManager::TileManager(const Vulkan::Instance& instance, Vulkan::Scheduler& scheduler) : instance{instance}, scheduler{scheduler} { static const std::array detiler_shaders{ - HostShaders::DETILE_M8X1_COMP, HostShaders::DETILE_M8X2_COMP, - HostShaders::DETILE_M32X1_COMP, HostShaders::DETILE_M32X2_COMP, - HostShaders::DETILE_M32X4_COMP, HostShaders::DETILE_MACRO32X1_COMP, - HostShaders::DETILE_MACRO32X2_COMP, + HostShaders::MICRO_8BPP_COMP, HostShaders::MICRO_16BPP_COMP, + HostShaders::MICRO_32BPP_COMP, HostShaders::MICRO_64BPP_COMP, + HostShaders::MICRO_128BPP_COMP, HostShaders::MACRO_8BPP_COMP, + HostShaders::MACRO_32BPP_COMP, HostShaders::MACRO_64BPP_COMP, + HostShaders::DISPLAY_MICRO_64BPP_COMP, }; boost::container::static_vector bindings{ @@ -275,7 +222,7 @@ std::pair TileManager::TryDetile(vk::Buffer in_buffer, u32 in_o return {in_buffer, in_offset}; } - const u32 image_size = info.guest_size_bytes; + const u32 image_size = info.guest_size; // Prepare output buffer auto out_buffer = AllocBuffer(image_size, true); @@ -321,9 +268,9 @@ std::pair TileManager::TryDetile(vk::Buffer in_buffer, u32 in_o params.num_levels = info.resources.levels; params.pitch0 = info.pitch >> (info.props.is_block ? 2u : 0u); params.height = info.size.height; - if (info.tiling_mode == AmdGpu::TilingMode::Texture_Volume) { + if (info.tiling_mode == AmdGpu::TilingMode::Texture_Volume || + info.tiling_mode == AmdGpu::TilingMode::Display_MicroTiled) { ASSERT(info.resources.levels == 1); - ASSERT(info.num_bits >= 32); const auto tiles_per_row = info.pitch / 8u; const auto tiles_per_slice = tiles_per_row * ((info.size.height + 7u) / 8u); params.sizes[0] = tiles_per_row; @@ -332,8 +279,7 @@ std::pair TileManager::TryDetile(vk::Buffer in_buffer, u32 in_o ASSERT(info.resources.levels <= 14); std::memset(¶ms.sizes, 0, sizeof(params.sizes)); for (int m = 0; m < info.resources.levels; ++m) { - params.sizes[m] = info.mips_layout[m].size * info.resources.layers + - (m > 0 ? params.sizes[m - 1] : 0); + params.sizes[m] = info.mips_layout[m].size + (m > 0 ? params.sizes[m - 1] : 0); } } diff --git a/src/video_core/texture_cache/tile_manager.h b/src/video_core/texture_cache/tile_manager.h index 1d731d2f2..adda16b3d 100644 --- a/src/video_core/texture_cache/tile_manager.h +++ b/src/video_core/texture_cache/tile_manager.h @@ -12,14 +12,17 @@ class TextureCache; struct ImageInfo; enum DetilerType : u32 { - Micro8x1, - Micro8x2, - Micro32x1, - Micro32x2, - Micro32x4, + Micro8, + Micro16, + Micro32, + Micro64, + Micro128, - Macro32x1, - Macro32x2, + Macro8, + Macro32, + Macro64, + + Display_Micro64, Max };