COP2: Fix/hack for Ace Combat 4 sky, you will need to tick the VU Flag Hack Speedhack to enable it (not sure what else to put it on without adding another hack). This is more likely to do with odd COP2/VU0 sharing pipe behaviour, but ill leave that for cotton :P

Also altered some of the interpreter calls so the defines in config.h can be used again (example the #define ARITHMETICIMM)

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@4935 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
refraction 2011-10-12 22:54:21 +00:00
parent 81d3961352
commit c04eaf0f73
3 changed files with 41 additions and 31 deletions

View File

@ -38,20 +38,20 @@ namespace OpcodeImpl
namespace Interp = R5900::Interpreter::OpcodeImpl;
REC_FUNC_DEL(ADD, _Rd_);
REC_FUNC_DEL(ADDU, _Rd_);
REC_FUNC_DEL(DADD, _Rd_);
REC_FUNC_DEL(DADDU, _Rd_);
REC_FUNC_DEL(SUB, _Rd_);
REC_FUNC_DEL(SUBU, _Rd_);
REC_FUNC_DEL(DSUB, _Rd_);
REC_FUNC_DEL(DSUBU, _Rd_);
REC_FUNC_DEL(AND, _Rd_);
REC_FUNC_DEL(OR, _Rd_);
REC_FUNC_DEL(XOR, _Rd_);
REC_FUNC_DEL(NOR, _Rd_);
REC_FUNC_DEL(SLT, _Rd_);
REC_FUNC_DEL(SLTU, _Rd_);
REC_FUNC(ADD);
REC_FUNC(ADDU);
REC_FUNC(DADD);
REC_FUNC(DADDU);
REC_FUNC(SUB);
REC_FUNC(SUBU);
REC_FUNC(DSUB);
REC_FUNC(DSUBU);
REC_FUNC(AND);
REC_FUNC(OR);
REC_FUNC(XOR);
REC_FUNC(NOR);
REC_FUNC(SLT);
REC_FUNC(SLTU);
#else

View File

@ -34,16 +34,16 @@ namespace OpcodeImpl
namespace Interp = R5900::Interpreter::OpcodeImpl;
REC_FUNC_DEL(ADDI, _Rt_);
REC_FUNC_DEL(ADDIU, _Rt_);
REC_FUNC_DEL(DADDI, _Rt_);
REC_FUNC_DEL(DADDIU, _Rt_);
REC_FUNC_DEL(ANDI, _Rt_);
REC_FUNC_DEL(ORI, _Rt_);
REC_FUNC_DEL(XORI, _Rt_);
REC_FUNC(ADDI);
REC_FUNC(ADDIU);
REC_FUNC(DADDI);
REC_FUNC(DADDIU);
REC_FUNC(ANDI);
REC_FUNC(ORI);
REC_FUNC(XORI);
REC_FUNC_DEL(SLTI, _Rt_);
REC_FUNC_DEL(SLTIU, _Rt_);
REC_FUNC(SLTI);
REC_FUNC(SLTIU);
#else

View File

@ -45,13 +45,23 @@ void setupMacroOp(int mode, const char* opName) {
microVU0.prog.IRinfo.info[0].cFlag.lastWrite = 0xff;
}
if (mode & 0x10) { // Update Status/Mac Flags
microVU0.prog.IRinfo.info[0].sFlag.doFlag = 1;
microVU0.prog.IRinfo.info[0].sFlag.doNonSticky = 1;
microVU0.prog.IRinfo.info[0].sFlag.write = 0;
microVU0.prog.IRinfo.info[0].sFlag.lastWrite = 0;
microVU0.prog.IRinfo.info[0].mFlag.doFlag = 1;
microVU0.prog.IRinfo.info[0].mFlag.write = 0xff;
xMOV(gprF0, ptr32[&vu0Regs.VI[REG_STATUS_FLAG].UL]);
if ((mode & 0x80) && CHECK_VU_FLAGHACK)
{
//Its doing a SUB and we have the hack on so Ace Combat sky will work.
//Some freaky stat flag thing going on here!
}
else
{
microVU0.prog.IRinfo.info[0].sFlag.doFlag = 1;
microVU0.prog.IRinfo.info[0].sFlag.doNonSticky = 1;
microVU0.prog.IRinfo.info[0].sFlag.write = 0;
microVU0.prog.IRinfo.info[0].sFlag.lastWrite = 0;
microVU0.prog.IRinfo.info[0].mFlag.doFlag = 1;
microVU0.prog.IRinfo.info[0].mFlag.write = 0xff;
xMOV(gprF0, ptr32[&vu0Regs.VI[REG_STATUS_FLAG].UL]);
}
}
}
@ -116,7 +126,7 @@ REC_COP2_mVU0(ADDAx, "ADDAx", 0x10);
REC_COP2_mVU0(ADDAy, "ADDAy", 0x10);
REC_COP2_mVU0(ADDAz, "ADDAz", 0x10);
REC_COP2_mVU0(ADDAw, "ADDAw", 0x10);
REC_COP2_mVU0(SUB, "SUB", 0x10);
REC_COP2_mVU0(SUB, "SUB", 0x90); //Ace Combat sky
REC_COP2_mVU0(SUBi, "SUBi", 0x10);
REC_COP2_mVU0(SUBq, "SUBq", 0x11);
REC_COP2_mVU0(SUBx, "SUBx", 0x10);