From 17d9578c8ef3f8ff59d9322784cad50918cf0e56 Mon Sep 17 00:00:00 2001 From: RichardG867 Date: Sat, 4 Mar 2023 13:22:41 -0300 Subject: [PATCH] VIA PIPC: Fix incorrect register order in software FM mode --- src/chipset/via_pipc.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/chipset/via_pipc.c b/src/chipset/via_pipc.c index a568032b4..6e59db370 100644 --- a/src/chipset/via_pipc.c +++ b/src/chipset/via_pipc.c @@ -784,12 +784,13 @@ pipc_fm_write(uint16_t addr, uint8_t val, void *priv) index port, and only fires NMI/SMI when writing to the data port. */ if (!(addr & 0x01)) { dev->fmnmi_regs[0x00] = (addr & 0x02) ? 0x02 : 0x01; - dev->fmnmi_regs[0x01] = val; - } else { dev->fmnmi_regs[0x02] = val; + } else { + dev->fmnmi_regs[0x01] = val; /* Fire NMI/SMI if enabled. */ if (dev->ac97_regs[0][0x48] & 0x01) { + pipc_log("PIPC: Raising %s\n", (dev->ac97_regs[0][0x48] & 0x04) ? "SMI" : "NMI"); if (dev->ac97_regs[0][0x48] & 0x04) smi_raise(); else