From 03cfe9e6c22044c5b6e333b90c2b0021842fffad Mon Sep 17 00:00:00 2001 From: iCatButler Date: Sat, 2 Jul 2016 16:52:21 +0100 Subject: Additional checks - Change processor transfer functions to use take both source and destination values - Add enum values to all debug functions to double check instructions are correct - Temporarily store instruction codes in interpreter wrappers as these are sometimes changed by branching - Change recompiler wrapper functions to store register values in global variables in case they're changed by the original function --- libpcsxcore/pgxp_debug.h | 117 ++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 111 insertions(+), 6 deletions(-) (limited to 'libpcsxcore/pgxp_debug.h') diff --git a/libpcsxcore/pgxp_debug.h b/libpcsxcore/pgxp_debug.h index 4139108e..b19b3560 100644 --- a/libpcsxcore/pgxp_debug.h +++ b/libpcsxcore/pgxp_debug.h @@ -30,15 +30,120 @@ #include "psxcommon.h" -//#define PGXP_CPU_DEBUG +#define PGXP_CPU_DEBUG // Debug wrappers -void PGXP_psxTraceOp(u32 code); -void PGXP_psxTraceOp1(u32 code, u32 op1); -void PGXP_psxTraceOp2(u32 code, u32 op1, u32 op2); -void PGXP_psxTraceOp3(u32 code, u32 op1, u32 op2, u32 op3); -void PGXP_psxTraceOp4(u32 code, u32 op1, u32 op2, u32 op3, u32 op4); +void PGXP_psxTraceOp(u32 eOp, u32 code); +void PGXP_psxTraceOp1(u32 eOp, u32 code, u32 op1); +void PGXP_psxTraceOp2(u32 eOp, u32 code, u32 op1, u32 op2); +void PGXP_psxTraceOp3(u32 eOp, u32 code, u32 op1, u32 op2, u32 op3); +void PGXP_psxTraceOp4(u32 eOp, u32 code, u32 op1, u32 op2, u32 op3, u32 op4); extern unsigned int pgxp_debug; + +// Op flags +enum PGXP_DBG_Enum +{ + DBG_E_SPECIAL, + DBG_E_REGIMM, + DBG_E_J, + DBG_E_JAL, + DBG_E_BEQ, + DBG_E_BNE, + DBG_E_BLEZ, + DBG_E_BGTZ, + DBG_E_ADDI, + DBG_E_ADDIU, + DBG_E_SLTI, + DBG_E_SLTIU, + DBG_E_ANDI, + DBG_E_ORI, + DBG_E_XORI, + DBG_E_LUI, + DBG_E_COP0, + DBG_E_COP2, + DBG_E_LB, + DBG_E_LH, + DBG_E_LWL, + DBG_E_LW, + DBG_E_LBU, + DBG_E_LHU, + DBG_E_LWR, + DBG_E_SB, + DBG_E_SH, + DBG_E_SWL, + DBG_E_SW, + DBG_E_SWR, + DBG_E_LWC2, + DBG_E_SWC2, + DBG_E_HLE, + DBG_E_SLL, + DBG_E_SRL, + DBG_E_SRA, + DBG_E_SLLV, + DBG_E_SRLV, + DBG_E_SRAV, + DBG_E_JR, + DBG_E_JALR, + DBG_E_SYSCALL, + DBG_E_BREAK, + DBG_E_MFHI, + DBG_E_MTHI, + DBG_E_MFLO, + DBG_E_MTLO, + DBG_E_MULT, + DBG_E_MULTU, + DBG_E_DIV, + DBG_E_DIVU, + DBG_E_ADD, + DBG_E_ADDU, + DBG_E_SUB, + DBG_E_SUBU, + DBG_E_AND, + DBG_E_OR, + DBG_E_XOR, + DBG_E_NOR, + DBG_E_SLT, + DBG_E_SLTU, + DBG_E_BLTZ, + DBG_E_BGEZ, + DBG_E_BLTZAL, + DBG_E_BGEZAL, + DBG_E_MFC0, + DBG_E_CFC0, + DBG_E_MTC0, + DBG_E_CTC0, + DBG_E_RFE, + DBG_E_BASIC, + DBG_E_RTPS, + DBG_E_NCLIP, + DBG_E_OP, + DBG_E_DPCS, + DBG_E_INTPL, + DBG_E_MVMVA, + DBG_E_NCDS, + DBG_E_CDP, + DBG_E_NCDT, + DBG_E_NCCS, + DBG_E_CC, + DBG_E_NCS, + DBG_E_NCT, + DBG_E_SQR, + DBG_E_DCPL, + DBG_E_DPCT, + DBG_E_AVSZ3, + DBG_E_AVSZ4, + DBG_E_RTPT, + DBG_E_GPF, + DBG_E_GPL, + DBG_E_NCCT, + DBG_E_MFC2, + DBG_E_CFC2, + DBG_E_MTC2, + DBG_E_CTC2, + DBG_E_NULL, + DBG_E_ERROR +}; + #endif//_PGXP_DEBUG_H_ \ No newline at end of file -- cgit v1.2.3