MCPcopy Create free account
hub / github.com/PCSX2/pcsx2 / ExecuteBlock

Method ExecuteBlock

pcsx2/VUmicro.cpp:27–60  ·  view source on GitHub ↗

Executes a Block based on EE delta time

Source from the content-addressed store, hash-verified

25
26// Executes a Block based on EE delta time
27void BaseVUmicroCPU::ExecuteBlock(bool startUp)
28{
29 const u32& stat = VU0.VI[REG_VPU_STAT].UL;
30 const int test = m_Idx ? 0x100 : 1;
31
32 if (m_Idx && THREAD_VU1)
33 {
34 vu1Thread.Get_MTVUChanges();
35 return;
36 }
37
38 if (!(stat & test))
39 {
40 // VU currently flushes XGKICK on VU1 end so no need for this, yet
41 /*if (m_Idx == 1 && VU1.xgkickenable)
42 {
43 _vuXGKICKTransfer((cpuRegs.cycle - VU1.xgkicklastcycle), false);
44 }*/
45 return;
46 }
47
48 if (startUp)
49 {
50 Execute(CalculateMinRunCycles(0, false));
51 }
52 else // Continue Executing
53 {
54 u64 cycle = m_Idx ? VU1.cycle : VU0.cycle;
55 s32 delta = (s32)(u32)(cpuRegs.cycle - cycle);
56
57 if (delta > 0)
58 Execute(CalculateMinRunCycles(delta, false));
59 }
60}
61
62// This function is called by VU0 Macro (COP2) after transferring some
63// EE data to VU0's registers. We want to run VU0 Micro right after this

Callers 7

vif1VUFinishFunction · 0.80
vu1ExecMicroFunction · 0.80
_cpuEventTest_SharedFunction · 0.80
TestClearVUsFunction · 0.80
_vu0runFunction · 0.80
vif0VUFinishFunction · 0.80
vu0ExecMicroFunction · 0.80

Calls 2

CalculateMinRunCyclesFunction · 0.85
Get_MTVUChangesMethod · 0.80

Tested by 1

TestClearVUsFunction · 0.64