VIF/VU: Removed all the everblue crap, found another way of doing it. As the savestate bummp wasn't needed anymore, i've put it back again. savestate users rejoyce?

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5546 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
refraction@gmail.com 2013-02-05 23:30:25 +00:00
parent 8d80ff0652
commit 0e80111499
5 changed files with 3 additions and 44 deletions

View File

@ -24,7 +24,7 @@
// the lower 16 bit value. IF the change is breaking of all compatibility with old
// states, increment the upper 16 bit value, and clear the lower 16 bits to 0.
static const u32 g_SaveVersion = (0x9A0B << 16) | 0x0000;
static const u32 g_SaveVersion = (0x9A0A << 16) | 0x0000;
// this function is meant to be used in the place of GSfreeze, and provides a safe layer
// between the GS saving function and the MTGS's needs. :)

View File

@ -103,7 +103,6 @@ __fi void vif0FBRST(u32 value) {
vif0.cmd = 0;
vif0.done = true;
vif0ch.chcr.STR = false;
vif0.LoadedMicroProgs = 0;
vif0Regs.err.reset();
vif0Regs.stat.clear_flags(VIF0_STAT_FQC | VIF0_STAT_INT | VIF0_STAT_VSS | VIF0_STAT_VIS | VIF0_STAT_VFS | VIF0_STAT_VPS); // FQC=0
}
@ -178,7 +177,6 @@ __fi void vif1FBRST(u32 value) {
psHu64(VIF1_FIFO) = 0;
psHu64(VIF1_FIFO + 8) = 0;
vif1.done = true;
vif1.LoadedMicroProgs = 0;
vif1ch.chcr.STR = false;
#if USE_OLD_GIF == 1 // ...

View File

@ -312,24 +312,6 @@ vifOp(vifCode_MPG) {
vifX.tag.size = vifNum ? (vifNum*2) : 512;
vifFlush(idx);
//Make a note of the VU programs we're loading, checked in VIF Unpacks
for( u32 i = 0; i < vifX.LoadedMicroProgs; i++ )
{
if(vifX.MicroProgAddrS[i] == vifX.tag.addr)
{
bProgramExists = true;
vifX.MicroProgAddrS[i] = vifX.tag.addr;
vifX.MicroProgAddrE[i] = vifX.tag.addr + (vifX.tag.size * 4);
break;
}
}
if(bProgramExists == false)
{
vifX.MicroProgAddrS[vifX.LoadedMicroProgs] = vifX.tag.addr;
vifX.MicroProgAddrE[vifX.LoadedMicroProgs] = vifX.tag.addr + (vifX.tag.size * 4);
vifX.LoadedMicroProgs++;
}
if(vifX.vifstalled.enabled == true) return 0;
else
{
@ -439,6 +421,7 @@ vifOp(vifCode_Nop) {
pass1 {
GetVifX.cmd = 0;
GetVifX.pass = 0;
vifExecQueue(idx);
}
pass3 { VifCodeLog("Nop"); }
return 1;

View File

@ -93,9 +93,6 @@ struct vifStruct {
bool queued_program;
u32 queued_pc;
u32 LoadedMicroProgs; //Note how many microprograms we have on the VU.
u32 MicroProgAddrS[100]; //Start Addresses
u32 MicroProgAddrE[100]; //End Addresses
};
extern __aligned16 vifStruct vif0, vif1;

View File

@ -185,7 +185,7 @@ __aligned16 const UNPACKFUNCTYPE VIFfuncTable[2][3][4 * 4 * 2 * 2] =
//----------------------------------------------------------------------------
_vifT void vifUnpackSetup(const u32 *data) {
bool bModifyingVUProg = false;
vifStruct& vifX = GetVifX;
if ((vifXRegs.cycle.wl == 0) && (vifXRegs.cycle.wl < vifXRegs.cycle.cl)) {
@ -226,25 +226,6 @@ _vifT void vifUnpackSetup(const u32 *data) {
if (idx && ((addr>>15)&1)) addr += vif1Regs.tops;
vifX.tag.addr = (addr<<4) & (idx ? 0x3ff0 : 0xff0);
//The Snowblind Engine modifies VU programs with unpacks (seemingly),
//however some games (like everblue) don't like the vu waiting until the
//last minute, so as long as the unpack isn't editing a microprogram, we're safe.
if(vifX.queued_program == true && vifX.LoadedMicroProgs > 0)
{
for(u32 i = 0; i < vifX.LoadedMicroProgs; i++)
{
if(vifX.MicroProgAddrS[i] <= vifX.tag.addr && vifX.MicroProgAddrE[i] > vifX.tag.addr)
{
bModifyingVUProg = true;
break;
}
}
if(bModifyingVUProg == false)
vifExecQueue(idx);
}
VIF_LOG("Unpack VIF%x, QWC %x tagsize %x", idx, vifNum, vif0.tag.size);
vifX.cl = 0;