CPU/NewRec: Fix lui/mfc0 not getting called in CPU PGXP mode

This commit is contained in:
Stenzek
2023-12-06 16:45:17 +10:00
parent 407049cd91
commit 185af2b039
16 changed files with 468 additions and 458 deletions

View File

@ -47,6 +47,20 @@ union CacheControl
BitField<u32, bool, 11, 1> icache_enable;
};
struct PGXP_value
{
float x;
float y;
float z;
union
{
u32 flags;
u8 compFlags[4];
u16 halfFlags[2];
};
u32 value;
};
struct State
{
// ticks the CPU has executed
@ -93,6 +107,12 @@ struct State
std::array<u8, SCRATCHPAD_SIZE> scratchpad = {};
PGXP_value pgxp_gpr[32];
PGXP_value pgxp_hi;
PGXP_value pgxp_lo;
PGXP_value pgxp_cop0[32];
PGXP_value pgxp_gte[64];
static constexpr u32 GPRRegisterOffset(u32 index) { return offsetof(State, regs.r) + (sizeof(u32) * index); }
static constexpr u32 GTERegisterOffset(u32 index) { return offsetof(State, gte_regs.r32) + (sizeof(u32) * index); }
};