GameDB-GS/HW: Remove Battlefield 2 CRC hacks, add Tex Inside RT instead

This commit is contained in:
refractionpcsx2 2025-01-25 20:36:32 +00:00
parent 25338fb4f2
commit b372cd9654
3 changed files with 20 additions and 67 deletions

View File

@ -3870,9 +3870,13 @@ SCED-52899:
SCED-52932: SCED-52932:
name: "Bonus Demo 8" name: "Bonus Demo 8"
region: "PAL-M5" region: "PAL-M5"
gsHWFixes:
textureInsideRT: 1 # Fixes shadows in TOCA Race Driver 2.
SCED-52933: SCED-52933:
name: "Bonus Demo 8" name: "Bonus Demo 8"
region: "PAL-M5" region: "PAL-M5"
gsHWFixes:
textureInsideRT: 1 # Fixes shadows in TOCA Race Driver 2.
SCED-52935: SCED-52935:
name: "SingStar Party [Demo]" name: "SingStar Party [Demo]"
region: "PAL-E" region: "PAL-E"
@ -3946,6 +3950,8 @@ SCED-52997:
SCED-53018: SCED-53018:
name: "Bonus Demo 8 (Geu)" name: "Bonus Demo 8 (Geu)"
region: "PAL-G" region: "PAL-G"
gsHWFixes:
textureInsideRT: 1 # Fixes shadows in TOCA Race Driver 2.
SCED-53043: SCED-53043:
name: "Magazine Ufficiale PlayStation 2 Speciale Platinum Italia" name: "Magazine Ufficiale PlayStation 2 Speciale Platinum Italia"
region: "PAL-I" region: "PAL-I"
@ -13553,8 +13559,7 @@ SLED-53731:
autoFlush: 1 # Post-processing. autoFlush: 1 # Post-processing.
halfPixelOffset: 2 # Offset post-processing. halfPixelOffset: 2 # Offset post-processing.
texturePreloading: 1 # Improves performance. texturePreloading: 1 # Improves performance.
getSkipCount: "GSC_Battlefield2" # Depth clear. textureInsideRT: 1 # Fixes per line drawing.
beforeDraw: "OI_Battlefield2" # Framebuffer copy, fixes rendering for bottom part of screen.
SLED-53732: SLED-53732:
name: "Spartan - Total Warrior [Demo]" name: "Spartan - Total Warrior [Demo]"
region: "PAL" region: "PAL"
@ -23492,8 +23497,7 @@ SLES-53729:
autoFlush: 1 # Post-processing. autoFlush: 1 # Post-processing.
halfPixelOffset: 2 # Offset post-processing. halfPixelOffset: 2 # Offset post-processing.
texturePreloading: 1 # Improves performance. texturePreloading: 1 # Improves performance.
getSkipCount: "GSC_Battlefield2" # Depth clear. textureInsideRT: 1 # Fixes per line drawing.
beforeDraw: "OI_Battlefield2" # Framebuffer copy, fixes rendering for bottom part of screen.
SLES-53730: SLES-53730:
name: "Battlefield 2 - Modern Combat" name: "Battlefield 2 - Modern Combat"
region: "PAL-M3" region: "PAL-M3"
@ -23502,8 +23506,7 @@ SLES-53730:
autoFlush: 1 # Post-processing. autoFlush: 1 # Post-processing.
halfPixelOffset: 2 # Offset post-processing. halfPixelOffset: 2 # Offset post-processing.
texturePreloading: 1 # Improves performance. texturePreloading: 1 # Improves performance.
getSkipCount: "GSC_Battlefield2" # Depth clear. textureInsideRT: 1 # Fixes per line drawing.
beforeDraw: "OI_Battlefield2" # Framebuffer copy, fixes rendering for bottom part of screen.
SLES-53734: SLES-53734:
name: "50 Cent - Bulletproof" name: "50 Cent - Bulletproof"
region: "PAL-E" region: "PAL-E"
@ -30871,13 +30874,11 @@ SLKA-25330:
name: "Battlefield 2 - Modern Combat" name: "Battlefield 2 - Modern Combat"
region: "NTSC-K" region: "NTSC-K"
gsHWFixes: gsHWFixes:
autoFlush: 2 # Post-processing. minimumBlendingLevel: 4 # Fixes ground texture rendering.
autoFlush: 1 # Post-processing.
halfPixelOffset: 2 # Offset post-processing. halfPixelOffset: 2 # Offset post-processing.
texturePreloading: 1 # Spikes all over the place otherwise. texturePreloading: 1 # Improves performance.
textureInsideRT: 1 # Fixes light shinging through objects. textureInsideRT: 1 # Fixes per line drawing.
cpuCLUTRender: 1 # Fixes light shining through objects.
getSkipCount: "GSC_Battlefield2" # Depth clear.
beforeDraw: "OI_Battlefield2" # Framebuffer copy, fixes rendering for bottom part of screen.
SLKA-25331: SLKA-25331:
name: "Marc Ecko's Getting Up - Contents Under Pressure" name: "Marc Ecko's Getting Up - Contents Under Pressure"
region: "NTSC-K" region: "NTSC-K"
@ -31742,8 +31743,7 @@ SLPM-55034:
autoFlush: 1 # Post-processing. autoFlush: 1 # Post-processing.
halfPixelOffset: 2 # Offset post-processing. halfPixelOffset: 2 # Offset post-processing.
texturePreloading: 1 # Improves performance. texturePreloading: 1 # Improves performance.
getSkipCount: "GSC_Battlefield2" # Depth clear. textureInsideRT: 1 # Fixes per line drawing.
beforeDraw: "OI_Battlefield2" # Framebuffer copy, fixes rendering for bottom part of screen.
SLPM-55035: SLPM-55035:
name: "ファイトナイト ラウンド2 [EA:SY! 1980]" name: "ファイトナイト ラウンド2 [EA:SY! 1980]"
name-sort: "ふぁいとないと らうんど2 [EA:SY! 1980]" name-sort: "ふぁいとないと らうんど2 [EA:SY! 1980]"
@ -45797,8 +45797,7 @@ SLPM-66206:
autoFlush: 1 # Post-processing. autoFlush: 1 # Post-processing.
halfPixelOffset: 2 # Offset post-processing. halfPixelOffset: 2 # Offset post-processing.
texturePreloading: 1 # Improves performance. texturePreloading: 1 # Improves performance.
getSkipCount: "GSC_Battlefield2" # Depth clear. textureInsideRT: 1 # Fixes per line drawing.
beforeDraw: "OI_Battlefield2" # Framebuffer copy, fixes rendering for bottom part of screen.
SLPM-66207: SLPM-66207:
name: "どろろ [SEGA THE BEST 2800]" name: "どろろ [SEGA THE BEST 2800]"
name-sort: "どろろ [SEGA THE BEST 2800]" name-sort: "どろろ [SEGA THE BEST 2800]"
@ -48574,8 +48573,7 @@ SLPM-66651:
autoFlush: 1 # Post-processing. autoFlush: 1 # Post-processing.
halfPixelOffset: 2 # Offset post-processing. halfPixelOffset: 2 # Offset post-processing.
texturePreloading: 1 # Improves performance. texturePreloading: 1 # Improves performance.
getSkipCount: "GSC_Battlefield2" # Depth clear. textureInsideRT: 1 # Fixes per line drawing.
beforeDraw: "OI_Battlefield2" # Framebuffer copy, fixes rendering for bottom part of screen.
SLPM-66652: SLPM-66652:
name: "バーンアウト リベンジ [EA BEST HITS]" name: "バーンアウト リベンジ [EA BEST HITS]"
name-sort: "ばーんあうと りべんじ [EA BEST HITS]" name-sort: "ばーんあうと りべんじ [EA BEST HITS]"
@ -66406,8 +66404,7 @@ SLUS-21026:
autoFlush: 1 # Post-processing. autoFlush: 1 # Post-processing.
halfPixelOffset: 2 # Offset post-processing. halfPixelOffset: 2 # Offset post-processing.
texturePreloading: 1 # Improves performance. texturePreloading: 1 # Improves performance.
getSkipCount: "GSC_Battlefield2" # Depth clear. textureInsideRT: 1 # Fixes per line drawing.
beforeDraw: "OI_Battlefield2" # Framebuffer copy, fixes rendering for bottom part of screen.
SLUS-21027: SLUS-21027:
name: "The Lord of the Rings - The Third Age" name: "The Lord of the Rings - The Third Age"
name-sort: "Lord of the Rings, The - The Third Age" name-sort: "Lord of the Rings, The - The Third Age"
@ -72291,8 +72288,7 @@ SLUS-29117:
autoFlush: 1 # Post-processing. autoFlush: 1 # Post-processing.
halfPixelOffset: 2 # Offset post-processing. halfPixelOffset: 2 # Offset post-processing.
texturePreloading: 1 # Improves performance. texturePreloading: 1 # Improves performance.
getSkipCount: "GSC_Battlefield2" # Depth clear. textureInsideRT: 1 # Fixes per line drawing.
beforeDraw: "OI_Battlefield2" # Framebuffer copy, fixes rendering for bottom part of screen.
SLUS-29118: SLUS-29118:
name: "Need for Speed - Underground 2 [Demo]" name: "Need for Speed - Underground 2 [Demo]"
region: "NTSC-U" region: "NTSC-U"
@ -72444,8 +72440,7 @@ SLUS-29152:
autoFlush: 1 # Post-processing. autoFlush: 1 # Post-processing.
halfPixelOffset: 2 # Offset post-processing. halfPixelOffset: 2 # Offset post-processing.
texturePreloading: 1 # Improves performance. texturePreloading: 1 # Improves performance.
getSkipCount: "GSC_Battlefield2" # Depth clear. textureInsideRT: 1 # Fixes per line drawing.
beforeDraw: "OI_Battlefield2" # Framebuffer copy, fixes rendering for bottom part of screen.
SLUS-29153: SLUS-29153:
name: "Burnout Revenge [Demo]" name: "Burnout Revenge [Demo]"
region: "NTSC-U" region: "NTSC-U"
@ -72560,8 +72555,7 @@ SLUS-29172:
autoFlush: 1 # Post-processing. autoFlush: 1 # Post-processing.
halfPixelOffset: 2 # Offset post-processing. halfPixelOffset: 2 # Offset post-processing.
texturePreloading: 1 # Improves performance. texturePreloading: 1 # Improves performance.
getSkipCount: "GSC_Battlefield2" # Depth clear. textureInsideRT: 1 # Fixes per line drawing.
beforeDraw: "OI_Battlefield2" # Framebuffer copy, fixes rendering for bottom part of screen.
SLUS-29173: SLUS-29173:
name: "The Sims 2 [Demo]" name: "The Sims 2 [Demo]"
name-sort: "Sims 2, The [Demo]" name-sort: "Sims 2, The [Demo]"

View File

@ -1078,43 +1078,6 @@ bool GSHwHack::OI_BurnoutGames(GSRendererHW& r, GSTexture* rt, GSTexture* ds, GS
return false; 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) 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. // 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<GSRendererHW::GSC_Ptr> GSHwHack::s_get_skip_count_function
CRC_F(GSC_ZettaiZetsumeiToshi2), CRC_F(GSC_ZettaiZetsumeiToshi2),
CRC_F(GSC_BlackAndBurnoutSky), CRC_F(GSC_BlackAndBurnoutSky),
CRC_F(GSC_BlueTongueGames), CRC_F(GSC_BlueTongueGames),
CRC_F(GSC_Battlefield2),
CRC_F(GSC_NFSUndercover), CRC_F(GSC_NFSUndercover),
CRC_F(GSC_PolyphonyDigitalGames), CRC_F(GSC_PolyphonyDigitalGames),
CRC_F(GSC_MetalGearSolid3), CRC_F(GSC_MetalGearSolid3),
@ -1435,7 +1397,6 @@ const GSHwHack::Entry<GSRendererHW::OI_Ptr> GSHwHack::s_before_draw_functions[]
CRC_F(OI_SonicUnleashed), CRC_F(OI_SonicUnleashed),
CRC_F(OI_ArTonelico2), CRC_F(OI_ArTonelico2),
CRC_F(OI_BurnoutGames), CRC_F(OI_BurnoutGames),
CRC_F(OI_Battlefield2),
CRC_F(OI_HauntingGround), CRC_F(OI_HauntingGround),
}; };

View File

@ -24,7 +24,6 @@ public:
static bool GSC_UrbanReign(GSRendererHW& r, int& skip); static bool GSC_UrbanReign(GSRendererHW& r, int& skip);
static bool GSC_SteambotChronicles(GSRendererHW& r, int& skip); static bool GSC_SteambotChronicles(GSRendererHW& r, int& skip);
static bool GSC_BlueTongueGames(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_NFSUndercover(GSRendererHW& r, int& skip);
static bool GSC_PolyphonyDigitalGames(GSRendererHW& r, int& skip); static bool GSC_PolyphonyDigitalGames(GSRendererHW& r, int& skip);
static bool GSC_MetalGearSolid3(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_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_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_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 OI_HauntingGround(GSRendererHW& r, GSTexture* rt, GSTexture* ds, GSTextureCache::Source* t);
static bool MV_Growlanser(GSRendererHW& r); static bool MV_Growlanser(GSRendererHW& r);