From d00e0ed6059f5b14c9899bbf6209ba22fb4d06a5 Mon Sep 17 00:00:00 2001 From: Souzooka Date: Sat, 11 Aug 2018 04:14:08 -1000 Subject: [PATCH] Debugger: Display ACC register. (#2527) Displays/allows ACC VU0f register to be set. --- pcsx2/DebugTools/DebugInterface.cpp | 31 +++++++++++++++++++++++++---- 1 file changed, 27 insertions(+), 4 deletions(-) diff --git a/pcsx2/DebugTools/DebugInterface.cpp b/pcsx2/DebugTools/DebugInterface.cpp index 07c1f1a97c..f70142dae0 100644 --- a/pcsx2/DebugTools/DebugInterface.cpp +++ b/pcsx2/DebugTools/DebugInterface.cpp @@ -348,9 +348,10 @@ int R5900DebugInterface::getRegisterCount(int cat) case EECAT_CP0: case EECAT_FPR: case EECAT_FCR: - case EECAT_VU0F: case EECAT_VU0I: return 32; + case EECAT_VU0F: + return 33; // 32 + ACC default: return 0; } @@ -395,7 +396,13 @@ const char* R5900DebugInterface::getRegisterName(int cat, int num) case EECAT_FCR: return R5900::COP1_REG_FCR[num]; case EECAT_VU0F: - return R5900::COP2_REG_FP[num]; + switch (num) + { + case 32: // ACC + return "ACC"; + default: + return R5900::COP2_REG_FP[num]; + } case EECAT_VU0I: return R5900::COP2_REG_CTL[num]; default: @@ -435,7 +442,15 @@ u128 R5900DebugInterface::getRegister(int cat, int num) result = u128::From32(fpuRegs.fprc[num]); break; case EECAT_VU0F: - result = VU0.VF[num].UQ; + switch (num) + { + case 32: // ACC + result = VU0.ACC.UQ; + break; + default: + result = VU0.VF[num].UQ; + break; + } break; case EECAT_VU0I: result = u128::From32(VU0.VI[num].UL); @@ -519,7 +534,15 @@ void R5900DebugInterface::setRegister(int cat, int num, u128 newValue) fpuRegs.fprc[num] = newValue._u32[0]; break; case EECAT_VU0F: - VU0.VF[num].UQ = newValue; + switch (num) + { + case 32: // ACC + VU0.ACC.UQ = newValue; + break; + default: + VU0.VF[num].UQ = newValue; + break; + } break; case EECAT_VU0I: VU0.VI[num].UL = newValue._u32[0];