mirror of
https://github.com/TomHarte/CLK.git
synced 2026-04-20 10:17:05 +00:00
Corrects NMI receipt to be genuinely edge triggered.
Previously a caller that signalled NMI set multiple times would trigger multiple NMIs.
This commit is contained in:
@@ -1003,11 +1003,13 @@ bool ProcessorBase::get_interrupt_line() {
|
||||
|
||||
void ProcessorBase::set_non_maskable_interrupt_line(bool value, HalfCycles offset) {
|
||||
// NMIs are edge triggered and cannot be masked.
|
||||
nmi_line_ = value;
|
||||
if(value) {
|
||||
request_status_ |= Interrupt::NMI;
|
||||
if(offset.as_int() < 0) {
|
||||
last_request_status_ |= Interrupt::NMI;
|
||||
if(nmi_line_ != value) {
|
||||
nmi_line_ = value;
|
||||
if(value) {
|
||||
request_status_ |= Interrupt::NMI;
|
||||
if(offset.as_int() < 0) {
|
||||
last_request_status_ |= Interrupt::NMI;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user