diff --git a/plugins/GSdx/Renderers/HW/GSRendererHW.cpp b/plugins/GSdx/Renderers/HW/GSRendererHW.cpp index 2111663303..a6f792aa65 100644 --- a/plugins/GSdx/Renderers/HW/GSRendererHW.cpp +++ b/plugins/GSdx/Renderers/HW/GSRendererHW.cpp @@ -1542,6 +1542,7 @@ GSRendererHW::Hacks::Hacks() , m_cu(NULL) { m_oi_list.push_back(HackEntry(CRC::BigMuthaTruckers, CRC::RegionCount, &GSRendererHW::OI_BigMuthaTruckers)); + m_oi_list.push_back(HackEntry(CRC::DBZBT2, CRC::RegionCount, &GSRendererHW::OI_DBZBT2)); m_oi_list.push_back(HackEntry(CRC::FFXII, CRC::EU, &GSRendererHW::OI_FFXII)); m_oi_list.push_back(HackEntry(CRC::FFX, CRC::RegionCount, &GSRendererHW::OI_FFX)); m_oi_list.push_back(HackEntry(CRC::MetalSlug6, CRC::RegionCount, &GSRendererHW::OI_MetalSlug6)); @@ -1555,10 +1556,8 @@ GSRendererHW::Hacks::Hacks() m_oi_list.push_back(HackEntry(CRC::Jak3, CRC::RegionCount, &GSRendererHW::OI_JakGames)); m_oi_list.push_back(HackEntry(CRC::JakX, CRC::RegionCount, &GSRendererHW::OI_JakGames)); - m_oo_list.push_back(HackEntry(CRC::DBZBT2, CRC::RegionCount, &GSRendererHW::OO_DBZBT2)); m_oo_list.push_back(HackEntry(CRC::MajokkoALaMode2, CRC::RegionCount, &GSRendererHW::OO_MajokkoALaMode2)); - m_cu_list.push_back(HackEntry(CRC::DBZBT2, CRC::RegionCount, &GSRendererHW::CU_DBZBT2)); m_cu_list.push_back(HackEntry(CRC::MajokkoALaMode2, CRC::RegionCount, &GSRendererHW::CU_MajokkoALaMode2)); m_cu_list.push_back(HackEntry(CRC::TalesOfAbyss, CRC::RegionCount, &GSRendererHW::CU_TalesOfAbyss)); } @@ -1799,6 +1798,20 @@ bool GSRendererHW::OI_BigMuthaTruckers(GSTexture* rt, GSTexture* ds, GSTextureCa return true; } +bool GSRendererHW::OI_DBZBT2(GSTexture* rt, GSTexture* ds, GSTextureCache::Source* t) +{ + if (t && t->m_from_target) // Avoid slow framebuffer readback + return true; + + // Sprite rendering + if (!CanUseSwSpriteRender(true)) + return true; + + SwSpriteRender(); + + return false; // Skip current draw +} + bool GSRendererHW::OI_FFXII(GSTexture* rt, GSTexture* ds, GSTextureCache::Source* t) { static uint32* video = NULL; @@ -2237,25 +2250,6 @@ bool GSRendererHW::OI_JakGames(GSTexture* rt, GSTexture* ds, GSTextureCache::Sou // OO (others output?) hacks: invalidate extra local memory after the draw call -void GSRendererHW::OO_DBZBT2() -{ - // palette readback (cannot detect yet, when fetching the texture later) - - uint32 FBP = m_context->FRAME.Block(); - uint32 TBP0 = m_context->TEX0.TBP0; - - if(PRIM->TME && (FBP == 0x03c00 && TBP0 == 0x03c80 || FBP == 0x03ac0 && TBP0 == 0x03b40)) - { - GIFRegBITBLTBUF BITBLTBUF; - - BITBLTBUF.SBP = FBP; - BITBLTBUF.SBW = 1; - BITBLTBUF.SPSM = PSM_PSMCT32; - - InvalidateLocalMem(BITBLTBUF, GSVector4i(0, 0, 64, 64)); - } -} - void GSRendererHW::OO_MajokkoALaMode2() { // palette readback @@ -2276,15 +2270,6 @@ void GSRendererHW::OO_MajokkoALaMode2() // Can Upscale hacks: disable upscaling for some draw calls -bool GSRendererHW::CU_DBZBT2() -{ - // palette should stay 64 x 64 - - uint32 FBP = m_context->FRAME.Block(); - - return FBP != 0x03c00 && FBP != 0x03ac0; -} - bool GSRendererHW::CU_MajokkoALaMode2() { // palette should stay 16 x 16 diff --git a/plugins/GSdx/Renderers/HW/GSRendererHW.h b/plugins/GSdx/Renderers/HW/GSRendererHW.h index f1fa8faa69..d90abb1555 100644 --- a/plugins/GSdx/Renderers/HW/GSRendererHW.h +++ b/plugins/GSdx/Renderers/HW/GSRendererHW.h @@ -55,6 +55,7 @@ private: void OI_DoubleHalfClear(GSTexture* rt, GSTexture* ds); // always on bool OI_BigMuthaTruckers(GSTexture* rt, GSTexture* ds, GSTextureCache::Source* t); + bool OI_DBZBT2(GSTexture* rt, GSTexture* ds, GSTextureCache::Source* t); bool OI_FFXII(GSTexture* rt, GSTexture* ds, GSTextureCache::Source* t); bool OI_FFX(GSTexture* rt, GSTexture* ds, GSTextureCache::Source* t); bool OI_MetalSlug6(GSTexture* rt, GSTexture* ds, GSTextureCache::Source* t); @@ -67,10 +68,8 @@ private: bool OI_ItadakiStreet(GSTexture* rt, GSTexture* ds, GSTextureCache::Source* t); bool OI_JakGames(GSTexture* rt, GSTexture* ds, GSTextureCache::Source* t); - void OO_DBZBT2(); void OO_MajokkoALaMode2(); - bool CU_DBZBT2(); bool CU_MajokkoALaMode2(); bool CU_TalesOfAbyss();