From 3acac3203b320dc6f09507f6e727dea3834bb775 Mon Sep 17 00:00:00 2001 From: FlatOutPS2 Date: Thu, 12 Jan 2017 01:27:03 +0100 Subject: [PATCH] GSdx: Remove/move CRC hacks Removes Alpine Racer 3 hack. Issue has been resolved. Moves NanoBreaker hack. Issue has been resolved for OpenGL and hack has been moved to DX only. Moves Tri-Ace games hacks. Hacks are also necessary for OpenGL with "Partial" CRC Hack Level to prevent massive slowdown. Move Tales Of Legendia hack back as it's also necessary for OpenGL with "Partial" CRC Hack Level to prevent graphical issues. Close: https://github.com/PCSX2/pcsx2/issues/1698 Added PAL and NTSC-U CRC's for Ar tonelico II. --- plugins/GSdx/GSCrc.cpp | 4 +- plugins/GSdx/GSCrc.h | 1 - plugins/GSdx/GSHwHack.cpp | 69 ++++++++++++++--------------------- plugins/GSdx/GSRendererHW.cpp | 2 +- 4 files changed, 31 insertions(+), 45 deletions(-) diff --git a/plugins/GSdx/GSCrc.cpp b/plugins/GSdx/GSCrc.cpp index 4d97b33afa..4af4ea80b4 100644 --- a/plugins/GSdx/GSCrc.cpp +++ b/plugins/GSdx/GSCrc.cpp @@ -27,6 +27,8 @@ CRC::Game CRC::m_games[] = { {0x00000000, NoTitle, NoRegion, 0}, {0xF46142D3, ArTonelico2, NoRegion, 0}, + {0xF95F37EE, ArTonelico2, US, 0}, + {0xCE2C1DBF, ArTonelico2, EU, 0}, {0x2113EA2E, MetalSlug6, JP, 0}, {0x42E05BAF, TomoyoAfter, JP, PointListPalette}, {0x7800DC84, Clannad, JP, PointListPalette}, @@ -474,8 +476,6 @@ CRC::Game CRC::m_games[] = {0xF7F181C3, DeathByDegreesTekkenNinaWilliams, CH, 0}, // cutie comment {0xF088FA5B, DeathByDegreesTekkenNinaWilliams, KO, 0}, {0x59683BB0, DeathByDegreesTekkenNinaWilliams, EU, 0}, - {0x771C3B47, AlpineRacer3, JP, 0}, // cutie comment - {0x7367D841, AlpineRacer3, EU, 0}, {0x449E1F6B, HummerBadlands, US, 0}, {0xAEA1B3AD, SengokuBasara, JP, 0}, {0x5B659BED, Grandia3, JP, 0}, diff --git a/plugins/GSdx/GSCrc.h b/plugins/GSdx/GSCrc.h index fb19575af0..ac599d0821 100644 --- a/plugins/GSdx/GSCrc.h +++ b/plugins/GSdx/GSCrc.h @@ -28,7 +28,6 @@ public: { NoTitle, AceCombat4, - AlpineRacer3, ArTonelico2, BigMuthaTruckers, Black, diff --git a/plugins/GSdx/GSHwHack.cpp b/plugins/GSdx/GSHwHack.cpp index 54f8d5e5e1..e3b57c182a 100644 --- a/plugins/GSdx/GSHwHack.cpp +++ b/plugins/GSdx/GSHwHack.cpp @@ -765,14 +765,30 @@ bool GSC_MidnightClub3(const GSFrameInfo& fi, int& skip) return true; } -bool GSC_NanoBreaker(const GSFrameInfo& fi, int& skip) +bool GSC_TalesOfLegendia(const GSFrameInfo& fi, int& skip) { if(skip == 0) { - if(fi.TME && fi.FBP == 0x0 && fi.FPSM == PSM_PSMCT32 && (fi.TBP0 == 0x03800 || fi.TBP0 == 0x03900) && fi.TPSM == PSM_PSMCT16S) + if(fi.TME && (fi.FBP == 0x3f80 || fi.FBP == 0x03fa0) && fi.FPSM == PSM_PSMCT32 && fi.TPSM == PSM_PSMT8) + { + skip = 3; //3, 9 + } + if(fi.TME && fi.FBP == 0x3800 && fi.FPSM == PSM_PSMCT32 && fi.TPSM == PSM_PSMZ32) { skip = 2; } + if(fi.TME && fi.FBP && fi.FPSM == PSM_PSMCT32 && fi.TBP0 == 0x3d80) + { + skip = 1; + } + if(fi.TME && fi.FBP ==0x1c00 && (fi.TBP0==0x2e80 ||fi.TBP0==0x2d80) && fi.TPSM ==0 && fi.FBMSK == 0xff000000) + { + skip = 1; + } + if(!fi.TME && fi.FBP ==0x2a00 && (fi.TBP0==0x1C00 ) && fi.TPSM ==0 && fi.FBMSK == 0x00FFFFFF) + { + skip = 1; + } } return true; @@ -1050,19 +1066,6 @@ bool GSC_UltramanFightingEvolution(const GSFrameInfo& fi, int& skip) return true; } -bool GSC_AlpineRacer3(const GSFrameInfo& fi, int& skip) -{ - if(skip == 0) - { - if(!fi.TME && fi.FBP == 0 && (fi.FBMSK ==0x0001 ||fi.FBMSK == 0x00FFFFFF)) - { - skip = 2; - } - } - - return true; -} - bool GSC_HummerBadlands(const GSFrameInfo& fi, int& skip) { if(skip == 0) @@ -1248,30 +1251,14 @@ bool GSC_HauntingGround(const GSFrameInfo& fi, int& skip) return true; } -bool GSC_TalesOfLegendia(const GSFrameInfo& fi, int& skip) +bool GSC_NanoBreaker(const GSFrameInfo& fi, int& skip) { if(skip == 0) { - if(fi.TME && (fi.FBP == 0x3f80 || fi.FBP == 0x03fa0) && fi.FPSM == PSM_PSMCT32 && fi.TPSM == PSM_PSMT8) - { - skip = 3; //3, 9 - } - if(fi.TME && fi.FBP == 0x3800 && fi.FPSM == PSM_PSMCT32 && fi.TPSM == PSM_PSMZ32) + if(fi.TME && fi.FBP == 0x0 && fi.FPSM == PSM_PSMCT32 && (fi.TBP0 == 0x03800 || fi.TBP0 == 0x03900) && fi.TPSM == PSM_PSMCT16S) { skip = 2; } - if(fi.TME && fi.FBP && fi.FPSM == PSM_PSMCT32 && fi.TBP0 == 0x3d80) - { - skip = 1; - } - if(fi.TME && fi.FBP ==0x1c00 && (fi.TBP0==0x2e80 ||fi.TBP0==0x2d80) && fi.TPSM ==0 && fi.FBMSK == 0xff000000) - { - skip = 1; - } - if(!fi.TME && fi.FBP ==0x2a00 && (fi.TBP0==0x1C00 ) && fi.TPSM ==0 && fi.FBMSK == 0x00FFFFFF) - { - skip = 1; - } } return true; @@ -2438,7 +2425,6 @@ void GSState::SetupCrcHack() if (s_crc_hack_level > 1) { lut[CRC::AceCombat4] = GSC_AceCombat4; - lut[CRC::AlpineRacer3] = GSC_AlpineRacer3; lut[CRC::BlackHawkDown] = GSC_BlackHawkDown; lut[CRC::BleachBladeBattlers] = GSC_BleachBladeBattlers; lut[CRC::BurnoutDominator] = GSC_Burnout; @@ -2468,7 +2454,6 @@ void GSState::SetupCrcHack() lut[CRC::LordOfTheRingsThirdAge] = GSC_LordOfTheRingsThirdAge; lut[CRC::Manhunt2] = GSC_Manhunt2; lut[CRC::MidnightClub3] = GSC_MidnightClub3; - lut[CRC::NanoBreaker] = GSC_NanoBreaker; lut[CRC::NarutimateAccel] = GSC_NarutimateAccel; lut[CRC::Naruto] = GSC_Naruto; lut[CRC::Oneechanbara2Special] = GSC_Oneechanbara2Special; @@ -2486,6 +2471,7 @@ void GSState::SetupCrcHack() lut[CRC::Spartan] = GSC_Spartan; lut[CRC::StarWarsForceUnleashed] = GSC_StarWarsForceUnleashed; lut[CRC::SteambotChronicles] = GSC_SteambotChronicles; + lut[CRC::TalesOfLegendia] = GSC_TalesOfLegendia; lut[CRC::TalesofSymphonia] = GSC_TalesofSymphonia; lut[CRC::TimeSplitters2] = GSC_TimeSplitters2; lut[CRC::TombRaiderAnniversary] = GSC_TombRaider; @@ -2498,6 +2484,10 @@ void GSState::SetupCrcHack() lut[CRC::Yakuza2] = GSC_Yakuza2; lut[CRC::Yakuza] = GSC_Yakuza; lut[CRC::ZettaiZetsumeiToshi2] = GSC_ZettaiZetsumeiToshi2; + // These games emulate a stencil buffer with the alpha channel of the RT (too slow to move to DX only) + lut[CRC::RadiataStories] = GSC_RadiataStories; + lut[CRC::StarOcean3] = GSC_StarOcean3; + lut[CRC::ValkyrieProfile2] = GSC_ValkyrieProfile2; // Only Aggresive lut[CRC::FFX2] = GSC_FFX2; lut[CRC::FFX] = GSC_FFX; @@ -2521,7 +2511,6 @@ void GSState::SetupCrcHack() lut[CRC::ResidentEvil4] = GSC_ResidentEvil4; lut[CRC::SimpsonsGame] = GSC_SimpsonsGame; lut[CRC::SuikodenTactics] = GSC_SuikodenTactics; - lut[CRC::TalesOfLegendia] = GSC_TalesOfLegendia; lut[CRC::XE3] = GSC_XE3; // Depth + Texture cache issue + Date (AKA a real mess) @@ -2550,11 +2539,6 @@ void GSState::SetupCrcHack() lut[CRC::CastlevaniaLoI] = GSC_Castlevania; lut[CRC::GodOfWar] = GSC_GodOfWar; - // Those games emulate a stencil buffer with the alpha channel of the RT (Slow) - lut[CRC::RadiataStories] = GSC_RadiataStories; - lut[CRC::StarOcean3] = GSC_StarOcean3; - lut[CRC::ValkyrieProfile2] = GSC_ValkyrieProfile2; - // Deprecated hack could be removed (Cutie) lut[CRC::Grandia3] = GSC_Grandia3; @@ -2579,6 +2563,9 @@ void GSState::SetupCrcHack() // RW frame buffer. UserHacks_AutoFlush allow to emulate it correctly lut[CRC::GTASanAndreas] = GSC_GTASanAndreas; + + // Accumulation blend + lut[CRC::NanoBreaker] = GSC_NanoBreaker; } m_gsc = lut[m_game.title]; diff --git a/plugins/GSdx/GSRendererHW.cpp b/plugins/GSdx/GSRendererHW.cpp index 4b8e3f3097..6b3ded2052 100644 --- a/plugins/GSdx/GSRendererHW.cpp +++ b/plugins/GSdx/GSRendererHW.cpp @@ -862,11 +862,11 @@ GSRendererHW::Hacks::Hacks() m_oi_list.push_back(HackEntry(CRC::SpyroNewBeginning, CRC::RegionCount, &GSRendererHW::OI_SpyroNewBeginning)); m_oi_list.push_back(HackEntry(CRC::SpyroEternalNight, CRC::RegionCount, &GSRendererHW::OI_SpyroEternalNight)); m_oi_list.push_back(HackEntry(CRC::SuperManReturns, CRC::RegionCount, &GSRendererHW::OI_SuperManReturns)); + m_oi_list.push_back(HackEntry(CRC::TalesOfLegendia, CRC::RegionCount, &GSRendererHW::OI_TalesOfLegendia)); m_oi_list.push_back(HackEntry(CRC::ArTonelico2, CRC::RegionCount, &GSRendererHW::OI_ArTonelico2)); m_oi_list.push_back(HackEntry(CRC::ItadakiStreet, CRC::RegionCount, &GSRendererHW::OI_ItadakiStreet)); if (!can_handle_depth) { - m_oi_list.push_back(HackEntry(CRC::TalesOfLegendia, CRC::RegionCount, &GSRendererHW::OI_TalesOfLegendia)); m_oi_list.push_back(HackEntry(CRC::SMTNocturne, CRC::RegionCount, &GSRendererHW::OI_SMTNocturne)); m_oi_list.push_back(HackEntry(CRC::GodOfWar2, CRC::RegionCount, &GSRendererHW::OI_GodOfWar2)); }