mirror of
https://github.com/TomHarte/CLK.git
synced 2024-11-23 03:32:32 +00:00
Merge branch 'master' of github.com:TomHarte/CLK
This commit is contained in:
commit
28ccb7b54e
@ -188,6 +188,12 @@ template <class T, bool dtack_is_implicit, bool signal_will_perform> void Proces
|
|||||||
|
|
||||||
case BusStep::Action::AdvancePrefetch:
|
case BusStep::Action::AdvancePrefetch:
|
||||||
prefetch_queue_.halves.high = prefetch_queue_.halves.low;
|
prefetch_queue_.halves.high = prefetch_queue_.halves.low;
|
||||||
|
|
||||||
|
// During prefetch advance seems to be the only time the interrupt inputs are sampled;
|
||||||
|
// TODO: determine whether this really happens on *every* advance.
|
||||||
|
if(bus_interrupt_level_ > interrupt_level_) {
|
||||||
|
pending_interrupt_level_ = bus_interrupt_level_;
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -199,6 +205,7 @@ template <class T, bool dtack_is_implicit, bool signal_will_perform> void Proces
|
|||||||
// If an interrupt (TODO: or reset) has finally arrived that will be serviced,
|
// If an interrupt (TODO: or reset) has finally arrived that will be serviced,
|
||||||
// exit the STOP.
|
// exit the STOP.
|
||||||
if(bus_interrupt_level_ > interrupt_level_) {
|
if(bus_interrupt_level_ > interrupt_level_) {
|
||||||
|
pending_interrupt_level_ = bus_interrupt_level_;
|
||||||
execution_state_ = ExecutionState::BeginInterrupt;
|
execution_state_ = ExecutionState::BeginInterrupt;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
@ -254,7 +261,7 @@ template <class T, bool dtack_is_implicit, bool signal_will_perform> void Proces
|
|||||||
// Either the micro-operations for this instruction have been exhausted, or
|
// Either the micro-operations for this instruction have been exhausted, or
|
||||||
// no instruction was ongoing. Either way, do a standard instruction operation.
|
// no instruction was ongoing. Either way, do a standard instruction operation.
|
||||||
|
|
||||||
if(bus_interrupt_level_ > interrupt_level_) {
|
if(pending_interrupt_level_) {
|
||||||
execution_state_ = ExecutionState::BeginInterrupt;
|
execution_state_ = ExecutionState::BeginInterrupt;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -1963,7 +1970,8 @@ template <class T, bool dtack_is_implicit, bool signal_will_perform> void Proces
|
|||||||
// a real 68000 uses the lower data strobe to collect the corresponding vector byte.
|
// a real 68000 uses the lower data strobe to collect the corresponding vector byte.
|
||||||
//
|
//
|
||||||
// Cf. M68000 8-/16-/32-BIT MICROPROCESSORS USER'S MANUAL 5.1.4.
|
// Cf. M68000 8-/16-/32-BIT MICROPROCESSORS USER'S MANUAL 5.1.4.
|
||||||
accepted_interrupt_level_ = interrupt_level_ = bus_interrupt_level_;
|
accepted_interrupt_level_ = interrupt_level_ = pending_interrupt_level_;
|
||||||
|
pending_interrupt_level_ = 0;
|
||||||
effective_address_[0].full = 0xfffffff1 | uint32_t(accepted_interrupt_level_ << 1);
|
effective_address_[0].full = 0xfffffff1 | uint32_t(accepted_interrupt_level_ << 1);
|
||||||
|
|
||||||
// Recede the program counter to where it would have been were there no
|
// Recede the program counter to where it would have been were there no
|
||||||
|
@ -62,6 +62,11 @@ class ProcessorStorage {
|
|||||||
bool bus_acknowledge_ = false;
|
bool bus_acknowledge_ = false;
|
||||||
bool halt_ = false;
|
bool halt_ = false;
|
||||||
|
|
||||||
|
// Holds the interrupt level that should be serviced at the next instruction
|
||||||
|
// dispatch, if any.
|
||||||
|
int pending_interrupt_level_ = 0;
|
||||||
|
// Holds the interrupt level that is currently being serviced.
|
||||||
|
// TODO: surely this doesn't need to be distinct from the pending_interrupt_level_?
|
||||||
int accepted_interrupt_level_ = 0;
|
int accepted_interrupt_level_ = 0;
|
||||||
bool is_starting_interrupt_ = false;
|
bool is_starting_interrupt_ = false;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user