From d9082a0c51ad5156d62560d5d0b7d3a3eacf8cf4 Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 7 Sep 2015 16:36:08 -0400 Subject: [PATCH] [RSP] bad DMEM offsets when (offset < 0) --- Source/RSP/RSP Command.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/Source/RSP/RSP Command.c b/Source/RSP/RSP Command.c index cc95a272b..e83178bfa 100644 --- a/Source/RSP/RSP Command.c +++ b/Source/RSP/RSP Command.c @@ -26,6 +26,8 @@ #include #include +#include + #include "opcode.h" #include "RSP.h" #include "CPU.h" @@ -1090,11 +1092,12 @@ char * RSPLc2Name ( DWORD OpCode, DWORD PC ) { sprintf( CommandName, - "%s\t$v%d[%d], 0x%04X(%s)", + "%s\t$v%d[%d], %c0x%03X(%s)", mnemonics_lwc2[command.rd], command.rt, command.del, - command.voffset, + (command.voffset < 0) ? '-' : '+', + abs(command.voffset), GPR_Name(command.base) ); } @@ -1123,11 +1126,12 @@ char * RSPSc2Name ( DWORD OpCode, DWORD PC ) { sprintf( CommandName, - "%s\t$v%d[%d], 0x%04X(%s)", + "%s\t$v%d[%d], %c0x%03X(%s)", mnemonics_swc2[command.rd], command.rt, command.del, - command.voffset, + (command.voffset < 0) ? '-' : '+', + abs(command.voffset), GPR_Name(command.base) ); }