LR35902: Add missing M-state to CALL
Jeffrey Pfau jeffrey@endrift.com
Wed, 27 Jan 2016 20:18:39 -0800
1 files changed,
6 insertions(+),
2 deletions(-)
jump to
M
src/lr35902/isa-lr35902.c
→
src/lr35902/isa-lr35902.c
@@ -72,6 +72,10 @@ cpu->sp = cpu->index;
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 @@ cpu->index = cpu->sp - 1;
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,