mirror of
https://github.com/MoleskiCoder/EightBit.git
synced 2024-06-28 17:29:43 +00:00
Tidy 6502 PLP implementation a little.
Signed-off-by: Adrian Conlon <Adrian.conlon@gmail.com>
This commit is contained in:
parent
ac95670cfc
commit
177dbbcd33
|
@ -54,8 +54,8 @@ int EightBit::MOS6502::step() {
|
||||||
interrupt(IRQvector);
|
interrupt(IRQvector);
|
||||||
returned = 4; // ?? TBC
|
returned = 4; // ?? TBC
|
||||||
} else if (UNLIKELY(lowered(HALT()))) {
|
} else if (UNLIKELY(lowered(HALT()))) {
|
||||||
execute(0); // NOP ??
|
execute(0xea); // NOP
|
||||||
returned = 4; // ?? TBC
|
returned = 2; //
|
||||||
} else {
|
} else {
|
||||||
returned = execute(fetchByte());
|
returned = execute(fetchByte());
|
||||||
}
|
}
|
||||||
|
@ -615,9 +615,7 @@ void EightBit::MOS6502::PHP() {
|
||||||
}
|
}
|
||||||
|
|
||||||
void EightBit::MOS6502::PLP() {
|
void EightBit::MOS6502::PLP() {
|
||||||
P() = pop();
|
P() = (pop() | RF) & ~BF;
|
||||||
P() |= RF; // Reserved flag is always set;
|
|
||||||
P() &= ~BF; // Break flag is never set
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
|
|
Loading…
Reference in New Issue
Block a user