Changed how IPU1DMA works by making some odd code optionally via gamefix (replacing the outdated DMA exec hack).

This fixes many games with FMV errors / crashes / hangs.
A select few games need that code though, mainly Tri-Ace ones, so for those there is a new gamefix now.

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@2802 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
ramapcsx2 2010-04-01 09:46:56 +00:00
parent 9cc5dfa7a3
commit c604bf89d3
4 changed files with 15 additions and 10 deletions

View File

@ -426,11 +426,11 @@ struct Pcsx2Config
BITFIELD32() BITFIELD32()
bool bool
VuAddSubHack :1, // Tri-ace games, they use an encryption algorithm that requires VU ADDI opcode to be bit-accurate. VuAddSubHack :1, // Tri-ace games, they use an encryption algorithm that requires VU ADDI opcode to be bit-accurate.
IpuSliceHack :1, // Legacy IPU1 DMA code, breaks several games but needed for Tri-Ace ones.
VuClipFlagHack :1, // Persona games, maybe others. It's to do with the VU clip flag (again). VuClipFlagHack :1, // Persona games, maybe others. It's to do with the VU clip flag (again).
FpuCompareHack :1, // Digimon Rumble Arena 2, fixes spinning/hanging on intro-menu. FpuCompareHack :1, // Digimon Rumble Arena 2, fixes spinning/hanging on intro-menu.
FpuMulHack :1, // Tales of Destiny hangs. FpuMulHack :1, // Tales of Destiny hangs.
FpuNegDivHack :1, // Gundam games messed up camera-view. FpuNegDivHack :1, // Gundam games messed up camera-view.
DMAExeHack :1, // Fatal Frame; breaks Gust and Tri-Ace games.
XgKickHack :1; // Erementar Gerad, adds more delay to VU XGkick instructions. Corrects the color of some graphics, but breaks Tri-ace games and others. XgKickHack :1; // Erementar Gerad, adds more delay to VU XGkick instructions. Corrects the color of some graphics, but breaks Tri-ace games and others.
BITFIELD_END BITFIELD_END
@ -559,11 +559,11 @@ TraceLogFilters& SetTraceConfig();
#define NUM_OF_GAME_FIXES 7 #define NUM_OF_GAME_FIXES 7
#define CHECK_VUADDSUBHACK (EmuConfig.Gamefixes.VuAddSubHack) // Special Fix for Tri-ace games, they use an encryption algorithm that requires VU addi opcode to be bit-accurate. #define CHECK_VUADDSUBHACK (EmuConfig.Gamefixes.VuAddSubHack) // Special Fix for Tri-ace games, they use an encryption algorithm that requires VU addi opcode to be bit-accurate.
#define CHECK_IPUSLICEHACK (EmuConfig.Gamefixes.IpuSliceHack) // Enables legacy code for IPU1 DMA involving "g_nDMATransfer.ACTV1".
#define CHECK_FPUCOMPAREHACK (EmuConfig.Gamefixes.FpuCompareHack) // Special Fix for Digimon Rumble Arena 2, fixes spinning/hanging on intro-menu. #define CHECK_FPUCOMPAREHACK (EmuConfig.Gamefixes.FpuCompareHack) // Special Fix for Digimon Rumble Arena 2, fixes spinning/hanging on intro-menu.
#define CHECK_VUCLIPFLAGHACK (EmuConfig.Gamefixes.VuClipFlagHack) // Special Fix for Persona games, maybe others. It's to do with the VU clip flag (again). #define CHECK_VUCLIPFLAGHACK (EmuConfig.Gamefixes.VuClipFlagHack) // Special Fix for Persona games, maybe others. It's to do with the VU clip flag (again).
#define CHECK_FPUMULHACK (EmuConfig.Gamefixes.FpuMulHack) // Special Fix for Tales of Destiny hangs. #define CHECK_FPUMULHACK (EmuConfig.Gamefixes.FpuMulHack) // Special Fix for Tales of Destiny hangs.
#define CHECK_FPUNEGDIVHACK (EmuConfig.Gamefixes.FpuNegDivHack) // Special Fix for Gundam games messed up camera-view. #define CHECK_FPUNEGDIVHACK (EmuConfig.Gamefixes.FpuNegDivHack) // Special Fix for Gundam games messed up camera-view.
#define CHECK_DMAEXECHACK (EmuConfig.Gamefixes.DMAExeHack) // Special Fix for Fatal Frame; breaks Gust and Tri-Ace games.
#define CHECK_XGKICKHACK (EmuConfig.Gamefixes.XgKickHack) // Special Fix for Erementar Gerad, adds more delay to VU XGkick instructions. Corrects the color of some graphics. #define CHECK_XGKICKHACK (EmuConfig.Gamefixes.XgKickHack) // Special Fix for Erementar Gerad, adds more delay to VU XGkick instructions. Corrects the color of some graphics.
//------------ Advanced Options!!! --------------- //------------ Advanced Options!!! ---------------

View File

@ -1243,7 +1243,10 @@ static __forceinline bool IPU1chain(int &totalqwc)
if (ipu1dma->qwc > 0) if (ipu1dma->qwc > 0)
{ {
g_nDMATransfer.ACTV1 = true; // Needed for a select few games, but breaks many others.
// Games known to need it include all 3 Tri-Ace games and Grandia Xtreme.
// Breaks Atelier Iris 2, Gundam, GT4, Resident Evil Code Veronica X, Music 3000, etc.
if(CHECK_IPUSLICEHACK) g_nDMATransfer.ACTV1 = true;
return true; return true;
} }
} }
@ -1343,7 +1346,9 @@ int IPU1dma()
//We need to make sure GIF has flushed before sending IPU data, it seems to REALLY screw FFX videos //We need to make sure GIF has flushed before sending IPU data, it seems to REALLY screw FFX videos
flushGIF(); flushGIF();
// in kh, qwc == 0 when dma_actv1 is set // in kh, qwc == 0 when dma_actv1 is set << legacy comment that means ..something.. I guess
// Note: g_nDMATransfer.ACTV1 seems to handle some kind of HLE data slicing.
// Most games hate it and vtlb miss or hang / skip the FMV.
if ((g_nDMATransfer.ACTV1) && ipu1dma->qwc > 0) if ((g_nDMATransfer.ACTV1) && ipu1dma->qwc > 0)
{ {
if (IPU1chain(totalqwc)) return totalqwc; if (IPU1chain(totalqwc)) return totalqwc;

View File

@ -252,11 +252,11 @@ void Pcsx2Config::GamefixOptions::LoadSave( IniInterface& ini )
IniScopedGroup path( ini, L"Gamefixes" ); IniScopedGroup path( ini, L"Gamefixes" );
IniBitBool( VuAddSubHack ); IniBitBool( VuAddSubHack );
IniBitBool( IpuSliceHack );
IniBitBool( VuClipFlagHack ); IniBitBool( VuClipFlagHack );
IniBitBool( FpuCompareHack ); IniBitBool( FpuCompareHack );
IniBitBool( FpuMulHack ); IniBitBool( FpuMulHack );
IniBitBool( FpuNegDivHack ); IniBitBool( FpuNegDivHack );
IniBitBool( DMAExeHack );
IniBitBool( XgKickHack ); IniBitBool( XgKickHack );
} }

View File

@ -35,9 +35,13 @@ Panels::GameFixesPanel::GameFixesPanel( wxWindow* parent ) :
const CheckTextMess check_text[NUM_OF_GAME_FIXES] = const CheckTextMess check_text[NUM_OF_GAME_FIXES] =
{ {
{ {
_("VU Add Hack - for Tri-Ace games!"), _("VU Add Hack - fixes Tri-Ace games boot crash (Enable IPU hack as well.)"),
_("Games that need this hack to boot:\n * Star Ocean 3\n * Radiata Stories\n * Valkyrie Profile 2") _("Games that need this hack to boot:\n * Star Ocean 3\n * Radiata Stories\n * Valkyrie Profile 2")
}, },
{
_("IPU slices Hack - for Tri-Ace game's videos (Breaks most other games!)"),
_("Fixes videos not playing in:\n * Star Ocean 3\n * Radiata Stories\n * Valkyrie Profile 2")
},
{ {
_("VU Clip Flag Hack - for Persona games (SuperVU recompiler only!)"), _("VU Clip Flag Hack - for Persona games (SuperVU recompiler only!)"),
wxEmptyString wxEmptyString
@ -54,10 +58,6 @@ Panels::GameFixesPanel::GameFixesPanel( wxWindow* parent ) :
_("FPU Negative Div Hack - for Gundam games."), _("FPU Negative Div Hack - for Gundam games."),
wxEmptyString wxEmptyString
}, },
{
_("DMA Execution Hack - for Fatal Frame."),
wxEmptyString
},
{ {
_("VU XGkick Hack - for Erementar Gerad."), _("VU XGkick Hack - for Erementar Gerad."),
wxEmptyString wxEmptyString