From 05fe82a2052ce5a36406f04d0e63773a8e202498 Mon Sep 17 00:00:00 2001 From: Cacodemon345 Date: Mon, 13 Oct 2025 01:40:29 +0600 Subject: [PATCH] Give all PC87307 machines the earlier GPIO behaviour (#6332) --- src/include/86box/machine.h | 1 + src/machine/m_at_socket8.c | 9 +++++++++ src/machine/machine_table.c | 8 ++++---- 3 files changed, 14 insertions(+), 4 deletions(-) diff --git a/src/include/86box/machine.h b/src/include/86box/machine.h index ee8b7eafc..886e73356 100644 --- a/src/include/86box/machine.h +++ b/src/include/86box/machine.h @@ -1139,6 +1139,7 @@ extern int machine_at_acerv60n_init(const machine_t *); extern int machine_at_p65up5_cp6nd_init(const machine_t *); extern int machine_at_8600ttc_init(const machine_t *); extern int machine_at_686nx_init(const machine_t *); +extern uint32_t machine_ap440fx_vs440fx_gpio_handler(uint8_t write, uint32_t val); extern int machine_at_ap440fx_init(const machine_t *); #ifdef EMU_DEVICE_H extern const device_t vs440fx_device; diff --git a/src/machine/m_at_socket8.c b/src/machine/m_at_socket8.c index ea53e5fd4..8d1847d5f 100644 --- a/src/machine/m_at_socket8.c +++ b/src/machine/m_at_socket8.c @@ -303,6 +303,15 @@ machine_at_686nx_init(const machine_t *model) return ret; } +uint32_t +machine_ap440fx_vs440fx_gpio_handler(uint8_t write, uint32_t val) +{ + if (!write) + return 0xff7f; + + (void)val; /* Writes are ignored. */ +} + int machine_at_ap440fx_init(const machine_t *model) { diff --git a/src/machine/machine_table.c b/src/machine/machine_table.c index f6837a9df..b2534988f 100644 --- a/src/machine/machine_table.c +++ b/src/machine/machine_table.c @@ -15608,7 +15608,7 @@ const machine_t machines[] = { .chipset = MACHINE_CHIPSET_INTEL_430TX, .init = machine_at_optiplexgn_init, .p1_handler = machine_generic_p1_handler, - .gpio_handler = NULL, + .gpio_handler = machine_ap440fx_vs440fx_gpio_handler, .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, .cpu = { @@ -17328,7 +17328,7 @@ const machine_t machines[] = { .chipset = MACHINE_CHIPSET_INTEL_440FX, .init = machine_at_ap440fx_init, .p1_handler = machine_generic_p1_handler, - .gpio_handler = NULL, + .gpio_handler = machine_ap440fx_vs440fx_gpio_handler, .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, .cpu = { @@ -17374,7 +17374,7 @@ const machine_t machines[] = { .chipset = MACHINE_CHIPSET_INTEL_440FX, .init = machine_at_vs440fx_init, .p1_handler = machine_generic_p1_handler, - .gpio_handler = NULL, + .gpio_handler = machine_ap440fx_vs440fx_gpio_handler, .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, .cpu = { @@ -17781,7 +17781,7 @@ const machine_t machines[] = { .chipset = MACHINE_CHIPSET_INTEL_440LX, .init = machine_at_optiplexgxa_init, .p1_handler = machine_generic_p1_handler, - .gpio_handler = NULL, + .gpio_handler = machine_ap440fx_vs440fx_gpio_handler, .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, .cpu = {