From 35b107ca1dbaf16541135c4760f46432c40e19a4 Mon Sep 17 00:00:00 2001 From: win2kgamer <47463859+win2kgamer@users.noreply.github.com> Date: Sat, 30 Aug 2025 15:06:47 -0500 Subject: [PATCH 1/3] W837x7: Also set register 00h in no IDE configurations, fixes MSI MS-4144/4145/5119 FDC failure --- src/sio/sio_w837x7.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sio/sio_w837x7.c b/src/sio/sio_w837x7.c index 3b5924b27..0b6aae240 100644 --- a/src/sio/sio_w837x7.c +++ b/src/sio/sio_w837x7.c @@ -390,7 +390,7 @@ w837x7_reset(w837x7_t *dev) if (dev->has_ide == 0x02) dev->regs[0x00] = 0x90; - else if (dev->has_ide == 0x01) + else dev->regs[0x00] = 0xd0; if (dev->ide_start) From 834c745459d1902b87e1ce8342e533e73f8c897a Mon Sep 17 00:00:00 2001 From: win2kgamer <47463859+win2kgamer@users.noreply.github.com> Date: Sat, 30 Aug 2025 15:10:26 -0500 Subject: [PATCH 2/3] MSI MS-4145 has a PS/2 KBC with an AT port, fixes keyboard in WfW 3.11 --- src/machine/m_at_socket3_pci.c | 2 +- src/machine/machine_table.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/machine/m_at_socket3_pci.c b/src/machine/m_at_socket3_pci.c index 74060ea03..451d791ca 100644 --- a/src/machine/m_at_socket3_pci.c +++ b/src/machine/m_at_socket3_pci.c @@ -277,7 +277,7 @@ machine_at_ms4145_init(const machine_t *model) pci_register_slot(0x06, PCI_CARD_NORMAL, 4, 1, 2, 3); device_add(&ali1489_device); - device_add_params(&w837x7_device, (void *) (W83787F | W837X7_KEY_89)); + device_add_params(&w837x7_device, (void *) (W83787F | W837X7_KEY_88)); device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params); diff --git a/src/machine/machine_table.c b/src/machine/machine_table.c index 7648c7888..30b859544 100644 --- a/src/machine/machine_table.c +++ b/src/machine/machine_table.c @@ -9371,7 +9371,7 @@ const machine_t machines[] = { .max_multi = 0 }, .bus_flags = MACHINE_PCI, - .flags = MACHINE_IDE_DUAL | MACHINE_APM, + .flags = MACHINE_PS2_KBC | MACHINE_IDE_DUAL | MACHINE_APM, .ram = { .min = 1024, .max = 65536, From 7e31741af45016e978e9792fb6f4f1c4bdab4610 Mon Sep 17 00:00:00 2001 From: win2kgamer <47463859+win2kgamer@users.noreply.github.com> Date: Sat, 30 Aug 2025 21:34:00 -0500 Subject: [PATCH 3/3] UM866x: Don't check nonexistent C1h register on 862, fixes missing LPT port on PB300 and CAF C747 --- src/sio/sio_um866x.c | 40 +++++++++++++++++++++------------------- 1 file changed, 21 insertions(+), 19 deletions(-) diff --git a/src/sio/sio_um866x.c b/src/sio/sio_um866x.c index bc1127a8b..0c6f04484 100644 --- a/src/sio/sio_um866x.c +++ b/src/sio/sio_um866x.c @@ -108,25 +108,27 @@ um866x_lpt_handler(um866x_t *dev) int enabled = (dev->regs[0] & 0x08); lpt_port_remove(dev->lpt); - switch(dev->regs[1] & 0xc0) { - case 0x00: - enabled = 0; - break; - case 0x40: - lpt_set_epp(dev->lpt, 1); - lpt_set_ecp(dev->lpt, 0); - lpt_set_ext(dev->lpt, 0); - break; - case 0x80: - lpt_set_epp(dev->lpt, 0); - lpt_set_ecp(dev->lpt, 0); - lpt_set_ext(dev->lpt, 1); - break; - case 0xc0: - lpt_set_epp(dev->lpt, 0); - lpt_set_ecp(dev->lpt, 1); - lpt_set_ext(dev->lpt, 0); - break; + if (dev->max_reg != 0x00) { + switch(dev->regs[1] & 0xc0) { + case 0x00: + enabled = 0; + break; + case 0x40: + lpt_set_epp(dev->lpt, 1); + lpt_set_ecp(dev->lpt, 0); + lpt_set_ext(dev->lpt, 0); + break; + case 0x80: + lpt_set_epp(dev->lpt, 0); + lpt_set_ecp(dev->lpt, 0); + lpt_set_ext(dev->lpt, 1); + break; + case 0xc0: + lpt_set_epp(dev->lpt, 0); + lpt_set_ecp(dev->lpt, 1); + lpt_set_ext(dev->lpt, 0); + break; + } } if (enabled) { switch ((dev->regs[1] >> 3) & 0x01) {