GSdx: CRC hackfixes for Silent Hill 2/3 (half screen issue), Castlevania (removes shadows which were broken and caused darkness in different areas) and Bleach Blade Battlers 1/2 (shadows that caused a huge slowdown when casted on the characters).

Few changes to the Simpsons hackfix.

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@4593 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
shadowladyngemu 2011-04-25 13:47:29 +00:00
parent cc8d14511b
commit eaaa8eef59
4 changed files with 79 additions and 3 deletions

View File

@ -162,6 +162,8 @@ CRC::Game CRC::m_games[] =
{0x8C913264, SonicUnleashed, EU, 0}, {0x8C913264, SonicUnleashed, EU, 0},
{0x4C7BB3C8, SimpsonsGame, NoRegion, 0}, {0x4C7BB3C8, SimpsonsGame, NoRegion, 0},
{0x4C94B32C, SimpsonsGame, NoRegion, 0}, {0x4C94B32C, SimpsonsGame, NoRegion, 0},
{0x206779D8, SimpsonsGame, EU, 0},
{0xBBE4D862, SimpsonsGame, US, 0},
{0xD71B57F4, Genji, NoRegion, 0}, {0xD71B57F4, Genji, NoRegion, 0},
{0xE04EA200, StarOcean3, EU, 0}, {0xE04EA200, StarOcean3, EU, 0},
{0x23A97857, StarOcean3, US, 0}, {0x23A97857, StarOcean3, US, 0},
@ -213,6 +215,15 @@ CRC::Game CRC::m_games[] =
{0xE2E67E23, RedDeadRevolver, EU, 0}, {0xE2E67E23, RedDeadRevolver, EU, 0},
{0xEDDD6573, SpidermanWoS, US, 0}, //Web of Shadows {0xEDDD6573, SpidermanWoS, US, 0}, //Web of Shadows
{0xF56C7948, HeavyMetalThunder, JP, 0}, {0xF56C7948, HeavyMetalThunder, JP, 0},
{0x2498951B, SilentHill3, US, 0},
{0x5088CCDB, SilentHill3, EU, 0},
{0x8E8E384B, SilentHill2, US, 0},
{0x6DF62AEA, BleachBladeBattlers, JP, 0},
{0x6EB71AB0, BleachBladeBattlers, JP, 0}, //2nd
{0x3A446111, CastlevaniaCoD, US, 0},
{0xF321BC38, CastlevaniaCoD, EU, 0},
{0x28270F7D, CastlevaniaLoI, US, 0},
{0xA36CFF6C, CastlevaniaLoI, JP, 0},
}; };
hash_map<uint32, CRC::Game*> CRC::m_map; hash_map<uint32, CRC::Game*> CRC::m_map;

View File

@ -96,6 +96,11 @@ public:
RedDeadRevolver, RedDeadRevolver,
SpidermanWoS, SpidermanWoS,
HeavyMetalThunder, HeavyMetalThunder,
SilentHill3,
SilentHill2,
BleachBladeBattlers,
CastlevaniaCoD,
CastlevaniaLoI,
TitleCount, TitleCount,
}; };

View File

@ -185,7 +185,7 @@ class GSRendererHW : public GSRendererT<Vertex>
uint32 FBW = m_context->FRAME.FBW; uint32 FBW = m_context->FRAME.FBW;
uint32 FPSM = m_context->FRAME.PSM; uint32 FPSM = m_context->FRAME.PSM;
if(FBP == 0x01800 && FPSM == PSM_PSMZ24) if((FBP == 0x01500 || FBP == 0x01800) && FPSM == PSM_PSMZ24) //0x1800 pal, 0x1500 ntsc
{ {
// instead of just simply drawing a full height 512x512 sprite to clear the z buffer, // instead of just simply drawing a full height 512x512 sprite to clear the z buffer,
// it uses a 512x256 sprite only, yet it is still able to fill the whole surface with zeros, // it uses a 512x256 sprite only, yet it is still able to fill the whole surface with zeros,

View File

@ -339,8 +339,18 @@ GSVector2i GSState::GetDeviceSize(int i)
}*/ }*/
//Fixme : Just slightly better than the hack above //Fixme : Just slightly better than the hack above
if(m_regs->SMODE2.INT && m_regs->SMODE2.FFMD && h > 1){ if(m_regs->SMODE2.INT && m_regs->SMODE2.FFMD && h > 1)
if (!IsEnabled(0) || !IsEnabled(1)){h >>= 1;} {
if (IsEnabled(0) || IsEnabled(1))
{
h >>= 1;
}
}
//Fixme: These games elude the code above, worked with the old hack
else if(m_game.title == CRC::SilentHill2 || m_game.title == CRC::SilentHill3)
{
h /= 2;
} }
return GSVector2i(w, h); return GSVector2i(w, h);
@ -2418,6 +2428,26 @@ bool GSC_SonicUnleashed(const GSFrameInfo& fi, int& skip)
return true; return true;
} }
bool GSC_SimpsonsGame(const GSFrameInfo& fi, int& skip)
{
if(skip == 0)
{
if(fi.TME && fi.FBP == fi.TBP0 && fi.FPSM == fi.TPSM && fi.TBP0 == 0x03000 && fi.TPSM == PSM_PSMCT32)
{
skip = 100;
}
}
else
{
if(fi.TME && fi.FBP == 0x03000 && fi.FPSM == PSM_PSMCT32 && fi.TPSM == PSM_PSMT8H)
{
skip = 2;
}
}
return true;
}
bool GSC_Genji(const GSFrameInfo& fi, int& skip) bool GSC_Genji(const GSFrameInfo& fi, int& skip)
{ {
if(skip == 0) if(skip == 0)
@ -2734,6 +2764,32 @@ bool GSC_HeavyMetalThunder(const GSFrameInfo& fi, int& skip)
return true; return true;
} }
bool GSC_BleachBladeBattlers(const GSFrameInfo& fi, int& skip)
{
if(skip == 0)
{
if(fi.TME && fi.FBP == 0x01180 && fi.FPSM == fi.TPSM && fi.TBP0 == 0x03fc0 && fi.TPSM == PSM_PSMCT32)
{
skip = 1;
}
}
return true;
}
bool GSC_Castlevania(const GSFrameInfo& fi, int& skip)
{
if(skip == 0)
{
if(fi.TME && fi.FBP == 0x00000 && fi.FPSM == PSM_PSMCT32 && fi.TPSM == PSM_PSMCT16S && fi.FBMSK == 0x00FFFFFF)
{
skip = 2;
}
}
return true;
}
bool GSState::IsBadFrame(int& skip, int UserHacks_SkipDraw) bool GSState::IsBadFrame(int& skip, int UserHacks_SkipDraw)
{ {
GSFrameInfo fi; GSFrameInfo fi;
@ -2785,6 +2841,7 @@ bool GSState::IsBadFrame(int& skip, int UserHacks_SkipDraw)
map[CRC::Onimusha3] = GSC_Onimusha3; map[CRC::Onimusha3] = GSC_Onimusha3;
map[CRC::TalesOfAbyss] = GSC_TalesOfAbyss; map[CRC::TalesOfAbyss] = GSC_TalesOfAbyss;
map[CRC::SonicUnleashed] = GSC_SonicUnleashed; map[CRC::SonicUnleashed] = GSC_SonicUnleashed;
map[CRC::SimpsonsGame] = GSC_SimpsonsGame;
map[CRC::Genji] = GSC_Genji; map[CRC::Genji] = GSC_Genji;
map[CRC::StarOcean3] = GSC_StarOcean3; map[CRC::StarOcean3] = GSC_StarOcean3;
map[CRC::ValkyrieProfile2] = GSC_ValkyrieProfile2; map[CRC::ValkyrieProfile2] = GSC_ValkyrieProfile2;
@ -2802,6 +2859,9 @@ bool GSState::IsBadFrame(int& skip, int UserHacks_SkipDraw)
map[CRC::LordOfTheRingsTwoTowers] = GSC_LordOfTheRingsTwoTowers; map[CRC::LordOfTheRingsTwoTowers] = GSC_LordOfTheRingsTwoTowers;
map[CRC::RedDeadRevolver] = GSC_RedDeadRevolver; map[CRC::RedDeadRevolver] = GSC_RedDeadRevolver;
map[CRC::HeavyMetalThunder] = GSC_HeavyMetalThunder; map[CRC::HeavyMetalThunder] = GSC_HeavyMetalThunder;
map[CRC::BleachBladeBattlers] = GSC_BleachBladeBattlers;
map[CRC::CastlevaniaCoD] = GSC_Castlevania;
map[CRC::CastlevaniaLoI] = GSC_Castlevania;
} }
// TODO: just set gsc in SetGameCRC once // TODO: just set gsc in SetGameCRC once