gsdx hw: add a crc hack for Dragon Quest & Final Fantasy in Itadaki Street

The hack only fix the HW renderer but not the SW renderer. However I'm not sure
the issue is from GSdx.

The hack will disable alpha test that used to generate empty draw call.
This commit is contained in:
Gregory Hainaut 2016-09-04 19:41:31 +02:00
parent bb50b3419e
commit cedc4f241d
4 changed files with 32 additions and 0 deletions

View File

@ -514,6 +514,7 @@ CRC::Game CRC::m_games[] =
{0xFEFCF9DE, SteambotChronicles, JP, 0}, // Ponkotsu Roman Daikatsugeki: Bumpy Trot
{0XE1BF5DCA, SuperManReturns, US, 0},
{0x06A7506A, SacredBlaze, JP, 0},
{0x4CE7FB04, ItadakiStreet, JP, 0},
};
map<uint32, CRC::Game*> CRC::m_map;

View File

@ -174,6 +174,7 @@ public:
SteambotChronicles,
SacredBlaze,
SuperManReturns,
ItadakiStreet,
TitleCount,
};

View File

@ -790,6 +790,7 @@ GSRendererHW::Hacks::Hacks()
m_oi_list.push_back(HackEntry<OI_Ptr>(CRC::TalesOfLegendia, CRC::RegionCount, &GSRendererHW::OI_TalesOfLegendia));
m_oi_list.push_back(HackEntry<OI_Ptr>(CRC::SuperManReturns, CRC::RegionCount, &GSRendererHW::OI_SuperManReturns));
m_oi_list.push_back(HackEntry<OI_Ptr>(CRC::ArTonelico2, CRC::RegionCount, &GSRendererHW::OI_ArTonelico2));
m_oi_list.push_back(HackEntry<OI_Ptr>(CRC::ItadakiStreet, CRC::RegionCount, &GSRendererHW::OI_ItadakiStreet));
if (!can_handle_depth)
m_oi_list.push_back(HackEntry<OI_Ptr>(CRC::SMTNocturne, CRC::RegionCount, &GSRendererHW::OI_SMTNocturne));
@ -1546,6 +1547,33 @@ bool GSRendererHW::OI_ArTonelico2(GSTexture* rt, GSTexture* ds, GSTextureCache::
return true;
}
bool GSRendererHW::OI_ItadakiStreet(GSTexture* rt, GSTexture* ds, GSTextureCache::Source* t)
{
if (m_context->TEST.ATST == ATST_NOTEQUAL && m_context->TEST.AREF == 0) {
// It is also broken on the SW renderer. Issue appears because fragment alpha is 0
// I suspect the game expect low value of alpha, and due to bad rounding on the core
// you have wrongly 0.
// Otherwise some draws calls are empty (all pixels are discarded).
// It fixes missing element on the board
GL_INS("OI_ItadakiStreetSpecial disable alpha test");
m_context->TEST.ATST = ATST_ALWAYS;
#if 0 // Not enough
uint32 dummy_fm;
uint32 dummy_zm;
if (!TryAlphaTest(dummy_fm, dummy_zm)) {
GL_INS("OI_ItadakiStreetSpecial disable alpha test");
m_context->TEST.ATST = ATST_ALWAYS;
}
#endif
}
return true;
}
// OO (others output?) hacks: invalidate extra local memory after the draw call
void GSRendererHW::OO_DBZBT2()

View File

@ -72,6 +72,8 @@ private:
bool OI_PointListPalette(GSTexture* rt, GSTexture* ds, GSTextureCache::Source* t);
bool OI_SuperManReturns(GSTexture* rt, GSTexture* ds, GSTextureCache::Source* t);
bool OI_ArTonelico2(GSTexture* rt, GSTexture* ds, GSTextureCache::Source* t);
bool OI_ItadakiStreet(GSTexture* rt, GSTexture* ds, GSTextureCache::Source* t);
void OO_DBZBT2();
void OO_MajokkoALaMode2();