RSP: Add delay slot done

This commit is contained in:
zilmar 2013-01-29 21:45:45 +11:00
parent a05ff4f3c2
commit 2c78b14b47
2 changed files with 9 additions and 7 deletions

View File

@ -30,6 +30,7 @@
#include <stdlib.h> #include <stdlib.h>
#include "RSP.h" #include "RSP.h"
#include "Cpu.h" #include "Cpu.h"
#include "Interpreter CPU.h"
#include "Recompiler CPU.h" #include "Recompiler CPU.h"
#include "Recompiler Ops.h" #include "Recompiler Ops.h"
#include "RSP registers.h" #include "RSP registers.h"
@ -849,6 +850,10 @@ void CompilerRSPBlock ( void ) {
NextInstruction = DELAY_SLOT_DONE; NextInstruction = DELAY_SLOT_DONE;
CompilePC -= 4; CompilePC -= 4;
break; break;
case DELAY_SLOT_EXIT:
NextInstruction = DELAY_SLOT_EXIT_DONE;
CompilePC -= 4;
break;
case FINISH_SUB_BLOCK: case FINISH_SUB_BLOCK:
NextInstruction = NORMAL; NextInstruction = NORMAL;
CompilePC += 8; CompilePC += 8;
@ -933,6 +938,10 @@ DWORD RunRecompilerCPU ( DWORD Cycles ) {
if (Profiling && IndvidualBlock) { if (Profiling && IndvidualBlock) {
StopTimer(); StopTimer();
} }
if (RSP_NextInstruction == SINGLE_STEP)
{
RSP_Running = FALSE;
}
} }
if (IsMmxEnabled == TRUE) { if (IsMmxEnabled == TRUE) {

View File

@ -26,13 +26,6 @@
#include "opcode.h" #include "opcode.h"
#define NORMAL 0
#define DO_DELAY_SLOT 1
#define DELAY_SLOT 2
#define DELAY_SLOT_DONE 3
#define FINISH_BLOCK 4
#define FINISH_SUB_BLOCK 5
extern DWORD CompilePC, NextInstruction; extern DWORD CompilePC, NextInstruction;
extern BOOL ChangedPC; extern BOOL ChangedPC;