diff --git a/cpu/decoder.cpp b/cpu/decoder.cpp index 1b2d4fe..fb6c6ba 100644 --- a/cpu/decoder.cpp +++ b/cpu/decoder.cpp @@ -456,7 +456,7 @@ void Cpu::executeInstruction() state.stopped = true; break; case 0xE8: // ADD SP, e8 - add16(*this, state.SP, state.SP, (s8)readPC8()); + add16(*this, state.SP, state.SP, (s32)((s8)readPC8())); state.zero = false; mcycles = 4; break;