1
0
mirror of https://github.com/TomHarte/CLK.git synced 2024-11-26 08:49:37 +00:00

Factors the half mask into steps count.

This commit is contained in:
Thomas Harte 2020-05-14 00:09:01 -04:00
parent 11d936331d
commit c5b746543b

View File

@ -8,6 +8,8 @@
#include "State.hpp" #include "State.hpp"
#include <cassert>
using namespace CPU::Z80; using namespace CPU::Z80;
State::State(const ProcessorBase &src): State() { State::State(const ProcessorBase &src): State() {
@ -88,10 +90,12 @@ State::State(const ProcessorBase &src): State() {
} else { } else {
// There's no need to determine which opcode because that knowledge is already // There's no need to determine which opcode because that knowledge is already
// contained in the dedicated opcode field. // contained in the dedicated opcode field.
Populate(Operation, current_instruction_page_->instructions[src.operation_]); Populate(Operation, current_instruction_page_->instructions[src.operation_ & src.halt_mask_]);
} }
} }
assert(execution_state.steps_into_phase >= 0);
#undef Populate #undef Populate
#undef ContainedBy #undef ContainedBy
} }