From 69f850b0f61ec81bf11b4536227811640fd45799 Mon Sep 17 00:00:00 2001 From: RichardG867 Date: Sat, 14 Nov 2020 17:25:14 -0300 Subject: [PATCH 1/3] Add Gigabyte GA-686BX --- src/include/86box/machine.h | 1 + src/machine/m_at_slot1.c | 32 ++++++++++++++++++++++++++++++++ src/machine/machine_table.c | 1 + 3 files changed, 34 insertions(+) diff --git a/src/include/86box/machine.h b/src/include/86box/machine.h index 867dec624..465e02244 100644 --- a/src/include/86box/machine.h +++ b/src/include/86box/machine.h @@ -460,6 +460,7 @@ extern int machine_at_p3bf_init(const machine_t *); extern int machine_at_bf6_init(const machine_t *); extern int machine_at_ax6bc_init(const machine_t *); extern int machine_at_atc6310bxii_init(const machine_t *); +extern int machine_at_ga686bx_init(const machine_t *); extern int machine_at_tsunamiatx_init(const machine_t *); extern int machine_at_p6sba_init(const machine_t *); extern int machine_at_ficka6130_init(const machine_t *); diff --git a/src/machine/m_at_slot1.c b/src/machine/m_at_slot1.c index 328691ca2..1f782ea99 100644 --- a/src/machine/m_at_slot1.c +++ b/src/machine/m_at_slot1.c @@ -357,6 +357,38 @@ machine_at_atc6310bxii_init(const machine_t *model) } +int +machine_at_ga686bx_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear(L"roms/machines/ga686bx/6BX.F2a", + 0x000c0000, 262144, 0); + + if (bios_only || !ret) + return ret; + + machine_at_common_init_ex(model, 2); + + pci_init(PCI_CONFIG_TYPE_1); + pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); + pci_register_slot(0x07, PCI_CARD_SOUTHBRIDGE, 1, 2, 3, 4); + pci_register_slot(0x08, PCI_CARD_NORMAL, 1, 2, 3, 4); + pci_register_slot(0x09, PCI_CARD_NORMAL, 2, 3, 4, 1); + pci_register_slot(0x0A, PCI_CARD_NORMAL, 3, 4, 1, 2); + pci_register_slot(0x0B, PCI_CARD_NORMAL, 4, 1, 2, 3); + pci_register_slot(0x01, PCI_CARD_SPECIAL, 1, 2, 3, 4); + device_add(&i440bx_device); + device_add(&piix4e_device); + device_add(&keyboard_ps2_ami_pci_device); + device_add(&w83977tf_device); + device_add(&intel_flash_bxt_device); + spd_register(SPD_TYPE_SDRAM, 0xF, 256); + + return ret; +} + + int machine_at_p6sba_init(const machine_t *model) { diff --git a/src/machine/machine_table.c b/src/machine/machine_table.c index d2d03b940..a77bdea79 100644 --- a/src/machine/machine_table.c +++ b/src/machine/machine_table.c @@ -373,6 +373,7 @@ const machine_t machines[] = { { "[i440BX] ABIT BF6", "bf6", MACHINE_TYPE_SLOT1, {{"Intel", cpus_PentiumII}, {"Intel/PGA370", cpus_Celeron},{"VIA", cpus_Cyrix3},{"", NULL}, {"", NULL}}, MACHINE_AGP | MACHINE_BUS_PS2 | MACHINE_IDE_DUAL, 8, 768, 8, 255, machine_at_bf6_init, NULL }, { "[i440BX] AOpen AX6BC", "ax6bc", MACHINE_TYPE_SLOT1, {{"Intel", cpus_PentiumII}, {"Intel/PGA370", cpus_Celeron},{"VIA", cpus_Cyrix3},{"", NULL}, {"", NULL}}, MACHINE_AGP | MACHINE_BUS_PS2 | MACHINE_IDE_DUAL, 8, 768, 8, 255, machine_at_ax6bc_init, NULL }, { "[i440BX] A-Trend ATC6310BXII", "atc6310bxii", MACHINE_TYPE_SLOT1, {{"Intel", cpus_PentiumII}, {"Intel/PGA370", cpus_Celeron},{"VIA", cpus_Cyrix3},{"", NULL}, {"", NULL}}, MACHINE_AGP | MACHINE_BUS_PS2 | MACHINE_IDE_DUAL, 8, 768, 8, 255, machine_at_atc6310bxii_init, NULL }, + { "[i440BX] Gigabyte GA-686BX", "ga686bx", MACHINE_TYPE_SLOT1, {{"Intel", cpus_PentiumII}, {"Intel/PGA370", cpus_Celeron},{"VIA", cpus_Cyrix3},{"", NULL}, {"", NULL}}, MACHINE_AGP | MACHINE_BUS_PS2 | MACHINE_IDE_DUAL, 8, 1024, 8, 255, machine_at_ga686bx_init, NULL }, { "[i440BX] Tyan Tsunami ATX", "tsunamiatx", MACHINE_TYPE_SLOT1, {{"Intel", cpus_PentiumII}, {"Intel/PGA370", cpus_Celeron},{"VIA", cpus_Cyrix3},{"", NULL}, {"", NULL}}, MACHINE_AGP | MACHINE_BUS_PS2 | MACHINE_IDE_DUAL | MACHINE_SOUND, 8, 1024, 8, 255, machine_at_tsunamiatx_init, at_tsunamiatx_get_device }, { "[i440BX] SuperMicro Super P6SBA", "p6sba", MACHINE_TYPE_SLOT1, {{"Intel", cpus_PentiumII}, {"Intel/PGA370", cpus_Celeron},{"VIA", cpus_Cyrix3},{"", NULL}, {"", NULL}}, MACHINE_AGP | MACHINE_BUS_PS2 | MACHINE_IDE_DUAL, 8, 768, 8, 255, machine_at_p6sba_init, NULL }, From 1a0004dced80ae75be9b2845cd3bb0b5287b777a Mon Sep 17 00:00:00 2001 From: RichardG867 Date: Sat, 14 Nov 2020 17:34:21 -0300 Subject: [PATCH 2/3] Fix CMOS battery low warning on GA-686BX --- src/acpi.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/acpi.c b/src/acpi.c index 75225daaf..f1e8da804 100644 --- a/src/acpi.c +++ b/src/acpi.c @@ -1135,10 +1135,12 @@ acpi_reset(void *priv) memset(&dev->regs, 0x00, sizeof(acpi_regs_t)); dev->regs.gpireg[0] = 0xff; dev->regs.gpireg[1] = 0xff; - /* SMSC SLC90E66 machines: + /* A-Trend ATC7020BXII: - Bit 3: 80-conductor cable on secondary IDE channel (active low) - - Bit 2: 80-conductor cable on primary IDE channel (active low) */ - dev->regs.gpireg[2] = 0xf3; + - Bit 2: 80-conductor cable on primary IDE channel (active low) + Gigabyte GA-686BX: + - Bit 1: CMOS battery low (active high) */ + dev->regs.gpireg[2] = 0xf1; for (i = 0; i < 4; i++) dev->regs.gporeg[i] = dev->gporeg_default[i]; if (dev->vendor == VEN_VIA_596B) { From 36f288015f456f1b5fa2a54d686fa3ee751fac84 Mon Sep 17 00:00:00 2001 From: RichardG867 Date: Sat, 14 Nov 2020 18:09:35 -0300 Subject: [PATCH 3/3] Add hardware monitoring to the GA-686BX --- src/machine/m_at_slot1.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/machine/m_at_slot1.c b/src/machine/m_at_slot1.c index 1f782ea99..d760ee841 100644 --- a/src/machine/m_at_slot1.c +++ b/src/machine/m_at_slot1.c @@ -384,6 +384,12 @@ machine_at_ga686bx_init(const machine_t *model) device_add(&w83977tf_device); device_add(&intel_flash_bxt_device); spd_register(SPD_TYPE_SDRAM, 0xF, 256); + device_add(&w83781d_device); /* fans: CPU, unused, unused; temperatures: unused, CPU, unused */ + hwm_values.temperatures[0] = 0; /* unused */ + hwm_values.temperatures[1] += 4; /* CPU offset */ + hwm_values.temperatures[2] = 0; /* unused */ + hwm_values.fans[1] = 0; /* unused */ + hwm_values.fans[2] = 0; /* unused */ return ret; }