From 38bf91623117f1e77b39302ed632753cda1c919f Mon Sep 17 00:00:00 2001 From: refractionpcsx2 Date: Sun, 2 Apr 2023 18:10:06 +0100 Subject: [PATCH] GS: Update fixes for Sacred Blaze --- bin/resources/GameIndex.yaml | 2 ++ pcsx2/GS/Renderers/HW/GSHwHack.cpp | 10 ++++++++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/bin/resources/GameIndex.yaml b/bin/resources/GameIndex.yaml index 43b349d1e8..28a12263f8 100644 --- a/bin/resources/GameIndex.yaml +++ b/bin/resources/GameIndex.yaml @@ -40890,6 +40890,8 @@ SLPS-25917: name: "Sacred Blaze" region: "NTSC-J" gsHWFixes: + cpuSpriteRenderBW: 1 # Fixes half screen effects. + cpuSpriteRenderLevel: 1 # Needed for above. getSkipCount: "GSC_SacredBlaze" SLPS-25922: name: "Vitamin Z [Limited Edition]" diff --git a/pcsx2/GS/Renderers/HW/GSHwHack.cpp b/pcsx2/GS/Renderers/HW/GSHwHack.cpp index ddb016fd5b..5942c121bc 100644 --- a/pcsx2/GS/Renderers/HW/GSHwHack.cpp +++ b/pcsx2/GS/Renderers/HW/GSHwHack.cpp @@ -110,11 +110,17 @@ bool GSHwHack::GSC_Manhunt2(GSRendererHW& r, const GSFrameInfo& fi, int& skip) bool GSHwHack::GSC_SacredBlaze(GSRendererHW& r, const GSFrameInfo& fi, int& skip) { - //Fix Sacred Blaze rendering glitches + // Fix Sacred Blaze rendering glitches. + // The game renders a mask for the glow effect during battles, but it offsets the target, something the TC doesn't support. + // So let's throw it at the SW renderer to deal with. if (skip == 0) { - if (fi.TME && (fi.FBP == 0x0000 || fi.FBP == 0x0e00) && (fi.TBP0 == 0x2880 || fi.TBP0 == 0x2a80) && fi.FPSM == fi.TPSM && fi.TPSM == PSM_PSMCT32 && fi.FBMSK == 0x0) + const GIFRegFRAME& FRAME = RCONTEXT->FRAME; + + if ((fi.FBP == 0x2680 || fi.FBP == 0x26c0 || fi.FBP == 0x2780 || fi.FBP == 0x2880 || fi.FBP == 0x2a80) && fi.TPSM == PSM_PSMCT32 && FRAME.FBW <= 2 && + (!fi.TME || (fi.TBP0 == 0x0 || fi.TBP0 == 0xe00 || fi.TBP0 == 0x3e00))) { + r.SwPrimRender(r, fi.TBP0 > 0x1000); skip = 1; } }