mirror of
https://github.com/TomHarte/CLK.git
synced 2025-08-08 14:25:05 +00:00
Add a dummy STOP state.
This commit is contained in:
@@ -17,7 +17,7 @@
|
|||||||
namespace CPU {
|
namespace CPU {
|
||||||
namespace MC68000Mk2 {
|
namespace MC68000Mk2 {
|
||||||
|
|
||||||
// TODO: VPA, BERR, interrupt inputs, etc.
|
// TODO: BERR, interrupt inputs, etc.
|
||||||
// Also, from Instruction.hpp:
|
// Also, from Instruction.hpp:
|
||||||
//
|
//
|
||||||
// MOVEAw, MOVEAl, STOP
|
// MOVEAw, MOVEAl, STOP
|
||||||
@@ -181,6 +181,7 @@ enum ExecutionState: int {
|
|||||||
UNLINK,
|
UNLINK,
|
||||||
RESET,
|
RESET,
|
||||||
NOP,
|
NOP,
|
||||||
|
STOP,
|
||||||
};
|
};
|
||||||
|
|
||||||
// MARK: - The state machine.
|
// MARK: - The state machine.
|
||||||
@@ -332,6 +333,11 @@ void Processor<BusHandler, dtack_is_implicit, permit_overrun, signal_will_perfor
|
|||||||
}
|
}
|
||||||
MoveToStateSpecific(WaitForDTACK);
|
MoveToStateSpecific(WaitForDTACK);
|
||||||
|
|
||||||
|
// Spin in place until an interrupt arrives.
|
||||||
|
BeginState(STOP):
|
||||||
|
assert(false); // TODO
|
||||||
|
MoveToStateSpecific(STOP);
|
||||||
|
|
||||||
// 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.
|
||||||
BeginState(Reset):
|
BeginState(Reset):
|
||||||
@@ -800,6 +806,8 @@ void Processor<BusHandler, dtack_is_implicit, permit_overrun, signal_will_perfor
|
|||||||
StdCASE(MOVEtoUSP, perform_state_ = Perform_np);
|
StdCASE(MOVEtoUSP, perform_state_ = Perform_np);
|
||||||
StdCASE(MOVEfromUSP, perform_state_ = Perform_np);
|
StdCASE(MOVEfromUSP, perform_state_ = Perform_np);
|
||||||
|
|
||||||
|
SpecialCASE(STOP);
|
||||||
|
|
||||||
default:
|
default:
|
||||||
assert(false);
|
assert(false);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user