| 47 | } |
| 48 | |
| 49 | void vu1ExecMicro(u32 addr) |
| 50 | { |
| 51 | if (THREAD_VU1) { |
| 52 | VU0.VI[REG_VPU_STAT].UL &= ~0xFF00; |
| 53 | // Okay this is a little bit of a hack, but with good reason. |
| 54 | // Most of the time with MTVU we want to pretend the VU has finished quickly as to gain the benefit from running another thread |
| 55 | // however with T-Bit games when the T-Bit is enabled, it needs to wait in case a T-Bit happens, so we need to set "Busy" |
| 56 | // We shouldn't do this all the time as it negates the extra thread and causes games like Ratchet & Clank to be no faster. |
| 57 | // if (VU0.VI[REG_FBRST].UL & 0x800) |
| 58 | // { |
| 59 | // VU0.VI[REG_VPU_STAT].UL |= 0x0100; |
| 60 | // } |
| 61 | // Update 25/06/2022: Disabled this for now, let games YOLO it, if it breaks MTVU, disable MTVU (it doesn't work properly anyway) - Refraction |
| 62 | vu1Thread.ExecuteVU(addr, vif1Regs.top, vif1Regs.itop, VU0.VI[REG_FBRST].UL); |
| 63 | return; |
| 64 | } |
| 65 | static int count = 0; |
| 66 | vu1Finish(false); |
| 67 | |
| 68 | VUM_LOG("vu1ExecMicro %x (count=%d)", addr, count++); |
| 69 | VU1.cycle = cpuRegs.cycle; |
| 70 | VU0.VI[REG_VPU_STAT].UL &= ~0xFF00; |
| 71 | VU0.VI[REG_VPU_STAT].UL |= 0x0100; |
| 72 | if ((s32)addr != -1) VU1.VI[REG_TPC].UL = addr & 0x7FF; |
| 73 | |
| 74 | CpuVU1->SetStartPC(VU1.VI[REG_TPC].UL << 3); |
| 75 | _vuExecMicroDebug(VU1); |
| 76 | if(!INSTANT_VU1) |
| 77 | CpuVU1->ExecuteBlock(1); |
| 78 | else |
| 79 | CpuVU1->Execute(vu1RunCycles); |
| 80 | } |
| 81 | |
| 82 | void MTVUInterrupt() |
| 83 | { |
no test coverage detected