microVU: Parametrised D-Bit handling. This *Shouldn't* be needed in retail games, but now it's working it could be useful for homebrew and testing. By default this is now disabled, but can be enabled by editing the parameter in microVU_Misc.h

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5615 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
refraction@gmail.com 2013-04-12 09:16:15 +00:00
parent f0c76c3244
commit 4ad29982ac
3 changed files with 10 additions and 4 deletions

View File

@ -196,7 +196,7 @@ void normJumpCompile(mV, microFlagCycles& mFC, bool isEvilJump) {
void normBranch(mV, microFlagCycles& mFC) {
// E-bit or T-Bit or D-Bit Branch
if (mVUup.dBit)
if (mVUup.dBit && doDBitHandling)
{
u32 tempPC = iPC;
xTEST(ptr32[&VU0.VI[REG_FBRST].UL], (isVU1 ? 0x400 : 0x4));
@ -307,7 +307,7 @@ void condBranch(mV, microFlagCycles& mFC, int JMPcc) {
tJMP.SetTarget();
iPC = tempPC;
}
if (mVUup.dBit)
if (mVUup.dBit && doDBitHandling)
{
u32 tempPC = iPC;
xTEST(ptr32[&VU0.VI[REG_FBRST].UL], (isVU1 ? 0x400 : 0x4));
@ -412,7 +412,7 @@ void normJump(mV, microFlagCycles& mFC) {
}
incPC(-3);
}
if (mVUup.dBit)
if (mVUup.dBit && doDBitHandling)
{
xTEST(ptr32[&VU0.VI[REG_FBRST].UL], (isVU1 ? 0x400 : 0x4));
xForwardJump32 eJMP(Jcc_Zero);

View File

@ -568,7 +568,7 @@ void* mVUcompile(microVU& mVU, u32 startPC, uptr pState) {
if(!mVUinfo.isBdelay && !mVUlow.branch) //T/D Bit on branch is handled after the branch, branch delay slots are executed.
{
if(mVUup.tBit) { mVUDoTBit(mVU, &mFC); }
else if(mVUup.dBit) { mVUDoDBit(mVU, &mFC); }
else if(mVUup.dBit && doDBitHandling) { mVUDoDBit(mVU, &mFC); }
}
if (mVUinfo.doXGKICK) { mVU_XGKICK_DELAY(mVU, 1); }
if (isEvilBlock) { mVUsetupRange(mVU, xPC, 0); normJumpCompile(mVU, mFC, 1); return thisPtr; }

View File

@ -350,6 +350,12 @@ static const bool doJumpAsSameProgram = 0; // Set to 1 to treat jumps as same pr
// constant recompilation problems in certain games.
// Note: You MUST disable doJumpCaching if you enable this option.
// Handling of D-Bit in Micro Programs
static const bool doDBitHandling = 0;
// This flag shouldn't be enabled in released versions of games. Any games which
// need this method of pausing the VU should be using the T-Bit instead, however
// this could prove useful for VU debugging.
//------------------------------------------------------------------
// Speed Hacks (can cause infinite loops, SPS, Black Screens, etc...)
//------------------------------------------------------------------