mirror of
https://github.com/PCSX2/pcsx2.git
synced 2026-01-31 01:15:24 +01:00
Compare commits
47 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
eec3951315 | ||
|
|
e5119e8ef2 | ||
|
|
4e6b6904cb | ||
|
|
4e1975ec80 | ||
|
|
43453b6f22 | ||
|
|
2e12b2ee0a | ||
|
|
be5e98b47f | ||
|
|
293b60a85c | ||
|
|
3e8c2ef9a9 | ||
|
|
213569f3d7 | ||
|
|
0edcdf91db | ||
|
|
8253207bd2 | ||
|
|
bc00be2ce5 | ||
|
|
89c7463eb5 | ||
|
|
93027c1e2e | ||
|
|
ee15846dd4 | ||
|
|
de03d2f672 | ||
|
|
ae33c3d991 | ||
|
|
61280a945d | ||
|
|
e82712bf52 | ||
|
|
06307abd03 | ||
|
|
daf735b047 | ||
|
|
f591c88aff | ||
|
|
ca47a08882 | ||
|
|
92adacf99e | ||
|
|
43e5ec25ab | ||
|
|
1018b75847 | ||
|
|
3871d1bd5d | ||
|
|
976d4a8dbb | ||
|
|
40b1b9b717 | ||
|
|
a3b817cb1f | ||
|
|
83e152cd21 | ||
|
|
50a9568d65 | ||
|
|
a33cbdee09 | ||
|
|
b02bcc5690 | ||
|
|
2e60a1d081 | ||
|
|
28da984b01 | ||
|
|
967987b25f | ||
|
|
e41f63b821 | ||
|
|
0f82503cf7 | ||
|
|
33f625a4e2 | ||
|
|
5b0c22c343 | ||
|
|
ea963ffd72 | ||
|
|
bd9dcbe441 | ||
|
|
2a1f29c641 | ||
|
|
38883e8df4 | ||
|
|
f971040912 |
@@ -26,7 +26,7 @@ LIBJPEGTURBO=3.1.2
|
||||
LIBPNG=1.6.53
|
||||
LIBWEBP=1.6.0
|
||||
NVENC=11.1.5.3
|
||||
SDL=SDL3-3.2.26
|
||||
SDL=SDL3-3.4.0
|
||||
QT=6.10.1
|
||||
QTAPNG=1.3.0
|
||||
LZ4=1.10.0
|
||||
@@ -54,7 +54,7 @@ fd6f417fe9e3a071cf1424a5152d926a34c4a3c5070745470be6cf12a404ed79 $LIBBACKTRACE.
|
||||
8f0012234b464ce50890c490f18194f913a7b1f4e6a03d6644179fa0f867d0cf libjpeg-turbo-$LIBJPEGTURBO.tar.gz
|
||||
1d3fb8ccc2932d04aa3663e22ef5ef490244370f4e568d7850165068778d98d4 libpng-$LIBPNG.tar.xz
|
||||
e4ab7009bf0629fd11982d4c2aa83964cf244cffba7347ecd39019a9e38c4564 libwebp-$LIBWEBP.tar.gz
|
||||
dad488474a51a0b01d547cd2834893d6299328d2e30f479a3564088b5476bae2 $SDL.tar.gz
|
||||
082cbf5f429e0d80820f68dc2b507a94d4cc1b4e70817b119bbb8ec6a69584b8 $SDL.tar.gz
|
||||
452a1a290bd0cf18737fad0057dc17b7fdf10a73eda2d6d4f31ba04fda25ef2c libpng-$LIBPNG-apng.patch.gz
|
||||
537512904744b35e232912055ccf8ec66d768639ff3abe5788d90d792ec5f48b lz4-$LZ4.tar.gz
|
||||
2974b91062197e0527dffa3aadd8fe3bfa6681ae45f5ff9181bc0ca6479abd59 nv-codec-headers-$NVENC.tar.gz
|
||||
@@ -231,7 +231,7 @@ echo "Building SDL..."
|
||||
rm -fr "$SDL"
|
||||
tar xf "$SDL.tar.gz"
|
||||
cd "$SDL"
|
||||
cmake -B build -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH="$INSTALLDIR" -DCMAKE_INSTALL_PREFIX="$INSTALLDIR" -DBUILD_SHARED_LIBS=ON -DSDL_SHARED=ON -DSDL_STATIC=OFF -G Ninja
|
||||
cmake -B build -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH="$INSTALLDIR" -DCMAKE_INSTALL_PREFIX="$INSTALLDIR" -DBUILD_SHARED_LIBS=ON -DSDL_SHARED=ON -DSDL_STATIC=OFF -DSDL_X11_XSCRNSAVER=OFF -DSDL_TESTS=OFF -G Ninja
|
||||
cmake --build build --parallel
|
||||
ninja -C build install
|
||||
cd ..
|
||||
|
||||
@@ -14,8 +14,8 @@
|
||||
"sources": [
|
||||
{
|
||||
"type": "archive",
|
||||
"url": "https://libsdl.org/release/SDL3-3.2.26.tar.gz",
|
||||
"sha256": "dad488474a51a0b01d547cd2834893d6299328d2e30f479a3564088b5476bae2"
|
||||
"url": "https://libsdl.org/release/SDL3-3.4.0.tar.gz",
|
||||
"sha256": "082cbf5f429e0d80820f68dc2b507a94d4cc1b4e70817b119bbb8ec6a69584b8"
|
||||
}
|
||||
],
|
||||
"cleanup": [
|
||||
|
||||
@@ -40,14 +40,14 @@ fi
|
||||
|
||||
FREETYPE=2.14.1
|
||||
HARFBUZZ=12.2.0
|
||||
SDL=SDL3-3.2.26
|
||||
SDL=SDL3-3.4.0
|
||||
ZSTD=1.5.7
|
||||
LZ4=1.10.0
|
||||
LIBPNG=1.6.53
|
||||
LIBJPEGTURBO=3.1.2
|
||||
LIBWEBP=1.6.0
|
||||
FFMPEG=8.0
|
||||
MOLTENVK=1.2.9
|
||||
MOLTENVK=1.4.1
|
||||
QT=6.10.1
|
||||
QTAPNG=1.3.0
|
||||
KDDOCKWIDGETS=2.4.0
|
||||
@@ -80,7 +80,7 @@ CMAKE_ARCH_UNIVERSAL=-DCMAKE_OSX_ARCHITECTURES="x86_64;arm64"
|
||||
cat > SHASUMS <<EOF
|
||||
32427e8c471ac095853212a37aef816c60b42052d4d9e48230bab3bdf2936ccc freetype-$FREETYPE.tar.xz
|
||||
f63fc519f150465bd0bdafcdf3d0e9c23474f4c474171cd515ea1b3a72c081fb harfbuzz-$HARFBUZZ.tar.gz
|
||||
dad488474a51a0b01d547cd2834893d6299328d2e30f479a3564088b5476bae2 $SDL.tar.gz
|
||||
082cbf5f429e0d80820f68dc2b507a94d4cc1b4e70817b119bbb8ec6a69584b8 $SDL.tar.gz
|
||||
eb33e51f49a15e023950cd7825ca74a4a2b43db8354825ac24fc1b7ee09e6fa3 zstd-$ZSTD.tar.gz
|
||||
537512904744b35e232912055ccf8ec66d768639ff3abe5788d90d792ec5f48b lz4-$LZ4.tar.gz
|
||||
1d3fb8ccc2932d04aa3663e22ef5ef490244370f4e568d7850165068778d98d4 libpng-$LIBPNG.tar.xz
|
||||
@@ -88,7 +88,7 @@ e4ab7009bf0629fd11982d4c2aa83964cf244cffba7347ecd39019a9e38c4564 libwebp-$LIBWE
|
||||
452a1a290bd0cf18737fad0057dc17b7fdf10a73eda2d6d4f31ba04fda25ef2c libpng-$LIBPNG-apng.patch.gz
|
||||
8f0012234b464ce50890c490f18194f913a7b1f4e6a03d6644179fa0f867d0cf libjpeg-turbo-$LIBJPEGTURBO.tar.gz
|
||||
b2751fccb6cc4c77708113cd78b561059b6fa904b24162fa0be2d60273d27b8e ffmpeg-$FFMPEG.tar.xz
|
||||
f415a09385030c6510a936155ce211f617c31506db5fbc563e804345f1ecf56e v$MOLTENVK.tar.gz
|
||||
9985f141902a17de818e264d17c1ce334b748e499ee02fcb4703e4dc0038f89c v$MOLTENVK.tar.gz
|
||||
5a6226f7e23db51fdc3223121eba53f3f5447cf0cc4d6cb82a3a2df7a65d265d qtbase-everywhere-src-$QT.tar.xz
|
||||
498eabdf2381db96f808942b3e3c765f6360fe6c0e9961f0a45ff7a4c68d7a72 qtimageformats-everywhere-src-$QT.tar.xz
|
||||
c02f355a58f3bbcf404a628bf488b6aeb2d84a94c269afdb86f6e529343ab01f qtsvg-everywhere-src-$QT.tar.xz
|
||||
@@ -277,7 +277,7 @@ rm -fr "MoltenVK-${MOLTENVK}"
|
||||
tar xf "v$MOLTENVK.tar.gz"
|
||||
cd "MoltenVK-${MOLTENVK}"
|
||||
./fetchDependencies --macos
|
||||
make macos
|
||||
make macos MVK_CONFIG_USE_METAL_ARGUMENT_BUFFERS=0 MVK_CONFIG_USE_METAL_PRIVATE_API=1
|
||||
cp Package/Latest/MoltenVK/dynamic/dylib/macOS/libMoltenVK.dylib "$INSTALLDIR/lib/"
|
||||
cd ..
|
||||
|
||||
|
||||
@@ -22,14 +22,14 @@ fi
|
||||
|
||||
FREETYPE=2.14.1
|
||||
HARFBUZZ=12.2.0
|
||||
SDL=SDL3-3.2.26
|
||||
SDL=SDL3-3.4.0
|
||||
ZSTD=1.5.7
|
||||
LZ4=1.10.0
|
||||
LIBPNG=1.6.53
|
||||
LIBJPEGTURBO=3.1.2
|
||||
LIBWEBP=1.6.0
|
||||
FFMPEG=8.0
|
||||
MOLTENVK=1.2.9
|
||||
MOLTENVK=1.4.1
|
||||
QT=6.10.1
|
||||
QTAPNG=1.3.0
|
||||
KDDOCKWIDGETS=2.4.0
|
||||
@@ -61,7 +61,7 @@ CMAKE_COMMON=(
|
||||
cat > SHASUMS <<EOF
|
||||
32427e8c471ac095853212a37aef816c60b42052d4d9e48230bab3bdf2936ccc freetype-$FREETYPE.tar.xz
|
||||
f63fc519f150465bd0bdafcdf3d0e9c23474f4c474171cd515ea1b3a72c081fb harfbuzz-$HARFBUZZ.tar.gz
|
||||
dad488474a51a0b01d547cd2834893d6299328d2e30f479a3564088b5476bae2 $SDL.tar.gz
|
||||
082cbf5f429e0d80820f68dc2b507a94d4cc1b4e70817b119bbb8ec6a69584b8 $SDL.tar.gz
|
||||
eb33e51f49a15e023950cd7825ca74a4a2b43db8354825ac24fc1b7ee09e6fa3 zstd-$ZSTD.tar.gz
|
||||
537512904744b35e232912055ccf8ec66d768639ff3abe5788d90d792ec5f48b lz4-$LZ4.tar.gz
|
||||
1d3fb8ccc2932d04aa3663e22ef5ef490244370f4e568d7850165068778d98d4 libpng-$LIBPNG.tar.xz
|
||||
@@ -69,7 +69,7 @@ e4ab7009bf0629fd11982d4c2aa83964cf244cffba7347ecd39019a9e38c4564 libwebp-$LIBWE
|
||||
452a1a290bd0cf18737fad0057dc17b7fdf10a73eda2d6d4f31ba04fda25ef2c libpng-$LIBPNG-apng.patch.gz
|
||||
8f0012234b464ce50890c490f18194f913a7b1f4e6a03d6644179fa0f867d0cf libjpeg-turbo-$LIBJPEGTURBO.tar.gz
|
||||
b2751fccb6cc4c77708113cd78b561059b6fa904b24162fa0be2d60273d27b8e ffmpeg-$FFMPEG.tar.xz
|
||||
f415a09385030c6510a936155ce211f617c31506db5fbc563e804345f1ecf56e v$MOLTENVK.tar.gz
|
||||
9985f141902a17de818e264d17c1ce334b748e499ee02fcb4703e4dc0038f89c v$MOLTENVK.tar.gz
|
||||
5a6226f7e23db51fdc3223121eba53f3f5447cf0cc4d6cb82a3a2df7a65d265d qtbase-everywhere-src-$QT.tar.xz
|
||||
498eabdf2381db96f808942b3e3c765f6360fe6c0e9961f0a45ff7a4c68d7a72 qtimageformats-everywhere-src-$QT.tar.xz
|
||||
c02f355a58f3bbcf404a628bf488b6aeb2d84a94c269afdb86f6e529343ab01f qtsvg-everywhere-src-$QT.tar.xz
|
||||
@@ -225,7 +225,7 @@ cd "MoltenVK-${MOLTENVK}"
|
||||
sed -i '' 's/xcodebuild "$@"/xcodebuild $XCODEBUILD_EXTRA_ARGS "$@"/g' fetchDependencies
|
||||
sed -i '' 's/XCODEBUILD :=/XCODEBUILD ?=/g' Makefile
|
||||
XCODEBUILD_EXTRA_ARGS="VALID_ARCHS=x86_64" ./fetchDependencies --macos
|
||||
XCODEBUILD="set -o pipefail && xcodebuild VALID_ARCHS=x86_64" make macos
|
||||
XCODEBUILD="set -o pipefail && xcodebuild VALID_ARCHS=x86_64" make macos MVK_CONFIG_USE_METAL_ARGUMENT_BUFFERS=0 MVK_CONFIG_USE_METAL_PRIVATE_API=1
|
||||
cp Package/Latest/MoltenVK/dynamic/dylib/macOS/libMoltenVK.dylib "$INSTALLDIR/lib/"
|
||||
cd ..
|
||||
|
||||
|
||||
@@ -47,7 +47,7 @@ set HARFBUZZ=12.2.0
|
||||
set LIBJPEGTURBO=3.1.2
|
||||
set LIBPNG=1653
|
||||
set LIBPNGLONG=1.6.53
|
||||
set SDL=SDL3-3.2.26
|
||||
set SDL=SDL3-3.4.0
|
||||
set QT=6.10.1
|
||||
set QTMINOR=6.10
|
||||
set QTAPNG=1.3.0
|
||||
@@ -71,7 +71,7 @@ call :downloadfile "lpng%LIBPNG%.zip" https://download.sourceforge.net/libpng/lp
|
||||
call :downloadfile "lpng%LIBPNG%-apng.patch.gz" https://download.sourceforge.net/libpng-apng/libpng-%LIBPNGLONG%-apng.patch.gz 452a1a290bd0cf18737fad0057dc17b7fdf10a73eda2d6d4f31ba04fda25ef2c || goto error
|
||||
call :downloadfile "libjpeg-turbo-%LIBJPEGTURBO%.tar.gz" "https://github.com/libjpeg-turbo/libjpeg-turbo/releases/download/%LIBJPEGTURBO%/libjpeg-turbo-%LIBJPEGTURBO%.tar.gz" 8f0012234b464ce50890c490f18194f913a7b1f4e6a03d6644179fa0f867d0cf || goto error
|
||||
call :downloadfile "libwebp-%WEBP%.tar.gz" "https://storage.googleapis.com/downloads.webmproject.org/releases/webp/libwebp-%WEBP%.tar.gz" e4ab7009bf0629fd11982d4c2aa83964cf244cffba7347ecd39019a9e38c4564 || goto error
|
||||
call :downloadfile "%SDL%.zip" "https://libsdl.org/release/%SDL%.zip" 739356eef1192fff9d641c320a8f5ef4a10506b8927def4b9ceb764c7e947369 || goto error
|
||||
call :downloadfile "%SDL%.zip" "https://libsdl.org/release/%SDL%.zip" 9ac2debb493e0d3e13dbd2729fb91f4bfeb00a0f4dff5e04b73cc9bac276b38d || goto error
|
||||
call :downloadfile "qtbase-everywhere-src-%QT%.zip" "https://download.qt.io/official_releases/qt/%QTMINOR%/%QT%/submodules/qtbase-everywhere-src-%QT%.zip" c43f471a808b07fc541528410e94ce89c6745bdc1d744492e19911d35fbf7d33 || goto error
|
||||
call :downloadfile "qtimageformats-everywhere-src-%QT%.zip" "https://download.qt.io/official_releases/qt/%QTMINOR%/%QT%/submodules/qtimageformats-everywhere-src-%QT%.zip" 2d828d8c999fdd18167937c071781c22321c643b04a106c714411c2356cdb26d || goto error
|
||||
call :downloadfile "qtsvg-everywhere-src-%QT%.zip" "https://download.qt.io/official_releases/qt/%QTMINOR%/%QT%/submodules/qtsvg-everywhere-src-%QT%.zip" ddd74a417d2397eb085d047a9b6ba52b76e748055817f728fe691f8456035d23 || goto error
|
||||
|
||||
@@ -45,7 +45,7 @@ set HARFBUZZ=12.2.0
|
||||
set LIBJPEGTURBO=3.1.2
|
||||
set LIBPNG=1653
|
||||
set LIBPNGLONG=1.6.53
|
||||
set SDL=SDL3-3.2.26
|
||||
set SDL=SDL3-3.4.0
|
||||
set QT=6.10.1
|
||||
set QTMINOR=6.10
|
||||
set QTAPNG=1.3.0
|
||||
@@ -69,7 +69,7 @@ call :downloadfile "lpng%LIBPNG%.zip" https://download.sourceforge.net/libpng/lp
|
||||
call :downloadfile "lpng%LIBPNG%-apng.patch.gz" https://download.sourceforge.net/libpng-apng/libpng-%LIBPNGLONG%-apng.patch.gz 452a1a290bd0cf18737fad0057dc17b7fdf10a73eda2d6d4f31ba04fda25ef2c || goto error
|
||||
call :downloadfile "libjpeg-turbo-%LIBJPEGTURBO%.tar.gz" "https://github.com/libjpeg-turbo/libjpeg-turbo/releases/download/%LIBJPEGTURBO%/libjpeg-turbo-%LIBJPEGTURBO%.tar.gz" 8f0012234b464ce50890c490f18194f913a7b1f4e6a03d6644179fa0f867d0cf || goto error
|
||||
call :downloadfile "libwebp-%WEBP%.tar.gz" "https://storage.googleapis.com/downloads.webmproject.org/releases/webp/libwebp-%WEBP%.tar.gz" e4ab7009bf0629fd11982d4c2aa83964cf244cffba7347ecd39019a9e38c4564 || goto error
|
||||
call :downloadfile "%SDL%.zip" "https://libsdl.org/release/%SDL%.zip" 739356eef1192fff9d641c320a8f5ef4a10506b8927def4b9ceb764c7e947369 || goto error
|
||||
call :downloadfile "%SDL%.zip" "https://libsdl.org/release/%SDL%.zip" 9ac2debb493e0d3e13dbd2729fb91f4bfeb00a0f4dff5e04b73cc9bac276b38d || goto error
|
||||
call :downloadfile "qtbase-everywhere-src-%QT%.zip" "https://download.qt.io/official_releases/qt/%QTMINOR%/%QT%/submodules/qtbase-everywhere-src-%QT%.zip" c43f471a808b07fc541528410e94ce89c6745bdc1d744492e19911d35fbf7d33 || goto error
|
||||
call :downloadfile "qtimageformats-everywhere-src-%QT%.zip" "https://download.qt.io/official_releases/qt/%QTMINOR%/%QT%/submodules/qtimageformats-everywhere-src-%QT%.zip" 2d828d8c999fdd18167937c071781c22321c643b04a106c714411c2356cdb26d || goto error
|
||||
call :downloadfile "qtsvg-everywhere-src-%QT%.zip" "https://download.qt.io/official_releases/qt/%QTMINOR%/%QT%/submodules/qtsvg-everywhere-src-%QT%.zip" ddd74a417d2397eb085d047a9b6ba52b76e748055817f728fe691f8456035d23 || goto error
|
||||
@@ -201,10 +201,6 @@ echo Building Qt base...
|
||||
rmdir /S /Q "qtbase-everywhere-src-%QT%"
|
||||
%SEVENZIP% x "qtbase-everywhere-src-%QT%.zip" || goto error
|
||||
cd "qtbase-everywhere-src-%QT%" || goto error
|
||||
|
||||
rem Disable the PCRE2 JIT, it doesn't properly verify AVX2 support.
|
||||
%PATCH% -p1 < "%SCRIPTDIR%\qtbase-disable-pcre2-jit.patch" || goto error
|
||||
|
||||
cmake -B build -DFEATURE_sql=OFF -DCMAKE_INSTALL_PREFIX="%INSTALLDIR%" %FORCEPDB% -DINPUT_gui=yes -DINPUT_widgets=yes -DINPUT_ssl=yes -DINPUT_openssl=no -DINPUT_schannel=yes -DFEATURE_system_png=ON -DFEATURE_system_jpeg=ON -DFEATURE_system_zlib=ON -DFEATURE_system_freetype=ON -DFEATURE_system_harfbuzz=ON %QTBUILDSPEC% || goto error
|
||||
cmake --build build --parallel || goto error
|
||||
ninja -C build install || goto error
|
||||
|
||||
@@ -1,35 +0,0 @@
|
||||
--- qtbase/src/3rdparty/pcre2/CMakeLists.txt 2024-03-19 08:46:43.000000000 -0700
|
||||
+++ qtbase/src/3rdparty/pcre2/CMakeLists.txt 2024-06-06 21:52:20.539619500 -0700
|
||||
@@ -41,6 +41,7 @@
|
||||
src/pcre2_xclass.c
|
||||
DEFINES
|
||||
HAVE_CONFIG_H
|
||||
+ PCRE2_DISABLE_JIT
|
||||
PUBLIC_DEFINES
|
||||
PCRE2_CODE_UNIT_WIDTH=16
|
||||
PUBLIC_INCLUDE_DIRECTORIES
|
||||
@@ -52,23 +53,8 @@
|
||||
## Scopes:
|
||||
#####################################################################
|
||||
|
||||
-qt_internal_extend_target(BundledPcre2 CONDITION QNX OR UIKIT
|
||||
- DEFINES
|
||||
- PCRE2_DISABLE_JIT
|
||||
-)
|
||||
-
|
||||
-qt_internal_extend_target(BundledPcre2 CONDITION (TEST_architecture_arch STREQUAL "arm") AND WIN32
|
||||
- DEFINES
|
||||
- PCRE2_DISABLE_JIT
|
||||
-)
|
||||
-
|
||||
-qt_internal_extend_target(BundledPcre2 CONDITION (TEST_architecture_arch STREQUAL "arm64") AND WIN32
|
||||
- DEFINES
|
||||
- PCRE2_DISABLE_JIT
|
||||
-)
|
||||
-
|
||||
if (APPLE)
|
||||
- target_compile_options(BundledPcre2 PRIVATE "SHELL:-Xarch_arm64 -DPCRE2_DISABLE_JIT")
|
||||
+ target_compile_options(BundledPcre2 PRIVATE "SHELL:-Xarch_arm64")
|
||||
endif()
|
||||
|
||||
qt_internal_extend_target(BundledPcre2 CONDITION WIN32
|
||||
@@ -1,7 +1,7 @@
|
||||
// Generated by https://github.com/juliettef/IconFontCppHeaders script GenerateIconFontCppHeaders.py
|
||||
// for C and C++
|
||||
// from codepoints https://github.com/FortAwesome/Font-Awesome/raw/6.x/metadata/icons.yml
|
||||
// for use with font https://github.com/FortAwesome/Font-Awesome/blob/6.x/webfonts/fa-regular-400.ttf, https://github.com/FortAwesome/Font-Awesome/blob/6.x/webfonts/fa-solid-900.ttf
|
||||
// from codepoints https://github.com/FortAwesome/Font-Awesome/raw/7.x/metadata/icons.yml
|
||||
// for use with font https://github.com/FortAwesome/Font-Awesome/blob/7.x/webfonts/fa-regular-400.woff2 (You may need to convert the .woff2 files to .ttf depending upon your loader.), https://github.com/FortAwesome/Font-Awesome/blob/7.x/webfonts/fa-solid-900.woff2 (You may need to convert the .woff2 files to .ttf depending upon your loader.)
|
||||
|
||||
#pragma once
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
#define ICON_FA_A "A" // U+0041
|
||||
#define ICON_FA_ADDRESS_BOOK "\xef\x8a\xb9" // U+f2b9
|
||||
#define ICON_FA_ADDRESS_CARD "\xef\x8a\xbb" // U+f2bb
|
||||
#define ICON_FA_ALARM_CLOCK "\xef\x8d\x8e" // U+f34e
|
||||
#define ICON_FA_ALIGN_CENTER "\xef\x80\xb7" // U+f037
|
||||
#define ICON_FA_ALIGN_JUSTIFY "\xef\x80\xb9" // U+f039
|
||||
#define ICON_FA_ALIGN_LEFT "\xef\x80\xb6" // U+f036
|
||||
@@ -218,6 +219,7 @@
|
||||
#define ICON_FA_BURGER "\xef\xa0\x85" // U+f805
|
||||
#define ICON_FA_BURST "\xee\x93\x9c" // U+e4dc
|
||||
#define ICON_FA_BUS "\xef\x88\x87" // U+f207
|
||||
#define ICON_FA_BUS_SIDE "\xee\xa0\x9d" // U+e81d
|
||||
#define ICON_FA_BUS_SIMPLE "\xef\x95\x9e" // U+f55e
|
||||
#define ICON_FA_BUSINESS_TIME "\xef\x99\x8a" // U+f64a
|
||||
#define ICON_FA_C "C" // U+0043
|
||||
@@ -650,8 +652,6 @@
|
||||
#define ICON_FA_HANDS_PRAYING "\xef\x9a\x84" // U+f684
|
||||
#define ICON_FA_HANDSHAKE "\xef\x8a\xb5" // U+f2b5
|
||||
#define ICON_FA_HANDSHAKE_ANGLE "\xef\x93\x84" // U+f4c4
|
||||
#define ICON_FA_HANDSHAKE_SIMPLE "\xef\x93\x86" // U+f4c6
|
||||
#define ICON_FA_HANDSHAKE_SIMPLE_SLASH "\xee\x81\x9f" // U+e05f
|
||||
#define ICON_FA_HANDSHAKE_SLASH "\xee\x81\xa0" // U+e060
|
||||
#define ICON_FA_HANUKIAH "\xef\x9b\xa6" // U+f6e6
|
||||
#define ICON_FA_HARD_DRIVE "\xef\x82\xa0" // U+f0a0
|
||||
@@ -665,7 +665,6 @@
|
||||
#define ICON_FA_HEAD_SIDE_VIRUS "\xee\x81\xa4" // U+e064
|
||||
#define ICON_FA_HEADING "\xef\x87\x9c" // U+f1dc
|
||||
#define ICON_FA_HEADPHONES "\xef\x80\xa5" // U+f025
|
||||
#define ICON_FA_HEADPHONES_SIMPLE "\xef\x96\x8f" // U+f58f
|
||||
#define ICON_FA_HEADSET "\xef\x96\x90" // U+f590
|
||||
#define ICON_FA_HEART "\xef\x80\x84" // U+f004
|
||||
#define ICON_FA_HEART_CIRCLE_BOLT "\xee\x93\xbc" // U+e4fc
|
||||
@@ -680,6 +679,7 @@
|
||||
#define ICON_FA_HELICOPTER_SYMBOL "\xee\x94\x82" // U+e502
|
||||
#define ICON_FA_HELMET_SAFETY "\xef\xa0\x87" // U+f807
|
||||
#define ICON_FA_HELMET_UN "\xee\x94\x83" // U+e503
|
||||
#define ICON_FA_HEXAGON "\xef\x8c\x92" // U+f312
|
||||
#define ICON_FA_HEXAGON_NODES "\xee\x9a\x99" // U+e699
|
||||
#define ICON_FA_HEXAGON_NODES_BOLT "\xee\x9a\x9a" // U+e69a
|
||||
#define ICON_FA_HIGHLIGHTER "\xef\x96\x91" // U+f591
|
||||
@@ -852,6 +852,7 @@
|
||||
#define ICON_FA_MOBILE_RETRO "\xee\x94\xa7" // U+e527
|
||||
#define ICON_FA_MOBILE_SCREEN "\xef\x8f\x8f" // U+f3cf
|
||||
#define ICON_FA_MOBILE_SCREEN_BUTTON "\xef\x8f\x8d" // U+f3cd
|
||||
#define ICON_FA_MOBILE_VIBRATE "\xee\xa0\x96" // U+e816
|
||||
#define ICON_FA_MONEY_BILL "\xef\x83\x96" // U+f0d6
|
||||
#define ICON_FA_MONEY_BILL_1 "\xef\x8f\x91" // U+f3d1
|
||||
#define ICON_FA_MONEY_BILL_1_WAVE "\xef\x94\xbb" // U+f53b
|
||||
@@ -881,6 +882,7 @@
|
||||
#define ICON_FA_NETWORK_WIRED "\xef\x9b\xbf" // U+f6ff
|
||||
#define ICON_FA_NEUTER "\xef\x88\xac" // U+f22c
|
||||
#define ICON_FA_NEWSPAPER "\xef\x87\xaa" // U+f1ea
|
||||
#define ICON_FA_NON_BINARY "\xee\xa0\x87" // U+e807
|
||||
#define ICON_FA_NOT_EQUAL "\xef\x94\xbe" // U+f53e
|
||||
#define ICON_FA_NOTDEF "\xee\x87\xbe" // U+e1fe
|
||||
#define ICON_FA_NOTE_STICKY "\xef\x89\x89" // U+f249
|
||||
@@ -888,6 +890,7 @@
|
||||
#define ICON_FA_O "O" // U+004f
|
||||
#define ICON_FA_OBJECT_GROUP "\xef\x89\x87" // U+f247
|
||||
#define ICON_FA_OBJECT_UNGROUP "\xef\x89\x88" // U+f248
|
||||
#define ICON_FA_OCTAGON "\xef\x8c\x86" // U+f306
|
||||
#define ICON_FA_OIL_CAN "\xef\x98\x93" // U+f613
|
||||
#define ICON_FA_OIL_WELL "\xee\x94\xb2" // U+e532
|
||||
#define ICON_FA_OM "\xef\x99\xb9" // U+f679
|
||||
@@ -916,6 +919,7 @@
|
||||
#define ICON_FA_PEN_RULER "\xef\x96\xae" // U+f5ae
|
||||
#define ICON_FA_PEN_TO_SQUARE "\xef\x81\x84" // U+f044
|
||||
#define ICON_FA_PENCIL "\xef\x8c\x83" // U+f303
|
||||
#define ICON_FA_PENTAGON "\xee\x9e\x90" // U+e790
|
||||
#define ICON_FA_PEOPLE_ARROWS "\xee\x81\xa8" // U+e068
|
||||
#define ICON_FA_PEOPLE_CARRY_BOX "\xef\x93\x8e" // U+f4ce
|
||||
#define ICON_FA_PEOPLE_GROUP "\xee\x94\xb3" // U+e533
|
||||
@@ -1090,6 +1094,7 @@
|
||||
#define ICON_FA_SD_CARD "\xef\x9f\x82" // U+f7c2
|
||||
#define ICON_FA_SECTION "\xee\x91\x87" // U+e447
|
||||
#define ICON_FA_SEEDLING "\xef\x93\x98" // U+f4d8
|
||||
#define ICON_FA_SEPTAGON "\xee\xa0\xa0" // U+e820
|
||||
#define ICON_FA_SERVER "\xef\x88\xb3" // U+f233
|
||||
#define ICON_FA_SHAPES "\xef\x98\x9f" // U+f61f
|
||||
#define ICON_FA_SHARE "\xef\x81\xa4" // U+f064
|
||||
@@ -1118,6 +1123,8 @@
|
||||
#define ICON_FA_SIGNATURE "\xef\x96\xb7" // U+f5b7
|
||||
#define ICON_FA_SIGNS_POST "\xef\x89\xb7" // U+f277
|
||||
#define ICON_FA_SIM_CARD "\xef\x9f\x84" // U+f7c4
|
||||
#define ICON_FA_SINGLE_QUOTE_LEFT "\xee\xa0\x9b" // U+e81b
|
||||
#define ICON_FA_SINGLE_QUOTE_RIGHT "\xee\xa0\x9c" // U+e81c
|
||||
#define ICON_FA_SINK "\xee\x81\xad" // U+e06d
|
||||
#define ICON_FA_SITEMAP "\xef\x83\xa8" // U+f0e8
|
||||
#define ICON_FA_SKULL "\xef\x95\x8c" // U+f54c
|
||||
@@ -1141,6 +1148,7 @@
|
||||
#define ICON_FA_SPELL_CHECK "\xef\xa2\x91" // U+f891
|
||||
#define ICON_FA_SPIDER "\xef\x9c\x97" // U+f717
|
||||
#define ICON_FA_SPINNER "\xef\x84\x90" // U+f110
|
||||
#define ICON_FA_SPIRAL "\xee\xa0\x8a" // U+e80a
|
||||
#define ICON_FA_SPLOTCH "\xef\x96\xbc" // U+f5bc
|
||||
#define ICON_FA_SPOON "\xef\x8b\xa5" // U+f2e5
|
||||
#define ICON_FA_SPRAY_CAN "\xef\x96\xbd" // U+f5bd
|
||||
@@ -1325,8 +1333,6 @@
|
||||
#define ICON_FA_USER_GRADUATE "\xef\x94\x81" // U+f501
|
||||
#define ICON_FA_USER_GROUP "\xef\x94\x80" // U+f500
|
||||
#define ICON_FA_USER_INJURED "\xef\x9c\xa8" // U+f728
|
||||
#define ICON_FA_USER_LARGE "\xef\x90\x86" // U+f406
|
||||
#define ICON_FA_USER_LARGE_SLASH "\xef\x93\xba" // U+f4fa
|
||||
#define ICON_FA_USER_LOCK "\xef\x94\x82" // U+f502
|
||||
#define ICON_FA_USER_MINUS "\xef\x94\x83" // U+f503
|
||||
#define ICON_FA_USER_NINJA "\xef\x94\x84" // U+f504
|
||||
@@ -1351,7 +1357,6 @@
|
||||
#define ICON_FA_V "V" // U+0056
|
||||
#define ICON_FA_VAN_SHUTTLE "\xef\x96\xb6" // U+f5b6
|
||||
#define ICON_FA_VAULT "\xee\x8b\x85" // U+e2c5
|
||||
#define ICON_FA_VECTOR_SQUARE "\xef\x97\x8b" // U+f5cb
|
||||
#define ICON_FA_VENUS "\xef\x88\xa1" // U+f221
|
||||
#define ICON_FA_VENUS_DOUBLE "\xef\x88\xa6" // U+f226
|
||||
#define ICON_FA_VENUS_MARS "\xef\x88\xa8" // U+f228
|
||||
@@ -2239,6 +2239,8 @@ SCAJ-20152:
|
||||
gsHWFixes:
|
||||
alignSprite: 1 # Fixes vertical lines.
|
||||
textureInsideRT: 1 # Fixes corruption.
|
||||
halfPixelOffset: 4 # Aligns post bloom.
|
||||
nativeScaling: 2 # Fixes post effects.
|
||||
getSkipCount: "GSC_UrbanReign"
|
||||
SCAJ-20153:
|
||||
name: "コード・エイジ コマンダーズ"
|
||||
@@ -5600,7 +5602,7 @@ SCES-52033:
|
||||
author=refraction
|
||||
// Cop2 problems.
|
||||
patch=0,EE,003953F8,word,48438000
|
||||
patch=0,EE,003735FC,word,4B06521B
|
||||
patch=0,EE,003953FC,word,4B06521B
|
||||
author=YukiXXL
|
||||
// Speed Correction (25 FPS)
|
||||
patch=1,EE,00175E1C,extended,00000019
|
||||
@@ -6229,6 +6231,8 @@ SCES-53688:
|
||||
gsHWFixes:
|
||||
alignSprite: 1 # Fixes vertical lines.
|
||||
textureInsideRT: 1 # Fixes corruption.
|
||||
halfPixelOffset: 4 # Aligns post bloom.
|
||||
nativeScaling: 2 # Fixes post effects.
|
||||
getSkipCount: "GSC_UrbanReign"
|
||||
SCES-53795:
|
||||
name: "SingStar - '80s"
|
||||
@@ -7698,6 +7702,8 @@ SCKA-20065:
|
||||
gsHWFixes:
|
||||
alignSprite: 1 # Fixes vertical lines.
|
||||
textureInsideRT: 1 # Fixes corruption.
|
||||
halfPixelOffset: 4 # Aligns post bloom.
|
||||
nativeScaling: 2 # Fixes post effects.
|
||||
getSkipCount: "GSC_UrbanReign"
|
||||
SCKA-20066:
|
||||
name: "아이토이 - 플레이 3"
|
||||
@@ -11384,6 +11390,10 @@ SCUS-97197:
|
||||
name: "War of the Monsters"
|
||||
region: "NTSC-U"
|
||||
compat: 5
|
||||
memcardFilters: # Reads Twisted Metal Black for bonus unlockable.
|
||||
- "SCUS-97101"
|
||||
- "SCUS-97179"
|
||||
- "SCUS-97197"
|
||||
SCUS-97198:
|
||||
name: "Sly Cooper and the Thievius Raccoonus"
|
||||
region: "NTSC-U"
|
||||
@@ -11682,6 +11692,15 @@ SCUS-97264:
|
||||
// Cop2 problems.
|
||||
patch=0,EE,003735F8,word,48438000
|
||||
patch=0,EE,003735FC,word,4B06521B
|
||||
062BC79E:
|
||||
content: |-
|
||||
author=YukiXXL
|
||||
// Cop2 problems.
|
||||
patch=0,EE,00395D28,word,48438000
|
||||
patch=0,EE,00395D2C,word,4B06521B
|
||||
// Other languages SNDVAG fix
|
||||
patch=1,EE,204A0C3C,word,482E7325
|
||||
patch=1,EE,204A0C40,word,0000474F
|
||||
SCUS-97265:
|
||||
name: "Jak II"
|
||||
region: "NTSC-U"
|
||||
@@ -12069,12 +12088,21 @@ SCUS-97396:
|
||||
gsHWFixes:
|
||||
PCRTCOffsets: 1 # Fixes boot videos screen size.
|
||||
SCUS-97397:
|
||||
name: "Syphon Filter - The Omega Strain"
|
||||
name: "Syphon Filter - The Omega Strain Public Beta 1.0"
|
||||
region: "NTSC-U"
|
||||
gsHWFixes:
|
||||
autoFlush: 2 # Fixes lights going through walls.
|
||||
preloadFrameData: 1 # Fixes light flicker.
|
||||
halfPixelOffset: 2 # Corrects light position.
|
||||
gameFixes:
|
||||
- EETimingHack # Fixes random hangs.
|
||||
patches:
|
||||
C909A32E:
|
||||
content: |-
|
||||
author=YukiXXL
|
||||
// Cop2 problems.
|
||||
patch=0,EE,00367798,word,48438000
|
||||
patch=0,EE,0036779C,word,4B06521B
|
||||
SCUS-97398:
|
||||
name: "Siren [Demo]"
|
||||
region: "NTSC-U"
|
||||
@@ -27824,8 +27852,6 @@ SLES-54812:
|
||||
SLES-54813:
|
||||
name: "NASCAR 08"
|
||||
region: "PAL-A-E"
|
||||
gsHWFixes:
|
||||
deinterlace: 8 # Game requires AdaptiveTFF de-interlacing when auto.
|
||||
SLES-54814:
|
||||
name: "Dead Eye Jim"
|
||||
region: "PAL-E"
|
||||
@@ -29178,8 +29204,6 @@ SLES-55199:
|
||||
name: "NASCAR 09"
|
||||
region: "PAL-M5"
|
||||
compat: 5
|
||||
gsHWFixes:
|
||||
deinterlace: 8 # Game requires AdaptiveTFF de-interlacing when auto.
|
||||
SLES-55200:
|
||||
name: "Guitar Hero - Aerosmith"
|
||||
region: "PAL-M4"
|
||||
@@ -30583,6 +30607,11 @@ SLES-82030:
|
||||
halfPixelOffset: 5 # Fixes shadow positioning.
|
||||
autoFlush: 2 # Makes the shadow monsters appear.
|
||||
nativeScaling: 2 # Aligns post processing and bloom.
|
||||
memcardFilters: # Reads Shadow Hearts for extra items.
|
||||
- "SLES-82030"
|
||||
- "SLES-82031"
|
||||
- "SLES-50677"
|
||||
- "SLES-50822"
|
||||
SLES-82031:
|
||||
name: "Shadow Hearts - Covenant [Disc 2 of 2]"
|
||||
region: "PAL-M3"
|
||||
@@ -30590,8 +30619,11 @@ SLES-82031:
|
||||
halfPixelOffset: 5 # Fixes shadow positioning.
|
||||
autoFlush: 2 # Makes the shadow monsters appear.
|
||||
nativeScaling: 2 # Aligns post processing and bloom.
|
||||
memcardFilters:
|
||||
memcardFilters: # Reads Shadow Hearts for extra items.
|
||||
- "SLES-82030"
|
||||
- "SLES-82031"
|
||||
- "SLES-50677"
|
||||
- "SLES-50822"
|
||||
SLES-82032:
|
||||
name: "Metal Gear Solid 3 - Snake Eater"
|
||||
region: "PAL-G"
|
||||
@@ -35940,6 +35972,8 @@ SLPM-60272:
|
||||
gsHWFixes:
|
||||
alignSprite: 1 # Fixes vertical lines.
|
||||
textureInsideRT: 1 # Fixes corruption.
|
||||
halfPixelOffset: 4 # Aligns post bloom.
|
||||
nativeScaling: 2 # Fixes post effects.
|
||||
getSkipCount: "GSC_UrbanReign"
|
||||
SLPM-60273:
|
||||
name: "絶体絶命都市2 -凍てついた記憶たち- [体験版 Type-B]"
|
||||
@@ -43473,6 +43507,11 @@ SLPM-65428:
|
||||
name-en: "BioHazard Outbreak"
|
||||
region: "NTSC-J"
|
||||
compat: 5
|
||||
memcardFilters:
|
||||
- "SLPM-65428"
|
||||
- "SLPM-74201"
|
||||
- "SLPM-65286"
|
||||
- "BWNETCNF"
|
||||
SLPM-65429:
|
||||
name: "ギャラクシーエンジェル Moonlit Lovers [初回限定版ファーストパッケージ]"
|
||||
name-sort: "ぎゃらくしーえんじぇる Moonlit Lovers [しょかいげんていばんふぁーすとぱっけーじ]"
|
||||
@@ -44973,6 +45012,8 @@ SLPM-65692:
|
||||
- "SLPM-65692"
|
||||
- "SLPM-65428"
|
||||
- "SLPM-74201"
|
||||
- "SLPM-65286"
|
||||
- "BWNETCNF"
|
||||
SLPM-65693:
|
||||
name: "ときめきメモリアル3 ~約束のあの場所で~ [コナミ殿堂セレクション]"
|
||||
name-sort: "ときめきめもりある3 やくそくのあのばしょで [こなみでんどうせれくしょん]"
|
||||
@@ -53680,6 +53721,11 @@ SLPM-74201:
|
||||
name-sort: "ばいおはざーど あうとぶれいく [PlayStation2 the Best]"
|
||||
name-en: "BioHazard Outbreak [PlayStation2 the Best]"
|
||||
region: "NTSC-J"
|
||||
memcardFilters:
|
||||
- "SLPM-65428"
|
||||
- "SLPM-74201"
|
||||
- "SLPM-65286"
|
||||
- "BWNETCNF"
|
||||
SLPM-74202:
|
||||
name: "風雲 新撰組 [PlayStation2 the Best]"
|
||||
name-sort: "ふううん しんせんぐみ [PlayStation2 the Best]"
|
||||
@@ -58845,6 +58891,11 @@ SLPS-25317:
|
||||
halfPixelOffset: 5 # Fixes shadow positioning.
|
||||
autoFlush: 2 # Makes the shadow monsters appear.
|
||||
nativeScaling: 2 # Aligns post processing and bloom.
|
||||
memcardFilters: # Reads Shadow Hearts for extra items.
|
||||
- "SLPS-25317"
|
||||
- "SLPS-25318"
|
||||
- "SLPS-25041"
|
||||
- "SLPS-73418"
|
||||
SLPS-25318:
|
||||
name: "シャドウハーツⅡ [DXパック] [ディスク2/2]"
|
||||
name-sort: "しゃどうはーつ2 [DXぱっく] [でぃすく2/2]"
|
||||
@@ -58854,8 +58905,11 @@ SLPS-25318:
|
||||
halfPixelOffset: 5 # Fixes shadow positioning.
|
||||
autoFlush: 2 # Makes the shadow monsters appear.
|
||||
nativeScaling: 2 # Aligns post processing and bloom.
|
||||
memcardFilters:
|
||||
memcardFilters: # Reads Shadow Hearts for extra items.
|
||||
- "SLPS-25317"
|
||||
- "SLPS-25318"
|
||||
- "SLPS-25041"
|
||||
- "SLPS-73418"
|
||||
SLPS-25319:
|
||||
name: "ケロケロキング スーパーDX"
|
||||
name-sort: "けろけろきんぐ すーぱーDX"
|
||||
@@ -58934,6 +58988,11 @@ SLPS-25334:
|
||||
halfPixelOffset: 5 # Fixes shadow positioning.
|
||||
autoFlush: 2 # Makes the shadow monsters appear.
|
||||
nativeScaling: 2 # Aligns post processing and bloom.
|
||||
memcardFilters: # Reads Shadow Hearts for extra items.
|
||||
- "SLPS-25334"
|
||||
- "SLPS-25335"
|
||||
- "SLPS-25041"
|
||||
- "SLPS-73418"
|
||||
SLPS-25335:
|
||||
name: "シャドウハーツⅡ [通常版] [ディスク2/2]"
|
||||
name-sort: "しゃどうはーつ2 [つうじょうばん] [でぃすく2/2]"
|
||||
@@ -58943,8 +59002,11 @@ SLPS-25335:
|
||||
halfPixelOffset: 5 # Fixes shadow positioning.
|
||||
autoFlush: 2 # Makes the shadow monsters appear.
|
||||
nativeScaling: 2 # Aligns post processing and bloom.
|
||||
memcardFilters:
|
||||
memcardFilters: # Reads Shadow Hearts for extra items.
|
||||
- "SLPS-25334"
|
||||
- "SLPS-25335"
|
||||
- "SLPS-25041"
|
||||
- "SLPS-73418"
|
||||
SLPS-25336:
|
||||
name: "バスランディング3 [Sammy best] [つりコン2+ 同梱版]"
|
||||
name-sort: "ばすらんでぃんぐ3 [Sammy best] [つりこん2 どうこんばん]"
|
||||
@@ -60300,6 +60362,8 @@ SLPS-25557:
|
||||
gsHWFixes:
|
||||
alignSprite: 1 # Fixes vertical lines.
|
||||
textureInsideRT: 1 # Fixes corruption.
|
||||
halfPixelOffset: 4 # Aligns post bloom.
|
||||
nativeScaling: 2 # Fixes post effects.
|
||||
getSkipCount: "GSC_UrbanReign"
|
||||
SLPS-25558:
|
||||
name: "ネオジオ バトルコロシアム"
|
||||
@@ -63242,6 +63306,11 @@ SLPS-73214:
|
||||
halfPixelOffset: 5 # Fixes shadow positioning.
|
||||
autoFlush: 2 # Makes the shadow monsters appear.
|
||||
nativeScaling: 2 # Aligns post processing and bloom.
|
||||
memcardFilters: # Reads Shadow Hearts for extra items.
|
||||
- "SLPS-73214"
|
||||
- "SLPS-73215"
|
||||
- "SLPS-25041"
|
||||
- "SLPS-73418"
|
||||
SLPS-73215:
|
||||
name: "シャドウハーツⅡ ディレクターズカット [PlayStation2 the Best] [ディスク2/2]"
|
||||
name-sort: "しゃどうはーつ2 でぃれくたーずかっと [PlayStation2 the Best] [でぃすく2/2]"
|
||||
@@ -63251,8 +63320,11 @@ SLPS-73215:
|
||||
halfPixelOffset: 5 # Fixes shadow positioning.
|
||||
autoFlush: 2 # Makes the shadow monsters appear.
|
||||
nativeScaling: 2 # Aligns post processing and bloom.
|
||||
memcardFilters:
|
||||
memcardFilters: # Reads Shadow Hearts for extra items.
|
||||
- "SLPS-73214"
|
||||
- "SLPS-73215"
|
||||
- "SLPS-25041"
|
||||
- "SLPS-73418"
|
||||
SLPS-73216:
|
||||
name: "マグナカルタ [PlayStation2 the Best]"
|
||||
name-sort: "まぐなかるた [PlayStation2 the Best]"
|
||||
@@ -66407,7 +66479,6 @@ SLUS-20535:
|
||||
compat: 5
|
||||
gsHWFixes:
|
||||
roundSprite: 1 # Fix horizontal and vertical lines when racing.
|
||||
deinterlace: 8 # Fixes misdetection of game deinterlace.
|
||||
SLUS-20536:
|
||||
name: "NBA Live 2003"
|
||||
region: "NTSC-U"
|
||||
@@ -67607,7 +67678,6 @@ SLUS-20754:
|
||||
region: "NTSC-U"
|
||||
gsHWFixes:
|
||||
roundSprite: 1 # Fix horizontal and vertical lines when racing.
|
||||
deinterlace: 8 # Fixes misdetection of game deinterlace.
|
||||
memcardFilters:
|
||||
- "PSCD10088" # Enables EA Sports BIO.
|
||||
- "SLUS-20754"
|
||||
@@ -67972,7 +68042,6 @@ SLUS-20824:
|
||||
region: "NTSC-U"
|
||||
gsHWFixes:
|
||||
roundSprite: 1 # Fix horizontal and vertical lines when racing.
|
||||
deinterlace: 8 # Fixes misdetection of game deinterlace.
|
||||
memcardFilters:
|
||||
- "PSCD10088" # Enables EA Sports BIO.
|
||||
- "SLUS-20824"
|
||||
@@ -69321,6 +69390,10 @@ SLUS-21041:
|
||||
halfPixelOffset: 5 # Fixes shadow positioning.
|
||||
autoFlush: 2 # Makes the shadow monsters appear.
|
||||
nativeScaling: 2 # Aligns post processing and bloom.
|
||||
memcardFilters: # Reads Shadow Hearts for extra items.
|
||||
- "SLUS-21041"
|
||||
- "SLUS-21044"
|
||||
- "SLUS-20347"
|
||||
SLUS-21042:
|
||||
name: "Darkwatch"
|
||||
region: "NTSC-U"
|
||||
@@ -69339,8 +69412,10 @@ SLUS-21044:
|
||||
halfPixelOffset: 5 # Fixes shadow positioning.
|
||||
autoFlush: 2 # Makes the shadow monsters appear.
|
||||
nativeScaling: 2 # Aligns post processing and bloom.
|
||||
memcardFilters:
|
||||
memcardFilters: # Reads Shadow Hearts for extra items.
|
||||
- "SLUS-21041"
|
||||
- "SLUS-21044"
|
||||
- "SLUS-20347"
|
||||
SLUS-21045:
|
||||
name: "Conflict - Vietnam"
|
||||
region: "NTSC-U"
|
||||
@@ -70306,6 +70381,8 @@ SLUS-21209:
|
||||
gsHWFixes:
|
||||
alignSprite: 1 # Fixes vertical lines.
|
||||
textureInsideRT: 1 # Fixes corruption.
|
||||
halfPixelOffset: 4 # Aligns post bloom.
|
||||
nativeScaling: 2 # Fixes post effects.
|
||||
getSkipCount: "GSC_UrbanReign"
|
||||
SLUS-21212:
|
||||
name: "Spartan - Total Warrior"
|
||||
@@ -73012,8 +73089,6 @@ SLUS-21639:
|
||||
name: "NASCAR 08"
|
||||
region: "NTSC-U"
|
||||
compat: 5
|
||||
gsHWFixes:
|
||||
deinterlace: 8 # Game requires AdaptiveTFF de-interlacing when auto.
|
||||
SLUS-21640:
|
||||
name: "Rugby 08"
|
||||
region: "NTSC-U"
|
||||
@@ -73581,8 +73656,6 @@ SLUS-21744:
|
||||
name: "NASCAR 09"
|
||||
region: "NTSC-U"
|
||||
compat: 5
|
||||
gsHWFixes:
|
||||
deinterlace: 8 # Game requires AdaptiveTFF de-interlacing when auto.
|
||||
patches:
|
||||
1B6C22B9:
|
||||
content: |-
|
||||
@@ -75714,6 +75787,9 @@ TCES-52033:
|
||||
0DDA2728:
|
||||
content: |-
|
||||
author=YukiXXL
|
||||
// Cop2 problems.
|
||||
patch=0,EE,0038E8E8,word,48438000
|
||||
patch=0,EE,0038E8EC,word,4B06521B
|
||||
// Speed Correction (25 FPS)
|
||||
patch=1,EE,00175a7c,extended,00000019
|
||||
patch=1,EE,00175848,extended,00000019
|
||||
|
||||
Binary file not shown.
@@ -245,7 +245,8 @@
|
||||
03000000b62500000100000000000000,Gametel GT004 01,a:b3,b:b0,dpdown:b10,dpleft:b9,dpright:b8,dpup:b11,leftshoulder:b4,rightshoulder:b5,start:b7,x:b1,y:b2,platform:Windows,
|
||||
030000008f0e00001411000000000000,Gamo2 Divaller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows,
|
||||
03000000120c0000a857000000000000,Gator Claw,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Windows,
|
||||
03000000c9110000f055000000000000,GC100XF,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b2,y:b3,platform:Windows,
|
||||
03000000c21100000791000000000000,Be1 GC101 Controller 1.03,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b3,y:b0,platform:Windows,
|
||||
03000000c9110000f055000000000000,Be1 GC100XF Controller,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b2,y:b3,platform:Windows,
|
||||
030000008305000009a0000000000000,Genius,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b2,y:b3,platform:Windows,
|
||||
030000008305000031b0000000000000,Genius Maxfire Blaze 3,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b2,y:b3,platform:Windows,
|
||||
03000000451300000010000000000000,Genius Maxfire Grandias 12,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b2,y:b3,platform:Windows,
|
||||
@@ -695,6 +696,7 @@
|
||||
03000000730700000601000000000000,Sega Saturn Controller,a:b0,b:b1,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,lefttrigger:b7,leftx:a0,lefty:a1,rightshoulder:b5,righttrigger:b2,start:b9,x:b3,y:b4,platform:Windows,
|
||||
03000000b40400000a01000000000000,Sega Saturn Controller,a:b0,b:b1,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,leftshoulder:b6,lefttrigger:b7,rightshoulder:b5,righttrigger:b2,start:b8,x:b3,y:b4,platform:Windows,
|
||||
030000003b07000004a1000000000000,SFX,a:b0,b:b2,back:b7,leftshoulder:b6,lefttrigger:b4,leftx:a0,lefty:a1,rightshoulder:b9,righttrigger:b5,start:b8,x:b1,y:b3,platform:Windows,
|
||||
03000000632500002705000000000000,ShanWan Q36,a:b0,b:b1,x:b3,y:b4,leftshoulder:b6,rightshoulder:b7,lefttrigger:b8,righttrigger:b9,back:b10,start:b11,dpup:h0.1,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,platform:Windows,
|
||||
03000000f82100001900000000000000,Shogun Bros Chameleon X1,a:b2,b:b1,back:b9,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,lefttrigger:b4,leftx:a0,lefty:a1,rightshoulder:b7,righttrigger:b5,rightx:a2,righty:a3,start:b8,x:b3,y:b0,platform:Windows,
|
||||
03000000120c00001c1e000000000000,SnakeByte 4S PS4 Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,touchpad:b13,x:b0,y:b3,platform:Windows,
|
||||
03000000140300000918000000000000,SNES Controller,a:b0,b:b1,back:b6,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,leftshoulder:b4,rightshoulder:b5,start:b7,x:b2,y:b3,platform:Windows,
|
||||
@@ -1502,6 +1504,7 @@ xinput,XInput Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,
|
||||
05000000d6200000e589000001000000,Moga 2,a:b0,b:b1,back:b9,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b7,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b8,righttrigger:a4,rightx:a2,righty:a3,start:b6,x:b2,y:b3,platform:Linux,
|
||||
05000000d6200000ad0d000001000000,Moga Pro,a:b0,b:b1,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b7,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b8,righttrigger:a4,rightx:a2,righty:a3,start:b6,x:b2,y:b3,platform:Linux,
|
||||
05000000d62000007162000001000000,Moga Pro 2,a:b0,b:b1,back:b9,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b7,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b8,righttrigger:a4,rightx:a2,righty:a3,start:b6,x:b2,y:b3,platform:Linux,
|
||||
03000000c82d00000960000000000000,8BitDo Pro 3,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,paddle1:b17,paddle2:b16,paddle3:b2,paddle4:b5,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a3,righty:a4,start:b11,x:b4,y:b3,platform:Mac OS X,
|
||||
03000000c62400002b89000011010000,MOGA XP5A Plus,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,leftstick:b13,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:a4,rightx:a2,righty:a3,start:b11,x:b3,y:b4,platform:Linux,
|
||||
05000000c62400002a89000000010000,MOGA XP5A Plus,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b22,leftshoulder:b6,leftstick:b13,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:a4,rightx:a2,righty:a3,start:b11,x:b3,y:b4,platform:Linux,
|
||||
05000000c62400001a89000000010000,MOGA XP5X Plus,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,leftstick:b13,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:a4,rightx:a2,righty:a3,start:b11,x:b3,y:b4,platform:Linux,
|
||||
|
||||
@@ -71,6 +71,7 @@
|
||||
#define PS_DITHER 0
|
||||
#define PS_DITHER_ADJUST 0
|
||||
#define PS_ZCLAMP 0
|
||||
#define PS_ZFLOOR 0
|
||||
#define PS_SCANMSK 0
|
||||
#define PS_AUTOMATIC_LOD 0
|
||||
#define PS_MANUAL_LOD 0
|
||||
@@ -138,7 +139,7 @@ struct PS_OUTPUT
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
#if PS_ZCLAMP
|
||||
#if PS_ZCLAMP || PS_ZFLOOR
|
||||
float depth : SV_Depth;
|
||||
#endif
|
||||
};
|
||||
@@ -1209,8 +1210,16 @@ PS_OUTPUT ps_main(PS_INPUT input)
|
||||
|
||||
#endif // PS_DATE != 1/2
|
||||
|
||||
#if PS_ZFLOOR
|
||||
float depth_value = floor(input.p.z * exp2(32.0f)) * exp2(-32.0f);
|
||||
#else
|
||||
float depth_value = input.p.z;
|
||||
#endif
|
||||
|
||||
#if PS_ZCLAMP
|
||||
output.depth = min(input.p.z, MaxDepthPS);
|
||||
output.depth = min(depth_value, MaxDepthPS);
|
||||
#elif PS_ZFLOOR
|
||||
output.depth = depth_value;
|
||||
#endif
|
||||
|
||||
return output;
|
||||
|
||||
@@ -1143,7 +1143,16 @@ void ps_main()
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if PS_ZCLAMP
|
||||
gl_FragDepth = min(gl_FragCoord.z, MaxDepthPS);
|
||||
#if PS_ZFLOOR
|
||||
float depth_value = floor(gl_FragCoord.z * exp2(32.0f)) * exp2(-32.0f);
|
||||
#else
|
||||
float depth_value = gl_FragCoord.z;
|
||||
#endif
|
||||
|
||||
#if PS_ZCLAMP
|
||||
gl_FragDepth = min(depth_value, MaxDepthPS);
|
||||
#elif PS_ZFLOOR
|
||||
gl_FragDepth = depth_value;
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
@@ -288,6 +288,7 @@ void main()
|
||||
#define PS_DITHER 0
|
||||
#define PS_DITHER_ADJUST 0
|
||||
#define PS_ZCLAMP 0
|
||||
#define PS_ZFLOOR 0
|
||||
#define PS_FEEDBACK_LOOP 0
|
||||
#define PS_TEX_IS_FB 0
|
||||
#endif
|
||||
@@ -1400,8 +1401,16 @@ void main()
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if PS_ZFLOOR
|
||||
float depth_value = floor(gl_FragCoord.z * exp2(32.0f)) * exp2(-32.0f);;
|
||||
#else
|
||||
float depth_value = gl_FragCoord.z;
|
||||
#endif
|
||||
|
||||
#if PS_ZCLAMP
|
||||
gl_FragDepth = min(gl_FragCoord.z, MaxDepthPS);
|
||||
#elif PS_ZFLOOR
|
||||
gl_FragDepth = depth_value;
|
||||
#endif
|
||||
|
||||
#endif // PS_DATE
|
||||
|
||||
@@ -109,14 +109,14 @@ disable_compiler_warnings_for_target(speex)
|
||||
# Find the Qt components that we need.
|
||||
if(ENABLE_QT_UI)
|
||||
find_package(Qt6 6.10.0 COMPONENTS CoreTools Core GuiTools Gui WidgetsTools Widgets LinguistTools REQUIRED)
|
||||
endif()
|
||||
|
||||
if (Qt6_VERSION VERSION_GREATER_EQUAL 6.10.0)
|
||||
find_package(Qt6 COMPONENTS CorePrivate GuiPrivate WidgetsPrivate REQUIRED)
|
||||
endif()
|
||||
if (Qt6_VERSION VERSION_GREATER_EQUAL 6.10.0)
|
||||
find_package(Qt6 COMPONENTS CorePrivate GuiPrivate WidgetsPrivate REQUIRED)
|
||||
endif()
|
||||
|
||||
# The docking system for the debugger.
|
||||
# The docking system for the debugger.
|
||||
find_package(KDDockWidgets-qt6 2.3.0 REQUIRED)
|
||||
endif()
|
||||
|
||||
if(WIN32)
|
||||
add_subdirectory(3rdparty/rainterface EXCLUDE_FROM_ALL)
|
||||
|
||||
@@ -37,7 +37,7 @@ public:
|
||||
void restoreGeometry(const QByteArray& geometry);
|
||||
|
||||
Q_SIGNALS:
|
||||
void windowResizedEvent(int width, int height, float scale);
|
||||
void windowResizedEvent(u32 width, u32 height, float scale);
|
||||
void windowRestoredEvent();
|
||||
|
||||
void dragEnterEvent(QDragEnterEvent* event);
|
||||
|
||||
@@ -5,10 +5,14 @@
|
||||
#include "MainWindow.h"
|
||||
#include "QtHost.h"
|
||||
#include "SettingWidgetBinder.h"
|
||||
#include "VMManager.h"
|
||||
|
||||
#include <QtCore/QLatin1StringView>
|
||||
#include <QtCore/QUtf8StringView>
|
||||
#include <QtGui/QIcon>
|
||||
#include <QtWidgets/QCheckBox>
|
||||
#include <QtWidgets/QHBoxLayout>
|
||||
#include <QtWidgets/QLineEdit>
|
||||
#include <QtWidgets/QMenuBar>
|
||||
#include <QtWidgets/QScrollBar>
|
||||
|
||||
@@ -46,6 +50,12 @@ void LogWindow::updateSettings()
|
||||
const bool new_enabled = Host::GetBaseBoolSettingValue("Logging", "EnableLogWindow", false) && !Host::InNoGUIMode();
|
||||
const bool attach_to_main = Host::GetBaseBoolSettingValue("Logging", "AttachLogWindowToMainWindow", true);
|
||||
const bool curr_enabled = Log::IsHostOutputEnabled();
|
||||
const bool input_enabled = Host::GetBaseBoolSettingValue("Logging", "ShowEESIOInput");
|
||||
|
||||
if(g_log_window && g_log_window->m_line_input)
|
||||
{
|
||||
g_log_window->m_input_widget->setVisible(input_enabled);
|
||||
}
|
||||
|
||||
if (new_enabled == curr_enabled)
|
||||
{
|
||||
@@ -171,6 +181,10 @@ void LogWindow::createUi()
|
||||
action->setCheckable(true);
|
||||
SettingWidgetBinder::BindWidgetToBoolSetting(nullptr, action, "Logging", "EnableTimestamps", true);
|
||||
|
||||
action = settings_menu->addAction(tr("Show EE SIO &Input"));
|
||||
action->setCheckable(true);
|
||||
SettingWidgetBinder::BindWidgetToBoolSetting(nullptr, action, "Logging", "ShowEESIOInput", false);
|
||||
|
||||
settings_menu->addSeparator();
|
||||
|
||||
// TODO: Log Level
|
||||
@@ -181,6 +195,30 @@ void LogWindow::createUi()
|
||||
m_text->setTextInteractionFlags(Qt::TextSelectableByKeyboard | Qt::TextSelectableByMouse);
|
||||
m_text->setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOn);
|
||||
m_text->setWordWrapMode(QTextOption::WrapAnywhere);
|
||||
m_text->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
|
||||
|
||||
m_line_input = new QLineEdit(this);
|
||||
connect(m_line_input, &QLineEdit::returnPressed, this, &LogWindow::onInputEntered);
|
||||
|
||||
m_local_echo_checkbox = new QCheckBox(tr("Local Echo"), this);
|
||||
m_local_echo_checkbox->setChecked(m_local_echo);
|
||||
connect(m_local_echo_checkbox, &QCheckBox::checkStateChanged, this, [&](Qt::CheckState state)
|
||||
{
|
||||
m_local_echo = state == Qt::CheckState::Checked;
|
||||
});
|
||||
|
||||
m_newline_on_enter_checkbox = new QCheckBox(tr("Newline on send"), this);
|
||||
m_newline_on_enter_checkbox->setChecked(m_newline_on_enter);
|
||||
connect(m_newline_on_enter_checkbox, &QCheckBox::checkStateChanged, this, [&](Qt::CheckState state)
|
||||
{
|
||||
m_newline_on_enter = state == Qt::CheckState::Checked;
|
||||
});
|
||||
|
||||
m_input_hbox = new QHBoxLayout(this);
|
||||
m_input_hbox->addWidget(m_line_input, 1);
|
||||
m_input_hbox->addWidget(m_local_echo_checkbox);
|
||||
m_input_hbox->addWidget(m_newline_on_enter_checkbox);
|
||||
m_input_hbox->setSpacing(8);
|
||||
|
||||
#if defined(_WIN32)
|
||||
QFont font("Consolas");
|
||||
@@ -194,7 +232,19 @@ void LogWindow::createUi()
|
||||
#endif
|
||||
m_text->setFont(font);
|
||||
|
||||
setCentralWidget(m_text);
|
||||
QWidget* central_widget = new QWidget(this);
|
||||
m_input_widget = new QWidget(this);
|
||||
m_input_widget->setVisible(Host::GetBaseBoolSettingValue("Logging", "ShowEESIOInput"));
|
||||
m_input_widget->setLayout(m_input_hbox);
|
||||
|
||||
QVBoxLayout* vlayout = new QVBoxLayout(central_widget);
|
||||
vlayout->setContentsMargins(0, 0, 0, 0);
|
||||
vlayout->setSpacing(0);
|
||||
vlayout->addWidget(m_text);
|
||||
vlayout->addWidget(m_input_widget);
|
||||
|
||||
central_widget->setLayout(vlayout);
|
||||
setCentralWidget(central_widget);
|
||||
}
|
||||
|
||||
void LogWindow::onClearTriggered()
|
||||
@@ -361,6 +411,31 @@ void LogWindow::appendMessage(quint32 level, quint32 color, const QString& messa
|
||||
}
|
||||
}
|
||||
|
||||
void LogWindow::onInputEntered()
|
||||
{
|
||||
QString text = m_line_input->text();
|
||||
if (text.isEmpty() && !m_newline_on_enter)
|
||||
return;
|
||||
|
||||
if(m_newline_on_enter)
|
||||
text.append('\n');
|
||||
|
||||
std::string str = text.toUtf8().toStdString();
|
||||
|
||||
if(VMManager::WriteBytesToEESIORXFIFO({reinterpret_cast<const u8*>(str.data()), str.size()}))
|
||||
{
|
||||
m_line_input->clear();
|
||||
|
||||
if(m_local_echo)
|
||||
// appendMessage expects a newline to be at the end of the string
|
||||
appendMessage(0, 0, m_newline_on_enter ? text : (text + '\n') );
|
||||
|
||||
QTextCursor cursor(m_text->textCursor());
|
||||
cursor.movePosition(QTextCursor::End);
|
||||
m_text->setTextCursor(cursor);
|
||||
}
|
||||
}
|
||||
|
||||
void LogWindow::saveSize()
|
||||
{
|
||||
const int current_width = Host::GetBaseIntSettingValue("UI", "LogWindowWidth", DEFAULT_WIDTH);
|
||||
|
||||
@@ -5,6 +5,9 @@
|
||||
|
||||
#include "common/Console.h"
|
||||
|
||||
#include <QtWidgets/QCheckBox>
|
||||
#include <QtWidgets/QHBoxLayout>
|
||||
#include <QtWidgets/QLineEdit>
|
||||
#include <QtWidgets/QMainWindow>
|
||||
#include <QtWidgets/QPlainTextEdit>
|
||||
|
||||
@@ -36,6 +39,7 @@ private Q_SLOTS:
|
||||
void onClearTriggered();
|
||||
void onSaveTriggered();
|
||||
void appendMessage(quint32 level, quint32 color, const QString& message);
|
||||
void onInputEntered();
|
||||
|
||||
private:
|
||||
static constexpr int DEFAULT_WIDTH = 750;
|
||||
@@ -45,8 +49,15 @@ private:
|
||||
void restoreSize();
|
||||
|
||||
QPlainTextEdit* m_text;
|
||||
QLineEdit* m_line_input;
|
||||
QMenu* m_level_menu;
|
||||
QWidget* m_input_widget;
|
||||
QHBoxLayout* m_input_hbox;
|
||||
QCheckBox* m_local_echo_checkbox;
|
||||
QCheckBox* m_newline_on_enter_checkbox;
|
||||
|
||||
bool m_local_echo = false;
|
||||
bool m_newline_on_enter = true;
|
||||
bool m_attached_to_main_window = true;
|
||||
bool m_destroying = false;
|
||||
};
|
||||
|
||||
@@ -777,7 +777,7 @@ void EmuThread::connectDisplaySignals(DisplaySurface* widget)
|
||||
connect(widget, &DisplaySurface::windowRestoredEvent, this, &EmuThread::redrawDisplayWindow);
|
||||
}
|
||||
|
||||
void EmuThread::onDisplayWindowResized(int width, int height, float scale)
|
||||
void EmuThread::onDisplayWindowResized(u32 width, u32 height, float scale)
|
||||
{
|
||||
if (!MTGS::IsOpen())
|
||||
return;
|
||||
|
||||
@@ -191,7 +191,7 @@ private:
|
||||
private Q_SLOTS:
|
||||
void stopInThread();
|
||||
void doBackgroundControllerPoll();
|
||||
void onDisplayWindowResized(int width, int height, float scale);
|
||||
void onDisplayWindowResized(u32 width, u32 height, float scale);
|
||||
void onApplicationStateChanged(Qt::ApplicationState state);
|
||||
void redrawDisplayWindow();
|
||||
|
||||
|
||||
@@ -67,6 +67,17 @@ struct KeyCodeName
|
||||
const char* icon_name;
|
||||
};
|
||||
|
||||
// Extended keys for left/right versions, Non conflicting with Qt::Key enum
|
||||
enum ExtendedKeys
|
||||
{
|
||||
Key_RightShift = 0x01100022,
|
||||
Key_LeftShift = 0x01100023,
|
||||
Key_RightControl = 0x01100024,
|
||||
Key_LeftControl = 0x01100025,
|
||||
Key_RightAlt = 0x01100026,
|
||||
Key_LeftAlt = 0x01100027,
|
||||
};
|
||||
|
||||
static constexpr const KeyCodeName s_qt_key_names[] = {
|
||||
{Qt::Key_Escape, "Escape", ICON_PF_ESC},
|
||||
{Qt::Key_Tab, "Tab", ICON_PF_TAB},
|
||||
@@ -92,6 +103,13 @@ static constexpr const KeyCodeName s_qt_key_names[] = {
|
||||
{Qt::Key_Control, "Control", ICON_PF_CTRL},
|
||||
{Qt::Key_Meta, "Meta", ICON_PF_SUPER},
|
||||
{Qt::Key_Alt, "Alt", ICON_PF_ALT},
|
||||
// patch for left and right versions of the keys
|
||||
{ExtendedKeys::Key_LeftShift, "LShift", ICON_PF_SHIFT},
|
||||
{ExtendedKeys::Key_RightShift, "RShift", ICON_PF_SHIFT},
|
||||
{ExtendedKeys::Key_LeftControl, "LCtrl", ICON_PF_CTRL},
|
||||
{ExtendedKeys::Key_RightControl, "RCtrl", ICON_PF_CTRL},
|
||||
{ExtendedKeys::Key_LeftAlt, "LAlt", ICON_PF_ALT},
|
||||
{ExtendedKeys::Key_RightAlt, "RAlt", ICON_PF_ALT},
|
||||
{Qt::Key_CapsLock, "CapsLock", ICON_PF_CAPS},
|
||||
{Qt::Key_NumLock, "NumLock", ICON_PF_NUMLOCK},
|
||||
{Qt::Key_ScrollLock, "ScrollLock", ICON_PF_SCRLK},
|
||||
@@ -575,6 +593,41 @@ u32 QtUtils::KeyEventToCode(const QKeyEvent* ev)
|
||||
const u8 keycode = set_keycode ? map_text_to_keycode(text) : 0;
|
||||
int key = ev->key();
|
||||
|
||||
if (key == Qt::Key_Shift || key == Qt::Key_Alt || key == Qt::Key_Control)
|
||||
{
|
||||
#if defined(Q_OS_WIN) or defined(Q_OS_LINUX)
|
||||
// Scan codes (Tested it)
|
||||
// 0x2A : Left shift
|
||||
// 0x36 : Right shift
|
||||
// 0x1D : Left ctrl
|
||||
// 0xE01D : Right ctrl
|
||||
// 0x38 : Left alt
|
||||
// right alt can become ctrl + right alt in some keyboard layouts (windows)
|
||||
// but thats fine for our use case
|
||||
switch (ev->nativeScanCode())
|
||||
{
|
||||
case 0x2A:
|
||||
key = ExtendedKeys::Key_LeftShift;
|
||||
break;
|
||||
case 0x36:
|
||||
key = ExtendedKeys::Key_RightShift;
|
||||
break;
|
||||
case 0x1D:
|
||||
key = ExtendedKeys::Key_LeftControl;
|
||||
break;
|
||||
case 0xE01D:
|
||||
key = ExtendedKeys::Key_RightControl;
|
||||
break;
|
||||
case 0x38:
|
||||
key = ExtendedKeys::Key_LeftAlt;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
#endif
|
||||
}
|
||||
|
||||
if (keycode != 0)
|
||||
key = keycode; // Override key if mapped
|
||||
|
||||
|
||||
@@ -463,7 +463,7 @@ namespace SettingWidgetBinder
|
||||
{
|
||||
if (!isNullable(widget))
|
||||
{
|
||||
widget->connect(widget, QOverload<int>::of(&QSpinBox::valueChanged), func);
|
||||
widget->connect(widget, &QSpinBox::valueChanged, func);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -591,7 +591,7 @@ namespace SettingWidgetBinder
|
||||
{
|
||||
if (!isNullable(widget))
|
||||
{
|
||||
widget->connect(widget, QOverload<double>::of(&QDoubleSpinBox::valueChanged), func);
|
||||
widget->connect(widget, &QDoubleSpinBox::valueChanged, func);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -608,7 +608,7 @@ namespace SettingWidgetBinder
|
||||
});
|
||||
menu.exec(widget->mapToGlobal(pt));
|
||||
});
|
||||
widget->connect(widget, QOverload<double>::of(&QDoubleSpinBox::valueChanged), widget, [widget, func = std::move(func)]() {
|
||||
widget->connect(widget, &QDoubleSpinBox::valueChanged, widget, [widget, func = std::move(func)]() {
|
||||
if (widget->property(IS_NULL_PROPERTY).toBool())
|
||||
{
|
||||
widget->setProperty(IS_NULL_PROPERTY, QVariant(false));
|
||||
|
||||
@@ -42,9 +42,9 @@ AdvancedSettingsWidget::AdvancedSettingsWidget(SettingsWindow* settings_dialog,
|
||||
m_ui.eeClampMode->setCurrentIndex(getClampingModeIndex(-1));
|
||||
m_ui.vu0ClampMode->setCurrentIndex(getClampingModeIndex(0));
|
||||
m_ui.vu1ClampMode->setCurrentIndex(getClampingModeIndex(1));
|
||||
connect(m_ui.eeClampMode, QOverload<int>::of(&QComboBox::currentIndexChanged), [this](int index) { setClampingMode(-1, index); });
|
||||
connect(m_ui.vu0ClampMode, QOverload<int>::of(&QComboBox::currentIndexChanged), [this](int index) { setClampingMode(0, index); });
|
||||
connect(m_ui.vu1ClampMode, QOverload<int>::of(&QComboBox::currentIndexChanged), [this](int index) { setClampingMode(1, index); });
|
||||
connect(m_ui.eeClampMode, &QComboBox::currentIndexChanged, [this](int index) { setClampingMode(-1, index); });
|
||||
connect(m_ui.vu0ClampMode, &QComboBox::currentIndexChanged, [this](int index) { setClampingMode(0, index); });
|
||||
connect(m_ui.vu1ClampMode, &QComboBox::currentIndexChanged, [this](int index) { setClampingMode(1, index); });
|
||||
|
||||
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.iopRecompiler, "EmuCore/CPU/Recompiler", "EnableIOP", true);
|
||||
|
||||
@@ -60,7 +60,7 @@ AdvancedSettingsWidget::AdvancedSettingsWidget(SettingsWindow* settings_dialog,
|
||||
SettingWidgetBinder::BindWidgetToIntSetting(
|
||||
sif, m_ui.savestateCompressionLevel, "EmuCore", "SavestateCompressionRatio", static_cast<int>(SavestateCompressionLevel::Medium));
|
||||
|
||||
connect(m_ui.savestateCompressionMethod, QOverload<int>::of(&QComboBox::currentIndexChanged), this,
|
||||
connect(m_ui.savestateCompressionMethod, &QComboBox::currentIndexChanged, this,
|
||||
&AdvancedSettingsWidget::onSavestateCompressionTypeChanged);
|
||||
|
||||
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.backupSaveStates, "EmuCore", "BackupSavestate", true);
|
||||
|
||||
@@ -49,7 +49,7 @@ ControllerBindingWidget::ControllerBindingWidget(QWidget* parent, ControllerSett
|
||||
ControllerSettingWidgetBinder::BindWidgetToInputProfileString(m_dialog->getProfileSettingsInterface(),
|
||||
m_ui.controllerType, m_config_section, "Type", Pad::GetControllerInfo(Pad::GetDefaultPadType(port))->name);
|
||||
|
||||
connect(m_ui.controllerType, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &ControllerBindingWidget::onTypeChanged);
|
||||
connect(m_ui.controllerType, &QComboBox::currentIndexChanged, this, &ControllerBindingWidget::onTypeChanged);
|
||||
connect(m_ui.bindings, &QPushButton::clicked, this, &ControllerBindingWidget::onBindingsClicked);
|
||||
connect(m_ui.settings, &QPushButton::clicked, this, &ControllerBindingWidget::onSettingsClicked);
|
||||
connect(m_ui.macros, &QPushButton::clicked, this, &ControllerBindingWidget::onMacrosClicked);
|
||||
@@ -1002,8 +1002,8 @@ USBDeviceWidget::USBDeviceWidget(QWidget* parent, ControllerSettingsWindow* dial
|
||||
ControllerSettingWidgetBinder::BindWidgetToInputProfileString(
|
||||
m_dialog->getProfileSettingsInterface(), m_ui.deviceType, m_config_section, "Type", "None");
|
||||
|
||||
connect(m_ui.deviceType, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &USBDeviceWidget::onTypeChanged);
|
||||
connect(m_ui.deviceSubtype, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &USBDeviceWidget::onSubTypeChanged);
|
||||
connect(m_ui.deviceType, &QComboBox::currentIndexChanged, this, &USBDeviceWidget::onTypeChanged);
|
||||
connect(m_ui.deviceSubtype, &QComboBox::currentIndexChanged, this, &USBDeviceWidget::onSubTypeChanged);
|
||||
connect(m_ui.bindings, &QPushButton::clicked, this, &USBDeviceWidget::onBindingsClicked);
|
||||
connect(m_ui.settings, &QPushButton::clicked, this, &USBDeviceWidget::onSettingsClicked);
|
||||
connect(m_ui.automaticBinding, &QPushButton::clicked, this, &USBDeviceWidget::onAutomaticBindingClicked);
|
||||
|
||||
@@ -62,8 +62,8 @@ DEV9SettingsWidget::DEV9SettingsWidget(SettingsWindow* settings_dialog, QWidget*
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
// Eth Device Settings
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
connect(m_ui.ethDevType, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &DEV9SettingsWidget::onEthDeviceTypeChanged);
|
||||
connect(m_ui.ethDev, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &DEV9SettingsWidget::onEthDeviceChanged);
|
||||
connect(m_ui.ethDevType, &QComboBox::currentIndexChanged, this, &DEV9SettingsWidget::onEthDeviceTypeChanged);
|
||||
connect(m_ui.ethDev, &QComboBox::currentIndexChanged, this, &DEV9SettingsWidget::onEthDeviceChanged);
|
||||
//Comboboxes populated in show event
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
@@ -125,12 +125,12 @@ DEV9SettingsWidget::DEV9SettingsWidget(SettingsWindow* settings_dialog, QWidget*
|
||||
SettingWidgetBinder::BindWidgetToEnumSetting(sif, m_ui.ethDNS1Mode, "DEV9/Eth", "ModeDNS1",
|
||||
s_dns_name, Pcsx2Config::DEV9Options::DnsModeNames, Pcsx2Config::DEV9Options::DnsModeNames[static_cast<int>(Pcsx2Config::DEV9Options::DnsMode::Auto)], "DEV9SettingsWidget");
|
||||
onEthDNSModeChanged(m_ui.ethDNS1Mode, m_ui.ethDNS1Mode->currentIndex(), m_ui.ethDNS1Addr, "DEV9/Eth", "ModeDNS1");
|
||||
connect(m_ui.ethDNS1Mode, QOverload<int>::of(&QComboBox::currentIndexChanged), this, [&](int index) { onEthDNSModeChanged(m_ui.ethDNS1Mode, index, m_ui.ethDNS1Addr, "DEV9/Eth", "ModeDNS1"); });
|
||||
connect(m_ui.ethDNS1Mode, &QComboBox::currentIndexChanged, this, [&](int index) { onEthDNSModeChanged(m_ui.ethDNS1Mode, index, m_ui.ethDNS1Addr, "DEV9/Eth", "ModeDNS1"); });
|
||||
|
||||
SettingWidgetBinder::BindWidgetToEnumSetting(sif, m_ui.ethDNS2Mode, "DEV9/Eth", "ModeDNS2",
|
||||
s_dns_name, Pcsx2Config::DEV9Options::DnsModeNames, Pcsx2Config::DEV9Options::DnsModeNames[static_cast<int>(Pcsx2Config::DEV9Options::DnsMode::Auto)], "DEV9SettingsWidget");
|
||||
onEthDNSModeChanged(m_ui.ethDNS2Mode, m_ui.ethDNS2Mode->currentIndex(), m_ui.ethDNS2Addr, "DEV9/Eth", "ModeDNS2");
|
||||
connect(m_ui.ethDNS2Mode, QOverload<int>::of(&QComboBox::currentIndexChanged), this, [&](int index) { onEthDNSModeChanged(m_ui.ethDNS2Mode, index, m_ui.ethDNS2Addr, "DEV9/Eth", "ModeDNS2"); });
|
||||
connect(m_ui.ethDNS2Mode, &QComboBox::currentIndexChanged, this, [&](int index) { onEthDNSModeChanged(m_ui.ethDNS2Mode, index, m_ui.ethDNS2Addr, "DEV9/Eth", "ModeDNS2"); });
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
// DNS Settings
|
||||
@@ -144,7 +144,7 @@ DEV9SettingsWidget::DEV9SettingsWidget(SettingsWindow* settings_dialog, QWidget*
|
||||
headers.push_back(tr("Enabled"));
|
||||
m_ethHost_model->setHorizontalHeaderLabels(headers);
|
||||
|
||||
connect(m_ethHost_model, QOverload<QStandardItem*>::of(&QStandardItemModel::itemChanged), this, &DEV9SettingsWidget::onEthHostEdit);
|
||||
connect(m_ethHost_model, &QStandardItemModel::itemChanged, this, &DEV9SettingsWidget::onEthHostEdit);
|
||||
|
||||
m_ethHosts_proxy = new QSortFilterProxyModel(m_ui.ethHosts);
|
||||
m_ethHosts_proxy->setSourceModel(m_ethHost_model);
|
||||
@@ -186,7 +186,7 @@ DEV9SettingsWidget::DEV9SettingsWidget(SettingsWindow* settings_dialog, QWidget*
|
||||
connect(m_ui.hddFile, &QLineEdit::editingFinished, this, &DEV9SettingsWidget::onHddFileEdit);
|
||||
connect(m_ui.hddBrowseFile, &QPushButton::clicked, this, &DEV9SettingsWidget::onHddBrowseFileClicked);
|
||||
|
||||
connect(m_ui.hddSizeSlider, QOverload<int>::of(&QSlider::valueChanged), this, &DEV9SettingsWidget::onHddSizeSlide);
|
||||
connect(m_ui.hddSizeSlider, &QSlider::valueChanged, this, &DEV9SettingsWidget::onHddSizeSlide);
|
||||
SettingWidgetBinder::SettingAccessor<QSpinBox>::connectValueChanged(m_ui.hddSizeSpinBox, [&]() { onHddSizeAccessorSpin(); });
|
||||
|
||||
connect(m_ui.hddCreate, &QPushButton::clicked, this, &DEV9SettingsWidget::onHddCreateClicked);
|
||||
|
||||
@@ -94,7 +94,7 @@ EmulationSettingsWidget::EmulationSettingsWidget(SettingsWindow* settings_dialog
|
||||
const std::optional<int> cycle_rate =
|
||||
dialog()->getIntValue("EmuCore/Speedhacks", "EECycleRate", sif ? std::nullopt : std::optional<int>(DEFAULT_EE_CYCLE_RATE));
|
||||
m_ui.eeCycleRate->setCurrentIndex(cycle_rate.has_value() ? (std::clamp(cycle_rate.value(), MINIMUM_EE_CYCLE_RATE, MAXIMUM_EE_CYCLE_RATE) + (0 - MINIMUM_EE_CYCLE_RATE) + static_cast<int>(dialog()->isPerGameSettings())) : 0);
|
||||
connect(m_ui.eeCycleRate, QOverload<int>::of(&QComboBox::currentIndexChanged), this, [&](int index) {
|
||||
connect(m_ui.eeCycleRate, &QComboBox::currentIndexChanged, this, [&](int index) {
|
||||
std::optional<int> value;
|
||||
if (!dialog()->isPerGameSettings() || index > 0)
|
||||
value = MINIMUM_EE_CYCLE_RATE + index - static_cast<int>(dialog()->isPerGameSettings());
|
||||
@@ -218,7 +218,7 @@ void EmulationSettingsWidget::initializeSpeedCombo(QComboBox* cb, const char* se
|
||||
cb->setCurrentIndex(custom_index);
|
||||
}
|
||||
|
||||
connect(cb, QOverload<int>::of(&QComboBox::currentIndexChanged), this,
|
||||
connect(cb, &QComboBox::currentIndexChanged, this,
|
||||
[this, cb, section, key](int index) { handleSpeedComboChange(cb, section, key); });
|
||||
}
|
||||
|
||||
|
||||
@@ -14,8 +14,31 @@
|
||||
<string/>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout" columnstretch="0,1">
|
||||
<item row="3" column="1">
|
||||
<widget class="QComboBox" name="hwAutoFlush">
|
||||
<item row="8" column="0">
|
||||
<spacer name="verticalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Orientation::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="6" column="0">
|
||||
<widget class="QLabel" name="skipDrawLabel">
|
||||
<property name="text">
|
||||
<string>Skip Draw Range:</string>
|
||||
</property>
|
||||
<property name="buddy">
|
||||
<cstring>skipDrawStart</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="1">
|
||||
<widget class="QComboBox" name="textureInsideRt">
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Disabled (Default)</string>
|
||||
@@ -23,12 +46,12 @@
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Enabled (Sprites Only)</string>
|
||||
<string>Inside Target</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Enabled (All Primitives)</string>
|
||||
<string>Merge Targets</string>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
@@ -43,41 +66,6 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="0">
|
||||
<widget class="QLabel" name="skipDrawLabel">
|
||||
<property name="text">
|
||||
<string>Skip Draw Range:</string>
|
||||
</property>
|
||||
<property name="buddy">
|
||||
<cstring>skipDrawStart</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QComboBox" name="cpuCLUTRender">
|
||||
<property name="currentText">
|
||||
<string extracomment="0 (Disabled)">0 (Disabled)</string>
|
||||
</property>
|
||||
<property name="currentIndex">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>0 (Disabled)</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>1 (Normal)</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>2 (Aggressive)</string>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<layout class="QHBoxLayout" name="cpuCLUTRenderLayout" stretch="0,0">
|
||||
<item>
|
||||
@@ -160,8 +148,36 @@
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="4" column="1">
|
||||
<widget class="QComboBox" name="textureInsideRt">
|
||||
<item row="3" column="0">
|
||||
<widget class="QLabel" name="hwAutoFlushLabel">
|
||||
<property name="text">
|
||||
<string>Auto Flush:</string>
|
||||
</property>
|
||||
<property name="buddy">
|
||||
<cstring>hwAutoFlush</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="6" column="1">
|
||||
<layout class="QHBoxLayout" name="skipDrawLayout">
|
||||
<item>
|
||||
<widget class="QSpinBox" name="skipDrawStart">
|
||||
<property name="maximum">
|
||||
<number>10000</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QSpinBox" name="skipDrawEnd">
|
||||
<property name="maximum">
|
||||
<number>10000</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<widget class="QComboBox" name="gpuTargetCLUTMode">
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Disabled (Default)</string>
|
||||
@@ -169,12 +185,57 @@
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Inside Target</string>
|
||||
<string>Enabled (Exact Match)</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Merge Targets</string>
|
||||
<string>Enabled (Check Inside Target)</string>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="cpuCLUTRenderLabel">
|
||||
<property name="text">
|
||||
<string>CPU Sprite Render Size:</string>
|
||||
</property>
|
||||
<property name="buddy">
|
||||
<cstring>cpuSpriteRenderBW</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QLabel" name="gpuTargetCLUTLabel">
|
||||
<property name="text">
|
||||
<string extracomment="CLUT: Color Look Up Table, often referred to as a palette in non-PS2 things. GPU Target CLUT: GPU handling of when a game uses data from a render target as a CLUT.">GPU Target CLUT:</string>
|
||||
</property>
|
||||
<property name="buddy">
|
||||
<cstring>gpuTargetCLUTMode</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QComboBox" name="cpuCLUTRender">
|
||||
<property name="currentText">
|
||||
<string extracomment="0 (Disabled)">0 (Disabled)</string>
|
||||
</property>
|
||||
<property name="currentIndex">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>0 (Disabled)</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>1 (Normal)</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>2 (Aggressive)</string>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
@@ -189,7 +250,26 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="6" column="0" colspan="2">
|
||||
<item row="3" column="1">
|
||||
<widget class="QComboBox" name="hwAutoFlush">
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Disabled (Default)</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Enabled (Sprites Only)</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Enabled (All Primitives)</string>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="7" column="0" colspan="2">
|
||||
<layout class="QGridLayout" name="hwFixesLayout">
|
||||
<item row="4" column="0">
|
||||
<widget class="QCheckBox" name="estimateTextureRegion">
|
||||
@@ -256,28 +336,8 @@
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="3" column="0">
|
||||
<widget class="QLabel" name="hwAutoFlushLabel">
|
||||
<property name="text">
|
||||
<string>Auto Flush:</string>
|
||||
</property>
|
||||
<property name="buddy">
|
||||
<cstring>hwAutoFlush</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QLabel" name="gpuTargetCLUTLabel">
|
||||
<property name="text">
|
||||
<string extracomment="CLUT: Color Look Up Table, often referred to as a palette in non-PS2 things. GPU Target CLUT: GPU handling of when a game uses data from a render target as a CLUT.">GPU Target CLUT:</string>
|
||||
</property>
|
||||
<property name="buddy">
|
||||
<cstring>gpuTargetCLUTMode</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<widget class="QComboBox" name="gpuTargetCLUTMode">
|
||||
<item row="5" column="1">
|
||||
<widget class="QComboBox" name="limit24BitDepth">
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Disabled (Default)</string>
|
||||
@@ -285,57 +345,23 @@
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Enabled (Exact Match)</string>
|
||||
<string>Prioritize Upper Bits</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Enabled (Check Inside Target)</string>
|
||||
<string>Prioritize Lower Bits</string>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="cpuCLUTRenderLabel">
|
||||
<item row="5" column="0">
|
||||
<widget class="QLabel" name="limitDepthLabel">
|
||||
<property name="text">
|
||||
<string>CPU Sprite Render Size:</string>
|
||||
</property>
|
||||
<property name="buddy">
|
||||
<cstring>cpuSpriteRenderBW</cstring>
|
||||
<string>Limit Depth to 24 Bits</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="1">
|
||||
<layout class="QHBoxLayout" name="skipDrawLayout">
|
||||
<item>
|
||||
<widget class="QSpinBox" name="skipDrawStart">
|
||||
<property name="maximum">
|
||||
<number>10000</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QSpinBox" name="skipDrawEnd">
|
||||
<property name="maximum">
|
||||
<number>10000</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="7" column="0">
|
||||
<spacer name="verticalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Orientation::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<tabstops>
|
||||
|
||||
@@ -23,7 +23,7 @@ static constexpr RendererInfo s_renderer_info[] = {
|
||||
{QT_TRANSLATE_NOOP("GraphicsSettingsWidget", "Automatic (Default)"), GSRendererType::Auto},
|
||||
#ifdef _WIN32
|
||||
//: Graphics backend/engine type. Leave as-is.
|
||||
{QT_TRANSLATE_NOOP("GraphicsSettingsWidget", "Direct3D 11"), GSRendererType::DX11},
|
||||
{QT_TRANSLATE_NOOP("GraphicsSettingsWidget", "Direct3D 11 (Legacy)"), GSRendererType::DX11},
|
||||
//: Graphics backend/engine type. Leave as-is.
|
||||
{QT_TRANSLATE_NOOP("GraphicsSettingsWidget", "Direct3D 12"), GSRendererType::DX12},
|
||||
#endif
|
||||
@@ -99,7 +99,7 @@ GraphicsSettingsWidget::GraphicsSettingsWidget(SettingsWindow* settings_dialog,
|
||||
SettingWidgetBinder::BindWidgetToIntSetting(sif, m_display.cropBottom, "EmuCore/GS", "CropBottom", 0);
|
||||
|
||||
connect(
|
||||
m_display.fullscreenModes, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &GraphicsSettingsWidget::onFullscreenModeChanged);
|
||||
m_display.fullscreenModes, &QComboBox::currentIndexChanged, this, &GraphicsSettingsWidget::onFullscreenModeChanged);
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
// HW Settings
|
||||
@@ -114,9 +114,9 @@ GraphicsSettingsWidget::GraphicsSettingsWidget(SettingsWindow* settings_dialog,
|
||||
SettingWidgetBinder::BindWidgetToIntSetting(
|
||||
sif, m_hw.blending, "EmuCore/GS", "accurate_blending_unit", static_cast<int>(AccBlendLevel::Basic));
|
||||
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_hw.enableHWFixes, "EmuCore/GS", "UserHacks", false);
|
||||
connect(m_hw.upscaleMultiplier, QOverload<int>::of(&QComboBox::currentIndexChanged), this,
|
||||
connect(m_hw.upscaleMultiplier, &QComboBox::currentIndexChanged, this,
|
||||
&GraphicsSettingsWidget::onUpscaleMultiplierChanged);
|
||||
connect(m_hw.trilinearFiltering, QOverload<int>::of(&QComboBox::currentIndexChanged), this,
|
||||
connect(m_hw.trilinearFiltering, &QComboBox::currentIndexChanged, this,
|
||||
&GraphicsSettingsWidget::onTrilinearFilteringChanged);
|
||||
onTrilinearFilteringChanged();
|
||||
|
||||
@@ -147,10 +147,12 @@ GraphicsSettingsWidget::GraphicsSettingsWidget(SettingsWindow* settings_dialog,
|
||||
sif, m_fixes.disablePartialInvalidation, "EmuCore/GS", "UserHacks_DisablePartialInvalidation", false);
|
||||
SettingWidgetBinder::BindWidgetToIntSetting(
|
||||
sif, m_fixes.textureInsideRt, "EmuCore/GS", "UserHacks_TextureInsideRt", static_cast<int>(GSTextureInRtMode::Disabled));
|
||||
SettingWidgetBinder::BindWidgetToIntSetting(
|
||||
sif, m_fixes.limit24BitDepth, "EmuCore/GS", "UserHacks_Limit24BitDepth", static_cast<int>(GSLimit24BitDepth::Disabled));
|
||||
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_fixes.readTCOnClose, "EmuCore/GS", "UserHacks_ReadTCOnClose", false);
|
||||
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_fixes.estimateTextureRegion, "EmuCore/GS", "UserHacks_EstimateTextureRegion", false);
|
||||
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_fixes.gpuPaletteConversion, "EmuCore/GS", "paltex", false);
|
||||
connect(m_fixes.cpuSpriteRenderBW, QOverload<int>::of(&QComboBox::currentIndexChanged), this,
|
||||
connect(m_fixes.cpuSpriteRenderBW, &QComboBox::currentIndexChanged, this,
|
||||
&GraphicsSettingsWidget::onCPUSpriteRenderBWChanged);
|
||||
connect(m_fixes.gpuPaletteConversion, &QCheckBox::checkStateChanged, this, &GraphicsSettingsWidget::onGpuPaletteConversionChanged);
|
||||
onCPUSpriteRenderBWChanged();
|
||||
@@ -295,8 +297,8 @@ GraphicsSettingsWidget::GraphicsSettingsWidget(SettingsWindow* settings_dialog,
|
||||
m_header.rendererDropdown->setCurrentIndex(0);
|
||||
}
|
||||
|
||||
connect(m_header.rendererDropdown, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &GraphicsSettingsWidget::onRendererChanged);
|
||||
connect(m_header.adapterDropdown, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &GraphicsSettingsWidget::onAdapterChanged);
|
||||
connect(m_header.rendererDropdown, &QComboBox::currentIndexChanged, this, &GraphicsSettingsWidget::onRendererChanged);
|
||||
connect(m_header.adapterDropdown, &QComboBox::currentIndexChanged, this, &GraphicsSettingsWidget::onAdapterChanged);
|
||||
connect(m_hw.enableHWFixes, &QCheckBox::checkStateChanged, this, &GraphicsSettingsWidget::updateRendererDependentOptions);
|
||||
connect(m_advanced.extendedUpscales, &QCheckBox::checkStateChanged, this, &GraphicsSettingsWidget::updateRendererDependentOptions);
|
||||
connect(m_hw.textureFiltering, &QComboBox::currentIndexChanged, this, &GraphicsSettingsWidget::onTextureFilteringChange);
|
||||
@@ -624,6 +626,9 @@ GraphicsSettingsWidget::GraphicsSettingsWidget(SettingsWindow* settings_dialog,
|
||||
dialog()->registerWidgetHelp(m_fixes.textureInsideRt, tr("Texture Inside RT"), tr("Disabled"),
|
||||
tr("Allows the texture cache to reuse as an input texture the inner portion of a previous framebuffer."));
|
||||
|
||||
dialog()->registerWidgetHelp(m_fixes.limit24BitDepth, tr("Limit Depth to 24 Bits"), tr("Disabled"),
|
||||
tr("Truncate 32-bit depth values to 24 bits. Helps games struggling with Z-fighting."));
|
||||
|
||||
dialog()->registerWidgetHelp(m_fixes.readTCOnClose, tr("Read Targets When Closing"), tr("Unchecked"),
|
||||
tr("Flushes all targets in the texture cache back to local memory when shutting down. Can prevent lost visuals when saving "
|
||||
"state or switching graphics APIs, but can also cause graphical corruption."));
|
||||
|
||||
@@ -133,18 +133,18 @@ InterfaceSettingsWidget::InterfaceSettingsWidget(SettingsWindow* settings_dialog
|
||||
|
||||
SettingWidgetBinder::BindWidgetToEnumSetting(sif, m_ui.theme, "UI", "Theme", THEME_NAMES, THEME_VALUES,
|
||||
QtHost::GetDefaultThemeName(), "InterfaceSettingsWidget");
|
||||
connect(m_ui.theme, QOverload<int>::of(&QComboBox::currentIndexChanged), [this]() { emit themeChanged(); });
|
||||
connect(m_ui.theme, &QComboBox::currentIndexChanged, [this]() { emit themeChanged(); });
|
||||
|
||||
SettingWidgetBinder::BindWidgetToFloatSetting(sif, m_ui.backgroundOpacity, "UI", "GameListBackgroundOpacity", 100.0f);
|
||||
SettingWidgetBinder::BindWidgetToEnumSetting(sif, m_ui.backgroundScale, "UI", "GameListBackgroundMode", BACKGROUND_SCALE_NAMES, QtUtils::ScalingMode::Fit);
|
||||
connect(m_ui.backgroundBrowse, &QPushButton::clicked, [this]() { onSetGameListBackgroundTriggered(); });
|
||||
connect(m_ui.backgroundReset, &QPushButton::clicked, [this]() { onClearGameListBackgroundTriggered(); });
|
||||
connect(m_ui.backgroundOpacity, &QSpinBox::editingFinished, [this]() { emit backgroundChanged(); });
|
||||
connect(m_ui.backgroundScale, QOverload<int>::of(&QComboBox::currentIndexChanged), [this]() { emit backgroundChanged(); });
|
||||
connect(m_ui.backgroundScale, &QComboBox::currentIndexChanged, [this]() { emit backgroundChanged(); });
|
||||
|
||||
populateLanguages();
|
||||
SettingWidgetBinder::BindWidgetToStringSetting(sif, m_ui.language, "UI", "Language", QtHost::GetDefaultLanguage());
|
||||
connect(m_ui.language, QOverload<int>::of(&QComboBox::currentIndexChanged), [this]() { emit languageChanged(); });
|
||||
connect(m_ui.language, &QComboBox::currentIndexChanged, [this]() { emit languageChanged(); });
|
||||
|
||||
// Per-game settings is special, we don't want to bind it if we're editing per-game settings.
|
||||
if (!dialog()->isPerGameSettings())
|
||||
|
||||
@@ -176,7 +176,7 @@ void SetupWizardDialog::setupLanguagePage()
|
||||
{
|
||||
SettingWidgetBinder::BindWidgetToEnumSetting(nullptr, m_ui.theme, "UI", "Theme",
|
||||
InterfaceSettingsWidget::THEME_NAMES, InterfaceSettingsWidget::THEME_VALUES, QtHost::GetDefaultThemeName(), "InterfaceSettingsWidget");
|
||||
connect(m_ui.theme, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &SetupWizardDialog::themeChanged);
|
||||
connect(m_ui.theme, &QComboBox::currentIndexChanged, this, &SetupWizardDialog::themeChanged);
|
||||
|
||||
for (const std::pair<QString, QString>& it : QtHost::GetAvailableLanguageList())
|
||||
{
|
||||
@@ -189,7 +189,7 @@ void SetupWizardDialog::setupLanguagePage()
|
||||
SettingWidgetBinder::BindWidgetToStringSetting(
|
||||
nullptr, m_ui.language, "UI", "Language", QtHost::GetDefaultLanguage());
|
||||
connect(
|
||||
m_ui.language, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &SetupWizardDialog::languageChanged);
|
||||
m_ui.language, &QComboBox::currentIndexChanged, this, &SetupWizardDialog::languageChanged);
|
||||
|
||||
SettingWidgetBinder::BindWidgetToBoolSetting(
|
||||
nullptr, m_ui.autoUpdateEnabled, "AutoUpdater", "CheckAtStartup", true);
|
||||
|
||||
@@ -437,26 +437,26 @@ void QtHost::SetStyleFromSettings()
|
||||
// Alternative dark theme.
|
||||
qApp->setStyle(QStyleFactory::create("Fusion"));
|
||||
|
||||
const QColor gray(150, 150, 150);
|
||||
const QColor royalBlue(29, 41, 81);
|
||||
const QColor darkishBlue(17, 30, 108);
|
||||
const QColor abyssBlue(39, 58, 114);
|
||||
const QColor darkishBlue(29, 41, 81);
|
||||
const QColor lighterBlue(25, 32, 130);
|
||||
const QColor highlight(36, 93, 218);
|
||||
const QColor link(0, 202, 255);
|
||||
const QColor blue(198, 238, 255);
|
||||
const QColor gray(150, 150, 150);
|
||||
|
||||
QPalette cobaltSkyPalette;
|
||||
cobaltSkyPalette.setColor(QPalette::Window, royalBlue);
|
||||
cobaltSkyPalette.setColor(QPalette::Window, abyssBlue);
|
||||
cobaltSkyPalette.setColor(QPalette::WindowText, Qt::white);
|
||||
cobaltSkyPalette.setColor(QPalette::Base, royalBlue.lighter());
|
||||
cobaltSkyPalette.setColor(QPalette::AlternateBase, darkishBlue);
|
||||
cobaltSkyPalette.setColor(QPalette::Base, darkishBlue);
|
||||
cobaltSkyPalette.setColor(QPalette::AlternateBase, darkishBlue.darker());
|
||||
cobaltSkyPalette.setColor(QPalette::ToolTipBase, darkishBlue);
|
||||
cobaltSkyPalette.setColor(QPalette::ToolTipText, Qt::white);
|
||||
cobaltSkyPalette.setColor(QPalette::Text, Qt::white);
|
||||
cobaltSkyPalette.setColor(QPalette::Button, lighterBlue);
|
||||
cobaltSkyPalette.setColor(QPalette::ButtonText, Qt::white);
|
||||
cobaltSkyPalette.setColor(QPalette::Link, link);
|
||||
cobaltSkyPalette.setColor(QPalette::Highlight, highlight);
|
||||
cobaltSkyPalette.setColor(QPalette::Link, blue);
|
||||
cobaltSkyPalette.setColor(QPalette::Highlight, abyssBlue.lighter());
|
||||
cobaltSkyPalette.setColor(QPalette::HighlightedText, Qt::white);
|
||||
cobaltSkyPalette.setColor(QPalette::PlaceholderText, gray);
|
||||
|
||||
cobaltSkyPalette.setColor(QPalette::Active, QPalette::Button, lighterBlue);
|
||||
cobaltSkyPalette.setColor(QPalette::Disabled, QPalette::ButtonText, gray);
|
||||
@@ -475,9 +475,9 @@ void QtHost::SetStyleFromSettings()
|
||||
// OLED screens.
|
||||
qApp->setStyle(QStyleFactory::create("Fusion"));
|
||||
|
||||
const QColor black(0, 0, 0);
|
||||
const QColor gray(25, 25, 25);
|
||||
const QColor lighterGray(75, 75, 75);
|
||||
const QColor black(5, 5, 5);
|
||||
const QColor gray(22, 22, 29);
|
||||
const QColor lighterGray(65, 79, 98);
|
||||
const QColor blue(198, 238, 255);
|
||||
|
||||
QPalette AMOLEDPalette;
|
||||
@@ -519,7 +519,7 @@ void QtHost::SetStyleFromSettings()
|
||||
rubyPalette.setColor(QPalette::Window, slate);
|
||||
rubyPalette.setColor(QPalette::WindowText, Qt::white);
|
||||
rubyPalette.setColor(QPalette::Base, slate.lighter());
|
||||
rubyPalette.setColor(QPalette::AlternateBase, slate.lighter());
|
||||
rubyPalette.setColor(QPalette::AlternateBase, slate.darker());
|
||||
rubyPalette.setColor(QPalette::ToolTipBase, slate);
|
||||
rubyPalette.setColor(QPalette::ToolTipText, Qt::white);
|
||||
rubyPalette.setColor(QPalette::Text, Qt::white);
|
||||
@@ -553,7 +553,7 @@ void QtHost::SetStyleFromSettings()
|
||||
sapphirePalette.setColor(QPalette::Window, slate);
|
||||
sapphirePalette.setColor(QPalette::WindowText, Qt::white);
|
||||
sapphirePalette.setColor(QPalette::Base, slate.lighter());
|
||||
sapphirePalette.setColor(QPalette::AlternateBase, slate.lighter());
|
||||
sapphirePalette.setColor(QPalette::AlternateBase, slate.darker());
|
||||
sapphirePalette.setColor(QPalette::ToolTipBase, slate);
|
||||
sapphirePalette.setColor(QPalette::ToolTipText, Qt::white);
|
||||
sapphirePalette.setColor(QPalette::Text, Qt::white);
|
||||
@@ -587,7 +587,7 @@ void QtHost::SetStyleFromSettings()
|
||||
emeraldPalette.setColor(QPalette::Window, slate);
|
||||
emeraldPalette.setColor(QPalette::WindowText, Qt::white);
|
||||
emeraldPalette.setColor(QPalette::Base, slate.lighter());
|
||||
emeraldPalette.setColor(QPalette::AlternateBase, slate.lighter());
|
||||
emeraldPalette.setColor(QPalette::AlternateBase, slate.darker());
|
||||
emeraldPalette.setColor(QPalette::ToolTipBase, slate);
|
||||
emeraldPalette.setColor(QPalette::ToolTipText, Qt::white);
|
||||
emeraldPalette.setColor(QPalette::Text, Qt::white);
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1043,21 +1043,11 @@ void Achievements::ClientLoadGameCallback(int result, const char* error_message,
|
||||
s_has_leaderboards = has_leaderboards;
|
||||
s_has_rich_presence = rc_client_has_rich_presence(client);
|
||||
s_game_icon = {};
|
||||
s_game_icon_url = {};
|
||||
s_game_icon_url = info->badge_url;
|
||||
|
||||
// ensure fullscreen UI is ready for notifications
|
||||
MTGS::RunOnGSThread(&ImGuiManager::InitializeFullscreenUI);
|
||||
|
||||
char url_buffer[URL_BUFFER_SIZE];
|
||||
if (int err = rc_client_game_get_image_url(info, url_buffer, std::size(url_buffer)); err == RC_OK)
|
||||
{
|
||||
s_game_icon_url = url_buffer;
|
||||
}
|
||||
else
|
||||
{
|
||||
ReportRCError(err, "rc_client_game_get_image_url() failed: ");
|
||||
}
|
||||
|
||||
if (const std::string_view badge_name = info->badge_name; !badge_name.empty())
|
||||
{
|
||||
s_game_icon = Path::Combine(s_image_directory, fmt::format("game_{}.png", badge_name));
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
#include "CDVD/IsoFileFormats.h"
|
||||
#include "Config.h"
|
||||
#include "Host.h"
|
||||
#include "IconsFontAwesome6.h"
|
||||
#include "IconsFontAwesome.h"
|
||||
|
||||
#include "common/Assertions.h"
|
||||
#include "common/Console.h"
|
||||
|
||||
@@ -432,6 +432,13 @@ enum class GSTextureInRtMode : u8
|
||||
MergeTargets,
|
||||
};
|
||||
|
||||
enum class GSLimit24BitDepth : u8
|
||||
{
|
||||
Disabled,
|
||||
PrioritizeUpper,
|
||||
PrioritizeLower,
|
||||
};
|
||||
|
||||
enum class GSBilinearDirtyMode : u8
|
||||
{
|
||||
Automatic,
|
||||
@@ -844,6 +851,7 @@ struct Pcsx2Config
|
||||
u8 UserHacks_CPUCLUTRender = 0;
|
||||
GSGPUTargetCLUTMode UserHacks_GPUTargetCLUTMode = GSGPUTargetCLUTMode::Disabled;
|
||||
GSTextureInRtMode UserHacks_TextureInsideRt = GSTextureInRtMode::Disabled;
|
||||
GSLimit24BitDepth UserHacks_Limit24BitDepth = GSLimit24BitDepth::Disabled;
|
||||
GSBilinearDirtyMode UserHacks_BilinearHack = GSBilinearDirtyMode::Automatic;
|
||||
TriFiltering TriFilter = TriFiltering::Automatic;
|
||||
s8 OverrideTextureBarriers = -1;
|
||||
|
||||
@@ -11,6 +11,8 @@
|
||||
std::vector<BreakPoint> CBreakPoints::breakPoints_;
|
||||
u32 CBreakPoints::breakSkipFirstAtEE_ = 0;
|
||||
u32 CBreakPoints::breakSkipFirstAtIop_ = 0;
|
||||
bool CBreakPoints::pendingClearSkipFirstAtEE_ = false;
|
||||
bool CBreakPoints::pendingClearSkipFirstAtIop_ = false;
|
||||
std::vector<MemCheck> CBreakPoints::memChecks_;
|
||||
std::vector<MemCheck*> CBreakPoints::cleanupMemChecks_;
|
||||
bool CBreakPoints::breakpointTriggered_ = false;
|
||||
@@ -391,10 +393,12 @@ void CBreakPoints::SetSkipFirst(BreakPointCpu cpu, u32 pc)
|
||||
if (cpu == BREAKPOINT_EE)
|
||||
{
|
||||
breakSkipFirstAtEE_ = standardizeBreakpointAddress(pc);
|
||||
pendingClearSkipFirstAtEE_ = false;
|
||||
}
|
||||
else if (cpu == BREAKPOINT_IOP)
|
||||
{
|
||||
breakSkipFirstAtIop_ = pc;
|
||||
pendingClearSkipFirstAtIop_ = false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -407,10 +411,29 @@ u32 CBreakPoints::CheckSkipFirst(BreakPointCpu cpu, u32 cmpPc)
|
||||
return 0;
|
||||
}
|
||||
|
||||
void CBreakPoints::ClearSkipFirst()
|
||||
void CBreakPoints::ClearSkipFirst(BreakPointCpu cpu)
|
||||
{
|
||||
breakSkipFirstAtEE_ = 0;
|
||||
breakSkipFirstAtIop_ = 0;
|
||||
if((cpu & BREAKPOINT_EE) != 0)
|
||||
pendingClearSkipFirstAtEE_ = true;
|
||||
else if ((cpu & BREAKPOINT_IOP) != 0)
|
||||
pendingClearSkipFirstAtIop_ = true;
|
||||
|
||||
if(cpu == BREAKPOINT_IOP_AND_EE)
|
||||
CommitClearSkipFirst(BREAKPOINT_IOP_AND_EE);
|
||||
}
|
||||
|
||||
void CBreakPoints::CommitClearSkipFirst(BreakPointCpu cpu)
|
||||
{
|
||||
if((cpu & BREAKPOINT_EE) != 0 && pendingClearSkipFirstAtEE_)
|
||||
{
|
||||
pendingClearSkipFirstAtEE_ = false;
|
||||
breakSkipFirstAtEE_ = 0;
|
||||
}
|
||||
else if ((cpu & BREAKPOINT_IOP) != 0 && pendingClearSkipFirstAtIop_)
|
||||
{
|
||||
pendingClearSkipFirstAtIop_ = true;
|
||||
breakSkipFirstAtIop_ = 0;
|
||||
}
|
||||
}
|
||||
|
||||
const std::vector<MemCheck> CBreakPoints::GetMemCheckRanges()
|
||||
|
||||
@@ -135,7 +135,8 @@ public:
|
||||
|
||||
static void SetSkipFirst(BreakPointCpu cpu, u32 pc);
|
||||
static u32 CheckSkipFirst(BreakPointCpu cpu, u32 pc);
|
||||
static void ClearSkipFirst();
|
||||
static void ClearSkipFirst(BreakPointCpu cpu = BREAKPOINT_IOP_AND_EE);
|
||||
static void CommitClearSkipFirst(BreakPointCpu cpu);
|
||||
|
||||
// Includes uncached addresses.
|
||||
static const std::vector<MemCheck> GetMemCheckRanges();
|
||||
@@ -169,9 +170,9 @@ private:
|
||||
|
||||
static std::vector<BreakPoint> breakPoints_;
|
||||
static u32 breakSkipFirstAtEE_;
|
||||
static u64 breakSkipFirstTicksEE_;
|
||||
static bool pendingClearSkipFirstAtEE_;
|
||||
static u32 breakSkipFirstAtIop_;
|
||||
static u64 breakSkipFirstTicksIop_;
|
||||
static bool pendingClearSkipFirstAtIop_;
|
||||
|
||||
static bool breakpointTriggered_;
|
||||
static BreakPointCpu breakpointTriggeredCpu_;
|
||||
|
||||
@@ -48,7 +48,7 @@
|
||||
#include "common/SmallString.h"
|
||||
#include "common/StringUtil.h"
|
||||
|
||||
#include "IconsFontAwesome6.h"
|
||||
#include "IconsFontAwesome.h"
|
||||
|
||||
#include "fmt/format.h"
|
||||
|
||||
@@ -442,7 +442,7 @@ void GSvsync(u32 field, bool registers_written)
|
||||
g_gs_renderer->PCRTCDisplays.SetRects(0, g_gs_renderer->m_regs->DISP[0].DISPLAY, g_gs_renderer->m_regs->DISP[0].DISPFB);
|
||||
g_gs_renderer->PCRTCDisplays.SetRects(1, g_gs_renderer->m_regs->DISP[1].DISPLAY, g_gs_renderer->m_regs->DISP[1].DISPFB);
|
||||
g_gs_renderer->PCRTCDisplays.CalculateDisplayOffset(g_gs_renderer->m_scanmask_used);
|
||||
g_gs_renderer->PCRTCDisplays.CalculateFramebufferOffset(g_gs_renderer->m_scanmask_used);
|
||||
g_gs_renderer->PCRTCDisplays.CalculateFramebufferOffset(g_gs_renderer->m_scanmask_used, g_gs_renderer->m_regs->DISP[0].DISPFB, g_gs_renderer->m_regs->DISP[1].DISPFB);
|
||||
|
||||
// Do not move the flush into the VSync() method. It's here because EE transfers
|
||||
// get cleared in HW VSync, and may be needed for a buffered draw (FFX FMVs).
|
||||
@@ -533,7 +533,7 @@ bool GSHasDisplayWindow()
|
||||
return (g_gs_device->GetWindowInfo().type != WindowInfo::Type::Surfaceless);
|
||||
}
|
||||
|
||||
void GSResizeDisplayWindow(int width, int height, float scale)
|
||||
void GSResizeDisplayWindow(u32 width, u32 height, float scale)
|
||||
{
|
||||
g_gs_device->ResizeWindow(width, height, scale);
|
||||
ImGuiManager::WindowResized();
|
||||
|
||||
@@ -83,7 +83,7 @@ void GSThrottlePresentation();
|
||||
void GSGameChanged();
|
||||
void GSSetDisplayAlignment(GSDisplayAlignment alignment);
|
||||
bool GSHasDisplayWindow();
|
||||
void GSResizeDisplayWindow(int width, int height, float scale);
|
||||
void GSResizeDisplayWindow(u32 width, u32 height, float scale);
|
||||
void GSUpdateDisplayWindow();
|
||||
void GSSetVSyncMode(GSVSyncMode mode, bool allow_present_throttle);
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
#include "SPU2/spu2.h"
|
||||
#include "Host.h"
|
||||
#include "Host/AudioStream.h"
|
||||
#include "IconsFontAwesome6.h"
|
||||
#include "IconsFontAwesome.h"
|
||||
#include "common/Assertions.h"
|
||||
#include "common/Console.h"
|
||||
#include "common/BitUtils.h"
|
||||
|
||||
@@ -806,12 +806,12 @@ void GSState::DumpTransferList(const std::string& filename)
|
||||
(*file) << std::endl;
|
||||
|
||||
// clear, EE->GS, or GS->GS
|
||||
(*file) << LIST_ITEM << "type: " << (transfer.zero_clear ? "clear" : (transfer.ee_to_gs ? "EE_to_GS" : "GS_to_GS")) << std::endl;
|
||||
(*file) << LIST_ITEM << "type: " << (transfer.zero_clear ? "clear" : ((transfer.transfer_type == EEGS_TransferType::EE_to_GS) ? "EE_to_GS" : "GS_to_GS")) << std::endl;
|
||||
|
||||
// Dump BITBLTBUF
|
||||
(*file) << INDENT << "BITBLTBUF: " << OPEN_MAP;
|
||||
|
||||
const bool gs_to_gs = !transfer.ee_to_gs && !transfer.zero_clear;
|
||||
const bool gs_to_gs = (transfer.transfer_type == EEGS_TransferType::GS_to_GS) && !transfer.zero_clear;
|
||||
|
||||
if (gs_to_gs)
|
||||
{
|
||||
@@ -857,7 +857,7 @@ void GSState::DumpTransferImages()
|
||||
const GSUploadQueue& transfer = m_draw_transfers[i];
|
||||
|
||||
std::string filename;
|
||||
if (transfer.ee_to_gs || transfer.zero_clear)
|
||||
if ((transfer.transfer_type == EEGS_TransferType::EE_to_GS) || transfer.zero_clear)
|
||||
{
|
||||
// clear or EE->GS: only the destination info is relevant.
|
||||
filename = GetDrawDumpPath("%05d_transfer%02d_%s_%04x_%d_%s_%d_%d_%d_%d.png",
|
||||
@@ -2365,7 +2365,7 @@ void GSState::Write(const u8* mem, int len)
|
||||
|
||||
s_last_transfer_draw_n = s_n;
|
||||
// Store the transfer for preloading new RT's.
|
||||
if ((m_draw_transfers.size() > 0 && blit.DBP == m_draw_transfers.back().blit.DBP))
|
||||
if ((m_draw_transfers.size() > 0 && blit.DBP == m_draw_transfers.back().blit.DBP && m_draw_transfers.back().transfer_type == EEGS_TransferType::EE_to_GS))
|
||||
{
|
||||
// Same BP, let's update the rect.
|
||||
GSUploadQueue transfer = m_draw_transfers.back();
|
||||
@@ -2377,7 +2377,7 @@ void GSState::Write(const u8* mem, int len)
|
||||
}
|
||||
else
|
||||
{
|
||||
const GSUploadQueue new_transfer = { blit, r, s_n, false, true };
|
||||
const GSUploadQueue new_transfer = {blit, r, s_n, false, EEGS_TransferType::EE_to_GS};
|
||||
m_draw_transfers.push_back(new_transfer);
|
||||
}
|
||||
|
||||
@@ -2519,21 +2519,31 @@ void GSState::Move()
|
||||
|
||||
InvalidateLocalMem(m_env.BITBLTBUF, GSVector4i(sx, sy, sx + w, sy + h));
|
||||
InvalidateVideoMem(m_env.BITBLTBUF, GSVector4i(dx, dy, dx + w, dy + h));
|
||||
const bool overlaps = m_env.BITBLTBUF.SBP == m_env.BITBLTBUF.DBP;
|
||||
const bool intersect = overlaps && !(GSVector4i(sx, sy, sx + w, sy + h).rintersect(GSVector4i(dx, dy, dx + w, dy + h)).rempty());
|
||||
|
||||
int xinc = 1;
|
||||
int yinc = 1;
|
||||
|
||||
if (m_env.TRXPOS.DIRX)
|
||||
{
|
||||
sx += w - 1;
|
||||
dx += w - 1;
|
||||
xinc = -1;
|
||||
// Only allow it to reverse if the destination is behind the source.
|
||||
if (!intersect || (sx <= dx && (sx == dx || ((!m_env.TRXPOS.DIRY && sy >= dy) || (m_env.TRXPOS.DIRY && sy < dy)))))
|
||||
{
|
||||
sx += w - 1;
|
||||
dx += w - 1;
|
||||
xinc = -1;
|
||||
}
|
||||
}
|
||||
if (m_env.TRXPOS.DIRY)
|
||||
{
|
||||
sy += h - 1;
|
||||
dy += h - 1;
|
||||
yinc = -1;
|
||||
// Only allow it to reverse if the destination is behind the source.
|
||||
if (!intersect || (sy <= dy && (sy == dy || ((!m_env.TRXPOS.DIRX && sx >= dx) || (m_env.TRXPOS.DIRX && sx < dx)))))
|
||||
{
|
||||
sy += h - 1;
|
||||
dy += h - 1;
|
||||
yinc = -1;
|
||||
}
|
||||
}
|
||||
|
||||
const GSLocalMemory::psm_t& spsm = GSLocalMemory::m_psm[m_env.BITBLTBUF.SPSM];
|
||||
@@ -2556,7 +2566,7 @@ void GSState::Move()
|
||||
|
||||
s_last_transfer_draw_n = s_n;
|
||||
// Store the transfer for preloading new RT's.
|
||||
if ((m_draw_transfers.size() > 0 && m_env.BITBLTBUF.DBP == m_draw_transfers.back().blit.DBP))
|
||||
if ((m_draw_transfers.size() > 0 && m_env.BITBLTBUF.DBP == m_draw_transfers.back().blit.DBP && m_draw_transfers.back().transfer_type == EEGS_TransferType::GS_to_GS))
|
||||
{
|
||||
// Same BP, let's update the rect.
|
||||
GSUploadQueue transfer = m_draw_transfers.back();
|
||||
@@ -2568,11 +2578,11 @@ void GSState::Move()
|
||||
}
|
||||
else
|
||||
{
|
||||
const GSUploadQueue new_transfer = { m_env.BITBLTBUF, r, s_n, false, false };
|
||||
const GSUploadQueue new_transfer = {m_env.BITBLTBUF, r, s_n, false, EEGS_TransferType::GS_to_GS};
|
||||
m_draw_transfers.push_back(new_transfer);
|
||||
}
|
||||
|
||||
auto copy = [this, sbp, dbp, sx, sy, dx, dy, w, h, yinc, xinc](const GSOffset& dpo, const GSOffset& spo, auto&& pxCopyFn)
|
||||
auto copy = [this, sbp, dbp, sx, sy, dx, dy, w, h, yinc, xinc, intersect](const GSOffset& dpo, const GSOffset& spo, auto&& pxCopyFn)
|
||||
{
|
||||
int _sy = sy, _dy = dy; // Faster with local copied variables, compiler optimizations are dumb
|
||||
if (xinc > 0)
|
||||
@@ -2584,8 +2594,6 @@ void GSState::Move()
|
||||
// Copying from itself to itself (rotating textures) used in Gitaroo Man stage 8
|
||||
// What probably happens is because the copy is buffered, the source stays just ahead of the destination.
|
||||
// No need to do all this if the copy source/destination don't intersect, however.
|
||||
const bool intersect = !(GSVector4i(sx, sy, sx + w, sy + h).rintersect(GSVector4i(dx, dy, dx + w, dy + h)).rempty());
|
||||
|
||||
if (intersect && sbp == dbp && (((_sy < _dy) && ((ypage + page_height) > _dy)) || ((sx < dx) && ((xpage + page_width) > dx))))
|
||||
{
|
||||
int starty = (yinc > 0) ? 0 : h-1;
|
||||
@@ -4657,6 +4665,14 @@ __forceinline void GSState::VertexKick(u32 skip)
|
||||
u32 next = m_vertex.next;
|
||||
u32 xy_tail = m_vertex.xy_tail;
|
||||
|
||||
if (GSIsHardwareRenderer() && GSLocalMemory::m_psm[m_context->ZBUF.PSM].bpp == 32)
|
||||
{
|
||||
if (GSConfig.UserHacks_Limit24BitDepth == GSLimit24BitDepth::PrioritizeUpper)
|
||||
m_v.XYZ.Z = ((m_v.XYZ.Z >> 8) & ~0xFF) | (m_v.XYZ.Z & 0xFF);
|
||||
else if (GSConfig.UserHacks_Limit24BitDepth == GSLimit24BitDepth::PrioritizeLower)
|
||||
m_v.XYZ.Z &= 0x00FFFFFF;
|
||||
}
|
||||
|
||||
// callers should write XYZUVF to m_v.m[1] in one piece to have this load store-forwarded, either by the cpu or the compiler when this function is inlined
|
||||
|
||||
const GSVector4i new_v0(m_v.m[0]);
|
||||
@@ -5057,22 +5073,17 @@ GSState::TextureMinMaxResult GSState::GetTextureMinMax(GIFRegTEX0 TEX0, GIFRegCL
|
||||
const GSVertex* vert_third = &m_vertex.buff[m_index.buff[2]];
|
||||
|
||||
GSVector4 new_st = st;
|
||||
bool u_forward_check = false;
|
||||
bool x_forward_check = false;
|
||||
bool u_forward_check = PRIM->FST ? (vert_first->U < vert_second->U) : ((vert_first->ST.S / vert_first->RGBAQ.Q) < (vert_second->ST.S / vert_first->RGBAQ.Q));
|
||||
bool x_forward_check = vert_first->XYZ.X < vert_second->XYZ.X;
|
||||
|
||||
if (m_vt.m_primclass == GS_TRIANGLE_CLASS)
|
||||
{
|
||||
u_forward_check = PRIM->FST ? ((vert_first->U < vert_second->U) || (vert_first->U < vert_third->U)) : (((vert_first->ST.S / vert_first->RGBAQ.Q) < (vert_second->ST.S / vert_second->RGBAQ.Q)) || ((vert_first->ST.S / vert_first->RGBAQ.Q) < (vert_third->ST.S / vert_third->RGBAQ.Q)));
|
||||
x_forward_check = (vert_first->XYZ.X < vert_second->XYZ.X) || (vert_first->XYZ.X < vert_third->XYZ.X);
|
||||
}
|
||||
else
|
||||
{
|
||||
u_forward_check = PRIM->FST ? (vert_first->U < vert_second->U) : ((vert_first->ST.T / vert_first->RGBAQ.Q) < (vert_second->ST.T / vert_first->RGBAQ.Q));
|
||||
x_forward_check = vert_first->XYZ.Y < vert_second->XYZ.Y;
|
||||
u_forward_check |= PRIM->FST ? (vert_first->U < vert_third->U) : ((vert_first->ST.S / vert_first->RGBAQ.Q) < (vert_third->ST.S / vert_third->RGBAQ.Q));
|
||||
x_forward_check |= vert_first->XYZ.X < vert_third->XYZ.X;
|
||||
}
|
||||
|
||||
// Check if the UV coords are going in a different direction to the verts, if they match direction, no need to swap
|
||||
const bool u_forward = u_forward_check;
|
||||
const bool x_forward = x_forward_check;
|
||||
const bool swap_x = u_forward != x_forward;
|
||||
const bool swap_x = u_forward_check != x_forward_check;
|
||||
|
||||
if (int_rc.left < scissored_rc.left)
|
||||
{
|
||||
@@ -5094,21 +5105,16 @@ GSState::TextureMinMaxResult GSState::GetTextureMinMax(GIFRegTEX0 TEX0, GIFRegCL
|
||||
st.x = new_st.x;
|
||||
st.z = new_st.z;
|
||||
}
|
||||
bool v_forward_check = false;
|
||||
bool y_forward_check = false;
|
||||
bool v_forward_check = PRIM->FST ? (vert_first->V < vert_second->V) : ((vert_first->ST.T / vert_first->RGBAQ.Q) < (vert_second->ST.T / vert_first->RGBAQ.Q));
|
||||
bool y_forward_check = vert_first->XYZ.Y < vert_second->XYZ.Y;
|
||||
|
||||
if (m_vt.m_primclass == GS_TRIANGLE_CLASS)
|
||||
{
|
||||
v_forward_check = PRIM->FST ? ((vert_first->V < vert_second->V) || (vert_first->V < vert_third->V)) : (((vert_first->ST.T / vert_first->RGBAQ.Q) < (vert_second->ST.T / vert_second->RGBAQ.Q)) || ((vert_first->ST.T / vert_first->RGBAQ.Q) < (vert_third->ST.T / vert_third->RGBAQ.Q)));
|
||||
y_forward_check = (vert_first->XYZ.Y < vert_second->XYZ.Y) || (vert_first->XYZ.Y < vert_third->XYZ.Y);
|
||||
v_forward_check |= PRIM->FST ? (vert_first->V < vert_third->V) : ((vert_first->ST.T / vert_first->RGBAQ.Q) < (vert_third->ST.T / vert_third->RGBAQ.Q));
|
||||
y_forward_check |= vert_first->XYZ.Y < vert_third->XYZ.Y;
|
||||
}
|
||||
else
|
||||
{
|
||||
v_forward_check = PRIM->FST ? (vert_first->V < vert_second->V) : ((vert_first->ST.T / vert_first->RGBAQ.Q) < (vert_second->ST.T / vert_first->RGBAQ.Q));
|
||||
y_forward_check = vert_first->XYZ.Y < vert_second->XYZ.Y;
|
||||
}
|
||||
const bool v_forward = v_forward_check;
|
||||
const bool y_forward = y_forward_check;
|
||||
const bool swap_y = v_forward != y_forward;
|
||||
|
||||
const bool swap_y = v_forward_check != y_forward_check;
|
||||
|
||||
if (int_rc.top < scissored_rc.top)
|
||||
{
|
||||
@@ -5955,44 +5961,36 @@ void GSState::GSPCRTCRegs::SetRects(int display, GSRegDISPLAY displayReg, GSRegD
|
||||
|
||||
// Calculate framebuffer read offsets, should be considered if only one circuit is enabled, or difference is more than 1 line.
|
||||
// Only considered if "Anti-blur" is enabled.
|
||||
void GSState::GSPCRTCRegs::CalculateFramebufferOffset(bool scanmask)
|
||||
void GSState::GSPCRTCRegs::CalculateFramebufferOffset(bool scanmask, GSRegDISPFB framebuffer0Reg, GSRegDISPFB framebuffer1Reg)
|
||||
{
|
||||
GSVector2i fb0 = GSVector2i(PCRTCDisplays[0].framebufferOffsets.x, PCRTCDisplays[0].framebufferOffsets.y);
|
||||
GSVector2i fb1 = GSVector2i(PCRTCDisplays[1].framebufferOffsets.x, PCRTCDisplays[1].framebufferOffsets.y);
|
||||
|
||||
if (fb0.x + PCRTCDisplays[0].displayRect.z > 2048)
|
||||
{
|
||||
fb0.x -= 2048;
|
||||
PCRTCDisplays[0].framebufferOffsets.x = fb0.x;
|
||||
}
|
||||
if (fb0.y + PCRTCDisplays[0].displayRect.w > 2048)
|
||||
{
|
||||
fb0.y -= 2048;
|
||||
PCRTCDisplays[0].framebufferOffsets.y = fb0.y;
|
||||
}
|
||||
if (fb1.x + PCRTCDisplays[1].displayRect.z > 2048)
|
||||
{
|
||||
fb1.x -= 2048;
|
||||
PCRTCDisplays[1].framebufferOffsets.x = fb1.x;
|
||||
}
|
||||
if (fb1.y + PCRTCDisplays[1].displayRect.w > 2048)
|
||||
{
|
||||
fb1.y -= 2048;
|
||||
PCRTCDisplays[1].framebufferOffsets.y = fb1.y;
|
||||
}
|
||||
|
||||
if (GSConfig.PCRTCAntiBlur && PCRTCSameSrc && !scanmask)
|
||||
{
|
||||
GSVector2i fb0 = GSVector2i(PCRTCDisplays[0].framebufferOffsets.x, PCRTCDisplays[0].framebufferOffsets.y);
|
||||
GSVector2i fb1 = GSVector2i(PCRTCDisplays[1].framebufferOffsets.x, PCRTCDisplays[1].framebufferOffsets.y);
|
||||
|
||||
if (fb0.x + PCRTCDisplays[0].displayRect.z > 2048)
|
||||
{
|
||||
fb0.x -= 2048;
|
||||
fb0.x = abs(fb0.x);
|
||||
}
|
||||
if (fb0.y + PCRTCDisplays[0].displayRect.w > 2048)
|
||||
{
|
||||
fb0.y -= 2048;
|
||||
fb0.y = abs(fb0.y);
|
||||
}
|
||||
if (fb1.x + PCRTCDisplays[1].displayRect.z > 2048)
|
||||
{
|
||||
fb1.x -= 2048;
|
||||
fb1.x = abs(fb1.x);
|
||||
}
|
||||
if (fb1.y + PCRTCDisplays[1].displayRect.w > 2048)
|
||||
{
|
||||
fb1.y -= 2048;
|
||||
fb1.y = abs(fb1.y);
|
||||
}
|
||||
|
||||
if (abs(fb1.y - fb0.y) == 1
|
||||
&& PCRTCDisplays[0].displayRect.y == PCRTCDisplays[1].displayRect.y)
|
||||
{
|
||||
if (fb1.y < fb0.y)
|
||||
PCRTCDisplays[0].framebufferOffsets.y = fb1.y;
|
||||
else
|
||||
PCRTCDisplays[1].framebufferOffsets.y = fb0.y;
|
||||
}
|
||||
if (abs(fb1.x - fb0.x) == 1
|
||||
&& PCRTCDisplays[0].displayRect.x == PCRTCDisplays[1].displayRect.x)
|
||||
|
||||
if (abs(fb1.x - fb0.x) == 1 && PCRTCDisplays[0].displayRect.x == PCRTCDisplays[1].displayRect.x)
|
||||
{
|
||||
if (fb1.x < fb0.x)
|
||||
PCRTCDisplays[0].framebufferOffsets.x = fb1.x;
|
||||
@@ -6009,6 +6007,20 @@ void GSState::GSPCRTCRegs::CalculateFramebufferOffset(bool scanmask)
|
||||
PCRTCDisplays[1].framebufferRect.z += PCRTCDisplays[1].framebufferOffsets.x;
|
||||
PCRTCDisplays[1].framebufferRect.y += PCRTCDisplays[1].framebufferOffsets.y;
|
||||
PCRTCDisplays[1].framebufferRect.w += PCRTCDisplays[1].framebufferOffsets.y;
|
||||
|
||||
if (GSConfig.PCRTCAntiBlur && PCRTCSameSrc && !scanmask && abs(fb1.y - fb0.y) <= 1)
|
||||
{
|
||||
if (framebuffer0Reg.DBY != PCRTCDisplays[0].prevFramebufferReg.DBY)
|
||||
{
|
||||
PCRTCDisplays[0].framebufferRect.y = PCRTCDisplays[1].framebufferRect.y;
|
||||
PCRTCDisplays[0].framebufferRect.w = PCRTCDisplays[1].framebufferRect.w;
|
||||
}
|
||||
else
|
||||
{
|
||||
PCRTCDisplays[1].framebufferRect.y = PCRTCDisplays[0].framebufferRect.y;
|
||||
PCRTCDisplays[1].framebufferRect.w = PCRTCDisplays[0].framebufferRect.w;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Used in software mode to align the buffer when reading. Offset is accounted for (block aligned) by GetOutput.
|
||||
|
||||
@@ -211,13 +211,20 @@ protected:
|
||||
void CorrectATEAlphaMinMax(const u32 atst, const int aref);
|
||||
|
||||
public:
|
||||
enum EEGS_TransferType
|
||||
{
|
||||
EE_to_GS,
|
||||
GS_to_GS,
|
||||
GS_to_EE
|
||||
};
|
||||
|
||||
struct GSUploadQueue
|
||||
{
|
||||
GIFRegBITBLTBUF blit;
|
||||
GSVector4i rect;
|
||||
int draw;
|
||||
bool zero_clear;
|
||||
bool ee_to_gs;
|
||||
EEGS_TransferType transfer_type;
|
||||
};
|
||||
|
||||
enum NoGapsType
|
||||
@@ -401,7 +408,7 @@ public:
|
||||
|
||||
// Calculate framebuffer read offsets, should be considered if only one circuit is enabled, or difference is more than 1 line.
|
||||
// Only considered if "Anti-blur" is enabled.
|
||||
void CalculateFramebufferOffset(bool scanmask);
|
||||
void CalculateFramebufferOffset(bool scanmask, GSRegDISPFB framebuffer0Reg, GSRegDISPFB framebuffer1Reg);
|
||||
|
||||
// Used in software mode to align the buffer when reading. Offset is accounted for (block aligned) by GetOutput.
|
||||
void RemoveFramebufferOffset(int display);
|
||||
|
||||
@@ -918,10 +918,15 @@ void GSDevice::Resize(int width, int height)
|
||||
GSVector2i s = m_current->GetSize();
|
||||
int multiplier = 1;
|
||||
|
||||
while (width > s.x || height > s.y)
|
||||
if ((width > s.x || height > s.y))
|
||||
{
|
||||
s = m_current->GetSize() * GSVector2i(++multiplier);
|
||||
while (width > s.x || height > s.y)
|
||||
{
|
||||
s = m_current->GetSize() * GSVector2i(++multiplier);
|
||||
}
|
||||
}
|
||||
else
|
||||
s = GSVector2i(width, height);
|
||||
|
||||
if (ResizeRenderTarget(&dTex, s.x, s.y, false, false))
|
||||
{
|
||||
|
||||
@@ -401,6 +401,7 @@ struct alignas(16) GSHWDrawConfig
|
||||
|
||||
// Depth clamp
|
||||
u32 zclamp : 1;
|
||||
u32 zfloor : 1;
|
||||
|
||||
// Hack
|
||||
u32 tcoffsethack : 1;
|
||||
@@ -1019,7 +1020,7 @@ public:
|
||||
virtual bool UpdateWindow() = 0;
|
||||
|
||||
/// Call when the window size changes externally to recreate any resources.
|
||||
virtual void ResizeWindow(s32 new_window_width, s32 new_window_height, float new_window_scale) = 0;
|
||||
virtual void ResizeWindow(u32 new_window_width, u32 new_window_height, float new_window_scale) = 0;
|
||||
|
||||
/// Returns true if exclusive fullscreen is supported.
|
||||
virtual bool SupportsExclusiveFullscreen() const = 0;
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
#include "common/Timer.h"
|
||||
|
||||
#include "fmt/format.h"
|
||||
#include "IconsFontAwesome6.h"
|
||||
#include "IconsFontAwesome.h"
|
||||
|
||||
#include <algorithm>
|
||||
#include <array>
|
||||
@@ -94,8 +94,8 @@ bool GSRenderer::Merge(int field)
|
||||
}
|
||||
|
||||
// Need to do this here, if the user has Anti-Blur enabled, these offsets can get wiped out/changed.
|
||||
const bool game_deinterlacing = (m_regs->DISP[0].DISPFB.DBY != PCRTCDisplays.PCRTCDisplays[0].prevFramebufferReg.DBY) !=
|
||||
(m_regs->DISP[1].DISPFB.DBY != PCRTCDisplays.PCRTCDisplays[1].prevFramebufferReg.DBY);
|
||||
const bool game_deinterlacing = (PCRTCDisplays.PCRTCDisplays[0].prevFramebufferOffsets.y != PCRTCDisplays.PCRTCDisplays[0].framebufferOffsets.y) !=
|
||||
(PCRTCDisplays.PCRTCDisplays[1].prevFramebufferOffsets.y != PCRTCDisplays.PCRTCDisplays[1].framebufferOffsets.y);
|
||||
|
||||
// Only need to check the right/bottom on software renderer, hardware always gets the full texture then cuts a bit out later.
|
||||
if (PCRTCDisplays.FrameRectMatch() && !PCRTCDisplays.FrameWrap() && !feedback_merge)
|
||||
@@ -156,19 +156,10 @@ bool GSRenderer::Merge(int field)
|
||||
bool is_bob = GSConfig.InterlaceMode == GSInterlaceMode::BobTFF || GSConfig.InterlaceMode == GSInterlaceMode::BobBFF;
|
||||
|
||||
// FFMD (half frames) requires blend deinterlacing, so automatically use that. Same when SCANMSK is used but not blended in the merge circuit (Alpine Racer 3).
|
||||
if (GSConfig.InterlaceMode != GSInterlaceMode::Automatic || (!m_regs->SMODE2.FFMD && !scanmask_frame))
|
||||
if (GSConfig.InterlaceMode != GSInterlaceMode::Automatic || (!game_deinterlacing && !m_regs->SMODE2.FFMD && !scanmask_frame))
|
||||
{
|
||||
// If the game is offsetting each frame itself and we're using full height buffers, we can offset this with Bob.
|
||||
if (game_deinterlacing && !scanmask_frame && GSConfig.InterlaceMode == GSInterlaceMode::Automatic)
|
||||
{
|
||||
mode = 1; // Bob.
|
||||
is_bob = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
field2 = ((static_cast<int>(GSConfig.InterlaceMode) - 2) & 1);
|
||||
mode = ((static_cast<int>(GSConfig.InterlaceMode) - 2) >> 1);
|
||||
}
|
||||
field2 = ((static_cast<int>(GSConfig.InterlaceMode) - 2) & 1);
|
||||
mode = ((static_cast<int>(GSConfig.InterlaceMode) - 2) >> 1);
|
||||
}
|
||||
|
||||
for (int i = 0; i < 2; i++)
|
||||
@@ -714,6 +705,15 @@ void GSRenderer::VSync(u32 field, bool registers_written, bool idle_frame)
|
||||
u32 screenshot_width, screenshot_height;
|
||||
std::vector<u32> screenshot_pixels;
|
||||
|
||||
if (GSConfig.LinearPresent == GSPostBilinearMode::BilinearSharp)
|
||||
{
|
||||
const GSTexture* current = g_gs_device->GetCurrent();
|
||||
const GSVector2i internal_res = GetInternalResolution();
|
||||
|
||||
if (current->GetWidth() > internal_res.x || current->GetHeight() > internal_res.y)
|
||||
g_gs_device->Resize(internal_res.x, internal_res.y);
|
||||
}
|
||||
|
||||
if (!m_dump && m_dump_frames > 0)
|
||||
{
|
||||
if (GSConfig.UserHacks_ReadTCOnClose)
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
#include "common/StringUtil.h"
|
||||
#include "common/Path.h"
|
||||
|
||||
#include "IconsFontAwesome6.h"
|
||||
#include "IconsFontAwesome.h"
|
||||
|
||||
#include <appmodel.h>
|
||||
#include <array>
|
||||
@@ -439,7 +439,9 @@ GSRendererType D3D::GetPreferredRenderer()
|
||||
if (!feature_level.has_value())
|
||||
return GSRendererType::DX11;
|
||||
else if (feature_level == D3D_FEATURE_LEVEL_12_0)
|
||||
return check_vulkan_supported() ? GSRendererType::VK : GSRendererType::DX11;
|
||||
return check_vulkan_supported() ? GSRendererType::VK : GSRendererType::DX12;
|
||||
else if (feature_level == D3D_FEATURE_LEVEL_11_1)
|
||||
return GSRendererType::DX12;
|
||||
else
|
||||
return GSRendererType::DX11;
|
||||
}
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
#include "common/StringUtil.h"
|
||||
|
||||
#include "imgui.h"
|
||||
#include "IconsFontAwesome6.h"
|
||||
#include "IconsFontAwesome.h"
|
||||
|
||||
#include <bit>
|
||||
#include <fstream>
|
||||
@@ -278,7 +278,7 @@ bool GSDevice11::Create(GSVSyncMode vsync_mode, bool allow_present_throttle)
|
||||
|
||||
for (size_t i = 0; i < std::size(m_merge.ps); i++)
|
||||
{
|
||||
const std::string entry_point(StringUtil::StdStringFromFormat("ps_main%d", i));
|
||||
const std::string entry_point(StringUtil::StdStringFromFormat("ps_main%zu", i));
|
||||
m_merge.ps[i] = m_shader_cache.GetPixelShader(m_dev.get(), *shader, nullptr, entry_point.c_str());
|
||||
if (!m_merge.ps[i])
|
||||
return false;
|
||||
@@ -312,7 +312,7 @@ bool GSDevice11::Create(GSVSyncMode vsync_mode, bool allow_present_throttle)
|
||||
return false;
|
||||
for (size_t i = 0; i < std::size(m_interlace.ps); i++)
|
||||
{
|
||||
const std::string entry_point(StringUtil::StdStringFromFormat("ps_main%d", i));
|
||||
const std::string entry_point(StringUtil::StdStringFromFormat("ps_main%zu", i));
|
||||
m_interlace.ps[i] = m_shader_cache.GetPixelShader(m_dev.get(), *shader, nullptr, entry_point.c_str());
|
||||
if (!m_interlace.ps[i])
|
||||
return false;
|
||||
@@ -498,7 +498,7 @@ bool GSDevice11::Create(GSVSyncMode vsync_mode, bool allow_present_throttle)
|
||||
|
||||
for (size_t i = 0; i < std::size(m_date.primid_init_ps); i++)
|
||||
{
|
||||
const std::string entry_point(StringUtil::StdStringFromFormat("ps_stencil_image_init_%d", i));
|
||||
const std::string entry_point(StringUtil::StdStringFromFormat("ps_stencil_image_init_%zu", i));
|
||||
m_date.primid_init_ps[i] = m_shader_cache.GetPixelShader(m_dev.get(), *convert_hlsl, nullptr, entry_point.c_str());
|
||||
if (!m_date.primid_init_ps[i])
|
||||
return false;
|
||||
@@ -893,7 +893,7 @@ std::string GSDevice11::GetDriverInfo() const
|
||||
return ret;
|
||||
}
|
||||
|
||||
void GSDevice11::ResizeWindow(s32 new_window_width, s32 new_window_height, float new_window_scale)
|
||||
void GSDevice11::ResizeWindow(u32 new_window_width, u32 new_window_height, float new_window_scale)
|
||||
{
|
||||
if (!m_swap_chain || m_is_exclusive_fullscreen)
|
||||
return;
|
||||
@@ -1760,6 +1760,7 @@ void GSDevice11::SetupPS(const PSSelector& sel, const GSHWDrawConfig::PSConstant
|
||||
sm.AddMacro("PS_DITHER", sel.dither);
|
||||
sm.AddMacro("PS_DITHER_ADJUST", sel.dither_adjust);
|
||||
sm.AddMacro("PS_ZCLAMP", sel.zclamp);
|
||||
sm.AddMacro("PS_ZFLOOR", sel.zfloor);
|
||||
sm.AddMacro("PS_SCANMSK", sel.scanmsk);
|
||||
sm.AddMacro("PS_AUTOMATIC_LOD", sel.automatic_lod);
|
||||
sm.AddMacro("PS_MANUAL_LOD", sel.manual_lod);
|
||||
|
||||
@@ -273,7 +273,7 @@ public:
|
||||
RenderAPI GetRenderAPI() const override;
|
||||
|
||||
bool UpdateWindow() override;
|
||||
void ResizeWindow(s32 new_window_width, s32 new_window_height, float new_window_scale) override;
|
||||
void ResizeWindow(u32 new_window_width, u32 new_window_height, float new_window_scale) override;
|
||||
bool SupportsExclusiveFullscreen() const override;
|
||||
bool HasSurface() const override;
|
||||
void DestroySurface() override;
|
||||
|
||||
@@ -750,6 +750,8 @@ bool GSDevice12::Create(GSVSyncMode vsync_mode, bool allow_present_throttle)
|
||||
|
||||
InitializeState();
|
||||
InitializeSamplers();
|
||||
// Reference stencil isn't tied to pipeline, so we can set it once and leave it.
|
||||
SetStencilRef(1);
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -1054,7 +1056,7 @@ std::string GSDevice12::GetDriverInfo() const
|
||||
return ret;
|
||||
}
|
||||
|
||||
void GSDevice12::ResizeWindow(s32 new_window_width, s32 new_window_height, float new_window_scale)
|
||||
void GSDevice12::ResizeWindow(u32 new_window_width, u32 new_window_height, float new_window_scale)
|
||||
{
|
||||
if (!m_swap_chain)
|
||||
return;
|
||||
@@ -2920,6 +2922,7 @@ const ID3DBlob* GSDevice12::GetTFXPixelShader(const GSHWDrawConfig::PSSelector&
|
||||
sm.AddMacro("PS_DITHER", sel.dither);
|
||||
sm.AddMacro("PS_DITHER_ADJUST", sel.dither_adjust);
|
||||
sm.AddMacro("PS_ZCLAMP", sel.zclamp);
|
||||
sm.AddMacro("PS_ZFLOOR", sel.zfloor);
|
||||
sm.AddMacro("PS_SCANMSK", sel.scanmsk);
|
||||
sm.AddMacro("PS_AUTOMATIC_LOD", sel.automatic_lod);
|
||||
sm.AddMacro("PS_MANUAL_LOD", sel.manual_lod);
|
||||
@@ -3740,7 +3743,7 @@ void GSDevice12::SetupDATE(GSTexture* rt, GSTexture* ds, SetDATM datm, const GSV
|
||||
IASetVertexBuffer(vertices, sizeof(vertices[0]), 4);
|
||||
SetPrimitiveTopology(D3D_PRIMITIVE_TOPOLOGY_TRIANGLESTRIP);
|
||||
SetPipeline(m_convert[SetDATMShader(datm)].get());
|
||||
SetStencilRef(1);
|
||||
// Reference stencil value set on Create()
|
||||
BeginRenderPass(D3D12_RENDER_PASS_BEGINNING_ACCESS_TYPE_NO_ACCESS, D3D12_RENDER_PASS_ENDING_ACCESS_TYPE_NO_ACCESS,
|
||||
D3D12_RENDER_PASS_BEGINNING_ACCESS_TYPE_PRESERVE, D3D12_RENDER_PASS_ENDING_ACCESS_TYPE_PRESERVE,
|
||||
D3D12_RENDER_PASS_BEGINNING_ACCESS_TYPE_CLEAR, D3D12_RENDER_PASS_ENDING_ACCESS_TYPE_PRESERVE,
|
||||
@@ -3828,26 +3831,6 @@ GSTexture12* GSDevice12::SetupPrimitiveTrackingDATE(GSHWDrawConfig& config, Pipe
|
||||
|
||||
void GSDevice12::RenderHW(GSHWDrawConfig& config)
|
||||
{
|
||||
// Destination Alpha Setup
|
||||
const bool stencil_DATE_One = config.destination_alpha == GSHWDrawConfig::DestinationAlphaMode::StencilOne;
|
||||
const bool stencil_DATE = (config.destination_alpha == GSHWDrawConfig::DestinationAlphaMode::Stencil || stencil_DATE_One);
|
||||
|
||||
// TODO: Backport from vk.
|
||||
if (stencil_DATE_One)
|
||||
{
|
||||
config.ps.date = 0;
|
||||
config.alpha_second_pass.ps.date = 0;
|
||||
if (!config.ps.IsFeedbackLoop())
|
||||
{
|
||||
config.require_one_barrier = false;
|
||||
config.require_full_barrier = false;
|
||||
}
|
||||
if (!config.alpha_second_pass.ps.IsFeedbackLoop())
|
||||
{
|
||||
config.alpha_second_pass.require_one_barrier = false;
|
||||
config.alpha_second_pass.require_full_barrier = false;
|
||||
}
|
||||
}
|
||||
|
||||
GSTexture12* colclip_rt = static_cast<GSTexture12*>(g_gs_device->GetColorClipTexture());
|
||||
GSTexture12* draw_rt = static_cast<GSTexture12*>(config.rt);
|
||||
@@ -3910,8 +3893,29 @@ void GSDevice12::RenderHW(GSHWDrawConfig& config)
|
||||
}
|
||||
}
|
||||
|
||||
if (stencil_DATE)
|
||||
SetupDATE(draw_rt, config.ds, config.datm, config.drawarea);
|
||||
// Destination Alpha Setup
|
||||
const bool need_barrier = m_features.texture_barrier && (config.require_one_barrier || config.require_full_barrier);
|
||||
switch (config.destination_alpha)
|
||||
{
|
||||
case GSHWDrawConfig::DestinationAlphaMode::Off: // No setup
|
||||
case GSHWDrawConfig::DestinationAlphaMode::Full: // No setup
|
||||
case GSHWDrawConfig::DestinationAlphaMode::PrimIDTracking: // Setup is done below
|
||||
break;
|
||||
case GSHWDrawConfig::DestinationAlphaMode::StencilOne: // setup is done below
|
||||
{
|
||||
// we only need to do the setup here if we don't have barriers, in which case do full DATE.
|
||||
if (!need_barrier)
|
||||
{
|
||||
SetupDATE(draw_rt, config.ds, config.datm, config.drawarea);
|
||||
config.destination_alpha = GSHWDrawConfig::DestinationAlphaMode::Stencil;
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case GSHWDrawConfig::DestinationAlphaMode::Stencil:
|
||||
SetupDATE(draw_rt, config.ds, config.datm, config.drawarea);
|
||||
break;
|
||||
}
|
||||
|
||||
// stream buffer in first, in case we need to exec
|
||||
SetVSConstantBuffer(config.cb_vs);
|
||||
@@ -4033,6 +4037,17 @@ void GSDevice12::RenderHW(GSHWDrawConfig& config)
|
||||
// For depth testing and sampling, use a read only dsv, otherwise use a write dsv
|
||||
OMSetRenderTargets(draw_rt, draw_ds, config.scissor, config.tex && config.tex == config.ds);
|
||||
|
||||
// DX12 equivalent of vkCmdClearAttachments for StencilOne
|
||||
if (config.destination_alpha == GSHWDrawConfig::DestinationAlphaMode::StencilOne)
|
||||
{
|
||||
EndRenderPass();
|
||||
// Make sure the DSV is in writeable state
|
||||
draw_ds->TransitionToState(D3D12_RESOURCE_STATE_DEPTH_WRITE);
|
||||
|
||||
D3D12_RECT rect = {config.drawarea.left, config.drawarea.top, config.drawarea.left + config.drawarea.width(), config.drawarea.top + config.drawarea.height()};
|
||||
GetCommandList()->ClearDepthStencilView(draw_ds->GetWriteDescriptor(), D3D12_CLEAR_FLAG_STENCIL, 0.0f, 1, 1, &rect);
|
||||
}
|
||||
|
||||
// Begin render pass if new target or out of the area.
|
||||
if (!m_in_render_pass)
|
||||
{
|
||||
@@ -4042,14 +4057,18 @@ void GSDevice12::RenderHW(GSHWDrawConfig& config)
|
||||
// Denormalize clear color for hw colclip.
|
||||
clear_color *= GSVector4::cxpr(255.0f / 65535.0f, 255.0f / 65535.0f, 255.0f / 65535.0f, 1.0f);
|
||||
}
|
||||
|
||||
const bool stencil_DATE = config.destination_alpha == GSHWDrawConfig::DestinationAlphaMode::Stencil ||
|
||||
config.destination_alpha == GSHWDrawConfig::DestinationAlphaMode::StencilOne;
|
||||
|
||||
BeginRenderPass(GetLoadOpForTexture(draw_rt),
|
||||
draw_rt ? D3D12_RENDER_PASS_ENDING_ACCESS_TYPE_PRESERVE : D3D12_RENDER_PASS_ENDING_ACCESS_TYPE_NO_ACCESS,
|
||||
GetLoadOpForTexture(draw_ds),
|
||||
draw_ds ? D3D12_RENDER_PASS_ENDING_ACCESS_TYPE_PRESERVE : D3D12_RENDER_PASS_ENDING_ACCESS_TYPE_NO_ACCESS,
|
||||
stencil_DATE ? D3D12_RENDER_PASS_BEGINNING_ACCESS_TYPE_PRESERVE :
|
||||
D3D12_RENDER_PASS_BEGINNING_ACCESS_TYPE_NO_ACCESS,
|
||||
stencil_DATE ? (feedback ? D3D12_RENDER_PASS_ENDING_ACCESS_TYPE_PRESERVE :
|
||||
D3D12_RENDER_PASS_ENDING_ACCESS_TYPE_DISCARD) :
|
||||
stencil_DATE ? (need_barrier ? D3D12_RENDER_PASS_ENDING_ACCESS_TYPE_PRESERVE :
|
||||
D3D12_RENDER_PASS_ENDING_ACCESS_TYPE_DISCARD) :
|
||||
D3D12_RENDER_PASS_ENDING_ACCESS_TYPE_NO_ACCESS,
|
||||
clear_color, draw_ds ? draw_ds->GetClearDepth() : 0.0f, 1);
|
||||
}
|
||||
|
||||
@@ -407,7 +407,7 @@ public:
|
||||
void Destroy() override;
|
||||
|
||||
bool UpdateWindow() override;
|
||||
void ResizeWindow(s32 new_window_width, s32 new_window_height, float new_window_scale) override;
|
||||
void ResizeWindow(u32 new_window_width, u32 new_window_height, float new_window_scale) override;
|
||||
bool SupportsExclusiveFullscreen() const override;
|
||||
void DestroySurface() override;
|
||||
std::string GetDriverInfo() const override;
|
||||
|
||||
@@ -738,7 +738,7 @@ void GSTexture12::TransitionToState(ID3D12GraphicsCommandList* cmdlist, D3D12_RE
|
||||
{D3D12_RESOURCE_BARRIER_TYPE_TRANSITION, D3D12_RESOURCE_BARRIER_FLAG_NONE,
|
||||
{{m_resource.get(), 1, m_resource_state, D3D12_RESOURCE_STATE_DEPTH_WRITE}}},
|
||||
};
|
||||
GSDevice12::GetInstance()->GetCommandList()->ResourceBarrier(m_resource_state == D3D12_RESOURCE_STATE_DEPTH_WRITE ? 1 : 2, barriers);
|
||||
cmdlist->ResourceBarrier(m_resource_state == D3D12_RESOURCE_STATE_DEPTH_WRITE ? 1 : 2, barriers);
|
||||
}
|
||||
else if (m_resource_state == (D3D12_RESOURCE_STATE_DEPTH_READ | D3D12_RESOURCE_STATE_PIXEL_SHADER_RESOURCE))
|
||||
{
|
||||
@@ -749,7 +749,7 @@ void GSTexture12::TransitionToState(ID3D12GraphicsCommandList* cmdlist, D3D12_RE
|
||||
{D3D12_RESOURCE_BARRIER_TYPE_TRANSITION, D3D12_RESOURCE_BARRIER_FLAG_NONE,
|
||||
{{m_resource.get(), 1, D3D12_RESOURCE_STATE_DEPTH_WRITE, state}}},
|
||||
};
|
||||
GSDevice12::GetInstance()->GetCommandList()->ResourceBarrier(state == D3D12_RESOURCE_STATE_DEPTH_WRITE ? 1 : 2, barriers);
|
||||
cmdlist->ResourceBarrier(state == D3D12_RESOURCE_STATE_DEPTH_WRITE ? 1 : 2, barriers);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -3056,8 +3056,10 @@ void GSRendererHW::Draw()
|
||||
const int second_u = (PRIM->FST ? v[i + 1].U : static_cast<int>(v[i + 1].ST.S / v[i + 1].RGBAQ.Q)) >> 4;
|
||||
const int vector_width = std::abs(v[i + 1].XYZ.X - v[i].XYZ.X) / 16;
|
||||
const int tex_width = std::abs(second_u - first_u);
|
||||
const int first_vector = (static_cast<int>(v[i].XYZ.X + 8) - static_cast<int>(m_context->XYOFFSET.OFX)) / 16;
|
||||
// & 7 just a quicker way of doing % 8
|
||||
if ((vector_width & 7) != 0 || (tex_width & 7) != 0 || tex_width != vector_width)
|
||||
// If the first vector is the same position as the first_u, then it's not shuffling, it's just copying.
|
||||
if ((vector_width & 7) != 0 || (tex_width & 7) != 0 || tex_width != vector_width || first_vector == first_u)
|
||||
{
|
||||
shuffle_channel_reads = false;
|
||||
break;
|
||||
@@ -3194,6 +3196,7 @@ void GSRendererHW::Draw()
|
||||
float target_scale = GetTextureScaleFactor();
|
||||
bool scaled_copy = false;
|
||||
int scale_draw = IsScalingDraw(src, m_primitive_covers_without_gaps != NoGapsType::GapsFound);
|
||||
|
||||
if (GSConfig.UserHacks_NativeScaling != GSNativeScaling::Off)
|
||||
{
|
||||
if (target_scale > 1.0f && scale_draw > 0)
|
||||
@@ -3202,9 +3205,15 @@ void GSRendererHW::Draw()
|
||||
// 2 == Upscale, so likely putting it over the top of the render target.
|
||||
if (scale_draw == 1)
|
||||
{
|
||||
if (!PRIM->ABE || GSConfig.UserHacks_NativeScaling < GSNativeScaling::NormalUpscaled)
|
||||
target_scale = 1.0f;
|
||||
m_downscale_source = src->m_from_target ? src->m_from_target->GetScale() > 1.0f : false;
|
||||
const bool highlights_only = m_cached_ctx.TEST.ATE || (PRIM->ABE && m_context->ALPHA.C == 2 && m_context->ALPHA.FIX == 255);
|
||||
// If it's alpha tested/stenciling for the bloom, we don't want to using the Upscaled versions. Also if the source is already native scale, may as well keep it so.
|
||||
// Overlap check is for games such as Tomb Raider, where it recursively downsamples.
|
||||
// Also make sure this isn't a blend, just draw (possibly with modulation).
|
||||
if (GSConfig.UserHacks_NativeScaling < GSNativeScaling::NormalUpscaled || highlights_only || !PRIM->ABE || (src->m_from_target && src->m_from_target->Overlaps(m_cached_ctx.FRAME.Block(), m_cached_ctx.FRAME.FBW, m_cached_ctx.FRAME.PSM, m_r)))
|
||||
{
|
||||
target_scale = 1.0f;
|
||||
}
|
||||
}
|
||||
else
|
||||
m_downscale_source = ((GSConfig.UserHacks_NativeScaling != GSNativeScaling::Aggressive && GSConfig.UserHacks_NativeScaling != GSNativeScaling::AggressiveUpscaled) || !src->m_from_target) ? false : src->m_from_target->GetScale() > 1.0f; // Bad for GTA + Full Spectrum Warrior, good for Sacred Blaze + Parappa.
|
||||
@@ -3232,7 +3241,7 @@ void GSRendererHW::Draw()
|
||||
// This upscaling hack is for games which construct P8 textures by drawing a bunch of small sprites in C32,
|
||||
// then reinterpreting it as P8. We need to keep the off-screen intermediate textures at native resolution,
|
||||
// but not propagate that through to the normal render targets. Test Case: Crash Wrath of Cortex.
|
||||
if (no_ds && src && !m_channel_shuffle && src->m_from_target && (GSConfig.UserHacks_NativePaletteDraw || (src->m_target_direct && src->m_from_target->m_downscaled && scale_draw <= 1)) &&
|
||||
if (no_ds && src && !m_channel_shuffle && src->m_from_target && (GSConfig.UserHacks_NativePaletteDraw || (src->m_target_direct && src->m_from_target->m_downscaled && scale_draw <= 1)) &&
|
||||
src->m_scale == 1.0f && (src->m_TEX0.PSM == PSMT8 || src->m_TEX0.TBP0 == m_cached_ctx.FRAME.Block()))
|
||||
{
|
||||
GL_CACHE("HW: Using native resolution for target based on texture source");
|
||||
@@ -3525,7 +3534,7 @@ void GSRendererHW::Draw()
|
||||
|
||||
// Preserve downscaled target when copying directly from a downscaled target, or it's a normal draw using a downscaled target. Clears that are drawing to the target can also preserve size.
|
||||
// Of course if this size is different (in width) or this is a shuffle happening, this will be bypassed.
|
||||
const bool preserve_downscale_draw = (GSConfig.UserHacks_NativeScaling != GSNativeScaling::Off && (std::abs(scale_draw) == 1 || (scale_draw == 0 && src && src->m_from_target && src->m_from_target->m_downscaled))) || is_possible_mem_clear == ClearType::ClearWithDraw;
|
||||
const bool preserve_downscale_draw = (GSConfig.UserHacks_NativeScaling != GSNativeScaling::Off && ((std::abs(scale_draw) == 1 && !scaled_copy) || (scale_draw == 0 && src && src->m_from_target && src->m_from_target->m_downscaled))) || is_possible_mem_clear == ClearType::ClearWithDraw;
|
||||
|
||||
rt = g_texture_cache->LookupTarget(FRAME_TEX0, t_size, ((src && src->m_scale != 1) && (GSConfig.UserHacks_NativeScaling == GSNativeScaling::Normal || GSConfig.UserHacks_NativeScaling == GSNativeScaling::NormalUpscaled) && !possible_shuffle) ? GetTextureScaleFactor() : target_scale, GSTextureCache::RenderTarget, true,
|
||||
fm, false, force_preload, preserve_rt_rgb, preserve_rt_alpha, lookup_rect, possible_shuffle, is_possible_mem_clear && FRAME_TEX0.TBP0 != m_cached_ctx.ZBUF.Block(),
|
||||
@@ -5138,6 +5147,7 @@ void GSRendererHW::EmulateZbuffer(const GSTextureCache::Target* ds)
|
||||
m_conf.cb_vs.max_depth = GSVector2i(0xFFFFFFFF);
|
||||
//ps_cb.MaxDepth = GSVector4(0.0f, 0.0f, 0.0f, 1.0f);
|
||||
m_conf.ps.zclamp = 0;
|
||||
m_conf.ps.zfloor = !m_cached_ctx.ZBUF.ZMSK;
|
||||
|
||||
if (clamp_z)
|
||||
{
|
||||
@@ -7024,7 +7034,7 @@ __ri void GSRendererHW::HandleTextureHazards(const GSTextureCache::Target* rt, c
|
||||
// When using native HPO, the top-left column/row of pixels are often not drawn. Clamp these away to avoid sampling black,
|
||||
// causing bleeding into the edges of the downsampled texture.
|
||||
const u32 downsample_factor = static_cast<u32>(src_target->GetScale());
|
||||
const GSVector2i clamp_min = (GSConfig.UserHacks_HalfPixelOffset < GSHalfPixelOffset::Native) ?
|
||||
const GSVector2i clamp_min = (GSConfig.UserHacks_HalfPixelOffset != GSHalfPixelOffset::Native) ?
|
||||
GSVector2i(0, 0) :
|
||||
GSVector2i(downsample_factor, downsample_factor);
|
||||
GSVector4i copy_rect = tmm.coverage;
|
||||
@@ -9222,7 +9232,7 @@ int GSRendererHW::IsScalingDraw(GSTextureCache::Source* src, bool no_gaps)
|
||||
const bool no_resize = (std::abs(draw_size.x - tex_size.x) <= 1 && std::abs(draw_size.y - tex_size.y) <= 1);
|
||||
const bool can_maintain = no_resize || (!is_target_src && m_index.tail == 2);
|
||||
|
||||
if (!src || ((!is_target_src || src->m_from_target->m_downscaled) && can_maintain))
|
||||
if (!src || ((!is_target_src || (src->m_from_target->m_downscaled || GSConfig.UserHacks_NativeScaling > GSNativeScaling::Aggressive)) && can_maintain))
|
||||
return -1;
|
||||
|
||||
const GSDrawingContext& next_ctx = m_env.CTXT[m_env.PRIM.CTXT];
|
||||
@@ -9237,7 +9247,7 @@ int GSRendererHW::IsScalingDraw(GSTextureCache::Source* src, bool no_gaps)
|
||||
// Only allow non-bilineared downscales if it's most of the target (misdetections of shadows in Naruto, Transformers etc), otherwise it's fine.
|
||||
const GSVector4i src_valid = src->m_from_target ? src->m_from_target->m_valid : src->m_valid_rect;
|
||||
const GSVector2i tex_size_half = GSVector2i((src->GetRegion().HasX() ? src->GetRegionSize().x : src_valid.width()) / 2, (src->GetRegion().HasY() ? src->GetRegionSize().y : src_valid.height()) / 2);
|
||||
const bool possible_downscale = m_context->TEX1.MMIN == 1 || !src->m_from_target || src->m_from_target->m_downscaled || tex_size.x >= tex_size_half.x || tex_size.y >= tex_size_half.y;
|
||||
const bool possible_downscale = m_context->TEX1.MMIN == 1 || !src->m_from_target || src->m_from_target->m_downscaled || GSConfig.UserHacks_NativeScaling > GSNativeScaling::Aggressive || tex_size.x >= tex_size_half.x || tex_size.y >= tex_size_half.y;
|
||||
|
||||
if (is_downscale && (draw_size.x >= PCRTCDisplays.GetResolution().x || !possible_downscale))
|
||||
return 0;
|
||||
|
||||
@@ -691,7 +691,7 @@ void GSTextureCache::DirtyRectByPage(u32 sbp, u32 spsm, u32 sbw, Target* t, GSVe
|
||||
const int src_bpp = src_info->bpp;
|
||||
const bool column_align = !block_offset && src_r.z <= src_info->cs.x && src_r.w <= src_info->cs.y && src_info->depth == dst_info->depth;
|
||||
|
||||
if (block_offset)
|
||||
if (block_offset && src_info->bpp == dst_info->bpp)
|
||||
in_rect = in_rect.ralign<Align_Outside>(src_info->bs);
|
||||
else if (column_align)
|
||||
in_rect = in_rect.ralign<Align_Outside>(src_info->cs);
|
||||
@@ -2756,7 +2756,22 @@ GSTextureCache::Target* GSTextureCache::LookupTarget(GIFRegTEX0 TEX0, const GSVe
|
||||
if (!tex)
|
||||
return nullptr;
|
||||
|
||||
g_gs_device->StretchRect(dst->m_texture, sRect, tex, dRect, (type == RenderTarget) ? ShaderConvert::COPY : ShaderConvert::DEPTH_COPY, dst->m_scale < scale);
|
||||
if (scale == 1.0f)
|
||||
{
|
||||
// When using native HPO, the top-left column/row of pixels are often not drawn. Clamp these away to avoid sampling black,
|
||||
// causing bleeding into the edges of the downsampled texture.
|
||||
const u32 downsample_factor = static_cast<u32>(dst->GetScale());
|
||||
const GSVector2i clamp_min = (GSConfig.UserHacks_HalfPixelOffset != GSHalfPixelOffset::Native) ?
|
||||
GSVector2i(0, 0) :
|
||||
GSVector2i(downsample_factor, downsample_factor);
|
||||
|
||||
const GSVector4 dRect = GSVector4(dst->GetUnscaledRect());
|
||||
|
||||
g_gs_device->FilteredDownsampleTexture(dst->m_texture, tex, downsample_factor, clamp_min, dRect);
|
||||
}
|
||||
else
|
||||
g_gs_device->StretchRect(dst->m_texture, sRect, tex, dRect, (type == RenderTarget) ? ShaderConvert::COPY : ShaderConvert::DEPTH_COPY, dst->m_scale < scale);
|
||||
|
||||
g_perfmon.Put(GSPerfMon::TextureCopies, 1);
|
||||
m_target_memory_usage = (m_target_memory_usage - dst->m_texture->GetMemUsage()) + tex->GetMemUsage();
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
|
||||
#include "Config.h"
|
||||
#include "Host.h"
|
||||
#include "IconsFontAwesome6.h"
|
||||
#include "IconsFontAwesome.h"
|
||||
#include "GS/GSExtra.h"
|
||||
#include "GS/GSLocalMemory.h"
|
||||
#include "GS/Renderers/HW/GSTextureReplacements.h"
|
||||
|
||||
@@ -385,7 +385,7 @@ public:
|
||||
bool SupportsExclusiveFullscreen() const override;
|
||||
std::string GetDriverInfo() const override;
|
||||
|
||||
void ResizeWindow(s32 new_window_width, s32 new_window_height, float new_window_scale) override;
|
||||
void ResizeWindow(u32 new_window_width, u32 new_window_height, float new_window_scale) override;
|
||||
|
||||
void UpdateTexture(id<MTLTexture> texture, u32 x, u32 y, u32 width, u32 height, const void* data, u32 data_stride);
|
||||
|
||||
|
||||
@@ -1267,11 +1267,11 @@ std::string GSDeviceMTL::GetDriverInfo() const
|
||||
return desc;
|
||||
}}
|
||||
|
||||
void GSDeviceMTL::ResizeWindow(s32 new_window_width, s32 new_window_height, float new_window_scale)
|
||||
void GSDeviceMTL::ResizeWindow(u32 new_window_width, u32 new_window_height, float new_window_scale)
|
||||
{
|
||||
m_window_info.surface_scale = new_window_scale;
|
||||
if (!m_layer ||
|
||||
(m_window_info.surface_width == static_cast<u32>(new_window_width) && m_window_info.surface_height == static_cast<u32>(new_window_height)))
|
||||
(m_window_info.surface_width == new_window_width && m_window_info.surface_height == new_window_height))
|
||||
{
|
||||
return;
|
||||
}
|
||||
@@ -1878,6 +1878,7 @@ void GSDeviceMTL::MRESetHWPipelineState(GSHWDrawConfig::VSSelector vssel, GSHWDr
|
||||
setFnConstantI(m_fn_constants, pssel.dither, GSMTLConstantIndex_PS_DITHER);
|
||||
setFnConstantI(m_fn_constants, pssel.dither_adjust, GSMTLConstantIndex_PS_DITHER_ADJUST);
|
||||
setFnConstantB(m_fn_constants, pssel.zclamp, GSMTLConstantIndex_PS_ZCLAMP);
|
||||
setFnConstantB(m_fn_constants, pssel.zfloor, GSMTLConstantIndex_PS_ZFLOOR);
|
||||
setFnConstantB(m_fn_constants, pssel.tcoffsethack, GSMTLConstantIndex_PS_TCOFFSETHACK);
|
||||
setFnConstantB(m_fn_constants, pssel.urban_chaos_hle, GSMTLConstantIndex_PS_URBAN_CHAOS_HLE);
|
||||
setFnConstantB(m_fn_constants, pssel.tales_of_abyss_hle, GSMTLConstantIndex_PS_TALES_OF_ABYSS_HLE);
|
||||
|
||||
@@ -208,6 +208,7 @@ enum GSMTLFnConstants
|
||||
GSMTLConstantIndex_PS_DITHER,
|
||||
GSMTLConstantIndex_PS_DITHER_ADJUST,
|
||||
GSMTLConstantIndex_PS_ZCLAMP,
|
||||
GSMTLConstantIndex_PS_ZFLOOR,
|
||||
GSMTLConstantIndex_PS_TCOFFSETHACK,
|
||||
GSMTLConstantIndex_PS_URBAN_CHAOS_HLE,
|
||||
GSMTLConstantIndex_PS_TALES_OF_ABYSS_HLE,
|
||||
|
||||
@@ -61,6 +61,7 @@ constant uint PS_CHANNEL [[function_constant(GSMTLConstantIndex_PS_CH
|
||||
constant uint PS_DITHER [[function_constant(GSMTLConstantIndex_PS_DITHER)]];
|
||||
constant uint PS_DITHER_ADJUST [[function_constant(GSMTLConstantIndex_PS_DITHER_ADJUST)]];
|
||||
constant bool PS_ZCLAMP [[function_constant(GSMTLConstantIndex_PS_ZCLAMP)]];
|
||||
constant bool PS_ZFLOOR [[function_constant(GSMTLConstantIndex_PS_ZFLOOR)]];
|
||||
constant bool PS_TCOFFSETHACK [[function_constant(GSMTLConstantIndex_PS_TCOFFSETHACK)]];
|
||||
constant bool PS_URBAN_CHAOS_HLE [[function_constant(GSMTLConstantIndex_PS_URBAN_CHAOS_HLE)]];
|
||||
constant bool PS_TALES_OF_ABYSS_HLE [[function_constant(GSMTLConstantIndex_PS_TALES_OF_ABYSS_HLE)]];
|
||||
@@ -102,6 +103,7 @@ constant bool NEEDS_RT = NEEDS_RT_FOR_AFAIL || NEEDS_RT_EARLY || (!PS_PRIM_CHECK
|
||||
|
||||
constant bool PS_COLOR0 = !PS_NO_COLOR;
|
||||
constant bool PS_COLOR1 = !PS_NO_COLOR1;
|
||||
constant bool PS_ZOUTPUT = PS_ZCLAMP || PS_ZFLOOR;
|
||||
|
||||
struct MainVSIn
|
||||
{
|
||||
@@ -137,7 +139,7 @@ struct MainPSOut
|
||||
{
|
||||
float4 c0 [[color(0), index(0), function_constant(PS_COLOR0)]];
|
||||
float4 c1 [[color(0), index(1), function_constant(PS_COLOR1)]];
|
||||
float depth [[depth(less), function_constant(PS_ZCLAMP)]];
|
||||
float depth [[depth(less), function_constant(PS_ZOUTPUT)]];
|
||||
};
|
||||
|
||||
// MARK: - Vertex functions
|
||||
@@ -1209,8 +1211,13 @@ struct PSMain
|
||||
}
|
||||
if (PS_COLOR1)
|
||||
out.c1 = alpha_blend;
|
||||
|
||||
float depth_value = PS_ZFLOOR ? (floor(in.p.z * exp2(32.0f)) * exp2(-32.0f)) : in.p.z;
|
||||
|
||||
if (PS_ZCLAMP)
|
||||
out.depth = min(in.p.z, cb.max_depth);
|
||||
out.depth = min(depth_value, cb.max_depth);
|
||||
else if (PS_ZFLOOR)
|
||||
out.depth = depth_value;
|
||||
|
||||
return out;
|
||||
}
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
#include "common/StringUtil.h"
|
||||
|
||||
#include "imgui.h"
|
||||
#include "IconsFontAwesome6.h"
|
||||
#include "IconsFontAwesome.h"
|
||||
|
||||
#include <cinttypes>
|
||||
#include <fstream>
|
||||
@@ -888,17 +888,17 @@ bool GSDeviceOGL::UpdateWindow()
|
||||
return true;
|
||||
}
|
||||
|
||||
void GSDeviceOGL::ResizeWindow(s32 new_window_width, s32 new_window_height, float new_window_scale)
|
||||
void GSDeviceOGL::ResizeWindow(u32 new_window_width, u32 new_window_height, float new_window_scale)
|
||||
{
|
||||
m_window_info.surface_scale = new_window_scale;
|
||||
if (m_window_info.type == WindowInfo::Type::Surfaceless ||
|
||||
(m_window_info.surface_width == static_cast<u32>(new_window_width) &&
|
||||
m_window_info.surface_height == static_cast<u32>(new_window_height)))
|
||||
(m_window_info.surface_width == new_window_width &&
|
||||
m_window_info.surface_height == new_window_height))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
m_gl_context->ResizeSurface(static_cast<u32>(new_window_width), static_cast<u32>(new_window_height));
|
||||
m_gl_context->ResizeSurface(new_window_width, new_window_height);
|
||||
m_window_info = m_gl_context->GetWindowInfo();
|
||||
}
|
||||
|
||||
@@ -1389,7 +1389,9 @@ std::string GSDeviceOGL::GetPSSource(const PSSelector& sel)
|
||||
+ fmt::format("#define PS_DITHER {}\n", sel.dither)
|
||||
+ fmt::format("#define PS_DITHER_ADJUST {}\n", sel.dither_adjust)
|
||||
+ fmt::format("#define PS_ZCLAMP {}\n", sel.zclamp)
|
||||
+ fmt::format("#define PS_ZFLOOR {}\n", sel.zfloor)
|
||||
+ fmt::format("#define PS_BLEND_MIX {}\n", sel.blend_mix)
|
||||
+ fmt::format("#define PS_ZCLAMP {}\n", sel.zclamp)
|
||||
+ fmt::format("#define PS_ROUND_INV {}\n", sel.round_inv)
|
||||
+ fmt::format("#define PS_FIXED_ONE_A {}\n", sel.fixed_one_a)
|
||||
+ fmt::format("#define PS_PABE {}\n", sel.pabe)
|
||||
|
||||
@@ -297,7 +297,7 @@ public:
|
||||
void Destroy() override;
|
||||
|
||||
bool UpdateWindow() override;
|
||||
void ResizeWindow(s32 new_window_width, s32 new_window_height, float new_window_scale) override;
|
||||
void ResizeWindow(u32 new_window_width, u32 new_window_height, float new_window_scale) override;
|
||||
bool SupportsExclusiveFullscreen() const override;
|
||||
void DestroySurface() override;
|
||||
std::string GetDriverInfo() const override;
|
||||
|
||||
@@ -2216,12 +2216,12 @@ bool GSDeviceVK::UpdateWindow()
|
||||
return true;
|
||||
}
|
||||
|
||||
void GSDeviceVK::ResizeWindow(s32 new_window_width, s32 new_window_height, float new_window_scale)
|
||||
void GSDeviceVK::ResizeWindow(u32 new_window_width, u32 new_window_height, float new_window_scale)
|
||||
{
|
||||
m_resize_requested = false;
|
||||
|
||||
if (!m_swap_chain || (m_swap_chain->GetWidth() == static_cast<u32>(new_window_width) &&
|
||||
m_swap_chain->GetHeight() == static_cast<u32>(new_window_height)))
|
||||
if (!m_swap_chain || (m_swap_chain->GetWidth() == new_window_width &&
|
||||
m_swap_chain->GetHeight() == new_window_height))
|
||||
{
|
||||
// skip unnecessary resizes
|
||||
m_window_info.surface_scale = new_window_scale;
|
||||
@@ -4777,6 +4777,7 @@ VkShaderModule GSDeviceVK::GetTFXFragmentShader(const GSHWDrawConfig::PSSelector
|
||||
AddMacro(ss, "PS_DITHER", sel.dither);
|
||||
AddMacro(ss, "PS_DITHER_ADJUST", sel.dither_adjust);
|
||||
AddMacro(ss, "PS_ZCLAMP", sel.zclamp);
|
||||
AddMacro(ss, "PS_ZFLOOR", sel.zfloor);
|
||||
AddMacro(ss, "PS_PABE", sel.pabe);
|
||||
AddMacro(ss, "PS_SCANMSK", sel.scanmsk);
|
||||
AddMacro(ss, "PS_TEX_IS_FB", sel.tex_is_fb);
|
||||
|
||||
@@ -506,7 +506,7 @@ public:
|
||||
void Destroy() override;
|
||||
|
||||
bool UpdateWindow() override;
|
||||
void ResizeWindow(s32 new_window_width, s32 new_window_height, float new_window_scale) override;
|
||||
void ResizeWindow(u32 new_window_width, u32 new_window_height, float new_window_scale) override;
|
||||
bool SupportsExclusiveFullscreen() const override;
|
||||
void DestroySurface() override;
|
||||
std::string GetDriverInfo() const override;
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
#include "GameDatabase.h"
|
||||
#include "GS/GS.h"
|
||||
#include "Host.h"
|
||||
#include "IconsFontAwesome6.h"
|
||||
#include "IconsFontAwesome.h"
|
||||
#include "vtlb.h"
|
||||
|
||||
#include "common/Console.h"
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
|
||||
#include "cubeb/cubeb.h"
|
||||
#include "fmt/format.h"
|
||||
#include "IconsFontAwesome6.h"
|
||||
#include "IconsFontAwesome.h"
|
||||
|
||||
#ifdef _WIN32
|
||||
#include "common/RedtapeWindows.h"
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
#include "Achievements.h"
|
||||
#include "GS.h"
|
||||
#include "Host.h"
|
||||
#include "IconsFontAwesome6.h"
|
||||
#include "IconsFontAwesome.h"
|
||||
#include "ImGui/FullscreenUI.h"
|
||||
#include "ImGui/ImGuiOverlays.h"
|
||||
#include "Input/InputManager.h"
|
||||
|
||||
12
pcsx2/Hw.cpp
12
pcsx2/Hw.cpp
@@ -11,15 +11,27 @@
|
||||
|
||||
#include "fmt/format.h"
|
||||
|
||||
#include <deque>
|
||||
|
||||
using namespace R5900;
|
||||
|
||||
const int rdram_devices = 2; // put 8 for TOOL and 2 for PS2 and PSX
|
||||
int rdram_sdevid = 0;
|
||||
|
||||
std::deque<u8> ee_sio_rx_fifo;
|
||||
std::deque<u8> ee_sio_tx_fifo;
|
||||
|
||||
void hwReset()
|
||||
{
|
||||
std::memset(eeHw, 0, sizeof(eeHw));
|
||||
|
||||
{
|
||||
std::deque<u8> empty_rx;
|
||||
std::swap(ee_sio_rx_fifo, empty_rx);
|
||||
std::deque<u8> empty_tx;
|
||||
std::swap(ee_sio_tx_fifo, empty_tx);
|
||||
}
|
||||
|
||||
psHu32(SBUS_F260) = 0x1D000060;
|
||||
|
||||
// i guess this is kinda a version, it's used by some bioses
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
// SPDX-FileCopyrightText: 2002-2025 PCSX2 Dev Team
|
||||
// SPDX-License-Identifier: GPL-3.0+
|
||||
|
||||
#include <deque>
|
||||
|
||||
#pragma once
|
||||
|
||||
namespace EEMemoryMap
|
||||
@@ -355,3 +357,6 @@ extern void hwReset();
|
||||
|
||||
extern const int rdram_devices;
|
||||
extern int rdram_sdevid;
|
||||
|
||||
extern std::deque<u8> ee_sio_rx_fifo;
|
||||
extern std::deque<u8> ee_sio_tx_fifo;
|
||||
|
||||
@@ -125,7 +125,23 @@ mem32_t _hwRead32(u32 mem)
|
||||
switch( mem )
|
||||
{
|
||||
case SIO_ISR:
|
||||
|
||||
// Not (yet) hardware tested
|
||||
// The PS2SDK behaviour is as follows:
|
||||
|
||||
// TX: Don't write to TX FIFO until until bit 15 is 0
|
||||
|
||||
// RX: RX FIFO has data when bits 8-11 are not 0 (maybe a byte count?)
|
||||
// RX: When reading from the RX FIFO, set bits 0-2 to 1 (why??)
|
||||
|
||||
// For TX, we don't do any LLE buffering, so we can keep bit 15 to 0
|
||||
// For RX, just hack it so when the ee_rx_fifo.size() != 0, ISR = 0xf00
|
||||
|
||||
if(!ee_sio_rx_fifo.empty())
|
||||
return 0xf00;
|
||||
|
||||
return 0x0;
|
||||
break;
|
||||
case 0x1000f410:
|
||||
case MCH_RICM:
|
||||
return 0;
|
||||
@@ -211,6 +227,16 @@ mem32_t hwRead32_page_0F_INTC_HACK(u32 mem)
|
||||
template< uint page >
|
||||
mem8_t _hwRead8(u32 mem)
|
||||
{
|
||||
if(mem == SIO_RXFIFO)
|
||||
{
|
||||
if(ee_sio_rx_fifo.empty())
|
||||
return 0; // needs hardware test, what does it return with the FIFO is empty
|
||||
|
||||
const char c = ee_sio_rx_fifo.front();
|
||||
ee_sio_rx_fifo.pop_front();
|
||||
return c;
|
||||
}
|
||||
|
||||
u32 ret32 = _hwRead32<page, false>(mem & ~0x03);
|
||||
return ((u8*)&ret32)[mem & 0x03];
|
||||
}
|
||||
|
||||
@@ -285,26 +285,35 @@ void _hwWrite8(u32 mem, u8 value)
|
||||
#endif
|
||||
if (mem == SIO_TXFIFO)
|
||||
{
|
||||
static bool included_newline = false;
|
||||
static char sio_buffer[1024];
|
||||
static int sio_count;
|
||||
|
||||
if (value == '\r')
|
||||
static bool last_char_was_cr = false;
|
||||
|
||||
// skip the \n in \r\n
|
||||
if(last_char_was_cr && (value == '\n'))
|
||||
{
|
||||
included_newline = true;
|
||||
sio_buffer[sio_count++] = '\n';
|
||||
last_char_was_cr = false;
|
||||
return;
|
||||
}
|
||||
else if (!included_newline || (value != '\n'))
|
||||
|
||||
last_char_was_cr = value == '\r';
|
||||
bool should_flush_cause_newline = false;
|
||||
if (last_char_was_cr)
|
||||
{
|
||||
included_newline = false;
|
||||
sio_buffer[sio_count++] = value;
|
||||
should_flush_cause_newline = true;
|
||||
ee_sio_tx_fifo.push_back('\n');
|
||||
}
|
||||
else
|
||||
{
|
||||
should_flush_cause_newline = value == '\n';
|
||||
ee_sio_tx_fifo.push_back(value);
|
||||
}
|
||||
|
||||
if ((sio_count == std::size(sio_buffer)-1) || (sio_count != 0 && sio_buffer[sio_count-1] == '\n'))
|
||||
// Check if the only thing in the buffer
|
||||
if (ee_sio_tx_fifo.size() == 1024 || should_flush_cause_newline)
|
||||
{
|
||||
sio_buffer[sio_count] = 0;
|
||||
eeConLog( ShiftJIS_ConvertString(sio_buffer) );
|
||||
sio_count = 0;
|
||||
std::string output_string(ee_sio_tx_fifo.begin(), ee_sio_tx_fifo.end());
|
||||
|
||||
eeConLog(ShiftJIS_ConvertString(output_string.c_str()));
|
||||
ee_sio_tx_fifo.clear();
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -45,7 +45,7 @@
|
||||
#include "SIO/Pad/Pad.h"
|
||||
#include "SIO/Sio.h"
|
||||
|
||||
#include "IconsFontAwesome6.h"
|
||||
#include "IconsFontAwesome.h"
|
||||
#include "IconsPromptFont.h"
|
||||
#include "imgui.h"
|
||||
#include "imgui_internal.h"
|
||||
@@ -1439,7 +1439,7 @@ void FullscreenUI::DoVMInitialize(const VMBootParameters& boot_params, bool swit
|
||||
|
||||
if (switch_to_landing_on_failure)
|
||||
MTGS::RunOnGSThread(SwitchToLanding);
|
||||
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -4618,7 +4618,7 @@ void FullscreenUI::DrawGraphicsSettingsPage(SettingsInterface* bsi, bool show_ad
|
||||
static constexpr const char* s_renderer_names[] = {
|
||||
FSUI_NSTR("Automatic (Default)"),
|
||||
#ifdef _WIN32
|
||||
FSUI_NSTR("Direct3D 11"),
|
||||
FSUI_NSTR("Direct3D 11 (Legacy)"),
|
||||
FSUI_NSTR("Direct3D 12"),
|
||||
#endif
|
||||
#ifdef ENABLE_OPENGL
|
||||
@@ -6589,57 +6589,57 @@ void FullscreenUI::DrawAdvancedSettingsPage()
|
||||
{
|
||||
MenuHeading(FSUI_CSTR("Emotion Engine"));
|
||||
|
||||
DrawIntListSetting(bsi, FSUI_CSTR("Rounding Mode"),
|
||||
DrawIntListSetting(bsi, FSUI_ICONSTR(ICON_FA_ARROW_TREND_DOWN, "Rounding Mode"),
|
||||
FSUI_CSTR("Determines how the results of floating-point operations are rounded. Some games need specific settings."),
|
||||
"EmuCore/CPU", "FPU.Roundmode", static_cast<int>(FPRoundMode::ChopZero), ee_rounding_mode_settings,
|
||||
std::size(ee_rounding_mode_settings), true);
|
||||
DrawIntListSetting(bsi, FSUI_CSTR("Division Rounding Mode"),
|
||||
DrawIntListSetting(bsi, FSUI_ICONSTR(ICON_FA_DIVIDE, "Division Rounding Mode"),
|
||||
FSUI_CSTR("Determines how the results of floating-point division is rounded. Some games need specific settings."),
|
||||
"EmuCore/CPU", "FPUDiv.Roundmode", static_cast<int>(FPRoundMode::Nearest),
|
||||
ee_rounding_mode_settings, std::size(ee_rounding_mode_settings), true);
|
||||
DrawClampingModeSetting(bsi, FSUI_CSTR("Clamping Mode"),
|
||||
DrawClampingModeSetting(bsi, FSUI_ICONSTR(ICON_FA_ARROW_TURN_DOWN, "Clamping Mode"),
|
||||
FSUI_CSTR("Determines how out-of-range floating point numbers are handled. Some games need specific settings."), -1);
|
||||
|
||||
DrawToggleSetting(bsi, FSUI_CSTR("Enable EE Recompiler"),
|
||||
DrawToggleSetting(bsi, FSUI_ICONSTR(ICON_FA_MICROCHIP, "Enable EE Recompiler"),
|
||||
FSUI_CSTR("Performs just-in-time binary translation of 64-bit MIPS-IV machine code to native code."), "EmuCore/CPU/Recompiler",
|
||||
"EnableEE", true);
|
||||
DrawToggleSetting(bsi, FSUI_CSTR("Enable EE Cache"), FSUI_CSTR("Enables simulation of the EE's cache. Slow."),
|
||||
DrawToggleSetting(bsi, FSUI_ICONSTR(ICON_FA_BUCKET, "Enable EE Cache"), FSUI_CSTR("Enables simulation of the EE's cache. Slow."),
|
||||
"EmuCore/CPU/Recompiler", "EnableEECache", false);
|
||||
DrawToggleSetting(bsi, FSUI_CSTR("Enable INTC Spin Detection"),
|
||||
DrawToggleSetting(bsi, FSUI_ICONSTR(ICON_FA_ARROWS_SPIN, "Enable INTC Spin Detection"),
|
||||
FSUI_CSTR("Huge speedup for some games, with almost no compatibility side effects."), "EmuCore/Speedhacks", "IntcStat", true);
|
||||
DrawToggleSetting(bsi, FSUI_CSTR("Enable Wait Loop Detection"),
|
||||
DrawToggleSetting(bsi, FSUI_ICONSTR(ICON_FA_ARROWS_SPIN, "Enable Wait Loop Detection"),
|
||||
FSUI_CSTR("Moderate speedup for some games, with no known side effects."), "EmuCore/Speedhacks", "WaitLoop", true);
|
||||
DrawToggleSetting(bsi, FSUI_CSTR("Enable Fast Memory Access"),
|
||||
DrawToggleSetting(bsi, FSUI_ICONSTR(ICON_FA_MEMORY, "Enable Fast Memory Access"),
|
||||
FSUI_CSTR("Uses backpatching to avoid register flushing on every memory access."), "EmuCore/CPU/Recompiler", "EnableFastmem",
|
||||
true);
|
||||
|
||||
MenuHeading(FSUI_CSTR("Vector Units"));
|
||||
DrawIntListSetting(bsi, FSUI_CSTR("VU0 Rounding Mode"),
|
||||
DrawIntListSetting(bsi, FSUI_ICONSTR(ICON_FA_ARROW_TREND_DOWN, "VU0 Rounding Mode"),
|
||||
FSUI_CSTR("Determines how the results of floating-point operations are rounded. Some games need specific settings."),
|
||||
"EmuCore/CPU", "VU0.Roundmode", static_cast<int>(FPRoundMode::ChopZero),
|
||||
ee_rounding_mode_settings, std::size(ee_rounding_mode_settings), true);
|
||||
DrawClampingModeSetting(bsi, FSUI_CSTR("VU0 Clamping Mode"),
|
||||
DrawClampingModeSetting(bsi, FSUI_ICONSTR(ICON_FA_ARROW_TURN_DOWN, "VU0 Clamping Mode"),
|
||||
FSUI_CSTR("Determines how out-of-range floating point numbers are handled. Some games need specific settings."), 0);
|
||||
DrawIntListSetting(bsi, FSUI_CSTR("VU1 Rounding Mode"),
|
||||
DrawIntListSetting(bsi, FSUI_ICONSTR(ICON_FA_ARROW_TREND_DOWN, "VU1 Rounding Mode"),
|
||||
FSUI_CSTR("Determines how the results of floating-point operations are rounded. Some games need specific settings."),
|
||||
"EmuCore/CPU", "VU1.Roundmode", static_cast<int>(FPRoundMode::ChopZero),
|
||||
ee_rounding_mode_settings, std::size(ee_rounding_mode_settings), true);
|
||||
DrawClampingModeSetting(bsi, FSUI_CSTR("VU1 Clamping Mode"),
|
||||
DrawClampingModeSetting(bsi, FSUI_ICONSTR(ICON_FA_ARROW_TURN_DOWN, "VU1 Clamping Mode"),
|
||||
FSUI_CSTR("Determines how out-of-range floating point numbers are handled. Some games need specific settings."), 1);
|
||||
DrawToggleSetting(bsi, FSUI_CSTR("Enable VU0 Recompiler (Micro Mode)"),
|
||||
DrawToggleSetting(bsi, FSUI_ICONSTR(ICON_FA_MICROCHIP, "Enable VU0 Recompiler (Micro Mode)"),
|
||||
FSUI_CSTR("New Vector Unit recompiler with much improved compatibility. Recommended."), "EmuCore/CPU/Recompiler", "EnableVU0",
|
||||
true);
|
||||
DrawToggleSetting(bsi, FSUI_CSTR("Enable VU1 Recompiler"),
|
||||
DrawToggleSetting(bsi, FSUI_ICONSTR(ICON_FA_MICROCHIP, "Enable VU1 Recompiler"),
|
||||
FSUI_CSTR("New Vector Unit recompiler with much improved compatibility. Recommended."), "EmuCore/CPU/Recompiler", "EnableVU1",
|
||||
true);
|
||||
DrawToggleSetting(bsi, FSUI_CSTR("Enable VU Flag Optimization"),
|
||||
DrawToggleSetting(bsi, FSUI_ICONSTR(ICON_FA_FLAG, "Enable VU Flag Optimization"),
|
||||
FSUI_CSTR("Good speedup and high compatibility, may cause graphical errors."), "EmuCore/Speedhacks", "vuFlagHack", true);
|
||||
DrawToggleSetting(bsi, FSUI_CSTR("Enable Instant VU1"),
|
||||
DrawToggleSetting(bsi, FSUI_ICONSTR(ICON_FA_CLOCK, "Enable Instant VU1"),
|
||||
FSUI_CSTR("Runs VU1 instantly. Provides a modest speed improvement in most games. Safe for most games, but a few games may exhibit graphical errors."),
|
||||
"EmuCore/Speedhacks", "vu1Instant", true);
|
||||
|
||||
MenuHeading(FSUI_CSTR("I/O Processor"));
|
||||
DrawToggleSetting(bsi, FSUI_CSTR("Enable IOP Recompiler"),
|
||||
DrawToggleSetting(bsi, FSUI_ICONSTR(ICON_FA_MICROCHIP, "Enable IOP Recompiler"),
|
||||
FSUI_CSTR("Performs just-in-time binary translation of 32-bit MIPS-I machine code to native code."), "EmuCore/CPU/Recompiler",
|
||||
"EnableIOP", true);
|
||||
|
||||
@@ -9648,36 +9648,19 @@ TRANSLATE_NOOP("FullscreenUI", "Writes debug messages from the game's EE code to
|
||||
TRANSLATE_NOOP("FullscreenUI", "Writes debug messages from the game's IOP code to the console.");
|
||||
TRANSLATE_NOOP("FullscreenUI", "Logs disc reads from games.");
|
||||
TRANSLATE_NOOP("FullscreenUI", "Emotion Engine");
|
||||
TRANSLATE_NOOP("FullscreenUI", "Rounding Mode");
|
||||
TRANSLATE_NOOP("FullscreenUI", "Determines how the results of floating-point operations are rounded. Some games need specific settings.");
|
||||
TRANSLATE_NOOP("FullscreenUI", "Division Rounding Mode");
|
||||
TRANSLATE_NOOP("FullscreenUI", "Determines how the results of floating-point division is rounded. Some games need specific settings.");
|
||||
TRANSLATE_NOOP("FullscreenUI", "Clamping Mode");
|
||||
TRANSLATE_NOOP("FullscreenUI", "Determines how out-of-range floating point numbers are handled. Some games need specific settings.");
|
||||
TRANSLATE_NOOP("FullscreenUI", "Enable EE Recompiler");
|
||||
TRANSLATE_NOOP("FullscreenUI", "Performs just-in-time binary translation of 64-bit MIPS-IV machine code to native code.");
|
||||
TRANSLATE_NOOP("FullscreenUI", "Enable EE Cache");
|
||||
TRANSLATE_NOOP("FullscreenUI", "Enables simulation of the EE's cache. Slow.");
|
||||
TRANSLATE_NOOP("FullscreenUI", "Enable INTC Spin Detection");
|
||||
TRANSLATE_NOOP("FullscreenUI", "Huge speedup for some games, with almost no compatibility side effects.");
|
||||
TRANSLATE_NOOP("FullscreenUI", "Enable Wait Loop Detection");
|
||||
TRANSLATE_NOOP("FullscreenUI", "Moderate speedup for some games, with no known side effects.");
|
||||
TRANSLATE_NOOP("FullscreenUI", "Enable Fast Memory Access");
|
||||
TRANSLATE_NOOP("FullscreenUI", "Uses backpatching to avoid register flushing on every memory access.");
|
||||
TRANSLATE_NOOP("FullscreenUI", "Vector Units");
|
||||
TRANSLATE_NOOP("FullscreenUI", "VU0 Rounding Mode");
|
||||
TRANSLATE_NOOP("FullscreenUI", "VU0 Clamping Mode");
|
||||
TRANSLATE_NOOP("FullscreenUI", "VU1 Rounding Mode");
|
||||
TRANSLATE_NOOP("FullscreenUI", "VU1 Clamping Mode");
|
||||
TRANSLATE_NOOP("FullscreenUI", "Enable VU0 Recompiler (Micro Mode)");
|
||||
TRANSLATE_NOOP("FullscreenUI", "New Vector Unit recompiler with much improved compatibility. Recommended.");
|
||||
TRANSLATE_NOOP("FullscreenUI", "Enable VU1 Recompiler");
|
||||
TRANSLATE_NOOP("FullscreenUI", "Enable VU Flag Optimization");
|
||||
TRANSLATE_NOOP("FullscreenUI", "Good speedup and high compatibility, may cause graphical errors.");
|
||||
TRANSLATE_NOOP("FullscreenUI", "Enable Instant VU1");
|
||||
TRANSLATE_NOOP("FullscreenUI", "Runs VU1 instantly. Provides a modest speed improvement in most games. Safe for most games, but a few games may exhibit graphical errors.");
|
||||
TRANSLATE_NOOP("FullscreenUI", "I/O Processor");
|
||||
TRANSLATE_NOOP("FullscreenUI", "Enable IOP Recompiler");
|
||||
TRANSLATE_NOOP("FullscreenUI", "Performs just-in-time binary translation of 32-bit MIPS-I machine code to native code.");
|
||||
TRANSLATE_NOOP("FullscreenUI", "Save State Management");
|
||||
TRANSLATE_NOOP("FullscreenUI", "Sets the compression algorithm for savestate.");
|
||||
@@ -9907,7 +9890,7 @@ TRANSLATE_NOOP("FullscreenUI", "Extra + Preserve Sign");
|
||||
TRANSLATE_NOOP("FullscreenUI", "Full");
|
||||
TRANSLATE_NOOP("FullscreenUI", "Extra");
|
||||
TRANSLATE_NOOP("FullscreenUI", "Automatic (Default)");
|
||||
TRANSLATE_NOOP("FullscreenUI", "Direct3D 11");
|
||||
TRANSLATE_NOOP("FullscreenUI", "Direct3D 11 (Legacy)");
|
||||
TRANSLATE_NOOP("FullscreenUI", "Direct3D 12");
|
||||
TRANSLATE_NOOP("FullscreenUI", "OpenGL");
|
||||
TRANSLATE_NOOP("FullscreenUI", "Vulkan");
|
||||
@@ -10258,6 +10241,23 @@ TRANSLATE_NOOP("FullscreenUI", "Log Timestamps");
|
||||
TRANSLATE_NOOP("FullscreenUI", "EE Console");
|
||||
TRANSLATE_NOOP("FullscreenUI", "IOP Console");
|
||||
TRANSLATE_NOOP("FullscreenUI", "CDVD Verbose Reads");
|
||||
TRANSLATE_NOOP("FullscreenUI", "Rounding Mode");
|
||||
TRANSLATE_NOOP("FullscreenUI", "Division Rounding Mode");
|
||||
TRANSLATE_NOOP("FullscreenUI", "Clamping Mode");
|
||||
TRANSLATE_NOOP("FullscreenUI", "Enable EE Recompiler");
|
||||
TRANSLATE_NOOP("FullscreenUI", "Enable EE Cache");
|
||||
TRANSLATE_NOOP("FullscreenUI", "Enable INTC Spin Detection");
|
||||
TRANSLATE_NOOP("FullscreenUI", "Enable Wait Loop Detection");
|
||||
TRANSLATE_NOOP("FullscreenUI", "Enable Fast Memory Access");
|
||||
TRANSLATE_NOOP("FullscreenUI", "VU0 Rounding Mode");
|
||||
TRANSLATE_NOOP("FullscreenUI", "VU0 Clamping Mode");
|
||||
TRANSLATE_NOOP("FullscreenUI", "VU1 Rounding Mode");
|
||||
TRANSLATE_NOOP("FullscreenUI", "VU1 Clamping Mode");
|
||||
TRANSLATE_NOOP("FullscreenUI", "Enable VU0 Recompiler (Micro Mode)");
|
||||
TRANSLATE_NOOP("FullscreenUI", "Enable VU1 Recompiler");
|
||||
TRANSLATE_NOOP("FullscreenUI", "Enable VU Flag Optimization");
|
||||
TRANSLATE_NOOP("FullscreenUI", "Enable Instant VU1");
|
||||
TRANSLATE_NOOP("FullscreenUI", "Enable IOP Recompiler");
|
||||
TRANSLATE_NOOP("FullscreenUI", "Compression Method");
|
||||
TRANSLATE_NOOP("FullscreenUI", "Compression Level");
|
||||
TRANSLATE_NOOP("FullscreenUI", "Use Debug Device");
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
#include "common/Threading.h"
|
||||
#include "common/Timer.h"
|
||||
|
||||
#include "IconsFontAwesome6.h"
|
||||
#include "IconsFontAwesome.h"
|
||||
#include "imgui_internal.h"
|
||||
#include "imgui_stdlib.h"
|
||||
|
||||
@@ -708,16 +708,16 @@ void ImGuiFullscreen::EndLayout()
|
||||
const float notification_margin = LayoutScale(10.0f);
|
||||
const float spacing = LayoutScale(10.0f);
|
||||
const float notification_vertical_pos = GetNotificationVerticalPosition();
|
||||
|
||||
|
||||
// Get the horizonal position based on alignment
|
||||
float horizontal_pos;
|
||||
if (s_notification_horizontal_position <= 0.0f)
|
||||
horizontal_pos = notification_margin; // Left
|
||||
else if (s_notification_horizontal_position >= 1.0f)
|
||||
else if (s_notification_horizontal_position >= 1.0f)
|
||||
horizontal_pos = ImGui::GetIO().DisplaySize.x - notification_margin; // Right
|
||||
else
|
||||
horizontal_pos = ImGui::GetIO().DisplaySize.x * s_notification_horizontal_position; // Center
|
||||
|
||||
|
||||
ImVec2 position(horizontal_pos, notification_vertical_pos * ImGui::GetIO().DisplaySize.y +
|
||||
((notification_vertical_pos >= 0.5f) ? -notification_margin : notification_margin));
|
||||
DrawProgressDialogs(position, spacing);
|
||||
@@ -2574,11 +2574,11 @@ void ImGuiFullscreen::DrawInputDialog()
|
||||
ImGuiInputTextFlags flags = ImGuiInputTextFlags_None;
|
||||
if (s_input_dialog_filter_type != InputFilterType::None)
|
||||
flags |= ImGuiInputTextFlags_CallbackCharFilter;
|
||||
|
||||
|
||||
if (s_focus_reset_queued != FocusResetType::None)
|
||||
ImGui::SetKeyboardFocusHere();
|
||||
|
||||
ImGui::InputText("##input", &s_input_dialog_text, flags,
|
||||
|
||||
ImGui::InputText("##input", &s_input_dialog_text, flags,
|
||||
(s_input_dialog_filter_type != InputFilterType::None) ? input_callback : nullptr,
|
||||
(s_input_dialog_filter_type != InputFilterType::None) ? static_cast<void*>(&s_input_dialog_filter_type) : nullptr);
|
||||
|
||||
@@ -3056,7 +3056,7 @@ void ImGuiFullscreen::DrawNotifications(ImVec2& position, float spacing)
|
||||
final_x = position.x - box_width;
|
||||
else if (s_notification_horizontal_position > 0.0f && s_notification_horizontal_position < 1.0f)
|
||||
final_x = position.x - (box_width * 0.5f);
|
||||
|
||||
|
||||
const ImVec2 box_min(final_x, actual_y);
|
||||
const ImVec2 box_max(box_min.x + box_width, box_min.y + box_height);
|
||||
const u32 background_color = (toast_background_color & ~IM_COL32_A_MASK) | (opacity << IM_COL32_A_SHIFT);
|
||||
@@ -3209,14 +3209,14 @@ void ImGuiFullscreen::SetTheme(std::string_view theme)
|
||||
}
|
||||
else if (theme == "AMOLED")
|
||||
{
|
||||
UIBackgroundColor = HEX_TO_IMVEC4(0x000000, 0xff);
|
||||
UIBackgroundColor = HEX_TO_IMVEC4(0x0A0A0A, 0xff);
|
||||
UIBackgroundTextColor = HEX_TO_IMVEC4(0xffffff, 0xff);
|
||||
UIBackgroundLineColor = HEX_TO_IMVEC4(0xf0f0f0, 0xff);
|
||||
UIBackgroundHighlightColor = HEX_TO_IMVEC4(0x0c0c0c, 0xff);
|
||||
UIPopupBackgroundColor = HEX_TO_IMVEC4(0x212121, 0xf2);
|
||||
UIPrimaryColor = HEX_TO_IMVEC4(0x0a0a0a, 0xff);
|
||||
UIPrimaryLightColor = HEX_TO_IMVEC4(0xb5b5b5, 0xff);
|
||||
UIPrimaryDarkColor = HEX_TO_IMVEC4(0x000000, 0xff);
|
||||
UIPrimaryDarkColor = HEX_TO_IMVEC4(0x0A0A0A, 0xff);
|
||||
UIPrimaryTextColor = HEX_TO_IMVEC4(0xffffff, 0xff);
|
||||
UIDisabledColor = HEX_TO_IMVEC4(0x8d8d8d, 0xff);
|
||||
UITextHighlightColor = HEX_TO_IMVEC4(0x676767, 0xff);
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
#include "common/Pcsx2Defs.h"
|
||||
|
||||
#include "IconsFontAwesome6.h"
|
||||
#include "IconsFontAwesome.h"
|
||||
#include "imgui.h"
|
||||
#include "imgui_internal.h"
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
#include "Counters.h"
|
||||
#include "GS/GS.h"
|
||||
#include "Host.h"
|
||||
#include "IconsFontAwesome6.h"
|
||||
#include "IconsFontAwesome.h"
|
||||
#include "ImGui/FullscreenUI.h"
|
||||
#include "ImGui/ImGuiFullscreen.h"
|
||||
#include "ImGui/ImGuiManager.h"
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
#include "GS/Renderers/Common/GSDevice.h"
|
||||
#include "GS/Renderers/HW/GSTextureReplacements.h"
|
||||
#include "Host.h"
|
||||
#include "IconsFontAwesome6.h"
|
||||
#include "IconsFontAwesome.h"
|
||||
#include "IconsPromptFont.h"
|
||||
#include "ImGui/FullscreenUI.h"
|
||||
#include "ImGui/ImGuiAnimated.h"
|
||||
@@ -619,6 +619,8 @@ __ri void ImGuiManager::DrawSettingsOverlay(float scale, float margin, float spa
|
||||
APPEND("SD={}/{} ", GSConfig.SkipDrawStart, GSConfig.SkipDrawEnd);
|
||||
if (GSConfig.UserHacks_TextureInsideRt != GSTextureInRtMode::Disabled)
|
||||
APPEND("TexRT={} ", static_cast<unsigned>(GSConfig.UserHacks_TextureInsideRt));
|
||||
if (GSConfig.UserHacks_Limit24BitDepth != GSLimit24BitDepth::Disabled)
|
||||
APPEND("TDR={} ", static_cast<unsigned>(GSConfig.UserHacks_Limit24BitDepth));
|
||||
if (GSConfig.UserHacks_BilinearHack != GSBilinearDirtyMode::Automatic)
|
||||
APPEND("BLU={} ", static_cast<unsigned>(GSConfig.UserHacks_BilinearHack));
|
||||
if (GSConfig.UserHacks_ForceEvenSpritePosition)
|
||||
|
||||
@@ -67,7 +67,10 @@ void intBreakpoint(bool memcheck)
|
||||
{
|
||||
const u32 pc = cpuRegs.pc;
|
||||
if (CBreakPoints::CheckSkipFirst(BREAKPOINT_EE, pc) != 0)
|
||||
{
|
||||
CBreakPoints::ClearSkipFirst(BREAKPOINT_EE);
|
||||
return;
|
||||
}
|
||||
|
||||
if (!memcheck)
|
||||
{
|
||||
@@ -161,6 +164,8 @@ static void execI()
|
||||
intBreakpoint(false);
|
||||
|
||||
intCheckMemcheck();
|
||||
|
||||
CBreakPoints::CommitClearSkipFirst(BREAKPOINT_EE);
|
||||
#endif
|
||||
|
||||
const u32 pc = cpuRegs.pc;
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
#include "MTGS.h"
|
||||
#include "MTVU.h"
|
||||
#include "Host.h"
|
||||
#include "IconsFontAwesome6.h"
|
||||
#include "IconsFontAwesome.h"
|
||||
#include "VMManager.h"
|
||||
|
||||
#include "common/FPControl.h"
|
||||
@@ -946,7 +946,7 @@ void MTGS::ApplySettings()
|
||||
WaitGS(false, false, false);
|
||||
}
|
||||
|
||||
void MTGS::ResizeDisplayWindow(int width, int height, float scale)
|
||||
void MTGS::ResizeDisplayWindow(u32 width, u32 height, float scale)
|
||||
{
|
||||
pxAssertRel(IsOpen(), "MTGS is running");
|
||||
RunOnGSThread([width, height, scale]() {
|
||||
|
||||
@@ -69,7 +69,7 @@ namespace MTGS
|
||||
void RunOnGSThread(AsyncCallType func);
|
||||
void GameChanged();
|
||||
void ApplySettings();
|
||||
void ResizeDisplayWindow(int width, int height, float scale);
|
||||
void ResizeDisplayWindow(u32 width, u32 height, float scale);
|
||||
void UpdateDisplayWindow();
|
||||
void SetVSyncMode(GSVSyncMode mode, bool allow_present_throttle);
|
||||
void UpdateVSyncMode();
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
#include "Patch.h"
|
||||
#include "R5900.h"
|
||||
|
||||
#include "IconsFontAwesome6.h"
|
||||
#include "IconsFontAwesome.h"
|
||||
#include "fmt/format.h"
|
||||
|
||||
#include <algorithm>
|
||||
|
||||
@@ -755,6 +755,7 @@ Pcsx2Config::GSOptions::GSOptions()
|
||||
ManualUserHacks = false;
|
||||
UserHacks_AlignSpriteX = false;
|
||||
UserHacks_AutoFlush = GSHWAutoFlushLevel::Disabled;
|
||||
UserHacks_Limit24BitDepth = GSLimit24BitDepth::Disabled;
|
||||
UserHacks_CPUFBConversion = false;
|
||||
UserHacks_ReadTCOnClose = false;
|
||||
UserHacks_DisableDepthSupport = false;
|
||||
@@ -847,6 +848,7 @@ bool Pcsx2Config::GSOptions::OptionsAreEqual(const GSOptions& right) const
|
||||
OpEqu(UserHacks_CPUCLUTRender) &&
|
||||
OpEqu(UserHacks_GPUTargetCLUTMode) &&
|
||||
OpEqu(UserHacks_TextureInsideRt) &&
|
||||
OpEqu(UserHacks_Limit24BitDepth) &&
|
||||
OpEqu(UserHacks_BilinearHack) &&
|
||||
OpEqu(OverrideTextureBarriers) &&
|
||||
|
||||
@@ -983,6 +985,7 @@ void Pcsx2Config::GSOptions::LoadSave(SettingsWrapper& wrap)
|
||||
SettingsWrapIntEnumEx(UserHacks_BilinearHack, "UserHacks_BilinearHack");
|
||||
SettingsWrapBitBoolEx(UserHacks_NativePaletteDraw, "UserHacks_NativePaletteDraw");
|
||||
SettingsWrapIntEnumEx(UserHacks_TextureInsideRt, "UserHacks_TextureInsideRt");
|
||||
SettingsWrapIntEnumEx(UserHacks_Limit24BitDepth, "UserHacks_Limit24BitDepth");
|
||||
SettingsWrapBitBoolEx(UserHacks_EstimateTextureRegion, "UserHacks_EstimateTextureRegion");
|
||||
SettingsWrapBitBoolEx(FXAA, "fxaa");
|
||||
SettingsWrapBitBool(ShadeBoost);
|
||||
@@ -1111,6 +1114,7 @@ void Pcsx2Config::GSOptions::MaskUserHacks()
|
||||
UserHacks_CPUFBConversion = false;
|
||||
UserHacks_ReadTCOnClose = false;
|
||||
UserHacks_TextureInsideRt = GSTextureInRtMode::Disabled;
|
||||
UserHacks_Limit24BitDepth = GSLimit24BitDepth::Disabled;
|
||||
UserHacks_EstimateTextureRegion = false;
|
||||
UserHacks_TCOffsetX = 0;
|
||||
UserHacks_TCOffsetY = 0;
|
||||
|
||||
@@ -120,7 +120,10 @@ void psxBreakpoint(bool memcheck)
|
||||
{
|
||||
u32 pc = psxRegs.pc;
|
||||
if (CBreakPoints::CheckSkipFirst(BREAKPOINT_IOP, pc) != 0)
|
||||
{
|
||||
CBreakPoints::ClearSkipFirst(BREAKPOINT_IOP);
|
||||
return;
|
||||
}
|
||||
|
||||
if (!memcheck)
|
||||
{
|
||||
@@ -208,6 +211,8 @@ static __fi void execI()
|
||||
psxBreakpoint(false);
|
||||
|
||||
psxCheckMemcheck();
|
||||
|
||||
CBreakPoints::CommitClearSkipFirst(BREAKPOINT_IOP);
|
||||
#endif
|
||||
|
||||
// Inject IRX hack
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
#include "DebugTools/Debug.h"
|
||||
#include "common/Console.h"
|
||||
#include "IconsPromptFont.h"
|
||||
#include "IconsFontAwesome6.h"
|
||||
#include "IconsFontAwesome.h"
|
||||
#include "GS.h"
|
||||
#include "Host.h"
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
|
||||
#include "Input/SDLInputSource.h"
|
||||
|
||||
#include "IconsFontAwesome6.h"
|
||||
#include "IconsFontAwesome.h"
|
||||
|
||||
#include "VMManager.h"
|
||||
#include "common/Assertions.h"
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
#include "common/StringUtil.h"
|
||||
#include "common/ZipHelpers.h"
|
||||
|
||||
#include "IconsFontAwesome6.h"
|
||||
#include "IconsFontAwesome.h"
|
||||
#include "fmt/format.h"
|
||||
|
||||
#include <csetjmp>
|
||||
|
||||
@@ -3,4 +3,4 @@
|
||||
|
||||
/// Version number for GS and other shaders. Increment whenever any of the contents of the
|
||||
/// shaders change, to invalidate the cache.
|
||||
static constexpr u32 SHADER_CACHE_VERSION = 77;
|
||||
static constexpr u32 SHADER_CACHE_VERSION = 78;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
// SPDX-FileCopyrightText: 2002-2025 PCSX2 Dev Team
|
||||
// SPDX-License-Identifier: GPL-3.0+
|
||||
|
||||
#include "IconsFontAwesome6.h"
|
||||
#include "IconsFontAwesome.h"
|
||||
#include "USB/qemu-usb/qusb.h"
|
||||
#include "USB/qemu-usb/desc.h"
|
||||
#include "USB/qemu-usb/USBinternal.h"
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
// SPDX-License-Identifier: GPL-3.0+
|
||||
|
||||
#include "usb-pad.h"
|
||||
#include "IconsFontAwesome6.h"
|
||||
#include "IconsFontAwesome.h"
|
||||
#include "IconsPromptFont.h"
|
||||
#include "USB/qemu-usb/USBinternal.h"
|
||||
#include "USB/usb-pad/usb-pad-sdl-ff.h"
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
#include "common/Console.h"
|
||||
#include "Host.h"
|
||||
#include "IconsFontAwesome6.h"
|
||||
#include "IconsFontAwesome.h"
|
||||
#include "IconsPromptFont.h"
|
||||
#include "Input/InputManager.h"
|
||||
#include "StateWrapper.h"
|
||||
@@ -37,6 +37,8 @@ namespace usb_pad
|
||||
TRANSLATE_NOOP("USB", "Type 2"),
|
||||
TRANSLATE_NOOP("USB", "Shinkansen"),
|
||||
TRANSLATE_NOOP("USB", "Ryojōhen"),
|
||||
TRANSLATE_NOOP("USB", "Train Mascon"),
|
||||
TRANSLATE_NOOP("USB", "Master Controller"),
|
||||
};
|
||||
return subtypes;
|
||||
}
|
||||
@@ -63,6 +65,14 @@ namespace usb_pad
|
||||
CID_TC_L = CID_TC_C,
|
||||
CID_TC_R = CID_TC_D,
|
||||
|
||||
// Train Mascon
|
||||
CID_TC_ATS = CID_TC_D,
|
||||
CID_TC_CLOSE = CID_TC_CAMERA,
|
||||
CID_TC_POWER_UP,
|
||||
CID_TC_POWER_DOWN,
|
||||
CID_TC_REVERSER_UP,
|
||||
CID_TC_REVERSER_DOWN,
|
||||
|
||||
BUTTONS_OFFSET = CID_TC_B,
|
||||
};
|
||||
|
||||
@@ -110,6 +120,43 @@ namespace usb_pad
|
||||
|
||||
return bindings;
|
||||
}
|
||||
case TRAIN_MASCON:
|
||||
{
|
||||
static constexpr const InputBindingInfo bindings[] = {
|
||||
{"PowerUp", TRANSLATE_NOOP("USB", "Power Up"), nullptr, InputBindingInfo::Type::Button, CID_TC_POWER_UP, GenericInputBinding::R1},
|
||||
{"PowerDown", TRANSLATE_NOOP("USB", "Power Down"), nullptr, InputBindingInfo::Type::Button, CID_TC_POWER_DOWN, GenericInputBinding::L1},
|
||||
{"ReverserUp", TRANSLATE_NOOP("USB", "Reverser Up"), nullptr, InputBindingInfo::Type::Button, CID_TC_REVERSER_UP, GenericInputBinding::R2},
|
||||
{"ReverserDown", TRANSLATE_NOOP("USB", "Reverser Down"), nullptr, InputBindingInfo::Type::Button, CID_TC_REVERSER_DOWN, GenericInputBinding::L2},
|
||||
|
||||
{"Up", TRANSLATE_NOOP("USB", "D-Pad Up"), ICON_PF_DPAD_UP, InputBindingInfo::Type::Button, CID_TC_UP, GenericInputBinding::DPadUp},
|
||||
{"Down", TRANSLATE_NOOP("USB", "D-Pad Down"), ICON_PF_DPAD_DOWN, InputBindingInfo::Type::Button, CID_TC_DOWN, GenericInputBinding::DPadDown},
|
||||
{"Left", TRANSLATE_NOOP("USB", "D-Pad Left"), ICON_PF_DPAD_LEFT, InputBindingInfo::Type::Button, CID_TC_LEFT, GenericInputBinding::DPadLeft},
|
||||
{"Right", TRANSLATE_NOOP("USB", "D-Pad Right"), ICON_PF_DPAD_RIGHT, InputBindingInfo::Type::Button, CID_TC_RIGHT, GenericInputBinding::DPadRight},
|
||||
|
||||
{"ATS", TRANSLATE_NOOP("USB", "ATS"), nullptr, InputBindingInfo::Type::Button, CID_TC_ATS, GenericInputBinding::Triangle},
|
||||
{"Close", TRANSLATE_NOOP("USB", "Close"), nullptr, InputBindingInfo::Type::Button, CID_TC_CLOSE, GenericInputBinding::R3},
|
||||
{"A", TRANSLATE_NOOP("USB", "A Button"), ICON_PF_KEY_A, InputBindingInfo::Type::Button, CID_TC_A, GenericInputBinding::Square},
|
||||
{"B", TRANSLATE_NOOP("USB", "B Button"), ICON_PF_KEY_B, InputBindingInfo::Type::Button, CID_TC_B, GenericInputBinding::Cross},
|
||||
{"C", TRANSLATE_NOOP("USB", "C Button"), ICON_PF_KEY_C, InputBindingInfo::Type::Button, CID_TC_C, GenericInputBinding::Circle},
|
||||
{"Select", TRANSLATE_NOOP("USB", "Select"), ICON_PF_SELECT_SHARE, InputBindingInfo::Type::Button, CID_TC_SELECT, GenericInputBinding::Select},
|
||||
{"Start", TRANSLATE_NOOP("USB", "Start"), ICON_PF_START, InputBindingInfo::Type::Button, CID_TC_START, GenericInputBinding::Start},
|
||||
};
|
||||
return bindings;
|
||||
}
|
||||
case MASTER_CONTROLLER:
|
||||
{
|
||||
static constexpr const InputBindingInfo bindings[] = {
|
||||
{"PowerUp", TRANSLATE_NOOP("USB", "Power Up"), nullptr, InputBindingInfo::Type::Button, CID_TC_POWER_UP, GenericInputBinding::R1},
|
||||
{"PowerDown", TRANSLATE_NOOP("USB", "Power Down"), nullptr, InputBindingInfo::Type::Button, CID_TC_POWER_DOWN, GenericInputBinding::L1},
|
||||
{"ReverserUp", TRANSLATE_NOOP("USB", "Reverser Up"), nullptr, InputBindingInfo::Type::Button, CID_TC_REVERSER_UP, GenericInputBinding::R2},
|
||||
{"ReverserDown", TRANSLATE_NOOP("USB", "Reverser Down"), nullptr, InputBindingInfo::Type::Button, CID_TC_REVERSER_DOWN, GenericInputBinding::L2},
|
||||
{"S", TRANSLATE_NOOP("USB", "S"), ICON_PF_KEY_S, InputBindingInfo::Type::Button, CID_TC_D, GenericInputBinding::Cross},
|
||||
{"A", TRANSLATE_NOOP("USB", "A"), ICON_PF_KEY_A, InputBindingInfo::Type::Button, CID_TC_A, GenericInputBinding::Square},
|
||||
{"B", TRANSLATE_NOOP("USB", "B"), ICON_PF_KEY_B, InputBindingInfo::Type::Button, CID_TC_B, GenericInputBinding::Triangle},
|
||||
{"C", TRANSLATE_NOOP("USB", "C"), ICON_PF_KEY_C, InputBindingInfo::Type::Button, CID_TC_C, GenericInputBinding::Circle},
|
||||
};
|
||||
return bindings;
|
||||
}
|
||||
default:
|
||||
break;
|
||||
}
|
||||
@@ -151,21 +198,68 @@ namespace usb_pad
|
||||
{
|
||||
TrainDeviceState* s = USB_CONTAINER_OF(dev, TrainDeviceState, dev);
|
||||
|
||||
s->passthrough = USB::GetConfigBool(si, s->port, TypeName(), "Passthrough", false);
|
||||
switch (s->type)
|
||||
{
|
||||
case TRAIN_TYPE2:
|
||||
case TRAIN_SHINKANSEN:
|
||||
case TRAIN_RYOJOUHEN:
|
||||
s->passthrough = USB::GetConfigBool(si, s->port, TypeName(), "Passthrough", false);
|
||||
break;
|
||||
case MASTER_CONTROLLER:
|
||||
s->power_notches = USB::GetConfigInt(si, s->port, TypeName(), "power_notches", 5);
|
||||
s->brake_notches = USB::GetConfigInt(si, s->port, TypeName(), "brake_notches", 8);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
std::span<const SettingInfo> TrainDevice::Settings(u32 subtype) const
|
||||
{
|
||||
static constexpr const SettingInfo passthrough = {
|
||||
SettingInfo::Type::Boolean,
|
||||
"Passthrough",
|
||||
TRANSLATE_NOOP("USB", "Axes Passthrough"),
|
||||
TRANSLATE_NOOP("USB", "Passes through the unprocessed input axis to the game. Enable if you are using a compatible Densha De Go! controller. Disable if you are using any other joystick."),
|
||||
"false",
|
||||
};
|
||||
|
||||
static constexpr const SettingInfo info[] = {passthrough};
|
||||
return info;
|
||||
switch (subtype)
|
||||
{
|
||||
case TRAIN_TYPE2:
|
||||
case TRAIN_SHINKANSEN:
|
||||
case TRAIN_RYOJOUHEN:
|
||||
{
|
||||
static constexpr const SettingInfo info[] = {
|
||||
{
|
||||
.type = SettingInfo::Type::Boolean,
|
||||
.name = "Passthrough",
|
||||
.display_name = TRANSLATE_NOOP("USB", "Axes Passthrough"),
|
||||
.description = TRANSLATE_NOOP("USB", "Passes through the unprocessed input axis to the game. Enable if you are using a compatible Densha De Go! controller. Disable if you are using any other joystick."),
|
||||
.default_value = "false",
|
||||
}
|
||||
};
|
||||
return info;
|
||||
}
|
||||
case MASTER_CONTROLLER:
|
||||
{
|
||||
static constexpr const SettingInfo info[] = {
|
||||
{
|
||||
.type = SettingInfo::Type::Integer,
|
||||
.name = "power_notches",
|
||||
.display_name = TRANSLATE_NOOP("USB", "Power notches"),
|
||||
.description = TRANSLATE_NOOP("USB", "Selects the number of power notches (3-6)"),
|
||||
.default_value = "5",
|
||||
.min_value = "3",
|
||||
.max_value = "6",
|
||||
},
|
||||
{
|
||||
.type = SettingInfo::Type::Integer,
|
||||
.name = "brake_notches",
|
||||
.display_name = TRANSLATE_NOOP("USB", "Brake notches"),
|
||||
.description = TRANSLATE_NOOP("USB", "Selects the number of brake notches (5-8)"),
|
||||
.default_value = "8",
|
||||
.min_value = "5",
|
||||
.max_value = "8",
|
||||
}
|
||||
};
|
||||
return info;
|
||||
}
|
||||
default:
|
||||
return {};
|
||||
}
|
||||
}
|
||||
|
||||
static constexpr u32 button_mask(u32 bind_index)
|
||||
@@ -173,7 +267,7 @@ namespace usb_pad
|
||||
return (1u << (bind_index - TrainControlID::BUTTONS_OFFSET));
|
||||
}
|
||||
|
||||
static constexpr u8 button_at(u8 value, u32 index)
|
||||
static constexpr u16 button_at(u16 value, u32 index)
|
||||
{
|
||||
return value & button_mask(index);
|
||||
}
|
||||
@@ -205,6 +299,10 @@ namespace usb_pad
|
||||
case CID_TC_SELECT:
|
||||
case CID_TC_START:
|
||||
case CID_TC_CAMERA:
|
||||
case CID_TC_POWER_UP:
|
||||
case CID_TC_POWER_DOWN:
|
||||
case CID_TC_REVERSER_UP:
|
||||
case CID_TC_REVERSER_DOWN:
|
||||
{
|
||||
return (button_at(s->data.buttons, bind_index) != 0u) ? 1.0f : 0.0f;
|
||||
}
|
||||
@@ -251,14 +349,18 @@ namespace usb_pad
|
||||
case CID_TC_SELECT:
|
||||
case CID_TC_START:
|
||||
case CID_TC_CAMERA:
|
||||
case CID_TC_POWER_UP:
|
||||
case CID_TC_POWER_DOWN:
|
||||
case CID_TC_REVERSER_UP:
|
||||
case CID_TC_REVERSER_DOWN:
|
||||
{
|
||||
const u32 mask = button_mask(bind_index);
|
||||
if (value >= 0.5f)
|
||||
s->data.buttons |= mask;
|
||||
else
|
||||
s->data.buttons &= ~mask;
|
||||
break;
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
@@ -452,11 +554,23 @@ namespace usb_pad
|
||||
return (get_ab(buttons) | (button_at(buttons, CID_TC_CAMERA) >> 4) | ((get_cd(buttons) | get_ss(buttons)) << 1));
|
||||
}
|
||||
|
||||
void TrainDeviceState::UpdateHandles(u8 max_power, u8 max_brake)
|
||||
{
|
||||
if (!button_at(prev_buttons, CID_TC_POWER_UP) && button_at(data.buttons, CID_TC_POWER_UP) && handle < max_brake + 1 + max_power)
|
||||
handle++;
|
||||
if (!button_at(prev_buttons, CID_TC_POWER_DOWN) && button_at(data.buttons, CID_TC_POWER_DOWN) && handle > 0)
|
||||
handle--;
|
||||
if (!button_at(prev_buttons, CID_TC_REVERSER_UP) && button_at(data.buttons, CID_TC_REVERSER_UP) && reverser < 2)
|
||||
reverser++;
|
||||
if (!button_at(prev_buttons, CID_TC_REVERSER_DOWN) && button_at(data.buttons, CID_TC_REVERSER_DOWN) && reverser > 0)
|
||||
reverser--;
|
||||
}
|
||||
|
||||
static void train_handle_data(USBDevice* dev, USBPacket* p)
|
||||
{
|
||||
TrainDeviceState* s = USB_CONTAINER_OF(dev, TrainDeviceState, dev);
|
||||
|
||||
if (p->pid != USB_TOKEN_IN || p->ep->nr != 1)
|
||||
if (s->type < MASTER_CONTROLLER && (p->pid != USB_TOKEN_IN || p->ep->nr != 1))
|
||||
{
|
||||
Console.Error("Unhandled TrainController request pid=%d ep=%u", p->pid, p->ep->nr);
|
||||
p->status = USB_RET_STALL;
|
||||
@@ -501,6 +615,77 @@ namespace usb_pad
|
||||
usb_packet_copy(p, &out, sizeof(out));
|
||||
break;
|
||||
}
|
||||
case TRAIN_MASCON:
|
||||
{
|
||||
s->UpdateHandles(5, 6);
|
||||
s->prev_buttons = s->data.buttons;
|
||||
|
||||
TrainConData_TrainMascon out = {};
|
||||
out.one = 0x01;
|
||||
out.handle = 1 + s->handle;
|
||||
out.reverser = s->reverser < 2 ? !s->reverser : s->reverser;
|
||||
out.ats = !!button_at(s->data.buttons, CID_TC_ATS);
|
||||
out.close = !!button_at(s->data.buttons, CID_TC_CLOSE);
|
||||
out.button_a_soft = !!button_at(s->data.buttons, CID_TC_A);
|
||||
out.button_a_hard = !!button_at(s->data.buttons, CID_TC_A);
|
||||
out.button_b = !!button_at(s->data.buttons, CID_TC_B);
|
||||
out.button_c = !!button_at(s->data.buttons, CID_TC_C);
|
||||
out.start = !!button_at(s->data.buttons, CID_TC_START);
|
||||
out.select = !!button_at(s->data.buttons, CID_TC_SELECT);
|
||||
out.dpad_up = s->data.hat_up;
|
||||
out.dpad_down = s->data.hat_down;
|
||||
out.dpad_left = s->data.hat_left;
|
||||
out.dpad_right = s->data.hat_right;
|
||||
usb_packet_copy(p, &out, sizeof(out));
|
||||
break;
|
||||
}
|
||||
case MASTER_CONTROLLER:
|
||||
{
|
||||
if (p->ep->nr == 1) // interrupt in
|
||||
{
|
||||
p->status = USB_RET_STALL;
|
||||
break;
|
||||
}
|
||||
else if (p->ep->nr == 2) // bulk out
|
||||
{
|
||||
// The game sends a reset command after ~1500ms without updates. Resend the status during the next transfer
|
||||
s->last_handle = -1;
|
||||
s->last_reverser = -1;
|
||||
break;
|
||||
} // else bulk in
|
||||
|
||||
s->UpdateHandles(s->power_notches, s->brake_notches);
|
||||
|
||||
char data[100];
|
||||
std::memset(data, 0, sizeof(data));
|
||||
u8 pos = 0;
|
||||
|
||||
if (s->last_handle != s->handle)
|
||||
{
|
||||
pos += snprintf(data + pos, sizeof(data) - pos, "%s\x0d", s->mc_handle[s->handle + 8 - s->brake_notches]);
|
||||
s->last_handle = s->handle;
|
||||
}
|
||||
if (s->last_reverser != s->reverser)
|
||||
{
|
||||
pos += snprintf(data + pos, sizeof(data) - pos, "%s\x0d", s->mc_reverser[s->reverser]);
|
||||
s->last_reverser = s->reverser;
|
||||
}
|
||||
|
||||
for (int i = 0; i < 4; i++)
|
||||
{
|
||||
if (!button_at(s->prev_buttons, BUTTONS_OFFSET + i) && button_at(s->data.buttons, BUTTONS_OFFSET + i))
|
||||
{
|
||||
pos += snprintf(data + pos, sizeof(data) - pos, "%s\x0d", s->mc_button_pressed[i]);
|
||||
}
|
||||
if (button_at(s->prev_buttons, BUTTONS_OFFSET + i) && !button_at(s->data.buttons, BUTTONS_OFFSET + i))
|
||||
{
|
||||
pos += snprintf(data + pos, sizeof(data) - pos, "%s\x0d", s->mc_button_released[i]);
|
||||
}
|
||||
}
|
||||
s->prev_buttons = s->data.buttons;
|
||||
usb_packet_copy(p, data, std::min<u16>(p->buffer_size, pos));
|
||||
break;
|
||||
}
|
||||
default:
|
||||
Console.Error("Unhandled TrainController USB_TOKEN_IN pid=%d ep=%u type=%u", p->pid, p->ep->nr, s->type);
|
||||
p->status = USB_RET_IOERROR;
|
||||
@@ -520,25 +705,42 @@ namespace usb_pad
|
||||
s->desc.str = dct01_desc_strings;
|
||||
if (usb_desc_parse_dev(dct01_dev_descriptor, sizeof(dct01_dev_descriptor), s->desc, s->desc_dev) < 0)
|
||||
goto fail;
|
||||
if (usb_desc_parse_config(taito_denshacon_config_descriptor, sizeof(taito_denshacon_config_descriptor), s->desc_dev) < 0)
|
||||
goto fail;
|
||||
break;
|
||||
case TRAIN_SHINKANSEN:
|
||||
s->desc.str = dct02_desc_strings;
|
||||
if (usb_desc_parse_dev(dct02_dev_descriptor, sizeof(dct02_dev_descriptor), s->desc, s->desc_dev) < 0)
|
||||
goto fail;
|
||||
if (usb_desc_parse_config(taito_denshacon_config_descriptor, sizeof(taito_denshacon_config_descriptor), s->desc_dev) < 0)
|
||||
goto fail;
|
||||
break;
|
||||
case TRAIN_RYOJOUHEN:
|
||||
s->desc.str = dct03_desc_strings;
|
||||
if (usb_desc_parse_dev(dct03_dev_descriptor, sizeof(dct03_dev_descriptor), s->desc, s->desc_dev) < 0)
|
||||
goto fail;
|
||||
if (usb_desc_parse_config(taito_denshacon_config_descriptor, sizeof(taito_denshacon_config_descriptor), s->desc_dev) < 0)
|
||||
goto fail;
|
||||
break;
|
||||
case TRAIN_MASCON:
|
||||
s->desc.str = dct03_desc_strings;
|
||||
if (usb_desc_parse_dev(train_mascon_dev_descriptor, sizeof(train_mascon_dev_descriptor), s->desc, s->desc_dev) < 0)
|
||||
goto fail;
|
||||
if (usb_desc_parse_config(train_mascon_config_descriptor, sizeof(train_mascon_config_descriptor), s->desc_dev) < 0)
|
||||
goto fail;
|
||||
break;
|
||||
case MASTER_CONTROLLER:
|
||||
s->desc.str = dct03_desc_strings;
|
||||
if (usb_desc_parse_dev(master_controller_dev_descriptor, sizeof(master_controller_dev_descriptor), s->desc, s->desc_dev) < 0)
|
||||
goto fail;
|
||||
if (usb_desc_parse_config(master_controller_config_descriptor, sizeof(master_controller_config_descriptor), s->desc_dev) < 0)
|
||||
goto fail;
|
||||
break;
|
||||
|
||||
default:
|
||||
goto fail;
|
||||
}
|
||||
|
||||
if (usb_desc_parse_config(taito_denshacon_config_descriptor, sizeof(taito_denshacon_config_descriptor), s->desc_dev) < 0)
|
||||
goto fail;
|
||||
|
||||
s->dev.speed = USB_SPEED_FULL;
|
||||
s->dev.klass.handle_attach = usb_desc_attach;
|
||||
s->dev.klass.handle_reset = train_handle_reset;
|
||||
|
||||
@@ -11,10 +11,11 @@ namespace usb_pad
|
||||
{
|
||||
enum TrainDeviceTypes
|
||||
{
|
||||
TRAIN_TYPE2, // TCPP20009 or similar
|
||||
TRAIN_SHINKANSEN, // TCPP20011
|
||||
TRAIN_RYOJOUHEN, // TCPP20014
|
||||
TRAIN_COUNT,
|
||||
TRAIN_TYPE2, // TCPP-20009 or similar
|
||||
TRAIN_SHINKANSEN, // TCPP-20011
|
||||
TRAIN_RYOJOUHEN, // TCPP-20014
|
||||
TRAIN_MASCON, // COTM-02001
|
||||
MASTER_CONTROLLER, // VOK-00105 or VOK-00106 with OGCW-10001 adapter
|
||||
};
|
||||
|
||||
class TrainDevice final : public DeviceProxy
|
||||
@@ -39,7 +40,7 @@ namespace usb_pad
|
||||
u8 control;
|
||||
u8 brake;
|
||||
u8 power;
|
||||
u8 horn;
|
||||
u8 horn; // pedal
|
||||
u8 hat;
|
||||
u8 buttons;
|
||||
};
|
||||
@@ -49,7 +50,7 @@ namespace usb_pad
|
||||
{
|
||||
u8 brake;
|
||||
u8 power;
|
||||
u8 horn;
|
||||
u8 horn; // pedal
|
||||
u8 hat;
|
||||
u8 buttons;
|
||||
u8 pad;
|
||||
@@ -60,12 +61,37 @@ namespace usb_pad
|
||||
{
|
||||
u8 brake;
|
||||
u8 power;
|
||||
u8 horn;
|
||||
u8 horn; // pedal
|
||||
u8 hat;
|
||||
u8 buttons;
|
||||
u8 pad[3];
|
||||
};
|
||||
static_assert(sizeof(TrainConData_Ryojouhen) == 8);
|
||||
|
||||
struct TrainConData_TrainMascon
|
||||
{
|
||||
u8 one;
|
||||
|
||||
u8 handle : 4;
|
||||
u8 reverser : 4;
|
||||
|
||||
u8 ats : 1;
|
||||
u8 close : 1;
|
||||
u8 button_a_soft : 1;
|
||||
u8 button_a_hard : 1;
|
||||
u8 button_b : 1;
|
||||
u8 button_c : 1;
|
||||
u8 : 2;
|
||||
|
||||
u8 start : 1;
|
||||
u8 select : 1;
|
||||
u8 dpad_up : 1;
|
||||
u8 dpad_down : 1;
|
||||
u8 dpad_left : 1;
|
||||
u8 dpad_right : 1;
|
||||
u8 : 2;
|
||||
};
|
||||
static_assert(sizeof(TrainConData_TrainMascon) == 4);
|
||||
#pragma pack(pop)
|
||||
|
||||
struct TrainDeviceState
|
||||
@@ -75,6 +101,7 @@ namespace usb_pad
|
||||
|
||||
void Reset();
|
||||
void UpdateHatSwitch() noexcept;
|
||||
void UpdateHandles(u8 max_power, u8 max_brake);
|
||||
|
||||
USBDevice dev{};
|
||||
USBDesc desc{};
|
||||
@@ -95,12 +122,24 @@ namespace usb_pad
|
||||
u8 power; // 255 is fully applied
|
||||
u8 brake; // 255 is fully applied
|
||||
u8 hatswitch; // direction
|
||||
u8 buttons; // active high
|
||||
u16 buttons; // active high
|
||||
} data = {};
|
||||
|
||||
// Master Controller
|
||||
const char* mc_handle[16] = {"TSB20", "TSB30", "TSB40", "TSE99", "TSA05", "TSA15", "TSA25", "TSA35", "TSA45", "TSA50", "TSA55", "TSA65", "TSA75", "TSA85", "TSA95", "TSB60"};
|
||||
const char* mc_reverser[3] = {"TSG00", "TSG50", "TSG99"};
|
||||
const char* mc_button_pressed[4] = {"TSY99", "TSX99", "TSZ99", "TSK99"};
|
||||
const char* mc_button_released[4] = {"TSY00", "TSX00", "TSZ00", "TSK00"};
|
||||
u8 power_notches;
|
||||
u8 brake_notches;
|
||||
|
||||
u16 prev_buttons;
|
||||
s8 last_handle = -1, handle = 0;
|
||||
s8 last_reverser = -1, reverser = 1;
|
||||
};
|
||||
|
||||
// Taito Densha Controllers as described at:
|
||||
// https://marcriera.github.io/ddgo-controller-docs/controllers/usb/
|
||||
// https://traincontrollerdb.marcriera.cat/hardware/#usb
|
||||
#define DEFINE_DCT_DEV_DESCRIPTOR(prefix, subclass, product) \
|
||||
static const uint8_t prefix##_dev_descriptor[] = { \
|
||||
/* bLength */ USB_DEVICE_DESC_SIZE, \
|
||||
@@ -185,4 +224,114 @@ namespace usb_pad
|
||||
// dct03_dev_descriptor
|
||||
DEFINE_DCT_DEV_DESCRIPTOR(dct03, 0xFF, 0x0007);
|
||||
|
||||
// ---- Train Mascon ----
|
||||
|
||||
static const uint8_t train_mascon_dev_descriptor[] = {
|
||||
0x12, // bLength
|
||||
0x01, // bDescriptorType (Device)
|
||||
0x10, 0x01, // bcdUSB 1.10
|
||||
0x00, // bDeviceClass (Use class information in the Interface Descriptors)
|
||||
0x00, // bDeviceSubClass
|
||||
0x00, // bDeviceProtocol
|
||||
0x08, // bMaxPacketSize0 8
|
||||
0x06, 0x1C, // idVendor 0x1C06
|
||||
0xA7, 0x77, // idProduct 0x77A7
|
||||
0x02, 0x02, // bcdDevice 2.02
|
||||
0x01, // iManufacturer (String Index)
|
||||
0x02, // iProduct (String Index)
|
||||
0x03, // iSerialNumber (String Index)
|
||||
0x01, // bNumConfigurations 1
|
||||
};
|
||||
|
||||
static const uint8_t train_mascon_config_descriptor[] = {
|
||||
0x09, // bLength
|
||||
0x02, // bDescriptorType (Configuration)
|
||||
0x19, 0x00, // wTotalLength 25
|
||||
0x01, // bNumInterfaces 1
|
||||
0x01, // bConfigurationValue
|
||||
0x04, // iConfiguration (String Index)
|
||||
0xA0, // bmAttributes Remote Wakeup
|
||||
0x32, // bMaxPower 100mA
|
||||
|
||||
0x09, // bLength
|
||||
0x04, // bDescriptorType (Interface)
|
||||
0x00, // bInterfaceNumber 0
|
||||
0x00, // bAlternateSetting
|
||||
0x01, // bNumEndpoints 1
|
||||
0x00, // bInterfaceClass
|
||||
0x00, // bInterfaceSubClass
|
||||
0x00, // bInterfaceProtocol
|
||||
0x00, // iInterface (String Index)
|
||||
|
||||
0x07, // bLength
|
||||
0x05, // bDescriptorType (Endpoint)
|
||||
0x81, // bEndpointAddress (IN/D2H)
|
||||
0x03, // bmAttributes (Interrupt)
|
||||
0x08, 0x00, // wMaxPacketSize 8
|
||||
0x14, // bInterval 20 (unit depends on device speed)
|
||||
};
|
||||
|
||||
// ---- Master Controller ----
|
||||
// Implements a generic PL2303 adapter.
|
||||
// Replace with official OGCW-10001 descriptors when available.
|
||||
|
||||
static const uint8_t master_controller_dev_descriptor[] = {
|
||||
0x12, // bLength
|
||||
0x01, // bDescriptorType (Device)
|
||||
0x10, 0x01, // bcdUSB 1.10
|
||||
0x00, // bDeviceClass (Use class information in the Interface Descriptors)
|
||||
0x00, // bDeviceSubClass
|
||||
0x00, // bDeviceProtocol
|
||||
0x40, // bMaxPacketSize0 64
|
||||
0x7B, 0x06, // idVendor 0x067B
|
||||
0x03, 0x23, // idProduct 0x2303
|
||||
0x00, 0x03, // bcdDevice 3.00
|
||||
0x01, // iManufacturer (String Index)
|
||||
0x02, // iProduct (String Index)
|
||||
0x00, // iSerialNumber (String Index)
|
||||
0x01, // bNumConfigurations 1
|
||||
};
|
||||
|
||||
static const uint8_t master_controller_config_descriptor[] = {
|
||||
0x09, // bLength
|
||||
0x02, // bDescriptorType (Configuration)
|
||||
0x27, 0x00, // wTotalLength 39
|
||||
0x01, // bNumInterfaces 1
|
||||
0x01, // bConfigurationValue
|
||||
0x00, // iConfiguration (String Index)
|
||||
0x80, // bmAttributes
|
||||
0x32, // bMaxPower 100mA
|
||||
|
||||
0x09, // bLength
|
||||
0x04, // bDescriptorType (Interface)
|
||||
0x00, // bInterfaceNumber 0
|
||||
0x00, // bAlternateSetting
|
||||
0x03, // bNumEndpoints 3
|
||||
0xFF, // bInterfaceClass
|
||||
0x00, // bInterfaceSubClass
|
||||
0x00, // bInterfaceProtocol
|
||||
0x00, // iInterface (String Index)
|
||||
|
||||
0x07, // bLength
|
||||
0x05, // bDescriptorType (Endpoint)
|
||||
0x81, // bEndpointAddress (IN/D2H)
|
||||
0x03, // bmAttributes (Interrupt)
|
||||
0x0A, 0x00, // wMaxPacketSize 10
|
||||
0x01, // bInterval 1 (unit depends on device speed)
|
||||
|
||||
0x07, // bLength
|
||||
0x05, // bDescriptorType (Endpoint)
|
||||
0x02, // bEndpointAddress (OUT/H2D)
|
||||
0x02, // bmAttributes (Bulk)
|
||||
0x40, 0x00, // wMaxPacketSize 64
|
||||
0x00, // bInterval 0 (unit depends on device speed)
|
||||
|
||||
0x07, // bLength
|
||||
0x05, // bDescriptorType (Endpoint)
|
||||
0x83, // bEndpointAddress (IN/D2H)
|
||||
0x02, // bmAttributes (Bulk)
|
||||
0x40, 0x00, // wMaxPacketSize 64
|
||||
0x00, // bInterval 0 (unit depends on device speed)
|
||||
};
|
||||
|
||||
} // namespace usb_pad
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
// SPDX-License-Identifier: GPL-3.0+
|
||||
|
||||
#include "Host.h"
|
||||
#include "IconsFontAwesome6.h"
|
||||
#include "IconsFontAwesome.h"
|
||||
#include "IconsPromptFont.h"
|
||||
#include "Input/InputManager.h"
|
||||
#include "StateWrapper.h"
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
#include "fmt/format.h"
|
||||
#include "StateWrapper.h"
|
||||
#include "Host.h"
|
||||
#include "IconsFontAwesome6.h"
|
||||
#include "IconsFontAwesome.h"
|
||||
|
||||
namespace usb_printer
|
||||
{
|
||||
|
||||
@@ -55,7 +55,7 @@
|
||||
#include "common/Timer.h"
|
||||
#include "common/emitter/x86emitter.h"
|
||||
|
||||
#include "IconsFontAwesome6.h"
|
||||
#include "IconsFontAwesome.h"
|
||||
#include "IconsPromptFont.h"
|
||||
#include "cpuinfo.h"
|
||||
#include "discord_rpc.h"
|
||||
@@ -526,6 +526,7 @@ void VMManager::SetDefaultLoggingSettings(SettingsInterface& si)
|
||||
si.SetBoolValue("Logging", "EnableSystemConsole", false);
|
||||
si.SetBoolValue("Logging", "EnableFileLogging", true);
|
||||
si.SetBoolValue("Logging", "EnableTimestamps", true);
|
||||
si.SetBoolValue("Logging", "EnableEESIOInput", false);
|
||||
si.SetBoolValue("Logging", "EnableVerbose", false);
|
||||
si.SetBoolValue("Logging", "EnableEEConsole", false);
|
||||
si.SetBoolValue("Logging", "EnableIOPConsole", false);
|
||||
@@ -3725,15 +3726,16 @@ void VMManager::UpdateDiscordPresence(bool update_session_time)
|
||||
|
||||
auto lock = Achievements::GetLock();
|
||||
|
||||
if (Achievements::HasRichPresence())
|
||||
if (Achievements::HasActiveGame() && Achievements::HasAchievementsOrLeaderboards())
|
||||
{
|
||||
rp.state = (state_string = StringUtil::Ellipsise(Achievements::GetRichPresenceString(), 128)).c_str();
|
||||
|
||||
if (const std::string& icon_url = Achievements::GetGameIconURL(); !icon_url.empty())
|
||||
{
|
||||
rp.largeImageKey = icon_url.c_str();
|
||||
rp.largeImageText = s_title.c_str();
|
||||
}
|
||||
|
||||
if (Achievements::HasRichPresence())
|
||||
rp.state = (state_string = StringUtil::Ellipsise(Achievements::GetRichPresenceString(), 128)).c_str();
|
||||
}
|
||||
|
||||
Discord_UpdatePresence(&rp);
|
||||
@@ -3747,3 +3749,15 @@ void VMManager::PollDiscordPresence()
|
||||
|
||||
Discord_RunCallbacks();
|
||||
}
|
||||
|
||||
bool VMManager::WriteBytesToEESIORXFIFO(const std::span<const u8> data)
|
||||
{
|
||||
if(ee_sio_rx_fifo.size() + data.size() > 1024)
|
||||
{
|
||||
Console.Warning("EE RX FIFO is full, not appending more bytes.");
|
||||
return false;
|
||||
}
|
||||
|
||||
ee_sio_rx_fifo.insert(ee_sio_rx_fifo.end(), data.begin(), data.end());
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
#include <functional>
|
||||
#include <mutex>
|
||||
#include <optional>
|
||||
#include <span>
|
||||
#include <string>
|
||||
#include <string_view>
|
||||
#include <vector>
|
||||
@@ -264,6 +265,9 @@ namespace VMManager
|
||||
/// Called when the rich presence string, provided by RetroAchievements, changes.
|
||||
void UpdateDiscordPresence(bool update_session_time);
|
||||
|
||||
/// Append bytes to the EE SIO RX FIFO. If it returns false, the FIFO is full and data is not inserted.
|
||||
bool WriteBytesToEESIORXFIFO(const std::span<const u8> data);
|
||||
|
||||
/// Internal callbacks, implemented in the emu core.
|
||||
namespace Internal
|
||||
{
|
||||
|
||||
@@ -1259,7 +1259,10 @@ static bool psxDynarecCheckBreakpoint()
|
||||
{
|
||||
u32 pc = psxRegs.pc;
|
||||
if (CBreakPoints::CheckSkipFirst(BREAKPOINT_IOP, pc) == pc)
|
||||
{
|
||||
CBreakPoints::ClearSkipFirst(BREAKPOINT_IOP);
|
||||
return false;
|
||||
}
|
||||
|
||||
int bpFlags = psxIsBreakpointNeeded(pc);
|
||||
bool hit = false;
|
||||
@@ -1299,8 +1302,10 @@ static bool psxDynarecMemcheck(size_t i)
|
||||
auto mc = CBreakPoints::GetMemChecks(BREAKPOINT_IOP)[i];
|
||||
|
||||
if (CBreakPoints::CheckSkipFirst(BREAKPOINT_IOP, pc) == pc)
|
||||
{
|
||||
CBreakPoints::ClearSkipFirst(BREAKPOINT_IOP);
|
||||
return false;
|
||||
|
||||
}
|
||||
if (mc.hasCond)
|
||||
{
|
||||
if (!mc.cond.Evaluate())
|
||||
@@ -1373,7 +1378,7 @@ static void psxRecMemcheck(u32 op, u32 bits, bool store)
|
||||
}
|
||||
}
|
||||
|
||||
static void psxEncodeBreakpoint()
|
||||
static bool psxEncodeBreakpoint()
|
||||
{
|
||||
if (psxIsBreakpointNeeded(psxpc) != 0)
|
||||
{
|
||||
@@ -1381,14 +1386,17 @@ static void psxEncodeBreakpoint()
|
||||
xFastCall((void*)psxDynarecCheckBreakpoint);
|
||||
xTEST(al, al);
|
||||
xJNZ(iopExitRecompiledCode);
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
static void psxEncodeMemcheck()
|
||||
static bool psxEncodeMemcheck()
|
||||
{
|
||||
int needed = psxIsMemcheckNeeded(psxpc);
|
||||
if (needed == 0)
|
||||
return;
|
||||
return false;
|
||||
|
||||
u32 op = iopMemRead32(needed == 2 ? psxpc + 4 : psxpc);
|
||||
const R5900::OPCODE& opcode = R5900::GetInstruction(op);
|
||||
@@ -1409,6 +1417,7 @@ static void psxEncodeMemcheck()
|
||||
psxRecMemcheck(op, 64, store);
|
||||
break;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
void psxRecompileNextInstruction(bool delayslot, bool swapped_delayslot)
|
||||
@@ -1437,12 +1446,10 @@ void psxRecompileNextInstruction(bool delayslot, bool swapped_delayslot)
|
||||
EEINST* old_inst_info = g_pCurInstInfo;
|
||||
s_recompilingDelaySlot = delayslot;
|
||||
|
||||
// add breakpoint
|
||||
if (!delayslot)
|
||||
{
|
||||
// Broken on x64
|
||||
psxEncodeBreakpoint();
|
||||
psxEncodeMemcheck();
|
||||
if(psxEncodeBreakpoint() || psxEncodeMemcheck())
|
||||
xFastCall((void*)CBreakPoints::CommitClearSkipFirst, BREAKPOINT_IOP);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -1498,7 +1498,10 @@ void dynarecCheckBreakpoint()
|
||||
{
|
||||
u32 pc = cpuRegs.pc;
|
||||
if (CBreakPoints::CheckSkipFirst(BREAKPOINT_EE, pc) != 0)
|
||||
{
|
||||
CBreakPoints::ClearSkipFirst(BREAKPOINT_EE);
|
||||
return;
|
||||
}
|
||||
|
||||
const int bpFlags = isBreakpointNeeded(pc);
|
||||
bool hit = false;
|
||||
@@ -1532,7 +1535,10 @@ void dynarecMemcheck(size_t i)
|
||||
const u32 op = memRead32(cpuRegs.pc);
|
||||
const OPCODE& opcode = GetInstruction(op);
|
||||
if (CBreakPoints::CheckSkipFirst(BREAKPOINT_EE, pc) != 0)
|
||||
{
|
||||
CBreakPoints::ClearSkipFirst(BREAKPOINT_EE);
|
||||
return;
|
||||
}
|
||||
|
||||
auto mc = CBreakPoints::GetMemChecks(BREAKPOINT_EE)[i];
|
||||
|
||||
@@ -1606,20 +1612,22 @@ void recMemcheck(u32 op, u32 bits, bool store)
|
||||
}
|
||||
}
|
||||
|
||||
void encodeBreakpoint()
|
||||
bool encodeBreakpoint()
|
||||
{
|
||||
if (isBreakpointNeeded(pc) != 0)
|
||||
{
|
||||
iFlushCall(FLUSH_EVERYTHING | FLUSH_PC);
|
||||
xFastCall((void*)dynarecCheckBreakpoint);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
void encodeMemcheck()
|
||||
bool encodeMemcheck()
|
||||
{
|
||||
const int needed = isMemcheckNeeded(pc);
|
||||
if (needed == 0)
|
||||
return;
|
||||
return false;
|
||||
|
||||
const u32 op = memRead32(needed == 2 ? pc + 4 : pc);
|
||||
const OPCODE& opcode = GetInstruction(op);
|
||||
@@ -1643,6 +1651,7 @@ void encodeMemcheck()
|
||||
recMemcheck(op, 128, store);
|
||||
break;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
void recompileNextInstruction(bool delayslot, bool swapped_delay_slot)
|
||||
@@ -1653,8 +1662,8 @@ void recompileNextInstruction(bool delayslot, bool swapped_delay_slot)
|
||||
// add breakpoint
|
||||
if (!delayslot)
|
||||
{
|
||||
encodeBreakpoint();
|
||||
encodeMemcheck();
|
||||
if(encodeBreakpoint() || encodeMemcheck())
|
||||
xFastCall((void*)CBreakPoints::CommitClearSkipFirst, BREAKPOINT_EE);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -233,7 +233,13 @@ public:
|
||||
const u64 quick64 = pState->quick64[0];
|
||||
for (const microBlockLinkRef& ref : quickLookup)
|
||||
{
|
||||
if (ref.quick != quick64) continue;
|
||||
// if we're using the flag hack, ignore the mac flags going in to the new block too if an exact match wasn't requested.
|
||||
if (mVUsFlagHack)
|
||||
{
|
||||
if ((ref.quick & ~0x0C04) != (quick64 & ~0x0C04)) continue;
|
||||
}
|
||||
else if (ref.quick != quick64) continue;
|
||||
|
||||
if (doConstProp && (ref.pBlock->pState.vi15 != pState->vi15)) continue;
|
||||
if (doConstProp && (ref.pBlock->pState.vi15v != pState->vi15v)) continue;
|
||||
return ref.pBlock;
|
||||
|
||||
@@ -23,7 +23,7 @@ import functools
|
||||
# pylint: disable=bare-except, disable=missing-function-docstring
|
||||
|
||||
src_dirs = [os.path.join(os.path.dirname(__file__), "..", "pcsx2"), os.path.join(os.path.dirname(__file__), "..", "pcsx2-qt")]
|
||||
fa_file = os.path.join(os.path.dirname(__file__), "..", "3rdparty", "include", "IconsFontAwesome6.h")
|
||||
fa_file = os.path.join(os.path.dirname(__file__), "..", "3rdparty", "include", "IconsFontAwesome.h")
|
||||
pf_file = os.path.join(os.path.dirname(__file__), "..", "3rdparty", "include", "IconsPromptFont.h")
|
||||
dst_file = os.path.join(os.path.dirname(__file__), "..", "pcsx2", "ImGui", "ImGuiManager.cpp")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user