GS/HW: Adjust Barnyard fix for Jurassic Park and Nicktoons Unite

Draws its mipmaps at runtime in a very similar way, except with 24-bit
textures as well as 16/32-bit.
This commit is contained in:
Stenzek 2023-01-10 00:37:19 +10:00 committed by refractionpcsx2
parent fa75006ca9
commit 4cf7a1086d
3 changed files with 42 additions and 25 deletions

View File

@ -5308,7 +5308,7 @@ SCKA-20096:
halfPixelOffset: 2 # Fix text and post blur. halfPixelOffset: 2 # Fix text and post blur.
mipmap: 2 # Base mip level isn't always used. mipmap: 2 # Base mip level isn't always used.
autoFlush: 1 # Needed for recursive mipmap rendering. autoFlush: 1 # Needed for recursive mipmap rendering.
getSkipCount: "GSC_Barnyard" # Render mipmaps on the CPU. getSkipCount: "GSC_BlueTongueGames" # Render mipmaps on the CPU.
SCKA-20098: SCKA-20098:
name: "Nickelodeon SpongeBob SquarePants - Creature from the Krusty Krab" name: "Nickelodeon SpongeBob SquarePants - Creature from the Krusty Krab"
region: "NTSC-K" region: "NTSC-K"
@ -12484,9 +12484,11 @@ SLES-51354:
region: "PAL-M5" region: "PAL-M5"
compat: 5 compat: 5
gsHWFixes: gsHWFixes:
autoFlush: 1 # Fixes glows. autoFlush: 1 # Fixes glows. Also needed for recursive mipmap rendering.
mipmap: 1 # Better characters and environment but has a texture cache issue that makes it worse. mipmap: 2 # Better characters and environment but has a texture cache issue that makes it worse.
trilinearFiltering: 1 # Using mipmaps, so may as well.
textureInsideRT: 1 # Fixes rainbow lighting for some areas. textureInsideRT: 1 # Fixes rainbow lighting for some areas.
getSkipCount: "GSC_BlueTongueGames" # Mipmap rendering on CPU.
SLES-51355: SLES-51355:
name: "Big Mutha Truckers" name: "Big Mutha Truckers"
region: "PAL-M5" region: "PAL-M5"
@ -17729,9 +17731,11 @@ SLES-53634:
name: "Nicktoons Unite!" name: "Nicktoons Unite!"
region: "PAL-A" region: "PAL-A"
gsHWFixes: gsHWFixes:
autoFlush: 1 # Fixes glows. autoFlush: 1 # Fixes glows. Also needed for recursive mipmap rendering.
mipmap: 1 # Better characters and environment but has a texture cache issue that makes it worse. mipmap: 2 # Better characters and environment but has a texture cache issue that makes it worse.
textureInsideRT: 1 # Fixes rainbow lighting for lamps, computer and other areas. trilinearFiltering: 1 # Using mipmaps, so may as well.
textureInsideRT: 1 # Fixes rainbow lighting for some areas.
getSkipCount: "GSC_BlueTongueGames" # Mipmap rendering on CPU.
SLES-53635: SLES-53635:
name: "NASCAR '06 - Total Team Control" name: "NASCAR '06 - Total Team Control"
region: "PAL-E" region: "PAL-E"
@ -19600,7 +19604,7 @@ SLES-54376:
halfPixelOffset: 2 # Fix text and post blur. halfPixelOffset: 2 # Fix text and post blur.
mipmap: 2 # Base mip level isn't always used. mipmap: 2 # Base mip level isn't always used.
autoFlush: 1 # Needed for recursive mipmap rendering. autoFlush: 1 # Needed for recursive mipmap rendering.
getSkipCount: "GSC_Barnyard" # Render mipmaps on the CPU. getSkipCount: "GSC_BlueTongueGames" # Render mipmaps on the CPU.
SLES-54377: SLES-54377:
name: "Barnyard" name: "Barnyard"
region: "PAL-G" region: "PAL-G"
@ -19608,7 +19612,7 @@ SLES-54377:
halfPixelOffset: 2 # Fix text and post blur. halfPixelOffset: 2 # Fix text and post blur.
mipmap: 2 # Base mip level isn't always used. mipmap: 2 # Base mip level isn't always used.
autoFlush: 1 # Needed for recursive mipmap rendering. autoFlush: 1 # Needed for recursive mipmap rendering.
getSkipCount: "GSC_Barnyard" # Render mipmaps on the CPU. getSkipCount: "GSC_BlueTongueGames" # Render mipmaps on the CPU.
SLES-54378: SLES-54378:
name: "Barnyard" name: "Barnyard"
region: "PAL-M4" region: "PAL-M4"
@ -19616,7 +19620,7 @@ SLES-54378:
halfPixelOffset: 2 # Fix text and post blur. halfPixelOffset: 2 # Fix text and post blur.
mipmap: 2 # Base mip level isn't always used. mipmap: 2 # Base mip level isn't always used.
autoFlush: 1 # Needed for recursive mipmap rendering. autoFlush: 1 # Needed for recursive mipmap rendering.
getSkipCount: "GSC_Barnyard" # Render mipmaps on the CPU. getSkipCount: "GSC_BlueTongueGames" # Render mipmaps on the CPU.
SLES-54379: SLES-54379:
name: "NFL Street 3" name: "NFL Street 3"
region: "PAL-E" region: "PAL-E"
@ -25967,6 +25971,12 @@ SLPM-62345:
SLPM-62346: SLPM-62346:
name: "Keiei Simulation - Jurassic Park [Konami the Best]" name: "Keiei Simulation - Jurassic Park [Konami the Best]"
region: "NTSC-J" region: "NTSC-J"
gsHWFixes:
autoFlush: 1 # Fixes glows. Also needed for recursive mipmap rendering.
mipmap: 2 # Better characters and environment but has a texture cache issue that makes it worse.
trilinearFiltering: 1 # Using mipmaps, so may as well.
textureInsideRT: 1 # Fixes rainbow lighting for some areas.
getSkipCount: "GSC_BlueTongueGames" # Mipmap rendering on CPU.
SLPM-62348: SLPM-62348:
name: "Mechsmith, The - Rum" name: "Mechsmith, The - Rum"
region: "NTSC-J" region: "NTSC-J"
@ -26443,9 +26453,11 @@ SLPM-62512:
name: "Keiei Simulation - Jurassic Park [Konami The Best]" name: "Keiei Simulation - Jurassic Park [Konami The Best]"
region: "NTSC-J" region: "NTSC-J"
gsHWFixes: gsHWFixes:
autoFlush: 1 # Fixes glows. autoFlush: 1 # Fixes glows. Also needed for recursive mipmap rendering.
mipmap: 1 # Better characters and environment but has a texture cache issue that makes it worse. mipmap: 2 # Better characters and environment but has a texture cache issue that makes it worse.
trilinearFiltering: 1 # Using mipmaps, so may as well.
textureInsideRT: 1 # Fixes rainbow lighting for some areas. textureInsideRT: 1 # Fixes rainbow lighting for some areas.
getSkipCount: "GSC_BlueTongueGames" # Mipmap rendering on CPU.
SLPM-62513: SLPM-62513:
name: "Harry Potter and the Chamber of Secrets [EA Best Hits]" name: "Harry Potter and the Chamber of Secrets [EA Best Hits]"
region: "NTSC-J" region: "NTSC-J"
@ -41933,9 +41945,11 @@ SLUS-20380:
name: "Jurassic Park - Operation Genesis" name: "Jurassic Park - Operation Genesis"
region: "NTSC-U" region: "NTSC-U"
gsHWFixes: gsHWFixes:
autoFlush: 1 # Fixes glows. autoFlush: 1 # Fixes glows. Also needed for recursive mipmap rendering.
mipmap: 1 # Better characters and environment but has a texture cache issue that makes it worse. mipmap: 2 # Better characters and environment but has a texture cache issue that makes it worse.
trilinearFiltering: 1 # Using mipmaps, so may as well.
textureInsideRT: 1 # Fixes rainbow lighting for some areas. textureInsideRT: 1 # Fixes rainbow lighting for some areas.
getSkipCount: "GSC_BlueTongueGames" # Mipmap rendering on CPU.
SLUS-20381: SLUS-20381:
name: "MX SuperFly" name: "MX SuperFly"
region: "NTSC-U" region: "NTSC-U"
@ -46462,7 +46476,7 @@ SLUS-21277:
halfPixelOffset: 2 # Fix text and post blur. halfPixelOffset: 2 # Fix text and post blur.
mipmap: 2 # Base mip level isn't always used. mipmap: 2 # Base mip level isn't always used.
autoFlush: 1 # Needed for recursive mipmap rendering. autoFlush: 1 # Needed for recursive mipmap rendering.
getSkipCount: "GSC_Barnyard" # Render mipmaps on the CPU. getSkipCount: "GSC_BlueTongueGames" # Render mipmaps on the CPU.
SLUS-21278: SLUS-21278:
name: "SSX on Tour" name: "SSX on Tour"
region: "NTSC-U" region: "NTSC-U"
@ -46493,9 +46507,11 @@ SLUS-21284:
name: "Nicktoons Unite!" name: "Nicktoons Unite!"
region: "NTSC-U" region: "NTSC-U"
gsHWFixes: gsHWFixes:
autoFlush: 1 # Fixes glows. autoFlush: 1 # Fixes glows. Also needed for recursive mipmap rendering.
mipmap: 1 # Better characters and environment but has a texture cache issue that makes it worse. mipmap: 2 # Better characters and environment but has a texture cache issue that makes it worse.
textureInsideRT: 1 # Fixes rainbow lighting for lamps, computer and other areas. trilinearFiltering: 1 # Using mipmaps, so may as well.
textureInsideRT: 1 # Fixes rainbow lighting for some areas.
getSkipCount: "GSC_BlueTongueGames" # Mipmap rendering on CPU.
SLUS-21285: SLUS-21285:
name: "Ultimate Spider-Man [Limited Edition]" name: "Ultimate Spider-Man [Limited Edition]"
region: "NTSC-U" region: "NTSC-U"

View File

@ -802,23 +802,24 @@ bool GSHwHack::GSC_XenosagaE3(GSRendererHW& r, const GSFrameInfo& fi, int& skip)
return true; return true;
} }
bool GSHwHack::GSC_Barnyard(GSRendererHW& r, const GSFrameInfo& fi, int& skip) bool GSHwHack::GSC_BlueTongueGames(GSRendererHW& r, const GSFrameInfo& fi, int& skip)
{ {
GSDrawingContext* context = r.m_context; GSDrawingContext* context = r.m_context;
// Whoever wrote this was kinda nuts. They draw a stipple/dither pattern to a framebuffer, then reuse that as // Whoever wrote this was kinda nuts. They draw a stipple/dither pattern to a framebuffer, then reuse that as
// the depth buffer. Textures are then drawn repeatedly on top of one another, each with a slight offset. // the depth buffer. Textures are then drawn repeatedly on top of one another, each with a slight offset.
// Depth testing is enabled, and that determines which pixels make it into the final texture. Kinda like an // Depth testing is enabled, and that determines which pixels make it into the final texture. Kinda like an
// attempt at anti-aliasing or adding more detail to the textures? // attempt at anti-aliasing or adding more detail to the textures? Or, a way to get more colours..
// The size of these textures varies quite a bit. 16-bit, 24-bit and 32-bit formats are all used. // The size of these textures varies quite a bit. 16-bit, 24-bit and 32-bit formats are all used.
// The ones we need to take care of here, are the textures which use mipmaps. Those get drawn recursively, mip // The ones we need to take care of here, are the textures which use mipmaps. Those get drawn recursively, mip
// levels are then drawn to the right of the base texture. And we can't handle that in the texture cache. So // levels are then drawn to the right of the base texture. And we can't handle that in the texture cache. So
// we'll limit to 16/32-bit, going up to 320 wide. Some font textures are 1024x1024, we don't really want to // we'll limit to 16/24/32-bit, going up to 320 wide. Some font textures are 1024x1024, we don't really want
// be rasterizing that on the CPU. // to be rasterizing that on the CPU.
// Catch the mipmap draws. // Catch the mipmap draws. Barnyard only uses 16/32-bit, Jurassic Park uses 24-bit.
if ((context->FRAME.PSM == PSM_PSMCT16S || context->FRAME.PSM == PSM_PSMCT32) && context->FRAME.FBW <= 5) // Also used for Nicktoons Unite, same engine it appears.
if ((context->FRAME.PSM == PSM_PSMCT16S || context->FRAME.PSM <= PSM_PSMCT24) && context->FRAME.FBW <= 5)
{ {
r.SwPrimRender(r, true); r.SwPrimRender(r, true);
skip = 1; skip = 1;
@ -1276,7 +1277,7 @@ const GSHwHack::Entry<GSRendererHW::GSC_Ptr> GSHwHack::s_get_skip_count_function
CRC_F(GSC_UrbanReign, CRCHackLevel::Partial), CRC_F(GSC_UrbanReign, CRCHackLevel::Partial),
CRC_F(GSC_ZettaiZetsumeiToshi2, CRCHackLevel::Partial), CRC_F(GSC_ZettaiZetsumeiToshi2, CRCHackLevel::Partial),
CRC_F(GSC_BlackAndBurnoutSky, CRCHackLevel::Partial), CRC_F(GSC_BlackAndBurnoutSky, CRCHackLevel::Partial),
CRC_F(GSC_Barnyard, CRCHackLevel::Partial), CRC_F(GSC_BlueTongueGames, CRCHackLevel::Partial),
CRC_F(GSC_Battlefield2, CRCHackLevel::Partial), CRC_F(GSC_Battlefield2, CRCHackLevel::Partial),
// Channel Effect // Channel Effect

View File

@ -55,7 +55,7 @@ public:
static bool GSC_RedDeadRevolver(GSRendererHW& r, const GSFrameInfo& fi, int& skip); static bool GSC_RedDeadRevolver(GSRendererHW& r, const GSFrameInfo& fi, int& skip);
static bool GSC_ShinOnimusha(GSRendererHW& r, const GSFrameInfo& fi, int& skip); static bool GSC_ShinOnimusha(GSRendererHW& r, const GSFrameInfo& fi, int& skip);
static bool GSC_XenosagaE3(GSRendererHW& r, const GSFrameInfo& fi, int& skip); static bool GSC_XenosagaE3(GSRendererHW& r, const GSFrameInfo& fi, int& skip);
static bool GSC_Barnyard(GSRendererHW& r, const GSFrameInfo& fi, int& skip); static bool GSC_BlueTongueGames(GSRendererHW& r, const GSFrameInfo& fi, int& skip);
static bool GSC_Battlefield2(GSRendererHW& r, const GSFrameInfo& fi, int& skip); static bool GSC_Battlefield2(GSRendererHW& r, const GSFrameInfo& fi, int& skip);
static bool OI_PointListPalette(GSRendererHW& r, GSTexture* rt, GSTexture* ds, GSTextureCache::Source* t); static bool OI_PointListPalette(GSRendererHW& r, GSTexture* rt, GSTexture* ds, GSTextureCache::Source* t);