1
0
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:
Thomas Harte
2022-05-24 10:25:40 -04:00
parent 1df3ad0671
commit 3a4fb81242

View File

@@ -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);
} }