This function is called by VU0 Macro (COP2) after transferring some EE data to VU0's registers. We want to run VU0 Micro right after this to ensure that the register is used at the correct time. This fixes spinning/hanging in some games like Ratchet and Clank's Intro.
| 64 | // to ensure that the register is used at the correct time. |
| 65 | // This fixes spinning/hanging in some games like Ratchet and Clank's Intro. |
| 66 | void BaseVUmicroCPU::ExecuteBlockJIT(BaseVUmicroCPU* cpu, bool interlocked) |
| 67 | { |
| 68 | const u32& stat = VU0.VI[REG_VPU_STAT].UL; |
| 69 | constexpr int test = 1; |
| 70 | |
| 71 | if (stat & test) |
| 72 | { // VU is running |
| 73 | s64 delta = (s64)(u64)(cpuRegs.cycle - VU0.cycle); |
| 74 | |
| 75 | if (delta > 0) |
| 76 | { |
| 77 | cpu->Execute(CalculateMinRunCycles(delta, interlocked)); // Execute the time since the last call |
| 78 | } |
| 79 | } |
| 80 | } |
nothing calls this directly
no test coverage detected