Made NMI's always auto-clear, will revert if it makes things worse.

This commit is contained in:
OBattler 2021-09-02 15:24:17 +02:00
parent 8b1f1b4c9d
commit 586066d891
3 changed files with 11 additions and 0 deletions

View file

@ -195,10 +195,14 @@ exec386(int cycs)
cpu_state.oldpc = cpu_state.pc;
x86_int(2);
nmi_enable = 0;
#ifdef OLD_NMI_BEHAVIOR
if (nmi_auto_clear) {
nmi_auto_clear = 0;
nmi = 0;
}
#else
nmi = 0;
#endif
} else if ((cpu_state.flags & I_FLAG) && pic.int_pending && !cpu_end_block_after_ins) {
vector = picinterrupt();
if (vector != -1) {

View file

@ -797,10 +797,14 @@ exec386_dynarec(int cycs)
cpu_state.oldpc = cpu_state.pc;
x86_int(2);
nmi_enable = 0;
#ifdef OLD_NMI_BEHAVIOR
if (nmi_auto_clear) {
nmi_auto_clear = 0;
nmi = 0;
}
#else
nmi = 0;
#endif
} else if ((cpu_state.flags & I_FLAG) && pic.int_pending) {
vector = picinterrupt();
if (vector != -1) {

View file

@ -968,6 +968,9 @@ check_interrupts(void)
if (nmi && nmi_enable && nmi_mask) {
nmi_enable = 0;
interrupt(2);
#ifndef OLD_NMI_BEHAVIOR
nmi = 0;
#endif
return;
}
if ((cpu_state.flags & I_FLAG) && pic.int_pending && !noint) {