1
0
mirror of https://github.com/TomHarte/CLK.git synced 2024-12-25 18:30:21 +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:
Thomas Harte 2018-03-01 22:04:56 -05:00
parent 59b4c7314d
commit b02e4fbbf6

View File

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