From edb8c03171e571c82a18ee0d7d1fc6bb6c88cfe2 Mon Sep 17 00:00:00 2001 From: Cacodemon345 Date: Mon, 29 Aug 2022 14:57:12 +0600 Subject: [PATCH] machine: Add MSI MS-5124 --- src/include/86box/machine.h | 1 + src/machine/m_at_socket7_3v.c | 31 +++++++++++++++++++++++++++++ src/machine/machine_table.c | 37 +++++++++++++++++++++++++++++++++++ 3 files changed, 69 insertions(+) diff --git a/src/include/86box/machine.h b/src/include/86box/machine.h index 656809932..32163142f 100644 --- a/src/include/86box/machine.h +++ b/src/include/86box/machine.h @@ -581,6 +581,7 @@ extern int machine_at_p5vxb_init(const machine_t *); extern int machine_at_gw2kte_init(const machine_t *); extern int machine_at_ap5s_init(const machine_t *); +extern int machine_at_ms5124_init(const machine_t *); extern int machine_at_vectra54_init(const machine_t *); /* m_at_socket7.c */ diff --git a/src/machine/m_at_socket7_3v.c b/src/machine/m_at_socket7_3v.c index 21550ce89..9e84ec6c0 100644 --- a/src/machine/m_at_socket7_3v.c +++ b/src/machine/m_at_socket7_3v.c @@ -506,6 +506,37 @@ machine_at_ap5s_init(const machine_t *model) return ret; } + +int +machine_at_ms5124_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/ms5124/AG77.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(0x01, PCI_CARD_SOUTHBRIDGE, 0, 0, 0, 0); + pci_register_slot(0x10, PCI_CARD_NORMAL, 41, 42, 43, 44); + pci_register_slot(0x11, PCI_CARD_NORMAL, 44, 41, 42, 43); + pci_register_slot(0x12, PCI_CARD_NORMAL, 43, 44, 41, 42); + pci_register_slot(0x0F, PCI_CARD_NORMAL, 42, 43, 44, 41); + + device_add(&sis_5511_device); + device_add(&keyboard_ps2_ami_pci_device); + device_add(&w83787f_device); + device_add(&sst_flash_29ee010_device); + + return ret; +} + + int machine_at_vectra54_init(const machine_t *model) { diff --git a/src/machine/machine_table.c b/src/machine/machine_table.c index ef1c2a566..efd4a4895 100644 --- a/src/machine/machine_table.c +++ b/src/machine/machine_table.c @@ -8476,6 +8476,43 @@ const machine_t machines[] = { .snd_device = NULL, .net_device = NULL }, + /* Has AMIKey H KBC firmware (AMIKey-2). */ + { + .name = "[SiS 5511] MSI MS-5124", + .internal_name = "ms5124", + .type = MACHINE_TYPE_SOCKET7_3V, + .chipset = MACHINE_CHIPSET_SIS_5511, + .init = machine_at_ms5124_init, + .pad = 0, + .pad0 = 0, + .pad1 = MACHINE_AVAILABLE, + .pad2 = 0, + .cpu = { + .package = CPU_PKG_SOCKET5_7, + .block = CPU_BLOCK_NONE, + .min_bus = 50000000, + .max_bus = 66666667, + .min_voltage = 3380, + .max_voltage = 3520, + .min_multi = 1.5, + .max_multi = 3.0 + }, + .bus_flags = MACHINE_PS2_PCI, + .flags = MACHINE_IDE_DUAL, + .ram = { + .min = 8192, + .max = 524288, + .step = 8192 + }, + .nvrmask = 127, + .kbc = KBC_UNKNOWN, + .kbc_p1 = 0, + .gpio = 0, + .device = NULL, + .vid_device = NULL, + .snd_device = NULL, + .net_device = NULL + }, /* Socket 7 (Dual Voltage) machines */ /* 430HX */