From 61ebf68196cb60626c8dd5283ee8753f72f39cff Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 23 Jun 2015 15:07:28 -0400 Subject: [PATCH] [RSP] installed op-code strings matrix to COP2 --- Source/RSP/RSP Command.c | 44 ++++++++++++++++++++++------------------ 1 file changed, 24 insertions(+), 20 deletions(-) diff --git a/Source/RSP/RSP Command.c b/Source/RSP/RSP Command.c index fc6137cd3..823e6990e 100644 --- a/Source/RSP/RSP Command.c +++ b/Source/RSP/RSP Command.c @@ -1029,27 +1029,31 @@ char * RSPCop2Name ( DWORD OpCode, DWORD PC ) if ( ( command.rs & 0x10 ) == 0 ) { - switch (command.rs) + if (strcmp(mnemonics_cop2[command.rs], unused_op) == 0) { - case RSP_COP2_MF: - sprintf(CommandName,"MFC2\t%s, $v%d [%d]",GPR_Name(command.rt), - command.rd, command.sa >> 1); - break; - case RSP_COP2_CF: - sprintf(CommandName,"CFC2\t%s, %d",GPR_Name(command.rt), - command.rd % 4); - break; - case RSP_COP2_MT: - sprintf(CommandName,"MTC2\t%s, $v%d [%d]",GPR_Name(command.rt), - command.rd, command.sa >> 1); - break; - case RSP_COP2_CT: - sprintf(CommandName,"CTC2\t%s, %d",GPR_Name(command.rt), - command.rd % 4); - break; - default: - sprintf(CommandName,"RSP: Unknown\t%02X %02X %02X %02X", - command.Ascii[3],command.Ascii[2],command.Ascii[1],command.Ascii[0]); + sprintf(CommandName, "RSP: Unknown\t%02X %02X %02X %02X", + command.Ascii[3], + command.Ascii[2], + command.Ascii[1], + command.Ascii[0] + ); + } + else if (command.rs & 002) /* CFC2 or CTC2 */ + { + sprintf(CommandName, "%s\t%s, %d", + mnemonics_cop2[command.rs], + GPR_Name(command.rt), + command.rd % 4 + ); + } + else + { + sprintf(CommandName, "%s\t%s, $v%d[%d]", + mnemonics_cop2[command.rs], + GPR_Name(command.rt), + command.rd, + command.sa >> 1 + ); } } else