..:: PCSX2 Forums ::..

Full Version: GameDB enables VuClipFlagHack even with MicroVU
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I just happened to notice this while playing Persona 3. The description for the game fix(on the manual fix page) says:

"VU Clip Flag Hack - For Persona games (SuperVU recompiler only!)"

However, it gets enabled by the automatic game fixes even when MicroVU is selected.

[Image: 1.png]

Is this an issue?
Maybe, MVu recompiler doesn't need this Game fix. it might be present to just be usable in case if, Svu recompiler is used by the user.
Search the option in source code. It might only impact superVu code.
(03-29-2015, 02:03 PM)gregory Wrote: [ -> ]Search the option in source code. It might only impact superVu code.

I just did a format and don't have visual studio reinstalled yet. I'll give it a look when I do.
Here a grep of VuClipFlag
Quote:pcsx2/x86/sVU_zerorec.cpp: if (!CHECK_VUCLIPFLAGHACK && pparentinst != NULL)
pcsx2/Config.h: Fix_VuClipFlag,
pcsx2/Config.h: VuClipFlagHack :1, // Persona games, maybe others. It's to do with the VU clip flag (again).
pcsx2/Config.h:#define CHECK_VUCLIPFLAGHACK (EmuConfig.Gamefixes.VuClipFlagHack) // Special Fix for Persona games, maybe others. It's to do with the VU clip flag (again).
pcsx2/Pcsx2Config.cpp: L"VuClipFlag",
pcsx2/Pcsx2Config.cpp: case Fix_VuClipFlag: VuClipFlagHack = enabled; break;
pcsx2/Pcsx2Config.cpp: case Fix_VuClipFlag: return VuClipFlagHack;
pcsx2/Pcsx2Config.cpp: IniBitBool( VuClipFlagHack );
That explains it, there is nothing related to use the VU clip flag hack in the MicroVU hence, it will only get automatically applied if, SuperVu is in use.

The initialization of the VUclipflag hack is present under the following conditional operator series.

Code:
if (!CHECK_VUCLIPFLAGHACK && pparentinst != NULL)
{
if (nParentCheckForExecution >= 0)
{
if (pparentinst->pClipWrite == 0)
pparentinst->pClipWrite = (uptr)SuperVUStaticAlloc(4);
if (s_ClipRead == 0)
s_ClipRead = (uptr) & VU->VI[REG_CLIP_FLAG];
CMP32ItoM((uptr)&g_nLastBlockExecuted, nParentCheckForExecution);
u8* jptr = JNE8(0);
CMP32ItoM((uptr)&s_ClipRead, (uptr)&VU->VI[REG_CLIP_FLAG]);
u8* jptr2 = JE8(0);
MOV32MtoR(EAX, pparentinst->pClipWrite);
MOV32RtoM(s_ClipRead, EAX);
x86SetJ8(jptr);
x86SetJ8(jptr2);
}
Where, it checks for it's Initialization from the VuClipFlagHack variable, the flag hack function on Svu_zerorec.cpp is initialized when the variable is equal to 1. ( the values for that is stored in the GameIndex.dbf).

Therefore, it can only be applied if, Svu recompiler is in use. even if it shows enabled in the Console log it still can't reach the SUPERVU_PROPAGATEFLAGS since, SuperVu recompiler is not used.
I figured as much. It's just that the gamefix says "SuperVU recompiler only!" which at least suggests it might cause havoc with MVU. Thanks for checking it out.