Bug on RET instruction

This commit is contained in:
Franco Colmenarez 2021-10-18 13:18:15 -05:00
parent aded5fe534
commit 581e1c19d6

View File

@ -724,10 +724,13 @@ impl CPU {
self.registers.increment(Register::SP, 2);
},
// RET, same as POP PC when no parameter is specified
Opcode::RET(params) => match params {
Opcode::RET(params) => {
self.registers.increment(Register::PC, 1);
match params {
OpcodeParameter::NoParam => self.exec(Opcode::POP(Register::PC), bus),
_ => {},
}
};
},
// Rotate A Left
Opcode::RLCA => {
self.registers.increment(Register::PC, 1);