mirror of https://github.com/PCSX2/pcsx2.git
VU: Improved EE Cycle Skipping hack to work better with the new VU0 sync changes
This commit is contained in:
parent
10aced77f0
commit
87dc885a4a
|
@ -330,6 +330,7 @@ void VU_Thread::ExecuteVU(u32 vu_addr, u32 vif_top, u32 vif_itop)
|
|||
KickStart();
|
||||
u32 cycles = std::min(Get_vuCycles(), 3000u);
|
||||
cpuRegs.cycle += cycles * EmuConfig.Speedhacks.EECycleSkip;
|
||||
VU0.cycle += cycles * EmuConfig.Speedhacks.EECycleSkip;
|
||||
}
|
||||
|
||||
void VU_Thread::VifUnpack(vifStruct& _vif, VIFregisters& _vifRegs, u8* data, u32 size)
|
||||
|
|
|
@ -167,7 +167,18 @@ _mVUt void mVUcleanUp() {
|
|||
mVU.regs().cycle += mVU.cycles;
|
||||
|
||||
if (!vuIndex || !THREAD_VU1) {
|
||||
cpuRegs.cycle += std::min(mVU.cycles, 3000u) * EmuConfig.Speedhacks.EECycleSkip;
|
||||
u32 cycles_passed = std::min(mVU.cycles, 3000u) * EmuConfig.Speedhacks.EECycleSkip;
|
||||
if (cycles_passed > 0) {
|
||||
s32 vu0_offset = VU0.cycle - cpuRegs.cycle;
|
||||
cpuRegs.cycle += cycles_passed;
|
||||
|
||||
// VU0 needs to stay in sync with the CPU otherwise things get messy
|
||||
// So we need to adjust when VU1 skips cycles also
|
||||
if (!vuIndex)
|
||||
VU0.cycle = cpuRegs.cycle + vu0_offset;
|
||||
else
|
||||
VU0.cycle += cycles_passed;
|
||||
}
|
||||
}
|
||||
mVU.profiler.Print();
|
||||
//static int ax = 0; ax++;
|
||||
|
|
Loading…
Reference in New Issue