Tidy 6502 PLP implementation a little.

Signed-off-by: Adrian Conlon <Adrian.conlon@gmail.com>
This commit is contained in:
Adrian Conlon 2018-01-12 20:39:15 +00:00
parent ac95670cfc
commit 177dbbcd33

View File

@ -54,8 +54,8 @@ int EightBit::MOS6502::step() {
interrupt(IRQvector);
returned = 4; // ?? TBC
} else if (UNLIKELY(lowered(HALT()))) {
execute(0); // NOP ??
returned = 4; // ?? TBC
execute(0xea); // NOP
returned = 2; //
} else {
returned = execute(fetchByte());
}
@ -615,9 +615,7 @@ void EightBit::MOS6502::PHP() {
}
void EightBit::MOS6502::PLP() {
P() = pop();
P() |= RF; // Reserved flag is always set;
P() &= ~BF; // Break flag is never set
P() = (pop() | RF) & ~BF;
}
//