From 6555ecd3e3e4277a9b5958a9b5f5700d3f6480e8 Mon Sep 17 00:00:00 2001 From: SarahW Date: Thu, 7 Dec 2017 22:26:19 +0000 Subject: [PATCH] Disable NMI masking on PS/2 MCA machines - fixes '103' POST error. --- src/model.c | 2 ++ src/nvr.c | 9 ++++++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/src/model.c b/src/model.c index 3a11c05..805e0f0 100644 --- a/src/model.c +++ b/src/model.c @@ -414,6 +414,8 @@ static void ps2_common_init() pic2_init(); pit_ps2_init(); + + nmi_mask = 0x80; } void ps2_model_50_init() diff --git a/src/nvr.c b/src/nvr.c index bd4794a..bdd9462 100644 --- a/src/nvr.c +++ b/src/nvr.c @@ -7,6 +7,7 @@ #include "rtc.h" #include "paths.h" #include "config.h" +#include "model.h" #include "nmi.h" int oldromset; @@ -201,7 +202,13 @@ void writenvr(uint16_t addr, uint8_t val, void *priv) else { nvraddr=val&nvrmask; - nmi_mask = ~val & 0x80; + /*PS/2 BIOSes will disable NMIs and expect the watchdog timer to still be able + to fire them. I suspect the watchdog is exempt from NMI masking. Currently NMIs + are always enabled for PS/2 machines - this would mean that other peripherals + could fire NMIs regardless of the mask state, but as there aren't any emulated + MCA peripherals that do this it's currently a moot point.*/ + if (!(models[model].flags & MODEL_MCA)) + nmi_mask = ~val & 0x80; } }