diff --git a/bin/resources/GameIndex.yaml b/bin/resources/GameIndex.yaml index 445e0b99a4..4d0118972b 100644 --- a/bin/resources/GameIndex.yaml +++ b/bin/resources/GameIndex.yaml @@ -3870,9 +3870,13 @@ SCED-52899: SCED-52932: name: "Bonus Demo 8" region: "PAL-M5" + gsHWFixes: + textureInsideRT: 1 # Fixes shadows in TOCA Race Driver 2. SCED-52933: name: "Bonus Demo 8" region: "PAL-M5" + gsHWFixes: + textureInsideRT: 1 # Fixes shadows in TOCA Race Driver 2. SCED-52935: name: "SingStar Party [Demo]" region: "PAL-E" @@ -3946,6 +3950,8 @@ SCED-52997: SCED-53018: name: "Bonus Demo 8 (Geu)" region: "PAL-G" + gsHWFixes: + textureInsideRT: 1 # Fixes shadows in TOCA Race Driver 2. SCED-53043: name: "Magazine Ufficiale PlayStation 2 Speciale Platinum Italia" region: "PAL-I" @@ -13553,8 +13559,7 @@ SLED-53731: autoFlush: 1 # Post-processing. halfPixelOffset: 2 # Offset post-processing. texturePreloading: 1 # Improves performance. - getSkipCount: "GSC_Battlefield2" # Depth clear. - beforeDraw: "OI_Battlefield2" # Framebuffer copy, fixes rendering for bottom part of screen. + textureInsideRT: 1 # Fixes per line drawing. SLED-53732: name: "Spartan - Total Warrior [Demo]" region: "PAL" @@ -23492,8 +23497,7 @@ SLES-53729: autoFlush: 1 # Post-processing. halfPixelOffset: 2 # Offset post-processing. texturePreloading: 1 # Improves performance. - getSkipCount: "GSC_Battlefield2" # Depth clear. - beforeDraw: "OI_Battlefield2" # Framebuffer copy, fixes rendering for bottom part of screen. + textureInsideRT: 1 # Fixes per line drawing. SLES-53730: name: "Battlefield 2 - Modern Combat" region: "PAL-M3" @@ -23502,8 +23506,7 @@ SLES-53730: autoFlush: 1 # Post-processing. halfPixelOffset: 2 # Offset post-processing. texturePreloading: 1 # Improves performance. - getSkipCount: "GSC_Battlefield2" # Depth clear. - beforeDraw: "OI_Battlefield2" # Framebuffer copy, fixes rendering for bottom part of screen. + textureInsideRT: 1 # Fixes per line drawing. SLES-53734: name: "50 Cent - Bulletproof" region: "PAL-E" @@ -30871,13 +30874,11 @@ SLKA-25330: name: "Battlefield 2 - Modern Combat" region: "NTSC-K" gsHWFixes: - autoFlush: 2 # Post-processing. + minimumBlendingLevel: 4 # Fixes ground texture rendering. + autoFlush: 1 # Post-processing. halfPixelOffset: 2 # Offset post-processing. - texturePreloading: 1 # Spikes all over the place otherwise. - textureInsideRT: 1 # Fixes light shinging through objects. - cpuCLUTRender: 1 # Fixes light shining through objects. - getSkipCount: "GSC_Battlefield2" # Depth clear. - beforeDraw: "OI_Battlefield2" # Framebuffer copy, fixes rendering for bottom part of screen. + texturePreloading: 1 # Improves performance. + textureInsideRT: 1 # Fixes per line drawing. SLKA-25331: name: "Marc Ecko's Getting Up - Contents Under Pressure" region: "NTSC-K" @@ -31742,8 +31743,7 @@ SLPM-55034: autoFlush: 1 # Post-processing. halfPixelOffset: 2 # Offset post-processing. texturePreloading: 1 # Improves performance. - getSkipCount: "GSC_Battlefield2" # Depth clear. - beforeDraw: "OI_Battlefield2" # Framebuffer copy, fixes rendering for bottom part of screen. + textureInsideRT: 1 # Fixes per line drawing. SLPM-55035: name: "ファイトナイト ラウンド2 [EA:SY! 1980]" name-sort: "ふぁいとないと らうんど2 [EA:SY! 1980]" @@ -45797,8 +45797,7 @@ SLPM-66206: autoFlush: 1 # Post-processing. halfPixelOffset: 2 # Offset post-processing. texturePreloading: 1 # Improves performance. - getSkipCount: "GSC_Battlefield2" # Depth clear. - beforeDraw: "OI_Battlefield2" # Framebuffer copy, fixes rendering for bottom part of screen. + textureInsideRT: 1 # Fixes per line drawing. SLPM-66207: name: "どろろ [SEGA THE BEST 2800]" name-sort: "どろろ [SEGA THE BEST 2800]" @@ -48574,8 +48573,7 @@ SLPM-66651: autoFlush: 1 # Post-processing. halfPixelOffset: 2 # Offset post-processing. texturePreloading: 1 # Improves performance. - getSkipCount: "GSC_Battlefield2" # Depth clear. - beforeDraw: "OI_Battlefield2" # Framebuffer copy, fixes rendering for bottom part of screen. + textureInsideRT: 1 # Fixes per line drawing. SLPM-66652: name: "バーンアウト リベンジ [EA BEST HITS]" name-sort: "ばーんあうと りべんじ [EA BEST HITS]" @@ -66406,8 +66404,7 @@ SLUS-21026: autoFlush: 1 # Post-processing. halfPixelOffset: 2 # Offset post-processing. texturePreloading: 1 # Improves performance. - getSkipCount: "GSC_Battlefield2" # Depth clear. - beforeDraw: "OI_Battlefield2" # Framebuffer copy, fixes rendering for bottom part of screen. + textureInsideRT: 1 # Fixes per line drawing. SLUS-21027: name: "The Lord of the Rings - The Third Age" name-sort: "Lord of the Rings, The - The Third Age" @@ -72291,8 +72288,7 @@ SLUS-29117: autoFlush: 1 # Post-processing. halfPixelOffset: 2 # Offset post-processing. texturePreloading: 1 # Improves performance. - getSkipCount: "GSC_Battlefield2" # Depth clear. - beforeDraw: "OI_Battlefield2" # Framebuffer copy, fixes rendering for bottom part of screen. + textureInsideRT: 1 # Fixes per line drawing. SLUS-29118: name: "Need for Speed - Underground 2 [Demo]" region: "NTSC-U" @@ -72444,8 +72440,7 @@ SLUS-29152: autoFlush: 1 # Post-processing. halfPixelOffset: 2 # Offset post-processing. texturePreloading: 1 # Improves performance. - getSkipCount: "GSC_Battlefield2" # Depth clear. - beforeDraw: "OI_Battlefield2" # Framebuffer copy, fixes rendering for bottom part of screen. + textureInsideRT: 1 # Fixes per line drawing. SLUS-29153: name: "Burnout Revenge [Demo]" region: "NTSC-U" @@ -72560,8 +72555,7 @@ SLUS-29172: autoFlush: 1 # Post-processing. halfPixelOffset: 2 # Offset post-processing. texturePreloading: 1 # Improves performance. - getSkipCount: "GSC_Battlefield2" # Depth clear. - beforeDraw: "OI_Battlefield2" # Framebuffer copy, fixes rendering for bottom part of screen. + textureInsideRT: 1 # Fixes per line drawing. SLUS-29173: name: "The Sims 2 [Demo]" name-sort: "Sims 2, The [Demo]" diff --git a/pcsx2/GS/Renderers/HW/GSHwHack.cpp b/pcsx2/GS/Renderers/HW/GSHwHack.cpp index e34bea9cc8..c705d1b709 100644 --- a/pcsx2/GS/Renderers/HW/GSHwHack.cpp +++ b/pcsx2/GS/Renderers/HW/GSHwHack.cpp @@ -1078,43 +1078,6 @@ bool GSHwHack::OI_BurnoutGames(GSRendererHW& r, GSTexture* rt, GSTexture* ds, GS return false; } -bool GSHwHack::GSC_Battlefield2(GSRendererHW& r, int& skip) -{ - if (skip == 0) - { - if (RZBP >= RFBP && RFBP >= 0x2000 && RZBP >= 0x2700 && ((RZBP - RFBP) == 0x700)) - { - skip = 7; - - GIFRegTEX0 TEX0 = {}; - TEX0.TBP0 = RFBP; - TEX0.TBW = 8; - GSTextureCache::Target* dst = g_texture_cache->LookupTarget(TEX0, r.GetTargetSize(), r.GetTextureScaleFactor(), GSTextureCache::DepthStencil); - if (dst) - { - g_gs_device->ClearDepth(dst->m_texture, 0.0f); - } - } - } - - return true; -} - -bool GSHwHack::OI_Battlefield2(GSRendererHW& r, GSTexture* rt, GSTexture* ds, GSTextureCache::Source* t) -{ - if (!RPRIM->TME || RFRAME.Block() > 0xD00 || RTEX0.TBP0 > 0x1D00) - return true; - - if (rt && t && RFRAME.Block() == 0 && RTEX0.TBP0 == 0x1000) - { - const GSVector4i rc(0, 0, std::min(rt->GetWidth(), t->m_texture->GetWidth()), std::min(rt->GetHeight(), t->m_texture->GetHeight())); - g_gs_device->CopyRect(t->m_texture, rt, rc, 0, 0); - } - - g_texture_cache->InvalidateTemporarySource(); - return false; -} - bool GSHwHack::OI_HauntingGround(GSRendererHW& r, GSTexture* rt, GSTexture* ds, GSTextureCache::Source* t) { // Haunting Ground clears two targets by doing a direct colour write at 0x3000, covering a target at 0x3380. @@ -1409,7 +1372,6 @@ const GSHwHack::Entry GSHwHack::s_get_skip_count_function CRC_F(GSC_ZettaiZetsumeiToshi2), CRC_F(GSC_BlackAndBurnoutSky), CRC_F(GSC_BlueTongueGames), - CRC_F(GSC_Battlefield2), CRC_F(GSC_NFSUndercover), CRC_F(GSC_PolyphonyDigitalGames), CRC_F(GSC_MetalGearSolid3), @@ -1435,7 +1397,6 @@ const GSHwHack::Entry GSHwHack::s_before_draw_functions[] CRC_F(OI_SonicUnleashed), CRC_F(OI_ArTonelico2), CRC_F(OI_BurnoutGames), - CRC_F(OI_Battlefield2), CRC_F(OI_HauntingGround), }; diff --git a/pcsx2/GS/Renderers/HW/GSHwHack.h b/pcsx2/GS/Renderers/HW/GSHwHack.h index b604c7561d..f32ecbc7ef 100644 --- a/pcsx2/GS/Renderers/HW/GSHwHack.h +++ b/pcsx2/GS/Renderers/HW/GSHwHack.h @@ -24,7 +24,6 @@ public: static bool GSC_UrbanReign(GSRendererHW& r, int& skip); static bool GSC_SteambotChronicles(GSRendererHW& r, int& skip); static bool GSC_BlueTongueGames(GSRendererHW& r, int& skip); - static bool GSC_Battlefield2(GSRendererHW& r, int& skip); static bool GSC_NFSUndercover(GSRendererHW& r, int& skip); static bool GSC_PolyphonyDigitalGames(GSRendererHW& r, int& skip); static bool GSC_MetalGearSolid3(GSRendererHW& r, int& skip); @@ -36,7 +35,6 @@ public: static bool OI_SonicUnleashed(GSRendererHW& r, GSTexture* rt, GSTexture* ds, GSTextureCache::Source* t); static bool OI_ArTonelico2(GSRendererHW& r, GSTexture* rt, GSTexture* ds, GSTextureCache::Source* t); static bool OI_BurnoutGames(GSRendererHW& r, GSTexture* rt, GSTexture* ds, GSTextureCache::Source* t); - static bool OI_Battlefield2(GSRendererHW& r, GSTexture* rt, GSTexture* ds, GSTextureCache::Source* t); static bool OI_HauntingGround(GSRendererHW& r, GSTexture* rt, GSTexture* ds, GSTextureCache::Source* t); static bool MV_Growlanser(GSRendererHW& r);