mirror of
https://github.com/MoleskiCoder/EightBit.git
synced 2025-01-11 02:29:50 +00:00
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:
parent
dcf99bf65d
commit
1946b7ef39
@ -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
|
||||
}
|
||||
|
||||
//
|
||||
|
Loading…
x
Reference in New Issue
Block a user