mirror of
https://github.com/TomHarte/CLK.git
synced 2025-01-11 08:30:55 +00:00
Ensures M and X are exposed to the public interface.
This commit is contained in:
parent
28c8ba70c1
commit
ae87728770
@ -15,7 +15,7 @@ uint16_t ProcessorBase::get_value_of_register(Register r) const {
|
||||
case Register::ProgramCounter: return pc_;
|
||||
case Register::LastOperationAddress: return last_operation_pc_;
|
||||
case Register::StackPointer: return s_.full;
|
||||
case Register::Flags: return flags_.get(); // TODO: include additional flags (and below).
|
||||
case Register::Flags: return get_flags();
|
||||
case Register::A: return a_.full;
|
||||
case Register::X: return x_.full;
|
||||
case Register::Y: return y_.full;
|
||||
@ -27,7 +27,7 @@ void ProcessorBase::set_value_of_register(Register r, uint16_t value) {
|
||||
switch (r) {
|
||||
case Register::ProgramCounter: pc_ = value; break;
|
||||
case Register::StackPointer: s_.full = value; break;
|
||||
case Register::Flags: flags_.set(uint8_t(value)); break;
|
||||
case Register::Flags: set_flags(uint8_t(value)); break;
|
||||
case Register::A: a_.full = value; break;
|
||||
case Register::X: x_.full = value; break;
|
||||
case Register::Y: y_.full = value; break;
|
||||
|
@ -1064,7 +1064,7 @@ void ProcessorStorage::set_m_x_flags(bool m, bool x) {
|
||||
x_shift_ = x ? 0 : 8;
|
||||
}
|
||||
|
||||
uint8_t ProcessorStorage::get_flags() {
|
||||
uint8_t ProcessorStorage::get_flags() const {
|
||||
uint8_t result = flags_.get();
|
||||
|
||||
if(!emulation_flag_) {
|
||||
|
@ -316,6 +316,6 @@ struct ProcessorStorage {
|
||||
void set_reset_state();
|
||||
void set_emulation_mode(bool);
|
||||
void set_m_x_flags(bool m, bool x);
|
||||
uint8_t get_flags();
|
||||
uint8_t get_flags() const;
|
||||
void set_flags(uint8_t);
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user