Correct a couple of flag anomalies in the 6502 processor highlighted by NESTEST

Signed-off-by: Adrian Conlon <Adrian.conlon@gmail.com>
This commit is contained in:
Adrian Conlon 2017-12-28 15:53:30 +00:00
parent dcf99bf65d
commit 1946b7ef39

View File

@ -510,12 +510,13 @@ void EightBit::MOS6502::Branch(bool flag) {
//
void EightBit::MOS6502::PHP() {
//setFlag(P(), BF);
push(P() | BF);
}
void EightBit::MOS6502::PLP() {
P() = pop() | RF & (~BF);
P() = pop();
P() |= RF; // Reserved flag is always set;
P() &= ~BF; // Break flag is never set
}
//