VU: Adjust path for conditional evil blocks

Add patch for Pac-man World Rally
This commit is contained in:
refractionpcsx2 2022-01-22 03:02:22 +00:00
parent 9cbcda0f7b
commit e5a4f27e79
3 changed files with 12 additions and 2 deletions

View File

@ -38782,6 +38782,15 @@ SLUS-21328:
compat: 5
clampModes:
vuClampMode: 3 # Fixes bad geometry.
patches:
default:
content: |-
comment=Patch by Refraction
// Fix bad geometry
patch=1,EE,0016DDE4,word,4A80AADC
patch=1,EE,0016DDEC,word,4B7103BC
patch=1,EE,0016DDD0,word,4B00A29C
patch=1,EE,0016DDD8,word,4AF103BC
SLUS-21329:
name: "Karaoke Revolution Country - CMT Presents"
region: "NTSC-U"

View File

@ -903,13 +903,13 @@ void* mVUcompile(microVU& mVU, u32 startPC, uptr pState)
mVU_XGKICK_DELAY(mVU);
}
if (isEvilBlock)
if (isEvilBlock && !isConditional)
{
mVUsetupRange(mVU, xPC + 8, false);
normJumpCompile(mVU, mFC, true);
goto perf_and_return;
}
else if (!mVUinfo.isBdelay)
else if (!mVUinfo.isBdelay && !isEvilBlock)
{
// Handle range wrapping
if ((xPC + 8) == mVU.microMemSize)

View File

@ -242,6 +242,7 @@ typedef u32(__fastcall* mVUCall)(void*, void*);
#define mVUrange (mVUcurProg.ranges[0])[0]
#define isEvilBlock (mVUpBlock->pState.blockType == 2)
#define isBadOrEvil (mVUlow.badBranch || mVUlow.evilBranch)
#define isConditional (mVUlow.branch > 2 && mVUlow.branch < 9)
#define xPC ((iPC / 2) * 8)
#define curI ((u32*)mVU.regs().Micro)[iPC] //mVUcurProg.data[iPC]
#define setCode() { mVU.code = curI; }