mirror of https://github.com/PCSX2/pcsx2.git
VIF: Removed the vu cycle counting craziness mentioned in r4941 comments. It was intended to pretend if the VU "ran" for longer than the VIF did, but it didn't really change a lot :P
Savestate version bump again git-svn-id: http://pcsx2.googlecode.com/svn/trunk@4942 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
parent
d3f286e120
commit
702f71d5f1
|
@ -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 = (0x9A04 << 16) | 0x0000;
|
||||
static const u32 g_SaveVersion = (0x9A05 << 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. :)
|
||||
|
|
|
@ -47,8 +47,6 @@ void SaveStateBase::vif0Freeze()
|
|||
FreezeTag("VIF0dma");
|
||||
|
||||
Freeze(g_vif0Cycles);
|
||||
Freeze(g_vu0Cycles);
|
||||
Freeze(g_packetsizeonvu0);
|
||||
|
||||
Freeze(vif0);
|
||||
|
||||
|
@ -61,8 +59,6 @@ void SaveStateBase::vif1Freeze()
|
|||
FreezeTag("VIF1dma");
|
||||
|
||||
Freeze(g_vif1Cycles);
|
||||
Freeze(g_vu1Cycles);
|
||||
Freeze(g_packetsizeonvu1);
|
||||
|
||||
Freeze(vif1);
|
||||
|
||||
|
|
|
@ -25,20 +25,6 @@ u32 g_vif0Cycles = 0;
|
|||
// because its vif stalling not the EE core...
|
||||
__fi void vif0FLUSH()
|
||||
{
|
||||
if(g_packetsizeonvu0 > vif0.vifpacketsize && g_vu0Cycles > 0)
|
||||
{
|
||||
//DevCon.Warning("Adding on same packet");
|
||||
if( ((g_packetsizeonvu0 - vif0.vifpacketsize) >> 1) > g_vu0Cycles)
|
||||
g_vu0Cycles -= (g_packetsizeonvu0 - vif0.vifpacketsize) >> 1;
|
||||
else g_vu0Cycles = 0;
|
||||
}
|
||||
if(g_vu0Cycles > 0)
|
||||
{
|
||||
//DevCon.Warning("Adding %x cycles to VIF0", g_vu0Cycles * BIAS);
|
||||
g_vif0Cycles += g_vu0Cycles;
|
||||
g_vu0Cycles = 0;
|
||||
}
|
||||
g_vu0Cycles = 0;
|
||||
if (!(VU0.VI[REG_VPU_STAT].UL & 1)) return;
|
||||
if(VU0.flags & VUFLAG_MFLAGSET)
|
||||
{
|
||||
|
@ -249,7 +235,6 @@ void dmaVIF0()
|
|||
vif0ch.tadr, vif0ch.asr0, vif0ch.asr1);
|
||||
|
||||
g_vif0Cycles = 0;
|
||||
g_vu0Cycles = 0;
|
||||
//if(vif0.irqoffset != 0 && vif0.vifstalled == true) DevCon.Warning("Offset on VIF0 start! offset %x, Progress %x", vif0.irqoffset, vif0.vifstalled);
|
||||
/*vif0.irqoffset = 0;
|
||||
vif0.vifstalled = false;
|
||||
|
|
|
@ -25,21 +25,6 @@ u32 g_vif1Cycles = 0;
|
|||
|
||||
__fi void vif1FLUSH()
|
||||
{
|
||||
if(g_packetsizeonvu1 > vif1.vifpacketsize && g_vu1Cycles > 0)
|
||||
{
|
||||
//DevCon.Warning("Adding on same packet");
|
||||
if( ((g_packetsizeonvu1 - vif1.vifpacketsize) >> 1) > g_vu1Cycles)
|
||||
g_vu1Cycles -= (g_packetsizeonvu1 - vif1.vifpacketsize) >> 1;
|
||||
else g_vu1Cycles = 0;
|
||||
}
|
||||
if(g_vu1Cycles > 0)
|
||||
{
|
||||
//DevCon.Warning("Adding %x cycles to VIF1", g_vu1Cycles * BIAS);
|
||||
g_vif1Cycles += g_vu1Cycles;
|
||||
g_vu1Cycles = 0;
|
||||
|
||||
}
|
||||
g_vu1Cycles = 0;//else DevCon.Warning("VIF1 Different Packet, how can i work this out :/");
|
||||
if (VU0.VI[REG_VPU_STAT].UL & 0x100)
|
||||
{
|
||||
int _cycles = VU1.cycle;
|
||||
|
@ -344,7 +329,6 @@ __fi void vif1Interrupt()
|
|||
vif1ch.chcr.STR = false;
|
||||
vif1.vifstalled = false;
|
||||
g_vif1Cycles = 0;
|
||||
g_vu1Cycles = 0;
|
||||
DMA_LOG("VIF1 DMA End");
|
||||
hwDmacIrq(DMAC_VIF1);
|
||||
|
||||
|
@ -364,7 +348,6 @@ void dmaVIF1()
|
|||
vif1.vifstalled = false;
|
||||
vif1.inprogress = 0;*/
|
||||
g_vif1Cycles = 0;
|
||||
g_vu1Cycles = 0;
|
||||
|
||||
#ifdef PCSX2_DEVBUILD
|
||||
if (dmacRegs.ctrl.STD == STD_VIF1)
|
||||
|
|
|
@ -20,10 +20,6 @@
|
|||
#include "Vif_Dma.h"
|
||||
|
||||
u16 vifqwc = 0;
|
||||
u32 g_vu0Cycles = 0;
|
||||
u32 g_vu1Cycles = 0;
|
||||
u32 g_packetsizeonvu0 = 0;
|
||||
u32 g_packetsizeonvu1 = 0;
|
||||
|
||||
|
||||
static u32 qwctag(u32 mask)
|
||||
|
|
|
@ -41,7 +41,6 @@ static __fi void vifFlush(int idx) {
|
|||
|
||||
static __fi void vuExecMicro(int idx, u32 addr) {
|
||||
VIFregisters& vifRegs = vifXRegs;
|
||||
int startcycles = 0;
|
||||
//vifFlush(idx);
|
||||
|
||||
//if(vifX.vifstalled == true) return;
|
||||
|
@ -70,17 +69,9 @@ static __fi void vuExecMicro(int idx, u32 addr) {
|
|||
}
|
||||
}
|
||||
|
||||
if (!idx) startcycles = VU0.cycle;
|
||||
else startcycles = VU1.cycle;
|
||||
|
||||
if (!idx) vu0ExecMicro(addr);
|
||||
else vu1ExecMicro(addr);
|
||||
|
||||
if (!idx || !THREAD_VU1) {
|
||||
if (!idx) { g_vu0Cycles += (VU0.cycle-startcycles); g_packetsizeonvu0 = vif0.vifpacketsize; }
|
||||
else { g_vu1Cycles += (VU1.cycle-startcycles); g_packetsizeonvu1 = vif1.vifpacketsize; }
|
||||
}
|
||||
//DevCon.Warning("Ran VU%x, VU0 Cycles %x, VU1 Cycles %x, start %x cycle %x", idx, g_vu0Cycles, g_vu1Cycles, startcycles, VU1.cycle);
|
||||
GetVifX.vifstalled = true;
|
||||
}
|
||||
|
||||
|
|
|
@ -119,9 +119,6 @@ static const unsigned int VIF1intc = 5;
|
|||
|
||||
extern u32 g_vif0Cycles;
|
||||
extern u32 g_vif1Cycles;
|
||||
extern u32 g_vu0Cycles;
|
||||
extern u32 g_vu1Cycles;
|
||||
extern u32 g_packetsizeonvu0;
|
||||
extern u32 g_packetsizeonvu1;
|
||||
|
||||
extern void vif0FLUSH();
|
||||
extern void vif1FLUSH();
|
||||
|
|
|
@ -121,23 +121,6 @@ _vifT static __fi bool vifTransfer(u32 *data, int size, bool TTE) {
|
|||
vifTransferLoop<idx>(data);
|
||||
|
||||
transferred += size - vifX.vifpacketsize;
|
||||
if (!idx) {
|
||||
g_packetsizeonvu0 = size;
|
||||
g_vif0Cycles +=((transferred * BIAS) >> 2) ; /* guessing */
|
||||
}
|
||||
else {
|
||||
g_packetsizeonvu1 = size;
|
||||
g_vif1Cycles +=((transferred * BIAS) >> 2) ; /* guessing */
|
||||
}
|
||||
|
||||
if(!idx && g_vu0Cycles > 0) {
|
||||
if (g_vif0Cycles < g_vu0Cycles) g_vu0Cycles -= g_vif0Cycles;
|
||||
elif(g_vif0Cycles >= g_vu0Cycles) g_vu0Cycles = 0;
|
||||
}
|
||||
if (idx && g_vu1Cycles > 0) {
|
||||
if (g_vif1Cycles < g_vu1Cycles) g_vu1Cycles -= g_vif1Cycles;
|
||||
elif(g_vif1Cycles >= g_vu1Cycles) g_vu1Cycles = 0;
|
||||
}
|
||||
|
||||
vifX.irqoffset = transferred % 4; // cannot lose the offset
|
||||
|
||||
|
|
Loading…
Reference in New Issue