1
0
mirror of https://github.com/TomHarte/CLK.git synced 2026-04-25 11:17:26 +00:00

Shifts responsibility for refresh into the fetch-decode-execute sequence.

This commit is contained in:
Thomas Harte
2021-04-11 22:50:24 -04:00
parent 015556cc91
commit 9cde7c12ba
3 changed files with 176 additions and 180 deletions
@@ -92,18 +92,15 @@ template < class T,
case MicroOp::MoveToNextProgram:
advance_operation();
break;
case MicroOp::DecodeOperation:
case MicroOp::IncrementR:
refresh_addr_ = ir_;
ir_.halves.low = (ir_.halves.low & 0x80) | ((ir_.halves.low + current_instruction_page_->r_step) & 0x7f);
break;
case MicroOp::DecodeOperation:
pc_.full += pc_increment_ & uint16_t(halt_mask_);
scheduled_program_counter_ = current_instruction_page_->instructions[operation_ & halt_mask_];
flag_adjustment_history_ <<= 1;
break;
case MicroOp::DecodeOperationNoRChange:
refresh_addr_ = ir_;
pc_.full += pc_increment_ & uint16_t(halt_mask_);
scheduled_program_counter_ = current_instruction_page_->instructions[operation_ & halt_mask_];
break;
case MicroOp::Increment8NoFlags: ++ *static_cast<uint8_t *>(operation->source); break;
case MicroOp::Increment16: ++ *static_cast<uint16_t *>(operation->source); break;
@@ -931,7 +928,7 @@ template < class T,
return wait_line_;
}
#define isTerminal(n) (n == MicroOp::MoveToNextProgram || n == MicroOp::DecodeOperation || n == MicroOp::DecodeOperationNoRChange)
#define isTerminal(n) (n == MicroOp::MoveToNextProgram || n == MicroOp::DecodeOperation)
template < class T,
bool uses_bus_request,