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 894e3462e8
commit 266d97e957
3 changed files with 20 additions and 67 deletions

View File

@ -3887,9 +3887,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"
@ -3963,6 +3967,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"
@ -13614,8 +13620,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"
@ -23615,8 +23620,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"
@ -23625,8 +23629,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"
@ -31298,13 +31301,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"
@ -32192,8 +32193,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]"
@ -46304,8 +46304,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]"
@ -49096,8 +49095,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]"
@ -66987,8 +66985,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"
@ -72940,8 +72937,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"
@ -73093,8 +73089,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"
@ -73209,8 +73204,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]"

View File

@ -1142,43 +1142,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.
@ -1474,7 +1437,6 @@ const GSHwHack::Entry<GSRendererHW::GSC_Ptr> 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),
@ -1500,7 +1462,6 @@ const GSHwHack::Entry<GSRendererHW::OI_Ptr> 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),
};

View File

@ -25,7 +25,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);
@ -37,7 +36,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);