GSdx: CRC hackfix for Devil May Cry 3, removes bad postprocessing.

Adjusted the SW Battlefront hackfix for the PAL versions (NTSC-U and PAL versions have the same CRC but use slighty different buffer/texture addresses...)

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@4787 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
shadowladyngemu 2011-07-01 04:50:32 +00:00
parent e789cc84e2
commit 539d313622
4 changed files with 41 additions and 6 deletions

View File

@ -243,6 +243,7 @@ CRC::Game CRC::m_games[] =
{0xE169BAF8, RedDeadRevolver, US, 0},
{0xE2E67E23, RedDeadRevolver, EU, 0},
{0xEDDD6573, SpidermanWoS, US, 0}, //Web of Shadows
{0xF14C1D82, SpidermanWoS, EU, 0},
{0xF56C7948, HeavyMetalThunder, JP, 0},
{0x2498951B, SilentHill3, US, 0},
{0x5088CCDB, SilentHill3, EU, 0},
@ -270,9 +271,14 @@ CRC::Game CRC::m_games[] =
{0x568A5C78, DigimonRumbleArena2, US, 0},
{0x785E22BB, DigimonRumbleArena2, EU, 0},
{0x879CDA5E, StarWarsForceUnleashed, US, 0},
{0x503BF9E1, StarWarsBattlefront, US, 0},
{0x02F4B541, StarWarsBattlefront2, US, 0},
{0x503BF9E1, StarWarsBattlefront, NoRegion, 0}, //EU and US versions have same CRC
{0x02F4B541, StarWarsBattlefront2, NoRegion, 0}, //EU and US versions have same CRC
{0xA8DB29DF, BlackHawkDown, EU, 0},
{0x25FC361B, DevilMayCry3, US, 0}, //SE
{0x18C9343F, DevilMayCry3, EU, 0}, //SE
{0x7ADCB24A, DevilMayCry3, EU, 0},
{0x79C952B0, DevilMayCry3, JP, 0}, //SE
{0x7F3DDEAB, DevilMayCry3, JP, 0},
};
hash_map<uint32, CRC::Game*> CRC::m_map;

View File

@ -110,6 +110,7 @@ public:
StarWarsBattlefront,
StarWarsBattlefront2,
BlackHawkDown,
DevilMayCry3,
TitleCount,
};

View File

@ -250,7 +250,7 @@ class GSRendererHW : public GSRendererT<Vertex>
uint32 FBP = m_context->FRAME.Block();
uint32 FPSM = m_context->FRAME.PSM;
if((FBP == 0x025a0 || FBP == 0x02a60) && FPSM == PSM_PSMCT32)
if((FBP == 0x025a0 || FBP == 0x025a0) && FPSM == PSM_PSMCT32) //0x2800 pal, 0x25a0 ntsc
{
//only top half of the screen clears
m_dev->ClearDepth(ds, 0);

View File

@ -309,6 +309,11 @@ GSVector4i GSState::GetFrameRect(int i)
int w = r.width();
int h = r.height();
if(m_game.title == CRC::DevilMayCry3 && (m_game.region == CRC::US || m_game.region == CRC::JP))
{
h = 448;
}
if(m_regs->SMODE2.INT && m_regs->SMODE2.FFMD && h > 1) h >>= 1;
//Breaks Disgaea2 FMV borders
@ -2928,7 +2933,7 @@ bool GSC_StarWarsBattlefront(const GSFrameInfo& fi, int& skip)
{
if(skip == 0)
{
if(fi.TME && (fi.FBP > 0x0 && fi.FBP < 0x00e00) && fi.FPSM == PSM_PSMCT32 && (fi.TBP0 > 0x02000 && fi.TBP0 < 0x02e00) && fi.TPSM == PSM_PSMT8)
if(fi.TME && (fi.FBP > 0x0 && fi.FBP < 0x01000) && fi.FPSM == PSM_PSMCT32 && (fi.TBP0 > 0x02000 && fi.TBP0 < 0x03000) && fi.TPSM == PSM_PSMT8)
{
skip = 1;
}
@ -2941,11 +2946,11 @@ bool GSC_StarWarsBattlefront2(const GSFrameInfo& fi, int& skip)
{
if(skip == 0)
{
if(fi.TME && (fi.FBP > 0x01000 && fi.FBP < 0x01e00) && fi.FPSM == PSM_PSMCT32 && (fi.TBP0 > 0x0 && fi.TBP0 < 0x00e00) && fi.TPSM == PSM_PSMT8)
if(fi.TME && (fi.FBP > 0x01000 && fi.FBP < 0x02000) && fi.FPSM == PSM_PSMCT32 && (fi.TBP0 > 0x0 && fi.TBP0 < 0x01000) && fi.TPSM == PSM_PSMT8)
{
skip = 1;
}
if(fi.TME && (fi.FBP > 0x01000 && fi.FBP < 0x01e00) && fi.FPSM == PSM_PSMZ32 && (fi.TBP0 > 0x0 && fi.TBP0 < 0x0e00) && fi.TPSM == PSM_PSMT8)
if(fi.TME && (fi.FBP > 0x01000 && fi.FBP < 0x02000) && fi.FPSM == PSM_PSMZ32 && (fi.TBP0 > 0x0 && fi.TBP0 < 0x01000) && fi.TPSM == PSM_PSMT8)
{
skip = 1;
}
@ -2971,6 +2976,28 @@ bool GSC_BlackHawkDown(const GSFrameInfo& fi, int& skip)
return true;
}
bool GSC_DevilMayCry3(const GSFrameInfo& fi, int& skip)
{
if(skip == 0)
{
if(fi.TME && fi.FBP == 0x01800 && fi.FPSM == PSM_PSMCT16 && fi.TBP0 == 0x01000 && fi.TPSM == PSM_PSMZ16)
{
skip = 32;
}
if(fi.TME && fi.FBP == 0x01800 && fi.FPSM == PSM_PSMZ32 && fi.TBP0 == 0x0800 && fi.TPSM == PSM_PSMT8H)
{
skip = 16;
}
if(fi.TME && fi.FBP == 0x01800 && fi.FPSM == PSM_PSMCT32 && fi.TBP0 == 0x0 && fi.TPSM == PSM_PSMT8H)
{
skip = 24;
}
}
return true;
}
bool GSState::IsBadFrame(int& skip, int UserHacks_SkipDraw)
{
@ -3051,6 +3078,7 @@ bool GSState::IsBadFrame(int& skip, int UserHacks_SkipDraw)
map[CRC::StarWarsBattlefront] = GSC_StarWarsBattlefront;
map[CRC::StarWarsBattlefront2] = GSC_StarWarsBattlefront2;
map[CRC::BlackHawkDown] = GSC_BlackHawkDown;
map[CRC::DevilMayCry3] = GSC_DevilMayCry3;
}
// TODO: just set gsc in SetGameCRC once