pcsx2/pcsx2/COP2.cpp
TellowKrinkle 8fd91cb7df
Some checks are pending
🐧 Linux Builds / AppImage (push) Waiting to run
🐧 Linux Builds / Flatpak (push) Waiting to run
🍎 MacOS Builds / Defaults (push) Waiting to run
🖥️ Windows Builds / Lint VS Project Files (push) Waiting to run
🖥️ Windows Builds / SSE4 (push) Blocked by required conditions
🖥️ Windows Builds / AVX2 (push) Blocked by required conditions
🖥️ Windows Builds / CMake (push) Waiting to run
Formatting: Apply AlignWithSpaces
2025-07-31 15:20:27 +02:00

70 lines
1.1 KiB
C++

// SPDX-FileCopyrightText: 2002-2025 PCSX2 Dev Team
// SPDX-License-Identifier: GPL-3.0+
#include "Common.h"
#include "R5900OpcodeTables.h"
#include "VUmicro.h"
using namespace R5900;
using namespace R5900::Interpreter;
#define CP2COND (((VU0.VI[REG_VPU_STAT].US[0] >> 8) & 1))
//#define CP2COND (vif1Regs.stat.VEW)
//Run the FINISH either side of the VCALL's as we have no control over it past here.
void VCALLMS()
{
_vu0FinishMicro();
vu0ExecMicro(((cpuRegs.code >> 6) & 0x7FFF));
//vif0Regs.stat.VEW = false;
}
void VCALLMSR()
{
_vu0FinishMicro();
vu0ExecMicro(VU0.VI[REG_CMSAR0].US[0]);
//vif0Regs.stat.VEW = false;
}
void BC2F()
{
if (CP2COND == 0)
{
Console.WriteLn("VU0 Macro Branch");
intDoBranch(_BranchTarget_);
}
}
void BC2T()
{
if (CP2COND == 1)
{
Console.WriteLn("VU0 Macro Branch");
intDoBranch(_BranchTarget_);
}
}
void BC2FL()
{
if (CP2COND == 0)
{
Console.WriteLn("VU0 Macro Branch");
intDoBranch(_BranchTarget_);
}
else
{
cpuRegs.pc += 4;
}
}
void BC2TL()
{
if (CP2COND == 1)
{
Console.WriteLn("VU0 Macro Branch");
intDoBranch(_BranchTarget_);
}
else
{
cpuRegs.pc += 4;
}
}