Compare commits
435 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| ef46739f42 | |||
| 2f72fcdb45 | |||
| 9565d64c7d | |||
| fd061d9c55 | |||
| 648ecc833c | |||
| 6a2628f139 | |||
| 93c6826d35 | |||
| 9d259368fa | |||
| 6c09198799 | |||
| 96c6a67607 | |||
| cec9a66393 | |||
| e1f80819ca | |||
| 8c64bd5754 | |||
| 18964fbab3 | |||
| 2f0052f10b | |||
| daed44574b | |||
| afd10c5668 | |||
| 7f37cff370 | |||
| 5966c1a85b | |||
| 036aadc66b | |||
| 2e47c42367 | |||
| 41d921808b | |||
| 9e7a42d057 | |||
| d43e06c0ea | |||
| c788331e45 | |||
| 3d935b64f2 | |||
| e9b8f94fb1 | |||
| b95ffaf4dd | |||
| ab97a0a5a3 | |||
| e74d6446c8 | |||
| cbb7753227 | |||
| 78fad1a372 | |||
| d793f8ad78 | |||
| dda274afb0 | |||
| f0d184f38b | |||
| 9fccb47e7c | |||
| fd1ca2f102 | |||
| 458968658f | |||
| 051dd388d7 | |||
| 233506480b | |||
| 37898d38e5 | |||
| be441bd3a7 | |||
| 2e9a543598 | |||
| 190a59ce03 | |||
| 253e7a90b8 | |||
| fd4a153eef | |||
| 645f0e63ab | |||
| c087a9534a | |||
| da87bb6710 | |||
| 3c064439b3 | |||
| 85f8a42bd2 | |||
| ef55d6fa0c | |||
| aa34fa8baa | |||
| 2629f9be44 | |||
| fc2a45d6d6 | |||
| 22af341ad3 | |||
| a69f19a9ab | |||
| d7662e54cc | |||
| 459a7ba5a2 | |||
| 9cb58a47cd | |||
| 3651e67a25 | |||
| 8a0f6f1cbc | |||
| 9cbaacb13f | |||
| 1887e2460f | |||
| 6e578c4fde | |||
| 47e5074dc5 | |||
| 74d8619240 | |||
| 89f676de75 | |||
| 061c92ba1f | |||
| 8034196c25 | |||
| f49a30bc1a | |||
| 1196e9decc | |||
| cd4f290d3d | |||
| 45fae363c6 | |||
| 9738ce0cf6 | |||
| e5ae32e5f3 | |||
| 81ab6ab8b4 | |||
| cfbfdd7b8a | |||
| 8d0e7adb62 | |||
| 96a893120d | |||
| a1c72de1eb | |||
| d11bb71a17 | |||
| 6561ddae41 | |||
| ef21e2253f | |||
| dd553331df | |||
| d86858da64 | |||
| fcefbf26c6 | |||
| 79a3b308d1 | |||
| 5ecc7d5360 | |||
| 321f50bf7b | |||
| d0b37777c3 | |||
| aea094730b | |||
| a29d7d3962 | |||
| 155f13ed54 | |||
| 82a296f900 | |||
| 0df861d7b5 | |||
| 0890cc3e49 | |||
| 0da9c8d20c | |||
| b3c4ec4b55 | |||
| 4ce8e9ba16 | |||
| 51ce8f6c20 | |||
| 72edf26fb8 | |||
| d2b3cf22e3 | |||
| 28f3e9a65b | |||
| 17318112eb | |||
| 590bb7cbe4 | |||
| 798f90dac2 | |||
| b2e906f4cc | |||
| 11317acdbe | |||
| 5c6cf77c57 | |||
| 13825c9ef7 | |||
| 6013b0782e | |||
| 5f180e0b30 | |||
| 84ae1c5214 | |||
| 86adc42739 | |||
| 30f276a49b | |||
| 98cf72e0fb | |||
| 75964c686f | |||
| 0cb6dee474 | |||
| db1a90d828 | |||
| 110974af0b | |||
| 69d3d47901 | |||
| b50d5107b3 | |||
| 6a9eef0382 | |||
| 5f66d0b996 | |||
| 701728ecd7 | |||
| 423fd4a388 | |||
| ea2970d6e5 | |||
| 392d91b604 | |||
| ac12fc8b44 | |||
| fe67d51e5e | |||
| 4d294e7a69 | |||
| 45dc7fbac8 | |||
| 72590e2c93 | |||
| d3df83a3ea | |||
| 03268b0838 | |||
| f77e9f8bc1 | |||
| 9cc52c75e3 | |||
| 907c800e87 | |||
| 8c9b816c3d | |||
| 40d1882db9 | |||
| 152ab8c13d | |||
| 4c8cc7d5c2 | |||
| fe8f6fb48a | |||
| 31cedb6192 | |||
| aca5c73fb3 | |||
| f84f4ccd38 | |||
| d6e4566418 | |||
| 8872421785 | |||
| 3f74bafa70 | |||
| e1a78abfc9 | |||
| 23d1ddbb8e | |||
| 25823a1f66 | |||
| 0c4cc34488 | |||
| 5c7a4b1405 | |||
| a3d1f7b7b0 | |||
| 9aa632bcc1 | |||
| 0dd10d1457 | |||
| 5dd5323ad0 | |||
| 3537671cb7 | |||
| 511ff9d12c | |||
| d2518caf2e | |||
| e5e95a31f1 | |||
| fab6951789 | |||
| 12da498001 | |||
| 444c64ae75 | |||
| 2556484c67 | |||
| 860b76452f | |||
| 6cb7a17814 | |||
| 0f433ea882 | |||
| affda37d04 | |||
| bda945218d | |||
| 01ea3def54 | |||
| 6ab69012e3 | |||
| 35c80ab9fc | |||
| 8183449fb1 | |||
| 761b74ec59 | |||
| 1c91dac211 | |||
| 3d284d3c8b | |||
| 11f5f29c87 | |||
| 6cfb184b1e | |||
| 195f24507b | |||
| 56b21fd411 | |||
| d5df4a4616 | |||
| e6d55a6692 | |||
| 63cadab042 | |||
| 05b9575981 | |||
| e82163bfb9 | |||
| a5874d76d1 | |||
| 83ffd7c9fb | |||
| 7f2e87580f | |||
| 18df292f90 | |||
| ccb23d70a5 | |||
| 786bcb0d1b | |||
| 0efc3c1c6c | |||
| d4ddc40988 | |||
| e8b4d332eb | |||
| 674acd8431 | |||
| 80fc471067 | |||
| 4bcafb3e75 | |||
| 7ccc5d3910 | |||
| 1c2a423b14 | |||
| f010b5b235 | |||
| d5107aab47 | |||
| bd8dfac713 | |||
| b613fb70f1 | |||
| 43b06c2a9c | |||
| c133db6721 | |||
| f54628fcfd | |||
| 7ac64a6725 | |||
| 45908b9dd8 | |||
| 81c8d3f27a | |||
| 3a1f1dbc1a | |||
| 88fef183a3 | |||
| 299f627321 | |||
| c26607de08 | |||
| e93c4c42b6 | |||
| d24ba0da90 | |||
| 7460bdfb1b | |||
| c5975d5f66 | |||
| 07f0c7b4a5 | |||
| 8df95dbe39 | |||
| 75017345be | |||
| 08c955d177 | |||
| 8209e6c1e3 | |||
| 3a5efe9809 | |||
| d4146e4e68 | |||
| 5ffb4766b0 | |||
| 450d45354c | |||
| df7b466656 | |||
| 4b5a30f53d | |||
| 0ec88bb65d | |||
| 3b27b3c182 | |||
| e1a75deb25 | |||
| c7db322873 | |||
| b78c6f7127 | |||
| 2b19031206 | |||
| fd754a4ddc | |||
| b1e8eefad0 | |||
| e8d76ede14 | |||
| e2478902c9 | |||
| b9ebf595e6 | |||
| 6bb32e4e80 | |||
| 6d7419be0e | |||
| bef67c8a2d | |||
| e33c01131e | |||
| 2845617053 | |||
| 95c6278863 | |||
| eba44261c7 | |||
| b349100d9d | |||
| 7ab210432e | |||
| f40dcbfa30 | |||
| 84ba7c3e73 | |||
| ff366f4e4e | |||
| 5f470b316a | |||
| c8252d2b28 | |||
| ac58953276 | |||
| f064a26382 | |||
| 16d7eb4f55 | |||
| 5f26c2fc8f | |||
| f6383f6e06 | |||
| 8055d83da2 | |||
| b0a83cdb56 | |||
| 3f5951c9f8 | |||
| c3c442ccb1 | |||
| a95a63a58a | |||
| 1bbb76fa20 | |||
| f42b830ce9 | |||
| 256dfc5729 | |||
| 19fd8c109e | |||
| 634f353ed4 | |||
| d7c3d1ce12 | |||
| a626bbf635 | |||
| 0f95736c36 | |||
| d05b6135c6 | |||
| 60ce85f840 | |||
| 8b2473251d | |||
| 24fc1027ea | |||
| 463e18f893 | |||
| f7cb1aea64 | |||
| 9b43203111 | |||
| ff5295de32 | |||
| 8060cf9b19 | |||
| ba9fdfa802 | |||
| df8a0517dc | |||
| d27c3eee24 | |||
| e447f071ce | |||
| cc12302dd4 | |||
| 30eb680c9d | |||
| fa782046f9 | |||
| f0f8f50e12 | |||
| 4ceaab10a5 | |||
| 402df68235 | |||
| db1b012a26 | |||
| b1f1a5885b | |||
| 2fd58dc7e8 | |||
| 7428bb3025 | |||
| 14f02b23c2 | |||
| 617746606d | |||
| 65bdcaed29 | |||
| a5fd7abcf7 | |||
| 94ab3ae7cf | |||
| 370c2ecac5 | |||
| af8d7b9e4e | |||
| 3ce7947dd3 | |||
| 3f20e0c5a8 | |||
| a01398eda0 | |||
| 78080fd782 | |||
| d3e3e10b7d | |||
| ac3b22902a | |||
| ea098a920e | |||
| e786192766 | |||
| 9b48074389 | |||
| 9ba0a9189b | |||
| 7cd15a6202 | |||
| 49ba4bbfb5 | |||
| 77aa3142a9 | |||
| 4c741e93c3 | |||
| dc3d38c255 | |||
| fb9b09d004 | |||
| d7c66fc949 | |||
| adefd1fd63 | |||
| 6d6d0e4e36 | |||
| d94986ff0d | |||
| b3cb827526 | |||
| ac79654d1b | |||
| 69d86e39b9 | |||
| 49daecc4ea | |||
| 8f0b55c2cb | |||
| ed7883ba07 | |||
| 7a1fd27ecc | |||
| d160c862c7 | |||
| 4c4b353766 | |||
| 22ec8c4dd2 | |||
| 219dba8aae | |||
| 7c2af5ceae | |||
| a1cc40e7b1 | |||
| 27ea4285ef | |||
| 74e806810d | |||
| d8dc4f4474 | |||
| ba8aa580a1 | |||
| c863da278f | |||
| 22e679e23e | |||
| 1ae334e500 | |||
| 65488078a4 | |||
| 2d99f3556e | |||
| d33bc540bc | |||
| ce7d62968e | |||
| 215a9f9e11 | |||
| b54ba47870 | |||
| 901f503a3a | |||
| 0fba38f691 | |||
| c4066b924b | |||
| 3ec156b2f2 | |||
| 78b9c64f67 | |||
| 77e88741bc | |||
| 4c789faea4 | |||
| 66835cf083 | |||
| ad12900397 | |||
| 909f3e9b3e | |||
| 632287afe7 | |||
| 08c9a7c184 | |||
| 149c08ba78 | |||
| cec75e8567 | |||
| c1a98f76cd | |||
| 6b471d50eb | |||
| e8984d976c | |||
| 8590b66b4b | |||
| 98d96fd649 | |||
| 37a97a71e3 | |||
| e4d1bdef07 | |||
| f1f53de24b | |||
| cd9bd79639 | |||
| 4bbe1b6bf3 | |||
| 0393c7f52c | |||
| e12a708036 | |||
| 51cd98c9f4 | |||
| 3ec1fe9ee7 | |||
| 70d3a6d840 | |||
| ba968048c9 | |||
| 79d114cc06 | |||
| 0f9f787a55 | |||
| 7ae2a8840b | |||
| 7d59f7e69c | |||
| 5b0fddd3e8 | |||
| f4a0ff19d5 | |||
| 65696bf6a3 | |||
| 44e62c5c92 | |||
| 620ec7ef25 | |||
| 34c2b8a55e | |||
| ef822d785e | |||
| f7d767d0e8 | |||
| 8fa3f0721e | |||
| 458e5fa4e1 | |||
| ee8fecea21 | |||
| 3bfe17a14f | |||
| ddd6ebc58d | |||
| 1b5c0c68dd | |||
| 3e6f9faf71 | |||
| ad72168143 | |||
| 4fc8276f0f | |||
| aad035c4b5 | |||
| 560d6776af | |||
| c7a9a8e8f1 | |||
| c2cd0c994f | |||
| c729d6d65a | |||
| 5785ebb384 | |||
| b32ad80c23 | |||
| 2b79a3691f | |||
| cff39ec3a9 | |||
| c4bdc930ca | |||
| 14b9b12211 | |||
| d45d8eb4bc | |||
| c5e6665010 | |||
| 1b5a479bbd | |||
| fc92040d7f | |||
| b3073bbf1e | |||
| 63a107acbc | |||
| 07646c2124 | |||
| b45cea1434 | |||
| 3648a058d1 | |||
| 90479eaad6 | |||
| 1de2ceca9b | |||
| 8fc281e034 | |||
| 2093134420 | |||
| 818dd88390 | |||
| be4bb48476 | |||
| 1c8cb3b7d3 | |||
| 1ede0f4706 | |||
| 78703cfe47 | |||
| c72a5a5775 | |||
| d09dd29054 | |||
| ed711c0e59 | |||
| fa6114719d | |||
| c8b9cc9fe5 |
@@ -55,9 +55,12 @@
|
||||
rpcs3/git-version.h
|
||||
|
||||
# Visual Studio Files
|
||||
.vs/*
|
||||
*.ipch
|
||||
*.vspx
|
||||
*.psess
|
||||
*.VC.*
|
||||
*.vcxproj.user
|
||||
|
||||
# Copyrighted files
|
||||
/bin/data/
|
||||
@@ -85,3 +88,8 @@ CMakeCache.txt
|
||||
# cotire
|
||||
rpcs3/cotire/*
|
||||
rpcs3/rpcs3_*_cotire.cmake
|
||||
|
||||
# Qt
|
||||
moc_*.cpp
|
||||
qrc_resources.cpp
|
||||
rpcs3_automoc.cpp
|
||||
|
||||
+8
-6
@@ -1,7 +1,3 @@
|
||||
[submodule "wxWidgets"]
|
||||
path = wxWidgets
|
||||
url = https://github.com/wxWidgets/wxWidgets
|
||||
ignore = dirty
|
||||
[submodule "rpcs3-ffmpeg"]
|
||||
path = 3rdparty/ffmpeg
|
||||
url = https://github.com/hrydgard/ppsspp-ffmpeg
|
||||
@@ -12,7 +8,6 @@
|
||||
[submodule "llvm"]
|
||||
path = llvm
|
||||
url = https://github.com/llvm-mirror/llvm
|
||||
branch = release_38
|
||||
[submodule "rsx_program_decompiler"]
|
||||
path = rsx_program_decompiler
|
||||
url = https://github.com/RPCS3/rsx_program_decompiler
|
||||
@@ -21,7 +16,7 @@
|
||||
url = https://github.com/Microsoft/GSL.git
|
||||
[submodule "libpng"]
|
||||
path = 3rdparty/libpng
|
||||
url = https://github.com/RPCS3/libpng
|
||||
url = https://github.com/Zangetsu38/libpng
|
||||
ignore = dirty
|
||||
[submodule "Vulkan/glslang"]
|
||||
path = Vulkan/glslang
|
||||
@@ -41,3 +36,10 @@
|
||||
[submodule "rsx-debugger"]
|
||||
path = rsx-debugger
|
||||
url = https://github.com/RPCS3/rsx-debugger.git
|
||||
[submodule "3rdparty/zlib"]
|
||||
path = 3rdparty/zlib
|
||||
url = https://github.com/madler/zlib
|
||||
[submodule "3rdparty/hidapi"]
|
||||
path = 3rdparty/hidapi
|
||||
url = https://github.com/Zangetsu38/hidapi
|
||||
branch = master
|
||||
+58
-15
@@ -1,12 +1,12 @@
|
||||
language: cpp
|
||||
sudo: false
|
||||
sudo: required
|
||||
dist: trusty
|
||||
|
||||
os:
|
||||
- linux
|
||||
#- osx
|
||||
|
||||
osx_image: xcode6.4
|
||||
# osx_image: xcode6.4
|
||||
|
||||
compiler:
|
||||
- clang
|
||||
@@ -19,7 +19,7 @@ cache:
|
||||
|
||||
env:
|
||||
global:
|
||||
- secure: "Vf+FY48nip9JppMnq11105NealdErSWsoUhHo63/V3V+LKfA9guenxCp93/qoSIdSGC/sJwb0yIIMGvkTT/rxDJNh6Z+BWUTb2E0WEIIQbvTJNOSUzoq7dfF1LT61XjVjByFzcbC2xjtaBowmcAYEs1jGUUuEjYVCMmD5lY8hUg="
|
||||
- secure: BXyNziNYFLqLtY6Q58BDEUpRJr81HUtHpxf2Sr646bDcbG0Rf2rb2utqHZJ1Om926WdH7RqHuoVti4dr2X1lh4nHMkLD7MrIrfIkNN5T9aZdk19uw9IyMtz/cXon7/wqVo24tVqtBI0UghFxKii/GTDJEvRKgfpPp1e1vKSNGa4=
|
||||
# Which Travis environment to run Coverity on
|
||||
- coverity_scan_run_condition='"$TRAVIS_OS_NAME" = linux -a "$CC" = gcc'
|
||||
# Test mode is for testing if it's working with Coverity. Change to true if testing, to avoid reaching the quota.
|
||||
@@ -29,61 +29,104 @@ matrix:
|
||||
exclude:
|
||||
- os: osx
|
||||
compiler: gcc
|
||||
include:
|
||||
- os: linux
|
||||
compiler: clang
|
||||
env: WITHOUT_LLVM="yes"
|
||||
|
||||
|
||||
git:
|
||||
submodules: false
|
||||
|
||||
before_install:
|
||||
- if [ "$CC" = "clang" ]; then
|
||||
export CXX="clang++-4.0" CC="clang-4.0";
|
||||
fi;
|
||||
- if [ "$TRAVIS_OS_NAME" = "linux" ] && [ "$CXX" = "g++" ]; then
|
||||
export CXX="g++-5" CC="gcc-5" CXXFLAGS="-Wno-format-security";
|
||||
export GCC_COLORS='error=01;31:warning=01;35:note=01;36:caret=01;32:locus=01:quote=01';
|
||||
fi;
|
||||
- if [ "$TRAVIS_OS_NAME" = "linux" ]; then
|
||||
sudo add-apt-repository ppa:beineri/opt-qt59-trusty -y;
|
||||
sudo apt-get update;
|
||||
sudo apt-get install qt59base -y --allow-unauthenticated;
|
||||
fi;
|
||||
# Add coverall for C++ so coverall.io could be triggered. Even it should be --coverage and gcov.
|
||||
# Install updated libglew-dev since the version provided by trusty is outdated
|
||||
- if [ "$TRAVIS_OS_NAME" = "linux" ]; then
|
||||
pip install --user cpp-coveralls requests[security];
|
||||
wget http://mirrors.kernel.org/ubuntu/pool/main/g/glew/libglew-dev_1.13.0-2_amd64.deb;
|
||||
wget http://mirrors.kernel.org/ubuntu/pool/main/g/glew/libglew1.13_1.13.0-2_amd64.deb;
|
||||
wget http://mirrors.kernel.org/ubuntu/pool/universe/v/vulkan/libvulkan-dev_1.0.21.0+dfsg1-1~16.04.1_amd64.deb;
|
||||
wget http://mirrors.kernel.org/ubuntu/pool/universe/v/vulkan/libvulkan1_1.0.21.0+dfsg1-1~16.04.1_amd64.deb;
|
||||
sudo dpkg -i libglew1.13_1.13.0-2_amd64.deb libglew-dev_1.13.0-2_amd64.deb libvulkan1_1.0.21.0+dfsg1-1~16.04.1_amd64.deb libvulkan-dev_1.0.21.0+dfsg1-1~16.04.1_amd64.deb;
|
||||
else
|
||||
brew update; brew update;
|
||||
brew install ccache glew wxwidgets llvm38;
|
||||
brew install ccache glew llvm40;
|
||||
fi;
|
||||
|
||||
before_script:
|
||||
- git submodule update --init rsx_program_decompiler asmjit 3rdparty/ffmpeg 3rdparty/pugixml 3rdparty/GSL 3rdparty/libpng Utilities/yaml-cpp 3rdparty/cereal
|
||||
- git submodule update --init asmjit 3rdparty/ffmpeg 3rdparty/pugixml 3rdparty/GSL 3rdparty/libpng Utilities/yaml-cpp 3rdparty/cereal 3rdparty/hidapi Vulkan/glslang Vulkan/Vulkan-LoaderAndValidationLayers
|
||||
- source /opt/qt59/bin/qt59-env.sh
|
||||
- mkdir build
|
||||
- cd build
|
||||
- if [ "$TRAVIS_OS_NAME" = "linux" ]; then
|
||||
cmake ..;
|
||||
- if [ -z "$WITHOUT_LLVM" ]; then
|
||||
cmake .. -DCMAKE_INSTALL_PREFIX=/usr;
|
||||
else
|
||||
cmake .. -DLLVM_DIR=/usr/local/opt/llvm38/lib/llvm-3.8/share/llvm/cmake;
|
||||
cmake .. -DCMAKE_INSTALL_PREFIX=/usr -DWITHOUT_LLVM=ON;
|
||||
fi;
|
||||
- make -j 3
|
||||
- # AppImage generation
|
||||
- if [ "$TRAVIS_BRANCH" = "master" ] && [ "$CC" = "clang-4.0" ] && [ "$TRAVIS_PULL_REQUEST" = false ]; then
|
||||
export LD_LIBRARY_PATH=${PWD}/3rdparty/libpng:/opt/qt59/lib/:$LD_LIBRARY_PATH ;
|
||||
make DESTDIR=appdir install ; find appdir/ ;
|
||||
find ../bin ;
|
||||
wget -c "https://github.com/probonopd/linuxdeployqt/releases/download/continuous/linuxdeployqt-continuous-x86_64.AppImage" ;
|
||||
chmod a+x linuxdeployqt*.AppImage ;
|
||||
unset QTDIR; unset QT_PLUGIN_PATH ;
|
||||
./linuxdeployqt*.AppImage ./appdir/usr/share/applications/*.desktop -bundle-non-qt-libs ;
|
||||
./linuxdeployqt*.AppImage ./appdir/usr/share/applications/*.desktop -appimage ;
|
||||
find ./appdir -executable -type f -exec ldd {} \; | grep " => /usr" | cut -d " " -f 2-3 | sort | uniq ;
|
||||
zip -r9 rpcs3.zip ./RPCS3*.AppImage;
|
||||
if [ -z "$WITHOUT_LLVM" ]; then
|
||||
export LLVM="-LLVM";
|
||||
fi;
|
||||
curl ${UPLOAD_URL}${TRAVIS_COMMIT:0:7}-${TRAVIS_BUILD_NUMBER}${LLVM}_linux64 --upload-file rpcs3.zip;
|
||||
fi;
|
||||
|
||||
script:
|
||||
# Add a command to show all the variables. May be useful for debugging Travis.
|
||||
#- echo "--Shell Export Lists START--" ; export -p; echo "--Shell Export Lists STOP--";
|
||||
# And to ensure the versions of toolchain
|
||||
- echo "--CXX version?"; "$CXX" --version; echo "--CXX version confirmed";
|
||||
- if [ "$COVERITY_SCAN_BRANCH" != 1 ]; then make -j 3; fi
|
||||
#- if [ "$COVERITY_SCAN_BRANCH" != 1 ]; then make -j 3; fi
|
||||
|
||||
addons:
|
||||
apt:
|
||||
sources:
|
||||
- ubuntu-toolchain-r-test
|
||||
#- llvm-toolchain-trusty-3.8 temporarily disabled
|
||||
- llvm-toolchain-trusty-4.0
|
||||
packages:
|
||||
- cmake
|
||||
- libasound2-dev
|
||||
- libopenal-dev
|
||||
- freeglut3-dev
|
||||
- libglew-dev
|
||||
#- libglew-dev
|
||||
#- libvulkan1
|
||||
#- libvulkan-dev
|
||||
- libc6-dev
|
||||
#- llvm-3.8
|
||||
#- llvm-3.8-dev
|
||||
- llvm-4.0
|
||||
- llvm-4.0-dev
|
||||
- clang-4.0
|
||||
- libedit-dev
|
||||
- g++-5
|
||||
- gcc-5
|
||||
#- clang-3.6
|
||||
- libstdc++-5-dev
|
||||
- lib32stdc++6
|
||||
- zlib1g-dev
|
||||
- libwxgtk3.0-dev
|
||||
# We need to install qt 5.8 manually because the version trusty provides is too old.
|
||||
#- qtbase5-dev
|
||||
- libudev-dev
|
||||
coverity_scan:
|
||||
project:
|
||||
name: $TRAVIS_REPO_SLUG
|
||||
|
||||
+1
Submodule 3rdparty/hidapi added at 66eed15b05
Vendored
+1
-1
Submodule 3rdparty/libpng updated: ea77a6fd49...bbbcaf1122
+1
Submodule 3rdparty/zlib added at cacf7f1d4e
+22
-9
@@ -1,5 +1,12 @@
|
||||
cmake_minimum_required(VERSION 2.8.12)
|
||||
|
||||
option(WITH_GDB "WITH_GDB" OFF)
|
||||
option(WITHOUT_LLVM "WITHOUT_LLVM" OFF)
|
||||
|
||||
if (WITH_GDB)
|
||||
add_definitions(-DWITH_GDB_DEBUGGER)
|
||||
endif()
|
||||
|
||||
set(ASMJIT_STATIC TRUE)
|
||||
|
||||
if (NOT CMAKE_BUILD_TYPE)
|
||||
@@ -11,14 +18,6 @@ if(NOT CMAKE_SIZEOF_VOID_P EQUAL 8)
|
||||
message( FATAL_ERROR "RPCS3 can only be compiled on 64-bit platforms." )
|
||||
endif()
|
||||
|
||||
if (CMAKE_COMPILER_IS_GNUCC AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 5.1)
|
||||
message( FATAL_ERROR "RPCS3 requires at least gcc-5.1." )
|
||||
endif()
|
||||
|
||||
if (CMAKE_COMPILER_IS_GNUCC AND CMAKE_CXX_COMPILER_VERSION VERSION_EQUAL 6.1)
|
||||
message( FATAL_ERROR "RPCS3 can't be compiled with gcc-6.1, see #1691." )
|
||||
endif()
|
||||
|
||||
find_program(CCACHE_FOUND ccache)
|
||||
if (CCACHE_FOUND)
|
||||
set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE ccache)
|
||||
@@ -41,6 +40,20 @@ option(VULKAN_PREBUILT "" OFF)
|
||||
# TODO: do real installation, including copying directory structure
|
||||
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_RELEASE "${PROJECT_BINARY_DIR}/bin")
|
||||
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_DEBUG "${PROJECT_BINARY_DIR}/bin")
|
||||
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_RELWITHDEBINFO "${PROJECT_BINARY_DIR}/bin")
|
||||
|
||||
add_subdirectory( Vulkan )
|
||||
add_subdirectory( rpcs3 )
|
||||
add_subdirectory( rsx_program_decompiler )
|
||||
|
||||
include_directories(3rdparty/hidapi/hidapi)
|
||||
if(APPLE)
|
||||
add_subdirectory(3rdparty/hidapi/mac)
|
||||
#list(APPEND LIBS hidapi)
|
||||
elseif(${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
|
||||
add_subdirectory(3rdparty/hidapi/linux)
|
||||
elseif(MSVC)
|
||||
add_subdirectory(3rdparty/hidapi/windows)
|
||||
else()
|
||||
add_subdirectory(3rdparty/hidapi/libusb)
|
||||
#list(APPEND LIBS hidapi-libusb)
|
||||
endif()
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
# Getting Started
|
||||
|
||||
Before getting started using the emulator, read the [Quickstart Guide](https://rpcs3.net/quickstart) and the [FAQ](https://rpcs3.net/faq). After reading those, if you need support, visit our [Forums](http://www.emunewz.net/forum/forumdisplay.php?fid=172).
|
||||
|
||||
# Issue Reporting
|
||||
|
||||
**The GitHub Issue Tracker is not the place to ask for support or to submit [Game Compatibility](https://rpcs3.net/compatibility) reports.** Requests for support or incorrect reports will be closed. If you are not sure whether the issue you want to report is an actual issue that is not yet known, please use the forums to submit such report.
|
||||
|
||||
**Before reporting an issue:**
|
||||
- Check if your system matches all the minimum requirements listed in the [Quickstart Guide](https://rpcs3.net/quickstart);
|
||||
- Check if the issue is meaningful for the team (e.g. The Last of Us doesn't work is obvious and therefore useless);
|
||||
- Search older issues/forum threads to see if your issue was already submitted.
|
||||
- Use understandable English. It doesn't need to be perfect, but clear enough to understand your message.
|
||||
- While reporting issues, don't forget to include details about your system (OS, CPU, GPU, etc.), as well as the RPCS3.log file.
|
||||
|
||||
Submitting your test results for Commercial Games must be done on our forums' [Commercial Games](http://www.emunewz.net/forum/forumdisplay.php?fid=193) section. If there's already a thread for the game you want to report post in it, otherwise please make a new thread following the [Guidelines for submitting new games](http://www.emunewz.net/forum/showthread.php?tid=174376).
|
||||
|
||||
# Contributing
|
||||
|
||||
Check the [Coding Style Guidelines](https://github.com/RPCS3/rpcs3/wiki/Coding-Style), [Roadmap](https://github.com/RPCS3/rpcs3/wiki/Roadmap) and [Developer Information](https://github.com/RPCS3/rpcs3/wiki/Developer-Information). If you have any questions, hit us up on our [Discord Server](https://discord.me/RPCS3) in the **#development** channel.
|
||||
@@ -5,47 +5,61 @@ RPCS3
|
||||
[](https://ci.appveyor.com/project/rpcs3/rpcs3/branch/master)
|
||||
[](https://scan.coverity.com/projects/3960)
|
||||
|
||||
An open-source PlayStation 3 emulator/debugger written in C++.
|
||||
The world's first open-source PlayStation 3 emulator/debugger written in C++ for Windows and Linux.
|
||||
|
||||
You can find some basic information in the [FAQ](https://github.com/RPCS3/rpcs3/wiki/FAQ). For discussion about this emulator and PS3 emulation please visit the [official forums](http://www.emunewz.net/forum/forumdisplay.php?fid=172).
|
||||
You can find some basic information in our [**website**](https://rpcs3.net/).
|
||||
For discussion about this emulator and PS3 emulation please visit our [**forums**](http://www.emunewz.net/forum/forumdisplay.php?fid=172) and our [**Discord server**](https://discord.me/RPCS3).
|
||||
|
||||
Official Discord server: https://discord.me/RPCS3
|
||||
|
||||
Support Nekotekina on Patreon: https://www.patreon.com/Nekotekina
|
||||
|
||||
### Development
|
||||
|
||||
If you want to contribute please take a look at the [Coding Style](https://github.com/RPCS3/rpcs3/wiki/Coding-Style), [Roadmap](https://github.com/RPCS3/rpcs3/wiki/Roadmap) and [Developer Information](https://github.com/RPCS3/rpcs3/wiki/Developer-Information) pages. You should as well contact any of the developers in the forum in order to know about the current situation of the emulator.
|
||||
[**Support Lead Developer Nekotekina on Patreon**](https://www.patreon.com/Nekotekina)
|
||||
|
||||
|
||||
### Dependencies
|
||||
## Development
|
||||
|
||||
__Windows__
|
||||
* [Visual Studio 2015](https://www.visualstudio.com/en-us/downloads/download-visual-studio-vs.aspx)
|
||||
* [Visual C++ Redistributable Packages for Visual Studio 2015](http://www.microsoft.com/en-us/download/details.aspx?id=48145)
|
||||
* [Cmake 3.1.0+](http://www.cmake.org/download/) (required; add to PATH)
|
||||
If you want to contribute please take a look at the [Coding Style](https://github.com/RPCS3/rpcs3/wiki/Coding-Style), [Roadmap](https://github.com/RPCS3/rpcs3/wiki/Roadmap) and [Developer Information](https://github.com/RPCS3/rpcs3/wiki/Developer-Information) pages. You should as well contact any of the developers in the forums or in Discord in order to know more about the current situation of the emulator.
|
||||
|
||||
|
||||
## Dependencies
|
||||
|
||||
### Windows
|
||||
* [Visual Studio 2017](https://www.visualstudio.com/downloads/)
|
||||
* [Visual C++ Redistributable Packages for Visual Studio 2017](https://go.microsoft.com/fwlink/?LinkId=746572)
|
||||
* [Cmake 3.1.0+](https://www.cmake.org/download/) (required; add to PATH)
|
||||
* [Python 3.3+](https://www.python.org/downloads/) (required; add to PATH)
|
||||
* [Qt 5.9+](https://www.qt.io/download-open-source/) (required; add QTDIR `<QtInstallFolder>\5.9\msvc2015_64\` environment variable if you do not want to use the Visual Studio Qt Plugin)
|
||||
* [Visual Studio Qt Plugin](https://marketplace.visualstudio.com/items?itemName=TheQtCompany.QtVisualStudioTools2015) (optional; see above)
|
||||
|
||||
__Linux__
|
||||
### Linux
|
||||
* [Qt 5.9+](https://www.qt.io/download-open-source/)
|
||||
* GCC 5.1+ or Clang 3.5.0+ ([not GCC 6.1](https://github.com/RPCS3/rpcs3/issues/1691))
|
||||
* Debian & Ubuntu: `sudo apt-get install cmake build-essential libopenal-dev libwxgtk3.0-dev libglew-dev zlib1g-dev libedit-dev libvulkan-dev git`
|
||||
* Arch: `sudo pacman -S glew openal wxgtk cmake llvm`
|
||||
* Debian & Ubuntu: `sudo apt-get install cmake build-essential libasound2-dev libopenal-dev libglew-dev zlib1g-dev libedit-dev libvulkan-dev libudev-dev git qt5-default`
|
||||
* Arch: `sudo pacman -S glew openal cmake llvm qt5-base`
|
||||
* Fedora: `sudo dnf install cmake qt5-devel vulkan-devel libGLEW`
|
||||
|
||||
__Mac OSX__
|
||||
### Mac OSX
|
||||
Mac OSX is not supported at this moment because it doesn't meet system requirements (OpenGL 4.3)
|
||||
* Xcode 6+ (tested with Xcode 6.4)
|
||||
* Install with Homebrew: `brew install glew wxwidgets`
|
||||
* Remove '-framework QuickTime' from '_ldflags' in /usr/local/bin/wx-config
|
||||
* Install with Homebrew: `brew install glew`
|
||||
|
||||
### Building
|
||||
|
||||
- __Windows__: </br>
|
||||
1) To initialize the repository don't forget to execute `git submodule update --init` to pull the submodules. </br>
|
||||
2) Open the *.SLN* file. </br>
|
||||
3) Build the projects in *__BUILD_BEFORE* folder: right-click on every project > *Build*. </br>
|
||||
4) Press *BUILD* > *Build Solution* or *Rebuild Solution*. </br>
|
||||
## Building on Windows:
|
||||
To initialize the repository don't forget to execute `git submodule update --init` to pull the submodules.
|
||||
|
||||
### Configuring Qt
|
||||
|
||||
*If you're using Visual Studio 2017 without Qt plugin support (or simply dont want to use it):*
|
||||
1) Add `QTDIR` environment variable and set it to `<QtInstallFolder>\5.9\msvc2017_64\` </br>
|
||||
|
||||
*If you wish to use the Visual Studio plugin for Qt:* </br>
|
||||
1) Go to the Qt5 menu and edit Qt5 options. Add the path to your Qt installation with compiler e.g. `C:\Qt\5.8\msvc2015_64`. </br>
|
||||
2) While selecting the rpcs3qt project, go to Qt5->Project Setting and select the version you added.
|
||||
|
||||
### Building the projects
|
||||
1) Build the projects in *__BUILD_BEFORE* folder: right-click on every project > *Build*. </br>
|
||||
2) Press *BUILD* > *Build Solution* or *Rebuild Solution*. </br>
|
||||
|
||||
|
||||
## Building on Linux & Mac OSX:
|
||||
|
||||
- __Linux & Mac OSX__: </br>
|
||||
1) `git clone https://github.com/RPCS3/rpcs3.git` </br>
|
||||
2) `cd rpcs3/` </br>
|
||||
3) `git submodule update --init` </br>
|
||||
@@ -56,7 +70,8 @@ If you are on OSX and want to build with llvm don't forget to add `-DLLVM_DIR=..
|
||||
|
||||
When using GDB, configure it to ignore SIGSEGV signal (`handle SIGSEGV nostop noprint`).
|
||||
|
||||
##### CMake Build Options (Linux & Mac OSX)
|
||||
|
||||
## CMake Build Options (Linux & Mac OSX)
|
||||
|
||||
- ```-DUSE_SYSTEM_LIBPNG=ON/OFF``` (default = *OFF*) </br>
|
||||
Build against the shared libpng instead of using the builtin one. libpng 1.6+ highly recommended. Try this option if you get version conflict errors or only see black game icons.
|
||||
@@ -64,6 +79,7 @@ Build against the shared libpng instead of using the builtin one. libpng 1.6+ hi
|
||||
- ```-DUSE_SYSTEM_FFMPEG=ON/OFF``` (default = *OFF*) </br>
|
||||
Build against the shared ffmpeg libraries instead of using the builtin patched version. Try this if the builtin version breaks the OpenGL renderer for you.
|
||||
|
||||
### License
|
||||
|
||||
## License
|
||||
|
||||
Most files are licensed under the terms of GNU GPLv2 License, see LICENSE file for details. Some files may be licensed differently, check appropriate file headers for details.
|
||||
|
||||
@@ -1,73 +0,0 @@
|
||||
#include "stdafx.h"
|
||||
#include "Config.h"
|
||||
#include "Emu/System.h"
|
||||
#include "AutoPause.h"
|
||||
|
||||
cfg::bool_entry g_cfg_debug_autopause_syscall(cfg::root.misc, "Auto Pause at System Call");
|
||||
cfg::bool_entry g_cfg_debug_autopause_func_call(cfg::root.misc, "Auto Pause at Function Call");
|
||||
|
||||
debug::autopause& debug::autopause::get_instance()
|
||||
{
|
||||
// Use magic static
|
||||
static autopause instance;
|
||||
return instance;
|
||||
}
|
||||
|
||||
// Load Auto Pause Configuration from file "pause.bin"
|
||||
void debug::autopause::reload(void)
|
||||
{
|
||||
auto& instance = get_instance();
|
||||
|
||||
instance.m_pause_function.clear();
|
||||
instance.m_pause_syscall.clear();
|
||||
|
||||
// TODO: better format, possibly a config entry
|
||||
if (fs::file list{ fs::get_config_dir() + "pause.bin" })
|
||||
{
|
||||
u32 num;
|
||||
size_t fmax = list.size();
|
||||
size_t fcur = 0;
|
||||
list.seek(0);
|
||||
while (fcur <= fmax - sizeof(u32))
|
||||
{
|
||||
list.read(&num, sizeof(u32));
|
||||
fcur += sizeof(u32);
|
||||
if (num == 0xFFFFFFFF) break;
|
||||
|
||||
if (num < 1024)
|
||||
{
|
||||
instance.m_pause_syscall.emplace(num);
|
||||
LOG_WARNING(HLE, "Set autopause at syscall %lld", num);
|
||||
}
|
||||
else
|
||||
{
|
||||
instance.m_pause_function.emplace(num);
|
||||
LOG_WARNING(HLE, "Set autopause at function 0x%08x", num);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
bool debug::autopause::pause_syscall(u64 code)
|
||||
{
|
||||
if (g_cfg_debug_autopause_syscall && get_instance().m_pause_syscall.count(code) != 0)
|
||||
{
|
||||
Emu.Pause();
|
||||
LOG_SUCCESS(HLE, "Autopause triggered at syscall %lld", code);
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
bool debug::autopause::pause_function(u32 code)
|
||||
{
|
||||
if (g_cfg_debug_autopause_func_call && get_instance().m_pause_function.count(code) != 0)
|
||||
{
|
||||
Emu.Pause();
|
||||
LOG_SUCCESS(HLE, "Autopause triggered at function 0x%08x", code);
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
@@ -1,22 +0,0 @@
|
||||
#pragma once
|
||||
|
||||
#include <unordered_set>
|
||||
|
||||
// Regarded as a Debugger Enchantment
|
||||
namespace debug
|
||||
{
|
||||
// To store the pause function/call id, and let those pause there.
|
||||
// Would be with a GUI to configure those.
|
||||
class autopause
|
||||
{
|
||||
std::unordered_set<u64> m_pause_syscall;
|
||||
std::unordered_set<u32> m_pause_function;
|
||||
|
||||
static autopause& get_instance();
|
||||
public:
|
||||
|
||||
static void reload();
|
||||
static bool pause_syscall(u64 code);
|
||||
static bool pause_function(u32 code);
|
||||
};
|
||||
}
|
||||
@@ -301,6 +301,16 @@ union alignas(16) v128
|
||||
}
|
||||
};
|
||||
|
||||
template <typename T, std::size_t N, std::size_t M>
|
||||
struct offset32_array<v128::masked_array_t<T, N, M>>
|
||||
{
|
||||
template <typename Arg>
|
||||
static inline u32 index32(const Arg& arg)
|
||||
{
|
||||
return SIZE_32(T) * (static_cast<u32>(arg) ^ static_cast<u32>(M));
|
||||
}
|
||||
};
|
||||
|
||||
inline v128 operator|(const v128& left, const v128& right)
|
||||
{
|
||||
return v128::fromV(_mm_or_si128(left.vi, right.vi));
|
||||
|
||||
@@ -18,6 +18,9 @@ struct bf_base
|
||||
// Value mask
|
||||
static constexpr utype vmask = static_cast<utype>(~utype{} >> (bitmax - bitsize));
|
||||
|
||||
// All ones mask
|
||||
static constexpr utype mask1 = static_cast<utype>(~utype{});
|
||||
|
||||
protected:
|
||||
type m_data;
|
||||
};
|
||||
@@ -36,7 +39,7 @@ struct bf_t : bf_base<T, N>
|
||||
// Get bitmask of size N, at I pos
|
||||
static constexpr utype data_mask()
|
||||
{
|
||||
return static_cast<utype>(~utype{} >> (bf_t::bitmax - bf_t::bitsize) << bitpos);
|
||||
return static_cast<utype>(static_cast<utype>(bf_t::mask1 >> (bf_t::bitmax - bf_t::bitsize)) << bitpos);
|
||||
}
|
||||
|
||||
// Bitfield extraction helper
|
||||
|
||||
+1702
File diff suppressed because it is too large
Load Diff
+81
-50
@@ -5,9 +5,9 @@
|
||||
|
||||
namespace cfg
|
||||
{
|
||||
logs::channel cfg("CFG", logs::level::notice);
|
||||
logs::channel cfg("CFG");
|
||||
|
||||
entry_base::entry_base(type _type)
|
||||
_base::_base(type _type)
|
||||
: m_type(_type)
|
||||
{
|
||||
if (_type != type::node)
|
||||
@@ -16,51 +16,36 @@ namespace cfg
|
||||
}
|
||||
}
|
||||
|
||||
entry_base::entry_base(type _type, node& owner, const std::string& name)
|
||||
_base::_base(type _type, node* owner, const std::string& name)
|
||||
: m_type(_type)
|
||||
{
|
||||
if (!owner.m_nodes.emplace(name, this).second)
|
||||
for (const auto& pair : owner->m_nodes)
|
||||
{
|
||||
fmt::throw_exception<std::logic_error>("Node already exists: %s" HERE, name);
|
||||
}
|
||||
}
|
||||
|
||||
entry_base& entry_base::operator[](const std::string& name) const
|
||||
{
|
||||
if (m_type == type::node)
|
||||
{
|
||||
return *static_cast<const node&>(*this).m_nodes.at(name);
|
||||
if (pair.first == name)
|
||||
{
|
||||
fmt::throw_exception<std::logic_error>("Node already exists: %s" HERE, name);
|
||||
}
|
||||
}
|
||||
|
||||
fmt::throw_exception<std::logic_error>("Invalid node type" HERE);
|
||||
owner->m_nodes.emplace_back(name, this);
|
||||
}
|
||||
|
||||
entry_base& entry_base::operator[](const char* name) const
|
||||
{
|
||||
if (m_type == type::node)
|
||||
{
|
||||
return *static_cast<const node&>(*this).m_nodes.at(name);
|
||||
}
|
||||
|
||||
fmt::throw_exception<std::logic_error>("Invalid node type" HERE);
|
||||
}
|
||||
|
||||
bool entry_base::from_string(const std::string&)
|
||||
bool _base::from_string(const std::string&)
|
||||
{
|
||||
fmt::throw_exception<std::logic_error>("from_string() purecall" HERE);
|
||||
}
|
||||
|
||||
bool entry_base::from_list(std::vector<std::string>&&)
|
||||
bool _base::from_list(std::vector<std::string>&&)
|
||||
{
|
||||
fmt::throw_exception<std::logic_error>("from_list() purecall" HERE);
|
||||
}
|
||||
|
||||
// Emit YAML
|
||||
static void encode(YAML::Emitter& out, const class entry_base& rhs);
|
||||
static void encode(YAML::Emitter& out, const class _base& rhs);
|
||||
|
||||
// Incrementally load config entries from YAML::Node.
|
||||
// The config value is preserved if the corresponding YAML node doesn't exist.
|
||||
static void decode(const YAML::Node& data, class entry_base& rhs);
|
||||
static void decode(const YAML::Node& data, class _base& rhs);
|
||||
}
|
||||
|
||||
bool cfg::try_to_int64(s64* out, const std::string& value, s64 min, s64 max)
|
||||
@@ -118,7 +103,13 @@ bool cfg::try_to_enum_value(u64* out, decltype(&fmt_class_string<int>::format) f
|
||||
|
||||
try
|
||||
{
|
||||
const auto val = std::stoull(value, nullptr, 0);
|
||||
std::size_t pos;
|
||||
const auto val = std::stoull(value, &pos, 0);
|
||||
|
||||
if (pos != value.size())
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
if (out) *out = val;
|
||||
return true;
|
||||
@@ -151,7 +142,7 @@ std::vector<std::string> cfg::try_to_enum_list(decltype(&fmt_class_string<int>::
|
||||
return result;
|
||||
}
|
||||
|
||||
void cfg::encode(YAML::Emitter& out, const cfg::entry_base& rhs)
|
||||
void cfg::encode(YAML::Emitter& out, const cfg::_base& rhs)
|
||||
{
|
||||
switch (rhs.get_type())
|
||||
{
|
||||
@@ -161,7 +152,8 @@ void cfg::encode(YAML::Emitter& out, const cfg::entry_base& rhs)
|
||||
for (const auto& np : static_cast<const node&>(rhs).get_nodes())
|
||||
{
|
||||
out << YAML::Key << np.first;
|
||||
out << YAML::Value; encode(out, *np.second);
|
||||
out << YAML::Value;
|
||||
encode(out, *np.second);
|
||||
}
|
||||
|
||||
out << YAML::EndMap;
|
||||
@@ -178,12 +170,25 @@ void cfg::encode(YAML::Emitter& out, const cfg::entry_base& rhs)
|
||||
out << YAML::EndSeq;
|
||||
return;
|
||||
}
|
||||
case type::log:
|
||||
{
|
||||
out << YAML::BeginMap;
|
||||
for (const auto& np : static_cast<const log_entry&>(rhs).get_map())
|
||||
{
|
||||
if (np.second == logs::level::notice) continue;
|
||||
out << YAML::Key << np.first;
|
||||
out << YAML::Value << fmt::format("%s", np.second);
|
||||
}
|
||||
|
||||
out << YAML::EndMap;
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
out << rhs.to_string();
|
||||
}
|
||||
|
||||
void cfg::decode(const YAML::Node& data, cfg::entry_base& rhs)
|
||||
void cfg::decode(const YAML::Node& data, cfg::_base& rhs)
|
||||
{
|
||||
switch (rhs.get_type())
|
||||
{
|
||||
@@ -199,16 +204,12 @@ void cfg::decode(const YAML::Node& data, cfg::entry_base& rhs)
|
||||
if (!pair.first.IsScalar()) continue;
|
||||
|
||||
// Find the key among existing nodes
|
||||
const auto name = pair.first.Scalar();
|
||||
const auto found = static_cast<node&>(rhs).get_nodes().find(name);
|
||||
|
||||
if (found != static_cast<node&>(rhs).get_nodes().cend())
|
||||
for (const auto& _pair : static_cast<node&>(rhs).get_nodes())
|
||||
{
|
||||
decode(pair.second, *found->second);
|
||||
}
|
||||
else
|
||||
{
|
||||
// ???
|
||||
if (_pair.first == pair.first.Scalar())
|
||||
{
|
||||
decode(pair.second, *_pair.second);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -225,6 +226,29 @@ void cfg::decode(const YAML::Node& data, cfg::entry_base& rhs)
|
||||
|
||||
break;
|
||||
}
|
||||
case type::log:
|
||||
{
|
||||
if (data.IsScalar() || data.IsSequence())
|
||||
{
|
||||
return; // ???
|
||||
}
|
||||
|
||||
std::map<std::string, logs::level> values;
|
||||
|
||||
for (const auto& pair : data)
|
||||
{
|
||||
if (!pair.first.IsScalar() || !pair.second.IsScalar()) continue;
|
||||
|
||||
u64 value;
|
||||
if (cfg::try_to_enum_value(&value, &fmt_class_string<logs::level>::format, pair.second.Scalar()))
|
||||
{
|
||||
values.emplace(pair.first.Scalar(), static_cast<logs::level>(static_cast<int>(value)));
|
||||
}
|
||||
}
|
||||
|
||||
static_cast<log_entry&>(rhs).set_map(std::move(values));
|
||||
break;
|
||||
}
|
||||
default:
|
||||
{
|
||||
std::string value;
|
||||
@@ -261,25 +285,32 @@ void cfg::node::from_default()
|
||||
}
|
||||
}
|
||||
|
||||
void cfg::bool_entry::from_default()
|
||||
void cfg::_bool::from_default()
|
||||
{
|
||||
value = def;
|
||||
m_value = def;
|
||||
}
|
||||
|
||||
void cfg::string_entry::from_default()
|
||||
void cfg::string::from_default()
|
||||
{
|
||||
*this = def;
|
||||
m_value = def;
|
||||
}
|
||||
|
||||
void cfg::set_entry::from_default()
|
||||
{
|
||||
std::lock_guard<std::mutex> lock(m_mutex);
|
||||
m_set = {};
|
||||
}
|
||||
|
||||
cfg::root_node& cfg::get_root()
|
||||
void cfg::log_entry::set_map(std::map<std::string, logs::level>&& map)
|
||||
{
|
||||
// Magic static
|
||||
static root_node root;
|
||||
return root;
|
||||
logs::reset();
|
||||
|
||||
for (auto&& pair : (m_map = std::move(map)))
|
||||
{
|
||||
logs::set_level(pair.first, pair.second);
|
||||
}
|
||||
}
|
||||
|
||||
void cfg::log_entry::from_default()
|
||||
{
|
||||
set_map({});
|
||||
}
|
||||
|
||||
+69
-219
@@ -1,18 +1,14 @@
|
||||
#pragma once
|
||||
|
||||
#include "Utilities/types.h"
|
||||
#include "Utilities/Atomic.h"
|
||||
#include "Utilities/StrFmt.h"
|
||||
#include "Utilities/Log.h"
|
||||
|
||||
#include <initializer_list>
|
||||
#include <exception>
|
||||
#include <utility>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <set>
|
||||
#include <unordered_map>
|
||||
#include <map>
|
||||
#include <mutex>
|
||||
|
||||
namespace cfg
|
||||
{
|
||||
@@ -29,36 +25,33 @@ namespace cfg
|
||||
enum class type : uint
|
||||
{
|
||||
node = 0, // cfg::node type
|
||||
boolean, // cfg::bool_entry type
|
||||
fixed_map, // cfg::map_entry type
|
||||
enumeration, // cfg::enum_entry type
|
||||
integer, // cfg::int_entry type
|
||||
string, // cfg::string_entry type
|
||||
_bool, // cfg::_bool type
|
||||
_enum, // cfg::_enum type
|
||||
_int, // cfg::_int type
|
||||
string, // cfg::string type
|
||||
set, // cfg::set_entry type
|
||||
log,
|
||||
};
|
||||
|
||||
// Config tree entry abstract base class
|
||||
class entry_base
|
||||
class _base
|
||||
{
|
||||
const type m_type;
|
||||
|
||||
protected:
|
||||
// Ownerless entry constructor
|
||||
entry_base(type _type);
|
||||
_base(type _type);
|
||||
|
||||
// Owned entry constructor
|
||||
entry_base(type _type, class node& owner, const std::string& name);
|
||||
_base(type _type, class node* owner, const std::string& name);
|
||||
|
||||
public:
|
||||
// Disallow copy/move constructors and assignments
|
||||
entry_base(const entry_base&) = delete;
|
||||
_base(const _base&) = delete;
|
||||
|
||||
// Get type
|
||||
type get_type() const { return m_type; }
|
||||
|
||||
// Access child node (must exist)
|
||||
entry_base& operator [](const std::string& name) const; entry_base& operator [](const char* name) const;
|
||||
|
||||
// Reset defaults
|
||||
virtual void from_default() = 0;
|
||||
|
||||
@@ -82,27 +75,27 @@ namespace cfg
|
||||
};
|
||||
|
||||
// Config tree node which contains another nodes
|
||||
class node : public entry_base
|
||||
class node : public _base
|
||||
{
|
||||
std::map<std::string, entry_base*> m_nodes;
|
||||
std::vector<std::pair<std::string, _base*>> m_nodes;
|
||||
|
||||
friend class entry_base;
|
||||
friend class _base;
|
||||
|
||||
public:
|
||||
// Root node constructor
|
||||
node()
|
||||
: entry_base(type::node)
|
||||
: _base(type::node)
|
||||
{
|
||||
}
|
||||
|
||||
// Registered node constructor
|
||||
node(node& owner, const std::string& name)
|
||||
: entry_base(type::node, owner, name)
|
||||
node(node* owner, const std::string& name)
|
||||
: _base(type::node, owner, name)
|
||||
{
|
||||
}
|
||||
|
||||
// Get child nodes
|
||||
const std::map<std::string, entry_base*>& get_nodes() const
|
||||
const auto& get_nodes() const
|
||||
{
|
||||
return m_nodes;
|
||||
}
|
||||
@@ -117,43 +110,38 @@ namespace cfg
|
||||
void from_default() override;
|
||||
};
|
||||
|
||||
struct bool_entry final : public entry_base
|
||||
class _bool final : public _base
|
||||
{
|
||||
atomic_t<bool> value;
|
||||
bool m_value;
|
||||
|
||||
public:
|
||||
const bool def;
|
||||
|
||||
bool_entry(node& owner, const std::string& name, bool def = false)
|
||||
: entry_base(type::boolean, owner, name)
|
||||
, value(def)
|
||||
_bool(node* owner, const std::string& name, bool def = false)
|
||||
: _base(type::_bool, owner, name)
|
||||
, m_value(def)
|
||||
, def(def)
|
||||
{
|
||||
}
|
||||
|
||||
explicit operator bool() const
|
||||
{
|
||||
return value.load();
|
||||
}
|
||||
|
||||
bool_entry& operator =(bool value)
|
||||
{
|
||||
value = value;
|
||||
return *this;
|
||||
return m_value;
|
||||
}
|
||||
|
||||
void from_default() override;
|
||||
|
||||
std::string to_string() const override
|
||||
{
|
||||
return value.load() ? "true" : "false";
|
||||
return m_value ? "true" : "false";
|
||||
}
|
||||
|
||||
bool from_string(const std::string& value) override
|
||||
{
|
||||
if (value == "false")
|
||||
this->value = false;
|
||||
m_value = false;
|
||||
else if (value == "true")
|
||||
this->value = true;
|
||||
m_value = true;
|
||||
else
|
||||
return false;
|
||||
|
||||
@@ -161,116 +149,17 @@ namespace cfg
|
||||
}
|
||||
};
|
||||
|
||||
// Value node with fixed set of possible values, each maps to a value of type T.
|
||||
template<typename T>
|
||||
struct map_entry final : public entry_base
|
||||
{
|
||||
using init_type = std::initializer_list<std::pair<std::string, T>>;
|
||||
using map_type = std::unordered_map<std::string, T>;
|
||||
using list_type = std::vector<std::string>;
|
||||
using value_type = typename map_type::value_type;
|
||||
|
||||
static map_type make_map(init_type init)
|
||||
{
|
||||
map_type map(init.size());
|
||||
|
||||
for (const auto& v : init)
|
||||
{
|
||||
// Ensure elements are unique
|
||||
verify(HERE), map.emplace(v.first, v.second).second;
|
||||
}
|
||||
|
||||
return map;
|
||||
}
|
||||
|
||||
static list_type make_list(init_type init)
|
||||
{
|
||||
list_type list; list.reserve(init.size());
|
||||
|
||||
for (const auto& v : init)
|
||||
{
|
||||
list.emplace_back(v.first);
|
||||
}
|
||||
|
||||
return list;
|
||||
}
|
||||
|
||||
public:
|
||||
const map_type map;
|
||||
const list_type list; // Element list sorted in original order
|
||||
const value_type& def; // Pointer to the default value
|
||||
|
||||
private:
|
||||
atomic_t<const value_type*> m_value;
|
||||
|
||||
public:
|
||||
map_entry(node& owner, const std::string& name, const std::string& def, init_type init)
|
||||
: entry_base(type::fixed_map, owner, name)
|
||||
, map(make_map(init))
|
||||
, list(make_list(init))
|
||||
, def(*map.find(def))
|
||||
, m_value(&this->def)
|
||||
{
|
||||
}
|
||||
|
||||
map_entry(node& owner, const std::string& name, std::size_t def_index, init_type init)
|
||||
: map_entry(owner, name, (init.begin() + (def_index < init.size() ? def_index : 0))->first, init)
|
||||
{
|
||||
}
|
||||
|
||||
map_entry(node& owner, const std::string& name, init_type init)
|
||||
: map_entry(owner, name, 0, init)
|
||||
{
|
||||
}
|
||||
|
||||
const T& get() const
|
||||
{
|
||||
return m_value.load()->second;
|
||||
}
|
||||
|
||||
void from_default() override
|
||||
{
|
||||
m_value = &def;
|
||||
}
|
||||
|
||||
std::string to_string() const override
|
||||
{
|
||||
return m_value.load()->first;
|
||||
}
|
||||
|
||||
bool from_string(const std::string& value) override
|
||||
{
|
||||
const auto found = map.find(value);
|
||||
|
||||
if (found == map.end())
|
||||
{
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
m_value = &*found;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
std::vector<std::string> to_list() const override
|
||||
{
|
||||
return list;
|
||||
}
|
||||
};
|
||||
|
||||
// Value node with fixed set of possible values, each maps to an enum value of type T.
|
||||
template<typename T, bool External = false>
|
||||
class enum_entry final : public entry_base
|
||||
template <typename T>
|
||||
class _enum final : public _base
|
||||
{
|
||||
// Value or reference
|
||||
std::conditional_t<External, atomic_t<T>&, atomic_t<T>> m_value;
|
||||
T m_value;
|
||||
|
||||
public:
|
||||
const T def;
|
||||
|
||||
enum_entry(node& owner, const std::string& name, std::conditional_t<External, atomic_t<T>&, T> value)
|
||||
: entry_base(type::enumeration, owner, name)
|
||||
_enum(node* owner, const std::string& name, T value = {})
|
||||
: _base(type::_enum, owner, name)
|
||||
, m_value(value)
|
||||
, def(value)
|
||||
{
|
||||
@@ -278,13 +167,7 @@ namespace cfg
|
||||
|
||||
operator T() const
|
||||
{
|
||||
return m_value.load();
|
||||
}
|
||||
|
||||
enum_entry& operator =(T value)
|
||||
{
|
||||
m_value = value;
|
||||
return *this;
|
||||
return m_value;
|
||||
}
|
||||
|
||||
void from_default() override
|
||||
@@ -320,21 +203,21 @@ namespace cfg
|
||||
};
|
||||
|
||||
// Signed 32/64-bit integer entry with custom Min/Max range.
|
||||
template<s64 Min, s64 Max>
|
||||
class int_entry final : public entry_base
|
||||
template <s64 Min, s64 Max>
|
||||
class _int final : public _base
|
||||
{
|
||||
static_assert(Min < Max, "Invalid cfg::int_entry range");
|
||||
static_assert(Min < Max, "Invalid cfg::_int range");
|
||||
|
||||
// Prefer 32 bit type if possible
|
||||
using int_type = std::conditional_t<Min >= INT32_MIN && Max <= INT32_MAX, s32, s64>;
|
||||
|
||||
atomic_t<int_type> m_value;
|
||||
int_type m_value;
|
||||
|
||||
public:
|
||||
const int_type def;
|
||||
|
||||
int_entry(node& owner, const std::string& name, int_type def = std::min<int_type>(Max, std::max<int_type>(Min, 0)))
|
||||
: entry_base(type::integer, owner, name)
|
||||
_int(node* owner, const std::string& name, int_type def = std::min<int_type>(Max, std::max<int_type>(Min, 0)))
|
||||
: _base(type::_int, owner, name)
|
||||
, m_value(def)
|
||||
, def(def)
|
||||
{
|
||||
@@ -342,18 +225,7 @@ namespace cfg
|
||||
|
||||
operator int_type() const
|
||||
{
|
||||
return m_value.load();
|
||||
}
|
||||
|
||||
int_entry& operator =(int_type value)
|
||||
{
|
||||
if (value < Min || value > Max)
|
||||
{
|
||||
fmt::throw_exception("Value out of the valid range: %lld" HERE, s64{ value });
|
||||
}
|
||||
|
||||
m_value = value;
|
||||
return *this;
|
||||
return m_value;
|
||||
}
|
||||
|
||||
void from_default() override
|
||||
@@ -363,7 +235,7 @@ namespace cfg
|
||||
|
||||
std::string to_string() const override
|
||||
{
|
||||
return std::to_string(m_value.load());
|
||||
return std::to_string(m_value);
|
||||
}
|
||||
|
||||
bool from_string(const std::string& value) override
|
||||
@@ -380,22 +252,21 @@ namespace cfg
|
||||
};
|
||||
|
||||
// Alias for 32 bit int
|
||||
using int32_entry = int_entry<INT32_MIN, INT32_MAX>;
|
||||
using int32 = _int<INT32_MIN, INT32_MAX>;
|
||||
|
||||
// Alias for 64 bit int
|
||||
using int64_entry = int_entry<INT64_MIN, INT64_MAX>;
|
||||
using int64 = _int<INT64_MIN, INT64_MAX>;
|
||||
|
||||
// Simple string entry with mutex
|
||||
class string_entry final : public entry_base
|
||||
class string final : public _base
|
||||
{
|
||||
mutable std::mutex m_mutex;
|
||||
std::string m_value;
|
||||
|
||||
public:
|
||||
const std::string def;
|
||||
|
||||
string_entry(node& owner, const std::string& name, const std::string& def = {})
|
||||
: entry_base(type::string, owner, name)
|
||||
string(node* owner, const std::string& name, const std::string& def = {})
|
||||
: _base(type::string, owner, name)
|
||||
, m_value(def)
|
||||
, def(def)
|
||||
{
|
||||
@@ -403,25 +274,16 @@ namespace cfg
|
||||
|
||||
operator std::string() const
|
||||
{
|
||||
std::lock_guard<std::mutex> lock(m_mutex);
|
||||
return m_value;
|
||||
}
|
||||
|
||||
std::string get() const
|
||||
const std::string& get() const
|
||||
{
|
||||
return *this;
|
||||
}
|
||||
|
||||
string_entry& operator =(const std::string& value)
|
||||
{
|
||||
std::lock_guard<std::mutex> lock(m_mutex);
|
||||
m_value = value;
|
||||
return *this;
|
||||
return m_value;
|
||||
}
|
||||
|
||||
std::size_t size() const
|
||||
{
|
||||
std::lock_guard<std::mutex> lock(m_mutex);
|
||||
return m_value.size();
|
||||
}
|
||||
|
||||
@@ -429,41 +291,35 @@ namespace cfg
|
||||
|
||||
std::string to_string() const override
|
||||
{
|
||||
std::lock_guard<std::mutex> lock(m_mutex);
|
||||
return m_value;
|
||||
}
|
||||
|
||||
bool from_string(const std::string& value) override
|
||||
{
|
||||
*this = value;
|
||||
m_value = value;
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
// Simple set entry with mutex (TODO: template for various types)
|
||||
class set_entry final : public entry_base
|
||||
class set_entry final : public _base
|
||||
{
|
||||
mutable std::mutex m_mutex;
|
||||
|
||||
std::set<std::string> m_set;
|
||||
|
||||
public:
|
||||
// Default value is empty list in current implementation
|
||||
set_entry(node& owner, const std::string& name)
|
||||
: entry_base(type::set, owner, name)
|
||||
set_entry(node* owner, const std::string& name)
|
||||
: _base(type::set, owner, name)
|
||||
{
|
||||
}
|
||||
|
||||
std::set<std::string> get_set() const
|
||||
{
|
||||
std::lock_guard<std::mutex> lock(m_mutex);
|
||||
|
||||
return m_set;
|
||||
}
|
||||
|
||||
void set_set(std::set<std::string>&& set)
|
||||
{
|
||||
std::lock_guard<std::mutex> lock(m_mutex);
|
||||
m_set = std::move(set);
|
||||
}
|
||||
|
||||
@@ -471,40 +327,34 @@ namespace cfg
|
||||
|
||||
std::vector<std::string> to_list() const override
|
||||
{
|
||||
std::lock_guard<std::mutex> lock(m_mutex);
|
||||
|
||||
return{ m_set.begin(), m_set.end() };
|
||||
}
|
||||
|
||||
bool from_list(std::vector<std::string>&& list) override
|
||||
{
|
||||
std::lock_guard<std::mutex> lock(m_mutex);
|
||||
m_set = { std::make_move_iterator(list.begin()), std::make_move_iterator(list.end()) };
|
||||
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
// Root type with some predefined nodes. Don't change it, this is not mandatory for adding nodes.
|
||||
struct root_node : node
|
||||
class log_entry final : public _base
|
||||
{
|
||||
node core { *this, "Core" };
|
||||
node vfs { *this, "VFS" };
|
||||
node log { *this, "Log" };
|
||||
node video { *this, "Video" };
|
||||
node audio { *this, "Audio" };
|
||||
node io { *this, "Input/Output" };
|
||||
node sys { *this, "System" };
|
||||
node net { *this, "Net" };
|
||||
node misc { *this, "Miscellaneous" };
|
||||
std::map<std::string, logs::level> m_map;
|
||||
|
||||
public:
|
||||
log_entry(node* owner, const std::string& name)
|
||||
: _base(type::log, owner, name)
|
||||
{
|
||||
}
|
||||
|
||||
std::map<std::string, logs::level> get_map() const
|
||||
{
|
||||
return m_map;
|
||||
}
|
||||
|
||||
void set_map(std::map<std::string, logs::level>&& map);
|
||||
|
||||
void from_default() override;
|
||||
};
|
||||
|
||||
// Get global configuration root instance
|
||||
extern root_node& get_root();
|
||||
|
||||
// Global configuration root instance (cached reference)
|
||||
static root_node& root = get_root();
|
||||
}
|
||||
|
||||
// Registered log channel
|
||||
#define LOG_CHANNEL(name) extern logs::channel name; namespace logs { static cfg::enum_entry<logs::level, true> name(cfg::root.log, #name, ::name.enabled); }
|
||||
|
||||
+101
-16
@@ -6,8 +6,11 @@
|
||||
|
||||
#include <unordered_map>
|
||||
#include <algorithm>
|
||||
#include <cstring>
|
||||
#include <cerrno>
|
||||
|
||||
using namespace std::literals::string_literals;
|
||||
|
||||
#ifdef _WIN32
|
||||
|
||||
#include <cwchar>
|
||||
@@ -99,6 +102,7 @@ static fs::error to_error(DWORD e)
|
||||
#include <sys/mman.h>
|
||||
#include <sys/stat.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/statvfs.h>
|
||||
#include <dirent.h>
|
||||
#include <fcntl.h>
|
||||
#include <libgen.h>
|
||||
@@ -106,10 +110,12 @@ static fs::error to_error(DWORD e)
|
||||
#include <unistd.h>
|
||||
#include <utime.h>
|
||||
|
||||
#if defined(__APPLE__) || defined(__FreeBSD__)
|
||||
#if defined(__APPLE__)
|
||||
#include <copyfile.h>
|
||||
#include <mach-o/dyld.h>
|
||||
#else
|
||||
#elif defined(__DragonFly__) || defined(__FreeBSD__)
|
||||
#include <sys/socket.h> // sendfile
|
||||
#elif defined(__linux__) || defined(__sun)
|
||||
#include <sys/sendfile.h>
|
||||
#endif
|
||||
|
||||
@@ -153,6 +159,16 @@ namespace fs
|
||||
{
|
||||
}
|
||||
|
||||
stat_t file_base::stat()
|
||||
{
|
||||
fmt::throw_exception("fs::file::stat() not supported for %s", typeid(*this).name());
|
||||
}
|
||||
|
||||
void file_base::sync()
|
||||
{
|
||||
// Do notning
|
||||
}
|
||||
|
||||
dir_base::~dir_base()
|
||||
{
|
||||
}
|
||||
@@ -390,6 +406,45 @@ bool fs::is_dir(const std::string& path)
|
||||
return true;
|
||||
}
|
||||
|
||||
bool fs::statfs(const std::string& path, fs::device_stat& info)
|
||||
{
|
||||
if (auto device = get_virtual_device(path))
|
||||
{
|
||||
return device->statfs(path, info);
|
||||
}
|
||||
|
||||
#ifdef _WIN32
|
||||
ULARGE_INTEGER avail_free;
|
||||
ULARGE_INTEGER total_size;
|
||||
ULARGE_INTEGER total_free;
|
||||
|
||||
if (!GetDiskFreeSpaceExW(to_wchar(path).get(), &avail_free, &total_size, &total_free))
|
||||
{
|
||||
g_tls_error = to_error(GetLastError());
|
||||
return false;
|
||||
}
|
||||
|
||||
info.block_size = 4096; // TODO
|
||||
info.total_size = total_size.QuadPart;
|
||||
info.total_free = total_free.QuadPart;
|
||||
info.avail_free = avail_free.QuadPart;
|
||||
#else
|
||||
struct ::statvfs buf;
|
||||
if (::statvfs(path.c_str(), &buf) != 0)
|
||||
{
|
||||
g_tls_error = to_error(errno);
|
||||
return false;
|
||||
}
|
||||
|
||||
info.block_size = buf.f_frsize;
|
||||
info.total_size = info.block_size * buf.f_blocks;
|
||||
info.total_free = info.block_size * buf.f_bfree;
|
||||
info.avail_free = info.block_size * buf.f_bavail;
|
||||
#endif
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool fs::create_dir(const std::string& path)
|
||||
{
|
||||
if (auto device = get_virtual_device(path))
|
||||
@@ -525,14 +580,20 @@ bool fs::copy_file(const std::string& from, const std::string& to, bool overwrit
|
||||
}
|
||||
|
||||
// Here we use kernel-space copying for performance reasons
|
||||
#if defined(__APPLE__) || defined(__FreeBSD__)
|
||||
// fcopyfile works on FreeBSD and OS X 10.5+
|
||||
#if defined(__APPLE__)
|
||||
// fcopyfile works on OS X 10.5+
|
||||
if (::fcopyfile(input, output, 0, COPYFILE_ALL))
|
||||
#else
|
||||
#elif defined(__DragonFly__) || defined(__FreeBSD__)
|
||||
if (::sendfile(input, output, 0, 0, NULL, NULL, 0))
|
||||
#elif defined(__linux__) || defined(__sun)
|
||||
// sendfile will work with non-socket output (i.e. regular file) on Linux 2.6.33+
|
||||
off_t bytes_copied = 0;
|
||||
struct ::stat fileinfo = { 0 };
|
||||
if (::fstat(input, &fileinfo) || ::sendfile(output, input, &bytes_copied, fileinfo.st_size))
|
||||
#else // NetBSD, OpenBSD, etc.
|
||||
fmt::throw_exception("fs::copy_file() isn't implemented for this platform.\nFrom: %s\nTo: %s", from, to);
|
||||
errno = 0;
|
||||
if (true)
|
||||
#endif
|
||||
{
|
||||
const int err = errno;
|
||||
@@ -742,6 +803,11 @@ fs::file::file(const std::string& path, bs_t<open_mode> mode)
|
||||
return info;
|
||||
}
|
||||
|
||||
void sync() override
|
||||
{
|
||||
verify("file::sync" HERE), FlushFileBuffers(m_handle);
|
||||
}
|
||||
|
||||
bool trunc(u64 length) override
|
||||
{
|
||||
LARGE_INTEGER old, pos;
|
||||
@@ -797,7 +863,11 @@ fs::file::file(const std::string& path, bs_t<open_mode> mode)
|
||||
whence == seek_end ? FILE_END :
|
||||
(fmt::throw_exception("Invalid whence (0x%x)" HERE, whence), 0);
|
||||
|
||||
verify("file::seek" HERE), SetFilePointerEx(m_handle, pos, &pos, mode);
|
||||
if (!SetFilePointerEx(m_handle, pos, &pos, mode))
|
||||
{
|
||||
g_tls_error = to_error(GetLastError());
|
||||
return -1;
|
||||
}
|
||||
|
||||
return pos.QuadPart;
|
||||
}
|
||||
@@ -863,6 +933,11 @@ fs::file::file(const std::string& path, bs_t<open_mode> mode)
|
||||
return info;
|
||||
}
|
||||
|
||||
void sync() override
|
||||
{
|
||||
verify("file::sync" HERE), ::fsync(m_fd) == 0;
|
||||
}
|
||||
|
||||
bool trunc(u64 length) override
|
||||
{
|
||||
if (::ftruncate(m_fd, length) != 0)
|
||||
@@ -899,7 +974,12 @@ fs::file::file(const std::string& path, bs_t<open_mode> mode)
|
||||
(fmt::throw_exception("Invalid whence (0x%x)" HERE, whence), 0);
|
||||
|
||||
const auto result = ::lseek(m_fd, offset, mode);
|
||||
verify("file::seek" HERE), result != -1;
|
||||
|
||||
if (result == -1)
|
||||
{
|
||||
g_tls_error = to_error(errno);
|
||||
return -1;
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
@@ -933,11 +1013,6 @@ fs::file::file(const void* ptr, std::size_t size)
|
||||
{
|
||||
}
|
||||
|
||||
fs::stat_t stat() override
|
||||
{
|
||||
fmt::raw_error("fs::file::memory_stream::stat(): not supported");
|
||||
}
|
||||
|
||||
bool trunc(u64 length) override
|
||||
{
|
||||
return false;
|
||||
@@ -966,11 +1041,20 @@ fs::file::file(const void* ptr, std::size_t size)
|
||||
|
||||
u64 seek(s64 offset, fs::seek_mode whence) override
|
||||
{
|
||||
return
|
||||
whence == fs::seek_set ? m_pos = offset :
|
||||
whence == fs::seek_cur ? m_pos = offset + m_pos :
|
||||
whence == fs::seek_end ? m_pos = offset + m_size :
|
||||
const s64 new_pos =
|
||||
whence == fs::seek_set ? offset :
|
||||
whence == fs::seek_cur ? offset + m_pos :
|
||||
whence == fs::seek_end ? offset + size() :
|
||||
(fmt::raw_error("fs::file::memory_stream::seek(): invalid whence"), 0);
|
||||
|
||||
if (new_pos < 0)
|
||||
{
|
||||
fs::g_tls_error = fs::error::inval;
|
||||
return -1;
|
||||
}
|
||||
|
||||
m_pos = new_pos;
|
||||
return m_pos;
|
||||
}
|
||||
|
||||
u64 size() override
|
||||
@@ -1313,6 +1397,7 @@ void fmt_class_string<fs::error>::format(std::string& out, u64 arg)
|
||||
case fs::error::inval: return "Invalid arguments";
|
||||
case fs::error::noent: return "Not found";
|
||||
case fs::error::exist: return "Already exists";
|
||||
case fs::error::acces: return "Access violation";
|
||||
}
|
||||
|
||||
return unknown;
|
||||
|
||||
+48
-10
@@ -60,7 +60,8 @@ namespace fs
|
||||
{
|
||||
virtual ~file_base();
|
||||
|
||||
virtual stat_t stat() = 0;
|
||||
virtual stat_t stat();
|
||||
virtual void sync();
|
||||
virtual bool trunc(u64 length) = 0;
|
||||
virtual u64 read(void* buffer, u64 size) = 0;
|
||||
virtual u64 write(const void* buffer, u64 size) = 0;
|
||||
@@ -83,12 +84,22 @@ namespace fs
|
||||
virtual void rewind() = 0;
|
||||
};
|
||||
|
||||
// Device information
|
||||
struct device_stat
|
||||
{
|
||||
u64 block_size;
|
||||
u64 total_size;
|
||||
u64 total_free; // Total size of free space
|
||||
u64 avail_free; // Free space available to unprivileged user
|
||||
};
|
||||
|
||||
// Virtual device
|
||||
struct device_base
|
||||
{
|
||||
virtual ~device_base();
|
||||
|
||||
virtual bool stat(const std::string& path, stat_t& info) = 0;
|
||||
virtual bool statfs(const std::string& path, device_stat& info) = 0;
|
||||
virtual bool remove_dir(const std::string& path) = 0;
|
||||
virtual bool create_dir(const std::string& path) = 0;
|
||||
virtual bool rename(const std::string& from, const std::string& to) = 0;
|
||||
@@ -121,6 +132,9 @@ namespace fs
|
||||
// Check whether the directory exists and is NOT a file
|
||||
bool is_dir(const std::string& path);
|
||||
|
||||
// Get filesystem information
|
||||
bool statfs(const std::string& path, device_stat& info);
|
||||
|
||||
// Delete empty directory
|
||||
bool remove_dir(const std::string& path);
|
||||
|
||||
@@ -206,6 +220,13 @@ namespace fs
|
||||
return m_file->stat();
|
||||
}
|
||||
|
||||
// Sync file buffers
|
||||
void sync() const
|
||||
{
|
||||
if (!m_file) xnull();
|
||||
return m_file->sync();
|
||||
}
|
||||
|
||||
// Read the data from the file and return the amount of data written in buffer
|
||||
u64 read(void* buffer, u64 count) const
|
||||
{
|
||||
@@ -488,11 +509,6 @@ namespace fs
|
||||
{
|
||||
}
|
||||
|
||||
stat_t stat() override
|
||||
{
|
||||
fmt::raw_error("fs::container_stream<>::stat(): not supported");
|
||||
}
|
||||
|
||||
bool trunc(u64 length) override
|
||||
{
|
||||
obj.resize(length);
|
||||
@@ -547,11 +563,20 @@ namespace fs
|
||||
|
||||
u64 seek(s64 offset, seek_mode whence) override
|
||||
{
|
||||
return
|
||||
whence == fs::seek_set ? pos = offset :
|
||||
whence == fs::seek_cur ? pos = offset + pos :
|
||||
whence == fs::seek_end ? pos = offset + size() :
|
||||
const s64 new_pos =
|
||||
whence == fs::seek_set ? offset :
|
||||
whence == fs::seek_cur ? offset + pos :
|
||||
whence == fs::seek_end ? offset + size() :
|
||||
(fmt::raw_error("fs::container_stream<>::seek(): invalid whence"), 0);
|
||||
|
||||
if (new_pos < 0)
|
||||
{
|
||||
fs::g_tls_error = fs::error::inval;
|
||||
return -1;
|
||||
}
|
||||
|
||||
pos = new_pos;
|
||||
return pos;
|
||||
}
|
||||
|
||||
u64 size() override
|
||||
@@ -567,4 +592,17 @@ namespace fs
|
||||
result.reset(std::make_unique<container_stream<T>>(std::forward<T>(container)));
|
||||
return result;
|
||||
}
|
||||
|
||||
template <typename... Args>
|
||||
bool write_file(const std::string& path, bs_t<fs::open_mode> mode, const Args&... args)
|
||||
{
|
||||
if (fs::file f{path, mode})
|
||||
{
|
||||
// Write args sequentially
|
||||
int seq[]{ (f.write(args), 0)... };
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,817 @@
|
||||
#include "stdafx.h"
|
||||
#ifdef WITH_GDB_DEBUGGER
|
||||
|
||||
#include "GDBDebugServer.h"
|
||||
#include "Log.h"
|
||||
#include <algorithm>
|
||||
#include "Emu/Memory/Memory.h"
|
||||
#include "Emu/System.h"
|
||||
#include "Emu/IdManager.h"
|
||||
#include "Emu/CPU/CPUThread.h"
|
||||
#include "Emu/Cell/PPUThread.h"
|
||||
#include "Emu/Cell/RawSPUThread.h"
|
||||
#include "Emu/Cell/SPUThread.h"
|
||||
|
||||
#ifndef _WIN32
|
||||
#include"fcntl.h"
|
||||
#endif
|
||||
|
||||
extern void ppu_set_breakpoint(u32 addr);
|
||||
extern void ppu_remove_breakpoint(u32 addr);
|
||||
|
||||
logs::channel gdbDebugServer("gdbDebugServer");
|
||||
|
||||
int sock_init(void)
|
||||
{
|
||||
#ifdef _WIN32
|
||||
WSADATA wsa_data;
|
||||
return WSAStartup(MAKEWORD(1, 1), &wsa_data);
|
||||
#else
|
||||
return 0;
|
||||
#endif
|
||||
}
|
||||
|
||||
int sock_quit(void)
|
||||
{
|
||||
#ifdef _WIN32
|
||||
return WSACleanup();
|
||||
#else
|
||||
return 0;
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifndef _WIN32
|
||||
int closesocket(socket_t s) {
|
||||
return close(s);
|
||||
}
|
||||
const int SOCKET_ERROR = -1;
|
||||
const socket_t INVALID_SOCKET = -1;
|
||||
#define sscanf_s sscanf
|
||||
#define HEX_U32 "x"
|
||||
#define HEX_U64 "lx"
|
||||
#else
|
||||
#define HEX_U32 "lx"
|
||||
#define HEX_U64 "llx"
|
||||
#endif
|
||||
|
||||
bool check_errno_again() {
|
||||
#ifdef _WIN32
|
||||
int err = GetLastError();
|
||||
return (err == WSAEWOULDBLOCK);
|
||||
#else
|
||||
int err = errno;
|
||||
return (err == EAGAIN) || (err == EWOULDBLOCK);
|
||||
#endif
|
||||
}
|
||||
|
||||
std::string u32_to_hex(u32 i) {
|
||||
return fmt::format("%" HEX_U32, i);
|
||||
}
|
||||
|
||||
std::string u64_to_padded_hex(u64 value) {
|
||||
return fmt::format("%.16" HEX_U64, value);
|
||||
}
|
||||
|
||||
std::string u32_to_padded_hex(u32 value) {
|
||||
return fmt::format("%.8" HEX_U32, value);
|
||||
}
|
||||
|
||||
u8 hex_to_u8(std::string val) {
|
||||
u8 result;
|
||||
sscanf_s(val.c_str(), "%02hhX", &result);
|
||||
return result;
|
||||
}
|
||||
|
||||
u32 hex_to_u32(std::string val) {
|
||||
u32 result;
|
||||
sscanf_s(val.c_str(), "%" HEX_U32, &result);
|
||||
return result;
|
||||
}
|
||||
|
||||
u64 hex_to_u64(std::string val) {
|
||||
u64 result;
|
||||
sscanf_s(val.c_str(), "%" HEX_U64, &result);
|
||||
return result;
|
||||
}
|
||||
|
||||
void GDBDebugServer::start_server()
|
||||
{
|
||||
server_socket = socket(AF_INET, SOCK_STREAM, 0);
|
||||
|
||||
if (server_socket == INVALID_SOCKET) {
|
||||
gdbDebugServer.error("Error creating server socket");
|
||||
return;
|
||||
}
|
||||
|
||||
#ifdef WIN32
|
||||
{
|
||||
int mode = 1;
|
||||
ioctlsocket(server_socket, FIONBIO, (u_long FAR *)&mode);
|
||||
}
|
||||
#else
|
||||
fcntl(server_socket, F_SETFL, fcntl(server_socket, F_GETFL) | O_NONBLOCK);
|
||||
#endif
|
||||
|
||||
int err;
|
||||
|
||||
sockaddr_in server_saddr;
|
||||
server_saddr.sin_family = AF_INET;
|
||||
int port = g_cfg.misc.gdb_server_port;
|
||||
server_saddr.sin_port = htons(port);
|
||||
server_saddr.sin_addr.s_addr = htonl(INADDR_ANY);
|
||||
|
||||
err = bind(server_socket, (struct sockaddr *) &server_saddr, sizeof(server_saddr));
|
||||
if (err == SOCKET_ERROR) {
|
||||
gdbDebugServer.error("Error binding to port %d", port);
|
||||
return;
|
||||
}
|
||||
|
||||
err = listen(server_socket, 1);
|
||||
if (err == SOCKET_ERROR) {
|
||||
gdbDebugServer.error("Error listening on port %d", port);
|
||||
return;
|
||||
}
|
||||
|
||||
gdbDebugServer.success("GDB Debug Server listening on port %d", port);
|
||||
}
|
||||
|
||||
int GDBDebugServer::read(void * buf, int cnt)
|
||||
{
|
||||
while (!stop) {
|
||||
int result = recv(client_socket, reinterpret_cast<char*>(buf), cnt, 0);
|
||||
|
||||
if (result == SOCKET_ERROR) {
|
||||
if (check_errno_again()) {
|
||||
thread_ctrl::wait_for(50);
|
||||
continue;
|
||||
}
|
||||
|
||||
gdbDebugServer.error("Error during socket read");
|
||||
fmt::throw_exception("Error during socket read" HERE);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
char GDBDebugServer::read_char()
|
||||
{
|
||||
char result;
|
||||
int cnt = read(&result, 1);
|
||||
if (!cnt) {
|
||||
fmt::throw_exception("Tried to read char, but no data was available" HERE);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
u8 GDBDebugServer::read_hexbyte()
|
||||
{
|
||||
char buf[2];
|
||||
read(buf, 2);
|
||||
return static_cast<u8>(strtol(buf, nullptr, 16));
|
||||
}
|
||||
|
||||
void GDBDebugServer::try_read_cmd(gdb_cmd & out_cmd)
|
||||
{
|
||||
char c = read_char();
|
||||
//interrupt
|
||||
if (UNLIKELY(c == 0x03)) {
|
||||
out_cmd.cmd = "\0x03";
|
||||
out_cmd.data = "";
|
||||
out_cmd.checksum = 0;
|
||||
return;
|
||||
}
|
||||
if (UNLIKELY(c != '$')) {
|
||||
//gdb starts conversation with + for some reason
|
||||
if (c == '+') {
|
||||
c = read_char();
|
||||
}
|
||||
if (c != '$') {
|
||||
fmt::throw_exception("Expected start of packet character '$', got '%c' instead" HERE, c);
|
||||
}
|
||||
}
|
||||
//clear packet data
|
||||
out_cmd.cmd = "";
|
||||
out_cmd.data = "";
|
||||
out_cmd.checksum = 0;
|
||||
bool cmd_part = true;
|
||||
u8 checksum = 0;
|
||||
while(true) {
|
||||
c = read_char();
|
||||
if (c == '#') {
|
||||
break;
|
||||
}
|
||||
checksum = (checksum + reinterpret_cast<u8&>(c)) % 256;
|
||||
//escaped char
|
||||
if (c == '}') {
|
||||
c = read_char() ^ 0x20;
|
||||
checksum = (checksum + reinterpret_cast<u8&>(c)) % 256;
|
||||
}
|
||||
//cmd-data splitters
|
||||
if (cmd_part && ((c == ':') || (c == '.') || (c == ';'))) {
|
||||
cmd_part = false;
|
||||
}
|
||||
if (cmd_part) {
|
||||
out_cmd.cmd += c;
|
||||
//only q and v commands can have multi-char command
|
||||
if ((out_cmd.cmd.length() == 1) && (c != 'q') && (c != 'v')) {
|
||||
cmd_part = false;
|
||||
}
|
||||
} else {
|
||||
out_cmd.data += c;
|
||||
}
|
||||
}
|
||||
out_cmd.checksum = read_hexbyte();
|
||||
if (out_cmd.checksum != checksum) {
|
||||
throw new wrong_checksum_exception("Wrong checksum for packet" HERE);
|
||||
}
|
||||
}
|
||||
|
||||
bool GDBDebugServer::read_cmd(gdb_cmd & out_cmd)
|
||||
{
|
||||
while (true) {
|
||||
try {
|
||||
try_read_cmd(out_cmd);
|
||||
ack(true);
|
||||
return true;
|
||||
}
|
||||
catch (wrong_checksum_exception) {
|
||||
ack(false);
|
||||
}
|
||||
catch (std::runtime_error e) {
|
||||
gdbDebugServer.error(e.what());
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void GDBDebugServer::send(const char * buf, int cnt)
|
||||
{
|
||||
gdbDebugServer.trace("Sending %s (%d bytes)", buf, cnt);
|
||||
while (!stop) {
|
||||
int res = ::send(client_socket, buf, cnt, 0);
|
||||
if (res == SOCKET_ERROR) {
|
||||
if (check_errno_again()) {
|
||||
thread_ctrl::wait_for(50);
|
||||
continue;
|
||||
}
|
||||
gdbDebugServer.error("Failed sending %d bytes", cnt);
|
||||
return;
|
||||
}
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
void GDBDebugServer::send_char(char c)
|
||||
{
|
||||
send(&c, 1);
|
||||
}
|
||||
|
||||
void GDBDebugServer::ack(bool accepted)
|
||||
{
|
||||
send_char(accepted ? '+' : '-');
|
||||
}
|
||||
|
||||
void GDBDebugServer::send_cmd(const std::string & cmd)
|
||||
{
|
||||
u8 checksum = 0;
|
||||
std::string buf;
|
||||
buf.reserve(cmd.length() + 4);
|
||||
buf += "$";
|
||||
for (int i = 0; i < cmd.length(); ++i) {
|
||||
checksum = (checksum + append_encoded_char(cmd[i], buf)) % 256;
|
||||
}
|
||||
buf += "#";
|
||||
buf += to_hexbyte(checksum);
|
||||
send(buf.c_str(), static_cast<int>(buf.length()));
|
||||
}
|
||||
|
||||
bool GDBDebugServer::send_cmd_ack(const std::string & cmd)
|
||||
{
|
||||
while (true) {
|
||||
send_cmd(cmd);
|
||||
char c = read_char();
|
||||
if (LIKELY(c == '+')) {
|
||||
return true;
|
||||
}
|
||||
if (UNLIKELY(c != '-')) {
|
||||
gdbDebugServer.error("Wrong acknowledge character received %c", c);
|
||||
return false;
|
||||
}
|
||||
gdbDebugServer.warning("Client rejected our cmd");
|
||||
}
|
||||
}
|
||||
|
||||
u8 GDBDebugServer::append_encoded_char(char c, std::string & str)
|
||||
{
|
||||
u8 checksum = 0;
|
||||
if (UNLIKELY((c == '#') || (c == '$') || (c == '}'))) {
|
||||
str += '}';
|
||||
c ^= 0x20;
|
||||
checksum = '}';
|
||||
}
|
||||
checksum = (checksum + reinterpret_cast<u8&>(c)) % 256;
|
||||
str += c;
|
||||
return checksum;
|
||||
}
|
||||
|
||||
std::string GDBDebugServer::to_hexbyte(u8 i)
|
||||
{
|
||||
std::string result = "00";
|
||||
u8 i1 = i & 0xF;
|
||||
u8 i2 = i >> 4;
|
||||
result[0] = i2 > 9 ? 'a' + i2 - 10 : '0' + i2;
|
||||
result[1] = i1 > 9 ? 'a' + i1 - 10 : '0' + i1;
|
||||
return result;
|
||||
}
|
||||
|
||||
bool GDBDebugServer::select_thread(u64 id)
|
||||
{
|
||||
//in case we have none at all
|
||||
selected_thread.reset();
|
||||
const auto on_select = [&](u32, cpu_thread& cpu)
|
||||
{
|
||||
return (id == ALL_THREADS) || (id == ANY_THREAD) || (cpu.id == id);
|
||||
};
|
||||
if (auto ppu = idm::select<ppu_thread>(on_select)) {
|
||||
selected_thread = ppu.ptr;
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
std::string GDBDebugServer::get_reg(std::shared_ptr<ppu_thread> thread, u32 rid)
|
||||
{
|
||||
std::string result;
|
||||
//ids from gdb/features/rs6000/powerpc-64.c
|
||||
//pc
|
||||
switch (rid) {
|
||||
case 64:
|
||||
return u64_to_padded_hex(thread->cia);
|
||||
//msr?
|
||||
case 65:
|
||||
return std::string(16, 'x');
|
||||
case 66:
|
||||
return u32_to_padded_hex(thread->cr_pack());
|
||||
case 67:
|
||||
return u64_to_padded_hex(thread->lr);
|
||||
case 68:
|
||||
return u64_to_padded_hex(thread->ctr);
|
||||
//xer
|
||||
case 69:
|
||||
return std::string(8, 'x');
|
||||
//fpscr
|
||||
case 70:
|
||||
return std::string(8, 'x');
|
||||
default:
|
||||
if (rid > 70) return "";
|
||||
return (rid > 31)
|
||||
? u64_to_padded_hex(reinterpret_cast<u64&>(thread->fpr[rid - 32])) //fpr
|
||||
: u64_to_padded_hex(thread->gpr[rid]); //gpr
|
||||
}
|
||||
}
|
||||
|
||||
bool GDBDebugServer::set_reg(std::shared_ptr<ppu_thread> thread, u32 rid, std::string value)
|
||||
{
|
||||
switch (rid) {
|
||||
case 64:
|
||||
thread->cia = static_cast<u32>(hex_to_u64(value));
|
||||
return true;
|
||||
//msr?
|
||||
case 65:
|
||||
return true;
|
||||
case 66:
|
||||
thread->cr_unpack(hex_to_u32(value));
|
||||
return true;
|
||||
case 67:
|
||||
thread->lr = hex_to_u64(value);
|
||||
return true;
|
||||
case 68:
|
||||
thread->ctr = hex_to_u64(value);
|
||||
return true;
|
||||
//xer
|
||||
case 69:
|
||||
return true;
|
||||
//fpscr
|
||||
case 70:
|
||||
return true;
|
||||
default:
|
||||
if (rid > 70) return false;
|
||||
if (rid > 31) {
|
||||
u64 val = hex_to_u64(value);
|
||||
thread->fpr[rid - 32] = reinterpret_cast<f64&>(val);
|
||||
} else {
|
||||
thread->gpr[rid] = hex_to_u64(value);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
u32 GDBDebugServer::get_reg_size(std::shared_ptr<ppu_thread> thread, u32 rid)
|
||||
{
|
||||
switch (rid) {
|
||||
case 66:
|
||||
case 69:
|
||||
case 70:
|
||||
return 4;
|
||||
default:
|
||||
if (rid > 70) {
|
||||
return 0;
|
||||
}
|
||||
return 8;
|
||||
}
|
||||
}
|
||||
|
||||
bool GDBDebugServer::send_reason()
|
||||
{
|
||||
return send_cmd_ack("S05");
|
||||
}
|
||||
|
||||
bool GDBDebugServer::cmd_extended_mode(gdb_cmd & cmd)
|
||||
{
|
||||
return send_cmd_ack("OK");
|
||||
}
|
||||
|
||||
bool GDBDebugServer::cmd_reason(gdb_cmd & cmd)
|
||||
{
|
||||
return send_reason();
|
||||
}
|
||||
|
||||
bool GDBDebugServer::cmd_supported(gdb_cmd & cmd)
|
||||
{
|
||||
return send_cmd_ack("PacketSize=1200");
|
||||
}
|
||||
|
||||
bool GDBDebugServer::cmd_thread_info(gdb_cmd & cmd)
|
||||
{
|
||||
std::string result = "";
|
||||
const auto on_select = [&](u32, cpu_thread& cpu)
|
||||
{
|
||||
if (result.length()) {
|
||||
result += ",";
|
||||
}
|
||||
result += u64_to_padded_hex(static_cast<u64>(cpu.id));
|
||||
};
|
||||
idm::select<ppu_thread>(on_select);
|
||||
idm::select<ARMv7Thread>(on_select);
|
||||
idm::select<RawSPUThread>(on_select);
|
||||
idm::select<SPUThread>(on_select);
|
||||
|
||||
//todo: this may exceed max command length
|
||||
result = "m" + result + "l";
|
||||
|
||||
return send_cmd_ack(result);;
|
||||
}
|
||||
|
||||
bool GDBDebugServer::cmd_current_thread(gdb_cmd & cmd)
|
||||
{
|
||||
return send_cmd_ack(selected_thread.expired() ? "" : u64_to_padded_hex(selected_thread.lock()->id));
|
||||
}
|
||||
|
||||
bool GDBDebugServer::cmd_read_register(gdb_cmd & cmd)
|
||||
{
|
||||
select_thread(general_ops_thread_id);
|
||||
auto th = selected_thread.lock();
|
||||
if (th->id_type() == 1) {
|
||||
auto ppu = std::static_pointer_cast<ppu_thread>(th);
|
||||
u32 rid = hex_to_u32(cmd.data);
|
||||
std::string result = get_reg(ppu, rid);
|
||||
if (!result.length()) {
|
||||
gdbDebugServer.warning("Wrong register id %d", rid);
|
||||
return send_cmd_ack("E01");
|
||||
}
|
||||
return send_cmd_ack(result);
|
||||
}
|
||||
gdbDebugServer.warning("Unimplemented thread type %d", th->id_type());
|
||||
return send_cmd_ack("");
|
||||
}
|
||||
|
||||
bool GDBDebugServer::cmd_write_register(gdb_cmd & cmd)
|
||||
{
|
||||
select_thread(general_ops_thread_id);
|
||||
auto th = selected_thread.lock();
|
||||
if (th->id_type() == 1) {
|
||||
auto ppu = std::static_pointer_cast<ppu_thread>(th);
|
||||
size_t eq_pos = cmd.data.find('=');
|
||||
if (eq_pos == std::string::npos) {
|
||||
gdbDebugServer.warning("Wrong write_register cmd data %s", cmd.data.c_str());
|
||||
return send_cmd_ack("E02");
|
||||
}
|
||||
u32 rid = hex_to_u32(cmd.data.substr(0, eq_pos));
|
||||
std::string value = cmd.data.substr(eq_pos + 1);
|
||||
if (!set_reg(ppu, rid, value)) {
|
||||
gdbDebugServer.warning("Wrong register id %d", rid);
|
||||
return send_cmd_ack("E01");
|
||||
}
|
||||
return send_cmd_ack("OK");
|
||||
}
|
||||
gdbDebugServer.warning("Unimplemented thread type %d", th->id_type());
|
||||
return send_cmd_ack("");
|
||||
}
|
||||
|
||||
bool GDBDebugServer::cmd_read_memory(gdb_cmd & cmd)
|
||||
{
|
||||
size_t s = cmd.data.find(',');
|
||||
u32 addr = hex_to_u32(cmd.data.substr(0, s));
|
||||
u32 len = hex_to_u32(cmd.data.substr(s + 1));
|
||||
std::string result;
|
||||
result.reserve(len * 2);
|
||||
for (u32 i = 0; i < len; ++i) {
|
||||
if (vm::check_addr(addr + i)) {
|
||||
result += to_hexbyte(vm::read8(addr + i));
|
||||
} else {
|
||||
break;
|
||||
//result += "xx";
|
||||
}
|
||||
}
|
||||
if (len && !result.length()) {
|
||||
//nothing read
|
||||
return send_cmd_ack("E01");
|
||||
}
|
||||
return send_cmd_ack(result);
|
||||
}
|
||||
|
||||
bool GDBDebugServer::cmd_write_memory(gdb_cmd & cmd)
|
||||
{
|
||||
size_t s = cmd.data.find(',');
|
||||
size_t s2 = cmd.data.find(':');
|
||||
if ((s == std::string::npos) || (s2 == std::string::npos)) {
|
||||
gdbDebugServer.warning("Malformed write memory request received: %s", cmd.data.c_str());
|
||||
return send_cmd_ack("E01");
|
||||
}
|
||||
u32 addr = hex_to_u32(cmd.data.substr(0, s));
|
||||
u32 len = hex_to_u32(cmd.data.substr(s + 1, s2 - s - 1));
|
||||
const char* data_ptr = (cmd.data.c_str()) + s2 + 1;
|
||||
for (u32 i = 0; i < len; ++i) {
|
||||
if (vm::check_addr(addr + i)) {
|
||||
u8 val;
|
||||
int res = sscanf_s(data_ptr, "%02hhX", &val);
|
||||
if (!res) {
|
||||
gdbDebugServer.warning("Couldn't read u8 from string %s", data_ptr);
|
||||
return send_cmd_ack("E02");
|
||||
}
|
||||
data_ptr += 2;
|
||||
vm::write8(addr + i, val);
|
||||
} else {
|
||||
return send_cmd_ack("E03");
|
||||
}
|
||||
}
|
||||
return send_cmd_ack("OK");
|
||||
}
|
||||
|
||||
bool GDBDebugServer::cmd_read_all_registers(gdb_cmd & cmd)
|
||||
{
|
||||
std::string result;
|
||||
select_thread(general_ops_thread_id);
|
||||
|
||||
auto th = selected_thread.lock();
|
||||
if (th->id_type() == 1) {
|
||||
auto ppu = std::static_pointer_cast<ppu_thread>(th);
|
||||
//68 64-bit registers, and 3 32-bit
|
||||
result.reserve(68*16 + 3*8);
|
||||
for (int i = 0; i < 71; ++i) {
|
||||
result += get_reg(ppu, i);
|
||||
}
|
||||
return send_cmd_ack(result);
|
||||
}
|
||||
gdbDebugServer.warning("Unimplemented thread type %d", th->id_type());
|
||||
return send_cmd_ack("");
|
||||
}
|
||||
|
||||
bool GDBDebugServer::cmd_write_all_registers(gdb_cmd & cmd)
|
||||
{
|
||||
select_thread(general_ops_thread_id);
|
||||
auto th = selected_thread.lock();
|
||||
if (th->id_type() == 1) {
|
||||
auto ppu = std::static_pointer_cast<ppu_thread>(th);
|
||||
int ptr = 0;
|
||||
for (int i = 0; i < 71; ++i) {
|
||||
int sz = get_reg_size(ppu, i);
|
||||
set_reg(ppu, i, cmd.data.substr(ptr, sz * 2));
|
||||
ptr += sz * 2;
|
||||
}
|
||||
return send_cmd_ack("OK");
|
||||
}
|
||||
gdbDebugServer.warning("Unimplemented thread type %d", th->id_type());
|
||||
return send_cmd_ack("E01");
|
||||
}
|
||||
|
||||
bool GDBDebugServer::cmd_set_thread_ops(gdb_cmd & cmd)
|
||||
{
|
||||
char type = cmd.data[0];
|
||||
std::string thread = cmd.data.substr(1);
|
||||
u64 id = thread == "-1" ? ALL_THREADS : hex_to_u64(thread);
|
||||
if (type == 'c') {
|
||||
continue_ops_thread_id = id;
|
||||
} else {
|
||||
general_ops_thread_id = id;
|
||||
}
|
||||
if (select_thread(id)) {
|
||||
return send_cmd_ack("OK");
|
||||
}
|
||||
gdbDebugServer.warning("Client asked to use thread %llx for %s, but no matching thread was found", id, type == 'c' ? "continue ops" : "general ops");
|
||||
return send_cmd_ack("E01");
|
||||
}
|
||||
|
||||
bool GDBDebugServer::cmd_attached_to_what(gdb_cmd & cmd)
|
||||
{
|
||||
//creating processes from client is not available yet
|
||||
return send_cmd_ack("1");
|
||||
}
|
||||
|
||||
bool GDBDebugServer::cmd_kill(gdb_cmd & cmd)
|
||||
{
|
||||
Emu.Stop();
|
||||
return true;
|
||||
}
|
||||
|
||||
bool GDBDebugServer::cmd_continue_support(gdb_cmd & cmd)
|
||||
{
|
||||
return send_cmd_ack("vCont;c;s;C;S");
|
||||
}
|
||||
|
||||
bool GDBDebugServer::cmd_vcont(gdb_cmd & cmd)
|
||||
{
|
||||
//todo: handle multiple actions and thread ids
|
||||
this->from_breakpoint = false;
|
||||
if (cmd.data[1] == 'c') {
|
||||
select_thread(continue_ops_thread_id);
|
||||
auto ppu = std::static_pointer_cast<ppu_thread>(selected_thread.lock());
|
||||
ppu->state -= cpu_flag::dbg_pause;
|
||||
if (Emu.IsPaused()) {
|
||||
Emu.Resume();
|
||||
}
|
||||
thread_ctrl::wait();
|
||||
//we are in all-stop mode
|
||||
Emu.Pause();
|
||||
return send_reason();
|
||||
} else if (cmd.data[1] == 's') {
|
||||
select_thread(continue_ops_thread_id);
|
||||
auto ppu = std::static_pointer_cast<ppu_thread>(selected_thread.lock());
|
||||
ppu->state += cpu_flag::dbg_step;
|
||||
ppu->state -= cpu_flag::dbg_pause;
|
||||
if (Emu.IsPaused()) {
|
||||
Emu.Resume();
|
||||
} else {
|
||||
ppu->notify();
|
||||
}
|
||||
thread_ctrl::wait();
|
||||
//we are in all-stop mode
|
||||
Emu.Pause();
|
||||
return send_reason();
|
||||
}
|
||||
return send_cmd_ack("");
|
||||
}
|
||||
|
||||
static const u32 INVALID_PTR = 0xffffffff;
|
||||
|
||||
bool GDBDebugServer::cmd_set_breakpoint(gdb_cmd & cmd)
|
||||
{
|
||||
char type = cmd.data[0];
|
||||
//software breakpoint
|
||||
if (type == '0') {
|
||||
u32 addr = INVALID_PTR;
|
||||
if (cmd.data.find(';') != std::string::npos) {
|
||||
gdbDebugServer.warning("Received request to set breakpoint with condition, but they are not supported");
|
||||
return send_cmd_ack("E01");
|
||||
}
|
||||
sscanf_s(cmd.data.c_str(), "0,%x", &addr);
|
||||
if (addr == INVALID_PTR) {
|
||||
gdbDebugServer.warning("Can't parse breakpoint request, data: %s", cmd.data.c_str());
|
||||
return send_cmd_ack("E02");
|
||||
}
|
||||
ppu_set_breakpoint(addr);
|
||||
return send_cmd_ack("OK");
|
||||
}
|
||||
//other breakpoint types are not supported
|
||||
return send_cmd_ack("");
|
||||
}
|
||||
|
||||
bool GDBDebugServer::cmd_remove_breakpoint(gdb_cmd & cmd)
|
||||
{
|
||||
char type = cmd.data[0];
|
||||
//software breakpoint
|
||||
if (type == '0') {
|
||||
u32 addr = INVALID_PTR;
|
||||
sscanf_s(cmd.data.c_str(), "0,%x", &addr);
|
||||
if (addr == INVALID_PTR) {
|
||||
gdbDebugServer.warning("Can't parse breakpoint remove request, data: %s", cmd.data.c_str());
|
||||
return send_cmd_ack("E01");
|
||||
}
|
||||
ppu_remove_breakpoint(addr);
|
||||
return send_cmd_ack("OK");
|
||||
}
|
||||
//other breakpoint types are not supported
|
||||
return send_cmd_ack("");
|
||||
|
||||
}
|
||||
|
||||
#define PROCESS_CMD(cmds,handler) if (cmd.cmd == cmds) { if (!handler(cmd)) break; else continue; }
|
||||
|
||||
void GDBDebugServer::on_task()
|
||||
{
|
||||
sock_init();
|
||||
|
||||
start_server();
|
||||
|
||||
while (!stop) {
|
||||
sockaddr_in client;
|
||||
socklen_t client_len = sizeof(client);
|
||||
client_socket = accept(server_socket, (struct sockaddr *) &client, &client_len);
|
||||
|
||||
if (client_socket == INVALID_SOCKET) {
|
||||
if (check_errno_again()) {
|
||||
thread_ctrl::wait_for(50);
|
||||
continue;
|
||||
}
|
||||
|
||||
gdbDebugServer.error("Could not establish new connection\n");
|
||||
return;
|
||||
}
|
||||
//stop immediately
|
||||
Emu.Pause();
|
||||
|
||||
try {
|
||||
char hostbuf[32];
|
||||
inet_ntop(client.sin_family, reinterpret_cast<void*>(&client.sin_addr), hostbuf, 32);
|
||||
gdbDebugServer.success("Got connection to GDB debug server from %s:%d", hostbuf, client.sin_port);
|
||||
|
||||
gdb_cmd cmd;
|
||||
|
||||
while (!stop) {
|
||||
if (!read_cmd(cmd)) {
|
||||
break;
|
||||
}
|
||||
gdbDebugServer.trace("Command %s with data %s received", cmd.cmd.c_str(), cmd.data.c_str());
|
||||
PROCESS_CMD("!", cmd_extended_mode);
|
||||
PROCESS_CMD("?", cmd_reason);
|
||||
PROCESS_CMD("qSupported", cmd_supported);
|
||||
PROCESS_CMD("qfThreadInfo", cmd_thread_info);
|
||||
PROCESS_CMD("qC", cmd_current_thread);
|
||||
PROCESS_CMD("p", cmd_read_register);
|
||||
PROCESS_CMD("P", cmd_write_register);
|
||||
PROCESS_CMD("m", cmd_read_memory);
|
||||
PROCESS_CMD("M", cmd_write_memory);
|
||||
PROCESS_CMD("g", cmd_read_all_registers);
|
||||
PROCESS_CMD("G", cmd_write_all_registers);
|
||||
PROCESS_CMD("H", cmd_set_thread_ops);
|
||||
PROCESS_CMD("qAttached", cmd_attached_to_what);
|
||||
PROCESS_CMD("k", cmd_kill);
|
||||
PROCESS_CMD("vCont?", cmd_continue_support);
|
||||
PROCESS_CMD("vCont", cmd_vcont);
|
||||
PROCESS_CMD("z", cmd_remove_breakpoint);
|
||||
PROCESS_CMD("Z", cmd_set_breakpoint);
|
||||
|
||||
gdbDebugServer.trace("Unsupported command received %s", cmd.cmd.c_str());
|
||||
if (!send_cmd_ack("")) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (std::runtime_error& e)
|
||||
{
|
||||
if (client_socket) {
|
||||
closesocket(client_socket);
|
||||
client_socket = 0;
|
||||
}
|
||||
gdbDebugServer.error(e.what());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#undef PROCESS_CMD
|
||||
|
||||
void GDBDebugServer::on_exit()
|
||||
{
|
||||
if (server_socket) {
|
||||
closesocket(server_socket);
|
||||
}
|
||||
if (client_socket) {
|
||||
closesocket(client_socket);
|
||||
}
|
||||
sock_quit();
|
||||
}
|
||||
|
||||
std::string GDBDebugServer::get_name() const
|
||||
{
|
||||
return "GDBDebugger";
|
||||
}
|
||||
|
||||
void GDBDebugServer::on_stop()
|
||||
{
|
||||
this->stop = true;
|
||||
//just in case we are waiting for breakpoint
|
||||
this->notify();
|
||||
named_thread::on_stop();
|
||||
}
|
||||
|
||||
u32 g_gdb_debugger_id = 0;
|
||||
|
||||
#ifndef _WIN32
|
||||
#undef sscanf_s
|
||||
#endif
|
||||
|
||||
#undef HEX_U32
|
||||
#undef HEX_U64
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,131 @@
|
||||
#pragma once
|
||||
|
||||
#ifdef WITH_GDB_DEBUGGER
|
||||
|
||||
#include "Thread.h"
|
||||
#include <Emu/IdManager.h>
|
||||
#include "Emu/CPU/CPUThread.h"
|
||||
#include "Emu/Cell/PPUThread.h"
|
||||
|
||||
#ifdef _WIN32
|
||||
#include <winsock2.h>
|
||||
#include <WS2tcpip.h>
|
||||
#else
|
||||
#include <errno.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/socket.h>
|
||||
#include <netinet/in.h>
|
||||
#include <netinet/tcp.h>
|
||||
#include <arpa/inet.h>
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
|
||||
#ifdef _WIN32
|
||||
using socket_t = SOCKET;
|
||||
#else
|
||||
using socket_t = int;
|
||||
#endif
|
||||
|
||||
typedef struct gdb_cmd {
|
||||
std::string cmd;
|
||||
std::string data;
|
||||
u8 checksum;
|
||||
} gdb_cmd;
|
||||
|
||||
class wrong_checksum_exception : public std::runtime_error {
|
||||
public:
|
||||
wrong_checksum_exception(char const* const message) : runtime_error(message) {}
|
||||
};
|
||||
|
||||
const u64 ALL_THREADS = 0xffffffffffffffff;
|
||||
const u64 ANY_THREAD = 0;
|
||||
|
||||
class GDBDebugServer : public named_thread {
|
||||
|
||||
socket_t server_socket;
|
||||
socket_t client_socket;
|
||||
std::weak_ptr<cpu_thread> selected_thread;
|
||||
u64 continue_ops_thread_id = ANY_THREAD;
|
||||
u64 general_ops_thread_id = ANY_THREAD;
|
||||
|
||||
//initialize server socket and start listening
|
||||
void start_server();
|
||||
//read at most cnt bytes to buf, returns nubmer of bytes actually read
|
||||
int read(void* buf, int cnt);
|
||||
//reads one character
|
||||
char read_char();
|
||||
//reads pairs of hex characters and returns their integer value
|
||||
u8 read_hexbyte();
|
||||
//tries to read command, throws exceptions if anything goes wrong
|
||||
void try_read_cmd(gdb_cmd& out_cmd);
|
||||
//reads commands until receiveing one with valid checksum
|
||||
//in case of other exception (i.e. wrong first char of command)
|
||||
//it will log exception text and return false
|
||||
//in that case best for caller would be to stop reading, because
|
||||
//chance of getting correct command is low
|
||||
bool read_cmd(gdb_cmd& out_cmd);
|
||||
//send cnt bytes from buf to client
|
||||
void send(const char* buf, int cnt);
|
||||
//send character to client
|
||||
void send_char(char c);
|
||||
//acknowledge packet, either as accepted or declined
|
||||
void ack(bool accepted);
|
||||
//sends command body cmd to client
|
||||
void send_cmd(const std::string & cmd);
|
||||
//sends command to client until receives positive acknowledgement
|
||||
//returns false in case some error happened, and command wasn't sent
|
||||
bool send_cmd_ack(const std::string & cmd);
|
||||
//appends encoded char c to string str, and returns checksum. encoded byte can occupy 2 bytes
|
||||
static u8 append_encoded_char(char c, std::string& str);
|
||||
//convert u8 to 2 byte hexademical representation
|
||||
static std::string to_hexbyte(u8 i);
|
||||
//choose thread, support ALL_THREADS and ANY_THREAD values, returns true if some thread was selected
|
||||
bool select_thread(u64 id);
|
||||
//returns register value as hex string by register id (in gdb), in case of wrong id returns empty string
|
||||
static std::string get_reg(std::shared_ptr<ppu_thread> thread, u32 rid);
|
||||
//sets register value to hex string by register id (in gdb), in case of wrong id returns false
|
||||
static bool set_reg(std::shared_ptr<ppu_thread> thread, u32 rid, std::string value);
|
||||
//returns size of register with id rid in bytes, zero if invalid rid is provided
|
||||
static u32 get_reg_size(std::shared_ptr<ppu_thread> thread, u32 rid);
|
||||
//send reason of stop, returns false if sending response failed
|
||||
bool send_reason();
|
||||
|
||||
//commands
|
||||
bool cmd_extended_mode(gdb_cmd& cmd);
|
||||
bool cmd_reason(gdb_cmd& cmd);
|
||||
bool cmd_supported(gdb_cmd& cmd);
|
||||
bool cmd_thread_info(gdb_cmd& cmd);
|
||||
bool cmd_current_thread(gdb_cmd& cmd);
|
||||
bool cmd_read_register(gdb_cmd& cmd);
|
||||
bool cmd_write_register(gdb_cmd& cmd);
|
||||
bool cmd_read_memory(gdb_cmd& cmd);
|
||||
bool cmd_write_memory(gdb_cmd& cmd);
|
||||
bool cmd_read_all_registers(gdb_cmd& cmd);
|
||||
bool cmd_write_all_registers(gdb_cmd& cmd);
|
||||
bool cmd_set_thread_ops(gdb_cmd& cmd);
|
||||
bool cmd_attached_to_what(gdb_cmd& cmd);
|
||||
bool cmd_kill(gdb_cmd& cmd);
|
||||
bool cmd_continue_support(gdb_cmd& cmd);
|
||||
bool cmd_vcont(gdb_cmd& cmd);
|
||||
bool cmd_set_breakpoint(gdb_cmd& cmd);
|
||||
bool cmd_remove_breakpoint(gdb_cmd& cmd);
|
||||
|
||||
protected:
|
||||
void on_task() override final;
|
||||
void on_exit() override final;
|
||||
|
||||
public:
|
||||
static const u32 id_base = 1;
|
||||
static const u32 id_step = 1;
|
||||
static const u32 id_count = 0x100000;
|
||||
|
||||
bool from_breakpoint = true;
|
||||
bool stop = false;
|
||||
|
||||
virtual std::string get_name() const;
|
||||
virtual void on_stop() override final;
|
||||
};
|
||||
|
||||
extern u32 g_gdb_debugger_id;
|
||||
|
||||
#endif
|
||||
+313
-251
@@ -5,11 +5,14 @@
|
||||
#include <unordered_set>
|
||||
#include <set>
|
||||
#include <array>
|
||||
#include <deque>
|
||||
|
||||
#include "types.h"
|
||||
#include "StrFmt.h"
|
||||
#include "File.h"
|
||||
#include "Log.h"
|
||||
#include "mutex.h"
|
||||
#include "VirtualMemory.h"
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(push, 0)
|
||||
@@ -19,24 +22,19 @@
|
||||
#include "llvm/ExecutionEngine/ExecutionEngine.h"
|
||||
#include "llvm/ExecutionEngine/RTDyldMemoryManager.h"
|
||||
#include "llvm/ExecutionEngine/JITEventListener.h"
|
||||
#include "llvm/ExecutionEngine/ObjectCache.h"
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(pop)
|
||||
#endif
|
||||
|
||||
#ifdef _WIN32
|
||||
#include <Windows.h>
|
||||
#else
|
||||
#include <sys/mman.h>
|
||||
#include <sys/stat.h>
|
||||
#include <fcntl.h>
|
||||
#include <unistd.h>
|
||||
#include <sys/types.h>
|
||||
#endif
|
||||
|
||||
#include "JIT.h"
|
||||
|
||||
// Global LLVM context (thread-unsafe)
|
||||
llvm::LLVMContext g_llvm_ctx;
|
||||
// Memory manager mutex
|
||||
shared_mutex s_mutex;
|
||||
|
||||
// Size of virtual memory area reserved: 512 MB
|
||||
static const u64 s_memory_size = 0x20000000;
|
||||
@@ -44,38 +42,59 @@ static const u64 s_memory_size = 0x20000000;
|
||||
// Try to reserve a portion of virtual memory in the first 2 GB address space beforehand, if possible.
|
||||
static void* const s_memory = []() -> void*
|
||||
{
|
||||
#ifdef _WIN32
|
||||
for (u64 addr = 0x10000000; addr <= 0x60000000; addr += 0x1000000)
|
||||
llvm::InitializeNativeTarget();
|
||||
llvm::InitializeNativeTargetAsmPrinter();
|
||||
LLVMLinkInMCJIT();
|
||||
|
||||
for (u64 addr = 0x10000000; addr <= 0x80000000 - s_memory_size; addr += 0x1000000)
|
||||
{
|
||||
if (VirtualAlloc((void*)addr, s_memory_size, MEM_RESERVE, PAGE_NOACCESS))
|
||||
if (auto ptr = utils::memory_reserve(s_memory_size, (void*)addr))
|
||||
{
|
||||
return (void*)addr;
|
||||
return ptr;
|
||||
}
|
||||
}
|
||||
|
||||
return VirtualAlloc(NULL, s_memory_size, MEM_RESERVE, PAGE_NOACCESS);
|
||||
#else
|
||||
return ::mmap((void*)0x10000000, s_memory_size, PROT_NONE, MAP_ANON | MAP_PRIVATE, -1, 0);
|
||||
#endif
|
||||
return utils::memory_reserve(s_memory_size);
|
||||
}();
|
||||
|
||||
// Code section
|
||||
static u8* s_code_addr;
|
||||
static u64 s_code_size;
|
||||
|
||||
// EH frames
|
||||
static u8* s_unwind_info;
|
||||
static u64 s_unwind_size;
|
||||
static void* s_next = s_memory;
|
||||
|
||||
#ifdef _WIN32
|
||||
static std::deque<std::vector<RUNTIME_FUNCTION>> s_unwater;
|
||||
static std::vector<std::vector<RUNTIME_FUNCTION>> s_unwind; // .pdata
|
||||
#endif
|
||||
|
||||
// Reset memory manager
|
||||
extern void jit_finalize()
|
||||
{
|
||||
#ifdef _WIN32
|
||||
for (auto&& unwind : s_unwind)
|
||||
{
|
||||
if (!RtlDeleteFunctionTable(unwind.data()))
|
||||
{
|
||||
LOG_FATAL(GENERAL, "RtlDeleteFunctionTable() failed! Error %u", GetLastError());
|
||||
}
|
||||
}
|
||||
|
||||
s_unwind.clear();
|
||||
#else
|
||||
// TODO: unregister EH frames if necessary
|
||||
#endif
|
||||
|
||||
utils::memory_decommit(s_memory, s_memory_size);
|
||||
|
||||
s_next = s_memory;
|
||||
}
|
||||
|
||||
// Helper class
|
||||
struct MemoryManager final : llvm::RTDyldMemoryManager
|
||||
struct MemoryManager : llvm::RTDyldMemoryManager
|
||||
{
|
||||
std::unordered_map<std::string, std::uintptr_t>& m_link;
|
||||
|
||||
std::array<u8, 16>* m_tramps{};
|
||||
|
||||
u8* m_code_addr{}; // TODO
|
||||
|
||||
MemoryManager(std::unordered_map<std::string, std::uintptr_t>& table)
|
||||
: m_link(table)
|
||||
{
|
||||
@@ -86,31 +105,70 @@ struct MemoryManager final : llvm::RTDyldMemoryManager
|
||||
fmt::throw_exception("Null function" HERE);
|
||||
}
|
||||
|
||||
virtual u64 getSymbolAddress(const std::string& name) override
|
||||
llvm::JITSymbol findSymbol(const std::string& name) override
|
||||
{
|
||||
const auto found = m_link.find(name);
|
||||
auto& addr = m_link[name];
|
||||
|
||||
if (found != m_link.end())
|
||||
// Find function address
|
||||
if (!addr)
|
||||
{
|
||||
return found->second;
|
||||
addr = RTDyldMemoryManager::getSymbolAddress(name);
|
||||
|
||||
if (addr)
|
||||
{
|
||||
LOG_WARNING(GENERAL, "LLVM: Symbol requested: %s -> 0x%016llx", name, addr);
|
||||
}
|
||||
else
|
||||
{
|
||||
LOG_ERROR(GENERAL, "LLVM: Linkage failed: %s", name);
|
||||
addr = (u64)null;
|
||||
}
|
||||
}
|
||||
|
||||
if (u64 addr = RTDyldMemoryManager::getSymbolAddress(name))
|
||||
// Verify address for small code model
|
||||
if ((u64)s_memory > 0x80000000 - s_memory_size ? (u64)addr - (u64)s_memory >= s_memory_size : addr >= 0x80000000)
|
||||
{
|
||||
// This may be bad if LLVM requests some built-in functions like fma.
|
||||
LOG_ERROR(GENERAL, "LLVM: Symbol requested: %s -> 0x%016llx", name, addr);
|
||||
return addr;
|
||||
// Lock memory manager
|
||||
writer_lock lock(s_mutex);
|
||||
|
||||
// Allocate memory for trampolines
|
||||
if (!m_tramps)
|
||||
{
|
||||
m_tramps = reinterpret_cast<decltype(m_tramps)>(s_next);
|
||||
utils::memory_commit(s_next, 4096, utils::protection::wx);
|
||||
s_next = (u8*)((u64)s_next + 4096);
|
||||
}
|
||||
|
||||
// Create a trampoline
|
||||
auto& data = *m_tramps++;
|
||||
data[0x0] = 0xff; // JMP [rip+2]
|
||||
data[0x1] = 0x25;
|
||||
data[0x2] = 0x02;
|
||||
data[0x3] = 0x00;
|
||||
data[0x4] = 0x00;
|
||||
data[0x5] = 0x00;
|
||||
data[0x6] = 0x48; // MOV rax, imm64 (not executed)
|
||||
data[0x7] = 0xb8;
|
||||
std::memcpy(data.data() + 8, &addr, 8);
|
||||
addr = (u64)&data;
|
||||
|
||||
// Reset pointer (memory page exhausted)
|
||||
if (((u64)m_tramps % 4096) == 0)
|
||||
{
|
||||
m_tramps = nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
// It's fine if some function is never called, for example.
|
||||
LOG_ERROR(GENERAL, "LLVM: Symbol not found: %s", name);
|
||||
return (u64)null;
|
||||
return {addr, llvm::JITSymbolFlags::Exported};
|
||||
}
|
||||
|
||||
virtual u8* allocateCodeSection(std::uintptr_t size, uint align, uint sec_id, llvm::StringRef sec_name) override
|
||||
{
|
||||
// Lock memory manager
|
||||
writer_lock lock(s_mutex);
|
||||
|
||||
// Simple allocation
|
||||
const u64 next = ::align((u64)m_next + size, 4096);
|
||||
const u64 next = ::align((u64)s_next + size, 4096);
|
||||
|
||||
if (next > (u64)s_memory + s_memory_size)
|
||||
{
|
||||
@@ -118,27 +176,20 @@ struct MemoryManager final : llvm::RTDyldMemoryManager
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
#ifdef _WIN32
|
||||
if (!VirtualAlloc(m_next, size, MEM_COMMIT, PAGE_EXECUTE_READWRITE))
|
||||
#else
|
||||
if (::mprotect(m_next, size, PROT_READ | PROT_WRITE | PROT_EXEC))
|
||||
#endif
|
||||
{
|
||||
LOG_FATAL(GENERAL, "LLVM: Failed to allocate memory at %p", m_next);
|
||||
return nullptr;
|
||||
}
|
||||
utils::memory_commit(s_next, size, utils::protection::wx);
|
||||
m_code_addr = (u8*)s_next;
|
||||
|
||||
s_code_addr = (u8*)m_next;
|
||||
s_code_size = size;
|
||||
|
||||
LOG_NOTICE(GENERAL, "LLVM: Code section %u '%s' allocated -> %p (size=0x%llx, aligned 0x%x)", sec_id, sec_name.data(), m_next, size, align);
|
||||
return (u8*)std::exchange(m_next, (void*)next);
|
||||
LOG_NOTICE(GENERAL, "LLVM: Code section %u '%s' allocated -> %p (size=0x%llx, aligned 0x%x)", sec_id, sec_name.data(), s_next, size, align);
|
||||
return (u8*)std::exchange(s_next, (void*)next);
|
||||
}
|
||||
|
||||
virtual u8* allocateDataSection(std::uintptr_t size, uint align, uint sec_id, llvm::StringRef sec_name, bool is_ro) override
|
||||
{
|
||||
// Lock memory manager
|
||||
writer_lock lock(s_mutex);
|
||||
|
||||
// Simple allocation
|
||||
const u64 next = ::align((u64)m_next + size, 4096);
|
||||
const u64 next = ::align((u64)s_next + size, 4096);
|
||||
|
||||
if (next > (u64)s_memory + s_memory_size)
|
||||
{
|
||||
@@ -151,22 +202,17 @@ struct MemoryManager final : llvm::RTDyldMemoryManager
|
||||
LOG_ERROR(GENERAL, "LLVM: Writeable data section not supported!");
|
||||
}
|
||||
|
||||
#ifdef _WIN32
|
||||
if (!VirtualAlloc(m_next, size, MEM_COMMIT, PAGE_READWRITE))
|
||||
#else
|
||||
if (::mprotect(m_next, size, PROT_READ | PROT_WRITE))
|
||||
#endif
|
||||
{
|
||||
LOG_FATAL(GENERAL, "LLVM: Failed to allocate memory at %p", m_next);
|
||||
return nullptr;
|
||||
}
|
||||
utils::memory_commit(s_next, size);
|
||||
|
||||
LOG_NOTICE(GENERAL, "LLVM: Data section %u '%s' allocated -> %p (size=0x%llx, aligned 0x%x, %s)", sec_id, sec_name.data(), m_next, size, align, is_ro ? "ro" : "rw");
|
||||
return (u8*)std::exchange(m_next, (void*)next);
|
||||
LOG_NOTICE(GENERAL, "LLVM: Data section %u '%s' allocated -> %p (size=0x%llx, aligned 0x%x, %s)", sec_id, sec_name.data(), s_next, size, align, is_ro ? "ro" : "rw");
|
||||
return (u8*)std::exchange(s_next, (void*)next);
|
||||
}
|
||||
|
||||
virtual bool finalizeMemory(std::string* = nullptr) override
|
||||
{
|
||||
// Lock memory manager
|
||||
writer_lock lock(s_mutex);
|
||||
|
||||
// TODO: make only read-only sections read-only
|
||||
//#ifdef _WIN32
|
||||
// DWORD op;
|
||||
@@ -181,230 +227,246 @@ struct MemoryManager final : llvm::RTDyldMemoryManager
|
||||
|
||||
virtual void registerEHFrames(u8* addr, u64 load_addr, std::size_t size) override
|
||||
{
|
||||
s_unwind_info = addr;
|
||||
s_unwind_size = size;
|
||||
#ifdef _WIN32
|
||||
// Lock memory manager
|
||||
writer_lock lock(s_mutex);
|
||||
|
||||
// Use s_memory as a BASE, compute the difference
|
||||
const u64 unwind_diff = (u64)addr - (u64)s_memory;
|
||||
|
||||
// Fix RUNTIME_FUNCTION records (.pdata section)
|
||||
auto pdata = std::move(s_unwater.front());
|
||||
s_unwater.pop_front();
|
||||
|
||||
for (auto& rf : pdata)
|
||||
{
|
||||
rf.UnwindData += static_cast<DWORD>(unwind_diff);
|
||||
}
|
||||
|
||||
// Register .xdata UNWIND_INFO structs
|
||||
if (!RtlAddFunctionTable(pdata.data(), (DWORD)pdata.size(), (u64)s_memory))
|
||||
{
|
||||
LOG_ERROR(GENERAL, "RtlAddFunctionTable() failed! Error %u", GetLastError());
|
||||
}
|
||||
else
|
||||
{
|
||||
s_unwind.emplace_back(std::move(pdata));
|
||||
}
|
||||
#endif
|
||||
|
||||
return RTDyldMemoryManager::registerEHFrames(addr, load_addr, size);
|
||||
}
|
||||
|
||||
virtual void deregisterEHFrames(u8* addr, u64 load_addr, std::size_t size) override
|
||||
virtual void deregisterEHFrames() override
|
||||
{
|
||||
LOG_ERROR(GENERAL, "deregisterEHFrames() called"); // Not expected
|
||||
|
||||
return RTDyldMemoryManager::deregisterEHFrames(addr, load_addr, size);
|
||||
return RTDyldMemoryManager::deregisterEHFrames();
|
||||
}
|
||||
|
||||
~MemoryManager()
|
||||
{
|
||||
#ifdef _WIN32
|
||||
for (auto&& unwind : s_unwind)
|
||||
{
|
||||
if (!RtlDeleteFunctionTable(unwind.data()))
|
||||
{
|
||||
LOG_FATAL(GENERAL, "RtlDeleteFunctionTable() failed! Error %u", GetLastError());
|
||||
}
|
||||
}
|
||||
|
||||
s_unwind.clear();
|
||||
|
||||
if (!VirtualFree(s_memory, 0, MEM_DECOMMIT))
|
||||
{
|
||||
LOG_FATAL(GENERAL, "VirtualFree(%p) failed! Error %u", s_memory, GetLastError());
|
||||
}
|
||||
#else
|
||||
if (!::mmap(s_memory, s_memory_size, PROT_NONE, MAP_FIXED | MAP_ANON | MAP_PRIVATE, -1, 0))
|
||||
{
|
||||
LOG_FATAL(GENERAL, "mmap(%p) failed! Error %d", s_memory, errno);
|
||||
}
|
||||
|
||||
// TODO: unregister EH frames if necessary
|
||||
#endif
|
||||
}
|
||||
|
||||
private:
|
||||
void* m_next = s_memory;
|
||||
};
|
||||
|
||||
// Helper class
|
||||
struct EventListener final : llvm::JITEventListener
|
||||
struct EventListener : llvm::JITEventListener
|
||||
{
|
||||
std::string path;
|
||||
MemoryManager& m_mem;
|
||||
|
||||
EventListener(MemoryManager& mem)
|
||||
: m_mem(mem)
|
||||
{
|
||||
}
|
||||
|
||||
virtual void NotifyObjectEmitted(const llvm::object::ObjectFile& obj, const llvm::RuntimeDyld::LoadedObjectInfo& inf) override
|
||||
{
|
||||
if (!path.empty())
|
||||
#ifdef _WIN32
|
||||
for (auto it = obj.section_begin(), end = obj.section_end(); it != end; ++it)
|
||||
{
|
||||
const llvm::StringRef elf = obj.getData();
|
||||
fs::file(path, fs::rewrite).write(elf.data(), elf.size());
|
||||
llvm::StringRef name;
|
||||
it->getName(name);
|
||||
|
||||
if (name == ".pdata")
|
||||
{
|
||||
llvm::StringRef data;
|
||||
it->getContents(data);
|
||||
|
||||
std::vector<RUNTIME_FUNCTION> rfs(data.size() / sizeof(RUNTIME_FUNCTION));
|
||||
|
||||
auto offsets = reinterpret_cast<DWORD*>(rfs.data());
|
||||
|
||||
// Initialize .pdata section using relocation info
|
||||
for (auto ri = it->relocation_begin(), end = it->relocation_end(); ri != end; ++ri)
|
||||
{
|
||||
if (ri->getType() == 3 /*R_X86_64_GOT32*/)
|
||||
{
|
||||
const u64 value = *reinterpret_cast<const DWORD*>(data.data() + ri->getOffset());
|
||||
offsets[ri->getOffset() / sizeof(DWORD)] = static_cast<DWORD>(value + ri->getSymbol()->getAddress().get());
|
||||
}
|
||||
}
|
||||
|
||||
// Lock memory manager
|
||||
writer_lock lock(s_mutex);
|
||||
|
||||
// Use s_memory as a BASE, compute the difference
|
||||
const u64 code_diff = (u64)m_mem.m_code_addr - (u64)s_memory;
|
||||
|
||||
// Fix RUNTIME_FUNCTION records (.pdata section)
|
||||
for (auto& rf : rfs)
|
||||
{
|
||||
rf.BeginAddress += static_cast<DWORD>(code_diff);
|
||||
rf.EndAddress += static_cast<DWORD>(code_diff);
|
||||
}
|
||||
|
||||
s_unwater.emplace_back(std::move(rfs));
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
};
|
||||
|
||||
// Helper class
|
||||
class ObjectCache final : public llvm::ObjectCache
|
||||
{
|
||||
const std::string& m_path;
|
||||
|
||||
public:
|
||||
ObjectCache(const std::string& path)
|
||||
: m_path(path)
|
||||
{
|
||||
}
|
||||
|
||||
~ObjectCache() override = default;
|
||||
|
||||
void notifyObjectCompiled(const llvm::Module* module, llvm::MemoryBufferRef obj) override
|
||||
{
|
||||
std::string name = m_path;
|
||||
name.append(module->getName());
|
||||
fs::file(name, fs::rewrite).write(obj.getBufferStart(), obj.getBufferSize());
|
||||
LOG_SUCCESS(GENERAL, "LLVM: Created module: %s", module->getName().data());
|
||||
}
|
||||
|
||||
std::unique_ptr<llvm::MemoryBuffer> getObject(const llvm::Module* module) override
|
||||
{
|
||||
std::string name = m_path;
|
||||
name.append(module->getName());
|
||||
|
||||
if (fs::file cached{name, fs::read})
|
||||
{
|
||||
auto buf = llvm::MemoryBuffer::getNewUninitMemBuffer(cached.size());
|
||||
cached.read(const_cast<char*>(buf->getBufferStart()), buf->getBufferSize());
|
||||
LOG_SUCCESS(GENERAL, "LLVM: Loaded module: %s", module->getName().data());
|
||||
return buf;
|
||||
}
|
||||
else
|
||||
{
|
||||
return nullptr;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
static EventListener s_listener;
|
||||
|
||||
static void dummy()
|
||||
jit_compiler::jit_compiler(const std::unordered_map<std::string, std::uintptr_t>& _link, std::string _cpu)
|
||||
: m_link(std::move(_link))
|
||||
, m_cpu(std::move(_cpu))
|
||||
{
|
||||
}
|
||||
|
||||
jit_compiler::jit_compiler(std::unordered_map<std::string, std::uintptr_t> init_linkage_info)
|
||||
: m_link(std::move(init_linkage_info))
|
||||
{
|
||||
#ifdef _MSC_VER
|
||||
m_link.emplace("__chkstk", (u64)&dummy);
|
||||
#endif
|
||||
|
||||
verify(HERE), s_memory;
|
||||
|
||||
// Initialization
|
||||
llvm::InitializeNativeTarget();
|
||||
llvm::InitializeNativeTargetAsmPrinter();
|
||||
LLVMLinkInMCJIT();
|
||||
m_cpu = llvm::sys::getHostCPUName();
|
||||
|
||||
if (m_cpu == "skylake")
|
||||
if (m_cpu.empty())
|
||||
{
|
||||
m_cpu = "haswell";
|
||||
m_cpu = llvm::sys::getHostCPUName();
|
||||
}
|
||||
|
||||
std::string result;
|
||||
|
||||
m_engine.reset(llvm::EngineBuilder(std::make_unique<llvm::Module>("", g_llvm_ctx))
|
||||
.setErrorStr(&result)
|
||||
.setMCJITMemoryManager(std::make_unique<MemoryManager>(m_link))
|
||||
.setOptLevel(llvm::CodeGenOpt::Aggressive)
|
||||
.setCodeModel((u64)s_memory <= 0x60000000 ? llvm::CodeModel::Small : llvm::CodeModel::Large) // TODO
|
||||
.setMCPU(m_cpu)
|
||||
.create());
|
||||
if (m_link.empty())
|
||||
{
|
||||
// Auxiliary JIT (does not use custom memory manager, only writes the objects)
|
||||
m_engine.reset(llvm::EngineBuilder(std::make_unique<llvm::Module>("null_", m_context))
|
||||
.setErrorStr(&result)
|
||||
.setOptLevel(llvm::CodeGenOpt::Aggressive)
|
||||
.setCodeModel(llvm::CodeModel::Small)
|
||||
.setMCPU(m_cpu)
|
||||
.create());
|
||||
}
|
||||
else
|
||||
{
|
||||
// Primary JIT
|
||||
auto mem = std::make_unique<MemoryManager>(m_link);
|
||||
m_jit_el = std::make_unique<EventListener>(*mem);
|
||||
|
||||
m_engine.reset(llvm::EngineBuilder(std::make_unique<llvm::Module>("null", m_context))
|
||||
.setErrorStr(&result)
|
||||
.setMCJITMemoryManager(std::move(mem))
|
||||
.setOptLevel(llvm::CodeGenOpt::Aggressive)
|
||||
.setCodeModel(llvm::CodeModel::Small)
|
||||
.setMCPU(m_cpu)
|
||||
.create());
|
||||
|
||||
if (m_engine)
|
||||
{
|
||||
m_engine->RegisterJITEventListener(m_jit_el.get());
|
||||
}
|
||||
}
|
||||
|
||||
if (!m_engine)
|
||||
{
|
||||
fmt::throw_exception("LLVM: Failed to create ExecutionEngine: %s", result);
|
||||
}
|
||||
|
||||
m_engine->setProcessAllSections(true); // ???
|
||||
m_engine->RegisterJITEventListener(&s_listener);
|
||||
}
|
||||
|
||||
void jit_compiler::load(std::unique_ptr<llvm::Module> module, std::unique_ptr<llvm::object::ObjectFile> object)
|
||||
{
|
||||
s_listener.path.clear();
|
||||
|
||||
auto* module_ptr = module.get();
|
||||
|
||||
m_engine->addModule(std::move(module));
|
||||
m_engine->addObjectFile(std::move(object));
|
||||
m_engine->finalizeObject();
|
||||
|
||||
m_map.clear();
|
||||
|
||||
for (auto& func : module_ptr->functions())
|
||||
{
|
||||
const std::string& name = func.getName();
|
||||
|
||||
if (!m_link.count(name))
|
||||
{
|
||||
// Register compiled function
|
||||
m_map[name] = m_engine->getFunctionAddress(name);
|
||||
}
|
||||
}
|
||||
|
||||
init();
|
||||
}
|
||||
|
||||
void jit_compiler::make(std::unique_ptr<llvm::Module> module, std::string path)
|
||||
{
|
||||
s_listener.path = std::move(path);
|
||||
|
||||
auto* module_ptr = module.get();
|
||||
|
||||
m_engine->addModule(std::move(module));
|
||||
m_engine->finalizeObject();
|
||||
|
||||
m_map.clear();
|
||||
|
||||
for (auto& func : module_ptr->functions())
|
||||
{
|
||||
if (!func.empty())
|
||||
{
|
||||
const std::string& name = func.getName();
|
||||
|
||||
// Register compiled function
|
||||
m_map[name] = m_engine->getFunctionAddress(name);
|
||||
}
|
||||
|
||||
// Delete IR to lower memory consumption
|
||||
func.deleteBody();
|
||||
}
|
||||
|
||||
init();
|
||||
}
|
||||
|
||||
void jit_compiler::init()
|
||||
{
|
||||
#ifdef _WIN32
|
||||
// Register .xdata UNWIND_INFO (.pdata section is empty for some reason)
|
||||
std::set<u64> func_set;
|
||||
|
||||
for (const auto& pair : m_map)
|
||||
{
|
||||
func_set.emplace(pair.second);
|
||||
}
|
||||
|
||||
const u64 base = (u64)s_memory;
|
||||
const u8* bits = s_unwind_info;
|
||||
|
||||
std::vector<RUNTIME_FUNCTION> unwind;
|
||||
unwind.reserve(m_map.size());
|
||||
|
||||
for (const u64 addr : func_set)
|
||||
{
|
||||
// Find next function address
|
||||
const auto _next = func_set.upper_bound(addr);
|
||||
const u64 next = _next != func_set.end() ? *_next : (u64)s_code_addr + s_code_size;
|
||||
|
||||
// Generate RUNTIME_FUNCTION record
|
||||
RUNTIME_FUNCTION uw;
|
||||
uw.BeginAddress = static_cast<u32>(addr - base);
|
||||
uw.EndAddress = static_cast<u32>(next - base);
|
||||
uw.UnwindData = static_cast<u32>((u64)bits - base);
|
||||
unwind.emplace_back(uw);
|
||||
|
||||
// Parse .xdata UNWIND_INFO record
|
||||
const u8 flags = *bits++; // Version and flags
|
||||
const u8 prolog = *bits++; // Size of prolog
|
||||
const u8 count = *bits++; // Count of unwind codes
|
||||
const u8 frame = *bits++; // Frame Reg + Off
|
||||
bits += ::align(std::max<u8>(1, count), 2) * sizeof(u16); // UNWIND_CODE array
|
||||
|
||||
if (flags != 1)
|
||||
{
|
||||
// Can't happen for trivial code
|
||||
LOG_ERROR(GENERAL, "LLVM: unsupported UNWIND_INFO version/flags (0x%02x)", flags);
|
||||
break;
|
||||
}
|
||||
|
||||
LOG_TRACE(GENERAL, "LLVM: .xdata at 0x%llx: function 0x%x..0x%x: p0x%02x, c0x%02x, f0x%02x", uw.UnwindData + base, uw.BeginAddress + base, uw.EndAddress + base, prolog, count, frame);
|
||||
}
|
||||
|
||||
if (s_unwind_info + s_unwind_size != bits)
|
||||
{
|
||||
LOG_ERROR(GENERAL, "LLVM: .xdata analysis failed! (%p != %p)", s_unwind_info + s_unwind_size, bits);
|
||||
}
|
||||
else if (!RtlAddFunctionTable(unwind.data(), (DWORD)unwind.size(), base))
|
||||
{
|
||||
LOG_ERROR(GENERAL, "RtlAddFunctionTable(%p) failed! Error %u", s_unwind_info, GetLastError());
|
||||
}
|
||||
else
|
||||
{
|
||||
LOG_NOTICE(GENERAL, "LLVM: UNWIND_INFO registered (%p, size=0x%llx)", s_unwind_info, s_unwind_size);
|
||||
}
|
||||
|
||||
s_unwind.emplace_back(std::move(unwind));
|
||||
#endif
|
||||
}
|
||||
|
||||
jit_compiler::~jit_compiler()
|
||||
{
|
||||
}
|
||||
|
||||
void jit_compiler::add(std::unique_ptr<llvm::Module> module, const std::string& path)
|
||||
{
|
||||
ObjectCache cache{path};
|
||||
m_engine->setObjectCache(&cache);
|
||||
|
||||
const auto ptr = module.get();
|
||||
m_engine->addModule(std::move(module));
|
||||
m_engine->generateCodeForModule(ptr);
|
||||
m_engine->setObjectCache(nullptr);
|
||||
|
||||
for (auto& func : ptr->functions())
|
||||
{
|
||||
// Delete IR to lower memory consumption
|
||||
func.deleteBody();
|
||||
}
|
||||
}
|
||||
|
||||
void jit_compiler::fin()
|
||||
{
|
||||
m_engine->finalizeObject();
|
||||
}
|
||||
|
||||
u64 jit_compiler::get(const std::string& name)
|
||||
{
|
||||
return m_engine->getGlobalValueAddress(name);
|
||||
}
|
||||
|
||||
std::unordered_map<std::string, u64> jit_compiler::add(std::unordered_map<std::string, std::string> data)
|
||||
{
|
||||
// Lock memory manager
|
||||
writer_lock lock(s_mutex);
|
||||
|
||||
std::unordered_map<std::string, u64> result;
|
||||
|
||||
std::size_t size = 0;
|
||||
|
||||
for (auto&& pair : data)
|
||||
{
|
||||
size += ::align(pair.second.size(), 16);
|
||||
}
|
||||
|
||||
utils::memory_commit(s_next, size, utils::protection::wx);
|
||||
std::memset(s_next, 0xc3, ::align(size, 4096));
|
||||
|
||||
for (auto&& pair : data)
|
||||
{
|
||||
std::memcpy(s_next, pair.second.data(), pair.second.size());
|
||||
result.emplace(pair.first, (u64)s_next);
|
||||
s_next = (void*)::align((u64)s_next + pair.second.size(), 16);
|
||||
}
|
||||
|
||||
s_next = (void*)::align((u64)s_next, 4096);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
+29
-25
@@ -7,6 +7,7 @@
|
||||
#include <unordered_map>
|
||||
|
||||
#include "types.h"
|
||||
#include "mutex.h"
|
||||
|
||||
#include "restore_new.h"
|
||||
#ifdef _MSC_VER
|
||||
@@ -20,54 +21,57 @@
|
||||
#endif
|
||||
#include "define_new_memleakdetect.h"
|
||||
|
||||
extern llvm::LLVMContext g_llvm_ctx;
|
||||
|
||||
// Temporary compiler interface
|
||||
class jit_compiler final
|
||||
{
|
||||
// Local LLVM context
|
||||
llvm::LLVMContext m_context;
|
||||
|
||||
// JIT Event Listener
|
||||
std::unique_ptr<struct EventListener> m_jit_el;
|
||||
|
||||
// Execution instance
|
||||
std::unique_ptr<llvm::ExecutionEngine> m_engine;
|
||||
|
||||
// Compiled functions
|
||||
std::unordered_map<std::string, std::uintptr_t> m_map;
|
||||
|
||||
// Linkage cache
|
||||
std::unordered_map<std::string, std::uintptr_t> m_link;
|
||||
// Link table
|
||||
std::unordered_map<std::string, u64> m_link;
|
||||
|
||||
// Arch
|
||||
std::string m_cpu;
|
||||
|
||||
// Internal
|
||||
void init();
|
||||
|
||||
public:
|
||||
jit_compiler(std::unordered_map<std::string, std::uintptr_t>);
|
||||
jit_compiler(const std::unordered_map<std::string, u64>& _link, std::string _cpu);
|
||||
~jit_compiler();
|
||||
|
||||
// Compile module
|
||||
void make(std::unique_ptr<llvm::Module>, std::string);
|
||||
// Get LLVM context
|
||||
auto& get_context()
|
||||
{
|
||||
return m_context;
|
||||
}
|
||||
|
||||
// Load object
|
||||
void load(std::unique_ptr<llvm::Module>, std::unique_ptr<llvm::object::ObjectFile>);
|
||||
// Add module
|
||||
void add(std::unique_ptr<llvm::Module> module, const std::string& path);
|
||||
|
||||
// Finalize
|
||||
void fin();
|
||||
|
||||
// Get compiled function address
|
||||
std::uintptr_t get(const std::string& name) const
|
||||
{
|
||||
const auto found = m_map.find(name);
|
||||
|
||||
if (found != m_map.end())
|
||||
{
|
||||
return found->second;
|
||||
}
|
||||
u64 get(const std::string& name);
|
||||
|
||||
return 0;
|
||||
}
|
||||
// Add functions directly to the memory manager (name -> code)
|
||||
static std::unordered_map<std::string, u64> add(std::unordered_map<std::string, std::string>);
|
||||
|
||||
// Get CPU info
|
||||
const std::string& cpu() const
|
||||
{
|
||||
return m_cpu;
|
||||
}
|
||||
|
||||
// Check JIT purpose
|
||||
bool is_primary() const
|
||||
{
|
||||
return !m_link.empty();
|
||||
}
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
+83
-11
@@ -1,9 +1,11 @@
|
||||
#include "Log.h"
|
||||
#include "File.h"
|
||||
#include "StrFmt.h"
|
||||
#include "sema.h"
|
||||
|
||||
#include "rpcs3_version.h"
|
||||
#include <string>
|
||||
#include <unordered_map>
|
||||
|
||||
#ifdef _WIN32
|
||||
#include <Windows.h>
|
||||
@@ -11,8 +13,13 @@
|
||||
#include <chrono>
|
||||
#endif
|
||||
|
||||
static std::string empty_string()
|
||||
{
|
||||
return {};
|
||||
}
|
||||
|
||||
// Thread-specific log prefix provider
|
||||
thread_local std::string(*g_tls_log_prefix)() = nullptr;
|
||||
thread_local std::string(*g_tls_log_prefix)() = &empty_string;
|
||||
|
||||
template<>
|
||||
void fmt_class_string<logs::level>::format(std::string& out, u64 arg)
|
||||
@@ -105,14 +112,53 @@ namespace logs
|
||||
return timebase.get();
|
||||
}
|
||||
|
||||
channel GENERAL(nullptr, level::notice);
|
||||
channel LOADER("LDR", level::notice);
|
||||
channel MEMORY("MEM", level::notice);
|
||||
channel RSX("RSX", level::notice);
|
||||
channel HLE("HLE", level::notice);
|
||||
channel PPU("PPU", level::notice);
|
||||
channel SPU("SPU", level::notice);
|
||||
channel GENERAL("");
|
||||
channel LOADER("LDR");
|
||||
channel MEMORY("MEM");
|
||||
channel RSX("RSX");
|
||||
channel HLE("HLE");
|
||||
channel PPU("PPU");
|
||||
channel SPU("SPU");
|
||||
channel ARMv7("ARMv7");
|
||||
|
||||
struct channel_info
|
||||
{
|
||||
channel* pointer = nullptr;
|
||||
level enabled = level::notice;
|
||||
|
||||
void set_level(level value)
|
||||
{
|
||||
enabled = value;
|
||||
|
||||
if (pointer)
|
||||
{
|
||||
pointer->enabled = value;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
// Channel registry mutex
|
||||
semaphore<> g_mutex;
|
||||
|
||||
// Channel registry
|
||||
std::unordered_map<std::string, channel_info> g_channels;
|
||||
|
||||
void reset()
|
||||
{
|
||||
semaphore_lock lock(g_mutex);
|
||||
|
||||
for (auto&& pair : g_channels)
|
||||
{
|
||||
pair.second.set_level(level::notice);
|
||||
}
|
||||
}
|
||||
|
||||
void set_level(const std::string& ch_name, level value)
|
||||
{
|
||||
semaphore_lock lock(g_mutex);
|
||||
|
||||
g_channels[ch_name].set_level(value);
|
||||
}
|
||||
}
|
||||
|
||||
logs::listener::~listener()
|
||||
@@ -136,8 +182,34 @@ void logs::message::broadcast(const char* fmt, const fmt_type_info* sup, const u
|
||||
// Get timestamp
|
||||
const u64 stamp = get_stamp();
|
||||
|
||||
std::string text; fmt::raw_append(text, fmt, sup, args);
|
||||
std::string prefix(g_tls_log_prefix ? g_tls_log_prefix() : "");
|
||||
// Register channel
|
||||
if (ch->enabled == level::_uninit)
|
||||
{
|
||||
semaphore_lock lock(g_mutex);
|
||||
|
||||
auto& info = g_channels[ch->name];
|
||||
|
||||
if (info.pointer && info.pointer != ch)
|
||||
{
|
||||
fmt::throw_exception("logs::channel repetition: %s", ch->name);
|
||||
}
|
||||
else if (!info.pointer)
|
||||
{
|
||||
info.pointer = ch;
|
||||
ch->enabled = info.enabled;
|
||||
|
||||
// Check level again
|
||||
if (info.enabled < sev)
|
||||
{
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Get text
|
||||
std::string text;
|
||||
fmt::raw_append(text, fmt, sup, args);
|
||||
std::string prefix = g_tls_log_prefix();
|
||||
|
||||
// Get first (main) listener
|
||||
listener* lis = get_logger();
|
||||
@@ -203,7 +275,7 @@ void logs::file_listener::log(u64 stamp, const logs::message& msg, const std::st
|
||||
text += "} ";
|
||||
}
|
||||
|
||||
if (msg.ch->name)
|
||||
if ('\0' != *msg.ch->name)
|
||||
{
|
||||
text += msg.ch->name;
|
||||
text += msg.sev == level::todo ? " TODO: " : ": ";
|
||||
|
||||
+17
-8
@@ -3,19 +3,22 @@
|
||||
#include "types.h"
|
||||
#include "Atomic.h"
|
||||
#include "StrFmt.h"
|
||||
#include <climits>
|
||||
|
||||
namespace logs
|
||||
{
|
||||
enum class level : uint
|
||||
{
|
||||
always, // highest level (unused, cannot be disabled)
|
||||
always, // Highest log severity (unused, cannot be disabled)
|
||||
fatal,
|
||||
error,
|
||||
todo,
|
||||
success,
|
||||
warning,
|
||||
notice,
|
||||
trace, // lowest level (usually disabled)
|
||||
trace, // Lowest severity (usually disabled)
|
||||
|
||||
_uninit = UINT_MAX, // Special value for delayed initialization
|
||||
};
|
||||
|
||||
struct channel;
|
||||
@@ -23,7 +26,7 @@ namespace logs
|
||||
// Message information (temporary data)
|
||||
struct message
|
||||
{
|
||||
const channel* ch;
|
||||
channel* ch;
|
||||
level sev;
|
||||
|
||||
// Send log message to global logger instance
|
||||
@@ -57,16 +60,16 @@ namespace logs
|
||||
// The lowest logging level enabled for this channel (used for early filtering)
|
||||
atomic_t<level> enabled;
|
||||
|
||||
// Constant initialization: name and initial log level
|
||||
constexpr channel(const char* name, level enabled = level::trace)
|
||||
// Constant initialization: channel name
|
||||
constexpr channel(const char* name)
|
||||
: name(name)
|
||||
, enabled(enabled)
|
||||
, enabled(level::_uninit)
|
||||
{
|
||||
}
|
||||
|
||||
// Formatting function
|
||||
template<typename... Args>
|
||||
SAFE_BUFFERS FORCE_INLINE void format(level sev, const char* fmt, const Args&... args) const
|
||||
SAFE_BUFFERS FORCE_INLINE void format(level sev, const char* fmt, const Args&... args)
|
||||
{
|
||||
if (UNLIKELY(sev <= enabled))
|
||||
{
|
||||
@@ -76,7 +79,7 @@ namespace logs
|
||||
|
||||
#define GEN_LOG_METHOD(_sev)\
|
||||
template<typename... Args>\
|
||||
SAFE_BUFFERS void _sev(const char* fmt, const Args&... args) const\
|
||||
SAFE_BUFFERS void _sev(const char* fmt, const Args&... args)\
|
||||
{\
|
||||
return format<Args...>(level::_sev, fmt, args...);\
|
||||
}
|
||||
@@ -102,6 +105,12 @@ namespace logs
|
||||
extern channel PPU;
|
||||
extern channel SPU;
|
||||
extern channel ARMv7;
|
||||
|
||||
// Log level control: set all channels to level::notice
|
||||
void reset();
|
||||
|
||||
// Log level control: register channel if necessary, set channel level
|
||||
void set_level(const std::string&, level);
|
||||
}
|
||||
|
||||
// Legacy:
|
||||
|
||||
@@ -286,6 +286,15 @@ struct fmt::cfmt_src
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static constexpr std::size_t size_char = 1;
|
||||
static constexpr std::size_t size_short = 2;
|
||||
static constexpr std::size_t size_int = 0;
|
||||
static constexpr std::size_t size_long = sizeof(ulong);
|
||||
static constexpr std::size_t size_llong = sizeof(ullong);
|
||||
static constexpr std::size_t size_size = sizeof(std::size_t);
|
||||
static constexpr std::size_t size_max = sizeof(std::uintmax_t);
|
||||
static constexpr std::size_t size_diff = sizeof(std::ptrdiff_t);
|
||||
};
|
||||
|
||||
void fmt::raw_append(std::string& out, const char* fmt, const fmt_type_info* sup, const u64* args) noexcept
|
||||
|
||||
+31
-5
@@ -15,7 +15,7 @@ namespace fmt
|
||||
template <typename T, typename>
|
||||
struct fmt_unveil
|
||||
{
|
||||
static_assert(sizeof(T) > 0, "fmt_unveil<>: cannot pass forward-declared object");
|
||||
static_assert(sizeof(T) > 0, "fmt_unveil<> error: incomplete type");
|
||||
|
||||
using type = T;
|
||||
|
||||
@@ -59,13 +59,24 @@ struct fmt_unveil<T, std::enable_if_t<std::is_floating_point<T>::value && sizeof
|
||||
{
|
||||
using type = T;
|
||||
|
||||
// Convert FP to f64 and reinterpret (TODO?)
|
||||
static inline u64 get(const f64 arg)
|
||||
// Convert FP to f64 and reinterpret as u64
|
||||
static inline u64 get(const f64& arg)
|
||||
{
|
||||
return *reinterpret_cast<const u64*>(reinterpret_cast<const u8*>(&arg));
|
||||
}
|
||||
};
|
||||
|
||||
template <>
|
||||
struct fmt_unveil<f16, void>
|
||||
{
|
||||
using type = f16;
|
||||
|
||||
static inline u64 get(const f16& arg)
|
||||
{
|
||||
return fmt_unveil<f64>::get(arg.operator float());
|
||||
}
|
||||
};
|
||||
|
||||
template <typename T>
|
||||
struct fmt_unveil<T, std::enable_if_t<std::is_enum<T>::value>>
|
||||
{
|
||||
@@ -126,15 +137,27 @@ struct fmt_class_string
|
||||
return *reinterpret_cast<const T*>(static_cast<std::uintptr_t>(arg));
|
||||
}
|
||||
|
||||
// Enum -> string function type
|
||||
using convert_t = const char*(*)(T value);
|
||||
|
||||
// Enum -> string function registered
|
||||
static convert_t convert_enum;
|
||||
|
||||
// Helper function (safely converts arg to enum value)
|
||||
static SAFE_BUFFERS FORCE_INLINE void format_enum(std::string& out, u64 arg, const char* (*get)(T value))
|
||||
static SAFE_BUFFERS FORCE_INLINE void format_enum(std::string& out, u64 arg, convert_t convert)
|
||||
{
|
||||
// Save convert function
|
||||
if (convert_enum == nullptr)
|
||||
{
|
||||
convert_enum = convert;
|
||||
}
|
||||
|
||||
const auto value = static_cast<std::underlying_type_t<T>>(arg);
|
||||
|
||||
// Check narrowing
|
||||
if (static_cast<u64>(value) == arg)
|
||||
{
|
||||
if (const char* str = get(static_cast<T>(value)))
|
||||
if (const char* str = convert(static_cast<T>(value)))
|
||||
{
|
||||
out += str;
|
||||
return;
|
||||
@@ -180,6 +203,9 @@ struct fmt_class_string
|
||||
static constexpr const char* unknown = nullptr;
|
||||
};
|
||||
|
||||
template <typename T, typename V>
|
||||
const char*(*fmt_class_string<T, V>::convert_enum)(T) = nullptr;
|
||||
|
||||
template <>
|
||||
struct fmt_class_string<const void*, void>
|
||||
{
|
||||
|
||||
+169
-8
@@ -756,6 +756,90 @@ uint64_t* darwin_x64reg(x64_context *context, int reg)
|
||||
}
|
||||
}
|
||||
|
||||
#elif defined(__DragonFly__) || defined(__FreeBSD__)
|
||||
|
||||
#define X64REG(context, reg) (freebsd_x64reg(context, reg))
|
||||
#ifdef __DragonFly__
|
||||
# define XMMREG(context, reg) (reinterpret_cast<v128*>(((union savefpu*)(context)->uc_mcontext.mc_fpregs)->sv_xmm.sv_xmm[reg]))
|
||||
#else
|
||||
# define XMMREG(context, reg) (reinterpret_cast<v128*>(((struct savefpu*)(context)->uc_mcontext.mc_fpstate)->sv_xmm[reg]))
|
||||
#endif
|
||||
#define EFLAGS(context) ((context)->uc_mcontext.mc_rflags)
|
||||
|
||||
register_t* freebsd_x64reg(x64_context *context, int reg)
|
||||
{
|
||||
auto *state = &context->uc_mcontext;
|
||||
switch(reg)
|
||||
{
|
||||
case 0: return &state->mc_rax;
|
||||
case 1: return &state->mc_rcx;
|
||||
case 2: return &state->mc_rdx;
|
||||
case 3: return &state->mc_rbx;
|
||||
case 4: return &state->mc_rsp;
|
||||
case 5: return &state->mc_rbp;
|
||||
case 6: return &state->mc_rsi;
|
||||
case 7: return &state->mc_rdi;
|
||||
case 8: return &state->mc_r8;
|
||||
case 9: return &state->mc_r9;
|
||||
case 10: return &state->mc_r10;
|
||||
case 11: return &state->mc_r11;
|
||||
case 12: return &state->mc_r12;
|
||||
case 13: return &state->mc_r13;
|
||||
case 14: return &state->mc_r14;
|
||||
case 15: return &state->mc_r15;
|
||||
case 16: return &state->mc_rip;
|
||||
default:
|
||||
LOG_ERROR(GENERAL, "Invalid register index: %d", reg);
|
||||
return nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
#elif defined(__OpenBSD__)
|
||||
|
||||
#define X64REG(context, reg) (openbsd_x64reg(context, reg))
|
||||
#define XMMREG(context, reg) (reinterpret_cast<v128*>((context)->sc_fpstate->fx_xmm[reg]))
|
||||
#define EFLAGS(context) ((context)->sc_rflags)
|
||||
|
||||
long* openbsd_x64reg(x64_context *context, int reg)
|
||||
{
|
||||
auto *state = &context->uc_mcontext;
|
||||
switch(reg)
|
||||
{
|
||||
case 0: return &state->sc_rax;
|
||||
case 1: return &state->sc_rcx;
|
||||
case 2: return &state->sc_rdx;
|
||||
case 3: return &state->sc_rbx;
|
||||
case 4: return &state->sc_rsp;
|
||||
case 5: return &state->sc_rbp;
|
||||
case 6: return &state->sc_rsi;
|
||||
case 7: return &state->sc_rdi;
|
||||
case 8: return &state->sc_r8;
|
||||
case 9: return &state->sc_r9;
|
||||
case 10: return &state->sc_r10;
|
||||
case 11: return &state->sc_r11;
|
||||
case 12: return &state->sc_r12;
|
||||
case 13: return &state->sc_r13;
|
||||
case 14: return &state->sc_r14;
|
||||
case 15: return &state->sc_r15;
|
||||
case 16: return &state->sc_rip;
|
||||
default:
|
||||
LOG_ERROR(GENERAL, "Invalid register index: %d", reg);
|
||||
return nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
#elif defined(__NetBSD__)
|
||||
|
||||
static const decltype(_REG_RAX) reg_table[] =
|
||||
{
|
||||
_REG_RAX, _REG_RCX, _REG_RDX, _REG_RBX, _REG_RSP, _REG_RBP, _REG_RSI, _REG_RDI,
|
||||
_REG_R8, _REG_R9, _REG_R10, _REG_R11, _REG_R12, _REG_R13, _REG_R14, _REG_R15, _REG_RIP
|
||||
};
|
||||
|
||||
#define X64REG(context, reg) (&(context)->uc_mcontext.__gregs[reg_table[reg]])
|
||||
#define XMM_sig(context, reg) (reinterpret_cast<v128*>(((struct fxsave64*)(context)->uc_mcontext.__fpregs)->fx_xmm[reg]))
|
||||
#define EFLAGS(context) ((context)->uc_mcontext.__gregs[_REG_RFL])
|
||||
|
||||
#else
|
||||
|
||||
static const decltype(REG_RAX) reg_table[] =
|
||||
@@ -765,7 +849,11 @@ static const decltype(REG_RAX) reg_table[] =
|
||||
};
|
||||
|
||||
#define X64REG(context, reg) (&(context)->uc_mcontext.gregs[reg_table[reg]])
|
||||
#ifdef __sun
|
||||
#define XMMREG(context, reg) (reinterpret_cast<v128*>(&(context)->uc_mcontext.fpregs.fp_reg_set.fpchip_state.xmm[reg_table[reg]]))
|
||||
#else
|
||||
#define XMMREG(context, reg) (reinterpret_cast<v128*>(&(context)->uc_mcontext.fpregs->_xmm[reg]))
|
||||
#endif // __sun
|
||||
#define EFLAGS(context) ((context)->uc_mcontext.gregs[REG_EFL])
|
||||
|
||||
#endif // __APPLE__
|
||||
@@ -1003,9 +1091,17 @@ bool handle_access_violation(u32 addr, bool is_writing, x64_context* context)
|
||||
{
|
||||
g_tls_fault_all++;
|
||||
|
||||
const auto cpu = get_current_cpu_thread();
|
||||
|
||||
if (rsx::g_access_violation_handler && rsx::g_access_violation_handler(addr, is_writing))
|
||||
{
|
||||
g_tls_fault_rsx++;
|
||||
|
||||
if (cpu)
|
||||
{
|
||||
cpu->test_state();
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -1140,13 +1236,18 @@ bool handle_access_violation(u32 addr, bool is_writing, x64_context* context)
|
||||
return true;
|
||||
}
|
||||
|
||||
if (vm::check_addr(addr, d_size))
|
||||
if (vm::check_addr(addr, std::max<std::size_t>(1, d_size)))
|
||||
{
|
||||
if (cpu)
|
||||
{
|
||||
cpu->test_state();
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
// TODO: allow recovering from a page fault as a feature of PS3 virtual memory
|
||||
if (const auto cpu = get_current_cpu_thread())
|
||||
if (cpu)
|
||||
{
|
||||
LOG_FATAL(MEMORY, "Access violation %s location 0x%x", is_writing ? "writing" : "reading", addr);
|
||||
cpu->state += cpu_flag::dbg_pause;
|
||||
@@ -1216,7 +1317,8 @@ static bool is_leaf_function(u64 rip)
|
||||
|
||||
static LONG exception_handler(PEXCEPTION_POINTERS pExp)
|
||||
{
|
||||
const u64 addr64 = pExp->ExceptionRecord->ExceptionInformation[1] - (u64)vm::base(0);
|
||||
const u64 addr64 = pExp->ExceptionRecord->ExceptionInformation[1] - (u64)vm::g_base_addr;
|
||||
const u64 exec64 = pExp->ExceptionRecord->ExceptionInformation[1] - (u64)vm::g_exec_addr;
|
||||
const bool is_writing = pExp->ExceptionRecord->ExceptionInformation[0] != 0;
|
||||
|
||||
if (pExp->ExceptionRecord->ExceptionCode == EXCEPTION_ACCESS_VIOLATION && addr64 < 0x100000000ull)
|
||||
@@ -1227,6 +1329,14 @@ static LONG exception_handler(PEXCEPTION_POINTERS pExp)
|
||||
}
|
||||
}
|
||||
|
||||
if (pExp->ExceptionRecord->ExceptionCode == EXCEPTION_ACCESS_VIOLATION && exec64 < 0x100000000ull)
|
||||
{
|
||||
if (thread_ctrl::get_current() && handle_access_violation((u32)exec64, is_writing, pExp->ContextRecord))
|
||||
{
|
||||
return EXCEPTION_CONTINUE_EXECUTION;
|
||||
}
|
||||
}
|
||||
|
||||
return EXCEPTION_CONTINUE_SEARCH;
|
||||
}
|
||||
|
||||
@@ -1236,7 +1346,6 @@ static LONG exception_filter(PEXCEPTION_POINTERS pExp)
|
||||
|
||||
if (pExp->ExceptionRecord->ExceptionCode == EXCEPTION_ACCESS_VIOLATION)
|
||||
{
|
||||
const u64 addr64 = pExp->ExceptionRecord->ExceptionInformation[1] - (u64)vm::base(0);
|
||||
const auto cause = pExp->ExceptionRecord->ExceptionInformation[0] != 0 ? "writing" : "reading";
|
||||
|
||||
msg += fmt::format("Segfault %s location %p at %p.\n", cause, pExp->ExceptionRecord->ExceptionInformation[1], pExp->ExceptionRecord->ExceptionAddress);
|
||||
@@ -1343,11 +1452,18 @@ static void signal_handler(int sig, siginfo_t* info, void* uct)
|
||||
|
||||
#ifdef __APPLE__
|
||||
const bool is_writing = context->uc_mcontext->__es.__err & 0x2;
|
||||
#elif defined(__DragonFly__) || defined(__FreeBSD__)
|
||||
const bool is_writing = context->uc_mcontext.mc_err & 0x2;
|
||||
#elif defined(__OpenBSD__)
|
||||
const bool is_writing = context->sc_err & 0x2;
|
||||
#elif defined(__NetBSD__)
|
||||
const bool is_writing = context->uc_mcontext.__gregs[_REG_ERR] & 0x2;
|
||||
#else
|
||||
const bool is_writing = context->uc_mcontext.gregs[REG_ERR] & 0x2;
|
||||
#endif
|
||||
|
||||
const u64 addr64 = (u64)info->si_addr - (u64)vm::base(0);
|
||||
const u64 addr64 = (u64)info->si_addr - (u64)vm::g_base_addr;
|
||||
const u64 exec64 = (u64)info->si_addr - (u64)vm::g_exec_addr;
|
||||
const auto cause = is_writing ? "writing" : "reading";
|
||||
|
||||
if (addr64 < 0x100000000ull)
|
||||
@@ -1359,6 +1475,14 @@ static void signal_handler(int sig, siginfo_t* info, void* uct)
|
||||
}
|
||||
}
|
||||
|
||||
if (exec64 < 0x100000000ull)
|
||||
{
|
||||
if (thread_ctrl::get_current() && handle_access_violation((u32)exec64, is_writing, context))
|
||||
{
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
// TODO (debugger interaction)
|
||||
report_fatal_error(fmt::format("Segfault %s location %p at %p.", cause, info->si_addr, RIP(context)));
|
||||
std::abort();
|
||||
@@ -1434,7 +1558,7 @@ void thread_ctrl::start(const std::shared_ptr<thread_ctrl>& ctrl, task_stack tas
|
||||
#endif
|
||||
|
||||
// TODO: this is unsafe and must be duplicated in thread_ctrl::initialize
|
||||
ctrl->m_thread = thread;
|
||||
ctrl->m_thread = (uintptr_t)thread;
|
||||
}
|
||||
|
||||
void thread_ctrl::initialize()
|
||||
@@ -1490,7 +1614,7 @@ void thread_ctrl::finalize(std::exception_ptr eptr) noexcept
|
||||
FILETIME ctime, etime, ktime, utime;
|
||||
GetThreadTimes(GetCurrentThread(), &ctime, &etime, &ktime, &utime);
|
||||
const u64 time = ((ktime.dwLowDateTime | (u64)ktime.dwHighDateTime << 32) + (utime.dwLowDateTime | (u64)utime.dwHighDateTime << 32)) * 100ull;
|
||||
#elif __linux__
|
||||
#elif defined(RUSAGE_THREAD)
|
||||
const u64 cycles = 0; // Not supported
|
||||
struct ::rusage stats{};
|
||||
::getrusage(RUSAGE_THREAD, &stats);
|
||||
@@ -1500,6 +1624,11 @@ void thread_ctrl::finalize(std::exception_ptr eptr) noexcept
|
||||
const u64 time = 0;
|
||||
#endif
|
||||
|
||||
g_tls_log_prefix = []
|
||||
{
|
||||
return g_tls_this_thread->m_name;
|
||||
};
|
||||
|
||||
LOG_NOTICE(GENERAL, "Thread time: %fs (%fGc); Faults: %u [rsx:%u, spu:%u];",
|
||||
time / 1000000000.,
|
||||
cycles / 1000000000.,
|
||||
@@ -1618,7 +1747,7 @@ thread_ctrl::~thread_ctrl()
|
||||
#ifdef _WIN32
|
||||
CloseHandle((HANDLE)m_thread.raw());
|
||||
#else
|
||||
pthread_detach(m_thread.raw());
|
||||
pthread_detach((pthread_t)m_thread.raw());
|
||||
#endif
|
||||
}
|
||||
}
|
||||
@@ -1690,6 +1819,37 @@ void thread_ctrl::test()
|
||||
}
|
||||
}
|
||||
|
||||
void thread_ctrl::set_native_priority(int priority)
|
||||
{
|
||||
#ifdef _WIN32
|
||||
HANDLE _this_thread = GetCurrentThread();
|
||||
INT native_priority = THREAD_PRIORITY_NORMAL;
|
||||
|
||||
switch (priority)
|
||||
{
|
||||
default:
|
||||
case 0:
|
||||
break;
|
||||
case 1:
|
||||
native_priority = THREAD_PRIORITY_ABOVE_NORMAL;
|
||||
break;
|
||||
case -1:
|
||||
native_priority = THREAD_PRIORITY_BELOW_NORMAL;
|
||||
break;
|
||||
}
|
||||
|
||||
SetThreadPriority(_this_thread, native_priority);
|
||||
#endif
|
||||
}
|
||||
|
||||
void thread_ctrl::set_ideal_processor_core(int core)
|
||||
{
|
||||
#ifdef _WIN32
|
||||
HANDLE _this_thread = GetCurrentThread();
|
||||
SetThreadIdealProcessor(_this_thread, core);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
named_thread::named_thread()
|
||||
{
|
||||
@@ -1715,6 +1875,7 @@ void named_thread::start_thread(const std::shared_ptr<void>& _this)
|
||||
try
|
||||
{
|
||||
LOG_TRACE(GENERAL, "Thread started");
|
||||
on_spawn();
|
||||
on_task();
|
||||
LOG_TRACE(GENERAL, "Thread ended");
|
||||
}
|
||||
|
||||
@@ -230,6 +230,9 @@ public:
|
||||
|
||||
thread_ctrl::start(out, std::forward<F>(func));
|
||||
}
|
||||
|
||||
static void set_native_priority(int priority);
|
||||
static void set_ideal_processor_core(int core);
|
||||
};
|
||||
|
||||
class named_thread
|
||||
@@ -258,6 +261,9 @@ protected:
|
||||
// Thread finalization (called after on_task)
|
||||
virtual void on_exit() {}
|
||||
|
||||
// Called once upon thread spawn within the thread's own context
|
||||
virtual void on_spawn() {}
|
||||
|
||||
public:
|
||||
// ID initialization
|
||||
virtual void on_init(const std::shared_ptr<void>& _this)
|
||||
|
||||
@@ -11,32 +11,78 @@
|
||||
#include <sys/types.h>
|
||||
#endif
|
||||
|
||||
namespace memory_helper
|
||||
namespace utils
|
||||
{
|
||||
void* reserve_memory(std::size_t size)
|
||||
// Convert memory protection (internal)
|
||||
static auto operator +(protection prot)
|
||||
{
|
||||
#ifdef _WIN32
|
||||
return verify("reserve_memory" HERE, VirtualAlloc(NULL, size, MEM_RESERVE, PAGE_NOACCESS));
|
||||
DWORD _prot = PAGE_NOACCESS;
|
||||
switch (prot)
|
||||
{
|
||||
case protection::rw: _prot = PAGE_READWRITE; break;
|
||||
case protection::ro: _prot = PAGE_READONLY; break;
|
||||
case protection::no: break;
|
||||
case protection::wx: _prot = PAGE_EXECUTE_READWRITE; break;
|
||||
case protection::rx: _prot = PAGE_EXECUTE_READ; break;
|
||||
}
|
||||
#else
|
||||
return verify("reserve_memory" HERE, ::mmap(nullptr, size, PROT_NONE, MAP_ANON | MAP_PRIVATE, -1, 0));
|
||||
int _prot = PROT_NONE;
|
||||
switch (prot)
|
||||
{
|
||||
case protection::rw: _prot = PROT_READ | PROT_WRITE; break;
|
||||
case protection::ro: _prot = PROT_READ; break;
|
||||
case protection::no: break;
|
||||
case protection::wx: _prot = PROT_READ | PROT_WRITE | PROT_EXEC; break;
|
||||
case protection::rx: _prot = PROT_READ | PROT_EXEC; break;
|
||||
}
|
||||
#endif
|
||||
|
||||
return _prot;
|
||||
}
|
||||
|
||||
void* memory_reserve(std::size_t size, void* use_addr)
|
||||
{
|
||||
#ifdef _WIN32
|
||||
return ::VirtualAlloc(use_addr, size, MEM_RESERVE, PAGE_NOACCESS);
|
||||
#else
|
||||
auto ptr = ::mmap(use_addr, size, PROT_NONE, MAP_ANON | MAP_PRIVATE, -1, 0);
|
||||
|
||||
if (use_addr && ptr != use_addr)
|
||||
{
|
||||
::munmap(ptr, size);
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
return ptr;
|
||||
#endif
|
||||
}
|
||||
|
||||
void commit_page_memory(void* pointer, std::size_t size)
|
||||
void memory_commit(void* pointer, std::size_t size, protection prot)
|
||||
{
|
||||
#ifdef _WIN32
|
||||
verify(HERE), VirtualAlloc(pointer, size, MEM_COMMIT, PAGE_READWRITE);
|
||||
verify(HERE), ::VirtualAlloc(pointer, size, MEM_COMMIT, +prot);
|
||||
#else
|
||||
verify(HERE), ::mprotect((void*)((u64)pointer & -4096), ::align(size, 4096), PROT_READ | PROT_WRITE) != -1;
|
||||
verify(HERE), ::mprotect((void*)((u64)pointer & -4096), ::align(size, 4096), +prot) != -1;
|
||||
#endif
|
||||
}
|
||||
|
||||
void free_reserved_memory(void* pointer, std::size_t size)
|
||||
void memory_decommit(void* pointer, std::size_t size)
|
||||
{
|
||||
#ifdef _WIN32
|
||||
verify(HERE), VirtualFree(pointer, 0, MEM_DECOMMIT);
|
||||
verify(HERE), ::VirtualFree(pointer, 0, MEM_DECOMMIT);
|
||||
#else
|
||||
verify(HERE), ::mmap(pointer, size, PROT_NONE, MAP_FIXED | MAP_ANON | MAP_PRIVATE, -1, 0);
|
||||
#endif
|
||||
}
|
||||
|
||||
void memory_protect(void* pointer, std::size_t size, protection prot)
|
||||
{
|
||||
#ifdef _WIN32
|
||||
DWORD old;
|
||||
verify(HERE), ::VirtualProtect(pointer, size, +prot, &old);
|
||||
#else
|
||||
verify(HERE), ::mprotect((void*)((u64)pointer & -4096), ::align(size, 4096), +prot) != -1;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,22 +1,35 @@
|
||||
#pragma once
|
||||
|
||||
namespace memory_helper
|
||||
namespace utils
|
||||
{
|
||||
// Memory protection type
|
||||
enum class protection
|
||||
{
|
||||
rw, // Read + write (default)
|
||||
ro, // Read only
|
||||
no, // No access
|
||||
wx, // Read + write + execute
|
||||
rx, // Read + execute
|
||||
};
|
||||
|
||||
/**
|
||||
* Reserve `size` bytes of virtual memory and returns it.
|
||||
* The memory should be commited before usage.
|
||||
*/
|
||||
void* reserve_memory(std::size_t size);
|
||||
void* memory_reserve(std::size_t size, void* use_addr = nullptr);
|
||||
|
||||
/**
|
||||
* Commit `size` bytes of virtual memory starting at pointer.
|
||||
* That is, bake reserved memory with physical memory.
|
||||
* pointer should belong to a range of reserved memory.
|
||||
*/
|
||||
void commit_page_memory(void* pointer, std::size_t size);
|
||||
void memory_commit(void* pointer, std::size_t size, protection prot = protection::rw);
|
||||
|
||||
/**
|
||||
* Decommit all memory committed via commit_page_memory.
|
||||
*/
|
||||
void free_reserved_memory(void* pointer, std::size_t size);
|
||||
void memory_decommit(void* pointer, std::size_t size);
|
||||
|
||||
// Set memory protection
|
||||
void memory_protect(void* pointer, std::size_t size, protection prot);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,105 @@
|
||||
#include "bin_patch.h"
|
||||
#include "yaml-cpp/yaml.h"
|
||||
#include "File.h"
|
||||
#include "Config.h"
|
||||
|
||||
template <>
|
||||
void fmt_class_string<patch_type>::format(std::string& out, u64 arg)
|
||||
{
|
||||
format_enum(out, arg, [](patch_type value)
|
||||
{
|
||||
switch (value)
|
||||
{
|
||||
case patch_type::byte: return "byte";
|
||||
case patch_type::le16: return "le16";
|
||||
case patch_type::le32: return "le32";
|
||||
case patch_type::le64: return "le64";
|
||||
case patch_type::be16: return "be16";
|
||||
case patch_type::be32: return "be32";
|
||||
case patch_type::be64: return "be64";
|
||||
}
|
||||
|
||||
return unknown;
|
||||
});
|
||||
}
|
||||
|
||||
void patch_engine::append(const std::string& patch)
|
||||
{
|
||||
if (fs::file f{patch})
|
||||
{
|
||||
auto root = YAML::Load(f.to_string());
|
||||
|
||||
for (auto pair : root)
|
||||
{
|
||||
auto& name = pair.first.Scalar();
|
||||
auto& data = m_map[name];
|
||||
|
||||
for (auto patch : pair.second)
|
||||
{
|
||||
u64 type64 = 0;
|
||||
cfg::try_to_enum_value(&type64, &fmt_class_string<patch_type>::format, patch[0].Scalar());
|
||||
|
||||
struct patch info;
|
||||
info.type = static_cast<patch_type>(type64);
|
||||
info.offset = patch[1].as<u32>();
|
||||
info.value = patch[2].as<u64>();
|
||||
data.emplace_back(info);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void patch_engine::apply(const std::string& name, u8* dst) const
|
||||
{
|
||||
const auto found = m_map.find(name);
|
||||
|
||||
if (found == m_map.cend())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// Apply modifications sequentially
|
||||
for (const auto& p : found->second)
|
||||
{
|
||||
auto ptr = dst + p.offset;
|
||||
|
||||
switch (p.type)
|
||||
{
|
||||
case patch_type::byte:
|
||||
{
|
||||
*ptr = static_cast<u8>(p.value);
|
||||
break;
|
||||
}
|
||||
case patch_type::le16:
|
||||
{
|
||||
*reinterpret_cast<le_t<u16, 1>*>(ptr) = static_cast<u16>(p.value);
|
||||
break;
|
||||
}
|
||||
case patch_type::le32:
|
||||
{
|
||||
*reinterpret_cast<le_t<u32, 1>*>(ptr) = static_cast<u32>(p.value);
|
||||
break;
|
||||
}
|
||||
case patch_type::le64:
|
||||
{
|
||||
*reinterpret_cast<le_t<u64, 1>*>(ptr) = static_cast<u64>(p.value);
|
||||
break;
|
||||
}
|
||||
case patch_type::be16:
|
||||
{
|
||||
*reinterpret_cast<be_t<u16, 1>*>(ptr) = static_cast<u16>(p.value);
|
||||
break;
|
||||
}
|
||||
case patch_type::be32:
|
||||
{
|
||||
*reinterpret_cast<be_t<u32, 1>*>(ptr) = static_cast<u32>(p.value);
|
||||
break;
|
||||
}
|
||||
case patch_type::be64:
|
||||
{
|
||||
*reinterpret_cast<be_t<u64, 1>*>(ptr) = static_cast<u64>(p.value);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
#pragma once
|
||||
|
||||
#include "BEType.h"
|
||||
#include <vector>
|
||||
#include <string>
|
||||
#include <unordered_map>
|
||||
|
||||
enum class patch_type
|
||||
{
|
||||
byte,
|
||||
le16,
|
||||
le32,
|
||||
le64,
|
||||
be16,
|
||||
be32,
|
||||
be64,
|
||||
};
|
||||
|
||||
class patch_engine
|
||||
{
|
||||
struct patch
|
||||
{
|
||||
patch_type type;
|
||||
u32 offset;
|
||||
u64 value;
|
||||
};
|
||||
|
||||
// Database
|
||||
std::unordered_map<std::string, std::vector<patch>> m_map;
|
||||
|
||||
public:
|
||||
// Load from file
|
||||
void append(const std::string& path);
|
||||
|
||||
// Apply patch
|
||||
void apply(const std::string& name, u8* dst) const;
|
||||
};
|
||||
+27
-7
@@ -204,11 +204,11 @@ std::size_t cfmt_append(Dst& out, const Char* fmt, Src&& src)
|
||||
else if (fmt[0] == 'h')
|
||||
{
|
||||
fmt++, ctx.size++;
|
||||
ctx.type = sizeof(char);
|
||||
ctx.type = src.size_char;
|
||||
}
|
||||
else
|
||||
{
|
||||
ctx.type = sizeof(short);
|
||||
ctx.type = src.size_short;
|
||||
}
|
||||
|
||||
break;
|
||||
@@ -223,11 +223,11 @@ std::size_t cfmt_append(Dst& out, const Char* fmt, Src&& src)
|
||||
else if (fmt[0] == 'l')
|
||||
{
|
||||
fmt++, ctx.size++;
|
||||
ctx.type = sizeof(llong);
|
||||
ctx.type = src.size_llong;
|
||||
}
|
||||
else
|
||||
{
|
||||
ctx.type = sizeof(long);
|
||||
ctx.type = src.size_long;
|
||||
}
|
||||
|
||||
break;
|
||||
@@ -241,7 +241,7 @@ std::size_t cfmt_append(Dst& out, const Char* fmt, Src&& src)
|
||||
}
|
||||
else
|
||||
{
|
||||
ctx.type = sizeof(std::size_t);
|
||||
ctx.type = src.size_size;
|
||||
}
|
||||
|
||||
break;
|
||||
@@ -255,7 +255,7 @@ std::size_t cfmt_append(Dst& out, const Char* fmt, Src&& src)
|
||||
}
|
||||
else
|
||||
{
|
||||
ctx.type = sizeof(std::intmax_t);
|
||||
ctx.type = src.size_max;
|
||||
}
|
||||
|
||||
break;
|
||||
@@ -269,7 +269,7 @@ std::size_t cfmt_append(Dst& out, const Char* fmt, Src&& src)
|
||||
}
|
||||
else
|
||||
{
|
||||
ctx.type = sizeof(std::ptrdiff_t);
|
||||
ctx.type = src.size_diff;
|
||||
}
|
||||
|
||||
break;
|
||||
@@ -339,6 +339,11 @@ std::size_t cfmt_append(Dst& out, const Char* fmt, Src&& src)
|
||||
if (!ctx.type)
|
||||
{
|
||||
ctx.type = (u8)src.type(ctx.args);
|
||||
|
||||
if (!ctx.type)
|
||||
{
|
||||
ctx.type = src.size_int;
|
||||
}
|
||||
}
|
||||
|
||||
// Sign-extended argument expected
|
||||
@@ -396,6 +401,11 @@ std::size_t cfmt_append(Dst& out, const Char* fmt, Src&& src)
|
||||
if (!ctx.type)
|
||||
{
|
||||
ctx.type = (u8)src.type(ctx.args);
|
||||
|
||||
if (!ctx.type)
|
||||
{
|
||||
ctx.type = src.size_int;
|
||||
}
|
||||
}
|
||||
|
||||
const u64 mask =
|
||||
@@ -447,6 +457,11 @@ std::size_t cfmt_append(Dst& out, const Char* fmt, Src&& src)
|
||||
if (!ctx.type)
|
||||
{
|
||||
ctx.type = (u8)src.type(ctx.args);
|
||||
|
||||
if (!ctx.type)
|
||||
{
|
||||
ctx.type = src.size_int;
|
||||
}
|
||||
}
|
||||
|
||||
const u64 mask =
|
||||
@@ -505,6 +520,11 @@ std::size_t cfmt_append(Dst& out, const Char* fmt, Src&& src)
|
||||
if (!ctx.type)
|
||||
{
|
||||
ctx.type = (u8)src.type(ctx.args);
|
||||
|
||||
if (!ctx.type)
|
||||
{
|
||||
ctx.type = src.size_int;
|
||||
}
|
||||
}
|
||||
|
||||
const u64 mask =
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
#include "cond.h"
|
||||
#include "sync.h"
|
||||
|
||||
#include <limits.h>
|
||||
|
||||
#ifndef _WIN32
|
||||
#include <thread>
|
||||
#endif
|
||||
|
||||
+24
-10
@@ -1,6 +1,8 @@
|
||||
#include "mutex.h"
|
||||
#include "sync.h"
|
||||
|
||||
#include <limits.h>
|
||||
|
||||
void shared_mutex::imp_lock_shared(s64 _old)
|
||||
{
|
||||
verify("shared_mutex overflow" HERE), _old <= c_max;
|
||||
@@ -21,9 +23,12 @@ void shared_mutex::imp_lock_shared(s64 _old)
|
||||
// Acquire writer lock
|
||||
imp_wait(m_value.load());
|
||||
|
||||
// Convert value
|
||||
// Convert to reader lock
|
||||
s64 value = m_value.fetch_add(c_one - c_min);
|
||||
|
||||
// Proceed exclusively
|
||||
return;
|
||||
|
||||
if (value != 0)
|
||||
{
|
||||
imp_unlock(value);
|
||||
@@ -35,7 +40,14 @@ void shared_mutex::imp_lock_shared(s64 _old)
|
||||
NtWaitForKeyedEvent(nullptr, (int*)&m_value + 1, false, nullptr);
|
||||
}
|
||||
#else
|
||||
while (true)
|
||||
// Acquire writer lock
|
||||
imp_wait(0);
|
||||
|
||||
// Convert to reader lock
|
||||
m_value += c_one - c_min;
|
||||
|
||||
// Disabled code
|
||||
while (false)
|
||||
{
|
||||
const s64 value0 = m_value.fetch_op([](s64& value)
|
||||
{
|
||||
@@ -63,13 +75,13 @@ void shared_mutex::imp_lock_shared(s64 _old)
|
||||
|
||||
value1 += c_one - c_min;
|
||||
|
||||
if (value1 >= 0)
|
||||
if (value1 > 0)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// Wait as a reader if necessary
|
||||
while (futex((int*)&m_value.raw() + IS_LE_MACHINE, FUTEX_WAIT_PRIVATE, int(value1 >> 32), nullptr, nullptr, 0))
|
||||
while (futex((int*)&m_value.raw() + IS_LE_MACHINE, FUTEX_WAIT_BITSET_PRIVATE, int(value1 >> 32), nullptr, nullptr, INT_MIN))
|
||||
{
|
||||
value1 = m_value.load();
|
||||
|
||||
@@ -110,7 +122,7 @@ void shared_mutex::imp_unlock_shared(s64 _old)
|
||||
#else
|
||||
m_value -= c_sig;
|
||||
|
||||
futex((int*)&m_value.raw() + IS_BE_MACHINE, FUTEX_WAKE_PRIVATE, 1, nullptr, nullptr, 0);
|
||||
futex((int*)&m_value.raw() + IS_LE_MACHINE, FUTEX_WAKE_BITSET_PRIVATE, 1, nullptr, nullptr, u32(c_sig >> 32));
|
||||
#endif
|
||||
}
|
||||
}
|
||||
@@ -145,7 +157,7 @@ void shared_mutex::imp_wait(s64)
|
||||
return;
|
||||
}
|
||||
|
||||
futex((int*)&m_value.raw() + IS_BE_MACHINE, FUTEX_WAIT_PRIVATE, int(value), nullptr, nullptr, 0);
|
||||
futex((int*)&m_value.raw() + IS_LE_MACHINE, FUTEX_WAIT_BITSET_PRIVATE, int(value >> 32), nullptr, nullptr, u32(c_sig >> 32));
|
||||
}
|
||||
#endif
|
||||
}
|
||||
@@ -180,8 +192,9 @@ void shared_mutex::imp_unlock(s64 _old)
|
||||
{
|
||||
NtReleaseKeyedEvent(nullptr, &m_value, false, nullptr);
|
||||
}
|
||||
else if (s64 count = -_old / c_min)
|
||||
else if (s64 count = -_old / c_min * 0)
|
||||
{
|
||||
// Disabled code
|
||||
while (count--)
|
||||
{
|
||||
NtReleaseKeyedEvent(nullptr, (int*)&m_value + 1, false, nullptr);
|
||||
@@ -192,11 +205,12 @@ void shared_mutex::imp_unlock(s64 _old)
|
||||
{
|
||||
m_value -= c_sig;
|
||||
|
||||
futex((int*)&m_value.raw() + IS_BE_MACHINE, FUTEX_WAKE_PRIVATE, 1, nullptr, nullptr, 0);
|
||||
futex((int*)&m_value.raw() + IS_LE_MACHINE, FUTEX_WAKE_BITSET_PRIVATE, 1, nullptr, nullptr, u32(c_sig >> 32));
|
||||
}
|
||||
else if (s64 count = -_old / c_min)
|
||||
else if (false)
|
||||
{
|
||||
futex((int*)&m_value.raw() + IS_LE_MACHINE, FUTEX_WAKE_PRIVATE, INT_MAX, nullptr, nullptr, 0);
|
||||
// Disabled code
|
||||
futex((int*)&m_value.raw() + IS_LE_MACHINE, FUTEX_WAKE_BITSET_PRIVATE, INT_MAX, nullptr, nullptr, INT_MIN);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
+118
-13
@@ -12,6 +12,7 @@
|
||||
#include <type_traits>
|
||||
#include <utility>
|
||||
#include <chrono>
|
||||
#include <array>
|
||||
|
||||
// Assume little-endian
|
||||
#define IS_LE_MACHINE 1
|
||||
@@ -45,9 +46,6 @@
|
||||
// Return 32 bit alignof() to avoid widening/narrowing conversions with size_t
|
||||
#define ALIGN_32(...) static_cast<u32>(alignof(__VA_ARGS__))
|
||||
|
||||
// Return 32 bit offsetof()
|
||||
#define OFFSET_32(type, x) static_cast<u32>(reinterpret_cast<std::uintptr_t>(&reinterpret_cast<const volatile char&>(reinterpret_cast<type*>(0ull)->x)))
|
||||
|
||||
#define CONCATENATE_DETAIL(x, y) x ## y
|
||||
#define CONCATENATE(x, y) CONCATENATE_DETAIL(x, y)
|
||||
|
||||
@@ -72,6 +70,8 @@ using ulong = unsigned long;
|
||||
using ullong = unsigned long long;
|
||||
using llong = long long;
|
||||
|
||||
using uptr = std::uintptr_t;
|
||||
|
||||
using u8 = std::uint8_t;
|
||||
using u16 = std::uint16_t;
|
||||
using u32 = std::uint32_t;
|
||||
@@ -450,6 +450,71 @@ constexpr T align(const T& value, ullong align)
|
||||
return static_cast<T>((value + (align - 1)) & ~(align - 1));
|
||||
}
|
||||
|
||||
template <typename T, typename T2>
|
||||
inline u32 offset32(T T2::*const mptr)
|
||||
{
|
||||
#ifdef _MSC_VER
|
||||
static_assert(sizeof(mptr) == sizeof(u32), "Invalid pointer-to-member size");
|
||||
return reinterpret_cast<const u32&>(mptr);
|
||||
#elif __GNUG__
|
||||
static_assert(sizeof(mptr) == sizeof(std::size_t), "Invalid pointer-to-member size");
|
||||
return static_cast<u32>(reinterpret_cast<const std::size_t&>(mptr));
|
||||
#else
|
||||
static_assert(sizeof(mptr) == 0, "Invalid pointer-to-member size");
|
||||
#endif
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
struct offset32_array
|
||||
{
|
||||
static_assert(std::is_array<T>::value, "Invalid pointer-to-member type (array expected)");
|
||||
|
||||
template <typename Arg>
|
||||
static inline u32 index32(const Arg& arg)
|
||||
{
|
||||
return SIZE_32(std::remove_extent_t<T>) * static_cast<u32>(arg);
|
||||
}
|
||||
};
|
||||
|
||||
template <typename T, std::size_t N>
|
||||
struct offset32_array<std::array<T, N>>
|
||||
{
|
||||
template <typename Arg>
|
||||
static inline u32 index32(const Arg& arg)
|
||||
{
|
||||
return SIZE_32(T) * static_cast<u32>(arg);
|
||||
}
|
||||
};
|
||||
|
||||
template <typename Arg>
|
||||
struct offset32_detail;
|
||||
|
||||
template <typename T, typename T2, typename Arg, typename... Args>
|
||||
inline u32 offset32(T T2::*const mptr, const Arg& arg, const Args&... args)
|
||||
{
|
||||
return offset32_detail<Arg>::offset32(mptr, arg, args...);
|
||||
}
|
||||
|
||||
template <typename Arg>
|
||||
struct offset32_detail
|
||||
{
|
||||
template <typename T, typename T2, typename... Args>
|
||||
static inline u32 offset32(T T2::*const mptr, const Arg& arg, const Args&... args)
|
||||
{
|
||||
return ::offset32(mptr, args...) + offset32_array<T>::index32(arg);
|
||||
}
|
||||
};
|
||||
|
||||
template <typename T3, typename T4>
|
||||
struct offset32_detail<T3 T4::*>
|
||||
{
|
||||
template <typename T, typename T2, typename... Args>
|
||||
static inline u32 offset32(T T2::*const mptr, T3 T4::*const mptr2, const Args&... args)
|
||||
{
|
||||
return ::offset32(mptr) + ::offset32(mptr2, args...);
|
||||
}
|
||||
};
|
||||
|
||||
inline u32 cntlz32(u32 arg, bool nonzero = false)
|
||||
{
|
||||
#ifdef _MSC_VER
|
||||
@@ -909,45 +974,85 @@ inline void busy_wait(std::size_t count = 100)
|
||||
// Rotate helpers
|
||||
#if defined(__GNUG__)
|
||||
|
||||
inline u8 rol8(const u8 x, const u8 n)
|
||||
inline u8 rol8(u8 x, u8 n)
|
||||
{
|
||||
u8 result = x;
|
||||
__asm__("rolb %[n], %[result]" : [result] "+g" (result) : [n] "c" (n));
|
||||
return result;
|
||||
}
|
||||
|
||||
inline u16 rol16(const u16 x, const u16 n)
|
||||
inline u8 ror8(u8 x, u8 n)
|
||||
{
|
||||
u8 result = x;
|
||||
__asm__("rorb %[n], %[result]" : [result] "+g" (result) : [n] "c" (n));
|
||||
return result;
|
||||
}
|
||||
|
||||
inline u16 rol16(u16 x, u16 n)
|
||||
{
|
||||
u16 result = x;
|
||||
__asm__("rolw %b[n], %[result]" : [result] "+g" (result) : [n] "c" (n));
|
||||
return result;
|
||||
}
|
||||
|
||||
inline u32 rol32(const u32 x, const u32 n)
|
||||
inline u16 ror16(u16 x, u16 n)
|
||||
{
|
||||
u16 result = x;
|
||||
__asm__("rorw %b[n], %[result]" : [result] "+g" (result) : [n] "c" (n));
|
||||
return result;
|
||||
}
|
||||
|
||||
inline u32 rol32(u32 x, u32 n)
|
||||
{
|
||||
u32 result = x;
|
||||
__asm__("roll %b[n], %[result]" : [result] "+g" (result) : [n] "c" (n));
|
||||
return result;
|
||||
}
|
||||
|
||||
inline u64 rol64(const u64 x, const u64 n)
|
||||
inline u32 ror32(u32 x, u32 n)
|
||||
{
|
||||
u32 result = x;
|
||||
__asm__("rorl %b[n], %[result]" : [result] "+g" (result) : [n] "c" (n));
|
||||
return result;
|
||||
}
|
||||
|
||||
inline u64 rol64(u64 x, u64 n)
|
||||
{
|
||||
u64 result = x;
|
||||
__asm__("rolq %b[n], %[result]" : [result] "+g" (result) : [n] "c" (n));
|
||||
return result;
|
||||
}
|
||||
|
||||
inline u64 ror64(const u64 x, const u64 n)
|
||||
inline u64 ror64(u64 x, u64 n)
|
||||
{
|
||||
u64 result = x;
|
||||
__asm__("rorq %b[n], %[result]" : [result] "+g" (result) : [n] "c" (n));
|
||||
return result;
|
||||
}
|
||||
|
||||
inline u64 umulh64(u64 a, u64 b)
|
||||
{
|
||||
u64 result;
|
||||
__asm__("mulq %[b]" : "=d" (result) : [a] "a" (a), [b] "rm" (b));
|
||||
return result;
|
||||
}
|
||||
|
||||
inline s64 mulh64(s64 a, s64 b)
|
||||
{
|
||||
s64 result;
|
||||
__asm__("imulq %[b]" : "=d" (result) : [a] "a" (a), [b] "rm" (b));
|
||||
return result;
|
||||
}
|
||||
|
||||
#elif defined(_MSC_VER)
|
||||
inline u8 rol8(const u8 x, const u8 n) { return _rotl8(x, n); }
|
||||
inline u16 rol16(const u16 x, const u16 n) { return _rotl16(x, (u8)n); }
|
||||
inline u32 rol32(const u32 x, const u32 n) { return _rotl(x, (int)n); }
|
||||
inline u64 rol64(const u64 x, const u64 n) { return _rotl64(x, (int)n); }
|
||||
inline u64 ror64(const u64 x, const u64 n) { return _rotr64(x, (int)n); }
|
||||
inline u8 rol8(u8 x, u8 n) { return _rotl8(x, n); }
|
||||
inline u8 ror8(u8 x, u8 n) { return _rotr8(x, n); }
|
||||
inline u16 rol16(u16 x, u16 n) { return _rotl16(x, (u8)n); }
|
||||
inline u16 ror16(u16 x, u16 n) { return _rotr16(x, (u8)n); }
|
||||
inline u32 rol32(u32 x, u32 n) { return _rotl(x, (int)n); }
|
||||
inline u32 ror32(u32 x, u32 n) { return _rotr(x, (int)n); }
|
||||
inline u64 rol64(u64 x, u64 n) { return _rotl64(x, (int)n); }
|
||||
inline u64 ror64(u64 x, u64 n) { return _rotr64(x, (int)n); }
|
||||
inline u64 umulh64(u64 x, u64 y) { return __umulh(x, y); }
|
||||
inline s64 mulh64(s64 x, s64 y) { return __mulh(x, y); }
|
||||
#endif
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
+1
-1
Submodule Utilities/yaml-cpp updated: bc71686835...017626a6ce
@@ -19,7 +19,7 @@
|
||||
<PropertyGroup Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
<PlatformToolset>v140</PlatformToolset>
|
||||
<PlatformToolset>v141</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
@@ -54,6 +54,7 @@
|
||||
</ClCompile>
|
||||
<ClCompile Include="yaml-cpp\src\emitterutils.cpp">
|
||||
</ClCompile>
|
||||
<ClCompile Include="yaml-cpp\src\exceptions.cpp" />
|
||||
<ClCompile Include="yaml-cpp\src\exp.cpp">
|
||||
</ClCompile>
|
||||
<ClCompile Include="yaml-cpp\src\memory.cpp">
|
||||
|
||||
@@ -7,85 +7,88 @@
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="src\binary.cpp">
|
||||
<ClCompile Include="yaml-cpp\src\binary.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\convert.cpp">
|
||||
<ClCompile Include="yaml-cpp\src\convert.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\directives.cpp">
|
||||
<ClCompile Include="yaml-cpp\src\directives.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\emit.cpp">
|
||||
<ClCompile Include="yaml-cpp\src\emit.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\emitfromevents.cpp">
|
||||
<ClCompile Include="yaml-cpp\src\emitfromevents.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\emitter.cpp">
|
||||
<ClCompile Include="yaml-cpp\src\emitter.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\emitterstate.cpp">
|
||||
<ClCompile Include="yaml-cpp\src\emitterstate.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\emitterutils.cpp">
|
||||
<ClCompile Include="yaml-cpp\src\emitterutils.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\exp.cpp">
|
||||
<ClCompile Include="yaml-cpp\src\exp.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\memory.cpp">
|
||||
<ClCompile Include="yaml-cpp\src\memory.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\node.cpp">
|
||||
<ClCompile Include="yaml-cpp\src\node.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\node_data.cpp">
|
||||
<ClCompile Include="yaml-cpp\src\nodebuilder.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\nodebuilder.cpp">
|
||||
<ClCompile Include="yaml-cpp\src\nodeevents.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\nodeevents.cpp">
|
||||
<ClCompile Include="yaml-cpp\src\node_data.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\null.cpp">
|
||||
<ClCompile Include="yaml-cpp\src\null.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\ostream_wrapper.cpp">
|
||||
<ClCompile Include="yaml-cpp\src\ostream_wrapper.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\parse.cpp">
|
||||
<ClCompile Include="yaml-cpp\src\parse.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\parser.cpp">
|
||||
<ClCompile Include="yaml-cpp\src\parser.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\regex_yaml.cpp">
|
||||
<ClCompile Include="yaml-cpp\src\regex_yaml.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\scanner.cpp">
|
||||
<ClCompile Include="yaml-cpp\src\scanner.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\scanscalar.cpp">
|
||||
<ClCompile Include="yaml-cpp\src\scanscalar.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\scantag.cpp">
|
||||
<ClCompile Include="yaml-cpp\src\scantag.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\scantoken.cpp">
|
||||
<ClCompile Include="yaml-cpp\src\scantoken.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\simplekey.cpp">
|
||||
<ClCompile Include="yaml-cpp\src\simplekey.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\singledocparser.cpp">
|
||||
<ClCompile Include="yaml-cpp\src\singledocparser.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\stream.cpp">
|
||||
<ClCompile Include="yaml-cpp\src\stream.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\tag.cpp">
|
||||
<ClCompile Include="yaml-cpp\src\tag.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="yaml-cpp\src\exceptions.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
|
||||
@@ -1,4 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup />
|
||||
</Project>
|
||||
Submodule Vulkan/Vulkan-LoaderAndValidationLayers updated: 64d375f52e...115665a3b5
@@ -19,12 +19,12 @@
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||
<ConfigurationType>Makefile</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<PlatformToolset>v140</PlatformToolset>
|
||||
<PlatformToolset>v141</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
<ConfigurationType>Makefile</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<PlatformToolset>v140</PlatformToolset>
|
||||
<PlatformToolset>v141</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
@@ -39,21 +39,21 @@
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<NMakeBuildCommandLine>cmake -G "Visual Studio 14 2015 Win64" -DCMAKE_CONFIGURATION_TYPES="Debug;Release" -DBUILD_TESTS=OFF -DBUILD_DEMOS=OFF -DBUILD_LAYERS=OFF -DBUILD_VKJSON=OFF ../Vulkan-LoaderAndValidationLayers
|
||||
msbuild.exe ALL_BUILD.vcxproj /t:build /p:Configuration=Release</NMakeBuildCommandLine>
|
||||
<NMakeCleanCommandLine>cmake -G "Visual Studio 14 2015 Win64" -DCMAKE_CONFIGURATION_TYPES="Debug;Release" -DBUILD_TESTS=OFF -DBUILD_DEMOS=OFF -DBUILD_LAYERS=OFF -DBUILD_VKJSON=OFF ../Vulkan-LoaderAndValidationLayers
|
||||
msbuild.exe ALL_BUILD.vcxproj /t:clean /p:Configuration=Release</NMakeCleanCommandLine>
|
||||
<NMakeReBuildCommandLine>cmake -G "Visual Studio 14 2015 Win64" -DCMAKE_CONFIGURATION_TYPES="Debug;Release" -DBUILD_TESTS=OFF -DBUILD_DEMOS=OFF -DBUILD_LAYERS=OFF -DBUILD_VKJSON=OFF ../Vulkan-LoaderAndValidationLayers
|
||||
msbuild.exe ALL_BUILD.vcxproj /t:rebuild /p:Configuration=Release
|
||||
<NMakeBuildCommandLine>cmake -G "Visual Studio 15 2017 Win64" -DCMAKE_CONFIGURATION_TYPES="Debug;Release" -DBUILD_TESTS=OFF -DBUILD_DEMOS=OFF -DBUILD_LAYERS=OFF -DBUILD_VKJSON=OFF ../Vulkan-LoaderAndValidationLayers
|
||||
msbuild.exe ALL_BUILD.vcxproj /t:build /p:Configuration=Release /m</NMakeBuildCommandLine>
|
||||
<NMakeCleanCommandLine>cmake -G "Visual Studio 15 2017 Win64" -DCMAKE_CONFIGURATION_TYPES="Debug;Release" -DBUILD_TESTS=OFF -DBUILD_DEMOS=OFF -DBUILD_LAYERS=OFF -DBUILD_VKJSON=OFF ../Vulkan-LoaderAndValidationLayers
|
||||
msbuild.exe ALL_BUILD.vcxproj /t:clean /p:Configuration=Release /m</NMakeCleanCommandLine>
|
||||
<NMakeReBuildCommandLine>cmake -G "Visual Studio 15 2017 Win64" -DCMAKE_CONFIGURATION_TYPES="Debug;Release" -DBUILD_TESTS=OFF -DBUILD_DEMOS=OFF -DBUILD_LAYERS=OFF -DBUILD_VKJSON=OFF ../Vulkan-LoaderAndValidationLayers
|
||||
msbuild.exe ALL_BUILD.vcxproj /t:rebuild /p:Configuration=Release /m
|
||||
</NMakeReBuildCommandLine>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<NMakeBuildCommandLine>cmake -G "Visual Studio 14 2015 Win64" -DCMAKE_CONFIGURATION_TYPES="Debug;Release" -DBUILD_TESTS=OFF -DBUILD_DEMOS=OFF -DBUILD_LAYERS=OFF -DBUILD_VKJSON=OFF ../Vulkan-LoaderAndValidationLayers
|
||||
msbuild.exe ALL_BUILD.vcxproj /t:build /p:Configuration=Debug</NMakeBuildCommandLine>
|
||||
<NMakeReBuildCommandLine>cmake -G "Visual Studio 14 2015 Win64" -DCMAKE_CONFIGURATION_TYPES="Debug;Release" -DBUILD_TESTS=OFF -DBUILD_DEMOS=OFF -DBUILD_LAYERS=OFF -DBUILD_VKJSON=OFF ../Vulkan-LoaderAndValidationLayers
|
||||
msbuild.exe ALL_BUILD.vcxproj /t:rebuild /p:Configuration=Debug</NMakeReBuildCommandLine>
|
||||
<NMakeCleanCommandLine>cmake -G "Visual Studio 14 2015 Win64" -DCMAKE_CONFIGURATION_TYPES="Debug;Release" -DBUILD_TESTS=OFF -DBUILD_DEMOS=OFF -DBUILD_LAYERS=OFF -DBUILD_VKJSON=OFF ../Vulkan-LoaderAndValidationLayers
|
||||
msbuild.exe ALL_BUILD.vcxproj /t:clean /p:Configuration=Debug</NMakeCleanCommandLine>
|
||||
<NMakeBuildCommandLine>cmake -G "Visual Studio 15 2017 Win64" -DCMAKE_CONFIGURATION_TYPES="Debug;Release" -DBUILD_TESTS=OFF -DBUILD_DEMOS=OFF -DBUILD_LAYERS=OFF -DBUILD_VKJSON=OFF ../Vulkan-LoaderAndValidationLayers
|
||||
msbuild.exe ALL_BUILD.vcxproj /t:build /p:Configuration=Debug /m</NMakeBuildCommandLine>
|
||||
<NMakeReBuildCommandLine>cmake -G "Visual Studio 15 2017 Win64" -DCMAKE_CONFIGURATION_TYPES="Debug;Release" -DBUILD_TESTS=OFF -DBUILD_DEMOS=OFF -DBUILD_LAYERS=OFF -DBUILD_VKJSON=OFF ../Vulkan-LoaderAndValidationLayers
|
||||
msbuild.exe ALL_BUILD.vcxproj /t:rebuild /p:Configuration=Debug /m</NMakeReBuildCommandLine>
|
||||
<NMakeCleanCommandLine>cmake -G "Visual Studio 15 2017 Win64" -DCMAKE_CONFIGURATION_TYPES="Debug;Release" -DBUILD_TESTS=OFF -DBUILD_DEMOS=OFF -DBUILD_LAYERS=OFF -DBUILD_VKJSON=OFF ../Vulkan-LoaderAndValidationLayers
|
||||
msbuild.exe ALL_BUILD.vcxproj /t:clean /p:Configuration=Debug /m</NMakeCleanCommandLine>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup>
|
||||
</ItemDefinitionGroup>
|
||||
|
||||
+1
-1
Submodule Vulkan/glslang updated: 2921e0c54a...0e07119ae2
@@ -19,12 +19,12 @@
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||
<ConfigurationType>Makefile</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<PlatformToolset>v140</PlatformToolset>
|
||||
<PlatformToolset>v141</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
<ConfigurationType>Makefile</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<PlatformToolset>v140</PlatformToolset>
|
||||
<PlatformToolset>v141</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
@@ -39,25 +39,25 @@
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<NMakeBuildCommandLine>cmake -G "Visual Studio 14 2015 Win64" -DCMAKE_CONFIGURATION_TYPES="Debug;Release" ../glslang
|
||||
msbuild.exe ALL_BUILD.vcxproj /t:build /p:Configuration=Release</NMakeBuildCommandLine>
|
||||
<NMakeReBuildCommandLine>cmake -G "Visual Studio 14 2015 Win64" -DCMAKE_CONFIGURATION_TYPES="Debug;Release" ../glslang
|
||||
msbuild.exe ALL_BUILD.vcxproj /t:rebuild /p:Configuration=Release</NMakeReBuildCommandLine>
|
||||
<NMakeCleanCommandLine>cmake -G "Visual Studio 14 2015 Win64" -DCMAKE_CONFIGURATION_TYPES="Debug;Release" ../glslang
|
||||
msbuild.exe ALL_BUILD.vcxproj /t:clean /p:Configuration=Release</NMakeCleanCommandLine>
|
||||
<NMakeBuildCommandLine>cmake -G "Visual Studio 15 2017 Win64" -DCMAKE_CONFIGURATION_TYPES="Debug;Release" ../glslang
|
||||
msbuild.exe ALL_BUILD.vcxproj /t:build /p:Configuration=Release /m</NMakeBuildCommandLine>
|
||||
<NMakeReBuildCommandLine>cmake -G "Visual Studio 15 2017 Win64" -DCMAKE_CONFIGURATION_TYPES="Debug;Release" ../glslang
|
||||
msbuild.exe ALL_BUILD.vcxproj /t:rebuild /p:Configuration=Release /m</NMakeReBuildCommandLine>
|
||||
<NMakeCleanCommandLine>cmake -G "Visual Studio 15 2017 Win64" -DCMAKE_CONFIGURATION_TYPES="Debug;Release" ../glslang
|
||||
msbuild.exe ALL_BUILD.vcxproj /t:clean /p:Configuration=Release /m</NMakeCleanCommandLine>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<NMakeBuildCommandLine>
|
||||
cmake -G "Visual Studio 14 2015 Win64" -DCMAKE_CONFIGURATION_TYPES="Debug;Release" ../glslang
|
||||
msbuild.exe ALL_BUILD.vcxproj /t:build /p:Configuration=Debug
|
||||
cmake -G "Visual Studio 15 2017 Win64" -DCMAKE_CONFIGURATION_TYPES="Debug;Release" ../glslang
|
||||
msbuild.exe ALL_BUILD.vcxproj /t:build /p:Configuration=Debug /m
|
||||
</NMakeBuildCommandLine>
|
||||
<NMakeReBuildCommandLine>
|
||||
cmake -G "Visual Studio 14 2015 Win64" -DCMAKE_CONFIGURATION_TYPES="Debug;Release" ../glslang
|
||||
msbuild.exe ALL_BUILD.vcxproj /t:rebuild /p:Configuration=Debug
|
||||
cmake -G "Visual Studio 15 2017 Win64" -DCMAKE_CONFIGURATION_TYPES="Debug;Release" ../glslang
|
||||
msbuild.exe ALL_BUILD.vcxproj /t:rebuild /p:Configuration=Debug /m
|
||||
</NMakeReBuildCommandLine>
|
||||
<NMakeCleanCommandLine>
|
||||
cmake -G "Visual Studio 14 2015 Win64" -DCMAKE_CONFIGURATION_TYPES="Debug;Release" ../glslang
|
||||
msbuild.exe ALL_BUILD.vcxproj /t:clean /p:Configuration=Debug
|
||||
cmake -G "Visual Studio 15 2017 Win64" -DCMAKE_CONFIGURATION_TYPES="Debug;Release" ../glslang
|
||||
msbuild.exe ALL_BUILD.vcxproj /t:clean /p:Configuration=Debug /m
|
||||
</NMakeCleanCommandLine>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup>
|
||||
|
||||
+14
-11
@@ -1,6 +1,6 @@
|
||||
version: '0.0.2-{build}'
|
||||
|
||||
os: Visual Studio 2015
|
||||
os: Visual Studio 2017
|
||||
platform: x64
|
||||
clone_folder: C:\rpcs3
|
||||
clone_depth: 3
|
||||
@@ -12,27 +12,30 @@ configuration:
|
||||
|
||||
before_build:
|
||||
- ps: $env:Date="$(git show -s --date=short --format='%ad')"
|
||||
- git submodule update --init 3rdparty/ffmpeg 3rdparty/pugixml asmjit 3rdparty/GSL 3rdparty/libpng Vulkan/glslang Vulkan/Vulkan-LoaderAndValidationLayers Utilities/yaml-cpp rsx_program_decompiler 3rdparty/cereal
|
||||
- 7z x wxWidgets.7z -aos -oC:\rpcs3\wxWidgets > null
|
||||
- git submodule update --init 3rdparty/ffmpeg 3rdparty/pugixml asmjit 3rdparty/GSL 3rdparty/libpng Vulkan/glslang Vulkan/Vulkan-LoaderAndValidationLayers Utilities/yaml-cpp 3rdparty/cereal 3rdparty/zlib 3rdparty/hidapi
|
||||
- 7z x zlib.7z -aos -oC:\rpcs3\ > null
|
||||
- 7z x vulkan.7z -aos -oC:\rpcs3\Vulkan > null
|
||||
- if %configuration%==Release (cmake -G "Visual Studio 14 Win64" -DZLIB_ROOT=C:/rpcs3/zlib/ -DVULKAN_PREBUILT=ON)
|
||||
else (7z x llvmlibs.7z -aos -oC:\rpcs3 > null && cmake -G "Visual Studio 14 Win64" -DLLVM_DIR=C:/rpcs3/llvm_build/share/llvm/cmake -DZLIB_ROOT=C:/rpcs3/zlib/ -DVULKAN_PREBUILT=ON)
|
||||
- if %configuration%==Release (cmake -G "Visual Studio 15 Win64" -DZLIB_ROOT=C:/rpcs3/zlib/ -DVULKAN_PREBUILT=ON)
|
||||
else (7z x llvmlibs.7z -aos -oC:\rpcs3 > null && cmake -G "Visual Studio 15 Win64" -DLLVM_DIR=C:/rpcs3/llvm_build/lib/cmake/llvm -DZLIB_ROOT=C:/rpcs3/zlib/ -DVULKAN_PREBUILT=ON)
|
||||
|
||||
build_script:
|
||||
- cmake --build . --config Release -- /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll"
|
||||
|
||||
install:
|
||||
- appveyor DownloadFile "https://dl.dropboxusercontent.com/s/c1by0uulee6g8th/wxWidgets.7z?dl=0" -FileName wxWidgets.7z
|
||||
- appveyor DownloadFile "https://drive.google.com/uc?export=download&id=0B-98fOyaZKJ5YWVnb29JZXFQWkU" -FileName llvmlibs.7z
|
||||
- appveyor DownloadFile "https://drive.google.com/uc?export=download&id=0B8A6NaxhQAGRa21fbDQteTN1dGs" -FileName vulkan.7z
|
||||
- appveyor DownloadFile "https://drive.google.com/uc?export=download&id=0B6v_qtb9hkicQ2hHa2dRbF83cE0" -FileName zlib.7z
|
||||
- set WXWIN=C:\rpcs3\wxWidgets
|
||||
- if not exist llvmlibs.7z appveyor DownloadFile "https://drive.google.com/uc?export=download&id=0B8A6NaxhQAGRY2k3Q2Yya05lcm8" -FileName llvmlibs.7z
|
||||
- if not exist vulkan.7z appveyor DownloadFile "https://drive.google.com/uc?export=download&id=0B8A6NaxhQAGRaHYxV3VOS2d0a0U" -FileName vulkan.7z
|
||||
- if not exist zlib.7z appveyor DownloadFile "https://drive.google.com/uc?export=download&id=0B-HVE3xvheVFX05lRFdnZlh5aUU" -FileName zlib.7z
|
||||
- set QTDIR=C:\Qt\5.9\msvc2017_64
|
||||
- set OPENALDIR=C:\rpcs3\3rdparty\OpenAL
|
||||
- set PATH=C:\Program Files (x86)\MSBuild\14.0\Bin;C:\wxWidgets;%PATH%
|
||||
- set PATH=C:\Program Files (x86)\MSBuild\15.0\Bin;%QTDIR%;%PATH%
|
||||
- set COMMIT_SHA=%APPVEYOR_REPO_COMMIT:~0,8%
|
||||
|
||||
artifacts:
|
||||
- path: bin
|
||||
name: 'rpcs3-v0.0.2-$(Date)-$(COMMIT_SHA)_win64'
|
||||
type: zip
|
||||
|
||||
cache:
|
||||
- llvmlibs.7z -> appveyor.yml
|
||||
- vulkan.7z -> appveyor.yml
|
||||
- zlib.7z -> appveyor.yml
|
||||
|
||||
+1
-1
Submodule asmjit updated: b0dad1af25...1370fe6a26
+29
-22
@@ -23,47 +23,53 @@
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="..\asmjit\src\asmjit\base\arch.cpp" />
|
||||
<ClCompile Include="..\asmjit\src\asmjit\base\assembler.cpp" />
|
||||
<ClCompile Include="..\asmjit\src\asmjit\base\codegen.cpp" />
|
||||
<ClCompile Include="..\asmjit\src\asmjit\base\compiler.cpp" />
|
||||
<ClCompile Include="..\asmjit\src\asmjit\base\codebuilder.cpp" />
|
||||
<ClCompile Include="..\asmjit\src\asmjit\base\codecompiler.cpp" />
|
||||
<ClCompile Include="..\asmjit\src\asmjit\base\codeemitter.cpp" />
|
||||
<ClCompile Include="..\asmjit\src\asmjit\base\codeholder.cpp" />
|
||||
<ClCompile Include="..\asmjit\src\asmjit\base\constpool.cpp" />
|
||||
<ClCompile Include="..\asmjit\src\asmjit\base\containers.cpp" />
|
||||
<ClCompile Include="..\asmjit\src\asmjit\base\context.cpp" />
|
||||
<ClCompile Include="..\asmjit\src\asmjit\base\cpuinfo.cpp" />
|
||||
<ClCompile Include="..\asmjit\src\asmjit\base\cputicks.cpp" />
|
||||
<ClCompile Include="..\asmjit\src\asmjit\base\error.cpp" />
|
||||
<ClCompile Include="..\asmjit\src\asmjit\base\func.cpp" />
|
||||
<ClCompile Include="..\asmjit\src\asmjit\base\globals.cpp" />
|
||||
<ClCompile Include="..\asmjit\src\asmjit\base\intutil.cpp" />
|
||||
<ClCompile Include="..\asmjit\src\asmjit\base\logger.cpp" />
|
||||
<ClCompile Include="..\asmjit\src\asmjit\base\inst.cpp" />
|
||||
<ClCompile Include="..\asmjit\src\asmjit\base\logging.cpp" />
|
||||
<ClCompile Include="..\asmjit\src\asmjit\base\osutils.cpp" />
|
||||
<ClCompile Include="..\asmjit\src\asmjit\base\operand.cpp" />
|
||||
<ClCompile Include="..\asmjit\src\asmjit\base\regalloc.cpp" />
|
||||
<ClCompile Include="..\asmjit\src\asmjit\base\runtime.cpp" />
|
||||
<ClCompile Include="..\asmjit\src\asmjit\base\string.cpp" />
|
||||
<ClCompile Include="..\asmjit\src\asmjit\base\vmem.cpp" />
|
||||
<ClCompile Include="..\asmjit\src\asmjit\base\zone.cpp" />
|
||||
<ClCompile Include="..\asmjit\src\asmjit\x86\x86assembler.cpp" />
|
||||
<ClCompile Include="..\asmjit\src\asmjit\x86\x86compiler.cpp" />
|
||||
<ClCompile Include="..\asmjit\src\asmjit\x86\x86context.cpp" />
|
||||
<ClCompile Include="..\asmjit\src\asmjit\x86\x86cpuinfo.cpp" />
|
||||
<ClCompile Include="..\asmjit\src\asmjit\x86\x86inst.cpp" />
|
||||
<ClCompile Include="..\asmjit\src\asmjit\x86\x86instimpl.cpp" />
|
||||
<ClCompile Include="..\asmjit\src\asmjit\x86\x86internal.cpp" />
|
||||
<ClCompile Include="..\asmjit\src\asmjit\x86\x86logging.cpp" />
|
||||
<ClCompile Include="..\asmjit\src\asmjit\x86\x86operand.cpp" />
|
||||
<ClCompile Include="..\asmjit\src\asmjit\x86\x86operand_regs.cpp" />
|
||||
<ClCompile Include="..\asmjit\src\asmjit\x86\x86scheduler.cpp" />
|
||||
<ClCompile Include="..\asmjit\src\asmjit\x86\x86regalloc.cpp" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="..\asmjit\src\asmjit\base\arch.h" />
|
||||
<ClInclude Include="..\asmjit\src\asmjit\base\assembler.h" />
|
||||
<ClInclude Include="..\asmjit\src\asmjit\base\codegen.h" />
|
||||
<ClInclude Include="..\asmjit\src\asmjit\base\compiler.h" />
|
||||
<ClInclude Include="..\asmjit\src\asmjit\base\codebuilder.h" />
|
||||
<ClInclude Include="..\asmjit\src\asmjit\base\codecompiler.h" />
|
||||
<ClInclude Include="..\asmjit\src\asmjit\base\codeemitter.h" />
|
||||
<ClInclude Include="..\asmjit\src\asmjit\base\codeholder.h" />
|
||||
<ClInclude Include="..\asmjit\src\asmjit\base\constpool.h" />
|
||||
<ClInclude Include="..\asmjit\src\asmjit\base\containers.h" />
|
||||
<ClInclude Include="..\asmjit\src\asmjit\base\context_p.h" />
|
||||
<ClInclude Include="..\asmjit\src\asmjit\base\cpuinfo.h" />
|
||||
<ClInclude Include="..\asmjit\src\asmjit\base\cputicks.h" />
|
||||
<ClInclude Include="..\asmjit\src\asmjit\base\error.h" />
|
||||
<ClInclude Include="..\asmjit\src\asmjit\base\func.h" />
|
||||
<ClInclude Include="..\asmjit\src\asmjit\base\logging.h" />
|
||||
<ClInclude Include="..\asmjit\src\asmjit\base\globals.h" />
|
||||
<ClInclude Include="..\asmjit\src\asmjit\base\intutil.h" />
|
||||
<ClInclude Include="..\asmjit\src\asmjit\base\inst.h" />
|
||||
<ClInclude Include="..\asmjit\src\asmjit\base\lock.h" />
|
||||
<ClInclude Include="..\asmjit\src\asmjit\base\logger.h" />
|
||||
<ClInclude Include="..\asmjit\src\asmjit\base\operand.h" />
|
||||
<ClInclude Include="..\asmjit\src\asmjit\base\osutils.h" />
|
||||
<ClInclude Include="..\asmjit\src\asmjit\base\regalloc_p.h" />
|
||||
<ClInclude Include="..\asmjit\src\asmjit\base\runtime.h" />
|
||||
<ClInclude Include="..\asmjit\src\asmjit\base\string.h" />
|
||||
<ClInclude Include="..\asmjit\src\asmjit\base\vectypes.h" />
|
||||
@@ -71,11 +77,12 @@
|
||||
<ClInclude Include="..\asmjit\src\asmjit\base\zone.h" />
|
||||
<ClInclude Include="..\asmjit\src\asmjit\x86\x86assembler.h" />
|
||||
<ClInclude Include="..\asmjit\src\asmjit\x86\x86compiler.h" />
|
||||
<ClInclude Include="..\asmjit\src\asmjit\x86\x86context_p.h" />
|
||||
<ClInclude Include="..\asmjit\src\asmjit\x86\x86cpuinfo.h" />
|
||||
<ClInclude Include="..\asmjit\src\asmjit\x86\x86inst.h" />
|
||||
<ClInclude Include="..\asmjit\src\asmjit\x86\x86instimpl_p.h" />
|
||||
<ClInclude Include="..\asmjit\src\asmjit\x86\x86internal_p.h" />
|
||||
<ClInclude Include="..\asmjit\src\asmjit\x86\x86logging_p.h" />
|
||||
<ClInclude Include="..\asmjit\src\asmjit\x86\x86operand.h" />
|
||||
<ClInclude Include="..\asmjit\src\asmjit\x86\x86scheduler_p.h" />
|
||||
<ClInclude Include="..\asmjit\src\asmjit\x86\x86regalloc_p.h" />
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectGuid>{AC40FF01-426E-4838-A317-66354CEFAE88}</ProjectGuid>
|
||||
@@ -86,7 +93,7 @@
|
||||
<PropertyGroup Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
<PlatformToolset>v140</PlatformToolset>
|
||||
<PlatformToolset>v141</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
|
||||
@@ -1,58 +1,65 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup>
|
||||
<ClCompile Include="..\asmjit\src\asmjit\base\arch.cpp" />
|
||||
<ClCompile Include="..\asmjit\src\asmjit\base\assembler.cpp" />
|
||||
<ClCompile Include="..\asmjit\src\asmjit\base\codegen.cpp" />
|
||||
<ClCompile Include="..\asmjit\src\asmjit\base\compiler.cpp" />
|
||||
<ClCompile Include="..\asmjit\src\asmjit\base\codebuilder.cpp" />
|
||||
<ClCompile Include="..\asmjit\src\asmjit\base\codecompiler.cpp" />
|
||||
<ClCompile Include="..\asmjit\src\asmjit\base\codeemitter.cpp" />
|
||||
<ClCompile Include="..\asmjit\src\asmjit\base\codeholder.cpp" />
|
||||
<ClCompile Include="..\asmjit\src\asmjit\base\constpool.cpp" />
|
||||
<ClCompile Include="..\asmjit\src\asmjit\base\containers.cpp" />
|
||||
<ClCompile Include="..\asmjit\src\asmjit\base\context.cpp" />
|
||||
<ClCompile Include="..\asmjit\src\asmjit\base\cpuinfo.cpp" />
|
||||
<ClCompile Include="..\asmjit\src\asmjit\base\cputicks.cpp" />
|
||||
<ClCompile Include="..\asmjit\src\asmjit\base\error.cpp" />
|
||||
<ClCompile Include="..\asmjit\src\asmjit\base\func.cpp" />
|
||||
<ClCompile Include="..\asmjit\src\asmjit\base\globals.cpp" />
|
||||
<ClCompile Include="..\asmjit\src\asmjit\base\intutil.cpp" />
|
||||
<ClCompile Include="..\asmjit\src\asmjit\base\logger.cpp" />
|
||||
<ClCompile Include="..\asmjit\src\asmjit\base\inst.cpp" />
|
||||
<ClCompile Include="..\asmjit\src\asmjit\base\logging.cpp" />
|
||||
<ClCompile Include="..\asmjit\src\asmjit\base\osutils.cpp" />
|
||||
<ClCompile Include="..\asmjit\src\asmjit\base\operand.cpp" />
|
||||
<ClCompile Include="..\asmjit\src\asmjit\base\regalloc.cpp" />
|
||||
<ClCompile Include="..\asmjit\src\asmjit\base\runtime.cpp" />
|
||||
<ClCompile Include="..\asmjit\src\asmjit\base\string.cpp" />
|
||||
<ClCompile Include="..\asmjit\src\asmjit\base\vmem.cpp" />
|
||||
<ClCompile Include="..\asmjit\src\asmjit\base\zone.cpp" />
|
||||
<ClCompile Include="..\asmjit\src\asmjit\x86\x86assembler.cpp" />
|
||||
<ClCompile Include="..\asmjit\src\asmjit\x86\x86compiler.cpp" />
|
||||
<ClCompile Include="..\asmjit\src\asmjit\x86\x86context.cpp" />
|
||||
<ClCompile Include="..\asmjit\src\asmjit\x86\x86cpuinfo.cpp" />
|
||||
<ClCompile Include="..\asmjit\src\asmjit\x86\x86inst.cpp" />
|
||||
<ClCompile Include="..\asmjit\src\asmjit\x86\x86instimpl.cpp" />
|
||||
<ClCompile Include="..\asmjit\src\asmjit\x86\x86internal.cpp" />
|
||||
<ClCompile Include="..\asmjit\src\asmjit\x86\x86logging.cpp" />
|
||||
<ClCompile Include="..\asmjit\src\asmjit\x86\x86operand.cpp" />
|
||||
<ClCompile Include="..\asmjit\src\asmjit\x86\x86operand_regs.cpp" />
|
||||
<ClCompile Include="..\asmjit\src\asmjit\x86\x86scheduler.cpp" />
|
||||
<ClCompile Include="..\asmjit\src\asmjit\x86\x86regalloc.cpp" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="..\asmjit\src\asmjit\x86\x86assembler.h" />
|
||||
<ClInclude Include="..\asmjit\src\asmjit\x86\x86compiler.h" />
|
||||
<ClInclude Include="..\asmjit\src\asmjit\x86\x86context_p.h" />
|
||||
<ClInclude Include="..\asmjit\src\asmjit\x86\x86cpuinfo.h" />
|
||||
<ClInclude Include="..\asmjit\src\asmjit\x86\x86inst.h" />
|
||||
<ClInclude Include="..\asmjit\src\asmjit\x86\x86operand.h" />
|
||||
<ClInclude Include="..\asmjit\src\asmjit\x86\x86scheduler_p.h" />
|
||||
<ClInclude Include="..\asmjit\src\asmjit\base\arch.h" />
|
||||
<ClInclude Include="..\asmjit\src\asmjit\base\assembler.h" />
|
||||
<ClInclude Include="..\asmjit\src\asmjit\base\codegen.h" />
|
||||
<ClInclude Include="..\asmjit\src\asmjit\base\compiler.h" />
|
||||
<ClInclude Include="..\asmjit\src\asmjit\base\codebuilder.h" />
|
||||
<ClInclude Include="..\asmjit\src\asmjit\base\codecompiler.h" />
|
||||
<ClInclude Include="..\asmjit\src\asmjit\base\codeemitter.h" />
|
||||
<ClInclude Include="..\asmjit\src\asmjit\base\codeholder.h" />
|
||||
<ClInclude Include="..\asmjit\src\asmjit\base\constpool.h" />
|
||||
<ClInclude Include="..\asmjit\src\asmjit\base\containers.h" />
|
||||
<ClInclude Include="..\asmjit\src\asmjit\base\context_p.h" />
|
||||
<ClInclude Include="..\asmjit\src\asmjit\base\cpuinfo.h" />
|
||||
<ClInclude Include="..\asmjit\src\asmjit\base\cputicks.h" />
|
||||
<ClInclude Include="..\asmjit\src\asmjit\base\error.h" />
|
||||
<ClInclude Include="..\asmjit\src\asmjit\base\func.h" />
|
||||
<ClInclude Include="..\asmjit\src\asmjit\base\logging.h" />
|
||||
<ClInclude Include="..\asmjit\src\asmjit\base\globals.h" />
|
||||
<ClInclude Include="..\asmjit\src\asmjit\base\intutil.h" />
|
||||
<ClInclude Include="..\asmjit\src\asmjit\base\inst.h" />
|
||||
<ClInclude Include="..\asmjit\src\asmjit\base\lock.h" />
|
||||
<ClInclude Include="..\asmjit\src\asmjit\base\logger.h" />
|
||||
<ClInclude Include="..\asmjit\src\asmjit\base\operand.h" />
|
||||
<ClInclude Include="..\asmjit\src\asmjit\base\osutils.h" />
|
||||
<ClInclude Include="..\asmjit\src\asmjit\base\regalloc_p.h" />
|
||||
<ClInclude Include="..\asmjit\src\asmjit\base\runtime.h" />
|
||||
<ClInclude Include="..\asmjit\src\asmjit\base\string.h" />
|
||||
<ClInclude Include="..\asmjit\src\asmjit\base\vectypes.h" />
|
||||
<ClInclude Include="..\asmjit\src\asmjit\base\vmem.h" />
|
||||
<ClInclude Include="..\asmjit\src\asmjit\base\zone.h" />
|
||||
<ClInclude Include="..\asmjit\src\asmjit\x86\x86assembler.h" />
|
||||
<ClInclude Include="..\asmjit\src\asmjit\x86\x86compiler.h" />
|
||||
<ClInclude Include="..\asmjit\src\asmjit\x86\x86inst.h" />
|
||||
<ClInclude Include="..\asmjit\src\asmjit\x86\x86instimpl_p.h" />
|
||||
<ClInclude Include="..\asmjit\src\asmjit\x86\x86internal_p.h" />
|
||||
<ClInclude Include="..\asmjit\src\asmjit\x86\x86logging_p.h" />
|
||||
<ClInclude Include="..\asmjit\src\asmjit\x86\x86operand.h" />
|
||||
<ClInclude Include="..\asmjit\src\asmjit\x86\x86regalloc_p.h" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
@@ -1,4 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup />
|
||||
</Project>
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
+1
-1
Submodule llvm updated: 051e787f26...80e0f20bde
@@ -18,12 +18,12 @@
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||
<ConfigurationType>Makefile</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<PlatformToolset>v140</PlatformToolset>
|
||||
<PlatformToolset>v141</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
<ConfigurationType>Makefile</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<PlatformToolset>v140</PlatformToolset>
|
||||
<PlatformToolset>v141</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
@@ -39,31 +39,31 @@
|
||||
<NMakePreprocessorDefinitions>
|
||||
</NMakePreprocessorDefinitions>
|
||||
<NMakeBuildCommandLine>
|
||||
cmake -G "Visual Studio 14 2015 Win64" -DCMAKE_CONFIGURATION_TYPES="Debug;Release" -DLLVM_TARGETS_TO_BUILD=X86 -DLLVM_BUILD_RUNTIME=OFF -DLLVM_BUILD_TOOLS=OFF -DLLVM_INCLUDE_DOCS=OFF -DLLVM_INCLUDE_EXAMPLES=OFF -DLLVM_INCLUDE_TESTS=OFF -DLLVM_INCLUDE_TOOLS=OFF -DLLVM_INCLUDE_UTILS=OFF -DWITH_POLLY=OFF -DCMAKE_SYSTEM_VERSION=6.1 -DCMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION=8.1 ../llvm
|
||||
msbuild.exe ALL_BUILD.vcxproj /t:build /p:Configuration=Debug
|
||||
cmake -G "Visual Studio 15 2017 Win64" -DCMAKE_CONFIGURATION_TYPES="Debug;Release" -DLLVM_TARGETS_TO_BUILD=X86 -DLLVM_BUILD_RUNTIME=OFF -DLLVM_BUILD_TOOLS=OFF -DLLVM_INCLUDE_DOCS=OFF -DLLVM_INCLUDE_EXAMPLES=OFF -DLLVM_INCLUDE_TESTS=OFF -DLLVM_INCLUDE_TOOLS=OFF -DLLVM_INCLUDE_UTILS=OFF -DWITH_POLLY=OFF -DCMAKE_SYSTEM_VERSION=6.1 -DCMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION=8.1 ../llvm
|
||||
msbuild.exe ALL_BUILD.vcxproj /t:build /p:Configuration=Debug /m
|
||||
</NMakeBuildCommandLine>
|
||||
<NMakeReBuildCommandLine>
|
||||
cmake -G "Visual Studio 14 2015 Win64" -DCMAKE_CONFIGURATION_TYPES="Debug;Release" -DLLVM_TARGETS_TO_BUILD=X86 -DLLVM_BUILD_RUNTIME=OFF -DLLVM_BUILD_TOOLS=OFF -DLLVM_INCLUDE_DOCS=OFF -DLLVM_INCLUDE_EXAMPLES=OFF -DLLVM_INCLUDE_TESTS=OFF -DLLVM_INCLUDE_TOOLS=OFF -DLLVM_INCLUDE_UTILS=OFF -DWITH_POLLY=OFF -DCMAKE_SYSTEM_VERSION=6.1 -DCMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION=8.1 ../llvm
|
||||
msbuild.exe ALL_BUILD.vcxproj /t:rebuild /p:Configuration=Debug
|
||||
cmake -G "Visual Studio 15 2017 Win64" -DCMAKE_CONFIGURATION_TYPES="Debug;Release" -DLLVM_TARGETS_TO_BUILD=X86 -DLLVM_BUILD_RUNTIME=OFF -DLLVM_BUILD_TOOLS=OFF -DLLVM_INCLUDE_DOCS=OFF -DLLVM_INCLUDE_EXAMPLES=OFF -DLLVM_INCLUDE_TESTS=OFF -DLLVM_INCLUDE_TOOLS=OFF -DLLVM_INCLUDE_UTILS=OFF -DWITH_POLLY=OFF -DCMAKE_SYSTEM_VERSION=6.1 -DCMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION=8.1 ../llvm
|
||||
msbuild.exe ALL_BUILD.vcxproj /t:rebuild /p:Configuration=Debug /m
|
||||
</NMakeReBuildCommandLine>
|
||||
<NMakeCleanCommandLine>
|
||||
cmake -G "Visual Studio 14 2015 Win64" -DCMAKE_CONFIGURATION_TYPES="Debug;Release" -DLLVM_TARGETS_TO_BUILD=X86 -DLLVM_BUILD_RUNTIME=OFF -DLLVM_BUILD_TOOLS=OFF -DLLVM_INCLUDE_DOCS=OFF -DLLVM_INCLUDE_EXAMPLES=OFF -DLLVM_INCLUDE_TESTS=OFF -DLLVM_INCLUDE_TOOLS=OFF -DLLVM_INCLUDE_UTILS=OFF -DWITH_POLLY=OFF -DCMAKE_SYSTEM_VERSION=6.1 -DCMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION=8.1 ../llvm
|
||||
msbuild.exe ALL_BUILD.vcxproj /t:clean /p:Configuration=Debug
|
||||
cmake -G "Visual Studio 15 2017 Win64" -DCMAKE_CONFIGURATION_TYPES="Debug;Release" -DLLVM_TARGETS_TO_BUILD=X86 -DLLVM_BUILD_RUNTIME=OFF -DLLVM_BUILD_TOOLS=OFF -DLLVM_INCLUDE_DOCS=OFF -DLLVM_INCLUDE_EXAMPLES=OFF -DLLVM_INCLUDE_TESTS=OFF -DLLVM_INCLUDE_TOOLS=OFF -DLLVM_INCLUDE_UTILS=OFF -DWITH_POLLY=OFF -DCMAKE_SYSTEM_VERSION=6.1 -DCMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION=8.1 ../llvm
|
||||
msbuild.exe ALL_BUILD.vcxproj /t:clean /p:Configuration=Debug /m
|
||||
</NMakeCleanCommandLine>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<NMakePreprocessorDefinitions />
|
||||
<NMakeBuildCommandLine>
|
||||
cmake -G "Visual Studio 14 2015 Win64" -DCMAKE_CONFIGURATION_TYPES="Debug;Release" -DLLVM_TARGETS_TO_BUILD=X86 -DLLVM_BUILD_RUNTIME=OFF -DLLVM_BUILD_TOOLS=OFF -DLLVM_INCLUDE_DOCS=OFF -DLLVM_INCLUDE_EXAMPLES=OFF -DLLVM_INCLUDE_TESTS=OFF -DLLVM_INCLUDE_TOOLS=OFF -DLLVM_INCLUDE_UTILS=OFF -DWITH_POLLY=OFF -DCMAKE_SYSTEM_VERSION=6.1 -DCMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION=8.1 ../llvm
|
||||
msbuild.exe ALL_BUILD.vcxproj /t:build /p:Configuration=Release
|
||||
cmake -G "Visual Studio 15 2017 Win64" -DCMAKE_CONFIGURATION_TYPES="Debug;Release" -DLLVM_TARGETS_TO_BUILD=X86 -DLLVM_BUILD_RUNTIME=OFF -DLLVM_BUILD_TOOLS=OFF -DLLVM_INCLUDE_DOCS=OFF -DLLVM_INCLUDE_EXAMPLES=OFF -DLLVM_INCLUDE_TESTS=OFF -DLLVM_INCLUDE_TOOLS=OFF -DLLVM_INCLUDE_UTILS=OFF -DWITH_POLLY=OFF -DCMAKE_SYSTEM_VERSION=6.1 -DCMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION=8.1 ../llvm
|
||||
msbuild.exe ALL_BUILD.vcxproj /t:build /p:Configuration=Release /m
|
||||
</NMakeBuildCommandLine>
|
||||
<NMakeReBuildCommandLine>
|
||||
cmake -G "Visual Studio 14 2015 Win64" -DCMAKE_CONFIGURATION_TYPES="Debug;Release" -DLLVM_TARGETS_TO_BUILD=X86 -DLLVM_BUILD_RUNTIME=OFF -DLLVM_BUILD_TOOLS=OFF -DLLVM_INCLUDE_DOCS=OFF -DLLVM_INCLUDE_EXAMPLES=OFF -DLLVM_INCLUDE_TESTS=OFF -DLLVM_INCLUDE_TOOLS=OFF -DLLVM_INCLUDE_UTILS=OFF -DWITH_POLLY=OFF -DCMAKE_SYSTEM_VERSION=6.1 -DCMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION=8.1 ../llvm
|
||||
msbuild.exe ALL_BUILD.vcxproj /t:rebuild /p:Configuration=Release
|
||||
cmake -G "Visual Studio 15 2017 Win64" -DCMAKE_CONFIGURATION_TYPES="Debug;Release" -DLLVM_TARGETS_TO_BUILD=X86 -DLLVM_BUILD_RUNTIME=OFF -DLLVM_BUILD_TOOLS=OFF -DLLVM_INCLUDE_DOCS=OFF -DLLVM_INCLUDE_EXAMPLES=OFF -DLLVM_INCLUDE_TESTS=OFF -DLLVM_INCLUDE_TOOLS=OFF -DLLVM_INCLUDE_UTILS=OFF -DWITH_POLLY=OFF -DCMAKE_SYSTEM_VERSION=6.1 -DCMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION=8.1 ../llvm
|
||||
msbuild.exe ALL_BUILD.vcxproj /t:rebuild /p:Configuration=Release /m
|
||||
</NMakeReBuildCommandLine>
|
||||
<NMakeCleanCommandLine>
|
||||
cmake -G "Visual Studio 14 2015 Win64" -DCMAKE_CONFIGURATION_TYPES="Debug;Release" -DLLVM_TARGETS_TO_BUILD=X86 -DLLVM_BUILD_RUNTIME=OFF -DLLVM_BUILD_TOOLS=OFF -DLLVM_INCLUDE_DOCS=OFF -DLLVM_INCLUDE_EXAMPLES=OFF -DLLVM_INCLUDE_TESTS=OFF -DLLVM_INCLUDE_TOOLS=OFF -DLLVM_INCLUDE_UTILS=OFF -DWITH_POLLY=OFF -DCMAKE_SYSTEM_VERSION=6.1 -DCMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION=8.1 ../llvm
|
||||
msbuild.exe ALL_BUILD.vcxproj /t:clean /p:Configuration=Release
|
||||
cmake -G "Visual Studio 15 2017 Win64" -DCMAKE_CONFIGURATION_TYPES="Debug;Release" -DLLVM_TARGETS_TO_BUILD=X86 -DLLVM_BUILD_RUNTIME=OFF -DLLVM_BUILD_TOOLS=OFF -DLLVM_INCLUDE_DOCS=OFF -DLLVM_INCLUDE_EXAMPLES=OFF -DLLVM_INCLUDE_TESTS=OFF -DLLVM_INCLUDE_TOOLS=OFF -DLLVM_INCLUDE_UTILS=OFF -DWITH_POLLY=OFF -DCMAKE_SYSTEM_VERSION=6.1 -DCMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION=8.1 ../llvm
|
||||
msbuild.exe ALL_BUILD.vcxproj /t:clean /p:Configuration=Release /m
|
||||
</NMakeCleanCommandLine>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup>
|
||||
|
||||
@@ -20,14 +20,14 @@
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<PlatformToolset>v140</PlatformToolset>
|
||||
<PlatformToolset>v141</PlatformToolset>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
<UseOfMfc>false</UseOfMfc>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<PlatformToolset>v140</PlatformToolset>
|
||||
<PlatformToolset>v141</PlatformToolset>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
<UseOfMfc>false</UseOfMfc>
|
||||
@@ -100,72 +100,6 @@
|
||||
<ProjectReference Include="..\rpcs3\XAudio.vcxproj">
|
||||
<Project>{78cb2f39-b809-4a06-8329-8c0a19119d3d}</Project>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\wxWidgets\build\msw\wx_adv.vcxproj">
|
||||
<Project>{24c45343-fd20-5c92-81c1-35a2ae841e79}</Project>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\wxWidgets\build\msw\wx_aui.vcxproj">
|
||||
<Project>{a16d3832-0f42-57ce-8f48-50e06649ade8}</Project>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\wxWidgets\build\msw\wx_base.vcxproj">
|
||||
<Project>{3fcc50c2-81e9-5db2-b8d8-2129427568b1}</Project>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\wxWidgets\build\msw\wx_core.vcxproj">
|
||||
<Project>{6744dad8-9c70-574a-bff2-9f8dddb24a75}</Project>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\wxWidgets\build\msw\wx_gl.vcxproj">
|
||||
<Project>{da8b15ef-6750-5928-bc0e-c748213cf9b2}</Project>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\wxWidgets\build\msw\wx_html.vcxproj">
|
||||
<Project>{33cc42f9-7756-5587-863c-8d4461b7c5dd}</Project>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\wxWidgets\build\msw\wx_media.vcxproj">
|
||||
<Project>{8bd8f8d9-4275-5b42-a8f4-f1db2970a550}</Project>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\wxWidgets\build\msw\wx_net.vcxproj">
|
||||
<Project>{69f2ede4-7d21-5738-9bc0-f66f61c9ae00}</Project>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\wxWidgets\build\msw\wx_propgrid.vcxproj">
|
||||
<Project>{97fdab45-9c58-5bc5-a2f4-ee42739ebc63}</Project>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\wxWidgets\build\msw\wx_qa.vcxproj">
|
||||
<Project>{e21129e0-7c08-5936-9d8c-0d60b5319ba7}</Project>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\wxWidgets\build\msw\wx_ribbon.vcxproj">
|
||||
<Project>{87b42a9c-3f5c-53d7-9017-2b1cae39457d}</Project>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\wxWidgets\build\msw\wx_richtext.vcxproj">
|
||||
<Project>{7fb0902d-8579-5dce-b883-daf66a885005}</Project>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\wxWidgets\build\msw\wx_stc.vcxproj">
|
||||
<Project>{23e1c437-a951-5943-8639-a17f3cf2e606}</Project>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\wxWidgets\build\msw\wx_wxexpat.vcxproj">
|
||||
<Project>{a1a8355b-0988-528e-9cc2-b971d6266669}</Project>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\wxWidgets\build\msw\wx_wxjpeg.vcxproj">
|
||||
<Project>{6053cc38-cdee-584c-8bc8-4b000d800fc7}</Project>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\wxWidgets\build\msw\wx_wxpng.vcxproj">
|
||||
<Project>{8acc122a-ca6a-5aa6-9c97-9cdd2e533db0}</Project>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\wxWidgets\build\msw\wx_wxregex.vcxproj">
|
||||
<Project>{56a4b526-bb81-5d01-aaa9-16d23bbb169d}</Project>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\wxWidgets\build\msw\wx_wxscintilla.vcxproj">
|
||||
<Project>{74827ebd-93dc-5110-ba95-3f2ab029b6b0}</Project>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\wxWidgets\build\msw\wx_wxtiff.vcxproj">
|
||||
<Project>{75596ce6-5ae7-55c9-b890-c07b0a657a83}</Project>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\wxWidgets\build\msw\wx_wxzlib.vcxproj">
|
||||
<Project>{8b867186-a0b5-5479-b824-e176edd27c40}</Project>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\wxWidgets\build\msw\wx_xml.vcxproj">
|
||||
<Project>{3e6dca27-5fa3-53ec-bbd6-2d42294b7ae6}</Project>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\wxWidgets\build\msw\wx_xrc.vcxproj">
|
||||
<Project>{09f2f96a-1cc6-5e43-af1d-956ec2a4888d}</Project>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
|
||||
@@ -1,4 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup />
|
||||
</Project>
|
||||
@@ -1,163 +1,7 @@
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio 14
|
||||
VisualStudioVersion = 14.0.25123.0
|
||||
# Visual Studio 15
|
||||
VisualStudioVersion = 15.0.26430.13
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "rpcs3", "rpcs3\rpcs3.vcxproj", "{70CD65B0-91D6-4FAE-9A7B-4AF55D0D1B12}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{AC40FF01-426E-4838-A317-66354CEFAE88} = {AC40FF01-426E-4838-A317-66354CEFAE88}
|
||||
{56A4B526-BB81-5D01-AAA9-16D23BBB169D} = {56A4B526-BB81-5D01-AAA9-16D23BBB169D}
|
||||
{3E6DCA27-5FA3-53EC-BBD6-2D42294B7AE6} = {3E6DCA27-5FA3-53EC-BBD6-2D42294B7AE6}
|
||||
{C4A10229-4712-4BD2-B63E-50D93C67A038} = {C4A10229-4712-4BD2-B63E-50D93C67A038}
|
||||
{8ACC122A-CA6A-5AA6-9C97-9CDD2E533DB0} = {8ACC122A-CA6A-5AA6-9C97-9CDD2E533DB0}
|
||||
{7FB0902D-8579-5DCE-B883-DAF66A885005} = {7FB0902D-8579-5DCE-B883-DAF66A885005}
|
||||
{A16D3832-0F42-57CE-8F48-50E06649ADE8} = {A16D3832-0F42-57CE-8F48-50E06649ADE8}
|
||||
{23E1C437-A951-5943-8639-A17F3CF2E606} = {23E1C437-A951-5943-8639-A17F3CF2E606}
|
||||
{6053CC38-CDEE-584C-8BC8-4B000D800FC7} = {6053CC38-CDEE-584C-8BC8-4B000D800FC7}
|
||||
{24C45343-FD20-5C92-81C1-35A2AE841E79} = {24C45343-FD20-5C92-81C1-35A2AE841E79}
|
||||
{97FDAB45-9C58-5BC5-A2F4-EE42739EBC63} = {97FDAB45-9C58-5BC5-A2F4-EE42739EBC63}
|
||||
{A1A8355B-0988-528E-9CC2-B971D6266669} = {A1A8355B-0988-528E-9CC2-B971D6266669}
|
||||
{09F2F96A-1CC6-5E43-AF1D-956EC2A4888D} = {09F2F96A-1CC6-5E43-AF1D-956EC2A4888D}
|
||||
{D6973076-9317-4EF2-A0B8-B7A18AC0713E} = {D6973076-9317-4EF2-A0B8-B7A18AC0713E}
|
||||
{97E17077-A21F-45EF-9C3A-73A0BC092D7E} = {97E17077-A21F-45EF-9C3A-73A0BC092D7E}
|
||||
{7D73447B-3D2D-4DFE-BF62-57E644C1D09F} = {7D73447B-3D2D-4DFE-BF62-57E644C1D09F}
|
||||
{8B867186-A0B5-5479-B824-E176EDD27C40} = {8B867186-A0B5-5479-B824-E176EDD27C40}
|
||||
{87B42A9C-3F5C-53D7-9017-2B1CAE39457D} = {87B42A9C-3F5C-53D7-9017-2B1CAE39457D}
|
||||
{8BC303AB-25BE-4276-8E57-73F171B2D672} = {8BC303AB-25BE-4276-8E57-73F171B2D672}
|
||||
{74827EBD-93DC-5110-BA95-3F2AB029B6B0} = {74827EBD-93DC-5110-BA95-3F2AB029B6B0}
|
||||
{3FCC50C2-81E9-5DB2-B8D8-2129427568B1} = {3FCC50C2-81E9-5DB2-B8D8-2129427568B1}
|
||||
{6744DAD8-9C70-574A-BFF2-9F8DDDB24A75} = {6744DAD8-9C70-574A-BFF2-9F8DDDB24A75}
|
||||
{8BD8F8D9-4275-5B42-A8F4-F1DB2970A550} = {8BD8F8D9-4275-5B42-A8F4-F1DB2970A550}
|
||||
{E21129E0-7C08-5936-9D8C-0D60B5319BA7} = {E21129E0-7C08-5936-9D8C-0D60B5319BA7}
|
||||
{69F2EDE4-7D21-5738-9BC0-F66F61C9AE00} = {69F2EDE4-7D21-5738-9BC0-F66F61C9AE00}
|
||||
{75596CE6-5AE7-55C9-B890-C07B0A657A83} = {75596CE6-5AE7-55C9-B890-C07B0A657A83}
|
||||
{DA8B15EF-6750-5928-BC0E-C748213CF9B2} = {DA8B15EF-6750-5928-BC0E-C748213CF9B2}
|
||||
{33CC42F9-7756-5587-863C-8D4461B7C5DD} = {33CC42F9-7756-5587-863C-8D4461B7C5DD}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "wxWidgets", "wxWidgets", "{5812E712-6213-4372-B095-9EB9BAA1F2DF}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "adv", "wxWidgets\build\msw\wx_adv.vcxproj", "{24C45343-FD20-5C92-81C1-35A2AE841E79}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{6744DAD8-9C70-574A-BFF2-9F8DDDB24A75} = {6744DAD8-9C70-574A-BFF2-9F8DDDB24A75}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "aui", "wxWidgets\build\msw\wx_aui.vcxproj", "{A16D3832-0F42-57CE-8F48-50E06649ADE8}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{24C45343-FD20-5C92-81C1-35A2AE841E79} = {24C45343-FD20-5C92-81C1-35A2AE841E79}
|
||||
{6744DAD8-9C70-574A-BFF2-9F8DDDB24A75} = {6744DAD8-9C70-574A-BFF2-9F8DDDB24A75}
|
||||
{33CC42F9-7756-5587-863C-8D4461B7C5DD} = {33CC42F9-7756-5587-863C-8D4461B7C5DD}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "base", "wxWidgets\build\msw\wx_base.vcxproj", "{3FCC50C2-81E9-5DB2-B8D8-2129427568B1}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{01F4CE10-2CFB-41A8-B41F-E54337868A1D} = {01F4CE10-2CFB-41A8-B41F-E54337868A1D}
|
||||
{56A4B526-BB81-5D01-AAA9-16D23BBB169D} = {56A4B526-BB81-5D01-AAA9-16D23BBB169D}
|
||||
{A1A8355B-0988-528E-9CC2-B971D6266669} = {A1A8355B-0988-528E-9CC2-B971D6266669}
|
||||
{8B867186-A0B5-5479-B824-E176EDD27C40} = {8B867186-A0B5-5479-B824-E176EDD27C40}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "core", "wxWidgets\build\msw\wx_core.vcxproj", "{6744DAD8-9C70-574A-BFF2-9F8DDDB24A75}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{01F4CE10-2CFB-41A8-B41F-E54337868A1D} = {01F4CE10-2CFB-41A8-B41F-E54337868A1D}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "propgrid", "wxWidgets\build\msw\wx_propgrid.vcxproj", "{97FDAB45-9C58-5BC5-A2F4-EE42739EBC63}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{24C45343-FD20-5C92-81C1-35A2AE841E79} = {24C45343-FD20-5C92-81C1-35A2AE841E79}
|
||||
{6744DAD8-9C70-574A-BFF2-9F8DDDB24A75} = {6744DAD8-9C70-574A-BFF2-9F8DDDB24A75}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gl", "wxWidgets\build\msw\wx_gl.vcxproj", "{DA8B15EF-6750-5928-BC0E-C748213CF9B2}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{6744DAD8-9C70-574A-BFF2-9F8DDDB24A75} = {6744DAD8-9C70-574A-BFF2-9F8DDDB24A75}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "html", "wxWidgets\build\msw\wx_html.vcxproj", "{33CC42F9-7756-5587-863C-8D4461B7C5DD}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{6744DAD8-9C70-574A-BFF2-9F8DDDB24A75} = {6744DAD8-9C70-574A-BFF2-9F8DDDB24A75}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "media", "wxWidgets\build\msw\wx_media.vcxproj", "{8BD8F8D9-4275-5B42-A8F4-F1DB2970A550}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{6744DAD8-9C70-574A-BFF2-9F8DDDB24A75} = {6744DAD8-9C70-574A-BFF2-9F8DDDB24A75}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "net", "wxWidgets\build\msw\wx_net.vcxproj", "{69F2EDE4-7D21-5738-9BC0-F66F61C9AE00}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{3FCC50C2-81E9-5DB2-B8D8-2129427568B1} = {3FCC50C2-81E9-5DB2-B8D8-2129427568B1}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "qa", "wxWidgets\build\msw\wx_qa.vcxproj", "{E21129E0-7C08-5936-9D8C-0D60B5319BA7}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{3E6DCA27-5FA3-53EC-BBD6-2D42294B7AE6} = {3E6DCA27-5FA3-53EC-BBD6-2D42294B7AE6}
|
||||
{6744DAD8-9C70-574A-BFF2-9F8DDDB24A75} = {6744DAD8-9C70-574A-BFF2-9F8DDDB24A75}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "richtext", "wxWidgets\build\msw\wx_richtext.vcxproj", "{7FB0902D-8579-5DCE-B883-DAF66A885005}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{3E6DCA27-5FA3-53EC-BBD6-2D42294B7AE6} = {3E6DCA27-5FA3-53EC-BBD6-2D42294B7AE6}
|
||||
{24C45343-FD20-5C92-81C1-35A2AE841E79} = {24C45343-FD20-5C92-81C1-35A2AE841E79}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "wxexpat", "wxWidgets\build\msw\wx_wxexpat.vcxproj", "{A1A8355B-0988-528E-9CC2-B971D6266669}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{01F4CE10-2CFB-41A8-B41F-E54337868A1D} = {01F4CE10-2CFB-41A8-B41F-E54337868A1D}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "wxjpeg", "wxWidgets\build\msw\wx_wxjpeg.vcxproj", "{6053CC38-CDEE-584C-8BC8-4B000D800FC7}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{01F4CE10-2CFB-41A8-B41F-E54337868A1D} = {01F4CE10-2CFB-41A8-B41F-E54337868A1D}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "wxpng", "wxWidgets\build\msw\wx_wxpng.vcxproj", "{8ACC122A-CA6A-5AA6-9C97-9CDD2E533DB0}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{01F4CE10-2CFB-41A8-B41F-E54337868A1D} = {01F4CE10-2CFB-41A8-B41F-E54337868A1D}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "wxregex", "wxWidgets\build\msw\wx_wxregex.vcxproj", "{56A4B526-BB81-5D01-AAA9-16D23BBB169D}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{01F4CE10-2CFB-41A8-B41F-E54337868A1D} = {01F4CE10-2CFB-41A8-B41F-E54337868A1D}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "wxtiff", "wxWidgets\build\msw\wx_wxtiff.vcxproj", "{75596CE6-5AE7-55C9-B890-C07B0A657A83}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{01F4CE10-2CFB-41A8-B41F-E54337868A1D} = {01F4CE10-2CFB-41A8-B41F-E54337868A1D}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "wxzlib", "wxWidgets\build\msw\wx_wxzlib.vcxproj", "{8B867186-A0B5-5479-B824-E176EDD27C40}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{01F4CE10-2CFB-41A8-B41F-E54337868A1D} = {01F4CE10-2CFB-41A8-B41F-E54337868A1D}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "xml", "wxWidgets\build\msw\wx_xml.vcxproj", "{3E6DCA27-5FA3-53EC-BBD6-2D42294B7AE6}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{01F4CE10-2CFB-41A8-B41F-E54337868A1D} = {01F4CE10-2CFB-41A8-B41F-E54337868A1D}
|
||||
{3FCC50C2-81E9-5DB2-B8D8-2129427568B1} = {3FCC50C2-81E9-5DB2-B8D8-2129427568B1}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "xrc", "wxWidgets\build\msw\wx_xrc.vcxproj", "{09F2F96A-1CC6-5E43-AF1D-956EC2A4888D}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{01F4CE10-2CFB-41A8-B41F-E54337868A1D} = {01F4CE10-2CFB-41A8-B41F-E54337868A1D}
|
||||
{3E6DCA27-5FA3-53EC-BBD6-2D42294B7AE6} = {3E6DCA27-5FA3-53EC-BBD6-2D42294B7AE6}
|
||||
{24C45343-FD20-5C92-81C1-35A2AE841E79} = {24C45343-FD20-5C92-81C1-35A2AE841E79}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ribbon", "wxWidgets\build\msw\wx_ribbon.vcxproj", "{87B42A9C-3F5C-53D7-9017-2B1CAE39457D}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{24C45343-FD20-5C92-81C1-35A2AE841E79} = {24C45343-FD20-5C92-81C1-35A2AE841E79}
|
||||
{6744DAD8-9C70-574A-BFF2-9F8DDDB24A75} = {6744DAD8-9C70-574A-BFF2-9F8DDDB24A75}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "stc", "wxWidgets\build\msw\wx_stc.vcxproj", "{23E1C437-A951-5943-8639-A17F3CF2E606}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{6744DAD8-9C70-574A-BFF2-9F8DDDB24A75} = {6744DAD8-9C70-574A-BFF2-9F8DDDB24A75}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "wxscintilla", "wxWidgets\build\msw\wx_wxscintilla.vcxproj", "{74827EBD-93DC-5110-BA95-3F2AB029B6B0}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{01F4CE10-2CFB-41A8-B41F-E54337868A1D} = {01F4CE10-2CFB-41A8-B41F-E54337868A1D}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "asmjit", "asmjitsrc\asmjit.vcxproj", "{AC40FF01-426E-4838-A317-66354CEFAE88}"
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "asmjit", "asmjit", "{E2A982F2-4B1A-48B1-8D77-A17A589C58D7}"
|
||||
@@ -166,19 +10,10 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "emucore", "rpcs3\emucore.vc
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "llvm_build", "llvm_build\llvm_build.vcxproj", "{8BC303AB-25BE-4276-8E57-73F171B2D672}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_custom_build", "wxWidgets\build\msw\wx_custom_build.vcxproj", "{01F4CE10-2CFB-41A8-B41F-E54337868A1D}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{00D36322-6188-4A66-B514-3B3F183E998D} = {00D36322-6188-4A66-B514-3B3F183E998D}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "copy_setup_h", "rpcs3\copy_setup_h.vcxproj", "{00D36322-6188-4A66-B514-3B3F183E998D}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "D3D12GSRender", "rpcs3\D3D12GSRender.vcxproj", "{FAC9B17B-F4B8-4B75-8AEB-C8C7CB92B078}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "rpcs3-tests", "rpcs3-tests\rpcs3-tests.vcxproj", "{AB222E8A-00CA-4ACF-A87E-5251C16C0587}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{01F4CE10-2CFB-41A8-B41F-E54337868A1D} = {01F4CE10-2CFB-41A8-B41F-E54337868A1D}
|
||||
{00D36322-6188-4A66-B514-3B3F183E998D} = {00D36322-6188-4A66-B514-3B3F183E998D}
|
||||
{FAC9B17B-F4B8-4B75-8AEB-C8C7CB92B078} = {FAC9B17B-F4B8-4B75-8AEB-C8C7CB92B078}
|
||||
{8BC303AB-25BE-4276-8E57-73F171B2D672} = {8BC303AB-25BE-4276-8E57-73F171B2D672}
|
||||
EndProjectSection
|
||||
@@ -187,10 +22,6 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "GLGSRender", "rpcs3\GLGSRen
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "rpcs3.emu", "rpcs3.emu", "{10FBF193-D532-4CCF-B875-4C7091A7F6C2}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "shader_code", "rsx_program_decompiler\shader_code\shader_code.vcxproj", "{97E17077-A21F-45EF-9C3A-73A0BC092D7E}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "rsx_decompiler", "rsx_program_decompiler\rsx_decompiler\rsx_decompiler.vcxproj", "{7D73447B-3D2D-4DFE-BF62-57E644C1D09F}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "XAudio", "rpcs3\XAudio.vcxproj", "{78CB2F39-B809-4A06-8329-8C0A19119D3D}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "OpenAL", "rpcs3\OpenAL.vcxproj", "{30A05C4D-F5FD-421C-A864-17A64BDEAA75}"
|
||||
@@ -216,14 +47,33 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "VKGSRender", "rpcs3\VKGSRen
|
||||
{8F85B6CC-250F-4ACA-A617-E820A74E3E3C} = {8F85B6CC-250F-4ACA-A617-E820A74E3E3C}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "webview", "wxWidgets\build\msw\wx_webview.vcxproj", "{A8E8442A-078A-5FC5-B495-8D71BA77EE6E}"
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "yaml-cpp", "yaml-cpp", "{DDF904CA-2771-441A-8629-5DF2EB922A79}"
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "__BUILD_BEFORE", "__BUILD_BEFORE", "{B0AC29FD-7B01-4B5E-9C8D-0A081E4C5668}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "yaml-cpp", "Utilities\yaml-cpp.vcxproj", "{FDC361C5-7734-493B-8CFB-037308B35122}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "rpcs3", "rpcs3\rpcs3.vcxproj", "{70CD65B0-91D6-4FAE-9A7B-4AF55D0D1B12}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{AC40FF01-426E-4838-A317-66354CEFAE88} = {AC40FF01-426E-4838-A317-66354CEFAE88}
|
||||
{A107C21C-418A-4697-BB10-20C3AA60E2E4} = {A107C21C-418A-4697-BB10-20C3AA60E2E4}
|
||||
{C4A10229-4712-4BD2-B63E-50D93C67A038} = {C4A10229-4712-4BD2-B63E-50D93C67A038}
|
||||
{78CB2F39-B809-4A06-8329-8C0A19119D3D} = {78CB2F39-B809-4A06-8329-8C0A19119D3D}
|
||||
{3384223A-6D97-4799-9862-359F85312892} = {3384223A-6D97-4799-9862-359F85312892}
|
||||
{30A05C4D-F5FD-421C-A864-17A64BDEAA75} = {30A05C4D-F5FD-421C-A864-17A64BDEAA75}
|
||||
{60F89955-91C6-3A36-8000-13C592FEC2DF} = {60F89955-91C6-3A36-8000-13C592FEC2DF}
|
||||
{3EE5F075-B546-42C4-B6A8-E3CCEF38B78D} = {3EE5F075-B546-42C4-B6A8-E3CCEF38B78D}
|
||||
{D6973076-9317-4EF2-A0B8-B7A18AC0713E} = {D6973076-9317-4EF2-A0B8-B7A18AC0713E}
|
||||
{FAC9B17B-F4B8-4B75-8AEB-C8C7CB92B078} = {FAC9B17B-F4B8-4B75-8AEB-C8C7CB92B078}
|
||||
{58B40697-B15E-429E-B325-D52C28AEBCBF} = {58B40697-B15E-429E-B325-D52C28AEBCBF}
|
||||
{FDC361C5-7734-493B-8CFB-037308B35122} = {FDC361C5-7734-493B-8CFB-037308B35122}
|
||||
{8F85B6CC-250F-4ACA-A617-E820A74E3E3C} = {8F85B6CC-250F-4ACA-A617-E820A74E3E3C}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "hidapi", "hidapi", "{FA1E6C16-CA63-45F8-8D52-E21DF396BE36}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "hidapi", "3rdparty\hidapi\windows\hidapi.vcxproj", "{A107C21C-418A-4697-BB10-20C3AA60E2E4}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug - LLVM|x64 = Debug - LLVM|x64
|
||||
@@ -233,236 +83,6 @@ Global
|
||||
Release|x64 = Release|x64
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{70CD65B0-91D6-4FAE-9A7B-4AF55D0D1B12}.Debug - LLVM|x64.ActiveCfg = Debug - LLVM|x64
|
||||
{70CD65B0-91D6-4FAE-9A7B-4AF55D0D1B12}.Debug - LLVM|x64.Build.0 = Debug - LLVM|x64
|
||||
{70CD65B0-91D6-4FAE-9A7B-4AF55D0D1B12}.Debug - MemLeak|x64.ActiveCfg = Debug - MemLeak|x64
|
||||
{70CD65B0-91D6-4FAE-9A7B-4AF55D0D1B12}.Debug - MemLeak|x64.Build.0 = Debug - MemLeak|x64
|
||||
{70CD65B0-91D6-4FAE-9A7B-4AF55D0D1B12}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{70CD65B0-91D6-4FAE-9A7B-4AF55D0D1B12}.Debug|x64.Build.0 = Debug|x64
|
||||
{70CD65B0-91D6-4FAE-9A7B-4AF55D0D1B12}.Release - LLVM|x64.ActiveCfg = Release - LLVM|x64
|
||||
{70CD65B0-91D6-4FAE-9A7B-4AF55D0D1B12}.Release - LLVM|x64.Build.0 = Release - LLVM|x64
|
||||
{70CD65B0-91D6-4FAE-9A7B-4AF55D0D1B12}.Release|x64.ActiveCfg = Release|x64
|
||||
{70CD65B0-91D6-4FAE-9A7B-4AF55D0D1B12}.Release|x64.Build.0 = Release|x64
|
||||
{24C45343-FD20-5C92-81C1-35A2AE841E79}.Debug - LLVM|x64.ActiveCfg = Debug|x64
|
||||
{24C45343-FD20-5C92-81C1-35A2AE841E79}.Debug - LLVM|x64.Build.0 = Debug|x64
|
||||
{24C45343-FD20-5C92-81C1-35A2AE841E79}.Debug - MemLeak|x64.ActiveCfg = Debug|x64
|
||||
{24C45343-FD20-5C92-81C1-35A2AE841E79}.Debug - MemLeak|x64.Build.0 = Debug|x64
|
||||
{24C45343-FD20-5C92-81C1-35A2AE841E79}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{24C45343-FD20-5C92-81C1-35A2AE841E79}.Debug|x64.Build.0 = Debug|x64
|
||||
{24C45343-FD20-5C92-81C1-35A2AE841E79}.Release - LLVM|x64.ActiveCfg = Release|x64
|
||||
{24C45343-FD20-5C92-81C1-35A2AE841E79}.Release - LLVM|x64.Build.0 = Release|x64
|
||||
{24C45343-FD20-5C92-81C1-35A2AE841E79}.Release|x64.ActiveCfg = Release|x64
|
||||
{24C45343-FD20-5C92-81C1-35A2AE841E79}.Release|x64.Build.0 = Release|x64
|
||||
{A16D3832-0F42-57CE-8F48-50E06649ADE8}.Debug - LLVM|x64.ActiveCfg = Debug|x64
|
||||
{A16D3832-0F42-57CE-8F48-50E06649ADE8}.Debug - LLVM|x64.Build.0 = Debug|x64
|
||||
{A16D3832-0F42-57CE-8F48-50E06649ADE8}.Debug - MemLeak|x64.ActiveCfg = Debug|x64
|
||||
{A16D3832-0F42-57CE-8F48-50E06649ADE8}.Debug - MemLeak|x64.Build.0 = Debug|x64
|
||||
{A16D3832-0F42-57CE-8F48-50E06649ADE8}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{A16D3832-0F42-57CE-8F48-50E06649ADE8}.Debug|x64.Build.0 = Debug|x64
|
||||
{A16D3832-0F42-57CE-8F48-50E06649ADE8}.Release - LLVM|x64.ActiveCfg = Release|x64
|
||||
{A16D3832-0F42-57CE-8F48-50E06649ADE8}.Release - LLVM|x64.Build.0 = Release|x64
|
||||
{A16D3832-0F42-57CE-8F48-50E06649ADE8}.Release|x64.ActiveCfg = Release|x64
|
||||
{A16D3832-0F42-57CE-8F48-50E06649ADE8}.Release|x64.Build.0 = Release|x64
|
||||
{3FCC50C2-81E9-5DB2-B8D8-2129427568B1}.Debug - LLVM|x64.ActiveCfg = Debug|x64
|
||||
{3FCC50C2-81E9-5DB2-B8D8-2129427568B1}.Debug - LLVM|x64.Build.0 = Debug|x64
|
||||
{3FCC50C2-81E9-5DB2-B8D8-2129427568B1}.Debug - MemLeak|x64.ActiveCfg = Debug|x64
|
||||
{3FCC50C2-81E9-5DB2-B8D8-2129427568B1}.Debug - MemLeak|x64.Build.0 = Debug|x64
|
||||
{3FCC50C2-81E9-5DB2-B8D8-2129427568B1}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{3FCC50C2-81E9-5DB2-B8D8-2129427568B1}.Debug|x64.Build.0 = Debug|x64
|
||||
{3FCC50C2-81E9-5DB2-B8D8-2129427568B1}.Release - LLVM|x64.ActiveCfg = Release|x64
|
||||
{3FCC50C2-81E9-5DB2-B8D8-2129427568B1}.Release - LLVM|x64.Build.0 = Release|x64
|
||||
{3FCC50C2-81E9-5DB2-B8D8-2129427568B1}.Release|x64.ActiveCfg = Release|x64
|
||||
{3FCC50C2-81E9-5DB2-B8D8-2129427568B1}.Release|x64.Build.0 = Release|x64
|
||||
{6744DAD8-9C70-574A-BFF2-9F8DDDB24A75}.Debug - LLVM|x64.ActiveCfg = Debug|x64
|
||||
{6744DAD8-9C70-574A-BFF2-9F8DDDB24A75}.Debug - LLVM|x64.Build.0 = Debug|x64
|
||||
{6744DAD8-9C70-574A-BFF2-9F8DDDB24A75}.Debug - MemLeak|x64.ActiveCfg = Debug|x64
|
||||
{6744DAD8-9C70-574A-BFF2-9F8DDDB24A75}.Debug - MemLeak|x64.Build.0 = Debug|x64
|
||||
{6744DAD8-9C70-574A-BFF2-9F8DDDB24A75}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{6744DAD8-9C70-574A-BFF2-9F8DDDB24A75}.Debug|x64.Build.0 = Debug|x64
|
||||
{6744DAD8-9C70-574A-BFF2-9F8DDDB24A75}.Release - LLVM|x64.ActiveCfg = Release|x64
|
||||
{6744DAD8-9C70-574A-BFF2-9F8DDDB24A75}.Release - LLVM|x64.Build.0 = Release|x64
|
||||
{6744DAD8-9C70-574A-BFF2-9F8DDDB24A75}.Release|x64.ActiveCfg = Release|x64
|
||||
{6744DAD8-9C70-574A-BFF2-9F8DDDB24A75}.Release|x64.Build.0 = Release|x64
|
||||
{97FDAB45-9C58-5BC5-A2F4-EE42739EBC63}.Debug - LLVM|x64.ActiveCfg = Debug|x64
|
||||
{97FDAB45-9C58-5BC5-A2F4-EE42739EBC63}.Debug - LLVM|x64.Build.0 = Debug|x64
|
||||
{97FDAB45-9C58-5BC5-A2F4-EE42739EBC63}.Debug - MemLeak|x64.ActiveCfg = Debug|x64
|
||||
{97FDAB45-9C58-5BC5-A2F4-EE42739EBC63}.Debug - MemLeak|x64.Build.0 = Debug|x64
|
||||
{97FDAB45-9C58-5BC5-A2F4-EE42739EBC63}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{97FDAB45-9C58-5BC5-A2F4-EE42739EBC63}.Debug|x64.Build.0 = Debug|x64
|
||||
{97FDAB45-9C58-5BC5-A2F4-EE42739EBC63}.Release - LLVM|x64.ActiveCfg = Release|x64
|
||||
{97FDAB45-9C58-5BC5-A2F4-EE42739EBC63}.Release - LLVM|x64.Build.0 = Release|x64
|
||||
{97FDAB45-9C58-5BC5-A2F4-EE42739EBC63}.Release|x64.ActiveCfg = Release|x64
|
||||
{97FDAB45-9C58-5BC5-A2F4-EE42739EBC63}.Release|x64.Build.0 = Release|x64
|
||||
{DA8B15EF-6750-5928-BC0E-C748213CF9B2}.Debug - LLVM|x64.ActiveCfg = Debug|x64
|
||||
{DA8B15EF-6750-5928-BC0E-C748213CF9B2}.Debug - LLVM|x64.Build.0 = Debug|x64
|
||||
{DA8B15EF-6750-5928-BC0E-C748213CF9B2}.Debug - MemLeak|x64.ActiveCfg = Debug|x64
|
||||
{DA8B15EF-6750-5928-BC0E-C748213CF9B2}.Debug - MemLeak|x64.Build.0 = Debug|x64
|
||||
{DA8B15EF-6750-5928-BC0E-C748213CF9B2}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{DA8B15EF-6750-5928-BC0E-C748213CF9B2}.Debug|x64.Build.0 = Debug|x64
|
||||
{DA8B15EF-6750-5928-BC0E-C748213CF9B2}.Release - LLVM|x64.ActiveCfg = Release|x64
|
||||
{DA8B15EF-6750-5928-BC0E-C748213CF9B2}.Release - LLVM|x64.Build.0 = Release|x64
|
||||
{DA8B15EF-6750-5928-BC0E-C748213CF9B2}.Release|x64.ActiveCfg = Release|x64
|
||||
{DA8B15EF-6750-5928-BC0E-C748213CF9B2}.Release|x64.Build.0 = Release|x64
|
||||
{33CC42F9-7756-5587-863C-8D4461B7C5DD}.Debug - LLVM|x64.ActiveCfg = Debug|x64
|
||||
{33CC42F9-7756-5587-863C-8D4461B7C5DD}.Debug - LLVM|x64.Build.0 = Debug|x64
|
||||
{33CC42F9-7756-5587-863C-8D4461B7C5DD}.Debug - MemLeak|x64.ActiveCfg = Debug|x64
|
||||
{33CC42F9-7756-5587-863C-8D4461B7C5DD}.Debug - MemLeak|x64.Build.0 = Debug|x64
|
||||
{33CC42F9-7756-5587-863C-8D4461B7C5DD}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{33CC42F9-7756-5587-863C-8D4461B7C5DD}.Debug|x64.Build.0 = Debug|x64
|
||||
{33CC42F9-7756-5587-863C-8D4461B7C5DD}.Release - LLVM|x64.ActiveCfg = Release|x64
|
||||
{33CC42F9-7756-5587-863C-8D4461B7C5DD}.Release - LLVM|x64.Build.0 = Release|x64
|
||||
{33CC42F9-7756-5587-863C-8D4461B7C5DD}.Release|x64.ActiveCfg = Release|x64
|
||||
{33CC42F9-7756-5587-863C-8D4461B7C5DD}.Release|x64.Build.0 = Release|x64
|
||||
{8BD8F8D9-4275-5B42-A8F4-F1DB2970A550}.Debug - LLVM|x64.ActiveCfg = Debug|x64
|
||||
{8BD8F8D9-4275-5B42-A8F4-F1DB2970A550}.Debug - LLVM|x64.Build.0 = Debug|x64
|
||||
{8BD8F8D9-4275-5B42-A8F4-F1DB2970A550}.Debug - MemLeak|x64.ActiveCfg = Debug|x64
|
||||
{8BD8F8D9-4275-5B42-A8F4-F1DB2970A550}.Debug - MemLeak|x64.Build.0 = Debug|x64
|
||||
{8BD8F8D9-4275-5B42-A8F4-F1DB2970A550}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{8BD8F8D9-4275-5B42-A8F4-F1DB2970A550}.Debug|x64.Build.0 = Debug|x64
|
||||
{8BD8F8D9-4275-5B42-A8F4-F1DB2970A550}.Release - LLVM|x64.ActiveCfg = Release|x64
|
||||
{8BD8F8D9-4275-5B42-A8F4-F1DB2970A550}.Release - LLVM|x64.Build.0 = Release|x64
|
||||
{8BD8F8D9-4275-5B42-A8F4-F1DB2970A550}.Release|x64.ActiveCfg = Release|x64
|
||||
{8BD8F8D9-4275-5B42-A8F4-F1DB2970A550}.Release|x64.Build.0 = Release|x64
|
||||
{69F2EDE4-7D21-5738-9BC0-F66F61C9AE00}.Debug - LLVM|x64.ActiveCfg = Debug|x64
|
||||
{69F2EDE4-7D21-5738-9BC0-F66F61C9AE00}.Debug - LLVM|x64.Build.0 = Debug|x64
|
||||
{69F2EDE4-7D21-5738-9BC0-F66F61C9AE00}.Debug - MemLeak|x64.ActiveCfg = Debug|x64
|
||||
{69F2EDE4-7D21-5738-9BC0-F66F61C9AE00}.Debug - MemLeak|x64.Build.0 = Debug|x64
|
||||
{69F2EDE4-7D21-5738-9BC0-F66F61C9AE00}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{69F2EDE4-7D21-5738-9BC0-F66F61C9AE00}.Debug|x64.Build.0 = Debug|x64
|
||||
{69F2EDE4-7D21-5738-9BC0-F66F61C9AE00}.Release - LLVM|x64.ActiveCfg = Release|x64
|
||||
{69F2EDE4-7D21-5738-9BC0-F66F61C9AE00}.Release - LLVM|x64.Build.0 = Release|x64
|
||||
{69F2EDE4-7D21-5738-9BC0-F66F61C9AE00}.Release|x64.ActiveCfg = Release|x64
|
||||
{69F2EDE4-7D21-5738-9BC0-F66F61C9AE00}.Release|x64.Build.0 = Release|x64
|
||||
{E21129E0-7C08-5936-9D8C-0D60B5319BA7}.Debug - LLVM|x64.ActiveCfg = Debug|x64
|
||||
{E21129E0-7C08-5936-9D8C-0D60B5319BA7}.Debug - LLVM|x64.Build.0 = Debug|x64
|
||||
{E21129E0-7C08-5936-9D8C-0D60B5319BA7}.Debug - MemLeak|x64.ActiveCfg = Debug|x64
|
||||
{E21129E0-7C08-5936-9D8C-0D60B5319BA7}.Debug - MemLeak|x64.Build.0 = Debug|x64
|
||||
{E21129E0-7C08-5936-9D8C-0D60B5319BA7}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{E21129E0-7C08-5936-9D8C-0D60B5319BA7}.Debug|x64.Build.0 = Debug|x64
|
||||
{E21129E0-7C08-5936-9D8C-0D60B5319BA7}.Release - LLVM|x64.ActiveCfg = Release|x64
|
||||
{E21129E0-7C08-5936-9D8C-0D60B5319BA7}.Release - LLVM|x64.Build.0 = Release|x64
|
||||
{E21129E0-7C08-5936-9D8C-0D60B5319BA7}.Release|x64.ActiveCfg = Release|x64
|
||||
{E21129E0-7C08-5936-9D8C-0D60B5319BA7}.Release|x64.Build.0 = Release|x64
|
||||
{7FB0902D-8579-5DCE-B883-DAF66A885005}.Debug - LLVM|x64.ActiveCfg = Debug|x64
|
||||
{7FB0902D-8579-5DCE-B883-DAF66A885005}.Debug - LLVM|x64.Build.0 = Debug|x64
|
||||
{7FB0902D-8579-5DCE-B883-DAF66A885005}.Debug - MemLeak|x64.ActiveCfg = Debug|x64
|
||||
{7FB0902D-8579-5DCE-B883-DAF66A885005}.Debug - MemLeak|x64.Build.0 = Debug|x64
|
||||
{7FB0902D-8579-5DCE-B883-DAF66A885005}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{7FB0902D-8579-5DCE-B883-DAF66A885005}.Debug|x64.Build.0 = Debug|x64
|
||||
{7FB0902D-8579-5DCE-B883-DAF66A885005}.Release - LLVM|x64.ActiveCfg = Release|x64
|
||||
{7FB0902D-8579-5DCE-B883-DAF66A885005}.Release - LLVM|x64.Build.0 = Release|x64
|
||||
{7FB0902D-8579-5DCE-B883-DAF66A885005}.Release|x64.ActiveCfg = Release|x64
|
||||
{7FB0902D-8579-5DCE-B883-DAF66A885005}.Release|x64.Build.0 = Release|x64
|
||||
{A1A8355B-0988-528E-9CC2-B971D6266669}.Debug - LLVM|x64.ActiveCfg = Debug|x64
|
||||
{A1A8355B-0988-528E-9CC2-B971D6266669}.Debug - LLVM|x64.Build.0 = Debug|x64
|
||||
{A1A8355B-0988-528E-9CC2-B971D6266669}.Debug - MemLeak|x64.ActiveCfg = Debug|x64
|
||||
{A1A8355B-0988-528E-9CC2-B971D6266669}.Debug - MemLeak|x64.Build.0 = Debug|x64
|
||||
{A1A8355B-0988-528E-9CC2-B971D6266669}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{A1A8355B-0988-528E-9CC2-B971D6266669}.Debug|x64.Build.0 = Debug|x64
|
||||
{A1A8355B-0988-528E-9CC2-B971D6266669}.Release - LLVM|x64.ActiveCfg = Release|x64
|
||||
{A1A8355B-0988-528E-9CC2-B971D6266669}.Release - LLVM|x64.Build.0 = Release|x64
|
||||
{A1A8355B-0988-528E-9CC2-B971D6266669}.Release|x64.ActiveCfg = Release|x64
|
||||
{A1A8355B-0988-528E-9CC2-B971D6266669}.Release|x64.Build.0 = Release|x64
|
||||
{6053CC38-CDEE-584C-8BC8-4B000D800FC7}.Debug - LLVM|x64.ActiveCfg = Debug|x64
|
||||
{6053CC38-CDEE-584C-8BC8-4B000D800FC7}.Debug - LLVM|x64.Build.0 = Debug|x64
|
||||
{6053CC38-CDEE-584C-8BC8-4B000D800FC7}.Debug - MemLeak|x64.ActiveCfg = Debug|x64
|
||||
{6053CC38-CDEE-584C-8BC8-4B000D800FC7}.Debug - MemLeak|x64.Build.0 = Debug|x64
|
||||
{6053CC38-CDEE-584C-8BC8-4B000D800FC7}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{6053CC38-CDEE-584C-8BC8-4B000D800FC7}.Debug|x64.Build.0 = Debug|x64
|
||||
{6053CC38-CDEE-584C-8BC8-4B000D800FC7}.Release - LLVM|x64.ActiveCfg = Release|x64
|
||||
{6053CC38-CDEE-584C-8BC8-4B000D800FC7}.Release - LLVM|x64.Build.0 = Release|x64
|
||||
{6053CC38-CDEE-584C-8BC8-4B000D800FC7}.Release|x64.ActiveCfg = Release|x64
|
||||
{6053CC38-CDEE-584C-8BC8-4B000D800FC7}.Release|x64.Build.0 = Release|x64
|
||||
{8ACC122A-CA6A-5AA6-9C97-9CDD2E533DB0}.Debug - LLVM|x64.ActiveCfg = Debug|x64
|
||||
{8ACC122A-CA6A-5AA6-9C97-9CDD2E533DB0}.Debug - LLVM|x64.Build.0 = Debug|x64
|
||||
{8ACC122A-CA6A-5AA6-9C97-9CDD2E533DB0}.Debug - MemLeak|x64.ActiveCfg = Debug|x64
|
||||
{8ACC122A-CA6A-5AA6-9C97-9CDD2E533DB0}.Debug - MemLeak|x64.Build.0 = Debug|x64
|
||||
{8ACC122A-CA6A-5AA6-9C97-9CDD2E533DB0}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{8ACC122A-CA6A-5AA6-9C97-9CDD2E533DB0}.Debug|x64.Build.0 = Debug|x64
|
||||
{8ACC122A-CA6A-5AA6-9C97-9CDD2E533DB0}.Release - LLVM|x64.ActiveCfg = Release|x64
|
||||
{8ACC122A-CA6A-5AA6-9C97-9CDD2E533DB0}.Release - LLVM|x64.Build.0 = Release|x64
|
||||
{8ACC122A-CA6A-5AA6-9C97-9CDD2E533DB0}.Release|x64.ActiveCfg = Release|x64
|
||||
{8ACC122A-CA6A-5AA6-9C97-9CDD2E533DB0}.Release|x64.Build.0 = Release|x64
|
||||
{56A4B526-BB81-5D01-AAA9-16D23BBB169D}.Debug - LLVM|x64.ActiveCfg = Debug|x64
|
||||
{56A4B526-BB81-5D01-AAA9-16D23BBB169D}.Debug - LLVM|x64.Build.0 = Debug|x64
|
||||
{56A4B526-BB81-5D01-AAA9-16D23BBB169D}.Debug - MemLeak|x64.ActiveCfg = Debug|x64
|
||||
{56A4B526-BB81-5D01-AAA9-16D23BBB169D}.Debug - MemLeak|x64.Build.0 = Debug|x64
|
||||
{56A4B526-BB81-5D01-AAA9-16D23BBB169D}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{56A4B526-BB81-5D01-AAA9-16D23BBB169D}.Debug|x64.Build.0 = Debug|x64
|
||||
{56A4B526-BB81-5D01-AAA9-16D23BBB169D}.Release - LLVM|x64.ActiveCfg = Release|x64
|
||||
{56A4B526-BB81-5D01-AAA9-16D23BBB169D}.Release - LLVM|x64.Build.0 = Release|x64
|
||||
{56A4B526-BB81-5D01-AAA9-16D23BBB169D}.Release|x64.ActiveCfg = Release|x64
|
||||
{56A4B526-BB81-5D01-AAA9-16D23BBB169D}.Release|x64.Build.0 = Release|x64
|
||||
{75596CE6-5AE7-55C9-B890-C07B0A657A83}.Debug - LLVM|x64.ActiveCfg = Debug|x64
|
||||
{75596CE6-5AE7-55C9-B890-C07B0A657A83}.Debug - LLVM|x64.Build.0 = Debug|x64
|
||||
{75596CE6-5AE7-55C9-B890-C07B0A657A83}.Debug - MemLeak|x64.ActiveCfg = Debug|x64
|
||||
{75596CE6-5AE7-55C9-B890-C07B0A657A83}.Debug - MemLeak|x64.Build.0 = Debug|x64
|
||||
{75596CE6-5AE7-55C9-B890-C07B0A657A83}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{75596CE6-5AE7-55C9-B890-C07B0A657A83}.Debug|x64.Build.0 = Debug|x64
|
||||
{75596CE6-5AE7-55C9-B890-C07B0A657A83}.Release - LLVM|x64.ActiveCfg = Release|x64
|
||||
{75596CE6-5AE7-55C9-B890-C07B0A657A83}.Release - LLVM|x64.Build.0 = Release|x64
|
||||
{75596CE6-5AE7-55C9-B890-C07B0A657A83}.Release|x64.ActiveCfg = Release|x64
|
||||
{75596CE6-5AE7-55C9-B890-C07B0A657A83}.Release|x64.Build.0 = Release|x64
|
||||
{8B867186-A0B5-5479-B824-E176EDD27C40}.Debug - LLVM|x64.ActiveCfg = Debug|x64
|
||||
{8B867186-A0B5-5479-B824-E176EDD27C40}.Debug - LLVM|x64.Build.0 = Debug|x64
|
||||
{8B867186-A0B5-5479-B824-E176EDD27C40}.Debug - MemLeak|x64.ActiveCfg = Debug|x64
|
||||
{8B867186-A0B5-5479-B824-E176EDD27C40}.Debug - MemLeak|x64.Build.0 = Debug|x64
|
||||
{8B867186-A0B5-5479-B824-E176EDD27C40}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{8B867186-A0B5-5479-B824-E176EDD27C40}.Debug|x64.Build.0 = Debug|x64
|
||||
{8B867186-A0B5-5479-B824-E176EDD27C40}.Release - LLVM|x64.ActiveCfg = Release|x64
|
||||
{8B867186-A0B5-5479-B824-E176EDD27C40}.Release - LLVM|x64.Build.0 = Release|x64
|
||||
{8B867186-A0B5-5479-B824-E176EDD27C40}.Release|x64.ActiveCfg = Release|x64
|
||||
{8B867186-A0B5-5479-B824-E176EDD27C40}.Release|x64.Build.0 = Release|x64
|
||||
{3E6DCA27-5FA3-53EC-BBD6-2D42294B7AE6}.Debug - LLVM|x64.ActiveCfg = Debug|x64
|
||||
{3E6DCA27-5FA3-53EC-BBD6-2D42294B7AE6}.Debug - LLVM|x64.Build.0 = Debug|x64
|
||||
{3E6DCA27-5FA3-53EC-BBD6-2D42294B7AE6}.Debug - MemLeak|x64.ActiveCfg = Debug|x64
|
||||
{3E6DCA27-5FA3-53EC-BBD6-2D42294B7AE6}.Debug - MemLeak|x64.Build.0 = Debug|x64
|
||||
{3E6DCA27-5FA3-53EC-BBD6-2D42294B7AE6}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{3E6DCA27-5FA3-53EC-BBD6-2D42294B7AE6}.Debug|x64.Build.0 = Debug|x64
|
||||
{3E6DCA27-5FA3-53EC-BBD6-2D42294B7AE6}.Release - LLVM|x64.ActiveCfg = Release|x64
|
||||
{3E6DCA27-5FA3-53EC-BBD6-2D42294B7AE6}.Release - LLVM|x64.Build.0 = Release|x64
|
||||
{3E6DCA27-5FA3-53EC-BBD6-2D42294B7AE6}.Release|x64.ActiveCfg = Release|x64
|
||||
{3E6DCA27-5FA3-53EC-BBD6-2D42294B7AE6}.Release|x64.Build.0 = Release|x64
|
||||
{09F2F96A-1CC6-5E43-AF1D-956EC2A4888D}.Debug - LLVM|x64.ActiveCfg = Debug|x64
|
||||
{09F2F96A-1CC6-5E43-AF1D-956EC2A4888D}.Debug - LLVM|x64.Build.0 = Debug|x64
|
||||
{09F2F96A-1CC6-5E43-AF1D-956EC2A4888D}.Debug - MemLeak|x64.ActiveCfg = Debug|x64
|
||||
{09F2F96A-1CC6-5E43-AF1D-956EC2A4888D}.Debug - MemLeak|x64.Build.0 = Debug|x64
|
||||
{09F2F96A-1CC6-5E43-AF1D-956EC2A4888D}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{09F2F96A-1CC6-5E43-AF1D-956EC2A4888D}.Debug|x64.Build.0 = Debug|x64
|
||||
{09F2F96A-1CC6-5E43-AF1D-956EC2A4888D}.Release - LLVM|x64.ActiveCfg = Release|x64
|
||||
{09F2F96A-1CC6-5E43-AF1D-956EC2A4888D}.Release - LLVM|x64.Build.0 = Release|x64
|
||||
{09F2F96A-1CC6-5E43-AF1D-956EC2A4888D}.Release|x64.ActiveCfg = Release|x64
|
||||
{09F2F96A-1CC6-5E43-AF1D-956EC2A4888D}.Release|x64.Build.0 = Release|x64
|
||||
{87B42A9C-3F5C-53D7-9017-2B1CAE39457D}.Debug - LLVM|x64.ActiveCfg = Debug|x64
|
||||
{87B42A9C-3F5C-53D7-9017-2B1CAE39457D}.Debug - LLVM|x64.Build.0 = Debug|x64
|
||||
{87B42A9C-3F5C-53D7-9017-2B1CAE39457D}.Debug - MemLeak|x64.ActiveCfg = Debug|x64
|
||||
{87B42A9C-3F5C-53D7-9017-2B1CAE39457D}.Debug - MemLeak|x64.Build.0 = Debug|x64
|
||||
{87B42A9C-3F5C-53D7-9017-2B1CAE39457D}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{87B42A9C-3F5C-53D7-9017-2B1CAE39457D}.Debug|x64.Build.0 = Debug|x64
|
||||
{87B42A9C-3F5C-53D7-9017-2B1CAE39457D}.Release - LLVM|x64.ActiveCfg = Release|x64
|
||||
{87B42A9C-3F5C-53D7-9017-2B1CAE39457D}.Release - LLVM|x64.Build.0 = Release|x64
|
||||
{87B42A9C-3F5C-53D7-9017-2B1CAE39457D}.Release|x64.ActiveCfg = Release|x64
|
||||
{87B42A9C-3F5C-53D7-9017-2B1CAE39457D}.Release|x64.Build.0 = Release|x64
|
||||
{23E1C437-A951-5943-8639-A17F3CF2E606}.Debug - LLVM|x64.ActiveCfg = Debug|x64
|
||||
{23E1C437-A951-5943-8639-A17F3CF2E606}.Debug - LLVM|x64.Build.0 = Debug|x64
|
||||
{23E1C437-A951-5943-8639-A17F3CF2E606}.Debug - MemLeak|x64.ActiveCfg = Debug|x64
|
||||
{23E1C437-A951-5943-8639-A17F3CF2E606}.Debug - MemLeak|x64.Build.0 = Debug|x64
|
||||
{23E1C437-A951-5943-8639-A17F3CF2E606}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{23E1C437-A951-5943-8639-A17F3CF2E606}.Debug|x64.Build.0 = Debug|x64
|
||||
{23E1C437-A951-5943-8639-A17F3CF2E606}.Release - LLVM|x64.ActiveCfg = Release|x64
|
||||
{23E1C437-A951-5943-8639-A17F3CF2E606}.Release - LLVM|x64.Build.0 = Release|x64
|
||||
{23E1C437-A951-5943-8639-A17F3CF2E606}.Release|x64.ActiveCfg = Release|x64
|
||||
{23E1C437-A951-5943-8639-A17F3CF2E606}.Release|x64.Build.0 = Release|x64
|
||||
{74827EBD-93DC-5110-BA95-3F2AB029B6B0}.Debug - LLVM|x64.ActiveCfg = Debug|x64
|
||||
{74827EBD-93DC-5110-BA95-3F2AB029B6B0}.Debug - LLVM|x64.Build.0 = Debug|x64
|
||||
{74827EBD-93DC-5110-BA95-3F2AB029B6B0}.Debug - MemLeak|x64.ActiveCfg = Debug|x64
|
||||
{74827EBD-93DC-5110-BA95-3F2AB029B6B0}.Debug - MemLeak|x64.Build.0 = Debug|x64
|
||||
{74827EBD-93DC-5110-BA95-3F2AB029B6B0}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{74827EBD-93DC-5110-BA95-3F2AB029B6B0}.Debug|x64.Build.0 = Debug|x64
|
||||
{74827EBD-93DC-5110-BA95-3F2AB029B6B0}.Release - LLVM|x64.ActiveCfg = Release|x64
|
||||
{74827EBD-93DC-5110-BA95-3F2AB029B6B0}.Release - LLVM|x64.Build.0 = Release|x64
|
||||
{74827EBD-93DC-5110-BA95-3F2AB029B6B0}.Release|x64.ActiveCfg = Release|x64
|
||||
{74827EBD-93DC-5110-BA95-3F2AB029B6B0}.Release|x64.Build.0 = Release|x64
|
||||
{AC40FF01-426E-4838-A317-66354CEFAE88}.Debug - LLVM|x64.ActiveCfg = Debug - LLVM|x64
|
||||
{AC40FF01-426E-4838-A317-66354CEFAE88}.Debug - LLVM|x64.Build.0 = Debug - LLVM|x64
|
||||
{AC40FF01-426E-4838-A317-66354CEFAE88}.Debug - MemLeak|x64.ActiveCfg = Debug - MemLeak|x64
|
||||
@@ -488,26 +108,6 @@ Global
|
||||
{8BC303AB-25BE-4276-8E57-73F171B2D672}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{8BC303AB-25BE-4276-8E57-73F171B2D672}.Release - LLVM|x64.ActiveCfg = Release|x64
|
||||
{8BC303AB-25BE-4276-8E57-73F171B2D672}.Release|x64.ActiveCfg = Release|x64
|
||||
{01F4CE10-2CFB-41A8-B41F-E54337868A1D}.Debug - LLVM|x64.ActiveCfg = Debug|x64
|
||||
{01F4CE10-2CFB-41A8-B41F-E54337868A1D}.Debug - LLVM|x64.Build.0 = Debug|x64
|
||||
{01F4CE10-2CFB-41A8-B41F-E54337868A1D}.Debug - MemLeak|x64.ActiveCfg = Debug|x64
|
||||
{01F4CE10-2CFB-41A8-B41F-E54337868A1D}.Debug - MemLeak|x64.Build.0 = Debug|x64
|
||||
{01F4CE10-2CFB-41A8-B41F-E54337868A1D}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{01F4CE10-2CFB-41A8-B41F-E54337868A1D}.Debug|x64.Build.0 = Debug|x64
|
||||
{01F4CE10-2CFB-41A8-B41F-E54337868A1D}.Release - LLVM|x64.ActiveCfg = Release|x64
|
||||
{01F4CE10-2CFB-41A8-B41F-E54337868A1D}.Release - LLVM|x64.Build.0 = Release|x64
|
||||
{01F4CE10-2CFB-41A8-B41F-E54337868A1D}.Release|x64.ActiveCfg = Release|x64
|
||||
{01F4CE10-2CFB-41A8-B41F-E54337868A1D}.Release|x64.Build.0 = Release|x64
|
||||
{00D36322-6188-4A66-B514-3B3F183E998D}.Debug - LLVM|x64.ActiveCfg = Debug|x64
|
||||
{00D36322-6188-4A66-B514-3B3F183E998D}.Debug - LLVM|x64.Build.0 = Debug|x64
|
||||
{00D36322-6188-4A66-B514-3B3F183E998D}.Debug - MemLeak|x64.ActiveCfg = Debug|x64
|
||||
{00D36322-6188-4A66-B514-3B3F183E998D}.Debug - MemLeak|x64.Build.0 = Debug|x64
|
||||
{00D36322-6188-4A66-B514-3B3F183E998D}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{00D36322-6188-4A66-B514-3B3F183E998D}.Debug|x64.Build.0 = Debug|x64
|
||||
{00D36322-6188-4A66-B514-3B3F183E998D}.Release - LLVM|x64.ActiveCfg = Release|x64
|
||||
{00D36322-6188-4A66-B514-3B3F183E998D}.Release - LLVM|x64.Build.0 = Release|x64
|
||||
{00D36322-6188-4A66-B514-3B3F183E998D}.Release|x64.ActiveCfg = Release|x64
|
||||
{00D36322-6188-4A66-B514-3B3F183E998D}.Release|x64.Build.0 = Release|x64
|
||||
{FAC9B17B-F4B8-4B75-8AEB-C8C7CB92B078}.Debug - LLVM|x64.ActiveCfg = Debug - LLVM|x64
|
||||
{FAC9B17B-F4B8-4B75-8AEB-C8C7CB92B078}.Debug - LLVM|x64.Build.0 = Debug - LLVM|x64
|
||||
{FAC9B17B-F4B8-4B75-8AEB-C8C7CB92B078}.Debug - MemLeak|x64.ActiveCfg = Debug - MemLeak|x64
|
||||
@@ -533,26 +133,6 @@ Global
|
||||
{3384223A-6D97-4799-9862-359F85312892}.Release - LLVM|x64.Build.0 = Release - LLVM|x64
|
||||
{3384223A-6D97-4799-9862-359F85312892}.Release|x64.ActiveCfg = Release|x64
|
||||
{3384223A-6D97-4799-9862-359F85312892}.Release|x64.Build.0 = Release|x64
|
||||
{97E17077-A21F-45EF-9C3A-73A0BC092D7E}.Debug - LLVM|x64.ActiveCfg = Debug|x64
|
||||
{97E17077-A21F-45EF-9C3A-73A0BC092D7E}.Debug - LLVM|x64.Build.0 = Debug|x64
|
||||
{97E17077-A21F-45EF-9C3A-73A0BC092D7E}.Debug - MemLeak|x64.ActiveCfg = Debug|x64
|
||||
{97E17077-A21F-45EF-9C3A-73A0BC092D7E}.Debug - MemLeak|x64.Build.0 = Debug|x64
|
||||
{97E17077-A21F-45EF-9C3A-73A0BC092D7E}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{97E17077-A21F-45EF-9C3A-73A0BC092D7E}.Debug|x64.Build.0 = Debug|x64
|
||||
{97E17077-A21F-45EF-9C3A-73A0BC092D7E}.Release - LLVM|x64.ActiveCfg = Release|x64
|
||||
{97E17077-A21F-45EF-9C3A-73A0BC092D7E}.Release - LLVM|x64.Build.0 = Release|x64
|
||||
{97E17077-A21F-45EF-9C3A-73A0BC092D7E}.Release|x64.ActiveCfg = Release|x64
|
||||
{97E17077-A21F-45EF-9C3A-73A0BC092D7E}.Release|x64.Build.0 = Release|x64
|
||||
{7D73447B-3D2D-4DFE-BF62-57E644C1D09F}.Debug - LLVM|x64.ActiveCfg = Debug|x64
|
||||
{7D73447B-3D2D-4DFE-BF62-57E644C1D09F}.Debug - LLVM|x64.Build.0 = Debug|x64
|
||||
{7D73447B-3D2D-4DFE-BF62-57E644C1D09F}.Debug - MemLeak|x64.ActiveCfg = Debug|x64
|
||||
{7D73447B-3D2D-4DFE-BF62-57E644C1D09F}.Debug - MemLeak|x64.Build.0 = Debug|x64
|
||||
{7D73447B-3D2D-4DFE-BF62-57E644C1D09F}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{7D73447B-3D2D-4DFE-BF62-57E644C1D09F}.Debug|x64.Build.0 = Debug|x64
|
||||
{7D73447B-3D2D-4DFE-BF62-57E644C1D09F}.Release - LLVM|x64.ActiveCfg = Release|x64
|
||||
{7D73447B-3D2D-4DFE-BF62-57E644C1D09F}.Release - LLVM|x64.Build.0 = Release|x64
|
||||
{7D73447B-3D2D-4DFE-BF62-57E644C1D09F}.Release|x64.ActiveCfg = Release|x64
|
||||
{7D73447B-3D2D-4DFE-BF62-57E644C1D09F}.Release|x64.Build.0 = Release|x64
|
||||
{78CB2F39-B809-4A06-8329-8C0A19119D3D}.Debug - LLVM|x64.ActiveCfg = Debug - LLVM|x64
|
||||
{78CB2F39-B809-4A06-8329-8C0A19119D3D}.Debug - LLVM|x64.Build.0 = Debug - LLVM|x64
|
||||
{78CB2F39-B809-4A06-8329-8C0A19119D3D}.Debug - MemLeak|x64.ActiveCfg = Debug - MemLeak|x64
|
||||
@@ -583,16 +163,16 @@ Global
|
||||
{D6973076-9317-4EF2-A0B8-B7A18AC0713E}.Release - LLVM|x64.Build.0 = Release Library|x64
|
||||
{D6973076-9317-4EF2-A0B8-B7A18AC0713E}.Release|x64.ActiveCfg = Release Library|x64
|
||||
{D6973076-9317-4EF2-A0B8-B7A18AC0713E}.Release|x64.Build.0 = Release Library|x64
|
||||
{60F89955-91C6-3A36-8000-13C592FEC2DF}.Debug - LLVM|x64.ActiveCfg = Debug Library|x64
|
||||
{60F89955-91C6-3A36-8000-13C592FEC2DF}.Debug - LLVM|x64.Build.0 = Debug Library|x64
|
||||
{60F89955-91C6-3A36-8000-13C592FEC2DF}.Debug - MemLeak|x64.ActiveCfg = Debug Library|x64
|
||||
{60F89955-91C6-3A36-8000-13C592FEC2DF}.Debug - MemLeak|x64.Build.0 = Debug Library|x64
|
||||
{60F89955-91C6-3A36-8000-13C592FEC2DF}.Debug|x64.ActiveCfg = Debug Library|x64
|
||||
{60F89955-91C6-3A36-8000-13C592FEC2DF}.Debug|x64.Build.0 = Debug Library|x64
|
||||
{60F89955-91C6-3A36-8000-13C592FEC2DF}.Release - LLVM|x64.ActiveCfg = Release Library|x64
|
||||
{60F89955-91C6-3A36-8000-13C592FEC2DF}.Release - LLVM|x64.Build.0 = Release Library|x64
|
||||
{60F89955-91C6-3A36-8000-13C592FEC2DF}.Release|x64.ActiveCfg = Release Library|x64
|
||||
{60F89955-91C6-3A36-8000-13C592FEC2DF}.Release|x64.Build.0 = Release Library|x64
|
||||
{60F89955-91C6-3A36-8000-13C592FEC2DF}.Debug - LLVM|x64.ActiveCfg = Debug|x64
|
||||
{60F89955-91C6-3A36-8000-13C592FEC2DF}.Debug - LLVM|x64.Build.0 = Debug|x64
|
||||
{60F89955-91C6-3A36-8000-13C592FEC2DF}.Debug - MemLeak|x64.ActiveCfg = Debug|x64
|
||||
{60F89955-91C6-3A36-8000-13C592FEC2DF}.Debug - MemLeak|x64.Build.0 = Debug|x64
|
||||
{60F89955-91C6-3A36-8000-13C592FEC2DF}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{60F89955-91C6-3A36-8000-13C592FEC2DF}.Debug|x64.Build.0 = Debug|x64
|
||||
{60F89955-91C6-3A36-8000-13C592FEC2DF}.Release - LLVM|x64.ActiveCfg = Release|x64
|
||||
{60F89955-91C6-3A36-8000-13C592FEC2DF}.Release - LLVM|x64.Build.0 = Release|x64
|
||||
{60F89955-91C6-3A36-8000-13C592FEC2DF}.Release|x64.ActiveCfg = Release|x64
|
||||
{60F89955-91C6-3A36-8000-13C592FEC2DF}.Release|x64.Build.0 = Release|x64
|
||||
{58B40697-B15E-429E-B325-D52C28AEBCBF}.Debug - LLVM|x64.ActiveCfg = Debug|x64
|
||||
{58B40697-B15E-429E-B325-D52C28AEBCBF}.Debug - MemLeak|x64.ActiveCfg = Debug|x64
|
||||
{58B40697-B15E-429E-B325-D52C28AEBCBF}.Debug|x64.ActiveCfg = Debug|x64
|
||||
@@ -613,16 +193,6 @@ Global
|
||||
{3EE5F075-B546-42C4-B6A8-E3CCEF38B78D}.Release - LLVM|x64.Build.0 = Release - LLVM|x64
|
||||
{3EE5F075-B546-42C4-B6A8-E3CCEF38B78D}.Release|x64.ActiveCfg = Release|x64
|
||||
{3EE5F075-B546-42C4-B6A8-E3CCEF38B78D}.Release|x64.Build.0 = Release|x64
|
||||
{A8E8442A-078A-5FC5-B495-8D71BA77EE6E}.Debug - LLVM|x64.ActiveCfg = Debug|x64
|
||||
{A8E8442A-078A-5FC5-B495-8D71BA77EE6E}.Debug - LLVM|x64.Build.0 = Debug|x64
|
||||
{A8E8442A-078A-5FC5-B495-8D71BA77EE6E}.Debug - MemLeak|x64.ActiveCfg = Debug|x64
|
||||
{A8E8442A-078A-5FC5-B495-8D71BA77EE6E}.Debug - MemLeak|x64.Build.0 = Debug|x64
|
||||
{A8E8442A-078A-5FC5-B495-8D71BA77EE6E}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{A8E8442A-078A-5FC5-B495-8D71BA77EE6E}.Debug|x64.Build.0 = Debug|x64
|
||||
{A8E8442A-078A-5FC5-B495-8D71BA77EE6E}.Release - LLVM|x64.ActiveCfg = Release|x64
|
||||
{A8E8442A-078A-5FC5-B495-8D71BA77EE6E}.Release - LLVM|x64.Build.0 = Release|x64
|
||||
{A8E8442A-078A-5FC5-B495-8D71BA77EE6E}.Release|x64.ActiveCfg = Release|x64
|
||||
{A8E8442A-078A-5FC5-B495-8D71BA77EE6E}.Release|x64.Build.0 = Release|x64
|
||||
{FDC361C5-7734-493B-8CFB-037308B35122}.Debug - LLVM|x64.ActiveCfg = Debug|x64
|
||||
{FDC361C5-7734-493B-8CFB-037308B35122}.Debug - LLVM|x64.Build.0 = Debug|x64
|
||||
{FDC361C5-7734-493B-8CFB-037308B35122}.Debug - MemLeak|x64.ActiveCfg = Debug|x64
|
||||
@@ -633,41 +203,36 @@ Global
|
||||
{FDC361C5-7734-493B-8CFB-037308B35122}.Release - LLVM|x64.Build.0 = Release|x64
|
||||
{FDC361C5-7734-493B-8CFB-037308B35122}.Release|x64.ActiveCfg = Release|x64
|
||||
{FDC361C5-7734-493B-8CFB-037308B35122}.Release|x64.Build.0 = Release|x64
|
||||
{70CD65B0-91D6-4FAE-9A7B-4AF55D0D1B12}.Debug - LLVM|x64.ActiveCfg = Debug - LLVM|x64
|
||||
{70CD65B0-91D6-4FAE-9A7B-4AF55D0D1B12}.Debug - LLVM|x64.Build.0 = Debug - LLVM|x64
|
||||
{70CD65B0-91D6-4FAE-9A7B-4AF55D0D1B12}.Debug - MemLeak|x64.ActiveCfg = Debug|x64
|
||||
{70CD65B0-91D6-4FAE-9A7B-4AF55D0D1B12}.Debug - MemLeak|x64.Build.0 = Debug|x64
|
||||
{70CD65B0-91D6-4FAE-9A7B-4AF55D0D1B12}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{70CD65B0-91D6-4FAE-9A7B-4AF55D0D1B12}.Debug|x64.Build.0 = Debug|x64
|
||||
{70CD65B0-91D6-4FAE-9A7B-4AF55D0D1B12}.Release - LLVM|x64.ActiveCfg = Release - LLVM|x64
|
||||
{70CD65B0-91D6-4FAE-9A7B-4AF55D0D1B12}.Release - LLVM|x64.Build.0 = Release - LLVM|x64
|
||||
{70CD65B0-91D6-4FAE-9A7B-4AF55D0D1B12}.Release|x64.ActiveCfg = Release|x64
|
||||
{70CD65B0-91D6-4FAE-9A7B-4AF55D0D1B12}.Release|x64.Build.0 = Release|x64
|
||||
{A107C21C-418A-4697-BB10-20C3AA60E2E4}.Debug - LLVM|x64.ActiveCfg = Debug|x64
|
||||
{A107C21C-418A-4697-BB10-20C3AA60E2E4}.Debug - LLVM|x64.Build.0 = Debug|x64
|
||||
{A107C21C-418A-4697-BB10-20C3AA60E2E4}.Debug - MemLeak|x64.ActiveCfg = Debug|x64
|
||||
{A107C21C-418A-4697-BB10-20C3AA60E2E4}.Debug - MemLeak|x64.Build.0 = Debug|x64
|
||||
{A107C21C-418A-4697-BB10-20C3AA60E2E4}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{A107C21C-418A-4697-BB10-20C3AA60E2E4}.Debug|x64.Build.0 = Debug|x64
|
||||
{A107C21C-418A-4697-BB10-20C3AA60E2E4}.Release - LLVM|x64.ActiveCfg = Release|x64
|
||||
{A107C21C-418A-4697-BB10-20C3AA60E2E4}.Release - LLVM|x64.Build.0 = Release|x64
|
||||
{A107C21C-418A-4697-BB10-20C3AA60E2E4}.Release|x64.ActiveCfg = Release|x64
|
||||
{A107C21C-418A-4697-BB10-20C3AA60E2E4}.Release|x64.Build.0 = Release|x64
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
GlobalSection(NestedProjects) = preSolution
|
||||
{24C45343-FD20-5C92-81C1-35A2AE841E79} = {5812E712-6213-4372-B095-9EB9BAA1F2DF}
|
||||
{A16D3832-0F42-57CE-8F48-50E06649ADE8} = {5812E712-6213-4372-B095-9EB9BAA1F2DF}
|
||||
{3FCC50C2-81E9-5DB2-B8D8-2129427568B1} = {5812E712-6213-4372-B095-9EB9BAA1F2DF}
|
||||
{6744DAD8-9C70-574A-BFF2-9F8DDDB24A75} = {5812E712-6213-4372-B095-9EB9BAA1F2DF}
|
||||
{97FDAB45-9C58-5BC5-A2F4-EE42739EBC63} = {5812E712-6213-4372-B095-9EB9BAA1F2DF}
|
||||
{DA8B15EF-6750-5928-BC0E-C748213CF9B2} = {5812E712-6213-4372-B095-9EB9BAA1F2DF}
|
||||
{33CC42F9-7756-5587-863C-8D4461B7C5DD} = {5812E712-6213-4372-B095-9EB9BAA1F2DF}
|
||||
{8BD8F8D9-4275-5B42-A8F4-F1DB2970A550} = {5812E712-6213-4372-B095-9EB9BAA1F2DF}
|
||||
{69F2EDE4-7D21-5738-9BC0-F66F61C9AE00} = {5812E712-6213-4372-B095-9EB9BAA1F2DF}
|
||||
{E21129E0-7C08-5936-9D8C-0D60B5319BA7} = {5812E712-6213-4372-B095-9EB9BAA1F2DF}
|
||||
{7FB0902D-8579-5DCE-B883-DAF66A885005} = {5812E712-6213-4372-B095-9EB9BAA1F2DF}
|
||||
{A1A8355B-0988-528E-9CC2-B971D6266669} = {5812E712-6213-4372-B095-9EB9BAA1F2DF}
|
||||
{6053CC38-CDEE-584C-8BC8-4B000D800FC7} = {5812E712-6213-4372-B095-9EB9BAA1F2DF}
|
||||
{8ACC122A-CA6A-5AA6-9C97-9CDD2E533DB0} = {5812E712-6213-4372-B095-9EB9BAA1F2DF}
|
||||
{56A4B526-BB81-5D01-AAA9-16D23BBB169D} = {5812E712-6213-4372-B095-9EB9BAA1F2DF}
|
||||
{75596CE6-5AE7-55C9-B890-C07B0A657A83} = {5812E712-6213-4372-B095-9EB9BAA1F2DF}
|
||||
{8B867186-A0B5-5479-B824-E176EDD27C40} = {5812E712-6213-4372-B095-9EB9BAA1F2DF}
|
||||
{3E6DCA27-5FA3-53EC-BBD6-2D42294B7AE6} = {5812E712-6213-4372-B095-9EB9BAA1F2DF}
|
||||
{09F2F96A-1CC6-5E43-AF1D-956EC2A4888D} = {5812E712-6213-4372-B095-9EB9BAA1F2DF}
|
||||
{87B42A9C-3F5C-53D7-9017-2B1CAE39457D} = {5812E712-6213-4372-B095-9EB9BAA1F2DF}
|
||||
{23E1C437-A951-5943-8639-A17F3CF2E606} = {5812E712-6213-4372-B095-9EB9BAA1F2DF}
|
||||
{74827EBD-93DC-5110-BA95-3F2AB029B6B0} = {5812E712-6213-4372-B095-9EB9BAA1F2DF}
|
||||
{AC40FF01-426E-4838-A317-66354CEFAE88} = {E2A982F2-4B1A-48B1-8D77-A17A589C58D7}
|
||||
{C4A10229-4712-4BD2-B63E-50D93C67A038} = {10FBF193-D532-4CCF-B875-4C7091A7F6C2}
|
||||
{8BC303AB-25BE-4276-8E57-73F171B2D672} = {B0AC29FD-7B01-4B5E-9C8D-0A081E4C5668}
|
||||
{01F4CE10-2CFB-41A8-B41F-E54337868A1D} = {5812E712-6213-4372-B095-9EB9BAA1F2DF}
|
||||
{00D36322-6188-4A66-B514-3B3F183E998D} = {5812E712-6213-4372-B095-9EB9BAA1F2DF}
|
||||
{FAC9B17B-F4B8-4B75-8AEB-C8C7CB92B078} = {10FBF193-D532-4CCF-B875-4C7091A7F6C2}
|
||||
{3384223A-6D97-4799-9862-359F85312892} = {10FBF193-D532-4CCF-B875-4C7091A7F6C2}
|
||||
{7D73447B-3D2D-4DFE-BF62-57E644C1D09F} = {10FBF193-D532-4CCF-B875-4C7091A7F6C2}
|
||||
{78CB2F39-B809-4A06-8329-8C0A19119D3D} = {10FBF193-D532-4CCF-B875-4C7091A7F6C2}
|
||||
{30A05C4D-F5FD-421C-A864-17A64BDEAA75} = {10FBF193-D532-4CCF-B875-4C7091A7F6C2}
|
||||
{D6973076-9317-4EF2-A0B8-B7A18AC0713E} = {A17D34F1-7E3E-4841-818D-3B7C6F5AF829}
|
||||
@@ -675,7 +240,7 @@ Global
|
||||
{58B40697-B15E-429E-B325-D52C28AEBCBF} = {B0AC29FD-7B01-4B5E-9C8D-0A081E4C5668}
|
||||
{8F85B6CC-250F-4ACA-A617-E820A74E3E3C} = {B0AC29FD-7B01-4B5E-9C8D-0A081E4C5668}
|
||||
{3EE5F075-B546-42C4-B6A8-E3CCEF38B78D} = {10FBF193-D532-4CCF-B875-4C7091A7F6C2}
|
||||
{A8E8442A-078A-5FC5-B495-8D71BA77EE6E} = {5812E712-6213-4372-B095-9EB9BAA1F2DF}
|
||||
{FDC361C5-7734-493B-8CFB-037308B35122} = {DDF904CA-2771-441A-8629-5DF2EB922A79}
|
||||
{A107C21C-418A-4697-BB10-20C3AA60E2E4} = {FA1E6C16-CA63-45F8-8D52-E21DF396BE36}
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
|
||||
@@ -1,170 +0,0 @@
|
||||
#include "stdafx.h"
|
||||
#include "stdafx_gui.h"
|
||||
#include "rpcs3.h"
|
||||
#include "BasicKeyboardHandler.h"
|
||||
|
||||
void BasicKeyboardHandler::Init(const u32 max_connect)
|
||||
{
|
||||
for (u32 i = 0; i<max_connect; i++)
|
||||
{
|
||||
m_keyboards.emplace_back(Keyboard());
|
||||
}
|
||||
|
||||
LoadSettings();
|
||||
memset(&m_info, 0, sizeof(KbInfo));
|
||||
m_info.max_connect = max_connect;
|
||||
m_info.now_connect = std::min<size_t>(m_keyboards.size(), max_connect);
|
||||
m_info.info = 0; // Ownership of keyboard data: 0=Application, 1=System
|
||||
m_info.status[0] = CELL_KB_STATUS_CONNECTED; // (TODO: Support for more keyboards)
|
||||
}
|
||||
|
||||
BasicKeyboardHandler::BasicKeyboardHandler()
|
||||
{
|
||||
wxGetApp().Bind(wxEVT_KEY_DOWN, &BasicKeyboardHandler::KeyDown, this);
|
||||
wxGetApp().Bind(wxEVT_KEY_UP, &BasicKeyboardHandler::KeyUp, this);
|
||||
}
|
||||
|
||||
void BasicKeyboardHandler::KeyDown(wxKeyEvent& event)
|
||||
{
|
||||
Key(event.GetKeyCode(), 1);
|
||||
event.Skip();
|
||||
}
|
||||
|
||||
void BasicKeyboardHandler::KeyUp(wxKeyEvent& event)
|
||||
{
|
||||
Key(event.GetKeyCode(), 0);
|
||||
event.Skip();
|
||||
}
|
||||
|
||||
void BasicKeyboardHandler::LoadSettings()
|
||||
{
|
||||
// Meta Keys
|
||||
m_keyboards[0].m_buttons.emplace_back(WXK_CONTROL, CELL_KB_MKEY_L_CTRL);
|
||||
m_keyboards[0].m_buttons.emplace_back(WXK_SHIFT, CELL_KB_MKEY_L_SHIFT);
|
||||
m_keyboards[0].m_buttons.emplace_back(WXK_ALT, CELL_KB_MKEY_L_ALT);
|
||||
m_keyboards[0].m_buttons.emplace_back(WXK_WINDOWS_LEFT, CELL_KB_MKEY_L_WIN);
|
||||
m_keyboards[0].m_buttons.emplace_back(WXK_COMMAND, CELL_KB_MKEY_L_WIN);
|
||||
//m_keyboards[0].m_buttons.emplace_back(, CELL_KB_MKEY_R_CTRL);
|
||||
//m_keyboards[0].m_buttons.emplace_back(, CELL_KB_MKEY_R_SHIFT);
|
||||
//m_keyboards[0].m_buttons.emplace_back(, CELL_KB_MKEY_R_ALT);
|
||||
m_keyboards[0].m_buttons.emplace_back(WXK_WINDOWS_RIGHT, CELL_KB_MKEY_R_WIN);
|
||||
|
||||
// CELL_KB_RAWDAT
|
||||
//m_keyboards[0].m_buttons.emplace_back(, CELL_KEYC_NO_EVENT);
|
||||
//m_keyboards[0].m_buttons.emplace_back(, CELL_KEYC_E_ROLLOVER);
|
||||
//m_keyboards[0].m_buttons.emplace_back(, CELL_KEYC_E_POSTFAIL);
|
||||
//m_keyboards[0].m_buttons.emplace_back(, CELL_KEYC_E_UNDEF);
|
||||
m_keyboards[0].m_buttons.emplace_back(WXK_ESCAPE, CELL_KEYC_ESCAPE);
|
||||
//m_keyboards[0].m_buttons.emplace_back(, CELL_KEYC_106_KANJI);
|
||||
m_keyboards[0].m_buttons.emplace_back(WXK_CAPITAL, CELL_KEYC_CAPS_LOCK);
|
||||
m_keyboards[0].m_buttons.emplace_back(WXK_F1, CELL_KEYC_F1);
|
||||
m_keyboards[0].m_buttons.emplace_back(WXK_F2, CELL_KEYC_F2);
|
||||
m_keyboards[0].m_buttons.emplace_back(WXK_F3, CELL_KEYC_F3);
|
||||
m_keyboards[0].m_buttons.emplace_back(WXK_F4, CELL_KEYC_F4);
|
||||
m_keyboards[0].m_buttons.emplace_back(WXK_F5, CELL_KEYC_F5);
|
||||
m_keyboards[0].m_buttons.emplace_back(WXK_F6, CELL_KEYC_F6);
|
||||
m_keyboards[0].m_buttons.emplace_back(WXK_F7, CELL_KEYC_F7);
|
||||
m_keyboards[0].m_buttons.emplace_back(WXK_F8, CELL_KEYC_F8);
|
||||
m_keyboards[0].m_buttons.emplace_back(WXK_F9, CELL_KEYC_F9);
|
||||
m_keyboards[0].m_buttons.emplace_back(WXK_F10, CELL_KEYC_F10);
|
||||
m_keyboards[0].m_buttons.emplace_back(WXK_F11, CELL_KEYC_F11);
|
||||
m_keyboards[0].m_buttons.emplace_back(WXK_F12, CELL_KEYC_F12);
|
||||
m_keyboards[0].m_buttons.emplace_back(WXK_PRINT, CELL_KEYC_PRINTSCREEN);
|
||||
m_keyboards[0].m_buttons.emplace_back(WXK_SCROLL, CELL_KEYC_SCROLL_LOCK);
|
||||
m_keyboards[0].m_buttons.emplace_back(WXK_PAUSE, CELL_KEYC_PAUSE);
|
||||
m_keyboards[0].m_buttons.emplace_back(WXK_INSERT, CELL_KEYC_INSERT);
|
||||
//m_keyboards[0].m_buttons.emplace_back(, CELL_KEYC_HOME);
|
||||
m_keyboards[0].m_buttons.emplace_back(WXK_PAGEUP, CELL_KEYC_PAGE_UP);
|
||||
m_keyboards[0].m_buttons.emplace_back(WXK_DELETE, CELL_KEYC_DELETE);
|
||||
m_keyboards[0].m_buttons.emplace_back(WXK_END, CELL_KEYC_END);
|
||||
m_keyboards[0].m_buttons.emplace_back(WXK_PAGEDOWN, CELL_KEYC_PAGE_DOWN);
|
||||
m_keyboards[0].m_buttons.emplace_back(WXK_RIGHT, CELL_KEYC_RIGHT_ARROW);
|
||||
m_keyboards[0].m_buttons.emplace_back(WXK_LEFT, CELL_KEYC_LEFT_ARROW);
|
||||
m_keyboards[0].m_buttons.emplace_back(WXK_DOWN, CELL_KEYC_DOWN_ARROW);
|
||||
m_keyboards[0].m_buttons.emplace_back(WXK_UP, CELL_KEYC_UP_ARROW);
|
||||
//m_keyboards[0].m_buttons.emplace_back(WXK_NUMLOCK, CELL_KEYC_NUM_LOCK);
|
||||
//m_keyboards[0].m_buttons.emplace_back(, CELL_KEYC_APPLICATION);
|
||||
//m_keyboards[0].m_buttons.emplace_back(, CELL_KEYC_KANA);
|
||||
//m_keyboards[0].m_buttons.emplace_back(, CELL_KEYC_HENKAN);
|
||||
//m_keyboards[0].m_buttons.emplace_back(, CELL_KEYC_MUHENKAN);
|
||||
|
||||
// CELL_KB_KEYPAD
|
||||
m_keyboards[0].m_buttons.emplace_back(WXK_NUMLOCK, CELL_KEYC_KPAD_NUMLOCK);
|
||||
m_keyboards[0].m_buttons.emplace_back(WXK_NUMPAD_DIVIDE, CELL_KEYC_KPAD_SLASH);
|
||||
m_keyboards[0].m_buttons.emplace_back(WXK_NUMPAD_MULTIPLY, CELL_KEYC_KPAD_ASTERISK);
|
||||
m_keyboards[0].m_buttons.emplace_back(WXK_NUMPAD_SUBTRACT, CELL_KEYC_KPAD_MINUS);
|
||||
m_keyboards[0].m_buttons.emplace_back(WXK_NUMPAD_ADD, CELL_KEYC_KPAD_PLUS);
|
||||
m_keyboards[0].m_buttons.emplace_back(WXK_NUMPAD_ENTER, CELL_KEYC_KPAD_ENTER);
|
||||
m_keyboards[0].m_buttons.emplace_back(WXK_NUMPAD1, CELL_KEYC_KPAD_1);
|
||||
m_keyboards[0].m_buttons.emplace_back(WXK_NUMPAD2, CELL_KEYC_KPAD_2);
|
||||
m_keyboards[0].m_buttons.emplace_back(WXK_NUMPAD3, CELL_KEYC_KPAD_3);
|
||||
m_keyboards[0].m_buttons.emplace_back(WXK_NUMPAD4, CELL_KEYC_KPAD_4);
|
||||
m_keyboards[0].m_buttons.emplace_back(WXK_NUMPAD5, CELL_KEYC_KPAD_5);
|
||||
m_keyboards[0].m_buttons.emplace_back(WXK_NUMPAD6, CELL_KEYC_KPAD_6);
|
||||
m_keyboards[0].m_buttons.emplace_back(WXK_NUMPAD7, CELL_KEYC_KPAD_7);
|
||||
m_keyboards[0].m_buttons.emplace_back(WXK_NUMPAD8, CELL_KEYC_KPAD_8);
|
||||
m_keyboards[0].m_buttons.emplace_back(WXK_NUMPAD9, CELL_KEYC_KPAD_9);
|
||||
m_keyboards[0].m_buttons.emplace_back(WXK_NUMPAD0, CELL_KEYC_KPAD_0);
|
||||
m_keyboards[0].m_buttons.emplace_back(WXK_NUMPAD_DELETE, CELL_KEYC_KPAD_PERIOD);
|
||||
|
||||
// ASCII Printable characters
|
||||
m_keyboards[0].m_buttons.emplace_back('A', CELL_KEYC_A);
|
||||
m_keyboards[0].m_buttons.emplace_back('B', CELL_KEYC_B);
|
||||
m_keyboards[0].m_buttons.emplace_back('C', CELL_KEYC_C);
|
||||
m_keyboards[0].m_buttons.emplace_back('D', CELL_KEYC_D);
|
||||
m_keyboards[0].m_buttons.emplace_back('E', CELL_KEYC_E);
|
||||
m_keyboards[0].m_buttons.emplace_back('F', CELL_KEYC_F);
|
||||
m_keyboards[0].m_buttons.emplace_back('G', CELL_KEYC_G);
|
||||
m_keyboards[0].m_buttons.emplace_back('H', CELL_KEYC_H);
|
||||
m_keyboards[0].m_buttons.emplace_back('I', CELL_KEYC_I);
|
||||
m_keyboards[0].m_buttons.emplace_back('J', CELL_KEYC_J);
|
||||
m_keyboards[0].m_buttons.emplace_back('K', CELL_KEYC_K);
|
||||
m_keyboards[0].m_buttons.emplace_back('L', CELL_KEYC_L);
|
||||
m_keyboards[0].m_buttons.emplace_back('M', CELL_KEYC_M);
|
||||
m_keyboards[0].m_buttons.emplace_back('N', CELL_KEYC_N);
|
||||
m_keyboards[0].m_buttons.emplace_back('O', CELL_KEYC_O);
|
||||
m_keyboards[0].m_buttons.emplace_back('P', CELL_KEYC_P);
|
||||
m_keyboards[0].m_buttons.emplace_back('Q', CELL_KEYC_Q);
|
||||
m_keyboards[0].m_buttons.emplace_back('R', CELL_KEYC_R);
|
||||
m_keyboards[0].m_buttons.emplace_back('S', CELL_KEYC_S);
|
||||
m_keyboards[0].m_buttons.emplace_back('T', CELL_KEYC_T);
|
||||
m_keyboards[0].m_buttons.emplace_back('U', CELL_KEYC_U);
|
||||
m_keyboards[0].m_buttons.emplace_back('V', CELL_KEYC_V);
|
||||
m_keyboards[0].m_buttons.emplace_back('W', CELL_KEYC_W);
|
||||
m_keyboards[0].m_buttons.emplace_back('X', CELL_KEYC_X);
|
||||
m_keyboards[0].m_buttons.emplace_back('Y', CELL_KEYC_Y);
|
||||
m_keyboards[0].m_buttons.emplace_back('Z', CELL_KEYC_Z);
|
||||
|
||||
m_keyboards[0].m_buttons.emplace_back('1', CELL_KEYC_1);
|
||||
m_keyboards[0].m_buttons.emplace_back('2', CELL_KEYC_2);
|
||||
m_keyboards[0].m_buttons.emplace_back('3', CELL_KEYC_3);
|
||||
m_keyboards[0].m_buttons.emplace_back('4', CELL_KEYC_4);
|
||||
m_keyboards[0].m_buttons.emplace_back('5', CELL_KEYC_5);
|
||||
m_keyboards[0].m_buttons.emplace_back('6', CELL_KEYC_6);
|
||||
m_keyboards[0].m_buttons.emplace_back('7', CELL_KEYC_7);
|
||||
m_keyboards[0].m_buttons.emplace_back('8', CELL_KEYC_8);
|
||||
m_keyboards[0].m_buttons.emplace_back('9', CELL_KEYC_9);
|
||||
m_keyboards[0].m_buttons.emplace_back('0', CELL_KEYC_0);
|
||||
|
||||
m_keyboards[0].m_buttons.emplace_back(WXK_RETURN, CELL_KEYC_ENTER);
|
||||
//m_keyboards[0].m_buttons.emplace_back(, CELL_KEYC_ESC);
|
||||
m_keyboards[0].m_buttons.emplace_back(WXK_TAB, CELL_KEYC_TAB);
|
||||
m_keyboards[0].m_buttons.emplace_back(WXK_SPACE, CELL_KEYC_SPACE);
|
||||
m_keyboards[0].m_buttons.emplace_back(WXK_SUBTRACT, CELL_KEYC_MINUS);
|
||||
m_keyboards[0].m_buttons.emplace_back('=', CELL_KEYC_EQUAL_101);
|
||||
m_keyboards[0].m_buttons.emplace_back('^', CELL_KEYC_ACCENT_CIRCONFLEX_106);
|
||||
//m_keyboards[0].m_buttons.emplace_back('(', CELL_KEYC_LEFT_BRACKET_101);
|
||||
m_keyboards[0].m_buttons.emplace_back('@', CELL_KEYC_ATMARK_106);
|
||||
//m_keyboards[0].m_buttons.emplace_back(')', CELL_KEYC_RIGHT_BRACKET_101);
|
||||
m_keyboards[0].m_buttons.emplace_back('(', CELL_KEYC_LEFT_BRACKET_106);
|
||||
//m_keyboards[0].m_buttons.emplace_back(, CELL_KEYC_BACKSLASH_101);
|
||||
m_keyboards[0].m_buttons.emplace_back('(', CELL_KEYC_RIGHT_BRACKET_106);
|
||||
m_keyboards[0].m_buttons.emplace_back(';', CELL_KEYC_SEMICOLON);
|
||||
m_keyboards[0].m_buttons.emplace_back('"', CELL_KEYC_QUOTATION_101);
|
||||
m_keyboards[0].m_buttons.emplace_back(':', CELL_KEYC_COLON_106);
|
||||
m_keyboards[0].m_buttons.emplace_back(',', CELL_KEYC_COMMA);
|
||||
m_keyboards[0].m_buttons.emplace_back('.', CELL_KEYC_PERIOD);
|
||||
m_keyboards[0].m_buttons.emplace_back('/', CELL_KEYC_SLASH);
|
||||
m_keyboards[0].m_buttons.emplace_back('\\', CELL_KEYC_BACKSLASH_106);
|
||||
//m_keyboards[0].m_buttons.emplace_back(, CELL_KEYC_YEN_106);
|
||||
}
|
||||
@@ -1,15 +0,0 @@
|
||||
#pragma once
|
||||
|
||||
#include "Emu/Io/KeyboardHandler.h"
|
||||
|
||||
class BasicKeyboardHandler final : public KeyboardHandlerBase, public wxWindow
|
||||
{
|
||||
public:
|
||||
virtual void Init(const u32 max_connect) override;
|
||||
|
||||
BasicKeyboardHandler();
|
||||
|
||||
void KeyDown(wxKeyEvent& event);
|
||||
void KeyUp(wxKeyEvent& event);
|
||||
void LoadSettings();
|
||||
};
|
||||
@@ -1,57 +0,0 @@
|
||||
#include "stdafx.h"
|
||||
#include "stdafx_gui.h"
|
||||
#include "rpcs3.h"
|
||||
#include "BasicMouseHandler.h"
|
||||
|
||||
void BasicMouseHandler::Init(const u32 max_connect)
|
||||
{
|
||||
m_mice.emplace_back(Mouse());
|
||||
memset(&m_info, 0, sizeof(MouseInfo));
|
||||
m_info.max_connect = max_connect;
|
||||
m_info.now_connect = std::min(m_mice.size(), (size_t)max_connect);
|
||||
m_info.info = 0; // Ownership of mouse data: 0=Application, 1=System
|
||||
m_info.status[0] = CELL_MOUSE_STATUS_CONNECTED; // (TODO: Support for more mice)
|
||||
for (u32 i = 1; i<max_connect; i++) m_info.status[i] = CELL_MOUSE_STATUS_DISCONNECTED;
|
||||
m_info.vendor_id[0] = 0x1234;
|
||||
m_info.product_id[0] = 0x1234;
|
||||
}
|
||||
|
||||
BasicMouseHandler::BasicMouseHandler()
|
||||
{
|
||||
wxGetApp().Bind(wxEVT_LEFT_DOWN, &BasicMouseHandler::MouseButtonDown, this);
|
||||
wxGetApp().Bind(wxEVT_RIGHT_DOWN, &BasicMouseHandler::MouseButtonDown, this);
|
||||
wxGetApp().Bind(wxEVT_MIDDLE_DOWN, &BasicMouseHandler::MouseButtonDown, this);
|
||||
wxGetApp().Bind(wxEVT_LEFT_UP, &BasicMouseHandler::MouseButtonUp, this);
|
||||
wxGetApp().Bind(wxEVT_RIGHT_UP, &BasicMouseHandler::MouseButtonUp, this);
|
||||
wxGetApp().Bind(wxEVT_MIDDLE_UP, &BasicMouseHandler::MouseButtonUp, this);
|
||||
wxGetApp().Bind(wxEVT_MOUSEWHEEL, &BasicMouseHandler::MouseScroll, this);
|
||||
wxGetApp().Bind(wxEVT_MOTION, &BasicMouseHandler::MouseMove, this);
|
||||
}
|
||||
|
||||
void BasicMouseHandler::MouseButtonDown(wxMouseEvent& event)
|
||||
{
|
||||
if (event.LeftDown()) MouseHandlerBase::Button(CELL_MOUSE_BUTTON_1, 1);
|
||||
else if (event.RightDown()) MouseHandlerBase::Button(CELL_MOUSE_BUTTON_2, 1);
|
||||
else if (event.MiddleDown()) MouseHandlerBase::Button(CELL_MOUSE_BUTTON_3, 1);
|
||||
event.Skip();
|
||||
}
|
||||
|
||||
void BasicMouseHandler::MouseButtonUp(wxMouseEvent& event)
|
||||
{
|
||||
if (event.LeftUp()) MouseHandlerBase::Button(CELL_MOUSE_BUTTON_1, 0);
|
||||
else if (event.RightUp()) MouseHandlerBase::Button(CELL_MOUSE_BUTTON_2, 0);
|
||||
else if (event.MiddleUp()) MouseHandlerBase::Button(CELL_MOUSE_BUTTON_3, 0);
|
||||
event.Skip();
|
||||
}
|
||||
|
||||
void BasicMouseHandler::MouseScroll(wxMouseEvent& event)
|
||||
{
|
||||
MouseHandlerBase::Scroll(event.GetWheelRotation());
|
||||
event.Skip();
|
||||
}
|
||||
|
||||
void BasicMouseHandler::MouseMove(wxMouseEvent& event)
|
||||
{
|
||||
MouseHandlerBase::Move(event.m_x, event.m_y);
|
||||
event.Skip();
|
||||
}
|
||||
@@ -1,16 +0,0 @@
|
||||
#pragma once
|
||||
|
||||
#include "Emu/Io/MouseHandler.h"
|
||||
|
||||
class BasicMouseHandler final : public MouseHandlerBase, public wxWindow
|
||||
{
|
||||
public:
|
||||
virtual void Init(const u32 max_connect) override;
|
||||
|
||||
BasicMouseHandler();
|
||||
|
||||
void MouseButtonDown(wxMouseEvent& event);
|
||||
void MouseButtonUp(wxMouseEvent& event);
|
||||
void MouseScroll(wxMouseEvent& event);
|
||||
void MouseMove(wxMouseEvent& event);
|
||||
};
|
||||
+188
-75
@@ -1,7 +1,65 @@
|
||||
cmake_minimum_required(VERSION 2.8.12)
|
||||
cmake_minimum_required(VERSION 3.0.2)
|
||||
|
||||
set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/cmake_modules")
|
||||
set(RES_FILES "")
|
||||
set(CMAKE_CXX_STANDARD 14)
|
||||
|
||||
# Qt section
|
||||
find_package(Qt5 5.9 COMPONENTS Widgets)
|
||||
if (WIN32)
|
||||
find_package(Qt5WinExtras REQUIRED)
|
||||
set(RPCS3_QT_LIBS Qt5::Widgets Qt5::WinExtras)
|
||||
include_directories(${Qt5Widgets_INCLUDE_DIRS} ${Qt5WinExtras_INCLUDE_DIRS})
|
||||
else()
|
||||
set(RPCS3_QT_LIBS Qt5::Widgets)
|
||||
include_directories(${Qt5Widgets_INCLUDE_DIRS})
|
||||
endif()
|
||||
|
||||
# Let's make sure we have Qt before we continue
|
||||
if (NOT Qt5Widgets_FOUND)
|
||||
if (Qt5Widgets_VERSION VERSION_LESS 5.9.0)
|
||||
message("Minimum supported Qt5 version is 5.9! You have version ${Qt5Widgets_VERSION} installed, please upgrade!")
|
||||
if ("${CMAKE_SYSTEM}" MATCHES "Linux")
|
||||
message(FATAL_ERROR "Most distros do not provide an up-to-date version of Qt.
|
||||
If you're on Ubuntu or Linux Mint, there are PPAs you can use to install an up-to-date qt5 version.
|
||||
https://launchpad.net/~beineri/+archive/ubuntu/opt-qt59-xenial
|
||||
https://launchpad.net/~beineri/+archive/ubuntu/opt-qt59-trusty
|
||||
just make sure to run
|
||||
source /opt/qt59/bin/qt59-env.sh
|
||||
before re-running cmake")
|
||||
elseif(WIN32)
|
||||
message(FATAL_ERROR "You can download the latest version of Qt5 here: https://www.qt.io/download-open-source/")
|
||||
else()
|
||||
message(FATAL_ERROR "Look online for instructions on installing an up-to-date Qt5 on ${CMAKE_SYSTEM}.")
|
||||
endif()
|
||||
|
||||
endif()
|
||||
|
||||
message("CMake was unable to find Qt5!")
|
||||
if (WIN32)
|
||||
message(FATAL_ERROR "Make sure the QTDIR env variable has been set properly. (for example C:\\Qt\\5.9\\msvc2017_64\\)")
|
||||
elseif("${CMAKE_SYSTEM}" MATCHES "Linux")
|
||||
message(FATAL_ERROR "Make sure to install your distro's qt5 package!")
|
||||
else()
|
||||
message(FATAL_ERROR "You need to have Qt5 installed, look online for instructions on installing Qt5 on ${CMAKE_SYSTEM}.")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
set(CMAKE_AUTORCC ON)
|
||||
set(CMAKE_AUTOMOC ON)
|
||||
set(CMAKE_AUTOUIC ON)
|
||||
|
||||
# To make UI files on cmake 3.7 or less work
|
||||
set(CMAKE_INCLUDE_CURRENT_DIR ON)
|
||||
|
||||
if (Qt5_POSITION_INDEPENDENT_CODE)
|
||||
SET(CMAKE_POSITION_INDEPENDENT_CODE ON)
|
||||
if(UNIX)
|
||||
# Cotire needs this set for some reason
|
||||
SET(CMAKE_CXX_COMPILE_OPTIONS_PIE -fPIC)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
include(cotire)
|
||||
|
||||
project(rpcs3)
|
||||
@@ -16,38 +74,49 @@ add_custom_command(OUTPUT something_that_never_exists
|
||||
# Check for a sufficient compiler and set build options
|
||||
include(ConfigureCompiler)
|
||||
|
||||
|
||||
if(WIN32)
|
||||
add_definitions(-DUNICODE)
|
||||
add_definitions(-D_WIN32_WINNT=0x0601)
|
||||
set(RES_FILES "rpcs3_.rc")
|
||||
if(NOT MSVC)
|
||||
set(CMAKE_RC_COMPILER_INIT windres)
|
||||
enable_language(RC)
|
||||
set(CMAKE_RC_COMPILE_OBJECT "<CMAKE_RC_COMPILER> <FLAGS> -O coff <DEFINES> -i <SOURCE> -o <OBJECT>")
|
||||
endif()
|
||||
set(RES_FILES "rpcs3.rc")
|
||||
else()
|
||||
add_definitions(-DGL_GLEXT_PROTOTYPES)
|
||||
add_definitions(-DGLX_GLXEXT_PROTOTYPES)
|
||||
endif()
|
||||
|
||||
if(NOT MSVC)
|
||||
add_definitions(-DwxGUI)
|
||||
if($ENV{CI})
|
||||
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -O1") # fix for travis gcc OoM crash. Might be fixed with the move to containers.
|
||||
endif()
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++14 -fexceptions")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fexceptions")
|
||||
if(WIN32)
|
||||
set(CMAKE_RC_COMPILER_INIT windres)
|
||||
enable_language(RC)
|
||||
set(CMAKE_RC_COMPILE_OBJECT "<CMAKE_RC_COMPILER> <FLAGS> -O coff <DEFINES> -i <SOURCE> -o <OBJECT>")
|
||||
|
||||
# Workaround for mingw64 (MSYS2)
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wl,--allow-multiple-definition")
|
||||
endif()
|
||||
|
||||
add_compile_options(-msse -msse2 -mcx16 -mssse3)
|
||||
|
||||
if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
|
||||
# This fixes 'some' of the st11range issues. See issue #2516
|
||||
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -image-base=0x10000")
|
||||
endif()
|
||||
|
||||
find_package(GLEW REQUIRED)
|
||||
find_package(ZLIB REQUIRED)
|
||||
else()
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /Zc:throwingNew /D _CRT_SECURE_NO_DEPRECATE=1 /D _CRT_NON_CONFORMING_SWPRINTFS=1 /D _SCL_SECURE_NO_WARNINGS=1")
|
||||
endif()
|
||||
|
||||
if(APPLE)
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -I/opt/X11/include")
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -I/opt/X11/include")
|
||||
|
||||
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /NODEFAULTLIB:libc.lib /NODEFAULTLIB:libcmt.lib /NODEFAULTLIB:libcd.lib /NODEFAULTLIB:libcmtd.lib /NODEFAULTLIB:msvcrtd.lib")
|
||||
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /SUBSYSTEM:WINDOWS /DYNAMICBASE:NO /BASE:0x10000 /FIXED")
|
||||
endif()
|
||||
|
||||
if(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
|
||||
#on some Linux distros shm_unlink and similar functions are in librt only
|
||||
set(ADDITIONAL_LIBS "rt" "X11")
|
||||
elseif(UNIX OR NOT MSVC)
|
||||
set(ADDITIONAL_LIBS "rt" "X11" "asound")
|
||||
elseif(NOT MSVC AND NOT CMAKE_CXX_FLAGS MATCHES "LIBICONV_PLUG")
|
||||
#it seems like glibc includes the iconv functions we use but other libc
|
||||
#implementations like the one on OSX don't seem implement them
|
||||
set(ADDITIONAL_LIBS "iconv")
|
||||
@@ -55,42 +124,21 @@ else()
|
||||
set(ADDITIONAL_LIBS "")
|
||||
endif()
|
||||
|
||||
If(NOT RPCS3_SRC_DIR)
|
||||
if(NOT RPCS3_SRC_DIR)
|
||||
SET(RPCS3_SRC_DIR ${CMAKE_CURRENT_LIST_DIR})
|
||||
Message("-- Initializing RPCS3_SRC_DIR=${RPCS3_SRC_DIR}")
|
||||
Else()
|
||||
else()
|
||||
Message("-- Using Custom RPCS3_SRC_DIR=${RPCS3_SRC_DIR}")
|
||||
EndIf()
|
||||
endif()
|
||||
|
||||
set(CMAKE_MODULE_PATH "${RPCS3_SRC_DIR}/cmake_modules")
|
||||
|
||||
if(NOT WIN32)
|
||||
add_definitions(-DGL_GLEXT_PROTOTYPES)
|
||||
add_definitions(-DGLX_GLXEXT_PROTOTYPES)
|
||||
endif()
|
||||
|
||||
find_package(wxWidgets COMPONENTS core base net aui gl xml REQUIRED)
|
||||
if(NOT MSVC)
|
||||
if(APPLE)
|
||||
find_path(GLEW_INCLUDE_DIR GL/glew.h
|
||||
/usr/include/GL
|
||||
/usr/openwin/share/include
|
||||
/usr/openwin/include
|
||||
/usr/X11R6/include
|
||||
/usr/include/X11
|
||||
/opt/graphics/OpenGL/include
|
||||
/opt/graphics/OpenGL/contrib/libglew
|
||||
/usr/local/include
|
||||
)
|
||||
endif()
|
||||
find_package(GLEW REQUIRED)
|
||||
find_package(ZLIB REQUIRED)
|
||||
endif()
|
||||
find_package(OpenGL REQUIRED)
|
||||
find_package(OpenAL REQUIRED)
|
||||
find_package(LLVM 3.8 CONFIG)
|
||||
if (NOT WITHOUT_LLVM)
|
||||
find_package(LLVM 4.0 CONFIG)
|
||||
endif()
|
||||
|
||||
include("${wxWidgets_USE_FILE}")
|
||||
|
||||
if(APPLE)
|
||||
set(PLATFORM_ARCH "macosx/x86_64")
|
||||
@@ -122,7 +170,6 @@ endif()
|
||||
|
||||
include_directories(
|
||||
${GLEW_INCLUDE_DIR}
|
||||
${wxWidgets_INCLUDE_DIRS}
|
||||
${ZLIB_INCLUDE_DIR}
|
||||
${OPENAL_INCLUDE_DIR}
|
||||
${LLVM_INCLUDE_DIRS}
|
||||
@@ -134,34 +181,42 @@ ${LLVM_INCLUDE_DIRS}
|
||||
"${RPCS3_SRC_DIR}/../Utilities/yaml-cpp/include"
|
||||
"${RPCS3_SRC_DIR}/../asmjit/src/asmjit"
|
||||
"${RPCS3_SRC_DIR}/../3rdparty/GSL/include"
|
||||
"${RPCS3_SRC_DIR}/../rsx_program_decompiler/rsx_decompiler"
|
||||
"${RPCS3_SRC_DIR}/../rsx_program_decompiler/shader_code"
|
||||
"${RPCS3_SRC_DIR}/../Vulkan/Vulkan-LoaderAndValidationLayers/include"
|
||||
"${RPCS3_SRC_DIR}/../Vulkan/glslang/glslang/Public"
|
||||
"${RPCS3_SRC_DIR}/../Vulkan/glslang/"
|
||||
"${RPCS3_SRC_DIR}/../3rdparty/hidapi/hidapi"
|
||||
# Includes 3rdparty stuff that isn't included yet
|
||||
"${RPCS3_SRC_DIR}/../3rdparty/GL"
|
||||
"${RPCS3_SRC_DIR}/../3rdparty/stblib"
|
||||
"${RPCS3_SRC_DIR}/../rsx_program_decompiler/rsx_decompiler"
|
||||
"${RPCS3_SRC_DIR}/../rsx_program_decompiler/shader_code"
|
||||
"${RPCS3_SRC_DIR}/../3rdparty/cereal/include"
|
||||
)
|
||||
|
||||
if(WIN32)
|
||||
include_directories(BEFORE "${RPCS3_SRC_DIR}/../3rdparty/XAudio2_7") # Slimmed down version of minidx9 for XAudio2_7 only
|
||||
# Slimmed down version of minidx9 for XAudio2_7 only
|
||||
include_directories(BEFORE "${RPCS3_SRC_DIR}/../3rdparty/XAudio2_7")
|
||||
include_directories(BEFORE "${RPCS3_SRC_DIR}/../3rdparty/minidx12/Include")
|
||||
endif()
|
||||
|
||||
if(NOT LLVM_FOUND)
|
||||
Message("LLVM not found! LLVM 3.8 is required. RPCS3 will be compiled without LLVM support.")
|
||||
Message("LLVM 4.0 not found. RPCS3 will be compiled without LLVM support.")
|
||||
else()
|
||||
add_definitions(${LLVM_DEFINITIONS})
|
||||
add_definitions(-DLLVM_AVAILABLE)
|
||||
if (CMAKE_BUILD_TYPE STREQUAL "Release")
|
||||
llvm_map_components_to_libnames(LLVM_LIBS mcjit vectorize ipo x86codegen x86disassembler)
|
||||
|
||||
#Use static linking for windows binary but always dynamic on *nix
|
||||
if (WIN32)
|
||||
if (CMAKE_BUILD_TYPE STREQUAL "Release")
|
||||
llvm_map_components_to_libnames(LLVM_LIBS mcjit vectorize ipo x86codegen x86disassembler)
|
||||
else()
|
||||
llvm_map_components_to_libnames(LLVM_LIBS mcjit vectorize ipo x86codegen x86disassembler mcdisassembler)
|
||||
endif()
|
||||
else()
|
||||
llvm_map_components_to_libnames(LLVM_LIBS mcjit vectorize ipo x86codegen x86disassembler mcdisassembler)
|
||||
set(LLVM_LIBS LLVM)
|
||||
endif()
|
||||
|
||||
if (NOT MSVC)
|
||||
set_source_files_properties(${RPCS3_SRC_DIR}/../Utilities/JIT.cpp PROPERTIES COMPILE_FLAGS -fno-rtti)
|
||||
set_source_files_properties(${RPCS3_SRC_DIR}/Emu/Cell/PPUTranslator.cpp PROPERTIES COMPILE_FLAGS -fno-rtti)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
@@ -170,6 +225,7 @@ link_directories(
|
||||
"${RPCS3_SRC_DIR}/../Vulkan"
|
||||
)
|
||||
|
||||
|
||||
if(NOT USE_SYSTEM_FFMPEG)
|
||||
if(MSVC OR NOT WIN32)
|
||||
link_directories("${RPCS3_SRC_DIR}/../3rdparty/ffmpeg/${PLATFORM_ARCH}/lib")
|
||||
@@ -178,7 +234,7 @@ endif()
|
||||
|
||||
get_property(dirs DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} PROPERTY INCLUDE_DIRECTORIES)
|
||||
foreach(dir ${dirs})
|
||||
message(STATUS "dir='${dir}'")
|
||||
message(STATUS "dir='${dir}'")
|
||||
endforeach()
|
||||
|
||||
file(
|
||||
@@ -186,44 +242,81 @@ GLOB_RECURSE
|
||||
RPCS3_SRC
|
||||
"${RPCS3_SRC_DIR}/*.cpp"
|
||||
"${RPCS3_SRC_DIR}/../Utilities/*.cpp"
|
||||
"${RPCS3_SRC_DIR}/../rsx_program_decompiler/rsx_decompiler/*.cpp"
|
||||
"${RPCS3_SRC_DIR}/../rsx_program_decompiler/shader_code/*.cpp"
|
||||
"${RPCS3_SRC_DIR}/../asmjit/src/asmjit/*.cpp"
|
||||
)
|
||||
|
||||
if(NOT WIN32)
|
||||
set (EXCLUDE_DIR "/RSX/VK/")
|
||||
foreach (TMP_PATH ${RPCS3_SRC})
|
||||
string (FIND ${TMP_PATH} ${EXCLUDE_DIR} EXCLUDE_DIR_FOUND)
|
||||
if (NOT ${EXCLUDE_DIR_FOUND} EQUAL -1)
|
||||
if (NOT WIN32 AND "${CMAKE_SYSTEM}" MATCHES "Linux")
|
||||
# Compile glslang and SPIRV modules needed for glsl compilation
|
||||
file(
|
||||
GLOB_RECURSE
|
||||
UNIX_GLSLANG
|
||||
"${RPCS3_SRC_DIR}/../Vulkan/glslang/glslang/GenericCodeGen/*.cpp"
|
||||
"${RPCS3_SRC_DIR}/../Vulkan/glslang/glslang/MachineIndependent/*.cpp"
|
||||
"${RPCS3_SRC_DIR}/../Vulkan/glslang/glslang/OSDependent/Unix/*.cpp"
|
||||
"${RPCS3_SRC_DIR}/../Vulkan/glslang/OGLCompilersDLL/*.cpp"
|
||||
"${RPCS3_SRC_DIR}/../Vulkan/glslang/hlsl/*.cpp"
|
||||
"${RPCS3_SRC_DIR}/../Vulkan/glslang/SPIRV/*.cpp"
|
||||
)
|
||||
|
||||
set (RPCS3_SRC ${RPCS3_SRC} ${UNIX_GLSLANG})
|
||||
endif()
|
||||
|
||||
#File exclusion section
|
||||
|
||||
#Ignore vulkan if not on windows or linux
|
||||
if(NOT WIN32 AND NOT "${CMAKE_SYSTEM}" MATCHES "Linux")
|
||||
set (EXCLUDE_FILES "/RSX/VK/")
|
||||
endif()
|
||||
|
||||
# The Gui folder contains wxWidgets stuff, which we no longer want.
|
||||
set (EXCLUDE_FILES ${EXCLUDE_FILES} "/Gui/")
|
||||
|
||||
# Ignore autogenerated moc_* files if present
|
||||
set (EXCLUDE_FILES ${EXCLUDE_FILES} "moc_")
|
||||
set (EXCLUDE_FILES ${EXCLUDE_FILES} "rpcs3_automoc")
|
||||
|
||||
foreach (TMP_PATH ${RPCS3_SRC})
|
||||
foreach (EXCLUDE_PATH ${EXCLUDE_FILES})
|
||||
string (FIND ${TMP_PATH} ${EXCLUDE_PATH} EXCLUDE_FILE_FOUND)
|
||||
if (NOT ${EXCLUDE_FILE_FOUND} EQUAL -1)
|
||||
list (REMOVE_ITEM RPCS3_SRC ${TMP_PATH})
|
||||
endif ()
|
||||
endforeach(TMP_PATH)
|
||||
endforeach(EXCLUDE_PATH)
|
||||
endforeach(TMP_PATH)
|
||||
|
||||
# Remove the Qt moc files as part of clean, they are compiled when generating automoc
|
||||
file(GLOB_RECURSE TMP_MOC "${RPCS3_SRC_DIR}/moc_*.cpp" "${RPCS3_SRC_DIR}/rpcs3_automoc.cpp")
|
||||
set_directory_properties(PROPERTIES ADDITIONAL_MAKE_CLEAN_FILES "${TMP_MOC}")
|
||||
|
||||
if (WIN32)
|
||||
add_executable(rpcs3 WIN32 ${RPCS3_SRC} ${RES_FILES} resources.qrc)
|
||||
else()
|
||||
add_executable(rpcs3 ${RPCS3_SRC} ${RES_FILES} resources.qrc)
|
||||
endif()
|
||||
|
||||
add_executable(rpcs3 ${RPCS3_SRC} ${RES_FILES})
|
||||
add_dependencies(rpcs3 GitVersion)
|
||||
|
||||
|
||||
if(MSVC)
|
||||
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /NODEFAULTLIB:libc.lib /NODEFAULTLIB:libcmt.lib /NODEFAULTLIB:libcd.lib /NODEFAULTLIB:libcmtd.lib /NODEFAULTLIB:msvcrtd.lib")
|
||||
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /SUBSYSTEM:WINDOWS /DYNAMICBASE:NO /BASE:0x10000 /FIXED")
|
||||
endif()
|
||||
if(WIN32)
|
||||
target_link_libraries(rpcs3 ws2_32.lib Winmm.lib Psapi.lib VKstatic.1 glslang OSDependent OGLCompiler SPIRV HLSL)
|
||||
target_link_libraries(rpcs3 ws2_32.lib Winmm.lib Psapi.lib VKstatic.1 glslang OSDependent OGLCompiler SPIRV HLSL setupapi.lib hidapi-hid Shlwapi.lib)
|
||||
if(NOT MSVC)
|
||||
target_link_libraries(rpcs3 ${OPENGL_LIBRARIES} ${GLEW_LIBRARY} opengl32.lib glu32.lib libpthread)
|
||||
else()
|
||||
target_link_libraries(rpcs3 dxgi.lib d2d1.lib dwrite.lib)
|
||||
endif()
|
||||
target_link_libraries(rpcs3 avformat.lib avcodec.lib avutil.lib swresample.lib swscale.lib png16_static ${wxWidgets_LIBRARIES} ${OPENAL_LIBRARY} ${ADDITIONAL_LIBS})
|
||||
target_link_libraries(rpcs3 avformat.lib avcodec.lib avutil.lib swresample.lib swscale.lib png16_static ${OPENAL_LIBRARY} ${ADDITIONAL_LIBS})
|
||||
else()
|
||||
target_link_libraries(rpcs3 ${wxWidgets_LIBRARIES} ${OPENAL_LIBRARY} ${GLEW_LIBRARY} ${OPENGL_LIBRARIES})
|
||||
target_link_libraries(rpcs3 -ldl ${ZLIB_LIBRARIES} ${ADDITIONAL_LIBS})
|
||||
target_link_libraries(rpcs3 ${OPENAL_LIBRARY} ${GLEW_LIBRARY} ${OPENGL_LIBRARIES})
|
||||
if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
|
||||
target_link_libraries(rpcs3 hidapi-hidraw udev vulkan)
|
||||
else()
|
||||
target_link_libraries(rpcs3 hidapi-libusb usb)
|
||||
endif()
|
||||
target_link_libraries(rpcs3 ${CMAKE_DL_LIBS} -lpthread ${ZLIB_LIBRARIES} ${ADDITIONAL_LIBS})
|
||||
if (USE_SYSTEM_FFMPEG)
|
||||
link_libraries(${FFMPEG_LIBRARY_DIR})
|
||||
target_link_libraries(rpcs3 libavformat.so libavcodec.so libavutil.so libswresample.so libswscale.so)
|
||||
else()
|
||||
target_link_libraries(rpcs3 libavformat.a libavcodec.a libavutil.a libswresample.a libswscale.a -ldl)
|
||||
target_link_libraries(rpcs3 libavformat.a libavcodec.a libavutil.a libswresample.a libswscale.a)
|
||||
endif()
|
||||
if (USE_SYSTEM_LIBPNG)
|
||||
target_link_libraries(rpcs3 ${PNG_LIBRARIES})
|
||||
@@ -231,11 +324,31 @@ else()
|
||||
target_link_libraries(rpcs3 png16_static)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# For some reason GCC 7 requires manually linking with -latomic
|
||||
if (CMAKE_COMPILER_IS_GNUCC AND (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 7 OR CMAKE_CXX_COMPILER_VERSION VERSION_EQUAL 7))
|
||||
target_link_libraries(rpcs3 -latomic)
|
||||
endif()
|
||||
|
||||
if(LLVM_FOUND)
|
||||
target_link_libraries(rpcs3 ${LLVM_LIBS})
|
||||
endif()
|
||||
|
||||
target_link_libraries(rpcs3 rsx_decompiler shader_code)
|
||||
target_link_libraries(rpcs3 ${RPCS3_QT_LIBS})
|
||||
|
||||
set_target_properties(rpcs3 PROPERTIES COTIRE_CXX_PREFIX_HEADER_INIT "${RPCS3_SRC_DIR}/stdafx.h")
|
||||
|
||||
cotire(rpcs3)
|
||||
|
||||
# Unix installation
|
||||
if(UNIX AND NOT APPLE)
|
||||
# Install the binary
|
||||
install(TARGETS rpcs3 RUNTIME DESTINATION ${CMAKE_INSTALL_PREFIX}/bin)
|
||||
# Install the application icon and menu item
|
||||
install(FILES rpcs3.svg
|
||||
DESTINATION ${CMAKE_INSTALL_PREFIX}/share/icons/hicolor/scalable/apps)
|
||||
install(FILES rpcs3.png
|
||||
DESTINATION ${CMAKE_INSTALL_PREFIX}/share/icons/hicolor/48x48/apps)
|
||||
install(FILES rpcs3.desktop
|
||||
DESTINATION ${CMAKE_INSTALL_PREFIX}/share/applications)
|
||||
endif()
|
||||
|
||||
@@ -748,12 +748,13 @@ SELF_KEY KeyVault::FindSelfKey(u32 type, u16 revision, u64 version)
|
||||
|
||||
void KeyVault::SetKlicenseeKey(u8 *key)
|
||||
{
|
||||
memcpy(klicensee_key, key, 0x10);
|
||||
klicensee_key = std::make_unique<u8[]>(0x10);
|
||||
memcpy(klicensee_key.get(), key, 0x10);
|
||||
}
|
||||
|
||||
u8 *KeyVault::GetKlicenseeKey()
|
||||
{
|
||||
return klicensee_key;
|
||||
return klicensee_key.get();
|
||||
}
|
||||
|
||||
void rap_to_rif(unsigned char* rap, unsigned char* rif)
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <memory>
|
||||
|
||||
enum SELF_KEY_TYPE {
|
||||
KEY_LV0 = 1,
|
||||
@@ -11,7 +12,7 @@ enum SELF_KEY_TYPE {
|
||||
KEY_ISO,
|
||||
KEY_LDR,
|
||||
KEY_UNK7,
|
||||
KEY_NPDRM
|
||||
KEY_NPDRM
|
||||
};
|
||||
|
||||
struct SELF_KEY {
|
||||
@@ -159,7 +160,7 @@ class KeyVault
|
||||
std::vector<SELF_KEY> sk_LDR_arr;
|
||||
std::vector<SELF_KEY> sk_UNK7_arr;
|
||||
std::vector<SELF_KEY> sk_NPDRM_arr;
|
||||
u8 klicensee_key[0x10];
|
||||
std::unique_ptr<u8[]> klicensee_key;
|
||||
|
||||
public:
|
||||
KeyVault();
|
||||
|
||||
@@ -767,7 +767,7 @@ std::array<u8, 0x10> GetEdatRifKeyFromRapFile(const fs::file& rap_file)
|
||||
return rifkey;
|
||||
}
|
||||
|
||||
bool VerifyEDATHeaderWithKLicense(const fs::file& input, const std::string& input_file_name, const std::array<u8, 0x10>& custom_klic)
|
||||
bool VerifyEDATHeaderWithKLicense(const fs::file& input, const std::string& input_file_name, const std::array<u8, 0x10>& custom_klic, std::string* contentID)
|
||||
{
|
||||
// Setup NPD and EDAT/SDAT structs.
|
||||
NPD_HEADER NPD;
|
||||
@@ -801,6 +801,8 @@ bool VerifyEDATHeaderWithKLicense(const fs::file& input, const std::string& inpu
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
*contentID = std::string(reinterpret_cast<const char*>(NPD.content_id));
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -912,8 +914,7 @@ bool EDATADecrypter::ReadHeader()
|
||||
|
||||
if (dec_key == std::array<u8, 0x10>{0})
|
||||
{
|
||||
LOG_ERROR(LOADER, "EDAT: A valid RAP file is needed for this EDAT file!");
|
||||
return false;
|
||||
LOG_WARNING(LOADER, "EDAT: Empty Dec key!");
|
||||
}
|
||||
}
|
||||
else if ((npdHeader.license & 0x1) == 0x1) // Type 1: Use network activation.
|
||||
|
||||
+15
-6
@@ -14,7 +14,7 @@ constexpr u32 EDAT_FLAG_0x10 = 0x00000010;
|
||||
constexpr u32 EDAT_FLAG_0x20 = 0x00000020;
|
||||
constexpr u32 EDAT_DEBUG_DATA_FLAG = 0x80000000;
|
||||
|
||||
struct EdatKeys_t
|
||||
struct LoadedNpdrmKeys_t
|
||||
{
|
||||
std::array<u8, 0x10> devKlic{};
|
||||
std::array<u8, 0x10> rifKey{};
|
||||
@@ -44,7 +44,7 @@ struct EDAT_HEADER
|
||||
// Decrypts full file, or null/empty file
|
||||
extern fs::file DecryptEDAT(const fs::file& input, const std::string& input_file_name, int mode, const std::string& rap_file_name, u8 *custom_klic, bool verbose);
|
||||
|
||||
extern bool VerifyEDATHeaderWithKLicense(const fs::file& input, const std::string& input_file_name, const std::array<u8,0x10>& custom_klic);
|
||||
extern bool VerifyEDATHeaderWithKLicense(const fs::file& input, const std::string& input_file_name, const std::array<u8,0x10>& custom_klic, std::string* contentID);
|
||||
|
||||
extern std::array<u8, 0x10> GetEdatRifKeyFromRapFile(const fs::file& rap_file);
|
||||
|
||||
@@ -109,11 +109,20 @@ public:
|
||||
|
||||
u64 seek(s64 offset, fs::seek_mode whence) override
|
||||
{
|
||||
return
|
||||
whence == fs::seek_set ? pos = offset :
|
||||
whence == fs::seek_cur ? pos = offset + pos :
|
||||
whence == fs::seek_end ? pos = offset + size() :
|
||||
const s64 new_pos =
|
||||
whence == fs::seek_set ? offset :
|
||||
whence == fs::seek_cur ? offset + pos :
|
||||
whence == fs::seek_end ? offset + size() :
|
||||
(fmt::raw_error("EDATADecrypter::seek(): invalid whence"), 0);
|
||||
|
||||
if (new_pos < 0)
|
||||
{
|
||||
fs::g_tls_error = fs::error::inval;
|
||||
return -1;
|
||||
}
|
||||
|
||||
pos = new_pos;
|
||||
return pos;
|
||||
}
|
||||
u64 size() override { return file_size; }
|
||||
};
|
||||
|
||||
+53
-17
@@ -5,7 +5,7 @@
|
||||
#include "unself.h"
|
||||
#include "Emu/VFS.h"
|
||||
|
||||
// TODO: Still reliant on wxWidgets for zlib functions. Alternative solutions?
|
||||
#include <algorithm>
|
||||
#include <zlib.h>
|
||||
|
||||
inline u8 Read8(const fs::file& f)
|
||||
@@ -1081,17 +1081,10 @@ bool SELFDecrypter::DecryptNPDRM(u8 *metadata, u32 metadata_size)
|
||||
// If not, the data has no NPDRM layer.
|
||||
if (!ctrl)
|
||||
{
|
||||
LOG_WARNING(LOADER, "SELF: No NPDRM control info found!");
|
||||
LOG_NOTICE(LOADER, "SELF: No NPDRM control info found!");
|
||||
return true;
|
||||
}
|
||||
|
||||
u8 klicensee_key[0x10];
|
||||
memcpy(klicensee_key, key_v.GetKlicenseeKey(), 0x10);
|
||||
|
||||
// Use klicensee if available.
|
||||
if (klicensee_key != NULL)
|
||||
memcpy(npdrm_key, klicensee_key, 0x10);
|
||||
|
||||
if (ctrl->npdrm.license == 1) // Network license.
|
||||
{
|
||||
LOG_ERROR(LOADER, "SELF: Can't decrypt network NPDRM!");
|
||||
@@ -1108,8 +1101,11 @@ bool SELFDecrypter::DecryptNPDRM(u8 *metadata, u32 metadata_size)
|
||||
}
|
||||
else if (ctrl->npdrm.license == 3) // Free license.
|
||||
{
|
||||
// Use the NP_KLIC_FREE.
|
||||
memcpy(npdrm_key, NP_KLIC_FREE, 0x10);
|
||||
// Use klicensee if available.
|
||||
if (key_v.GetKlicenseeKey() != nullptr)
|
||||
memcpy(npdrm_key, key_v.GetKlicenseeKey(), 0x10);
|
||||
else
|
||||
memcpy(npdrm_key, NP_KLIC_FREE, 0x10);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1131,7 +1127,7 @@ bool SELFDecrypter::DecryptNPDRM(u8 *metadata, u32 metadata_size)
|
||||
return true;
|
||||
}
|
||||
|
||||
bool SELFDecrypter::LoadMetadata()
|
||||
bool SELFDecrypter::LoadMetadata(u8* klic_key)
|
||||
{
|
||||
aes_context aes;
|
||||
u32 metadata_info_size = SIZE_32(meta_info);
|
||||
@@ -1150,6 +1146,10 @@ bool SELFDecrypter::LoadMetadata()
|
||||
// Find the right keyset from the key vault.
|
||||
SELF_KEY keyset = key_v.FindSelfKey(app_info.self_type, sce_hdr.se_flags, app_info.version);
|
||||
|
||||
// Set klic if given
|
||||
if (klic_key)
|
||||
key_v.SetKlicenseeKey(klic_key);
|
||||
|
||||
// Copy the necessary parameters.
|
||||
u8 metadata_key[0x20];
|
||||
u8 metadata_iv[0x10];
|
||||
@@ -1333,9 +1333,6 @@ fs::file SELFDecrypter::MakeElf(bool isElf32)
|
||||
// Decompress if necessary.
|
||||
if (meta_shdr[i].compressed == 2)
|
||||
{
|
||||
/// Removed all wxWidget dependent code. Replaced with zlib functions.
|
||||
/// Also changed local mallocs to unique_ptrs.
|
||||
|
||||
// Store the length in writeable memory space.
|
||||
std::unique_ptr<uLongf> decomp_buf_length(new uLongf);
|
||||
memcpy(decomp_buf_length.get(), &phdr64_arr[meta_shdr[i].program_idx].p_filesz, sizeof(uLongf));
|
||||
@@ -1480,7 +1477,7 @@ static bool CheckDebugSelf(fs::file& s)
|
||||
return false;
|
||||
}
|
||||
|
||||
extern fs::file decrypt_self(fs::file elf_or_self)
|
||||
extern fs::file decrypt_self(fs::file elf_or_self, u8* klic_key)
|
||||
{
|
||||
if (!elf_or_self)
|
||||
{
|
||||
@@ -1506,7 +1503,7 @@ extern fs::file decrypt_self(fs::file elf_or_self)
|
||||
}
|
||||
|
||||
// Load and decrypt the SELF file metadata.
|
||||
if (!self_dec.LoadMetadata())
|
||||
if (!self_dec.LoadMetadata(klic_key))
|
||||
{
|
||||
LOG_ERROR(LOADER, "SELF: Failed to load SELF file metadata!");
|
||||
return fs::file{};
|
||||
@@ -1525,3 +1522,42 @@ extern fs::file decrypt_self(fs::file elf_or_self)
|
||||
|
||||
return elf_or_self;
|
||||
}
|
||||
|
||||
extern bool verify_npdrm_self_headers(const fs::file& self, u8* klic_key)
|
||||
{
|
||||
if (!self)
|
||||
return false;
|
||||
|
||||
self.seek(0);
|
||||
|
||||
if (self.size() >= 4 && self.read<u32>() == "SCE\0"_u32)
|
||||
{
|
||||
// Check the ELF file class (32 or 64 bit).
|
||||
bool isElf32 = IsSelfElf32(self);
|
||||
|
||||
// Start the decrypter on this SELF file.
|
||||
SELFDecrypter self_dec(self);
|
||||
|
||||
// Load the SELF file headers.
|
||||
if (!self_dec.LoadHeaders(isElf32))
|
||||
{
|
||||
LOG_ERROR(LOADER, "SELF: Failed to load SELF file headers!");
|
||||
return false;
|
||||
}
|
||||
|
||||
// Load and decrypt the SELF file metadata.
|
||||
if (!self_dec.LoadMetadata(klic_key))
|
||||
{
|
||||
LOG_ERROR(LOADER, "SELF: Failed to load SELF file metadata!");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
std::array<u8, 0x10> get_default_self_klic()
|
||||
{
|
||||
std::array<u8, 0x10> key;
|
||||
std::copy(std::begin(NP_KLIC_FREE), std::end(NP_KLIC_FREE), std::begin(key));
|
||||
return key;
|
||||
}
|
||||
@@ -410,10 +410,12 @@ public:
|
||||
fs::file MakeElf(bool isElf32);
|
||||
bool LoadHeaders(bool isElf32);
|
||||
void ShowHeaders(bool isElf32);
|
||||
bool LoadMetadata();
|
||||
bool LoadMetadata(u8* klic_key);
|
||||
bool DecryptData();
|
||||
bool DecryptNPDRM(u8 *metadata, u32 metadata_size);
|
||||
bool GetKeyFromRap(u8 *content_id, u8 *npdrm_key);
|
||||
};
|
||||
|
||||
extern fs::file decrypt_self(fs::file elf_or_self);
|
||||
extern fs::file decrypt_self(fs::file elf_or_self, u8* klic_key = nullptr);
|
||||
extern bool verify_npdrm_self_headers(const fs::file& self, u8* klic_key = nullptr);
|
||||
extern std::array<u8, 0x10> get_default_self_klic();
|
||||
|
||||
+6
-11
@@ -3,6 +3,7 @@
|
||||
// http://www.gnu.org/licenses/gpl-3.0.txt
|
||||
|
||||
#include "utils.h"
|
||||
#include <cstring>
|
||||
#include <stdio.h>
|
||||
#include <time.h>
|
||||
|
||||
@@ -51,28 +52,22 @@ u64 hex_to_u64(const char* hex_str)
|
||||
return result;
|
||||
}
|
||||
|
||||
void hex_to_bytes(unsigned char *data, const char *hex_str, unsigned int str_length)
|
||||
void hex_to_bytes(unsigned char* data, const char* hex_str, unsigned int str_length)
|
||||
{
|
||||
u32 strn_length = (str_length > 0) ? str_length : (u32) strlen(hex_str);
|
||||
u32 strn_length = (str_length > 0) ? str_length : (u32)std::strlen(hex_str);
|
||||
u32 data_length = strn_length / 2;
|
||||
char tmp_buf[3] = {0, 0, 0};
|
||||
|
||||
// Don't convert if the string length is odd.
|
||||
if (!(strn_length % 2))
|
||||
if ((strn_length % 2) == 0)
|
||||
{
|
||||
auto out = std::make_unique<u8[]>(strn_length * sizeof(u8));
|
||||
u8 *pos = out.get();
|
||||
|
||||
while (strn_length--)
|
||||
while (data_length--)
|
||||
{
|
||||
tmp_buf[0] = *hex_str++;
|
||||
tmp_buf[1] = *hex_str++;
|
||||
|
||||
*pos++ = (u8)(hex_to_u64(tmp_buf) & 0xFF);
|
||||
*data++ = (u8)(hex_to_u64(tmp_buf) & 0xFF);
|
||||
}
|
||||
|
||||
// Copy back to our array.
|
||||
memcpy(data, out.get(), data_length);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
<PropertyGroup Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
<PlatformToolset>v140</PlatformToolset>
|
||||
<PlatformToolset>v141</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
@@ -61,31 +61,6 @@
|
||||
<Import Project="..\rpcs3_llvm.props" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug - MemLeak|x64'">
|
||||
<ClCompile>
|
||||
<AdditionalIncludeDirectories>..\rsx_program_decompiler\rsx_decompiler;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
</ClCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release - LLVM|x64'">
|
||||
<ClCompile>
|
||||
<AdditionalIncludeDirectories>..\rsx_program_decompiler\rsx_decompiler;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
</ClCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<ClCompile>
|
||||
<AdditionalIncludeDirectories>..\rsx_program_decompiler\rsx_decompiler;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
</ClCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<ClCompile>
|
||||
<AdditionalIncludeDirectories>..\rsx_program_decompiler\rsx_decompiler;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
</ClCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug - LLVM|x64'">
|
||||
<ClCompile>
|
||||
<AdditionalIncludeDirectories>..\rsx_program_decompiler\rsx_decompiler;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
</ClCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="Emu\RSX\D3D12\D3D12Utils.h" />
|
||||
<ClInclude Include="Emu\RSX\D3D12\D3D12CommonDecompiler.h" />
|
||||
@@ -121,4 +96,4 @@
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
||||
</Project>
|
||||
|
||||
@@ -1,4 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup />
|
||||
</Project>
|
||||
@@ -1,11 +1,8 @@
|
||||
#include "stdafx.h"
|
||||
#include "Utilities/Config.h"
|
||||
#include "Emu/System.h"
|
||||
|
||||
#include "OpenALThread.h"
|
||||
|
||||
extern cfg::bool_entry g_cfg_audio_convert_to_u16;
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#pragma comment(lib, "OpenAL32.lib")
|
||||
#endif
|
||||
@@ -44,6 +41,15 @@ OpenALThread::OpenALThread()
|
||||
|
||||
alcMakeContextCurrent(m_context);
|
||||
checkForAlcError("alcMakeContextCurrent");
|
||||
|
||||
if (g_cfg.audio.downmix_to_2ch)
|
||||
{
|
||||
m_format = g_cfg.audio.convert_to_u16 ? AL_FORMAT_STEREO16 : AL_FORMAT_STEREO_FLOAT32;
|
||||
}
|
||||
else
|
||||
{
|
||||
m_format = g_cfg.audio.convert_to_u16 ? AL_FORMAT_71CHN16 : AL_FORMAT_71CHN32;
|
||||
}
|
||||
}
|
||||
|
||||
OpenALThread::~OpenALThread()
|
||||
@@ -102,7 +108,7 @@ void OpenALThread::Open(const void* src, int size)
|
||||
|
||||
for (uint i = 0; i<g_al_buffers_count; ++i)
|
||||
{
|
||||
alBufferData(m_buffers[i], g_cfg_audio_convert_to_u16 ? AL_FORMAT_71CHN16 : AL_FORMAT_71CHN32, src, m_buffer_size, 48000);
|
||||
alBufferData(m_buffers[i], m_format, src, m_buffer_size, 48000);
|
||||
checkForAlError("alBufferData");
|
||||
}
|
||||
|
||||
@@ -137,7 +143,7 @@ void OpenALThread::AddData(const void* src, int size)
|
||||
|
||||
int bsize = size < m_buffer_size ? size : m_buffer_size;
|
||||
|
||||
alBufferData(buffer, g_cfg_audio_convert_to_u16 ? AL_FORMAT_71CHN16 : AL_FORMAT_71CHN32, bsrc, bsize, 48000);
|
||||
alBufferData(buffer, m_format, bsrc, bsize, 48000);
|
||||
checkForAlError("alBufferData");
|
||||
|
||||
alSourceQueueBuffers(m_source, 1, &buffer);
|
||||
|
||||
@@ -8,6 +8,7 @@ class OpenALThread : public AudioThread
|
||||
private:
|
||||
static const uint g_al_buffers_count = 24;
|
||||
|
||||
ALint m_format;
|
||||
ALuint m_source;
|
||||
ALuint m_buffers[g_al_buffers_count];
|
||||
ALsizei m_buffer_size;
|
||||
|
||||
@@ -0,0 +1,134 @@
|
||||
#include "stdafx.h"
|
||||
#include "Utilities/GSL.h"
|
||||
#include "Emu/System.h"
|
||||
|
||||
#include "ALSAThread.h"
|
||||
|
||||
#ifdef __linux__
|
||||
|
||||
#include <alsa/asoundlib.h>
|
||||
|
||||
static thread_local snd_pcm_t* s_tls_handle{nullptr};
|
||||
|
||||
static void error(int err, const char* reason)
|
||||
{
|
||||
fprintf(stderr, "ALSA: %s failed: %s\n", reason, snd_strerror(err));
|
||||
}
|
||||
|
||||
static bool check(int err, const char* reason)
|
||||
{
|
||||
if (err < 0)
|
||||
{
|
||||
error(err, reason);
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
ALSAThread::ALSAThread()
|
||||
{
|
||||
snd_pcm_hw_params_t* hw_params{nullptr};
|
||||
|
||||
auto at_ret = gsl::finally([&]()
|
||||
{
|
||||
if (hw_params)
|
||||
{
|
||||
snd_pcm_hw_params_free(hw_params);
|
||||
}
|
||||
});
|
||||
|
||||
if (!check(snd_pcm_open(&s_tls_handle, "default", SND_PCM_STREAM_PLAYBACK, SND_PCM_NONBLOCK), "snd_pcm_open"))
|
||||
return;
|
||||
|
||||
if (!check(snd_pcm_hw_params_malloc(&hw_params), "snd_pcm_hw_params_malloc"))
|
||||
return;
|
||||
|
||||
if (!check(snd_pcm_hw_params_any(s_tls_handle, hw_params), "snd_pcm_hw_params_any"))
|
||||
return;
|
||||
|
||||
if (!check(snd_pcm_hw_params_set_access(s_tls_handle, hw_params, SND_PCM_ACCESS_RW_INTERLEAVED), "snd_pcm_hw_params_set_access"))
|
||||
return;
|
||||
|
||||
if (!check(snd_pcm_hw_params_set_format(s_tls_handle, hw_params, g_cfg.audio.convert_to_u16 ? SND_PCM_FORMAT_S16_LE : SND_PCM_FORMAT_FLOAT_LE), "snd_pcm_hw_params_set_format"))
|
||||
return;
|
||||
|
||||
if (!check(snd_pcm_hw_params_set_rate(s_tls_handle, hw_params, 48000, 0), "snd_pcm_hw_params_set_rate_near"))
|
||||
return;
|
||||
|
||||
if (!check(snd_pcm_hw_params_set_channels(s_tls_handle, hw_params, g_cfg.audio.downmix_to_2ch ? 2 : 8), "snd_pcm_hw_params_set_channels"))
|
||||
return;
|
||||
|
||||
if (!check(snd_pcm_hw_params_set_buffer_size(s_tls_handle, hw_params, 8 * 256), "snd_pcm_hw_params_set_buffer_size"))
|
||||
return;
|
||||
|
||||
if (!check(snd_pcm_hw_params_set_period_size(s_tls_handle, hw_params, 256, 0), "snd_pcm_hw_params_set_period_size"))
|
||||
return;
|
||||
|
||||
//if (!check(snd_pcm_hw_params_set_periods(s_tls_handle, hw_params, 2, 0), "snd_pcm_hw_params_set_periods"))
|
||||
// return;
|
||||
|
||||
if (!check(snd_pcm_hw_params(s_tls_handle, hw_params), "snd_pcm_hw_params"))
|
||||
return;
|
||||
|
||||
if (!check(snd_pcm_prepare(s_tls_handle), "snd_pcm_prepare"))
|
||||
return;
|
||||
}
|
||||
|
||||
ALSAThread::~ALSAThread()
|
||||
{
|
||||
if (s_tls_handle)
|
||||
{
|
||||
snd_pcm_close(s_tls_handle);
|
||||
}
|
||||
}
|
||||
|
||||
void ALSAThread::Play()
|
||||
{
|
||||
}
|
||||
|
||||
void ALSAThread::Close()
|
||||
{
|
||||
}
|
||||
|
||||
void ALSAThread::Stop()
|
||||
{
|
||||
}
|
||||
|
||||
void ALSAThread::Open(const void* src, int size)
|
||||
{
|
||||
AddData(src, size);
|
||||
}
|
||||
|
||||
void ALSAThread::AddData(const void* src, int size)
|
||||
{
|
||||
size /= g_cfg.audio.convert_to_u16 ? 2 : 4;
|
||||
size /= g_cfg.audio.downmix_to_2ch ? 2 : 8;
|
||||
|
||||
int res;
|
||||
|
||||
while (true)
|
||||
{
|
||||
res = snd_pcm_writei(s_tls_handle, src, size);
|
||||
|
||||
if (res == -EAGAIN)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
else if (res == -EPIPE)
|
||||
{
|
||||
snd_pcm_prepare(s_tls_handle);
|
||||
}
|
||||
else
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (res != size)
|
||||
{
|
||||
error(res, "snd_pcm_writei");
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,20 @@
|
||||
#pragma once
|
||||
|
||||
#ifdef __linux__
|
||||
|
||||
#include "Emu/Audio/AudioThread.h"
|
||||
|
||||
class ALSAThread : public AudioThread
|
||||
{
|
||||
public:
|
||||
ALSAThread();
|
||||
virtual ~ALSAThread() override;
|
||||
|
||||
virtual void Play() override;
|
||||
virtual void Open(const void* src, int size) override;
|
||||
virtual void Close() override;
|
||||
virtual void Stop() override;
|
||||
virtual void AddData(const void* src, int size) override;
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -2,14 +2,11 @@
|
||||
|
||||
#include "Utilities/Log.h"
|
||||
#include "Utilities/StrFmt.h"
|
||||
#include "Utilities/Config.h"
|
||||
#include "Emu/System.h"
|
||||
|
||||
#include "XAudio2Thread.h"
|
||||
#include "3rdparty/XAudio2_7/XAudio2.h"
|
||||
|
||||
extern cfg::bool_entry g_cfg_audio_convert_to_u16;
|
||||
|
||||
static thread_local HMODULE s_tls_xaudio2_lib{};
|
||||
static thread_local IXAudio2* s_tls_xaudio2_instance{};
|
||||
static thread_local IXAudio2MasteringVoice* s_tls_master_voice{};
|
||||
@@ -37,7 +34,7 @@ void XAudio2Thread::xa27_init(void* lib2_7)
|
||||
return;
|
||||
}
|
||||
|
||||
hr = s_tls_xaudio2_instance->CreateMasteringVoice(&s_tls_master_voice, 8, 48000);
|
||||
hr = s_tls_xaudio2_instance->CreateMasteringVoice(&s_tls_master_voice, g_cfg.audio.downmix_to_2ch ? 2 : 8, 48000);
|
||||
if (FAILED(hr))
|
||||
{
|
||||
LOG_ERROR(GENERAL, "XAudio2Thread : CreateMasteringVoice() failed(0x%08x)", (u32)hr);
|
||||
@@ -104,11 +101,11 @@ void XAudio2Thread::xa27_open()
|
||||
{
|
||||
HRESULT hr;
|
||||
|
||||
WORD sample_size = g_cfg_audio_convert_to_u16 ? sizeof(u16) : sizeof(float);
|
||||
WORD channels = 8;
|
||||
WORD sample_size = g_cfg.audio.convert_to_u16 ? sizeof(u16) : sizeof(float);
|
||||
WORD channels = g_cfg.audio.downmix_to_2ch ? 2 : 8;
|
||||
|
||||
WAVEFORMATEX waveformatex;
|
||||
waveformatex.wFormatTag = g_cfg_audio_convert_to_u16 ? WAVE_FORMAT_PCM : WAVE_FORMAT_IEEE_FLOAT;
|
||||
waveformatex.wFormatTag = g_cfg.audio.convert_to_u16 ? WAVE_FORMAT_PCM : WAVE_FORMAT_IEEE_FLOAT;
|
||||
waveformatex.nChannels = channels;
|
||||
waveformatex.nSamplesPerSec = 48000;
|
||||
waveformatex.nAvgBytesPerSec = 48000 * (DWORD)channels * (DWORD)sample_size;
|
||||
@@ -124,7 +121,7 @@ void XAudio2Thread::xa27_open()
|
||||
return;
|
||||
}
|
||||
|
||||
s_tls_source_voice->SetVolume(4.0);
|
||||
s_tls_source_voice->SetVolume(g_cfg.audio.downmix_to_2ch ? 1.0 : 4.0);
|
||||
}
|
||||
|
||||
void XAudio2Thread::xa27_add(const void* src, int size)
|
||||
|
||||
@@ -2,14 +2,11 @@
|
||||
|
||||
#include "Utilities/Log.h"
|
||||
#include "Utilities/StrFmt.h"
|
||||
#include "Utilities/Config.h"
|
||||
#include "Emu/System.h"
|
||||
|
||||
#include "XAudio2Thread.h"
|
||||
#include "3rdparty/minidx12/Include/xaudio2.h"
|
||||
|
||||
extern cfg::bool_entry g_cfg_audio_convert_to_u16;
|
||||
|
||||
static thread_local HMODULE s_tls_xaudio2_lib{};
|
||||
static thread_local IXAudio2* s_tls_xaudio2_instance{};
|
||||
static thread_local IXAudio2MasteringVoice* s_tls_master_voice{};
|
||||
@@ -39,7 +36,7 @@ void XAudio2Thread::xa28_init(void* lib)
|
||||
return;
|
||||
}
|
||||
|
||||
hr = s_tls_xaudio2_instance->CreateMasteringVoice(&s_tls_master_voice, 8, 48000);
|
||||
hr = s_tls_xaudio2_instance->CreateMasteringVoice(&s_tls_master_voice, g_cfg.audio.downmix_to_2ch ? 2 : 8, 48000);
|
||||
if (FAILED(hr))
|
||||
{
|
||||
LOG_ERROR(GENERAL, "XAudio2Thread : CreateMasteringVoice() failed(0x%08x)", (u32)hr);
|
||||
@@ -106,11 +103,11 @@ void XAudio2Thread::xa28_open()
|
||||
{
|
||||
HRESULT hr;
|
||||
|
||||
WORD sample_size = g_cfg_audio_convert_to_u16 ? sizeof(u16) : sizeof(float);
|
||||
WORD channels = 8;
|
||||
WORD sample_size = g_cfg.audio.convert_to_u16 ? sizeof(u16) : sizeof(float);
|
||||
WORD channels = g_cfg.audio.downmix_to_2ch ? 2 : 8;
|
||||
|
||||
WAVEFORMATEX waveformatex;
|
||||
waveformatex.wFormatTag = g_cfg_audio_convert_to_u16 ? WAVE_FORMAT_PCM : WAVE_FORMAT_IEEE_FLOAT;
|
||||
waveformatex.wFormatTag = g_cfg.audio.convert_to_u16 ? WAVE_FORMAT_PCM : WAVE_FORMAT_IEEE_FLOAT;
|
||||
waveformatex.nChannels = channels;
|
||||
waveformatex.nSamplesPerSec = 48000;
|
||||
waveformatex.nAvgBytesPerSec = 48000 * (DWORD)channels * (DWORD)sample_size;
|
||||
@@ -126,7 +123,7 @@ void XAudio2Thread::xa28_open()
|
||||
return;
|
||||
}
|
||||
|
||||
s_tls_source_voice->SetVolume(4.0);
|
||||
s_tls_source_voice->SetVolume(g_cfg.audio.downmix_to_2ch ? 1.0 : 4.0);
|
||||
}
|
||||
|
||||
void XAudio2Thread::xa28_add(const void* src, int size)
|
||||
|
||||
@@ -2,6 +2,12 @@
|
||||
#include "Emu/System.h"
|
||||
#include "Emu/Memory/vm.h"
|
||||
#include "CPUThread.h"
|
||||
#include "Emu/IdManager.h"
|
||||
#include "Utilities/GDBDebugServer.h"
|
||||
|
||||
#ifdef _WIN32
|
||||
#include <Windows.h>
|
||||
#endif
|
||||
|
||||
DECLARE(cpu_thread::g_threads_created){0};
|
||||
DECLARE(cpu_thread::g_threads_deleted){0};
|
||||
@@ -92,6 +98,12 @@ cpu_thread::cpu_thread(u32 id)
|
||||
|
||||
bool cpu_thread::check_state()
|
||||
{
|
||||
#ifdef WITH_GDB_DEBUGGER
|
||||
if (test(state, cpu_flag::dbg_pause)) {
|
||||
fxm::get<GDBDebugServer>()->notify();
|
||||
}
|
||||
#endif
|
||||
|
||||
bool cpu_sleep_called = false;
|
||||
bool cpu_flag_memory = false;
|
||||
|
||||
@@ -123,7 +135,7 @@ bool cpu_thread::check_state()
|
||||
if (cpu_flag_memory) vm::passive_lock(*this);
|
||||
break;
|
||||
}
|
||||
else if (!cpu_sleep_called)
|
||||
else if (!cpu_sleep_called && test(state, cpu_flag::suspend))
|
||||
{
|
||||
cpu_sleep();
|
||||
cpu_sleep_called = true;
|
||||
|
||||
@@ -8,3 +8,9 @@ enum FPSCR_RN
|
||||
FPSCR_RN_PINF = 2,
|
||||
FPSCR_RN_MINF = 3,
|
||||
};
|
||||
|
||||
// Get the exponent of a float
|
||||
inline int fexpf(float x)
|
||||
{
|
||||
return ((u32&)x >> 23) & 0xFF;
|
||||
}
|
||||
|
||||
@@ -1,18 +1,13 @@
|
||||
#pragma once
|
||||
|
||||
struct CellOk
|
||||
enum CellNotAnError : s32
|
||||
{
|
||||
enum : s32
|
||||
{
|
||||
__not_an_error,
|
||||
CELL_OK = 0,
|
||||
CELL_CANCEL = 1,
|
||||
|
||||
CELL_OK = 0
|
||||
};
|
||||
__not_an_error
|
||||
};
|
||||
|
||||
// Temporary workaround
|
||||
constexpr auto CELL_OK = CellOk::CELL_OK;
|
||||
|
||||
enum CellError : u32
|
||||
{
|
||||
CELL_EAGAIN = 0x80010001, // The resource is temporarily unavailable
|
||||
|
||||
@@ -142,6 +142,8 @@ void mfc_thread::cpu_task()
|
||||
cmd.size = 0;
|
||||
no_updates = 0;
|
||||
|
||||
vm::reservation_acquire(cmd.eal, 128);
|
||||
|
||||
// Store unconditionally
|
||||
vm::writer_lock lock(0);
|
||||
data = to_write;
|
||||
|
||||
@@ -19,7 +19,7 @@ extern "C"
|
||||
|
||||
extern std::mutex g_mutex_avcodec_open2;
|
||||
|
||||
logs::channel cellAdec("cellAdec", logs::level::notice);
|
||||
logs::channel cellAdec("cellAdec");
|
||||
|
||||
class AudioDecoder : public ppu_thread
|
||||
{
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
#include "cellAtrac.h"
|
||||
|
||||
logs::channel cellAtrac("cellAtrac", logs::level::notice);
|
||||
logs::channel cellAtrac("cellAtrac");
|
||||
|
||||
s32 cellAtracSetDataAndGetMemSize(vm::ptr<CellAtracHandle> pHandle, vm::ptr<u8> pucBufferAddr, u32 uiReadByte, u32 uiBufferByte, vm::ptr<u32> puiWorkMemByte)
|
||||
{
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
#include "cellAtracMulti.h"
|
||||
|
||||
logs::channel cellAtracMulti("cellAtracMulti", logs::level::notice);
|
||||
logs::channel cellAtracMulti("cellAtracMulti");
|
||||
|
||||
s32 cellAtracMultiSetDataAndGetMemSize(vm::ptr<CellAtracMultiHandle> pHandle, vm::ptr<u8> pucBufferAddr, u32 uiReadByte, u32 uiBufferByte, u32 uiOutputChNum, vm::ptr<s32> piTrackArray, vm::ptr<u32> puiWorkMemByte)
|
||||
{
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
#include "stdafx.h"
|
||||
#include "Utilities/Config.h"
|
||||
#include "Emu/System.h"
|
||||
#include "Emu/IdManager.h"
|
||||
#include "Emu/Cell/PPUModule.h"
|
||||
@@ -11,10 +10,7 @@
|
||||
|
||||
#include <thread>
|
||||
|
||||
logs::channel cellAudio("cellAudio", logs::level::notice);
|
||||
|
||||
cfg::bool_entry g_cfg_audio_dump_to_file(cfg::root.audio, "Dump to file");
|
||||
cfg::bool_entry g_cfg_audio_convert_to_u16(cfg::root.audio, "Convert to 16 bit");
|
||||
logs::channel cellAudio("cellAudio");
|
||||
|
||||
void audio_config::on_init(const std::shared_ptr<void>& _this)
|
||||
{
|
||||
@@ -33,22 +29,22 @@ void audio_config::on_init(const std::shared_ptr<void>& _this)
|
||||
|
||||
void audio_config::on_task()
|
||||
{
|
||||
AudioDumper m_dump(g_cfg_audio_dump_to_file ? 2 : 0); // Init AudioDumper for 2 channels if enabled
|
||||
AudioDumper m_dump(g_cfg.audio.dump_to_file ? 2 : 0); // Init AudioDumper for 2 channels if enabled
|
||||
|
||||
float buf2ch[2 * BUFFER_SIZE]{}; // intermediate buffer for 2 channels
|
||||
float buf8ch[8 * BUFFER_SIZE]{}; // intermediate buffer for 8 channels
|
||||
|
||||
static const size_t out_buffer_size = 8 * BUFFER_SIZE; // output buffer for 8 channels
|
||||
const u32 buf_sz = BUFFER_SIZE * (g_cfg.audio.convert_to_u16 ? 2 : 4) * (g_cfg.audio.downmix_to_2ch ? 2 : 8);
|
||||
|
||||
std::unique_ptr<float[]> out_buffer[BUFFER_NUM];
|
||||
|
||||
for (u32 i = 0; i < BUFFER_NUM; i++)
|
||||
{
|
||||
out_buffer[i].reset(new float[out_buffer_size] {});
|
||||
out_buffer[i].reset(new float[8 * BUFFER_SIZE] {});
|
||||
}
|
||||
|
||||
const auto audio = Emu.GetCallbacks().get_audio();
|
||||
audio->Open(buf8ch, out_buffer_size * (g_cfg_audio_convert_to_u16 ? 2 : 4));
|
||||
audio->Open(buf8ch, buf_sz);
|
||||
|
||||
while (fxm::check<audio_config>() && !Emu.IsStopped())
|
||||
{
|
||||
@@ -225,16 +221,20 @@ void audio_config::on_task()
|
||||
|
||||
if (!first_mix)
|
||||
{
|
||||
// copy output data (2 ch)
|
||||
//for (u32 i = 0; i < (sizeof(buf2ch) / sizeof(float)); i++)
|
||||
//{
|
||||
// out_buffer[out_pos][i] = buf2ch[i];
|
||||
//}
|
||||
|
||||
// copy output data (8 ch)
|
||||
for (u32 i = 0; i < (sizeof(buf8ch) / sizeof(float)); i++)
|
||||
// Copy output data (2ch or 8ch)
|
||||
if (g_cfg.audio.downmix_to_2ch)
|
||||
{
|
||||
out_buffer[out_pos][i] = buf8ch[i];
|
||||
for (u32 i = 0; i < (sizeof(buf2ch) / sizeof(float)); i++)
|
||||
{
|
||||
out_buffer[out_pos][i] = buf2ch[i];
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
for (u32 i = 0; i < (sizeof(buf8ch) / sizeof(float)); i++)
|
||||
{
|
||||
out_buffer[out_pos][i] = buf8ch[i];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -242,10 +242,10 @@ void audio_config::on_task()
|
||||
|
||||
if (first_mix)
|
||||
{
|
||||
memset(out_buffer[out_pos].get(), 0, out_buffer_size * sizeof(float));
|
||||
std::memset(out_buffer[out_pos].get(), 0, 8 * BUFFER_SIZE * sizeof(float));
|
||||
}
|
||||
|
||||
if (g_cfg_audio_convert_to_u16)
|
||||
if (g_cfg.audio.convert_to_u16)
|
||||
{
|
||||
// convert the data from float to u16 with clipping:
|
||||
// 2x MULPS
|
||||
@@ -254,20 +254,21 @@ void audio_config::on_task()
|
||||
// 2x CVTPS2DQ (converts float to s32)
|
||||
// PACKSSDW (converts s32 to s16 with signed saturation)
|
||||
|
||||
u16 buf_u16[out_buffer_size];
|
||||
for (size_t i = 0; i < out_buffer_size; i += 8)
|
||||
__m128i buf_u16[BUFFER_SIZE];
|
||||
|
||||
for (size_t i = 0; i < 8 * BUFFER_SIZE; i += 8)
|
||||
{
|
||||
const auto scale = _mm_set1_ps(0x8000);
|
||||
(__m128i&)(buf_u16[i]) = _mm_packs_epi32(
|
||||
buf_u16[i / 8] = _mm_packs_epi32(
|
||||
_mm_cvtps_epi32(_mm_mul_ps(_mm_load_ps(out_buffer[out_pos].get() + i), scale)),
|
||||
_mm_cvtps_epi32(_mm_mul_ps(_mm_load_ps(out_buffer[out_pos].get() + i + 4), scale)));
|
||||
}
|
||||
|
||||
audio->AddData(buf_u16, out_buffer_size * sizeof(u16));
|
||||
audio->AddData(buf_u16, buf_sz);
|
||||
}
|
||||
else
|
||||
{
|
||||
audio->AddData(out_buffer[out_pos].get(), out_buffer_size * sizeof(float));
|
||||
audio->AddData(out_buffer[out_pos].get(), buf_sz);
|
||||
}
|
||||
|
||||
const u64 stamp2 = get_system_time();
|
||||
@@ -840,7 +841,11 @@ s32 cellAudioAdd2chData(u32 portNum, vm::ptr<float> src, u32 samples, float volu
|
||||
|
||||
if (port.channel == 2)
|
||||
{
|
||||
cellAudio.error("cellAudioAdd2chData(portNum=%d): port.channel = 2", portNum);
|
||||
for (u32 i = 0; i < samples; i++)
|
||||
{
|
||||
dst[i * 2 + 0] += src[i * 2 + 0] * volume; // mix L ch
|
||||
dst[i * 2 + 1] += src[i * 2 + 1] * volume; // mix R ch
|
||||
}
|
||||
}
|
||||
else if (port.channel == 6)
|
||||
{
|
||||
@@ -896,9 +901,17 @@ s32 cellAudioAdd6chData(u32 portNum, vm::ptr<float> src, float volume)
|
||||
|
||||
const auto dst = vm::ptr<float>::make(port.addr.addr() + s32(port.tag % port.block) * port.channel * 256 * SIZE_32(float));
|
||||
|
||||
if (port.channel == 2 || port.channel == 6)
|
||||
if (port.channel == 6)
|
||||
{
|
||||
cellAudio.error("cellAudioAdd2chData(portNum=%d): port.channel = %d", portNum, port.channel);
|
||||
for (u32 i = 0; i < 256; i++)
|
||||
{
|
||||
dst[i * 6 + 0] += src[i * 6 + 0] * volume; // mix L ch
|
||||
dst[i * 6 + 1] += src[i * 6 + 1] * volume; // mix R ch
|
||||
dst[i * 6 + 2] += src[i * 6 + 2] * volume; // mix center
|
||||
dst[i * 6 + 3] += src[i * 6 + 3] * volume; // mix LFE
|
||||
dst[i * 6 + 4] += src[i * 6 + 4] * volume; // mix rear L
|
||||
dst[i * 6 + 5] += src[i * 6 + 5] * volume; // mix rear R
|
||||
}
|
||||
}
|
||||
else if (port.channel == 8)
|
||||
{
|
||||
|
||||
@@ -5,39 +5,46 @@
|
||||
#include "cellAudioIn.h"
|
||||
#include "cellAudioOut.h"
|
||||
#include "cellVideoOut.h"
|
||||
#include "cellSysutil.h"
|
||||
|
||||
logs::channel cellAvconfExt("cellAvconfExt", logs::level::notice);
|
||||
logs::channel cellAvconfExt("cellAvconfExt");
|
||||
|
||||
vm::gvar<f32> g_gamma; // TODO
|
||||
|
||||
s32 cellAudioOutUnregisterDevice()
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
UNIMPLEMENTED_FUNC(cellAvconfExt);
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
s32 cellAudioOutGetDeviceInfo2()
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
UNIMPLEMENTED_FUNC(cellAvconfExt);
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
s32 cellVideoOutSetXVColor()
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
UNIMPLEMENTED_FUNC(cellAvconfExt);
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
s32 cellVideoOutSetupDisplay()
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
UNIMPLEMENTED_FUNC(cellAvconfExt);
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
s32 cellAudioInGetDeviceInfo()
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
UNIMPLEMENTED_FUNC(cellAvconfExt);
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
s32 cellVideoOutConvertCursorColor()
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
UNIMPLEMENTED_FUNC(cellAvconfExt);
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
s32 cellVideoOutGetGamma(u32 videoOut, vm::ptr<f32> gamma)
|
||||
@@ -56,12 +63,14 @@ s32 cellVideoOutGetGamma(u32 videoOut, vm::ptr<f32> gamma)
|
||||
|
||||
s32 cellAudioInGetAvailableDeviceInfo()
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
UNIMPLEMENTED_FUNC(cellAvconfExt);
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
s32 cellAudioOutGetAvailableDeviceInfo()
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
UNIMPLEMENTED_FUNC(cellAvconfExt);
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
s32 cellVideoOutSetGamma(u32 videoOut, f32 gamma)
|
||||
@@ -85,27 +94,32 @@ s32 cellVideoOutSetGamma(u32 videoOut, f32 gamma)
|
||||
|
||||
s32 cellAudioOutRegisterDevice()
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
UNIMPLEMENTED_FUNC(cellAvconfExt);
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
s32 cellAudioOutSetDeviceMode()
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
UNIMPLEMENTED_FUNC(cellAvconfExt);
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
s32 cellAudioInSetDeviceMode()
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
UNIMPLEMENTED_FUNC(cellAvconfExt);
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
s32 cellAudioInRegisterDevice()
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
UNIMPLEMENTED_FUNC(cellAvconfExt);
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
s32 cellAudioInUnregisterDevice()
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
UNIMPLEMENTED_FUNC(cellAvconfExt);
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
s32 cellVideoOutGetScreenSize(u32 videoOut, vm::ptr<float> screenSize)
|
||||
@@ -132,7 +146,7 @@ s32 cellVideoOutGetScreenSize(u32 videoOut, vm::ptr<float> screenSize)
|
||||
|
||||
DECLARE(ppu_module_manager::cellAvconfExt)("cellSysutilAvconfExt", []()
|
||||
{
|
||||
REG_VNID(cellSysutilAvconfExt, 0x00000000, g_gamma).init = []
|
||||
REG_VNID(cellSysutilAvconfExt, 0x00000000u, g_gamma).init = []
|
||||
{
|
||||
// Test
|
||||
*g_gamma = 1.0f;
|
||||
|
||||
@@ -2,40 +2,33 @@
|
||||
#include "Emu/System.h"
|
||||
#include "Emu/Cell/PPUModule.h"
|
||||
|
||||
logs::channel cellBGDL("cellBGDL", logs::level::notice);
|
||||
#include "cellBgdl.h"
|
||||
|
||||
// Return Codes
|
||||
enum
|
||||
{
|
||||
CELL_BGDL_UTIL_RET_OK = 0x00000000,
|
||||
CELL_BGDL_UTIL_ERROR_BUSY = 0x8002ce01,
|
||||
CELL_BGDL_UTIL_ERROR_INTERNAL = 0x8002ce02,
|
||||
CELL_BGDL_UTIL_ERROR_PARAM = 0x8002ce03,
|
||||
CELL_BGDL_UTIL_ERROR_ACCESS_ERROR = 0x8002ce04,
|
||||
CELL_BGDL_UTIL_ERROR_INITIALIZE = 0x8002ce05,
|
||||
};
|
||||
namespace vm { using namespace ps3; }
|
||||
|
||||
s32 cellBGDLGetInfo()
|
||||
logs::channel cellBGDL("cellBGDL");
|
||||
|
||||
s32 cellBGDLGetInfo(vm::cptr<char> content_id, vm::ptr<CellBGDLInfo> info, s32 num)
|
||||
{
|
||||
UNIMPLEMENTED_FUNC(cellBGDL);
|
||||
cellBGDL.todo("cellBGDLGetInfo(content_id=%s, info=*0x%x, num=%d)", content_id, info, num);
|
||||
return 0;
|
||||
}
|
||||
|
||||
s32 cellBGDLGetInfo2(vm::cptr<char> service_id, vm::ptr<CellBGDLInfo> info, s32 num)
|
||||
{
|
||||
cellBGDL.todo("cellBGDLGetInfo2(service_id=%s, info=*0x%x, num=%d)", service_id, info, num);
|
||||
return 0;
|
||||
}
|
||||
|
||||
s32 cellBGDLSetMode(CellBGDLMode mode)
|
||||
{
|
||||
cellBGDL.todo("cellBGDLSetMode(mode=%d)", (s32) mode);
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
s32 cellBGDLGetInfo2()
|
||||
s32 cellBGDLGetMode(vm::ptr<CellBGDLMode> mode)
|
||||
{
|
||||
UNIMPLEMENTED_FUNC(cellBGDL);
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
s32 cellBGDLSetMode()
|
||||
{
|
||||
UNIMPLEMENTED_FUNC(cellBGDL);
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
s32 cellBGDLGetMode()
|
||||
{
|
||||
UNIMPLEMENTED_FUNC(cellBGDL);
|
||||
cellBGDL.todo("cellBGDLGetMode(mode=*0x%x)", mode);
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,34 @@
|
||||
#pragma once
|
||||
|
||||
// Return Codes
|
||||
enum
|
||||
{
|
||||
CELL_BGDL_UTIL_ERROR_BUSY = 0x8002ce01,
|
||||
CELL_BGDL_UTIL_ERROR_INTERNAL = 0x8002ce02,
|
||||
CELL_BGDL_UTIL_ERROR_PARAM = 0x8002ce03,
|
||||
CELL_BGDL_UTIL_ERROR_ACCESS_ERROR = 0x8002ce04,
|
||||
CELL_BGDL_UTIL_ERROR_INITIALIZE = 0x8002ce05,
|
||||
};
|
||||
|
||||
enum CellBGDLState : s32
|
||||
{
|
||||
CELL_BGDL_STATE_ERROR = 0,
|
||||
CELL_BGDL_STATE_PAUSE,
|
||||
CELL_BGDL_STATE_READY,
|
||||
CELL_BGDL_STATE_RUN,
|
||||
CELL_BGDL_STATE_COMPLETE,
|
||||
};
|
||||
|
||||
enum CellBGDLMode : s32
|
||||
{
|
||||
CELL_BGDL_MODE_AUTO = 0,
|
||||
CELL_BGDL_MODE_ALWAYS_ALLOW,
|
||||
};
|
||||
|
||||
struct CellBGDLInfo
|
||||
{
|
||||
be_t<u64> received_size;
|
||||
be_t<u64> content_size;
|
||||
be_t<s32> state; // CellBGDLState
|
||||
vm::ps3::bptr<void> reserved;
|
||||
};
|
||||
@@ -1,26 +1,43 @@
|
||||
#include "stdafx.h"
|
||||
#include "Utilities/Config.h"
|
||||
#include "Emu/IdManager.h"
|
||||
#include "Emu/System.h"
|
||||
#include "Emu/Cell/PPUModule.h"
|
||||
|
||||
#include "cellCamera.h"
|
||||
|
||||
logs::channel cellCamera("cellCamera", logs::level::notice);
|
||||
logs::channel cellCamera("cellCamera");
|
||||
|
||||
cfg::map_entry<bool> g_cfg_camera(cfg::root.io, "Camera",
|
||||
template <>
|
||||
void fmt_class_string<camera_handler>::format(std::string& out, u64 arg)
|
||||
{
|
||||
{ "Null", false },
|
||||
{ "Fake", true },
|
||||
});
|
||||
format_enum(out, arg, [](auto value)
|
||||
{
|
||||
switch (value)
|
||||
{
|
||||
case camera_handler::null: return "Null";
|
||||
case camera_handler::fake: return "Fake";
|
||||
}
|
||||
|
||||
cfg::map_entry<CellCameraType> g_cfg_camera_type(cfg::root.io, "Camera type",
|
||||
return unknown;
|
||||
});
|
||||
}
|
||||
|
||||
template <>
|
||||
void fmt_class_string<fake_camera_type>::format(std::string& out, u64 arg)
|
||||
{
|
||||
{ "Unknown", CELL_CAMERA_TYPE_UNKNOWN },
|
||||
{ "EyeToy", CELL_CAMERA_EYETOY },
|
||||
{ "PS Eye", CELL_CAMERA_EYETOY2 },
|
||||
{ "UVC 1.1", CELL_CAMERA_USBVIDEOCLASS },
|
||||
});
|
||||
format_enum(out, arg, [](auto value)
|
||||
{
|
||||
switch (value)
|
||||
{
|
||||
case fake_camera_type::unknown: return "Unknown";
|
||||
case fake_camera_type::eyetoy: return "EyeToy";
|
||||
case fake_camera_type::eyetoy2: return "PS Eye";
|
||||
case fake_camera_type::uvc1_1: return "UVC 1.1";
|
||||
}
|
||||
|
||||
return unknown;
|
||||
});
|
||||
}
|
||||
|
||||
static const char* get_camera_attr_name(s32 value)
|
||||
{
|
||||
@@ -95,7 +112,7 @@ s32 cellCameraInit()
|
||||
{
|
||||
cellCamera.warning("cellCameraInit()");
|
||||
|
||||
if (!g_cfg_camera.get())
|
||||
if (g_cfg.io.camera == camera_handler::null)
|
||||
{
|
||||
return CELL_CAMERA_ERROR_DEVICE_NOT_FOUND;
|
||||
}
|
||||
@@ -107,9 +124,9 @@ s32 cellCameraInit()
|
||||
return CELL_CAMERA_ERROR_ALREADY_INIT;
|
||||
}
|
||||
|
||||
switch (g_cfg_camera_type.get())
|
||||
switch (g_cfg.io.camera_type)
|
||||
{
|
||||
case CELL_CAMERA_EYETOY:
|
||||
case fake_camera_type::eyetoy:
|
||||
{
|
||||
camera->attr[CELL_CAMERA_SATURATION] = { 164 };
|
||||
camera->attr[CELL_CAMERA_BRIGHTNESS] = { 96 };
|
||||
@@ -125,10 +142,10 @@ s32 cellCameraInit()
|
||||
camera->attr[CELL_CAMERA_MIRRORFLAG] = { 1 };
|
||||
camera->attr[CELL_CAMERA_422FLAG] = { 1 };
|
||||
camera->attr[CELL_CAMERA_USBLOAD] = { 4 };
|
||||
break;
|
||||
}
|
||||
break;
|
||||
|
||||
case CELL_CAMERA_EYETOY2:
|
||||
case fake_camera_type::eyetoy2:
|
||||
{
|
||||
camera->attr[CELL_CAMERA_SATURATION] = { 64 };
|
||||
camera->attr[CELL_CAMERA_BRIGHTNESS] = { 8 };
|
||||
@@ -145,11 +162,8 @@ s32 cellCameraInit()
|
||||
camera->attr[CELL_CAMERA_PIXELOUTLIERFILTER] = { 1 };
|
||||
camera->attr[CELL_CAMERA_AGCLOW] = { 48 };
|
||||
camera->attr[CELL_CAMERA_AGCHIGH] = { 64 };
|
||||
break;
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
default: break;
|
||||
}
|
||||
|
||||
// TODO: Some other default attributes? Need to check the actual behaviour on a real PS3.
|
||||
@@ -204,7 +218,14 @@ s32 cellCameraGetType(s32 dev_num, vm::ptr<s32> type)
|
||||
return CELL_CAMERA_ERROR_NOT_INIT;
|
||||
}
|
||||
|
||||
*type = g_cfg_camera_type.get();
|
||||
switch (g_cfg.io.camera_type)
|
||||
{
|
||||
case fake_camera_type::unknown: *type = CELL_CAMERA_TYPE_UNKNOWN; break;
|
||||
case fake_camera_type::eyetoy: *type = CELL_CAMERA_EYETOY; break;
|
||||
case fake_camera_type::eyetoy2: *type = CELL_CAMERA_EYETOY2; break;
|
||||
case fake_camera_type::uvc1_1: *type = CELL_CAMERA_USBVIDEOCLASS; break;
|
||||
}
|
||||
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
@@ -218,7 +239,7 @@ s32 cellCameraIsAttached(s32 dev_num)
|
||||
{
|
||||
cellCamera.warning("cellCameraIsAttached(dev_num=%d)", dev_num);
|
||||
|
||||
if (g_cfg_camera.get())
|
||||
if (g_cfg.io.camera == camera_handler::fake)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
#include "cellCelp8Enc.h"
|
||||
|
||||
logs::channel cellCelp8Enc("cellCelp8Enc", logs::level::notice);
|
||||
logs::channel cellCelp8Enc("cellCelp8Enc");
|
||||
|
||||
|
||||
s32 cellCelp8EncQueryAttr()
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
#include "cellCelpEnc.h"
|
||||
|
||||
logs::channel cellCelpEnc("cellCelpEnc", logs::level::notice);
|
||||
logs::channel cellCelpEnc("cellCelpEnc");
|
||||
|
||||
|
||||
s32 cellCelpEncQueryAttr()
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
#include "stdafx.h"
|
||||
#include "Emu/System.h"
|
||||
#include "Emu/Cell/PPUModule.h"
|
||||
|
||||
logs::channel cellCrossController("cellCrossController");
|
||||
|
||||
s32 cellCrossController_37E1F502() // LittleBigPlanet 2 and 3
|
||||
{
|
||||
cellCrossController.todo("cellCrossController_37E1F502");
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
|
||||
DECLARE(ppu_module_manager::cellCrossController)("cellCrossController", []()
|
||||
{
|
||||
REG_FNID(cellCrossController, 0x37E1F502, cellCrossController_37E1F502);
|
||||
});
|
||||
@@ -3,264 +3,124 @@
|
||||
|
||||
#include "cellDaisy.h"
|
||||
|
||||
logs::channel cellDaisy("cellDaisy", logs::level::notice);
|
||||
logs::channel cellDaisy("cellDaisy");
|
||||
|
||||
s32 _ZN4cell5Daisy17LFQueue2PushCloseEPNS0_8LFQueue2EPFiPvjE()
|
||||
using LFQueue2 = struct CellDaisyLFQueue2;
|
||||
using Lock = struct CellDaisyLock;
|
||||
using ScatterGatherInterlock = struct CellDaisyScatterGatherInterlock;
|
||||
using AtomicInterlock = volatile struct CellDaisyAtomicInterlock;
|
||||
|
||||
s32 cellDaisyLFQueue2GetPopPointer(vm::ptr<LFQueue2> queue, vm::ptr<s32> pPointer, u32 isBlocking)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 _ZN4cell5Daisy21LFQueue2GetPopPointerEPNS0_8LFQueue2EPij()
|
||||
s32 cellDaisyLFQueue2CompletePopPointer(vm::ptr<LFQueue2> queue, s32 pointer, vm::ptr<s32(vm::ptr<void>, u32)> fpSendSignal, u32 isQueueFull)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 _QN4cell5Daisy4Lock15completeConsumeEj()
|
||||
void cellDaisyLFQueue2PushOpen(vm::ptr<LFQueue2> queue)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 _QN4cell5Daisy9_snprintfEPcjPKcz()
|
||||
s32 cellDaisyLFQueue2PushClose(vm::ptr<LFQueue2> queue, vm::ptr<s32(vm::ptr<void>, u32)> fpSendSignal)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 _ZN4cell5Daisy4Lock7popOpenEv()
|
||||
void cellDaisyLFQueue2PopOpen(vm::ptr<LFQueue2> queue)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 _ZN4cell5Daisy26LFQueue2CompletePopPointerEPNS0_8LFQueue2EiPFiPvjEj()
|
||||
s32 cellDaisyLFQueue2PopClose(vm::ptr<LFQueue2> queue, vm::ptr<s32(vm::ptr<void>, u32)> fpSendSignal)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 _ZN4cell5Daisy22ScatterGatherInterlock7releaseEv()
|
||||
s32 cellDaisyLFQueue2HasUnfinishedConsumer(vm::ptr<LFQueue2> queue, u32 isCancelled)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 _QN4cell5Daisy4Lock7popOpenEv()
|
||||
s32 cellDaisy_snprintf(vm::ptr<char> buffer, u32 count, vm::cptr<char> fmt, ppu_va_args_t fmt_args)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 _ZN4cell5Daisy22ScatterGatherInterlockC1EPVNS0_16_AtomicInterlockEjPjjh()
|
||||
s32 cellDaisyLock_initialize(vm::ptr<Lock> _this, u32 depth)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 _QN4cell5Daisy22ScatterGatherInterlockC1EPVNS0_16_AtomicInterlockEjPjjh()
|
||||
s32 cellDaisyLock_getNextHeadPointer(vm::ptr<Lock> _this)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 _ZN4cell5Daisy9_snprintfEPcjPKcz()
|
||||
s32 cellDaisyLock_getNextTailPointer(vm::ptr<Lock> _this)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 _ZN4cell5Daisy29LFQueue2HasUnfinishedConsumerEPNS0_8LFQueue2Ej()
|
||||
s32 cellDaisyLock_completeConsume(vm::ptr<Lock> _this, u32 pointer)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 _ZN4cell5Daisy4Lock18getNextHeadPointerEv()
|
||||
s32 cellDaisyLock_completeProduce(vm::ptr<Lock> _this, u32 pointer)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 _ZN4cell5Daisy4Lock10initializeEj()
|
||||
s32 cellDaisyLock_pushOpen(vm::ptr<Lock> _this)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 _ZN4cell5Daisy22ScatterGatherInterlockC1EPVNS0_16_AtomicInterlockEjPvPFiS5_jE()
|
||||
s32 cellDaisyLock_pushClose(vm::ptr<Lock> _this)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 _ZN4cell5Daisy22ScatterGatherInterlockC2EPVNS0_16_AtomicInterlockEjPjjh()
|
||||
s32 cellDaisyLock_popOpen(vm::ptr<Lock> _this)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 _ZN4cell5Daisy4Lock15completeProduceEj()
|
||||
s32 cellDaisyLock_popClose(vm::ptr<Lock> _this)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 _QN4cell5Daisy16LFQueue2PushOpenEPNS0_8LFQueue2E()
|
||||
void cellDaisyScatterGatherInterlock_1(vm::ptr<ScatterGatherInterlock> _this, vm::ptr<AtomicInterlock> ea, u32 size, vm::ptr<void> eaSignal, vm::ptr<s32(vm::ptr<void>, u32)> fpSendSignal)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 _QN4cell5Daisy16LFQueue2PopCloseEPNS0_8LFQueue2EPFiPvjE()
|
||||
void cellDaisyScatterGatherInterlock_2(vm::ptr<ScatterGatherInterlock> _this, u32 size, vm::ptr<u32> ids, u32 numSpus, u8 spup)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 _QN4cell5Daisy4Lock8popCloseEv()
|
||||
void cellDaisyScatterGatherInterlock_9tor(vm::ptr<ScatterGatherInterlock> _this)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 _ZN4cell5Daisy4Lock8popCloseEv()
|
||||
s32 cellDaisyScatterGatherInterlock_probe(vm::ptr<ScatterGatherInterlock> _this, u32 isBlocking)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 _ZN4cell5Daisy22ScatterGatherInterlockD2Ev()
|
||||
s32 cellDaisyScatterGatherInterlock_release(vm::ptr<ScatterGatherInterlock> _this)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 _QN4cell5Daisy21LFQueue2GetPopPointerEPNS0_8LFQueue2EPij()
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 _ZN4cell5Daisy4Lock18getNextTailPointerEv()
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 _ZN4cell5Daisy4Lock8pushOpenEv()
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 _QN4cell5Daisy29LFQueue2HasUnfinishedConsumerEPNS0_8LFQueue2Ej()
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 _ZN4cell5Daisy4Lock9pushCloseEv()
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 _QN4cell5Daisy22ScatterGatherInterlockD2Ev()
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 _QN4cell5Daisy15LFQueue2PopOpenEPNS0_8LFQueue2E()
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 _QN4cell5Daisy22ScatterGatherInterlockC1EPVNS0_16_AtomicInterlockEjPvPFiS5_jE()
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 _ZN4cell5Daisy22ScatterGatherInterlockD1Ev()
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 _QN4cell5Daisy4Lock10initializeEj()
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 _QN4cell5Daisy4Lock15completeProduceEj()
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 _ZN4cell5Daisy16LFQueue2PopCloseEPNS0_8LFQueue2EPFiPvjE()
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 _ZN4cell5Daisy15LFQueue2PopOpenEPNS0_8LFQueue2E()
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 _QN4cell5Daisy17LFQueue2PushCloseEPNS0_8LFQueue2EPFiPvjE()
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 _QN4cell5Daisy22ScatterGatherInterlockC2EPVNS0_16_AtomicInterlockEjPvPFiS5_jE()
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 _QN4cell5Daisy22ScatterGatherInterlock21proceedSequenceNumberEv()
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 _ZN4cell5Daisy22ScatterGatherInterlockC2EPVNS0_16_AtomicInterlockEjPvPFiS5_jE()
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 _QN4cell5Daisy22ScatterGatherInterlockC2EPVNS0_16_AtomicInterlockEjPjjh()
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 _ZN4cell5Daisy4Lock15completeConsumeEj()
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 _ZN4cell5Daisy22ScatterGatherInterlock21proceedSequenceNumberEv()
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 _QN4cell5Daisy4Lock18getNextHeadPointerEv()
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 _QN4cell5Daisy4Lock9pushCloseEv()
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 _QN4cell5Daisy26LFQueue2CompletePopPointerEPNS0_8LFQueue2EiPFiPvjEj()
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 _ZN4cell5Daisy22ScatterGatherInterlock5probeEj()
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 _QN4cell5Daisy4Lock8pushOpenEv()
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 _QN4cell5Daisy22ScatterGatherInterlock5probeEj()
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 _QN4cell5Daisy22ScatterGatherInterlockD1Ev()
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 _ZN4cell5Daisy16LFQueue2PushOpenEPNS0_8LFQueue2E()
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 _QN4cell5Daisy4Lock18getNextTailPointerEv()
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
|
||||
s32 _QN4cell5Daisy22ScatterGatherInterlock7releaseEv()
|
||||
void cellDaisyScatterGatherInterlock_proceedSequenceNumber(vm::ptr<ScatterGatherInterlock> _this)
|
||||
{
|
||||
fmt::throw_exception("Unimplemented" HERE);
|
||||
}
|
||||
@@ -268,56 +128,58 @@ s32 _QN4cell5Daisy22ScatterGatherInterlock7releaseEv()
|
||||
|
||||
DECLARE(ppu_module_manager::cellDaisy)("cellDaisy", []()
|
||||
{
|
||||
REG_FUNC(cellDaisy, _ZN4cell5Daisy17LFQueue2PushCloseEPNS0_8LFQueue2EPFiPvjE);
|
||||
REG_FUNC(cellDaisy, _ZN4cell5Daisy21LFQueue2GetPopPointerEPNS0_8LFQueue2EPij);
|
||||
REG_FUNC(cellDaisy, _QN4cell5Daisy4Lock15completeConsumeEj);
|
||||
REG_FUNC(cellDaisy, _QN4cell5Daisy9_snprintfEPcjPKcz);
|
||||
REG_FUNC(cellDaisy, _ZN4cell5Daisy4Lock7popOpenEv);
|
||||
REG_FUNC(cellDaisy, _ZN4cell5Daisy26LFQueue2CompletePopPointerEPNS0_8LFQueue2EiPFiPvjEj);
|
||||
REG_FUNC(cellDaisy, _ZN4cell5Daisy22ScatterGatherInterlock7releaseEv);
|
||||
REG_FUNC(cellDaisy, _QN4cell5Daisy4Lock7popOpenEv);
|
||||
REG_FUNC(cellDaisy, _ZN4cell5Daisy22ScatterGatherInterlockC1EPVNS0_16_AtomicInterlockEjPjjh);
|
||||
REG_FUNC(cellDaisy, _QN4cell5Daisy22ScatterGatherInterlockC1EPVNS0_16_AtomicInterlockEjPjjh);
|
||||
REG_FUNC(cellDaisy, _ZN4cell5Daisy9_snprintfEPcjPKcz);
|
||||
REG_FUNC(cellDaisy, _ZN4cell5Daisy29LFQueue2HasUnfinishedConsumerEPNS0_8LFQueue2Ej);
|
||||
REG_FUNC(cellDaisy, _ZN4cell5Daisy4Lock18getNextHeadPointerEv);
|
||||
REG_FUNC(cellDaisy, _ZN4cell5Daisy4Lock10initializeEj);
|
||||
REG_FUNC(cellDaisy, _ZN4cell5Daisy22ScatterGatherInterlockC1EPVNS0_16_AtomicInterlockEjPvPFiS5_jE);
|
||||
REG_FUNC(cellDaisy, _ZN4cell5Daisy22ScatterGatherInterlockC2EPVNS0_16_AtomicInterlockEjPjjh);
|
||||
REG_FUNC(cellDaisy, _ZN4cell5Daisy4Lock15completeProduceEj);
|
||||
REG_FUNC(cellDaisy, _QN4cell5Daisy16LFQueue2PushOpenEPNS0_8LFQueue2E);
|
||||
REG_FUNC(cellDaisy, _QN4cell5Daisy16LFQueue2PopCloseEPNS0_8LFQueue2EPFiPvjE);
|
||||
REG_FUNC(cellDaisy, _QN4cell5Daisy4Lock8popCloseEv);
|
||||
REG_FUNC(cellDaisy, _ZN4cell5Daisy4Lock8popCloseEv);
|
||||
REG_FUNC(cellDaisy, _ZN4cell5Daisy22ScatterGatherInterlockD2Ev);
|
||||
REG_FUNC(cellDaisy, _QN4cell5Daisy21LFQueue2GetPopPointerEPNS0_8LFQueue2EPij);
|
||||
REG_FUNC(cellDaisy, _ZN4cell5Daisy4Lock18getNextTailPointerEv);
|
||||
REG_FUNC(cellDaisy, _ZN4cell5Daisy4Lock8pushOpenEv);
|
||||
REG_FUNC(cellDaisy, _QN4cell5Daisy29LFQueue2HasUnfinishedConsumerEPNS0_8LFQueue2Ej);
|
||||
REG_FUNC(cellDaisy, _ZN4cell5Daisy4Lock9pushCloseEv);
|
||||
REG_FUNC(cellDaisy, _QN4cell5Daisy22ScatterGatherInterlockD2Ev);
|
||||
REG_FUNC(cellDaisy, _QN4cell5Daisy15LFQueue2PopOpenEPNS0_8LFQueue2E);
|
||||
REG_FUNC(cellDaisy, _QN4cell5Daisy22ScatterGatherInterlockC1EPVNS0_16_AtomicInterlockEjPvPFiS5_jE);
|
||||
REG_FUNC(cellDaisy, _ZN4cell5Daisy22ScatterGatherInterlockD1Ev);
|
||||
REG_FUNC(cellDaisy, _QN4cell5Daisy4Lock10initializeEj);
|
||||
REG_FUNC(cellDaisy, _QN4cell5Daisy4Lock15completeProduceEj);
|
||||
REG_FUNC(cellDaisy, _ZN4cell5Daisy16LFQueue2PopCloseEPNS0_8LFQueue2EPFiPvjE);
|
||||
REG_FUNC(cellDaisy, _ZN4cell5Daisy15LFQueue2PopOpenEPNS0_8LFQueue2E);
|
||||
REG_FUNC(cellDaisy, _QN4cell5Daisy17LFQueue2PushCloseEPNS0_8LFQueue2EPFiPvjE);
|
||||
REG_FUNC(cellDaisy, _QN4cell5Daisy22ScatterGatherInterlockC2EPVNS0_16_AtomicInterlockEjPvPFiS5_jE);
|
||||
REG_FUNC(cellDaisy, _QN4cell5Daisy22ScatterGatherInterlock21proceedSequenceNumberEv);
|
||||
REG_FUNC(cellDaisy, _ZN4cell5Daisy22ScatterGatherInterlockC2EPVNS0_16_AtomicInterlockEjPvPFiS5_jE);
|
||||
REG_FUNC(cellDaisy, _QN4cell5Daisy22ScatterGatherInterlockC2EPVNS0_16_AtomicInterlockEjPjjh);
|
||||
REG_FUNC(cellDaisy, _ZN4cell5Daisy4Lock15completeConsumeEj);
|
||||
REG_FUNC(cellDaisy, _ZN4cell5Daisy22ScatterGatherInterlock21proceedSequenceNumberEv);
|
||||
REG_FUNC(cellDaisy, _QN4cell5Daisy4Lock18getNextHeadPointerEv);
|
||||
REG_FUNC(cellDaisy, _QN4cell5Daisy4Lock9pushCloseEv);
|
||||
REG_FUNC(cellDaisy, _QN4cell5Daisy26LFQueue2CompletePopPointerEPNS0_8LFQueue2EiPFiPvjEj);
|
||||
REG_FUNC(cellDaisy, _ZN4cell5Daisy22ScatterGatherInterlock5probeEj);
|
||||
REG_FUNC(cellDaisy, _QN4cell5Daisy4Lock8pushOpenEv);
|
||||
REG_FUNC(cellDaisy, _QN4cell5Daisy22ScatterGatherInterlock5probeEj);
|
||||
REG_FUNC(cellDaisy, _QN4cell5Daisy22ScatterGatherInterlockD1Ev);
|
||||
REG_FUNC(cellDaisy, _ZN4cell5Daisy16LFQueue2PushOpenEPNS0_8LFQueue2E);
|
||||
REG_FUNC(cellDaisy, _QN4cell5Daisy4Lock18getNextTailPointerEv);
|
||||
REG_FUNC(cellDaisy, _QN4cell5Daisy22ScatterGatherInterlock7releaseEv);
|
||||
REG_FNID(cellDaisy, "_ZN4cell5Daisy17LFQueue2PushCloseEPNS0_8LFQueue2EPFiPvjE", cellDaisyLFQueue2PushClose);
|
||||
REG_FNID(cellDaisy, "_QN4cell5Daisy17LFQueue2PushCloseEPNS0_8LFQueue2EPFiPvjE", cellDaisyLFQueue2PushClose);
|
||||
REG_FNID(cellDaisy, "_ZN4cell5Daisy21LFQueue2GetPopPointerEPNS0_8LFQueue2EPij", cellDaisyLFQueue2GetPopPointer);
|
||||
REG_FNID(cellDaisy, "_QN4cell5Daisy21LFQueue2GetPopPointerEPNS0_8LFQueue2EPij", cellDaisyLFQueue2GetPopPointer);
|
||||
REG_FNID(cellDaisy, "_ZN4cell5Daisy26LFQueue2CompletePopPointerEPNS0_8LFQueue2EiPFiPvjEj", cellDaisyLFQueue2CompletePopPointer);
|
||||
REG_FNID(cellDaisy, "_QN4cell5Daisy26LFQueue2CompletePopPointerEPNS0_8LFQueue2EiPFiPvjEj", cellDaisyLFQueue2CompletePopPointer);
|
||||
REG_FNID(cellDaisy, "_ZN4cell5Daisy29LFQueue2HasUnfinishedConsumerEPNS0_8LFQueue2Ej", cellDaisyLFQueue2HasUnfinishedConsumer);
|
||||
REG_FNID(cellDaisy, "_QN4cell5Daisy29LFQueue2HasUnfinishedConsumerEPNS0_8LFQueue2Ej", cellDaisyLFQueue2HasUnfinishedConsumer);
|
||||
REG_FNID(cellDaisy, "_ZN4cell5Daisy16LFQueue2PushOpenEPNS0_8LFQueue2E", cellDaisyLFQueue2PushOpen);
|
||||
REG_FNID(cellDaisy, "_QN4cell5Daisy16LFQueue2PushOpenEPNS0_8LFQueue2E", cellDaisyLFQueue2PushOpen);
|
||||
REG_FNID(cellDaisy, "_ZN4cell5Daisy16LFQueue2PopCloseEPNS0_8LFQueue2EPFiPvjE", cellDaisyLFQueue2PopClose);
|
||||
REG_FNID(cellDaisy, "_QN4cell5Daisy16LFQueue2PopCloseEPNS0_8LFQueue2EPFiPvjE", cellDaisyLFQueue2PopClose);
|
||||
REG_FNID(cellDaisy, "_ZN4cell5Daisy15LFQueue2PopOpenEPNS0_8LFQueue2E", cellDaisyLFQueue2PopOpen);
|
||||
REG_FNID(cellDaisy, "_QN4cell5Daisy15LFQueue2PopOpenEPNS0_8LFQueue2E", cellDaisyLFQueue2PopOpen);
|
||||
REG_FNID(cellDaisy, "_ZN4cell5Daisy9_snprintfEPcjPKcz", cellDaisy_snprintf);
|
||||
REG_FNID(cellDaisy, "_QN4cell5Daisy9_snprintfEPcjPKcz", cellDaisy_snprintf);
|
||||
|
||||
REG_FNID(cellDaisy, "_ZN4cell5Daisy4Lock7popOpenEv", cellDaisyLock_popOpen);
|
||||
REG_FNID(cellDaisy, "_QN4cell5Daisy4Lock7popOpenEv", cellDaisyLock_popOpen);
|
||||
REG_FNID(cellDaisy, "_ZN4cell5Daisy4Lock18getNextHeadPointerEv", cellDaisyLock_getNextHeadPointer);
|
||||
REG_FNID(cellDaisy, "_QN4cell5Daisy4Lock18getNextHeadPointerEv", cellDaisyLock_getNextHeadPointer);
|
||||
REG_FNID(cellDaisy, "_ZN4cell5Daisy4Lock10initializeEj", cellDaisyLock_initialize);
|
||||
REG_FNID(cellDaisy, "_QN4cell5Daisy4Lock10initializeEj", cellDaisyLock_initialize);
|
||||
REG_FNID(cellDaisy, "_ZN4cell5Daisy4Lock15completeProduceEj", cellDaisyLock_completeProduce);
|
||||
REG_FNID(cellDaisy, "_QN4cell5Daisy4Lock15completeProduceEj", cellDaisyLock_completeProduce);
|
||||
REG_FNID(cellDaisy, "_ZN4cell5Daisy4Lock8popCloseEv", cellDaisyLock_popClose);
|
||||
REG_FNID(cellDaisy, "_QN4cell5Daisy4Lock8popCloseEv", cellDaisyLock_popClose);
|
||||
REG_FNID(cellDaisy, "_ZN4cell5Daisy4Lock18getNextTailPointerEv", cellDaisyLock_getNextTailPointer);
|
||||
REG_FNID(cellDaisy, "_QN4cell5Daisy4Lock18getNextTailPointerEv", cellDaisyLock_getNextTailPointer);
|
||||
REG_FNID(cellDaisy, "_ZN4cell5Daisy4Lock8pushOpenEv", cellDaisyLock_pushOpen);
|
||||
REG_FNID(cellDaisy, "_QN4cell5Daisy4Lock8pushOpenEv", cellDaisyLock_pushOpen);
|
||||
REG_FNID(cellDaisy, "_ZN4cell5Daisy4Lock9pushCloseEv", cellDaisyLock_pushClose);
|
||||
REG_FNID(cellDaisy, "_QN4cell5Daisy4Lock9pushCloseEv", cellDaisyLock_pushClose);
|
||||
REG_FNID(cellDaisy, "_ZN4cell5Daisy4Lock15completeConsumeEj", cellDaisyLock_completeConsume);
|
||||
REG_FNID(cellDaisy, "_QN4cell5Daisy4Lock15completeConsumeEj", cellDaisyLock_completeConsume);
|
||||
|
||||
REG_FNID(cellDaisy, "_ZN4cell5Daisy22ScatterGatherInterlockC1EPVNS0_16_AtomicInterlockEjPjjh", cellDaisyScatterGatherInterlock_1);
|
||||
REG_FNID(cellDaisy, "_QN4cell5Daisy22ScatterGatherInterlockC1EPVNS0_16_AtomicInterlockEjPjjh", cellDaisyScatterGatherInterlock_1);
|
||||
REG_FNID(cellDaisy, "_ZN4cell5Daisy22ScatterGatherInterlockC2EPVNS0_16_AtomicInterlockEjPjjh", cellDaisyScatterGatherInterlock_1);
|
||||
REG_FNID(cellDaisy, "_QN4cell5Daisy22ScatterGatherInterlockC2EPVNS0_16_AtomicInterlockEjPjjh", cellDaisyScatterGatherInterlock_1);
|
||||
REG_FNID(cellDaisy, "_ZN4cell5Daisy22ScatterGatherInterlockC1EPVNS0_16_AtomicInterlockEjPvPFiS5_jE", cellDaisyScatterGatherInterlock_2);
|
||||
REG_FNID(cellDaisy, "_QN4cell5Daisy22ScatterGatherInterlockC1EPVNS0_16_AtomicInterlockEjPvPFiS5_jE", cellDaisyScatterGatherInterlock_2);
|
||||
REG_FNID(cellDaisy, "_QN4cell5Daisy22ScatterGatherInterlockC2EPVNS0_16_AtomicInterlockEjPvPFiS5_jE", cellDaisyScatterGatherInterlock_2);
|
||||
REG_FNID(cellDaisy, "_ZN4cell5Daisy22ScatterGatherInterlockC2EPVNS0_16_AtomicInterlockEjPvPFiS5_jE", cellDaisyScatterGatherInterlock_2);
|
||||
REG_FNID(cellDaisy, "_ZN4cell5Daisy22ScatterGatherInterlockD2Ev", cellDaisyScatterGatherInterlock_9tor);
|
||||
REG_FNID(cellDaisy, "_QN4cell5Daisy22ScatterGatherInterlockD2Ev", cellDaisyScatterGatherInterlock_9tor);
|
||||
REG_FNID(cellDaisy, "_ZN4cell5Daisy22ScatterGatherInterlockD1Ev", cellDaisyScatterGatherInterlock_9tor);
|
||||
REG_FNID(cellDaisy, "_QN4cell5Daisy22ScatterGatherInterlockD1Ev", cellDaisyScatterGatherInterlock_9tor);
|
||||
REG_FNID(cellDaisy, "_ZN4cell5Daisy22ScatterGatherInterlock7releaseEv", cellDaisyScatterGatherInterlock_release);
|
||||
REG_FNID(cellDaisy, "_QN4cell5Daisy22ScatterGatherInterlock7releaseEv", cellDaisyScatterGatherInterlock_release);
|
||||
REG_FNID(cellDaisy, "_ZN4cell5Daisy22ScatterGatherInterlock21proceedSequenceNumberEv", cellDaisyScatterGatherInterlock_proceedSequenceNumber);
|
||||
REG_FNID(cellDaisy, "_QN4cell5Daisy22ScatterGatherInterlock21proceedSequenceNumberEv", cellDaisyScatterGatherInterlock_proceedSequenceNumber);
|
||||
REG_FNID(cellDaisy, "_ZN4cell5Daisy22ScatterGatherInterlock5probeEj", cellDaisyScatterGatherInterlock_probe);
|
||||
REG_FNID(cellDaisy, "_QN4cell5Daisy22ScatterGatherInterlock5probeEj", cellDaisyScatterGatherInterlock_probe);
|
||||
});
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
|
||||
#include <thread>
|
||||
|
||||
logs::channel cellDmux("cellDmux", logs::level::notice);
|
||||
logs::channel cellDmux("cellDmux");
|
||||
|
||||
/* Demuxer Thread Classes */
|
||||
|
||||
|
||||
@@ -4,77 +4,216 @@
|
||||
|
||||
#include "cellFiber.h"
|
||||
|
||||
logs::channel cellFiber("cellFiber", logs::level::notice);
|
||||
logs::channel cellFiber("cellFiber");
|
||||
|
||||
s32 _cellFiberPpuInitialize()
|
||||
template <>
|
||||
void fmt_class_string<CellFiberError>::format(std::string& out, u64 arg)
|
||||
{
|
||||
UNIMPLEMENTED_FUNC(cellFiber);
|
||||
format_enum(out, arg, [](CellFiberError value)
|
||||
{
|
||||
switch (value)
|
||||
{
|
||||
STR_CASE(CELL_FIBER_ERROR_AGAIN);
|
||||
STR_CASE(CELL_FIBER_ERROR_INVAL);
|
||||
STR_CASE(CELL_FIBER_ERROR_NOMEM);
|
||||
STR_CASE(CELL_FIBER_ERROR_DEADLK);
|
||||
STR_CASE(CELL_FIBER_ERROR_PERM);
|
||||
STR_CASE(CELL_FIBER_ERROR_BUSY);
|
||||
STR_CASE(CELL_FIBER_ERROR_ABORT);
|
||||
STR_CASE(CELL_FIBER_ERROR_STAT);
|
||||
STR_CASE(CELL_FIBER_ERROR_ALIGN);
|
||||
STR_CASE(CELL_FIBER_ERROR_NULL_POINTER);
|
||||
STR_CASE(CELL_FIBER_ERROR_NOSYSINIT);
|
||||
}
|
||||
|
||||
return unknown;
|
||||
});
|
||||
}
|
||||
|
||||
error_code _cellFiberPpuInitialize()
|
||||
{
|
||||
cellFiber.todo("_cellFiberPpuInitialize()");
|
||||
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
s32 _cellFiberPpuSchedulerAttributeInitialize()
|
||||
error_code _cellFiberPpuSchedulerAttributeInitialize(vm::ptr<CellFiberPpuSchedulerAttribute> attr, u32 sdkVersion)
|
||||
{
|
||||
UNIMPLEMENTED_FUNC(cellFiber);
|
||||
cellFiber.warning("_cellFiberPpuSchedulerAttributeInitialize(attr=*0x%x, sdkVersion=0x%x)", attr, sdkVersion);
|
||||
|
||||
if (!attr)
|
||||
{
|
||||
return CELL_FIBER_ERROR_NULL_POINTER;
|
||||
}
|
||||
|
||||
if (!attr.aligned())
|
||||
{
|
||||
return CELL_FIBER_ERROR_ALIGN;
|
||||
}
|
||||
|
||||
memset(attr.get_ptr(), 0, sizeof(CellFiberPpuSchedulerAttribute));
|
||||
attr->autoCheckFlags = false;
|
||||
attr->autoCheckFlagsIntervalUsec = 0;
|
||||
attr->debuggerSupport = false;
|
||||
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
s32 cellFiberPpuInitializeScheduler()
|
||||
error_code cellFiberPpuInitializeScheduler(vm::ptr<CellFiberPpuScheduler> scheduler, vm::ptr<CellFiberPpuSchedulerAttribute> attr)
|
||||
{
|
||||
UNIMPLEMENTED_FUNC(cellFiber);
|
||||
cellFiber.todo("cellFiberPpuInitializeScheduler(scheduler=*0x%x, attr=*0x%x)", scheduler, attr);
|
||||
|
||||
if (!scheduler)
|
||||
{
|
||||
return CELL_FIBER_ERROR_NULL_POINTER;
|
||||
}
|
||||
|
||||
if (!scheduler.aligned())
|
||||
{
|
||||
return CELL_FIBER_ERROR_ALIGN;
|
||||
}
|
||||
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
s32 cellFiberPpuFinalizeScheduler()
|
||||
error_code cellFiberPpuFinalizeScheduler(vm::ptr<CellFiberPpuScheduler> scheduler)
|
||||
{
|
||||
UNIMPLEMENTED_FUNC(cellFiber);
|
||||
cellFiber.todo("cellFiberPpuFinalizeScheduler(scheduler=*0x%x)", scheduler);
|
||||
|
||||
if (!scheduler)
|
||||
{
|
||||
return CELL_FIBER_ERROR_NULL_POINTER;
|
||||
}
|
||||
|
||||
if (!scheduler.aligned())
|
||||
{
|
||||
return CELL_FIBER_ERROR_ALIGN;
|
||||
}
|
||||
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
s32 cellFiberPpuRunFibers()
|
||||
error_code cellFiberPpuRunFibers(vm::ptr<CellFiberPpuScheduler> scheduler)
|
||||
{
|
||||
UNIMPLEMENTED_FUNC(cellFiber);
|
||||
cellFiber.todo("cellFiberPpuRunFibers(scheduler=*0x%x)", scheduler);
|
||||
|
||||
if (!scheduler)
|
||||
{
|
||||
return CELL_FIBER_ERROR_NULL_POINTER;
|
||||
}
|
||||
|
||||
if (!scheduler.aligned())
|
||||
{
|
||||
return CELL_FIBER_ERROR_ALIGN;
|
||||
}
|
||||
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
s32 cellFiberPpuCheckFlags()
|
||||
error_code cellFiberPpuCheckFlags(vm::ptr<CellFiberPpuScheduler> scheduler)
|
||||
{
|
||||
UNIMPLEMENTED_FUNC(cellFiber);
|
||||
cellFiber.todo("cellFiberPpuCheckFlags(scheduler=*0x%x)", scheduler);
|
||||
|
||||
if (!scheduler)
|
||||
{
|
||||
return CELL_FIBER_ERROR_NULL_POINTER;
|
||||
}
|
||||
|
||||
if (!scheduler.aligned())
|
||||
{
|
||||
return CELL_FIBER_ERROR_ALIGN;
|
||||
}
|
||||
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
s32 cellFiberPpuHasRunnableFiber()
|
||||
error_code cellFiberPpuHasRunnableFiber(vm::ptr<CellFiberPpuScheduler> scheduler, vm::ptr<b8> flag)
|
||||
{
|
||||
UNIMPLEMENTED_FUNC(cellFiber);
|
||||
cellFiber.todo("cellFiberPpuHasRunnableFiber(scheduler=*0x%x, flag=*0x%x)", scheduler, flag);
|
||||
|
||||
if (!scheduler || !flag)
|
||||
{
|
||||
return CELL_FIBER_ERROR_NULL_POINTER;
|
||||
}
|
||||
|
||||
if (!scheduler.aligned())
|
||||
{
|
||||
return CELL_FIBER_ERROR_ALIGN;
|
||||
}
|
||||
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
s32 _cellFiberPpuAttributeInitialize()
|
||||
error_code _cellFiberPpuAttributeInitialize(vm::ptr<CellFiberPpuAttribute> attr, u32 sdkVersion)
|
||||
{
|
||||
UNIMPLEMENTED_FUNC(cellFiber);
|
||||
cellFiber.warning("_cellFiberPpuAttributeInitialize(attr=*0x%x, sdkVersion=0x%x)", attr, sdkVersion);
|
||||
|
||||
if (!attr)
|
||||
{
|
||||
return CELL_FIBER_ERROR_NULL_POINTER;
|
||||
}
|
||||
|
||||
if (!attr.aligned())
|
||||
{
|
||||
return CELL_FIBER_ERROR_ALIGN;
|
||||
}
|
||||
|
||||
memset(attr.get_ptr(), 0, sizeof(CellFiberPpuAttribute));
|
||||
attr->onExitCallback = vm::null;
|
||||
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
s32 cellFiberPpuCreateFiber()
|
||||
error_code cellFiberPpuCreateFiber(vm::ptr<CellFiberPpuScheduler> scheduler, vm::ptr<CellFiberPpu> fiber, vm::ptr<CellFiberPpuEntry> entry, u64 arg, u32 priority, vm::ptr<void> eaStack, u32 sizeStack, vm::cptr<CellFiberPpuAttribute> attr)
|
||||
{
|
||||
UNIMPLEMENTED_FUNC(cellFiber);
|
||||
cellFiber.todo("cellFiberPpuCreateFiber(scheduler=*0x%x, fiber=*0x%x, entry=*0x%x, arg=0x%x, priority=%d, eaStack=*0x%x, sizeStack=0x%x, attr=*0x%x)", scheduler, fiber, entry, arg, priority, eaStack, sizeStack, attr);
|
||||
|
||||
if (!scheduler || !fiber || !entry || !eaStack)
|
||||
{
|
||||
return CELL_FIBER_ERROR_NULL_POINTER;
|
||||
}
|
||||
|
||||
if (!scheduler.aligned() || !fiber.aligned())
|
||||
{
|
||||
return CELL_FIBER_ERROR_ALIGN;
|
||||
}
|
||||
|
||||
if (priority > 3)
|
||||
{
|
||||
return CELL_FIBER_ERROR_INVAL;
|
||||
}
|
||||
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
s32 cellFiberPpuExit()
|
||||
error_code cellFiberPpuExit(s32 status)
|
||||
{
|
||||
UNIMPLEMENTED_FUNC(cellFiber);
|
||||
cellFiber.todo("cellFiberPpuExit(status=%d)", status);
|
||||
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
s32 cellFiberPpuYield()
|
||||
error_code cellFiberPpuYield()
|
||||
{
|
||||
UNIMPLEMENTED_FUNC(cellFiber);
|
||||
cellFiber.todo("cellFiberPpuYield()");
|
||||
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
s32 cellFiberPpuJoinFiber()
|
||||
error_code cellFiberPpuJoinFiber(vm::ptr<CellFiberPpu> fiber, vm::ptr<s32> status)
|
||||
{
|
||||
UNIMPLEMENTED_FUNC(cellFiber);
|
||||
cellFiber.todo("cellFiberPpuJoinFiber(fiber=*0x%x, status=*0x%x)", fiber, status);
|
||||
|
||||
if (!fiber || !status)
|
||||
{
|
||||
return CELL_FIBER_ERROR_NULL_POINTER;
|
||||
}
|
||||
|
||||
if (!fiber.aligned())
|
||||
{
|
||||
return CELL_FIBER_ERROR_ALIGN;
|
||||
}
|
||||
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
@@ -86,207 +225,499 @@ vm::ptr<void> cellFiberPpuSelf()
|
||||
return vm::null;
|
||||
}
|
||||
|
||||
s32 cellFiberPpuSendSignal()
|
||||
error_code cellFiberPpuSendSignal(vm::ptr<CellFiberPpu> fiber, vm::ptr<u32> numWorker)
|
||||
{
|
||||
UNIMPLEMENTED_FUNC(cellFiber);
|
||||
cellFiber.todo("cellFiberPpuSendSignal(fiber=*0x%x, numWorker=*0x%x)", fiber, numWorker);
|
||||
|
||||
if (!fiber)
|
||||
{
|
||||
return CELL_FIBER_ERROR_NULL_POINTER;
|
||||
}
|
||||
|
||||
if (!fiber.aligned())
|
||||
{
|
||||
return CELL_FIBER_ERROR_ALIGN;
|
||||
}
|
||||
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
s32 cellFiberPpuWaitSignal()
|
||||
error_code cellFiberPpuWaitSignal()
|
||||
{
|
||||
UNIMPLEMENTED_FUNC(cellFiber);
|
||||
cellFiber.todo("cellFiberPpuWaitSignal()");
|
||||
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
s32 cellFiberPpuWaitFlag()
|
||||
error_code cellFiberPpuWaitFlag(vm::ptr<u32> eaFlag, b8 flagValue)
|
||||
{
|
||||
UNIMPLEMENTED_FUNC(cellFiber);
|
||||
cellFiber.todo("cellFiberPpuWaitFlag(eaFlag=*0x%x, flagValue=%d)", eaFlag, flagValue);
|
||||
|
||||
if (!eaFlag)
|
||||
{
|
||||
return CELL_FIBER_ERROR_NULL_POINTER;
|
||||
}
|
||||
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
s32 cellFiberPpuGetScheduler()
|
||||
error_code cellFiberPpuGetScheduler(vm::ptr<CellFiberPpu> fiber, vm::pptr<CellFiberPpuScheduler> pScheduler)
|
||||
{
|
||||
UNIMPLEMENTED_FUNC(cellFiber);
|
||||
cellFiber.todo("cellFiberPpuGetScheduler(fiber=*0x%x, pScheduler=**0x%x)", fiber, pScheduler);
|
||||
|
||||
if (!fiber || !pScheduler)
|
||||
{
|
||||
return CELL_FIBER_ERROR_NULL_POINTER;
|
||||
}
|
||||
|
||||
if (!fiber.aligned())
|
||||
{
|
||||
return CELL_FIBER_ERROR_ALIGN;
|
||||
}
|
||||
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
s32 cellFiberPpuSetPriority()
|
||||
error_code cellFiberPpuSetPriority(u32 priority)
|
||||
{
|
||||
UNIMPLEMENTED_FUNC(cellFiber);
|
||||
cellFiber.todo("cellFiberPpuSetPriority(priority=%d)", priority);
|
||||
|
||||
if (priority > 3)
|
||||
{
|
||||
return CELL_FIBER_ERROR_INVAL;
|
||||
}
|
||||
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
s32 cellFiberPpuCheckStackLimit()
|
||||
error_code cellFiberPpuCheckStackLimit()
|
||||
{
|
||||
UNIMPLEMENTED_FUNC(cellFiber);
|
||||
cellFiber.todo("cellFiberPpuCheckStackLimit()");
|
||||
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
s32 _cellFiberPpuContextAttributeInitialize()
|
||||
error_code _cellFiberPpuContextAttributeInitialize(vm::ptr<CellFiberPpuContextAttribute> attr, u32 sdkVersion)
|
||||
{
|
||||
UNIMPLEMENTED_FUNC(cellFiber);
|
||||
cellFiber.warning("_cellFiberPpuContextAttributeInitialize(attr=*0x%x, sdkVersion=0x%x)", attr, sdkVersion);
|
||||
|
||||
if (!attr)
|
||||
{
|
||||
return CELL_FIBER_ERROR_NULL_POINTER;
|
||||
}
|
||||
|
||||
if (!attr.aligned())
|
||||
{
|
||||
return CELL_FIBER_ERROR_ALIGN;
|
||||
}
|
||||
|
||||
memset(attr.get_ptr(), 0, sizeof(CellFiberPpuContextAttribute));
|
||||
attr->debuggerSupport = false;
|
||||
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
s32 cellFiberPpuContextInitialize()
|
||||
error_code cellFiberPpuContextInitialize(vm::ptr<CellFiberPpuContext> context, vm::ptr<CellFiberPpuContextEntry> entry, u64 arg, vm::ptr<void> eaStack, u32 sizeStack, vm::cptr<CellFiberPpuContextAttribute> attr)
|
||||
{
|
||||
UNIMPLEMENTED_FUNC(cellFiber);
|
||||
cellFiber.todo("cellFiberPpuContextInitialize(context=*0x%x, entry=*0x%x, arg=0x%x, eaStack=*0x%x, sizeStack=0x%x, attr=*0x%x)", context, entry, arg, eaStack, sizeStack, attr);
|
||||
|
||||
if (!context || !entry || !eaStack)
|
||||
{
|
||||
return CELL_FIBER_ERROR_NULL_POINTER;
|
||||
}
|
||||
|
||||
if (!context.aligned())
|
||||
{
|
||||
return CELL_FIBER_ERROR_ALIGN;
|
||||
}
|
||||
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
s32 cellFiberPpuContextFinalize()
|
||||
error_code cellFiberPpuContextFinalize(vm::ptr<CellFiberPpuContext> context)
|
||||
{
|
||||
UNIMPLEMENTED_FUNC(cellFiber);
|
||||
cellFiber.todo("cellFiberPpuContextFinalize(context=*0x%x)", context);
|
||||
|
||||
if (!context)
|
||||
{
|
||||
return CELL_FIBER_ERROR_NULL_POINTER;
|
||||
}
|
||||
|
||||
if (!context.aligned())
|
||||
{
|
||||
return CELL_FIBER_ERROR_ALIGN;
|
||||
}
|
||||
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
s32 cellFiberPpuContextRun()
|
||||
error_code cellFiberPpuContextRun(vm::ptr<CellFiberPpuContext> context, vm::ptr<s32> cause, vm::pptr<CellFiberPpuContext> fiberFrom, vm::cptr<CellFiberPpuContextExecutionOption> option)
|
||||
{
|
||||
UNIMPLEMENTED_FUNC(cellFiber);
|
||||
cellFiber.todo("cellFiberPpuContextRun(context=*0x%x, cause=*0x%x, fiberFrom=**0x%x, option=*0x%x)", context, cause, fiberFrom, option);
|
||||
|
||||
if (!context || !cause)
|
||||
{
|
||||
return CELL_FIBER_ERROR_NULL_POINTER;
|
||||
}
|
||||
|
||||
if (!context.aligned())
|
||||
{
|
||||
return CELL_FIBER_ERROR_ALIGN;
|
||||
}
|
||||
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
s32 cellFiberPpuContextSwitch()
|
||||
error_code cellFiberPpuContextSwitch(vm::ptr<CellFiberPpuContext> context, vm::pptr<CellFiberPpuContext> fiberFrom, vm::cptr<CellFiberPpuContextExecutionOption> option)
|
||||
{
|
||||
UNIMPLEMENTED_FUNC(cellFiber);
|
||||
cellFiber.todo("cellFiberPpuContextSwitch(context=*0x%x, fiberFrom=**0x%x, option=*0x%x)", context, fiberFrom, option);
|
||||
|
||||
if (!context)
|
||||
{
|
||||
return CELL_FIBER_ERROR_NULL_POINTER;
|
||||
}
|
||||
|
||||
if (!context.aligned())
|
||||
{
|
||||
return CELL_FIBER_ERROR_ALIGN;
|
||||
}
|
||||
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
s32 cellFiberPpuContextSelf()
|
||||
vm::ptr<CellFiberPpuContext> cellFiberPpuContextSelf()
|
||||
{
|
||||
UNIMPLEMENTED_FUNC(cellFiber);
|
||||
cellFiber.todo("cellFiberPpuContextSelf()");
|
||||
|
||||
return vm::null;
|
||||
}
|
||||
|
||||
error_code cellFiberPpuContextReturnToThread(s32 cause)
|
||||
{
|
||||
cellFiber.todo("cellFiberPpuContextReturnToThread(cause=%d)", cause);
|
||||
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
s32 cellFiberPpuContextReturnToThread()
|
||||
error_code cellFiberPpuContextCheckStackLimit()
|
||||
{
|
||||
UNIMPLEMENTED_FUNC(cellFiber);
|
||||
cellFiber.todo("cellFiberPpuContextCheckStackLimit()");
|
||||
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
s32 cellFiberPpuContextCheckStackLimit()
|
||||
error_code cellFiberPpuContextRunScheduler(vm::ptr<CellFiberPpuSchedulerCallback> scheduler, u64 arg0, u64 arg1, vm::ptr<s32> cause, vm::pptr<CellFiberPpuContext> fiberFrom, vm::cptr<CellFiberPpuContextExecutionOption> option)
|
||||
{
|
||||
UNIMPLEMENTED_FUNC(cellFiber);
|
||||
cellFiber.todo("cellFiberPpuContextRunScheduler(scheduler=*0x%x, arg0=0x%x, arg1=0x%x, cause=*0x%x, fiberFrom=**0x%x, option=*0x%x)", scheduler, arg0, arg1, cause, fiberFrom, option);
|
||||
|
||||
if (!scheduler || !cause)
|
||||
{
|
||||
return CELL_FIBER_ERROR_NULL_POINTER;
|
||||
}
|
||||
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
s32 cellFiberPpuContextRunScheduler()
|
||||
error_code cellFiberPpuContextEnterScheduler(vm::ptr<CellFiberPpuSchedulerCallback> scheduler, u64 arg0, u64 arg1, vm::pptr<CellFiberPpuContext> fiberFrom, vm::cptr<CellFiberPpuContextExecutionOption> option)
|
||||
{
|
||||
UNIMPLEMENTED_FUNC(cellFiber);
|
||||
cellFiber.todo("cellFiberPpuContextEnterScheduler(scheduler=*0x%x, arg0=0x%x, arg1=0x%x, fiberFrom=**0x%x, option=*0x%x)", scheduler, arg0, arg1, fiberFrom, option);
|
||||
|
||||
if (!scheduler)
|
||||
{
|
||||
return CELL_FIBER_ERROR_NULL_POINTER;
|
||||
}
|
||||
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
s32 cellFiberPpuContextEnterScheduler()
|
||||
error_code cellFiberPpuSchedulerTraceInitialize(vm::ptr<CellFiberPpuScheduler> scheduler, vm::ptr<void> buffer, u32 size, u32 mode)
|
||||
{
|
||||
UNIMPLEMENTED_FUNC(cellFiber);
|
||||
cellFiber.todo("cellFiberPpuSchedulerTraceInitialize(scheduler=*0x%x, buffer=*0x%x, size=0x%x, mode=0x%x)", scheduler, buffer, size, mode);
|
||||
|
||||
if (!scheduler || !buffer)
|
||||
{
|
||||
return CELL_FIBER_ERROR_NULL_POINTER;
|
||||
}
|
||||
|
||||
if (!scheduler.aligned())
|
||||
{
|
||||
return CELL_FIBER_ERROR_ALIGN;
|
||||
}
|
||||
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
s32 cellFiberPpuSchedulerTraceInitialize()
|
||||
error_code cellFiberPpuSchedulerTraceFinalize(vm::ptr<CellFiberPpuScheduler> scheduler)
|
||||
{
|
||||
UNIMPLEMENTED_FUNC(cellFiber);
|
||||
cellFiber.todo("cellFiberPpuSchedulerTraceFinalize(scheduler=*0x%x)", scheduler);
|
||||
|
||||
if (!scheduler)
|
||||
{
|
||||
return CELL_FIBER_ERROR_NULL_POINTER;
|
||||
}
|
||||
|
||||
if (!scheduler.aligned())
|
||||
{
|
||||
return CELL_FIBER_ERROR_ALIGN;
|
||||
}
|
||||
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
s32 cellFiberPpuSchedulerTraceFinalize()
|
||||
error_code cellFiberPpuSchedulerTraceStart(vm::ptr<CellFiberPpuScheduler> scheduler)
|
||||
{
|
||||
UNIMPLEMENTED_FUNC(cellFiber);
|
||||
cellFiber.todo("cellFiberPpuSchedulerTraceStart(scheduler=*0x%x)", scheduler);
|
||||
|
||||
if (!scheduler)
|
||||
{
|
||||
return CELL_FIBER_ERROR_NULL_POINTER;
|
||||
}
|
||||
|
||||
if (!scheduler.aligned())
|
||||
{
|
||||
return CELL_FIBER_ERROR_ALIGN;
|
||||
}
|
||||
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
s32 cellFiberPpuSchedulerTraceStart()
|
||||
error_code cellFiberPpuSchedulerTraceStop(vm::ptr<CellFiberPpuScheduler> scheduler)
|
||||
{
|
||||
UNIMPLEMENTED_FUNC(cellFiber);
|
||||
cellFiber.todo("cellFiberPpuSchedulerTraceStop(scheduler=*0x%x)", scheduler);
|
||||
|
||||
if (!scheduler)
|
||||
{
|
||||
return CELL_FIBER_ERROR_NULL_POINTER;
|
||||
}
|
||||
|
||||
if (!scheduler.aligned())
|
||||
{
|
||||
return CELL_FIBER_ERROR_ALIGN;
|
||||
}
|
||||
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
s32 cellFiberPpuSchedulerTraceStop()
|
||||
error_code _cellFiberPpuUtilWorkerControlAttributeInitialize(vm::ptr<CellFiberPpuUtilWorkerControlAttribute> attr, u32 sdkVersion)
|
||||
{
|
||||
UNIMPLEMENTED_FUNC(cellFiber);
|
||||
cellFiber.warning("_cellFiberPpuUtilWorkerControlAttributeInitialize(attr=*0x%x, sdkVersion=0x%x)", attr, sdkVersion);
|
||||
|
||||
if (!attr)
|
||||
{
|
||||
return CELL_FIBER_ERROR_NULL_POINTER;
|
||||
}
|
||||
|
||||
if (!attr.aligned())
|
||||
{
|
||||
return CELL_FIBER_ERROR_ALIGN;
|
||||
}
|
||||
|
||||
memset(attr.get_ptr(), 0, sizeof(CellFiberPpuUtilWorkerControlAttribute));
|
||||
attr->scheduler.autoCheckFlags = false;
|
||||
attr->scheduler.autoCheckFlagsIntervalUsec = 0;
|
||||
attr->scheduler.debuggerSupport = false;
|
||||
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
s32 _cellFiberPpuUtilWorkerControlAttributeInitialize()
|
||||
error_code cellFiberPpuUtilWorkerControlRunFibers(vm::ptr<CellFiberPpuUtilWorkerControl> control)
|
||||
{
|
||||
UNIMPLEMENTED_FUNC(cellFiber);
|
||||
cellFiber.todo("cellFiberPpuUtilWorkerControlRunFibers(control=*0x%x)", control);
|
||||
|
||||
if (!control)
|
||||
{
|
||||
return CELL_FIBER_ERROR_NULL_POINTER;
|
||||
}
|
||||
|
||||
if (!control.aligned())
|
||||
{
|
||||
return CELL_FIBER_ERROR_ALIGN;
|
||||
}
|
||||
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
s32 cellFiberPpuUtilWorkerControlRunFibers()
|
||||
error_code cellFiberPpuUtilWorkerControlInitialize(vm::ptr<CellFiberPpuUtilWorkerControl> control)
|
||||
{
|
||||
UNIMPLEMENTED_FUNC(cellFiber);
|
||||
cellFiber.todo("cellFiberPpuUtilWorkerControlInitialize(control=*0x%x)", control);
|
||||
|
||||
if (!control)
|
||||
{
|
||||
return CELL_FIBER_ERROR_NULL_POINTER;
|
||||
}
|
||||
|
||||
if (!control.aligned())
|
||||
{
|
||||
return CELL_FIBER_ERROR_ALIGN;
|
||||
}
|
||||
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
s32 cellFiberPpuUtilWorkerControlInitialize()
|
||||
error_code cellFiberPpuUtilWorkerControlSetPollingMode(vm::ptr<CellFiberPpuUtilWorkerControl> control, s32 mode, s32 timeout)
|
||||
{
|
||||
UNIMPLEMENTED_FUNC(cellFiber);
|
||||
cellFiber.todo("cellFiberPpuUtilWorkerControlSetPollingMode(control=*0x%x, mode=%d, timeout=%d)", control, mode, timeout);
|
||||
|
||||
if (!control)
|
||||
{
|
||||
return CELL_FIBER_ERROR_NULL_POINTER;
|
||||
}
|
||||
|
||||
if (!control.aligned())
|
||||
{
|
||||
return CELL_FIBER_ERROR_ALIGN;
|
||||
}
|
||||
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
s32 cellFiberPpuUtilWorkerControlSetPollingMode()
|
||||
error_code cellFiberPpuUtilWorkerControlJoinFiber(vm::ptr<CellFiberPpuUtilWorkerControl> control, vm::ptr<CellFiberPpu> fiber, vm::ptr<s32> exitCode)
|
||||
{
|
||||
UNIMPLEMENTED_FUNC(cellFiber);
|
||||
cellFiber.todo("cellFiberPpuUtilWorkerControlJoinFiber(control=*0x%x, fiber=*0x%x, exitCode=*0x%x)", control, fiber, exitCode);
|
||||
|
||||
if (!control)
|
||||
{
|
||||
return CELL_FIBER_ERROR_NULL_POINTER;
|
||||
}
|
||||
|
||||
if (!control.aligned())
|
||||
{
|
||||
return CELL_FIBER_ERROR_ALIGN;
|
||||
}
|
||||
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
s32 cellFiberPpuUtilWorkerControlJoinFiber()
|
||||
error_code cellFiberPpuUtilWorkerControlDisconnectEventQueue()
|
||||
{
|
||||
UNIMPLEMENTED_FUNC(cellFiber);
|
||||
cellFiber.todo("cellFiberPpuUtilWorkerControlDisconnectEventQueue()");
|
||||
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
s32 cellFiberPpuUtilWorkerControlDisconnectEventQueue()
|
||||
error_code cellFiberPpuUtilWorkerControlSendSignal(vm::ptr<CellFiberPpu> fiber, vm::ptr<u32> numWorker)
|
||||
{
|
||||
UNIMPLEMENTED_FUNC(cellFiber);
|
||||
cellFiber.todo("cellFiberPpuUtilWorkerControlSendSignal(fiber=*0x%x, numWorker=*0x%x)", fiber, numWorker);
|
||||
|
||||
if (!fiber)
|
||||
{
|
||||
return CELL_FIBER_ERROR_NULL_POINTER;
|
||||
}
|
||||
|
||||
if (!fiber.aligned())
|
||||
{
|
||||
return CELL_FIBER_ERROR_ALIGN;
|
||||
}
|
||||
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
s32 cellFiberPpuUtilWorkerControlSendSignal()
|
||||
error_code cellFiberPpuUtilWorkerControlConnectEventQueueToSpurs()
|
||||
{
|
||||
UNIMPLEMENTED_FUNC(cellFiber);
|
||||
cellFiber.todo("cellFiberPpuUtilWorkerControlConnectEventQueueToSpurs()");
|
||||
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
s32 cellFiberPpuUtilWorkerControlConnectEventQueueToSpurs()
|
||||
error_code cellFiberPpuUtilWorkerControlFinalize(vm::ptr<CellFiberPpuUtilWorkerControl> control)
|
||||
{
|
||||
UNIMPLEMENTED_FUNC(cellFiber);
|
||||
cellFiber.todo("cellFiberPpuUtilWorkerControlFinalize(control=*0x%x)", control);
|
||||
|
||||
if (!control)
|
||||
{
|
||||
return CELL_FIBER_ERROR_NULL_POINTER;
|
||||
}
|
||||
|
||||
if (!control.aligned())
|
||||
{
|
||||
return CELL_FIBER_ERROR_ALIGN;
|
||||
}
|
||||
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
s32 cellFiberPpuUtilWorkerControlFinalize()
|
||||
error_code cellFiberPpuUtilWorkerControlWakeup(vm::ptr<CellFiberPpuUtilWorkerControl> control)
|
||||
{
|
||||
UNIMPLEMENTED_FUNC(cellFiber);
|
||||
cellFiber.todo("cellFiberPpuUtilWorkerControlWakeup(control=*0x%x)", control);
|
||||
|
||||
if (!control)
|
||||
{
|
||||
return CELL_FIBER_ERROR_NULL_POINTER;
|
||||
}
|
||||
|
||||
if (!control.aligned())
|
||||
{
|
||||
return CELL_FIBER_ERROR_ALIGN;
|
||||
}
|
||||
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
s32 cellFiberPpuUtilWorkerControlWakeup()
|
||||
error_code cellFiberPpuUtilWorkerControlCreateFiber(vm::ptr<CellFiberPpuUtilWorkerControl> control, vm::ptr<CellFiberPpu> fiber, vm::ptr<CellFiberPpuEntry> entry, u64 arg, u32 priority, vm::ptr<void> eaStack, u32 sizeStack, vm::cptr<CellFiberPpuAttribute> attr)
|
||||
{
|
||||
UNIMPLEMENTED_FUNC(cellFiber);
|
||||
cellFiber.todo("cellFiberPpuUtilWorkerControlCreateFiber(control=*0x%x, fiber=*0x%x, entry=*0x%x, arg=0x%x, priority=%d, eaStack=*0x%x, sizeStack=0x%x, attr=*0x%x)", control, fiber, entry, arg, priority, eaStack, sizeStack, attr);
|
||||
|
||||
if (!control)
|
||||
{
|
||||
return CELL_FIBER_ERROR_NULL_POINTER;
|
||||
}
|
||||
|
||||
if (!control.aligned())
|
||||
{
|
||||
return CELL_FIBER_ERROR_ALIGN;
|
||||
}
|
||||
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
s32 cellFiberPpuUtilWorkerControlCreateFiber()
|
||||
error_code cellFiberPpuUtilWorkerControlShutdown(vm::ptr<CellFiberPpuUtilWorkerControl> control)
|
||||
{
|
||||
UNIMPLEMENTED_FUNC(cellFiber);
|
||||
cellFiber.todo("cellFiberPpuUtilWorkerControlShutdown(control=*0x%x)", control);
|
||||
|
||||
if (!control)
|
||||
{
|
||||
return CELL_FIBER_ERROR_NULL_POINTER;
|
||||
}
|
||||
|
||||
if (!control.aligned())
|
||||
{
|
||||
return CELL_FIBER_ERROR_ALIGN;
|
||||
}
|
||||
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
s32 cellFiberPpuUtilWorkerControlShutdown()
|
||||
error_code cellFiberPpuUtilWorkerControlCheckFlags(vm::ptr<CellFiberPpuUtilWorkerControl> control, b8 wakingUp)
|
||||
{
|
||||
UNIMPLEMENTED_FUNC(cellFiber);
|
||||
cellFiber.todo("cellFiberPpuUtilWorkerControlCheckFlags(control=*0x%x, wakingUp=%d)", control, wakingUp);
|
||||
|
||||
if (!control)
|
||||
{
|
||||
return CELL_FIBER_ERROR_NULL_POINTER;
|
||||
}
|
||||
|
||||
if (!control.aligned())
|
||||
{
|
||||
return CELL_FIBER_ERROR_ALIGN;
|
||||
}
|
||||
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
s32 cellFiberPpuUtilWorkerControlCheckFlags()
|
||||
error_code cellFiberPpuUtilWorkerControlInitializeWithAttribute(vm::ptr<CellFiberPpuUtilWorkerControl> control, vm::ptr<CellFiberPpuUtilWorkerControlAttribute> attr)
|
||||
{
|
||||
UNIMPLEMENTED_FUNC(cellFiber);
|
||||
return CELL_OK;
|
||||
}
|
||||
cellFiber.todo("cellFiberPpuUtilWorkerControlInitializeWithAttribute(control=*0x%x, attr=*0x%x)", control, attr);
|
||||
|
||||
if (!control)
|
||||
{
|
||||
return CELL_FIBER_ERROR_NULL_POINTER;
|
||||
}
|
||||
|
||||
if (!control.aligned())
|
||||
{
|
||||
return CELL_FIBER_ERROR_ALIGN;
|
||||
}
|
||||
|
||||
s32 cellFiberPpuUtilWorkerControlInitializeWithAttribute()
|
||||
{
|
||||
UNIMPLEMENTED_FUNC(cellFiber);
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user