mirror of https://github.com/PCSX2/pcsx2.git
GregMiscellaneous:
* add a new hack (linux only) to enable the automatic skip draw (ease testing and probably remove later) * forget GSC_HauntingGround from my last copy-past.... git-svn-id: http://pcsx2.googlecode.com/svn/branches/GregMiscellaneous@3675 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
parent
c394c408d0
commit
1b0aac7871
|
@ -53,7 +53,8 @@ enum GAME_HACK_OPTIONS
|
||||||
GAME_PARTIALDEPTH = 0x04000000, // tries to save depth targets as much as possible across height changes
|
GAME_PARTIALDEPTH = 0x04000000, // tries to save depth targets as much as possible across height changes
|
||||||
GAME_REGETHACK = 0x08000000, // some sort of weirdness in ReGet() code
|
GAME_REGETHACK = 0x08000000, // some sort of weirdness in ReGet() code
|
||||||
GAME_GUSTHACK = 0x10000000, // Needed for Gustgames fast update.
|
GAME_GUSTHACK = 0x10000000, // Needed for Gustgames fast update.
|
||||||
GAME_NOLOGZ = 0x20000000 // Intended for linux -- not logarithmic Z.
|
GAME_NOLOGZ = 0x20000000, // Intended for linux -- not logarithmic Z.
|
||||||
|
GAME_AUTOSKIPDRAW = 0x40000000 // Remove blur effect on some games
|
||||||
};
|
};
|
||||||
|
|
||||||
#define USEALPHATESTING (!(conf.settings().no_alpha_test))
|
#define USEALPHATESTING (!(conf.settings().no_alpha_test))
|
||||||
|
|
|
@ -159,6 +159,7 @@ void ReportHacks(gameHacks hacks)
|
||||||
if (hacks.reget) ZZLog::WriteLn("Reget hack enabled.");
|
if (hacks.reget) ZZLog::WriteLn("Reget hack enabled.");
|
||||||
if (hacks.gust) ZZLog::WriteLn("Gust hack enabled.");
|
if (hacks.gust) ZZLog::WriteLn("Gust hack enabled.");
|
||||||
if (hacks.no_logz) ZZLog::WriteLn("'No logz' hack enabled.");
|
if (hacks.no_logz) ZZLog::WriteLn("'No logz' hack enabled.");
|
||||||
|
if (hacks.automatic_skip_draw) ZZLog::WriteLn("'Automatic skip draw' hack enabled.");
|
||||||
}
|
}
|
||||||
|
|
||||||
void ListHacks()
|
void ListHacks()
|
||||||
|
|
|
@ -149,6 +149,7 @@ void CreateGameHackTable(GtkWidget *treeview, gameHacks hacks)
|
||||||
add_map_entry(GAME_GUSTHACK, "10000000", "Gust fix, made gustgame more clean and fast - 10000000");
|
add_map_entry(GAME_GUSTHACK, "10000000", "Gust fix, made gustgame more clean and fast - 10000000");
|
||||||
add_map_entry(GAME_NOLOGZ, "20000000", "No logarithmic Z, could decrease number of Z-artefacts - 20000000");
|
add_map_entry(GAME_NOLOGZ, "20000000", "No logarithmic Z, could decrease number of Z-artefacts - 20000000");
|
||||||
add_map_entry(GAME_INTERLACE2X, "00000004", "Interlace 2X - 00000004\nFixes 2x bigger screen (Gradius 3).");
|
add_map_entry(GAME_INTERLACE2X, "00000004", "Interlace 2X - 00000004\nFixes 2x bigger screen (Gradius 3).");
|
||||||
|
add_map_entry(GAME_AUTOSKIPDRAW, "40000000", "Remove blur effect on some games\nSlow games.");
|
||||||
|
|
||||||
for (map<string, confOptsStruct>::iterator it = mapConfOpts.begin(); it != mapConfOpts.end(); ++it)
|
for (map<string, confOptsStruct>::iterator it = mapConfOpts.begin(); it != mapConfOpts.end(); ++it)
|
||||||
{
|
{
|
||||||
|
|
|
@ -173,7 +173,7 @@ typedef union
|
||||||
u32 reget : 1; // some sort of weirdness in ReGet() code
|
u32 reget : 1; // some sort of weirdness in ReGet() code
|
||||||
u32 gust : 1; // Needed for Gustgames fast update.
|
u32 gust : 1; // Needed for Gustgames fast update.
|
||||||
u32 no_logz : 1; // Intended for linux -- not logarithmic Z.
|
u32 no_logz : 1; // Intended for linux -- not logarithmic Z.
|
||||||
u32 reserved1 :1;
|
u32 automatic_skip_draw :1; // allow debug of the automatic skip draw option
|
||||||
u32 reserved2 :1;
|
u32 reserved2 :1;
|
||||||
};
|
};
|
||||||
u32 _u32;
|
u32 _u32;
|
||||||
|
|
|
@ -25,6 +25,15 @@
|
||||||
|
|
||||||
#include "ZZoglFlushHack.h"
|
#include "ZZoglFlushHack.h"
|
||||||
|
|
||||||
|
inline bool GABEST_HAS_SHARED_BITS (int fbp, int fpsm, int tbp, int tpsm)
|
||||||
|
{
|
||||||
|
if ( !PSMT_HAS_SHARED_BITS (fpsm, tpsm) )
|
||||||
|
return ((fbp ^ tbp) == 0);
|
||||||
|
else
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// GSC_... function has been imported from GSdx
|
// GSC_... function has been imported from GSdx
|
||||||
void GSC_Okami(const GSFrameInfo& fi, int& skip)
|
void GSC_Okami(const GSFrameInfo& fi, int& skip)
|
||||||
{
|
{
|
||||||
|
@ -429,12 +438,26 @@ void GSC_RadiataStories(const GSFrameInfo& fi, int& skip)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
inline bool GABEST_HAS_SHARED_BITS (int fbp, int fpsm, int tbp, int tpsm)
|
bool GSC_HauntingGround(const GSFrameInfo& fi, int& skip)
|
||||||
{
|
{
|
||||||
if ( !PSMT_HAS_SHARED_BITS (fpsm, tpsm) )
|
if(skip == 0)
|
||||||
return ((fbp ^ tbp) == 0);
|
{
|
||||||
else
|
if(fi.TME && fi.FPSM == fi.TPSM && fi.TPSM == PSM_PSMCT16S && fi.FBMSK == 0x03FFF)
|
||||||
return false;
|
{
|
||||||
|
skip = 1;
|
||||||
|
}
|
||||||
|
else if(fi.TME && fi.FBP == 0x3000 && fi.TBP0 == 0x3380)
|
||||||
|
{
|
||||||
|
skip = 1; // bloom
|
||||||
|
}
|
||||||
|
else if(fi.TME && fi.FBP == fi.TBP0 && fi.TBP0 == 0x3000 && fi.FBMSK == 0xFFFFFF &&
|
||||||
|
GABEST_HAS_SHARED_BITS(fi.FBP, fi.FPSM, fi.TBP0, fi.TPSM))
|
||||||
|
{
|
||||||
|
skip = 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
__forceinline bool IsBadFrame(ZeroGS::VB& curvb)
|
__forceinline bool IsBadFrame(ZeroGS::VB& curvb)
|
||||||
|
@ -450,7 +473,7 @@ __forceinline bool IsBadFrame(ZeroGS::VB& curvb)
|
||||||
fi.TPSM = curvb.tex0.psm;
|
fi.TPSM = curvb.tex0.psm;
|
||||||
fi.TZTST = curvb.test.ztst;
|
fi.TZTST = curvb.test.ztst;
|
||||||
|
|
||||||
if (GetSkipCount_Handler)
|
if (GetSkipCount_Handler && conf.settings().automatic_skip_draw)
|
||||||
GetSkipCount_Handler(fi, g_SkipFlushFrame);
|
GetSkipCount_Handler(fi, g_SkipFlushFrame);
|
||||||
|
|
||||||
if(g_SkipFlushFrame == 0 && (conf.SkipDraw > 0))
|
if(g_SkipFlushFrame == 0 && (conf.SkipDraw > 0))
|
||||||
|
|
Loading…
Reference in New Issue