From 5f2d9f1fdb3c67ae91e572210db285d92d8ae149 Mon Sep 17 00:00:00 2001 From: OBattler Date: Sat, 8 Nov 2025 02:32:52 +0100 Subject: [PATCH] Fix some machine warnings. --- src/include/86box/machine.h | 6 ++-- src/machine/m_at_socket370.c | 61 ++++++++++++++++++------------------ 2 files changed, 34 insertions(+), 33 deletions(-) diff --git a/src/include/86box/machine.h b/src/include/86box/machine.h index a50947ef5..878683217 100644 --- a/src/include/86box/machine.h +++ b/src/include/86box/machine.h @@ -1292,6 +1292,9 @@ extern int machine_at_cubx_init(const machine_t *); /* i440ZX */ extern int machine_at_63a1_init(const machine_t *); +/* SiS 600 */ +extern int machine_at_7sbb_init(const machine_t *); + /* SMSC VictoryBX-66 */ extern int machine_at_atc7020bxii_init(const machine_t *); extern int machine_at_m773_init(const machine_t *); @@ -1310,9 +1313,6 @@ extern const device_t ms6318_device; #endif extern int machine_at_ms6318_init(const machine_t *); -/* SiS 600 */ -extern int machine_at_7sbb_init(const machine_t *); - /* m_at_misc.c */ extern int machine_at_vpc2007_init(const machine_t *); diff --git a/src/machine/m_at_socket370.c b/src/machine/m_at_socket370.c index 88bb8752f..2beca3eac 100644 --- a/src/machine/m_at_socket370.c +++ b/src/machine/m_at_socket370.c @@ -215,6 +215,35 @@ machine_at_63a1_init(const machine_t *model) return ret; } +/* SiS 600 */ +int +machine_at_7sbb_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/7sbb/sbb12aa2.bin", + 0x000c0000, 262144, 0); + + if (bios_only || !ret) + return ret; + + machine_at_common_init_ex(model, 2); + + pci_init(PCI_CONFIG_TYPE_1 | FLAG_TRC_CONTROLS_CPURST); + 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(0x0F, PCI_CARD_NORMAL, 1, 2, 3, 4); + pci_register_slot(0x10, PCI_CARD_NORMAL, 2, 3, 4, 1); + pci_register_slot(0x11, PCI_CARD_NORMAL, 3, 4, 1, 2); + pci_register_slot(0x02, PCI_CARD_AGPBRIDGE, 1, 2, 3, 4); + + device_add(&sis_5600_device); + device_add(&it8661f_device); + device_add(&sst_flash_29ee020_device); /* assumed */ + + return ret; +} + /* SMSC VictoryBX-66 */ int machine_at_atc7020bxii_init(const machine_t *model) @@ -584,36 +613,8 @@ machine_at_ms6318_init(const machine_t *model) if (sound_card_current[0] == SOUND_INTERNAL) device_add(machine_get_snd_device(machine)); - device_add(&stac9708_device); - - return ret; -} - -/* SiS 600 */ -int -machine_at_7sbb_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear("roms/machines/7sbb/sbb12aa2.bin", - 0x000c0000, 262144, 0); - - if (bios_only || !ret) - return ret; - - machine_at_common_init_ex(model, 2); - - pci_init(PCI_CONFIG_TYPE_1 | FLAG_TRC_CONTROLS_CPURST); - 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(0x0F, PCI_CARD_NORMAL, 1, 2, 3, 4); - pci_register_slot(0x10, PCI_CARD_NORMAL, 2, 3, 4, 1); - pci_register_slot(0x11, PCI_CARD_NORMAL, 3, 4, 1, 2); - pci_register_slot(0x02, PCI_CARD_AGPBRIDGE, 1, 2, 3, 4); - - device_add(&sis_5600_device); - device_add(&it8661f_device); - device_add(&sst_flash_29ee020_device); /* assumed */ + + device_add(&stac9708_device); return ret; }