LR35902: Add missing M-state to CALL

This commit is contained in:
Jeffrey Pfau 2016-01-27 20:18:39 -08:00
parent 7c087d5cb9
commit 3b279b3fbe
1 changed files with 6 additions and 2 deletions

View File

@ -72,6 +72,10 @@ DEFINE_INSTRUCTION_LR35902(CALLUpdateSPL,
cpu->executionState = LR35902_CORE_MEMORY_STORE;
cpu->instruction = _LR35902InstructionNOP;)
DEFINE_INSTRUCTION_LR35902(CALLUpdateSPH,
cpu->executionState = LR35902_CORE_MEMORY_STORE;
cpu->instruction = _LR35902InstructionCALLUpdateSPL;)
DEFINE_INSTRUCTION_LR35902(CALLUpdatePCH,
if (cpu->condition) {
int newPc = (cpu->bus << 8) | cpu->index;
@ -80,8 +84,8 @@ DEFINE_INSTRUCTION_LR35902(CALLUpdatePCH,
cpu->sp = cpu->pc; // GROSS
cpu->pc = newPc;
cpu->memory.setActiveRegion(cpu, cpu->pc);
cpu->executionState = LR35902_CORE_MEMORY_STORE;
cpu->instruction = _LR35902InstructionCALLUpdateSPL;
cpu->executionState = LR35902_CORE_OP2;
cpu->instruction = _LR35902InstructionCALLUpdateSPH;
})
DEFINE_INSTRUCTION_LR35902(CALLUpdatePCL,