diff --git a/cpu/cpu.cpp b/cpu/cpu.cpp index 989283c..310a077 100644 --- a/cpu/cpu.cpp +++ b/cpu/cpu.cpp @@ -65,8 +65,8 @@ u16 Cpu::readPC16() void Cpu::pushStack8(u8 data) { - bus->write8(state.SP, data); state.SP--; + bus->write8(state.SP, data); } u8 Cpu::popStack8() @@ -78,8 +78,8 @@ u8 Cpu::popStack8() void Cpu::pushStack16(u16 data) { - bus->write16(state.SP,data); state.SP-=2; + bus->write16(state.SP,data); } u16 Cpu::popStack16()