mirror of
https://github.com/TomHarte/CLK.git
synced 2025-01-22 19:31:27 +00:00
Report a 1 in the stack pointer high byte when in emulation mode.
It has one internally, it just wasn't previously exposed via this method.
This commit is contained in:
parent
a72dd96dc6
commit
ecfd17a259
@ -14,7 +14,10 @@ uint16_t ProcessorBase::get_value_of_register(Register r) const {
|
||||
switch (r) {
|
||||
case Register::ProgramCounter: return registers_.pc;
|
||||
case Register::LastOperationAddress: return last_operation_pc_;
|
||||
case Register::StackPointer: return registers_.s.full & (registers_.emulation_flag ? 0xff : 0xffff);
|
||||
case Register::StackPointer:
|
||||
return
|
||||
(registers_.s.full & (registers_.emulation_flag ? 0xff : 0xffff)) |
|
||||
(registers_.emulation_flag ? 0x100 : 0x000);
|
||||
case Register::Flags: return get_flags();
|
||||
case Register::A: return registers_.a.full;
|
||||
case Register::X: return registers_.x.full;
|
||||
|
Loading…
x
Reference in New Issue
Block a user