mirror of
https://github.com/TomHarte/CLK.git
synced 2025-02-20 14:29:11 +00:00
Add restart_operation_fetch
, to aid with testing.
This commit is contained in:
parent
b62f484d93
commit
586ef4810b
@ -45,7 +45,8 @@ class ProcessorBase: protected ProcessorStorage {
|
|||||||
inline bool get_is_resetting() const;
|
inline bool get_is_resetting() const;
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
Returns the current state of all lines not ordinarily pushed to the BusHandler.
|
Returns the current state of all lines not ordinarily pushed to the BusHandler,
|
||||||
|
as listed in the ExtendedBusOutput enum.
|
||||||
*/
|
*/
|
||||||
inline int get_extended_bus_output();
|
inline int get_extended_bus_output();
|
||||||
|
|
||||||
@ -54,6 +55,12 @@ class ProcessorBase: protected ProcessorStorage {
|
|||||||
*/
|
*/
|
||||||
inline bool is_jammed() const;
|
inline bool is_jammed() const;
|
||||||
|
|
||||||
|
/*!
|
||||||
|
FOR TESTING PURPOSES ONLY: forces the processor into a state where
|
||||||
|
the next thing it intends to do is fetch a new opcode.
|
||||||
|
*/
|
||||||
|
inline void restart_operation_fetch();
|
||||||
|
|
||||||
void set_value_of_register(Register r, uint16_t value);
|
void set_value_of_register(Register r, uint16_t value);
|
||||||
uint16_t get_value_of_register(Register r) const;
|
uint16_t get_value_of_register(Register r) const;
|
||||||
};
|
};
|
||||||
|
@ -1065,3 +1065,10 @@ int ProcessorBase::get_extended_bus_output() {
|
|||||||
(registers_.mx_flags[1] ? ExtendedBusOutput::IndexSize : 0) |
|
(registers_.mx_flags[1] ? ExtendedBusOutput::IndexSize : 0) |
|
||||||
(registers_.emulation_flag ? ExtendedBusOutput::Emulation : 0);
|
(registers_.emulation_flag ? ExtendedBusOutput::Emulation : 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void ProcessorBase::restart_operation_fetch() {
|
||||||
|
// Find a OperationMoveToNextProgram, so that the main loop can make
|
||||||
|
// relevant decisions.
|
||||||
|
next_op_ = micro_ops_.data();
|
||||||
|
while(*next_op_ != OperationMoveToNextProgram) ++next_op_;
|
||||||
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user