VIA PIPC: Fix incorrect register order in software FM mode

This commit is contained in:
RichardG867
2023-03-04 13:22:41 -03:00
parent 875a9fe373
commit 17d9578c8e

View File

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