From d375b00c8c924dc229a0f61d958944a7a187f2d5 Mon Sep 17 00:00:00 2001 From: OBattler Date: Sun, 21 Jun 2020 02:14:58 +0200 Subject: [PATCH] Added the Biostar 8500TUC (430HX AMI Hi-Flex) and fixed a PIC 2 bug. --- src/include/86box/machine.h | 1 + src/machine/m_at_socket7_s7.c | 31 +++++++++++++++++++++++++++++++ src/machine/machine_table.c | 1 + src/pic.c | 2 +- 4 files changed, 34 insertions(+), 1 deletion(-) diff --git a/src/include/86box/machine.h b/src/include/86box/machine.h index 0038dcc9d..343046f82 100644 --- a/src/include/86box/machine.h +++ b/src/include/86box/machine.h @@ -333,6 +333,7 @@ extern int machine_at_acerv35n_init(const machine_t *); extern int machine_at_ap53_init(const machine_t *); extern int machine_at_p55t2p4_init(const machine_t *); extern int machine_at_p55t2s_init(const machine_t *); +extern int machine_at_8500tuc_init(const machine_t *); extern int machine_at_m7shi_init(const machine_t *); extern int machine_at_tc430hx_init(const machine_t *); extern int machine_at_equium5200_init(const machine_t *); diff --git a/src/machine/m_at_socket7_s7.c b/src/machine/m_at_socket7_s7.c index 41ca9aa55..76a843a25 100644 --- a/src/machine/m_at_socket7_s7.c +++ b/src/machine/m_at_socket7_s7.c @@ -370,6 +370,37 @@ machine_at_p55t2s_init(const machine_t *model) return ret; } + +int +machine_at_8500tuc_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear(L"roms/machines/8500tuc/Tuc0221b.rom", + 0x000e0000, 131072, 0); + + if (bios_only || !ret) + return ret; + + machine_at_common_init(model); + + pci_init(PCI_CONFIG_TYPE_1); + pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); + 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(0x07, PCI_CARD_SOUTHBRIDGE, 1, 2, 3, 4); + device_add(&i430hx_device); + device_add(&piix3_device); + device_add(&keyboard_ps2_ami_pci_device); + device_add(&um8669f_device); + device_add(&intel_flash_bxt_device); + + return ret; +} + + int machine_at_m7shi_init(const machine_t *model) { diff --git a/src/machine/machine_table.c b/src/machine/machine_table.c index 6fdf0970b..2f8efaba4 100644 --- a/src/machine/machine_table.c +++ b/src/machine/machine_table.c @@ -268,6 +268,7 @@ const machine_t machines[] = { /* 430HX */ { "[i430HX-3V] Acer M3a", "acerm3a", MACHINE_TYPE_SOCKET7_3V, MACHINE_CPUS_PENTIUM_S73V, MACHINE_PCI | MACHINE_ISA | MACHINE_AT | MACHINE_PS2 | MACHINE_HDC, 8, 192, 8, 127, machine_at_acerm3a_init, NULL }, { "[i430HX-3V] AOpen AP53", "ap53", MACHINE_TYPE_SOCKET7_3V, MACHINE_CPUS_PENTIUM_S73V, MACHINE_PCI | MACHINE_ISA | MACHINE_AT | MACHINE_PS2 | MACHINE_HDC, 8, 512, 8, 127, machine_at_ap53_init, NULL }, + { "[i430HX-3V] Biostar 8500TUC", "8500tuc", MACHINE_TYPE_SOCKET7_3V, MACHINE_CPUS_PENTIUM_S73V, MACHINE_PCI | MACHINE_ISA | MACHINE_AT | MACHINE_PS2 | MACHINE_HDC, 8, 512, 8, 127, machine_at_8500tuc_init, NULL }, { "[i430HX-3V] SuperMicro Super P55T2S", "p55t2s", MACHINE_TYPE_SOCKET7_3V, MACHINE_CPUS_PENTIUM_S73V, MACHINE_PCI | MACHINE_ISA | MACHINE_AT | MACHINE_PS2 | MACHINE_HDC, 8, 768, 8, 127, machine_at_p55t2s_init, NULL }, { "[i430HX] Acer V35n", "acerv35n", MACHINE_TYPE_SOCKET7, MACHINE_CPUS_PENTIUM_S7, MACHINE_PCI | MACHINE_ISA | MACHINE_AT | MACHINE_PS2 | MACHINE_HDC, 8, 192, 8, 127, machine_at_acerv35n_init, NULL }, diff --git a/src/pic.c b/src/pic.c index 4e723a12a..364d87589 100644 --- a/src/pic.c +++ b/src/pic.c @@ -407,7 +407,7 @@ pic2_write(uint16_t addr, uint8_t val, void *priv) if (val & 4) pic2.read=4; if (val & 2) - pic2.read=(val & 3); + pic2.read=(val & 1); } } }