From 07c0a657b0d229034b7fbd9d90d63c3a85bbad22 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Miguel=20S=C3=A1nchez=20Garc=C3=ADa?= Date: Wed, 23 Jul 2025 01:12:21 +0200 Subject: [PATCH] Add Biostar M5ATA motherboard --- src/include/86box/machine.h | 1 + src/machine/m_at_socket7.c | 29 +++++++++++++++++++++++++++ src/machine/machine_table.c | 40 +++++++++++++++++++++++++++++++++++++ 3 files changed, 70 insertions(+) diff --git a/src/include/86box/machine.h b/src/include/86box/machine.h index 93080538b..e3a367853 100644 --- a/src/include/86box/machine.h +++ b/src/include/86box/machine.h @@ -789,6 +789,7 @@ extern int machine_at_ms5146_init(const machine_t *); extern int machine_at_cb52xsi_init(const machine_t *); extern int machine_at_m560_init(const machine_t *); +extern int machine_at_m5ata_init(const machine_t *); extern int machine_at_ms5164_init(const machine_t *); extern int machine_at_sp97xv_init(const machine_t *); diff --git a/src/machine/m_at_socket7.c b/src/machine/m_at_socket7.c index 46c7b7623..a4bcc638d 100644 --- a/src/machine/m_at_socket7.c +++ b/src/machine/m_at_socket7.c @@ -1550,6 +1550,35 @@ machine_at_m560_init(const machine_t *model) return ret; } +int +machine_at_m5ata_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/m5ata/ATA1223.BIN", + 0x000e0000, 131072, 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, 1, 2, 3, 4); + pci_register_slot(0x02, PCI_CARD_SOUTHBRIDGE, 1, 2, 3, 4); + pci_register_slot(0x0B, PCI_CARD_SOUTHBRIDGE_IDE, 1, 2, 3, 4); + pci_register_slot(0x03, PCI_CARD_NORMAL, 1, 2, 3, 4); + pci_register_slot(0x04, PCI_CARD_NORMAL, 2, 3, 4, 1); + pci_register_slot(0x05, PCI_CARD_NORMAL, 3, 4, 1, 2); + pci_register_slot(0x06, PCI_CARD_NORMAL, 4, 1, 2, 3); + + device_add(&ali1531_device); + device_add(&ali1543_device); /* -5 */ + spd_register(SPD_TYPE_SDRAM, 0x3, 64); + + return ret; +} + int machine_at_ms5164_init(const machine_t *model) { diff --git a/src/machine/machine_table.c b/src/machine/machine_table.c index 86b75dc39..ef1d518e8 100644 --- a/src/machine/machine_table.c +++ b/src/machine/machine_table.c @@ -14503,6 +14503,46 @@ const machine_t machines[] = { /* ALi ALADDiN IV+ */ /* Has the ALi M1543 southbridge with on-chip KBC. */ + { + .name = "[ALi ALADDiN IV+] Biostar M5ATA", + .internal_name = "m5ata", + .type = MACHINE_TYPE_SOCKET7, + .chipset = MACHINE_CHIPSET_ALI_ALADDIN_IV_PLUS, + .init = machine_at_m5ata_init, + .p1_handler = NULL, + .gpio_handler = NULL, + .available_flag = MACHINE_AVAILABLE, + .gpio_acpi_handler = NULL, + .cpu = { + .package = CPU_PKG_SOCKET5_7, + .block = CPU_BLOCK_NONE, + .min_bus = 60000000, + .max_bus = 66666667, + .min_voltage = 2100, + .max_voltage = 3500, + .min_multi = 1.5, + .max_multi = 4.5 + }, + .bus_flags = MACHINE_PS2_PCI | MACHINE_BUS_USB, + .flags = MACHINE_IDE_DUAL | MACHINE_APM | MACHINE_USB, + .ram = { + .min = 8192, + .max = 262144, + .step = 8192 + }, + .nvrmask = 127, + .kbc_device = NULL, + .kbc_p1 = 0xff, + .gpio = 0xffffffff, + .gpio_acpi = 0xffffffff, + .device = NULL, + .fdc_device = NULL, + .sio_device = NULL, + .vid_device = NULL, + .snd_device = NULL, + .net_device = NULL + }, + /* Has the ALi M1543 southbridge with on-chip KBC. */ { .name = "[ALi ALADDiN IV+] MSI MS-5164", .internal_name = "ms5164",