mirror of https://github.com/PCSX2/pcsx2.git
gsdx hw: add an hack for Jak3
I'm disappointed... Read back palette written by the GPU. Avoid strange color on the skin.
This commit is contained in:
parent
df2f8684d6
commit
34686394a6
|
@ -502,6 +502,12 @@ CRC::Game CRC::m_games[] =
|
|||
{0XE1BF5DCA, SuperManReturns, US, 0},
|
||||
{0x06A7506A, SacredBlaze, JP, 0},
|
||||
{0x4CE7FB04, ItadakiStreet, JP, 0},
|
||||
{0x9C712FF0, Jak1, EU, 0},
|
||||
{0x472E7699, Jak1, US, 0},
|
||||
{0x2479F4A9, Jak2, EU, 0},
|
||||
{0x12804727, Jak3, EU, 0},
|
||||
{0x644CFD03, Jak3, US, 0},
|
||||
{0xDF659E77, JakX, EU, 0},
|
||||
};
|
||||
|
||||
map<uint32, CRC::Game*> CRC::m_map;
|
||||
|
|
|
@ -169,6 +169,10 @@ public:
|
|||
SacredBlaze,
|
||||
SuperManReturns,
|
||||
ItadakiStreet,
|
||||
Jak1,
|
||||
Jak2,
|
||||
Jak3,
|
||||
JakX,
|
||||
TitleCount,
|
||||
};
|
||||
|
||||
|
|
|
@ -852,6 +852,7 @@ GSRendererHW::Hacks::Hacks()
|
|||
|
||||
m_oo_list.push_back(HackEntry<OO_Ptr>(CRC::DBZBT2, CRC::RegionCount, &GSRendererHW::OO_DBZBT2));
|
||||
m_oo_list.push_back(HackEntry<OO_Ptr>(CRC::MajokkoALaMode2, CRC::RegionCount, &GSRendererHW::OO_MajokkoALaMode2));
|
||||
m_oo_list.push_back(HackEntry<OO_Ptr>(CRC::Jak3, CRC::RegionCount, &GSRendererHW::OO_Jak));
|
||||
|
||||
m_cu_list.push_back(HackEntry<CU_Ptr>(CRC::DBZBT2, CRC::RegionCount, &GSRendererHW::CU_DBZBT2));
|
||||
m_cu_list.push_back(HackEntry<CU_Ptr>(CRC::MajokkoALaMode2, CRC::RegionCount, &GSRendererHW::CU_MajokkoALaMode2));
|
||||
|
@ -1529,6 +1530,27 @@ void GSRendererHW::OO_MajokkoALaMode2()
|
|||
}
|
||||
}
|
||||
|
||||
void GSRendererHW::OO_Jak()
|
||||
{
|
||||
// FIXME might need a CU_Jak too
|
||||
GSVector4i r = GSVector4i(m_vt.m_min.p.xyxy(m_vt.m_max.p)).rintersect(GSVector4i(m_context->scissor.in));
|
||||
GSVector4i r_p = GSVector4i(0, 0, 16, 16);
|
||||
|
||||
if(!PRIM->FST && PRIM->TME && (r == r_p).alltrue() && m_context->TEX0.TW == 4 && m_context->TEX0.TH == 4 && m_context->TEX0.PSM == PSM_PSMCT32) {
|
||||
// Game will render a texture directly into a palette.
|
||||
uint32 FBP = m_context->FRAME.Block();
|
||||
GL_INS("OO_Jak read back 0x%x", FBP);
|
||||
|
||||
GIFRegBITBLTBUF BITBLTBUF;
|
||||
|
||||
BITBLTBUF.SBP = FBP;
|
||||
BITBLTBUF.SBW = 1;
|
||||
BITBLTBUF.SPSM = PSM_PSMCT32;
|
||||
|
||||
InvalidateLocalMem(BITBLTBUF, GSVector4i(0, 0, 16, 16));
|
||||
}
|
||||
}
|
||||
|
||||
// Can Upscale hacks: disable upscaling for some draw calls
|
||||
|
||||
bool GSRendererHW::CU_DBZBT2()
|
||||
|
|
|
@ -71,6 +71,7 @@ private:
|
|||
|
||||
void OO_DBZBT2();
|
||||
void OO_MajokkoALaMode2();
|
||||
void OO_Jak();
|
||||
|
||||
bool CU_DBZBT2();
|
||||
bool CU_MajokkoALaMode2();
|
||||
|
|
Loading…
Reference in New Issue