mirror of https://github.com/PCSX2/pcsx2.git
VU: Remove unused code in VUmicro
Some of that is not used for more than 10 years. Not even useful for testing now.
This commit is contained in:
parent
a1bf677514
commit
6a4e93db3c
|
@ -17,15 +17,11 @@
|
|||
#include "Common.h"
|
||||
#include "VUmicro.h"
|
||||
|
||||
#define useDeltaTime 1
|
||||
|
||||
#if useDeltaTime
|
||||
|
||||
// Executes a Block based on EE delta time
|
||||
void BaseVUmicroCPU::ExecuteBlock(bool startUp) {
|
||||
const u32& stat = VU0.VI[REG_VPU_STAT].UL;
|
||||
const int test = m_Idx ? 0x100 : 1;
|
||||
const int s = EmuConfig.Gamefixes.VU0KickstartHack ? 2048 : 0; // Kick Start Cycles (Silver Surfer, POP:SOT, Lotus needs this amount)
|
||||
const int s = EmuConfig.Gamefixes.VU0KickstartHack ? 16 : 0; // Kick Start Cycles (Jak needs at least 4, DT Racer needs 8192)
|
||||
|
||||
if (!(stat & test)) return;
|
||||
|
||||
|
@ -62,14 +58,6 @@ void BaseVUmicroCPU::ExecuteBlockJIT(BaseVUmicroCPU* cpu) {
|
|||
const int test = cpu->m_Idx ? 0x100 : 1;
|
||||
|
||||
if (stat & test) { // VU is running
|
||||
#ifdef PCSX2_DEVBUILD
|
||||
static int warn = 5;
|
||||
if (warn > 0){
|
||||
DevCon.Warning("Rare case: VU0 Macro (COP2) op forcing a VU0 Micro update.");
|
||||
warn--;
|
||||
}
|
||||
#endif
|
||||
|
||||
u32 cycle = cpu->m_Idx ? VU1.cycle : VU0.cycle;
|
||||
s32 delta = (s32)(u32)(cpuRegs.cycle - cycle);
|
||||
if (delta > 0) { // Enough time has passed
|
||||
|
@ -83,36 +71,3 @@ void BaseVUmicroCPU::ExecuteBlockJIT(BaseVUmicroCPU* cpu) {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
#else
|
||||
|
||||
// Executes a Block based on static preset cycles
|
||||
void BaseVUmicroCPU::ExecuteBlock(bool startUp) {
|
||||
const int vuRunning = m_Idx ? 0x100 : 1;
|
||||
if (!(VU0.VI[REG_VPU_STAT].UL & vuRunning)) return;
|
||||
if (startUp) { // Start Executing a microprogram
|
||||
Execute(vu0RunCycles); // Kick start VU
|
||||
|
||||
// If the VU0 program didn't finish then we'll want to finish it up
|
||||
// pretty soon. This fixes vmhacks in some games (Naruto Ultimate Ninja 2)
|
||||
if(VU0.VI[REG_VPU_STAT].UL & vuRunning)
|
||||
cpuSetNextEventDelta( 192 ); // fixme : ideally this should be higher, like 512 or so.
|
||||
}
|
||||
else {
|
||||
Execute(vu0RunCycles);
|
||||
//DevCon.Warning("VU0 running when in BranchTest");
|
||||
|
||||
// This helps keep the EE and VU0 in sync.
|
||||
// Check Silver Surfer. Currently has SPS varying with different branch deltas set below.
|
||||
if(VU0.VI[REG_VPU_STAT].UL & vuRunning)
|
||||
cpuSetNextEventDelta( 768 );
|
||||
}
|
||||
}
|
||||
|
||||
// This function is called by VU0 Macro (COP2) after transferring
|
||||
// EE data to a VU0 register...
|
||||
void __fastcall BaseVUmicroCPU::ExecuteBlockJIT(BaseVUmicroCPU* cpu) {
|
||||
cpu->Execute(128);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
|
@ -29,8 +29,6 @@ static const uint VU0_PROGMASK = VU0_PROGSIZE-1;
|
|||
static const uint VU1_MEMMASK = VU1_MEMSIZE-1;
|
||||
static const uint VU1_PROGMASK = VU1_PROGSIZE-1;
|
||||
|
||||
#define vuRunCycles (512*12) // Cycles to run ExecuteBlockJIT() for (called from within recs)
|
||||
#define vu0RunCycles (512*12) // Cycles to run vu0 for whenever ExecuteBlock() is called
|
||||
#define vu1RunCycles (3000000) // mVU1 uses this for inf loop detection on dev builds
|
||||
|
||||
// --------------------------------------------------------------------------------------
|
||||
|
@ -120,11 +118,9 @@ public:
|
|||
class BaseVUmicroCPU : public BaseCpuProvider {
|
||||
public:
|
||||
int m_Idx;
|
||||
u32 m_lastEEcycles;
|
||||
|
||||
BaseVUmicroCPU() {
|
||||
m_Idx = 0;
|
||||
m_lastEEcycles = 0;
|
||||
}
|
||||
virtual ~BaseVUmicroCPU() = default;
|
||||
|
||||
|
@ -147,10 +143,6 @@ public:
|
|||
// clamping in recs and ints, it's not really worth bothering with yet.
|
||||
}
|
||||
|
||||
// Execute VU for the number of VU cycles (recs might go over 0~30 cycles)
|
||||
// virtual void Execute(u32 cycles)=0;
|
||||
|
||||
// Executes a Block based on static preset cycles OR
|
||||
// Executes a Block based on EE delta time (see VUmicro.cpp)
|
||||
virtual void ExecuteBlock(bool startUp=0);
|
||||
|
||||
|
|
Loading…
Reference in New Issue