Compare commits
282 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 1b595318e7 | |||
| 1cff5b35d4 | |||
| 9c5584956e | |||
| 2af497efbb | |||
| 58a09e6838 | |||
| b5b93e962b | |||
| 10e0fb2b54 | |||
| 0a6f9ed967 | |||
| a7edfa221e | |||
| 451e953d26 | |||
| 5c2c4a6649 | |||
| 09580594e6 | |||
| efc9ae98ed | |||
| 7da0822419 | |||
| e1c6df0df3 | |||
| 7965a0313c | |||
| 0cc61d0ef0 | |||
| 1966171838 | |||
| 2643fbdea4 | |||
| 82bbb0cc05 | |||
| d91927ee97 | |||
| ae670c35f7 | |||
| d1ccadbac2 | |||
| 78a661db79 | |||
| b65f977c54 | |||
| 1b87e186c4 | |||
| 3eb1e6303c | |||
| 3b8efecc52 | |||
| 6716d555ff | |||
| 27c56cde22 | |||
| a635e24fc2 | |||
| dce0abc8b9 | |||
| 88e13d8326 | |||
| 061be74cdb | |||
| d6f2f66f2b | |||
| b8d0396f71 | |||
| a0df1e09a6 | |||
| 7e03828f35 | |||
| 9407974c10 | |||
| 3381a884d0 | |||
| 415c2d0795 | |||
| 92d0707291 | |||
| c6f3737c2a | |||
| ec77f2ab92 | |||
| 0b784ff2c1 | |||
| c443326fb1 | |||
| 2ac171a30f | |||
| 7369169331 | |||
| d5470d92ec | |||
| cc7e7300ce | |||
| 3ce4c95e61 | |||
| 1ab3a0bd73 | |||
| 99f1f4c22a | |||
| 41a4dd4c1c | |||
| 1080969b51 | |||
| 6165c2d8b3 | |||
| 036693a14d | |||
| c9d39ce7ae | |||
| da84326bd0 | |||
| f255392a75 | |||
| af3154a0d4 | |||
| d2b96636db | |||
| 635eac7704 | |||
| 51417cc8c3 | |||
| 2614450e4b | |||
| 8ea27b0aca | |||
| 4f76aec6b3 | |||
| dfdb33befb | |||
| e76bd11f53 | |||
| 4b4399f63f | |||
| 796189ce68 | |||
| a8f80ebfe9 | |||
| cb3662cc4d | |||
| fb237dd568 | |||
| 799cb79612 | |||
| 1c22cc2f52 | |||
| 0bb2f72ee2 | |||
| b16d267f9d | |||
| 9ffa923da6 | |||
| 8feccffec0 | |||
| 3a16b2e92c | |||
| a8bfa6a16c | |||
| e135012acd | |||
| 9de6a38e13 | |||
| 0baf873534 | |||
| 35a66fe776 | |||
| 0be8a5f9f4 | |||
| 01fe39fbb9 | |||
| cfc124fabf | |||
| 15961b353a | |||
| d4573e233a | |||
| 9307abe7f5 | |||
| 05bab8ec4c | |||
| 9e9ae54455 | |||
| e696d9b324 | |||
| 43e04f3fc7 | |||
| 62701154f1 | |||
| 15f29eedee | |||
| 439d665096 | |||
| 418a99a62b | |||
| 1eac13b6bf | |||
| e58bd419f6 | |||
| 5e176a390f | |||
| a49cfc5a91 | |||
| d3fedffa6a | |||
| 33c3e3fb0f | |||
| 1d23be8429 | |||
| 7a4e88c146 | |||
| cfeb022340 | |||
| 0cc655074d | |||
| a5ba96e991 | |||
| b2949f114b | |||
| e3df7bccac | |||
| 2c45438422 | |||
| 4ef1d48c0c | |||
| 7b6a672c64 | |||
| 883529eaf3 | |||
| afc10ea112 | |||
| 488e5d9eb5 | |||
| 6d976b5d90 | |||
| b44e2d3b30 | |||
| a196bbcbcd | |||
| 6000e3a47d | |||
| 623f5822b3 | |||
| c6dadc537b | |||
| 98a0c76a08 | |||
| a2d5b5a0e2 | |||
| d376ba5994 | |||
| 6a4b9430c0 | |||
| 3bf735161f | |||
| 4d0c835df3 | |||
| 6eb4138595 | |||
| 53817dcc90 | |||
| 99044ce6c6 | |||
| 575a245f8d | |||
| 385710672f | |||
| beb3565001 | |||
| ec7f50d925 | |||
| 1a479e9bda | |||
| 19cc363b09 | |||
| 760b49bc6c | |||
| 70eca8cb24 | |||
| ff0249d662 | |||
| d450a5ee95 | |||
| 1cf927aef9 | |||
| 8678402c25 | |||
| ee2ea0cb02 | |||
| cf0b4d4ed4 | |||
| cc50049bca | |||
| c6a76eb9af | |||
| 67e8e373a7 | |||
| 304964ba71 | |||
| d2c58765cd | |||
| 385d21e6dc | |||
| 0fd6956bb0 | |||
| 5073477415 | |||
| c56147e04b | |||
| 79fc366f23 | |||
| 9d4ff13c2b | |||
| e18ae5abd6 | |||
| f3ef4f3658 | |||
| 73a62b4bf6 | |||
| cd47113ed8 | |||
| 8793e6ded7 | |||
| 29a3c36e26 | |||
| 141ac0d09f | |||
| 657ab4261c | |||
| 5491fbee5b | |||
| 18f82f0006 | |||
| 30ca2370ab | |||
| 21eaee0e23 | |||
| cd7e1e1e2b | |||
| 4b30e82aee | |||
| 83c0212b59 | |||
| 4eb0ee23db | |||
| b4a72b6223 | |||
| c9a7abdd09 | |||
| 49d11b2e36 | |||
| 83764fbbb4 | |||
| 64ec19f018 | |||
| 692c88f0e9 | |||
| 8dbe88782c | |||
| b08829817f | |||
| 585f47c2d9 | |||
| 56a254ba9c | |||
| 55ead61ea8 | |||
| f96cfe08f4 | |||
| 49081d0d82 | |||
| a31ebc248e | |||
| 3d11b6efa3 | |||
| 13cd461a1f | |||
| 68b7e5971d | |||
| 24655fd975 | |||
| 05d12f68ad | |||
| d84fe592c8 | |||
| b4505600c7 | |||
| a4ea71d18f | |||
| 729826ec40 | |||
| a8b0c0be07 | |||
| 926de68a79 | |||
| cf850598eb | |||
| 2b9f076024 | |||
| d63e643081 | |||
| 9a2bcd2508 | |||
| f3b9d64df7 | |||
| 68c58281e5 | |||
| 07df91d4e8 | |||
| 378a69ea85 | |||
| 191e132c6c | |||
| fce07bbeab | |||
| 3e427c57f0 | |||
| 9afebfdd72 | |||
| 109b841d8d | |||
| b94ddb0cd3 | |||
| b073d08a52 | |||
| fcf0b74c79 | |||
| e7fd4224ad | |||
| 8778e69f9d | |||
| 108247dccc | |||
| 9b3b9562c0 | |||
| e7f1a34fe1 | |||
| 0a29ca2946 | |||
| 0e8f1a9bf9 | |||
| a9f6b012b8 | |||
| 4ba4bddb09 | |||
| 3b51368be2 | |||
| 0111fd0d0e | |||
| cc86e01df9 | |||
| 1dfee5fbfa | |||
| 21f65f087d | |||
| ac849b958f | |||
| 806a1202c5 | |||
| 2ee1770383 | |||
| 21da04364d | |||
| a66ba27791 | |||
| 3fa3298a31 | |||
| eccb3f6d0b | |||
| 29901d65ed | |||
| 0bb83ed5e9 | |||
| 2d14742a05 | |||
| 6eaaadec71 | |||
| b89f7515fd | |||
| 05096854bc | |||
| 68d74bc28a | |||
| 1475625705 | |||
| 935e83a490 | |||
| 4df58494a0 | |||
| f16dfd8ca2 | |||
| 72dc5b3489 | |||
| b89cc9b973 | |||
| e7faec6b0e | |||
| 7866dc2e34 | |||
| 070add461f | |||
| 1211acd59c | |||
| d78c39b3ab | |||
| 81bb4b5951 | |||
| 9461294ffc | |||
| 7087582a36 | |||
| 201be08a85 | |||
| c3729d06d0 | |||
| e8f730e61f | |||
| c5bbee7a0a | |||
| 8c00842614 | |||
| 72437b50b4 | |||
| e9b24eba85 | |||
| 2b0f786b2d | |||
| 2262ac1684 | |||
| c68f42e0ee | |||
| 73cee9a43d | |||
| 6d766ccbb5 | |||
| bcf581dc82 | |||
| c782b45b97 | |||
| 7858053bb9 | |||
| 2d0d4119f4 | |||
| d2d76bb560 | |||
| bc22df8ba8 | |||
| b053b1e200 | |||
| d3c0ec5651 | |||
| 695799c39a | |||
| 85d1649696 | |||
| 1417f9b7de | |||
| 0e31aafc09 |
@@ -1,9 +1,9 @@
|
||||
#!/bin/sh -ex
|
||||
|
||||
# Pull all the submodules except llvm
|
||||
# Pull all the submodules except llvm and opencv
|
||||
# Note: Tried to use git submodule status, but it takes over 20 seconds
|
||||
# shellcheck disable=SC2046
|
||||
git submodule -q update --init --depth 1 $(awk '/path/ && !/llvm/ { print $3 }' .gitmodules)
|
||||
git submodule -q update --init --depth 1 $(awk '/path/ && !/llvm/ && !/opencv/ { print $3 }' .gitmodules)
|
||||
|
||||
# Prefer newer Clang than in base system (see also .ci/install-freebsd.sh)
|
||||
# libc++ isn't in llvm* packages, so download manually
|
||||
@@ -27,6 +27,7 @@ CONFIGURE_ARGS="
|
||||
-DUSE_SYSTEM_FFMPEG=ON
|
||||
-DUSE_SYSTEM_CURL=ON
|
||||
-DUSE_SYSTEM_LIBPNG=ON
|
||||
-DUSE_SYSTEM_OPENCV=ON
|
||||
"
|
||||
|
||||
# shellcheck disable=SC2086
|
||||
|
||||
@@ -6,9 +6,9 @@ fi
|
||||
|
||||
git config --global --add safe.directory '*'
|
||||
|
||||
# Pull all the submodules except llvm
|
||||
# Pull all the submodules except llvm and opencv
|
||||
# shellcheck disable=SC2046
|
||||
git submodule -q update --init $(awk '/path/ && !/llvm/ { print $3 }' .gitmodules)
|
||||
git submodule -q update --init $(awk '/path/ && !/llvm/ && !/opencv/ { print $3 }' .gitmodules)
|
||||
|
||||
mkdir build && cd build || exit 1
|
||||
|
||||
@@ -25,6 +25,7 @@ cmake .. \
|
||||
-DUSE_SDL=ON \
|
||||
-DUSE_SYSTEM_SDL=ON \
|
||||
-DUSE_SYSTEM_FFMPEG=OFF \
|
||||
-DUSE_SYSTEM_OPENCV=ON \
|
||||
-DUSE_DISCORD_RPC=ON \
|
||||
-DOpenGL_GL_PREFERENCE=LEGACY \
|
||||
-DLLVM_DIR=/opt/llvm/lib/cmake/llvm \
|
||||
|
||||
+3
-2
@@ -6,10 +6,10 @@ fi
|
||||
|
||||
git config --global --add safe.directory '*'
|
||||
|
||||
# Pull all the submodules except llvm
|
||||
# Pull all the submodules except llvm and opencv
|
||||
# Note: Tried to use git submodule status, but it takes over 20 seconds
|
||||
# shellcheck disable=SC2046
|
||||
git submodule -q update --init $(awk '/path/ && !/llvm/ { print $3 }' .gitmodules)
|
||||
git submodule -q update --init $(awk '/path/ && !/llvm/ && !/opencv/ { print $3 }' .gitmodules)
|
||||
|
||||
mkdir build && cd build || exit 1
|
||||
|
||||
@@ -44,6 +44,7 @@ cmake .. \
|
||||
-DUSE_SDL=ON \
|
||||
-DUSE_SYSTEM_SDL=ON \
|
||||
-DUSE_SYSTEM_FFMPEG=OFF \
|
||||
-DUSE_SYSTEM_OPENCV=ON \
|
||||
-DUSE_DISCORD_RPC=ON \
|
||||
-DOpenGL_GL_PREFERENCE=LEGACY \
|
||||
-DLLVM_DIR=/opt/llvm/lib/cmake/llvm \
|
||||
|
||||
@@ -71,10 +71,14 @@ if [ ! -d "/tmp/Qt/$QT_VER" ]; then
|
||||
git clone https://github.com/engnr/qt-downloader.git
|
||||
cd qt-downloader
|
||||
git checkout f52efee0f18668c6d6de2dec0234b8c4bc54c597
|
||||
# nested Qt 6.8.1 URL workaround
|
||||
# sed -i '' "s/'qt{0}_{0}{1}{2}'.format(major, minor, patch)]))/'qt{0}_{0}{1}{2}'.format(major, minor, patch), 'qt{0}_{0}{1}{2}'.format(major, minor, patch)]))/g" qt-downloader
|
||||
# sed -i '' "s/'{}\/{}\/qt{}_{}\/'/'{0}\/{1}\/qt{2}_{3}\/qt{2}_{3}\/'/g" qt-downloader
|
||||
cd "/tmp/Qt"
|
||||
"$BREW_X64_PATH/bin/pipenv" run pip3 install py7zr requests semantic_version lxml
|
||||
mkdir -p "$QT_VER/macos" ; ln -s "macos" "$QT_VER/clang_64"
|
||||
"$BREW_X64_PATH/bin/pipenv" run "$WORKDIR/qt-downloader/qt-downloader" macos desktop "$QT_VER" clang_64 --opensource --addons qtmultimedia qtimageformats
|
||||
# sed -i '' 's/args\.version \/ derive_toolchain_dir(args) \/ //g' "$WORKDIR/qt-downloader/qt-downloader" # Qt 6.8.1 workaround
|
||||
"$BREW_X64_PATH/bin/pipenv" run "$WORKDIR/qt-downloader/qt-downloader" macos desktop "$QT_VER" clang_64 --opensource --addons qtmultimedia qtimageformats # -o "$QT_VER/clang_64"
|
||||
fi
|
||||
|
||||
cd "$WORKDIR"
|
||||
@@ -131,6 +135,7 @@ export MACOSX_DEPLOYMENT_TARGET=13.0
|
||||
-DUSE_SYSTEM_MVK=ON \
|
||||
-DUSE_SYSTEM_FAUDIO=OFF \
|
||||
-DUSE_SYSTEM_SDL=ON \
|
||||
-DUSE_SYSTEM_OPENCV=ON \
|
||||
$CMAKE_EXTRA_OPTS \
|
||||
-DLLVM_TARGET_ARCH=arm64 \
|
||||
-DCMAKE_OSX_ARCHITECTURES=arm64 \
|
||||
|
||||
+8
-3
@@ -39,10 +39,14 @@ if [ ! -d "/tmp/Qt/$QT_VER" ]; then
|
||||
git clone https://github.com/engnr/qt-downloader.git
|
||||
cd qt-downloader
|
||||
git checkout f52efee0f18668c6d6de2dec0234b8c4bc54c597
|
||||
# nested Qt 6.8.1 URL workaround
|
||||
# sed -i '' "s/'qt{0}_{0}{1}{2}'.format(major, minor, patch)]))/'qt{0}_{0}{1}{2}'.format(major, minor, patch), 'qt{0}_{0}{1}{2}'.format(major, minor, patch)]))/g" qt-downloader
|
||||
# sed -i '' "s/'{}\/{}\/qt{}_{}\/'/'{0}\/{1}\/qt{2}_{3}\/qt{2}_{3}\/'/g" qt-downloader
|
||||
cd "/tmp/Qt"
|
||||
"$BREW_X64_PATH/bin/pipenv" run pip3 install py7zr requests semantic_version lxml
|
||||
mkdir -p "$QT_VER/macos" ; ln -s "macos" "$QT_VER/clang_64"
|
||||
"$BREW_X64_PATH/bin/pipenv" run "$WORKDIR/qt-downloader/qt-downloader" macos desktop "$QT_VER" clang_64 --opensource --addons qtmultimedia qtimageformats
|
||||
# sed -i '' 's/args\.version \/ derive_toolchain_dir(args) \/ //g' "$WORKDIR/qt-downloader/qt-downloader" # Qt 6.8.1 workaround
|
||||
"$BREW_X64_PATH/bin/pipenv" run "$WORKDIR/qt-downloader/qt-downloader" macos desktop "$QT_VER" clang_64 --opensource --addons qtmultimedia qtimageformats # -o "$QT_VER/clang_64"
|
||||
fi
|
||||
|
||||
cd "$WORKDIR"
|
||||
@@ -65,9 +69,9 @@ export VK_ICD_FILENAMES="$VULKAN_SDK/share/vulkan/icd.d/MoltenVK_icd.json"
|
||||
|
||||
export LLVM_DIR
|
||||
LLVM_DIR="BREW_X64_PATH/opt/llvm@$LLVM_COMPILER_VER"
|
||||
# exclude ffmpeg, LLVM, and sdl from submodule update
|
||||
# exclude ffmpeg, LLVM, opencv, and sdl from submodule update
|
||||
# shellcheck disable=SC2046
|
||||
git submodule -q update --init --depth=1 --jobs=8 $(awk '/path/ && !/ffmpeg/ && !/llvm/ && !/SDL/ { print $3 }' .gitmodules)
|
||||
git submodule -q update --init --depth=1 --jobs=8 $(awk '/path/ && !/ffmpeg/ && !/llvm/ && !/opencv/ && !/SDL/ { print $3 }' .gitmodules)
|
||||
|
||||
# 3rdparty fixes
|
||||
sed -i '' "s/extern const double NSAppKitVersionNumber;/const double NSAppKitVersionNumber = 1343;/g" 3rdparty/hidapi/hidapi/mac/hid.c
|
||||
@@ -98,6 +102,7 @@ export MACOSX_DEPLOYMENT_TARGET=13.0
|
||||
-DUSE_SYSTEM_MVK=ON \
|
||||
-DUSE_SYSTEM_FAUDIO=OFF \
|
||||
-DUSE_SYSTEM_SDL=ON \
|
||||
-DUSE_SYSTEM_OPENCV=ON \
|
||||
$CMAKE_EXTRA_OPTS \
|
||||
-DLLVM_TARGET_ARCH=X86_64 \
|
||||
-DCMAKE_OSX_ARCHITECTURES=x86_64 \
|
||||
|
||||
@@ -11,9 +11,9 @@ PR_NUMBER="$SYSTEM_PULLREQUEST_PULLREQUESTID"
|
||||
QT_HOST="http://qt.mirror.constant.com/"
|
||||
QT_URL_VER=$(echo "$QT_VER" | sed "s/\.//g")
|
||||
QT_VER_MSVC_UP=$(echo "${QT_VER_MSVC}" | tr '[:lower:]' '[:upper:]')
|
||||
QT_PREFIX="online/qtsdkrepository/windows_x86/desktop/qt${QT_VER_MAIN}_${QT_URL_VER}/qt.qt${QT_VER_MAIN}.${QT_URL_VER}."
|
||||
QT_PREFIX="online/qtsdkrepository/windows_x86/desktop/qt${QT_VER_MAIN}_${QT_URL_VER}/qt${QT_VER_MAIN}_${QT_URL_VER}/qt.qt${QT_VER_MAIN}.${QT_URL_VER}."
|
||||
QT_PREFIX_2="win64_${QT_VER_MSVC}_64/${QT_VER}-0-${QT_DATE}"
|
||||
QT_SUFFIX="-Windows-Windows_10_22H2-${QT_VER_MSVC_UP}-Windows-Windows_10_22H2-X86_64.7z"
|
||||
QT_SUFFIX="-Windows-Windows_11_23H2-${QT_VER_MSVC_UP}-Windows-Windows_11_23H2-X86_64.7z"
|
||||
QT_BASE_URL="${QT_HOST}${QT_PREFIX}${QT_PREFIX_2}qtbase${QT_SUFFIX}"
|
||||
QT_DECL_URL="${QT_HOST}${QT_PREFIX}${QT_PREFIX_2}qtdeclarative${QT_SUFFIX}"
|
||||
QT_TOOL_URL="${QT_HOST}${QT_PREFIX}${QT_PREFIX_2}qttools${QT_SUFFIX}"
|
||||
@@ -68,7 +68,7 @@ download_and_verify()
|
||||
}
|
||||
|
||||
# Some dependencies install here
|
||||
[ -d "./lib" ] || mkdir "./lib"
|
||||
[ -d "./build/lib_ext/Release-x64" ] || mkdir -p "./build/lib_ext/Release-x64"
|
||||
|
||||
for url in $DEP_URLS; do
|
||||
# Get the filename from the URL and remove query strings (?arg=something).
|
||||
@@ -77,9 +77,9 @@ for url in $DEP_URLS; do
|
||||
|
||||
# shellcheck disable=SC1003
|
||||
case "$url" in
|
||||
*qt*) checksum=$(curl -fL "${url}.sha1"); algo="sha1"; outDir='C:\Qt\' ;;
|
||||
*llvm*) checksum=$(curl -fL "${url}.sha256"); algo="sha256"; outDir="./3rdparty/llvm" ;;
|
||||
*glslang*) checksum=$(curl -fL "${url}.sha256"); algo="sha256"; outDir="./lib/Release-x64" ;;
|
||||
*qt*) checksum=$(curl -fL "${url}.sha1"); algo="sha1"; outDir="$QTDIR/" ;;
|
||||
*llvm*) checksum=$(curl -fL "${url}.sha256"); algo="sha256"; outDir="./build/lib_ext/Release-x64" ;;
|
||||
*glslang*) checksum=$(curl -fL "${url}.sha256"); algo="sha256"; outDir="./build/lib_ext/Release-x64" ;;
|
||||
*Vulkan*)
|
||||
# Vulkan setup needs to be run in batch environment
|
||||
# Need to subshell this or else it doesn't wait
|
||||
|
||||
+4
-4
@@ -7,7 +7,7 @@ env:
|
||||
BUILD_SOURCEBRANCHNAME: $CIRRUS_BRANCH
|
||||
RPCS3_TOKEN: ENCRYPTED[100ebb8e3552bf2021d0ef55dccda3e58d27be5b6cab0b0b92843ef490195d3c4edaefa087e4a3b425caa6392300b9b1]
|
||||
QT_VER_MAIN: '6'
|
||||
QT_VER: '6.7.3'
|
||||
QT_VER: '6.8.1'
|
||||
|
||||
# windows_task:
|
||||
# matrix:
|
||||
@@ -20,8 +20,8 @@ env:
|
||||
# CIRRUS_SHELL: "bash"
|
||||
# COMPILER: msvc
|
||||
# BUILD_ARTIFACTSTAGINGDIRECTORY: ${CIRRUS_WORKING_DIR}\artifacts\
|
||||
# QT_VER_MSVC: 'msvc2019'
|
||||
# QT_DATE: '202409200836'
|
||||
# QT_VER_MSVC: 'msvc2022'
|
||||
# QT_DATE: '202411221531'
|
||||
# QTDIR: C:\Qt\${QT_VER}\${QT_VER_MSVC}_64
|
||||
# VULKAN_VER: '1.3.268.0'
|
||||
# VULKAN_SDK_SHA: '8459ef49bd06b697115ddd3d97c9aec729e849cd775f5be70897718a9b3b9db5'
|
||||
@@ -56,7 +56,7 @@ env:
|
||||
|
||||
# linux_task:
|
||||
# container:
|
||||
# image: rpcs3/rpcs3-ci-focal:1.7
|
||||
# image: rpcs3/rpcs3-ci-focal:1.9
|
||||
# cpu: 4
|
||||
# memory: 16G
|
||||
# env:
|
||||
|
||||
-19
@@ -120,25 +120,6 @@ CMakeLists.txt.user
|
||||
# yaml-cpp
|
||||
yaml-cpp.pc
|
||||
|
||||
# libusb
|
||||
/3rdparty/libusb_cmake/config.h
|
||||
/3rdparty/libusb_cmake/libusb-1.0.pc
|
||||
|
||||
# miniupnp
|
||||
/3rdparty/miniupnp/x64/*
|
||||
|
||||
# opencv
|
||||
/3rdparty/opencv/*
|
||||
|
||||
# llvm
|
||||
/3rdparty/llvm/llvm_build
|
||||
|
||||
# legacy llvm
|
||||
/llvm_build
|
||||
|
||||
# ssl certificate
|
||||
cacert.pem
|
||||
|
||||
_ReSharper.*/
|
||||
CMakeUserPresets.json
|
||||
|
||||
|
||||
@@ -96,3 +96,11 @@
|
||||
path = 3rdparty/stblib/stb
|
||||
url = ../../nothings/stb.git
|
||||
ignore = dirty
|
||||
[submodule "3rdparty/opencv/opencv"]
|
||||
path = 3rdparty/opencv/opencv
|
||||
url = ../../Megamouse/opencv_minimal.git
|
||||
ignore = dirty
|
||||
[submodule "3rdparty/fusion/fusion"]
|
||||
path = 3rdparty/fusion/fusion
|
||||
url = ../../xioTechnologies/Fusion.git
|
||||
ignore = dirty
|
||||
|
||||
Vendored
+1
-1
Submodule 3rdparty/7zip/7zip updated: e008ce3976...e5431fa6f5
Vendored
+2
-2
@@ -179,8 +179,8 @@
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup>
|
||||
<OutDir>$(SolutionDir)lib/$(Configuration)-$(Platform)/</OutDir>
|
||||
<IntDir>$(SolutionDir)tmp\$(ProjectName)-$(Configuration)-$(Platform)/</IntDir>
|
||||
<OutDir>$(SolutionDir)build\lib\$(Configuration)-$(Platform)\</OutDir>
|
||||
<IntDir>$(SolutionDir)build\tmp\$(ProjectName)-$(Configuration)-$(Platform)\</IntDir>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
|
||||
Vendored
+9
-1
@@ -44,7 +44,7 @@ add_subdirectory(libpng EXCLUDE_FROM_ALL)
|
||||
|
||||
# pugixml
|
||||
if (USE_SYSTEM_PUGIXML)
|
||||
pkg_check_modules(PUGIXML REQUIRED IMPORTED_TARGET pugixml>=1.11)
|
||||
pkg_check_modules(PUGIXML REQUIRED IMPORTED_TARGET pugixml>=1.15)
|
||||
add_library(pugixml INTERFACE)
|
||||
target_link_libraries(pugixml INTERFACE PkgConfig::PUGIXML)
|
||||
else()
|
||||
@@ -343,6 +343,12 @@ add_subdirectory(miniupnp EXCLUDE_FROM_ALL)
|
||||
# RTMIDI
|
||||
add_subdirectory(rtmidi EXCLUDE_FROM_ALL)
|
||||
|
||||
# OPENCV
|
||||
add_subdirectory(opencv EXCLUDE_FROM_ALL)
|
||||
|
||||
# FUSION
|
||||
add_subdirectory(fusion EXCLUDE_FROM_ALL)
|
||||
|
||||
# add nice ALIAS targets for ease of use
|
||||
if(USE_SYSTEM_LIBUSB)
|
||||
add_library(3rdparty::libusb ALIAS usb-1.0-shared)
|
||||
@@ -373,3 +379,5 @@ add_library(3rdparty::soundtouch ALIAS soundtouch)
|
||||
add_library(3rdparty::sdl2 ALIAS ${SDL2_TARGET})
|
||||
add_library(3rdparty::miniupnpc ALIAS libminiupnpc-static)
|
||||
add_library(3rdparty::rtmidi ALIAS rtmidi)
|
||||
add_library(3rdparty::opencv ALIAS ${OPENCV_TARGET})
|
||||
add_library(3rdparty::fusion ALIAS Fusion)
|
||||
|
||||
Vendored
+1
-1
Submodule 3rdparty/FAudio updated: 54bff04461...707114aef2
Vendored
+13
-9
@@ -1,13 +1,17 @@
|
||||
# OpenAL
|
||||
if(USE_SYSTEM_OPENAL)
|
||||
find_package(OpenAL REQUIRED)
|
||||
add_library(3rdparty_openal INTERFACE)
|
||||
target_include_directories(3rdparty_openal INTERFACE ${OPENAL_INCLUDE_DIR})
|
||||
target_link_libraries(3rdparty_openal INTERFACE ${OPENAL_LIBRARY})
|
||||
if(WIN32)
|
||||
find_package(OpenAL CONFIG REQUIRED)
|
||||
else()
|
||||
find_package(OpenAL REQUIRED)
|
||||
endif()
|
||||
add_library(3rdparty_openal INTERFACE)
|
||||
target_link_libraries(3rdparty_openal INTERFACE OpenAL::OpenAL)
|
||||
set_target_properties(OpenAL::OpenAL PROPERTIES IMPORTED_GLOBAL ON)
|
||||
else()
|
||||
option(ALSOFT_UTILS "Build utility programs" OFF)
|
||||
option(ALSOFT_EXAMPLES "Build example programs" OFF)
|
||||
add_subdirectory(openal-soft EXCLUDE_FROM_ALL)
|
||||
add_library(3rdparty_openal INTERFACE)
|
||||
target_link_libraries(3rdparty_openal INTERFACE OpenAL::OpenAL)
|
||||
option(ALSOFT_UTILS "Build utility programs" OFF)
|
||||
option(ALSOFT_EXAMPLES "Build example programs" OFF)
|
||||
add_subdirectory(openal-soft EXCLUDE_FROM_ALL)
|
||||
add_library(3rdparty_openal INTERFACE)
|
||||
target_link_libraries(3rdparty_openal INTERFACE OpenAL::OpenAL)
|
||||
endif()
|
||||
|
||||
Vendored
+1
-1
Submodule 3rdparty/OpenAL/openal-soft updated: d3875f333f...90191edd20
Vendored
+34
-14
@@ -48,34 +48,54 @@
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros">
|
||||
<CmakeReleaseCLI>call vsdevcmd.bat -arch=amd64
|
||||
cd ./openal-soft/build
|
||||
cmake -G Ninja -DCMAKE_CXX_COMPILER="cl.exe" -DCMAKE_C_COMPILER="cl.exe" -DCMAKE_BUILD_TYPE="Release" -DCMAKE_INSTALL_PREFIX="./Release" -DCMAKE_SYSTEM_VERSION=6.1 -DLIBTYPE=STATIC -DFORCE_STATIC_VCRT=true -DALSOFT_UTILS=false -DALSOFT_EXAMPLES=false -DALSOFT_INSTALL=false -DALSOFT_INSTALL_CONFIG=false -DALSOFT_INSTALL_HRTF_DATA=false -DALSOFT_INSTALL_AMBDEC_PRESETS=false -DALSOFT_INSTALL_EXAMPLES=false -DALSOFT_INSTALL_UTILS=false ..</CmakeReleaseCLI>
|
||||
cd "$(SolutionDir)build\tmp\$(ProjectName)-$(Configuration)-$(Platform)"
|
||||
cmake -G Ninja -DCMAKE_CXX_COMPILER="cl.exe" -DCMAKE_C_COMPILER="cl.exe" -DCMAKE_BUILD_TYPE="Release" -DCMAKE_INSTALL_PREFIX="./Release" -DCMAKE_SYSTEM_VERSION=6.1 -DLIBTYPE=STATIC -DFORCE_STATIC_VCRT=true -DALSOFT_UTILS=false -DALSOFT_EXAMPLES=false -DALSOFT_INSTALL=false -DALSOFT_INSTALL_CONFIG=false -DALSOFT_INSTALL_HRTF_DATA=false -DALSOFT_INSTALL_AMBDEC_PRESETS=false -DALSOFT_INSTALL_EXAMPLES=false -DALSOFT_INSTALL_UTILS=false "$(SolutionDir)3rdparty\OpenAL\openal-soft"
|
||||
</CmakeReleaseCLI>
|
||||
<CmakeDebugCLI>call vsdevcmd.bat -arch=amd64
|
||||
cd ./openal-soft/build
|
||||
cmake -G Ninja -DCMAKE_CXX_COMPILER="cl.exe" -DCMAKE_C_COMPILER="cl.exe" -DCMAKE_BUILD_TYPE="Debug" -DCMAKE_INSTALL_PREFIX="./Debug" -DCMAKE_SYSTEM_VERSION=6.1 -DLIBTYPE=STATIC -DALSOFT_UTILS=false -DALSOFT_EXAMPLES=false -DALSOFT_INSTALL=false -DALSOFT_INSTALL_CONFIG=false -DALSOFT_INSTALL_HRTF_DATA=false -DALSOFT_INSTALL_AMBDEC_PRESETS=false -DALSOFT_INSTALL_EXAMPLES=false -DALSOFT_INSTALL_UTILS=false ..</CmakeDebugCLI>
|
||||
<CmakeCleanCLI>echo Cleaning..
|
||||
cd ./openal-soft/build
|
||||
cd "$(SolutionDir)build\tmp\$(ProjectName)-$(Configuration)-$(Platform)"
|
||||
cmake -G Ninja -DCMAKE_CXX_COMPILER="cl.exe" -DCMAKE_C_COMPILER="cl.exe" -DCMAKE_BUILD_TYPE="Debug" -DCMAKE_INSTALL_PREFIX="./Debug" -DCMAKE_SYSTEM_VERSION=6.1 -DLIBTYPE=STATIC -DALSOFT_UTILS=false -DALSOFT_EXAMPLES=false -DALSOFT_INSTALL=false -DALSOFT_INSTALL_CONFIG=false -DALSOFT_INSTALL_HRTF_DATA=false -DALSOFT_INSTALL_AMBDEC_PRESETS=false -DALSOFT_INSTALL_EXAMPLES=false -DALSOFT_INSTALL_UTILS=false "$(SolutionDir)3rdparty\OpenAL\openal-soft"
|
||||
</CmakeDebugCLI>
|
||||
<CmakeCopyCLI>
|
||||
echo Copying..
|
||||
copy "$(SolutionDir)build\tmp\$(ProjectName)-$(Configuration)-$(Platform)\OpenAL32.lib" "$(SolutionDir)build\lib\$(Configuration)-$(Platform)"
|
||||
</CmakeCopyCLI>
|
||||
<CmakeCleanCLI>
|
||||
echo Cleaning..
|
||||
del "$(SolutionDir)build\lib\$(Configuration)-$(Platform)\OpenAL32.lib"
|
||||
rmdir /s /q "$(SolutionDir)build\tmp\$(ProjectName)-$(Configuration)-$(Platform)"
|
||||
</CmakeCleanCLI>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<NMakeBuildCommandLine>$(CmakeDebugCLI)
|
||||
ninja
|
||||
</NMakeBuildCommandLine>
|
||||
<NMakeReBuildCommandLine>del CMakeCache.txt
|
||||
<OutDir>$(SolutionDir)build\lib\$(Configuration)-$(Platform)\</OutDir>
|
||||
<IntDir>$(SolutionDir)build\tmp\$(ProjectName)-$(Configuration)-$(Platform)\</IntDir>
|
||||
<NMakeBuildCommandLine>
|
||||
$(CmakeDebugCLI)
|
||||
ninja
|
||||
$(CmakeCopyCLI)
|
||||
</NMakeBuildCommandLine>
|
||||
<NMakeReBuildCommandLine>
|
||||
$(CmakeCleanCLI)
|
||||
$(CmakeDebugCLI)
|
||||
ninja
|
||||
$(CmakeCopyCLI)
|
||||
</NMakeReBuildCommandLine>
|
||||
<NMakeCleanCommandLine>
|
||||
$(CmakeCleanCLI)
|
||||
</NMakeCleanCommandLine>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<NMakeBuildCommandLine>$(CmakeReleaseCLI)
|
||||
ninja
|
||||
</NMakeBuildCommandLine>
|
||||
<NMakeReBuildCommandLine>del CMakeCache.txt
|
||||
<OutDir>$(SolutionDir)build\lib\$(Configuration)-$(Platform)\</OutDir>
|
||||
<IntDir>$(SolutionDir)build\tmp\$(ProjectName)-$(Configuration)-$(Platform)\</IntDir>
|
||||
<NMakeBuildCommandLine>
|
||||
$(CmakeReleaseCLI)
|
||||
ninja
|
||||
$(CmakeCopyCLI)
|
||||
</NMakeBuildCommandLine>
|
||||
<NMakeReBuildCommandLine>
|
||||
$(CmakeCleanCLI)
|
||||
$(CmakeReleaseCLI)
|
||||
ninja
|
||||
$(CmakeCopyCLI)
|
||||
</NMakeReBuildCommandLine>
|
||||
<NMakeCleanCommandLine>
|
||||
$(CmakeCleanCLI)
|
||||
|
||||
Vendored
+8
@@ -179,6 +179,14 @@
|
||||
<PropertyGroup>
|
||||
<PreferredToolArchitecture>x64</PreferredToolArchitecture>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<OutDir>$(SolutionDir)build\lib\$(Configuration)-$(Platform)\</OutDir>
|
||||
<IntDir>$(SolutionDir)build\tmp\$(ProjectName)-$(Configuration)-$(Platform)\</IntDir>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<OutDir>$(SolutionDir)build\lib\$(Configuration)-$(Platform)\</OutDir>
|
||||
<IntDir>$(SolutionDir)build\tmp\$(ProjectName)-$(Configuration)-$(Platform)\</IntDir>
|
||||
</PropertyGroup>
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets">
|
||||
|
||||
Vendored
+8
@@ -73,6 +73,14 @@
|
||||
<Import Project="$(SolutionDir)\buildfiles\msvc\rpcs3_release.props" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<OutDir>$(SolutionDir)build\lib\$(Configuration)-$(Platform)\</OutDir>
|
||||
<IntDir>$(SolutionDir)build\tmp\$(ProjectName)-$(Configuration)-$(Platform)\</IntDir>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<OutDir>$(SolutionDir)build\lib\$(Configuration)-$(Platform)\</OutDir>
|
||||
<IntDir>$(SolutionDir)build\tmp\$(ProjectName)-$(Configuration)-$(Platform)\</IntDir>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup>
|
||||
<ClCompile>
|
||||
<WarningLevel>TurnOffAllWarnings</WarningLevel>
|
||||
|
||||
Vendored
+1
-1
Submodule 3rdparty/curl/curl updated: 7eb8c04847...75a2079d5c
Vendored
+4
-4
@@ -33,8 +33,8 @@
|
||||
</ImportGroup>
|
||||
<PropertyGroup>
|
||||
<_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
|
||||
<OutDir>$(SolutionDir)lib\$(Configuration)-$(Platform)\</OutDir>
|
||||
<IntDir>$(SolutionDir)tmp\$(ProjectName)-$(Configuration)-$(Platform)\</IntDir>
|
||||
<OutDir>$(SolutionDir)build\lib\$(Configuration)-$(Platform)\</OutDir>
|
||||
<IntDir>$(SolutionDir)build\tmp\$(ProjectName)-$(Configuration)-$(Platform)\</IntDir>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup>
|
||||
<Midl>
|
||||
@@ -87,7 +87,6 @@
|
||||
<ClCompile Include="curl\lib\curl_memrchr.c" />
|
||||
<ClCompile Include="curl\lib\curl_multibyte.c" />
|
||||
<ClCompile Include="curl\lib\curl_ntlm_core.c" />
|
||||
<ClCompile Include="curl\lib\curl_path.c" />
|
||||
<ClCompile Include="curl\lib\curl_range.c" />
|
||||
<ClCompile Include="curl\lib\curl_rtmp.c" />
|
||||
<ClCompile Include="curl\lib\curl_sasl.c" />
|
||||
@@ -209,6 +208,7 @@
|
||||
<ClCompile Include="curl\lib\vauth\spnego_sspi.c" />
|
||||
<ClCompile Include="curl\lib\vauth\vauth.c" />
|
||||
<ClCompile Include="curl\lib\vquic\vquic.c" />
|
||||
<ClCompile Include="curl\lib\vssh\curl_path.c" />
|
||||
<ClCompile Include="curl\lib\vssh\libssh.c" />
|
||||
<ClCompile Include="curl\lib\vssh\libssh2.c" />
|
||||
<ClCompile Include="curl\lib\vssh\wolfssh.c" />
|
||||
@@ -279,7 +279,6 @@
|
||||
<ClInclude Include="curl\lib\curl_memrchr.h" />
|
||||
<ClInclude Include="curl\lib\curl_multibyte.h" />
|
||||
<ClInclude Include="curl\lib\curl_ntlm_core.h" />
|
||||
<ClInclude Include="curl\lib\curl_path.h" />
|
||||
<ClInclude Include="curl\lib\curl_printf.h" />
|
||||
<ClInclude Include="curl\lib\curl_range.h" />
|
||||
<ClInclude Include="curl\lib\curl_rtmp.h" />
|
||||
@@ -388,6 +387,7 @@
|
||||
<ClInclude Include="curl\lib\vauth\ntlm.h" />
|
||||
<ClInclude Include="curl\lib\vauth\vauth.h" />
|
||||
<ClInclude Include="curl\lib\vquic\vquic.h" />
|
||||
<ClInclude Include="curl\lib\vssh\curl_path.h" />
|
||||
<ClInclude Include="curl\lib\vssh\ssh.h" />
|
||||
<ClInclude Include="curl\lib\vtls\bearssl.h" />
|
||||
<ClInclude Include="curl\lib\vtls\gtls.h" />
|
||||
|
||||
+6
-6
@@ -75,9 +75,6 @@
|
||||
<ClCompile Include="curl\lib\curl_ntlm_core.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="curl\lib\curl_path.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="curl\lib\curl_range.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
@@ -363,6 +360,9 @@
|
||||
<ClCompile Include="curl\lib\vauth\vauth.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="curl\lib\vssh\curl_path.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="curl\lib\vssh\libssh.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
@@ -644,9 +644,6 @@
|
||||
<ClInclude Include="curl\lib\curl_ntlm_core.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="curl\lib\curl_path.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="curl\lib\curl_printf.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
@@ -887,6 +884,9 @@
|
||||
<ClInclude Include="curl\lib\vauth\vauth.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="curl\lib\vssh\curl_path.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="curl\lib\vssh\ssh.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
|
||||
Vendored
+1
@@ -0,0 +1 @@
|
||||
add_subdirectory(fusion EXCLUDE_FROM_ALL)
|
||||
+1
Submodule 3rdparty/fusion/fusion added at fecf2f0af3
Vendored
+75
@@ -0,0 +1,75 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug|x64">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|x64">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="fusion\Fusion\Fusion.h" />
|
||||
<ClInclude Include="fusion\Fusion\FusionAhrs.h" />
|
||||
<ClInclude Include="fusion\Fusion\FusionAxes.h" />
|
||||
<ClInclude Include="fusion\Fusion\FusionCalibration.h" />
|
||||
<ClInclude Include="fusion\Fusion\FusionCompass.h" />
|
||||
<ClInclude Include="fusion\Fusion\FusionConvention.h" />
|
||||
<ClInclude Include="fusion\Fusion\FusionMath.h" />
|
||||
<ClInclude Include="fusion\Fusion\FusionOffset.h" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="fusion\Fusion\FusionAhrs.c" />
|
||||
<ClCompile Include="fusion\Fusion\FusionCompass.c" />
|
||||
<ClCompile Include="fusion\Fusion\FusionOffset.c" />
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<RootNamespace>Fusion</RootNamespace>
|
||||
<ProjectGuid>{3C67A2FF-4710-402A-BE3E-31B0CB0576DF}</ProjectGuid>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(SolutionDir)\buildfiles\msvc\common_default.props" />
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<Import Project="$(SolutionDir)\buildfiles\msvc\common_default_macros.props" />
|
||||
<PropertyGroup Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<PropertyGroup>
|
||||
<PreferredToolArchitecture>x64</PreferredToolArchitecture>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<OutDir>$(SolutionDir)build\lib\$(Configuration)-$(Platform)\</OutDir>
|
||||
<IntDir>$(SolutionDir)build\tmp\$(ProjectName)-$(Configuration)-$(Platform)\</IntDir>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<OutDir>$(SolutionDir)build\lib\$(Configuration)-$(Platform)\</OutDir>
|
||||
<IntDir>$(SolutionDir)build\tmp\$(ProjectName)-$(Configuration)-$(Platform)\</IntDir>
|
||||
</PropertyGroup>
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="Shared">
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="$(SolutionDir)\buildfiles\msvc\rpcs3_default.props" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<Import Project="$(SolutionDir)\buildfiles\msvc\rpcs3_debug.props" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<Import Project="$(SolutionDir)\buildfiles\msvc\rpcs3_release.props" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<ItemDefinitionGroup>
|
||||
<ClCompile>
|
||||
<ExceptionHandling>Sync</ExceptionHandling>
|
||||
<Optimization Condition="'$(Configuration)|$(Platform)'=='Release|x64'">MaxSpeed</Optimization>
|
||||
</ClCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
||||
+29
@@ -0,0 +1,29 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup>
|
||||
<Filter Include="Source Files">
|
||||
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="fusion\Fusion\Fusion.h" />
|
||||
<ClInclude Include="fusion\Fusion\FusionAhrs.h" />
|
||||
<ClInclude Include="fusion\Fusion\FusionAxes.h" />
|
||||
<ClInclude Include="fusion\Fusion\FusionCalibration.h" />
|
||||
<ClInclude Include="fusion\Fusion\FusionCompass.h" />
|
||||
<ClInclude Include="fusion\Fusion\FusionConvention.h" />
|
||||
<ClInclude Include="fusion\Fusion\FusionMath.h" />
|
||||
<ClInclude Include="fusion\Fusion\FusionOffset.h" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="fusion\Fusion\FusionAhrs.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="fusion\Fusion\FusionCompass.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="fusion\Fusion\FusionOffset.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
Vendored
+48
-16
@@ -39,31 +39,63 @@
|
||||
<PropertyGroup Label="UserMacros">
|
||||
<CmakeGenerator>"Visual Studio $(VisualStudioVersion.Substring(0,2))"</CmakeGenerator>
|
||||
<CmakeReleaseCLI>call vsdevcmd.bat -arch=amd64
|
||||
cmake -G $(CmakeGenerator) -A x64 -DCMAKE_BUILD_TYPE="Release" -DLLVM_USE_CRT_DEBUG=MDd -DLLVM_USE_CRT_RELEASE=MT -DENABLE_OPT=OFF -S glslang -B build</CmakeReleaseCLI>
|
||||
cmake -G $(CmakeGenerator) -A x64 -DCMAKE_BUILD_TYPE="Release" -DLLVM_USE_CRT_DEBUG=MDd -DLLVM_USE_CRT_RELEASE=MT -DENABLE_OPT=OFF -S glslang -B "$(SolutionDir)build\tmp\$(ProjectName)-$(Configuration)-$(Platform)"
|
||||
</CmakeReleaseCLI>
|
||||
<CmakeDebugCLI>call vsdevcmd.bat -arch=amd64
|
||||
cmake -G $(CmakeGenerator) -A x64 -DCMAKE_BUILD_TYPE="Debug" -DLLVM_USE_CRT_DEBUG=MDd -DLLVM_USE_CRT_RELEASE=MT -DENABLE_OPT=OFF -S glslang -B build</CmakeDebugCLI>
|
||||
cmake -G $(CmakeGenerator) -A x64 -DCMAKE_BUILD_TYPE="Debug" -DLLVM_USE_CRT_DEBUG=MDd -DLLVM_USE_CRT_RELEASE=MT -DENABLE_OPT=OFF -S glslang -B "$(SolutionDir)build\tmp\$(ProjectName)-$(Configuration)-$(Platform)"
|
||||
</CmakeDebugCLI>
|
||||
<CmakeCopyCLI>
|
||||
echo Copying..
|
||||
mkdir "$(SolutionDir)build\lib\$(Configuration)-$(Platform)\$(ProjectName)"
|
||||
copy "$(SolutionDir)build\tmp\$(ProjectName)-$(Configuration)-$(Platform)\hlsl\$(CONFIGURATION)\*.lib" "$(SolutionDir)build\lib\$(Configuration)-$(Platform)\$(ProjectName)"
|
||||
copy "$(SolutionDir)build\tmp\$(ProjectName)-$(Configuration)-$(Platform)\SPIRV\$(CONFIGURATION)\*.lib" "$(SolutionDir)build\lib\$(Configuration)-$(Platform)\$(ProjectName)"
|
||||
copy "$(SolutionDir)build\tmp\$(ProjectName)-$(Configuration)-$(Platform)\OGLCompilersDLL\$(CONFIGURATION)\*.lib" "$(SolutionDir)build\lib\$(Configuration)-$(Platform)\$(ProjectName)"
|
||||
copy "$(SolutionDir)build\tmp\$(ProjectName)-$(Configuration)-$(Platform)\glslang\OSDependent\Windows\$(CONFIGURATION)\*.lib" "$(SolutionDir)build\lib\$(Configuration)-$(Platform)\$(ProjectName)"
|
||||
copy "$(SolutionDir)build\tmp\$(ProjectName)-$(Configuration)-$(Platform)\glslang\$(CONFIGURATION)\*.lib" "$(SolutionDir)build\lib\$(Configuration)-$(Platform)\$(ProjectName)"
|
||||
</CmakeCopyCLI>
|
||||
<CmakeCleanCLI>
|
||||
echo Cleaning..
|
||||
rmdir /s /q "$(SolutionDir)build\lib\$(Configuration)-$(Platform)\$(ProjectName)"
|
||||
rmdir /s /q "$(SolutionDir)build\tmp\$(ProjectName)-$(Configuration)-$(Platform)"
|
||||
</CmakeCleanCLI>
|
||||
<PropsAbsPath>$([System.IO.Path]::GetFullPath('$(MSBuildThisFileDirectory)..\..\buildfiles\msvc\common_default.props'))</PropsAbsPath>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<NMakeBuildCommandLine>$(CmakeReleaseCLI)
|
||||
msbuild.exe build\ALL_BUILD.vcxproj /t:build /p:Configuration=Release /p:ForceImportBeforeCppTargets="$(PropsAbsPath)" /m</NMakeBuildCommandLine>
|
||||
<NMakeReBuildCommandLine>$(CmakeReleaseCLI)
|
||||
msbuild.exe build\ALL_BUILD.vcxproj /t:rebuild /p:Configuration=Release /p:ForceImportBeforeCppTargets="$(PropsAbsPath)" /m</NMakeReBuildCommandLine>
|
||||
<NMakeCleanCommandLine>$(CmakeReleaseCLI)
|
||||
msbuild.exe build\ALL_BUILD.vcxproj /t:clean /p:Configuration=Release /p:ForceImportBeforeCppTargets="$(PropsAbsPath)" /m
|
||||
rmdir /s /q build
|
||||
<OutDir>$(SolutionDir)build\lib\$(Configuration)-$(Platform)\</OutDir>
|
||||
<IntDir>$(SolutionDir)build\tmp\$(ProjectName)-$(Configuration)-$(Platform)\</IntDir>
|
||||
<NMakeBuildCommandLine>
|
||||
$(CmakeReleaseCLI)
|
||||
msbuild.exe "$(IntDir)\ALL_BUILD.vcxproj" /t:build /p:Configuration=Release /p:ForceImportBeforeCppTargets="$(PropsAbsPath)" /m
|
||||
$(CmakeCopyCLI)
|
||||
</NMakeBuildCommandLine>
|
||||
<NMakeReBuildCommandLine>
|
||||
$(CmakeReleaseCLI)
|
||||
msbuild.exe "$(IntDir)\ALL_BUILD.vcxproj" /t:rebuild /p:Configuration=Release /p:ForceImportBeforeCppTargets="$(PropsAbsPath)" /m
|
||||
$(CmakeCopyCLI)
|
||||
</NMakeReBuildCommandLine>
|
||||
<NMakeCleanCommandLine>
|
||||
$(CmakeReleaseCLI)
|
||||
msbuild.exe "$(IntDir)\ALL_BUILD.vcxproj" /t:clean /p:Configuration=Release /p:ForceImportBeforeCppTargets="$(PropsAbsPath)" /m
|
||||
$(CmakeCleanCLI)
|
||||
</NMakeCleanCommandLine>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<NMakeBuildCommandLine>$(CmakeDebugCLI)
|
||||
msbuild.exe build\ALL_BUILD.vcxproj /t:build /p:Configuration=Debug /p:ForceImportBeforeCppTargets="$(PropsAbsPath)" /m
|
||||
<OutDir>$(SolutionDir)build\lib\$(Configuration)-$(Platform)\</OutDir>
|
||||
<IntDir>$(SolutionDir)build\tmp\$(ProjectName)-$(Configuration)-$(Platform)\</IntDir>
|
||||
<NMakeBuildCommandLine>
|
||||
$(CmakeDebugCLI)
|
||||
msbuild.exe "$(IntDir)\ALL_BUILD.vcxproj" /t:build /p:Configuration=Debug /p:ForceImportBeforeCppTargets="$(PropsAbsPath)" /m
|
||||
$(CmakeCopyCLI)
|
||||
</NMakeBuildCommandLine>
|
||||
<NMakeReBuildCommandLine>$(CmakeDebugCLI)
|
||||
msbuild.exe build\ALL_BUILD.vcxproj /t:rebuild /p:Configuration=Debug /p:ForceImportBeforeCppTargets="$(PropsAbsPath)" /m
|
||||
<NMakeReBuildCommandLine>
|
||||
$(CmakeDebugCLI)
|
||||
msbuild.exe "$(IntDir)\ALL_BUILD.vcxproj" /t:rebuild /p:Configuration=Debug /p:ForceImportBeforeCppTargets="$(PropsAbsPath)" /m
|
||||
$(CmakeCopyCLI)
|
||||
</NMakeReBuildCommandLine>
|
||||
<NMakeCleanCommandLine>$(CmakeDebugCLI)
|
||||
msbuild.exe build\ALL_BUILD.vcxproj /t:clean /p:Configuration=Debug /p:ForceImportBeforeCppTargets="$(PropsAbsPath)" /m
|
||||
rmdir /s /q build
|
||||
<NMakeCleanCommandLine>
|
||||
$(CmakeDebugCLI)
|
||||
msbuild.exe "$(IntDir)\ALL_BUILD.vcxproj" /t:clean /p:Configuration=Debug /p:ForceImportBeforeCppTargets="$(PropsAbsPath)" /m
|
||||
$(CmakeCleanCLI)
|
||||
</NMakeCleanCommandLine>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup>
|
||||
|
||||
Vendored
+4
-4
@@ -44,13 +44,13 @@
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<LinkIncremental>true</LinkIncremental>
|
||||
<OutDir>$(SolutionDir)lib\$(Configuration)-$(Platform)/</OutDir>
|
||||
<IntDir>$(SolutionDir)tmp\$(ProjectName)-$(Configuration)-$(Platform)/</IntDir>
|
||||
<OutDir>$(SolutionDir)build\lib\$(Configuration)-$(Platform)\</OutDir>
|
||||
<IntDir>$(SolutionDir)build\tmp\$(ProjectName)-$(Configuration)-$(Platform)\</IntDir>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
<OutDir>$(SolutionDir)lib\$(Configuration)-$(Platform)/</OutDir>
|
||||
<IntDir>$(SolutionDir)tmp\$(ProjectName)-$(Configuration)-$(Platform)/</IntDir>
|
||||
<OutDir>$(SolutionDir)build\lib\$(Configuration)-$(Platform)\</OutDir>
|
||||
<IntDir>$(SolutionDir)build\tmp\$(ProjectName)-$(Configuration)-$(Platform)\</IntDir>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<ClCompile>
|
||||
|
||||
Vendored
+1
-1
Submodule 3rdparty/libpng/libpng updated: f5e92d7697...51f5bd68b9
Vendored
+4
-4
@@ -44,15 +44,15 @@
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
<CustomBuildBeforeTargets />
|
||||
<TargetName>$(ProjectName)16</TargetName>
|
||||
<OutDir>$(SolutionDir)lib\$(Configuration)-$(Platform)/</OutDir>
|
||||
<IntDir>$(SolutionDir)tmp\$(ProjectName)-$(Configuration)-$(Platform)/</IntDir>
|
||||
<OutDir>$(SolutionDir)build\lib\$(Configuration)-$(Platform)\</OutDir>
|
||||
<IntDir>$(SolutionDir)build\tmp\$(ProjectName)-$(Configuration)-$(Platform)\</IntDir>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
<CustomBuildBeforeTargets />
|
||||
<TargetName>$(ProjectName)16</TargetName>
|
||||
<OutDir>$(SolutionDir)lib\$(Configuration)-$(Platform)/</OutDir>
|
||||
<IntDir>$(SolutionDir)tmp\$(ProjectName)-$(Configuration)-$(Platform)/</IntDir>
|
||||
<OutDir>$(SolutionDir)build\lib\$(Configuration)-$(Platform)\</OutDir>
|
||||
<IntDir>$(SolutionDir)build\tmp\$(ProjectName)-$(Configuration)-$(Platform)\</IntDir>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<ClCompile>
|
||||
|
||||
Vendored
+2
-1
@@ -32,7 +32,8 @@
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<CustomBuildBeforeTargets>Build</CustomBuildBeforeTargets>
|
||||
<IntDir>$(SolutionDir)tmp\$(ProjectName)-$(Configuration)-$(Platform)\</IntDir>
|
||||
<OutDir>$(SolutionDir)build\lib\$(Configuration)-$(Platform)\</OutDir>
|
||||
<IntDir>$(SolutionDir)build\tmp\$(ProjectName)-$(Configuration)-$(Platform)\</IntDir>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<ClCompile>
|
||||
|
||||
Vendored
+1
-1
Submodule 3rdparty/libsdl-org/SDL updated: 79ec168f3c...fa24d868ac
+2
-2
@@ -35,8 +35,8 @@
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup>
|
||||
<_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
|
||||
<OutDir>$(SolutionDir)lib\$(Configuration)-$(Platform)/</OutDir>
|
||||
<IntDir>$(SolutionDir)tmp\$(ProjectName)-$(Configuration)-$(Platform)/</IntDir>
|
||||
<OutDir>$(SolutionDir)build\lib\$(Configuration)-$(Platform)\</OutDir>
|
||||
<IntDir>$(SolutionDir)build\tmp\$(ProjectName)-$(Configuration)-$(Platform)\</IntDir>
|
||||
<TargetName>libusb-1.0</TargetName>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup>
|
||||
|
||||
+26
-10
@@ -11,10 +11,10 @@
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectGuid>{A37E4273-85DB-4217-B775-CE971B87D9DF}</ProjectGuid>
|
||||
<ProjectGuid>{8BC303AB-25BE-4276-8E57-73F171B2D672}</ProjectGuid>
|
||||
<Keyword>MakeFileProj</Keyword>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(SolutionDir)\buildfiles\msvc\common_default_clang_cl.props" />
|
||||
<Import Project="$(SolutionDir)\buildfiles\msvc\common_default.props" />
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<Import Project="$(SolutionDir)\buildfiles\msvc\common_default_macros.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||
@@ -39,10 +39,17 @@
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros">
|
||||
<CmakeReleaseCLI>call vsdevcmd.bat -arch=amd64
|
||||
cmake -G Ninja -DCMAKE_CXX_COMPILER="clang-cl.exe" -DCMAKE_C_COMPILER="clang-cl.exe" -DCMAKE_BUILD_TYPE="Release" -DLLVM_TARGETS_TO_BUILD=X86 -DLLVM_DEFAULT_TARGET_TRIPLE:STRING=x86_64-pc-windows-msvc -DLLVM_HOST_TRIPLE:STRING=x86_64-pc-windows-msvc -DCMAKE_INSTALL_PREFIX="./Release" -DLLVM_BUILD_RUNTIME=OFF -DLLVM_BUILD_TOOLS=OFF -DLLVM_INCLUDE_DOCS=OFF -DLLVM_INCLUDE_EXAMPLES=OFF -DLLVM_INCLUDE_TESTS=OFF -DLLVM_INCLUDE_BENCHMARKS=OFF -DLLVM_INCLUDE_UTILS=OFF -DCMAKE_SYSTEM_VERSION=6.1 -DCMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION=$(WindowsTargetPlatformVersion) -DLLVM_USE_CRT_DEBUG=MDd -DLLVM_USE_CRT_RELEASE=MT -DLLVM_USE_INTEL_JITEVENTS=ON ../llvm/llvm</CmakeReleaseCLI>
|
||||
cd "$(SolutionDir)build\tmp\llvm_build-$(Configuration)-$(Platform)"
|
||||
cmake -G Ninja -DCMAKE_CXX_COMPILER="cl.exe" -DCMAKE_C_COMPILER="cl.exe" -DCMAKE_BUILD_TYPE="Release" -DCMAKE_INSTALL_PREFIX="$(SolutionDir)build\lib\$(Configuration)-$(Platform)\llvm_build" -DLLVM_TARGETS_TO_BUILD=X86 -DLLVM_DEFAULT_TARGET_TRIPLE:STRING=x86_64-pc-windows-msvc -DLLVM_HOST_TRIPLE:STRING=x86_64-pc-windows-msvc -DLLVM_BUILD_RUNTIME=OFF -DLLVM_BUILD_TOOLS=OFF -DLLVM_INCLUDE_DOCS=OFF -DLLVM_INCLUDE_EXAMPLES=OFF -DLLVM_INCLUDE_TESTS=OFF -DLLVM_INCLUDE_BENCHMARKS=OFF -DLLVM_INCLUDE_UTILS=OFF -DCMAKE_SYSTEM_VERSION=6.1 -DCMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION=$(WindowsTargetPlatformVersion) -DLLVM_USE_CRT_DEBUG=MDd -DLLVM_USE_CRT_RELEASE=MT -DLLVM_USE_INTEL_JITEVENTS=ON "$(SolutionDir)3rdparty\llvm\llvm\llvm"
|
||||
</CmakeReleaseCLI>
|
||||
<CmakeDebugCLI>call vsdevcmd.bat -arch=amd64
|
||||
cmake -G Ninja -DCMAKE_CXX_COMPILER="clang-cl.exe" -DCMAKE_C_COMPILER="clang-cl.exe" -DCMAKE_BUILD_TYPE="Debug" -DLLVM_TARGETS_TO_BUILD=X86 -DLLVM_DEFAULT_TARGET_TRIPLE:STRING=x86_64-pc-windows-msvc -DLLVM_HOST_TRIPLE:STRING=x86_64-pc-windows-msvc -DCMAKE_INSTALL_PREFIX="./Debug" -DLLVM_BUILD_RUNTIME=OFF -DLLVM_BUILD_TOOLS=OFF -DLLVM_INCLUDE_DOCS=OFF -DLLVM_INCLUDE_EXAMPLES=OFF -DLLVM_INCLUDE_TESTS=OFF -DLLVM_INCLUDE_BENCHMARKS=OFF -DLLVM_INCLUDE_UTILS=OFF -DCMAKE_SYSTEM_VERSION=6.1 -DCMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION=$(WindowsTargetPlatformVersion) -DLLVM_USE_CRT_DEBUG=MDd -DLLVM_USE_CRT_RELEASE=MT -DLLVM_USE_INTEL_JITEVENTS=ON ../llvm/llvm</CmakeDebugCLI>
|
||||
<CmakeCleanCLI>echo Cleaning..
|
||||
cd "$(SolutionDir)build\tmp\llvm_build-$(Configuration)-$(Platform)"
|
||||
cmake -G Ninja -DCMAKE_CXX_COMPILER="cl.exe" -DCMAKE_C_COMPILER="cl.exe" -DCMAKE_BUILD_TYPE="Debug" -DCMAKE_INSTALL_PREFIX="$(SolutionDir)build\lib\$(Configuration)-$(Platform)\llvm_build" -DLLVM_TARGETS_TO_BUILD=X86 -DLLVM_DEFAULT_TARGET_TRIPLE:STRING=x86_64-pc-windows-msvc -DLLVM_HOST_TRIPLE:STRING=x86_64-pc-windows-msvc -DLLVM_BUILD_RUNTIME=OFF -DLLVM_BUILD_TOOLS=OFF -DLLVM_INCLUDE_DOCS=OFF -DLLVM_INCLUDE_EXAMPLES=OFF -DLLVM_INCLUDE_TESTS=OFF -DLLVM_INCLUDE_BENCHMARKS=OFF -DLLVM_INCLUDE_UTILS=OFF -DCMAKE_SYSTEM_VERSION=6.1 -DCMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION=$(WindowsTargetPlatformVersion) -DLLVM_USE_CRT_DEBUG=MDd -DLLVM_USE_CRT_RELEASE=MT -DLLVM_USE_INTEL_JITEVENTS=ON "$(SolutionDir)3rdparty\llvm\llvm\llvm"
|
||||
</CmakeDebugCLI>
|
||||
<CmakeCleanCLI>
|
||||
echo Cleaning..
|
||||
rmdir /s /q "$(SolutionDir)build\lib\$(Configuration)-$(Platform)\llvm_build"
|
||||
cd "$(SolutionDir)build\tmp\llvm_build-$(Configuration)-$(Platform)"
|
||||
for /F "delims= eol=|" %%f in ('
|
||||
dir /b ^| findstr /V "[^.]*\build[^.]*\.vcxproj"') do (
|
||||
echo Deleting .\%%f
|
||||
@@ -57,11 +64,15 @@
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<NMakePreprocessorDefinitions>
|
||||
</NMakePreprocessorDefinitions>
|
||||
<NMakeBuildCommandLine>$(CmakeDebugCLI)
|
||||
<OutDir>$(SolutionDir)build\lib\$(Configuration)-$(Platform)\</OutDir>
|
||||
<IntDir>$(SolutionDir)build\tmp\$(ProjectName)-$(Configuration)-$(Platform)\</IntDir>
|
||||
<NMakeBuildCommandLine>
|
||||
$(CmakeDebugCLI)
|
||||
ninja
|
||||
ninja install
|
||||
</NMakeBuildCommandLine>
|
||||
<NMakeReBuildCommandLine>del CMakeCache.txt
|
||||
<NMakeReBuildCommandLine>
|
||||
$(CmakeCleanCLI)
|
||||
$(CmakeDebugCLI)
|
||||
ninja
|
||||
ninja install
|
||||
@@ -71,12 +82,17 @@
|
||||
</NMakeCleanCommandLine>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<NMakePreprocessorDefinitions />
|
||||
<NMakeBuildCommandLine>$(CmakeReleaseCLI)
|
||||
<NMakePreprocessorDefinitions>
|
||||
</NMakePreprocessorDefinitions>
|
||||
<OutDir>$(SolutionDir)build\lib\$(Configuration)-$(Platform)\</OutDir>
|
||||
<IntDir>$(SolutionDir)build\tmp\$(ProjectName)-$(Configuration)-$(Platform)\</IntDir>
|
||||
<NMakeBuildCommandLine>
|
||||
$(CmakeReleaseCLI)
|
||||
ninja
|
||||
ninja install
|
||||
</NMakeBuildCommandLine>
|
||||
<NMakeReBuildCommandLine>del CMakeCache.txt
|
||||
<NMakeReBuildCommandLine>
|
||||
$(CmakeCleanCLI)
|
||||
$(CmakeReleaseCLI)
|
||||
ninja
|
||||
ninja install
|
||||
Vendored
+26
-10
@@ -11,10 +11,10 @@
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectGuid>{8BC303AB-25BE-4276-8E57-73F171B2D672}</ProjectGuid>
|
||||
<ProjectGuid>{A37E4273-85DB-4217-B775-CE971B87D9DF}</ProjectGuid>
|
||||
<Keyword>MakeFileProj</Keyword>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(SolutionDir)\buildfiles\msvc\common_default.props" />
|
||||
<Import Project="$(SolutionDir)\buildfiles\msvc\common_default_clang_cl.props" />
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<Import Project="$(SolutionDir)\buildfiles\msvc\common_default_macros.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||
@@ -39,10 +39,17 @@
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros">
|
||||
<CmakeReleaseCLI>call vsdevcmd.bat -arch=amd64
|
||||
cmake -G Ninja -DCMAKE_CXX_COMPILER="cl.exe" -DCMAKE_C_COMPILER="cl.exe" -DCMAKE_BUILD_TYPE="Release" -DCMAKE_INSTALL_PREFIX="./Release" -DLLVM_TARGETS_TO_BUILD=X86 -DLLVM_DEFAULT_TARGET_TRIPLE:STRING=x86_64-pc-windows-msvc -DLLVM_HOST_TRIPLE:STRING=x86_64-pc-windows-msvc -DLLVM_BUILD_RUNTIME=OFF -DLLVM_BUILD_TOOLS=OFF -DLLVM_INCLUDE_DOCS=OFF -DLLVM_INCLUDE_EXAMPLES=OFF -DLLVM_INCLUDE_TESTS=OFF -DLLVM_INCLUDE_BENCHMARKS=OFF -DLLVM_INCLUDE_UTILS=OFF -DCMAKE_SYSTEM_VERSION=6.1 -DCMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION=$(WindowsTargetPlatformVersion) -DLLVM_USE_CRT_DEBUG=MDd -DLLVM_USE_CRT_RELEASE=MT -DLLVM_USE_INTEL_JITEVENTS=ON ../llvm/llvm</CmakeReleaseCLI>
|
||||
cd "$(SolutionDir)build\tmp\llvm_build-$(Configuration)-$(Platform)"
|
||||
cmake -G Ninja -DCMAKE_CXX_COMPILER="clang-cl.exe" -DCMAKE_C_COMPILER="clang-cl.exe" -DCMAKE_BUILD_TYPE="Release" -DCMAKE_INSTALL_PREFIX="$(SolutionDir)build\lib\$(Configuration)-$(Platform)\llvm_build" -DLLVM_TARGETS_TO_BUILD=X86 -DLLVM_DEFAULT_TARGET_TRIPLE:STRING=x86_64-pc-windows-msvc -DLLVM_HOST_TRIPLE:STRING=x86_64-pc-windows-msvc -DLLVM_BUILD_RUNTIME=OFF -DLLVM_BUILD_TOOLS=OFF -DLLVM_INCLUDE_DOCS=OFF -DLLVM_INCLUDE_EXAMPLES=OFF -DLLVM_INCLUDE_TESTS=OFF -DLLVM_INCLUDE_BENCHMARKS=OFF -DLLVM_INCLUDE_UTILS=OFF -DCMAKE_SYSTEM_VERSION=6.1 -DCMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION=$(WindowsTargetPlatformVersion) -DLLVM_USE_CRT_DEBUG=MDd -DLLVM_USE_CRT_RELEASE=MT -DLLVM_USE_INTEL_JITEVENTS=ON "$(SolutionDir)3rdparty\llvm\llvm\llvm"
|
||||
</CmakeReleaseCLI>
|
||||
<CmakeDebugCLI>call vsdevcmd.bat -arch=amd64
|
||||
cmake -G Ninja -DCMAKE_CXX_COMPILER="cl.exe" -DCMAKE_C_COMPILER="cl.exe" -DCMAKE_BUILD_TYPE="Debug" -DCMAKE_INSTALL_PREFIX="./Debug" -DLLVM_TARGETS_TO_BUILD=X86 -DLLVM_DEFAULT_TARGET_TRIPLE:STRING=x86_64-pc-windows-msvc -DLLVM_HOST_TRIPLE:STRING=x86_64-pc-windows-msvc -DLLVM_BUILD_RUNTIME=OFF -DLLVM_BUILD_TOOLS=OFF -DLLVM_INCLUDE_DOCS=OFF -DLLVM_INCLUDE_EXAMPLES=OFF -DLLVM_INCLUDE_TESTS=OFF -DLLVM_INCLUDE_BENCHMARKS=OFF -DLLVM_INCLUDE_UTILS=OFF -DCMAKE_SYSTEM_VERSION=6.1 -DCMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION=$(WindowsTargetPlatformVersion) -DLLVM_USE_CRT_DEBUG=MDd -DLLVM_USE_CRT_RELEASE=MT -DLLVM_USE_INTEL_JITEVENTS=ON ../llvm/llvm</CmakeDebugCLI>
|
||||
<CmakeCleanCLI>echo Cleaning..
|
||||
cd "$(SolutionDir)build\tmp\llvm_build-$(Configuration)-$(Platform)"
|
||||
cmake -G Ninja -DCMAKE_CXX_COMPILER="clang-cl.exe" -DCMAKE_C_COMPILER="clang-cl.exe" -DCMAKE_BUILD_TYPE="Debug" -DCMAKE_INSTALL_PREFIX="$(SolutionDir)build\lib\$(Configuration)-$(Platform)\llvm_build" -DLLVM_TARGETS_TO_BUILD=X86 -DLLVM_DEFAULT_TARGET_TRIPLE:STRING=x86_64-pc-windows-msvc -DLLVM_HOST_TRIPLE:STRING=x86_64-pc-windows-msvc -DLLVM_BUILD_RUNTIME=OFF -DLLVM_BUILD_TOOLS=OFF -DLLVM_INCLUDE_DOCS=OFF -DLLVM_INCLUDE_EXAMPLES=OFF -DLLVM_INCLUDE_TESTS=OFF -DLLVM_INCLUDE_BENCHMARKS=OFF -DLLVM_INCLUDE_UTILS=OFF -DCMAKE_SYSTEM_VERSION=6.1 -DCMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION=$(WindowsTargetPlatformVersion) -DLLVM_USE_CRT_DEBUG=MDd -DLLVM_USE_CRT_RELEASE=MT -DLLVM_USE_INTEL_JITEVENTS=ON "$(SolutionDir)3rdparty\llvm\llvm\llvm"
|
||||
</CmakeDebugCLI>
|
||||
<CmakeCleanCLI>
|
||||
echo Cleaning..
|
||||
rmdir /s /q "$(SolutionDir)build\lib\$(Configuration)-$(Platform)\llvm_build"
|
||||
cd "$(SolutionDir)build\tmp\llvm_build-$(Configuration)-$(Platform)"
|
||||
for /F "delims= eol=|" %%f in ('
|
||||
dir /b ^| findstr /V "[^.]*\build[^.]*\.vcxproj"') do (
|
||||
echo Deleting .\%%f
|
||||
@@ -57,11 +64,15 @@
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<NMakePreprocessorDefinitions>
|
||||
</NMakePreprocessorDefinitions>
|
||||
<NMakeBuildCommandLine>$(CmakeDebugCLI)
|
||||
<OutDir>$(SolutionDir)build\lib\$(Configuration)-$(Platform)\</OutDir>
|
||||
<IntDir>$(SolutionDir)build\tmp\$(ProjectName)-$(Configuration)-$(Platform)\</IntDir>
|
||||
<NMakeBuildCommandLine>
|
||||
$(CmakeDebugCLI)
|
||||
ninja
|
||||
ninja install
|
||||
</NMakeBuildCommandLine>
|
||||
<NMakeReBuildCommandLine>del CMakeCache.txt
|
||||
<NMakeReBuildCommandLine>
|
||||
$(CmakeCleanCLI)
|
||||
$(CmakeDebugCLI)
|
||||
ninja
|
||||
ninja install
|
||||
@@ -71,12 +82,17 @@
|
||||
</NMakeCleanCommandLine>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<NMakePreprocessorDefinitions />
|
||||
<NMakeBuildCommandLine>$(CmakeReleaseCLI)
|
||||
<NMakePreprocessorDefinitions>
|
||||
</NMakePreprocessorDefinitions>
|
||||
<OutDir>$(SolutionDir)build\lib\$(Configuration)-$(Platform)\</OutDir>
|
||||
<IntDir>$(SolutionDir)build\tmp\$(ProjectName)-$(Configuration)-$(Platform)\</IntDir>
|
||||
<NMakeBuildCommandLine>
|
||||
$(CmakeReleaseCLI)
|
||||
ninja
|
||||
ninja install
|
||||
</NMakeBuildCommandLine>
|
||||
<NMakeReBuildCommandLine>del CMakeCache.txt
|
||||
<NMakeReBuildCommandLine>
|
||||
$(CmakeCleanCLI)
|
||||
$(CmakeReleaseCLI)
|
||||
ninja
|
||||
ninja install
|
||||
+4
-2
@@ -43,11 +43,13 @@
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<LinkIncremental>true</LinkIncremental>
|
||||
<OutDir>$(SolutionDir)lib\$(Configuration)-$(Platform)\</OutDir>
|
||||
<OutDir>$(SolutionDir)build\lib\$(Configuration)-$(Platform)\</OutDir>
|
||||
<IntDir>$(SolutionDir)build\tmp\$(ProjectName)-$(Configuration)-$(Platform)\</IntDir>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
<OutDir>$(SolutionDir)lib\$(Configuration)-$(Platform)\</OutDir>
|
||||
<OutDir>$(SolutionDir)build\lib\$(Configuration)-$(Platform)\</OutDir>
|
||||
<IntDir>$(SolutionDir)build\tmp\$(ProjectName)-$(Configuration)-$(Platform)\</IntDir>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<ClCompile>
|
||||
|
||||
Vendored
+21
@@ -0,0 +1,21 @@
|
||||
# OpenCV
|
||||
|
||||
set(OPENCV_TARGET 3rdparty_dummy_lib PARENT_SCOPE)
|
||||
|
||||
if (USE_SYSTEM_OPENCV)
|
||||
message(STATUS "RPCS3: using system OpenCV")
|
||||
find_package(OpenCV)
|
||||
|
||||
if(OPENCV_FOUND)
|
||||
message(STATUS "RPCS3: found system OpenCV")
|
||||
include_directories(${OpenCV_INCLUDE_DIRS})
|
||||
add_library(3rdparty_opencv INTERFACE)
|
||||
target_link_libraries(3rdparty_opencv INTERFACE ${OpenCV_LIBS})
|
||||
target_compile_definitions(3rdparty_opencv INTERFACE -DHAVE_OPENCV)
|
||||
set(OPENCV_TARGET 3rdparty_opencv PARENT_SCOPE)
|
||||
else()
|
||||
message(WARNING "RPCS3: OpenCV not found. Building without OpenCV support")
|
||||
endif()
|
||||
else()
|
||||
message(WARNING "RPCS3: Building without OpenCV support")
|
||||
endif()
|
||||
+1
Submodule 3rdparty/opencv/opencv added at f76628fb5b
Vendored
+1
-1
Submodule 3rdparty/pugixml updated: db78afc2b7...ee86beb30e
Vendored
+1
-1
@@ -1,6 +1,6 @@
|
||||
add_library(3rdparty_qt6 INTERFACE)
|
||||
|
||||
set(QT_MIN_VER 6.4.0)
|
||||
set(QT_MIN_VER 6.7.0)
|
||||
|
||||
find_package(Qt6 ${QT_MIN_VER} CONFIG COMPONENTS Widgets Concurrent Multimedia MultimediaWidgets Svg SvgWidgets)
|
||||
if(WIN32)
|
||||
|
||||
Vendored
+1
-1
@@ -58,4 +58,4 @@
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
||||
</Project>
|
||||
Vendored
+1
-2
@@ -22,6 +22,5 @@ else()
|
||||
|
||||
add_subdirectory(wolfssl EXCLUDE_FROM_ALL)
|
||||
|
||||
target_compile_definitions(wolfssl PUBLIC WOLFSSL_DES_ECB HAVE_WRITE_DUP)
|
||||
target_compile_definitions(wolfssl PUBLIC FP_MAX_BITS=8192)
|
||||
target_compile_definitions(wolfssl PUBLIC WOLFSSL_DES_ECB HAVE_WRITE_DUP FP_MAX_BITS=8192 WOLFSSL_NO_OPTIONS_H)
|
||||
endif()
|
||||
|
||||
Vendored
+1
-1
Submodule 3rdparty/wolfssl/wolfssl updated: 00e42151ca...239b85c804
Vendored
+93
-2
@@ -41,8 +41,8 @@
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup>
|
||||
<OutDir>$(SolutionDir)lib\$(Configuration)-$(Platform)\</OutDir>
|
||||
<IntDir>$(SolutionDir)tmp\$(ProjectName)-$(Configuration)-$(Platform)\</IntDir>
|
||||
<OutDir>$(SolutionDir)build\lib\$(Configuration)-$(Platform)\</OutDir>
|
||||
<IntDir>$(SolutionDir)build\tmp\$(ProjectName)-$(Configuration)-$(Platform)\</IntDir>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<ClCompile>
|
||||
@@ -139,6 +139,94 @@
|
||||
<ItemGroup>
|
||||
<ClInclude Include="extra\win32\user_settings.h" />
|
||||
<ClInclude Include="wolfssl\resource.h" />
|
||||
<ClInclude Include="wolfssl\wolfssl\wolfcrypt\aes.h" />
|
||||
<ClInclude Include="wolfssl\wolfssl\wolfcrypt\arc4.h" />
|
||||
<ClInclude Include="wolfssl\wolfssl\wolfcrypt\asn.h" />
|
||||
<ClInclude Include="wolfssl\wolfssl\wolfcrypt\asn_public.h" />
|
||||
<ClInclude Include="wolfssl\wolfssl\wolfcrypt\blake2-impl.h" />
|
||||
<ClInclude Include="wolfssl\wolfssl\wolfcrypt\blake2-int.h" />
|
||||
<ClInclude Include="wolfssl\wolfssl\wolfcrypt\blake2.h" />
|
||||
<ClInclude Include="wolfssl\wolfssl\wolfcrypt\camellia.h" />
|
||||
<ClInclude Include="wolfssl\wolfssl\wolfcrypt\chacha.h" />
|
||||
<ClInclude Include="wolfssl\wolfssl\wolfcrypt\chacha20_poly1305.h" />
|
||||
<ClInclude Include="wolfssl\wolfssl\wolfcrypt\cmac.h" />
|
||||
<ClInclude Include="wolfssl\wolfssl\wolfcrypt\coding.h" />
|
||||
<ClInclude Include="wolfssl\wolfssl\wolfcrypt\compress.h" />
|
||||
<ClInclude Include="wolfssl\wolfssl\wolfcrypt\cpuid.h" />
|
||||
<ClInclude Include="wolfssl\wolfssl\wolfcrypt\cryptocb.h" />
|
||||
<ClInclude Include="wolfssl\wolfssl\wolfcrypt\curve25519.h" />
|
||||
<ClInclude Include="wolfssl\wolfssl\wolfcrypt\curve448.h" />
|
||||
<ClInclude Include="wolfssl\wolfssl\wolfcrypt\des3.h" />
|
||||
<ClInclude Include="wolfssl\wolfssl\wolfcrypt\dh.h" />
|
||||
<ClInclude Include="wolfssl\wolfssl\wolfcrypt\dilithium.h" />
|
||||
<ClInclude Include="wolfssl\wolfssl\wolfcrypt\dsa.h" />
|
||||
<ClInclude Include="wolfssl\wolfssl\wolfcrypt\ecc.h" />
|
||||
<ClInclude Include="wolfssl\wolfssl\wolfcrypt\eccsi.h" />
|
||||
<ClInclude Include="wolfssl\wolfssl\wolfcrypt\ed25519.h" />
|
||||
<ClInclude Include="wolfssl\wolfssl\wolfcrypt\ed448.h" />
|
||||
<ClInclude Include="wolfssl\wolfssl\wolfcrypt\error-crypt.h" />
|
||||
<ClInclude Include="wolfssl\wolfssl\wolfcrypt\ext_kyber.h" />
|
||||
<ClInclude Include="wolfssl\wolfssl\wolfcrypt\ext_lms.h" />
|
||||
<ClInclude Include="wolfssl\wolfssl\wolfcrypt\ext_xmss.h" />
|
||||
<ClInclude Include="wolfssl\wolfssl\wolfcrypt\falcon.h" />
|
||||
<ClInclude Include="wolfssl\wolfssl\wolfcrypt\fe_448.h" />
|
||||
<ClInclude Include="wolfssl\wolfssl\wolfcrypt\fe_operations.h" />
|
||||
<ClInclude Include="wolfssl\wolfssl\wolfcrypt\fips_test.h" />
|
||||
<ClInclude Include="wolfssl\wolfssl\wolfcrypt\ge_448.h" />
|
||||
<ClInclude Include="wolfssl\wolfssl\wolfcrypt\ge_operations.h" />
|
||||
<ClInclude Include="wolfssl\wolfssl\wolfcrypt\hash.h" />
|
||||
<ClInclude Include="wolfssl\wolfssl\wolfcrypt\hmac.h" />
|
||||
<ClInclude Include="wolfssl\wolfssl\wolfcrypt\hpke.h" />
|
||||
<ClInclude Include="wolfssl\wolfssl\wolfcrypt\integer.h" />
|
||||
<ClInclude Include="wolfssl\wolfssl\wolfcrypt\kdf.h" />
|
||||
<ClInclude Include="wolfssl\wolfssl\wolfcrypt\kyber.h" />
|
||||
<ClInclude Include="wolfssl\wolfssl\wolfcrypt\lms.h" />
|
||||
<ClInclude Include="wolfssl\wolfssl\wolfcrypt\logging.h" />
|
||||
<ClInclude Include="wolfssl\wolfssl\wolfcrypt\md2.h" />
|
||||
<ClInclude Include="wolfssl\wolfssl\wolfcrypt\md4.h" />
|
||||
<ClInclude Include="wolfssl\wolfssl\wolfcrypt\md5.h" />
|
||||
<ClInclude Include="wolfssl\wolfssl\wolfcrypt\memory.h" />
|
||||
<ClInclude Include="wolfssl\wolfssl\wolfcrypt\mem_track.h" />
|
||||
<ClInclude Include="wolfssl\wolfssl\wolfcrypt\misc.h" />
|
||||
<ClInclude Include="wolfssl\wolfssl\wolfcrypt\mpi_class.h" />
|
||||
<ClInclude Include="wolfssl\wolfssl\wolfcrypt\mpi_superclass.h" />
|
||||
<ClInclude Include="wolfssl\wolfssl\wolfcrypt\pkcs11.h" />
|
||||
<ClInclude Include="wolfssl\wolfssl\wolfcrypt\pkcs12.h" />
|
||||
<ClInclude Include="wolfssl\wolfssl\wolfcrypt\pkcs7.h" />
|
||||
<ClInclude Include="wolfssl\wolfssl\wolfcrypt\poly1305.h" />
|
||||
<ClInclude Include="wolfssl\wolfssl\wolfcrypt\pwdbased.h" />
|
||||
<ClInclude Include="wolfssl\wolfssl\wolfcrypt\random.h" />
|
||||
<ClInclude Include="wolfssl\wolfssl\wolfcrypt\rc2.h" />
|
||||
<ClInclude Include="wolfssl\wolfssl\wolfcrypt\ripemd.h" />
|
||||
<ClInclude Include="wolfssl\wolfssl\wolfcrypt\rsa.h" />
|
||||
<ClInclude Include="wolfssl\wolfssl\wolfcrypt\sakke.h" />
|
||||
<ClInclude Include="wolfssl\wolfssl\wolfcrypt\selftest.h" />
|
||||
<ClInclude Include="wolfssl\wolfssl\wolfcrypt\settings.h" />
|
||||
<ClInclude Include="wolfssl\wolfssl\wolfcrypt\sha.h" />
|
||||
<ClInclude Include="wolfssl\wolfssl\wolfcrypt\sha256.h" />
|
||||
<ClInclude Include="wolfssl\wolfssl\wolfcrypt\sha3.h" />
|
||||
<ClInclude Include="wolfssl\wolfssl\wolfcrypt\sha512.h" />
|
||||
<ClInclude Include="wolfssl\wolfssl\wolfcrypt\signature.h" />
|
||||
<ClInclude Include="wolfssl\wolfssl\wolfcrypt\siphash.h" />
|
||||
<ClInclude Include="wolfssl\wolfssl\wolfcrypt\sm2.h" />
|
||||
<ClInclude Include="wolfssl\wolfssl\wolfcrypt\sm3.h" />
|
||||
<ClInclude Include="wolfssl\wolfssl\wolfcrypt\sm4.h" />
|
||||
<ClInclude Include="wolfssl\wolfssl\wolfcrypt\sp.h" />
|
||||
<ClInclude Include="wolfssl\wolfssl\wolfcrypt\sphincs.h" />
|
||||
<ClInclude Include="wolfssl\wolfssl\wolfcrypt\sp_int.h" />
|
||||
<ClInclude Include="wolfssl\wolfssl\wolfcrypt\srp.h" />
|
||||
<ClInclude Include="wolfssl\wolfssl\wolfcrypt\tfm.h" />
|
||||
<ClInclude Include="wolfssl\wolfssl\wolfcrypt\types.h" />
|
||||
<ClInclude Include="wolfssl\wolfssl\wolfcrypt\visibility.h" />
|
||||
<ClInclude Include="wolfssl\wolfssl\wolfcrypt\wc_encrypt.h" />
|
||||
<ClInclude Include="wolfssl\wolfssl\wolfcrypt\wc_kyber.h" />
|
||||
<ClInclude Include="wolfssl\wolfssl\wolfcrypt\wc_lms.h" />
|
||||
<ClInclude Include="wolfssl\wolfssl\wolfcrypt\wc_pkcs11.h" />
|
||||
<ClInclude Include="wolfssl\wolfssl\wolfcrypt\wc_port.h" />
|
||||
<ClInclude Include="wolfssl\wolfssl\wolfcrypt\wc_xmss.h" />
|
||||
<ClInclude Include="wolfssl\wolfssl\wolfcrypt\wolfevent.h" />
|
||||
<ClInclude Include="wolfssl\wolfssl\wolfcrypt\wolfmath.h" />
|
||||
<ClInclude Include="wolfssl\wolfssl\wolfcrypt\xmss.h" />
|
||||
<CustomBuild Include="wolfssl\wolfcrypt\src\aes_asm.asm">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='DLL Debug|x64'">false</ExcludedFromBuild>
|
||||
@@ -160,6 +248,9 @@
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
|
||||
</ResourceCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="wolfssl\wolfssl\wolfcrypt\include.am" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
|
||||
Vendored
+1
-1
Submodule 3rdparty/xxHash updated: bbb27a5efb...e626a72bc2
Vendored
+8
@@ -25,6 +25,14 @@
|
||||
<PropertyGroup>
|
||||
<PreferredToolArchitecture>x64</PreferredToolArchitecture>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<OutDir>$(SolutionDir)build\lib\$(Configuration)-$(Platform)\</OutDir>
|
||||
<IntDir>$(SolutionDir)build\tmp\$(ProjectName)-$(Configuration)-$(Platform)\</IntDir>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<OutDir>$(SolutionDir)build\lib\$(Configuration)-$(Platform)\</OutDir>
|
||||
<IntDir>$(SolutionDir)build\tmp\$(ProjectName)-$(Configuration)-$(Platform)\</IntDir>
|
||||
</PropertyGroup>
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="Shared">
|
||||
|
||||
Vendored
+4
-4
@@ -70,13 +70,13 @@
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<LinkIncremental>true</LinkIncremental>
|
||||
<OutDir>$(SolutionDir)lib\$(Configuration)-$(Platform)\</OutDir>
|
||||
<IntDir>$(SolutionDir)tmp\$(ProjectName)-$(Configuration)-$(Platform)\</IntDir>
|
||||
<OutDir>$(SolutionDir)build\lib\$(Configuration)-$(Platform)\</OutDir>
|
||||
<IntDir>$(SolutionDir)build\tmp\$(ProjectName)-$(Configuration)-$(Platform)\</IntDir>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<LinkIncremental>true</LinkIncremental>
|
||||
<OutDir>$(SolutionDir)lib\$(Configuration)-$(Platform)\</OutDir>
|
||||
<IntDir>$(SolutionDir)tmp\$(ProjectName)-$(Configuration)-$(Platform)\</IntDir>
|
||||
<OutDir>$(SolutionDir)build\lib\$(Configuration)-$(Platform)\</OutDir>
|
||||
<IntDir>$(SolutionDir)build\tmp\$(ProjectName)-$(Configuration)-$(Platform)\</IntDir>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<ClCompile>
|
||||
|
||||
Vendored
+2
-2
@@ -106,8 +106,8 @@
|
||||
<Keyword>Win32Proj</Keyword>
|
||||
<ProjectName>zstd</ProjectName>
|
||||
<RootNamespace>zstd</RootNamespace>
|
||||
<OutDir>$(SolutionDir)lib\$(Configuration)-$(Platform)\</OutDir>
|
||||
<IntDir>$(SolutionDir)tmp\$(ProjectName)-$(Configuration)-$(Platform)\</IntDir>
|
||||
<OutDir>$(SolutionDir)build\lib\$(Configuration)-$(Platform)\</OutDir>
|
||||
<IntDir>$(SolutionDir)build\tmp\$(ProjectName)-$(Configuration)-$(Platform)\</IntDir>
|
||||
<InstructionSet>NotSet</InstructionSet>
|
||||
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
|
||||
</PropertyGroup>
|
||||
|
||||
+19
-13
@@ -8,7 +8,7 @@ Other instructions may be found [here](https://wiki.rpcs3.net/index.php?title=Bu
|
||||
### Windows 10 or later
|
||||
|
||||
The following tools are required to build RPCS3 on Windows 10 or later:
|
||||
- [Visual Studio 2022](https://visualstudio.microsoft.com/thank-you-downloading-visual-studio/?sku=Community) (or at least Visual Studio 2019 16.11.xx+ as C++20 is not included in previous versions)
|
||||
- [Visual Studio 2022](https://visualstudio.microsoft.com/thank-you-downloading-visual-studio/?sku=Community)
|
||||
- **Optional** - [CMake 3.28.0+](https://www.cmake.org/download/) (add to PATH)
|
||||
|
||||
**NOTES:**
|
||||
@@ -19,26 +19,26 @@ The following tools are required to build RPCS3 on Windows 10 or later:
|
||||
with standalone **CMake** tool.
|
||||
|
||||
- [Python 3.6+](https://www.python.org/downloads/) (add to PATH)
|
||||
- [Qt 6.7.3](https://www.qt.io/download-qt-installer) In case you can't download from the official installer, you can use [Another Qt installer](https://github.com/miurahr/aqtinstall) (In that case you will need to manually add the "qtmultimedia" module when installing Qt)
|
||||
- [Qt 6.8.1](https://www.qt.io/download-qt-installer) In case you can't download from the official installer, you can use [Another Qt installer](https://github.com/miurahr/aqtinstall) (In that case you will need to manually add the "qtmultimedia" module when installing Qt)
|
||||
- [Vulkan SDK 1.3.268.0](https://vulkan.lunarg.com/sdk/home) (see "Install the SDK" [here](https://vulkan.lunarg.com/doc/sdk/latest/windows/getting_started.html)) for now future SDKs don't work. You need precisely 1.3.268.0.
|
||||
|
||||
The `sln` solution available only on **Visual Studio** is the preferred building solution. It easily allows to build the **RPCS3** application in `Release` and `Debug` mode.
|
||||
|
||||
In order to build **RPCS3** with the `sln` solution (with **Visual Studio**), **Qt** libs need to be detected. To detect the libs:
|
||||
- add and set the `QTDIR` environment variable, e.g. `<QtInstallFolder>\6.7.3\msvc2019_64\`
|
||||
- or use the [Visual Studio Qt Plugin](https://marketplace.visualstudio.com/items?itemName=TheQtCompany.QtVisualStudioTools2019)
|
||||
- add and set the `QTDIR` environment variable, e.g. `<QtInstallFolder>\6.8.1\msvc2022_64\`
|
||||
- or use the [Visual Studio Qt Plugin](https://marketplace.visualstudio.com/items?itemName=TheQtCompany.QtVisualStudioTools2022)
|
||||
|
||||
**NOTE:** If you have issues with the **Visual Studio Qt Plugin**, you may want to uninstall it and install the [Legacy Qt Plugin](https://marketplace.visualstudio.com/items?itemName=TheQtCompany.LEGACYQtVisualStudioTools2019) instead.
|
||||
**NOTE:** If you have issues with the **Visual Studio Qt Plugin**, you may want to uninstall it and install the [Legacy Qt Plugin](https://marketplace.visualstudio.com/items?itemName=TheQtCompany.LEGACYQtVisualStudioTools2022) instead.
|
||||
|
||||
In order to build **RPCS3** with the `CMake` solution (with both **Visual Studio** and standalone **CMake** tool):
|
||||
- add and set the `CMAKE_PREFIX_PATH` environment variable to the **Qt** libs path, e.g. `<QtInstallFolder>\6.7.3\msvc2019_64\`
|
||||
- add and set the `CMAKE_PREFIX_PATH` environment variable to the **Qt** libs path, e.g. `<QtInstallFolder>\6.8.1\msvc2022_64\`
|
||||
|
||||
### Linux
|
||||
|
||||
These are the essentials tools to build RPCS3 on Linux. Some of them can be installed through your favorite package manager:
|
||||
- Clang 17+ or GCC 13+
|
||||
- [CMake 3.28.0+](https://www.cmake.org/download/)
|
||||
- [Qt 6.7.3](https://www.qt.io/download-qt-installer)
|
||||
- [Qt 6.8.1](https://www.qt.io/download-qt-installer)
|
||||
- [Vulkan SDK 1.3.268.0](https://vulkan.lunarg.com/sdk/home) (See "Install the SDK" [here](https://vulkan.lunarg.com/doc/sdk/latest/linux/getting_started.html)) for now future SDKs don't work. You need precisely 1.3.268.0.
|
||||
- [SDL2](https://github.com/libsdl-org/SDL/releases) (for the FAudio backend)
|
||||
|
||||
@@ -119,7 +119,7 @@ Start **Visual Studio**, click on `Open a project or solution` and select the `r
|
||||
##### Configuring the Qt Plugin (if used)
|
||||
|
||||
1) go to `Extensions->Qt VS Tools->Qt Versions`
|
||||
2) add the path to your Qt installation with compiler e.g. `<QtInstallFolder>\6.7.3\msvc2019_64`, version will fill in automatically
|
||||
2) add the path to your Qt installation with compiler e.g. `<QtInstallFolder>\6.8.1\msvc2022_64`, version will fill in automatically
|
||||
3) go to `Extensions->Qt VS Tools->Options->Legacy Project Format`. (Only available in the **Legacy Qt Plugin**)
|
||||
4) set `Build: Run pre-build setup` to `true`. (Only available in the **Legacy Qt Plugin**)
|
||||
|
||||
@@ -127,17 +127,23 @@ Start **Visual Studio**, click on `Open a project or solution` and select the `r
|
||||
|
||||
**NOTE:** The recommended build configuration is `Release`. (On older revisions: `Release - LLVM`)
|
||||
|
||||
You may want to download the precompiled [LLVM libs](https://github.com/RPCS3/llvm-mirror/releases/download/custom-build-win-16.0.1/llvmlibs_mt.7z) and extract them to `3rdparty\llvm\`,
|
||||
as well as download and extract the [additional libs](https://github.com/RPCS3/glslang/releases/latest/download/glslanglibs_mt.7z) to `lib\%CONFIGURATION%-x64\` to speed up compilation
|
||||
time (unoptimised/debug libs are currently not available precompiled).
|
||||
To speed up the compilation time, you may want to download and extract to `<rpcs3_root>\build\lib_ext\<$(Configuration)>-x64` (e.g. `c:\rpcs3\build\lib_ext\Release-x64`; the path needs to be created) some of the following precompiled libs:
|
||||
- [LLVM libs](https://github.com/RPCS3/llvm-mirror/releases/download/custom-build-win-16.0.1/llvmlibs_mt.7z)
|
||||
- [additional libs](https://github.com/RPCS3/glslang/releases/latest/download/glslanglibs_mt.7z)
|
||||
|
||||
**NOTES:**
|
||||
- `<$(Configuration)>` can assume values `Release` or `Debug`.
|
||||
- Unoptimised/debug libs are currently not available precompiled for both **LLVM** and **glslang**. Trying to use them when building the **RPCS3** application in `Debug` mode will provide a `cannot open file` error.
|
||||
|
||||
If you're not using the precompiled libs, those dependency libs need to be compiled first. From the `Solution Explorer` panel:
|
||||
1) expand `__BUILD_BEFORE`
|
||||
2) from the `Solution Configurations` drop-down menu, select `Release` (select `Debug` if you want to build in `Debug` mode)
|
||||
3) one after another, right-click on the following projects and then click on `Build` to build the selected lib:
|
||||
- `glslang`
|
||||
- either `llvm_build`
|
||||
- or `llvm_build_clang_cl` (if you installed **clang** on VS)
|
||||
- `llvm_build`
|
||||
- or `llvm_build_clang_cl` (if you have also the **clang** compiler installed on VS)
|
||||
|
||||
**NOTE:** Compiled dependency libs have priority over precompiled libs, if installed. It means that they will always be referenced and linked in case the precompiled libs are also available.
|
||||
|
||||
In order to build the **RPCS3** application:
|
||||
1) from the `Solution Configurations` drop-down menu, select `Release` (select `Debug` if you want to build in `Debug` mode)
|
||||
|
||||
@@ -29,6 +29,7 @@ option(USE_SYSTEM_SDL "Prefer system SDL instead of the builtin one" ON)
|
||||
option(USE_SYSTEM_FFMPEG "Prefer system ffmpeg instead of the prebuild one" OFF)
|
||||
option(USE_SYSTEM_OPENAL "Prefer system OpenAL instead of the prebuild one" ON)
|
||||
option(USE_SYSTEM_CURL "Prefer system Curl instead of the prebuild one" ON)
|
||||
option(USE_SYSTEM_OPENCV "Prefer system OpenCV instead of the builtin one" ON)
|
||||
|
||||
set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/buildfiles/cmake")
|
||||
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
"USE_SYSTEM_CURL": "OFF",
|
||||
"USE_SYSTEM_ZLIB": "OFF",
|
||||
"USE_SYSTEM_LIBPNG": "OFF",
|
||||
"USE_SYSTEM_OPENCV": "ON",
|
||||
"BUILD_LLVM": "OFF",
|
||||
"STATIC_LINK_LLVM": "ON"
|
||||
}
|
||||
@@ -29,6 +30,7 @@
|
||||
"USE_SYSTEM_CURL": "OFF",
|
||||
"USE_SYSTEM_ZLIB": "OFF",
|
||||
"USE_SYSTEM_LIBPNG": "OFF",
|
||||
"USE_SYSTEM_OPENCV": "ON",
|
||||
"LLVM_ENABLE_LIBCXX": "ON",
|
||||
"BUILD_LLVM": "OFF",
|
||||
"STATIC_LINK_LLVM": "ON"
|
||||
@@ -56,6 +58,7 @@
|
||||
"USE_SYSTEM_CURL": "OFF",
|
||||
"USE_SYSTEM_ZLIB": "OFF",
|
||||
"USE_SYSTEM_OPENAL": "OFF",
|
||||
"USE_SYSTEM_OPENCV": "OFF",
|
||||
"BUILD_LLVM": "ON",
|
||||
"STATIC_LINK_LLVM": "ON"
|
||||
},
|
||||
|
||||
@@ -15,8 +15,10 @@ void fmt_class_string<cfg::node>::format(std::string& out, u64 arg)
|
||||
|
||||
namespace cfg
|
||||
{
|
||||
u32 _base::id_counter = 0;
|
||||
|
||||
_base::_base(type _type)
|
||||
: m_type(_type)
|
||||
: m_type(_type), m_id(id_counter++)
|
||||
{
|
||||
if (_type != type::node)
|
||||
{
|
||||
@@ -25,7 +27,7 @@ namespace cfg
|
||||
}
|
||||
|
||||
_base::_base(type _type, node* owner, std::string name, bool dynamic)
|
||||
: m_type(_type), m_dynamic(dynamic), m_name(std::move(name))
|
||||
: m_type(_type), m_parent(owner), m_dynamic(dynamic), m_name(std::move(name)), m_id(id_counter++)
|
||||
{
|
||||
for (const auto& node : owner->m_nodes)
|
||||
{
|
||||
|
||||
@@ -51,9 +51,13 @@ namespace cfg
|
||||
const type m_type{};
|
||||
|
||||
protected:
|
||||
_base* m_parent = nullptr;
|
||||
bool m_dynamic = true;
|
||||
const std::string m_name{};
|
||||
|
||||
static u32 id_counter;
|
||||
u32 m_id = 0;
|
||||
|
||||
// Ownerless entry constructor
|
||||
_base(type _type);
|
||||
|
||||
@@ -67,9 +71,16 @@ namespace cfg
|
||||
|
||||
virtual ~_base() = default;
|
||||
|
||||
// Get unique ID
|
||||
u32 get_id() const { return m_id; }
|
||||
|
||||
// Get parent
|
||||
_base* get_parent() const { return m_parent; }
|
||||
|
||||
// Get type
|
||||
type get_type() const { return m_type; }
|
||||
|
||||
// Get name
|
||||
const std::string& get_name() const { return m_name; }
|
||||
|
||||
// Get dynamic property for reloading configs during games
|
||||
|
||||
+81
-11
@@ -4,6 +4,7 @@
|
||||
#include "StrUtil.h"
|
||||
#include "Crypto/sha1.h"
|
||||
|
||||
#include <span>
|
||||
#include <unordered_map>
|
||||
#include <algorithm>
|
||||
#include <cstring>
|
||||
@@ -20,7 +21,7 @@ using namespace std::literals::string_literals;
|
||||
#include <cwchar>
|
||||
#include <Windows.h>
|
||||
|
||||
static std::unique_ptr<wchar_t[]> to_wchar(const std::string& source)
|
||||
static std::unique_ptr<wchar_t[]> to_wchar(std::string_view source)
|
||||
{
|
||||
// String size + null terminator
|
||||
const usz buf_size = source.size() + 1;
|
||||
@@ -43,7 +44,7 @@ static std::unique_ptr<wchar_t[]> to_wchar(const std::string& source)
|
||||
std::memcpy(buffer.get() + 32768 + 4, L"UNC\\", 4 * sizeof(wchar_t));
|
||||
}
|
||||
|
||||
ensure(MultiByteToWideChar(CP_UTF8, 0, source.c_str(), size, buffer.get() + 32768 + (unc ? 8 : 4), size)); // "to_wchar"
|
||||
ensure(MultiByteToWideChar(CP_UTF8, 0, source.data(), size, buffer.get() + 32768 + (unc ? 8 : 4), size)); // "to_wchar"
|
||||
|
||||
// Canonicalize wide path (replace '/', ".", "..", \\ repetitions, etc)
|
||||
ensure(GetFullPathNameW(buffer.get() + 32768, 32768, buffer.get(), nullptr) - 1 < 32768 - 1); // "to_wchar"
|
||||
@@ -293,7 +294,7 @@ namespace fs
|
||||
struct id_view
|
||||
{
|
||||
std::string_view type_view;
|
||||
std::basic_string_view<u8> data_view;
|
||||
std::span<const u8> data_view;
|
||||
};
|
||||
|
||||
id_view _rhs{rhs.type, {rhs.data.data(), rhs.data.size()}};
|
||||
@@ -311,7 +312,7 @@ namespace fs
|
||||
}
|
||||
|
||||
// Remove offsets data
|
||||
id.data_view.remove_suffix(sizeof(u64) * offset_count);
|
||||
id.data_view = id.data_view.subspan(sizeof(u64) * offset_count);
|
||||
|
||||
// Get last category identifier
|
||||
if (usz sep = id.type_view.rfind(": "); sep != umax)
|
||||
@@ -329,7 +330,7 @@ namespace fs
|
||||
return false;
|
||||
}
|
||||
|
||||
return _rhs.type_view == _lhs.type_view && _rhs.data_view == _lhs.data_view;
|
||||
return _rhs.type_view == _lhs.type_view && std::equal(_rhs.data_view.begin(), _rhs.data_view.end(), _lhs.data_view.begin(), _lhs.data_view.end());
|
||||
}
|
||||
|
||||
dir_base::~dir_base()
|
||||
@@ -1788,6 +1789,8 @@ fs::file_id fs::file::get_id() const
|
||||
|
||||
bool fs::dir::open(const std::string& path)
|
||||
{
|
||||
m_dir.reset();
|
||||
|
||||
if (path.empty())
|
||||
{
|
||||
// Don't allow opening empty path (TODO)
|
||||
@@ -2018,7 +2021,7 @@ std::string fs::get_executable_dir()
|
||||
return s_exe_dir;
|
||||
}
|
||||
|
||||
const std::string& fs::get_config_dir()
|
||||
const std::string& fs::get_config_dir([[maybe_unused]] bool get_config_subdirectory)
|
||||
{
|
||||
// Use magic static
|
||||
static const std::string s_dir = []
|
||||
@@ -2100,6 +2103,14 @@ const std::string& fs::get_config_dir()
|
||||
return dir;
|
||||
}();
|
||||
|
||||
#ifdef _WIN32
|
||||
if (get_config_subdirectory)
|
||||
{
|
||||
static const std::string subdir = s_dir + "config/";
|
||||
return subdir;
|
||||
}
|
||||
#endif
|
||||
|
||||
return s_dir;
|
||||
}
|
||||
|
||||
@@ -2141,6 +2152,16 @@ const std::string& fs::get_cache_dir()
|
||||
return s_dir;
|
||||
}
|
||||
|
||||
const std::string& fs::get_log_dir()
|
||||
{
|
||||
#ifdef _WIN32
|
||||
static const std::string s_dir = fs::get_config_dir() + "log/";
|
||||
return s_dir;
|
||||
#else
|
||||
return fs::get_cache_dir();
|
||||
#endif
|
||||
}
|
||||
|
||||
const std::string& fs::get_temp_dir()
|
||||
{
|
||||
static const std::string s_dir = []
|
||||
@@ -2412,6 +2433,13 @@ fs::file fs::make_gather(std::vector<fs::file> files)
|
||||
return result;
|
||||
}
|
||||
|
||||
std::string fs::generate_neighboring_path(std::string_view source, [[maybe_unused]] u64 seed)
|
||||
{
|
||||
// Seed is currently not used
|
||||
|
||||
return fmt::format(u8"%s/$%s.%s.tmp", get_parent_dir(source), source.substr(source.find_last_of(fs::delim) + 1), fmt::base57(utils::get_unique_tsc()));
|
||||
}
|
||||
|
||||
bool fs::pending_file::open(std::string_view path)
|
||||
{
|
||||
file.close();
|
||||
@@ -2430,7 +2458,7 @@ bool fs::pending_file::open(std::string_view path)
|
||||
|
||||
do
|
||||
{
|
||||
m_path = fmt::format(u8"%s/$%s.%s.tmp", get_parent_dir(path), path.substr(path.find_last_of(fs::delim) + 1), fmt::base57(utils::get_unique_tsc()));
|
||||
m_path = fs::generate_neighboring_path(path, 0);
|
||||
|
||||
if (file.open(m_path, fs::create + fs::write + fs::read + fs::excl))
|
||||
{
|
||||
@@ -2563,21 +2591,52 @@ bool fs::pending_file::commit(bool overwrite)
|
||||
file.close();
|
||||
|
||||
#ifdef _WIN32
|
||||
const auto ws2 = to_wchar(m_dest);
|
||||
const auto wdest = to_wchar(m_dest);
|
||||
|
||||
bool ok = false;
|
||||
|
||||
if (hardlink_paths.empty())
|
||||
{
|
||||
ok = MoveFileExW(ws1.get(), ws2.get(), overwrite ? MOVEFILE_REPLACE_EXISTING | MOVEFILE_WRITE_THROUGH : MOVEFILE_WRITE_THROUGH);
|
||||
ok = MoveFileExW(ws1.get(), wdest.get(), overwrite ? MOVEFILE_REPLACE_EXISTING | MOVEFILE_WRITE_THROUGH : MOVEFILE_WRITE_THROUGH);
|
||||
}
|
||||
else
|
||||
{
|
||||
ok = ReplaceFileW(ws1.get(), ws2.get(), nullptr, 0, nullptr, nullptr);
|
||||
ok = ReplaceFileW(ws1.get(), wdest.get(), nullptr, 0, nullptr, nullptr);
|
||||
}
|
||||
|
||||
if (ok)
|
||||
{
|
||||
for (const std::wstring& link_name : hardlink_paths)
|
||||
{
|
||||
std::unique_ptr<wchar_t[]> write_temp_path;
|
||||
|
||||
do
|
||||
{
|
||||
write_temp_path = to_wchar(fs::generate_neighboring_path(m_dest, 0));
|
||||
|
||||
// Generate a temporary hard linke
|
||||
if (CreateHardLinkW(wdest.get(), write_temp_path.get(), nullptr))
|
||||
{
|
||||
if (MoveFileExW(write_temp_path.get(), link_name.data(), MOVEFILE_REPLACE_EXISTING))
|
||||
{
|
||||
// Success
|
||||
write_temp_path.reset();
|
||||
break;
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
while (fs::g_tls_error == fs::error::exist); // Only retry if failed due to existing file
|
||||
|
||||
if (write_temp_path)
|
||||
{
|
||||
// Failure
|
||||
g_tls_error = to_error(GetLastError());
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
// Disable the destructor
|
||||
m_path.clear();
|
||||
return true;
|
||||
@@ -2596,7 +2655,7 @@ bool fs::pending_file::commit(bool overwrite)
|
||||
return false;
|
||||
}
|
||||
|
||||
stx::generator<fs::dir_entry&> fs::list_dir_recursively(std::string path)
|
||||
stx::generator<fs::dir_entry&> fs::list_dir_recursively(const std::string& path)
|
||||
{
|
||||
for (auto& entry : fs::dir(path))
|
||||
{
|
||||
@@ -2639,6 +2698,17 @@ void fmt_class_string<fs::seek_mode>::format(std::string& out, u64 arg)
|
||||
template<>
|
||||
void fmt_class_string<fs::error>::format(std::string& out, u64 arg)
|
||||
{
|
||||
if (arg == static_cast<u64>(fs::error::unknown))
|
||||
{
|
||||
// Note: may not be the correct error code because it only prints the last
|
||||
#ifdef _WIN32
|
||||
fmt::append(out, "Unknown error [errno=%d]", GetLastError());
|
||||
#else
|
||||
fmt::append(out, "Unknown error [errno=%d]", errno);
|
||||
#endif
|
||||
return;
|
||||
}
|
||||
|
||||
format_enum(out, arg, [](auto arg)
|
||||
{
|
||||
switch (arg)
|
||||
|
||||
+18
-6
@@ -475,7 +475,7 @@ namespace fs
|
||||
dir() = default;
|
||||
|
||||
// Open dir handle
|
||||
explicit dir(const std::string& path)
|
||||
explicit dir(const std::string& path) noexcept
|
||||
{
|
||||
open(path);
|
||||
}
|
||||
@@ -484,7 +484,7 @@ namespace fs
|
||||
bool open(const std::string& path);
|
||||
|
||||
// Check whether the handle is valid (opened directory)
|
||||
explicit operator bool() const
|
||||
explicit operator bool() const noexcept
|
||||
{
|
||||
return m_dir.operator bool();
|
||||
}
|
||||
@@ -531,7 +531,7 @@ namespace fs
|
||||
from_current
|
||||
};
|
||||
|
||||
iterator(const dir* parent, mode mode_ = mode::from_first)
|
||||
iterator(const dir* parent, mode mode_ = mode::from_first) noexcept
|
||||
: m_parent(parent)
|
||||
{
|
||||
if (!m_parent)
|
||||
@@ -569,6 +569,13 @@ namespace fs
|
||||
return *this;
|
||||
}
|
||||
|
||||
iterator operator++(int)
|
||||
{
|
||||
iterator old = *this;
|
||||
*this = {m_parent, mode::from_current};
|
||||
return old;
|
||||
}
|
||||
|
||||
bool operator !=(const iterator& rhs) const
|
||||
{
|
||||
return m_parent != rhs.m_parent;
|
||||
@@ -592,15 +599,20 @@ namespace fs
|
||||
// Get executable containing directory
|
||||
std::string get_executable_dir();
|
||||
|
||||
// Get configuration directory
|
||||
const std::string& get_config_dir();
|
||||
// Get configuration directory. Set get_config_subdirectory to true to get the nested config dir on windows.
|
||||
const std::string& get_config_dir(bool get_config_subdirectory = false);
|
||||
|
||||
// Get common cache directory
|
||||
const std::string& get_cache_dir();
|
||||
|
||||
// Get common log directory
|
||||
const std::string& get_log_dir();
|
||||
|
||||
// Temporary directory
|
||||
const std::string& get_temp_dir();
|
||||
|
||||
std::string generate_neighboring_path(std::string_view source, u64 seed);
|
||||
|
||||
// Unique pending file creation destined to be renamed to the destination file
|
||||
struct pending_file
|
||||
{
|
||||
@@ -835,5 +847,5 @@ namespace fs
|
||||
|
||||
file make_gather(std::vector<file>);
|
||||
|
||||
stx::generator<dir_entry&> list_dir_recursively(std::string path);
|
||||
stx::generator<dir_entry&> list_dir_recursively(const std::string& path);
|
||||
}
|
||||
|
||||
+35
-3
@@ -566,9 +566,41 @@ void fmt_class_string<std::source_location>::format(std::string& out, u64 arg)
|
||||
fmt::append(out, "\n(in file %s", loc.file_name());
|
||||
}
|
||||
|
||||
if (auto func = loc.function_name(); func && func[0])
|
||||
if (std::string_view full_func{loc.function_name() ? loc.function_name() : ""}; !full_func.empty())
|
||||
{
|
||||
fmt::append(out, ", in function %s)", func);
|
||||
// Remove useless disambiguators
|
||||
std::string func = fmt::replace_all(std::string(full_func), {
|
||||
{"struct ", ""},
|
||||
{"class ", ""},
|
||||
{"enum ", ""},
|
||||
{"typename ", ""},
|
||||
#ifdef _MSC_VER
|
||||
{"__cdecl ", ""},
|
||||
#endif
|
||||
{"unsigned long long", "ullong"},
|
||||
//{"unsigned long", "ulong"}, // ullong
|
||||
{"unsigned int", "uint"},
|
||||
{"unsigned short", "ushort"},
|
||||
{"unsigned char", "uchar"}});
|
||||
|
||||
// Remove function argument signature for long names
|
||||
for (usz index = func.find_first_of('('); index != umax && func.size() >= 100u; index = func.find_first_of('(', index))
|
||||
{
|
||||
// Operator() function
|
||||
if (func.compare(0, 3, "()("sv) == 0 || func.compare(0, 3, "() "sv))
|
||||
{
|
||||
if (usz not_space = func.find_first_not_of(' ', index + 2); not_space != umax && func[not_space] == '(')
|
||||
{
|
||||
index += 2;
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
func = func.substr(0, index) + "()";
|
||||
break;
|
||||
}
|
||||
|
||||
fmt::append(out, ", in function '%s')", func);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -689,7 +721,7 @@ struct fmt::cfmt_src
|
||||
TYPE(llong);
|
||||
TYPE(schar);
|
||||
TYPE(short);
|
||||
if (std::is_signed_v<char>) TYPE(char);
|
||||
if constexpr (std::is_signed_v<char>) TYPE(char);
|
||||
TYPE(long);
|
||||
TYPE(s128);
|
||||
|
||||
|
||||
@@ -109,13 +109,15 @@ extern thread_local std::string(*g_tls_log_prefix)();
|
||||
// Report error and call std::abort(), defined in main.cpp
|
||||
[[noreturn]] void report_fatal_error(std::string_view text, bool is_html = false, bool include_help_text = true);
|
||||
|
||||
enum cpu_threads_emulation_info_dump_t : u32 {};
|
||||
|
||||
std::string dump_useful_thread_info()
|
||||
{
|
||||
std::string result;
|
||||
|
||||
if (auto cpu = get_current_cpu_thread())
|
||||
{
|
||||
cpu->dump_all(result);
|
||||
fmt::append(result, "%s", cpu_threads_emulation_info_dump_t{cpu->id});
|
||||
}
|
||||
|
||||
return result;
|
||||
@@ -1358,7 +1360,7 @@ bool handle_access_violation(u32 addr, bool is_writing, ucontext_t* context) noe
|
||||
// check if address is RawSPU MMIO register
|
||||
do if (addr - RAW_SPU_BASE_ADDR < (6 * RAW_SPU_OFFSET) && (addr % RAW_SPU_OFFSET) >= RAW_SPU_PROB_OFFSET)
|
||||
{
|
||||
auto thread = idm::get<named_thread<spu_thread>>(spu_thread::find_raw_spu((addr - RAW_SPU_BASE_ADDR) / RAW_SPU_OFFSET));
|
||||
auto thread = idm::get_unlocked<named_thread<spu_thread>>(spu_thread::find_raw_spu((addr - RAW_SPU_BASE_ADDR) / RAW_SPU_OFFSET));
|
||||
|
||||
if (!thread)
|
||||
{
|
||||
@@ -1546,7 +1548,7 @@ bool handle_access_violation(u32 addr, bool is_writing, ucontext_t* context) noe
|
||||
}
|
||||
}
|
||||
|
||||
if (auto pf_port = idm::get<lv2_obj, lv2_event_port>(pf_port_id); pf_port && pf_port->queue)
|
||||
if (auto pf_port = idm::get_unlocked<lv2_obj, lv2_event_port>(pf_port_id); pf_port && pf_port->queue)
|
||||
{
|
||||
// We notify the game that a page fault occurred so it can rectify it.
|
||||
// Note, for data3, were the memory readable AND we got a page fault, it must be due to a write violation since reads are allowed.
|
||||
@@ -2553,13 +2555,13 @@ std::string thread_ctrl::get_name_cached()
|
||||
return *name_cache;
|
||||
}
|
||||
|
||||
thread_base::thread_base(native_entry entry, std::string name)
|
||||
thread_base::thread_base(native_entry entry, std::string name) noexcept
|
||||
: entry_point(entry)
|
||||
, m_tname(make_single_value(std::move(name)))
|
||||
{
|
||||
}
|
||||
|
||||
thread_base::~thread_base()
|
||||
thread_base::~thread_base() noexcept
|
||||
{
|
||||
// Cleanup abandoned tasks: initialize default results and signal
|
||||
this->exec();
|
||||
@@ -2600,7 +2602,7 @@ bool thread_base::join(bool dtor) const
|
||||
|
||||
if (i >= 16 && !(i & (i - 1)) && timeout != atomic_wait_timeout::inf)
|
||||
{
|
||||
sig_log.error(u8"Thread [%s] is too sleepy. Waiting for it %.3fµs already!", *m_tname.load(), (utils::get_tsc() - stamp0) / (utils::get_tsc_freq() / 1000000.));
|
||||
sig_log.error("Thread [%s] is too sleepy. Waiting for it %.3fus already!", *m_tname.load(), (utils::get_tsc() - stamp0) / (utils::get_tsc_freq() / 1000000.));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2731,7 +2733,7 @@ void thread_base::exec()
|
||||
|
||||
[[noreturn]] void thread_ctrl::emergency_exit(std::string_view reason)
|
||||
{
|
||||
if (std::string info = dump_useful_thread_info(); !info.empty())
|
||||
if (const std::string info = dump_useful_thread_info(); !info.empty())
|
||||
{
|
||||
sys_log.notice("\n%s", info);
|
||||
}
|
||||
|
||||
+24
-15
@@ -33,7 +33,8 @@ enum class thread_state : u32
|
||||
aborting = 1, // The thread has been joined in the destructor or explicitly aborted
|
||||
errored = 2, // Set after the emergency_exit call
|
||||
finished = 3, // Final state, always set at the end of thread execution
|
||||
mask = 3
|
||||
mask = 3,
|
||||
destroying_context = 7, // Special value assigned to destroy data explicitly before the destructor
|
||||
};
|
||||
|
||||
template <class Context>
|
||||
@@ -172,9 +173,9 @@ private:
|
||||
friend class named_thread;
|
||||
|
||||
protected:
|
||||
thread_base(native_entry, std::string name);
|
||||
thread_base(native_entry, std::string name) noexcept;
|
||||
|
||||
~thread_base();
|
||||
~thread_base() noexcept;
|
||||
|
||||
public:
|
||||
// Get CPU cycles since last time this function was called. First call returns 0.
|
||||
@@ -351,7 +352,7 @@ public:
|
||||
// Sets the native thread priority and returns it to zero at destructor
|
||||
struct scoped_priority
|
||||
{
|
||||
explicit scoped_priority(int prio)
|
||||
explicit scoped_priority(int prio) noexcept
|
||||
{
|
||||
set_native_priority(prio);
|
||||
}
|
||||
@@ -360,7 +361,7 @@ public:
|
||||
|
||||
scoped_priority& operator=(const scoped_priority&) = delete;
|
||||
|
||||
~scoped_priority()
|
||||
~scoped_priority() noexcept
|
||||
{
|
||||
set_native_priority(0);
|
||||
}
|
||||
@@ -388,7 +389,7 @@ class thread_future_t : public thread_future, result_storage<Ctx, std::condition
|
||||
using future = thread_future_t;
|
||||
|
||||
public:
|
||||
thread_future_t(Ctx&& func, Args&&... args)
|
||||
thread_future_t(Ctx&& func, Args&&... args) noexcept
|
||||
: m_args(std::forward<Args>(args)...)
|
||||
, m_func(std::forward<Ctx>(func))
|
||||
{
|
||||
@@ -417,7 +418,7 @@ public:
|
||||
};
|
||||
}
|
||||
|
||||
~thread_future_t()
|
||||
~thread_future_t() noexcept
|
||||
{
|
||||
if constexpr (!future::empty && !Discard)
|
||||
{
|
||||
@@ -570,7 +571,7 @@ public:
|
||||
named_thread& operator=(const named_thread&) = delete;
|
||||
|
||||
// Wait for the completion and access result (if not void)
|
||||
[[nodiscard]] decltype(auto) operator()()
|
||||
[[nodiscard]] decltype(auto) operator()() noexcept
|
||||
{
|
||||
thread::join();
|
||||
|
||||
@@ -581,7 +582,7 @@ public:
|
||||
}
|
||||
|
||||
// Wait for the completion and access result (if not void)
|
||||
[[nodiscard]] decltype(auto) operator()() const
|
||||
[[nodiscard]] decltype(auto) operator()() const noexcept
|
||||
{
|
||||
thread::join();
|
||||
|
||||
@@ -593,7 +594,7 @@ public:
|
||||
|
||||
// Send command to the thread to invoke directly (references should be passed via std::ref())
|
||||
template <bool Discard = true, typename Arg, typename... Args>
|
||||
auto operator()(Arg&& arg, Args&&... args)
|
||||
auto operator()(Arg&& arg, Args&&... args) noexcept
|
||||
{
|
||||
// Overloaded operator() of the Context.
|
||||
constexpr bool v1 = std::is_invocable_v<Context, Arg&&, Args&&...>;
|
||||
@@ -667,12 +668,12 @@ public:
|
||||
}
|
||||
|
||||
// Access thread state
|
||||
operator thread_state() const
|
||||
operator thread_state() const noexcept
|
||||
{
|
||||
return static_cast<thread_state>(thread::m_sync.load() & 3);
|
||||
}
|
||||
|
||||
named_thread& operator=(thread_state s)
|
||||
named_thread& operator=(thread_state s) noexcept
|
||||
{
|
||||
if (s == thread_state::created)
|
||||
{
|
||||
@@ -693,7 +694,7 @@ public:
|
||||
|
||||
if constexpr (std::is_assignable_v<Context&, thread_state>)
|
||||
{
|
||||
static_cast<Context&>(*this) = s;
|
||||
static_cast<Context&>(*this) = thread_state::aborting;
|
||||
}
|
||||
|
||||
if (notify_sync)
|
||||
@@ -702,17 +703,25 @@ public:
|
||||
thread::m_sync.notify_all();
|
||||
}
|
||||
|
||||
if (s == thread_state::finished)
|
||||
if (s == thread_state::finished || s == thread_state::destroying_context)
|
||||
{
|
||||
// This participates in emulation stopping, use destruction-alike semantics
|
||||
thread::join(true);
|
||||
}
|
||||
|
||||
if (s == thread_state::destroying_context)
|
||||
{
|
||||
if constexpr (std::is_assignable_v<Context&, thread_state>)
|
||||
{
|
||||
static_cast<Context&>(*this) = thread_state::destroying_context;
|
||||
}
|
||||
}
|
||||
|
||||
return *this;
|
||||
}
|
||||
|
||||
// Context type doesn't need virtual destructor
|
||||
~named_thread()
|
||||
~named_thread() noexcept
|
||||
{
|
||||
// Assign aborting state forcefully and join thread
|
||||
operator=(thread_state::finished);
|
||||
|
||||
+11
-13
@@ -9,11 +9,11 @@
|
||||
#include "Emu/VFS.h"
|
||||
|
||||
#include "util/types.hpp"
|
||||
#include "util/endian.hpp"
|
||||
#include "util/asm.hpp"
|
||||
|
||||
#include <charconv>
|
||||
#include <regex>
|
||||
#include <vector>
|
||||
|
||||
LOG_CHANNEL(patch_log, "PAT");
|
||||
|
||||
@@ -125,19 +125,15 @@ patch_engine::patch_engine()
|
||||
|
||||
std::string patch_engine::get_patch_config_path()
|
||||
{
|
||||
#ifdef _WIN32
|
||||
const std::string config_dir = fs::get_config_dir() + "config/";
|
||||
const std::string config_dir = fs::get_config_dir(true);
|
||||
const std::string patch_path = config_dir + "patch_config.yml";
|
||||
|
||||
#ifdef _WIN32
|
||||
if (!fs::create_path(config_dir))
|
||||
{
|
||||
patch_log.error("Could not create path: %s (%s)", patch_path, fs::g_tls_error);
|
||||
}
|
||||
|
||||
return patch_path;
|
||||
#else
|
||||
return fs::get_config_dir() + "patch_config.yml";
|
||||
#endif
|
||||
return patch_path;
|
||||
}
|
||||
|
||||
std::string patch_engine::get_patches_path()
|
||||
@@ -907,7 +903,7 @@ void unmap_vm_area(std::shared_ptr<vm::block_t>& ptr)
|
||||
}
|
||||
|
||||
// Returns old 'applied' size
|
||||
static usz apply_modification(std::basic_string<u32>& applied, patch_engine::patch_info& patch, std::function<u8*(u32, u32)> mem_translate, u32 filesz, u32 min_addr)
|
||||
static usz apply_modification(std::vector<u32>& applied, patch_engine::patch_info& patch, std::function<u8*(u32, u32)> mem_translate, u32 filesz, u32 min_addr)
|
||||
{
|
||||
const usz old_applied_size = applied.size();
|
||||
|
||||
@@ -1447,14 +1443,15 @@ static usz apply_modification(std::basic_string<u32>& applied, patch_engine::pat
|
||||
return old_applied_size;
|
||||
}
|
||||
|
||||
std::basic_string<u32> patch_engine::apply(const std::string& name, std::function<u8*(u32, u32)> mem_translate, u32 filesz, u32 min_addr)
|
||||
void patch_engine::apply(std::vector<u32>& applied_total, const std::string& name, std::function<u8*(u32, u32)> mem_translate, u32 filesz, u32 min_addr)
|
||||
{
|
||||
// applied_total may be non-empty, do not clear it
|
||||
|
||||
if (!m_map.contains(name))
|
||||
{
|
||||
return {};
|
||||
return;
|
||||
}
|
||||
|
||||
std::basic_string<u32> applied_total;
|
||||
const patch_container& container = ::at32(m_map, name);
|
||||
const std::string& serial = Emu.GetTitleID();
|
||||
const std::string& app_version = Emu.GetAppVersion();
|
||||
@@ -1599,7 +1596,8 @@ std::basic_string<u32> patch_engine::apply(const std::string& name, std::functio
|
||||
}
|
||||
}
|
||||
|
||||
return applied_total;
|
||||
// Ensure consistent order
|
||||
std::sort(applied_total.begin(), applied_total.end());
|
||||
}
|
||||
|
||||
void patch_engine::unload(const std::string& name)
|
||||
|
||||
@@ -215,7 +215,7 @@ public:
|
||||
void append_title_patches(std::string_view title_id);
|
||||
|
||||
// Apply patch (returns the number of entries applied)
|
||||
std::basic_string<u32> apply(const std::string& name, std::function<u8*(u32, u32)> mem_translate, u32 filesz = -1, u32 min_addr = 0);
|
||||
void apply(std::vector<u32>& applied_total, const std::string& name, std::function<u8*(u32, u32)> mem_translate, u32 filesz = -1, u32 min_addr = 0);
|
||||
|
||||
// Deallocate memory used by patches
|
||||
void unload(const std::string& name);
|
||||
|
||||
@@ -14,6 +14,7 @@ enum class cheat_type : u8
|
||||
signed_16_cheat,
|
||||
signed_32_cheat,
|
||||
signed_64_cheat,
|
||||
float_32_cheat,
|
||||
max
|
||||
};
|
||||
|
||||
|
||||
+99
-20
@@ -4,12 +4,13 @@
|
||||
#include "util/atomic.hpp"
|
||||
#include "util/bless.hpp"
|
||||
|
||||
//! Simple unshrinkable array base for concurrent access. Only growths automatically.
|
||||
//! There is no way to know the current size. The smaller index is, the faster it's accessed.
|
||||
//!
|
||||
//! T is the type of elements. Currently, default constructor of T shall be constexpr.
|
||||
//! N is initial element count, available without any memory allocation and only stored contiguously.
|
||||
template <typename T, usz N>
|
||||
// Simple unshrinkable array base for concurrent access. Only growths automatically.
|
||||
// There is no way to know the current size. The smaller index is, the faster it's accessed.
|
||||
//
|
||||
// T is the type of elements. Currently, default constructor of T shall be constexpr.
|
||||
// N is initial element count, available without any memory allocation and only stored contiguously.
|
||||
// Let's have around 256 bytes or less worth of preallocated elements
|
||||
template <typename T, usz N = std::max<usz>(256 / sizeof(T), 1)>
|
||||
class lf_array
|
||||
{
|
||||
// Data (default-initialized)
|
||||
@@ -31,22 +32,100 @@ public:
|
||||
|
||||
T& operator [](usz index)
|
||||
{
|
||||
if (index < N) [[likely]]
|
||||
lf_array* _this = this;
|
||||
|
||||
T* result{};
|
||||
bool installed = false;
|
||||
|
||||
for (usz i = 0;; i += N)
|
||||
{
|
||||
return m_data[index];
|
||||
}
|
||||
else if (!m_next) [[unlikely]]
|
||||
{
|
||||
// Create new array block. It's not a full-fledged once-synchronization, unlikely needed.
|
||||
for (auto _new = new lf_array, ptr = this; ptr;)
|
||||
if (index - i < N)
|
||||
{
|
||||
// Install the pointer. If failed, go deeper.
|
||||
ptr = ptr->m_next.compare_and_swap(nullptr, _new);
|
||||
result = std::addressof(_this->m_data[index - i]);
|
||||
break;
|
||||
}
|
||||
|
||||
lf_array* next = _this->m_next;
|
||||
|
||||
if (!next)
|
||||
{
|
||||
// Do not allow access beyond many element more at a time
|
||||
ensure(!installed && index - i < N * 2);
|
||||
|
||||
installed = true;
|
||||
|
||||
for (auto _new = new lf_array, ptr = _this; ptr;)
|
||||
{
|
||||
// Install the pointer. If failed, go deeper.
|
||||
ptr = ptr->m_next.compare_and_swap(nullptr, _new);
|
||||
|
||||
if (!next)
|
||||
{
|
||||
// Determine the next pointer (if null then the new memory has been installed)
|
||||
next = ptr ? ptr : _new;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
_this = next;
|
||||
}
|
||||
|
||||
// Access recursively
|
||||
return (*m_next)[index - N];
|
||||
return *result;
|
||||
}
|
||||
|
||||
template <typename F> requires (std::is_invocable_v<F, T&>)
|
||||
auto for_each(F&& func, bool is_finite = true)
|
||||
{
|
||||
lf_array* _this = this;
|
||||
|
||||
using return_t = std::invoke_result_t<F, T&>;
|
||||
|
||||
while (_this)
|
||||
{
|
||||
for (usz j = 0; j < N; j++)
|
||||
{
|
||||
if constexpr (std::is_void_v<return_t>)
|
||||
{
|
||||
std::invoke(func, _this->m_data[j]);
|
||||
}
|
||||
else
|
||||
{
|
||||
auto ret = std::invoke(func, _this->m_data[j]);
|
||||
|
||||
if (ret)
|
||||
{
|
||||
return std::make_pair(std::addressof(_this->m_data[j]), std::move(ret));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
lf_array* next = _this->m_next;
|
||||
|
||||
if constexpr (!std::is_void_v<return_t>)
|
||||
{
|
||||
if (!next && !is_finite)
|
||||
{
|
||||
for (auto _new = new lf_array, ptr = _this; ptr;)
|
||||
{
|
||||
// Install the pointer. If failed, go deeper.
|
||||
ptr = ptr->m_next.compare_and_swap(nullptr, _new);
|
||||
|
||||
if (!next)
|
||||
{
|
||||
// Determine the next pointer (if null then the new memory has been installed)
|
||||
next = ptr ? ptr : _new;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
_this = next;
|
||||
}
|
||||
|
||||
if constexpr (!std::is_void_v<return_t>)
|
||||
{
|
||||
return std::make_pair(std::add_pointer_t<T>{}, return_t());
|
||||
}
|
||||
}
|
||||
|
||||
u64 size() const
|
||||
@@ -62,9 +141,9 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
//! Simple lock-free FIFO queue base. Based on lf_array<T, N> itself. Currently uses 32-bit counters.
|
||||
//! There is no "push_end" or "pop_begin" provided, the queue element must signal its state on its own.
|
||||
template<typename T, usz N>
|
||||
// Simple lock-free FIFO queue base. Based on lf_array<T, N> itself. Currently uses 32-bit counters.
|
||||
// There is no "push_end" or "pop_begin" provided, the queue element must signal its state on its own.
|
||||
template<typename T, usz N = std::max<usz>(256 / sizeof(T), 1)>
|
||||
class lf_fifo : public lf_array<T, N>
|
||||
{
|
||||
// LSB 32-bit: push, MSB 32-bit: pop
|
||||
|
||||
+1
-1
@@ -121,7 +121,7 @@ public:
|
||||
|
||||
void unlock_hle()
|
||||
{
|
||||
const u32 value = atomic_storage<u32>::fetch_add_hle_rel(m_value.raw(), 0u - c_one);
|
||||
const u32 value = atomic_storage<u32>::fetch_add_hle_rel(m_value.raw(), ~c_one + 1);
|
||||
|
||||
if (value != c_one) [[unlikely]]
|
||||
{
|
||||
|
||||
+3
-4
@@ -49,12 +49,11 @@ std::string rXmlNode::GetName()
|
||||
return {};
|
||||
}
|
||||
|
||||
std::string rXmlNode::GetAttribute(const std::string& name)
|
||||
std::string rXmlNode::GetAttribute(std::string_view name)
|
||||
{
|
||||
if (handle)
|
||||
{
|
||||
const auto pred = [&name](const pugi::xml_attribute& attr) { return (name == attr.name()); };
|
||||
if (const pugi::xml_attribute attr = handle.find_attribute(pred))
|
||||
if (const pugi::xml_attribute attr = handle.attribute(name))
|
||||
{
|
||||
if (const pugi::char_t* value = attr.value())
|
||||
{
|
||||
@@ -86,7 +85,7 @@ rXmlDocument::rXmlDocument()
|
||||
{
|
||||
}
|
||||
|
||||
pugi::xml_parse_result rXmlDocument::Read(const std::string& data)
|
||||
pugi::xml_parse_result rXmlDocument::Read(std::string_view data)
|
||||
{
|
||||
if (handle)
|
||||
{
|
||||
|
||||
+2
-2
@@ -23,7 +23,7 @@ struct rXmlNode
|
||||
std::shared_ptr<rXmlNode> GetChildren();
|
||||
std::shared_ptr<rXmlNode> GetNext();
|
||||
std::string GetName();
|
||||
std::string GetAttribute(const std::string& name);
|
||||
std::string GetAttribute(std::string_view name);
|
||||
std::string GetNodeContent();
|
||||
|
||||
pugi::xml_node handle{};
|
||||
@@ -34,7 +34,7 @@ struct rXmlDocument
|
||||
rXmlDocument();
|
||||
rXmlDocument(const rXmlDocument& other) = delete;
|
||||
rXmlDocument &operator=(const rXmlDocument& other) = delete;
|
||||
pugi::xml_parse_result Read(const std::string& data);
|
||||
pugi::xml_parse_result Read(std::string_view data);
|
||||
virtual std::shared_ptr<rXmlNode> GetRoot();
|
||||
|
||||
pugi::xml_document handle{};
|
||||
|
||||
+3
-3
@@ -69,9 +69,9 @@ jobs:
|
||||
variables:
|
||||
COMPILER: msvc
|
||||
QT_VER_MAIN: '6'
|
||||
QT_VER: '6.7.3'
|
||||
QT_VER_MSVC: 'msvc2019'
|
||||
QT_DATE: '202409200836'
|
||||
QT_VER: '6.8.1'
|
||||
QT_VER_MSVC: 'msvc2022'
|
||||
QT_DATE: '202411221531'
|
||||
QTDIR: C:\Qt\$(QT_VER)\$(QT_VER_MSVC)_64
|
||||
VULKAN_VER: '1.3.268.0'
|
||||
VULKAN_SDK_SHA: '8459ef49bd06b697115ddd3d97c9aec729e849cd775f5be70897718a9b3b9db5'
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
<PreprocessorDefinitions>LLVM_AVAILABLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalLibraryDirectories Condition="'$(Configuration)'=='Debug'">%(AdditionalLibraryDirectories);..\3rdparty\llvm\llvm_build\Debug\lib</AdditionalLibraryDirectories>
|
||||
<AdditionalLibraryDirectories Condition="'$(Configuration)'=='Debug'">%(AdditionalLibraryDirectories);$(SolutionDir)build\lib\$(Configuration)-$(Platform)\llvm_build\lib;$(SolutionDir)build\lib_ext\$(Configuration)-$(Platform)\llvm_build\$(Configuration)\lib</AdditionalLibraryDirectories>
|
||||
<AdditionalDependencies>%(AdditionalDependencies);
|
||||
LLVMAggressiveInstCombine.lib;
|
||||
LLVMAnalysis.lib;
|
||||
|
||||
@@ -4,9 +4,9 @@
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup>
|
||||
<IncludePath>.\;..\;..\3rdparty\asmjit\asmjit\src;..\..\3rdparty\yaml-cpp\yaml-cpp\include;..\3rdparty\ffmpeg\include;$(VC_IncludePath);$(WindowsSDK_IncludePath);$(UniversalCRT_IncludePath);..\3rdparty\libpng\libpng;..\3rdparty\GL;..\3rdparty\stblib\stb;..\3rdparty\openal\openal-soft\include\AL;..\3rdparty\pugixml\src;..\3rdparty\hidapi\hidapi;..\3rdparty\Optional;..\3rdparty\xxhash</IncludePath>
|
||||
<OutDir>$(SolutionDir)lib\$(Configuration)-$(Platform)\</OutDir>
|
||||
<LibraryPath>$(SolutionDir)lib\$(Configuration)-$(Platform)\;$(UniversalCRT_LibraryPath_x64);$(LibraryPath)</LibraryPath>
|
||||
<IntDir>$(SolutionDir)tmp\$(ProjectName)-$(Configuration)-$(Platform)\</IntDir>
|
||||
<OutDir>$(SolutionDir)build\lib\$(Configuration)-$(Platform)\</OutDir>
|
||||
<LibraryPath>$(SolutionDir)build\lib\$(Configuration)-$(Platform)\;$(UniversalCRT_LibraryPath_x64);$(LibraryPath)</LibraryPath>
|
||||
<IntDir>$(SolutionDir)build\tmp\$(ProjectName)-$(Configuration)-$(Platform)\</IntDir>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup>
|
||||
<Lib>
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
<Link>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<AdditionalLibraryDirectories Condition="'$(Configuration)'=='Release'">%(AdditionalLibraryDirectories);..\3rdparty\llvm\llvm_build\Release\lib</AdditionalLibraryDirectories>
|
||||
<AdditionalLibraryDirectories Condition="'$(Configuration)'=='Release'">%(AdditionalLibraryDirectories);$(SolutionDir)build\lib\$(Configuration)-$(Platform)\llvm_build\lib;$(SolutionDir)build\lib_ext\$(Configuration)-$(Platform)\llvm_build\$(Configuration)\lib</AdditionalLibraryDirectories>
|
||||
<AdditionalDependencies>%(AdditionalDependencies);
|
||||
LLVMAggressiveInstCombine.lib;
|
||||
LLVMAnalysis.lib;
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wold-style-cast"
|
||||
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
|
||||
#pragma GCC diagnostic ignored "-Wmissing-declarations"
|
||||
#import <Foundation/Foundation.h>
|
||||
#pragma GCC diagnostic pop
|
||||
|
||||
|
||||
@@ -7,12 +7,13 @@ EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "emucore", "rpcs3\emucore.vcxproj", "{C4A10229-4712-4BD2-B63E-50D93C67A038}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{2C902C67-985C-4BE0-94A3-E0FE2EB929A3} = {2C902C67-985C-4BE0-94A3-E0FE2EB929A3}
|
||||
{3C67A2FF-4710-402A-BE3E-31B0CB0576DF} = {3C67A2FF-4710-402A-BE3E-31B0CB0576DF}
|
||||
{5228F863-E0DD-4DE7-AA7B-5C52B14CD4D0} = {5228F863-E0DD-4DE7-AA7B-5C52B14CD4D0}
|
||||
{8846A9AA-5539-4C91-8301-F54260E1A07A} = {8846A9AA-5539-4C91-8301-F54260E1A07A}
|
||||
{939FE206-1182-ABC3-1234-FEAB88E98404} = {939FE206-1182-ABC3-1234-FEAB88E98404}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "llvm_build", "3rdparty\llvm\llvm_build\llvm_build.vcxproj", "{8BC303AB-25BE-4276-8E57-73F171B2D672}"
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "llvm_build", "3rdparty\llvm\llvm_build.vcxproj", "{8BC303AB-25BE-4276-8E57-73F171B2D672}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "GLGSRender", "rpcs3\GLGSRender.vcxproj", "{3384223A-6D97-4799-9862-359F85312892}"
|
||||
EndProject
|
||||
@@ -46,6 +47,7 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "rpcs3", "rpcs3\rpcs3.vcxpro
|
||||
{2C902C67-985C-4BE0-94A3-E0FE2EB929A3} = {2C902C67-985C-4BE0-94A3-E0FE2EB929A3}
|
||||
{3384223A-6D97-4799-9862-359F85312892} = {3384223A-6D97-4799-9862-359F85312892}
|
||||
{349EE8F9-7D25-4909-AAF5-FF3FADE72187} = {349EE8F9-7D25-4909-AAF5-FF3FADE72187}
|
||||
{3C67A2FF-4710-402A-BE3E-31B0CB0576DF} = {3C67A2FF-4710-402A-BE3E-31B0CB0576DF}
|
||||
{3EE5F075-B546-42C4-B6A8-E3CCEF38B78D} = {3EE5F075-B546-42C4-B6A8-E3CCEF38B78D}
|
||||
{508C291A-3D18-49F5-B25D-F7C8DB92CB21} = {508C291A-3D18-49F5-B25D-F7C8DB92CB21}
|
||||
{5B146DEA-9ACE-4D32-A7FD-3F42464DD69C} = {5B146DEA-9ACE-4D32-A7FD-3F42464DD69C}
|
||||
@@ -78,7 +80,7 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libcurl", "3rdparty\curl\li
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "3rdParty", "3rdParty", "{6C3B64A0-8F8A-4DC4-8C0B-D71EBEED7FA8}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "llvm_build_clang_cl", "3rdparty\llvm\llvm_build\llvm_build_clang_cl.vcxproj", "{A37E4273-85DB-4217-B775-CE971B87D9DF}"
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "llvm_build_clang_cl", "3rdparty\llvm\llvm_build_clang_cl.vcxproj", "{A37E4273-85DB-4217-B775-CE971B87D9DF}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Cubeb", "rpcs3\Cubeb.vcxproj", "{9610627D-20FE-4B07-8CE3-9FF68A5F1EC2}"
|
||||
EndProject
|
||||
@@ -103,6 +105,8 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "7zip", "3rdparty\7zip\7zip.
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "openal-soft", "3rdparty\openal\openal-soft.vcxproj", "{8846A9AA-5539-4C91-8301-F54260E1A07A}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "fusion", "3rdparty\fusion\fusion.vcxproj", "{3C67A2FF-4710-402A-BE3E-31B0CB0576DF}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|x64 = Debug|x64
|
||||
@@ -211,6 +215,10 @@ Global
|
||||
{8846A9AA-5539-4C91-8301-F54260E1A07A}.Debug|x64.Build.0 = Debug|x64
|
||||
{8846A9AA-5539-4C91-8301-F54260E1A07A}.Release|x64.ActiveCfg = Release|x64
|
||||
{8846A9AA-5539-4C91-8301-F54260E1A07A}.Release|x64.Build.0 = Release|x64
|
||||
{3C67A2FF-4710-402A-BE3E-31B0CB0576DF}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{3C67A2FF-4710-402A-BE3E-31B0CB0576DF}.Debug|x64.Build.0 = Debug|x64
|
||||
{3C67A2FF-4710-402A-BE3E-31B0CB0576DF}.Release|x64.ActiveCfg = Release|x64
|
||||
{3C67A2FF-4710-402A-BE3E-31B0CB0576DF}.Release|x64.Build.0 = Release|x64
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
@@ -243,6 +251,7 @@ Global
|
||||
{4E52A41A-F33B-4C7A-8C36-A1A6B4F4277C} = {6C3B64A0-8F8A-4DC4-8C0B-D71EBEED7FA8}
|
||||
{5B146DEA-9ACE-4D32-A7FD-3F42464DD69C} = {6C3B64A0-8F8A-4DC4-8C0B-D71EBEED7FA8}
|
||||
{8846A9AA-5539-4C91-8301-F54260E1A07A} = {6C3B64A0-8F8A-4DC4-8C0B-D71EBEED7FA8}
|
||||
{3C67A2FF-4710-402A-BE3E-31B0CB0576DF} = {6C3B64A0-8F8A-4DC4-8C0B-D71EBEED7FA8}
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
SolutionGuid = {06CC7920-E085-4B81-9582-8DE8AAD42510}
|
||||
|
||||
+20
-8
@@ -82,6 +82,10 @@ target_sources(rpcs3
|
||||
Input/mm_joystick_handler.cpp
|
||||
Input/pad_thread.cpp
|
||||
Input/product_info.cpp
|
||||
Input/ps_move_calibration.cpp
|
||||
Input/ps_move_config.cpp
|
||||
Input/ps_move_handler.cpp
|
||||
Input/ps_move_tracker.cpp
|
||||
Input/raw_mouse_config.cpp
|
||||
Input/raw_mouse_handler.cpp
|
||||
Input/sdl_pad_handler.cpp
|
||||
@@ -95,9 +99,20 @@ set_target_properties(rpcs3
|
||||
AUTOMOC ON
|
||||
AUTOUIC ON)
|
||||
|
||||
target_link_libraries(rpcs3 PRIVATE rpcs3_emu rpcs3_ui)
|
||||
target_link_libraries(rpcs3 PRIVATE 3rdparty::discordRPC 3rdparty::qt6 3rdparty::hidapi 3rdparty::libusb 3rdparty::wolfssl 3rdparty::libcurl 3rdparty::zlib)
|
||||
target_link_libraries(rpcs3 PRIVATE ${ADDITIONAL_LIBS})
|
||||
target_link_libraries(rpcs3
|
||||
PRIVATE
|
||||
rpcs3_emu
|
||||
rpcs3_ui
|
||||
3rdparty::discordRPC
|
||||
3rdparty::qt6
|
||||
3rdparty::hidapi
|
||||
3rdparty::libusb
|
||||
3rdparty::wolfssl
|
||||
3rdparty::libcurl
|
||||
3rdparty::zlib
|
||||
3rdparty::opencv
|
||||
3rdparty::fusion
|
||||
${ADDITIONAL_LIBS})
|
||||
|
||||
# Unix display manager
|
||||
if(X11_FOUND)
|
||||
@@ -143,16 +158,13 @@ elseif(UNIX)
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_SOURCE_DIR}/bin/GuiConfigs $<TARGET_FILE_DIR:rpcs3>/GuiConfigs
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_SOURCE_DIR}/bin/git $<TARGET_FILE_DIR:rpcs3>/git)
|
||||
elseif(WIN32)
|
||||
if(MSVC)
|
||||
add_custom_command(TARGET rpcs3 POST_BUILD
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${PROJECT_BINARY_DIR}/3rdparty/OpenAL/openal-soft/$<CONFIG>/OpenAL32.dll $<TARGET_FILE_DIR:rpcs3>)
|
||||
endif()
|
||||
add_custom_command(TARGET rpcs3 POST_BUILD
|
||||
COMMAND ${CMAKE_COMMAND} -E copy $<TARGET_FILE:OpenAL::OpenAL> $<TARGET_FILE_DIR:rpcs3>
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_SOURCE_DIR}/bin/Icons $<TARGET_FILE_DIR:rpcs3>/Icons
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_SOURCE_DIR}/bin/GuiConfigs $<TARGET_FILE_DIR:rpcs3>/GuiConfigs
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_SOURCE_DIR}/bin/git $<TARGET_FILE_DIR:rpcs3>/git
|
||||
COMMAND "${WINDEPLOYQT_EXECUTABLE}" --no-compiler-runtime --no-opengl-sw --no-patchqt
|
||||
--no-translations --no-quick --no-system-d3d-compiler --no-quick-import
|
||||
--no-translations --no-system-d3d-compiler --no-quick-import
|
||||
--plugindir "$<IF:$<CXX_COMPILER_ID:MSVC>,$<TARGET_FILE_DIR:rpcs3>/plugins,$<TARGET_FILE_DIR:rpcs3>/share/qt6/plugins>"
|
||||
--verbose 0 "$<TARGET_FILE:rpcs3>")
|
||||
endif()
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
|
||||
LOG_CHANNEL(dec_log, "DECRYPT");
|
||||
|
||||
usz decrypt_binaries_t::decrypt(std::string klic_input)
|
||||
usz decrypt_binaries_t::decrypt(std::string_view klic_input)
|
||||
{
|
||||
if (m_index >= m_modules.size())
|
||||
{
|
||||
@@ -41,7 +41,7 @@ usz decrypt_binaries_t::decrypt(std::string klic_input)
|
||||
m_klics.insert(m_klics.end(), Emu.klic.begin(), Emu.klic.end());
|
||||
}
|
||||
|
||||
if (std::string_view text = std::string_view{klic_input}.substr(klic_input.find_first_of('x') + 1); text.size() == 32)
|
||||
if (std::string_view text = klic_input.substr(klic_input.find_first_of('x') + 1); text.size() == 32)
|
||||
{
|
||||
// Allowed to fail (would simply repeat the operation if fails again)
|
||||
u64 lo = 0;
|
||||
|
||||
@@ -12,7 +12,7 @@ public:
|
||||
{
|
||||
}
|
||||
|
||||
usz decrypt(std::string klic_input = {});
|
||||
usz decrypt(std::string_view klic_input = {});
|
||||
|
||||
bool done() const
|
||||
{
|
||||
|
||||
@@ -5,11 +5,11 @@
|
||||
#include "lz.h"
|
||||
#include "ec.h"
|
||||
|
||||
#include "Utilities/mutex.h"
|
||||
#include "Emu/system_utils.hpp"
|
||||
#include <cmath>
|
||||
|
||||
#include "util/asm.hpp"
|
||||
#include <algorithm>
|
||||
#include <span>
|
||||
|
||||
LOG_CHANNEL(edat_log, "EDAT");
|
||||
|
||||
@@ -614,9 +614,11 @@ bool validate_npd_hashes(std::string_view file_name, const u8* klicensee, NPD_HE
|
||||
std::memcpy(buf_lower.get(), buf.get(), buf_len);
|
||||
std::memcpy(buf_upper.get(), buf.get(), buf_len);
|
||||
|
||||
for (usz i = std::basic_string_view<u8>(buf.get() + 0x30, file_name.size()).find_last_of('.'); i < buf_len; i++)
|
||||
const auto buf_span = std::span(buf.get(), buf.get() + buf_len);
|
||||
const auto it = std::find(buf_span.rbegin(), buf_span.rend() - 0x30, '.');
|
||||
for (usz i = std::distance(it, buf_span.rend()) - 1; i < buf_len; ++i)
|
||||
{
|
||||
const u8 c = static_cast<u8>(buf[i]);
|
||||
const u8 c = buf[i];
|
||||
buf_upper[i] = std::toupper(c);
|
||||
buf_lower[i] = std::tolower(c);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,39 @@
|
||||
#include "stdafx.h"
|
||||
#include "audio_utils.h"
|
||||
#include "Emu/system_config.h"
|
||||
#include "Emu/System.h"
|
||||
#include "Emu/IdManager.h"
|
||||
#include "Emu/RSX/Overlays/overlay_message.h"
|
||||
|
||||
namespace audio
|
||||
{
|
||||
f32 get_volume()
|
||||
{
|
||||
return g_fxo->get<audio_fxo>().audio_muted ? 0.0f : g_cfg.audio.volume / 100.0f;
|
||||
}
|
||||
|
||||
void toggle_mute()
|
||||
{
|
||||
audio_fxo& fxo = g_fxo->get<audio_fxo>();
|
||||
fxo.audio_muted = !fxo.audio_muted;
|
||||
Emu.GetCallbacks().update_emu_settings();
|
||||
|
||||
rsx::overlays::queue_message(fxo.audio_muted ? localized_string_id::AUDIO_MUTED : localized_string_id::AUDIO_UNMUTED, 3'000'000);
|
||||
}
|
||||
|
||||
void change_volume(s32 delta)
|
||||
{
|
||||
// Ignore if muted
|
||||
if (g_fxo->get<audio_fxo>().audio_muted) return;
|
||||
|
||||
const s32 old_volume = g_cfg.audio.volume;
|
||||
const s32 new_volume = old_volume + delta;
|
||||
|
||||
if (old_volume == new_volume) return;
|
||||
|
||||
g_cfg.audio.volume.set(std::clamp<s32>(new_volume, g_cfg.audio.volume.min, g_cfg.audio.volume.max));
|
||||
Emu.GetCallbacks().update_emu_settings();
|
||||
|
||||
rsx::overlays::queue_message(get_localized_string(localized_string_id::AUDIO_CHANGED, fmt::format("%d%%", g_cfg.audio.volume.get()).c_str()), 3'000'000);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
#pragma once
|
||||
|
||||
namespace audio
|
||||
{
|
||||
struct audio_fxo
|
||||
{
|
||||
atomic_t<bool> audio_muted {false};
|
||||
};
|
||||
|
||||
f32 get_volume();
|
||||
|
||||
void toggle_mute();
|
||||
void change_volume(s32 delta);
|
||||
}
|
||||
@@ -4,6 +4,7 @@ add_library(rpcs3_emu STATIC
|
||||
IdManager.cpp
|
||||
localized_string.cpp
|
||||
savestate_utils.cpp
|
||||
scoped_progress_dialog.cpp
|
||||
System.cpp
|
||||
system_config.cpp
|
||||
system_config_types.cpp
|
||||
@@ -124,6 +125,7 @@ target_sources(rpcs3_emu PRIVATE
|
||||
# Audio
|
||||
target_sources(rpcs3_emu PRIVATE
|
||||
Audio/audio_resampler.cpp
|
||||
Audio/audio_utils.cpp
|
||||
Audio/AudioDumper.cpp
|
||||
Audio/AudioBackend.cpp
|
||||
Audio/Cubeb/CubebBackend.cpp
|
||||
@@ -170,6 +172,7 @@ target_link_libraries(rpcs3_emu
|
||||
|
||||
# Cell
|
||||
target_sources(rpcs3_emu PRIVATE
|
||||
Cell/ErrorCodes.cpp
|
||||
Cell/MFC.cpp
|
||||
Cell/PPUAnalyser.cpp
|
||||
Cell/PPUDisAsm.cpp
|
||||
@@ -251,6 +254,7 @@ target_sources(rpcs3_emu PRIVATE
|
||||
Cell/Modules/cellCrossController.cpp
|
||||
Cell/Modules/cellDaisy.cpp
|
||||
Cell/Modules/cellDmux.cpp
|
||||
Cell/Modules/cellDmuxPamf.cpp
|
||||
Cell/Modules/cellDtcpIpUtility.cpp
|
||||
Cell/Modules/cellFiber.cpp
|
||||
Cell/Modules/cellFont.cpp
|
||||
@@ -474,6 +478,7 @@ target_sources(rpcs3_emu PRIVATE
|
||||
RSX/Common/TextureUtils.cpp
|
||||
RSX/Common/texture_cache.cpp
|
||||
RSX/Core/RSXContext.cpp
|
||||
RSX/Core/RSXDrawCommands.cpp
|
||||
RSX/gcm_enums.cpp
|
||||
RSX/gcm_printing.cpp
|
||||
RSX/GL/GLCommonDecompiler.cpp
|
||||
@@ -504,6 +509,7 @@ target_sources(rpcs3_emu PRIVATE
|
||||
RSX/GL/OpenGL.cpp
|
||||
RSX/GL/upscalers/fsr1/fsr_pass.cpp
|
||||
RSX/GSRender.cpp
|
||||
RSX/Host/MM.cpp
|
||||
RSX/Host/RSXDMAWriter.cpp
|
||||
RSX/Null/NullGSRender.cpp
|
||||
RSX/NV47/FW/draw_call.cpp
|
||||
@@ -521,8 +527,10 @@ target_sources(rpcs3_emu PRIVATE
|
||||
RSX/Overlays/HomeMenu/overlay_home_menu_message_box.cpp
|
||||
RSX/Overlays/HomeMenu/overlay_home_menu_page.cpp
|
||||
RSX/Overlays/HomeMenu/overlay_home_menu_settings.cpp
|
||||
RSX/Overlays/HomeMenu/overlay_home_menu_savestate.cpp
|
||||
RSX/Overlays/Network/overlay_recvmessage_dialog.cpp
|
||||
RSX/Overlays/Network/overlay_sendmessage_dialog.cpp
|
||||
RSX/Overlays/Trophies/overlay_trophy_list_dialog.cpp
|
||||
RSX/Overlays/overlays.cpp
|
||||
RSX/Overlays/overlay_animated_icon.cpp
|
||||
RSX/Overlays/overlay_animation.cpp
|
||||
@@ -550,6 +558,7 @@ target_sources(rpcs3_emu PRIVATE
|
||||
RSX/Program/CgBinaryFragmentProgram.cpp
|
||||
RSX/Program/CgBinaryVertexProgram.cpp
|
||||
RSX/Program/FragmentProgramDecompiler.cpp
|
||||
RSX/Program/FragmentProgramRegister.cpp
|
||||
RSX/Program/GLSLCommon.cpp
|
||||
RSX/Program/ProgramStateCache.cpp
|
||||
RSX/Program/program_util.cpp
|
||||
@@ -586,6 +595,7 @@ if(TARGET 3rdparty_vulkan)
|
||||
RSX/VK/VKAsyncScheduler.cpp
|
||||
RSX/VK/VKCommandStream.cpp
|
||||
RSX/VK/VKCommonDecompiler.cpp
|
||||
RSX/VK/VKCommonPipelineLayout.cpp
|
||||
RSX/VK/VKCompute.cpp
|
||||
RSX/VK/VKDMA.cpp
|
||||
RSX/VK/VKDraw.cpp
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
#include <string>
|
||||
#include "Emu/CPU/CPUThread.h"
|
||||
#include "Utilities/StrFmt.h"
|
||||
|
||||
enum class cpu_disasm_mode
|
||||
@@ -22,7 +23,7 @@ protected:
|
||||
const u8* m_offset{};
|
||||
const u32 m_start_pc;
|
||||
std::add_pointer_t<const cpu_thread> m_cpu{};
|
||||
std::shared_ptr<cpu_thread> m_cpu_handle;
|
||||
shared_ptr<cpu_thread> m_cpu_handle;
|
||||
u32 m_op = 0;
|
||||
|
||||
void format_by_mode()
|
||||
@@ -81,7 +82,7 @@ public:
|
||||
return const_cast<cpu_thread*>(m_cpu);
|
||||
}
|
||||
|
||||
void set_cpu_handle(std::shared_ptr<cpu_thread> cpu)
|
||||
void set_cpu_handle(shared_ptr<cpu_thread> cpu)
|
||||
{
|
||||
m_cpu_handle = std::move(cpu);
|
||||
|
||||
|
||||
+94
-11
@@ -8,6 +8,7 @@
|
||||
#include "Emu/Memory/vm_reservation.h"
|
||||
#include "Emu/IdManager.h"
|
||||
#include "Emu/GDB.h"
|
||||
#include "Emu/Cell/lv2/sys_spu.h"
|
||||
#include "Emu/Cell/PPUThread.h"
|
||||
#include "Emu/Cell/SPUThread.h"
|
||||
#include "Emu/RSX/RSXThread.h"
|
||||
@@ -17,6 +18,7 @@
|
||||
#include <thread>
|
||||
#include <unordered_map>
|
||||
#include <map>
|
||||
#include <shared_mutex>
|
||||
|
||||
#if defined(ARCH_X64)
|
||||
#include <emmintrin.h>
|
||||
@@ -75,6 +77,87 @@ void fmt_class_string<bs_t<cpu_flag>>::format(std::string& out, u64 arg)
|
||||
format_bitset(out, arg, "[", "|", "]", &fmt_class_string<cpu_flag>::format);
|
||||
}
|
||||
|
||||
enum cpu_threads_emulation_info_dump_t : u32 {};
|
||||
|
||||
template<>
|
||||
void fmt_class_string<cpu_threads_emulation_info_dump_t>::format(std::string& out, u64 arg)
|
||||
{
|
||||
// Do not dump all threads, only select few
|
||||
// Aided by thread ID for filtering
|
||||
const u32 must_have_cpu_id = static_cast<u32>(arg);
|
||||
|
||||
// Dump main_thread
|
||||
const auto main_ppu = idm::get_unlocked<named_thread<ppu_thread>>(ppu_thread::id_base);
|
||||
|
||||
if (main_ppu)
|
||||
{
|
||||
fmt::append(out, "\n%s's thread context:\n", main_ppu->get_name());
|
||||
main_ppu->dump_all(out);
|
||||
}
|
||||
|
||||
if (must_have_cpu_id >> 24 == ppu_thread::id_base >> 24)
|
||||
{
|
||||
if (must_have_cpu_id != ppu_thread::id_base)
|
||||
{
|
||||
const auto selected_ppu = idm::get_unlocked<named_thread<ppu_thread>>(must_have_cpu_id);
|
||||
|
||||
if (selected_ppu)
|
||||
{
|
||||
fmt::append(out, "\n%s's thread context:\n", selected_ppu->get_name());
|
||||
selected_ppu->dump_all(out);
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (must_have_cpu_id >> 24 == spu_thread::id_base >> 24)
|
||||
{
|
||||
const auto selected_spu = idm::get_unlocked<named_thread<spu_thread>>(must_have_cpu_id);
|
||||
|
||||
if (selected_spu)
|
||||
{
|
||||
if (selected_spu->get_type() == spu_type::threaded && selected_spu->group->max_num > 1u)
|
||||
{
|
||||
// Dump the information of the entire group
|
||||
// Do not block because it is a potentially sensitive context
|
||||
std::shared_lock rlock(selected_spu->group->mutex, std::defer_lock);
|
||||
|
||||
for (u32 i = 0; !rlock.try_lock() && i < 100; i++)
|
||||
{
|
||||
busy_wait();
|
||||
}
|
||||
|
||||
if (rlock)
|
||||
{
|
||||
for (const auto& spu : selected_spu->group->threads)
|
||||
{
|
||||
if (spu && spu != selected_spu)
|
||||
{
|
||||
fmt::append(out, "\n%s's thread context:\n", spu->get_name());
|
||||
spu->dump_all(out);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
fmt::append(out, "\nFailed to dump SPU thread group's thread's information!");
|
||||
}
|
||||
|
||||
// Print the specified SPU thread last
|
||||
}
|
||||
|
||||
fmt::append(out, "\n%s's thread context:\n", selected_spu->get_name());
|
||||
selected_spu->dump_all(out);
|
||||
}
|
||||
}
|
||||
else if (must_have_cpu_id >> 24 == rsx::thread::id_base >> 24)
|
||||
{
|
||||
if (auto rsx = rsx::get_current_renderer())
|
||||
{
|
||||
fmt::append(out, "\n%s's thread context:\n", rsx->get_name());
|
||||
rsx->dump_all(out);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// CPU profiler thread
|
||||
struct cpu_prof
|
||||
{
|
||||
@@ -153,7 +236,7 @@ struct cpu_prof
|
||||
}
|
||||
|
||||
// Print info
|
||||
void print(const std::shared_ptr<cpu_thread>& ptr)
|
||||
void print(const shared_ptr<cpu_thread>& ptr)
|
||||
{
|
||||
if (new_samples < min_print_samples || samples == idle)
|
||||
{
|
||||
@@ -180,7 +263,7 @@ struct cpu_prof
|
||||
new_samples = 0;
|
||||
}
|
||||
|
||||
static void print_all(std::unordered_map<std::shared_ptr<cpu_thread>, sample_info>& threads, sample_info& all_info)
|
||||
static void print_all(std::unordered_map<shared_ptr<cpu_thread>, sample_info>& threads, sample_info& all_info)
|
||||
{
|
||||
u64 new_samples = 0;
|
||||
|
||||
@@ -236,7 +319,7 @@ struct cpu_prof
|
||||
|
||||
void operator()()
|
||||
{
|
||||
std::unordered_map<std::shared_ptr<cpu_thread>, sample_info> threads;
|
||||
std::unordered_map<shared_ptr<cpu_thread>, sample_info> threads;
|
||||
|
||||
while (thread_ctrl::state() != thread_state::aborting)
|
||||
{
|
||||
@@ -252,15 +335,15 @@ struct cpu_prof
|
||||
continue;
|
||||
}
|
||||
|
||||
std::shared_ptr<cpu_thread> ptr;
|
||||
shared_ptr<cpu_thread> ptr;
|
||||
|
||||
if (id >> 24 == 1)
|
||||
{
|
||||
ptr = idm::get<named_thread<ppu_thread>>(id);
|
||||
ptr = idm::get_unlocked<named_thread<ppu_thread>>(id);
|
||||
}
|
||||
else if (id >> 24 == 2)
|
||||
{
|
||||
ptr = idm::get<named_thread<spu_thread>>(id);
|
||||
ptr = idm::get_unlocked<named_thread<spu_thread>>(id);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -354,7 +437,7 @@ struct cpu_prof
|
||||
continue;
|
||||
}
|
||||
|
||||
// Wait, roughly for 20µs
|
||||
// Wait, roughly for 20us
|
||||
thread_ctrl::wait_for(20, false);
|
||||
}
|
||||
|
||||
@@ -1219,7 +1302,7 @@ cpu_thread* cpu_thread::get_next_cpu()
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
std::shared_ptr<CPUDisAsm> make_disasm(const cpu_thread* cpu, std::shared_ptr<cpu_thread> handle);
|
||||
std::shared_ptr<CPUDisAsm> make_disasm(const cpu_thread* cpu, shared_ptr<cpu_thread> handle);
|
||||
|
||||
void cpu_thread::dump_all(std::string& ret) const
|
||||
{
|
||||
@@ -1235,7 +1318,7 @@ void cpu_thread::dump_all(std::string& ret) const
|
||||
if (u32 cur_pc = get_pc(); cur_pc != umax)
|
||||
{
|
||||
// Dump a snippet of currently executed code (may be unreliable with non-static-interpreter decoders)
|
||||
auto disasm = make_disasm(this, nullptr);
|
||||
auto disasm = make_disasm(this, null_ptr);
|
||||
|
||||
const auto rsx = try_get<rsx::thread>();
|
||||
|
||||
@@ -1475,14 +1558,14 @@ u32 CPUDisAsm::DisAsmBranchTarget(s32 /*imm*/)
|
||||
return 0;
|
||||
}
|
||||
|
||||
extern bool try_lock_spu_threads_in_a_state_compatible_with_savestates(bool revert_lock, std::vector<std::pair<std::shared_ptr<named_thread<spu_thread>>, u32>>* out_list)
|
||||
extern bool try_lock_spu_threads_in_a_state_compatible_with_savestates(bool revert_lock, std::vector<std::pair<shared_ptr<named_thread<spu_thread>>, u32>>* out_list)
|
||||
{
|
||||
if (out_list)
|
||||
{
|
||||
out_list->clear();
|
||||
}
|
||||
|
||||
auto get_spus = [old_counter = u64{umax}, spu_list = std::vector<std::shared_ptr<named_thread<spu_thread>>>()](bool can_collect, bool force_collect) mutable
|
||||
auto get_spus = [old_counter = u64{umax}, spu_list = std::vector<shared_ptr<named_thread<spu_thread>>>()](bool can_collect, bool force_collect) mutable
|
||||
{
|
||||
const u64 new_counter = cpu_thread::g_threads_created + cpu_thread::g_threads_deleted;
|
||||
|
||||
|
||||
@@ -4,6 +4,9 @@
|
||||
|
||||
#include "util/v128.hpp"
|
||||
#include "util/simd.hpp"
|
||||
#include "util/logs.hpp"
|
||||
|
||||
LOG_CHANNEL(llvm_log, "LLVM");
|
||||
|
||||
llvm::LLVMContext g_llvm_ctx;
|
||||
|
||||
@@ -369,25 +372,85 @@ llvm::Constant* cpu_translator::make_const_vector<v128>(v128 v, llvm::Type* t, u
|
||||
|
||||
void cpu_translator::replace_intrinsics(llvm::Function& f)
|
||||
{
|
||||
for (auto& bb : f)
|
||||
for (llvm::BasicBlock& bb : f)
|
||||
{
|
||||
for (auto bit = bb.begin(); bit != bb.end();)
|
||||
std::set<std::string, std::less<>> names;
|
||||
|
||||
using InstListType = llvm::BasicBlock::InstListType;
|
||||
|
||||
std::function<InstListType::iterator(InstListType::iterator)> fix_funcs;
|
||||
|
||||
fix_funcs = [&](InstListType::iterator inst_bit)
|
||||
{
|
||||
if (auto ci = llvm::dyn_cast<llvm::CallInst>(&*bit))
|
||||
auto ci = llvm::dyn_cast<llvm::CallInst>(&*inst_bit);
|
||||
|
||||
if (!ci)
|
||||
{
|
||||
if (auto cf = ci->getCalledFunction())
|
||||
return std::next(inst_bit);
|
||||
}
|
||||
|
||||
const auto cf = ci->getCalledFunction();
|
||||
|
||||
if (!cf)
|
||||
{
|
||||
return std::next(inst_bit);
|
||||
}
|
||||
|
||||
std::string_view func_name{cf->getName().data(), cf->getName().size()};
|
||||
|
||||
const auto it = m_intrinsics.find(func_name);
|
||||
|
||||
if (it == m_intrinsics.end())
|
||||
{
|
||||
return std::next(inst_bit);
|
||||
}
|
||||
|
||||
if (!names.empty())
|
||||
{
|
||||
llvm_log.trace("cpu_translator::replace_intrinsics(): function '%s' names_size=%d, names[0]=%s", func_name, names.size(), *names.begin());
|
||||
}
|
||||
|
||||
if (names.contains(func_name))
|
||||
{
|
||||
fmt::throw_exception("cpu_translator::replace_intrinsics(): Recursion detected at function '%s'!", func_name);
|
||||
}
|
||||
|
||||
names.emplace(std::string(func_name));
|
||||
|
||||
// Set insert point after call instruction
|
||||
// In order to obtain a clear range of the inserted instructions
|
||||
if (llvm::Instruction* next = ci->getNextNode())
|
||||
{
|
||||
m_ir->SetInsertPoint(next);
|
||||
}
|
||||
else
|
||||
{
|
||||
m_ir->SetInsertPoint(std::addressof(bb));
|
||||
}
|
||||
|
||||
ci->replaceAllUsesWith(it->second(ci));
|
||||
|
||||
InstListType::iterator end = m_ir->GetInsertPoint();
|
||||
|
||||
for (InstListType::iterator next_it = ci->eraseFromParent(), inner = next_it; inner != end;)
|
||||
{
|
||||
if (llvm::isa<llvm::CallInst>(&*inner))
|
||||
{
|
||||
if (auto it = m_intrinsics.find(std::string_view(cf->getName().data(), cf->getName().size())); it != m_intrinsics.end())
|
||||
{
|
||||
m_ir->SetInsertPoint(ci);
|
||||
ci->replaceAllUsesWith(it->second(ci));
|
||||
bit = ci->eraseFromParent();
|
||||
continue;
|
||||
}
|
||||
inner = fix_funcs(inner);
|
||||
}
|
||||
else
|
||||
{
|
||||
inner++;
|
||||
}
|
||||
}
|
||||
|
||||
++bit;
|
||||
// TODO: Simplify in C++23 with 'names.erase(func_name);'
|
||||
names.erase(ensure(names.find(func_name), FN(x != names.end())));
|
||||
return end;
|
||||
};
|
||||
|
||||
for (auto bit = bb.begin(); bit != bb.end(); bit = fix_funcs(bit))
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,91 @@
|
||||
#include "stdafx.h"
|
||||
#include "ErrorCodes.h"
|
||||
#include "PPUThread.h"
|
||||
#include "SPUThread.h"
|
||||
|
||||
LOG_CHANNEL(sys_log, "SYS");
|
||||
|
||||
bool g_log_all_errors = false;
|
||||
|
||||
s32 error_code::error_report(s32 result, const logs::message* channel, const char* fmt, const fmt_type_info* sup, const u64* args)
|
||||
{
|
||||
static thread_local std::string g_tls_error_str;
|
||||
static thread_local std::unordered_map<std::string, usz> g_tls_error_stats;
|
||||
|
||||
if (!channel)
|
||||
{
|
||||
channel = &sys_log.error;
|
||||
}
|
||||
|
||||
if (!sup && !args)
|
||||
{
|
||||
if (!fmt)
|
||||
{
|
||||
// Report and clean error state
|
||||
for (auto&& pair : g_tls_error_stats)
|
||||
{
|
||||
if (pair.second > 3)
|
||||
{
|
||||
channel->operator()("Stat: %s [x%u]", pair.first, pair.second);
|
||||
}
|
||||
}
|
||||
|
||||
g_tls_error_stats.clear();
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
ensure(fmt);
|
||||
|
||||
const char* func = "Unknown function";
|
||||
|
||||
if (auto ppu = get_current_cpu_thread<ppu_thread>())
|
||||
{
|
||||
if (auto current = ppu->current_function)
|
||||
{
|
||||
func = current;
|
||||
}
|
||||
}
|
||||
else if (auto spu = get_current_cpu_thread<spu_thread>())
|
||||
{
|
||||
if (auto current = spu->current_func; current && spu->start_time)
|
||||
{
|
||||
func = current;
|
||||
}
|
||||
}
|
||||
|
||||
// Format log message (use preallocated buffer)
|
||||
g_tls_error_str.clear();
|
||||
|
||||
fmt::append(g_tls_error_str, "'%s' failed with 0x%08x", func, result);
|
||||
|
||||
// Add spacer between error and fmt if necessary
|
||||
if (fmt[0] != ' ')
|
||||
g_tls_error_str += " : ";
|
||||
|
||||
fmt::raw_append(g_tls_error_str, fmt, sup, args);
|
||||
|
||||
// Update stats and check log threshold
|
||||
|
||||
if (g_log_all_errors) [[unlikely]]
|
||||
{
|
||||
if (!g_tls_error_stats.empty())
|
||||
{
|
||||
// Report and clean error state
|
||||
error_report(0, nullptr, nullptr, nullptr, nullptr);
|
||||
}
|
||||
|
||||
channel->operator()("%s", g_tls_error_str);
|
||||
}
|
||||
else
|
||||
{
|
||||
const auto stat = ++g_tls_error_stats[g_tls_error_str];
|
||||
|
||||
if (stat <= 3)
|
||||
{
|
||||
channel->operator()("%s [%u]", g_tls_error_str, stat);
|
||||
}
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
+1918
-804
File diff suppressed because it is too large
Load Diff
+452
-149
@@ -1,6 +1,8 @@
|
||||
#pragma once
|
||||
|
||||
#include "Emu/Memory/vm_ptr.h"
|
||||
#include "cellPamf.h" // CellCodecTimeStamp
|
||||
#include "../lv2/sys_mutex.h"
|
||||
#include "../lv2/sys_cond.h"
|
||||
|
||||
// Error Codes
|
||||
enum CellAdecError : u32
|
||||
@@ -222,14 +224,6 @@ enum AudioCodecType : s32
|
||||
CELL_ADEC_TYPE_ATRAC3MULTI,
|
||||
};
|
||||
|
||||
inline bool adecIsAtracX(s32 type)
|
||||
{
|
||||
return type == CELL_ADEC_TYPE_ATRACX
|
||||
|| type == CELL_ADEC_TYPE_ATRACX_2CH
|
||||
|| type == CELL_ADEC_TYPE_ATRACX_6CH
|
||||
|| type == CELL_ADEC_TYPE_ATRACX_8CH;
|
||||
}
|
||||
|
||||
// Output Channel Number
|
||||
enum CellAdecChannel : s32
|
||||
{
|
||||
@@ -259,7 +253,7 @@ enum CellAdecSampleRate : s32
|
||||
CELL_ADEC_FS_8kHz,
|
||||
};
|
||||
|
||||
enum CellAdecBitLength : s32
|
||||
enum CellAdecBitLength : u32
|
||||
{
|
||||
CELL_ADEC_BIT_LENGTH_RESERVED1,
|
||||
CELL_ADEC_BIT_LENGTH_16,
|
||||
@@ -295,14 +289,14 @@ struct CellAdecResourceEx
|
||||
be_t<u32> ppuThreadPriority;
|
||||
be_t<u32> ppuThreadStackSize;
|
||||
be_t<u32> spurs_addr;
|
||||
u8 priority[8];
|
||||
be_t<u64, 1> priority;
|
||||
be_t<u32> maxContention;
|
||||
};
|
||||
|
||||
struct CellAdecResourceSpurs
|
||||
{
|
||||
be_t<u32> spurs_addr; // CellSpurs*
|
||||
u8 priority[8];
|
||||
be_t<u64, 1> priority;
|
||||
be_t<u32> maxContention;
|
||||
};
|
||||
|
||||
@@ -315,7 +309,7 @@ enum CellAdecMsgType : s32
|
||||
CELL_ADEC_MSG_TYPE_SEQDONE,
|
||||
};
|
||||
|
||||
using CellAdecCbMsg = s32(u32 handle, CellAdecMsgType msgType, s32 msgData, u32 cbArg);
|
||||
using CellAdecCbMsg = s32(vm::ptr<void> handle, CellAdecMsgType msgType, s32 msgData, vm::ptr<void> cbArg);
|
||||
|
||||
// Used for internal callbacks as well
|
||||
template <typename F>
|
||||
@@ -339,14 +333,14 @@ struct CellAdecAuInfo
|
||||
// BSI Info
|
||||
struct CellAdecPcmAttr
|
||||
{
|
||||
be_t<u32> bsiInfo_addr;
|
||||
vm::bptr<void> bsiInfo;
|
||||
};
|
||||
|
||||
struct CellAdecPcmItem
|
||||
{
|
||||
be_t<u32> pcmHandle;
|
||||
be_t<s32> pcmHandle;
|
||||
be_t<u32> status;
|
||||
be_t<u32> startAddr;
|
||||
vm::bcptr<void> startAddr;
|
||||
be_t<u32> size;
|
||||
CellAdecPcmAttr pcmAttr;
|
||||
CellAdecAuInfo auInfo;
|
||||
@@ -358,41 +352,36 @@ enum AdecCorrectPtsValueType : s8
|
||||
ADEC_CORRECT_PTS_VALUE_TYPE_UNSPECIFIED = -1,
|
||||
|
||||
// Adds a fixed amount
|
||||
ADEC_CORRECT_PTS_VALUE_TYPE_LPCM = 0,
|
||||
// 1
|
||||
ADEC_CORRECT_PTS_VALUE_TYPE_LPCM_HDMV = 0,
|
||||
ADEC_CORRECT_PTS_VALUE_TYPE_LPCM_DVD = 1, // Unused for some reason, the DVD player probably takes care of timestamps itself
|
||||
ADEC_CORRECT_PTS_VALUE_TYPE_ATRACX_48000Hz = 2,
|
||||
ADEC_CORRECT_PTS_VALUE_TYPE_ATRACX_44100Hz = 3,
|
||||
ADEC_CORRECT_PTS_VALUE_TYPE_ATRACX_32000Hz = 4,
|
||||
// 5: Dolby Digital
|
||||
// 6: ATRAC3
|
||||
// 7: MP3
|
||||
// 8: MP3
|
||||
// 9: MP3
|
||||
// 39: ATRAC3 multi-track
|
||||
ADEC_CORRECT_PTS_VALUE_TYPE_AC3 = 5,
|
||||
ADEC_CORRECT_PTS_VALUE_TYPE_ATRAC3 = 6,
|
||||
ADEC_CORRECT_PTS_VALUE_TYPE_MP3_48000Hz = 7,
|
||||
ADEC_CORRECT_PTS_VALUE_TYPE_MP3_44100Hz = 8,
|
||||
ADEC_CORRECT_PTS_VALUE_TYPE_MP3_32000Hz = 9,
|
||||
ADEC_CORRECT_PTS_VALUE_TYPE_ATRAC3MULTI = 39,
|
||||
|
||||
// Calls a decoder function (_SceAdecCorrectPtsValue_codec())
|
||||
// 17: Dolby Digital Plus
|
||||
// 18
|
||||
// 19
|
||||
// 20
|
||||
// 21: DTS HD
|
||||
// 22
|
||||
// 23
|
||||
// 24: CELP
|
||||
// 25: MPEG-2 AAC
|
||||
// 26: MPEG-2 BC
|
||||
// 27: Dolby TrueHD
|
||||
// 28: DTS
|
||||
// 29: MPEG-4 AAC
|
||||
// 30: Windows Media Audio
|
||||
// 31: DTS Express
|
||||
// 32: MP1
|
||||
// 33: MP3 Surround
|
||||
// 34: CELP8
|
||||
// 35: Windows Media Audio Professional
|
||||
// 36: Windows Media Audio Lossless
|
||||
// 37: DTS HD Core
|
||||
// 38: DTS HD Core
|
||||
ADEC_CORRECT_PTS_VALUE_TYPE_EAC3 = 17,
|
||||
ADEC_CORRECT_PTS_VALUE_TYPE_DTSHD = 21,
|
||||
ADEC_CORRECT_PTS_VALUE_TYPE_CELP = 24,
|
||||
ADEC_CORRECT_PTS_VALUE_TYPE_M2AAC = 25,
|
||||
ADEC_CORRECT_PTS_VALUE_TYPE_MPEG_L2 = 26,
|
||||
ADEC_CORRECT_PTS_VALUE_TYPE_TRUEHD = 27,
|
||||
ADEC_CORRECT_PTS_VALUE_TYPE_DTS = 28,
|
||||
ADEC_CORRECT_PTS_VALUE_TYPE_M4AAC = 29,
|
||||
ADEC_CORRECT_PTS_VALUE_TYPE_WMA = 30,
|
||||
ADEC_CORRECT_PTS_VALUE_TYPE_DTSLBR = 31,
|
||||
ADEC_CORRECT_PTS_VALUE_TYPE_MPEG_L1 = 32,
|
||||
ADEC_CORRECT_PTS_VALUE_TYPE_MP3S = 33,
|
||||
ADEC_CORRECT_PTS_VALUE_TYPE_CELP8 = 34,
|
||||
ADEC_CORRECT_PTS_VALUE_TYPE_WMAPRO = 35,
|
||||
ADEC_CORRECT_PTS_VALUE_TYPE_WMALSL = 36,
|
||||
ADEC_CORRECT_PTS_VALUE_TYPE_DTSHDCORE_UNK1 = 37,
|
||||
ADEC_CORRECT_PTS_VALUE_TYPE_DTSHDCORE_UNK2 = 38,
|
||||
};
|
||||
|
||||
// Internal callbacks
|
||||
@@ -471,6 +460,213 @@ struct AdecCmdQueue
|
||||
bool full() const { return size >= 4; }
|
||||
};
|
||||
|
||||
struct AdecFrame
|
||||
{
|
||||
b8 in_use; // True after issuing a decode command until the frame is consumed
|
||||
|
||||
be_t<s32> this_index; // Set when initialized in cellAdecOpen(), unused afterward
|
||||
|
||||
// Set when the corresponding callback is received, unused afterward
|
||||
b8 au_done;
|
||||
b8 unk1;
|
||||
b8 pcm_out;
|
||||
b8 unk2;
|
||||
|
||||
CellAdecAuInfo au_info;
|
||||
CellAdecPcmItem pcm_item;
|
||||
|
||||
u32 reserved1;
|
||||
u32 reserved2;
|
||||
|
||||
// Frames that are ready to be consumed form a linked list. However, this list is not used (AdecOutputQueue is used instead)
|
||||
be_t<s32> next; // Index of the next frame that can be consumed
|
||||
be_t<s32> prev; // Index of the previous frame that can be consumed
|
||||
};
|
||||
|
||||
CHECK_SIZE(AdecFrame, 0x68);
|
||||
|
||||
class AdecOutputQueue
|
||||
{
|
||||
struct entry
|
||||
{
|
||||
be_t<s32> this_index; // Unused
|
||||
be_t<s32> state; // 0xff = empty, 0x10 = filled
|
||||
vm::bptr<CellAdecPcmItem> pcm_item;
|
||||
be_t<s32> pcm_handle;
|
||||
}
|
||||
entries[4];
|
||||
|
||||
be_t<s32> front;
|
||||
be_t<s32> back;
|
||||
be_t<s32> size;
|
||||
|
||||
be_t<u32> mutex; // sys_mutex_t
|
||||
be_t<u32> cond; // sys_cond_t, unused
|
||||
|
||||
public:
|
||||
void init(ppu_thread& ppu, vm::ptr<AdecOutputQueue> _this)
|
||||
{
|
||||
this->front = 0;
|
||||
this->back = 0;
|
||||
this->size = 0;
|
||||
|
||||
const vm::var<sys_mutex_attribute_t> mutex_attr = {{ SYS_SYNC_PRIORITY, SYS_SYNC_NOT_RECURSIVE, SYS_SYNC_NOT_PROCESS_SHARED, SYS_SYNC_NOT_ADAPTIVE, 0, 0, 0, { "_adem07"_u64 } }};
|
||||
ensure(sys_mutex_create(ppu, _this.ptr(&AdecOutputQueue::mutex), mutex_attr) == CELL_OK); // Error code isn't checked on LLE
|
||||
|
||||
const vm::var<sys_cond_attribute_t> cond_attr = {{ SYS_SYNC_NOT_PROCESS_SHARED, 0, 0, { "_adec05"_u64 } }};
|
||||
ensure(sys_cond_create(ppu, _this.ptr(&AdecOutputQueue::cond), mutex, cond_attr) == CELL_OK); // Error code isn't checked on LLE
|
||||
|
||||
for (s32 i = 0; i < 4; i++)
|
||||
{
|
||||
entries[i] = { i, 0xff, vm::null, -1 };
|
||||
}
|
||||
}
|
||||
|
||||
error_code finalize(ppu_thread& ppu) const
|
||||
{
|
||||
if (error_code ret = sys_cond_destroy(ppu, cond); ret != CELL_OK)
|
||||
{
|
||||
return ret;
|
||||
}
|
||||
|
||||
if (error_code ret = sys_mutex_destroy(ppu, mutex); ret != CELL_OK)
|
||||
{
|
||||
return ret;
|
||||
}
|
||||
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
error_code push(ppu_thread& ppu, vm::ptr<CellAdecPcmItem> pcm_item, s32 pcm_handle)
|
||||
{
|
||||
ensure(sys_mutex_lock(ppu, mutex, 0) == CELL_OK); // Error code isn't checked on LLE
|
||||
|
||||
if (entries[back].state != 0xff)
|
||||
{
|
||||
ensure(sys_mutex_unlock(ppu, mutex) == CELL_OK); // Error code isn't checked on LLE
|
||||
return true; // LLE returns the result of the comparison above
|
||||
}
|
||||
|
||||
entries[back].state = 0x10;
|
||||
entries[back].pcm_item = pcm_item;
|
||||
entries[back].pcm_handle = pcm_handle;
|
||||
|
||||
back = (back + 1) & 3;
|
||||
size++;
|
||||
|
||||
ensure(sys_mutex_unlock(ppu, mutex) == CELL_OK); // Error code isn't checked on LLE
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
const entry* pop(ppu_thread& ppu)
|
||||
{
|
||||
ensure(sys_mutex_lock(ppu, mutex, 0) == CELL_OK); // Error code isn't checked on LLE
|
||||
|
||||
if (ppu.state & cpu_flag::again) // Savestate was created while waiting on the mutex
|
||||
{
|
||||
return {};
|
||||
}
|
||||
|
||||
if (entries[front].state == 0xff)
|
||||
{
|
||||
ensure(sys_mutex_unlock(ppu, mutex) == CELL_OK); // Error code isn't checked on LLE
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
const entry* const ret = &entries[front];
|
||||
|
||||
entries[front].state = 0xff;
|
||||
entries[front].pcm_handle = -1;
|
||||
|
||||
front = (front + 1) & 3;
|
||||
size--;
|
||||
|
||||
ensure(sys_mutex_unlock(ppu, mutex) == CELL_OK); // Error code isn't checked on LLE
|
||||
return ret;
|
||||
}
|
||||
|
||||
const entry& peek(ppu_thread& ppu) const
|
||||
{
|
||||
ensure(sys_mutex_lock(ppu, mutex, 0) == CELL_OK); // Error code isn't checked on LLE
|
||||
const entry& ret = entries[front];
|
||||
ensure(sys_mutex_unlock(ppu, mutex) == CELL_OK); // Error code isn't checked on LLE
|
||||
return ret;
|
||||
}
|
||||
};
|
||||
|
||||
CHECK_SIZE(AdecOutputQueue, 0x54);
|
||||
|
||||
enum class AdecSequenceState : u32
|
||||
{
|
||||
dormant = 0x100,
|
||||
ready = 0x200,
|
||||
closed = 0xa00,
|
||||
};
|
||||
|
||||
struct AdecContext // CellAdecHandle = AdecContext*
|
||||
{
|
||||
vm::bptr<AdecContext> _this;
|
||||
be_t<u32> this_size; // Size of this struct + AdecFrames + bitstream info structs
|
||||
|
||||
u32 unk; // Unused
|
||||
|
||||
be_t<AdecSequenceState> sequence_state;
|
||||
|
||||
CellAdecType type;
|
||||
CellAdecResource res;
|
||||
CellAdecCb callback;
|
||||
|
||||
vm::bptr<void> core_handle;
|
||||
vm::bcptr<CellAdecCoreOps> core_ops;
|
||||
|
||||
CellCodecTimeStamp previous_pts;
|
||||
|
||||
be_t<s32> frames_num;
|
||||
u32 reserved1;
|
||||
be_t<s32> frames_head; // Index of the oldest frame that can be consumed
|
||||
be_t<s32> frames_tail; // Index of the most recent frame that can be consumed
|
||||
vm::bptr<AdecFrame> frames; // Array of AdecFrames, number of elements is return value of CellAdecCoreOps::getPcmHandleNum
|
||||
|
||||
be_t<u32> bitstream_info_size;
|
||||
|
||||
sys_mutex_attribute_t mutex_attribute;
|
||||
be_t<u32> mutex; // sys_mutex_t
|
||||
|
||||
AdecOutputQueue pcm_queue; // Output queue for cellAdecGetPcm()
|
||||
AdecOutputQueue pcm_item_queue; // Output queue for cellAdecGetPcmItem()
|
||||
|
||||
u8 reserved2[1028];
|
||||
|
||||
[[nodiscard]] error_code get_new_pcm_handle(vm::ptr<CellAdecAuInfo> au_info) const;
|
||||
error_code verify_pcm_handle(s32 pcm_handle) const;
|
||||
vm::ptr<CellAdecAuInfo> get_au_info(s32 pcm_handle) const;
|
||||
void set_state(s32 pcm_handle, u32 state) const;
|
||||
error_code get_pcm_item(s32 pcm_handle, vm::ptr<CellAdecPcmItem>& pcm_item) const;
|
||||
error_code set_pcm_item(s32 pcm_handle, vm::ptr<void> pcm_addr, u32 pcm_size, vm::cpptr<void> bitstream_info) const;
|
||||
error_code link_frame(ppu_thread& ppu, s32 pcm_handle);
|
||||
error_code unlink_frame(ppu_thread& ppu, s32 pcm_handle);
|
||||
void reset_frame(s32 pcm_handle) const;
|
||||
error_code correct_pts_value(ppu_thread& ppu, s32 pcm_handle, s8 correct_pts_type);
|
||||
};
|
||||
|
||||
static_assert(std::is_standard_layout_v<AdecContext> && std::is_trivial_v<AdecContext>);
|
||||
CHECK_SIZE_ALIGN(AdecContext, 0x530, 8);
|
||||
|
||||
|
||||
enum : u32
|
||||
{
|
||||
CELL_ADEC_LPCM_DVD_CH_RESERVED1,
|
||||
CELL_ADEC_LPCM_DVD_CH_MONO,
|
||||
CELL_ADEC_LPCM_DVD_CH_RESERVED2,
|
||||
CELL_ADEC_LPCM_DVD_CH_STEREO,
|
||||
CELL_ADEC_LPCM_DVD_CH_UNK1, // Either 3 front or 2 front + 1 surround
|
||||
CELL_ADEC_LPCM_DVD_CH_UNK2, // Either 3 front + 1 surround or 2 front + 2 surround
|
||||
CELL_ADEC_LPCM_DVD_CH_3_2,
|
||||
CELL_ADEC_LPCM_DVD_CH_3_2_LFE,
|
||||
CELL_ADEC_LPCM_DVD_CH_3_4,
|
||||
CELL_ADEC_LPCM_DVD_CH_3_4_LFE,
|
||||
};
|
||||
|
||||
struct CellAdecParamLpcm
|
||||
{
|
||||
be_t<u32> channelNumber;
|
||||
@@ -487,6 +683,216 @@ struct CellAdecLpcmInfo
|
||||
be_t<u32> outputDataSize;
|
||||
};
|
||||
|
||||
// HLE exclusive, for savestates
|
||||
enum class lpcm_dec_state : u8
|
||||
{
|
||||
waiting_for_cmd_mutex_lock,
|
||||
waiting_for_cmd_cond_wait,
|
||||
waiting_for_output_mutex_lock,
|
||||
waiting_for_output_cond_wait,
|
||||
queue_mutex_lock,
|
||||
executing_cmd
|
||||
};
|
||||
|
||||
class LpcmDecSemaphore
|
||||
{
|
||||
be_t<u32> value;
|
||||
be_t<u32> mutex; // sys_mutex_t
|
||||
be_t<u32> cond; // sys_cond_t
|
||||
|
||||
public:
|
||||
error_code init(ppu_thread& ppu, vm::ptr<LpcmDecSemaphore> _this, u32 initial_value)
|
||||
{
|
||||
value = initial_value;
|
||||
|
||||
const vm::var<sys_mutex_attribute_t> mutex_attr{{ SYS_SYNC_PRIORITY, SYS_SYNC_NOT_RECURSIVE, SYS_SYNC_NOT_PROCESS_SHARED, SYS_SYNC_NOT_ADAPTIVE, 0, 0, 0, { "_adem01"_u64 } }};
|
||||
const vm::var<sys_cond_attribute_t> cond_attr{{ SYS_SYNC_NOT_PROCESS_SHARED, 0, 0, { "_adec01"_u64 } }};
|
||||
|
||||
if (error_code ret = sys_mutex_create(ppu, _this.ptr(&LpcmDecSemaphore::mutex), mutex_attr); ret != CELL_OK)
|
||||
{
|
||||
return ret;
|
||||
}
|
||||
|
||||
return sys_cond_create(ppu, _this.ptr(&LpcmDecSemaphore::cond), mutex, cond_attr);
|
||||
}
|
||||
|
||||
error_code finalize(ppu_thread& ppu) const
|
||||
{
|
||||
if (error_code ret = sys_cond_destroy(ppu, cond); ret != CELL_OK)
|
||||
{
|
||||
return ret;
|
||||
}
|
||||
|
||||
return sys_mutex_destroy(ppu, mutex);
|
||||
}
|
||||
|
||||
error_code release(ppu_thread& ppu)
|
||||
{
|
||||
if (error_code ret = sys_mutex_lock(ppu, mutex, 0); ret != CELL_OK)
|
||||
{
|
||||
return ret;
|
||||
}
|
||||
|
||||
value++;
|
||||
|
||||
if (error_code ret = sys_cond_signal(ppu, cond); ret != CELL_OK)
|
||||
{
|
||||
return ret; // LLE doesn't unlock the mutex
|
||||
}
|
||||
|
||||
return sys_mutex_unlock(ppu, mutex);
|
||||
}
|
||||
|
||||
error_code acquire(ppu_thread& ppu, lpcm_dec_state& savestate)
|
||||
{
|
||||
if (savestate == lpcm_dec_state::waiting_for_cmd_cond_wait)
|
||||
{
|
||||
goto cond_wait;
|
||||
}
|
||||
|
||||
savestate = lpcm_dec_state::waiting_for_cmd_mutex_lock;
|
||||
|
||||
if (error_code ret = sys_mutex_lock(ppu, mutex, 0); ret != CELL_OK)
|
||||
{
|
||||
return ret;
|
||||
}
|
||||
|
||||
if (ppu.state & cpu_flag::again)
|
||||
{
|
||||
return {};
|
||||
}
|
||||
|
||||
if (value == 0u)
|
||||
{
|
||||
savestate = lpcm_dec_state::waiting_for_cmd_cond_wait;
|
||||
cond_wait:
|
||||
|
||||
if (error_code ret = sys_cond_wait(ppu, cond, 0); ret != CELL_OK)
|
||||
{
|
||||
return ret; // LLE doesn't unlock the mutex
|
||||
}
|
||||
|
||||
if (ppu.state & cpu_flag::again)
|
||||
{
|
||||
return {};
|
||||
}
|
||||
}
|
||||
|
||||
value--;
|
||||
|
||||
return sys_mutex_unlock(ppu, mutex);
|
||||
}
|
||||
};
|
||||
|
||||
CHECK_SIZE(LpcmDecSemaphore, 0xc);
|
||||
|
||||
enum class LpcmDecCmdType : u32
|
||||
{
|
||||
start_seq,
|
||||
end_seq,
|
||||
decode_au,
|
||||
close
|
||||
};
|
||||
|
||||
struct LpcmDecCmd
|
||||
{
|
||||
be_t<s32> pcm_handle;
|
||||
vm::bcptr<void> au_start_addr;
|
||||
be_t<u32> au_size;
|
||||
u32 reserved1[2];
|
||||
CellAdecParamLpcm lpcm_param;
|
||||
be_t<LpcmDecCmdType> type;
|
||||
u32 reserved2;
|
||||
|
||||
LpcmDecCmd() = default; // cellAdecOpen()
|
||||
|
||||
LpcmDecCmd(LpcmDecCmdType&& type) // End sequence
|
||||
: type(type)
|
||||
{
|
||||
}
|
||||
|
||||
LpcmDecCmd(LpcmDecCmdType&& type, const CellAdecParamLpcm& lpcm_param) // Start sequence
|
||||
: lpcm_param(lpcm_param), type(type)
|
||||
{
|
||||
}
|
||||
|
||||
LpcmDecCmd(LpcmDecCmdType&& type, const s32& pcm_handle, const CellAdecAuInfo& au_info) // Decode au
|
||||
: pcm_handle(pcm_handle), au_start_addr(au_info.startAddr), au_size(au_info.size), type(type)
|
||||
{
|
||||
}
|
||||
};
|
||||
|
||||
CHECK_SIZE(LpcmDecCmd, 0x2c);
|
||||
|
||||
struct LpcmDecContext
|
||||
{
|
||||
AdecCmdQueue<LpcmDecCmd> cmd_queue;
|
||||
|
||||
be_t<u64> thread_id; // sys_ppu_thread_t
|
||||
|
||||
be_t<u32> queue_size_mutex; // sys_mutex_t
|
||||
be_t<u32> queue_size_cond; // sys_cond_t, unused
|
||||
be_t<u32> unk_mutex; // sys_mutex_t, unused
|
||||
be_t<u32> unk_cond; // sys_cond_t, unused
|
||||
|
||||
be_t<u32> run_thread;
|
||||
|
||||
AdecCb<AdecNotifyAuDone> notify_au_done;
|
||||
AdecCb<AdecNotifyPcmOut> notify_pcm_out;
|
||||
AdecCb<AdecNotifyError> notify_error;
|
||||
AdecCb<AdecNotifySeqDone> notify_seq_done;
|
||||
|
||||
be_t<u32> output_locked;
|
||||
vm::bptr<f32> output;
|
||||
|
||||
vm::bptr<CellAdecParamLpcm> lpcm_param;
|
||||
|
||||
vm::bcptr<void> spurs_cmd_data;
|
||||
|
||||
// HLE exclusive
|
||||
lpcm_dec_state savestate;
|
||||
u64 cmd_counter; // For debugging
|
||||
|
||||
u8 reserved1[24]; // 36 bytes on LLE
|
||||
|
||||
be_t<u32> output_mutex; // sys_mutex_t
|
||||
be_t<u32> output_consumed; // sys_cond_t
|
||||
|
||||
LpcmDecSemaphore cmd_available;
|
||||
LpcmDecSemaphore reserved2; // Unused
|
||||
|
||||
be_t<u32> queue_mutex; // sys_mutex_t
|
||||
|
||||
be_t<u32> error_occurred;
|
||||
|
||||
u8 spurs_stuff[32];
|
||||
|
||||
be_t<u32> spurs_queue_pop_mutex;
|
||||
be_t<u32> spurs_queue_push_mutex;
|
||||
|
||||
be_t<u32> using_existing_spurs_instance;
|
||||
|
||||
be_t<u32> dvd_packing;
|
||||
|
||||
be_t<u32> output_size;
|
||||
|
||||
LpcmDecCmd cmd; // HLE exclusive, name of Spurs taskset (32 bytes) + CellSpursTaskLsPattern on LLE
|
||||
|
||||
u8 more_spurs_stuff[10]; // 52 bytes on LLE
|
||||
|
||||
void exec(ppu_thread& ppu);
|
||||
|
||||
template <LpcmDecCmdType type>
|
||||
error_code send_command(ppu_thread& ppu, auto&&... args);
|
||||
|
||||
inline error_code release_output(ppu_thread& ppu);
|
||||
};
|
||||
|
||||
static_assert(std::is_standard_layout_v<LpcmDecContext>);
|
||||
CHECK_SIZE_ALIGN(LpcmDecContext, 0x1c8, 8);
|
||||
|
||||
constexpr s32 LPCM_DEC_OUTPUT_BUFFER_SIZE = 0x40000;
|
||||
|
||||
// CELP Excitation Mode
|
||||
enum CELP_ExcitationMode : s32
|
||||
{
|
||||
@@ -1024,106 +1430,3 @@ struct CellAdecMpmcInfo
|
||||
be_t<u32> lfePresent;
|
||||
be_t<u32> channelCoufiguration;
|
||||
};
|
||||
|
||||
/* Audio Decoder Thread Classes */
|
||||
|
||||
enum AdecJobType : u32
|
||||
{
|
||||
adecStartSeq,
|
||||
adecEndSeq,
|
||||
adecDecodeAu,
|
||||
adecClose,
|
||||
};
|
||||
|
||||
struct AdecTask
|
||||
{
|
||||
AdecJobType type;
|
||||
union
|
||||
{
|
||||
struct
|
||||
{
|
||||
u32 auInfo_addr;
|
||||
u32 addr;
|
||||
u32 size;
|
||||
u64 pts;
|
||||
u64 userdata;
|
||||
} au;
|
||||
|
||||
struct
|
||||
{
|
||||
s32 sample_rate;
|
||||
s32 channel_config;
|
||||
s32 channels;
|
||||
s32 frame_size;
|
||||
std::array<u8, 4> extra_config;
|
||||
s32 output;
|
||||
u8 downmix;
|
||||
u8 ats_header;
|
||||
} at3p;
|
||||
};
|
||||
|
||||
AdecTask(AdecJobType type)
|
||||
: type(type)
|
||||
{
|
||||
}
|
||||
|
||||
AdecTask()
|
||||
{
|
||||
}
|
||||
};
|
||||
|
||||
struct AdecFrame
|
||||
{
|
||||
struct AVFrame* data;
|
||||
u64 pts;
|
||||
u64 userdata;
|
||||
u32 auAddr;
|
||||
u32 auSize;
|
||||
u32 size;
|
||||
};
|
||||
|
||||
int adecRead(void* opaque, u8* buf, int buf_size);
|
||||
|
||||
static const u32 at3freq[8] = { 32000, 44100, 48000, 88200, 96000, 0, 0, 0 };
|
||||
|
||||
struct OMAHeader // OMA Header
|
||||
{
|
||||
u32 magic; // 0x01334145
|
||||
u16 size; // 96 << 8
|
||||
u16 unk0; // 0xffff
|
||||
u64 unk1; // 0x00500f0100000000ULL
|
||||
u64 unk2; // 0xcef5000000000400ULL
|
||||
u64 unk3; // 0x1c458024329192d2ULL
|
||||
u8 codecId; // 1 for ATRAC3P
|
||||
u8 code0; // 0
|
||||
u8 code1;
|
||||
u8 code2;
|
||||
u32 reserved[15]; // 0
|
||||
|
||||
OMAHeader(u8 codec_id, u32 freq, u8 channel_count, u32 frame_size)
|
||||
: magic(0x01334145)
|
||||
, size(96 << 8)
|
||||
, unk0(0xffff)
|
||||
, unk1(0x00500f0100000000ULL)
|
||||
, unk2(0xcef5000000000400ULL)
|
||||
, unk3(0x1c458024329192d2ULL)
|
||||
, codecId(codec_id)
|
||||
, code0(0)
|
||||
{
|
||||
memset(reserved, 0, sizeof(reserved));
|
||||
|
||||
u8 freq_code;
|
||||
for (freq_code = 0; freq_code < 5; freq_code++)
|
||||
{
|
||||
if (at3freq[freq_code] == freq)
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
u32 prepared_frame_size = (frame_size - 8) / 8;
|
||||
code1 = ((prepared_frame_size >> 8) & 0x3) | ((channel_count & 0x7) << 2) | (freq_code << 5);
|
||||
code2 = prepared_frame_size & 0xff;
|
||||
}
|
||||
};
|
||||
|
||||
CHECK_SIZE(OMAHeader, 96);
|
||||
|
||||
@@ -270,35 +270,75 @@ void AtracXdecContext::exec(ppu_thread& ppu)
|
||||
decoder.init_avcodec();
|
||||
}
|
||||
|
||||
switch (savestate)
|
||||
{
|
||||
case atracxdec_state::initial: break;
|
||||
case atracxdec_state::waiting_for_cmd: goto label1_wait_for_cmd_state;
|
||||
case atracxdec_state::checking_run_thread_1: goto label2_check_run_thread_1_state;
|
||||
case atracxdec_state::executing_cmd: goto label3_execute_cmd_state;
|
||||
case atracxdec_state::waiting_for_output: goto label4_wait_for_output_state;
|
||||
case atracxdec_state::checking_run_thread_2: goto label5_check_run_thread_2_state;
|
||||
case atracxdec_state::decoding: goto label6_decode_state;
|
||||
}
|
||||
|
||||
for (;;cmd_counter++)
|
||||
{
|
||||
cellAtracXdec.trace("Command counter: %llu, waiting for next command...", cmd_counter);
|
||||
|
||||
if (!skip_getting_command)
|
||||
for (;;)
|
||||
{
|
||||
lv2_obj::sleep(ppu);
|
||||
std::lock_guard lock{queue_mutex};
|
||||
savestate = atracxdec_state::initial;
|
||||
|
||||
while (cmd_queue.empty() && !ppu.is_stopped())
|
||||
{
|
||||
lv2_obj::sleep(ppu);
|
||||
queue_not_empty.wait(queue_mutex, 20000);
|
||||
}
|
||||
ensure(sys_mutex_lock(ppu, queue_mutex, 0) == CELL_OK);
|
||||
|
||||
if (ppu.is_stopped())
|
||||
{
|
||||
ppu.state += cpu_flag::again;
|
||||
return;
|
||||
}
|
||||
|
||||
cmd_queue.pop(cmd);
|
||||
|
||||
if (!run_thread)
|
||||
if (ppu.state & cpu_flag::again)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (!cmd_queue.empty())
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
||||
savestate = atracxdec_state::waiting_for_cmd;
|
||||
label1_wait_for_cmd_state:
|
||||
|
||||
ensure(sys_cond_wait(ppu, queue_not_empty, 0) == CELL_OK);
|
||||
|
||||
if (ppu.state & cpu_flag::again)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
ensure(sys_mutex_unlock(ppu, queue_mutex) == CELL_OK);
|
||||
}
|
||||
|
||||
cmd_queue.pop(cmd);
|
||||
|
||||
ensure(sys_mutex_unlock(ppu, queue_mutex) == CELL_OK);
|
||||
|
||||
savestate = atracxdec_state::checking_run_thread_1;
|
||||
label2_check_run_thread_1_state:
|
||||
|
||||
ensure(sys_mutex_lock(ppu, run_thread_mutex, 0) == CELL_OK);
|
||||
|
||||
if (ppu.state & cpu_flag::again)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (!run_thread)
|
||||
{
|
||||
ensure(sys_mutex_unlock(ppu, run_thread_mutex) == CELL_OK);
|
||||
return;
|
||||
}
|
||||
|
||||
ensure(sys_mutex_unlock(ppu, run_thread_mutex) == CELL_OK);
|
||||
|
||||
savestate = atracxdec_state::executing_cmd;
|
||||
label3_execute_cmd_state:
|
||||
|
||||
cellAtracXdec.trace("Command type: %d", static_cast<u32>(cmd.type.get()));
|
||||
|
||||
switch (cmd.type)
|
||||
@@ -327,8 +367,6 @@ void AtracXdecContext::exec(ppu_thread& ppu)
|
||||
}
|
||||
case AtracXdecCmdType::end_seq:
|
||||
{
|
||||
skip_getting_command = true;
|
||||
|
||||
// Block savestate creation during callbacks
|
||||
std::unique_lock savestate_lock{g_fxo->get<hle_locks_t>(), std::try_to_lock};
|
||||
|
||||
@@ -338,41 +376,59 @@ void AtracXdecContext::exec(ppu_thread& ppu)
|
||||
return;
|
||||
}
|
||||
|
||||
skip_getting_command = false;
|
||||
|
||||
// Doesn't do anything else
|
||||
notify_seq_done.cbFunc(ppu, notify_seq_done.cbArg);
|
||||
break;
|
||||
}
|
||||
case AtracXdecCmdType::decode_au:
|
||||
{
|
||||
skip_getting_command = true;
|
||||
|
||||
ensure(!!cmd.au_start_addr); // Not checked on LLE
|
||||
|
||||
cellAtracXdec.trace("Waiting for output to be consumed...");
|
||||
|
||||
lv2_obj::sleep(ppu);
|
||||
std::unique_lock output_mutex_lock{output_mutex};
|
||||
ensure(sys_mutex_lock(ppu, output_mutex, 0) == CELL_OK);
|
||||
|
||||
while (output_locked && !ppu.is_stopped())
|
||||
if (ppu.state & cpu_flag::again)
|
||||
{
|
||||
lv2_obj::sleep(ppu);
|
||||
output_consumed.wait(output_mutex, 20000);
|
||||
return;
|
||||
}
|
||||
|
||||
if (ppu.is_stopped())
|
||||
while (output_locked)
|
||||
{
|
||||
savestate = atracxdec_state::waiting_for_output;
|
||||
label4_wait_for_output_state:
|
||||
|
||||
ensure(sys_cond_wait(ppu, output_consumed, 0) == CELL_OK);
|
||||
|
||||
if (ppu.state & cpu_flag::again)
|
||||
{
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
cellAtracXdec.trace("Output consumed");
|
||||
|
||||
savestate = atracxdec_state::checking_run_thread_2;
|
||||
label5_check_run_thread_2_state:
|
||||
|
||||
ensure(sys_mutex_lock(ppu, run_thread_mutex, 0) == CELL_OK);
|
||||
|
||||
if (ppu.state & cpu_flag::again)
|
||||
{
|
||||
ppu.state += cpu_flag::again;
|
||||
return;
|
||||
}
|
||||
|
||||
if (!run_thread)
|
||||
{
|
||||
ensure(sys_mutex_unlock(ppu, run_thread_mutex) == CELL_OK);
|
||||
ensure(sys_mutex_unlock(ppu, output_mutex) == CELL_OK);
|
||||
return;
|
||||
}
|
||||
|
||||
cellAtracXdec.trace("Output consumed");
|
||||
ensure(sys_mutex_unlock(ppu, run_thread_mutex) == CELL_OK);
|
||||
|
||||
savestate = atracxdec_state::decoding;
|
||||
label6_decode_state:
|
||||
|
||||
u32 error = CELL_OK;
|
||||
|
||||
@@ -578,14 +634,12 @@ void AtracXdecContext::exec(ppu_thread& ppu)
|
||||
return;
|
||||
}
|
||||
|
||||
skip_getting_command = false;
|
||||
|
||||
// au_done and pcm_out callbacks are always called after a decode command, even if an error occurred
|
||||
// The output always has to be consumed as well
|
||||
notify_au_done.cbFunc(ppu, cmd.pcm_handle, notify_au_done.cbArg);
|
||||
|
||||
output_locked = true;
|
||||
output_mutex_lock.unlock();
|
||||
ensure(sys_mutex_unlock(ppu, output_mutex) == CELL_OK);
|
||||
|
||||
const u32 output_size = decoded_samples_num * (decoder.bw_pcm & 0x7fu) * decoder.nch_out;
|
||||
|
||||
@@ -614,29 +668,46 @@ void AtracXdecContext::exec(ppu_thread& ppu)
|
||||
template <AtracXdecCmdType type>
|
||||
error_code AtracXdecContext::send_command(ppu_thread& ppu, auto&&... args)
|
||||
{
|
||||
ppu.state += cpu_flag::wait;
|
||||
auto& savestate = *ppu.optional_savestate_state;
|
||||
const bool signal = savestate.try_read<bool>().second;
|
||||
savestate.clear();
|
||||
|
||||
if (!signal)
|
||||
{
|
||||
std::lock_guard lock{queue_mutex};
|
||||
ensure(sys_mutex_lock(ppu, queue_mutex, 0) == CELL_OK);
|
||||
|
||||
if (ppu.state & cpu_flag::again)
|
||||
{
|
||||
return {};
|
||||
}
|
||||
|
||||
if constexpr (type == AtracXdecCmdType::close)
|
||||
{
|
||||
// Close command is only sent if the queue is empty on LLE
|
||||
if (!cmd_queue.empty())
|
||||
{
|
||||
ensure(sys_mutex_unlock(ppu, queue_mutex) == CELL_OK);
|
||||
return {};
|
||||
}
|
||||
}
|
||||
|
||||
if (cmd_queue.full())
|
||||
{
|
||||
ensure(sys_mutex_unlock(ppu, queue_mutex) == CELL_OK);
|
||||
return CELL_ADEC_ERROR_ATX_BUSY;
|
||||
}
|
||||
|
||||
cmd_queue.emplace(std::forward<AtracXdecCmdType>(type), std::forward<decltype(args)>(args)...);
|
||||
|
||||
ensure(sys_mutex_unlock(ppu, queue_mutex) == CELL_OK);
|
||||
}
|
||||
|
||||
queue_not_empty.notify_one();
|
||||
ensure(sys_cond_signal(ppu, queue_not_empty) == CELL_OK);
|
||||
|
||||
if (ppu.state & cpu_flag::again)
|
||||
{
|
||||
savestate(true);
|
||||
}
|
||||
|
||||
return CELL_OK;
|
||||
}
|
||||
@@ -699,6 +770,29 @@ error_code _CellAdecCoreOpOpenExt_atracx(ppu_thread& ppu, vm::ptr<AtracXdecConte
|
||||
write_to_ptr(handle.get_ptr(), AtracXdecContext(notifyAuDone, notifyAuDoneArg, notifyPcmOut, notifyPcmOutArg, notifyError, notifyErrorArg, notifySeqDone, notifySeqDoneArg,
|
||||
vm::bptr<u8>::make(handle.addr() + utils::align(static_cast<u32>(sizeof(AtracXdecContext)), 0x80) + ATXDEC_SPURS_STRUCTS_SIZE)));
|
||||
|
||||
const vm::var<sys_mutex_attribute_t> mutex_attr{{ SYS_SYNC_PRIORITY, SYS_SYNC_NOT_RECURSIVE, SYS_SYNC_NOT_PROCESS_SHARED, SYS_SYNC_NOT_ADAPTIVE, 0, 0, 0, { "_atd001"_u64 } }};
|
||||
const vm::var<sys_cond_attribute_t> cond_attr{{ SYS_SYNC_NOT_PROCESS_SHARED, 0, 0, { "_atd002"_u64 } }};
|
||||
|
||||
ensure(sys_mutex_create(ppu, handle.ptr(&AtracXdecContext::queue_mutex), mutex_attr) == CELL_OK);
|
||||
ensure(sys_cond_create(ppu, handle.ptr(&AtracXdecContext::queue_not_empty), handle->queue_mutex, cond_attr) == CELL_OK);
|
||||
|
||||
mutex_attr->name_u64 = "_atd003"_u64;
|
||||
cond_attr->name_u64 = "_atd004"_u64;
|
||||
|
||||
ensure(sys_mutex_create(ppu, handle.ptr(&AtracXdecContext::run_thread_mutex), mutex_attr) == CELL_OK);
|
||||
ensure(sys_cond_create(ppu, handle.ptr(&AtracXdecContext::run_thread_cond), handle->run_thread_mutex, cond_attr) == CELL_OK);
|
||||
|
||||
mutex_attr->name_u64 = "_atd005"_u64;
|
||||
cond_attr->name_u64 = "_atd006"_u64;
|
||||
|
||||
ensure(sys_mutex_create(ppu, handle.ptr(&AtracXdecContext::output_mutex), mutex_attr) == CELL_OK);
|
||||
ensure(sys_cond_create(ppu, handle.ptr(&AtracXdecContext::output_consumed), handle->output_mutex, cond_attr) == CELL_OK);
|
||||
|
||||
ensure(sys_mutex_lock(ppu, handle->output_mutex, 0) == CELL_OK);
|
||||
handle->output_locked = false;
|
||||
ensure(sys_cond_signal(ppu, handle->output_consumed) == CELL_OK);
|
||||
ensure(sys_mutex_unlock(ppu, handle->output_mutex) == CELL_OK);
|
||||
|
||||
const vm::var<char[]> _name = vm::make_str("HLE ATRAC3plus decoder");
|
||||
const auto entry = g_fxo->get<ppu_function_manager>().func_addr(FIND_FUNC(atracXdecEntry));
|
||||
ppu_execute<&sys_ppu_thread_create>(ppu, handle.ptr(&AtracXdecContext::thread_id), entry, handle.addr(), +res->ppuThreadPriority, +res->ppuThreadStackSize, SYS_PPU_THREAD_CREATE_JOINABLE, +_name);
|
||||
@@ -725,29 +819,32 @@ error_code _CellAdecCoreOpClose_atracx(ppu_thread& ppu, vm::ptr<AtracXdecContext
|
||||
return {};
|
||||
}
|
||||
|
||||
ppu.state += cpu_flag::wait;
|
||||
|
||||
cellAtracXdec.notice("_CellAdecCoreOpClose_atracx(handle=*0x%x)", handle);
|
||||
|
||||
ensure(!!handle); // Not checked on LLE
|
||||
|
||||
ensure(sys_mutex_lock(ppu, handle->run_thread_mutex, 0) == CELL_OK);
|
||||
handle->run_thread = false;
|
||||
ensure(sys_mutex_unlock(ppu, handle->run_thread_mutex) == CELL_OK);
|
||||
|
||||
handle->send_command<AtracXdecCmdType::close>(ppu);
|
||||
|
||||
{
|
||||
std::lock_guard lock{handle->output_mutex};
|
||||
handle->output_locked = false;
|
||||
}
|
||||
ensure(sys_mutex_lock(ppu, handle->output_mutex, 0) == CELL_OK);
|
||||
handle->output_locked = false;
|
||||
ensure(sys_mutex_unlock(ppu, handle->output_mutex) == CELL_OK);
|
||||
ensure(sys_cond_signal(ppu, handle->output_consumed) == CELL_OK);
|
||||
|
||||
handle->output_consumed.notify_one();
|
||||
vm::var<u64> thread_ret;
|
||||
ensure(sys_ppu_thread_join(ppu, static_cast<u32>(handle->thread_id), +thread_ret) == CELL_OK);
|
||||
|
||||
if (vm::var<u64> ret; sys_ppu_thread_join(ppu, static_cast<u32>(handle->thread_id), +ret) != CELL_OK)
|
||||
{
|
||||
// Other thread already closed the decoder
|
||||
return CELL_ADEC_ERROR_FATAL;
|
||||
}
|
||||
error_code ret = sys_cond_destroy(ppu, handle->queue_not_empty);
|
||||
ret = ret ? ret : sys_cond_destroy(ppu, handle->run_thread_cond);
|
||||
ret = ret ? ret : sys_cond_destroy(ppu, handle->output_consumed);
|
||||
ret = ret ? ret : sys_mutex_destroy(ppu, handle->queue_mutex);
|
||||
ret = ret ? ret : sys_mutex_destroy(ppu, handle->run_thread_mutex);
|
||||
ret = ret ? ret : sys_mutex_destroy(ppu, handle->output_mutex);
|
||||
|
||||
return CELL_OK;
|
||||
return ret != CELL_OK ? static_cast<error_code>(CELL_ADEC_ERROR_FATAL) : CELL_OK;
|
||||
}
|
||||
|
||||
error_code _CellAdecCoreOpStartSeq_atracx(ppu_thread& ppu, vm::ptr<AtracXdecContext> handle, vm::cptr<CellAdecParamAtracX> atracxParam)
|
||||
@@ -808,15 +905,35 @@ error_code _CellAdecCoreOpRealign_atracx(vm::ptr<AtracXdecContext> handle, vm::p
|
||||
|
||||
error_code _CellAdecCoreOpReleasePcm_atracx(ppu_thread& ppu, vm::ptr<AtracXdecContext> handle, s32 pcmHandle, vm::cptr<void> outBuffer)
|
||||
{
|
||||
ppu.state += cpu_flag::wait;
|
||||
|
||||
cellAtracXdec.trace("_CellAdecCoreOpReleasePcm_atracx(handle=*0x%x, pcmHandle=%d, outBuffer=*0x%x)", handle, pcmHandle, outBuffer);
|
||||
|
||||
ensure(!!handle); // Not checked on LLE
|
||||
|
||||
std::lock_guard lock{handle->output_mutex};
|
||||
handle->output_locked = false;
|
||||
handle->output_consumed.notify_one();
|
||||
auto& savestate = *ppu.optional_savestate_state;
|
||||
const bool signal = savestate.try_read<bool>().second;
|
||||
savestate.clear();
|
||||
|
||||
if (!signal)
|
||||
{
|
||||
ensure(sys_mutex_lock(ppu, handle->output_mutex, 0) == CELL_OK);
|
||||
|
||||
if (ppu.state & cpu_flag::again)
|
||||
{
|
||||
return {};
|
||||
}
|
||||
|
||||
handle->output_locked = false;
|
||||
}
|
||||
|
||||
ensure(sys_cond_signal(ppu, handle->output_consumed) == CELL_OK);
|
||||
|
||||
if (ppu.state & cpu_flag::again)
|
||||
{
|
||||
savestate(true);
|
||||
return {};
|
||||
}
|
||||
|
||||
ensure(sys_mutex_unlock(ppu, handle->output_mutex) == CELL_OK);
|
||||
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
@@ -20,7 +20,6 @@ constexpr int averror_eof = AVERROR_EOF; // Workaround for old-style-cast error
|
||||
#pragma GCC diagnostic pop
|
||||
#endif
|
||||
|
||||
#include "Utilities/cond.h"
|
||||
#include "cellPamf.h"
|
||||
#include "cellAdec.h"
|
||||
|
||||
@@ -215,16 +214,28 @@ struct AtracXdecDecoder
|
||||
|
||||
CHECK_SIZE(AtracXdecDecoder, 0xa8);
|
||||
|
||||
// HLE exclusive, for savestates
|
||||
enum class atracxdec_state : u8
|
||||
{
|
||||
initial,
|
||||
waiting_for_cmd,
|
||||
checking_run_thread_1,
|
||||
executing_cmd,
|
||||
waiting_for_output,
|
||||
checking_run_thread_2,
|
||||
decoding
|
||||
};
|
||||
|
||||
struct AtracXdecContext
|
||||
{
|
||||
be_t<u64> thread_id; // sys_ppu_thread_t
|
||||
|
||||
shared_mutex queue_mutex; // sys_mutex_t
|
||||
cond_variable queue_not_empty; // sys_cond_t
|
||||
be_t<u32> queue_mutex; // sys_mutex_t
|
||||
be_t<u32> queue_not_empty; // sys_cond_t
|
||||
AdecCmdQueue<AtracXdecCmd> cmd_queue;
|
||||
|
||||
shared_mutex output_mutex; // sys_mutex_t
|
||||
cond_variable output_consumed; // sys_cond_t
|
||||
be_t<u32> output_mutex; // sys_mutex_t
|
||||
be_t<u32> output_consumed; // sys_cond_t
|
||||
be_t<u32> output_locked = false;
|
||||
|
||||
be_t<u32> run_thread_mutex; // sys_mutex_t
|
||||
@@ -239,10 +250,10 @@ struct AtracXdecContext
|
||||
const vm::bptr<u8> work_mem;
|
||||
|
||||
// HLE exclusive
|
||||
u64 cmd_counter = 0; // For debugging
|
||||
AtracXdecCmd cmd; // For savestates; if savestate was created while processing a decode command, we need to save the current command
|
||||
b8 skip_getting_command = false; // For savestates; skips getting a new command from the queue
|
||||
b8 skip_next_frame; // Needed to emulate behavior of LLE SPU program, it doesn't output the first frame after a sequence reset or error
|
||||
u64 cmd_counter = 0; // For debugging
|
||||
AtracXdecCmd cmd; // For savestates; if savestate was created while processing a decode command, we need to save the current command
|
||||
atracxdec_state savestate{}; // For savestates
|
||||
b8 skip_next_frame; // Needed to emulate behavior of LLE SPU program, it doesn't output the first frame after a sequence reset or error
|
||||
|
||||
u8 spurs_stuff[58]; // 120 bytes on LLE, pointers to CellSpurs, CellSpursTaskset, etc.
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
#include "stdafx.h"
|
||||
#include "Emu/System.h"
|
||||
#include "Emu/system_config.h"
|
||||
#include "Emu/Audio/audio_utils.h"
|
||||
#include "Emu/Cell/PPUModule.h"
|
||||
#include "Emu/Cell/lv2/sys_process.h"
|
||||
#include "Emu/Cell/lv2/sys_event.h"
|
||||
@@ -556,7 +557,7 @@ void cell_audio_thread::advance(u64 timestamp)
|
||||
m_dynamic_period = 0;
|
||||
|
||||
// send aftermix event (normal audio event)
|
||||
std::array<std::shared_ptr<lv2_event_queue>, MAX_AUDIO_EVENT_QUEUES> queues;
|
||||
std::array<shared_ptr<lv2_event_queue>, MAX_AUDIO_EVENT_QUEUES> queues;
|
||||
u32 queue_count = 0;
|
||||
|
||||
event_period++;
|
||||
@@ -1041,7 +1042,7 @@ void cell_audio_thread::mix(float* out_buffer, s32 offset)
|
||||
constexpr u32 out_channels = static_cast<u32>(channels);
|
||||
constexpr u32 out_buffer_sz = out_channels * AUDIO_BUFFER_SAMPLES;
|
||||
|
||||
const float master_volume = g_cfg.audio.volume / 100.0f;
|
||||
const float master_volume = audio::get_volume();
|
||||
|
||||
// Reset out_buffer
|
||||
std::memset(out_buffer, 0, out_buffer_sz * sizeof(float));
|
||||
|
||||
@@ -400,7 +400,7 @@ public:
|
||||
u32 flags = 0; // iFlags
|
||||
u64 source = 0; // Event source
|
||||
u64 ack_timestamp = 0; // timestamp of last call of cellAudioSendAck
|
||||
std::shared_ptr<lv2_event_queue> port{}; // Underlying event port
|
||||
shared_ptr<lv2_event_queue> port{}; // Underlying event port
|
||||
};
|
||||
|
||||
std::vector<key_info> keys{};
|
||||
|
||||
@@ -784,26 +784,26 @@ s32 cellCameraIsAttached(s32 dev_num)
|
||||
|
||||
if (g_cfg.io.camera == camera_handler::null)
|
||||
{
|
||||
return false;
|
||||
return 0;
|
||||
}
|
||||
|
||||
auto& g_camera = g_fxo->get<camera_thread>();
|
||||
|
||||
if (!g_camera.init)
|
||||
{
|
||||
return false;
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (!check_dev_num(dev_num))
|
||||
{
|
||||
return false;
|
||||
return 0;
|
||||
}
|
||||
|
||||
vm::var<s32> type;
|
||||
|
||||
if (cellCameraGetType(dev_num, type) != CELL_OK)
|
||||
{
|
||||
return false;
|
||||
return 0;
|
||||
}
|
||||
|
||||
std::lock_guard lock(g_camera.mutex);
|
||||
@@ -821,12 +821,12 @@ s32 cellCameraIsAttached(s32 dev_num)
|
||||
}
|
||||
}
|
||||
|
||||
return is_attached;
|
||||
return is_attached ? 1 : 0;
|
||||
}
|
||||
|
||||
s32 cellCameraIsOpen(s32 dev_num)
|
||||
{
|
||||
cellCamera.notice("cellCameraIsOpen(dev_num=%d)", dev_num);
|
||||
cellCamera.trace("cellCameraIsOpen(dev_num=%d)", dev_num);
|
||||
|
||||
if (g_cfg.io.camera == camera_handler::null)
|
||||
{
|
||||
@@ -852,7 +852,7 @@ s32 cellCameraIsOpen(s32 dev_num)
|
||||
|
||||
s32 cellCameraIsStarted(s32 dev_num)
|
||||
{
|
||||
cellCamera.notice("cellCameraIsStarted(dev_num=%d)", dev_num);
|
||||
cellCamera.trace("cellCameraIsStarted(dev_num=%d)", dev_num);
|
||||
|
||||
if (g_cfg.io.camera == camera_handler::null)
|
||||
{
|
||||
|
||||
@@ -1031,7 +1031,7 @@ error_code cellDmuxClose(u32 handle)
|
||||
{
|
||||
cellDmux.warning("cellDmuxClose(handle=0x%x)", handle);
|
||||
|
||||
const auto dmux = idm::get<Demuxer>(handle);
|
||||
const auto dmux = idm::get_unlocked<Demuxer>(handle);
|
||||
|
||||
if (!dmux)
|
||||
{
|
||||
@@ -1060,7 +1060,7 @@ error_code cellDmuxSetStream(u32 handle, u32 streamAddress, u32 streamSize, b8 d
|
||||
{
|
||||
cellDmux.trace("cellDmuxSetStream(handle=0x%x, streamAddress=0x%x, streamSize=%d, discontinuity=%d, userData=0x%llx)", handle, streamAddress, streamSize, discontinuity, userData);
|
||||
|
||||
const auto dmux = idm::get<Demuxer>(handle);
|
||||
const auto dmux = idm::get_unlocked<Demuxer>(handle);
|
||||
|
||||
if (!dmux)
|
||||
{
|
||||
@@ -1088,7 +1088,7 @@ error_code cellDmuxResetStream(u32 handle)
|
||||
{
|
||||
cellDmux.warning("cellDmuxResetStream(handle=0x%x)", handle);
|
||||
|
||||
const auto dmux = idm::get<Demuxer>(handle);
|
||||
const auto dmux = idm::get_unlocked<Demuxer>(handle);
|
||||
|
||||
if (!dmux)
|
||||
{
|
||||
@@ -1103,7 +1103,7 @@ error_code cellDmuxResetStreamAndWaitDone(u32 handle)
|
||||
{
|
||||
cellDmux.warning("cellDmuxResetStreamAndWaitDone(handle=0x%x)", handle);
|
||||
|
||||
const auto dmux = idm::get<Demuxer>(handle);
|
||||
const auto dmux = idm::get_unlocked<Demuxer>(handle);
|
||||
|
||||
if (!dmux)
|
||||
{
|
||||
@@ -1164,7 +1164,7 @@ error_code cellDmuxEnableEs(u32 handle, vm::cptr<CellCodecEsFilterId> esFilterId
|
||||
{
|
||||
cellDmux.warning("cellDmuxEnableEs(handle=0x%x, esFilterId=*0x%x, esResourceInfo=*0x%x, esCb=*0x%x, esSpecificInfo=*0x%x, esHandle=*0x%x)", handle, esFilterId, esResourceInfo, esCb, esSpecificInfo, esHandle);
|
||||
|
||||
const auto dmux = idm::get<Demuxer>(handle);
|
||||
const auto dmux = idm::get_unlocked<Demuxer>(handle);
|
||||
|
||||
if (!dmux)
|
||||
{
|
||||
@@ -1175,7 +1175,7 @@ error_code cellDmuxEnableEs(u32 handle, vm::cptr<CellCodecEsFilterId> esFilterId
|
||||
|
||||
const auto es = idm::make_ptr<ElementaryStream>(dmux.get(), esResourceInfo->memAddr, esResourceInfo->memSize,
|
||||
esFilterId->filterIdMajor, esFilterId->filterIdMinor, esFilterId->supplementalInfo1, esFilterId->supplementalInfo2,
|
||||
esCb->cbEsMsgFunc, esCb->cbArg, esSpecificInfo);
|
||||
esCb->cbFunc, esCb->cbArg, esSpecificInfo);
|
||||
|
||||
*esHandle = es->id;
|
||||
|
||||
@@ -1194,7 +1194,7 @@ error_code cellDmuxDisableEs(u32 esHandle)
|
||||
{
|
||||
cellDmux.warning("cellDmuxDisableEs(esHandle=0x%x)", esHandle);
|
||||
|
||||
const auto es = idm::get<ElementaryStream>(esHandle);
|
||||
const auto es = idm::get_unlocked<ElementaryStream>(esHandle);
|
||||
|
||||
if (!es)
|
||||
{
|
||||
@@ -1213,7 +1213,7 @@ error_code cellDmuxResetEs(u32 esHandle)
|
||||
{
|
||||
cellDmux.trace("cellDmuxResetEs(esHandle=0x%x)", esHandle);
|
||||
|
||||
const auto es = idm::get<ElementaryStream>(esHandle);
|
||||
const auto es = idm::get_unlocked<ElementaryStream>(esHandle);
|
||||
|
||||
if (!es)
|
||||
{
|
||||
@@ -1232,7 +1232,7 @@ error_code cellDmuxGetAu(u32 esHandle, vm::ptr<u32> auInfo, vm::ptr<u32> auSpeci
|
||||
{
|
||||
cellDmux.trace("cellDmuxGetAu(esHandle=0x%x, auInfo=**0x%x, auSpecificInfo=**0x%x)", esHandle, auInfo, auSpecificInfo);
|
||||
|
||||
const auto es = idm::get<ElementaryStream>(esHandle);
|
||||
const auto es = idm::get_unlocked<ElementaryStream>(esHandle);
|
||||
|
||||
if (!es)
|
||||
{
|
||||
@@ -1255,7 +1255,7 @@ error_code cellDmuxPeekAu(u32 esHandle, vm::ptr<u32> auInfo, vm::ptr<u32> auSpec
|
||||
{
|
||||
cellDmux.trace("cellDmuxPeekAu(esHandle=0x%x, auInfo=**0x%x, auSpecificInfo=**0x%x)", esHandle, auInfo, auSpecificInfo);
|
||||
|
||||
const auto es = idm::get<ElementaryStream>(esHandle);
|
||||
const auto es = idm::get_unlocked<ElementaryStream>(esHandle);
|
||||
|
||||
if (!es)
|
||||
{
|
||||
@@ -1278,7 +1278,7 @@ error_code cellDmuxGetAuEx(u32 esHandle, vm::ptr<u32> auInfoEx, vm::ptr<u32> auS
|
||||
{
|
||||
cellDmux.trace("cellDmuxGetAuEx(esHandle=0x%x, auInfoEx=**0x%x, auSpecificInfo=**0x%x)", esHandle, auInfoEx, auSpecificInfo);
|
||||
|
||||
const auto es = idm::get<ElementaryStream>(esHandle);
|
||||
const auto es = idm::get_unlocked<ElementaryStream>(esHandle);
|
||||
|
||||
if (!es)
|
||||
{
|
||||
@@ -1301,7 +1301,7 @@ error_code cellDmuxPeekAuEx(u32 esHandle, vm::ptr<u32> auInfoEx, vm::ptr<u32> au
|
||||
{
|
||||
cellDmux.trace("cellDmuxPeekAuEx(esHandle=0x%x, auInfoEx=**0x%x, auSpecificInfo=**0x%x)", esHandle, auInfoEx, auSpecificInfo);
|
||||
|
||||
const auto es = idm::get<ElementaryStream>(esHandle);
|
||||
const auto es = idm::get_unlocked<ElementaryStream>(esHandle);
|
||||
|
||||
if (!es)
|
||||
{
|
||||
@@ -1324,7 +1324,7 @@ error_code cellDmuxReleaseAu(u32 esHandle)
|
||||
{
|
||||
cellDmux.trace("cellDmuxReleaseAu(esHandle=0x%x)", esHandle);
|
||||
|
||||
const auto es = idm::get<ElementaryStream>(esHandle);
|
||||
const auto es = idm::get_unlocked<ElementaryStream>(esHandle);
|
||||
|
||||
if (!es)
|
||||
{
|
||||
@@ -1342,7 +1342,7 @@ error_code cellDmuxFlushEs(u32 esHandle)
|
||||
{
|
||||
cellDmux.warning("cellDmuxFlushEs(esHandle=0x%x)", esHandle);
|
||||
|
||||
const auto es = idm::get<ElementaryStream>(esHandle);
|
||||
const auto es = idm::get_unlocked<ElementaryStream>(esHandle);
|
||||
|
||||
if (!es)
|
||||
{
|
||||
@@ -1359,8 +1359,6 @@ error_code cellDmuxFlushEs(u32 esHandle)
|
||||
|
||||
DECLARE(ppu_module_manager::cellDmux)("cellDmux", []()
|
||||
{
|
||||
static ppu_static_module cellDmuxPamf("cellDmuxPamf");
|
||||
|
||||
REG_FUNC(cellDmux, cellDmuxQueryAttr);
|
||||
REG_FUNC(cellDmux, cellDmuxQueryAttr2);
|
||||
REG_FUNC(cellDmux, cellDmuxOpen);
|
||||
|
||||
@@ -195,6 +195,13 @@ struct CellDmuxResourceEx
|
||||
be_t<u32> maxContention;
|
||||
};
|
||||
|
||||
struct CellDmuxResourceSpurs
|
||||
{
|
||||
vm::bptr<void> spurs; // CellSpurs*
|
||||
be_t<u64, 1> priority;
|
||||
be_t<u32> maxContention;
|
||||
};
|
||||
|
||||
/*
|
||||
struct CellDmuxResource2Ex
|
||||
{
|
||||
@@ -221,20 +228,20 @@ struct CellDmuxResource2
|
||||
|
||||
using CellDmuxCbMsg = u32(u32 demuxerHandle, vm::ptr<CellDmuxMsg> demuxerMsg, u32 cbArg);
|
||||
|
||||
struct CellDmuxCb
|
||||
{
|
||||
vm::bptr<CellDmuxCbMsg> cbMsgFunc;
|
||||
be_t<u32> cbArg;
|
||||
};
|
||||
|
||||
using CellDmuxCbEsMsg = u32(u32 demuxerHandle, u32 esHandle, vm::ptr<CellDmuxEsMsg> esMsg, u32 cbArg);
|
||||
|
||||
struct CellDmuxEsCb
|
||||
// Used for internal callbacks as well
|
||||
template <typename F>
|
||||
struct DmuxCb
|
||||
{
|
||||
vm::bptr<CellDmuxCbEsMsg> cbEsMsgFunc;
|
||||
vm::bptr<F> cbFunc;
|
||||
be_t<u32> cbArg;
|
||||
};
|
||||
|
||||
using CellDmuxCb = DmuxCb<CellDmuxCbMsg>;
|
||||
|
||||
using CellDmuxEsCb = DmuxCb<CellDmuxCbEsMsg>;
|
||||
|
||||
struct CellDmuxAttr
|
||||
{
|
||||
be_t<u32> memSize;
|
||||
@@ -275,3 +282,46 @@ struct CellDmuxAuInfoEx
|
||||
CellCodecTimeStamp pts;
|
||||
CellCodecTimeStamp dts;
|
||||
};
|
||||
|
||||
struct CellDmuxPamfAttr;
|
||||
struct CellDmuxPamfEsAttr;
|
||||
|
||||
using DmuxNotifyDemuxDone = error_code(vm::ptr<void>, u32, vm::ptr<void>);
|
||||
using DmuxNotifyFatalErr = error_code(vm::ptr<void>, u32, vm::ptr<void>);
|
||||
using DmuxNotifyProgEndCode = error_code(vm::ptr<void>, vm::ptr<void>);
|
||||
|
||||
using DmuxEsNotifyAuFound = error_code(vm::ptr<void>, vm::cptr<void>, vm::ptr<void>);
|
||||
using DmuxEsNotifyFlushDone = error_code(vm::ptr<void>, vm::ptr<void>);
|
||||
|
||||
using CellDmuxCoreOpQueryAttr = error_code(vm::cptr<void>, vm::ptr<CellDmuxPamfAttr>);
|
||||
using CellDmuxCoreOpOpen = error_code(vm::cptr<void>, vm::cptr<CellDmuxResource>, vm::cptr<CellDmuxResourceSpurs>, vm::cptr<DmuxCb<DmuxNotifyDemuxDone>>, vm::cptr<DmuxCb<DmuxNotifyProgEndCode>>, vm::cptr<DmuxCb<DmuxNotifyFatalErr>>, vm::pptr<void>);
|
||||
using CellDmuxCoreOpClose = error_code(vm::ptr<void>);
|
||||
using CellDmuxCoreOpResetStream = error_code(vm::ptr<void>);
|
||||
using CellDmuxCoreOpCreateThread = error_code(vm::ptr<void>);
|
||||
using CellDmuxCoreOpJoinThread = error_code(vm::ptr<void>);
|
||||
using CellDmuxCoreOpSetStream = error_code(vm::ptr<void>, vm::cptr<void>, u32, b8, u64);
|
||||
using CellDmuxCoreOpFreeMemory = error_code(vm::ptr<void>, vm::ptr<void>, u32);
|
||||
using CellDmuxCoreOpQueryEsAttr = error_code(vm::cptr<void>, vm::cptr<void>, vm::ptr<CellDmuxPamfEsAttr>);
|
||||
using CellDmuxCoreOpEnableEs = error_code(vm::ptr<void>, vm::cptr<void>, vm::cptr<CellDmuxEsResource>, vm::cptr<DmuxCb<DmuxEsNotifyAuFound>>, vm::cptr<DmuxCb<DmuxEsNotifyFlushDone>>, vm::cptr<void>, vm::pptr<void>);
|
||||
using CellDmuxCoreOpDisableEs = u32(vm::ptr<void>);
|
||||
using CellDmuxCoreOpFlushEs = u32(vm::ptr<void>);
|
||||
using CellDmuxCoreOpResetEs = u32(vm::ptr<void>);
|
||||
using CellDmuxCoreOpResetStreamAndWaitDone = u32(vm::ptr<void>);
|
||||
|
||||
struct CellDmuxCoreOps
|
||||
{
|
||||
vm::bptr<CellDmuxCoreOpQueryAttr> queryAttr;
|
||||
vm::bptr<CellDmuxCoreOpOpen> open;
|
||||
vm::bptr<CellDmuxCoreOpClose> close;
|
||||
vm::bptr<CellDmuxCoreOpResetStream> resetStream;
|
||||
vm::bptr<CellDmuxCoreOpCreateThread> createThread;
|
||||
vm::bptr<CellDmuxCoreOpJoinThread> joinThread;
|
||||
vm::bptr<CellDmuxCoreOpSetStream> setStream;
|
||||
vm::bptr<CellDmuxCoreOpFreeMemory> freeMemory;
|
||||
vm::bptr<CellDmuxCoreOpQueryEsAttr> queryEsAttr;
|
||||
vm::bptr<CellDmuxCoreOpEnableEs> enableEs;
|
||||
vm::bptr<CellDmuxCoreOpDisableEs> disableEs;
|
||||
vm::bptr<CellDmuxCoreOpFlushEs> flushEs;
|
||||
vm::bptr<CellDmuxCoreOpResetEs> resetEs;
|
||||
vm::bptr<CellDmuxCoreOpResetStreamAndWaitDone> resetStreamAndWaitDone;
|
||||
};
|
||||
|
||||
@@ -0,0 +1,170 @@
|
||||
#include "stdafx.h"
|
||||
#include "Emu/Cell/PPUModule.h"
|
||||
#include "Emu/IdManager.h"
|
||||
|
||||
#include "cellPamf.h"
|
||||
#include "cellDmux.h"
|
||||
#include "cellDmuxPamf.h"
|
||||
|
||||
|
||||
vm::gvar<CellDmuxCoreOps> g_cell_dmux_core_ops_pamf;
|
||||
vm::gvar<CellDmuxCoreOps> g_cell_dmux_core_ops_raw_es;
|
||||
|
||||
LOG_CHANNEL(cellDmuxPamf)
|
||||
|
||||
error_code _CellDmuxCoreOpQueryAttr(vm::cptr<CellDmuxPamfSpecificInfo> pamfSpecificInfo, vm::ptr<CellDmuxPamfAttr> pamfAttr)
|
||||
{
|
||||
cellDmuxPamf.todo("_CellDmuxCoreOpQueryAttr(pamfSpecificInfo=*0x%x, pamfAttr=*0x%x)", pamfSpecificInfo, pamfAttr);
|
||||
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
error_code _CellDmuxCoreOpOpen(vm::cptr<CellDmuxPamfSpecificInfo> pamfSpecificInfo, vm::cptr<CellDmuxResource> demuxerResource, vm::cptr<CellDmuxResourceSpurs> demuxerResourceSpurs, vm::cptr<DmuxCb<DmuxNotifyDemuxDone>> notifyDemuxDone,
|
||||
vm::cptr<DmuxCb<DmuxNotifyProgEndCode>> notifyProgEndCode, vm::cptr<DmuxCb<DmuxNotifyFatalErr>> notifyFatalErr, vm::pptr<void> handle)
|
||||
{
|
||||
cellDmuxPamf.todo("_CellDmuxCoreOpOpen(pamfSpecificInfo=*0x%x, demuxerResource=*0x%x, demuxerResourceSpurs=*0x%x, notifyDemuxDone=*0x%x, notifyProgEndCode=*0x%x, notifyFatalErr=*0x%x, handle=**0x%x)",
|
||||
pamfSpecificInfo, demuxerResource, demuxerResourceSpurs, notifyDemuxDone, notifyProgEndCode, notifyFatalErr, handle);
|
||||
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
error_code _CellDmuxCoreOpClose(vm::ptr<void> handle)
|
||||
{
|
||||
cellDmuxPamf.todo("_CellDmuxCoreOpClose(handle=*0x%x)", handle);
|
||||
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
error_code _CellDmuxCoreOpResetStream(vm::ptr<void> handle)
|
||||
{
|
||||
cellDmuxPamf.todo("_CellDmuxCoreOpResetStream(handle=*0x%x)", handle);
|
||||
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
error_code _CellDmuxCoreOpCreateThread(vm::ptr<void> handle)
|
||||
{
|
||||
cellDmuxPamf.todo("_CellDmuxCoreOpCreateThread(handle=*0x%x)", handle);
|
||||
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
error_code _CellDmuxCoreOpJoinThread(vm::ptr<void> handle)
|
||||
{
|
||||
cellDmuxPamf.todo("_CellDmuxCoreOpJoinThread(handle=*0x%x)", handle);
|
||||
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
template <bool raw_es>
|
||||
error_code _CellDmuxCoreOpSetStream(vm::ptr<void> handle, vm::cptr<void> streamAddress, u32 streamSize, b8 discontinuity, u64 userData)
|
||||
{
|
||||
cellDmuxPamf.todo("_CellDmuxCoreOpSetStream<raw_es=%d>(handle=*0x%x, streamAddress=*0x%x, streamSize=0x%x, discontinuity=%d, userData=0x%llx)", raw_es, handle, streamAddress, streamSize, +discontinuity, userData);
|
||||
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
error_code _CellDmuxCoreOpFreeMemory(vm::ptr<void> esHandle, vm::ptr<void> memAddr, u32 memSize)
|
||||
{
|
||||
cellDmuxPamf.todo("_CellDmuxCoreOpFreeMemory(esHandle=*0x%x, memAddr=*0x%x, memSize=0x%x)", esHandle, memAddr, memSize);
|
||||
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
template <bool raw_es>
|
||||
error_code _CellDmuxCoreOpQueryEsAttr(vm::cptr<void> esFilterId, vm::cptr<void> esSpecificInfo, vm::ptr<CellDmuxPamfEsAttr> attr)
|
||||
{
|
||||
cellDmuxPamf.todo("_CellDmuxCoreOpQueryEsAttr<raw_es=%d>(esFilterId=*0x%x, esSpecificInfo=*0x%x, attr=*0x%x)", raw_es, esFilterId, esSpecificInfo, attr);
|
||||
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
template <bool raw_es>
|
||||
error_code _CellDmuxCoreOpEnableEs(vm::ptr<void> handle, vm::cptr<void> esFilterId, vm::cptr<CellDmuxEsResource> esResource, vm::cptr<DmuxCb<DmuxEsNotifyAuFound>> notifyAuFound,
|
||||
vm::cptr<DmuxCb<DmuxEsNotifyFlushDone>> notifyFlushDone, vm::cptr<void> esSpecificInfo, vm::pptr<void> esHandle)
|
||||
{
|
||||
cellDmuxPamf.todo("_CellDmuxCoreOpEnableEs<raw_es=%d>(handle=*0x%x, esFilterId=*0x%x, esResource=*0x%x, notifyAuFound=*0x%x, notifyFlushDone=*0x%x, esSpecificInfo=*0x%x, esHandle)",
|
||||
raw_es, handle, esFilterId, esResource, notifyAuFound, notifyFlushDone, esSpecificInfo, esHandle);
|
||||
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
error_code _CellDmuxCoreOpDisableEs(vm::ptr<void> esHandle)
|
||||
{
|
||||
cellDmuxPamf.todo("_CellDmuxCoreOpDisableEs(esHandle=*0x%x)", esHandle);
|
||||
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
error_code _CellDmuxCoreOpFlushEs(vm::ptr<void> esHandle)
|
||||
{
|
||||
cellDmuxPamf.todo("_CellDmuxCoreOpFlushEs(esHandle=*0x%x)", esHandle);
|
||||
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
error_code _CellDmuxCoreOpResetEs(vm::ptr<void> esHandle)
|
||||
{
|
||||
cellDmuxPamf.todo("_CellDmuxCoreOpResetEs(esHandle=*0x%x)", esHandle);
|
||||
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
error_code _CellDmuxCoreOpResetStreamAndWaitDone(vm::ptr<void> handle)
|
||||
{
|
||||
cellDmuxPamf.todo("_CellDmuxCoreOpResetStreamAndWaitDone(handle=*0x%x)", handle);
|
||||
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
static void init_gvar(const vm::gvar<CellDmuxCoreOps>& var)
|
||||
{
|
||||
var->queryAttr.set(g_fxo->get<ppu_function_manager>().func_addr(FIND_FUNC(_CellDmuxCoreOpQueryAttr)));
|
||||
var->open.set(g_fxo->get<ppu_function_manager>().func_addr(FIND_FUNC(_CellDmuxCoreOpOpen)));
|
||||
var->close.set(g_fxo->get<ppu_function_manager>().func_addr(FIND_FUNC(_CellDmuxCoreOpClose)));
|
||||
var->resetStream.set(g_fxo->get<ppu_function_manager>().func_addr(FIND_FUNC(_CellDmuxCoreOpResetStream)));
|
||||
var->createThread.set(g_fxo->get<ppu_function_manager>().func_addr(FIND_FUNC(_CellDmuxCoreOpCreateThread)));
|
||||
var->joinThread.set(g_fxo->get<ppu_function_manager>().func_addr(FIND_FUNC(_CellDmuxCoreOpJoinThread)));
|
||||
var->freeMemory.set(g_fxo->get<ppu_function_manager>().func_addr(FIND_FUNC(_CellDmuxCoreOpFreeMemory)));
|
||||
var->disableEs.set(g_fxo->get<ppu_function_manager>().func_addr(FIND_FUNC(_CellDmuxCoreOpDisableEs)));
|
||||
var->flushEs.set(g_fxo->get<ppu_function_manager>().func_addr(FIND_FUNC(_CellDmuxCoreOpFlushEs)));
|
||||
var->resetEs.set(g_fxo->get<ppu_function_manager>().func_addr(FIND_FUNC(_CellDmuxCoreOpResetEs)));
|
||||
var->resetStreamAndWaitDone.set(g_fxo->get<ppu_function_manager>().func_addr(FIND_FUNC(_CellDmuxCoreOpResetStreamAndWaitDone)));
|
||||
}
|
||||
|
||||
DECLARE(ppu_module_manager::cellDmuxPamf)("cellDmuxPamf", []
|
||||
{
|
||||
REG_VNID(cellDmuxPamf, 0x28b2b7b2, g_cell_dmux_core_ops_pamf).init = []
|
||||
{
|
||||
g_cell_dmux_core_ops_pamf->setStream.set(g_fxo->get<ppu_function_manager>().func_addr(FIND_FUNC(_CellDmuxCoreOpSetStream<false>)));
|
||||
g_cell_dmux_core_ops_pamf->queryEsAttr.set(g_fxo->get<ppu_function_manager>().func_addr(FIND_FUNC(_CellDmuxCoreOpQueryEsAttr<false>)));
|
||||
g_cell_dmux_core_ops_pamf->enableEs.set(g_fxo->get<ppu_function_manager>().func_addr(FIND_FUNC(_CellDmuxCoreOpEnableEs<false>)));
|
||||
init_gvar(g_cell_dmux_core_ops_pamf);
|
||||
};
|
||||
|
||||
REG_VNID(cellDmuxPamf, 0x9728a0e9, g_cell_dmux_core_ops_raw_es).init = []
|
||||
{
|
||||
g_cell_dmux_core_ops_raw_es->setStream.set(g_fxo->get<ppu_function_manager>().func_addr(FIND_FUNC(_CellDmuxCoreOpSetStream<true>)));
|
||||
g_cell_dmux_core_ops_raw_es->queryEsAttr.set(g_fxo->get<ppu_function_manager>().func_addr(FIND_FUNC(_CellDmuxCoreOpQueryEsAttr<true>)));
|
||||
g_cell_dmux_core_ops_raw_es->enableEs.set(g_fxo->get<ppu_function_manager>().func_addr(FIND_FUNC(_CellDmuxCoreOpEnableEs<true>)));
|
||||
init_gvar(g_cell_dmux_core_ops_raw_es);
|
||||
};
|
||||
|
||||
REG_HIDDEN_FUNC(_CellDmuxCoreOpQueryAttr);
|
||||
REG_HIDDEN_FUNC(_CellDmuxCoreOpOpen);
|
||||
REG_HIDDEN_FUNC(_CellDmuxCoreOpClose);
|
||||
REG_HIDDEN_FUNC(_CellDmuxCoreOpResetStream);
|
||||
REG_HIDDEN_FUNC(_CellDmuxCoreOpCreateThread);
|
||||
REG_HIDDEN_FUNC(_CellDmuxCoreOpJoinThread);
|
||||
REG_HIDDEN_FUNC(_CellDmuxCoreOpSetStream<false>);
|
||||
REG_HIDDEN_FUNC(_CellDmuxCoreOpSetStream<true>);
|
||||
REG_HIDDEN_FUNC(_CellDmuxCoreOpFreeMemory);
|
||||
REG_HIDDEN_FUNC(_CellDmuxCoreOpQueryEsAttr<false>);
|
||||
REG_HIDDEN_FUNC(_CellDmuxCoreOpQueryEsAttr<true>);
|
||||
REG_HIDDEN_FUNC(_CellDmuxCoreOpEnableEs<false>);
|
||||
REG_HIDDEN_FUNC(_CellDmuxCoreOpEnableEs<true>);
|
||||
REG_HIDDEN_FUNC(_CellDmuxCoreOpDisableEs);
|
||||
REG_HIDDEN_FUNC(_CellDmuxCoreOpFlushEs);
|
||||
REG_HIDDEN_FUNC(_CellDmuxCoreOpResetEs);
|
||||
REG_HIDDEN_FUNC(_CellDmuxCoreOpResetStreamAndWaitDone);
|
||||
});
|
||||
@@ -0,0 +1,15 @@
|
||||
#pragma once
|
||||
|
||||
struct CellDmuxPamfAttr
|
||||
{
|
||||
be_t<u32> maxEnabledEsNum;
|
||||
be_t<u32> version;
|
||||
be_t<u32> memSize;
|
||||
};
|
||||
|
||||
struct CellDmuxPamfEsAttr
|
||||
{
|
||||
be_t<u32> auQueueMaxSize;
|
||||
be_t<u32> memSize;
|
||||
be_t<u32> specificInfoSize;
|
||||
};
|
||||
@@ -598,7 +598,7 @@ error_code cellFsSetIoBufferFromDefaultContainer(u32 fd, u32 buffer_size, u32 pa
|
||||
{
|
||||
cellFs.todo("cellFsSetIoBufferFromDefaultContainer(fd=%d, buffer_size=%d, page_type=%d)", fd, buffer_size, page_type);
|
||||
|
||||
const auto file = idm::get<lv2_fs_object, lv2_file>(fd);
|
||||
const auto file = idm::get_unlocked<lv2_fs_object, lv2_file>(fd);
|
||||
|
||||
if (!file)
|
||||
{
|
||||
@@ -695,7 +695,7 @@ s32 cellFsStReadInit(u32 fd, vm::cptr<CellFsRingBuffer> ringbuf)
|
||||
return CELL_EINVAL;
|
||||
}
|
||||
|
||||
const auto file = idm::get<lv2_fs_object, lv2_file>(fd);
|
||||
const auto file = idm::get_unlocked<lv2_fs_object, lv2_file>(fd);
|
||||
|
||||
if (!file)
|
||||
{
|
||||
@@ -716,7 +716,7 @@ s32 cellFsStReadFinish(u32 fd)
|
||||
{
|
||||
cellFs.todo("cellFsStReadFinish(fd=%d)", fd);
|
||||
|
||||
const auto file = idm::get<lv2_fs_object, lv2_file>(fd);
|
||||
const auto file = idm::get_unlocked<lv2_fs_object, lv2_file>(fd);
|
||||
|
||||
if (!file)
|
||||
{
|
||||
@@ -732,7 +732,7 @@ s32 cellFsStReadGetRingBuf(u32 fd, vm::ptr<CellFsRingBuffer> ringbuf)
|
||||
{
|
||||
cellFs.todo("cellFsStReadGetRingBuf(fd=%d, ringbuf=*0x%x)", fd, ringbuf);
|
||||
|
||||
const auto file = idm::get<lv2_fs_object, lv2_file>(fd);
|
||||
const auto file = idm::get_unlocked<lv2_fs_object, lv2_file>(fd);
|
||||
|
||||
if (!file)
|
||||
{
|
||||
@@ -748,7 +748,7 @@ s32 cellFsStReadGetStatus(u32 fd, vm::ptr<u64> status)
|
||||
{
|
||||
cellFs.todo("cellFsStReadGetRingBuf(fd=%d, status=*0x%x)", fd, status);
|
||||
|
||||
const auto file = idm::get<lv2_fs_object, lv2_file>(fd);
|
||||
const auto file = idm::get_unlocked<lv2_fs_object, lv2_file>(fd);
|
||||
|
||||
if (!file)
|
||||
{
|
||||
@@ -764,7 +764,7 @@ s32 cellFsStReadGetRegid(u32 fd, vm::ptr<u64> regid)
|
||||
{
|
||||
cellFs.todo("cellFsStReadGetRingBuf(fd=%d, regid=*0x%x)", fd, regid);
|
||||
|
||||
const auto file = idm::get<lv2_fs_object, lv2_file>(fd);
|
||||
const auto file = idm::get_unlocked<lv2_fs_object, lv2_file>(fd);
|
||||
|
||||
if (!file)
|
||||
{
|
||||
@@ -780,7 +780,7 @@ s32 cellFsStReadStart(u32 fd, u64 offset, u64 size)
|
||||
{
|
||||
cellFs.todo("cellFsStReadStart(fd=%d, offset=0x%llx, size=0x%llx)", fd, offset, size);
|
||||
|
||||
const auto file = idm::get<lv2_fs_object, lv2_file>(fd);
|
||||
const auto file = idm::get_unlocked<lv2_fs_object, lv2_file>(fd);
|
||||
|
||||
if (!file)
|
||||
{
|
||||
@@ -796,7 +796,7 @@ s32 cellFsStReadStop(u32 fd)
|
||||
{
|
||||
cellFs.todo("cellFsStReadStop(fd=%d)", fd);
|
||||
|
||||
const auto file = idm::get<lv2_fs_object, lv2_file>(fd);
|
||||
const auto file = idm::get_unlocked<lv2_fs_object, lv2_file>(fd);
|
||||
|
||||
if (!file)
|
||||
{
|
||||
@@ -812,7 +812,7 @@ s32 cellFsStRead(u32 fd, vm::ptr<u8> buf, u64 size, vm::ptr<u64> rsize)
|
||||
{
|
||||
cellFs.todo("cellFsStRead(fd=%d, buf=*0x%x, size=0x%llx, rsize=*0x%x)", fd, buf, size, rsize);
|
||||
|
||||
const auto file = idm::get<lv2_fs_object, lv2_file>(fd);
|
||||
const auto file = idm::get_unlocked<lv2_fs_object, lv2_file>(fd);
|
||||
|
||||
if (!file)
|
||||
{
|
||||
@@ -828,7 +828,7 @@ s32 cellFsStReadGetCurrentAddr(u32 fd, vm::ptr<u32> addr, vm::ptr<u64> size)
|
||||
{
|
||||
cellFs.todo("cellFsStReadGetCurrentAddr(fd=%d, addr=*0x%x, size=*0x%x)", fd, addr, size);
|
||||
|
||||
const auto file = idm::get<lv2_fs_object, lv2_file>(fd);
|
||||
const auto file = idm::get_unlocked<lv2_fs_object, lv2_file>(fd);
|
||||
|
||||
if (!file)
|
||||
{
|
||||
@@ -844,7 +844,7 @@ s32 cellFsStReadPutCurrentAddr(u32 fd, vm::ptr<u8> addr, u64 size)
|
||||
{
|
||||
cellFs.todo("cellFsStReadPutCurrentAddr(fd=%d, addr=*0x%x, size=0x%llx)", fd, addr, size);
|
||||
|
||||
const auto file = idm::get<lv2_fs_object, lv2_file>(fd);
|
||||
const auto file = idm::get_unlocked<lv2_fs_object, lv2_file>(fd);
|
||||
|
||||
if (!file)
|
||||
{
|
||||
@@ -860,7 +860,7 @@ s32 cellFsStReadWait(u32 fd, u64 size)
|
||||
{
|
||||
cellFs.todo("cellFsStReadWait(fd=%d, size=0x%llx)", fd, size);
|
||||
|
||||
const auto file = idm::get<lv2_fs_object, lv2_file>(fd);
|
||||
const auto file = idm::get_unlocked<lv2_fs_object, lv2_file>(fd);
|
||||
|
||||
if (!file)
|
||||
{
|
||||
@@ -876,7 +876,7 @@ s32 cellFsStReadWaitCallback(u32 fd, u64 size, vm::ptr<void(s32 xfd, u64 xsize)>
|
||||
{
|
||||
cellFs.todo("cellFsStReadWaitCallback(fd=%d, size=0x%llx, func=*0x%x)", fd, size, func);
|
||||
|
||||
const auto file = idm::get<lv2_fs_object, lv2_file>(fd);
|
||||
const auto file = idm::get_unlocked<lv2_fs_object, lv2_file>(fd);
|
||||
|
||||
if (!file)
|
||||
{
|
||||
@@ -908,7 +908,7 @@ struct fs_aio_thread : ppu_thread
|
||||
s32 error = CELL_EBADF;
|
||||
u64 result = 0;
|
||||
|
||||
const auto file = idm::get<lv2_fs_object, lv2_file>(aio->fd);
|
||||
const auto file = idm::get_unlocked<lv2_fs_object, lv2_file>(aio->fd);
|
||||
|
||||
if (!file || (type == 1 && file->flags & CELL_FS_O_WRONLY) || (type == 2 && !(file->flags & CELL_FS_O_ACCMODE)))
|
||||
{
|
||||
|
||||
@@ -961,7 +961,7 @@ error_code cellGameContentPermit(ppu_thread& ppu, vm::ptr<char[CELL_GAME_PATH_MA
|
||||
|
||||
if (!perm.temp.empty())
|
||||
{
|
||||
std::vector<std::shared_ptr<lv2_file>> lv2_files;
|
||||
std::vector<shared_ptr<lv2_file>> lv2_files;
|
||||
|
||||
const std::string real_dir = vfs::get(dir) + "/";
|
||||
|
||||
|
||||
@@ -455,7 +455,7 @@ error_code _cellGcmInitBody(ppu_thread& ppu, vm::pptr<CellGcmContextData> contex
|
||||
vm::var<u64> _tid;
|
||||
vm::var<char[]> _name = vm::make_str("_gcm_intr_thread");
|
||||
ppu_execute<&sys_ppu_thread_create>(ppu, +_tid, 0x10000, 0, 1, 0x4000, SYS_PPU_THREAD_CREATE_INTERRUPT, +_name);
|
||||
render->intr_thread = idm::get<named_thread<ppu_thread>>(static_cast<u32>(*_tid));
|
||||
render->intr_thread = idm::get_unlocked<named_thread<ppu_thread>>(static_cast<u32>(*_tid));
|
||||
render->intr_thread->state -= cpu_flag::stop;
|
||||
thread_ctrl::notify(*render->intr_thread);
|
||||
|
||||
|
||||
+1556
-284
File diff suppressed because it is too large
Load Diff
@@ -161,7 +161,8 @@ enum CellGemVideoConvertFormatEnum : s32
|
||||
// External device IDs (types)
|
||||
enum
|
||||
{
|
||||
SHARP_SHOOTER_DEVICE_ID = 0x8081
|
||||
SHARP_SHOOTER_DEVICE_ID = 0x8081,
|
||||
RACING_WHEEL_DEVICE_ID = 0x8101
|
||||
};
|
||||
|
||||
struct CellGemAttribute
|
||||
|
||||
@@ -273,7 +273,7 @@ error_code cellGifDecReadHeader(vm::ptr<GifDecoder> mainHandle, vm::ptr<GifStrea
|
||||
return CELL_GIFDEC_ERROR_ARG;
|
||||
}
|
||||
|
||||
const u32& fd = subHandle->fd;
|
||||
const u32 fd = subHandle->fd;
|
||||
CellGifDecInfo& current_info = subHandle->info;
|
||||
|
||||
// Write the header to buffer
|
||||
@@ -288,7 +288,7 @@ error_code cellGifDecReadHeader(vm::ptr<GifDecoder> mainHandle, vm::ptr<GifStrea
|
||||
}
|
||||
case CELL_GIFDEC_FILE:
|
||||
{
|
||||
auto file = idm::get<lv2_fs_object, lv2_file>(fd);
|
||||
auto file = idm::get_unlocked<lv2_fs_object, lv2_file>(fd);
|
||||
file->file.seek(0);
|
||||
file->file.read(buffer, sizeof(buffer));
|
||||
break;
|
||||
@@ -302,7 +302,7 @@ error_code cellGifDecReadHeader(vm::ptr<GifDecoder> mainHandle, vm::ptr<GifStrea
|
||||
return CELL_GIFDEC_ERROR_STREAM_FORMAT; // Surprisingly there is no error code related with headerss
|
||||
}
|
||||
|
||||
u8 packedField = buffer[10];
|
||||
const u8 packedField = buffer[10];
|
||||
current_info.SWidth = buffer[6] + buffer[7] * 0x100;
|
||||
current_info.SHeight = buffer[8] + buffer[9] * 0x100;
|
||||
current_info.SGlobalColorTableFlag = packedField >> 7;
|
||||
@@ -500,7 +500,7 @@ error_code cellGifDecDecodeData(vm::ptr<GifDecoder> mainHandle, vm::cptr<GifStre
|
||||
|
||||
case CELL_GIFDEC_FILE:
|
||||
{
|
||||
auto file = idm::get<lv2_fs_object, lv2_file>(fd);
|
||||
auto file = idm::get_unlocked<lv2_fs_object, lv2_file>(fd);
|
||||
file->file.seek(0);
|
||||
file->file.read(gif.get(), fileSize);
|
||||
break;
|
||||
@@ -520,8 +520,8 @@ error_code cellGifDecDecodeData(vm::ptr<GifDecoder> mainHandle, vm::cptr<GifStre
|
||||
return CELL_GIFDEC_ERROR_STREAM_FORMAT;
|
||||
|
||||
const int bytesPerLine = static_cast<int>(dataCtrlParam->outputBytesPerLine);
|
||||
const char nComponents = 4;
|
||||
uint image_size = width * height * nComponents;
|
||||
constexpr char nComponents = 4;
|
||||
const u32 image_size = width * height * nComponents;
|
||||
|
||||
switch(current_outParam.outputColorSpace)
|
||||
{
|
||||
@@ -541,9 +541,8 @@ error_code cellGifDecDecodeData(vm::ptr<GifDecoder> mainHandle, vm::cptr<GifStre
|
||||
{
|
||||
memcpy(data.get_ptr(), image.get(), image_size);
|
||||
}
|
||||
break;
|
||||
}
|
||||
break;
|
||||
|
||||
case CELL_GIFDEC_ARGB:
|
||||
{
|
||||
if (bytesPerLine > width * nComponents) // Check if we need padding
|
||||
@@ -579,9 +578,8 @@ error_code cellGifDecDecodeData(vm::ptr<GifDecoder> mainHandle, vm::cptr<GifStre
|
||||
}
|
||||
std::memcpy(data.get_ptr(), img.get(), image_size);
|
||||
}
|
||||
break;
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
return CELL_GIFDEC_ERROR_ARG;
|
||||
}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user