mirror of
https://github.com/TomHarte/CLK.git
synced 2024-12-26 09:29:45 +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:
parent
59b4c7314d
commit
b02e4fbbf6
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user