mirror of https://github.com/PCSX2/pcsx2.git
GSdx: the valkyrie profile 2 fix
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@1450 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
parent
4de732685f
commit
7ddbaa6cb0
|
@ -141,6 +141,7 @@ CRC::Game CRC::m_games[] =
|
|||
{0x4C94B32C, SimpsonsGame, Unknown, 0},
|
||||
{0xD71B57F4, Genji, Unknown, 0},
|
||||
{0x23A97857, StarOcean3, JPUNDUB, 0},
|
||||
{0xCC96CE93, ValkyrieProfile2, JPUNDUB, 0},
|
||||
};
|
||||
|
||||
hash_map<uint32, CRC::Game*> CRC::m_map;
|
||||
|
|
|
@ -72,6 +72,7 @@ public:
|
|||
SimpsonsGame,
|
||||
Genji,
|
||||
StarOcean3,
|
||||
ValkyrieProfile2,
|
||||
TitleCount,
|
||||
};
|
||||
|
||||
|
|
|
@ -2231,6 +2231,26 @@ bool GSC_StarOcean3(const GSFrameInfo& fi, int& skip)
|
|||
return true;
|
||||
}
|
||||
|
||||
bool GSC_ValkyrieProfile2(const GSFrameInfo& fi, int& skip)
|
||||
{
|
||||
if(skip == 0)
|
||||
{
|
||||
if(fi.TME && fi.FBP == fi.TBP0 && fi.FPSM == PSM_PSMCT32 && fi.TPSM == PSM_PSMT4HH)
|
||||
{
|
||||
skip = 1000; //
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if(!(fi.TME && fi.FBP == fi.TBP0 && fi.FPSM == PSM_PSMCT32 && fi.TPSM == PSM_PSMT4HH))
|
||||
{
|
||||
skip = 0;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool GSState::IsBadFrame(int& skip)
|
||||
{
|
||||
GSFrameInfo fi;
|
||||
|
@ -2279,6 +2299,7 @@ bool GSState::IsBadFrame(int& skip)
|
|||
map[CRC::SonicUnleashed] = GSC_SonicUnleashed;
|
||||
map[CRC::Genji] = GSC_Genji;
|
||||
map[CRC::StarOcean3] = GSC_StarOcean3;
|
||||
map[CRC::ValkyrieProfile2] = GSC_ValkyrieProfile2;
|
||||
}
|
||||
|
||||
// TODO: just set gsc in SetGameCRC once
|
||||
|
|
|
@ -286,6 +286,8 @@ void GSTextureCache::InvalidateVideoMem(const GIFRegBITBLTBUF& BITBLTBUF, const
|
|||
}
|
||||
else
|
||||
{
|
||||
// TODO
|
||||
|
||||
if(s->m_TEX0.TBP0 == bp)
|
||||
{
|
||||
m_src.RemoveAt(s);
|
||||
|
@ -781,6 +783,15 @@ void GSTextureCache::SourceMap::Add(Source* s, const GIFRegTEX0& TEX0)
|
|||
uint32 bp = TEX0.TBP0;
|
||||
uint32 bw = TEX0.TBW;
|
||||
|
||||
if(s->m_target)
|
||||
{
|
||||
// TODO
|
||||
|
||||
m_map[bp >> 5][s] = true;
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
const GSLocalMemory::psm_t& psm = GSLocalMemory::m_psm[TEX0.PSM];
|
||||
|
||||
GSVector2i bs = (bp & 31) ? psm.pgs : psm.bs;
|
||||
|
@ -838,9 +849,20 @@ void GSTextureCache::SourceMap::RemoveAt(Source* s)
|
|||
{
|
||||
m_surfaces.erase(s);
|
||||
|
||||
for(uint32 i = s->m_TEX0.TBP0 >> 5; i < countof(m_map); i++)
|
||||
uint32 page = s->m_TEX0.TBP0 >> 5;
|
||||
|
||||
if(s->m_target)
|
||||
{
|
||||
m_map[i].erase(s);
|
||||
// TODO
|
||||
|
||||
m_map[page].erase(s);
|
||||
}
|
||||
else
|
||||
{
|
||||
for(uint32 i = page; i < countof(m_map); i++)
|
||||
{
|
||||
m_map[i].erase(s);
|
||||
}
|
||||
}
|
||||
|
||||
delete s;
|
||||
|
|
Loading…
Reference in New Issue