mirror of
https://github.com/TomHarte/CLK.git
synced 2025-08-09 05:25:01 +00:00
Merge branch 'STOPMk2' into InAmiga
This commit is contained in:
@@ -27,6 +27,7 @@ enum ExecutionState: int {
|
|||||||
Reset = std::numeric_limits<int>::min(),
|
Reset = std::numeric_limits<int>::min(),
|
||||||
Decode,
|
Decode,
|
||||||
WaitForDTACK,
|
WaitForDTACK,
|
||||||
|
WaitForInterrupt,
|
||||||
|
|
||||||
StoreOperand,
|
StoreOperand,
|
||||||
StoreOperand_bw,
|
StoreOperand_bw,
|
||||||
@@ -377,14 +378,20 @@ void Processor<BusHandler, dtack_is_implicit, permit_overrun, signal_will_perfor
|
|||||||
}
|
}
|
||||||
MoveToStateSpecific(WaitForDTACK);
|
MoveToStateSpecific(WaitForDTACK);
|
||||||
|
|
||||||
// Spin in place until an interrupt arrives.
|
|
||||||
BeginState(STOP):
|
BeginState(STOP):
|
||||||
IdleBus(1);
|
// Apply the suffix status.
|
||||||
|
status_.set_status(operand_[0].w);
|
||||||
|
did_update_status();
|
||||||
|
[[fallthrough]];
|
||||||
|
|
||||||
|
BeginState(WaitForInterrupt):
|
||||||
|
// Spin in place until an interrupt arrives.
|
||||||
captured_interrupt_level_ = bus_interrupt_level_;
|
captured_interrupt_level_ = bus_interrupt_level_;
|
||||||
if(status_.would_accept_interrupt(captured_interrupt_level_)) {
|
if(status_.would_accept_interrupt(captured_interrupt_level_)) {
|
||||||
MoveToStateSpecific(DoInterrupt);
|
MoveToStateSpecific(DoInterrupt);
|
||||||
}
|
}
|
||||||
MoveToStateSpecific(STOP);
|
IdleBus(1);
|
||||||
|
MoveToStateSpecific(WaitForInterrupt);
|
||||||
|
|
||||||
// Perform the RESET exception, which seeds the stack pointer and program
|
// Perform the RESET exception, which seeds the stack pointer and program
|
||||||
// counter, populates the prefetch queue, and then moves to instruction dispatch.
|
// counter, populates the prefetch queue, and then moves to instruction dispatch.
|
||||||
|
Reference in New Issue
Block a user