diff --git a/.github/workflows/scripts/windows/build-dependencies.bat b/.github/workflows/scripts/windows/build-dependencies.bat index 932c74b6a8..cd5e1e7eb7 100755 --- a/.github/workflows/scripts/windows/build-dependencies.bat +++ b/.github/workflows/scripts/windows/build-dependencies.bat @@ -471,7 +471,6 @@ echo "Building PlutoVG..." rmdir /S /Q "plutovg-%PLUTOVG%" %SEVENZIP% x "plutovg-%PLUTOVG%.zip" || goto error cd "plutovg-%PLUTOVG%" || goto error -%PATCH% -p1 < "%SCRIPTDIR%\plutovg-workaround-msvc-ice.patch" || goto error cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH="%INSTALLDIR%" -DCMAKE_INSTALL_PREFIX="%INSTALLDIR%" -DBUILD_SHARED_LIBS=ON -DPLUTOVG_BUILD_EXAMPLES=OFF -B build -G Ninja || goto error cmake --build build --parallel || goto error ninja -C build install || goto error diff --git a/.github/workflows/scripts/windows/plutovg-workaround-msvc-ice.patch b/.github/workflows/scripts/windows/plutovg-workaround-msvc-ice.patch deleted file mode 100644 index 69da4fae4f..0000000000 --- a/.github/workflows/scripts/windows/plutovg-workaround-msvc-ice.patch +++ /dev/null @@ -1,52 +0,0 @@ -diff --git a/source/plutovg-font.c b/source/plutovg-font.c -index 0ad89b1..110de7f 100644 ---- a/source/plutovg-font.c -+++ b/source/plutovg-font.c -@@ -836,7 +836,8 @@ int plutovg_font_face_cache_load_file(plutovg_font_face_cache_t* cache, const ch - size_t family_index = 0; - if(unicode_family_name) { - const stbtt_uint8* family_name = unicode_family_name; -- while(family_length) { -+ //while(family_length) { -+ for (int i = family_length; i > 0; i -= 2) { - stbtt_uint16 ch = family_name[0] * 256 + family_name[1]; - if(ch < 0x80) { - entry->family[family_index++] = ch; -@@ -853,7 +854,8 @@ int plutovg_font_face_cache_load_file(plutovg_font_face_cache_t* cache, const ch - entry->family[family_index++] = (0x80 + ((c) & 0x3f)); - - family_name += 2; -- family_length -= 2; -+ //family_length -= 2; -+ i -= 2; - } else { - entry->family[family_index++] = (0xe0 + (ch >> 12)); - entry->family[family_index++] = (0x80 + ((ch >> 6) & 0x3f)); -@@ -861,7 +863,7 @@ int plutovg_font_face_cache_load_file(plutovg_font_face_cache_t* cache, const ch - } - - family_name += 2; -- family_length -= 2; -+ //family_length -= 2; - } - - entry->family[family_index] = '\0'; -@@ -902,7 +904,8 @@ int plutovg_font_face_cache_load_file(plutovg_font_face_cache_t* cache, const ch - }; - - const stbtt_uint8* family_name = roman_family_name; -- while(family_length) { -+ //while(family_length) { -+ for (int i2 = family_length; i2 > 0; i2--) { - stbtt_uint16 ch = MAC_ROMAN_TABLE[family_name[0]]; - if(ch < 0x80) { - entry->family[family_index++] = ch; -@@ -916,7 +919,7 @@ int plutovg_font_face_cache_load_file(plutovg_font_face_cache_t* cache, const ch - } - - family_name += 1; -- family_length -= 1; -+ //family_length -= 1; - } - - entry->family[family_index] = '\0'; diff --git a/bin/resources/GameIndex.yaml b/bin/resources/GameIndex.yaml index 996f599ab0..2207791e00 100644 --- a/bin/resources/GameIndex.yaml +++ b/bin/resources/GameIndex.yaml @@ -200,7 +200,7 @@ PAPX-90203: name-sort: "ぐらんつーりすも 2000 [たいけんばん]" name-en: "Gran Turismo 2000 [Trial]" region: "NTSC-J" - gsHWFixes: + gsHWFixes: &gran-turismo-3-gs-fixes halfPixelOffset: 5 # Fixes edge bleed and lines. autoFlush: 1 # Fixes missing lens flare and intensity. getSkipCount: "GSC_PolyphonyDigitalGames" # Fixes post-processing. @@ -226,28 +226,19 @@ PAPX-90207: name-sort: "ぐらんつーりすも 3 A-Spec おーとばっくすげんていりぷれいしあたー" name-en: "Gran Turismo 3 - A-Spec - Autobacs Gentei Replay Theater" region: "NTSC-J" - gsHWFixes: - halfPixelOffset: 5 # Fixes edge bleed and lines. - autoFlush: 1 # Partially fixes the sun occlusion and lens flare. - getSkipCount: "GSC_PolyphonyDigitalGames" # Fixes post-processing. + gsHWFixes: *gran-turismo-3-gs-fixes PAPX-90208: name: "GRAN TURISMO 3 - A-Spec - リプレイシアター" name-sort: "ぐらんつーりすも 3 A-Spec りぷれいしあたー" name-en: "Gran Turismo 3 - A-Spec - Replay Theater" region: "NTSC-J" - gsHWFixes: - halfPixelOffset: 5 # Fixes edge bleed and lines. - autoFlush: 1 # Partially fixes the sun occlusion and lens flare. - getSkipCount: "GSC_PolyphonyDigitalGames" # Fixes post-processing. + gsHWFixes: *gran-turismo-3-gs-fixes PAPX-90209: name: "GRAN TURISMO 3 - A-Spec - Netz TOYOTA - リプレイシアターディスク" name-sort: "ぐらんつーりすも 3 A-Spec ねっつとよたりぷれいしあたーでぃすく" name-en: "Gran Turismo 3 - A-Spec - Netz TOYOTA - Replay Theater Disc" region: "NTSC-J" - gsHWFixes: - halfPixelOffset: 5 # Fixes edge bleed and lines. - autoFlush: 1 # Partially fixes the sun occlusion and lens flare. - getSkipCount: "GSC_PolyphonyDigitalGames" # Fixes post-processing. + gsHWFixes: *gran-turismo-3-gs-fixes PAPX-90210: name: "やっぱ RPGでしょ。 [オリジナルムービーディスク]" name-sort: "やっぱ あーるぴーじーでしょ [おりじなるむーびーでぃすく]" @@ -421,10 +412,7 @@ PAPX-90504: name-sort: "ぐらんつーりすも こんせぷと えあとれっく たーぼ すぺしゃるえでぃしょん [たいけんばん]" name-en: "Gran Turismo Concept - Airtrek Turbo Special Edition [Trial]" region: "NTSC-J" - gsHWFixes: - halfPixelOffset: 5 # Fixes weird edge shadows and depth bleed which happens on the edge as well. - autoFlush: 1 # Partially fixes the sun occlusion and lens flare. - getSkipCount: "GSC_PolyphonyDigitalGames" # Fixes post-processing. + gsHWFixes: *gran-turismo-3-gs-fixes PAPX-90505: name: "2002 夏のオススメソフト おためしDisc" name-sort: "2002 なつのおすすめそふと おためしでぃすく" @@ -454,19 +442,13 @@ PAPX-90508: name-sort: "ぐらんつーりすも こんせぷと るぽ かっぷ とれいにんぐ ばーじょん" name-en: "Gran Turismo Concept - LUPO CUP Training Version" region: "NTSC-J" - gsHWFixes: - halfPixelOffset: 5 # Fixes weird edge shadows and depth bleed which happens on the edge as well. - autoFlush: 1 # Partially fixes the sun occlusion and lens flare. - getSkipCount: "GSC_PolyphonyDigitalGames" # Fixes post-processing. + gsHWFixes: *gran-turismo-3-gs-fixes PAPX-90509: name: "GRAN TURISMO Concept - LUPO CUP Training Version 2" name-sort: "ぐらんつーりすも こんせぷと るぽ かっぷ とれいにんぐ ばーじょん 2" name-en: "Gran Turismo Concept - LUPO CUP Training Version 2" region: "NTSC-J" - gsHWFixes: - halfPixelOffset: 5 # Fixes weird edge shadows and depth bleed which happens on the edge as well. - autoFlush: 1 # Partially fixes the sun occlusion and lens flare. - getSkipCount: "GSC_PolyphonyDigitalGames" # Fixes post-processing. + gsHWFixes: *gran-turismo-3-gs-fixes PAPX-90511: name: "SIREN [体験版]" name-sort: "さいれん [たいけんばん]" @@ -481,11 +463,9 @@ PAPX-90512: name-sort: "ぐらんつーりすも 4 - とよた ぷりうす [たいけんばん]" name-en: "Gran Turismo 4 - TOYOTA Prius [Trial]" region: "NTSC-J" - gsHWFixes: + gsHWFixes: &gran-turismo-4-prologue-gs-fixes + <<: *gran-turismo-3-gs-fixes recommendedBlendingLevel: 3 # Improves banding in car showcase as well as car brightness and sheen. - halfPixelOffset: 5 # Fixes weird edge shadows and depth bleed which happens on the edge as well. - autoFlush: 1 # Partially fixes the sun occlusion and lens flare. - getSkipCount: "GSC_PolyphonyDigitalGames" # Fixes post-processing. PAPX-90514: name: "冬のオススメソフト おためしDISC" name-sort: "ふゆのおすすめそふとおためしでぃすく" @@ -538,13 +518,11 @@ PAPX-90523: name-sort: "ぐらんつーりすも 4 - おんらいんじっけんばーじょん" name-en: "Gran Turismo 4 - Online Test Version" region: "NTSC-J" - clampModes: - vuClampMode: 2 # Text in GT mode works. - gsHWFixes: - recommendedBlendingLevel: 3 # Improves banding in car showcase as well as car brightness and sheen. + clampModes: &gran-turismo-4-clamp-modes + vuClampMode: 2 # In GT4, text in GT mode works. In TT, fixes SPS in TT Mode menu caused by the moving tooltips. + gsHWFixes: &gran-turismo-4-gs-fixes + <<: *gran-turismo-4-prologue-gs-fixes halfPixelOffset: 4 # Fixes weird edge shadows and depth bleed which happens on the edge as well. - autoFlush: 1 # Helps lens flare and sun occlusion somewhat but doesn't full fix it. - getSkipCount: "GSC_PolyphonyDigitalGames" # Fixes post-processing. PAPX-90524: name: "ワイルドアームズ ザ フィフスヴァンガード [体験版]" name-sort: "わいるどあーむず ざ ふぃふすゔぁんがーど [たいけんばん]" @@ -691,20 +669,14 @@ PBPX-95502: name-sort: "ぐらんつーりすも 3 - A-Spec [ほんたいどうこんばん]" name-en: "Gran Turismo 3 - A-Spec [PS2 Bundle]" region: "NTSC-J" - gsHWFixes: - halfPixelOffset: 5 # Fixes weird edge shadows and depth bleed which happens on the edge as well. - autoFlush: 1 # Partially fixes the sun occlusion and lens flare. - getSkipCount: "GSC_PolyphonyDigitalGames" # Fixes post-processing. + gsHWFixes: *gran-turismo-3-gs-fixes memcardFilters: - "PBPX-95502" - "SCPS-15009" PBPX-95503: name: "Gran Turismo 3 - A-Spec [PS2 Bundle]" region: "NTSC-U" - gsHWFixes: - halfPixelOffset: 5 # Fixes weird edge shadows and depth bleed which happens on the edge as well. - autoFlush: 1 # Partially fixes the sun occlusion and lens flare. - getSkipCount: "GSC_PolyphonyDigitalGames" # Fixes post-processing. + gsHWFixes: *gran-turismo-3-gs-fixes memcardFilters: - "PBPX-95503" - "SCUS-97102" @@ -765,20 +737,12 @@ PBPX-95523: name-sort: "ぐらんつーりすも 4 ぷろろーぐ [ほんたいどうこんばん]" name-en: "Gran Turismo 4 Prologue [PS2 Bundle]" region: "NTSC-J" - gsHWFixes: - recommendedBlendingLevel: 3 # Improves banding in car showcase as well as car brightness and sheen. - halfPixelOffset: 5 # Fixes weird edge shadows and depth bleed which happens on the edge as well. - autoFlush: 1 # Partially fixes the sun occlusion and lens flare. - getSkipCount: "GSC_PolyphonyDigitalGames" # Fixes post-processing. + gsHWFixes: *gran-turismo-4-prologue-gs-fixes PBPX-95524: name: "Gran Turismo 4 Prologue [PlayStation 2 Racing Pack]" region: "NTSC-C" compat: 5 - gsHWFixes: - recommendedBlendingLevel: 3 # Improves banding in car showcase as well as car brightness and sheen. - halfPixelOffset: 5 # Fixes weird edge shadows and depth bleed which happens on the edge as well. - autoFlush: 1 # Partially fixes the sun occlusion and lens flare. - getSkipCount: "GSC_PolyphonyDigitalGames" # Fixes post-processing. + gsHWFixes: *gran-turismo-4-prologue-gs-fixes PBPX-95525: name: "ファイナルファンタジーⅫ [本体同梱版]" name-sort: "ふぁいなるふぁんたじー 12 [ほんたいどうこんばん]" @@ -790,13 +754,8 @@ PBPX-95601: name-en: "Gran Turismo 4 [PS2 Bundle]" region: "NTSC-J" compat: 5 - clampModes: - vuClampMode: 2 # Text in GT mode works. - gsHWFixes: - recommendedBlendingLevel: 3 # Improves banding in car showcase as well as car brightness and sheen. - halfPixelOffset: 4 # Fixes weird edge shadows and depth bleed which happens on the edge as well. - autoFlush: 1 # Helps lens flare and sun occlusion somewhat but doesn't full fix it. - getSkipCount: "GSC_PolyphonyDigitalGames" # Fixes post-processing. + clampModes: *gran-turismo-4-clamp-modes + gsHWFixes: *gran-turismo-4-gs-fixes memcardFilters: - "PBPX-95502" - "SCAJ-20066" @@ -844,10 +803,7 @@ PCPX-96309: name-sort: "ぐらんつーりすも 3 ねっつ とよた [Demo]" name-en: "Gran Turismo 3 Netz TOYOTA [Demo]" region: "NTSC-J" - gsHWFixes: - halfPixelOffset: 5 # Fixes edge bleed and lines. - autoFlush: 1 # Fixes missing lens flare and intensity. - getSkipCount: "GSC_PolyphonyDigitalGames" # Fixes post-processing. + gsHWFixes: *gran-turismo-3-gs-fixes PCPX-96310: name: "エクストリーム・レーシング SSX [体験版]" name-sort: "えくすとりーむ れーしんぐ SSX [たいけんばん]" @@ -862,19 +818,13 @@ PCPX-96311: name-sort: "ぐらんつーりすも 3 てんとうしゆうでぃすくVol.1" name-en: "Gran Turismo 3 Trial Disk Volume 1" region: "NTSC-J" - gsHWFixes: - halfPixelOffset: 5 # Fixes edge bleed and lines. - autoFlush: 1 # Fixes missing lens flare and intensity. - getSkipCount: "GSC_PolyphonyDigitalGames" # Fixes post-processing. + gsHWFixes: *gran-turismo-3-gs-fixes PCPX-96312: name: "GRAN TURISMO 3 - A-Spec - [オートバックス店頭試遊ディスク]" name-sort: "ぐらんつーりすも 3 A-Spec おーとばっくすてんとうしゆうでぃすく" name-en: "Gran Turismo 3 - A-Spec - Autobacs Tentou Shiyuu Disc" region: "NTSC-J" - gsHWFixes: - halfPixelOffset: 5 # Fixes edge bleed and lines. - autoFlush: 1 # Fixes missing lens flare and intensity. - getSkipCount: "GSC_PolyphonyDigitalGames" # Fixes post-processing. + gsHWFixes: *gran-turismo-3-gs-fixes PCPX-96314: name: "スカイオデッセイ [体験版]" name-sort: "すかいおでっせい [たいけんばん]" @@ -1005,10 +955,7 @@ PCPX-96609: name-sort: "ぐらんつーりすも 3 - A-Spec - てんとうしゆう Disc Vol. 2" name-en: "Gran Turismo 3 - A-Spec - Tentou Shiyuu Disc Vol. 2" region: "NTSC-J" - gsHWFixes: - halfPixelOffset: 5 # Fixes weird edge shadows and depth bleed which happens on the edge as well. - autoFlush: 1 # Partially fixes the sun occlusion and lens flare. - getSkipCount: "GSC_PolyphonyDigitalGames" # Fixes post-processing. + gsHWFixes: *gran-turismo-3-gs-fixes PCPX-96610: name: "見る見る 2001年2月度受注号" name-sort: "みるみる 2001ねん 2がつどじゅちゅうごう" @@ -1082,10 +1029,7 @@ PCPX-96624: name-sort: "ぐらんつーりすも こんせぷと 2001 Tokyo" name-en: "Gran Turismo - Concept 2001 Tokyo" region: "NTSC-J" - gsHWFixes: - halfPixelOffset: 5 # Fixes weird edge shadows and depth bleed which happens on the edge as well. - autoFlush: 1 # Partially fixes the sun occlusion and lens flare. - getSkipCount: "GSC_PolyphonyDigitalGames" # Fixes post-processing. + gsHWFixes: *gran-turismo-3-gs-fixes PCPX-96625: name: "プレプレ2 VOLUME.4" name-sort: "ぷれぷれ2 VOLUME. 4" @@ -1136,10 +1080,7 @@ PCPX-96634: name-sort: "ぐらんつーりすも すばるどらいびんぐしみゅれーたーばーじょん" name-en: "Gran Turismo - SUBARU Driving Simulator Version" region: "NTSC-J" - gsHWFixes: - halfPixelOffset: 5 # Fixes weird edge shadows and depth bleed which happens on the edge as well. - autoFlush: 1 # Partially fixes the sun occlusion and lens flare. - getSkipCount: "GSC_PolyphonyDigitalGames" # Fixes post-processing. + gsHWFixes: *gran-turismo-3-gs-fixes PCPX-96635: name: "プレプレ2 VOLUME.8" name-sort: "ぷれぷれ2 VOLUME. 8" @@ -1176,13 +1117,8 @@ PCPX-96649: name-en: "Gran Turismo 4 [Trial]" region: "NTSC-J" compat: 5 - clampModes: - vuClampMode: 2 # Text in GT mode works. - gsHWFixes: - recommendedBlendingLevel: 3 # Improves banding in car showcase as well as car brightness and sheen. - halfPixelOffset: 4 # Fixes weird edge shadows and depth bleed which happens on the edge as well. - autoFlush: 1 # Helps lens flare and sun occlusion somewhat but doesn't full fix it. - getSkipCount: "GSC_PolyphonyDigitalGames" # Fixes post-processing. + clampModes: *gran-turismo-4-clamp-modes + gsHWFixes: *gran-turismo-4-gs-fixes PCPX-96653: name: "ラチェット&クランク3 突撃!ガラクチック★レンジャーズ [店頭体験版]" name-sort: "らちぇっとあんどくらんく3 とつげき!がらくちっくれんじゃーず [てんとうたいけんばん]" @@ -1223,13 +1159,8 @@ PCPX-96660: name-sort: "つーりすと とろふぃー [Demo]" name-en: "Tourist Trophy [Demo]" region: "NTSC-J" - clampModes: - vuClampMode: 2 # Fixes SPS in TT Mode menu caused by the moving tooltips. - gsHWFixes: - recommendedBlendingLevel: 3 # Improves banding in car showcase as well as car brightness and sheen. - halfPixelOffset: 4 # Fixes weird edge shadows and depth bleed which happens on the edge as well. - autoFlush: 1 # Helps lens flare and sun occlusion somewhat but doesn't full fix it. - getSkipCount: "GSC_PolyphonyDigitalGames" # Fixes post-processing. + clampModes: *gran-turismo-4-clamp-modes + gsHWFixes: *gran-turismo-4-gs-fixes PCPX-98017: name: "ラチェット&クランク4th ギリギリ銀河のギガバトル [体験版]" name-sort: "らちぇっとあんどくらんく4th ぎりぎりぎんがのぎがばとる [たいけんばん]" @@ -1691,11 +1622,7 @@ SCAJ-20066: name: "Gran Turismo 4 Prologue" region: "NTSC-Unk" compat: 5 - gsHWFixes: - recommendedBlendingLevel: 3 # Improves banding in car showcase as well as car brightness and sheen. - halfPixelOffset: 5 # Fixes weird edge shadows and depth bleed which happens on the edge as well. - autoFlush: 1 # Partially fixes the sun occlusion and lens flare. - getSkipCount: "GSC_PolyphonyDigitalGames" # Fixes post-processing. + gsHWFixes: *gran-turismo-4-prologue-gs-fixes memcardFilters: - "PBPX-95502" - "SCAJ-20066" @@ -1708,7 +1635,6 @@ SCAJ-20066: - "SCPS-19304" - "SCPS-15009" - "SCPS-55007" - # vuClampMode = 2 Text in GT mode works. SCAJ-20067: name: "Gungrave O.D." region: "NTSC-Unk" @@ -2446,13 +2372,8 @@ SCAJ-20170: name: "Tourist Trophy" region: "NTSC-C" compat: 5 - clampModes: - vuClampMode: 2 # Fixes SPS in TT Mode menu caused by the moving tooltips. - gsHWFixes: - recommendedBlendingLevel: 3 # Improves banding in car showcase as well as car brightness and sheen. - halfPixelOffset: 4 # Fixes weird edge shadows and depth bleed which happens on the edge as well. - autoFlush: 1 # Helps lens flare and sun occlusion somewhat but doesn't full fix it. - getSkipCount: "GSC_PolyphonyDigitalGames" # Fixes post-processing. + clampModes: *gran-turismo-4-clamp-modes + gsHWFixes: *gran-turismo-4-gs-fixes SCAJ-20171: name: "絶体絶命都市2 - 凍てついた記憶たち" name-sort: "ぜったいぜつめいとし いてついたきおくたち" @@ -2743,14 +2664,11 @@ SCAJ-30006: name-sort: "ぐらんつーりすも 4" name-en: "Gran Turismo 4" region: "NTSC-J" + clampModes: *gran-turismo-4-clamp-modes roundModes: eeRoundMode: 3 # Using chop for both normal+div fixes crash in B5 license test. eeDivRoundMode: 3 # See above. - gsHWFixes: - recommendedBlendingLevel: 3 # Improves banding in car showcase as well as car brightness and sheen. - halfPixelOffset: 4 # Fixes weird edge shadows and depth bleed which happens on the edge as well. - autoFlush: 1 # Helps lens flare and sun occlusion somewhat but doesn't full fix it. - getSkipCount: "GSC_PolyphonyDigitalGames" # Fixes post-processing. + gsHWFixes: *gran-turismo-4-gs-fixes memcardFilters: - "PBPX-95502" - "SCAJ-20066" @@ -2767,25 +2685,19 @@ SCAJ-30007: name: "Gran Turismo 4" region: "NTSC-C" compat: 5 + clampModes: *gran-turismo-4-clamp-modes roundModes: eeRoundMode: 3 # Using chop for both normal+div fixes crash in B5 license test. eeDivRoundMode: 3 # See above. - gsHWFixes: - recommendedBlendingLevel: 3 # Improves banding in car showcase as well as car brightness and sheen. - halfPixelOffset: 4 # Fixes weird edge shadows and depth bleed which happens on the edge as well. - autoFlush: 1 # Helps lens flare and sun occlusion somewhat but doesn't full fix it. - getSkipCount: "GSC_PolyphonyDigitalGames" # Fixes post-processing. + gsHWFixes: *gran-turismo-4-gs-fixes SCAJ-30008: name: "Gran Turismo 4 [PlayStation2 the Best]" region: "NTSC-C" + clampModes: *gran-turismo-4-clamp-modes roundModes: eeRoundMode: 3 # Using chop for both normal+div fixes crash in B5 license test. eeDivRoundMode: 3 # See above. - gsHWFixes: - recommendedBlendingLevel: 3 # Improves banding in car showcase as well as car brightness and sheen. - halfPixelOffset: 4 # Fixes weird edge shadows and depth bleed which happens on the edge as well. - autoFlush: 1 # Helps lens flare and sun occlusion somewhat but doesn't full fix it. - getSkipCount: "GSC_PolyphonyDigitalGames" # Fixes post-processing. + gsHWFixes: *gran-turismo-4-gs-fixes memcardFilters: - "PBPX-95502" - "SCAJ-20066" @@ -2949,11 +2861,8 @@ SCCS-60002: name-sort: "Paoche Langmanlu 4" name-en: "Gran Turismo 4 [Review Copy]" region: "NTSC-C" - gsHWFixes: - recommendedBlendingLevel: 3 # Improves banding in car showcase as well as car brightness and sheen. - halfPixelOffset: 4 # Fixes weird edge shadows and depth bleed which happens on the edge as well. - autoFlush: 1 # Helps lens flare and sun occlusion somewhat but doesn't full fix it. - getSkipCount: "GSC_PolyphonyDigitalGames" # Fixes post-processing. + clampModes: *gran-turismo-4-clamp-modes + gsHWFixes: *gran-turismo-4-gs-fixes SCED-50041: name: "Tekken Tag Tournament [Demo]" region: "PAL-E" @@ -3353,10 +3262,7 @@ SCED-51351: SCED-51352: name: "Gran Turismo - Nissan Micra Edition [Demo]" region: "PAL-E" - gsHWFixes: - halfPixelOffset: 5 # Fixes weird edge shadows and depth bleed which happens on the edge as well. - autoFlush: 1 # Partially fixes the sun occlusion and lens flare. - getSkipCount: "GSC_PolyphonyDigitalGames" # Fixes post-processing. + gsHWFixes: *gran-turismo-3-gs-fixes SCED-51359: name: "Official PlayStation 2 Magazine Demo 27" region: "PAL-M5" @@ -3920,11 +3826,7 @@ SCED-52452: SCED-52455: name: "Gran Turismo Special Edition 2004 Geneva Version" region: "PAL-E" - gsHWFixes: - recommendedBlendingLevel: 3 # Improves banding in car showcase as well as car brightness and sheen. - halfPixelOffset: 5 # Fixes weird edge shadows and depth bleed which happens on the edge as well. - autoFlush: 1 # Partially fixes the sun occlusion and lens flare. - getSkipCount: "GSC_PolyphonyDigitalGames" # Fixes post-processing. + gsHWFixes: *gran-turismo-4-prologue-gs-fixes SCED-52461: name: "SingStar [Press Kit]" region: "PAL-E" @@ -3947,11 +3849,7 @@ SCED-52549: SCED-52578: name: "Gran Turismo 4 BMW 1 Series Virtual Drive Dealership [Demo]" region: "PAL-M5" - gsHWFixes: - recommendedBlendingLevel: 3 # Improves banding in car showcase as well as car brightness and sheen. - halfPixelOffset: 4 # Fixes weird edge shadows and depth bleed which happens on the edge as well. - autoFlush: 1 # Helps lens flare and sun occlusion somewhat but doesn't full fix it. - getSkipCount: "GSC_PolyphonyDigitalGames" # Fixes post-processing. + gsHWFixes: *gran-turismo-4-gs-fixes SCED-52580: name: "Magazine Ufficiale PlayStation 2 Italia 06/04" region: "PAL-I" @@ -3964,11 +3862,7 @@ SCED-52619: SCED-52681: name: "Gran Turismo 4 BMW 1 Series Virtual Drive [Demo]" region: "PAL-M11" - gsHWFixes: - recommendedBlendingLevel: 3 # Improves banding in car showcase as well as car brightness and sheen. - halfPixelOffset: 4 # Fixes weird edge shadows and depth bleed which happens on the edge as well. - autoFlush: 1 # Helps lens flare and sun occlusion somewhat but doesn't full fix it. - getSkipCount: "GSC_PolyphonyDigitalGames" # Fixes post-processing. + gsHWFixes: *gran-turismo-4-gs-fixes SCED-52687: name: "Formula One 04 [Demo]" region: "PAL-M11" @@ -4903,10 +4797,7 @@ SCES-50294: name: "Gran Turismo 3 - A-Spec" region: "PAL-M5" compat: 5 - gsHWFixes: - halfPixelOffset: 5 # Fixes weird edge shadows and depth bleed which happens on the edge as well. - autoFlush: 1 # Partially fixes the sun occlusion and lens flare. - getSkipCount: "GSC_PolyphonyDigitalGames" # Fixes post-processing. + gsHWFixes: *gran-turismo-3-gs-fixes SCES-50295: name: "Dark Cloud" region: "PAL-M5" @@ -5174,10 +5065,7 @@ SCES-50858: name: "Gran Turismo - Concept 2002 Tokyo-Geneva" region: "PAL-M6" compat: 5 - gsHWFixes: - halfPixelOffset: 5 # Fixes weird edge shadows and depth bleed which happens on the edge as well. - autoFlush: 1 # Partially fixes the sun occlusion and lens flare. - getSkipCount: "GSC_PolyphonyDigitalGames" # Fixes post-processing. + gsHWFixes: *gran-turismo-3-gs-fixes memcardFilters: - "SCES-50858" - "SCES-50294" @@ -5607,13 +5495,8 @@ SCES-51719: name: "Gran Turismo 4" region: "PAL-M5" compat: 5 - clampModes: - vuClampMode: 2 # Text in GT mode works. - gsHWFixes: - recommendedBlendingLevel: 3 # Improves banding in car showcase as well as car brightness and sheen. - halfPixelOffset: 4 # Fixes weird edge shadows and depth bleed which happens on the edge as well. - autoFlush: 1 # Helps lens flare and sun occlusion somewhat but doesn't full fix it. - getSkipCount: "GSC_PolyphonyDigitalGames" # Fixes post-processing. + clampModes: *gran-turismo-4-clamp-modes + gsHWFixes: *gran-turismo-4-gs-fixes memcardFilters: - "SCES-51719" - "SCES-52438" @@ -5871,16 +5754,11 @@ SCES-52438: name: "Gran Turismo 4 Prologue" region: "PAL-M5" compat: 5 - gsHWFixes: - recommendedBlendingLevel: 3 # Improves banding in car showcase as well as car brightness and sheen. - halfPixelOffset: 5 # Fixes weird edge shadows and depth bleed which happens on the edge as well. - autoFlush: 1 # Partially fixes the sun occlusion and lens flare. - getSkipCount: "GSC_PolyphonyDigitalGames" # Fixes post-processing. + gsHWFixes: *gran-turismo-4-prologue-gs-fixes memcardFilters: - "SCES-51719" - "SCES-52438" - "SCES-50294" - # vuClampMode = 2 Text in GT mode works. SCES-52456: name: "Ratchet & Clank 3" region: "PAL-M5" @@ -6229,13 +6107,8 @@ SCES-53372: name: "Tourist Trophy - The Real Riding Simulator" region: "PAL-M5" compat: 5 - clampModes: - vuClampMode: 2 # Fixes SPS in TT Mode menu caused by the moving tooltips. - gsHWFixes: - recommendedBlendingLevel: 3 # Improves banding in car showcase as well as car brightness and sheen. - halfPixelOffset: 4 # Fixes weird edge shadows and depth bleed which happens on the edge as well. - autoFlush: 1 # Helps lens flare and sun occlusion somewhat but doesn't full fix it. - getSkipCount: "GSC_PolyphonyDigitalGames" # Fixes post-processing. + clampModes: *gran-turismo-4-clamp-modes + gsHWFixes: *gran-turismo-4-gs-fixes SCES-53397: name: "SingStar - Popworld Events Code" region: "PAL-Unk" @@ -7418,11 +7291,7 @@ SCKA-20020: SCKA-20022: name: "Gran Turismo 4 - Prologue" # No listed Korean name on ReDump region: "NTSC-K" - gsHWFixes: - recommendedBlendingLevel: 3 # Improves banding in car showcase as well as car brightness and sheen. - halfPixelOffset: 4 # Fixes weird edge shadows and depth bleed which happens on the edge as well. - getSkipCount: "GSC_PolyphonyDigitalGames" # Fixes post-processing. - # vuClampMode = 2 Text in GT mode works. + gsHWFixes: *gran-turismo-4-prologue-gs-fixes SCKA-20023: name: "제로 ~붉은 나비~" name-sort: "Zero: Bulgeun Nabi" @@ -7481,10 +7350,7 @@ SCKA-20028: SCKA-20029: name: "Gran Turismo Concept - 2002 Tokyo-Seoul [PlayStation 2 BigHit Series]" # No listed Korean name on ReDump region: "NTSC-K" - gsHWFixes: - halfPixelOffset: 5 # Fixes weird edge shadows and depth bleed which happens on the edge as well. - autoFlush: 1 # Partially fixes the sun occlusion and lens flare. - getSkipCount: "GSC_PolyphonyDigitalGames" # Fixes post-processing. + gsHWFixes: *gran-turismo-3-gs-fixes SCKA-20030: name: "슬라이 쿠퍼 - 전설의 비법서를 찾아서 [PlayStation 2 BigHit Series]" name-sort: "Sly Cooper - Jeonseolui Bibeobseoreul Chajaseo [PlayStation 2 BigHit Series]" @@ -8355,13 +8221,8 @@ SCKA-24012: SCKA-30001: name: "Gran Turismo 4" # No listed Korean name on ReDump region: "NTSC-K" - clampModes: - vuClampMode: 2 # Text in GT mode works. - gsHWFixes: - recommendedBlendingLevel: 3 # Improves banding in car showcase as well as car brightness and sheen. - halfPixelOffset: 4 # Fixes weird edge shadows and depth bleed which happens on the edge as well. - autoFlush: 1 # Helps lens flare and sun occlusion somewhat but doesn't full fix it. - getSkipCount: "GSC_PolyphonyDigitalGames" # Fixes post-processing. + clampModes: *gran-turismo-4-clamp-modes + gsHWFixes: *gran-turismo-4-gs-fixes SCKA-30002: name: "GOD OF WAR 영혼의 반역자" name-sort: "God of War: Yeonghonui Banyeokja" @@ -8382,13 +8243,8 @@ SCKA-30003: SCKA-30004: name: "Gran Turismo 4 [PlayStation 2 BigHit Series]" # No listed Korean name on ReDump region: "NTSC-K" - clampModes: - vuClampMode: 2 # Text in GT mode works. - gsHWFixes: - recommendedBlendingLevel: 3 # Improves banding in car showcase as well as car brightness and sheen. - halfPixelOffset: 4 # Fixes weird edge shadows and depth bleed which happens on the edge as well. - autoFlush: 1 # Helps lens flare and sun occlusion somewhat but doesn't full fix it. - getSkipCount: "GSC_PolyphonyDigitalGames" # Fixes post-processing. + clampModes: *gran-turismo-4-clamp-modes + gsHWFixes: *gran-turismo-4-gs-fixes SCKA-30005: name: "로그 갤럭시" name-en: "Rogue Galaxy" @@ -8488,10 +8344,7 @@ SCPM-85301: name-sort: "ぐらんつーりすも こんせぷと こぺん すぺしゃるえでぃしょん [Demo]" name-en: "Gran Turismo Concept - Copen Special Edition [Demo]" region: "NTSC-J" - gsHWFixes: - halfPixelOffset: 5 # Fixes weird edge shadows and depth bleed which happens on the edge as well. - autoFlush: 1 # Partially fixes the sun occlusion and lens flare. - getSkipCount: "GSC_PolyphonyDigitalGames" # Fixes post-processing. + gsHWFixes: *gran-turismo-3-gs-fixes SCPM-85302: name: "みんなのGOLF オンライン" name-sort: "みんなのごるふ おんらいん" @@ -8507,11 +8360,7 @@ SCPM-85304: name-sort: "ぐらんつーりすも 4 ふぁーすとぷれびゅー" name-en: "Gran Turismo 4 - First Preview -" region: "NTSC-J" - gsHWFixes: - recommendedBlendingLevel: 3 # Improves banding in car showcase as well as car brightness and sheen. - halfPixelOffset: 4 # Fixes weird edge shadows and depth bleed which happens on the edge as well. - autoFlush: 1 # Helps lens flare and sun occlusion somewhat but doesn't full fix it. - getSkipCount: "GSC_PolyphonyDigitalGames" # Fixes post-processing. + gsHWFixes: *gran-turismo-4-gs-fixes SCPN-60101: name: "PlayStation BB Navigator - Version 0.10 [Prerelease] [Disc 1]" name-sort: "ぷれいすてーしょん BB なびげーたー - Version 0.10 [Prerelease] [Disc 1]" @@ -8824,10 +8673,7 @@ SCPS-15009: name-sort: "ぐらんつーりすも3 A-spec" name-en: "Gran Turismo 3 - A-Spec" region: "NTSC-J" - gsHWFixes: - halfPixelOffset: 5 # Fixes weird edge shadows and depth bleed which happens on the edge as well. - autoFlush: 1 # Partially fixes the sun occlusion and lens flare. - getSkipCount: "GSC_PolyphonyDigitalGames" # Fixes post-processing. + gsHWFixes: *gran-turismo-3-gs-fixes memcardFilters: - "PBPX-95502" - "SCPS-15009" @@ -8837,10 +8683,7 @@ SCPS-15010: name-en: "Gran Turismo - Concept 2001 Tokyo" region: "NTSC-J" compat: 5 - gsHWFixes: - halfPixelOffset: 5 # Fixes weird edge shadows and depth bleed which happens on the edge as well. - autoFlush: 1 # Partially fixes the sun occlusion and lens flare. - getSkipCount: "GSC_PolyphonyDigitalGames" # Fixes post-processing. + gsHWFixes: *gran-turismo-3-gs-fixes SCPS-15011: name: "EXTERMINATION" name-sort: "エクスターミネーション" @@ -9177,11 +9020,7 @@ SCPS-15055: name-sort: "ぐらんつーりすも 4 ぷろろーぐ" name-en: "Gran Turismo 4 Prologue" region: "NTSC-J" - gsHWFixes: - recommendedBlendingLevel: 3 # Improves banding in car showcase as well as car brightness and sheen. - halfPixelOffset: 5 # Fixes weird edge shadows and depth bleed which happens on the edge as well. - autoFlush: 1 # Partially fixes the sun occlusion and lens flare. - getSkipCount: "GSC_PolyphonyDigitalGames" # Fixes post-processing. + gsHWFixes: *gran-turismo-4-prologue-gs-fixes memcardFilters: - "PBPX-95502" - "SCAJ-20066" @@ -9194,7 +9033,6 @@ SCPS-15055: - "SCPS-19304" - "SCPS-15009" - "SCPS-55007" - # vuClampMode = 2 Text in GT mode works. SCPS-15056: name: "ラチェット&クランク2 ガガガ!銀河のコマンドーっす" name-sort: "らちぇっとあんどくらんく2 ががが!ぎんがのこまんどーっす" @@ -9650,13 +9488,8 @@ SCPS-15105: name-sort: "つーりすと とろふぃー" name-en: "Tourist Trophy - The Real Riding Simulator" region: "NTSC-J" - clampModes: - vuClampMode: 2 # Fixes SPS in TT Mode menu caused by the moving tooltips. - gsHWFixes: - recommendedBlendingLevel: 3 # Improves banding in car showcase as well as car brightness and sheen. - halfPixelOffset: 4 # Fixes weird edge shadows and depth bleed which happens on the edge as well. - autoFlush: 1 # Helps lens flare and sun occlusion somewhat but doesn't full fix it. - getSkipCount: "GSC_PolyphonyDigitalGames" # Fixes post-processing. + clampModes: *gran-turismo-4-clamp-modes + gsHWFixes: *gran-turismo-4-gs-fixes SCPS-15106: name: "SIREN2" name-sort: "さいれん2" @@ -9811,16 +9644,11 @@ SCPS-17001: name-en: "Gran Turismo 4" region: "NTSC-J" compat: 5 - clampModes: - vuClampMode: 2 # Text in GT mode works. + clampModes: *gran-turismo-4-clamp-modes roundModes: eeRoundMode: 3 # Using chop for both normal+div fixes crash in B5 license test. eeDivRoundMode: 3 # See above. - gsHWFixes: - recommendedBlendingLevel: 3 # Improves banding in car showcase as well as car brightness and sheen. - halfPixelOffset: 4 # Fixes weird edge shadows and depth bleed which happens on the edge as well. - autoFlush: 1 # Helps lens flare and sun occlusion somewhat but doesn't full fix it. - getSkipCount: "GSC_PolyphonyDigitalGames" # Fixes post-processing. + gsHWFixes: *gran-turismo-4-gs-fixes memcardFilters: - "PBPX-95502" - "SCAJ-20066" @@ -9847,41 +9675,29 @@ SCPS-17008: name-sort: "ぐらんつーりすも ないき りみてっどえでぃしょん [8inch]" name-en: "Nike - Gran Turismo [Limited Edition - 8 inch]" region: "NTSC-J" - gsHWFixes: - recommendedBlendingLevel: 3 # Improves banding in car showcase as well as car brightness and sheen. - halfPixelOffset: 4 # Fixes weird edge shadows and depth bleed which happens on the edge as well. - autoFlush: 1 # Helps lens flare and sun occlusion somewhat but doesn't full fix it. - getSkipCount: "GSC_PolyphonyDigitalGames" # Fixes post-processing. + clampModes: *gran-turismo-4-clamp-modes + gsHWFixes: *gran-turismo-4-gs-fixes SCPS-17009: name: "NIKE/ GRAN TURISMO Limited Edition [9inch]" name-sort: "ぐらんつーりすも ないき りみてっどえでぃしょん [9inch]" name-en: "Nike - Gran Turismo [Limited Edition - 9 inch]" region: "NTSC-J" - gsHWFixes: - recommendedBlendingLevel: 3 # Improves banding in car showcase as well as car brightness and sheen. - halfPixelOffset: 4 # Fixes weird edge shadows and depth bleed which happens on the edge as well. - autoFlush: 1 # Helps lens flare and sun occlusion somewhat but doesn't full fix it. - getSkipCount: "GSC_PolyphonyDigitalGames" # Fixes post-processing. + clampModes: *gran-turismo-4-clamp-modes + gsHWFixes: *gran-turismo-4-gs-fixes SCPS-17010: name: "NIKE/ GRAN TURISMO Limited Edition [10inch]" name-sort: "ぐらんつーりすも ないき りみてっどえでぃしょん [10inch]" name-en: "Nike - Gran Turismo [Limited Edition - 10 inch]" region: "NTSC-J" - gsHWFixes: - recommendedBlendingLevel: 3 # Improves banding in car showcase as well as car brightness and sheen. - halfPixelOffset: 4 # Fixes weird edge shadows and depth bleed which happens on the edge as well. - autoFlush: 1 # Helps lens flare and sun occlusion somewhat but doesn't full fix it. - getSkipCount: "GSC_PolyphonyDigitalGames" # Fixes post-processing. + clampModes: *gran-turismo-4-clamp-modes + gsHWFixes: *gran-turismo-4-gs-fixes SCPS-17011: name: "NIKE/ GRAN TURISMO Limited Edition [11inch]" name-sort: "ぐらんつーりすも ないき りみてっどえでぃしょん [11inch]" name-en: "Nike - Gran Turismo [Limited Edition - 11 inch]" region: "NTSC-J" - gsHWFixes: - recommendedBlendingLevel: 3 # Improves banding in car showcase as well as car brightness and sheen. - halfPixelOffset: 4 # Fixes weird edge shadows and depth bleed which happens on the edge as well. - autoFlush: 1 # Helps lens flare and sun occlusion somewhat but doesn't full fix it. - getSkipCount: "GSC_PolyphonyDigitalGames" # Fixes post-processing. + clampModes: *gran-turismo-4-clamp-modes + gsHWFixes: *gran-turismo-4-gs-fixes SCPS-17013: name: "ローグギャラクシー ディレクターズカット" name-sort: "ろーぐぎゃらくしー でぃれくたーずかっと" @@ -10037,10 +9853,7 @@ SCPS-19208: name-sort: "ぐらんつーりすも Concept 2001 Tokyo [PlayStation2 the Best]" name-en: "Gran Turismo - Concept 2001 Tokyo [PlayStation2 the Best]" region: "NTSC-J" - gsHWFixes: - halfPixelOffset: 5 # Fixes weird edge shadows and depth bleed which happens on the edge as well. - autoFlush: 1 # Partially fixes the sun occlusion and lens flare. - getSkipCount: "GSC_PolyphonyDigitalGames" # Fixes post-processing. + gsHWFixes: *gran-turismo-3-gs-fixes SCPS-19209: name: "ぼくのなつやすみ2 海の冒険篇 [PlayStation2 the Best]" name-sort: "ぼくのなつやすみ2 うみのぼうけんへん [PlayStation2 the Best]" @@ -10107,13 +9920,8 @@ SCPS-19252: name-sort: "ぐらんつーりすも 4 [PlayStation2 the Best]" name-en: "Gran Turismo 4 [PlayStation2 the Best]" region: "NTSC-J" - clampModes: - vuClampMode: 2 # Text in GT mode works. - gsHWFixes: - recommendedBlendingLevel: 3 # Improves banding in car showcase as well as car brightness and sheen. - halfPixelOffset: 4 # Fixes weird edge shadows and depth bleed which happens on the edge as well. - autoFlush: 1 # Helps lens flare and sun occlusion somewhat but doesn't full fix it. - getSkipCount: "GSC_PolyphonyDigitalGames" # Fixes post-processing. + clampModes: *gran-turismo-4-clamp-modes + gsHWFixes: *gran-turismo-4-gs-fixes memcardFilters: - "PBPX-95502" - "SCAJ-20066" @@ -10178,11 +9986,7 @@ SCPS-19304: name-sort: "ぐらんつーりすも 4 ぷろろーぐ [PlayStation2 the Best]" name-en: "Gran Turismo 4 Prologue [PlayStation2 the Best]" region: "NTSC-J" - gsHWFixes: - recommendedBlendingLevel: 3 # Improves banding in car showcase as well as car brightness and sheen. - halfPixelOffset: 5 # Fixes weird edge shadows and depth bleed which happens on the edge as well. - autoFlush: 1 # Partially fixes the sun occlusion and lens flare. - getSkipCount: "GSC_PolyphonyDigitalGames" # Fixes post-processing. + gsHWFixes: *gran-turismo-4-prologue-gs-fixes memcardFilters: - "PBPX-95502" - "SCAJ-20066" @@ -10195,7 +9999,6 @@ SCPS-19304: - "SCPS-19304" - "SCPS-15009" - "SCPS-55007" - # vuClampMode = 2 Text in GT mode works. SCPS-19305: name: "SIREN [PlayStation2 the Best]" name-sort: "さいれん [PlayStation2 the Best]" @@ -10424,13 +10227,8 @@ SCPS-19324: name-sort: "つーりすと とろふぃー [PlayStation2 the Best]" name-en: "Tourist Trophy - The Real Riding Simulator [PlayStation2 the Best]" region: "NTSC-J" - clampModes: - vuClampMode: 2 # Fixes SPS in TT Mode menu caused by the moving tooltips. - gsHWFixes: - recommendedBlendingLevel: 3 # Improves banding in car showcase as well as car brightness and sheen. - halfPixelOffset: 4 # Fixes weird edge shadows and depth bleed which happens on the edge as well. - autoFlush: 1 # Helps lens flare and sun occlusion somewhat but doesn't full fix it. - getSkipCount: "GSC_PolyphonyDigitalGames" # Fixes post-processing. + clampModes: *gran-turismo-4-clamp-modes + gsHWFixes: *gran-turismo-4-gs-fixes SCPS-19325: name: "サルゲッチュ ミリオンモンキーズ [PlayStation2 the Best]" name-sort: "さるげっちゅ みりおんもんきーず [PlayStation2 the Best]" @@ -10650,10 +10448,7 @@ SCPS-55005: name-sort: "ぐらんつーりすも こんせぷと 2001 Tokyo" name-en: "Gran Turismo - Concept 2001 Tokyo" region: "NTSC-J" - gsHWFixes: - halfPixelOffset: 5 # Fixes weird edge shadows and depth bleed which happens on the edge as well. - autoFlush: 1 # Partially fixes the sun occlusion and lens flare. - getSkipCount: "GSC_PolyphonyDigitalGames" # Fixes post-processing. + gsHWFixes: *gran-turismo-3-gs-fixes SCPS-55006: name: "ワイルドアームズ アドヴァンスドサード" name-sort: "わいるどあーむず あどゔぁんすどさーど" @@ -10667,10 +10462,7 @@ SCPS-55007: name-sort: "ぐらんつーりすも 3 - A-Spec" name-en: "Gran Turismo 3 - A-Spec" region: "NTSC-J" - gsHWFixes: - halfPixelOffset: 5 # Fixes weird edge shadows and depth bleed which happens on the edge as well. - autoFlush: 1 # Partially fixes the sun occlusion and lens flare. - getSkipCount: "GSC_PolyphonyDigitalGames" # Fixes post-processing. + gsHWFixes: *gran-turismo-3-gs-fixes SCPS-55008: name: "サンダーストライカー" name-sort: "さんだーすとらいかー" @@ -11001,19 +10793,13 @@ SCPS-55902: name-sort: "ぐらんつーりすも - こんせぷと 2002 Tokyo-Geneva" name-en: "Gran Turismo - Concept 2002 Tokyo-Geneva" region: "NTSC-J" - gsHWFixes: - halfPixelOffset: 5 # Fixes weird edge shadows and depth bleed which happens on the edge as well. - autoFlush: 1 # Partially fixes the sun occlusion and lens flare. - getSkipCount: "GSC_PolyphonyDigitalGames" # Fixes post-processing. + gsHWFixes: *gran-turismo-3-gs-fixes SCPS-55903: name: "GRAN TURISMO - Concept 2002 Tokyo-Geneva" name-sort: "ぐらんつーりすも - こんせぷと 2002 Tokyo-Geneva" name-en: "Gran Turismo - Concept 2002 Tokyo-Geneva" region: "NTSC-J" - gsHWFixes: - halfPixelOffset: 5 # Fixes weird edge shadows and depth bleed which happens on the edge as well. - autoFlush: 1 # Partially fixes the sun occlusion and lens flare. - getSkipCount: "GSC_PolyphonyDigitalGames" # Fixes post-processing. + gsHWFixes: *gran-turismo-3-gs-fixes SCPS-56001: name: "이코" name-en: "Ico" @@ -11049,10 +10835,7 @@ SCPS-56004: SCPS-56005: name: "Gran Turismo Concept - 2002 Tokyo-Seoul" # No listed Korean name on ReDump region: "NTSC-K" - gsHWFixes: - halfPixelOffset: 5 # Fixes weird edge shadows and depth bleed which happens on the edge as well. - autoFlush: 1 # Partially fixes the sun occlusion and lens flare. - getSkipCount: "GSC_PolyphonyDigitalGames" # Fixes post-processing. + gsHWFixes: *gran-turismo-3-gs-fixes SCPS-56006: name: "철권 4" name-en: "Tekken 4" @@ -11131,10 +10914,7 @@ SCPS-72001: name-sort: "ぐらんつーりすも3 A-spec [MEGA HITS!]" name-en: "Gran Turismo 3 - A-Spec [MEGA HITS!]" region: "NTSC-J" - gsHWFixes: - halfPixelOffset: 5 # Fixes weird edge shadows and depth bleed which happens on the edge as well. - autoFlush: 1 # Partially fixes the sun occlusion and lens flare. - getSkipCount: "GSC_PolyphonyDigitalGames" # Fixes post-processing. + gsHWFixes: *gran-turismo-3-gs-fixes SCPS-72002: name: "みんなのGOLF 3 [MEGA HITS!]" name-sort: "みんなのごるふ 3 [MEGA HITS!]" @@ -11170,13 +10950,8 @@ SCUS-90174: SCUS-90682: name: "Gran Turismo 4" region: "NTSC-U" - clampModes: - vuClampMode: 2 # Text in GT mode works. - gsHWFixes: - recommendedBlendingLevel: 3 # Improves banding in car showcase as well as car brightness and sheen. - halfPixelOffset: 4 # Fixes weird edge shadows and depth bleed which happens on the edge as well. - autoFlush: 1 # Helps lens flare and sun occlusion somewhat but doesn't full fix it. - getSkipCount: "GSC_PolyphonyDigitalGames" # Fixes post-processing. + clampModes: *gran-turismo-4-clamp-modes + gsHWFixes: *gran-turismo-4-gs-fixes SCUS-94346: name: "SingStar - Latino" region: "NTSC-U" @@ -11200,10 +10975,7 @@ SCUS-97102: name: "Gran Turismo 3 - A-Spec" region: "NTSC-U" compat: 5 - gsHWFixes: - halfPixelOffset: 5 # Fixes weird edge shadows and depth bleed which happens on the edge as well. - autoFlush: 1 # Partially fixes the sun occlusion and lens flare. - getSkipCount: "GSC_PolyphonyDigitalGames" # Fixes post-processing. + gsHWFixes: *gran-turismo-3-gs-fixes memcardFilters: - "PBPX-95503" - "SCUS-97102" @@ -11267,10 +11039,7 @@ SCUS-97114: SCUS-97115: name: "Gran Turismo 3 - A-Spec [Demo]" region: "NTSC-U" - gsHWFixes: - halfPixelOffset: 5 # Fixes weird edge shadows and depth bleed which happens on the edge as well. - autoFlush: 1 # Partially fixes the sun occlusion and lens flare. - getSkipCount: "GSC_PolyphonyDigitalGames" # Fixes post-processing. + gsHWFixes: *gran-turismo-3-gs-fixes SCUS-97116: name: "Kiosk Disc 2.1" region: "NTSC-U" @@ -11701,12 +11470,9 @@ SCUS-97218: name: "Kiosk Demo Disc 2.6" region: "NTSC-U" SCUS-97219: - name: "Gran Turismo 3 - A-Spec - Nissan 350Z Edition" + name: "Gran Turismo Concept - Nissan 350Z Edition" region: "NTSC-U" - gsHWFixes: - halfPixelOffset: 5 # Fixes weird edge shadows and depth bleed which happens on the edge as well. - autoFlush: 1 # Partially fixes the sun occlusion and lens flare. - getSkipCount: "GSC_PolyphonyDigitalGames" # Fixes post-processing. + gsHWFixes: *gran-turismo-3-gs-fixes memcardFilters: - "SCUS-97219" - "SCUS-97102" @@ -12063,13 +11829,8 @@ SCUS-97328: name: "Gran Turismo 4" region: "NTSC-U" compat: 5 - clampModes: - vuClampMode: 2 # Text in GT mode works. - gsHWFixes: - recommendedBlendingLevel: 3 # Improves banding in car showcase as well as car brightness and sheen. - halfPixelOffset: 4 # Fixes weird edge shadows and depth bleed which happens on the edge as well. - autoFlush: 1 # Helps lens flare and sun occlusion somewhat but doesn't full fix it. - getSkipCount: "GSC_PolyphonyDigitalGames" # Fixes post-processing. + clampModes: *gran-turismo-4-clamp-modes + gsHWFixes: *gran-turismo-4-gs-fixes memcardFilters: # Allows car imports from GT3 or something. - "PBPX-95503" - "SCUS-97328" @@ -12274,11 +12035,7 @@ SCUS-97383: SCUS-97384: name: "Gran Turismo Special Edition 2004 Toyota [Demo]" region: "NTSC-U" - gsHWFixes: - recommendedBlendingLevel: 3 # Improves banding in car showcase as well as car brightness and sheen. - halfPixelOffset: 5 # Fixes weird edge shadows and depth bleed which happens on the edge as well. - autoFlush: 1 # Partially fixes the sun occlusion and lens flare. - getSkipCount: "GSC_PolyphonyDigitalGames" # Fixes post-processing. + gsHWFixes: *gran-turismo-4-prologue-gs-fixes SCUS-97392: name: "NBA '06 featuring The Life Vol.1 [Demo]" region: "NTSC-U" @@ -12507,13 +12264,8 @@ SCUS-97432: SCUS-97436: name: "Gran Turismo 4 [Online Public Beta]" region: "NTSC-U" - clampModes: - vuClampMode: 2 # Text in GT mode works. - gsHWFixes: - recommendedBlendingLevel: 3 # Improves banding in car showcase as well as car brightness and sheen. - halfPixelOffset: 4 # Fixes weird edge shadows and depth bleed which happens on the edge as well. - autoFlush: 1 # Helps lens flare and sun occlusion somewhat but doesn't full fix it. - getSkipCount: "GSC_PolyphonyDigitalGames" # Fixes post-processing. + clampModes: *gran-turismo-4-clamp-modes + gsHWFixes: *gran-turismo-4-gs-fixes memcardFilters: - "PBPX-95503" - "SCUS-97328" @@ -12731,13 +12483,8 @@ SCUS-97482: SCUS-97483: name: "Gran Turismo 4 MX-5 Edition [Demo]" region: "NTSC-U" - clampModes: - vuClampMode: 2 # Text in GT mode works. - gsHWFixes: - recommendedBlendingLevel: 3 # Improves banding in car showcase as well as car brightness and sheen. - halfPixelOffset: 4 # Fixes weird edge shadows and depth bleed which happens on the edge as well. - autoFlush: 1 # Helps lens flare and sun occlusion somewhat but doesn't full fix it. - getSkipCount: "GSC_PolyphonyDigitalGames" # Fixes post-processing. + clampModes: *gran-turismo-4-clamp-modes + gsHWFixes: *gran-turismo-4-gs-fixes SCUS-97484: name: "Sly 3 - Honor Among Thieves [E3 Demo]" region: "NTSC-U" @@ -12860,13 +12607,8 @@ SCUS-97502: name: "Tourist Trophy" region: "NTSC-U" compat: 5 - clampModes: - vuClampMode: 2 # Fixes SPS in TT Mode menu caused by the moving tooltips. - gsHWFixes: - recommendedBlendingLevel: 3 # Improves banding in car showcase as well as car brightness and sheen. - halfPixelOffset: 4 # Fixes weird edge shadows and depth bleed which happens on the edge as well. - autoFlush: 1 # Helps lens flare and sun occlusion somewhat but doesn't full fix it. - getSkipCount: "GSC_PolyphonyDigitalGames" # Fixes post-processing. + clampModes: *gran-turismo-4-clamp-modes + gsHWFixes: *gran-turismo-4-gs-fixes SCUS-97503: name: "MLB '06 - The Show [Demo]" region: "NTSC-U" @@ -12920,10 +12662,7 @@ SCUS-97512: - "PBPX-95503" - "SCUS-97102" - "SCUS-97512" - gsHWFixes: - halfPixelOffset: 5 # Fixes weird edge shadows and depth bleed which happens on the edge as well. - autoFlush: 1 # Partially fixes the sun occlusion and lens flare. - getSkipCount: "GSC_PolyphonyDigitalGames" # Fixes post-processing. + gsHWFixes: *gran-turismo-3-gs-fixes SCUS-97513: name: "Ratchet & Clank 2 - Going Commando [Greatest Hits]" region: "NTSC-U" @@ -13126,13 +12865,8 @@ SCUS-97560: SCUS-97563: name: "Gran Turismo 4" region: "NTSC-U" - clampModes: - vuClampMode: 2 # Text in GT mode works. - gsHWFixes: - recommendedBlendingLevel: 3 # Improves banding in car showcase as well as car brightness and sheen. - halfPixelOffset: 4 # Fixes weird edge shadows and depth bleed which happens on the edge as well. - autoFlush: 1 # Helps lens flare and sun occlusion somewhat but doesn't full fix it. - getSkipCount: "GSC_PolyphonyDigitalGames" # Fixes post-processing. + clampModes: *gran-turismo-4-clamp-modes + gsHWFixes: *gran-turismo-4-gs-fixes SCUS-97564: name: "Jampack Demo Disc Vol.15 [T-Rated]" region: "NTSC-U" diff --git a/bin/resources/shaders/dx11/tfx.fx b/bin/resources/shaders/dx11/tfx.fx index 80962b378c..5f1bd97a59 100644 --- a/bin/resources/shaders/dx11/tfx.fx +++ b/bin/resources/shaders/dx11/tfx.fx @@ -2014,11 +2014,6 @@ VS_OUTPUT vs_main_expand(uint vid : SV_VertexID) vtx.inv_cov = is_near_corner ? 0.0f : 1.0f; // Full coverage at near corner, otherwise none. vtx.interior = 0; - - #if !VS_IIP - // Get the provoking vertex color (first vertex in DX) - vtx.c = i0 == 0 ? vtx.c : (i1 == 0 ? other.c : opposite.c); - #endif } return vtx; diff --git a/bin/resources/shaders/opengl/tfx_vgs.glsl b/bin/resources/shaders/opengl/tfx_vgs.glsl index 41fb300071..95135e2b4d 100644 --- a/bin/resources/shaders/opengl/tfx_vgs.glsl +++ b/bin/resources/shaders/opengl/tfx_vgs.glsl @@ -455,11 +455,6 @@ void main() VSout.inv_cov = is_near_corner ? 0.0f : 1.0f; // Full coverage at near corner, otherwise none. VSout.interior = 0; - - #if !VS_IIP - // Get the provoking vertex color (last vertex in GL) - vtx.c = i0 == 2 ? vtx.c : (i1 == 2 ? other.c : opposite.c); - #endif } #endif diff --git a/bin/resources/shaders/vulkan/tfx.glsl b/bin/resources/shaders/vulkan/tfx.glsl index a1adbb2d91..12736ff9a7 100644 --- a/bin/resources/shaders/vulkan/tfx.glsl +++ b/bin/resources/shaders/vulkan/tfx.glsl @@ -450,11 +450,6 @@ void main() vsOut.inv_cov = is_near_corner ? 0.0f : 1.0f; // Full coverage at near corner, otherwise none. vsOut.interior = 0; - - #if !VS_IIP - // Get the provoking vertex color (last vertex in VK) - vtx.c = i0 == 2 ? vtx.c : (i1 == 2 ? other.c : opposite.c); - #endif } #endif diff --git a/common/YAML.cpp b/common/YAML.cpp index 52c0a2aec3..3687e54512 100644 --- a/common/YAML.cpp +++ b/common/YAML.cpp @@ -17,7 +17,7 @@ struct RapidYAMLContext Error* error = nullptr; }; -std::optional ParseYAMLFromString(ryml::csubstr yaml, ryml::csubstr file_name, Error* error) +std::optional ParseYAMLFromString(ryml::csubstr yaml, ryml::csubstr file_name, Error* error, bool resolve_anchors) { RapidYAMLContext context; context.error = error; @@ -28,40 +28,93 @@ std::optional ParseYAMLFromString(ryml::csubstr yaml, ryml::csubstr callbacks.set_user_data(static_cast(&context)); callbacks.set_error_basic([](ryml::csubstr msg, const ryml::ErrorDataBasic& errdata, void* user_data) { - std::string description; - auto callback = [&description](ryml::csubstr string) { - description.append(string.str, string.len); - }; - ryml::err_basic_format(std::move(callback), msg, errdata); + RapidYAMLContext* context = static_cast(user_data); + // This scope needs to stay, so all objects destruct before std::longjump + { + std::string description; + auto callback = [&description](ryml::csubstr string) { + description.append(string.str, string.len); + }; + ryml::err_basic_format(std::move(callback), msg, errdata); - // We might have already returned, so don't try to recover. - pxFailRel(description.c_str()); - std::abort(); + if (context != nullptr) + { + Error::SetString(context->error, std::move(description)); + } + else + { + pxFailRel(description.c_str()); + } + } + + if (context != nullptr) + { + std::longjmp(context->env, 1); + } + else + { + std::terminate(); + } }); callbacks.set_error_parse([](ryml::csubstr msg, const ryml::ErrorDataParse& errdata, void* user_data) { RapidYAMLContext* context = static_cast(user_data); + // This scope needs to stay, so all objects destruct before std::longjump + { + std::string description; + auto callback = [&description](ryml::csubstr string) { + description.append(string.str, string.len); + }; + ryml::err_parse_format(std::move(callback), msg, errdata); - std::string description; - auto callback = [&description](ryml::csubstr string) { - description.append(string.str, string.len); - }; - ryml::err_parse_format(std::move(callback), msg, errdata); + if (context != nullptr) + { + Error::SetString(context->error, std::move(description)); + } + else + { + pxFailRel(description.c_str()); + } + } - Error::SetString(context->error, std::move(description)); - std::longjmp(context->env, 1); + if (context != nullptr) + { + std::longjmp(context->env, 2); + } + else + { + std::terminate(); + } }); callbacks.set_error_visit([](ryml::csubstr msg, const ryml::ErrorDataVisit& errdata, void* user_data) { - std::string description; - auto callback = [&description](ryml::csubstr string) { - description.append(string.str, string.len); - }; - ryml::err_visit_format(std::move(callback), msg, errdata); + RapidYAMLContext* context = static_cast(user_data); + // This scope needs to stay, so all objects destruct before std::longjump + { + std::string description; + auto callback = [&description](ryml::csubstr string) { + description.append(string.str, string.len); + }; + ryml::err_visit_format(std::move(callback), msg, errdata); - // We've probably already returned, so don't try to recover. - pxFailRel(description.c_str()); - std::abort(); + if (context != nullptr) + { + Error::SetString(context->error, std::move(description)); + } + else + { + pxFailRel(description.c_str()); + } + } + + if (context != nullptr) + { + std::longjmp(context->env, 3); + } + else + { + std::terminate(); + } }); #else callbacks.m_user_data = static_cast(&context); @@ -76,15 +129,24 @@ std::optional ParseYAMLFromString(ryml::csubstr yaml, ryml::csubstr ryml::EventHandlerTree event_handler(callbacks); ryml::Parser parser(&event_handler); - ryml::Tree tree; + ryml::Tree tree(callbacks); // The only options RapidYAML provides for recovering from errors are // throwing an exception or using setjmp/longjmp. Since we have exceptions // disabled we have to use the latter option. - if (setjmp(context.env)) + if (setjmp(context.env) != 0) return std::nullopt; ryml::parse_in_arena(&parser, file_name, yaml, &tree); + if (resolve_anchors) + { + tree.resolve(); + } + + // Callbacks passed to ryml::Tree are used for value parsing errors later, + // so we need to clear the context before it goes out of scope. + callbacks.set_user_data(nullptr); + tree.callbacks(callbacks); return tree; } diff --git a/common/YAML.h b/common/YAML.h index fe5a8cb4cd..11ba68a289 100644 --- a/common/YAML.h +++ b/common/YAML.h @@ -14,4 +14,6 @@ /// parsing errors (as is recommended by the documentation for cases where /// exceptions are disabled). The file_name parameter is only used for error /// messages, which are returned via the error parameter. -std::optional ParseYAMLFromString(ryml::csubstr yaml, ryml::csubstr file_name, Error* error); +/// If resolve_anchors is set to true, YAML anchors and aliases will be resolved. +/// It's a potentially slow operation, so it's opt-in. +std::optional ParseYAMLFromString(ryml::csubstr yaml, ryml::csubstr file_name, Error* error, bool resolve_anchors = false); diff --git a/pcsx2/GS/Renderers/HW/GSRendererHW.cpp b/pcsx2/GS/Renderers/HW/GSRendererHW.cpp index 4ab585cbed..1a3879ca0a 100644 --- a/pcsx2/GS/Renderers/HW/GSRendererHW.cpp +++ b/pcsx2/GS/Renderers/HW/GSRendererHW.cpp @@ -5331,31 +5331,36 @@ bool GSRendererHW::VerifyIndices() return true; } -// Fix the colors in vertices in case the API only supports "provoking first vertex" -// (i.e., when using flat shading the color comes from the first vertex, unlike PS2 -// which is "provoking last vertex"). -void GSRendererHW::HandleProvokingVertexFirst() +void GSRendererHW::HandleFlatShadedVertices() { - // Early exit conditions: - if (g_gs_device->Features().provoking_vertex_last || // device supports provoking last vertex - m_conf.vs.iip || // we are doing Gouraud shading - m_vt.m_primclass == GS_POINT_CLASS || // drawing points (one vertex per primitive; color is unambiguous) - m_vt.m_primclass == GS_SPRITE_CLASS) // drawing sprites (handled by the sprites -> triangles expand shader) + // These cases might need fixing. + const bool maybe_fix_vertices = !m_conf.vs.iip && + (!g_gs_device->Features().provoking_vertex_last || IsCoverageAlphaSupported()); + + // These cases definitely don't need fixing. + const bool dont_fix_vertices = m_vt.m_primclass == GS_POINT_CLASS || m_vt.m_primclass == GS_SPRITE_CLASS; + + if (!maybe_fix_vertices || dont_fix_vertices) return; const int n = GSUtil::GetClassVertexCount(m_vt.m_primclass); - // If all first/last vertices have the same color there is nothing to do. - bool first_eq_last = true; + // If all vertices of each prim have the same color there is nothing to do. + bool prims_flat = true; for (u32 i = 0; i < m_index->tail; i += n) { - if (m_vertex->buff[m_index->buff[i]].RGBAQ.U32[0] != m_vertex->buff[m_index->buff[i + n - 1]].RGBAQ.U32[0]) + for (u32 j = 0; j < n - 1; j++) { - first_eq_last = false; - break; + if (m_vertex->buff[m_index->buff[i + j]].RGBAQ.U32[0] != m_vertex->buff[m_index->buff[i + n - 1]].RGBAQ.U32[0]) + { + prims_flat = false; + break; + } } + if (!prims_flat) + break; } - if (first_eq_last) + if (prims_flat) return; // De-index the vertices using the copy buffer @@ -5369,11 +5374,11 @@ void GSRendererHW::HandleProvokingVertexFirst() std::swap(m_vertex->buff, m_vertex->buff_copy); m_vertex->head = m_vertex->next = m_vertex->tail = m_index->tail; - // Put correct color in the first vertex + // Make all vertices the same color to simplify handling in expand shaders. for (u32 i = 0; i < m_index->tail; i += n) { - m_vertex->buff[i].RGBAQ.U32[0] = m_vertex->buff[i + n - 1].RGBAQ.U32[0]; - m_vertex->buff[i + n - 1].RGBAQ.U32[0] = 0xff; // Make last vertex red for debugging if used improperly + for (u32 j = 0; j < n - 1; j++) + m_vertex->buff[i + j].RGBAQ.U32[0] = m_vertex->buff[i + n - 1].RGBAQ.U32[0]; } } @@ -9450,7 +9455,7 @@ __ri void GSRendererHW::DrawPrims(GSTextureCache::Target* rt, GSTextureCache::Ta DetermineROVUsage(rt, ds); ConvertTextureTypeROV(rt, ds); - // Barriers must be determined before indices are modified via HandleProvokingVertexFirst/SetupIA. + // Barriers must be determined before indices are modified via HandleFlatShadedVertices/SetupIA. // This also computes the drawlist if needed. DetermineBarriers(rt, tex); @@ -9475,7 +9480,7 @@ __ri void GSRendererHW::DrawPrims(GSTextureCache::Target* rt, GSTextureCache::Ta m_conf.scissor = (date_options.enabled && !date_options.barrier) ? m_conf.drawarea : scissor; - HandleProvokingVertexFirst(); + HandleFlatShadedVertices(); SetupIA(rtscale, vs_scale_x, vs_scale_y, m_channel_shuffle_width != 0, no_rt); diff --git a/pcsx2/GS/Renderers/HW/GSRendererHW.h b/pcsx2/GS/Renderers/HW/GSRendererHW.h index bce5419503..4ee9d556ee 100644 --- a/pcsx2/GS/Renderers/HW/GSRendererHW.h +++ b/pcsx2/GS/Renderers/HW/GSRendererHW.h @@ -215,7 +215,7 @@ private: void DrawPrims(GSTextureCache::Target* rt, GSTextureCache::Target* ds, GSTextureCache::Source* tex, const TextureMinMaxResult& tmm); void ResetStates(); - void HandleProvokingVertexFirst(); + void HandleFlatShadedVertices(); void SetupIA(float target_scale, float sx, float sy, bool req_vert_backup, const bool no_rt); void EmulateTextureShuffleAndFbmask(GSTextureCache::Target* rt, GSTextureCache::Source* tex); u32 EmulateChannelShuffle(GSTextureCache::Target* src, bool test_only, GSTextureCache::Target* rt = nullptr); diff --git a/pcsx2/GS/Renderers/Metal/tfx.metal b/pcsx2/GS/Renderers/Metal/tfx.metal index 7ed2eec78e..d56ce2dd3a 100644 --- a/pcsx2/GS/Renderers/Metal/tfx.metal +++ b/pcsx2/GS/Renderers/Metal/tfx.metal @@ -555,12 +555,6 @@ vertex MainVSOut vs_main_expand( out.inv_cov = is_near_corner ? 0.0f : 1.0f; // Full coverage at near corner, otherwise none. out.interior = 0; - - if (NOT_IIP) - { - // Get the provoking vertex color (first vertex in Metal) - out.fc = i0 == 0 ? out.fc : (i1 == 0 ? other.fc : opposite.fc); - } } return out; diff --git a/pcsx2/GameDatabase.cpp b/pcsx2/GameDatabase.cpp index dd08741344..0ad9a91c3d 100644 --- a/pcsx2/GameDatabase.cpp +++ b/pcsx2/GameDatabase.cpp @@ -1030,7 +1030,7 @@ void GameDatabase::initDatabase() const ryml::csubstr yaml = ryml::to_csubstr(*buffer); Error error; - std::optional tree = ParseYAMLFromString(yaml, ryml::to_csubstr(name), &error); + std::optional tree = ParseYAMLFromString(yaml, ryml::to_csubstr(name), &error, true); if (!tree.has_value()) { Console.ErrorFmt("GameDB: Failed to parse game database file {}:", path); diff --git a/pcsx2/ShaderCacheVersion.h b/pcsx2/ShaderCacheVersion.h index f767c68783..da27be88cb 100644 --- a/pcsx2/ShaderCacheVersion.h +++ b/pcsx2/ShaderCacheVersion.h @@ -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 = 106; // Last changed in PR 14643 +static constexpr u32 SHADER_CACHE_VERSION = 107; // Last changed in PR 14634